summaryrefslogtreecommitdiffstats
path: root/collections-debian-merged/ansible_collections/cisco
diff options
context:
space:
mode:
Diffstat (limited to 'collections-debian-merged/ansible_collections/cisco')
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/.github/workflows/ansible-test.yml171
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/.gitignore393
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/.vscode/settings.json3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/CHANGELOG.rst130
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/FILES.json2938
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/LICENSE678
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/MANIFEST.json45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/README.md91
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/changelogs/.gitignore1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/changelogs/.plugin-cache.yaml444
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/changelogs/changelog.yaml102
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/changelogs/config.yaml31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/meta/runtime.yml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/doc_fragments/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/doc_fragments/aci.py120
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/module_utils/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/module_utils/aci.py1336
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aaa_user.py367
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aaa_user_certificate.py298
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_access_port_block_to_access_port.py437
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_access_port_to_interface_policy_leaf_profile.py429
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_access_sub_port_block_to_access_port.py364
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aep.py286
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aep_to_domain.py313
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_ap.py290
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd.py461
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd_dhcp_label.py312
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd_subnet.py467
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd_to_l3out.py240
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_cidr.py292
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_ctx_profile.py318
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_provider.py178
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_region.py219
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_subnet.py330
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_vpn_gateway.py253
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_zone.py233
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_config_rollback.py321
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_config_snapshot.py337
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_contract.py312
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_contract_subject.py358
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_contract_subject_to_filter.py319
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_domain.py395
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_domain_to_encap_pool.py378
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_domain_to_vlan_pool.py366
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_encap_pool.py316
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_encap_pool_range.py449
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg.py398
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_monitoring_policy.py246
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_to_contract.py351
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_to_contract_master.py302
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_to_domain.py441
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_fabric_node.py288
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_fabric_scheduler.py331
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_filter.py279
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_filter_entry.py376
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_group.py238
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_group_node.py248
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_policy.py253
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_source.py303
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_cdp.py266
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_fc.py240
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_l2.py265
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_leaf_breakout_port_group.py259
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_leaf_policy_group.py580
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_leaf_profile.py313
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_link_level.py292
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_lldp.py248
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_mcp.py239
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_ospf.py405
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_port_channel.py322
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_port_security.py253
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_selector_to_switch_policy_leaf_profile.py254
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l2out.py320
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l2out_extepg.py310
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out.py367
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_extepg.py309
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_extepg_to_contract.py346
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_extsubnet.py332
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_logical_interface_vpc_member.py340
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_route_tag_policy.py255
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_static_routes.py368
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_maintenance_group.py236
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_maintenance_group_node.py242
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_maintenance_policy.py277
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_rest.py451
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_static_binding_to_epg.py441
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_switch_leaf_selector.py349
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_switch_policy_leaf_profile.py250
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_switch_policy_vpc_protection_group.py304
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_system.py197
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_taboo_contract.py286
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant.py261
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_action_rule_profile.py246
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_ep_retention_policy.py361
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_span_dst_group.py246
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_span_src_group.py265
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_span_src_group_to_dst_group.py260
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vlan_pool.py283
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vlan_pool_encap_block.py362
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vmm_credential.py316
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vrf.py324
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/.gitignore1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/inventory.networking11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/network-integration.requirements.txt2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/target-prefixes.network1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user/tasks/main.yml235
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/admin.crt14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/admin.key16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/admin_invalid.key3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/openssh_rsa.key16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_ansible.key15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_user.crt14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_user.key16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/tasks/main.yml279
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_block_to_access_port/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_block_to_access_port/tasks/main.yml254
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile/tasks/main.yml205
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_sub_port_block_to_access_port/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_sub_port_block_to_access_port/tasks/main.yml141
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep/tasks/main.yml331
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep_to_domain/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep_to_domain/tasks/main.yml212
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_ap/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_ap/tasks/main.yml190
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd/tasks/main.yml213
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_dhcp_label/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_dhcp_label/tasks/main.yml147
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_subnet/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_subnet/tasks/main.yml240
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_cidr/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_cidr/tasks/main.yml303
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_ctx_profile/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_ctx_profile/tasks/main.yml323
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_provider/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_provider/tasks/main.yml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_region/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_region/tasks/main.yml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_subnet/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_subnet/tasks/main.yml347
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_vpn_gateway/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_vpn_gateway/tasks/main.yml157
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_zone/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_zone/tasks/main.yml90
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_rollback/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_rollback/tasks/main.yml108
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_snapshot/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_snapshot/tasks/main.yml144
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract/tasks/main.yml164
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject/tasks/main.yml246
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject_to_filter/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject_to_filter/tasks/main.yml194
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/fc.yml176
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/l2dom.yml176
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/l3dom.yml176
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/main.yml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/phys.yml176
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/vmm-vmware.yml184
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_encap_pool/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_encap_pool/tasks/main.yml635
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_vlan_pool/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_vlan_pool/tasks/main.yml222
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/main.yml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/vlan.yml274
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/vsan.yml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/vxlan.yml178
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/main.yml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/vlan.yml387
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/vsan.yml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/vxlan.yml19
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg/tasks/main.yml187
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract/tasks/main.yml254
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract_master/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract_master/tasks/main.yml202
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_domain/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_domain/tasks/main.yml279
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_fabric_node/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_fabric_node/tasks/main.yml217
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter/tasks/main.yml223
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter_entry/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter_entry/tasks/main.yml299
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_firmware_source/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_firmware_source/tasks/main.yml207
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_cdp/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_cdp/tasks/main.yml106
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_breakout_port_group/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_breakout_port_group/tasks/main.yml162
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_policy_group/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_policy_group/tasks/main.yml453
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_profile/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_profile/tasks/main.yml266
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_link_level/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_link_level/tasks/main.yml285
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_ospf/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_ospf/tasks/main.yml231
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_port_security/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_port_security/tasks/main.yml171
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile/tasks/main.yml154
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out/tasks/main.yml129
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out_extepg/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out_extepg/tasks/main.yml156
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extepg_to_contract/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extepg_to_contract/tasks/main.yml145
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extsubnet/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extsubnet/tasks/main.yml210
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_logical_interface_vpc_member/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_logical_interface_vpc_member/tasks/main.yml120
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_static_routes/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_static_routes/tasks/main.yml138
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/error_handling.yml191
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/json_inline.yml166
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/json_string.yml156
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/main.yml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/xml_string.yml167
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/yaml_inline.yml148
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/yaml_string.yml148
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_static_binding_to_epg/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_static_binding_to_epg/tasks/main.yml206
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_leaf_selector/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_leaf_selector/tasks/main.yml142
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_leaf_profile/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_leaf_profile/tasks/main.yml213
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_vpc_protection_group/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_vpc_protection_group/tasks/main.yml213
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_system/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_system/tasks/main.yml63
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_taboo_contract/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_taboo_contract/tasks/main.yml289
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_tenant/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_tenant/tasks/main.yml261
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/tasks/dynamic.yml303
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/tasks/main.yml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/tasks/static.yml303
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool_encap_block/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool_encap_block/tasks/main.yml384
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vmm_credential/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vmm_credential/tasks/main.yml12
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vmm_credential/tasks/vmware.yml250
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vrf/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vrf/tasks/main.yml191
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/sanity/ignore-2.10.txt0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/sanity/ignore-2.9.txt0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/sanity/requirements.txt4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/builtins.py33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/mock.py122
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/unittest.py38
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/loader.py116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/path.py8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/procenv.py90
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/vault_helper.py39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/yaml_helper.py124
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/module_utils/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/module_utils/conftest.py74
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/module_utils/test_aci.py386
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/modules/utils.py52
-rw-r--r--collections-debian-merged/ansible_collections/cisco/aci/tests/unit/requirements.txt10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/.gitignore3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/.yamllint15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/FILES.json1881
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/LICENSE674
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/MANIFEST.json35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/README.md206
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/bindep.txt6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/changelogs/CHANGELOG.rst77
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/changelogs/changelog.yaml73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/changelogs/config.yaml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/56_acl_any4_ay6_feature_update_use_rm_approach.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/69_resolves_acl_failure.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/76_asa_og_state_delete_not_working_as_expected.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/galaxy-version.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_acl_module.rst457
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_acls_module.rst3220
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_cliconf.rst43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_command_module.rst443
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_config_module.rst641
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_facts_module.rst628
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_og_module.rst328
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_ogs_module.rst1369
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/meta/runtime.yml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/action/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/action/asa.py96
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/cliconf/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/cliconf/asa.py145
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/doc_fragments/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/doc_fragments/asa.py102
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/acls/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/acls/acls.py290
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/facts/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/facts/facts.py27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/ogs/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/ogs/ogs.py229
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/asa.py194
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/acls/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/acls/acls.py199
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/ogs/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/ogs/ogs.py459
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/acls/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/acls/acls.py106
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/facts.py67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/legacy/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/legacy/base.py186
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/ogs/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/ogs/ogs.py108
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/providers/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/providers/module.py73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/providers/providers.py129
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/rm_templates/acls.py231
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/rm_templates/ogs.py400
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/utils/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/utils/utils.py330
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_acl.py235
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_acls.py1258
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_command.py197
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_config.py368
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_facts.py209
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_og.py1034
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_ogs.py892
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/terminal/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/plugins/terminal/asa.py76
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/requirements.txt1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/test-requirements.txt5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/.gitignore1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/network-integration.cfg4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/target-prefixes.network1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tasks/cli.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tests/cli/basic.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tests/cli/full_name_match.yaml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tests/cli/insert.yaml43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tasks/cli.yaml21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_parsed.cfg5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_populate_config.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_populate_network_og.yaml21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_remove_config.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_remove_og_config.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/deleted.yaml64
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/empty_config.yaml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/gathered.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/merged.yaml130
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/overridden.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/rendered.yaml112
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/replaced.yaml83
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/rtt.yaml139
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/vars/main.yaml158
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tasks/cli.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/bad_operator.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/contains.yaml19
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/invalid.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/output.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/timeout.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tasks/cli.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tasks/main.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tasks/redirection.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/templates/basic/config.j23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/templates/defaults/config.j24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/backup.yaml50
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/basic.yaml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/defaults.yaml41
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/force.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/more_system.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/removal_error.yaml39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel.yaml40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_block.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_exact.yaml67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_strict.yaml63
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_strict_mul_parents.yaml70
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel.yaml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel_after.yaml42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel_before.yaml42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel_nonidempotent.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/redirection/shortname.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tasks/cli.yaml17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/all_facts.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/default_facts.yaml25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/invalid_subset.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/not_hardware.yaml22
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/tasks/cli.yaml19
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/tests/cli/asa_og.yaml516
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tasks/cli.yaml21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/_parsed.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/_populate_config.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/_remove_config.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/deleted.yaml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/gathered.yaml63
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/merged.yaml73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/overridden.yaml52
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/rendered.yaml58
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/replaced.yaml52
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/rtt.yaml106
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/vars/main.yaml149
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/sanity/ignore-2.10.txt1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/sanity/ignore-2.9.txt5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/sanity/requirements.txt4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/builtins.py34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/mock.py128
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/unittest.py39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/loader.py116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/path.py10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/procenv.py94
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/vault_helper.py42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/yaml_helper.py167
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/conftest.py40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/asa_module.py93
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_acls_config.cfg11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_facts_dir10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_facts_show_memory14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_facts_show_version50
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_og_config.cfg5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_ogs_config.cfg7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_acls.py568
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_facts.py100
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_og.py126
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_ogs.py353
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/utils.py51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tests/unit/requirements.txt42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/asa/tox.ini33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/.gitignore135
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/Development.md26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/FILES.json824
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/LICENSE.txt21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/MANIFEST.json33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/README.md88
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/misc/CL2020 EMEAR DEVWKS-1542 Intersight Ansible Lab Guide.pdfbin0 -> 1030061 bytes
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/misc/README.md3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/claim_device.yml31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/cos_server_policies_and_profiles.yml353
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/deploy_server_profiles.yml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/devnet_inventory23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/example_inventory14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/firmware_direct_download.yml83
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/hcl_status.yml46
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/hyperflex_cluster_profiles.yml166
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/hyperflex_edge_cluster_profiles.yml142
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_boot_order_policy.yml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_imc_access_policy.yml25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_local_user_policy.yml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_ntp_policy.yml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_server_profile.yml72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_virtual_media_policy.yml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/ova_workflow.yml72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/.DS_Storebin0 -> 6148 bytes
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/auto_support/tasks/main.yml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_network/tasks/main.yml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_profile/defaults/main.yml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_profile/tasks/main.yml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_storage/tasks/main.yml31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/deploy/tasks/main.yml43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_network/tasks/main.yml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_profile/defaults/main.yml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_profile/tasks/main.yml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_storage/tasks/main.yml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_software_version/tasks/main.yml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/fc/tasks/main.yml49
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/iscsi/tasks/main.yml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/local_credential/tasks/main.yml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/node_config/tasks/main.yml39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/node_profiles/tasks/main.yml48
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/proxy/tasks/main.yml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/software_version/tasks/main.yml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/sys_config/tasks/main.yml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/vcenter/tasks/main.yml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/server_policies/tasks/main.yml40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/servers/actions/tasks/main.yml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/server_actions.yml23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/server_firmware.yml115
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_all_inventory.yml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_hx_edge_inventory.yml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_hx_inventory.yml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_standalone_inventory.yml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/plugins/README.md31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/plugins/doc_fragments/intersight.py49
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/plugins/module_utils/intersight.py470
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_boot_order_policy.py495
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_imc_access_policy.py200
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_info.py117
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_local_user_policy.py361
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_ntp_policy.py160
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_rest_api.py206
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_server_profile.py281
-rw-r--r--collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_virtual_media_policy.py368
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/.gitignore3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/.yamllint15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/FILES.json7614
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/LICENSE674
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/MANIFEST.json35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/README.md150
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/bindep.txt6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/CHANGELOG.rst162
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/changelog.yaml189
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/config.yaml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/103_fix_l2_interfaces_traceback_error.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/124_resolved_ios_acls_issue.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/132_update_ios_l3_doc_issue.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/135_accept_list_of_dict_for_ospfv2_network.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/137_ios_static_routes_idempotency_issue.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/141_add_int_virt_template_issue.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/144_add_interface_tunnel_issue.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/146_add_cdp_platform_info_to_ios_facts.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/148_add_bgp_global_resource_module.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/148_add_ospv3_resource_module.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/161_static_route_facts_cmd_update.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/165_enable_ospfv3_integration_tests.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/175_fix_ios_vlans_when_name_had_remote.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/192_add_ospf_interfaces_resource_module.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/209_fix_ios_ospf_interfaces_authentication_param.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/211_update_ios_acls_module_to_use_resource_module_approach.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/216_fix_command_rejected_issue.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/223_fix_static_routes_facts_parsing.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/228_ios_ping.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/51-virtual-switch-system-detection.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/63_support_for_very_long_vlan_name.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/65_fixes_ios_interfaces_rm_where_interface_in_description_resulted_in_failure.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/command-dicts.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/galaxy-version.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/ios_config_diff_doc_update.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/upcap_ansible.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/update_resource_module_doc_discrepancy.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_acl_interfaces_module.rst740
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_acls_module.rst4557
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_banner_module.rst326
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_bgp_global_module.rst8801
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_bgp_module.rst1131
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_cliconf.rst43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_command_module.rst404
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_config_module.rst755
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_facts_module.rst626
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_interface_module.rst789
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_interfaces_module.rst700
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l2_interface_module.rst542
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l2_interfaces_module.rst750
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l3_interface_module.rst449
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l3_interfaces_module.rst760
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lacp_interfaces_module.rst615
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lacp_module.rst352
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lag_interfaces_module.rst658
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_linkagg_module.rst467
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lldp_global_module.rst620
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lldp_interfaces_module.rst814
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lldp_module.rst278
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_logging_module.rst541
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ntp_module.rst411
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ospf_interfaces_module.rst2223
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ospfv2_module.rst5254
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ospfv3_module.rst7255
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ping_module.rst463
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_static_route_module.rst640
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_static_routes_module.rst1048
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_system_module.rst389
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_user_module.rst785
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_vlan_module.rst539
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_vlans_module.rst883
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_vrf_module.rst690
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/meta/runtime.yml232
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/action/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/action/ios.py135
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/cliconf/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/cliconf/ios.py464
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/doc_fragments/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/doc_fragments/ios.py81
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acl_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acl_interfaces/acl_interfaces.py83
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acls/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acls/acls.py404
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/bgp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/bgp_global/bgp_global.py910
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/facts/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/facts/facts.py27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/interfaces/interfaces.py64
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l2_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l2_interfaces/l2_interfaces.py80
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l3_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l3_interfaces/l3_interfaces.py75
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp/lacp.py64
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp_interfaces/lacp_interfaces.py66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lag_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lag_interfaces/lag_interfaces.py79
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_global/lldp_global.py74
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_interfaces/lldp_interfaces.py73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospf_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospf_interfaces/ospf_interfaces.py200
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv2/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv2/ospfv2.py547
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv3/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv3/ospfv3.py807
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/static_routes/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/static_routes/static_routes.py100
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/vlans/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/vlans/vlans.py71
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acl_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acl_interfaces/acl_interfaces.py415
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acls/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acls/acls.py301
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/bgp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/bgp_global/bgp_global.py452
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/interfaces/interfaces.py353
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l2_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l2_interfaces/l2_interfaces.py478
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l3_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l3_interfaces/l3_interfaces.py435
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp/lacp.py224
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp_interfaces/lacp_interfaces.py314
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lag_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lag_interfaces/lag_interfaces.py404
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_global/lldp_global.py275
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_interfaces/lldp_interfaces.py328
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospf_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospf_interfaces/ospf_interfaces.py165
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv2/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv2/ospfv2.py225
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv3/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv3/ospfv3.py324
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/static_routes/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/static_routes/static_routes.py713
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/vlans/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/vlans/vlans.py337
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acl_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acl_interfaces/acl_interfaces.py133
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acls/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acls/acls.py127
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/bgp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/bgp_global/bgp_global.py97
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/facts.py130
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/interfaces/interfaces.py110
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l2_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l2_interfaces/l2_interfaces.py138
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l3_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l3_interfaces/l3_interfaces.py148
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp/lacp.py88
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp_interfaces/lacp_interfaces.py112
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lag_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lag_interfaces/lag_interfaces.py128
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/legacy/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/legacy/base.py423
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_global/lldp_global.py100
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_interfaces/lldp_interfaces.py115
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospf_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospf_interfaces/ospf_interfaces.py95
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv2/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv2/ospfv2.py99
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv3/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv3/ospfv3.py180
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/static_routes/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/static_routes/static_routes.py272
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/vlans/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/vlans/vlans.py168
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py205
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/base.py84
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/address_family.py158
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/neighbors.py225
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/process.py168
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/module.py72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/providers.py128
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/acls.py284
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/bgp_global.py1835
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/ospf_interfaces.py895
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/ospfv2.py1947
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/ospfv3.py3132
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/utils/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/utils/utils.py385
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_acl_interfaces.py598
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_acls.py1415
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_banner.py188
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_bgp.py509
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_bgp_global.py2139
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_command.py215
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_config.py593
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_facts.py236
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_interface.py597
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_interfaces.py568
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l2_interface.py581
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l2_interfaces.py560
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l3_interface.py382
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l3_interfaces.py605
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lacp.py273
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lacp_interfaces.py508
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lag_interfaces.py534
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_linkagg.py363
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lldp.py113
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lldp_global.py356
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lldp_interfaces.py666
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_logging.py511
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ntp.py326
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ospf_interfaces.py1101
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ospfv2.py1691
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ospfv3.py1974
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ping.py242
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_static_route.py372
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_static_routes.py692
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_system.py382
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_user.py616
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_vlan.py416
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_vlans.py748
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_vrf.py750
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/terminal/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/plugins/terminal/ios.py116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/requirements.txt2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/test-requirements.txt7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/.gitignore1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/network-integration.cfg4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/target-prefixes.network1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/_parsed.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/_populate_config.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/_remove_config.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/deleted.yaml39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/gathered.yaml23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/merged.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/overridden.yaml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/rendered.yaml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/replaced.yaml48
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/rtt.yaml94
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/vars/main.yaml97
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/_parsed.cfg9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/_populate_config.yaml12
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/_remove_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/deleted.yaml97
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/gathered.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/merged.yaml142
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/overridden.yaml82
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/rendered.yaml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/replaced.yaml81
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/rtt.yaml192
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/vars/main.yaml174
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/basic-login.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/basic-motd.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/basic-no-login.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/multiple-login-exec.yaml42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/net_banner.yml31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/tasks/cli.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/tests/cli/basic.yaml526
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/_parsed.cfg13
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/_populate_config.yaml44
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/_remove_config.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/deleted.yaml40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/gathered.yaml25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/merged.yaml81
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/parsed.yaml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/purged.yaml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/rendered.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/replaced.yaml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/vars/main.yaml117
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/bad_operator.yaml21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/cli_command.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/contains.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/error_regex.yaml69
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/invalid.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/output.yaml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/timeout.yaml19
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/cli.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/cli_config.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/redirection.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/base_running_config9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/config.j24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configblock.j25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configexact1.j26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configexact2.j25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configstrict1.j25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/intended_running_config9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/macro.j28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/setupblock.j25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/setupexact.j27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/setupstrict.j27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/defaults/config.j24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/backup.yaml123
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/defaults.yaml67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/diff.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/macro.yaml64
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/save.yaml49
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/src_basic.yaml64
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/src_invalid.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/src_match_none.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel.yaml43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_block.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_exact.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_strict.yaml58
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml74
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel_after.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel_before.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml41
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_backup.yaml114
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_basic.yaml44
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/redirection/shortname.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/all_facts.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/default_facts.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/invalid_subset.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/not_hardware.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tests/cli/basic.yaml254
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tests/cli/intent.yaml151
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tests/cli/net_interface.yaml46
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/_parsed.cfg11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/_populate_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/_remove_config.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/deleted.yaml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/gathered.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/merged.yaml57
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/overridden.yaml53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/rendered.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/replaced.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/vars/main.yaml251
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tasks/cli.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tasks/main.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tests/cli/agg.yaml106
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tests/cli/sanity.yaml186
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_parsed.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_populate_config.yaml10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_remove_config.yaml12
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_remove_vlan_config.yaml5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/deleted.yaml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/gathered.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/merged.yaml97
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/overridden.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/parsed.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/rendered.yaml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/replaced.yaml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/rtt.yaml65
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/vars/main.yaml213
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/tests/cli/basic.yaml280
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/_parsed.cfg6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/_populate_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/_remove_config.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/deleted.yaml50
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/gathered.yaml23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/merged.yaml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/overridden.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/rendered.yaml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/replaced.yaml63
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/rtt.yaml79
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/vars/main.yaml188
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/_parsed.cfg1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/_populate_config.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/_remove_config.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/deleted.yaml44
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/empty_config.yaml54
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/gathered.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/merged.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/parsed.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/rendered.yaml21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/replaced.yaml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/vars/main.yaml38
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/_parsed.cfg7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/_populate_config.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/_remove_config.yaml10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/deleted.yaml46
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/empty_config.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/gathered.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/merged.yaml56
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/overridden.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/parsed.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/rendered.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/replaced.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/rtt.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/vars/main.yaml148
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_parsed.cfg4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_populate_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_populate_port_channel.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_remove_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/deleted.yaml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/empty_config.yaml67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/gathered.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/merged.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/overridden.yaml54
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/parsed.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/rendered.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/replaced.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/rtt.yaml63
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/vars/main.yaml115
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/tests/cli/basic.yaml175
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/tests/cli/basic.yaml52
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/_parsed.cfg4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/deleted.yaml43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml49
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/gathered.yaml23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/merged.yaml46
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/rendered.yaml22
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/replaced.yaml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/vars/main.yaml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_enable_lldp.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_parsed.cfg17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_populate_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_remove_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/deleted.yaml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/gathered.yaml25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/merged.yaml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/overridden.yaml56
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/rendered.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/replaced.yaml57
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/rtt.yaml65
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/vars/main.yaml147
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tests/cli/basic.yaml151
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tests/cli/net_logging.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml106
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_initial_ipv6_setup.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_parsed.cfg22
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_populate_config.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_remove_config.yaml10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/deleted.yaml70
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/gathered.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/merged.yaml75
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/overridden.yaml65
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/rendered.yaml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/replaced.yaml53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/rtt.yaml99
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/vars/main.yaml207
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_initial_vrf_setup.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_parsed.cfg19
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_populate_config.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_remove_config.yaml10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/deleted.yaml83
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/gathered.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/merged.yaml94
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/overridden.yaml80
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/rendered.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/replaced.yaml80
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/rtt.yaml133
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/vars/main.yaml250
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_initial_vrf_setup.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_parsed.cfg15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_populate_config.yaml42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_remove_config.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/deleted.yaml69
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/empty_config.yaml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/gathered.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/merged.yaml75
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/overridden.yaml58
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/parsed.yaml17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/rendered.yaml53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/replaced.yaml58
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/rtt.yaml116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/vars/main.yaml104
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/tests/cli/ping.yaml58
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tasks/cli.yaml22
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/templates/defaults/config.j24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tests/cli/common_config.yaml213
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tests/cli/common_utils.yaml152
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tests/cli/misc_tests.yaml41
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tests/cli/basic.yaml159
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tests/cli/net_static_route.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/_intial_setup_config.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/_populate_config.yaml10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/_remove_config.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/deleted.yaml82
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/gathered.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/merged.yaml89
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/overridden.yaml73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/rendered.yaml69
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/replaced.yaml76
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/rtt.yaml94
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/vars/main.yaml96
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/net_system.yaml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_domain_list.yaml124
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_domain_name.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_hostname.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_lookup_source.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_name_servers.yaml64
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/files/test_rsa27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/files/test_rsa.pub1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tasks/cli.yaml17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tests/cli/auth.yaml109
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tests/cli/basic.yaml160
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/tests/cli/basic.yaml246
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tasks/cli.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/_parsed.cfg21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/_populate_config.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/_remove_config.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/deleted.yaml46
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/empty_config.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/gathered.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/merged.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/overridden.yaml56
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/parsed.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/rendered.yaml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/replaced.yaml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/rtt.yaml72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/vars/main.yaml442
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/prepare_ios_tests/tasks/main.yml54
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/prepare_ios_tests/templates/config.j24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/ignore-2.10.txt1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/ignore-2.11.txt1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/ignore-2.9.txt11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/requirements.txt4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/builtins.py34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/mock.py128
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/unittest.py39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/loader.py116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/path.py10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/procenv.py94
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/vault_helper.py42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/yaml_helper.py167
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/conftest.py40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/configure_terminal2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_acl_interfaces.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_acls_config.cfg4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_banner_show_banner.txt3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_banner_show_running_config_ios12.txt15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_bgp_config.cfg24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_bgp_global.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_config_config.cfg12
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_config_defaults.cfg13
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_config_src.cfg11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_dir23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_cdp4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_cdp_neighbors_detail40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_interfaces61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_ip_interface0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_ipv6_interface0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_lldp6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_lldp_neighbors_detail50
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_memory_statistics0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_version68
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_virtual_switch21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_l2_interfaces.cfg9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_logging_config.cfg11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_logging_config_ios12.cfg6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ntp_config.cfg7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ospf_interfaces.cfg11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ospfv2.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ospfv3.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_10.255.255.250_repeat_24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_repeat_24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_size_14004
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_size_1400_df-bit5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_static_routes_config.cfg5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_system_config.cfg14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_user_config.cfg2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_vlan_config.cfg9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_vlans_config.cfg34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_vrf_config.cfg81
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/show_version45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/ios_module.py104
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_acl_interfaces.py390
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_acls.py540
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_banner.py88
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_bgp.py390
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_bgp_global.py244
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_command.py143
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_config.py339
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_facts.py168
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_l2_interfaces.py327
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_logging.py161
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ntp.py111
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ospf_interfaces.py405
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ospfv2.py353
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ospfv3.py427
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ping.py90
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_static_routes.py707
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_system.py155
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_user.py170
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_vlan.py161
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_vlans.py385
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_vrf.py420
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/utils.py51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/ios/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/ios/show_version54
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/show_chassis30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/show_running-config549
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/show_version17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_chassis40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_running-config624
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_startup-config624
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_version18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/test_ios.py135
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tests/unit/requirements.txt42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ios/tox.ini32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/.gitignore91
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/.yamllint15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/.zuul.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/FILES.json6060
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/LICENSE674
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/MANIFEST.json35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/README.md154
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/bindep.txt6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/changelogs/CHANGELOG.rst133
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/changelogs/changelog.yaml167
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/changelogs/config.yaml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_acl_interfaces_module.rst774
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_acls_module.rst4731
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_banner_module.rst331
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_bgp_module.rst718
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_cliconf.rst43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_command_module.rst382
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_config_module.rst649
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_facts_module.rst533
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_interface_module.rst748
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_interfaces_module.rst697
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_l2_interfaces_module.rst879
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_l3_interfaces_module.rst803
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lacp_interfaces_module.rst802
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lacp_module.rst500
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lag_interfaces_module.rst1033
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lldp_global_module.rst692
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lldp_interfaces_module.rst849
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_logging_module.rst633
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_netconf.rst76
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_netconf_module.rst296
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ospf_interfaces_module.rst3089
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ospfv2_module.rst7069
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ospfv3_module.rst10348
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_static_routes_module.rst1141
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_system_module.rst427
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_user_module.rst651
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/meta/runtime.yml156
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/action/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/action/iosxr.py162
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/cliconf/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/cliconf/iosxr.py366
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/doc_fragments/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/doc_fragments/iosxr.py73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/filter/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acl_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acl_interfaces/acl_interfaces.py85
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acls/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acls/acls.py538
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/facts/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/facts/facts.py27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/interfaces/interfaces.py64
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l2_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l2_interfaces/l2_interfaces.py85
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l3_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l3_interfaces/l3_interfaces.py72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp/lacp.py69
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp_interfaces/lacp_interfaces.py77
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lag_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lag_interfaces/lag_interfaces.py88
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_global/lldp_global.py73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_interfaces/lldp_interfaces.py77
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospf_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospf_interfaces/ospf_interfaces.py379
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv2/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv2/ospfv2.py795
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv3/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv3/ospfv3.py1376
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/static_routes/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/static_routes/static_routes.py103
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acl_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acl_interfaces/acl_interfaces.py126
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py518
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/interfaces/interfaces.py327
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l2_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l2_interfaces/l2_interfaces.py373
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l3_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l3_interfaces/l3_interfaces.py397
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp/lacp.py213
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp_interfaces/lacp_interfaces.py312
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lag_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lag_interfaces/lag_interfaces.py439
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_global/lldp_global.py221
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_interfaces/lldp_interfaces.py278
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospf_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospf_interfaces/ospf_interfaces.py240
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv2/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv2/ospfv2.py262
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv3/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv3/ospfv3.py255
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/static_routes/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/static_routes/static_routes.py549
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acl_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acl_interfaces/acl_interfaces.py78
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acls/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acls/acls.py457
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/facts.py122
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/interfaces/interfaces.py110
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l2_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l2_interfaces/l2_interfaces.py134
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l3_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l3_interfaces/l3_interfaces.py126
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp/lacp.py89
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp_interfaces/lacp_interfaces.py115
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lag_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lag_interfaces/lag_interfaces.py141
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/legacy/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/legacy/base.py261
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_global/lldp_global.py107
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_interfaces/lldp_interfaces.py109
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospf_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospf_interfaces/ospf_interfaces.py137
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv2/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv2/ospfv2.py157
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv3/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv3/ospfv3.py155
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/static_routes/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/static_routes/static_routes.py191
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/iosxr.py671
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/address_family.py129
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/neighbors.py135
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/process.py126
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/module.py72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/providers.py128
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/acl_interfaces.py61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospf_interfaces.py1370
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospfv2.py2876
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospfv3.py2801
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/utils/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/utils/utils.py391
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_acl_interfaces.py651
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_acls.py1451
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_banner.py316
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_bgp.py355
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_command.py213
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_config.py480
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_facts.py218
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_interface.py1057
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_interfaces.py558
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_l2_interfaces.py687
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_l3_interfaces.py671
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lacp.py392
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lacp_interfaces.py652
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lag_interfaces.py853
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lldp_global.py489
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lldp_interfaces.py724
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_logging.py1220
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_netconf.py221
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_ospf_interfaces.py1210
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_ospfv2.py2544
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_ospfv3.py2783
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_static_routes.py854
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_system.py943
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_user.py973
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/netconf/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/netconf/iosxr.py297
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/terminal/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/plugins/terminal/iosxr.py57
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/requirements.txt3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/test-requirements.txt7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/.gitignore1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/network-integration.cfg4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/target-prefixes.network1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/_populate.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/_remove_config.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/deleted.yaml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/deleted_all.yaml52
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/fixtures/parsed.cfg14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/gathered.yaml63
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/merged.yaml132
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/overridden.yaml78
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/rendered.yaml46
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/replaced.yaml63
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/rtt.yaml114
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/vars/main.yaml172
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/_populate_config.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/_remove_config.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/deleted.yaml100
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/fixtures/parsed.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/gathered.yaml23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/merged.yaml186
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/overridden.yaml79
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/parsed.yaml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/rendered.yaml101
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/replaced.yaml78
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/rtt.yaml96
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/vars/main.yaml317
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tasks/cli.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tasks/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tasks/netconf.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/cli/basic-login.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/cli/basic-motd.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/cli/basic-no-login.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-login.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-motd.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-no-login.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/tasks/cli.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/tests/cli/basic.yaml256
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tasks/cli.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/bad_operator.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/cli_command.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/contains.yaml19
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/invalid.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/output.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/prompt.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/timeout.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/fixtures/config_add_interface.txt35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/fixtures/config_del_interface.txt29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/cli.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/cli_config.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/main.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/redirection.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/change_prefix_set.j27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/config.j24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/configuration.j23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/init_prefix_set.j23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/route_policy.j2121
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/route_policy_change.j265
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/route_policy_clean.j232
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/defaults/config.j24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/backup.yaml124
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/comment-too-long.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/comment.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/commit_label.yaml70
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/misplaced_sublevel.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/prefix_set_remark.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/replace_config.yaml44
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/route_policy.yaml53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/src_basic.yaml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/src_invalid.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/src_match_none.yaml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel.yaml43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_block.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_exact.yaml64
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_strict.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_strict_mul_parents.yaml75
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel_after.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel_before.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel_nonidempotent.yaml44
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli_config/cli_backup.yaml114
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli_config/cli_basic.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/redirection/shortname.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tasks/cli.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/all_facts.yaml21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/default_facts.yaml21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/invalid_subset.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/not_hardware.yaml23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tasks/cli.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tasks/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tasks/netconf.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/cli/basic.yaml296
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/cli/intent.yaml80
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/cli/net_interface.yaml53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/netconf/basic.yaml308
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/netconf/intent.yaml79
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/netconf/net_interface.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/_populate_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/_remove_config.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/deleted.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/fixtures/parsed.cfg19
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/gathered.yaml42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/merged.yaml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/overridden.yaml54
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/rendered.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/replaced.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/vars/main.yaml196
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/_populate_config.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/_remove_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/deleted.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/fixtures/parsed.cfg31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/gathered.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/merged.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/overridden.yaml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/rendered.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/replaced.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/vars/main.yaml147
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/meta/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/_populate_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/_remove_config.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/deleted.yaml50
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/fixtures/parsed.cfg31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/gathered.yaml43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/merged.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/overridden.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/rendered.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/replaced.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/rtt.yaml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/vars/main.yaml133
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/_populate.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/_remove_config.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/deleted.yaml48
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/empty_config.yaml49
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/fixtures/parsed.cfg2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/gathered.yaml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/merged.yaml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/parsed.yaml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/rendered.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/replaced.yaml52
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/rtt.yaml53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/vars/main.yaml44
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/_populate.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/_remove_config.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/deleted.yaml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/fixtures/parsed.cfg14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/gathered.yaml39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/merged.yaml63
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/overridden.yaml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/parsed.yaml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/rendered.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/replaced.yaml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/rtt.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/vars/main.yaml130
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/_populate_config.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/_remove_config.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/deleted.yaml52
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/fixtures/parsed.cfg33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/gathered.yaml49
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/merged.yaml75
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/overridden.yaml68
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/parsed.yaml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/rendered.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/replaced.yaml65
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/rtt.yaml71
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/vars/main.yaml181
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/_populate.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/_remove_config.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/deleted.yaml48
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/empty_config.yaml49
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/fixtures/parsed.cfg11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/gathered.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/merged.yaml54
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/parsed.yaml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/rendered.yaml23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/replaced.yaml55
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/rtt.yaml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/vars/main.yaml63
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/_populate.yaml12
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/_remove_config.yaml22
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/deleted.yaml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/fixtures/parsed.cfg16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/gathered.yaml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/merged.yaml57
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/overridden.yaml56
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/rendered.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/replaced.yaml56
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/rtt.yaml56
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/vars/main.yaml73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tasks/cli.yaml21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tasks/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tasks/netconf.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tests/cli/basic.yaml161
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tests/cli/net_logging.yaml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tests/netconf/basic.yaml227
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/tasks/cli.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/tests/cli/basic.yaml72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/fixtures/parsed.cfg51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/_populate_config.yaml23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/_remove_config.yaml12
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/deleted.yaml86
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/gathered.yaml25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/merged.yaml121
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/overridden.yaml65
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/parsed.yaml19
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/rendered.yaml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/replaced.yaml72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/rtt.yaml79
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/vars/main.yaml138
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/fixtures/parsed.cfg42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/_populate_config.yaml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/_remove_config.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/deleted.yaml84
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/gathered.yaml22
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/merged.yaml132
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/overridden.yaml65
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/parsed.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/rendered.yaml72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/replaced.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/rtt.yaml101
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/vars/main.yaml316
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/fixtures/parsed.cfg36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/_populate_config.yaml39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/_remove_config.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/deleted.yaml84
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/empty_config.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/gathered.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/merged.yaml120
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/overridden.yaml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/parsed.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/rendered.yaml68
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/replaced.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/rtt.yaml91
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/vars/main.yaml260
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tasks/cli.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tasks/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tasks/netconf.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/cli/common_config.yaml100
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/cli/common_utils.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/netconf/common_netconf.yaml53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/netconf/misc_tests.yaml40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/fixtures/parsed.cfg18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tasks/cli.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tasks/main.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/_populate_config.yaml69
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/_remove_config.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/deleted.yaml79
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/empty_config.yaml49
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/gathered.yaml23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/merged.yaml167
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/overridden.yaml79
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/parsed.yaml17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/rendered.yaml91
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/replaced.yaml69
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/rtt.yaml89
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/vars/main.yaml264
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tasks/cli.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tasks/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tasks/netconf.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/net_system.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_domain_list.yaml123
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_domain_name.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_hostname.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_lookup_source.yaml40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_name_servers.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_domain_list.yaml179
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_domain_name.yaml78
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_hostname.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_lookup_source.yaml162
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_name_servers.yaml138
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/files/private30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/files/public.pub1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/files/public2.pub1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tasks/cli.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tasks/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tasks/netconf.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tests/cli/basic.yaml182
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tests/common/auth.yaml121
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tests/netconf/basic.yaml193
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/prepare_iosxr_tests/tasks/main.yml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/prepare_iosxr_tests/templates/config.j24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/sanity/ignore-2.10.txt1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/sanity/ignore-2.9.txt3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/sanity/requirements.txt4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/builtins.py34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/mock.py126
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/unittest.py39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/loader.py116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/path.py10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/procenv.py94
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/vault_helper.py42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/yaml_helper.py167
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/conftest.py40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/dir_7all6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_acls_config.cfg5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_config_config.cfg12
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_config_src.cfg11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_ospf_interfaces.cfg9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_ospfv2.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_ospfv3.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_static_routes_config.cfg18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_system_config.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_user_config.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_interfaces41
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_ipv6_interface5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_lldp1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_lldp_neighbors_detail1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_memory_summary5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_running-config43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_version84
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_version___utility_head_-n_2018
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_version_brief18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/iosxr_module.py105
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_acls.py361
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_command.py128
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_config.py308
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_facts.py117
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_netconf.py114
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_ospf_interfaces.py358
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_ospfv2.py275
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_ospfv3.py275
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_static_routes.py338
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_system.py123
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_user.py129
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/utils.py51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/requirements.txt42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/iosxr/tox.ini32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/CHANGELOG.md101
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/FILES.json1594
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/MANIFEST.json36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/README.md180
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/changelogs/.plugin-cache.yaml185
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/changelogs/CHANGELOG.rst116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/changelogs/changelog.yaml138
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/changelogs/config.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/doc_fragments/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/doc_fragments/meraki.py84
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/meraki.py517
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_admin.py504
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_alert.py337
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_config_template.py331
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_content_filtering.py282
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_device.py432
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_firewalled_services.py233
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_intrusion_prevention.py366
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_malware.py264
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_management_interface.py384
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_l3_firewall.py288
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_rf_profile.py663
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_settings.py222
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_ssid.py614
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_access_list.py319
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_l3_interface.py373
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_link_aggregation.py258
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_ospf.py322
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_stack.py277
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_storm_control.py201
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_switchport.py424
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_content_filtering.py282
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_intrusion_prevention.py366
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_l2_interface.py273
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_l3_firewall.py365
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_l7_firewall.py479
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_malware.py264
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_nat.py679
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_site_to_site_firewall.py330
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_site_to_site_vpn.py250
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_static_route.py392
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_uplink.py325
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_uplink_bandwidth.py325
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_vlan.py583
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_nat.py679
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_network.py412
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_organization.py242
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_site_to_site_vpn.py250
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_snmp.py387
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ssid.py614
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_static_route.py392
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switch_access_list.py319
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switch_stack.py277
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switch_storm_control.py201
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switchport.py424
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_syslog.py260
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_vlan.py583
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_webhook.py347
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/inventory.networking42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/inventory.networking.template37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/target-prefixes.network1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_admin/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_admin/tasks/main.yml404
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_alert/aliases0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_alert/tasks/main.yml174
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_config_template/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_config_template/tasks/main.yml196
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_content_filtering/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_content_filtering/tasks/main.yml254
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_device/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_device/tasks/main.yml246
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_firewalled_services/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_firewalled_services/tasks/main.yml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_firewalled_services/tasks/tests.yml212
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_intrusion_prevention/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_intrusion_prevention/tasks/main.yml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_intrusion_prevention/tasks/tests.yml312
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_malware/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_malware/tasks/main.yml253
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_management_interface/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_management_interface/tasks/main.yml273
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_l3_firewall/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_l3_firewall/tasks/main.yml171
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_rf_profile/aliases0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_rf_profile/tasks/main.yml271
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_settings/aliases0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_settings/tasks/main.yml102
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_l3_interface/tasks/main.yml236
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/meraki_network/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/meraki_network/tasks/main.yml473
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/tasks/main.yml124
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_ospf/tasks/main.yml136
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l2_interface/tasks/main.yml155
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l3_firewall/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l3_firewall/tasks/main.yml351
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l7_firewall/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l7_firewall/tasks/main.yml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l7_firewall/tasks/tests.yml494
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_site_to_site_firewall/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_site_to_site_firewall/tasks/main.yml306
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_uplink/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_uplink/tasks/main.yml125
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_nat/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_nat/tasks/main.yml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_nat/tasks/tests.yml363
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_network/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_network/tasks/main.yml453
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_organization/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_organization/tasks/main.yml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_organization/tasks/tests.yml149
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_site_to_site_vpn/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_site_to_site_vpn/tasks/main.yml140
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_snmp/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_snmp/tasks/main.yml290
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ssid/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ssid/tasks/main.yml551
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_static_route/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_static_route/tasks/main.yml187
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_access_list/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_access_list/tasks/main.yml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_access_list/tasks/tests.yml123
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_stack/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_stack/tasks/main.yml198
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_storm_control/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_storm_control/tasks/main.yml107
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switchport/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switchport/tasks/main.yml354
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_syslog/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_syslog/tasks/main.yml153
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_vlan/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_vlan/tasks/main.yml471
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_webhook/aliases1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_webhook/tasks/main.yml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_webhook/tasks/tests.yml274
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/sanity/ignore-2.10.txt2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/sanity/ignore-2.11.txt2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/meraki/tests/sanity/ignore-2.9.txt2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/.github/workflows/ansible-test.yml216
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/.github/workflows/galaxy-importer.cfg9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/.gitignore393
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/.python-version1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/.vscode/launch.json15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/.vscode/settings.json3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/CHANGELOG.rst263
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/FILES.json1818
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/LICENSE678
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/MANIFEST.json41
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/README.md93
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/changelogs/.gitignore1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/changelogs/.plugin-cache.yaml266
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/changelogs/changelog.yaml224
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/changelogs/config.yaml31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/codecov.yml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/meta/runtime.yml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/doc_fragments/modules.py85
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/module_utils/mso.py949
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_backup.py311
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_option_policy.py167
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_option_policy_option.py193
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_relay_policy.py166
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_relay_policy_provider.py254
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_label.py165
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_rest.py215
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_role.py277
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema.py133
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site.py200
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp.py214
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg.py230
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_domain.py474
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_selector.py398
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_staticleaf.py264
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_staticport.py448
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_subnet.py293
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_bd.py242
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_bd_l3out.py224
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_bd_subnet.py301
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_external_epg_selector.py295
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf.py213
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region.py239
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region_cidr.py317
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region_cidr_subnet.py302
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region_hub_network.py251
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template.py244
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp.py207
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg.py403
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg_contract.py266
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg_selector.py281
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg_subnet.py266
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_bd.py444
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_bd_subnet.py253
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_contract_filter.py352
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_deploy.py143
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg.py332
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg_contract.py250
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg_selector.py249
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg_subnet.py220
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_externalepg.py332
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_filter_entry.py363
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_l3out.py231
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_migrate.py246
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_vrf.py214
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_vrf_contract.py264
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_site.py252
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_tenant.py197
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_tenant_site.py391
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_user.py277
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_version.py71
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/.gitignore1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/inventory.networking20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/network-integration.requirements.txt1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/target-prefixes.network1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_backup/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_backup/tasks/main.yml466
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy/tasks/main.yaml227
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy_option/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy_option/tasks/main.yaml393
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy/tasks/main.yaml226
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy_provider/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy_provider/tasks/main.yaml604
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_label/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_label/tasks/main.yml339
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/error_handling.yml145
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/json_inline.yml269
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/json_string.yml213
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/json_template.yml67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/main.yml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/tenant.json.j210
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/yaml_inline.yml209
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/yaml_string.yml209
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/tasks/main.yml43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/tasks/role-ro.yml88
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/tasks/role-rw.yml275
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema/tasks/main.yml117
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site/tasks/main.yml253
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_domain/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_domain/tasks/main.yml989
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_selector/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_selector/tasks/main.yml1089
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_staticport/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_staticport/tasks/main.yml859
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd/tasks/main.yml704
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd_subnet/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd_subnet/tasks/main.yml592
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_external_epg_selector/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_external_epg_selector/tasks/main.yml523
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region/tasks/main.yml433
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr/tasks/main.yml710
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr_subnet/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr_subnet/tasks/main.yml676
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_hub_network/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_hub_network/tasks/hub_network.yml708
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_hub_network/tasks/main.yml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template/tasks/main.yml280
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp/tasks/main.yml265
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg/tasks/main.yml1192
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_contract/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_contract/tasks/main.yml651
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_selector/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_selector/tasks/main.yml789
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd/tasks/main.yml1171
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd_subnet/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd_subnet/tasks/main.yml507
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_contract_filter/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_contract_filter/tasks/main.yml1043
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_deploy/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_deploy/tasks/main.yml199
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg/tasks/main.yml1110
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_contract/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_contract/tasks/main.yml627
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_selector/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_selector/tasks/main.yml454
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_migrate/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_migrate/tasks/main.yml334
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf/tasks/main.yml518
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf_contract/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf_contract/tasks/main.yml859
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_site/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_site/tasks/main.yml449
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant/tasks/main.yml541
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant_site/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant_site/tasks/main.yml661
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_user/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_user/tasks/main.yml522
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_version/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_version/tasks/main.yml77
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/sanity/ignore-2.10.txt2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/sanity/ignore-2.9.txt0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/mso/tests/sanity/requirements.txt5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/.github/workflows/ansible-test.yml112
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/.gitignore393
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/CHANGELOG.rst50
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/FILES.json523
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/LICENSE678
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/MANIFEST.json34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/README.md83
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/changelogs/.plugin-cache.yaml40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/changelogs/changelog.yaml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/changelogs/config.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/changelogs/fragments/1.0.1.yml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/changelogs/fragments/1.0.2.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/changelogs/fragments/1.0.3.yml5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/meta/runtime.yml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/plugins/doc_fragments/nso.py49
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/plugins/module_utils/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/plugins/module_utils/nso.py833
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_action.py211
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_config.py338
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_query.py129
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_show.py145
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_verify.py201
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/builtins.py33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/mock.py122
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/unittest.py38
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/loader.py116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/path.py8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/procenv.py90
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/vault_helper.py39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/yaml_helper.py124
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/module_utils/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/module_utils/test_nso.py660
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/complex_schema.json212
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/config_config.json20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/config_config_changes.json46
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/config_empty_data.json1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/description_schema.json28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/device_schema.json1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/devices_schema.json1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/l3vpn_l3vpn_endpoint_schema.json1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/l3vpn_l3vpn_schema.json1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/l3vpn_schema.json1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/sync_from_schema.json178
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/verify_violation_data.json10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/nso_module.py132
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_action.py167
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_config.py138
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_query.py57
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_show.py98
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_verify.py110
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/utils.py50
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nso/tests/unit/requirements.txt1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/.gitignore108
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/.pre-commit-config.yaml21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/FILES.json15244
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/LICENSE674
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/MANIFEST.json36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/README.md220
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/bindep.txt6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/changelogs/CHANGELOG.rst269
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/changelogs/changelog.yaml449
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/changelogs/config.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_aaa_server_host_module.rst576
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_aaa_server_module.rst481
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acl_interface_module.rst438
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acl_interfaces_module.rst609
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acl_module.rst835
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acls_module.rst2789
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_banner_module.rst404
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bfd_global_module.rst559
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bfd_interfaces_module.rst393
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_af_module.rst899
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_global_module.rst5376
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_module.rst1073
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_neighbor_af_module.rst971
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_neighbor_module.rst794
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_cliconf.rst43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_command_module.rst490
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_config_module.rst799
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_devicealias_module.rst273
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_evpn_global_module.rst355
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_evpn_vni_module.rst445
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_facts_module.rst766
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_feature_module.rst382
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_file_copy_module.rst691
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_gir_module.rst535
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_gir_profile_management_module.rst468
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_hsrp_interfaces_module.rst343
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_hsrp_module.rst539
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_httpapi.rst43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_igmp_interface_module.rst693
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_igmp_module.rst424
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_igmp_snooping_module.rst458
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_install_os_module.rst416
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_interface_module.rst1042
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_interface_ospf_module.rst622
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_interfaces_module.rst576
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l2_interface_module.rst639
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l2_interfaces_module.rst537
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l3_interface_module.rst515
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l3_interfaces_module.rst620
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lacp_interfaces_module.rst575
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lacp_module.rst399
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lag_interfaces_module.rst482
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_linkagg_module.rst637
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_global_module.rst660
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_interfaces_module.rst406
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_module.rst372
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_logging_module.rst680
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ntp_auth_module.rst446
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ntp_module.rst536
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ntp_options_module.rst414
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_nxapi_module.rst533
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospf_interfaces_module.rst1986
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospf_module.rst381
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospf_vrf_module.rst601
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospfv2_module.rst5400
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospfv3_module.rst4452
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_overlay_global_module.rst353
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_pim_interface_module.rst612
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_pim_module.rst380
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_pim_rp_address_module.rst436
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ping_module.rst503
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_reboot_module.rst356
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_rollback_module.rst392
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_rpm_module.rst459
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_smu_module.rst380
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snapshot_module.rst596
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_community_module.rst423
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_contact_module.rst374
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_host_module.rst510
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_location_module.rst378
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_traps_module.rst411
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_user_module.rst457
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_static_route_module.rst630
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_static_routes_module.rst722
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_system_module.rst468
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_telemetry_module.rst753
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_udld_interface_module.rst483
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_udld_module.rst489
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_user_module.rst592
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vlan_module.rst804
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vlans_module.rst581
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vpc_interface_module.rst409
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vpc_module.rst585
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrf_af_module.rst538
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrf_interface_module.rst399
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrf_module.rst727
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrrp_module.rst510
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vsan_module.rst225
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vtp_domain_module.rst428
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vtp_password_module.rst454
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vtp_version_module.rst430
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vxlan_vtep_module.rst546
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vxlan_vtep_vni_module.rst519
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_zone_zoneset_module.rst537
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/meta/runtime.yml658
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/action/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/action/nxos.py264
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/action/nxos_file_copy.py632
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/cliconf/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/cliconf/nxos.py391
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/doc_fragments/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/doc_fragments/nxos.py119
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/filter/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/httpapi/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/httpapi/nxos.py271
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/inventory/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acl_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acl_interfaces/acl_interfaces.py85
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acls/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acls/acls.py361
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bfd_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bfd_interfaces/bfd_interfaces.py64
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bgp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bgp_global/bgp_global.py516
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/facts/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/facts/facts.py26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/hsrp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/hsrp_interfaces/hsrp_interfaces.py63
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/interfaces/interfaces.py69
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l2_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l2_interfaces/l2_interfaces.py76
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l3_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l3_interfaces/l3_interfaces.py85
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp/lacp.py74
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp_interfaces/lacp_interfaces.py79
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lag_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lag_interfaces/lag_interfaces.py73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_global/lldp_global.py91
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_interfaces/lldp_interfaces.py70
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospf_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospf_interfaces/ospf_interfaces.py130
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv2/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv2/ospfv2.py697
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv3/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv3/ospfv3.py551
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/static_routes/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/static_routes/static_routes.py94
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/telemetry/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/telemetry/telemetry.py118
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/vlans/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/vlans/vlans.py67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/cmdref/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/cmdref/telemetry/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/cmdref/telemetry/telemetry.py146
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acl_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acl_interfaces/acl_interfaces.py350
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acls/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acls/acls.py765
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bfd_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bfd_interfaces/bfd_interfaces.py323
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bgp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bgp_global/bgp_global.py412
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/hsrp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/hsrp_interfaces/hsrp_interfaces.py302
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/interfaces/interfaces.py495
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l2_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l2_interfaces/l2_interfaces.py355
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l3_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l3_interfaces/l3_interfaces.py568
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp/lacp.py234
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp_interfaces/lacp_interfaces.py336
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lag_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py335
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_global/lldp_global.py285
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_interfaces/lldp_interfaces.py325
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospf_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospf_interfaces/ospf_interfaces.py206
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv2/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv2/ospfv2.py238
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv3/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv3/ospfv3.py253
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/static_routes/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/static_routes/static_routes.py616
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/telemetry/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/telemetry/telemetry.py665
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/vlans/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/vlans/vlans.py338
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acl_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acl_interfaces/acl_interfaces.py135
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acls/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acls/acls.py283
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bfd_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bfd_interfaces/bfd_interfaces.py114
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bgp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bgp_global/bgp_global.py135
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/facts.py145
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/hsrp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/hsrp_interfaces/hsrp_interfaces.py100
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/interfaces/interfaces.py119
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l2_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l2_interfaces/l2_interfaces.py109
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l3_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l3_interfaces/l3_interfaces.py144
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp/lacp.py93
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp_interfaces/lacp_interfaces.py119
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lag_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lag_interfaces/lag_interfaces.py112
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/legacy/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/legacy/base.py822
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_global/lldp_global.py113
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_interfaces/lldp_interfaces.py129
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospf_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospf_interfaces/ospf_interfaces.py82
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv2/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv2/ospfv2.py97
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv3/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv3/ospfv3.py93
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/static_routes/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/static_routes/static_routes.py245
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/telemetry/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/telemetry/telemetry.py210
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/vlans/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/vlans/vlans.py192
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/nxos.py1501
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/bgp_global.py1455
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/ospf_interfaces.py505
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/ospfv2.py1105
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/ospfv3.py951
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/telemetry/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/telemetry/telemetry.py276
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/utils.py145
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_aaa_server.py364
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_aaa_server_host.py383
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acl.py698
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acl_interface.py227
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acl_interfaces.py437
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acls.py819
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_banner.py229
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bfd_global.py336
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bfd_interfaces.py299
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp.py786
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_af.py935
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_global.py1657
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_neighbor.py588
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_neighbor_af.py815
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_command.py235
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_config.py598
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_devicealias.py593
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_evpn_global.py109
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_evpn_vni.py310
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_facts.py248
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_feature.py285
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_file_copy.py201
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_gir.py371
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_gir_profile_management.py218
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_hsrp.py537
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_hsrp_interfaces.py261
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_igmp.py168
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_igmp_interface.py687
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_igmp_snooping.py321
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_install_os.py607
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_interface.py991
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_interface_ospf.py614
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_interfaces.py403
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l2_interface.py702
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l2_interfaces.py404
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l3_interface.py290
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l3_interfaces.py404
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lacp.py275
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lacp_interfaces.py378
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lag_interfaces.py365
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_linkagg.py559
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lldp.py129
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lldp_global.py342
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lldp_interfaces.py260
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_logging.py979
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ntp.py459
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ntp_auth.py347
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ntp_options.py173
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_nxapi.py442
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospf.py171
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospf_interfaces.py1445
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospf_vrf.py495
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospfv2.py1981
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospfv3.py1699
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_overlay_global.py204
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_pim.py220
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_pim_interface.py621
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_pim_rp_address.py256
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ping.py237
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_reboot.py94
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_rollback.py134
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_rpm.py421
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_smu.py163
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snapshot.py425
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_community.py253
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_contact.py151
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_host.py521
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_location.py156
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_traps.py331
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_user.py413
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_static_route.py383
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_static_routes.py476
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_system.py402
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_telemetry.py337
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_udld.py266
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_udld_interface.py315
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_user.py483
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vlan.py849
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vlans.py438
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vpc.py482
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vpc_interface.py353
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrf.py643
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrf_af.py283
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrf_interface.py278
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrrp.py442
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vsan.py385
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vtp_domain.py220
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vtp_password.py287
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vtp_version.py217
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vxlan_vtep.py488
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vxlan_vtep_vni.py482
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_zone_zoneset.py990
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/nxos_devicealias.py593
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/nxos_vsan.py385
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/nxos_zone_zoneset.py990
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/terminal/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/plugins/terminal/nxos.py142
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/requirements.txt2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/test-requirements.txt7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/.gitignore1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/network-integration.requirements.txt6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/target-prefixes.network1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tests/common/radius.yaml98
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tests/common/tacacs.yaml108
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml199
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml202
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tests/common/sanity.yaml230
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tests/common/sanity.yaml122
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/templates/populate_config.cfg11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/deleted.yml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/empty_config.yml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/gathered.yml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/merged.yml72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/overridden.yml77
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/parsed.yml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/populate_acl.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/populate_config.yaml4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/remove_config.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/rendered.yml57
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/replaced.yml70
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/rtt.yml116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/vars/main.yml21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tasks/cli.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tasks/main.yaml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tasks/nxapi.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/deleted.yml56
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/gathered.yml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/merged.yml118
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/overridden.yml107
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/parsed.yml39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/populate_config.yaml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/remove_config.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/rendered.yml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/replaced.yml71
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/rtt.yml95
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tasks/main.yaml12
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tests/common/sanity.yaml78
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tests/common/sanity.yaml167
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tasks/cli.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/_populate_config.yaml14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/_remove_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/deleted.yaml75
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/empty_config.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/gathered.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/merged.yaml73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/overridden.yaml79
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/parsed.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/rendered.yaml41
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/replaced.yaml70
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/vars/main.yml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/defaults/main.yaml5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/dis_policy.yaml80
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/hels.yaml96
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/isolate.yaml76
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/param.yaml258
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/sanity.yaml133
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/supp_fib.yaml112
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/defaults/main.yaml5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tests/common/multisite.yaml131
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tests/common/sanity.yaml336
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/meta/main.yml0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tasks/main.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/_populate_config.yaml63
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/_remove_config.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/deleted.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/deleted_af.yaml115
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/empty_config.yaml50
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/fixtures/parsed.cfg36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/gathered.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/merged.yaml95
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/parsed.yaml14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/purged.yaml42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/rendered.yaml80
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/replaced.yaml81
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/replaced_af.yaml158
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/vars/main.yml168
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/defaults/main.yaml5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tests/common/multisite.yaml119
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tests/common/sanity.yaml350
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tests/common/multisite.yaml116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tests/common/sanity.yaml295
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/cli/cli_command.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/cli/contains.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/cli/sanity.yaml67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/bad_operator.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/equal.yaml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/greaterthan.yaml31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/greaterthanorequal.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/invalid.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/lessthan.yaml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/lessthanorequal.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/not_comparison_operator.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/notequal.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/output.yaml25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/timeout.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/nxapi/contains.yaml22
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/nxapi/sanity.yaml67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/cli_config.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/main.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/redirection.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/base_running_config10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/config.j24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configblock.j25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configexact1.j25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configexact2.j26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configstrict1.j26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/intended_running_config10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/setupexact.j27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/setupstrict.j27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/config.js4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/defaults/config.j24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/defaults/test.j24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/diff.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/multilevel.yaml52
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/sublevel.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/sublevel_exact.yaml58
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/sublevel_strict.yaml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/toplevel_after.yaml40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/toplevel_before.yaml40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_backup.yaml114
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_basic.yaml44
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_block_replace.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_exact_match.yaml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_strict_match.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/backup.yaml125
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/defaults.yaml49
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/sanity.yaml71
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/save.yaml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/src_basic.yaml36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/src_invalid.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/src_match_none.yaml48
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/sublevel_block.yaml50
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/toplevel.yaml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/toplevel_nonidempotent.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/multilevel.yaml41
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/sublevel.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/sublevel_exact.yaml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/sublevel_strict.yaml58
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/toplevel_after.yaml40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/toplevel_before.yaml40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/redirection/cli/shortname.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/tasks/main.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/tests/common/sanity.yaml57
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tests/common/sanity.yaml70
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tests/common/sanity.yaml112
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/all_facts.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/default_facts.yaml22
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/invalid_subset.yaml17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/not_hardware.yaml19
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/sanity.yaml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tests/common/configure.yaml96
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tests/common/invalid.yaml14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/fixtures/data.cfg1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tasks/cli.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tasks/main.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tasks/nxapi.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/cli/input_validation.yaml86
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/cli/negative.yaml130
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/cli/sanity.yaml202
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/nxapi/badtransport.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tests/common/sanity.yaml110
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tests/common/sanity.yaml105
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tests/common/sanity.yaml153
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tasks/cli.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/_populate_config.yaml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/_remove_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/deleted.yaml57
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/empty_config.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/gathered.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/merged.yaml65
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/overridden.yaml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/parsed.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/rendered.yaml39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/replaced.yaml58
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/vars/main.yml17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tests/common/sanity.yaml68
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tests/common/sanity.yaml185
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tests/common/sanity.yaml120
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/httpapi.yaml17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/main.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/network_cli.yaml17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/delete_files.yaml10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/install_os.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/install_system.yaml53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/main_os_install.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade.yaml48
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_greensboro.yaml25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u61a.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u62a.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u63a.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n35_62a88.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n35_greensboro.yaml25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n5k_730_N11.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n5k_733_N11.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n7k_atherton.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n7k_helsinki.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro_force.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_hamilton.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/intent.yaml69
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/sanity.yaml135
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/set_state_absent.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/set_state_present.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/sub_int.yaml75
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tests/common/sanity.yaml295
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tasks/main.yaml13
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/_populate_config.yaml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/_remove_config.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/deleted.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/empty_config.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/gathered.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/merged.yaml89
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/overridden.yaml71
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/parsed.yaml31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/rendered.yaml46
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/replaced.yaml100
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/rtt.yaml77
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/vars/main.yml31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tests/common/agg.yaml122
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tests/common/sanity.yaml156
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tasks/main.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/_populate_config.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/_remove_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/deleted.yaml69
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/empty_config.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/gathered.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/merged.yaml103
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/overridden.yaml79
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/parsed.yaml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/rendered.yaml52
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/replaced.yaml83
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/rtt.yaml74
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/vars/main.yml40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tests/cli/sanity.yaml125
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tests/nxapi/sanity.yaml121
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/_populate_config.yaml17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/_remove_config.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/deleted.yaml70
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/empty_config.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/gathered.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/merged.yaml73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/multisite.yaml379
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/overridden.yaml91
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/parsed.yaml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/rendered.yaml50
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/replaced.yaml119
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/rtt.yaml89
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/vars/main.yml65
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tasks/main.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/_populate_config.yaml5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/_remove_config.yaml5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/deleted.yaml72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/empty_config.yaml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/gathered.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/merged.yaml67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/parsed.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/rendered.yaml37
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/replaced.yaml101
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/vars/main.yml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tasks/main.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tasks/nxapi.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/_populate_config.yaml13
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/_remove_config.yaml10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/deleted.yaml76
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/empty_config.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/gathered.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/merged.yaml84
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/overridden.yaml90
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/parsed.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/rendered.yaml43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/replaced.yaml78
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/vars/main.yml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tasks/main.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tasks/nxapi.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/_populate_config.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/_remove_config.yaml10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/deleted.yaml67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/empty_config.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/gathered.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/merged.yaml108
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/overridden.yaml85
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/parsed.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/rendered.yaml43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/replaced.yaml86
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/vars/main.yml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tests/common/sanity.yaml201
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tests/cli/sanity.yaml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tests/nxapi/sanity.yaml47
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tasks/nxapi.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/_populate_config.yml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/_remove_config.yml5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/deleted.yml84
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/gathered.yml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/merged.yml72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/parsed.yml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/rendered.yml38
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/replaced.yml93
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/vars/main.yml22
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tasks/cli.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tasks/main.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tasks/nxapi.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/deleted.yml76
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/gathered.yml53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/merged.yml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/overridden.yml69
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/parsed.yml42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/remove_config.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/rendered.yml44
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/replaced.yml64
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/rtt.yml75
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/vars/main.yml12
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tasks/main.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tests/common/basic.yaml519
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tests/common/net_logging.yaml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tests/common/purge.yaml112
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tests/common/sanity.yaml114
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tests/common/sanity.yaml133
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tests/common/sanity.yaml101
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/nxapi.yaml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_http.yaml17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https.yaml17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http.yaml23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http_ports.yaml23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_http.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http_ports.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_http.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https.yaml7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http_ports.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/configure.yaml142
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/disable.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/enable.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/nxapi_ssl.yaml248
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/nxapi/badtransport.yaml17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tests/common/sanity.yaml52
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/meta/main.yml0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tasks/main.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/_populate_config.yaml20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/_remove_config.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/_setup.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/deleted.yaml101
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/empty_config.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/fixtures/parsed.cfg16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/gathered.yaml25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/merged.yaml89
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/overridden.yaml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/parsed.yaml14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/rendered.yaml58
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/replaced.yaml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/vars/main.yml153
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tests/common/sanity.yaml139
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/meta/main.yml0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tasks/main.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/_populate_config.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/_remove_config.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/deleted.yaml93
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/fixtures/parsed.cfg21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/gathered.yaml21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/merged.yaml92
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/overridden.yaml57
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/parsed.yaml14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/rendered.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/replaced.yaml83
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/vars/main.yml158
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/meta/main.yml0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tasks/main.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/_populate_config.yaml23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/_remove_config.yaml9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/deleted.yaml93
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/empty_config.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/fixtures/parsed.cfg18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/gathered.yaml21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/merged.yaml85
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/overridden.yaml57
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/parsed.yaml14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/rendered.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/replaced.yaml79
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/vars/main.yml142
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/platform/n7k/cleanup.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/platform/n7k/setup.yaml39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tests/common/sanity.yaml97
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tests/common/sanity.yaml85
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tests/common/sanity.yaml197
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tests/common/configure.yaml220
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tasks/main.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tasks/nxapi.yaml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tests/common/sanity.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tests/common/sanity.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tests/common/sanity.yaml155
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/defaults/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tasks/cli.yaml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tasks/main.yaml14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tasks/nxapi.yaml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/cli/misc_tests.yaml10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/common/common_config.yaml160
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/common/common_utils.yaml102
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/common/misc_tests.yaml30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tests/common/sanity.yaml129
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tests/common/sanity.yaml163
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tests/common/sanity.yaml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v1_trap.yaml125
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v2_inform.yaml125
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_inform.yaml131
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_trap.yaml130
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tests/common/sanity.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tests/common/sanity.yaml77
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tests/common/sanity.yaml109
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/defaults/main.yaml5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tests/common/sanity.yaml211
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tasks/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/_populate_config.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/_remove_config.yaml15
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/deleted.yml81
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/gathered.yml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/merged.yml61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/overridden.yml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/parsed.yml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/rendered.yml49
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/replaced.yml52
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/rtt.yml80
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/vars/main.yml53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/net_system.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/set_domain_list.yaml112
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/set_domain_name.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/set_name_servers.yaml73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/common/sanity.yaml131
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/common/set_hostname.yaml35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/net_system.yaml34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/set_domain_list.yaml118
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/set_domain_name.yaml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/set_name_servers.yaml80
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tasks/cli.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tasks/main.yaml16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tasks/nxapi.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/templates/populate_config.cfg38
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tests/common/deleted.yaml160
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tests/common/merged.yaml309
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tests/common/replaced.yaml166
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tests/common/sanity.yaml95
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tests/common/sanity.yaml113
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/meta/main.yaml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/auth.yaml39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/basic.yaml143
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/net_user.yaml27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/sanity.yaml99
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tests/common/agg.yaml123
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tests/common/interface.yaml125
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tests/common/sanity.yaml226
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/fixtures/parsed.cfg67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/_populate_config.yaml13
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/_remove_config.yaml6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/deleted.yaml53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/empty_config.yaml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/gathered.yaml26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/merged.yaml60
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/overridden.yaml71
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/parsed.yaml19
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/rendered.yaml44
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/replaced.yaml64
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/rtt.yaml65
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/vars/main.yml57
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tests/common/sanity.yaml181
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tests/common/sanity.yaml140
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tests/common/intent.yaml196
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tests/common/sanity.yaml112
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tests/common/sanity.yaml146
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tests/common/sanity.yaml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tests/common/sanity.yaml133
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/tasks/main.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/tests/common/sanity.yaml65
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/vars/main.yml5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tests/common/sanity.yaml46
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tests/common/sanity.yaml66
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tests/common/sanity.yaml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/main.yaml8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tests/common/multisite.yaml112
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml225
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/meta/main.yml3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tasks/main.yaml11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tasks/nxapi.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tests/common/multisite.yaml108
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml253
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/defaults/main.yaml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/tasks/cli.yaml28
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/tasks/main.yaml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/tests/common/sanity.yaml222
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/vars/main.yml5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/prepare_nxos_tests/tasks/main.yml149
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/sanity/ignore-2.10.txt1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/sanity/ignore-2.9.txt31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/sanity/requirements.txt4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/builtins.py34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/mock.py127
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/unittest.py39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/loader.py116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/path.py10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/procenv.py94
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/vault_helper.py42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/yaml_helper.py167
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/conftest.py40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/_nxos_ip_interface.cfg30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/mds/show_inventory53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/mds/show_version40
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/nxos/show_inventory8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/nxos/show_version38
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl/show_ip_access-list.txt227
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interface/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interface/show_running-config_aclmgr.txt4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interfaces/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interfaces/nxos_acl_interfaces.cfg2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/N7K.cfg16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/N9K.cfg13
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bgp/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bgp/config.cfg26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bgp/config_32_bits_as.cfg6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_command/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_command/show_version.txt68
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_config/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_config/candidate.cfg7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_config/config.cfg26
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdadatabse.cfg5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatus.cfg4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatus_mansi.cfg4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatuslock.cfg6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/configured.cfg3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/unconfigured.cfg1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_vni_config.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_feature/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_feature/show_feature.txt4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface129
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface_Ethernet2_196
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface_loopback00
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_run_interface_Ethernet2_18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_run_interface_loopback00
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface_ospf/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface_ospf/config.cfg17
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_ipv4_ipv65
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_multiple_ipv67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n3k/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n3k/show_run_all2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n7k/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n7k/show_run_all5
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_overlay_global_config.cfg1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim/config.cfg2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/config.cfg11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/sh_run_interface_eth2_1_all0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/show_interface_eth2_196
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/show_ip_pim_interface_eth2_168
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_rp_address/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_rp_address/config.cfg1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_static_route.cfg3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_interface_ethernet97
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_interface_ethernet_switchport14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_vlan18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_system/config.cfg16
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_system/vrf_only/config.cfg4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_telemetry/N9K.cfg43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_telemetry/N9K_SGs.cfg19
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_telemetry/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/agg_show_vlan_brief.txt27
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/config.cfg4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/show_vlan_brief.txt11
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_running-config13
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_running-config_no_facts1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_vlan45
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_vlan_no_facts1
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/show_vpc20
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/show_vrf_all30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_hardware3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_inventory13
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vpc3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vrf_all36
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_vpc_config2
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/show_port-channel_summary22
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/show_vpc_brief14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_run_all4
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default_interface0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management_interface0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc_interface0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf_af/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf_af/config.cfg22
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vsan/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vsan/shvsan.cfg35
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vsan/shvsanmem.cfg30
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep/config.cfg3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/config.cfg3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zone_status_vsan.out22
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zone_vsan.out946
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zoneset_active_vsan.out606
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zoneset_vsan.out947
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_0.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_1.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_2.cfg6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_0.cfg10
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_1.cfg9
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_2.cfg7
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonesetactive_0.cfg8
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_0.cfg23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_1.cfg23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_2.cfg24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_3.cfg24
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_4.cfg23
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/nxos_module.py137
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/__init__.py0
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/test_nxos_devicealias.py454
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/test_nxos_vsan.py260
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/test_nxos_zone_zoneset.py797
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos.py127
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acl.py104
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acl_interface.py98
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acl_interfaces.py407
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acls.py517
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_banner.py101
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bfd_global.py336
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bfd_interfaces.py357
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp.py162
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_af.py192
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_global.py795
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_neighbor.py155
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_neighbor_af.py260
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_command.py124
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_config.py295
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_evpn_global.py81
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_evpn_vni.py80
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_feature.py96
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_hsrp.py84
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_hsrp_interfaces.py351
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_interface.py116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_interface_ospf.py296
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_interfaces.py681
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_l3_interface.py395
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_l3_interfaces.py1037
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_lacp_interfaces.py113
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_lldp_interfaces.py272
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_nxapi.py100
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospf.py62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospf_interfaces.py1572
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospf_vrf.py116
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospfv2.py588
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospfv3.py2260
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_overlay_global.py62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_pim.py107
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_pim_interface.py265
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_pim_rp_address.py75
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_static_route.py126
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_static_routes.py531
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_system.py208
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_telemetry.py1834
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_user.py104
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vlan.py235
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vlans.py294
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vpc.py235
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vpc_interface.py81
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vrf.py91
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vrf_af.py1090
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vxlan_vtep.py105
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vxlan_vtep_vni.py119
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/utils.py51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/requirements.txt42
-rw-r--r--collections-debian-merged/ansible_collections/cisco/nxos/tox.ini31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/.gitignore135
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/Development.md61
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/FILES.json705
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/LICENSE.txt21
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/MANIFEST.json34
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/README.md101
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/misc/Impact DNW07 UCS Ansible Collection Lab Guide.pdfbin0 -> 433208 bytes
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/misc/README.md3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/example_playbook.yml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/fw_download_config_hfp.yml83
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/inventory6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/roles/servers/defaults/tasks/main.yml136
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/roles/servers/service_profile_templates/tasks/main.yml18
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/roles/servers/service_profiles/tasks/main.yml14
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/sandbox_inventory6
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/server_deploy.yml39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_disk_group_policy.yml74
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_dns_server.yml33
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_graphics_card_policy.yml105
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_ip_pool.yml78
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_lan_connectivity.yml67
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_mac_pool.yml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_managed_objects.yml124
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_ntp_server.yml44
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_org.yml73
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_query.yml62
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_san_connectivity.yml56
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_scrub_policy.yml123
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_serial_over_lan_policy.yml109
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_server_maintenance.yml43
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_service_profile_association.yml53
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_service_profile_from_template.yml68
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_service_profile_template.yml59
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_sp_vnic_order.yml29
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_storage_profile.yml64
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_system_qos.yml71
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_timezone.yml31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_uuid_pool.yml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vhba_template.yml51
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vlan_find.yml39
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vlan_to_group.yml25
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vlans.yml31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vnic_template.yml98
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vsans.yml32
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_wwn_pool.yml85
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/README.md31
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/doc_fragments/ucs.py72
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/module_utils/ucs.py97
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_disk_group_policy.py428
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_dns_server.py165
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_graphics_card_policy.py261
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_ip_pool.py452
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_lan_connectivity.py355
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_mac_pool.py185
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_managed_objects.py256
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_ntp_server.py169
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_org.py227
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_query.py172
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_san_connectivity.py248
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_scrub_policy.py320
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_serial_over_lan_policy.py271
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_server_maintenance.py158
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_service_profile_association.py252
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_service_profile_from_template.py177
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_service_profile_template.py523
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_sp_vnic_order.py230
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_storage_profile.py254
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_system_qos.py152
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_timezone.py165
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_uuid_pool.py196
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vhba_template.py274
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vlan_find.py123
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vlan_to_group.py158
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vlans.py192
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vnic_template.py377
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vsans.py204
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_wwn_pool.py239
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/releases/README.md3
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.1.0.tar.gzbin0 -> 40763 bytes
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.2.0.tar.gzbin0 -> 477194 bytes
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.3.0.tar.gzbin0 -> 437326 bytes
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.4.0.tar.gzbin0 -> 438448 bytes
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.5.0.tar.gzbin0 -> 1839479 bytes
-rw-r--r--collections-debian-merged/ansible_collections/cisco/ucs/requirements.txt1
3799 files changed, 614813 insertions, 0 deletions
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/.github/workflows/ansible-test.yml b/collections-debian-merged/ansible_collections/cisco/aci/.github/workflows/ansible-test.yml
new file mode 100644
index 00000000..054c1808
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/.github/workflows/ansible-test.yml
@@ -0,0 +1,171 @@
+name: CI
+on:
+ push:
+ branches: master
+ pull_request:
+ schedule:
+ # * is a special character in YAML so you have to quote this string
+ - cron: '0 8 * * *'
+jobs:
+ build:
+ name: Build collection
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ ansible: [2.9.12, 2.10.0]
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v2
+
+ - name: Set up Python 3.7
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+
+ - name: Install ansible-base (v${{ matrix.ansible }})
+ run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check
+
+ - name: Build a collection tarball
+ run: ansible-galaxy collection build --output-path "${GITHUB_WORKSPACE}/.cache/collection-tarballs"
+
+ - name: Store migrated collection artifacts
+ uses: actions/upload-artifact@v1
+ with:
+ name: collection
+ path: .cache/collection-tarballs
+
+ sanity:
+ name: Sanity in ubuntu-latest
+ needs:
+ - build
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ ansible: [2.9.12, 2.10.0]
+ steps:
+ - name: Set up Python 3.7
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+
+ - name: Install ansible-base (v${{ matrix.ansible }})
+ run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check
+
+ - name: Install coverage (v4.5.4)
+ run: pip install coverage==4.5.4
+
+ - name: Download migrated collection artifacts
+ uses: actions/download-artifact@v1
+ with:
+ name: collection
+ path: .cache/collection-tarballs
+
+ - name: Install the collection tarball
+ run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
+
+ - name: Run sanity tests
+ run: ansible-test sanity --docker -v --color --truncate 0 --coverage
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
+
+ - name: Generate coverage report
+ run: ansible-test coverage xml -v --requirements --group-by command --group-by version
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
+
+ - name: Push coverate report to codecov.io
+ run: bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F integration
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
+
+ units:
+ name: Units in ubuntu-latest
+ needs:
+ - build
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ ansible: [2.9.12, 2.10.0]
+ steps:
+ - name: Set up Python 3.7
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+
+ - name: Install ansible-base (v${{ matrix.ansible }})
+ run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check
+
+ - name: Install coverage (v4.5.4)
+ run: pip install coverage==4.5.4
+
+ - name: Download migrated collection artifacts
+ uses: actions/download-artifact@v1
+ with:
+ name: collection
+ path: .cache/collection-tarballs
+
+ - name: Install the collection tarball
+ run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
+
+ - name: Run unit tests
+ run: ansible-test units --docker -v --color --truncate 0 --python 3.7 --coverage
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
+
+ - name: Generate coverage report.
+ run: ansible-test coverage xml -v --requirements --group-by command --group-by version
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
+
+ - uses: codecov/codecov-action@v1
+ with:
+ fail_ci_if_error: false
+ file: /home/runner/.ansible/collections/ansible_collections/cisco/aci/tests/output/reports/coverage.xml
+
+ integration:
+ name: Integration in ubuntu-latest
+ needs:
+ - build
+ runs-on: ubuntu-latest
+ steps:
+ - name: Set up Python 3.7
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+
+ - name: Install ansible-base (v2.9.12)
+ run: pip install https://github.com/ansible/ansible/archive/v2.9.12.tar.gz --disable-pip-version-check
+
+ - name: Install coverage (v4.5.4)
+ run: pip install coverage==4.5.4
+
+ - name: Download migrated collection artifacts
+ uses: actions/download-artifact@v1
+ with:
+ name: collection
+ path: .cache/collection-tarballs
+
+ - name: Install the collection tarball
+ run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
+
+ - name: Requesting integration mutex
+ uses: nev7n/wait_for_response@v1
+ with:
+ url: ${{ format('https://8v7s765ibh.execute-api.us-west-1.amazonaws.com/v1/ansible-aci?repo={0}', github.repository) }}
+ responseCode: 200
+ timeout: 2000000
+ interval: 5000
+
+ - name: Run integration tests on Python 3.7
+ run: ansible-test network-integration --docker -v --color --retry-on-error --python 3.7 --truncate 0 --continue-on-error --coverage
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
+
+ - name: Releasing integration mutex
+ uses: nev7n/wait_for_response@v1
+ if: always()
+ with:
+ url: ${{ format('https://8v7s765ibh.execute-api.us-west-1.amazonaws.com/v1/ansible-aci/release?repo={0}', github.repository) }}
+ responseCode: 200
+
+ - name: Generate coverage report
+ run: ansible-test coverage xml -v --requirements --group-by command --group-by version
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
+
+ - name: Push coverate report to codecov.io
+ run: bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F integration
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/.gitignore b/collections-debian-merged/ansible_collections/cisco/aci/.gitignore
new file mode 100644
index 00000000..2ee73b45
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/.gitignore
@@ -0,0 +1,393 @@
+
+# Created by https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
+# Edit at https://www.gitignore.io/?templates=git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
+
+### dotenv ###
+.env
+
+### Emacs ###
+# -*- mode: gitignore; -*-
+*~
+\#*\#
+/.emacs.desktop
+/.emacs.desktop.lock
+*.elc
+auto-save-list
+tramp
+.\#*
+
+# Org-mode
+.org-id-locations
+*_archive
+
+# flymake-mode
+*_flymake.*
+
+# eshell files
+/eshell/history
+/eshell/lastdir
+
+# elpa packages
+/elpa/
+
+# reftex files
+*.rel
+
+# AUCTeX auto folder
+/auto/
+
+# cask packages
+.cask/
+dist/
+
+# Flycheck
+flycheck_*.el
+
+# server auth directory
+/server/
+
+# projectiles files
+.projectile
+
+# directory configuration
+.dir-locals.el
+
+# network security
+/network-security.data
+
+
+### Git ###
+# Created by git for backups. To disable backups in Git:
+# $ git config --global mergetool.keepBackup false
+*.orig
+
+# Created by git when using merge tools for conflicts
+*.BACKUP.*
+*.BASE.*
+*.LOCAL.*
+*.REMOTE.*
+*_BACKUP_*.txt
+*_BASE_*.txt
+*_LOCAL_*.txt
+*_REMOTE_*.txt
+
+#!! ERROR: jupyternotebook is undefined. Use list command to see defined gitignore types !!#
+
+### Linux ###
+
+# temporary files which can be created if a process still has a handle open of a deleted file
+.fuse_hidden*
+
+# KDE directory preferences
+.directory
+
+# Linux trash folder which might appear on any partition or disk
+.Trash-*
+
+# .nfs files are created when an open file is removed but is still being accessed
+.nfs*
+
+### PyCharm+all ###
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+# *.iml
+# *.ipr
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
+
+### PyCharm+all Patch ###
+# Ignores the whole .idea folder and all .iml files
+# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
+
+.idea/
+
+# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
+
+*.iml
+modules.xml
+.idea/misc.xml
+*.ipr
+
+# Sonarlint plugin
+.idea/sonarlint
+
+### pydev ###
+.pydevproject
+
+### Python ###
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+pip-wheel-metadata/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# pyenv
+.python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# Mr Developer
+.mr.developer.cfg
+.project
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+### Vim ###
+# Swap
+[._]*.s[a-v][a-z]
+[._]*.sw[a-p]
+[._]s[a-rt-v][a-z]
+[._]ss[a-gi-z]
+[._]sw[a-p]
+
+# Session
+Session.vim
+Sessionx.vim
+
+# Temporary
+.netrwhist
+# Auto-generated tag files
+tags
+# Persistent undo
+[._]*.un~
+
+### WebStorm ###
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+
+# Generated files
+
+# Sensitive or high-churn files
+
+# Gradle
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+# *.iml
+# *.ipr
+
+# CMake
+
+# Mongo Explorer plugin
+
+# File-based project format
+
+# IntelliJ
+
+# mpeltonen/sbt-idea plugin
+
+# JIRA plugin
+
+# Cursive Clojure plugin
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+
+# Editor-based Rest Client
+
+# Android studio 3.1+ serialized cache file
+
+### WebStorm Patch ###
+# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
+
+# *.iml
+# modules.xml
+# .idea/misc.xml
+# *.ipr
+
+# Sonarlint plugin
+.idea/**/sonarlint/
+
+# SonarQube Plugin
+.idea/**/sonarIssues.xml
+
+# Markdown Navigator plugin
+.idea/**/markdown-navigator.xml
+.idea/**/markdown-navigator/
+
+### Windows ###
+# Windows thumbnail cache files
+Thumbs.db
+Thumbs.db:encryptable
+ehthumbs.db
+ehthumbs_vista.db
+
+# Dump file
+*.stackdump
+
+# Folder config file
+[Dd]esktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+# End of https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
+
+# vsCode
+.vscode
+
+# Ansible Collection tarball
+cisco-aci-*.tar.gz \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/.vscode/settings.json b/collections-debian-merged/ansible_collections/cisco/aci/.vscode/settings.json
new file mode 100644
index 00000000..76aa33c1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "python.pythonPath": "aci_3.8/bin/python"
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/CHANGELOG.rst b/collections-debian-merged/ansible_collections/cisco/aci/CHANGELOG.rst
new file mode 100644
index 00000000..3f0628bc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/CHANGELOG.rst
@@ -0,0 +1,130 @@
+==========================================
+Cisco ACI Ansible Collection Release Notes
+==========================================
+
+.. contents:: Topics
+
+
+v1.1.1
+======
+
+Release Summary
+---------------
+
+Release v1.1.1 of the ``cisco.mso`` collection on 2020-11-23.
+This changelog describes all changes made to the modules and plugins included in this collection since v1.1.0.
+
+Minor Changes
+-------------
+
+- Add test file for aci_domain_to_encap_pool
+- aci_epg_to_domain moving child configs & classes to each domain type
+
+Bugfixes
+--------
+
+- Fix galaxy import warnings
+- Fix sanity issue in aci_epg_to_domain
+
+v1.1.0
+======
+
+Release Summary
+---------------
+
+Release v1.1.0 of the ``cisco.mso`` collection on 2020-10-30.
+This changelog describes all changes made to the modules and plugins included in this collection since v1.0.1.
+
+Minor Changes
+-------------
+
+- Ability to add monitoring policy to epgs and anps
+- Add Ansible Network ENV to fallback
+- Add aci_l3out_external_path_to_member.py & aci_l3out_static_routes modules
+- Add env_fallback for common connection params
+- Add env_fallback for the rest of the argument spec
+- Add new Subclass path support
+- Add new module and test file for leaf breakout port group
+- Added failure message to aci_interface_policy_leaf_policy_group
+- Update README.md
+- Update inventory
+- aci_epg_to_domain addition of promiscuous mode (#79)
+- aci_interface_policy_port_security addition of attribute:timeout (#80)
+
+Bugfixes
+--------
+
+- Existing_config variable is not reset during loop
+- Fix galaxy import warnings
+- Fix how validity of private key/private key file is checked to support new types
+- Fix incorrect domain types in aci_domain_to_encap_pool module
+
+v1.0.1
+======
+
+Release Summary
+---------------
+
+Release v1.0.1 of the ``cisco.mso`` collection on 2020-10-13.
+This changelog describes all changes made to the modules and plugins included in this collection since v1.0.0.
+
+Minor Changes
+-------------
+
+- Enable/Disable infra vlan in aci_aep and its test module
+- Set scope default value in aci_l3out_extsubnet
+
+Bugfixes
+--------
+
+- Fix convertion of json/yaml payload to xml in aci_rest
+- Fix dump of config for aci_rest
+- Fix issue of "current" in firmware_source module
+- Fix sanity issue in aci_rest and bump version to v1.0.1
+
+v1.0.0
+======
+
+Release Summary
+---------------
+
+This is the first official release of the ``cisco.aci`` collection on 2020-08-18.
+This changelog describes all changes made to the modules and plugins included in this collection since Ansible 2.9.0.
+
+
+Minor Changes
+-------------
+
+- Add Fex capability to aci_interface_policy_leaf_profile, aci_access_port_to_interface_policy_leaf_profile and aci_access_port_block_to_access_port
+- Add LICENSE file
+- Add aci_epg_to_contract_master module
+- Add annotation attribute to aci.py and to doc fragment.
+- Add annotation to every payload and add test case for annotation.
+- Add changelog
+- Add collection prefix to all integration tests
+- Add galaxy.yml file for collection listing
+- Add github action CI pipeline
+- Add module and test file for aci_bd_dhcp_label
+- Add modules and test files for aci_cloud_ctx_profile, aci_cloud_cidr, aci_cloud_subnet and aci_cloud_zone
+- Add modules and test files for aci_l2out, aci_l2out_extepg and aci_l3out_extepg_to_contract
+- Add names to documentation examples for modules from community.network
+- Add preferred group support to aci_vrf
+- Add support for Azure on all cloud modules
+- Add support for output_path to allow dump of REST API objects
+- Add support for owner_key and owner_tag for all modules and add test case for it.
+- Add vpn gateway dedicated module and remove vpn_gateway from cloud_ctx_profile module
+- Fix M() and module to use FQCN
+- Initial commit based on the collection migration available at "ansible-collection-migration/cisco.aci" which contains the ACI module from Ansible Core
+- Move aci.py to base of module_utils and fix references
+- Move test file to root of tests/unit/module_utils
+- Update Ansible version in CI and add 2.10.0 to sanity in CI.
+- Update Readme with supported versions
+- Update to test files to make the tests work on both 3.2 and 4.2.
+
+Bugfixes
+--------
+
+- Fix sanity issues to support 2.10.0
+- Fix some doc issues for a few modules
+- Fix some formatting issues (flake8) in unit tests.
+- Fixing integration tests and sanity. Tested on ACI 4.2(3l).
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/FILES.json b/collections-debian-merged/ansible_collections/cisco/aci/FILES.json
new file mode 100644
index 00000000..085cea69
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/FILES.json
@@ -0,0 +1,2938 @@
+{
+ "files": [
+ {
+ "name": ".",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "LICENSE",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1c38eb11b6b8cd591aed90793ca80bd3c499393f207b96640ddfa571f61f7b4f",
+ "format": 1
+ },
+ {
+ "name": "plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/aci.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ce1eba18a30f6906c18c834b271d9ee36b064697885e083fc1f0a2e3d51022ad",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/aci.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f354e6dc6fd808d4d7ace041cfbab7136f6787e846a59e1050f4db4fbec3e81a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_l2out.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3c1f007283369e47a9b2dbd8c9dfb2f9a94a48f9285035cad4286c094b31796d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_vlan_pool.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8d065c55b8d6bee3fe61538d6c7118a5d93ce76025b0ef76fcbee063daea74e3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_domain_to_encap_pool.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ab41cc631460014f0b4ac1d34fc8b106aef641b997383e51d235ce220811c500",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_tenant_span_src_group_to_dst_group.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "695e6e52d0d44f86dbc3ebe829c4396b9a4d896bcbef1dcac34f8d0d797d65fa",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_domain_to_vlan_pool.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "588e692945d98acf13d7dbc26eeae170cff1ef83aebe02d9926cd160bd7c8e72",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_l3out_extsubnet.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "de51d3411dc447cee6e3a0860f43308885986f3d17368a6c6560145ab17641c5",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_l3out_static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b88228b4e5cada88f0606a023177d6196bd5b605e93db1229f6f8ecc229e2915",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_epg.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7cd2f9ee8b0b50998249d4f49ec8b4f25593b354fcc7ec35643ad62ec2e2a049",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_cloud_subnet.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "48b2a95ff5087918c7ae3d1b36cf274efc868b247918ddb5674308c3295045a3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_aep_to_domain.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "575e2872b0a6aac9545cb75354f1565ad15372f407c062b303d598d927d04166",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_aaa_user_certificate.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "27e514fbb89ba01365db8b0094275375985829367dddddcdb36391062004083a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_firmware_group_node.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "095207bd3f72dcf32638922578d3ad31e77a731e667ca91efcc8df027af4b307",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_filter.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b3cda6a2a0aefe84a256b8e01fd06f1e7753ca1d3f8db6a5a02f7d775ec59061",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_config_snapshot.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0046490d4a19dfb2bb0b20be256e8952fbaf0b31e275b262ce392d4219e89549",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_epg_to_contract_master.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "efe1f84425d5831c82ec0986504081fa4fcfb7c6982c2c0c42bc7c78f873248e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_policy_lldp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fd31cf864e4d8ff9cfb3fd0e51d0aa8e9acd9d4cae59cc4f63d679509bc950b3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_policy_port_security.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8e0b9a3c9a05439d0cf4dcb2b728853268dbaeaa96c2b327e8f6c6d8f61bd5de",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_tenant_span_src_group.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "376d583433dea1741ba2daf84eaa713013f1e9a6070a46ed0835e846c237820e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_static_binding_to_epg.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ca35e7fe3132341b2346da7f9dc65823d6beb72562a0a777259c5142d3a95e8a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_contract_subject.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "be0097f6cdeae3f29d214dea14032bbb68bf3329f747b12200ac01d3b57b5adb",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_policy_l2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "609aa622d863ba996eda0ad74707a33a7bc43a62410e5de8a18b46c931164fbf",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_cloud_provider.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d6a731ad325068e4813bd8859e1b517f2a49ee79487b260b130667bb2c486f62",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_filter_entry.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e7dff4086b1415e9f63f34286c77123c5f0123251464debd22de8a2f117344f6",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_vrf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d813b37cef2680264a09c11d8e0eea504a1ed8b80a1b0ea87813d8ac27fd5eda",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_policy_leaf_profile.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0be99340ce8d2e2604da3e55ef97e608f2a5a5e4e6e6f073365988ce8e8eaede",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_l3out.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9167ec5b6d509536548bb34d7848c341592b2521d0dc694b850dd0e2d5903fe6",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_policy_fc.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "664865e0683cc6607959a2da1858088da6bae01645003efb09b8221b0000409c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_policy_link_level.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bbbbd6ba28668c4030d00b37f6ae34c75ce4676a37c4223a9ecb5979d288a700",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_switch_policy_vpc_protection_group.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "86004a3da639ba800c566cf57108a7d41212d7f0394e3567581a0cdc37adc8f0",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_tenant_action_rule_profile.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0bf64c679529b9663b56c09e75b8bd1bf71f6ddbb72c0da4555d49a10b9c432a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_policy_leaf_breakout_port_group.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0b11f0e91043c6f6765150618c656098eb5e280297da31948f11cc7d2dbb6977",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_policy_mcp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c2615487ddf26c6e694cac5e0183781f09d8a7d2c0cffa1a23864863c268f7b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_maintenance_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b74cef04324c1d086590507679b810369b63c54b12332f069cc946c27404257d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_cloud_vpn_gateway.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9562e2f407f6e5a501f0bc0dbca115b4b3f336f8931c8b2d08c634821df0bdcd",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_cloud_cidr.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f27c5b956d7dc1fb6b157e8ba6e208f1018ff62195645cb19cbea21b62b64a4e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_ap.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90230741a96a0e6981a04d20d9acbf125a75aaf3a5962ee995246dbab5a6a1a4",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_tenant_span_dst_group.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "80dc907e9807583ed88e7efb234e3e6d9ab8cea0f2ef43857dfb90d00472621a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_taboo_contract.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4a3925936cfba0f2b8744987288eb5a648449162ee65c5880e12a4e79367b84e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_contract.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "49b727ed24577161054da66ec4792bbe86226d247a752bddc15c929259e73218",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_fabric_node.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "95a08f9eb724433591732ad7f27939c8ed95b88d0bb7a4b4fbcfb25cd873d94d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_firmware_group.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "24d62ab8356e6bf6ad4dc5a91b33abd5075168b2f83f6eb4721f06558aabc1dd",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_firmware_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6669e6641be20f7facdcce1b2607559fd9150c91e453d8d08ba463c9e654b22b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_policy_ospf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5f83137ba4c5804bf3273616cfb97f7f04e63095de18cb9a6907ad2193e4dcdc",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_epg_to_contract.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cb1827a32607cb67d9cd7f6ccbf574673ecaec0ffc189637a549a04318bcf038",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_cloud_region.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fe30f345a9eb00e13b035d205e5b58422feb52f68694638d87f51ded691a3914",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_encap_pool_range.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8e970c136a2ac2a24f4447097ec6c42883ba495d0b476f3146e02fee0755ad53",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_switch_policy_leaf_profile.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2ad6ba100355c8a9d37e9ae302476c06c150f2833292823a212f1d9e3e90c512",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_vlan_pool_encap_block.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "59dec9619780eb596bf9e3e859dfd48377e250f31092e54c5acfc1dcfb58d940",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_system.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f0e0d492601df84d88933d6656827afa9625333add0eb0054a1e112b673a6242",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_maintenance_group_node.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "450452e406acc8b838595da5bacf6e7148ee908f847ba7f0f95821ccb88dc3c9",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_maintenance_group.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2f42e4204734a163a7efdb5d6d613da665d5d41d70261c4353e7a5b8c34ad584",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_selector_to_switch_policy_leaf_profile.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "73cf9ec9088029ed3f0a408fc10ab163e09280e74e4a3d6a876b6225ff62f0f5",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_access_sub_port_block_to_access_port.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c4c6b1cf6e53dc6f63f93ecf7d81ada7d4c7893966ec27b73287de2c7d16fe81",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_bd_subnet.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "881aee018ed6793b3e38cf8d9b28679bb84ae5e68290ec5a4894724c09c8a62b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_cloud_zone.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "24daa0d08e06f8c971fa570236f8f8b69a690c6a84494923b90d4217fb22c3ad",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_encap_pool.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6537e8b5a578c985a17af3cde6af5523e7c98a6670d2bdfa725a328c91fc36b5",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_contract_subject_to_filter.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5f88c18f09502755c243e30f16acd72b2165971eb623d7c1b953f3d2a798191c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_domain.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b2b7794f5e416221d90a531a7afadcca0bdb05c046014646ab28f2db0c0907f5",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_access_port_to_interface_policy_leaf_profile.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3c274650a08c47c1776c8609726aa43f8f05f6c7a1dae27f9ecd0d2441516413",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_policy_cdp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1daf11c03d58f973cf789c7f1db8ba9cf2e159f5a7e5ac10cbff92faaea1e2dd",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_l3out_extepg_to_contract.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "518fd244082eb28bfa62ed9aac65f5aac18347cd4db8bc632f0bab4a736799ea",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_config_rollback.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dbcde141d3c9a58fa4d6fa5482a89a4584ca812fc842e086678effb1ff6bd665",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_tenant_ep_retention_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f12ea0188dbbde492407dfecf44f776d0e0c03eb2a2740766d9921b0fb0b233a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_access_port_block_to_access_port.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4ed9b58daa467df5dbf2fe51bdbfe5d7a78f5bc0c2203180debad9a2cbc09892",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_bd_to_l3out.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eced4bb8c951f33637d8876cf7581b604abe81c008b2210db06e5514af863fa8",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_rest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8a08598d8442f7c14c44e32cfa47ff2ca38212901420b8edbe1f791fe2c3571d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_l3out_logical_interface_vpc_member.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fa4459f3bf78bf8cb2f6d86b7bfe23cb7a89f298be73c4b3ed1f9872195187bd",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_tenant.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1111e3d2319085161e60d6deee53bb618c06bac99440050f734f4af11feef580",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_policy_leaf_policy_group.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "826e77222521083e0efca1cc41185133ff71b26a5551e7954172689c53da14a9",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_aaa_user.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "837daf6aa51e584c5b6d90b980ea53f4ade47836583aa8b3864e978a6af97138",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_fabric_scheduler.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ff038cb757cea8fec85fc149082ac928c4eb7158c82ea7a94db3c85ed8a48b2c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_aep.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "46570b0ec5b85f6dae90d03636a29b0bea2f40b79a6e2d17aaaffc9dea559a1b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_l3out_extepg.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5b07dc084c7a195038e6814f664852274481994a1a0787b63c350473775dcf7e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_epg_monitoring_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7e83a903f88c38527d34558acf33f94468ca1dd1fa9717771b354f30f2210082",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_interface_policy_port_channel.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "06ce40cedba107ecb76c95f6717b2ea26d0d2649c471a630026a9c8d90e2c43c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_l2out_extepg.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e9acbbe8c83458217796b180abf57008add4e49c76973173ba63b6bc67382608",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_l3out_route_tag_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "74d9093f97947e13ac4f199f6be7f880cdde94a00869e189813bac851f876e52",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_epg_to_domain.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6d33e15e8443abaa652ef9592bb52f7e2be28e0fc2ec815a529e617d1833d888",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_cloud_ctx_profile.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a1ba83faa33cd570bbc8a938982ed1f8bf00a725f5c0253de95acd9cd3a7d56c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_bd.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "273515aa9bb78792d59bba83d6fdfad9e81225613634f94e3ea64300c5fcc3cf",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_bd_dhcp_label.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "234e6c848c64b3377f244575b3db0f9cd7b4d18e0c26e22ab70527ee25f52cb0",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_vmm_credential.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b1d714a256c6ab0434c1f47f2d86d346d2c826f08cadb3fea2ed9cebd6a42c0c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_firmware_source.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "afae46ca8450a352216c6ce2935e348850ca6d418f67d1ddefad30ba2cd7c054",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/aci_switch_leaf_selector.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "edbd55df9c4d0e33215e237d96811c35c7adcc460c7f1df7b61eb2afc1e6d80c",
+ "format": 1
+ },
+ {
+ "name": "tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/unittest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5401a046e5ce71fa19b6d905abd0f9bdf816c0c635f7bdda6730b3ef06e67096",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/builtins.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0ca4cac919e166b25e601e11acb01f6957dddd574ff0a62569cb994a5ecb63e1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/mock.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0af958450cf6de3fbafe94b1111eae8ba5a8dbe1d785ffbb9df81f26e4946d99",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "09c75b1b3fadff6870584617f4f178e168a23d4e0fb3187d7b100ffc8d4dbb68",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/vault_helper.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4535613601c419f7d20f0c21e638dabccf69b4a7fac99d5f6f9b81d1519dafd6",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/procenv.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "340adca3524b64ea1804b1be207cd86bba734e104b713bfe54852a20643aa07f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/loader.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c45064a0beb765cd0b6cfbb74ca0cd491ceed2f4c2d22808f60a57071d9712cc",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/yaml_helper.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fada9f3506c951e21c60c2a0e68d3cdf3cadd71c8858b2d14a55c4b778f10983",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/path.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "359e469f24b220034c278a24eb121934afee992b427083eba2b34dfcd8ab1597",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/module_utils/conftest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "96375dffba3a180868fdd4038a2308c0b7096cd7dfcab3d9b1a99f9c3aa412e1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/module_utils/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/module_utils/test_aci.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "768b3fed741cf5685a4fde97bb61b7f3d621214bdf8d16a3486506e0e168e045",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/utils.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "778c223e9618499416ec085116566f93e446298b40de0e97179e07a58353c353",
+ "format": 1
+ },
+ {
+ "name": "tests/integration",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_firmware_source",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_firmware_source/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_firmware_source/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "95ee636c739d032edc8dea1c14cb802c49f4bfd34b3bb2b0c2095390d35b4259",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_firmware_source/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_access_port_block_to_access_port",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_access_port_block_to_access_port/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_access_port_block_to_access_port/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "302595aa86e1ba3434fa3b62a5a67d7ff313cf4b66d6a2985c7cf00b9f70df86",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_access_port_block_to_access_port/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "17613562e9afcee2a22a3561fb48d712bb11d2c75cdc943e3f579243002fbfcb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_filter_entry",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_filter_entry/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_filter_entry/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec89c0177c4aef8eeb8cc6a9fa86ccbae363e74b15b0f93904367d41a6b7bd10",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_filter_entry/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vlan_pool_encap_block",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vlan_pool_encap_block/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vlan_pool_encap_block/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "75de5c4fc7645577b679e2f19cf9e7d8c52b419ace18f4f2337171b4f02cbebf",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vlan_pool_encap_block/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vlan_pool",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vlan_pool/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vlan_pool/tasks/dynamic.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "48460744b70367fdb873c13664c6f84baa3a6897b37d48a863233fce20aa7671",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vlan_pool/tasks/static.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "444e2593c90eac02ddd8f07369bb78a237dba0cafc94f099d5ea6e6a26e613ed",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vlan_pool/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e76d7fb454bd723c8d50d843592740a7ccd9c55be5adca9696e58f87fcb61915",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vlan_pool/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain_to_encap_pool",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain_to_encap_pool/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain_to_encap_pool/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1844a85615bd16d2bec3d8eb61f04466c3b577879a7641a31922709a97f020f9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain_to_encap_pool/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_logical_interface_vpc_member",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_logical_interface_vpc_member/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_logical_interface_vpc_member/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3851edfac41a945b9f385dc13fa3fd17d86ad69a5cda1f05270ac6b3af779a4e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_logical_interface_vpc_member/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6c86383d15c5ed0e2ca4b19fa79985fe774ae3ca967b524bfdc977b6981a8ba5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_vpn_gateway",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_vpn_gateway/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_vpn_gateway/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3b8e50d44778469f24eeb06adbf0e81b38549a9be2b78e4be7fe2cd23530db7f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_vpn_gateway/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_bd",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_bd/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_bd/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "69eb8ee842de7a9d5c5a5d8205a6cea9f96d9c6853bb9c4273cd47990d90b0ff",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_bd/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_config_snapshot",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_config_snapshot/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_config_snapshot/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9421728c55bcc8e0b4ced96f918cd211818ac18d6bcdfe60ecd814cb619425a4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_config_snapshot/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_leaf_breakout_port_group",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_leaf_breakout_port_group/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_leaf_breakout_port_group/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9d5ef7fdf45d2ad149fc8755388332bf48ada02be873c84efc4d11b0a9ef1c4b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_leaf_breakout_port_group/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_ap",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_ap/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_ap/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "636337667a8e39effe478991b00879375187a0c94c6ddb8998894443230ce90a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_ap/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_bd_subnet",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_bd_subnet/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_bd_subnet/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5d264e7f48fdff018bf886edf3f3d9a5fe7b523c55fd1b835f9154037cdff393",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_bd_subnet/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_contract",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_contract/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_contract/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3b8e1e7ca5d0e43b23de7430700dd50360d1f4f8f40a3cb4e910d4d17cba3c29",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_contract/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_leaf_policy_group",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_leaf_policy_group/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_leaf_policy_group/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d88f7cfa27b684113ed401b53f6a68c7902bd923b76a38037cde17012d63e851",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_leaf_policy_group/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_extepg_to_contract",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_extepg_to_contract/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_extepg_to_contract/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e31a115146e45d490d640c244a07e479e2f38fddd1a4edcf9e23c465d21d86d8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_extepg_to_contract/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_taboo_contract",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_taboo_contract/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_taboo_contract/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "53e04e56771d3b74a5b672935be3e8466768e334399499a9b9f625e81b1fd6ab",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_taboo_contract/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain_to_vlan_pool",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain_to_vlan_pool/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain_to_vlan_pool/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6a129f9b4b6cccccfd27b7820c01b674d875379b635238fac2fd73eb320665be",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain_to_vlan_pool/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg_to_domain",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg_to_domain/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg_to_domain/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c2cf8fcae73240916ddb1c7fafc117b49969fcac17cac6b2a3efb8445d3e80e1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg_to_domain/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_cdp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_cdp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_cdp/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "28d97d22d9d57fe3eea01812765d6d0fa5d0da24ffea67107a0b46ca6f8086fd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_cdp/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7e5f1f59656b5c296b78849e4845810f74bbe10151203a6d224474a31f470f3f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_tenant",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_tenant/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_tenant/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b14d80fb154ad98992b0a6a0c7a1cce018f87d50afdf524699d8439941817f55",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_tenant/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aep",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aep/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aep/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "95ab6919b4c83c6e7be692c372d4c57c982accec8b50f080f16f642c1f90d0a9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aep/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_link_level",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_link_level/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_link_level/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b055b73ed42cf465ff92d17a7d30487af202c192ca67366968880534c7317be1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_link_level/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_extsubnet",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_extsubnet/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_extsubnet/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3be8b756d85fc8dc8b72ccb506bf3e9cad396698ae65b85e0ec1be5708709e1a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_extsubnet/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l2out",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l2out/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l2out/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7f4423a6bdeeebdb16684343d744d83bb07c734ef5e6138f97b4d54fccfd0ba9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l2out/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain/tasks/vmm-vmware.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "959a617c0be88f33096cb1942485f8545bf0c26302eb42d2af560c98d6526d39",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain/tasks/l2dom.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "703e40fb6d8eacdee5ac7895835a8f15e07c569aa13fe5dda0ee034020bbf702",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain/tasks/fc.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e7adac87a2d6a985a3912607cc2ee38f1b79c817bf30e7b30ee0a69bc7bbe3f7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain/tasks/phys.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a3d37b1db065366bdee6ca7c977129eb278390171bce9c3cf50fd73cacd7e3ef",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8094a133d927bf97b43ccdc714c7b8b962af676a11e616f205f21e605f27f1e9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain/tasks/l3dom.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "70bf07065aee2ddb867e2c2edb238d17fead70d369b776ce7f0973793995aa02",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_domain/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg_to_contract",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg_to_contract/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg_to_contract/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "39737fc5e285966c703f3918665cca13e2032452ab8bb537770649d77130e5d1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg_to_contract/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_leaf_profile",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_leaf_profile/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_leaf_profile/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "309e9c7d77e445bbde896d1e69ae9302bf25370958d3dc233a231af803de1ca3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_leaf_profile/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_fabric_node",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_fabric_node/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_fabric_node/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4bf934fa7834ad085caa3817a50559bd17d536b2967e0d823602510616d53e45",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_fabric_node/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aep_to_domain",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aep_to_domain/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aep_to_domain/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c324d2cbfc8fce8e1793e38d1b7fd3f5d003793db2c4f82d5da0418a78c3f8c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aep_to_domain/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool_range",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool_range/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool_range/tasks/vsan.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b465efdc08e1e1a1a14290d23b5577dc5715fde6e1cba402d0312b3ef61f8a17",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool_range/tasks/vlan.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8fc7481d36c2521ddec7b606520d1800ecac3f76bc0f8bac6c56e1bdee5f7e8e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool_range/tasks/vxlan.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a6dfeec5aa6516e733189aa6d28b0e6ef8876f23c173fb75079a2b7d6466f8c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool_range/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5db109efeefd874fc7bf1d2a065a9486de6e4f425ad1aa4d05b991d0e3b4ea1c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool_range/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_ospf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_ospf/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_ospf/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8654a33e0a398c7ff6952476008457903409186552e9ac1d3d19d3e65df3286d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_ospf/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_provider",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_provider/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_provider/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "688bf2fd96a6cdafac44d492e9a87baeb9ba099ebab9f2c859d25717ca056dae",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_provider/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8b190f24432bcb398a73cc0b133fb50b36e1bec6eb9c0b4fa4e7797535d54fd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg_to_contract_master",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg_to_contract_master/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg_to_contract_master/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4fae553fe3fa2dea6fd434d77b0ba9520e9d0366be1dd60f4b0f17b8668b96e3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg_to_contract_master/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_subnet",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_subnet/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_subnet/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb13dc900d536786df7b30a0097acd5bb93f1da9e777e49f6d6d202a4b35ed16",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_subnet/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vrf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vrf/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vrf/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5121d7b9dc6e3596602cbb61b7276a27eb8e65456e8a197112c821079c08145b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vrf/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_filter",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_filter/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_filter/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8266681c02afd2fe0727d5b9b9cdad65d9d3e6839050cb4f5cb5ae4b3d7d2da3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_filter/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bd4e0aaddf0a6c1884b87d7e667d6c6eb7c7e06efa5ab47422fc60a3b3efef71",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_epg/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_static_binding_to_epg",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_static_binding_to_epg/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_static_binding_to_epg/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e1b29a9a51fce0d2f865d00a3b952298abbb6f25b4fca3117de5b4994139a52e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_static_binding_to_epg/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user_certificate",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user_certificate/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user_certificate/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9d7ff43eec015a9f3f9572411178bf9b79312d587a38c1f7b145593873225d39",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user_certificate/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user_certificate/pki",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user_certificate/pki/admin_invalid.key",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55fb85eae133a7b8649703b1d6e303cdf5b585d381e761f3674d1fcc5beb40cb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user_certificate/pki/rsa_user.key",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8a74dffaf7d04e74642988302b185f0e9eda2dd35a5b7f32317696b12a9790c1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user_certificate/pki/admin.crt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f97928b2cd1ce43cfe9ae9bbf47a40b858a749c4c3f25a7ec02898611f4fee90",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user_certificate/pki/openssh_rsa.key",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "81a6ac3a61f2df64339252db67fea1307e891c41232e2da53a1e5219f677c917",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user_certificate/pki/admin.key",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "947c1b5a6c419641d4b2c8492b91f2d71588958666aeceeffb1f878460b1d256",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user_certificate/pki/rsa_user.crt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "77629e6b31c8c9fad7052f4696dcead786fecef66e33e81c50ce09fcb39d8b4a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_aaa_user_certificate/pki/rsa_ansible.key",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6945fcb844179106a63be7e8ea5b407f31a8a1e95a1eaa0b5e67da1c26802032",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_ctx_profile",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_ctx_profile/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_ctx_profile/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b975c93d5b5349200870eb59a8d67f48ac2125d0aa4e58e6538784d88d037769",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_ctx_profile/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_contract_subject",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_contract_subject/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_contract_subject/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e2efff70368092af76367a837d66ec0f5f213e8f2dcb18f86ff17387635367b7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_contract_subject/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l2out_extepg",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l2out_extepg/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l2out_extepg/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c48c8e04da56cfc813a2d61eefe6f967f1fa960b7a47ee0249399561118e3a12",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l2out_extepg/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_static_routes/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_static_routes/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb2042728b7d89dfc37377cb2bb4220e18b6cf1559fa96fa249c86c02274e215",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_l3out_static_routes/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_zone",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_zone/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_zone/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1068d22db9147852b860870ac376782f1e7dde0a36b1a6864b644e99271a23ca",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_zone/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_switch_leaf_selector",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_switch_leaf_selector/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_switch_leaf_selector/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "92eff154bbd10cb5f9c4f29a6df3db4449b5b492bc1005aa6526b18d7d70cdbc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_switch_leaf_selector/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_region",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_region/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_region/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "81276c113cd83391e893462842a0700fc1a1bf27c9802acd596023e0cb406992",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_region/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_switch_policy_leaf_profile",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_switch_policy_leaf_profile/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_switch_policy_leaf_profile/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "df9813a66a2f13fcb63dc567c9c837dd5361fd8cd95d11bf7acc0161fc74314b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_switch_policy_leaf_profile/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vmm_credential",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vmm_credential/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vmm_credential/tasks/vmware.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d5a44d6dc013507d32ffe42b42fdf6ddb5d0b7926fd36a7940083ed390db1a59",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vmm_credential/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3160edcdbd1b730523e2239ca29b9ce2050d22d65028504573171f59b2a62e82",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_vmm_credential/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_switch_policy_vpc_protection_group",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_switch_policy_vpc_protection_group/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_switch_policy_vpc_protection_group/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3665afd2390c61d564b42ec3d5d198283a16c947a332e441c3d0cf6234e06b82",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_switch_policy_vpc_protection_group/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_config_rollback",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_config_rollback/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_config_rollback/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "91881432f41395ee83f079d8c9eafa410c41deaa076b0606f33b9818dc6271f9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_config_rollback/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_port_security",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_port_security/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_port_security/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5ff9173fc6507a1aca48cffa0748004a8055bfeae76e9f9479e6a8eb3f780a1f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_interface_policy_port_security/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_system",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_system/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_system/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "258a556f7e0b3951c846d808b4da3fc59645ea08e03895990ec9734777196fcc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_system/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_bd_dhcp_label",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_bd_dhcp_label/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_bd_dhcp_label/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7a723f08c47ecd1f395e357fc117549dccf050580ba706b647aea98332ed8a4e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_bd_dhcp_label/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool/tasks/vsan.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6d3a61c7dd273ea3d25fc294fd6cb6d389f6eeb92d7475827bfd2be86800d7b9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool/tasks/vlan.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7eb94b25fdef72fa4505a685d0c269e030e4be19e7ef4b07d19d420d142a73f0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool/tasks/vxlan.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ac938a576416da777b9fb855810f8dd1d582470b0a6b04c3da971be25a9ecfeb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "78202505d750c4fd93a314def948be7e95516c4bb820cd9aed37ebd58b3c44ea",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_encap_pool/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_rest",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_rest/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_rest/tasks/json_inline.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a1ff9d6891ccf01fa4dcb08f1de31fe4e484d7d56632dce362989c6b5f731887",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_rest/tasks/json_string.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "27682e4605d65f1d9b188eddcb49aa7881cec73309ab5d519e5cf5b26379a13f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_rest/tasks/yaml_inline.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "56f653f63378ed596d11764df28f5703066d41d3b8829bc6efb91807a60f1c30",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_rest/tasks/xml_string.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7c1720f00012ec0e72d8bda66f6407bc24b724d04baf77d0404cfe1b89af21ab",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_rest/tasks/yaml_string.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "56f653f63378ed596d11764df28f5703066d41d3b8829bc6efb91807a60f1c30",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_rest/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b28a5c321130fdea95a8fe4b349662f499fec0d1bd10fa4f190df9154d798fcc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_rest/tasks/error_handling.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5e118317b9f9438907e0e9c327afcfb4adc2feefdbd646b97df53890e9359553",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_rest/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_contract_subject_to_filter",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_contract_subject_to_filter/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_contract_subject_to_filter/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4c4e96f5fd47e53addc3c926b16011820324542e82a7700ba756ee76e75610be",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_contract_subject_to_filter/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_access_sub_port_block_to_access_port",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_access_sub_port_block_to_access_port/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_access_sub_port_block_to_access_port/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9338f942c41c0dd7a2ef0165c41b1b36800e2dfc376f7822a49106b8d1f0a87f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_access_sub_port_block_to_access_port/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_cidr",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_cidr/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_cidr/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "50047d8dbfeb8d2015ad34d4174710a4c283c0c63c88a8b80fefb2ad5f7daab9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/aci_cloud_cidr/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616f27a9a7bb49e561ef3782330e18d1a8cea3840e3166e798796684dd546a69",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/network-integration.requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "61902b3c85adc8a2143950820ed906014fbbc48b98f1dcdbc3ea3edf36c84f0a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/target-prefixes.network",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "febb2a0938d28c21b2834600aa14a4878723de041f5f95a9c753dc7fe14794f3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/inventory.networking",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "71c715d3172e5995476fcb005eb7367b04df579567d0ed9c31208de69cf82725",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8a4ac4bfdef88e75d6e748e35a42fb4915947dfa2b7dd788626fd829600e014",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.10.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.9.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/.gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b5726d3ec9335a09c124469eca039523847a6b0f08a083efaefd002b83326600",
+ "format": 1
+ },
+ {
+ "name": "meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "meta/runtime.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "48a2f61c72296aaa190a3ad670b0a5759bd047262b59b3d870e986b05878d87d",
+ "format": 1
+ },
+ {
+ "name": "changelogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs/config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3e20eced2de0cbf27b3220fcf0e10f59ef770591c430effa860ce0ceba6c0cbf",
+ "format": 1
+ },
+ {
+ "name": "changelogs/.gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "919ef00776e7d2ff349950ac4b806132aa9faf006e214d5285de54533e443b33",
+ "format": 1
+ },
+ {
+ "name": "changelogs/.plugin-cache.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8d4a9e6df40c7c8cc866cce31a6f009e8128ecdc478825e04efe176a09bd488b",
+ "format": 1
+ },
+ {
+ "name": "changelogs/changelog.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d54dc2777895e53a8d11e3f4959259db0cb12eb7a5d0407edc08503df4374611",
+ "format": 1
+ },
+ {
+ "name": "README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a92f358d773d20208cf3d33bc9b0c297ee9e097ecf04369b558c9fa0a3ae5b8",
+ "format": 1
+ },
+ {
+ "name": ".gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c407a0218d3e6adafc83a5c5ff8a5df0bd63aa887c414756810efe035ea67e33",
+ "format": 1
+ },
+ {
+ "name": ".github",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": ".github/workflows",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": ".github/workflows/ansible-test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e736c682ce3d31fa3698816eb359042baf3d6e1af46c063d32df17dedc23324d",
+ "format": 1
+ },
+ {
+ "name": "CHANGELOG.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4a13d21a307458494ced0f3b9a0545b08924361fe23ec09b7db7e7b38b0ecb69",
+ "format": 1
+ },
+ {
+ "name": ".vscode",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": ".vscode/settings.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d7f0d7666ed5a63b02508a1d58a523d82f97aeeae83659e2ad4bc33dc2e25070",
+ "format": 1
+ }
+ ],
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/LICENSE b/collections-debian-merged/ansible_collections/cisco/aci/LICENSE
new file mode 100644
index 00000000..e09a4143
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/LICENSE
@@ -0,0 +1,678 @@
+Copyright (c) 2019, Cisco Systems
+All rights reserved.
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/MANIFEST.json b/collections-debian-merged/ansible_collections/cisco/aci/MANIFEST.json
new file mode 100644
index 00000000..594286d9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/MANIFEST.json
@@ -0,0 +1,45 @@
+{
+ "collection_info": {
+ "namespace": "cisco",
+ "name": "aci",
+ "version": "1.1.1",
+ "authors": [
+ "Dag Wieers (@dagwieers) <dag@wieers.com>",
+ "Swetha Chunduri (@schunduri)",
+ "Jacob McGill (@jmcgill298)",
+ "Rob Huelga (@RobW3LGA)",
+ "Bruno Calogero <brunocalogero@hotmail.com>",
+ "Simon Metzger <smnmtzgr@gmail.com>",
+ "Tim Knipper <tim.knipper@gmail.com>",
+ "Apoorva Gururaja (@aciguru)",
+ "Devarshi Shah (@devarshishah3)",
+ "Ramses Smeyers (@rsmeyers)",
+ "Lionel Hercot (@lhercot) <lhercot@cisco.com>"
+ ],
+ "readme": "README.md",
+ "tags": [
+ "cisco",
+ "aci",
+ "cloud",
+ "collection",
+ "networking",
+ "sdn"
+ ],
+ "description": "Ansible Modules for Cisco ACI",
+ "license": [],
+ "license_file": "LICENSE",
+ "dependencies": {},
+ "repository": "https://github.com/CiscoDevNet/ansible-aci",
+ "documentation": "https://docs.ansible.com/ansible/latest/scenario_guides/guide_aci.html",
+ "homepage": "https://github.com/CiscoDevNet/ansible-aci",
+ "issues": "https://github.com/CiscoDevNet/ansible-aci/issues"
+ },
+ "file_manifest_file": {
+ "name": "FILES.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8646ec2754f5caace3ddf61b0105408f918de0ee2664906215c5039c9f8d40d0",
+ "format": 1
+ },
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/README.md b/collections-debian-merged/ansible_collections/cisco/aci/README.md
new file mode 100644
index 00000000..4e5cdf6a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/README.md
@@ -0,0 +1,91 @@
+# ansible-aci
+
+The ansible-aci project provides an Ansible collection for managing and automating your Cisco ACI environment. It consists of a set of modules and roles for performing tasks related to ACI.
+
+This collection has been tested and supports ACI 3.2+.
+Modules supporting new features introduced in ACI API in specific ACI versions might not be supported in earlier ACI releases.
+
+*Note: This collection is not compatible with versions of Ansible before v2.8.*
+
+## Requirements
+Ansible v2.9 or newer
+
+## Install
+Ansible must be installed
+```
+sudo pip install ansible
+```
+
+Install the collection
+```
+ansible-galaxy collection install cisco.aci
+```
+## Use
+Once the collection is installed, you can use it in a playbook by specifying the full namespace path to the module, plugin and/or role.
+
+```
+- hosts: aci
+ gather_facts: no
+
+ tasks:
+ - name: Add a new EPG
+ cisco.aci.aci_epg:
+ hostname: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ ap: intranet
+ epg: web_epg
+ description: Web Intranet EPG
+ bd: prod_bd
+ delegate_to: localhost
+```
+
+## Update
+Getting the latest/nightly collection build
+
+### First Approach
+Clone the ansible-aci repository.
+```
+git clone https://github.com/CiscoDevNet/ansible-aci.git
+```
+
+Go to the ansible-aci directory
+```
+cd ansible-aci
+```
+
+Pull the latest master on your aci
+```
+git pull origin master
+```
+
+Build and Install a collection from source
+```
+ansible-galaxy collection build --force
+ansible-galaxy collection install cisco-aci-* --force
+```
+
+### Second Approach
+Go to: https://github.com/CiscoDevNet/ansible-aci/actions
+
+Select the latest CI build
+
+Under Artifacts download collection and unzip it using Terminal or Console.
+
+*Note: The collection file is a zip file containing a tar.gz file. We recommend using CLI because some GUI-based unarchiver might unarchive both nested archives in one go.*
+
+Install the unarchived tar.gz file
+```
+ansible-galaxy collection install cisco-aci-1.0.0.tar.gz —-force
+```
+
+### See Also:
+
+* [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.
+
+## Contributing to this collection
+
+Ongoing development efforts and contributions to this collection are tracked as issues in this repository.
+
+We welcome community contributions to this collection. If you find problems, need an enhancement or need a new module, please open an issue or create a PR against the [Cisco ACI collection repository](https://github.com/CiscoDevNet/ansible-aci/issues).
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/changelogs/.gitignore b/collections-debian-merged/ansible_collections/cisco/aci/changelogs/.gitignore
new file mode 100644
index 00000000..6be6b533
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/changelogs/.gitignore
@@ -0,0 +1 @@
+/.plugin-cache.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/changelogs/.plugin-cache.yaml b/collections-debian-merged/ansible_collections/cisco/aci/changelogs/.plugin-cache.yaml
new file mode 100644
index 00000000..eeebb8f7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/changelogs/.plugin-cache.yaml
@@ -0,0 +1,444 @@
+plugins:
+ become: {}
+ cache: {}
+ callback: {}
+ cliconf: {}
+ connection: {}
+ httpapi: {}
+ inventory: {}
+ lookup: {}
+ module:
+ aci_aaa_user:
+ description: Manage AAA users (aaa:User)
+ name: aci_aaa_user
+ namespace: ''
+ version_added: null
+ aci_aaa_user_certificate:
+ description: Manage AAA user certificates (aaa:UserCert)
+ name: aci_aaa_user_certificate
+ namespace: ''
+ version_added: null
+ aci_access_port_block_to_access_port:
+ description: Manage port blocks of Fabric interface policy leaf profile interface
+ selectors (infra:HPortS, infra:PortBlk)
+ name: aci_access_port_block_to_access_port
+ namespace: ''
+ version_added: null
+ aci_access_port_to_interface_policy_leaf_profile:
+ description: Manage Fabric interface policy leaf profile interface selectors
+ (infra:HPortS, infra:RsAccBaseGrp, infra:PortBlk)
+ name: aci_access_port_to_interface_policy_leaf_profile
+ namespace: ''
+ version_added: null
+ aci_access_sub_port_block_to_access_port:
+ description: Manage sub port blocks of Fabric interface policy leaf profile
+ interface selectors (infra:HPortS, infra:SubPortBlk)
+ name: aci_access_sub_port_block_to_access_port
+ namespace: ''
+ version_added: null
+ aci_aep:
+ description: Manage attachable Access Entity Profile (AEP) objects (infra:AttEntityP,
+ infra:ProvAcc)
+ name: aci_aep
+ namespace: ''
+ version_added: null
+ aci_aep_to_domain:
+ description: Bind AEPs to Physical or Virtual Domains (infra:RsDomP)
+ name: aci_aep_to_domain
+ namespace: ''
+ version_added: null
+ aci_ap:
+ description: Manage top level Application Profile (AP) objects (fv:Ap)
+ name: aci_ap
+ namespace: ''
+ version_added: null
+ aci_bd:
+ description: Manage Bridge Domains (BD) objects (fv:BD)
+ name: aci_bd
+ namespace: ''
+ version_added: null
+ aci_bd_dhcp_label:
+ description: Manage DHCP Labels (dhcp:Lbl)
+ name: aci_bd_dhcp_label
+ namespace: ''
+ version_added: null
+ aci_bd_subnet:
+ description: Manage Subnets (fv:Subnet)
+ name: aci_bd_subnet
+ namespace: ''
+ version_added: null
+ aci_bd_to_l3out:
+ description: Bind Bridge Domain to L3 Out (fv:RsBDToOut)
+ name: aci_bd_to_l3out
+ namespace: ''
+ version_added: null
+ aci_cloud_cidr:
+ description: Manage CIDR under Cloud Context Profile (cloud:Cidr)
+ name: aci_cloud_cidr
+ namespace: ''
+ version_added: null
+ aci_cloud_ctx_profile:
+ description: Manage Cloud Context Profile (cloud:CtxProfile)
+ name: aci_cloud_ctx_profile
+ namespace: ''
+ version_added: null
+ aci_cloud_provider:
+ description: Query Cloud Provider information (cloud:ProvP)
+ name: aci_cloud_provider
+ namespace: ''
+ version_added: null
+ aci_cloud_region:
+ description: Manage Cloud Providers Region (cloud:Region)
+ name: aci_cloud_region
+ namespace: ''
+ version_added: null
+ aci_cloud_subnet:
+ description: Manage Cloud Subnet (cloud:Subnet)
+ name: aci_cloud_subnet
+ namespace: ''
+ version_added: null
+ aci_cloud_vpn_gateway:
+ description: Manage cloudRouterP in Cloud Context Profile (cloud:cloudRouterP)
+ name: aci_cloud_vpn_gateway
+ namespace: ''
+ version_added: null
+ aci_cloud_zone:
+ description: Manage Cloud Availability Zone (cloud:Zone)
+ name: aci_cloud_zone
+ namespace: ''
+ version_added: null
+ aci_config_rollback:
+ description: Provides rollback and rollback preview functionality (config:ImportP)
+ name: aci_config_rollback
+ namespace: ''
+ version_added: null
+ aci_config_snapshot:
+ description: Manage Config Snapshots (config:Snapshot, config:ExportP)
+ name: aci_config_snapshot
+ namespace: ''
+ version_added: null
+ aci_contract:
+ description: Manage contract resources (vz:BrCP)
+ name: aci_contract
+ namespace: ''
+ version_added: null
+ aci_contract_subject:
+ description: Manage initial Contract Subjects (vz:Subj)
+ name: aci_contract_subject
+ namespace: ''
+ version_added: null
+ aci_contract_subject_to_filter:
+ description: Bind Contract Subjects to Filters (vz:RsSubjFiltAtt)
+ name: aci_contract_subject_to_filter
+ namespace: ''
+ version_added: null
+ aci_domain:
+ description: Manage physical, virtual, bridged, routed or FC domain profiles
+ (phys:DomP, vmm:DomP, l2ext:DomP, l3ext:DomP, fc:DomP)
+ name: aci_domain
+ namespace: ''
+ version_added: null
+ aci_domain_to_encap_pool:
+ description: Bind Domain to Encap Pools (infra:RsVlanNs)
+ name: aci_domain_to_encap_pool
+ namespace: ''
+ version_added: null
+ aci_domain_to_vlan_pool:
+ description: Bind Domain to VLAN Pools (infra:RsVlanNs)
+ name: aci_domain_to_vlan_pool
+ namespace: ''
+ version_added: null
+ aci_encap_pool:
+ description: Manage encap pools (fvns:VlanInstP, fvns:VxlanInstP, fvns:VsanInstP)
+ name: aci_encap_pool
+ namespace: ''
+ version_added: null
+ aci_encap_pool_range:
+ description: Manage encap ranges assigned to pools (fvns:EncapBlk, fvns:VsanEncapBlk)
+ name: aci_encap_pool_range
+ namespace: ''
+ version_added: null
+ aci_epg:
+ description: Manage End Point Groups (EPG) objects (fv:AEPg)
+ name: aci_epg
+ namespace: ''
+ version_added: null
+ aci_epg_monitoring_policy:
+ description: Manage monitoring policies (mon:EPGPol)
+ name: aci_epg_monitoring_policy
+ namespace: ''
+ version_added: null
+ aci_epg_to_contract:
+ description: Bind EPGs to Contracts (fv:RsCons, fv:RsProv)
+ name: aci_epg_to_contract
+ namespace: ''
+ version_added: null
+ aci_epg_to_contract_master:
+ description: Manage End Point Group (EPG) contract master relationships (fv:RsSecInherited)
+ name: aci_epg_to_contract_master
+ namespace: ''
+ version_added: null
+ aci_epg_to_domain:
+ description: Bind EPGs to Domains (fv:RsDomAtt)
+ name: aci_epg_to_domain
+ namespace: ''
+ version_added: null
+ aci_fabric_node:
+ description: Manage Fabric Node Members (fabric:NodeIdentP)
+ name: aci_fabric_node
+ namespace: ''
+ version_added: null
+ aci_fabric_scheduler:
+ description: This modules creates ACI schedulers.
+ name: aci_fabric_scheduler
+ namespace: ''
+ version_added: null
+ aci_filter:
+ description: Manages top level filter objects (vz:Filter)
+ name: aci_filter
+ namespace: ''
+ version_added: null
+ aci_filter_entry:
+ description: Manage filter entries (vz:Entry)
+ name: aci_filter_entry
+ namespace: ''
+ version_added: null
+ aci_firmware_group:
+ description: This module creates a firmware group
+ name: aci_firmware_group
+ namespace: ''
+ version_added: null
+ aci_firmware_group_node:
+ description: This modules adds and remove nodes from the firmware group
+ name: aci_firmware_group_node
+ namespace: ''
+ version_added: null
+ aci_firmware_policy:
+ description: This creates a firmware policy
+ name: aci_firmware_policy
+ namespace: ''
+ version_added: null
+ aci_firmware_source:
+ description: Manage firmware image sources (firmware:OSource)
+ name: aci_firmware_source
+ namespace: ''
+ version_added: null
+ aci_interface_policy_cdp:
+ description: Manage CDP interface policies (cdp:IfPol)
+ name: aci_interface_policy_cdp
+ namespace: ''
+ version_added: null
+ aci_interface_policy_fc:
+ description: Manage Fibre Channel interface policies (fc:IfPol)
+ name: aci_interface_policy_fc
+ namespace: ''
+ version_added: null
+ aci_interface_policy_l2:
+ description: Manage Layer 2 interface policies (l2:IfPol)
+ name: aci_interface_policy_l2
+ namespace: ''
+ version_added: null
+ aci_interface_policy_leaf_breakout_port_group:
+ description: Manage fabric interface policy leaf breakout port group (infra:BrkoutPortGrp)
+ name: aci_interface_policy_leaf_breakout_port_group
+ namespace: ''
+ version_added: null
+ aci_interface_policy_leaf_policy_group:
+ description: Manage fabric interface policy leaf policy groups (infra:AccBndlGrp,
+ infra:AccPortGrp)
+ name: aci_interface_policy_leaf_policy_group
+ namespace: ''
+ version_added: null
+ aci_interface_policy_leaf_profile:
+ description: Manage fabric interface policy leaf profiles (infra:AccPortP)
+ name: aci_interface_policy_leaf_profile
+ namespace: ''
+ version_added: null
+ aci_interface_policy_link_level:
+ description: Manage Link Level interface policies (fabric:HIfPol)
+ name: aci_interface_policy_link_level
+ namespace: ''
+ version_added: null
+ aci_interface_policy_lldp:
+ description: Manage LLDP interface policies (lldp:IfPol)
+ name: aci_interface_policy_lldp
+ namespace: ''
+ version_added: null
+ aci_interface_policy_mcp:
+ description: Manage MCP interface policies (mcp:IfPol)
+ name: aci_interface_policy_mcp
+ namespace: ''
+ version_added: null
+ aci_interface_policy_ospf:
+ description: Manage OSPF interface policies (ospf:IfPol)
+ name: aci_interface_policy_ospf
+ namespace: ''
+ version_added: null
+ aci_interface_policy_port_channel:
+ description: Manage port channel interface policies (lacp:LagPol)
+ name: aci_interface_policy_port_channel
+ namespace: ''
+ version_added: null
+ aci_interface_policy_port_security:
+ description: Manage port security (l2:PortSecurityPol)
+ name: aci_interface_policy_port_security
+ namespace: ''
+ version_added: null
+ aci_interface_selector_to_switch_policy_leaf_profile:
+ description: Bind interface selector profiles to switch policy leaf profiles
+ (infra:RsAccPortP)
+ name: aci_interface_selector_to_switch_policy_leaf_profile
+ namespace: ''
+ version_added: null
+ aci_l2out:
+ description: Manage Layer2 Out (L2Out) objects.
+ name: aci_l2out
+ namespace: ''
+ version_added: null
+ aci_l2out_extepg:
+ description: Manage External Network Instance (L2Out External EPG) objects (l2extInstP).
+ name: aci_l2out_extepg
+ namespace: ''
+ version_added: null
+ aci_l3out:
+ description: Manage Layer 3 Outside (L3Out) objects (l3ext:Out)
+ name: aci_l3out
+ namespace: ''
+ version_added: null
+ aci_l3out_extepg:
+ description: Manage External Network Instance Profile (ExtEpg) objects (l3extInstP:instP)
+ name: aci_l3out_extepg
+ namespace: ''
+ version_added: null
+ aci_l3out_extepg_to_contract:
+ description: Bind Contracts to External End Point Groups (EPGs)
+ name: aci_l3out_extepg_to_contract
+ namespace: ''
+ version_added: null
+ aci_l3out_extsubnet:
+ description: Manage External Subnet objects (l3extSubnet:extsubnet)
+ name: aci_l3out_extsubnet
+ namespace: ''
+ version_added: null
+ aci_l3out_logical_interface_vpc_member:
+ description: Manage Member Node objects (l3extMember:Member)
+ name: aci_l3out_logical_interface_vpc_member
+ namespace: ''
+ version_added: null
+ aci_l3out_route_tag_policy:
+ description: Manage route tag policies (l3ext:RouteTagPol)
+ name: aci_l3out_route_tag_policy
+ namespace: ''
+ version_added: null
+ aci_l3out_static_routes:
+ description: Manage Static routes object (l3ext:ipRouteP)
+ name: aci_l3out_static_routes
+ namespace: ''
+ version_added: null
+ aci_maintenance_group:
+ description: This creates an ACI maintenance group
+ name: aci_maintenance_group
+ namespace: ''
+ version_added: null
+ aci_maintenance_group_node:
+ description: Manage maintenance group nodes
+ name: aci_maintenance_group_node
+ namespace: ''
+ version_added: null
+ aci_maintenance_policy:
+ description: Manage firmware maintenance policies
+ name: aci_maintenance_policy
+ namespace: ''
+ version_added: null
+ aci_rest:
+ description: Direct access to the Cisco APIC REST API
+ name: aci_rest
+ namespace: ''
+ version_added: null
+ aci_static_binding_to_epg:
+ description: Bind static paths to EPGs (fv:RsPathAtt)
+ name: aci_static_binding_to_epg
+ namespace: ''
+ version_added: null
+ aci_switch_leaf_selector:
+ description: Bind leaf selectors to switch policy leaf profiles (infra:LeafS,
+ infra:NodeBlk, infra:RsAccNodePGrep)
+ name: aci_switch_leaf_selector
+ namespace: ''
+ version_added: null
+ aci_switch_policy_leaf_profile:
+ description: Manage switch policy leaf profiles (infra:NodeP)
+ name: aci_switch_policy_leaf_profile
+ namespace: ''
+ version_added: null
+ aci_switch_policy_vpc_protection_group:
+ description: Manage switch policy explicit vPC protection groups (fabric:ExplicitGEp,
+ fabric:NodePEp).
+ name: aci_switch_policy_vpc_protection_group
+ namespace: ''
+ version_added: null
+ aci_system:
+ description: Query the ACI system information (top:System)
+ name: aci_system
+ namespace: ''
+ version_added: null
+ aci_taboo_contract:
+ description: Manage taboo contracts (vz:BrCP)
+ name: aci_taboo_contract
+ namespace: ''
+ version_added: null
+ aci_tenant:
+ description: Manage tenants (fv:Tenant)
+ name: aci_tenant
+ namespace: ''
+ version_added: null
+ aci_tenant_action_rule_profile:
+ description: Manage action rule profiles (rtctrl:AttrP)
+ name: aci_tenant_action_rule_profile
+ namespace: ''
+ version_added: null
+ aci_tenant_ep_retention_policy:
+ description: Manage End Point (EP) retention protocol policies (fv:EpRetPol)
+ name: aci_tenant_ep_retention_policy
+ namespace: ''
+ version_added: null
+ aci_tenant_span_dst_group:
+ description: Manage SPAN destination groups (span:DestGrp)
+ name: aci_tenant_span_dst_group
+ namespace: ''
+ version_added: null
+ aci_tenant_span_src_group:
+ description: Manage SPAN source groups (span:SrcGrp)
+ name: aci_tenant_span_src_group
+ namespace: ''
+ version_added: null
+ aci_tenant_span_src_group_to_dst_group:
+ description: Bind SPAN source groups to destination groups (span:SpanLbl)
+ name: aci_tenant_span_src_group_to_dst_group
+ namespace: ''
+ version_added: null
+ aci_vlan_pool:
+ description: Manage VLAN pools (fvns:VlanInstP)
+ name: aci_vlan_pool
+ namespace: ''
+ version_added: null
+ aci_vlan_pool_encap_block:
+ description: Manage encap blocks assigned to VLAN pools (fvns:EncapBlk)
+ name: aci_vlan_pool_encap_block
+ namespace: ''
+ version_added: null
+ aci_vmm_credential:
+ description: Manage virtual domain credential profiles (vmm:UsrAccP)
+ name: aci_vmm_credential
+ namespace: ''
+ version_added: null
+ aci_vrf:
+ description: Manage contexts or VRFs (fv:Ctx)
+ name: aci_vrf
+ namespace: ''
+ version_added: null
+ netconf: {}
+ shell: {}
+ strategy: {}
+ vars: {}
+version: 1.1.1
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/changelogs/changelog.yaml b/collections-debian-merged/ansible_collections/cisco/aci/changelogs/changelog.yaml
new file mode 100644
index 00000000..a2163676
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/changelogs/changelog.yaml
@@ -0,0 +1,102 @@
+ancestor: null
+releases:
+ 1.0.0:
+ changes:
+ bugfixes:
+ - Fix sanity issues to support 2.10.0
+ - Fix some doc issues for a few modules
+ - Fix some formatting issues (flake8) in unit tests.
+ - Fixing integration tests and sanity. Tested on ACI 4.2(3l).
+ minor_changes:
+ - Add Fex capability to aci_interface_policy_leaf_profile, aci_access_port_to_interface_policy_leaf_profile
+ and aci_access_port_block_to_access_port
+ - Add LICENSE file
+ - Add aci_epg_to_contract_master module
+ - Add annotation attribute to aci.py and to doc fragment.
+ - Add annotation to every payload and add test case for annotation.
+ - Add changelog
+ - Add collection prefix to all integration tests
+ - Add galaxy.yml file for collection listing
+ - Add github action CI pipeline
+ - Add module and test file for aci_bd_dhcp_label
+ - Add modules and test files for aci_cloud_ctx_profile, aci_cloud_cidr, aci_cloud_subnet
+ and aci_cloud_zone
+ - Add modules and test files for aci_l2out, aci_l2out_extepg and aci_l3out_extepg_to_contract
+ - Add names to documentation examples for modules from community.network
+ - Add preferred group support to aci_vrf
+ - Add support for Azure on all cloud modules
+ - Add support for output_path to allow dump of REST API objects
+ - Add support for owner_key and owner_tag for all modules and add test case
+ for it.
+ - Add vpn gateway dedicated module and remove vpn_gateway from cloud_ctx_profile
+ module
+ - Fix M() and module to use FQCN
+ - Initial commit based on the collection migration available at "ansible-collection-migration/cisco.aci"
+ which contains the ACI module from Ansible Core
+ - Move aci.py to base of module_utils and fix references
+ - Move test file to root of tests/unit/module_utils
+ - Update Ansible version in CI and add 2.10.0 to sanity in CI.
+ - Update Readme with supported versions
+ - Update to test files to make the tests work on both 3.2 and 4.2.
+ release_summary: 'This is the first official release of the ``cisco.aci`` collection
+ on 2020-08-18.
+
+ This changelog describes all changes made to the modules and plugins included
+ in this collection since Ansible 2.9.0.
+
+ '
+ release_date: '2020-08-18'
+ 1.0.1:
+ changes:
+ bugfixes:
+ - Fix convertion of json/yaml payload to xml in aci_rest
+ - Fix dump of config for aci_rest
+ - Fix issue of "current" in firmware_source module
+ - Fix sanity issue in aci_rest and bump version to v1.0.1
+ minor_changes:
+ - Enable/Disable infra vlan in aci_aep and its test module
+ - Set scope default value in aci_l3out_extsubnet
+ release_summary: 'Release v1.0.1 of the ``cisco.mso`` collection on 2020-10-13.
+
+ This changelog describes all changes made to the modules and plugins included
+ in this collection since v1.0.0. '
+ release_date: '2020-10-13'
+ 1.1.0:
+ changes:
+ bugfixes:
+ - Existing_config variable is not reset during loop
+ - Fix galaxy import warnings
+ - Fix how validity of private key/private key file is checked to support new
+ types
+ - Fix incorrect domain types in aci_domain_to_encap_pool module
+ minor_changes:
+ - Ability to add monitoring policy to epgs and anps
+ - Add Ansible Network ENV to fallback
+ - Add aci_l3out_external_path_to_member.py & aci_l3out_static_routes modules
+ - Add env_fallback for common connection params
+ - Add env_fallback for the rest of the argument spec
+ - Add new Subclass path support
+ - Add new module and test file for leaf breakout port group
+ - Added failure message to aci_interface_policy_leaf_policy_group
+ - Update README.md
+ - Update inventory
+ - aci_epg_to_domain addition of promiscuous mode (#79)
+ - aci_interface_policy_port_security addition of attribute:timeout (#80)
+ release_summary: 'Release v1.1.0 of the ``cisco.mso`` collection on 2020-10-30.
+
+ This changelog describes all changes made to the modules and plugins included
+ in this collection since v1.0.1. '
+ release_date: '2020-10-30'
+ 1.1.1:
+ changes:
+ bugfixes:
+ - Fix galaxy import warnings
+ - Fix sanity issue in aci_epg_to_domain
+ minor_changes:
+ - Add test file for aci_domain_to_encap_pool
+ - aci_epg_to_domain moving child configs & classes to each domain type
+ release_summary: 'Release v1.1.1 of the ``cisco.mso`` collection on 2020-11-23.
+
+ This changelog describes all changes made to the modules and plugins included
+ in this collection since v1.1.0. '
+ release_date: '2020-11-23'
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/changelogs/config.yaml b/collections-debian-merged/ansible_collections/cisco/aci/changelogs/config.yaml
new file mode 100644
index 00000000..1d6198ea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/changelogs/config.yaml
@@ -0,0 +1,31 @@
+changelog_filename_template: ../CHANGELOG.rst
+changelog_filename_version_depth: 0
+changes_file: changelog.yaml
+changes_format: combined
+ignore_other_fragment_extensions: true
+keep_fragments: false
+mention_ancestor: true
+new_plugins_after_name: removed_features
+notesdir: fragments
+prelude_section_name: release_summary
+prelude_section_title: Release Summary
+sections:
+- - major_changes
+ - Major Changes
+- - minor_changes
+ - Minor Changes
+- - breaking_changes
+ - Breaking Changes / Porting Guide
+- - deprecated_features
+ - Deprecated Features
+- - removed_features
+ - Removed Features (previously deprecated)
+- - security_fixes
+ - Security Fixes
+- - bugfixes
+ - Bugfixes
+- - known_issues
+ - Known Issues
+title: Cisco ACI Ansible Collection
+trivial_section_name: trivial
+use_fqcn: true
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/meta/runtime.yml b/collections-debian-merged/ansible_collections/cisco/aci/meta/runtime.yml
new file mode 100644
index 00000000..1f18fd72
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/meta/runtime.yml
@@ -0,0 +1,2 @@
+---
+requires_ansible: '>=2.9.10' \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/doc_fragments/__init__.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/doc_fragments/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/doc_fragments/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/doc_fragments/aci.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/doc_fragments/aci.py
new file mode 100644
index 00000000..38266656
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/doc_fragments/aci.py
@@ -0,0 +1,120 @@
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2017, Swetha Chunduri (@schunduri)
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+
+class ModuleDocFragment(object):
+ # Standard files documentation fragment
+ DOCUMENTATION = r'''
+options:
+ host:
+ description:
+ - IP Address or hostname of APIC resolvable by Ansible control host.
+ - If the value is not specified in the task, the value of environment variable C(ACI_HOST) will be used instead.
+ type: str
+ required: yes
+ aliases: [ hostname ]
+ port:
+ description:
+ - Port number to be used for REST connection.
+ - The default value depends on parameter C(use_ssl).
+ - If the value is not specified in the task, the value of environment variable C(ACI_PORT) will be used instead.
+ type: int
+ username:
+ description:
+ - The username to use for authentication.
+ - If the value is not specified in the task, the value of environment variables C(ACI_USERNAME) or C(ANSIBLE_NET_USERNAME) will be used instead.
+ type: str
+ default: admin
+ aliases: [ user ]
+ password:
+ description:
+ - The password to use for authentication.
+ - This option is mutual exclusive with C(private_key). If C(private_key) is provided too, it will be used instead.
+ - If the value is not specified in the task, the value of environment variables C(ACI_PASSWORD) or C(ANSIBLE_NET_PASSWORD) will be used instead.
+ type: str
+ private_key:
+ description:
+ - Either a PEM-formatted private key file or the private key content used for signature-based authentication.
+ - This value also influences the default C(certificate_name) that is used.
+ - This option is mutual exclusive with C(password). If C(password) is provided too, it will be ignored.
+ - If the value is not specified in the task, the value of environment variable C(ACI_PRIVATE_KEY) will be used instead.
+ type: str
+ aliases: [ cert_key ]
+ certificate_name:
+ description:
+ - The X.509 certificate name attached to the APIC AAA user used for signature-based authentication.
+ - If a C(private_key) filename was provided, this defaults to the C(private_key) basename, without extension.
+ - If PEM-formatted content was provided for C(private_key), this defaults to the C(username) value.
+ - If the value is not specified in the task, the value of environment variable C(ACI_CERTIFICATE_NAME) will be used instead.
+ type: str
+ aliases: [ cert_name ]
+ output_level:
+ description:
+ - Influence the output of this ACI module.
+ - C(normal) means the standard output, incl. C(current) dict
+ - C(info) adds informational output, incl. C(previous), C(proposed) and C(sent) dicts
+ - C(debug) adds debugging output, incl. C(filter_string), C(method), C(response), C(status) and C(url) information
+ - If the value is not specified in the task, the value of environment variable C(ACI_OUTPUT_LEVEL) will be used instead.
+ type: str
+ choices: [ debug, info, normal ]
+ default: normal
+ timeout:
+ description:
+ - The socket level timeout in seconds.
+ - If the value is not specified in the task, the value of environment variable C(ACI_TIMEOUT) will be used instead.
+ type: int
+ default: 30
+ use_proxy:
+ description:
+ - If C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+ - If the value is not specified in the task, the value of environment variable C(ACI_USE_PROXY) will be used instead.
+ type: bool
+ default: yes
+ use_ssl:
+ description:
+ - If C(no), an HTTP connection will be used instead of the default HTTPS connection.
+ - If the value is not specified in the task, the value of environment variable C(ACI_USE_SSL) will be used instead.
+ type: bool
+ default: yes
+ validate_certs:
+ description:
+ - If C(no), SSL certificates will not be validated.
+ - This should only set to C(no) when used on personally controlled sites using self-signed certificates.
+ - If the value is not specified in the task, the value of environment variable C(ACI_VALIDATE_CERTS) will be used instead.
+ type: bool
+ default: yes
+ output_path:
+ description:
+ - Path to a file that will be used to dump the ACI JSON configuration objects generated by the module.
+ - If the value is not specified in the task, the value of environment variable C(ACI_OUTPUT_PATH) will be used instead.
+ type: str
+ annotation:
+ description:
+ - User-defined string for annotating an object.
+ - If the value is not specified in the task, the value of environment variable C(ACI_ANNOTATION) will be used instead.
+ type: str
+ owner_key:
+ description:
+ - User-defined string for the ownerKey attribute of an ACI object.
+ - This attribute represents a key for enabling clients to own their data for entity correlation.
+ - If the value is not specified in the task, the value of environment variable C(ACI_OWNER_KEY) will be used instead.
+ type: str
+ owner_tag:
+ description:
+ - User-defined string for the ownerTag attribute of an ACI object.
+ - This attribute represents a tag for enabling clients to add their own data.
+ - For example, to indicate who created this object.
+ - If the value is not specified in the task, the value of environment variable C(ACI_OWNER_TAG) will be used instead.
+ type: str
+seealso:
+- ref: aci_guide
+ description: Detailed information on how to manage your ACI infrastructure using Ansible.
+- ref: aci_dev_guide
+ description: Detailed guide on how to write your own Cisco ACI modules to contribute.
+'''
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/module_utils/__init__.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/module_utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/module_utils/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/module_utils/aci.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/module_utils/aci.py
new file mode 100644
index 00000000..9e0759f1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/module_utils/aci.py
@@ -0,0 +1,1336 @@
+# -*- coding: utf-8 -*-
+
+# This code is part of Ansible, but is an independent component
+
+# This particular file snippet, and this file snippet only, is BSD licensed.
+# Modules you write using this snippet, which is embedded dynamically by Ansible
+# still belong to the author of the module, and may assign their own license
+# to the complete work.
+
+# Copyright: (c) 2017, Dag Wieers <dag@wieers.com>
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+# Copyright: (c) 2017, Swetha Chunduri (@schunduri)
+# Copyright: (c) 2019, Rob Huelga (@RobW3LGA)
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# All rights reserved.
+
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import base64
+import json
+import os
+from copy import deepcopy
+
+from ansible.module_utils.urls import fetch_url
+from ansible.module_utils._text import to_bytes, to_native
+from ansible.module_utils.basic import env_fallback
+
+# Optional, only used for APIC signature-based authentication
+try:
+ from OpenSSL.crypto import FILETYPE_PEM, load_privatekey, sign
+ HAS_OPENSSL = True
+except ImportError:
+ HAS_OPENSSL = False
+
+# Optional, only used for XML payload
+try:
+ import lxml.etree
+ HAS_LXML_ETREE = True
+except ImportError:
+ HAS_LXML_ETREE = False
+
+# Optional, only used for XML payload
+try:
+ from xmljson import cobra
+ HAS_XMLJSON_COBRA = True
+except ImportError:
+ HAS_XMLJSON_COBRA = False
+
+
+def aci_argument_spec():
+ return dict(
+ host=dict(type='str', required=True, aliases=['hostname'], fallback=(env_fallback, ['ACI_HOST'])),
+ port=dict(type='int', required=False, fallback=(env_fallback, ['ACI_PORT'])),
+ username=dict(type='str', default='admin', aliases=['user'], fallback=(env_fallback, ['ACI_USERNAME', 'ANSIBLE_NET_USERNAME'])),
+ password=dict(type='str', no_log=True, fallback=(env_fallback, ['ACI_PASSWORD', 'ANSIBLE_NET_PASSWORD'])),
+ # Beware, this is not the same as client_key !
+ private_key=dict(type='str', aliases=['cert_key'], no_log=True, fallback=(env_fallback, ['ACI_PRIVATE_KEY'])),
+ # Beware, this is not the same as client_cert !
+ certificate_name=dict(type='str', aliases=['cert_name'], fallback=(env_fallback, ['ACI_CERTIFICATE_NAME'])),
+ output_level=dict(type='str', default='normal', choices=['debug', 'info', 'normal'], fallback=(env_fallback, ['ACI_OUTPUT_LEVEL'])),
+ timeout=dict(type='int', default=30, fallback=(env_fallback, ['ACI_TIMEOUT'])),
+ use_proxy=dict(type='bool', default=True, fallback=(env_fallback, ['ACI_USE_PROXY'])),
+ use_ssl=dict(type='bool', default=True, fallback=(env_fallback, ['ACI_USE_SSL'])),
+ validate_certs=dict(type='bool', default=True, fallback=(env_fallback, ['ACI_VALIDATE_CERTS'])),
+ output_path=dict(type='str', fallback=(env_fallback, ['ACI_OUTPUT_PATH'])),
+ annotation=dict(type='str', fallback=(env_fallback, ['ACI_ANNOTATION'])),
+ owner_key=dict(type='str', fallback=(env_fallback, ['ACI_OWNER_KEY'])),
+ owner_tag=dict(type='str', fallback=(env_fallback, ['ACI_OWNER_TAG'])),
+ )
+
+
+class ACIModule(object):
+
+ def __init__(self, module):
+ self.module = module
+ self.params = module.params
+ self.result = dict(changed=False)
+ self.headers = dict()
+ self.child_classes = set()
+
+ # error output
+ self.error = dict(code=None, text=None)
+
+ # normal output
+ self.existing = None
+
+ # info output
+ self.config = dict()
+ self.original = None
+ self.proposed = dict()
+ self.stdout = None
+
+ # debug output
+ self.filter_string = ''
+ self.obj_filter = None
+ self.method = None
+ self.path = None
+ self.response = None
+ self.status = None
+ self.url = None
+
+ # aci_rest output
+ self.imdata = None
+ self.totalCount = None
+
+ # Ensure protocol is set
+ self.define_protocol()
+
+ if self.module._debug:
+ self.module.warn('Enable debug output because ANSIBLE_DEBUG was set.')
+ self.params['output_level'] = 'debug'
+
+ if self.params.get('private_key'):
+ # Perform signature-based authentication, no need to log on separately
+ if not HAS_OPENSSL:
+ self.module.fail_json(msg='Cannot use signature-based authentication because pyopenssl is not available')
+ elif self.params.get('password') is not None:
+ self.module.warn("When doing ACI signatured-based authentication, providing parameter 'password' is not required")
+ elif self.params.get('password'):
+ # Perform password-based authentication, log on using password
+ self.login()
+ else:
+ self.module.fail_json(msg="Either parameter 'password' or 'private_key' is required for authentication")
+
+ def boolean(self, value, true='yes', false='no'):
+ ''' Return an acceptable value back '''
+
+ # When we expect value is of type=bool
+ if value is None:
+ return None
+ elif value is True:
+ return true
+ elif value is False:
+ return false
+
+ # If all else fails, escalate back to user
+ self.module.fail_json(msg="Boolean value '%s' is an invalid ACI boolean value.")
+
+ def iso8601_format(self, dt):
+ ''' Return an ACI-compatible ISO8601 formatted time: 2123-12-12T00:00:00.000+00:00 '''
+ try:
+ return dt.isoformat(timespec='milliseconds')
+ except Exception:
+ tz = dt.strftime('%z')
+ return '%s.%03d%s:%s' % (dt.strftime('%Y-%m-%dT%H:%M:%S'), dt.microsecond / 1000, tz[:3], tz[3:])
+
+ def define_protocol(self):
+ ''' Set protocol based on use_ssl parameter '''
+
+ # Set protocol for further use
+ self.params['protocol'] = 'https' if self.params.get('use_ssl', True) else 'http'
+
+ def define_method(self):
+ ''' Set method based on state parameter '''
+
+ # Set method for further use
+ state_map = dict(absent='delete', present='post', query='get')
+ self.params['method'] = state_map.get(self.params.get('state'))
+
+ def login(self):
+ ''' Log in to APIC '''
+
+ # Perform login request
+ if self.params.get('port') is not None:
+ url = '%(protocol)s://%(host)s:%(port)s/api/aaaLogin.json' % self.params
+ else:
+ url = '%(protocol)s://%(host)s/api/aaaLogin.json' % self.params
+ payload = {'aaaUser': {'attributes': {'name': self.params.get('username'), 'pwd': self.params.get('password')}}}
+ resp, auth = fetch_url(self.module, url,
+ data=json.dumps(payload),
+ method='POST',
+ timeout=self.params.get('timeout'),
+ use_proxy=self.params.get('use_proxy'))
+
+ # Handle APIC response
+ if auth.get('status') != 200:
+ self.response = auth.get('msg')
+ self.status = auth.get('status')
+ try:
+ # APIC error
+ self.response_json(auth['body'])
+ self.fail_json(msg='Authentication failed: %(code)s %(text)s' % self.error)
+ except KeyError:
+ # Connection error
+ self.fail_json(msg='Connection failed for %(url)s. %(msg)s' % auth)
+
+ # Retain cookie for later use
+ self.headers['Cookie'] = resp.headers.get('Set-Cookie')
+
+ def cert_auth(self, path=None, payload='', method=None):
+ ''' Perform APIC signature-based authentication, not the expected SSL client certificate authentication. '''
+
+ if method is None:
+ method = self.params.get('method').upper()
+
+ # NOTE: ACI documentation incorrectly uses complete URL
+ if path is None:
+ path = self.path
+ path = '/' + path.lstrip('/')
+
+ if payload is None:
+ payload = ''
+
+ # Check if we got a private key. This allows the use of vaulting the private key.
+ try:
+ sig_key = load_privatekey(FILETYPE_PEM, self.params.get('private_key'))
+ except Exception:
+ if os.path.exists(self.params.get('private_key')):
+ try:
+ with open(self.params.get('private_key'), 'r') as fh:
+ private_key_content = fh.read()
+ except Exception:
+ self.module.fail_json(msg="Cannot open private key file '%(private_key)s'." % self.params)
+ try:
+ sig_key = load_privatekey(FILETYPE_PEM, private_key_content)
+ except Exception:
+ self.module.fail_json(msg="Cannot load private key file '%(private_key)s'." % self.params)
+ if self.params.get('certificate_name') is None:
+ self.params['certificate_name'] = os.path.basename(os.path.splitext(self.params.get('private_key'))[0])
+ else:
+ self.module.fail_json(msg="Provided private key '%(private_key)s' does not appear to be a private key." % self.params)
+
+ if self.params.get('certificate_name') is None:
+ self.params['certificate_name'] = self.params.get('username')
+ # NOTE: ACI documentation incorrectly adds a space between method and path
+ sig_request = method + path + payload
+ sig_signature = base64.b64encode(sign(sig_key, sig_request, 'sha256'))
+ sig_dn = 'uni/userext/user-%(username)s/usercert-%(certificate_name)s' % self.params
+ self.headers['Cookie'] = 'APIC-Certificate-Algorithm=v1.0; ' +\
+ 'APIC-Certificate-DN=%s; ' % sig_dn +\
+ 'APIC-Certificate-Fingerprint=fingerprint; ' +\
+ 'APIC-Request-Signature=%s' % to_native(sig_signature)
+
+ def response_json(self, rawoutput):
+ ''' Handle APIC JSON response output '''
+ try:
+ jsondata = json.loads(rawoutput)
+ except Exception as e:
+ # Expose RAW output for troubleshooting
+ self.error = dict(code=-1, text="Unable to parse output as JSON, see 'raw' output. %s" % e)
+ self.result['raw'] = rawoutput
+ return
+
+ # Extract JSON API output
+ self.imdata = jsondata.get('imdata')
+ if self.imdata is None:
+ self.imdata = dict()
+ self.totalCount = int(jsondata.get('totalCount'))
+
+ # Handle possible APIC error information
+ self.response_error()
+
+ def response_xml(self, rawoutput):
+ ''' Handle APIC XML response output '''
+
+ # NOTE: The XML-to-JSON conversion is using the "Cobra" convention
+ try:
+ xml = lxml.etree.fromstring(to_bytes(rawoutput))
+ xmldata = cobra.data(xml)
+ except Exception as e:
+ # Expose RAW output for troubleshooting
+ self.error = dict(code=-1, text="Unable to parse output as XML, see 'raw' output. %s" % e)
+ self.result['raw'] = rawoutput
+ return
+
+ # Reformat as ACI does for JSON API output
+ self.imdata = xmldata.get('imdata', {}).get('children')
+ if self.imdata is None:
+ self.imdata = dict()
+ self.totalCount = int(xmldata.get('imdata', {}).get('attributes', {}).get('totalCount'))
+
+ # Handle possible APIC error information
+ self.response_error()
+
+ def response_error(self):
+ ''' Set error information when found '''
+
+ # Handle possible APIC error information
+ if self.totalCount != '0':
+ try:
+ self.error = self.imdata[0].get('error').get('attributes')
+ except (AttributeError, IndexError, KeyError):
+ pass
+
+ def request(self, path, payload=None):
+ ''' Perform a REST request '''
+
+ # Ensure method is set (only do this once)
+ self.define_method()
+ self.path = path
+
+ if self.params.get('port') is not None:
+ self.url = '%(protocol)s://%(host)s:%(port)s/' % self.params + path.lstrip('/')
+ else:
+ self.url = '%(protocol)s://%(host)s/' % self.params + path.lstrip('/')
+
+ # Sign and encode request as to APIC's wishes
+ if self.params.get('private_key'):
+ self.cert_auth(path=path, payload=payload)
+
+ # Perform request
+ resp, info = fetch_url(self.module, self.url,
+ data=payload,
+ headers=self.headers,
+ method=self.params.get('method').upper(),
+ timeout=self.params.get('timeout'),
+ use_proxy=self.params.get('use_proxy'))
+
+ self.response = info.get('msg')
+ self.status = info.get('status')
+
+ # Handle APIC response
+ if info.get('status') != 200:
+ try:
+ # APIC error
+ self.response_json(info['body'])
+ self.fail_json(msg='APIC Error %(code)s: %(text)s' % self.error)
+ except KeyError:
+ # Connection error
+ self.fail_json(msg='Connection failed for %(url)s. %(msg)s' % info)
+
+ self.response_json(resp.read())
+
+ def query(self, path):
+ ''' Perform a query with no payload '''
+
+ self.path = path
+
+ if self.params.get('port') is not None:
+ self.url = '%(protocol)s://%(host)s:%(port)s/' % self.params + path.lstrip('/')
+ else:
+ self.url = '%(protocol)s://%(host)s/' % self.params + path.lstrip('/')
+
+ # Sign and encode request as to APIC's wishes
+ if self.params.get('private_key'):
+ self.cert_auth(path=path, method='GET')
+
+ # Perform request
+ resp, query = fetch_url(self.module, self.url,
+ data=None,
+ headers=self.headers,
+ method='GET',
+ timeout=self.params.get('timeout'),
+ use_proxy=self.params.get('use_proxy'))
+
+ # Handle APIC response
+ if query.get('status') != 200:
+ self.response = query.get('msg')
+ self.status = query.get('status')
+ try:
+ # APIC error
+ self.response_json(query['body'])
+ self.fail_json(msg='APIC Error %(code)s: %(text)s' % self.error)
+ except KeyError:
+ # Connection error
+ self.fail_json(msg='Connection failed for %(url)s. %(msg)s' % query)
+
+ query = json.loads(resp.read())
+
+ return json.dumps(query.get('imdata'), sort_keys=True, indent=2) + '\n'
+
+ def request_diff(self, path, payload=None):
+ ''' Perform a request, including a proper diff output '''
+ self.result['diff'] = dict()
+ self.result['diff']['before'] = self.query(path)
+ self.request(path, payload=payload)
+ # TODO: Check if we can use the request output for the 'after' diff
+ self.result['diff']['after'] = self.query(path)
+
+ if self.result.get('diff', {}).get('before') != self.result.get('diff', {}).get('after'):
+ self.result['changed'] = True
+
+ # TODO: This could be designed to update existing keys
+ def update_qs(self, params):
+ ''' Append key-value pairs to self.filter_string '''
+ accepted_params = dict((k, v) for (k, v) in params.items() if v is not None)
+ if accepted_params:
+ if self.filter_string:
+ self.filter_string += '&'
+ else:
+ self.filter_string = '?'
+ self.filter_string += '&'.join(['%s=%s' % (k, v) for (k, v) in accepted_params.items()])
+
+ # TODO: This could be designed to accept multiple obj_classes and keys
+ def build_filter(self, obj_class, params):
+ ''' Build an APIC filter based on obj_class and key-value pairs '''
+ accepted_params = dict((k, v) for (k, v) in params.items() if v is not None)
+ if len(accepted_params) == 1:
+ return ','.join('eq({0}.{1},"{2}")'.format(obj_class, k, v) for (k, v) in accepted_params.items())
+ elif len(accepted_params) > 1:
+ return 'and(' + ','.join(['eq({0}.{1},"{2}")'.format(obj_class, k, v) for (k, v) in accepted_params.items()]) + ')'
+
+ def _deep_url_path_builder(self, obj):
+ target_class = obj.get('target_class')
+ target_filter = obj.get('target_filter')
+ subtree_class = obj.get('subtree_class')
+ subtree_filter = obj.get('subtree_filter')
+ object_rn = obj.get('object_rn')
+ mo = obj.get('module_object')
+ add_subtree_filter = obj.get('add_subtree_filter')
+ add_target_filter = obj.get('add_target_filter')
+
+ if self.module.params.get('state') in ('absent', 'present') and mo is not None:
+ self.path = 'api/mo/uni/{0}.json'.format(object_rn)
+ self.update_qs({'rsp-prop-include': 'config-only'})
+
+ else:
+ # State is 'query'
+ if object_rn is not None:
+ # Query for a specific object in the module's class
+ self.path = 'api/mo/uni/{0}.json'.format(object_rn)
+ else:
+ self.path = 'api/class/{0}.json'.format(target_class)
+
+ if add_target_filter:
+ self.update_qs(
+ {'query-target-filter': self.build_filter(target_class, target_filter)})
+
+ if add_subtree_filter:
+ self.update_qs(
+ {'rsp-subtree-filter': self.build_filter(subtree_class, subtree_filter)})
+
+ if self.params.get('port') is not None:
+ self.url = '{protocol}://{host}:{port}/{path}'.format(
+ path=self.path, **self.module.params)
+
+ else:
+ self.url = '{protocol}://{host}/{path}'.format(
+ path=self.path, **self.module.params)
+
+ if self.child_classes:
+ self.update_qs(
+ {'rsp-subtree': 'full', 'rsp-subtree-class': ','.join(sorted(self.child_classes))})
+
+ def _deep_url_parent_object(self, parent_objects, parent_class):
+
+ for parent_object in parent_objects:
+ if parent_object.get('aci_class') is parent_class:
+ return parent_object
+
+ return None
+
+ def construct_deep_url(self, target_object, parent_objects=None, child_classes=None):
+ """
+ This method is used to retrieve the appropriate URL path and filter_string to make the request to the APIC.
+
+ :param target_object: The target class dictionary containing parent_class, aci_class, aci_rn, target_filter, and module_object keys.
+ :param parent_objects: The parent class list of dictionaries containing parent_class, aci_class, aci_rn, target_filter, and module_object keys.
+ :param child_classes: The list of child classes that the module supports along with the object.
+ :type target_object: dict
+ :type parent_objects: list[dict]
+ :type child_classes: list[string]
+ :return: The path and filter_string needed to build the full URL.
+ """
+
+ self.filter_string = ''
+ rn_builder = None
+ subtree_classes = None
+ add_subtree_filter = False
+ add_target_filter = False
+ has_target_query = False
+ has_target_query_compare = False
+ has_target_query_difference = False
+ has_target_query_called = False
+
+ if child_classes is None:
+ self.child_classes = set()
+ else:
+ self.child_classes = set(child_classes)
+
+ target_parent_class = target_object.get('parent_class')
+ target_class = target_object.get('aci_class')
+ target_rn = target_object.get('aci_rn')
+ target_filter = target_object.get('target_filter')
+ target_module_object = target_object.get('module_object')
+
+ url_path_object = dict(
+ target_class=target_class,
+ target_filter=target_filter,
+ subtree_class=target_class,
+ subtree_filter=target_filter,
+ module_object=target_module_object
+ )
+
+ if target_module_object is not None:
+ rn_builder = target_rn
+ else:
+ has_target_query = True
+ has_target_query_compare = True
+
+ if parent_objects is not None:
+ current_parent_class = target_parent_class
+ has_parent_query_compare = False
+ has_parent_query_difference = False
+ is_first_parent = True
+ is_single_parent = None
+ search_classes = set()
+
+ while current_parent_class != 'uni':
+ parent_object = self._deep_url_parent_object(
+ parent_objects=parent_objects, parent_class=current_parent_class)
+
+ if parent_object is not None:
+ parent_parent_class = parent_object.get('parent_class')
+ parent_class = parent_object.get('aci_class')
+ parent_rn = parent_object.get('aci_rn')
+ parent_filter = parent_object.get('target_filter')
+ parent_module_object = parent_object.get('module_object')
+
+ if is_first_parent:
+ is_single_parent = True
+ else:
+ is_single_parent = False
+ is_first_parent = False
+
+ if parent_parent_class != 'uni':
+ search_classes.add(parent_class)
+
+ if parent_module_object is not None:
+ if rn_builder is not None:
+ rn_builder = '{0}/{1}'.format(parent_rn, rn_builder)
+ else:
+ rn_builder = parent_rn
+
+ url_path_object['target_class'] = parent_class
+ url_path_object['target_filter'] = parent_filter
+
+ has_target_query = False
+ else:
+ rn_builder = None
+ subtree_classes = search_classes
+
+ has_target_query = True
+ if is_single_parent:
+ has_parent_query_compare = True
+
+ current_parent_class = parent_parent_class
+ else:
+ raise ValueError("Reference error for parent_class '{0}'. Each parent_class must reference a valid object".format(current_parent_class))
+
+ if not has_target_query_difference and not has_target_query_called:
+ if has_target_query is not has_target_query_compare:
+ has_target_query_difference = True
+ else:
+ if not has_parent_query_difference and has_target_query is not has_parent_query_compare:
+ has_parent_query_difference = True
+ has_target_query_called = True
+
+ if not has_parent_query_difference and has_parent_query_compare and target_module_object is not None:
+ add_target_filter = True
+
+ elif has_parent_query_difference and target_module_object is not None:
+ add_subtree_filter = True
+ self.child_classes.add(target_class)
+
+ if has_target_query:
+ add_target_filter = True
+
+ elif has_parent_query_difference and not has_target_query and target_module_object is None:
+ self.child_classes.add(target_class)
+ self.child_classes.update(subtree_classes)
+
+ elif not has_parent_query_difference and not has_target_query and target_module_object is None:
+ self.child_classes.add(target_class)
+
+ elif not has_target_query and is_single_parent and target_module_object is None:
+ self.child_classes.add(target_class)
+
+ url_path_object['object_rn'] = rn_builder
+ url_path_object['add_subtree_filter'] = add_subtree_filter
+ url_path_object['add_target_filter'] = add_target_filter
+
+ self._deep_url_path_builder(url_path_object)
+
+ def construct_url(
+ self, root_class, subclass_1=None, subclass_2=None, subclass_3=None,
+ subclass_4=None, subclass_5=None, child_classes=None, config_only=True):
+
+ """
+ This method is used to retrieve the appropriate URL path and filter_string to make the request to the APIC.
+
+ :param root_class: The top-level class dictionary containing aci_class, aci_rn, target_filter, and module_object keys.
+ :param sublass_1: The second-level class dictionary containing aci_class, aci_rn, target_filter, and module_object keys.
+ :param sublass_2: The third-level class dictionary containing aci_class, aci_rn, target_filter, and module_object keys.
+ :param sublass_3: The fourth-level class dictionary containing aci_class, aci_rn, target_filter, and module_object keys.
+ :param child_classes: The list of child classes that the module supports along with the object.
+ :type root_class: dict
+ :type subclass_1: dict
+ :type subclass_2: dict
+ :type subclass_3: dict
+ :type subclass_4: dict
+ :type subclass_5: dict
+ :type child_classes: list
+ :return: The path and filter_string needed to build the full URL.
+ """
+ self.filter_string = ''
+
+ if child_classes is None:
+ self.child_classes = set()
+ else:
+ self.child_classes = set(child_classes)
+
+ if subclass_5 is not None:
+ self._construct_url_6(root_class, subclass_1, subclass_2, subclass_3, subclass_4, subclass_5, config_only)
+ elif subclass_4 is not None:
+ self._construct_url_5(root_class, subclass_1, subclass_2, subclass_3, subclass_4, config_only)
+ elif subclass_3 is not None:
+ self._construct_url_4(root_class, subclass_1, subclass_2, subclass_3, config_only)
+ elif subclass_2 is not None:
+ self._construct_url_3(root_class, subclass_1, subclass_2, config_only)
+ elif subclass_1 is not None:
+ self._construct_url_2(root_class, subclass_1, config_only)
+ else:
+ self._construct_url_1(root_class, config_only)
+
+ if self.params.get('port') is not None:
+ self.url = '{protocol}://{host}:{port}/{path}'.format(path=self.path, **self.module.params)
+ else:
+ self.url = '{protocol}://{host}/{path}'.format(path=self.path, **self.module.params)
+
+ if self.child_classes:
+ # Append child_classes to filter_string if filter string is empty
+ self.update_qs({'rsp-subtree': 'full', 'rsp-subtree-class': ','.join(sorted(self.child_classes))})
+
+ def _construct_url_1(self, obj, config_only=True):
+ """
+ This method is used by construct_url when the object is the top-level class.
+ """
+ obj_class = obj.get('aci_class')
+ obj_rn = obj.get('aci_rn')
+ obj_filter = obj.get('target_filter')
+ mo = obj.get('module_object')
+
+ if self.module.params.get('state') in ('absent', 'present'):
+ # State is absent or present
+ self.path = 'api/mo/uni/{0}.json'.format(obj_rn)
+ if config_only:
+ self.update_qs({'rsp-prop-include': 'config-only'})
+ self.obj_filter = obj_filter
+ elif mo is None:
+ # Query for all objects of the module's class (filter by properties)
+ self.path = 'api/class/{0}.json'.format(obj_class)
+ if obj_filter is not None:
+ self.update_qs({'query-target-filter': self.build_filter(obj_class, obj_filter)})
+ else:
+ # Query for a specific object in the module's class
+ self.path = 'api/mo/uni/{0}.json'.format(obj_rn)
+
+ def _construct_url_2(self, parent, obj, config_only=True):
+ """
+ This method is used by construct_url when the object is the second-level class.
+ """
+ parent_rn = parent.get('aci_rn')
+ parent_obj = parent.get('module_object')
+ obj_class = obj.get('aci_class')
+ obj_rn = obj.get('aci_rn')
+ obj_filter = obj.get('target_filter')
+ mo = obj.get('module_object')
+
+ if self.module.params.get('state') in ('absent', 'present'):
+ # State is absent or present
+ self.path = 'api/mo/uni/{0}/{1}.json'.format(parent_rn, obj_rn)
+ if config_only:
+ self.update_qs({'rsp-prop-include': 'config-only'})
+ self.obj_filter = obj_filter
+ elif parent_obj is None and mo is None:
+ # Query for all objects of the module's class
+ self.path = 'api/class/{0}.json'.format(obj_class)
+ self.update_qs({'query-target-filter': self.build_filter(obj_class, obj_filter)})
+ elif parent_obj is None: # mo is known
+ # Query for all objects of the module's class that match the provided ID value
+ self.path = 'api/class/{0}.json'.format(obj_class)
+ self.update_qs({'query-target-filter': self.build_filter(obj_class, obj_filter)})
+ elif mo is None: # parent_obj is known
+ # Query for all object's of the module's class that belong to a specific parent object
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}.json'.format(parent_rn)
+ else:
+ # Query for specific object in the module's class
+ self.path = 'api/mo/uni/{0}/{1}.json'.format(parent_rn, obj_rn)
+
+ def _construct_url_3(self, root, parent, obj, config_only=True):
+ """
+ This method is used by construct_url when the object is the third-level class.
+ """
+ root_rn = root.get('aci_rn')
+ root_obj = root.get('module_object')
+ parent_class = parent.get('aci_class')
+ parent_rn = parent.get('aci_rn')
+ parent_filter = parent.get('target_filter')
+ parent_obj = parent.get('module_object')
+ obj_class = obj.get('aci_class')
+ obj_rn = obj.get('aci_rn')
+ obj_filter = obj.get('target_filter')
+ mo = obj.get('module_object')
+
+ if self.module.params.get('state') in ('absent', 'present'):
+ # State is absent or present
+ self.path = 'api/mo/uni/{0}/{1}/{2}.json'.format(root_rn, parent_rn, obj_rn)
+ if config_only:
+ self.update_qs({'rsp-prop-include': 'config-only'})
+ self.obj_filter = obj_filter
+ elif root_obj is None and parent_obj is None and mo is None:
+ # Query for all objects of the module's class
+ self.path = 'api/class/{0}.json'.format(obj_class)
+ self.update_qs({'query-target-filter': self.build_filter(obj_class, obj_filter)})
+ elif root_obj is None and parent_obj is None: # mo is known
+ # Query for all objects of the module's class matching the provided ID value of the object
+ self.path = 'api/class/{0}.json'.format(obj_class)
+ self.update_qs({'query-target-filter': self.build_filter(obj_class, obj_filter)})
+ elif root_obj is None and mo is None: # parent_obj is known
+ # Query for all objects of the module's class that belong to any parent class
+ # matching the provided ID value for the parent object
+ self.child_classes.add(obj_class)
+ self.path = 'api/class/{0}.json'.format(parent_class)
+ self.update_qs({'query-target-filter': self.build_filter(parent_class, parent_filter)})
+ elif parent_obj is None and mo is None: # root_obj is known
+ # Query for all objects of the module's class that belong to a specific root object
+ self.child_classes.update([parent_class, obj_class])
+ self.path = 'api/mo/uni/{0}.json'.format(root_rn)
+ # NOTE: No need to select by root_filter
+ # self.update_qs({'query-target-filter': self.build_filter(root_class, root_filter)})
+ elif root_obj is None: # mo and parent_obj are known
+ # Query for all objects of the module's class that belong to any parent class
+ # matching the provided ID values for both object and parent object
+ self.child_classes.add(obj_class)
+ self.path = 'api/class/{0}.json'.format(parent_class)
+ self.update_qs({'query-target-filter': self.build_filter(parent_class, parent_filter)})
+ self.update_qs({'rsp-subtree-filter': self.build_filter(obj_class, obj_filter)})
+ elif parent_obj is None: # mo and root_obj are known
+ # Query for all objects of the module's class that match the provided ID value and belong to a specific root object
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}.json'.format(root_rn)
+ # NOTE: No need to select by root_filter
+ # self.update_qs({'query-target-filter': self.build_filter(root_class, root_filter)})
+ # TODO: Filter by parent_filter and obj_filter
+ self.update_qs({'rsp-subtree-filter': self.build_filter(obj_class, obj_filter)})
+ elif mo is None: # root_obj and parent_obj are known
+ # Query for all objects of the module's class that belong to a specific parent object
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}/{1}.json'.format(root_rn, parent_rn)
+ # NOTE: No need to select by parent_filter
+ # self.update_qs({'query-target-filter': self.build_filter(parent_class, parent_filter)})
+ else:
+ # Query for a specific object of the module's class
+ self.path = 'api/mo/uni/{0}/{1}/{2}.json'.format(root_rn, parent_rn, obj_rn)
+
+ def _construct_url_4(self, root, sec, parent, obj, config_only=True):
+ """
+ This method is used by construct_url when the object is the fourth-level class.
+ """
+ root_rn = root.get('aci_rn')
+ root_obj = root.get('module_object')
+ sec_rn = sec.get('aci_rn')
+ sec_obj = sec.get('module_object')
+ parent_rn = parent.get('aci_rn')
+ parent_obj = parent.get('module_object')
+ obj_class = obj.get('aci_class')
+ obj_rn = obj.get('aci_rn')
+ obj_filter = obj.get('target_filter')
+ mo = obj.get('module_object')
+
+ if self.child_classes is None:
+ self.child_classes = [obj_class]
+
+ if self.module.params.get('state') in ('absent', 'present'):
+ # State is absent or present
+ self.path = 'api/mo/uni/{0}/{1}/{2}/{3}.json'.format(root_rn, sec_rn, parent_rn, obj_rn)
+ if config_only:
+ self.update_qs({'rsp-prop-include': 'config-only'})
+ self.obj_filter = obj_filter
+ # TODO: Add all missing cases
+ elif root_obj is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/class/{0}.json'.format(obj_class)
+ self.update_qs({'query-target-filter': self.build_filter(obj_class, obj_filter)})
+ elif sec_obj is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}.json'.format(root_rn)
+ # NOTE: No need to select by root_filter
+ # self.update_qs({'query-target-filter': self.build_filter(root_class, root_filter)})
+ # TODO: Filter by sec_filter, parent and obj_filter
+ self.update_qs({'rsp-subtree-filter': self.build_filter(obj_class, obj_filter)})
+ elif parent_obj is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}/{1}.json'.format(root_rn, sec_rn)
+ # NOTE: No need to select by sec_filter
+ # self.update_qs({'query-target-filter': self.build_filter(sec_class, sec_filter)})
+ # TODO: Filter by parent_filter and obj_filter
+ self.update_qs({'rsp-subtree-filter': self.build_filter(obj_class, obj_filter)})
+ elif mo is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}/{1}/{2}.json'.format(root_rn, sec_rn, parent_rn)
+ # NOTE: No need to select by parent_filter
+ # self.update_qs({'query-target-filter': self.build_filter(parent_class, parent_filter)})
+ else:
+ # Query for a specific object of the module's class
+ self.path = 'api/mo/uni/{0}/{1}/{2}/{3}.json'.format(root_rn, sec_rn, parent_rn, obj_rn)
+
+ def _construct_url_5(self, root, ter, sec, parent, obj, config_only=True):
+ """
+ This method is used by construct_url when the object is the fourth-level class.
+ """
+
+ root_rn = root.get('aci_rn')
+ root_obj = root.get('module_object')
+ ter_rn = ter.get('aci_rn')
+ ter_obj = ter.get('module_object')
+ sec_rn = sec.get('aci_rn')
+ sec_obj = sec.get('module_object')
+ parent_rn = parent.get('aci_rn')
+ parent_obj = parent.get('module_object')
+ obj_class = obj.get('aci_class')
+ obj_rn = obj.get('aci_rn')
+ obj_filter = obj.get('target_filter')
+ mo = obj.get('module_object')
+
+ if self.child_classes is None:
+ self.child_classes = [obj_class]
+
+ if self.module.params.get('state') in ('absent', 'present'):
+ # State is absent or present
+ self.path = 'api/mo/uni/{0}/{1}/{2}/{3}{4}.json'.format(root_rn, ter_rn, sec_rn, parent_rn, obj_rn)
+ if config_only:
+ self.update_qs({'rsp-prop-include': 'config-only'})
+ self.obj_filter = obj_filter
+ # TODO: Add all missing cases
+ elif root_obj is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/class/{0}.json'.format(obj_class)
+ self.update_qs({'query-target-filter': self.build_filter(obj_class, obj_filter)})
+ elif ter_obj is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}.json'.format(root_rn)
+ # NOTE: No need to select by root_filter
+ # self.update_qs({'query-target-filter': self.build_filter(root_class, root_filter)})
+ # TODO: Filter by ter_filter, parent and obj_filter
+ self.update_qs({'rsp-subtree-filter': self.build_filter(obj_class, obj_filter)})
+ elif sec_obj is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}{1}.json'.format(root_rn, ter_rn)
+ # NOTE: No need to select by ter_filter
+ # self.update_qs({'query-target-filter': self.build_filter(ter_class, ter_filter)})
+ # TODO: Filter by sec_filter, parent and obj_filter
+ self.update_qs({'rsp-subtree-filter': self.build_filter(obj_class, obj_filter)})
+ elif parent_obj is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}/{1}{2}.json'.format(root_rn, ter_rn, sec_rn)
+ # NOTE: No need to select by sec_filter
+ # self.update_qs({'query-target-filter': self.build_filter(sec_class, sec_filter)})
+ # TODO: Filter by parent_filter and obj_filter
+ self.update_qs({'rsp-subtree-filter': self.build_filter(obj_class, obj_filter)})
+ elif mo is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}/{1}/{2}{3}.json'.format(root_rn, ter_rn, sec_rn, parent_rn)
+ # NOTE: No need to select by parent_filter
+ # self.update_qs({'query-target-filter': self.build_filter(parent_class, parent_filter)})
+ else:
+ # Query for a specific object of the module's class
+ self.path = 'api/mo/uni/{0}/{1}/{2}/{3}{4}.json'.format(root_rn, ter_rn, sec_rn, parent_rn, obj_rn)
+
+ def _construct_url_6(self, root, quad, ter, sec, parent, obj, config_only=True):
+ """
+ This method is used by construct_url when the object is the fourth-level class.
+ """
+ root_rn = root.get('aci_rn')
+ root_obj = root.get('module_object')
+ quad_rn = quad.get('aci_rn')
+ quad_obj = quad.get('module_object')
+ ter_rn = ter.get('aci_rn')
+ ter_obj = ter.get('module_object')
+ sec_rn = sec.get('aci_rn')
+ sec_obj = sec.get('module_object')
+ parent_rn = parent.get('aci_rn')
+ parent_obj = parent.get('module_object')
+ obj_class = obj.get('aci_class')
+ obj_rn = obj.get('aci_rn')
+ obj_filter = obj.get('target_filter')
+ mo = obj.get('module_object')
+
+ if self.child_classes is None:
+ self.child_classes = [obj_class]
+
+ if self.module.params.get('state') in ('absent', 'present'):
+ # State is absent or present
+ self.path = 'api/mo/uni/{0}/{1}/{2}/{3}{4}{5}.json'.format(root_rn, quad_rn, ter_rn, sec_rn, parent_rn, obj_rn)
+ if config_only:
+ self.update_qs({'rsp-prop-include': 'config-only'})
+ self.obj_filter = obj_filter
+ # TODO: Add all missing cases
+ elif root_obj is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/class/{0}.json'.format(obj_class)
+ self.update_qs({'query-target-filter': self.build_filter(obj_class, obj_filter)})
+ elif quad_obj is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}.json'.format(root_rn)
+ # NOTE: No need to select by root_filter
+ # self.update_qs({'query-target-filter': self.build_filter(root_class, root_filter)})
+ # TODO: Filter by quad_filter, parent and obj_filter
+ self.update_qs({'rsp-subtree-filter': self.build_filter(obj_class, obj_filter)})
+ elif ter_obj is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}{1}.json'.format(root_rn, quad_rn)
+ # NOTE: No need to select by quad_filter
+ # self.update_qs({'query-target-filter': self.build_filter(quad_class, quad_filter)})
+ # TODO: Filter by ter_filter, parent and obj_filter
+ self.update_qs({'rsp-subtree-filter': self.build_filter(obj_class, obj_filter)})
+ elif sec_obj is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}{1}{2}.json'.format(root_rn, quad_rn, ter_rn)
+ # NOTE: No need to select by ter_filter
+ # self.update_qs({'query-target-filter': self.build_filter(ter_class, ter_filter)})
+ # TODO: Filter by sec_filter, parent and obj_filter
+ self.update_qs({'rsp-subtree-filter': self.build_filter(obj_class, obj_filter)})
+ elif parent_obj is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}/{1}{2}{3}.json'.format(root_rn, quad_rn, ter_rn, sec_rn)
+ # NOTE: No need to select by sec_filter
+ # self.update_qs({'query-target-filter': self.build_filter(sec_class, sec_filter)})
+ # TODO: Filter by parent_filter and obj_filter
+ self.update_qs({'rsp-subtree-filter': self.build_filter(obj_class, obj_filter)})
+ elif mo is None:
+ self.child_classes.add(obj_class)
+ self.path = 'api/mo/uni/{0}/{1}/{2}{3}{4}.json'.format(root_rn, quad_rn, ter_rn, sec_rn, parent_rn)
+ # NOTE: No need to select by parent_filter
+ # self.update_qs({'query-target-filter': self.build_filter(parent_class, parent_filter)})
+ else:
+ # Query for a specific object of the module's class
+ self.path = 'api/mo/uni/{0}/{1}/{2}/{3}{4}{5}.json'.format(root_rn, quad_rn, ter_rn, sec_rn, parent_rn, obj_rn)
+
+ def delete_config(self):
+ """
+ This method is used to handle the logic when the modules state is equal to absent. The method only pushes a change if
+ the object exists, and if check_mode is False. A successful change will mark the module as changed.
+ """
+ self.proposed = dict()
+
+ if not self.existing:
+ return
+
+ elif not self.module.check_mode:
+ # Sign and encode request as to APIC's wishes
+ if self.params['private_key']:
+ self.cert_auth(method='DELETE')
+
+ resp, info = fetch_url(self.module, self.url,
+ headers=self.headers,
+ method='DELETE',
+ timeout=self.params.get('timeout'),
+ use_proxy=self.params.get('use_proxy'))
+
+ self.response = info.get('msg')
+ self.status = info.get('status')
+ self.method = 'DELETE'
+
+ # Handle APIC response
+ if info.get('status') == 200:
+ self.result['changed'] = True
+ self.response_json(resp.read())
+ else:
+ try:
+ # APIC error
+ self.response_json(info['body'])
+ self.fail_json(msg='APIC Error %(code)s: %(text)s' % self.error)
+ except KeyError:
+ # Connection error
+ self.fail_json(msg='Connection failed for %(url)s. %(msg)s' % info)
+ else:
+ self.result['changed'] = True
+ self.method = 'DELETE'
+
+ def get_diff(self, aci_class):
+ """
+ This method is used to get the difference between the proposed and existing configurations. Each module
+ should call the get_existing method before this method, and add the proposed config to the module results
+ using the module's config parameters. The new config will added to the self.result dictionary.
+
+ :param aci_class: Type str.
+ This is the root dictionary key for the MO's configuration body, or the ACI class of the MO.
+ """
+ proposed_config = self.proposed[aci_class]['attributes']
+ if self.existing:
+ existing_config = self.existing[0][aci_class]['attributes']
+ config = {}
+
+ # values are strings, so any diff between proposed and existing can be a straight replace
+ for key, value in proposed_config.items():
+ existing_field = existing_config.get(key)
+ if value != existing_field:
+ config[key] = value
+
+ # add name back to config only if the configs do not match
+ if config:
+ # TODO: If URLs are built with the object's name, then we should be able to leave off adding the name back
+ # config['name'] = proposed_config.get('name')
+ config = {aci_class: {'attributes': config}}
+
+ # check for updates to child configs and update new config dictionary
+ children = self.get_diff_children(aci_class)
+ if children and config:
+ config[aci_class].update({'children': children})
+ elif children:
+ config = {aci_class: {'attributes': {}, 'children': children}}
+
+ else:
+ config = self.proposed
+
+ self.config = config
+
+ @staticmethod
+ def get_diff_child(child_class, proposed_child, existing_child):
+ """
+ This method is used to get the difference between a proposed and existing child configs. The get_nested_config()
+ method should be used to return the proposed and existing config portions of child.
+
+ :param child_class: Type str.
+ The root class (dict key) for the child dictionary.
+ :param proposed_child: Type dict.
+ The config portion of the proposed child dictionary.
+ :param existing_child: Type dict.
+ The config portion of the existing child dictionary.
+ :return: The child config with only values that are updated. If the proposed dictionary has no updates to make
+ to what exists on the APIC, then None is returned.
+ """
+ update_config = {child_class: {'attributes': {}}}
+ for key, value in proposed_child.items():
+ existing_field = existing_child.get(key)
+ if value != existing_field:
+ update_config[child_class]['attributes'][key] = value
+
+ if not update_config[child_class]['attributes']:
+ return None
+
+ return update_config
+
+ def get_diff_children(self, aci_class):
+ """
+ This method is used to retrieve the updated child configs by comparing the proposed children configs
+ agains the objects existing children configs.
+
+ :param aci_class: Type str.
+ This is the root dictionary key for the MO's configuration body, or the ACI class of the MO.
+ :return: The list of updated child config dictionaries. None is returned if there are no changes to the child
+ configurations.
+ """
+ proposed_children = self.proposed[aci_class].get('children')
+ if proposed_children:
+ child_updates = []
+ existing_children = self.existing[0][aci_class].get('children', [])
+
+ # Loop through proposed child configs and compare against existing child configuration
+ for child in proposed_children:
+ child_class, proposed_child, existing_child = self.get_nested_config(child, existing_children)
+
+ if existing_child is None:
+ child_update = child
+ else:
+ child_update = self.get_diff_child(child_class, proposed_child, existing_child)
+
+ # Update list of updated child configs only if the child config is different than what exists
+ if child_update:
+ child_updates.append(child_update)
+ else:
+ return None
+
+ return child_updates
+
+ def get_existing(self):
+ """
+ This method is used to get the existing object(s) based on the path specified in the module. Each module should
+ build the URL so that if the object's name is supplied, then it will retrieve the configuration for that particular
+ object, but if no name is supplied, then it will retrieve all MOs for the class. Following this method will ensure
+ that this method can be used to supply the existing configuration when using the get_diff method. The response, status,
+ and existing configuration will be added to the self.result dictionary.
+ """
+ uri = self.url + self.filter_string
+
+ # Sign and encode request as to APIC's wishes
+ if self.params.get('private_key'):
+ self.cert_auth(path=self.path + self.filter_string, method='GET')
+
+ resp, info = fetch_url(self.module, uri,
+ headers=self.headers,
+ method='GET',
+ timeout=self.params.get('timeout'),
+ use_proxy=self.params.get('use_proxy'))
+ self.response = info.get('msg')
+ self.status = info.get('status')
+ self.method = 'GET'
+
+ # Handle APIC response
+ if info.get('status') == 200:
+ self.existing = json.loads(resp.read())['imdata']
+ else:
+ try:
+ # APIC error
+ self.response_json(info['body'])
+ self.fail_json(msg='APIC Error %(code)s: %(text)s' % self.error)
+ except KeyError:
+ # Connection error
+ self.fail_json(msg='Connection failed for %(url)s. %(msg)s' % info)
+
+ @staticmethod
+ def get_nested_config(proposed_child, existing_children):
+ """
+ This method is used for stiping off the outer layers of the child dictionaries so only the configuration
+ key, value pairs are returned.
+
+ :param proposed_child: Type dict.
+ The dictionary that represents the child config.
+ :param existing_children: Type list.
+ The list of existing child config dictionaries.
+ :return: The child's class as str (root config dict key), the child's proposed config dict, and the child's
+ existing configuration dict.
+ """
+ for key in proposed_child.keys():
+ child_class = key
+ proposed_config = proposed_child[key]['attributes']
+ existing_config = None
+
+ # FIXME: Design causes issues for repeated child_classes
+ # get existing dictionary from the list of existing to use for comparison
+ for child in existing_children:
+ if child.get(child_class):
+ existing_config = child[key]['attributes']
+ # NOTE: This is an ugly fix
+ # Return the one that is a subset match
+ if set(proposed_config.items()).issubset(set(existing_config.items())):
+ break
+ existing_config = None
+
+ return child_class, proposed_config, existing_config
+
+ def payload(self, aci_class, class_config, child_configs=None):
+ """
+ This method is used to dynamically build the proposed configuration dictionary from the config related parameters
+ passed into the module. All values that were not passed values from the playbook task will be removed so as to not
+ inadvertently change configurations.
+
+ :param aci_class: Type str
+ This is the root dictionary key for the MO's configuration body, or the ACI class of the MO.
+ :param class_config: Type dict
+ This is the configuration of the MO using the dictionary keys expected by the API
+ :param child_configs: Type list
+ This is a list of child dictionaries associated with the MOs config. The list should only
+ include child objects that are used to associate two MOs together. Children that represent
+ MOs should have their own module.
+ """
+ proposed = dict((k, str(v)) for k, v in class_config.items() if v is not None)
+ if self.params.get('annotation') is not None:
+ proposed['annotation'] = self.params.get('annotation')
+ if self.params.get('owner_key') is not None:
+ proposed['ownerKey'] = self.params.get('owner_key')
+ if self.params.get('owner_tag') is not None:
+ proposed['ownerTag'] = self.params.get('owner_tag')
+ self.proposed = {aci_class: {'attributes': proposed}}
+
+ # add child objects to proposed
+ if child_configs:
+ children = []
+ for child in child_configs:
+ child_copy = deepcopy(child)
+ has_value = False
+ for root_key in child_copy.keys():
+ for final_keys, values in child_copy[root_key]['attributes'].items():
+ if values is None:
+ child[root_key]['attributes'].pop(final_keys)
+ else:
+ child[root_key]['attributes'][final_keys] = str(values)
+ has_value = True
+ if has_value:
+ children.append(child)
+
+ if children:
+ self.proposed[aci_class].update(dict(children=children))
+
+ def post_config(self):
+ """
+ This method is used to handle the logic when the modules state is equal to present. The method only pushes a change if
+ the object has differences than what exists on the APIC, and if check_mode is False. A successful change will mark the
+ module as changed.
+ """
+ if not self.config:
+ return
+ elif not self.module.check_mode:
+ # Sign and encode request as to APIC's wishes
+ if self.params.get('private_key'):
+ self.cert_auth(method='POST', payload=json.dumps(self.config))
+
+ resp, info = fetch_url(self.module, self.url,
+ data=json.dumps(self.config),
+ headers=self.headers,
+ method='POST',
+ timeout=self.params.get('timeout'),
+ use_proxy=self.params.get('use_proxy'))
+
+ self.response = info.get('msg')
+ self.status = info.get('status')
+ self.method = 'POST'
+
+ # Handle APIC response
+ if info.get('status') == 200:
+ self.result['changed'] = True
+ self.response_json(resp.read())
+ else:
+ try:
+ # APIC error
+ self.response_json(info['body'])
+ self.fail_json(msg='APIC Error %(code)s: %(text)s' % self.error)
+ except KeyError:
+ # Connection error
+ self.fail_json(msg='Connection failed for %(url)s. %(msg)s' % info)
+ else:
+ self.result['changed'] = True
+ self.method = 'POST'
+
+ def exit_json(self, **kwargs):
+
+ if 'state' in self.params:
+ if self.params.get('state') in ('absent', 'present'):
+ if self.params.get('output_level') in ('debug', 'info'):
+ self.result['previous'] = self.existing
+ self.dump_json()
+
+ # Return the gory details when we need it
+ if self.params.get('output_level') == 'debug':
+ if 'state' in self.params:
+ self.result['filter_string'] = self.filter_string
+ self.result['method'] = self.method
+ # self.result['path'] = self.path # Adding 'path' in result causes state: absent in output
+ self.result['response'] = self.response
+ self.result['status'] = self.status
+ self.result['url'] = self.url
+ if self.stdout:
+ self.result['stdout'] = self.stdout
+
+ if 'state' in self.params:
+ self.original = self.existing
+ if self.params.get('state') in ('absent', 'present'):
+ self.get_existing()
+
+ # if self.module._diff and self.original != self.existing:
+ # self.result['diff'] = dict(
+ # before=json.dumps(self.original, sort_keys=True, indent=4),
+ # after=json.dumps(self.existing, sort_keys=True, indent=4),
+ # )
+ self.result['current'] = self.existing
+
+ if self.params.get('output_level') in ('debug', 'info'):
+ self.result['sent'] = self.config
+ self.result['proposed'] = self.proposed
+
+ self.result.update(**kwargs)
+ self.module.exit_json(**self.result)
+
+ def fail_json(self, msg, **kwargs):
+
+ # Return error information, if we have it
+ if self.error.get('code') is not None and self.error.get('text') is not None:
+ self.result['error'] = self.error
+
+ if 'state' in self.params:
+ if self.params.get('state') in ('absent', 'present'):
+ if self.params.get('output_level') in ('debug', 'info'):
+ self.result['previous'] = self.existing
+ if self.stdout:
+ self.result['stdout'] = self.stdout
+
+ # Return the gory details when we need it
+ if self.params.get('output_level') == 'debug':
+ if self.imdata is not None:
+ self.result['imdata'] = self.imdata
+ self.result['totalCount'] = self.totalCount
+
+ if self.params.get('output_level') == 'debug':
+ if self.url is not None:
+ if 'state' in self.params:
+ self.result['filter_string'] = self.filter_string
+ self.result['method'] = self.method
+ # self.result['path'] = self.path # Adding 'path' in result causes state: absent in output
+ self.result['response'] = self.response
+ self.result['status'] = self.status
+ self.result['url'] = self.url
+
+ if 'state' in self.params:
+ if self.params.get('output_level') in ('debug', 'info'):
+ self.result['sent'] = self.config
+ self.result['proposed'] = self.proposed
+
+ self.result.update(**kwargs)
+ self.module.fail_json(msg=msg, **self.result)
+
+ def dump_json(self):
+ if self.params.get('state') in ('absent', 'present'):
+ dn_path = (self.url).split('/mo/')[-1]
+ if dn_path[-5:] == '.json':
+ dn_path = dn_path[:-5]
+ mo = {}
+ if(self.proposed):
+ mo = self.proposed
+ for aci_class in mo:
+ mo[aci_class]['attributes']['dn'] = dn_path
+ if self.obj_filter is not None:
+ if 'tDn' in self.obj_filter:
+ mo[aci_class]['attributes']['tDn'] = self.obj_filter['tDn']
+
+ elif(self.params.get('state') == 'absent' and self.existing):
+ for aci_class in self.existing[0]:
+ mo[aci_class] = dict(attributes=dict(dn=dn_path, status="deleted"))
+
+ self.result['mo'] = mo
+ output_path = self.params.get('output_path')
+ if(output_path is not None):
+ with open(output_path, "a") as output_file:
+ json.dump([mo], output_file)
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aaa_user.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aaa_user.py
new file mode 100644
index 00000000..a951ad4f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aaa_user.py
@@ -0,0 +1,367 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_aaa_user
+short_description: Manage AAA users (aaa:User)
+description:
+- Manage AAA users on Cisco ACI fabrics.
+requirements:
+- python-dateutil
+options:
+ aaa_password:
+ description:
+ - The password of the locally-authenticated user.
+ type: str
+ aaa_password_lifetime:
+ description:
+ - The lifetime of the locally-authenticated user password.
+ type: int
+ aaa_password_update_required:
+ description:
+ - Whether this account needs password update.
+ type: bool
+ aaa_user:
+ description:
+ - The name of the locally-authenticated user user to add.
+ type: str
+ aliases: [ name, user ]
+ clear_password_history:
+ description:
+ - Whether to clear the password history of a locally-authenticated user.
+ type: bool
+ description:
+ description:
+ - Description for the AAA user.
+ type: str
+ aliases: [ descr ]
+ email:
+ description:
+ - The email address of the locally-authenticated user.
+ type: str
+ enabled:
+ description:
+ - The status of the locally-authenticated user account.
+ type: bool
+ expiration:
+ description:
+ - The expiration date of the locally-authenticated user account.
+ type: str
+ expires:
+ description:
+ - Whether to enable an expiration date for the locally-authenticated user account.
+ type: bool
+ first_name:
+ description:
+ - The first name of the locally-authenticated user.
+ type: str
+ last_name:
+ description:
+ - The last name of the locally-authenticated user.
+ type: str
+ phone:
+ description:
+ - The phone number of the locally-authenticated user.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- This module is not idempotent when C(aaa_password) is being used
+ (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 <aci_guide_known_issues>`.
+seealso:
+- module: cisco.aci.aci_aaa_user_certificate
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(aaa:User).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Add a user
+ cisco.aci.aci_aaa_user:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aaa_user: dag
+ aaa_password: AnotherSecretPassword
+ expiration: never
+ expires: no
+ email: dag@wieers.com
+ phone: 1-234-555-678
+ first_name: Dag
+ last_name: Wieers
+ state: present
+ delegate_to: localhost
+
+- name: Remove a user
+ cisco.aci.aci_aaa_user:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aaa_user: dag
+ state: absent
+ delegate_to: localhost
+
+- name: Query a user
+ cisco.aci.aci_aaa_user:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aaa_user: dag
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all users
+ cisco.aci.aci_aaa_user:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: '?rsp-prop-include=config-only'
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+try:
+ from dateutil.tz import tzutc
+ import dateutil.parser
+ HAS_DATEUTIL = True
+except ImportError:
+ HAS_DATEUTIL = False
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ aaa_password=dict(type='str', no_log=True),
+ aaa_password_lifetime=dict(type='int'),
+ aaa_password_update_required=dict(type='bool'),
+ aaa_user=dict(type='str', aliases=['name']), # Not required for querying all objects
+ clear_password_history=dict(type='bool'),
+ description=dict(type='str', aliases=['descr']),
+ email=dict(type='str'),
+ enabled=dict(type='bool'),
+ expiration=dict(type='str'),
+ expires=dict(type='bool'),
+ first_name=dict(type='str'),
+ last_name=dict(type='str'),
+ phone=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['aaa_user']],
+ ['state', 'present', ['aaa_user']],
+ ['expires', True, ['expiration']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ if not HAS_DATEUTIL:
+ module.fail_json(msg='dateutil required for this module')
+
+ aaa_password = module.params.get('aaa_password')
+ aaa_password_lifetime = module.params.get('aaa_password_lifetime')
+ aaa_password_update_required = aci.boolean(module.params.get('aaa_password_update_required'))
+ aaa_user = module.params.get('aaa_user')
+ clear_password_history = aci.boolean(module.params.get('clear_password_history'), 'yes', 'no')
+ description = module.params.get('description')
+ email = module.params.get('email')
+ enabled = aci.boolean(module.params.get('enabled'), 'active', 'inactive')
+ expires = aci.boolean(module.params.get('expires'))
+ first_name = module.params.get('first_name')
+ last_name = module.params.get('last_name')
+ phone = module.params.get('phone')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ expiration = module.params.get('expiration')
+ if expiration is not None and expiration != 'never':
+ try:
+ expiration = aci.iso8601_format(dateutil.parser.parse(expiration).replace(tzinfo=tzutc()))
+ except Exception as e:
+ module.fail_json(msg="Failed to parse date format '%s', %s" % (module.params.get('expiration'), e))
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='aaaUser',
+ aci_rn='userext/user-{0}'.format(aaa_user),
+ module_object=aaa_user,
+ target_filter={'name': aaa_user},
+ ),
+ )
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='aaaUser',
+ class_config=dict(
+ accountStatus=enabled,
+ clearPwdHistory=clear_password_history,
+ descr=description,
+ email=email,
+ expiration=expiration,
+ expires=expires,
+ firstName=first_name,
+ lastName=last_name,
+ name=aaa_user,
+ phone=phone,
+ pwd=aaa_password,
+ pwdLifeTime=aaa_password_lifetime,
+ pwdUpdateRequired=aaa_password_update_required,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='aaaUser')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aaa_user_certificate.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aaa_user_certificate.py
new file mode 100644
index 00000000..fc15e56f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aaa_user_certificate.py
@@ -0,0 +1,298 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_aaa_user_certificate
+short_description: Manage AAA user certificates (aaa:UserCert)
+description:
+- Manage AAA user certificates on Cisco ACI fabrics.
+options:
+ aaa_user:
+ description:
+ - The name of the user to add a certificate to.
+ type: str
+ required: yes
+ aaa_user_type:
+ description:
+ - Whether this is a normal user or an appuser.
+ type: str
+ choices: [ appuser, user ]
+ default: user
+ certificate:
+ description:
+ - The PEM format public key extracted from the X.509 certificate.
+ type: str
+ aliases: [ cert_data, certificate_data ]
+ certificate_name:
+ description:
+ - The name of the user certificate entry in ACI.
+ type: str
+ aliases: [ cert_name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(aaa_user) must exist before using this module in your playbook.
+ The M(cisco.aci.aci_aaa_user) module can be used for this.
+seealso:
+- module: cisco.aci.aci_aaa_user
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(aaa:UserCert).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Add a certificate to user
+ cisco.aci.aci_aaa_user_certificate:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aaa_user: admin
+ certificate_name: admin
+ certificate_data: '{{ lookup("file", "pki/admin.crt") }}'
+ state: present
+ delegate_to: localhost
+
+- name: Remove a certificate of a user
+ cisco.aci.aci_aaa_user_certificate:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aaa_user: admin
+ certificate_name: admin
+ state: absent
+ delegate_to: localhost
+
+- name: Query a certificate of a user
+ cisco.aci.aci_aaa_user_certificate:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aaa_user: admin
+ certificate_name: admin
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all certificates of a user
+ cisco.aci.aci_aaa_user_certificate:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aaa_user: admin
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+ACI_MAPPING = dict(
+ appuser=dict(
+ aci_class='aaaAppUser',
+ aci_mo='userext/appuser-',
+ ),
+ user=dict(
+ aci_class='aaaUser',
+ aci_mo='userext/user-',
+ ),
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ aaa_user=dict(type='str', required=True),
+ aaa_user_type=dict(type='str', default='user', choices=['appuser', 'user']),
+ certificate=dict(type='str', aliases=['cert_data', 'certificate_data']),
+ certificate_name=dict(type='str', aliases=['cert_name']), # Not required for querying all objects
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['aaa_user', 'certificate_name']],
+ ['state', 'present', ['aaa_user', 'certificate', 'certificate_name']],
+ ],
+ )
+
+ aaa_user = module.params.get('aaa_user')
+ aaa_user_type = module.params.get('aaa_user_type')
+ certificate = module.params.get('certificate')
+ certificate_name = module.params.get('certificate_name')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class=ACI_MAPPING.get(aaa_user_type).get('aci_class'),
+ aci_rn=ACI_MAPPING.get(aaa_user_type).get('aci_mo') + aaa_user,
+ module_object=aaa_user,
+ target_filter={'name': aaa_user},
+ ),
+ subclass_1=dict(
+ aci_class='aaaUserCert',
+ aci_rn='usercert-{0}'.format(certificate_name),
+ module_object=certificate_name,
+ target_filter={'name': certificate_name},
+ ),
+ )
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='aaaUserCert',
+ class_config=dict(
+ data=certificate,
+ name=certificate_name,
+ nameAlias=name_alias,
+
+ ),
+ )
+
+ aci.get_diff(aci_class='aaaUserCert')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_access_port_block_to_access_port.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_access_port_block_to_access_port.py
new file mode 100644
index 00000000..246c82f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_access_port_block_to_access_port.py
@@ -0,0 +1,437 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Simon Metzger <smnmtzgr@gmail.com>
+# Copyright: (c) 2020, Shreyas Srish <ssrish@cisco.com>
+# Copyright: (c) 2020, Zak Lantz (@manofcolombia) <zakodewald@gmail.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_access_port_block_to_access_port
+short_description: Manage port blocks of Fabric interface policy leaf profile interface selectors (infra:HPortS, infra:PortBlk)
+description:
+- Manage port blocks of Fabric interface policy leaf profile interface selectors on Cisco ACI fabrics.
+options:
+ interface_profile:
+ description:
+ - The name of the Fabric access policy leaf interface profile.
+ type: str
+ aliases: [ leaf_interface_profile_name, leaf_interface_profile, interface_profile_name ]
+ access_port_selector:
+ description:
+ - The name of the Fabric access policy leaf interface profile access port selector.
+ type: str
+ aliases: [ name, access_port_selector_name ]
+ port_blk:
+ description:
+ - The name of the Fabric access policy leaf interface profile access port block.
+ type: str
+ aliases: [ leaf_port_blk_name, leaf_port_blk ]
+ port_blk_description:
+ description:
+ - The description to assign to the C(leaf_port_blk).
+ type: str
+ aliases: [ leaf_port_blk_description ]
+ from_port:
+ description:
+ - The beginning (from-range) of the port range block for the leaf access port block.
+ type: str
+ aliases: [ from, fromPort, from_port_range ]
+ to_port:
+ description:
+ - The end (to-range) of the port range block for the leaf access port block.
+ type: str
+ aliases: [ to, toPort, to_port_range ]
+ from_card:
+ description:
+ - The beginning (from-range) of the card range block for the leaf access port block.
+ type: str
+ aliases: [ from_card_range ]
+ to_card:
+ description:
+ - The end (to-range) of the card range block for the leaf access port block.
+ type: str
+ aliases: [ to_card_range ]
+ type:
+ description:
+ - The type of access port block to be created under respective access port.
+ type: str
+ choices: [ fex, leaf ]
+ default: leaf
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(interface_profile) and C(access_port_selector) must exist before using this module in your playbook.
+ The M(cisco.aci.aci_interface_policy_leaf_profile) and M(cisco.aci.aci_access_port_to_interface_policy_leaf_profile) modules can be used for this.
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(infra:HPortS) and B(infra:PortBlk).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Simon Metzger (@smnmtzgr)
+'''
+
+EXAMPLES = r'''
+- name: Associate an access port block (single port) to an interface selector
+ cisco.aci.aci_access_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname
+ access_port_selector: accessportselectorname
+ port_blk: leafportblkname
+ from_port: 13
+ to_port: 13
+ state: present
+ delegate_to: localhost
+
+- name: Associate an access port block (port range) to an interface selector
+ cisco.aci.aci_access_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname
+ access_port_selector: accessportselectorname
+ port_blk: leafportblkname
+ from_port: 13
+ to_port: 16
+ state: present
+ delegate_to: localhost
+
+- name: Associate an access port block (single port) to an interface selector of type fex
+ cisco.aci.aci_access_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ type: fex
+ interface_profile: leafintprfname_fex
+ access_port_selector: accessportselectorname_fex
+ port_blk: leafportblkname_fex
+ from_port: 13
+ to_port: 13
+ state: present
+ delegate_to: localhost
+
+- name: Associate an access port block (port range) to an interface selector of type fex
+ cisco.aci.aci_access_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ type: fex
+ interface_profile: leafintprfname_fex
+ access_port_selector: accessportselectorname_fex
+ port_blk: leafportblkname_fex
+ from_port: 13
+ to_port: 16
+ state: present
+ delegate_to: localhost
+
+- name: Remove an access port block from an interface selector
+ cisco.aci.aci_access_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname
+ access_port_selector: accessportselectorname
+ port_blk: leafportblkname
+ from_port: 13
+ to_port: 13
+ state: absent
+ delegate_to: localhost
+
+- name: Remove an access port block from an interface selector of type fex
+ cisco.aci.aci_access_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ type: fex
+ interface_profile: leafintprfname_fex
+ access_port_selector: accessportselectorname_fex
+ port_blk: leafportblkname_fex
+ from_port: 13
+ to_port: 13
+ state: absent
+ delegate_to: localhost
+
+- name: Query Specific access port block under given access port selector
+ cisco.aci.aci_access_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname
+ access_port_selector: accessportselectorname
+ port_blk: leafportblkname
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query Specific access port block under given access port selector of type fex
+ cisco.aci.aci_access_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ type: fex
+ interface_profile: leafintprfname_fex
+ access_port_selector: accessportselectorname_fex
+ port_blk: leafportblkname_fex
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all access port blocks under given leaf interface profile
+ cisco.aci.aci_access_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all access port blocks under given leaf interface profile of type fex
+ cisco.aci.aci_access_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ type: fex
+ interface_profile: leafintprfname_fex
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all access port blocks in the fabric
+ cisco.aci.aci_access_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all access port blocks in the fabric of type fex
+ cisco.aci.aci_access_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ type: fex
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ interface_profile=dict(type='str', aliases=['leaf_interface_profile_name', 'leaf_interface_profile', 'interface_profile_name']),
+ access_port_selector=dict(type='str', aliases=['name', 'access_port_selector_name']), # Not required for querying all objects
+ port_blk=dict(type='str', aliases=['leaf_port_blk_name', 'leaf_port_blk']), # Not required for querying all objects
+ port_blk_description=dict(type='str', aliases=['leaf_port_blk_description']),
+ from_port=dict(type='str', aliases=['from', 'fromPort', 'from_port_range']),
+ to_port=dict(type='str', aliases=['to', 'toPort', 'to_port_range']),
+ from_card=dict(type='str', aliases=['from_card_range']),
+ to_card=dict(type='str', aliases=['to_card_range']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ type=dict(type='str', default='leaf', choices=['fex', 'leaf']), # This parameter is not required for querying all objects
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['access_port_selector', 'port_blk', 'interface_profile']],
+ ['state', 'present', ['access_port_selector', 'port_blk', 'from_port', 'to_port', 'interface_profile']],
+ ],
+ )
+
+ interface_profile = module.params.get('interface_profile')
+ access_port_selector = module.params.get('access_port_selector')
+ port_blk = module.params.get('port_blk')
+ port_blk_description = module.params.get('port_blk_description')
+ from_port = module.params.get('from_port')
+ to_port = module.params.get('to_port')
+ from_card = module.params.get('from_card')
+ to_card = module.params.get('to_card')
+ state = module.params.get('state')
+ type_port = module.params.get('type')
+
+ aci = ACIModule(module)
+ aci_class = 'infraAccPortP'
+ aci_rn = 'accportprof'
+ if type_port == 'fex':
+ aci_class = 'infraFexP'
+ aci_rn = 'fexprof'
+ aci.construct_url(
+ root_class=dict(
+ aci_class=aci_class,
+ aci_rn='infra/' + aci_rn + '-{0}'.format(interface_profile),
+ module_object=interface_profile,
+ target_filter={'name': interface_profile},
+ ),
+ subclass_1=dict(
+ aci_class='infraHPortS',
+ # NOTE: normal rn: hports-{name}-typ-{type}, hence here hardcoded to range for purposes of module
+ aci_rn='hports-{0}-typ-range'.format(access_port_selector),
+ module_object=access_port_selector,
+ target_filter={'name': access_port_selector},
+ ),
+ subclass_2=dict(
+ aci_class='infraPortBlk',
+ aci_rn='portblk-{0}'.format(port_blk),
+ module_object=port_blk,
+ target_filter={'name': port_blk},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='infraPortBlk',
+ class_config=dict(
+ descr=port_blk_description,
+ name=port_blk,
+ fromPort=from_port,
+ toPort=to_port,
+ fromCard=from_card,
+ toCard=to_card,
+ # type='range',
+ ),
+ )
+
+ aci.get_diff(aci_class='infraPortBlk')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_access_port_to_interface_policy_leaf_profile.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_access_port_to_interface_policy_leaf_profile.py
new file mode 100644
index 00000000..f419c8b9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_access_port_to_interface_policy_leaf_profile.py
@@ -0,0 +1,429 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+# Copyright: (c) 2020, Shreyas Srish <ssrish@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_access_port_to_interface_policy_leaf_profile
+short_description: Manage Fabric interface policy leaf profile interface selectors (infra:HPortS, infra:RsAccBaseGrp, infra:PortBlk)
+description:
+- Manage Fabric interface policy leaf profile interface selectors on Cisco ACI fabrics.
+options:
+ interface_profile:
+ description:
+ - The name of the Fabric access policy leaf interface profile.
+ type: str
+ aliases: [ leaf_interface_profile_name, leaf_interface_profile, interface_profile_name ]
+ access_port_selector:
+ description:
+ - The name of the Fabric access policy leaf interface profile access port selector.
+ type: str
+ aliases: [ name, access_port_selector_name ]
+ description:
+ description:
+ - The description to assign to the C(access_port_selector)
+ type: str
+ port_blk:
+ description:
+ - B(Deprecated)
+ - Starting with Ansible 2.8 we recommend using M(cisco.aci.aci_access_port_block_to_access_port) instead.
+ - The parameter will be removed in Ansible 2.12.
+ - HORIZONTALLINE
+ - The name of the Fabric access policy leaf interface profile access port block.
+ type: str
+ aliases: [ leaf_port_blk_name, leaf_port_blk, port_blk_name ]
+ leaf_port_blk_description:
+ description:
+ - B(Deprecated)
+ - Starting with Ansible 2.8 we recommend using M(cisco.aci.aci_access_port_block_to_access_port) instead.
+ - The parameter will be removed in Ansible 2.12.
+ - HORIZONTALLINE
+ - The description to assign to the C(leaf_port_blk)
+ type: str
+ from_port:
+ description:
+ - B(Deprecated)
+ - Starting with Ansible 2.8 we recommend using M(cisco.aci.aci_access_port_block_to_access_port) instead.
+ - The parameter will be removed in Ansible 2.12.
+ - HORIZONTALLINE
+ - The beginning (from-range) of the port range block for the leaf access port block.
+ type: str
+ aliases: [ from, fromPort, from_port_range ]
+ to_port:
+ description:
+ - B(Deprecated)
+ - Starting with Ansible 2.8 we recommend using M(cisco.aci.aci_access_port_block_to_access_port) instead.
+ - The parameter will be removed in Ansible 2.12.
+ - HORIZONTALLINE
+ - The end (to-range) of the port range block for the leaf access port block.
+ type: str
+ aliases: [ to, toPort, to_port_range ]
+ from_card:
+ description:
+ - B(Deprecated)
+ - Starting with Ansible 2.8 we recommend using M(cisco.aci.aci_access_port_block_to_access_port) instead.
+ - The parameter will be removed in Ansible 2.12.
+ - HORIZONTALLINE
+ - The beginning (from-range) of the card range block for the leaf access port block.
+ type: str
+ aliases: [ from_card_range ]
+ to_card:
+ description:
+ - B(Deprecated)
+ - Starting with Ansible 2.8 we recommend using M(cisco.aci.aci_access_port_block_to_access_port) instead.
+ - The parameter will be removed in Ansible 2.12.
+ - HORIZONTALLINE
+ - The end (to-range) of the card range block for the leaf access port block.
+ type: str
+ aliases: [ to_card_range ]
+ policy_group:
+ description:
+ - The name of the fabric access policy group to be associated with the leaf interface profile interface selector.
+ type: str
+ aliases: [ policy_group_name ]
+ interface_type:
+ description:
+ - The type of interface for the static EPG deployment.
+ type: str
+ choices: [ breakout, fex, port_channel, switch_port, vpc ]
+ default: switch_port
+ type:
+ description:
+ - The type of access port to be created under respective profile.
+ type: str
+ choices: [ fex, leaf ]
+ default: leaf
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(interface_profile) must exist before using this module in your playbook.
+ The M(cisco.aci.aci_interface_policy_leaf_profile) modules can be used for this.
+seealso:
+- module: cisco.aci.aci_access_port_block_to_access_port
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(infra:HPortS), B(infra:RsAccBaseGrp) and B(infra:PortBlk).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Bruno Calogero (@brunocalogero)
+- Shreyas Srish (@shrsr)
+'''
+
+EXAMPLES = r'''
+- name: Associate an Interface Access Port Selector to an Interface Policy Leaf Profile with a Policy Group
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname
+ access_port_selector: accessportselectorname
+ port_blk: leafportblkname
+ from_port: 13
+ to_port: 16
+ policy_group: policygroupname
+ state: present
+ delegate_to: localhost
+
+- name: Associate an interface access port selector to an Interface Policy Leaf Profile (w/o policy group) (check if this works)
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname
+ access_port_selector: accessportselectorname
+ port_blk: leafportblkname
+ from_port: 13
+ to_port: 16
+ state: present
+ delegate_to: localhost
+
+- name: Remove an interface access port selector associated with an Interface Policy Leaf Profile
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname
+ access_port_selector: accessportselectorname
+ state: absent
+ delegate_to: localhost
+
+- name: Remove an interface access port selector associated with an Interface Policy Fex Profile
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: fexintprfname
+ access_port_selector: accessportselectorname
+ state: absent
+ delegate_to: localhost
+
+- name: Query Specific access_port_selector under given leaf_interface_profile
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname
+ access_port_selector: accessportselectorname
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query Specific access_port_selector under given Fex leaf_interface_profile
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: fexintprfname
+ access_port_selector: accessportselectorname
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+INTERFACE_TYPE_MAPPING = dict(
+ breakout='uni/infra/funcprof/brkoutportgrp-{0}',
+ fex='uni/infra/funcprof/accportgrp-{0}',
+ port_channel='uni/infra/funcprof/accbundle-{0}',
+ switch_port='uni/infra/funcprof/accportgrp-{0}',
+ vpc='uni/infra/funcprof/accbundle-{0}',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ interface_profile=dict(type='str', aliases=['leaf_interface_profile_name', 'leaf_interface_profile', 'interface_profile_name']),
+ access_port_selector=dict(type='str', aliases=['name', 'access_port_selector_name']), # Not required for querying all objects
+ description=dict(type='str'),
+ port_blk=dict(type='str', aliases=['leaf_port_blk_name', 'leaf_port_blk', 'port_blk_name']),
+ leaf_port_blk_description=dict(type='str'),
+ from_port=dict(type='str', aliases=['from', 'fromPort', 'from_port_range']),
+ to_port=dict(type='str', aliases=['to', 'toPort', 'to_port_range']),
+ from_card=dict(type='str', aliases=['from_card_range']),
+ to_card=dict(type='str', aliases=['to_card_range']),
+ policy_group=dict(type='str', aliases=['policy_group_name']),
+ interface_type=dict(type='str', default='switch_port', choices=['breakout', 'fex', 'port_channel', 'switch_port', 'vpc']),
+ type=dict(type='str', default='leaf', choices=['fex', 'leaf']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['interface_profile', 'access_port_selector']],
+ ['state', 'present', ['interface_profile', 'access_port_selector']],
+ ],
+ )
+
+ interface_profile = module.params.get('interface_profile')
+ access_port_selector = module.params.get('access_port_selector')
+ description = module.params.get('description')
+ port_blk = module.params.get('port_blk')
+ leaf_port_blk_description = module.params.get('leaf_port_blk_description')
+ from_port = module.params.get('from_port')
+ to_port = module.params.get('to_port')
+ from_card = module.params.get('from_card')
+ to_card = module.params.get('to_card')
+ policy_group = module.params.get('policy_group')
+ interface_type = module.params.get('interface_type')
+ state = module.params.get('state')
+ type_profile = module.params.get('type')
+
+ # Build child_configs dynamically
+ child_configs = [dict(
+ infraPortBlk=dict(
+ attributes=dict(
+ descr=leaf_port_blk_description,
+ name=port_blk,
+ fromPort=from_port,
+ toPort=to_port,
+ fromCard=from_card,
+ toCard=to_card,
+ ),
+ ),
+ )]
+
+ # Add infraRsAccBaseGrp only when policy_group was defined
+ if policy_group is not None:
+ child_configs.append(dict(
+ infraRsAccBaseGrp=dict(
+ attributes=dict(
+ tDn=INTERFACE_TYPE_MAPPING[interface_type].format(policy_group),
+ ),
+ ),
+ ))
+
+ aci = ACIModule(module)
+ aci_class = 'infraAccPortP'
+ aci_rn = 'accportprof'
+ if type_profile == 'fex':
+ aci_class = 'infraFexP'
+ aci_rn = 'fexprof'
+ aci.construct_url(
+ root_class=dict(
+ aci_class=aci_class,
+ aci_rn='infra/' + aci_rn + '-{0}'.format(interface_profile),
+ module_object=interface_profile,
+ target_filter={'name': interface_profile},
+ ),
+ subclass_1=dict(
+ aci_class='infraHPortS',
+ # NOTE: normal rn: hports-{name}-typ-{type}, hence here hardcoded to range for purposes of module
+ aci_rn='hports-{0}-typ-range'.format(access_port_selector),
+ module_object=access_port_selector,
+ target_filter={'name': access_port_selector},
+ ),
+ child_classes=['infraPortBlk', 'infraRsAccBaseGrp'],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='infraHPortS',
+ class_config=dict(
+ descr=description,
+ name=access_port_selector,
+ # type='range',
+ ),
+ child_configs=child_configs,
+ )
+
+ aci.get_diff(aci_class='infraHPortS')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_access_sub_port_block_to_access_port.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_access_sub_port_block_to_access_port.py
new file mode 100644
index 00000000..7cbfdeab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_access_sub_port_block_to_access_port.py
@@ -0,0 +1,364 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Simon Metzger <smnmtzgr@gmail.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_access_sub_port_block_to_access_port
+short_description: Manage sub port blocks of Fabric interface policy leaf profile interface selectors (infra:HPortS, infra:SubPortBlk)
+description:
+- Manage sub port blocks of Fabric interface policy leaf profile interface selectors on Cisco ACI fabrics.
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(infra:HPortS) and B(infra:SubPortBlk).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Simon Metzger (@smnmtzgr)
+options:
+ leaf_interface_profile:
+ description:
+ - The name of the Fabric access policy leaf interface profile.
+ type: str
+ aliases: [ leaf_interface_profile_name ]
+ access_port_selector:
+ description:
+ - The name of the Fabric access policy leaf interface profile access port selector.
+ type: str
+ aliases: [ name, access_port_selector_name ]
+ leaf_port_blk:
+ description:
+ - The name of the Fabric access policy leaf interface profile access port block.
+ type: str
+ aliases: [ leaf_port_blk_name ]
+ leaf_port_blk_description:
+ description:
+ - The description to assign to the C(leaf_port_blk).
+ type: str
+ from_port:
+ description:
+ - The beginning (from-range) of the port range block for the leaf access port block.
+ type: str
+ aliases: [ from, fromPort, from_port_range ]
+ to_port:
+ description:
+ - The end (to-range) of the port range block for the leaf access port block.
+ type: str
+ aliases: [ to, toPort, to_port_range ]
+ from_sub_port:
+ description:
+ - The beginning (from-range) of the sub port range block for the leaf access port block.
+ type: str
+ aliases: [ fromSubPort, from_sub_port_range ]
+ to_sub_port:
+ description:
+ - The end (to-range) of the sub port range block for the leaf access port block.
+ type: str
+ aliases: [ toSubPort, to_sub_port_range ]
+ from_card:
+ description:
+ - The beginning (from-range) of the card range block for the leaf access port block.
+ type: str
+ aliases: [ from_card_range ]
+ to_card:
+ description:
+ - The end (to-range) of the card range block for the leaf access port block.
+ type: str
+ aliases: [ to_card_range ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment:
+- cisco.aci.aci
+
+'''
+
+EXAMPLES = r'''
+- name: Associate an access sub port block (single port) to an interface selector
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_interface_profile: leafintprfname
+ access_port_selector: accessportselectorname
+ leaf_port_blk: leafportblkname
+ from_port: 13
+ to_port: 13
+ from_sub_port: 1
+ to_sub_port: 1
+ state: present
+ delegate_to: localhost
+
+- name: Associate an access sub port block (port range) to an interface selector
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_interface_profile: leafintprfname
+ access_port_selector: accessportselectorname
+ leaf_port_blk: leafportblkname
+ from_port: 13
+ to_port: 13
+ from_sub_port: 1
+ to_sub_port: 3
+ state: present
+ delegate_to: localhost
+
+- name: Remove an access sub port block from an interface selector
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_interface_profile: leafintprfname
+ access_port_selector: accessportselectorname
+ leaf_port_blk: leafportblkname
+ from_port: 13
+ to_port: 13
+ from_sub_port: 1
+ to_sub_port: 1
+ state: absent
+ delegate_to: localhost
+
+- name: Query Specific access sub port block under given access port selector
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_interface_profile: leafintprfname
+ access_port_selector: accessportselectorname
+ leaf_port_blk: leafportblkname
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all access sub port blocks under given leaf interface profile
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_interface_profile: leafintprfname
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all access sub port blocks in the fabric
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ leaf_interface_profile=dict(type='str', aliases=['leaf_interface_profile_name']), # Not required for querying all objects
+ access_port_selector=dict(type='str', aliases=['name', 'access_port_selector_name']), # Not required for querying all objects
+ leaf_port_blk=dict(type='str', aliases=['leaf_port_blk_name']), # Not required for querying all objects
+ leaf_port_blk_description=dict(type='str'),
+ from_port=dict(type='str', aliases=['from', 'fromPort', 'from_port_range']), # Not required for querying all objects and deleting sub port blocks
+ to_port=dict(type='str', aliases=['to', 'toPort', 'to_port_range']), # Not required for querying all objects and deleting sub port blocks
+ from_sub_port=dict(type='str', aliases=['fromSubPort', 'from_sub_port_range']), # Not required for querying all objects and deleting sub port blocks
+ to_sub_port=dict(type='str', aliases=['toSubPort', 'to_sub_port_range']), # Not required for querying all objects and deleting sub port blocks
+ from_card=dict(type='str', aliases=['from_card_range']),
+ to_card=dict(type='str', aliases=['to_card_range']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['access_port_selector', 'leaf_port_blk', 'leaf_interface_profile']],
+ ['state', 'present', ['access_port_selector', 'leaf_port_blk', 'from_port', 'to_port', 'from_sub_port', 'to_sub_port', 'leaf_interface_profile']],
+ ],
+ )
+
+ leaf_interface_profile = module.params.get('leaf_interface_profile')
+ access_port_selector = module.params.get('access_port_selector')
+ leaf_port_blk = module.params.get('leaf_port_blk')
+ leaf_port_blk_description = module.params.get('leaf_port_blk_description')
+ from_port = module.params.get('from_port')
+ to_port = module.params.get('to_port')
+ from_sub_port = module.params.get('from_sub_port')
+ to_sub_port = module.params.get('to_sub_port')
+ from_card = module.params.get('from_card')
+ to_card = module.params.get('to_card')
+ state = module.params.get('state')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='infraAccPortP',
+ aci_rn='infra/accportprof-{0}'.format(leaf_interface_profile),
+ module_object=leaf_interface_profile,
+ target_filter={'name': leaf_interface_profile},
+ ),
+ subclass_1=dict(
+ aci_class='infraHPortS',
+ # NOTE: normal rn: hports-{name}-typ-{type}, hence here hardcoded to range for purposes of module
+ aci_rn='hports-{0}-typ-range'.format(access_port_selector),
+ module_object=access_port_selector,
+ target_filter={'name': access_port_selector},
+ ),
+ subclass_2=dict(
+ aci_class='infraSubPortBlk',
+ aci_rn='subportblk-{0}'.format(leaf_port_blk),
+ module_object=leaf_port_blk,
+ target_filter={'name': leaf_port_blk},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='infraSubPortBlk',
+ class_config=dict(
+ descr=leaf_port_blk_description,
+ name=leaf_port_blk,
+ fromPort=from_port,
+ toPort=to_port,
+ fromSubPort=from_sub_port,
+ toSubPort=to_sub_port,
+ fromCard=from_card,
+ toCard=to_card,
+ # type='range',
+ ),
+ )
+
+ aci.get_diff(aci_class='infraSubPortBlk')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aep.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aep.py
new file mode 100644
index 00000000..29db95a5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aep.py
@@ -0,0 +1,286 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Shreyas Srish <ssrish@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_aep
+short_description: Manage attachable Access Entity Profile (AEP) objects (infra:AttEntityP, infra:ProvAcc)
+description:
+- Connect to external virtual and physical domains by using
+ attachable Access Entity Profiles (AEP) on Cisco ACI fabrics.
+options:
+ aep:
+ description:
+ - The name of the Attachable Access Entity Profile.
+ type: str
+ aliases: [ aep_name, name ]
+ description:
+ description:
+ - Description for the AEP.
+ type: str
+ aliases: [ descr ]
+ infra_vlan:
+ description:
+ - Enable infrastructure VLAN.
+ - The hypervisor functions of the AEP.
+ - C(no) will disable the infrastructure vlan if it is enabled.
+ type: bool
+ aliases: [ infrastructure_vlan ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ default: present
+ choices: [ absent, present, query ]
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- module: cisco.aci.aci_aep_to_domain
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(infra:AttEntityP) and B(infra:ProvAcc).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Swetha Chunduri (@schunduri)
+- Shreyas Srish (@shrsr)
+'''
+
+EXAMPLES = r'''
+- name: Add a new AEP
+ cisco.aci.aci_aep:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aep: ACI-AEP
+ description: default
+ infra_vlan: true
+ state: present
+ delegate_to: localhost
+
+- name: Remove an existing AEP
+ cisco.aci.aci_aep:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aep: ACI-AEP
+ state: absent
+ delegate_to: localhost
+
+- name: Query all AEPs
+ cisco.aci.aci_aep:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query a specific AEP
+ cisco.aci.aci_aep:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aep: ACI-AEP
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ aep=dict(type='str', aliases=['name', 'aep_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ infra_vlan=dict(type='bool', aliases=['infrastructure_vlan']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['aep']],
+ ['state', 'present', ['aep']],
+ ],
+ )
+
+ aep = module.params.get('aep')
+ description = module.params.get('description')
+ infra_vlan = module.params.get('infra_vlan')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+ if infra_vlan:
+ child_configs = [dict(infraProvAcc=dict(attributes=dict(name='provacc')))]
+ elif infra_vlan is False:
+ child_configs = [dict(infraProvAcc=dict(attributes=dict(name='provacc', status='deleted')))]
+ else:
+ child_configs = []
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='infraAttEntityP',
+ aci_rn='infra/attentp-{0}'.format(aep),
+ module_object=aep,
+ target_filter={'name': aep},
+ ),
+ child_classes=['infraProvAcc']
+ )
+
+ aci.get_existing()
+
+ try:
+ if len(aci.existing[0]['infraAttEntityP']) == 1 and infra_vlan is False:
+ child_configs = []
+ except Exception:
+ pass
+
+ if state == 'present':
+
+ aci.payload(
+ aci_class='infraAttEntityP',
+ class_config=dict(
+ name=aep,
+ descr=description,
+ nameAlias=name_alias,
+ ),
+ child_configs=child_configs,
+ )
+
+ aci.get_diff(aci_class='infraAttEntityP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aep_to_domain.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aep_to_domain.py
new file mode 100644
index 00000000..716906d0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_aep_to_domain.py
@@ -0,0 +1,313 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Dag Wieers <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_aep_to_domain
+short_description: Bind AEPs to Physical or Virtual Domains (infra:RsDomP)
+description:
+- Bind AEPs to Physical or Virtual Domains on Cisco ACI fabrics.
+options:
+ aep:
+ description:
+ - The name of the Attachable Access Entity Profile.
+ type: str
+ aliases: [ aep_name ]
+ domain:
+ description:
+ - Name of the physical or virtual domain being associated with the AEP.
+ type: str
+ aliases: [ domain_name, domain_profile ]
+ domain_type:
+ description:
+ - Determines if the Domain is physical (phys) or virtual (vmm).
+ type: str
+ choices: [ fc, l2dom, l3dom, phys, vmm ]
+ aliases: [ type ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ vm_provider:
+ description:
+ - The VM platform for VMM Domains.
+ - Support for Kubernetes was added in ACI v3.0.
+ - Support for CloudFoundry, OpenShift and Red Hat was added in ACI v3.1.
+ type: str
+ choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(aep) and C(domain) parameters should exist before using this module.
+ The M(cisco.aci.aci_aep) and M(cisco.aci.aci_domain) can be used for these.
+seealso:
+- module: cisco.aci.aci_aep
+- module: cisco.aci.aci_domain
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(infra:RsDomP).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Add AEP to domain binding
+ cisco.aci.aci_aep_to_domain: &binding_present
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aep: test_aep
+ domain: phys_dom
+ domain_type: phys
+ state: present
+ delegate_to: localhost
+
+- name: Remove AEP to domain binding
+ cisco.aci.aci_aep_to_domain: &binding_absent
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aep: test_aep
+ domain: phys_dom
+ domain_type: phys
+ state: absent
+ delegate_to: localhost
+
+- name: Query our AEP to domain binding
+ cisco.aci.aci_aep_to_domain:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ aep: test_aep
+ domain: phys_dom
+ domain_type: phys
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all AEP to domain bindings
+ cisco.aci.aci_aep_to_domain: &binding_query
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+VM_PROVIDER_MAPPING = dict(
+ cloudfoundry='CloudFoundry',
+ kubernetes='Kubernetes',
+ microsoft='Microsoft',
+ openshift='OpenShift',
+ openstack='OpenStack',
+ redhat='Redhat',
+ vmware='VMware',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ aep=dict(type='str', aliases=['aep_name']), # Not required for querying all objects
+ domain=dict(type='str', aliases=['domain_name', 'domain_profile']), # Not required for querying all objects
+ domain_type=dict(type='str', choices=['fc', 'l2dom', 'l3dom', 'phys', 'vmm'], aliases=['type']), # Not required for querying all objects
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ vm_provider=dict(type='str', choices=['cloudfoundry', 'kubernetes', 'microsoft', 'openshift', 'openstack', 'redhat', 'vmware']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['domain_type', 'vmm', ['vm_provider']],
+ ['state', 'absent', ['aep', 'domain', 'domain_type']],
+ ['state', 'present', ['aep', 'domain', 'domain_type']],
+ ],
+ required_together=[
+ ['domain', 'domain_type'],
+ ],
+ )
+
+ aep = module.params.get('aep')
+ domain = module.params.get('domain')
+ domain_type = module.params.get('domain_type')
+ vm_provider = module.params.get('vm_provider')
+ state = module.params.get('state')
+
+ # Report when vm_provider is set when type is not virtual
+ if domain_type != 'vmm' and vm_provider is not None:
+ module.fail_json(msg="Domain type '{0}' cannot have a 'vm_provider'".format(domain_type))
+
+ # Compile the full domain for URL building
+ if domain_type == 'fc':
+ domain_mo = 'uni/fc-{0}'.format(domain)
+ elif domain_type == 'l2dom':
+ domain_mo = 'uni/l2dom-{0}'.format(domain)
+ elif domain_type == 'l3dom':
+ domain_mo = 'uni/l3dom-{0}'.format(domain)
+ elif domain_type == 'phys':
+ domain_mo = 'uni/phys-{0}'.format(domain)
+ elif domain_type == 'vmm':
+ domain_mo = 'uni/vmmp-{0}/dom-{1}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
+ else:
+ domain_mo = None
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='infraAttEntityP',
+ aci_rn='infra/attentp-{0}'.format(aep),
+ module_object=aep,
+ target_filter={'name': aep},
+ ),
+ subclass_1=dict(
+ aci_class='infraRsDomP',
+ aci_rn='rsdomP-[{0}]'.format(domain_mo),
+ module_object=domain_mo,
+ target_filter={'tDn': domain_mo},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='infraRsDomP',
+ class_config=dict(tDn=domain_mo),
+ )
+
+ aci.get_diff(aci_class='infraRsDomP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_ap.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_ap.py
new file mode 100644
index 00000000..0c10fbd4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_ap.py
@@ -0,0 +1,290 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_ap
+short_description: Manage top level Application Profile (AP) objects (fv:Ap)
+description:
+- Manage top level Application Profile (AP) objects on Cisco ACI fabrics
+options:
+ tenant:
+ description:
+ - The name of an existing tenant.
+ type: str
+ aliases: [ tenant_name ]
+ ap:
+ description:
+ - The name of the application network profile.
+ type: str
+ aliases: [ app_profile, app_profile_name, name ]
+ description:
+ description:
+ - Description for the AP.
+ type: str
+ aliases: [ descr ]
+ monitoring_policy:
+ description:
+ - The name of the monitoring policy.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- This module does not manage EPGs, see M(cisco.aci.aci_epg) to do this.
+- The used C(tenant) must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fv:Ap).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Swetha Chunduri (@schunduri)
+- Shreyas Srish (@shrsr)
+'''
+
+EXAMPLES = r'''
+- name: Add a new AP
+ cisco.aci.aci_ap:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ ap: default
+ description: default ap
+ monitoring_policy: default
+ state: present
+ delegate_to: localhost
+
+- name: Remove an AP
+ cisco.aci.aci_ap:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ ap: default
+ state: absent
+ delegate_to: localhost
+
+- name: Query an AP
+ cisco.aci.aci_ap:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ ap: default
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all APs
+ cisco.aci.aci_ap:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ ap=dict(type='str', aliases=['app_profile', 'app_profile_name', 'name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ monitoring_policy=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['tenant', 'ap']],
+ ['state', 'present', ['tenant', 'ap']],
+ ],
+ )
+
+ ap = module.params.get('ap')
+ description = module.params.get('description')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+ monitoring_policy = module.params.get('monitoring_policy')
+
+ child_configs = [dict(fvRsApMonPol=dict(attributes=dict(tnMonEPGPolName=monitoring_policy)))]
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='fvAp',
+ aci_rn='ap-{0}'.format(ap),
+ module_object=ap,
+ target_filter={'name': ap},
+ ),
+ child_classes=['fvRsApMonPol'],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvAp',
+ class_config=dict(
+ name=ap,
+ descr=description,
+ nameAlias=name_alias,
+ ),
+ child_configs=child_configs,
+ )
+
+ aci.get_diff(aci_class='fvAp')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd.py
new file mode 100644
index 00000000..02ba1aeb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd.py
@@ -0,0 +1,461 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_bd
+short_description: Manage Bridge Domains (BD) objects (fv:BD)
+description:
+- Manages Bridge Domains (BD) on Cisco ACI fabrics.
+options:
+ arp_flooding:
+ description:
+ - Determines if the Bridge Domain should flood ARP traffic.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ bd:
+ description:
+ - The name of the Bridge Domain.
+ type: str
+ aliases: [ bd_name, name ]
+ bd_type:
+ description:
+ - The type of traffic on the Bridge Domain.
+ - The APIC defaults to C(ethernet) when unset during creation.
+ type: str
+ choices: [ ethernet, fc ]
+ description:
+ description:
+ - Description for the Bridge Domain.
+ type: str
+ enable_multicast:
+ description:
+ - Determines if PIM is enabled.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ enable_routing:
+ description:
+ - Determines if IP forwarding should be allowed.
+ - The APIC defaults to C(yes) when unset during creation.
+ type: bool
+ endpoint_clear:
+ description:
+ - Clears all End Points in all Leaves when C(yes).
+ - The value is not reset to disabled once End Points have been cleared; that requires a second task.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ endpoint_move_detect:
+ description:
+ - Determines if GARP should be enabled to detect when End Points move.
+ - The APIC defaults to C(garp) when unset during creation.
+ type: str
+ choices: [ default, garp ]
+ endpoint_retention_action:
+ 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.
+ type: str
+ choices: [ inherit, resolve ]
+ endpoint_retention_policy:
+ description:
+ - The name of the End Point Retention Policy the Bridge Domain should use when
+ overriding the default End Point Retention Policy.
+ type: str
+ igmp_snoop_policy:
+ description:
+ - The name of the IGMP Snooping Policy the Bridge Domain should use when
+ overriding the default IGMP Snooping Policy.
+ type: str
+ ip_learning:
+ description:
+ - Determines if the Bridge Domain should learn End Point IPs.
+ - The APIC defaults to C(yes) when unset during creation.
+ type: bool
+ ipv6_nd_policy:
+ description:
+ - The name of the IPv6 Neighbor Discovery Policy the Bridge Domain should use when
+ overridding the default IPV6 ND Policy.
+ type: str
+ l2_unknown_unicast:
+ description:
+ - Determines what forwarding method to use for unknown l2 destinations.
+ - The APIC defaults to C(proxy) when unset during creation.
+ type: str
+ choices: [ proxy, flood ]
+ l3_unknown_multicast:
+ description:
+ - Determines the forwarding method to use for unknown multicast destinations.
+ - The APIC defaults to C(flood) when unset during creation.
+ type: str
+ choices: [ flood, opt-flood ]
+ limit_ip_learn:
+ description:
+ - Determines if the BD should limit IP learning to only subnets owned by the Bridge Domain.
+ - The APIC defaults to C(yes) when unset during creation.
+ type: bool
+ mac_address:
+ description:
+ - The MAC Address to assign to the C(bd) instead of using the default.
+ - The APIC defaults to C(00:22:BD:F8:19:FF) when unset during creation.
+ type: str
+ aliases: [ mac ]
+ multi_dest:
+ description:
+ - Determines the forwarding method for L2 multicast, broadcast, and link layer traffic.
+ - The APIC defaults to C(bd-flood) when unset during creation.
+ type: str
+ choices: [ bd-flood, drop, encap-flood ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+ tenant:
+ description:
+ - The name of the Tenant.
+ type: str
+ aliases: [ tenant_name ]
+ vrf:
+ description:
+ - The name of the VRF.
+ type: str
+ aliases: [ vrf_name ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fv:BD).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+EXAMPLES = r'''
+- name: Add Bridge Domain
+ cisco.aci.aci_bd:
+ host: "{{ inventory_hostname }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: no
+ tenant: prod
+ bd: web_servers
+ mac_address: 00:22:BD:F8:19:FE
+ vrf: prod_vrf
+ state: present
+ delegate_to: localhost
+
+- name: Add an FC Bridge Domain
+ cisco.aci.aci_bd:
+ host: "{{ inventory_hostname }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: no
+ tenant: prod
+ bd: storage
+ bd_type: fc
+ vrf: fc_vrf
+ enable_routing: no
+ state: present
+ delegate_to: localhost
+
+- name: Modify a Bridge Domain
+ cisco.aci.aci_bd:
+ host: "{{ inventory_hostname }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: yes
+ tenant: prod
+ bd: web_servers
+ arp_flooding: yes
+ l2_unknown_unicast: flood
+ state: present
+ delegate_to: localhost
+
+- name: Query All Bridge Domains
+ cisco.aci.aci_bd:
+ host: "{{ inventory_hostname }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: yes
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query a Bridge Domain
+ cisco.aci.aci_bd:
+ host: "{{ inventory_hostname }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: yes
+ tenant: prod
+ bd: web_servers
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Delete a Bridge Domain
+ cisco.aci.aci_bd:
+ host: "{{ inventory_hostname }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: yes
+ tenant: prod
+ bd: web_servers
+ state: absent
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ arp_flooding=dict(type='bool'),
+ bd=dict(type='str', aliases=['bd_name', 'name']), # Not required for querying all objects
+ bd_type=dict(type='str', choices=['ethernet', 'fc']),
+ description=dict(type='str'),
+ enable_multicast=dict(type='bool'),
+ enable_routing=dict(type='bool'),
+ endpoint_clear=dict(type='bool'),
+ endpoint_move_detect=dict(type='str', choices=['default', 'garp']),
+ endpoint_retention_action=dict(type='str', choices=['inherit', 'resolve']),
+ endpoint_retention_policy=dict(type='str'),
+ igmp_snoop_policy=dict(type='str'),
+ ip_learning=dict(type='bool'),
+ ipv6_nd_policy=dict(type='str'),
+ l2_unknown_unicast=dict(type='str', choices=['proxy', 'flood']),
+ l3_unknown_multicast=dict(type='str', choices=['flood', 'opt-flood']),
+ limit_ip_learn=dict(type='bool'),
+ mac_address=dict(type='str', aliases=['mac']),
+ multi_dest=dict(type='str', choices=['bd-flood', 'drop', 'encap-flood']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ vrf=dict(type='str', aliases=['vrf_name']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['bd', 'tenant']],
+ ['state', 'present', ['bd', 'tenant']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ arp_flooding = aci.boolean(module.params.get('arp_flooding'))
+ bd = module.params.get('bd')
+ bd_type = module.params.get('bd_type')
+ if bd_type == 'ethernet':
+ # ethernet type is represented as regular, but that is not clear to the users
+ bd_type = 'regular'
+ description = module.params.get('description')
+ enable_multicast = aci.boolean(module.params.get('enable_multicast'))
+ enable_routing = aci.boolean(module.params.get('enable_routing'))
+ endpoint_clear = aci.boolean(module.params.get('endpoint_clear'))
+ endpoint_move_detect = module.params.get('endpoint_move_detect')
+ if endpoint_move_detect == 'default':
+ # the ACI default setting is an empty string, but that is not a good input value
+ endpoint_move_detect = ''
+ endpoint_retention_action = module.params.get('endpoint_retention_action')
+ endpoint_retention_policy = module.params.get('endpoint_retention_policy')
+ igmp_snoop_policy = module.params.get('igmp_snoop_policy')
+ ip_learning = aci.boolean(module.params.get('ip_learning'))
+ ipv6_nd_policy = module.params.get('ipv6_nd_policy')
+ l2_unknown_unicast = module.params.get('l2_unknown_unicast')
+ l3_unknown_multicast = module.params.get('l3_unknown_multicast')
+ limit_ip_learn = aci.boolean(module.params.get('limit_ip_learn'))
+ mac_address = module.params.get('mac_address')
+ multi_dest = module.params.get('multi_dest')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ vrf = module.params.get('vrf')
+ name_alias = module.params.get('name_alias')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='fvBD',
+ aci_rn='BD-{0}'.format(bd),
+ module_object=bd,
+ target_filter={'name': bd},
+ ),
+ child_classes=['fvRsCtx', 'fvRsIgmpsn', 'fvRsBDToNdP', 'fvRsBdToEpRet'],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvBD',
+ class_config=dict(
+ arpFlood=arp_flooding,
+ descr=description,
+ epClear=endpoint_clear,
+ epMoveDetectMode=endpoint_move_detect,
+ ipLearning=ip_learning,
+ limitIpLearnToSubnets=limit_ip_learn,
+ mac=mac_address,
+ mcastAllow=enable_multicast,
+ multiDstPktAct=multi_dest,
+ name=bd,
+ type=bd_type,
+ unicastRoute=enable_routing,
+ unkMacUcastAct=l2_unknown_unicast,
+ unkMcastAct=l3_unknown_multicast,
+ nameAlias=name_alias,
+ ),
+ child_configs=[
+ {'fvRsCtx': {'attributes': {'tnFvCtxName': vrf}}},
+ {'fvRsIgmpsn': {'attributes': {'tnIgmpSnoopPolName': igmp_snoop_policy}}},
+ {'fvRsBDToNdP': {'attributes': {'tnNdIfPolName': ipv6_nd_policy}}},
+ {'fvRsBdToEpRet': {'attributes': {'resolveAct': endpoint_retention_action, 'tnFvEpRetPolName': endpoint_retention_policy}}},
+ ],
+ )
+
+ aci.get_diff(aci_class='fvBD')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd_dhcp_label.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd_dhcp_label.py
new file mode 100644
index 00000000..7b226200
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd_dhcp_label.py
@@ -0,0 +1,312 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Dag Wieers (@dagwieers)
+# Copyright: (c) 2020, sig9org (@sig9org)
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: aci_bd_dhcp_label
+short_description: Manage DHCP Labels (dhcp:Lbl)
+description:
+- Manage DHCP Labels on Cisco ACI fabrics.
+options:
+ bd:
+ description:
+ - The name of the Bridge Domain.
+ type: str
+ aliases: [ bd_name ]
+ description:
+ description:
+ - The description for the DHCP Label.
+ type: str
+ aliases: [ descr ]
+ dhcp_label:
+ description:
+ - The name of the DHCP Relay Label.
+ type: str
+ aliases: [ name ]
+ dhcp_option:
+ description:
+ - Name of the DHCP Option Policy to be associated with the DCHP Relay Policy.
+ This policy need to be present in the same tenant as the bridge domain.
+ - The DHCP option is used to supply DHCP clients with configuration parameters
+ such as a domain, name server, subnet, and network address.
+ type: str
+ scope:
+ description:
+ - Represents the target relay servers ownership.
+ type: str
+ choices: [ infra, tenant ]
+ default: infra
+ aliases: [ owner ]
+ tenant:
+ description:
+ - The name of the Tenant.
+ type: str
+ aliases: [ tenant_name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.aci.aci
+notes:
+- A DHCP relay label contains a C(name) for the label, the C(scope), and a DHCP option policy.
+ The scope is the C(owner) of the relay server and the DHCP option policy supplies DHCP clients
+ with configuration parameters such as domain, nameserver, and subnet router addresses.
+- The C(tenant) and C(bd) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module and M(cisco.aci.aci_bd) can be used for these.
+seealso:
+- module: cisco.aci.aci_bd
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(dhcp:Lbl).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- sig9 (@sig9org)
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Create a new DHCP Relay Label to a Bridge Domain
+ cisco.aci.aci_bd_dhcp_label:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ bd: database
+ dhcp_label: label1
+ scope: infra
+ state: present
+
+- name: Query a DHCP Relay Label of a Bridge Domain
+ cisco.aci.aci_bd_dhcp_label:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ bd: database
+ dhcp_label: label1
+ scope: infra
+ state: query
+
+- name: Query all DHCP Relay Labels of a Bridge Domain
+ cisco.aci.aci_bd_dhcp_label:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ bd: database
+ state: query
+
+- name: Remove a DHCP Relay Label for a Bridge Domain
+ cisco.aci.aci_bd_dhcp_label:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ bd: database
+ dhcp_label: label1
+ scope: infra
+ state: absent
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ bd=dict(type='str', aliases=['bd_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ dhcp_label=dict(type='str', aliases=['name']), # Not required for querying all objects
+ dhcp_option=dict(type='str'),
+ scope=dict(type='str', default='infra', choices=['infra', 'tenant'], aliases=['owner']), # Not required for querying all objects
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['bd', 'tenant', 'dhcp_label', 'scope']],
+ ['state', 'present', ['bd', 'tenant', 'dhcp_label', 'scope']],
+ ],
+ )
+
+ tenant = module.params.get('tenant')
+ bd = module.params.get('bd')
+ description = module.params.get('description')
+ dhcp_label = module.params.get('dhcp_label')
+ dhcp_option = module.params.get('dhcp_option')
+ scope = module.params.get('scope')
+ state = module.params.get('state')
+
+ aci = ACIModule(module)
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='fvBD',
+ aci_rn='BD-{0}'.format(bd),
+ module_object=bd,
+ target_filter={'name': bd},
+ ),
+ subclass_2=dict(
+ aci_class='dhcpLbl',
+ aci_rn='dhcplbl-{0}'.format(dhcp_label),
+ module_object=dhcp_label,
+ target_filter={'name': dhcp_label},
+ ),
+ child_classes=['dhcpRsDhcpOptionPol'],
+ )
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='dhcpLbl',
+ class_config=dict(
+ descr=description,
+ name=dhcp_label,
+ owner=scope,
+ ),
+ child_configs=[
+ {'dhcpRsDhcpOptionPol': {'attributes': {'tnDhcpOptionPolName': dhcp_option}}},
+ ],
+ )
+
+ aci.get_diff(aci_class='dhcpLbl')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd_subnet.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd_subnet.py
new file mode 100644
index 00000000..ac305922
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd_subnet.py
@@ -0,0 +1,467 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_bd_subnet
+short_description: Manage Subnets (fv:Subnet)
+description:
+- Manage Subnets on Cisco ACI fabrics.
+options:
+ bd:
+ description:
+ - The name of the Bridge Domain.
+ type: str
+ aliases: [ bd_name ]
+ description:
+ description:
+ - The description for the Subnet.
+ type: str
+ aliases: [ descr ]
+ enable_vip:
+ description:
+ - Determines if the Subnet should be treated as a VIP; used when the BD is extended to multiple sites.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ gateway:
+ description:
+ - The IPv4 or IPv6 gateway address for the Subnet.
+ type: str
+ aliases: [ gateway_ip ]
+ mask:
+ description:
+ - The subnet mask for the Subnet.
+ - This is the number associated 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:
+ - The IPv6 Neighbor Discovery Prefix Policy to associate with the Subnet.
+ type: str
+ preferred:
+ description:
+ - Determines if the Subnet is preferred over all available Subnets. Only one Subnet per Address Family (IPv4/IPv6).
+ can be preferred in the Bridge Domain.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ route_profile:
+ description:
+ - The Route Profile to the associate with the Subnet.
+ type: str
+ route_profile_l3_out:
+ description:
+ - The L3 Out that contains the associated Route Profile.
+ type: str
+ scope:
+ description:
+ - Determines the scope of the Subnet.
+ - The C(private) option only allows communication with hosts in the same VRF.
+ - The C(public) option allows the Subnet to be advertised outside of the ACI Fabric, and allows communication with
+ hosts in other VRFs.
+ - 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
+ elements: str
+ choices:
+ - private
+ - public
+ - shared
+ subnet_control:
+ description:
+ - Determines the Subnet's Control State.
+ - The C(querier_ip) option is used to treat the gateway_ip as an IGMP querier source IP.
+ - The C(nd_ra) option is used to treat the gateway_ip address as a Neighbor Discovery Router Advertisement Prefix.
+ - The C(no_gw) option is used to remove default gateway functionality from the gateway address.
+ - The APIC defaults to C(nd_ra) when unset during creation.
+ type: str
+ choices: [ nd_ra, no_gw, querier_ip, unspecified ]
+ subnet_name:
+ description:
+ - The name of the Subnet.
+ type: str
+ aliases: [ name ]
+ tenant:
+ description:
+ - The name of the Tenant.
+ type: str
+ aliases: [ tenant_name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(gateway) parameter is the root key used to access the Subnet (not name), so the C(gateway)
+ is required when the state is C(absent) or C(present).
+- The C(tenant) and C(bd) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module and M(cisco.aci.aci_bd) can be used for these.
+seealso:
+- module: cisco.aci.aci_bd
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fv:Subnet).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+EXAMPLES = r'''
+- name: Create a tenant
+ cisco.aci.aci_tenant:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ state: present
+ delegate_to: localhost
+
+- name: Create a bridge domain
+ cisco.aci.aci_bd:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ bd: database
+ state: present
+ delegate_to: localhost
+
+- name: Create a subnet
+ cisco.aci.aci_bd_subnet:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ bd: database
+ gateway: 10.1.1.1
+ mask: 24
+ state: present
+ delegate_to: localhost
+
+- name: Create a subnet with options
+ cisco.aci.aci_bd_subnet:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ bd: database
+ subnet_name: sql
+ gateway: 10.1.2.1
+ mask: 23
+ description: SQL Servers
+ scope: public
+ route_profile_l3_out: corp
+ route_profile: corp_route_profile
+ state: present
+ delegate_to: localhost
+
+- name: Update a subnets scope to private and shared
+ cisco.aci.aci_bd_subnet:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ bd: database
+ gateway: 10.1.1.1
+ mask: 24
+ scope: [private, shared]
+ state: present
+ delegate_to: localhost
+
+- name: Get all subnets
+ cisco.aci.aci_bd_subnet:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+
+- name: Get all subnets of specific gateway in specified tenant
+ cisco.aci.aci_bd_subnet:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ gateway: 10.1.1.1
+ mask: 24
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Get specific subnet
+ cisco.aci.aci_bd_subnet:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ bd: database
+ gateway: 10.1.1.1
+ mask: 24
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Delete a subnet
+ cisco.aci.aci_bd_subnet:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ bd: database
+ gateway: 10.1.1.1
+ mask: 24
+ state: absent
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+SUBNET_CONTROL_MAPPING = dict(
+ nd_ra='nd',
+ no_gw='no-default-gateway',
+ querier_ip='querier',
+ unspecified='',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ bd=dict(type='str', aliases=['bd_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ enable_vip=dict(type='bool'),
+ gateway=dict(type='str', aliases=['gateway_ip']), # Not required for querying all objects
+ mask=dict(type='int', aliases=['subnet_mask']), # Not required for querying all objects
+ subnet_name=dict(type='str', aliases=['name']),
+ nd_prefix_policy=dict(type='str'),
+ preferred=dict(type='bool'),
+ route_profile=dict(type='str'),
+ route_profile_l3_out=dict(type='str'),
+ scope=dict(type='list', elements='str', choices=['private', 'public', 'shared']),
+ subnet_control=dict(type='str', choices=['nd_ra', 'no_gw', 'querier_ip', 'unspecified']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_together=[['gateway', 'mask']],
+ required_if=[
+ ['state', 'present', ['bd', 'gateway', 'mask', 'tenant']],
+ ['state', 'absent', ['bd', 'gateway', 'mask', 'tenant']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ description = module.params.get('description')
+ enable_vip = aci.boolean(module.params.get('enable_vip'))
+ tenant = module.params.get('tenant')
+ bd = module.params.get('bd')
+ gateway = module.params.get('gateway')
+ mask = module.params.get('mask')
+ if mask is not None and mask not in range(0, 129):
+ # TODO: split checks between IPv4 and IPv6 Addresses
+ module.fail_json(msg='Valid Subnet Masks are 0 to 32 for IPv4 Addresses and 0 to 128 for IPv6 addresses')
+ if gateway is not None:
+ gateway = '{0}/{1}'.format(gateway, str(mask))
+ subnet_name = module.params.get('subnet_name')
+ nd_prefix_policy = module.params.get('nd_prefix_policy')
+ preferred = aci.boolean(module.params.get('preferred'))
+ route_profile = module.params.get('route_profile')
+ route_profile_l3_out = module.params.get('route_profile_l3_out')
+ scope = module.params.get('scope')
+ if scope is not None:
+ if 'private' in scope and 'public' in scope:
+ module.fail_json(msg="Parameter 'scope' cannot be both 'private' and 'public', got: %s" % scope)
+ else:
+ scope = ','.join(sorted(scope))
+ state = module.params.get('state')
+ subnet_control = module.params.get('subnet_control')
+ if subnet_control:
+ subnet_control = SUBNET_CONTROL_MAPPING[subnet_control]
+ name_alias = module.params.get('name_alias')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='fvBD',
+ aci_rn='BD-{0}'.format(bd),
+ module_object=bd,
+ target_filter={'name': bd},
+ ),
+ subclass_2=dict(
+ aci_class='fvSubnet',
+ aci_rn='subnet-[{0}]'.format(gateway),
+ module_object=gateway,
+ target_filter={'ip': gateway},
+ ),
+ child_classes=['fvRsBDSubnetToProfile', 'fvRsNdPfxPol'],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvSubnet',
+ class_config=dict(
+ ctrl=subnet_control,
+ descr=description,
+ ip=gateway,
+ name=subnet_name,
+ preferred=preferred,
+ scope=scope,
+ virtual=enable_vip,
+ nameAlias=name_alias,
+ ),
+ child_configs=[
+ {'fvRsBDSubnetToProfile': {'attributes': {'tnL3extOutName': route_profile_l3_out, 'tnRtctrlProfileName': route_profile}}},
+ {'fvRsNdPfxPol': {'attributes': {'tnNdPfxPolName': nd_prefix_policy}}},
+ ],
+ )
+
+ aci.get_diff(aci_class='fvSubnet')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd_to_l3out.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd_to_l3out.py
new file mode 100644
index 00000000..c50bafad
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_bd_to_l3out.py
@@ -0,0 +1,240 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_bd_to_l3out
+short_description: Bind Bridge Domain to L3 Out (fv:RsBDToOut)
+description:
+- Bind Bridge Domain to L3 Out on Cisco ACI fabrics.
+options:
+ bd:
+ description:
+ - The name of the Bridge Domain.
+ type: str
+ aliases: [ bd_name, bridge_domain ]
+ l3out:
+ description:
+ - The name of the l3out to associate with th Bridge Domain.
+ type: str
+ tenant:
+ description:
+ - The name of the Tenant.
+ type: str
+ aliases: [ tenant_name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(bd) and C(l3out) parameters should exist before using this module.
+ The M(cisco.aci.aci_bd) and C(aci_l3out) can be used for these.
+seealso:
+- module: cisco.aci.aci_bd
+- module: cisco.aci.aci_l3out
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fv:RsBDToOut).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+# FIXME: Add examples
+EXAMPLES = r''' # '''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+SUBNET_CONTROL_MAPPING = dict(
+ nd_ra='nd',
+ no_gw='no-default-gateway',
+ querier_ip='querier',
+ unspecified='',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ bd=dict(type='str', aliases=['bd_name', 'bridge_domain']), # Not required for querying all objects
+ l3out=dict(type='str'), # Not required for querying all objects
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['bd', 'l3out', 'tenant']],
+ ['state', 'absent', ['bd', 'l3out', 'tenant']],
+ ],
+ )
+
+ bd = module.params.get('bd')
+ l3out = module.params.get('l3out')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='fvBD',
+ aci_rn='BD-{0}'.format(bd),
+ module_object=bd,
+ target_filter={'name': bd},
+ ),
+ subclass_2=dict(
+ aci_class='fvRsBDToOut',
+ aci_rn='rsBDToOut-{0}'.format(l3out),
+ module_object=l3out,
+ target_filter={'tnL3extOutName': l3out},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvRsBDToOut',
+ class_config=dict(tnL3extOutName=l3out),
+ )
+
+ aci.get_diff(aci_class='fvRsBDToOut')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_cidr.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_cidr.py
new file mode 100644
index 00000000..8a8cbc49
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_cidr.py
@@ -0,0 +1,292 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, nkatarmal-crest <nirav.katarmal@crestdatasys.com>
+# Copyright: (c) 2020, Cindy Zhao <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+DOCUMENTATION = r'''
+---
+module: aci_cloud_cidr
+short_description: Manage CIDR under Cloud Context Profile (cloud:Cidr)
+description:
+- Manage Cloud CIDR on Cisco Cloud ACI.
+author:
+- Nirav (@nirav)
+- Cindy Zhao (@cizhao)
+options:
+ address:
+ description:
+ - CIDR ip and its netmask.
+ type: str
+ aliases: [ cidr ]
+ description:
+ description:
+ - Description of the Cloud CIDR.
+ type: str
+ name_alias:
+ description:
+ - An alias for the name of the current object. This relates to the nameAlias field in ACI and is used to rename object without changing the DN.
+ type: str
+ tenant:
+ description:
+ - The name of the Tenant.
+ type: str
+ required: yes
+ cloud_context_profile:
+ description:
+ - The name of the Cloud Context Profile.
+ type: str
+ required: yes
+ 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
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- This module is only used to manage non_primary Cloud CIDR, see M(cisco.aci.aci_cloud_ctx_profile) to create the primary CIDR.
+- More information about the internal APIC class B(cloud:Cidr) from
+ L(the APIC Management Information Model reference,https://developer.cisco.com/docs/apic-mim-ref/).
+'''
+
+EXAMPLES = r'''
+- name: Create non_primary CIDR
+ cisco.aci.aci_cloud_cidr:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenantName
+ address: 10.10.0.0/16
+ cloud_context_profile: ctxProfileName
+ state: present
+ delegate_to: localhost
+
+- name: Remove non_primary CIDR
+ cisco.aci.aci_cloud_cidr:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenantName
+ address: 10.10.0.0/16
+ cloud_context_profile: ctxProfileName
+ state: absent
+ delegate_to: localhost
+
+- name: Query all CIDRs under given cloud context profile
+ cisco.aci.aci_cloud_cidr:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenantName
+ cloud_context_profile: ctxProfileName
+ state: query
+ delegate_to: localhost
+
+- name: Query specific CIDR under given cloud context profile
+ cisco.aci.aci_cloud_cidr:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenantName
+ cloud_context_profile: ctxProfileName
+ address: 10.10.0.0/16
+ state: query
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ address=dict(type='str', aliases=['cidr']),
+ description=dict(type='str'),
+ name_alias=dict(type='str'),
+ tenant=dict(type='str', required=True),
+ cloud_context_profile=dict(type='str', required=True),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['address']],
+ ['state', 'present', ['address']],
+ ],
+ )
+
+ address = module.params.get('address')
+ description = module.params.get('description')
+ name_alias = module.params.get('name_alias')
+ tenant = module.params.get('tenant')
+ cloud_context_profile = module.params.get('cloud_context_profile')
+ state = module.params.get('state')
+ child_configs = []
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ target_filter='eq(fvTenant.name, "{0}")'.format(tenant),
+ module_object=tenant
+ ),
+ subclass_1=dict(
+ aci_class='cloudCtxProfile',
+ aci_rn='ctxprofile-{0}'.format(cloud_context_profile),
+ target_filter='eq(cloudCtxProfile.name, "{0}")'.format(cloud_context_profile),
+ module_object=cloud_context_profile
+ ),
+ subclass_2=dict(
+ aci_class='cloudCidr',
+ aci_rn='cidr-[{0}]'.format(address),
+ target_filter='eq(cloudCidr.addr, "{0}")'.format(address),
+ module_object=address
+ ),
+
+ child_classes=[]
+
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='cloudCidr',
+ class_config=dict(
+ addr=address,
+ descr=description,
+ nameAlias=name_alias,
+ primary='no',
+ ),
+ child_configs=child_configs
+ )
+
+ aci.get_diff(aci_class='cloudCidr')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_ctx_profile.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_ctx_profile.py
new file mode 100644
index 00000000..7fdb3b08
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_ctx_profile.py
@@ -0,0 +1,318 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, nkatarmal-crest <nirav.katarmal@crestdatasys.com>
+# Copyright: (c) 2020, Cindy Zhao <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+DOCUMENTATION = r'''
+---
+module: aci_cloud_ctx_profile
+short_description: Manage Cloud Context Profile (cloud:CtxProfile)
+description:
+- Manage the Cloud Context Profile objects on Cisco Cloud ACI.
+notes:
+- More information about the internal APIC class B(cloud:CtxProfile) from
+ L(the APIC Management Information Model reference,https://developer.cisco.com/docs/apic-mim-ref/).
+author:
+- Nirav (@crestdatasys)
+- Cindy Zhao (@cizhao)
+options:
+ name:
+ description:
+ - The name of the Cloud Context Profile
+ type: str
+ aliases: [ cloud_context_profile ]
+ description:
+ description:
+ - Description of the Cloud Context Profile
+ type: str
+ name_alias:
+ description:
+ - An alias for the name of the current object. This relates to the nameAlias field in ACI and is used to rename object without changing the DN
+ type: str
+ tenant:
+ description:
+ - The name of the Tenant.
+ type: str
+ primary_cidr:
+ description:
+ - The subnet with netmask to use as primary CIDR block for the Cloud Context Profile.
+ type: str
+ vrf:
+ description:
+ - The name of the VRF.
+ type: str
+ region:
+ description:
+ - The name of the cloud region in which to deploy the network construct.
+ type: str
+ cloud:
+ description:
+ - The cloud vendor in which the controller runs.
+ choices: [ aws, azure ]
+ type: str
+ 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 ]
+ type: str
+ default: present
+
+extends_documentation_fragment:
+- cisco.aci.aci
+'''
+
+EXAMPLES = r'''
+- name: Add a new aci cloud ctx profile
+ cisco.aci.aci_cloud_ctx_profile:
+ host: apic_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenant_1
+ name: cloud_ctx_profile
+ vrf: VRF1
+ region: us-west-1
+ cloud: aws
+ primary_cidr: '10.0.10.1/16'
+ state: present
+ delegate_to: localhost
+
+- name: Remove an aci cloud ctx profile
+ cisco.aci.aci_cloud_ctx_profile:
+ host: apic_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenant_1
+ name: cloud_ctx_profile
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific aci cloud ctx profile
+ cisco.aci.aci_cloud_ctx_profile:
+ host: apic_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: anstest
+ name: ctx_profile_1
+ state: query
+ delegate_to: localhost
+
+- name: Query all aci cloud ctx profile
+ cisco.aci.aci_cloud_ctx_profile:
+ host: apic_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: anstest
+ state: query
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ description=dict(type='str',),
+ name=dict(type='str', aliases=['cloud_context_profile']),
+ name_alias=dict(type='str',),
+ tenant=dict(type='str',),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ primary_cidr=dict(type='str',),
+ # FIXME: didn't find the flow_log in UI
+ # flow_log=dict(type='str'),
+ vrf=dict(type='str'),
+ region=dict(type='str'),
+ cloud=dict(type='str', choices=['aws', 'azure'])
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['name', 'tenant']],
+ ['state', 'present', ['name', 'tenant', 'vrf', 'region', 'primary_cidr', 'cloud']],
+ ],
+ )
+
+ description = module.params.get('description')
+ name = module.params.get('name')
+ name_alias = module.params.get('name_alias')
+ tenant = module.params.get('tenant')
+ state = module.params.get('state')
+ primary_cidr = module.params.get('primary_cidr')
+ child_configs = []
+
+ vrf = module.params.get('vrf')
+ region = module.params.get('region')
+ cloud = module.params.get('cloud')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ target_filter='eq(fvTenant.name, "{0}")'.format(tenant),
+ module_object=tenant
+ ),
+ subclass_1=dict(
+ aci_class='cloudCtxProfile',
+ aci_rn='ctxprofile-{0}'.format(name),
+ target_filter='eq(cloudCtxProfile.name, "{0}")'.format(name),
+ module_object=name
+ ),
+ child_classes=['cloudRsToCtx', 'cloudRsCtxProfileToRegion', 'cloudRouterP', 'cloudCidr']
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ child_configs.append(dict(cloudRsToCtx=dict(attributes=dict(tnFvCtxName=vrf))))
+ child_configs.append(dict(
+ cloudRsCtxProfileToRegion=dict(
+ attributes=dict(
+ tDn="uni/clouddomp/provp-{0}/region-{1}".format(cloud, region)
+ )
+ )
+ ))
+ child_configs.append(dict(
+ cloudCidr=dict(
+ attributes=dict(
+ addr=primary_cidr,
+ primary="yes"
+ )
+ )
+ ))
+ aci.payload(
+ aci_class='cloudCtxProfile',
+ class_config=dict(
+ descr=description,
+ name=name,
+ name_alias=name_alias,
+ type='regular',
+ ),
+ child_configs=child_configs
+ )
+
+ aci.get_diff(aci_class='cloudCtxProfile')
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_provider.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_provider.py
new file mode 100644
index 00000000..a236d34d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_provider.py
@@ -0,0 +1,178 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+DOCUMENTATION = r'''
+---
+module: aci_cloud_provider
+short_description: Query Cloud Provider information (cloud:ProvP)
+description:
+- Query Cloud Provider information (cloud:ProvP) on Cisco Cloud ACI.
+author:
+- Lionel Hercot (@lhercot)
+options:
+ state:
+ description:
+ - Use C(query) for listing an object or multiple objects.
+ choices: [ query ]
+ default: query
+ type: str
+notes:
+- More information about the internal APIC class B(cloud:ProvP) from
+ L(the APIC Management Information Model reference,https://developer.cisco.com/docs/apic-mim-ref/).
+- This module is used to query Cloud Provider information.
+
+extends_documentation_fragment:
+- cisco.aci.aci
+'''
+
+EXAMPLES = r'''
+- name: Query cloud provider information
+ cisco.aci.aci_cloud_provider:
+ host: apic
+ username: userName
+ password: somePassword
+ validate_certs: no
+ state: query
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ state=dict(type='str', default='query', choices=['query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='cloudProvP'
+ )
+ )
+
+ aci.get_existing()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_region.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_region.py
new file mode 100644
index 00000000..6ae8dad0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_region.py
@@ -0,0 +1,219 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, nkatarmal-crest <nirav.katarmal@crestdatasys.com>
+# Copyright: (c) 2020, Cindy Zhao <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+DOCUMENTATION = r'''
+---
+module: aci_cloud_region
+short_description: Manage Cloud Providers Region (cloud:Region)
+description:
+- Manage Cloud Providers Region on Cisco Cloud ACI.
+author:
+- Nirav (@nirav)
+- Cindy Zhao (@cizhao)
+options:
+ region:
+ description:
+ - The name of the cloud provider's region.
+ aliases: [ name ]
+ type: str
+ cloud:
+ description:
+ - The vendor of the controller
+ choices: [ aws, azure ]
+ type: str
+ required: yes
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ choices: [ query ]
+ default: query
+ type: str
+notes:
+- More information about the internal APIC class B(cloud:Region) from
+ L(the APIC Management Information Model reference,https://developer.cisco.com/docs/apic-mim-ref/).
+- This module is used to query Cloud Providers Region.
+
+extends_documentation_fragment:
+- cisco.aci.aci
+'''
+
+EXAMPLES = r'''
+- name: Query all regions
+ cisco.aci.aci_cloud_region:
+ host: apic
+ username: userName
+ password: somePassword
+ validate_certs: no
+ cloud: 'aws'
+ state: query
+ delegate_to: localhost
+
+- name: Query a specific region
+ cisco.aci.aci_cloud_region:
+ host: apic
+ username: userName
+ password: somePassword
+ validate_certs: no
+ cloud: 'aws'
+ region: eu-west-2
+ state: query
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ region=dict(type='str', aliases=["name"]),
+ cloud=dict(type='str', choices=['aws', 'azure'], required=True),
+ state=dict(type='str', default='query', choices=['query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ region = module.params.get('region')
+ cloud = module.params.get('cloud')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='cloudProvP',
+ aci_rn='clouddomp/provp-{0}'.format(cloud),
+ target_filter='eq(cloudProvP.vendor, "{0}")'.format(cloud),
+ module_object=cloud
+ ),
+ subclass_1=dict(
+ aci_class='cloudRegion',
+ aci_rn='region-{0}'.format(region),
+ target_filter='eq(cloudRegion.name, "{0}")'.format(region),
+ module_object=region
+ ),
+ child_classes=[]
+ )
+
+ aci.get_existing()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_subnet.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_subnet.py
new file mode 100644
index 00000000..4d17d80b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_subnet.py
@@ -0,0 +1,330 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, nkatarmal-crest <nirav.katarmal@crestdatasys.com>
+# Copyright: (c) 2020, Cindy Zhao <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+DOCUMENTATION = r'''
+---
+module: aci_cloud_subnet
+short_description: Manage Cloud Subnet (cloud:Subnet)
+description:
+- Manage Cloud Subnet on Cisco Cloud ACI.
+notes:
+- More information about the internal APIC class B(cloud:Subnet) from
+ L(the APIC Management Information Model reference,https://developer.cisco.com/docs/apic-mim-ref/).
+author:
+- Nirav (@nirav)
+- Cindy Zhao (@cizhao)
+options:
+ name:
+ description:
+ - The name of the Cloud Subnet.
+ type: str
+ description:
+ description:
+ - Description of the Cloud Subnet.
+ type: str
+ address:
+ description:
+ - Ip address of the Cloud Subnet.
+ type: str
+ aliases: [subnet]
+ name_alias:
+ description:
+ - An alias for the name of the current object. This relates to the nameAlias field in ACI and is used to rename object without changing the DN.
+ type: str
+ tenant:
+ description:
+ - The name of tenant.
+ type: str
+ required: yes
+ cloud_context_profile:
+ description:
+ - The name of cloud context profile.
+ type: str
+ required: yes
+ cidr:
+ description:
+ - Address of cloud cidr.
+ type: str
+ required: yes
+ availability_zone:
+ description:
+ - The cloud zone which is attached to the given cloud context profile.
+ - Only used when it is an aws cloud apic.
+ type: str
+ vnet_gateway:
+ description:
+ - Determine if a vNet Gateway Router will be deployed or not.
+ - Only used when it is an azure cloud apic.
+ type: bool
+ 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
+ type: str
+
+extends_documentation_fragment:
+- cisco.aci.aci
+'''
+
+EXAMPLES = r'''
+- name: Create aci cloud subnet
+ cisco.aci.aci_cloud_subnet:
+ host: apic
+ username: userName
+ password: somePassword
+ validate_certs: no
+ tenant: anstest
+ cloud_context_profile: aws_cloudCtxProfile
+ cidr: '10.10.0.0/16'
+ availability_zone: us-west-1a
+ address: 10.10.0.1
+ delegate_to: localhost
+
+- name: Query a specific subnet
+ cisco.aci.aci_cloud_subnet:
+ host: apic
+ username: userName
+ password: somePassword
+ validate_certs: no
+ tenant: anstest
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.10.0.0/16'
+ address: 10.10.0.1
+ state: query
+ delegate_to: localhost
+
+- name: Query all subnets
+ cisco.aci.aci_cloud_subnet:
+ host: apic
+ username: userName
+ password: somePassword
+ validate_certs: no
+ tenant: anstest
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.10.0.0/16'
+ state: query
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ name=dict(type='str', aliases=['subnet']),
+ description=dict(type='str'),
+ address=dict(type='str'),
+ name_alias=dict(type='str'),
+ vnet_gateway=dict(type='bool', default=False),
+ tenant=dict(type='str', required=True),
+ cloud_context_profile=dict(type='str', required=True),
+ cidr=dict(type='str', required=True),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ availability_zone=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['address']],
+ ['state', 'present', ['address']],
+ ],
+ )
+
+ name = module.params.get('name')
+ description = module.params.get('description')
+ address = module.params.get('address')
+ name_alias = module.params.get('name_alias')
+ vnet_gateway = module.params.get('vnet_gateway')
+ tenant = module.params.get('tenant')
+ cloud_context_profile = module.params.get('cloud_context_profile')
+ cidr = module.params.get('cidr')
+ state = module.params.get('state')
+ availability_zone = module.params.get('availability_zone')
+ child_configs = []
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ target_filter='eq(fvTenant.name, "{0}")'.format(tenant),
+ module_object=tenant
+ ),
+ subclass_1=dict(
+ aci_class='cloudCtxProfile',
+ aci_rn='ctxprofile-{0}'.format(cloud_context_profile),
+ target_filter='eq(cloudCtxProfile.name, "{0}")'.format(cloud_context_profile),
+ module_object=cloud_context_profile
+ ),
+ subclass_2=dict(
+ aci_class='cloudCidr',
+ aci_rn='cidr-[{0}]'.format(cidr),
+ target_filter='eq(cloudCidr.addr, "{0}")'.format(cidr),
+ module_object=cidr
+ ),
+ subclass_3=dict(
+ aci_class='cloudSubnet',
+ aci_rn='subnet-[{0}]'.format(address),
+ target_filter='eq(cloudSubnet.ip, "{0}")'.format(address),
+ module_object=address
+ ),
+ child_classes=['cloudRsZoneAttach']
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ # in aws cloud apic
+ if availability_zone:
+ region = availability_zone[:-1]
+ tDn = 'uni/clouddomp/provp-aws/region-{0}/zone-{1}'.format(region, availability_zone)
+ child_configs.append({'cloudRsZoneAttach': {'attributes': {'tDn': tDn}}})
+ # in azure cloud apic
+ if vnet_gateway:
+ usage = 'gateway'
+ else:
+ usage = 'user'
+
+ aci.payload(
+ aci_class='cloudSubnet',
+ class_config=dict(
+ name=name,
+ descr=description,
+ ip=address,
+ nameAlias=name_alias,
+ scope='private',
+ usage=usage,
+ ),
+ child_configs=child_configs
+ )
+
+ aci.get_diff(aci_class='cloudSubnet')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_vpn_gateway.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_vpn_gateway.py
new file mode 100644
index 00000000..9b286dc8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_vpn_gateway.py
@@ -0,0 +1,253 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Cindy Zhao <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+DOCUMENTATION = r'''
+---
+module: aci_cloud_vpn_gateway
+short_description: Manage cloudRouterP in Cloud Context Profile (cloud:cloudRouterP)
+description:
+- Manage cloudRouterP objects on Cisco Cloud ACI.
+notes:
+- More information about the internal APIC class B(cloud:cloudRouterP) from
+ L(the APIC Management Information Model reference,https://developer.cisco.com/docs/apic-mim-ref/).
+author:
+- Cindy Zhao (@cizhao)
+options:
+ tenant:
+ description:
+ - The name of tenant.
+ type: str
+ required: yes
+ cloud_context_profile:
+ description:
+ - The name of cloud context profile.
+ type: str
+ required: yes
+ 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 ]
+ type: str
+ default: query
+
+extends_documentation_fragment:
+- cisco.aci.aci
+'''
+
+EXAMPLES = r'''
+- name: Enable VpnGateway
+ cisco.aci.aci_cloud_vpn_gateway:
+ host: apic_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ state: present
+ delegate_to: localhost
+
+- name: Disable VpnGateway
+ cisco.aci.aci_cloud_vpn_gateway:
+ host: apic_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ state: absent
+ delegate_to: localhost
+
+- name: Query VpnGateway
+ cisco.aci.aci_cloud_vpn_gateway:
+ host: apic_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', required=True),
+ cloud_context_profile=dict(type='str', required=True),
+ state=dict(type='str', default='query', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ tenant = module.params.get('tenant')
+ cloud_context_profile = module.params.get('cloud_context_profile')
+ state = module.params.get('state')
+ child_configs = []
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ target_filter='eq(fvTenant.name, "{0}")'.format(tenant),
+ module_object=tenant
+ ),
+ subclass_1=dict(
+ aci_class='cloudCtxProfile',
+ aci_rn='ctxprofile-{0}'.format(cloud_context_profile),
+ target_filter='eq(cloudCtxProfile.name, "{0}")'.format(cloud_context_profile),
+ module_object=cloud_context_profile
+ ),
+ subclass_2=dict(
+ aci_class='cloudRouterP',
+ aci_rn="routerp-default",
+ target_filter='eq(cloudRouterP.name, "default")',
+ module_object="default"
+ ),
+ child_classes=['cloudRsToVpnGwPol', 'cloudRsToHostRouterPol', 'cloudIntNetworkP']
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ child_configs.append(dict(
+ cloudIntNetworkP=dict(
+ attributes=dict(
+ name="default"
+ )
+ )
+ ))
+ aci.payload(
+ aci_class='cloudRouterP',
+ class_config=dict(
+ name="default"
+ ),
+ child_configs=child_configs
+ )
+
+ aci.get_diff(aci_class='cloudRouterP')
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_zone.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_zone.py
new file mode 100644
index 00000000..be85f18e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_cloud_zone.py
@@ -0,0 +1,233 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, nkatarmal-crest <nirav.katarmal@crestdatasys.com>
+# Copyright: (c) 2020, Cindy Zhao <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+DOCUMENTATION = r'''
+---
+module: aci_cloud_zone
+short_description: Manage Cloud Availability Zone (cloud:Zone)
+description:
+- Manage Cloud Availability Zone on Cisco Cloud ACI.
+notes:
+- More information about the internal APIC class B(cloud:Zone) from
+ L(the APIC Management Information Model reference,https://developer.cisco.com/docs/apic-mim-ref/).
+- This module is used to query Cloud Availability Zone.
+author:
+- Nirav (@nirav)
+- Cindy Zhao (@cizhao)
+options:
+ name:
+ description:
+ - object name
+ aliases: [ zone ]
+ type: str
+ cloud:
+ description:
+ - The cloud provider.
+ choices: [ aws, azure ]
+ type: str
+ required: yes
+ region:
+ description:
+ - The name of the cloud provider's region.
+ type: str
+ required: yes
+ state:
+ description:
+ - Use C(query) for listing an object or multiple objects.
+ choices: [ query ]
+ default: query
+ type: str
+
+extends_documentation_fragment:
+- cisco.aci.aci
+'''
+
+EXAMPLES = r'''
+- name: Query all zones in a region
+ cisco.aci.aci_cloud_zone:
+ host: apic
+ username: userName
+ password: somePassword
+ validate_certs: no
+ cloud: 'aws'
+ region: regionName
+ state: query
+ delegate_to: localhost
+
+- name: Query a specific zone
+ cisco.aci.aci_cloud_zone:
+ host: apic
+ username: userName
+ password: somePassword
+ validate_certs: no
+ cloud: 'aws'
+ region: regionName
+ zone: zoneName
+ state: query
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ name=dict(type='str', aliases=['zone']),
+ cloud=dict(type='str', choices=['aws', 'azure'], required=True),
+ region=dict(type='str', required=True),
+ state=dict(type='str', default='query', choices=['query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ name = module.params.get('name')
+ cloud = module.params.get('cloud')
+ region = module.params.get('region')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='cloudProvP',
+ aci_rn='clouddomp/provp-{0}'.format(cloud),
+ target_filter='eq(cloudProvP.vendor, "{0}")'.format(cloud),
+ module_object=cloud
+ ),
+ subclass_1=dict(
+ aci_class='cloudRegion',
+ aci_rn='region-{0}'.format(region),
+ target_filter='eq(cloudRegion.name, "{0}")'.format(region),
+ module_object=region
+ ),
+ subclass_2=dict(
+ aci_class='cloudZone',
+ aci_rn='zone-{0}'.format(name),
+ target_filter='eq(cloudZone.name, "{0}")'.format(name),
+ module_object=name
+ ),
+ child_classes=[]
+ )
+
+ aci.get_existing()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_config_rollback.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_config_rollback.py
new file mode 100644
index 00000000..fb8ffc19
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_config_rollback.py
@@ -0,0 +1,321 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_config_rollback
+short_description: Provides rollback and rollback preview functionality (config:ImportP)
+description:
+- Provides rollback and rollback preview functionality for Cisco ACI fabrics.
+- Config Rollbacks are done using snapshots C(aci_snapshot) with the configImportP class.
+options:
+ compare_export_policy:
+ description:
+ - The export policy that the C(compare_snapshot) is associated to.
+ type: str
+ compare_snapshot:
+ description:
+ - The name of the snapshot to compare with C(snapshot).
+ type: str
+ description:
+ description:
+ - The description for the Import Policy.
+ type: str
+ aliases: [ descr ]
+ export_policy:
+ description:
+ - The export policy that the C(snapshot) is associated to.
+ type: str
+ fail_on_decrypt:
+ description:
+ - Determines if the APIC should fail the rollback if unable to decrypt secured data.
+ - The APIC defaults to C(yes) when unset.
+ type: bool
+ import_mode:
+ description:
+ - Determines how the import should be handled by the APIC.
+ - The APIC defaults to C(atomic) when unset.
+ type: str
+ choices: [ atomic, best-effort ]
+ import_policy:
+ description:
+ - The name of the Import Policy to use for config rollback.
+ type: str
+ import_type:
+ description:
+ - Determines how the current and snapshot configuration should be compared for replacement.
+ - The APIC defaults to C(replace) when unset.
+ type: str
+ choices: [ merge, replace ]
+ snapshot:
+ description:
+ - The name of the snapshot to rollback to, or the base snapshot to use for comparison.
+ - The C(aci_snapshot) module can be used to query the list of available snapshots.
+ type: str
+ required: yes
+ state:
+ description:
+ - Use C(preview) for previewing the diff between two snapshots.
+ - Use C(rollback) for reverting the configuration to a previous snapshot.
+ type: str
+ choices: [ preview, rollback ]
+ default: rollback
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- module: cisco.aci.aci_config_snapshot
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(config:ImportP).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+EXAMPLES = r'''
+---
+- name: Create a Snapshot
+ cisco.aci.aci_config_snapshot:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ export_policy: config_backup
+ state: present
+ delegate_to: localhost
+
+- name: Query Existing Snapshots
+ cisco.aci.aci_config_snapshot:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ export_policy: config_backup
+ state: query
+ delegate_to: localhost
+
+- name: Compare Snapshot Files
+ cisco.aci.aci_config_rollback:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ export_policy: config_backup
+ snapshot: run-2017-08-28T06-24-01
+ compare_export_policy: config_backup
+ compare_snapshot: run-2017-08-27T23-43-56
+ state: preview
+ delegate_to: localhost
+
+- name: Rollback Configuration
+ cisco.aci.aci_config_rollback:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ import_policy: rollback_config
+ export_policy: config_backup
+ snapshot: run-2017-08-28T06-24-01
+ state: rollback
+ delegate_to: localhost
+
+- name: Rollback Configuration
+ cisco.aci.aci_config_rollback:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ import_policy: rollback_config
+ export_policy: config_backup
+ snapshot: run-2017-08-28T06-24-01
+ description: Rollback 8-27 changes
+ import_mode: atomic
+ import_type: replace
+ fail_on_decrypt: yes
+ state: rollback
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+preview:
+ description: A preview between two snapshots
+ returned: when state is preview
+ type: str
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils._text import to_bytes
+from ansible.module_utils.urls import fetch_url
+
+# Optional, only used for rollback preview
+try:
+ import lxml.etree
+ from xmljson import cobra
+ XML_TO_JSON = True
+except ImportError:
+ XML_TO_JSON = False
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ compare_export_policy=dict(type='str'),
+ compare_snapshot=dict(type='str'),
+ description=dict(type='str', aliases=['descr']),
+ export_policy=dict(type='str'),
+ fail_on_decrypt=dict(type='bool'),
+ import_mode=dict(type='str', choices=['atomic', 'best-effort']),
+ import_policy=dict(type='str'),
+ import_type=dict(type='str', choices=['merge', 'replace']),
+ snapshot=dict(type='str', required=True),
+ state=dict(type='str', default='rollback', choices=['preview', 'rollback']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=False,
+ required_if=[
+ ['state', 'preview', ['compare_export_policy', 'compare_snapshot']],
+ ['state', 'rollback', ['import_policy']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ description = module.params.get('description')
+ export_policy = module.params.get('export_policy')
+ fail_on_decrypt = aci.boolean(module.params.get('fail_on_decrypt'))
+ import_mode = module.params.get('import_mode')
+ import_policy = module.params.get('import_policy')
+ import_type = module.params.get('import_type')
+ snapshot = module.params.get('snapshot')
+ state = module.params.get('state')
+
+ if state == 'rollback':
+ if snapshot.startswith('run-'):
+ snapshot = snapshot.replace('run-', '', 1)
+
+ if not snapshot.endswith('.tar.gz'):
+ snapshot += '.tar.gz'
+
+ filename = 'ce2_{0}-{1}'.format(export_policy, snapshot)
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='configImportP',
+ aci_rn='fabric/configimp-{0}'.format(import_policy),
+ module_object=import_policy,
+ target_filter={'name': import_policy},
+ ),
+ )
+
+ aci.get_existing()
+
+ aci.payload(
+ aci_class='configImportP',
+ class_config=dict(
+ adminSt='triggered',
+ descr=description,
+ failOnDecryptErrors=fail_on_decrypt,
+ fileName=filename,
+ importMode=import_mode,
+ importType=import_type,
+ name=import_policy,
+ snapshot='yes',
+ ),
+ )
+
+ aci.get_diff(aci_class='configImportP')
+
+ aci.post_config()
+
+ elif state == 'preview':
+ aci.url = '%(protocol)s://%(host)s/mqapi2/snapshots.diff.xml' % module.params
+ aci.filter_string = (
+ '?s1dn=uni/backupst/snapshots-[uni/fabric/configexp-%(export_policy)s]/snapshot-%(snapshot)s&'
+ 's2dn=uni/backupst/snapshots-[uni/fabric/configexp-%(compare_export_policy)s]/snapshot-%(compare_snapshot)s'
+ ) % module.params
+
+ # Generate rollback comparison
+ get_preview(aci)
+
+ aci.exit_json()
+
+
+def get_preview(aci):
+ '''
+ This function is used to generate a preview between two snapshots and add the parsed results to the aci module return data.
+ '''
+ uri = aci.url + aci.filter_string
+ resp, info = fetch_url(aci.module, uri, headers=aci.headers, method='GET', timeout=aci.module.params.get('timeout'),
+ use_proxy=aci.module.params.get('use_proxy'))
+ aci.method = 'GET'
+ aci.response = info.get('msg')
+ aci.status = info.get('status')
+
+ # Handle APIC response
+ if info.get('status') == 200:
+ xml_to_json(aci, resp.read())
+ else:
+ aci.result['raw'] = resp.read()
+ aci.fail_json(msg="Request failed: %(code)s %(text)s (see 'raw' output)" % aci.error)
+
+
+def xml_to_json(aci, response_data):
+ '''
+ This function is used to convert preview XML data into JSON.
+ '''
+ if XML_TO_JSON:
+ xml = lxml.etree.fromstring(to_bytes(response_data))
+ xmldata = cobra.data(xml)
+ aci.result['preview'] = xmldata
+ else:
+ aci.result['preview'] = response_data
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_config_snapshot.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_config_snapshot.py
new file mode 100644
index 00000000..8f71ca01
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_config_snapshot.py
@@ -0,0 +1,337 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_config_snapshot
+short_description: Manage Config Snapshots (config:Snapshot, config:ExportP)
+description:
+- Manage Config Snapshots on Cisco ACI fabrics.
+- Creating new Snapshots is done using the configExportP class.
+- Removing Snapshots is done using the configSnapshot class.
+options:
+ description:
+ description:
+ - The description for the Config Export Policy.
+ type: str
+ aliases: [ descr ]
+ export_policy:
+ description:
+ - The name of the Export Policy to use for Config Snapshots.
+ type: str
+ aliases: [ name ]
+ format:
+ description:
+ - Sets the config backup to be formatted in JSON or XML.
+ - The APIC defaults to C(json) when unset.
+ type: str
+ choices: [ json, xml ]
+ include_secure:
+ description:
+ - Determines if secure information should be included in the backup.
+ - The APIC defaults to C(yes) when unset.
+ type: bool
+ max_count:
+ description:
+ - 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.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The APIC does not provide a mechanism for naming the snapshots.
+- 'Snapshot files use the following naming structure: ce_<config export policy name>-<yyyy>-<mm>-<dd>T<hh>:<mm>:<ss>.<mss>+<hh>:<mm>.'
+- 'Snapshot objects use the following naming structure: run-<yyyy>-<mm>-<dd>T<hh>-<mm>-<ss>.'
+seealso:
+- module: cisco.aci.aci_config_rollback
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(config:Snapshot) and B(config:ExportP).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+EXAMPLES = r'''
+- name: Create a Snapshot
+ cisco.aci.aci_config_snapshot:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: present
+ export_policy: config_backup
+ max_count: 10
+ description: Backups taken before new configs are applied.
+ delegate_to: localhost
+
+- name: Query all Snapshots
+ cisco.aci.aci_config_snapshot:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query Snapshots associated with a particular Export Policy
+ cisco.aci.aci_config_snapshot:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ export_policy: config_backup
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Delete a Snapshot
+ cisco.aci.aci_config_snapshot:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ export_policy: config_backup
+ snapshot: run-2017-08-24T17-20-05
+ state: absent
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ description=dict(type='str', aliases=['descr']),
+ export_policy=dict(type='str', aliases=['name']), # Not required for querying all objects
+ format=dict(type='str', choices=['json', 'xml']),
+ include_secure=dict(type='bool'),
+ max_count=dict(type='int'),
+ snapshot=dict(type='str'),
+ state=dict(type='str', choices=['absent', 'present', 'query'], default='present'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=False,
+ required_if=[
+ ['state', 'absent', ['export_policy', 'snapshot']],
+ ['state', 'present', ['export_policy']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ description = module.params.get('description')
+ export_policy = module.params.get('export_policy')
+ file_format = module.params.get('format')
+ include_secure = aci.boolean(module.params.get('include_secure'))
+ max_count = module.params.get('max_count')
+ if max_count is not None:
+ if max_count in range(1, 11):
+ max_count = str(max_count)
+ else:
+ module.fail_json(msg="Parameter 'max_count' must be a number between 1 and 10")
+ snapshot = module.params.get('snapshot')
+ if snapshot is not None and not snapshot.startswith('run-'):
+ snapshot = 'run-' + snapshot
+ state = module.params.get('state')
+
+ if state == 'present':
+ aci.construct_url(
+ root_class=dict(
+ aci_class='configExportP',
+ aci_rn='fabric/configexp-{0}'.format(export_policy),
+ module_object=export_policy,
+ target_filter={'name': export_policy},
+ ),
+ )
+
+ aci.get_existing()
+
+ aci.payload(
+ aci_class='configExportP',
+ class_config=dict(
+ adminSt='triggered',
+ descr=description,
+ format=file_format,
+ includeSecureFields=include_secure,
+ maxSnapshotCount=max_count,
+ name=export_policy,
+ snapshot='yes',
+ ),
+ )
+
+ aci.get_diff('configExportP')
+
+ # Create a new Snapshot
+ aci.post_config()
+
+ else:
+ # Prefix the proper url to export_policy
+ if export_policy is not None:
+ export_policy = 'uni/fabric/configexp-{0}'.format(export_policy)
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='configSnapshotCont',
+ aci_rn='backupst/snapshots-[{0}]'.format(export_policy),
+ module_object=export_policy,
+ target_filter={'name': export_policy},
+ ),
+ subclass_1=dict(
+ aci_class='configSnapshot',
+ aci_rn='snapshot-{0}'.format(snapshot),
+ module_object=snapshot,
+ target_filter={'name': snapshot},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'absent':
+ # Build POST request to used to remove Snapshot
+ aci.payload(
+ aci_class='configSnapshot',
+ class_config=dict(
+ name=snapshot,
+ retire="yes",
+ ),
+ )
+
+ if aci.existing:
+ aci.get_diff('configSnapshot')
+
+ # Mark Snapshot for Deletion
+ aci.post_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_contract.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_contract.py
new file mode 100644
index 00000000..36f6e00f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_contract.py
@@ -0,0 +1,312 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_contract
+short_description: Manage contract resources (vz:BrCP)
+description:
+- Manage Contract resources on Cisco ACI fabrics.
+options:
+ contract:
+ description:
+ - The name of the contract.
+ type: str
+ aliases: [ contract_name, name ]
+ description:
+ description:
+ - Description for the contract.
+ type: str
+ aliases: [ descr ]
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ aliases: [ tenant_name ]
+ scope:
+ description:
+ - The scope of a service contract.
+ - The APIC defaults to C(context) when unset during creation.
+ type: str
+ choices: [ application-profile, context, global, tenant ]
+ priority:
+ description:
+ - The desired QoS class to be used.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ level1, level2, level3, unspecified ]
+ dscp:
+ description:
+ - The target Differentiated Service (DSCP) value.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ AF11, AF12, AF13, AF21, AF22, AF23, AF31, AF32, AF33, AF41, AF42, AF43, CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7, EF, VA, unspecified ]
+ aliases: [ target ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- This module does not manage Contract Subjects, see M(cisco.aci.aci_contract_subject) to do this.
+ Contract Subjects can still be removed using this module.
+- The C(tenant) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module can be used for this.
+seealso:
+- module: cisco.aci.aci_contract_subject
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(vz:BrCP).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Add a new contract
+ cisco.aci.aci_contract:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ contract: web_to_db
+ description: Communication between web-servers and database
+ scope: application-profile
+ state: present
+ delegate_to: localhost
+
+- name: Remove an existing contract
+ cisco.aci.aci_contract:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ contract: web_to_db
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific contract
+ cisco.aci.aci_contract:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ contract: web_to_db
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all contracts
+ cisco.aci.aci_contract:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ contract=dict(type='str', aliases=['contract_name', 'name']), # Not required for querying all objects
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ scope=dict(type='str', choices=['application-profile', 'context', 'global', 'tenant']),
+ priority=dict(type='str', choices=['level1', 'level2', 'level3', 'unspecified']), # No default provided on purpose
+ dscp=dict(type='str',
+ choices=['AF11', 'AF12', 'AF13', 'AF21', 'AF22', 'AF23', 'AF31', 'AF32', 'AF33', 'AF41', 'AF42', 'AF43',
+ 'CS0', 'CS1', 'CS2', 'CS3', 'CS4', 'CS5', 'CS6', 'CS7', 'EF', 'VA', 'unspecified'],
+ aliases=['target']), # No default provided on purpose
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['contract', 'tenant']],
+ ['state', 'present', ['contract', 'tenant']],
+ ],
+ )
+
+ contract = module.params.get('contract')
+ description = module.params.get('description')
+ scope = module.params.get('scope')
+ priority = module.params.get('priority')
+ dscp = module.params.get('dscp')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='vzBrCP',
+ aci_rn='brc-{0}'.format(contract),
+ module_object=contract,
+ target_filter={'name': contract},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='vzBrCP',
+ class_config=dict(
+ name=contract,
+ descr=description,
+ scope=scope,
+ prio=priority,
+ targetDscp=dscp,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='vzBrCP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_contract_subject.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_contract_subject.py
new file mode 100644
index 00000000..24fc8ed0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_contract_subject.py
@@ -0,0 +1,358 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_contract_subject
+short_description: Manage initial Contract Subjects (vz:Subj)
+description:
+- Manage initial Contract Subjects on Cisco ACI fabrics.
+options:
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ aliases: [ tenant_name ]
+ subject:
+ description:
+ - The contract subject name.
+ type: str
+ aliases: [ contract_subject, name, subject_name ]
+ contract:
+ description:
+ - The name of the Contract.
+ type: str
+ aliases: [ contract_name ]
+ reverse_filter:
+ description:
+ - Determines if the APIC should reverse the src and dst ports to allow the
+ return traffic back, since ACI is stateless filter.
+ - The APIC defaults to C(yes) when unset during creation.
+ type: bool
+ priority:
+ description:
+ - The QoS class.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ level1, level2, level3, unspecified ]
+ dscp:
+ description:
+ - The target DSCP.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ AF11, AF12, AF13, AF21, AF22, AF23, AF31, AF32, AF33, AF41, AF42, AF43,
+ CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7, EF, VA, unspecified ]
+ aliases: [ target ]
+ description:
+ description:
+ - Description for the contract subject.
+ type: str
+ aliases: [ descr ]
+ consumer_match:
+ description:
+ - The match criteria across consumers.
+ - The APIC defaults to C(at_least_one) when unset during creation.
+ type: str
+ choices: [ all, at_least_one, at_most_one, none ]
+ provider_match:
+ description:
+ - The match criteria across providers.
+ - The APIC defaults to C(at_least_one) when unset during creation.
+ type: str
+ choices: [ all, at_least_one, at_most_one, none ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) and C(contract) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) and M(cisco.aci.aci_contract) modules can be used for this.
+seealso:
+- module: cisco.aci.aci_contract
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(vz:Subj).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Swetha Chunduri (@schunduri)
+'''
+
+EXAMPLES = r'''
+- name: Add a new contract subject
+ cisco.aci.aci_contract_subject:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ contract: web_to_db
+ subject: default
+ description: test
+ reverse_filter: yes
+ priority: level1
+ dscp: unspecified
+ state: present
+ register: query_result
+
+- name: Remove a contract subject
+ cisco.aci.aci_contract_subject:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ contract: web_to_db
+ subject: default
+ state: absent
+ delegate_to: localhost
+
+- name: Query a contract subject
+ cisco.aci.aci_contract_subject:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ contract: web_to_db
+ subject: default
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all contract subjects
+ cisco.aci.aci_contract_subject:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+MATCH_MAPPING = dict(
+ all='All',
+ at_least_one='AtleastOne',
+ at_most_one='AtmostOne',
+ none='None',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ contract=dict(type='str', aliases=['contract_name']), # Not required for querying all objects
+ subject=dict(type='str', aliases=['contract_subject', 'name', 'subject_name']), # Not required for querying all objects
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ priority=dict(type='str', choices=['unspecified', 'level1', 'level2', 'level3']),
+ reverse_filter=dict(type='bool'),
+ dscp=dict(type='str', aliases=['target'],
+ choices=['AF11', 'AF12', 'AF13', 'AF21', 'AF22', 'AF23', 'AF31', 'AF32', 'AF33', 'AF41', 'AF42', 'AF43',
+ 'CS0', 'CS1', 'CS2', 'CS3', 'CS4', 'CS5', 'CS6', 'CS7', 'EF', 'VA', 'unspecified']),
+ description=dict(type='str', aliases=['descr']),
+ consumer_match=dict(type='str', choices=['all', 'at_least_one', 'at_most_one', 'none']),
+ provider_match=dict(type='str', choices=['all', 'at_least_one', 'at_most_one', 'none']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['contract', 'subject', 'tenant']],
+ ['state', 'present', ['contract', 'subject', 'tenant']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ subject = module.params.get('subject')
+ priority = module.params.get('priority')
+ reverse_filter = aci.boolean(module.params.get('reverse_filter'))
+ contract = module.params.get('contract')
+ dscp = module.params.get('dscp')
+ description = module.params.get('description')
+ consumer_match = module.params.get('consumer_match')
+ if consumer_match is not None:
+ consumer_match = MATCH_MAPPING.get(consumer_match)
+ provider_match = module.params.get('provider_match')
+ if provider_match is not None:
+ provider_match = MATCH_MAPPING.get(provider_match)
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='vzBrCP',
+ aci_rn='brc-{0}'.format(contract),
+ module_object=contract,
+ target_filter={'name': contract},
+ ),
+ subclass_2=dict(
+ aci_class='vzSubj',
+ aci_rn='subj-{0}'.format(subject),
+ module_object=subject,
+ target_filter={'name': subject},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='vzSubj',
+ class_config=dict(
+ name=subject,
+ prio=priority,
+ revFltPorts=reverse_filter,
+ targetDscp=dscp,
+ consMatchT=consumer_match,
+ provMatchT=provider_match,
+ descr=description,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='vzSubj')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_contract_subject_to_filter.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_contract_subject_to_filter.py
new file mode 100644
index 00000000..5698295a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_contract_subject_to_filter.py
@@ -0,0 +1,319 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_contract_subject_to_filter
+short_description: Bind Contract Subjects to Filters (vz:RsSubjFiltAtt)
+description:
+- Bind Contract Subjects to Filters on Cisco ACI fabrics.
+options:
+ contract:
+ description:
+ - The name of the contract.
+ type: str
+ aliases: [ contract_name ]
+ filter:
+ description:
+ - The name of the Filter to bind to the Subject.
+ type: str
+ aliases: [ filter_name ]
+ log:
+ description:
+ - Determines if the binding should be set to log.
+ - The APIC defaults to C(none) when unset during creation.
+ type: str
+ choices: [ log, none ]
+ aliases: [ directive ]
+ subject:
+ description:
+ - The name of the Contract Subject.
+ type: str
+ aliases: [ contract_subject, subject_name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ aliases: [ tenant_name ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant), C(contract), C(subject), and C(filter_name) must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant), M(cisco.aci.aci_contract), M(cisco.aci.aci_contract_subject), and M(cisco.aci.aci_filter) modules can be used for these.
+seealso:
+- module: cisco.aci.aci_contract_subject
+- module: cisco.aci.aci_filter
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(vz:RsSubjFiltAtt).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+EXAMPLES = r'''
+- name: Add a new contract subject to filer binding
+ cisco.aci.aci_contract_subject_to_filter:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ contract: web_to_db
+ subject: test
+ filter: '{{ filter }}'
+ log: '{{ log }}'
+ state: present
+ delegate_to: localhost
+
+- name: Remove an existing contract subject to filter binding
+ cisco.aci.aci_contract_subject_to_filter:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ contract: web_to_db
+ subject: test
+ filter: '{{ filter }}'
+ log: '{{ log }}'
+ state: present
+ delegate_to: localhost
+
+- name: Query a specific contract subject to filter binding
+ cisco.aci.aci_contract_subject_to_filter:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ contract: web_to_db
+ subject: test
+ filter: '{{ filter }}'
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all contract subject to filter bindings
+ cisco.aci.aci_contract_subject_to_filter:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ contract: web_to_db
+ subject: test
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ contract=dict(type='str', aliases=['contract_name']), # Not required for querying all objects
+ filter=dict(type='str', aliases=['filter_name']), # Not required for querying all objects
+ subject=dict(type='str', aliases=['contract_subject', 'subject_name']), # Not required for querying all objects
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ log=dict(type='str', choices=['log', 'none'], aliases=['directive']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['contract', 'filter', 'subject', 'tenant']],
+ ['state', 'present', ['contract', 'filter', 'subject', 'tenant']],
+ ],
+ )
+
+ contract = module.params.get('contract')
+ filter_name = module.params.get('filter')
+ log = module.params.get('log')
+ subject = module.params.get('subject')
+ tenant = module.params.get('tenant')
+ state = module.params.get('state')
+
+ # Add subject_filter key to modul.params for building the URL
+ module.params['subject_filter'] = filter_name
+
+ # Convert log to empty string if none, as that is what API expects. An empty string is not a good option to present the user.
+ if log == 'none':
+ log = ''
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='vzBrCP',
+ aci_rn='brc-{0}'.format(contract),
+ module_object=contract,
+ target_filter={'name': contract},
+ ),
+ subclass_2=dict(
+ aci_class='vzSubj',
+ aci_rn='subj-{0}'.format(subject),
+ module_object=subject,
+ target_filter={'name': subject},
+ ),
+ subclass_3=dict(
+ aci_class='vzRsSubjFiltAtt',
+ aci_rn='rssubjFiltAtt-{0}'.format(filter_name),
+ module_object=filter_name,
+ target_filter={'tnVzFilterName': filter_name},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='vzRsSubjFiltAtt',
+ class_config=dict(
+ tnVzFilterName=filter_name,
+ directives=log,
+ ),
+ )
+
+ aci.get_diff(aci_class='vzRsSubjFiltAtt')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ # Remove subject_filter used to build URL from module.params
+ module.params.pop('subject_filter')
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_domain.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_domain.py
new file mode 100644
index 00000000..82ee9a32
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_domain.py
@@ -0,0 +1,395 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_domain
+short_description: Manage physical, virtual, bridged, routed or FC domain profiles (phys:DomP, vmm:DomP, l2ext:DomP, l3ext:DomP, fc:DomP)
+description:
+- Manage physical, virtual, bridged, routed or FC domain profiles on Cisco ACI fabrics.
+options:
+ domain:
+ description:
+ - Name of the physical, virtual, bridged routed or FC domain profile.
+ type: str
+ aliases: [ domain_name, domain_profile, name ]
+ domain_type:
+ description:
+ - The type of domain profile.
+ - 'C(fc): The FC domain profile is a policy pertaining to single FC Management domain'
+ - 'C(l2dom): The external bridged domain profile is a policy for managing L2 bridged infrastructure bridged outside the fabric.'
+ - 'C(l3dom): The external routed domain profile is a policy for managing L3 routed infrastructure outside the fabric.'
+ - 'C(phys): The physical domain profile stores the physical resources and encap resources that should be used for EPGs associated with this domain.'
+ - 'C(vmm): The VMM domain profile is a policy for grouping VM controllers with similar networking policy requirements.'
+ type: str
+ required: yes
+ choices: [ fc, l2dom, l3dom, phys, vmm ]
+ aliases: [ type ]
+ dscp:
+ description:
+ - The target Differentiated Service (DSCP) value.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ AF11, AF12, AF13, AF21, AF22, AF23, AF31, AF32, AF33, AF41, AF42, AF43, CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7, EF, VA, unspecified ]
+ aliases: [ target ]
+ encap_mode:
+ description:
+ - The layer 2 encapsulation protocol to use with the virtual switch.
+ type: str
+ choices: [ unknown, vlan, vxlan ]
+ multicast_address:
+ description:
+ - The multicast IP address to use for the virtual switch.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+ vm_provider:
+ description:
+ - The VM platform for VMM Domains.
+ - Support for Kubernetes was added in ACI v3.0.
+ - Support for CloudFoundry, OpenShift and Red Hat was added in ACI v3.1.
+ type: str
+ choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
+ vswitch:
+ description:
+ - The virtual switch to use for vmm domains.
+ - The APIC defaults to C(default) when unset during creation.
+ type: str
+ choices: [ avs, default, dvs, unknown ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- module: cisco.aci.aci_aep_to_domain
+- module: cisco.aci.aci_domain_to_encap_pool
+- module: cisco.aci.aci_domain_to_vlan_pool
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(phys:DomP),
+ B(vmm:DomP), B(l2ext:DomP), B(l3ext:DomP) and B(fc:DomP)
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Add a new physical domain
+ cisco.aci.aci_domain:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: phys_dom
+ domain_type: phys
+ state: present
+
+- name: Remove a physical domain
+ cisco.aci.aci_domain:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: phys_dom
+ domain_type: phys
+ state: absent
+
+- name: Add a new VMM domain
+ cisco.aci.aci_domain:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: hyperv_dom
+ domain_type: vmm
+ vm_provider: microsoft
+ state: present
+ delegate_to: localhost
+
+- name: Remove a VMM domain
+ cisco.aci.aci_domain:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: hyperv_dom
+ domain_type: vmm
+ vm_provider: microsoft
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific physical domain
+ cisco.aci.aci_domain:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: phys_dom
+ domain_type: phys
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all domains
+ cisco.aci.aci_domain:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain_type: phys
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+VM_PROVIDER_MAPPING = dict(
+ cloudfoundry='CloudFoundry',
+ kubernetes='Kubernetes',
+ microsoft='Microsoft',
+ openshift='OpenShift',
+ openstack='OpenStack',
+ redhat='Redhat',
+ vmware='VMware',
+)
+
+VSWITCH_MAPPING = dict(
+ avs='n1kv',
+ default='default',
+ dvs='default',
+ unknown='unknown',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ domain_type=dict(type='str', required=True, choices=['fc', 'l2dom', 'l3dom', 'phys', 'vmm'], aliases=['type']),
+ domain=dict(type='str', aliases=['domain_name', 'domain_profile', 'name']), # Not required for querying all objects
+ dscp=dict(type='str',
+ choices=['AF11', 'AF12', 'AF13', 'AF21', 'AF22', 'AF23', 'AF31', 'AF32', 'AF33', 'AF41', 'AF42', 'AF43',
+ 'CS0', 'CS1', 'CS2', 'CS3', 'CS4', 'CS5', 'CS6', 'CS7', 'EF', 'VA', 'unspecified'],
+ aliases=['target']),
+ encap_mode=dict(type='str', choices=['unknown', 'vlan', 'vxlan']),
+ multicast_address=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ vm_provider=dict(type='str', choices=['cloudfoundry', 'kubernetes', 'microsoft', 'openshift', 'openstack', 'redhat', 'vmware']),
+ vswitch=dict(type='str', choices=['avs', 'default', 'dvs', 'unknown']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['domain_type', 'vmm', ['vm_provider']],
+ ['state', 'absent', ['domain', 'domain_type']],
+ ['state', 'present', ['domain', 'domain_type']],
+ ],
+ )
+
+ dscp = module.params.get('dscp')
+ domain = module.params.get('domain')
+ domain_type = module.params.get('domain_type')
+ encap_mode = module.params.get('encap_mode')
+ multicast_address = module.params.get('multicast_address')
+ vm_provider = module.params.get('vm_provider')
+ vswitch = module.params.get('vswitch')
+ if vswitch is not None:
+ vswitch = VSWITCH_MAPPING.get(vswitch)
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ if domain_type != 'vmm':
+ if vm_provider is not None:
+ module.fail_json(msg="Domain type '{0}' cannot have parameter 'vm_provider'".format(domain_type))
+ if encap_mode is not None:
+ module.fail_json(msg="Domain type '{0}' cannot have parameter 'encap_mode'".format(domain_type))
+ if multicast_address is not None:
+ module.fail_json(msg="Domain type '{0}' cannot have parameter 'multicast_address'".format(domain_type))
+ if vswitch is not None:
+ module.fail_json(msg="Domain type '{0}' cannot have parameter 'vswitch'".format(domain_type))
+
+ if dscp is not None and domain_type not in ['l2dom', 'l3dom']:
+ module.fail_json(msg="DSCP values can only be assigned to 'l2ext and 'l3ext' domains")
+
+ # Compile the full domain for URL building
+ if domain_type == 'fc':
+ domain_class = 'fcDomP'
+ domain_mo = 'uni/fc-{0}'.format(domain)
+ domain_rn = 'fc-{0}'.format(domain)
+ elif domain_type == 'l2dom':
+ domain_class = 'l2extDomP'
+ domain_mo = 'uni/l2dom-{0}'.format(domain)
+ domain_rn = 'l2dom-{0}'.format(domain)
+ elif domain_type == 'l3dom':
+ domain_class = 'l3extDomP'
+ domain_mo = 'uni/l3dom-{0}'.format(domain)
+ domain_rn = 'l3dom-{0}'.format(domain)
+ elif domain_type == 'phys':
+ domain_class = 'physDomP'
+ domain_mo = 'uni/phys-{0}'.format(domain)
+ domain_rn = 'phys-{0}'.format(domain)
+ elif domain_type == 'vmm':
+ domain_class = 'vmmDomP'
+ domain_mo = 'uni/vmmp-{0}/dom-{1}'.format(VM_PROVIDER_MAPPING.get(vm_provider), domain)
+ domain_rn = 'vmmp-{0}/dom-{1}'.format(VM_PROVIDER_MAPPING.get(vm_provider), domain)
+
+ # Ensure that querying all objects works when only domain_type is provided
+ if domain is None:
+ domain_mo = None
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class=domain_class,
+ aci_rn=domain_rn,
+ module_object=domain_mo,
+ target_filter={'name': domain},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class=domain_class,
+ class_config=dict(
+ encapMode=encap_mode,
+ mcastAddr=multicast_address,
+ mode=vswitch,
+ name=domain,
+ targetDscp=dscp,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class=domain_class)
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_domain_to_encap_pool.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_domain_to_encap_pool.py
new file mode 100644
index 00000000..a571cfb3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_domain_to_encap_pool.py
@@ -0,0 +1,378 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Dag Wieers <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_domain_to_encap_pool
+short_description: Bind Domain to Encap Pools (infra:RsVlanNs)
+description:
+- Bind Domain to Encap Pools on Cisco ACI fabrics.
+notes:
+- The C(domain) and C(encap_pool) parameters should exist before using this module.
+ The M(cisco.aci.aci_domain) and M(cisco.aci.aci_encap_pool) can be used for these.
+options:
+ domain:
+ description:
+ - Name of the domain being associated with the Encap Pool.
+ type: str
+ aliases: [ domain_name, domain_profile ]
+ domain_type:
+ description:
+ - Determines if the Domain is physical (phys) or virtual (vmm).
+ type: str
+ required: yes
+ choices: [ fc, l2dom, l3dom, phys, vmm ]
+ pool:
+ description:
+ - The name of the pool.
+ type: str
+ aliases: [ pool_name ]
+ pool_allocation_mode:
+ description:
+ - The method used for allocating encaps to resources.
+ - Only vlan and vsan support allocation modes.
+ type: str
+ choices: [ dynamic, static]
+ aliases: [ allocation_mode, mode ]
+ pool_type:
+ description:
+ - The encap type of C(pool).
+ type: str
+ required: yes
+ choices: [ vlan, vsan, vxlan ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ vm_provider:
+ description:
+ - The VM platform for VMM Domains.
+ - Support for Kubernetes was added in ACI v3.0.
+ - Support for CloudFoundry, OpenShift and Red Hat was added in ACI v3.1.
+ type: str
+ choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- module: cisco.aci.aci_domain
+- module: cisco.aci.aci_encap_pool
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(infra:RsVlanNs).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Add domain to VLAN pool binding
+ cisco.aci.aci_domain_to_encap_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: phys_dom
+ domain_type: phys
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ state: present
+ delegate_to: localhost
+
+- name: Remove domain to VLAN pool binding
+ cisco.aci.aci_domain_to_encap_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: phys_dom
+ domain_type: phys
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ state: absent
+ delegate_to: localhost
+
+- name: Query our domain to VLAN pool binding
+ cisco.aci.aci_domain_to_encap_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: phys_dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all domain to VLAN pool bindings
+ cisco.aci.aci_domain_to_encap_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain_type: phys
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+VM_PROVIDER_MAPPING = dict(
+ cloudfoundry='CloudFoundry',
+ kubernetes='Kubernetes',
+ microsoft='Microsoft',
+ openshift='OpenShift',
+ openstack='OpenStack',
+ redhat='Redhat',
+ vmware='VMware',
+)
+
+POOL_MAPPING = dict(
+ vlan=dict(
+ aci_mo='uni/infra/vlanns-{0}',
+ child_class='infraRsVlanNs',
+ ),
+ vxlan=dict(
+ aci_mo='uni/infra/vxlanns-{0}',
+ child_class='vmmRsVxlanNs',
+ ),
+ vsan=dict(
+ aci_mo='uni/infra/vsanns-{0}',
+ child_class='fcRsVsanNs',
+ ),
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ domain_type=dict(type='str', required=True, choices=['fc', 'l2dom', 'l3dom', 'phys', 'vmm']),
+ pool_type=dict(type='str', required=True, choices=['vlan', 'vsan', 'vxlan']),
+ domain=dict(type='str', aliases=['domain_name', 'domain_profile']), # Not required for querying all objects
+ pool=dict(type='str', aliases=['pool_name']), # Not required for querying all objects
+ pool_allocation_mode=dict(type='str', aliases=['allocation_mode', 'mode'], choices=['dynamic', 'static']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ vm_provider=dict(type='str', choices=['cloudfoundry', 'kubernetes', 'microsoft', 'openshift', 'openstack', 'redhat', 'vmware']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['domain_type', 'vmm', ['vm_provider']],
+ ['state', 'absent', ['domain', 'domain_type', 'pool', 'pool_type']],
+ ['state', 'present', ['domain', 'domain_type', 'pool', 'pool_type']],
+ ],
+ )
+
+ domain = module.params.get('domain')
+ domain_type = module.params.get('domain_type')
+ pool = module.params.get('pool')
+ pool_allocation_mode = module.params.get('pool_allocation_mode')
+ pool_type = module.params.get('pool_type')
+ vm_provider = module.params.get('vm_provider')
+ state = module.params.get('state')
+
+ # Report when vm_provider is set when type is not virtual
+ if domain_type != 'vmm' and vm_provider is not None:
+ module.fail_json(msg="Domain type '{0}' cannot have a 'vm_provider'".format(domain_type))
+
+ # ACI Pool URL requires the allocation mode for vlan and vsan pools (ex: uni/infra/vlanns-[poolname]-static)
+ pool_name = pool
+ if pool_type != 'vxlan' and pool is not None:
+ if pool_allocation_mode is not None:
+ pool_name = '[{0}]-{1}'.format(pool, pool_allocation_mode)
+ else:
+ module.fail_json(msg="ACI requires the 'pool_allocation_mode' for 'pool_type' of 'vlan' and 'vsan' when 'pool' is provided")
+
+ # Vxlan pools do not support allocation modes
+ if pool_type == 'vxlan' and pool_allocation_mode is not None:
+ module.fail_json(msg='vxlan pools do not support setting the allocation_mode; please remove this parameter from the task')
+
+ # Compile the full domain for URL building
+ if domain_type == 'fc':
+ domain_class = 'fcDomP'
+ domain_mo = 'uni/fc-{0}'.format(domain)
+ domain_rn = 'fc-{0}'.format(domain)
+ elif domain_type == 'l2dom':
+ domain_class = 'l2extDomP'
+ domain_mo = 'uni/l2dom-{0}'.format(domain)
+ domain_rn = 'l2dom-{0}'.format(domain)
+ elif domain_type == 'l3dom':
+ domain_class = 'l3extDomP'
+ domain_mo = 'uni/l3dom-{0}'.format(domain)
+ domain_rn = 'l3dom-{0}'.format(domain)
+ elif domain_type == 'phys':
+ domain_class = 'physDomP'
+ domain_mo = 'uni/phys-{0}'.format(domain)
+ domain_rn = 'phys-{0}'.format(domain)
+ elif domain_type == 'vmm':
+ domain_class = 'vmmDomP'
+ domain_mo = 'uni/vmmp-{0}/dom-{1}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
+ domain_rn = 'vmmp-{0}/dom-{1}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
+
+ # Ensure that querying all objects works when only domain_type is provided
+ if domain is None:
+ domain_mo = None
+
+ pool_mo = POOL_MAPPING[pool_type]['aci_mo'].format(pool_name)
+ child_class = POOL_MAPPING[pool_type]['child_class']
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class=domain_class,
+ aci_rn=domain_rn,
+ module_object=domain_mo,
+ target_filter={'name': domain},
+ ),
+ child_classes=[child_class],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ # Filter out module params with null values
+ aci.payload(
+ aci_class=domain_class,
+ class_config=dict(name=domain),
+ child_configs=[
+ {child_class: {'attributes': {'tDn': pool_mo}}},
+ ]
+ )
+
+ # Generate config diff which will be used as POST request body
+ aci.get_diff(aci_class=domain_class)
+
+ # Submit changes if module not in check_mode and the proposed is different than existing
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_domain_to_vlan_pool.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_domain_to_vlan_pool.py
new file mode 100644
index 00000000..0e213128
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_domain_to_vlan_pool.py
@@ -0,0 +1,366 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Dag Wieers <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_domain_to_vlan_pool
+short_description: Bind Domain to VLAN Pools (infra:RsVlanNs)
+description:
+- Bind Domain to VLAN Pools on Cisco ACI fabrics.
+options:
+ domain:
+ description:
+ - Name of the domain being associated with the VLAN Pool.
+ type: str
+ aliases: [ domain_name, domain_profile ]
+ domain_type:
+ description:
+ - Determines if the Domain is physical (phys) or virtual (vmm).
+ type: str
+ required: yes
+ choices: [ fc, l2dom, l3dom, phys, vmm ]
+ pool:
+ description:
+ - The name of the pool.
+ type: str
+ aliases: [ pool_name, vlan_pool ]
+ pool_allocation_mode:
+ description:
+ - The method used for allocating VLANs to resources.
+ type: str
+ required: yes
+ choices: [ dynamic, static]
+ aliases: [ allocation_mode, mode ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ vm_provider:
+ description:
+ - The VM platform for VMM Domains.
+ - Support for Kubernetes was added in ACI v3.0.
+ - Support for CloudFoundry, OpenShift and Red Hat was added in ACI v3.1.
+ type: str
+ choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(domain) and C(vlan_pool) parameters should exist before using this module.
+ The M(cisco.aci.aci_domain) and M(cisco.aci.aci_vlan_pool) can be used for these.
+seealso:
+- module: cisco.aci.aci_domain
+- module: cisco.aci.aci_vlan_pool
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(infra:RsVlanNs).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Bind a VMM domain to VLAN pool
+ cisco.aci.aci_domain_to_vlan_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: vmw_dom
+ domain_type: vmm
+ pool: vmw_pool
+ pool_allocation_mode: dynamic
+ vm_provider: vmware
+ state: present
+ delegate_to: localhost
+
+- name: Remove a VMM domain to VLAN pool binding
+ cisco.aci.aci_domain_to_vlan_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: vmw_dom
+ domain_type: vmm
+ pool: vmw_pool
+ pool_allocation_mode: dynamic
+ vm_provider: vmware
+ state: absent
+ delegate_to: localhost
+
+- name: Bind a physical domain to VLAN pool
+ cisco.aci.aci_domain_to_vlan_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: phys_dom
+ domain_type: phys
+ pool: phys_pool
+ pool_allocation_mode: static
+ state: present
+ delegate_to: localhost
+
+- name: Bind a physical domain to VLAN pool
+ cisco.aci.aci_domain_to_vlan_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: phys_dom
+ domain_type: phys
+ pool: phys_pool
+ pool_allocation_mode: static
+ state: absent
+ delegate_to: localhost
+
+- name: Query an domain to VLAN pool binding
+ cisco.aci.aci_domain_to_vlan_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: phys_dom
+ domain_type: phys
+ pool: phys_pool
+ pool_allocation_mode: static
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all domain to VLAN pool bindings
+ cisco.aci.aci_domain_to_vlan_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain_type: phys
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+VM_PROVIDER_MAPPING = dict(
+ cloudfoundry='CloudFoundry',
+ kubernetes='Kubernetes',
+ microsoft='Microsoft',
+ openshift='OpenShift',
+ openstack='OpenStack',
+ redhat='Redhat',
+ vmware='VMware',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ domain_type=dict(type='str', required=True, choices=['fc', 'l2dom', 'l3dom', 'phys', 'vmm']),
+ domain=dict(type='str', aliases=['domain_name', 'domain_profile']), # Not required for querying all objects
+ pool=dict(type='str', aliases=['pool_name', 'vlan_pool']), # Not required for querying all objects
+ pool_allocation_mode=dict(type='str', required=True, aliases=['allocation_mode', 'mode'], choices=['dynamic', 'static']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ vm_provider=dict(type='str', choices=['cloudfoundry', 'kubernetes', 'microsoft', 'openshift', 'openstack', 'redhat', 'vmware']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['domain_type', 'vmm', ['vm_provider']],
+ ['state', 'absent', ['domain', 'domain_type', 'pool']],
+ ['state', 'present', ['domain', 'domain_type', 'pool']],
+ ],
+ )
+
+ domain = module.params.get('domain')
+ domain_type = module.params.get('domain_type')
+ pool = module.params.get('pool')
+ pool_allocation_mode = module.params.get('pool_allocation_mode')
+ vm_provider = module.params.get('vm_provider')
+ state = module.params.get('state')
+
+ # Report when vm_provider is set when type is not virtual
+ if domain_type != 'vmm' and vm_provider is not None:
+ module.fail_json(msg="Domain type '{0}' cannot have a 'vm_provider'".format(domain_type))
+
+ # ACI Pool URL requires the allocation mode for vlan and vsan pools (ex: uni/infra/vlanns-[poolname]-static)
+ pool_name = pool
+ if pool is not None:
+ pool_name = '[{0}]-{1}'.format(pool, pool_allocation_mode)
+
+ # Compile the full domain for URL building
+ if domain_type == 'fc':
+ domain_class = 'fcDomP'
+ domain_mo = 'uni/fc-{0}'.format(domain)
+ domain_rn = 'fc-{0}'.format(domain)
+ elif domain_type == 'l2dom':
+ domain_class = 'l2extDomP'
+ domain_mo = 'uni/l2dom-{0}'.format(domain)
+ domain_rn = 'l2dom-{0}'.format(domain)
+ elif domain_type == 'l3dom':
+ domain_class = 'l3extDomP'
+ domain_mo = 'uni/l3dom-{0}'.format(domain)
+ domain_rn = 'l3dom-{0}'.format(domain)
+ elif domain_type == 'phys':
+ domain_class = 'physDomP'
+ domain_mo = 'uni/phys-{0}'.format(domain)
+ domain_rn = 'phys-{0}'.format(domain)
+ elif domain_type == 'vmm':
+ domain_class = 'vmmDomP'
+ domain_mo = 'uni/vmmp-{0}/dom-{1}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
+ domain_rn = 'vmmp-{0}/dom-{1}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
+
+ # Ensure that querying all objects works when only domain_type is provided
+ if domain is None:
+ domain_mo = None
+
+ aci_mo = 'uni/infra/vlanns-{0}'.format(pool_name)
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class=domain_class,
+ aci_rn=domain_rn,
+ module_object=domain_mo,
+ target_filter={'name': domain},
+ ),
+ child_classes=['infraRsVlanNs'],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class=domain_class,
+ class_config=dict(name=domain),
+ child_configs=[
+ {'infraRsVlanNs': {'attributes': {'tDn': aci_mo}}},
+ ]
+ )
+
+ aci.get_diff(aci_class=domain_class)
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_encap_pool.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_encap_pool.py
new file mode 100644
index 00000000..f35b9342
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_encap_pool.py
@@ -0,0 +1,316 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_encap_pool
+short_description: Manage encap pools (fvns:VlanInstP, fvns:VxlanInstP, fvns:VsanInstP)
+description:
+- Manage vlan, vxlan, and vsan pools on Cisco ACI fabrics.
+options:
+ description:
+ description:
+ - Description for the C(pool).
+ type: str
+ aliases: [ descr ]
+ pool:
+ description:
+ - The name of the pool.
+ type: str
+ aliases: [ name, pool_name ]
+ pool_allocation_mode:
+ description:
+ - The method used for allocating encaps to resources.
+ - Only vlan and vsan support allocation modes.
+ type: str
+ choices: [ dynamic, static ]
+ aliases: [ allocation_mode, mode ]
+ pool_type:
+ description:
+ - The encap type of C(pool).
+ type: str
+ required: yes
+ aliases: [ type ]
+ choices: [ vlan, vsan, vxlan ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- module: cisco.aci.aci_encap_pool_range
+- module: cisco.aci.aci_vlan_pool
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(fvns:VlanInstP),
+ B(fvns:VxlanInstP) and B(fvns:VsanInstP)
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+EXAMPLES = r'''
+- name: Add a new vlan pool
+ cisco.aci.aci_encap_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ pool_type: vlan
+ description: Production VLANs
+ state: present
+ delegate_to: localhost
+
+- name: Remove a vlan pool
+ cisco.aci.aci_encap_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ pool_type: vlan
+ state: absent
+ delegate_to: localhost
+
+- name: Query a vlan pool
+ cisco.aci.aci_encap_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ pool_type: vlan
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all vlan pools
+ cisco.aci.aci_encap_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool_type: vlan
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+ACI_POOL_MAPPING = dict(
+ vlan=dict(
+ aci_class='fvnsVlanInstP',
+ aci_mo='infra/vlanns-',
+ ),
+ vxlan=dict(
+ aci_class='fvnsVxlanInstP',
+ aci_mo='infra/vxlanns-',
+ ),
+ vsan=dict(
+ aci_class='fvnsVsanInstP',
+ aci_mo='infra/vsanns-',
+ ),
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ pool_type=dict(type='str', required=True, aliases=['type'], choices=['vlan', 'vsan', 'vxlan']),
+ description=dict(type='str', aliases=['descr']),
+ pool=dict(type='str', aliases=['name', 'pool_name']), # Not required for querying all objects
+ pool_allocation_mode=dict(type='str', aliases=['allocation_mode', 'mode'], choices=['dynamic', 'static']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['pool']],
+ ['state', 'present', ['pool']],
+ ],
+ )
+
+ description = module.params.get('description')
+ pool = module.params.get('pool')
+ pool_type = module.params.get('pool_type')
+ pool_allocation_mode = module.params.get('pool_allocation_mode')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci_class = ACI_POOL_MAPPING[pool_type]['aci_class']
+ aci_mo = ACI_POOL_MAPPING[pool_type]['aci_mo']
+ pool_name = pool
+
+ # ACI Pool URL requires the pool_allocation mode for vlan and vsan pools (ex: uni/infra/vlanns-[poolname]-static)
+ if pool_type != 'vxlan' and pool is not None:
+ if pool_allocation_mode is not None:
+ pool_name = '[{0}]-{1}'.format(pool, pool_allocation_mode)
+ else:
+ module.fail_json(msg="ACI requires parameter 'pool_allocation_mode' for 'pool_type' of 'vlan' and 'vsan' when parameter 'pool' is provided")
+
+ # Vxlan pools do not support pool allocation modes
+ if pool_type == 'vxlan' and pool_allocation_mode is not None:
+ module.fail_json(msg="vxlan pools do not support setting the 'pool_allocation_mode'; please remove this parameter from the task")
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class=aci_class,
+ aci_rn='{0}{1}'.format(aci_mo, pool_name),
+ module_object=pool,
+ target_filter={'name': pool},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ # Filter out module parameters with null values
+ aci.payload(
+ aci_class=aci_class,
+ class_config=dict(
+ allocMode=pool_allocation_mode,
+ descr=description,
+ name=pool,
+ nameAlias=name_alias,
+ )
+ )
+
+ # Generate config diff which will be used as POST request body
+ aci.get_diff(aci_class=aci_class)
+
+ # Submit changes if module not in check_mode and the proposed is different than existing
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_encap_pool_range.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_encap_pool_range.py
new file mode 100644
index 00000000..8e24fadc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_encap_pool_range.py
@@ -0,0 +1,449 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_encap_pool_range
+short_description: Manage encap ranges assigned to pools (fvns:EncapBlk, fvns:VsanEncapBlk)
+description:
+- Manage vlan, vxlan, and vsan ranges that are assigned to pools on Cisco ACI fabrics.
+options:
+ allocation_mode:
+ description:
+ - The method used for allocating encaps to resources.
+ - Only vlan and vsan support allocation modes.
+ type: str
+ choices: [ dynamic, inherit, static]
+ aliases: [ mode ]
+ description:
+ description:
+ - Description for the pool range.
+ type: str
+ aliases: [ descr ]
+ pool:
+ description:
+ - The name of the pool that the range should be assigned to.
+ type: str
+ aliases: [ pool_name ]
+ pool_allocation_mode:
+ description:
+ - The method used for allocating encaps to resources.
+ - Only vlan and vsan support allocation modes.
+ type: str
+ choices: [ dynamic, static]
+ aliases: [ pool_mode ]
+ pool_type:
+ description:
+ - The encap type of C(pool).
+ type: str
+ required: yes
+ aliases: [ type ]
+ choices: [ vlan, vxlan, vsan]
+ range_end:
+ description:
+ - The end of encap range.
+ type: int
+ aliases: [ end ]
+ range_name:
+ description:
+ - The name to give to the encap range.
+ type: str
+ aliases: [ name, range ]
+ range_start:
+ description:
+ - The start of the encap range.
+ type: int
+ aliases: [ start ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(pool) must exist in order to add or delete a range.
+seealso:
+- module: cisco.aci.aci_encap_pool
+- module: cisco.aci.aci_vlan_pool_encap_block
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(fvns:EncapBlk) and B(fvns:VsanEncapBlk).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+EXAMPLES = r'''
+- name: Add a new VLAN pool range
+ cisco.aci.aci_encap_pool_range:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ pool_type: vlan
+ pool_allocation_mode: static
+ range_name: anstest
+ range_start: 20
+ range_end: 40
+ allocation_mode: inherit
+ state: present
+ delegate_to: localhost
+
+- name: Remove a VLAN pool range
+ cisco.aci.aci_encap_pool_range:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ pool_type: vlan
+ pool_allocation_mode: static
+ range_name: anstest
+ range_start: 20
+ range_end: 40
+ state: absent
+ delegate_to: localhost
+
+- name: Query a VLAN range
+ cisco.aci.aci_encap_pool_range:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ pool_type: vlan
+ pool_allocation_mode: static
+ range_name: anstest
+ range_start: 20
+ range_end: 50
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query a VLAN pool for ranges by range_name
+ cisco.aci.aci_encap_pool_range:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool_type: vlan
+ range_name: anstest
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query a VLAN pool for ranges by range_start
+ cisco.aci.aci_encap_pool_range:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool_type: vlan
+ range_start: 20
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query a VLAN pool for ranges by range_start and range_end
+ cisco.aci.aci_encap_pool_range:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool_type: vlan
+ range_start: 20
+ range_end: 40
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all VLAN pool ranges
+ cisco.aci.aci_encap_pool_range:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool_type: vlan
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+ACI_POOL_MAPPING = dict(
+ vlan=dict(
+ aci_class='fvnsVlanInstP',
+ aci_mo='infra/vlanns-',
+ ),
+ vxlan=dict(
+ aci_class='fvnsVxlanInstP',
+ aci_mo='infra/vxlanns-',
+ ),
+ vsan=dict(
+ aci_class='fvnsVsanInstP',
+ aci_mo='infra/vsanns-',
+ ),
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ pool_type=dict(type='str', required=True, aliases=['type'], choices=['vlan', 'vxlan', 'vsan']),
+ allocation_mode=dict(type='str', aliases=['mode'], choices=['dynamic', 'inherit', 'static']),
+ description=dict(type='str', aliases=['descr']),
+ pool=dict(type='str', aliases=['pool_name']), # Not required for querying all objects
+ pool_allocation_mode=dict(type='str', aliases=['pool_mode'], choices=['dynamic', 'static']),
+ range_end=dict(type='int', aliases=['end']), # Not required for querying all objects
+ range_name=dict(type='str', aliases=["name", "range"]), # Not required for querying all objects
+ range_start=dict(type='int', aliases=["start"]), # Not required for querying all objects
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['pool', 'range_end', 'range_name', 'range_start']],
+ ['state', 'present', ['pool', 'range_end', 'range_name', 'range_start']],
+ ],
+ )
+
+ allocation_mode = module.params.get('allocation_mode')
+ description = module.params.get('description')
+ pool = module.params.get('pool')
+ pool_allocation_mode = module.params.get('pool_allocation_mode')
+ pool_type = module.params.get('pool_type')
+ range_end = module.params.get('range_end')
+ range_name = module.params.get('range_name')
+ range_start = module.params.get('range_start')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ if range_end is not None:
+ encap_end = '{0}-{1}'.format(pool_type, range_end)
+ else:
+ encap_end = None
+
+ if range_start is not None:
+ encap_start = '{0}-{1}'.format(pool_type, range_start)
+ else:
+ encap_start = None
+
+ ACI_RANGE_MAPPING = dict(
+ vlan=dict(
+ aci_class='fvnsEncapBlk',
+ aci_mo='from-[{0}]-to-[{1}]'.format(encap_start, encap_end),
+ ),
+ vxlan=dict(
+ aci_class='fvnsEncapBlk',
+ aci_mo='from-[{0}]-to-[{1}]'.format(encap_start, encap_end),
+ ),
+ vsan=dict(
+ aci_class='fvnsVsanEncapBlk',
+ aci_mo='vsanfrom-[{0}]-to-[{1}]'.format(encap_start, encap_end),
+ ),
+ )
+
+ # Collect proper class and mo information based on pool_type
+ aci_range_class = ACI_RANGE_MAPPING[pool_type]["aci_class"]
+ aci_range_mo = ACI_RANGE_MAPPING[pool_type]["aci_mo"]
+ aci_pool_class = ACI_POOL_MAPPING[pool_type]["aci_class"]
+ aci_pool_mo = ACI_POOL_MAPPING[pool_type]["aci_mo"]
+ pool_name = pool
+
+ # Validate range_end and range_start are valid for its respective encap type
+ for encap_id in range_end, range_start:
+ if encap_id is not None:
+ if pool_type == 'vlan':
+ if not 1 <= encap_id <= 4094:
+ module.fail_json(msg='vlan pools must have "range_start" and "range_end" values between 1 and 4094')
+ elif pool_type == 'vxlan':
+ if not 5000 <= encap_id <= 16777215:
+ module.fail_json(msg='vxlan pools must have "range_start" and "range_end" values between 5000 and 16777215')
+ elif pool_type == 'vsan':
+ if not 1 <= encap_id <= 4093:
+ module.fail_json(msg='vsan pools must have "range_start" and "range_end" values between 1 and 4093')
+
+ if range_end is not None and range_start is not None:
+ # Validate range_start is less than range_end
+ if range_start > range_end:
+ module.fail_json(msg='The "range_start" must be less than or equal to the "range_end"')
+
+ elif range_end is None and range_start is None:
+ if range_name is None:
+ # Reset range managed object to None for aci util to properly handle query
+ aci_range_mo = None
+
+ # Vxlan does not support setting the allocation mode
+ if pool_type == 'vxlan' and allocation_mode is not None:
+ module.fail_json(msg='vxlan pools do not support setting the "allocation_mode"; please omit this parameter for vxlan pools')
+
+ # ACI Pool URL requires the allocation mode for vlan and vsan pools (ex: uni/infra/vlanns-[poolname]-static)
+ if pool_type != 'vxlan' and pool is not None:
+ if pool_allocation_mode is not None:
+ pool_name = '[{0}]-{1}'.format(pool, pool_allocation_mode)
+ else:
+ module.fail_json(msg='ACI requires the "pool_allocation_mode" for "pool_type" of "vlan" and "vsan" when the "pool" is provided')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class=aci_pool_class,
+ aci_rn='{0}{1}'.format(aci_pool_mo, pool_name),
+ module_object=pool,
+ target_filter={'name': pool},
+ ),
+ subclass_1=dict(
+ aci_class=aci_range_class,
+ aci_rn='{0}'.format(aci_range_mo),
+ module_object=aci_range_mo,
+ target_filter={'from': encap_start, 'to': encap_end, 'name': range_name},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class=aci_range_class,
+ class_config={
+ "allocMode": allocation_mode,
+ "descr": description,
+ "from": encap_start,
+ "name": range_name,
+ "to": encap_end,
+ "nameAlias": name_alias,
+ },
+ )
+
+ aci.get_diff(aci_class=aci_range_class)
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg.py
new file mode 100644
index 00000000..986206a8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg.py
@@ -0,0 +1,398 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_epg
+short_description: Manage End Point Groups (EPG) objects (fv:AEPg)
+description:
+- Manage End Point Groups (EPG) on Cisco ACI fabrics.
+options:
+ tenant:
+ description:
+ - Name of an existing tenant.
+ type: str
+ aliases: [ tenant_name ]
+ ap:
+ description:
+ - Name of an existing application network profile, that will contain the EPGs.
+ type: str
+ aliases: [ app_profile, app_profile_name ]
+ epg:
+ description:
+ - Name of the end point group.
+ type: str
+ aliases: [ epg_name, name ]
+ bd:
+ description:
+ - Name of the bridge domain being associated with the EPG.
+ type: str
+ aliases: [ bd_name, bridge_domain ]
+ priority:
+ description:
+ - The QoS class.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ level1, level2, level3, unspecified ]
+ intra_epg_isolation:
+ description:
+ - The Intra EPG Isolation.
+ - The APIC defaults to C(unenforced) when unset during creation.
+ type: str
+ choices: [ enforced, unenforced ]
+ description:
+ description:
+ - Description for the EPG.
+ type: str
+ aliases: [ descr ]
+ fwd_control:
+ description:
+ - The forwarding control used by the EPG.
+ - The APIC defaults to C(none) when unset during creation.
+ type: str
+ choices: [ none, proxy-arp ]
+ preferred_group:
+ description:
+ - Whether ot not the EPG is part of the Preferred Group and can communicate without contracts.
+ - This is very convenient for migration scenarios, or when ACI is used for network automation but not for policy.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ monitoring_policy:
+ description:
+ - The name of the monitoring policy.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) and C(app_profile) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) and M(cisco.aci.aci_ap) modules can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- module: cisco.aci.aci_ap
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fv:AEPg).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Swetha Chunduri (@schunduri)
+- Shreyas Srish (@shrsr)
+'''
+
+EXAMPLES = r'''
+- name: Add a new EPG
+ cisco.aci.aci_epg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ ap: intranet
+ epg: web_epg
+ description: Web Intranet EPG
+ bd: prod_bd
+ monitoring_policy: default
+ preferred_group: yes
+ state: present
+ delegate_to: localhost
+
+- aci_epg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ ap: ticketing
+ epg: "{{ item.epg }}"
+ description: Ticketing EPG
+ bd: "{{ item.bd }}"
+ priority: unspecified
+ intra_epg_isolation: unenforced
+ state: present
+ delegate_to: localhost
+ with_items:
+ - epg: web
+ bd: web_bd
+ - epg: database
+ bd: database_bd
+
+- name: Remove an EPG
+ cisco.aci.aci_epg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ validate_certs: no
+ tenant: production
+ app_profile: intranet
+ epg: web_epg
+ monitoring_policy: default
+ state: absent
+ delegate_to: localhost
+
+- name: Query an EPG
+ cisco.aci.aci_epg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ ap: ticketing
+ epg: web_epg
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all EPGs
+ cisco.aci.aci_epg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all EPGs with a Specific Name
+ cisco.aci.aci_epg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ validate_certs: no
+ epg: web_epg
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all EPGs of an App Profile
+ cisco.aci.aci_epg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ validate_certs: no
+ ap: ticketing
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ epg=dict(type='str', aliases=['epg_name', 'name']), # Not required for querying all objects
+ bd=dict(type='str', aliases=['bd_name', 'bridge_domain']),
+ ap=dict(type='str', aliases=['app_profile', 'app_profile_name']), # Not required for querying all objects
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ priority=dict(type='str', choices=['level1', 'level2', 'level3', 'unspecified']),
+ intra_epg_isolation=dict(choices=['enforced', 'unenforced']),
+ fwd_control=dict(type='str', choices=['none', 'proxy-arp']),
+ preferred_group=dict(type='bool'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ monitoring_policy=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['ap', 'epg', 'tenant']],
+ ['state', 'present', ['ap', 'epg', 'tenant']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ epg = module.params.get('epg')
+ bd = module.params.get('bd')
+ description = module.params.get('description')
+ priority = module.params.get('priority')
+ intra_epg_isolation = module.params.get('intra_epg_isolation')
+ fwd_control = module.params.get('fwd_control')
+ preferred_group = aci.boolean(module.params.get('preferred_group'), 'include', 'exclude')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ ap = module.params.get('ap')
+ name_alias = module.params.get('name_alias')
+ monitoring_policy = module.params.get('monitoring_policy')
+
+ child_configs = [
+ dict(fvRsBd=dict(attributes=dict(tnFvBDName=bd))),
+ dict(fvRsAEPgMonPol=dict(attributes=dict(tnMonEPGPolName=monitoring_policy)))
+ ]
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='fvAp',
+ aci_rn='ap-{0}'.format(ap),
+ module_object=ap,
+ target_filter={'name': ap},
+ ),
+ subclass_2=dict(
+ aci_class='fvAEPg',
+ aci_rn='epg-{0}'.format(epg),
+ module_object=epg,
+ target_filter={'name': epg},
+ ),
+ child_classes=['fvRsBd', 'fvRsAEPgMonPol'],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvAEPg',
+ class_config=dict(
+ name=epg,
+ descr=description,
+ prio=priority,
+ pcEnfPref=intra_epg_isolation,
+ fwdCtrl=fwd_control,
+ prefGrMemb=preferred_group,
+ nameAlias=name_alias,
+ ),
+ child_configs=child_configs,
+ )
+
+ aci.get_diff(aci_class='fvAEPg')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_monitoring_policy.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_monitoring_policy.py
new file mode 100644
index 00000000..aaef8e37
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_monitoring_policy.py
@@ -0,0 +1,246 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_epg_monitoring_policy
+short_description: Manage monitoring policies (mon:EPGPol)
+description:
+- Manage monitoring policies on Cisco ACI fabrics.
+options:
+ monitoring_policy:
+ description:
+ - The name of the monitoring policy.
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - Description for the monitoring policy.
+ type: str
+ aliases: [ descr ]
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ aliases: [ tenant_name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(mon:EPGPol).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- cisco.aci.aci_epg_monitoring_policy:
+ host: '{{ hostname }}'
+ username: '{{ username }}'
+ password: '{{ password }}'
+ monitoring_policy: '{{ monitoring_policy }}'
+ description: '{{ description }}'
+ tenant: '{{ tenant }}'
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ monitoring_policy=dict(type='str', aliases=['name']), # Not required for querying all objects
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['monitoring_policy', 'tenant']],
+ ['state', 'present', ['monitoring_policy', 'tenant']],
+ ],
+ )
+
+ monitoring_policy = module.params.get('monitoring_policy')
+ description = module.params.get('description')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='monEPGPol',
+ aci_rn='monepg-{0}'.format(monitoring_policy),
+ module_object=monitoring_policy,
+ target_filter={'name': monitoring_policy},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='monEPGPol',
+ class_config=dict(
+ name=monitoring_policy,
+ descr=description,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='monEPGPol')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_to_contract.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_to_contract.py
new file mode 100644
index 00000000..45be2dd1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_to_contract.py
@@ -0,0 +1,351 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_epg_to_contract
+short_description: Bind EPGs to Contracts (fv:RsCons, fv:RsProv)
+description:
+- Bind EPGs to Contracts on Cisco ACI fabrics.
+notes:
+- The C(tenant), C(app_profile), C(EPG), and C(Contract) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant), M(cisco.aci.aci_ap), M(cisco.aci.aci_epg), and M(cisco.aci.aci_contract) modules can be used for this.
+options:
+ ap:
+ description:
+ - Name of an existing application network profile, that will contain the EPGs.
+ type: str
+ aliases: [ app_profile, app_profile_name ]
+ contract:
+ description:
+ - The name of the contract.
+ type: str
+ aliases: [ contract_name ]
+ contract_type:
+ description:
+ - Determines if the EPG should Provide or Consume the Contract.
+ type: str
+ required: yes
+ choices: [ consumer, provider ]
+ epg:
+ description:
+ - The name of the end point group.
+ type: str
+ aliases: [ epg_name ]
+ priority:
+ description:
+ - QoS class.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ level1, level2, level3, unspecified ]
+ provider_match:
+ description:
+ - The matching algorithm for Provided Contracts.
+ - The APIC defaults to C(at_least_one) when unset during creation.
+ type: str
+ choices: [ all, at_least_one, at_most_one, none ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ tenant:
+ description:
+ - Name of an existing tenant.
+ type: str
+ aliases: [ tenant_name ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- module: cisco.aci.aci_ap
+- module: cisco.aci.aci_epg
+- module: cisco.aci.aci_contract
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(fv:RsCons) and B(fv:RsProv).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+EXAMPLES = r'''
+- name: Add a new contract to EPG binding
+ cisco.aci.aci_epg_to_contract:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: anstest
+ ap: anstest
+ epg: anstest
+ contract: anstest_http
+ contract_type: provider
+ state: present
+ delegate_to: localhost
+
+- name: Remove an existing contract to EPG binding
+ cisco.aci.aci_epg_to_contract:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: anstest
+ ap: anstest
+ epg: anstest
+ contract: anstest_http
+ contract_type: provider
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific contract to EPG binding
+ cisco.aci.aci_epg_to_contract:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: anstest
+ ap: anstest
+ epg: anstest
+ contract: anstest_http
+ contract_type: provider
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all provider contract to EPG bindings
+ cisco.aci.aci_epg_to_contract:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ contract_type: provider
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+ACI_CLASS_MAPPING = dict(
+ consumer={
+ 'class': 'fvRsCons',
+ 'rn': 'rscons-',
+ },
+ provider={
+ 'class': 'fvRsProv',
+ 'rn': 'rsprov-',
+ },
+)
+
+PROVIDER_MATCH_MAPPING = dict(
+ all='All',
+ at_least_one='AtleastOne',
+ at_most_one='AtmostOne',
+ none='None',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ contract_type=dict(type='str', required=True, choices=['consumer', 'provider']),
+ ap=dict(type='str', aliases=['app_profile', 'app_profile_name']), # Not required for querying all objects
+ epg=dict(type='str', aliases=['epg_name']), # Not required for querying all objects
+ contract=dict(type='str', aliases=['contract_name']), # Not required for querying all objects
+ priority=dict(type='str', choices=['level1', 'level2', 'level3', 'unspecified']),
+ provider_match=dict(type='str', choices=['all', 'at_least_one', 'at_most_one', 'none']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['ap', 'contract', 'epg', 'tenant']],
+ ['state', 'present', ['ap', 'contract', 'epg', 'tenant']],
+ ],
+ )
+
+ ap = module.params.get('ap')
+ contract = module.params.get('contract')
+ contract_type = module.params.get('contract_type')
+ epg = module.params.get('epg')
+ priority = module.params.get('priority')
+ provider_match = module.params.get('provider_match')
+ if provider_match is not None:
+ provider_match = PROVIDER_MATCH_MAPPING[provider_match]
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+
+ aci_class = ACI_CLASS_MAPPING[contract_type]["class"]
+ aci_rn = ACI_CLASS_MAPPING[contract_type]["rn"]
+
+ if contract_type == "consumer" and provider_match is not None:
+ module.fail_json(msg="the 'provider_match' is only configurable for Provided Contracts")
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='fvAp',
+ aci_rn='ap-{0}'.format(ap),
+ module_object=ap,
+ target_filter={'name': ap},
+ ),
+ subclass_2=dict(
+ aci_class='fvAEPg',
+ aci_rn='epg-{0}'.format(epg),
+ module_object=epg,
+ target_filter={'name': epg},
+ ),
+ subclass_3=dict(
+ aci_class=aci_class,
+ aci_rn='{0}{1}'.format(aci_rn, contract),
+ module_object=contract,
+ target_filter={'tnVzBrCPName': contract},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class=aci_class,
+ class_config=dict(
+ matchT=provider_match,
+ prio=priority,
+ tnVzBrCPName=contract,
+ ),
+ )
+
+ aci.get_diff(aci_class=aci_class)
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_to_contract_master.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_to_contract_master.py
new file mode 100644
index 00000000..d2368f7d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_to_contract_master.py
@@ -0,0 +1,302 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Cindy Zhao <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_epg_to_contract_master
+short_description: Manage End Point Group (EPG) contract master relationships (fv:RsSecInherited)
+description:
+- Manage End Point Groups (EPG) contract master relationships on Cisco ACI fabrics.
+options:
+ tenant:
+ description:
+ - Name of an existing tenant.
+ type: str
+ aliases: [ tenant_name ]
+ required: yes
+ ap:
+ description:
+ - Name of an existing application network profile, that will contain the EPGs.
+ type: str
+ required: yes
+ aliases: [ app_profile, app_profile_name ]
+ epg:
+ description:
+ - Name of the end point group.
+ type: str
+ required: yes
+ aliases: [ epg_name, name ]
+ contract_master_ap:
+ description:
+ - Name of the application profile where the contract master EPG is.
+ type: str
+ contract_master_epg:
+ description:
+ - Name of the end point group which serves as contract master.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) and C(app_profile) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) and M(cisco.aci.aci_ap) modules can be used for this.
+seealso:
+- module: cisco.aci.aci_epg
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fv:AEPg).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Cindy Zhao (@cizhao)
+'''
+
+EXAMPLES = r'''
+- name: Add contract master
+ cisco.aci.aci_epg_to_contract_master:
+ host: apic_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: anstest
+ ap: apName
+ epg: epgName
+ contract_master_ap: ap
+ contract_master_epg: epg
+ state: present
+ delegate_to: localhost
+
+- name: Remove contract master
+ cisco.aci.aci_epg_to_contract_master:
+ host: apic_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: anstest
+ ap: apName
+ epg: epgName
+ contract_master_ap: ap
+ contract_master_epg: epg
+ state: absent
+ delegate_to: localhost
+
+- name: Query contract master
+ cisco.aci.aci_epg_to_contract_master:
+ host: apic_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: anstest
+ ap: apName
+ epg: epgName
+ contract_master_ap: ap
+ contract_master_epg: epg
+ state: query
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name'], required=True),
+ ap=dict(type='str', aliases=['app_profile', 'app_profile_name'], required=True),
+ epg=dict(type='str', aliases=['epg_name', 'name'], required=True),
+ contract_master_ap=dict(type='str'),
+ contract_master_epg=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['contract_master_ap', 'contract_master_epg']],
+ ['state', 'present', ['contract_master_ap', 'contract_master_epg']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ tenant = module.params.get('tenant')
+ ap = module.params.get('ap')
+ epg = module.params.get('epg')
+ contract_master_ap = module.params.get('contract_master_ap')
+ contract_master_epg = module.params.get('contract_master_epg')
+ state = module.params.get('state')
+
+ contract_master = 'uni/tn-{0}/ap-{1}/epg-{2}'.format(tenant, contract_master_ap, contract_master_epg)
+
+ child_configs = []
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='fvAp',
+ aci_rn='ap-{0}'.format(ap),
+ module_object=ap,
+ target_filter={'name': ap},
+ ),
+ subclass_2=dict(
+ aci_class='fvAEPg',
+ aci_rn='epg-{0}'.format(epg),
+ module_object=epg,
+ target_filter={'name': epg},
+ ),
+ subclass_3=dict(
+ aci_class='fvRsSecInherited',
+ aci_rn='rssecInherited-[{0}]'.format(contract_master),
+ module_object=contract_master,
+ target_filter={'tDn': contract_master},
+ ),
+ child_classes=[],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvRsSecInherited',
+ class_config=dict(
+ tDn=contract_master
+ ),
+ child_configs=child_configs
+ )
+
+ aci.get_diff(aci_class='fvRsSecInherited')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_to_domain.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_to_domain.py
new file mode 100644
index 00000000..d4b8ea58
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_epg_to_domain.py
@@ -0,0 +1,441 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Jacob McGill <jmcgill298>
+# Copyright: (c) 2020, Shreyas Srish <ssrish@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_epg_to_domain
+short_description: Bind EPGs to Domains (fv:RsDomAtt)
+description:
+- Bind EPGs to Physical and Virtual Domains on Cisco ACI fabrics.
+options:
+ allow_useg:
+ description:
+ - Allows micro-segmentation.
+ - The APIC defaults to C(encap) when unset during creation.
+ type: str
+ choices: [ encap, useg ]
+ ap:
+ description:
+ - Name of an existing application network profile, that will contain the EPGs.
+ type: str
+ aliases: [ app_profile, app_profile_name ]
+ deploy_immediacy:
+ description:
+ - Determines when the policy is pushed to hardware Policy CAM.
+ - The APIC defaults to C(lazy) when unset during creation.
+ type: str
+ choices: [ immediate, lazy ]
+ domain:
+ description:
+ - Name of the physical or virtual domain being associated with the EPG.
+ type: str
+ aliases: [ domain_name, domain_profile ]
+ domain_type:
+ description:
+ - Specify whether the Domain is a physical (phys), a virtual (vmm) or an L2 external domain association (l2dom).
+ type: str
+ choices: [ l2dom, phys, vmm ]
+ aliases: [ type ]
+ encap:
+ description:
+ - The VLAN encapsulation for the EPG when binding a VMM Domain with static C(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 encapsulation method to be used.
+ - The APIC defaults to C(auto) when unset during creation.
+ - If vxlan is selected, switching_mode must be "AVE".
+ type: str
+ choices: [ auto, vlan, vxlan ]
+ switching_mode:
+ description:
+ - Switching Mode used by the switch
+ type: str
+ choices: [ AVE, native ]
+ default: native
+ epg:
+ description:
+ - Name of the end point group.
+ type: str
+ aliases: [ epg_name, name ]
+ netflow:
+ description:
+ - Determines if netflow should be enabled.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ primary_encap:
+ 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.
+ - The APIC defaults to C(lazy) when unset during creation.
+ type: str
+ choices: [ immediate, lazy, pre-provision ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ tenant:
+ description:
+ - Name of an existing tenant.
+ type: str
+ aliases: [ tenant_name ]
+ promiscuous:
+ description:
+ - Allow/Disallow promiscuous mode in vmm domain
+ type: str
+ choices: [ accept, reject ]
+ default: reject
+ vm_provider:
+ description:
+ - The VM platform for VMM Domains.
+ - Support for Kubernetes was added in ACI v3.0.
+ - Support for CloudFoundry, OpenShift and Red Hat was added in ACI v3.1.
+ type: str
+ choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant), C(ap), C(epg), and C(domain) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) M(cisco.aci.aci_ap), M(cisco.aci.aci_epg) M(cisco.aci.aci_domain) modules can be used for this.
+- OpenStack VMM domains must not be created using this module. The OpenStack VMM domain is created directly
+ by the Cisco APIC Neutron plugin as part of the installation and configuration.
+ This module can be used to query status of an OpenStack VMM domain.
+seealso:
+- module: cisco.aci.aci_ap
+- module: cisco.aci.aci_epg
+- module: cisco.aci.aci_domain
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fv:RsDomAtt).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+- Shreyas Srish (@shrsr)
+'''
+
+EXAMPLES = r'''
+- name: Add a new physical domain to EPG binding
+ cisco.aci.aci_epg_to_domain:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: anstest
+ ap: anstest
+ epg: anstest
+ domain: anstest
+ domain_type: phys
+ state: present
+ delegate_to: localhost
+
+- name: Remove an existing physical domain to EPG binding
+ cisco.aci.aci_epg_to_domain:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: anstest
+ ap: anstest
+ epg: anstest
+ domain: anstest
+ domain_type: phys
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific physical domain to EPG binding
+ cisco.aci.aci_epg_to_domain:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: anstest
+ ap: anstest
+ epg: anstest
+ domain: anstest
+ domain_type: phys
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all domain to EPG bindings
+ cisco.aci.aci_epg_to_domain:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+VM_PROVIDER_MAPPING = dict(
+ cloudfoundry='CloudFoundry',
+ kubernetes='Kubernetes',
+ microsoft='Microsoft',
+ openshift='OpenShift',
+ openstack='OpenStack',
+ redhat='Redhat',
+ vmware='VMware',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ allow_useg=dict(type='str', choices=['encap', 'useg']),
+ ap=dict(type='str', aliases=['app_profile', 'app_profile_name']), # Not required for querying all objects
+ deploy_immediacy=dict(type='str', choices=['immediate', 'lazy']),
+ domain=dict(type='str', aliases=['domain_name', 'domain_profile']), # Not required for querying all objects
+ domain_type=dict(type='str', choices=['l2dom', 'phys', 'vmm'], aliases=['type']), # Not required for querying all objects
+ encap=dict(type='int'),
+ encap_mode=dict(type='str', choices=['auto', 'vlan', 'vxlan']),
+ switching_mode=dict(type='str', default='native', choices=['AVE', 'native']),
+ epg=dict(type='str', aliases=['name', 'epg_name']), # Not required for querying all objects
+ netflow=dict(type='bool'),
+ primary_encap=dict(type='int'),
+ resolution_immediacy=dict(type='str', choices=['immediate', 'lazy', 'pre-provision']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ vm_provider=dict(type='str', choices=['cloudfoundry', 'kubernetes', 'microsoft', 'openshift', 'openstack', 'redhat', 'vmware']),
+ promiscuous=dict(type='str', default='reject', choices=['accept', 'reject']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['domain_type', 'vmm', ['vm_provider']],
+ ['state', 'absent', ['ap', 'domain', 'domain_type', 'epg', 'tenant']],
+ ['state', 'present', ['ap', 'domain', 'domain_type', 'epg', 'tenant']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ allow_useg = module.params.get('allow_useg')
+ ap = module.params.get('ap')
+ deploy_immediacy = module.params.get('deploy_immediacy')
+ domain = module.params.get('domain')
+ domain_type = module.params.get('domain_type')
+ vm_provider = module.params.get('vm_provider')
+ promiscuous = module.params.get('promiscuous')
+ encap = module.params.get('encap')
+ if encap is not None:
+ if encap in range(1, 4097):
+ encap = 'vlan-{0}'.format(encap)
+ else:
+ module.fail_json(msg='Valid VLAN assignments are from 1 to 4096')
+ encap_mode = module.params.get('encap_mode')
+ switching_mode = module.params.get('switching_mode')
+ epg = module.params.get('epg')
+ netflow = aci.boolean(module.params.get('netflow'), 'enabled', 'disabled')
+ primary_encap = module.params.get('primary_encap')
+ if primary_encap is not None:
+ if primary_encap in range(1, 4097):
+ primary_encap = 'vlan-{0}'.format(primary_encap)
+ else:
+ module.fail_json(msg='Valid VLAN assignments are from 1 to 4096')
+ resolution_immediacy = module.params.get('resolution_immediacy')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+
+ if domain_type in ['l2dom', 'phys'] and vm_provider is not None:
+ module.fail_json(msg="Domain type '%s' cannot have a 'vm_provider'" % domain_type)
+
+ child_classes = None
+ child_configs = None
+
+ # Compile the full domain for URL building
+ if domain_type == 'vmm':
+ epg_domain = 'uni/vmmp-{0}/dom-{1}'.format(VM_PROVIDER_MAPPING[vm_provider], domain)
+ child_configs = [dict(vmmSecP=dict(attributes=dict(allowPromiscuous=promiscuous)))]
+ child_classes = ['vmmSecP']
+ elif domain_type == 'l2dom':
+ epg_domain = 'uni/l2dom-{0}'.format(domain)
+ elif domain_type == 'phys':
+ epg_domain = 'uni/phys-{0}'.format(domain)
+ else:
+ epg_domain = None
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='fvAp',
+ aci_rn='ap-{0}'.format(ap),
+ module_object=ap,
+ target_filter={'name': ap},
+ ),
+ subclass_2=dict(
+ aci_class='fvAEPg',
+ aci_rn='epg-{0}'.format(epg),
+ module_object=epg,
+ target_filter={'name': epg},
+ ),
+ subclass_3=dict(
+ aci_class='fvRsDomAtt',
+ aci_rn='rsdomAtt-[{0}]'.format(epg_domain),
+ module_object=epg_domain,
+ target_filter={'tDn': epg_domain},
+ ),
+ child_classes=child_classes,
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvRsDomAtt',
+ class_config=dict(
+ classPref=allow_useg,
+ encap=encap,
+ encapMode=encap_mode,
+ switchingMode=switching_mode,
+ instrImedcy=deploy_immediacy,
+ netflowPref=netflow,
+ primaryEncap=primary_encap,
+ resImedcy=resolution_immediacy,
+ ),
+ child_configs=child_configs,
+ )
+
+ aci.get_diff(aci_class='fvRsDomAtt')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_fabric_node.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_fabric_node.py
new file mode 100644
index 00000000..b1ea5f91
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_fabric_node.py
@@ -0,0 +1,288 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_fabric_node
+short_description: Manage Fabric Node Members (fabric:NodeIdentP)
+description:
+- Manage Fabric Node Members on Cisco ACI fabrics.
+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.
+ type: str
+ aliases: [ serial_number ]
+ node_id:
+ description:
+ - Node ID Number for the new Fabric Node Member.
+ type: int
+ switch:
+ description:
+ - Switch Name for the new Fabric Node Member.
+ type: str
+ aliases: [ name, switch_name ]
+ description:
+ description:
+ - Description for the new Fabric Node Member.
+ type: str
+ aliases: [ descr ]
+ role:
+ description:
+ - Role for the new Fabric Node Member.
+ type: str
+ aliases: [ role_name ]
+ choices: [ leaf, spine, unspecified ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fabric:NodeIdentP).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Bruno Calogero (@brunocalogero)
+'''
+
+EXAMPLES = r'''
+- name: Add fabric node
+ cisco.aci.aci_fabric_node:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ serial: FDO2031124L
+ node_id: 1011
+ switch: fab4-sw1011
+ state: present
+ delegate_to: localhost
+
+- name: Remove fabric node
+ cisco.aci.aci_fabric_node:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ serial: FDO2031124L
+ node_id: 1011
+ state: absent
+ delegate_to: localhost
+
+- name: Query fabric nodes
+ cisco.aci.aci_fabric_node:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: '?rsp-prop-include=config-only'
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+# NOTE: (This problem is also present on the APIC GUI)
+# NOTE: When specifying a C(role) the new Fabric Node Member will be created but Role on GUI will be "unknown", hence not what seems to be a module problem
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ description=dict(type='str', aliases=['descr']),
+ node_id=dict(type='int'), # Not required for querying all objects
+ pod_id=dict(type='int'),
+ role=dict(type='str', choices=['leaf', 'spine', 'unspecified'], aliases=['role_name']),
+ serial=dict(type='str', aliases=['serial_number']), # Not required for querying all objects
+ switch=dict(type='str', aliases=['name', 'switch_name']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['node_id', 'serial']],
+ ['state', 'present', ['node_id', 'serial']],
+ ],
+ )
+
+ pod_id = module.params.get('pod_id')
+ serial = module.params.get('serial')
+ node_id = module.params.get('node_id')
+ switch = module.params.get('switch')
+ description = module.params.get('description')
+ role = module.params.get('role')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fabricNodeIdentP',
+ aci_rn='controller/nodeidentpol/nodep-{0}'.format(serial),
+ module_object=serial,
+ target_filter={'serial': serial},
+ )
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fabricNodeIdentP',
+ class_config=dict(
+ descr=description,
+ name=switch,
+ nodeId=node_id,
+ podId=pod_id,
+ # NOTE: Originally we were sending 'rn', but now we need 'dn' for idempotency
+ # FIXME: Did this change with ACI version ?
+ dn='uni/controller/nodeidentpol/nodep-{0}'.format(serial),
+ # rn='nodep-{0}'.format(serial),
+ role=role,
+ serial=serial,
+ nameAlias=name_alias,
+ )
+ )
+
+ aci.get_diff(aci_class='fabricNodeIdentP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json(**aci.result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_fabric_scheduler.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_fabric_scheduler.py
new file mode 100644
index 00000000..ecc91330
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_fabric_scheduler.py
@@ -0,0 +1,331 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = '''
+---
+module: aci_fabric_scheduler
+
+short_description: This modules creates ACI schedulers.
+
+
+description:
+ - With the module you can create schedule policies that can be a shell, onetime execution or recurring
+
+options:
+ name:
+ description:
+ - The name of the Scheduler.
+ type: str
+ aliases: [ scheduler_name ]
+ description:
+ description:
+ - Description for the Scheduler.
+ type: str
+ aliases: [ descr ]
+ recurring:
+ description:
+ - If you want to make the Scheduler a recurring it would be a "True" and for a
+ oneTime execution it would be "False". For a shell just exclude this option from
+ the task
+ type: bool
+ default: 'no'
+ windowname:
+ description:
+ - This is the name for your what recurring or oneTime execution
+ type: str
+ concurCap:
+ description:
+ - This is the amount of devices that can be executed on at a time
+ type: int
+ maxTime:
+ description:
+ - This is the amount MAX amount of time a process can be executed
+ type: str
+ date:
+ description:
+ - This is the date and time that the scheduler will execute
+ type: str
+ hour:
+ description:
+ - This set the hour of execution
+ type: int
+ minute:
+ description:
+ - This sets the minute of execution, used in conjunction with hour
+ type: int
+ day:
+ description:
+ - This sets the day when execution will take place
+ type: str
+ default: "every-day"
+ choices: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday','Sunday', 'even-day', 'odd-day', 'every-day']
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ default: present
+ choices: [ absent, present, query ]
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+
+author:
+ - Steven Gerhart (@sgerhart)
+'''
+
+EXAMPLES = r'''
+ - name: Simple Scheduler (Empty)
+ cisco.aci.aci_fabric_scheduler:
+ host: "{{ inventory_hostname }}"
+ username: "{{ user }}"
+ password: "{{ pass }}"
+ validate_certs: no
+ name: simpleScheduler
+ state: present
+ - name: Remove Simple Scheduler
+ cisco.aci.aci_fabric_scheduler:
+ host: "{{ inventory_hostname }}"
+ username: "{{ user }}"
+ password: "{{ pass }}"
+ validate_certs: no
+ name: simpleScheduler
+ state: absent
+ - name: One Time Scheduler
+ cisco.aci.aci_fabric_scheduler:
+ host: "{{ inventory_hostname }}"
+ username: "{{ user }}"
+ password: "{{ pass }}"
+ validate_certs: no
+ name: OneTime
+ windowname: OneTime
+ recurring: False
+ concurCap: 20
+ date: "2018-11-20T24:00:00"
+ state: present
+ - name: Recurring Scheduler
+ cisco.aci.aci_fabric_scheduler:
+ host: "{{ inventory_hostname }}"
+ username: "{{ user }}"
+ password: "{{ pass }}"
+ validate_certs: no
+ name: Recurring
+ windowname: Recurring
+ recurring: True
+ concurCap: 20
+ hour: 13
+ minute: 30
+ day: Tuesday
+ state: present
+'''
+
+RETURN = '''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ name=dict(type='str', aliases=['scheduler_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ windowname=dict(type='str'),
+ recurring=dict(type='bool'),
+ concurCap=dict(type='int'), # Number of devices it will run against concurrently
+ maxTime=dict(type='str'), # The amount of minutes a process will be able to run (unlimited or dd:hh:mm:ss)
+ date=dict(type='str'), # The date the process will run YYYY-MM-DDTHH:MM:SS
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ hour=dict(type='int'),
+ minute=dict(type='int'),
+ day=dict(type='str', default='every-day', choices=['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday',
+ 'Saturday', 'Sunday', 'every-day', 'even-day', 'odd-day']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['name']],
+ ['state', 'present', ['name']],
+ ],
+ )
+
+ state = module.params.get('state')
+ name = module.params.get('name')
+ windowname = module.params.get('windowname')
+ recurring = module.params.get('recurring')
+ date = module.params.get('date')
+ hour = module.params.get('hour')
+ minute = module.params.get('minute')
+ maxTime = module.params.get('maxTime')
+ concurCap = module.params.get('concurCap')
+ day = module.params.get('day')
+ description = module.params.get('description')
+ name_alias = module.params.get('name_alias')
+
+ if recurring:
+ child_configs = [dict(trigRecurrWindowP=dict(attributes=dict(name=windowname, hour=hour, minute=minute,
+ procCa=maxTime, concurCap=concurCap, day=day,)))]
+ elif recurring is False:
+ child_configs = [dict(trigAbsWindowP=dict(attributes=dict(name=windowname, procCap=maxTime,
+ concurCap=concurCap, date=date,)))]
+ else:
+ child_configs = []
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='trigSchedP',
+ aci_rn='fabric/schedp-{0}'.format(name),
+ target_filter={'name': name},
+ module_object=name,
+ ),
+
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='trigSchedP',
+ class_config=dict(
+ name=name,
+ descr=description,
+ nameAlias=name_alias,
+ ),
+ child_configs=child_configs,
+
+ )
+
+ aci.get_diff(aci_class='trigSchedP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_filter.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_filter.py
new file mode 100644
index 00000000..9b79eae9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_filter.py
@@ -0,0 +1,279 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_filter
+short_description: Manages top level filter objects (vz:Filter)
+description:
+- Manages top level filter objects on Cisco ACI fabrics.
+- This modules does not manage filter entries, see M(cisco.aci.aci_filter_entry) for this functionality.
+options:
+ filter:
+ description:
+ - The name of the filter.
+ type: str
+ aliases: [ filter_name, name ]
+ description:
+ description:
+ - Description for the filter.
+ type: str
+ aliases: [ descr ]
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ aliases: [ tenant_name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(vz:Filter).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Add a new filter to a tenant
+ cisco.aci.aci_filter:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ filter: web_filter
+ description: Filter for web protocols
+ tenant: production
+ state: present
+ delegate_to: localhost
+
+- name: Remove a filter for a tenant
+ cisco.aci.aci_filter:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ filter: web_filter
+ tenant: production
+ state: absent
+ delegate_to: localhost
+
+- name: Query a filter of a tenant
+ cisco.aci.aci_filter:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ filter: web_filter
+ tenant: production
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all filters for a tenant
+ cisco.aci.aci_filter:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ filter=dict(type='str', aliases=['name', 'filter_name']), # Not required for querying all objects
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['filter', 'tenant']],
+ ['state', 'present', ['filter', 'tenant']],
+ ],
+ )
+
+ filter_name = module.params.get('filter')
+ description = module.params.get('description')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='vzFilter',
+ aci_rn='flt-{0}'.format(filter_name),
+ module_object=filter_name,
+ target_filter={'name': filter_name},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='vzFilter',
+ class_config=dict(
+ name=filter_name,
+ descr=description,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='vzFilter')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_filter_entry.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_filter_entry.py
new file mode 100644
index 00000000..babf6d9d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_filter_entry.py
@@ -0,0 +1,376 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_filter_entry
+short_description: Manage filter entries (vz:Entry)
+description:
+- Manage filter entries for a filter on Cisco ACI fabrics.
+options:
+ arp_flag:
+ description:
+ - The arp flag to use when the ether_type is arp.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ arp_reply, arp_request, unspecified ]
+ description:
+ description:
+ - Description for the Filter Entry.
+ type: str
+ aliases: [ descr ]
+ dst_port:
+ description:
+ - Used to set both destination start and end ports to the same value when ip_protocol is tcp or udp.
+ - Accepted values are any valid TCP/UDP port range.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ dst_port_end:
+ description:
+ - Used to set the destination end port when ip_protocol is tcp or udp.
+ - Accepted values are any valid TCP/UDP port range.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ dst_port_start:
+ description:
+ - Used to set the destination start port when ip_protocol is tcp or udp.
+ - Accepted values are any valid TCP/UDP port range.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ entry:
+ description:
+ - Then name of the Filter Entry.
+ type: str
+ aliases: [ entry_name, filter_entry, name ]
+ ether_type:
+ description:
+ - The Ethernet type.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ arp, fcoe, ip, mac_security, mpls_ucast, trill, unspecified ]
+ filter:
+ description:
+ - The name of Filter that the entry should belong to.
+ type: str
+ aliases: [ filter_name ]
+ icmp_msg_type:
+ description:
+ - ICMPv4 message type; used when ip_protocol is icmp.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ dst_unreachable, echo, echo_reply, src_quench, time_exceeded, unspecified ]
+ icmp6_msg_type:
+ description:
+ - ICMPv6 message type; used when ip_protocol is icmpv6.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ dst_unreachable, echo_request, echo_reply, neighbor_advertisement, neighbor_solicitation, redirect, time_exceeded, unspecified ]
+ ip_protocol:
+ description:
+ - The IP Protocol type when ether_type is ip.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ eigrp, egp, icmp, icmpv6, igmp, igp, l2tp, ospfigp, pim, tcp, udp, unspecified ]
+ state:
+ description:
+ - present, absent, query
+ type: str
+ default: present
+ choices: [ absent, present, query ]
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+ stateful:
+ description:
+ - Determines the statefulness of the filter entry.
+ type: bool
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ aliases: [ tenant_name ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) and C(filter) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) and M(cisco.aci.aci_filter) modules can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- module: cisco.aci.aci_filter
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(vz:Entry).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- cisco.aci.aci_filter_entry:
+ host: "{{ inventory_hostname }}"
+ username: "{{ user }}"
+ password: "{{ pass }}"
+ state: "{{ state }}"
+ entry: "{{ entry }}"
+ tenant: "{{ tenant }}"
+ ether_name: "{{ ether_name }}"
+ icmp_msg_type: "{{ icmp_msg_type }}"
+ filter: "{{ filter }}"
+ descr: "{{ descr }}"
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+VALID_ARP_FLAGS = ['arp_reply', 'arp_request', 'unspecified']
+VALID_ETHER_TYPES = ['arp', 'fcoe', 'ip', 'mac_security', 'mpls_ucast', 'trill', 'unspecified']
+VALID_ICMP_TYPES = ['dst_unreachable', 'echo', 'echo_reply', 'src_quench', 'time_exceeded', 'unspecified']
+VALID_ICMP6_TYPES = ['dst_unreachable', 'echo_request', 'echo_reply', 'neighbor_advertisement',
+ 'neighbor_solicitation', 'redirect', 'time_exceeded', 'unspecified']
+VALID_IP_PROTOCOLS = ['eigrp', 'egp', 'icmp', 'icmpv6', 'igmp', 'igp', 'l2tp', 'ospfigp', 'pim', 'tcp', 'udp', 'unspecified']
+
+# mapping dicts are used to normalize the proposed data to what the APIC expects, which will keep diffs accurate
+ARP_FLAG_MAPPING = dict(arp_reply='reply', arp_request='req', unspecified=None)
+FILTER_PORT_MAPPING = {'443': 'https', '25': 'smtp', '80': 'http', '20': 'ftpData', '53': 'dns', '110': 'pop3', '554': 'rtsp'}
+ICMP_MAPPING = {'dst_unreachable': 'dst-unreach', 'echo': 'echo', 'echo_reply': 'echo-rep', 'src_quench': 'src-quench',
+ 'time_exceeded': 'time-exceeded', 'unspecified': 'unspecified', 'echo-rep': 'echo-rep', 'dst-unreach': 'dst-unreach'}
+ICMP6_MAPPING = dict(dst_unreachable='dst-unreach', echo_request='echo-req', echo_reply='echo-rep', neighbor_advertisement='nbr-advert',
+ neighbor_solicitation='nbr-solicit', redirect='redirect', time_exceeded='time-exceeded', unspecified='unspecified')
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ arp_flag=dict(type='str', choices=VALID_ARP_FLAGS),
+ description=dict(type='str', aliases=['descr']),
+ dst_port=dict(type='str'),
+ dst_port_end=dict(type='str'),
+ dst_port_start=dict(type='str'),
+ entry=dict(type='str', aliases=['entry_name', 'filter_entry', 'name']), # Not required for querying all objects
+ ether_type=dict(choices=VALID_ETHER_TYPES, type='str'),
+ filter=dict(type='str', aliases=['filter_name']), # Not required for querying all objects
+ icmp_msg_type=dict(type='str', choices=VALID_ICMP_TYPES),
+ icmp6_msg_type=dict(type='str', choices=VALID_ICMP6_TYPES),
+ ip_protocol=dict(choices=VALID_IP_PROTOCOLS, type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ stateful=dict(type='bool'),
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['entry', 'filter', 'tenant']],
+ ['state', 'present', ['entry', 'filter', 'tenant']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ arp_flag = module.params.get('arp_flag')
+ if arp_flag is not None:
+ arp_flag = ARP_FLAG_MAPPING.get(arp_flag)
+ description = module.params.get('description')
+ dst_port = module.params.get('dst_port')
+ if FILTER_PORT_MAPPING.get(dst_port) is not None:
+ dst_port = FILTER_PORT_MAPPING.get(dst_port)
+ dst_end = module.params.get('dst_port_end')
+ if FILTER_PORT_MAPPING.get(dst_end) is not None:
+ dst_end = FILTER_PORT_MAPPING.get(dst_end)
+ dst_start = module.params.get('dst_port_start')
+ if FILTER_PORT_MAPPING.get(dst_start) is not None:
+ dst_start = FILTER_PORT_MAPPING.get(dst_start)
+ entry = module.params.get('entry')
+ ether_type = module.params.get('ether_type')
+ filter_name = module.params.get('filter')
+ icmp_msg_type = module.params.get('icmp_msg_type')
+ if icmp_msg_type is not None:
+ icmp_msg_type = ICMP_MAPPING.get(icmp_msg_type)
+ icmp6_msg_type = module.params.get('icmp6_msg_type')
+ if icmp6_msg_type is not None:
+ icmp6_msg_type = ICMP6_MAPPING.get(icmp6_msg_type)
+ ip_protocol = module.params.get('ip_protocol')
+ state = module.params.get('state')
+ stateful = aci.boolean(module.params.get('stateful'))
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ # validate that dst_port is not passed with dst_start or dst_end
+ if dst_port is not None and (dst_end is not None or dst_start is not None):
+ module.fail_json(msg="Parameter 'dst_port' cannot be used with 'dst_end' and 'dst_start'")
+ elif dst_port is not None:
+ dst_end = dst_port
+ dst_start = dst_port
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='vzFilter',
+ aci_rn='flt-{0}'.format(filter_name),
+ module_object=filter_name,
+ target_filter={'name': filter_name},
+ ),
+ subclass_2=dict(
+ aci_class='vzEntry',
+ aci_rn='e-{0}'.format(entry),
+ module_object=entry,
+ target_filter={'name': entry},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='vzEntry',
+ class_config=dict(
+ arpOpc=arp_flag,
+ descr=description,
+ dFromPort=dst_start,
+ dToPort=dst_end,
+ etherT=ether_type,
+ icmpv4T=icmp_msg_type,
+ icmpv6T=icmp6_msg_type,
+ name=entry,
+ prot=ip_protocol,
+ stateful=stateful,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='vzEntry')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_group.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_group.py
new file mode 100644
index 00000000..9c25c344
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_group.py
@@ -0,0 +1,238 @@
+#!/usr/bin/python
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = '''
+---
+module: aci_firmware_group
+
+short_description: This module creates a firmware group
+
+
+description:
+ - This module creates a firmware group, so that you can apply firmware policy to nodes.
+options:
+ group:
+ description:
+ - This the name of the firmware group
+ type: str
+ firmwarepol:
+ description:
+ - This is the name of the firmware policy, which was create by aci_firmware_policy. It is important that
+ - you use the same name as the policy created with aci_firmware_policy
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ default: present
+ choices: [ absent, present, query ]
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+author:
+ - Steven Gerhart (@sgerhart)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+ - name: firmware group
+ cisco.aci.aci_firmware_group:
+ host: "{{ inventory_hostname }}"
+ username: "{{ user }}"
+ password: "{{ pass }}"
+ validate_certs: no
+ group: testingfwgrp1
+ firmwarepol: test2FrmPol
+ state: present
+'''
+RETURN = '''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ group=dict(type='str'), # Not required for querying all objects
+ firmwarepol=dict(type='str'), # Not required for querying all objects
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['group']],
+ ['state', 'present', ['group', 'firmwarepol']],
+ ],
+ )
+
+ state = module.params.get('state')
+ group = module.params.get('group')
+ firmwarepol = module.params.get('firmwarepol')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='firmwareFwGrp',
+ aci_rn='fabric/fwgrp-{0}'.format(group),
+ target_filter={'name': group},
+ module_object=group,
+ ),
+ child_classes=['firmwareRsFwgrpp'],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='firmwareFwGrp',
+ class_config=dict(
+ name=group,
+ nameAlias=name_alias,
+ ),
+ child_configs=[
+ dict(
+ firmwareRsFwgrpp=dict(
+ attributes=dict(
+ tnFirmwareFwPName=firmwarepol,
+ ),
+ ),
+ ),
+ ],
+
+ )
+
+ aci.get_diff(aci_class='firmwareFwGrp')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_group_node.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_group_node.py
new file mode 100644
index 00000000..79a03fd7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_group_node.py
@@ -0,0 +1,248 @@
+#!/usr/bin/python
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = '''
+---
+module: aci_firmware_group_node
+
+short_description: This modules adds and remove nodes from the firmware group
+
+
+description:
+ - This module addes/deletes a node to the firmware group. This modules assigns 1 node at a time.
+
+options:
+ group:
+ description:
+ - This is the name of the firmware group
+ type: str
+ node:
+ description:
+ - The node to be added to the firmware group - the value equals the NodeID
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ default: present
+ choices: [ absent, present, query ]
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+
+author:
+ - Steven Gerhart (@sgerhart)
+'''
+
+EXAMPLES = r'''
+ - name: add firmware group node
+ cisco.aci.aci_firmware_group_node:
+ host: "{{ inventory_hostname }}"
+ username: "{{ user }}"
+ password: "{{ pass }}"
+ validate_certs: no
+ group: testingfwgrp
+ node: 1001
+ state: present
+ - name: Remove firmware group node
+ cisco.aci.aci_firmware_group_node:
+ host: "{{ inventory_hostname }}"
+ username: "{{ user }}"
+ password: "{{ pass }}"
+ validate_certs: no
+ group: testingfwgrp
+ node: 1001
+ state: absent
+'''
+
+RETURN = '''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ group=dict(type='str'), # Not required for querying all objects
+ node=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['node', 'group']],
+ ['state', 'present', ['node', 'group']],
+ ],
+ )
+
+ state = module.params.get('state')
+ group = module.params.get('group')
+ node = module.params.get('node')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='firmwareFwGrp',
+ aci_rn='fabric/fwgrp-{0}'.format(group),
+ target_filter={'name': group},
+ module_object=group,
+ ),
+ subclass_1=dict(
+ aci_class='fabricNodeBlk',
+ aci_rn='nodeblk-blk{0}-{0}'.format(node),
+ target_filter={'name': node},
+ module_object=node,
+ ),
+
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fabricNodeBlk',
+ class_config=dict(
+ from_=node,
+ to_=node,
+ nameAlias=name_alias,
+ ),
+
+
+ )
+
+ aci.get_diff(aci_class='fabricNodeBlk')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_policy.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_policy.py
new file mode 100644
index 00000000..5c466ddc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_policy.py
@@ -0,0 +1,253 @@
+#!/usr/bin/python
+
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = '''
+---
+module: aci_firmware_policy
+
+short_description: This creates a firmware policy
+
+
+description:
+ - This module creates a firmware policy for firmware groups. The firmware policy is create first and then
+ - referenced by the firmware group. You will assign the firmware and specify if you want to ignore the compatibility
+ - check
+options:
+ name:
+ description:
+ - Name of the firmware policy
+ type: str
+ version:
+ description:
+ - The version of the firmware associated with this policy. This value is very import as well as constructing
+ - it correctly. The syntax for this field is n9000-xx.x. If you look at the firmware repository using the UI
+ - each version will have a "Full Version" column, this is the value you need to use. So, if the Full Version
+ - is 13.1(1i), the value for this field would be n9000-13.1(1i)
+ type: str
+ ignoreCompat:
+ description:
+ - Check if compatibility checks should be ignored
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [absent, present, query]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+
+author:
+ - Steven Gerhart (@sgerhart)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+ - name: firmware policy
+ cisco.aci.aci_firmware_policy:
+ host: "{{ inventory_hostname }}"
+ username: "{{ user }}"
+ password: "{{ pass }}"
+ validate_certs: no
+ name: test2FrmPol
+ version: n9000-13.2(1m)
+ ignoreCompat: False
+ state: present
+
+'''
+
+RETURN = '''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ name=dict(type='str'), # Not required for querying all objects
+ version=dict(type='str'),
+ ignoreCompat=dict(type='bool'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['name']],
+ ['state', 'present', ['name', 'version']],
+ ],
+ )
+
+ state = module.params.get('state')
+ name = module.params.get('name')
+ version = module.params.get('version')
+ name_alias = module.params.get('name_alias')
+
+ if module.params.get('ignoreCompat'):
+ ignore = 'yes'
+ else:
+ ignore = 'no'
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='firmwareFwP',
+ aci_rn='fabric/fwpol-{0}'.format(name),
+ target_filter={'name': name},
+ module_object=name,
+ ),
+
+
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='firmwareFwP',
+ class_config=dict(
+ name=name,
+ version=version,
+ ignoreCompat=ignore,
+ nameAlias=name_alias,
+ ),
+
+ )
+
+ aci.get_diff(aci_class='firmwareFwP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_source.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_source.py
new file mode 100644
index 00000000..52946578
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_firmware_source.py
@@ -0,0 +1,303 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Cindy Zhao (cizhao) <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_firmware_source
+short_description: Manage firmware image sources (firmware:OSource)
+description:
+- Manage firmware image sources on Cisco ACI fabrics.
+options:
+ source:
+ description:
+ - The identifying name for the outside source of images, such as an HTTP or SCP server.
+ type: str
+ aliases: [ name, source_name ]
+ polling_interval:
+ description:
+ - Polling interval in minutes.
+ type: int
+ url_protocol:
+ description:
+ - The Firmware download protocol.
+ type: str
+ choices: [ http, local, scp, usbkey ]
+ default: scp
+ aliases: [ url_proto ]
+ url:
+ description:
+ The firmware URL for the image(s) on the source.
+ type: str
+ url_password:
+ description:
+ The Firmware password or key string.
+ type: str
+ url_username:
+ description:
+ The username for the source.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(firmware:OSource).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Add firmware source
+ cisco.aci.aci_firmware_source:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ source: aci-msft-pkg-3.1.1i.zip
+ url: foo.bar.cisco.com/download/cisco/aci/aci-msft-pkg-3.1.1i.zip
+ url_protocol: http
+ state: present
+ delegate_to: localhost
+
+- name: Remove firmware source
+ cisco.aci.aci_firmware_source:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ source: aci-msft-pkg-3.1.1i.zip
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific firmware source
+ cisco.aci.aci_firmware_source:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ source: aci-msft-pkg-3.1.1i.zip
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all firmware sources
+ cisco.aci.aci_firmware_source:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ source=dict(type='str', aliases=['name', 'source_name']), # Not required for querying all objects
+ polling_interval=dict(type='int'),
+ url=dict(type='str'),
+ url_username=dict(type='str'),
+ url_password=dict(type='str', no_log=True),
+ url_protocol=dict(type='str', default='scp', choices=['http', 'local', 'scp', 'usbkey'], aliases=['url_proto']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['source']],
+ ['state', 'present', ['url_protocol', 'source', 'url']],
+ ],
+ )
+
+ polling_interval = module.params.get('polling_interval')
+ url_protocol = module.params.get('url_protocol')
+ state = module.params.get('state')
+ source = module.params.get('source')
+ url = module.params.get('url')
+ url_password = module.params.get('url_password')
+ url_username = module.params.get('url_username')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fabricInst',
+ aci_rn='fabric',
+ module_object='fabric',
+ target_filter={'name': 'fabric'},
+ ),
+ subclass_1=dict(
+ aci_class='firmwareRepoP',
+ aci_rn='fwrepop',
+ module_object='fwrepop',
+ target_filter={'name': 'fwrepop'},
+ ),
+ subclass_2=dict(
+ aci_class='firmwareOSource',
+ aci_rn='osrc-{0}'.format(source),
+ module_object=source,
+ target_filter={'name': source},
+ ),
+ config_only=False,
+ )
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='firmwareOSource',
+ class_config=dict(
+ name=source,
+ url=url,
+ password=url_password,
+ pollingInterval=polling_interval,
+ proto=url_protocol,
+ user=url_username,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='firmwareOSource')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_cdp.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_cdp.py
new file mode 100644
index 00000000..635c1799
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_cdp.py
@@ -0,0 +1,266 @@
+#!/usr/bin/python
+
+# Copyright: (c) 2019, Tim Knipper <tim.knipper@gmail.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_policy_cdp
+short_description: Manage CDP interface policies (cdp:IfPol)
+description:
+- Manage CDP interface policies on Cisco ACI fabrics.
+options:
+ cdp_policy:
+ description:
+ - The CDP interface policy name.
+ type: str
+ aliases: [ cdp_interface, name ]
+ description:
+ description:
+ - The description for the CDP interface policy name.
+ type: str
+ aliases: [ descr ]
+ admin_state:
+ description:
+ - Enable or Disable CDP state.
+ - The APIC defaults to C(yes) when unset during creation.
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(cdp:IfPol).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Tim Knipper (@tknipper11)
+'''
+
+EXAMPLES = r'''
+- name: Create CDP Interface Policy to enable CDP
+ cisco.aci.aci_interface_policy_cdp:
+ name: Ansible_CDP_Interface_Policy
+ host: apic.example.com
+ username: admin
+ password: adminpass
+ admin_state: true
+ state: present
+
+- name: Create CDP Interface Policy to disable CDP
+ cisco.aci.aci_interface_policy_cdp:
+ name: Ansible_CDP_Interface_Policy
+ host: apic.example.com
+ username: admin
+ password: adminpass
+ admin_state: false
+ state: present
+
+- name: Remove CDP Interface Policy
+ cisco.aci.aci_interface_policy_cdp:
+ name: Ansible_CDP_Interface_Policy
+ host: apic.example.com
+ username: admin
+ password: adminpass
+ output_level: debug
+ state: absent
+
+- name: Query CDP Policy
+ cisco.aci.aci_interface_policy_cdp:
+ host: apic.example.com
+ username: admin
+ password: adminpass
+ state: query
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "cdpIfPol": {
+ "attributes": {
+ "adminSt": "disabled",
+ "annotation": "",
+ "descr": "Ansible Created CDP Test Policy",
+ "dn": "uni/infra/cdpIfP-Ansible_CDP_Test_Policy",
+ "name": "Ansible_CDP_Test_Policy",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ cdp_policy=dict(type='str', required=False, aliases=['cdp_interface', 'name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ admin_state=dict(type='bool'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['cdp_policy']],
+ ['state', 'present', ['cdp_policy']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ cdp_policy = module.params.get('cdp_policy')
+ description = module.params.get('description')
+ admin_state = aci.boolean(module.params.get('admin_state'), 'enabled', 'disabled')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='cdpIfPol',
+ aci_rn='infra/cdpIfP-{0}'.format(cdp_policy),
+ module_object=cdp_policy,
+ target_filter={'name': cdp_policy},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='cdpIfPol',
+ class_config=dict(
+ name=cdp_policy,
+ descr=description,
+ adminSt=admin_state,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='cdpIfPol')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_fc.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_fc.py
new file mode 100644
index 00000000..d2eb1595
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_fc.py
@@ -0,0 +1,240 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_policy_fc
+short_description: Manage Fibre Channel interface policies (fc:IfPol)
+description:
+- Manage ACI Fiber Channel interface policies on Cisco ACI fabrics.
+options:
+ fc_policy:
+ description:
+ - The name of the Fiber Channel interface policy.
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - The description of the Fiber Channel interface policy.
+ type: str
+ aliases: [ descr ]
+ port_mode:
+ description:
+ - The Port Mode to use.
+ - The APIC defaults to C(f) when unset during creation.
+ type: str
+ choices: [ f, np ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fc:IfPol).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- name: Add a Fibre Channel interface policy
+ cisco.aci.aci_interface_policy_fc:
+ host: '{{ hostname }}'
+ username: '{{ username }}'
+ password: '{{ password }}'
+ fc_policy: '{{ fc_policy }}'
+ port_mode: '{{ port_mode }}'
+ description: '{{ description }}'
+ state: present
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ fc_policy=dict(type='str', aliases=['name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ port_mode=dict(type='str', choices=['f', 'np']), # No default provided on purpose
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['fc_policy']],
+ ['state', 'present', ['fc_policy']],
+ ],
+ )
+
+ fc_policy = module.params.get('fc_policy')
+ port_mode = module.params.get('port_mode')
+ description = module.params.get('description')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fcIfPol',
+ aci_rn='infra/fcIfPol-{0}'.format(fc_policy),
+ module_object=fc_policy,
+ target_filter={'name': fc_policy},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fcIfPol',
+ class_config=dict(
+ name=fc_policy,
+ descr=description,
+ portMode=port_mode,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='fcIfPol')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_l2.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_l2.py
new file mode 100644
index 00000000..bd74c922
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_l2.py
@@ -0,0 +1,265 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_policy_l2
+short_description: Manage Layer 2 interface policies (l2:IfPol)
+description:
+- Manage Layer 2 interface policies on Cisco ACI fabrics.
+options:
+ l2_policy:
+ description:
+ - The name of the Layer 2 interface policy.
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - The description of the Layer 2 interface policy.
+ type: str
+ aliases: [ descr ]
+ qinq:
+ description:
+ - Determines if QinQ is disabled or if the port should be considered a core or edge port.
+ - The APIC defaults to C(disabled) when unset during creation.
+ type: str
+ choices: [ core, disabled, edge ]
+ vepa:
+ description:
+ - Determines if Virtual Ethernet Port Aggregator is disabled or enabled.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ vlan_scope:
+ description:
+ - The scope of the VLAN.
+ - The APIC defaults to C(global) when unset during creation.
+ type: str
+ choices: [ global, portlocal ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(l2:IfPol).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- name: Add a Layer 2 interface policy
+ cisco.aci.aci_interface_policy_l2:
+ host: '{{ hostname }}'
+ username: '{{ username }}'
+ password: '{{ password }}'
+ l2_policy: '{{ l2_policy }}'
+ vlan_scope: '{{ vlan_policy }}'
+ description: '{{ description }}'
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+# Mapping dicts are used to normalize the proposed data to what the APIC expects, which will keep diffs accurate
+QINQ_MAPPING = dict(
+ core='corePort',
+ disabled='disabled',
+ edge='edgePort',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ l2_policy=dict(type='str', aliases=['name']), # Not required for querying all policies
+ description=dict(type='str', aliases=['descr']),
+ vlan_scope=dict(type='str', choices=['global', 'portlocal']), # No default provided on purpose
+ qinq=dict(type='str', choices=['core', 'disabled', 'edge']),
+ vepa=dict(type='bool'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['l2_policy']],
+ ['state', 'present', ['l2_policy']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ l2_policy = module.params.get('l2_policy')
+ vlan_scope = module.params.get('vlan_scope')
+ qinq = module.params.get('qinq')
+ if qinq is not None:
+ qinq = QINQ_MAPPING.get(qinq)
+ vepa = aci.boolean(module.params.get('vepa'), 'enabled', 'disabled')
+ description = module.params.get('description')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='l2IfPol',
+ aci_rn='infra/l2IfP-{0}'.format(l2_policy),
+ module_object=l2_policy,
+ target_filter={'name': l2_policy},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='l2IfPol',
+ class_config=dict(
+ name=l2_policy,
+ descr=description,
+ vlanScope=vlan_scope,
+ qinq=qinq, vepa=vepa,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='l2IfPol')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_leaf_breakout_port_group.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_leaf_breakout_port_group.py
new file mode 100644
index 00000000..2646198b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_leaf_breakout_port_group.py
@@ -0,0 +1,259 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Cindy Zhao <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_policy_leaf_breakout_port_group
+short_description: Manage fabric interface policy leaf breakout port group (infra:BrkoutPortGrp)
+description:
+- Manage fabric interface policy leaf breakout port group on Cisco ACI fabrics.
+options:
+ breakout_port_group:
+ description:
+ - Name of the leaf breakout port group to be added/deleted.
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - Description for the leaf breakout port group to be created.
+ type: str
+ aliases: [ descr ]
+ breakout_map:
+ description:
+ - The mapping of breakout port.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(infra:BrkoutPortGrp).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Cindy Zhao (@cizhao)
+'''
+
+EXAMPLES = r'''
+- name: Create a Leaf Breakout Port Group
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ breakout_port_group: BreakoutPortName
+ breakout_map: 10g-4x
+ state: present
+ delegate_to: localhost
+
+- name: Query all Leaf Breakout Port Groups of type link
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query a specific Leaf Breakout Port Group
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ breakout_port_group: BreakoutPortName
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Delete an Leaf Breakout Port Group
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ breakout_port_group: BreakoutPortName
+ state: absent
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ breakout_port_group=dict(type='str', aliases=['name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ breakout_map=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['breakout_port_group']],
+ ['state', 'present', ['breakout_port_group']],
+ ],
+ )
+
+ breakout_port_group = module.params.get('breakout_port_group')
+ description = module.params.get('description')
+ breakout_map = module.params.get('breakout_map')
+ state = module.params.get('state')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='infraBrkoutPortGrp',
+ aci_rn='infra/funcprof/brkoutportgrp-{0}'.format(breakout_port_group),
+ module_object=breakout_port_group,
+ target_filter={'name': breakout_port_group},
+ ),
+ child_classes=[],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='infraBrkoutPortGrp',
+ class_config=dict(
+ name=breakout_port_group,
+ descr=description,
+ brkoutMap=breakout_map,
+ ),
+ )
+
+ aci.get_diff(aci_class='infraBrkoutPortGrp')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_leaf_policy_group.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_leaf_policy_group.py
new file mode 100644
index 00000000..001e6e97
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_leaf_policy_group.py
@@ -0,0 +1,580 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_policy_leaf_policy_group
+short_description: Manage fabric interface policy leaf policy groups (infra:AccBndlGrp, infra:AccPortGrp)
+description:
+- Manage fabric interface policy leaf policy groups on Cisco ACI fabrics.
+options:
+ policy_group:
+ description:
+ - Name of the leaf policy group to be added/deleted.
+ type: str
+ aliases: [ name, policy_group_name ]
+ description:
+ description:
+ - Description for the leaf policy group to be created.
+ type: str
+ 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)
+ type: str
+ required: yes
+ choices: [ leaf, link, node ]
+ aliases: [ lag_type_name ]
+ link_level_policy:
+ description:
+ - Choice of link_level_policy to be used as part of the leaf policy group to be created.
+ type: str
+ 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.
+ type: str
+ aliases: [ cdp_policy_name ]
+ mcp_policy:
+ description:
+ - Choice of mcp_policy to be used as part of the leaf policy group to be created.
+ type: str
+ aliases: [ mcp_policy_name ]
+ lldp_policy:
+ description:
+ - Choice of lldp_policy to be used as part of the leaf policy group to be created.
+ type: str
+ 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.
+ type: str
+ 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.
+ type: str
+ 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.
+ type: str
+ 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.
+ type: str
+ 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.
+ type: str
+ 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.
+ type: str
+ 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.
+ type: str
+ 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.
+ type: str
+ 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.
+ type: str
+ 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.
+ type: str
+ 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.
+ type: str
+ 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.
+ type: str
+ 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.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- When using the module please select the appropriate link_aggregation_type (lag_type).
+ C(link) for Port Channel(PC), C(node) for Virtual Port Channel(VPC) and C(leaf) for Leaf Access Port Policy Group.
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(infra:AccBndlGrp) and B(infra:AccPortGrp).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Bruno Calogero (@brunocalogero)
+'''
+
+EXAMPLES = r'''
+- name: Create a Port Channel (PC) Interface Policy Group
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ lag_type: link
+ policy_group: policygroupname
+ description: policygroupname description
+ link_level_policy: whateverlinklevelpolicy
+ cdp_policy: whatevercdppolicy
+ lldp_policy: whateverlldppolicy
+ port_channel_policy: whateverlacppolicy
+ state: present
+ delegate_to: localhost
+
+- name: Create a Virtual Port Channel (VPC) Interface Policy Group
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ lag_type: node
+ policy_group: policygroupname
+ link_level_policy: whateverlinklevelpolicy
+ cdp_policy: whatevercdppolicy
+ lldp_policy: whateverlldppolicy
+ port_channel_policy: whateverlacppolicy
+ state: present
+ delegate_to: localhost
+
+- name: Create a Leaf Access Port Policy Group
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ lag_type: leaf
+ policy_group: policygroupname
+ link_level_policy: whateverlinklevelpolicy
+ cdp_policy: whatevercdppolicy
+ lldp_policy: whateverlldppolicy
+ state: present
+ delegate_to: localhost
+
+- name: Query all Leaf Access Port Policy Groups of type link
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ lag_type: link
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query a specific Lead Access Port Policy Group
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ lag_type: leaf
+ policy_group: policygroupname
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Delete an Interface policy Leaf Policy Group
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ lag_type: leaf
+ policy_group: policygroupname
+ state: absent
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ # NOTE: Since this module needs to include both infra:AccBndlGrp (for PC and VPC) and infra:AccPortGrp (for leaf access port policy group):
+ # NOTE: I'll allow the user to make the choice here (link(PC), node(VPC), leaf(leaf-access port policy group))
+ lag_type=dict(type='str', required=True, aliases=['lag_type_name'], choices=['leaf', 'link', 'node']),
+ policy_group=dict(type='str', aliases=['name', 'policy_group_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ link_level_policy=dict(type='str', aliases=['link_level_policy_name']),
+ cdp_policy=dict(type='str', aliases=['cdp_policy_name']),
+ mcp_policy=dict(type='str', aliases=['mcp_policy_name']),
+ lldp_policy=dict(type='str', aliases=['lldp_policy_name']),
+ stp_interface_policy=dict(type='str', aliases=['stp_interface_policy_name']),
+ egress_data_plane_policing_policy=dict(type='str', aliases=['egress_data_plane_policing_policy_name']),
+ ingress_data_plane_policing_policy=dict(type='str', aliases=['ingress_data_plane_policing_policy_name']),
+ priority_flow_control_policy=dict(type='str', aliases=['priority_flow_control_policy_name']),
+ fibre_channel_interface_policy=dict(type='str', aliases=['fibre_channel_interface_policy_name']),
+ slow_drain_policy=dict(type='str', aliases=['slow_drain_policy_name']),
+ port_channel_policy=dict(type='str', aliases=['port_channel_policy_name']),
+ monitoring_policy=dict(type='str', aliases=['monitoring_policy_name']),
+ storm_control_interface_policy=dict(type='str', aliases=['storm_control_interface_policy_name']),
+ l2_interface_policy=dict(type='str', aliases=['l2_interface_policy_name']),
+ port_security_policy=dict(type='str', aliases=['port_security_policy_name']),
+ aep=dict(type='str', aliases=['aep_name']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['policy_group']],
+ ['state', 'present', ['policy_group']],
+ ],
+ )
+
+ policy_group = module.params.get('policy_group')
+ description = module.params.get('description')
+ lag_type = module.params.get('lag_type')
+ link_level_policy = module.params.get('link_level_policy')
+ cdp_policy = module.params.get('cdp_policy')
+ mcp_policy = module.params.get('mcp_policy')
+ lldp_policy = module.params.get('lldp_policy')
+ stp_interface_policy = module.params.get('stp_interface_policy')
+ egress_data_plane_policing_policy = module.params.get('egress_data_plane_policing_policy')
+ ingress_data_plane_policing_policy = module.params.get('ingress_data_plane_policing_policy')
+ priority_flow_control_policy = module.params.get('priority_flow_control_policy')
+ fibre_channel_interface_policy = module.params.get('fibre_channel_interface_policy')
+ slow_drain_policy = module.params.get('slow_drain_policy')
+ port_channel_policy = module.params.get('port_channel_policy')
+ monitoring_policy = module.params.get('monitoring_policy')
+ storm_control_interface_policy = module.params.get('storm_control_interface_policy')
+ l2_interface_policy = module.params.get('l2_interface_policy')
+ port_security_policy = module.params.get('port_security_policy')
+ aep = module.params.get('aep')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ if lag_type == 'leaf' and port_channel_policy is not None:
+ aci.fail_json('port_channel_policy is not a valid parameter for leaf\
+ (leaf access port policy group), if used\
+ assign null to it (port_channel_policy: null).')
+
+ if lag_type == 'leaf':
+ aci_class_name = 'infraAccPortGrp'
+ dn_name = 'accportgrp'
+ class_config_dict = dict(
+ name=policy_group,
+ descr=description,
+ nameAlias=name_alias,
+ )
+ # Reset for target_filter
+ lag_type = None
+ elif lag_type in ('link', 'node'):
+ aci_class_name = 'infraAccBndlGrp'
+ dn_name = 'accbundle'
+ class_config_dict = dict(
+ name=policy_group,
+ descr=description,
+ lagT=lag_type,
+ nameAlias=name_alias,
+ )
+
+ child_configs = [
+ dict(
+ infraRsCdpIfPol=dict(
+ attributes=dict(
+ tnCdpIfPolName=cdp_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsFcIfPol=dict(
+ attributes=dict(
+ tnFcIfPolName=fibre_channel_interface_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsHIfPol=dict(
+ attributes=dict(
+ tnFabricHIfPolName=link_level_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsL2IfPol=dict(
+ attributes=dict(
+ tnL2IfPolName=l2_interface_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsL2PortSecurityPol=dict(
+ attributes=dict(
+ tnL2PortSecurityPolName=port_security_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsLacpPol=dict(
+ attributes=dict(
+ tnLacpLagPolName=port_channel_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsLldpIfPol=dict(
+ attributes=dict(
+ tnLldpIfPolName=lldp_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsMcpIfPol=dict(
+ attributes=dict(
+ tnMcpIfPolName=mcp_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsMonIfInfraPol=dict(
+ attributes=dict(
+ tnMonInfraPolName=monitoring_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsQosEgressDppIfPol=dict(
+ attributes=dict(
+ tnQosDppPolName=egress_data_plane_policing_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsQosIngressDppIfPol=dict(
+ attributes=dict(
+ tnQosDppPolName=ingress_data_plane_policing_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsQosPfcIfPol=dict(
+ attributes=dict(
+ tnQosPfcIfPolName=priority_flow_control_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsQosSdIfPol=dict(
+ attributes=dict(
+ tnQosSdIfPolName=slow_drain_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsStormctrlIfPol=dict(
+ attributes=dict(
+ tnStormctrlIfPolName=storm_control_interface_policy,
+ ),
+ ),
+ ),
+ dict(
+ infraRsStpIfPol=dict(
+ attributes=dict(
+ tnStpIfPolName=stp_interface_policy,
+ ),
+ ),
+ ),
+ ]
+
+ # Add infraRsattEntP binding only when aep was defined
+ if aep is not None:
+ child_configs.append(dict(
+ infraRsAttEntP=dict(
+ attributes=dict(
+ tDn='uni/infra/attentp-{0}'.format(aep),
+ ),
+ ),
+ ))
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class=aci_class_name,
+ aci_rn='infra/funcprof/{0}-{1}'.format(dn_name, policy_group),
+ module_object=policy_group,
+ target_filter={'name': policy_group, 'lagT': lag_type},
+ ),
+ child_classes=[
+ 'infraRsAttEntP',
+ 'infraRsCdpIfPol',
+ 'infraRsFcIfPol',
+ 'infraRsHIfPol',
+ 'infraRsL2IfPol',
+ 'infraRsL2PortSecurityPol',
+ 'infraRsLacpPol',
+ 'infraRsLldpIfPol',
+ 'infraRsMcpIfPol',
+ 'infraRsMonIfInfraPol',
+ 'infraRsQosEgressDppIfPol',
+ 'infraRsQosIngressDppIfPol',
+ 'infraRsQosPfcIfPol',
+ 'infraRsQosSdIfPol',
+ 'infraRsStormctrlIfPol',
+ 'infraRsStpIfPol',
+ ],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class=aci_class_name,
+ class_config=class_config_dict,
+ child_configs=child_configs,
+ )
+
+ aci.get_diff(aci_class=aci_class_name)
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_leaf_profile.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_leaf_profile.py
new file mode 100644
index 00000000..468ccbc8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_leaf_profile.py
@@ -0,0 +1,313 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+# Copyright: (c) 2020, Shreyas Srish <ssrish@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_policy_leaf_profile
+short_description: Manage fabric interface policy leaf profiles (infra:AccPortP)
+description:
+- Manage fabric interface policy leaf profiles on Cisco ACI fabrics.
+options:
+ interface_profile:
+ description:
+ - The name of the Fabric access policy leaf interface profile.
+ type: str
+ aliases: [ name, leaf_interface_profile_name, leaf_interface_profile, interface_profile_name ]
+ description:
+ description:
+ - Description for the Fabric access policy leaf interface profile.
+ type: str
+ aliases: [ descr ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+ type:
+ description:
+ - The type of profile to be created.
+ type: str
+ choices: [ fex, leaf ]
+ default: leaf
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(infra:AccPortP).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Bruno Calogero (@brunocalogero)
+- Shreyas Srish (@shrsr)
+'''
+
+EXAMPLES = r'''
+- name: Add a new leaf_interface_profile
+ cisco.aci.aci_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname
+ description: leafintprfname description
+ state: present
+ delegate_to: localhost
+
+- name: Add a new leaf_interface_profile of type fex
+ cisco.aci.aci_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname_fex
+ type: fex
+ description: leafintprfname description
+ state: present
+ delegate_to: localhost
+
+- name: Remove a leaf_interface_profile
+ cisco.aci.aci_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname
+ state: absent
+ delegate_to: localhost
+
+- name: Remove a leaf_interface_profile of type fex
+ cisco.aci.aci_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname_fex
+ type: fex
+ state: absent
+ delegate_to: localhost
+
+- name: Query a leaf_interface_profile
+ cisco.aci.aci_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query a leaf_interface_profile of type fex
+ cisco.aci.aci_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ interface_profile: leafintprfname_fex
+ type: fex
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all leaf_interface_profiles
+ cisco.aci.aci_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+
+- name: Query all leaf_interface_profiles of type fex
+ cisco.aci.aci_interface_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ type: fex
+ state: query
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ interface_profile=dict(type='str', aliases=['name', 'leaf_interface_profile_name', 'leaf_interface_profile', 'interface_profile_name']),
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ type=dict(type='str', default='leaf', choices=['fex', 'leaf']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['interface_profile']],
+ ['state', 'present', ['interface_profile']],
+ ],
+ )
+
+ interface_profile = module.params.get('interface_profile')
+ description = module.params.get('description')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+ type_profile = module.params.get('type')
+
+ aci = ACIModule(module)
+ aci_class = 'infraAccPortP'
+ aci_rn = 'accportprof'
+ if type_profile == 'fex':
+ aci_class = 'infraFexP'
+ aci_rn = 'fexprof'
+ aci.construct_url(
+ root_class=dict(
+ aci_class=aci_class,
+ aci_rn='infra/' + aci_rn + '-{0}'.format(interface_profile),
+ module_object=interface_profile,
+ target_filter={'name': interface_profile},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class=aci_class,
+ class_config=dict(
+ name=interface_profile,
+ descr=description,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class=aci_class)
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_link_level.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_link_level.py
new file mode 100644
index 00000000..c6e792f7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_link_level.py
@@ -0,0 +1,292 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Vasily Prokopov (@vasilyprokopov)
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_policy_link_level
+short_description: Manage Link Level interface policies (fabric:HIfPol)
+description:
+- The link level interface policy specifies the layer 1 parameters of switch interfaces.
+options:
+ link_level_policy:
+ description:
+ - The name of the Link Level interface policy.
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - The description of the Link Level interface policy.
+ type: str
+ aliases: [ descr ]
+ auto_negotiation:
+ description:
+ - Auto-negotiation enables devices to automatically exchange information over a link about speed and duplex abilities.
+ - The APIC defaults to C(on) when unset during creation.
+ type: bool
+ default: true
+ speed:
+ description:
+ - Determines the interface policy administrative port speed.
+ - The APIC defaults to C(inherit) when unset during creation.
+ type: str
+ choices: [ 100M, 1G, 10G, 25G, 40G, 50G, 100G, 200G, 400G, inherit ]
+ default: inherit
+ link_debounce_interval:
+ description:
+ - Enables the debounce timer for physical interface ports and sets it for a specified amount of time in milliseconds.
+ - The APIC defaults to C(100) when unset during creation.
+ type: int
+ default: 100
+ forwarding_error_correction:
+ description:
+ - Determines the forwarding error correction (FEC) mode.
+ - The APIC defaults to C(inherit) when unset during creation.
+ type: str
+ choices: [ inherit, kp-fec, cl91-rs-fec, cl74-fc-fec, disable-fec, ieee-rs-fec, cons16-rs-fec ]
+ default: inherit
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.aci.aci
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fabric:HIfPol).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Vasily Prokopov (@vasilyprokopov)
+'''
+
+EXAMPLES = r'''
+- name: Add a Link Level Policy
+ aci_interface_policy_link_level:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ link_level_policy: link_level_policy_test
+ description: via Ansible
+ auto_negotiation: on
+ speed: 100M
+ link_debounce_interval: 100
+ forwarding_error_correction: cl91-rs-fec
+ state: present
+ delegate_to: localhost
+
+- name: Remove a Link Level Policy
+ aci_interface_policy_link_level:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ link_level_policy: ansible_test
+ state: absent
+
+- name: Query a Link Level Policy
+ aci_interface_policy_link_level:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ link_level_policy: link_level_policy_test
+ state: query
+ delegate_to: localhost
+
+- name: Query all Link Level Policies
+ aci_interface_policy_link_level:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ link_level_policy=dict(type='str', aliases=['name']),
+ description=dict(type='str', aliases=['descr']),
+ auto_negotiation=dict(type='bool', default='true'),
+ speed=dict(type='str', default='inherit', choices=['100M', '1G', '10G', '25G', '40G', '50G', '100G', '200G', '400G', 'inherit']),
+ link_debounce_interval=dict(type='int', default='100'),
+ forwarding_error_correction=dict(type='str', default='inherit',
+ choices=['inherit', 'kp-fec', 'cl91-rs-fec', 'cl74-fc-fec', 'disable-fec', 'ieee-rs-fec', 'cons16-rs-fec']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['link_level_policy']],
+ ['state', 'present', ['link_level_policy']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ link_level_policy = module.params['link_level_policy']
+ description = module.params['description']
+ auto_negotiation = aci.boolean(module.params['auto_negotiation'], 'on', 'off')
+ speed = module.params['speed']
+ link_debounce_interval = module.params['link_debounce_interval']
+ if link_debounce_interval is not None and link_debounce_interval not in range(0, 5001):
+ module.fail_json(msg='The "link_debounce_interval" must be a value between 0 and 5000')
+ forwarding_error_correction = module.params['forwarding_error_correction']
+ state = module.params['state']
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fabricHIfPol',
+ aci_rn='infra/hintfpol-{0}'.format(link_level_policy),
+ module_object=link_level_policy,
+ target_filter={'name': link_level_policy},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fabricHIfPol',
+ class_config=dict(
+ name=link_level_policy,
+ descr=description,
+ autoNeg=auto_negotiation,
+ speed=speed,
+ linkDebounce=link_debounce_interval,
+ fecMode=forwarding_error_correction,
+ ),
+ )
+
+ aci.get_diff(aci_class='fabricHIfPol')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_lldp.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_lldp.py
new file mode 100644
index 00000000..a1964733
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_lldp.py
@@ -0,0 +1,248 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_policy_lldp
+short_description: Manage LLDP interface policies (lldp:IfPol)
+description:
+- Manage LLDP interface policies on Cisco ACI fabrics.
+options:
+ lldp_policy:
+ description:
+ - The LLDP interface policy name.
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - The description for the LLDP interface policy name.
+ type: str
+ aliases: [ descr ]
+ receive_state:
+ description:
+ - Enable or disable Receive state.
+ - The APIC defaults to C(yes) when unset during creation.
+ type: bool
+ transmit_state:
+ description:
+ - Enable or Disable Transmit state.
+ - The APIC defaults to C(yes) when unset during creation.
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(lldp:IfPol).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- name: Add a LLDP interface policy
+ cisco.aci.aci_interface_policy_lldp:
+ host: '{{ hostname }}'
+ username: '{{ username }}'
+ password: '{{ password }}'
+ lldp_policy: '{{ lldp_policy }}'
+ description: '{{ description }}'
+ receive_state: '{{ receive_state }}'
+ transmit_state: '{{ transmit_state }}'
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ lldp_policy=dict(type='str', aliases=['name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ receive_state=dict(type='bool'),
+ transmit_state=dict(type='bool'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['lldp_policy']],
+ ['state', 'present', ['lldp_policy']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ lldp_policy = module.params.get('lldp_policy')
+ description = module.params.get('description')
+ receive_state = aci.boolean(module.params.get('receive_state'), 'enabled', 'disabled')
+ transmit_state = aci.boolean(module.params.get('transmit_state'), 'enabled', 'disabled')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='lldpIfPol',
+ aci_rn='infra/lldpIfP-{0}'.format(lldp_policy),
+ module_object=lldp_policy,
+ target_filter={'name': lldp_policy},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='lldpIfPol',
+ class_config=dict(
+ name=lldp_policy,
+ descr=description,
+ adminRxSt=receive_state,
+ adminTxSt=transmit_state,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='lldpIfPol')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_mcp.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_mcp.py
new file mode 100644
index 00000000..97a1360a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_mcp.py
@@ -0,0 +1,239 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_policy_mcp
+short_description: Manage MCP interface policies (mcp:IfPol)
+description:
+- Manage MCP interface policies on Cisco ACI fabrics.
+options:
+ mcp:
+ description:
+ - The name of the MCP interface.
+ type: str
+ aliases: [ mcp_interface, name ]
+ description:
+ description:
+ - The description for the MCP interface.
+ type: str
+ aliases: [ descr ]
+ admin_state:
+ description:
+ - Enable or disable admin state.
+ - The APIC defaults to C(yes) when unset during creation.
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(mcp:IfPol).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- name: Add a MCP interface policy
+ cisco.aci.aci_interface_policy_mcp:
+ host: '{{ hostname }}'
+ username: '{{ username }}'
+ password: '{{ password }}'
+ mcp: '{{ mcp }}'
+ description: '{{ descr }}'
+ admin_state: '{{ admin_state }}'
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ mcp=dict(type='str', aliases=['mcp_interface', 'name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ admin_state=dict(type='bool'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['mcp']],
+ ['state', 'present', ['mcp']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ mcp = module.params.get('mcp')
+ description = module.params.get('description')
+ admin_state = aci.boolean(module.params.get('admin_state'), 'enabled', 'disabled')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='mcpIfPol',
+ aci_rn='infra/mcpIfP-{0}'.format(mcp),
+ module_object=mcp,
+ target_filter={'name': mcp},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='mcpIfPol',
+ class_config=dict(
+ name=mcp,
+ descr=description,
+ adminSt=admin_state,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='mcpIfPol')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_ospf.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_ospf.py
new file mode 100644
index 00000000..ff08e7a1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_ospf.py
@@ -0,0 +1,405 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_policy_ospf
+short_description: Manage OSPF interface policies (ospf:IfPol)
+description:
+- Manage OSPF interface policies on Cisco ACI fabrics.
+options:
+ tenant:
+ description:
+ - The name of the Tenant the OSPF interface policy should belong to.
+ type: str
+ aliases: [ tenant_name ]
+ ospf:
+ description:
+ - The OSPF interface policy name.
+ - This name can be between 1 and 64 alphanumeric characters.
+ - Note that you cannot change this name after the object has been saved.
+ type: str
+ aliases: [ ospf_interface, name ]
+ description:
+ description:
+ - The description for the OSPF interface.
+ type: str
+ aliases: [ descr ]
+ network_type:
+ description:
+ - The OSPF interface policy network type.
+ - OSPF supports broadcast and point-to-point.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ bcast, p2p ]
+ cost:
+ description:
+ - The OSPF cost of the interface.
+ - The cost (also called metric) of an interface in OSPF is an indication of
+ the overhead required to send packets across a certain interface. The
+ cost of an interface is inversely proportional to the bandwidth of that
+ interface. A higher bandwidth indicates a lower cost. There is more
+ overhead (higher cost) and time delays involved in crossing a 56k serial
+ line than crossing a 10M ethernet line. The formula used to calculate the
+ cost is C(cost= 10000 0000/bandwith in bps) For example, it will cost
+ 10 EXP8/10 EXP7 = 10 to cross a 10M Ethernet line and will cost
+ 10 EXP8/1544000 = 64 to cross a T1 line.
+ - By default, the cost of an interface is calculated based on the bandwidth;
+ you can force the cost of an interface with the ip ospf cost value
+ interface subconfiguration mode command.
+ - Accepted values range between C(1) and C(450).
+ - The APIC defaults to C(0) when unset during creation.
+ type: int
+ controls:
+ description:
+ - The interface policy controls.
+ - 'This is a list of one or more of the following controls:'
+ - C(advert-subnet) -- Advertise IP subnet instead of a host mask in the router LSA.
+ - C(bfd) -- Bidirectional Forwarding Detection
+ - C(mtu-ignore) -- Disables MTU mismatch detection on an interface.
+ - C(passive) -- The interface does not participate in the OSPF protocol and
+ will not establish adjacencies or send routing updates. However the
+ interface is announced as part of the routing network.
+ type: list
+ elements: str
+ choices: [ advert-subnet, bfd, mtu-ignore, passive ]
+ dead_interval:
+ description:
+ - The interval between hello packets from a neighbor before the router
+ declares the neighbor as down.
+ - This value must be the same for all networking devices on a specific network.
+ - Specifying a smaller dead interval (seconds) will give faster detection
+ of a neighbor being down and improve convergence, but might cause more
+ routing instability.
+ - Accepted values range between C(1) and C(65535).
+ - The APIC defaults to C(40) when unset during creation.
+ type: int
+ hello_interval:
+ description:
+ - The interval between hello packets that OSPF sends on the interface.
+ - Note that the smaller the hello interval, the faster topological changes will be detected, but more routing traffic will ensue.
+ - This value must be the same for all routers and access servers on a specific network.
+ - Accepted values range between C(1) and C(65535).
+ - The APIC defaults to C(10) when unset during creation.
+ type: int
+ prefix_suppression:
+ description:
+ - Whether prefix suppressions is enabled or disabled.
+ - The APIC defaults to C(inherit) when unset during creation.
+ type: bool
+ priority:
+ description:
+ - The priority for the OSPF interface profile.
+ - Accepted values ranges between C(0) and C(255).
+ - The APIC defaults to C(1) when unset during creation.
+ type: int
+ retransmit_interval:
+ description:
+ - The interval between LSA retransmissions.
+ - The retransmit interval occurs while the router is waiting for an acknowledgement from the neighbor router that it received the LSA.
+ - If no acknowledgment is received at the end of the interval, then the LSA is resent.
+ - Accepted values range between C(1) and C(65535).
+ - The APIC defaults to C(5) when unset during creation.
+ type: int
+ transmit_delay:
+ description:
+ - The delay time needed to send an LSA update packet.
+ - OSPF increments the LSA age time by the transmit delay amount before transmitting the LSA update.
+ - You should take into account the transmission and propagation delays for the interface when you set this value.
+ - Accepted values range between C(1) and C(450).
+ - The APIC defaults to C(1) when unset during creation.
+ type: int
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(ospf:IfPol).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Ensure ospf interface policy exists
+ cisco.aci.aci_interface_policy_ospf:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ ospf: ospf1
+ state: present
+ delegate_to: localhost
+
+- name: Ensure ospf interface policy does not exist
+ cisco.aci.aci_interface_policy_ospf:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ ospf: ospf1
+ state: present
+ delegate_to: localhost
+
+- name: Query an ospf interface policy
+ cisco.aci.aci_interface_policy_ospf:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ ospf: ospf1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all ospf interface policies in tenant production
+ cisco.aci.aci_interface_policy_ospf:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ ospf=dict(type='str', aliases=['ospf_interface', 'name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ network_type=dict(type='str', choices=['bcast', 'p2p']),
+ cost=dict(type='int'),
+ controls=dict(type='list', elements='str', choices=['advert-subnet', 'bfd', 'mtu-ignore', 'passive']),
+ dead_interval=dict(type='int'),
+ hello_interval=dict(type='int'),
+ prefix_suppression=dict(type='bool'),
+ priority=dict(type='int'),
+ retransmit_interval=dict(type='int'),
+ transmit_delay=dict(type='int'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['ospf', 'tenant']],
+ ['state', 'present', ['ospf', 'tenant']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ tenant = module.params.get('tenant')
+ ospf = module.params.get('ospf')
+ description = module.params.get('description')
+ name_alias = module.params.get('name_alias')
+
+ if module.params.get('controls') is None:
+ controls = None
+ else:
+ controls = ','.join(module.params.get('controls'))
+
+ cost = module.params.get('cost')
+ if cost is not None and cost not in range(1, 451):
+ module.fail_json(msg="Parameter 'cost' is only valid in range between 1 and 450.")
+
+ dead_interval = module.params.get('dead_interval')
+ if dead_interval is not None and dead_interval not in range(1, 65536):
+ module.fail_json(msg="Parameter 'dead_interval' is only valid in range between 1 and 65536.")
+
+ hello_interval = module.params.get('hello_interval')
+ if hello_interval is not None and hello_interval not in range(1, 65536):
+ module.fail_json(msg="Parameter 'hello_interval' is only valid in range between 1 and 65536.")
+
+ network_type = module.params.get('network_type')
+ prefix_suppression = aci.boolean(module.params.get('prefix_suppression'), 'enabled', 'disabled')
+ priority = module.params.get('priority')
+ if priority is not None and priority not in range(0, 256):
+ module.fail_json(msg="Parameter 'priority' is only valid in range between 1 and 255.")
+
+ retransmit_interval = module.params.get('retransmit_interval')
+ if retransmit_interval is not None and retransmit_interval not in range(1, 65536):
+ module.fail_json(msg="Parameter 'retransmit_interval' is only valid in range between 1 and 65536.")
+
+ transmit_delay = module.params.get('transmit_delay')
+ if transmit_delay is not None and transmit_delay not in range(1, 451):
+ module.fail_json(msg="Parameter 'transmit_delay' is only valid in range between 1 and 450.")
+
+ state = module.params.get('state')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='ospfIfPol',
+ aci_rn='tn-{0}/ospfIfPol-{1}'.format(tenant, ospf),
+ module_object=ospf,
+ target_filter={'name': ospf},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='ospfIfPol',
+ class_config=dict(
+ name=ospf,
+ descr=description,
+ cost=cost,
+ ctrl=controls,
+ deadIntvl=dead_interval,
+ helloIntvl=hello_interval,
+ nwT=network_type,
+ pfxSuppress=prefix_suppression,
+ prio=priority,
+ rexmitIntvl=retransmit_interval,
+ xmitDelay=transmit_delay,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='ospfIfPol')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_port_channel.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_port_channel.py
new file mode 100644
index 00000000..94e2fd74
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_port_channel.py
@@ -0,0 +1,322 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_policy_port_channel
+short_description: Manage port channel interface policies (lacp:LagPol)
+description:
+- Manage port channel interface policies on Cisco ACI fabrics.
+options:
+ port_channel:
+ description:
+ - Name of the port channel.
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - The description for the port channel.
+ type: str
+ aliases: [ descr ]
+ max_links:
+ description:
+ - Maximum links.
+ - Accepted values range between 1 and 16.
+ - The APIC defaults to C(16) when unset during creation.
+ type: int
+ min_links:
+ description:
+ - Minimum links.
+ - 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.
+ - Determines the LACP method to use for forming port-channels.
+ - The APIC defaults to C(off) when unset during creation.
+ type: str
+ choices: [ active, mac-pin, mac-pin-nicload, 'off', passive ]
+ fast_select:
+ description:
+ - Determines if Fast Select is enabled for Hot Standby Ports.
+ - This makes up the LACP Policy Control Policy; if one setting is defined, then all other Control Properties
+ left undefined or set to false will not exist after the task is ran.
+ - The APIC defaults to C(yes) when unset during creation.
+ type: bool
+ graceful_convergence:
+ description:
+ - Determines if Graceful Convergence is enabled.
+ - This makes up the LACP Policy Control Policy; if one setting is defined, then all other Control Properties
+ left undefined or set to false will not exist after the task is ran.
+ - The APIC defaults to C(yes) when unset during creation.
+ type: bool
+ load_defer:
+ description:
+ - Determines if Load Defer is enabled.
+ - This makes up the LACP Policy Control Policy; if one setting is defined, then all other Control Properties
+ left undefined or set to false will not exist after the task is ran.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ suspend_individual:
+ description:
+ - Determines if Suspend Individual is enabled.
+ - This makes up the LACP Policy Control Policy; if one setting is defined, then all other Control Properties
+ left undefined or set to false will not exist after the task is ran.
+ - The APIC defaults to C(yes) when unset during creation.
+ type: bool
+ symmetric_hash:
+ description:
+ - Determines if Symmetric Hashing is enabled.
+ - This makes up the LACP Policy Control Policy; if one setting is defined, then all other Control Properties
+ left undefined or set to false will not exist after the task is ran.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(lacp:LagPol).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- name: Add a port channel interface policy
+ cisco.aci.aci_interface_policy_port_channel:
+ host: '{{ inventory_hostname }}'
+ username: '{{ username }}'
+ password: '{{ password }}'
+ port_channel: '{{ port_channel }}'
+ description: '{{ description }}'
+ min_links: '{{ min_links }}'
+ max_links: '{{ max_links }}'
+ mode: '{{ mode }}'
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ port_channel=dict(type='str', aliases=['name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ min_links=dict(type='int'),
+ max_links=dict(type='int'),
+ mode=dict(type='str', choices=['active', 'mac-pin', 'mac-pin-nicload', 'off', 'passive']),
+ fast_select=dict(type='bool'),
+ graceful_convergence=dict(type='bool'),
+ load_defer=dict(type='bool'),
+ suspend_individual=dict(type='bool'),
+ symmetric_hash=dict(type='bool'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['port_channel']],
+ ['state', 'present', ['port_channel']],
+ ],
+ )
+
+ port_channel = module.params.get('port_channel')
+ description = module.params.get('description')
+ min_links = module.params.get('min_links')
+ if min_links is not None and min_links not in range(1, 17):
+ module.fail_json(msg='The "min_links" must be a value between 1 and 16')
+ max_links = module.params.get('max_links')
+ if max_links is not None and max_links not in range(1, 17):
+ module.fail_json(msg='The "max_links" must be a value between 1 and 16')
+ mode = module.params.get('mode')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ # Build ctrl value for request
+ ctrl = []
+ if module.params.get('fast_select') is True:
+ ctrl.append('fast-sel-hot-stdby')
+ if module.params.get('graceful_convergence') is True:
+ ctrl.append('graceful-conv')
+ if module.params.get('load_defer') is True:
+ ctrl.append('load-defer')
+ if module.params.get('suspend_individual') is True:
+ ctrl.append('susp-individual')
+ if module.params.get('symmetric_hash') is True:
+ ctrl.append('symmetric-hash')
+ if not ctrl:
+ ctrl = None
+ else:
+ ctrl = ",".join(ctrl)
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='lacpLagPol',
+ aci_rn='infra/lacplagp-{0}'.format(port_channel),
+ module_object=port_channel,
+ target_filter={'name': port_channel},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='lacpLagPol',
+ class_config=dict(
+ name=port_channel,
+ ctrl=ctrl,
+ descr=description,
+ minLinks=min_links,
+ maxLinks=max_links,
+ mode=mode,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='lacpLagPol')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_port_security.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_port_security.py
new file mode 100644
index 00000000..557fd2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_policy_port_security.py
@@ -0,0 +1,253 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_policy_port_security
+short_description: Manage port security (l2:PortSecurityPol)
+description:
+- Manage port security on Cisco ACI fabrics.
+options:
+ port_security:
+ description:
+ - The name of the port security.
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - The description for the contract.
+ type: str
+ aliases: [ descr ]
+ max_end_points:
+ description:
+ - Maximum number of end points.
+ - Accepted values range between C(0) and C(12000).
+ - The APIC defaults to C(0) when unset during creation.
+ type: int
+ port_security_timeout:
+ description:
+ - The delay time in seconds before MAC learning is re-enabled
+ - Accepted values range between C(60) and C(3600)
+ - The APIC defaults to C(60) when unset during creation
+ type: int
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(l2:PortSecurityPol).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- name: Add a port security interface policy
+ cisco.aci.aci_interface_policy_port_security:
+ host: '{{ inventory_hostname }}'
+ username: '{{ username }}'
+ password: '{{ password }}'
+ port_security: '{{ port_security }}'
+ description: '{{ descr }}'
+ max_end_points: '{{ max_end_points }}'
+ port_security_timeout: '{{ port_security_timeout }}'
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ port_security=dict(type='str', aliases=['name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ max_end_points=dict(type='int'),
+ port_security_timeout=dict(type='int'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['port_security']],
+ ['state', 'present', ['port_security']],
+ ],
+ )
+
+ port_security = module.params.get('port_security')
+ description = module.params.get('description')
+ max_end_points = module.params.get('max_end_points')
+ port_security_timeout = module.params.get('port_security_timeout')
+ name_alias = module.params.get('name_alias')
+ if max_end_points is not None and max_end_points not in range(12001):
+ module.fail_json(msg='The max_end_points must be between 0 and 12000')
+ if port_security_timeout is not None and port_security_timeout not in range(60, 3601):
+ module.fail_json(msg='The port_security_timeout must be between 60 and 3600')
+ state = module.params.get('state')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='l2PortSecurityPol',
+ aci_rn='infra/portsecurityP-{0}'.format(port_security),
+ module_object=port_security,
+ target_filter={'name': port_security},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='l2PortSecurityPol',
+ class_config=dict(
+ name=port_security,
+ descr=description,
+ maximum=max_end_points,
+ nameAlias=name_alias,
+ timeout=port_security_timeout,
+ ),
+ )
+
+ aci.get_diff(aci_class='l2PortSecurityPol')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_selector_to_switch_policy_leaf_profile.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_selector_to_switch_policy_leaf_profile.py
new file mode 100644
index 00000000..6921e015
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_interface_selector_to_switch_policy_leaf_profile.py
@@ -0,0 +1,254 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_interface_selector_to_switch_policy_leaf_profile
+short_description: Bind interface selector profiles to switch policy leaf profiles (infra:RsAccPortP)
+description:
+- Bind interface selector profiles to switch policy leaf profiles on Cisco ACI fabrics.
+options:
+ leaf_profile:
+ description:
+ - Name of the Leaf Profile to which we add a Selector.
+ type: str
+ aliases: [ leaf_profile_name ]
+ interface_selector:
+ description:
+ - Name of Interface Profile Selector to be added and associated with the Leaf Profile.
+ type: str
+ aliases: [ name, interface_selector_name, interface_profile_name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- This module requires an existing leaf profile, the module M(cisco.aci.aci_switch_policy_leaf_profile) can be used for this.
+seealso:
+- module: cisco.aci.aci_switch_policy_leaf_profile
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(infra:RsAccPortP).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Bruno Calogero (@brunocalogero)
+'''
+
+EXAMPLES = r'''
+- name: Associating an interface selector profile to a switch policy leaf profile
+ cisco.aci.aci_interface_selector_to_switch_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_profile: sw_name
+ interface_selector: interface_profile_name
+ state: present
+ delegate_to: localhost
+
+- name: Remove an interface selector profile associated with a switch policy leaf profile
+ cisco.aci.aci_interface_selector_to_switch_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_profile: sw_name
+ interface_selector: interface_profile_name
+ state: absent
+ delegate_to: localhost
+
+- name: Query an interface selector profile associated with a switch policy leaf profile
+ cisco.aci.aci_interface_selector_to_switch_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_profile: sw_name
+ interface_selector: interface_profile_name
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ leaf_profile=dict(type='str', aliases=['leaf_profile_name']), # Not required for querying all objects
+ interface_selector=dict(type='str', aliases=['interface_profile_name', 'interface_selector_name', 'name']), # Not required for querying all objects
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query'])
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['leaf_profile', 'interface_selector']],
+ ['state', 'present', ['leaf_profile', 'interface_selector']]
+ ],
+ )
+
+ leaf_profile = module.params.get('leaf_profile')
+ # WARNING: interface_selector accepts non existing interface_profile names and they appear on APIC gui with a state of "missing-target"
+ interface_selector = module.params.get('interface_selector')
+ state = module.params.get('state')
+
+ # Defining the interface profile tDn for clarity
+ interface_selector_tDn = 'uni/infra/accportprof-{0}'.format(interface_selector)
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='infraNodeP',
+ aci_rn='infra/nprof-{0}'.format(leaf_profile),
+ module_object=leaf_profile,
+ target_filter={'name': leaf_profile},
+ ),
+ subclass_1=dict(
+ aci_class='infraRsAccPortP',
+ aci_rn='rsaccPortP-[{0}]'.format(interface_selector_tDn),
+ module_object=interface_selector,
+ target_filter={'name': interface_selector},
+ )
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='infraRsAccPortP',
+ class_config=dict(tDn=interface_selector_tDn),
+ )
+
+ aci.get_diff(aci_class='infraRsAccPortP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l2out.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l2out.py
new file mode 100644
index 00000000..5550c715
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l2out.py
@@ -0,0 +1,320 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Sudhakar Shet Kudtarkar (@kudtarkar1)
+# Copyright: (c) 2020, Shreyas Srish <ssrish@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: aci_l2out
+short_description: Manage Layer2 Out (L2Out) objects.
+description:
+- Manage Layer2 Out configuration on Cisco ACI fabrics.
+options:
+ tenant:
+ description:
+ - Name of an existing tenant.
+ type: str
+ l2out:
+ description:
+ - The name of outer layer2.
+ type: str
+ aliases: [ 'name' ]
+ description:
+ description:
+ - Description for the L2Out.
+ type: str
+ bd:
+ description:
+ - Name of the Bridge domain which is associted with the L2Out.
+ type: str
+ domain:
+ description:
+ - Name of the external L2 Domain that is being associated with L2Out.
+ type: str
+ vlan:
+ description:
+ - The VLAN which is being associated with the L2Out.
+ type: int
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) modules can be used for this.
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fvTenant).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Sudhakar Shet Kudtarkar (@kudtarkar1)
+- Shreyas Srish (@shrsr)
+'''
+
+EXAMPLES = r'''
+- name: Add a new L2Out
+ cisco.aci.aci_l2out:
+ host: apic
+ username: admin
+ password: SomeSecretePassword
+ tenant: Auto-Demo
+ l2out: l2out
+ description: via Ansible
+ bd: bd1
+ domain: l2Dom
+ vlan: 3200
+ state: present
+ delegate_to: localhost
+
+- name: Remove an L2Out
+ cisco.aci.aci_l2out:
+ host: apic
+ username: admin
+ password: SomeSecretePassword
+ tenant: Auto-Demo
+ l2out: l2out
+ state: absent
+ delegate_to: localhost
+
+- name: Query an L2Out
+ cisco.aci.aci_l2out:
+ host: apic
+ username: admin
+ password: SomeSecretePassword
+ tenant: Auto-Demo
+ l2out: l2out
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all L2Outs in a specific tenant
+ cisco.aci.aci_l2out:
+ host: apic
+ username: admin
+ password: SomeSecretePassword
+ tenant: Auto-Demo
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+ current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+ error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+ raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class "/></imdata>'
+ sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+ previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+ proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+ filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+ method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+ response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+ status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+ url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+ '''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ bd=dict(type='str'),
+ l2out=dict(type='str', aliases=['name']),
+ domain=dict(type='str'),
+ vlan=dict(type='int'),
+ description=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ tenant=dict(type='str'),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['l2out', 'tenant']],
+ ['state', 'present', ['bd', 'l2out', 'tenant', 'domain', 'vlan']],
+ ],
+ )
+
+ bd = module.params.get('bd')
+ l2out = module.params.get('l2out')
+ description = module.params.get('description')
+ domain = module.params.get('domain')
+ vlan = module.params.get('vlan')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+ child_classes = ['l2extRsEBd', 'l2extRsL2DomAtt', 'l2extLNodeP']
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='l2extOut',
+ aci_rn='l2out-{0}'.format(l2out),
+ module_object=l2out,
+ target_filter={'name': l2out},
+ ),
+ child_classes=child_classes,
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ child_configs = [
+ dict(
+ l2extRsL2DomAtt=dict(
+ attributes=dict(
+ tDn='uni/l2dom-{0}'.format(domain)
+ )
+ )
+ ),
+ dict(
+ l2extRsEBd=dict(
+ attributes=dict(
+ tnFvBDName=bd, encap='vlan-{0}'.format(vlan)
+ )
+ )
+ )
+ ]
+
+ aci.payload(
+ aci_class='l2extOut',
+ class_config=dict(
+ name=l2out,
+ descr=description,
+ dn='uni/tn-{0}/l2out-{1}'.format(tenant, l2out),
+ nameAlias=name_alias
+ ),
+ child_configs=child_configs,
+ )
+
+ aci.get_diff(aci_class='l2extOut')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l2out_extepg.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l2out_extepg.py
new file mode 100644
index 00000000..8111e2b2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l2out_extepg.py
@@ -0,0 +1,310 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Sudhakar Shet Kudtarkar (@kudtarkar1)
+# Copyright: (c) 2020, Shreyas Srish <ssrish@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+
+DOCUMENTATION = r'''
+---
+module: aci_l2out_extepg
+short_description: Manage External Network Instance (L2Out External EPG) objects (l2extInstP).
+description:
+- Manage External Network Instance (L2Out External EPG) objects (l2extInstP) on ACI fabrics.
+options:
+ tenant:
+ description:
+ - Name of existing tenant.
+ type: str
+ l2out:
+ description:
+ - Name of the l2out.
+ type: str
+ extepg:
+ description:
+ - Name of the external end point group.
+ type: str
+ aliases: [ external_epg, extepg_name, name ]
+ description:
+ description:
+ - Description for the l2out.
+ type: str
+ preferred_group:
+ description:
+ - This depicts whether this External EPG is part of the Preferred Group and can communicate without contracts.
+ - This is convenient for migration scenarios, or when ACI is used for network automation but not for policy.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ qos_class:
+ description:
+ - The bandwidth level for Quality of service.
+ type: str
+ choices: [ level1, level2, level3, level4, level5, level6, Unspecified ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) and C(l2out) must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) and M(cisco.aci.aci_l2out) modules can be used for this.
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fvtenant) and B(l2extOut).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Sudhakar Shet Kudtarkar (@kudtarkar1)
+- Shreyas Srish (@shrsr)
+'''
+
+EXAMPLES = r'''
+- name: Add a new L2 external end point group
+ cisco.aci.aci_l2out_extepg:
+ host: apic
+ username: admin
+ password: SomeSecretePassword
+ tenant: Auto-Demo
+ l2out: l2out
+ extepg: NewExt
+ description: external epg
+ preferred_group: False
+ state: present
+ delegate_to: localhost
+
+- name: Remove an L2 external end point group
+ cisco.aci.aci_l2out_extepg:
+ host: apic
+ username: admin
+ password: SomeSecretePassword
+ tenant: Auto-Demo
+ l2out: l2out
+ extepg: NewExt
+ state: absent
+ delegate_to: localhost
+
+- name: Query the L2 external end point group
+ cisco.aci.aci_l2out_extepg:
+ host: apic
+ username: admin
+ password: SomeSecretePassword
+ tenant: Auto-Demo
+ l2out: l2out
+ extepg: NewExt
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all L2 external end point groups in a tenant
+ cisco.aci.aci_l2out_extepg:
+ host: apic
+ username: admin
+ password: SomeSecretePassword
+ tenant: Auto-Demo
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+ current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+ error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+ raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class "/></imdata>'
+ sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+ previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+ proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+ filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+ method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+ response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+ status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+ url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+ '''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ l2out=dict(type='str'),
+ description=dict(type='str'),
+ extepg=dict(type='str', aliases=['external_epg', 'extepg_name', 'name']),
+ preferred_group=dict(type='bool'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ tenant=dict(type='str'),
+ qos_class=dict(type='str', choices=['level1', 'level2', 'level3', 'level4', 'level5', 'level6', 'Unspecified']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['l2out', 'tenant', 'extepg']],
+ ['state', 'present', ['l2out', 'tenant', 'extepg']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ l2out = module.params.get('l2out')
+ description = module.params.get('description')
+ preferred_group = aci.boolean(module.params.get('preferred_group'), 'include', 'exclude')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ extepg = module.params.get('extepg')
+ qos_class = module.params.get('qos_class')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='l2extOut',
+ aci_rn='l2out-{0}'.format(l2out),
+ module_object=l2out,
+ target_filter={'name': l2out},
+ ),
+ subclass_2=dict(
+ aci_class='l2extInstP',
+ aci_rn='instP-{0}'.format(extepg),
+ module_object=extepg,
+ target_filter={'name': extepg},
+
+ )
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ config = dict(
+ name=extepg,
+ descr=description,
+ dn='uni/tn-{0}/l2out-{1}/instP-{2}'.format(tenant, l2out, extepg),
+ prefGrMemb=preferred_group
+ )
+ if qos_class:
+ config.update(prio=qos_class)
+ aci.payload(
+ class_config=config,
+ aci_class='l2extInstP',
+ )
+
+ aci.get_diff(aci_class='l2extInstP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out.py
new file mode 100644
index 00000000..50fee411
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out.py
@@ -0,0 +1,367 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_l3out
+short_description: Manage Layer 3 Outside (L3Out) objects (l3ext:Out)
+description:
+- Manage Layer 3 Outside (L3Out) on Cisco ACI fabrics.
+options:
+ tenant:
+ description:
+ - Name of an existing tenant.
+ type: str
+ aliases: [ tenant_name ]
+ l3out:
+ description:
+ - Name of L3Out being created.
+ type: str
+ aliases: [ l3out_name, name ]
+ vrf:
+ description:
+ - Name of the VRF being associated with the L3Out.
+ type: str
+ aliases: [ vrf_name ]
+ domain:
+ description:
+ - Name of the external L3 domain being associated with the L3Out.
+ type: str
+ aliases: [ ext_routed_domain_name, routed_domain ]
+ dscp:
+ description:
+ - The target Differentiated Service (DSCP) value.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ AF11, AF12, AF13, AF21, AF22, AF23, AF31, AF32, AF33, AF41, AF42, AF43, CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7, EF, VA, unspecified ]
+ aliases: [ target ]
+ route_control:
+ description:
+ - Route Control enforcement direction. The only allowed values are export or import,export.
+ type: list
+ elements: str
+ choices: [ export, import ]
+ aliases: [ route_control_enforcement ]
+ l3protocol:
+ description:
+ - Routing protocol for the L3Out
+ type: list
+ elements: str
+ choices: [ bgp, eigrp, ospf, pim, static ]
+ asn:
+ description:
+ - The AS number for the L3Out.
+ - Only applicable when using 'eigrp' as the l3protocol
+ type: int
+ aliases: [ as_number ]
+ description:
+ description:
+ - Description for the L3Out.
+ type: str
+ aliases: [ descr ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) and C(domain) and C(vrf) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) and M(cisco.aci.aci_domain) and M(cisco.aci.aci_vrf) modules can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- module: cisco.aci.aci_domain
+- module: cisco.aci.aci_vrf
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(l3ext:Out).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Rostyslav Davydenko (@rost-d)
+'''
+
+EXAMPLES = r'''
+- name: Add a new L3Out
+ cisco.aci.aci_l3out:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ name: prod_l3out
+ description: L3Out for Production tenant
+ domain: l3dom_prod
+ vrf: prod
+ l3protocol: ospf
+ state: present
+ delegate_to: localhost
+
+- name: Delete L3Out
+ cisco.aci.aci_l3out:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ name: prod_l3out
+ state: absent
+ delegate_to: localhost
+
+- name: Query L3Out information
+ cisco.aci.aci_l3out:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ name: prod_l3out
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ l3out=dict(type='str', aliases=['l3out_name', 'name']), # Not required for querying all objects
+ domain=dict(type='str', aliases=['ext_routed_domain_name', 'routed_domain']),
+ vrf=dict(type='str', aliases=['vrf_name']),
+ description=dict(type='str', aliases=['descr']),
+ route_control=dict(type='list', elements='str', choices=['export', 'import'], aliases=['route_control_enforcement']),
+ dscp=dict(type='str',
+ choices=['AF11', 'AF12', 'AF13', 'AF21', 'AF22', 'AF23', 'AF31', 'AF32', 'AF33', 'AF41', 'AF42',
+ 'AF43', 'CS0', 'CS1', 'CS2', 'CS3', 'CS4', 'CS5', 'CS6', 'CS7', 'EF', 'VA', 'unspecified'],
+ aliases=['target']),
+ l3protocol=dict(type='list', elements='str', choices=['bgp', 'eigrp', 'ospf', 'pim', 'static']),
+ asn=dict(type='int', aliases=['as_number']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['l3out', 'tenant']],
+ ['state', 'present', ['l3out', 'tenant', 'domain', 'vrf']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ l3out = module.params.get('l3out')
+ domain = module.params.get('domain')
+ dscp = module.params.get('dscp')
+ description = module.params.get('description')
+ enforceRtctrl = module.params.get('route_control')
+ vrf = module.params.get('vrf')
+ l3protocol = module.params.get('l3protocol')
+ asn = module.params.get('asn')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ if l3protocol:
+ if 'eigrp' in l3protocol and asn is None:
+ module.fail_json(msg="Parameter 'asn' is required when l3protocol is 'eigrp'")
+ if 'eigrp' not in l3protocol and asn is not None:
+ module.warn("Parameter 'asn' is only applicable when l3protocol is 'eigrp'. The ASN will be ignored")
+
+ enforce_ctrl = ''
+ if enforceRtctrl is not None:
+ if len(enforceRtctrl) == 1 and enforceRtctrl[0] == 'import':
+ aci.fail_json(
+ "The route_control parameter is invalid: allowed options are export or import,export only")
+ elif len(enforceRtctrl) == 1 and enforceRtctrl[0] == 'export':
+ enforce_ctrl = 'export'
+ else:
+ enforce_ctrl = 'export,import'
+ child_classes = ['l3extRsL3DomAtt', 'l3extRsEctx', 'bgpExtP', 'ospfExtP', 'eigrpExtP', 'pimExtP']
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='l3extOut',
+ aci_rn='out-{0}'.format(l3out),
+ module_object=l3out,
+ target_filter={'name': l3out},
+ ),
+ child_classes=child_classes,
+ )
+
+ aci.get_existing()
+
+ child_configs = [
+ dict(l3extRsL3DomAtt=dict(attributes=dict(
+ tDn='uni/l3dom-{0}'.format(domain)))),
+ dict(l3extRsEctx=dict(attributes=dict(tnFvCtxName=vrf))),
+ ]
+ if l3protocol is not None:
+ for protocol in l3protocol:
+ if protocol == 'bgp':
+ child_configs.append(
+ dict(bgpExtP=dict(attributes=dict(descr='', nameAlias=''))))
+ elif protocol == 'eigrp':
+ child_configs.append(
+ dict(eigrpExtP=dict(attributes=dict(descr='', nameAlias='', asn=asn))))
+ elif protocol == 'ospf':
+ child_configs.append(
+ dict(ospfExtP=dict(attributes=dict(descr='', nameAlias=''))))
+ elif protocol == 'pim':
+ child_configs.append(
+ dict(pimExtP=dict(attributes=dict(descr='', nameAlias=''))))
+
+ if state == 'present':
+ aci.payload(
+ aci_class='l3extOut',
+ class_config=dict(
+ name=l3out,
+ descr=description,
+ dn='uni/tn-{0}/out-{1}'.format(tenant, l3out),
+ enforceRtctrl=enforce_ctrl,
+ targetDscp=dscp,
+ nameAlias=name_alias,
+ ),
+ child_configs=child_configs,
+ )
+
+ aci.get_diff(aci_class='l3extOut')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_extepg.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_extepg.py
new file mode 100644
index 00000000..bbe4dfa6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_extepg.py
@@ -0,0 +1,309 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_l3out_extepg
+short_description: Manage External Network Instance Profile (ExtEpg) objects (l3extInstP:instP)
+description:
+- Manage External Network Instance Profile (ExtEpg) objects (l3extInstP:instP)
+options:
+ tenant:
+ description:
+ - Name of an existing tenant.
+ type: str
+ aliases: [ tenant_name ]
+ l3out:
+ description:
+ - Name of an existing L3Out.
+ type: str
+ aliases: [ l3out_name ]
+ extepg:
+ description:
+ - Name of ExtEpg being created.
+ type: str
+ aliases: [ extepg_name, name ]
+ description:
+ description:
+ - Description for the ExtEpg.
+ type: str
+ aliases: [ descr ]
+ preferred_group:
+ description:
+ - Whether ot not the EPG is part of the Preferred Group and can communicate without contracts.
+ - This is very convenient for migration scenarios, or when ACI is used for network automation but not for policy.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ dscp:
+ description:
+ - The target Differentiated Service (DSCP) value.
+ - The APIC defaults to C(unspecified) when unset during creation.
+ type: str
+ choices: [ AF11, AF12, AF13, AF21, AF22, AF23, AF31, AF32, AF33, AF41, AF42, AF43, CS0, CS1, CS2, CS3, CS4, CS5, CS6, CS7, EF, VA, unspecified ]
+ aliases: [ target ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) and C(domain) and C(vrf) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) and M(cisco.aci.aci_domain) and M(cisco.aci.aci_vrf) modules can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- module: cisco.aci.aci_domain
+- module: cisco.aci.aci_vrf
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(l3ext:Out).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Rostyslav Davydenko (@rost-d)
+'''
+
+EXAMPLES = r'''
+- name: Add a new ExtEpg
+ cisco.aci.aci_l3out_extepg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ l3out: prod_l3out
+ name: prod_extepg
+ description: ExtEpg for Production L3Out
+ state: present
+ delegate_to: localhost
+
+- name: Delete ExtEpg
+ cisco.aci.aci_extepg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ l3out: prod_l3out
+ name: prod_extepg
+ state: absent
+ delegate_to: localhost
+
+- name: Query ExtEpg information
+ cisco.aci.aci_l3out_extepg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ l3out: prod_l3out
+ name: prod_extepg
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ l3out=dict(type='str', aliases=['l3out_name']), # Not required for querying all objects
+ extepg=dict(type='str', aliases=['extepg_name', 'name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ preferred_group=dict(type='bool'),
+ dscp=dict(type='str',
+ choices=['AF11', 'AF12', 'AF13', 'AF21', 'AF22', 'AF23', 'AF31', 'AF32', 'AF33', 'AF41', 'AF42',
+ 'AF43', 'CS0', 'CS1', 'CS2', 'CS3', 'CS4', 'CS5', 'CS6', 'CS7', 'EF', 'VA', 'unspecified'],
+ aliases=['target']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['extepg', 'l3out', 'tenant']],
+ ['state', 'absent', ['extepg', 'l3out', 'tenant']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ tenant = module.params.get('tenant')
+ l3out = module.params.get('l3out')
+ extepg = module.params.get('extepg')
+ description = module.params.get('description')
+ preferred_group = aci.boolean(module.params.get('preferred_group'), 'include', 'exclude')
+ dscp = module.params.get('dscp')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='l3extOut',
+ aci_rn='out-{0}'.format(l3out),
+ module_object=l3out,
+ target_filter={'name': l3out},
+ ),
+ subclass_2=dict(
+ aci_class='l3extInstP',
+ aci_rn='instP-{0}'.format(extepg),
+ module_object=extepg,
+ target_filter={'name': extepg},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='l3extInstP',
+ class_config=dict(
+ name=extepg,
+ descr=description,
+ prefGrMemb=preferred_group,
+ targetDscp=dscp,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='l3extInstP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_extepg_to_contract.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_extepg_to_contract.py
new file mode 100644
index 00000000..9bc94fe7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_extepg_to_contract.py
@@ -0,0 +1,346 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Sudhakar Shet Kudtarkar (@kudtarkar1)
+# Copyright: (c) 2020, Shreyas Srish <ssrish@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: aci_l3out_extepg_to_contract
+short_description: Bind Contracts to External End Point Groups (EPGs)
+description:
+- Bind Contracts to External End Point Groups (EPGs) on ACI fabrics.
+options:
+ tenant:
+ description:
+ - Name of existing tenant.
+ type: str
+ l3out:
+ description:
+ - Name of the l3out.
+ type: str
+ aliases: ['l3out_name']
+ extepg:
+ description:
+ - Name of the external end point group.
+ type: str
+ aliases: ['extepg_name', 'external_epg']
+ contract:
+ description:
+ - Name of the contract.
+ type: str
+ contract_type:
+ description:
+ - The type of contract.
+ type: str
+ required: yes
+ choices: ['consumer', 'provider']
+ priority:
+ description:
+ - This has four levels of priority.
+ type: str
+ choices: ['level1', 'level2', 'level3', 'unspecified']
+ provider_match:
+ description:
+ - This is configurable for provided contracts.
+ type: str
+ choices: ['all', 'at_least_one', 'at_most_one', 'none']
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant), C(l3out) and C(extepg) must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant), M(cisco.aci.aci_l3out) and M(cisco.aci.aci_l3out_extepg) modules can be used for this.
+seealso:
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fvtenant), B(l3extInstP) and B(l3extOut).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Sudhakar Shet Kudtarkar (@kudtarkar1)
+- Shreyas Srish (@shrsr)
+'''
+
+EXAMPLES = r'''
+- name: Bind a contract to an external EPG
+ cisco.aci.aci_l3out_epg_to_contract:
+ host: apic
+ username: admin
+ password: SomeSecretePassword
+ tenant: Auto-Demo
+ l3out: l3out
+ extepg : testEpg
+ contract: contract1
+ contract_type: provider
+ state: present
+ delegate_to: localhost
+
+- name: Remove existing contract from an external EPG
+ cisco.aco.aci_l3out_epg_to_contract:
+ host: apic
+ username: admin
+ password: SomeSecretePassword
+ tenant: Auto-Demo
+ l3out: l3out
+ extepg : testEpg
+ contract: contract1
+ contract_type: provider
+ state: absent
+ delegate_to: localhost
+
+- name: Query a contract bound to an external EPG
+ cisco.aci.aci_l3out_epg_to_contract:
+ host: apic
+ username: admin
+ password: SomeSecretePassword
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ contract: ansible_contract
+ contract_type: provider
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all contracts relationships
+ cisco.aci.aci_l3out_epg_to_contract:
+ host: apic
+ username: admin
+ password: SomeSecretePassword
+ contract_type: provider
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+ current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+ error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+ raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class "/></imdata>'
+ sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+ previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+ proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+ filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+ method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+ response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+ status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+ url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+ '''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+ACI_CLASS_MAPPING = dict(
+ consumer={
+ 'class': 'fvRsCons',
+ 'rn': 'rscons-',
+ },
+ provider={
+ 'class': 'fvRsProv',
+ 'rn': 'rsprov-',
+ },
+)
+
+PROVIDER_MATCH_MAPPING = dict(
+ all='All',
+ at_least_one='AtleastOne',
+ at_most_one='tmostOne',
+ none='None',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ contract_type=dict(type='str', required=True, choices=['consumer', 'provider']),
+ l3out=dict(type='str', aliases=['l3out_name']),
+ contract=dict(type='str'),
+ priority=dict(type='str', choices=['level1', 'level2', 'level3', 'unspecified']),
+ provider_match=dict(type='str', choices=['all', 'at_least_one', 'at_most_one', 'none']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ tenant=dict(type='str'),
+ extepg=dict(type='str', aliases=['extepg_name', 'external_epg']),
+ )
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['extepg', 'contract', 'l3out', 'tenant']],
+ ['state', 'present', ['extepg', 'contract', 'l3out', 'tenant']],
+ ],
+ )
+
+ l3out = module.params.get('l3out')
+ contract = module.params.get('contract')
+ contract_type = module.params.get('contract_type')
+ extepg = module.params.get('extepg')
+ priority = module.params.get('priority')
+ provider_match = module.params.get('provider_match')
+ if provider_match is not None:
+ provider_match = PROVIDER_MATCH_MAPPING.get(provider_match)
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+
+ aci_class = ACI_CLASS_MAPPING.get(contract_type)["class"]
+ aci_rn = ACI_CLASS_MAPPING.get(contract_type)["rn"]
+
+ if contract_type == "consumer" and provider_match is not None:
+ module.fail_json(msg="the 'provider_match' is only configurable for Provided Contracts")
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='l3extOut',
+ aci_rn='out-{0}'.format(l3out),
+ module_object=l3out,
+ target_filter={'name': l3out},
+ ),
+ subclass_2=dict(
+ aci_class='l3extInstP',
+ aci_rn='instP-{0}'.format(extepg),
+ module_object=extepg,
+ target_filter={'name': extepg},
+ ),
+ subclass_3=dict(
+ aci_class=aci_class,
+ aci_rn='{0}{1}'.format(aci_rn, contract),
+ module_object=contract,
+ target_filter={'tnVzBrCPName': contract},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class=aci_class,
+ class_config=dict(
+ matchT=provider_match,
+ prio=priority,
+ tnVzBrCPName=contract,
+ ),
+ )
+
+ aci.get_diff(aci_class=aci_class)
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_extsubnet.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_extsubnet.py
new file mode 100644
index 00000000..cddd76a6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_extsubnet.py
@@ -0,0 +1,332 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_l3out_extsubnet
+short_description: Manage External Subnet objects (l3extSubnet:extsubnet)
+description:
+- Manage External Subnet objects (l3extSubnet:extsubnet)
+options:
+ tenant:
+ description:
+ - Name of an existing tenant.
+ type: str
+ aliases: [ tenant_name ]
+ required: yes
+ l3out:
+ description:
+ - Name of an existing L3Out.
+ type: str
+ aliases: [ l3out_name ]
+ required: yes
+ extepg:
+ description:
+ - Name of an existing ExtEpg.
+ type: str
+ aliases: [ extepg_name ]
+ required: yes
+ network:
+ description:
+ - The network address for the Subnet.
+ type: str
+ aliases: [ address, ip ]
+ subnet_name:
+ description:
+ - Name of External Subnet being created.
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - Description for the External Subnet.
+ type: str
+ aliases: [ descr ]
+ scope:
+ description:
+ - Determines the scope of the Subnet.
+ - The C(export-rtctrl) option controls which external networks are advertised out of the fabric using route-maps and IP prefix-lists.
+ - The C(import-security) option classifies for the external EPG.
+ The rules and contracts defined in this external EPG apply to networks matching this subnet.
+ - The C(shared-rtctrl) option controls which external prefixes are advertised to other tenants for shared services.
+ - The C(shared-security) option configures the classifier for the subnets in the VRF where the routes are leaked.
+ - The APIC defaults to C(import-security) when unset during creation.
+ default: [ import-security ]
+ type: list
+ elements: str
+ choices: [ export-rtctrl, import-security, shared-rtctrl, shared-security ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) and C(domain) and C(vrf) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) and M(cisco.aci.aci_domain) and M(cisco.aci.aci_vrf) modules can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- module: cisco.aci.aci_domain
+- module: cisco.aci.aci_vrf
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(l3ext:Out).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Rostyslav Davydenko (@rost-d)
+- Cindy Zhao (@cizhao)
+'''
+
+EXAMPLES = r'''
+- name: Add a new External Subnet
+ cisco.aci.aci_l3out_extsubnet:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ l3out: prod_l3out
+ extepg: prod_extepg
+ description: External Subnet for Production ExtEpg
+ network: 192.0.2.0/24
+ scope: export-rtctrl
+ state: present
+ delegate_to: localhost
+
+- name: Delete External Subnet
+ cisco.aci.aci_l3out_extsubnet:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ l3out: prod_l3out
+ extepg: prod_extepg
+ network: 192.0.2.0/24
+ state: absent
+ delegate_to: localhost
+
+- name: Query ExtEpg Subnet information
+ cisco.aci.aci_l3out_extsubnet:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ l3out: prod_l3out
+ extepg: prod_extepg
+ network: 192.0.2.0/24
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', required=True, aliases=['tenant_name']),
+ l3out=dict(type='str', required=True, aliases=['l3out_name']),
+ extepg=dict(type='str', required=True, aliases=['extepg_name', 'name']),
+ network=dict(type='str', aliases=['address', 'ip']),
+ description=dict(type='str', aliases=['descr']),
+ subnet_name=dict(type='str', aliases=['name']),
+ scope=dict(type='list', elements='str', default=['import-security'], choices=['export-rtctrl', 'import-security', 'shared-rtctrl', 'shared-security']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['network']],
+ ['state', 'absent', ['network']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ tenant = module.params.get('tenant')
+ l3out = module.params.get('l3out')
+ extepg = module.params.get('extepg')
+ network = module.params.get('network')
+ description = module.params.get('description')
+ subnet_name = module.params.get('subnet_name')
+ scope = ','.join(sorted(module.params.get('scope')))
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='l3extOut',
+ aci_rn='out-{0}'.format(l3out),
+ module_object=l3out,
+ target_filter={'name': l3out},
+ ),
+ subclass_2=dict(
+ aci_class='l3extInstP',
+ aci_rn='instP-{0}'.format(extepg),
+ module_object=extepg,
+ target_filter={'name': extepg},
+ ),
+ subclass_3=dict(
+ aci_class='l3extSubnet',
+ aci_rn='extsubnet-[{0}]'.format(network),
+ module_object=network,
+ target_filter={'name': network},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='l3extSubnet',
+ class_config=dict(
+ ip=network,
+ descr=description,
+ name=subnet_name,
+ scope=scope,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='l3extSubnet')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_logical_interface_vpc_member.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_logical_interface_vpc_member.py
new file mode 100644
index 00000000..61110acb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_logical_interface_vpc_member.py
@@ -0,0 +1,340 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Anvitha Jain(@anvitha-jain) <anvjain@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_l3out_logical_interface_vpc_member
+short_description: Manage Member Node objects (l3extMember:Member)
+description:
+- Manage Member Node objects (l3extMember:Member)
+options:
+ description:
+ description:
+ - The description for the logical interface VPC member.
+ type: str
+ aliases: [ descr ]
+ tenant:
+ description:
+ - Name of an existing tenant.
+ type: str
+ aliases: [ tenant_name ]
+ l3out:
+ description:
+ - Name of an existing L3Out.
+ type: str
+ aliases: [ l3out_name ]
+ logical_node:
+ description:
+ - Name of an existing logical node profile.
+ type: str
+ logical_interface:
+ description:
+ - Name of an existing logical interface.
+ type: str
+ path_dn:
+ description:
+ - DN of existing path endpoints for VPC policy group used to reach external L3 network.
+ type: str
+ side:
+ description:
+ - Provides the side of member.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant), C(l3out), C(logical_node), C(logical_interface), C(path_dn) and C(member) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) and M(cisco.aci.aci_l3out) modules can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- module: cisco.aci.aci_l3out
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(l3ext:Out).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Anvitha Jain(@anvitha-jain)
+'''
+
+EXAMPLES = r'''
+- name: Create a VPC member
+ cisco.aci.aci_l3out_logical_interface_vpc_member:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenantName
+ l3out: l3out
+ logical_node: nodeName
+ logical_interface: interfaceName
+ path_dn: topology/pod-1/protpaths-101-102/pathep-[policy_group_name]
+ side: A
+ state: present
+ delegate_to: localhost
+
+- name: Delete a VPC member
+ cisco.aci.aci_l3out_logical_interface_vpc_member:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenantName
+ l3out: l3out
+ logical_node: nodeName
+ logical_interface: interfaceName
+ path_dn: topology/pod-1/protpaths-101-102/pathep-[policy_group_name]
+ side: A
+ state: absent
+ delegate_to: localhost
+
+- name: Query all VPC members
+ cisco.aci.aci_l3out_logical_interface_vpc_member:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query a specific VPC member under l3out
+ cisco.aci.aci_l3out_logical_interface_vpc_member:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenantName
+ l3out: l3out
+ logical_node: nodeName
+ logical_interface: interfaceName
+ path_dn: topology/pod-1/protpaths-101-102/pathep-[policy_group_name]
+ side: A
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ l3out=dict(type='str', aliases=['l3out_name']), # Not required for querying all objects
+ logical_node=dict(type='str'), # Not required for querying all objects
+ logical_interface=dict(type='str'),
+ path_dn=dict(type='str'),
+ side=dict(type='str'),
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['side', 'path_dn', 'logical_interface', 'logical_node', 'l3out', 'tenant']],
+ ['state', 'absent', ['side', 'path_dn', 'logical_interface', 'logical_node', 'l3out', 'tenant']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ tenant = module.params.get('tenant')
+ l3out = module.params.get('l3out')
+ logical_node = module.params.get('logical_node')
+ logical_interface = module.params.get('logical_interface')
+ path_dn = module.params.get('path_dn')
+ side = module.params.get('side')
+ description = module.params.get('description')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='l3extOut',
+ aci_rn='out-{0}'.format(l3out),
+ module_object=l3out,
+ target_filter={'name': l3out},
+ ),
+ subclass_2=dict(
+ aci_class='l3extLNodeP',
+ aci_rn='lnodep-{0}'.format(logical_node),
+ module_object=logical_node,
+ target_filter={'name': logical_node},
+ ),
+ subclass_3=dict(
+ aci_class='l3extLIfP',
+ aci_rn='/lifp-{0}'.format(logical_interface),
+ module_object=logical_interface,
+ target_filter={'name': logical_interface},
+ ),
+ subclass_4=dict(
+ aci_class='l3extRsPathL3OutAtt',
+ aci_rn='/rspathL3OutAtt-[{0}]'.format(path_dn),
+ module_object=path_dn,
+ target_filter={'name': path_dn},
+ ),
+ subclass_5=dict(
+ aci_class='l3extMember',
+ aci_rn='/mem-{0}'.format(side),
+ module_object=side,
+ target_filter={'name': side},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='l3extMember',
+ class_config=dict(
+ name=side,
+ descr=description,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='l3extMember')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_route_tag_policy.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_route_tag_policy.py
new file mode 100644
index 00000000..412a492d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_route_tag_policy.py
@@ -0,0 +1,255 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_l3out_route_tag_policy
+short_description: Manage route tag policies (l3ext:RouteTagPol)
+description:
+- Manage route tag policies on Cisco ACI fabrics.
+options:
+ rtp:
+ description:
+ - The name of the route tag policy.
+ type: str
+ aliases: [ name, rtp_name ]
+ description:
+ description:
+ - The description for the route tag policy.
+ type: str
+ aliases: [ descr ]
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ aliases: [ tenant_name ]
+ tag:
+ description:
+ - The value of the route tag.
+ - Accepted values range between C(0) and C(4294967295).
+ - The APIC defaults to C(4294967295) when unset during creation.
+ type: int
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(l3ext:RouteTagPol).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- cisco.aci.aci_l3out_route_tag_policy:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ rtp: '{{ rtp_name }}'
+ tenant: production
+ tag: '{{ tag }}'
+ description: '{{ description }}'
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ rtp=dict(type='str', aliases=['name', 'rtp_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ tag=dict(type='int'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['rtp', 'tenant']],
+ ['state', 'present', ['rtp', 'tenant']],
+ ],
+ )
+
+ rtp = module.params.get('rtp')
+ description = module.params.get('description')
+ tag = module.params.get('tag')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='l3extRouteTagPol',
+ aci_rn='rttag-{0}'.format(rtp),
+ module_object=rtp,
+ target_filter={'name': rtp},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='l3extRouteTagPol',
+ class_config=dict(
+ name=rtp,
+ descr=description, tag=tag,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='l3extRouteTagPol')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_static_routes.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_static_routes.py
new file mode 100644
index 00000000..2faf6e3b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_l3out_static_routes.py
@@ -0,0 +1,368 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Anvitha Jain(@anvitha-jain) <anvjain@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_l3out_static_routes
+short_description: Manage Static routes object (l3ext:ipRouteP)
+description:
+- Manage External Subnet objects (l3ext:ipRouteP)
+options:
+ description:
+ description:
+ - The description for the static routes.
+ type: str
+ aliases: [ descr ]
+ tenant:
+ description:
+ - Name of an existing tenant.
+ type: str
+ aliases: [ tenant_name ]
+ l3out:
+ description:
+ - Name of an existing L3Out.
+ type: str
+ aliases: [ l3out_name ]
+ logical_node:
+ description:
+ - Name of an existing logical node profile.
+ type: str
+ pod_id:
+ description:
+ - Existing podId.
+ type: int
+ node_id:
+ description:
+ - Existing nodeId.
+ type: int
+ prefix:
+ description:
+ - Configure IP and next hop IP for the routed outside network.
+ type: str
+ aliases: [ route ]
+ track_policy:
+ description:
+ - Relation definition for static route to TrackList.
+ type: str
+ preference:
+ description:
+ - Administrative preference value for the route.
+ type: int
+ bfd:
+ description:
+ - Determines if bfd is required for route control.
+ - The APIC defaults to C(null) when unset during creation.
+ type: str
+ choices: [ bfd, null ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant), C(l3out), C(logical_node), C(fabric_node) and C(prefix) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) and M(cisco.aci.aci_l3out) modules can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- module: cisco.aci.aci_l3out
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(l3ext:Out).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Anvitha Jain(@anvitha-jain)
+'''
+
+EXAMPLES = r'''
+- name: Create static routes
+ cisco.aci.aci_l3out_static_routes:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenantName
+ l3out: l3out
+ logical_node: nodeName
+ node_id: 101
+ pod_id: 1
+ prefix: 10.10.0.0/16
+ delegate_to: localhost
+
+- name: Delete static routes
+ cisco.aci.aci_l3out_static_routes:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenantName
+ l3out: l3out
+ logical_node: nodeName
+ node_id: 101
+ pod_id: 1
+ prefix: 10.10.0.0/16
+ delegate_to: localhost
+
+- name: Query for a specific MO under l3out
+ cisco.aci.aci_l3out_static_routes:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenantName
+ l3out: l3out
+ logical_node: nodeName
+ node_id: 101
+ pod_id: 1
+ prefix: 10.10.0.0/16
+ delegate_to: localhost
+
+- name: Query for all static routes
+ cisco.aci.aci_l3out_static_routes:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ l3out=dict(type='str', aliases=['l3out_name']), # Not required for querying all objects
+ logical_node=dict(type='str'), # Not required for querying all objects
+ pod_id=dict(type='int'),
+ node_id=dict(type='int'),
+ prefix=dict(type='str', aliases=['route']),
+ track_policy=dict(type='str'),
+ preference=dict(type='int'),
+ bfd=dict(type='str', choices=['bfd', None]),
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['prefix', 'node_id', 'pod_id', 'logical_node', 'l3out', 'tenant']],
+ ['state', 'absent', ['prefix', 'node_id', 'pod_id', 'logical_node', 'l3out', 'tenant']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ tenant = module.params.get('tenant')
+ l3out = module.params.get('l3out')
+ logical_node = module.params.get('logical_node')
+ node_id = module.params.get('node_id')
+ pod_id = module.params.get('pod_id')
+ prefix = module.params.get('prefix')
+ track_policy = module.params.get('track_policy')
+ preference = module.params.get('preference')
+ bfd = module.params.get('bfd')
+ description = module.params.get('description')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ fabric_node = 'topology/pod-{0}/node-{1}'.format(pod_id, node_id)
+ child_classes = ['ipNexthopP']
+ if track_policy is not None:
+ child_classes.append('ipRsRouteTrack')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='l3extOut',
+ aci_rn='out-{0}'.format(l3out),
+ module_object=l3out,
+ target_filter={'name': l3out},
+ ),
+ subclass_2=dict(
+ aci_class='l3extLNodeP',
+ aci_rn='lnodep-{0}'.format(logical_node),
+ module_object=logical_node,
+ target_filter={'name': logical_node},
+ ),
+ subclass_3=dict(
+ aci_class='l3extRsNodeL3OutAtt',
+ aci_rn='/rsnodeL3OutAtt-[{0}]'.format(fabric_node),
+ module_object=fabric_node,
+ target_filter={'name': fabric_node},
+ ),
+ subclass_4=dict(
+ aci_class='ipRouteP',
+ aci_rn='/rt-[{0}]'.format(prefix),
+ module_object=prefix,
+ target_filter={'name': prefix},
+ ),
+ child_classes=child_classes
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ child_configs = []
+ class_config = dict(
+ descr=description,
+ ip=prefix,
+ pref=preference,
+ nameAlias=name_alias,
+ )
+ if bfd is not None:
+ class_config['rtCtrl'] = bfd
+
+ if track_policy is not None:
+ tDn = 'uni/tn-{0}/tracklist-{1}'.format(tenant, track_policy)
+ child_configs.append({'ipRsRouteTrack': {'attributes': {'tDn': tDn}}})
+
+ aci.payload(
+ aci_class='ipRouteP',
+ class_config=class_config,
+ child_configs=child_configs
+ ),
+
+ aci.get_diff(aci_class='ipRouteP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_maintenance_group.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_maintenance_group.py
new file mode 100644
index 00000000..2df19b7d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_maintenance_group.py
@@ -0,0 +1,236 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = '''
+module: aci_maintenance_group
+short_description: This creates an ACI maintenance group
+notes:
+ - a maintenance policy (aci_maintenance_policy must be created prior to creating an aci maintenance group
+description:
+ - This modules creates an ACI maintenance group
+options:
+ group:
+ description:
+ - This is the name of the group
+ type: str
+ policy:
+ description:
+ - This is the name of the policy that was created using aci_maintenance_policy
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [absent, present, query]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+author:
+ - Steven Gerhart (@sgerhart)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- name: maintenance group
+ cisco.aci.aci_maintenance_group:
+ host: "{{ inventory_hostname }}"
+ username: "{{ user }}"
+ password: "{{ pass }}"
+ validate_certs: no
+ group: maintenancegrp1
+ policy: maintenancePol1
+ state: present
+'''
+
+RETURN = '''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ group=dict(type='str'), # Not required for querying all objects
+ policy=dict(type='str'), # Not required for querying all objects
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['group']],
+ ['state', 'present', ['group']],
+ ],
+ )
+
+ state = module.params.get('state')
+ group = module.params.get('group')
+ policy = module.params.get('policy')
+ name_alias = module.params.get('name_alias')
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='maintMaintGrp',
+ aci_rn='fabric/maintgrp-{0}'.format(group),
+ target_filter={'name': group},
+ module_object=group,
+ ),
+ child_classes=['maintRsMgrpp'],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='maintMaintGrp',
+ class_config=dict(
+ name=group,
+ nameAlias=name_alias,
+ ),
+ child_configs=[
+ dict(
+ maintRsMgrpp=dict(
+ attributes=dict(
+ tnMaintMaintPName=policy,
+ ),
+ ),
+ ),
+ ],
+
+ )
+
+ aci.get_diff(aci_class='maintMaintGrp')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_maintenance_group_node.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_maintenance_group_node.py
new file mode 100644
index 00000000..3043c466
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_maintenance_group_node.py
@@ -0,0 +1,242 @@
+#!/usr/bin/python
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: aci_maintenance_group_node
+short_description: Manage maintenance group nodes
+description:
+- Manage maintenance group nodes
+options:
+ group:
+ description:
+ - The maintenance group name that you want to add the node to.
+ type: str
+ node:
+ description:
+ - The node to be added to the maintenance group.
+ - The value equals the nodeid.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+author:
+- Steven Gerhart (@sgerhart)
+'''
+
+EXAMPLES = r'''
+- name: maintenance group
+ cisco.aci.aci_maintenance_group_node:
+ host: "{{ inventory_hostname }}"
+ username: "{{ user }}"
+ password: "{{ pass }}"
+ validate_certs: no
+ group: maintenancegrp1
+ node: 1001
+ state: present
+
+- name: maintenance group
+ cisco.aci.aci_maintenance_group_node:
+ host: "{{ inventory_hostname }}"
+ username: "{{ user }}"
+ password: "{{ pass }}"
+ validate_certs: no
+ group: maintenancegrp1
+ node: 1002
+ state: absent
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ group=dict(type='str'), # Not required for querying all objects
+ node=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['node', 'group']],
+ ['state', 'present', ['node', 'group']],
+ ],
+ )
+
+ state = module.params.get('state')
+ group = module.params.get('group')
+ node = module.params.get('node')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='maintMaintGrp',
+ aci_rn='fabric/maintgrp-{0}'.format(group),
+ target_filter={'name': group},
+ module_object=group,
+ ),
+ subclass_1=dict(
+ aci_class='fabricNodeBlk',
+ aci_rn='nodeblk-blk{0}-{0}'.format(node),
+ target_filter={'name': 'blk{0}-{0}'.format(node)},
+ module_object=node,
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fabricNodeBlk',
+ class_config=dict(
+ from_=node,
+ to_=node,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='fabricNodeBlk')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_maintenance_policy.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_maintenance_policy.py
new file mode 100644
index 00000000..b067e1d5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_maintenance_policy.py
@@ -0,0 +1,277 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: aci_maintenance_policy
+short_description: Manage firmware maintenance policies
+description:
+- Manage maintenance policies that defines behavior during an ACI upgrade.
+options:
+ name:
+ description:
+ - The name for the maintenance policy.
+ type: str
+ aliases: [ maintenance_policy ]
+ runmode:
+ description:
+ - Whether the system pauses on error or just continues through it.
+ type: str
+ choices: [ pauseOnlyOnFailures, pauseNever ]
+ default: pauseOnlyOnFailures
+ graceful:
+ description:
+ - Whether the system will bring down the nodes gracefully during an upgrade, which reduces traffic lost.
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ scheduler:
+ description:
+ - The name of scheduler that is applied to the policy.
+ type: str
+ adminst:
+ description:
+ - Will trigger an immediate upgrade for nodes if adminst is set to triggered.
+ type: str
+ choices: [ triggered, untriggered ]
+ default: untriggered
+ ignoreCompat:
+ description:
+ - To check whether compatibility checks should be ignored
+ - The APIC defaults to C(no) when unset during creation.
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- A scheduler is required for this module, which could have been created using the M(cisco.aci.aci_fabric_scheduler) module or via the UI.
+author:
+- Steven Gerhart (@sgerhart)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- name: Ensure maintenance policy is present
+ cisco.aci.aci_maintenance_policy:
+ host: '{{ inventory_hostname }}'
+ username: '{{ user }}'
+ password: '{{ pass }}'
+ validate_certs: no
+ name: maintenancePol1
+ scheduler: simpleScheduler
+ runmode: False
+ state: present
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ name=dict(type='str', aliases=['maintenance_policy']), # Not required for querying all objects
+ runmode=dict(type='str', default='pauseOnlyOnFailures', choices=['pauseOnlyOnFailures', 'pauseNever']),
+ graceful=dict(type='bool'),
+ scheduler=dict(type='str'),
+ ignoreCompat=dict(type='bool'),
+ adminst=dict(type='str', default='untriggered', choices=['triggered', 'untriggered']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['name']],
+ ['state', 'present', ['name', 'scheduler']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ state = module.params.get('state')
+ name = module.params.get('name')
+ runmode = module.params.get('runmode')
+ scheduler = module.params.get('scheduler')
+ adminst = module.params.get('adminst')
+ graceful = aci.boolean(module.params.get('graceful'))
+ ignoreCompat = aci.boolean(module.params.get('ignoreCompat'))
+ name_alias = module.params.get('name_alias')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='maintMaintP',
+ aci_rn='fabric/maintpol-{0}'.format(name),
+ target_filter={'name': name},
+ module_object=name,
+ ),
+ child_classes=['maintRsPolScheduler']
+
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='maintMaintP',
+ class_config=dict(
+ name=name,
+ runMode=runmode,
+ graceful=graceful,
+ adminSt=adminst,
+ ignoreCompat=ignoreCompat,
+ nameAlias=name_alias,
+ ),
+ child_configs=[
+ dict(
+ maintRsPolScheduler=dict(
+ attributes=dict(
+ tnTrigSchedPName=scheduler,
+ ),
+ ),
+ ),
+ ],
+
+ )
+
+ aci.get_diff(aci_class='maintMaintP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_rest.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_rest.py
new file mode 100644
index 00000000..2e18c548
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_rest.py
@@ -0,0 +1,451 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_rest
+short_description: Direct access to the Cisco APIC REST API
+description:
+- Enables the management of the Cisco ACI fabric through direct access to the Cisco APIC REST API.
+- Thanks to the idempotent nature of the APIC, this module is idempotent and reports changes.
+requirements:
+- lxml (when using XML payload)
+- xmljson >= 0.1.8 (when using XML payload)
+- python 2.7+ (when using xmljson)
+options:
+ method:
+ description:
+ - The HTTP method of the request.
+ - Using C(delete) is typically used for deleting objects.
+ - Using C(get) is typically used for querying objects.
+ - Using C(post) is typically used for modifying objects.
+ type: str
+ choices: [ delete, get, post ]
+ default: get
+ aliases: [ action ]
+ path:
+ description:
+ - URI being used to execute API calls.
+ - Must end in C(.xml) or C(.json).
+ type: str
+ required: yes
+ aliases: [ uri ]
+ content:
+ description:
+ - When used instead of C(src), sets the payload of the API request directly.
+ - This may be convenient to template simple requests.
+ - For anything complex use the C(template) lookup plugin (see examples)
+ or the M(template) module with parameter C(src).
+ type: raw
+ src:
+ description:
+ - Name of the absolute path of the filename that includes the body
+ of the HTTP request being sent to the ACI fabric.
+ - If you require a templated payload, use the C(content) parameter
+ together with the C(template) lookup plugin, or use M(template).
+ type: path
+ aliases: [ config_file ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- Certain payloads are known not to be idempotent, so be careful when constructing payloads,
+ e.g. using C(status="created") will cause idempotency issues, use C(status="modified") instead.
+ More information in :ref:`the ACI documentation <aci_guide_known_issues>`.
+- Certain payloads (and used paths) are known to report no changes happened when changes did happen.
+ This is a known APIC problem and has been reported to the vendor. A workaround for this issue exists.
+ More information in :ref:`the ACI documentation <aci_guide_known_issues>`.
+- XML payloads require the C(lxml) and C(xmljson) python libraries. For JSON payloads nothing special is needed.
+- If you do not have any attributes, it may be necessary to add the "attributes" key with an empty dictionnary "{}" for value
+ as the APIC does expect the entry to precede any children.
+seealso:
+- module: cisco.aci.aci_tenant
+- name: Cisco APIC REST API Configuration Guide
+ description: More information about the APIC REST API.
+ link: http://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/2-x/rest_cfg/2_1_x/b_Cisco_APIC_REST_API_Configuration_Guide.html
+author:
+- Dag Wieers (@dagwieers)
+- Cindy Zhao (@cizhao)
+'''
+
+EXAMPLES = r'''
+- name: Add a tenant using certificate authentication
+ cisco.aci.aci_rest:
+ host: apic
+ username: admin
+ private_key: pki/admin.key
+ method: post
+ path: /api/mo/uni.xml
+ src: /home/cisco/ansible/aci/configs/aci_config.xml
+ delegate_to: localhost
+
+- name: Add a tenant from a templated payload file from templates/
+ cisco.aci.aci_rest:
+ host: apic
+ username: admin
+ private_key: pki/admin.key
+ method: post
+ path: /api/mo/uni.xml
+ content: "{{ lookup('template', 'aci/tenant.xml.j2') }}"
+ delegate_to: localhost
+
+- name: Add a tenant using inline YAML
+ cisco.aci.aci_rest:
+ host: apic
+ username: admin
+ private_key: pki/admin.key
+ validate_certs: no
+ path: /api/mo/uni.json
+ method: post
+ content:
+ fvTenant:
+ attributes:
+ name: Sales
+ descr: Sales department
+ delegate_to: localhost
+
+- name: Add a tenant using a JSON string
+ cisco.aci.aci_rest:
+ host: apic
+ username: admin
+ private_key: pki/admin.key
+ validate_certs: no
+ path: /api/mo/uni.json
+ method: post
+ content:
+ {
+ "fvTenant": {
+ "attributes": {
+ "name": "Sales",
+ "descr": "Sales department"
+ }
+ }
+ }
+ delegate_to: localhost
+
+- name: Add a tenant using an XML string
+ cisco.aci.aci_rest:
+ host: apic
+ username: admin
+ private_key: pki/{{ aci_username }}.key
+ validate_certs: no
+ path: /api/mo/uni.xml
+ method: post
+ content: '<fvTenant name="Sales" descr="Sales departement"/>'
+ delegate_to: localhost
+
+- name: Get tenants using password authentication
+ cisco.aci.aci_rest:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ method: get
+ path: /api/node/class/fvTenant.json
+ delegate_to: localhost
+ register: query_result
+
+- name: Configure contracts
+ cisco.aci.aci_rest:
+ host: apic
+ username: admin
+ private_key: pki/admin.key
+ method: post
+ path: /api/mo/uni.xml
+ src: /home/cisco/ansible/aci/configs/contract_config.xml
+ delegate_to: localhost
+
+- name: Register leaves and spines
+ cisco.aci.aci_rest:
+ host: apic
+ username: admin
+ private_key: pki/admin.key
+ validate_certs: no
+ method: post
+ path: /api/mo/uni/controller/nodeidentpol.xml
+ content:
+ <fabricNodeIdentPol>
+ <fabricNodeIdentP name="{{ item.name }}" nodeId="{{ item.nodeid }}" status="{{ item.status }}" serial="{{ item.serial }}"/>
+ </fabricNodeIdentPol>
+ with_items:
+ - '{{ apic_leavesspines }}'
+ delegate_to: localhost
+
+- name: Wait for all controllers to become ready
+ cisco.aci.aci_rest:
+ host: apic
+ username: admin
+ private_key: pki/admin.key
+ validate_certs: no
+ path: /api/node/class/topSystem.json?query-target-filter=eq(topSystem.role,"controller")
+ register: apics
+ until: "'totalCount' in apics and apics.totalCount|int >= groups['apic']|count"
+ retries: 120
+ delay: 30
+ delegate_to: localhost
+ run_once: yes
+'''
+
+RETURN = r'''
+error_code:
+ description: The REST ACI return code, useful for troubleshooting on failure
+ returned: always
+ type: int
+ sample: 122
+error_text:
+ description: The REST ACI descriptive text, useful for troubleshooting on failure
+ returned: always
+ type: str
+ sample: unknown managed object class foo
+imdata:
+ description: Converted output returned by the APIC REST (register this for post-processing)
+ returned: always
+ type: str
+ sample: [{"error": {"attributes": {"code": "122", "text": "unknown managed object class foo"}}}]
+payload:
+ description: The (templated) payload send to the APIC REST API (xml or json)
+ returned: always
+ type: str
+ sample: '<foo bar="boo"/>'
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+response:
+ description: HTTP response string
+ returned: always
+ type: str
+ sample: 'HTTP Error 400: Bad Request'
+status:
+ description: HTTP status code
+ returned: always
+ type: int
+ sample: 400
+totalCount:
+ description: Number of items in the imdata array
+ returned: always
+ type: str
+ sample: '0'
+url:
+ description: URL used for APIC REST call
+ returned: success
+ type: str
+ sample: https://1.2.3.4/api/mo/uni/tn-[Dag].json?rsp-subtree=modified
+'''
+
+import json
+import os
+
+try:
+ from ansible.module_utils.six.moves.urllib.parse import parse_qsl, urlencode, urlparse, urlunparse
+ HAS_URLPARSE = True
+except Exception:
+ HAS_URLPARSE = False
+
+# Optional, only used for XML payload
+try:
+ from lxml import etree # noqa
+ HAS_LXML_ETREE = True
+except ImportError:
+ HAS_LXML_ETREE = False
+
+# Optional, only used for XML payload
+try:
+ from xmljson import cobra # noqa
+ HAS_XMLJSON_COBRA = True
+except ImportError:
+ HAS_XMLJSON_COBRA = False
+
+# Optional, only used for YAML validation
+try:
+ import yaml
+ HAS_YAML = True
+except Exception:
+ HAS_YAML = False
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.urls import fetch_url
+from ansible.module_utils._text import to_text
+
+
+def update_qsl(url, params):
+ ''' Add or update a URL query string '''
+
+ if HAS_URLPARSE:
+ url_parts = list(urlparse(url))
+ query = dict(parse_qsl(url_parts[4]))
+ query.update(params)
+ url_parts[4] = urlencode(query)
+ return urlunparse(url_parts)
+ elif '?' in url:
+ return url + '&' + '&'.join(['%s=%s' % (k, v) for k, v in params.items()])
+ else:
+ return url + '?' + '&'.join(['%s=%s' % (k, v) for k, v in params.items()])
+
+
+class ACIRESTModule(ACIModule):
+
+ def changed(self, d):
+ ''' Check ACI response for changes '''
+
+ if isinstance(d, dict):
+ for k, v in d.items():
+ if k == 'status' and v in ('created', 'modified', 'deleted'):
+ return True
+ elif self.changed(v) is True:
+ return True
+ elif isinstance(d, list):
+ for i in d:
+ if self.changed(i) is True:
+ return True
+
+ return False
+
+ def response_type(self, rawoutput, rest_type='xml'):
+ ''' Handle APIC response output '''
+
+ if rest_type == 'json':
+ self.response_json(rawoutput)
+ else:
+ self.response_xml(rawoutput)
+
+ # Use APICs built-in idempotency
+ if HAS_URLPARSE:
+ self.result['changed'] = self.changed(self.imdata)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ path=dict(type='str', required=True, aliases=['uri']),
+ method=dict(type='str', default='get', choices=['delete', 'get', 'post'], aliases=['action']),
+ src=dict(type='path', aliases=['config_file']),
+ content=dict(type='raw'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=[['content', 'src']],
+ )
+
+ content = module.params.get('content')
+ path = module.params.get('path')
+ src = module.params.get('src')
+
+ # Report missing file
+ file_exists = False
+ if src:
+ if os.path.isfile(src):
+ file_exists = True
+ else:
+ module.fail_json(msg="Cannot find/access src '%s'" % src)
+
+ # Find request type
+ if path.find('.xml') != -1:
+ rest_type = 'xml'
+ if not HAS_LXML_ETREE:
+ module.fail_json(msg='The lxml python library is missing, or lacks etree support.')
+ if not HAS_XMLJSON_COBRA:
+ module.fail_json(msg='The xmljson python library is missing, or lacks cobra support.')
+ elif path.find('.json') != -1:
+ rest_type = 'json'
+ else:
+ module.fail_json(msg='Failed to find REST API payload type (neither .xml nor .json).')
+
+ aci = ACIRESTModule(module)
+ aci.result['status'] = -1 # Ensure we always return a status
+
+ # We include the payload as it may be templated
+ payload = content
+ if file_exists:
+ with open(src, 'r') as config_object:
+ # TODO: Would be nice to template this, requires action-plugin
+ payload = config_object.read()
+ payload_output_file = json.loads(payload)
+
+ # Validate payload
+ if rest_type == 'json':
+ if content and isinstance(content, dict):
+ # Validate inline YAML/JSON
+ payload = json.dumps(payload)
+ elif payload and isinstance(payload, str) and HAS_YAML:
+ try:
+ # Validate YAML/JSON string
+ payload = json.dumps(yaml.safe_load(payload))
+ except Exception as e:
+ module.fail_json(msg='Failed to parse provided JSON/YAML payload: %s' % to_text(e), exception=to_text(e), payload=payload)
+ elif rest_type == 'xml' and HAS_LXML_ETREE:
+ if content and isinstance(content, dict) and HAS_XMLJSON_COBRA:
+ # Validate inline YAML/JSON
+ payload = etree.tostring(cobra.etree(payload)[0])
+ elif payload and isinstance(payload, str):
+ try:
+ # Validate XML string
+ payload = etree.tostring(etree.fromstring(payload))
+ except Exception as e:
+ module.fail_json(msg='Failed to parse provided XML payload: %s' % to_text(e), payload=payload)
+
+ # Perform actual request using auth cookie (Same as aci.request(), but also supports XML)
+ if 'port' in aci.params and aci.params.get('port') is not None:
+ aci.url = '%(protocol)s://%(host)s:%(port)s/' % aci.params + path.lstrip('/')
+ else:
+ aci.url = '%(protocol)s://%(host)s/' % aci.params + path.lstrip('/')
+ if aci.params.get('method') != 'get':
+ path += '?rsp-subtree=modified'
+ aci.url = update_qsl(aci.url, {'rsp-subtree': 'modified'})
+
+ # Sign and encode request as to APIC's wishes
+ if aci.params.get('private_key') is not None:
+ aci.cert_auth(path=path, payload=payload)
+
+ aci.method = aci.params.get('method').upper()
+
+ # Perform request
+ resp, info = fetch_url(module, aci.url,
+ data=payload,
+ headers=aci.headers,
+ method=aci.method,
+ timeout=aci.params.get('timeout'),
+ use_proxy=aci.params.get('use_proxy'))
+
+ aci.response = info.get('msg')
+ aci.status = info.get('status')
+
+ # Report failure
+ if info.get('status') != 200:
+ try:
+ # APIC error
+ aci.response_type(info.get('body'), rest_type)
+ aci.fail_json(msg='APIC Error %(code)s: %(text)s' % aci.error)
+ except KeyError:
+ # Connection error
+ aci.fail_json(msg='Connection failed for %(url)s. %(msg)s' % info)
+
+ aci.response_type(resp.read(), rest_type)
+
+ aci.result['imdata'] = aci.imdata
+ aci.result['totalCount'] = aci.totalCount
+
+ output_path = aci.params.get('output_path')
+ if(output_path is not None):
+ with open(output_path, "a") as output_file:
+ json.dump([payload_output_file], output_file)
+
+ # Report success
+ aci.exit_json(**aci.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_static_binding_to_epg.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_static_binding_to_epg.py
new file mode 100644
index 00000000..15677831
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_static_binding_to_epg.py
@@ -0,0 +1,441 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_static_binding_to_epg
+short_description: Bind static paths to EPGs (fv:RsPathAtt)
+description:
+- Bind static paths to EPGs on Cisco ACI fabrics.
+options:
+ tenant:
+ description:
+ - Name of an existing tenant.
+ type: str
+ aliases: [ tenant_name ]
+ ap:
+ description:
+ - Name of an existing application network profile, that will contain the EPGs.
+ type: str
+ aliases: [ app_profile, app_profile_name ]
+ epg:
+ description:
+ - The name of the end point group.
+ type: str
+ aliases: [ epg_name ]
+ description:
+ description:
+ - Description for the static path to EPG binding.
+ type: str
+ aliases: [ descr ]
+ encap_id:
+ description:
+ - 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:
+ - The Deployment Immediacy of Static EPG on PC, VPC or Interface.
+ - The APIC defaults to C(lazy) when unset during creation.
+ type: str
+ choices: [ immediate, lazy ]
+ interface_mode:
+ description:
+ - Determines how layer 2 tags will be read from and added to frames.
+ - Values C(802.1p) and C(native) are identical.
+ - Values C(access) and C(untagged) are identical.
+ - Values C(regular), C(tagged) and C(trunk) are identical.
+ - The APIC defaults to C(trunk) when unset during creation.
+ type: str
+ choices: [ 802.1p, access, native, regular, tagged, trunk, untagged ]
+ aliases: [ interface_mode_name, mode ]
+ interface_type:
+ description:
+ - The type of interface for the static EPG deployment.
+ type: str
+ choices: [ fex, port_channel, switch_port, vpc ]
+ default: switch_port
+ pod_id:
+ description:
+ - The pod number part of the tDn.
+ - C(pod_id) is usually an integer below C(10).
+ type: int
+ aliases: [ pod, pod_number ]
+ leafs:
+ description:
+ - The switch ID(s) that the C(interface) belongs to.
+ - When C(interface_type) is C(switch_port), C(port_channel), or C(fex), then C(leafs) is a string of the leaf ID.
+ - When C(interface_type) is C(vpc), then C(leafs) is a list with both leaf IDs.
+ - The C(leafs) value is usually something like '101' or '101-102' depending on C(connection_type).
+ type: list
+ elements: str
+ aliases: [ leaves, nodes, paths, switches ]
+ interface:
+ description:
+ - The C(interface) string value part of the tDn.
+ - Usually a policy group like C(test-IntPolGrp) or an interface of the following format C(1/7) depending on C(interface_type).
+ type: str
+ 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.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant), C(ap), C(epg) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant), M(cisco.aci.aci_ap), M(cisco.aci.aci_epg) modules can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- module: cisco.aci.aci_ap
+- module: cisco.aci.aci_epg
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fv:RsPathAtt).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Bruno Calogero (@brunocalogero)
+'''
+
+EXAMPLES = r'''
+- name: Deploy Static Path binding for given EPG
+ cisco.aci.aci_static_binding_to_epg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: accessport-code-cert
+ ap: accessport_code_app
+ epg: accessport_epg1
+ encap_id: 222
+ deploy_immediacy: lazy
+ interface_mode: untagged
+ interface_type: switch_port
+ pod_id: 1
+ leafs: 101
+ interface: '1/7'
+ state: present
+ delegate_to: localhost
+
+- name: Remove Static Path binding for given EPG
+ cisco.aci.aci_static_binding_to_epg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: accessport-code-cert
+ ap: accessport_code_app
+ epg: accessport_epg1
+ interface_type: switch_port
+ pod: 1
+ leafs: 101
+ interface: '1/7'
+ state: absent
+ delegate_to: localhost
+
+- name: Get specific Static Path binding for given EPG
+ cisco.aci.aci_static_binding_to_epg:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: accessport-code-cert
+ ap: accessport_code_app
+ epg: accessport_epg1
+ interface_type: switch_port
+ pod: 1
+ leafs: 101
+ interface: '1/7'
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+INTERFACE_MODE_MAPPING = {
+ '802.1p': 'native',
+ 'access': 'untagged',
+ 'native': 'native',
+ 'regular': 'regular',
+ 'tagged': 'regular',
+ 'trunk': 'regular',
+ 'untagged': 'untagged',
+}
+
+INTERFACE_TYPE_MAPPING = dict(
+ fex='topology/pod-{pod_id}/paths-{leafs}/extpaths-{extpaths}/pathep-[eth{interface}]',
+ port_channel='topology/pod-{pod_id}/paths-{leafs}/pathep-[{interface}]',
+ switch_port='topology/pod-{pod_id}/paths-{leafs}/pathep-[eth{interface}]',
+ vpc='topology/pod-{pod_id}/protpaths-{leafs}/pathep-[{interface}]',
+)
+
+# TODO: change 'deploy_immediacy' to 'resolution_immediacy' (as seen in aci_epg_to_domain)?
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ ap=dict(type='str', aliases=['app_profile', 'app_profile_name']), # Not required for querying all objects
+ epg=dict(type='str', aliases=['epg_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ encap_id=dict(type='int', aliases=['vlan', 'vlan_id']),
+ primary_encap_id=dict(type='int', aliases=['primary_vlan', 'primary_vlan_id']),
+ deploy_immediacy=dict(type='str', choices=['immediate', 'lazy']),
+ interface_mode=dict(type='str', choices=['802.1p', 'access', 'native', 'regular', 'tagged', 'trunk', 'untagged'],
+ aliases=['interface_mode_name', 'mode']),
+ interface_type=dict(type='str', default='switch_port', choices=['fex', 'port_channel', 'switch_port', 'vpc']),
+ pod_id=dict(type='int', aliases=['pod', 'pod_number']), # Not required for querying all objects
+ leafs=dict(type='list', elements='str', aliases=['leaves', 'nodes', 'paths', 'switches']), # Not required for querying all objects
+ interface=dict(type='str'), # Not required for querying all objects
+ extpaths=dict(type='int'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['interface_type', 'fex', ['extpaths']],
+ ['state', 'absent', ['ap', 'epg', 'interface', 'leafs', 'pod_id', 'tenant']],
+ ['state', 'present', ['ap', 'encap_id', 'epg', 'interface', 'leafs', 'pod_id', 'tenant']],
+ ],
+ )
+
+ tenant = module.params.get('tenant')
+ ap = module.params.get('ap')
+ epg = module.params.get('epg')
+ description = module.params.get('description')
+ encap_id = module.params.get('encap_id')
+ primary_encap_id = module.params.get('primary_encap_id')
+ deploy_immediacy = module.params.get('deploy_immediacy')
+ interface_mode = module.params.get('interface_mode')
+ interface_type = module.params.get('interface_type')
+ pod_id = module.params.get('pod_id')
+ leafs = module.params.get('leafs')
+ if leafs is not None:
+ # Process leafs, and support dash-delimited leafs
+ leafs = []
+ for leaf in module.params.get('leafs'):
+ # Users are likely to use integers for leaf IDs, which would raise an exception when using the join method
+ leafs.extend(str(leaf).split('-'))
+ if len(leafs) == 1:
+ if interface_type == 'vpc':
+ module.fail_json(msg='A interface_type of "vpc" requires 2 leafs')
+ leafs = leafs[0]
+ elif len(leafs) == 2:
+ if interface_type != 'vpc':
+ module.fail_json(msg='The interface_types "switch_port", "port_channel", and "fex" \
+ do not support using multiple leafs for a single binding')
+ leafs = "-".join(leafs)
+ else:
+ module.fail_json(msg='The "leafs" parameter must not have more than 2 entries')
+ interface = module.params.get('interface')
+ extpaths = module.params.get('extpaths')
+ state = module.params.get('state')
+
+ if encap_id is not None:
+ if encap_id not in range(1, 4097):
+ module.fail_json(msg='Valid VLAN assigments are from 1 to 4096')
+ encap_id = 'vlan-{0}'.format(encap_id)
+
+ if primary_encap_id is not None:
+ if primary_encap_id not in range(1, 4097):
+ module.fail_json(msg='Valid VLAN assigments are from 1 to 4096')
+ primary_encap_id = 'vlan-{0}'.format(primary_encap_id)
+
+ static_path = INTERFACE_TYPE_MAPPING[interface_type].format(pod_id=pod_id, leafs=leafs, extpaths=extpaths, interface=interface)
+
+ path_target_filter = {}
+ if pod_id is not None and leafs is not None and interface is not None and (interface_type != 'fex' or extpaths is not None):
+ path_target_filter = {'tDn': static_path}
+
+ if interface_mode is not None:
+ interface_mode = INTERFACE_MODE_MAPPING[interface_mode]
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='fvAp',
+ aci_rn='ap-{0}'.format(ap),
+ module_object=ap,
+ target_filter={'name': ap},
+ ),
+ subclass_2=dict(
+ aci_class='fvAEPg',
+ aci_rn='epg-{0}'.format(epg),
+ module_object=epg,
+ target_filter={'name': epg},
+ ),
+ subclass_3=dict(
+ aci_class='fvRsPathAtt',
+ aci_rn='rspathAtt-[{0}]'.format(static_path),
+ module_object=static_path,
+ target_filter=path_target_filter,
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvRsPathAtt',
+ class_config=dict(
+ descr=description,
+ encap=encap_id,
+ primaryEncap=primary_encap_id,
+ instrImedcy=deploy_immediacy,
+ mode=interface_mode,
+ tDn=static_path,
+ ),
+ )
+
+ aci.get_diff(aci_class='fvRsPathAtt')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_switch_leaf_selector.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_switch_leaf_selector.py
new file mode 100644
index 00000000..0334fd84
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_switch_leaf_selector.py
@@ -0,0 +1,349 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_switch_leaf_selector
+short_description: Bind leaf selectors to switch policy leaf profiles (infra:LeafS, infra:NodeBlk, infra:RsAccNodePGrep)
+description:
+- Bind leaf selectors (with node block range and policy group) to switch policy leaf profiles on Cisco ACI fabrics.
+options:
+ description:
+ description:
+ - The description to assign to the C(leaf).
+ type: str
+ leaf_profile:
+ description:
+ - Name of the Leaf Profile to which we add a Selector.
+ type: str
+ aliases: [ leaf_profile_name ]
+ leaf:
+ description:
+ - Name of Leaf Selector.
+ type: str
+ 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.
+ type: str
+ aliases: [ leaf_node_blk_name, node_blk_name ]
+ leaf_node_blk_description:
+ description:
+ - The description to assign to the C(leaf_node_blk)
+ type: str
+ from:
+ description:
+ - Start of Node Block range.
+ type: int
+ aliases: [ node_blk_range_from, from_range, range_from ]
+ to:
+ description:
+ - 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.
+ type: str
+ aliases: [ name, policy_group_name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- This module is to be used with M(cisco.aci.aci_switch_policy_leaf_profile).
+ One first creates a leaf profile (infra:NodeP) and then creates an associated selector (infra:LeafS),
+seealso:
+- module: cisco.aci.aci_switch_policy_leaf_profile
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(infra:LeafS),
+ B(infra:NodeBlk) and B(infra:RsAccNodePGrp).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Bruno Calogero (@brunocalogero)
+'''
+
+EXAMPLES = r'''
+- name: adding a switch policy leaf profile selector associated Node Block range (w/ policy group)
+ cisco.aci.aci_switch_leaf_selector:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_profile: sw_name
+ leaf: leaf_selector_name
+ leaf_node_blk: node_blk_name
+ from: 1011
+ to: 1011
+ policy_group: somepolicygroupname
+ state: present
+ delegate_to: localhost
+
+- name: adding a switch policy leaf profile selector associated Node Block range (w/o policy group)
+ cisco.aci.aci_switch_leaf_selector:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_profile: sw_name
+ leaf: leaf_selector_name
+ leaf_node_blk: node_blk_name
+ from: 1011
+ to: 1011
+ state: present
+ delegate_to: localhost
+
+- name: Removing a switch policy leaf profile selector
+ cisco.aci.aci_switch_leaf_selector:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_profile: sw_name
+ leaf: leaf_selector_name
+ state: absent
+ delegate_to: localhost
+
+- name: Querying a switch policy leaf profile selector
+ cisco.aci.aci_switch_leaf_selector:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_profile: sw_name
+ leaf: leaf_selector_name
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update({
+ 'description': dict(type='str'),
+ 'leaf_profile': dict(type='str', aliases=['leaf_profile_name']), # Not required for querying all objects
+ 'leaf': dict(type='str', aliases=['name', 'leaf_name', 'leaf_profile_leaf_name', 'leaf_selector_name']), # Not required for querying all objects
+ 'leaf_node_blk': dict(type='str', aliases=['leaf_node_blk_name', 'node_blk_name']),
+ 'leaf_node_blk_description': dict(type='str'),
+ # NOTE: Keyword 'from' is a reserved word in python, so we need it as a string
+ 'from': dict(type='int', aliases=['node_blk_range_from', 'from_range', 'range_from']),
+ 'to': dict(type='int', aliases=['node_blk_range_to', 'to_range', 'range_to']),
+ 'policy_group': dict(type='str', aliases=['policy_group_name']),
+ 'state': dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ 'name_alias': dict(type='str'),
+ })
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['leaf_profile', 'leaf']],
+ ['state', 'present', ['leaf_profile', 'leaf', 'leaf_node_blk', 'from', 'to']]
+ ]
+ )
+
+ description = module.params.get('description')
+ leaf_profile = module.params.get('leaf_profile')
+ leaf = module.params.get('leaf')
+ leaf_node_blk = module.params.get('leaf_node_blk')
+ leaf_node_blk_description = module.params.get('leaf_node_blk_description')
+ from_ = module.params.get('from')
+ to_ = module.params.get('to')
+ policy_group = module.params.get('policy_group')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ # Build child_configs dynamically
+ child_configs = [
+ dict(
+ infraNodeBlk=dict(
+ attributes=dict(
+ descr=leaf_node_blk_description,
+ name=leaf_node_blk,
+ from_=from_,
+ to_=to_,
+ ),
+ ),
+ ),
+ ]
+
+ # Add infraRsAccNodePGrp only when policy_group was defined
+ if policy_group is not None:
+ child_configs.append(dict(
+ infraRsAccNodePGrp=dict(
+ attributes=dict(
+ tDn='uni/infra/funcprof/accnodepgrp-{0}'.format(policy_group),
+ ),
+ ),
+ ))
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='infraNodeP',
+ aci_rn='infra/nprof-{0}'.format(leaf_profile),
+ module_object=leaf_profile,
+ target_filter={'name': leaf_profile},
+ ),
+ subclass_1=dict(
+ aci_class='infraLeafS',
+ # NOTE: normal rn: leaves-{name}-typ-{type}, hence here hardcoded to range for purposes of module
+ aci_rn='leaves-{0}-typ-range'.format(leaf),
+ module_object=leaf,
+ target_filter={'name': leaf},
+ ),
+ # NOTE: infraNodeBlk is not made into a subclass because there is a 1-1 mapping between node block and leaf selector name
+ child_classes=['infraNodeBlk', 'infraRsAccNodePGrp'],
+
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='infraLeafS',
+ class_config=dict(
+ descr=description,
+ name=leaf,
+ nameAlias=name_alias,
+ ),
+ child_configs=child_configs,
+ )
+
+ aci.get_diff(aci_class='infraLeafS')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_switch_policy_leaf_profile.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_switch_policy_leaf_profile.py
new file mode 100644
index 00000000..932a0d8b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_switch_policy_leaf_profile.py
@@ -0,0 +1,250 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_switch_policy_leaf_profile
+short_description: Manage switch policy leaf profiles (infra:NodeP)
+description:
+- Manage switch policy leaf profiles on Cisco ACI fabrics.
+options:
+ leaf_profile:
+ description:
+ - The name of the Leaf Profile.
+ type: str
+ aliases: [ leaf_profile_name, name ]
+ description:
+ description:
+ - Description for the Leaf Profile.
+ type: str
+ aliases: [ descr ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- module: cisco.aci.aci_switch_policy_leaf_profile
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(infra:NodeP).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Bruno Calogero (@brunocalogero)
+'''
+
+EXAMPLES = r'''
+- name: creating a Leaf Profile with description
+ cisco.aci.aci_switch_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_profile: sw_name
+ description: sw_description
+ state: present
+ delegate_to: localhost
+
+- name: Deleting a Leaf Profile
+ cisco.aci.aci_switch_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_profile: sw_name
+ state: absent
+ delegate_to: localhost
+
+- name: Query a Leaf Profile
+ cisco.aci.aci_switch_policy_leaf_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ leaf_profile: sw_name
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ leaf_profile=dict(type='str', aliases=['name', 'leaf_profile_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['leaf_profile']],
+ ['state', 'present', ['leaf_profile']],
+ ],
+ )
+
+ leaf_profile = module.params.get('leaf_profile')
+ description = module.params.get('description')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='infraNodeP',
+ aci_rn='infra/nprof-{0}'.format(leaf_profile),
+ module_object=leaf_profile,
+ target_filter={'name': leaf_profile},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='infraNodeP',
+ class_config=dict(
+ name=leaf_profile,
+ descr=description,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='infraNodeP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_switch_policy_vpc_protection_group.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_switch_policy_vpc_protection_group.py
new file mode 100644
index 00000000..184f20dd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_switch_policy_vpc_protection_group.py
@@ -0,0 +1,304 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_switch_policy_vpc_protection_group
+short_description: Manage switch policy explicit vPC protection groups (fabric:ExplicitGEp, fabric:NodePEp).
+description:
+- Manage switch policy explicit vPC protection groups on Cisco ACI fabrics.
+options:
+ protection_group:
+ description:
+ - The name of the Explicit vPC Protection Group.
+ type: str
+ aliases: [ name, protection_group_name ]
+ protection_group_id:
+ description:
+ - The Explicit vPC Protection Group ID.
+ type: int
+ aliases: [ id ]
+ vpc_domain_policy:
+ description:
+ - The vPC domain policy to be associated with the Explicit vPC Protection Group.
+ type: str
+ aliases: [ vpc_domain_policy_name ]
+ switch_1_id:
+ description:
+ - The ID of the first Leaf Switch for the Explicit vPC Protection Group.
+ type: int
+ switch_2_id:
+ description:
+ - The ID of the Second Leaf Switch for the Explicit vPC Protection Group.
+ type: int
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- module: cisco.aci.aci_switch_policy_leaf_profile
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(fabric:ExplicitGEp) and B(fabric:NodePEp).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Bruno Calogero (@brunocalogero)
+'''
+
+EXAMPLES = r'''
+- name: Add vPC Protection Group
+ cisco.aci.aci_switch_policy_vpc_protection_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ protection_group: leafPair101-vpcGrp
+ protection_group_id: 6
+ switch_1_id: 1011
+ switch_2_id: 1012
+ state: present
+ delegate_to: localhost
+
+- name: Remove Explicit vPC Protection Group
+ cisco.aci.aci_switch_policy_vpc_protection_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ protection_group: leafPair101-vpcGrp
+ state: absent
+ delegate_to: localhost
+
+- name: Query vPC Protection Groups
+ cisco.aci.aci_switch_policy_vpc_protection_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query our vPC Protection Group
+ cisco.aci.aci_switch_policy_vpc_protection_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ protection_group: leafPair101-vpcGrp
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ protection_group=dict(type='str', aliases=['name', 'protection_group_name']), # Not required for querying all objects
+ protection_group_id=dict(type='int', aliases=['id']),
+ vpc_domain_policy=dict(type='str', aliases=['vpc_domain_policy_name']),
+ switch_1_id=dict(type='int'),
+ switch_2_id=dict(type='int'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['protection_group']],
+ ['state', 'present', ['protection_group', 'protection_group_id', 'switch_1_id', 'switch_2_id']],
+ ],
+ )
+
+ protection_group = module.params.get('protection_group')
+ protection_group_id = module.params.get('protection_group_id')
+ vpc_domain_policy = module.params.get('vpc_domain_policy')
+ switch_1_id = module.params.get('switch_1_id')
+ switch_2_id = module.params.get('switch_2_id')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fabricExplicitGEp',
+ aci_rn='fabric/protpol/expgep-{0}'.format(protection_group),
+ module_object=protection_group,
+ target_filter={'name': protection_group},
+ ),
+ child_classes=['fabricNodePEp', 'fabricNodePEp', 'fabricRsVpcInstPol'],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fabricExplicitGEp',
+ class_config=dict(
+ name=protection_group,
+ id=protection_group_id,
+ nameAlias=name_alias,
+ ),
+ child_configs=[
+ dict(
+ fabricNodePEp=dict(
+ attributes=dict(
+ id='{0}'.format(switch_1_id),
+ ),
+ ),
+ ),
+ dict(
+ fabricNodePEp=dict(
+ attributes=dict(
+ id='{0}'.format(switch_2_id),
+ ),
+ ),
+ ),
+ dict(
+ fabricRsVpcInstPol=dict(
+ attributes=dict(
+ tnVpcInstPolName=vpc_domain_policy,
+ ),
+ ),
+ ),
+ ],
+ )
+
+ aci.get_diff(aci_class='fabricExplicitGEp')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_system.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_system.py
new file mode 100644
index 00000000..b4789adc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_system.py
@@ -0,0 +1,197 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+DOCUMENTATION = r'''
+---
+module: aci_system
+short_description: Query the ACI system information (top:System)
+description:
+- Query the ACI system information (top:System) on Cisco ACI.
+author:
+- Lionel Hercot (@lhercot)
+options:
+ id:
+ description:
+ - The controller node ID
+ aliases: [ controller, node ]
+ type: int
+ state:
+ description:
+ - Use C(query) for listing an object or multiple objects.
+ choices: [ query ]
+ default: query
+ type: str
+notes:
+- More information about the internal APIC class B(top:System) from
+ L(the APIC Management Information Model reference,https://developer.cisco.com/docs/apic-mim-ref/).
+- This module is used to query system information for both cloud and on-premises controllers.
+
+extends_documentation_fragment:
+- cisco.aci.aci
+'''
+
+EXAMPLES = r'''
+- name: Query all controllers system information
+ cisco.aci.aci_system:
+ host: apic
+ username: userName
+ password: somePassword
+ validate_certs: no
+ state: query
+ delegate_to: localhost
+
+- name: Query controller 1 specific system information
+ cisco.aci.aci_system:
+ host: apic
+ username: userName
+ password: somePassword
+ validate_certs: no
+ id: 1
+ state: query
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+from ansible.module_utils.basic import AnsibleModule
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ id=dict(type='int', aliases=['controller', 'node']),
+ state=dict(type='str', default='query', choices=['query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ id = module.params.get('id')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='topSystem',
+ target_filter={'id': id}
+ )
+ )
+
+ aci.get_existing()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_taboo_contract.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_taboo_contract.py
new file mode 100644
index 00000000..b730328c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_taboo_contract.py
@@ -0,0 +1,286 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_taboo_contract
+short_description: Manage taboo contracts (vz:BrCP)
+description:
+- Manage taboo contracts on Cisco ACI fabrics.
+options:
+ taboo_contract:
+ description:
+ - The name of the Taboo Contract.
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - The description for the Taboo Contract.
+ type: str
+ aliases: [ descr ]
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ aliases: [ tenant_name ]
+ scope:
+ description:
+ - The scope of a service contract.
+ - The APIC defaults to C(context) when unset during creation.
+ type: str
+ choices: [ application-profile, context, global, tenant ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(vz:BrCP).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Add taboo contract
+ cisco.aci.aci_taboo_contract:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: ansible_test
+ taboo_contract: taboo_contract_test
+ state: present
+ delegate_to: localhost
+
+- name: Remove taboo contract
+ cisco.aci.aci_taboo_contract:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: ansible_test
+ taboo_contract: taboo_contract_test
+ state: absent
+ delegate_to: localhost
+
+- name: Query all taboo contracts
+ cisco.aci.aci_taboo_contract:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query a specific taboo contract
+ cisco.aci.aci_taboo_contract:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: ansible_test
+ taboo_contract: taboo_contract_test
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ taboo_contract=dict(type='str', aliases=['name']), # Not required for querying all contracts
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all contracts
+ scope=dict(type='str', choices=['application-profile', 'context', 'global', 'tenant']),
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['tenant', 'taboo_contract']],
+ ['state', 'present', ['tenant', 'taboo_contract']],
+ ],
+ )
+
+ taboo_contract = module.params.get('taboo_contract')
+ description = module.params.get('description')
+ scope = module.params.get('scope')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='vzTaboo',
+ aci_rn='taboo-{0}'.format(taboo_contract),
+ module_object=taboo_contract,
+ target_filter={'name': taboo_contract},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='vzTaboo',
+ class_config=dict(
+ name=taboo_contract,
+ descr=description,
+ scope=scope,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='vzTaboo')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant.py
new file mode 100644
index 00000000..26ee14cf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant.py
@@ -0,0 +1,261 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_tenant
+short_description: Manage tenants (fv:Tenant)
+description:
+- Manage tenants on Cisco ACI fabrics.
+options:
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ aliases: [ name, tenant_name ]
+ description:
+ description:
+ - Description for the tenant.
+ type: str
+ aliases: [ descr ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- module: cisco.aci.aci_ap
+- module: cisco.aci.aci_bd
+- module: cisco.aci.aci_contract
+- module: cisco.aci.aci_filter
+- module: cisco.aci.aci_vrf
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fv:Tenant).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+EXAMPLES = r'''
+- name: Add a new tenant
+ cisco.aci.aci_tenant:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ description: Production tenant
+ state: present
+ delegate_to: localhost
+
+- name: Remove a tenant
+ cisco.aci.aci_tenant:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ state: absent
+ delegate_to: localhost
+
+- name: Query a tenant
+ cisco.aci.aci_tenant:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all tenants
+ cisco.aci.aci_tenant:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['name', 'tenant_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['tenant']],
+ ['state', 'present', ['tenant']],
+ ],
+ )
+
+ description = module.params.get('description')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ )
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvTenant',
+ class_config=dict(
+ name=tenant,
+ descr=description,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='fvTenant')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_action_rule_profile.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_action_rule_profile.py
new file mode 100644
index 00000000..ca8393d2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_action_rule_profile.py
@@ -0,0 +1,246 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_tenant_action_rule_profile
+short_description: Manage action rule profiles (rtctrl:AttrP)
+description:
+- Manage action rule profiles on Cisco ACI fabrics.
+options:
+ action_rule:
+ description:
+ - The name of the action rule profile.
+ type: str
+ aliases: [ action_rule_name, name ]
+ description:
+ description:
+ - The description for the action rule profile.
+ type: str
+ aliases: [ descr ]
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ aliases: [ tenant_name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(rtctrl:AttrP).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- cisco.aci.aci_tenant_action_rule_profile:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ action_rule: '{{ action_rule }}'
+ description: '{{ descr }}'
+ tenant: '{{ tenant }}'
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ action_rule=dict(type='str', aliases=['action_rule_name', 'name']), # Not required for querying all objects
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['action_rule', 'tenant']],
+ ['state', 'present', ['action_rule', 'tenant']],
+ ],
+ )
+
+ action_rule = module.params.get('action_rule')
+ description = module.params.get('description')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='rtctrlAttrP',
+ aci_rn='attr-{0}'.format(action_rule),
+ module_object=action_rule,
+ target_filter={'name': action_rule},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='rtctrlAttrP',
+ class_config=dict(
+ name=action_rule,
+ descr=description,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='rtctrlAttrP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_ep_retention_policy.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_ep_retention_policy.py
new file mode 100644
index 00000000..5b0e0e70
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_ep_retention_policy.py
@@ -0,0 +1,361 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_tenant_ep_retention_policy
+short_description: Manage End Point (EP) retention protocol policies (fv:EpRetPol)
+description:
+- Manage End Point (EP) retention protocol policies on Cisco ACI fabrics.
+options:
+ tenant:
+ description:
+ - The name of an existing tenant.
+ type: str
+ aliases: [ tenant_name ]
+ epr_policy:
+ description:
+ - The name of the end point retention policy.
+ type: str
+ aliases: [ epr_name, name ]
+ bounce_age:
+ description:
+ - Bounce entry aging interval in seconds.
+ - Accepted values range between C(150) and C(65535); 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.
+ - The APIC defaults to C(coop) when unset during creation.
+ type: str
+ choices: [ coop, flood ]
+ hold_interval:
+ description:
+ - Hold interval in seconds.
+ - Accepted values range between C(5) and C(65535).
+ - The APIC defaults to C(300) when unset during creation.
+ type: int
+ local_ep_interval:
+ description:
+ - Local end point aging interval in seconds.
+ - Accepted values range between C(120) and C(65535); 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 in seconds.
+ - Accepted values range between C(120) and C(65535); 0 is used for infinite.
+ - The APIC defaults to C(300) when unset during creation.
+ type: int
+ move_frequency:
+ description:
+ - Move frequency per second.
+ - Accepted values range between C(0) and C(65535); 0 is used for none.
+ - The APIC defaults to C(256) when unset during creation.
+ type: int
+ description:
+ description:
+ - Description for the End point retention policy.
+ type: str
+ aliases: [ descr ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fv:EpRetPol).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Swetha Chunduri (@schunduri)
+'''
+
+EXAMPLES = r'''
+- name: Add a new EPR policy
+ cisco.aci.aci_tenant_ep_retention_policy:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ epr_policy: EPRPol1
+ bounce_age: 630
+ hold_interval: 300
+ local_ep_interval: 900
+ remote_ep_interval: 300
+ move_frequency: 256
+ description: test
+ state: present
+ delegate_to: localhost
+
+- name: Remove an EPR policy
+ cisco.aci.aci_tenant_ep_retention_policy:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ epr_policy: EPRPol1
+ state: absent
+ delegate_to: localhost
+
+- name: Query an EPR policy
+ cisco.aci.aci_tenant_ep_retention_policy:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ epr_policy: EPRPol1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all EPR policies
+ cisco.aci.aci_tenant_ep_retention_policy:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+BOUNCE_TRIG_MAPPING = dict(
+ coop='protocol',
+ rarp='rarp-flood',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ epr_policy=dict(type='str', aliases=['epr_name', 'name']), # Not required for querying all objects
+ bounce_age=dict(type='int'),
+ bounce_trigger=dict(type='str', choices=['coop', 'flood']),
+ hold_interval=dict(type='int'),
+ local_ep_interval=dict(type='int'),
+ remote_ep_interval=dict(type='int'),
+ description=dict(type='str', aliases=['descr']),
+ move_frequency=dict(type='int'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['epr_policy', 'tenant']],
+ ['state', 'present', ['epr_policy', 'tenant']],
+ ],
+ )
+
+ epr_policy = module.params.get('epr_policy')
+ bounce_age = module.params.get('bounce_age')
+ if bounce_age is not None and bounce_age != 0 and bounce_age not in range(150, 65536):
+ module.fail_json(msg="The bounce_age must be a value of 0 or between 150 and 65535")
+ if bounce_age == 0:
+ bounce_age = 'infinite'
+ bounce_trigger = module.params.get('bounce_trigger')
+ if bounce_trigger is not None:
+ bounce_trigger = BOUNCE_TRIG_MAPPING[bounce_trigger]
+ description = module.params.get('description')
+ hold_interval = module.params.get('hold_interval')
+ if hold_interval is not None and hold_interval not in range(5, 65536):
+ module.fail_json(msg="The hold_interval must be a value between 5 and 65535")
+ local_ep_interval = module.params.get('local_ep_interval')
+ if local_ep_interval is not None and local_ep_interval != 0 and local_ep_interval not in range(120, 65536):
+ module.fail_json(msg="The local_ep_interval must be a value of 0 or between 120 and 65535")
+ if local_ep_interval == 0:
+ local_ep_interval = "infinite"
+ move_frequency = module.params.get('move_frequency')
+ if move_frequency is not None and move_frequency not in range(65536):
+ module.fail_json(msg="The move_frequency must be a value between 0 and 65535")
+ if move_frequency == 0:
+ move_frequency = "none"
+ remote_ep_interval = module.params.get('remote_ep_interval')
+ if remote_ep_interval is not None and remote_ep_interval not in range(120, 65536):
+ module.fail_json(msg="The remote_ep_interval must be a value of 0 or between 120 and 65535")
+ if remote_ep_interval == 0:
+ remote_ep_interval = "infinite"
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='fvEpRetPol',
+ aci_rn='epRPol-{0}'.format(epr_policy),
+ module_object=epr_policy,
+ target_filter={'name': epr_policy},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvEpRetPol',
+ class_config=dict(
+ name=epr_policy,
+ descr=description,
+ bounceAgeIntvl=bounce_age,
+ bounceTrig=bounce_trigger,
+ holdIntvl=hold_interval,
+ localEpAgeIntvl=local_ep_interval,
+ remoteEpAgeIntvl=remote_ep_interval,
+ moveFreq=move_frequency,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='fvEpRetPol')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_span_dst_group.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_span_dst_group.py
new file mode 100644
index 00000000..9c6c2664
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_span_dst_group.py
@@ -0,0 +1,246 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_tenant_span_dst_group
+short_description: Manage SPAN destination groups (span:DestGrp)
+description:
+- Manage SPAN destination groups on Cisco ACI fabrics.
+options:
+ dst_group:
+ description:
+ - The name of the SPAN destination group.
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - The description of the SPAN destination group.
+ type: str
+ aliases: [ descr ]
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ aliases: [ tenant_name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(span:DestGrp).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Dag Wieers (@dagwieers)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- cisco.aci.aci_tenant_span_dst_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ dst_group: '{{ dst_group }}'
+ description: '{{ descr }}'
+ tenant: '{{ tenant }}'
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ dst_group=dict(type='str', aliases=['name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['dst_group', 'tenant']],
+ ['state', 'present', ['dst_group', 'tenant']],
+ ],
+ )
+
+ dst_group = module.params.get('dst_group')
+ description = module.params.get('description')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='spanDestGrp',
+ aci_rn='destgrp-{0}'.format(dst_group),
+ module_object=dst_group,
+ target_filter={'name': dst_group},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='spanDestGrp',
+ class_config=dict(
+ name=dst_group,
+ descr=description,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='spanDestGrp')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_span_src_group.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_span_src_group.py
new file mode 100644
index 00000000..0e8cbb1e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_span_src_group.py
@@ -0,0 +1,265 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_tenant_span_src_group
+short_description: Manage SPAN source groups (span:SrcGrp)
+description:
+- Manage SPAN source groups on Cisco ACI fabrics.
+options:
+ admin_state:
+ description:
+ - Enable or disable the span sources.
+ - The APIC defaults to C(yes) when unset during creation.
+ type: bool
+ description:
+ description:
+ - The description for Span source group.
+ type: str
+ aliases: [ descr ]
+ dst_group:
+ description:
+ - The Span destination group to associate with the source group.
+ type: str
+ src_group:
+ description:
+ - The name of the Span source group.
+ type: str
+ aliases: [ name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+ tenant:
+ description:
+ - The name of the Tenant.
+ type: str
+ aliases: [ tenant_name ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(span:SrcGrp).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- cisco.aci.aci_tenant_span_src_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ src_group: "{{ src_group }}"
+ dst_group: "{{ dst_group }}"
+ admin_state: "{{ admin_state }}"
+ description: "{{ description }}"
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ src_group=dict(type='str', aliases=['name']), # Not required for querying all objects
+ admin_state=dict(type='bool'),
+ description=dict(type='str', aliases=['descr']),
+ dst_group=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['src_group', 'tenant']],
+ ['state', 'present', ['src_group', 'tenant']],
+ ],
+ )
+
+ aci = ACIModule(module)
+
+ admin_state = aci.boolean(module.params.get('admin_state'), 'enabled', 'disabled')
+ description = module.params.get('description')
+ dst_group = module.params.get('dst_group')
+ src_group = module.params.get('src_group')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='spanSrcGrp',
+ aci_rn='srcgrp-{0}'.format(src_group),
+ module_object=src_group,
+ target_filter={'name': src_group},
+ ),
+ child_classes=['spanSpanLbl'],
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='spanSrcGrp',
+ class_config=dict(
+ adminSt=admin_state,
+ descr=description,
+ name=src_group,
+ nameAlias=name_alias,
+ ),
+ child_configs=[{'spanSpanLbl': {'attributes': {'name': dst_group}}}],
+ )
+
+ aci.get_diff(aci_class='spanSrcGrp')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_span_src_group_to_dst_group.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_span_src_group_to_dst_group.py
new file mode 100644
index 00000000..c547320f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_tenant_span_src_group_to_dst_group.py
@@ -0,0 +1,260 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_tenant_span_src_group_to_dst_group
+short_description: Bind SPAN source groups to destination groups (span:SpanLbl)
+description:
+- Bind SPAN source groups to associated destination groups on Cisco ACI fabrics.
+options:
+ description:
+ description:
+ - The description for Span source group to destination group binding.
+ type: str
+ aliases: [ descr ]
+ dst_group:
+ description:
+ - The Span destination group to associate with the source group.
+ type: str
+ src_group:
+ description:
+ - The name of the Span source group.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+ tenant:
+ description:
+ - The name of the Tenant.
+ type: str
+ aliases: [ tenant_name ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(tenant), C(src_group), and C(dst_group) must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant), M(cisco.aci.aci_tenant_span_src_group), and M(cisco.aci.aci_tenant_span_dst_group) modules can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- module: cisco.aci.aci_tenant_span_src_group
+- module: cisco.aci.aci_tenant_span_dst_group
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(span:SrcGrp).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+# FIXME: Add more, better examples
+EXAMPLES = r'''
+- cisco.aci.aci_tenant_span_src_group_to_dst_group:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ tenant: production
+ src_group: "{{ src_group }}"
+ dst_group: "{{ dst_group }}"
+ description: "{{ description }}"
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ dst_group=dict(type='str'), # Not required for querying all objects
+ src_group=dict(type='str'), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['dst_group', 'src_group', 'tenant']],
+ ['state', 'present', ['dst_group', 'src_group', 'tenant']],
+ ],
+ )
+
+ description = module.params.get('description')
+ dst_group = module.params.get('dst_group')
+ src_group = module.params.get('src_group')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ name_alias = module.params.get('name_alias')
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='spanSrcGrp',
+ aci_rn='srcgrp-{0}'.format(src_group),
+ module_object=src_group,
+ target_filter={'name': src_group},
+ ),
+ subclass_2=dict(
+ aci_class='spanSpanLbl',
+ aci_rn='spanlbl-{0}'.format(dst_group),
+ module_object=dst_group,
+ target_filter={'name': dst_group},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='spanSpanLbl',
+ class_config=dict(
+ descr=description,
+ name=dst_group,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='spanSpanLbl')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vlan_pool.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vlan_pool.py
new file mode 100644
index 00000000..542d63c6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vlan_pool.py
@@ -0,0 +1,283 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_vlan_pool
+short_description: Manage VLAN pools (fvns:VlanInstP)
+description:
+- Manage VLAN pools on Cisco ACI fabrics.
+options:
+ pool_allocation_mode:
+ description:
+ - The method used for allocating VLANs to resources.
+ type: str
+ choices: [ dynamic, static]
+ aliases: [ allocation_mode, mode ]
+ description:
+ description:
+ - Description for the C(pool).
+ type: str
+ aliases: [ descr ]
+ pool:
+ description:
+ - The name of the pool.
+ type: str
+ aliases: [ name, pool_name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- module: cisco.aci.aci_encap_pool
+- module: cisco.aci.aci_vlan_pool_encap_block
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fvns:VlanInstP).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Add a new VLAN pool
+ cisco.aci.aci_vlan_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ pool_allocation_mode: dynamic
+ description: Production VLANs
+ state: present
+ delegate_to: localhost
+
+- name: Remove a VLAN pool
+ cisco.aci.aci_vlan_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ pool_allocation_mode: dynamic
+ state: absent
+ delegate_to: localhost
+
+- name: Query a VLAN pool
+ cisco.aci.aci_vlan_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ pool_allocation_mode: dynamic
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all VLAN pools
+ cisco.aci.aci_vlan_pool:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ pool=dict(type='str', aliases=['name', 'pool_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ pool_allocation_mode=dict(type='str', aliases=['allocation_mode', 'mode'], choices=['dynamic', 'static']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['pool']],
+ ['state', 'present', ['pool']],
+ ],
+ )
+
+ description = module.params.get('description')
+ pool = module.params.get('pool')
+ pool_allocation_mode = module.params.get('pool_allocation_mode')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ pool_name = pool
+
+ # ACI Pool URL requires the allocation mode for vlan and vsan pools (ex: uni/infra/vlanns-[poolname]-static)
+ if pool is not None:
+ if pool_allocation_mode is not None:
+ pool_name = '[{0}]-{1}'.format(pool, pool_allocation_mode)
+ else:
+ module.fail_json(msg="ACI requires the 'pool_allocation_mode' when 'pool' is provided")
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvnsVlanInstP',
+ aci_rn='infra/vlanns-{0}'.format(pool_name),
+ module_object=pool,
+ target_filter={'name': pool},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvnsVlanInstP',
+ class_config=dict(
+ allocMode=pool_allocation_mode,
+ descr=description,
+ name=pool,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class='fvnsVlanInstP')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vlan_pool_encap_block.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vlan_pool_encap_block.py
new file mode 100644
index 00000000..e7204c63
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vlan_pool_encap_block.py
@@ -0,0 +1,362 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Jacob McGill (jmcgill298)
+# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_vlan_pool_encap_block
+short_description: Manage encap blocks assigned to VLAN pools (fvns:EncapBlk)
+description:
+- Manage VLAN encap blocks that are assigned to VLAN pools on Cisco ACI fabrics.
+options:
+ allocation_mode:
+ description:
+ - The method used for allocating encaps to resources.
+ type: str
+ choices: [ dynamic, inherit, static]
+ aliases: [ mode ]
+ description:
+ description:
+ - Description for the pool encap block.
+ type: str
+ aliases: [ descr ]
+ pool:
+ description:
+ - The name of the pool that the encap block should be assigned to.
+ type: str
+ aliases: [ pool_name ]
+ pool_allocation_mode:
+ description:
+ - The method used for allocating encaps to resources.
+ type: str
+ choices: [ dynamic, static]
+ aliases: [ pool_mode ]
+ block_end:
+ description:
+ - The end of encap block.
+ type: int
+ aliases: [ end ]
+ block_name:
+ description:
+ - The name to give to the encap block.
+ type: str
+ aliases: [ name ]
+ block_start:
+ description:
+ - The start of the encap block.
+ type: int
+ aliases: [ start ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+extends_documentation_fragment:
+- cisco.aci.aci
+
+notes:
+- The C(pool) must exist in order to add or delete a encap block.
+seealso:
+- module: cisco.aci.aci_encap_pool_range
+- module: cisco.aci.aci_vlan_pool
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fvns:EncapBlk).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+- Dag Wieers (@dagwieers)
+'''
+
+EXAMPLES = r'''
+- name: Add a new VLAN encap block
+ cisco.aci.aci_vlan_pool_encap_block:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ block_start: 20
+ block_end: 50
+ state: present
+ delegate_to: localhost
+
+- name: Remove a VLAN encap block
+ cisco.aci.aci_vlan_pool_encap_block:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ block_start: 20
+ block_end: 50
+ state: absent
+ delegate_to: localhost
+
+- name: Query a VLAN encap block
+ cisco.aci.aci_vlan_pool_encap_block:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ block_start: 20
+ block_end: 50
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query a VLAN pool for encap blocks
+ cisco.aci.aci_vlan_pool_encap_block:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ pool: production
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all VLAN encap blocks
+ cisco.aci.aci_vlan_pool_encap_block:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ pool=dict(type='str', aliases=['pool_name']), # Not required for querying all objects
+ block_name=dict(type='str', aliases=['name']), # Not required for querying all objects
+ block_end=dict(type='int', aliases=['end']), # Not required for querying all objects
+ block_start=dict(type='int', aliases=["start"]), # Not required for querying all objects
+ allocation_mode=dict(type='str', aliases=['mode'], choices=['dynamic', 'inherit', 'static']),
+ description=dict(type='str', aliases=['descr']),
+ pool_allocation_mode=dict(type='str', aliases=['pool_mode'], choices=['dynamic', 'static']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['pool', 'block_end', 'block_name', 'block_start']],
+ ['state', 'present', ['pool', 'block_end', 'block_name', 'block_start']],
+ ],
+ )
+
+ allocation_mode = module.params.get('allocation_mode')
+ description = module.params.get('description')
+ pool = module.params.get('pool')
+ pool_allocation_mode = module.params.get('pool_allocation_mode')
+ block_end = module.params.get('block_end')
+ block_name = module.params.get('block_name')
+ block_start = module.params.get('block_start')
+ state = module.params.get('state')
+ name_alias = module.params.get('name_alias')
+
+ if block_end is not None:
+ encap_end = 'vlan-{0}'.format(block_end)
+ else:
+ encap_end = None
+
+ if block_start is not None:
+ encap_start = 'vlan-{0}'.format(block_start)
+ else:
+ encap_start = None
+
+ # Collect proper mo information
+ aci_block_mo = 'from-[{0}]-to-[{1}]'.format(encap_start, encap_end)
+ pool_name = pool
+
+ # Validate block_end and block_start are valid for its respective encap type
+ for encap_id in block_end, block_start:
+ if encap_id is not None:
+ if not 1 <= encap_id <= 4094:
+ module.fail_json(msg="vlan pools must have 'block_start' and 'block_end' values between 1 and 4094")
+
+ if block_end is not None and block_start is not None:
+ # Validate block_start is less than block_end
+ if block_start > block_end:
+ module.fail_json(msg="The 'block_start' must be less than or equal to the 'block_end'")
+
+ elif block_end is None and block_start is None:
+ if block_name is None:
+ # Reset range managed object to None for aci util to properly handle query
+ aci_block_mo = None
+
+ # ACI Pool URL requires the allocation mode (ex: uni/infra/vlanns-[poolname]-static)
+ if pool is not None:
+ if pool_allocation_mode is not None:
+ pool_name = '[{0}]-{1}'.format(pool, pool_allocation_mode)
+ else:
+ module.fail_json(msg="ACI requires the 'pool_allocation_mode' when 'pool' is provided")
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvnsVlanInstP',
+ aci_rn='infra/vlanns-{0}'.format(pool_name),
+ module_object=pool,
+ target_filter={'name': pool},
+ ),
+ subclass_1=dict(
+ aci_class='fvnsEncapBlk',
+ aci_rn=aci_block_mo,
+ module_object=aci_block_mo,
+ target_filter={'from': encap_start, 'to': encap_end, 'name': block_name},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvnsEncapBlk',
+ class_config={
+ "allocMode": allocation_mode,
+ "descr": description,
+ "from": encap_start,
+ "name": block_name,
+ "to": encap_end,
+ "nameAlias": name_alias,
+ },
+ )
+
+ aci.get_diff(aci_class='fvnsEncapBlk')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vmm_credential.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vmm_credential.py
new file mode 100644
index 00000000..b9a8a8c7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vmm_credential.py
@@ -0,0 +1,316 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: aci_vmm_credential
+short_description: Manage virtual domain credential profiles (vmm:UsrAccP)
+description:
+- Manage virtual domain credential profiles on Cisco ACI fabrics.
+options:
+ name:
+ description:
+ - Name of the credential profile.
+ type: str
+ aliases: [ credential_name, credential_profile ]
+ credential_password:
+ description:
+ - VMM controller password.
+ type: str
+ aliases: []
+ credential_username:
+ description:
+ - VMM controller username.
+ type: str
+ aliases: []
+ description:
+ description:
+ - Description for the tenant.
+ type: str
+ aliases: [ descr ]
+ domain:
+ description:
+ - Name of the virtual domain profile.
+ type: str
+ aliases: [ domain_name, domain_profile, name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+ vm_provider:
+ description:
+ - The VM platform for VMM Domains.
+ - Support for Kubernetes was added in ACI v3.0.
+ - Support for CloudFoundry, OpenShift and Red Hat was added in ACI v3.1.
+ type: str
+ choices: [ cloudfoundry, kubernetes, microsoft, openshift, openstack, redhat, vmware ]
+extends_documentation_fragment:
+- cisco.aci.aci
+
+seealso:
+- module: cisco.aci.aci_domain
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC classes B(vmm:DomP)
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jason Juenger (@jasonjuenger)
+'''
+
+EXAMPLES = r'''
+- name: Add credential to VMware VMM domain
+ cisco.aci.aci_vmm_credential:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: vmware_dom
+ description: secure credential
+ name: vCenterCredential
+ credential_username: vCenterUsername
+ credential_password: vCenterPassword
+ vm_provider: vmware
+ state: present
+
+- name: Remove credential from VMware VMM domain
+ cisco.aci.aci_vmm_credential:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: vmware_dom
+ name: myCredential
+ vm_provider: vmware
+ state: absent
+
+- name: Query a specific VMware VMM credential
+ cisco.aci.aci_vmm_credential:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: vmware_dom
+ name: vCenterCredential
+ vm_provider: vmware
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all VMware VMM credentials
+ cisco.aci.aci_vmm_credential:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ domain: vmware_dom
+ vm_provider: vmware
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+VM_PROVIDER_MAPPING = dict(
+ cloudfoundry='CloudFoundry',
+ kubernetes='Kubernetes',
+ microsoft='Microsoft',
+ openshift='OpenShift',
+ openstack='OpenStack',
+ redhat='Redhat',
+ vmware='VMware',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ name=dict(type='str', aliases=['credential_name', 'credential_profile']),
+ credential_password=dict(type='str', no_log=True),
+ credential_username=dict(type='str'),
+ description=dict(type='str', aliases=['descr']),
+ domain=dict(type='str', aliases=['domain_name', 'domain_profile']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ vm_provider=dict(type='str', choices=list(VM_PROVIDER_MAPPING.keys())),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['domain']],
+ ['state', 'present', ['domain']],
+ ],
+ )
+
+ name = module.params.get('name')
+ credential_password = module.params.get('credential_password')
+ credential_username = module.params.get('credential_username')
+ description = module.params.get('description')
+ domain = module.params.get('domain')
+ state = module.params.get('state')
+ vm_provider = module.params.get('vm_provider')
+ name_alias = module.params.get('name_alias')
+
+ credential_class = 'vmmUsrAccP'
+ usracc_mo = 'uni/vmmp-{0}/dom-{1}/usracc-{2}'.format(VM_PROVIDER_MAPPING.get(vm_provider), domain, name)
+ usracc_rn = 'vmmp-{0}/dom-{1}/usracc-{2}'.format(VM_PROVIDER_MAPPING.get(vm_provider), domain, name)
+
+ # Ensure that querying all objects works when only domain is provided
+ if name is None:
+ usracc_mo = None
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class=credential_class,
+ aci_rn=usracc_rn,
+ module_object=usracc_mo,
+ target_filter={'name': domain, 'usracc': name},
+ ),
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class=credential_class,
+ class_config=dict(
+ descr=description,
+ name=name,
+ pwd=credential_password,
+ usr=credential_username,
+ nameAlias=name_alias,
+ ),
+ )
+
+ aci.get_diff(aci_class=credential_class)
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vrf.py b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vrf.py
new file mode 100644
index 00000000..6bb230c2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/plugins/modules/aci_vrf.py
@@ -0,0 +1,324 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: aci_vrf
+short_description: Manage contexts or VRFs (fv:Ctx)
+description:
+- Manage contexts or VRFs on Cisco ACI fabrics.
+- Each context is a private network associated to a tenant, i.e. VRF.
+- Enable Preferred Groups for VRF
+options:
+ tenant:
+ description:
+ - The name of the Tenant the VRF should belong to.
+ type: str
+ aliases: [ tenant_name ]
+ vrf:
+ description:
+ - The name of the VRF.
+ type: str
+ aliases: [ context, name, vrf_name ]
+ policy_control_direction:
+ description:
+ - Determines if the policy should be enforced by the fabric on ingress or egress.
+ type: str
+ choices: [ egress, ingress ]
+ policy_control_preference:
+ description:
+ - Determines if the fabric should enforce contract policies to allow routing and packet forwarding.
+ type: str
+ choices: [ enforced, unenforced ]
+ description:
+ description:
+ - The description for the VRF.
+ type: str
+ aliases: [ descr ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+ name_alias:
+ description:
+ - The alias for the current object. This relates to the nameAlias field in ACI.
+ type: str
+ preferred_group:
+ description:
+ - Enables preferred groups for the VRF under vzAny
+ type: str
+ choices: [enabled, disabled]
+ match_type:
+ description:
+ - Configures match type for contracts under vzAny
+ type: str
+ choices: [ all, at_least_one, at_most_one, none]
+extends_documentation_fragment:
+- cisco.aci.aci
+notes:
+- The C(tenant) used must exist before using this module in your playbook.
+ The M(cisco.aci.aci_tenant) module can be used for this.
+seealso:
+- module: cisco.aci.aci_tenant
+- name: APIC Management Information Model reference
+ description: More information about the internal APIC class B(fv:Ctx).
+ link: https://developer.cisco.com/docs/apic-mim-ref/
+author:
+- Jacob McGill (@jmcgill298)
+'''
+
+EXAMPLES = r'''
+- name: Add a new VRF to a tenant
+ cisco.aci.aci_vrf:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ vrf: vrf_lab
+ tenant: lab_tenant
+ descr: Lab VRF
+ policy_control_preference: enforced
+ policy_control_direction: ingress
+ state: present
+ delegate_to: localhost
+
+- name: Remove a VRF for a tenant
+ cisco.aci.aci_vrf:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ vrf: vrf_lab
+ tenant: lab_tenant
+ state: absent
+ delegate_to: localhost
+
+- name: Query a VRF of a tenant
+ cisco.aci.aci_vrf:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ vrf: vrf_lab
+ tenant: lab_tenant
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all VRFs
+ cisco.aci.aci_vrf:
+ host: apic
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+current:
+ description: The existing configuration from the APIC after the module has finished
+ returned: success
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+error:
+ description: The error information as returned from the APIC
+ returned: failure
+ type: dict
+ sample:
+ {
+ "code": "122",
+ "text": "unknown managed object class foo"
+ }
+raw:
+ description: The raw output returned by the APIC REST API (xml or json)
+ returned: parse error
+ type: str
+ sample: '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="122" text="unknown managed object class foo"/></imdata>'
+sent:
+ description: The actual/minimal configuration pushed to the APIC
+ returned: info
+ type: list
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment"
+ }
+ }
+ }
+previous:
+ description: The original configuration from the APIC before the module has started
+ returned: info
+ type: list
+ sample:
+ [
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production",
+ "dn": "uni/tn-production",
+ "name": "production",
+ "nameAlias": "",
+ "ownerKey": "",
+ "ownerTag": ""
+ }
+ }
+ }
+ ]
+proposed:
+ description: The assembled configuration from the user-provided parameters
+ returned: info
+ type: dict
+ sample:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Production environment",
+ "name": "production"
+ }
+ }
+ }
+filter_string:
+ description: The filter string used for the request
+ returned: failure or debug
+ type: str
+ sample: ?rsp-prop-include=config-only
+method:
+ description: The HTTP method used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: POST
+response:
+ description: The HTTP response from the APIC
+ returned: failure or debug
+ type: str
+ sample: OK (30 bytes)
+status:
+ description: The HTTP status from the APIC
+ returned: failure or debug
+ type: int
+ sample: 200
+url:
+ description: The HTTP url used for the request to the APIC
+ returned: failure or debug
+ type: str
+ sample: https://10.11.12.13/api/mo/uni/tn-production.json
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule, aci_argument_spec
+
+MATCH_TYPE_MAPPING = dict(
+ all='All',
+ at_least_one='AtleastOne',
+ at_most_one='AtmostOne',
+ none='None',
+)
+
+
+def main():
+ argument_spec = aci_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['tenant_name']), # Not required for querying all objects
+ vrf=dict(type='str', aliases=['context', 'name', 'vrf_name']), # Not required for querying all objects
+ description=dict(type='str', aliases=['descr']),
+ policy_control_direction=dict(type='str', choices=['egress', 'ingress']),
+ policy_control_preference=dict(type='str', choices=['enforced', 'unenforced']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ preferred_group=dict(type='str', choices=['enabled', 'disabled']),
+ match_type=dict(type='str', choices=['all', 'at_least_one', 'at_most_one', 'none']),
+ name_alias=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['tenant', 'vrf']],
+ ['state', 'present', ['tenant', 'vrf']],
+ ],
+ )
+
+ description = module.params.get('description')
+ policy_control_direction = module.params.get('policy_control_direction')
+ policy_control_preference = module.params.get('policy_control_preference')
+ state = module.params.get('state')
+ tenant = module.params.get('tenant')
+ vrf = module.params.get('vrf')
+ name_alias = module.params.get('name_alias')
+ preferred_group = module.params.get('preferred_group')
+ match_type = module.params.get('match_type')
+
+ if match_type is not None:
+ match_type = MATCH_TYPE_MAPPING[match_type]
+
+ aci = ACIModule(module)
+ aci.construct_url(
+ root_class=dict(
+ aci_class='fvTenant',
+ aci_rn='tn-{0}'.format(tenant),
+ module_object=tenant,
+ target_filter={'name': tenant},
+ ),
+ subclass_1=dict(
+ aci_class='fvCtx',
+ aci_rn='ctx-{0}'.format(vrf),
+ module_object=vrf,
+ target_filter={'name': vrf},
+ ),
+ child_classes=['vzAny']
+ )
+
+ aci.get_existing()
+
+ if state == 'present':
+ aci.payload(
+ aci_class='fvCtx',
+ class_config=dict(
+ descr=description,
+ pcEnfDir=policy_control_direction,
+ pcEnfPref=policy_control_preference,
+ name=vrf,
+ nameAlias=name_alias,
+ ),
+ child_configs=[
+ dict(vzAny=dict(attributes=dict(prefGrMemb=preferred_group, matchT=match_type))),
+ ],
+ )
+
+ aci.get_diff(aci_class='fvCtx')
+
+ aci.post_config()
+
+ elif state == 'absent':
+ aci.delete_config()
+
+ aci.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/.gitignore b/collections-debian-merged/ansible_collections/cisco/aci/tests/.gitignore
new file mode 100644
index 00000000..ea1472ec
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/.gitignore
@@ -0,0 +1 @@
+output/
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/inventory.networking b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/inventory.networking
new file mode 100644
index 00000000..736d93a2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/inventory.networking
@@ -0,0 +1,11 @@
+[aci]
+lh-dmz1-pod3-sim-v32 ansible_host=173.36.219.136 ansible_connection=local aci_hostname=173.36.219.136 aci_username=ansible_github_ci aci_password="jZqwpB*r9&5mx3mn8e5"
+lh-dmz1-pod3-sim-v42 ansible_host=173.36.219.68 ansible_connection=local aci_hostname=173.36.219.68 aci_username=ansible_github_ci aci_password="jZqwpB*r9&5mx3mn8e5"
+
+[aci:vars]
+aws_aci_hostname=54.176.140.90
+aws_aci_username=ansible_github_ci
+aws_aci_password=sJ94G92#8dq2hx*K4qh
+azure_aci_hostname=104.42.26.226
+azure_aci_username=ansible_github_ci
+azure_aci_password=sJ94G92#8dq2hx*K4qh \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/network-integration.requirements.txt b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/network-integration.requirements.txt
new file mode 100644
index 00000000..5546336e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/network-integration.requirements.txt
@@ -0,0 +1,2 @@
+lxml
+xmljson \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/target-prefixes.network b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/target-prefixes.network
new file mode 100644
index 00000000..dc092c88
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/target-prefixes.network
@@ -0,0 +1 @@
+aci
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user/tasks/main.yml
new file mode 100644
index 00000000..b3841f90
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user/tasks/main.yml
@@ -0,0 +1,235 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (dagwieers) <dag@wieers.com>
+#
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Remove any pre-existing user
+ cisco.aci.aci_aaa_user: &user_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aaa_user: ansible
+ state: absent
+
+
+# ADD USER
+- name: Add user (check_mode)
+ cisco.aci.aci_aaa_user: &user_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aaa_user: ansible
+ description: Ansible test user
+ email: ansible@ansible.lan
+ enabled: yes
+ expiration: never
+ expires: no
+ first_name: Test
+ last_name: User
+ phone: 1-234-555-678
+ check_mode: yes
+ register: cm_add_user
+
+# NOTE: Setting password is not idempotent, see #35544
+- name: Add user (normal mode)
+ cisco.aci.aci_aaa_user:
+ <<: *user_present
+ aaa_password: 12!Ab:cD!34
+ register: nm_add_user
+
+- name: Add user again (check mode)
+ cisco.aci.aci_aaa_user: *user_present
+ check_mode: yes
+ register: cm_add_user_again
+
+- name: Add user again (normal mode)
+ cisco.aci.aci_aaa_user: *user_present
+ register: nm_add_user_again
+
+- name: Verify add user
+ assert:
+ that:
+ - cm_add_user is changed
+ - nm_add_user is changed
+ - nm_add_user.current.0.aaaUser.attributes.descr == 'Ansible test user'
+ - cm_add_user_again is not changed
+ - nm_add_user_again is not changed
+ - nm_add_user_again.current.0.aaaUser.attributes.descr == 'Ansible test user'
+
+
+# MODIFY USER
+- name: Modify user (check_mode)
+ cisco.aci.aci_aaa_user: &user_changed
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aaa_user: ansible
+ description: Ansible test user for integration tests
+ email: aci-ansible@ansible.lan
+ expiration: '2123-12-12'
+ expires: yes
+ phone: 2-345-555-678
+ check_mode: yes
+ register: cm_modify_user
+
+- name: Modify user (normal mode)
+ cisco.aci.aci_aaa_user: *user_changed
+ register: nm_modify_user
+
+- name: Modify user again (check mode)
+ cisco.aci.aci_aaa_user: *user_changed
+ check_mode: yes
+ register: cm_modify_user_again
+
+- name: Modify user again (normal mode)
+ cisco.aci.aci_aaa_user: *user_changed
+ register: nm_modify_user_again
+
+- name: Verify modify user
+ assert:
+ that:
+ - cm_modify_user is changed
+ - nm_modify_user is changed
+ - nm_modify_user.current.0.aaaUser.attributes.descr == 'Ansible test user for integration tests'
+ - cm_modify_user_again is not changed
+ - nm_modify_user_again is not changed
+ - nm_modify_user_again.current.0.aaaUser.attributes.descr == 'Ansible test user for integration tests'
+
+
+# CLEAR PASSWORD HISTORY
+- name: Clear password history (check_mode)
+ cisco.aci.aci_aaa_user: &clear_password_history
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aaa_user: ansible
+ clear_password_history: yes
+ check_mode: yes
+ register: cm_clear_password_history
+
+- name: Clear password history (normal mode)
+ cisco.aci.aci_aaa_user: *clear_password_history
+ register: nm_clear_password_history
+
+- name: Clear password history (check mode)
+ cisco.aci.aci_aaa_user: *clear_password_history
+ check_mode: yes
+ register: cm_clear_password_history_again
+
+- name: Clear password history (normal mode)
+ cisco.aci.aci_aaa_user: *clear_password_history
+ register: nm_clear_password_history_again
+
+- name: Verify clear password history
+ assert:
+ that:
+ # NOTE: Clearing password history is a changing action, everytime
+ - cm_clear_password_history is changed
+ - nm_clear_password_history is changed
+ - cm_clear_password_history_again is changed
+ - nm_clear_password_history_again is changed
+
+
+# QUERY ALL USERS
+- name: Query all users (check_mode)
+ cisco.aci.aci_aaa_user: &user_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aaa_user: ansible
+ state: query
+ check_mode: yes
+ register: cm_query_all_users
+
+- name: Query all users (normal mode)
+ cisco.aci.aci_aaa_user: *user_query
+ register: nm_query_all_users
+
+- name: Verify query_all_users
+ assert:
+ that:
+ - cm_query_all_users is not changed
+ - nm_query_all_users is not changed
+ # NOTE: Order of users is not stable between calls
+ #- cm_query_all_users == nm_query_all_users
+
+
+# QUERY OUR USER
+- name: Query our user (check_mode)
+ cisco.aci.aci_aaa_user:
+ <<: *user_query
+ check_mode: yes
+ register: cm_query_user
+
+- name: Query our user (normal mode)
+ cisco.aci.aci_aaa_user:
+ <<: *user_query
+ register: nm_query_user
+
+- name: Verify query_user
+ assert:
+ that:
+ - cm_query_user is not changed
+ - nm_query_user is not changed
+ - cm_query_user == nm_query_user
+ - nm_query_user.current.0.aaaUser.attributes.accountStatus == 'active'
+ - nm_query_user.current.0.aaaUser.attributes.descr == 'Ansible test user for integration tests'
+ - nm_query_user.current.0.aaaUser.attributes.email == 'aci-ansible@ansible.lan'
+ - nm_query_user.current.0.aaaUser.attributes.expiration == '2123-12-12T00:00:00.000+00:00'
+ - nm_query_user.current.0.aaaUser.attributes.expires == 'yes'
+ - nm_query_user.current.0.aaaUser.attributes.phone == '2-345-555-678'
+
+
+# REMOVE USER
+- name: Remove user (check_mode)
+ cisco.aci.aci_aaa_user: *user_absent
+ check_mode: yes
+ register: cm_remove_user
+
+- name: Remove user (normal mode)
+ cisco.aci.aci_aaa_user: *user_absent
+ register: nm_remove_user
+
+- name: Remove user again (check_mode)
+ cisco.aci.aci_aaa_user: *user_absent
+ check_mode: yes
+ register: cm_remove_user_again
+
+- name: Remove user again (normal mode)
+ cisco.aci.aci_aaa_user: *user_absent
+ register: nm_remove_user_again
+
+- name: Verify remove_user
+ assert:
+ that:
+ - cm_remove_user is changed
+ - nm_remove_user is changed
+ - cm_remove_user_again is not changed
+ - nm_remove_user_again is not changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/admin.crt b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/admin.crt
new file mode 100644
index 00000000..cfac5531
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/admin.crt
@@ -0,0 +1,14 @@
+-----BEGIN CERTIFICATE-----
+MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV
+BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX
+DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p
+bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG
+9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i
+v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl
+XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw
+AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud
+IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI
+hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl
+3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l
+KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00=
+-----END CERTIFICATE-----
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/admin.key b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/admin.key
new file mode 100644
index 00000000..63bb00cc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/admin.key
@@ -0,0 +1,16 @@
+-----BEGIN PRIVATE KEY-----
+MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKIRv+2sbbewm0mj
+D+6/tpoUymzYIdFsN+gu02teIr/lZi8ipEB514pyhoaerstzboPteWvniLuwq4KQ
+VTEHgoln7J8EaHCnECViGA61pVx8RkJ99cmCkepspROw3I96zBcm58oXs6+Q/BnD
+/OWET5sBvR9oTv9GNRVJ1rvSMAEJAgMBAAECgYByu3QO0qF9h7X3JEu0Ld4cKBnB
+giQ2uJC/et7KxIJ/LOvw9GopBthyt27KwG1ntBkJpkTuAaQHkyNns7vLkNB0S0IR
++owVFEcKYq9VCHTaiQU8TDp24gN+yPTrpRuH8YhDVq5SfVdVuTMgHVQdj4ya4VlF
+Gj+a7+ipxtGiLsVGrQJBAM7p0Fm0xmzi+tBOASUAcVrPLcteFIaTBFwfq16dm/ON
+00Khla8Et5kMBttTbqbukl8mxFjBEEBlhQqb6EdQQ0sCQQDIhHx1a9diG7y/4DQA
+4KvR3FCYwP8PBORlSamegzCo+P1OzxiEo0amX7yQMA5UyiP/kUsZrme2JBZgna8S
+p4R7AkEAr7rMhSOPUnMD6V4WgsJ5g1Jp5kqkzBaYoVUUSms5RASz4+cwJVCwTX91
+Y1jcpVIBZmaaY3a0wrx13ajEAa0dOQJBAIpjnb4wqpsEh7VpmJqOdSdGxb1XXfFQ
+sA0T1OQYqQnFppWwqrxIL+d9pZdiA1ITnNqyvUFBNETqDSOrUHwwb2cCQGArE+vu
+ffPUWQ0j+fiK+covFG8NL7H+26NSGB5+Xsn9uwOGLj7K/YT6CbBtr9hJiuWjM1Al
+0V4ltlTuu2mTMaw=
+-----END PRIVATE KEY-----
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/admin_invalid.key b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/admin_invalid.key
new file mode 100644
index 00000000..22f5fae4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/admin_invalid.key
@@ -0,0 +1,3 @@
+-----BEGIN PRIVATE KEY-----
+This is an invalid private key
+-----END PRIVATE KEY-----
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/openssh_rsa.key b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/openssh_rsa.key
new file mode 100644
index 00000000..0c18da5c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/openssh_rsa.key
@@ -0,0 +1,16 @@
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAlwAAAAdzc2gtcn
+NhAAAAAwEAAQAAAIEA3VnrdPOQbr3DPF5GbC31W7ScloEpU9BSDqPmpyYPUdsWl21UXBB8
+exip3GVOl+7GbB1WkDKYr7uMuBjsfDzMzZkDAFVEpud+IUzZB7aSfSd+L9bdeFG2sGI+Fv
+y1QmiMBT5gcvXaM16vRKe4FywM07/Fmd3REm/+wtmFG/C4sYUAAAIQLuIWNS7iFjUAAAAH
+c3NoLXJzYQAAAIEA3VnrdPOQbr3DPF5GbC31W7ScloEpU9BSDqPmpyYPUdsWl21UXBB8ex
+ip3GVOl+7GbB1WkDKYr7uMuBjsfDzMzZkDAFVEpud+IUzZB7aSfSd+L9bdeFG2sGI+Fvy1
+QmiMBT5gcvXaM16vRKe4FywM07/Fmd3REm/+wtmFG/C4sYUAAAADAQABAAAAgHj5rhALFg
+MQP2X8+GwjahemzHYNPXMLRe2ucl8kE/de0CgOnq56bC4yupMz4xJyc4ufNTI2FPDmhfAP
+3x+/cwZeYFsipyGdL1IYbfk0QYSP65Btr2yq8+QyN7zWdFXQ8csT0ImZgNiQKehc69ctLH
+XcyelsdwNiUCRZYa7kCpf5AAAAQQCo7OSWQUa16xP9KrKm0F3fnaAKewhQNDIwok5PRgoN
+03k/IpGOCAjvNuOb7DkXmVvxjO8Rj4L16vL+RTzHg8n7AAAAQQD7tej6gJy3MLcmrQ4aHb
+FeLzQ/ZXS2IgdIRC8rcNB1h9Rso7+fySVFwnmwy2Um7wwsjNnr2xyhigwfQCSyRubfAAAA
+QQDhH5EX7+hdm/fPLM6Goz9N3ERbIgBq2Mel5CCi/Ns7vDfBQiEla1atdKTV0S2EYfxIw2
+ehkMGbmXl2/9JHxKgbAAAAFGNpemhhb0BDSVpIQU8tTS05MjhRAQIDBAUG
+-----END OPENSSH PRIVATE KEY-----
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_ansible.key b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_ansible.key
new file mode 100644
index 00000000..ac63a005
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_ansible.key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXgIBAAKBgQDVyLS8/ix6QOH7R83B4WuhsliL6nffBvrkHXXsqViit3OZd+/K
+fSrNlZysUvHS4hxfRtJrFQfpkogwXEEupBPF3p0xy7wZzvjjWWJk0NQ8PoVlOhUY
+emZTfMX+FFNr9pAjjjaVHb9jCuxko7upAyj8POhhETY2zYoJoa8TR6fLZwIDAQAB
+AoGBALo5GzeGMThNTIyW/6Tjt94ifP9kPwcIDYSoJRECczNKmmgVEcxRO/fZW6DA
+n+YTEKPuDV059KqB+iAmPKFkS9N41kaq+NUAknlFJPV6Vs3gpvJGqWgu++73dhR5
+cKsHTlK2KBsRtsXnOJ9odKWFjiTnZ1Eyvmhw7ct+Fojb/7ABAkEA9+Wwm+HGlYqw
+ghuFaBtNuqC/S2vO6SEfdQvTDQKKO5ROei5m+ryjWj6flbCcG+5dLs8l4Zh3sQUL
+kc0RQfHSWQJBANzFkdO6wXXPOw7RhAEP2sA2W2VacMbGynjsoDJXmypeJ7Z+odLb
+5gNXET9RA77RY/saIBdwR4JNnku2WnoxU78CQQDhYirVP0vu8H6UfHMpeRGNqdLi
+vq0LlrrkDxEe1f1aN/e17HRiaZnXVfKABWeZmXmNMndNifLgtiaTtC+JllRZAkEA
+ydAdV0SANvaCETC7j9DzcgP+lm8PatYsHlCIvJxS7m71tKCbw0pbQDBmRtADMXrt
+/4vJTEPKSrYzfxiqKstOtwJAXkWXaqVhJeKjbMj1buo6s/1qGIfSrZR/AjozvJ03
+JehevfULS3668jOYJZW6BoNhysx6+Hqf5Id8fB4iDWPQhA==
+-----END RSA PRIVATE KEY-----
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_user.crt b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_user.crt
new file mode 100644
index 00000000..de222350
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_user.crt
@@ -0,0 +1,14 @@
+-----BEGIN CERTIFICATE-----
+MIICODCCAaGgAwIBAgIUNOqiIBh811X/tPWSUgr9rajJ7t4wDQYJKoZIhvcNAQEL
+BQAwLTEOMAwGA1UEAwwFQWRtaW4xDjAMBgNVBAoMBWNpc2NvMQswCQYDVQQGEwJV
+UzAgFw0yMDEwMjkyMjQ0NTNaGA8yMTIwMTAwNTIyNDQ1M1owLTEOMAwGA1UEAwwF
+QWRtaW4xDjAMBgNVBAoMBWNpc2NvMQswCQYDVQQGEwJVUzCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAwjb3/W3x/bPX+bylh2PjXbcFPwpdTPJwqTxCdUinJRKv
+HXW7rwRiV9TdoNZZ946RvVM6l2LzUJyaK4wZZHf6WKJ2veL6LIrORA32vN+ofmpn
+XcTAUQ1JVyHbriy0GaT+1wYClqImWj8HxiskgpD+pKc+kzgl33xwwwqyuF1N7ikC
+AwEAAaNTMFEwHQYDVR0OBBYEFAK18YAZAaPQW7bHvqRwselDeGskMB8GA1UdIwQY
+MBaAFAK18YAZAaPQW7bHvqRwselDeGskMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI
+hvcNAQELBQADgYEAgIvzyP0t4CjsmUmgG7QP977c3+Uvbt2wlCwe+rrXlqvuSeaW
+l4DaTyv8kYyiqIxgrTVI/G+HbpHgTO2yH57njTIAdRjsJgMU9z0oCazOtVD8KpXj
+SKFUtJVbY27BQAnbuDOawX96a0UDY44Ia9NaPuq0/mEcdCKSpQP4ZuvvKVc=
+-----END CERTIFICATE-----
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_user.key b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_user.key
new file mode 100644
index 00000000..354dbbdb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/pki/rsa_user.key
@@ -0,0 +1,16 @@
+-----BEGIN PRIVATE KEY-----
+MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMI29/1t8f2z1/m8
+pYdj4123BT8KXUzycKk8QnVIpyUSrx11u68EYlfU3aDWWfeOkb1TOpdi81CcmiuM
+GWR3+liidr3i+iyKzkQN9rzfqH5qZ13EwFENSVch264stBmk/tcGApaiJlo/B8Yr
+JIKQ/qSnPpM4Jd98cMMKsrhdTe4pAgMBAAECgYAX8c8BX9zF+rZWA/wkhRwzIa1z
+6EM4iWt6cgN/kkWJPJR6fVl2aoP1cDki60qMSveM8AX5RCnbdnNLiypWSLSEogdd
+bRWyFeF4ZXvivd+Lds2u5Ni3PiCrIpHfNvid2ERCaKhblQRdhi/dTH9Z+3kGspwc
+jpKzWMmGjBpqWjWOQQJBAOB3cS/AxbwJ6Fzvbi6sLiK6Ry8eSIMlce3Yyw89oU+M
+DGkIbggICCYKxXYIWtBbyxthdQudKFZYbLpCkLSMBXsCQQDdf5ICNN2R0ptYLhSX
+kQ4tiGigi1hq93+25Ov1rI8eIFSYlKNcyA/cvwv5ptlXmy1UAyoAdGCbS47pgCwT
+Nz+rAkEAtzHkR5PuDXSMluS2KRNPJ/qdxB/UEGzMGdEYkNy8vX5QVpyRqK5dcCbU
+V2ukKm7wSe11KEBgPnA2dKGFFkU85wJAD895Vpr7bdtAp2yyn5cFEg74mO0ZZJlC
+DoYMqb6lgJsCLtn9RzQonbMtYaadQPmcpLCNIPctpiggjV5OxxhcfQJBAM1ETm8p
+/9beBPTS8cJdWHvCRE149H/ZCUxqjFZriJzFYvi0xor85eK8/3V7xaWtTkK25i3+
+xWk+sA3DYYDPGM8=
+-----END PRIVATE KEY-----
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/tasks/main.yml
new file mode 100644
index 00000000..78053d38
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aaa_user_certificate/tasks/main.yml
@@ -0,0 +1,279 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (dagwieers) <dag@wieers.com>
+#
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Making sure running user has correct cert
+ cisco.aci.aci_aaa_user_certificate:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aaa_user: '{{ aci_username }}'
+ certificate_name: admin
+ certificate: "{{ lookup('file', 'pki/admin.crt') }}"
+ state: present
+
+- name: Remove any pre-existing certificate
+ cisco.aci.aci_aaa_user_certificate: &cert_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aaa_user: '{{ aci_username }}'
+ certificate_name: "{{ item }}"
+ state: absent
+ loop:
+ - admin
+ - user
+ - rsa_user
+
+# ADD USER CERTIFICATE
+- name: Add user certificate (check_mode)
+ cisco.aci.aci_aaa_user_certificate: &cert_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aaa_user: '{{ aci_username }}'
+ certificate_name: admin
+ certificate: "{{ lookup('file', 'pki/admin.crt') }}"
+ state: present
+ check_mode: yes
+ register: cm_add_cert
+
+- name: Add user certificate (normal mode)
+ cisco.aci.aci_aaa_user_certificate: *cert_present
+ register: nm_add_cert
+
+- name: Add user certificate again (check mode)
+ cisco.aci.aci_aaa_user_certificate: *cert_present
+ check_mode: yes
+ register: cm_add_cert_again
+
+- name: Add user certificate again (normal mode)
+ cisco.aci.aci_aaa_user_certificate: *cert_present
+ register: nm_add_cert_again
+
+- name: Verify add_cert
+ assert:
+ that:
+ - cm_add_cert is changed
+ - nm_add_cert is change
+ - cm_add_cert_again is not changed
+ - nm_add_cert_again is not changed
+
+- name: Add rsa_user certificates
+ cisco.aci.aci_aaa_user_certificate:
+ <<: *cert_present
+ certificate_name: "{{ item }}"
+ certificate: "{{ lookup('file', 'pki/rsa_user.crt') }}"
+ state: present
+ loop:
+ - user
+ - rsa_user
+
+- name: Add admin certificate with user name
+ cisco.aci.aci_aaa_user_certificate:
+ <<: *cert_present
+ certificate_name: '{{ aci_username }}'
+ state: present
+
+# QUERY ALL USER CERTIFICATES
+- name: Query all user certificates using signature-based authentication (check_mode)
+ cisco.aci.aci_aaa_user_certificate: &cert_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ #password: '{{ aci_password }}'
+ private_key: '{{ role_path }}/pki/admin.key'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aaa_user: '{{ aci_username }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_certs
+
+- name: Query all user certificates using signature-based authentication (normal mode)
+ cisco.aci.aci_aaa_user_certificate: *cert_query
+ register: nm_query_all_certs
+
+- name: Verify query_all_certs
+ assert:
+ that:
+ - cm_query_all_certs is not changed
+ - nm_query_all_certs is not changed
+ # NOTE: Order of certs is not stable between calls
+ #- cm_query_all_certs == nm_query_all_certs
+
+- name: Query all user certificates using signature-based authentication (valid rsa private key)
+ cisco.aci.aci_aaa_user_certificate:
+ <<: *cert_query
+ private_key: '{{ role_path }}/pki/rsa_user.key'
+ register: nm_query_all_rsa
+
+- name: Verify nm_query_all_rsa
+ assert:
+ that:
+ - nm_query_all_rsa is not changed
+ - nm_query_all_rsa.current.0.aaaUser.children | length >= 4
+
+- name: Query all certificates using signature-based authentication (private key content for admin certificate)
+ cisco.aci.aci_aaa_user_certificate:
+ <<: *cert_query
+ private_key: |
+ -----BEGIN PRIVATE KEY-----
+ MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKIRv+2sbbewm0mj
+ D+6/tpoUymzYIdFsN+gu02teIr/lZi8ipEB514pyhoaerstzboPteWvniLuwq4KQ
+ VTEHgoln7J8EaHCnECViGA61pVx8RkJ99cmCkepspROw3I96zBcm58oXs6+Q/BnD
+ /OWET5sBvR9oTv9GNRVJ1rvSMAEJAgMBAAECgYByu3QO0qF9h7X3JEu0Ld4cKBnB
+ giQ2uJC/et7KxIJ/LOvw9GopBthyt27KwG1ntBkJpkTuAaQHkyNns7vLkNB0S0IR
+ +owVFEcKYq9VCHTaiQU8TDp24gN+yPTrpRuH8YhDVq5SfVdVuTMgHVQdj4ya4VlF
+ Gj+a7+ipxtGiLsVGrQJBAM7p0Fm0xmzi+tBOASUAcVrPLcteFIaTBFwfq16dm/ON
+ 00Khla8Et5kMBttTbqbukl8mxFjBEEBlhQqb6EdQQ0sCQQDIhHx1a9diG7y/4DQA
+ 4KvR3FCYwP8PBORlSamegzCo+P1OzxiEo0amX7yQMA5UyiP/kUsZrme2JBZgna8S
+ p4R7AkEAr7rMhSOPUnMD6V4WgsJ5g1Jp5kqkzBaYoVUUSms5RASz4+cwJVCwTX91
+ Y1jcpVIBZmaaY3a0wrx13ajEAa0dOQJBAIpjnb4wqpsEh7VpmJqOdSdGxb1XXfFQ
+ sA0T1OQYqQnFppWwqrxIL+d9pZdiA1ITnNqyvUFBNETqDSOrUHwwb2cCQGArE+vu
+ ffPUWQ0j+fiK+covFG8NL7H+26NSGB5+Xsn9uwOGLj7K/YT6CbBtr9hJiuWjM1Al
+ 0V4ltlTuu2mTMaw=
+ -----END PRIVATE KEY-----
+ register: nm_query_all_key_content
+
+# QUERY OUR USER CERTIFICATE
+- name: Query our certificate using signature-based authentication (check_mode)
+ cisco.aci.aci_aaa_user_certificate:
+ <<: *cert_query
+ certificate_name: admin
+ check_mode: yes
+ register: cm_query_cert
+
+- name: Query our certificate using signature-based authentication (normal mode)
+ cisco.aci.aci_aaa_user_certificate:
+ <<: *cert_query
+ certificate_name: admin
+ register: nm_query_cert
+
+- name: Verify query_cert
+ assert:
+ that:
+ - cm_query_cert is not changed
+ - nm_query_cert is not changed
+ - cm_query_cert == nm_query_cert
+
+- name: Query our certificate using signature-based authentication (invalid private key file)
+ cisco.aci.aci_aaa_user_certificate:
+ <<: *cert_query
+ private_key: '{{ role_path }}/pki/admin_invalid.key'
+ certificate_name: admin
+ register: query_cert_invalid_key
+ ignore_errors: yes
+
+- name: Query our certificate using signature-based authentication (certificate file)
+ cisco.aci.aci_aaa_user_certificate:
+ <<: *cert_query
+ private_key: '{{ role_path }}/pki/admin.crt'
+ certificate_name: admin
+ register: query_cert_invalid_key
+ ignore_errors: yes
+
+
+- name: Query our certificate using signature-based authentication (ansible rsa private key file)
+ cisco.aci.aci_aaa_user_certificate:
+ <<: *cert_query
+ private_key: '{{ role_path }}/pki/rsa_ansible.key'
+ certificate_name: admin
+ register: query_cert_openssh_rsa_key
+ ignore_errors: yes
+
+- name: Query our certificate using signature-based authentication (valid rsa private key file)
+ cisco.aci.aci_aaa_user_certificate:
+ <<: *cert_query
+ private_key: '{{ role_path }}/pki/rsa_user.key'
+ certificate_name: "{{ item }}"
+ register: query_cert_ansible_rsa_key
+ loop:
+ - "rsa_user"
+ - "user"
+ #- "admin"
+
+- name: Query our certificate using signature-based authentication (private key content for rsa_user certificate)
+ cisco.aci.aci_aaa_user_certificate:
+ <<: *cert_query
+ private_key: |
+ -----BEGIN PRIVATE KEY-----
+ MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMI29/1t8f2z1/m8
+ pYdj4123BT8KXUzycKk8QnVIpyUSrx11u68EYlfU3aDWWfeOkb1TOpdi81CcmiuM
+ GWR3+liidr3i+iyKzkQN9rzfqH5qZ13EwFENSVch264stBmk/tcGApaiJlo/B8Yr
+ JIKQ/qSnPpM4Jd98cMMKsrhdTe4pAgMBAAECgYAX8c8BX9zF+rZWA/wkhRwzIa1z
+ 6EM4iWt6cgN/kkWJPJR6fVl2aoP1cDki60qMSveM8AX5RCnbdnNLiypWSLSEogdd
+ bRWyFeF4ZXvivd+Lds2u5Ni3PiCrIpHfNvid2ERCaKhblQRdhi/dTH9Z+3kGspwc
+ jpKzWMmGjBpqWjWOQQJBAOB3cS/AxbwJ6Fzvbi6sLiK6Ry8eSIMlce3Yyw89oU+M
+ DGkIbggICCYKxXYIWtBbyxthdQudKFZYbLpCkLSMBXsCQQDdf5ICNN2R0ptYLhSX
+ kQ4tiGigi1hq93+25Ov1rI8eIFSYlKNcyA/cvwv5ptlXmy1UAyoAdGCbS47pgCwT
+ Nz+rAkEAtzHkR5PuDXSMluS2KRNPJ/qdxB/UEGzMGdEYkNy8vX5QVpyRqK5dcCbU
+ V2ukKm7wSe11KEBgPnA2dKGFFkU85wJAD895Vpr7bdtAp2yyn5cFEg74mO0ZZJlC
+ DoYMqb6lgJsCLtn9RzQonbMtYaadQPmcpLCNIPctpiggjV5OxxhcfQJBAM1ETm8p
+ /9beBPTS8cJdWHvCRE149H/ZCUxqjFZriJzFYvi0xor85eK8/3V7xaWtTkK25i3+
+ xWk+sA3DYYDPGM8=
+ -----END PRIVATE KEY-----
+ certificate_name: "{{ item }}"
+ register: query_cert_key_content
+ loop:
+ - "rsa_user"
+ - "user"
+ #- "admin"
+
+# REMOVE CERTIFICATE
+- name: Remove certificate (check_mode)
+ cisco.aci.aci_aaa_user_certificate: &cert_delete
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aaa_user: '{{ aci_username }}'
+ certificate_name: admin
+ state: absent
+ check_mode: yes
+ register: cm_remove_cert
+
+- name: Remove certificate (normal mode)
+ cisco.aci.aci_aaa_user_certificate: *cert_delete
+ register: nm_remove_cert
+
+- name: Remove certificate again (check_mode)
+ cisco.aci.aci_aaa_user_certificate: *cert_delete
+ check_mode: yes
+ register: cm_remove_cert_again
+
+- name: Remove certificate again (normal mode)
+ cisco.aci.aci_aaa_user_certificate: *cert_delete
+ register: nm_remove_cert_again
+
+- name: Verify remove_cert
+ assert:
+ that:
+ - cm_remove_cert is changed
+ - nm_remove_cert is changed
+ - cm_remove_cert_again is not changed
+ - nm_remove_cert_again is not changed \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_block_to_access_port/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_block_to_access_port/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_block_to_access_port/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_block_to_access_port/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_block_to_access_port/tasks/main.yml
new file mode 100644
index 00000000..d8b84168
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_block_to_access_port/tasks/main.yml
@@ -0,0 +1,254 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Shreyas Srish <ssrish@cisco.com>
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Ensuring Interface Policy Leaf profile does not exist
+ cisco.aci.aci_interface_policy_leaf_profile: &aci_interface_policy_leaf_profile_absent
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: absent
+ leaf_interface_profile: leafintprftest
+ register: leaf_profile_present
+
+- name: Ensuring Interface Policy Leaf profile does not exist on fex
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_absent
+ type: fex
+ leaf_interface_profile: leafintprftest_fex
+
+- name: Ensuring Interface Policy Leaf profile exists for kick off
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_absent
+ leaf_interface_profile: leafintprftest
+ state: present
+
+- name: Ensuring Interface Policy Leaf profile exists for kick off
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_absent
+ type: fex
+ leaf_interface_profile: leafintprftest_fex
+ state: present
+
+- name: Ensure Interface Access Port Selector exists for kick of
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile: &aci_access_port_to_interface_policy_leaf_profile_present
+ <<: *aci_interface_policy_leaf_profile_absent
+ access_port_selector: anstest_accessportselector
+ state: present
+
+- name: Ensure Interface Access Port Selector exists for kick of
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ type: fex
+ leaf_interface_profile: leafintprftest_fex
+ access_port_selector: anstest_accessportselector_fex
+
+# TODO: Ensure that leaf Policy Group Exists (module missing) (infra:AccPortGrp)
+# Ensure block does not exist.
+- name: Bind an Access Port Block to an Interface Access Port Selector - check mode works
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ leaf_port_blk: anstest_leafportblkname
+ state: absent
+
+- name: Bind an Access Port Block to an Interface Access Port Selector - check mode works
+ cisco.aci.aci_access_port_block_to_access_port: &aci_access_port_block_to_access_port_present
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ leaf_port_blk: anstest_leafportblkname
+ leaf_port_blk_description: anstest_leafportblkdesc
+ fromPort: 13
+ toPort: 16
+ check_mode: yes
+ register: accessportblock_to_accessport_check_mode_present
+
+- name: Bind an Access Port Block to an Interface Access Port Selector - creation works
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_present
+ register: accessportblock_to_accessport_present
+
+- name: Bind an Access Port Block to an Interface Access Port Selector - 2
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_present
+ leaf_port_blk: anstest_leafportblkname_2
+ leaf_port_blk_description: anstest_leafportblkdesc
+ fromPort: 25
+ toPort: 26
+ register: accessportblock_to_accessport_check_mode_present_2
+
+- name: Bind an Access Port Block to an Interface Access Port Selector - idempotency works
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_present
+ register: accessportblock_to_accessport_idempotent
+
+- name: Bind an Access Port Block to an Interface Access Port Selector - update works
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_present
+ toPort: 15
+ register: accessportblock_to_accessport_update
+
+- name: Associate an access port block (single port) to an interface selector on a fex - creation works
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_present
+ type: fex
+ leaf_interface_profile: leafintprftest_fex
+ access_port_selector: anstest_accessportselector_fex
+ leaf_port_blk_description: anstest_leafportblkdesc_fex
+ leaf_port_blk: fex_blk
+ fromPort: 14
+ toPort: 17
+ register: accessportblock_to_accessport_present_fex
+
+- name: Associate an access port block (single port) to an interface selector on a fex - creation works 2
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_present
+ type: fex
+ leaf_interface_profile: leafintprftest_fex
+ access_port_selector: anstest_accessportselector_fex
+ leaf_port_blk_description: anstest_leafportblkdesc_fex_2
+ leaf_port_blk: fex_blk_2
+ fromPort: 20
+ toPort: 21
+ register: accessportblock_to_accessport_present_fex_2
+
+
+- name: Associate an access port block (single port) to an interface selector on a fex - idempotency works
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_present
+ type: fex
+ leaf_interface_profile: leafintprftest_fex
+ access_port_selector: anstest_accessportselector_fex
+ leaf_port_blk_description: anstest_leafportblkdesc_fex
+ leaf_port_blk: fex_blk
+ fromPort: 14
+ toPort: 17
+ register: accessportblock_to_accessport_present_fex_idemp
+
+- name: Associate an access port block (single port) to an interface selector on a fex - update works
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_present
+ type: fex
+ leaf_interface_profile: leafintprftest_fex
+ access_port_selector: anstest_accessportselector_fex
+ leaf_port_blk_description: anstest_leafportblkdesc_fex
+ leaf_port_blk: fex_blk
+ fromPort: 23
+ toPort: 24
+ register: accessportblock_to_accessport_present_fex_update
+
+# TODO: also test for errors
+- name: present assertions - create / indempotency / update works
+ assert:
+ that:
+ - accessportblock_to_accessport_check_mode_present is changed
+ - accessportblock_to_accessport_present is changed
+ - accessportblock_to_accessport_present.previous == []
+ - accessportblock_to_accessport_present.sent.infraPortBlk.attributes.descr == 'anstest_leafportblkdesc'
+ - accessportblock_to_accessport_present.sent.infraPortBlk.attributes.name == 'anstest_leafportblkname'
+ - accessportblock_to_accessport_present.sent.infraPortBlk.attributes.fromPort == '13'
+ - accessportblock_to_accessport_present.sent.infraPortBlk.attributes.toPort == '16'
+ - accessportblock_to_accessport_idempotent is not changed
+ - accessportblock_to_accessport_idempotent.sent == {}
+ - accessportblock_to_accessport_update is changed
+ - accessportblock_to_accessport_update.sent.infraPortBlk.attributes.toPort == '15'
+ - accessportblock_to_accessport_present_fex is changed
+ - accessportblock_to_accessport_present_fex_idemp is not changed
+ - accessportblock_to_accessport_present_fex.sent.infraPortBlk.attributes.descr == 'anstest_leafportblkdesc_fex'
+ - accessportblock_to_accessport_present_fex.sent.infraPortBlk.attributes.fromPort == '14'
+ - accessportblock_to_accessport_present_fex.sent.infraPortBlk.attributes.toPort == '17'
+ - accessportblock_to_accessport_present_fex_update.sent.infraPortBlk.attributes.toPort == '24'
+
+- name: Query Specific port block and access_port_selector binding
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_present
+ state: query
+ register: binding_query
+
+- name: Query Specific port block and access_port_selector binding fex
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_present
+ type: fex
+ leaf_interface_profile: leafintprftest_fex
+ access_port_selector: anstest_accessportselector_fex
+ leaf_port_blk: fex_blk
+ state: query
+ register: binding_query_fex
+
+- name: query assertions
+ assert:
+ that:
+ - binding_query is not changed
+ - binding_query_fex is not changed
+ - binding_query_fex.current | length >= 1
+ - binding_query.current | length >= 1
+ - '"api/mo/uni/infra/accportprof-leafintprftest/hports-anstest_accessportselector-typ-range/portblk-anstest_leafportblkname.json" in binding_query.url'
+
+- name: Remove binding of Access Port Block and Interface Access Port Selector - check mode
+ cisco.aci.aci_access_port_block_to_access_port: &aci_access_port_block_to_access_port_absent
+ <<: *aci_access_port_block_to_access_port_present
+ state: absent
+ check_mode: yes
+ register: accessportblock_to_accessport_check_mode_absent
+
+- name: Remove binding of Access Port Block and Interface Access Port Selector - delete works
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_absent
+ register: accessportblock_to_accessport_absent
+
+- name: Remove binding of Access Port Block and Interface Access Port Selector - idempotency works
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_absent
+ register: accessportblock_to_accessport_absent_idempotent
+
+- name: Remove binding of Access Port Block and Interface Access Port Selector - check mode
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ #leaf_port_blk: anstest_leafportblkname
+ state: absent
+ ignore_errors: yes
+ register: accessportblock_to_accessport_absent_missing_param
+
+- name: Remove binding of Access Port Block and Interface Access Port Selector - delete works
+ cisco.aci.aci_access_port_block_to_access_port:
+ <<: *aci_access_port_block_to_access_port_absent
+ type: fex
+ leaf_interface_profile: leafintprftest_fex
+ access_port_selector: anstest_accessportselector_fex
+ leaf_port_blk: fex_blk
+ state: absent
+ register: accessportblock_to_accessport_absent_fex
+
+
+- name: absent assertions
+ assert:
+ that:
+ - accessportblock_to_accessport_check_mode_absent is changed
+ - accessportblock_to_accessport_check_mode_absent.previous != []
+ - accessportblock_to_accessport_absent is changed
+ - accessportblock_to_accessport_absent.previous == accessportblock_to_accessport_check_mode_absent.previous
+ - accessportblock_to_accessport_absent_idempotent is not changed
+ - accessportblock_to_accessport_absent_idempotent.previous == []
+ - accessportblock_to_accessport_absent_missing_param is failed
+ - 'accessportblock_to_accessport_absent_missing_param.msg == "state is absent but all of the following are missing: port_blk"'
+ - accessportblock_to_accessport_absent_fex is changed
+
+- name: Ensuring Interface Policy Leaf profile does not exist
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_absent
+ leaf_interface_profile: leafintprftest
+
+- name: Ensuring Interface Policy Leaf profile does not exist on fex
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_absent
+ type: fex
+ leaf_interface_profile: leafintprftest_fex \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile/tasks/main.yml
new file mode 100644
index 00000000..b13ea6ff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_port_to_interface_policy_leaf_profile/tasks/main.yml
@@ -0,0 +1,205 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Shreyas Srish <ssrish@cisco.com>
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Remove Interface policy leaf profile - Cleanup
+ cisco.aci.aci_interface_policy_leaf_profile: &aci_interface_policy_leaf_profile_absent
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ leaf_interface_profile: leafintprftest
+ state: absent
+
+- name: Remove Interface policy fex profile - Cleanup
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_absent
+ type: fex
+ leaf_interface_profile: fexintprftest
+ state: absent
+
+- name: Ensuring bindings do not already exist
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile: &aci_access_port_to_interface_policy_leaf_profile_absent
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ leaf_interface_profile: leafintprftest
+ access_port_selector: anstest_accessportselector
+ state: absent
+
+- name: Ensuring bindings do not already exist
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_absent
+ leaf_interface_profile: leafintprftest_fex
+ access_port_selector: anstest_accessportselector_fex
+ state: absent
+
+- name: Ensuring Interface Policy Leaf profile exists for kick off
+ cisco.aci.aci_interface_policy_leaf_profile: &aci_interface_policy_leaf_profile_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: present
+ leaf_interface_profile: leafintprftest
+ register: leaf_profile_present
+
+- name: Ensuring Interface Policy Fex profile exists for kick off
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_present
+ type: fex
+ leaf_interface_profile: fexintprftest
+
+# TODO: Ensure that leaf Policy Group Exists (module missing) (infra:AccPortGrp)
+
+- name: Bind an Interface Access Port Selector to an Interface Policy Leaf Profile with a Policy Group - check mode works
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile: &aci_access_port_to_interface_policy_leaf_profile_present
+ <<: *aci_interface_policy_leaf_profile_present
+ access_port_selector: anstest_accessportselector
+ check_mode: yes
+ register: accessport_to_intf_check_mode_present
+
+- name: Bind an Interface Access Port Selector to an Interface Policy Leaf Profile with a Policy Group - creation works
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ register: accessport_to_intf_present
+
+- name: Bind an Interface Access Port Selector to an Interface Policy Leaf Profile with a Policy Group - idempotency works
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ register: accessport_to_intf_idempotent
+
+- name: Bind an Interface Access Port Selector to an Interface Policy Profile with a Policy Group - update works
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ policy_group: anstest_policygroupname
+ register: accessport_to_intf_update
+
+- name: Bind an Interface Access Port Selector to an Interface Policy Fex Profile with a Policy Group - creation works
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ type: fex
+ access_port_selector: anstest_fex_accessportselector
+ leaf_interface_profile: fexintprftest
+ register: accessport_to_intf_present_fex
+
+- name: Bind an Interface Access Port Selector to an Interface Policy Fex Profile with a Policy Group - idempotency works
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ type: fex
+ access_port_selector: anstest_fex_accessportselector
+ leaf_interface_profile: fexintprftest
+ register: accessport_to_intf_idempotent_fex
+
+- name: Bind an Interface Access Port Selector to an Interface Policy Fex Profile with a Policy Group - update works
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ policy_group: anstest_fex_policygroupname
+ access_port_selector: anstest_fex_accessportselector
+ type: fex
+ leaf_interface_profile: fexintprftest
+ register: accessport_to_intf_update_fex
+
+# TODO: also test for errors
+- name: present assertions
+ assert:
+ that:
+ - accessport_to_intf_check_mode_present is changed
+ - accessport_to_intf_present is changed
+ - accessport_to_intf_present.previous == []
+ - accessport_to_intf_present.sent.infraHPortS.attributes.name == 'anstest_accessportselector'
+ - accessport_to_intf_idempotent is not changed
+ - accessport_to_intf_idempotent.sent == {}
+ - accessport_to_intf_update is changed
+ - accessport_to_intf_update.sent.infraHPortS.attributes == {}
+ - accessport_to_intf_update.sent.infraHPortS.children[0].infraRsAccBaseGrp.attributes.tDn == 'uni/infra/funcprof/accportgrp-anstest_policygroupname'
+ - accessport_to_intf_present_fex is changed
+ - accessport_to_intf_present_fex.previous == []
+ - accessport_to_intf_present_fex.sent.infraHPortS.attributes.name == 'anstest_fex_accessportselector'
+ - accessport_to_intf_idempotent_fex is not changed
+ - accessport_to_intf_idempotent_fex.sent == {}
+ - accessport_to_intf_update_fex is changed
+ - accessport_to_intf_update_fex.sent.infraHPortS.children[0].infraRsAccBaseGrp.attributes.tDn == 'uni/infra/funcprof/accportgrp-anstest_fex_policygroupname'
+
+- name: Query Specific access_port_selector and leaf_interface_profile binding
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_present
+ access_port_selector: anstest_accessportselector # "{{ fake_var | default(omit) }}" ?
+ state: query
+ register: binding_query
+
+- name: Query Specific access_port_selector and fex_interface_profile binding
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_present
+ type: fex
+ access_port_selector: anstest_fex_accessportselector
+ leaf_interface_profile: fexintprftest
+ state: query
+ register: binding_query_fex
+
+- name: present assertions
+ assert:
+ that:
+ - binding_query is not changed
+ - binding_query_fex is not changed
+ - binding_query.current | length >= 1
+ - '"api/mo/uni/infra/accportprof-leafintprftest/hports-anstest_accessportselector-typ-range.json" in binding_query.url'
+
+- name: Remove binding of interface access port selector and Interface Policy Leaf Profile - check mode
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_absent
+ check_mode: yes
+ register: accessport_to_intf_check_mode_absent
+
+- name: Remove binding of interface access port selector and Interface Policy Leaf Profile - delete works
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_absent
+ register: accessport_to_intf_absent
+
+- name: Remove binding of interface access port selector and Interface Policy Leaf Profile - idempotency works
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_absent
+ register: accessport_to_intf_absent_idempotent
+
+- name: Remove binding of interface access port selector and Interface Policy Fex Profile
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_absent
+ type: fex
+ access_port_selector: anstest_fex_accessportselector
+ leaf_interface_profile: fexintprftest
+ state: absent
+ register: accessport_to_intf_absent_fex
+
+- name: absent assertions
+ assert:
+ that:
+ - accessport_to_intf_check_mode_absent is changed
+ - accessport_to_intf_absent_fex is changed
+ - accessport_to_intf_absent is changed
+ - accessport_to_intf_absent_idempotent is not changed
+
+- name: Remove Interface policy fex profile - Cleanup
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_absent
+
+- name: Remove Interface policy fex profile - Cleanup
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_absent
+ type: fex
+ leaf_interface_profile: fexintprftest
+ state: absent \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_sub_port_block_to_access_port/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_sub_port_block_to_access_port/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_sub_port_block_to_access_port/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_sub_port_block_to_access_port/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_sub_port_block_to_access_port/tasks/main.yml
new file mode 100644
index 00000000..51a53e9b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_access_sub_port_block_to_access_port/tasks/main.yml
@@ -0,0 +1,141 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Ensuring Interface Policy Leaf profile exists for kick off
+ cisco.aci.aci_interface_policy_leaf_profile: &aci_interface_policy_leaf_profile_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: present
+ leaf_interface_profile: leafintprftest
+ register: leaf_profile_present
+
+- name: Ensure Interface Access Port Selector exists for kick of
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile: &aci_access_port_to_interface_policy_leaf_profile_present
+ <<: *aci_interface_policy_leaf_profile_present
+ access_port_selector: anstest_accessportselector
+
+# TODO: Ensure that leaf Policy Group Exists (module missing) (infra:AccPortGrp)
+
+- name: Bind an Access Sub Port Block to an Interface Access Port Selector - check mode works
+ cisco.aci.aci_access_sub_port_block_to_access_port: &aci_access_sub_port_block_to_access_port_present
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ leaf_port_blk: anstest_leafportblkname
+ leaf_port_blk_description: anstest_leafportblkdesc
+ fromPort: 13
+ toPort: 13
+ fromSubPort: 1
+ toSubPort: 3
+ check_mode: yes
+ register: accesssubportblock_to_accessport_check_mode_present
+
+- name: Bind an Access Sub Port Block to an Interface Access Port Selector - creation works
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ <<: *aci_access_sub_port_block_to_access_port_present
+ register: accesssubportblock_to_accessport_present
+
+- name: Bind an Access Sub Port Block to an Interface Access Port Selector - idempotency works
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ <<: *aci_access_sub_port_block_to_access_port_present
+ register: accesssubportblock_to_accessport_idempotent
+
+- name: Bind an Access Sub Port Block to an Interface Access Port Selector - update works
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ <<: *aci_access_sub_port_block_to_access_port_present
+ toSubPort: 2
+ register: accesssubportblock_to_accessport_update
+
+# TODO: also test for errors
+- name: present assertions
+ assert:
+ that:
+ - accesssubportblock_to_accessport_check_mode_present is changed
+ - accesssubportblock_to_accessport_present is changed
+ - accesssubportblock_to_accessport_present.previous == []
+ - accesssubportblock_to_accessport_present.sent.infraSubPortBlk.attributes.descr == 'anstest_leafportblkdesc'
+ - accesssubportblock_to_accessport_present.sent.infraSubPortBlk.attributes.name == 'anstest_leafportblkname'
+ - accesssubportblock_to_accessport_present.sent.infraSubPortBlk.attributes.fromPort == accesssubportblock_to_accessport_present.sent.infraSubPortBlk.attributes.toPort == '13'
+ - accesssubportblock_to_accessport_present.sent.infraSubPortBlk.attributes.fromSubPort == '1'
+ - accesssubportblock_to_accessport_present.sent.infraSubPortBlk.attributes.toSubPort == '3'
+ - accesssubportblock_to_accessport_idempotent is not changed
+ - accesssubportblock_to_accessport_idempotent.sent == {}
+ - accesssubportblock_to_accessport_update is changed
+ - accesssubportblock_to_accessport_update.sent.infraSubPortBlk.attributes.toSubPort == '2'
+
+
+- name: Query Specific sub port block and access_port_selector binding
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ <<: *aci_access_sub_port_block_to_access_port_present
+ state: query
+ register: binding_query
+
+- name: present assertions
+ assert:
+ that:
+ - binding_query is not changed
+ - binding_query.current | length >= 1
+ - '"api/mo/uni/infra/accportprof-leafintprftest/hports-anstest_accessportselector-typ-range/subportblk-anstest_leafportblkname.json" in binding_query.url'
+
+- name: Remove binding of Access Sub Port Block and Interface Access Port Selector - check mode
+ cisco.aci.aci_access_sub_port_block_to_access_port: &aci_access_sub_port_block_to_access_port_absent
+ <<: *aci_access_sub_port_block_to_access_port_present
+ state: absent
+ check_mode: yes
+ register: accesssubportblock_to_accessport_check_mode_absent
+
+- name: Remove binding of Access Sub Port Block and Interface Access Port Selector - delete works
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ <<: *aci_access_sub_port_block_to_access_port_absent
+ register: accesssubportblock_to_accessport_absent
+
+- name: Remove binding of Access Sub Port Block and Interface Access Port Selector - idempotency works
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ <<: *aci_access_sub_port_block_to_access_port_absent
+ register: accesssubportblock_to_accessport_absent_idempotent
+
+- name: Remove binding of Access Sub Port Block and Interface Access Port Selector - check mode
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ #leaf_port_blk: anstest_leafportblkname
+ state: absent
+ ignore_errors: yes
+ register: accesssubportblock_to_accessport_absent_missing_param
+
+- name: absent assertions
+ assert:
+ that:
+ - accesssubportblock_to_accessport_check_mode_absent is changed
+ - accesssubportblock_to_accessport_check_mode_absent.previous != []
+ - accesssubportblock_to_accessport_absent is changed
+ - accesssubportblock_to_accessport_absent.previous == accesssubportblock_to_accessport_check_mode_absent.previous
+ - accesssubportblock_to_accessport_absent_idempotent is not changed
+ - accesssubportblock_to_accessport_absent_idempotent.previous == []
+ - accesssubportblock_to_accessport_absent_missing_param is failed
+ - 'accesssubportblock_to_accessport_absent_missing_param.msg == "state is absent but all of the following are missing: leaf_port_blk"'
+
+
+- name: Remove binding of Access Sub Port Block and Interface Access Port Selector - Clean up
+ cisco.aci.aci_access_sub_port_block_to_access_port:
+ <<: *aci_access_sub_port_block_to_access_port_present
+ state: absent
+
+- name: Remove Interface Access Port Selector - Cleanup
+ cisco.aci.aci_access_port_to_interface_policy_leaf_profile:
+ <<: *aci_access_port_to_interface_policy_leaf_profile_present
+ state: absent
+
+- name: Remove Interface policy leaf profile - Cleanup
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_present
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep/tasks/main.yml
new file mode 100644
index 00000000..90e17f38
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep/tasks/main.yml
@@ -0,0 +1,331 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Remove AEP
+ cisco.aci.aci_aep: &aep_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aep: '{{ item }}'
+ state: absent
+ loop:
+ - ansible_test
+ - ansible_test2
+ - ansible_test3
+
+# ADD AEP
+- name: Add AEP (check_mode)
+ cisco.aci.aci_aep: &aep_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aep: ansible_test
+ infra_vlan: true
+ state: present
+ check_mode: yes
+ register: cm_add_aep
+
+- name: Add AEP (normal mode)
+ cisco.aci.aci_aep: *aep_present
+ register: nm_add_aep
+
+- name: Add another AEP (normal mode)
+ cisco.aci.aci_aep:
+ <<: *aep_present
+ aep: ansible_test2
+ infra_vlan: true
+ register: nm_add_aep2
+
+- name: Add another AEP (normal mode)
+ cisco.aci.aci_aep:
+ <<: *aep_present
+ aep: ansible_test3
+ infra_vlan: false
+ register: nm_add_aep3
+
+- name: Verify add_aep
+ assert:
+ that:
+ - cm_add_aep is changed
+ - nm_add_aep is changed
+ - nm_add_aep2 is changed
+ - nm_add_aep3 is changed
+ - nm_add_aep.previous == nm_add_aep.previous == cm_add_aep.current == []
+ - nm_add_aep.current[0].infraAttEntityP.attributes.dn == 'uni/infra/attentp-ansible_test'
+ - nm_add_aep.current[0].infraAttEntityP.attributes.name == 'ansible_test'
+ - cm_add_aep.proposed.infraAttEntityP.attributes.name == nm_add_aep.proposed.infraAttEntityP.attributes.name == cm_add_aep.sent.infraAttEntityP.attributes.name == nm_add_aep.sent.infraAttEntityP.attributes.name == 'ansible_test'
+ - nm_add_aep2.current[0].infraAttEntityP.children[0].infraProvAcc.attributes.name == 'provacc'
+ - nm_add_aep3.current[0].infraAttEntityP | length == 1
+
+- name: Change AEP infra(normal mode)
+ cisco.aci.aci_aep:
+ <<: *aep_present
+ aep: ansible_test2
+ infra_vlan: false
+ register: nm_add_aep_true_to_false
+
+- name: Change AEP infra again(normal mode)
+ cisco.aci.aci_aep:
+ <<: *aep_present
+ aep: ansible_test2
+ infra_vlan: false
+ register: nm_add_aep_true_to_false_again
+
+- name: Add AEP again (check_mode)
+ cisco.aci.aci_aep: *aep_present
+ check_mode: yes
+ register: cm_add_aep_again
+
+- name: Add AEP again (normal mode)
+ cisco.aci.aci_aep: *aep_present
+ register: nm_add_aep_again
+
+- name: Verify add_aep_again
+ assert:
+ that:
+ - cm_add_aep_again is not changed
+ - nm_add_aep_again is not changed
+ - nm_add_aep_again is not changed
+ - nm_add_aep_again.previous[0].infraAttEntityP.attributes.dn == nm_add_aep_again.previous[0].infraAttEntityP.attributes.dn == cm_add_aep_again.current[0].infraAttEntityP.attributes.dn == nm_add_aep_again.current[0].infraAttEntityP.attributes.dn == 'uni/infra/attentp-ansible_test'
+ - nm_add_aep_again.previous[0].infraAttEntityP.attributes.name == nm_add_aep_again.previous[0].infraAttEntityP.attributes.name == cm_add_aep_again.current[0].infraAttEntityP.attributes.name == nm_add_aep_again.current[0].infraAttEntityP.attributes.name == 'ansible_test'
+ - cm_add_aep_again.proposed.infraAttEntityP.attributes.name == nm_add_aep_again.proposed.infraAttEntityP.attributes.name == 'ansible_test'
+ - cm_add_aep_again.sent == nm_add_aep_again.sent == {}
+ - nm_add_aep_true_to_false.current[0].infraAttEntityP | length == 1
+ - nm_add_aep_true_to_false_again.current[0].infraAttEntityP | length == 1
+
+# CHANGE AEP
+- name: Change description of AEP (check_mode)
+ cisco.aci.aci_aep:
+ <<: *aep_present
+ description: Ansible test AEP
+ check_mode: yes
+ register: cm_add_aep_descr
+
+- name: Change description of AEP (normal mode)
+ cisco.aci.aci_aep:
+ <<: *aep_present
+ description: Ansible test AEP
+ register: nm_add_aep_descr
+
+- name: Verify add_aep_descr
+ assert:
+ that:
+ - cm_add_aep_descr is changed
+ - nm_add_aep_descr is changed
+ - cm_add_aep_descr.proposed.infraAttEntityP.attributes.descr == nm_add_aep_descr.proposed.infraAttEntityP.attributes.descr == 'Ansible test AEP'
+ - cm_add_aep_descr.proposed.infraAttEntityP.attributes.name == nm_add_aep_descr.proposed.infraAttEntityP.attributes.name == 'ansible_test'
+ - cm_add_aep_descr.sent.infraAttEntityP.attributes.descr == nm_add_aep_descr.sent.infraAttEntityP.attributes.descr == 'Ansible test AEP'
+ - cm_add_aep_descr.previous.0.infraAttEntityP.attributes.dn == nm_add_aep_descr.previous.0.infraAttEntityP.attributes.dn == cm_add_aep_descr.current.0.infraAttEntityP.attributes.dn == 'uni/infra/attentp-ansible_test'
+ - cm_add_aep_descr.previous.0.infraAttEntityP.attributes.name == nm_add_aep_descr.previous.0.infraAttEntityP.attributes.name == cm_add_aep_descr.current.0.infraAttEntityP.attributes.name == 'ansible_test'
+ - nm_add_aep_descr.current.0.infraAttEntityP.attributes.descr == 'Ansible test AEP'
+ - nm_add_aep_descr.current.0.infraAttEntityP.attributes.dn == 'uni/infra/attentp-ansible_test'
+ - nm_add_aep_descr.current.0.infraAttEntityP.attributes.name == 'ansible_test'
+
+- name: Change description of AEP again (check_mode)
+ cisco.aci.aci_aep:
+ <<: *aep_present
+ description: Ansible test AEP
+ check_mode: yes
+ register: cm_add_aep_descr_again
+
+- name: Change description of AEP again (normal mode)
+ cisco.aci.aci_aep:
+ <<: *aep_present
+ description: Ansible test AEP
+ register: nm_add_aep_descr_again
+
+- name: Verify add_aep_descr_again
+ assert:
+ that:
+ - cm_add_aep_descr_again is not changed
+ - nm_add_aep_descr_again is not changed
+ - cm_add_aep_descr_again.proposed.infraAttEntityP.attributes.descr == nm_add_aep_descr_again.proposed.infraAttEntityP.attributes.descr == 'Ansible test AEP'
+ - cm_add_aep_descr_again.proposed.infraAttEntityP.attributes.name == nm_add_aep_descr_again.proposed.infraAttEntityP.attributes.name == 'ansible_test'
+ - cm_add_aep_descr_again.sent == nm_add_aep_descr_again.sent == {}
+ - cm_add_aep_descr_again.previous[0].infraAttEntityP.attributes.descr == nm_add_aep_descr_again.previous[0].infraAttEntityP.attributes.descr == cm_add_aep_descr_again.current[0].infraAttEntityP.attributes.descr == nm_add_aep_descr_again.current[0].infraAttEntityP.attributes.descr == 'Ansible test AEP'
+ - cm_add_aep_descr_again.previous[0].infraAttEntityP.attributes.dn == nm_add_aep_descr_again.previous[0].infraAttEntityP.attributes.dn == cm_add_aep_descr_again.current[0].infraAttEntityP.attributes.dn == nm_add_aep_descr_again.current[0].infraAttEntityP.attributes.dn == 'uni/infra/attentp-ansible_test'
+ - cm_add_aep_descr_again.previous[0].infraAttEntityP.attributes.name == nm_add_aep_descr_again.previous[0].infraAttEntityP.attributes.name == cm_add_aep_descr_again.current[0].infraAttEntityP.attributes.name == nm_add_aep_descr_again.current[0].infraAttEntityP.attributes.name == 'ansible_test'
+
+
+# ADD AEP AGAIN
+- name: Add AEP again with no description (check_mode)
+ cisco.aci.aci_aep: *aep_present
+ check_mode: yes
+ register: cm_add_aep_again_no_descr
+
+- name: Add AEP again with no description (normal mode)
+ cisco.aci.aci_aep: *aep_present
+ register: nm_add_aep_again_no_descr
+
+- name: Verify add_aep_again_no_descr
+ assert:
+ that:
+ - cm_add_aep_again_no_descr is not changed
+ - nm_add_aep_again_no_descr is not changed
+ - cm_add_aep_again_no_descr.proposed.infraAttEntityP.attributes.name == nm_add_aep_again_no_descr.proposed.infraAttEntityP.attributes.name == 'ansible_test'
+ - cm_add_aep_again_no_descr.sent == nm_add_aep_again_no_descr.sent == {}
+ - cm_add_aep_again_no_descr.previous[0].infraAttEntityP.attributes.descr == nm_add_aep_again_no_descr.previous[0].infraAttEntityP.attributes.descr == cm_add_aep_again_no_descr.current[0].infraAttEntityP.attributes.descr == nm_add_aep_again_no_descr.current[0].infraAttEntityP.attributes.descr == 'Ansible test AEP'
+ - cm_add_aep_again_no_descr.previous[0].infraAttEntityP.attributes.dn == nm_add_aep_again_no_descr.previous[0].infraAttEntityP.attributes.dn == cm_add_aep_again_no_descr.current[0].infraAttEntityP.attributes.dn == nm_add_aep_again_no_descr.current[0].infraAttEntityP.attributes.dn == 'uni/infra/attentp-ansible_test'
+ - cm_add_aep_again_no_descr.previous[0].infraAttEntityP.attributes.name == nm_add_aep_again_no_descr.previous[0].infraAttEntityP.attributes.name == cm_add_aep_again_no_descr.current[0].infraAttEntityP.attributes.name == nm_add_aep_again_no_descr.current[0].infraAttEntityP.attributes.name == 'ansible_test'
+
+
+# QUERY ALL AEPS
+- name: Query all AEPs (check_mode)
+ cisco.aci.aci_aep: &aep_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_aeps
+
+- name: Query all AEPs (normal mode)
+ cisco.aci.aci_aep: *aep_query
+ register: nm_query_all_aeps
+
+- name: Verify query_all_aeps
+ assert:
+ that:
+ - cm_query_all_aeps is not changed
+ - nm_query_all_aeps is not changed
+ - cm_query_all_aeps == nm_query_all_aeps
+ - nm_query_all_aeps.current|length >= 1
+
+
+# QUERY A AEP
+- name: Query our AEP
+ cisco.aci.aci_aep:
+ <<: *aep_query
+ aep: ansible_test
+ check_mode: yes
+ register: cm_query_aep
+
+- name: Query our AEP
+ cisco.aci.aci_aep:
+ <<: *aep_query
+ aep: ansible_test
+ register: nm_query_aep
+
+- name: Verify query_aep
+ assert:
+ that:
+ - cm_query_aep is not changed
+ - nm_query_aep is not changed
+ - cm_query_aep == nm_query_aep
+ - nm_query_aep.current.0.infraAttEntityP.attributes.descr == "Ansible test AEP"
+ - nm_query_aep.current.0.infraAttEntityP.attributes.dn == "uni/infra/attentp-ansible_test"
+ - nm_query_aep.current.0.infraAttEntityP.attributes.name == "ansible_test"
+
+
+# REMOVE AEP
+- name: Remove AEP (check_mode)
+ cisco.aci.aci_aep:
+ <<: *aep_absent
+ aep: ansible_test
+ check_mode: yes
+ register: cm_remove_aep
+
+- name: Remove AEP (normal mode)
+ cisco.aci.aci_aep:
+ <<: *aep_absent
+ aep: ansible_test
+ register: nm_remove_aep
+
+- name: Verify remove_aep
+ assert:
+ that:
+ - cm_remove_aep is changed
+ - nm_remove_aep is changed
+ - cm_remove_aep.proposed == nm_remove_aep.proposed == {}
+ - cm_remove_aep.sent == nm_remove_aep.sent == {}
+ - cm_remove_aep.previous[0].infraAttEntityP.attributes.name == nm_remove_aep.previous[0].infraAttEntityP.attributes.name == cm_remove_aep.current[0].infraAttEntityP.attributes.name == 'ansible_test'
+ - cm_remove_aep.previous[0].infraAttEntityP.attributes.descr == nm_remove_aep.previous[0].infraAttEntityP.attributes.descr == cm_remove_aep.current[0].infraAttEntityP.attributes.descr == 'Ansible test AEP'
+ - cm_remove_aep.previous[0].infraAttEntityP.attributes.dn == nm_remove_aep.previous[0].infraAttEntityP.attributes.dn == cm_remove_aep.current[0].infraAttEntityP.attributes.dn == 'uni/infra/attentp-ansible_test'
+ - nm_remove_aep.current == []
+
+- name: Remove AEP again (check_mode)
+ cisco.aci.aci_aep:
+ <<: *aep_absent
+ aep: ansible_test
+ check_mode: yes
+ register: cm_remove_aep_again
+
+- name: Remove AEP again (normal mode)
+ cisco.aci.aci_aep:
+ <<: *aep_absent
+ aep: ansible_test
+ register: nm_remove_aep_again
+
+- name: Verify remove_aep_again
+ assert:
+ that:
+ - cm_remove_aep_again is not changed
+ - nm_remove_aep_again is not changed
+ - cm_remove_aep_again.proposed == nm_remove_aep_again.proposed == {}
+ - cm_remove_aep_again.sent == nm_remove_aep_again.sent == {}
+ - cm_remove_aep_again.previous == nm_remove_aep_again.previous == cm_remove_aep_again.current == nm_remove_aep_again.current == []
+
+
+# QUERY NON-EXISTING AEP
+- name: Query non-existing AEP (check_mode)
+ cisco.aci.aci_aep:
+ <<: *aep_query
+ aep: ansible_test
+ check_mode: yes
+ register: cm_query_non_aep
+
+- name: Query non-existing AEP (normal mode)
+ cisco.aci.aci_aep:
+ <<: *aep_query
+ aep: ansible_test
+ register: nm_query_non_aep
+
+- name: Verify query_non_aep
+ assert:
+ that:
+ - cm_query_non_aep is not changed
+ - nm_query_non_aep is not changed
+ - cm_query_non_aep == nm_query_non_aep
+ - cm_query_non_aep.current == nm_query_non_aep.current == []
+
+
+# PROVOKE ERRORS
+- name: Error when required parameter is missing
+ cisco.aci.aci_aep:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: present
+ ignore_errors: yes
+ register: error_on_missing_required_param
+
+- name: Verify error_on_missing_required_param
+ assert:
+ that:
+ - error_on_missing_required_param is failed
+ - 'error_on_missing_required_param.msg == "state is present but all of the following are missing: aep"'
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep_to_domain/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep_to_domain/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep_to_domain/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep_to_domain/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep_to_domain/tasks/main.yml
new file mode 100644
index 00000000..09000b9c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_aep_to_domain/tasks/main.yml
@@ -0,0 +1,212 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove AEP to domain binding
+ cisco.aci.aci_aep_to_domain: &binding_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aep: test_aep
+ domain: phys_dom
+ domain_type: phys
+ state: absent
+
+- name: Create AEP
+ cisco.aci.aci_aep:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aep: test_aep
+ description: Test AEP
+ state: present
+
+- name: Create physical domain
+ cisco.aci.aci_domain:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: phys_dom
+ domain_type: phys
+ state: present
+
+
+# ADD BINDING
+- name: Add AEP to domain binding (check_mode)
+ cisco.aci.aci_aep_to_domain: &binding_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ aep: test_aep
+ domain: phys_dom
+ domain_type: phys
+ state: present
+ check_mode: yes
+ register: cm_add_binding
+
+- name: Add AEP to domain binding (normal mode)
+ cisco.aci.aci_aep_to_domain: *binding_present
+ register: nm_add_binding
+
+- name: Verify add_binding
+ assert:
+ that:
+ - cm_add_binding is changed
+ - nm_add_binding is changed
+ - cm_add_binding.sent.infraRsDomP.attributes.tDn == nm_add_binding.sent.infraRsDomP.attributes.tDn == 'uni/phys-phys_dom'
+ - cm_add_binding.proposed.infraRsDomP.attributes.tDn == nm_add_binding.proposed.infraRsDomP.attributes.tDn == 'uni/phys-phys_dom'
+ - cm_add_binding.current == cm_add_binding.previous == nm_add_binding.previous == []
+ - nm_add_binding.current[0].infraRsDomP.attributes.dn == 'uni/infra/attentp-test_aep/rsdomP-[uni/phys-phys_dom]'
+ - nm_add_binding.current[0].infraRsDomP.attributes.tDn == 'uni/phys-phys_dom'
+
+- name: Add AEP to domain binding again (check_mode)
+ cisco.aci.aci_aep_to_domain: *binding_present
+ check_mode: yes
+ register: cm_add_binding_again
+
+- name: Add AEP to domain binding again (normal mode)
+ cisco.aci.aci_aep_to_domain: *binding_present
+ register: nm_add_binding_again
+
+- name: Verify add_binding_again
+ assert:
+ that:
+ - cm_add_binding_again is not changed
+ - nm_add_binding_again is not changed
+
+
+# QUERY ALL BINDINGS
+- name: Query all AEP to domain bindings (check_mode)
+ cisco.aci.aci_aep_to_domain: &binding_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_bindings
+
+- name: Query all AEP to domain bindings (normal mode)
+ cisco.aci.aci_aep_to_domain: *binding_query
+ register: nm_query_all_bindings
+
+- name: Verify query_all_bindings
+ assert:
+ that:
+ - cm_query_all_bindings is not changed
+ - nm_query_all_bindings is not changed
+ - cm_query_all_bindings == nm_query_all_bindings
+ - nm_query_all_bindings.current|length >= 1
+
+
+# QUERY A BINDING
+- name: Query our AEP to domain binding (check_mode)
+ cisco.aci.aci_aep_to_domain:
+ <<: *binding_query
+ aep: test_aep
+ domain: phys_dom
+ domain_type: phys
+ check_mode: yes
+ register: cm_query_binding
+
+- name: Query our AEP to domain binding (normal mode)
+ cisco.aci.aci_aep_to_domain:
+ <<: *binding_query
+ aep: test_aep
+ domain: phys_dom
+ domain_type: phys
+ register: nm_query_binding
+
+- name: Verify query_binding
+ assert:
+ that:
+ - cm_query_binding is not changed
+ - nm_query_binding is not changed
+ - cm_query_binding == nm_query_binding
+ - nm_query_binding.current.0.infraRsDomP.attributes.dn == 'uni/infra/attentp-test_aep/rsdomP-[uni/phys-phys_dom]'
+ - nm_query_binding.current.0.infraRsDomP.attributes.tCl == 'physDomP'
+ - nm_query_binding.current.0.infraRsDomP.attributes.tDn == 'uni/phys-phys_dom'
+
+
+# REMOVE BINDING
+- name: Remove AEP to domain binding (check_mode)
+ cisco.aci.aci_aep_to_domain: *binding_absent
+ check_mode: yes
+ register: cm_remove_binding
+
+- name: Remove AEP to domain binding (normal mode)
+ cisco.aci.aci_aep_to_domain: *binding_absent
+ register: nm_remove_binding
+
+- name: Verify remove_binding
+ assert:
+ that:
+ - cm_remove_binding is changed
+ - nm_remove_binding is changed
+ - cm_remove_binding.current.0.infraRsDomP.attributes.dn == cm_remove_binding.previous.0.infraRsDomP.attributes.dn == nm_remove_binding.previous.0.infraRsDomP.attributes.dn == 'uni/infra/attentp-test_aep/rsdomP-[uni/phys-phys_dom]'
+ - cm_remove_binding.current.0.infraRsDomP.attributes.tDn == cm_remove_binding.previous.0.infraRsDomP.attributes.tDn == nm_remove_binding.previous.0.infraRsDomP.attributes.tDn == 'uni/phys-phys_dom'
+ - nm_remove_binding.current == []
+
+- name: Remove AEP to domain binding again (check_mode)
+ cisco.aci.aci_aep_to_domain: *binding_absent
+ check_mode: yes
+ register: cm_remove_binding_again
+
+- name: Remove AEP to domain binding again (normal mode)
+ cisco.aci.aci_aep_to_domain: *binding_absent
+ register: nm_remove_binding_again
+
+- name: Verify remove_binding_again
+ assert:
+ that:
+ - cm_remove_binding_again is not changed
+ - nm_remove_binding_again is not changed
+
+
+# QUERY NON-EXISTING BINDING
+- name: Query non-existing AEP to domain binding (check_mode)
+ cisco.aci.aci_aep_to_domain:
+ <<: *binding_query
+ aep: test_aep
+ domain: phys_dom
+ domain_type: phys
+ check_mode: yes
+ register: cm_query_non_binding
+
+- name: Query non-existing AEP to domain binding (normal mode)
+ cisco.aci.aci_aep_to_domain:
+ <<: *binding_query
+ aep: test_aep
+ domain: phys_dom
+ domain_type: phys
+ register: nm_query_non_binding
+
+- name: Verify query_non_binding
+ assert:
+ that:
+ - cm_query_non_binding is not changed
+ - nm_query_non_binding is not changed
+ - cm_query_non_binding == nm_query_non_binding
+ - nm_query_non_binding.current == []
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_ap/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_ap/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_ap/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_ap/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_ap/tasks/main.yml
new file mode 100644
index 00000000..104b620e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_ap/tasks/main.yml
@@ -0,0 +1,190 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+# Copyright: (c) 2020, Shreyas Srish (@shrsr)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: present
+ tenant: anstest
+ register: tenant_present
+
+- name: ensure monitoring policy exists
+ cisco.aci.aci_epg_monitoring_policy:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ monitoring_policy: check
+ tenant: anstest
+
+- name: ensure ap does not exist initially
+ cisco.aci.aci_ap:
+ <<: *aci_tenant_present
+ ap: anstest
+ state: absent
+
+- name: create ap - check mode works
+ cisco.aci.aci_ap: &aci_ap_present
+ <<: *aci_tenant_present
+ ap: anstest
+ description: Ansible Test
+ monitoring_policy: check
+ check_mode: yes
+ register: ap_present_check_mode
+
+- name: create ap - creation works
+ cisco.aci.aci_ap:
+ <<: *aci_ap_present
+ register: ap_present
+
+- name: create ap - extra for query
+ cisco.aci.aci_ap:
+ <<: *aci_tenant_present
+ ap: anstest2
+
+- name: create ap - idempotency works
+ cisco.aci.aci_ap:
+ <<: *aci_ap_present
+ register: ap_present_idempotent
+
+- name: update ap - update works
+ cisco.aci.aci_ap:
+ <<: *aci_ap_present
+ description: Ansible Test Update
+ register: ap_present_update
+
+- name: create ap - creation works
+ cisco.aci.aci_ap:
+ <<: *aci_tenant_present
+ ignore_errors: yes
+ register: ap_present_missing_param
+
+- name: present asserts
+ assert:
+ that:
+ - ap_present_check_mode is changed
+ - ap_present is changed
+ - ap_present.previous == []
+ - ap_present.current.0.fvAp.children.0.fvRsApMonPol.attributes.tnMonEPGPolName == 'check'
+ - ap_present.sent == ap_present_check_mode.sent
+ - ap_present.sent.fvAp.attributes.descr == 'Ansible Test'
+ - ap_present.sent.fvAp.attributes.name == 'anstest'
+ - ap_present_idempotent is not changed
+ - ap_present_idempotent.previous != []
+ - ap_present_idempotent.sent == {}
+ - ap_present_update is changed
+ - ap_present_update.sent.fvAp.attributes.descr == 'Ansible Test Update'
+ - ap_present_missing_param is failed
+ - 'ap_present_missing_param.msg == "state is present but all of the following are missing: ap"'
+
+- name: get ap - query specific ap
+ cisco.aci.aci_ap: &aci_ap_query
+ <<: *aci_ap_present
+ state: query
+ register: query_ap
+
+- name: get all ap for tenant - query tenant aps
+ cisco.aci.aci_ap:
+ <<: *aci_ap_query
+ ap: "{{ fakevar | default(omit) }}"
+ register: query_ap_tenant
+
+- name: get all ap by name - query ap name
+ cisco.aci.aci_ap:
+ <<: *aci_ap_query
+ tenant: "{{ fakevar | default(omit) }}"
+ register: query_ap_ap
+
+- name: get all aps - query general
+ cisco.aci.aci_ap:
+ <<: *aci_ap_query
+ tenant: "{{ fakevar | default(omit) }}"
+ ap: "{{ fakevar | default(omit) }}"
+ register: query_all
+
+- name: query assertions
+ assert:
+ that:
+ - query_ap is not changed
+ - query_ap.current | length == 1
+ - query_ap.current.0.fvAp.attributes.name == "anstest"
+ - query_ap.current.0.fvAp.children.0.fvRsApMonPol.attributes.tnMonEPGPolName == 'check'
+ - '"tn-anstest/ap-anstest.json" in query_ap.url'
+ - query_ap_tenant is not changed
+ - query_ap_tenant.current | length == 1
+ - query_ap_tenant.current.0.fvTenant.children | length == 2
+ - '"rsp-subtree-class=fvAp" in query_ap_tenant.filter_string'
+ - '"tn-anstest.json" in query_ap_tenant.url'
+ - query_ap_ap is not changed
+ - query_ap_ap.current != []
+ - query_ap_ap.current.0.fvAp is defined
+ - '"query-target-filter=eq(fvAp.name,\"anstest\")" in query_ap_ap.filter_string'
+ - '"class/fvAp.json" in query_ap_ap.url'
+ - query_all is not changed
+ - query_all.current | length > 1
+ - '"class/fvAp.json" in query_all.url'
+
+- name: delete ap - check_mode works
+ cisco.aci.aci_ap: &aci_ap_absent
+ <<: *aci_ap_present
+ state: absent
+ check_mode: yes
+ register: ap_delete_check_mode
+
+- name: delete ap - delete works
+ cisco.aci.aci_ap:
+ <<: *aci_ap_absent
+ register: ap_delete
+
+- name: delete ap - delete idempotency works
+ cisco.aci.aci_ap:
+ <<: *aci_ap_absent
+ register: ap_delete_idempotent
+
+- name: delete ap - missing param error
+ cisco.aci.aci_ap:
+ <<: *aci_ap_absent
+ tenant: "{{ fakevar | default(omit) }}"
+ ignore_errors: yes
+ register: ap_delete_missing_param
+
+- name: delete ap remove ap used for query
+ cisco.aci.aci_ap:
+ <<: *aci_ap_absent
+ ap: anstest2
+
+- name: absent assertions
+ assert:
+ that:
+ - ap_delete_check_mode is changed
+ - ap_delete_check_mode.previous != []
+ - '"tn-anstest/ap-anstest.json" in ap_delete_check_mode.url'
+ - ap_delete is changed
+ - ap_delete.previous == ap_delete_check_mode.previous
+ - ap_delete_idempotent is not changed
+ - ap_delete_idempotent.previous == []
+ - ap_delete_missing_param is failed
+ - 'ap_delete_missing_param.msg == "state is absent but all of the following are missing: tenant"'
+
+- name: delete tenant - cleanup before ending tests
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_present
+ state: absent
+ when: tenant_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd/tasks/main.yml
new file mode 100644
index 00000000..2d5df49b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd/tasks/main.yml
@@ -0,0 +1,213 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: present
+ tenant: anstest
+ register: tenant_present
+
+- name: ensure vrf exists for tests to kick off
+ cisco.aci.aci_vrf: &aci_vrf_present
+ <<: *aci_tenant_present
+ vrf: anstest
+ register: vrf_present
+
+- name: ensure bd anstest does not exist
+ cisco.aci.aci_bd:
+ <<: *aci_tenant_present
+ bd: anstest
+ state: absent
+
+- name: ensure bd anstest2 does not exist
+ cisco.aci.aci_bd:
+ <<: *aci_tenant_present
+ bd: anstest2
+ state: absent
+
+- name: create bd - check mode works
+ cisco.aci.aci_bd: &aci_bd_present
+ <<: *aci_tenant_present
+ bd: anstest
+ description: Ansible Test
+ check_mode: yes
+ register: bd_present_check_mode
+
+- name: create bd - creation works
+ cisco.aci.aci_bd:
+ <<: *aci_bd_present
+ register: bd_present
+
+- name: create bd again - idempotency works
+ cisco.aci.aci_bd:
+ <<: *aci_bd_present
+ register: bd_present_idempotent
+
+- name: update bd - update works
+ cisco.aci.aci_bd:
+ <<: *aci_bd_present
+ vrf: anstest
+ description: Ansible Test Update
+ register: bd_update
+
+- name: create another bd - check more params
+ cisco.aci.aci_bd:
+ <<: *aci_bd_present
+ bd: anstest2
+ ip_learning: "no"
+ l2_unknown_unicast: flood
+ l3_unknown_multicast: opt-flood
+ multi_dest: drop
+ enable_routing: "no"
+ arp_flooding: "yes"
+ register: bd_present_2
+
+- name: create bd without all necessary params - failure message works
+ cisco.aci.aci_bd:
+ <<: *aci_bd_present
+ tenant: "{{ fake_var | default(omit) }}"
+ ignore_errors: yes
+ register: bd_present_missing_param
+
+- name: present asserts
+ assert:
+ that:
+ - bd_present_check_mode is changed
+ - bd_present_check_mode.sent.fvBD.attributes.descr == 'Ansible Test'
+ - bd_present_check_mode.sent.fvBD.attributes.name == 'anstest'
+ - bd_present is changed
+ - bd_present.sent == bd_present_check_mode.sent
+ - bd_present.previous == []
+ - bd_present_idempotent is not changed
+ - bd_present_idempotent.previous != []
+ - bd_update is changed
+ - bd_update.previous != []
+ - bd_update.sent != bd_update.proposed
+ - bd_update.sent.fvBD.attributes.descr == 'Ansible Test Update'
+ - bd_update.sent.fvBD.children.0.fvRsCtx.attributes.tnFvCtxName == 'anstest'
+ - bd_present_2.sent.fvBD.attributes.arpFlood == 'yes'
+ - bd_present_2.sent.fvBD.attributes.descr == 'Ansible Test'
+ - bd_present_2.sent.fvBD.attributes.ipLearning == 'no'
+ - bd_present_2.sent.fvBD.attributes.multiDstPktAct == 'drop'
+ - bd_present_2.sent.fvBD.attributes.name == 'anstest2'
+ - bd_present_2.sent.fvBD.attributes.unicastRoute == 'no'
+ - bd_present_2.sent.fvBD.attributes.unkMacUcastAct == 'flood'
+ - bd_present_2.sent.fvBD.attributes.unkMcastAct == 'opt-flood'
+ - bd_present_missing_param is failed
+ - 'bd_present_missing_param.msg == "state is present but all of the following are missing: tenant"'
+
+- name: get all bd
+ cisco.aci.aci_bd: &aci_query
+ <<: *aci_tenant_present
+ state: query
+ tenant: "{{ fake_var | default(omit) }}"
+ register: query_all
+
+- name: get all in tenant
+ cisco.aci.aci_bd:
+ <<: *aci_query
+ tenant: anstest
+ register: query_tenant
+
+- name: get all with name
+ cisco.aci.aci_bd:
+ <<: *aci_query
+ bd: anstest
+ register: query_bd_bd
+
+- name: get bd
+ cisco.aci.aci_bd:
+ <<: *aci_bd_present
+ state: query
+ register: query_bd
+
+- name: query asserts
+ assert:
+ that:
+ - query_all is not changed
+ - query_all.current | length > 1
+ - query_all.current.0.fvBD is defined
+ - '"rsp-subtree-class=fvRsBDToNdP,fvRsBdToEpRet,fvRsCtx,fvRsIgmpsn" in query_all.filter_string'
+ - '"class/fvBD.json" in query_all.url'
+ - query_tenant is not changed
+ - query_tenant.current | length == 1
+ - query_tenant.current.0.fvTenant.children | length == 2
+ - '"rsp-subtree-class=fvBD,fvRsBDToNdP,fvRsBdToEpRet,fvRsCtx,fvRsIgmpsn" in query_tenant.filter_string'
+ - '"tn-anstest.json" in query_tenant.url'
+ - query_bd_bd is not changed
+ - query_bd_bd.current != []
+ - '"query-target-filter=eq(fvBD.name,\"anstest\")" in query_bd_bd.filter_string'
+ - '"rsp-subtree-class=fvRsBDToNdP,fvRsBdToEpRet,fvRsCtx,fvRsIgmpsn" in query_bd_bd.filter_string'
+ - '"class/fvBD.json" in query_bd_bd.url'
+ - query_bd is not changed
+ - query_bd.current | length == 1
+ - query_bd.current.0.fvBD.attributes.name == "anstest"
+ - '"rsp-subtree-class=fvRsBDToNdP,fvRsBdToEpRet,fvRsCtx,fvRsIgmpsn" in query_bd.filter_string'
+ - '"tn-anstest/BD-anstest.json" in query_bd.url'
+
+- name: delete bd - check mode works
+ cisco.aci.aci_bd: &aci_bd_absent
+ <<: *aci_bd_present
+ state: absent
+ check_mode: yes
+ register: bd_absent_check_mode
+
+- name: delete bd - delete works
+ cisco.aci.aci_bd:
+ <<: *aci_bd_absent
+ register: bd_absent
+
+- name: delete bd again - idempotency works
+ cisco.aci.aci_bd:
+ <<: *aci_bd_absent
+ register: bd_absent_idempotent
+
+- name: delete bd - cleanup
+ cisco.aci.aci_bd:
+ <<: *aci_bd_absent
+ name: anstest2
+
+- name: delete bd missing param - fails properly
+ cisco.aci.aci_bd:
+ <<: *aci_bd_absent
+ bd: "{{ fakevar | default(omit) }}"
+ ignore_errors: yes
+ register: bd_absent_missing_param
+
+- name: asserts for deletion task
+ assert:
+ that:
+ - bd_absent_check_mode is changed
+ - bd_absent_check_mode.proposed == {}
+ - bd_absent is changed
+ - bd_absent.previous != []
+ - bd_absent_idempotent is not changed
+ - bd_absent_idempotent.previous == []
+ - bd_absent_missing_param is failed
+ - 'bd_absent_missing_param.msg == "state is absent but all of the following are missing: bd"'
+
+- name: delete vrf - cleanup before ending tests
+ cisco.aci.aci_vrf:
+ <<: *aci_vrf_present
+ state: absent
+ when: vrf_present is changed
+
+- name: delete tenant - cleanup before ending tests
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_present
+ state: absent
+ when: tenant_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_dhcp_label/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_dhcp_label/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_dhcp_label/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_dhcp_label/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_dhcp_label/tasks/main.yml
new file mode 100644
index 00000000..8e753180
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_dhcp_label/tasks/main.yml
@@ -0,0 +1,147 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Shreyas Srish (@shrsr)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+
+# CLEAN ENVIRONMENT
+- name: Remove the ansible_tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ state: absent
+
+- name: Add a new tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ description: Ansible tenant
+ state: present
+
+- name: create bd - creation works
+ aci_bd:
+ <<: *aci_info
+ tenant: ansible_tenant
+ bd: database
+ register: bd_present
+
+#CREATE LABELS
+- name: Create a new DHCP Relay Label to a Bridge Domain - check mode
+ aci_bd_dhcp_label:
+ <<: *aci_info
+ tenant: ansible_tenant
+ bd: database
+ dhcp_label: label1
+ owner: infra
+ state: present
+ check_mode: yes
+ register: cm_dhcp_label1
+
+- name: Verify creation of label1 in check mode
+ assert:
+ that:
+ - cm_dhcp_label1 is changed
+ - cm_dhcp_label1.sent.dhcpLbl.attributes.name == 'label1'
+
+- name: Create a new DHCP Relay Label to a Bridge Domain - normal mode
+ aci_bd_dhcp_label:
+ <<: *aci_info
+ tenant: ansible_tenant
+ bd: database
+ dhcp_label: label1
+ owner: infra
+ state: present
+ register: nm_dhcp_label1
+
+- name: Verify creation of label1
+ assert:
+ that:
+ - nm_dhcp_label1 is changed
+ - nm_dhcp_label1.current.0.dhcpLbl.attributes.dn == 'uni/tn-ansible_tenant/BD-database/dhcplbl-label1'
+ - nm_dhcp_label1.current.0.dhcpLbl.attributes.name == 'label1'
+
+- name: Create another DHCP Relay Label to a Bridge Domain - normal mode
+ aci_bd_dhcp_label:
+ <<: *aci_info
+ tenant: ansible_tenant
+ bd: database
+ dhcp_label: label2
+ owner: infra
+ state: present
+ register: nm_dhcp_label2
+
+- name: Verify creation of label2
+ assert:
+ that:
+ - nm_dhcp_label2 is changed
+ - nm_dhcp_label2.current.0.dhcpLbl.attributes.dn == 'uni/tn-ansible_tenant/BD-database/dhcplbl-label2'
+ - nm_dhcp_label2.current.0.dhcpLbl.attributes.name == 'label2'
+
+#QUERY LABELS
+- name: Query a DHCP Relay Label of a Bridge Domain
+ aci_bd_dhcp_label:
+ <<: *aci_info
+ tenant: ansible_tenant
+ bd: database
+ dhcp_label: label1
+ owner: infra
+ state: query
+ register: query_dhcp_label1
+
+- name: Verify query of label
+ assert:
+ that:
+ - query_dhcp_label1 is not changed
+ - query_dhcp_label1.current.0.dhcpLbl.attributes.dn == 'uni/tn-ansible_tenant/BD-database/dhcplbl-label1'
+
+- name: Query all DHCP Relay Labels of a Bridge Domain
+ aci_bd_dhcp_label:
+ <<: *aci_info
+ tenant: ansible_tenant
+ bd: database
+ state: query
+ register: query_all_labels
+
+- name: Verify query all of labels
+ assert:
+ that:
+ - query_all_labels is not changed
+
+#REMOVE LABELS
+- name: Remove a DHCP Relay Label for a Bridge Domain
+ aci_bd_dhcp_label:
+ <<: *aci_info
+ tenant: ansible_tenant
+ bd: database
+ dhcp_label: label1
+ owner: infra
+ state: absent
+ register: delete_dhcp_label
+
+- name: Verify deletion of label
+ assert:
+ that:
+ - delete_dhcp_label is changed
+ - delete_dhcp_label.current == []
+
+# CLEAN ENVIRONMENT AGAIN
+- name: Remove the ansible_tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ state: absent \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_subnet/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_subnet/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_subnet/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_subnet/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_subnet/tasks/main.yml
new file mode 100644
index 00000000..a1545393
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_bd_subnet/tasks/main.yml
@@ -0,0 +1,240 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: present
+ tenant: anstest
+ register: tenant_present
+
+- name: ensure bd exists for tests to kick off
+ cisco.aci.aci_bd: &aci_bd_present
+ <<: *aci_tenant_present
+ bd: anstest
+ register: bd_present
+
+- name: ensure subnet does not exist for tests to kick off
+ cisco.aci.aci_bd_subnet: &aci_subnet_absent
+ <<: *aci_bd_present
+ state: absent
+ gateway: 10.100.100.1
+ mask: 24
+
+- name: ensure subnet does not exist for tests to kick off
+ cisco.aci.aci_bd_subnet: &aci_subnet2_absent
+ <<: *aci_subnet_absent
+ gateway: 10.100.101.1
+ mask: 25
+
+- name: create subnet - check mode works
+ cisco.aci.aci_bd_subnet: &aci_subnet_present
+ <<: *aci_subnet_absent
+ state: present
+ subnet_name: anstest
+ descr: Ansible Test
+ check_mode: yes
+ register: create_check_mode
+
+- name: create subnet - creation works
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet_present
+ register: create_subnet
+
+- name: create new subnet - creation works
+ cisco.aci.aci_bd_subnet: &aci_subnet2_present
+ <<: *aci_subnet2_absent
+ state: present
+ descr: Ansible Test
+ scope: [private, shared]
+ route_profile: default
+ route_profile_l3_out: default
+ register: create_subnet2
+
+- name: create subnet again - idempotency works
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet2_present
+ register: create_idempotency
+
+- name: modify subnet - update works
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet_present
+ scope: [shared, public]
+ subnet_control: querier_ip
+ register: modify_subnet
+
+- name: create subnet with bad scope - failure message works
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet_present
+ scope: [private, public]
+ register: create_bad_scope
+ ignore_errors: yes
+
+- name: create subnet without all necessary params - failure message works
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet_present
+ bd: "{{ fake_var | default(omit) }}"
+ register: create_incomplete_data
+ ignore_errors: yes
+
+- name: asserts for subnet creation tasks
+ assert:
+ that:
+ - create_check_mode is changed
+ - create_check_mode.sent.fvSubnet.attributes.descr == create_subnet.sent.fvSubnet.attributes.descr == 'Ansible Test'
+ - create_check_mode.sent.fvSubnet.attributes.ip == create_subnet.sent.fvSubnet.attributes.ip == '10.100.100.1/24'
+ - create_check_mode.sent.fvSubnet.attributes.name == create_subnet.sent.fvSubnet.attributes.name == 'anstest'
+ - create_subnet is changed
+ - create_subnet.previous == []
+ - create_subnet2 is changed
+ - create_subnet2.sent == create_subnet2.proposed
+ - create_subnet2.sent.fvSubnet.attributes.scope == "private,shared"
+ - create_subnet2.sent.fvSubnet.children.0.fvRsBDSubnetToProfile.attributes.tnL3extOutName == 'default'
+ - create_subnet2.sent.fvSubnet.children.0.fvRsBDSubnetToProfile.attributes.tnRtctrlProfileName == 'default'
+ - create_idempotency is not changed
+ - create_idempotency.previous != []
+ - modify_subnet is changed
+ - modify_subnet.previous != []
+ - modify_subnet.sent != modify_subnet.proposed
+ - modify_subnet.sent.fvSubnet.attributes.ctrl == 'querier'
+ - modify_subnet.sent.fvSubnet.attributes.scope == 'public,shared'
+ - create_bad_scope is failed
+ - create_bad_scope.msg.startswith("Parameter 'scope' cannot be both 'private' and 'public'")
+ - create_incomplete_data is failed
+ - 'create_incomplete_data.msg == "state is present but all of the following are missing: bd"'
+
+- name: get all subnets
+ cisco.aci.aci_bd_subnet: &aci_query
+ <<: *aci_tenant_present
+ state: query
+ tenant: "{{ fake_var | default(omit) }}"
+ register: get_all
+
+- name: get all in tenant
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_query
+ tenant: anstest
+ register: get_all_tenant
+
+- name: get all in bd
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_query
+ bd: anstest
+ register: get_all_bd
+
+- name: get all tenant and bd
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_bd_present
+ state: query
+ register: get_all_tenant_bd
+
+- name: get subnet in tenant
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet_present
+ state: query
+ bd: "{{ fake_var | default(omit) }}"
+ register: get_subnet_tenant
+
+- name: get subnet in bd
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet_present
+ state: query
+ tenant: "{{ fake_var | default(omit) }}"
+ register: get_subnet_bd
+
+- name: get specific subnet
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet_present
+ state: query
+ register: get_subnet
+
+- name: get all subnets matching gateway
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet_present
+ state: query
+ tenant: "{{ fake_var | default(omit) }}"
+ bd: "{{ fake_var | default(omit) }}"
+ register: get_subnets_gateway
+
+- name: asserts for query tasks
+ assert:
+ that:
+ - get_all is not changed
+ - get_all.current | length > 1
+ - get_all_tenant is not changed
+ - '"tn-anstest.json" in get_all_tenant.url'
+ - get_all_bd is not changed
+ - '"query-target-filter=eq(fvBD.name,\"anstest\")" in get_all_bd.filter_string'
+ - '"class/fvBD.json" in get_all_bd.url'
+ - get_all_tenant_bd is not changed
+ - '"tn-anstest/BD-anstest.json" in get_all_tenant_bd.url'
+ - get_all_tenant_bd.current.0.fvBD.children | length > 1
+ - get_subnet_tenant is not changed
+ - '"rsp-subtree-filter=eq(fvSubnet.ip,\"10.100.100.1/24\")" in get_subnet_tenant.filter_string'
+ - '"tn-anstest.json" in get_subnet_tenant.url'
+ - get_subnet_bd is not changed
+ - '"query-target-filter=eq(fvBD.name,\"anstest\")"'
+ - '"rsp-subtree-filter=eq(fvSubnet.ip,\"10.100.100.1/24\")" in get_subnet_bd.filter_string'
+ - '"class/fvBD.json" in get_subnet_bd.url'
+ - get_subnet is not changed
+ - get_subnet.current | length == 1
+ - '"tn-anstest/BD-anstest/subnet-[10.100.100.1/24].json" in get_subnet.url'
+ - get_subnets_gateway is not changed
+ - '"query-target-filter=eq(fvSubnet.ip,\"10.100.100.1/24\")" in get_subnets_gateway.filter_string'
+ - '"class/fvSubnet.json" in get_subnets_gateway.url'
+
+- name: delete subnet - check mode works
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet_absent
+ check_mode: yes
+ register: delete_check_mode
+
+- name: delete subnet - delete works
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet_absent
+ register: delete_subnet
+
+- name: delete subnet - cleanup
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet2_absent
+
+- name: delete subnet again - idempotency works
+ cisco.aci.aci_bd_subnet:
+ <<: *aci_subnet2_absent
+ register: delete_idempotency
+
+- name: asserts for deletion task
+ assert:
+ that:
+ - delete_check_mode is changed
+ - delete_check_mode.proposed == {}
+ - delete_subnet is changed
+ - delete_subnet.previous != []
+ - delete_subnet.method == "DELETE"
+ - delete_idempotency is not changed
+ - delete_idempotency.previous == []
+
+- name: delete bd - cleanup before ending tests
+ cisco.aci.aci_bd:
+ <<: *aci_bd_present
+ state: absent
+ when: bd_present is changed
+
+- name: delete tenant - cleanup before ending tests
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_present
+ state: absent
+ when: tenant_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_cidr/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_cidr/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_cidr/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_cidr/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_cidr/tasks/main.yml
new file mode 100644
index 00000000..7f287d17
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_cidr/tasks/main.yml
@@ -0,0 +1,303 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: '{{ aws_aci_hostname }}'
+ username: '{{ aws_aci_username }}'
+ password: '{{ aws_aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+
+- name: Ensure tenant doesn't exist
+ aci_tenant:
+ <<: *aci_info
+ state: absent
+ tenant: anstest
+ register: tenant_absent
+
+- name: Ensure tenant exists for tests to kick off
+ aci_tenant:
+ <<: *aci_info
+ state: present
+ tenant: anstest
+ register: tenant_present
+
+- name: Ensure aci cloud context profile does not exists
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ tenant: anstest
+ name: ctx_profile_1
+ state: absent
+ register: rm_ctx_profile_1
+
+- name: Create aci cloud context profile
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ tenant: anstest
+ name: ctx_profile_1
+ vrf: ctx_profile_vrf_1
+ region: us-east-1
+ primary_cidr: '10.10.0.0/16'
+ cloud: aws
+ state: present
+ register: nm_add_aci_ctx_profile
+
+- name: Create non_primary CIDR (check_mode)
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ address: 10.0.0.0/16
+ cloud_context_profile: ctx_profile_1
+ state: present
+ check_mode: yes
+ register: cm_non_primary_cidr
+
+- name: Create non_primary CIDR (normal_mode)
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ address: 10.0.0.0/16
+ cloud_context_profile: ctx_profile_1
+ state: present
+ register: nm_non_primary_cidr
+
+- name: Verify cm_non_primary_cidr and nm_non_primary_cidr
+ assert:
+ that:
+ - cm_non_primary_cidr is changed
+ - nm_non_primary_cidr is changed
+ - cm_non_primary_cidr.previous == []
+ - nm_non_primary_cidr.previous == []
+ - cm_non_primary_cidr.proposed.cloudCidr.attributes.addr == "10.0.0.0/16"
+ - cm_non_primary_cidr.proposed.cloudCidr.attributes.dn == "uni/tn-anstest/ctxprofile-ctx_profile_1/cidr-[10.0.0.0/16]"
+ - cm_non_primary_cidr.proposed.cloudCidr.attributes.primary == "no"
+ - nm_non_primary_cidr.current.0.cloudCidr.attributes.addr == "10.0.0.0/16"
+ - nm_non_primary_cidr.current.0.cloudCidr.attributes.dn == "uni/tn-anstest/ctxprofile-ctx_profile_1/cidr-[10.0.0.0/16]"
+ - nm_non_primary_cidr.current.0.cloudCidr.attributes.primary == "no"
+
+- name: Create non_primary CIDR again
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ address: 10.0.0.0/16
+ cloud_context_profile: ctx_profile_1
+ state: present
+ register: nm_non_primary_cidr_again
+
+- name: Verify nm_non_primary_cidr_again
+ assert:
+ that:
+ - nm_non_primary_cidr_again is not changed
+ - nm_non_primary_cidr_again.previous.0.cloudCidr.attributes.addr == "10.0.0.0/16"
+ - nm_non_primary_cidr_again.previous.0.cloudCidr.attributes.dn == "uni/tn-anstest/ctxprofile-ctx_profile_1/cidr-[10.0.0.0/16]"
+ - nm_non_primary_cidr_again.previous.0.cloudCidr.attributes.primary == "no"
+ - nm_non_primary_cidr_again.current.0.cloudCidr.attributes.addr == "10.0.0.0/16"
+ - nm_non_primary_cidr_again.current.0.cloudCidr.attributes.dn == "uni/tn-anstest/ctxprofile-ctx_profile_1/cidr-[10.0.0.0/16]"
+ - nm_non_primary_cidr_again.current.0.cloudCidr.attributes.primary == "no"
+
+- name: Change primary CIDR to non_primary (check_mode)
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ address: 10.10.0.0/16
+ cloud_context_profile: ctx_profile_1
+ state: present
+ check_mode: yes
+ register: cm_change_to_non_primary_cidr
+
+- name: Change primary CIDR to non_primary (normal_mode)
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ address: 10.10.0.0/16
+ cloud_context_profile: ctx_profile_1
+ state: present
+ ignore_errors: yes
+ register: nm_change_to_non_primary_cidr
+
+- name: Verify cm_primary_cidr and nm_change_to_non_primary_cidr
+ assert:
+ that:
+ - nm_change_to_non_primary_cidr.msg == "APIC Error 1{{':'}} Invalid Configuration {{':'}} Exactly one Primary CIDR expected for{{':'}} uni/tn-anstest/ctxprofile-ctx_profile_1, but found{{':'}} 0"
+ - cm_change_to_non_primary_cidr.proposed.cloudCidr.attributes.primary == "no"
+ - cm_change_to_non_primary_cidr.previous.0.cloudCidr.attributes.primary == cm_change_to_non_primary_cidr.current.0.cloudCidr.attributes.primary == "yes"
+
+- name: Remove primary CIDR (check_mode)
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ address: 10.10.0.0/16
+ cloud_context_profile: ctx_profile_1
+ state: absent
+ check_mode: yes
+ register: cm_remove_primary_cidr
+
+- name: Remove primary CIDR (normal_mode)
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ address: 10.10.0.0/16
+ cloud_context_profile: ctx_profile_1
+ state: absent
+ ignore_errors: yes
+ register: nm_remove_primary_cidr
+
+- name: Verify cm_remove_primary_cidr and nm_remove_primary_cidr
+ assert:
+ that:
+ - nm_remove_primary_cidr.msg == "APIC Error 1{{':'}} Invalid Configuration {{':'}} Exactly one Primary CIDR expected for{{':'}} uni/tn-anstest/ctxprofile-ctx_profile_1, but found{{':'}} 0"
+ - cm_remove_primary_cidr.proposed == {}
+ - cm_remove_primary_cidr.previous.0.cloudCidr.attributes.primary == cm_remove_primary_cidr.current.0.cloudCidr.attributes.primary == "yes"
+
+- name: Create second non_primary CIDR
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ address: 10.18.0.0/16
+ cloud_context_profile: ctx_profile_1
+ state: present
+ register: nm_add_second_non_primary_cidr
+
+- name: Verify nm_add_second_non_primary_cidr
+ assert:
+ that:
+ - nm_add_second_non_primary_cidr is changed
+ - nm_add_second_non_primary_cidr.previous == []
+ - nm_add_second_non_primary_cidr.current.0.cloudCidr.attributes.addr == "10.18.0.0/16"
+ - nm_add_second_non_primary_cidr.current.0.cloudCidr.attributes.primary == "no"
+ - nm_add_second_non_primary_cidr.current.0.cloudCidr.attributes.dn == "uni/tn-anstest/ctxprofile-ctx_profile_1/cidr-[10.18.0.0/16]"
+
+- name: Change setting of second non_primary CIDR
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ cidr: 10.18.0.0/16
+ cloud_context_profile: ctx_profile_1
+ description: This is not a primary CIDR
+ name_alias: cidr_block_range
+ state: present
+ register: change_non_primary_cidr
+
+- name: Verify change_non_primary_cidr
+ assert:
+ that:
+ - change_non_primary_cidr is changed
+ - change_non_primary_cidr.current.0.cloudCidr.attributes.addr == "10.18.0.0/16"
+ - change_non_primary_cidr.current.0.cloudCidr.attributes.descr == "This is not a primary CIDR"
+ - change_non_primary_cidr.current.0.cloudCidr.attributes.nameAlias == "cidr_block_range"
+ - change_non_primary_cidr.current.0.cloudCidr.attributes.dn == "uni/tn-anstest/ctxprofile-ctx_profile_1/cidr-[10.18.0.0/16]"
+
+- name: Query all CIDRs
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ cloud_context_profile: ctx_profile_1
+ state: query
+ register: query_all
+
+- name: Verify query_all
+ assert:
+ that:
+ - query_all is not changed
+ - query_all.current.0.cloudCtxProfile.attributes.name == "ctx_profile_1"
+ - query_all.current.0.cloudCtxProfile.children | length == 3
+ - query_all.current.0.cloudCtxProfile.children.0.cloudCidr.attributes.addr == "10.18.0.0/16"
+ - query_all.current.0.cloudCtxProfile.children.0.cloudCidr.attributes.primary == "no"
+ - query_all.current.0.cloudCtxProfile.children.1.cloudCidr.attributes.addr == "10.0.0.0/16"
+ - query_all.current.0.cloudCtxProfile.children.1.cloudCidr.attributes.primary == "no"
+ - query_all.current.0.cloudCtxProfile.children.2.cloudCidr.attributes.addr == "10.10.0.0/16"
+ - query_all.current.0.cloudCtxProfile.children.2.cloudCidr.attributes.primary == "yes"
+
+- name: Query primary CIDR
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ cloud_context_profile: ctx_profile_1
+ address: 10.10.0.0/16
+ state: query
+ register: query_primary
+
+- name: Verify query_primary
+ assert:
+ that:
+ - query_primary is not changed
+ - query_primary.current.0.cloudCidr.attributes.addr == "10.10.0.0/16"
+ - query_primary.current.0.cloudCidr.attributes.dn == "uni/tn-anstest/ctxprofile-ctx_profile_1/cidr-[10.10.0.0/16]"
+ - query_primary.current.0.cloudCidr.attributes.primary == "yes"
+
+- name: Query non_primary CIDR
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ cloud_context_profile: ctx_profile_1
+ address: 10.0.0.0/16
+ state: query
+ register: query_non_primary
+
+- name: Verify query_non_primary
+ assert:
+ that:
+ - query_non_primary is not changed
+ - query_non_primary.current.0.cloudCidr.attributes.addr == "10.0.0.0/16"
+ - query_non_primary.current.0.cloudCidr.attributes.dn == "uni/tn-anstest/ctxprofile-ctx_profile_1/cidr-[10.0.0.0/16]"
+ - query_non_primary.current.0.cloudCidr.attributes.primary == "no"
+
+- name: Query non_exsisting CIDR
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ cloud_context_profile: ctx_profile_1
+ address: non_exsisting
+ state: query
+ ignore_errors: yes
+ register: query_non_existing
+
+- name: Verify query_non_existing
+ assert:
+ that:
+ - query_non_existing.msg == "APIC Error 104{{':'}} Invalid RN cidr-[non_exsisting]"
+
+- name: Remove non_primary CIDR(check_mode)
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ address: 10.0.0.0/16
+ cloud_context_profile: ctx_profile_1
+ state: absent
+ check_mode: yes
+ register: cm_remove_non_primary_cidr
+
+- name: Remove non_primary CIDR(normal_mode)
+ aci_cloud_cidr:
+ <<: *aci_info
+ tenant: anstest
+ address: 10.0.0.0/16
+ cloud_context_profile: ctx_profile_1
+ state: absent
+ register: nm_remove_non_primary_cidr
+
+- name: Verify cm_remove_non_primary_cidr and nm_remove_non_primary_cidr
+ assert:
+ that:
+ - cm_remove_non_primary_cidr is changed
+ - nm_remove_non_primary_cidr is changed
+ - cm_remove_non_primary_cidr.proposed == {}
+ - nm_remove_non_primary_cidr.current == []
+ - cm_remove_non_primary_cidr.previous.0.cloudCidr.attributes.addr == "10.0.0.0/16"
+ - cm_remove_non_primary_cidr.previous.0.cloudCidr.attributes.primary == "no"
+ - cm_remove_non_primary_cidr.previous.0.cloudCidr.attributes.dn == "uni/tn-anstest/ctxprofile-ctx_profile_1/cidr-[10.0.0.0/16]"
+ - nm_remove_non_primary_cidr.previous.0.cloudCidr.attributes.addr == "10.0.0.0/16"
+ - nm_remove_non_primary_cidr.previous.0.cloudCidr.attributes.primary == "no"
+ - nm_remove_non_primary_cidr.previous.0.cloudCidr.attributes.dn == "uni/tn-anstest/ctxprofile-ctx_profile_1/cidr-[10.0.0.0/16]"
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_ctx_profile/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_ctx_profile/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_ctx_profile/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_ctx_profile/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_ctx_profile/tasks/main.yml
new file mode 100644
index 00000000..a063087d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_ctx_profile/tasks/main.yml
@@ -0,0 +1,323 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Set cloud
+ set_fact:
+ cloud:
+ - aci_hostname: "{{aws_aci_hostname}}"
+ aci_username: "{{aws_aci_username}}"
+ aci_password: "{{aws_aci_password}}"
+ cloud_type: aws
+ region: us-east-1
+ region_2: us-west-1
+ - aci_hostname: "{{azure_aci_hostname}}"
+ aci_username: "{{azure_aci_username}}"
+ aci_password: "{{azure_aci_password}}"
+ cloud_type: azure
+ region: westus
+ region_2: westus2
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+
+- name: Ensure tenant doesn't exist
+ aci_tenant:
+ <<: *aci_info
+ state: absent
+ tenant: ansible_test
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ register: tenant_absent
+ loop: "{{cloud}}"
+
+- name: Ensure tenant exists for tests to kick off
+ aci_tenant:
+ <<: *aci_info
+ state: present
+ tenant: ansible_test
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ register: tenant_present
+ loop: "{{cloud}}"
+
+- name: Ensure aci cloud context profile does not exists
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ name: ctx_profile_1
+ state: absent
+ register: rm_ctx_profile_1
+ loop: "{{cloud}}"
+
+- name: Verify rm_ctx_profile_1
+ assert:
+ that:
+ - item.current == []
+ loop: "{{rm_ctx_profile_1.results}}"
+
+- name: Ensure aci cloud context profile 2 does not exists
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ name: ctx_profile_2
+ state: absent
+ register: rm_ctx_profile_2
+ loop: "{{cloud}}"
+
+- name: Verify rm_ctx_profile_2
+ assert:
+ that:
+ - item.current == []
+ loop: "{{rm_ctx_profile_2.results}}"
+
+- name: Create aci cloud context profile (check mode)
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ cloud: "{{item.cloud_type}}"
+ name: ctx_profile_1
+ vrf: ctx_profile_vrf_1
+ region: us-east-1
+ primary_cidr: '10.100.0.0/16'
+ state: present
+ check_mode: yes
+ register: cm_add_aci_ctx_profile
+ loop: "{{cloud}}"
+
+- name: Create aci cloud context profile (normal mode)
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ cloud: "{{item.cloud_type}}"
+ name: ctx_profile_1
+ vrf: ctx_profile_vrf_1
+ region: "{{item.region}}"
+ primary_cidr: '10.100.0.0/16'
+ state: present
+ register: nm_add_aci_ctx_profile
+ loop: "{{cloud}}"
+
+- name: Verify cm_add_aci_ctx_profile
+ assert:
+ that:
+ - item is changed
+ - item.previous == []
+ - item.proposed.cloudCtxProfile.attributes.name == "ctx_profile_1"
+ - item.proposed.cloudCtxProfile.attributes.dn == "uni/tn-ansible_test/ctxprofile-ctx_profile_1"
+ - item.proposed.cloudCtxProfile.children[0].cloudRsToCtx.attributes.tnFvCtxName == "ctx_profile_vrf_1"
+ - item.proposed.cloudCtxProfile.children[2].cloudCidr.attributes.addr == "10.100.0.0/16"
+ - item.proposed.cloudCtxProfile.children[2].cloudCidr.attributes.primary == "yes"
+ loop: "{{cm_add_aci_ctx_profile.results}}"
+
+- name: Verify nm_add_aci_ctx_profile
+ assert:
+ that:
+ - item is changed
+ - item.previous == []
+ - item.current[0].cloudCtxProfile.attributes.name == "ctx_profile_1"
+ - item.current[0].cloudCtxProfile.attributes.dn == "uni/tn-ansible_test/ctxprofile-ctx_profile_1"
+ - item.current[0].cloudCtxProfile.children[2].cloudRsToCtx.attributes.tnFvCtxName == "ctx_profile_vrf_1"
+ - item.current[0].cloudCtxProfile.children[0].cloudCidr.attributes.addr == "10.100.0.0/16"
+ - item.current[0].cloudCtxProfile.children[0].cloudCidr.attributes.primary == "yes"
+ loop: "{{nm_add_aci_ctx_profile.results}}"
+
+- name: Add aci cloud context profile again (check_mode)
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ cloud: "{{item.cloud_type}}"
+ name: ctx_profile_1
+ vrf: ctx_profile_vrf_1
+ region: "{{item.region}}"
+ primary_cidr: '10.100.0.0/16'
+ state: present
+ check_mode: yes
+ register: cm_add_aci_ctx_profile_again
+ loop: "{{cloud}}"
+
+- name: Verify cm_add_aci_ctx_profile_again
+ assert:
+ that:
+ - item is not changed
+ - item.previous[0].cloudCtxProfile.attributes.name == "ctx_profile_1"
+ - item.previous[0].cloudCtxProfile.attributes.dn == "uni/tn-ansible_test/ctxprofile-ctx_profile_1"
+ - item.previous[0].cloudCtxProfile.children[2].cloudRsToCtx.attributes.tnFvCtxName == "ctx_profile_vrf_1"
+ - item.previous[0].cloudCtxProfile.children[0].cloudCidr.attributes.addr == "10.100.0.0/16"
+ - item.previous[0].cloudCtxProfile.children[0].cloudCidr.attributes.primary == "yes"
+ loop: "{{cm_add_aci_ctx_profile_again.results}}"
+
+- name: Add aci cloud context profile again (normal_mode)
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ cloud: "{{item.cloud_type}}"
+ name: ctx_profile_1
+ vrf: ctx_profile_vrf_1
+ region: "{{item.region}}"
+ primary_cidr: '10.100.0.0/16'
+ state: present
+ register: nm_add_aci_ctx_profile_again
+ loop: "{{cloud}}"
+
+- name: Verify nm_add_aci_ctx_profile_again
+ assert:
+ that:
+ - item is not changed
+ - item.current[0].cloudCtxProfile.attributes.name == "ctx_profile_1"
+ - item.current[0].cloudCtxProfile.attributes.dn == "uni/tn-ansible_test/ctxprofile-ctx_profile_1"
+ - item.current[0].cloudCtxProfile.children[2].cloudRsToCtx.attributes.tnFvCtxName == "ctx_profile_vrf_1"
+ - item.current[0].cloudCtxProfile.children[0].cloudCidr.attributes.addr == "10.100.0.0/16"
+ - item.current[0].cloudCtxProfile.children[0].cloudCidr.attributes.primary == "yes"
+ loop: "{{nm_add_aci_ctx_profile_again.results}}"
+
+- name: Add another aci cloud context profile (check_mode)
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ cloud: "{{item.cloud_type}}"
+ name: ctx_profile_2
+ vrf: ctx_profile_vrf_2
+ region: "{{item.region_2}}"
+ primary_cidr: '10.101.0.0/16'
+ description: "add ctx_profile_2"
+ state: present
+ check_mode: yes
+ register: cm_add_another_aci_ctx_profile
+ loop: "{{cloud}}"
+
+- name: Verify cm_add_another_aci_ctx_profile
+ assert:
+ that:
+ - item is changed
+ - item.previous == []
+ - item.proposed.cloudCtxProfile.attributes.name == "ctx_profile_2"
+ - item.proposed.cloudCtxProfile.attributes.dn == "uni/tn-ansible_test/ctxprofile-ctx_profile_2"
+ - item.proposed.cloudCtxProfile.children[0].cloudRsToCtx.attributes.tnFvCtxName == "ctx_profile_vrf_2"
+ - item.proposed.cloudCtxProfile.children[2].cloudCidr.attributes.addr == "10.101.0.0/16"
+ - item.proposed.cloudCtxProfile.children[2].cloudCidr.attributes.primary == "yes"
+ - item.proposed.cloudCtxProfile.attributes.descr == "add ctx_profile_2"
+ loop: "{{cm_add_another_aci_ctx_profile.results}}"
+
+- name: Add another aci cloud context profile (normal_mode)
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ cloud: "{{item.cloud_type}}"
+ name: ctx_profile_2
+ vrf: ctx_profile_vrf_2
+ region: "{{item.region_2}}"
+ primary_cidr: '10.101.0.0/16'
+ description: "add ctx_profile_2"
+ state: present
+ register: nm_add_another_aci_ctx_profile
+ loop: "{{cloud}}"
+
+- name: Verify nm_add_another_aci_ctx_profile
+ assert:
+ that:
+ - item is changed
+ - item.previous == []
+ - item.current[0].cloudCtxProfile.attributes.name == "ctx_profile_2"
+ - item.current[0].cloudCtxProfile.attributes.dn == "uni/tn-ansible_test/ctxprofile-ctx_profile_2"
+ - item.current[0].cloudCtxProfile.children[2].cloudRsToCtx.attributes.tnFvCtxName == "ctx_profile_vrf_2"
+ - item.current[0].cloudCtxProfile.children[0].cloudCidr.attributes.addr == "10.101.0.0/16"
+ - item.current[0].cloudCtxProfile.children[0].cloudCidr.attributes.primary == "yes"
+ - item.current[0].cloudCtxProfile.attributes.descr == "add ctx_profile_2"
+ loop: "{{nm_add_another_aci_ctx_profile.results}}"
+
+- name: Query aci cloud context profile ctx_profile_1
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ name: ctx_profile_1
+ state: query
+ register: query_aci_cloud_profile_1
+ loop: "{{cloud}}"
+
+- name: Verify query_aci_cloud_profile_1
+ assert:
+ that:
+ - item is not changed
+ - item.current[0].cloudCtxProfile.attributes.name == "ctx_profile_1"
+ - item.current[0].cloudCtxProfile.children | length == 3
+ loop: "{{query_aci_cloud_profile_1.results}}"
+
+- name: Query all aci cloud context profiles
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ state: query
+ register: query_all
+ loop: "{{cloud}}"
+
+- name: Verify query_all
+ assert:
+ that:
+ - item is not changed
+ - item.current | length == 1
+ - item.current.0.fvTenant.children | length == 2
+ loop: "{{query_all.results}}"
+
+- name: Remove aci cloud context profile
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ name: ctx_profile_1
+ state: absent
+ register: rm_ctx_profile
+ loop: "{{cloud}}"
+
+- name: Verify rm_ctx_profile
+ assert:
+ that:
+ - item.current == []
+ - item.previous.0.cloudCtxProfile.attributes.name == "ctx_profile_1"
+ loop: "{{rm_ctx_profile.results}}" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_provider/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_provider/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_provider/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_provider/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_provider/tasks/main.yml
new file mode 100644
index 00000000..a69b819f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_provider/tasks/main.yml
@@ -0,0 +1,51 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: '{{ aws_aci_hostname }}'
+ username: '{{ aws_aci_username }}'
+ password: '{{ aws_aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+
+- name: Query system information
+ aci_system:
+ <<: *aci_info
+ id: 1
+ state: query
+ register: version
+
+# QUERY OBJECTS
+- name: Query cloud provider object
+ aci_cloud_provider:
+ <<: *aci_info
+ state: query
+ register: query_cloud
+ when: version.current.0.topSystem.attributes.version is version('4.1', '>=')
+
+- name: Verify query_cloud for all sites
+ assert:
+ that:
+ - query_cloud is not changed
+
+- name: Verify query_cloud for Cloud Sites
+ assert:
+ that:
+ - query_cloud is not changed
+ - query_cloud.current.0.cloudProvP.attributes.environment == "public-cloud"
+ - '"vendor" in query_cloud.current.0.cloudProvP.attributes'
+ when:
+ - version.current.0.topSystem.attributes.version is version('4.1', '>=')
+ - query_cloud.current | length > 0 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_region/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_region/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_region/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_region/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_region/tasks/main.yml
new file mode 100644
index 00000000..6315f8c1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_region/tasks/main.yml
@@ -0,0 +1,66 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: '{{ aws_aci_hostname }}'
+ username: '{{ aws_aci_username }}'
+ password: '{{ aws_aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+
+- name: Query all regions
+ aci_cloud_region:
+ <<: *aci_info
+ cloud: 'aws'
+ state: query
+ register: query_all
+
+- name: Verify query_all
+ assert:
+ that:
+ - query_all is not changed
+ - query_all.current.0.cloudProvP.attributes.dn == "uni/clouddomp/provp-aws"
+ - query_all.current.0.cloudProvP.attributes.vendor == "aws"
+ - query_all.current.0.cloudProvP.children | length > 10
+
+- name: Query a specific region
+ aci_cloud_region:
+ <<: *aci_info
+ cloud: 'aws'
+ region: eu-west-2
+ state: query
+ register: query_region
+
+- name: Verify query_region
+ assert:
+ that:
+ - query_region is not changed
+ - query_region.current.0.cloudRegion.attributes.adminSt == "unmanaged"
+ - query_region.current.0.cloudRegion.attributes.dn == "uni/clouddomp/provp-aws/region-eu-west-2"
+ - query_region.current.0.cloudRegion.attributes.name == "eu-west-2"
+
+- name: Query non_existing region
+ aci_cloud_region:
+ <<: *aci_info
+ cloud: 'aws'
+ region: non_existing
+ state: query
+ register: query_non_existing_region
+
+- name: Verify query_non_existing_region
+ assert:
+ that:
+ - query_non_existing_region is not changed
+ - query_non_existing_region.current == [] \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_subnet/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_subnet/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_subnet/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_subnet/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_subnet/tasks/main.yml
new file mode 100644
index 00000000..b6b53bd9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_subnet/tasks/main.yml
@@ -0,0 +1,347 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Set cloud
+ set_fact:
+ cloud:
+ - aci_hostname: "{{ aws_aci_hostname }}"
+ aci_username: "{{ aws_aci_username }}"
+ aci_password: "{{ aws_aci_password }}"
+ cloud_type: aws
+ cloud_region: us-west-1
+ cloud_zone: us-west-1a
+ - aci_hostname: "{{ azure_aci_hostname }}"
+ aci_username: "{{ azure_aci_username }}"
+ aci_password: "{{ azure_aci_password }}"
+ cloud_type: azure
+ cloud_region: westus
+ vnet_gateway: true
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+
+- name: Ensure tenant doesn't exist
+ aci_tenant:
+ <<: *aci_info
+ state: absent
+ tenant: ansible_test
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ register: tenant_absent
+ loop: "{{ cloud }}"
+
+- name: Ensure tenant exists for tests to kick off
+ aci_tenant:
+ <<: *aci_info
+ state: present
+ tenant: ansible_test
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ register: tenant_present
+ loop: "{{ cloud }}"
+
+- name: Ensure aci cloud context profile does not exists
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ name: ctx_profile_1
+ state: absent
+ register: rm_ctx_profile_1
+ loop: "{{ cloud }}"
+
+- name: Verify rm_ctx_profile_1
+ assert:
+ that:
+ - item.current == []
+ loop: "{{ rm_ctx_profile_1.results }}"
+
+- name: Create aci cloud context profile (normal mode)
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud: "{{ item.cloud_type }}"
+ name: ctx_profile_1
+ vrf: ctx_profile_vrf_1
+ region: "{{ item.cloud_region }}"
+ primary_cidr: '10.50.0.0/16'
+ state: present
+ register: nm_add_aci_ctx_profile
+ loop: "{{ cloud }}"
+
+- name: Create aci cloud subnet (check_mode)
+ aci_cloud_subnet:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.50.0.0/16'
+ availability_zone: "{{ item.cloud_zone | default(omit) }}"
+ address: 10.50.0.1
+ description: test description
+ check_mode: yes
+ register: cm_add_subnet
+ loop: "{{ cloud }}"
+
+- name: Create aci cloud subnet (normal_mode)
+ aci_cloud_subnet:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.50.0.0/16'
+ availability_zone: "{{ item.cloud_zone | default(omit) }}"
+ address: 10.50.0.1
+ description: test description
+ register: nm_add_subnet
+ loop: "{{ cloud }}"
+
+- name: Verify cm_add_subnet
+ assert:
+ that:
+ - item is changed
+ - item.previous == []
+ - item.proposed.cloudSubnet.attributes.ip == "10.50.0.1"
+ - item.proposed.cloudSubnet.attributes.descr == "test description"
+ - item.proposed.cloudSubnet.attributes.dn == "uni/tn-ansible_test/ctxprofile-ctx_profile_1/cidr-[10.50.0.0/16]/subnet-[10.50.0.1]"
+ loop: "{{ cm_add_subnet.results }}"
+
+- name: Create aci cloud subnet again (normal_mode)
+ aci_cloud_subnet:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.50.0.0/16'
+ availability_zone: "{{ item.cloud_zone | default(omit) }}"
+ address: 10.50.0.1
+ description: test description
+ register: nm_add_subnet_again
+ loop: "{{ cloud }}"
+
+- name: Verify nm_add_subnet_again
+ assert:
+ that:
+ - item is not changed
+ loop: "{{ nm_add_subnet_again.results }}"
+
+- name: Create another cloud subnet (normal_mode)
+ aci_cloud_subnet:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.50.0.0/16'
+ availability_zone: "{{ item.cloud_zone | default(omit) }}"
+ address: 10.50.0.2
+ description: another subnet
+ register: nm_add_another_subnet
+ loop: "{{ cloud }}"
+
+- name: Verify nm_add_another_subnet
+ assert:
+ that:
+ - item is changed
+ - item.previous == []
+ - item.current.0.cloudSubnet.attributes.descr == "another subnet"
+ - item.current.0.cloudSubnet.attributes.dn == "uni/tn-ansible_test/ctxprofile-ctx_profile_1/cidr-[10.50.0.0/16]/subnet-[10.50.0.2]"
+ - item.current.0.cloudSubnet.attributes.ip == "10.50.0.2"
+ - item.current.0.cloudSubnet.attributes.scope == "private"
+ - item.current.0.cloudSubnet.attributes.usage == "user"
+ loop: "{{ nm_add_another_subnet.results }}"
+
+- name: Create cloud subnet 3(normal_mode)
+ aci_cloud_subnet:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.50.0.0/16'
+ availability_zone: "{{ item.cloud_zone | default(omit) }}"
+ address: 10.50.0.3
+ name: subnet_3
+ register: nm_add_subnet_3
+ loop: "{{ cloud }}"
+
+- name: Specify subnet as VpnGateway enabled
+ aci_cloud_subnet:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.50.0.0/16'
+ availability_zone: "{{ item.cloud_zone | default(omit) }}"
+ address: 10.50.0.1
+ # name: subnet_1
+ description: change subnet 1
+ vnet_gateway: "{{ item.vnet_gateway | default(omit)}}"
+ #scope: public
+ register: nm_change_subnet_1
+ loop: "{{ cloud }}"
+
+# Enable vpn_gateway router in cloud ctx profile
+- name: Enable VpnGateway
+ aci_cloud_vpn_gateway:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ state: present
+ loop: "{{ cloud }}"
+
+# Try to disable vpn_gateway router again in cloud ctx profile
+- name: Disable VpnGateway
+ aci_cloud_vpn_gateway:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ state: absent
+ loop: "{{ cloud }}"
+
+- name: Query all subnets
+ aci_cloud_subnet:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.50.0.0/16'
+ state: query
+ register: query_all
+ loop: "{{ cloud }}"
+
+- name: Verify query_all
+ assert:
+ that:
+ - item is not changed
+ - item.current.0.cloudCidr.attributes.addr == "10.50.0.0/16"
+ - item.current.0.cloudCidr.children | length == 3
+ loop: "{{ query_all.results }}"
+
+- name: Query a specific subnet
+ aci_cloud_subnet:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.50.0.0/16'
+ address: 10.50.0.1
+ state: query
+ register: query_subnet_1
+ loop: "{{ cloud }}"
+
+- name: Verify query_subnet_1
+ assert:
+ that:
+ - item is not changed
+ - item.current.0.cloudSubnet.attributes.ip == "10.50.0.1"
+ - item.current.0.cloudSubnet.attributes.scope == "private"
+ - item.current.0.cloudSubnet.attributes.dn == "uni/tn-ansible_test/ctxprofile-ctx_profile_1/cidr-[10.50.0.0/16]/subnet-[10.50.0.1]"
+ loop: "{{ query_subnet_1.results }}"
+
+- name: Remove subnet 3 (check_mode)
+ aci_cloud_subnet:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.50.0.0/16'
+ address: 10.50.0.3
+ state: absent
+ check_mode: yes
+ register: cm_remove_subnet_3
+ loop: "{{ cloud }}"
+
+- name: Verify cm_remove_subnet_3
+ assert:
+ that:
+ - item is changed
+ - item.proposed == {}
+ - item.previous.0.cloudSubnet.attributes.ip == "10.50.0.3"
+ loop: "{{ cm_remove_subnet_3.results }}"
+
+- name: Remove subnet 3 (normal_mode)
+ aci_cloud_subnet:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.50.0.0/16'
+ address: 10.50.0.3
+ state: absent
+ register: nm_remove_subnet_3
+ loop: "{{ cloud }}"
+
+- name: Verify nm_remove_subnet_3
+ assert:
+ that:
+ - item is changed
+ - item.current == []
+ - item.previous.0.cloudSubnet.attributes.ip == "10.50.0.3"
+ loop: "{{ nm_remove_subnet_3.results }}"
+
+- name: Remove subnet 3 again
+ aci_cloud_subnet:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.50.0.0/16'
+ address: 10.50.0.3
+ state: absent
+ register: nm_remove_subnet_3_again
+ loop: "{{ cloud }}"
+
+- name: Verify nm_remove_subnet_3_again
+ assert:
+ that:
+ - item is not changed
+ - item.previous == []
+ - item.current == []
+ loop: "{{ nm_remove_subnet_3_again.results }}" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_vpn_gateway/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_vpn_gateway/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_vpn_gateway/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_vpn_gateway/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_vpn_gateway/tasks/main.yml
new file mode 100644
index 00000000..521a683f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_vpn_gateway/tasks/main.yml
@@ -0,0 +1,157 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Set cloud
+ set_fact:
+ cloud:
+ - aci_hostname: "{{ aws_aci_hostname }}"
+ aci_username: "{{ aws_aci_username }}"
+ aci_password: "{{ aws_aci_password }}"
+ cloud_type: aws
+ cloud_region: us-west-1
+ cloud_zone: us-west-1a
+ - aci_hostname: "{{ azure_aci_hostname }}"
+ aci_username: "{{ azure_aci_username }}"
+ aci_password: "{{ azure_aci_password }}"
+ cloud_type: azure
+ cloud_region: westus
+ vnet_gateway: true
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+
+- name: Ensure tenant doesn't exist
+ aci_tenant:
+ <<: *aci_info
+ state: absent
+ tenant: ansible_test
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ register: tenant_absent
+ loop: "{{ cloud }}"
+
+- name: Ensure tenant exists for tests to kick off
+ aci_tenant:
+ <<: *aci_info
+ state: present
+ tenant: ansible_test
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ register: tenant_present
+ loop: "{{ cloud }}"
+
+- name: Ensure aci cloud context profile does not exists
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{item.aci_hostname}}"
+ username: "{{item.aci_username}}"
+ password: "{{item.aci_password}}"
+ tenant: ansible_test
+ name: ctx_profile_1
+ state: absent
+ register: rm_ctx_profile_1
+ loop: "{{ cloud }}"
+
+- name: Verify rm_ctx_profile_1
+ assert:
+ that:
+ - item.current == []
+ loop: "{{ rm_ctx_profile_1.results }}"
+
+- name: Create aci cloud context profile (normal mode)
+ aci_cloud_ctx_profile:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud: "{{ item.cloud_type }}"
+ name: ctx_profile_1
+ vrf: ctx_profile_vrf_1
+ region: "{{ item.cloud_region }}"
+ primary_cidr: '10.50.0.0/16'
+ state: present
+ register: nm_add_aci_ctx_profile
+ loop: "{{ cloud }}"
+
+- name: Create aci cloud subnet with VpnGateway enabled (normal_mode)
+ aci_cloud_subnet:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ cidr: '10.50.0.0/16'
+ availability_zone: "{{ item.cloud_zone | default(omit) }}"
+ address: 10.50.0.1
+ description: specify this subnet as VpnGateway router
+ vnet_gateway: "{{ item.vnet_gateway | default(omit)}}"
+ register: nm_add_subnet
+ loop: "{{ cloud }}"
+
+- name: Enable VpnGateway
+ aci_cloud_vpn_gateway:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ state: present
+ loop: "{{ cloud }}"
+
+- name: Disable VpnGateway
+ aci_cloud_vpn_gateway:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ state: absent
+ loop: "{{ cloud }}"
+
+- name: Enable VpnGateway again
+ aci_cloud_vpn_gateway:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ state: present
+ loop: "{{ cloud }}"
+
+- name: Query VpnGateway
+ aci_cloud_vpn_gateway:
+ <<: *aci_info
+ host: "{{ item.aci_hostname }}"
+ username: "{{ item.aci_username }}"
+ password: "{{ item.aci_password }}"
+ tenant: ansible_test
+ cloud_context_profile: ctx_profile_1
+ register: query_vpn_gateway
+ loop: "{{ cloud }}"
+
+- name: Verify VpnGateway
+ assert:
+ that:
+ - item is not changed
+ - item.current.0.cloudRouterP.children | length == 3
+ loop: "{{ query_vpn_gateway.results }}" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_zone/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_zone/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_zone/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_zone/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_zone/tasks/main.yml
new file mode 100644
index 00000000..1314d242
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_zone/tasks/main.yml
@@ -0,0 +1,90 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: '{{ aws_aci_hostname }}'
+ username: '{{ aws_aci_username }}'
+ password: '{{ aws_aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+
+- name: Query all zones under us-west-1
+ aci_cloud_zone:
+ <<: *aci_info
+ cloud: 'aws'
+ region: us-west-1
+ state: query
+ register: query_all
+
+- name: Verify query_all
+ assert:
+ that:
+ - query_all is not changed
+ - query_all.current.0.cloudRegion.attributes.name == "us-west-1"
+ - query_all.current.0.cloudRegion.children | length >= 2
+
+- name: Query a specific zone under region us-west-1
+ aci_cloud_zone:
+ <<: *aci_info
+ cloud: 'aws'
+ region: us-west-1
+ zone: us-west-1a
+ state: query
+ register: query_zone_1
+
+- name: Query another specific zone under region us-west-1
+ aci_cloud_zone:
+ <<: *aci_info
+ cloud: 'aws'
+ region: us-west-1
+ zone: us-west-1b
+ state: query
+ register: query_zone_2
+
+- name: Verify query_zone_1 and query_zone_2
+ assert:
+ that:
+ - query_zone_1 is not changed
+ - query_zone_2 is not changed
+ - query_zone_1.current.0.cloudZone.attributes.name == "us-west-1a"
+ - query_zone_1.current.0.cloudZone.attributes.dn == "uni/clouddomp/provp-aws/region-us-west-1/zone-us-west-1a"
+ - query_zone_2.current.0.cloudZone.attributes.name == "us-west-1b"
+ - query_zone_2.current.0.cloudZone.attributes.dn == "uni/clouddomp/provp-aws/region-us-west-1/zone-us-west-1b"
+
+- name: Query non_existing zone under region us-west-1
+ aci_cloud_zone:
+ <<: *aci_info
+ cloud: 'aws'
+ region: us-west-1
+ zone: non_existing
+ state: query
+ register: query_non_existing_zone
+
+- name: Query zone under non_existing region
+ aci_cloud_zone:
+ <<: *aci_info
+ cloud: 'aws'
+ region: non_existing
+ zone: us-west-1a
+ state: query
+ register: query_non_existing_region
+
+- name: Verify query_non_existing_zone
+ assert:
+ that:
+ - query_non_existing_zone is not changed
+ - query_non_existing_zone.current == []
+ - query_non_existing_region is not changed
+ - query_non_existing_region.current == [] \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_rollback/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_rollback/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_rollback/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_rollback/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_rollback/tasks/main.yml
new file mode 100644
index 00000000..64c36d57
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_rollback/tasks/main.yml
@@ -0,0 +1,108 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: ensure tenant does not exist for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_absent
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: absent
+ tenant: anstest
+
+- name: create a snapshot
+ cisco.aci.aci_config_snapshot: &create_snapshot
+ <<: *aci_tenant_absent
+ state: present
+ tenant: "{{ fakevar | default(omit) }}"
+ export_policy: anstest
+
+- name: create a tenant - use for rollback
+ cisco.aci.aci_tenant: &aci_tenant
+ <<: *create_snapshot
+ export_policy: "{{ fakevar | default(omit) }}"
+ tenant: anstest
+ register: tenant_present
+
+- name: create a new snapshot
+ cisco.aci.aci_config_snapshot:
+ <<: *create_snapshot
+
+- name: waiting for snapshot to be finished before querying
+ pause:
+ seconds: 10
+
+- name: get snapshots
+ cisco.aci.aci_config_snapshot:
+ <<: *create_snapshot
+ state: query
+ register: snapshots
+
+- name: sort snapshot list
+ set_fact:
+ sorted_snapshots: '{{ snapshots.current.0.configSnapshotCont.children | sort(attribute="configSnapshot.attributes.createTime", reverse=True) }}'
+
+- name: compare snapshots
+ cisco.aci.aci_config_rollback: &preview_rollback
+ <<: *create_snapshot
+ state: preview
+ compare_export_policy: anstest
+ compare_snapshot: "{{ sorted_snapshots[0].configSnapshot.attributes.name }}"
+ snapshot: "{{ sorted_snapshots[1].configSnapshot.attributes.name }}"
+ register: rollback_preview
+
+- name: rollback to snapshot with missing parameters
+ cisco.aci.aci_config_rollback: &aci_rollback
+ <<: *create_snapshot
+ state: rollback
+ snapshot: "{{ sorted_snapshots[1].configSnapshot.attributes.name }}"
+ ignore_errors: yes
+ register: rollback_missing_param
+
+- name: rollback to snapshot
+ cisco.aci.aci_config_rollback:
+ <<: *aci_rollback
+ import_policy: anstest
+ import_type: replace
+ import_mode: atomic
+ register: rollback_rollback
+
+- name: pause execution to let rollback take effect
+ pause:
+ seconds: 15
+
+- name: ensure tenant doesn't exist after rollback
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_absent
+ register: tenant_removed
+
+- debug:
+ msg: '{{ rollback_preview }}'
+
+- name: rollback assertions
+ assert:
+ that:
+ - rollback_preview is not changed
+ - rollback_preview.preview.polUni.children[0].fvTenant.attributes.name == 'anstest'
+ - rollback_preview.preview.polUni.children[0].fvTenant.attributes.status == 'created'
+ - '"snapshots.diff.xml" in rollback_preview.url'
+ - rollback_missing_param is failed
+ - 'rollback_missing_param.msg == "state is rollback but all of the following are missing: import_policy"'
+ - rollback_rollback is changed
+ - '"ce2_" in rollback_rollback.sent.configImportP.attributes.fileName'
+ - '".tar.gz" in rollback_rollback.sent.configImportP.attributes.fileName'
+ - '"ce2_" in rollback_rollback.proposed.configImportP.attributes.fileName'
+ - '".tar.gz" in rollback_rollback.proposed.configImportP.attributes.fileName'
+ - '"fabric/configimp-anstest.json" in rollback_rollback.url'
+ - tenant_removed is not changed
+ - tenant_removed.previous == []
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_snapshot/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_snapshot/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_snapshot/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_snapshot/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_snapshot/tasks/main.yml
new file mode 100644
index 00000000..e6170b32
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_config_snapshot/tasks/main.yml
@@ -0,0 +1,144 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: create a snapshot - creation works
+ cisco.aci.aci_config_snapshot: &create_snapshot
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ export_policy: anstest
+ max_count: 10
+ include_secure: no
+ format: json
+ description: ansible test
+ register: create
+
+- name: update snapshot to include secure and use xml - update works
+ cisco.aci.aci_config_snapshot:
+ <<: *create_snapshot
+ include_secure: yes
+ format: xml
+ register: create_update
+
+- name: create a snapshot invalid max_count - error message
+ cisco.aci.aci_config_snapshot:
+ <<: *create_snapshot
+ max_count: 11
+ ignore_errors: yes
+ register: invalid_max_count
+
+- name: create a snapshot invalid max_count - error message
+ cisco.aci.aci_config_snapshot:
+ <<: *create_snapshot
+ export_policy: "{{ fake_var | default(omit) }}"
+ ignore_errors: yes
+ register: missing_param
+
+- name: present assertion tests
+ assert:
+ that:
+ - create is not failed
+ - create is changed
+ - create.sent.configExportP.attributes.adminSt == "triggered"
+ - create_update is not failed
+ - create_update is changed
+ - create_update.sent.configExportP.attributes.adminSt == 'triggered'
+ - create_update.sent.configExportP.attributes.format == 'xml'
+ - create_update.sent.configExportP.attributes.includeSecureFields == 'yes'
+ - invalid_max_count is failed
+ - invalid_max_count.msg == "Parameter 'max_count' must be a number between 1 and 10"
+ - missing_param is failed
+ - 'missing_param.msg == "state is present but all of the following are missing: export_policy"'
+
+- name: query with export_policy
+ cisco.aci.aci_config_snapshot: &query_snapshot
+ <<: *create_snapshot
+ state: query
+ register: query_export
+
+- name: generate snapshot name
+ set_fact:
+ test_snapshot: "{{ query_export.current.0.configSnapshotCont.children.0.configSnapshot.attributes.rn.strip('snapshot-') }}"
+
+- name: query with export_policy and snapshot
+ cisco.aci.aci_config_snapshot: &query_both
+ <<: *query_snapshot
+ snapshot: "{{ test_snapshot }}"
+ register: query_export_snapshot
+
+- name: query with snapshot - module add run- to snapshot
+ cisco.aci.aci_config_snapshot:
+ <<: *query_snapshot
+ export_policy: "{{ fake_var | default(omit) }}"
+ snapshot: "{{ test_snapshot.strip('run-') }}"
+ register: query_snapshot
+
+- name: query no params
+ cisco.aci.aci_config_snapshot:
+ <<: *query_snapshot
+ export_policy: "{{ fake_var | default(omit) }}"
+ register: query_all
+
+- name: query assertion tests
+ assert:
+ that:
+ - query_export is not failed
+ - query_export is not changed
+ - '"snapshots-[uni/fabric/configexp-anstest].json" in query_export.url'
+ - query_export.current.0.configSnapshotCont.attributes.name == "anstest"
+ - query_export.current.0.configSnapshotCont.children | length > 1
+ - query_export_snapshot is not failed
+ - query_export_snapshot is not changed
+ - '"snapshots-[uni/fabric/configexp-anstest]/snapshot-{{ test_snapshot }}.json" in query_export_snapshot.url'
+ - query_export_snapshot.current | length == 1
+ - query_snapshot is not failed
+ - query_snapshot is not changed
+ - '"class/configSnapshot.json" in query_snapshot.url'
+ - '"configSnapshot.name,\"{{ test_snapshot }}\"" in query_snapshot.filter_string'
+ - query_all is not failed
+ - query_all is not changed
+ - '"class/configSnapshot.json" in query_all.url'
+ - query_all.current | length > 1
+
+- name: delete works
+ cisco.aci.aci_config_snapshot: &delete
+ <<: *query_both
+ state: absent
+ register: delete_snapshot
+
+- name: delete works - idempotency
+ cisco.aci.aci_config_snapshot:
+ <<: *delete
+ register: delete_idempotent
+
+- name: delete missing param
+ cisco.aci.aci_config_snapshot:
+ <<: *delete
+ snapshot: "{{ fake_var | default(omit) }}"
+ ignore_errors: yes
+ register: delete_missing_param
+
+- name: absent assertion tests
+ assert:
+ that:
+ - delete_snapshot is not failed
+ - delete_snapshot is changed
+ - delete_snapshot.sent.configSnapshot.attributes.retire == 'yes'
+ - delete_snapshot.previous != []
+ - delete_snapshot.previous.0.configSnapshot.attributes.name == test_snapshot
+ - delete_idempotent is not failed
+ - delete_idempotent is not changed
+ - delete_idempotent.previous == []
+ - delete_missing_param is failed
+ - 'delete_missing_param.msg == "state is absent but all of the following are missing: snapshot"'
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract/tasks/main.yml
new file mode 100644
index 00000000..f31e2fbc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract/tasks/main.yml
@@ -0,0 +1,164 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ tenant: anstest
+ state: present
+ register: tenant_present
+
+- name: create contract - check mode works
+ cisco.aci.aci_contract: &aci_contract_present
+ <<: *aci_tenant_present
+ contract: anstest
+ description: Ansible Test
+ check_mode: yes
+ register: present_check_mode
+
+- name: create contract - creation works
+ cisco.aci.aci_contract:
+ <<: *aci_contract_present
+ register: contract_present
+
+- name: create contract - idempotency works
+ cisco.aci.aci_contract:
+ <<: *aci_contract_present
+ register: present_idempotent
+
+- name: update contract - update works
+ cisco.aci.aci_contract:
+ <<: *aci_contract_present
+ scope: application-profile
+ register: present_update
+
+- name: create contract - used for query
+ cisco.aci.aci_contract:
+ <<: *aci_contract_present
+ contract: anstest2
+
+- name: missing param - failure message works
+ cisco.aci.aci_contract:
+ <<: *aci_tenant_present
+ ignore_errors: yes
+ register: present_missing_param
+
+- name: present assertions
+ assert:
+ that:
+ - present_check_mode is changed
+ - present_check_mode.previous == []
+ - present_check_mode.sent.vzBrCP.attributes.name == 'anstest'
+ - present_check_mode.sent.vzBrCP.attributes.descr == 'Ansible Test'
+ - contract_present is changed
+ - contract_present.sent == present_check_mode.sent
+ - present_idempotent is not changed
+ - present_update is changed
+ - present_update.sent != present_update.proposed
+ - present_update.sent.vzBrCP.attributes.scope == "application-profile"
+ - present_missing_param is failed
+ - 'present_missing_param.msg == "state is present but all of the following are missing: contract"'
+
+- name: query contract
+ cisco.aci.aci_contract: &aci_contract_query
+ <<: *aci_contract_present
+ state: query
+ register: query_contract
+
+- name: query all in tenant
+ cisco.aci.aci_contract:
+ <<: *aci_contract_query
+ contract: "{{ fakevar | default(omit) }}"
+ register: query_tenant
+
+- name: query all with name
+ cisco.aci.aci_contract:
+ <<: *aci_contract_query
+ tenant: "{{ fakevar | default(omit) }}"
+ register: query_name
+
+- name: query all
+ cisco.aci.aci_contract:
+ <<: *aci_contract_query
+ tenant: "{{ fakevar | default(omit) }}"
+ contract: "{{ fakevar | default(omit) }}"
+ register: query_all
+
+- name: query assertions
+ assert:
+ that:
+ - query_contract is not changed
+ - query_contract.current | length == 1
+ - '"tn-anstest/brc-anstest.json" in query_contract.url'
+ - query_tenant is not changed
+ - query_tenant.current | length == 1
+ - query_tenant.current.0.fvTenant.children | length > 1
+ - '"rsp-subtree-class=vzBrCP" in query_tenant.filter_string'
+ - '"tn-anstest.json" in query_tenant.url'
+ - query_name is not changed
+ - query_name.current != []
+ - '"query-target-filter=eq(vzBrCP.name,\"anstest\")" in query_name.filter_string'
+ - '"class/vzBrCP.json" in query_name.url'
+ - query_all is not changed
+ - query_all.current | length > 1
+ - '"class/vzBrCP.json" in query_all.url'
+
+- name: delete contract - check mode works
+ cisco.aci.aci_contract: &aci_contract_absent
+ <<: *aci_contract_present
+ state: absent
+ check_mode: yes
+ register: absent_check_mode
+
+- name: delete contract - deletion works
+ cisco.aci.aci_contract:
+ <<: *aci_contract_absent
+ register: contract_absent
+
+- name: delete contract - idempotency works
+ cisco.aci.aci_contract:
+ <<: *aci_contract_absent
+ register: absent_idempotent
+
+- name: delete contract - cleanup second contract
+ cisco.aci.aci_contract:
+ <<: *aci_contract_absent
+ contract: anstest2
+
+- name: missing param - fail message works
+ cisco.aci.aci_contract:
+ <<: *aci_contract_absent
+ tenant: "{{ fakevar | default(omit) }}"
+ ignore_errors: yes
+ register: absent_missing_param
+
+- name: absent assertions
+ assert:
+ that:
+ - absent_check_mode is changed
+ - absent_check_mode.previous != []
+ - contract_absent is changed
+ - contract_absent.previous == absent_check_mode.previous
+ - absent_idempotent is not changed
+ - absent_idempotent.previous == []
+ - absent_missing_param is failed
+ - 'absent_missing_param.msg == "state is absent but all of the following are missing: tenant"'
+
+- name: cleanup tenant
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_present
+ state: absent
+ when: tenant_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject/tasks/main.yml
new file mode 100644
index 00000000..f60d7ee7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject/tasks/main.yml
@@ -0,0 +1,246 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: present
+ tenant: anstest
+ register: tenant_present
+
+- name: ensure contract exists for tests to kick off
+ cisco.aci.aci_contract: &aci_contract_present
+ <<: *aci_tenant_present
+ contract: anstest
+ register: contract_present
+
+- name: create subject - check mode works
+ cisco.aci.aci_contract_subject: &aci_subject_present
+ <<: *aci_contract_present
+ subject: anstest
+ description: Ansible Test
+ check_mode: yes
+ register: subject_present_check_mode
+
+- name: create subject - creation works
+ cisco.aci.aci_contract_subject:
+ <<: *aci_subject_present
+ register: subject_present
+
+- name: create subject - idempotency works
+ cisco.aci.aci_contract_subject:
+ <<: *aci_subject_present
+ register: subject_present_idempotent
+
+- name: update subject - update works
+ cisco.aci.aci_contract_subject:
+ <<: *aci_subject_present
+ description: Ansible Test
+ reverse_filter: "yes"
+ provider_match: at_most_one
+ priority: level2
+ register: subject_update
+
+- name: create subject - try additional params
+ cisco.aci.aci_contract_subject: &aci_subject_present_2
+ <<: *aci_contract_present
+ subject: anstest2
+ reverse_filter: "no"
+ consumer_match: all
+ priority: level3
+ register: subject_present_2
+
+- name: missing param - failure message works
+ cisco.aci.aci_contract_subject:
+ <<: *aci_tenant_present
+ ignore_errors: yes
+ register: present_missing_param
+
+- name: present assertions
+ assert:
+ that:
+ - subject_present_check_mode is changed
+ - subject_present_check_mode.sent.vzSubj.attributes.descr == 'Ansible Test'
+ - subject_present_check_mode.sent.vzSubj.attributes.name == 'anstest'
+ - subject_present is changed
+ - subject_present.previous == []
+ - subject_present.sent == subject_present_check_mode.sent
+ - subject_present_idempotent is not changed
+ - subject_present_idempotent.previous != []
+ - subject_update is changed
+ - subject_update.sent != subject_update.proposed
+ - subject_update.sent.vzSubj.attributes.prio == 'level2'
+ - subject_update.sent.vzSubj.attributes.provMatchT == 'AtmostOne'
+ - subject_present_2 is changed
+ - subject_present_2.sent.vzSubj.attributes.consMatchT == 'All'
+ - subject_present_2.sent.vzSubj.attributes.name == 'anstest2'
+ - subject_present_2.sent.vzSubj.attributes.prio == 'level3'
+ - subject_present_2.sent.vzSubj.attributes.revFltPorts == 'no'
+ - present_missing_param is failed
+ - 'present_missing_param.msg == "state is present but all of the following are missing: contract, subject"'
+
+- name: query tenant contract subject
+ cisco.aci.aci_contract_subject: &aci_query_subject
+ <<: *aci_subject_present
+ state: query
+ register: query_tenant_contract_subject
+
+- name: query tenant contract
+ cisco.aci.aci_contract_subject:
+ <<: *aci_query_subject
+ subject: "{{ fakevar | default(omit) }}"
+ register: query_tenant_contract
+
+- name: query tenant subject
+ cisco.aci.aci_contract_subject:
+ <<: *aci_query_subject
+ contract: "{{ fakevar | default(omit) }}"
+ register: query_tenant_subject
+
+- name: query contract subject
+ cisco.aci.aci_contract_subject:
+ <<: *aci_query_subject
+ tenant: "{{ fakevar | default(omit) }}"
+ register: query_contract_subject
+
+- name: query tenant
+ cisco.aci.aci_contract_subject:
+ <<: *aci_tenant_present
+ state: query
+ register: query_tenant
+
+- name: query contract
+ cisco.aci.aci_contract_subject:
+ <<: *aci_contract_present
+ state: query
+ tenant: "{{ fakevar | default(omit) }}"
+ register: query_contract
+
+- name: query subject
+ cisco.aci.aci_contract_subject:
+ <<: *aci_query_subject
+ tenant: "{{ fakevar | default(omit) }}"
+ contract: "{{ fakevar | default(omit) }}"
+ register: query_subject
+
+- name: query all
+ cisco.aci.aci_contract_subject:
+ <<: *aci_tenant_present
+ state: query
+ tenant: "{{ fakevar | default(omit) }}"
+ register: query_all
+
+- name: query assertions
+ assert:
+ that:
+ - query_tenant_contract_subject is not changed
+ - query_tenant_contract_subject.current | length == 1
+ - query_tenant_contract_subject.current.0.vzSubj.attributes.name == "anstest"
+ - '"tn-anstest/brc-anstest/subj-anstest.json" in query_tenant_contract_subject.url'
+ - query_tenant_contract is not changed
+ - query_tenant_contract.current | length == 1
+ - query_tenant_contract.current.0.vzBrCP.attributes.name == "anstest"
+ - query_tenant_contract.current.0.vzBrCP.children | length == 2
+ - '"rsp-subtree-class=vzSubj" in query_tenant_contract.filter_string'
+ - '"tn-anstest/brc-anstest.json" in query_tenant_contract.url'
+ - query_tenant_subject is not changed
+ - query_tenant_subject.current | length == 1
+ - query_tenant_subject.current.0.fvTenant.attributes.name == "anstest"
+ - query_tenant_subject.current.0.fvTenant.children.0.vzBrCP.children | length == 1
+ - query_tenant_subject.current.0.fvTenant.children.0.vzBrCP.children.0.vzSubj.attributes.name == "anstest"
+ - '"rsp-subtree-filter=eq(vzSubj.name,\"anstest\")" in query_tenant_subject.filter_string'
+ - '"rsp-subtree-class=vzSubj" in query_tenant_subject.filter_string'
+ - '"tn-anstest.json" in query_tenant_subject.url'
+ - query_contract_subject is not changed
+ - query_contract_subject.current.0.vzBrCP.attributes.name == "anstest"
+ - query_contract_subject.current.0.vzBrCP.children | length == 1
+ - query_contract_subject.current.0.vzBrCP.children.0.vzSubj.attributes.name == "anstest"
+ - '"query-target-filter=eq(vzBrCP.name,\"anstest\")" in query_contract_subject.filter_string'
+ - '"rsp-subtree-filter=eq(vzSubj.name,\"anstest\")" in query_contract_subject.filter_string'
+ - '"rsp-subtree-class=vzSubj" in query_contract_subject.filter_string'
+ - '"class/vzBrCP.json" in query_contract_subject.url'
+ - query_tenant is not changed
+ - query_tenant.current | length == 1
+ - query_tenant.current.0.fvTenant.attributes.name == "anstest"
+ - '"rsp-subtree-class=vzBrCP,vzSubj" in query_tenant.filter_string'
+ - '"tn-anstest.json" in query_tenant.url'
+ - query_contract is not changed
+ - query_contract.current.0.vzBrCP.attributes.name == "anstest"
+ - '"query-target-filter=eq(vzBrCP.name,\"anstest\")" in query_contract.filter_string'
+ - '"rsp-subtree-class=vzSubj" in query_contract.filter_string'
+ - '"class/vzBrCP.json" in query_contract.url'
+ - query_subject is not changed
+ - query_subject.current.0.vzSubj.attributes.name == "anstest"
+ - '"query-target-filter=eq(vzSubj.name,\"anstest\")" in query_subject.filter_string'
+ - '"class/vzSubj.json" in query_subject.url'
+ - query_all is not changed
+ - query_all.current|length > 1
+ - query_all.current.0.vzSubj is defined
+ - '"class/vzSubj.json" in query_all.url'
+
+- name: delete subject - check mode works
+ cisco.aci.aci_contract_subject: &aci_subject_absent
+ <<: *aci_subject_present
+ state: absent
+ check_mode: yes
+ register: subject_absent_check_mode
+
+- name: delete subject - deletion works
+ cisco.aci.aci_contract_subject:
+ <<: *aci_subject_absent
+ register: subject_absent
+
+- name: delete subject - idempotency works
+ cisco.aci.aci_contract_subject:
+ <<: *aci_subject_absent
+ register: subject_absent_idempotent
+
+- name: delete subject - cleanup
+ cisco.aci.aci_contract_subject:
+ <<: *aci_subject_present_2
+ state: absent
+
+- name: missing params - failure message works
+ cisco.aci.aci_contract_subject:
+ <<: *aci_subject_absent
+ subject: "{{ fakevar | default(omit) }}"
+ ignore_errors: yes
+ register: absent_missing_param
+
+- name: absent assertions
+ assert:
+ that:
+ - subject_absent_check_mode is changed
+ - subject_absent_check_mode.previous != []
+ - subject_absent_check_mode.proposed == {}
+ - subject_absent is changed
+ - subject_absent.previous == subject_absent_check_mode.previous
+ - subject_absent_idempotent is not changed
+ - subject_absent_idempotent.previous == []
+ - absent_missing_param is failed
+ - 'absent_missing_param.msg == "state is absent but all of the following are missing: subject"'
+
+- name: cleanup contract
+ cisco.aci.aci_contract:
+ <<: *aci_contract_present
+ state: absent
+ when: contract_present is changed
+
+- name: cleanup tenant
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_present
+ state: absent
+ when: tenant_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject_to_filter/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject_to_filter/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject_to_filter/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject_to_filter/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject_to_filter/tasks/main.yml
new file mode 100644
index 00000000..8448f2c9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_contract_subject_to_filter/tasks/main.yml
@@ -0,0 +1,194 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: anstest
+ state: present
+ register: tenant_present
+
+- name: ensure filter exists for tests to kick off
+ cisco.aci.aci_filter: &aci_filter_present
+ <<: *aci_tenant_present
+ filter: anstest
+ register: filter_present
+
+- name: ensure filter exists for tests to kick off
+ cisco.aci.aci_filter: &aci_filter_present_2
+ <<: *aci_tenant_present
+ filter: anstest2
+ register: filter_present_2
+
+- name: ensure contract exists for tests to kick off
+ cisco.aci.aci_contract: &aci_contract_present
+ <<: *aci_tenant_present
+ contract: anstest
+ register: contract_present
+
+- name: ensure subject exists for tests to kick off
+ cisco.aci.aci_contract_subject: &aci_subject_present
+ <<: *aci_contract_present
+ subject: anstest
+ register: subject_present
+
+- name: create subject filter binding - check mode works
+ cisco.aci.aci_contract_subject_to_filter: &aci_subject_filter_present
+ <<: *aci_subject_present
+ filter: anstest
+ log: log
+ check_mode: yes
+ register: subject_filter_present_check_mode
+
+- name: create subject filter binding - creation works
+ cisco.aci.aci_contract_subject_to_filter:
+ <<: *aci_subject_filter_present
+ register: subject_filter_present
+
+- name: create subject filter binding - additional testing
+ cisco.aci.aci_contract_subject_to_filter: &aci_subject_filter_present_2
+ <<: *aci_subject_filter_present
+ filter: anstest2
+ register: subject_filter_present_2
+
+- name: create subject filter binding - idempotency works
+ cisco.aci.aci_contract_subject_to_filter:
+ <<: *aci_subject_filter_present
+ register: subject_filter_present_idempotent
+
+- name: update subject filter binding - update works
+ cisco.aci.aci_contract_subject_to_filter:
+ <<: *aci_subject_filter_present
+ log: none
+ register: subject_filter_update
+
+- name: missing param - failure message works
+ cisco.aci.aci_contract_subject_to_filter:
+ <<: *aci_tenant_present
+ ignore_errors: yes
+ register: present_missing_param
+
+- name: present assertions
+ assert:
+ that:
+ - subject_filter_present_check_mode is changed
+ - subject_filter_present_check_mode.previous == []
+ - subject_filter_present_check_mode.sent.vzRsSubjFiltAtt.attributes.directives == 'log'
+ - subject_filter_present_check_mode.sent.vzRsSubjFiltAtt.attributes.tnVzFilterName == 'anstest'
+ - subject_filter_present is changed
+ - subject_filter_present.previous == []
+ - subject_filter_present.sent == subject_filter_present_check_mode.sent
+ - subject_filter_present_2 is changed
+ - subject_filter_present_idempotent is not changed
+ - subject_filter_present_idempotent.previous != []
+ - subject_filter_update is changed
+ - subject_filter_update.sent.vzRsSubjFiltAtt.attributes.directives == ''
+ - present_missing_param is failed
+ - 'present_missing_param.msg == "state is present but all of the following are missing: contract, filter, subject"'
+
+- name: query all
+ cisco.aci.aci_contract_subject_to_filter:
+ <<: *aci_tenant_present
+ state: query
+ tenant: "{{ fakevar | default(omit) }}"
+ register: query_all
+
+- name: query binding
+ cisco.aci.aci_contract_subject_to_filter:
+ <<: *aci_subject_filter_present
+ state: query
+ register: query_binding
+
+- name: query assertions
+ assert:
+ that:
+ - query_all is not changed
+ - query_all.current | length > 1
+ - query_all.current.0.vzRsSubjFiltAtt is defined
+ - query_binding is not changed
+ - query_binding.current != []
+
+- name: delete subject filter binding - check mode works
+ cisco.aci.aci_contract_subject_to_filter: &aci_subject_filter_absent
+ <<: *aci_subject_filter_present
+ state: absent
+ check_mode: yes
+ register: subject_filter_absent_check_mode
+
+- name: delete subject filter binding - deletion works
+ cisco.aci.aci_contract_subject_to_filter:
+ <<: *aci_subject_filter_absent
+ register: subject_filter_absent
+
+- name: delete subject filter binding - idempotency works
+ cisco.aci.aci_contract_subject_to_filter:
+ <<: *aci_subject_filter_absent
+ register: subject_filter_absent_idempotent
+
+- name: missing param - failure message works
+ cisco.aci.aci_contract_subject_to_filter:
+ <<: *aci_subject_filter_absent
+ filter: "{{ fakevar | default(omit) }}"
+ ignore_errors: yes
+ register: absent_missing_param
+
+- name: cleanup subject filter binding
+ cisco.aci.aci_contract_subject_to_filter:
+ <<: *aci_subject_filter_present_2
+ state: absent
+
+- name: absent assertions
+ assert:
+ that:
+ - subject_filter_absent_check_mode is changed
+ - subject_filter_absent_check_mode.proposed == {}
+ - subject_filter_absent_check_mode.previous != []
+ - subject_filter_absent is changed
+ - subject_filter_absent.previous != []
+ - subject_filter_absent_idempotent is not changed
+ - subject_filter_absent_idempotent.previous == []
+ - absent_missing_param is failed
+ - 'absent_missing_param.msg == "state is absent but all of the following are missing: filter"'
+
+- name: cleanup subject
+ cisco.aci.aci_contract_subject:
+ <<: *aci_subject_present
+ state: absent
+ when: subject_present is changed
+
+- name: cleanup contract
+ cisco.aci.aci_contract:
+ <<: *aci_contract_present
+ state: absent
+ when: contract_present is changed
+
+- name: cleanup filter
+ cisco.aci.aci_filter:
+ <<: *aci_filter_present
+ state: absent
+ when: filter_present is changed
+
+- name: cleanup filter
+ cisco.aci.aci_filter:
+ <<: *aci_filter_present_2
+ state: absent
+ when: filter_present_2 is changed
+
+- name: cleanup tenant
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_present
+ state: absent
+ when: tenant_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/fc.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/fc.yml
new file mode 100644
index 00000000..abc01ac2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/fc.yml
@@ -0,0 +1,176 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove FC domain
+ cisco.aci.aci_domain: &domain_absent
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: fc_dom
+ domain_type: fc
+ state: absent
+
+
+# ADD DOMAIN
+- name: Add FC domain (check_mode)
+ cisco.aci.aci_domain: &domain_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: fc_dom
+ domain_type: fc
+ state: present
+ check_mode: yes
+ register: cm_add_domain
+
+- name: Add FC domain (normal mode)
+ cisco.aci.aci_domain: *domain_present
+ register: nm_add_domain
+
+- name: Verify FC add_domain
+ assert:
+ that:
+ - cm_add_domain is changed
+ - nm_add_domain is changed
+ - cm_add_domain.sent.fcDomP.attributes.name == nm_add_domain.sent.fcDomP.attributes.name == 'fc_dom'
+ - cm_add_domain.proposed.fcDomP.attributes.name == nm_add_domain.proposed.fcDomP.attributes.name == 'fc_dom'
+ - cm_add_domain.current == cm_add_domain.previous == nm_add_domain.previous == []
+ - nm_add_domain.current.0.fcDomP.attributes.name == 'fc_dom'
+ - nm_add_domain.current.0.fcDomP.attributes.dn == 'uni/fc-fc_dom'
+
+- name: Add FC domain again (check_mode)
+ cisco.aci.aci_domain: *domain_present
+ check_mode: yes
+ register: cm_add_domain_again
+
+- name: Add FC domain again (normal mode)
+ cisco.aci.aci_domain: *domain_present
+ register: nm_add_domain_again
+
+- name: Verify FC add_domain_again
+ assert:
+ that:
+ - cm_add_domain_again is not changed
+ - nm_add_domain_again is not changed
+
+
+# QUERY ALL DOMAINS
+- name: Query all FC domains (check_mode)
+ cisco.aci.aci_domain: &domain_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain_type: fc
+ state: query
+ check_mode: yes
+ register: cm_query_all_domains
+
+- name: Query all FC domains (normal mode)
+ cisco.aci.aci_domain: *domain_query
+ register: nm_query_all_domains
+
+- name: Verify FC query_all_domains
+ assert:
+ that:
+ - cm_query_all_domains is not changed
+ - nm_query_all_domains is not changed
+ - cm_query_all_domains == nm_query_all_domains
+ - nm_query_all_domains.current|length >= 1
+
+
+# QUERY A DOMAIN
+- name: Query our FC domain (check_mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: fc_dom
+ check_mode: yes
+ register: cm_query_domain
+
+- name: Query our FC domain (normal mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: fc_dom
+ register: nm_query_domain
+
+- name: Verify FC query_domain
+ assert:
+ that:
+ - cm_query_domain is not changed
+ - nm_query_domain is not changed
+ - cm_query_domain == nm_query_domain
+ - nm_query_domain.current.0.fcDomP.attributes.dn == 'uni/fc-fc_dom'
+ - nm_query_domain.current.0.fcDomP.attributes.name == 'fc_dom'
+
+
+# REMOVE DOMAIN
+- name: Remove FC domain (check_mode)
+ cisco.aci.aci_domain: *domain_absent
+ check_mode: yes
+ register: cm_remove_domain
+
+- name: Remove FC domain (normal mode)
+ cisco.aci.aci_domain: *domain_absent
+ register: nm_remove_domain
+
+- name: Verify FC remove_domain
+ assert:
+ that:
+ - cm_remove_domain is changed
+ - nm_remove_domain is changed
+ - cm_remove_domain.current.0.fcDomP.attributes.name == cm_remove_domain.previous.0.fcDomP.attributes.name == nm_remove_domain.previous.0.fcDomP.attributes.name == 'fc_dom'
+ - cm_remove_domain.current.0.fcDomP.attributes.dn == cm_remove_domain.previous.0.fcDomP.attributes.dn == nm_remove_domain.previous.0.fcDomP.attributes.dn == 'uni/fc-fc_dom'
+ - nm_remove_domain.current == []
+
+- name: Remove FC domain again (check_mode)
+ cisco.aci.aci_domain: *domain_absent
+ check_mode: yes
+ register: cm_remove_domain_again
+
+- name: Remove FC domain again (normal mode)
+ cisco.aci.aci_domain: *domain_absent
+ register: nm_remove_domain_again
+
+- name: Verify FC remove_domain_again
+ assert:
+ that:
+ - cm_remove_domain_again is not changed
+ - nm_remove_domain_again is not changed
+
+
+# QUERY NON-EXISTING DOMAIN
+- name: Query non-existing FC domain (check_mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: fc_dom
+ check_mode: yes
+ register: cm_query_non_domain
+
+- name: Query non-existing FC domain (normal mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: fc_dom
+ register: nm_query_non_domain
+
+- name: Verify FC query_non_domain
+ assert:
+ that:
+ - cm_query_non_domain is not changed
+ - nm_query_non_domain is not changed
+ - cm_query_non_domain == nm_query_non_domain
+ - nm_query_non_domain.current == []
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/l2dom.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/l2dom.yml
new file mode 100644
index 00000000..29b46896
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/l2dom.yml
@@ -0,0 +1,176 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove L2 domain
+ cisco.aci.aci_domain: &domain_absent
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: l2_dom
+ domain_type: l2dom
+ state: absent
+
+
+# ADD DOMAIN
+- name: Add L2 domain (check_mode)
+ cisco.aci.aci_domain: &domain_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: l2_dom
+ domain_type: l2dom
+ state: present
+ check_mode: yes
+ register: cm_add_domain
+
+- name: Add L2 domain (normal mode)
+ cisco.aci.aci_domain: *domain_present
+ register: nm_add_domain
+
+- name: Verify L2 add_domain
+ assert:
+ that:
+ - cm_add_domain is changed
+ - nm_add_domain is changed
+ - cm_add_domain.sent.l2extDomP.attributes.name == nm_add_domain.sent.l2extDomP.attributes.name == 'l2_dom'
+ - cm_add_domain.proposed.l2extDomP.attributes.name == nm_add_domain.proposed.l2extDomP.attributes.name == 'l2_dom'
+ - cm_add_domain.current == cm_add_domain.previous == nm_add_domain.previous == []
+ - nm_add_domain.current.0.l2extDomP.attributes.name == 'l2_dom'
+ - nm_add_domain.current.0.l2extDomP.attributes.dn == 'uni/l2dom-l2_dom'
+
+- name: Add L2 domain again (check_mode)
+ cisco.aci.aci_domain: *domain_present
+ check_mode: yes
+ register: cm_add_domain_again
+
+- name: Add L2 domain again (normal mode)
+ cisco.aci.aci_domain: *domain_present
+ register: nm_add_domain_again
+
+- name: Verify L2 add_domain_again
+ assert:
+ that:
+ - cm_add_domain_again is not changed
+ - nm_add_domain_again is not changed
+
+
+# QUERY ALL DOMAINS
+- name: Query all L2 domains (check_mode)
+ cisco.aci.aci_domain: &domain_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain_type: l2dom
+ state: query
+ check_mode: yes
+ register: cm_query_all_domains
+
+- name: Query all L2 domains (normal mode)
+ cisco.aci.aci_domain: *domain_query
+ register: nm_query_all_domains
+
+- name: Verify L2 query_all_domains
+ assert:
+ that:
+ - cm_query_all_domains is not changed
+ - nm_query_all_domains is not changed
+ - cm_query_all_domains == nm_query_all_domains
+ - nm_query_all_domains.current|length >= 1
+
+
+# QUERY A DOMAIN
+- name: Query our L2 domain (check_mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: l2_dom
+ check_mode: yes
+ register: cm_query_domain
+
+- name: Query our L2 domain (normal mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: l2_dom
+ register: nm_query_domain
+
+- name: Verify L2 query_domain
+ assert:
+ that:
+ - cm_query_domain is not changed
+ - nm_query_domain is not changed
+ - cm_query_domain == nm_query_domain
+ - nm_query_domain.current.0.l2extDomP.attributes.dn == 'uni/l2dom-l2_dom'
+ - nm_query_domain.current.0.l2extDomP.attributes.name == 'l2_dom'
+
+
+# REMOVE DOMAIN
+- name: Remove L2 domain (check_mode)
+ cisco.aci.aci_domain: *domain_absent
+ check_mode: yes
+ register: cm_remove_domain
+
+- name: Remove L2 domain (normal mode)
+ cisco.aci.aci_domain: *domain_absent
+ register: nm_remove_domain
+
+- name: Verify L2 remove_domain
+ assert:
+ that:
+ - cm_remove_domain is changed
+ - nm_remove_domain is changed
+ - cm_remove_domain.current.0.l2extDomP.attributes.dn == cm_remove_domain.previous.0.l2extDomP.attributes.dn == nm_remove_domain.previous.0.l2extDomP.attributes.dn == 'uni/l2dom-l2_dom'
+ - cm_remove_domain.current.0.l2extDomP.attributes.name == cm_remove_domain.previous.0.l2extDomP.attributes.name == nm_remove_domain.previous.0.l2extDomP.attributes.name == 'l2_dom'
+ - nm_remove_domain.current == []
+
+- name: Remove L2 domain again (check_mode)
+ cisco.aci.aci_domain: *domain_absent
+ check_mode: yes
+ register: cm_remove_domain_again
+
+- name: Remove L2 domain again (normal mode)
+ cisco.aci.aci_domain: *domain_absent
+ register: nm_remove_domain_again
+
+- name: Verify L2 remove_domain_again
+ assert:
+ that:
+ - cm_remove_domain_again is not changed
+ - nm_remove_domain_again is not changed
+
+
+# QUERY NON-EXISTING DOMAIN
+- name: Query non-existing L2 domain (check_mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: l2_dom
+ check_mode: yes
+ register: cm_query_non_domain
+
+- name: Query non-existing L2 domain (normal mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: l2_dom
+ register: nm_query_non_domain
+
+- name: Verify L2 query_non_domain
+ assert:
+ that:
+ - cm_query_non_domain is not changed
+ - nm_query_non_domain is not changed
+ - cm_query_non_domain == nm_query_non_domain
+ - nm_query_non_domain.current == []
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/l3dom.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/l3dom.yml
new file mode 100644
index 00000000..16bc72d4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/l3dom.yml
@@ -0,0 +1,176 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove L3 domain
+ cisco.aci.aci_domain: &domain_absent
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: l3_dom
+ domain_type: l3dom
+ state: absent
+
+
+# ADD DOMAIN
+- name: Add L3 domain (check_mode)
+ cisco.aci.aci_domain: &domain_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: l3_dom
+ domain_type: l3dom
+ state: present
+ check_mode: yes
+ register: cm_add_domain
+
+- name: Add L3 domain (normal mode)
+ cisco.aci.aci_domain: *domain_present
+ register: nm_add_domain
+
+- name: Verify L3 add_domain
+ assert:
+ that:
+ - cm_add_domain is changed
+ - nm_add_domain is changed
+ - cm_add_domain.sent.l3extDomP.attributes.name == nm_add_domain.sent.l3extDomP.attributes.name == 'l3_dom'
+ - cm_add_domain.proposed.l3extDomP.attributes.name == nm_add_domain.proposed.l3extDomP.attributes.name == 'l3_dom'
+ - cm_add_domain.current == cm_add_domain.previous == nm_add_domain.previous == []
+ - nm_add_domain.current.0.l3extDomP.attributes.name == 'l3_dom'
+ - nm_add_domain.current.0.l3extDomP.attributes.dn == 'uni/l3dom-l3_dom'
+
+- name: Add L3 domain again (check_mode)
+ cisco.aci.aci_domain: *domain_present
+ check_mode: yes
+ register: cm_add_domain_again
+
+- name: Add L3 domain again (normal mode)
+ cisco.aci.aci_domain: *domain_present
+ register: nm_add_domain_again
+
+- name: Verify L3 add_domain_again
+ assert:
+ that:
+ - cm_add_domain_again is not changed
+ - nm_add_domain_again is not changed
+
+
+# QUERY ALL DOMAINS
+- name: Query all L3 domains (check_mode)
+ cisco.aci.aci_domain: &domain_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain_type: l3dom
+ state: query
+ check_mode: yes
+ register: cm_query_all_domains
+
+- name: Query all L3 domains (normal mode)
+ cisco.aci.aci_domain: *domain_query
+ register: nm_query_all_domains
+
+- name: Verify query_all_domains
+ assert:
+ that:
+ - cm_query_all_domains is not changed
+ - nm_query_all_domains is not changed
+ - cm_query_all_domains == nm_query_all_domains
+ - nm_query_all_domains.current|length >= 1
+
+
+# QUERY A DOMAIN
+- name: Query our L3 domain (check_mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: l3_dom
+ check_mode: yes
+ register: cm_query_domain
+
+- name: Query our L3 domain (normal mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: l3_dom
+ register: nm_query_domain
+
+- name: Verify L3 query_domain
+ assert:
+ that:
+ - cm_query_domain is not changed
+ - nm_query_domain is not changed
+ - cm_query_domain == nm_query_domain
+ - nm_query_domain.current.0.l3extDomP.attributes.dn == 'uni/l3dom-l3_dom'
+ - nm_query_domain.current.0.l3extDomP.attributes.name == 'l3_dom'
+
+
+# REMOVE DOMAIN
+- name: Remove L3 domain (check_mode)
+ cisco.aci.aci_domain: *domain_absent
+ check_mode: yes
+ register: cm_remove_domain
+
+- name: Remove L3 domain (normal mode)
+ cisco.aci.aci_domain: *domain_absent
+ register: nm_remove_domain
+
+- name: Verify L3 remove_domain
+ assert:
+ that:
+ - cm_remove_domain is changed
+ - nm_remove_domain is changed
+ - cm_remove_domain.current.0.l3extDomP.attributes.name == cm_remove_domain.previous.0.l3extDomP.attributes.name == nm_remove_domain.previous.0.l3extDomP.attributes.name == 'l3_dom'
+ - cm_remove_domain.current.0.l3extDomP.attributes.dn == cm_remove_domain.previous.0.l3extDomP.attributes.dn == nm_remove_domain.previous.0.l3extDomP.attributes.dn == 'uni/l3dom-l3_dom'
+ - nm_remove_domain.current == []
+
+- name: Remove L3 domain again (check_mode)
+ cisco.aci.aci_domain: *domain_absent
+ check_mode: yes
+ register: cm_remove_domain_again
+
+- name: Remove L3 domain again (normal mode)
+ cisco.aci.aci_domain: *domain_absent
+ register: nm_remove_domain_again
+
+- name: Verify L3 remove_domain_again
+ assert:
+ that:
+ - cm_remove_domain_again is not changed
+ - nm_remove_domain_again is not changed
+
+
+# QUERY NON-EXISTING DOMAIN
+- name: Query non-existing L3 domain (check_mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: l3_dom
+ check_mode: yes
+ register: cm_query_non_domain
+
+- name: Query non-existing L3 domain (normal mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: l3_dom
+ register: nm_query_non_domain
+
+- name: Verify L3 query_non_domain
+ assert:
+ that:
+ - cm_query_non_domain is not changed
+ - nm_query_non_domain is not changed
+ - cm_query_non_domain == nm_query_non_domain
+ - nm_query_non_domain.current == []
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/main.yml
new file mode 100644
index 00000000..be6c9712
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/main.yml
@@ -0,0 +1,24 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- include_tasks: phys.yml
+ when: phys is not defined or phys
+
+- include_tasks: l2dom.yml
+ when: l2dom is not defined or l2dom
+
+- include_tasks: l3dom.yml
+ when: l3dom is not defined or l3dom
+
+- include_tasks: fc.yml
+ when: fc is not defined or fc
+
+- include_tasks: vmm-vmware.yml
+ when: vmm_vmware is not defined or vmm_vmware
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/phys.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/phys.yml
new file mode 100644
index 00000000..7478858c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/phys.yml
@@ -0,0 +1,176 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove physical domain
+ cisco.aci.aci_domain: &domain_absent
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: phys_dom
+ domain_type: phys
+ state: absent
+
+
+# ADD DOMAIN
+- name: Add physical domain (check_mode)
+ cisco.aci.aci_domain: &domain_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: phys_dom
+ domain_type: phys
+ state: present
+ check_mode: yes
+ register: cm_add_domain
+
+- name: Add physical domain (normal mode)
+ cisco.aci.aci_domain: *domain_present
+ register: nm_add_domain
+
+- name: Verify physical add_domain
+ assert:
+ that:
+ - cm_add_domain is changed
+ - nm_add_domain is changed
+ - cm_add_domain.sent.physDomP.attributes.name == nm_add_domain.sent.physDomP.attributes.name == 'phys_dom'
+ - cm_add_domain.proposed.physDomP.attributes.name == nm_add_domain.proposed.physDomP.attributes.name == 'phys_dom'
+ - cm_add_domain.current == cm_add_domain.previous == nm_add_domain.previous == []
+ - nm_add_domain.current.0.physDomP.attributes.name == 'phys_dom'
+ - nm_add_domain.current.0.physDomP.attributes.dn == 'uni/phys-phys_dom'
+
+- name: Add physical domain again (check_mode)
+ cisco.aci.aci_domain: *domain_present
+ check_mode: yes
+ register: cm_add_domain_again
+
+- name: Add physical domain again (normal mode)
+ cisco.aci.aci_domain: *domain_present
+ register: nm_add_domain_again
+
+- name: Verify physical add_domain_again
+ assert:
+ that:
+ - cm_add_domain_again is not changed
+ - nm_add_domain_again is not changed
+
+
+# QUERY ALL DOMAINS
+- name: Query all physical domains (check_mode)
+ cisco.aci.aci_domain: &domain_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain_type: phys
+ state: query
+ check_mode: yes
+ register: cm_query_all_domains
+
+- name: Query all physical domains (normal mode)
+ cisco.aci.aci_domain: *domain_query
+ register: nm_query_all_domains
+
+- name: Verify physical query_all_domains
+ assert:
+ that:
+ - cm_query_all_domains is not changed
+ - nm_query_all_domains is not changed
+ - cm_query_all_domains == nm_query_all_domains
+ - nm_query_all_domains.current|length >= 1
+
+
+# QUERY A DOMAIN
+- name: Query our physical domain (check_mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: phys_dom
+ check_mode: yes
+ register: cm_query_domain
+
+- name: Query our physical domain (normal mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: phys_dom
+ register: nm_query_domain
+
+- name: Verify physical query_domain
+ assert:
+ that:
+ - cm_query_domain is not changed
+ - nm_query_domain is not changed
+ - cm_query_domain == nm_query_domain
+ - nm_query_domain.current.0.physDomP.attributes.dn == 'uni/phys-phys_dom'
+ - nm_query_domain.current.0.physDomP.attributes.name == 'phys_dom'
+
+
+# REMOVE DOMAIN
+- name: Remove physical domain (check_mode)
+ cisco.aci.aci_domain: *domain_absent
+ check_mode: yes
+ register: cm_remove_domain
+
+- name: Remove physical domain (normal mode)
+ cisco.aci.aci_domain: *domain_absent
+ register: nm_remove_domain
+
+- name: Verify physical remove_domain
+ assert:
+ that:
+ - cm_remove_domain is changed
+ - nm_remove_domain is changed
+ - cm_remove_domain.current.0.physDomP.attributes.name == cm_remove_domain.previous.0.physDomP.attributes.name == nm_remove_domain.previous.0.physDomP.attributes.name == 'phys_dom'
+ - cm_remove_domain.current.0.physDomP.attributes.dn == cm_remove_domain.previous.0.physDomP.attributes.dn == nm_remove_domain.previous.0.physDomP.attributes.dn == 'uni/phys-phys_dom'
+ - nm_remove_domain.current == []
+
+- name: Remove physical domain again (check_mode)
+ cisco.aci.aci_domain: *domain_absent
+ check_mode: yes
+ register: cm_remove_domain_again
+
+- name: Remove physical domain again (normal mode)
+ cisco.aci.aci_domain: *domain_absent
+ register: nm_remove_domain_again
+
+- name: Verify physical remove_domain_again
+ assert:
+ that:
+ - cm_remove_domain_again is not changed
+ - nm_remove_domain_again is not changed
+
+
+# QUERY NON-EXISTING DOMAIN
+- name: Query non-existing physical domain (check_mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: phys_dom
+ check_mode: yes
+ register: cm_query_non_domain
+
+- name: Query non-existing physical domain (normal mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: phys_dom
+ register: nm_query_non_domain
+
+- name: Verify physical query_non_domain
+ assert:
+ that:
+ - cm_query_non_domain is not changed
+ - nm_query_non_domain is not changed
+ - cm_query_non_domain == nm_query_non_domain
+ - nm_query_non_domain.current == []
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/vmm-vmware.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/vmm-vmware.yml
new file mode 100644
index 00000000..dde2a909
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain/tasks/vmm-vmware.yml
@@ -0,0 +1,184 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove VMM domain
+ cisco.aci.aci_domain: &domain_absent
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: vmm_dom
+ domain_type: vmm
+ vm_provider: vmware
+ state: absent
+
+
+# ADD DOMAIN
+- name: Add VMM domain (check_mode)
+ cisco.aci.aci_domain: &domain_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: vmm_dom
+ domain_type: vmm
+ vm_provider: vmware
+ state: present
+ check_mode: yes
+ register: cm_add_domain
+
+- name: Add VMM domain (normal mode)
+ cisco.aci.aci_domain: *domain_present
+ register: nm_add_domain
+
+- name: Verify VMM add_domain
+ assert:
+ that:
+ - cm_add_domain is changed
+ - nm_add_domain is changed
+ - cm_add_domain.sent.vmmDomP.attributes.name == nm_add_domain.sent.vmmDomP.attributes.name == 'vmm_dom'
+ - cm_add_domain.proposed.vmmDomP.attributes.name == nm_add_domain.proposed.vmmDomP.attributes.name == 'vmm_dom'
+ - cm_add_domain.current == cm_add_domain.previous == nm_add_domain.previous == []
+ - nm_add_domain.current.0.vmmDomP.attributes.dn == 'uni/vmmp-VMware/dom-vmm_dom'
+ - nm_add_domain.current.0.vmmDomP.attributes.name == 'vmm_dom'
+
+- name: Add VMM domain again (check_mode)
+ cisco.aci.aci_domain: *domain_present
+ check_mode: yes
+ register: cm_add_domain_again
+
+- name: Add VMM domain again (normal mode)
+ cisco.aci.aci_domain: *domain_present
+ register: nm_add_domain_again
+
+- name: Verify VMM add_domain_again
+ assert:
+ that:
+ - cm_add_domain_again is not changed
+ - nm_add_domain_again is not changed
+
+
+# QUERY ALL DOMAINS
+- name: Query all VMM domains (check_mode)
+ cisco.aci.aci_domain: &domain_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain_type: vmm
+ vm_provider: vmware
+ state: query
+ check_mode: yes
+ register: cm_query_all_domains
+
+- name: Query all VMM domains (normal mode)
+ cisco.aci.aci_domain: *domain_query
+ register: nm_query_all_domains
+
+- name: Verify query_all_domains
+ assert:
+ that:
+ - cm_query_all_domains is not changed
+ - nm_query_all_domains is not changed
+ - cm_query_all_domains == nm_query_all_domains
+ - nm_query_all_domains.current|length >= 1
+
+
+# QUERY A DOMAIN
+- name: Query our VMM domain (check_mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: vmm_dom
+ vm_provider: vmware
+ check_mode: yes
+ register: cm_query_domain
+
+- name: Query our VMM domain (normal mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: vmm_dom
+ vm_provider: vmware
+ register: nm_query_domain
+
+- name: Verify VMM query_domain
+ assert:
+ that:
+ - cm_query_domain is not changed
+ - nm_query_domain is not changed
+ - cm_query_domain == nm_query_domain
+ - nm_query_domain.current.0.vmmDomP.attributes.dn == 'uni/vmmp-VMware/dom-vmm_dom'
+ - nm_query_domain.current.0.vmmDomP.attributes.name == 'vmm_dom'
+
+
+# REMOVE DOMAIN
+- name: Remove VMM domain (check_mode)
+ cisco.aci.aci_domain: *domain_absent
+ check_mode: yes
+ register: cm_remove_domain
+
+- name: Remove VMM domain (normal mode)
+ cisco.aci.aci_domain: *domain_absent
+ register: nm_remove_domain
+
+- name: Verify VMM remove_domain
+ assert:
+ that:
+ - cm_remove_domain is changed
+ - nm_remove_domain is changed
+ - cm_remove_domain.current == cm_remove_domain.previous == nm_remove_domain.previous
+ - nm_remove_domain.previous.0.vmmDomP.attributes.dn == 'uni/vmmp-VMware/dom-vmm_dom'
+ - nm_remove_domain.previous.0.vmmDomP.attributes.name == 'vmm_dom'
+ - nm_remove_domain.current == []
+
+- name: Remove VMM domain again (check_mode)
+ cisco.aci.aci_domain: *domain_absent
+ check_mode: yes
+ register: cm_remove_domain_again
+
+- name: Remove VMM domain again (normal mode)
+ cisco.aci.aci_domain: *domain_absent
+ register: nm_remove_domain_again
+
+- name: Verify VMM remove_domain_again
+ assert:
+ that:
+ - cm_remove_domain_again is not changed
+ - nm_remove_domain_again is not changed
+
+
+# QUERY NON-EXISTING DOMAIN
+- name: Query non-existing VMM domain (check_mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: vmm_dom
+ vm_provider: vmware
+ check_mode: yes
+ register: cm_query_non_domain
+
+- name: Query non-existing VMM domain (normal mode)
+ cisco.aci.aci_domain:
+ <<: *domain_query
+ domain: vmm_dom
+ vm_provider: vmware
+ register: nm_query_non_domain
+
+- name: Verify VMM query_non_domain
+ assert:
+ that:
+ - cm_query_non_domain is not changed
+ - nm_query_non_domain is not changed
+ - cm_query_non_domain == nm_query_non_domain
+ - nm_query_non_domain.current == []
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_encap_pool/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_encap_pool/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_encap_pool/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_encap_pool/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_encap_pool/tasks/main.yml
new file mode 100644
index 00000000..39187401
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_encap_pool/tasks/main.yml
@@ -0,0 +1,635 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Shreyas Srish (@shrsr)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+
+# Clean Environment
+- name: Remove domains
+ aci_domain:
+ <<: *aci_info
+ domain: '{{ item.name }}'
+ domain_type: '{{ item.type }}'
+ state: absent
+ loop:
+ - { name: phys_dom, type: phys }
+ - { name: fc_dom, type: fc }
+ - { name: l2_dom, type: l2dom }
+ - { name: l3_dom, type: l3dom }
+
+- name: Remove domains
+ aci_domain:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ vm_provider: '{{ item.name }}'
+ state: absent
+ loop:
+ - { name: vmware }
+ - { name: microsoft }
+ - { name: cloudfoundry }
+ - { name: openshift }
+ - { name: openstack }
+ - { name: redhat }
+ - { name: kubernetes }
+
+# Add
+- name: Add physical domain
+ aci_domain:
+ <<: *aci_info
+ domain: phys_dom
+ domain_type: phys
+ state: present
+ register: phys_domain
+
+- name: Add l2 domain
+ aci_domain:
+ <<: *aci_info
+ domain: l2_dom
+ domain_type: l2dom
+ state: present
+ register: l2_domain
+
+- name: Add l3 domain
+ aci_domain:
+ <<: *aci_info
+ domain: l3_dom
+ domain_type: l3dom
+ state: present
+ register: l3_domain
+
+- name: Add FC domain
+ aci_domain:
+ <<: *aci_info
+ domain: fc_dom
+ domain_type: fc
+ state: present
+ register: fc_domain
+
+- name: Add vmm domain
+ aci_domain:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ vm_provider: vmware
+ state: present
+ register: vmm_domain
+
+- name: Add domain to encap pool binding (phys, pool_type=vlan)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: phys_dom
+ domain_type: phys
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ state: present
+ register: phys_vlan
+
+- name: Add domain to encap pool binding (fc, pool_type=vsan)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: fc_dom
+ domain_type: fc
+ pool: test_pool
+ pool_type: vsan
+ pool_allocation_mode: dynamic
+ state: present
+ register: fc_vsan
+
+- name: Add domain to encap pool binding (domain_type=l2dom)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: l2_dom
+ domain_type: l2dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: static
+ state: present
+ register: l2dom
+
+- name: Add domain to encap pool binding (domain_type=l3dom)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: l3_dom
+ domain_type: l3dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: static
+ state: present
+ register: l3dom
+
+- name: Add domain to encap pool binding (domain_type=vmm, vm_provider=cloudfoundry)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: cloudfoundry
+ state: present
+ register: vmm_cloudfoundry
+
+- name: Add domain to encap pool binding (domain_type=vmm, vm_provider=kubernetes)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: kubernetes
+ state: present
+ register: vmm_kubernetes
+
+- name: Add domain to encap pool binding (domain_type=vmm, vm_provider=microsoft)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: microsoft
+ state: present
+ register: vmm_microsoft
+
+- name: Add domain to encap pool binding (domain_type=vmm, vm_provider=openshift)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: openshift
+ state: present
+ register: vmm_openshift
+
+- name: Add domain to encap pool binding (domain_type=vmm, vm_provider=openstack)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: openstack
+ state: present
+ register: vmm_openstack
+
+- name: Add domain to encap pool binding (domain_type=vmm, vm_provider=redhat)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: redhat
+ state: present
+ register: vmm_redhat
+
+- name: Add domain to encap pool binding (domain_type=vmm, vm_provider=vmware)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: vmware
+ state: present
+ register: vmm_vmware
+
+- name: Add domain to encap pool binding (domain_type=vmm, vm_provider=vmware) again
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: vmware
+ state: present
+ register: vmm_vmware_idemp
+
+- name: Add domain to encap pool binding (phys with vm_provider)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: phys_dom
+ domain_type: phys
+ pool: test_pool
+ pool_type: vlan
+ vm_provider: vmware
+ pool_allocation_mode: dynamic
+ state: present
+ ignore_errors: yes
+ register: phys_vlan_with_vmm
+
+- name: Add domain to encap pool binding (phys, pool_type=vlan, no allocation mode)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: phys_dom
+ domain_type: phys
+ pool: test_pool
+ pool_type: vlan
+ state: present
+ ignore_errors: yes
+ register: phys_vlan_no_alloc
+
+- name: Add domain to encap pool binding (domain_type=vmm, vm_provider=vmware, pool_type=vxlan)
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool: test_pool
+ pool_type: vxlan
+ pool_allocation_mode: dynamic
+ vm_provider: vmware
+ state: present
+ ignore_errors: yes
+ register: vmm_vmware_vxlan
+
+- name: Add domain to encap pool binding (phys, pool_type=vlan) missing domain_type
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: phys_dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ state: present
+ ignore_errors: yes
+ register: phys_missing_domain_type
+
+- name: Add domain to encap pool binding (phys, pool_type=vlan) missing pool_type
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: phys_dom
+ domain_type: phys
+ pool: test_pool
+ pool_allocation_mode: dynamic
+ state: present
+ ignore_errors: yes
+ register: phys_missing_pool_type
+
+- name: Verify add operation
+ assert:
+ that:
+ - phys_vlan is changed
+ - fc_vsan is changed
+ - l2dom is changed
+ - l3dom is changed
+ - vmm_cloudfoundry is changed
+ - vmm_kubernetes is changed
+ - vmm_openshift is changed
+ - vmm_openstack is changed
+ - vmm_redhat is changed
+ - vmm_vmware is changed
+ - vmm_vmware_idemp is not changed
+ - phys_vlan.current.0.physDomP.children.0.infraRsVlanNs.attributes.tDn =='uni/infra/vlanns-[test_pool]-dynamic'
+ - fc_vsan.current.0.fcDomP.children.0.fcRsVsanNs.attributes.tDn == 'uni/infra/vsanns-[test_pool]-dynamic'
+ - l2dom.current.0.l2extDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-static'
+ - l3dom.current.0.l3extDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-static'
+ - vmm_cloudfoundry.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - vmm_kubernetes.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - vmm_microsoft.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - vmm_openshift.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - vmm_openstack.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - vmm_redhat.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - vmm_vmware.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - phys_vlan_with_vmm.msg is match("Domain type '[0-9a-zA-Z]*' cannot have a 'vm_provider'")
+ - vmm_vmware_vxlan.msg is match("vxlan pools do not support setting the allocation_mode; please remove this parameter from the task")
+ - phys_vlan_no_alloc.msg is match("ACI requires the 'pool_allocation_mode' for 'pool_type' of 'vlan' and 'vsan' when 'pool' is provided")
+ - phys_missing_pool_type.msg is match("missing required arguments{{':'}} pool_type")
+ - phys_missing_domain_type.msg is match("missing required arguments{{':'}} domain_type")
+
+# QUERY
+- name: Query all
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain_type: phys
+ pool_type: vlan
+ state: query
+ register: query_all
+
+- name: Query phys
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: phys_dom
+ domain_type: phys
+ pool_type: vlan
+ state: query
+ register: query_phys
+
+- name: Query fc
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: fc_dom
+ domain_type: fc
+ pool_type: vsan
+ state: query
+ register: query_fc
+
+- name: Query l2dom
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: l2_dom
+ domain_type: l2dom
+ pool_type: vlan
+ state: query
+ register: query_l2dom
+
+- name: Query l3dom
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: l3_dom
+ domain_type: l3dom
+ pool_type: vlan
+ state: query
+ register: query_l3dom
+
+- name: Query vmm
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool_type: vlan
+ vm_provider: microsoft
+ state: query
+ register: query_vmm_microsoft
+
+- name: Query vmm
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool_type: vlan
+ vm_provider: cloudfoundry
+ state: query
+ register: query_vmm_cloudfoundry
+
+- name: Query vmm
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool_type: vlan
+ vm_provider: kubernetes
+ state: query
+ register: query_vmm_kubernetes
+
+- name: Query vmm
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool_type: vlan
+ vm_provider: openshift
+ state: query
+ register: query_vmm_openshift
+
+- name: Query vmm
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool_type: vlan
+ vm_provider: openstack
+ state: query
+ register: query_vmm_openstack
+
+- name: Query vmm
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool_type: vlan
+ vm_provider: redhat
+ state: query
+ register: query_vmm_redhat
+
+- name: Query vmm
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool_type: vlan
+ vm_provider: vmware
+ state: query
+ register: query_vmm_vmware
+
+- name: Query vmm
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ pool_type: vlan
+ vm_provider: vmware
+ state: query
+ register: query_vmm_vmware
+
+- name: Verify Query
+ assert:
+ that:
+ - query_all | length >=1
+ - query_phys.current.0.physDomP.children.0.infraRsVlanNs.attributes.tDn =='uni/infra/vlanns-[test_pool]-dynamic'
+ - query_fc.current.0.fcDomP.children.0.fcRsVsanNs.attributes.tDn == 'uni/infra/vsanns-[test_pool]-dynamic'
+ - query_l2dom.current.0.l2extDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-static'
+ - query_l3dom.current.0.l3extDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-static'
+ - query_vmm_cloudfoundry.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - query_vmm_kubernetes.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - query_vmm_microsoft.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - query_vmm_openshift.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - query_vmm_openstack.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - query_vmm_redhat.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - query_vmm_vmware.current.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+
+# REMOVE
+- name: Remove phys
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain_type: phys
+ domain: phys_dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ state: absent
+ register: remove_phys
+
+- name: Remove fc
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain_type: fc
+ domain: fc_dom
+ pool: test_pool
+ pool_type: vsan
+ pool_allocation_mode: dynamic
+ state: absent
+ register: remove_fc
+
+- name: Remove l2dom
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain_type: l2dom
+ domain: l2_dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: static
+ state: absent
+ register: remove_l2dom
+
+- name: Remove l3dom
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain_type: l3dom
+ domain: l3_dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: static
+ state: absent
+ register: remove_l3dom
+
+- name: Remove vmm cloudfoundry
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain_type: vmm
+ domain: vmm_dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: cloudfoundry
+ state: absent
+ register: remove_vmm_cloudfoundry
+
+- name: Remove vmm redhat kubernetes
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain_type: vmm
+ domain: vmm_dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: kubernetes
+ state: absent
+ register: remove_vmm_kubernetes
+
+- name: Remove vmm microsoft
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain_type: vmm
+ domain: vmm_dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: microsoft
+ state: absent
+ register: remove_vmm_microsoft
+
+- name: Remove vmm redhat
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain_type: vmm
+ domain: vmm_dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: redhat
+ state: absent
+ register: remove_vmm_redhat
+
+- name: Remove vmm openstack
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain_type: vmm
+ domain: vmm_dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: openstack
+ state: absent
+ register: remove_vmm_openstack
+
+- name: Remove vmm openshift
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain_type: vmm
+ domain: vmm_dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: openshift
+ state: absent
+ register: remove_vmm_openshift
+
+- name: Remove vmm vmware
+ aci_domain_to_encap_pool:
+ <<: *aci_info
+ domain_type: vmm
+ domain: vmm_dom
+ pool: test_pool
+ pool_type: vlan
+ pool_allocation_mode: dynamic
+ vm_provider: vmware
+ state: absent
+ register: remove_vmm_vmware
+
+- name: Verify Remove
+ assert:
+ that:
+ - remove_phys.previous.0.physDomP.children.0.infraRsVlanNs.attributes.tDn =='uni/infra/vlanns-[test_pool]-dynamic'
+ - remove_fc.previous.0.fcDomP.children.0.fcRsVsanNs.attributes.tDn == 'uni/infra/vsanns-[test_pool]-dynamic'
+ - remove_l2dom.previous.0.l2extDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-static'
+ - remove_l3dom.previous.0.l3extDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-static'
+ - remove_vmm_cloudfoundry.previous.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - remove_vmm_kubernetes.previous.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - remove_vmm_microsoft.previous.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - remove_vmm_openshift.previous.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - remove_vmm_openstack.previous.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - remove_vmm_redhat.previous.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - remove_vmm_vmware.previous.0.vmmDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+
+# Clean Environment Again
+- name: Remove domains
+ aci_domain:
+ <<: *aci_info
+ domain: '{{ item.name }}'
+ domain_type: '{{ item.type }}'
+ state: absent
+ loop:
+ - { name: phys_dom, type: phys }
+ - { name: fc_dom, type: fc }
+ - { name: l2_dom, type: l2dom }
+ - { name: l3_dom, type: l3dom }
+
+- name: Remove domains
+ aci_domain:
+ <<: *aci_info
+ domain: vmm_dom
+ domain_type: vmm
+ vm_provider: '{{ item.name }}'
+ state: absent
+ loop:
+ - { name: vmware }
+ - { name: microsoft }
+ - { name: cloudfoundry }
+ - { name: openshift }
+ - { name: openstack }
+ - { name: redhat }
+ - { name: kubernetes } \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_vlan_pool/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_vlan_pool/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_vlan_pool/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_vlan_pool/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_vlan_pool/tasks/main.yml
new file mode 100644
index 00000000..2fb30c47
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_domain_to_vlan_pool/tasks/main.yml
@@ -0,0 +1,222 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove domain to VLAN pool binding
+ cisco.aci.aci_domain_to_vlan_pool: &binding_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: phys_dom
+ domain_type: phys
+ pool: test_pool
+ pool_allocation_mode: dynamic
+ state: absent
+
+- name: Remove physical domain
+ cisco.aci.aci_domain:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: phys_dom
+ domain_type: phys
+ state: absent
+
+- name: Create VLAN pool
+ cisco.aci.aci_vlan_pool:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ pool: test_pool
+ pool_allocation_mode: dynamic
+ description: Test VLAN pool
+ state: present
+
+
+# ADD BINDING
+- name: Add domain to VLAN pool binding (check_mode)
+ cisco.aci.aci_domain_to_vlan_pool: &binding_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: phys_dom
+ domain_type: phys
+ pool: test_pool
+ pool_allocation_mode: dynamic
+ state: present
+ check_mode: yes
+ register: cm_add_binding
+
+- name: Add domain to VLAN pool binding (normal mode)
+ cisco.aci.aci_domain_to_vlan_pool: *binding_present
+ register: nm_add_binding
+
+- name: Verify add_binding
+ assert:
+ that:
+ - cm_add_binding is changed
+ - nm_add_binding is changed
+ - cm_add_binding.sent.physDomP.attributes.name == nm_add_binding.sent.physDomP.attributes.name == 'phys_dom'
+ - cm_add_binding.sent.physDomP.children.0.infraRsVlanNs.attributes.tDn == nm_add_binding.sent.physDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - cm_add_binding.proposed.physDomP.attributes.name == nm_add_binding.proposed.physDomP.attributes.name == 'phys_dom'
+ - cm_add_binding.proposed.physDomP.children.0.infraRsVlanNs.attributes.tDn == nm_add_binding.proposed.physDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - cm_add_binding.current == cm_add_binding.previous == nm_add_binding.previous == []
+ - nm_add_binding.current.0.physDomP.attributes.name == 'phys_dom'
+ - nm_add_binding.current.0.physDomP.attributes.dn == 'uni/phys-phys_dom'
+ - nm_add_binding.current.0.physDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+
+- name: Add domain to VLAN pool binding again (check_mode)
+ cisco.aci.aci_domain_to_vlan_pool: *binding_present
+ check_mode: yes
+ register: cm_add_binding_again
+
+- name: Add domain to VLAN pool binding again (normal mode)
+ cisco.aci.aci_domain_to_vlan_pool: *binding_present
+ register: nm_add_binding_again
+
+- name: Verify add_binding_again
+ assert:
+ that:
+ - cm_add_binding_again is not changed
+ - nm_add_binding_again is not changed
+
+
+# QUERY ALL BINDINGS
+- name: Query all domain to VLAN pool bindings (check_mode)
+ cisco.aci.aci_domain_to_vlan_pool: &binding_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain_type: phys
+ pool_allocation_mode: dynamic
+ state: query
+ check_mode: yes
+ register: cm_query_all_bindings
+
+- name: Query all domain to VLAN pool bindings (normal mode)
+ cisco.aci.aci_domain_to_vlan_pool: *binding_query
+ register: nm_query_all_bindings
+
+- name: Verify query_all_bindings
+ assert:
+ that:
+ - cm_query_all_bindings is not changed
+ - nm_query_all_bindings is not changed
+ - cm_query_all_bindings == nm_query_all_bindings
+ - nm_query_all_bindings.current|length >= 1
+
+
+# QUERY A BINDING
+- name: Query our domain to VLAN pool binding (check_mode)
+ cisco.aci.aci_domain_to_vlan_pool:
+ <<: *binding_query
+ domain: phys_dom
+ pool: test_pool
+ pool_allocation_mode: dynamic
+ check_mode: yes
+ register: cm_query_binding
+
+- name: Query our domain to VLAN pool binding (normal mode)
+ cisco.aci.aci_domain_to_vlan_pool:
+ <<: *binding_query
+ domain: phys_dom
+ pool: test_pool
+ pool_allocation_mode: dynamic
+ register: nm_query_binding
+
+- name: Verify query_binding
+ assert:
+ that:
+ - cm_query_binding is not changed
+ - nm_query_binding is not changed
+ - cm_query_binding == nm_query_binding
+ - nm_query_binding.current.0.physDomP.attributes.dn == 'uni/phys-phys_dom'
+ - nm_query_binding.current.0.physDomP.attributes.name == 'phys_dom'
+ - nm_query_binding.current.0.physDomP.children.0.infraRsVlanNs.attributes.tCl == 'fvnsVlanInstP'
+ - nm_query_binding.current.0.physDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+
+
+# REMOVE BINDING
+- name: Remove domain to VLAN pool binding (check_mode)
+ cisco.aci.aci_domain_to_vlan_pool: *binding_absent
+ check_mode: yes
+ register: cm_remove_binding
+
+- name: Remove domain to VLAN pool binding (normal mode)
+ cisco.aci.aci_domain_to_vlan_pool: *binding_absent
+ register: nm_remove_binding
+
+- name: Verify remove_binding
+ assert:
+ that:
+ - cm_remove_binding is changed
+ - nm_remove_binding is changed
+ - cm_remove_binding.current.0.physDomP.attributes.dn == cm_remove_binding.previous.0.physDomP.attributes.dn == nm_remove_binding.previous.0.physDomP.attributes.dn == 'uni/phys-phys_dom'
+ - cm_remove_binding.current.0.physDomP.attributes.name == cm_remove_binding.previous.0.physDomP.attributes.name == nm_remove_binding.previous.0.physDomP.attributes.name == 'phys_dom'
+ - cm_remove_binding.current.0.physDomP.children.0.infraRsVlanNs.attributes.tDn == cm_remove_binding.previous.0.physDomP.children.0.infraRsVlanNs.attributes.tDn == nm_remove_binding.previous.0.physDomP.children.0.infraRsVlanNs.attributes.tDn == 'uni/infra/vlanns-[test_pool]-dynamic'
+ - nm_remove_binding.current == []
+
+- name: Remove domain to VLAN pool binding again (check_mode)
+ cisco.aci.aci_domain_to_vlan_pool: *binding_absent
+ check_mode: yes
+ register: cm_remove_binding_again
+
+- name: Remove domain to VLAN pool binding again (normal mode)
+ cisco.aci.aci_domain_to_vlan_pool: *binding_absent
+ register: nm_remove_binding_again
+
+- name: Verify remove_binding_again
+ assert:
+ that:
+ - cm_remove_binding_again is not changed
+ - nm_remove_binding_again is not changed
+
+
+# QUERY NON-EXISTING BINDING
+- name: Query non-existing domain to VLAN pool binding (check_mode)
+ cisco.aci.aci_domain_to_vlan_pool:
+ <<: *binding_query
+ domain: phys_dom
+ pool: test_pool
+ pool_allocation_mode: dynamic
+ check_mode: yes
+ register: cm_query_non_binding
+
+- name: Query non-existing domain to VLAN pool binding (normal mode)
+ cisco.aci.aci_domain_to_vlan_pool:
+ <<: *binding_query
+ domain: phys_dom
+ pool: test_pool
+ pool_allocation_mode: dynamic
+ register: nm_query_non_binding
+
+- name: Verify query_non_binding
+ assert:
+ that:
+ - cm_query_non_binding is not changed
+ - nm_query_non_binding is not changed
+ - cm_query_non_binding == nm_query_non_binding
+ - nm_query_non_binding.current == []
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/main.yml
new file mode 100644
index 00000000..f33bfa00
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/main.yml
@@ -0,0 +1,18 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: test that we have an aci apic host, aci username and aci password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- include_tasks: vlan.yml
+ when: vlan is not defined or vlan
+
+- include_tasks: vxlan.yml
+ when: vxlan is not defined or vxlan
+
+- include_tasks: vsan.yml
+ when: vsan is not defined or vsan
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/vlan.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/vlan.yml
new file mode 100644
index 00000000..7bd4bfd7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/vlan.yml
@@ -0,0 +1,274 @@
+---
+- name: ensure vlan pool does not exist for tests to kick off
+ cisco.aci.aci_encap_pool: &aci_pool_absent_static
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: absent
+ pool: anstest
+ pool_type: vlan
+ pool_allocation_mode: static
+
+- name: ensure vlan pool does not exist for tests to kick off
+ cisco.aci.aci_encap_pool: &aci_pool_absent_dynamic
+ <<: *aci_pool_absent_static
+ pool_allocation_mode: dynamic
+
+- name: create static vlan pool - check mode works
+ cisco.aci.aci_encap_pool: &aci_pool_present_static
+ <<: *aci_pool_absent_static
+ state: present
+ descr: Ansible Test
+ check_mode: yes
+ register: create_check_mode
+
+- name: assertion test - present
+ assert:
+ that:
+ - create_check_mode is changed
+ - create_check_mode.sent.fvnsVlanInstP.attributes.allocMode == 'static'
+ - create_check_mode.sent.fvnsVlanInstP.attributes.descr == 'Ansible Test'
+ - create_check_mode.sent.fvnsVlanInstP.attributes.name == 'anstest'
+
+- name: create static vlan pool - creation works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_present_static
+ register: create_static
+
+- name: assertion test - present
+ assert:
+ that:
+ - create_static is changed
+ - create_static.previous == []
+ - create_static.sent == create_check_mode.sent
+
+- name: create dynamic vlan pool - creation works
+ cisco.aci.aci_encap_pool: &aci_pool_present_dynamic
+ <<: *aci_pool_absent_dynamic
+ state: present
+ descr: Ansible Test
+ register: create_dynamic
+
+- name: assertion test - present
+ assert:
+ that:
+ - create_dynamic is changed
+ - create_dynamic.previous == []
+ - create_dynamic.sent.fvnsVlanInstP.attributes.allocMode == 'dynamic'
+ - create_dynamic.sent.fvnsVlanInstP.attributes.descr == 'Ansible Test'
+ - create_dynamic.sent.fvnsVlanInstP.attributes.name == 'anstest'
+
+- name: create static vlan pool again - idempotency works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_present_static
+ register: idempotent_static
+
+- name: assertion test - present
+ assert:
+ that:
+ - idempotent_static is not changed
+ - idempotent_static.previous.0.fvnsVlanInstP.attributes.allocMode == 'static'
+ - idempotent_static.previous.0.fvnsVlanInstP.attributes.descr == 'Ansible Test'
+ - idempotent_static.previous.0.fvnsVlanInstP.attributes.dn == 'uni/infra/vlanns-[anstest]-static'
+ - idempotent_static.previous.0.fvnsVlanInstP.attributes.name == 'anstest'
+ - idempotent_static.sent == {}
+
+- name: create dynamic vlan pool again - idempotency works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_present_dynamic
+ register: idempotent_dynamic
+
+- name: assertion test - present
+ assert:
+ that:
+ - idempotent_dynamic is not changed
+ - idempotent_dynamic.previous.0.fvnsVlanInstP.attributes.allocMode == 'dynamic'
+ - idempotent_dynamic.previous.0.fvnsVlanInstP.attributes.descr == 'Ansible Test'
+ - idempotent_dynamic.previous.0.fvnsVlanInstP.attributes.dn == 'uni/infra/vlanns-[anstest]-dynamic'
+ - idempotent_dynamic.previous.0.fvnsVlanInstP.attributes.name == 'anstest'
+ - idempotent_dynamic.sent == {}
+
+- name: update static vlan pool - update works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_present_static
+ descr: Ansible Test Change
+ register: update_static
+
+- name: assertion test - present
+ assert:
+ that:
+ - update_static is changed
+ - update_static.sent.fvnsVlanInstP.attributes.descr == 'Ansible Test Change'
+
+- name: update dynamic vlan pool - update works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_present_dynamic
+ descr: Ansible Test Change
+ register: update_dynamic
+
+- name: assertion test - present
+ assert:
+ that:
+ - update_dynamic is changed
+ - update_dynamic.sent.fvnsVlanInstP.attributes.descr == 'Ansible Test Change'
+
+- name: missing param - failure message works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_present_dynamic
+ pool_allocation_mode: "{{ fake_var | default(omit) }}"
+ ignore_errors: yes
+ register: vlan_alloc_fail
+
+- name: assertion test - present
+ assert:
+ that:
+ - vlan_alloc_fail is failed
+ - "vlan_alloc_fail.msg == 'ACI requires parameter \\'pool_allocation_mode\\' for \\'pool_type\\' of \\'vlan\\' and \\'vsan\\' when parameter \\'pool\\' is provided'"
+
+- name: missing param - failure message works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_present_dynamic
+ pool: "{{ fake_var | default(omit) }}"
+ ignore_errors: yes
+ register: vlan_pool_fail
+
+- name: assertion test - present
+ assert:
+ that:
+ - vlan_pool_fail is failed
+ - 'vlan_pool_fail.msg == "state is present but all of the following are missing: pool"'
+
+- name: missing param - failure message works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_present_dynamic
+ pool_type: "{{ fake_var | default(omit) }}"
+ ignore_errors: yes
+ register: vlan_pool_type_fail
+
+- name: assertion test - present
+ assert:
+ that:
+ - vlan_pool_type_fail is failed
+ - 'vlan_pool_type_fail.msg == "missing required arguments: pool_type"'
+
+- name: get all vlan pools - get class works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_absent_static
+ state: query
+ pool: "{{ fake_var | default(omit) }}"
+ pool_allocation_mode: "{{ fake_var | default(omit) }}"
+ register: get_all_pools
+
+- name: assertion test - query
+ assert:
+ that:
+ - get_all_pools is not changed
+ - get_all_pools.method == "GET"
+ - get_all_pools.current | length > 1
+
+- name: get created static vlan pool - get mo works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_absent_static
+ state: query
+ register: get_static_pool
+
+- name: assertion test - query
+ assert:
+ that:
+ - get_static_pool is not changed
+ - get_static_pool.method == "GET"
+ - get_static_pool.current | length == 1
+ - get_static_pool.current.0.fvnsVlanInstP.attributes.allocMode == "static"
+ - get_static_pool.current.0.fvnsVlanInstP.attributes.name == "anstest"
+
+- name: get created dynamic vlan pool - get mo works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_absent_dynamic
+ state: query
+ register: get_dynamic_pool
+
+- name: assertion test - query
+ assert:
+ that:
+ - get_dynamic_pool is not changed
+ - get_dynamic_pool.method == "GET"
+ - get_dynamic_pool.current | length == 1
+ - get_dynamic_pool.current.0.fvnsVlanInstP.attributes.allocMode == "dynamic"
+ - get_dynamic_pool.current.0.fvnsVlanInstP.attributes.name == "anstest"
+
+- name: get created dynamic vlan pool - get mo works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_absent_dynamic
+ state: query
+ pool_type: "{{ fake_var | default(omit) }}"
+ ignore_errors: yes
+ register: vlan_query_pool_type_fail
+
+- name: assertion test - query
+ assert:
+ that:
+ - vlan_query_pool_type_fail is failed
+ - 'vlan_query_pool_type_fail.msg == "missing required arguments: pool_type"'
+
+- name: delete static vlan pool - deletion works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_absent_static
+ register: delete_static
+
+- name: assertion test - absent
+ assert:
+ that:
+ - delete_static is changed
+ - delete_static.method == "DELETE"
+ - delete_static.previous.0.fvnsVlanInstP.attributes.allocMode == "static"
+ - delete_static.previous.0.fvnsVlanInstP.attributes.name == "anstest"
+
+- name: delete dynamic vlan pool - check mode works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_absent_dynamic
+ check_mode: yes
+ register: delete_check_mode
+
+- name: assertion test - absent
+ assert:
+ that:
+ - delete_check_mode is changed
+
+- name: delete dynamic vlan pool - deletion works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_absent_dynamic
+ register: delete_dynamic
+
+- name: assertion test - absent
+ assert:
+ that:
+ - delete_dynamic is changed
+ - delete_dynamic.method == "DELETE"
+ - delete_dynamic.previous.0.fvnsVlanInstP.attributes.allocMode == "dynamic"
+ - delete_dynamic.previous.0.fvnsVlanInstP.attributes.name == "anstest"
+
+- name: delete static vlan pool again - idempotency works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_absent_static
+ register: idempotent_delete_static
+
+- name: assertion test - absent
+ assert:
+ that:
+ - idempotent_delete_static is not changed
+ - idempotent_delete_static.previous == []
+
+- name: delete dynamic vlan pool again - idempotency works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_absent_dynamic
+ register: idempotent_delete_dynamic
+
+- name: assertion test - absent
+ assert:
+ that:
+ - idempotent_delete_dynamic is not changed
+ - idempotent_delete_dynamic.previous == []
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/vsan.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/vsan.yml
new file mode 100644
index 00000000..84681873
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/vsan.yml
@@ -0,0 +1,16 @@
+---
+- name: ensure vlan pool does not exist for tests to kick off
+ cisco.aci.aci_encap_pool: &aci_pool_absent_static
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ pool: anstest
+ pool_type: vsan
+ pool_allocation_mode: static
+ state: absent
+
+# FIXME: Add Test to this integration \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/vxlan.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/vxlan.yml
new file mode 100644
index 00000000..10bd039b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool/tasks/vxlan.yml
@@ -0,0 +1,178 @@
+---
+- name: ensure vxlan pool anstest does not exist for tests to kick off
+ cisco.aci.aci_encap_pool: &aci_vxlan_absent
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: absent
+ pool: anstest
+ pool_type: vxlan
+
+- name: ensure vxlan pool anstest_2 does not exist for tests to kick off
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_absent
+ pool: anstest_2
+
+- name: ensure vxlan pool anstest_3 does not exist for tests to kick off
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_absent
+ pool: anstest_3
+
+- name: create vxlan pool - check mode works
+ cisco.aci.aci_encap_pool: &aci_vxlan_present
+ <<: *aci_vxlan_absent
+ state: present
+ descr: Ansible Test
+ check_mode: yes
+ register: create_vxlan_check_mode
+
+- name: assertion test - present
+ assert:
+ that:
+ - create_vxlan_check_mode is changed
+ - create_vxlan_check_mode.sent.fvnsVxlanInstP.attributes.descr == 'Ansible Test'
+ - create_vxlan_check_mode.sent.fvnsVxlanInstP.attributes.name == 'anstest'
+
+- name: create vxlan pool - creation works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_present
+ register: create_vxlan
+
+- name: assertion test - present
+ assert:
+ that:
+ - create_vxlan is changed
+ - create_vxlan.previous == []
+ - create_vxlan.sent == create_vxlan_check_mode.sent
+
+- name: create vxlan pool again - idempotency works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_present
+ register: idempotent_vxlan
+
+- name: assertion test - present
+ assert:
+ that:
+ - idempotent_vxlan is not changed
+ - idempotent_vxlan.previous.0.fvnsVxlanInstP.attributes.name == 'anstest'
+ - idempotent_vxlan.sent == {}
+
+- name: update vxlan pool - update works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_present
+ descr: Ansible Test Change
+ register: update_vxlan
+
+- name: assertion test - present
+ assert:
+ that:
+ - update_vxlan is changed
+ - update_vxlan.sent.fvnsVxlanInstP.attributes.descr == 'Ansible Test Change'
+
+- name: create vxlan pool - used for query
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_present
+ name: anstest_2
+ register: create_vxlan_2
+
+- name: assertion test - present
+ assert:
+ that:
+ - create_vxlan_2 is changed
+
+- name: create vxlan pool with pool allocation mode - failure message works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_present
+ name: anstest_3
+ pool_allocation_mode: dynamic
+ ignore_errors: yes
+ register: create_vxlan_alloc_mode
+
+- name: assertion test - present
+ assert:
+ that:
+ - create_vxlan_alloc_mode is failed
+ - "create_vxlan_alloc_mode.msg == 'vxlan pools do not support setting the \\'pool_allocation_mode\\'; please remove this parameter from the task'"
+
+- name: get vxlan pool - get object works
+ cisco.aci.aci_encap_pool: &aci_vxlan_query
+ <<: *aci_vxlan_present
+ state: query
+ register: query_vxlan
+
+- name: assertion test - query
+ assert:
+ that:
+ - query_vxlan is not changed
+ - query_vxlan.current | length == 1
+ - '"infra/vxlanns-anstest.json" in query_vxlan.url'
+
+- name: get created static vlan pool - get class works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_query
+ pool: "{{ fake_var | default(omit) }}"
+ register: query_vxlan_all
+
+- name: assertion test - query
+ assert:
+ that:
+ - query_vxlan_all is not changed
+ - query_vxlan_all.current | length > 1
+ - '"class/fvnsVxlanInstP.json" in query_vxlan_all.url'
+
+- name: delete vxlan pool - check mode works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_absent
+ check_mode: yes
+ register: delete_vxlan_check_mode
+
+- name: assertion test - absent
+ assert:
+ that:
+ - delete_vxlan_check_mode is changed
+ - delete_vxlan_check_mode.previous != []
+
+- name: delete vxlan pool - deletion works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_absent
+ register: delete_vxlan
+
+- name: assertion test - absent
+ assert:
+ that:
+ - delete_vxlan is changed
+ - delete_vxlan.previous == delete_vxlan_check_mode.previous
+ - delete_vxlan.previous.0.fvnsVxlanInstP.attributes.name == "anstest"
+
+- name: delete vxlan pool again - idempotency works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_absent
+ register: delete_vxlan_idempotent
+
+- name: missing param - failure message works
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_absent
+ pool: "{{ fake_var | default(omit) }}"
+ ignore_errors: yes
+ register: delete_vxlan_pool_fail
+
+- name: assertion test - absent
+ assert:
+ that:
+ - delete_vxlan_idempotent is not changed
+ - delete_vxlan_idempotent.previous == []
+
+- name: delete vxlan pool - cleanup
+ cisco.aci.aci_encap_pool:
+ <<: *aci_vxlan_absent
+ pool: anstest_2
+
+- name: assertion test - absent
+ assert:
+ that:
+ - delete_vxlan_pool_fail is failed
+ - 'delete_vxlan_pool_fail.msg == "state is absent but all of the following are missing: pool"'
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/main.yml
new file mode 100644
index 00000000..66caef7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/main.yml
@@ -0,0 +1,18 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: test that we have an aci apic host, aci username and aci password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- include_tasks: vlan.yml
+ when: "vlan is not defined or (vlan is defined and vlan == 'True')"
+
+- include_tasks: vxlan.yml
+ when: "vxlan is not defined or (vxlan is defined and vxlan == 'True')"
+
+- include_tasks: vsan.yml
+ when: "vsan is not defined or (vsan is defined and vsan == 'True')"
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/vlan.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/vlan.yml
new file mode 100644
index 00000000..04a4f43b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/vlan.yml
@@ -0,0 +1,387 @@
+- name: ensure vlan pool exists for tests to kick off
+ cisco.aci.aci_encap_pool:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: absent
+ pool: anstest
+ pool_type: vlan
+ allocation_mode: static
+ description: Ansible Test
+
+- name: ensure vlan pool exists for tests to kick off
+ cisco.aci.aci_encap_pool: &aci_pool_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: present
+ pool: anstest
+ pool_type: vlan
+ allocation_mode: static
+ description: Ansible Test
+ register: pool_present
+
+- name: create vlan pool range - check mode works
+ cisco.aci.aci_encap_pool_range: &aci_range_present
+ <<: *aci_pool_present
+ range_name: anstest
+ range_start: 20
+ range_end: 40
+ pool: anstest
+ pool_allocation_mode: static
+ allocation_mode: inherit
+ description: Ansible Test
+ check_mode: yes
+ register: range_present_check_mode
+
+- name: present assertions
+ assert:
+ that:
+ - range_present_check_mode is changed
+ - range_present_check_mode.sent.fvnsEncapBlk.attributes.allocMode == 'inherit'
+ - range_present_check_mode.sent.fvnsEncapBlk.attributes.descr == 'Ansible Test'
+ - range_present_check_mode.sent.fvnsEncapBlk.attributes.name == 'anstest'
+ - range_present_check_mode.sent.fvnsEncapBlk.attributes.from == 'vlan-20'
+ - range_present_check_mode.sent.fvnsEncapBlk.attributes.to == 'vlan-40'
+
+- name: create vlan pool range - creation works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_present
+ register: range_present
+
+- name: present assertions
+ assert:
+ that:
+ - range_present is changed
+ - range_present.previous == []
+ - range_present.sent == range_present_check_mode.sent
+ - range_present.sent == range_present.proposed
+
+- name: create vlan pool range - idempotency works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_present
+ register: range_present_idempotent
+
+- name: present assertions
+ assert:
+ that:
+ - range_present_idempotent is not changed
+ - range_present_idempotent.previous.0.fvnsEncapBlk.attributes.name == "anstest"
+
+- name: update vlan pool range - update works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_present
+ description: Ansible Test Update
+ allocation_mode: inherit
+ register: range_present_update
+
+- name: present assertions
+ assert:
+ that:
+ - range_present_update is changed
+ - range_present_update.previous != []
+ - range_present_update.sent != range_present.sent
+
+- name: create vlan pool range - used for query
+ cisco.aci.aci_encap_pool_range: &aci_range_present_2
+ <<: *aci_range_present
+ range_name: anstest_2
+ range_start: 50
+ range_end: 55
+ register: range_present_2
+
+- name: present assertions
+ assert:
+ that:
+ - range_present_2 is changed
+ - range_present_2.previous == []
+
+- name: invalid range_start - error message works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_present
+ range_start: 0
+ ignore_errors: yes
+ register: range_start_low
+
+- name: present assertions
+ assert:
+ that:
+ - range_start_low is failed
+ - range_start_low.msg == 'vlan pools must have "range_start" and "range_end" values between 1 and 4094'
+
+- name: invalid range_start - error message works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_present
+ range_start: 4096
+ ignore_errors: yes
+ register: range_start_high
+
+- name: present assertions
+ assert:
+ that:
+ - range_start_high is failed
+ - range_start_high.msg == 'vlan pools must have "range_start" and "range_end" values between 1 and 4094'
+
+- name: invalid range_end - error message works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_present
+ range_end: 0
+ ignore_errors: yes
+ register: range_end_low
+
+- name: present assertions
+ assert:
+ that:
+ - range_end_low is failed
+ - range_end_low.msg == 'vlan pools must have "range_start" and "range_end" values between 1 and 4094'
+
+- name: invalid range_end - error message works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_present
+ range_end: 4096
+ ignore_errors: yes
+ register: range_end_high
+
+- name: present assertions
+ assert:
+ that:
+ - range_end_high is failed
+ - range_end_high.msg == 'vlan pools must have "range_start" and "range_end" values between 1 and 4094'
+
+- name: range start higher than range end - error message works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_present
+ range_start: 1000
+ ignore_errors: yes
+ register: range_start_end
+
+- name: present assertions
+ assert:
+ that:
+ - range_start_end is failed
+ - range_start_end.msg == 'The "range_start" must be less than or equal to the "range_end"'
+
+- name: missing required param - error message works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_present
+ pool_type: '{{ omit }}'
+ ignore_errors: yes
+ register: range_present_pool_type
+
+- name: present assertions
+ assert:
+ that:
+ - range_present_pool_type is failed
+ - "range_present_pool_type.msg == 'missing required arguments: pool_type'"
+
+- name: missing required param - error message works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_pool_present
+ ignore_errors: yes
+ register: range_present_missing_param
+
+- name: present assertions
+ assert:
+ that:
+ - range_present_missing_param is failed
+ - "range_present_missing_param.msg == 'state is present but all of the following are missing: range_end, range_name, range_start'"
+
+- name: missing required param - error message works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_present
+ pool_allocation_mode: '{{ omit }}'
+ ignore_errors: yes
+ register: range_present_allocation
+
+- name: present assertions
+ assert:
+ that:
+ - range_present_allocation is failed
+ - range_present_allocation.msg == 'ACI requires the "pool_allocation_mode" for "pool_type" of "vlan" and "vsan" when the "pool" is provided'
+
+- name: query specific vlan pool range
+ cisco.aci.aci_encap_pool_range: &aci_range_query
+ <<: *aci_range_present
+ state: query
+ register: range_query
+
+- name: query assertions
+ assert:
+ that:
+ - range_query is not changed
+ - range_query.url.endswith("infra/vlanns-[anstest]-static/from-[vlan-20]-to-[vlan-40].json")
+ - range_query.current | length == 1
+ - range_query.current.0.fvnsEncapBlk.attributes.name == "anstest"
+
+- name: query vlan pool range - from, to, and name are filtered
+ cisco.aci.aci_encap_pool_range: &aci_range_query_filter
+ <<: *aci_range_query
+ pool: '{{ omit }}'
+ register: range_query_from_to_name
+
+- name: query assertions
+ assert:
+ that:
+ - range_query_from_to_name is not changed
+ - range_query_from_to_name.url.endswith("class/fvnsEncapBlk.json")
+ - '"eq(fvnsEncapBlk.from,\"vlan-20\")" in range_query_from_to_name.filter_string'
+ - '"eq(fvnsEncapBlk.name,\"anstest\")" in range_query_from_to_name.filter_string'
+ - '"eq(fvnsEncapBlk.to,\"vlan-40\")" in range_query_from_to_name.filter_string'
+ - range_query_from_to_name.current.0.fvnsEncapBlk.attributes.name == "anstest"
+ - range_query_from_to_name.current.0.fvnsEncapBlk.attributes.from == "vlan-20"
+ - range_query_from_to_name.current.0.fvnsEncapBlk.attributes.to == "vlan-40"
+
+- name: query vlan pool range - from and name are filtered
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_query_filter
+ range_end: '{{ omit }}'
+ register: range_query_from_name
+
+- name: query assertions
+ assert:
+ that:
+ - range_query_from_name is not changed
+ - range_query_from_name.url.endswith("class/fvnsEncapBlk.json")
+ - '"eq(fvnsEncapBlk.from,\"vlan-20\")" in range_query_from_name.filter_string'
+ - '"eq(fvnsEncapBlk.name,\"anstest\")" in range_query_from_name.filter_string'
+ - range_query_from_name.current.0.fvnsEncapBlk.attributes.name == "anstest"
+ - range_query_from_name.current.0.fvnsEncapBlk.attributes.from == "vlan-20"
+
+- name: query vlan pool range - to and name are filtered
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_query_filter
+ range_start: '{{ omit }}'
+ register: range_query_to_name
+
+- name: query assertions
+ assert:
+ that:
+ - range_query_to_name is not changed
+ - range_query_to_name.url.endswith('class/fvnsEncapBlk.json')
+ - '"eq(fvnsEncapBlk.name,\"anstest\")" in range_query_to_name.filter_string'
+ - '"eq(fvnsEncapBlk.to,\"vlan-40\")" in range_query_to_name.filter_string'
+ - range_query_to_name.current.0.fvnsEncapBlk.attributes.name == "anstest"
+ - range_query_to_name.current.0.fvnsEncapBlk.attributes.to == "vlan-40"
+
+- name: query vlan pool range - name is filtered
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_query_filter
+ range_start: '{{ omit }}'
+ range_end: '{{ omit }}'
+ register: range_query_name
+
+- name: query assertions
+ assert:
+ that:
+ - range_query_name is not changed
+ - range_query_name.url.endswith("class/fvnsEncapBlk.json")
+ - '"eq(fvnsEncapBlk.name,\"anstest\")" in range_query_name.filter_string'
+ - range_query_name.current.0.fvnsEncapBlk.attributes.name == "anstest"
+
+- name: query vlan pool range - from and to are filtered
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_query_filter
+ range_name: '{{ omit }}'
+ register: range_query_from_to
+
+- name: query assertions
+ assert:
+ that:
+ - range_query_from_to is not changed
+ - range_query_from_to.url.endswith("class/fvnsEncapBlk.json")
+ - '"eq(fvnsEncapBlk.from,\"vlan-20\")" in range_query_from_to.filter_string'
+ - '"eq(fvnsEncapBlk.to,\"vlan-40\")" in range_query_from_to.filter_string'
+ - range_query_from_to.current.0.fvnsEncapBlk.attributes.from == "vlan-20"
+ - range_query_from_to.current.0.fvnsEncapBlk.attributes.to == "vlan-40"
+
+- name: query all ranges in a vlan pool
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_pool_present
+ state: query
+ pool_allocation_mode: static
+ register: range_query_pool
+
+- name: query assertions
+ assert:
+ that:
+ - range_query_pool.current | length == 1
+ - range_query_pool.current.0.fvnsVlanInstP.attributes.name == "anstest"
+ - range_query_pool.current.0.fvnsVlanInstP.children | length > 1
+ - range_query_pool.url.endswith("infra/vlanns-[anstest]-static.json")
+
+- name: query all ranges
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_pool_present
+ state: query
+ pool: '{{ omit }}'
+ register: range_query_all
+
+- name: query assertions
+ assert:
+ that:
+ - range_query_all is not changed
+ - range_query_all.current | length > 1
+ - range_query_all.current.0.fvnsEncapBlk is defined
+ - range_query_all.url.endswith("class/fvnsEncapBlk.json")
+
+- name: delete vlan pool range - deletion works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_present
+ state: absent
+ register: delete_range
+
+- name: absent assertions
+ assert:
+ that:
+ - delete_range is changed
+ - delete_range.proposed == {}
+ - delete_range.previous.0.fvnsEncapBlk.attributes.name == "anstest"
+
+- name: delete vlan pool range - check mode works
+ cisco.aci.aci_encap_pool_range: &aci_range_absent
+ <<: *aci_range_present_2
+ state: absent
+ check_mode: yes
+ register: delete_check_mode
+
+- name: absent assertions
+ assert:
+ that:
+ - delete_check_mode is changed
+ - delete_check_mode.previous != []
+
+- name: delete vlan pool range - deletion works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_absent
+ register: delete_range_2
+
+- name: absent assertions
+ assert:
+ that:
+ - delete_range_2 is changed
+ - delete_range_2.previous == delete_check_mode.previous
+
+- name: delete vlan pool range again - idempotency works
+ cisco.aci.aci_encap_pool_range:
+ <<: *aci_range_absent
+ register: delete_idempotent
+
+- name: absent assertions
+ assert:
+ that:
+ - delete_idempotent is not changed
+ - delete_idempotent.previous == []
+
+- name: cleanup vlan pool
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_present
+ state: absent
+ when: pool_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/vsan.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/vsan.yml
new file mode 100644
index 00000000..7bdc332c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/vsan.yml
@@ -0,0 +1,20 @@
+- name: ensure vsan pool exists for tests to kick off
+ cisco.aci.aci_encap_pool: &aci_pool_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ pool: anstest
+ pool_type: vsan
+ allocation_mode: static
+ description: Ansible Test
+ state: present
+
+- name: cleanup vsan pool
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_present
+ state: absent
+ when: pool_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/vxlan.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/vxlan.yml
new file mode 100644
index 00000000..e5e30191
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_encap_pool_range/tasks/vxlan.yml
@@ -0,0 +1,19 @@
+- name: ensure vxlan pool exists for tests to kick off
+ cisco.aci.aci_encap_pool: &aci_pool_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ pool: anstest
+ pool_type: vxlan
+ description: Ansible Test
+ state: present
+
+- name: cleanup vxlan pool
+ cisco.aci.aci_encap_pool:
+ <<: *aci_pool_present
+ state: absent
+ when: pool_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg/tasks/main.yml
new file mode 100644
index 00000000..9291c18f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg/tasks/main.yml
@@ -0,0 +1,187 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+# Copyright: (c) 2020, Shreyas Srish (@shrsr)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: present
+ tenant: anstest
+ register: tenant_present
+
+- name: ensure monitoring policy exists
+ cisco.aci.aci_epg_monitoring_policy:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ monitoring_policy: check
+ tenant: anstest
+
+- name: ensure bd exists for tests to kick off
+ cisco.aci.aci_bd: &aci_bd_present
+ <<: *aci_tenant_present
+ bd: anstest
+ register: bd_present
+
+- name: ensure ap exists for tests to kick off
+ cisco.aci.aci_ap: &aci_ap_present
+ <<: *aci_tenant_present
+ ap: anstest
+ register: ap_present
+
+- name: create epg - check mode works
+ cisco.aci.aci_epg: &aci_epg_present
+ <<: *aci_ap_present
+ epg: anstest
+ bd: anstest
+ description: Ansible Test
+ monitoring_policy: check
+ check_mode: yes
+ register: epg_present_check_mode
+
+- name: create epg - creation works
+ cisco.aci.aci_epg:
+ <<: *aci_epg_present
+ register: epg_present
+
+- name: create epg - idempotency works
+ cisco.aci.aci_epg:
+ <<: *aci_epg_present
+ register: epg_present_idempotent
+
+- name: update epg - update works
+ cisco.aci.aci_epg:
+ <<: *aci_epg_present
+ description: Ansible Test Update
+ register: epg_present_update
+
+- name: create epg - missing param
+ cisco.aci.aci_epg:
+ <<: *aci_epg_present
+ ap: "{{ fakevar | default(omit) }}"
+ ignore_errors: yes
+ register: epg_present_missing_param
+
+- name: create epg - used for query
+ cisco.aci.aci_epg:
+ <<: *aci_epg_present
+ epg: anstest2
+
+- name: present assertions
+ assert:
+ that:
+ - epg_present_check_mode is changed
+ - epg_present_check_mode.previous == []
+ - epg_present_check_mode.sent.fvAEPg.attributes != {}
+ - epg_present_check_mode.sent.fvAEPg.children.0.fvRsBd.attributes.tnFvBDName == "anstest"
+ - epg_present_check_mode.sent.fvAEPg.children.1.fvRsAEPgMonPol.attributes.tnMonEPGPolName == 'check'
+ - epg_present is changed
+ - epg_present.sent == epg_present_check_mode.sent
+ - epg_present_idempotent is not changed
+ - epg_present_idempotent.sent == {}
+ - epg_present_update is changed
+ - epg_present_update.sent.fvAEPg.attributes.descr == 'Ansible Test Update'
+ - epg_present_missing_param is failed
+ - 'epg_present_missing_param.msg == "state is present but all of the following are missing: ap"'
+
+- name: get specific epg
+ cisco.aci.aci_epg:
+ <<: *aci_epg_present
+ state: query
+ register: epg_query
+
+- name: get all epgs
+ cisco.aci.aci_epg:
+ <<: *aci_tenant_present
+ state: query
+ tenant: "{{ fakevar | default(omit) }}"
+ register: epg_query_all
+
+- name: query assertions
+ assert:
+ that:
+ - epg_query is not changed
+ - epg_query.current | length == 1
+ - epg_query.current.0.fvAEPg.attributes.name == "anstest"
+ - epg_query.current.0.fvAEPg.children.1.fvRsAEPgMonPol.attributes.tnMonEPGPolName == 'check'
+ - '"tn-anstest/ap-anstest/epg-anstest.json" in epg_query.url'
+ - epg_query_all is not changed
+ - epg_query_all.current | length > 1
+ - '"?rsp-subtree=full&rsp-subtree-class=fvRsAEPgMonPol,fvRsBd" in epg_query_all.filter_string'
+ - '"class/fvAEPg.json" in epg_query_all.url'
+
+- name: delete epg - check mode works
+ cisco.aci.aci_epg: &aci_epg_absent
+ <<: *aci_epg_present
+ state: absent
+ check_mode: yes
+ register: delete_epg_check_mode
+
+- name: delete epg - delete works
+ cisco.aci.aci_epg:
+ <<: *aci_epg_absent
+ register: delete_epg
+
+- name: delete epg - idempotency works
+ cisco.aci.aci_epg:
+ <<: *aci_epg_absent
+ register: delete_epg_idempotent
+
+- name: delete epg - cleanup extra epg
+ cisco.aci.aci_epg:
+ <<: *aci_epg_absent
+ epg: anstest2
+
+- name: delete epg - missing param fails
+ cisco.aci.aci_epg:
+ <<: *aci_epg_absent
+ tenant: "{{ fakevar | default(omit) }}"
+ ignore_errors: yes
+ register: delete_epg_missing_param
+
+- name: query assertions
+ assert:
+ that:
+ - delete_epg_check_mode is changed
+ - delete_epg_check_mode.previous != []
+ - delete_epg is changed
+ - delete_epg.previous == delete_epg_check_mode.previous
+ - delete_epg_idempotent is not changed
+ - delete_epg_idempotent.previous == []
+ - delete_epg_missing_param is failed
+ - 'delete_epg_missing_param.msg == "state is absent but all of the following are missing: tenant"'
+
+- name: cleanup bd
+ cisco.aci.aci_bd:
+ <<: *aci_bd_present
+ state: absent
+ when: bd_present.previous == []
+
+- name: cleanup ap
+ cisco.aci.aci_ap:
+ <<: *aci_ap_present
+ state: absent
+ when: ap_present.previous == []
+
+- name: cleanup tenant
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_present
+ state: absent
+ when: tenant_present.previous == []
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract/tasks/main.yml
new file mode 100644
index 00000000..8af8c4b1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract/tasks/main.yml
@@ -0,0 +1,254 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Ensure contract binding does not exist prior to testing
+ cisco.aci.aci_epg_to_contract:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: anstest
+ ap: anstest
+ epg: anstest
+ contract_type: provider
+ contract: "anstest_http"
+ state: absent
+
+- name: ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ tenant: anstest
+ state: present
+ register: tenant_present
+
+- name: ensure contracts exist for tests to kick off
+ cisco.aci.aci_contract:
+ <<: *aci_tenant_present
+ contract: "{{ item }}"
+ with_items: ["anstest_http", "anstest_https", "anstest_db"]
+
+- name: ensure ap exists
+ cisco.aci.aci_ap: &aci_ap_present
+ <<: *aci_tenant_present
+ ap: anstest
+ register: ap_present
+
+- name: ensure epg exists
+ cisco.aci.aci_epg: &aci_epg_present
+ <<: *aci_ap_present
+ epg: anstest
+ register: epg_present
+
+- name: bind contract to epg - check mode works
+ cisco.aci.aci_epg_to_contract: &aci_epg_provide_present
+ <<: *aci_epg_present
+ contract_type: provider
+ contract: anstest_http
+ check_mode: yes
+ register: provide_present_check_mode
+
+- name: bind contract to epg - provide works
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_provide_present
+ register: provide_present
+
+- name: bind contract to epg - consume works
+ cisco.aci.aci_epg_to_contract: &aci_epg_consume_present
+ <<: *aci_epg_provide_present
+ contract_type: consumer
+ contract: anstest_db
+ register: consume_present
+
+- name: bind contract to epg - add additional contract
+ cisco.aci.aci_epg_to_contract: &aci_epg_provide_present2
+ <<: *aci_epg_provide_present
+ contract: anstest_https
+ provider_match: at_most_one
+ register: provide_present2
+
+- name: bind contract to epg - idempotency works
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_provide_present
+ register: idempotent_present
+
+- name: missing param - failure message works
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_tenant_present
+ contract_type: provider
+ ignore_errors: yes
+ register: missing_param_present
+
+- name: missing required param - failure message works
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_tenant_present
+ ignore_errors: yes
+ register: missing_required_present
+
+- name: incompatible param - failure message works
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_consume_present
+ provider_match: all
+ ignore_errors: yes
+ register: incompatible_present
+
+- name: present assertions
+ assert:
+ that:
+ - provide_present_check_mode is changed
+ - provide_present_check_mode.sent.fvRsProv.attributes.tnVzBrCPName == 'anstest_http'
+ - provide_present is changed
+ - provide_present.sent == provide_present_check_mode.sent
+ - provide_present.previous == []
+ - consume_present is changed
+ - consume_present.previous == []
+ - consume_present.sent.fvRsCons.attributes.tnVzBrCPName == 'anstest_db'
+ - provide_present2 is changed
+ - provide_present2.previous == []
+ - missing_param_present is failed
+ - 'missing_param_present.msg == "state is present but all of the following are missing: ap, contract, epg"'
+ - missing_required_present is failed
+ - 'missing_required_present.msg == "missing required arguments: contract_type"'
+ - incompatible_present is failed
+ - incompatible_present.msg == "the 'provider_match' is only configurable for Provided Contracts"
+
+- name: get binding
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_provide_present2
+ state: query
+ register: query_provide_contract
+
+- name: get binding
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_consume_present
+ state: query
+ register: query_consume_contract
+
+- name: get all bindings
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_tenant_present
+ state: query
+ tenant: "{{ fakevar | default(omit) }}"
+ contract_type: provider
+ register: query_all
+
+- name: missing required param - failure message works
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_tenant_present
+ state: query
+ ignore_errors: yes
+ register: missing_required_query
+
+- name: query assertions
+ assert:
+ that:
+ - query_provide_contract is not changed
+ - query_provide_contract.current != []
+ - '"uni/tn-anstest/ap-anstest/epg-anstest/rsprov-anstest_https.json" in query_provide_contract.url'
+ - query_consume_contract is not changed
+ - query_consume_contract.current != []
+ - '"uni/tn-anstest/ap-anstest/epg-anstest/rscons-anstest_db.json" in query_consume_contract.url'
+ - query_all is not changed
+ - '"class/fvRsProv.json" in query_all.url'
+ - missing_required_query is failed
+ - 'missing_required_query.msg == "missing required arguments: contract_type"'
+
+- name: delete consume binding - check mode works
+ cisco.aci.aci_epg_to_contract: &aci_epg_consume_absent
+ <<: *aci_epg_consume_present
+ state: absent
+ check_mode: yes
+ register: consume_absent_check_mode
+
+- name: delete consume binding - deletion works
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_consume_absent
+ register: consume_absent
+
+- name: delete provide binding - deletion works
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_provide_present
+ state: absent
+ register: provide_absent
+
+- name: delete provide binding - deletion works
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_provide_present2
+ state: absent
+ register: provide_absent2
+
+- name: delete consume binding - idempotency works
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_consume_absent
+ register: consume_absent_idempotent
+
+- name: missing param - failure message works
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_consume_absent
+ contract: "{{ fakevar | default(omit) }}"
+ ignore_errors: yes
+ register: missing_param_absent
+
+- name: missing required param - failure message works
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_consume_absent
+ contract_type: "{{ fakevar | default(omit) }}"
+ ignore_errors: yes
+ register: missing_required_absent
+
+- name: absent assertions
+ assert:
+ that:
+ - consume_absent_check_mode is changed
+ - consume_absent_check_mode.previous.0.fvRsCons is defined
+ - consume_absent is changed
+ - consume_absent.previous == consume_absent_check_mode.previous
+ - provide_absent is changed
+ - provide_absent.previous.0.fvRsProv is defined
+ - provide_absent2 is changed
+ - consume_absent_idempotent is not changed
+ - consume_absent_idempotent.previous == []
+ - missing_param_absent is failed
+ - 'missing_param_absent.msg == "state is absent but all of the following are missing: contract"'
+ - missing_required_absent is failed
+ - 'missing_required_absent.msg == "missing required arguments: contract_type"'
+
+- name: cleanup contracts
+ cisco.aci.aci_contract:
+ <<: *aci_tenant_present
+ state: absent
+ contract: "{{ item }}"
+ with_items: ["anstest_http", "anstest_https", "anstest_db"]
+
+- name: cleanup epg
+ cisco.aci.aci_epg:
+ <<: *aci_epg_present
+ state: absent
+ when: epg_present is changed
+
+- name: cleanup ap
+ cisco.aci.aci_ap:
+ <<: *aci_ap_present
+ state: absent
+ when: ap_present is changed
+
+- name: cleanup tenant
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_present
+ state: absent
+ when: tenant_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract_master/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract_master/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract_master/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract_master/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract_master/tasks/main.yml
new file mode 100644
index 00000000..1f49f488
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_contract_master/tasks/main.yml
@@ -0,0 +1,202 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+
+- name: Ensure tenant doesn't exist
+ aci_tenant:
+ <<: *aci_info
+ state: absent
+ tenant: anstest
+ register: tenant_absent
+
+- name: Ensure tenant exists for tests to kick off
+ aci_tenant: &aci_tenant_present
+ <<: *aci_info
+ state: present
+ tenant: anstest
+ register: tenant_present
+
+- name: ensure contracts exist for tests to kick off
+ cisco.aci.aci_contract:
+ <<: *aci_tenant_present
+ contract: "{{ item }}"
+ with_items: ["anstest_http", "anstest_https", "anstest_db"]
+
+- name: ensure ap exists for tests to kick off
+ cisco.aci.aci_ap: &aci_ap_present
+ <<: *aci_tenant_present
+ ap: "{{ item }}"
+ register: ap_present
+ loop:
+ - anstest
+ - anstest_2
+
+- name: create epg
+ cisco.aci.aci_epg: &aci_epg_present
+ <<: *aci_tenant_present
+ ap: anstest
+ epg: anstest
+ register: epg_present
+
+- name: bind provider contract to epg
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_present
+ contract_type: provider
+ contract: anstest_http
+
+- name: bind consumer contract to epg
+ cisco.aci.aci_epg_to_contract: &aci_epg_consume_present
+ <<: *aci_epg_present
+ contract_type: consumer
+ contract: anstest_https
+
+- name: bind consumer contract to epg
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_epg_consume_present
+ contract_type: consumer
+ contract: anstest_db
+
+- name: create epgs
+ cisco.aci.aci_epg:
+ <<: *aci_tenant_present
+ ap: "{{ item.ap }}"
+ epg: "{{ item.epg }}"
+ register: inherited_epg_present
+ loop:
+ - {ap: 'anstest', epg: 'anstest_2'}
+ - {ap: 'anstest_2', epg: 'anstest_4'}
+ - {ap: 'anstest_2', epg: 'anstest_3'}
+
+- name: bind provider contract to epg_4
+ cisco.aci.aci_epg_to_contract:
+ <<: *aci_tenant_present
+ ap: anstest_2
+ epg: anstest_4
+ contract_type: provider
+ contract: anstest_http
+
+- name: add contract master
+ cisco.aci.aci_epg_to_contract_master:
+ <<: *aci_tenant_present
+ ap: "{{ item.ap }}"
+ epg: "{{ item.epg }}"
+ contract_master_ap: anstest
+ contract_master_epg: anstest
+ state: present
+ register: add_contract_master
+ loop:
+ - {ap: 'anstest', epg: 'anstest_2'}
+ - {ap: 'anstest_2', epg: 'anstest_3'}
+
+- name: Verify add_contract_master
+ assert:
+ that:
+ - item is changed
+ - item.current.0.fvRsSecInherited.attributes.tDn == "uni/tn-anstest/ap-anstest/epg-anstest"
+ loop: "{{ add_contract_master.results }}"
+
+- name: add another contract master
+ cisco.aci.aci_epg_to_contract_master:
+ <<: *aci_tenant_present
+ ap: "{{ item.ap }}"
+ epg: "{{ item.epg }}"
+ contract_master_ap: anstest_2
+ contract_master_epg: anstest_4
+ state: present
+ register: add_another_contract_master
+ loop:
+ - {ap: 'anstest', epg: 'anstest_2'}
+ - {ap: 'anstest_2', epg: 'anstest_3'}
+- name: Verify add_another_contract_master
+ assert:
+ that:
+ - item is changed
+ - item.current.0.fvRsSecInherited.attributes.tDn == "uni/tn-anstest/ap-anstest_2/epg-anstest_4"
+ loop: "{{ add_another_contract_master.results }}"
+
+# Query all contract master ! does not work
+- name: Query all contract master
+ cisco.aci.aci_epg_to_contract_master:
+ <<: *aci_tenant_present
+ ap: anstest
+ epg: anstest_2
+ state: query
+ register: query_all
+
+# Query specific contract master
+- name: Query specific contract master
+ cisco.aci.aci_epg_to_contract_master:
+ <<: *aci_tenant_present
+ ap: anstest
+ epg: anstest_2
+ contract_master_ap: anstest_2
+ contract_master_epg: anstest_4
+ state: query
+ register: query_specific_contract_master
+
+- name: Verify query_specific_contract_master
+ assert:
+ that:
+ - query_specific_contract_master is not changed
+ - query_specific_contract_master.current.0.fvRsSecInherited.attributes.dn == "uni/tn-anstest/ap-anstest/epg-anstest_2/rssecInherited-[uni/tn-anstest/ap-anstest_2/epg-anstest_4]"
+ - query_specific_contract_master.current.0.fvRsSecInherited.attributes.tDn == "uni/tn-anstest/ap-anstest_2/epg-anstest_4"
+
+# Query specific contract master
+- name: Query another specific contract master
+ cisco.aci.aci_epg_to_contract_master:
+ <<: *aci_tenant_present
+ ap: anstest
+ epg: anstest_2
+ contract_master_ap: anstest
+ contract_master_epg: anstest
+ state: query
+ register: query_another_specific_contract_master
+
+- name: Verify query_another_specific_contract_master
+ assert:
+ that:
+ - query_another_specific_contract_master is not changed
+ - query_another_specific_contract_master.current.0.fvRsSecInherited.attributes.dn == "uni/tn-anstest/ap-anstest/epg-anstest_2/rssecInherited-[uni/tn-anstest/ap-anstest/epg-anstest]"
+ - query_another_specific_contract_master.current.0.fvRsSecInherited.attributes.tDn == "uni/tn-anstest/ap-anstest/epg-anstest"
+
+- name: Remove specific contract master
+ cisco.aci.aci_epg_to_contract_master:
+ <<: *aci_tenant_present
+ ap: anstest
+ epg: anstest_2
+ contract_master_ap: anstest
+ contract_master_epg: anstest
+ state: absent
+ register: remove_contract_master
+
+- name: Verify remove_contract_master
+ assert:
+ that:
+ - remove_contract_master is changed
+ - remove_contract_master.current == []
+
+# Clean up environment
+- name: Ensure tenant doesn't exist
+ aci_tenant:
+ <<: *aci_info
+ state: absent
+ tenant: anstest
+ register: tenant_absent \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_domain/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_domain/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_domain/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_domain/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_domain/tasks/main.yml
new file mode 100644
index 00000000..f199675a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_epg_to_domain/tasks/main.yml
@@ -0,0 +1,279 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ tenant: anstest
+ state: present
+ register: tenant_present
+
+- name: ensure ap exists for tests to kick off
+ cisco.aci.aci_ap: &aci_ap_present
+ <<: *aci_tenant_present
+ ap: anstest
+ register: ap_present
+
+- name: delete epg to make sure setup is clean
+ cisco.aci.aci_epg:
+ <<: *aci_ap_present
+ epg: anstest
+ state: absent
+
+- name: ensure epg exists for tests to kick off
+ cisco.aci.aci_epg: &aci_epg_present
+ <<: *aci_ap_present
+ epg: anstest
+ register: epg_present
+
+- name: ensure phys domain exists for tests to kick off
+ cisco.aci.aci_rest: &aci_rest_phys_domain
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ method: post
+ path: api/mo/uni/phys-anstest.json
+ content: {"physDomP": {"attributes": {}}}
+ register: phys_domain_post
+
+- name: ensure vmm domain exists for tests to kick off
+ cisco.aci.aci_rest: &aci_rest_vmm_domain
+ <<: *aci_rest_phys_domain
+ path: api/mo/uni/vmmp-VMware/dom-anstest.json
+ content: {"vmmDomP": {"attributes": {}}}
+ register: vmm_domain_post
+
+- name: ensure l2dom domain exists for tests to kick off
+ cisco.aci.aci_rest: &aci_rest_l2dom_domain
+ <<: *aci_rest_phys_domain
+ path: api/mo/uni/l2dom-anstest.json
+ content: {"l2extDomP": {"attributes": {}}}
+ register: l2dom_domain_post
+
+- name: bind phys domain to epg - check mode works
+ cisco.aci.aci_epg_to_domain: &aci_epg_to_domain_present
+ <<: *aci_epg_present
+ domain: anstest
+ domain_type: phys
+ check_mode: yes
+ register: phys_check_mode_present
+
+- name: bind phys domain to epg - creation works
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_present
+ register: phys_present
+
+- name: bind phys domain to epg - idempotency works
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_present
+ register: phys_idempotent
+
+- name: bind phys domain to epg - update works
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_present
+ deploy_immediacy: immediate
+ register: phys_update
+
+- name: bind l2dom domain to epg
+ cisco.aci.aci_epg_to_domain: &aci_epg_to_domain_l2dom_present
+ <<: *aci_epg_present
+ domain: anstest
+ domain_type: l2dom
+ register: l2_present
+
+- name: bind vmm domain to epg - creation works
+ cisco.aci.aci_epg_to_domain: &aci_epg_to_domain_vmm_present
+ <<: *aci_epg_to_domain_present
+ domain_type: vmm
+ vm_provider: vmware
+ resolution_immediacy: pre-provision
+ promiscuous: accept
+ register: vmm_present_promiscuous_accept
+
+- name: bind vmm domain to epg - creation works
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_present
+ domain_type: vmm
+ vm_provider: vmware
+ resolution_immediacy: pre-provision
+ promiscuous: reject
+ register: vmm_present_promiscuous_reject
+
+- name: bind vmm domain to epg - missing params
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_vmm_present
+ vm_provider: "{{ fake_var | default(omit) }}"
+ ignore_errors: yes
+ register: present_missing_params
+
+- name: bind vmm domain to epg - valid vlan
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_present
+ encap: 1
+ register: valid_vlan
+
+- name: bind vmm domain to epg - valid vlan (primary_encap)
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_present
+ primary_encap: 25
+ register: valid_vlan_primary_encap
+
+- name: bind vmm domain to epg - invalid vlan
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_present
+ encap: 4097
+ ignore_errors: yes
+ register: invalid_vlan
+
+- name: bind vmm domain to epg - invalid vlan (primary_encap)
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_present
+ primary_encap: 4097
+ ignore_errors: yes
+ register: invalid_vlan_primary_encap
+
+- name: bind vmm domain to epg - incompatible params
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_present
+ vm_provider: vmware
+ ignore_errors: yes
+ register: incompatible_params
+
+- name: present assertions
+ assert:
+ that:
+ - phys_check_mode_present is changed
+ - phys_present is changed
+ - phys_present.previous == []
+ - phys_present.sent.fvRsDomAtt.attributes.switchingMode == 'native'
+ - '"[uni/phys-anstest].json" in phys_present.url'
+ - phys_idempotent is not changed
+ - phys_idempotent.sent == {}
+ - phys_update is changed
+ - phys_update.sent.fvRsDomAtt.attributes.instrImedcy == 'immediate'
+ - vmm_present_promiscuous_accept is changed
+ - vmm_present_promiscuous_reject is changed
+ - vmm_present_promiscuous_accept.current.0.fvRsDomAtt.children.0.vmmSecP.attributes.allowPromiscuous == 'accept'
+ - vmm_present_promiscuous_reject.current.0.fvRsDomAtt.children.0.vmmSecP.attributes.allowPromiscuous == 'reject'
+ - vmm_present_promiscuous_accept.sent.fvRsDomAtt.attributes.resImedcy == 'pre-provision'
+ - vmm_present_promiscuous_accept.sent.fvRsDomAtt.attributes.switchingMode == 'native'
+ - '"[uni/vmmp-VMware/dom-anstest].json" in vmm_present_promiscuous_accept.url'
+ - present_missing_params is failed
+ - 'present_missing_params.msg == "domain_type is vmm but all of the following are missing: vm_provider"'
+ - invalid_vlan is failed
+ - invalid_vlan.msg == "Valid VLAN assignments are from 1 to 4096"
+ - incompatible_params is failed
+ - incompatible_params.msg == "Domain type 'phys' cannot have a 'vm_provider'"
+ - invalid_vlan_primary_encap.msg == "Valid VLAN assignments are from 1 to 4096"
+ - '"[uni/l2dom-anstest].json" in l2_present.url'
+ - valid_vlan_primary_encap.current.0.fvRsDomAtt.attributes.dn == "uni/tn-anstest/ap-anstest/epg-anstest/rsdomAtt-[uni/phys-anstest]"
+
+- name: get domain epg binding
+ cisco.aci.aci_epg_to_domain: &aci_epg_domain_query
+ <<: *aci_tenant_present
+ state: query
+ tenant: "{{ fake_var | default(omit) }}"
+ register: binding_query
+
+- name: query assertions
+ assert:
+ that:
+ - binding_query is not changed
+ - binding_query.current | length > 1
+ - '"class/fvRsDomAtt.json" in binding_query.url'
+
+- name: delete domain epg binding - check mode
+ cisco.aci.aci_epg_to_domain: &aci_epg_to_domain_absent
+ <<: *aci_epg_to_domain_present
+ state: absent
+ check_mode: yes
+ register: epg_domain_check_mode_absent
+
+- name: delete phys domain epg binding - delete works
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_absent
+ register: epg_domain_absent
+
+- name: delete vmm domain epg binding - delete works
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_vmm_present
+ state: absent
+ register: epg_vmm_domain_absent
+
+- name: delete domain epg binding - idempotency works
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_epg_to_domain_absent
+ register: idempotency_absent
+
+- name: delete domain epg binding - missing param
+ cisco.aci.aci_epg_to_domain:
+ <<: *aci_tenant_present
+ state: absent
+ ignore_errors: true
+ register: absent_missing_param
+
+- name: absent assertions
+ assert:
+ that:
+ - epg_domain_check_mode_absent is changed
+ - epg_domain_check_mode_absent.previous != []
+ - epg_domain_absent is changed
+ - epg_domain_absent.previous == epg_domain_check_mode_absent.previous
+ - epg_vmm_domain_absent is changed
+ - idempotency_absent is not changed
+ - idempotency_absent.previous == []
+ - absent_missing_param is failed
+ - 'absent_missing_param.msg == "state is absent but all of the following are missing: ap, domain, domain_type, epg"'
+
+- name: remove vmm domain - cleanup
+ cisco.aci.aci_rest:
+ <<: *aci_rest_vmm_domain
+ method: delete
+ when: vmm_domain_post is changed
+
+- name: remove phys domain - cleanup
+ cisco.aci.aci_rest:
+ <<: *aci_rest_phys_domain
+ method: delete
+ when: phys_domain_post is changed
+
+- name: remove l2 domain - cleanup
+ cisco.aci.aci_rest:
+ <<: *aci_rest_l2dom_domain
+ method: delete
+ when: l2dom_domain_post is changed
+
+- name: remove epg - cleanup
+ cisco.aci.aci_epg:
+ <<: *aci_epg_present
+ state: absent
+ when: epg_present is changed
+
+- name: remove ap - cleanup
+ cisco.aci.aci_ap:
+ <<: *aci_ap_present
+ state: absent
+ when: ap_present is changed
+
+- name: remove tenant - cleanup
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_present
+ state: absent
+ when: tenant_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_fabric_node/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_fabric_node/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_fabric_node/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_fabric_node/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_fabric_node/tasks/main.yml
new file mode 100644
index 00000000..ad255bb1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_fabric_node/tasks/main.yml
@@ -0,0 +1,217 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Remove fabric node
+ cisco.aci.aci_fabric_node: &aci_fabric_node_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ serial: ansible_test
+ node_id: 105
+ state: absent
+
+
+# ADD FABRIC NODE
+- name: Add fabric node (check_mode)
+ cisco.aci.aci_fabric_node: &aci_fabric_node_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ serial: ansible_test
+ node_id: 105
+ switch: test
+ state: present
+ check_mode: yes
+ register: cm_add_fabric_node
+
+- name: Add fabric node (normal mode)
+ cisco.aci.aci_fabric_node: *aci_fabric_node_present
+ register: nm_add_fabric_node
+
+- name: Add fabric node again (check_mode)
+ cisco.aci.aci_fabric_node: *aci_fabric_node_present
+ check_mode: yes
+ register: cm_add_fabric_node_again
+
+- name: Add fabric node again (normal mode)
+ cisco.aci.aci_fabric_node: *aci_fabric_node_present
+ register: nm_add_fabric_node_again
+
+- name: Verify add_fabric_node
+ assert:
+ that:
+ - cm_add_fabric_node is changed
+ - nm_add_fabric_node is changed
+ # FIXME: Module is not idempotent
+ - cm_add_fabric_node_again is not changed
+ - nm_add_fabric_node_again is not changed
+
+
+# CHANGE FABRIC NODE
+- name: Change description of fabric node (check_mode)
+ cisco.aci.aci_fabric_node:
+ <<: *aci_fabric_node_present
+ description: Ansible test fabric node
+ check_mode: yes
+ register: cm_add_fabric_node_descr
+
+- name: Change description of fabric node (normal mode)
+ cisco.aci.aci_fabric_node:
+ <<: *aci_fabric_node_present
+ description: Ansible test fabric node
+ register: nm_add_fabric_node_descr
+
+- name: Change description of fabric nodeagain (check_mode)
+ cisco.aci.aci_fabric_node:
+ <<: *aci_fabric_node_present
+ description: Ansible test fabric node
+ check_mode: yes
+ register: cm_add_fabric_node_descr_again
+
+- name: Change description of fabric node again (normal mode)
+ cisco.aci.aci_fabric_node:
+ <<: *aci_fabric_node_present
+ description: Ansible test fabric node
+ register: nm_add_fabric_node_descr_again
+
+- name: Verify add_fabric_node_descr
+ assert:
+ that:
+ - cm_add_fabric_node_descr is changed
+ - nm_add_fabric_node_descr is changed
+ # FIXME: Module is not idempotent
+ - cm_add_fabric_node_descr_again is not changed
+ - nm_add_fabric_node_descr_again is not changed
+
+
+# ADD FABRIC NODE AGAIN
+- name: Add fabric node again with no description (check_mode)
+ cisco.aci.aci_fabric_node: *aci_fabric_node_present
+ check_mode: yes
+ register: cm_add_fabric_node_again_no_descr
+
+- name: Add fabric node again with no description (normal mode)
+ cisco.aci.aci_fabric_node: *aci_fabric_node_present
+ register: nm_add_fabric_node_again_no_descr
+
+- name: Verify add_fabric_node_again_no_descr
+ assert:
+ that:
+ # FIXME: Module is not idempotent
+ - cm_add_fabric_node_again_no_descr is not changed
+ - nm_add_fabric_node_again_no_descr is not changed
+
+
+# QUERY ALL FABRIC NODES
+- name: Query fabric nodes (check_mode)
+ cisco.aci.aci_fabric_node: &aci_fabric_node_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_fabric_nodes
+
+- name: Query all fabric nodes (normal mode)
+ cisco.aci.aci_fabric_node: *aci_fabric_node_query
+ register: nm_query_all_fabric_nodes
+
+- name: Verify query_all_fabric_nodes
+ assert:
+ that:
+ - cm_query_all_fabric_nodes is not changed
+ - nm_query_all_fabric_nodes is not changed
+ - cm_query_all_fabric_nodes == nm_query_all_fabric_nodes
+
+
+# QUERY A FABRIC NODE
+- name: Query our fabric_node
+ cisco.aci.aci_fabric_node:
+ <<: *aci_fabric_node_query
+ serial: ansible_test # might need node_id too
+ check_mode: yes
+ register: cm_query_fabric_node
+
+- name: Query our fabric_node
+ cisco.aci.aci_fabric_node:
+ <<: *aci_fabric_node_query
+ serial: ansible_test
+ register: nm_query_fabric_node
+
+- name: Verify query_fabric_node
+ assert:
+ that:
+ - cm_query_fabric_node is not changed
+ - nm_query_fabric_node is not changed
+ - cm_query_fabric_node == nm_query_fabric_node
+
+
+# REMOVE FABRIC NODE
+- name: Remove fabric_node (check_mode)
+ cisco.aci.aci_fabric_node: *aci_fabric_node_absent
+ check_mode: yes
+ register: cm_remove_fabric_node
+
+- name: Remove fabric_node (normal mode)
+ cisco.aci.aci_fabric_node: *aci_fabric_node_absent
+ register: nm_remove_fabric_node
+
+- name: Remove fabric_node again (check_mode)
+ cisco.aci.aci_fabric_node: *aci_fabric_node_absent
+ check_mode: yes
+ register: cm_remove_fabric_node_again
+
+- name: Remove fabric_node again (normal mode)
+ cisco.aci.aci_fabric_node: *aci_fabric_node_absent
+ register: nm_remove_fabric_node_again
+
+- name: Verify remove_fabric_node
+ assert:
+ that:
+ - cm_remove_fabric_node is changed
+ - nm_remove_fabric_node is changed
+ - cm_remove_fabric_node_again is not changed
+ - nm_remove_fabric_node_again is not changed
+
+
+# QUERY NON-EXISTING LEAF PROFILE
+- name: Query non-existing fabric_node (check_mode)
+ cisco.aci.aci_fabric_node:
+ <<: *aci_fabric_node_query
+ serial: ansible_test
+ check_mode: yes
+ register: cm_query_non_fabric_node
+
+- name: Query non-existing fabric_node (normal mode)
+ cisco.aci.aci_fabric_node:
+ <<: *aci_fabric_node_query
+ serial: ansible_test
+ register: nm_query_non_fabric_node
+
+- name: Verify query_non_fabric_node
+ assert:
+ that:
+ - cm_query_non_fabric_node is not changed
+ - nm_query_non_fabric_node is not changed
+ - cm_query_non_fabric_node == nm_query_non_fabric_node
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter/tasks/main.yml
new file mode 100644
index 00000000..b5ceb56c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter/tasks/main.yml
@@ -0,0 +1,223 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Add tenant
+ cisco.aci.aci_tenant:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: ansible_test
+ state: present
+
+- name: Remove filter
+ cisco.aci.aci_filter: &filter_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: ansible_test
+ filter: filter_test
+ state: absent
+
+# ADD FILTER
+- name: Add filter (check_mode)
+ cisco.aci.aci_filter: &filter_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: ansible_test
+ filter: filter_test
+ state: present
+ check_mode: yes
+ register: cm_add_filter
+
+- name: Add filter again (check_mode)
+ cisco.aci.aci_filter: *filter_present
+ check_mode: yes
+ register: cm_add_filter_again
+
+- name: Add filter (normal mode)
+ cisco.aci.aci_filter: *filter_present
+ register: nm_add_filter
+
+- name: Add filter again (normal mode)
+ cisco.aci.aci_filter: *filter_present
+ register: nm_add_filter_again
+
+- name: Verify add_filter
+ assert:
+ that:
+ - cm_add_filter is changed
+ - cm_add_filter_again is changed
+ - nm_add_filter is changed
+ - nm_add_filter_again is not changed
+
+# CHANGE FILTER
+- name: Change description of filter (check_mode)
+ cisco.aci.aci_filter:
+ <<: *filter_present
+ description: Ansible test filter
+ check_mode: yes
+ register: cm_add_filter_descr
+
+- name: Change description of filter again (check_mode)
+ cisco.aci.aci_filter:
+ <<: *filter_present
+ description: Ansible test filter
+ check_mode: yes
+ register: cm_add_filter_descr_again
+
+- name: Change description of filter (normal mode)
+ cisco.aci.aci_filter:
+ <<: *filter_present
+ description: Ansible test filter
+ register: nm_add_filter_descr
+
+- name: Change description of filter again (normal mode)
+ cisco.aci.aci_filter:
+ <<: *filter_present
+ description: Ansible test filter
+ register: nm_add_filter_descr_again
+
+- name: Verify add_filter_descr
+ assert:
+ that:
+ - cm_add_filter_descr is changed
+ - cm_add_filter_descr_again is changed
+ - nm_add_filter_descr is changed
+ - nm_add_filter_descr_again is not changed
+
+# ADD FILTER AGAIN
+- name: Add filter again with no description (check_mode)
+ cisco.aci.aci_filter: *filter_present
+ check_mode: yes
+ register: cm_add_filter_again_no_descr
+
+- name: Add filter again with no description (normal mode)
+ cisco.aci.aci_filter: *filter_present
+ register: nm_add_filter_again_no_descr
+
+- name: Verify add_filter_again_no_descr
+ assert:
+ that:
+ - cm_add_filter_again_no_descr is not changed
+ - nm_add_filter_again_no_descr is not changed
+
+# QUERY ALL FILTERS
+- name: Query all filters (check_mode)
+ cisco.aci.aci_filter: &filter_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_filters
+
+- name: Query all filters (normal mode)
+ cisco.aci.aci_filter: *filter_query
+ register: nm_query_all_filters
+
+- name: Verify query_all_filters
+ assert:
+ that:
+ - cm_query_all_filters is not changed
+ - nm_query_all_filters is not changed
+ # NOTE: Order of filters is not stable between calls
+ #- cm_query_all_filters == nm_query_all_filters
+
+# QUERY A FILTER
+- name: Query our filter
+ cisco.aci.aci_filter:
+ <<: *filter_query
+ tenant: ansible_test
+ filter: filter_test
+ check_mode: yes
+ register: cm_query_filter
+
+- name: Query our filter
+ cisco.aci.aci_filter:
+ <<: *filter_query
+ tenant: ansible_test
+ filter: filter_test
+ register: nm_query_filter
+
+- name: Verify query_filter
+ assert:
+ that:
+ - cm_query_filter is not changed
+ - nm_query_filter is not changed
+ - cm_query_filter == nm_query_filter
+
+# REMOVE FILTER
+- name: Remove filter (check_mode)
+ cisco.aci.aci_filter: *filter_absent
+ check_mode: yes
+ register: cm_remove_filter
+
+- name: Remove filter again (check_mode)
+ cisco.aci.aci_filter: *filter_absent
+ check_mode: yes
+ register: cm_remove_filter_again
+
+- name: Remove filter (normal mode)
+ cisco.aci.aci_filter: *filter_absent
+ register: nm_remove_filter
+
+- name: Remove filter again (normal mode)
+ cisco.aci.aci_filter: *filter_absent
+ register: nm_remove_filter_again
+
+- name: Verify remove_filter
+ assert:
+ that:
+ - cm_remove_filter is changed
+ - cm_remove_filter_again is changed
+ - nm_remove_filter is changed
+ - nm_remove_filter_again is not changed
+
+# QUERY NON-EXISTING FILTER
+# FIXME: Should this fail or return empty values ?
+- name: Query non-existing filter (check_mode)
+ cisco.aci.aci_filter:
+ <<: *filter_query
+ tenant: ansible_test
+ filter: filter_test
+ check_mode: yes
+ register: cm_query_non_filter
+
+- name: Query non-existing filter (normal mode)
+ cisco.aci.aci_filter:
+ <<: *filter_query
+ tenant: ansible_test
+ filter: filter_test
+ register: nm_query_non_filter
+
+- name: Verify query_non_filter
+ assert:
+ that:
+ - cm_query_non_filter is not changed
+ - nm_query_non_filter is not changed
+ - cm_query_non_filter == nm_query_non_filter
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter_entry/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter_entry/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter_entry/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter_entry/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter_entry/tasks/main.yml
new file mode 100644
index 00000000..b69ae6c4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_filter_entry/tasks/main.yml
@@ -0,0 +1,299 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: anstest
+ state: absent
+
+- name: ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ tenant: anstest
+ state: present
+ register: tenant_present
+
+- name: ensure filter exists for tests to kick off
+ cisco.aci.aci_filter: &aci_filter_present
+ <<: *aci_tenant_present
+ filter: anstest
+ register: filter_present
+
+- name: create filter entry - check mode works
+ cisco.aci.aci_filter_entry: &aci_entry_present
+ <<: *aci_filter_present
+ entry: anstest
+ description: Ansible Test
+ ether_type: ip
+ ip_protocol: tcp
+ dst_port_start: 80
+ dst_port_end: 88
+ check_mode: yes
+ register: entry_present_check_mode
+
+- name: create filter entry - creation works
+ cisco.aci.aci_filter_entry:
+ <<: *aci_entry_present
+ register: entry_present
+
+- name: create filter entry - idempotency works
+ cisco.aci.aci_filter_entry:
+ <<: *aci_entry_present
+ register: entry_present_idempotent
+
+- name: update filter entry - update works
+ cisco.aci.aci_filter_entry:
+ <<: *aci_entry_present
+ description: Ansible Test Update
+ dst_port_start: 80
+ dst_port_end: 90
+ register: entry_present_update
+
+- name: create filter entry - test different types
+ cisco.aci.aci_filter_entry:
+ <<: *aci_filter_present
+ entry: anstest2
+ ether_type: arp
+ arp_flag: arp_reply
+ register: entry_present_2
+
+- name: create filter entry - test different types
+ cisco.aci.aci_filter_entry:
+ <<: *aci_filter_present
+ entry: anstest3
+ ether_type: ip
+ ip_protocol: icmp
+ icmp_msg_type: echo
+ register: entry_present_3
+
+- name: create filter entry - test different types
+ cisco.aci.aci_filter_entry:
+ <<: *aci_filter_present
+ entry: anstest4
+ ether_type: ip
+ ip_protocol: udp
+ dst_port: 1000
+ register: entry_present_4
+
+- name: missing param - failure message works
+ cisco.aci.aci_filter_entry:
+ <<: *aci_filter_present
+ ignore_errors: yes
+ register: present_missing_param
+
+- name: incompatable params - failure message works
+ cisco.aci.aci_filter_entry:
+ <<: *aci_entry_present
+ dst_port: 99
+ ignore_errors: yes
+ register: present_incompatible_params
+
+- name: present assertions
+ assert:
+ that:
+ - entry_present_check_mode is changed
+ - entry_present_check_mode.previous == []
+ - entry_present_check_mode.sent.vzEntry.attributes.dFromPort == 'http'
+ - entry_present_check_mode.sent.vzEntry.attributes.dToPort == '88'
+ - entry_present_check_mode.sent.vzEntry.attributes.descr == 'Ansible Test'
+ - entry_present_check_mode.sent.vzEntry.attributes.etherT == 'ip'
+ - entry_present_check_mode.sent.vzEntry.attributes.name == 'anstest'
+ - entry_present_check_mode.sent.vzEntry.attributes.prot == 'tcp'
+ - entry_present is changed
+ - entry_present.previous == []
+ - entry_present.sent == entry_present_check_mode.sent
+ - entry_present_idempotent is not changed
+ - entry_present_idempotent.previous != []
+ - entry_present_idempotent.sent == {}
+ - entry_present_update is changed
+ - entry_present_update.previous != []
+ - entry_present_update.sent != entry_present_update.proposed
+ - entry_present_2 is changed
+ - entry_present_2.sent.vzEntry.attributes.arpOpc == 'reply'
+ - entry_present_2.sent.vzEntry.attributes.etherT == 'arp'
+ - entry_present_2.sent.vzEntry.attributes.name == 'anstest2'
+ - entry_present_3 is changed
+ - entry_present_3.sent.vzEntry.attributes.etherT == 'ip'
+ - entry_present_3.sent.vzEntry.attributes.icmpv4T == 'echo'
+ - entry_present_3.sent.vzEntry.attributes.name == 'anstest3'
+ - entry_present_3.sent.vzEntry.attributes.prot == 'icmp'
+ - entry_present_4 is changed
+ - entry_present_4.sent.vzEntry.attributes.dFromPort == '1000'
+ - entry_present_4.sent.vzEntry.attributes.dToPort == '1000'
+ - entry_present_4.sent.vzEntry.attributes.etherT == 'ip'
+ - entry_present_4.sent.vzEntry.attributes.name == 'anstest4'
+ - entry_present_4.sent.vzEntry.attributes.prot == 'udp'
+ - present_missing_param is failed
+ - 'present_missing_param.msg == "state is present but all of the following are missing: entry"'
+ - present_incompatible_params is failed
+ - present_incompatible_params.msg.startswith("Parameter")
+
+- name: query tenant filter entry
+ cisco.aci.aci_filter_entry: &aci_query_entry
+ <<: *aci_entry_present
+ state: query
+ register: query_tenant_filter_entry
+
+- name: query filter entry
+ cisco.aci.aci_filter_entry:
+ <<: *aci_query_entry
+ tenant: "{{ fakevar | default(omit) }}"
+ register: query_filter_entry
+
+- name: query tenant entry
+ cisco.aci.aci_filter_entry:
+ <<: *aci_query_entry
+ filter: "{{ fakevar | default(omit) }}"
+ register: query_tenant_entry
+
+- name: query tenant filter
+ cisco.aci.aci_filter_entry:
+ <<: *aci_query_entry
+ entry: "{{ fakevar | default(omit) }}"
+ register: query_tenant_filter
+
+- name: query entry
+ cisco.aci.aci_filter_entry: &aci_query_entry_2
+ <<: *aci_query_entry
+ tenant: "{{ fakevar | default(omit) }}"
+ filter: "{{ fakevar | default(omit) }}"
+ register: query_entry
+
+- name: query filter
+ cisco.aci.aci_filter_entry:
+ <<: *aci_query_entry
+ tenant: "{{ fakevar | default(omit) }}"
+ entry: "{{ fakevar | default(omit) }}"
+ register: query_filter
+
+- name: query tenant
+ cisco.aci.aci_filter_entry:
+ <<: *aci_query_entry
+ filter: "{{ fakevar | default(omit) }}"
+ entry: "{{ fakevar | default(omit) }}"
+ register: query_tenant
+
+- name: query all
+ cisco.aci.aci_filter_entry:
+ <<: *aci_query_entry_2
+ entry: "{{ fakevar | default(omit) }}"
+ register: query_all
+
+- name: query assertions
+ assert:
+ that:
+ - query_tenant_filter_entry is not changed
+ - query_tenant_filter_entry.current | length == 1
+ - query_tenant_filter_entry.current.0.vzEntry.attributes.name == "anstest"
+ - '"tn-anstest/flt-anstest/e-anstest.json" in query_tenant_filter_entry.url'
+ - query_filter_entry is not changed
+ - query_filter_entry.current.0.vzFilter.attributes.name == "anstest"
+ - query_filter_entry.current.0.vzFilter.children | length == 1
+ - '"query-target-filter=eq(vzFilter.name,\"anstest\")" in query_filter_entry.filter_string'
+ - '"rsp-subtree-filter=eq(vzEntry.name,\"anstest\")" in query_filter_entry.filter_string'
+ - '"class/vzFilter.json" in query_filter_entry.url'
+ - query_tenant_entry is not changed
+ - query_tenant_entry.current | length == 1
+ - query_tenant_entry.current.0.fvTenant.attributes.name == "anstest"
+ - '"rsp-subtree-filter=eq(vzEntry.name,\"anstest\")" in query_tenant_entry.filter_string'
+ - '"rsp-subtree-class=vzEntry" in query_tenant_entry.filter_string'
+ - '"tn-anstest.json" in query_tenant_entry.url'
+ - query_tenant_filter is not changed
+ - query_tenant_filter.current | length == 1
+ - query_tenant_filter.current.0.vzFilter.attributes.name == "anstest"
+ - query_tenant_filter.current.0.vzFilter.children | length == 4
+ - '"rsp-subtree-class=vzEntry" in query_tenant_filter.filter_string'
+ - '"tn-anstest/flt-anstest.json" in query_tenant_filter.url'
+ - query_entry is not changed
+ - query_entry.current.0.vzEntry.attributes.name == "anstest"
+ - '"query-target-filter=eq(vzEntry.name,\"anstest\")" in query_entry.filter_string'
+ - '"class/vzEntry.json" in query_entry.url'
+ - query_filter is not changed
+ - query_filter.current.0.vzFilter.attributes.name == "anstest"
+ - '"query-target-filter=eq(vzFilter.name,\"anstest\")" in query_filter.filter_string'
+ - '"rsp-subtree-class=vzEntry" in query_filter.filter_string'
+ - '"class/vzFilter.json" in query_filter.url'
+ - query_tenant is not changed
+ - query_tenant.current | length == 1
+ - query_tenant.current.0.fvTenant.attributes.name == "anstest"
+ - '"rsp-subtree-class=vzEntry,vzFilter" in query_tenant.filter_string'
+ - '"tn-anstest.json" in query_tenant.url'
+ - query_all is not changed
+ - query_all.current | length > 1
+ - query_all.current.0.vzEntry is defined
+ - '"class/vzEntry.json" in query_all.url'
+
+- name: delete entry - check mode works
+ cisco.aci.aci_filter_entry: &aci_entry_absent
+ <<: *aci_entry_present
+ state: absent
+ check_mode: yes
+ register: entry_absent_check_mode
+
+- name: delete entry - deletion works
+ cisco.aci.aci_filter_entry:
+ <<: *aci_entry_absent
+ register: entry_absent
+
+- name: delete entry - idempotency works
+ cisco.aci.aci_filter_entry:
+ <<: *aci_entry_absent
+ register: entry_absent_idempotent
+
+- name: missing param - failure message works
+ cisco.aci.aci_filter_entry:
+ <<: *aci_tenant_present
+ state: absent
+ ignore_errors: yes
+ register: absent_missing_param
+
+- name: cleanup remaining entries
+ cisco.aci.aci_filter_entry:
+ <<: *aci_entry_absent
+ entry: "{{ item }}"
+ with_items: ["anstest2", "anstest3", "anstest4"]
+
+- name: absent assertions
+ assert:
+ that:
+ - entry_absent_check_mode is changed
+ - entry_absent_check_mode.previous != []
+ - entry_absent is changed
+ - entry_absent.previous == entry_absent_check_mode.previous
+ - entry_absent.proposed == {}
+ - entry_absent_idempotent is not changed
+ - entry_absent_idempotent.previous == []
+ - absent_missing_param is failed
+ - 'absent_missing_param.msg == "state is absent but all of the following are missing: entry, filter"'
+
+- name: cleanup filter
+ cisco.aci.aci_filter:
+ <<: *aci_filter_present
+ state: absent
+ when: filter_present is changed
+
+- name: cleanup tenant
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_present
+ state: absent
+ when: tenant_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_firmware_source/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_firmware_source/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_firmware_source/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_firmware_source/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_firmware_source/tasks/main.yml
new file mode 100644
index 00000000..3195a3ff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_firmware_source/tasks/main.yml
@@ -0,0 +1,207 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+# CLEAN ENVIRONMENT
+- name: Remove firmware source
+ cisco.aci.aci_firmware_source: &source_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ source: '{{ item }}'
+ state: absent
+ loop:
+ - ansible_test_1
+ - ansible_test_2
+
+# ADD SOURCE
+- name: Add source (check_mode)
+ aci_firmware_source: &source_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ source: ansible_test_1
+ url: foobar.cisco.com/download/cisco/aci/aci-msft-pkg-3.1.1i.zip
+ url_protocol: http
+ state: present
+ check_mode: yes
+ register: cm_add_source
+
+- name: Add source (normal mode)
+ aci_firmware_source:
+ <<: *source_present
+ register: nm_add_source
+
+- name: Verify add_source
+ assert:
+ that:
+ - cm_add_source is changed
+ - nm_add_source is changed
+ - cm_add_source.sent.firmwareOSource.attributes.name == nm_add_source.sent.firmwareOSource.attributes.name == 'ansible_test_1'
+ - cm_add_source.sent.firmwareOSource.attributes.proto == nm_add_source.sent.firmwareOSource.attributes.proto == 'http'
+ - cm_add_source.sent.firmwareOSource.attributes.url == nm_add_source.sent.firmwareOSource.attributes.url == 'foobar.cisco.com/download/cisco/aci/aci-msft-pkg-3.1.1i.zip'
+ - cm_add_source.proposed.firmwareOSource.attributes.name == nm_add_source.proposed.firmwareOSource.attributes.name == 'ansible_test_1'
+ - cm_add_source.proposed.firmwareOSource.attributes.proto == nm_add_source.proposed.firmwareOSource.attributes.proto == 'http'
+ - cm_add_source.proposed.firmwareOSource.attributes.url == nm_add_source.proposed.firmwareOSource.attributes.url == 'foobar.cisco.com/download/cisco/aci/aci-msft-pkg-3.1.1i.zip'
+ - cm_add_source.current == cm_add_source.previous == nm_add_source.previous == []
+ - nm_add_source.current.0.firmwareOSource.attributes.name == 'ansible_test_1'
+ - nm_add_source.current.0.firmwareOSource.attributes.proto == 'http'
+ - nm_add_source.current.0.firmwareOSource.attributes.url == 'foobar.cisco.com/download/cisco/aci/aci-msft-pkg-3.1.1i.zip'
+
+- name: Add source again (check_mode)
+ aci_firmware_source: *source_present
+ check_mode: yes
+ register: cm_add_source_again
+
+- name: Add source again (normal mode)
+ aci_firmware_source:
+ <<: *source_present
+ register: nm_add_source_again
+
+- name: Verify add_source_again
+ assert:
+ that:
+ - cm_add_source_again is not changed
+
+- name: Add another source (normal mode)
+ aci_firmware_source:
+ <<: *source_present
+ source: ansible_test_2
+ register: nm_add_source
+
+# QUERY ALL SOURCES
+- name: Query all sources (check_mode)
+ cisco.aci.aci_firmware_source: &source_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_sources
+
+- name: Query all sources (normal mode)
+ cisco.aci.aci_firmware_source: *source_query
+ register: nm_query_all_sources
+
+- name: Verify query_all_sources
+ assert:
+ that:
+ - cm_query_all_sources is not changed
+ - nm_query_all_sources is not changed
+ - cm_query_all_sources == nm_query_all_sources
+ - nm_query_all_sources.current.0.firmwareRepoP.children | length == 2
+
+# QUERY A SOURCE
+- name: Query our source (check_mode)
+ aci_firmware_source:
+ <<: *source_query
+ source: ansible_test_1
+ check_mode: yes
+ register: cm_query_source
+
+- name: Query our source (normal mode)
+ aci_firmware_source:
+ <<: *source_query
+ source: ansible_test_1
+ register: nm_query_source
+
+- name: Verify query_source
+ assert:
+ that:
+ - cm_query_source is not changed
+ - nm_query_source is not changed
+ - cm_query_source == nm_query_source
+ - nm_query_source.current.0.firmwareOSource.attributes.dn == 'uni/fabric/fwrepop/osrc-ansible_test_1'
+ - nm_query_source.current.0.firmwareOSource.attributes.name == 'ansible_test_1'
+
+# REMOVE SOURCE
+- name: Remove source (check_mode)
+ aci_firmware_source: &source_remove
+ <<: *source_query
+ source: ansible_test_1
+ state: absent
+ check_mode: yes
+ register: cm_remove_source
+
+- name: Remove source (normal mode)
+ aci_firmware_source: *source_remove
+ register: nm_remove_source
+
+- name: Verify remove_source
+ assert:
+ that:
+ - cm_remove_source is changed
+ - nm_remove_source is changed
+ - cm_remove_source.current.0.firmwareOSource.attributes.dn == cm_remove_source.previous.0.firmwareOSource.attributes.dn == nm_remove_source.previous.0.firmwareOSource.attributes.dn == 'uni/fabric/fwrepop/osrc-ansible_test_1'
+ - nm_remove_source.current == []
+
+- name: Remove source again (check_mode)
+ aci_firmware_source: *source_remove
+ check_mode: yes
+ register: cm_remove_source_again
+
+- name: Remove source again (normal mode)
+ aci_firmware_source: *source_remove
+ register: nm_remove_source_again
+
+- name: Verify remove_source_again
+ assert:
+ that:
+ - cm_remove_source_again is not changed
+ - nm_remove_source_again is not changed
+
+# QUERY NON-EXISTING SOURCE
+- name: Query non-existing source (check_mode)
+ aci_firmware_source:
+ <<: *source_query
+ source: non_existing_source
+ check_mode: yes
+ register: cm_query_non_source
+
+- name: Query non-existing source (normal mode)
+ aci_firmware_source:
+ <<: *source_query
+ source: non_existing_source
+ register: nm_query_non_source
+
+- name: Verify query_non_source
+ assert:
+ that:
+ - cm_query_non_source is not changed
+ - nm_query_non_source is not changed
+ - cm_query_non_source == nm_query_non_source
+ - nm_query_non_source.current == []
+
+# PROVOKE ERRORS
+- name: Error when required parameter is missing
+ cisco.aci.aci_firmware_source:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: present
+ ignore_errors: yes
+ register: error_on_missing_required_param
+
+- name: Verify error_on_missing_required_param
+ assert:
+ that:
+ - error_on_missing_required_param is failed
+ - 'error_on_missing_required_param.msg == "state is present but all of the following are missing: source, url"'
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_cdp/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_cdp/aliases
new file mode 100644
index 00000000..cf765b70
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_cdp/aliases
@@ -0,0 +1 @@
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_cdp/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_cdp/tasks/main.yml
new file mode 100644
index 00000000..92103acb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_cdp/tasks/main.yml
@@ -0,0 +1,106 @@
+# Test code for the ACI modules
+# Copyright: (c) 2019, Tim Knipper (tknipper11) <tim.knipper@gmail.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Remove CDP Test Policy
+ cisco.aci.aci_interface_policy_cdp:
+ name: Ansible_CDP_Test_Policy
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(false) }}'
+ output_level: debug
+ state: absent
+ register: cdp_delete
+
+
+
+- name: Create CDP Test Policy
+ cisco.aci.aci_interface_policy_cdp:
+ name: Ansible_CDP_Test_Policy
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(false) }}'
+# output_level: debug
+ state: present
+ register: cdp_create
+- debug:
+ var: cdp_create
+
+- assert:
+ that:
+ - cdp_create is changed
+
+
+- name: test for idempotency
+ cisco.aci.aci_interface_policy_cdp:
+ name: Ansible_CDP_Test_Policy
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(false) }}'
+# output_level: debug
+ state: present
+ register: cdp_idem
+
+- name: Assert that idempotency is not changed
+ assert:
+ that:
+ - cdp_idem is not changed
+
+
+
+- name: Create CDP Disable Test Policy
+ cisco.aci.aci_interface_policy_cdp:
+ name: Ansible_CDP_Test_Policy
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(false) }}'
+# output_level: debug
+ state: present
+ admin_state: no
+ register: cdp_disable
+- debug:
+ var: cdp_disable
+
+- name: Assert that CDP is Disabled
+ assert:
+ that:
+ - cdp_disable.current.0.cdpIfPol.attributes.adminSt == 'disabled'
+
+
+- name: Query CDP Policy
+ cisco.aci.aci_interface_policy_cdp:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(false) }}'
+# output_level: debug
+ state: query
+ register: cdp_query
+- debug:
+ var: cdp_query
+
+- name: CDP Query Assertion
+ assert:
+ that:
+ - cdp_query is not changed \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_breakout_port_group/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_breakout_port_group/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_breakout_port_group/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_breakout_port_group/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_breakout_port_group/tasks/main.yml
new file mode 100644
index 00000000..b0d94c18
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_breakout_port_group/tasks/main.yml
@@ -0,0 +1,162 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+
+- name: Making sure leaf breakout port group doesn't exist at beginning of test
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ <<: *aci_info
+ breakout_port_group: '{{ item }}'
+ state: absent
+ loop:
+ - 'ansible_breakout_port'
+ - 'ansible_breakout_port_2'
+
+- name: Create leaf breakout port group (check_mode)
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ <<: *aci_info
+ breakout_port_group: ansible_breakout_port
+ description: description for ansible_breakout_port
+ breakout_map: 10g-4x
+ state: present
+ check_mode: yes
+ register: cm_create_brkout_port
+
+- name: Create leaf breakout port group (normal_mode)
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ <<: *aci_info
+ breakout_port_group: ansible_breakout_port
+ description: description for ansible_breakout_port
+ breakout_map: 10g-4x
+ state: present
+ register: nm_create_brkout_port
+
+- name: Verify cm_create_brkout_port and nm_create_brkout_port
+ assert:
+ that:
+ - cm_create_brkout_port is changed
+ - cm_create_brkout_port.previous == []
+ - cm_create_brkout_port.proposed.infraBrkoutPortGrp.attributes.name == "ansible_breakout_port"
+ - cm_create_brkout_port.proposed.infraBrkoutPortGrp.attributes.dn == "uni/infra/funcprof/brkoutportgrp-ansible_breakout_port"
+ - cm_create_brkout_port.proposed.infraBrkoutPortGrp.attributes.descr == "description for ansible_breakout_port"
+ - cm_create_brkout_port.proposed.infraBrkoutPortGrp.attributes.brkoutMap == "10g-4x"
+ - nm_create_brkout_port is changed
+ - nm_create_brkout_port.previous == []
+ - nm_create_brkout_port.current.0.infraBrkoutPortGrp.attributes.name == "ansible_breakout_port"
+ - nm_create_brkout_port.current.0.infraBrkoutPortGrp.attributes.dn == "uni/infra/funcprof/brkoutportgrp-ansible_breakout_port"
+ - nm_create_brkout_port.current.0.infraBrkoutPortGrp.attributes.descr == "description for ansible_breakout_port"
+ - nm_create_brkout_port.current.0.infraBrkoutPortGrp.attributes.brkoutMap == "10g-4x"
+
+- name: Create leaf breakout port group again (normal_mode)
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ <<: *aci_info
+ breakout_port_group: ansible_breakout_port
+ description: description for ansible_breakout_port
+ breakout_map: 10g-4x
+ state: present
+ register: nm_create_brkout_port_again
+
+- name: Verify nm_create_brkout_port_again
+ assert:
+ that:
+ - nm_create_brkout_port_again is not changed
+
+- name: Create another leaf breakout port group
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ <<: *aci_info
+ breakout_port_group: ansible_breakout_port_2
+ state: present
+ register: nm_create_another_brkout_port
+
+- name: Verify nm_create_another_brkout_port
+ assert:
+ that:
+ - nm_create_another_brkout_port is changed
+ - nm_create_another_brkout_port.previous == []
+ - nm_create_another_brkout_port.proposed.infraBrkoutPortGrp.attributes.name == "ansible_breakout_port_2"
+ - nm_create_another_brkout_port.proposed.infraBrkoutPortGrp.attributes.dn == "uni/infra/funcprof/brkoutportgrp-ansible_breakout_port_2"
+ - nm_create_another_brkout_port.current.0.infraBrkoutPortGrp.attributes.dn == "uni/infra/funcprof/brkoutportgrp-ansible_breakout_port_2"
+ - nm_create_another_brkout_port.current.0.infraBrkoutPortGrp.attributes.brkoutMap == "none"
+ - nm_create_another_brkout_port.current.0.infraBrkoutPortGrp.attributes.name == "ansible_breakout_port_2"
+
+- name: Query all breakout ports
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ <<: *aci_info
+ state: query
+ register: query_all
+
+- name: Verify query_all
+ assert:
+ that:
+ query_all.current | length >= 2
+
+- name: Query specific breakout port
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ <<: *aci_info
+ breakout_port_group: ansible_breakout_port
+ state: query
+ register: query_one
+
+- name: Verify query_one
+ assert:
+ that:
+ - query_one is not changed
+ - query_one.current.0.infraBrkoutPortGrp.attributes.name == "ansible_breakout_port"
+
+- name: Update breakout port
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ <<: *aci_info
+ breakout_port_group: ansible_breakout_port
+ breakout_map: none
+ description: ""
+ state: present
+ register: change_ansible_breakout_port
+
+- name: Verify change_ansible_breakout_port
+ assert:
+ that:
+ - change_ansible_breakout_port is changed
+ - change_ansible_breakout_port.current.0.infraBrkoutPortGrp.attributes.brkoutMap == "none"
+ - change_ansible_breakout_port.current.0.infraBrkoutPortGrp.attributes.descr == ""
+
+- name: Delete breakout port
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ <<: *aci_info
+ breakout_port_group: ansible_breakout_port
+ state: absent
+ register: rm_breakout_port
+
+- name: Verify rm_breakout_port
+ assert:
+ that:
+ - rm_breakout_port is changed
+ - rm_breakout_port.current == []
+
+- name: Query removed breakout port
+ cisco.aci.aci_interface_policy_leaf_breakout_port_group:
+ <<: *aci_info
+ breakout_port_group: ansible_breakout_port
+ state: query
+ register: query_removed_breakout_port
+
+- name: Verify query_removed_breakout_port
+ assert:
+ that:
+ - query_removed_breakout_port.current == [] \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_policy_group/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_policy_group/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_policy_group/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_policy_group/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_policy_group/tasks/main.yml
new file mode 100644
index 00000000..3557c986
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_policy_group/tasks/main.yml
@@ -0,0 +1,453 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Making sure interface_policy_leaf_policy_group doesn't exist at beginning of test (PC)
+ cisco.aci.aci_interface_policy_leaf_policy_group: &aci_interface_policy_leaf_policy_group_link_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ policy_group: policygroupname_link
+ lag_type: link
+ state: absent
+
+- name: Making sure interface_policy_leaf_policy_group doesn't exist at beginning of test (VPC)
+ cisco.aci.aci_interface_policy_leaf_policy_group: &aci_interface_policy_leaf_policy_group_node_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ policy_group: policygroupname_node
+ lag_type: node
+ state: absent
+
+- name: Making sure interface_policy_leaf_policy_group doesn't exist at beginning of test (Leaf Access Port)
+ cisco.aci.aci_interface_policy_leaf_policy_group: &aci_interface_policy_leaf_policy_group_leaf_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ policy_group: policygroupname_leaf
+ lag_type: leaf
+ state: absent
+
+
+# ==== TESTING Port Channel (PC), lag_type: link ====
+
+- name: Adding a interface policy leaf policy group (PC) - check mode works
+ cisco.aci.aci_interface_policy_leaf_policy_group: &aci_interface_policy_leaf_policy_group_link_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ policy_group: policygroupname_link
+ lag_type: link
+ link_level_policy: linklevelpolicy
+ fibre_channel_interface_policy: fiberchannelpolicy
+ state: present
+ check_mode: yes
+ register: intf_policy_leaf_polgrp_check_mode_present
+
+- name: Adding a interface policy leaf policy group (PC) - creation works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_link_present
+ register: intf_policy_leaf_polgrp_present
+
+- name: Adding a interface policy leaf policy group (PC) - idempotency works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_link_present
+ register: intf_policy_leaf_polgrp_idempotent
+
+- name: Adding a interface policy leaf policy group description (PC) - update works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_link_present
+ description: policygroup description
+ register: intf_policy_leaf_polgrp_update
+
+# TODO: also test for errors
+- name: present assertions
+ assert:
+ that:
+ - intf_policy_leaf_polgrp_check_mode_present is changed
+ - intf_policy_leaf_polgrp_present is changed
+ - intf_policy_leaf_polgrp_present.previous == []
+ - intf_policy_leaf_polgrp_present.sent.infraAccBndlGrp.attributes.lagT == 'link'
+ - intf_policy_leaf_polgrp_present.sent.infraAccBndlGrp.attributes.name == 'policygroupname_link'
+ - intf_policy_leaf_polgrp_present.sent.infraAccBndlGrp.children.0.infraRsFcIfPol.attributes.tnFcIfPolName == 'fiberchannelpolicy'
+ - intf_policy_leaf_polgrp_present.sent.infraAccBndlGrp.children.1.infraRsHIfPol.attributes.tnFabricHIfPolName == 'linklevelpolicy'
+ - intf_policy_leaf_polgrp_idempotent is not changed
+ - intf_policy_leaf_polgrp_idempotent.sent == {}
+ - intf_policy_leaf_polgrp_update is changed
+ - intf_policy_leaf_polgrp_update.sent.infraAccBndlGrp.attributes.descr == 'policygroup description'
+
+- name: Query interface policy leaf policy group (PC)
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ policy_group: policygroupname_link
+ lag_type: link
+ state: query
+ register: binding_query
+
+- name: present assertions
+ assert:
+ that:
+ - binding_query is not changed
+ - binding_query.current | length >= 1
+ - '"/api/mo/uni/infra/funcprof/accbundle-policygroupname_link.json" in binding_query.url'
+
+- name: Remove interface policy leaf policy group (PC) - check mode
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_link_absent
+ check_mode: yes
+ register: intf_policy_leaf_polgrp_check_mode_absent
+
+- name: Remove interface policy leaf policy group (PC) - delete works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_link_absent
+ register: intf_policy_leaf_polgrp_absent
+
+- name: Remove interface policy leaf policy group (PC) - idempotency works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_link_absent
+ register: intf_policy_leaf_polgrp_absent_idempotent
+
+- name: Remove interface policy leaf policy group (PC) - check mode
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ policy_group: policygroupname_link
+ #lag_type: link
+ state: absent
+ ignore_errors: yes
+ register: intf_policy_leaf_polgrp_absent_missing_param
+
+- name: absent assertions
+ assert:
+ that:
+ - intf_policy_leaf_polgrp_check_mode_absent is changed
+ - intf_policy_leaf_polgrp_check_mode_absent.previous != []
+ - intf_policy_leaf_polgrp_absent is changed
+ - intf_policy_leaf_polgrp_absent.previous == intf_policy_leaf_polgrp_absent.previous
+ - intf_policy_leaf_polgrp_absent_idempotent is not changed
+ - intf_policy_leaf_polgrp_absent_idempotent.previous == []
+ - intf_policy_leaf_polgrp_absent_missing_param is failed
+ - 'intf_policy_leaf_polgrp_absent_missing_param.msg == "missing required arguments: lag_type"'
+
+# ==== END TESTING Port Channel (PC), lag_type: link ====
+
+
+# ==== START TESTING Virtual Port Channel (VPC), lag_type: node ====
+
+- name: Making sure interface_policy_leaf_policy_group doesn't exist at beginning of test (VPC)
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_node_absent
+
+- name: Adding a interface policy leaf policy group (VPC) - check mode works
+ cisco.aci.aci_interface_policy_leaf_policy_group: &aci_interface_policy_leaf_policy_group_node_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ policy_group: policygroupname_node
+ lag_type: node
+ link_level_policy: linklevelpolicy
+ fibre_channel_interface_policy: fiberchannelpolicy
+ state: present
+ check_mode: yes
+ register: intf_policy_leaf_polgrp_check_mode_present
+
+- name: Adding a interface policy leaf policy group (VPC) - creation works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_node_present
+ register: intf_policy_leaf_polgrp_present
+
+- name: Adding a interface policy leaf policy group (VPC) - idempotency works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_node_present
+ register: intf_policy_leaf_polgrp_idempotent
+
+- name: Adding a interface policy leaf policy group description (VPC) - update works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_node_present
+ description: policygroup description
+ register: intf_policy_leaf_polgrp_update
+
+# TODO: also test for errors
+- name: present assertions
+ assert:
+ that:
+ - intf_policy_leaf_polgrp_check_mode_present is changed
+ - intf_policy_leaf_polgrp_present is changed
+ - intf_policy_leaf_polgrp_present.previous == []
+ - intf_policy_leaf_polgrp_present.sent.infraAccBndlGrp.attributes.lagT == 'node'
+ - intf_policy_leaf_polgrp_present.sent.infraAccBndlGrp.attributes.name == 'policygroupname_node'
+ - intf_policy_leaf_polgrp_present.sent.infraAccBndlGrp.children.0.infraRsFcIfPol.attributes.tnFcIfPolName == 'fiberchannelpolicy'
+ - intf_policy_leaf_polgrp_present.sent.infraAccBndlGrp.children.1.infraRsHIfPol.attributes.tnFabricHIfPolName == 'linklevelpolicy'
+ - intf_policy_leaf_polgrp_present.sent.infraAccBndlGrp.attributes.name == 'policygroupname_node'
+ - intf_policy_leaf_polgrp_idempotent is not changed
+ - intf_policy_leaf_polgrp_idempotent.sent == {}
+ - intf_policy_leaf_polgrp_update is changed
+ - intf_policy_leaf_polgrp_update.sent.infraAccBndlGrp.attributes.descr == 'policygroup description'
+
+- name: Query interface policy leaf policy group (VPC)
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ policy_group: policygroupname_node
+ lag_type: node
+ state: query
+ register: binding_query
+
+- name: present assertions
+ assert:
+ that:
+ - binding_query is not changed
+ - binding_query.current | length >= 1
+ - '"/api/mo/uni/infra/funcprof/accbundle-policygroupname_node.json" in binding_query.url'
+
+# Add lag_type link to see what we get back
+- name: Adding a interface policy leaf policy group (PC) - creation works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_link_present
+ register: intf_policy_leaf_polgrp_present
+
+- name: Query interface policy leaf policy group (VPC)
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ lag_type: node
+ state: query
+ register: binding_query_node_all
+
+- name: present assertions
+ assert:
+ that:
+ - binding_query_node_all is not changed
+ - binding_query_node_all.current | length >= 1
+ - binding_query_node_all.current | selectattr("infraAccBndlGrp.attributes.lagT", "equalto", "link") | list == []
+ - '"/api/class/infraAccBndlGrp.json" in binding_query_node_all.url'
+
+- name: Remove interface policy leaf policy group (VPC) - check mode
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_node_absent
+ check_mode: yes
+ register: intf_policy_leaf_polgrp_check_mode_absent
+
+- name: Remove interface policy leaf policy group (VPC) - delete works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_node_absent
+ register: intf_policy_leaf_polgrp_absent
+
+- name: Remove interface policy leaf policy group (VPC) - idempotency works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_node_absent
+ register: intf_policy_leaf_polgrp_absent_idempotent
+
+- name: Remove interface policy leaf policy group (VPC) - check mode
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ policy_group: policygroupname_node
+ #lag_type: node
+ state: absent
+ ignore_errors: yes
+ register: intf_policy_leaf_polgrp_absent_missing_param
+
+- name: absent assertions
+ assert:
+ that:
+ - intf_policy_leaf_polgrp_check_mode_absent is changed
+ - intf_policy_leaf_polgrp_check_mode_absent.previous != []
+ - intf_policy_leaf_polgrp_absent is changed
+ - intf_policy_leaf_polgrp_absent.previous == intf_policy_leaf_polgrp_absent.previous
+ - intf_policy_leaf_polgrp_absent_idempotent is not changed
+ - intf_policy_leaf_polgrp_absent_idempotent.previous == []
+ - intf_policy_leaf_polgrp_absent_missing_param is failed
+ - 'intf_policy_leaf_polgrp_absent_missing_param.msg == "missing required arguments: lag_type"'
+
+# ==== END TESTING Virtual Port Channel (VPC), lag_type: node ====
+
+
+# ==== START TESTING Virtual Port Channel (VPC), lag_type: leaf ====
+
+- name: Making sure interface_policy_leaf_policy_group doesn't exist at beginning of test (Leaf Access Port)
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_leaf_absent
+
+- name: Adding a interface policy leaf policy group (Leaf Access Port) - check mode works
+ cisco.aci.aci_interface_policy_leaf_policy_group: &aci_interface_policy_leaf_policy_group_leaf_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ policy_group: policygroupname_leaf
+ lag_type: leaf
+ link_level_policy: linklevelpolicy
+ fibre_channel_interface_policy: fiberchannelpolicy
+ state: present
+ check_mode: yes
+ register: intf_policy_leaf_polgrp_check_mode_present
+
+- name: Adding a interface policy leaf policy group (Leaf Access Port) - creation works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_leaf_present
+ register: intf_policy_leaf_polgrp_present
+
+- name: Adding a interface policy leaf policy group (Leaf Access Port) - idempotency works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_leaf_present
+ register: intf_policy_leaf_polgrp_idempotent
+
+- name: Adding a interface policy leaf policy group description (Leaf Access Port) - update works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_leaf_present
+ description: policygroup description
+ register: intf_policy_leaf_polgrp_update
+
+- name: Adding a interface policy leaf policy group (Leaf Access Port) - null parameter works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_leaf_present
+ port_channel_policy: null
+ ignore_errors: yes
+ register: intf_policy_leaf_polgrp_parameter
+
+- name: Adding a interface policy leaf policy group (Leaf Access Port) - port_channel_policy not supported error
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_leaf_present
+ port_channel_policy: "default"
+ ignore_errors: yes
+ register: intf_policy_leaf_polgrp_pc_policy_error
+
+# TODO: also test for errors
+- name: present assertions
+ assert:
+ that:
+ - intf_policy_leaf_polgrp_check_mode_present is changed
+ - intf_policy_leaf_polgrp_present is changed
+ - intf_policy_leaf_polgrp_present.previous == []
+ - intf_policy_leaf_polgrp_present.sent.infraAccPortGrp.attributes.name == 'policygroupname_leaf'
+ - intf_policy_leaf_polgrp_present.sent.infraAccPortGrp.children.0.infraRsFcIfPol.attributes.tnFcIfPolName == 'fiberchannelpolicy'
+ - intf_policy_leaf_polgrp_present.sent.infraAccPortGrp.children.1.infraRsHIfPol.attributes.tnFabricHIfPolName == 'linklevelpolicy'
+ - intf_policy_leaf_polgrp_idempotent is not changed
+ - intf_policy_leaf_polgrp_idempotent.sent == {}
+ - intf_policy_leaf_polgrp_update is changed
+ - intf_policy_leaf_polgrp_update.sent.infraAccPortGrp.attributes.descr == 'policygroup description'
+ - intf_policy_leaf_polgrp_parameter is not changed
+ - intf_policy_leaf_polgrp_pc_policy_error.msg == 'port_channel_policy is not a valid parameter for leaf (leaf access port policy group), if used assign null to it (port_channel_policy{{":"}} null).'
+
+- name: Query interface policy leaf policy group (Leaf Access Port)
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ policy_group: policygroupname_leaf
+ lag_type: leaf
+ state: query
+ register: binding_query
+
+- name: present assertions
+ assert:
+ that:
+ - binding_query is not changed
+ - binding_query.current | length >= 1
+ - '"/api/mo/uni/infra/funcprof/accportgrp-policygroupname_leaf.json" in binding_query.url'
+
+- name: Remove interface policy leaf policy group (Leaf Access Port) - check mode
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_leaf_absent
+ check_mode: yes
+ register: intf_policy_leaf_polgrp_check_mode_absent
+
+- name: Remove interface policy leaf policy group (Leaf Access Port) - delete works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_leaf_absent
+ register: intf_policy_leaf_polgrp_absent
+
+- name: Remove interface policy leaf policy group (Leaf Access Port) - idempotency works
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ <<: *aci_interface_policy_leaf_policy_group_leaf_absent
+ register: intf_policy_leaf_polgrp_absent_idempotent
+
+- name: Remove interface policy leaf policy group (Leaf Access Port) - check mode
+ cisco.aci.aci_interface_policy_leaf_policy_group:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ policy_group: policygroupname_leaf
+ #lag_type: leaf
+ state: absent
+ ignore_errors: yes
+ register: intf_policy_leaf_polgrp_absent_missing_param
+
+- name: absent assertions
+ assert:
+ that:
+ - intf_policy_leaf_polgrp_check_mode_absent is changed
+ - intf_policy_leaf_polgrp_check_mode_absent.previous != []
+ - intf_policy_leaf_polgrp_absent is changed
+ - intf_policy_leaf_polgrp_absent.previous == intf_policy_leaf_polgrp_absent.previous
+ - intf_policy_leaf_polgrp_absent_idempotent is not changed
+ - intf_policy_leaf_polgrp_absent_idempotent.previous == []
+ - intf_policy_leaf_polgrp_absent_missing_param is failed
+ - 'intf_policy_leaf_polgrp_absent_missing_param.msg == "missing required arguments: lag_type"'
+
+# ==== END TESTING Virtual Port Channel (VPC), lag_type: leaf ====
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_profile/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_profile/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_profile/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_profile/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_profile/tasks/main.yml
new file mode 100644
index 00000000..9ee75c30
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_leaf_profile/tasks/main.yml
@@ -0,0 +1,266 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Shreyas Srish <ssrish@cisco.com>
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Remove leaf profile
+ cisco.aci.aci_interface_policy_leaf_profile: &interface_policy_leaf_profile_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ leaf_interface_profile: ansible_test
+ state: absent
+
+- name: Remove leaf_interface_profile fex
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_absent
+ type: fex
+ leaf_interface_profile: ansible_test_fex
+
+# ADD LEAF INTERFACE PROFILE
+- name: Add leaf interface profile (check_mode)
+ cisco.aci.aci_interface_policy_leaf_profile: &interface_policy_leaf_profile_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ interface_profile: ansible_test
+ state: present
+ check_mode: yes
+ register: cm_add_leaf_interface_profile
+
+- name: Add leaf interface profile (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile: *interface_policy_leaf_profile_present
+ register: nm_add_leaf_interface_profile
+
+- name: Add leaf interface profile again (check_mode)
+ cisco.aci.aci_interface_policy_leaf_profile: *interface_policy_leaf_profile_present
+ check_mode: yes
+ register: cm_add_leaf_interface_profile_again
+
+- name: Add leaf interface profile again (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile: *interface_policy_leaf_profile_present
+ register: nm_add_leaf_interface_profile_again
+
+- name: Add leaf interface profile fex (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_present
+ type: fex
+ leaf_interface_profile: ansible_test_fex
+ register: nm_add_leaf_interface_profile_fex
+
+- name: Verify add_leaf_interface_profile
+ assert:
+ that:
+ - cm_add_leaf_interface_profile is changed
+ - nm_add_leaf_interface_profile is changed
+ - cm_add_leaf_interface_profile_again is not changed
+ - nm_add_leaf_interface_profile_again is not changed
+ - nm_add_leaf_interface_profile_fex is changed
+
+# CHANGE LEAF INTERFACE PROFILE
+- name: Change description of leaf interface profile (check_mode)
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_present
+ description: Ansible test leaf interface profile
+ check_mode: yes
+ register: cm_add_leaf_interface_profile_descr
+
+- name: Change description of leaf interface profile (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_present
+ description: Ansible test leaf interface profile
+ register: nm_add_leaf_interface_profile_descr
+
+- name: Change description of leaf interface profile again (check_mode)
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_present
+ description: Ansible test leaf interface profile
+ check_mode: yes
+ register: cm_add_leaf_interface_profile_descr_again
+
+- name: Change description of leaf interface profile again (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_present
+ description: Ansible test leaf interface profile
+ register: nm_add_leaf_interface_profile_descr_again
+
+- name: Change description of leaf interface profile fex (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_present
+ type: fex
+ description: Ansible test leaf interface profile fex
+ leaf_interface_profile: ansible_test_fex
+ register: nm_add_leaf_interface_profile_descr_fex
+
+- name: Verify add_leaf_interface_profile_descr
+ assert:
+ that:
+ - cm_add_leaf_interface_profile_descr is changed
+ - nm_add_leaf_interface_profile_descr is changed
+ - nm_add_leaf_interface_profile_descr_fex is changed
+ - cm_add_leaf_interface_profile_descr_again is not changed
+ - nm_add_leaf_interface_profile_descr_again is not changed
+
+# ADD LEAF INTERFACE PROFILE AGAIN
+- name: Add leaf interface profile again with no description (check_mode)
+ cisco.aci.aci_interface_policy_leaf_profile: *interface_policy_leaf_profile_present
+ check_mode: yes
+ register: cm_add_leaf_interface_profile_again_no_descr
+
+- name: Add leaf interface profile again with no description (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile: *interface_policy_leaf_profile_present
+ register: nm_add_leaf_interface_profile_again_no_descr
+
+- name: Add leaf interface profile again with no description fex (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_present
+ type: fex
+ leaf_interface_profile: ansible_test_fex
+ register: nm_add_leaf_interface_profile_again_no_descr_fex
+
+- name: Verify add_leaf_interface_profile_again_no_descr
+ assert:
+ that:
+ - cm_add_leaf_interface_profile_again_no_descr is not changed
+ - nm_add_leaf_interface_profile_again_no_descr is not changed
+ - nm_add_leaf_interface_profile_again_no_descr_fex is not changed
+
+# QUERY ALL LEAF INTERFACE PROFILES
+- name: Query all interface profiles (check_mode)
+ cisco.aci.aci_interface_policy_leaf_profile: &interface_policy_leaf_profile_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_leaf_interface_profiles
+
+- name: Query all leaf_interface_profiles (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile: *interface_policy_leaf_profile_query
+ register: nm_query_all_leaf_interface_profiles
+
+- name: Query all fex (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_query
+ type: fex
+
+- name: Verify query_all_leaf_interface_profiles
+ assert:
+ that:
+ - cm_query_all_leaf_interface_profiles is not changed
+ - nm_query_all_leaf_interface_profiles is not changed
+ # NOTE: Order of leaf_interface_profiles is not stable between calls
+ #- cm_query_all_leaf_interface_profiles == nm_query_all_leaf_interface_profiles
+
+# QUERY A LEAF INTERFACE PROFILE
+- name: Query our leaf_interface_profile
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_query
+ leaf_interface_profile: ansible_test
+ check_mode: yes
+ register: cm_query_leaf_interface_profile
+
+- name: Query our leaf_interface_profile
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_query
+ leaf_interface_profile: ansible_test
+ register: nm_query_leaf_interface_profile
+
+- name: Query our leaf_interface_profile fex
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_query
+ type: fex
+ leaf_interface_profile: ansible_test_fex
+ register: nm_query_leaf_interface_profile_fex
+
+- name: Verify query_leaf_interface_profile
+ assert:
+ that:
+ - cm_query_leaf_interface_profile is not changed
+ - nm_query_leaf_interface_profile is not changed
+ - nm_query_leaf_interface_profile_fex is not changed
+ - cm_query_leaf_interface_profile == nm_query_leaf_interface_profile
+
+# REMOVE LEAF INTERFACE PROFILE
+- name: Remove leaf_interface_profile (check_mode)
+ cisco.aci.aci_interface_policy_leaf_profile: *interface_policy_leaf_profile_absent
+ check_mode: yes
+ register: cm_remove_leaf_interface_profile
+
+- name: Remove leaf_interface_profile (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile: *interface_policy_leaf_profile_absent
+ register: nm_remove_leaf_interface_profile
+
+- name: Remove leaf_interface_profile again (check_mode)
+ cisco.aci.aci_interface_policy_leaf_profile: *interface_policy_leaf_profile_absent
+ check_mode: yes
+ register: cm_remove_leaf_interface_profile_again
+
+- name: Remove leaf_interface_profile again (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile: *interface_policy_leaf_profile_absent
+ register: nm_remove_leaf_interface_profile_again
+
+- name: Remove leaf_interface_profile fex (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_absent
+ type: fex
+ leaf_interface_profile: ansible_test_fex
+ register: nm_remove_leaf_interface_profile_again_fex
+
+- name: Verify remove_leaf_interface_profile
+ assert:
+ that:
+ - cm_remove_leaf_interface_profile is changed
+ - nm_remove_leaf_interface_profile is changed
+ - nm_remove_leaf_interface_profile_again_fex is changed
+ - cm_remove_leaf_interface_profile_again is not changed
+ - nm_remove_leaf_interface_profile_again is not changed
+
+# QUERY NON-EXISTING LEAF INTERFACE PROFILE
+- name: Query non-existing leaf_interface_profile (check_mode)
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_query
+ leaf_interface_profile: ansible_test
+ check_mode: yes
+ register: cm_query_non_leaf_interface_profile
+
+- name: Query non-existing leaf_interface_profile (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_query
+ leaf_interface_profile: ansible_test
+ register: nm_query_non_leaf_interface_profile
+
+- name: Query non-existing leaf_interface_profile fex (normal mode)
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *interface_policy_leaf_profile_query
+ type: fex
+ leaf_interface_profile: ansible_test_fex
+ register: nm_query_non_leaf_interface_profile_fex
+
+# TODO: Implement more tests
+- name: Verify query_non_leaf_interface_profile
+ assert:
+ that:
+ - cm_query_non_leaf_interface_profile is not changed
+ - nm_query_non_leaf_interface_profile is not changed
+ - nm_query_non_leaf_interface_profile_fex is not changed
+ - cm_query_non_leaf_interface_profile == nm_query_non_leaf_interface_profile \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_link_level/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_link_level/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_link_level/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_link_level/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_link_level/tasks/main.yml
new file mode 100644
index 00000000..96b7e855
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_link_level/tasks/main.yml
@@ -0,0 +1,285 @@
+# Test code for the ACI modules
+# Copyright: (c) 2019, Vasily Prokopov (@vasilyprokopov)
+# Copyright: (c) 2020, Shreyas Srish (@shrsr)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Remove Link Level Policy
+ aci_interface_policy_link_level: &interface_policy_link_level_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ link_level_policy: ansible_test
+ state: absent
+
+# ADD LINK LEVEL POLICY
+- name: Add Link Level Policy (check mode)
+ aci_interface_policy_link_level: &interface_policy_link_level_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ link_level_policy: ansible_test
+ state: present
+ check_mode: yes
+ register: cm_add_policy
+
+- name: Add Link Level Policy (normal mode)
+ aci_interface_policy_link_level: *interface_policy_link_level_present
+ register: nm_add_policy
+
+- name: Verify Add Link Level Policy
+ assert:
+ that:
+ - cm_add_policy is changed
+ - nm_add_policy is changed
+ - nm_add_policy.previous == cm_add_policy.previous == cm_add_policy.current == []
+ - nm_add_policy.current.0.fabricHIfPol.attributes.name == 'ansible_test'
+ - nm_add_policy.current.0.fabricHIfPol.attributes.dn == 'uni/infra/hintfpol-ansible_test'
+ - nm_add_policy.proposed.fabricHIfPol.attributes.name == cm_add_policy.proposed.fabricHIfPol.attributes.name == nm_add_policy.sent.fabricHIfPol.attributes.name == 'ansible_test'
+
+- name: Add Link Level Policy again (check mode)
+ aci_interface_policy_link_level: *interface_policy_link_level_present
+ check_mode: yes
+ register: cm_add_policy_again
+
+- name: Add Link Level Policy again (normal mode)
+ aci_interface_policy_link_level: *interface_policy_link_level_present
+ register: nm_add_policy_again
+
+- name: Verify Add Link Level Policy again
+ assert:
+ that:
+ - cm_add_policy_again is not changed
+ - nm_add_policy_again is not changed
+ - nm_add_policy_again.previous.0.fabricHIfPol.attributes.name == cm_add_policy_again.previous.0.fabricHIfPol.attributes.name == nm_add_policy_again.current.0.fabricHIfPol.attributes.name == cm_add_policy_again.current.0.fabricHIfPol.attributes.name == 'ansible_test'
+ - nm_add_policy.proposed.fabricHIfPol.attributes.name == cm_add_policy.proposed.fabricHIfPol.attributes.name == nm_add_policy.sent.fabricHIfPol.attributes.name == cm_add_policy.sent.fabricHIfPol.attributes.name == 'ansible_test'
+ - nm_add_policy_again.sent == cm_add_policy_again.sent == {}
+
+# CHANGE LINK LEVEL POLICY
+- name: Change description of Link Level Policy (check mode)
+ aci_interface_policy_link_level:
+ <<: *interface_policy_link_level_present
+ description: Ansible test Link Level Policy
+ check_mode: yes
+ register: cm_add_policy_descr
+
+- name: Change description of Link Level Policy (normal mode)
+ aci_interface_policy_link_level:
+ <<: *interface_policy_link_level_present
+ description: Ansible test Link Level Policy
+ register: nm_add_policy_descr
+
+- name: Verify add_policy_descr
+ assert:
+ that:
+ - cm_add_policy_descr is changed
+ - nm_add_policy_descr is changed
+ - cm_add_policy_descr.proposed.fabricHIfPol.attributes.name == nm_add_policy_descr.proposed.fabricHIfPol.attributes.name == 'ansible_test'
+ - nm_add_policy_descr.current.0.fabricHIfPol.attributes.dn == 'uni/infra/hintfpol-ansible_test'
+
+- name: Change description of Link Level Policy again (check mode)
+ aci_interface_policy_link_level:
+ <<: *interface_policy_link_level_present
+ description: Ansible test Link Level Policy
+ check_mode: yes
+ register: cm_add_policy_descr_again
+
+- name: Change description of Link Level Policy again (normal mode)
+ aci_interface_policy_link_level:
+ <<: *interface_policy_link_level_present
+ description: Ansible test Link Level Policy
+ register: nm_add_policy_descr_again
+
+- name: Verify add_policy_descr_again
+ assert:
+ that:
+ - cm_add_policy_descr_again is not changed
+ - nm_add_policy_descr_again is not changed
+ - cm_add_policy_descr_again.proposed.fabricHIfPol.attributes.name == nm_add_policy_descr_again.proposed.fabricHIfPol.attributes.name == 'ansible_test'
+ - cm_add_policy_descr_again.sent == nm_add_policy_descr_again.sent == {}
+ - cm_add_policy_descr_again.previous.0.fabricHIfPol.attributes.dn == nm_add_policy_descr_again.previous.0.fabricHIfPol.attributes.dn == cm_add_policy_descr_again.current.0.fabricHIfPol.attributes.dn == nm_add_policy_descr_again.current.0.fabricHIfPol.attributes.dn == 'uni/infra/hintfpol-ansible_test'
+
+# ADD LINK LEVEL POLICY AGAIN WITH NO DESCRIPTION
+- name: Add Link Level Policy again with no description (check mode)
+ aci_interface_policy_link_level: *interface_policy_link_level_present
+ check_mode: yes
+ register: cm_add_policy_again_no_descr
+
+- name: Add Link Level Policy again with no description (normal mode)
+ aci_interface_policy_link_level: *interface_policy_link_level_present
+ register: nm_add_policy_again_no_descr
+
+- name: Verify add_policy_again_no_descr
+ assert:
+ that:
+ - cm_add_policy_again_no_descr is not changed
+ - nm_add_policy_again_no_descr is not changed
+ - cm_add_policy_again_no_descr.proposed.fabricHIfPol.attributes.name == nm_add_policy_again_no_descr.proposed.fabricHIfPol.attributes.name == 'ansible_test'
+ - cm_add_policy_again_no_descr.sent == nm_add_policy_again_no_descr.sent == {}
+ - cm_add_policy_again_no_descr.previous.0.fabricHIfPol.attributes.dn== nm_add_policy_again_no_descr.previous.0.fabricHIfPol.attributes.dn == cm_add_policy_again_no_descr.current.0.fabricHIfPol.attributes.dn == nm_add_policy_again_no_descr.current.0.fabricHIfPol.attributes.dn == 'uni/infra/hintfpol-ansible_test'
+
+# QUERY ALL LINK LEVEL POLICIES
+- name: Query all Link Level Policies (check mode)
+ aci_interface_policy_link_level: &interface_policy_link_level_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_policies
+
+- name: Query all Link Level Policies (normal mode)
+ aci_interface_policy_link_level: *interface_policy_link_level_query
+ register: nm_query_all_policies
+
+- name: Verify query_all_policies
+ assert:
+ that:
+ - cm_query_all_policies is not changed
+ - nm_query_all_policies is not changed
+ - cm_query_all_policies == nm_query_all_policies
+ - nm_query_all_policies.current|length >= 1
+
+# QUERY A LINK LEVEL POLICY
+- name: Query our Link Level Policy (check mode)
+ aci_interface_policy_link_level:
+ <<: *interface_policy_link_level_query
+ link_level_policy: ansible_test
+ check_mode: yes
+ register: cm_query_policy
+
+- name: Query our Link Level Policy (normal mode)
+ aci_interface_policy_link_level:
+ <<: *interface_policy_link_level_query
+ link_level_policy: ansible_test
+ register: nm_query_policy
+
+- name: Verify query_policy
+ assert:
+ that:
+ - cm_query_policy is not changed
+ - nm_query_policy is not changed
+ - cm_query_policy == nm_query_policy
+ - nm_query_policy.current.0.fabricHIfPol.attributes.descr == 'Ansible test Link Level Policy'
+ - nm_query_policy.current.0.fabricHIfPol.attributes.dn == 'uni/infra/hintfpol-ansible_test'
+ - nm_query_policy.current.0.fabricHIfPol.attributes.name == 'ansible_test'
+
+# REMOVE LINK LEVEL POLICY
+- name: Remove Link Level Policy (check mode)
+ aci_interface_policy_link_level: *interface_policy_link_level_absent
+ check_mode: yes
+ register: cm_remove_policy
+
+- name: Remove Link Level Policy (normal mode)
+ aci_interface_policy_link_level: *interface_policy_link_level_absent
+ register: nm_remove_policy
+
+- name: Verify remove_policy
+ assert:
+ that:
+ - cm_remove_policy is changed
+ - nm_remove_policy is changed
+ - cm_remove_policy.proposed == nm_remove_policy.proposed == {}
+ - cm_remove_policy.sent == nm_remove_policy.sent == {}
+ - cm_remove_policy.previous.0.fabricHIfPol.attributes.dn == nm_remove_policy.previous.0.fabricHIfPol.attributes.dn == cm_remove_policy.current.0.fabricHIfPol.attributes.dn == 'uni/infra/hintfpol-ansible_test'
+ - nm_remove_policy.current == []
+
+- name: Remove Link Level Policy again (check mode)
+ aci_interface_policy_link_level: *interface_policy_link_level_absent
+ check_mode: yes
+ register: cm_remove_policy_again
+
+- name: Remove Link Level Policy again (normal mode)
+ aci_interface_policy_link_level: *interface_policy_link_level_absent
+ register: nm_remove_policy_again
+
+- name: Verify remove_policy_again
+ assert:
+ that:
+ - cm_remove_policy_again is not changed
+ - nm_remove_policy_again is not changed
+ - cm_remove_policy_again.proposed == nm_remove_policy_again.proposed == {}
+ - cm_remove_policy_again.sent == nm_remove_policy_again.sent == {}
+ - cm_remove_policy_again.previous == nm_remove_policy_again.previous == cm_remove_policy_again.current == nm_remove_policy_again.current == []
+
+# QUERY NON-EXISTING LINK LEVEL POLICY
+- name: Query non-existing Link Level Policy (check mode)
+ aci_interface_policy_link_level:
+ <<: *interface_policy_link_level_query
+ link_level_policy: ansible_test
+ check_mode: yes
+ register: cm_query_non_policy
+
+- name: Query non-existing Link Level Policy (normal mode)
+ aci_interface_policy_link_level:
+ <<: *interface_policy_link_level_query
+ link_level_policy: ansible_test
+ register: nm_query_non_policy
+
+- name: Verify query_non_policy
+ assert:
+ that:
+ - cm_query_non_policy is not changed
+ - nm_query_non_policy is not changed
+ - cm_query_non_policy == nm_query_non_policy
+ - cm_query_non_policy.current == nm_query_non_policy.current == []
+
+# PROVOKE ERRORS - REQUIRED PARAMETER MISSING
+- name: Error when required parameter is missing
+ aci_interface_policy_link_level:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: present
+ ignore_errors: yes
+ register: error_on_missing_required_param
+
+- name: Verify error_on_missing_required_param
+ assert:
+ that:
+ - error_on_missing_required_param is failed
+ - 'error_on_missing_required_param.msg == "state is present but all of the following are missing: link_level_policy"'
+
+# PROVOKE ERRORS - DEBOUNCE OUT OF RANGE
+- name: Error when link debounce interval is out of range
+ aci_interface_policy_link_level:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: present
+ link_level_policy: ansible_test
+ link_debounce_interval: 5005
+ ignore_errors: yes
+ register: error_on_debounce_out_of_range
+
+- name: Verify error_on_debounce_out_of_range
+ assert:
+ that:
+ - error_on_debounce_out_of_range is failed
+ - 'error_on_debounce_out_of_range.msg == "The \"link_debounce_interval\" must be a value between 0 and 5000"' \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_ospf/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_ospf/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_ospf/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_ospf/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_ospf/tasks/main.yml
new file mode 100644
index 00000000..32ac266e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_ospf/tasks/main.yml
@@ -0,0 +1,231 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ tenant: anstest
+ state: present
+ register: tenant_present
+
+- name: Remove OSPF interface policy
+ cisco.aci.aci_interface_policy_ospf: &interface_policy_ospf_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: anstest
+ ospf: ansible_ospf
+ state: absent
+
+
+# ADD OSPF INTERFACE POLICY
+- name: Add ospf interface policy (check_mode)
+ cisco.aci.aci_interface_policy_ospf: &interface_policy_ospf_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: anstest
+ ospf: ansible_ospf
+ state: present
+ check_mode: yes
+ register: cm_add_ospf_interface_policy
+
+- name: Add ospf interface policy (normal mode)
+ cisco.aci.aci_interface_policy_ospf: *interface_policy_ospf_present
+ register: nm_add_ospf_interface_policy
+
+- name: Add ospf interface policy again (check_mode)
+ cisco.aci.aci_interface_policy_ospf: *interface_policy_ospf_present
+ check_mode: yes
+ register: cm_add_ospf_interface_policy_again
+
+- name: Add ospf interface policy again (normal mode)
+ cisco.aci.aci_interface_policy_ospf: *interface_policy_ospf_present
+ register: nm_add_ospf_interface_policy_again
+
+- name: Verify add_ospf_interface_policy
+ assert:
+ that:
+ - cm_add_ospf_interface_policy is changed
+ - nm_add_ospf_interface_policy is changed
+ - cm_add_ospf_interface_policy_again is not changed
+ - nm_add_ospf_interface_policy_again is not changed
+
+
+# CHANGE OSPF INTERFACE POLICY
+- name: Change description of ospf interface policy (check_mode)
+ cisco.aci.aci_interface_policy_ospf:
+ <<: *interface_policy_ospf_present
+ description: Ansible test ospf interface policy
+ check_mode: yes
+ register: cm_add_ospf_descr
+
+- name: Change description of ospf interface policy (normal mode)
+ cisco.aci.aci_interface_policy_ospf:
+ <<: *interface_policy_ospf_present
+ description: Ansible test ospf interface policy
+ register: nm_add_ospf_descr
+
+- name: Change description of ospf interface policy again (check_mode)
+ cisco.aci.aci_interface_policy_ospf:
+ <<: *interface_policy_ospf_present
+ description: Ansible test ospf interface policy
+ check_mode: yes
+ register: cm_add_ospf_descr_again
+
+- name: Change description of ospf interface policy again (normal mode)
+ cisco.aci.aci_interface_policy_ospf:
+ <<: *interface_policy_ospf_present
+ description: Ansible test ospf interface policy
+ register: nm_add_ospf_descr_again
+
+- name: Verify add_ospf_descr
+ assert:
+ that:
+ - cm_add_ospf_descr is changed
+ - nm_add_ospf_descr is changed
+ - cm_add_ospf_descr_again is not changed
+ - nm_add_ospf_descr_again is not changed
+
+
+# ADD OSPF INTERFACE POLICY AGAIN
+- name: Add ospf interface policy again with no description (check_mode)
+ cisco.aci.aci_interface_policy_ospf: *interface_policy_ospf_present
+ check_mode: yes
+ register: cm_add_ospf_again_no_descr
+
+- name: Add ospf interface policy again with no description (normal mode)
+ cisco.aci.aci_interface_policy_ospf: *interface_policy_ospf_present
+ register: nm_add_ospf_again_no_descr
+
+- name: Verify add_ospf_again_no_descr
+ assert:
+ that:
+ - cm_add_ospf_again_no_descr is not changed
+ - nm_add_ospf_again_no_descr is not changed
+
+
+# QUERY ALL OSPF INTERFACE POLICIES
+- name: Query all ospf interface policies (check_mode)
+ cisco.aci.aci_interface_policy_ospf: &interface_policy_ospf_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: anstest
+ state: query
+ check_mode: yes
+ register: cm_query_all_ospfs
+
+- name: Query all ospfs (normal mode)
+ cisco.aci.aci_interface_policy_ospf: *interface_policy_ospf_query
+ register: nm_query_all_ospfs
+
+- name: Verify query_all_ospfs
+ assert:
+ that:
+ - cm_query_all_ospfs is not changed
+ - nm_query_all_ospfs is not changed
+ # NOTE: Order of ospfs is not stable between calls
+ #- cm_query_all_ospfs == nm_query_all_ospfs
+
+
+# QUERY A OSPF INTERFACE POLICY
+- name: Query our ospf
+ cisco.aci.aci_interface_policy_ospf:
+ <<: *interface_policy_ospf_query
+ tenant: anstest
+ ospf: ansible_ospf
+ check_mode: yes
+ register: cm_query_ospf
+
+- name: Query our ospf
+ cisco.aci.aci_interface_policy_ospf:
+ <<: *interface_policy_ospf_query
+ tenant: anstest
+ ospf: ansible_ospf
+ register: nm_query_ospf
+
+- name: Verify query_ospf
+ assert:
+ that:
+ - cm_query_ospf is not changed
+ - nm_query_ospf is not changed
+ - cm_query_ospf == nm_query_ospf
+
+
+# REMOVE OSPF INTERFACE POLICY
+- name: Remove ospf (check_mode)
+ cisco.aci.aci_interface_policy_ospf: *interface_policy_ospf_absent
+ check_mode: yes
+ register: cm_remove_ospf
+
+- name: Remove ospf (normal mode)
+ cisco.aci.aci_interface_policy_ospf: *interface_policy_ospf_absent
+ register: nm_remove_ospf
+
+- name: Remove ospf again (check_mode)
+ cisco.aci.aci_interface_policy_ospf: *interface_policy_ospf_absent
+ check_mode: yes
+ register: cm_remove_ospf_again
+
+- name: Remove ospf again (normal mode)
+ cisco.aci.aci_interface_policy_ospf: *interface_policy_ospf_absent
+ register: nm_remove_ospf_again
+
+- name: Verify remove_ospf
+ assert:
+ that:
+ - cm_remove_ospf is changed
+ - nm_remove_ospf is changed
+ - cm_remove_ospf_again is not changed
+ - nm_remove_ospf_again is not changed
+
+
+# QUERY NON-EXISTING OSPF INTERFACE POLICY
+- name: Query non-existing ospf (check_mode)
+ cisco.aci.aci_interface_policy_ospf:
+ <<: *interface_policy_ospf_query
+ ospf: ansible_ospf
+ check_mode: yes
+ register: cm_query_non_ospf
+
+- name: Query non-existing ospf (normal mode)
+ cisco.aci.aci_interface_policy_ospf:
+ <<: *interface_policy_ospf_query
+ ospf: ansible_ospf
+ register: nm_query_non_ospf
+
+# TODO: Implement more tests
+- name: Verify query_non_ospf
+ assert:
+ that:
+ - cm_query_non_ospf is not changed
+ - nm_query_non_ospf is not changed
+ - cm_query_non_ospf == nm_query_non_ospf
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_port_security/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_port_security/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_port_security/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_port_security/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_port_security/tasks/main.yml
new file mode 100644
index 00000000..92a90d32
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_policy_port_security/tasks/main.yml
@@ -0,0 +1,171 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Shreyas Srish <ssrish@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+
+
+# CLEAN ENVIRONMENT
+- name: Remove policy port security
+ aci_interface_policy_port_security:
+ <<: *aci_info
+ port_security: '{{ item }}'
+ state: absent
+ loop:
+ - security1
+ - security2
+ - security3
+
+# ADD
+- name: Add a port security interface policy - check mode
+ aci_interface_policy_port_security:
+ <<: *aci_info
+ port_security: security1
+ description: security 1
+ max_end_points: 300
+ port_security_timeout: 190
+ state: present
+ check_mode: yes
+ register: port_security1_cm
+
+- name: Add a port security interface policy - normal mode
+ aci_interface_policy_port_security:
+ <<: *aci_info
+ port_security: security1
+ description: security 1
+ max_end_points: 300
+ port_security_timeout: 190
+ state: present
+ register: port_security1_nm
+
+- name: Add a port security interface policy again - normal mode
+ aci_interface_policy_port_security:
+ <<: *aci_info
+ port_security: security1
+ description: security 1
+ max_end_points: 300
+ port_security_timeout: 190
+ state: present
+ register: port_security1_nm_again
+
+- name: Add a port security interface policy - normal mode
+ aci_interface_policy_port_security:
+ <<: *aci_info
+ port_security: security2
+ description: security 2
+ max_end_points: 300
+ port_security_timeout: 10
+ state: present
+ ignore_errors: yes
+ register: port_security1_nm_error_timeout
+
+- name: Add a port security interface policy - normal mode
+ aci_interface_policy_port_security:
+ <<: *aci_info
+ port_security: security3
+ description: security 3
+ max_end_points: 15000
+ port_security_timeout: 60
+ state: present
+ ignore_errors: yes
+ register: port_security1_nm_error_max
+
+- name: Add a port security interface policy again for security 3- normal mode
+ aci_interface_policy_port_security:
+ <<: *aci_info
+ port_security: security3
+ description: security 3
+ max_end_points: 12000
+ port_security_timeout: 60
+ state: present
+ ignore_errors: yes
+ register: port_security1_nm_with_no_error
+
+- name: Verify present cases
+ assert:
+ that:
+ - port_security1_cm is changed
+ - port_security1_nm is changed
+ - port_security1_cm.proposed.l2PortSecurityPol.attributes.dn == "uni/infra/portsecurityP-security1"
+ - port_security1_cm.proposed.l2PortSecurityPol.attributes.name == "security1"
+ - port_security1_cm.proposed.l2PortSecurityPol.attributes.timeout == "190"
+ - port_security1_cm.proposed.l2PortSecurityPol.attributes.maximum == "300"
+ - port_security1_cm.proposed.l2PortSecurityPol.attributes.descr == "security 1"
+ - port_security1_nm.current.0.l2PortSecurityPol.attributes.dn == "uni/infra/portsecurityP-security1"
+ - port_security1_nm.current.0.l2PortSecurityPol.attributes.name == "security1"
+ - port_security1_nm.current.0.l2PortSecurityPol.attributes.timeout == "190"
+ - port_security1_nm.current.0.l2PortSecurityPol.attributes.maximum == "300"
+ - port_security1_nm.current.0.l2PortSecurityPol.attributes.descr == "security 1"
+ - port_security1_nm_again is not changed
+ - port_security1_nm_error_timeout.msg == "The port_security_timeout must be between 60 and 3600"
+ - port_security1_nm_error_max.msg == "The max_end_points must be between 0 and 12000"
+
+# QUERY
+- name: Query a port security interface policy - normal mode
+ aci_interface_policy_port_security:
+ <<: *aci_info
+ port_security: security1
+ state: query
+ register: port_security1_query
+
+- name: Query all port security interface policies - normal mode
+ aci_interface_policy_port_security:
+ <<: *aci_info
+ state: query
+ register: port_all_query
+
+- name: Verify query cases
+ assert:
+ that:
+ - port_security1_query is not changed
+ - port_all_query is not changed
+ - port_security1_query.current.0.l2PortSecurityPol.attributes.dn == "uni/infra/portsecurityP-security1"
+ - port_security1_query.current.0.l2PortSecurityPol.attributes.name == "security1"
+ - port_security1_query.current.0.l2PortSecurityPol.attributes.timeout == "190"
+ - port_security1_query.current.0.l2PortSecurityPol.attributes.maximum == "300"
+ - port_security1_query.current.0.l2PortSecurityPol.attributes.descr == "security 1"
+ - port_all_query.current|length >= 1
+
+# REMOVE
+- name: Remove a port security interface policy - normal mode
+ aci_interface_policy_port_security:
+ <<: *aci_info
+ port_security: security1
+ state: absent
+ register: port_security1_remove
+
+- name: Verify remove cases
+ assert:
+ that:
+ - port_security1_remove is changed
+ - port_security1_remove.previous.0.l2PortSecurityPol.attributes.dn == "uni/infra/portsecurityP-security1"
+ - port_security1_remove.previous.0.l2PortSecurityPol.attributes.name == "security1"
+ - port_security1_remove.previous.0.l2PortSecurityPol.attributes.timeout == "190"
+ - port_security1_remove.previous.0.l2PortSecurityPol.attributes.maximum == "300"
+ - port_security1_remove.previous.0.l2PortSecurityPol.attributes.descr == "security 1"
+
+# CLEAN END
+- name: Remove all policy port securities
+ aci_interface_policy_port_security:
+ <<: *aci_info
+ port_security: '{{ item }}'
+ state: absent
+ loop:
+ - security1
+ - security2
+ - security3 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile/tasks/main.yml
new file mode 100644
index 00000000..d72a9ffa
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_interface_selector_to_switch_policy_leaf_profile/tasks/main.yml
@@ -0,0 +1,154 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: delete Switch Policy Leaf profile for kick off
+ cisco.aci.aci_switch_policy_leaf_profile:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ leaf_profile: swleafprftest
+ state: absent
+
+- name: delete Interface Policy Leaf profile for kick off
+ cisco.aci.aci_interface_policy_leaf_profile:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ leaf_interface_profile: leafintprftest
+ state: absent
+
+- name: Ensuring Switch Policy Leaf profile exists for kick off
+ cisco.aci.aci_switch_policy_leaf_profile: &aci_switch_policy_leaf_profile_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ leaf_profile: swleafprftest
+ state: present
+ register: leaf_profile_present
+
+- name: Ensuring Interface Policy Leaf profile exists for kick off
+ cisco.aci.aci_interface_policy_leaf_profile: &aci_interface_policy_leaf_profile_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ leaf_interface_profile: leafintprftest
+ state: present
+ register: leaf_profile_present
+
+- name: Bind an Interface Selector to a Switch Policy Leaf Profile - check mode works
+ cisco.aci.aci_interface_selector_to_switch_policy_leaf_profile: &aci_interface_selector_to_switch_policy_leaf_profile_present
+ <<: *aci_switch_policy_leaf_profile_present
+ interface_selector: leafintprftest
+ check_mode: yes
+ register: intftoleaf_check_mode_present
+
+- name: Bind an Interface Selector to a Switch Policy Leaf Profile - creation works
+ cisco.aci.aci_interface_selector_to_switch_policy_leaf_profile:
+ <<: *aci_interface_selector_to_switch_policy_leaf_profile_present
+ register: intftoleaf_present
+
+- name: Bind an Interface Selector to a Switch Policy Leaf Profile - idempotency works
+ cisco.aci.aci_interface_selector_to_switch_policy_leaf_profile:
+ <<: *aci_interface_selector_to_switch_policy_leaf_profile_present
+ register: intftoleaf_idempotent
+
+# TODO: also test for errors
+- name: present assertions
+ assert:
+ that:
+ - intftoleaf_check_mode_present is changed
+ - intftoleaf_present is changed
+ - intftoleaf_present.previous == []
+ - intftoleaf_present.sent.infraRsAccPortP.attributes.tDn == 'uni/infra/accportprof-leafintprftest'
+ - intftoleaf_idempotent is not changed
+ - intftoleaf_idempotent.sent == {}
+
+- name: Query an interface selector profile associated with a switch policy leaf profile
+ cisco.aci.aci_interface_selector_to_switch_policy_leaf_profile:
+ <<: *aci_switch_policy_leaf_profile_present
+ interface_selector: leafintprftest
+ state: query
+ register: binding_query
+
+- name: query assertions
+ assert:
+ that:
+ - binding_query is not changed
+ - binding_query.current | length >= 1
+ - '"api/mo/uni/infra/nprof-swleafprftest/rsaccPortP-[uni/infra/accportprof-leafintprftest].json" in binding_query.url'
+
+- name: Remove binding of interface access port selector and Interface Policy Leaf Profile - check mode
+ cisco.aci.aci_interface_selector_to_switch_policy_leaf_profile: &aci_interface_selector_to_switch_policy_leaf_profile_absent
+ <<: *aci_switch_policy_leaf_profile_present
+ interface_selector: leafintprftest
+ state: absent
+ check_mode: yes
+ register: intftoleaf_check_mode_absent
+
+- name: Remove binding of interface access port selector and Interface Policy Leaf Profile - delete works
+ cisco.aci.aci_interface_selector_to_switch_policy_leaf_profile:
+ <<: *aci_interface_selector_to_switch_policy_leaf_profile_absent
+ register: intftoleaf_absent
+
+- name: Remove binding of interface access port selector and Interface Policy Leaf Profile - idempotency works
+ cisco.aci.aci_interface_selector_to_switch_policy_leaf_profile:
+ <<: *aci_interface_selector_to_switch_policy_leaf_profile_absent
+ register: intftoleaf_absent_idempotent
+
+- name: Remove binding of interface access port selector and Interface Policy Leaf Profile - check mode
+ cisco.aci.aci_interface_selector_to_switch_policy_leaf_profile:
+ <<: *aci_switch_policy_leaf_profile_present
+ state: absent
+ ignore_errors: yes
+ register: intftoleaf_absent_missing_param
+
+- name: absent assertions
+ assert:
+ that:
+ - intftoleaf_check_mode_absent is changed
+ - intftoleaf_check_mode_absent.previous != []
+ - intftoleaf_absent is changed
+ - intftoleaf_absent.previous == intftoleaf_check_mode_absent.previous
+ - intftoleaf_absent_idempotent is not changed
+ - intftoleaf_absent_idempotent.previous == []
+ - intftoleaf_absent_missing_param is failed
+ - 'intftoleaf_absent_missing_param.msg == "state is absent but all of the following are missing: interface_selector"'
+
+- name: Remove an interface selector associated with a Switch Policy Leaf Profile - Clean up
+ cisco.aci.aci_interface_selector_to_switch_policy_leaf_profile:
+ <<: *aci_interface_selector_to_switch_policy_leaf_profile_absent
+ state: absent
+
+- name: delete Switch Policy Leaf profile - Clean up
+ cisco.aci.aci_switch_policy_leaf_profile:
+ <<: *aci_switch_policy_leaf_profile_present
+ state: absent
+
+- name: delete Interface Policy Leaf profile - Clean up
+ cisco.aci.aci_interface_policy_leaf_profile:
+ <<: *aci_interface_policy_leaf_profile_present
+ leaf_interface_profile: leafintprftest
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out/tasks/main.yml
new file mode 100644
index 00000000..103e7034
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out/tasks/main.yml
@@ -0,0 +1,129 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Shreyas Srish (@shrsr)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+
+# CLEAN ENVIRONMENT
+- name: Remove the ansible_tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ state: absent
+
+- name: Add a new tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ description: Ansible tenant
+ state: present
+
+- name: Add a new L2Out
+ aci_l2out:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l2out: ansible_l2out
+ description: Test deployment
+ bd: ansible_bd
+ domain: l2Dom
+ vlan: 3200
+ state: present
+ register: add_l2out
+
+- name: Verify add_l2out
+ assert:
+ that:
+ - add_l2out.current.0.l2extOut.attributes.dn == "uni/tn-ansible_tenant/l2out-ansible_l2out"
+ - add_l2out.current.0.l2extOut.attributes.name == "ansible_l2out"
+
+- name: Add the L2Out again
+ aci_l2out:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l2out: ansible_l2out
+ description: Test deployment
+ bd: ansible_bd
+ domain: l2Dom
+ vlan: 3200
+ state: present
+ register: add_l2out_again
+
+- name: Verify add_l2out_again
+ assert:
+ that:
+ - add_l2out_again is not changed
+
+- name: Add a new L2Out
+ aci_l2out:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l2out: ansible_l2out_2
+ description: Test deployment
+ bd: ansible_bd
+ domain: l2Dom
+ vlan: 3200
+ state: present
+ register: add_l2out_2
+
+- name: Verify add_l2out_2
+ assert:
+ that:
+ - add_l2out_2.current.0.l2extOut.attributes.dn == "uni/tn-ansible_tenant/l2out-ansible_l2out_2"
+ - add_l2out_2.current.0.l2extOut.attributes.name == "ansible_l2out_2"
+
+- name: Query the L2Out
+ aci_l2out:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l2out: ansible_l2out
+ state: query
+ register: query_l2out
+
+- name: Verify query_l2out
+ assert:
+ that:
+ - query_l2out is not changed
+ - query_l2out.current.0.l2extOut.attributes.dn == "uni/tn-ansible_tenant/l2out-ansible_l2out"
+ - query_l2out.current.0.l2extOut.attributes.name == "ansible_l2out"
+
+- name: Query all l2outs under a specific tenant
+ aci_l2out:
+ <<: *aci_info
+ tenant: ansible_tenant
+ state: query
+ register: query_l2out_all
+
+- name: Verify query_l2out_all
+ assert:
+ that:
+ - query_l2out_all is not changed
+
+- name: Remove the L2Out
+ aci_l2out:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l2out: ansible_l2out
+ state: absent
+ register: remove_l2out
+
+- name: Verify remove_l2out
+ assert:
+ that:
+ - remove_l2out is changed
+ - remove_l2out.previous.0.l2extOut.attributes.dn == "uni/tn-ansible_tenant/l2out-ansible_l2out"
+ - remove_l2out.previous.0.l2extOut.attributes.name == "ansible_l2out" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out_extepg/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out_extepg/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out_extepg/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out_extepg/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out_extepg/tasks/main.yml
new file mode 100644
index 00000000..7a01fb84
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l2out_extepg/tasks/main.yml
@@ -0,0 +1,156 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Shreyas Srish (@shrsr)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+
+# CLEAN ENVIRONMENT
+- name: Remove the ansible_tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ state: absent
+
+- name: Add a new tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ description: Ansible tenant
+ state: present
+
+- name: Add New L2Out
+ aci_l2out:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l2out: ansible_l2out
+ description: Ansible Test
+ bd: ansible_bd
+ domain: l2Dom
+ vlan: 3200
+ state: present
+ register: add_l2out
+
+- name: Add another L2Out
+ aci_l2out:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l2out: ansible_l2out_2
+ description: Ansible Test
+ bd: ansible_bd
+ domain: l2Dom
+ vlan: 3200
+ state: present
+ register: add_l2out_2
+
+- name: Add L2 external end point group
+ aci_l2out_extepg:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l2out: ansible_l2out
+ extepg: ansible_extepg
+ description: Ansible external epg
+ preferred_group: True
+ state: present
+ register: l2extepg
+
+- name: Verify l2extepg
+ assert:
+ that:
+ - l2extepg.current.0.l2extInstP.attributes.dn == "uni/tn-ansible_tenant/l2out-ansible_l2out/instP-ansible_extepg"
+
+- name: Add L2 external end point group again
+ aci_l2out_extepg:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l2out: ansible_l2out
+ extepg: ansible_extepg
+ description: Ansible external epg
+ preferred_group: True
+ state: present
+ register: l2extepg_again
+
+- name: Verify l2extepg_again
+ assert:
+ that:
+ - l2extepg_again is not changed
+ - l2extepg.current.0.l2extInstP.attributes.dn == "uni/tn-ansible_tenant/l2out-ansible_l2out/instP-ansible_extepg"
+
+- name: Add another L2 external end point group
+ aci_l2out_extepg:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l2out: ansible_l2out_2
+ extepg: ansible_extepg_2
+ description: Ansible external epg
+ qos_class: level1
+ preferred_group: True
+ state: present
+ register: l2extepg_2
+
+- name: Verify l2extepg_2
+ assert:
+ that:
+ - l2extepg_2.current.0.l2extInstP.attributes.dn == "uni/tn-ansible_tenant/l2out-ansible_l2out_2/instP-ansible_extepg_2"
+
+- name: Query the L2 external end point group
+ aci_l2out_extepg:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l2out: ansible_l2out
+ extepg: ansible_extepg
+ state: query
+ register: query_l2extepg
+
+- name: Query all L2 external epg in a tenant
+ aci_l2out_extepg:
+ <<: *aci_info
+ tenant: ansible_tenant
+ state: query
+ register: query_all_in_tenant
+
+- name: Verify query_all_in_tenant
+ assert:
+ that:
+ - query_all_in_tenant is not changed
+
+- name: Query all L2 external epgs
+ aci_l2out_extepg:
+ <<: *aci_info
+ state: query
+ register: query_all
+
+- name: Verify query_all
+ assert:
+ that:
+ - query_all is not changed
+
+- name: Remove L2 external end point group
+ aci_l2out_extepg:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l2out: ansible_l2out
+ extepg: ansible_extepg
+ preferred_group: True
+ state: absent
+ register: remove_l2extepg
+
+- name: Verify remove_l2extepg
+ assert:
+ that:
+ - remove_l2extepg is changed
+ - remove_l2extepg.previous.0.l2extInstP.attributes.dn == "uni/tn-ansible_tenant/l2out-ansible_l2out/instP-ansible_extepg" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extepg_to_contract/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extepg_to_contract/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extepg_to_contract/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extepg_to_contract/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extepg_to_contract/tasks/main.yml
new file mode 100644
index 00000000..4ee94126
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extepg_to_contract/tasks/main.yml
@@ -0,0 +1,145 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Shreyas Srish (@shrsr)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+
+# CLEAN ENVIRONMENT
+- name: Remove the ansible_tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ state: absent
+
+- name: Add a new tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ description: Ansible tenant
+ state: present
+
+- name: Add a new l3out
+ aci_l3out:
+ <<: *aci_info
+ tenant: ansible_tenant
+ name: ansible_l3out
+ description: l3out for Ansible tenant
+ domain: ansible_dom
+ route_control: export
+ vrf: ansible_vrf
+ l3protocol: ospf
+ state: present
+
+- name: Add a new ExtEpg
+ aci_l3out_extepg:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ name: ansible_extEpg
+ description: ExtEpg for Ansible l3out
+ state: present
+
+- name: Bind External End Point Groups to Contracts
+ aci_l3out_extepg_to_contract:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ contract: ansible_contract
+ contract_type: provider
+ state: present
+ register: bind_extepg_provider_contract
+
+- name: Verify bind_extepg_provider_contract
+ assert:
+ that:
+ - bind_extepg_provider_contract.current.0.fvRsProv.attributes.dn == "uni/tn-ansible_tenant/out-ansible_l3out/instP-ansible_extEpg/rsprov-ansible_contract"
+
+- name: Bind second External End Point Groups to Contracts
+ aci_l3out_extepg_to_contract:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ contract: ansible_contract2
+ contract_type: provider
+ state: present
+ register: bind_extepg_provider_contract_2
+
+- name: Verify bind_extepg_provider_contract_2
+ assert:
+ that:
+ - bind_extepg_provider_contract_2.current.0.fvRsProv.attributes.dn == "uni/tn-ansible_tenant/out-ansible_l3out/instP-ansible_extEpg/rsprov-ansible_contract2"
+
+- name: Query the External End Point Groups
+ aci_l3out_extepg_to_contract:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ contract: ansible_contract
+ contract_type: provider
+ state: query
+ register: query_extepg
+
+- name: Verify query_extepg
+ assert:
+ that:
+ - query_extepg is not changed
+ - query_extepg.current.0.fvRsProv.attributes.dn == "uni/tn-ansible_tenant/out-ansible_l3out/instP-ansible_extEpg/rsprov-ansible_contract"
+
+- name: Query all the External End Point Groups
+ aci_l3out_extepg_to_contract:
+ <<: *aci_info
+ contract_type: provider
+ state: query
+ register: query_all
+
+- name: Remove existing contract to External End Point Groups
+ aci_l3out_extepg_to_contract:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ contract: ansible_contract
+ contract_type: provider
+ state: absent
+ register: remove_contract_extepg
+
+- name: Verify remove_contract_extepg
+ assert:
+ that:
+ - remove_contract_extepg.previous.0.fvRsProv.attributes.dn == "uni/tn-ansible_tenant/out-ansible_l3out/instP-ansible_extEpg/rsprov-ansible_contract"
+
+- name: Bind External End Point Groups to Contracts
+ aci_l3out_extepg_to_contract:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ contract: ansible_contract
+ contract_type: consumer
+ provider_match: all
+ state: present
+ ignore_errors: yes
+ register: bind_extepg_consumer_contract
+
+- name: Verify bind_extepg_consumer_contract
+ assert:
+ that:
+ - bind_extepg_consumer_contract.msg == "the 'provider_match' is only configurable for Provided Contracts" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extsubnet/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extsubnet/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extsubnet/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extsubnet/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extsubnet/tasks/main.yml
new file mode 100644
index 00000000..48796267
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_extsubnet/tasks/main.yml
@@ -0,0 +1,210 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+
+# CLEAN ENVIRONMENT
+- name: Remove the ansible_tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ state: absent
+
+- name: Add a new tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ description: Ansible tenant
+ state: present
+
+- name: Add a new l3out
+ aci_l3out:
+ <<: *aci_info
+ tenant: ansible_tenant
+ name: ansible_l3out
+ description: l3out for Ansible tenant
+ domain: ansible_dom
+ route_control: export
+ vrf: ansible_vrf
+ l3protocol: ospf
+ state: present
+
+- name: Add a new ExtEpg
+ aci_l3out_extepg:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ name: ansible_extEpg
+ description: ExtEpg for Ansible l3out
+ state: present
+
+- name: Add a subnet (check mode)
+ cisco.aci.aci_l3out_extsubnet:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ subnet_name: test
+ network: 192.0.2.0/24
+ state: present
+ check_mode: yes
+ register: cm_add_subnet
+
+- name: Add a subnet (normal mode)
+ cisco.aci.aci_l3out_extsubnet:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ subnet_name: test
+ network: 192.0.2.0/24
+ state: present
+ register: nm_add_subnet
+
+- name: Verify cm_add_subnet and nm_add_subnet
+ assert:
+ that:
+ - cm_add_subnet is changed
+ - nm_add_subnet is changed
+ - cm_add_subnet.proposed.l3extSubnet.attributes.ip == "192.0.2.0/24"
+ - cm_add_subnet.proposed.l3extSubnet.attributes.name == "test"
+ - cm_add_subnet.proposed.l3extSubnet.attributes.scope == "import-security"
+ - nm_add_subnet.current.0.l3extSubnet.attributes.ip == "192.0.2.0/24"
+ - nm_add_subnet.current.0.l3extSubnet.attributes.name == "test"
+ - nm_add_subnet.current.0.l3extSubnet.attributes.scope == "import-security"
+
+- name: Add subnet again
+ cisco.aci.aci_l3out_extsubnet:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ subnet_name: test
+ network: 192.0.2.0/24
+ state: present
+ register: nm_add_subnet_again
+
+- name: Verify nm_add_subnet_again
+ assert:
+ that:
+ - nm_add_subnet_again is not changed
+
+- name: Change subnet (check_mode)
+ cisco.aci.aci_l3out_extsubnet:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ network: 192.0.2.0/24
+ subnet_name: ansible_test
+ description: description for subnet
+ scope: [ shared-security, import-security ]
+ state: present
+ check_mode: yes
+ register: cm_change_subnet
+
+- name: Change subnet (check_mode)
+ cisco.aci.aci_l3out_extsubnet:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ network: 192.0.2.0/24
+ subnet_name: ansible_test
+ description: description for subnet
+ scope: [ shared-security, import-security ]
+ state: present
+ register: nm_change_subnet
+
+- name: Verify cm_change_subnet and nm_change_subnet
+ assert:
+ that:
+ - cm_change_subnet is changed
+ - nm_change_subnet is changed
+ - cm_change_subnet.previous.0.l3extSubnet.attributes.descr == nm_change_subnet.previous.0.l3extSubnet.attributes.descr == ""
+ - cm_change_subnet.previous.0.l3extSubnet.attributes.name == nm_change_subnet.previous.0.l3extSubnet.attributes.name == "test"
+ - cm_change_subnet.previous.0.l3extSubnet.attributes.scope == nm_change_subnet.previous.0.l3extSubnet.attributes.scope == "import-security"
+ - cm_change_subnet.proposed.l3extSubnet.attributes.descr == "description for subnet"
+ - cm_change_subnet.proposed.l3extSubnet.attributes.name == "ansible_test"
+ - cm_change_subnet.proposed.l3extSubnet.attributes.scope == "import-security,shared-security"
+ - nm_change_subnet.current.0.l3extSubnet.attributes.descr == "description for subnet"
+ - nm_change_subnet.current.0.l3extSubnet.attributes.name == "ansible_test"
+ - nm_change_subnet.current.0.l3extSubnet.attributes.scope == "import-security,shared-security"
+
+- name: Add another subnet (normal mode)
+ cisco.aci.aci_l3out_extsubnet:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ network: 192.1.2.0/24
+ state: present
+ register: nm_add_another_subnet
+
+- name: Verify nm_add_another_subnet
+ assert:
+ that:
+ - nm_add_another_subnet is changed
+ - nm_add_another_subnet.current.0.l3extSubnet.attributes.ip == "192.1.2.0/24"
+
+- name: Query all subnets
+ cisco.aci.aci_l3out_extsubnet:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ state: query
+ register: query_all
+
+- name: Query specific subnet
+ cisco.aci.aci_l3out_extsubnet:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ network: 192.0.2.0/24
+ state: query
+ register: query_subnet
+
+- name: Verify query_all and query_subnet
+ assert:
+ that:
+ - query_all is not changed
+ - query_subnet is not changed
+ - query_all.current.0.l3extInstP.children | length == 2
+ - query_subnet.current.0.l3extSubnet.attributes.name == "ansible_test"
+ - query_subnet.current.0.l3extSubnet.attributes.ip == "192.0.2.0/24"
+
+- name: Remove subnet
+ cisco.aci.aci_l3out_extsubnet:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ extepg: ansible_extEpg
+ network: 192.0.2.0/24
+ state: absent
+ register: rm_subnet
+
+- name: Verify rm_subnet
+ assert:
+ that:
+ - rm_subnet is changed
+ - rm_subnet.current == []
+ - rm_subnet.previous.0.l3extSubnet.attributes.ip == "192.0.2.0/24"
+ - rm_subnet.previous.0.l3extSubnet.attributes.name == "ansible_test" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_logical_interface_vpc_member/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_logical_interface_vpc_member/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_logical_interface_vpc_member/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_logical_interface_vpc_member/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_logical_interface_vpc_member/tasks/main.yml
new file mode 100644
index 00000000..db0d7a90
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_logical_interface_vpc_member/tasks/main.yml
@@ -0,0 +1,120 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Anvitha Jain (@anvitha-jain)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+
+# CLEAN ENVIRONMENT
+- name: Remove the ansible_tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ state: absent
+
+- name: Add a new tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ description: Ansible tenant
+ state: present
+
+- name: Add a new L3Out
+ aci_l3out:
+ <<: *aci_info
+ tenant: ansible_tenant
+ name: ansible_l3out
+ description: L3Out for ansible_tenant tenant
+ domain: ansible_dom
+ vrf: ansible_vrf
+ l3protocol: ospf
+ route_control: export
+ state: present
+
+- name: Add a new logical node
+ cisco.aci.aci_rest:
+ <<: *aci_info
+ path: /api/mo/uni/tn-ansible_tenant/out-ansible_l3out.json
+ method: post
+ content:
+ {
+ "l3extLNodeP": {
+ "attributes": {
+ "dn": "uni/tn-ansible_tenant/out-ansible_l3out/lnodep-ansible_LNode",
+ "name": "ansible_LNode"
+ },
+ "children": [{
+ "l3extLIfP": {
+ "attributes": {
+ "name": "ansible_LInterface"
+ },
+ "children": [{
+ "l3extRsPathL3OutAtt": {
+ "attributes": {
+ "addr": "0.0.0.0",
+ "encap": "vlan-100",
+ "ifInstT": "ext-svi",
+ "tDn": "topology/pod-1/protpaths-101-102/pathep-[policy_group_one]"
+ }
+ }
+ }]
+ }
+ }]
+ }
+ }
+
+- name: Add a VPC member
+ aci_l3out_logical_interface_vpc_member:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ logical_node: ansible_LNode
+ logical_interface: ansible_LInterface
+ path_dn: topology/pod-1/protpaths-101-102/pathep-[policy_group_one]
+ side: A
+ state: present
+
+- name: Query a specific VPC member under ansible_l3out
+ aci_l3out_logical_interface_vpc_member:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ logical_node: ansible_LNode
+ logical_interface: ansible_LInterface
+ path_dn: topology/pod-1/protpaths-101-102/pathep-[policy_group_one]
+ side: A
+ state: query
+ register: query_result
+
+- name: Query all relationships
+ aci_l3out_logical_interface_vpc_member:
+ <<: *aci_info
+ tenant: ansible_tenant
+ state: query
+ ignore_errors: yes
+ register: query_result
+
+- name: Remove a VPC member
+ aci_l3out_logical_interface_vpc_member:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ logical_node: ansible_LNode
+ logical_interface: ansible_LInterface
+ path_dn: topology/pod-1/protpaths-101-102/pathep-[policy_group_one]
+ side: A
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_static_routes/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_static_routes/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_static_routes/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_static_routes/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_static_routes/tasks/main.yml
new file mode 100644
index 00000000..26864925
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_l3out_static_routes/tasks/main.yml
@@ -0,0 +1,138 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Anvitha Jain (@anvitha-jain)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+
+# CLEAN ENVIRONMENT
+- name: Remove the ansible_tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ state: absent
+
+- name: Add a new tenant
+ aci_tenant:
+ <<: *aci_info
+ tenant: ansible_tenant
+ description: Ansible tenant
+ state: present
+
+- name: Add a new L3Out
+ aci_l3out:
+ <<: *aci_info
+ tenant: ansible_tenant
+ name: ansible_l3out
+ description: L3Out for ansible_tenant tenant
+ domain: ansible_dom
+ vrf: ansible_vrf
+ l3protocol: ospf
+ route_control: export
+ state: present
+ delegate_to: localhost
+
+- name: Add a new logical node
+ cisco.aci.aci_rest:
+ <<: *aci_info
+ path: /api/mo/uni/tn-ansible_tenant/out-ansible_l3out.json
+ method: post
+ content:
+ {
+ "l3extLNodeP": {
+ "attributes": {
+ "dn": "uni/tn-ansible_tenant/out-ansible_l3out/lnodep-lNode",
+ "name": "lNode",
+ },
+ "children": [{
+ "l3extRsNodeL3OutAtt": {
+ "attributes": {
+ "rtrId": "10.1.0.1",
+ "rtrIdLoopBack": "yes",
+ "tDn": "topology/pod-1/node-101",
+ }
+ }
+ }]
+ }
+ }
+
+- name: Add static routes
+ aci_l3out_static_routes:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ logical_node: lNode
+ node_id: 101
+ pod_id: 1
+ prefix: 10.1.0.1/24
+ state: present
+ delegate_to: localhost
+
+- name: Query system information
+ aci_system:
+ <<: *aci_info
+ id: 1
+ state: query
+ register: version
+
+- name: Add static routes bfd
+ aci_l3out_static_routes:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ logical_node: lNode
+ node_id: 101
+ pod_id: 1
+ bfd: bfd
+ track_policy: test
+ prefix: 10.1.0.1/24
+ state: present
+ delegate_to: localhost
+ when: version.current.0.topSystem.attributes.version is version('4.2', '>=')
+
+- name: Query for a specific MO under l3out
+ aci_l3out_static_routes:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ logical_node: lNode
+ node_id: 101
+ pod_id: 1
+ prefix: 10.1.0.1/24
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all relationships
+ aci_l3out_static_routes:
+ <<: *aci_info
+ tenant: production
+ state: query
+ ignore_errors: yes
+ register: query_result
+
+- name: Remove static routes
+ aci_l3out_static_routes:
+ <<: *aci_info
+ tenant: ansible_tenant
+ l3out: ansible_l3out
+ logical_node: lNode
+ node_id: 101
+ pod_id: 1
+ prefix: 10.1.0.1/24
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/error_handling.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/error_handling.yml
new file mode 100644
index 00000000..c5c68a39
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/error_handling.yml
@@ -0,0 +1,191 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# PROVOKE ERRORS
+- name: Error on name resolution
+ cisco.aci.aci_rest:
+ host: foo.bar.cisco.com
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ path: /api/mo/uni.json
+ method: post
+ content:
+ fvTenant:
+ attributes:
+ name: ansible_test
+ ignore_errors: yes
+ register: error_on_name_resolution
+
+- name: Verify error_on_name_resolution
+ assert:
+ that:
+ - error_on_name_resolution is failed
+ - error_on_name_resolution.msg.startswith("Connection failed for https://foo.bar.cisco.com/api/aaaLogin.json. Request failed:")
+ - "'current' not in error_on_name_resolution"
+ - "'previous' not in error_on_name_resolution"
+ - "'sent' not in error_on_name_resolution"
+ - "'proposed' not in error_on_name_resolution"
+ - "'filter_string' not in error_on_name_resolution"
+
+- name: Error when required parameter is missing
+ cisco.aci.aci_rest:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ method: post
+ content:
+ fvTenant:
+ attributes:
+ name: ansible_test
+ ignore_errors: yes
+ register: error_on_missing_required_param
+
+- name: Verify error_on_missing_required_param
+ assert:
+ that:
+ - error_on_missing_required_param is failed
+ - 'error_on_missing_required_param.msg == "missing required arguments: path"'
+ - "'current' not in error_on_missing_required_param"
+ - "'previous' not in error_on_missing_required_param"
+ - "'sent' not in error_on_missing_required_param"
+ - "'proposed' not in error_on_missing_required_param"
+ - "'filter_string' not in error_on_missing_required_param"
+
+- name: Error when attributes are missing
+ cisco.aci.aci_rest:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ path: /api/mo/uni/tn-ansible_test.json
+ method: post
+ content:
+ fvTenant:
+ children:
+ ignore_errors: yes
+ register: error_on_missing_attributes
+
+- name: Verify error_on_missing_attributes
+ assert:
+ that:
+ - error_on_missing_attributes is failed
+ - error_on_missing_attributes.method == 'POST'
+ - "error_on_missing_attributes.msg == 'APIC Error 400: invalid data at line \\'1\\'. Attributes are missing, tag \\'attributes\\' must be specified first, before any other tag'"
+ - 'error_on_missing_attributes.response == "HTTP Error 400: Bad Request"'
+ - error_on_missing_attributes.status == 400
+ - "'current' not in error_on_missing_attributes"
+ - "'previous' not in error_on_missing_attributes"
+ - "'sent' not in error_on_missing_attributes"
+ - "'proposed' not in error_on_missing_attributes"
+ - "'filter_string' not in error_on_missing_attributes"
+
+- name: Error when input does not validate
+ cisco.aci.aci_rest:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ path: /api/mo/uni.json
+ method: post
+ content:
+ fvTenant:
+ attributes:
+ name: ansible_test
+ descr: This is an [invalid] description
+ ignore_errors: yes
+ register: error_on_input_validation
+
+- name: Verify error_on_input_validation
+ assert:
+ that:
+ - error_on_input_validation is failed
+ - error_on_input_validation.method == 'POST'
+ - "error_on_input_validation.msg == 'APIC Error 801: property descr of tn-ansible_test failed validation for value \\'This is an [invalid] description\\''"
+ - 'error_on_input_validation.response == "HTTP Error 400: Bad Request"'
+ - error_on_input_validation.status == 400
+ - "'current' not in error_on_input_validation"
+ - "'previous' not in error_on_input_validation"
+ - "'sent' not in error_on_input_validation"
+ - "'proposed' not in error_on_input_validation"
+ - "'filter_string' not in error_on_input_validation"
+
+- name: Error when invalid attributes are used
+ cisco.aci.aci_rest:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ path: /api/mo/uni.json
+ method: post
+ content:
+ fvTenant:
+ attributes:
+ name: ansible_test
+ description: This is an "invalid" description
+ ignore_errors: yes
+ register: error_on_invalid_attributes
+
+- name: Verify error_on_invalid_attributes
+ assert:
+ that:
+ - error_on_invalid_attributes is failed
+ - error_on_invalid_attributes.method == 'POST'
+ - "error_on_invalid_attributes.msg == 'APIC Error 400: unknown attribute \\'description\\' in element \\'fvTenant\\''"
+ - 'error_on_invalid_attributes.response == "HTTP Error 400: Bad Request"'
+ - error_on_invalid_attributes.status == 400
+ - "'current' not in error_on_invalid_attributes"
+ - "'previous' not in error_on_invalid_attributes"
+ - "'sent' not in error_on_invalid_attributes"
+ - "'proposed' not in error_on_invalid_attributes"
+ - "'filter_string' not in error_on_invalid_attributes"
+
+- name: Error on invalid object
+ cisco.aci.aci_rest:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ path: /api/mo/uni.json
+ method: post
+ content:
+ fvFoobar:
+ attributes:
+ name: ansible_test
+ ignore_errors: yes
+ register: error_on_invalid_object
+
+- name: Verify error_on_invalid_object
+ assert:
+ that:
+ - error_on_invalid_object is failed
+ - error_on_invalid_object.method == 'POST'
+ - "error_on_invalid_object.msg == 'APIC Error 122: unknown managed object class fvFoobar'"
+ - 'error_on_invalid_object.response == "HTTP Error 400: Bad Request"'
+ - error_on_invalid_object.status == 400
+ - "'current' not in error_on_invalid_object"
+ - "'previous' not in error_on_invalid_object"
+ - "'sent' not in error_on_invalid_object"
+ - "'proposed' not in error_on_invalid_object"
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/json_inline.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/json_inline.yml
new file mode 100644
index 00000000..dd27525f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/json_inline.yml
@@ -0,0 +1,166 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove tenant
+ cisco.aci.aci_rest: &tenant_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].json
+ method: delete
+
+# ADD TENANT
+- name: Add tenant (normal mode)
+ cisco.aci.aci_rest: &tenant_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni.json
+ method: post
+ content:
+ {
+ "fvTenant": {
+ "attributes": {
+ "name": "ansible_test"
+ }
+ }
+ }
+ delegate_to: localhost
+ register: nm_add_tenant
+
+- name: Add tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_present
+ delegate_to: localhost
+ register: nm_add_tenant_again
+
+- name: Verify add_tenant
+ assert:
+ that:
+ - nm_add_tenant is changed
+ - nm_add_tenant_again is not changed
+
+# CHANGE TENANT
+- name: Change description of tenant (normal mode)
+ cisco.aci.aci_rest: &tenant_changed
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni.json
+ method: post
+ content:
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Ansible test tenant",
+ "name": "ansible_test"
+ }
+ }
+ }
+ delegate_to: localhost
+ register: nm_add_tenant_descr
+
+- name: Change description of tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_changed
+ delegate_to: localhost
+ register: nm_add_tenant_descr_again
+
+- name: Verify add_tenant_descr
+ assert:
+ that:
+ - nm_add_tenant_descr is changed
+ - nm_add_tenant_descr_again is not changed
+
+# ADD TENANT AGAIN
+- name: Add tenant again with no description (normal mode)
+ cisco.aci.aci_rest: *tenant_present
+ delegate_to: localhost
+ register: nm_add_tenant_again_no_descr
+
+- name: Verify add_tenant_again_no_descr
+ assert:
+ that:
+ - nm_add_tenant_again_no_descr is not changed
+
+# QUERY ALL TENANTS
+- name: Query all tenants (normal mode)
+ cisco.aci.aci_rest: &tenant_query_all
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].json
+ method: get
+ delegate_to: localhost
+ register: nm_query_all_tenants
+
+- name: Verify query_all_tenants
+ assert:
+ that:
+ - nm_query_all_tenants is not changed
+
+# QUERY A TENANT
+- name: Query our tenant
+ cisco.aci.aci_rest: &tenant_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].json
+ method: get
+ delegate_to: localhost
+ register: nm_query_tenant
+
+- name: Verify query_tenant
+ assert:
+ that:
+ - nm_query_tenant is not changed
+
+# REMOVE TENANT
+- name: Remove tenant (normal mode)
+ cisco.aci.aci_rest: *tenant_absent
+ delegate_to: localhost
+ register: nm_remove_tenant
+
+- name: Remove tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_absent
+ delegate_to: localhost
+ register: nm_remove_tenant_again
+
+- name: Verify remove_tenant
+ assert:
+ that:
+ - nm_remove_tenant is changed
+ - nm_remove_tenant_again is not changed
+
+# QUERY NON-EXISTING TENANT
+- name: Query non-existing tenant (normal mode)
+ cisco.aci.aci_rest: *tenant_query
+ delegate_to: localhost
+ register: nm_query_non_tenant
+
+- name: Verify query_non_tenant
+ assert:
+ that:
+ - nm_query_non_tenant is not changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/json_string.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/json_string.yml
new file mode 100644
index 00000000..9d1f6848
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/json_string.yml
@@ -0,0 +1,156 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove tenant
+ cisco.aci.aci_rest: &tenant_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].json
+ method: delete
+
+# ADD TENANT
+- name: Add tenant (normal mode)
+ cisco.aci.aci_rest: &tenant_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni.json
+ method: post
+ content: |
+ {
+ "fvTenant": {
+ "attributes": {
+ "name": "ansible_test"
+ }
+ }
+ }
+ register: nm_add_tenant
+
+- name: Add tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_present
+ register: nm_add_tenant_again
+
+- name: Verify add_tenant
+ assert:
+ that:
+ - nm_add_tenant is changed
+ - nm_add_tenant_again is not changed
+
+# CHANGE TENANT
+- name: Change description of tenant (normal mode)
+ cisco.aci.aci_rest: &tenant_changed
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni.json
+ method: post
+ content: |
+ {
+ "fvTenant": {
+ "attributes": {
+ "descr": "Ansible test tenant",
+ "name": "ansible_test"
+ }
+ }
+ }
+ register: nm_add_tenant_descr
+
+- name: Change description of tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_changed
+ register: nm_add_tenant_descr_again
+
+- name: Verify add_tenant_descr
+ assert:
+ that:
+ - nm_add_tenant_descr is changed
+ - nm_add_tenant_descr_again is not changed
+
+# ADD TENANT AGAIN
+- name: Add tenant again with no description (normal mode)
+ cisco.aci.aci_rest: *tenant_present
+ register: nm_add_tenant_again_no_descr
+
+- name: Verify add_tenant_again_no_descr
+ assert:
+ that:
+ - nm_add_tenant_again_no_descr is not changed
+
+# QUERY ALL TENANTS
+- name: Query all tenants (normal mode)
+ cisco.aci.aci_rest: &tenant_query_all
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].json
+ method: get
+ register: nm_query_all_tenants
+
+- name: Verify query_all_tenants
+ assert:
+ that:
+ - nm_query_all_tenants is not changed
+
+# QUERY A TENANT
+- name: Query our tenant
+ cisco.aci.aci_rest: &tenant_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].json
+ method: get
+ register: nm_query_tenant
+
+- name: Verify query_tenant
+ assert:
+ that:
+ - nm_query_tenant is not changed
+
+# REMOVE TENANT
+- name: Remove tenant (normal mode)
+ cisco.aci.aci_rest: *tenant_absent
+ register: nm_remove_tenant
+
+- name: Remove tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_absent
+ register: nm_remove_tenant_again
+
+- name: Verify remove_tenant
+ assert:
+ that:
+ - nm_remove_tenant is changed
+ - nm_remove_tenant_again is not changed
+
+# QUERY NON-EXISTING TENANT
+- name: Query non-existing tenant (normal mode)
+ cisco.aci.aci_rest: *tenant_query
+ register: nm_query_non_tenant
+
+- name: Verify query_non_tenant
+ assert:
+ that:
+ - nm_query_non_tenant is not changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/main.yml
new file mode 100644
index 00000000..85b50cbf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/main.yml
@@ -0,0 +1,28 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- include_tasks: yaml_inline.yml
+ tags: yaml_inline
+
+- include_tasks: yaml_string.yml
+ tags: yaml_string
+
+- include_tasks: json_inline.yml
+ tags: json_inline
+
+- include_tasks: json_string.yml
+ tags: json_string
+
+- include_tasks: xml_string.yml
+ tags: xml_string
+
+- include_tasks: error_handling.yml
+ tags: error_handling
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/xml_string.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/xml_string.yml
new file mode 100644
index 00000000..c8729177
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/xml_string.yml
@@ -0,0 +1,167 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove tenant
+ cisco.aci.aci_rest: &tenant_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].xml
+ method: delete
+
+# ADD TENANT
+- name: Add tenant (normal mode)
+ cisco.aci.aci_rest: &tenant_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni.xml
+ method: post
+ content:
+ {
+ "fvTenant": {
+ "attributes": {
+ "name": "ansible_test"
+ }
+ }
+ }
+ register: nm_add_tenant
+
+- name: Add tenant again (normal mode)
+ cisco.aci.aci_rest:
+ <<: *tenant_present
+ path: /api/mo/uni.xml
+ content:
+ <fvTenant name="ansible_test"/>
+ register: nm_add_tenant_again
+
+- name: Verify add_tenant
+ assert:
+ that:
+ - nm_add_tenant is changed
+ - nm_add_tenant_again is not changed
+
+# CHANGE TENANT
+- name: Change description of tenant (normal mode)
+ cisco.aci.aci_rest: &tenant_changed
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni.xml
+ method: post
+ content:
+ fvTenant:
+ attributes:
+ name: ansible_test
+ descr: Ansible test tenant
+ register: nm_add_tenant_descr
+
+- name: Change description of tenant again (normal mode)
+ cisco.aci.aci_rest:
+ <<: *tenant_changed
+ path: /api/mo/uni.xml
+ content:
+ fvTenant:
+ attributes:
+ name: ansible_test
+ descr: Ansible test tenant
+ register: nm_add_tenant_descr_again
+
+- name: Verify add_tenant_descr
+ assert:
+ that:
+ - nm_add_tenant_descr is changed
+ - nm_add_tenant_descr_again is not changed
+
+# ADD TENANT AGAIN
+- name: Add tenant again with no description (normal mode)
+ cisco.aci.aci_rest:
+ <<: *tenant_present
+ path: /api/mo/uni.xml
+ content:
+ <fvTenant name="ansible_test"/>
+ register: nm_add_tenant_again_no_descr
+
+- name: Verify add_tenant_again_no_descr
+ assert:
+ that:
+ - nm_add_tenant_again_no_descr is not changed
+
+# QUERY ALL TENANTS
+- name: Query all tenants (normal mode)
+ cisco.aci.aci_rest: &tenant_query_all
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].xml
+ method: get
+ register: nm_query_all_tenants
+
+- name: Verify query_all_tenants
+ assert:
+ that:
+ - nm_query_all_tenants is not changed
+
+# QUERY A TENANT
+- name: Query our tenant
+ cisco.aci.aci_rest: &tenant_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].xml
+ method: get
+ register: nm_query_tenant
+
+- name: Verify query_tenant
+ assert:
+ that:
+ - nm_query_tenant is not changed
+
+# REMOVE TENANT
+- name: Remove tenant (normal mode)
+ cisco.aci.aci_rest: *tenant_absent
+ register: nm_remove_tenant
+
+- name: Remove tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_absent
+ register: nm_remove_tenant_again
+
+- name: Verify remove_tenant
+ assert:
+ that:
+ - nm_remove_tenant is changed
+ - nm_remove_tenant_again is not changed
+
+# QUERY NON-EXISTING TENANT
+- name: Query non-existing tenant (normal mode)
+ cisco.aci.aci_rest: *tenant_query
+ register: nm_query_non_tenant
+
+- name: Verify query_non_tenant
+ assert:
+ that:
+ - nm_query_non_tenant is not changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/yaml_inline.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/yaml_inline.yml
new file mode 100644
index 00000000..d7538f9a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/yaml_inline.yml
@@ -0,0 +1,148 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove tenant
+ cisco.aci.aci_rest: &tenant_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].json
+ method: delete
+
+# ADD TENANT
+- name: Add tenant (normal mode)
+ cisco.aci.aci_rest: &tenant_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni.json
+ method: post
+ content:
+ fvTenant:
+ attributes:
+ name: ansible_test
+ register: nm_add_tenant
+
+- name: Add tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_present
+ register: nm_add_tenant_again
+
+- name: Verify add_tenant
+ assert:
+ that:
+ - nm_add_tenant is changed
+ - nm_add_tenant_again is not changed
+
+# CHANGE TENANT
+- name: Change description of tenant (normal mode)
+ cisco.aci.aci_rest: &tenant_changed
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni.json
+ method: post
+ content:
+ fvTenant:
+ attributes:
+ name: ansible_test
+ descr: Ansible test tenant
+ register: nm_add_tenant_descr
+
+- name: Change description of tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_changed
+ register: nm_add_tenant_descr_again
+
+- name: Verify add_tenant_descr
+ assert:
+ that:
+ - nm_add_tenant_descr is changed
+ - nm_add_tenant_descr_again is not changed
+
+# ADD TENANT AGAIN
+- name: Add tenant again with no description (normal mode)
+ cisco.aci.aci_rest: *tenant_present
+ register: nm_add_tenant_again_no_descr
+
+- name: Verify add_tenant_again_no_descr
+ assert:
+ that:
+ - nm_add_tenant_again_no_descr is not changed
+
+# QUERY ALL TENANTS
+- name: Query all tenants (normal mode)
+ cisco.aci.aci_rest: &tenant_query_all
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].json
+ method: get
+ register: nm_query_all_tenants
+
+- name: Verify query_all_tenants
+ assert:
+ that:
+ - nm_query_all_tenants is not changed
+
+# QUERY A TENANT
+- name: Query our tenant
+ cisco.aci.aci_rest: &tenant_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].json
+ method: get
+ register: nm_query_tenant
+
+- name: Verify query_tenant
+ assert:
+ that:
+ - nm_query_tenant is not changed
+
+# REMOVE TENANT
+- name: Remove tenant (normal mode)
+ cisco.aci.aci_rest: *tenant_absent
+ register: nm_remove_tenant
+
+- name: Remove tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_absent
+ register: nm_remove_tenant_again
+
+- name: Verify remove_tenant
+ assert:
+ that:
+ - nm_remove_tenant is changed
+ - nm_remove_tenant_again is not changed
+
+# QUERY NON-EXISTING TENANT
+- name: Query non-existing tenant (normal mode)
+ cisco.aci.aci_rest: *tenant_query
+ register: nm_query_non_tenant
+
+- name: Verify query_non_tenant
+ assert:
+ that:
+ - nm_query_non_tenant is not changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/yaml_string.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/yaml_string.yml
new file mode 100644
index 00000000..d7538f9a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_rest/tasks/yaml_string.yml
@@ -0,0 +1,148 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove tenant
+ cisco.aci.aci_rest: &tenant_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].json
+ method: delete
+
+# ADD TENANT
+- name: Add tenant (normal mode)
+ cisco.aci.aci_rest: &tenant_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni.json
+ method: post
+ content:
+ fvTenant:
+ attributes:
+ name: ansible_test
+ register: nm_add_tenant
+
+- name: Add tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_present
+ register: nm_add_tenant_again
+
+- name: Verify add_tenant
+ assert:
+ that:
+ - nm_add_tenant is changed
+ - nm_add_tenant_again is not changed
+
+# CHANGE TENANT
+- name: Change description of tenant (normal mode)
+ cisco.aci.aci_rest: &tenant_changed
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni.json
+ method: post
+ content:
+ fvTenant:
+ attributes:
+ name: ansible_test
+ descr: Ansible test tenant
+ register: nm_add_tenant_descr
+
+- name: Change description of tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_changed
+ register: nm_add_tenant_descr_again
+
+- name: Verify add_tenant_descr
+ assert:
+ that:
+ - nm_add_tenant_descr is changed
+ - nm_add_tenant_descr_again is not changed
+
+# ADD TENANT AGAIN
+- name: Add tenant again with no description (normal mode)
+ cisco.aci.aci_rest: *tenant_present
+ register: nm_add_tenant_again_no_descr
+
+- name: Verify add_tenant_again_no_descr
+ assert:
+ that:
+ - nm_add_tenant_again_no_descr is not changed
+
+# QUERY ALL TENANTS
+- name: Query all tenants (normal mode)
+ cisco.aci.aci_rest: &tenant_query_all
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].json
+ method: get
+ register: nm_query_all_tenants
+
+- name: Verify query_all_tenants
+ assert:
+ that:
+ - nm_query_all_tenants is not changed
+
+# QUERY A TENANT
+- name: Query our tenant
+ cisco.aci.aci_rest: &tenant_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ path: /api/mo/uni/tn-[ansible_test].json
+ method: get
+ register: nm_query_tenant
+
+- name: Verify query_tenant
+ assert:
+ that:
+ - nm_query_tenant is not changed
+
+# REMOVE TENANT
+- name: Remove tenant (normal mode)
+ cisco.aci.aci_rest: *tenant_absent
+ register: nm_remove_tenant
+
+- name: Remove tenant again (normal mode)
+ cisco.aci.aci_rest: *tenant_absent
+ register: nm_remove_tenant_again
+
+- name: Verify remove_tenant
+ assert:
+ that:
+ - nm_remove_tenant is changed
+ - nm_remove_tenant_again is not changed
+
+# QUERY NON-EXISTING TENANT
+- name: Query non-existing tenant (normal mode)
+ cisco.aci.aci_rest: *tenant_query
+ register: nm_query_non_tenant
+
+- name: Verify query_non_tenant
+ assert:
+ that:
+ - nm_query_non_tenant is not changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_static_binding_to_epg/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_static_binding_to_epg/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_static_binding_to_epg/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_static_binding_to_epg/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_static_binding_to_epg/tasks/main.yml
new file mode 100644
index 00000000..aa1e69dc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_static_binding_to_epg/tasks/main.yml
@@ -0,0 +1,206 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Bruno Calogero <bcalogero@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Ensure static path to epg is deleted for test kick off
+ cisco.aci.aci_static_binding_to_epg: &aci_static_binding_to_epg_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ tenant: anstest
+ ap: anstest
+ epg: anstest
+ interface_type: switch_port
+ pod: 1
+ leafs: 101
+ interface: '1/7'
+ state: absent
+
+- name: Ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ tenant: anstest
+ state: present
+ register: tenant_present
+
+- name: Ensure ap exists
+ cisco.aci.aci_ap: &aci_ap_present
+ <<: *aci_tenant_present
+ ap: anstest
+ register: ap_present
+
+- name: Ensure epg exists
+ cisco.aci.aci_epg: &aci_epg_present
+ <<: *aci_ap_present
+ epg: anstest
+ register: epg_present
+
+- name: Bind static-binding to epg - check mode works
+ cisco.aci.aci_static_binding_to_epg: &aci_static_binding_to_epg_present
+ <<: *aci_epg_present
+ encap_id: 222
+ deploy_immediacy: lazy
+ interface_mode: trunk
+ interface_type: switch_port
+ pod: 1
+ leafs: 101
+ interface: '1/7'
+ check_mode: yes
+ register: provide_present_check_mode
+
+- name: Bind static-binding to epg - provide works (creation w/o check-mode)
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *aci_static_binding_to_epg_present
+ ignore_errors: yes
+ register: provide_present
+
+- name: Bind static-binding to epg - primary_encap_id works
+ cisco.aci.aci_static_binding_to_epg: &primary_encap_id_present
+ <<: *aci_static_binding_to_epg_present
+ primary_encap_id: 50
+ register: primary_ecap_id_present
+
+- name: Bind contract to epg - idempotency works again
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *primary_encap_id_present
+ register: idempotent_present
+
+- name: Bind contract to epg - update description (check mode)
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *primary_encap_id_present
+ description: Binding description
+ check_mode: yes
+ register: description_cm
+
+- name: Bind contract to epg - update description (run mode)
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *primary_encap_id_present
+ description: Binding description
+ register: description
+
+- name: Bind contract to epg - update description (check mode)
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *primary_encap_id_present
+ description: Binding description
+ register: idempotent_description_cm
+
+- name: Bind contract to epg - update description (run mode)
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *primary_encap_id_present
+ description: Binding description
+ register: idempotent_description
+
+- name: Missing required param - failure message works
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *aci_tenant_present
+ ignore_errors: yes
+ register: missing_required_present
+
+- name: Present assertions
+ assert:
+ that:
+ - provide_present_check_mode is changed
+ - provide_present_check_mode.sent.fvRsPathAtt.attributes.encap == 'vlan-222'
+ - provide_present_check_mode.sent.fvRsPathAtt.attributes.instrImedcy == 'lazy'
+ - provide_present_check_mode.sent.fvRsPathAtt.attributes.mode == 'regular'
+ - provide_present_check_mode.sent.fvRsPathAtt.attributes.tDn == 'topology/pod-1/paths-101/pathep-[eth1/7]'
+ - provide_present is changed
+ - provide_present.sent == provide_present_check_mode.sent
+ - provide_present.previous == []
+ - primary_ecap_id_present is changed
+ - primary_ecap_id_present.sent.fvRsPathAtt.attributes.primaryEncap == 'vlan-50'
+ - description_cm is changed
+ - description is changed
+ - idempotent_description_cm is not changed
+ - idempotent_description is not changed
+ - missing_required_present is failed
+ - 'missing_required_present.msg == "state is present but all of the following are missing: ap, encap_id, epg, interface, leafs, pod_id"'
+ - missing_required_present is failed
+
+
+- name: Query specific binding
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *primary_encap_id_present
+ state: query
+ register: query_static_binding
+
+- name: Query all bindings
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *aci_tenant_present
+ state: query
+ register: query_all
+
+- name: Query assertions
+ assert:
+ that:
+ - query_static_binding is not changed
+ - query_static_binding.current != []
+ - '"uni/tn-anstest/ap-anstest/epg-anstest/rspathAtt-[topology/pod-1/paths-101/pathep-[eth1/7]]" in query_static_binding.url'
+ - query_all is not changed
+ - '"uni/tn-anstest.json" in query_all.url'
+
+
+- name: Delete provide binding - deletion works
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *primary_encap_id_present
+ state: absent
+ register: provide_absent
+
+- name: Delete provide binding - idempotency works
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *primary_encap_id_present
+ state: absent
+ register: provide_absent_idempotent
+
+- name: Missing param - failure message works
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *aci_tenant_present
+ state: absent
+ ignore_errors: yes
+ register: missing_param_absent
+
+- name: Absent assertions
+ assert:
+ that:
+ - provide_absent is changed
+ - provide_absent.previous.0.fvRsPathAtt is defined
+ - provide_absent_idempotent is not changed
+ - provide_absent_idempotent.previous == []
+ - missing_param_absent is failed
+ - missing_param_absent is failed
+ - 'missing_param_absent.msg == "state is absent but all of the following are missing: ap, epg, interface, leafs, pod_id"'
+
+- name: Cleanup binding
+ cisco.aci.aci_static_binding_to_epg:
+ <<: *aci_static_binding_to_epg_absent
+
+- name: Cleanup epg
+ cisco.aci.aci_epg:
+ <<: *aci_epg_present
+ state: absent
+
+- name: Cleanup ap
+ cisco.aci.aci_ap:
+ <<: *aci_ap_present
+ state: absent
+
+- name: Cleanup tenant
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_present
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_leaf_selector/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_leaf_selector/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_leaf_selector/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_leaf_selector/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_leaf_selector/tasks/main.yml
new file mode 100644
index 00000000..8b82411f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_leaf_selector/tasks/main.yml
@@ -0,0 +1,142 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Deleting Switch Policy Leaf profile exists for kick off
+ cisco.aci.aci_switch_policy_leaf_profile:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ leaf_profile: sw_name_test
+ state: absent
+
+- name: Ensuring Switch Policy Leaf profile exists for kick off
+ cisco.aci.aci_switch_policy_leaf_profile: &aci_switch_policy_leaf_profile_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ leaf_profile: sw_name_test
+ state: present
+ register: leaf_profile_present
+
+# TODO: Ensure that leaf Policy Group Exists (module missing) (infra:AccPortGrp)
+
+- name: Adding a switch policy leaf profile selector associated Node Block range (w/o policy group) - check mode works
+ cisco.aci.aci_switch_leaf_selector: &aci_switch_leaf_selector_present
+ <<: *aci_switch_policy_leaf_profile_present
+ leaf: leaf_selector_name
+ leaf_node_blk: node_blk_name
+ from: 1011
+ to: 1011
+ check_mode: yes
+ register: sw_leaf_selec_check_mode_present
+
+- name: Adding a switch policy leaf profile selector associated Node Block range (w/o policy group) - creation works
+ cisco.aci.aci_switch_leaf_selector:
+ <<: *aci_switch_leaf_selector_present
+ register: sw_leaf_selec_present
+
+- name: Adding a switch policy leaf profile selector associated Node Block range (w/o policy group) - idempotency works
+ cisco.aci.aci_switch_leaf_selector:
+ <<: *aci_switch_leaf_selector_present
+ register: sw_leaf_selec_idempotent
+
+- name: Adding a switch policy leaf profile selector associated Node Block range (w/ policy group) - update works
+ cisco.aci.aci_switch_leaf_selector:
+ <<: *aci_switch_leaf_selector_present
+ policy_group: anstest_policygroupname
+ register: sw_leaf_selec_update
+
+# TODO: also test for errors
+- name: present assertions
+ assert:
+ that:
+ - sw_leaf_selec_check_mode_present is changed
+ - sw_leaf_selec_present is changed
+ - sw_leaf_selec_present.previous == []
+ - sw_leaf_selec_present.sent.infraLeafS.attributes.name == 'leaf_selector_name'
+ - sw_leaf_selec_present.sent.infraLeafS.children.0.infraNodeBlk.attributes.from_ == '1011'
+ - sw_leaf_selec_present.sent.infraLeafS.children.0.infraNodeBlk.attributes.to_ == '1011'
+ - sw_leaf_selec_present.sent.infraLeafS.children.0.infraNodeBlk.attributes.name == 'node_blk_name'
+ - sw_leaf_selec_idempotent is not changed
+ - sw_leaf_selec_idempotent.sent == {}
+ - sw_leaf_selec_update is changed
+ - sw_leaf_selec_update.sent.infraLeafS.attributes == {}
+ - sw_leaf_selec_update.sent.infraLeafS.children.0.infraRsAccNodePGrp.attributes.tDn == 'uni/infra/funcprof/accnodepgrp-anstest_policygroupname'
+
+- name: Query Specific switch policy leaf profile selector
+ cisco.aci.aci_switch_leaf_selector:
+ <<: *aci_switch_policy_leaf_profile_present
+ leaf: leaf_selector_name # "{{ fake_var | default(omit) }}" ?
+ state: query
+ register: binding_query
+
+- name: present assertions
+ assert:
+ that:
+ - binding_query is not changed
+ - binding_query.current | length >= 1
+ - '"api/mo/uni/infra/nprof-sw_name_test/leaves-leaf_selector_name-typ-range.json" in binding_query.url'
+
+- name: Remove binding of interface access port selector and Interface Policy Leaf Profile - check mode
+ cisco.aci.aci_switch_leaf_selector: &aci_switch_leaf_selector_absent
+ <<: *aci_switch_policy_leaf_profile_present
+ leaf: leaf_selector_name
+ state: absent
+ check_mode: yes
+ register: sw_leaf_selec_check_mode_absent
+
+- name: Remove switch policy leaf profile selector - delete works
+ cisco.aci.aci_switch_leaf_selector:
+ <<: *aci_switch_leaf_selector_absent
+ register: sw_leaf_selec_absent
+
+- name: Remove switch policy leaf profile selector - idempotency works
+ cisco.aci.aci_switch_leaf_selector:
+ <<: *aci_switch_leaf_selector_absent
+ register: sw_leaf_selec_absent_idempotent
+
+- name: Remove switch policy leaf profile selector - check mode
+ cisco.aci.aci_switch_leaf_selector:
+ <<: *aci_switch_policy_leaf_profile_present
+ #access_port_selector: anstest_accessportselector
+ state: absent
+ ignore_errors: yes
+ register: sw_leaf_selec_absent_missing_param
+
+- name: absent assertions
+ assert:
+ that:
+ - sw_leaf_selec_check_mode_absent is changed
+ - sw_leaf_selec_check_mode_absent.previous != []
+ - sw_leaf_selec_absent is changed
+ - sw_leaf_selec_absent.previous == sw_leaf_selec_check_mode_absent.previous
+ - sw_leaf_selec_absent_idempotent is not changed
+ - sw_leaf_selec_absent_idempotent.previous == []
+ - sw_leaf_selec_absent_missing_param is failed
+ - 'sw_leaf_selec_absent_missing_param.msg == "state is absent but all of the following are missing: leaf"'
+
+
+- name: Remove switch policy leaf profile selector - Clean up
+ cisco.aci.aci_switch_leaf_selector:
+ <<: *aci_switch_leaf_selector_absent
+ state: absent
+
+- name: Deleting Switch Policy Leaf profile exists for kick off
+ cisco.aci.aci_switch_policy_leaf_profile:
+ <<: *aci_switch_policy_leaf_profile_present
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_leaf_profile/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_leaf_profile/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_leaf_profile/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_leaf_profile/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_leaf_profile/tasks/main.yml
new file mode 100644
index 00000000..80344aeb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_leaf_profile/tasks/main.yml
@@ -0,0 +1,213 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Remove leaf profile
+ cisco.aci.aci_switch_policy_leaf_profile: &aci_switch_policy_leaf_profile_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ leaf_profile: ansible_test
+ state: absent
+
+
+# ADD LEAF PROFILE
+- name: Add switch policy leaf profile (check_mode)
+ cisco.aci.aci_switch_policy_leaf_profile: &aci_switch_policy_leaf_profile_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ leaf_profile: ansible_test
+ state: present
+ check_mode: yes
+ register: cm_add_switch_leaf_profile
+
+- name: Add leaf profile (normal mode)
+ cisco.aci.aci_switch_policy_leaf_profile: *aci_switch_policy_leaf_profile_present
+ register: nm_add_switch_leaf_profile
+
+- name: Add leaf profile again (check_mode)
+ cisco.aci.aci_switch_policy_leaf_profile: *aci_switch_policy_leaf_profile_present
+ check_mode: yes
+ register: cm_add_switch_leaf_profile_again
+
+- name: Add leaf profile again (normal mode)
+ cisco.aci.aci_switch_policy_leaf_profile: *aci_switch_policy_leaf_profile_present
+ register: nm_add_switch_leaf_profile_again
+
+- name: Verify add_switch_leaf_profile
+ assert:
+ that:
+ - cm_add_switch_leaf_profile is changed
+ - nm_add_switch_leaf_profile is changed
+ - cm_add_switch_leaf_profile_again is not changed
+ - nm_add_switch_leaf_profile_again is not changed
+
+
+# CHANGE SWITCH LEAF PROFILE
+- name: Change description of leaf profile (check_mode)
+ cisco.aci.aci_switch_policy_leaf_profile:
+ <<: *aci_switch_policy_leaf_profile_present
+ description: Ansible test leaf profile
+ check_mode: yes
+ register: cm_add_switch_leaf_profile_descr
+
+- name: Change description of leaf profile (normal mode)
+ cisco.aci.aci_switch_policy_leaf_profile:
+ <<: *aci_switch_policy_leaf_profile_present
+ description: Ansible test leaf profile
+ register: nm_add_switch_leaf_profile_descr
+
+- name: Change description of leaf profile again (check_mode)
+ cisco.aci.aci_switch_policy_leaf_profile:
+ <<: *aci_switch_policy_leaf_profile_present
+ description: Ansible test leaf profile
+ check_mode: yes
+ register: cm_add_switch_leaf_profile_descr_again
+
+- name: Change description of leaf profile again (normal mode)
+ cisco.aci.aci_switch_policy_leaf_profile:
+ <<: *aci_switch_policy_leaf_profile_present
+ description: Ansible test leaf profile
+ register: nm_add_switch_leaf_profile_descr_again
+
+- name: Verify add_switch_leaf_profile_descr
+ assert:
+ that:
+ - cm_add_switch_leaf_profile_descr is changed
+ - nm_add_switch_leaf_profile_descr is changed
+ - cm_add_switch_leaf_profile_descr_again is not changed
+ - nm_add_switch_leaf_profile_descr_again is not changed
+
+
+# ADD LEAF PROFILE AGAIN
+- name: Add leaf profile again with no description (check_mode)
+ cisco.aci.aci_switch_policy_leaf_profile: *aci_switch_policy_leaf_profile_present
+ check_mode: yes
+ register: cm_add_switch_leaf_profile_again_no_descr
+
+- name: Add leaf profile again with no description (normal mode)
+ cisco.aci.aci_switch_policy_leaf_profile: *aci_switch_policy_leaf_profile_present
+ register: nm_add_switch_leaf_profile_again_no_descr
+
+- name: Verify add_switch_leaf_profile_again_no_descr
+ assert:
+ that:
+ - cm_add_switch_leaf_profile_again_no_descr is not changed
+ - nm_add_switch_leaf_profile_again_no_descr is not changed
+
+
+# QUERY ALL LEAF PROFILES
+- name: Query all profiles (check_mode)
+ cisco.aci.aci_switch_policy_leaf_profile: &aci_switch_policy_leaf_profile_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_switch_leaf_profiles
+
+- name: Query all switch_leaf_profiles (normal mode)
+ cisco.aci.aci_switch_policy_leaf_profile: *aci_switch_policy_leaf_profile_query
+ register: nm_query_all_switch_leaf_profiles
+
+- name: Verify query_all_switch_leaf_profiles
+ assert:
+ that:
+ - cm_query_all_switch_leaf_profiles is not changed
+ - nm_query_all_switch_leaf_profiles is not changed
+ # NOTE: Order of switch_leaf_profiles is not stable between calls
+ #- cm_query_all_switch_leaf_profiles == nm_query_all_switch_leaf_profiles
+
+
+# QUERY A LEAF PROFILE
+- name: Query our switch_leaf_profile
+ cisco.aci.aci_switch_policy_leaf_profile:
+ <<: *aci_switch_policy_leaf_profile_query
+ leaf_profile: ansible_test
+ check_mode: yes
+ register: cm_query_switch_leaf_profile
+
+- name: Query our switch_leaf_profile
+ cisco.aci.aci_switch_policy_leaf_profile:
+ <<: *aci_switch_policy_leaf_profile_query
+ leaf_profile: ansible_test
+ register: nm_query_switch_leaf_profile
+
+- name: Verify query_switch_leaf_profile
+ assert:
+ that:
+ - cm_query_switch_leaf_profile is not changed
+ - nm_query_switch_leaf_profile is not changed
+ - cm_query_switch_leaf_profile == nm_query_switch_leaf_profile
+
+
+# REMOVE LEAF PROFILE
+- name: Remove switch_leaf_profile (check_mode)
+ cisco.aci.aci_switch_policy_leaf_profile: *aci_switch_policy_leaf_profile_absent
+ check_mode: yes
+ register: cm_remove_switch_leaf_profile
+
+- name: Remove switch_leaf_profile (normal mode)
+ cisco.aci.aci_switch_policy_leaf_profile: *aci_switch_policy_leaf_profile_absent
+ register: nm_remove_switch_leaf_profile
+
+- name: Remove switch_leaf_profile again (check_mode)
+ cisco.aci.aci_switch_policy_leaf_profile: *aci_switch_policy_leaf_profile_absent
+ check_mode: yes
+ register: cm_remove_switch_leaf_profile_again
+
+- name: Remove switch_leaf_profile again (normal mode)
+ cisco.aci.aci_switch_policy_leaf_profile: *aci_switch_policy_leaf_profile_absent
+ register: nm_remove_switch_leaf_profile_again
+
+- name: Verify remove_switch_leaf_profile
+ assert:
+ that:
+ - cm_remove_switch_leaf_profile is changed
+ - nm_remove_switch_leaf_profile is changed
+ - cm_remove_switch_leaf_profile_again is not changed
+ - nm_remove_switch_leaf_profile_again is not changed
+
+
+# QUERY NON-EXISTING LEAF PROFILE
+- name: Query non-existing switch_leaf_profile (check_mode)
+ cisco.aci.aci_switch_policy_leaf_profile:
+ <<: *aci_switch_policy_leaf_profile_query
+ leaf_profile: ansible_test
+ check_mode: yes
+ register: cm_query_non_switch_leaf_profile
+
+- name: Query non-existing switch_leaf_profile (normal mode)
+ cisco.aci.aci_switch_policy_leaf_profile:
+ <<: *aci_switch_policy_leaf_profile_query
+ leaf_profile: ansible_test
+ register: nm_query_non_switch_leaf_profile
+
+# TODO: Implement more tests
+- name: Verify query_non_switch_leaf_profile
+ assert:
+ that:
+ - cm_query_non_switch_leaf_profile is not changed
+ - nm_query_non_switch_leaf_profile is not changed
+ - cm_query_non_switch_leaf_profile == nm_query_non_switch_leaf_profile
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_vpc_protection_group/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_vpc_protection_group/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_vpc_protection_group/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_vpc_protection_group/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_vpc_protection_group/tasks/main.yml
new file mode 100644
index 00000000..79785eae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_switch_policy_vpc_protection_group/tasks/main.yml
@@ -0,0 +1,213 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Remove vpc protection group
+ cisco.aci.aci_switch_policy_vpc_protection_group: &aci_switch_policy_vpc_protection_group_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ protection_group: ansible_test
+ state: absent
+
+
+# ADD VPC PROTECTION GROUP
+- name: Add vpc protection group (check_mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group: &aci_switch_policy_vpc_protection_group_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ protection_group: ansible_test
+ protection_group_id: 6
+ switch_1_id: 3811
+ switch_2_id: 3812
+ state: present
+ check_mode: yes
+ register: cm_add_vpc_prot_grp
+
+- name: Add vpc protection group (normal mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group: *aci_switch_policy_vpc_protection_group_present
+ register: nm_add_vpc_prot_grp
+
+- name: Add vpc protection group again (check_mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group: *aci_switch_policy_vpc_protection_group_present
+ check_mode: yes
+ register: cm_add_vpc_prot_grp_again
+
+- name: Add vpc protection group again (normal mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group: *aci_switch_policy_vpc_protection_group_present
+ register: nm_add_vpc_prot_grp_again
+
+- name: Verify add_vpc_prot_grp_again
+ assert:
+ that:
+ - cm_add_vpc_prot_grp is changed
+ - nm_add_vpc_prot_grp is changed
+ - cm_add_vpc_prot_grp_again is not changed
+ - nm_add_vpc_prot_grp_again is not changed
+
+
+# CHANGE VPC PROTECTION GROUP
+- name: Change vpc domain policy of vpc protection group (check_mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group:
+ <<: *aci_switch_policy_vpc_protection_group_present
+ vpc_domain_policy: ansible_test_pol
+ check_mode: yes
+ register: cm_add_vpc_prot_grp_pol
+
+- name: Change vpc domain policy of vpc protection group (normal mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group:
+ <<: *aci_switch_policy_vpc_protection_group_present
+ vpc_domain_policy: ansible_test_pol
+ register: nm_add_vpc_prot_grp_pol
+
+- name: Change vpc domain policy of vpc protection group again (check_mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group:
+ <<: *aci_switch_policy_vpc_protection_group_present
+ vpc_domain_policy: ansible_test_pol
+ check_mode: yes
+ register: cm_add_vpc_prot_grp_pol_again
+
+- name: Change vpc domain policy of vpc protection group again (normal mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group:
+ <<: *aci_switch_policy_vpc_protection_group_present
+ vpc_domain_policy: ansible_test_pol
+ register: nm_add_vpc_prot_grp_pol_again
+
+- name: Verify add_vpc_prot_grp_pol
+ assert:
+ that:
+ - cm_add_vpc_prot_grp_pol is changed
+ - nm_add_vpc_prot_grp_pol is changed
+ - cm_add_vpc_prot_grp_pol_again is not changed
+ - nm_add_vpc_prot_grp_pol_again is not changed
+
+
+# ADD FABRIC NODE AGAIN
+- name: Add vpc protection group again with no domain policy (check_mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group: *aci_switch_policy_vpc_protection_group_present
+ check_mode: yes
+ register: cm_add_vpc_prot_grp_again_no_pol
+
+- name: Add vpc protection group again with no domain policy (normal mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group: *aci_switch_policy_vpc_protection_group_present
+ register: nm_add_vpc_prot_grp_again_no_pol
+
+- name: Verify add_vpc_prot_grp_again_no_pol
+ assert:
+ that:
+ - cm_add_vpc_prot_grp_again_no_pol is not changed
+ - nm_add_vpc_prot_grp_again_no_pol is not changed
+
+
+# QUERY ALL VPC PROTECTION GROUPS
+- name: Query vpc protection groups (check_mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group: &aci_switch_policy_vpc_protection_group_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_vpc_prot_grps
+
+- name: Query all vpc protection groups (normal mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group: *aci_switch_policy_vpc_protection_group_query
+ register: nm_query_all_vpc_prot_grps
+
+- name: Verify query_all_vpc_prot_grps
+ assert:
+ that:
+ - cm_query_all_vpc_prot_grps is not changed
+ - nm_query_all_vpc_prot_grps is not changed
+ - cm_query_all_vpc_prot_grps == nm_query_all_vpc_prot_grps
+
+
+# QUERY A VPC PROTECTION GROUP
+- name: Query our vpc protection group
+ cisco.aci.aci_switch_policy_vpc_protection_group:
+ <<: *aci_switch_policy_vpc_protection_group_query
+ protection_group: ansible_test # might need node_id too
+ check_mode: yes
+ register: cm_query_vpc_prot_grp
+
+- name: Query our vpc protection group
+ cisco.aci.aci_switch_policy_vpc_protection_group:
+ <<: *aci_switch_policy_vpc_protection_group_query
+ protection_group: ansible_test
+ register: nm_query_vpc_prot_grp
+
+- name: Verify query_vpc_prot_grp
+ assert:
+ that:
+ - cm_query_vpc_prot_grp is not changed
+ - nm_query_vpc_prot_grp is not changed
+ - cm_query_vpc_prot_grp == nm_query_vpc_prot_grp
+
+
+# REMOVE FABRIC NODE
+- name: Remove vpc protection group (check_mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group: *aci_switch_policy_vpc_protection_group_absent
+ check_mode: yes
+ register: cm_remove_vpc_prot_grp
+
+- name: Remove vpc protection group (normal mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group: *aci_switch_policy_vpc_protection_group_absent
+ register: nm_remove_vpc_prot_grp
+
+- name: Remove vpc protection group again (check_mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group: *aci_switch_policy_vpc_protection_group_absent
+ check_mode: yes
+ register: cm_remove_vpc_prot_grp_again
+
+- name: Remove vpc protection group again (normal mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group: *aci_switch_policy_vpc_protection_group_absent
+ register: nm_remove_vpc_prot_grp_again
+
+- name: Verify remove_vpc_prot_grp
+ assert:
+ that:
+ - cm_remove_vpc_prot_grp is changed
+ - nm_remove_vpc_prot_grp is changed
+ - cm_remove_vpc_prot_grp_again is not changed
+ - nm_remove_vpc_prot_grp_again is not changed
+
+
+# QUERY NON-EXISTING LEAF PROFILE
+- name: Query non-existing vpc protection group (check_mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group:
+ <<: *aci_switch_policy_vpc_protection_group_query
+ protection_group: ansible_test
+ check_mode: yes
+ register: cm_query_non_vpc_prot_grp
+
+- name: Query non-existing vpc protection group (normal mode)
+ cisco.aci.aci_switch_policy_vpc_protection_group:
+ <<: *aci_switch_policy_vpc_protection_group_query
+ protection_group: ansible_test
+ register: nm_query_non_vpc_prot_grp
+
+- name: Verify query_non_vpc_prot_grp
+ assert:
+ that:
+ - cm_query_non_vpc_prot_grp is not changed
+ - nm_query_non_vpc_prot_grp is not changed
+ - cm_query_non_vpc_prot_grp == nm_query_non_vpc_prot_grp
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_system/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_system/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_system/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_system/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_system/tasks/main.yml
new file mode 100644
index 00000000..483bd540
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_system/tasks/main.yml
@@ -0,0 +1,63 @@
+# Test code for the ACI modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ aci_info: &aci_info
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+
+# QUERY OBJECTS
+- name: Query all controllers system information
+ aci_system:
+ <<: *aci_info
+ state: query
+ register: query_all
+
+- name: Verify query_all
+ assert:
+ that:
+ - query_all is not changed
+ - query_all.current.0.topSystem.attributes.id == "1"
+ - '"version" in query_all.current.0.topSystem.attributes'
+
+
+- name: Query a specific controller system information
+ aci_system:
+ <<: *aci_info
+ id: 1
+ state: query
+ register: query_controller
+
+- name: Verify query_controller
+ assert:
+ that:
+ - query_controller is not changed
+ - query_controller.current.0.topSystem.attributes.id == "1"
+ - '"version" in query_controller.current.0.topSystem.attributes'
+
+- name: Query non_existing controller
+ aci_system:
+ <<: *aci_info
+ id: 99
+ state: query
+ register: query_non_existing
+
+- name: Verify query_non_existing
+ assert:
+ that:
+ - query_non_existing is not changed
+ - query_non_existing.current == [] \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_taboo_contract/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_taboo_contract/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_taboo_contract/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_taboo_contract/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_taboo_contract/tasks/main.yml
new file mode 100644
index 00000000..8bcdd7d7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_taboo_contract/tasks/main.yml
@@ -0,0 +1,289 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Remove taboo contract
+ cisco.aci.aci_taboo_contract: &taboo_contract_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: ansible_test
+ taboo_contract: taboo_contract_test
+ state: absent
+
+- name: Add tenant
+ cisco.aci.aci_tenant:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: ansible_test
+ state: present
+
+
+# ADD TABOO CONTRACT
+- name: Add taboo contract (check_mode)
+ cisco.aci.aci_taboo_contract: &taboo_contract_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: ansible_test
+ taboo_contract: taboo_contract_test
+ state: present
+ check_mode: yes
+ register: cm_add_taboo_contract
+
+- name: Add taboo contract (normal mode)
+ cisco.aci.aci_taboo_contract: *taboo_contract_present
+ register: nm_add_taboo_contract
+
+- name: Verify add_taboo_contract
+ assert:
+ that:
+ - cm_add_taboo_contract is changed
+ - nm_add_taboo_contract is changed
+ - cm_add_taboo_contract.sent.vzTaboo.attributes.name == nm_add_taboo_contract.sent.vzTaboo.attributes.name == 'taboo_contract_test'
+ - cm_add_taboo_contract.proposed.vzTaboo.attributes.name == nm_add_taboo_contract.proposed.vzTaboo.attributes.name == 'taboo_contract_test'
+ - cm_add_taboo_contract.previous == nm_add_taboo_contract.previous == []
+ # NOTE: We cannot fix this easily
+ - cm_add_taboo_contract.current == []
+ - nm_add_taboo_contract.current.0.vzTaboo.attributes.descr == ''
+ - nm_add_taboo_contract.current.0.vzTaboo.attributes.dn == 'uni/tn-ansible_test/taboo-taboo_contract_test'
+ - nm_add_taboo_contract.current.0.vzTaboo.attributes.name == 'taboo_contract_test'
+
+- name: Add taboo_contract again (check_mode)
+ cisco.aci.aci_taboo_contract: *taboo_contract_present
+ check_mode: yes
+ register: cm_add_taboo_contract_again
+
+- name: Add taboo contract again (normal mode)
+ cisco.aci.aci_taboo_contract: *taboo_contract_present
+ register: nm_add_taboo_contract_again
+
+- name: Verify add_taboo_contract_again
+ assert:
+ that:
+ - cm_add_taboo_contract_again is not changed
+ - nm_add_taboo_contract_again is not changed
+ - cm_add_taboo_contract_again.current == nm_add_taboo_contract_again.current == nm_add_taboo_contract.current
+
+
+# CHANGE TABOO CONTRACT
+- name: Change description of taboo contract (check_mode)
+ cisco.aci.aci_taboo_contract:
+ <<: *taboo_contract_present
+ description: Ansible test taboo contract
+ check_mode: yes
+ register: cm_add_taboo_contract_descr
+
+- name: Change description of taboo contract (normal mode)
+ cisco.aci.aci_taboo_contract:
+ <<: *taboo_contract_present
+ description: Ansible test taboo contract
+ register: nm_add_taboo_contract_descr
+
+- name: Verify add_taboo_contract_descr
+ assert:
+ that:
+ - cm_add_taboo_contract_descr is changed
+ - nm_add_taboo_contract_descr is changed
+ - cm_add_taboo_contract_descr.sent.vzTaboo.attributes.descr == nm_add_taboo_contract_descr.sent.vzTaboo.attributes.descr == 'Ansible test taboo contract'
+ - cm_add_taboo_contract_descr.proposed.vzTaboo.attributes.descr == nm_add_taboo_contract_descr.proposed.vzTaboo.attributes.descr == 'Ansible test taboo contract'
+ - cm_add_taboo_contract_descr.proposed.vzTaboo.attributes.name == nm_add_taboo_contract_descr.proposed.vzTaboo.attributes.name == 'taboo_contract_test'
+ - cm_add_taboo_contract_descr.previous == nm_add_taboo_contract_descr.previous == cm_add_taboo_contract_descr.current == nm_add_taboo_contract.current
+ - nm_add_taboo_contract_descr.current.0.vzTaboo.attributes.descr == 'Ansible test taboo contract'
+ - nm_add_taboo_contract_descr.current.0.vzTaboo.attributes.dn == 'uni/tn-ansible_test/taboo-taboo_contract_test'
+ - nm_add_taboo_contract_descr.current.0.vzTaboo.attributes.name == 'taboo_contract_test'
+
+- name: Change description of taboo contract again (check_mode)
+ cisco.aci.aci_taboo_contract:
+ <<: *taboo_contract_present
+ description: Ansible test taboo contract
+ check_mode: yes
+ register: cm_add_taboo_contract_descr_again
+
+- name: Change description of taboo contract again (normal mode)
+ cisco.aci.aci_taboo_contract:
+ <<: *taboo_contract_present
+ description: Ansible test taboo contract
+ register: nm_add_taboo_contract_descr_again
+
+- name: Verify add_taboo_contract_descr_again
+ assert:
+ that:
+ - cm_add_taboo_contract_descr_again is not changed
+ - nm_add_taboo_contract_descr_again is not changed
+ - cm_add_taboo_contract_descr_again.current == nm_add_taboo_contract_descr_again.current == nm_add_taboo_contract_descr.current
+
+
+# ADD TABOO CONTRACT AGAIN
+- name: Add taboo contract again with no description (check_mode)
+ cisco.aci.aci_taboo_contract: *taboo_contract_present
+ check_mode: yes
+ register: cm_add_taboo_contract_again_no_descr
+
+- name: Add taboo contract again with no description (normal mode)
+ cisco.aci.aci_taboo_contract: *taboo_contract_present
+ register: nm_add_taboo_contract_again_no_descr
+
+- name: Verify add_taboo_contract_again_no_descr
+ assert:
+ that:
+ - cm_add_taboo_contract_again_no_descr is not changed
+ - nm_add_taboo_contract_again_no_descr is not changed
+ - cm_add_taboo_contract_again_no_descr.current == nm_add_taboo_contract_again_no_descr.current == nm_add_taboo_contract_descr.current
+
+
+# QUERY ALL TABOO CONTRACTS
+- name: Query all taboo contracts (check_mode)
+ cisco.aci.aci_taboo_contract: &taboo_contract_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_taboo_contracts
+
+- name: Query all taboo contracts (normal mode)
+ cisco.aci.aci_taboo_contract: *taboo_contract_query
+ register: nm_query_all_taboo_contracts
+
+- name: Verify query_all_taboo_contracts
+ assert:
+ that:
+ - cm_query_all_taboo_contracts is not changed
+ - nm_query_all_taboo_contracts is not changed
+ - cm_query_all_taboo_contracts == nm_query_all_taboo_contracts
+ - cm_query_all_taboo_contracts.current|length >= 1
+
+
+# QUERY A TABOO CONTRACT
+- name: Query our taboo contract
+ cisco.aci.aci_taboo_contract:
+ <<: *taboo_contract_query
+ tenant: ansible_test
+ taboo_contract: taboo_contract_test
+ check_mode: yes
+ register: cm_query_taboo_contract
+
+- name: Query our taboo contract
+ cisco.aci.aci_taboo_contract:
+ <<: *taboo_contract_query
+ tenant: ansible_test
+ taboo_contract: taboo_contract_test
+ register: nm_query_taboo_contract
+
+- name: Verify query_taboo_contract
+ assert:
+ that:
+ - cm_query_taboo_contract is not changed
+ - nm_query_taboo_contract is not changed
+ - cm_query_taboo_contract == nm_query_taboo_contract
+ - nm_query_taboo_contract.current.0.vzTaboo.attributes.descr == 'Ansible test taboo contract'
+ - nm_query_taboo_contract.current.0.vzTaboo.attributes.dn == 'uni/tn-ansible_test/taboo-taboo_contract_test'
+ - nm_query_taboo_contract.current.0.vzTaboo.attributes.name == 'taboo_contract_test'
+
+
+# REMOVE TABOO CONTRACT
+- name: Remove taboo contract (check_mode)
+ cisco.aci.aci_taboo_contract: *taboo_contract_absent
+ check_mode: yes
+ register: cm_remove_taboo_contract
+
+- name: Remove taboo contract (normal mode)
+ cisco.aci.aci_taboo_contract: *taboo_contract_absent
+ register: nm_remove_taboo_contract
+
+- name: Verify remove_taboo_contract
+ assert:
+ that:
+ - cm_remove_taboo_contract is changed
+ - nm_remove_taboo_contract is changed
+ - cm_remove_taboo_contract.current.0.vzTaboo.attributes.descr == cm_remove_taboo_contract.previous.0.vzTaboo.attributes.descr == nm_remove_taboo_contract.previous.0.vzTaboo.attributes.descr == 'Ansible test taboo contract'
+ - cm_remove_taboo_contract.current.0.vzTaboo.attributes.name == cm_remove_taboo_contract.previous.0.vzTaboo.attributes.name == nm_remove_taboo_contract.previous.0.vzTaboo.attributes.name == 'taboo_contract_test'
+ - cm_remove_taboo_contract.current.0.vzTaboo.attributes.dn == cm_remove_taboo_contract.previous.0.vzTaboo.attributes.dn == nm_remove_taboo_contract.previous.0.vzTaboo.attributes.dn == 'uni/tn-ansible_test/taboo-taboo_contract_test'
+ - nm_remove_taboo_contract.current == []
+
+- name: Remove taboo contract again (check_mode)
+ cisco.aci.aci_taboo_contract: *taboo_contract_absent
+ check_mode: yes
+ register: cm_remove_taboo_contract_again
+
+- name: Remove taboo contract again (normal mode)
+ cisco.aci.aci_taboo_contract: *taboo_contract_absent
+ register: nm_remove_taboo_contract_again
+
+- name: Verify remove_taboo_contract_again
+ assert:
+ that:
+ - cm_remove_taboo_contract_again is not changed
+ - nm_remove_taboo_contract_again is not changed
+ - cm_remove_taboo_contract_again.proposed == nm_remove_taboo_contract_again.proposed == {}
+ - cm_remove_taboo_contract_again.sent == nm_remove_taboo_contract_again.sent == {}
+ - cm_remove_taboo_contract_again.previous == nm_remove_taboo_contract_again.previous == []
+ - cm_remove_taboo_contract_again.current == nm_remove_taboo_contract_again.current == []
+
+
+# QUERY NON-EXISTING TABOO CONTRACT
+- name: Query non-existing taboo contract (check_mode)
+ cisco.aci.aci_taboo_contract:
+ <<: *taboo_contract_query
+ tenant: ansible_test
+ taboo_contract: taboo_contract_test
+ check_mode: yes
+ register: cm_query_non_taboo_contract
+
+- name: Query non-existing taboo contract (normal mode)
+ cisco.aci.aci_taboo_contract:
+ <<: *taboo_contract_query
+ tenant: ansible_test
+ taboo_contract: taboo_contract_test
+ register: nm_query_non_taboo_contract
+
+# TODO: Implement more tests
+- name: Verify query_non_taboo_contract
+ assert:
+ that:
+ - cm_query_non_taboo_contract is not changed
+ - nm_query_non_taboo_contract is not changed
+ - cm_remove_taboo_contract_again.previous == nm_remove_taboo_contract_again.previous == []
+ - cm_remove_taboo_contract_again.current == nm_remove_taboo_contract_again.current == []
+
+
+# PROVOKE ERRORS
+- name: Error when required parameter is missing
+ cisco.aci.aci_taboo_contract:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: present
+ ignore_errors: yes
+ register: error_on_missing_required_param
+
+- name: Verify error_on_missing_required_param
+ assert:
+ that:
+ - error_on_missing_required_param is failed
+ - 'error_on_missing_required_param.msg == "state is present but all of the following are missing: tenant, taboo_contract"'
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_tenant/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_tenant/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_tenant/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_tenant/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_tenant/tasks/main.yml
new file mode 100644
index 00000000..98478222
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_tenant/tasks/main.yml
@@ -0,0 +1,261 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Remove tenant
+ cisco.aci.aci_tenant: &tenant_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: ansible_test
+ state: absent
+
+
+# ADD TENANT
+- name: Add tenant (check_mode)
+ cisco.aci.aci_tenant: &tenant_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ tenant: ansible_test
+ state: present
+ annotation: ansible_test
+ owner_key: ansible_key
+ owner_tag: ansible_tag
+ check_mode: yes
+ register: cm_add_tenant
+
+- name: Add tenant (normal mode)
+ cisco.aci.aci_tenant: *tenant_present
+ register: nm_add_tenant
+
+- name: Add tenant again (check_mode)
+ cisco.aci.aci_tenant: *tenant_present
+ check_mode: yes
+ register: cm_add_tenant_again
+
+- name: Add tenant again (normal mode)
+ cisco.aci.aci_tenant: *tenant_present
+ register: nm_add_tenant_again
+
+- name: Verify add_tenant
+ assert:
+ that:
+ - cm_add_tenant is changed
+ - nm_add_tenant is changed
+ - cm_add_tenant_again is not changed
+ - nm_add_tenant_again is not changed
+ - nm_add_tenant.current[0].fvTenant.attributes.annotation == 'ansible_test'
+ - cm_add_tenant.proposed.fvTenant.attributes.annotation == 'ansible_test'
+ - nm_add_tenant.current[0].fvTenant.attributes.ownerKey == 'ansible_key'
+ - cm_add_tenant.proposed.fvTenant.attributes.ownerKey == 'ansible_key'
+ - nm_add_tenant.current[0].fvTenant.attributes.ownerTag == 'ansible_tag'
+ - cm_add_tenant.proposed.fvTenant.attributes.ownerTag == 'ansible_tag'
+
+
+# CHANGE TENANT
+- name: Change description and annotation/owner_tag/owner_key of tenant (check_mode)
+ cisco.aci.aci_tenant:
+ <<: *tenant_present
+ description: Ansible test tenant
+ annotation: ansible_test_changed
+ owner_key: ansible_key_changed
+ owner_tag: ansible_tag_changed
+ check_mode: yes
+ register: cm_add_tenant_descr
+
+- name: Change description and annotation/owner_tag/owner_key of tenant (normal mode)
+ cisco.aci.aci_tenant:
+ <<: *tenant_present
+ description: Ansible test tenant
+ annotation: ansible_test_changed
+ owner_key: ansible_key_changed
+ owner_tag: ansible_tag_changed
+ register: nm_add_tenant_descr
+
+- name: Change description and annotation/owner_tag/owner_key of tenant again (check_mode)
+ cisco.aci.aci_tenant:
+ <<: *tenant_present
+ description: Ansible test tenant
+ annotation: ansible_test_changed
+ owner_key: ansible_key_changed
+ owner_tag: ansible_tag_changed
+ check_mode: yes
+ register: cm_add_tenant_descr_again
+
+- name: Change description and annotation of tenant again (normal mode)
+ cisco.aci.aci_tenant:
+ <<: *tenant_present
+ description: Ansible test tenant
+ annotation: ansible_test_changed
+ owner_key: ansible_key_changed
+ owner_tag: ansible_tag_changed
+ register: nm_add_tenant_descr_again
+
+- name: Verify add_tenant_descr
+ assert:
+ that:
+ - cm_add_tenant_descr is changed
+ - nm_add_tenant_descr is changed
+ - cm_add_tenant_descr_again is not changed
+ - nm_add_tenant_descr_again is not changed
+ - cm_add_tenant_descr.proposed.fvTenant.attributes.annotation == 'ansible_test_changed'
+ - nm_add_tenant_descr.current[0].fvTenant.attributes.annotation == 'ansible_test_changed'
+ - cm_add_tenant_descr_again.proposed.fvTenant.attributes.annotation == 'ansible_test_changed'
+ - nm_add_tenant_descr_again.current[0].fvTenant.attributes.annotation == 'ansible_test_changed'
+ - nm_add_tenant_descr.current[0].fvTenant.attributes.ownerKey == 'ansible_key_changed'
+ - cm_add_tenant_descr.proposed.fvTenant.attributes.ownerKey == 'ansible_key_changed'
+ - nm_add_tenant_descr_again.current[0].fvTenant.attributes.ownerKey == 'ansible_key_changed'
+ - cm_add_tenant_descr_again.proposed.fvTenant.attributes.ownerKey == 'ansible_key_changed'
+ - nm_add_tenant_descr.current[0].fvTenant.attributes.ownerTag == 'ansible_tag_changed'
+ - cm_add_tenant_descr.proposed.fvTenant.attributes.ownerTag == 'ansible_tag_changed'
+ - nm_add_tenant_descr_again.current[0].fvTenant.attributes.ownerTag == 'ansible_tag_changed'
+ - cm_add_tenant_descr_again.proposed.fvTenant.attributes.ownerTag == 'ansible_tag_changed'
+
+
+# ADD TENANT AGAIN
+- name: Add tenant again with no description (check_mode)
+ cisco.aci.aci_tenant:
+ <<: *tenant_present
+ annotation: ansible_test_changed
+ owner_key: ansible_key_changed
+ owner_tag: ansible_tag_changed
+ check_mode: yes
+ register: cm_add_tenant_again_no_descr
+
+- name: Add tenant again with no description (normal mode)
+ cisco.aci.aci_tenant:
+ <<: *tenant_present
+ annotation: ansible_test_changed
+ owner_key: ansible_key_changed
+ owner_tag: ansible_tag_changed
+ register: nm_add_tenant_again_no_descr
+
+- name: Verify add_tenant_again_no_descr
+ assert:
+ that:
+ - cm_add_tenant_again_no_descr is not changed
+ - nm_add_tenant_again_no_descr is not changed
+
+
+# QUERY ALL TENANTS
+- name: Query all tenants (check_mode)
+ cisco.aci.aci_tenant: &tenant_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_tenants
+
+- name: Query all tenants (normal mode)
+ cisco.aci.aci_tenant: *tenant_query
+ register: nm_query_all_tenants
+
+- name: Verify query_all_tenants
+ assert:
+ that:
+ - cm_query_all_tenants is not changed
+ - nm_query_all_tenants is not changed
+ # NOTE: Order of tenants is not stable between calls
+ #- cm_query_all_tenants == nm_query_all_tenants
+
+
+# QUERY A TENANT
+- name: Query our tenant
+ cisco.aci.aci_tenant:
+ <<: *tenant_query
+ tenant: ansible_test
+ check_mode: yes
+ register: cm_query_tenant
+
+- name: Query our tenant
+ cisco.aci.aci_tenant:
+ <<: *tenant_query
+ tenant: ansible_test
+ register: nm_query_tenant
+
+- name: Verify query_tenant
+ assert:
+ that:
+ - cm_query_tenant is not changed
+ - nm_query_tenant is not changed
+ - cm_query_tenant == nm_query_tenant
+ - cm_query_tenant.current[0].fvTenant.attributes.annotation == 'ansible_test_changed'
+ - nm_query_tenant.current[0].fvTenant.attributes.annotation == 'ansible_test_changed'
+ - nm_query_tenant.current[0].fvTenant.attributes.ownerKey == 'ansible_key_changed'
+ - cm_query_tenant.current[0].fvTenant.attributes.ownerKey == 'ansible_key_changed'
+ - nm_query_tenant.current[0].fvTenant.attributes.ownerTag == 'ansible_tag_changed'
+ - cm_query_tenant.current[0].fvTenant.attributes.ownerTag == 'ansible_tag_changed'
+
+
+# REMOVE TENANT
+- name: Remove tenant (check_mode)
+ cisco.aci.aci_tenant: *tenant_absent
+ check_mode: yes
+ register: cm_remove_tenant
+
+- name: Remove tenant (normal mode)
+ cisco.aci.aci_tenant: *tenant_absent
+ register: nm_remove_tenant
+
+- name: Remove tenant again (check_mode)
+ cisco.aci.aci_tenant: *tenant_absent
+ check_mode: yes
+ register: cm_remove_tenant_again
+
+- name: Remove tenant again (normal mode)
+ cisco.aci.aci_tenant: *tenant_absent
+ register: nm_remove_tenant_again
+
+- name: Verify remove_tenant
+ assert:
+ that:
+ - cm_remove_tenant is changed
+ - nm_remove_tenant is changed
+ - cm_remove_tenant_again is not changed
+ - nm_remove_tenant_again is not changed
+
+
+# QUERY NON-EXISTING TENANT
+- name: Query non-existing tenant (check_mode)
+ cisco.aci.aci_tenant:
+ <<: *tenant_query
+ tenant: ansible_test
+ check_mode: yes
+ register: cm_query_non_tenant
+
+- name: Query non-existing tenant (normal mode)
+ cisco.aci.aci_tenant:
+ <<: *tenant_query
+ tenant: ansible_test
+ register: nm_query_non_tenant
+
+# TODO: Implement more tests
+- name: Verify query_non_tenant
+ assert:
+ that:
+ - cm_query_non_tenant is not changed
+ - nm_query_non_tenant is not changed
+ - cm_query_non_tenant == nm_query_non_tenant
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/tasks/dynamic.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/tasks/dynamic.yml
new file mode 100644
index 00000000..6153f813
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/tasks/dynamic.yml
@@ -0,0 +1,303 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+# CLEAN ENVIRONMENT
+- name: Remove dynamic vlan pool
+ cisco.aci.aci_vlan_pool: &dynamic_vlan_pool_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ pool: anstest
+ pool_allocation_mode: dynamic
+ state: absent
+
+
+# ADD VLAN POOL
+- name: Add dynamic vlan pool (check_mode)
+ cisco.aci.aci_vlan_pool: &dynamic_vlan_pool_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ pool: anstest
+ pool_allocation_mode: dynamic
+ state: present
+ check_mode: yes
+ register: cm_add_dynamic_vlan_pool
+
+- name: Add dynamic vlan pool (normal mode)
+ cisco.aci.aci_vlan_pool: *dynamic_vlan_pool_present
+ register: nm_add_dynamic_vlan_pool
+
+- name: Verify add_dynamic_vlan_pool
+ assert:
+ that:
+ - cm_add_dynamic_vlan_pool is changed
+ - nm_add_dynamic_vlan_pool is changed
+ - cm_add_dynamic_vlan_pool.sent.fvnsVlanInstP.attributes.allocMode == nm_add_dynamic_vlan_pool.sent.fvnsVlanInstP.attributes.allocMode == 'dynamic'
+ - cm_add_dynamic_vlan_pool.sent.fvnsVlanInstP.attributes.name == nm_add_dynamic_vlan_pool.sent.fvnsVlanInstP.attributes.name == 'anstest'
+ - cm_add_dynamic_vlan_pool.proposed.fvnsVlanInstP.attributes.allocMode == nm_add_dynamic_vlan_pool.proposed.fvnsVlanInstP.attributes.allocMode == 'dynamic'
+ - cm_add_dynamic_vlan_pool.proposed.fvnsVlanInstP.attributes.name == nm_add_dynamic_vlan_pool.proposed.fvnsVlanInstP.attributes.name == 'anstest'
+ - cm_add_dynamic_vlan_pool.previous == nm_add_dynamic_vlan_pool.previous == []
+ # NOTE: We cannot fix this easily
+ - cm_add_dynamic_vlan_pool.current == []
+ - nm_add_dynamic_vlan_pool.current.0.fvnsVlanInstP.attributes.allocMode == 'dynamic'
+ - nm_add_dynamic_vlan_pool.current.0.fvnsVlanInstP.attributes.descr == ''
+ - nm_add_dynamic_vlan_pool.current.0.fvnsVlanInstP.attributes.dn == 'uni/infra/vlanns-[anstest]-dynamic'
+ - nm_add_dynamic_vlan_pool.current.0.fvnsVlanInstP.attributes.name == 'anstest'
+
+- name: Add dynamic_vlan_pool again (check_mode)
+ cisco.aci.aci_vlan_pool: *dynamic_vlan_pool_present
+ check_mode: yes
+ register: cm_add_dynamic_vlan_pool_again
+
+- name: Add dynamic vlan pool again (normal mode)
+ cisco.aci.aci_vlan_pool: *dynamic_vlan_pool_present
+ register: nm_add_dynamic_vlan_pool_again
+
+- name: Verify add_dynamic_vlan_pool_again
+ assert:
+ that:
+ - cm_add_dynamic_vlan_pool_again is not changed
+ - nm_add_dynamic_vlan_pool_again is not changed
+ - cm_add_dynamic_vlan_pool_again.current == nm_add_dynamic_vlan_pool_again.current == nm_add_dynamic_vlan_pool.current
+
+
+# CHANGE VLAN POOL
+- name: Change description of dynamic vlan pool (check_mode)
+ cisco.aci.aci_vlan_pool:
+ <<: *dynamic_vlan_pool_present
+ description: Ansible test dynamic vlan pool
+ check_mode: yes
+ register: cm_add_dynamic_vlan_pool_descr
+
+- name: Change description of dynamic vlan pool (normal mode)
+ cisco.aci.aci_vlan_pool:
+ <<: *dynamic_vlan_pool_present
+ description: Ansible test dynamic vlan pool
+ register: nm_add_dynamic_vlan_pool_descr
+
+- name: Verify add_dynamic_vlan_pool_descr
+ assert:
+ that:
+ - cm_add_dynamic_vlan_pool_descr is changed
+ - nm_add_dynamic_vlan_pool_descr is changed
+ - cm_add_dynamic_vlan_pool_descr.sent.fvnsVlanInstP.attributes.descr == nm_add_dynamic_vlan_pool_descr.sent.fvnsVlanInstP.attributes.descr == 'Ansible test dynamic vlan pool'
+ - cm_add_dynamic_vlan_pool_descr.proposed.fvnsVlanInstP.attributes.allocMode == nm_add_dynamic_vlan_pool_descr.proposed.fvnsVlanInstP.attributes.allocMode == 'dynamic'
+ - cm_add_dynamic_vlan_pool_descr.proposed.fvnsVlanInstP.attributes.descr == nm_add_dynamic_vlan_pool_descr.proposed.fvnsVlanInstP.attributes.descr == 'Ansible test dynamic vlan pool'
+ - cm_add_dynamic_vlan_pool_descr.proposed.fvnsVlanInstP.attributes.name == nm_add_dynamic_vlan_pool_descr.proposed.fvnsVlanInstP.attributes.name == 'anstest'
+ - cm_add_dynamic_vlan_pool_descr.previous == nm_add_dynamic_vlan_pool_descr.previous == cm_add_dynamic_vlan_pool_descr.current == nm_add_dynamic_vlan_pool.current
+ - nm_add_dynamic_vlan_pool_descr.current.0.fvnsVlanInstP.attributes.allocMode == 'dynamic'
+ - nm_add_dynamic_vlan_pool_descr.current.0.fvnsVlanInstP.attributes.descr == 'Ansible test dynamic vlan pool'
+ - nm_add_dynamic_vlan_pool_descr.current.0.fvnsVlanInstP.attributes.dn == 'uni/infra/vlanns-[anstest]-dynamic'
+ - nm_add_dynamic_vlan_pool_descr.current.0.fvnsVlanInstP.attributes.name == 'anstest'
+
+- name: Change description of dynamic vlan pool again (check_mode)
+ cisco.aci.aci_vlan_pool:
+ <<: *dynamic_vlan_pool_present
+ description: Ansible test dynamic vlan pool
+ check_mode: yes
+ register: cm_add_dynamic_vlan_pool_descr_again
+
+- name: Change description of dynamic vlan pool again (normal mode)
+ cisco.aci.aci_vlan_pool:
+ <<: *dynamic_vlan_pool_present
+ description: Ansible test dynamic vlan pool
+ register: nm_add_dynamic_vlan_pool_descr_again
+
+- name: Verify add_dynamic_vlan_pool_descr_again
+ assert:
+ that:
+ - cm_add_dynamic_vlan_pool_descr_again is not changed
+ - nm_add_dynamic_vlan_pool_descr_again is not changed
+ - cm_add_dynamic_vlan_pool_descr_again.current == nm_add_dynamic_vlan_pool_descr_again.current == nm_add_dynamic_vlan_pool_descr.current
+
+
+# ADD VLAN POOL AGAIN
+- name: Add dynamic vlan pool again with no description (check_mode)
+ cisco.aci.aci_vlan_pool: *dynamic_vlan_pool_present
+ check_mode: yes
+ register: cm_add_dynamic_vlan_pool_again_no_descr
+
+- name: Add dynamic vlan pool again with no description (normal mode)
+ cisco.aci.aci_vlan_pool: *dynamic_vlan_pool_present
+ register: nm_add_dynamic_vlan_pool_again_no_descr
+
+- name: Verify add_dynamic_vlan_pool_again_no_descr
+ assert:
+ that:
+ - cm_add_dynamic_vlan_pool_again_no_descr is not changed
+ - nm_add_dynamic_vlan_pool_again_no_descr is not changed
+ - cm_add_dynamic_vlan_pool_again_no_descr.current == nm_add_dynamic_vlan_pool_again_no_descr.current == nm_add_dynamic_vlan_pool_descr.current
+
+
+# QUERY ALL VLAN POOLS
+- name: Query all dynamic vlan pools (check_mode)
+ cisco.aci.aci_vlan_pool: &dynamic_vlan_pool_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_dynamic_vlan_pools
+
+- name: Query all dynamic vlan pools (normal mode)
+ cisco.aci.aci_vlan_pool: *dynamic_vlan_pool_query
+ register: nm_query_all_dynamic_vlan_pools
+
+- name: Verify query_all_dynamic_vlan_pools
+ assert:
+ that:
+ - cm_query_all_dynamic_vlan_pools is not changed
+ - nm_query_all_dynamic_vlan_pools is not changed
+ - cm_query_all_dynamic_vlan_pools == nm_query_all_dynamic_vlan_pools
+ - cm_query_all_dynamic_vlan_pools.current|length >= 1
+
+
+# QUERY A VLAN POOL
+- name: Query our dynamic vlan pool
+ cisco.aci.aci_vlan_pool:
+ <<: *dynamic_vlan_pool_query
+ pool: anstest
+ pool_allocation_mode: dynamic
+ check_mode: yes
+ register: cm_query_dynamic_vlan_pool
+
+- name: Query our dynamic vlan pool
+ cisco.aci.aci_vlan_pool:
+ <<: *dynamic_vlan_pool_query
+ pool: anstest
+ pool_allocation_mode: dynamic
+ register: nm_query_dynamic_vlan_pool
+
+- name: Verify query_dynamic_vlan_pool
+ assert:
+ that:
+ - cm_query_dynamic_vlan_pool is not changed
+ - nm_query_dynamic_vlan_pool is not changed
+ - cm_query_dynamic_vlan_pool == nm_query_dynamic_vlan_pool
+ - nm_query_dynamic_vlan_pool.current.0.fvnsVlanInstP.attributes.allocMode == 'dynamic'
+ - nm_query_dynamic_vlan_pool.current.0.fvnsVlanInstP.attributes.descr == 'Ansible test dynamic vlan pool'
+ - nm_query_dynamic_vlan_pool.current.0.fvnsVlanInstP.attributes.dn == 'uni/infra/vlanns-[anstest]-dynamic'
+ - nm_query_dynamic_vlan_pool.current.0.fvnsVlanInstP.attributes.name == 'anstest'
+
+
+# REMOVE VLAN POOL
+- name: Remove dynamic vlan pool (check_mode)
+ cisco.aci.aci_vlan_pool: *dynamic_vlan_pool_absent
+ check_mode: yes
+ register: cm_remove_dynamic_vlan_pool
+
+- name: Remove dynamic vlan pool (normal mode)
+ cisco.aci.aci_vlan_pool: *dynamic_vlan_pool_absent
+ register: nm_remove_dynamic_vlan_pool
+
+- name: Verify remove_dynamic_vlan_pool
+ assert:
+ that:
+ - cm_remove_dynamic_vlan_pool is changed
+ - nm_remove_dynamic_vlan_pool is changed
+ - cm_remove_dynamic_vlan_pool.current.0.fvnsVlanInstP.attributes.allocMode == cm_remove_dynamic_vlan_pool.previous.0.fvnsVlanInstP.attributes.allocMode == nm_remove_dynamic_vlan_pool.previous.0.fvnsVlanInstP.attributes.allocMode == 'dynamic'
+ - cm_remove_dynamic_vlan_pool.current.0.fvnsVlanInstP.attributes.descr == cm_remove_dynamic_vlan_pool.previous.0.fvnsVlanInstP.attributes.descr == nm_remove_dynamic_vlan_pool.previous.0.fvnsVlanInstP.attributes.descr == 'Ansible test dynamic vlan pool'
+ - cm_remove_dynamic_vlan_pool.current.0.fvnsVlanInstP.attributes.dn == cm_remove_dynamic_vlan_pool.previous.0.fvnsVlanInstP.attributes.dn == nm_remove_dynamic_vlan_pool.previous.0.fvnsVlanInstP.attributes.dn == 'uni/infra/vlanns-[anstest]-dynamic'
+ - cm_remove_dynamic_vlan_pool.current.0.fvnsVlanInstP.attributes.name == cm_remove_dynamic_vlan_pool.previous.0.fvnsVlanInstP.attributes.name == nm_remove_dynamic_vlan_pool.previous.0.fvnsVlanInstP.attributes.name == 'anstest'
+ - nm_remove_dynamic_vlan_pool.current == []
+
+- name: Remove dynamic vlan pool again (check_mode)
+ cisco.aci.aci_vlan_pool: *dynamic_vlan_pool_absent
+ check_mode: yes
+ register: cm_remove_dynamic_vlan_pool_again
+
+- name: Remove dynamic vlan pool again (normal mode)
+ cisco.aci.aci_vlan_pool: *dynamic_vlan_pool_absent
+ register: nm_remove_dynamic_vlan_pool_again
+
+- name: Verify remove_dynamic_vlan_pool_again
+ assert:
+ that:
+ - cm_remove_dynamic_vlan_pool_again is not changed
+ - nm_remove_dynamic_vlan_pool_again is not changed
+ - cm_remove_dynamic_vlan_pool_again.proposed == nm_remove_dynamic_vlan_pool_again.proposed == {}
+ - cm_remove_dynamic_vlan_pool_again.sent == nm_remove_dynamic_vlan_pool_again.sent == {}
+ - cm_remove_dynamic_vlan_pool_again.previous == nm_remove_dynamic_vlan_pool_again.previous == []
+ - cm_remove_dynamic_vlan_pool_again.current == nm_remove_dynamic_vlan_pool_again.current == []
+
+
+# QUERY NON-EXISTING VLAN POOL
+- name: Query non-existing dynamic vlan pool (check_mode)
+ cisco.aci.aci_vlan_pool:
+ <<: *dynamic_vlan_pool_query
+ pool: anstest
+ pool_allocation_mode: dynamic
+ check_mode: yes
+ register: cm_query_non_dynamic_vlan_pool
+
+- name: Query non-existing dynamic vlan pool (normal mode)
+ cisco.aci.aci_vlan_pool:
+ <<: *dynamic_vlan_pool_query
+ pool: anstest
+ pool_allocation_mode: dynamic
+ register: nm_query_non_dynamic_vlan_pool
+
+# TODO: Implement more tests
+- name: Verify query_non_dynamic_vlan_pool
+ assert:
+ that:
+ - cm_query_non_dynamic_vlan_pool is not changed
+ - nm_query_non_dynamic_vlan_pool is not changed
+ - cm_remove_dynamic_vlan_pool_again.previous == nm_remove_dynamic_vlan_pool_again.previous == []
+ - cm_remove_dynamic_vlan_pool_again.current == nm_remove_dynamic_vlan_pool_again.current == []
+
+
+# PROVOKE ERRORS
+- name: Error when required parameter is missing
+ cisco.aci.aci_vlan_pool:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: present
+ ignore_errors: yes
+ register: error_on_missing_required_param
+
+- name: Verify error_on_missing_required_param
+ assert:
+ that:
+ - error_on_missing_required_param is failed
+ - 'error_on_missing_required_param.msg == "state is present but all of the following are missing: pool"'
+
+- name: Error when together parameter is missing
+ cisco.aci.aci_vlan_pool:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ pool: anstest
+ state: present
+ ignore_errors: yes
+ register: error_on_missing_together_param
+
+- name: Verify error_on_missing_together_param
+ assert:
+ that:
+ - error_on_missing_together_param is failed
+ - error_on_missing_together_param.msg == "ACI requires the 'pool_allocation_mode' when 'pool' is provided"
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/tasks/main.yml
new file mode 100644
index 00000000..e19ced38
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/tasks/main.yml
@@ -0,0 +1,15 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- include_tasks: static.yml
+ when: static is not defined or static
+
+- include_tasks: dynamic.yml
+ when: dynamic is not defined or dynamic
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/tasks/static.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/tasks/static.yml
new file mode 100644
index 00000000..9962f095
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool/tasks/static.yml
@@ -0,0 +1,303 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+# CLEAN ENVIRONMENT
+- name: Remove static vlan pool
+ cisco.aci.aci_vlan_pool: &static_vlan_pool_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ pool: anstest
+ pool_allocation_mode: static
+ state: absent
+
+
+# ADD VLAN POOL
+- name: Add static vlan pool (check_mode)
+ cisco.aci.aci_vlan_pool: &static_vlan_pool_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ pool: anstest
+ pool_allocation_mode: static
+ state: present
+ check_mode: yes
+ register: cm_add_static_vlan_pool
+
+- name: Add static vlan pool (normal mode)
+ cisco.aci.aci_vlan_pool: *static_vlan_pool_present
+ register: nm_add_static_vlan_pool
+
+- name: Verify add_static_vlan_pool
+ assert:
+ that:
+ - cm_add_static_vlan_pool is changed
+ - nm_add_static_vlan_pool is changed
+ - cm_add_static_vlan_pool.sent.fvnsVlanInstP.attributes.allocMode == nm_add_static_vlan_pool.sent.fvnsVlanInstP.attributes.allocMode == 'static'
+ - cm_add_static_vlan_pool.sent.fvnsVlanInstP.attributes.name == nm_add_static_vlan_pool.sent.fvnsVlanInstP.attributes.name == 'anstest'
+ - cm_add_static_vlan_pool.proposed.fvnsVlanInstP.attributes.allocMode == nm_add_static_vlan_pool.proposed.fvnsVlanInstP.attributes.allocMode == 'static'
+ - cm_add_static_vlan_pool.proposed.fvnsVlanInstP.attributes.name == nm_add_static_vlan_pool.proposed.fvnsVlanInstP.attributes.name == 'anstest'
+ - cm_add_static_vlan_pool.previous == nm_add_static_vlan_pool.previous == []
+ # NOTE: We cannot fix this easily
+ - cm_add_static_vlan_pool.current == []
+ - nm_add_static_vlan_pool.current.0.fvnsVlanInstP.attributes.allocMode == 'static'
+ - nm_add_static_vlan_pool.current.0.fvnsVlanInstP.attributes.descr == ''
+ - nm_add_static_vlan_pool.current.0.fvnsVlanInstP.attributes.dn == 'uni/infra/vlanns-[anstest]-static'
+ - nm_add_static_vlan_pool.current.0.fvnsVlanInstP.attributes.name == 'anstest'
+
+- name: Add static_vlan_pool again (check_mode)
+ cisco.aci.aci_vlan_pool: *static_vlan_pool_present
+ check_mode: yes
+ register: cm_add_static_vlan_pool_again
+
+- name: Add static vlan pool again (normal mode)
+ cisco.aci.aci_vlan_pool: *static_vlan_pool_present
+ register: nm_add_static_vlan_pool_again
+
+- name: Verify add_static_vlan_pool_again
+ assert:
+ that:
+ - cm_add_static_vlan_pool_again is not changed
+ - nm_add_static_vlan_pool_again is not changed
+ - cm_add_static_vlan_pool_again.current == nm_add_static_vlan_pool_again.current == nm_add_static_vlan_pool.current
+
+
+# CHANGE VLAN POOL
+- name: Change description of static vlan pool (check_mode)
+ cisco.aci.aci_vlan_pool:
+ <<: *static_vlan_pool_present
+ description: Ansible test static vlan pool
+ check_mode: yes
+ register: cm_add_static_vlan_pool_descr
+
+- name: Change description of static vlan pool (normal mode)
+ cisco.aci.aci_vlan_pool:
+ <<: *static_vlan_pool_present
+ description: Ansible test static vlan pool
+ register: nm_add_static_vlan_pool_descr
+
+- name: Verify add_static_vlan_pool_descr
+ assert:
+ that:
+ - cm_add_static_vlan_pool_descr is changed
+ - nm_add_static_vlan_pool_descr is changed
+ - cm_add_static_vlan_pool_descr.sent.fvnsVlanInstP.attributes.descr == nm_add_static_vlan_pool_descr.sent.fvnsVlanInstP.attributes.descr == 'Ansible test static vlan pool'
+ - cm_add_static_vlan_pool_descr.proposed.fvnsVlanInstP.attributes.allocMode == nm_add_static_vlan_pool_descr.proposed.fvnsVlanInstP.attributes.allocMode == 'static'
+ - cm_add_static_vlan_pool_descr.proposed.fvnsVlanInstP.attributes.descr == nm_add_static_vlan_pool_descr.proposed.fvnsVlanInstP.attributes.descr == 'Ansible test static vlan pool'
+ - cm_add_static_vlan_pool_descr.proposed.fvnsVlanInstP.attributes.name == nm_add_static_vlan_pool_descr.proposed.fvnsVlanInstP.attributes.name == 'anstest'
+ - cm_add_static_vlan_pool_descr.previous == nm_add_static_vlan_pool_descr.previous == cm_add_static_vlan_pool_descr.current == nm_add_static_vlan_pool.current
+ - nm_add_static_vlan_pool_descr.current.0.fvnsVlanInstP.attributes.allocMode == 'static'
+ - nm_add_static_vlan_pool_descr.current.0.fvnsVlanInstP.attributes.descr == 'Ansible test static vlan pool'
+ - nm_add_static_vlan_pool_descr.current.0.fvnsVlanInstP.attributes.dn == 'uni/infra/vlanns-[anstest]-static'
+ - nm_add_static_vlan_pool_descr.current.0.fvnsVlanInstP.attributes.name == 'anstest'
+
+- name: Change description of static vlan pool again (check_mode)
+ cisco.aci.aci_vlan_pool:
+ <<: *static_vlan_pool_present
+ description: Ansible test static vlan pool
+ check_mode: yes
+ register: cm_add_static_vlan_pool_descr_again
+
+- name: Change description of static vlan pool again (normal mode)
+ cisco.aci.aci_vlan_pool:
+ <<: *static_vlan_pool_present
+ description: Ansible test static vlan pool
+ register: nm_add_static_vlan_pool_descr_again
+
+- name: Verify add_static_vlan_pool_descr_again
+ assert:
+ that:
+ - cm_add_static_vlan_pool_descr_again is not changed
+ - nm_add_static_vlan_pool_descr_again is not changed
+ - cm_add_static_vlan_pool_descr_again.current == nm_add_static_vlan_pool_descr_again.current == nm_add_static_vlan_pool_descr.current
+
+
+# ADD VLAN POOL AGAIN
+- name: Add static vlan pool again with no description (check_mode)
+ cisco.aci.aci_vlan_pool: *static_vlan_pool_present
+ check_mode: yes
+ register: cm_add_static_vlan_pool_again_no_descr
+
+- name: Add static vlan pool again with no description (normal mode)
+ cisco.aci.aci_vlan_pool: *static_vlan_pool_present
+ register: nm_add_static_vlan_pool_again_no_descr
+
+- name: Verify add_static_vlan_pool_again_no_descr
+ assert:
+ that:
+ - cm_add_static_vlan_pool_again_no_descr is not changed
+ - nm_add_static_vlan_pool_again_no_descr is not changed
+ - cm_add_static_vlan_pool_again_no_descr.current == nm_add_static_vlan_pool_again_no_descr.current == nm_add_static_vlan_pool_descr.current
+
+
+# QUERY ALL VLAN POOLS
+- name: Query all static vlan pools (check_mode)
+ cisco.aci.aci_vlan_pool: &static_vlan_pool_query
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_static_vlan_pools
+
+- name: Query all static vlan pools (normal mode)
+ cisco.aci.aci_vlan_pool: *static_vlan_pool_query
+ register: nm_query_all_static_vlan_pools
+
+- name: Verify query_all_static_vlan_pools
+ assert:
+ that:
+ - cm_query_all_static_vlan_pools is not changed
+ - nm_query_all_static_vlan_pools is not changed
+ - cm_query_all_static_vlan_pools == nm_query_all_static_vlan_pools
+ - cm_query_all_static_vlan_pools.current|length >= 1
+
+
+# QUERY A VLAN POOL
+- name: Query our static vlan pool
+ cisco.aci.aci_vlan_pool:
+ <<: *static_vlan_pool_query
+ pool: anstest
+ pool_allocation_mode: static
+ check_mode: yes
+ register: cm_query_static_vlan_pool
+
+- name: Query our static vlan pool
+ cisco.aci.aci_vlan_pool:
+ <<: *static_vlan_pool_query
+ pool: anstest
+ pool_allocation_mode: static
+ register: nm_query_static_vlan_pool
+
+- name: Verify query_static_vlan_pool
+ assert:
+ that:
+ - cm_query_static_vlan_pool is not changed
+ - nm_query_static_vlan_pool is not changed
+ - cm_query_static_vlan_pool == nm_query_static_vlan_pool
+ - nm_query_static_vlan_pool.current.0.fvnsVlanInstP.attributes.allocMode == 'static'
+ - nm_query_static_vlan_pool.current.0.fvnsVlanInstP.attributes.descr == 'Ansible test static vlan pool'
+ - nm_query_static_vlan_pool.current.0.fvnsVlanInstP.attributes.dn == 'uni/infra/vlanns-[anstest]-static'
+ - nm_query_static_vlan_pool.current.0.fvnsVlanInstP.attributes.name == 'anstest'
+
+
+# REMOVE VLAN POOL
+- name: Remove static vlan pool (check_mode)
+ cisco.aci.aci_vlan_pool: *static_vlan_pool_absent
+ check_mode: yes
+ register: cm_remove_static_vlan_pool
+
+- name: Remove static vlan pool (normal mode)
+ cisco.aci.aci_vlan_pool: *static_vlan_pool_absent
+ register: nm_remove_static_vlan_pool
+
+- name: Verify remove_static_vlan_pool
+ assert:
+ that:
+ - cm_remove_static_vlan_pool is changed
+ - nm_remove_static_vlan_pool is changed
+ - cm_remove_static_vlan_pool.current.0.fvnsVlanInstP.attributes.allocMode == cm_remove_static_vlan_pool.previous.0.fvnsVlanInstP.attributes.allocMode == nm_remove_static_vlan_pool.previous.0.fvnsVlanInstP.attributes.allocMode == 'static'
+ - cm_remove_static_vlan_pool.current.0.fvnsVlanInstP.attributes.descr == cm_remove_static_vlan_pool.previous.0.fvnsVlanInstP.attributes.descr == nm_remove_static_vlan_pool.previous.0.fvnsVlanInstP.attributes.descr == 'Ansible test static vlan pool'
+ - cm_remove_static_vlan_pool.current.0.fvnsVlanInstP.attributes.dn == cm_remove_static_vlan_pool.previous.0.fvnsVlanInstP.attributes.dn == nm_remove_static_vlan_pool.previous.0.fvnsVlanInstP.attributes.dn == 'uni/infra/vlanns-[anstest]-static'
+ - cm_remove_static_vlan_pool.current.0.fvnsVlanInstP.attributes.name == cm_remove_static_vlan_pool.previous.0.fvnsVlanInstP.attributes.name == nm_remove_static_vlan_pool.previous.0.fvnsVlanInstP.attributes.name == 'anstest'
+ - nm_remove_static_vlan_pool.current == []
+
+- name: Remove static vlan pool again (check_mode)
+ cisco.aci.aci_vlan_pool: *static_vlan_pool_absent
+ check_mode: yes
+ register: cm_remove_static_vlan_pool_again
+
+- name: Remove static vlan pool again (normal mode)
+ cisco.aci.aci_vlan_pool: *static_vlan_pool_absent
+ register: nm_remove_static_vlan_pool_again
+
+- name: Verify remove_static_vlan_pool_again
+ assert:
+ that:
+ - cm_remove_static_vlan_pool_again is not changed
+ - nm_remove_static_vlan_pool_again is not changed
+ - cm_remove_static_vlan_pool_again.proposed == nm_remove_static_vlan_pool_again.proposed == {}
+ - cm_remove_static_vlan_pool_again.sent == nm_remove_static_vlan_pool_again.sent == {}
+ - cm_remove_static_vlan_pool_again.previous == nm_remove_static_vlan_pool_again.previous == []
+ - cm_remove_static_vlan_pool_again.current == nm_remove_static_vlan_pool_again.current == []
+
+
+# QUERY NON-EXISTING VLAN POOL
+- name: Query non-existing static vlan pool (check_mode)
+ cisco.aci.aci_vlan_pool:
+ <<: *static_vlan_pool_query
+ pool: anstest
+ pool_allocation_mode: static
+ check_mode: yes
+ register: cm_query_non_static_vlan_pool
+
+- name: Query non-existing static vlan pool (normal mode)
+ cisco.aci.aci_vlan_pool:
+ <<: *static_vlan_pool_query
+ pool: anstest
+ pool_allocation_mode: static
+ register: nm_query_non_static_vlan_pool
+
+# TODO: Implement more tests
+- name: Verify query_non_static_vlan_pool
+ assert:
+ that:
+ - cm_query_non_static_vlan_pool is not changed
+ - nm_query_non_static_vlan_pool is not changed
+ - cm_remove_static_vlan_pool_again.previous == nm_remove_static_vlan_pool_again.previous == []
+ - cm_remove_static_vlan_pool_again.current == nm_remove_static_vlan_pool_again.current == []
+
+
+# PROVOKE ERRORS
+- name: Error when required parameter is missing
+ cisco.aci.aci_vlan_pool:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: present
+ ignore_errors: yes
+ register: error_on_missing_required_param
+
+- name: Verify error_on_missing_required_param
+ assert:
+ that:
+ - error_on_missing_required_param is failed
+ - 'error_on_missing_required_param.msg == "state is present but all of the following are missing: pool"'
+
+- name: Error when together parameter is missing
+ cisco.aci.aci_vlan_pool:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ pool: anstest
+ state: present
+ ignore_errors: yes
+ register: error_on_missing_together_param
+
+- name: Verify error_on_missing_together_param
+ assert:
+ that:
+ - error_on_missing_together_param is failed
+ - error_on_missing_together_param.msg == "ACI requires the 'pool_allocation_mode' when 'pool' is provided"
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool_encap_block/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool_encap_block/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool_encap_block/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool_encap_block/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool_encap_block/tasks/main.yml
new file mode 100644
index 00000000..913882e1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vlan_pool_encap_block/tasks/main.yml
@@ -0,0 +1,384 @@
+# Test code for the ACI modules
+
+# Copyright: (c) 2017, Jacob McGill (jmcgill298)
+# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an aci apic host, aci username and aci password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: Ensure vlan pool exists for tests to kick off
+ cisco.aci.aci_vlan_pool:
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ state: absent
+ pool: anstest
+ allocation_mode: static
+ description: Ansible Test
+
+- name: Ensure vlan pool exists for tests to kick off
+ cisco.aci.aci_vlan_pool: &aci_pool_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: present
+ pool: anstest
+ allocation_mode: static
+ description: Ansible Test
+ register: pool_present
+
+- name: Create vlan pool encap block - check mode works
+ cisco.aci.aci_vlan_pool_encap_block: &aci_encap_block_present
+ <<: *aci_pool_present
+ block_name: anstest
+ block_start: 20
+ block_end: 40
+ pool: anstest
+ pool_allocation_mode: static
+ allocation_mode: inherit
+ description: Ansible Test
+ check_mode: yes
+ register: encap_block_present_check_mode
+
+- name: Present assertions
+ assert:
+ that:
+ - encap_block_present_check_mode is changed
+ - encap_block_present_check_mode.sent.fvnsEncapBlk.attributes.allocMode == 'inherit'
+ - encap_block_present_check_mode.sent.fvnsEncapBlk.attributes.descr == 'Ansible Test'
+ - encap_block_present_check_mode.sent.fvnsEncapBlk.attributes.from == 'vlan-20'
+ - encap_block_present_check_mode.sent.fvnsEncapBlk.attributes.to == 'vlan-40'
+ - encap_block_present_check_mode.sent.fvnsEncapBlk.attributes.name == 'anstest'
+
+- name: Create vlan pool encap_block - creation works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_present
+ register: encap_block_present
+
+- name: Present assertions
+ assert:
+ that:
+ - encap_block_present is changed
+ - encap_block_present.previous == []
+ - encap_block_present.sent == encap_block_present_check_mode.sent
+ - encap_block_present.sent == encap_block_present.proposed
+
+- name: Create vlan pool range - idempotency works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_present
+ register: encap_block_present_idempotent
+
+- name: Present assertions
+ assert:
+ that:
+ - encap_block_present_idempotent is not changed
+ - encap_block_present_idempotent.previous.0.fvnsEncapBlk.attributes.name == "anstest"
+
+- name: Update vlan pool range - update works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_present
+ description: Ansible Test Update
+ allocation_mode: inherit
+ register: encap_block_present_update
+
+- name: Present assertions
+ assert:
+ that:
+ - encap_block_present_update is changed
+ - encap_block_present_update.previous != []
+ - encap_block_present_update.sent != encap_block_present.sent
+
+- name: Create vlan pool range - used for query
+ cisco.aci.aci_vlan_pool_encap_block: &aci_encap_block_present_2
+ <<: *aci_encap_block_present
+ block_name: anstest_2
+ block_start: 50
+ block_end: 55
+ register: encap_block_present_2
+
+- name: Present assertions
+ assert:
+ that:
+ - encap_block_present_2 is changed
+ - encap_block_present_2.previous == []
+
+- name: Invalid encap_block_start - error message works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_present
+ block_start: 0
+ ignore_errors: yes
+ register: encap_block_start_low
+
+- name: Present assertions
+ assert:
+ that:
+ - encap_block_start_low is failed
+ - encap_block_start_low.msg == "vlan pools must have 'block_start' and 'block_end' values between 1 and 4094"
+
+- name: Invalid encap_block_start - error message works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_present
+ block_start: 4096
+ ignore_errors: yes
+ register: encap_block_start_high
+
+- name: Present assertions
+ assert:
+ that:
+ - encap_block_start_high is failed
+ - encap_block_start_high.msg == "vlan pools must have 'block_start' and 'block_end' values between 1 and 4094"
+
+- name: Invalid encap_block_end - error message works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_present
+ block_end: 0
+ ignore_errors: yes
+ register: encap_block_end_low
+
+- name: Present assertions
+ assert:
+ that:
+ - encap_block_end_low is failed
+ - encap_block_end_low.msg == "vlan pools must have 'block_start' and 'block_end' values between 1 and 4094"
+
+- name: Invalid encap_block_end - error message works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_present
+ block_end: 4096
+ ignore_errors: yes
+ register: encap_block_end_high
+
+- name: Present assertions
+ assert:
+ that:
+ - encap_block_end_high is failed
+ - encap_block_end_high.msg == "vlan pools must have 'block_start' and 'block_end' values between 1 and 4094"
+
+- name: Range start higher than range end - error message works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_present
+ block_start: 1000
+ ignore_errors: yes
+ register: encap_block_start_end
+
+- name: Present assertions
+ assert:
+ that:
+ - encap_block_start_end is failed
+ - encap_block_start_end.msg == "The 'block_start' must be less than or equal to the 'block_end'"
+
+- name: Missing required param - error message works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_pool_present
+ ignore_errors: yes
+ register: encap_block_present_missing_param
+
+- name: Present assertions
+ assert:
+ that:
+ - encap_block_present_missing_param is failed
+ - 'encap_block_present_missing_param.msg == "state is present but all of the following are missing: block_end, block_name, block_start"'
+
+- name: Missing required param - error message works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_present
+ pool_allocation_mode: "{{ fake_var | default(omit) }}"
+ ignore_errors: yes
+ register: encap_block_present_allocation
+
+- name: Present assertions
+ assert:
+ that:
+ - encap_block_present_allocation is failed
+ - encap_block_present_allocation.msg == "ACI requires the 'pool_allocation_mode' when 'pool' is provided"
+
+- name: Query specific vlan pool range
+ cisco.aci.aci_vlan_pool_encap_block: &aci_encap_block_query
+ <<: *aci_encap_block_present
+ state: query
+ register: encap_block_query
+
+- name: Query assertions
+ assert:
+ that:
+ - encap_block_query is not changed
+ - encap_block_query.url.endswith("infra/vlanns-[anstest]-static/from-[vlan-20]-to-[vlan-40].json")
+ - encap_block_query.current | length == 1
+ - encap_block_query.current.0.fvnsEncapBlk.attributes.name == "anstest"
+
+- name: Query vlan pool range - from, to, and name are filtered
+ cisco.aci.aci_vlan_pool_encap_block: &aci_encap_block_query_filter
+ <<: *aci_encap_block_query
+ pool: "{{ fake_var | default(omit) }}"
+ register: encap_block_query_from_to_name
+
+- name: Query assertions
+ assert:
+ that:
+ - encap_block_query_from_to_name is not changed
+ - encap_block_query_from_to_name.url.endswith("class/fvnsEncapBlk.json")
+ - '"eq(fvnsEncapBlk.from,\"vlan-20\")" in encap_block_query_from_to_name.filter_string'
+ - '"eq(fvnsEncapBlk.name,\"anstest\")" in encap_block_query_from_to_name.filter_string'
+ - '"eq(fvnsEncapBlk.to,\"vlan-40\")" in encap_block_query_from_to_name.filter_string'
+ - encap_block_query_from_to_name.current.0.fvnsEncapBlk.attributes.name == "anstest"
+ - encap_block_query_from_to_name.current.0.fvnsEncapBlk.attributes.from == "vlan-20"
+ - encap_block_query_from_to_name.current.0.fvnsEncapBlk.attributes.to == "vlan-40"
+
+- name: Query vlan pool range - from and name are filtered
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_query_filter
+ block_end: "{{ fake_var | default(omit) }}"
+ register: encap_block_query_from_name
+
+- name: Query assertions
+ assert:
+ that:
+ - encap_block_query_from_name is not changed
+ - encap_block_query_from_name.url.endswith("class/fvnsEncapBlk.json")
+ - '"eq(fvnsEncapBlk.from,\"vlan-20\")" in encap_block_query_from_name.filter_string'
+ - '"eq(fvnsEncapBlk.name,\"anstest\")" in encap_block_query_from_name.filter_string'
+ - encap_block_query_from_name.current.0.fvnsEncapBlk.attributes.name == "anstest"
+ - encap_block_query_from_name.current.0.fvnsEncapBlk.attributes.from == "vlan-20"
+
+- name: Query vlan pool range - to and name are filtered
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_query_filter
+ block_start: "{{ fake_var | default(omit) }}"
+ register: encap_block_query_to_name
+
+- name: Query assertions
+ assert:
+ that:
+ - encap_block_query_to_name is not changed
+ - encap_block_query_to_name.url.endswith("class/fvnsEncapBlk.json")
+ - '"eq(fvnsEncapBlk.name,\"anstest\")" in encap_block_query_to_name.filter_string'
+ - '"eq(fvnsEncapBlk.to,\"vlan-40\")" in encap_block_query_to_name.filter_string'
+ - encap_block_query_to_name.current.0.fvnsEncapBlk.attributes.name == "anstest"
+ - encap_block_query_to_name.current.0.fvnsEncapBlk.attributes.to == "vlan-40"
+
+- name: Query vlan pool range - name is filtered
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_query_filter
+ block_start: "{{ fake_var | default(omit) }}"
+ block_end: "{{ fake_var | default(omit) }}"
+ register: encap_block_query_name
+
+- name: Query assertions
+ assert:
+ that:
+ - encap_block_query_name is not changed
+ - encap_block_query_name.url.endswith("class/fvnsEncapBlk.json")
+ - '"eq(fvnsEncapBlk.name,\"anstest\")" in encap_block_query_name.filter_string'
+ - encap_block_query_name.current.0.fvnsEncapBlk.attributes.name == "anstest"
+
+- name: Query vlan pool range - from and to are filtered
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_query_filter
+ block_name: "{{ fake_var | default(omit) }}"
+ register: encap_block_query_from_to
+
+- name: Query assertions
+ assert:
+ that:
+ - encap_block_query_from_to is not changed
+ - encap_block_query_from_to.url.endswith("class/fvnsEncapBlk.json")
+ - '"eq(fvnsEncapBlk.from,\"vlan-20\")" in encap_block_query_from_to.filter_string'
+ - '"eq(fvnsEncapBlk.to,\"vlan-40\")" in encap_block_query_from_to.filter_string'
+ - encap_block_query_from_to.current.0.fvnsEncapBlk.attributes.from == "vlan-20"
+ - encap_block_query_from_to.current.0.fvnsEncapBlk.attributes.to == "vlan-40"
+
+- name: Query all ranges in a vlan pool
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_pool_present
+ state: query
+ pool_allocation_mode: static
+ register: encap_block_query_pool
+
+- name: Query assertions
+ assert:
+ that:
+ - encap_block_query_pool is not changed
+ - encap_block_query_pool.current | length == 1
+ - encap_block_query_pool.current.0.fvnsVlanInstP.attributes.name == "anstest"
+ - encap_block_query_pool.current.0.fvnsVlanInstP.children | length > 1
+ - encap_block_query_pool.url.endswith("infra/vlanns-[anstest]-static.json")
+
+- name: Query all ranges
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_pool_present
+ state: query
+ pool: "{{ fake_var | default(omit) }}"
+ register: encap_block_query_all
+
+- name: Query assertions
+ assert:
+ that:
+ - encap_block_query_all is not changed
+ - encap_block_query_all.current | length > 1
+ - encap_block_query_all.current.0.fvnsEncapBlk is defined
+ - encap_block_query_all.url.endswith("class/fvnsEncapBlk.json")
+
+- name: Delete vlan pool range - deletion works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_present
+ state: absent
+ register: delete_range
+
+- name: Absent assertions
+ assert:
+ that:
+ - delete_range is changed
+ - delete_range.proposed == {}
+ - delete_range.previous.0.fvnsEncapBlk.attributes.name == "anstest"
+
+- name: Delete vlan pool range - check mode works
+ cisco.aci.aci_vlan_pool_encap_block: &aci_encap_block_absent
+ <<: *aci_encap_block_present_2
+ state: absent
+ check_mode: yes
+ register: delete_check_mode
+
+- name: Absent assertions
+ assert:
+ that:
+ - delete_check_mode is changed
+ - delete_check_mode.previous != []
+
+- name: Delete vlan pool range - deletion works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_absent
+ register: delete_encap_block_2
+
+- name: Absent assertions
+ assert:
+ that:
+ - delete_encap_block_2 is changed
+ - delete_encap_block_2.previous == delete_check_mode.previous
+
+- name: Delete vlan pool range again - idempotency works
+ cisco.aci.aci_vlan_pool_encap_block:
+ <<: *aci_encap_block_absent
+ register: delete_idempotent
+
+- name: Absent assertions
+ assert:
+ that:
+ - delete_idempotent is not changed
+ - delete_idempotent.previous == []
+
+- name: Cleanup vlan pool
+ cisco.aci.aci_vlan_pool:
+ <<: *aci_pool_present
+ state: absent
+ when: pool_present is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vmm_credential/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vmm_credential/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vmm_credential/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vmm_credential/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vmm_credential/tasks/main.yml
new file mode 100644
index 00000000..b76c4563
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vmm_credential/tasks/main.yml
@@ -0,0 +1,12 @@
+# Test code for the ACI modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- include_tasks: vmware.yml
+ when: vmware is not defined or vmware \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vmm_credential/tasks/vmware.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vmm_credential/tasks/vmware.yml
new file mode 100644
index 00000000..c6029acd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vmm_credential/tasks/vmware.yml
@@ -0,0 +1,250 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+# Remove VMM domain
+- name: Remove VMM domain (normal mode)
+ cisco.aci.aci_domain: &domain_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: vmm_dom
+ domain_type: vmm
+ vm_provider: vmware
+ state: absent
+ register: nm_remove_domain
+
+# ADD VMM domain for testing
+- name: Add VMM domain (normal mode)
+ cisco.aci.aci_domain: &domain_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ domain: vmm_dom
+ domain_type: vmm
+ vm_provider: vmware
+ state: present
+ register: nm_add_domain
+
+- name: Verify add_domain
+ assert:
+ that:
+ - nm_add_domain is changed
+
+# REMOVE credential
+- name: Remove credential (check mode)
+ cisco.aci.aci_vmm_credential: &credential_absent
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ name: vmm_cred
+ description: my_new_cred
+ domain: vmm_dom
+ credential_username: myUsername
+ credential_password: mySecretPassword
+ vm_provider: vmware
+ state: absent
+ check_mode: yes
+ register: cm_remove_credential
+
+- name: Remove vmware VMM credential (normal mode)
+ cisco.aci.aci_vmm_credential: *credential_absent
+ register: nm_remove_credential
+
+- name: Verify remove_credential
+ assert:
+ that:
+ - cm_remove_credential is not changed
+ - nm_remove_credential is not changed
+
+# ADD credential
+- name: Add vmware VMM credential (check mode)
+ cisco.aci.aci_vmm_credential: &credential_present
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ name: vmm_cred
+ description: my_new_cred
+ domain: vmm_dom
+ credential_username: myUsername
+ credential_password: mySecretPassword
+ vm_provider: vmware
+ state: present
+ check_mode: yes
+ register: cm_add_credential
+
+# NOTE: Setting password is not idempotent
+- name: Add vmware VMM credential (normal mode)
+ cisco.aci.aci_vmm_credential: *credential_present
+ register: nm_add_credential
+
+# NOTE: Setting password is not idempotent
+- name: Add vmware VMM credential again (check mode)
+ cisco.aci.aci_vmm_credential: *credential_present
+ check_mode: yes
+ register: cm_add_credential_again
+
+- name: Verify add_credential
+ assert:
+ that:
+ - cm_add_credential is changed
+ - nm_add_credential is changed
+ - cm_add_credential.sent.vmmUsrAccP.attributes.descr == nm_add_credential.sent.vmmUsrAccP.attributes.descr == 'my_new_cred'
+ - cm_add_credential.sent.vmmUsrAccP.attributes.name == nm_add_credential.sent.vmmUsrAccP.attributes.name == 'vmm_cred'
+ - cm_add_credential.sent.vmmUsrAccP.attributes.pwd == nm_add_credential.sent.vmmUsrAccP.attributes.pwd == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
+ - cm_add_credential.sent.vmmUsrAccP.attributes.usr == nm_add_credential.sent.vmmUsrAccP.attributes.usr == 'myUsername'
+ - cm_add_credential.proposed.vmmUsrAccP.attributes.descr == nm_add_credential.proposed.vmmUsrAccP.attributes.descr == 'my_new_cred'
+ - cm_add_credential.proposed.vmmUsrAccP.attributes.name == nm_add_credential.proposed.vmmUsrAccP.attributes.name == 'vmm_cred'
+ - cm_add_credential.proposed.vmmUsrAccP.attributes.pwd == nm_add_credential.proposed.vmmUsrAccP.attributes.pwd == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
+ - cm_add_credential.proposed.vmmUsrAccP.attributes.usr == nm_add_credential.proposed.vmmUsrAccP.attributes.usr == 'myUsername'
+ - cm_add_credential.current == cm_add_credential.previous == nm_add_credential.previous == []
+ - nm_add_credential.current.0.vmmUsrAccP.attributes.dn == 'uni/vmmp-VMware/dom-vmm_dom/usracc-vmm_cred'
+ - nm_add_credential.current.0.vmmUsrAccP.attributes.name == 'vmm_cred'
+
+# MODIFY credential
+- name: Modify vmware VMM credential (check mode)
+ cisco.aci.aci_vmm_credential: &credential_mod
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ name: vmm_cred
+ description: my_updated_descr
+ domain: vmm_dom
+ credential_username: myNewUsername
+ credential_password: myNewSecretPassword
+ vm_provider: vmware
+ state: present
+ check_mode: yes
+ register: cm_mod_credential
+
+- name: Modify vmware VMM credential (normal mode)
+ cisco.aci.aci_vmm_credential: *credential_mod
+ register: nm_mod_credential
+
+- name: Verify mod_credential
+ assert:
+ that:
+ - cm_mod_credential is changed
+ - nm_mod_credential is changed
+ - cm_mod_credential.sent.vmmUsrAccP.attributes.descr == nm_mod_credential.sent.vmmUsrAccP.attributes.descr == 'my_updated_descr'
+ - cm_mod_credential.sent.vmmUsrAccP.attributes.pwd == nm_mod_credential.sent.vmmUsrAccP.attributes.pwd == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
+ - cm_mod_credential.sent.vmmUsrAccP.attributes.usr == nm_mod_credential.sent.vmmUsrAccP.attributes.usr == 'myNewUsername'
+ - cm_mod_credential.proposed.vmmUsrAccP.attributes.descr == nm_mod_credential.proposed.vmmUsrAccP.attributes.descr == 'my_updated_descr'
+ - cm_mod_credential.proposed.vmmUsrAccP.attributes.name == nm_mod_credential.proposed.vmmUsrAccP.attributes.name == 'vmm_cred'
+ - cm_mod_credential.proposed.vmmUsrAccP.attributes.pwd == nm_mod_credential.proposed.vmmUsrAccP.attributes.pwd == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
+ - cm_mod_credential.proposed.vmmUsrAccP.attributes.usr == nm_mod_credential.proposed.vmmUsrAccP.attributes.usr == 'myNewUsername'
+ - nm_mod_credential.current.0.vmmUsrAccP.attributes.dn == 'uni/vmmp-VMware/dom-vmm_dom/usracc-vmm_cred'
+ - nm_mod_credential.current.0.vmmUsrAccP.attributes.name == 'vmm_cred'
+
+- name: Query existing vmware VMM credential (check mode)
+ cisco.aci.aci_vmm_credential: &query_existing_cred
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ name: vmm_cred
+ domain: vmm_dom
+ vm_provider: vmware
+ state: query
+ check_mode: yes
+ register: cm_query_credential
+
+- name: Query existing vmware VMM credential (normal mode)
+ cisco.aci.aci_vmm_credential: *query_existing_cred
+ register: nm_query_credential
+
+- name: Query non-existent vmware VMM credential
+ cisco.aci.aci_vmm_credential:
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ name: vmm_fake_cred
+ domain: vmm_dom
+ vm_provider: vmware
+ state: query
+ register: nm_query_fake_credential
+
+- name: Query all vmware VMM credentials (check mode)
+ cisco.aci.aci_vmm_credential: &query_all_creds
+ host: '{{ aci_hostname }}'
+ username: '{{ aci_username }}'
+ password: '{{ aci_password }}'
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: '{{ aci_output_level | default("info") }}'
+ vm_provider: vmware
+ state: query
+ check_mode: yes
+ register: cm_query_all_credential
+
+- name: Query all vmware VMM credentials (normal mode)
+ cisco.aci.aci_vmm_credential: *query_all_creds
+ register: nm_query_all_credential
+
+- name: Verify query_credential
+ assert:
+ that:
+ - cm_query_credential is not changed
+ - nm_query_credential is not changed
+ - nm_query_fake_credential is not changed
+ - cm_query_all_credential is not changed
+ - nm_query_all_credential is not changed
+ - cm_query_credential.current.0.vmmUsrAccP.attributes.name == 'vmm_cred'
+ - nm_query_credential.current.0.vmmUsrAccP.attributes.name == 'vmm_cred'
+ - nm_query_fake_credential.current == []
+ - cm_query_all_credential.current.0.vmmUsrAccP.attributes.name == 'vmm_cred'
+ - nm_query_all_credential.current.0.vmmUsrAccP.attributes.name == 'vmm_cred'
+
+- name: Remove credential (check_mode)
+ cisco.aci.aci_vmm_credential: *credential_absent
+ check_mode: yes
+ register: cm_remove_credential_again
+
+- name: Remove credential (normal_mode)
+ cisco.aci.aci_vmm_credential: *credential_absent
+ register: nm_remove_credential_again
+
+- name: Remove credential (normal_mode)
+ cisco.aci.aci_vmm_credential: *credential_absent
+ register: nm_remove_credential_final
+
+- name: Verify remove_credential
+ assert:
+ that:
+ - cm_remove_credential_again is changed
+ - nm_remove_credential_again is changed
+ - nm_remove_credential_final is not changed
+
+# Remove VMM domain after testing
+- name: Remove VMM domain (normal_mode)
+ cisco.aci.aci_domain: *domain_absent
+ register: nm_remove_domain_again \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vrf/aliases b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vrf/aliases
new file mode 100644
index 00000000..209b793f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vrf/aliases
@@ -0,0 +1,2 @@
+# No ACI simulator yet, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vrf/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vrf/tasks/main.yml
new file mode 100644
index 00000000..838bb8c7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/integration/targets/aci_vrf/tasks/main.yml
@@ -0,0 +1,191 @@
+# Test code for the ACI modules
+# Copyright: (c) 2017, Jacob McGill (@jmcgill298)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI APIC host, ACI username and ACI password
+ fail:
+ msg: 'Please define the following variables: aci_hostname, aci_username and aci_password.'
+ when: aci_hostname is not defined or aci_username is not defined or aci_password is not defined
+
+- name: ensure tenant exists for tests to kick off
+ cisco.aci.aci_tenant: &aci_tenant_present
+ host: "{{ aci_hostname }}"
+ username: "{{ aci_username }}"
+ password: "{{ aci_password }}"
+ validate_certs: '{{ aci_validate_certs | default(false) }}'
+ use_ssl: '{{ aci_use_ssl | default(true) }}'
+ use_proxy: '{{ aci_use_proxy | default(true) }}'
+ output_level: debug
+ state: present
+ tenant: anstest
+ register: tenant_present
+
+- name: ensure vrf does not exist yet for tests to kick off
+ cisco.aci.aci_vrf:
+ <<: *aci_tenant_present
+ vrf: "{{ item }}"
+ state: absent
+ with_items:
+ - anstest
+ - anstest2
+
+- name: create vrf - check mode works
+ cisco.aci.aci_vrf: &aci_vrf_present
+ <<: *aci_tenant_present
+ vrf: anstest
+ description: Ansible Test
+ check_mode: yes
+ register: vrf_present_check_mode
+
+- name: create vrf - creation works
+ cisco.aci.aci_vrf:
+ <<: *aci_vrf_present
+ register: vrf_present
+
+- name: create vrf again - idempotency works
+ cisco.aci.aci_vrf:
+ <<: *aci_vrf_present
+ register: vrf_present_idempotent
+
+- name: update vrf - update works
+ cisco.aci.aci_vrf:
+ <<: *aci_vrf_present
+ description: Ansible Test Update
+ policy_control_preference: unenforced
+ register: vrf_update
+
+- name: create another vrf - check more params
+ cisco.aci.aci_vrf:
+ <<: *aci_vrf_present
+ vrf: anstest2
+ policy_control_direction: egress
+ preferred_group: enabled
+ match_type: all
+ register: vrf_present_2
+
+- name: create vrf without all necessary params - failure message works
+ cisco.aci.aci_vrf:
+ <<: *aci_vrf_present
+ tenant: "{{ fake_var | default(omit) }}"
+ ignore_errors: yes
+ register: vrf_present_missing_param
+
+- name: present asserts
+ assert:
+ that:
+ - vrf_present_check_mode is changed
+ - vrf_present_check_mode.sent.fvCtx.attributes.descr == 'Ansible Test'
+ - vrf_present_check_mode.sent.fvCtx.attributes.name == 'anstest'
+ - vrf_present is changed
+ - vrf_present.sent == vrf_present_check_mode.sent
+ - vrf_present.previous == []
+ - vrf_present_idempotent is not changed
+ - vrf_present_idempotent.previous != []
+ - vrf_update is changed
+ - vrf_update.previous != []
+ - vrf_update.sent != vrf_update.proposed
+ - vrf_update.sent.fvCtx.attributes.descr == 'Ansible Test Update'
+ - vrf_update.sent.fvCtx.attributes.pcEnfPref == 'unenforced'
+ - vrf_present_2.sent.fvCtx.attributes.name == 'anstest2'
+ - vrf_present_2.sent.fvCtx.attributes.pcEnfDir == 'egress'
+ - vrf_present_2.sent.fvCtx.attributes.descr == 'Ansible Test'
+ - vrf_present_2.current.0.fvCtx.children.0.vzAny.attributes.matchT == 'All'
+ - vrf_present_2.current.0.fvCtx.children.0.vzAny.attributes.prefGrMemb == 'enabled'
+ - vrf_present_missing_param is failed
+ - vrf_present_missing_param.msg == 'state is present but all of the following are missing{{":"}} tenant'
+
+- name: get all vrf
+ cisco.aci.aci_vrf: &aci_query
+ <<: *aci_tenant_present
+ state: query
+ tenant: "{{ fake_var | default(omit) }}"
+ register: query_all
+
+- name: get all in tenant
+ cisco.aci.aci_vrf:
+ <<: *aci_query
+ tenant: anstest
+ register: query_tenant
+
+- name: get all with name
+ cisco.aci.aci_vrf:
+ <<: *aci_query
+ vrf: anstest
+ register: query_vrf_vrf
+
+- name: get vrf
+ cisco.aci.aci_vrf:
+ <<: *aci_vrf_present
+ state: query
+ register: query_vrf
+
+- name: query asserts
+ assert:
+ that:
+ - query_all is not changed
+ - query_all.current | length > 1
+ - query_all.current.0.fvCtx is defined
+ - '"class/fvCtx.json" in query_all.url'
+ - query_tenant is not changed
+ - query_tenant.current | length == 1
+ - query_tenant.current.0.fvTenant.children | length == 2
+ - query_tenant.current.0.fvTenant.attributes.name == "anstest"
+ - '"rsp-subtree-class=fvCtx" in query_tenant.filter_string'
+ - '"tn-anstest.json" in query_tenant.url'
+ - query_vrf_vrf is not changed
+ - query_vrf_vrf.current != []
+ - query_vrf_vrf.current.0.fvCtx.attributes.name == "anstest"
+ - '"query-target-filter=eq(fvCtx.name,\"anstest\")" in query_vrf_vrf.filter_string'
+ - '"class/fvCtx.json" in query_vrf_vrf.url'
+ - query_vrf is not changed
+ - query_vrf.current | length == 1
+ - '"tn-anstest/ctx-anstest.json" in query_vrf.url'
+
+- name: delete vrf - check mode works
+ cisco.aci.aci_vrf: &aci_vrf_absent
+ <<: *aci_vrf_present
+ state: absent
+ check_mode: yes
+ register: vrf_absent_check_mode
+
+- name: delete vrf - delete works
+ cisco.aci.aci_vrf:
+ <<: *aci_vrf_absent
+ register: vrf_absent
+
+- name: delete vrf again - idempotency works
+ cisco.aci.aci_vrf:
+ <<: *aci_vrf_absent
+ register: vrf_absent_idempotent
+
+- name: delete vrf - cleanup
+ cisco.aci.aci_vrf:
+ <<: *aci_vrf_absent
+ name: anstest2
+
+- name: delete vrf missing param - fails properly
+ cisco.aci.aci_vrf:
+ <<: *aci_vrf_absent
+ vrf: "{{ fakevar | default(omit) }}"
+ ignore_errors: yes
+ register: vrf_absent_missing_param
+
+- name: asserts for deletion task
+ assert:
+ that:
+ - vrf_absent_check_mode is changed
+ - vrf_absent_check_mode.previous != []
+ - vrf_absent_check_mode.proposed == {}
+ - vrf_absent is changed
+ - vrf_absent.previous == vrf_absent_check_mode.previous
+ - vrf_absent_idempotent is not changed
+ - vrf_absent_idempotent.previous == []
+ - vrf_absent_missing_param is failed
+ - 'vrf_absent_missing_param.msg == "state is absent but all of the following are missing: vrf"'
+
+- name: delete tenant - cleanup before ending tests
+ cisco.aci.aci_tenant:
+ <<: *aci_tenant_present
+ state: absent
+ when: tenant_present is changed \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/sanity/ignore-2.10.txt b/collections-debian-merged/ansible_collections/cisco/aci/tests/sanity/ignore-2.10.txt
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/sanity/ignore-2.10.txt
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/sanity/ignore-2.9.txt b/collections-debian-merged/ansible_collections/cisco/aci/tests/sanity/ignore-2.9.txt
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/sanity/ignore-2.9.txt
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/sanity/requirements.txt b/collections-debian-merged/ansible_collections/cisco/aci/tests/sanity/requirements.txt
new file mode 100644
index 00000000..3e3a9669
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/sanity/requirements.txt
@@ -0,0 +1,4 @@
+packaging # needed for update-bundled and changelog
+sphinx ; python_version >= '3.5' # docs build requires python 3+
+sphinx-notfound-page ; python_version >= '3.5' # docs build requires python 3+
+straight.plugin ; python_version >= '3.5' # needed for hacking/build-ansible.py which will host changelog generation and requires python 3+
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/__init__.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/__init__.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/builtins.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/builtins.py
new file mode 100644
index 00000000..f60ee678
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/builtins.py
@@ -0,0 +1,33 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+#
+# Compat for python2.7
+#
+
+# One unittest needs to import builtins via __import__() so we need to have
+# the string that represents it
+try:
+ import __builtin__
+except ImportError:
+ BUILTINS = 'builtins'
+else:
+ BUILTINS = '__builtin__'
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/mock.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/mock.py
new file mode 100644
index 00000000..0972cd2e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/mock.py
@@ -0,0 +1,122 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+'''
+Compat module for Python3.x's unittest.mock module
+'''
+import sys
+
+# Python 2.7
+
+# Note: Could use the pypi mock library on python3.x as well as python2.x. It
+# is the same as the python3 stdlib mock library
+
+try:
+ # Allow wildcard import because we really do want to import all of mock's
+ # symbols into this compat shim
+ # pylint: disable=wildcard-import,unused-wildcard-import
+ from unittest.mock import *
+except ImportError:
+ # Python 2
+ # pylint: disable=wildcard-import,unused-wildcard-import
+ try:
+ from mock import *
+ except ImportError:
+ print('You need the mock library installed on python2.x to run tests')
+
+
+# Prior to 3.4.4, mock_open cannot handle binary read_data
+if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
+ file_spec = None
+
+ def _iterate_read_data(read_data):
+ # Helper for mock_open:
+ # Retrieve lines from read_data via a generator so that separate calls to
+ # readline, read, and readlines are properly interleaved
+ sep = b'\n' if isinstance(read_data, bytes) else '\n'
+ data_as_list = [l + sep for l in read_data.split(sep)]
+
+ if data_as_list[-1] == sep:
+ # If the last line ended in a newline, the list comprehension will have an
+ # extra entry that's just a newline. Remove this.
+ data_as_list = data_as_list[:-1]
+ else:
+ # If there wasn't an extra newline by itself, then the file being
+ # emulated doesn't have a newline to end the last line remove the
+ # newline that our naive format() added
+ data_as_list[-1] = data_as_list[-1][:-1]
+
+ for line in data_as_list:
+ yield line
+
+ def mock_open(mock=None, read_data=''):
+ """
+ A helper function to create a mock to replace the use of `open`. It works
+ for `open` called directly or used as a context manager.
+
+ The `mock` argument is the mock object to configure. If `None` (the
+ default) then a `MagicMock` will be created for you, with the API limited
+ to methods or attributes available on standard file handles.
+
+ `read_data` is a string for the `read` methoddline`, and `readlines` of the
+ file handle to return. This is an empty string by default.
+ """
+ def _readlines_side_effect(*args, **kwargs):
+ if handle.readlines.return_value is not None:
+ return handle.readlines.return_value
+ return list(_data)
+
+ def _read_side_effect(*args, **kwargs):
+ if handle.read.return_value is not None:
+ return handle.read.return_value
+ return type(read_data)().join(_data)
+
+ def _readline_side_effect():
+ if handle.readline.return_value is not None:
+ while True:
+ yield handle.readline.return_value
+ for line in _data:
+ yield line
+
+ global file_spec
+ if file_spec is None:
+ import _io
+ file_spec = list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO))))
+
+ if mock is None:
+ mock = MagicMock(name='open', spec=open)
+
+ handle = MagicMock(spec=file_spec)
+ handle.__enter__.return_value = handle
+
+ _data = _iterate_read_data(read_data)
+
+ handle.write.return_value = None
+ handle.read.return_value = None
+ handle.readline.return_value = None
+ handle.readlines.return_value = None
+
+ handle.read.side_effect = _read_side_effect
+ handle.readline.side_effect = _readline_side_effect()
+ handle.readlines.side_effect = _readlines_side_effect
+
+ mock.return_value = handle
+ return mock
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/unittest.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/unittest.py
new file mode 100644
index 00000000..98f08ad6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/compat/unittest.py
@@ -0,0 +1,38 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+'''
+Compat module for Python2.7's unittest module
+'''
+
+import sys
+
+# Allow wildcard import because we really do want to import all of
+# unittests's symbols into this compat shim
+# pylint: disable=wildcard-import,unused-wildcard-import
+if sys.version_info < (2, 7):
+ try:
+ # Need unittest2 on python2.6
+ from unittest2 import *
+ except ImportError:
+ print('You need unittest2 installed on python2.6.x to run tests')
+else:
+ from unittest import *
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/__init__.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/loader.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/loader.py
new file mode 100644
index 00000000..0ee47fbb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/loader.py
@@ -0,0 +1,116 @@
+# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import os
+
+from ansible.errors import AnsibleParserError
+from ansible.parsing.dataloader import DataLoader
+from ansible.module_utils._text import to_bytes, to_text
+
+
+class DictDataLoader(DataLoader):
+
+ def __init__(self, file_mapping=None):
+ file_mapping = {} if file_mapping is None else file_mapping
+ assert type(file_mapping) == dict
+
+ super(DictDataLoader, self).__init__()
+
+ self._file_mapping = file_mapping
+ self._build_known_directories()
+ self._vault_secrets = None
+
+ def load_from_file(self, path, cache=True, unsafe=False):
+ path = to_text(path)
+ if path in self._file_mapping:
+ return self.load(self._file_mapping[path], path)
+ return None
+
+ # TODO: the real _get_file_contents returns a bytestring, so we actually convert the
+ # unicode/text it's created with to utf-8
+ def _get_file_contents(self, path):
+ path = to_text(path)
+ if path in self._file_mapping:
+ return (to_bytes(self._file_mapping[path]), False)
+ else:
+ raise AnsibleParserError("file not found: %s" % path)
+
+ def path_exists(self, path):
+ path = to_text(path)
+ return path in self._file_mapping or path in self._known_directories
+
+ def is_file(self, path):
+ path = to_text(path)
+ return path in self._file_mapping
+
+ def is_directory(self, path):
+ path = to_text(path)
+ return path in self._known_directories
+
+ def list_directory(self, path):
+ ret = []
+ path = to_text(path)
+ for x in (list(self._file_mapping.keys()) + self._known_directories):
+ if x.startswith(path):
+ if os.path.dirname(x) == path:
+ ret.append(os.path.basename(x))
+ return ret
+
+ def is_executable(self, path):
+ # FIXME: figure out a way to make paths return true for this
+ return False
+
+ def _add_known_directory(self, directory):
+ if directory not in self._known_directories:
+ self._known_directories.append(directory)
+
+ def _build_known_directories(self):
+ self._known_directories = []
+ for path in self._file_mapping:
+ dirname = os.path.dirname(path)
+ while dirname not in ('/', ''):
+ self._add_known_directory(dirname)
+ dirname = os.path.dirname(dirname)
+
+ def push(self, path, content):
+ rebuild_dirs = False
+ if path not in self._file_mapping:
+ rebuild_dirs = True
+
+ self._file_mapping[path] = content
+
+ if rebuild_dirs:
+ self._build_known_directories()
+
+ def pop(self, path):
+ if path in self._file_mapping:
+ del self._file_mapping[path]
+ self._build_known_directories()
+
+ def clear(self):
+ self._file_mapping = dict()
+ self._known_directories = []
+
+ def get_basedir(self):
+ return os.getcwd()
+
+ def set_vault_secrets(self, vault_secrets):
+ self._vault_secrets = vault_secrets
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/path.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/path.py
new file mode 100644
index 00000000..044585fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/path.py
@@ -0,0 +1,8 @@
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+from ansible_collections.cisco.aci.tests.unit.compat.mock import MagicMock
+from ansible.utils.path import unfrackpath
+
+
+mock_unfrackpath_noop = MagicMock(spec_set=unfrackpath, side_effect=lambda x, *args, **kwargs: x)
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/procenv.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/procenv.py
new file mode 100644
index 00000000..f5a5891f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/procenv.py
@@ -0,0 +1,90 @@
+# (c) 2016, Matt Davis <mdavis@ansible.com>
+# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import sys
+import json
+
+from contextlib import contextmanager
+from io import BytesIO, StringIO
+from ansible_collections.cisco.aci.tests.unit.compat import unittest
+from ansible.module_utils.six import PY3
+from ansible.module_utils._text import to_bytes
+
+
+@contextmanager
+def swap_stdin_and_argv(stdin_data='', argv_data=tuple()):
+ """
+ context manager that temporarily masks the test runner's values for stdin and argv
+ """
+ real_stdin = sys.stdin
+ real_argv = sys.argv
+
+ if PY3:
+ fake_stream = StringIO(stdin_data)
+ fake_stream.buffer = BytesIO(to_bytes(stdin_data))
+ else:
+ fake_stream = BytesIO(to_bytes(stdin_data))
+
+ try:
+ sys.stdin = fake_stream
+ sys.argv = argv_data
+
+ yield
+ finally:
+ sys.stdin = real_stdin
+ sys.argv = real_argv
+
+
+@contextmanager
+def swap_stdout():
+ """
+ context manager that temporarily replaces stdout for tests that need to verify output
+ """
+ old_stdout = sys.stdout
+
+ if PY3:
+ fake_stream = StringIO()
+ else:
+ fake_stream = BytesIO()
+
+ try:
+ sys.stdout = fake_stream
+
+ yield fake_stream
+ finally:
+ sys.stdout = old_stdout
+
+
+class ModuleTestCase(unittest.TestCase):
+ def setUp(self, module_args=None):
+ if module_args is None:
+ module_args = {'_ansible_remote_tmp': '/tmp', '_ansible_keep_remote_files': False}
+
+ args = json.dumps(dict(ANSIBLE_MODULE_ARGS=module_args))
+
+ # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
+ self.stdin_swap = swap_stdin_and_argv(stdin_data=args)
+ self.stdin_swap.__enter__()
+
+ def tearDown(self):
+ # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
+ self.stdin_swap.__exit__(None, None, None)
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/vault_helper.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/vault_helper.py
new file mode 100644
index 00000000..dcce9c78
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/vault_helper.py
@@ -0,0 +1,39 @@
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+from ansible.module_utils._text import to_bytes
+
+from ansible.parsing.vault import VaultSecret
+
+
+class TextVaultSecret(VaultSecret):
+ '''A secret piece of text. ie, a password. Tracks text encoding.
+
+ The text encoding of the text may not be the default text encoding so
+ we keep track of the encoding so we encode it to the same bytes.'''
+
+ def __init__(self, text, encoding=None, errors=None, _bytes=None):
+ super(TextVaultSecret, self).__init__()
+ self.text = text
+ self.encoding = encoding or 'utf-8'
+ self._bytes = _bytes
+ self.errors = errors or 'strict'
+
+ @property
+ def bytes(self):
+ '''The text encoded with encoding, unless we specifically set _bytes.'''
+ return self._bytes or to_bytes(self.text, encoding=self.encoding, errors=self.errors)
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/yaml_helper.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/yaml_helper.py
new file mode 100644
index 00000000..1ef17215
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/mock/yaml_helper.py
@@ -0,0 +1,124 @@
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import io
+import yaml
+
+from ansible.module_utils.six import PY3
+from ansible.parsing.yaml.loader import AnsibleLoader
+from ansible.parsing.yaml.dumper import AnsibleDumper
+
+
+class YamlTestUtils(object):
+ """Mixin class to combine with a unittest.TestCase subclass."""
+ def _loader(self, stream):
+ """Vault related tests will want to override this.
+
+ Vault cases should setup a AnsibleLoader that has the vault password."""
+ return AnsibleLoader(stream)
+
+ def _dump_stream(self, obj, stream, dumper=None):
+ """Dump to a py2-unicode or py3-string stream."""
+ if PY3:
+ return yaml.dump(obj, stream, Dumper=dumper)
+ else:
+ return yaml.dump(obj, stream, Dumper=dumper, encoding=None)
+
+ def _dump_string(self, obj, dumper=None):
+ """Dump to a py2-unicode or py3-string"""
+ if PY3:
+ return yaml.dump(obj, Dumper=dumper)
+ else:
+ return yaml.dump(obj, Dumper=dumper, encoding=None)
+
+ def _dump_load_cycle(self, obj):
+ # Each pass though a dump or load revs the 'generation'
+ # obj to yaml string
+ string_from_object_dump = self._dump_string(obj, dumper=AnsibleDumper)
+
+ # wrap a stream/file like StringIO around that yaml
+ stream_from_object_dump = io.StringIO(string_from_object_dump)
+ loader = self._loader(stream_from_object_dump)
+ # load the yaml stream to create a new instance of the object (gen 2)
+ obj_2 = loader.get_data()
+
+ # dump the gen 2 objects directory to strings
+ string_from_object_dump_2 = self._dump_string(obj_2,
+ dumper=AnsibleDumper)
+
+ # The gen 1 and gen 2 yaml strings
+ self.assertEqual(string_from_object_dump, string_from_object_dump_2)
+ # the gen 1 (orig) and gen 2 py object
+ self.assertEqual(obj, obj_2)
+
+ # again! gen 3... load strings into py objects
+ stream_3 = io.StringIO(string_from_object_dump_2)
+ loader_3 = self._loader(stream_3)
+ obj_3 = loader_3.get_data()
+
+ string_from_object_dump_3 = self._dump_string(obj_3, dumper=AnsibleDumper)
+
+ self.assertEqual(obj, obj_3)
+ # should be transitive, but...
+ self.assertEqual(obj_2, obj_3)
+ self.assertEqual(string_from_object_dump, string_from_object_dump_3)
+
+ def _old_dump_load_cycle(self, obj):
+ '''Dump the passed in object to yaml, load it back up, dump again, compare.'''
+ stream = io.StringIO()
+
+ yaml_string = self._dump_string(obj, dumper=AnsibleDumper)
+ self._dump_stream(obj, stream, dumper=AnsibleDumper)
+
+ yaml_string_from_stream = stream.getvalue()
+
+ # reset stream
+ stream.seek(0)
+
+ loader = self._loader(stream)
+ # loader = AnsibleLoader(stream, vault_password=self.vault_password)
+ obj_from_stream = loader.get_data()
+
+ stream_from_string = io.StringIO(yaml_string)
+ loader2 = self._loader(stream_from_string)
+ # loader2 = AnsibleLoader(stream_from_string, vault_password=self.vault_password)
+ obj_from_string = loader2.get_data()
+
+ stream_obj_from_stream = io.StringIO()
+ stream_obj_from_string = io.StringIO()
+
+ if PY3:
+ yaml.dump(obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper)
+ yaml.dump(obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper)
+ else:
+ yaml.dump(obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper, encoding=None)
+ yaml.dump(obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper, encoding=None)
+
+ yaml_string_stream_obj_from_stream = stream_obj_from_stream.getvalue()
+ yaml_string_stream_obj_from_string = stream_obj_from_string.getvalue()
+
+ stream_obj_from_stream.seek(0)
+ stream_obj_from_string.seek(0)
+
+ if PY3:
+ yaml_string_obj_from_stream = yaml.dump(obj_from_stream, Dumper=AnsibleDumper)
+ yaml_string_obj_from_string = yaml.dump(obj_from_string, Dumper=AnsibleDumper)
+ else:
+ yaml_string_obj_from_stream = yaml.dump(obj_from_stream, Dumper=AnsibleDumper, encoding=None)
+ yaml_string_obj_from_string = yaml.dump(obj_from_string, Dumper=AnsibleDumper, encoding=None)
+
+ assert yaml_string == yaml_string_obj_from_stream
+ assert yaml_string == yaml_string_obj_from_stream == yaml_string_obj_from_string
+ assert (yaml_string == yaml_string_obj_from_stream == yaml_string_obj_from_string == yaml_string_stream_obj_from_stream ==
+ yaml_string_stream_obj_from_string)
+ assert obj == obj_from_stream
+ assert obj == obj_from_string
+ assert obj == yaml_string_obj_from_stream
+ assert obj == yaml_string_obj_from_string
+ assert obj == obj_from_stream == obj_from_string == yaml_string_obj_from_stream == yaml_string_obj_from_string
+ return {'obj': obj,
+ 'yaml_string': yaml_string,
+ 'yaml_string_from_stream': yaml_string_from_stream,
+ 'obj_from_stream': obj_from_stream,
+ 'obj_from_string': obj_from_string,
+ 'yaml_string_obj_from_string': yaml_string_obj_from_string}
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/module_utils/__init__.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/module_utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/module_utils/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/module_utils/conftest.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/module_utils/conftest.py
new file mode 100644
index 00000000..fd6c443d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/module_utils/conftest.py
@@ -0,0 +1,74 @@
+# Copyright (c) 2017 Ansible Project
+# GNU General Public License v3.0+
+# see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import json
+import sys
+from io import BytesIO
+
+import pytest
+
+import ansible.module_utils.basic
+from ansible.module_utils.six import PY3, string_types
+from ansible.module_utils._text import to_bytes
+from ansible.module_utils.common._collections_compat import MutableMapping
+
+
+@pytest.fixture
+def stdin(mocker, request):
+ old_args = ansible.module_utils.basic._ANSIBLE_ARGS
+ ansible.module_utils.basic._ANSIBLE_ARGS = None
+ old_argv = sys.argv
+ sys.argv = ['ansible_unittest']
+
+ if isinstance(request.param, string_types):
+ args = request.param
+ elif isinstance(request.param, MutableMapping):
+ if 'ANSIBLE_MODULE_ARGS' not in request.param:
+ request.param = {'ANSIBLE_MODULE_ARGS': request.param}
+ if '_ansible_remote_tmp' not in request.param['ANSIBLE_MODULE_ARGS']:
+ request.param['ANSIBLE_MODULE_ARGS']['_ansible_remote_tmp'] = '/tmp'
+ if '_ansible_keep_remote_files' not in request.param['ANSIBLE_MODULE_ARGS']:
+ request.param['ANSIBLE_MODULE_ARGS']['_ansible_keep_remote_files'] = False
+ args = json.dumps(request.param)
+ else:
+ raise Exception('Malformed data to the stdin pytest fixture')
+
+ fake_stdin = BytesIO(to_bytes(args, errors='surrogate_or_strict'))
+ if PY3:
+ mocker.patch('ansible.module_utils.basic.sys.stdin',
+ mocker.MagicMock())
+ mocker.patch('ansible.module_utils.basic.sys.stdin.buffer', fake_stdin)
+ else:
+ mocker.patch('ansible.module_utils.basic.sys.stdin', fake_stdin)
+
+ yield fake_stdin
+
+ ansible.module_utils.basic._ANSIBLE_ARGS = old_args
+ sys.argv = old_argv
+
+
+@pytest.fixture
+def am(stdin, request):
+ old_args = ansible.module_utils.basic._ANSIBLE_ARGS
+ ansible.module_utils.basic._ANSIBLE_ARGS = None
+ old_argv = sys.argv
+ sys.argv = ['ansible_unittest']
+
+ argspec = {}
+ if hasattr(request, 'param'):
+ if isinstance(request.param, dict):
+ argspec = request.param
+
+ am = ansible.module_utils.basic.AnsibleModule(
+ argument_spec=argspec,
+ )
+ am._name = 'ansible_unittest'
+
+ yield am
+
+ ansible.module_utils.basic._ANSIBLE_ARGS = old_args
+ sys.argv = old_argv
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/module_utils/test_aci.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/module_utils/test_aci.py
new file mode 100644
index 00000000..dd181115
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/module_utils/test_aci.py
@@ -0,0 +1,386 @@
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+
+# see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import sys
+
+from ansible_collections.cisco.aci.tests.unit.compat import unittest
+from ansible_collections.cisco.aci.plugins.module_utils.aci import ACIModule
+from ansible.module_utils.six import PY2
+from ansible.module_utils._text import to_native
+
+import pytest
+
+
+class AltModule():
+ params = dict(
+ hostname='dummy',
+ port=123,
+ protocol='https',
+ state='present',
+ )
+
+
+class AltACIModule(ACIModule):
+ def __init__(self):
+ self.result = dict(changed=False)
+ self.module = AltModule
+ self.params = self.module.params
+
+
+aci = AltACIModule()
+
+
+try:
+ from lxml import etree
+ if sys.version_info >= (2, 7):
+ from xmljson import cobra
+except ImportError:
+ pytestmark = pytest.mark.skip(
+ "ACI Ansible modules require the lxml and xmljson Python libraries"
+ )
+
+
+class AciRest(unittest.TestCase):
+
+ def test_invalid_aci_login(self):
+ self.maxDiff = None
+
+ error = dict(
+ code='401',
+ text=(
+ 'Username or password is incorrect - '
+ 'FAILED local authentication'
+ ),
+ )
+
+ imdata = [{
+ 'error': {
+ 'attributes': {
+ 'code': '401',
+ 'text': (
+ 'Username or password is incorrect - '
+ 'FAILED local authentication'
+ ),
+ },
+ },
+ }]
+
+ totalCount = 1
+
+ json_response = '{"totalCount":"1","imdata":[{"error":{"attributes":{"code":"401","text":"Username or password is incorrect - FAILED local authentication"}}}]}' # NOQA
+ aci.response_json(json_response)
+ self.assertEqual(aci.error, error)
+ self.assertEqual(aci.imdata, imdata)
+ self.assertEqual(aci.totalCount, totalCount)
+
+ # Python 2.7+ is needed for xmljson
+ if sys.version_info < (2, 7):
+ return
+
+ xml_response = '''<?xml version="1.0" encoding="UTF-8"?>
+ <imdata totalCount="1">
+ <error
+ code="401"
+ text="Username or password is incorrect - FAILED local
+authentication"
+ />
+ </imdata>
+ '''
+ aci.response_xml(xml_response)
+ self.assertEqual(aci.error, error)
+ self.assertEqual(aci.imdata, imdata)
+ self.assertEqual(aci.totalCount, totalCount)
+
+ def test_valid_aci_login(self):
+ self.maxDiff = None
+
+ imdata = [{
+ 'aaaLogin': {
+ 'attributes': {
+ 'token': 'ZldYAsoO9d0FfAQM8xaEVWvQPSOYwpnqzhwpIC1r4MaToknJjlIuAt9+TvXqrZ8lWYIGPj6VnZkWiS8nJfaiaX/AyrdD35jsSxiP3zydh+849xym7ALCw/fFNsc7b5ik1HaMuSUtdrN8fmCEUy7Pq/QNpGEqkE8m7HaxAuHpmvXgtdW1bA+KKJu2zY1c/tem', # NOQA
+ 'siteFingerprint': 'NdxD72K/uXaUK0wn',
+ 'refreshTimeoutSeconds': '600',
+ 'maximumLifetimeSeconds': '86400',
+ 'guiIdleTimeoutSeconds': '1200',
+ 'restTimeoutSeconds': '90',
+ 'creationTime': '1500134817',
+ 'firstLoginTime': '1500134817',
+ 'userName': 'admin',
+ 'remoteUser': 'false',
+ 'unixUserId': '15374',
+ 'sessionId': 'o7hObsqNTfCmDGcZI5c4ng==',
+ 'lastName': '',
+ 'firstName': '',
+ 'version': '2.0(2f)',
+ 'buildTime': 'Sat Aug 20 23:07:07 PDT 2016',
+ 'node': 'topology/pod-1/node-1',
+ },
+ 'children': [{
+ 'aaaUserDomain': {
+ 'attributes': {
+ 'name': 'all',
+ 'rolesR': 'admin',
+ 'rolesW': 'admin',
+ },
+ 'children': [{
+ 'aaaReadRoles': {
+ 'attributes': {},
+ },
+ }, {
+ 'aaaWriteRoles': {
+ 'attributes': {},
+ 'children': [{
+ 'role': {
+ 'attributes': {
+ 'name': 'admin',
+ },
+ },
+ }],
+ },
+ }],
+ },
+ }, {
+ 'DnDomainMapEntry': {
+ 'attributes': {
+ 'dn': 'uni/tn-common',
+ 'readPrivileges': 'admin',
+ 'writePrivileges': 'admin',
+ },
+ },
+ }, {
+ 'DnDomainMapEntry': {
+ 'attributes': {
+ 'dn': 'uni/tn-infra',
+ 'readPrivileges': 'admin',
+ 'writePrivileges': 'admin',
+ },
+ },
+ }, {
+ 'DnDomainMapEntry': {
+ 'attributes': {
+ 'dn': 'uni/tn-mgmt',
+ 'readPrivileges': 'admin',
+ 'writePrivileges': 'admin',
+ },
+ },
+ }],
+ },
+ }]
+
+ totalCount = 1
+
+ json_response = '{"totalCount":"1","imdata":[{"aaaLogin":{"attributes":{"token":"ZldYAsoO9d0FfAQM8xaEVWvQPSOYwpnqzhwpIC1r4MaToknJjlIuAt9+TvXqrZ8lWYIGPj6VnZkWiS8nJfaiaX/AyrdD35jsSxiP3zydh+849xym7ALCw/fFNsc7b5ik1HaMuSUtdrN8fmCEUy7Pq/QNpGEqkE8m7HaxAuHpmvXgtdW1bA+KKJu2zY1c/tem","siteFingerprint":"NdxD72K/uXaUK0wn","refreshTimeoutSeconds":"600","maximumLifetimeSeconds":"86400","guiIdleTimeoutSeconds":"1200","restTimeoutSeconds":"90","creationTime":"1500134817","firstLoginTime":"1500134817","userName":"admin","remoteUser":"false","unixUserId":"15374","sessionId":"o7hObsqNTfCmDGcZI5c4ng==","lastName":"","firstName":"","version":"2.0(2f)","buildTime":"Sat Aug 20 23:07:07 PDT 2016","node":"topology/pod-1/node-1"},"children":[{"aaaUserDomain":{"attributes":{"name":"all","rolesR":"admin","rolesW":"admin"},"children":[{"aaaReadRoles":{"attributes":{}}},{"aaaWriteRoles":{"attributes":{},"children":[{"role":{"attributes":{"name":"admin"}}}]}}]}},{"DnDomainMapEntry":{"attributes":{"dn":"uni/tn-common","readPrivileges":"admin","writePrivileges":"admin"}}},{"DnDomainMapEntry":{"attributes":{"dn":"uni/tn-infra","readPrivileges":"admin","writePrivileges":"admin"}}},{"DnDomainMapEntry":{"attributes":{"dn":"uni/tn-mgmt","readPrivileges":"admin","writePrivileges":"admin"}}}]}}]}' # NOQA
+ aci.response_json(json_response)
+ self.assertEqual(aci.imdata, imdata)
+ self.assertEqual(aci.totalCount, totalCount)
+
+ # Python 2.7+ is needed for xmljson
+ if sys.version_info < (2, 7):
+ return
+
+ xml_response = '<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1">\n<aaaLogin token="ZldYAsoO9d0FfAQM8xaEVWvQPSOYwpnqzhwpIC1r4MaToknJjlIuAt9+TvXqrZ8lWYIGPj6VnZkWiS8nJfaiaX/AyrdD35jsSxiP3zydh+849xym7ALCw/fFNsc7b5ik1HaMuSUtdrN8fmCEUy7Pq/QNpGEqkE8m7HaxAuHpmvXgtdW1bA+KKJu2zY1c/tem" siteFingerprint="NdxD72K/uXaUK0wn" refreshTimeoutSeconds="600" maximumLifetimeSeconds="86400" guiIdleTimeoutSeconds="1200" restTimeoutSeconds="90" creationTime="1500134817" firstLoginTime="1500134817" userName="admin" remoteUser="false" unixUserId="15374" sessionId="o7hObsqNTfCmDGcZI5c4ng==" lastName="" firstName="" version="2.0(2f)" buildTime="Sat Aug 20 23:07:07 PDT 2016" node="topology/pod-1/node-1">\n<aaaUserDomain name="all" rolesR="admin" rolesW="admin">\n<aaaReadRoles/>\n<aaaWriteRoles>\n<role name="admin"/>\n</aaaWriteRoles>\n</aaaUserDomain>\n<DnDomainMapEntry dn="uni/tn-common" readPrivileges="admin" writePrivileges="admin"/>\n<DnDomainMapEntry dn="uni/tn-infra" readPrivileges="admin" writePrivileges="admin"/>\n<DnDomainMapEntry dn="uni/tn-mgmt" readPrivileges="admin" writePrivileges="admin"/>\n</aaaLogin></imdata>\n''' # NOQA
+ aci.response_xml(xml_response)
+ self.assertEqual(aci.imdata, imdata)
+ self.assertEqual(aci.totalCount, totalCount)
+
+ def test_invalid_input(self):
+ self.maxDiff = None
+
+ error = dict(
+ code='401',
+ text=(
+ 'Username or password is incorrect - '
+ 'FAILED local authentication'
+ ),
+ )
+
+ imdata = [{
+ 'error': {
+ 'attributes': {
+ 'code': '401',
+ 'text': (
+ 'Username or password is incorrect - '
+ 'FAILED local authentication'
+ ),
+ },
+ },
+ }]
+
+ totalCount = 1
+
+ json_response = '{"totalCount":"1","imdata":[{"error":{"attributes":{"code":"401","text":"Username or password is incorrect - FAILED local authentication"}}}]}' # NOQA
+ aci.response_json(json_response)
+ self.assertEqual(aci.error, error)
+ self.assertEqual(aci.imdata, imdata)
+ self.assertEqual(aci.totalCount, totalCount)
+
+ # Python 2.7+ is needed for xmljson
+ if sys.version_info < (2, 7):
+ return
+
+ xml_response = '''<?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1">
+ <error
+ code="401"
+ text="Username or password is incorrect - FAILED local
+authentication"
+ />
+ </imdata>
+ '''
+ aci.response_xml(xml_response)
+ self.assertEqual(aci.error, error)
+ self.assertEqual(aci.imdata, imdata)
+ self.assertEqual(aci.totalCount, totalCount)
+
+ def test_empty_response(self):
+ self.maxDiffi = None
+
+ if PY2:
+ error_text = (
+ "Unable to parse output as JSON, see 'raw' output. "
+ "No JSON object could be decoded"
+ )
+ else:
+ error_text = (
+ "Unable to parse output as JSON, see 'raw' output. "
+ "Expecting value: line 1 column 1 (char 0)"
+ )
+
+ error = dict(
+ code=-1,
+ text=error_text,
+ )
+ raw = ''
+
+ json_response = ''
+ aci.response_json(json_response)
+ self.assertEqual(aci.error, error)
+ self.assertEqual(aci.result['raw'], raw)
+
+ # Python 2.7+ is needed for xmljson
+ if sys.version_info < (2, 7):
+ return
+
+ elif etree.LXML_VERSION < (3, 3, 0, 0):
+ error_text = (
+ "Unable to parse output as XML, see 'raw' output. "
+ "None"
+ ),
+ elif etree.LXML_VERSION < (4, 0, 0, 0):
+ error_text = to_native(
+ (
+ u"Unable to parse output as XML, see 'raw' output. "
+ u"None (line 0)"
+ ),
+ errors='surrogate_or_strict'
+ )
+ elif PY2:
+ error_text = (
+ "Unable to parse output as XML, see 'raw' output. "
+ "Document is empty, line 1, column 1 (line 1)"
+ )
+ else:
+ error_text = None
+
+ xml_response = ''
+ aci.response_xml(xml_response)
+
+ if error_text is None:
+ # errors vary on Python 3.8+ for unknown reasons
+ # accept any of the following error messages
+ errors = (
+ (
+ "Unable to parse output as XML, see 'raw' output. "
+ "None (line 0)"
+ ),
+ (
+ "Unable to parse output as XML, see 'raw' output. "
+ "Document is empty, line 1, column 1 (<string>, line 1)"
+ ),
+ )
+
+ for error in errors:
+ if error in aci.error['text']:
+ error_text = error
+ break
+
+ error = dict(
+ code=-1,
+ text=error_text,
+ )
+
+ raw = ''
+
+ self.assertEqual(aci.error, error)
+ self.assertEqual(aci.result['raw'], raw)
+
+ def test_invalid_response(self):
+ self.maxDiff = None
+
+ if sys.version_info < (2, 7):
+ error_text = (
+ "Unable to parse output as JSON, see 'raw' output."
+ " Expecting object: line 1 column 8 (char 8)"
+ )
+ elif PY2:
+ error_text = (
+ "Unable to parse output as JSON, see 'raw' output."
+ " No JSON object could be decoded"
+ )
+ else:
+ error_text = (
+ "Unable to parse output as JSON, see 'raw' output."
+ " Expecting value: line 1 column 9 (char 8)"
+ )
+
+ error = dict(
+ code=-1,
+ text=error_text,
+ )
+
+ raw = '{ "aaa":'
+
+ json_response = '{ "aaa":'
+ aci.response_json(json_response)
+ self.assertEqual(aci.error, error)
+ self.assertEqual(aci.result['raw'], raw)
+
+ # Python 2.7+ is needed for xmljson
+ if sys.version_info < (2, 7):
+ return
+
+ elif etree.LXML_VERSION < (3, 3, 0, 0):
+ error_text = (
+ "Unable to parse output as XML, see 'raw' output. "
+ "Couldn't find end of Start Tag aaa line 1, line 1, column 5"
+ )
+ elif PY2:
+ error_text = (
+ "Unable to parse output as XML, see 'raw' output. "
+ "Couldn't find end of Start Tag aaa line 1, line 1, column 6 "
+ "(line 1)"
+ )
+
+ else:
+ error_text = (
+ "Unable to parse output as XML, see 'raw' output. "
+ "Couldn't find end of Start Tag aaa line 1, line 1, column 6 "
+ "(<string>, line 1)"
+ )
+
+ error = dict(
+ code=-1,
+ text=error_text,
+ )
+
+ raw = '<aaa '
+
+ xml_response = '<aaa '
+ aci.response_xml(xml_response)
+ self.assertEqual(aci.error, error)
+ self.assertEqual(aci.result['raw'], raw)
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/modules/utils.py b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/modules/utils.py
new file mode 100644
index 00000000..c692792f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/modules/utils.py
@@ -0,0 +1,52 @@
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import json
+
+from ansible_collections.cisco.aci.tests.unit.compat import unittest
+from ansible_collections.cisco.aci.tests.unit.compat.mock import patch
+from ansible.module_utils import basic
+from ansible.module_utils._text import to_bytes
+
+
+def set_module_args(args):
+ if '_ansible_remote_tmp' not in args:
+ args['_ansible_remote_tmp'] = '/tmp'
+ if '_ansible_keep_remote_files' not in args:
+ args['_ansible_keep_remote_files'] = False
+
+ args = json.dumps({'ANSIBLE_MODULE_ARGS': args})
+ basic._ANSIBLE_ARGS = to_bytes(args)
+
+
+class AnsibleExitJson(Exception):
+ pass
+
+
+class AnsibleFailJson(Exception):
+ pass
+
+
+def exit_json(*args, **kwargs):
+ if 'changed' not in kwargs:
+ kwargs['changed'] = False
+ raise AnsibleExitJson(kwargs)
+
+
+def fail_json(*args, **kwargs):
+ kwargs['failed'] = True
+ raise AnsibleFailJson(kwargs)
+
+
+class ModuleTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_module = patch.multiple(basic.AnsibleModule,
+ exit_json=exit_json,
+ fail_json=fail_json)
+ self.mock_module.start()
+ self.mock_sleep = patch('time.sleep')
+ self.mock_sleep.start()
+ set_module_args({})
+ self.addCleanup(self.mock_module.stop)
+ self.addCleanup(self.mock_sleep.stop)
diff --git a/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/requirements.txt b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/requirements.txt
new file mode 100644
index 00000000..c27ba892
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/aci/tests/unit/requirements.txt
@@ -0,0 +1,10 @@
+requests
+setuptools > 0.6 # pytest-xdist installed via requirements does not work with very old setuptools (sanity_ok)
+unittest2 ; python_version < '2.7'
+importlib ; python_version < '2.7'
+netaddr
+ipaddress
+
+# requirement for aci_rest module
+xmljson
+lxml \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/.gitignore b/collections-debian-merged/ansible_collections/cisco/asa/.gitignore
new file mode 100644
index 00000000..6037698f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/.gitignore
@@ -0,0 +1,3 @@
+.tox
+__pycache__
+*.py[cod]
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/.yamllint b/collections-debian-merged/ansible_collections/cisco/asa/.yamllint
new file mode 100644
index 00000000..3adaf90c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/.yamllint
@@ -0,0 +1,15 @@
+---
+extends: default
+
+ignore: |
+ .tox
+ changelogs/*
+
+rules:
+ braces:
+ max-spaces-inside: 1
+ level: error
+ brackets:
+ max-spaces-inside: 1
+ level: error
+ line-length: disable
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/FILES.json b/collections-debian-merged/ansible_collections/cisco/asa/FILES.json
new file mode 100644
index 00000000..0a582a99
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/FILES.json
@@ -0,0 +1,1881 @@
+{
+ "files": [
+ {
+ "name": ".",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/asa_command.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0385be9e37e3110edf84b3ac2623f4a496312648fcc51c1db04eadecc9e2477e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/asa_acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8c4b3b79e1f515dc699925c83fa5c864c36c97e26058aff2dad8be86c8096b0",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/asa_og.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "877fa1cfcf85b2a966410b21a8570dafa8cff78623bcbab11397b8f32c4d73ec",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/asa_acl.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a21be31e34e69cfc46446ab9d298592fd14797143adeb6e8f6ea94e477080edd",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/asa_config.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fff2b27d8c28630b20ab5f26bf5cb2ebbc6732fd8dc3a8d42f83edd29128f9fd",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/asa_facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b3b0ff35c772846b98e6519c9e46fbfb1faf0123bbd377a8107b35977bcae2fb",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/asa_ogs.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da544650f5d5a27d539988720a8320d8f1386350474892b92ea3cc7a78c74688",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/config/acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/config/acls/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fc091d92756095b6dc05f37d2a570a28645bbfcdb69a88ba0574d90720e61f1e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/config/acls/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/config/ogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/config/ogs/ogs.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4f8da376ca10dbd28292d65ac83c15b727edb1de1b803fe033be04ce1fd75e94",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/config/ogs/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/config/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/utils/utils.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "05d56bf98f7cedb4449370de6da6532d75eaa249cf707af0bae06c42da376cd8",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/utils/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/providers",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/providers/providers.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ee054a878154ba76ef686115c5c883cd9a2cd4b74094a7313546da9b56b2f087",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/providers/module.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ab52598ac99da0e23d6a4e899bd8a947005278b7a49ab21e9b812ecfab22f2d0",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/providers/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/facts",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/facts/acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/facts/acls/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "91cb90d8cde09d80e487d91d44c579360317d6f6d10e6b96671130821fbcaf7e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/facts/acls/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/facts/ogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/facts/ogs/ogs.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "920a0c5ce2b15d1dbe35633fc4f5fa5822ec5e4213d7d6c6f38f58b358fa4164",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/facts/ogs/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/facts/facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a08b564ce06dea7dd04b7dac6803219c32a0f36f861a7835d736a5fac5d96f48",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/facts/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/facts/legacy",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/facts/legacy/base.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "534e86ed209fcf7c561c4708b21515b05e12ed266295067ff9756c7b66b352f2",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/facts/legacy/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/rm_templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/rm_templates/ogs.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3fced5f90f3981c5dca2bc770ea0f7a2e36f1c3f934f77f18c2842bb7042cff1",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/rm_templates/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "45978b986f60a1a6b43f40803ec47a234ffb6eae7a7649a2a5f77281f19e68d4",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/asa.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "60b0b27d1b110c7ccd3d40cefb7fe85874a61ef2b18f534f78c3ef168e39e95e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/argspec",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/argspec/acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/argspec/acls/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "70e99a7460ee744797b9ed717f4d714c91d0cbd4a3d665a382bf84d69c9d8859",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/argspec/acls/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/argspec/ogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/argspec/ogs/ogs.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c574815b4350ec1aa12c9dbf245ce55ed80524d28213c7b49aa3dd19109a184d",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/argspec/ogs/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/argspec/facts",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/argspec/facts/facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "39b339d1544bbdf50e535025c9337188057b13e7aad4ec5628d4d8e6719e6f30",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/argspec/facts/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/asa/argspec/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/asa.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2bff52dbdcbb90167b873de919ef115dc8c679c17eb4d8ed40473000f79708a7",
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/action",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/action/asa.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "28ea6a3720ec779c33234966a433f7a7362fc0be1c9d7da70f0d7a78ef2bd222",
+ "format": 1
+ },
+ {
+ "name": "plugins/action/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/cliconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/cliconf/asa.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "76da52a54728fd2427d5cf7a11a93232cba3b8ec2bdaa1768f322171f114f525",
+ "format": 1
+ },
+ {
+ "name": "plugins/cliconf/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/terminal",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/terminal/asa.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "19a5a7c1301402180dbd91d97f497c9a8f1c1d462a78acd55dec454cdf7b4160",
+ "format": 1
+ },
+ {
+ "name": "plugins/terminal/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": ".gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "13efa8adb5f73be5234e611e5ec4cc509417641a49c47d861ae370cc86bbb981",
+ "format": 1
+ },
+ {
+ "name": "tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/.gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b5726d3ec9335a09c124469eca039523847a6b0f08a083efaefd002b83326600",
+ "format": 1
+ },
+ {
+ "name": "tests/unit",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/mock.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "52ecd54195edca933104eb3e937547c7395ff604ada2694a8b184c2c1466dbf1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/unittest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3ed698b1faec43d87a2c1ebcb15a2aae48b09ff355bb9a598e5f5a1c928dbb30",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/builtins.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ba13a350ade8ef804336f888d5883b8e54f8bddfb9d0fadc10277a8ca6540f4e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/utils.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cce49441adb4dab720d817723e55cd5e9de3baab78cfc7fceec89b8e7200d87e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/conftest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2af4846e50d461a131ad3edfb609fbb39a9eb1796048c62e4ead8234bcf5c6a1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/asa_module.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "002a025d6db336cba6124270825f1590da9ae08fb2209a39c73a0a23fb150514",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/test_asa_facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7ec3ca2952cc5497b3ba3c85cb4e5d1c6014bdaf39a61efc878f6c737d40c6e3",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/fixtures/asa_og_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c324a36273027bf40c6aa8003cc355200cfbf67e34ab630e406f74c87a40aee",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/fixtures/asa_acls_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "361267bdd04bda2fdb69235826c8f20fd236671dff18879a0ab628978e12e662",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/fixtures/asa_ogs_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7c9381eb8b5131448d21eea9056145fdc8e00ed420ddbb8e455e219237395b0d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/fixtures/asa_facts_show_memory",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6d382593bb23ea997498f73b6d41f3824667ce95eed3bde5a2584be1d02f27b3",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/fixtures/asa_facts_show_version",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "63cb648fbc13e844b870ea31d8359b7a70b5b7e84a88a3478dbab9044960c6c9",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/fixtures/asa_facts_dir",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "29a3ba9c51db713f26ce858365f65785fcc68aa5eb5bc018cbc9f40a0ac77104",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/fixtures/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/test_asa_acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ee31dcbf48ca133774f90d240c35118d30d84024729e5d183e29610dce609c83",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/test_asa_ogs.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4f26278567a0966578a65b9d940b31153a2dad2f76a5b622ff647d507f5ad60c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/test_asa_og.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2d1165033fe3dd83db28c077b6030e3c486dfa65ddc37162a7457d5a2358fb37",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/asa/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/vault_helper.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "feae23166b6eb502f7d9b77c314970516c9a99aaad7de01295b4dfdad53c5c09",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/yaml_helper.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "94e2f3c867d2582c9f7a0e99e544718e355025c4a51c9925e70158fa89b3609e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/path.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da4b5d2a14633249ba87e94990fac9d9636dc844d7a91f1b3bebe529fc072b93",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/loader.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0cfbf4c710a5d5725f84d5f34ab76ec1a0e853397cd945c90fd97769f89dddc5",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/procenv.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "689dbcfc213bfc2d2dd1fa65ab78355b296f22bf6bf9eff6b2b8a27aeedfaf46",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "49ba996dc4735c3463e9af561344346dfae14bcc1a68096ce78364b377f0df1f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/integration",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_og",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_og/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_og/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_og/tests/cli/asa_og.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b83746652a9930b569f66d079af6e01f957c98b77ee80a7e960ef1490e447dee",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_og/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_og/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_og/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_og/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e65bb6e7286202bc2d31061a1ae235cd3a051fd42a2bff63e6714f1cb499f2ad",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_og/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "10107b2eb06436720995c57ecec2a84c241a7ef5fce23d734bcf4bf77d4ed9aa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "48418bfcfbd09b487400092798c29c3cbfb96cfb3956a786cbae2966c8c43692",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7747152a8b93f4a11fe3c0c7d8f1439f6e8850c37acf585b1608e50be8483e7c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ba3eaf57589c6393b0ffb5113d1c9be47587b4c85d39d2be8b1efd3620cecdd9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2a00f9c6f94bdf5e1f2dc3431cab004b36946ca4baee07cece978f42254f2806",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "294e24d48b09bd1374394a59d847941f2f74be4d280978e6832cebc65b6da2da",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "01625314cdf11ee72bf597dd4e61c5c0471f5913e995c7c2bf06eeb4416e3e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "36c65fc73dd9852738647dd2e7f439147cdc29fcd5d4c24273686b3659545c74",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7e2912bd8d5e70042a403930da693d05f7e08feede7f25de3985143640a2251b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb3403481f8be9b0bf146a3ac1bdbec8c33a7edcf7ca4c1217ac67ac68522b8c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e8abfafa58783f64673beed5f0065ce7d3cbd48a2f3b929776cfe276dddf5092",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "33c780254ef202bbdc66060c50d78b8636e9438e8b1aee25e89934b24887a9db",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3c535eadec2ae8c6940cb71091fb7d50c6f71250a5f5a6cd78b2b646f9857cfc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8fc73956ad2351f87a20a5b231d8ebc8cb81d618a0f4bc92c020e46695ec2e5f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb248929c73ced85f7ae3cbba03764bcfd88744108710206c807e43948e84646",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_ogs/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "10107b2eb06436720995c57ecec2a84c241a7ef5fce23d734bcf4bf77d4ed9aa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/redirection",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/redirection/shortname.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2f0348d6944add79921a40926f7b0aa744bfb988604529a49ace7e57d34f80b5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/removal_error.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "60b3367239c349417bf8da368b70e0647c1a0b4e9da5d5f50d3ae0b996e261da",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c72fb9d4e3ecacfea95078d3cca3f3e2fb6e5e22cb264da02e6e7925b6dd21e9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/toplevel_nonidempotent.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "661eb9ff0eaf56e7a40f0a14d35d3c6ebb5033dbbaba011af3d86b9cb073d35f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/toplevel_before.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "60bdb57e41d281bcea81d87cff516192ef7e51bc65546a93883c153a80147b00",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/defaults.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4038fb90d01397a3e5d6de1acf973c1c04c3fb53ae5fb5fcda6fcaa644dc5631",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/sublevel_strict_mul_parents.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "27f7d22db2f7e3369f7449462d49211d88ade8934899e6e9f35a8ddd4f085427",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/sublevel_exact.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b02c65055ff91d8a732849b264ad40a6a78f67551d52adce214f442184c30ff5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/sublevel_block.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "77df0b0ff2370171ca0b16d2e24a1c41fb344eb3162eb73a16beb1cb225a1fcc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/more_system.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "09948e38904217033b76717ccf017825f2126d96fbb918a1051816befee72b62",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/sublevel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b600ef81e9000470a9d6f6068560585a23230d2e958044b82719cac221a7771e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/sublevel_strict.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4545bfdfbfc66563d6b299a02870312f34d4c31d326d3217e3bce434529066ac",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/backup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "050bc1319926a5741b811422c2785314df24bd3099f7e51baa5a58814c911de6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/toplevel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "63c8bb7343c467cbb2dfb5f3d576a39219e2224f2f33054e1f02aece88bcc833",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/toplevel_after.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "83cd8df51eee59587880d2d01cafa3d4c498860b749df90bed661b15d3d1a9d0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tests/cli/force.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a62b96892a5c3a110ac863875103333f5f1a2783964a53b389fc14f40a9d2859",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/templates/basic",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/templates/basic/config.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "65308b2b6c691f26581d2c167f0bee0c6175d39279ec8578bb86ca795d7de6fb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/templates/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/templates/defaults/config.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb99eb6895703bb60ee1260b4fda100bc0715b494b276bd30af5f86140e3636c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5a3241e2e06876730d3f3f7d95b6d7d8203210feb79863b4febe516f93e63ad1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e7d7f58a1d24f52718c31cc560ba27eaf69da2df9e8b0d26516560b547d1d9da",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_config/tasks/redirection.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1c525344e3e8597208b16418f01433551a44e62bda60ed4c1b207ba2315b1b31",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command/tests/cli/bad_operator.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ef9148c49c1caaf2ae7bde7817adf45a0f2d661042dc97039689200a8e901cbf",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command/tests/cli/timeout.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "deb846b6fcb5df7dd9e83c96b7e26f4ab8250757aa16a838cf13ba7832c944d5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command/tests/cli/output.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a81177ae3253ebf198d31e1e57f88c5a68c1779a6d57216cbeb892cee0057c9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command/tests/cli/invalid.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "14304529fc650c523519ff678032db11ecb3bc798d8dfcc3534acf0d7238cf78",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command/tests/cli/contains.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "97549e0b9502ed012a890febceda8b8e3bd33431a075c06cf0a556f444442d55",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5a3241e2e06876730d3f3f7d95b6d7d8203210feb79863b4febe516f93e63ad1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_command/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "10107b2eb06436720995c57ecec2a84c241a7ef5fce23d734bcf4bf77d4ed9aa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acl",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acl/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acl/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acl/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a380209b8a4e880cf098f6943b3d65e6e89bb1725edd56f34dc1dba982c5cf0e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acl/tests/cli/insert.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fcdc4949a95e06714689700f29cff560abb0aa70644806f0bb10fd4ddb0b6993",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acl/tests/cli/full_name_match.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "758729b57c7beadba29c68741a212a877a61b09846adc1345e614f2ccfdfbd34",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acl/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acl/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acl/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acl/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5a3241e2e06876730d3f3f7d95b6d7d8203210feb79863b4febe516f93e63ad1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acl/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "10107b2eb06436720995c57ecec2a84c241a7ef5fce23d734bcf4bf77d4ed9aa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_facts",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_facts/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_facts/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_facts/tests/cli/invalid_subset.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ae38ef692dbc51640d3d4cf593c6c9914b6c90376c0bd37187b5d89976fe0703",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_facts/tests/cli/not_hardware.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e1221462597e03dce00a44c82e92bc31905ce4453cd04d6f2168024dee9ec4f5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_facts/tests/cli/default_facts.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f5f1a8e574feb89ae33eda46d7ec50ba07fa6079f11aee5c41a670bf034eb1e7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_facts/tests/cli/all_facts.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ab48ea672e571204ff994ea6b27078c82fc73111bd6588a5aa390ff8caf50156",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_facts/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_facts/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_facts/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_facts/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "33a8ebecfd2c3b3a89004fdc1640f74784dcc2938ce4a55bda708102596a7de8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_facts/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "10107b2eb06436720995c57ecec2a84c241a7ef5fce23d734bcf4bf77d4ed9aa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c000804c291e7e83c19ff95a542b3bc2f92ca990df55c120666aade0fae38d8b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/_populate_network_og.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "99184795a348c3718179a12f6469025f5b40874888e2f73dee7eb7c241677b9d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fc2b73e9bc9b0ca69bc6b41546b8851d82d10d6743ea7521891c7aad8e1d60b9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ba9e79850ac112dea3117332d3038817f6155aab67979d59d7e230973351ba2c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4cf464b3bd8b5375ce936a39c61b4778d28ea9c92c1fc32669149d5dbcb1168e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b1efede62356ce86842ac8f6b6bee066643111f3725c59f71b9e9a892de2684f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e0605cbeda5172fa13d34bf4c98910ff25e2cd0b35364ff83fd9caf9404d2d21",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "17da50757f12e49ff1f1cf47ed4f1a5c4d9231d03e6ed89f5e9e19ccdb076c1c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c4d83b178309e21b4855088e4079a60337bee0e73e55dac0fcb3ce091a9eafe8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ffa88efc57c22d721b43dabae40143fa11f61e28e51632bc814c6a2c656df2a7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ce2d5ce7bc001bd249859ef9305cbe1470438e194637e86e4f887cfc6c3d2c02",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b57b940b37127b0ffd87629fca86e1307283d57da12633d4313e233f3f42777b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/_remove_og_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "386c512bf4a392dfcd2c508a47a29ec7c45729775e0e209c76de3e5095eef7a3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2beabe457a240ec85141ca5a05cd2544624e397fdd2872d5f966849550468bf6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c252e1db1e7fbfdc103586e97a7d53278d9b109eadc2cdc876a79702fb2ca8f4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb248929c73ced85f7ae3cbba03764bcfd88744108710206c807e43948e84646",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "10107b2eb06436720995c57ecec2a84c241a7ef5fce23d734bcf4bf77d4ed9aa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/asa_acls/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/target-prefixes.network",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b323ba8eb5a4df2f162b251ea20b37f6887c7f88714de8ab70ebb4dc99beade5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/network-integration.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d67b11263a8f50b30bf43c7c2b4bdd8dc4f173f0b5dd22761311360dfbd56a1d",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8a4ac4bfdef88e75d6e748e35a42fb4915947dfa2b7dd788626fd829600e014",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.10.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a01d39f278abada36c8f698d56c3a0c17efdf85178ceba34c1dc3c523679b9d",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.9.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fd9dba052f215e7f8be6af9c137d3f7b143bb64dd454d176cc60b82b45399a32",
+ "format": 1
+ },
+ {
+ "name": "test-requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d11c80229cfeba90b38ad16f96ddca133d9633808515599561579cd0e4fd659b",
+ "format": 1
+ },
+ {
+ "name": "LICENSE",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
+ "format": 1
+ },
+ {
+ "name": "changelogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs/config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "87707263b69af83db185480e9c965b2a1fee283fc57226ea02f287549e19c932",
+ "format": 1
+ },
+ {
+ "name": "changelogs/changelog.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e1dbbea2af945b1ef70430788f4bc702b41b5bb7e248bf10a395be41d919e8f2",
+ "format": 1
+ },
+ {
+ "name": "changelogs/CHANGELOG.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "17ece3f3284d75ac382f83913eefbd3276d1744c396183d3112e272f70407303",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/galaxy-version.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dda8eb2efcf0e2d799b90db8e752e5d9b5bcc49cbb0d3a55a997fea15c0520a1",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/76_asa_og_state_delete_not_working_as_expected.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ffa0c5d029934b66fd88a67f29975d18b9fa59f26b3618b35ec1a03ba1da7e8d",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/56_acl_any4_ay6_feature_update_use_rm_approach.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3c4dbce6c3eeab14ae0b31a29d442476e8b866583211841abc206795ac35b49d",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/69_resolves_acl_failure.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "89d1b570038fd757714c1890d84e493e09a740e3945fb721fc4889fda739850d",
+ "format": 1
+ },
+ {
+ "name": "requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "47d9fe78273fd64c750e78a317b1a59a6f87ebb93d8d4cf9ae6d98a0f2fc9f9e",
+ "format": 1
+ },
+ {
+ "name": "README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bcf503ad9c373b9a0af74b23483d573b017c636603538e7ce67d45aca0761fb8",
+ "format": 1
+ },
+ {
+ "name": ".yamllint",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "827ef9e031ecdcaf137be239d33ef93fcbbc3611cbb6b30b0e507d0e03373d0e",
+ "format": 1
+ },
+ {
+ "name": "meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "meta/runtime.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3c21302b2bb59ebe7e69a086cc6ff2c746dab17eea87070b191eda315beb003f",
+ "format": 1
+ },
+ {
+ "name": "docs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.asa.asa_cliconf.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0f450591136cd08a043e36557bba93fb0ebf1a19661d143c71d40e74b1baa552",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.asa.asa_facts_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b373bfa858679507001af5a41506cbe548007f70ee421989c545e747179a83b3",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.asa.asa_acls_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d76ed1d1f920e2ebb9eeefc607678c8d426d0db8e24390bf0b2e3ce7acfe5b38",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.asa.asa_acl_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "10e10ac1a7102a9779da92909e40891ba5249cfe7b34e6899e4b7c2c3de35869",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.asa.asa_command_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bc56d4332eeac8e1860e4906cfc29df5c2e06a861f90c25846e57787342a2131",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.asa.asa_og_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "86f91c0e025a2a329f2db95943845f60049266f6142d6a3bd395b24c1ff4072a",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.asa.asa_ogs_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "66160314ee315a56e577046b6bf01d4a5db970a267b4a5e48e7826c18f3d22b9",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.asa.asa_config_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7b5400359672b51d477e29435cd9045a6e93b265c5d5655a0a430b7aa04bbd25",
+ "format": 1
+ },
+ {
+ "name": "tox.ini",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fa849abc071b00742c00b96e3df480355a2af2c60e4c920f085a9ac5616d8d4b",
+ "format": 1
+ },
+ {
+ "name": "bindep.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "80645079eb025b3a905b4775ac545d080a3d7d35d537c31e04f7197c94315ab5",
+ "format": 1
+ }
+ ],
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/LICENSE b/collections-debian-merged/ansible_collections/cisco/asa/LICENSE
new file mode 100644
index 00000000..f288702d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/MANIFEST.json b/collections-debian-merged/ansible_collections/cisco/asa/MANIFEST.json
new file mode 100644
index 00000000..5937afa6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/MANIFEST.json
@@ -0,0 +1,35 @@
+{
+ "collection_info": {
+ "namespace": "cisco",
+ "name": "asa",
+ "version": "1.0.4",
+ "authors": [
+ "Ansible Security Community (ansible-security)"
+ ],
+ "readme": "README.md",
+ "tags": [
+ "cisco",
+ "asa",
+ "networking",
+ "security"
+ ],
+ "description": "Ansible Security Collection for Cisco ASA devices.",
+ "license": [],
+ "license_file": "LICENSE",
+ "dependencies": {
+ "ansible.netcommon": "*"
+ },
+ "repository": "https://github.com/ansible-collections/cisco.asa",
+ "documentation": null,
+ "homepage": null,
+ "issues": null
+ },
+ "file_manifest_file": {
+ "name": "FILES.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "27687d0148a829f0f8498e2f4a3935327029d3f0b7524876f4c87f1a86829320",
+ "format": 1
+ },
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/README.md b/collections-debian-merged/ansible_collections/cisco/asa/README.md
new file mode 100644
index 00000000..89202d67
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/README.md
@@ -0,0 +1,206 @@
+# CISCO ASA Ansible Collection
+
+[![CI](https://zuul-ci.org/gated.svg)](https://dashboard.zuul.ansible.com/t/ansible/project/github.com/ansible-collections/cisco.asa) <!--[![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/cisco)](https://codecov.io/gh/ansible-collections/cisco.asa)-->
+
+The Ansible Cisco ASA collection includes a variety of Ansible content to help automate the management of Cisco ASA firewall appliances.
+
+<!--start requires_ansible-->
+## Ansible version compatibility
+
+This collection has been tested against following Ansible versions: **>=2.9.10,<2.11**.
+
+Plugins and modules within a collection may be tested with only specific Ansible versions.
+A collection may contain metadata that identifies these versions.
+PEP440 is the schema used to describe the versions of Ansible.
+<!--end requires_ansible-->
+
+## Tested with Ansible
+
+This collection has been tested against Cisco ASA 9.10(1)11 and Cisco ASA image configured over Zuul with version 9.12.3.
+<!-- List the versions of Ansible the collection has been tested with. Must match what is in galaxy.yml. -->
+
+## External requirements
+<!-- List any external resources the collection depends on, for example minimum versions of an OS, libraries, or utilities. Do not list other Ansible collections here. -->
+### Supported connections
+The Cisco ASA collection supports ``network_cli`` connections.
+
+## Included content
+
+<!--start collection content-->
+### Cliconf plugins
+Name | Description
+--- | ---
+[cisco.asa.asa](https://github.com/ansible-collections/cisco.asa/blob/main/docs/cisco.asa.asa_cliconf.rst)|Use asa cliconf to run command on Cisco ASA platform
+
+### Modules
+Name | Description
+--- | ---
+[cisco.asa.asa_acl](https://github.com/ansible-collections/cisco.asa/blob/main/docs/cisco.asa.asa_acl_module.rst)|(deprecated, removed after 2022-06-01) Manage access-lists on a Cisco ASA
+[cisco.asa.asa_acls](https://github.com/ansible-collections/cisco.asa/blob/main/docs/cisco.asa.asa_acls_module.rst)|Access-Lists resource module
+[cisco.asa.asa_command](https://github.com/ansible-collections/cisco.asa/blob/main/docs/cisco.asa.asa_command_module.rst)|Run arbitrary commands on Cisco ASA devices
+[cisco.asa.asa_config](https://github.com/ansible-collections/cisco.asa/blob/main/docs/cisco.asa.asa_config_module.rst)|Manage configuration sections on Cisco ASA devices
+[cisco.asa.asa_facts](https://github.com/ansible-collections/cisco.asa/blob/main/docs/cisco.asa.asa_facts_module.rst)|Collect facts from remote devices running Cisco ASA
+[cisco.asa.asa_og](https://github.com/ansible-collections/cisco.asa/blob/main/docs/cisco.asa.asa_og_module.rst)|(deprecated, removed after 2022-06-01) Manage object groups on a Cisco ASA
+[cisco.asa.asa_ogs](https://github.com/ansible-collections/cisco.asa/blob/main/docs/cisco.asa.asa_ogs_module.rst)|Object Group resource module
+
+<!--end collection content-->
+
+## Installing this collection
+
+You can install the Cisco ASA collection with the Ansible Galaxy CLI:
+
+ ansible-galaxy collection install cisco.asa
+
+You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format:
+
+```yaml
+---
+collections:
+ - name: cisco.asa
+```
+## Using this collection
+
+This collection includes [security resource modules](https://docs.ansible.com/ansible/latest/network/user_guide/network_resource_modules.html). Similar to Network resource modules introduced in Ansible `2.9`
+
+### Using Cisco ASA Ansible Collection
+
+An example for using this collection to manage a ACL resource
+[Cisco ASA](https://www.cisco.com/c/en/us/td/docs/security/asa/asa90/configuration/guide/asa_90_cli_config/acl_extended.html)
+is as follows:
+
+`inventory.ini` (Note the password should be managed by a [Vault](https://docs.ansible.com/ansible/latest/user_guide/vault.html) for a production environment.
+```
+[asa01]
+host_asa.example.com
+
+[asa01:vars]
+ansible_user=admin
+ansible_ssh_pass=password
+ansible_become=true
+ansible_become_method=ansible.netcommon.enable
+ansible_become_pass=become_password
+ansible_connection=ansible.netcommon.network_cli
+ansible_network_os=cisco.asa.asa
+ansible_python_interpreter=python
+```
+
+#### Using the modules with Fully Qualified Collection Name (FQCN)
+
+You can either call modules by their Fully Qualified Collection Namespace (FQCN), like `cisco.asa.asa_acls`, or you can call modules by their short name if you list the `cisco.asa` collection in the playbook's `collections`, as follows:
+
+```yaml
+---
+- hosts: asa01
+ gather_facts: false
+ connection: network_cli
+
+ collections:
+ - cisco.asa
+
+ tasks:
+ - name: Merge the provided configuration with the existing running configuration
+ register: result
+ cisco.asa.asa_acls: &id001
+ config:
+ - acls:
+ - name: test_global_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol: tcp
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.2.0
+ netmask: 255.255.255.0
+ destination:
+ address: 192.0.3.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ log: default
+ - name: test_R1_traffic
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 2001:db8:0:3::/64
+ port_protocol:
+ eq: www
+ destination:
+ address: 2001:fc8:0:4::/64
+ port_protocol:
+ eq: telnet
+ inactive: true
+ state: merged
+```
+
+The following example task replaces configuration changes in the existing configuration on a Cisco ASA firewall device, using the FQCN:
+
+ ```yaml
+ ---
+ - name: Replace device configurations of listed ACLs with provided configurations
+ register: result
+ cisco.asa.asa_acls: &id001
+ config:
+
+ - acls:
+ - name: test_global_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.4.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 192.0.5.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ state: replaced
+```
+
+## Contributing to this collection
+
+We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the [Cisco ASA collection repository](https://github.com/ansible-collections/cisco.asa). See [Contributing to Ansible-maintained collections](https://docs.ansible.com/ansible/devel/community/contributing_maintained_collections.html#contributing-maintained-collections) for complete details.
+
+You can also join us on:
+
+- Freenode IRC - ``#ansible-security`` Freenode channel
+
+See the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) for details on contributing to Ansible.
+
+### Code of Conduct
+This collection follows the Ansible project's
+[Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html).
+Please read and familiarize yourself with this document.
+
+## Release notes
+<!--Add a link to a changelog.md file or an external docsite to cover this information. -->
+Release notes are available [here](https://github.com/ansible-collections/cisco.asa/blob/main/changelogs/CHANGELOG.rst).
+
+## Roadmap
+
+<!-- Optional. Include the roadmap for this collection, and the proposed release/versioning strategy so users can anticipate the upgrade/update cycle. -->
+
+## More information
+
+- [Ansible Collection overview](https://github.com/ansible-collections/overview)
+- [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html)
+- [Ansible Developer guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html)
+- [Ansible Community code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html)
+
+## Licensing
+
+GNU General Public License v3.0 or later.
+
+See [LICENSE](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text.
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/bindep.txt b/collections-debian-merged/ansible_collections/cisco/asa/bindep.txt
new file mode 100644
index 00000000..ba9c980f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/bindep.txt
@@ -0,0 +1,6 @@
+# This is a cross-platform list tracking distribution packages needed by tests;
+# see https://docs.openstack.org/infra/bindep/ for additional information.
+
+gcc-c++ [doc test platform:rpm]
+python3-devel [test platform:rpm]
+python3 [test platform:rpm]
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/changelogs/CHANGELOG.rst b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/CHANGELOG.rst
new file mode 100644
index 00000000..8cc74f16
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/CHANGELOG.rst
@@ -0,0 +1,77 @@
+==================================
+Cisco Asa Collection Release Notes
+==================================
+
+.. contents:: Topics
+
+v1.0.4
+======
+
+Release Summary
+---------------
+
+- Releasing 1.0.4 with updated readme with changelog link, galaxy description, and bugfix.
+
+Bugfixes
+--------
+
+- Update asa acls RM to use newer RM design approach and addeed support for any4/any6 feature (https://github.com/ansible-collections/cisco.asa/pull/64).
+- Add version key to galaxy.yaml to work around ansible-galaxy bug
+- To fix ASA OGs module where delete by name was not resulting to an expected behaviour (https://github.com/ansible-collections/cisco.asa/pull/77).
+
+v1.0.3
+======
+
+Release Summary
+---------------
+
+- Releasing 1.0.3 with updated readme with changelog link, galaxy description, and bugfix.
+
+Bugfixes
+--------
+
+- Unexpected set of CMDs fired when source and destination were both set to hosts acl. (https://github.com/ansible-collections/cisco.asa/pull/69).
+
+v1.0.2
+======
+
+Release Summary
+---------------
+
+- Re-releasing 1.0.1 with updated changelog.
+
+v1.0.1
+======
+
+Minor Changes
+-------------
+
+- Removes Cisco ASA sanity ignores and sync for argspec and docstring (https://github.com/ansible-collections/cisco.asa/pull/59).
+- Updated docs.
+
+Bugfixes
+--------
+
+- Make `src`, `backup` and `backup_options` in asa_config work when module alias is used (https://github.com/ansible-collections/cisco.asa/pull/61).
+
+v1.0.0
+======
+
+New Plugins
+-----------
+
+Cliconf
+~~~~~~~
+
+- asa - Use asa cliconf to run command on Cisco ASA platform
+
+New Modules
+-----------
+
+- asa_acl - (deprecated, removed after 2022-06-01) Manage access-lists on a Cisco ASA
+- asa_acls - Access-Lists resource module
+- asa_command - Run arbitrary commands on Cisco ASA devices
+- asa_config - Manage configuration sections on Cisco ASA devices
+- asa_facts - Collect facts from remote devices running Cisco ASA
+- asa_og - (deprecated, removed after 2022-06-01) Manage object groups on a Cisco ASA
+- asa_ogs - Object Group resource module
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/changelogs/changelog.yaml b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/changelog.yaml
new file mode 100644
index 00000000..6ac0418d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/changelog.yaml
@@ -0,0 +1,73 @@
+ancestor: null
+releases:
+ 1.0.0:
+ modules:
+ - description: (deprecated, removed after 2022-06-01) Manage access-lists on a
+ Cisco ASA
+ name: asa_acl
+ namespace: ''
+ - description: Access-Lists resource module
+ name: asa_acls
+ namespace: ''
+ - description: Run arbitrary commands on Cisco ASA devices
+ name: asa_command
+ namespace: ''
+ - description: Manage configuration sections on Cisco ASA devices
+ name: asa_config
+ namespace: ''
+ - description: Collect facts from remote devices running Cisco ASA
+ name: asa_facts
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manage object groups on
+ a Cisco ASA
+ name: asa_og
+ namespace: ''
+ - description: Object Group resource module
+ name: asa_ogs
+ namespace: ''
+ plugins:
+ cliconf:
+ - description: Use asa cliconf to run command on Cisco ASA platform
+ name: asa
+ namespace: null
+ release_date: '2020-06-23'
+ 1.0.1:
+ changes:
+ bugfixes:
+ - Make `src`, `backup` and `backup_options` in asa_config work when module alias
+ is used (https://github.com/ansible-collections/cisco.asa/pull/61).
+ minor_changes:
+ - Removes Cisco ASA sanity ignores and sync for argspec and docstring
+ (https://github.com/ansible-collections/cisco.asa/pull/59).
+ - Updated docs.
+ fragments:
+ - 48-add-change-log-1.0.0.yaml
+ - 1.1.0_update_docs.yaml
+ - fix_config_module_src_backup.yaml
+ - remove_asa_ignore.yaml
+ release_date: '2020-08-03'
+ 1.0.2:
+ changes:
+ release_summary:
+ - Re-releasing 1.0.1 with updated changelog.
+ fragments:
+ - 1.0.2.yaml
+ release_date: '2020-08-07'
+ 1.0.3:
+ changes:
+ bugfixes:
+ - Unexpected set of CMDs fired when source and destination were both set to hosts acl (https://github.com/ansible-collections/cisco.asa/pull/69).
+ fragments:
+ - 69-asa-acls-bugfix.yaml
+ release_date: '2020-08-28'
+ 1.0.4:
+ changes:
+ bugfixes:
+ - Update asa acls RM to use newer RM design approach and addeed support for any4/any6 feature (https://github.com/ansible-collections/cisco.asa/pull/64).
+ - Add version key to galaxy.yaml to work around ansible-galaxy bug
+ - To fix ASA OGs module where delete by name was not resulting to an expected behaviour (https://github.com/ansible-collections/cisco.asa/pull/77).
+ fragments:
+ - 56_acl_any4_ay6_feature_update_use_rm_approach.yaml
+ - galaxy-version.yaml
+ - 76_asa_og_state_delete_not_working_as_expected.yaml
+ release_date: '2020-11-26'
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/changelogs/config.yaml b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/config.yaml
new file mode 100644
index 00000000..dbcc1e3e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/config.yaml
@@ -0,0 +1,30 @@
+changelog_filename_template: CHANGELOG.rst
+changelog_filename_version_depth: 0
+changes_file: changelog.yaml
+changes_format: combined
+keep_fragments: false
+mention_ancestor: true
+new_plugins_after_name: removed_features
+notesdir: fragments
+prelude_section_name: release_summary
+prelude_section_title: Release Summary
+flatmap: true
+sections:
+- - major_changes
+ - Major Changes
+- - minor_changes
+ - Minor Changes
+- - breaking_changes
+ - Breaking Changes / Porting Guide
+- - deprecated_features
+ - Deprecated Features
+- - removed_features
+ - Removed Features (previously deprecated)
+- - security_fixes
+ - Security Fixes
+- - bugfixes
+ - Bugfixes
+- - known_issues
+ - Known Issues
+title: Cisco Asa Collection
+trivial_section_name: trivial
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/56_acl_any4_ay6_feature_update_use_rm_approach.yaml b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/56_acl_any4_ay6_feature_update_use_rm_approach.yaml
new file mode 100644
index 00000000..0365ba1d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/56_acl_any4_ay6_feature_update_use_rm_approach.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - Update asa acls RM to use newer RM design approach and addeed support for any4/any6 feature (https://github.com/ansible-collections/cisco.asa/issues/56).
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/69_resolves_acl_failure.yaml b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/69_resolves_acl_failure.yaml
new file mode 100644
index 00000000..071d2cd0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/69_resolves_acl_failure.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - Unexpected set of CMDs fired when source and destination were both set to hosts acl (https://github.com/ansible-collections/cisco.asa/pull/69).
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/76_asa_og_state_delete_not_working_as_expected.yaml b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/76_asa_og_state_delete_not_working_as_expected.yaml
new file mode 100644
index 00000000..1eb870ae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/76_asa_og_state_delete_not_working_as_expected.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To fix ASA OGs module where delete by name was not resulting to an expected behaviour (https://github.com/ansible-collections/cisco.asa/pull/77).
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/galaxy-version.yaml b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/galaxy-version.yaml
new file mode 100644
index 00000000..6d5e47ea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/changelogs/fragments/galaxy-version.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - Add version key to galaxy.yaml to work around ansible-galaxy bug
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_acl_module.rst b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_acl_module.rst
new file mode 100644
index 00000000..4e4fd5fc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_acl_module.rst
@@ -0,0 +1,457 @@
+.. _cisco.asa.asa_acl_module:
+
+
+*****************
+cisco.asa.asa_acl
+*****************
+
+**(deprecated, removed after 2022-06-01) Manage access-lists on a Cisco ASA**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Newer and updated modules released with more functionality in Ansible 2.10
+:Alternative: asa_acl
+
+
+
+Synopsis
+--------
+- This module allows you to work with access-lists on a Cisco ASA device.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands to append to the end of the command stack if a changed needs to be made. Just like with <em>before</em> this allows the playbook designer to append a set of commands to be executed after the command set.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code> and <code>become: yes</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The <em>config</em> argument allows the implementer to pass in the configuration to use as the base config for comparison.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>context</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies which context to target if you are running in the ASA in multiple context mode. Defaults to the current context you login to.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>force</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>The force argument instructs the module to not consider the current devices running-config. When set to true, this will cause the module to push the contents of <em>src</em> into the device without first checking if already configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lines</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: commands</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>line</b>&nbsp;&larr;</div></li>
+ <li>strict</li>
+ <li>exact</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to <em>line</em>, commands are matched line by line. If match is set to <em>strict</em>, command lines are matched with respect to position. Finally if match is set to <em>exact</em>, command lines must be an equal match.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passwords</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies which context to target if you are running in the ASA in multiple context mode. Defaults to the current context you login to.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies idle timeout in seconds for the connection, in seconds. Useful if the console freezes before continuing. For example when saving configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>replace</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>line</b>&nbsp;&larr;</div></li>
+ <li>block</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module on the way to perform the configuration on the device. If the replace argument is set to <em>line</em> then the modified lines are pushed to the device in configuration mode. If the replace argument is set to <em>block</em> then the entire command block is pushed to the device in configuration mode if any line is not correct.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.asa.asa_acl:
+ lines:
+ - access-list ACL-ANSIBLE extended permit tcp any any eq 82
+ - access-list ACL-ANSIBLE extended permit tcp any any eq www
+ - access-list ACL-ANSIBLE extended permit tcp any any eq 97
+ - access-list ACL-ANSIBLE extended permit tcp any any eq 98
+ - access-list ACL-ANSIBLE extended permit tcp any any eq 99
+ before: clear configure access-list ACL-ANSIBLE
+ match: strict
+ replace: block
+ provider: '{{ cli }}'
+
+ - cisco.asa.asa_acl:
+ lines:
+ - access-list ACL-OUTSIDE extended permit tcp any any eq www
+ - access-list ACL-OUTSIDE extended permit tcp any any eq https
+ context: customer_a
+ provider: '{{ cli }}'
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands that will be pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;access-list ACL-OUTSIDE extended permit tcp any any eq www&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Patrick Ogenstad (@ogenstad)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_acls_module.rst b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_acls_module.rst
new file mode 100644
index 00000000..e383701a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_acls_module.rst
@@ -0,0 +1,3220 @@
+.. _cisco.asa.asa_acls_module:
+
+
+******************
+cisco.asa.asa_acls
+******************
+
+**Access-Lists resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module configures and manages the named or numbered ACLs on ASA platforms.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="7">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of ACL options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of Access Control Lists (ACL).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The entries within the ACL.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>destination</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the packet destination.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Host address to match, or any single host address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match any destination address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match any ipv4 destination address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match any ipv6 destination address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A single destination host</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use interface address as destination address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>netmask</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Netmask for destination IP address, valid with IPV4 address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>object_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network object-group for destination address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the destination port along with protocol.</div>
+ <div>Note, Valid with TCP/UDP protocol_options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a greater port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a lower port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets not on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Port range operator</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the end of the port range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the start of the port range.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>grant</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>permit</li>
+ <li>deny</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the action.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inactive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Keyword for disabling an ACL element.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>line</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use this to specify line number at which ACE should be entered.</div>
+ <div>Existing ACE can be updated based on the input line number.</div>
+ <div>It&#x27;s not a required param in case of configuring the acl, but in case of Delete operation it&#x27;s required, else Delete operation won&#x27;t work as expected.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>default</li>
+ <li>alerts</li>
+ <li>critical</li>
+ <li>debugging</li>
+ <li>disable</li>
+ <li>emergencies</li>
+ <li>errors</li>
+ <li>informational</li>
+ <li>interval</li>
+ <li>notifications</li>
+ <li>warnings</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log matches against this entry.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the protocol to match.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol_options</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>protocol type.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ahp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Authentication Header Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eigrp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Cisco&#x27;s EIGRP routing protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>esp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Encapsulation Security Payload.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gre</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Cisco&#x27;s GRE tunneling.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>icmp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Internet Control Message Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>alternate_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Alternate address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>conversion_error</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Datagram conversion</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo (ping)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo reply</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Information replies</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Information requests</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mask_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mask replies</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mask_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>mask_request</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mobile_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mobile host redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parameter_problem</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All parameter problems</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All redirects</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_advertisement</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router discovery advertisements</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_solicitation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router discovery solicitations</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_quench</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Source quenches</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_route_failed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Source route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time_exceeded</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All time exceededs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timestamp_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Timestamp replies</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timestamp_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Timestamp requests</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>traceroute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Traceroute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All unreachables</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>icmp6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Internet Control Message Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo (ping)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo reply</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>membership_query</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Membership query</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>membership_reduction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Membership reduction</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>membership_report</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Membership report</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_advertisement</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Neighbor advertisement</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Neighbor redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_solicitation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Neighbor_solicitation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>packet_too_big</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Packet too big</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parameter_problem</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Parameter problem</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_advertisement</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router discovery advertisements</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_renumbering</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router renumbering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_solicitation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router solicitation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time_exceeded</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Time exceeded</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All unreachables</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>igmp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Internet Gateway Message Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>igrp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Internet Gateway Routing Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Any Internet Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipinip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>IP in IP tunneling.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>IP Security.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nos</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>KA9Q NOS compatible IP over IP tunneling.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ospf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>OSPF routing protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pcp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Payload Compression Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pim</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Protocol Independent Multicast.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pptp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Point-to-Point Tunneling Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol_number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>An IP protocol number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sctp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Stream Control Transmission Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>snp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Simple Network Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tcp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match TCP packet flags</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>udp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>User Datagram Protocol.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remark</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a comment (remark) for the access-list after this keyword</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the packet source.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source network address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match any source address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match any ipv4 source address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match any ipv6 source address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A single source host</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use interface address as source address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>netmask</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Netmask for source IP address, valid with IPV4 address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>object_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network object-group for source address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the destination port along with protocol.</div>
+ <div>Note, Valid with TCP/UDP protocol_options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a greater port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a lower port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets not on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Port range operator</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the end of the port range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the start of the port range.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time_range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a time-range.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acl_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>extended</li>
+ <li>standard</li>
+ </ul>
+ </td>
+ <td>
+ <div>ACL type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The name or the number of the ACL.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rename</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Rename an existing access-list.</div>
+ <div>If input to rename param is given, it&#x27;ll take preference over other parameters and only rename config will be matched and computed against.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The <em>running_config</em> argument allows the implementer to pass in the configuration to use as the base config for comparison.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco ASA Version 9.10(1)11
+ - This module works with connection ``network_cli``. See `ASA Platform Options <../network/user_guide/platform_asa.html>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ # Before state:
+ # -------------
+ #
+ # vasa#sh access-lists
+ # access-list global_access; 2 elements; name hash: 0xbd6c87a7
+ # access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+ # access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+ # access-list R1_traffic; 1 elements; name hash: 0xaf40d3c2
+ # access-list R1_traffic line 1
+ # extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+ # log errors interval 300 (hitcnt=0) 0x4a4660f3
+
+ - name: Merge provided configuration with device configuration
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: temp_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.2.0
+ netmask: 255.255.255.0
+ destination:
+ address: 192.0.3.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ log: default
+ - grant: deny
+ line: 2
+ protocol_options:
+ igrp: true
+ source:
+ address: 198.51.100.0
+ netmask: 255.255.255.0
+ destination:
+ address: 198.51.110.0
+ netmask: 255.255.255.0
+ time_range: temp
+ - grant: deny
+ line: 3
+ protocol_options:
+ tcp: true
+ source:
+ interface: management
+ destination:
+ interface: management
+ port_protocol:
+ eq: www
+ log: warnings
+ - grant: deny
+ line: 4
+ protocol_options:
+ tcp: true
+ source:
+ object_group: test_og_network
+ destination:
+ object_group: test_network_og
+ port_protocol:
+ eq: www
+ log: default
+ - name: global_access
+ acl_type: extended
+ aces:
+ - line: 3
+ remark: test global access
+ - grant: deny
+ line: 4
+ protocol_options:
+ tcp: true
+ source:
+ any: true
+ destination:
+ any: true
+ port_protocol:
+ eq: www
+ log: errors
+ - name: R1_traffic
+ aces:
+ - line: 1
+ remark: test_v6_acls
+ - grant: deny
+ line: 2
+ protocol_options:
+ tcp: true
+ source:
+ address: 2001:db8:0:3::/64
+ port_protocol:
+ eq: www
+ destination:
+ address: 2001:fc8:0:4::/64
+ port_protocol:
+ eq: telnet
+ inactive: true
+ state: merged
+
+ # Commands fired:
+ # ---------------
+ # access-list global_access line 3 remark test global access
+ # access-list global_access line 4 extended deny tcp any any eq www log errors interval 300
+ # access-list R1_traffic line 1 remark test_v6_acls
+ # access-list R1_traffic line 2 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive
+ # access-list temp_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+ # access-list temp_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+ # time-range temp inactive
+ # access-list temp_access line 2 extended deny tcp interface management interface management
+ # eq www log warnings
+ # access-list test_access line 3 extended deny tcp object-group test_og_network object-group test_network_og
+ # eq www log default
+
+ # After state:
+ # ------------
+ #
+ # vasa#sh access-lists
+ # access-list global_access; 3 elements; name hash: 0xbd6c87a7
+ # access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+ # access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+ # access-list global_access line 3 remark test global access (hitcnt=0) 0xae78337e
+ # access-list global_access line 4 extended deny tcp any any eq www log errors interval 300 (hitcnt=0) 0x605f2421
+ # access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+ # access-list R1_traffic line 1 remark test_v6_acls
+ # access-list R1_traffic line 2
+ # extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+ # inactive (hitcnt=0) (inactive) 0xe922b432
+ # access-list temp_access; 2 elements; name hash: 0xaf1b712e
+ # access-list temp_access line 1
+ # extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+ # log default (hitcnt=0) 0xb58abb0d
+ # access-list temp_access line 2
+ # extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+ # time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+ # access-list test_access line 3
+ # extended deny tcp interface management interface management eq www log warnings
+ # interval 300 (hitcnt=0) 0x78aa233d
+ # access-list test_access line 2 extended deny tcp object-group test_og_network object-group test_network_og
+ # eq www log default (hitcnt=0) 0x477aec1e
+ # access-list test_access line 2 extended deny tcp 192.0.2.0 255.255.255.0 host 192.0.3.1 eq www
+ # log default (hitcnt=0) 0xdc7edff8
+ # access-list test_access line 2 extended deny tcp 192.0.2.0 255.255.255.0 host 192.0.3.2 eq www
+ # log default (hitcnt=0) 0x7b0e9fde
+ # access-list test_access line 2 extended deny tcp 198.51.100.0 255.255.255.0 2001:db8:3::/64 eq www
+ # log default (hitcnt=0) 0x97c75adc
+
+ # Using Merged to Rename ACLs
+ # Before state:
+ # -------------
+ #
+ # vasa#sh access-lists
+ # access-list global_access; 2 elements; name hash: 0xbd6c87a7
+ # access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+ # access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+ # access-list R1_traffic; 1 elements; name hash: 0xaf40d3c2
+ # access-list R1_traffic line 1
+ # extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+ # log errors interval 300 (hitcnt=0) 0x4a4660f3
+
+ - name: Rename ACL with different name using Merged state
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: global_access
+ rename: global_access_renamed
+ - name: R1_traffic
+ rename: R1_traffic_renamed
+ state: merged
+
+ # Commands fired:
+ # ---------------
+ # access-list global_access rename global_access_renamed
+ # access-list R1_traffic rename R1_traffic_renamed
+
+ # After state:
+ # -------------
+ #
+ # vasa#sh access-lists
+ # access-list global_access_renamed; 2 elements; name hash: 0xbd6c87a7
+ # access-list global_access_renamed line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+ # access-list global_access_renamed line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+ # access-list R1_traffic_renamed; 1 elements; name hash: 0xaf40d3c2
+ # access-list R1_traffic_renamed line 1
+ # extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+ # log errors interval 300 (hitcnt=0) 0x4a4660f3
+
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # vasa#sh access-lists
+ # access-list global_access; 3 elements; name hash: 0xbd6c87a7
+ # access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+ # access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+ # access-list global_access line 3 extended deny tcp any any eq www log errors interval 300 (hitcnt=0) 0x605f2421
+ # access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+ # access-list R1_traffic line 1
+ # extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+ # log errors interval 300 (hitcnt=0) 0x4a4660f3
+ # access-list R1_traffic line 2
+ # extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+ # inactive (hitcnt=0) (inactive) 0xe922b432
+ # access-list temp_access; 2 elements; name hash: 0xaf1b712e
+ # access-list temp_access line 1
+ # extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+ # log default (hitcnt=0) 0xb58abb0d
+ # access-list temp_access line 2
+ # extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+ # time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+
+ - name: Replaces device configuration of listed acl with provided configuration
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: global_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.4.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 192.0.5.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ state: replaced
+
+ # Commands fired:
+ # ---------------
+ # no access-list global_access line 3 extended deny tcp any any eq www log errors interval 300
+ # no access-list global_access line 2 extended deny tcp any any eq telnet
+ # no access-list global_access line 1 extended permit icmp any any log disable
+ # access-list global_access line 1 extended deny tcp 192.0.4.0 255.255.255.0 eq telnet 192.0.5.0 255.255.255.0 eq www
+
+ # After state:
+ # -------------
+ #
+ # vasa#sh access-lists
+ # access-list global_access; 1 elements; name hash: 0xbd6c87a7
+ # access-list global_access line 1 extended deny tcp 192.0.4.0 255.255.255.0 eq telnet
+ # 192.0.5.0 255.255.255.0 eq www (hitcnt=0) 0x3e5b2757
+ # access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+ # access-list R1_traffic line 1
+ # extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+ # log errors interval 300 (hitcnt=0) 0x4a4660f3
+ # access-list R1_traffic line 2
+ # extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+ # inactive (hitcnt=0) (inactive) 0xe922b432
+ # access-list temp_access; 2 elements; name hash: 0xaf1b712e
+ # access-list temp_access line 1
+ # extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+ # log default (hitcnt=0) 0xb58abb0d
+ # access-list temp_access line 2
+ # extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+ # time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # vasa#sh access-lists
+ # access-list global_access; 3 elements; name hash: 0xbd6c87a7
+ # access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+ # access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+ # access-list global_access line 3 extended deny tcp any any eq www log errors interval 300 (hitcnt=0) 0x605f2421
+ # access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+ # access-list R1_traffic line 1
+ # extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+ # log errors interval 300 (hitcnt=0) 0x4a4660f3
+ # access-list R1_traffic line 2
+ # extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+ # inactive (hitcnt=0) (inactive) 0xe922b432
+ # access-list temp_access; 2 elements; name hash: 0xaf1b712e
+ # access-list temp_access line 1
+ # extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+ # log default (hitcnt=0) 0xb58abb0d
+ # access-list temp_access line 2
+ # extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+ # time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+
+
+ - name: Override device configuration of all acl with provided configuration
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: global_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.4.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 192.0.5.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ state: overridden
+
+ # Commands fired:
+ # ---------------
+ # access-list temp_access line 2
+ # extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 time-range temp
+ # no access-list temp_access line 1
+ # extended grant deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+ # no access-list R1_traffic line 2
+ # extended grant deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive
+ # no access-list R1_traffic line 1
+ # extended grant deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www log errors
+ # no access-list global_access line 3 extended grant deny tcp any any eq www log errors
+ # no access-list global_access line 2 extended grant deny tcp any any eq telnet
+ # no access-list global_access line 1 extended grant permit icmp any any log disable
+ # access-list global_access line 4 extended deny tcp 192.0.4.0 255.255.255.0 eq telnet 192.0.5.0 255.255.255.0 eq www
+
+ # After state:
+ # -------------
+ #
+ # vasa#sh access-lists
+ # access-list global_access; 1 elements; name hash: 0xbd6c87a7
+ # access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+
+ # Using Deleted
+
+ # Before state:
+ # -------------
+ #
+ # vasa#sh access-lists
+ # access-list global_access; 3 elements; name hash: 0xbd6c87a7
+ # access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+ # access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+ # access-list global_access line 3 extended deny tcp any any eq www log errors interval 300 (hitcnt=0) 0x605f2421
+ # access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+ # access-list R1_traffic line 1
+ # extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+ # log errors interval 300 (hitcnt=0) 0x4a4660f3
+ # access-list R1_traffic line 2
+ # extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+ # inactive (hitcnt=0) (inactive) 0xe922b432
+ # access-list temp_access; 2 elements; name hash: 0xaf1b712e
+ # access-list temp_access line 1
+ # extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+ # log default (hitcnt=0) 0xb58abb0d
+ # access-list temp_access line 2
+ # extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+ # time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+
+ - name: "Delete module attributes of given acl (Note: This won't delete ALL of the ACLs configured)"
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: temp_access
+ - name: global_access
+ state: deleted
+
+ # Commands fired:
+ # ---------------
+ # no access-list temp_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+ # time-range temp inactive
+ # no access-list temp_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+ # log default
+ # no access-list global_access line 3 extended deny tcp any any eq www log errors interval 300
+ # no access-list global_access line 2 extended deny tcp any any eq telnet
+ # no access-list global_access line 1 extended permit icmp any any log disable
+
+ # After state:
+ # -------------
+ #
+ # vasa#sh access-lists
+ # access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+ # access-list R1_traffic line 1
+ # extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+ # log errors interval 300 (hitcnt=0) 0x4a4660f3
+ # access-list R1_traffic line 2
+ # extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+ # inactive (hitcnt=0) (inactive) 0xe922b432
+
+ # Using Deleted without any config passed
+ #"(NOTE: This will delete all of configured resource module attributes)"
+
+ # Before state:
+ # -------------
+ #
+ # vasa#sh access-lists
+ # access-list global_access; 3 elements; name hash: 0xbd6c87a7
+ # access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+ # access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+ # access-list global_access line 3 extended deny tcp any any eq www log errors interval 300 (hitcnt=0) 0x605f2421
+ # access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+ # access-list R1_traffic line 1
+ # extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+ # log errors interval 300 (hitcnt=0) 0x4a4660f3
+ # access-list R1_traffic line 2
+ # extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+ # inactive (hitcnt=0) (inactive) 0xe922b432
+ # access-list temp_access; 2 elements; name hash: 0xaf1b712e
+ # access-list temp_access line 1
+ # extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+ # log default (hitcnt=0) 0xb58abb0d
+ # access-list temp_access line 2
+ # extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+ # time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+
+ - name: 'Delete ALL ACLs in one go (Note: This WILL delete the ALL of configured ACLs)'
+ cisco.asa.asa_acls:
+ state: deleted
+
+ # Commands fired:
+ # ---------------
+ # no access-list global_access line 1 extended permit icmp any any log disable
+ # no access-list global_access line 2 extended deny tcp any any eq telnet
+ # no access-list global_access line 3 extended deny tcp any any eq www log errors interval 300
+ # no access-list R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+ # log errors interval 300
+ # no access-list R1_traffic line 2 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive
+ # no access-list temp_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+ # no access-list temp_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+ # time-range temp inactive
+
+
+ # After state:
+ # -------------
+ #
+ # vasa#sh access-lists
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # access-list global_access; 3 elements; name hash: 0xbd6c87a7
+ # access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+ # access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+ # access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+ # access-list R1_traffic line 1
+ # extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+ # log errors interval 300 (hitcnt=0) 0x4a4660f3
+ # access-list R1_traffic line 2
+ # extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+ # inactive (hitcnt=0) (inactive) 0xe922b432
+ # access-list temp_access; 2 elements; name hash: 0xaf1b712e
+ # access-list temp_access line 1
+ # extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+ # log default (hitcnt=0) 0xb58abb0d
+ # access-list temp_access line 2
+ # extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+ # time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+
+
+ - name: Gather listed ACLs with provided configurations
+ cisco.asa.asa_acls:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "acls": [
+ # {
+ # "aces": [
+ # {
+ # "destination": {
+ # "any": true
+ # },
+ # "grant": "permit",
+ # "line": 1,
+ # "log": "disable",
+ # "protocol": "icmp",
+ # "source": {
+ # "any": true
+ # }
+ # },
+ # {
+ # "destination": {
+ # "any": true,
+ # "port_protocol": {
+ # "eq": "telnet"
+ # }
+ # },
+ # "grant": "deny",
+ # "line": 2,
+ # "protocol": "tcp",
+ # "protocol_options": {
+ # "tcp": true
+ # },
+ # "source": {
+ # "any": true
+ # }
+ # }
+ # ],
+ # "acl_type": "extended",
+ # "name": "global_access"
+ # },
+ # {
+ # "aces": [
+ # {
+ # "destination": {
+ # "address": "2001:fc8:0:4::/64",
+ # "port_protocol": {
+ # "eq": "www"
+ # }
+ # },
+ # "grant": "deny",
+ # "line": 1,
+ # "log": "errors",
+ # "protocol": "tcp",
+ # "protocol_options": {
+ # "tcp": true
+ # },
+ # "source": {
+ # "address": "2001:db8:0:3::/64",
+ # "port_protocol": {
+ # "eq": "telnet"
+ # }
+ # }
+ # },
+ # {
+ # "destination": {
+ # "address": "2001:fc8:0:4::/64",
+ # "port_protocol": {
+ # "eq": "telnet"
+ # }
+ # },
+ # "grant": "deny",
+ # "inactive": true,
+ # "line": 2,
+ # "protocol": "tcp",
+ # "protocol_options": {
+ # "tcp": true
+ # },
+ # "source": {
+ # "address": "2001:db8:0:3::/64",
+ # "port_protocol": {
+ # "eq": "www"
+ # }
+ # }
+ # }
+ # ],
+ # "acl_type": "extended",
+ # "name": "R1_traffic"
+ # },
+ # {
+ # "aces": [
+ # {
+ # "destination": {
+ # "address": "192.0.3.0",
+ # "netmask": "255.255.255.0",
+ # "port_protocol": {
+ # "eq": "www"
+ # }
+ # },
+ # "grant": "deny",
+ # "line": 1,
+ # "log": "default",
+ # "protocol": "tcp",
+ # "protocol_options": {
+ # "tcp": true
+ # },
+ # "source": {
+ # "address": "192.0.2.0",
+ # "netmask": "255.255.255.0"
+ # }
+ # },
+ # {
+ # "destination": {
+ # "address": "198.51.110.0",
+ # "netmask": "255.255.255.0"
+ # },
+ # "grant": "deny",
+ # "inactive": true,
+ # "line": 2,
+ # "protocol": "igrp",
+ # "protocol_options": {
+ # "igrp": true
+ # },
+ # "source": {
+ # "address": "198.51.100.0",
+ # "netmask": "255.255.255.0"
+ # },
+ # "time_range": "temp"
+ # }
+ # ],
+ # "acl_type": "extended",
+ # "name": "temp_access"
+ # }
+ # ]
+ # }
+ # ]
+
+ # Using Rendered
+
+ - name: Rendered the provided configuration with the exisiting running configuration
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: temp_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.2.0
+ netmask: 255.255.255.0
+ destination:
+ address: 192.0.3.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ log: default
+ - grant: deny
+ line: 2
+ protocol_options:
+ igrp: true
+ source:
+ address: 198.51.100.0
+ netmask: 255.255.255.0
+ destination:
+ address: 198.51.110.0
+ netmask: 255.255.255.0
+ time_range: temp
+ - name: R1_traffic
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp: true
+ source:
+ address: 2001:db8:0:3::/64
+ port_protocol:
+ eq: www
+ destination:
+ address: 2001:fc8:0:4::/64
+ port_protocol:
+ eq: telnet
+ inactive: true
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "access-list temp_access line 1
+ # extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0
+ # eq www log default"
+ # "access-list temp_access line 2
+ # extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+ # time-range temp"
+ # "access-list R1_traffic
+ # deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive"
+ # ]
+
+ # Using Parsed
+
+ # parsed.cfg
+ #
+ # access-list test_access; 2 elements; name hash: 0xaf1b712e
+ # access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+ # access-list test_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 log errors
+ # access-list test_R1_traffic; 1 elements; name hash: 0xaf40d3c2
+ # access-list test_R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive
+
+ - name: Parse the commands for provided configuration
+ cisco.asa.asa_acls:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": [
+ # {
+ # "acls": [
+ # {
+ # "aces": [
+ # {
+ # "destination": {
+ # "address": "192.0.3.0",
+ # "netmask": "255.255.255.0",
+ # "port_protocol": {
+ # "eq": "www"
+ # }
+ # },
+ # "grant": "deny",
+ # "line": 1,
+ # "log": "default",
+ # "protocol": "tcp",
+ # "protocol_options": {
+ # "tcp": true
+ # },
+ # "source": {
+ # "address": "192.0.2.0",
+ # "netmask": "255.255.255.0"
+ # }
+ # },
+ # {
+ # "destination": {
+ # "address": "198.51.110.0",
+ # "netmask": "255.255.255.0"
+ # },
+ # "grant": "deny",
+ # "line": 2,
+ # "log": "errors",
+ # "protocol": "igrp",
+ # "protocol_options": {
+ # "igrp": true
+ # },
+ # "source": {
+ # "address": "198.51.100.0",
+ # "netmask": "255.255.255.0"
+ # }
+ # }
+ # ],
+ # "acl_type": "extended",
+ # "name": "test_access"
+ # },
+ # {
+ # "aces": [
+ # {
+ # "destination": {
+ # "address": "2001:fc8:0:4::/64",
+ # "port_protocol": {
+ # "eq": "telnet"
+ # }
+ # },
+ # "grant": "deny",
+ # "inactive": true,
+ # "line": 1,
+ # "protocol": "tcp",
+ # "protocol_options": {
+ # "tcp": true
+ # },
+ # "source": {
+ # "address": "2001:db8:0:3::/64",
+ # "port_protocol": {
+ # "eq": "www"
+ # }
+ # }
+ # }
+ # ],
+ # "acl_type": "extended",
+ # "name": "test_R1_TRAFFIC"
+ # }
+ # ]
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;access-list global_access line 1 extended permit icmp any any log disable&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_cliconf.rst b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_cliconf.rst
new file mode 100644
index 00000000..d484aca1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_cliconf.rst
@@ -0,0 +1,43 @@
+.. _cisco.asa.asa_cliconf:
+
+
+*************
+cisco.asa.asa
+*************
+
+**Use asa cliconf to run command on Cisco ASA platform**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This asa plugin provides low level abstraction apis for sending and receiving CLI commands from Cisco ASA network devices.
+
+
+
+
+
+
+
+
+
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Ansible Security Team
+
+
+.. hint::
+ Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_command_module.rst b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_command_module.rst
new file mode 100644
index 00000000..fd150c14
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_command_module.rst
@@ -0,0 +1,443 @@
+.. _cisco.asa.asa_command_module:
+
+
+*********************
+cisco.asa.asa_command
+*********************
+
+**Run arbitrary commands on Cisco ASA devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Sends arbitrary commands to an ASA node and returns the results read from the device. The ``asa_command`` module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code> and <code>become: yes</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of commands to send to the remote device over the configured provider. The resulting output from the command is returned. If the <em>wait_for</em> argument is provided, the module is not returned until the condition is satisfied or the number of retires as expired.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>context</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies which context to target if you are running in the ASA in multiple context mode. Defaults to the current context you login to.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">1</div>
+ </td>
+ <td>
+ <div>Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditions, the interval indicates how long to wait before trying the command again.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>any</li>
+ <li><div style="color: blue"><b>all</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>The <em>match</em> argument is used in conjunction with the <em>wait_for</em> argument to specify the match policy. Valid values are <code>all</code> or <code>any</code>. If the value is set to <code>all</code> then all conditionals in the wait_for must be satisfied. If the value is set to <code>any</code> then only one of the values must be satisfied.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passwords</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies which context to target if you are running in the ASA in multiple context mode. Defaults to the current context you login to.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies idle timeout in seconds for the connection, in seconds. Useful if the console freezes before continuing. For example when saving configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retries</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">10</div>
+ </td>
+ <td>
+ <div>Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the <em>wait_for</em> conditions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: waitfor</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - When processing wait_for, each commands' output is stored as an element of the *result* array. The allowed operators for conditional evaluation are *eq*, *==*, *neq*, *ne*, *!=*, *gt*, *>*, *ge*, *>=*, *lt*, *<*, *le*, *<=*, *contains*, *matches*. Operators can be prefaced by *not* to negate their meaning. The *contains* operator searches for a substring match (like the Python *in* operator). The *matches* operator searches using a regex search operation.
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Show the ASA version
+ cisco.asa.asa_command:
+ commands:
+ - show version
+
+ - name: Show ASA drops and memory
+ cisco.asa.asa_command:
+ commands:
+ - show asp drop
+ - show memory
+
+ - name: Send repeat pings and wait for the result to pass 100%
+ cisco.asa.asa_command:
+ commands:
+ - ping 8.8.8.8 repeat 20 size 350
+ wait_for:
+ - result[0] contains 100
+ retries: 2
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>failed_conditions</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>failed</td>
+ <td>
+ <div>the conditionals that failed</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;...&#x27;, &#x27;...&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>stdout</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>the set of responses from the commands</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;...&#x27;, &#x27;...&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>stdout_lines</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The value of stdout split into a list</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[[&#x27;...&#x27;, &#x27;...&#x27;], [&#x27;...&#x27;], [&#x27;...&#x27;]]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip), Patrick Ogenstad (@ogenstad)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_config_module.rst b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_config_module.rst
new file mode 100644
index 00000000..8f918f25
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_config_module.rst
@@ -0,0 +1,641 @@
+.. _cisco.asa.asa_config_module:
+
+
+********************
+cisco.asa.asa_config
+********************
+
+**Manage configuration sections on Cisco ASA devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Cisco ASA configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with ASA configuration sections in a deterministic way.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with <em>before</em> this allows the playbook designer to append a set of commands to be executed after the command set.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code> and <code>become: yes</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>backup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>This argument will cause the module to create a full backup of the current <code>running-config</code> from the remote device before any changes are made. If the <code>backup_options</code> value is not given, the backup file is written to the <code>backup</code> folder in the playbook root directory. If the directory does not exist, it is created.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>backup_options</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This is a dict object containing configurable options related to backup file path. The value of this option is read only when <code>backup</code> is set to <em>yes</em>, if <code>backup</code> is set to <em>no</em> this option will be silently ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dir_path</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of <code>filename</code> or default filename as described in <code>filename</code> options description. If the path value is not given in that case a <em>backup</em> directory will be created in the current working directory and backup configuration will be copied in <code>filename</code> within <em>backup</em> directory.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filename</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by &lt;hostname&gt;_config.&lt;current-date&gt;@&lt;current-time&gt;</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <code>config</code> argument allows the playbook designer to supply the base configuration to be used to validate configuration changes necessary. If this argument is provided, the module will not download the running-config from the remote node.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>context</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies which context to target if you are running in the ASA in multiple context mode. Defaults to the current context you login to.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>defaults</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>This argument specifies whether or not to collect all defaults when getting the remote device running config. When enabled, the module will get the current config by issuing the command <code>show running-config all</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lines</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: commands</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>line</b>&nbsp;&larr;</div></li>
+ <li>strict</li>
+ <li>exact</li>
+ <li>none</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to <em>line</em>, commands are matched line by line. If match is set to <em>strict</em>, command lines are matched with respect to position. If match is set to <em>exact</em>, command lines must be an equal match. Finally, if match is set to <em>none</em>, the module will not attempt to compare the source configuration with the running configuration on the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parents</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>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.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passwords</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>This argument specifies to include passwords in the config when retrieving the running-config from the remote device. This includes passwords related to VPN endpoints. This argument is mutually exclusive with <em>defaults</em>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies idle timeout in seconds for the connection, in seconds. Useful if the console freezes before continuing. For example when saving configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>replace</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>line</b>&nbsp;&larr;</div></li>
+ <li>block</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module on the way to perform the configuration on the device. If the replace argument is set to <em>line</em> then the modified lines are pushed to the device in configuration mode. If the replace argument is set to <em>block</em> then the entire command block is pushed to the device in configuration mode if any line is not correct</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>save</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>The <code>save</code> argument instructs the module to save the running- config to the startup-config at the conclusion of the module running. If check mode is specified, this argument is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>src</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with <em>lines</em>, <em>parents</em>.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.asa.asa_config:
+ lines:
+ - network-object host 10.80.30.18
+ - network-object host 10.80.30.19
+ - network-object host 10.80.30.20
+ parents: [object-group network OG-MONITORED-SERVERS]
+ provider: '{{ cli }}'
+
+ - cisco.asa.asa_config:
+ host: '{{ inventory_hostname }}'
+ lines:
+ - message-length maximum client auto
+ - message-length maximum 512
+ match: line
+ parents: [policy-map type inspect dns PM-DNS, parameters]
+ authorize: yes
+ auth_pass: cisco
+ username: admin
+ password: cisco
+ context: ansible
+
+ - cisco.asa.asa_config:
+ lines:
+ - ikev1 pre-shared-key MyS3cretVPNK3y
+ parents: tunnel-group 1.1.1.1 ipsec-attributes
+ passwords: yes
+ provider: '{{ cli }}'
+
+ - name: attach ASA acl on interface vlan13/nameif cloud13
+ cisco.asa.asa_config:
+ lines:
+ - access-group cloud-acl_access_in in interface cloud13
+ provider: '{{ cli }}'
+
+ - name: configure ASA (>=9.2) default BGP
+ cisco.asa.asa_config:
+ lines:
+ - bgp log-neighbor-changes
+ - bgp bestpath compare-routerid
+ provider: '{{ cli }}'
+ parents:
+ - router bgp 65002
+ register: bgp
+ when: bgp_default_config is defined
+ - name: configure ASA (>=9.2) BGP neighbor in default/single context mode
+ cisco.asa.asa_config:
+ lines:
+ - bgp router-id {{ bgp_router_id }}
+ - neighbor {{ bgp_neighbor_ip }} remote-as {{ bgp_neighbor_as }}
+ - neighbor {{ bgp_neighbor_ip }} description {{ bgp_neighbor_name }}
+ provider: '{{ cli }}'
+ parents:
+ - router bgp 65002
+ - address-family ipv4 unicast
+ register: bgp
+ when: bgp_neighbor_as is defined
+ - name: configure ASA interface with standby
+ cisco.asa.asa_config:
+ lines:
+ - description my cloud interface
+ - nameif cloud13
+ - security-level 50
+ - ip address 192.168.13.1 255.255.255.0 standby 192.168.13.2
+ provider: '{{ cli }}'
+ parents: [interface Vlan13]
+ register: interface
+ - name: Show changes to interface from task above
+ debug:
+ var: interface
+
+ - name: configurable backup path
+ cisco.asa.asa_config:
+ lines:
+ - access-group cloud-acl_access_in in interface cloud13
+ provider: '{{ cli }}'
+ backup: yes
+ backup_options:
+ filename: backup.cfg
+ dir_path: /home/user
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>backup_path</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes</td>
+ <td>
+ <div>The full path to the backup file</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/playbooks/ansible/backup/asa_config.2016-07-16@22:28:34</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands that will be pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;...&#x27;, &#x27;...&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip), Patrick Ogenstad (@ogenstad)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_facts_module.rst b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_facts_module.rst
new file mode 100644
index 00000000..8cdbc344
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_facts_module.rst
@@ -0,0 +1,628 @@
+.. _cisco.asa.asa_facts_module:
+
+
+*******************
+cisco.asa.asa_facts
+*******************
+
+**Collect facts from remote devices running Cisco ASA**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Collects a base set of device facts from a remote device that is running ASA. This module prepends all of the base network fact keys with ``ansible_net_<fact>``. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
+- Note, to collects facts from ASA device properly user should elevate the privilege to become.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code> and <code>become: yes</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>context</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies which context to target if you are running in the ASA in multiple context mode. Defaults to the current context you login to.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gather_network_resources</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>When supplied, this argument will restrict the facts collected 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. Values can also be used with an initial <code><span class='module'>!</span></code> to specify that a specific subset should not be collected. Valid subsets are &#x27;all&#x27;, &#x27;acls&#x27;, &#x27;ogs&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gather_subset</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"!config"</div>
+ </td>
+ <td>
+ <div>When supplied, this argument restricts the facts collected to a given subset.</div>
+ <div>Possible values for this argument include <code>all</code>, <code>min</code>, <code>hardware</code>, <code>config</code>.</div>
+ <div>Specify a list of values to include a larger subset.</div>
+ <div>Use a value with an initial <code>!</code> to collect all facts except that subset.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passwords</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies which context to target if you are running in the ASA in multiple context mode. Defaults to the current context you login to.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies idle timeout in seconds for the connection, in seconds. Useful if the console freezes before continuing. For example when saving configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against asa 9.10(1)11
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Gather all legacy facts
+ cisco.asa.asa_facts:
+ gather_subset: all
+
+ - name: Gather only the config and default facts
+ cisco.asa.asa_facts:
+ gather_subset:
+ - config
+
+ - name: Do not gather hardware facts
+ cisco.asa.asa_facts:
+ gather_subset:
+ - '!hardware'
+
+ - name: Gather legacy and resource facts
+ cisco.asa.asa_facts:
+ gather_subset: all
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_api</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The name of the transport</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_asatype</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The operating system type (Cisco ASA) running on the remote device.</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_config</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when config is configured</td>
+ <td>
+ <div>The current active config from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_device_mgr_version</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The Device manager version running on the remote device.</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_filesystems</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>All file system names available on the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_filesystems_info</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>A hash of all file systems containing info about each file system (e.g. free and total space)</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_firepower_version</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The Firepower operating system version running on the remote device.</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_gather_subset</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of fact subsets collected from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_hostname</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configured hostname of the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_image</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The image file the device is running</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_memfree_mb</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>The available free memory on the remote device in Mb</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_memtotal_mb</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>The total memory on the remote device in Mb</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_memused_mb</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>The used memory on the remote device in Mb</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_model</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The model name returned from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_python_version</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The Python version Ansible controller is using</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_serialnum</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The serial number of the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_stacked_models</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when multiple devices are configured in a stack</td>
+ <td>
+ <div>The model names of each device in the stack</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_stacked_serialnums</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when multiple devices are configured in a stack</td>
+ <td>
+ <div>The serial numbers of each device in the stack</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_version</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The operating system version running on the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_og_module.rst b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_og_module.rst
new file mode 100644
index 00000000..cde1707d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_og_module.rst
@@ -0,0 +1,328 @@
+.. _cisco.asa.asa_og_module:
+
+
+****************
+cisco.asa.asa_og
+****************
+
+**(deprecated, removed after 2022-06-01) Manage object groups on a Cisco ASA**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Newer and updated modules released with more functionality in Ansible 2.10
+:Alternative: asa_ogs
+
+
+
+Synopsis
+--------
+- This module allows you to create and update object-group network/service on Cisco ASA device.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The description for the object-group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_object</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The group-object for network object-group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>network-object</li>
+ <li>service-object</li>
+ <li>port-object</li>
+ </ul>
+ </td>
+ <td>
+ <div>The object group type.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_ip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The host IP address for object-group network.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ip_mask</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The IP address and mask for network object-group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the object group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The single port for port-object.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The port range for port-object.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>udp</li>
+ <li>tcp</li>
+ <li>tcp-udp</li>
+ </ul>
+ </td>
+ <td>
+ <div>The protocol for object-group service with port-object.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>service_cfg</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The service-object configuration protocol, direction, range or port.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ <li>replace</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure network object-group
+ cisco.asa.asa_og:
+ name: ansible_test_0
+ group_type: network-object
+ state: present
+ description: ansible_test object-group description
+ host_ip:
+ - 8.8.8.8
+ - 8.8.4.4
+ ip_mask:
+ - 10.0.0.0 255.255.255.0
+ - 192.168.0.0 255.255.0.0
+ group_object:
+ - awx_lon
+ - awx_ams
+
+ - name: configure port-object object-group
+ cisco.asa.asa_og:
+ name: ansible_test_1
+ group_type: port-object
+ state: replace
+ description: ansible_test object-group description
+ protocol: tcp-udp
+ port_eq:
+ - 1025
+ - kerberos
+ port_range:
+ - 1025 5201
+ - 0 1024
+
+ - name: configure service-object object-group
+ cisco.asa.asa_og:
+ name: ansible_test_2
+ group_type: service-object
+ state: absent
+ description: ansible_test object-group description
+ service_cfg:
+ - tcp destination eq 8080
+ - tcp destination eq www
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;object-group network ansible_test_0&#x27;, &#x27;description ansible_test object-group description&#x27;, &#x27;network-object host 8.8.8.8&#x27;, &#x27;network-object host 8.8.4.4&#x27;, &#x27;network-object 10.0.0.0 255.255.255.0&#x27;, &#x27;network-object 192.168.0.0 255.255.0.0&#x27;, &#x27;network-object 192.168.0.0 255.255.0.0&#x27;, &#x27;group-object awx_lon&#x27;, &#x27;group-object awx_ams&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Federico Olivieri (@Federico87)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_ogs_module.rst b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_ogs_module.rst
new file mode 100644
index 00000000..413640ee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/docs/cisco.asa.asa_ogs_module.rst
@@ -0,0 +1,1369 @@
+.. _cisco.asa.asa_ogs_module:
+
+
+*****************
+cisco.asa.asa_ogs
+*****************
+
+**Object Group resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module configures and manages Objects and Groups on ASA platforms.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="5">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of Object Group options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>object_groups</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The object groups.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The description for the object-group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>icmp_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure an ICMP-type object</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>icmp_object</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>alternate-address</li>
+ <li>conversion-error</li>
+ <li>echo</li>
+ <li>echo-reply</li>
+ <li>information-reply</li>
+ <li>information-request</li>
+ <li>mask-reply</li>
+ <li>mask-request</li>
+ <li>mobile-redirect</li>
+ <li>parameter-problem</li>
+ <li>redirect</li>
+ <li>router-advertisement</li>
+ <li>router-solicitation</li>
+ <li>source-quench</li>
+ <li>time-exceeded</li>
+ <li>timestamp-reply</li>
+ <li>timestamp-request</li>
+ <li>traceroute</li>
+ <li>unreachable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Defines the ICMP types in the group.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies object-group ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network_object</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure a network object</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter an IPv4 network address with space seperated netmask.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set this to specify a single host object.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter an IPv6 prefix.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol_object</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure a protocol object</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ah</li>
+ <li>eigrp</li>
+ <li>esp</li>
+ <li>gre</li>
+ <li>icmp</li>
+ <li>icmp6</li>
+ <li>igmp</li>
+ <li>igrp</li>
+ <li>ip</li>
+ <li>ipinip</li>
+ <li>ipsec</li>
+ <li>nos</li>
+ <li>ospf</li>
+ <li>pcp</li>
+ <li>pim</li>
+ <li>pptp</li>
+ <li>sctp</li>
+ <li>snp</li>
+ <li>tcp</li>
+ <li>udp</li>
+ </ul>
+ </td>
+ <td>
+ <div>Defines the protocols in the group.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>security_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure a security-group</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sec_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter this keyword to specify a security-group name.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter this keyword to specify a security-group tag.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>service_object</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure a service object</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>object</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter this keyword to specify a service object</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ah</li>
+ <li>eigrp</li>
+ <li>esp</li>
+ <li>gre</li>
+ <li>icmp</li>
+ <li>icmp6</li>
+ <li>igmp</li>
+ <li>igrp</li>
+ <li>ip</li>
+ <li>ipinip</li>
+ <li>ipsec</li>
+ <li>nos</li>
+ <li>ospf</li>
+ <li>pcp</li>
+ <li>pim</li>
+ <li>pptp</li>
+ <li>sctp</li>
+ <li>snp</li>
+ <li>tcp</li>
+ <li>tcp-udp</li>
+ <li>udp</li>
+ </ul>
+ </td>
+ <td>
+ <div>Defines the protocols in the group.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>user_object</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures single user, local or import user group</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>user</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure a user objectUser name to configure a user object.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>User domain</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter the name of the user</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>user_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure a user group object.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Group domain</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter the name of the group</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>object_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>icmp-type</li>
+ <li>network</li>
+ <li>protocol</li>
+ <li>security</li>
+ <li>service</li>
+ <li>user</li>
+ </ul>
+ </td>
+ <td>
+ <div>The object group type.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The <em>running_config</em> argument allows the implementer to pass in the configuration to use as the base config for comparison. This value of this option should be the output received from device by executing command.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco ASA Version 9.10(1)11
+ - This module works with connection ``network_cli``. See `ASA Platform Options <../network/user_guide/platform_asa.html>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # ciscoasa# sh running-config object-group
+ # object-group network test_og_network
+ # description test_network_og
+ # network-object host 192.0.3.1
+
+ - name: "Merge module attributes of given object-group"
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network
+ network_object:
+ host:
+ - 192.0.2.1
+ - 192.0.2.2
+ address:
+ - 192.0.2.0 255.255.255.0
+ - 198.51.100.0 255.255.255.0
+ - name: test_network_og
+ description: test_network_og
+ network_object:
+ host:
+ - 192.0.3.1
+ - 192.0.3.2
+ ipv6_address:
+ - 2001:db8:3::/64
+ - object_type: security
+ object_groups:
+ - name: test_og_security
+ description: test_security
+ security_group:
+ sec_name:
+ - test_1
+ - test_2
+ tag:
+ - 10
+ - 20
+ - object_type: user
+ object_groups:
+ - name: test_og_user
+ description: test_user
+ user_object:
+ user:
+ - name: new_user_1
+ domain: LOCAL
+ - name: new_user_2
+ domain: LOCAL
+ state: merged
+
+ # Commands fired:
+ # ---------------
+ #
+ # object-group security test_og_security
+ # description test_security
+ # security-group name test_1
+ # security-group name test_2
+ # security-group tag 10
+ # security-group tag 20
+ # object-group network test_og_network
+ # description test_og_network
+ # network-object 192.0.2.0 255.255.255.0
+ # network-object 198.51.100.0 255.255.255.0
+ # network-object host 192.0.2.1
+ # network-object host 192.0.2.2
+ # object-group network test_network_og
+ # network-object host 192.0.3.1
+ # network-object host 192.0.3.2
+ # network-object 2001:db8:3::/64
+ # object-group user test_og_user
+ # description test_user
+ # user LOCAL\new_user_1
+ # user LOCAL\new_user_2
+
+ # After state:
+ # ------------
+ #
+ # ciscoasa# sh running-config object-group
+ # object-group network test_og_network
+ # description test_og_network
+ # network-object host 192.0.2.1
+ # network-object host 192.0.2.2
+ # network-object 192.0.2.0 255.255.255.0
+ # network-object 198.51.100.0 255.255.255.0
+ # network-object host 192.0.3.1
+ # object-group network test_network_og
+ # description test_network_og
+ # network-object host 192.0.3.1
+ # network-object host 192.0.3.2
+ # network-object 2001:db8:0:3::/64
+ # group-object test_og_network
+ # object-group security test_og_security
+ # security-group name test_1
+ # security-group name test_2
+ # security-group tag 10
+ # security-group tag 20
+ # object-group user test_og_user
+ # description test_user
+ # user LOCAL\new_user_1
+ # user LOCAL\new_user_2
+
+ # Using Replaced
+
+ # Before state:
+ # -------------
+ #
+ # ciscoasa# sh running-config object-group
+ # object-group network test_og_network
+ # description test_og_network
+ # network-object host 192.0.2.1
+ # network-object host 192.0.2.2
+ # network-object 192.0.2.0 255.255.255.0
+ # network-object 198.51.100.0 255.255.255.0
+ # object-group network test_network_og
+ # description test_network_og
+ # network-object host 192.0.3.1
+ # network-object host 192.0.3.2
+ # network-object 2001:db8:0:3::/64
+ # group-object test_og_network
+ # object-group security test_og_security
+ # security-group name test_1
+ # security-group name test_2
+ # security-group tag 10
+ # security-group tag 20
+ # object-group user test_og_user
+ # user LOCAL\new_user_1
+ # user LOCAL\new_user_2
+
+ - name: "Replace module attributes of given object-group"
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network_replace
+ network_object:
+ host:
+ - 192.0.3.1
+ address:
+ - 192.0.3.0 255.255.255.0
+ - object_type: protocol
+ object_groups:
+ - name: test_og_protocol
+ description: test_og_protocol
+ protocol_object:
+ protocol:
+ - tcp
+ - udp
+ state: replaced
+
+ # Commands Fired:
+ # ---------------
+ #
+ # object-group protocol test_og_protocol
+ # description test_og_protocol
+ # protocol tcp
+ # protocol udp
+ # object-group network test_og_network
+ # description test_og_network_replace
+ # no network-object 192.0.2.0 255.255.255.0
+ # no network-object 198.51.100.0 255.255.255.0
+ # network-object 192.0.3.0 255.255.255.0
+ # no network-object host 192.0.2.1
+ # no network-object host 192.0.2.2
+ # network-object host 192.0.3.1
+
+ # After state:
+ # -------------
+ #
+ # ciscoasa# sh running-config object-group
+ # object-group network test_og_network
+ # description test_og_network_replace
+ # network-object host 192.0.3.1
+ # network-object 192.0.3.0 255.255.255.0
+ # object-group network test_network_og
+ # description test_network_og
+ # network-object host 192.0.3.1
+ # network-object host 192.0.3.2
+ # network-object 2001:db8:0:3::/64
+ # group-object test_og_network
+ # object-group security test_og_security
+ # security-group name test_1
+ # security-group name test_2
+ # security-group tag 10
+ # security-group tag 20
+ # object-group user test_og_user
+ # user LOCAL\new_user_1
+ # user LOCAL\new_user_2
+ # object-group protocol test_og_protocol
+ # protocol-object tcp
+ # protocol-object udp
+
+ # Using Overridden
+
+ # Before state:
+ # -------------
+ #
+ # ciscoasa# sh running-config object-group
+ # object-group network test_og_network
+ # description test_og_network
+ # network-object host 192.0.2.1
+ # network-object host 192.0.2.2
+ # network-object 192.0.2.0 255.255.255.0
+ # network-object 198.51.100.0 255.255.255.0
+ # object-group network test_network_og
+ # description test_network_og
+ # network-object host 192.0.3.1
+ # network-object host 192.0.3.2
+ # network-object 2001:db8:0:3::/64
+ # group-object test_og_network
+ # object-group security test_og_security
+ # security-group name test_1
+ # security-group name test_2
+ # security-group tag 10
+ # security-group tag 20
+ # object-group user test_og_user
+ # user LOCAL\new_user_1
+ # user LOCAL\new_user_2
+
+ - name: "Overridden module attributes of given object-group"
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network_override
+ network_object:
+ host:
+ - 192.0.3.1
+ address:
+ - 192.0.3.0 255.255.255.0
+ - object_type: protocol
+ object_groups:
+ - name: test_og_protocol
+ description: test_og_protocol
+ protocol_object:
+ protocol:
+ - tcp
+ - udp
+ state: overridden
+
+ # Commands Fired:
+ # ---------------
+ #
+ # no object-group security test_og_security
+ # no object-group user test_og_user
+ # object-group protocol test_og_protocol
+ # description test_og_protocol
+ # protocol tcp
+ # protocol udp
+ # object-group network test_og_network
+ # description test_og_network_override
+ # no network-object 192.0.2.0 255.255.255.0
+ # no network-object 198.51.100.0 255.255.255.0
+ # network-object 192.0.3.0 255.255.255.0
+ # no network-object host 192.0.2.1
+ # no network-object host 192.0.2.2
+ # network-object host 192.0.3.1
+ # no object-group network test_network_og
+
+ # After state:
+ # -------------
+ #
+ # ciscoasa# sh running-config object-group
+ # object-group network test_og_network
+ # description test_og_network_override
+ # network-object host 192.0.3.1
+ # network-object 192.0.3.0 255.255.255.0
+ # object-group protocol test_og_protocol
+ # protocol-object tcp
+ # protocol-object udp
+
+ # Using Deleted
+
+ # Before state:
+ # -------------
+ #
+ # ciscoasa# sh running-config object-group
+ # object-group network test_og_network
+ # description test_og_network
+ # network-object host 192.0.2.1
+ # network-object host 192.0.2.2
+ # network-object 192.0.2.0 255.255.255.0
+ # network-object 198.51.100.0 255.255.255.0
+ # object-group network test_network_og
+ # description test_network_og
+ # network-object host 192.0.3.1
+ # network-object host 192.0.3.2
+ # network-object 2001:db8:0:3::/64
+ # group-object test_og_network
+ # object-group security test_og_security
+ # security-group name test_1
+ # security-group name test_2
+ # security-group tag 10
+ # security-group tag 20
+ # object-group user test_og_user
+ # user LOCAL\new_user_1
+ # user LOCAL\new_user_2
+
+ - name: "Delete given module attributes"
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ - name: test_network_og
+ - object_type: security
+ object_groups:
+ - name: test_og_security
+ state: deleted
+
+ # Commands Fired:
+ # ---------------
+ #
+ # no object-group network test_og_network
+ # no object-group network test_network_og
+ # no object-group security test_og_security
+
+ # After state:
+ # -------------
+ #
+ # ciscoasa# sh running-config object-group
+ # object-group user test_og_user
+ # user LOCAL\new_user_1
+ # user LOCAL\new_user_2
+
+ # Using DELETED without any config passed
+ #"(NOTE: This will delete all of configured resource module attributes)"
+
+ # Before state:
+ # -------------
+ #
+ # ciscoasa# sh running-config object-group
+ # object-group network test_og_network
+ # description test_og_network
+ # network-object host 192.0.2.1
+ # network-object host 192.0.2.2
+ # network-object 192.0.2.0 255.255.255.0
+ # network-object 198.51.100.0 255.255.255.0
+ # object-group network test_network_og
+ # description test_network_og
+ # network-object host 192.0.3.1
+ # network-object host 192.0.3.2
+ # network-object 2001:db8:0:3::/64
+ # group-object test_og_network
+ # object-group security test_og_security
+ # security-group name test_1
+ # security-group name test_2
+ # security-group tag 10
+ # security-group tag 20
+ # object-group user test_og_user
+ # user LOCAL\new_user_1
+ # user LOCAL\new_user_2
+
+ - name: Delete ALL configured module attributes
+ cisco.asa.asa_ogs:
+ config:
+ state: deleted
+
+ # Commands Fired:
+ # ---------------
+ #
+ # no object-group network test_og_network
+ # no object-group network test_network_og
+ # no object-group security test_og_security
+ # no object-group user test_og_user
+
+ # After state:
+ # -------------
+ #
+ # ciscoasa# sh running-config object-group
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # ciscoasa# sh running-config object-group
+ # object-group network test_og_network
+ # description test_og_network
+ # network-object host 192.0.2.1
+ # network-object host 192.0.2.2
+ # network-object 192.0.2.0 255.255.255.0
+ # network-object 198.51.100.0 255.255.255.0
+ # object-group network test_network_og
+ # description test_network_og
+ # network-object host 192.0.3.1
+ # network-object host 192.0.3.2
+ # network-object 2001:db8:0:3::/64
+ # group-object test_og_network
+ # object-group security test_og_security
+ # security-group name test_1
+ # security-group name test_2
+ # security-group tag 10
+ # security-group tag 20
+ # object-group user test_og_user
+ # user LOCAL\new_user_1
+ # user LOCAL\new_user_2
+
+ - name: Gather listed OGs with provided configurations
+ cisco.asa.asa_ogs:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "object_groups": [
+ # {
+ # "description": "test_security",
+ # "name": "test_og_security",
+ # "security_group": {
+ # "sec_name": [
+ # "test_2",
+ # "test_1"
+ # ],
+ # "tag": [
+ # 10,
+ # 20
+ # ]
+ # }
+ # }
+ # ],
+ # "object_type": "security"
+ # },
+ # {
+ # "object_groups": [
+ # {
+ # "description": "test_network_og",
+ # "name": "test_network_og",
+ # "network_object": {
+ # "host": [
+ # "192.0.3.1",
+ # "192.0.3.2"
+ # ],
+ # "ipv6_address": [
+ # "2001:db8:3::/64"
+ # ]
+ # }
+ # },
+ # {
+ # "description": "test_og_network",
+ # "name": "test_og_network",
+ # "network_object": {
+ # "address": [
+ # "192.0.2.0 255.255.255.0",
+ # "198.51.100.0 255.255.255.0"
+ # ],
+ # "host": [
+ # "192.0.2.1",
+ # "192.0.2.2"
+ # ]
+ # }
+ # }
+ # ],
+ # "object_type": "network"
+ # },
+ # {
+ # "object_groups": [
+ # {
+ # "description": "test_user",
+ # "name": "test_og_user",
+ # "user_object": {
+ # "user": [
+ # {
+ # "domain": "LOCAL",
+ # "name": "new_user_1"
+ # },
+ # {
+ # "domain": "LOCAL",
+ # "name": "new_user_2"
+ # }
+ # ]
+ # }
+ # }
+ # ],
+ # "object_type": "user"
+ # }
+ # ]
+
+ # After state:
+ # ------------
+ #
+ # ciscoasa# sh running-config object-group
+ # object-group network test_og_network
+ # description test_og_network
+ # network-object host 192.0.2.1
+ # network-object host 192.0.2.2
+ # network-object 192.0.2.0 255.255.255.0
+ # network-object 198.51.100.0 255.255.255.0
+ # object-group network test_network_og
+ # description test_network_og
+ # network-object host 192.0.3.1
+ # network-object host 192.0.3.2
+ # network-object 2001:db8:0:3::/64
+ # group-object test_og_network
+ # object-group security test_og_security
+ # security-group name test_1
+ # security-group name test_2
+ # security-group tag 10
+ # security-group tag 20
+ # object-group user test_og_user
+ # user LOCAL\new_user_1
+ # user LOCAL\new_user_2
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network
+ network_object:
+ host:
+ - 192.0.2.1
+ - 192.0.2.2
+ address:
+ - 192.0.2.0 255.255.255.0
+ - 198.51.100.0 255.255.255.0
+ - name: test_network_og
+ description: test_network_og
+ network_object:
+ host:
+ - 192.0.3.1
+ - 192.0.3.2
+ ipv6_address:
+ - 2001:db8:3::/64
+ - object_type: security
+ object_groups:
+ - name: test_og_security
+ description: test_security
+ security_group:
+ sec_name:
+ - test_1
+ - test_2
+ tag:
+ - 10
+ - 20
+ - object_type: user
+ object_groups:
+ - name: test_og_user
+ description: test_user
+ user_object:
+ user:
+ - name: new_user_1
+ domain: LOCAL
+ - name: new_user_2
+ domain: LOCAL
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "object-group security test_og_security",
+ # "description test_security",
+ # "security-group name test_1",
+ # "security-group name test_2",
+ # "security-group tag 10",
+ # "security-group tag 20",
+ # "object-group network test_og_network",
+ # "description test_og_network",
+ # "network-object 192.0.2.0 255.255.255.0",
+ # "network-object 198.51.100.0 255.255.255.0",
+ # "network-object host 192.0.2.1",
+ # "network-object host 192.0.2.2",
+ # "object-group network test_network_og",
+ # "description test_network_og",
+ # "network-object host 192.0.3.1",
+ # "network-object host 192.0.3.2",
+ # "network-object 2001:db8:3::/64",
+ # "object-group user test_og_user",
+ # "description test_user",
+ # "user LOCAL\new_user_1",
+ # "user LOCAL\new_user_2"
+ # ]
+
+ # Using Parsed
+
+ # parsed.cfg
+ #
+ # object-group network test_og_network
+ # description test_og_network
+ # network-object host 192.0.2.1
+ # network-object 192.0.2.0 255.255.255.0
+ # object-group network test_network_og
+ # network-object 2001:db8:3::/64
+ # object-group service test_og_service
+ # service-object tcp-udp
+
+ - name: Parse the commands for provided configuration
+ cisco.asa.asa_ogs:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": [
+ # {
+ # "object_groups": [
+ # {
+ # "name": "test_network_og"
+ # },
+ # {
+ # "description": "test_og_network",
+ # "name": "test_og_network",
+ # "network_object": {
+ # "host": [
+ # "192.0.2.2"
+ # ]
+ # }
+ # }
+ # ],
+ # "object_type": "network"
+ # },
+ # {
+ # "object_groups": [
+ # {
+ # "name": "test_og_service",
+ # "service_object": {
+ # "protocol": [
+ # "tcp-udp",
+ # "ipinip"
+ # ]
+ # }
+ # }
+ # ],
+ # "object_type": "service"
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;object-group network test_network_og&#x27;, &#x27;description test_network_og&#x27;, &#x27;network-object host 192.0.2.1&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/meta/runtime.yml b/collections-debian-merged/ansible_collections/cisco/asa/meta/runtime.yml
new file mode 100644
index 00000000..fc94e987
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/meta/runtime.yml
@@ -0,0 +1,61 @@
+---
+requires_ansible: '>=2.9.10,<2.11'
+plugin_routing:
+ action:
+ asa_acl:
+ redirect: cisco.asa.asa
+ acl:
+ redirect: cisco.asa.asa
+ asa_acls:
+ redirect: cisco.asa.asa
+ acls:
+ redirect: cisco.asa.asa
+ asa_command:
+ redirect: cisco.asa.asa
+ command:
+ redirect: cisco.asa.asa
+ asa_config:
+ redirect: cisco.asa.asa
+ config:
+ redirect: cisco.asa.asa
+ asa_facts:
+ redirect: cisco.asa.asa
+ facts:
+ redirect: cisco.asa.asa
+ asa_og:
+ redirect: cisco.asa.asa
+ og:
+ redirect: cisco.asa.asa
+ asa_ogs:
+ redirect: cisco.asa.asa
+ ogs:
+ redirect: cisco.asa.asa
+ modules:
+ acl:
+ redirect: cisco.asa.asa_acl
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ asa_acl:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ acls:
+ redirect: cisco.asa.asa_acls
+ command:
+ redirect: cisco.asa.asa_command
+ config:
+ redirect: cisco.asa.asa_config
+ facts:
+ redirect: cisco.asa.asa_facts
+ og:
+ redirect: cisco.asa.asa_og
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ asa_og:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ ogs:
+ redirect: cisco.asa.asa_ogs
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/action/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/action/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/action/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/action/asa.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/action/asa.py
new file mode 100644
index 00000000..0fa543c4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/action/asa.py
@@ -0,0 +1,96 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import sys
+import copy
+
+from ansible import constants as C
+from ansible_collections.ansible.netcommon.plugins.action.network import (
+ ActionModule as ActionNetworkModule,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.asa import (
+ asa_provider_spec,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ load_provider,
+)
+from ansible.utils.display import Display
+
+display = Display()
+
+
+class ActionModule(ActionNetworkModule):
+ def run(self, tmp=None, task_vars=None):
+ del tmp # tmp no longer has any effect
+
+ module_name = self._task.action.split(".")[-1]
+ self._config_module = (
+ True if module_name in ["asa_config", "config"] else False
+ )
+
+ if self._play_context.connection == "local":
+ provider = load_provider(asa_provider_spec, self._task.args)
+ pc = copy.deepcopy(self._play_context)
+ pc.connection = "network_cli"
+ pc.network_os = "asa"
+ pc.remote_addr = provider["host"] or self._play_context.remote_addr
+ pc.port = int(provider["port"] or self._play_context.port or 22)
+ pc.remote_user = (
+ provider["username"] or self._play_context.connection_user
+ )
+ pc.password = provider["password"] or self._play_context.password
+ pc.private_key_file = (
+ provider["ssh_keyfile"] or self._play_context.private_key_file
+ )
+ command_timeout = int(
+ provider["timeout"] or C.PERSISTENT_COMMAND_TIMEOUT
+ )
+ pc.become = provider["authorize"] or False
+ pc.become_pass = provider["auth_pass"]
+ pc.become_method = "enable"
+
+ display.vvv(
+ "using connection plugin %s (was local)" % pc.connection,
+ pc.remote_addr,
+ )
+ connection = self._shared_loader_obj.connection_loader.get(
+ "persistent", pc, sys.stdin, task_uuid=self._task._uuid
+ )
+ connection.set_options(
+ direct={"persistent_command_timeout": command_timeout}
+ )
+
+ socket_path = connection.run()
+
+ display.vvvv("socket_path: %s" % socket_path, pc.remote_addr)
+ if not socket_path:
+ return {
+ "failed": True,
+ "msg": "unable to open shell. Please see: "
+ + "https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell",
+ }
+
+ task_vars["ansible_socket"] = socket_path
+
+ result = super(ActionModule, self).run(task_vars=task_vars)
+
+ return result
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/cliconf/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/cliconf/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/cliconf/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/cliconf/asa.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/cliconf/asa.py
new file mode 100644
index 00000000..d5126356
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/cliconf/asa.py
@@ -0,0 +1,145 @@
+#
+# (c) 2017 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+---
+author: Ansible Security Team
+cliconf: asa
+short_description: Use asa cliconf to run command on Cisco ASA platform
+description:
+- This asa plugin provides low level abstraction apis for sending and receiving CLI
+ commands from Cisco ASA network devices.
+version_added: 1.0.0
+"""
+
+import re
+import json
+
+from itertools import chain
+from ansible.errors import AnsibleConnectionFailure
+from ansible.module_utils._text import to_text
+from ansible.module_utils.common._collections_compat import Mapping
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible.plugins.cliconf import CliconfBase, enable_mode
+
+
+class Cliconf(CliconfBase):
+ def get_device_info(self):
+ device_info = {}
+
+ device_info["network_os"] = "asa"
+ reply = self.get("show version")
+ data = to_text(reply, errors="surrogate_or_strict").strip()
+
+ match = re.search(r"Version (\S+)", data)
+ if match:
+ device_info["network_os_version"] = match.group(1)
+
+ match = re.search(r"Firepower .+ Version (\S+)", data)
+ if match:
+ device_info["network_os_firepower_version"] = match.group(1)
+
+ match = re.search(r"Device .+ Version (\S+)", data)
+ if match:
+ device_info["network_os_device_mgr_version"] = match.group(1)
+
+ match = re.search(r"^Model Id:\s+(.+) \(revision", data, re.M)
+ if match:
+ device_info["network_os_model"] = match.group(1)
+
+ match = re.search(r"^(.+) up", data, re.M)
+ if match:
+ device_info["network_os_hostname"] = match.group(1)
+
+ match = re.search(r'image file is "(.+)"', data)
+ if match:
+ device_info["network_os_image"] = match.group(1)
+
+ return device_info
+
+ @enable_mode
+ def get_config(self, source="running", format="text", flags=None):
+ if source not in ("running", "startup"):
+ return self.invalid_params(
+ "fetching configuration from %s is not supported" % source
+ )
+ if source == "running":
+ cmd = "show running-config all"
+ else:
+ cmd = "show startup-config"
+ return self.send_command(cmd)
+
+ @enable_mode
+ def edit_config(self, command):
+ for cmd in chain(["configure terminal"], to_list(command), ["end"]):
+ self.send_command(cmd)
+
+ def get(
+ self,
+ command,
+ prompt=None,
+ answer=None,
+ sendonly=False,
+ newline=True,
+ check_all=False,
+ ):
+ return self.send_command(
+ command=command,
+ prompt=prompt,
+ answer=answer,
+ sendonly=sendonly,
+ newline=newline,
+ check_all=check_all,
+ )
+
+ def get_capabilities(self):
+ result = super(Cliconf, self).get_capabilities()
+ return json.dumps(result)
+
+ def run_commands(self, commands=None, check_rc=True):
+ if commands is None:
+ raise ValueError("'commands' value is required")
+
+ responses = list()
+ for cmd in to_list(commands):
+ if not isinstance(cmd, Mapping):
+ cmd = {"command": cmd}
+
+ output = cmd.pop("output", None)
+ if output:
+ raise ValueError(
+ "'output' value %s is not supported for run_commands"
+ % output
+ )
+
+ try:
+ out = self.send_command(**cmd)
+ except AnsibleConnectionFailure as e:
+ if check_rc:
+ raise
+ out = getattr(e, "err", to_text(e))
+
+ responses.append(out)
+
+ return responses
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/doc_fragments/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/doc_fragments/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/doc_fragments/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/doc_fragments/asa.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/doc_fragments/asa.py
new file mode 100644
index 00000000..3ce7f396
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/doc_fragments/asa.py
@@ -0,0 +1,102 @@
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+# Copyright: (c) 2016, Peter Sprygada <psprygada@ansible.com>
+# Copyright: (c) 2016, Patrick Ogenstad <@ogenstad>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+class ModuleDocFragment(object):
+
+ # Standard files documentation fragment
+ DOCUMENTATION = r"""options:
+ authorize:
+ description:
+ - B(Deprecated)
+ - 'Starting with Ansible 2.5 we recommend using C(connection: network_cli) and
+ C(become: yes).'
+ - For more information please see the L(Network Guide, ../network/getting_started/network_differences.html#multiple-communication-protocols).
+ - HORIZONTALLINE
+ - Instructs the module to enter privileged mode on the remote device before sending
+ any commands. If not specified, the device will attempt to execute all commands
+ in non-privileged mode. If the value is not specified in the task, the value
+ of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead.
+ type: bool
+ default: false
+ context:
+ description:
+ - Specifies which context to target if you are running in the ASA in multiple
+ context mode. Defaults to the current context you login to.
+ type: str
+ passwords:
+ description:
+ - Specifies which context to target if you are running in the ASA in multiple
+ context mode. Defaults to the current context you login to.
+ type: bool
+ provider:
+ description:
+ - B(Deprecated)
+ - 'Starting with Ansible 2.5 we recommend using C(connection: network_cli).'
+ - For more information please see the L(Network Guide, ../network/getting_started/network_differences.html#multiple-communication-protocols).
+ - HORIZONTALLINE
+ - A dict object containing connection details.
+ type: dict
+ suboptions:
+ host:
+ description:
+ - Specifies the DNS host name or address for connecting to the remote device
+ over the specified transport. The value of host is used as the destination
+ address for the transport.
+ type: str
+ port:
+ description:
+ - Specifies the port to use when building the connection to the remote device.
+ type: int
+ username:
+ description:
+ - Configures the username to use to authenticate the connection to the remote
+ device. This value is used to authenticate the SSH session. If the value
+ is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME)
+ will be used instead.
+ type: str
+ password:
+ description:
+ - Specifies the password to use to authenticate the connection to the remote
+ device. This value is used to authenticate the SSH session. If the value
+ is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD)
+ will be used instead.
+ type: str
+ ssh_keyfile:
+ description:
+ - Specifies the SSH key to use to authenticate the connection to the remote
+ device. This value is the path to the key used to authenticate the SSH
+ session. If the value is not specified in the task, the value of environment
+ variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
+ type: path
+ authorize:
+ description:
+ - Instructs the module to enter privileged mode on the remote device before
+ sending any commands. If not specified, the device will attempt to execute
+ all commands in non-privileged mode. If the value is not specified in the
+ task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be
+ used instead.
+ type: bool
+ default: false
+ auth_pass:
+ description:
+ - Specifies the password to use if required to enter privileged mode on the
+ remote device. If I(authorize) is false, then this argument does nothing.
+ If the value is not specified in the task, the value of environment variable
+ C(ANSIBLE_NET_AUTH_PASS) will be used instead.
+ type: str
+ timeout:
+ description:
+ - Specifies idle timeout in seconds for the connection, in seconds. Useful
+ if the console freezes before continuing. For example when saving configurations.
+ type: int
+notes:
+- For more information on using Ansible to manage network devices see the :ref:`Ansible
+ Network Guide <network_guide>`
+"""
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/acls/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/acls/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/acls/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/acls/acls.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/acls/acls.py
new file mode 100644
index 00000000..3a8b2e52
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/acls/acls.py
@@ -0,0 +1,290 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the asa_acls module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class AclsArgs(object):
+ """The arg spec for the asa_acls module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "type": "dict",
+ "options": {
+ "acls": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "name": {"required": True, "type": "str"},
+ "acl_type": {
+ "choices": ["extended", "standard"],
+ "type": "str",
+ },
+ "rename": {"type": "str"},
+ "aces": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "grant": {
+ "choices": ["permit", "deny"],
+ "type": "str",
+ },
+ "line": {"type": "int"},
+ "remark": {"type": "str"},
+ "source": {
+ "type": "dict",
+ "options": {
+ "address": {"type": "str"},
+ "netmask": {"type": "str"},
+ "any": {"type": "bool"},
+ "any4": {"type": "bool"},
+ "any6": {"type": "bool"},
+ "host": {"type": "str"},
+ "interface": {"type": "str"},
+ "object_group": {"type": "str"},
+ "port_protocol": {
+ "type": "dict",
+ "options": {
+ "eq": {"type": "str"},
+ "gt": {"type": "str"},
+ "lt": {"type": "str"},
+ "neq": {"type": "str"},
+ "range": {
+ "type": "dict",
+ "options": {
+ "start": {
+ "type": "int"
+ },
+ "end": {"type": "int"},
+ },
+ },
+ },
+ },
+ },
+ },
+ "destination": {
+ "type": "dict",
+ "options": {
+ "address": {"type": "str"},
+ "netmask": {"type": "str"},
+ "any": {"type": "bool"},
+ "any4": {"type": "bool"},
+ "any6": {"type": "bool"},
+ "host": {"type": "str"},
+ "interface": {"type": "str"},
+ "object_group": {"type": "str"},
+ "port_protocol": {
+ "type": "dict",
+ "options": {
+ "eq": {"type": "str"},
+ "gt": {"type": "str"},
+ "lt": {"type": "str"},
+ "neq": {"type": "str"},
+ "range": {
+ "type": "dict",
+ "options": {
+ "start": {
+ "type": "int"
+ },
+ "end": {"type": "int"},
+ },
+ },
+ },
+ },
+ },
+ },
+ "protocol": {"type": "str"},
+ "protocol_options": {
+ "type": "dict",
+ "options": {
+ "protocol_number": {"type": "int"},
+ "ahp": {"type": "bool"},
+ "eigrp": {"type": "bool"},
+ "esp": {"type": "bool"},
+ "gre": {"type": "bool"},
+ "icmp": {
+ "type": "dict",
+ "options": {
+ "alternate_address": {
+ "type": "bool"
+ },
+ "conversion_error": {
+ "type": "bool"
+ },
+ "echo": {"type": "bool"},
+ "echo_reply": {"type": "bool"},
+ "information_reply": {
+ "type": "bool"
+ },
+ "information_request": {
+ "type": "bool"
+ },
+ "mask_reply": {"type": "bool"},
+ "mask_request": {
+ "type": "bool"
+ },
+ "mobile_redirect": {
+ "type": "bool"
+ },
+ "parameter_problem": {
+ "type": "bool"
+ },
+ "redirect": {"type": "bool"},
+ "router_advertisement": {
+ "type": "bool"
+ },
+ "router_solicitation": {
+ "type": "bool"
+ },
+ "source_quench": {
+ "type": "bool"
+ },
+ "source_route_failed": {
+ "type": "bool"
+ },
+ "time_exceeded": {
+ "type": "bool"
+ },
+ "timestamp_reply": {
+ "type": "bool"
+ },
+ "timestamp_request": {
+ "type": "bool"
+ },
+ "traceroute": {"type": "bool"},
+ "unreachable": {
+ "type": "bool"
+ },
+ },
+ },
+ "icmp6": {
+ "type": "dict",
+ "options": {
+ "echo": {"type": "bool"},
+ "echo_reply": {"type": "bool"},
+ "membership_query": {
+ "type": "bool"
+ },
+ "membership_reduction": {
+ "type": "bool"
+ },
+ "membership_report": {
+ "type": "bool"
+ },
+ "neighbor_advertisement": {
+ "type": "bool"
+ },
+ "neighbor_redirect": {
+ "type": "bool"
+ },
+ "neighbor_solicitation": {
+ "type": "bool"
+ },
+ "packet_too_big": {
+ "type": "bool"
+ },
+ "parameter_problem": {
+ "type": "bool"
+ },
+ "router_advertisement": {
+ "type": "bool"
+ },
+ "router_renumbering": {
+ "type": "bool"
+ },
+ "router_solicitation": {
+ "type": "bool"
+ },
+ "time_exceeded": {
+ "type": "bool"
+ },
+ "unreachable": {
+ "type": "bool"
+ },
+ },
+ },
+ "igmp": {"type": "bool"},
+ "igrp": {"type": "bool"},
+ "ip": {"type": "bool"},
+ "ipinip": {"type": "bool"},
+ "ipsec": {"type": "bool"},
+ "nos": {"type": "bool"},
+ "ospf": {"type": "bool"},
+ "pcp": {"type": "bool"},
+ "pim": {"type": "bool"},
+ "pptp": {"type": "bool"},
+ "sctp": {"type": "bool"},
+ "snp": {"type": "bool"},
+ "tcp": {"type": "bool"},
+ "udp": {"type": "bool"},
+ },
+ },
+ "inactive": {"type": "bool"},
+ "log": {
+ "type": "str",
+ "choices": [
+ "default",
+ "alerts",
+ "critical",
+ "debugging",
+ "disable",
+ "emergencies",
+ "errors",
+ "informational",
+ "interval",
+ "notifications",
+ "warnings",
+ ],
+ },
+ "time_range": {"type": "str"},
+ },
+ },
+ },
+ }
+ },
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/facts/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/facts/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/facts/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/facts/facts.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/facts/facts.py
new file mode 100644
index 00000000..e1f0b526
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/facts/facts.py
@@ -0,0 +1,27 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The arg spec for the asa facts module.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class FactsArgs(object):
+ """ The arg spec for the asa facts module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "gather_subset": dict(
+ default=["!config"], type="list", elements="str"
+ ),
+ "gather_network_resources": dict(type="list", elements="str"),
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/ogs/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/ogs/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/ogs/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/ogs/ogs.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/ogs/ogs.py
new file mode 100644
index 00000000..d236993a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/argspec/ogs/ogs.py
@@ -0,0 +1,229 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the asa_ogs module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class OGsArgs(object):
+ """The arg spec for the asa_ogs module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "object_type": {
+ "type": "str",
+ "required": True,
+ "choices": [
+ "icmp-type",
+ "network",
+ "protocol",
+ "security",
+ "service",
+ "user",
+ ],
+ },
+ "object_groups": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "name": {"required": True, "type": "str"},
+ "description": {"type": "str"},
+ "icmp_type": {
+ "type": "dict",
+ "options": {
+ "icmp_object": {
+ "type": "list",
+ "elements": "str",
+ "choices": [
+ "alternate-address",
+ "conversion-error",
+ "echo",
+ "echo-reply",
+ "information-reply",
+ "information-request",
+ "mask-reply",
+ "mask-request",
+ "mobile-redirect",
+ "parameter-problem",
+ "redirect",
+ "router-advertisement",
+ "router-solicitation",
+ "source-quench",
+ "time-exceeded",
+ "timestamp-reply",
+ "timestamp-request",
+ "traceroute",
+ "unreachable",
+ ],
+ }
+ },
+ },
+ "network_object": {
+ "type": "dict",
+ "options": {
+ "host": {"type": "list", "elements": "str"},
+ "address": {"type": "list", "elements": "str"},
+ "ipv6_address": {
+ "type": "list",
+ "elements": "str",
+ },
+ },
+ },
+ "protocol_object": {
+ "type": "dict",
+ "options": {
+ "protocol": {
+ "type": "list",
+ "elements": "str",
+ "choices": [
+ "ah",
+ "eigrp",
+ "esp",
+ "gre",
+ "icmp",
+ "icmp6",
+ "igmp",
+ "igrp",
+ "ip",
+ "ipinip",
+ "ipsec",
+ "nos",
+ "ospf",
+ "pcp",
+ "pim",
+ "pptp",
+ "sctp",
+ "snp",
+ "tcp",
+ "udp",
+ ],
+ }
+ },
+ },
+ "security_group": {
+ "type": "dict",
+ "options": {
+ "sec_name": {
+ "type": "list",
+ "elements": "str",
+ },
+ "tag": {"type": "list", "elements": "str"},
+ },
+ },
+ "service_object": {
+ "type": "dict",
+ "options": {
+ "protocol": {
+ "type": "list",
+ "elements": "str",
+ "choices": [
+ "ah",
+ "eigrp",
+ "esp",
+ "gre",
+ "icmp",
+ "icmp6",
+ "igmp",
+ "igrp",
+ "ip",
+ "ipinip",
+ "ipsec",
+ "nos",
+ "ospf",
+ "pcp",
+ "pim",
+ "pptp",
+ "sctp",
+ "snp",
+ "tcp",
+ "tcp-udp",
+ "udp",
+ ],
+ },
+ "object": {"type": "str"},
+ },
+ },
+ "user_object": {
+ "type": "dict",
+ "options": {
+ "user": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "name": {
+ "required": True,
+ "type": "str",
+ },
+ "domain": {
+ "required": True,
+ "type": "str",
+ },
+ },
+ },
+ "user_group": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "name": {
+ "required": True,
+ "type": "str",
+ },
+ "domain": {
+ "required": True,
+ "type": "str",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/asa.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/asa.py
new file mode 100644
index 00000000..f2a3ba2f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/asa.py
@@ -0,0 +1,194 @@
+# This code is part of Ansible, but is an independent component.
+# This particular file snippet, and this file snippet only, is BSD licensed.
+# Modules you write using this snippet, which is embedded dynamically by Ansible
+# still belong to the author of the module, and may assign their own license
+# to the complete work.
+#
+# (c) 2016 Red Hat Inc.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import json
+
+from ansible.module_utils._text import to_text
+from ansible.module_utils.basic import env_fallback
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ EntityCollection,
+)
+from ansible.module_utils.connection import exec_command
+from ansible.module_utils.connection import Connection, ConnectionError
+
+_DEVICE_CONFIGS = {}
+_CONNECTION = None
+
+asa_provider_spec = {
+ "host": dict(),
+ "port": dict(type="int"),
+ "username": dict(fallback=(env_fallback, ["ANSIBLE_NET_USERNAME"])),
+ "password": dict(
+ fallback=(env_fallback, ["ANSIBLE_NET_PASSWORD"]), no_log=True
+ ),
+ "ssh_keyfile": dict(
+ fallback=(env_fallback, ["ANSIBLE_NET_SSH_KEYFILE"]), type="path"
+ ),
+ "authorize": dict(
+ fallback=(env_fallback, ["ANSIBLE_NET_AUTHORIZE"]), type="bool"
+ ),
+ "auth_pass": dict(
+ fallback=(env_fallback, ["ANSIBLE_NET_AUTH_PASS"]), no_log=True
+ ),
+ "timeout": dict(type="int"),
+}
+
+asa_argument_spec = {
+ "provider": dict(
+ type="dict",
+ options=asa_provider_spec,
+ removed_at_date="2022-06-01",
+ removed_from_collection="cisco.asa",
+ )
+}
+
+asa_top_spec = {
+ "authorize": dict(
+ fallback=(env_fallback, ["ANSIBLE_NET_AUTHORIZE"]), type="bool"
+ ),
+ "context": dict(type="str"),
+ "passwords": dict(type="bool"),
+}
+asa_argument_spec.update(asa_top_spec)
+
+command_spec = {"command": dict(key=True), "prompt": dict(), "answer": dict()}
+
+
+def get_provider_argspec():
+ return asa_provider_spec
+
+
+def check_args(module):
+ pass
+
+
+def get_connection(module):
+ if hasattr(module, "_asa_connection"):
+ return module._asa_connection
+
+ # Not all modules include the 'context' key.
+ context = module.params.get("context")
+ capabilities = get_capabilities(module)
+ network_api = capabilities.get("network_api")
+ if network_api == "cliconf":
+ module._asa_connection = Connection(module._socket_path)
+ else:
+ module.fail_json(msg="Invalid connection type %s" % network_api)
+
+ if context:
+ if context == "system":
+ command = "changeto system"
+ else:
+ command = "changeto context %s" % context
+ module._asa_connection.get(command)
+
+ return module._asa_connection
+
+
+def get_capabilities(module):
+ if hasattr(module, "_asa_capabilities"):
+ return module._asa_capabilities
+ try:
+ capabilities = Connection(module._socket_path).get_capabilities()
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+ module._asa_capabilities = json.loads(capabilities)
+
+ return module._asa_capabilities
+
+
+def to_commands(module, commands):
+ if not isinstance(commands, list):
+ raise AssertionError("argument must be of type <list>")
+
+ transform = EntityCollection(module, command_spec)
+ commands = transform(commands)
+
+ for index, item in enumerate(commands):
+ if module.check_mode and not item["command"].startswith("show"):
+ module.warn(
+ "only show commands are supported when using check "
+ "mode, not executing `%s`" % item["command"]
+ )
+
+ return commands
+
+
+def run_commands(module, commands, check_rc=True):
+ connection = get_connection(module)
+ try:
+ return connection.run_commands(commands=commands, check_rc=check_rc)
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc))
+
+
+def get_config(module, flags=None):
+ flags = [] if flags is None else flags
+
+ # Not all modules include the 'passwords' key.
+ passwords = module.params.get("passwords", False)
+ if passwords:
+ cmd = "more system:running-config"
+ else:
+ cmd = "show running-config "
+ cmd += " ".join(flags)
+ cmd = cmd.strip()
+
+ try:
+ return _DEVICE_CONFIGS[cmd]
+ except KeyError:
+ conn = get_connection(module)
+ out = conn.get(cmd)
+ cfg = to_text(out, errors="surrogate_then_replace").strip()
+ _DEVICE_CONFIGS[cmd] = cfg
+ return cfg
+
+
+def load_config(module, config):
+ try:
+ conn = get_connection(module)
+ conn.edit_config(config)
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc))
+
+
+def get_defaults_flag(module):
+ rc, out, err = exec_command(module, "show running-config ?")
+ out = to_text(out, errors="surrogate_then_replace")
+
+ commands = set()
+ for line in out.splitlines():
+ if line:
+ commands.add(line.strip().split()[0])
+
+ if "all" in commands:
+ return "all"
+ else:
+ return "full"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/acls/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/acls/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/acls/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/acls/acls.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/acls/acls.py
new file mode 100644
index 00000000..548453bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/acls/acls.py
@@ -0,0 +1,199 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The asa_acls class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.facts.facts import (
+ Facts,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.rm_templates.acls import (
+ AclsTemplate,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+
+
+class Acls(ResourceModule):
+ """
+ The asa_acls class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["acls"]
+
+ def __init__(self, module):
+ super(Acls, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="acls",
+ tmplt=AclsTemplate(),
+ )
+
+ def execute_module(self):
+ """ Execute the module
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ self.gen_config()
+ self.run_commands()
+ return self.result
+
+ def gen_config(self):
+ """ Select the appropriate function based on the state provided
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ if self.want:
+ wantd = {(entry["name"]): entry for entry in self.want["acls"]}
+ else:
+ wantd = {}
+ if self.have:
+ haved = {(entry["name"]): entry for entry in self.have["acls"]}
+ else:
+ haved = {}
+
+ for k, want in iteritems(wantd):
+ h_want = haved.get(k, {})
+ if want.get("aces"):
+ for each in want["aces"]:
+ if h_want.get("aces"):
+ for e_have in h_want.get("aces"):
+ if e_have.get("source") == each.get(
+ "source"
+ ) and e_have.get("destination") == each.get(
+ "destination"
+ ):
+ if (
+ "protocol" in e_have
+ and "protocol" not in each
+ and each.get("protocol_options")
+ == e_have.get("protocol_options")
+ ):
+ del e_have["protocol"]
+ break
+ # if state is merged, merge want onto have and then compare
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, empty out wantd and set haved to wantd
+ if self.state == "deleted":
+ haved = {
+ k: v for k, v in iteritems(haved) if k in wantd or not wantd
+ }
+ wantd = {}
+
+ # remove superfluous config for overridden and deleted
+ if self.state in ["overridden", "deleted"]:
+ for k, have in iteritems(haved):
+ if k not in wantd:
+ self._compare(want={}, have=have)
+
+ temp = []
+ for k, want in iteritems(wantd):
+ if want.get("rename") and want.get("rename") not in temp:
+ self.commands.extend(
+ ["access-list {name} rename {rename}".format(**want)]
+ )
+ elif k in haved:
+ temp.append(k)
+ self._compare(want=want, have=haved.pop(k, {}))
+ if self.state in ["replaced", "overridden", "deleted"]:
+ config_cmd = [cmd for cmd in self.commands if "no" in cmd][::-1]
+ config_cmd.extend(
+ [cmd for cmd in self.commands if "no" not in cmd]
+ )
+ self.commands = config_cmd
+
+ def _compare(self, want, have):
+ """Leverages the base class `compare()` method and
+ populates the list of commands to be run by comparing
+ the `want` and `have` data with the `parsers` defined
+ for the Ospf_interfaces network resource.
+ """
+ parsers = ["aces"]
+
+ if want.get("aces"):
+ for each in want["aces"]:
+ set_want = True
+ if have.get("aces"):
+ temp = 0
+ for e_have in have.get("aces"):
+ if e_have.get("source") == each.get(
+ "source"
+ ) and e_have.get("destination") == each.get(
+ "destination"
+ ):
+ set_want = False
+ each.update(
+ {
+ "name": want.get("name"),
+ "acl_type": want.get("acl_type"),
+ }
+ )
+ e_have.update(
+ {
+ "name": have.get("name"),
+ "acl_type": have.get("acl_type"),
+ }
+ )
+ self.compare(
+ parsers=parsers,
+ want={"aces": each},
+ have={"aces": e_have},
+ )
+ del have.get("aces")[temp]
+ break
+ temp += 1
+ else:
+ each.update(
+ {
+ "name": want.get("name"),
+ "acl_type": want.get("acl_type"),
+ }
+ )
+ self.compare(
+ parsers=parsers, want={"aces": each}, have=dict()
+ )
+ set_want = False
+ if set_want:
+ each.update(
+ {
+ "name": want.get("name"),
+ "acl_type": want.get("acl_type"),
+ }
+ )
+ self.compare(
+ parsers=parsers, want={"aces": each}, have=dict()
+ )
+ if self.state in ["overridden", "deleted", "replaced"]:
+ if have.get("aces"):
+ for each in have["aces"]:
+ each.update(
+ {
+ "name": have.get("name"),
+ "acl_type": have.get("acl_type"),
+ }
+ )
+ self.compare(
+ parsers=parsers, want=dict(), have={"aces": each}
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/ogs/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/ogs/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/ogs/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/ogs/ogs.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/ogs/ogs.py
new file mode 100644
index 00000000..857b43ff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/config/ogs/ogs.py
@@ -0,0 +1,459 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The asa_ogs class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import copy
+from ansible.module_utils.six import iteritems
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.rm_templates.ogs import (
+ OGsTemplate,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+
+
+class OGs(ResourceModule):
+ """
+ The asa_ogs class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["ogs"]
+
+ def __init__(self, module):
+ super(OGs, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="ogs",
+ tmplt=OGsTemplate(),
+ )
+
+ def execute_module(self):
+ """ Execute the module
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ self.gen_config()
+ self.run_commands()
+ return self.result
+
+ def gen_config(self):
+ """ Select the appropriate function based on the state provided
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ if self.want:
+ wantd = {(entry["object_type"]): entry for entry in self.want}
+ else:
+ wantd = {}
+ if self.have:
+ haved = {(entry["object_type"]): entry for entry in self.have}
+ else:
+ haved = {}
+
+ obj_gp = {}
+ for k, v in wantd.items():
+ temp = {}
+ for each in v.get("object_groups"):
+ temp[each.get("name")] = each
+ temp["object_type"] = k
+ obj_gp[k] = temp
+ if obj_gp:
+ wantd = obj_gp
+ obj_gp = {}
+ for k, v in haved.items():
+ temp = {}
+ for each in v.get("object_groups"):
+ temp[each.get("name")] = each
+ temp["object_type"] = k
+ obj_gp[k] = temp
+ if obj_gp:
+ haved = obj_gp
+
+ # if state is merged, merge want onto have
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, empty out wantd and set haved to wantd
+ if self.state == "deleted":
+ temp = {}
+ for k, v in iteritems(haved):
+ temp_have = {}
+ if k in wantd or not wantd:
+ for key, val in iteritems(v):
+ if not wantd or key in wantd[k]:
+ temp_have.update({key: val})
+ temp.update({k: temp_have})
+ haved = temp
+ wantd = {}
+
+ # delete processes first so we do run into "more than one" errors
+ if self.state in ["overridden", "deleted"]:
+ for k, have in iteritems(haved):
+ if k not in wantd:
+ for each_key, each_val in iteritems(have):
+ if each_key != "object_type":
+ each_val.update(
+ {"object_type": have.get("object_type")}
+ )
+ self.addcmd(each_val, "og_name", True)
+
+ for k, want in iteritems(wantd):
+ self._compare(want=want, have=haved.pop(k, {}))
+
+ def _compare(self, want, have):
+ if want != have:
+ for k, v in iteritems(want):
+ if k != "object_type":
+ v.update({"object_type": want.get("object_type")})
+ if have:
+ for k, v in iteritems(have):
+ if k != "object_type":
+ v.update({"object_type": want.get("object_type")})
+
+ object_type = want.get("object_type")
+ if object_type == "icmp-type":
+ self._icmp_object_compare(want, have)
+ if object_type == "network":
+ self._network_object_compare(want, have)
+ elif object_type == "protocol":
+ self._protocol_object_compare(want, have)
+ elif object_type == "security":
+ self._security_object_compare(want, have)
+ elif object_type == "service":
+ self._service_object_compare(want, have)
+ elif object_type == "user":
+ self._user_object_compare(want, have)
+
+ def get_list_diff(self, want, have, object, param):
+ diff = [
+ item
+ for item in want[object][param]
+ if item not in have[object][param]
+ ]
+ return diff
+
+ def check_for_have_and_overidden(self, have):
+ if have and self.state == "overridden":
+ for name, entry in iteritems(have):
+ if name != "object_type":
+ self.addcmd(entry, "og_name", True)
+
+ def _icmp_object_compare(self, want, have):
+ icmp_obj = "icmp_type"
+ for name, entry in iteritems(want):
+ h_item = have.pop(name, {})
+ if (
+ entry != h_item
+ and name != "object_type"
+ and entry[icmp_obj].get("icmp_object")
+ ):
+ if h_item:
+ self._add_object_cmd(
+ entry, h_item, icmp_obj, ["icmp_type"]
+ )
+ else:
+ self.addcmd(entry, "og_name", False)
+ self.compare(["description"], entry, h_item)
+ if self.state in ("overridden", "replaced") and h_item:
+ self.compare(["icmp_type"], {}, h_item)
+ if h_item and h_item[icmp_obj].get("icmp_object"):
+ li_diff = self.get_list_diff(
+ entry, h_item, icmp_obj, "icmp_object"
+ )
+ else:
+ li_diff = entry[icmp_obj].get("icmp_object")
+ entry[icmp_obj]["icmp_object"] = li_diff
+ self.addcmd(entry, "icmp_type", False)
+ self.check_for_have_and_overidden(have)
+
+ def _network_object_compare(self, want, have):
+ network_obj = "network_object"
+ parsers = [
+ "network_object.host",
+ "network_object.address",
+ "network_object.ipv6_address",
+ ]
+ add_obj_cmd = False
+ for name, entry in iteritems(want):
+ h_item = have.pop(name, {})
+ if entry != h_item and name != "object_type":
+ if h_item:
+ self._add_object_cmd(
+ entry,
+ h_item,
+ network_obj,
+ ["address", "host", "ipv6_address"],
+ )
+ else:
+ add_obj_cmd = True
+ self.addcmd(entry, "og_name", False)
+ self.compare(["description"], entry, h_item)
+ if entry[network_obj].get("address"):
+ self._compare_object_diff(
+ entry,
+ h_item,
+ network_obj,
+ "address",
+ parsers,
+ "network_object.address",
+ )
+ elif h_item and h_item[network_obj].get("address"):
+ h_item[network_obj] = {
+ "address": h_item[network_obj].get("address")
+ }
+ if not add_obj_cmd:
+ self.addcmd(entry, "og_name", False)
+ self.compare(parsers, {}, h_item)
+ if entry[network_obj].get("host"):
+ self._compare_object_diff(
+ entry,
+ h_item,
+ network_obj,
+ "host",
+ parsers,
+ "network_object.host",
+ )
+ elif h_item and h_item[network_obj].get("host"):
+ h_item[network_obj] = {
+ "host": h_item[network_obj].get("host")
+ }
+ if not add_obj_cmd:
+ self.addcmd(entry, "og_name", False)
+ self.compare(parsers, {}, h_item)
+ if entry[network_obj].get("ipv6_address"):
+ self._compare_object_diff(
+ entry,
+ h_item,
+ network_obj,
+ "ipv6_address",
+ parsers,
+ "network_object.ipv6_address",
+ )
+ elif h_item and h_item[network_obj].get("ipv6_address"):
+ h_item[network_obj] = {
+ "ipv6_address": h_item[network_obj].get("ipv6_address")
+ }
+ if not add_obj_cmd:
+ self.addcmd(entry, "og_name", False)
+ self.compare(parsers, {}, h_item)
+ self.check_for_have_and_overidden(have)
+
+ def _protocol_object_compare(self, want, have):
+ protocol_obj = "protocol_object"
+ for name, entry in iteritems(want):
+ h_item = have.pop(name, {})
+ if entry != h_item and name != "object_type":
+ if h_item:
+ self._add_object_cmd(
+ entry, h_item, protocol_obj, ["protocol"]
+ )
+ else:
+ self.addcmd(entry, "og_name", False)
+ self.compare(["description"], entry, h_item)
+ if entry[protocol_obj].get("protocol"):
+ self._compare_object_diff(
+ entry,
+ h_item,
+ protocol_obj,
+ "protocol",
+ [protocol_obj],
+ protocol_obj,
+ )
+ self.check_for_have_and_overidden(have)
+
+ def _security_object_compare(self, want, have):
+ security_obj = "security_group"
+ parsers = ["security_group.sec_name", "security_group.tag"]
+ add_obj_cmd = False
+ for name, entry in iteritems(want):
+ h_item = have.pop(name, {})
+ if entry != h_item and name != "object_type":
+ if h_item:
+ self._add_object_cmd(
+ entry, h_item, security_obj, ["sec_name", "tag"]
+ )
+ else:
+ add_obj_cmd = True
+ self.addcmd(entry, "og_name", False)
+ self.compare(["description"], entry, h_item)
+ if entry[security_obj].get("sec_name"):
+ self._compare_object_diff(
+ entry,
+ h_item,
+ security_obj,
+ "sec_name",
+ parsers,
+ "security_group.sec_name",
+ )
+ elif h_item and h_item[security_obj].get("sec_name"):
+ h_item[security_obj] = {
+ "sec_name": h_item[security_obj].get("sec_name")
+ }
+ if not add_obj_cmd:
+ self.addcmd(entry, "og_name", False)
+ self.compare(parsers, {}, h_item)
+ if entry[security_obj].get("tag"):
+ self._compare_object_diff(
+ entry,
+ h_item,
+ security_obj,
+ "tag",
+ parsers,
+ "security_group.tag",
+ )
+ elif h_item and h_item[security_obj].get("tag"):
+ h_item[security_obj] = {
+ "tag": h_item[security_obj].get("tag")
+ }
+ if not add_obj_cmd:
+ self.addcmd(entry, "og_name", False)
+ self.compare(parsers, {}, h_item)
+ self.check_for_have_and_overidden(have)
+
+ def _service_object_compare(self, want, have):
+ service_obj = "service_object"
+ for name, entry in iteritems(want):
+ h_item = have.pop(name, {})
+ if entry != h_item and name != "object_type":
+ if h_item:
+ self._add_object_cmd(
+ entry, h_item, service_obj, ["protocol"]
+ )
+ else:
+ self.addcmd(entry, "og_name", False)
+ self.compare(["description"], entry, h_item)
+ if entry[service_obj].get("protocol"):
+ self._compare_object_diff(
+ entry,
+ h_item,
+ service_obj,
+ "protocol",
+ ["service_object"],
+ service_obj,
+ )
+ self.check_for_have_and_overidden(have)
+
+ def _user_object_compare(self, want, have):
+ user_obj = "user_object"
+ parsers = ["user_object.user", "user_object.user_gp"]
+ add_obj_cmd = False
+ for name, entry in iteritems(want):
+ h_item = have.pop(name, {})
+ if entry != h_item and name != "object_type":
+ if h_item:
+ self._add_object_cmd(
+ entry, h_item, user_obj, ["user", "user_group"]
+ )
+ else:
+ add_obj_cmd = True
+ self.addcmd(entry, "og_name", False)
+ self.compare(["description"], entry, h_item)
+ if entry[user_obj].get("user"):
+ self._compare_object_diff(
+ entry,
+ h_item,
+ user_obj,
+ "user",
+ ["user_object.user"],
+ "user_object.user",
+ )
+ elif h_item and h_item[user_obj].get("user"):
+ h_item[user_obj] = {"user": h_item[user_obj].get("user")}
+ if not add_obj_cmd:
+ self.addcmd(entry, "og_name", False)
+ self.compare(parsers, {}, h_item)
+ if entry[user_obj].get("user_group"):
+ self._compare_object_diff(
+ entry,
+ h_item,
+ user_obj,
+ "user_group",
+ ["user_object.user_group"],
+ "user_object.user_gp",
+ )
+ elif h_item and h_item[user_obj].get("user_group"):
+ h_item[user_obj] = {
+ "user_group": h_item[user_obj].get("user_group")
+ }
+ if not add_obj_cmd:
+ self.addcmd(entry, "og_name", False)
+ self.compare(parsers, {}, h_item)
+ self.check_for_have_and_overidden(have)
+
+ def _add_object_cmd(self, want, have, object, object_elements):
+ obj_cmd_added = False
+ for each in object_elements:
+ want_element = want[object].get(each)
+ have_element = have[object].get(each)
+ if want_element and isinstance(want_element[0], dict):
+ if (
+ want_element
+ and have_element
+ and want_element != have_element
+ ):
+ if not obj_cmd_added:
+ self.addcmd(want, "og_name", False)
+ self.compare(["description"], want, have)
+ obj_cmd_added = True
+ else:
+ if (
+ want_element
+ and have_element
+ and set(want_element) != set(have_element)
+ ):
+ if not obj_cmd_added:
+ self.addcmd(want, "og_name", False)
+ self.compare(["description"], want, have)
+ obj_cmd_added = True
+
+ def _compare_object_diff(
+ self, want, have, object, object_type, parsers, val
+ ):
+ temp_have = copy.copy(have)
+ temp_want = copy.copy(want)
+ if temp_have and temp_have[object].get(object_type):
+ want_diff = self.get_list_diff(
+ temp_want, temp_have, object, object_type
+ )
+ have_diff = [
+ each
+ for each in temp_have[object][object_type]
+ if each not in temp_want[object][object_type]
+ ]
+ if have_diff:
+ temp_have[object].pop(object_type)
+ else:
+ have_diff = []
+ want_diff = temp_want[object].get(object_type)
+ temp_want[object][object_type] = want_diff
+ if (
+ have_diff
+ or temp_have.get(object)
+ and self.state in ("overridden", "replaced")
+ ):
+ if have_diff:
+ temp_have[object] = {object_type: have_diff}
+ self.compare(parsers, {}, temp_have)
+ self.addcmd(temp_want, val, False)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/acls/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/acls/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/acls/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/acls/acls.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/acls/acls.py
new file mode 100644
index 00000000..5c3f7b97
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/acls/acls.py
@@ -0,0 +1,106 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The asa_acls fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.argspec.acls.acls import (
+ AclsArgs,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.rm_templates.acls import (
+ AclsTemplate,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+class AclsFacts(object):
+ """ The asa_acls fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+
+ self._module = module
+ self.argument_spec = AclsArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_acls_config(self, connection):
+ return connection.get("sh access-list")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for ACLs
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = self.get_acls_config(connection)
+
+ rmmod = NetworkTemplate(lines=data.splitlines(), tmplt=AclsTemplate())
+ current = rmmod.parse()
+ acls = list()
+ if current.get("acls"):
+ for key, val in iteritems(current.get("acls")):
+ if val.get("name") == "cached":
+ continue
+ for each in val.get("aces"):
+ if "protocol_number" in each:
+ each["protocol_options"] = {
+ "protocol_number": each["protocol_number"]
+ }
+ del each["protocol_number"]
+ if "icmp_icmp6_protocol" in each and each.get("protocol"):
+ each["protocol_options"] = {
+ each.get("protocol"): {
+ each["icmp_icmp6_protocol"].replace(
+ "-", "_"
+ ): True
+ }
+ }
+ del each["icmp_icmp6_protocol"]
+ elif (
+ each.get("protocol")
+ and each.get("protocol") != "icmp"
+ and each.get("protocol") != "icmp6"
+ ):
+ each["protocol_options"] = {each.get("protocol"): True}
+ acls.append(val)
+ facts = {}
+ params = {}
+ if acls:
+ params = utils.validate_config(
+ self.argument_spec, {"config": {"acls": acls}}
+ )
+ params = utils.remove_empties(params)
+ facts["acls"] = params["config"]
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/facts.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/facts.py
new file mode 100644
index 00000000..b874c3f0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/facts.py
@@ -0,0 +1,67 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The facts class for asa
+this file validates each subset of facts and selectively
+calls the appropriate facts gathering function
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts import (
+ FactsBase,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.facts.acls.acls import (
+ AclsFacts,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.facts.ogs.ogs import (
+ OGsFacts,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.facts.legacy.base import (
+ Default,
+ Hardware,
+ Config,
+)
+
+
+FACT_LEGACY_SUBSETS = dict(default=Default, hardware=Hardware, config=Config)
+
+FACT_RESOURCE_SUBSETS = dict(acls=AclsFacts, ogs=OGsFacts)
+
+
+class Facts(FactsBase):
+ """ The fact class for asa
+ """
+
+ VALID_LEGACY_GATHER_SUBSETS = frozenset(FACT_LEGACY_SUBSETS.keys())
+ VALID_RESOURCE_SUBSETS = frozenset(FACT_RESOURCE_SUBSETS.keys())
+
+ def __init__(self, module):
+ super(Facts, self).__init__(module)
+
+ def get_facts(
+ self, legacy_facts_type=None, resource_facts_type=None, data=None
+ ):
+ """ Collect the facts for asa
+ :param legacy_facts_type: List of legacy facts types
+ :param resource_facts_type: List of resource fact types
+ :param data: previously collected conf
+ :rtype: dict
+ :return: the facts gathered
+ """
+ if self.VALID_RESOURCE_SUBSETS:
+ self.get_network_resources_facts(
+ FACT_RESOURCE_SUBSETS, resource_facts_type, data
+ )
+
+ if self.VALID_LEGACY_GATHER_SUBSETS:
+ self.get_network_legacy_facts(
+ FACT_LEGACY_SUBSETS, legacy_facts_type
+ )
+
+ return self.ansible_facts, self._warnings
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/legacy/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/legacy/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/legacy/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/legacy/base.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/legacy/base.py
new file mode 100644
index 00000000..3ad46007
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/legacy/base.py
@@ -0,0 +1,186 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+"""
+The asa legacy fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import platform
+import re
+
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.asa import (
+ run_commands,
+ get_capabilities,
+)
+
+
+class FactsBase(object):
+
+ COMMANDS = list()
+
+ def __init__(self, module):
+ self.module = module
+ self.facts = dict()
+ self.warnings = list()
+ self.responses = None
+
+ def populate(self):
+ self.responses = run_commands(
+ self.module, commands=self.COMMANDS, check_rc=False
+ )
+
+ def run(self, cmd):
+ return run_commands(self.module, commands=cmd, check_rc=False)
+
+
+class Default(FactsBase):
+
+ COMMANDS = ["show version"]
+
+ def populate(self):
+ super(Default, self).populate()
+ self.facts.update(self.platform_facts())
+ data = self.responses[0]
+ if data:
+ self.facts["asatype"] = self.parse_asatype(data)
+ self.facts["serialnum"] = self.parse_serialnum(data)
+ self.parse_stacks(data)
+
+ def parse_asatype(self, data):
+ match = re.search(r"Hardware:(\s+)ASA", data)
+ if match:
+ return "ASA"
+
+ def parse_serialnum(self, data):
+ match = re.search(r"Serial Number: (\S+)", data)
+ if match:
+ return match.group(1)
+
+ def parse_stacks(self, data):
+ match = re.findall(r"^Model [Nn]umber\s+: (\S+)", data, re.M)
+ if match:
+ self.facts["stacked_models"] = match
+
+ match = re.findall(
+ r"^System [Ss]erial [Nn]umber\s+: (\S+)", data, re.M
+ )
+ if match:
+ self.facts["stacked_serialnums"] = match
+
+ def platform_facts(self):
+ platform_facts = {}
+
+ resp = get_capabilities(self.module)
+ device_info = resp["device_info"]
+ platform_facts["system"] = device_info["network_os"]
+
+ for item in (
+ "model",
+ "image",
+ "version",
+ "platform",
+ "hostname",
+ "firepower_version",
+ "device_mgr_version",
+ ):
+ val = device_info.get("network_os_%s" % item)
+ if val:
+ platform_facts[item] = val
+
+ platform_facts["api"] = resp["network_api"]
+ platform_facts["python_version"] = platform.python_version()
+
+ return platform_facts
+
+
+class Hardware(FactsBase):
+
+ COMMANDS = ["dir", "show memory"]
+
+ def populate(self):
+ warnings = list()
+ super(Hardware, self).populate()
+ data = self.responses[0]
+ if data:
+ self.facts["filesystems"] = self.parse_filesystems(data)
+ self.facts["filesystems_info"] = self.parse_filesystems_info(data)
+
+ data = self.responses[1]
+ if data:
+ if "Invalid input detected" in data:
+ warnings.append("Unable to gather memory statistics")
+ else:
+ mem_list = [l for l in data.splitlines() if "memory" in l]
+ for each in mem_list:
+ if "Free memory" in each:
+ match = re.search(
+ r"Free memory.+ (\d+) .+(\d\d)", each
+ )
+ if match:
+ self.facts["memfree_mb"] = (
+ int(match.group(1)) // 1024
+ )
+ elif "Used memory" in each:
+ match = re.search(
+ r"Used memory.+ (\d+) .+(\d\d)", each
+ )
+ if match:
+ self.facts["memused_mb"] = (
+ int(match.group(1)) // 1024
+ )
+ elif "Total memory" in each:
+ match = re.search(
+ r"Total memory.+ (\d+) .+(\d\d)", each
+ )
+ if match:
+ self.facts["memtotal_mb"] = (
+ int(match.group(1)) // 1024
+ )
+
+ def parse_filesystems(self, data):
+ return re.findall(r"^Directory of (\S+)/", data, re.M)
+
+ def parse_filesystems_info(self, data):
+ facts = dict()
+ fs = ""
+ for line in data.split("\n"):
+ match = re.match(r"^Directory of (\S+)/", line)
+ if match:
+ fs = match.group(1)
+ facts[fs] = dict()
+ continue
+ match = re.match(
+ r"^(\d+) bytes total \((\d+) bytes free\/(\d+)% free\)", line
+ )
+ if match:
+ facts[fs]["spacetotal_kb"] = int(match.group(1)) / 1024
+ facts[fs]["spacefree_kb"] = int(match.group(2)) / 1024
+
+ return facts
+
+
+class Config(FactsBase):
+
+ COMMANDS = ["show running-config"]
+
+ def populate(self):
+ super(Config, self).populate()
+ data = self.responses[0]
+ if data:
+ data = re.sub(
+ r"^Building configuration...\s+Current configuration : \d+ bytes\n",
+ "",
+ data,
+ flags=re.MULTILINE,
+ )
+ self.facts["config"] = data
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/ogs/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/ogs/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/ogs/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/ogs/ogs.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/ogs/ogs.py
new file mode 100644
index 00000000..cf1c4335
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/facts/ogs/ogs.py
@@ -0,0 +1,108 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The asa_og fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.argspec.ogs.ogs import (
+ OGsArgs,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.rm_templates.ogs import (
+ OGsTemplate,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+class OGsFacts(object):
+ """ The asa_ogs fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+
+ self._module = module
+ self.argument_spec = OGsArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_og_data(self, connection):
+ return connection.get("sh running-config object-group")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for OGs
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = self.get_og_data(connection)
+
+ rmmod = NetworkTemplate(lines=data.splitlines(), tmplt=OGsTemplate())
+ current = rmmod.parse()
+
+ ogs = []
+ object_groups = {
+ "icmp-type": "icmp_type",
+ "network": "network_object",
+ "protocol": "protocol_object",
+ "security": "security_group",
+ "service": "service_object",
+ "user": "user_object",
+ }
+ if current.get("ogs"):
+ for k, v in iteritems(current.get("ogs")):
+ obj_gp = {}
+ config_dict = {}
+ config_dict["object_type"] = k
+ config_dict["object_groups"] = []
+ for each in iteritems(v):
+ obj_gp["name"] = each[1].pop("name")
+ each[1].pop("object_type")
+ if each[1].get("description"):
+ obj_gp["description"] = each[1].pop("description")
+ if each[1].get("group_object"):
+ obj_gp["group_object"] = each[1].pop("group_object")
+ obj_gp[object_groups.get(k)] = each[1]
+ config_dict["object_groups"].append(obj_gp)
+ obj_gp = {}
+ config_dict["object_groups"] = sorted(
+ config_dict["object_groups"],
+ key=lambda k, sk="name": k[sk],
+ )
+ ogs.append(config_dict)
+ # sort the object group list of dict by object_type
+ ogs = sorted(ogs, key=lambda i: i["object_type"])
+ facts = {}
+ params = utils.remove_empties(
+ utils.validate_config(self.argument_spec, {"config": ogs})
+ )
+ facts["ogs"] = params.get("config")
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/providers/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/providers/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/providers/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/providers/module.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/providers/module.py
new file mode 100644
index 00000000..1a847275
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/providers/module.py
@@ -0,0 +1,73 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.connection import Connection
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.providers import (
+ providers,
+)
+from ansible.module_utils._text import to_text
+
+
+class NetworkModule(AnsibleModule):
+
+ fail_on_missing_provider = True
+
+ def __init__(self, connection=None, *args, **kwargs):
+ super(NetworkModule, self).__init__(*args, **kwargs)
+
+ if connection is None:
+ connection = Connection(self._socket_path)
+
+ self.connection = connection
+
+ @property
+ def provider(self):
+ if not hasattr(self, "_provider"):
+ capabilities = self.from_json(self.connection.get_capabilities())
+
+ network_os = capabilities["device_info"]["network_os"]
+ network_api = capabilities["network_api"]
+
+ if network_api == "cliconf":
+ connection_type = "network_cli"
+
+ cls = providers.get(
+ network_os, self._name.split(".")[-1], connection_type
+ )
+
+ if not cls:
+ msg = (
+ "unable to find suitable provider for network os %s"
+ % network_os
+ )
+ if self.fail_on_missing_provider:
+ self.fail_json(msg=msg)
+ else:
+ self.warn(msg)
+
+ obj = cls(self.params, self.connection, self.check_mode)
+
+ setattr(self, "_provider", obj)
+
+ return getattr(self, "_provider")
+
+ def get_facts(self, subset=None):
+ try:
+ self.provider.get_facts(subset)
+ except Exception as exc:
+ self.fail_json(msg=to_text(exc))
+
+ def edit_config(self, config_filter=None):
+ current_config = self.connection.get_config(flags=config_filter)
+ try:
+ commands = self.provider.edit_config(current_config)
+ changed = bool(commands)
+ return {"commands": commands, "changed": changed}
+ except Exception as exc:
+ self.fail_json(msg=to_text(exc))
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/providers/providers.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/providers/providers.py
new file mode 100644
index 00000000..fdf99cb3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/providers/providers.py
@@ -0,0 +1,129 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+
+from threading import RLock
+
+from ansible.module_utils.six import itervalues
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+)
+
+
+_registered_providers = {}
+_provider_lock = RLock()
+
+
+def register_provider(network_os, module_name):
+ def wrapper(cls):
+ _provider_lock.acquire()
+ try:
+ if network_os not in _registered_providers:
+ _registered_providers[network_os] = {}
+ for ct in cls.supported_connections:
+ if ct not in _registered_providers[network_os]:
+ _registered_providers[network_os][ct] = {}
+ for item in to_list(module_name):
+ for entry in itervalues(_registered_providers[network_os]):
+ entry[item] = cls
+ finally:
+ _provider_lock.release()
+ return cls
+
+ return wrapper
+
+
+def get(network_os, module_name, connection_type):
+ network_os_providers = _registered_providers.get(network_os)
+ if network_os_providers is None:
+ raise ValueError("unable to find a suitable provider for this module")
+ if connection_type not in network_os_providers:
+ raise ValueError("provider does not support this connection type")
+ elif module_name not in network_os_providers[connection_type]:
+ raise ValueError("could not find a suitable provider for this module")
+ return network_os_providers[connection_type][module_name]
+
+
+class ProviderBase(object):
+
+ supported_connections = ()
+
+ def __init__(self, params, connection=None, check_mode=False):
+ self.params = params
+ self.connection = connection
+ self.check_mode = check_mode
+
+ @property
+ def capabilities(self):
+ if not hasattr(self, "_capabilities"):
+ resp = self.from_json(self.connection.get_capabilities())
+ setattr(self, "_capabilities", resp)
+ return getattr(self, "_capabilities")
+
+ def get_value(self, path):
+ params = self.params.copy()
+ for key in path.split("."):
+ params = params[key]
+ return params
+
+ def get_facts(self, subset=None):
+ raise NotImplementedError(self.__class__.__name__)
+
+ def edit_config(self):
+ raise NotImplementedError(self.__class__.__name__)
+
+
+class CliProvider(ProviderBase):
+
+ supported_connections = ("network_cli",)
+
+ @property
+ def capabilities(self):
+ if not hasattr(self, "_capabilities"):
+ resp = self.from_json(self.connection.get_capabilities())
+ setattr(self, "_capabilities", resp)
+ return getattr(self, "_capabilities")
+
+ def get_config_context(self, config, path, indent=1):
+ if config is not None:
+ netcfg = NetworkConfig(indent=indent, contents=config)
+ try:
+ config = netcfg.get_block_config(to_list(path))
+ except ValueError:
+ config = None
+ return config
+
+ def render(self, config=None):
+ raise NotImplementedError(self.__class__.__name__)
+
+ def cli(self, command):
+ try:
+ if not hasattr(self, "_command_output"):
+ setattr(self, "_command_output", {})
+ return self._command_output[command]
+ except KeyError:
+ out = self.connection.get(command)
+ try:
+ out = json.loads(out)
+ except ValueError:
+ pass
+ self._command_output[command] = out
+ return out
+
+ def get_facts(self, subset=None):
+ return self.populate()
+
+ def edit_config(self, config=None):
+ commands = self.render(config)
+ if commands and self.check_mode is False:
+ self.connection.edit_config(commands)
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/rm_templates/acls.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/rm_templates/acls.py
new file mode 100644
index 00000000..c57c5ffd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/rm_templates/acls.py
@@ -0,0 +1,231 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+def _tmplt_access_list_name(config_data):
+ command = "access-list {acls_name} ".format(**config_data)
+ return command
+
+
+def _tmplt_access_list_entries(config_data):
+ if "aces" in config_data:
+ command = []
+
+ def source_destination_common_config(config_data, cmd, type):
+ if config_data["aces"][type].get("any"):
+ cmd += " any"
+ elif config_data["aces"][type].get("any4"):
+ cmd += " any4"
+ elif config_data["aces"][type].get("any6"):
+ cmd += " any6"
+ elif config_data["aces"][type].get("address"):
+ cmd += " {address}".format(**config_data["aces"][type])
+ if config_data["aces"][type].get("netmask"):
+ cmd += " {netmask}".format(**config_data["aces"][type])
+ elif config_data["aces"][type].get("host"):
+ cmd += " host {host}".format(**config_data["aces"][type])
+ elif config_data["aces"][type].get("interface"):
+ cmd += " interface {interface}".format(
+ **config_data["aces"][type]
+ )
+ elif config_data["aces"][type].get("object_group"):
+ cmd += " object-group {object_group}".format(
+ **config_data["aces"][type]
+ )
+ if config_data["aces"].get("protocol_options"):
+ protocol_option_key = list(
+ config_data["aces"]["protocol_options"]
+ )[0]
+ if (
+ isinstance(
+ config_data["aces"]["protocol_options"][
+ protocol_option_key
+ ],
+ dict,
+ )
+ and type == "destination"
+ ):
+ val = list(
+ config_data["aces"]["protocol_options"][
+ protocol_option_key
+ ]
+ )[0]
+ cmd += " {0}".format(val.replace("_", "-"))
+ if config_data["aces"][type].get("port_protocol"):
+ port_protocol = list(
+ config_data["aces"][type]["port_protocol"]
+ )[0]
+ cmd += (
+ " "
+ + port_protocol
+ + " "
+ + config_data["aces"][type]["port_protocol"][port_protocol]
+ )
+ return cmd
+
+ cmd = ""
+ if config_data["aces"].get("remark"):
+ command.append(
+ "access-list {name} line {line} remark {remark}".format(
+ **config_data["aces"]
+ )
+ )
+ if len(config_data["aces"]) > 4:
+ cmd = "access-list {name} line {line}".format(
+ **config_data["aces"]
+ )
+ if (
+ config_data["aces"].get("acl_type")
+ and config_data["aces"].get("acl_type") != "standard"
+ ):
+ cmd += " {acl_type}".format(**config_data["aces"])
+ if config_data["aces"].get("grant"):
+ cmd += " {grant}".format(**config_data["aces"])
+ if config_data["aces"].get("protocol_options"):
+ if (
+ "protocol_number"
+ in config_data["aces"]["protocol_options"]
+ ):
+ cmd += " {protocol_number}".format(
+ **config_data["aces"]["protocol_options"]
+ )
+ else:
+ cmd += " {0}".format(
+ list(config_data["aces"]["protocol_options"])[0]
+ )
+ elif config_data["aces"].get("protocol"):
+ cmd += " {protocol}".format(**config_data["aces"])
+ if config_data["aces"].get("source"):
+ cmd = source_destination_common_config(
+ config_data, cmd, "source"
+ )
+ if config_data["aces"].get("destination"):
+ cmd = source_destination_common_config(
+ config_data, cmd, "destination"
+ )
+ if config_data["aces"].get("log"):
+ cmd += " log {log}".format(**config_data["aces"])
+ if config_data["aces"].get("inactive"):
+ cmd += " inactive"
+ if config_data["aces"].get("time_range"):
+ cmd += " time-range {time_range}".format(**config_data["aces"])
+ if cmd:
+ command.append(cmd)
+ return command
+
+
+class AclsTemplate(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(AclsTemplate, self).__init__(lines=lines, tmplt=self)
+
+ PARSERS = [
+ {
+ "name": "acls_name",
+ "getval": re.compile(
+ r"""^access-list*
+ \s*(?P<acl_name>\S+);
+ \s*\S+\s*elements;
+ """,
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_access_list_name,
+ "compval": "name",
+ "result": {"acls": {"{{ acl_name }}": {"name": "{{ acl_name }}"}}},
+ "shared": True,
+ },
+ {
+ "name": "aces",
+ "getval": re.compile(
+ r"""^access-list*
+ \s*(?P<acl_name>\S+)*
+ \s*(?P<line>line\s\d+)*
+ \s*(?P<remark>remark\s\S.*)*
+ \s*(?P<ethertype>ethertype)*
+ \s*(?P<webtype>webtype)*
+ \s*(?P<acl_type>extended|standard)*
+ \s*(?P<grant>deny|permit)*
+ \s*(?P<ethertype_params>(dsap\s\S+)|bpdu|eii-ipx|ipx|mpls-unicast|mpls-multicast|isis|any\s)*
+ \s*(?P<std_dest>(host\s\S+)|any4|(?:[0-9]{1,3}\.){3}[0-9]{1,3}\s(?:[0-9]{1,3}\.){3}[0-9]{1,3})*
+ \s*(?P<protocol>ah|eigrp|esp|gre|icmp|icmp6|igmp|igrp|ip|ipinip|ipsec|nos|ospf|pcp|pim|pptp|sctp|snp|tcp|udp)*
+ \s*(?P<protocol_num>\d+\s)*
+ \s*(?P<source>any4|any6|any|(?:[0-9]{1,3}\.){3}[0-9]{1,3}\s(?:[0-9]{1,3}\.){3}[0-9]{1,3}|(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\S+|host\s(?:[0-9]{1,3}\.){3}[0-9]{1,3}|interface\s\S+|object-group\s\S+)*
+ \s*(?P<source_port_protocol>(eq|gts|lt|neq)\s(\S+|\d+))*
+ \s*(?P<destination>any4|any6|any|(?:[0-9]{1,3}\.){3}[0-9]{1,3}\s(?:[0-9]{1,3}\.){3}[0-9]{1,3}|(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\S+|host\s(?:[0-9]{1,3}\.){3}[0-9]{1,3}|interface\s\S+|object-group\s\S+)*
+ \s*(?P<dest_port_protocol>(eq|gts|lt|neq)\s(\S+|\d+))*
+ \s*(?P<icmp_icmp6_protocol>alternate-address|conversion-error|echo|echo-reply|information-reply|information-request|mask-reply|mask-request|membership-query|membership-reduction|membership-report|mobile-redirect|neighbor-advertisement|neighbor-redirect|neighbor-solicitation|parameter-problem|packet-too-big|redirect|router-advertisement|router-renumbering|router-solicitation|source-quench|source-route-failed|time-exceeded|timestamp-reply|timestamp-request|traceroute|unreachable)*
+ \s*(?P<log>log\s\S+)*
+ \s*(?P<time_range>time-range\s\S+)*
+ \s*(?P<inactive>inactive)*
+ """,
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_access_list_entries,
+ "result": {
+ "acls": {
+ "{{ acl_name }}": {
+ "name": "{{ acl_name }}",
+ "acl_type": "{{ acl_type if acl_type is defined }}",
+ "aces": [
+ {
+ "grant": "{{ grant }}",
+ "line": "{{ line.split(' ')[1] if line is defined }}",
+ "remark": "{{ remark.split('remark ')[1] if remark is defined }}",
+ "protocol": "{{ protocol if protocol is defined else None }}",
+ "protocol_number": "{{ protocol_num if protocol_num is defined }}",
+ "icmp_icmp6_protocol": "{{ icmp_icmp6_protocol if icmp_icmp6_protocol is defined else None }}",
+ "source": {
+ "address": "{% if source is defined and '.' in source and 'host'\
+ not in source %}{{ source.split(' ')[0] }}{% elif source is defined and\
+ '::' in source %}{{ source }}{% endif %}",
+ "netmask": "{{ source.split(' ')[1] if source is defined and '.' in source and 'host' not in source else None }}",
+ "any4": "{{ True if source is defined and source == 'any4' else None }}",
+ "any6": "{{ True if source is defined and source == 'any6' else None }}",
+ "any": "{{ True if source is defined and source == 'any' else None }}",
+ "host": "{{ source.split(' ')[1] if source is defined and 'host' in source else None }}",
+ "interface": "{{ source.split(' ')[1] if source is defined and 'interface' in source else None }}",
+ "object_group": "{{ source.split(' ')[1] if source is defined and 'object-group' in source else None }}",
+ "port_protocol": {
+ "{{ source_port_protocol.split(' ')[0] if source_port_protocol\
+ is defined else None }}": "{{ source_port_protocol.split(' ')[1]\
+ if source_port_protocol is defined else None }}"
+ },
+ },
+ "destination": {
+ "address": "{% if destination is defined and\
+ '.' in destination %}{{ destination.split(' ')[0] }}{% elif std_dest is defined and\
+ '.' in std_dest and 'host' not in std_dest %}{{ std_dest.split(' ')[0] }}{% elif destination is defined and\
+ '::' in destination %}{{ destination }}{% endif %}",
+ "netmask": "{% if destination is defined and\
+ '.' in destination %}{{ destination.split(' ')[1] }}{% elif std_dest is defined and\
+ '.' in std_dest and 'host' not in std_dest %}{{ std_dest.split(' ')[1] }}{% endif %}",
+ "any4": "{% if destination is defined and\
+ destination == 'any4' %}{{ True }}{% elif std_dest is defined and std_dest == 'any4' %}{{ True }}{% endif %}",
+ "any6": "{{ True if destination is defined and destination == 'any6' else None }}",
+ "any": "{{ True if destination is defined and destination == 'any' else None }}",
+ "host": "{% if destination is defined and\
+ 'host' in destination %}{{ source_host.split(' ')[1] }}{% elif std_dest is defined and\
+ 'host' in std_dest %}{{ std_dest.split(' ')[1] }}{% endif %}",
+ "interface": "{{ destination.split(' ')[1] if destination is defined and 'interface' in destination else None }}",
+ "object_group": "{{ destination.split(' ')[1] if destination is defined and 'object-group' in destination else None }}",
+ "port_protocol": {
+ "{{ dest_port_protocol.split(' ')[0] if dest_port_protocol\
+ is defined else None }}": "{{ dest_port_protocol.split(' ')[1]\
+ if dest_port_protocol is defined else None }}"
+ },
+ },
+ "inactive": "{{ True if inactive is defined }}",
+ "log": "{{ log.split('log ')[1] if log is defined }}",
+ "time_range": "{{ time_range if time_range is defined }}",
+ }
+ ],
+ }
+ }
+ },
+ },
+ ]
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/rm_templates/ogs.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/rm_templates/ogs.py
new file mode 100644
index 00000000..ed196fdf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/rm_templates/ogs.py
@@ -0,0 +1,400 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+def _tmplt_object_group(config_data):
+ command = "object-group {object_type} {name}".format(**config_data)
+ return command
+
+
+def _tmplt_icmp_object(config_data):
+ commands = []
+ if config_data.get("icmp_type").get("icmp_object"):
+ for each in config_data.get("icmp_type").get("icmp_object"):
+ commands.append("icmp-object {0}".format(each))
+ return commands
+
+
+def _tmplt_network_object(config_data):
+ commands = []
+ if config_data.get("network_object").get("host"):
+ for each in config_data.get("network_object").get("host"):
+ commands.append("network-object host {0}".format(each))
+ return commands
+
+
+def _tmplt_network_object_address(config_data):
+ commands = []
+ if config_data.get("network_object").get("address"):
+ for each in config_data.get("network_object").get("address"):
+ commands.append("network-object {0}".format(each))
+ return commands
+
+
+def _tmplt_network_object_ipv6(config_data):
+ commands = []
+ if config_data.get("network_object").get("ipv6_address"):
+ for each in config_data.get("network_object").get("ipv6_address"):
+ commands.append("network-object {0}".format(each))
+ return commands
+
+
+def _tmplt_protocol_object(config_data):
+ commands = []
+ if config_data.get("protocol_object").get("protocol"):
+ for each in config_data.get("protocol_object").get("protocol"):
+ commands.append("protocol {0}".format(each))
+ return commands
+
+
+def _tmplt_sec_group_name(config_data):
+ commands = []
+ if config_data.get("security_group").get("sec_name"):
+ for each in config_data.get("security_group").get("sec_name"):
+ commands.append("security-group name {0}".format(each))
+ return commands
+
+
+def _tmplt_sec_group_tag(config_data):
+ commands = []
+ if config_data.get("security_group").get("tag"):
+ for each in config_data.get("security_group").get("tag"):
+ commands.append("security-group tag {0}".format(each))
+ return commands
+
+
+def _tmplt_service_object(config_data):
+ if config_data.get("service_object").get("protocol"):
+ commands = []
+ for each in config_data.get("service_object").get("protocol"):
+ commands.append("service-object {0}".format(each))
+ return commands
+
+
+def _tmplt_user_object_user(config_data):
+ commands = []
+ if config_data.get("user_object").get("user"):
+ for each in config_data.get("user_object").get("user"):
+ commands.append("user {domain}\\{name}".format(**each))
+ return commands
+
+
+def _tmplt_user_object_user_gp(config_data):
+ commands = []
+ if config_data.get("user_object").get("user_group"):
+ for each in config_data.get("user_object").get("user_group"):
+ commands.append("user-group {domain}\\{name} {0}".format(**each))
+ return commands
+
+
+def _tmplt_group_object(config_data):
+ command = "group-object { group_object }".format(**config_data)
+ return command
+
+
+class OGsTemplate(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(OGsTemplate, self).__init__(lines=lines, tmplt=self)
+
+ PARSERS = [
+ {
+ "name": "og_name",
+ "getval": re.compile(
+ r"""
+ ^object-group*
+ \s*(?P<obj_type>\S+)*
+ \s*(?P<obj_name>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_object_group,
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {
+ "object_type": "{{ obj_type }}",
+ "name": "{{ obj_name }}",
+ }
+ }
+ }
+ },
+ "shared": True,
+ },
+ {
+ "name": "description",
+ "getval": re.compile(
+ r"""\s+description:*
+ \s*(?P<description>.+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "description {{ description }}",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {"description": "{{ description }}"}
+ }
+ }
+ },
+ },
+ {
+ "name": "icmp_type",
+ "getval": re.compile(
+ r"""\s+icmp-object*
+ \s*(?P<object>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_icmp_object,
+ "compval": "icmp_type",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {"icmp_object": ["{{ object }}"]}
+ }
+ }
+ },
+ },
+ {
+ "name": "network_object.address",
+ "getval": re.compile(
+ r"""\s+network-object*
+ \s*(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_network_object_address,
+ "compval": "network_object.address",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {"address": ["{{ address }}"]}
+ }
+ }
+ },
+ },
+ {
+ "name": "network_object.host",
+ "getval": re.compile(
+ r"""\s+network-object*
+ \s*(?P<host_obj>host)*
+ \s*(?P<host_address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_network_object,
+ "compval": "network_object.host",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {"host": ["{{ host_address }}"]}
+ }
+ }
+ },
+ },
+ {
+ "name": "network_object.ipv6_address",
+ "getval": re.compile(
+ r"""\s+network-object*
+ \s*(?P<ipv6>\S+::/\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_network_object_ipv6,
+ "compval": "network_object.ipv6_address",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {"ipv6_address": ["{{ ipv6 }}"]}
+ }
+ }
+ },
+ },
+ {
+ "name": "network_object.object",
+ "getval": re.compile(
+ r"""\s+network-object\s
+ object*
+ \s*(?P<object>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "network-object object {{ object }}",
+ "compval": "network_object.object",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {"object": "{{ object }}"}
+ }
+ }
+ },
+ },
+ {
+ "name": "protocol_object",
+ "getval": re.compile(
+ r"""\s+protocol-object*
+ \s*(?P<protocol>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_protocol_object,
+ "compval": "protocol_object",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {"protocol": ["{{ protocol }}"]}
+ }
+ }
+ },
+ },
+ {
+ "name": "security_group.sec_name",
+ "getval": re.compile(
+ r"""\s+security-group\s
+ name*
+ \s*(?P<name>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_sec_group_name,
+ "compval": "security_group.sec_name",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {"sec_name": ["{{ name }}"]}
+ }
+ }
+ },
+ },
+ {
+ "name": "security_group.tag",
+ "getval": re.compile(
+ r"""\s+security-group\s
+ tag*
+ \s*(?P<tag>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_sec_group_tag,
+ "compval": "security_group.tag",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {"tag": ["{{ tag }}"]}
+ }
+ }
+ },
+ },
+ {
+ "name": "service_object",
+ "getval": re.compile(
+ r"""\s+service-object*
+ \s*(?P<protocol>\S+)*\s
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_service_object,
+ "compval": "service_object",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {"protocol": ["{{ protocol }}"]}
+ }
+ }
+ },
+ },
+ {
+ "name": "service_object.object",
+ "getval": re.compile(
+ r"""\s+service-object\s
+ object*
+ \s*(?P<object>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "service-object object {{ object }}",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {"object": "{{ object }}"}
+ }
+ }
+ },
+ },
+ {
+ "name": "user_object.user",
+ "getval": re.compile(
+ r"""\s+user*
+ \s*(?P<domain>\S+)\\
+ (?P<user_name>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_user_object_user,
+ "compval": "user_object",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {
+ "user": [
+ {
+ "name": "{{ user_name }}",
+ "domain": "{{ domain }}",
+ }
+ ]
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "user_object.user_gp",
+ "getval": re.compile(
+ r"""\s+user-group*
+ \s*(?P<domain>\S+)\\
+ (?P<user_gp>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_user_object_user_gp,
+ "compval": "user_object",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {
+ "user_group": [
+ {
+ "name": "{{ user_gp }}",
+ "domain": "{{ domain }}",
+ }
+ ]
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "group_object",
+ "getval": re.compile(
+ r"""\s+group-object*
+ \s*(?P<gp_obj>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_group_object,
+ "compval": "group_object",
+ "result": {
+ "ogs": {
+ "{{ obj_type }}": {
+ "{{ obj_name }}": {"group_object": "{{ gp_obj }}"}
+ }
+ }
+ },
+ },
+ ]
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/utils/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/utils/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/utils/utils.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/utils/utils.py
new file mode 100644
index 00000000..5dd85312
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/module_utils/network/asa/utils/utils.py
@@ -0,0 +1,330 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+# utils
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import socket
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ is_masklen,
+ to_netmask,
+)
+
+
+def remove_duplicate_cmd(cmd, commands):
+ # Remove duplicate interface from commands
+ set_cmd = []
+ for each in commands:
+ if cmd in each:
+ if each not in set_cmd:
+ set_cmd.append(each)
+ else:
+ set_cmd.append(each)
+
+ return set_cmd
+
+
+def remove_command_from_config_list(interface, cmd, commands):
+ # To delete the passed config
+ if interface not in commands:
+ commands.insert(0, interface)
+ commands.append("no %s" % cmd)
+ return commands
+
+
+def add_command_to_config_list(interface, cmd, commands):
+ # To set the passed config
+ if interface not in commands:
+ commands.insert(0, interface)
+ commands.append(cmd)
+
+
+def check_n_return_valid_ipv6_addr(module, input_list, filtered_ipv6_list):
+ # To verify the valid ipv6 address
+ try:
+ for each in input_list:
+ if "::" in each:
+ if "/" in each:
+ each = each.split("/")[0]
+ if socket.inet_pton(socket.AF_INET6, each):
+ filtered_ipv6_list.append(each)
+ return filtered_ipv6_list
+ except socket.error:
+ module.fail_json(msg="Incorrect IPV6 address!")
+
+
+def new_dict_to_set(input_dict, temp_list, test_set, count=0):
+ # recursive function to convert input dict to set for comparision
+ test_dict = dict()
+ if isinstance(input_dict, dict):
+ input_dict_len = len(input_dict)
+ for k, v in sorted(iteritems(input_dict)):
+ count += 1
+ if isinstance(v, list):
+ temp_list.append(k)
+ for each in v:
+ if isinstance(each, dict):
+ if [True for i in each.values() if type(i) == list]:
+ new_dict_to_set(each, temp_list, test_set, count)
+ else:
+ new_dict_to_set(each, temp_list, test_set, 0)
+ else:
+ if v is not None:
+ test_dict.update({k: v})
+ try:
+ if (
+ tuple(iteritems(test_dict)) not in test_set
+ and count == input_dict_len
+ ):
+ test_set.add(tuple(iteritems(test_dict)))
+ count = 0
+ except TypeError:
+ temp_dict = {}
+
+ def expand_dict(dict_to_expand):
+ temp = dict()
+ for k, v in iteritems(dict_to_expand):
+ if isinstance(v, dict):
+ expand_dict(v)
+ else:
+ if v is not None:
+ temp.update({k: v})
+ temp_dict.update(tuple(iteritems(temp)))
+
+ new_dict = {k: v}
+ expand_dict(new_dict)
+ if tuple(iteritems(temp_dict)) not in test_set:
+ test_set.add(tuple(iteritems(temp_dict)))
+
+
+def dict_to_set(sample_dict):
+ # Generate a set with passed dictionary for comparison
+ test_dict = dict()
+ if isinstance(sample_dict, dict):
+ for k, v in iteritems(sample_dict):
+ if v is not None:
+ if isinstance(v, list):
+ if isinstance(v[0], dict):
+ li = []
+ for each in v:
+ for key, value in iteritems(each):
+ if isinstance(value, list):
+ each[key] = tuple(value)
+ li.append(tuple(iteritems(each)))
+ v = tuple(li)
+ else:
+ v = tuple(v)
+ elif isinstance(v, dict):
+ li = []
+ for key, value in iteritems(v):
+ if isinstance(value, list):
+ v[key] = tuple(value)
+ li.extend(tuple(iteritems(v)))
+ v = tuple(li)
+ test_dict.update({k: v})
+ return_set = set(tuple(iteritems(test_dict)))
+ else:
+ return_set = set(sample_dict)
+ return return_set
+
+
+def filter_dict_having_none_value(want, have):
+ # Generate dict with have dict value which is None in want dict
+ test_dict = dict()
+ test_key_dict = dict()
+ name = want.get("name")
+ if name:
+ test_dict["name"] = name
+ diff_ip = False
+ want_ip = ""
+ for k, v in iteritems(want):
+ if isinstance(v, dict):
+ for key, value in iteritems(v):
+ if value is None:
+ dict_val = have.get(k).get(key)
+ test_key_dict.update({key: dict_val})
+ test_dict.update({k: test_key_dict})
+ if isinstance(v, list):
+ for key, value in iteritems(v[0]):
+ if value is None:
+ dict_val = have.get(k).get(key)
+ test_key_dict.update({key: dict_val})
+ test_dict.update({k: test_key_dict})
+ # below conditions checks are added to check if
+ # secondary IP is configured, if yes then delete
+ # the already configured IP if want and have IP
+ # is different else if it's same no need to delete
+ for each in v:
+ if each.get("secondary"):
+ want_ip = each.get("address").split("/")
+ have_ip = have.get("ipv4")
+ if (
+ len(want_ip) > 1
+ and have_ip
+ and have_ip[0].get("secondary")
+ ):
+ have_ip = have_ip[0]["address"].split(" ")[0]
+ if have_ip != want_ip[0]:
+ diff_ip = True
+ if each.get("secondary") and diff_ip is True:
+ test_key_dict.update({"secondary": True})
+ test_dict.update({"ipv4": test_key_dict})
+ if v is None:
+ val = have.get(k)
+ test_dict.update({k: val})
+ return test_dict
+
+
+def remove_duplicate_interface(commands):
+ # Remove duplicate interface from commands
+ set_cmd = []
+ for each in commands:
+ if "interface" in each:
+ if each not in set_cmd:
+ set_cmd.append(each)
+ else:
+ set_cmd.append(each)
+
+ return set_cmd
+
+
+def validate_ipv4(value, module):
+ if value:
+ address = value.split("/")
+ if len(address) != 2:
+ module.fail_json(
+ msg="address format is <ipv4 address>/<mask>, got invalid format {0}".format(
+ value
+ )
+ )
+
+ if not is_masklen(address[1]):
+ module.fail_json(
+ msg="invalid value for mask: {0}, mask should be in range 0-32".format(
+ address[1]
+ )
+ )
+
+
+def validate_ipv6(value, module):
+ if value:
+ address = value.split("/")
+ if len(address) != 2:
+ module.fail_json(
+ msg="address format is <ipv6 address>/<mask>, got invalid format {0}".format(
+ value
+ )
+ )
+ else:
+ if not 0 <= int(address[1]) <= 128:
+ module.fail_json(
+ msg="invalid value for mask: {0}, mask should be in range 0-128".format(
+ address[1]
+ )
+ )
+
+
+def validate_n_expand_ipv4(module, want):
+ # Check if input IPV4 is valid IP and expand IPV4 with its subnet mask
+ ip_addr_want = want.get("address")
+ if len(ip_addr_want.split(" ")) > 1:
+ return ip_addr_want
+ validate_ipv4(ip_addr_want, module)
+ ip = ip_addr_want.split("/")
+ if len(ip) == 2:
+ ip_addr_want = "{0} {1}".format(ip[0], to_netmask(ip[1]))
+
+ return ip_addr_want
+
+
+def normalize_interface(name):
+ """Return the normalized interface name
+ """
+ if not name:
+ return
+
+ def _get_number(name):
+ digits = ""
+ for char in name:
+ if char.isdigit() or char in "/.":
+ digits += char
+ return digits
+
+ if name.lower().startswith("gi"):
+ if_type = "GigabitEthernet"
+ elif name.lower().startswith("te"):
+ if_type = "TenGigabitEthernet"
+ elif name.lower().startswith("fa"):
+ if_type = "FastEthernet"
+ elif name.lower().startswith("fo"):
+ if_type = "FortyGigabitEthernet"
+ elif name.lower().startswith("long"):
+ if_type = "LongReachEthernet"
+ elif name.lower().startswith("et"):
+ if_type = "Ethernet"
+ elif name.lower().startswith("vl"):
+ if_type = "Vlan"
+ elif name.lower().startswith("lo"):
+ if_type = "loopback"
+ elif name.lower().startswith("po"):
+ if_type = "Port-channel"
+ elif name.lower().startswith("nv"):
+ if_type = "nve"
+ elif name.lower().startswith("twe"):
+ if_type = "TwentyFiveGigE"
+ elif name.lower().startswith("hu"):
+ if_type = "HundredGigE"
+ else:
+ if_type = None
+
+ number_list = name.split(" ")
+ if len(number_list) == 2:
+ number = number_list[-1].strip()
+ else:
+ number = _get_number(name)
+
+ if if_type:
+ proper_interface = if_type + number
+ else:
+ proper_interface = name
+
+ return proper_interface
+
+
+def get_interface_type(interface):
+ """Gets the type of interface
+ """
+
+ if interface.upper().startswith("GI"):
+ return "GigabitEthernet"
+ elif interface.upper().startswith("TE"):
+ return "TenGigabitEthernet"
+ elif interface.upper().startswith("FA"):
+ return "FastEthernet"
+ elif interface.upper().startswith("FO"):
+ return "FortyGigabitEthernet"
+ elif interface.upper().startswith("LON"):
+ return "LongReachEthernet"
+ elif interface.upper().startswith("ET"):
+ return "Ethernet"
+ elif interface.upper().startswith("VL"):
+ return "Vlan"
+ elif interface.upper().startswith("LO"):
+ return "loopback"
+ elif interface.upper().startswith("PO"):
+ return "Port-channel"
+ elif interface.upper().startswith("NV"):
+ return "nve"
+ elif interface.upper().startswith("TWE"):
+ return "TwentyFiveGigE"
+ elif interface.upper().startswith("HU"):
+ return "HundredGigE"
+ else:
+ return "unknown"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_acl.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_acl.py
new file mode 100644
index 00000000..a73bcc4a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_acl.py
@@ -0,0 +1,235 @@
+#!/usr/bin/python
+#
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: asa_acl
+author: Patrick Ogenstad (@ogenstad)
+short_description: (deprecated, removed after 2022-06-01) Manage access-lists on a
+ Cisco ASA
+description:
+- This module allows you to work with access-lists on a Cisco ASA device.
+version_added: 1.0.0
+deprecated:
+ alternative: asa_acl
+ why: Newer and updated modules released with more functionality in Ansible 2.10
+ removed_at_date: '2022-06-01'
+extends_documentation_fragment:
+- cisco.asa.asa
+options:
+ lines:
+ description:
+ - The ordered set of commands that should be configured in the section. The commands
+ must be the exact same commands as found in the device running-config. Be sure
+ to note the configuration command syntax as some commands are automatically
+ modified by the device config parser.
+ required: true
+ aliases:
+ - commands
+ type: list
+ elements: str
+ before:
+ description:
+ - The ordered set of commands to push on to the command stack if a change needs
+ to be made. This allows the playbook designer the opportunity to perform configuration
+ commands prior to pushing any changes without affecting how the set of commands
+ are matched against the system.
+ type: list
+ elements: str
+ after:
+ description:
+ - The ordered set of commands to append to the end of the command stack if a changed
+ needs to be made. Just like with I(before) this allows the playbook designer
+ to append a set of commands to be executed after the command set.
+ type: list
+ elements: str
+ match:
+ description:
+ - Instructs the module on the way to perform the matching of the set of commands
+ against the current device config. If match is set to I(line), commands are
+ matched line by line. If match is set to I(strict), command lines are matched
+ with respect to position. Finally if match is set to I(exact), command lines
+ must be an equal match.
+ default: line
+ choices:
+ - line
+ - strict
+ - exact
+ type: str
+ replace:
+ description:
+ - Instructs the module on the way to perform the configuration on the device. If
+ the replace argument is set to I(line) then the modified lines are pushed to
+ the device in configuration mode. If the replace argument is set to I(block)
+ then the entire command block is pushed to the device in configuration mode
+ if any line is not correct.
+ default: line
+ choices:
+ - line
+ - block
+ type: str
+ force:
+ description:
+ - The force argument instructs the module to not consider the current devices
+ running-config. When set to true, this will cause the module to push the contents
+ of I(src) into the device without first checking if already configured.
+ type: bool
+ default: no
+ config:
+ description:
+ - The module, by default, will connect to the remote device and retrieve the current
+ running-config to use as a base for comparing against the contents of source. There
+ are times when it is not desirable to have the task get the current running-config
+ for every task in a playbook. The I(config) argument allows the implementer
+ to pass in the configuration to use as the base config for comparison.
+ type: str
+"""
+
+EXAMPLES = """
+- cisco.asa.asa_acl:
+ lines:
+ - access-list ACL-ANSIBLE extended permit tcp any any eq 82
+ - access-list ACL-ANSIBLE extended permit tcp any any eq www
+ - access-list ACL-ANSIBLE extended permit tcp any any eq 97
+ - access-list ACL-ANSIBLE extended permit tcp any any eq 98
+ - access-list ACL-ANSIBLE extended permit tcp any any eq 99
+ before: clear configure access-list ACL-ANSIBLE
+ match: strict
+ replace: block
+ provider: '{{ cli }}'
+
+- cisco.asa.asa_acl:
+ lines:
+ - access-list ACL-OUTSIDE extended permit tcp any any eq www
+ - access-list ACL-OUTSIDE extended permit tcp any any eq https
+ context: customer_a
+ provider: '{{ cli }}'
+"""
+
+RETURN = """
+updates:
+ description: The set of commands that will be pushed to the remote device
+ returned: always
+ type: list
+ sample: ['access-list ACL-OUTSIDE extended permit tcp any any eq www']
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.asa import (
+ asa_argument_spec,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.asa import (
+ get_config,
+ load_config,
+)
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+ dumps,
+)
+
+
+def get_acl_config(module, acl_name):
+ contents = module.params["config"]
+ if not contents:
+ contents = get_config(module)
+
+ filtered_config = list()
+ for item in contents.split("\n"):
+ if item.startswith("access-list %s " % acl_name):
+ filtered_config.append(item)
+
+ return NetworkConfig(indent=1, contents="\n".join(filtered_config))
+
+
+def parse_acl_name(module):
+ first_line = True
+ for line in module.params["lines"]:
+ ace = line.split()
+ if ace[0] != "access-list":
+ module.fail_json(
+ msg='All lines/commands must begin with "access-list" %s is not permitted'
+ % ace[0]
+ )
+ if len(ace) <= 1:
+ module.fail_json(
+ msg="All lines/commands must contain the name of the access-list"
+ )
+ if first_line:
+ acl_name = ace[1]
+ else:
+ if acl_name != ace[1]:
+ module.fail_json(
+ msg="All lines/commands must use the same access-list %s is not %s"
+ % (ace[1], acl_name)
+ )
+ first_line = False
+
+ return acl_name
+
+
+def main():
+
+ argument_spec = dict(
+ lines=dict(
+ aliases=["commands"], required=True, type="list", elements="str"
+ ),
+ before=dict(type="list", elements="str"),
+ after=dict(type="list", elements="str"),
+ match=dict(
+ default="line", choices=["line", "strict", "exact"], type="str"
+ ),
+ replace=dict(default="line", choices=["line", "block"], type="str"),
+ force=dict(default=False, type="bool"),
+ config=dict(type="str"),
+ )
+
+ argument_spec.update(asa_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ lines = module.params["lines"]
+
+ result = {"changed": False}
+ if len(lines) > 0:
+ candidate = NetworkConfig(indent=1)
+ candidate.add(lines)
+
+ acl_name = parse_acl_name(module)
+
+ if not module.params["force"]:
+ contents = get_acl_config(module, acl_name)
+ config = NetworkConfig(indent=1, contents=contents)
+
+ commands = candidate.difference(config)
+ commands = dumps(commands, "commands").split("\n")
+ commands = [str(c) for c in commands if c]
+ else:
+ commands = str(candidate).split("\n")
+
+ if commands:
+ if module.params["before"]:
+ commands[:0] = module.params["before"]
+
+ if module.params["after"]:
+ commands.extend(module.params["after"])
+
+ if not module.check_mode:
+ load_config(module, commands)
+
+ result["changed"] = True
+
+ result["updates"] = commands
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_acls.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_acls.py
new file mode 100644
index 00000000..dfcaf159
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_acls.py
@@ -0,0 +1,1258 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for asa_acls
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: asa_acls
+short_description: Access-Lists resource module
+description: This module configures and manages the named or numbered ACLs on ASA
+ platforms.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco ASA Version 9.10(1)11
+- This module works with connection C(network_cli). See L(ASA Platform Options,../network/user_guide/platform_asa.html).
+options:
+ config:
+ description: A dictionary of ACL options.
+ type: dict
+ suboptions:
+ acls:
+ description:
+ - A list of Access Control Lists (ACL).
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: The name or the number of the ACL.
+ required: true
+ type: str
+ acl_type:
+ description:
+ - ACL type
+ type: str
+ choices:
+ - extended
+ - standard
+ rename:
+ description:
+ - Rename an existing access-list.
+ - If input to rename param is given, it'll take preference over other
+ parameters and only rename config will be matched and computed against.
+ type: str
+ aces:
+ description: The entries within the ACL.
+ elements: dict
+ type: list
+ suboptions:
+ grant:
+ description: Specify the action.
+ type: str
+ choices:
+ - permit
+ - deny
+ line:
+ description:
+ - Use this to specify line number at which ACE should be entered.
+ - Existing ACE can be updated based on the input line number.
+ - It's not a required param in case of configuring the acl, but in
+ case of Delete operation it's required, else Delete operation won't
+ work as expected.
+ - Refer to vendor documentation for valid values.
+ type: int
+ remark:
+ description:
+ - Specify a comment (remark) for the access-list after this keyword
+ type: str
+ protocol:
+ description:
+ - Specify the protocol to match.
+ - Refer to vendor documentation for valid values.
+ type: str
+ protocol_options:
+ description: protocol type.
+ type: dict
+ suboptions:
+ protocol_number:
+ description: An IP protocol number
+ type: int
+ ahp:
+ description: Authentication Header Protocol.
+ type: bool
+ eigrp:
+ description: Cisco's EIGRP routing protocol.
+ type: bool
+ esp:
+ description: Encapsulation Security Payload.
+ type: bool
+ gre:
+ description: Cisco's GRE tunneling.
+ type: bool
+ icmp:
+ description: Internet Control Message Protocol.
+ type: dict
+ suboptions:
+ alternate_address:
+ description: Alternate address
+ type: bool
+ conversion_error:
+ description: Datagram conversion
+ type: bool
+ echo:
+ description: Echo (ping)
+ type: bool
+ echo_reply:
+ description: Echo reply
+ type: bool
+ information_reply:
+ description: Information replies
+ type: bool
+ information_request:
+ description: Information requests
+ type: bool
+ mask_reply:
+ description: Mask replies
+ type: bool
+ mask_request:
+ description: mask_request
+ type: bool
+ mobile_redirect:
+ description: Mobile host redirect
+ type: bool
+ parameter_problem:
+ description: All parameter problems
+ type: bool
+ redirect:
+ description: All redirects
+ type: bool
+ router_advertisement:
+ description: Router discovery advertisements
+ type: bool
+ router_solicitation:
+ description: Router discovery solicitations
+ type: bool
+ source_quench:
+ description: Source quenches
+ type: bool
+ source_route_failed:
+ description: Source route
+ type: bool
+ time_exceeded:
+ description: All time exceededs
+ type: bool
+ timestamp_reply:
+ description: Timestamp replies
+ type: bool
+ timestamp_request:
+ description: Timestamp requests
+ type: bool
+ traceroute:
+ description: Traceroute
+ type: bool
+ unreachable:
+ description: All unreachables
+ type: bool
+ icmp6:
+ description: Internet Control Message Protocol.
+ type: dict
+ suboptions:
+ echo:
+ description: Echo (ping)
+ type: bool
+ echo_reply:
+ description: Echo reply
+ type: bool
+ membership_query:
+ description: Membership query
+ type: bool
+ membership_reduction:
+ description: Membership reduction
+ type: bool
+ membership_report:
+ description: Membership report
+ type: bool
+ neighbor_advertisement:
+ description: Neighbor advertisement
+ type: bool
+ neighbor_redirect:
+ description: Neighbor redirect
+ type: bool
+ neighbor_solicitation:
+ description: Neighbor_solicitation
+ type: bool
+ packet_too_big:
+ description: Packet too big
+ type: bool
+ parameter_problem:
+ description: Parameter problem
+ type: bool
+ router_advertisement:
+ description: Router discovery advertisements
+ type: bool
+ router_renumbering:
+ description: Router renumbering
+ type: bool
+ router_solicitation:
+ description: Router solicitation
+ type: bool
+ time_exceeded:
+ description: Time exceeded
+ type: bool
+ unreachable:
+ description: All unreachables
+ type: bool
+ igmp:
+ description: Internet Gateway Message Protocol.
+ type: bool
+ igrp:
+ description: Internet Gateway Routing Protocol.
+ type: bool
+ ip:
+ description: Any Internet Protocol.
+ type: bool
+ ipinip:
+ description: IP in IP tunneling.
+ type: bool
+ ipsec:
+ description: IP Security.
+ type: bool
+ nos:
+ description: KA9Q NOS compatible IP over IP tunneling.
+ type: bool
+ ospf:
+ description: OSPF routing protocol.
+ type: bool
+ pcp:
+ description: Payload Compression Protocol.
+ type: bool
+ pim:
+ description: Protocol Independent Multicast.
+ type: bool
+ pptp:
+ description: Point-to-Point Tunneling Protocol.
+ type: bool
+ sctp:
+ description: Stream Control Transmission Protocol.
+ type: bool
+ snp:
+ description: Simple Network Protocol.
+ type: bool
+ udp:
+ description: User Datagram Protocol.
+ type: bool
+ tcp:
+ description: Match TCP packet flags
+ type: bool
+ source:
+ description: Specify the packet source.
+ type: dict
+ suboptions:
+ address:
+ description: Source network address.
+ type: str
+ netmask:
+ description: Netmask for source IP address, valid with IPV4 address.
+ type: str
+ any:
+ description:
+ - Match any source address.
+ type: bool
+ any4:
+ description:
+ - Match any ipv4 source address.
+ type: bool
+ any6:
+ description:
+ - Match any ipv6 source address.
+ type: bool
+ host:
+ description: A single source host
+ type: str
+ interface:
+ description: Use interface address as source address
+ type: str
+ object_group:
+ description: Network object-group for source address
+ type: str
+ port_protocol:
+ description:
+ - Specify the destination port along with protocol.
+ - Note, Valid with TCP/UDP protocol_options
+ type: dict
+ suboptions:
+ eq:
+ description: Match only packets on a given port number.
+ type: str
+ gt:
+ description: Match only packets with a greater port number.
+ type: str
+ lt:
+ description: Match only packets with a lower port number.
+ type: str
+ neq:
+ description: Match only packets not on a given port number.
+ type: str
+ range:
+ description: Port range operator
+ type: dict
+ suboptions:
+ start:
+ description: Specify the start of the port range.
+ type: int
+ end:
+ description: Specify the end of the port range.
+ type: int
+ destination:
+ description: Specify the packet destination.
+ type: dict
+ suboptions:
+ address:
+ description: Host address to match, or any single host address.
+ type: str
+ netmask:
+ description: Netmask for destination IP address, valid with IPV4
+ address.
+ type: str
+ any:
+ description: Match any destination address.
+ type: bool
+ any4:
+ description:
+ - Match any ipv4 destination address.
+ type: bool
+ any6:
+ description:
+ - Match any ipv6 destination address.
+ type: bool
+ host:
+ description: A single destination host
+ type: str
+ interface:
+ description: Use interface address as destination address
+ type: str
+ object_group:
+ description: Network object-group for destination address
+ type: str
+ port_protocol:
+ description:
+ - Specify the destination port along with protocol.
+ - Note, Valid with TCP/UDP protocol_options
+ type: dict
+ suboptions:
+ eq:
+ description: Match only packets on a given port number.
+ type: str
+ gt:
+ description: Match only packets with a greater port number.
+ type: str
+ lt:
+ description: Match only packets with a lower port number.
+ type: str
+ neq:
+ description: Match only packets not on a given port number.
+ type: str
+ range:
+ description: Port range operator
+ type: dict
+ suboptions:
+ start:
+ description: Specify the start of the port range.
+ type: int
+ end:
+ description: Specify the end of the port range.
+ type: int
+ inactive:
+ description: Keyword for disabling an ACL element.
+ type: bool
+ log:
+ description: Log matches against this entry.
+ type: str
+ choices:
+ - default
+ - alerts
+ - critical
+ - debugging
+ - disable
+ - emergencies
+ - errors
+ - informational
+ - interval
+ - notifications
+ - warnings
+ time_range:
+ description: Specify a time-range.
+ type: str
+ running_config:
+ description:
+ - The module, by default, will connect to the remote device and retrieve the current
+ running-config to use as a base for comparing against the contents of source.
+ There are times when it is not desirable to have the task get the current running-config
+ for every task in a playbook. The I(running_config) argument allows the implementer
+ to pass in the configuration to use as the base config for comparison.
+ type: str
+ state:
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+ description:
+ - The state of the configuration after module completion
+ type: str
+
+"""
+
+EXAMPLES = """
+# Using merged
+# Before state:
+# -------------
+#
+# vasa#sh access-lists
+# access-list global_access; 2 elements; name hash: 0xbd6c87a7
+# access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+# access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+# access-list R1_traffic; 1 elements; name hash: 0xaf40d3c2
+# access-list R1_traffic line 1
+# extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+# log errors interval 300 (hitcnt=0) 0x4a4660f3
+
+- name: Merge provided configuration with device configuration
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: temp_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.2.0
+ netmask: 255.255.255.0
+ destination:
+ address: 192.0.3.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ log: default
+ - grant: deny
+ line: 2
+ protocol_options:
+ igrp: true
+ source:
+ address: 198.51.100.0
+ netmask: 255.255.255.0
+ destination:
+ address: 198.51.110.0
+ netmask: 255.255.255.0
+ time_range: temp
+ - grant: deny
+ line: 3
+ protocol_options:
+ tcp: true
+ source:
+ interface: management
+ destination:
+ interface: management
+ port_protocol:
+ eq: www
+ log: warnings
+ - grant: deny
+ line: 4
+ protocol_options:
+ tcp: true
+ source:
+ object_group: test_og_network
+ destination:
+ object_group: test_network_og
+ port_protocol:
+ eq: www
+ log: default
+ - name: global_access
+ acl_type: extended
+ aces:
+ - line: 3
+ remark: test global access
+ - grant: deny
+ line: 4
+ protocol_options:
+ tcp: true
+ source:
+ any: true
+ destination:
+ any: true
+ port_protocol:
+ eq: www
+ log: errors
+ - name: R1_traffic
+ aces:
+ - line: 1
+ remark: test_v6_acls
+ - grant: deny
+ line: 2
+ protocol_options:
+ tcp: true
+ source:
+ address: 2001:db8:0:3::/64
+ port_protocol:
+ eq: www
+ destination:
+ address: 2001:fc8:0:4::/64
+ port_protocol:
+ eq: telnet
+ inactive: true
+ state: merged
+
+# Commands fired:
+# ---------------
+# access-list global_access line 3 remark test global access
+# access-list global_access line 4 extended deny tcp any any eq www log errors interval 300
+# access-list R1_traffic line 1 remark test_v6_acls
+# access-list R1_traffic line 2 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive
+# access-list temp_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+# access-list temp_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+# time-range temp inactive
+# access-list temp_access line 2 extended deny tcp interface management interface management
+# eq www log warnings
+# access-list test_access line 3 extended deny tcp object-group test_og_network object-group test_network_og
+# eq www log default
+
+# After state:
+# ------------
+#
+# vasa#sh access-lists
+# access-list global_access; 3 elements; name hash: 0xbd6c87a7
+# access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+# access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+# access-list global_access line 3 remark test global access (hitcnt=0) 0xae78337e
+# access-list global_access line 4 extended deny tcp any any eq www log errors interval 300 (hitcnt=0) 0x605f2421
+# access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+# access-list R1_traffic line 1 remark test_v6_acls
+# access-list R1_traffic line 2
+# extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+# inactive (hitcnt=0) (inactive) 0xe922b432
+# access-list temp_access; 2 elements; name hash: 0xaf1b712e
+# access-list temp_access line 1
+# extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+# log default (hitcnt=0) 0xb58abb0d
+# access-list temp_access line 2
+# extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+# time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+# access-list test_access line 3
+# extended deny tcp interface management interface management eq www log warnings
+# interval 300 (hitcnt=0) 0x78aa233d
+# access-list test_access line 2 extended deny tcp object-group test_og_network object-group test_network_og
+# eq www log default (hitcnt=0) 0x477aec1e
+# access-list test_access line 2 extended deny tcp 192.0.2.0 255.255.255.0 host 192.0.3.1 eq www
+# log default (hitcnt=0) 0xdc7edff8
+# access-list test_access line 2 extended deny tcp 192.0.2.0 255.255.255.0 host 192.0.3.2 eq www
+# log default (hitcnt=0) 0x7b0e9fde
+# access-list test_access line 2 extended deny tcp 198.51.100.0 255.255.255.0 2001:db8:3::/64 eq www
+# log default (hitcnt=0) 0x97c75adc
+
+# Using Merged to Rename ACLs
+# Before state:
+# -------------
+#
+# vasa#sh access-lists
+# access-list global_access; 2 elements; name hash: 0xbd6c87a7
+# access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+# access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+# access-list R1_traffic; 1 elements; name hash: 0xaf40d3c2
+# access-list R1_traffic line 1
+# extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+# log errors interval 300 (hitcnt=0) 0x4a4660f3
+
+- name: Rename ACL with different name using Merged state
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: global_access
+ rename: global_access_renamed
+ - name: R1_traffic
+ rename: R1_traffic_renamed
+ state: merged
+
+# Commands fired:
+# ---------------
+# access-list global_access rename global_access_renamed
+# access-list R1_traffic rename R1_traffic_renamed
+
+# After state:
+# -------------
+#
+# vasa#sh access-lists
+# access-list global_access_renamed; 2 elements; name hash: 0xbd6c87a7
+# access-list global_access_renamed line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+# access-list global_access_renamed line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+# access-list R1_traffic_renamed; 1 elements; name hash: 0xaf40d3c2
+# access-list R1_traffic_renamed line 1
+# extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+# log errors interval 300 (hitcnt=0) 0x4a4660f3
+
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# vasa#sh access-lists
+# access-list global_access; 3 elements; name hash: 0xbd6c87a7
+# access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+# access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+# access-list global_access line 3 extended deny tcp any any eq www log errors interval 300 (hitcnt=0) 0x605f2421
+# access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+# access-list R1_traffic line 1
+# extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+# log errors interval 300 (hitcnt=0) 0x4a4660f3
+# access-list R1_traffic line 2
+# extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+# inactive (hitcnt=0) (inactive) 0xe922b432
+# access-list temp_access; 2 elements; name hash: 0xaf1b712e
+# access-list temp_access line 1
+# extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+# log default (hitcnt=0) 0xb58abb0d
+# access-list temp_access line 2
+# extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+# time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+
+- name: Replaces device configuration of listed acl with provided configuration
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: global_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.4.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 192.0.5.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ state: replaced
+
+# Commands fired:
+# ---------------
+# no access-list global_access line 3 extended deny tcp any any eq www log errors interval 300
+# no access-list global_access line 2 extended deny tcp any any eq telnet
+# no access-list global_access line 1 extended permit icmp any any log disable
+# access-list global_access line 1 extended deny tcp 192.0.4.0 255.255.255.0 eq telnet 192.0.5.0 255.255.255.0 eq www
+
+# After state:
+# -------------
+#
+# vasa#sh access-lists
+# access-list global_access; 1 elements; name hash: 0xbd6c87a7
+# access-list global_access line 1 extended deny tcp 192.0.4.0 255.255.255.0 eq telnet
+# 192.0.5.0 255.255.255.0 eq www (hitcnt=0) 0x3e5b2757
+# access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+# access-list R1_traffic line 1
+# extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+# log errors interval 300 (hitcnt=0) 0x4a4660f3
+# access-list R1_traffic line 2
+# extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+# inactive (hitcnt=0) (inactive) 0xe922b432
+# access-list temp_access; 2 elements; name hash: 0xaf1b712e
+# access-list temp_access line 1
+# extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+# log default (hitcnt=0) 0xb58abb0d
+# access-list temp_access line 2
+# extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+# time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# vasa#sh access-lists
+# access-list global_access; 3 elements; name hash: 0xbd6c87a7
+# access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+# access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+# access-list global_access line 3 extended deny tcp any any eq www log errors interval 300 (hitcnt=0) 0x605f2421
+# access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+# access-list R1_traffic line 1
+# extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+# log errors interval 300 (hitcnt=0) 0x4a4660f3
+# access-list R1_traffic line 2
+# extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+# inactive (hitcnt=0) (inactive) 0xe922b432
+# access-list temp_access; 2 elements; name hash: 0xaf1b712e
+# access-list temp_access line 1
+# extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+# log default (hitcnt=0) 0xb58abb0d
+# access-list temp_access line 2
+# extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+# time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+
+
+- name: Override device configuration of all acl with provided configuration
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: global_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.4.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 192.0.5.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ state: overridden
+
+# Commands fired:
+# ---------------
+# access-list temp_access line 2
+# extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 time-range temp
+# no access-list temp_access line 1
+# extended grant deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+# no access-list R1_traffic line 2
+# extended grant deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive
+# no access-list R1_traffic line 1
+# extended grant deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www log errors
+# no access-list global_access line 3 extended grant deny tcp any any eq www log errors
+# no access-list global_access line 2 extended grant deny tcp any any eq telnet
+# no access-list global_access line 1 extended grant permit icmp any any log disable
+# access-list global_access line 4 extended deny tcp 192.0.4.0 255.255.255.0 eq telnet 192.0.5.0 255.255.255.0 eq www
+
+# After state:
+# -------------
+#
+# vasa#sh access-lists
+# access-list global_access; 1 elements; name hash: 0xbd6c87a7
+# access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+
+# Using Deleted
+
+# Before state:
+# -------------
+#
+# vasa#sh access-lists
+# access-list global_access; 3 elements; name hash: 0xbd6c87a7
+# access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+# access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+# access-list global_access line 3 extended deny tcp any any eq www log errors interval 300 (hitcnt=0) 0x605f2421
+# access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+# access-list R1_traffic line 1
+# extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+# log errors interval 300 (hitcnt=0) 0x4a4660f3
+# access-list R1_traffic line 2
+# extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+# inactive (hitcnt=0) (inactive) 0xe922b432
+# access-list temp_access; 2 elements; name hash: 0xaf1b712e
+# access-list temp_access line 1
+# extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+# log default (hitcnt=0) 0xb58abb0d
+# access-list temp_access line 2
+# extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+# time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+
+- name: "Delete module attributes of given acl (Note: This won't delete ALL of the ACLs configured)"
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: temp_access
+ - name: global_access
+ state: deleted
+
+# Commands fired:
+# ---------------
+# no access-list temp_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+# time-range temp inactive
+# no access-list temp_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+# log default
+# no access-list global_access line 3 extended deny tcp any any eq www log errors interval 300
+# no access-list global_access line 2 extended deny tcp any any eq telnet
+# no access-list global_access line 1 extended permit icmp any any log disable
+
+# After state:
+# -------------
+#
+# vasa#sh access-lists
+# access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+# access-list R1_traffic line 1
+# extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+# log errors interval 300 (hitcnt=0) 0x4a4660f3
+# access-list R1_traffic line 2
+# extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+# inactive (hitcnt=0) (inactive) 0xe922b432
+
+# Using Deleted without any config passed
+#"(NOTE: This will delete all of configured resource module attributes)"
+
+# Before state:
+# -------------
+#
+# vasa#sh access-lists
+# access-list global_access; 3 elements; name hash: 0xbd6c87a7
+# access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+# access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+# access-list global_access line 3 extended deny tcp any any eq www log errors interval 300 (hitcnt=0) 0x605f2421
+# access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+# access-list R1_traffic line 1
+# extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+# log errors interval 300 (hitcnt=0) 0x4a4660f3
+# access-list R1_traffic line 2
+# extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+# inactive (hitcnt=0) (inactive) 0xe922b432
+# access-list temp_access; 2 elements; name hash: 0xaf1b712e
+# access-list temp_access line 1
+# extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+# log default (hitcnt=0) 0xb58abb0d
+# access-list temp_access line 2
+# extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+# time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+
+- name: 'Delete ALL ACLs in one go (Note: This WILL delete the ALL of configured ACLs)'
+ cisco.asa.asa_acls:
+ state: deleted
+
+# Commands fired:
+# ---------------
+# no access-list global_access line 1 extended permit icmp any any log disable
+# no access-list global_access line 2 extended deny tcp any any eq telnet
+# no access-list global_access line 3 extended deny tcp any any eq www log errors interval 300
+# no access-list R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+# log errors interval 300
+# no access-list R1_traffic line 2 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive
+# no access-list temp_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+# no access-list temp_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+# time-range temp inactive
+
+
+# After state:
+# -------------
+#
+# vasa#sh access-lists
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# access-list global_access; 3 elements; name hash: 0xbd6c87a7
+# access-list global_access line 1 extended permit icmp any any log disable (hitcnt=0) 0xf1efa630
+# access-list global_access line 2 extended deny tcp any any eq telnet (hitcnt=0) 0xae5833af
+# access-list R1_traffic; 2 elements; name hash: 0xaf40d3c2
+# access-list R1_traffic line 1
+# extended deny tcp 2001:db8:0:3::/64 eq telnet 2001:fc8:0:4::/64 eq www
+# log errors interval 300 (hitcnt=0) 0x4a4660f3
+# access-list R1_traffic line 2
+# extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet
+# inactive (hitcnt=0) (inactive) 0xe922b432
+# access-list temp_access; 2 elements; name hash: 0xaf1b712e
+# access-list temp_access line 1
+# extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www
+# log default (hitcnt=0) 0xb58abb0d
+# access-list temp_access line 2
+# extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+# time-range temp (hitcnt=0) (inactive) 0xcd6b92ae
+
+
+- name: Gather listed ACLs with provided configurations
+ cisco.asa.asa_acls:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "acls": [
+# {
+# "aces": [
+# {
+# "destination": {
+# "any": true
+# },
+# "grant": "permit",
+# "line": 1,
+# "log": "disable",
+# "protocol": "icmp",
+# "source": {
+# "any": true
+# }
+# },
+# {
+# "destination": {
+# "any": true,
+# "port_protocol": {
+# "eq": "telnet"
+# }
+# },
+# "grant": "deny",
+# "line": 2,
+# "protocol": "tcp",
+# "protocol_options": {
+# "tcp": true
+# },
+# "source": {
+# "any": true
+# }
+# }
+# ],
+# "acl_type": "extended",
+# "name": "global_access"
+# },
+# {
+# "aces": [
+# {
+# "destination": {
+# "address": "2001:fc8:0:4::/64",
+# "port_protocol": {
+# "eq": "www"
+# }
+# },
+# "grant": "deny",
+# "line": 1,
+# "log": "errors",
+# "protocol": "tcp",
+# "protocol_options": {
+# "tcp": true
+# },
+# "source": {
+# "address": "2001:db8:0:3::/64",
+# "port_protocol": {
+# "eq": "telnet"
+# }
+# }
+# },
+# {
+# "destination": {
+# "address": "2001:fc8:0:4::/64",
+# "port_protocol": {
+# "eq": "telnet"
+# }
+# },
+# "grant": "deny",
+# "inactive": true,
+# "line": 2,
+# "protocol": "tcp",
+# "protocol_options": {
+# "tcp": true
+# },
+# "source": {
+# "address": "2001:db8:0:3::/64",
+# "port_protocol": {
+# "eq": "www"
+# }
+# }
+# }
+# ],
+# "acl_type": "extended",
+# "name": "R1_traffic"
+# },
+# {
+# "aces": [
+# {
+# "destination": {
+# "address": "192.0.3.0",
+# "netmask": "255.255.255.0",
+# "port_protocol": {
+# "eq": "www"
+# }
+# },
+# "grant": "deny",
+# "line": 1,
+# "log": "default",
+# "protocol": "tcp",
+# "protocol_options": {
+# "tcp": true
+# },
+# "source": {
+# "address": "192.0.2.0",
+# "netmask": "255.255.255.0"
+# }
+# },
+# {
+# "destination": {
+# "address": "198.51.110.0",
+# "netmask": "255.255.255.0"
+# },
+# "grant": "deny",
+# "inactive": true,
+# "line": 2,
+# "protocol": "igrp",
+# "protocol_options": {
+# "igrp": true
+# },
+# "source": {
+# "address": "198.51.100.0",
+# "netmask": "255.255.255.0"
+# },
+# "time_range": "temp"
+# }
+# ],
+# "acl_type": "extended",
+# "name": "temp_access"
+# }
+# ]
+# }
+# ]
+
+# Using Rendered
+
+- name: Rendered the provided configuration with the exisiting running configuration
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: temp_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.2.0
+ netmask: 255.255.255.0
+ destination:
+ address: 192.0.3.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ log: default
+ - grant: deny
+ line: 2
+ protocol_options:
+ igrp: true
+ source:
+ address: 198.51.100.0
+ netmask: 255.255.255.0
+ destination:
+ address: 198.51.110.0
+ netmask: 255.255.255.0
+ time_range: temp
+ - name: R1_traffic
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp: true
+ source:
+ address: 2001:db8:0:3::/64
+ port_protocol:
+ eq: www
+ destination:
+ address: 2001:fc8:0:4::/64
+ port_protocol:
+ eq: telnet
+ inactive: true
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "access-list temp_access line 1
+# extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0
+# eq www log default"
+# "access-list temp_access line 2
+# extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0
+# time-range temp"
+# "access-list R1_traffic
+# deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive"
+# ]
+
+# Using Parsed
+
+# parsed.cfg
+#
+# access-list test_access; 2 elements; name hash: 0xaf1b712e
+# access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+# access-list test_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 log errors
+# access-list test_R1_traffic; 1 elements; name hash: 0xaf40d3c2
+# access-list test_R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive
+
+- name: Parse the commands for provided configuration
+ cisco.asa.asa_acls:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": [
+# {
+# "acls": [
+# {
+# "aces": [
+# {
+# "destination": {
+# "address": "192.0.3.0",
+# "netmask": "255.255.255.0",
+# "port_protocol": {
+# "eq": "www"
+# }
+# },
+# "grant": "deny",
+# "line": 1,
+# "log": "default",
+# "protocol": "tcp",
+# "protocol_options": {
+# "tcp": true
+# },
+# "source": {
+# "address": "192.0.2.0",
+# "netmask": "255.255.255.0"
+# }
+# },
+# {
+# "destination": {
+# "address": "198.51.110.0",
+# "netmask": "255.255.255.0"
+# },
+# "grant": "deny",
+# "line": 2,
+# "log": "errors",
+# "protocol": "igrp",
+# "protocol_options": {
+# "igrp": true
+# },
+# "source": {
+# "address": "198.51.100.0",
+# "netmask": "255.255.255.0"
+# }
+# }
+# ],
+# "acl_type": "extended",
+# "name": "test_access"
+# },
+# {
+# "aces": [
+# {
+# "destination": {
+# "address": "2001:fc8:0:4::/64",
+# "port_protocol": {
+# "eq": "telnet"
+# }
+# },
+# "grant": "deny",
+# "inactive": true,
+# "line": 1,
+# "protocol": "tcp",
+# "protocol_options": {
+# "tcp": true
+# },
+# "source": {
+# "address": "2001:db8:0:3::/64",
+# "port_protocol": {
+# "eq": "www"
+# }
+# }
+# }
+# ],
+# "acl_type": "extended",
+# "name": "test_R1_TRAFFIC"
+# }
+# ]
+# }
+# ]
+
+"""
+
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['access-list global_access line 1 extended permit icmp any any log disable']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.argspec.acls.acls import (
+ AclsArgs,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.config.acls.acls import (
+ Acls,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=AclsArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Acls(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_command.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_command.py
new file mode 100644
index 00000000..ce5f2f77
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_command.py
@@ -0,0 +1,197 @@
+#!/usr/bin/python
+#
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: asa_command
+author: Peter Sprygada (@privateip), Patrick Ogenstad (@ogenstad)
+short_description: Run arbitrary commands on Cisco ASA devices
+description:
+- Sends arbitrary commands to an ASA node and returns the results read from the device.
+ The C(asa_command) module includes an argument that will cause the module to wait
+ for a specific condition before returning or timing out if the condition is not
+ met.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.asa.asa
+options:
+ commands:
+ description:
+ - List of commands to send to the remote device over the configured provider.
+ The resulting output from the command is returned. If the I(wait_for) argument
+ is provided, the module is not returned until the condition is satisfied or
+ the number of retires as expired.
+ required: true
+ type: list
+ elements: str
+ wait_for:
+ description:
+ - List of conditions to evaluate against the output of the command. The task will
+ wait for each condition to be true before moving forward. If the conditional
+ is not true within the configured number of retries, the task fails. See examples.
+ aliases:
+ - waitfor
+ type: list
+ elements: str
+ match:
+ description:
+ - The I(match) argument is used in conjunction with the I(wait_for) argument to
+ specify the match policy. Valid values are C(all) or C(any). If the value
+ is set to C(all) then all conditionals in the wait_for must be satisfied. If
+ the value is set to C(any) then only one of the values must be satisfied.
+ default: all
+ choices:
+ - any
+ - all
+ type: str
+ retries:
+ description:
+ - Specifies the number of retries a command should by tried before it is considered
+ failed. The command is run on the target device every retry and evaluated against
+ the I(wait_for) conditions.
+ default: 10
+ type: int
+ interval:
+ description:
+ - Configures the interval in seconds to wait between retries of the command. If
+ the command does not pass the specified conditions, the interval indicates how
+ long to wait before trying the command again.
+ default: 1
+ type: int
+notes:
+- When processing wait_for, each commands' output is stored as an element of the I(result)
+ array. The allowed operators for conditional evaluation are I(eq), I(==), I(neq),
+ I(ne), I(!=), I(gt), I(>), I(ge), I(>=), I(lt), I(<), I(le), I(<=), I(contains),
+ I(matches). Operators can be prefaced by I(not) to negate their meaning. The I(contains)
+ operator searches for a substring match (like the Python I(in) operator). The I(matches)
+ operator searches using a regex search operation.
+"""
+
+EXAMPLES = """
+- name: Show the ASA version
+ cisco.asa.asa_command:
+ commands:
+ - show version
+
+- name: Show ASA drops and memory
+ cisco.asa.asa_command:
+ commands:
+ - show asp drop
+ - show memory
+
+- name: Send repeat pings and wait for the result to pass 100%
+ cisco.asa.asa_command:
+ commands:
+ - ping 8.8.8.8 repeat 20 size 350
+ wait_for:
+ - result[0] contains 100
+ retries: 2
+"""
+
+RETURN = """
+stdout:
+ description: the set of responses from the commands
+ returned: always
+ type: list
+ sample: ['...', '...']
+
+stdout_lines:
+ description: The value of stdout split into a list
+ returned: always
+ type: list
+ sample: [['...', '...'], ['...'], ['...']]
+
+failed_conditions:
+ description: the conditionals that failed
+ returned: failed
+ type: list
+ sample: ['...', '...']
+"""
+import time
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.asa import (
+ asa_argument_spec,
+ check_args,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.asa import (
+ run_commands,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.parsing import (
+ Conditional,
+)
+from ansible.module_utils.six import string_types
+
+
+def to_lines(stdout):
+ for item in stdout:
+ if isinstance(item, string_types):
+ item = str(item).split("\n")
+ yield item
+
+
+def main():
+ spec = dict(
+ # { command: <str>, prompt: <str>, response: <str> }
+ commands=dict(type="list", required=True, elements="str"),
+ wait_for=dict(type="list", aliases=["waitfor"], elements="str"),
+ match=dict(default="all", choices=["all", "any"], type="str"),
+ retries=dict(default=10, type="int"),
+ interval=dict(default=1, type="int"),
+ )
+
+ spec.update(asa_argument_spec)
+
+ module = AnsibleModule(argument_spec=spec, supports_check_mode=True)
+ check_args(module)
+
+ result = {"changed": False}
+
+ wait_for = module.params["wait_for"] or list()
+ conditionals = [Conditional(c) for c in wait_for]
+
+ commands = module.params["commands"]
+ retries = module.params["retries"]
+ interval = module.params["interval"]
+ match = module.params["match"]
+
+ while retries > 0:
+ responses = run_commands(module, commands)
+
+ for item in list(conditionals):
+ if item(responses):
+ if match == "any":
+ conditionals = list()
+ break
+ conditionals.remove(item)
+
+ if not conditionals:
+ break
+
+ time.sleep(interval)
+ retries -= 1
+
+ if conditionals:
+ failed_conditions = [item.raw for item in conditionals]
+ msg = "One or more conditional statements have not be satisfied"
+ module.fail_json(msg=msg, failed_conditions=failed_conditions)
+
+ result.update(
+ {
+ "changed": False,
+ "stdout": responses,
+ "stdout_lines": list(to_lines(responses)),
+ }
+ )
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_config.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_config.py
new file mode 100644
index 00000000..71cb9fb0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_config.py
@@ -0,0 +1,368 @@
+#!/usr/bin/python
+#
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: asa_config
+author: Peter Sprygada (@privateip), Patrick Ogenstad (@ogenstad)
+short_description: Manage configuration sections on Cisco ASA devices
+description:
+- Cisco ASA configurations use a simple block indent file syntax for segmenting configuration
+ into sections. This module provides an implementation for working with ASA configuration
+ sections in a deterministic way.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.asa.asa
+options:
+ lines:
+ description:
+ - The ordered set of commands that should be configured in the section. The commands
+ must be the exact same commands as found in the device running-config. Be sure
+ to note the configuration command syntax as some commands are automatically
+ modified by the device config parser.
+ aliases:
+ - commands
+ type: list
+ elements: str
+ parents:
+ description:
+ - 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.
+ type: list
+ elements: str
+ src:
+ description:
+ - Specifies the source path to the file that contains the configuration or configuration
+ template to load. The path to the source file can either be the full path on
+ the Ansible control host or a relative path from the playbook or role root directory. This
+ argument is mutually exclusive with I(lines), I(parents).
+ type: path
+ before:
+ description:
+ - The ordered set of commands to push on to the command stack if a change needs
+ to be made. This allows the playbook designer the opportunity to perform configuration
+ commands prior to pushing any changes without affecting how the set of commands
+ are matched against the system.
+ type: list
+ elements: str
+ after:
+ description:
+ - The ordered set of commands to append to the end of the command stack if a change
+ needs to be made. Just like with I(before) this allows the playbook designer
+ to append a set of commands to be executed after the command set.
+ type: list
+ elements: str
+ match:
+ description:
+ - Instructs the module on the way to perform the matching of the set of commands
+ against the current device config. If match is set to I(line), commands are
+ matched line by line. If match is set to I(strict), command lines are matched
+ with respect to position. If match is set to I(exact), command lines must be
+ an equal match. Finally, if match is set to I(none), the module will not attempt
+ to compare the source configuration with the running configuration on the remote
+ device.
+ default: line
+ choices:
+ - line
+ - strict
+ - exact
+ - none
+ type: str
+ replace:
+ description:
+ - Instructs the module on the way to perform the configuration on the device. If
+ the replace argument is set to I(line) then the modified lines are pushed to
+ the device in configuration mode. If the replace argument is set to I(block)
+ then the entire command block is pushed to the device in configuration mode
+ if any line is not correct
+ default: line
+ choices:
+ - line
+ - block
+ type: str
+ backup:
+ description:
+ - This argument will cause the module to create a full backup of the current C(running-config)
+ from the remote device before any changes are made. If the C(backup_options)
+ value is not given, the backup file is written to the C(backup) folder in the
+ playbook root directory. If the directory does not exist, it is created.
+ type: bool
+ default: no
+ config:
+ description:
+ - The C(config) argument allows the playbook designer to supply the base configuration
+ to be used to validate configuration changes necessary. If this argument is
+ provided, the module will not download the running-config from the remote node.
+ type: str
+ defaults:
+ description:
+ - This argument specifies whether or not to collect all defaults when getting
+ the remote device running config. When enabled, the module will get the current
+ config by issuing the command C(show running-config all).
+ type: bool
+ default: no
+ passwords:
+ description:
+ - This argument specifies to include passwords in the config when retrieving the
+ running-config from the remote device. This includes passwords related to VPN
+ endpoints. This argument is mutually exclusive with I(defaults).
+ type: bool
+ default: false
+ save:
+ description:
+ - The C(save) argument instructs the module to save the running- config to the
+ startup-config at the conclusion of the module running. If check mode is specified,
+ this argument is ignored.
+ type: bool
+ default: no
+ backup_options:
+ description:
+ - This is a dict object containing configurable options related to backup file
+ path. The value of this option is read only when C(backup) is set to I(yes),
+ if C(backup) is set to I(no) this option will be silently ignored.
+ suboptions:
+ filename:
+ description:
+ - The filename to be used to store the backup configuration. If the filename
+ is not given it will be generated based on the hostname, current time and
+ date in format defined by <hostname>_config.<current-date>@<current-time>
+ type: str
+ dir_path:
+ description:
+ - This option provides the path ending with directory name in which the backup
+ configuration file will be stored. If the directory does not exist it will
+ be first created and the filename is either the value of C(filename) or
+ default filename as described in C(filename) options description. If the
+ path value is not given in that case a I(backup) directory will be created
+ in the current working directory and backup configuration will be copied
+ in C(filename) within I(backup) directory.
+ type: path
+ type: dict
+"""
+
+EXAMPLES = """
+- cisco.asa.asa_config:
+ lines:
+ - network-object host 10.80.30.18
+ - network-object host 10.80.30.19
+ - network-object host 10.80.30.20
+ parents: [object-group network OG-MONITORED-SERVERS]
+ provider: '{{ cli }}'
+
+- cisco.asa.asa_config:
+ host: '{{ inventory_hostname }}'
+ lines:
+ - message-length maximum client auto
+ - message-length maximum 512
+ match: line
+ parents: [policy-map type inspect dns PM-DNS, parameters]
+ authorize: yes
+ auth_pass: cisco
+ username: admin
+ password: cisco
+ context: ansible
+
+- cisco.asa.asa_config:
+ lines:
+ - ikev1 pre-shared-key MyS3cretVPNK3y
+ parents: tunnel-group 1.1.1.1 ipsec-attributes
+ passwords: yes
+ provider: '{{ cli }}'
+
+- name: attach ASA acl on interface vlan13/nameif cloud13
+ cisco.asa.asa_config:
+ lines:
+ - access-group cloud-acl_access_in in interface cloud13
+ provider: '{{ cli }}'
+
+- name: configure ASA (>=9.2) default BGP
+ cisco.asa.asa_config:
+ lines:
+ - bgp log-neighbor-changes
+ - bgp bestpath compare-routerid
+ provider: '{{ cli }}'
+ parents:
+ - router bgp 65002
+ register: bgp
+ when: bgp_default_config is defined
+- name: configure ASA (>=9.2) BGP neighbor in default/single context mode
+ cisco.asa.asa_config:
+ lines:
+ - bgp router-id {{ bgp_router_id }}
+ - neighbor {{ bgp_neighbor_ip }} remote-as {{ bgp_neighbor_as }}
+ - neighbor {{ bgp_neighbor_ip }} description {{ bgp_neighbor_name }}
+ provider: '{{ cli }}'
+ parents:
+ - router bgp 65002
+ - address-family ipv4 unicast
+ register: bgp
+ when: bgp_neighbor_as is defined
+- name: configure ASA interface with standby
+ cisco.asa.asa_config:
+ lines:
+ - description my cloud interface
+ - nameif cloud13
+ - security-level 50
+ - ip address 192.168.13.1 255.255.255.0 standby 192.168.13.2
+ provider: '{{ cli }}'
+ parents: [interface Vlan13]
+ register: interface
+- name: Show changes to interface from task above
+ debug:
+ var: interface
+
+- name: configurable backup path
+ cisco.asa.asa_config:
+ lines:
+ - access-group cloud-acl_access_in in interface cloud13
+ provider: '{{ cli }}'
+ backup: yes
+ backup_options:
+ filename: backup.cfg
+ dir_path: /home/user
+"""
+
+RETURN = """
+updates:
+ description: The set of commands that will be pushed to the remote device
+ returned: always
+ type: list
+ sample: ['...', '...']
+backup_path:
+ description: The full path to the backup file
+ returned: when backup is yes
+ type: str
+ sample: /playbooks/ansible/backup/asa_config.2016-07-16@22:28:34
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.asa import (
+ asa_argument_spec,
+ check_args,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.asa import (
+ get_config,
+ load_config,
+ run_commands,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+ dumps,
+)
+
+
+def get_candidate(module):
+ candidate = NetworkConfig(indent=1)
+ if module.params["src"]:
+ candidate.load(module.params["src"])
+ elif module.params["lines"]:
+ parents = module.params["parents"] or list()
+ candidate.add(module.params["lines"], parents=parents)
+ return candidate
+
+
+def run(module, result):
+ match = module.params["match"]
+ replace = module.params["replace"]
+ path = module.params["parents"]
+
+ candidate = get_candidate(module)
+ if match != "none":
+ contents = module.params["config"]
+ if not contents:
+ contents = get_config(module)
+ config = NetworkConfig(indent=1, contents=contents)
+ configobjs = candidate.difference(
+ config, path=path, match=match, replace=replace
+ )
+
+ else:
+ configobjs = candidate.items
+
+ if configobjs:
+ commands = dumps(configobjs, "commands").split("\n")
+
+ if module.params["lines"]:
+ if module.params["before"]:
+ commands[:0] = module.params["before"]
+
+ if module.params["after"]:
+ commands.extend(module.params["after"])
+
+ result["updates"] = commands
+
+ # send the configuration commands to the device and merge
+ # them with the current running config
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+
+ if module.params["save"]:
+ if not module.check_mode:
+ run_commands(module, "write mem")
+ result["changed"] = True
+
+
+def main():
+ """ main entry point for module execution
+ """
+ backup_spec = dict(filename=dict(), dir_path=dict(type="path"))
+ argument_spec = dict(
+ src=dict(type="path"),
+ lines=dict(aliases=["commands"], type="list", elements="str"),
+ parents=dict(type="list", elements="str"),
+ before=dict(type="list", elements="str"),
+ after=dict(type="list", elements="str"),
+ match=dict(
+ default="line", choices=["line", "strict", "exact", "none"]
+ ),
+ replace=dict(default="line", choices=["line", "block"]),
+ backup_options=dict(type="dict", options=backup_spec),
+ config=dict(),
+ defaults=dict(type="bool", default=False),
+ passwords=dict(type="bool", default=False),
+ backup=dict(type="bool", default=False),
+ save=dict(type="bool", default=False),
+ )
+
+ argument_spec.update(asa_argument_spec)
+
+ mutually_exclusive = [
+ ("lines", "src"),
+ ("parents", "src"),
+ ("defaults", "passwords"),
+ ]
+
+ required_if = [
+ ("match", "strict", ["lines"]),
+ ("match", "exact", ["lines"]),
+ ("replace", "block", ["lines"]),
+ ]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+
+ result = {"changed": False}
+
+ check_args(module)
+
+ if module.params["backup"]:
+ result["__backup__"] = get_config(module)
+
+ run(module, result)
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_facts.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_facts.py
new file mode 100644
index 00000000..6efd2175
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_facts.py
@@ -0,0 +1,209 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: asa_facts
+author:
+- Sumit Jaiswal (@justjais)
+short_description: Collect facts from remote devices running Cisco ASA
+description:
+- Collects a base set of device facts from a remote device that is running ASA. This
+ module prepends all of the base network fact keys with C(ansible_net_<fact>). The
+ facts module will always collect a base set of facts from the device and can enable
+ or disable collection of additional facts.
+- Note, to collects facts from ASA device properly user should elevate the privilege
+ to become.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.asa.asa
+notes:
+- Tested against asa 9.10(1)11
+options:
+ gather_subset:
+ description:
+ - When supplied, this argument restricts the facts collected to a given subset.
+ - Possible values for this argument include C(all), C(min), C(hardware), C(config).
+ - Specify a list of values to include a larger subset.
+ - Use a value with an initial C(!) to collect all facts except that subset.
+ required: false
+ type: list
+ elements: str
+ default: '!config'
+ gather_network_resources:
+ description:
+ - When supplied, this argument will restrict the facts collected 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. Values can
+ also be used with an initial C(M(!)) to specify that a specific subset should
+ not be collected. Valid subsets are 'all', 'acls', 'ogs'.
+ required: false
+ type: list
+ elements: str
+"""
+
+EXAMPLES = """
+- name: Gather all legacy facts
+ cisco.asa.asa_facts:
+ gather_subset: all
+
+- name: Gather only the config and default facts
+ cisco.asa.asa_facts:
+ gather_subset:
+ - config
+
+- name: Do not gather hardware facts
+ cisco.asa.asa_facts:
+ gather_subset:
+ - '!hardware'
+
+- name: Gather legacy and resource facts
+ cisco.asa.asa_facts:
+ gather_subset: all
+"""
+
+RETURN = """
+ansible_net_gather_subset:
+ description: The list of fact subsets collected from the device
+ returned: always
+ type: list
+
+# default
+ansible_net_model:
+ description: The model name returned from the device
+ returned: always
+ type: str
+ansible_net_serialnum:
+ description: The serial number of the remote device
+ returned: always
+ type: str
+ansible_net_version:
+ description: The operating system version running on the remote device
+ returned: always
+ type: str
+ansible_net_firepower_version:
+ description: The Firepower operating system version running on the remote device.
+ returned: always
+ type: str
+ansible_net_device_mgr_version:
+ description: The Device manager version running on the remote device.
+ returned: always
+ type: str
+ansible_net_asatype:
+ description: The operating system type (Cisco ASA) running on the remote device.
+ returned: always
+ type: str
+ansible_net_hostname:
+ description: The configured hostname of the device
+ returned: always
+ type: str
+ansible_net_image:
+ description: The image file the device is running
+ returned: always
+ type: str
+ansible_net_stacked_models:
+ description: The model names of each device in the stack
+ returned: when multiple devices are configured in a stack
+ type: list
+ansible_net_stacked_serialnums:
+ description: The serial numbers of each device in the stack
+ returned: when multiple devices are configured in a stack
+ type: list
+ansible_net_api:
+ description: The name of the transport
+ returned: always
+ type: str
+ansible_net_python_version:
+ description: The Python version Ansible controller is using
+ returned: always
+ type: str
+
+# hardware
+ansible_net_filesystems:
+ description: All file system names available on the device
+ returned: when hardware is configured
+ type: list
+ansible_net_filesystems_info:
+ description: A hash of all file systems containing info about each file system (e.g. free and total space)
+ returned: when hardware is configured
+ type: dict
+ansible_net_memfree_mb:
+ description: The available free memory on the remote device in Mb
+ returned: when hardware is configured
+ type: int
+ansible_net_memused_mb:
+ description: The used memory on the remote device in Mb
+ returned: when hardware is configured
+ type: int
+ansible_net_memtotal_mb:
+ description: The total memory on the remote device in Mb
+ returned: when hardware is configured
+ type: int
+
+# config
+ansible_net_config:
+ description: The current active config from the device
+ returned: when config is configured
+ type: str
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.argspec.facts.facts import (
+ FactsArgs,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.asa import (
+ asa_argument_spec,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: ansible_facts
+ """
+ argument_spec = FactsArgs.argument_spec
+ argument_spec.update(asa_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = []
+ if module.params["gather_subset"] == "!config":
+ warnings.append(
+ "default value for `gather_subset` will be changed to `min` from `!config` v2.11 onwards"
+ )
+
+ result = Facts(module).get_facts()
+
+ ansible_facts, additional_warnings = result
+ warnings.extend(additional_warnings)
+
+ module.exit_json(ansible_facts=ansible_facts, warnings=warnings)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_og.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_og.py
new file mode 100644
index 00000000..de37aebb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_og.py
@@ -0,0 +1,1034 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: asa_og
+author:
+- Federico Olivieri (@Federico87)
+short_description: (deprecated, removed after 2022-06-01) Manage object groups on
+ a Cisco ASA
+description:
+- This module allows you to create and update object-group network/service on Cisco
+ ASA device.
+version_added: 1.0.0
+deprecated:
+ alternative: asa_ogs
+ why: Newer and updated modules released with more functionality in Ansible 2.10
+ removed_at_date: '2022-06-01'
+options:
+ name:
+ description:
+ - Name of the object group.
+ required: true
+ type: str
+ group_type:
+ description:
+ - The object group type.
+ choices:
+ - network-object
+ - service-object
+ - port-object
+ required: true
+ type: str
+ protocol:
+ description:
+ - The protocol for object-group service with port-object.
+ choices:
+ - udp
+ - tcp
+ - tcp-udp
+ type: str
+ host_ip:
+ description:
+ - The host IP address for object-group network.
+ type: list
+ elements: str
+ description:
+ description:
+ - The description for the object-group.
+ type: str
+ group_object:
+ description:
+ - The group-object for network object-group.
+ type: list
+ elements: str
+ ip_mask:
+ description:
+ - The IP address and mask for network object-group.
+ type: list
+ elements: str
+ port_range:
+ description:
+ - The port range for port-object.
+ type: list
+ elements: str
+ port_eq:
+ description:
+ - The single port for port-object.
+ type: list
+ elements: str
+ service_cfg:
+ description:
+ - The service-object configuration protocol, direction, range or port.
+ type: list
+ elements: str
+ state:
+ description:
+ - Manage the state of the resource.
+ type: str
+ default: present
+ choices:
+ - present
+ - absent
+ - replace
+
+"""
+
+EXAMPLES = """
+- name: configure network object-group
+ cisco.asa.asa_og:
+ name: ansible_test_0
+ group_type: network-object
+ state: present
+ description: ansible_test object-group description
+ host_ip:
+ - 8.8.8.8
+ - 8.8.4.4
+ ip_mask:
+ - 10.0.0.0 255.255.255.0
+ - 192.168.0.0 255.255.0.0
+ group_object:
+ - awx_lon
+ - awx_ams
+
+- name: configure port-object object-group
+ cisco.asa.asa_og:
+ name: ansible_test_1
+ group_type: port-object
+ state: replace
+ description: ansible_test object-group description
+ protocol: tcp-udp
+ port_eq:
+ - 1025
+ - kerberos
+ port_range:
+ - 1025 5201
+ - 0 1024
+
+- name: configure service-object object-group
+ cisco.asa.asa_og:
+ name: ansible_test_2
+ group_type: service-object
+ state: absent
+ description: ansible_test object-group description
+ service_cfg:
+ - tcp destination eq 8080
+ - tcp destination eq www
+"""
+
+RETURN = """
+commands:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: [
+ "object-group network ansible_test_0",
+ "description ansible_test object-group description",
+ "network-object host 8.8.8.8",
+ "network-object host 8.8.4.4",
+ "network-object 10.0.0.0 255.255.255.0",
+ "network-object 192.168.0.0 255.255.0.0",
+ "network-object 192.168.0.0 255.255.0.0",
+ "group-object awx_lon",
+ "group-object awx_ams",
+ ]
+"""
+import re
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.asa import (
+ get_config,
+ load_config,
+)
+
+
+class Parser:
+ """Regex class for outputs parsing"""
+
+ def __init__(self, config, protocol):
+ """Parser __init__ method"""
+ self.config = config
+ self.protocol = protocol
+
+ def parse_obj_grp_name(self):
+ list_return = list()
+ match = re.search(
+ r"(?:object-group\s)(network\s|service\s)(\w+)\s?(tcp-udp|tcp|udp)?",
+ self.config,
+ re.M,
+ )
+
+ if match:
+ if match.group(3):
+ list_return.append(str(match.group(3)))
+ else:
+ list_return.append(False)
+
+ if match.group(2):
+ list_return.append(str(match.group(2)))
+
+ if match.group(1):
+ list_return.append(str(match.group(1)))
+
+ return list_return
+
+ def parse_description(self):
+ match = re.search(r"description(:)?\s(.*)", self.config, re.M)
+ if match:
+ description = match.group(2)
+
+ return description
+
+ def parse_host(self):
+ list_return = list()
+ match = re.findall(r"(host\s)(\d+\.\d+\.\d+\.\d+)", self.config, re.M)
+
+ if match:
+ for i in match:
+ if i[1]:
+ list_return.append(str(i[1]))
+
+ return list_return
+
+ def parse_group_object(self):
+ list_return = list()
+ match = re.findall(r"(group-object\s)(.*)", self.config, re.M)
+
+ if match:
+ for i in match:
+ if i[1]:
+ list_return.append(str(i[1]))
+
+ return list_return
+
+ def parse_address(self):
+ list_return = list()
+ match = re.findall(
+ r"(network-object\s)(\d+\.\d+\.\d+\.\d+\s\d+\.\d+\.\d+\.\d+)",
+ self.config,
+ re.M,
+ )
+
+ if match:
+ for i in match:
+ if i[1]:
+ list_return.append(str(i[1]))
+
+ return list_return
+
+ def parse_port_range(self):
+ list_return = list()
+ match = re.findall(r"(range\s)(.*)", self.config, re.M)
+
+ if match:
+ for i in match:
+ if i[1]:
+ list_return.append(str(i[1]))
+
+ return list_return
+
+ def parse_port_eq(self):
+ list_return = list()
+ match = re.findall(r"(eq\s)(.*)", self.config, re.M)
+
+ if match:
+ for i in match:
+ if i[1]:
+ list_return.append(str(i[1]))
+
+ return list_return
+
+ def parse_service_cfg(self):
+ list_return = list()
+ match = re.findall(r"(service-object\s)(.*)", self.config, re.M)
+
+ if match:
+ for i in match:
+ if i[1]:
+ list_return.append(str(i[1]))
+
+ return list_return
+
+
+def map_config_to_obj(module):
+
+ obj = list()
+ obj_dict = dict()
+
+ group_name = module.params["name"]
+ protocol = module.params["protocol"]
+
+ sh_run_group_name = get_config(
+ module, flags=["object-group | include {0}".format(group_name)]
+ )
+ run_group_name = Parser(sh_run_group_name, protocol).parse_obj_grp_name()
+
+ obj_dict["have_name"] = run_group_name
+
+ if run_group_name:
+ if run_group_name[0] is not False:
+ obj_dict["have_group_type"] = "port-object"
+ obj_dict["have_protocol"] = run_group_name[0]
+ elif "network" in run_group_name[2]:
+ obj_dict["have_group_type"] = "network-object"
+ elif "service" in run_group_name[2] and run_group_name[0] is False:
+ obj_dict["have_group_type"] = "service-object"
+ else:
+ obj_dict["have_group_type"] = None
+
+ sh_run_group_type = get_config(
+ module, flags=["object-group id {0}".format(group_name)]
+ )
+
+ have_description = Parser(sh_run_group_type, protocol).parse_description()
+ obj_dict["have_description"] = have_description
+
+ have_host_ip = Parser(sh_run_group_type, protocol).parse_host()
+ obj_dict["have_host_ip"] = have_host_ip
+
+ have_group_object = Parser(
+ sh_run_group_type, protocol
+ ).parse_group_object()
+ obj_dict["have_group_object"] = have_group_object
+
+ have_ip_mask = Parser(sh_run_group_type, protocol).parse_address()
+ obj_dict["have_ip_mask"] = have_ip_mask
+
+ have_port_range = Parser(sh_run_group_type, protocol).parse_port_range()
+ obj_dict["have_port_range"] = have_port_range
+
+ have_port_eq = Parser(sh_run_group_type, protocol).parse_port_eq()
+ obj_dict["have_port_eq"] = have_port_eq
+
+ have_service_cfg = Parser(sh_run_group_type, protocol).parse_service_cfg()
+
+ if have_service_cfg:
+ have_lines = list()
+ for i in have_service_cfg:
+ have_lines.append(i.rstrip(" "))
+ obj_dict["have_service_cfg"] = have_lines
+ elif have_service_cfg is None:
+ obj_dict["have_service_cfg"] = have_service_cfg
+
+ obj.append(obj_dict)
+
+ return obj
+
+
+def replace(want_dict, have):
+
+ commands = list()
+ add_lines = list()
+ remove_lines = list()
+
+ have_group_type = have[0].get("have_group_type")
+ have_description = have[0].get("have_description")
+ have_host_ip = have[0].get("have_host_ip")
+ have_group_object = have[0].get("have_group_object")
+ have_ip_mask = have[0].get("have_ip_mask")
+ have_protocol = have[0].get("have_protocol")
+ have_port_range = have[0].get("have_port_range")
+ have_port_eq = have[0].get("have_port_eq")
+ have_service_cfg = have[0].get("have_service_cfg")
+
+ name = want_dict["name"]
+ group_type = want_dict["group_type"]
+ protocol = want_dict["protocol"]
+ description = want_dict["description"]
+ host = want_dict["host_ip"]
+ group_object = want_dict["group_object"]
+ address = want_dict["ip_mask"]
+ port_range = want_dict["port_range"]
+ port_eq = want_dict["port_eq"]
+ service_cfg = want_dict["service_cfg"]
+
+ if "network-object" in group_type:
+
+ if have_group_type is None:
+ commands.append("object-group network {0}".format(name))
+
+ if host:
+ for i in host:
+ commands.append("network-object host " + i)
+ if description:
+ if have_description is None:
+ commands.append("description {0}".format(description))
+ if group_object:
+ for i in group_object:
+ if i not in have_group_object:
+ commands.append("group-object " + i)
+ if address:
+ for i in address:
+ commands.append("network-object " + i)
+
+ elif "network" in have_group_type:
+
+ if host:
+ if sorted(host) != sorted(have_host_ip):
+ for i in host:
+ if i not in have_host_ip:
+ if (
+ "object-group network {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ add_lines.append("network-object host " + i)
+ for i in have_host_ip:
+ if i not in host:
+ if (
+ "object-group network {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ remove_lines.append("no network-object host " + i)
+
+ if description:
+ if description != have_description:
+ if "object-group network {0}".format(name) not in commands:
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ add_lines.append("description {0}".format(description))
+
+ if group_object:
+ if sorted(group_object) != sorted(have_group_object):
+ for i in group_object:
+ if i not in have_group_object:
+ if (
+ "object-group network {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ add_lines.append("group-object " + i)
+ for i in have_group_object:
+ if i not in group_object:
+ if (
+ "object-group network {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ remove_lines.append("no group-object " + i)
+ if address:
+ if sorted(address) != sorted(have_ip_mask):
+ for i in address:
+ if i not in have_ip_mask:
+ if (
+ "object-group network {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ add_lines.append("network-object " + i)
+ for i in have_ip_mask:
+ if i not in address:
+ if (
+ "object-group network {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ remove_lines.append("no network-object " + i)
+
+ elif "port-object" in group_type:
+
+ if have_group_type is None and have_protocol != protocol:
+ commands.append(
+ "object-group service {0} {1}".format(name, protocol)
+ )
+
+ if port_range:
+ for i in port_range:
+ commands.append("port-object range " + i)
+ if port_eq:
+ for i in port_eq:
+ commands.append("port-object eq " + i)
+ if description:
+ commands.append("description {0}".format(description))
+
+ elif "port" in have_group_type and have_protocol == protocol:
+
+ if port_range:
+ if sorted(port_range) != sorted(have_port_range):
+ for i in port_range:
+ if i not in have_port_range:
+ if (
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ )
+ add_lines.append("port-object range " + i)
+ for i in have_port_range:
+ if i not in port_range:
+ if (
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ )
+ remove_lines.append("no port-object range " + i)
+ if port_eq:
+ if sorted(port_eq) != sorted(have_port_eq):
+ for i in port_eq:
+ if i not in have_port_eq:
+ if (
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ )
+ add_lines.append("port-object eq " + i)
+ for i in have_port_eq:
+ if i not in port_eq:
+ if (
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ )
+ remove_lines.append("no port-object eq " + i)
+ if description:
+ if description != have_description:
+ if (
+ "object-group service {0} {1}".format(name, protocol)
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ )
+ commands.append("description {0}".format(description))
+
+ elif "service-object" in group_type:
+
+ if have_group_type is None:
+ commands.append("object-group service {0}".format(name))
+
+ if description:
+ if have_description is None:
+ commands.append("description {0}".format(description))
+ if service_cfg:
+ for i in service_cfg:
+ commands.append("service-object " + i)
+
+ elif "service" in have_group_type:
+ if description:
+ if description != have_description:
+ if "object-group service {0}".format(name) not in commands:
+ commands.append(
+ "object-group service {0}".format(name)
+ )
+ commands.append("description {0}".format(description))
+ if service_cfg:
+ for i in service_cfg:
+ if i not in have_service_cfg:
+ if (
+ "object-group service {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0}".format(name)
+ )
+ add_lines.append("service " + i)
+ for i in have_service_cfg:
+ if i not in service_cfg:
+ if (
+ "object-group service {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0}".format(name)
+ )
+ remove_lines.append("no service " + i)
+
+ set_add_lines = set(add_lines)
+ set_remove_lines = set(remove_lines)
+
+ for i in list(set_add_lines) + list(set_remove_lines):
+ commands.append(i)
+
+ return commands
+
+
+def present(want_dict, have):
+
+ commands = list()
+
+ have_group_type = have[0].get("have_group_type")
+ have_description = have[0].get("have_description")
+ have_host_ip = have[0].get("have_host_ip")
+ have_group_object = have[0].get("have_group_object")
+ have_ip_mask = have[0].get("have_ip_mask")
+ have_protocol = have[0].get("have_protocol")
+ have_port_range = have[0].get("have_port_range")
+ have_port_eq = have[0].get("have_port_eq")
+ have_service_cfg = have[0].get("have_service_cfg")
+
+ name = want_dict["name"]
+ group_type = want_dict["group_type"]
+ protocol = want_dict["protocol"]
+ description = want_dict["description"]
+ host = want_dict["host_ip"]
+ group_object = want_dict["group_object"]
+ address = want_dict["ip_mask"]
+ port_range = want_dict["port_range"]
+ port_eq = want_dict["port_eq"]
+ service_cfg = want_dict["service_cfg"]
+
+ if "network-object" in group_type:
+
+ if have_group_type is None:
+ commands.append("object-group network {0}".format(name))
+
+ if host:
+ for i in host:
+ commands.append("network-object host " + i)
+ if description:
+ if have_description is None:
+ commands.append("description {0}".format(description))
+ if group_object:
+ for i in group_object:
+ commands.append("group-object " + i)
+ if address:
+ for i in address:
+ commands.append("network-object " + i)
+
+ elif "network" in have_group_type:
+
+ if host:
+ for i in host:
+ if i not in have_host_ip:
+ if (
+ "object-group network {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ commands.append("network-object host " + i)
+ if description:
+ if description != have_description:
+ if "object-group network {0}".format(name) not in commands:
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ commands.append("description {0}".format(description))
+ if group_object:
+ for i in group_object:
+ if i not in have_group_object:
+ if (
+ "object-group network {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ commands.append("group-object " + i)
+ if address:
+ for i in address:
+ if i not in have_ip_mask:
+ if (
+ "object-group network {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ commands.append("network-object " + i)
+
+ elif "port-object" in group_type:
+
+ if have_group_type is None and have_protocol != protocol:
+ commands.append(
+ "object-group service {0} {1}".format(name, protocol)
+ )
+
+ if port_range:
+ for i in port_range:
+ commands.append("port-object range " + i)
+ if port_eq:
+ for i in port_eq:
+ commands.append("port-object eq " + i)
+ if description:
+ commands.append("description {0}".format(description))
+
+ elif "port" in have_group_type and have_protocol == protocol:
+
+ if port_range:
+ for i in port_range:
+ if i not in have_port_range:
+ if (
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ )
+ commands.append("port-object range " + i)
+ if port_eq:
+ for i in port_eq:
+ if i not in have_port_eq:
+ if (
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ )
+ commands.append("port-object eq " + i)
+ if description:
+ if description != have_description:
+ if (
+ "object-group service {0} {1}".format(name, protocol)
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ )
+ commands.append("description {0}".format(description))
+
+ elif "service-object" in group_type:
+
+ if have_group_type is None:
+ commands.append("object-group service {0}".format(name))
+
+ if description:
+ if have_description is None:
+ commands.append("description {0}".format(description))
+ if service_cfg:
+ for i in service_cfg:
+ commands.append("service-object " + i)
+
+ elif "service" in have_group_type:
+
+ if description:
+ if description != have_description:
+ if "object-group service {0}".format(name) not in commands:
+ commands.append(
+ "object-group service {0}".format(name)
+ )
+ commands.append("description {0}".format(description))
+ if service_cfg:
+ for i in service_cfg:
+ if i not in have_service_cfg:
+ if (
+ "object-group service {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0}".format(name)
+ )
+ commands.append("service " + i)
+
+ return commands
+
+
+def absent(want_dict, have):
+
+ commands = list()
+
+ have_group_type = have[0].get("have_group_type")
+ have_description = have[0].get("have_description")
+ have_host_ip = have[0].get("have_host_ip")
+ have_group_object = have[0].get("have_group_object")
+ have_ip_mask = have[0].get("have_ip_mask")
+ have_protocol = have[0].get("have_protocol")
+ have_port_range = have[0].get("have_port_range")
+ have_port_eq = have[0].get("have_port_eq")
+ have_service_cfg = have[0].get("have_service_cfg")
+
+ name = want_dict["name"]
+ group_type = want_dict["group_type"]
+ protocol = want_dict["protocol"]
+ description = want_dict["description"]
+ host = want_dict["host_ip"]
+ group_object = want_dict["group_object"]
+ address = want_dict["ip_mask"]
+ port_range = want_dict["port_range"]
+ port_eq = want_dict["port_eq"]
+ service_cfg = want_dict["service_cfg"]
+
+ if "network-object" in group_type:
+
+ if have_group_type is None:
+ return commands
+
+ elif "network" in have_group_type:
+
+ if host:
+ for i in host:
+ if i in have_host_ip:
+ if (
+ "object-group network {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ commands.append("no network-object host " + i)
+ if description:
+ if description == have_description:
+ if "object-group network {0}".format(name) not in commands:
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ commands.append("no description {0}".format(description))
+ if group_object:
+ for i in group_object:
+ if i in have_group_object:
+ if (
+ "object-group network {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ commands.append("no group-object " + i)
+ if address:
+ for i in address:
+ if i in have_ip_mask:
+ if (
+ "object-group network {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group network {0}".format(name)
+ )
+ commands.append("no network-object " + i)
+
+ elif "port-object" in group_type:
+
+ if have_group_type is None and have_protocol is None:
+ return commands
+
+ elif "port" in have_group_type and have_protocol == protocol:
+
+ if port_range:
+ for i in port_range:
+ if i in have_port_range:
+ if (
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ )
+ commands.append("no port-object range " + i)
+ if port_eq:
+ for i in port_eq:
+ if i in have_port_eq:
+ if (
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ )
+ commands.append("no port-object eq " + i)
+ if description:
+ if description == have_description:
+ if (
+ "object-group service {0} {1}".format(name, protocol)
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0} {1}".format(
+ name, protocol
+ )
+ )
+ commands.append("no description {0}".format(description))
+
+ elif "service-object" in group_type:
+
+ if have_group_type is None:
+ return commands
+
+ elif "service" in have_group_type:
+ if description:
+ if description == have_description:
+ if "object-group service {0}".format(name) not in commands:
+ commands.append(
+ "object-group service {0}".format(name)
+ )
+ commands.append("no description {0}".format(description))
+ if service_cfg:
+ for i in service_cfg:
+ if i in have_service_cfg:
+ if (
+ "object-group service {0}".format(name)
+ not in commands
+ ):
+ commands.append(
+ "object-group service {0}".format(name)
+ )
+ commands.append("no service " + i)
+
+ return commands
+
+
+def map_obj_to_commands(want, have, module):
+
+ for w in want:
+
+ want_dict = dict()
+
+ want_dict["name"] = w["name"]
+ want_dict["group_type"] = w["group_type"]
+ want_dict["protocol"] = w["protocol"]
+ want_dict["description"] = w["description"]
+ want_dict["host_ip"] = w["host_ip"]
+ want_dict["group_object"] = w["group_object"]
+ want_dict["ip_mask"] = w["ip_mask"]
+ want_dict["port_range"] = w["port_range"]
+ want_dict["port_eq"] = w["port_eq"]
+ want_dict["service_cfg"] = w["service_cfg"]
+ state = w["state"]
+
+ if state == "replace":
+ return replace(want_dict, have)
+ elif state == "present":
+ return present(want_dict, have)
+ elif state == "absent":
+ return absent(want_dict, have)
+
+
+def map_params_to_obj(module):
+
+ obj = list()
+
+ obj.append(
+ {
+ "name": module.params["name"],
+ "group_type": module.params["group_type"],
+ "protocol": module.params["protocol"],
+ "state": module.params["state"],
+ "description": module.params["description"],
+ "host_ip": module.params["host_ip"],
+ "group_object": module.params["group_object"],
+ "port_range": module.params["port_range"],
+ "port_eq": module.params["port_eq"],
+ "service_cfg": module.params["service_cfg"],
+ "ip_mask": module.params["ip_mask"],
+ }
+ )
+
+ return obj
+
+
+def main():
+
+ argument_spec = dict(
+ name=dict(required=True),
+ group_type=dict(
+ choices=["network-object", "service-object", "port-object"],
+ required=True,
+ ),
+ protocol=dict(choices=["udp", "tcp", "tcp-udp"]),
+ host_ip=dict(type="list", elements="str"),
+ description=dict(),
+ group_object=dict(type="list", elements="str"),
+ ip_mask=dict(type="list", elements="str"),
+ port_range=dict(type="list"),
+ port_eq=dict(type="list", elements="str"),
+ service_cfg=dict(type="list", elements="str"),
+ state=dict(
+ choices=["present", "absent", "replace"], default="present"
+ ),
+ )
+
+ required_if = [
+ ("group_type", "port-object", ["protocol"]),
+ ("group_type", "service-object", ["service_cfg"]),
+ ]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+
+ result = {"changed": False}
+
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+ config_commans = map_obj_to_commands(want, have, module)
+
+ result["commands"] = config_commans
+
+ if config_commans:
+ if not module.check_mode:
+ load_config(module, config_commans)
+ result["changed"] = True
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_ogs.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_ogs.py
new file mode 100644
index 00000000..5792bc80
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/modules/asa_ogs.py
@@ -0,0 +1,892 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for asa_ogs
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: asa_ogs
+short_description: Object Group resource module
+description: This module configures and manages Objects and Groups on ASA platforms.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco ASA Version 9.10(1)11
+- This module works with connection C(network_cli). See L(ASA Platform Options,../network/user_guide/platform_asa.html).
+options:
+ config:
+ description: A list of Object Group options.
+ type: list
+ elements: dict
+ suboptions:
+ object_type:
+ description: The object group type.
+ type: str
+ required: true
+ choices:
+ - icmp-type
+ - network
+ - protocol
+ - security
+ - service
+ - user
+ object_groups:
+ description: The object groups.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specifies object-group ID
+ required: true
+ type: str
+ description:
+ description: The description for the object-group.
+ type: str
+ icmp_type:
+ description: Configure an ICMP-type object
+ type: dict
+ suboptions:
+ icmp_object:
+ description: Defines the ICMP types in the group.
+ type: list
+ elements: str
+ choices: [alternate-address, conversion-error, echo, echo-reply, information-reply,
+ information-request, mask-reply, mask-request, mobile-redirect,
+ parameter-problem, redirect, router-advertisement, router-solicitation,
+ source-quench, time-exceeded, timestamp-reply, timestamp-request,
+ traceroute, unreachable]
+ network_object:
+ description: Configure a network object
+ type: dict
+ suboptions:
+ host:
+ description: Set this to specify a single host object.
+ type: list
+ elements: str
+ address:
+ description: Enter an IPv4 network address with space seperated netmask.
+ type: list
+ elements: str
+ ipv6_address:
+ description: Enter an IPv6 prefix.
+ type: list
+ elements: str
+ protocol_object:
+ description: Configure a protocol object
+ type: dict
+ suboptions:
+ protocol:
+ description: Defines the protocols in the group.
+ type: list
+ elements: str
+ choices: [ah, eigrp, esp, gre, icmp, icmp6, igmp, igrp, ip, ipinip,
+ ipsec, nos, ospf, pcp, pim, pptp, sctp, snp, tcp, udp]
+ security_group:
+ description: Configure a security-group
+ type: dict
+ suboptions:
+ sec_name:
+ description: Enter this keyword to specify a security-group name.
+ type: list
+ elements: str
+ tag:
+ description: Enter this keyword to specify a security-group tag.
+ type: list
+ elements: str
+ service_object:
+ description: Configure a service object
+ type: dict
+ suboptions:
+ protocol:
+ description: Defines the protocols in the group.
+ type: list
+ elements: str
+ choices: [ah, eigrp, esp, gre, icmp, icmp6, igmp, igrp, ip, ipinip,
+ ipsec, nos, ospf, pcp, pim, pptp, sctp, snp, tcp, tcp-udp, udp]
+ object:
+ description: Enter this keyword to specify a service object
+ type: str
+ user_object:
+ description: Configures single user, local or import user group
+ type: dict
+ suboptions:
+ user:
+ description: Configure a user objectUser name to configure a user
+ object.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Enter the name of the user
+ type: str
+ required: true
+ domain:
+ description: User domain
+ type: str
+ required: true
+ user_group:
+ description: Configure a user group object.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Enter the name of the group
+ type: str
+ required: true
+ domain:
+ description: Group domain
+ type: str
+ required: true
+ running_config:
+ description:
+ - The module, by default, will connect to the remote device and retrieve the current
+ running-config to use as a base for comparing against the contents of source.
+ There are times when it is not desirable to have the task get the current running-config
+ for every task in a playbook. The I(running_config) argument allows the implementer
+ to pass in the configuration to use as the base config for comparison. This
+ value of this option should be the output received from device by executing
+ command.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+"""
+
+EXAMPLES = """
+
+# Using merged
+
+# Before state:
+# -------------
+#
+# ciscoasa# sh running-config object-group
+# object-group network test_og_network
+# description test_network_og
+# network-object host 192.0.3.1
+
+- name: "Merge module attributes of given object-group"
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network
+ network_object:
+ host:
+ - 192.0.2.1
+ - 192.0.2.2
+ address:
+ - 192.0.2.0 255.255.255.0
+ - 198.51.100.0 255.255.255.0
+ - name: test_network_og
+ description: test_network_og
+ network_object:
+ host:
+ - 192.0.3.1
+ - 192.0.3.2
+ ipv6_address:
+ - 2001:db8:3::/64
+ - object_type: security
+ object_groups:
+ - name: test_og_security
+ description: test_security
+ security_group:
+ sec_name:
+ - test_1
+ - test_2
+ tag:
+ - 10
+ - 20
+ - object_type: user
+ object_groups:
+ - name: test_og_user
+ description: test_user
+ user_object:
+ user:
+ - name: new_user_1
+ domain: LOCAL
+ - name: new_user_2
+ domain: LOCAL
+ state: merged
+
+# Commands fired:
+# ---------------
+#
+# object-group security test_og_security
+# description test_security
+# security-group name test_1
+# security-group name test_2
+# security-group tag 10
+# security-group tag 20
+# object-group network test_og_network
+# description test_og_network
+# network-object 192.0.2.0 255.255.255.0
+# network-object 198.51.100.0 255.255.255.0
+# network-object host 192.0.2.1
+# network-object host 192.0.2.2
+# object-group network test_network_og
+# network-object host 192.0.3.1
+# network-object host 192.0.3.2
+# network-object 2001:db8:3::/64
+# object-group user test_og_user
+# description test_user
+# user LOCAL\\new_user_1
+# user LOCAL\\new_user_2
+
+# After state:
+# ------------
+#
+# ciscoasa# sh running-config object-group
+# object-group network test_og_network
+# description test_og_network
+# network-object host 192.0.2.1
+# network-object host 192.0.2.2
+# network-object 192.0.2.0 255.255.255.0
+# network-object 198.51.100.0 255.255.255.0
+# network-object host 192.0.3.1
+# object-group network test_network_og
+# description test_network_og
+# network-object host 192.0.3.1
+# network-object host 192.0.3.2
+# network-object 2001:db8:0:3::/64
+# group-object test_og_network
+# object-group security test_og_security
+# security-group name test_1
+# security-group name test_2
+# security-group tag 10
+# security-group tag 20
+# object-group user test_og_user
+# description test_user
+# user LOCAL\\new_user_1
+# user LOCAL\\new_user_2
+
+# Using Replaced
+
+# Before state:
+# -------------
+#
+# ciscoasa# sh running-config object-group
+# object-group network test_og_network
+# description test_og_network
+# network-object host 192.0.2.1
+# network-object host 192.0.2.2
+# network-object 192.0.2.0 255.255.255.0
+# network-object 198.51.100.0 255.255.255.0
+# object-group network test_network_og
+# description test_network_og
+# network-object host 192.0.3.1
+# network-object host 192.0.3.2
+# network-object 2001:db8:0:3::/64
+# group-object test_og_network
+# object-group security test_og_security
+# security-group name test_1
+# security-group name test_2
+# security-group tag 10
+# security-group tag 20
+# object-group user test_og_user
+# user LOCAL\\new_user_1
+# user LOCAL\\new_user_2
+
+- name: "Replace module attributes of given object-group"
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network_replace
+ network_object:
+ host:
+ - 192.0.3.1
+ address:
+ - 192.0.3.0 255.255.255.0
+ - object_type: protocol
+ object_groups:
+ - name: test_og_protocol
+ description: test_og_protocol
+ protocol_object:
+ protocol:
+ - tcp
+ - udp
+ state: replaced
+
+# Commands Fired:
+# ---------------
+#
+# object-group protocol test_og_protocol
+# description test_og_protocol
+# protocol tcp
+# protocol udp
+# object-group network test_og_network
+# description test_og_network_replace
+# no network-object 192.0.2.0 255.255.255.0
+# no network-object 198.51.100.0 255.255.255.0
+# network-object 192.0.3.0 255.255.255.0
+# no network-object host 192.0.2.1
+# no network-object host 192.0.2.2
+# network-object host 192.0.3.1
+
+# After state:
+# -------------
+#
+# ciscoasa# sh running-config object-group
+# object-group network test_og_network
+# description test_og_network_replace
+# network-object host 192.0.3.1
+# network-object 192.0.3.0 255.255.255.0
+# object-group network test_network_og
+# description test_network_og
+# network-object host 192.0.3.1
+# network-object host 192.0.3.2
+# network-object 2001:db8:0:3::/64
+# group-object test_og_network
+# object-group security test_og_security
+# security-group name test_1
+# security-group name test_2
+# security-group tag 10
+# security-group tag 20
+# object-group user test_og_user
+# user LOCAL\\new_user_1
+# user LOCAL\\new_user_2
+# object-group protocol test_og_protocol
+# protocol-object tcp
+# protocol-object udp
+
+# Using Overridden
+
+# Before state:
+# -------------
+#
+# ciscoasa# sh running-config object-group
+# object-group network test_og_network
+# description test_og_network
+# network-object host 192.0.2.1
+# network-object host 192.0.2.2
+# network-object 192.0.2.0 255.255.255.0
+# network-object 198.51.100.0 255.255.255.0
+# object-group network test_network_og
+# description test_network_og
+# network-object host 192.0.3.1
+# network-object host 192.0.3.2
+# network-object 2001:db8:0:3::/64
+# group-object test_og_network
+# object-group security test_og_security
+# security-group name test_1
+# security-group name test_2
+# security-group tag 10
+# security-group tag 20
+# object-group user test_og_user
+# user LOCAL\\new_user_1
+# user LOCAL\\new_user_2
+
+- name: "Overridden module attributes of given object-group"
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network_override
+ network_object:
+ host:
+ - 192.0.3.1
+ address:
+ - 192.0.3.0 255.255.255.0
+ - object_type: protocol
+ object_groups:
+ - name: test_og_protocol
+ description: test_og_protocol
+ protocol_object:
+ protocol:
+ - tcp
+ - udp
+ state: overridden
+
+# Commands Fired:
+# ---------------
+#
+# no object-group security test_og_security
+# no object-group user test_og_user
+# object-group protocol test_og_protocol
+# description test_og_protocol
+# protocol tcp
+# protocol udp
+# object-group network test_og_network
+# description test_og_network_override
+# no network-object 192.0.2.0 255.255.255.0
+# no network-object 198.51.100.0 255.255.255.0
+# network-object 192.0.3.0 255.255.255.0
+# no network-object host 192.0.2.1
+# no network-object host 192.0.2.2
+# network-object host 192.0.3.1
+# no object-group network test_network_og
+
+# After state:
+# -------------
+#
+# ciscoasa# sh running-config object-group
+# object-group network test_og_network
+# description test_og_network_override
+# network-object host 192.0.3.1
+# network-object 192.0.3.0 255.255.255.0
+# object-group protocol test_og_protocol
+# protocol-object tcp
+# protocol-object udp
+
+# Using Deleted
+
+# Before state:
+# -------------
+#
+# ciscoasa# sh running-config object-group
+# object-group network test_og_network
+# description test_og_network
+# network-object host 192.0.2.1
+# network-object host 192.0.2.2
+# network-object 192.0.2.0 255.255.255.0
+# network-object 198.51.100.0 255.255.255.0
+# object-group network test_network_og
+# description test_network_og
+# network-object host 192.0.3.1
+# network-object host 192.0.3.2
+# network-object 2001:db8:0:3::/64
+# group-object test_og_network
+# object-group security test_og_security
+# security-group name test_1
+# security-group name test_2
+# security-group tag 10
+# security-group tag 20
+# object-group user test_og_user
+# user LOCAL\\new_user_1
+# user LOCAL\\new_user_2
+
+- name: "Delete given module attributes"
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ - name: test_network_og
+ - object_type: security
+ object_groups:
+ - name: test_og_security
+ state: deleted
+
+# Commands Fired:
+# ---------------
+#
+# no object-group network test_og_network
+# no object-group network test_network_og
+# no object-group security test_og_security
+
+# After state:
+# -------------
+#
+# ciscoasa# sh running-config object-group
+# object-group user test_og_user
+# user LOCAL\\new_user_1
+# user LOCAL\\new_user_2
+
+# Using DELETED without any config passed
+#"(NOTE: This will delete all of configured resource module attributes)"
+
+# Before state:
+# -------------
+#
+# ciscoasa# sh running-config object-group
+# object-group network test_og_network
+# description test_og_network
+# network-object host 192.0.2.1
+# network-object host 192.0.2.2
+# network-object 192.0.2.0 255.255.255.0
+# network-object 198.51.100.0 255.255.255.0
+# object-group network test_network_og
+# description test_network_og
+# network-object host 192.0.3.1
+# network-object host 192.0.3.2
+# network-object 2001:db8:0:3::/64
+# group-object test_og_network
+# object-group security test_og_security
+# security-group name test_1
+# security-group name test_2
+# security-group tag 10
+# security-group tag 20
+# object-group user test_og_user
+# user LOCAL\\new_user_1
+# user LOCAL\\new_user_2
+
+- name: Delete ALL configured module attributes
+ cisco.asa.asa_ogs:
+ config:
+ state: deleted
+
+# Commands Fired:
+# ---------------
+#
+# no object-group network test_og_network
+# no object-group network test_network_og
+# no object-group security test_og_security
+# no object-group user test_og_user
+
+# After state:
+# -------------
+#
+# ciscoasa# sh running-config object-group
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# ciscoasa# sh running-config object-group
+# object-group network test_og_network
+# description test_og_network
+# network-object host 192.0.2.1
+# network-object host 192.0.2.2
+# network-object 192.0.2.0 255.255.255.0
+# network-object 198.51.100.0 255.255.255.0
+# object-group network test_network_og
+# description test_network_og
+# network-object host 192.0.3.1
+# network-object host 192.0.3.2
+# network-object 2001:db8:0:3::/64
+# group-object test_og_network
+# object-group security test_og_security
+# security-group name test_1
+# security-group name test_2
+# security-group tag 10
+# security-group tag 20
+# object-group user test_og_user
+# user LOCAL\\new_user_1
+# user LOCAL\\new_user_2
+
+- name: Gather listed OGs with provided configurations
+ cisco.asa.asa_ogs:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "object_groups": [
+# {
+# "description": "test_security",
+# "name": "test_og_security",
+# "security_group": {
+# "sec_name": [
+# "test_2",
+# "test_1"
+# ],
+# "tag": [
+# 10,
+# 20
+# ]
+# }
+# }
+# ],
+# "object_type": "security"
+# },
+# {
+# "object_groups": [
+# {
+# "description": "test_network_og",
+# "name": "test_network_og",
+# "network_object": {
+# "host": [
+# "192.0.3.1",
+# "192.0.3.2"
+# ],
+# "ipv6_address": [
+# "2001:db8:3::/64"
+# ]
+# }
+# },
+# {
+# "description": "test_og_network",
+# "name": "test_og_network",
+# "network_object": {
+# "address": [
+# "192.0.2.0 255.255.255.0",
+# "198.51.100.0 255.255.255.0"
+# ],
+# "host": [
+# "192.0.2.1",
+# "192.0.2.2"
+# ]
+# }
+# }
+# ],
+# "object_type": "network"
+# },
+# {
+# "object_groups": [
+# {
+# "description": "test_user",
+# "name": "test_og_user",
+# "user_object": {
+# "user": [
+# {
+# "domain": "LOCAL",
+# "name": "new_user_1"
+# },
+# {
+# "domain": "LOCAL",
+# "name": "new_user_2"
+# }
+# ]
+# }
+# }
+# ],
+# "object_type": "user"
+# }
+# ]
+
+# After state:
+# ------------
+#
+# ciscoasa# sh running-config object-group
+# object-group network test_og_network
+# description test_og_network
+# network-object host 192.0.2.1
+# network-object host 192.0.2.2
+# network-object 192.0.2.0 255.255.255.0
+# network-object 198.51.100.0 255.255.255.0
+# object-group network test_network_og
+# description test_network_og
+# network-object host 192.0.3.1
+# network-object host 192.0.3.2
+# network-object 2001:db8:0:3::/64
+# group-object test_og_network
+# object-group security test_og_security
+# security-group name test_1
+# security-group name test_2
+# security-group tag 10
+# security-group tag 20
+# object-group user test_og_user
+# user LOCAL\\new_user_1
+# user LOCAL\\new_user_2
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network
+ network_object:
+ host:
+ - 192.0.2.1
+ - 192.0.2.2
+ address:
+ - 192.0.2.0 255.255.255.0
+ - 198.51.100.0 255.255.255.0
+ - name: test_network_og
+ description: test_network_og
+ network_object:
+ host:
+ - 192.0.3.1
+ - 192.0.3.2
+ ipv6_address:
+ - 2001:db8:3::/64
+ - object_type: security
+ object_groups:
+ - name: test_og_security
+ description: test_security
+ security_group:
+ sec_name:
+ - test_1
+ - test_2
+ tag:
+ - 10
+ - 20
+ - object_type: user
+ object_groups:
+ - name: test_og_user
+ description: test_user
+ user_object:
+ user:
+ - name: new_user_1
+ domain: LOCAL
+ - name: new_user_2
+ domain: LOCAL
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "object-group security test_og_security",
+# "description test_security",
+# "security-group name test_1",
+# "security-group name test_2",
+# "security-group tag 10",
+# "security-group tag 20",
+# "object-group network test_og_network",
+# "description test_og_network",
+# "network-object 192.0.2.0 255.255.255.0",
+# "network-object 198.51.100.0 255.255.255.0",
+# "network-object host 192.0.2.1",
+# "network-object host 192.0.2.2",
+# "object-group network test_network_og",
+# "description test_network_og",
+# "network-object host 192.0.3.1",
+# "network-object host 192.0.3.2",
+# "network-object 2001:db8:3::/64",
+# "object-group user test_og_user",
+# "description test_user",
+# "user LOCAL\\new_user_1",
+# "user LOCAL\\new_user_2"
+# ]
+
+# Using Parsed
+
+# parsed.cfg
+#
+# object-group network test_og_network
+# description test_og_network
+# network-object host 192.0.2.1
+# network-object 192.0.2.0 255.255.255.0
+# object-group network test_network_og
+# network-object 2001:db8:3::/64
+# object-group service test_og_service
+# service-object tcp-udp
+
+- name: Parse the commands for provided configuration
+ cisco.asa.asa_ogs:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": [
+# {
+# "object_groups": [
+# {
+# "name": "test_network_og"
+# },
+# {
+# "description": "test_og_network",
+# "name": "test_og_network",
+# "network_object": {
+# "host": [
+# "192.0.2.2"
+# ]
+# }
+# }
+# ],
+# "object_type": "network"
+# },
+# {
+# "object_groups": [
+# {
+# "name": "test_og_service",
+# "service_object": {
+# "protocol": [
+# "tcp-udp",
+# "ipinip"
+# ]
+# }
+# }
+# ],
+# "object_type": "service"
+# }
+# ]
+
+"""
+
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['object-group network test_network_og', 'description test_network_og', 'network-object host 192.0.2.1']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.argspec.ogs.ogs import (
+ OGsArgs,
+)
+from ansible_collections.cisco.asa.plugins.module_utils.network.asa.config.ogs.ogs import (
+ OGs,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+ :returns: the result form module invocation
+ """
+
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=OGsArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = OGs(module).execute_module()
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/terminal/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/terminal/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/terminal/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/plugins/terminal/asa.py b/collections-debian-merged/ansible_collections/cisco/asa/plugins/terminal/asa.py
new file mode 100644
index 00000000..83f33918
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/plugins/terminal/asa.py
@@ -0,0 +1,76 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+import json
+
+from ansible.errors import AnsibleConnectionFailure
+from ansible.module_utils._text import to_text, to_bytes
+from ansible.plugins.terminal import TerminalBase
+
+
+class TerminalModule(TerminalBase):
+
+ terminal_stdout_re = [
+ re.compile(br"[\r\n]?[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"),
+ re.compile(br"\[\w+\@[\w\-\.]+(?: [^\]])\] ?[>#\$] ?$"),
+ ]
+
+ terminal_stderr_re = [
+ re.compile(br"error:", re.I),
+ re.compile(br"Removing.* not allowed, it is being used"),
+ re.compile(br"^Command authorization failed\r?$", re.MULTILINE),
+ ]
+
+ def on_open_shell(self):
+ if self._get_prompt().strip().endswith(b"#"):
+ self.disable_pager()
+
+ def disable_pager(self):
+ try:
+ self._exec_cli_command(u"no terminal pager")
+ except AnsibleConnectionFailure:
+ raise AnsibleConnectionFailure("unable to disable terminal pager")
+
+ def on_become(self, passwd=None):
+ if self._get_prompt().strip().endswith(b"#"):
+ return
+
+ cmd = {u"command": u"enable"}
+ if passwd:
+ # Note: python-3.5 cannot combine u"" and r"" together. Thus make
+ # an r string and use to_text to ensure it's text on both py2 and py3.
+ cmd[u"prompt"] = to_text(
+ r"[\r\n]?[Pp]assword: $", errors="surrogate_or_strict"
+ )
+ cmd[u"answer"] = passwd
+
+ try:
+ self._exec_cli_command(
+ to_bytes(json.dumps(cmd), errors="surrogate_or_strict")
+ )
+ except AnsibleConnectionFailure:
+ raise AnsibleConnectionFailure(
+ "unable to elevate privilege to enable mode"
+ )
+
+ self.disable_pager()
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/requirements.txt b/collections-debian-merged/ansible_collections/cisco/asa/requirements.txt
new file mode 100644
index 00000000..8608c1b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/requirements.txt
@@ -0,0 +1 @@
+paramiko
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/test-requirements.txt b/collections-debian-merged/ansible_collections/cisco/asa/test-requirements.txt
new file mode 100644
index 00000000..4e509b41
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/test-requirements.txt
@@ -0,0 +1,5 @@
+black==19.3b0 ; python_version > '3.5'
+flake8
+mock
+pytest-xdist
+coverage==4.5.4
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/.gitignore b/collections-debian-merged/ansible_collections/cisco/asa/tests/.gitignore
new file mode 100644
index 00000000..ea1472ec
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/.gitignore
@@ -0,0 +1 @@
+output/
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/network-integration.cfg b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/network-integration.cfg
new file mode 100644
index 00000000..d12c1efe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/network-integration.cfg
@@ -0,0 +1,4 @@
+[persistent_connection]
+command_timeout = 100
+connect_timeout = 100
+connect_retry_timeout = 100
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/target-prefixes.network b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/target-prefixes.network
new file mode 100644
index 00000000..50b13099
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/target-prefixes.network
@@ -0,0 +1 @@
+asa \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tasks/cli.yaml
new file mode 100644
index 00000000..05ca0d6b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tasks/cli.yaml
@@ -0,0 +1,18 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: connection_network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tasks/main.yaml
new file mode 100644
index 00000000..a3db933e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tests/cli/basic.yaml
new file mode 100644
index 00000000..d45342df
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tests/cli/basic.yaml
@@ -0,0 +1,34 @@
+---
+- debug: msg="START cli/basic.yaml"
+
+- name: Basic ACL
+ register: result
+ cisco.asa.asa_acl:
+ provider: '{{ cli }}'
+ lines:
+ - access-list ACL-BASIC extended permit tcp any any eq www
+ - access-list ACL-BASIC extended permit tcp any any eq https
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Basic ACL idempotency
+ register: result
+ cisco.asa.asa_acl:
+ provider: '{{ cli }}'
+ lines:
+ - access-list ACL-BASIC extended permit tcp any any eq www
+ - access-list ACL-BASIC extended permit tcp any any eq https
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.asa.asa_config:
+ commands:
+ - clear configure access-list ACL-BASIC
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/basic.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tests/cli/full_name_match.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tests/cli/full_name_match.yaml
new file mode 100644
index 00000000..bc3a5413
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tests/cli/full_name_match.yaml
@@ -0,0 +1,35 @@
+---
+- debug: msg="START cli/full_name_match.yaml"
+
+- name: Basic ACL
+ register: result
+ cisco.asa.asa_acl:
+ provider: '{{ cli }}'
+ lines:
+ - access-list ACL-BASIC2 extended permit tcp any any eq www
+ - access-list ACL-BASIC2 extended permit tcp any any eq https
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Should not match for ACL-BASIC2
+ register: result
+ cisco.asa.asa_acl:
+ provider: '{{ cli }}'
+ lines:
+ - access-list ACL-BASIC extended permit tcp any any eq www
+ - access-list ACL-BASIC extended permit tcp any any eq https
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: teardown
+ cisco.asa.asa_config:
+ commands:
+ - clear configure access-list ACL-BASIC
+ - clear configure access-list ACL-BASIC2
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/full_name_match.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tests/cli/insert.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tests/cli/insert.yaml
new file mode 100644
index 00000000..fafea5fc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acl/tests/cli/insert.yaml
@@ -0,0 +1,43 @@
+---
+- debug: msg="START cli/insert.yaml"
+
+- name: Create ACL
+ register: result
+ cisco.asa.asa_acl:
+ provider: '{{ cli }}'
+ lines:
+ - access-list ACL-INSERT extended permit tcp any any eq www
+ - access-list ACL-INSERT extended permit tcp any any eq https
+
+- name: Insert on first line
+ register: result
+ cisco.asa.asa_acl:
+ provider: '{{ cli }}'
+ lines:
+ - access-list ACL-INSERT extended permit tcp any any eq www
+ - access-list ACL-INSERT extended permit tcp any any eq https
+ - access-list ACL-INSERT line 1 extended permit tcp any any eq ssh
+
+- name: Show ACL
+ register: result
+ cisco.asa.asa_command:
+ provider: '{{ cli }}'
+ commands: show run access-list ACL-INSERT
+
+- name: Show me
+ debug:
+ var: result
+
+- name:
+ assert:
+ that:
+ - result.stdout_lines[0][0].rstrip() == 'access-list ACL-INSERT extended permit
+ tcp any any eq ssh'
+
+- name: teardown
+ cisco.asa.asa_config:
+ commands:
+ - clear configure access-list ACL-INSERT
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/insert.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tasks/cli.yaml
new file mode 100644
index 00000000..4a37ae1f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tasks/cli.yaml
@@ -0,0 +1,21 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: connection_network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tasks/main.yaml
new file mode 100644
index 00000000..a3db933e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..1dabc77c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_parsed.cfg
@@ -0,0 +1,5 @@
+access-list test_access; 2 elements; name hash: 0xaf1b712e
+access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+access-list test_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 log errors
+access-list test_R1_traffic; 1 elements; name hash: 0xaf40d3c2
+access-list test_R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..dafe55db
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_populate_config.yaml
@@ -0,0 +1,62 @@
+---
+- name: Populate Config
+ cisco.asa.asa_acls: &id001
+ config:
+ acls:
+ - name: test_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.2.0
+ netmask: 255.255.255.0
+ destination:
+ address: 192.0.3.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ log: default
+ - grant: deny
+ line: 2
+ protocol_options:
+ igrp: true
+ source:
+ address: 198.51.100.0
+ netmask: 255.255.255.0
+ destination:
+ address: 198.51.110.0
+ netmask: 255.255.255.0
+ log: errors
+ - name: test_global_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ any: true
+ destination:
+ any: true
+ port_protocol:
+ eq: www
+ log: errors
+ - name: test_R1_traffic
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 2001:db8:0:3::/64
+ port_protocol:
+ eq: www
+ destination:
+ address: 2001:fc8:0:4::/64
+ port_protocol:
+ eq: telnet
+ inactive: true
+ state: merged
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_populate_network_og.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_populate_network_og.yaml
new file mode 100644
index 00000000..74e21f61
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_populate_network_og.yaml
@@ -0,0 +1,21 @@
+---
+- name: Populate Network Object-group
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ network_object:
+ host:
+ - 192.0.2.1
+ - 192.0.2.2
+ address:
+ - 192.0.2.0 255.255.255.0
+ - 198.51.100.0 255.255.255.0
+ - name: test_network_og
+ network_object:
+ host:
+ - 192.0.3.1
+ ipv6_address:
+ - 2001:db8:3::/64
+ state: merged
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..f2d64eab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_remove_config.yaml
@@ -0,0 +1,4 @@
+---
+- name: Remove Config
+ cisco.asa.asa_acls:
+ state: deleted
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_remove_og_config.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_remove_og_config.yaml
new file mode 100644
index 00000000..50921c3b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/_remove_og_config.yaml
@@ -0,0 +1,4 @@
+---
+- name: Remove configured Object group
+ cisco.asa.asa_ogs:
+ state: deleted
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/deleted.yaml
new file mode 100644
index 00000000..00edc194
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/deleted.yaml
@@ -0,0 +1,64 @@
+---
+- debug:
+ msg: Start Deleted integration state for asa_acls ansible_connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete attributes of provided configured ACLs
+ register: result
+ cisco.asa.asa_acls: &id001
+ config:
+ acls:
+ - name: test_access
+ - name: test_global_access
+ state: deleted
+
+ - assert:
+ that:
+ - result.commands|length == 3
+ - result.changed == true
+ - result.commands|symmetric_difference(deleted.commands) == []
+
+ - name: Delete attributes of all configured interfaces (IDEMPOTENT)
+ register: result
+ cisco.asa.asa_acls: *id001
+
+ - name: Assert that the previous delete task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result.changed == false
+
+ - include_tasks: _remove_config.yaml
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete all off ACLs configured
+ register: result
+ cisco.asa.asa_acls: &id002
+ state: deleted
+
+ - assert:
+ that:
+ - result.commands|length == 4
+ - result.changed == true
+ - result.commands|symmetric_difference(delete_all.commands) == []
+
+ - name: Delete ACL attributes of provided configured interfaces based on AFI
+ (IDEMPOTENT)
+ register: result
+ cisco.asa.asa_acls: *id002
+
+ - name: Assert that the previous delete task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..6f465b60
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/empty_config.yaml
@@ -0,0 +1,59 @@
+---
+- debug:
+ msg: START asa_acls empty_config.yaml integration tests on connection={{ ansible_connection
+ }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_acls:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_acls:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_acls:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_acls:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_acls:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/gathered.yaml
new file mode 100644
index 00000000..f9d44bfb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/gathered.yaml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START asa_acls gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.asa.asa_acls:
+ config:
+ state: gathered
+
+ - assert:
+ that:
+ - gathered['config']['acls'] | symmetric_difference(result.gathered.acls) == []
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/merged.yaml
new file mode 100644
index 00000000..a1e10613
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/merged.yaml
@@ -0,0 +1,130 @@
+---
+- debug:
+ msg: START Merged asa_acls state for integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_network_og.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.asa.asa_acls: &id001
+ config:
+ acls:
+ - name: test_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.2.0
+ netmask: 255.255.255.0
+ destination:
+ address: 192.0.3.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ log: default
+ - grant: deny
+ line: 2
+ protocol: icmp
+ protocol_options:
+ icmp:
+ alternate_address: true
+ source:
+ address: 198.51.100.0
+ netmask: 255.255.255.0
+ destination:
+ address: 198.51.110.0
+ netmask: 255.255.255.0
+ log: errors
+ - grant: deny
+ line: 3
+ protocol: tcp
+ protocol_options:
+ tcp: true
+ source:
+ host: 198.51.110.0
+ destination:
+ any: true
+ port_protocol:
+ eq: www
+ log: default
+ - grant: deny
+ line: 4
+ protocol: tcp
+ protocol_options:
+ tcp: true
+ source:
+ object_group: test_og_network
+ destination:
+ object_group: test_network_og
+ port_protocol:
+ eq: www
+ log: default
+ - name: test_global_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ any: true
+ destination:
+ any: true
+ port_protocol:
+ eq: www
+ log: errors
+ - grant: deny
+ line: 2
+ protocol_options:
+ tcp: true
+ source:
+ interface: management
+ destination:
+ interface: management
+ port_protocol:
+ eq: www
+ log: warnings
+ - name: test_R1_traffic
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 2001:db8:0:3::/64
+ port_protocol:
+ eq: www
+ destination:
+ address: 2001:fc8:0:4::/64
+ port_protocol:
+ eq: telnet
+ inactive: true
+ state: merged
+
+ - assert:
+ that:
+ - result.commands|length == 7
+ - result.changed == true
+ - result.commands|symmetric_difference(merged.commands) == []
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.asa.asa_acls: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_og_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/overridden.yaml
new file mode 100644
index 00000000..1e0378b2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/overridden.yaml
@@ -0,0 +1,66 @@
+---
+- debug:
+ msg: START Overridden asa_acls state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_network_og.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device configuration of all interfaces with provided configuration
+ register: result
+ cisco.asa.asa_acls: &id001
+ config:
+ acls:
+ - name: test_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.4.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 192.0.5.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ - grant: deny
+ line: 2
+ protocol_options:
+ tcp: true
+ source:
+ object_group: test_og_network
+ destination:
+ object_group: test_network_og
+ port_protocol:
+ eq: www
+ log: default
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 6
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Override device configuration of all interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.asa.asa_acls: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_og_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/parsed.yaml
new file mode 100644
index 00000000..af24ffa4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START asa_acls parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.asa.asa_acls:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+- assert:
+ that:
+ - result.changed == false
+ - parsed['config']['acls']|symmetric_difference(result.parsed.acls) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/rendered.yaml
new file mode 100644
index 00000000..6a448b9e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/rendered.yaml
@@ -0,0 +1,112 @@
+---
+- debug:
+ msg: Start asa_acls rendered integration tests ansible_connection={{ ansible_connection
+ }}
+
+- block:
+
+ - name: Rendered the provided configuration with the exisiting running configuration
+ register: result
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: test_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.2.0
+ netmask: 255.255.255.0
+ destination:
+ address: 192.0.3.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ log: default
+ - grant: deny
+ line: 2
+ protocol: icmp
+ protocol_options:
+ icmp:
+ alternate_address: true
+ source:
+ address: 198.51.100.0
+ netmask: 255.255.255.0
+ destination:
+ address: 198.51.110.0
+ netmask: 255.255.255.0
+ log: errors
+ - grant: deny
+ line: 3
+ protocol: tcp
+ protocol_options:
+ tcp: true
+ source:
+ host: 198.51.110.0
+ destination:
+ any: true
+ port_protocol:
+ eq: www
+ log: default
+ - grant: deny
+ line: 4
+ protocol: tcp
+ protocol_options:
+ tcp: true
+ source:
+ object_group: test_og_network
+ destination:
+ object_group: test_network_og
+ port_protocol:
+ eq: www
+ log: default
+ - name: test_global_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ any: true
+ destination:
+ any: true
+ port_protocol:
+ eq: www
+ log: errors
+ - grant: deny
+ line: 2
+ protocol_options:
+ tcp: true
+ source:
+ interface: management
+ destination:
+ interface: management
+ port_protocol:
+ eq: www
+ log: warnings
+ - name: test_R1_traffic
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 2001:db8:0:3::/64
+ port_protocol:
+ eq: www
+ destination:
+ address: 2001:fc8:0:4::/64
+ port_protocol:
+ eq: telnet
+ inactive: true
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/replaced.yaml
new file mode 100644
index 00000000..16849c8f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/replaced.yaml
@@ -0,0 +1,83 @@
+---
+- debug:
+ msg: START Replaced asa_acls state for integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_network_og.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ register: result
+ cisco.asa.asa_acls: &id001
+ config:
+ acls:
+ - name: test_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol: tcp
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.3.0
+ netmask: 255.255.255.0
+ destination:
+ address: 192.0.4.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ log: default
+ - grant: deny
+ line: 2
+ protocol_options:
+ tcp: true
+ source:
+ object_group: test_og_network
+ destination:
+ object_group: test_network_og
+ port_protocol:
+ eq: www
+ log: default
+ - name: test_global_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.4.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 192.0.5.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ state: replaced
+
+ - assert:
+ that:
+ - result.commands|length == 6
+ - result.changed == true
+ - result.commands|symmetric_difference(replaced.commands) == []
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.asa.asa_acls: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_og_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/rtt.yaml
new file mode 100644
index 00000000..3fec4608
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/tests/cli/rtt.yaml
@@ -0,0 +1,139 @@
+---
+- debug:
+ msg: START asa_acls round trip integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_network_og.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: test_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.2.0
+ netmask: 255.255.255.0
+ destination:
+ address: 192.0.3.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ log: default
+ - grant: deny
+ line: 2
+ protocol_options:
+ igrp: true
+ source:
+ address: 198.51.100.0
+ netmask: 255.255.255.0
+ destination:
+ address: 198.51.110.0
+ netmask: 255.255.255.0
+ log: errors
+ - name: test_global_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ any: true
+ destination:
+ any: true
+ port_protocol:
+ eq: www
+ log: errors
+ - name: test_R1_traffic
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 2001:db8:0:3::/64
+ port_protocol:
+ eq: www
+ destination:
+ address: 2001:fc8:0:4::/64
+ port_protocol:
+ eq: telnet
+ inactive: true
+ state: merged
+
+ - name: Gather ACLs facts
+ cisco.asa.asa_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - acls
+
+ - name: Apply the configuration which need to be reverted
+ register: result
+ cisco.asa.asa_acls:
+ config:
+ acls:
+ - name: test_access
+ acl_type: extended
+ aces:
+ - grant: deny
+ line: 1
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.4.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 192.0.5.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ - grant: deny
+ line: 2
+ protocol_options:
+ tcp: true
+ source:
+ object_group: test_og_network
+ destination:
+ object_group: test_network_og
+ port_protocol:
+ eq: www
+ log: default
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 6
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.asa.asa_acls:
+ config: "{{ ansible_facts['network_resources']['acls'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 6
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+ always:
+
+ - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_og_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/vars/main.yaml
new file mode 100644
index 00000000..281cb8d6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_acls/vars/main.yaml
@@ -0,0 +1,158 @@
+---
+deleted:
+ commands:
+ - no access-list test_global_access line 1 extended deny tcp any any eq www log errors
+ - no access-list test_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 log errors
+ - no access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+delete_all:
+ commands:
+ - no access-list test_R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive
+ - no access-list test_global_access line 1 extended deny tcp any any eq www log errors
+ - no access-list test_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 log errors
+ - no access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+merged:
+ commands:
+ - access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+ - access-list test_access line 2 extended deny icmp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 alternate-address log errors
+ - access-list test_access line 3 extended deny tcp host 198.51.110.0 any eq www log default
+ - access-list test_access line 4 extended deny tcp object-group test_og_network object-group test_network_og eq www log default
+ - access-list test_global_access line 1 extended deny tcp any any eq www log errors
+ - access-list test_global_access line 2 extended deny tcp interface management interface management eq www log warnings
+ - access-list test_R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive
+replaced:
+ commands:
+ - no access-list test_global_access line 1 extended deny tcp any any eq www log errors
+ - no access-list test_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 log errors
+ - no access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+ - access-list test_access line 1 extended deny tcp 192.0.3.0 255.255.255.0 192.0.4.0 255.255.255.0 eq www log default
+ - access-list test_access line 2 extended deny tcp object-group test_og_network object-group test_network_og eq www log default
+ - access-list test_global_access line 1 extended deny tcp 192.0.4.0 255.255.255.0 eq telnet 192.0.5.0 255.255.255.0 eq www
+overridden:
+ commands:
+ - no access-list test_R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive
+ - no access-list test_global_access line 1 extended deny tcp any any eq www log errors
+ - no access-list test_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 log errors
+ - no access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+ - access-list test_access line 1 extended deny tcp 192.0.4.0 255.255.255.0 eq telnet 192.0.5.0 255.255.255.0 eq www
+ - access-list test_access line 2 extended deny tcp object-group test_og_network object-group test_network_og eq www log default
+gathered:
+ config:
+ acls:
+ - aces:
+ - destination:
+ address: 192.0.3.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ grant: deny
+ line: 1
+ log: default
+ protocol: tcp
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.2.0
+ netmask: 255.255.255.0
+ - destination:
+ address: 198.51.110.0
+ netmask: 255.255.255.0
+ grant: deny
+ line: 2
+ log: errors
+ protocol: igrp
+ protocol_options:
+ igrp: true
+ source:
+ address: 198.51.100.0
+ netmask: 255.255.255.0
+ acl_type: extended
+ name: test_access
+ - aces:
+ - destination:
+ any: true
+ port_protocol:
+ eq: www
+ grant: deny
+ line: 1
+ log: errors
+ protocol: tcp
+ protocol_options:
+ tcp: true
+ source:
+ any: true
+ acl_type: extended
+ name: test_global_access
+ - aces:
+ - destination:
+ address: 2001:fc8:0:4::/64
+ port_protocol:
+ eq: telnet
+ grant: deny
+ inactive: true
+ line: 1
+ protocol: tcp
+ protocol_options:
+ tcp: true
+ source:
+ address: 2001:db8:0:3::/64
+ port_protocol:
+ eq: www
+ acl_type: extended
+ name: test_R1_traffic
+parsed:
+ config:
+ acls:
+ - aces:
+ - destination:
+ address: 192.0.3.0
+ netmask: 255.255.255.0
+ port_protocol:
+ eq: www
+ grant: deny
+ line: 1
+ log: default
+ protocol: tcp
+ protocol_options:
+ tcp: true
+ source:
+ address: 192.0.2.0
+ netmask: 255.255.255.0
+ - destination:
+ address: 198.51.110.0
+ netmask: 255.255.255.0
+ grant: deny
+ line: 2
+ log: errors
+ protocol: igrp
+ protocol_options:
+ igrp: true
+ source:
+ address: 198.51.100.0
+ netmask: 255.255.255.0
+ acl_type: extended
+ name: test_access
+ - aces:
+ - destination:
+ address: 2001:fc8:0:4::/64
+ port_protocol:
+ eq: telnet
+ grant: deny
+ inactive: true
+ line: 1
+ protocol: tcp
+ protocol_options:
+ tcp: true
+ source:
+ address: 2001:db8:0:3::/64
+ port_protocol:
+ eq: www
+ acl_type: extended
+ name: test_R1_traffic
+rtt:
+ commands:
+ - no access-list test_access line 2 extended deny tcp object-group test_og_network object-group test_network_og eq www log default
+ - no access-list test_access line 1 extended deny tcp 192.0.4.0 255.255.255.0 eq telnet 192.0.5.0 255.255.255.0 eq www
+ - access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default
+ - access-list test_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 log errors
+ - access-list test_global_access line 1 extended deny tcp any any eq www log errors
+ - access-list test_R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tasks/cli.yaml
new file mode 100644
index 00000000..05ca0d6b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tasks/cli.yaml
@@ -0,0 +1,18 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: connection_network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tasks/main.yaml
new file mode 100644
index 00000000..a3db933e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/bad_operator.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/bad_operator.yaml
new file mode 100644
index 00000000..6ba1e96a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/bad_operator.yaml
@@ -0,0 +1,20 @@
+---
+- debug: msg="START cli/bad_operator.yaml"
+
+- name: test bad operator
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_command:
+ commands:
+ - show version
+ - show interfaces GigabitEthernet 0/0
+ wait_for:
+
+ - result[0] contains 'Description: Foo'
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+
+- debug: msg="END cli/bad_operator.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/contains.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/contains.yaml
new file mode 100644
index 00000000..ea8960bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/contains.yaml
@@ -0,0 +1,19 @@
+---
+- debug: msg="START cli/contains.yaml"
+
+- name: test contains operator
+ register: result
+ cisco.asa.asa_command:
+ commands:
+ - show version
+ - show interface
+ wait_for:
+ - result[0] contains 'Cisco Adaptive Security Appliance Software Version'
+ - result[1] contains 'Hardware'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+
+- debug: msg="END cli/contains.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/invalid.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/invalid.yaml
new file mode 100644
index 00000000..2cc9c6e7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/invalid.yaml
@@ -0,0 +1,28 @@
+---
+- debug: msg="START cli/invalid.yaml"
+
+- name: run invalid command
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_command:
+ commands:
+ - show foo
+
+- assert:
+ that:
+ - result.failed
+
+- name: run commands that include invalid command
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_command:
+ commands:
+ - show version
+ - show foo
+
+- assert:
+ that:
+ - result.failed
+ ignore_errors: true
+
+- debug: msg="END cli/invalid.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/output.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/output.yaml
new file mode 100644
index 00000000..73a8780d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/output.yaml
@@ -0,0 +1,28 @@
+---
+- debug: msg="START cli/output.yaml"
+
+- name: get output for single command
+ register: result
+ cisco.asa.asa_command:
+ commands:
+ - show version
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+
+- name: get output for multiple commands
+ register: result
+ cisco.asa.asa_command:
+ commands:
+ - show version
+ - show interface
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+ - result.stdout | length == 2
+
+- debug: msg="END cli/output.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/timeout.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/timeout.yaml
new file mode 100644
index 00000000..10f2e636
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_command/tests/cli/timeout.yaml
@@ -0,0 +1,18 @@
+---
+- debug: msg="START cli/timeout.yaml"
+
+- name: test bad condition
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_command:
+ commands:
+ - show version
+ wait_for:
+ - result[0] contains bad_value_string
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+
+- debug: msg="END cli/timeout.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tasks/cli.yaml
new file mode 100644
index 00000000..05ca0d6b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tasks/cli.yaml
@@ -0,0 +1,18 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: connection_network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tasks/main.yaml
new file mode 100644
index 00000000..62cc1ae1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tasks/main.yaml
@@ -0,0 +1,7 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: redirection.yaml
+ when: ansible_version.full is version('2.10.0', '>=')
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tasks/redirection.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tasks/redirection.yaml
new file mode 100644
index 00000000..922d23fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tasks/redirection.yaml
@@ -0,0 +1,18 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/redirection'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: connection_network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/templates/basic/config.j2 b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/templates/basic/config.j2
new file mode 100644
index 00000000..779b731e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/templates/basic/config.j2
@@ -0,0 +1,3 @@
+object-group network OG-ANSIBLE-TEMPLATE
+ description this is a test
+ network-object host 192.168.99.12
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/templates/defaults/config.j2 b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/templates/defaults/config.j2
new file mode 100644
index 00000000..762e73de
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/templates/defaults/config.j2
@@ -0,0 +1,4 @@
+object-group network OG-ANSIBLE-TEMPLATE-DEFAULT
+ description this is a test
+ network-object 10.0.0.0 255.255.255.0
+ network-object 10.1.0.0 255.255.255.0
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/backup.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/backup.yaml
new file mode 100644
index 00000000..ef6dd275
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/backup.yaml
@@ -0,0 +1,50 @@
+---
+- debug: msg="START cli/backup.yaml"
+
+- name: setup
+ ignore_errors: true
+ cisco.asa.asa_config:
+ commands:
+ - no object-group network OG-ANSIBLE-TEMPLATE
+
+- name: collect any backup files
+ find:
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_files
+ connection: local
+
+- name: delete backup files
+ file:
+ path: '{{ item.path }}'
+ state: absent
+ with_items: '{{backup_files.files|default([])}}'
+
+- name: configure device with config
+ register: result
+ cisco.asa.asa_config:
+ src: basic/config.j2
+ backup: true
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is defined
+
+- name: collect any backup files
+ find:
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_files
+ connection: local
+
+- assert:
+ that:
+ - backup_files.files is defined
+
+- name: teardown
+ cisco.asa.asa_config:
+ commands:
+ - no object-group network OG-ANSIBLE-TEMPLATE
+
+- debug: msg="END cli/backup.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/basic.yaml
new file mode 100644
index 00000000..e6ea89de
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/basic.yaml
@@ -0,0 +1,35 @@
+---
+- debug: msg="START cli/basic.yaml"
+
+- name: setup
+ ignore_errors: true
+ cisco.asa.asa_config:
+ commands:
+ - no object-group network OG-ANSIBLE-TEMPLATE
+
+- name: configure device with config
+ register: result
+ cisco.asa.asa_config:
+ src: basic/config.j2
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is defined
+
+- name: check device with config
+ register: result
+ cisco.asa.asa_config:
+ src: basic/config.j2
+
+- assert:
+ that:
+ - result.changed == false
+ - result.updates is not defined
+
+- name: teardown
+ cisco.asa.asa_config:
+ commands:
+ - no object-group network OG-ANSIBLE-TEMPLATE
+
+- debug: msg="END cli/basic.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/defaults.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/defaults.yaml
new file mode 100644
index 00000000..f6583293
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/defaults.yaml
@@ -0,0 +1,41 @@
+---
+- debug: msg="START cli/defaults.yaml"
+
+- name: setup
+ ignore_errors: true
+ cisco.asa.asa_config:
+ commands:
+ - no object-group network OG-ANSIBLE-TEMPLATE-DEFAULT
+
+- name: configure device with defaults included
+ register: result
+ cisco.asa.asa_config:
+ src: defaults/config.j2
+ defaults: true
+
+- debug: var=result
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is defined
+
+- name: check device with defaults included
+ register: result
+ cisco.asa.asa_config:
+ src: defaults/config.j2
+ defaults: true
+
+- debug: var=result
+
+- assert:
+ that:
+ - result.changed == false
+ - result.updates is not defined
+
+- name: teardown
+ cisco.asa.asa_config:
+ commands:
+ - no object-group network OG-ANSIBLE-TEMPLATE-DEFAULT
+
+- debug: msg="END cli/defaults.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/force.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/force.yaml
new file mode 100644
index 00000000..927d1485
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/force.yaml
@@ -0,0 +1,37 @@
+---
+- debug: msg="START cli/force.yaml"
+
+- name: setup
+ ignore_errors: true
+ cisco.asa.asa_config:
+ commands:
+ - no object-group network OG-ANSIBLE-TEMPLATE-DEFAULT
+
+- name: configure device with config
+ register: result
+ cisco.asa.asa_config:
+ src: basic/config.j2
+ match: none
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is defined
+
+- name: check device with config
+ register: result
+ cisco.asa.asa_config:
+ src: basic/config.j2
+ match: none
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is defined
+
+- name: teardown
+ cisco.asa.asa_config:
+ commands:
+ - no object-group network OG-ANSIBLE-TEMPLATE-DEFAULT
+
+- debug: msg="END cli/force.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/more_system.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/more_system.yaml
new file mode 100644
index 00000000..24d8d114
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/more_system.yaml
@@ -0,0 +1,34 @@
+---
+- debug: msg="START cli/more_system.yaml"
+
+- name: Prepare tunnel-group
+ cisco.asa.asa_config:
+ before: tunnel-group 192.0.2.1 type ipsec-l2l
+ lines:
+ - tunnel-group 192.0.2.1 ipsec-attributes
+
+- name: Setup tunnel-group
+ cisco.asa.asa_config:
+ parents: tunnel-group 192.0.2.1 ipsec-attributes
+ lines:
+ - ikev1 pre-shared-key abc123
+ passwords: true
+
+- name: Test idempotency
+ register: result
+ cisco.asa.asa_config:
+ parents: tunnel-group 192.0.2.1 ipsec-attributes
+ lines:
+ - ikev1 pre-shared-key abc123
+ passwords: true
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.asa.asa_config:
+ lines:
+ - clear configure tunnel-group 192.0.2.1
+
+- debug: msg="END cli/more_system.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/removal_error.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/removal_error.yaml
new file mode 100644
index 00000000..a6357d67
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/removal_error.yaml
@@ -0,0 +1,39 @@
+---
+- debug: msg="START cli/removal_error.yaml"
+
+- name: setup
+ ignore_errors: true
+ cisco.asa.asa_config:
+ commands:
+ - no object-group network OGA-GOOGLE-DNS
+
+- name: configure test object-group
+ register: result
+ cisco.asa.asa_config:
+ parents: object-group network OGA-GOOGLE-DNS
+ lines: network-object host 8.8.8.8
+
+- name: configure test access-list
+ cisco.asa.asa_config:
+ lines: access-list ANSIBLE-DNS extended permit udp any object-group OGA-GOOGLE-DNS
+ eq domain
+
+- name: try to remove object-group (should fail)
+ ignore_errors: true
+ register: result
+ cisco.asa.asa_config:
+ commands:
+ - no object-group network OGA-GOOGLE-DNS
+
+- name: Last command should fail
+ assert:
+ that:
+ - result.failed == true
+
+- name: teardown
+ cisco.asa.asa_config:
+ commands:
+ - clear configure access-list ANSIBLE-DNS
+ - no object-group network OGA-GOOGLE-DNS
+
+- debug: msg="END cli/removal_error.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel.yaml
new file mode 100644
index 00000000..17ff240c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel.yaml
@@ -0,0 +1,40 @@
+---
+- debug: msg="START cli/sublevel.yaml"
+
+- name: setup test
+ cisco.asa.asa_config:
+ lines:
+ - no object-group network OG-ANSIBLE-SUBLEVEL
+
+- name: configure sub level command
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - network-object host 192.168.10.1
+ parents:
+ - object-group network OG-ANSIBLE-SUBLEVEL
+
+- assert:
+ that:
+ - result.changed == true
+ - "'object-group network OG-ANSIBLE-SUBLEVEL' in result.updates"
+ - "'network-object host 192.168.10.1' in result.updates"
+
+- name: configure sub level command idempotent check
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - network-object host 192.168.10.1
+ parents:
+ - object-group network OG-ANSIBLE-SUBLEVEL
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.asa.asa_config:
+ lines:
+ - no object-group network OG-ANSIBLE-SUBLEVEL
+
+- debug: msg="END cli/sublevel.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_block.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_block.yaml
new file mode 100644
index 00000000..dfd91ca5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_block.yaml
@@ -0,0 +1,62 @@
+---
+- debug: msg="START cli/sublevel_block.yaml"
+
+- name: setup
+ register: object_group
+ cisco.asa.asa_command:
+ commands:
+ - show run object-group
+
+- name: setup
+ cisco.asa.asa_config:
+ lines:
+ - no object-group network OG-ANSIBLE
+ match: none
+
+- name: configure sub level command using block replace
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - network-object 192.168.10.0 255.255.255.0
+ - network-object 192.168.20.0 255.255.255.0
+ - network-object 192.168.30.0 255.255.255.0
+ - network-object 192.168.40.0 255.255.255.0
+ parents:
+ - object-group network OG-ANSIBLE
+ replace: block
+ after:
+ - exit
+
+- assert:
+ that:
+ - result.changed == true
+ - "'object-group network OG-ANSIBLE' in result.updates"
+ - "'network-object 192.168.10.0 255.255.255.0' in result.updates"
+ - "'network-object 192.168.20.0 255.255.255.0' in result.updates"
+ - "'network-object 192.168.30.0 255.255.255.0' in result.updates"
+ - "'network-object 192.168.40.0 255.255.255.0' in result.updates"
+
+- name: check sub level command using block replace
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - network-object 192.168.10.0 255.255.255.0
+ - network-object 192.168.20.0 255.255.255.0
+ - network-object 192.168.30.0 255.255.255.0
+ - network-object 192.168.40.0 255.255.255.0
+ parents:
+ - object-group network OG-ANSIBLE
+ replace: block
+ after:
+ - exit
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.asa.asa_config:
+ lines:
+ - no object-group network OG-ANSIBLE
+
+- debug: msg="END cli/sublevel_block.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_exact.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_exact.yaml
new file mode 100644
index 00000000..6dc6032d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_exact.yaml
@@ -0,0 +1,67 @@
+---
+- debug: msg="START cli/sublevel_exact.yaml"
+
+- name: setup
+ cisco.asa.asa_config:
+ lines:
+ - network-object 192.168.10.0 255.255.255.0
+ - network-object 192.168.20.0 255.255.255.0
+ - network-object 192.168.30.0 255.255.255.0
+ - network-object 192.168.40.0 255.255.255.0
+ - network-object 192.168.50.0 255.255.255.0
+ parents:
+ - object-group network OG-ANSIBLE-EXACT
+ before:
+ - no object-group network OG-ANSIBLE-EXACT
+ after:
+ - exit
+
+- name: configure sub level command using exact match
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - network-object 192.168.10.0 255.255.255.0
+ - network-object 192.168.20.0 255.255.255.0
+ - network-object 192.168.30.0 255.255.255.0
+ - network-object 192.168.40.0 255.255.255.0
+ parents:
+ - object-group network OG-ANSIBLE-EXACT
+ after:
+ - exit
+ match: exact
+
+- assert:
+ that:
+ - result.changed == true
+ - "'object-group network OG-ANSIBLE-EXACT' in result.updates"
+ - "'network-object 192.168.10.0 255.255.255.0' in result.updates"
+ - "'network-object 192.168.20.0 255.255.255.0' in result.updates"
+ - "'network-object 192.168.30.0 255.255.255.0' in result.updates"
+ - "'network-object 192.168.40.0 255.255.255.0' in result.updates"
+ - "'network-object 192.168.50.0 255.255.255.0' not in result.updates"
+
+- name: check sub level command using exact match
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - network-object 192.168.10.0 255.255.255.0
+ - network-object 192.168.20.0 255.255.255.0
+ - network-object 192.168.30.0 255.255.255.0
+ - network-object 192.168.40.0 255.255.255.0
+ - network-object 192.168.50.0 255.255.255.0
+ parents:
+ - object-group network OG-ANSIBLE-EXACT
+ after:
+ - exit
+ match: exact
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.asa.asa_config:
+ lines:
+ - no object-group network OG-ANSIBLE-EXACT
+
+- debug: msg="END cli/sublevel_exact.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_strict.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_strict.yaml
new file mode 100644
index 00000000..79259e05
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_strict.yaml
@@ -0,0 +1,63 @@
+---
+- debug: msg="START cli/sublevel_strict.yaml"
+
+- name: setup
+ cisco.asa.asa_config:
+ lines:
+ - network-object 192.168.10.0 255.255.255.0
+ - network-object 192.168.20.0 255.255.255.0
+ - network-object 192.168.30.0 255.255.255.0
+ - network-object 192.168.40.0 255.255.255.0
+ - network-object 192.168.50.0 255.255.255.0
+ parents:
+ - object-group network OG-ANSIBLE-STRICT
+ before:
+ - no object-group network OG-ANSIBLE-STRICT
+ after:
+ - exit
+
+- name: configure sub level command using strict match
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - network-object 192.168.10.0 255.255.255.0
+ - network-object 192.168.20.0 255.255.255.0
+ - network-object 192.168.30.0 255.255.255.0
+ - network-object 192.168.40.0 255.255.255.0
+ parents:
+ - object-group network OG-ANSIBLE-STRICT
+ match: strict
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: check sub level command using strict match
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - network-object 192.168.10.0 255.255.255.0
+ - network-object 192.168.30.0 255.255.255.0
+ - network-object 192.168.30.0 255.255.255.0
+ parents:
+ - object-group network OG-ANSIBLE-STRICT
+ after:
+ - exit
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+ - "'object-group network OG-ANSIBLE-STRICT' in result.updates"
+ - "'network-object 192.168.10.0 255.255.255.0' not in result.updates"
+ - "'network-object 192.168.30.0 255.255.255.0' in result.updates"
+ - "'network-object 192.168.30.0 255.255.255.0' in result.updates"
+ - "'network-object 192.168.40.0 255.255.255.0' not in result.updates"
+ - "'network-object 192.168.50.0 255.255.255.0' not in result.updates"
+
+- name: teardown
+ cisco.asa.asa_config:
+ lines:
+ - no object-group network OG-ANSIBLE-STRICT
+
+- debug: msg="END cli/sublevel_strict.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_strict_mul_parents.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_strict_mul_parents.yaml
new file mode 100644
index 00000000..9998d7b9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/sublevel_strict_mul_parents.yaml
@@ -0,0 +1,70 @@
+---
+- debug: msg="START cli/sublevel_strict_mul_parents.yaml on connection={{ ansible_connection}}"
+
+- name: setup
+ cisco.asa.asa_config:
+ lines:
+ - class-map c1
+ - match default-inspection-traffic
+ - policy-map p1
+ - class c1
+ match: none
+
+- name: configure sub level command using strict match
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - inspect ftp
+ - inspect tftp
+ parents:
+ - policy-map p1
+ - class c1
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+ - "'inspect ftp' in result.updates"
+ - "'inspect tftp' in result.updates"
+
+- name: change sub level command order and config with strict match
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - inspect tftp
+ - inspect ftp
+ parents:
+ - policy-map p1
+ - class c1
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+ - "'inspect ftp' in result.updates"
+ - "'inspect tftp' in result.updates"
+
+- name: Config sub level command with strict match (Idempotency)
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - inspect ftp
+ - inspect tftp
+ parents:
+ - policy-map p1
+ - class c1
+ match: strict
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.asa.asa_config:
+ lines:
+ - no policy-map p1
+ - no class-map c1
+ match: strict
+
+- debug: msg="END cli/sublevel_strict_mul_parents.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel.yaml
new file mode 100644
index 00000000..62e0b47d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel.yaml
@@ -0,0 +1,35 @@
+---
+- debug: msg="START cli/toplevel.yaml"
+
+- name: setup
+ cisco.asa.asa_config:
+ lines:
+ - hostname firewall
+
+- name: configure top level command
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - hostname foo
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+
+- name: configure top level command idempotent check
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - hostname foo
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.asa.asa_config:
+ lines:
+ - hostname {{ inventory_hostname_short }}
+
+- debug: msg="END cli/toplevel.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel_after.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel_after.yaml
new file mode 100644
index 00000000..0ea5bf5e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel_after.yaml
@@ -0,0 +1,42 @@
+---
+- debug: msg="START cli/toplevel_after.yaml"
+
+- name: setup
+ cisco.asa.asa_config:
+ lines:
+ - snmp-server contact ansible
+ - hostname firewall
+
+- name: configure top level command with before
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - hostname foo
+ after:
+ - snmp-server contact bar
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+ - "'snmp-server contact bar' in result.updates"
+
+- name: configure top level command with before idempotent check
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - hostname foo
+ after:
+ - snmp-server contact foo
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.asa.asa_config:
+ lines:
+ - no snmp-server contact
+ - hostname {{ inventory_hostname_short }}
+
+- debug: msg="END cli/toplevel_after.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel_before.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel_before.yaml
new file mode 100644
index 00000000..37341bff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel_before.yaml
@@ -0,0 +1,42 @@
+---
+- debug: msg="START cli/toplevel_before.yaml"
+
+- name: setup
+ cisco.asa.asa_config:
+ lines:
+ - snmp-server contact ansible
+ - hostname firewall
+
+- name: configure top level command with before
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - hostname foo
+ before:
+ - snmp-server contact bar
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+ - "'snmp-server contact bar' in result.updates"
+
+- name: configure top level command with before idempotent check
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - hostname foo
+ before:
+ - snmp-server contact foo
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.asa.asa_config:
+ lines:
+ - no snmp-server contact
+ - hostname {{ inventory_hostname_short }}
+
+- debug: msg="END cli/toplevel_before.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel_nonidempotent.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel_nonidempotent.yaml
new file mode 100644
index 00000000..88382130
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/cli/toplevel_nonidempotent.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg="START cli/toplevel_nonidempotent.yaml"
+
+- name: setup
+ cisco.asa.asa_config:
+ backup: true
+
+- name: configure top level command
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - hostname foo
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+
+- name: configure top level command idempotent check
+ register: result
+ cisco.asa.asa_config:
+ lines:
+ - hostname foo
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: teardown
+ cisco.asa.asa_config:
+ lines:
+ - hostname {{ inventory_hostname_short }}
+
+- debug: msg="END cli/toplevel_nonidempotent.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/redirection/shortname.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/redirection/shortname.yaml
new file mode 100644
index 00000000..8c2a03e6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_config/tests/redirection/shortname.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg="START redirection/shortname.yaml on connection={{ ansible_connection }}"
+
+- name: Use src with module alias
+ register: result
+ cisco.asa.config:
+ src: basic/config.j2
+
+- assert:
+ that:
+ # make sure that the template content was read and not the path
+ - result.failed == false
+
+- name: use module alias to take configuration backup
+ register: result
+ cisco.asa.config:
+ backup: true
+ backup_options:
+ filename: backup_with_alias.cfg
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup_with_alias.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- debug: msg="END redirection/shortname.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tasks/cli.yaml
new file mode 100644
index 00000000..c8efaa17
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tasks/cli.yaml
@@ -0,0 +1,17 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: connection_network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tasks/main.yaml
new file mode 100644
index 00000000..a3db933e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/all_facts.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/all_facts.yaml
new file mode 100644
index 00000000..f4ce2502
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/all_facts.yaml
@@ -0,0 +1,26 @@
+---
+- debug: msg="START cli/all_facts.yaml on connection={{ ansible_connection }}"
+
+- name: test getting all facts
+ register: result
+ cisco.asa.asa_facts:
+ gather_subset:
+ - all
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'config' in result.ansible_facts.ansible_net_gather_subset"
+ - "'hardware' in result.ansible_facts.ansible_net_gather_subset"
+ - "'default' in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - result.ansible_facts.ansible_net_memfree_mb > 1
+ - result.ansible_facts.ansible_net_memtotal_mb > 1
+
+- assert:
+ that: '{{ item.value.spacetotal_kb }} > {{ item.value.spacefree_kb }}'
+ loop: "{{ lookup('dict', result.ansible_facts.ansible_net_filesystems_info, wantlist=True)\
+ \ }}"
+
+- debug: msg="END cli/all_facts.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/default_facts.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/default_facts.yaml
new file mode 100644
index 00000000..cd2e01dc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/default_facts.yaml
@@ -0,0 +1,25 @@
+---
+- debug: msg="START cli/default_facts.yaml on connection={{ ansible_connection }}"
+
+- name: test getting default facts
+ register: result
+ cisco.asa.asa_facts:
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'hardware' in result.ansible_facts.ansible_net_gather_subset"
+ - "'default' in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - "'config' not in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - result.ansible_facts.ansible_net_memtotal_mb > 10
+ - result.ansible_facts.ansible_net_config is not defined
+
+- assert:
+ that: '{{ item.value.spacetotal_kb }} > {{ item.value.spacefree_kb }}'
+ loop: "{{ lookup('dict', result.ansible_facts.ansible_net_filesystems_info, wantlist=True)\
+ \ }}"
+
+- debug: msg="END cli/default.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/invalid_subset.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/invalid_subset.yaml
new file mode 100644
index 00000000..45371923
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/invalid_subset.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg="START cli/invalid_subset.yaml on connection={{ ansible_connection
+ }}"
+
+- name: test invalid subset (foobar)
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_facts:
+ gather_subset:
+ - foobar
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.failed == true
+ - result.msg == 'Subset must be one of [config, default, hardware],
+ got foobar'
+
+- name: test subset specified multiple times
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_facts:
+ gather_subset:
+ - '!hardware'
+ - hardware
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.failed == true
+ - result.msg == 'Bad subset'
+ ignore_errors: true
+
+- debug: msg="END cli/invalid_subset.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/not_hardware.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/not_hardware.yaml
new file mode 100644
index 00000000..c21fc46c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_facts/tests/cli/not_hardware.yaml
@@ -0,0 +1,22 @@
+---
+- debug: msg="START cli/not_hardware_facts.yaml on connection={{ ansible_connection
+ }}"
+
+- name: test not hardware
+ register: result
+ cisco.asa.asa_facts:
+ gather_subset:
+ - '!hardware'
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'config' in result.ansible_facts.ansible_net_gather_subset"
+ - "'default' in result.ansible_facts.ansible_net_gather_subset"
+ - "'hardware' not in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is not defined
+ - result.ansible_facts.ansible_net_filesystems_info is not defined
+
+- debug: msg="END cli/not_hardware_facts.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/tasks/cli.yaml
new file mode 100644
index 00000000..a0421f54
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/tasks/cli.yaml
@@ -0,0 +1,19 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: connection_network_cli \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/tasks/main.yaml
new file mode 100644
index 00000000..a3db933e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/tests/cli/asa_og.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/tests/cli/asa_og.yaml
new file mode 100644
index 00000000..1399b0e2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_og/tests/cli/asa_og.yaml
@@ -0,0 +1,516 @@
+---
+- name: remove test config if any
+ ignore_errors: true
+ cisco.asa.asa_config:
+ lines:
+ - no object-group network ansible_test_0
+ - no object-group network ansible_test_1
+ - no object-group network ansible_test_2
+ - no object-group service ansible_test_3 tcp-udp
+ - no object-group service ansible_test_4
+ - no object-group service ansible_test_5
+
+- block:
+
+ - set_fact:
+ name: ansible_test_0
+ host_ip:
+ - 8.8.8.8
+ - 8.8.4.4
+ address:
+ - 10.0.0.0 255.0.0.0
+ - 192.168.0.0 255.255.0.0
+ - 172.16.0.0 255.255.0.0
+ description: th1s_IS-a_D3scrIPt10n_3xaMple-
+
+ - name: STAGE 0
+ register: result
+ cisco.asa.asa_og: &id001
+ name: '{{ name }}'
+ group_type: network-object
+ state: present
+ host_ip: '{{ host_ip }}'
+ ip_mask: '{{ address }}'
+ description: '{{ description }}'
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - set_fact:
+ name: ansible_test_0
+ host_ip:
+ - 8.8.9.9
+ address:
+ - 8.8.8.0 255.255.255.0
+
+ - name: STAGE 1
+ register: result
+ cisco.asa.asa_og: &id003
+ name: '{{ name }}'
+ group_type: network-object
+ state: present
+ host_ip: '{{ host_ip }}'
+ ip_mask: '{{ address }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id003
+
+ - assert: *id004
+
+ - name: STAGE 1/B
+ register: result
+ cisco.asa.asa_og:
+ name: '{{ name }}'
+ group_type: network-object
+ state: present
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_1
+ host_ip:
+ - 8.8.9.9
+ address:
+ - 8.8.8.0 255.255.255.0
+
+ - name: STAGE 2
+ register: result
+ cisco.asa.asa_og: &id005
+ name: '{{ name }}'
+ group_type: network-object
+ state: present
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id005
+
+ - assert: *id004
+
+ - name: STAGE 2b
+ register: result
+ cisco.asa.asa_og: &id006
+ name: '{{ name }}'
+ group_type: network-object
+ state: present
+ host_ip: '{{ host_ip }}'
+ ip_mask: '{{ address }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id006
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_0
+ host_ip:
+ - 8.8.8.8
+ - 8.8.4.4
+ address:
+ - 10.0.0.0 255.0.0.0
+ - 192.168.0.0 255.255.0.0
+ - 172.16.0.0 255.255.0.0
+ description: th1s_IS-a_D3scrIPt10n_3xaMple-
+
+ - name: STAGE 3
+ register: result
+ cisco.asa.asa_og: &id007
+ name: '{{ name }}'
+ group_type: network-object
+ state: absent
+ host_ip: '{{ host_ip }}'
+ ip_mask: '{{ address }}'
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id007
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_2
+ host_ip:
+ - 8.8.8.8
+ - 8.8.4.4
+ address:
+ - 10.0.0.0 255.0.0.0
+ - 192.168.0.0 255.255.0.0
+ - 172.16.0.0 255.255.0.0
+ description: th1s_IS-a_D3scrIPt10n_3xaMple-
+
+ - name: STAGE 4
+ register: result
+ cisco.asa.asa_og: &id008
+ name: '{{ name }}'
+ group_type: network-object
+ state: replace
+ host_ip: '{{ host_ip }}'
+ ip_mask: '{{ address }}'
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id008
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_2
+ host_ip:
+ - 8.8.8.8
+ address:
+ - 10.0.0.0 255.0.0.0
+ - 1.0.0.0 255.255.0.0
+ description: th1s_IS-a_D3scrIPt10n_3xaMple-
+
+ - name: STAGE 5
+ register: result
+ cisco.asa.asa_og: &id009
+ name: '{{ name }}'
+ group_type: network-object
+ state: replace
+ host_ip: '{{ host_ip }}'
+ ip_mask: '{{ address }}'
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id009
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_2
+ host_ip:
+ - 9.9.9.9
+ - 8.8.8.8
+ description: th1s_IS-a_D3scrIPt10n_3xaMple-
+
+ - name: STAGE 6
+ register: result
+ cisco.asa.asa_og: &id010
+ name: '{{ name }}'
+ group_type: network-object
+ state: replace
+ host_ip: '{{ host_ip }}'
+ ip_mask: '{{ address }}'
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id010
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_3
+ port_eq:
+ - www
+ - '1024'
+ description: th1s_IS-a_D3scrIPt10n_3xaMple-
+ port_range:
+ - 1024 10024
+
+ - name: STAGE 7
+ register: result
+ cisco.asa.asa_og: &id011
+ name: '{{ name }}'
+ protocol: tcp-udp
+ port_eq: '{{ port_eq }}'
+ port_range: '{{ port_range }}'
+ group_type: port-object
+ state: present
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id011
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_3
+ port_eq:
+ - talk
+ - '65535'
+ description: th1s_IS-a_D3scrIPt10n_3xaMple-
+ port_range:
+ - 1 100
+
+ - name: STAGE 8
+ register: result
+ cisco.asa.asa_og: &id012
+ name: '{{ name }}'
+ protocol: tcp-udp
+ port_eq: '{{ port_eq }}'
+ port_range: '{{ port_range }}'
+ group_type: port-object
+ state: present
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id012
+
+ - assert: *id004
+
+ - name: STAGE 9
+ register: result
+ cisco.asa.asa_og: &id013
+ name: '{{ name }}'
+ protocol: tcp-udp
+ port_eq: '{{ port_eq }}'
+ port_range: '{{ port_range }}'
+ group_type: port-object
+ state: absent
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id013
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_3
+ port_eq:
+ - talk
+ - '65535'
+ description: th1s_IS-a_D3scrIPt10n_3xaMple-
+ port_range:
+ - 1 100
+
+ - name: STAGE 10
+ register: result
+ cisco.asa.asa_og: &id014
+ name: '{{ name }}'
+ protocol: tcp-udp
+ port_eq: '{{ port_eq }}'
+ port_range: '{{ port_range }}'
+ group_type: port-object
+ state: replace
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id014
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_3
+ port_eq:
+ - talk
+ - www
+ - kerberos
+ description: th1s_ISWhatitIS
+ port_range:
+ - 1024 1234
+
+ - name: STAGE 11
+ register: result
+ cisco.asa.asa_og: &id015
+ name: '{{ name }}'
+ protocol: tcp-udp
+ port_eq: '{{ port_eq }}'
+ port_range: '{{ port_range }}'
+ group_type: port-object
+ state: replace
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id015
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_4
+ service_cfg:
+ - tcp destination eq 8080
+ - tcp destination eq www
+ description: th1s_ISWhatitIS
+
+ - name: STAGE 12
+ register: result
+ cisco.asa.asa_og: &id016
+ name: '{{ name }}'
+ service_cfg: '{{ service_cfg }}'
+ group_type: service-object
+ state: present
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id016
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_4
+ service_cfg:
+ - tcp destination range 1234 5678
+ - tcp destination range 5678 6789
+ description: th1s_ISWhatitIS
+
+ - name: STAGE 13
+ register: result
+ cisco.asa.asa_og: &id017
+ name: '{{ name }}'
+ service_cfg: '{{ service_cfg }}'
+ group_type: service-object
+ state: present
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id017
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_4
+ service_cfg:
+ - tcp destination range 1234 5678
+ - tcp destination range 5678 6789
+ description: th1s_ISWhatitIS
+
+ - name: STAGE 14
+ register: result
+ cisco.asa.asa_og: &id018
+ name: '{{ name }}'
+ service_cfg: '{{ service_cfg }}'
+ group_type: service-object
+ state: absent
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id018
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_5
+ service_cfg:
+ - tcp destination range 1234 5678
+ - tcp destination range 5678 6789
+ description: th1s_ISWhatitIS
+
+ - name: STAGE 15
+ register: result
+ cisco.asa.asa_og: &id019
+ name: '{{ name }}'
+ service_cfg: '{{ service_cfg }}'
+ group_type: service-object
+ state: replace
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id019
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_5
+ service_cfg:
+ - tcp destination range 1234 5678
+ - tcp destination range 5678 6789
+ - tcp destination eq www
+ description: th1s_ISWhatitIS
+
+ - name: STAGE 16
+ register: result
+ cisco.asa.asa_og: &id020
+ name: '{{ name }}'
+ service_cfg: '{{ service_cfg }}'
+ group_type: service-object
+ state: replace
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id020
+
+ - assert: *id004
+
+ - set_fact:
+ name: ansible_test_5
+ service_cfg:
+ - tcp destination eq 8080
+ description: th1s_ISWhatitIS
+
+ - name: STAGE 17
+ register: result
+ cisco.asa.asa_og: &id021
+ name: '{{ name }}'
+ service_cfg: '{{ service_cfg }}'
+ group_type: service-object
+ state: replace
+ description: '{{ description }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.asa.asa_og: *id021
+
+ - assert: *id004
+
+ always:
+ - name: remove test config if any
+ ignore_errors: true
+ cisco.asa.asa_config:
+ lines:
+ - no object-group network ansible_test_0
+ - no object-group network ansible_test_1
+ - no object-group network ansible_test_2
+ - no object-group service ansible_test_3 tcp-udp
+ - no object-group service ansible_test_4
+ - no object-group service ansible_test_5
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tasks/cli.yaml
new file mode 100644
index 00000000..4a37ae1f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tasks/cli.yaml
@@ -0,0 +1,21 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: connection_network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tasks/main.yaml
new file mode 100644
index 00000000..a3db933e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..ead97272
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/_parsed.cfg
@@ -0,0 +1,8 @@
+object-group network test_og_network
+ description test_og_network
+ network-object host 192.0.2.1
+ network-object 192.0.2.0 255.255.255.0
+object-group network test_network_og
+ network-object 2001:db8:3::/64
+object-group service test_og_service
+ service-object tcp-udp \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..ec02e549
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/_populate_config.yaml
@@ -0,0 +1,45 @@
+---
+- name: Populate Config
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network
+ network_object:
+ host:
+ - 192.0.2.1
+ - 192.0.2.2
+ address:
+ - 192.0.2.0 255.255.255.0
+ - 198.51.100.0 255.255.255.0
+ - name: test_network_og
+ description: test_network_og
+ network_object:
+ host:
+ - 192.0.3.1
+ - 192.0.3.2
+ ipv6_address:
+ - 2001:db8:3::/64
+ - object_type: security
+ object_groups:
+ - name: test_og_security
+ description: test_security
+ security_group:
+ sec_name:
+ - test_1
+ - test_2
+ tag:
+ - 10
+ - 20
+ - object_type: user
+ object_groups:
+ - name: test_og_user
+ description: test_user
+ user_object:
+ user:
+ - name: new_user_1
+ domain: LOCAL
+ - name: new_user_2
+ domain: LOCAL
+ state: merged
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..53a5bb95
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/_remove_config.yaml
@@ -0,0 +1,4 @@
+---
+- name: Remove Config
+ cisco.asa.asa_ogs:
+ state: deleted
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/deleted.yaml
new file mode 100644
index 00000000..921ea76c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/deleted.yaml
@@ -0,0 +1,61 @@
+---
+- debug:
+ msg: Start asa_ogs deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete given module attributes
+ register: result
+ cisco.asa.asa_ogs: &id001
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ - object_type: security
+ object_groups:
+ - name: test_og_security
+ state: deleted
+
+ - assert:
+ that:
+ - result.commands|length == 2
+ - result.changed == true
+ - result.commands|symmetric_difference(deleted.commands) == []
+
+ - name: Delete given module attributes (IDEMPOTENT)
+ register: result
+ cisco.asa.asa_ogs: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete ALL configured module attributes
+ register: result
+ cisco.asa.asa_ogs:
+ state: deleted
+
+ - assert:
+ that:
+ - result.commands|length == 4
+ - result.changed == true
+ - result.commands|symmetric_difference(delete_all.commands) == []
+
+ - name: Delete ALL configured module attributes (IDEMPOTENT)
+ register: result
+ cisco.asa.asa_ogs:
+ state: deleted
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..3b0deb5c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START asa_ogs empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_ogs:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_ogs:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_ogs:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_ogs:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.asa.asa_ogs:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/gathered.yaml
new file mode 100644
index 00000000..21f404c3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/gathered.yaml
@@ -0,0 +1,63 @@
+---
+- debug:
+ msg: START asa_ogs gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Populate Config for Gather facts
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network
+ network_object:
+ host:
+ - 192.0.2.1
+ address:
+ - 192.0.2.0 255.255.255.0
+ - name: test_network_og
+ description: test_network_og
+ network_object:
+ host:
+ - 192.0.3.1
+ ipv6_address:
+ - 2001:db8:3::/64
+ - object_type: security
+ object_groups:
+ - name: test_og_security
+ description: test_security
+ security_group:
+ sec_name:
+ - test_1
+ tag:
+ - 10
+ - object_type: user
+ object_groups:
+ - name: test_og_user
+ description: test_user
+ user_object:
+ user:
+ - name: new_user_1
+ domain: LOCAL
+ - name: new_user_2
+ domain: LOCAL
+ state: merged
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.asa.asa_ogs:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - gathered['config'] | symmetric_difference(result.gathered) == []
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/merged.yaml
new file mode 100644
index 00000000..aac3b3ff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/merged.yaml
@@ -0,0 +1,73 @@
+---
+- debug:
+ msg: Start asa_ogs merged integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.asa.asa_ogs: &id001
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network
+ network_object:
+ host:
+ - 192.0.2.1
+ - 192.0.2.2
+ address:
+ - 192.0.2.0 255.255.255.0
+ - 198.51.100.0 255.255.255.0
+ - name: test_network_og
+ description: test_network_og
+ network_object:
+ host:
+ - 192.0.3.1
+ - 192.0.3.2
+ ipv6_address:
+ - 2001:db8:3::/64
+ - object_type: security
+ object_groups:
+ - name: test_og_security
+ description: test_security
+ security_group:
+ sec_name:
+ - test_1
+ - test_2
+ tag:
+ - 10
+ - 20
+ - object_type: user
+ object_groups:
+ - name: test_og_user
+ description: test_user
+ user_object:
+ user:
+ - name: new_user_1
+ domain: LOCAL
+ - name: new_user_2
+ domain: LOCAL
+ state: merged
+
+ - assert:
+ that:
+ - result.commands|length == 21
+ - result.changed == true
+ - result.commands|symmetric_difference(merged.commands) == []
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.asa.asa_ogs: *id001
+
+ - assert:
+ that:
+ - result.commands|length == 0
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/overridden.yaml
new file mode 100644
index 00000000..d153a9ae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/overridden.yaml
@@ -0,0 +1,52 @@
+---
+- debug:
+ msg: Start asa_ogs overridden integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Overridden module attributes of given object-group
+ become: true
+ register: result
+ cisco.asa.asa_ogs: &id001
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network_override
+ network_object:
+ host:
+ - 192.0.3.1
+ address:
+ - 192.0.3.0 255.255.255.0
+ - object_type: protocol
+ object_groups:
+ - name: test_og_protocol
+ description: test_og_protocol
+ protocol_object:
+ protocol:
+ - tcp
+ - udp
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 15
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Overridden module attributes of given object-group (IDEMPOTENT)
+ become: true
+ register: result
+ cisco.asa.asa_ogs: *id001
+
+ - assert:
+ that:
+ - result.commands|length == 0
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/parsed.yaml
new file mode 100644
index 00000000..638a9ed4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START asa_ogs parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.asa.asa_ogs:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+- assert:
+ that:
+ - result.changed == false
+ - parsed['config']|symmetric_difference(result.parsed) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/rendered.yaml
new file mode 100644
index 00000000..d7098b76
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/rendered.yaml
@@ -0,0 +1,58 @@
+---
+- debug:
+ msg: Start asa_ogs rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+
+ - name: Render the commands for provided configuration
+ become: true
+ register: result
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network
+ network_object:
+ host:
+ - 192.0.2.1
+ - 192.0.2.2
+ address:
+ - 192.0.2.0 255.255.255.0
+ - 198.51.100.0 255.255.255.0
+ - name: test_network_og
+ description: test_network_og
+ network_object:
+ host:
+ - 192.0.3.1
+ - 192.0.3.2
+ ipv6_address:
+ - 2001:db8:3::/64
+ - object_type: security
+ object_groups:
+ - name: test_og_security
+ description: test_security
+ security_group:
+ sec_name:
+ - test_1
+ - test_2
+ tag:
+ - 10
+ - 20
+ - object_type: user
+ object_groups:
+ - name: test_og_user
+ description: test_user
+ user_object:
+ user:
+ - name: new_user_1
+ domain: LOCAL
+ - name: new_user_2
+ domain: LOCAL
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/replaced.yaml
new file mode 100644
index 00000000..990f12c9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/replaced.yaml
@@ -0,0 +1,52 @@
+---
+- debug:
+ msg: Start asa_ogs replced integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replace module attributes of given object-group
+ become: true
+ register: result
+ cisco.asa.asa_ogs: &id001
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network_replace
+ network_object:
+ host:
+ - 192.0.3.1
+ address:
+ - 192.0.3.0 255.255.255.0
+ - object_type: protocol
+ object_groups:
+ - name: test_og_protocol
+ description: test_og_protocol
+ protocol_object:
+ protocol:
+ - tcp
+ - udp
+ state: replaced
+
+ - assert:
+ that:
+ - result.commands|length == 12
+ - result.changed == true
+ - result.commands|symmetric_difference(replaced.commands) == []
+
+ - name: Replace module attributes of given object-group (IDEMPOTENT)
+ become: true
+ register: result
+ cisco.asa.asa_ogs: *id001
+
+ - assert:
+ that:
+ - result.commands|length == 0
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/rtt.yaml
new file mode 100644
index 00000000..7733ae0f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/tests/cli/rtt.yaml
@@ -0,0 +1,106 @@
+---
+- debug:
+ msg: START asa_ogs round trip integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network
+ network_object:
+ host:
+ - 192.0.2.1
+ - 192.0.2.2
+ address:
+ - 192.0.2.0 255.255.255.0
+ - 198.51.100.0 255.255.255.0
+ - name: test_network_og
+ description: test_network_og
+ network_object:
+ host:
+ - 192.0.3.1
+ - 192.0.3.2
+ ipv6_address:
+ - 2001:db8:3::/64
+ - object_type: security
+ object_groups:
+ - name: test_og_security
+ description: test_security
+ security_group:
+ sec_name:
+ - test_1
+ - test_2
+ tag:
+ - 10
+ - 20
+ - object_type: user
+ object_groups:
+ - name: test_og_user
+ description: test_user
+ user_object:
+ user:
+ - name: new_user_1
+ domain: LOCAL
+ - name: new_user_2
+ domain: LOCAL
+ state: merged
+
+ - name: Gather Object group facts
+ cisco.asa.asa_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - ogs
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.asa.asa_ogs:
+ config:
+ - object_type: network
+ object_groups:
+ - name: test_og_network
+ description: test_og_network_override
+ network_object:
+ host:
+ - 192.0.3.1
+ address:
+ - 192.0.3.0 255.255.255.0
+ - object_type: protocol
+ object_groups:
+ - name: test_og_protocol
+ description: test_og_protocol
+ protocol_object:
+ protocol:
+ - tcp
+ - udp
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 15
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.asa.asa_ogs:
+ config: "{{ ansible_facts['network_resources']['ogs'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 24
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/vars/main.yaml
new file mode 100644
index 00000000..0249da18
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/integration/targets/asa_ogs/vars/main.yaml
@@ -0,0 +1,149 @@
+---
+deleted:
+ commands:
+ - no object-group network test_og_network
+ - no object-group security test_og_security
+delete_all:
+ commands:
+ - no object-group network test_og_network
+ - no object-group network test_network_og
+ - no object-group security test_og_security
+ - no object-group user test_og_user
+merged:
+ commands:
+ - object-group security test_og_security
+ - description test_security
+ - security-group name test_1
+ - security-group name test_2
+ - security-group tag 10
+ - security-group tag 20
+ - object-group network test_og_network
+ - description test_og_network
+ - network-object 192.0.2.0 255.255.255.0
+ - network-object 198.51.100.0 255.255.255.0
+ - network-object host 192.0.2.1
+ - network-object host 192.0.2.2
+ - object-group network test_network_og
+ - description test_network_og
+ - network-object host 192.0.3.1
+ - network-object host 192.0.3.2
+ - network-object 2001:db8:3::/64
+ - object-group user test_og_user
+ - description test_user
+ - user LOCAL\new_user_1
+ - user LOCAL\new_user_2
+replaced:
+ commands:
+ - object-group protocol test_og_protocol
+ - description test_og_protocol
+ - protocol tcp
+ - protocol udp
+ - object-group network test_og_network
+ - description test_og_network_replace
+ - no network-object 192.0.2.0 255.255.255.0
+ - no network-object 198.51.100.0 255.255.255.0
+ - network-object 192.0.3.0 255.255.255.0
+ - no network-object host 192.0.2.1
+ - no network-object host 192.0.2.2
+ - network-object host 192.0.3.1
+overridden:
+ commands:
+ - no object-group security test_og_security
+ - no object-group user test_og_user
+ - object-group protocol test_og_protocol
+ - description test_og_protocol
+ - protocol tcp
+ - protocol udp
+ - object-group network test_og_network
+ - description test_og_network_override
+ - no network-object 192.0.2.0 255.255.255.0
+ - no network-object 198.51.100.0 255.255.255.0
+ - network-object 192.0.3.0 255.255.255.0
+ - no network-object host 192.0.2.1
+ - no network-object host 192.0.2.2
+ - network-object host 192.0.3.1
+ - no object-group network test_network_og
+gathered:
+ config:
+ - object_groups:
+ - description: test_network_og
+ name: test_network_og
+ network_object:
+ host:
+ - 192.0.3.1
+ ipv6_address:
+ - 2001:db8:3::/64
+ - description: test_og_network
+ name: test_og_network
+ network_object:
+ address:
+ - 192.0.2.0 255.255.255.0
+ host:
+ - 192.0.2.1
+ object_type: network
+ - object_groups:
+ - description: test_security
+ name: test_og_security
+ security_group:
+ sec_name:
+ - test_1
+ tag:
+ - "10"
+ object_type: security
+ - object_groups:
+ - description: test_user
+ name: test_og_user
+ user_object:
+ user:
+ - domain: LOCAL
+ name: new_user_1
+ - domain: LOCAL
+ name: new_user_2
+ object_type: user
+parsed:
+ config:
+ - object_groups:
+ - name: test_network_og
+ network_object:
+ ipv6_address:
+ - 2001:db8:3::/64
+ - description: test_og_network
+ name: test_og_network
+ network_object:
+ address:
+ - 192.0.2.0 255.255.255.0
+ host:
+ - 192.0.2.1
+ object_type: network
+ - object_groups:
+ - name: test_og_service
+ service_object:
+ protocol:
+ - tcp-udp
+ object_type: service
+rtt:
+ commands:
+ - no object-group protocol test_og_protocol
+ - object-group security test_og_security
+ - description test_security
+ - security-group name test_2
+ - security-group name test_1
+ - security-group tag 10
+ - security-group tag 20
+ - object-group network test_og_network
+ - description test_og_network
+ - no network-object 192.0.3.0 255.255.255.0
+ - network-object 192.0.2.0 255.255.255.0
+ - network-object 198.51.100.0 255.255.255.0
+ - no network-object host 192.0.3.1
+ - network-object host 192.0.2.1
+ - network-object host 192.0.2.2
+ - object-group network test_network_og
+ - description test_network_og
+ - network-object host 192.0.3.1
+ - network-object host 192.0.3.2
+ - network-object 2001:db8:3::/64
+ - object-group user test_og_user
+ - description test_user
+ - user LOCAL\new_user_1
+ - user LOCAL\new_user_2
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/sanity/ignore-2.10.txt b/collections-debian-merged/ansible_collections/cisco/asa/tests/sanity/ignore-2.10.txt
new file mode 100644
index 00000000..3d2a4f58
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/sanity/ignore-2.10.txt
@@ -0,0 +1 @@
+plugins/action/asa.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/sanity/ignore-2.9.txt b/collections-debian-merged/ansible_collections/cisco/asa/tests/sanity/ignore-2.9.txt
new file mode 100644
index 00000000..f7c35cc1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/sanity/ignore-2.9.txt
@@ -0,0 +1,5 @@
+plugins/modules/asa_acl.py validate-modules:deprecation-mismatch
+plugins/modules/asa_acl.py validate-modules:invalid-documentation
+plugins/modules/asa_og.py validate-modules:deprecation-mismatch
+plugins/modules/asa_og.py validate-modules:invalid-documentation
+plugins/action/asa.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/sanity/requirements.txt b/collections-debian-merged/ansible_collections/cisco/asa/tests/sanity/requirements.txt
new file mode 100644
index 00000000..3e3a9669
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/sanity/requirements.txt
@@ -0,0 +1,4 @@
+packaging # needed for update-bundled and changelog
+sphinx ; python_version >= '3.5' # docs build requires python 3+
+sphinx-notfound-page ; python_version >= '3.5' # docs build requires python 3+
+straight.plugin ; python_version >= '3.5' # needed for hacking/build-ansible.py which will host changelog generation and requires python 3+
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/builtins.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/builtins.py
new file mode 100644
index 00000000..bfc8adfb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/builtins.py
@@ -0,0 +1,34 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+#
+# Compat for python2.7
+#
+
+# One unittest needs to import builtins via __import__() so we need to have
+# the string that represents it
+try:
+ import __builtin__
+except ImportError:
+ BUILTINS = "builtins"
+else:
+ BUILTINS = "__builtin__"
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/mock.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/mock.py
new file mode 100644
index 00000000..2ea98a17
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/mock.py
@@ -0,0 +1,128 @@
+# pylint: skip-file
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+Compat module for Python3.x's unittest.mock module
+"""
+import sys
+
+# Python 2.7
+
+# Note: Could use the pypi mock library on python3.x as well as python2.x. It
+# is the same as the python3 stdlib mock library
+
+try:
+ # Allow wildcard import because we really do want to import all of mock's
+ # symbols into this compat shim
+ # pylint: disable=wildcard-import,unused-wildcard-import
+ from unittest.mock import *
+except ImportError:
+ # Python 2
+ # pylint: disable=wildcard-import,unused-wildcard-import
+ try:
+ from mock import *
+ except ImportError:
+ print("You need the mock library installed on python2.x to run tests")
+
+
+# Prior to 3.4.4, mock_open cannot handle binary read_data
+if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
+ file_spec = None
+
+ def _iterate_read_data(read_data):
+ # Helper for mock_open:
+ # Retrieve lines from read_data via a generator so that separate calls to
+ # readline, read, and readlines are properly interleaved
+ sep = b"\n" if isinstance(read_data, bytes) else "\n"
+ data_as_list = [l + sep for l in read_data.split(sep)]
+
+ if data_as_list[-1] == sep:
+ # If the last line ended in a newline, the list comprehension will have an
+ # extra entry that's just a newline. Remove this.
+ data_as_list = data_as_list[:-1]
+ else:
+ # If there wasn't an extra newline by itself, then the file being
+ # emulated doesn't have a newline to end the last line remove the
+ # newline that our naive format() added
+ data_as_list[-1] = data_as_list[-1][:-1]
+
+ for line in data_as_list:
+ yield line
+
+ def mock_open(mock=None, read_data=""):
+ """
+ A helper function to create a mock to replace the use of `open`. It works
+ for `open` called directly or used as a context manager.
+
+ The `mock` argument is the mock object to configure. If `None` (the
+ default) then a `MagicMock` will be created for you, with the API limited
+ to methods or attributes available on standard file handles.
+
+ `read_data` is a string for the `read` methoddline`, and `readlines` of the
+ file handle to return. This is an empty string by default.
+ """
+
+ def _readlines_side_effect(*args, **kwargs):
+ if handle.readlines.return_value is not None:
+ return handle.readlines.return_value
+ return list(_data)
+
+ def _read_side_effect(*args, **kwargs):
+ if handle.read.return_value is not None:
+ return handle.read.return_value
+ return type(read_data)().join(_data)
+
+ def _readline_side_effect():
+ if handle.readline.return_value is not None:
+ while True:
+ yield handle.readline.return_value
+ for line in _data:
+ yield line
+
+ global file_spec
+ if file_spec is None:
+ import _io
+
+ file_spec = list(
+ set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO)))
+ )
+
+ if mock is None:
+ mock = MagicMock(name="open", spec=open)
+
+ handle = MagicMock(spec=file_spec)
+ handle.__enter__.return_value = handle
+
+ _data = _iterate_read_data(read_data)
+
+ handle.write.return_value = None
+ handle.read.return_value = None
+ handle.readline.return_value = None
+ handle.readlines.return_value = None
+
+ handle.read.side_effect = _read_side_effect
+ handle.readline.side_effect = _readline_side_effect()
+ handle.readlines.side_effect = _readlines_side_effect
+
+ mock.return_value = handle
+ return mock
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/unittest.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/unittest.py
new file mode 100644
index 00000000..df3379b8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/compat/unittest.py
@@ -0,0 +1,39 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+Compat module for Python2.7's unittest module
+"""
+
+import sys
+
+# Allow wildcard import because we really do want to import all of
+# unittests's symbols into this compat shim
+# pylint: disable=wildcard-import,unused-wildcard-import
+if sys.version_info < (2, 7):
+ try:
+ # Need unittest2 on python2.6
+ from unittest2 import *
+ except ImportError:
+ print("You need unittest2 installed on python2.6.x to run tests")
+else:
+ from unittest import *
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/loader.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/loader.py
new file mode 100644
index 00000000..c21188ee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/loader.py
@@ -0,0 +1,116 @@
+# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import os
+
+from ansible.errors import AnsibleParserError
+from ansible.parsing.dataloader import DataLoader
+from ansible.module_utils._text import to_bytes, to_text
+
+
+class DictDataLoader(DataLoader):
+ def __init__(self, file_mapping=None):
+ file_mapping = {} if file_mapping is None else file_mapping
+ assert type(file_mapping) == dict
+
+ super(DictDataLoader, self).__init__()
+
+ self._file_mapping = file_mapping
+ self._build_known_directories()
+ self._vault_secrets = None
+
+ def load_from_file(self, path, cache=True, unsafe=False):
+ path = to_text(path)
+ if path in self._file_mapping:
+ return self.load(self._file_mapping[path], path)
+ return None
+
+ # TODO: the real _get_file_contents returns a bytestring, so we actually convert the
+ # unicode/text it's created with to utf-8
+ def _get_file_contents(self, path):
+ path = to_text(path)
+ if path in self._file_mapping:
+ return (to_bytes(self._file_mapping[path]), False)
+ else:
+ raise AnsibleParserError("file not found: %s" % path)
+
+ def path_exists(self, path):
+ path = to_text(path)
+ return path in self._file_mapping or path in self._known_directories
+
+ def is_file(self, path):
+ path = to_text(path)
+ return path in self._file_mapping
+
+ def is_directory(self, path):
+ path = to_text(path)
+ return path in self._known_directories
+
+ def list_directory(self, path):
+ ret = []
+ path = to_text(path)
+ for x in list(self._file_mapping.keys()) + self._known_directories:
+ if x.startswith(path):
+ if os.path.dirname(x) == path:
+ ret.append(os.path.basename(x))
+ return ret
+
+ def is_executable(self, path):
+ # FIXME: figure out a way to make paths return true for this
+ return False
+
+ def _add_known_directory(self, directory):
+ if directory not in self._known_directories:
+ self._known_directories.append(directory)
+
+ def _build_known_directories(self):
+ self._known_directories = []
+ for path in self._file_mapping:
+ dirname = os.path.dirname(path)
+ while dirname not in ("/", ""):
+ self._add_known_directory(dirname)
+ dirname = os.path.dirname(dirname)
+
+ def push(self, path, content):
+ rebuild_dirs = False
+ if path not in self._file_mapping:
+ rebuild_dirs = True
+
+ self._file_mapping[path] = content
+
+ if rebuild_dirs:
+ self._build_known_directories()
+
+ def pop(self, path):
+ if path in self._file_mapping:
+ del self._file_mapping[path]
+ self._build_known_directories()
+
+ def clear(self):
+ self._file_mapping = dict()
+ self._known_directories = []
+
+ def get_basedir(self):
+ return os.getcwd()
+
+ def set_vault_secrets(self, vault_secrets):
+ self._vault_secrets = vault_secrets
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/path.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/path.py
new file mode 100644
index 00000000..3bd0cdee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/path.py
@@ -0,0 +1,10 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+from ansible_collections.cisco.asa.tests.unit.compat.mock import MagicMock
+from ansible.utils.path import unfrackpath
+
+
+mock_unfrackpath_noop = MagicMock(
+ spec_set=unfrackpath, side_effect=lambda x, *args, **kwargs: x
+)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/procenv.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/procenv.py
new file mode 100644
index 00000000..e02cae04
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/procenv.py
@@ -0,0 +1,94 @@
+# (c) 2016, Matt Davis <mdavis@ansible.com>
+# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import sys
+import json
+
+from contextlib import contextmanager
+from io import BytesIO, StringIO
+from ansible_collections.cisco.asa.tests.unit.compat import unittest
+from ansible.module_utils.six import PY3
+from ansible.module_utils._text import to_bytes
+
+
+@contextmanager
+def swap_stdin_and_argv(stdin_data="", argv_data=tuple()):
+ """
+ context manager that temporarily masks the test runner's values for stdin and argv
+ """
+ real_stdin = sys.stdin
+ real_argv = sys.argv
+
+ if PY3:
+ fake_stream = StringIO(stdin_data)
+ fake_stream.buffer = BytesIO(to_bytes(stdin_data))
+ else:
+ fake_stream = BytesIO(to_bytes(stdin_data))
+
+ try:
+ sys.stdin = fake_stream
+ sys.argv = argv_data
+
+ yield
+ finally:
+ sys.stdin = real_stdin
+ sys.argv = real_argv
+
+
+@contextmanager
+def swap_stdout():
+ """
+ context manager that temporarily replaces stdout for tests that need to verify output
+ """
+ old_stdout = sys.stdout
+
+ if PY3:
+ fake_stream = StringIO()
+ else:
+ fake_stream = BytesIO()
+
+ try:
+ sys.stdout = fake_stream
+
+ yield fake_stream
+ finally:
+ sys.stdout = old_stdout
+
+
+class ModuleTestCase(unittest.TestCase):
+ def setUp(self, module_args=None):
+ if module_args is None:
+ module_args = {
+ "_ansible_remote_tmp": "/tmp",
+ "_ansible_keep_remote_files": False,
+ }
+
+ args = json.dumps(dict(ANSIBLE_MODULE_ARGS=module_args))
+
+ # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
+ self.stdin_swap = swap_stdin_and_argv(stdin_data=args)
+ self.stdin_swap.__enter__()
+
+ def tearDown(self):
+ # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
+ self.stdin_swap.__exit__(None, None, None)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/vault_helper.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/vault_helper.py
new file mode 100644
index 00000000..b34ae134
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/vault_helper.py
@@ -0,0 +1,42 @@
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible.module_utils._text import to_bytes
+
+from ansible.parsing.vault import VaultSecret
+
+
+class TextVaultSecret(VaultSecret):
+ """A secret piece of text. ie, a password. Tracks text encoding.
+
+ The text encoding of the text may not be the default text encoding so
+ we keep track of the encoding so we encode it to the same bytes."""
+
+ def __init__(self, text, encoding=None, errors=None, _bytes=None):
+ super(TextVaultSecret, self).__init__()
+ self.text = text
+ self.encoding = encoding or "utf-8"
+ self._bytes = _bytes
+ self.errors = errors or "strict"
+
+ @property
+ def bytes(self):
+ """The text encoded with encoding, unless we specifically set _bytes."""
+ return self._bytes or to_bytes(
+ self.text, encoding=self.encoding, errors=self.errors
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/yaml_helper.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/yaml_helper.py
new file mode 100644
index 00000000..5df30aae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/mock/yaml_helper.py
@@ -0,0 +1,167 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import io
+import yaml
+
+from ansible.module_utils.six import PY3
+from ansible.parsing.yaml.loader import AnsibleLoader
+from ansible.parsing.yaml.dumper import AnsibleDumper
+
+
+class YamlTestUtils(object):
+ """Mixin class to combine with a unittest.TestCase subclass."""
+
+ def _loader(self, stream):
+ """Vault related tests will want to override this.
+
+ Vault cases should setup a AnsibleLoader that has the vault password."""
+ return AnsibleLoader(stream)
+
+ def _dump_stream(self, obj, stream, dumper=None):
+ """Dump to a py2-unicode or py3-string stream."""
+ if PY3:
+ return yaml.dump(obj, stream, Dumper=dumper)
+ else:
+ return yaml.dump(obj, stream, Dumper=dumper, encoding=None)
+
+ def _dump_string(self, obj, dumper=None):
+ """Dump to a py2-unicode or py3-string"""
+ if PY3:
+ return yaml.dump(obj, Dumper=dumper)
+ else:
+ return yaml.dump(obj, Dumper=dumper, encoding=None)
+
+ def _dump_load_cycle(self, obj):
+ # Each pass though a dump or load revs the 'generation'
+ # obj to yaml string
+ string_from_object_dump = self._dump_string(obj, dumper=AnsibleDumper)
+
+ # wrap a stream/file like StringIO around that yaml
+ stream_from_object_dump = io.StringIO(string_from_object_dump)
+ loader = self._loader(stream_from_object_dump)
+ # load the yaml stream to create a new instance of the object (gen 2)
+ obj_2 = loader.get_data()
+
+ # dump the gen 2 objects directory to strings
+ string_from_object_dump_2 = self._dump_string(
+ obj_2, dumper=AnsibleDumper
+ )
+
+ # The gen 1 and gen 2 yaml strings
+ self.assertEqual(string_from_object_dump, string_from_object_dump_2)
+ # the gen 1 (orig) and gen 2 py object
+ self.assertEqual(obj, obj_2)
+
+ # again! gen 3... load strings into py objects
+ stream_3 = io.StringIO(string_from_object_dump_2)
+ loader_3 = self._loader(stream_3)
+ obj_3 = loader_3.get_data()
+
+ string_from_object_dump_3 = self._dump_string(
+ obj_3, dumper=AnsibleDumper
+ )
+
+ self.assertEqual(obj, obj_3)
+ # should be transitive, but...
+ self.assertEqual(obj_2, obj_3)
+ self.assertEqual(string_from_object_dump, string_from_object_dump_3)
+
+ def _old_dump_load_cycle(self, obj):
+ """Dump the passed in object to yaml, load it back up, dump again, compare."""
+ stream = io.StringIO()
+
+ yaml_string = self._dump_string(obj, dumper=AnsibleDumper)
+ self._dump_stream(obj, stream, dumper=AnsibleDumper)
+
+ yaml_string_from_stream = stream.getvalue()
+
+ # reset stream
+ stream.seek(0)
+
+ loader = self._loader(stream)
+ # loader = AnsibleLoader(stream, vault_password=self.vault_password)
+ obj_from_stream = loader.get_data()
+
+ stream_from_string = io.StringIO(yaml_string)
+ loader2 = self._loader(stream_from_string)
+ # loader2 = AnsibleLoader(stream_from_string, vault_password=self.vault_password)
+ obj_from_string = loader2.get_data()
+
+ stream_obj_from_stream = io.StringIO()
+ stream_obj_from_string = io.StringIO()
+
+ if PY3:
+ yaml.dump(
+ obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper
+ )
+ yaml.dump(
+ obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper
+ )
+ else:
+ yaml.dump(
+ obj_from_stream,
+ stream_obj_from_stream,
+ Dumper=AnsibleDumper,
+ encoding=None,
+ )
+ yaml.dump(
+ obj_from_stream,
+ stream_obj_from_string,
+ Dumper=AnsibleDumper,
+ encoding=None,
+ )
+
+ yaml_string_stream_obj_from_stream = stream_obj_from_stream.getvalue()
+ yaml_string_stream_obj_from_string = stream_obj_from_string.getvalue()
+
+ stream_obj_from_stream.seek(0)
+ stream_obj_from_string.seek(0)
+
+ if PY3:
+ yaml_string_obj_from_stream = yaml.dump(
+ obj_from_stream, Dumper=AnsibleDumper
+ )
+ yaml_string_obj_from_string = yaml.dump(
+ obj_from_string, Dumper=AnsibleDumper
+ )
+ else:
+ yaml_string_obj_from_stream = yaml.dump(
+ obj_from_stream, Dumper=AnsibleDumper, encoding=None
+ )
+ yaml_string_obj_from_string = yaml.dump(
+ obj_from_string, Dumper=AnsibleDumper, encoding=None
+ )
+
+ assert yaml_string == yaml_string_obj_from_stream
+ assert (
+ yaml_string
+ == yaml_string_obj_from_stream
+ == yaml_string_obj_from_string
+ )
+ assert (
+ yaml_string
+ == yaml_string_obj_from_stream
+ == yaml_string_obj_from_string
+ == yaml_string_stream_obj_from_stream
+ == yaml_string_stream_obj_from_string
+ )
+ assert obj == obj_from_stream
+ assert obj == obj_from_string
+ assert obj == yaml_string_obj_from_stream
+ assert obj == yaml_string_obj_from_string
+ assert (
+ obj
+ == obj_from_stream
+ == obj_from_string
+ == yaml_string_obj_from_stream
+ == yaml_string_obj_from_string
+ )
+ return {
+ "obj": obj,
+ "yaml_string": yaml_string,
+ "yaml_string_from_stream": yaml_string_from_stream,
+ "obj_from_stream": obj_from_stream,
+ "obj_from_string": obj_from_string,
+ "yaml_string_obj_from_string": yaml_string_obj_from_string,
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/conftest.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/conftest.py
new file mode 100644
index 00000000..e19a1e04
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/conftest.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2017 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+
+import pytest
+
+from ansible.module_utils.six import string_types
+from ansible.module_utils._text import to_bytes
+from ansible.module_utils.common._collections_compat import MutableMapping
+
+
+@pytest.fixture
+def patch_ansible_module(request, mocker):
+ if isinstance(request.param, string_types):
+ args = request.param
+ elif isinstance(request.param, MutableMapping):
+ if "ANSIBLE_MODULE_ARGS" not in request.param:
+ request.param = {"ANSIBLE_MODULE_ARGS": request.param}
+ if "_ansible_remote_tmp" not in request.param["ANSIBLE_MODULE_ARGS"]:
+ request.param["ANSIBLE_MODULE_ARGS"][
+ "_ansible_remote_tmp"
+ ] = "/tmp"
+ if (
+ "_ansible_keep_remote_files"
+ not in request.param["ANSIBLE_MODULE_ARGS"]
+ ):
+ request.param["ANSIBLE_MODULE_ARGS"][
+ "_ansible_keep_remote_files"
+ ] = False
+ args = json.dumps(request.param)
+ else:
+ raise Exception(
+ "Malformed data to the patch_ansible_module pytest fixture"
+ )
+
+ mocker.patch("ansible.module_utils.basic._ANSIBLE_ARGS", to_bytes(args))
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/asa_module.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/asa_module.py
new file mode 100644
index 00000000..b86ebbb1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/asa_module.py
@@ -0,0 +1,93 @@
+# -*- coding: utf-8 -*-
+
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import os
+import json
+
+from ansible_collections.cisco.asa.tests.unit.modules.utils import (
+ AnsibleExitJson,
+ AnsibleFailJson,
+ ModuleTestCase,
+)
+
+
+fixture_path = os.path.join(os.path.dirname(__file__), "fixtures")
+fixture_data = {}
+
+
+def load_fixture(name):
+ path = os.path.join(fixture_path, name)
+
+ if path in fixture_data:
+ return fixture_data[path]
+
+ with open(path) as f:
+ data = f.read()
+
+ try:
+ data = json.loads(data)
+ except Exception:
+ pass
+
+ fixture_data[path] = data
+ return data
+
+
+class TestAsaModule(ModuleTestCase):
+ def execute_module(
+ self,
+ failed=False,
+ changed=False,
+ commands=None,
+ sort=True,
+ defaults=False,
+ ):
+
+ self.load_fixtures(commands)
+
+ if failed:
+ result = self.failed()
+ self.assertTrue(result["failed"], result)
+ else:
+ result = self.changed(changed)
+ self.assertEqual(result["changed"], changed, result)
+
+ if commands is not None:
+ if sort:
+ self.assertEqual(
+ sorted(commands),
+ sorted(result["commands"]),
+ result["commands"],
+ )
+ else:
+ self.assertEqual(
+ commands, result["commands"], result["commands"]
+ )
+
+ return result
+
+ def failed(self):
+ with self.assertRaises(AnsibleFailJson) as exc:
+ self.module.main()
+
+ result = exc.exception.args[0]
+ self.assertTrue(result["failed"], result)
+ return result
+
+ def changed(self, changed=False):
+ with self.assertRaises(AnsibleExitJson) as exc:
+ self.module.main()
+
+ result = exc.exception.args[0]
+ self.assertEqual(result["changed"], changed, result)
+ return result
+
+ def load_fixtures(self, commands=None):
+ pass
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/__init__.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_acls_config.cfg b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_acls_config.cfg
new file mode 100644
index 00000000..a40a861f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_acls_config.cfg
@@ -0,0 +1,11 @@
+access-list cached ACL log flows: total 0, denied 0 (deny-flow-max 4096)
+ alert-interval 300
+access-list test_global_access; 1 elements; name hash: 0xaa83124c
+access-list test_global_access line 1 extended deny tcp any any eq www log errors interval 300 (hitcnt=0) 0x849e9e8f
+access-list test_global_access line 2 remark test global remark
+access-list test_access; 2 elements; name hash: 0x96b5d78b
+access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default (hitcnt=0) 0xdc46eb6e
+access-list test_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 log errors interval 300 (hitcnt=0) 0x831d8948
+access-list test_access line 3 extended permit ip host 192.0.2.2 any interval 300 (hitcnt=0) 0x831d897d
+access-list test_R1_traffic; 1 elements; name hash: 0x2c20a0c
+access-list test_R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive (hitcnt=0) (inactive) 0x11821a52 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_facts_dir b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_facts_dir
new file mode 100644
index 00000000..cd8caa3f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_facts_dir
@@ -0,0 +1,10 @@
+
+Directory of disk0:/
+
+11 drwx 4096 04:49:48 May 16 2019 smart-log
+7 -rwx 0 05:56:43 Nov 22 2019 use_ttyS0
+8 drwx 4096 04:45:10 May 16 2019 log
+13 drwx 4096 04:49:52 May 16 2019 coredumpinfo
+
+1 file(s) total size: 0 bytes
+8571076608 bytes total (8549351424 bytes free/99% free) \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_facts_show_memory b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_facts_show_memory
new file mode 100644
index 00000000..13bea8cb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_facts_show_memory
@@ -0,0 +1,14 @@
+Free memory: 7176970240 bytes (84%)
+Used memory: 2590688668 bytes (16%)
+------------- ------------------
+Total memory: 8589934592 bytes (100%)
+
+Virtual platform memory
+-----------------------
+Provisioned 8192 MB
+Allowed 4096 MB
+
+Note: Free memory is the free system memory. Additional memory may
+ be available from memory pools internal to the firewall process.
+ Use 'show memory detail' to see this information, but use it
+ with care since it may cause CPU hogs and packet loss under load. \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_facts_show_version b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_facts_show_version
new file mode 100644
index 00000000..d652d7be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_facts_show_version
@@ -0,0 +1,50 @@
+
+Cisco Adaptive Security Appliance Software Version 9.10(1)11
+Firepower Extensible Operating System Version 2.4(1.227)
+Device Manager Version 7.10(1)
+
+Compiled on Thu 21-Feb-19 14:10 PST by builders
+System image file is "boot:/asa9101-11-smp-k8.bin"
+Config file at boot was "startup-config"
+
+ciscoasa up 21 days 7 hours
+
+Hardware: ASAv, 8192 MB RAM, CPU Xeon E5 series 2300 MHz, 1 CPU (2 cores)
+Model Id: ASAv10
+Internal ATA Compact Flash, 10240MB
+Slot 1: ATA Compact Flash, 10240MB
+BIOS Flash Firmware Hub @ 0x0, 0KB
+
+
+ 0: Ext: Management0/0 : address is 02ac.8ef2.59aa, irq 0
+ 1: Ext: GigabitEthernet0/0 : address is 024e.1f85.94da, irq 0
+
+License mode: AWS Licensing
+License state: LICENSED
+
+Licensed features for this platform:
+Maximum VLANs : 50
+Inside Hosts : Unlimited
+Failover : Active/Standby
+Encryption-DES : Enabled
+Encryption-3DES-AES : Enabled
+Security Contexts : 0
+Carrier : Enabled
+AnyConnect Premium Peers : 250
+AnyConnect Essentials : Disabled
+Other VPN Peers : 250
+Total VPN Peers : 250
+AnyConnect for Mobile : Enabled
+AnyConnect for Cisco VPN Phone : Enabled
+Advanced Endpoint Assessment : Enabled
+Shared License : Disabled
+Total TLS Proxy Sessions : 498
+Botnet Traffic Filter : Enabled
+Cluster : Disabled
+
+Serial Number: 9AWFX1S46VQ
+
+Image type : Release
+Key version : A
+
+Configuration last modified by enable_15 at 06:41:15.559 UTC Fri Nov 22 2019 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_og_config.cfg b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_og_config.cfg
new file mode 100644
index 00000000..27f22120
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_og_config.cfg
@@ -0,0 +1,5 @@
+object-group network test_nets
+description ansible_test object-group description
+network-object host 8.8.8.8
+network-object 192.168.0.0 255.255.0.0
+group-object awx_lon
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_ogs_config.cfg b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_ogs_config.cfg
new file mode 100644
index 00000000..6f5025fc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/fixtures/asa_ogs_config.cfg
@@ -0,0 +1,7 @@
+object-group network test_og_network
+ description test_og_network
+ network-object host 192.0.2.1
+ network-object 192.0.2.0 255.255.255.0
+object-group service test_og_service
+ service-object ipinip
+ service-object tcp-udp \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_acls.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_acls.py
new file mode 100644
index 00000000..ef5ea440
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_acls.py
@@ -0,0 +1,568 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import sys
+
+import pytest
+
+# These tests and/or the module under test are unstable on Python 3.5.
+# See: https://app.shippable.com/github/ansible/ansible/runs/161331/15/tests
+# This is most likely due to CPython 3.5 not maintaining dict insertion order.
+pytestmark = pytest.mark.skipif(
+ sys.version_info[:2] == (3, 5),
+ reason="Tests and/or module are unstable on Python 3.5.",
+)
+
+from ansible_collections.cisco.asa.tests.unit.compat.mock import patch
+from ansible_collections.cisco.asa.plugins.modules import asa_acls
+from ansible_collections.cisco.asa.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .asa_module import TestAsaModule, load_fixture
+
+
+class TestAsaAclsModule(TestAsaModule):
+ module = asa_acls
+
+ def setUp(self):
+ super(TestAsaAclsModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.asa.plugins.module_utils.network.asa.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.asa.plugins.module_utils.network.asa.facts.acls.acls."
+ "AclsFacts.get_acls_config"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestAsaAclsModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("asa_acls_config.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_asa_acls_merged(self):
+ set_module_args(
+ dict(
+ config=dict(
+ acls=[
+ dict(
+ aces=[
+ dict(
+ destination=dict(
+ object_group="test_network_og",
+ port_protocol=dict(eq="www"),
+ ),
+ grant="deny",
+ line=2,
+ log="default",
+ protocol="tcp",
+ protocol_options=dict(tcp="true"),
+ source=dict(
+ object_group="test_og_network"
+ ),
+ )
+ ],
+ acl_type="extended",
+ name="test_global_access",
+ )
+ ]
+ ),
+ state="merged",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "access-list test_global_access line 2 extended deny tcp object-group test_og_network object-group test_network_og eq www log default"
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_asa_acls_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ acls=[
+ dict(
+ aces=[
+ dict(
+ destination=dict(
+ any="true",
+ port_protocol=dict(eq="www"),
+ ),
+ grant="deny",
+ line=1,
+ log="errors",
+ protocol="tcp",
+ protocol_options=dict(tcp="true"),
+ source=dict(any="true"),
+ ),
+ dict(line=2, remark="test global remark"),
+ ],
+ acl_type="extended",
+ name="test_global_access",
+ ),
+ dict(
+ aces=[
+ dict(
+ destination=dict(
+ address="192.0.3.0",
+ netmask="255.255.255.0",
+ port_protocol=dict(eq="www"),
+ ),
+ grant="deny",
+ line=1,
+ log="default",
+ protocol="tcp",
+ protocol_options=dict(tcp="true"),
+ source=dict(
+ address="192.0.2.0",
+ netmask="255.255.255.0",
+ ),
+ ),
+ dict(
+ destination=dict(
+ address="198.51.110.0",
+ netmask="255.255.255.0",
+ ),
+ grant="deny",
+ line=2,
+ log="errors",
+ protocol="igrp",
+ protocol_options=dict(igrp="true"),
+ source=dict(
+ address="198.51.100.0",
+ netmask="255.255.255.0",
+ ),
+ ),
+ dict(
+ destination=dict(any="true"),
+ grant="permit",
+ line=3,
+ protocol="ip",
+ protocol_options=dict(ip="true"),
+ source=dict(host="192.0.2.2"),
+ ),
+ ],
+ acl_type="extended",
+ name="test_access",
+ ),
+ dict(
+ aces=[
+ dict(
+ destination=dict(
+ address="2001:fc8:0:4::/64",
+ port_protocol=dict(eq="telnet"),
+ ),
+ grant="deny",
+ inactive="true",
+ line=1,
+ protocol="tcp",
+ protocol_options=dict(tcp="true"),
+ source=dict(
+ address="2001:db8:0:3::/64",
+ port_protocol=dict(eq="www"),
+ ),
+ )
+ ],
+ acl_type="extended",
+ name="test_R1_traffic",
+ ),
+ ]
+ ),
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_asa_acls_replaced(self):
+ set_module_args(
+ dict(
+ config=dict(
+ acls=[
+ dict(
+ name="test_access",
+ acl_type="extended",
+ aces=[
+ dict(
+ destination=dict(
+ address="198.51.102.0",
+ netmask="255.255.255.0",
+ ),
+ grant="deny",
+ line=1,
+ log="default",
+ protocol="igrp",
+ protocol_options=dict(igrp="true"),
+ source=dict(
+ address="198.51.101.0",
+ netmask="255.255.255.0",
+ ),
+ time_range="temp",
+ )
+ ],
+ )
+ ]
+ ),
+ state="replaced",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "no access-list test_access line 3 extended permit ip host 192.0.2.2 any",
+ "no access-list test_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 log errors",
+ "no access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default",
+ "access-list test_access line 1 extended deny igrp 198.51.101.0 255.255.255.0 198.51.102.0 255.255.255.0 log default time-range temp",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_asa_acls_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ acls=[
+ dict(
+ aces=[
+ dict(
+ destination=dict(
+ any="true",
+ port_protocol=dict(eq="www"),
+ ),
+ grant="deny",
+ line=1,
+ log="errors",
+ protocol="tcp",
+ protocol_options=dict(tcp="true"),
+ source=dict(any="true"),
+ ),
+ dict(line=2, remark="test global remark"),
+ ],
+ acl_type="extended",
+ name="test_global_access",
+ ),
+ dict(
+ aces=[
+ dict(
+ destination=dict(
+ address="192.0.3.0",
+ netmask="255.255.255.0",
+ port_protocol=dict(eq="www"),
+ ),
+ grant="deny",
+ line=1,
+ log="default",
+ protocol="tcp",
+ protocol_options=dict(tcp="true"),
+ source=dict(
+ address="192.0.2.0",
+ netmask="255.255.255.0",
+ ),
+ ),
+ dict(
+ destination=dict(
+ address="198.51.110.0",
+ netmask="255.255.255.0",
+ ),
+ grant="deny",
+ line=2,
+ log="errors",
+ protocol="igrp",
+ protocol_options=dict(igrp="true"),
+ source=dict(
+ address="198.51.100.0",
+ netmask="255.255.255.0",
+ ),
+ ),
+ dict(
+ destination=dict(any="true"),
+ grant="permit",
+ line=3,
+ protocol="ip",
+ protocol_options=dict(ip="true"),
+ source=dict(host="192.0.2.2"),
+ ),
+ ],
+ acl_type="extended",
+ name="test_access",
+ ),
+ dict(
+ aces=[
+ dict(
+ destination=dict(
+ address="2001:fc8:0:4::/64",
+ port_protocol=dict(eq="telnet"),
+ ),
+ grant="deny",
+ inactive="true",
+ line=1,
+ protocol="tcp",
+ protocol_options=dict(tcp="true"),
+ source=dict(
+ address="2001:db8:0:3::/64",
+ port_protocol=dict(eq="www"),
+ ),
+ )
+ ],
+ acl_type="extended",
+ name="test_R1_traffic",
+ ),
+ ]
+ ),
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_asa_acls_overridden(self):
+ set_module_args(
+ dict(
+ config=dict(
+ acls=[
+ dict(
+ name="test_global_access",
+ acl_type="extended",
+ aces=[
+ dict(
+ destination=dict(
+ address="198.51.110.0",
+ netmask="255.255.255.0",
+ port_protocol=dict(eq="www"),
+ ),
+ grant="deny",
+ line=1,
+ log="errors",
+ protocol="tcp",
+ protocol_options=dict(tcp="true"),
+ source=dict(
+ address="198.51.100.0",
+ netmask="255.255.255.0",
+ ),
+ )
+ ],
+ )
+ ]
+ ),
+ state="overridden",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "no access-list test_global_access line 2 remark test global remark",
+ "no access-list test_global_access line 1 extended deny tcp any any eq www log errors",
+ "no access-list test_R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive",
+ "no access-list test_access line 3 extended permit ip host 192.0.2.2 any",
+ "no access-list test_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 log errors",
+ "no access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default",
+ "access-list test_global_access line 1 extended deny tcp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 eq www log errors",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_asa_acls_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ acls=[
+ dict(
+ aces=[
+ dict(
+ destination=dict(
+ any="true",
+ port_protocol=dict(eq="www"),
+ ),
+ grant="deny",
+ line=1,
+ log="errors",
+ protocol="tcp",
+ protocol_options=dict(tcp="true"),
+ source=dict(any="true"),
+ ),
+ dict(line=2, remark="test global remark"),
+ ],
+ acl_type="extended",
+ name="test_global_access",
+ ),
+ dict(
+ aces=[
+ dict(
+ destination=dict(
+ address="192.0.3.0",
+ netmask="255.255.255.0",
+ port_protocol=dict(eq="www"),
+ ),
+ grant="deny",
+ line=1,
+ log="default",
+ protocol="tcp",
+ protocol_options=dict(tcp="true"),
+ source=dict(
+ address="192.0.2.0",
+ netmask="255.255.255.0",
+ ),
+ ),
+ dict(
+ destination=dict(
+ address="198.51.110.0",
+ netmask="255.255.255.0",
+ ),
+ grant="deny",
+ line=2,
+ log="errors",
+ protocol="igrp",
+ protocol_options=dict(igrp="true"),
+ source=dict(
+ address="198.51.100.0",
+ netmask="255.255.255.0",
+ ),
+ ),
+ dict(
+ destination=dict(any="true"),
+ grant="permit",
+ line=3,
+ protocol="ip",
+ protocol_options=dict(ip="true"),
+ source=dict(host="192.0.2.2"),
+ ),
+ ],
+ acl_type="extended",
+ name="test_access",
+ ),
+ dict(
+ aces=[
+ dict(
+ destination=dict(
+ address="2001:fc8:0:4::/64",
+ port_protocol=dict(eq="telnet"),
+ ),
+ grant="deny",
+ inactive="true",
+ line=1,
+ protocol="tcp",
+ protocol_options=dict(tcp="true"),
+ source=dict(
+ address="2001:db8:0:3::/64",
+ port_protocol=dict(eq="www"),
+ ),
+ )
+ ],
+ acl_type="extended",
+ name="test_R1_traffic",
+ ),
+ ]
+ ),
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_asa_acls_delete_by_acl(self):
+ set_module_args(
+ dict(
+ config=dict(
+ acls=[
+ dict(name="test_global_access"),
+ dict(name="test_R1_traffic"),
+ ]
+ ),
+ state="deleted",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "no access-list test_R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive",
+ "no access-list test_global_access line 2 remark test global remark",
+ "no access-list test_global_access line 1 extended deny tcp any any eq www log errors",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_asa_acls_deleted_all(self):
+ set_module_args(dict(state="deleted"))
+ result = self.execute_module(changed=True)
+ commands = [
+ "no access-list test_R1_traffic line 1 extended deny tcp 2001:db8:0:3::/64 eq www 2001:fc8:0:4::/64 eq telnet inactive",
+ "no access-list test_access line 3 extended permit ip host 192.0.2.2 any",
+ "no access-list test_access line 2 extended deny igrp 198.51.100.0 255.255.255.0 198.51.110.0 255.255.255.0 log errors",
+ "no access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 eq www log default",
+ "no access-list test_global_access line 2 remark test global remark",
+ "no access-list test_global_access line 1 extended deny tcp any any eq www log errors",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_asa_acls_rendered(self):
+ set_module_args(
+ dict(
+ config=dict(
+ acls=[
+ dict(
+ name="test_access",
+ acl_type="extended",
+ aces=[
+ dict(
+ destination=dict(
+ address="192.0.3.0",
+ netmask="255.255.255.0",
+ ),
+ grant="deny",
+ line=1,
+ log="default",
+ protocol="tcp",
+ protocol_options=dict(tcp="true"),
+ source=dict(
+ address="192.0.2.0",
+ netmask="255.255.255.0",
+ ),
+ )
+ ],
+ )
+ ]
+ ),
+ state="rendered",
+ )
+ )
+ commands = [
+ "access-list test_access line 1 extended deny tcp 192.0.2.0 255.255.255.0 192.0.3.0 255.255.255.0 log default"
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["rendered"], commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_facts.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_facts.py
new file mode 100644
index 00000000..46c3f91c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_facts.py
@@ -0,0 +1,100 @@
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.asa.tests.unit.compat.mock import patch
+from ansible_collections.cisco.asa.plugins.modules import asa_facts
+from ansible_collections.cisco.asa.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .asa_module import TestAsaModule, load_fixture
+
+
+class TestAsaFactsModule(TestAsaModule):
+
+ module = asa_facts
+
+ def setUp(self):
+ super(TestAsaFactsModule, self).setUp()
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.asa.plugins.module_utils.network.asa.facts.legacy.base.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_get_resource_connection = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection = (
+ self.mock_get_resource_connection.start()
+ )
+
+ self.mock_get_capabilities = patch(
+ "ansible_collections.cisco.asa.plugins.module_utils.network.asa.facts.legacy.base.get_capabilities"
+ )
+ self.get_capabilities = self.mock_get_capabilities.start()
+ self.get_capabilities.return_value = {
+ "device_info": {
+ "network_os": "asa",
+ "network_os_hostname": "ciscoasa",
+ "network_os_image": "flash0:/vasa-adventerprisek9-m",
+ "network_os_version": "9.10(1)11",
+ },
+ "network_api": "cliconf",
+ }
+
+ def tearDown(self):
+ super(TestAsaFactsModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_get_capabilities.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ commands = kwargs["commands"]
+ output = list()
+
+ for command in commands:
+ filename = str(command).split(" | ")[0].replace(" ", "_")
+ output.append(load_fixture("asa_facts_%s" % filename))
+ return output
+
+ self.run_commands.side_effect = load_from_file
+
+ def test_asa_facts_stacked(self):
+ set_module_args(dict(gather_subset="default"))
+ result = self.execute_module()
+ self.assertEqual(
+ result["ansible_facts"]["ansible_net_serialnum"], "9AWFX1S46VQ"
+ )
+ self.assertEqual(result["ansible_facts"]["ansible_net_system"], "asa")
+
+ def test_asa_facts_filesystems_info(self):
+ set_module_args(dict(gather_subset="hardware"))
+ result = self.execute_module()
+ self.assertEqual(
+ result["ansible_facts"]["ansible_net_filesystems_info"]["disk0:"][
+ "spacetotal_kb"
+ ],
+ 8370192.0,
+ )
+ self.assertEqual(
+ result["ansible_facts"]["ansible_net_filesystems_info"]["disk0:"][
+ "spacefree_kb"
+ ],
+ 8348976.0,
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_og.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_og.py
new file mode 100644
index 00000000..938fc291
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_og.py
@@ -0,0 +1,126 @@
+# -*- coding: utf-8 -*-
+
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.asa.tests.unit.compat.mock import patch
+from ansible_collections.cisco.asa.plugins.modules import asa_og
+from ansible_collections.cisco.asa.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .asa_module import TestAsaModule, load_fixture
+
+
+class TestAsaOgModule(TestAsaModule):
+
+ module = asa_og
+
+ def setUp(self):
+ super(TestAsaOgModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.asa.plugins.modules.asa_og.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.asa.plugins.modules.asa_og.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_connection = patch(
+ "ansible_collections.cisco.asa.plugins.module_utils.network.asa.asa.get_connection"
+ )
+ self.get_connection = self.mock_get_connection.start()
+
+ def tearDown(self):
+ super(TestAsaOgModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None):
+ self.get_config.return_value = load_fixture(
+ "asa_og_config.cfg"
+ ).strip()
+ self.load_config.return_value = dict(diff=None, session="session")
+
+ def test_asa_og_idempotent(self):
+ set_module_args(
+ dict(
+ name="test_nets",
+ group_type="network-object",
+ host_ip=["8.8.8.8"],
+ ip_mask=["192.168.0.0 255.255.0.0"],
+ group_object=["awx_lon"],
+ description="ansible_test object-group description",
+ state="present",
+ )
+ )
+ commands = []
+ self.execute_module(changed=False, commands=commands)
+
+ def test_asa_og_add(self):
+ set_module_args(
+ dict(
+ name="test_nets",
+ group_type="network-object",
+ host_ip=["8.8.8.8", "8.8.4.4"],
+ ip_mask=["192.168.0.0 255.255.0.0", "10.0.0.0 255.255.255.0"],
+ group_object=["awx_lon", "awx_ams"],
+ description="ansible_test object-group description",
+ state="present",
+ )
+ )
+ commands = [
+ "object-group network test_nets",
+ "network-object host 8.8.4.4",
+ "network-object 10.0.0.0 255.255.255.0",
+ "group-object awx_ams",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_asa_og_replace(self):
+ set_module_args(
+ dict(
+ name="test_nets",
+ group_type="network-object",
+ host_ip=["8.8.4.4"],
+ ip_mask=["10.0.0.0 255.255.255.0"],
+ group_object=["awx_ams"],
+ description="ansible_test custom description",
+ state="replace",
+ )
+ )
+ commands = [
+ "object-group network test_nets",
+ "description ansible_test custom description",
+ "no network-object host 8.8.8.8",
+ "network-object host 8.8.4.4",
+ "no network-object 192.168.0.0 255.255.0.0",
+ "network-object 10.0.0.0 255.255.255.0",
+ "no group-object awx_lon",
+ "group-object awx_ams",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_asa_og_remove(self):
+ set_module_args(
+ dict(
+ name="test_nets",
+ group_type="network-object",
+ host_ip=["8.8.8.8"],
+ group_object=["awx_lon"],
+ state="absent",
+ )
+ )
+ commands = [
+ "object-group network test_nets",
+ "no network-object host 8.8.8.8",
+ "no group-object awx_lon",
+ ]
+ self.execute_module(changed=True, commands=commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_ogs.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_ogs.py
new file mode 100644
index 00000000..ca5f8ec4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/network/asa/test_asa_ogs.py
@@ -0,0 +1,353 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import sys
+
+import pytest
+
+# These tests and/or the module under test are unstable on Python 3.5.
+# See: https://app.shippable.com/github/ansible/ansible/runs/161331/15/tests
+# This is most likely due to CPython 3.5 not maintaining dict insertion order.
+pytestmark = pytest.mark.skipif(
+ sys.version_info[:2] == (3, 5),
+ reason="Tests and/or module are unstable on Python 3.5.",
+)
+
+from ansible_collections.cisco.asa.tests.unit.compat.mock import patch
+from ansible_collections.cisco.asa.plugins.modules import asa_ogs
+from ansible_collections.cisco.asa.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .asa_module import TestAsaModule, load_fixture
+
+
+class TestAsaOGsModule(TestAsaModule):
+ module = asa_ogs
+
+ def setUp(self):
+ super(TestAsaOGsModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.asa.plugins.module_utils.network.asa.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.asa.plugins.module_utils.network.asa.facts.ogs.ogs."
+ "OGsFacts.get_og_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestAsaOGsModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None, transport="cli"):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("asa_ogs_config.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_asa_ogs_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ object_groups=[
+ dict(
+ name="test_network_og",
+ description="test network og",
+ network_object=dict(
+ host=["192.0.3.1", "192.0.3.2"],
+ ipv6_address=["2001:db8:0:3::/64"],
+ ),
+ )
+ ],
+ object_type="network",
+ )
+ ],
+ state="merged",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "object-group network test_network_og",
+ "description test network og",
+ "network-object host 192.0.3.1",
+ "network-object host 192.0.3.2",
+ "network-object 2001:db8:0:3::/64",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_asa_ogs_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ object_groups=[
+ dict(
+ description="test_og_network",
+ name="test_og_network",
+ network_object=dict(
+ host=["192.0.2.1"],
+ address=["192.0.2.0 255.255.255.0"],
+ ),
+ )
+ ],
+ object_type="network",
+ ),
+ dict(
+ object_groups=[
+ dict(
+ name="test_og_service",
+ service_object=dict(
+ protocol=["ipinip", "tcp-udp"]
+ ),
+ )
+ ],
+ object_type="service",
+ ),
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_asa_ogs_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ object_groups=[
+ dict(
+ name="test_og_network",
+ description="test_og_network_replace",
+ network_object=dict(
+ host=["192.0.3.1"],
+ address=["192.0.3.0 255.255.255.0"],
+ ),
+ )
+ ],
+ object_type="network",
+ )
+ ],
+ state="replaced",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "object-group network test_og_network",
+ "description test_og_network_replace",
+ "no network-object 192.0.2.0 255.255.255.0",
+ "network-object 192.0.3.0 255.255.255.0",
+ "no network-object host 192.0.2.1",
+ "network-object host 192.0.3.1",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_asa_ogs_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ object_groups=[
+ dict(
+ description="test_og_network",
+ name="test_og_network",
+ network_object=dict(
+ host=["192.0.2.1"],
+ address=["192.0.2.0 255.255.255.0"],
+ ),
+ )
+ ],
+ object_type="network",
+ ),
+ dict(
+ object_groups=[
+ dict(
+ name="test_og_service",
+ service_object=dict(
+ protocol=["ipinip", "tcp-udp"]
+ ),
+ )
+ ],
+ object_type="service",
+ ),
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_asa_ogs_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ object_groups=[
+ dict(
+ name="test_og_network",
+ description="test_og_network_override",
+ network_object=dict(
+ host=["192.0.3.1"],
+ address=["192.0.3.0 255.255.255.0"],
+ ),
+ )
+ ],
+ object_type="network",
+ )
+ ],
+ state="overridden",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "no object-group service test_og_service",
+ "object-group network test_og_network",
+ "description test_og_network_override",
+ "no network-object 192.0.2.0 255.255.255.0",
+ "network-object 192.0.3.0 255.255.255.0",
+ "no network-object host 192.0.2.1",
+ "network-object host 192.0.3.1",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_asa_ogs_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ object_groups=[
+ dict(
+ description="test_og_network",
+ name="test_og_network",
+ network_object=dict(
+ host=["192.0.2.1"],
+ address=["192.0.2.0 255.255.255.0"],
+ ),
+ )
+ ],
+ object_type="network",
+ ),
+ dict(
+ object_groups=[
+ dict(
+ name="test_og_service",
+ service_object=dict(
+ protocol=["ipinip", "tcp-udp"]
+ ),
+ )
+ ],
+ object_type="service",
+ ),
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_asa_ogs_delete_by_name(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ object_groups=[dict(name="test_og_network")],
+ object_type="network",
+ )
+ ],
+ state="deleted",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = ["no object-group network test_og_network"]
+ self.assertEqual(result["commands"], commands)
+
+ def test_asa_ogs_deleted_all(self):
+ set_module_args(dict(state="deleted"))
+ result = self.execute_module(changed=True)
+ commands = [
+ "no object-group network test_og_network",
+ "no object-group service test_og_service",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_asa_ogs_rendered(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ object_groups=[
+ dict(
+ description="test_og_network",
+ name="test_og_network",
+ network_object=dict(
+ host=["192.0.2.1"],
+ address=["192.0.2.0 255.255.255.0"],
+ ),
+ )
+ ],
+ object_type="network",
+ ),
+ dict(
+ object_groups=[
+ dict(
+ name="test_og_service",
+ service_object=dict(
+ protocol=["ipinip", "tcp-udp"]
+ ),
+ )
+ ],
+ object_type="service",
+ ),
+ ],
+ state="rendered",
+ )
+ )
+ commands = [
+ "object-group network test_og_network",
+ "description test_og_network",
+ "network-object 192.0.2.0 255.255.255.0",
+ "network-object host 192.0.2.1",
+ "object-group service test_og_service",
+ "service-object ipinip",
+ "service-object tcp-udp",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["rendered"], commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/utils.py b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/utils.py
new file mode 100644
index 00000000..9258b663
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/modules/utils.py
@@ -0,0 +1,51 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import json
+
+from ansible_collections.cisco.asa.tests.unit.compat import unittest
+from ansible_collections.cisco.asa.tests.unit.compat.mock import patch
+from ansible.module_utils import basic
+from ansible.module_utils._text import to_bytes
+
+
+def set_module_args(args):
+ if "_ansible_remote_tmp" not in args:
+ args["_ansible_remote_tmp"] = "/tmp"
+ if "_ansible_keep_remote_files" not in args:
+ args["_ansible_keep_remote_files"] = False
+
+ args = json.dumps({"ANSIBLE_MODULE_ARGS": args})
+ basic._ANSIBLE_ARGS = to_bytes(args)
+
+
+class AnsibleExitJson(Exception):
+ pass
+
+
+class AnsibleFailJson(Exception):
+ pass
+
+
+def exit_json(*args, **kwargs):
+ if "changed" not in kwargs:
+ kwargs["changed"] = False
+ raise AnsibleExitJson(kwargs)
+
+
+def fail_json(*args, **kwargs):
+ kwargs["failed"] = True
+ raise AnsibleFailJson(kwargs)
+
+
+class ModuleTestCase(unittest.TestCase):
+ def setUp(self):
+ self.mock_module = patch.multiple(
+ basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json
+ )
+ self.mock_module.start()
+ self.mock_sleep = patch("time.sleep")
+ self.mock_sleep.start()
+ set_module_args({})
+ self.addCleanup(self.mock_module.stop)
+ self.addCleanup(self.mock_sleep.stop)
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/requirements.txt b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/requirements.txt
new file mode 100644
index 00000000..a9772bea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tests/unit/requirements.txt
@@ -0,0 +1,42 @@
+boto3
+placebo
+pycrypto
+passlib
+pypsrp
+python-memcached
+pytz
+pyvmomi
+redis
+requests
+setuptools > 0.6 # pytest-xdist installed via requirements does not work with very old setuptools (sanity_ok)
+unittest2 ; python_version < '2.7'
+importlib ; python_version < '2.7'
+netaddr
+ipaddress
+netapp-lib
+solidfire-sdk-python
+
+# requirements for F5 specific modules
+f5-sdk ; python_version >= '2.7'
+f5-icontrol-rest ; python_version >= '2.7'
+deepdiff
+
+# requirement for Fortinet specific modules
+pyFMG
+
+# requirement for aci_rest module
+xmljson
+
+# requirement for winrm connection plugin tests
+pexpect
+
+# requirement for the linode module
+linode-python # APIv3
+linode_api4 ; python_version > '2.6' # APIv4
+
+# requirement for the gitlab module
+python-gitlab
+httmock
+
+# requirment for kubevirt modules
+openshift ; python_version >= '2.7'
diff --git a/collections-debian-merged/ansible_collections/cisco/asa/tox.ini b/collections-debian-merged/ansible_collections/cisco/asa/tox.ini
new file mode 100644
index 00000000..a533ccb3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/asa/tox.ini
@@ -0,0 +1,33 @@
+[tox]
+minversion = 1.4.2
+envlist = linters
+skipsdist = True
+
+[testenv]
+basepython = python3
+deps = -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+commands = find {toxinidir} -type f -name "*.py[c|o]" -delete
+
+[testenv:black]
+install_command = pip install {opts} {packages}
+commands =
+ black -v -l79 {toxinidir}
+
+[testenv:linters]
+install_command = pip install {opts} {packages}
+commands =
+ black -v -l79 --check {toxinidir}
+ flake8 {posargs}
+
+[testenv:venv]
+commands = {posargs}
+
+[flake8]
+# E123, E125 skipped as they are invalid PEP-8.
+
+show-source = True
+ignore = E123,E125,E402,E501,E741,W503
+max-line-length = 160
+builtins = _
+exclude = .git,.tox,tests/unit/compat/
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/.gitignore b/collections-debian-merged/ansible_collections/cisco/intersight/.gitignore
new file mode 100644
index 00000000..f0e71cc8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/.gitignore
@@ -0,0 +1,135 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Editor and environment
+.vscode/
+collections/
+ansible.cfg
+
+# Distribution / packaging
+.DS_Store
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+pip-wheel-metadata/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+.python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/ \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/Development.md b/collections-debian-merged/ansible_collections/cisco/intersight/Development.md
new file mode 100644
index 00000000..6f79a1be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/Development.md
@@ -0,0 +1,26 @@
+# cisco.intersight Collection Development Notes
+
+### Current Development Status
+
+| Configuration Category | Configuration Task | Module Name |
+| ---------------------- | ------------------ | ----------- |
+| General purpose resource config | Any (with user provided data) | intersight_rest_api |
+| Resource data collection/inventory | GET servers information | intersight_facts |
+
+### Ansible Development Notes
+
+Modules in development follow processes documented at http://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html. The modules support ansible-doc and should eventually have integration tests.
+
+When developing modules in this repository, here are a few helpful commands to sanity check the code and documentation (replace module_name with your module (e.g., intersight_objects)). Ansible modules won't generally be pylint or pycodestyle (PEP8) clean without disabling several of the checks:
+ ```
+ pylint --disable=invalid-name,no-member,too-many-nested-blocks,redefined-variable-type,too-many-statements,too-many-branches,broad-except,line-too-long,missing-docstring,wrong-import-position,too-many-locals,import-error <module_name>.py
+
+ pycodestyle --max-line-length 160 --config /dev/null --ignore E402 <module_name>.py
+
+ ansible-doc <module_name>
+ ```
+
+# Community:
+
+* We are on Slack (https://ciscoucs.slack.com/) - Slack requires registration, but the ucspython team is open invitation to
+ anyone. Click [here](https://ucspython.herokuapp.com) to register
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/FILES.json b/collections-debian-merged/ansible_collections/cisco/intersight/FILES.json
new file mode 100644
index 00000000..f32612a7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/FILES.json
@@ -0,0 +1,824 @@
+{
+ "files": [
+ {
+ "name": ".",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "misc",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "misc/CL2020 EMEAR DEVWKS-1542 Intersight Ansible Lab Guide.pdf",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5b15d28312a255524c6da61ce4ba75a4fa8b4f92d89d66edead1e163dbad143c",
+ "format": 1
+ },
+ {
+ "name": "misc/README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e61dd07deb821f7d7de15f2667c7b8c0a636efab8ad63484badfeb37ad6d7796",
+ "format": 1
+ },
+ {
+ "name": "plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/intersight.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb566c92ebe099de781595d476b99d327836c790842466fa76f3006d20e741f4",
+ "format": 1
+ },
+ {
+ "name": "plugins/README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c82ee692702ec1dd604cdbc38ff252114e5204e1b0627045a66c9451e7a918ac",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/intersight.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e319cddcf40d3152e45a1b68c00a202fe68e6f073aa86d82aa98ffbd196de080",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/intersight_virtual_media_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "29dfdf3c35b0d3cd692ffac445b4f98aaf0b45ee75ae25f014cf23597cf876bc",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/intersight_server_profile.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "30335445fea576cbf7961152dc691463a445bbc46ebc350c5e85c2ecd76f18dc",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/intersight_imc_access_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6da42e68f533b023db27b503d77493085bde53ed79eafe0f4654d7f449c6f593",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/intersight_rest_api.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddd3e4b7086138d5468788fa9314084f5e38fe4f265f69ad2b18a0d5220aa0ec",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/intersight_boot_order_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "de304e509c40a528c7333ab928938ad41a0309fcbf5b5074ee50082bb45202be",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/intersight_local_user_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5407fad8b108d4e28f64d176cab82cd2933ad7ae8b4d21e9dcf822c5ef6cd015",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/intersight_info.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "83f0ef20ef237b449e8e140deaa300a18feb35b7abf6658722eb916259b5520c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/intersight_ntp_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "31913fec08680f6858fc25a713162a4b49a8c6b251e289a8c01f2bdeb708f423",
+ "format": 1
+ },
+ {
+ "name": "roles",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/intersight_local_user_policy.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "629a4103d834fc08fcfdd924202ceff7df74b3b3f17779d39fa6648f5d9d017b",
+ "format": 1
+ },
+ {
+ "name": "playbooks/firmware_direct_download.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5be37ca5482d4f4839305d8cf37b5bd71c4c848d35ecadb990080429f69908b7",
+ "format": 1
+ },
+ {
+ "name": "playbooks/intersight_server_profile.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b133b6dee873207545a1d212b7ca943ddeffe4b868b1c547e9ee9682d3dd7094",
+ "format": 1
+ },
+ {
+ "name": "playbooks/intersight_imc_access_policy.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0e1c127f93c3a40ce65c745d3a6dbf40b12d019875e99e83f642247872d751c4",
+ "format": 1
+ },
+ {
+ "name": "playbooks/server_actions.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a5f3b79c9d1d8117f855da5be12d7d2a7c12853aa3268c1756a9ebd639ac186a",
+ "format": 1
+ },
+ {
+ "name": "playbooks/intersight_virtual_media_policy.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90b06235d14f5f8deb0442a6ce0d344b708c0291802a5bc2b6db3ae5f65c7175",
+ "format": 1
+ },
+ {
+ "name": "playbooks/devnet_inventory",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "052d485b54ba98f650030c8191229576f085e8d8566242af2067fb5d165a5a34",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/.DS_Store",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d87663405d3bcd8a7c715a97b2e3d80267f989669c6f6240869726f1335e333c",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/server_policies",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/server_policies/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/server_policies/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2a3c6a4c4090856ccb26687d29585cccd5d766a1303b9c0848d39d531432d5c9",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/iscsi",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/iscsi/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/iscsi/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "85db220877c298f5829c0cf1551876de1d6cd2b99293a77424883119b840d6d9",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/cluster_storage",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/cluster_storage/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/cluster_storage/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6e5325cc42451a4d77affed40e9dd7bc25510f7f9a5f20a16996a4ef80a6ab9d",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/vcenter",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/vcenter/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/vcenter/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ecb2b8184dea63e5f565dbf11272df6a01233e9881f372342332748b35a19b36",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_cluster_storage",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_cluster_storage/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_cluster_storage/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b6cc3383c90bf3ab9628d109aa8456dbbd05f459e43e516674ce39c3f72537a0",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/cluster_network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/cluster_network/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/cluster_network/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b57308bc48936625c720bd1272ae794a7f0689980e9b86a875908b0547833a6e",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/proxy",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/proxy/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/proxy/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "450d1fdc122586da8ee9c86e63c8687dccafabec0447223667a2d7767b4baace",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/local_credential",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/local_credential/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/local_credential/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5a4a360f8d94381a29bf603a88a576a415b8f5709c9a29de633d052da6b83fe0",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_cluster_network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_cluster_network/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_cluster_network/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b6d721682b8c3f4c7964ec203add5b8c7cc909a35a4283625a823ee35ffd3736",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/deploy",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/deploy/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/deploy/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "06d41f41438fd7adfa8cb1be4004f4648fee274949762144919c21f100a4b394",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/fc",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/fc/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/fc/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "78c0d20f9d467491724905fedcbd447c6d77207276c7c338436f2286b91069fe",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/software_version",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/software_version/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/software_version/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7f286d9b602eefda777f764c0033e36cb476ac9a733d7266db429d8c55cc9832",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_software_version",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_software_version/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_software_version/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e573db276825cef25484d0d0c6aca6bc77135e9e6edd0c655c898352cc22e0e1",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/node_config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/node_config/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/node_config/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7efeeeec1b1919cd854f511fdd110d009299dc6cf5afdbd31b228559a58d19af",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/auto_support",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/auto_support/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/auto_support/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f98d7c8c3d9ab60b7356df8ef8310c6eb9bf19433ba0c8dd6f15ba847e7c3564",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/node_profiles",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/node_profiles/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/node_profiles/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "95bc676799f7fd7e3d94372eae42b16f01efccb7987a1b1059f770e962730082",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/sys_config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/sys_config/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/sys_config/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7ce8146811fa0b1166478e4fac1090cfcd0f15e3a012acd028f0116e32f8a50e",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/cluster_profile",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/cluster_profile/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/cluster_profile/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "14a765635c726c6c712b93a7aff2362357711546aa7ba80f35ecb3a178d107dc",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/cluster_profile/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/cluster_profile/defaults/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "23c89ecd9631f2818d72f1826ab77db383e0c17af4aab1e9174256a1050c5a6b",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_cluster_profile",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_cluster_profile/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_cluster_profile/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "148674f613ae37e02722cce9d922d74458b8eefb4ef152835d0b4d4cff2abeae",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_cluster_profile/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/policies/hyperflex_policies/edge_cluster_profile/defaults/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "71993244f86f68dff3fbf58ef5d374291feac0734d78665e4aa3b4fe225d3b4e",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers/actions",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers/actions/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers/actions/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b5089d72e2bf05c709233ed1bd0e14b7772df213085bf8004a504259dedcf473",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ova_workflow.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5726b9c6f974584f7fc25ac424682c52fd99aa4bd42e1b3c03db7387d4371e83",
+ "format": 1
+ },
+ {
+ "name": "playbooks/example_inventory",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "be93920afe1f6a8e2faf1aebc34473f1ec4773dac2de865bd4a7343002cba0fa",
+ "format": 1
+ },
+ {
+ "name": "playbooks/server_firmware.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "979245318dc158b5d98a555ce52d92a9801065a2b8619efc29969f6904460660",
+ "format": 1
+ },
+ {
+ "name": "playbooks/deploy_server_profiles.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "56af431a7518e7658b2cfae9e114392125a43e2311aa59805eafd783562632b9",
+ "format": 1
+ },
+ {
+ "name": "playbooks/intersight_boot_order_policy.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "35450777e023766769892bc39adfc31e8b7e0ce435d27490955c46d68315cb25",
+ "format": 1
+ },
+ {
+ "name": "playbooks/cos_server_policies_and_profiles.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "edbf6afccb77a998c8e1ba000e5abd66a5153cf587054c167e9b91799eda1962",
+ "format": 1
+ },
+ {
+ "name": "playbooks/claim_device.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "45e7d0b8463e5528b064b41e2cec84a82b84c25c4c19e191cf09ce3ae84228bd",
+ "format": 1
+ },
+ {
+ "name": "playbooks/update_hx_edge_inventory.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3231ee15076dadb159d89d10c15e432acf70157eb5a0311035e15988bd365fb1",
+ "format": 1
+ },
+ {
+ "name": "playbooks/update_standalone_inventory.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fec883836d982891db9ebd30ac12fd58686b155f02f317e5c7b031395a9f364e",
+ "format": 1
+ },
+ {
+ "name": "playbooks/update_hx_inventory.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2bef43ab2074db7f42695e33fdefc4e33c9494ac59f97f696edb51f176b11ace",
+ "format": 1
+ },
+ {
+ "name": "playbooks/update_all_inventory.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1e5b873df1b66e5f6d6ab84e4385069f85e178c61e88113ab0dce1798a758a9e",
+ "format": 1
+ },
+ {
+ "name": "playbooks/hyperflex_cluster_profiles.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6fa2417e799d28c93ed87ff953faaebcfaeeb07c65cafacf94dfa991e39fc582",
+ "format": 1
+ },
+ {
+ "name": "playbooks/hyperflex_edge_cluster_profiles.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c94792484d8e7f623ac0c1fb7417f07fcb919d83c502ad17af78ed3b1af00110",
+ "format": 1
+ },
+ {
+ "name": "playbooks/intersight_ntp_policy.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5e5fb746cb087b54777417b29ff999782cef2f733ea6f2ebecb6ad6d0d11790d",
+ "format": 1
+ },
+ {
+ "name": "playbooks/hcl_status.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "36426be67e3cc9f09ff1265f296ee7107854cd19d7ae1dafdae230df070df990",
+ "format": 1
+ },
+ {
+ "name": "docs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "344c8fd0fd696374d6d04616d64db95960642c33870280a16c320ec3018b44e7",
+ "format": 1
+ },
+ {
+ "name": ".gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "debe052b29a34ad5fa773e0320f07a6bb3c16fa5469b2a87cf0cb12528f68e95",
+ "format": 1
+ },
+ {
+ "name": "LICENSE.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "30cd47435d09af02a38c1f286279009584f2a88ce02f05c34da23e617131f268",
+ "format": 1
+ },
+ {
+ "name": "Development.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c928aeefe50d3eb2016604a8b6c78bcdf2bd8cd4065178dfbb9e9b09dbd42a3f",
+ "format": 1
+ }
+ ],
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/LICENSE.txt b/collections-debian-merged/ansible_collections/cisco/intersight/LICENSE.txt
new file mode 100644
index 00000000..c0148c2a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/LICENSE.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Cisco Systems, Inc. and/or its affiliates
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/MANIFEST.json b/collections-debian-merged/ansible_collections/cisco/intersight/MANIFEST.json
new file mode 100644
index 00000000..cfd26c48
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/MANIFEST.json
@@ -0,0 +1,33 @@
+{
+ "collection_info": {
+ "namespace": "cisco",
+ "name": "intersight",
+ "version": "1.0.10",
+ "authors": [
+ "David Soper (@dsoper2)"
+ ],
+ "readme": "README.md",
+ "tags": [
+ "cisco",
+ "intersight"
+ ],
+ "description": "modules for Cisco Intersight",
+ "license": [
+ "GPL-3.0-or-later"
+ ],
+ "license_file": null,
+ "dependencies": {},
+ "repository": "https://github.com/CiscoDevNet/intersight-ansible",
+ "documentation": "https://intersight.com/apidocs",
+ "homepage": "https://github.com/CiscoDevNet/intersight-ansible",
+ "issues": "https://github.com/CiscoDevNet/intersight-ansible"
+ },
+ "file_manifest_file": {
+ "name": "FILES.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "67545a5eed802b46cf037d43b5d6e30841328e02d4c1b29b2848fafcc450c131",
+ "format": 1
+ },
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/README.md b/collections-debian-merged/ansible_collections/cisco/intersight/README.md
new file mode 100644
index 00000000..6ca5bf45
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/README.md
@@ -0,0 +1,88 @@
+# cisco.intersight Ansible Collection
+
+Ansible collection for managing and automating Cisco Intersight environments. Modules and roles are provided for common Cisco Intersight tasks.
+
+* Note: This collection is not compatible with versions of Ansible before v2.8.
+
+## Requirements
+
+- Ansible v2.8 or newer
+
+
+## Install
+- ansible must be installed
+```
+sudo pip install ansible
+```
+
+## Usage
+
+Authentication with the Intersight API requires the use of API keys that should be generated within the Intersight UI. See (https://intersight.com/help) or (https://communities.cisco.com/docs/DOC-76947) for more information on generating and using API keys.
+If you do not have an Intersight account, you can create one and claim devices in Intersight using the DevNet Intersight Sandbox at https://devnetsandbox.cisco.com/RM/Diagram/Index/a63216d2-e891-4856-9f27-309ca61ec862?diagramType=Topology
+Because Intersight has a single API endpoint, minimal setup is required in playbooks or variables to access the API. Here's an example playbook:
+```
+---
+- hosts: localhost
+ connection: local
+ gather_facts: false
+ tasks:
+ - name: Configure Boot Policy
+ cisco.intersight.intersight_rest_api:
+ api_private_key: <path to your private key>
+ api_key_id: <your public key id>
+ resource_path: /boot/PrecisionPolicies
+ api_body: {
+```
+
+localhost (the Ansible controller) can be used without the need to specify any hosts or inventory. Hosts can be specified to perform parallel actions. An example of Server Firmware Update on multiple servers is provided by the server_firmware.yml playbook.
+
+If you're using playbooks in this repo, you will need to provide your own inventory file and cusomtize any variables used in playbooks with settings for your environment. This repo includes an example_inventory file with host groups for HX Clusters (Intersight_HX) and Servers (Intersight_Servers) and API key variables shared for Intersight host groups:
+```
+[Intersight_HX]
+sjc07-r13-501
+sjc07-r13-503
+
+[Intersight_Servers]
+
+[Intersight:children]
+Intersight_HX
+Intersight_Servers
+
+[Intersight:vars]
+api_private_key=~/Downloads/SecretKey.txt
+api_key_id=...
+```
+For demo purposes, you can copy the example_inventory file to a new file named inventory. Then, edit the inventory file to provide your own api_private_key location and api_key_id for use in playbooks. If you're are using the Intersight Virtual Appliance, your inventory file can also specify the appliance URI and use of local certificates:
+```
+api_uri=https://tme-appliance2.intersightdemo.cisco.com/api/v1
+validate_certs=false
+```
+
+Once you've provided API key information, the inventory file can be automatically updated with data from your Intersight account using one of the following playbooks:
+- update_all_inventory.yml (if you'd like all Servers in the inventory)
+- update_standalone_inventory.yml (if you'd like only Standalone C-Series Servers that can be managed through Server Policies/Profiles)
+
+Here are example command lines for creating your own inventory and running the update_standalone_inventory.yml playbook:
+```
+cp example_inventory inventory
+edit inventory with your api_private_key and api_key_id
+ansible-playbook -i inventory update_standalone_inventory.yml
+```
+With an inventory for your Intersight account, you can now run playbooks to configure profiles/policies, and perform other server actions in Intersight:
+```
+ansible-playbook -i inventory cos_server_policies_and_profiles.yml --list-tasks --list-hosts (will show the tasks and their tags along with the hosts that will be configured)
+ansible-playbook -i inventory cos_server_policies_and_profiles.yml (will configure policies and profiles in Intersight)
+ansible-playbook -i inventory deploy_server_profiles.yml (note: this will deploy settings, run with --check to see what would change 1st)
+ansible-playbook -i inventory server_actions.yml (note: by default this will PowerOn all servers, view the playbook to see other options)
+```
+
+Here are example command lines for creating an inventory with all Servers:
+```
+cp example_inventory inventory
+edit inventory with your api_private_key and api_key_id
+ansible-playbook -i inventory update_all_inventory.yml
+```
+# Community:
+
+* We are on Slack (https://ciscoucs.slack.com/) - Slack requires registration, but the ucspython team is open invitation to
+ anyone. Click [here](https://ucspython.herokuapp.com) to register \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/misc/CL2020 EMEAR DEVWKS-1542 Intersight Ansible Lab Guide.pdf b/collections-debian-merged/ansible_collections/cisco/intersight/misc/CL2020 EMEAR DEVWKS-1542 Intersight Ansible Lab Guide.pdf
new file mode 100644
index 00000000..ea35e815
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/misc/CL2020 EMEAR DEVWKS-1542 Intersight Ansible Lab Guide.pdf
Binary files differ
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/misc/README.md b/collections-debian-merged/ansible_collections/cisco/intersight/misc/README.md
new file mode 100644
index 00000000..934c8a1d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/misc/README.md
@@ -0,0 +1,3 @@
+# Miscellaneous Items
+
+This folder contains miscellaneous items related to the collection. Trainings, DevNet Workshop giudes, etc. \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/claim_device.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/claim_device.yml
new file mode 100644
index 00000000..06d397c6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/claim_device.yml
@@ -0,0 +1,31 @@
+---
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight_Servers'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+- hosts: "{{ group | default('Intersight_Servers') }}"
+ connection: local
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ tasks:
+ # Claim device
+ - name: Claim device
+ cisco.intersight.intersight_rest_api:
+ <<: *api_info
+ resource_path: /asset/DeviceClaims
+ api_body: {
+ "SecurityToken": "{{ SecurityToken }}",
+ "SerialNumber": "{{ SerialNumber }}"
+ }
+ update_method: post
+ delegate_to: localhost
+ run_once: true
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/cos_server_policies_and_profiles.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/cos_server_policies_and_profiles.yml
new file mode 100644
index 00000000..9adc3ebd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/cos_server_policies_and_profiles.yml
@@ -0,0 +1,353 @@
+---
+#
+# Configure Server Profiles and Policies
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight_Servers'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+- hosts: "{{ group | default('Intersight_Servers') }}"
+ connection: local
+ collections:
+ - cisco.intersight
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ # Server Profile name default
+ profile_name: "SP-{{ inventory_hostname }}"
+ # Organization name
+ org_name: DevNet
+ tasks:
+ # Get the Organization Moid used by all profiles and policies
+ - name: "Get Organization {{ org_name }} Moid"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /organization/Organizations
+ query_params:
+ $filter: "Name eq '{{ org_name }}'"
+ register: org_resp
+ delegate_to: localhost
+ tags: always
+ #
+ # Configure profiles specific to server (run for each server in the inventory)
+ # Server Profiles role will register a profile_resp and profile_resp list (from all hosts) can be used by policy tasks
+ #
+ - name: "Configure {{ profile_name }} Server Profile"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /server/Profiles
+ query_params:
+ $filter: "Name eq '{{ profile_name }}'"
+ api_body: {
+ "Name": "{{ profile_name }}",
+ "AssignedServer": {
+ "Moid": "{{ server_moid }}",
+ "ObjectType": "compute.RackUnit"
+ },
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ register: profile_resp
+ when: server_moid is defined
+ delegate_to: localhost
+ tags: server_profiles
+ #
+ # Enclose policy tasks in a block that runs once
+ # Policy API body is specified in a role specific vars section for each role import
+ # See https://intersight.com/apidocs/ or https://intersight.com/mobrowser/ for information on setting resource_path and api_body
+ #
+ - block:
+ # Boot Order policy
+ - import_role:
+ name: policies/server_policies
+ vars:
+ resource_path: /boot/PrecisionPolicies
+ api_body: {
+ "Name": "COS-Boot",
+ "ConfiguredBootMode": "Legacy",
+ "BootDevices": [
+ {
+ "ObjectType": "boot.LocalDisk",
+ "Enabled": true,
+ "Name": "Disk",
+ "Slot": "MRAID"
+ },
+ {
+ "ObjectType": "boot.VirtualMedia",
+ "Enabled": true,
+ "Name": "VM",
+ "Subtype": "cimc-mapped-dvd"
+ }
+ ],
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ tags: boot_order
+ # Adapter Configuration policy
+ - import_role:
+ name: policies/server_policies
+ vars:
+ resource_path: /adapter/ConfigPolicies
+ api_body: {
+ "Name":"COS-Adapter",
+ "Settings":[
+ {
+ "SlotId":"MLOM",
+ "EthSettings":{
+ "LldpEnabled":true
+ },
+ "FcSettings":{
+ "FipEnabled":false
+ }
+ }
+ ],
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ tags: adapter_configuration
+ # LAN Connectivity and related policies
+ - block:
+ # Ethernet Adapter
+ - name: "Configure Ethernet Adapter Policy"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /vnic/EthAdapterPolicies
+ query_params:
+ $filter: "Name eq 'COS-EthernetAdapter'"
+ api_body: {
+ "Name": "COS-EthernetAdapter",
+ "InterruptSettings": {
+ "Count": 32,
+ "Mode": "MSIx",
+ "CoalescingTime": 125,
+ "CoalescingType": "MIN"
+ },
+ "RxQueueSettings": {
+ "Count": 8,
+ "RingSize": 4096
+ },
+ "TxQueueSettings": {
+ "Count": 8,
+ "RingSize": 4096
+ },
+ "CompletionQueueSettings": {
+ "Count": 16
+ },
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ register: eth_adapter_resp
+ # Ethernet Network
+ - name: "Configure Ethernet Network Policy"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /vnic/EthNetworkPolicies
+ query_params:
+ $filter: "Name eq 'COS-EthernetNetwork'"
+ api_body: {
+ "Name": "COS-EthernetNetwork",
+ "VlanSettings": {
+ "Mode": "TRUNK",
+ "DefaultVlan": 10
+ },
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ register: eth_network_resp
+ # Ethernet QoS
+ - name: "Configure Ethernet QoS Policy"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /vnic/EthQosPolicies
+ query_params:
+ $filter: "Name eq 'COS-QoS'"
+ api_body: {
+ "Name": "COS-QoS",
+ "Mtu": 9000,
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ register: eth_qos_resp
+ # Import role for LAN Connectivity will register a policy_resp
+ - import_role:
+ name: policies/server_policies
+ vars:
+ resource_path: /vnic/LanConnectivityPolicies
+ api_body: {
+ "Name": "COS-LAN",
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ # vNIC configuration
+ # Ideally this would be in a loop, but Uplink is converted to a string (instead of the required int) when in a loop
+ - name: "Configure eth0"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /vnic/EthIfs
+ query_params:
+ $filter: "LanConnectivityPolicy.Moid eq '{{ policy_resp.api_response.Moid }}' and Name eq 'eth0'"
+ api_body: {
+ "Name": "eth0",
+ "Placement": {
+ "Id": "MLOM",
+ "Uplink": 0
+ },
+ "Order": 0,
+ "EthAdapterPolicy": {
+ "Moid": "{{ eth_adapter_resp.api_response.Moid }}"
+ },
+ "EthNetworkPolicy": {
+ "Moid": "{{ eth_network_resp.api_response.Moid }}"
+ },
+ "EthQosPolicy": {
+ "Moid": "{{ eth_qos_resp.api_response.Moid }}"
+ },
+ "LanConnectivityPolicy": {
+ "Moid": "{{ policy_resp.api_response.Moid }}"
+ },
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ - name: "Configure eth1"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /vnic/EthIfs
+ query_params:
+ $filter: "LanConnectivityPolicy.Moid eq '{{ policy_resp.api_response.Moid }}' and Name eq 'eth1'"
+ api_body: {
+ "Name": "eth1",
+ "Placement": {
+ "Id": "MLOM",
+ "Uplink": 1
+ },
+ "Order": 1,
+ "EthAdapterPolicy": {
+ "Moid": "{{ eth_adapter_resp.api_response.Moid }}"
+ },
+ "EthNetworkPolicy": {
+ "Moid": "{{ eth_network_resp.api_response.Moid }}"
+ },
+ "EthQosPolicy": {
+ "Moid": "{{ eth_qos_resp.api_response.Moid }}"
+ },
+ "LanConnectivityPolicy": {
+ "Moid": "{{ policy_resp.api_response.Moid }}"
+ },
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ tags: lan_connectivity
+ # NTP policy config
+ - import_role:
+ name: policies/server_policies
+ vars:
+ resource_path: /ntp/Policies
+ api_body: {
+ "Name": "COS-NTP",
+ "Enabled": true,
+ "NtpServers": [
+ "173.38.201.115"
+ ],
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ tags: ntp
+ # Storage and related policies
+ - block:
+ # Disk Group policy
+ - name: "Configure Disk Group Policy"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /storage/DiskGroupPolicies
+ query_params:
+ $filter: "Name eq 'COS-Disk'"
+ api_body: {
+ "Name":"COS-Disk",
+ "RaidLevel":"Raid1",
+ "SpanGroups":[
+ {
+ "Disks":[
+ {
+ "SlotNumber":13
+ },
+ {
+ "SlotNumber":14
+ }
+ ]
+ }
+ ],
+ "UseJbods":true,
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ register: disk_group_resp
+ # Storage policy
+ - import_role:
+ name: policies/server_policies
+ vars:
+ resource_path: /storage/StoragePolicies
+ api_body: {
+ "Name": "COS-Storage",
+ "RetainPolicyVirtualDrives": true,
+ "UnusedDisksState": "Jbod",
+ "VirtualDrives": [
+ {
+ "Name": "Boot",
+ "DiskGroupPolicy": "{{ disk_group_resp.api_response.Moid }}",
+ "AccessPolicy": "ReadWrite",
+ "ReadPolicy": "Default",
+ "WritePolicy": "WriteBackGoodBbu",
+ "IoPolicy": "Default",
+ "DriveCache": "Default",
+ "ExpandToAvailable": true,
+ "BootDrive": true
+ }
+ ],
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ tags: storage
+ # Virtual Media policy config
+ - import_role:
+ name: policies/server_policies
+ vars:
+ resource_path: /vmedia/Policies
+ api_body: {
+ "Name": "COS-VM",
+ "Mappings": [
+ {
+ "MountProtocol": "http",
+ "VolumeName": "COS.3.13.6",
+ "DeviceType": "cdd",
+ "HostName": "sjc02dmz-rhel.sjc02dmz.net",
+ "RemotePath": "ibm",
+ "RemoteFile": "clevos-3.13.6.33-allinone-usbiso.iso"
+ }
+ ],
+ "Organization": {
+ "Moid": "{{ org_resp.api_response.Moid }}"
+ }
+ }
+ tags: virtual_media
+ # Policies are common, so only run this block once and not for every host
+ run_once: true
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/deploy_server_profiles.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/deploy_server_profiles.yml
new file mode 100644
index 00000000..0d00a836
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/deploy_server_profiles.yml
@@ -0,0 +1,36 @@
+---
+#
+# Deploy Server Profiles
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight_Servers'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+- hosts: "{{ group | default('Intersight_Servers') }}"
+ connection: local
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ # Server Profile name default
+ profile_name: "SP-{{ inventory_hostname }}"
+ tasks:
+ # Deploy (or perform other action)
+ # action can be given on the command line if needed, e.g., ansible-playbook ... -e action=Unassign
+ # to delete a profile (profile must 1st be unassigned): ansible-playbook ... -e state=absent -e action=No-op
+ - name: Deploy (or user defined action) Server Profile
+ cisco.intersight.intersight_rest_api:
+ <<: *api_info
+ resource_path: /server/Profiles
+ query_params:
+ $filter: "Name eq '{{ profile_name }}'"
+ api_body: {
+ "Action": "{{ action | default('Deploy') }}"
+ }
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/devnet_inventory b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/devnet_inventory
new file mode 100644
index 00000000..aa3b889a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/devnet_inventory
@@ -0,0 +1,23 @@
+[Intersight_HX]
+# Note: at least one host (e.g., sjc07-r13-501) must be present for update_*_inventory.yml to work
+sjc07-r13-501
+sjc07-r13-503
+
+[Intersight_Servers]
+C220M5-WZP23230LJ6 server_moid=5f0736dc6176752d37dbe9f4 model=UCSC-C220-M5SX
+C220M5-WZP23230LJC server_moid=5ec59a786176752d377205f1 model=UCSC-C220-M5SX
+C240M4-FCH1906V37P server_moid=5e8c974d6176752d332f44c9 model=UCSC-C240-M4S2
+C220-FCH2050V0LB server_moid=5dee9ce46176752d332eb867 model=UCSC-C220-M4L
+
+[Intersight:children]
+Intersight_HX
+Intersight_Servers
+
+[all:vars]
+api_private_key=~/Downloads/DevNetSecretKey.txt
+api_key_id=596cc79e5d91b400010d15ad/5db71f977564612d30cc3860/5f0f42d47564612d3363b87b
+organization=DevNet
+boot_order_policy=COS-Boot
+local_user_policy=devnet-guest-admin
+ntp_policy=lab-ntp
+virtual_media_policy=COS-VM
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/example_inventory b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/example_inventory
new file mode 100644
index 00000000..af8c4100
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/example_inventory
@@ -0,0 +1,14 @@
+[Intersight_HX]
+# Note: at least one host (e.g., sjc07-r13-501) must be present for update_*_inventory.yml to work
+sjc07-r13-501
+sjc07-r13-503
+
+[Intersight_Servers]
+
+[Intersight:children]
+Intersight_HX
+Intersight_Servers
+
+[all:vars]
+api_private_key=~/Downloads/SecretKey.txt
+api_key_id=596cc79e5d91b400010d15ad/5f0ce0ad7564612d3311a1f3/5f0ea8eb7564612d334ccb5a
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/firmware_direct_download.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/firmware_direct_download.yml
new file mode 100644
index 00000000..2b6a8b4b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/firmware_direct_download.yml
@@ -0,0 +1,83 @@
+---
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight_Servers'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+- hosts: "{{ group | default('Intersight_Servers') }}"
+ connection: local
+ collections:
+ - cisco.intersight
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ fw_version: 4.1(2b)
+ tasks:
+ # Set the distributable type based on the management mode and server type
+ - set_fact:
+ dist_type: IMMHOST
+ when: mode == 'Intersight' or mode == 'IntersightStandalone'
+ - set_fact:
+ dist_type: UMMBLADE
+ when: mode == 'UCSM' and object_type == 'Blade'
+ - set_fact:
+ dist_type: UMMRACK
+ when: mode == 'UCSM' and object_type == 'RackUnit'
+ # Get a user defined FW version
+ - name: Get Moid of user defined FW version
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /firmware/Distributables
+ query_params:
+ $filter: "SupportedModels eq '{{ model }}' and Version eq '{{ fw_version }}' and Tags.Key eq 'cisco.meta.distributabletype' and Tags.Value eq '{{ dist_type }}' and Tags.Key eq 'cisco.meta.repositorytype' and Tags.Value eq 'Cisco'"
+ delegate_to: localhost
+ register: fw_resp
+ # Update server firmware with a post based on server moid
+ - name: Update server firmware
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /firmware/Upgrades
+ query_params:
+ $filter: "Server.Moid eq '{{ server_moid }}'"
+ update_method: post
+ api_body: {
+ "DirectDownload": {
+ "Upgradeoption": "upgrade_mount_only"
+ },
+ "Distributable": {
+ "Moid": "{{ fw_resp.api_response.Moid }}"
+ },
+ "Server": {
+ "Moid": "{{ server_moid }}",
+ "ObjectType": "compute.{{ object_type }}"
+ },
+ "UpgradeType": "direct_upgrade",
+ "SkipEstimateImpact": true
+ }
+ delegate_to: localhost
+ register: update_resp
+ when:
+ - server_moid is defined
+ - fw_resp.api_response.Moid is defined
+ # Wait for download to complete
+ - name: Check firmware download status
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /firmware/UpgradeStatuses
+ query_params:
+ $filter: "Moid eq '{{ update_resp.api_response.UpgradeStatus.Moid }}'"
+ delegate_to: localhost
+ register: status_resp
+ until: status_resp.api_response.Overallstatus == 'pending' or status_resp.api_response.Overallstatus == 'success'
+ # 60 minutes to allow download to complete
+ retries: 60
+ delay: 60
+ when:
+ - update_resp.api_response is defined
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/hcl_status.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/hcl_status.yml
new file mode 100644
index 00000000..7281c259
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/hcl_status.yml
@@ -0,0 +1,46 @@
+---
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight_Servers'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+- hosts: "{{ group | default('Intersight_Servers') }}"
+ collections:
+ - cisco.intersight
+ connection: local
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ tasks:
+ # Get HclStatus
+ - name: Get HCL Status for Server
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /cond/HclStatuses
+ query_params:
+ $filter: "ManagedObject.Moid eq '{{ server_moid }}'"
+ delegate_to: localhost
+ register: hcl_resp
+ when:
+ - server_moid is defined
+ # Create .csv file with version and status information
+ - copy:
+ content: |
+ Name, FW version, OS vendor, OS version, HW status, SW status, Overall Status
+ {% for host in hostvars %}
+ {% set vars = hostvars[host|string] %}
+ {% if vars.hcl_resp.api_response is defined %}
+ {{ vars.inventory_hostname }}, {{ vars.hcl_resp.api_response.HclFirmwareVersion }}, {{ vars.hcl_resp.api_response.HclOsVendor }}, {{ vars.hcl_resp.api_response.HclOsVersion }}, {{ vars.hcl_resp.api_response.HardwareStatus }}, {{ vars.hcl_resp.api_response.SoftwareStatus }}, {{ vars.hcl_resp.api_response.Status }} {{ vars.hcl_resp.api_response.ServerReason }}
+ {% endif %}
+ {% endfor %}
+ dest: /tmp/hcl_status.csv
+ backup: false
+ run_once: true
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/hyperflex_cluster_profiles.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/hyperflex_cluster_profiles.yml
new file mode 100644
index 00000000..90305540
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/hyperflex_cluster_profiles.yml
@@ -0,0 +1,166 @@
+---
+#
+# Configure HyperFlex Cluster Profiles
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight_HX'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+- hosts: "{{ group | default('Intersight_HX') }}"
+ connection: local
+ gather_facts: false
+ vars:
+ # If your inventory or host/group_vars don't specify required api key information, you can set directly below:
+ # api_private_key: ~/Downloads/SecretKey.txt
+ # api_key_id: 5a3404ac3768393836093cab/5b02fa7e6d6c356772394170/5b02fad36d6c356772394449
+ vars_prompt:
+
+ - name: "hx_vcenter_password"
+ prompt: "Enter the vCenter administrative password"
+ private: yes
+ confirm: yes
+ unsafe: yes
+
+ - name: "hx_hypervisor_password"
+ prompt: "Enter the new ESXi nodes' administrative password"
+ private: yes
+ confirm: yes
+ unsafe: yes
+
+ - name: "hx_dp_root_password"
+ prompt: "Enter the HyperFlex administrative password"
+ private: yes
+ confirm: yes
+ unsafe: yes
+
+ - name: "execute_auto_support"
+ prompt: "Do you need to enable Auto Support settings? (yes/no)"
+ private: no
+
+ - name: "execute_proxy"
+ prompt: "Do you need to configure proxy settings? (yes/no)"
+ private: no
+
+ - name: "execute_iscsi"
+ prompt: "Do you need to configure additional vNICs for iSCSI settings? (yes/no)"
+ private: no
+
+ - name: "execute_fc"
+ prompt: "Do you need to configure additional vHBAs for FC settings? (yes/no)"
+ private: no
+
+ tasks:
+ # Cluster Profile
+ - import_role:
+ name: policies/hyperflex_policies/cluster_profile
+ vars:
+ hx_cluster_profile: "{{ hx_cluster_name }}"
+ tags: ['cluster_profile']
+ # Software Version
+ - import_role:
+ name: policies/hyperflex_policies/software_version
+ vars:
+ hx_software_policy: "{{ hx_cluster_name }}-software-version-policy"
+ tags: ['software']
+ # DNS
+ - import_role:
+ name: policies/hyperflex_policies/sys_config
+ vars:
+ hx_sys_config_policy: "{{ hx_cluster_name }}-sys-config-policy"
+ tags: ['dns']
+ # Security
+ - import_role:
+ name: policies/hyperflex_policies/local_credential
+ vars:
+ hx_local_credential_policy: "{{ hx_cluster_name }}-local-credential-policy"
+ tags: ['security']
+ # vCenter
+ - import_role:
+ name: policies/hyperflex_policies/vcenter
+ vars:
+ hx_vcenter_config_policy: "{{ hx_cluster_name }}-vcenter-config-policy"
+ tags: ['vcenter']
+ # Storage Config
+ - import_role:
+ name: policies/hyperflex_policies/cluster_storage
+ vars:
+ hx_cluster_storage_policy: "{{ hx_cluster_name }}-cluster-storage-policy"
+ tags: ['storage']
+ # Auto Support
+ - import_role:
+ name: policies/hyperflex_policies/auto_support
+ vars:
+ hx_auto_support_policy: "{{ hx_cluster_name }}-auto-support-policy"
+ hx_auto_support_enable: true
+ when: execute_auto_support|bool
+ tags: ['autosupport']
+ # Proxy
+ - import_role:
+ name: policies/hyperflex_policies/proxy
+ vars:
+ hx_proxy_setting_policy: "{{ hx_cluster_name }}-proxy-setting-policy"
+ when: execute_proxy|bool
+ tags: ['proxy']
+ # FC
+ - import_role:
+ name: policies/hyperflex_policies/fc
+ vars:
+ hx_fc_setting_policy: "{{ hx_cluster_name }}-ext-fc-storage-policy"
+ hx_fc_setting_enable: true
+ when: execute_fc|bool
+ tags: ['fc']
+ # iSCSI
+ - import_role:
+ name: policies/hyperflex_policies/iscsi
+ vars:
+ hx_iscsi_setting_policy: "{{ hx_cluster_name }}-ext-iscsi-storage-policy"
+ hx_iscsi_setting_enable: true
+ when: execute_iscsi|bool
+ tags: ['iscsi']
+ # Network Config
+ - import_role:
+ name: policies/hyperflex_policies/cluster_network
+ vars:
+ hx_cluster_network_policy: "{{ hx_cluster_name }}-cluster-network-policy"
+ tags: ['network']
+ # Node IP and Hostname
+ - import_role:
+ name: policies/hyperflex_policies/node_config
+ vars:
+ hx_node_config_policy: "{{ hx_cluster_name }}-node-config-policy"
+ tags: ['nodes']
+
+ - debug:
+ msg: "All policies and the HyperFlex cluster profile have been created."
+
+ - name: "Prompt to assign"
+ pause:
+ prompt: "Proceed with physical node assignment? (yes/no)"
+ echo: yes
+ register: assign_response
+ run_once: true
+ tags: ['prompt_assign']
+
+ # Assign servers to cluster profile and set deployment action
+ - import_role:
+ name: policies/hyperflex_policies/node_profiles
+ tags: ['assign']
+ when: assign_response.user_input|bool
+
+ - name: "Prompt to deploy"
+ pause:
+ prompt: "Proceed with cluster deployment? (yes/no)"
+ echo: yes
+ register: deploy_response
+ run_once: true
+ tags: ['prompt_deploy']
+
+ # Set cluster profile deployment action
+ - import_role:
+ name: policies/hyperflex_policies/deploy
+ tags: ['deploy']
+ when: deploy_response.user_input|bool
+
+ - debug:
+ msg: "HyperFlex cluster creation is complete."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/hyperflex_edge_cluster_profiles.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/hyperflex_edge_cluster_profiles.yml
new file mode 100644
index 00000000..5950895a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/hyperflex_edge_cluster_profiles.yml
@@ -0,0 +1,142 @@
+---
+#
+# Configure HyperFlex Edge Cluster Profiles
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight_HX'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+- hosts: "{{ group | default('Intersight_HX') }}"
+ connection: local
+ gather_facts: false
+ vars:
+ # If your inventory or host/group_vars don't specify required api key information, you can set directly below:
+ # api_private_key: ~/Downloads/SecretKey.txt
+ # api_key_id: 5a3404ac3768393836093cab/5b02fa7e6d6c356772394170/5b02fad36d6c356772394449
+ vars_prompt:
+
+ - name: "hx_vcenter_password"
+ prompt: "Enter the vCenter administrative password"
+ private: yes
+ confirm: yes
+ unsafe: yes
+
+ - name: "hx_hypervisor_password"
+ prompt: "Enter the new ESXi nodes' administrative password"
+ private: yes
+ confirm: yes
+ unsafe: yes
+
+ - name: "hx_dp_root_password"
+ prompt: "Enter the HyperFlex administrative password"
+ private: yes
+ confirm: yes
+ unsafe: yes
+
+ - name: "execute_auto_support"
+ prompt: "Do you need to enable Auto Support settings? (yes/no)"
+ private: no
+
+ - name: "execute_proxy"
+ prompt: "Do you need to configure proxy settings? (yes/no)"
+ private: no
+
+ tasks:
+ # Cluster Profile
+ - import_role:
+ name: policies/hyperflex_policies/edge_cluster_profile
+ vars:
+ hx_cluster_profile: "{{ hx_cluster_name }}"
+ tags: ['cluster_profile']
+ # Software Version
+ - import_role:
+ name: policies/hyperflex_policies/edge_software_version
+ vars:
+ hx_software_policy: "{{ hx_cluster_name }}-software-version-policy"
+ tags: ['software']
+ # DNS
+ - import_role:
+ name: policies/hyperflex_policies/sys_config
+ vars:
+ hx_sys_config_policy: "{{ hx_cluster_name }}-sys-config-policy"
+ tags: ['dns']
+ # Security
+ - import_role:
+ name: policies/hyperflex_policies/local_credential
+ vars:
+ hx_local_credential_policy: "{{ hx_cluster_name }}-local-credential-policy"
+ tags: ['security']
+ # vCenter
+ - import_role:
+ name: policies/hyperflex_policies/vcenter
+ vars:
+ hx_vcenter_config_policy: "{{ hx_cluster_name }}-vcenter-config-policy"
+ tags: ['vcenter']
+ # Storage Config
+ - import_role:
+ name: policies/hyperflex_policies/edge_cluster_storage
+ vars:
+ hx_cluster_storage_policy: "{{ hx_cluster_name }}-cluster-storage-policy"
+ tags: ['storage']
+ # Auto Support
+ - import_role:
+ name: policies/hyperflex_policies/auto_support
+ vars:
+ hx_auto_support_policy: "{{ hx_cluster_name }}-auto-support-policy"
+ hx_auto_support_enable: true
+ when: execute_auto_support|bool
+ tags: ['autosupport']
+ # Proxy
+ - import_role:
+ name: policies/hyperflex_policies/proxy
+ vars:
+ hx_proxy_setting_policy: "{{ hx_cluster_name }}-proxy-setting-policy"
+ when: execute_proxy|bool
+ tags: ['proxy']
+ # Network Config
+ - import_role:
+ name: policies/hyperflex_policies/edge_cluster_network
+ vars:
+ hx_cluster_network_policy: "{{ hx_cluster_name }}-cluster-network-policy"
+ tags: ['network']
+ # Node IP and Hostname
+ - import_role:
+ name: policies/hyperflex_policies/node_config
+ vars:
+ hx_node_config_policy: "{{ hx_cluster_name }}-node-config-policy"
+ tags: ['nodes']
+
+ - debug:
+ msg: "All policies and the HyperFlex cluster profile have been created."
+
+ - name: "Prompt to assign"
+ pause:
+ prompt: "Proceed with physical node assignment? (yes/no)"
+ echo: yes
+ register: assign_response
+ run_once: true
+ tags: ['prompt_assign']
+
+ # Assign servers to cluster profile and set deployment action
+ - import_role:
+ name: policies/hyperflex_policies/node_profiles
+ tags: ['assign']
+ when: assign_response.user_input|bool
+
+ - name: "Prompt to deploy"
+ pause:
+ prompt: "Proceed with cluster deployment? (yes/no)"
+ echo: yes
+ register: deploy_response
+ run_once: true
+ tags: ['prompt_deploy']
+
+ # Set cluster profile deployment action
+ - import_role:
+ name: policies/hyperflex_policies/deploy
+ tags: ['deploy']
+ when: deploy_response.user_input|bool
+
+ - debug:
+ msg: "HyperFlex Edge cluster creation is complete."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_boot_order_policy.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_boot_order_policy.yml
new file mode 100644
index 00000000..ea20cc06
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_boot_order_policy.yml
@@ -0,0 +1,32 @@
+---
+# Example Playbook: cisco.intersight.intersight_boot_order_policy
+# Runs on localhost since policies are only configured once
+# Author: Tse Kai "Kevin" Chan (@BrightScale)
+- hosts: localhost
+ connection: local
+ collections:
+ - cisco.intersight
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ tasks:
+ - name: Configure Boot Order Policy
+ intersight_boot_order_policy:
+ <<: *api_info
+ organization: "{{ organization | default(omit) }}"
+ name: COS-Boot
+ description: Boot Order policy for lab use
+ tags:
+ - Key: Site
+ Value: RCDN
+ configured_boot_mode: Legacy
+ boot_devices:
+ - device_type: Local Disk
+ device_name: Boot-Lun
+ controller_slot: MRAID
+ - device_type: Virtual Media
+ device_name: vmedia
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_imc_access_policy.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_imc_access_policy.yml
new file mode 100644
index 00000000..070d0027
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_imc_access_policy.yml
@@ -0,0 +1,25 @@
+---
+# Example Playbook: cisco.intersight.intersight_..._policy
+# Runs on localhost since policies are only configured once
+- hosts: localhost
+ connection: local
+ collections:
+ - cisco.intersight
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ tasks:
+ - name: Configure IMC Access policy
+ intersight_imc_access_policy:
+ <<: *api_info
+ name: "{{ imc_access_name | default('sjc02-d23-access') }}"
+ tags:
+ - Key: Site
+ Value: SJC02
+ description: Updated IMC access for SJC labs
+ vlan_id: "{{ imc_access_vlan | default(131) }}"
+ ip_pool: "{{ ip_pool | default('sjc02-d23-ext-mgmt') }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_local_user_policy.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_local_user_policy.yml
new file mode 100644
index 00000000..00939f9a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_local_user_policy.yml
@@ -0,0 +1,51 @@
+---
+# Example Playbook: cisco.intersight.intersight_..._policy
+# Runs on localhost since policies are only configured once
+- hosts: localhost
+ connection: local
+ collections:
+ - cisco.intersight
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ #
+ # Example using vault:
+ # 1. Place the vault password into a plain text file (this is the password for vault access - do not check this into any repos!)
+ # $ cat vault_password_file
+ # ...
+ # 2. Encrypt a string (e.g., 'notagoodpassword'). You will later decrypt using your vault password file
+ # $ ansible-vault encrypt_string --vault-id tme@vault_password_file 'notagoodpassword' --name 'vault_password'
+ # (response is the encrypting string)
+ # 3. Place the vault variable in your playbook (example below):
+ # 4. Run the playbook and supply the vault password file (used to decrypt the vaulted password in the playbook)
+ # $ ansible-playbook -i inventory --vault-id tme@vault_password_file intersight_local_user_policy.yml
+ #
+ vault_password: !vault |
+ $ANSIBLE_VAULT;1.2;AES256;tme
+ 36656264656638646566313633353832396138616264313032303433656636643638363864653936
+ 6532646363303435633965383432633630306566323838640a363566376234303366313064306162
+ 39326331373231643333616335393232353633393834653161633032383539383537656336666639
+ 3635306535366233660a356235393664653538386136626439646137626531663135363636326131
+ 3538
+ tasks:
+ - name: Configure Local User policy
+ intersight_local_user_policy:
+ <<: *api_info
+ name: "{{ local_user_policy | default('guest-admin') }}"
+ tags:
+ - Key: username
+ Value: guest
+ description: Username guest with admin role
+ enforce_strong_password: true
+ enable_password_expiry: false
+ password_history: 5
+ purge: true
+ always_update_password: true
+ local_users:
+ - username: guest
+ role: admin
+ password: "{{ vault_password }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_ntp_policy.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_ntp_policy.yml
new file mode 100644
index 00000000..9f4661b8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_ntp_policy.yml
@@ -0,0 +1,27 @@
+---
+# Example Playbook: cisco.intersight.intersight_ntp_policy
+# Runs on localhost since policies are only configured once
+- hosts: localhost
+ connection: local
+ collections:
+ - cisco.intersight
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ tasks:
+ - name: Configure NTP Policy
+ intersight_ntp_policy:
+ <<: *api_info
+ organization: "{{ organization | default(omit) }}"
+ name: lab-ntp
+ description: NTP policy for lab use
+ tags:
+ - Key: Site
+ Value: RCDN
+ ntp_servers:
+ - ntp.esl.cisco.com
+ timezone: America/Chicago
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_server_profile.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_server_profile.yml
new file mode 100644
index 00000000..399dc67f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_server_profile.yml
@@ -0,0 +1,72 @@
+---
+#
+# Configure Server Profiles
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight_Servers'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+- hosts: "{{ group | default('Intersight_Servers') }}"
+ connection: local
+ collections:
+ - cisco.intersight
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ # Key can be directly specified, and vault should be used to encrypt:
+ # Ex. ansible-vault encrypt_string --vault-id tme@/Users/dsoper/Documents/vault_password_file '-----BEGIN EC PRIVATE KEY-----
+ # <your private key data>
+ # -----END EC PRIVATE KEY-----'
+ api_private_key: !vault |
+ $ANSIBLE_VAULT;1.2;AES256;tme
+ 34376535353966373536386366646435643735636364373163343365623465343466393338386331
+ 3135633161333861386265393631616237623236643263620a613363396362386631613863643364
+ 65376635316232613561373761363633633034346138366165356561666462333562643065393332
+ 6631363239333332640a376632376434366461393039663530386161313864633265353839636337
+ 39393939363535376566333565666537666137366537396639623633643665363066646161633833
+ 35656430366665336334383435326239316333323631306237626432636361356166383466656362
+ 36626566643637366264393933353038653062373035306338663730383739336530313664646162
+ 30623337383832306665356433346331656164366638633563396532313463643032366537666639
+ 32383230633135373764623733653261326536626561656462343565613535386331643365343738
+ 62623631383135623539393538396435623064306636323165623661633466373664326130396663
+ 31333163643763616263623566353565363030383761366566613036616163343530663362313131
+ 32643737653063383330356436303437383966366163383461376236363563313264303833653631
+ 62613432303536386630646166346262636566303563646337653166303937333134356537656630
+ 39303363383262376237366565346638336139346363383634623333356639616538303366616634
+ 35666439356634353530363566313864333966386263623566323564656366356264313166353038
+ 66643566313361636231616338633939323131643061646664396264366538386230366364326633
+ 3831
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ # Server Profile name default
+ profile_name: "SP-{{ inventory_hostname }}"
+ tasks:
+ #
+ # Configure profiles specific to server (run for each server in the inventory)
+ #
+ - set_fact:
+ mode: FIAttached
+ when: mode == 'Intersight'
+ - name: "Configure {{ profile_name }} Server Profile"
+ intersight_server_profile:
+ <<: *api_info
+ organization: "{{ organization | default(omit) }}"
+ name: "{{ profile_name }}"
+ target_platform: "{{ mode | default(omit) }}"
+ tags:
+ - Key: Site
+ Value: SJC02
+ description: "Updated Profile for server name {{ inventory_hostname }}"
+ assigned_server: "{{ server_moid }}"
+ boot_order_policy: "{{ boot_order_policy | default(omit) }}"
+ imc_access_policy: "{{ imc_access_policy | default(omit) }}"
+ lan_connectivity_policy: "{{ lan_connectivity_policy | default(omit) }}"
+ local_user_policy: "{{ local_user_policy | default(omit) }}"
+ ntp_policy: "{{ ntp_policy | default(omit) }}"
+ virtual_media_policy: "{{ virtual_media_policy | default(omit) }}"
+ when: server_moid is defined
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_virtual_media_policy.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_virtual_media_policy.yml
new file mode 100644
index 00000000..7064a06d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/intersight_virtual_media_policy.yml
@@ -0,0 +1,30 @@
+---
+# Example Playbook: cisco.intersight.intersight_virtual_media_policy
+# Runs on localhost since policies are only configured once
+- hosts: localhost
+ connection: local
+ collections:
+ - cisco.intersight
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ tasks:
+ - name: Configure Virtual Media Policy
+ intersight_virtual_media_policy:
+ <<: *api_info
+ organization: DevNet
+ name: COS-VM
+ description: Virtual Media policy for lab use
+ tags:
+ - Key: Site
+ Value: RCDN
+ cdd_virtual_media:
+ mount_type: nfs
+ volume: nfs-cdd
+ remote_hostname: 172.28.224.77
+ remote_path: /mnt/SHARE/ISOS/CENTOS
+ remote_file: CentOS7.iso
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/ova_workflow.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/ova_workflow.yml
new file mode 100644
index 00000000..3f4eea66
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/ova_workflow.yml
@@ -0,0 +1,72 @@
+---
+# Execute Orchestration Workflow
+- hosts: localhost
+ collections:
+ - cisco.intersight
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ image_url: "{{ image_url | default('http://172.28.224.62/UCSPE_4.0.4e.ova') }}"
+ vm_name: "{{ vm_name | default('ucspe-4-0-4e-orch') }}"
+ tasks:
+ - name: Get vCenter Moid
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /asset/DeviceRegistrations
+ query_params:
+ $filter: DeviceIpAddress eq '172.28.225.220'
+ register: vcenter
+ - name: Execute OVA deploy workflow
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /workflow/WorkflowInfos
+ update_method: post
+ api_body: {
+ "Name": "ucspe_vm",
+ "Organization": {
+ # "Selector": "Name eq 'default'",
+ # "ObjectType": "organization.Organization"
+ "Moid": "5dde9f116972652d33539d39"
+ },
+ "Action": "Start",
+ "Input": {
+ "Vcenter": {
+ "Moid": "{{ vcenter.api_response.Moid }}",
+ "ObjectType":"asset.DeviceRegistration"
+ },
+ "Datastore": "Atlanta Data",
+ "Image": "{{ image_url }}",
+ "VmName": "{{ vm_name }}",
+ "PowerOn": false,
+ "Datacenter": "SJC07",
+ "Cluster": "Atlanta"
+ },
+ "WorkflowDefinition": {
+ "Selector": "Name eq 'ucspe_vm'",
+ "ObjectType":"workflow.WorkflowDefinition"
+ },
+ "WorkflowCtx": {
+ "InitiatorCtx": {
+ "InitiatorName":"ucspe_vm",
+ "InitiatorType":"workflow.WorkflowDefinition"
+ }
+ }
+ }
+ register: workflow
+ - name: Get status of OVA deploy workflow
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /workflow/WorkflowInfos
+ query_params:
+ $expand: ParentTaskInfo($select=WorkflowInfo;$expand=WorkflowInfo($select=WorkflowDefinition))
+ $filter: "Moid eq '{{ workflow.api_response.Moid }}'"
+ register: status
+ until: status.api_response.Status != 'RUNNING' and status.api_response.Status != 'WAITING'
+ retries: 10
+ delay: 60
+ ignore_errors: true
+ - debug:
+ msg: "Final workflow status: {{ status.api_response.Status }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/.DS_Store b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/.DS_Store
new file mode 100644
index 00000000..be0f2115
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/.DS_Store
Binary files differ
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/auto_support/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/auto_support/tasks/main.yml
new file mode 100644
index 00000000..c745cfec
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/auto_support/tasks/main.yml
@@ -0,0 +1,28 @@
+---
+- name: "Configure Auto Support Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/AutoSupportPolicies
+ query_params:
+ $filter: "Name eq '{{ hx_auto_support_policy }}'"
+ api_body: {
+ "Name": "{{ hx_auto_support_policy }}",
+ "AdminState":"{{ hx_auto_support_enable }}",
+ "ServiceTicketReceipient":"{{ hx_auto_support_receipient }}",
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: auto_support_policy
+
+- debug: msg="HyperFlex Autosupport Policy named {{ hx_auto_support_policy }} has been created successfully." \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_network/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_network/tasks/main.yml
new file mode 100644
index 00000000..63efa1f5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_network/tasks/main.yml
@@ -0,0 +1,47 @@
+---
+- name: "Configure Cluster Network Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ClusterNetworkPolicies
+ query_params:
+ $filter: "Name eq '{{ hx_cluster_network_policy }}'"
+ api_body: {
+ "Name":"{{ hx_cluster_network_policy }}",
+ "JumboFrame":"{{ hx_jumbo_frames }}",
+ "KvmIpRange":{
+ "StartAddr":"{{ ucs_kvm_start_ip }}",
+ "EndAddr":"{{ ucs_kvm_end_ip }}",
+ "Gateway":"{{ ucs_kvm_gateway }}",
+ "Netmask":"{{ ucs_kvm_netmask }}"
+ },
+ "MacPrefixRange":{
+ "StartAddr":"{{ hx_mac_start }}",
+ "EndAddr":"{{ hx_mac_end }}"
+ },
+ "MgmtVlan":{
+ "Name":"{{ hx_mgmt_vlan_name }}",
+ "VlanId":"{{ hx_mgmt_vlan_id }}"
+ },
+ "VmMigrationVlan":{
+ "Name":"{{ hx_migration_vlan_name }}",
+ "VlanId":"{{ hx_migration_vlan_id }}"
+ },
+ "VmNetworkVlans":"{{ hx_guest_vm_vlans }}",
+ "UplinkSpeed": "default",
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: cluster_network
+
+- debug: msg="HyperFlex Cluster Network Policy named {{ hx_cluster_network_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_profile/defaults/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_profile/defaults/main.yml
new file mode 100644
index 00000000..a7a0ca66
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_profile/defaults/main.yml
@@ -0,0 +1,8 @@
+---
+# Default variable values for HyperFlex Cluster Profiles
+hx_mgmt_platform: FI
+hx_hypervisor_type: ESXi
+hx_replication_factor: 3
+hx_vdi_optimization: false
+hx_disk_cleanup: false
+hx_laz_autoconfig: false
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_profile/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_profile/tasks/main.yml
new file mode 100644
index 00000000..f27baf43
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_profile/tasks/main.yml
@@ -0,0 +1,30 @@
+---
+- name: "Configure Cluster Profile"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ClusterProfiles
+ query_params:
+ $filter: "Name eq '{{ hx_cluster_profile }}'"
+ api_body: {
+ "Name":"{{ hx_cluster_profile }}",
+ "MgmtPlatform":"{{ hx_mgmt_platform }}",
+ "HypervisorType":"{{ hx_hypervisor_type }}",
+ "MgmtIpAddress":"{{ hx_mgmt_ip }}",
+ "MacAddressPrefix":"{{ hx_mgmt_mac_prefix }}",
+ "Replication":"{{ hx_replication_factor }}",
+ "StorageDataVlan":{
+ "Name":"{{ hx_data_vlan_name }}",
+ "VlanId":"{{ hx_data_vlan_id }}"
+ }
+ }
+ register: cluster_profile
+
+- debug: msg="HyperFlex Cluster Profile named {{ hx_cluster_profile }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_storage/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_storage/tasks/main.yml
new file mode 100644
index 00000000..fdfcf5b8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/cluster_storage/tasks/main.yml
@@ -0,0 +1,31 @@
+---
+- name: "Configure Cluster Storage Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ClusterStoragePolicies
+ query_params:
+ $filter: "Name eq '{{ hx_cluster_storage_policy }}'"
+ api_body: {
+ "Name":"{{ hx_cluster_storage_policy }}",
+ "VdiOptimization":"{{ hx_vdi_optimization }}",
+ "DiskPartitionCleanup":"{{ hx_disk_cleanup }}",
+ "LogicalAvalabilityZoneConfig":{
+ "AutoConfig":"{{ hx_laz_autoconfig }}"
+ },
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: storage_setting
+
+- debug: msg="HyperFlex Cluster Storage Policy named {{ hx_cluster_storage_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/deploy/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/deploy/tasks/main.yml
new file mode 100644
index 00000000..13b598b6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/deploy/tasks/main.yml
@@ -0,0 +1,43 @@
+---
+# Get cluster profile
+- name: Get Cluster Profile
+ vars:
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ClusterProfiles
+ query_params:
+ $filter: "Name eq '{{ hx_cluster_name }}'"
+ register: profile
+# Prompt for cluster deployment action
+- name: "Prompt for deployment action"
+ pause:
+ prompt: "Set the deployment action. Valid choices are Validate, Deploy, Continue or Retry."
+ echo: yes
+ register: hx_action
+ run_once: true
+# Set cluster deployment action
+- name: Set Cluster Action
+ vars:
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ClusterProfiles
+ query_params:
+ $filter: "Name eq '{{ hx_cluster_name }}'"
+ api_body: {
+ "Action": "{{ hx_action.user_input }}"
+ }
+ when:
+ - profile.api_response.ConfigContext.ConfigState != 'Configuring'
+ - profile.api_response.ConfigContext.ConfigState != 'Associated'
+# Can optionally wait for subsequent tasks if needed
+# register: result
+# until: result.api_response.config_context.config_state == 'Associated'
+# retries: 20
+# delay: 30
+- debug: msg="HyperFlex Cluster Profile deployment action has been triggered successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_network/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_network/tasks/main.yml
new file mode 100644
index 00000000..616e18ca
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_network/tasks/main.yml
@@ -0,0 +1,35 @@
+---
+- name: "Configure Cluster Network Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ClusterNetworkPolicies
+ query_params:
+ $filter: "Name eq '{{ hx_cluster_network_policy }}'"
+ api_body: {
+ "Name":"{{ hx_cluster_network_policy }}",
+ "JumboFrame":"{{ hx_jumbo_frames }}",
+ "MacPrefixRange":{
+ "StartAddr":"{{ hx_mac_start }}",
+ "EndAddr":"{{ hx_mac_end }}"
+ },
+ "MgmtVlan":{
+ "VlanId":"{{ hx_mgmt_vlan_id }}"
+ },
+ "UplinkSpeed":"{{ hx_uplink_speed }}",
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: cluster_network
+
+- debug: msg="HyperFlex Cluster Network Policy named {{ hx_cluster_network_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_profile/defaults/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_profile/defaults/main.yml
new file mode 100644
index 00000000..7ace5ad5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_profile/defaults/main.yml
@@ -0,0 +1,6 @@
+---
+# Default variable values for HyperFlex Cluster Profiles
+hx_mgmt_platform: EDGE
+hx_hypervisor_type: ESXi
+hx_vdi_optimization: false
+hx_disk_cleanup: false
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_profile/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_profile/tasks/main.yml
new file mode 100644
index 00000000..3238507c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_profile/tasks/main.yml
@@ -0,0 +1,28 @@
+---
+- name: "Configure Cluster Profile"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ClusterProfiles
+ query_params:
+ $filter: "Name eq '{{ hx_cluster_profile }}'"
+ api_body: {
+ "Name":"{{ hx_cluster_profile }}",
+ "MgmtPlatform":"{{ hx_mgmt_platform }}",
+ "HypervisorType":"{{ hx_hypervisor_type }}",
+ "MgmtIpAddress":"{{ hx_mgmt_ip }}",
+ "MacAddressPrefix":"{{ hx_mgmt_mac_prefix }}",
+ "StorageDataVlan":{
+ "VlanId":"{{ hx_data_vlan_id }}"
+ }
+ }
+ register: cluster_profile
+
+- debug: msg="HyperFlex Cluster Profile named {{ hx_cluster_profile }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_storage/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_storage/tasks/main.yml
new file mode 100644
index 00000000..2c95b576
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_cluster_storage/tasks/main.yml
@@ -0,0 +1,28 @@
+---
+- name: "Configure Cluster Storage Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ClusterStoragePolicies
+ query_params:
+ $filter: "Name eq '{{ hx_cluster_storage_policy }}'"
+ api_body: {
+ "Name":"{{ hx_cluster_storage_policy }}",
+ "VdiOptimization":"{{ hx_vdi_optimization }}",
+ "DiskPartitionCleanup":"{{ hx_disk_cleanup }}",
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: storage_setting
+
+- debug: msg="HyperFlex Cluster Storage Policy named {{ hx_cluster_storage_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_software_version/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_software_version/tasks/main.yml
new file mode 100644
index 00000000..28ef27e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/edge_software_version/tasks/main.yml
@@ -0,0 +1,27 @@
+---
+- name: "Configure Software Version Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/SoftwareVersionPolicies
+ query_params:
+ $filter: "Name eq '{{ hx_software_policy }}'"
+ api_body: {
+ "Name":"{{ hx_software_policy }}",
+ "HxdpVersion":"{{ hxdp_version }}",
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: software_policy
+
+- debug: msg="HyperFlex Software Version Policy named {{ hx_software_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/fc/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/fc/tasks/main.yml
new file mode 100644
index 00000000..459cc6dc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/fc/tasks/main.yml
@@ -0,0 +1,49 @@
+---
+- name: "Configure External FC Storage Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ExtFcStoragePolicies
+ query_params:
+ $filter: "Name eq '{{ hx_fc_setting_policy }}'"
+ api_body: {
+ "AdminState":"{{ hx_fc_setting_enable }}",
+ "Name":"{{ hx_fc_setting_policy }}",
+ "ExtaTraffic":{
+ "Name":"{{ hx_vsan_a_name }}",
+ "VsanId":"{{ hx_vsan_a_id }}"
+ },
+ "ExtbTraffic":{
+ "Name":"{{ hx_vsan_b_name }}",
+ "VsanId":"{{ hx_vsan_b_id }}"
+ },
+ "WwxnPrefixRange":{
+ "StartAddr":"{{ hx_fc_wwxn_range_start }}",
+ "EndAddr":"{{ hx_fc_wwxn_range_end }}"
+ },
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: fc_settings
+# Set WWXN prefix for the cluster profile when additional FC HBAs are configured
+- name: "Perform Action on {{ hx_profile_name }} Profile"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ClusterProfiles
+ query_params:
+ $filter: "Name eq '{{ hx_cluster_name }}'"
+ api_body: {
+ "WwxnPrefix": "{{ hx_fc_wwxn_range_start }}"
+ }
+
+- debug: msg="HyperFlex External FC Storage Policy named {{ hx_fc_setting_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/iscsi/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/iscsi/tasks/main.yml
new file mode 100644
index 00000000..bd11cbe2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/iscsi/tasks/main.yml
@@ -0,0 +1,35 @@
+---
+- name: "Configure External iSCSI Storage Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ExtIscsiStoragePolicies
+ query_params:
+ $filter: "Name eq '{{ hx_iscsi_setting_policy }}'"
+ api_body: {
+ "AdminState":"{{ hx_iscsi_setting_enable }}",
+ "Name":"{{ hx_iscsi_setting_policy }}",
+ "ExtaTraffic":{
+ "Name":"{{ hx_iscsi_vlan_a_name }}",
+ "VlanId":"{{ hx_iscsi_vlan_a_id }}"
+ },
+ "ExtbTraffic":{
+ "Name":"{{ hx_iscsi_vlan_b_name }}",
+ "VlanId":"{{ hx_iscsi_vlan_b_id }}"
+ },
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: iscsi_settings
+
+- debug: msg="HyperFlex External iSCSI Storage Policy named {{ hx_iscsi_setting_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/local_credential/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/local_credential/tasks/main.yml
new file mode 100644
index 00000000..781bf621
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/local_credential/tasks/main.yml
@@ -0,0 +1,30 @@
+---
+- name: "Configure Local Credential Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/LocalCredentialPolicies
+ query_params:
+ $filter: "Name eq '{{ hx_local_credential_policy }}'"
+ api_body: {
+ "Name": "{{ hx_local_credential_policy }}",
+ "HypervisorAdmin":"{{ hx_hypervisor_admin }}",
+ "FactoryHypervisorPassword":"{{ hx_hypervisor_factory_password }}",
+ "HypervisorAdminPwd":"{{ hx_hypervisor_password | default(omit) }}",
+ "HxdpRootPwd":"{{ hx_dp_root_password | default(omit) }}",
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: local_credential
+
+- debug: msg="HyperFlex Local Credential Policy named {{ hx_local_credential_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/node_config/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/node_config/tasks/main.yml
new file mode 100644
index 00000000..658a4fb6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/node_config/tasks/main.yml
@@ -0,0 +1,39 @@
+---
+- name: "Configure Node Configuration Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/NodeConfigPolicies
+ query_params:
+ $filter: "Name eq '{{ hx_node_config_policy }}'"
+ api_body: {
+ "Name":"{{ hx_node_config_policy }}",
+ "NodeNamePrefix":"{{ hx_node_profile_prefix }}",
+ "MgmtIpRange":{
+ "StartAddr":"{{ esx_mgmt_ip_start }}",
+ "EndAddr":"{{ esx_mgmt_ip_end }}",
+ "Netmask":"{{ hx_mgmt_netmask }}",
+ "Gateway":"{{ hx_mgmt_gateway }}"
+ },
+ "HxdpIpRange":{
+ "StartAddr":"{{ hx_mgmt_vm_ip_start }}",
+ "EndAddr":"{{ hx_mgmt_vm_ip_end }}",
+ "Netmask":"{{ hx_mgmt_netmask }}",
+ "Gateway":"{{ hx_mgmt_gateway }}"
+ },
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: node_config
+
+- debug: msg="HyperFlex Node Configuration Policy named {{ hx_node_config_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/node_profiles/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/node_profiles/tasks/main.yml
new file mode 100644
index 00000000..f1a41c47
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/node_profiles/tasks/main.yml
@@ -0,0 +1,48 @@
+---
+# Get server Moids
+- name: Get server Moid
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ cisco.intersight.intersight_info:
+ <<: *api_info
+ server_names:
+ - "{{ item }}"
+ loop: "{{ hx_servers }}"
+ register: inventory
+# Get Cluster Profile Attributes
+- name: "Get HyperFlex Cluster Profile"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ClusterProfiles
+ query_params:
+ $filter: "Name eq '{{ hx_cluster_name }}'"
+ register: profile
+# Assign servers and profile to node profile
+- name: "Configure Node Profile"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/NodeProfiles
+ query_params:
+ $filter: "Name eq '{{ hx_node_profile_prefix }}-{{ '%02d' % (idx + 1) }}'"
+ api_body: {
+ "Name":"{{ hx_node_profile_prefix }}-{{ '%02d' % (idx + 1) }}",
+ "AssignedServer": {
+ "Moid": "{{ item.intersight_servers[0].Moid }}"
+ },
+ "ClusterProfile": {
+ "Moid": "{{ profile.api_response.Moid }}"
+ }
+ }
+ when: item.intersight_servers is not none
+ loop: "{{ inventory.results }}"
+ loop_control:
+ index_var: idx
+ label: "{{ item.intersight_servers[0].Name }}"
+
+- debug: msg="HyperFlex Node Profiles have been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/proxy/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/proxy/tasks/main.yml
new file mode 100644
index 00000000..292c9753
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/proxy/tasks/main.yml
@@ -0,0 +1,28 @@
+---
+- name: "Configure Proxy Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/ProxySettingPolicies
+ query_params:
+ $filter: "Name eq '{{ hx_proxy_setting_policy }}'"
+ api_body: {
+ "Name":"{{ hx_proxy_setting_policy }}",
+ "Hostname":"{{ hx_proxy_setting_hostname }}",
+ "Port":"{{ hx_proxy_setting_port }}",
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: proxy_setting
+
+- debug: msg="HyperFlex Proxy Policy named {{ hx_proxy_setting_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/software_version/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/software_version/tasks/main.yml
new file mode 100644
index 00000000..a80243ba
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/software_version/tasks/main.yml
@@ -0,0 +1,28 @@
+---
+- name: "Configure Software Version Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/SoftwareVersionPolicies
+ query_params:
+ $filter: "Name eq '{{ hx_software_policy }}'"
+ api_body: {
+ "Name":"{{ hx_software_policy }}",
+ "HxdpVersion":"{{ hxdp_version }}",
+ "ServerFirmwareVersion":"{{ ucs_firmware_version }}",
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: software_policy
+
+- debug: msg="HyperFlex Software Version Policy named {{ hx_software_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/sys_config/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/sys_config/tasks/main.yml
new file mode 100644
index 00000000..9cf75443
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/sys_config/tasks/main.yml
@@ -0,0 +1,30 @@
+---
+- name: "Configure System Config Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/SysConfigPolicies
+ query_params:
+ $filter: "Name eq '{{ hx_sys_config_policy }}'"
+ api_body: {
+ "Name": "{{ hx_sys_config_policy }}",
+ "Timezone":"{{ hx_sys_config_timezone }}",
+ "DnsServers":"{{ hx_sys_config_dns_servers }}",
+ "NtpServers":"{{ hx_sys_config_ntp_servers }}",
+ "DnsDomainName":"{{ hx_sys_config_dns_domain }}",
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: sys_config
+
+- debug: msg="HyperFlex System Config Policy named {{ hx_sys_config_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/vcenter/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/vcenter/tasks/main.yml
new file mode 100644
index 00000000..4e1a351f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/hyperflex_policies/vcenter/tasks/main.yml
@@ -0,0 +1,30 @@
+---
+- name: "Configure vCenter Config Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /hyperflex/VcenterConfigPolicies
+ query_params:
+ $filter: "Name eq '{{ hx_vcenter_config_policy }}'"
+ api_body: {
+ "Name":"{{ hx_vcenter_config_policy }}",
+ "Hostname":"{{ hx_vcenter_hostname }}",
+ "Username":"{{ hx_vcenter_username }}",
+ "Password":"{{ hx_vcenter_password | default(omit) }}",
+ "DataCenter":"{{ hx_vcenter_datacenter }}",
+ "ClusterProfiles": [
+ {
+ "Moid": "{{ cluster_profile.api_response.Moid }}"
+ }
+ ]
+ }
+ register: vcenter
+
+- debug: msg="HyperFlex vCenter Config Policy named {{ hx_vcenter_config_policy }} has been created successfully."
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/server_policies/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/server_policies/tasks/main.yml
new file mode 100644
index 00000000..427b45d5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/policies/server_policies/tasks/main.yml
@@ -0,0 +1,40 @@
+---
+- name: "Configure {{ api_body.Name }} Server Policy"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ cisco.intersight.intersight_rest_api:
+ <<: *api_info
+ resource_path: "{{ resource_path }}"
+ query_params:
+ $filter: "Name eq '{{ api_body.Name }}'"
+ api_body: "{{ api_body }}"
+ register: policy_resp
+# Append profile_resp list to policy
+- block:
+ # Create a list of all host's profile Moids
+ - set_fact:
+ # See the Ansible docs on json_query for info on how the Moid data is being extracted
+ profile_list: "{{ ansible_play_hosts | map('extract', hostvars, 'profile_resp') | list | json_query(moid_query) }}"
+ vars:
+ moid_query: "[*].api_response.{Moid: Moid, ObjectType: 'server.Profile'}"
+ - name: "Update Server Profiles used by {{ api_body.Name }} Server Policy (change may always be reported)"
+ cisco.intersight.intersight_rest_api:
+ <<: *api_info
+ resource_path: "{{ resource_path }}"
+ query_params:
+ $filter: "Name eq '{{ api_body.Name }}'"
+ api_body: {
+ "Profiles": "{{ profile_list + policy_resp.api_response.Profiles }}"
+ }
+ # Do not update if the profile isn't available
+ when:
+ - profile_resp is defined
+ - profile_resp.api_response.Moid is defined
+ - policy_resp is defined
+ - policy_resp.api_response.Profiles is defined
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/servers/actions/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/servers/actions/tasks/main.yml
new file mode 100644
index 00000000..0fb1ae9c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/roles/servers/actions/tasks/main.yml
@@ -0,0 +1,30 @@
+---
+- name: "Configure {{ inventory_hostname }} power state"
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ cisco.intersight.intersight_rest_api:
+ <<: *api_info
+ resource_path: /compute/ServerSettings
+ query_params:
+ $filter: "Server.Moid eq '{{ server_moid }}'"
+ api_body: {
+ "AdminPowerState": "{{ power_state }}"
+ }
+ when: power_state is defined
+# Configure LED locator state
+- name: "Configure {{ inventory_hostname }} locator state"
+ cisco.intersight.intersight_rest_api:
+ <<: *api_info
+ resource_path: /compute/ServerSettings
+ query_params:
+ $filter: "Server.Moid eq '{{ server_moid }}'"
+ api_body: {
+ "AdminLocatorLedState": "{{ locator_state }}"
+ }
+ when: locator_state is defined
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/server_actions.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/server_actions.yml
new file mode 100644
index 00000000..87b2477e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/server_actions.yml
@@ -0,0 +1,23 @@
+---
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight_Servers'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+- hosts: "{{ group | default('Intersight_Servers') }}"
+ connection: local
+ gather_facts: false
+ tasks:
+ - import_role:
+ name: servers/actions
+ vars:
+ # power and reset state
+ # options: Policy, PowerOn, PowerOff, PowerCycle, HardReset, Shutdown, Reboot
+ # Can override on the command line: ansible-playbook ... -e power_state=PowerCycle
+ power_state: PowerOn
+ # led locator state
+ # options: On, Off, None
+ # Can override on the command line: ansible-playbook ... -e locator_state=Off
+ # locator_state: On
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/server_firmware.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/server_firmware.yml
new file mode 100644
index 00000000..6888fa78
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/server_firmware.yml
@@ -0,0 +1,115 @@
+---
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight_Servers'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+- hosts: "{{ group | default('Intersight_Servers') }}"
+ connection: local
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ fw_version: 4.1(2b)
+ file_share: 172.28.224.77/mnt/SHARE/ISOS/HUU
+ tasks:
+ # Edit FW to be used as needed for server type below
+ - set_fact:
+ file_name: "ucs-c220m4-huu-{{ fw_version | replace('(','.') | replace(')','') }}.iso"
+ supported_models:
+ - UCSC-C220-M4L
+ - UCSC-C220-M4S
+ when: model is search("UCSC-C220-M4.*")
+ - set_fact:
+ file_name: "ucs-c240m4-huu-{{ fw_version | replace('(','.') | replace(')','') }}.iso"
+ supported_models:
+ - UCSC-C240-M4L
+ - UCSC-C240-M4S
+ - UCSC-C240-M4SX
+ - UCSC-C240-M4SNEBS
+ - UCSC-C240-M4S2
+ when: model is search("UCSC-C240-M4.*")
+ - set_fact:
+ file_name: "ucs-c240m5-huu-{{ fw_version | replace('(','.') | replace(')','') }}.iso"
+ supported_models:
+ - UCSC-C240-M5S
+ - UCSC-C240-M5L
+ - UCSC-C240-M5SX
+ - UCSC-C240-M5SN
+ - UCSC-C240-M5SD
+ - HX240C-M5SX
+ - HXAF240C-M5SX
+ - HX240C-M5L
+ - HX240C-M5SD
+ - HXAF240C-M5SD
+ when: model is search("UCSC-C240-M5.*")
+ - set_fact:
+ file_name: "ucs-c220m5-huu-{{ fw_version | replace('(','.') | replace(')','') }}.iso"
+ supported_models:
+ - UCSC-C220-M5SX
+ - UCSC-C220-M5L
+ - UCSC-C220-M5SN
+ - HX220C-M5SX
+ - HXAF220C-M5SX
+ when: model is search("UCSC-C220-M5.*")
+ - set_fact:
+ file_location: "{{ file_share }}/{{ file_name }}"
+ # Set the distributable type based on the management mode and server type
+ - set_fact:
+ dist_type: STANDALONE
+ when: mode == 'Intersight' or mode == 'IntersightStandalone'
+ # Get a user defined FW version
+ - name: Get Moid of user defined FW version
+ intersight_rest_api:
+ <<: *api_info
+ resource_path: /firmware/Distributables
+ query_params:
+ $filter: "FileLocation eq '{{ file_location }}'"
+ update_method: post
+ api_body: {
+ "Catalog": {
+ "Moid": "5cd993686567612d30aaa762"
+ },
+ "ImportAction": "None",
+ "Name": "{{ file_name }}",
+ "Origin": "User",
+ "Source": {
+ "ObjectType": "softwarerepository.NfsServer",
+ "FileLocation": "{{ file_location }}"
+ },
+ "SupportedModels": "{{ supported_models }}",
+ "Version": "{{ fw_version }}"
+ }
+ delegate_to: localhost
+ register: fw_resp
+ - name: Update server firmware
+ cisco.intersight.intersight_rest_api:
+ <<: *api_info
+ resource_path: /firmware/Upgrades
+ query_params:
+ $filter: "Server.Moid eq '{{ server_moid }}'"
+ update_method: post
+ # nw_upgrade_full supported in UI, nw_upgrade_mount_only has partial API support
+ api_body: {
+ "UpgradeType": "network_upgrade",
+ "Distributable": {
+ "Moid": "{{ fw_resp.api_response.Moid }}"
+ },
+ "DirectDownload": {},
+ "NetworkShare": {
+ "Upgradeoption": "nw_upgrade_mount_only",
+ "MapType":"nfs"
+ },
+ "Server": {
+ "ObjectType": "compute.{{ object_type }}",
+ "Moid": "{{ server_moid }}"
+ }
+ }
+ delegate_to: localhost
+ when: server_moid is defined
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_all_inventory.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_all_inventory.yml
new file mode 100644
index 00000000..b222cdc5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_all_inventory.yml
@@ -0,0 +1,55 @@
+---
+#
+# Summary: Auto generate (or update) the Ansible inventory file with all servers (Name and Moid or each discovered server)
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+# This playbook only runs once (and not for each server in the inventory), but the hosts group is used to get API key info
+#
+- hosts: "{{ group | default('Intersight') }}"
+ connection: local
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ # Change filepath if you want to update a different inventory file
+ filepath: "{{ inventory_file }}"
+ # Change host_group if you want to use another group name for your servers in the created inventory
+ host_group: Intersight_Servers
+ tasks:
+ # Enclose tasks in a block that is only run once
+ - block:
+ # Find all servers
+ - cisco.intersight.intersight_info:
+ <<: *api_info
+ server_names:
+ register: all_results
+ # Place the servers in a group in the file
+ - debug:
+ msg: Inventory filepath "{{ filepath }}"
+ - lineinfile:
+ path: "{{ filepath }}"
+ line: "[{{ host_group }}]"
+ create: true
+ # Update servers in the file
+ - lineinfile:
+ path: "{{ filepath }}"
+ insertafter: "^\\[{{ host_group }}\\]"
+ regexp: "^{{ item.Name }} serial={{ item.Serial }} "
+ # Each line of the inventory has the following:
+ line: "{{ item.Name }} serial={{ item.Serial }} server_moid={{ item.Moid }} model={{ item.Model }} mode={{ item.ManagementMode }} object_type={{ item.SourceObjectType | regex_replace('compute.')}}"
+ create: true
+ loop: "{{ all_results.intersight_servers }}"
+ loop_control:
+ label: "{{ item.Name }}"
+ when: all_results.intersight_servers is defined
+ delegate_to: localhost
+ run_once: true
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_hx_edge_inventory.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_hx_edge_inventory.yml
new file mode 100644
index 00000000..6bc855ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_hx_edge_inventory.yml
@@ -0,0 +1,61 @@
+---
+#
+# Summary: Auto generate (or update) the Ansible inventory file with all servers (Name and Moid or each discovered server)
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+# This playbook only runs once (and not for each server in the inventory), but the hosts group is used to get API key info
+#
+- hosts: "{{ group | default('Intersight') }}"
+ connection: local
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ # Change filepath if you want to update a different inventory file
+ filepath: "{{ inventory_file }}"
+ # Change host_group if you want to use another group name for your servers in the created inventory
+ host_group: Intersight_Servers
+ tasks:
+ # Enclose tasks in a block that is only run once
+ - block:
+ # Find all servers
+ - cisco.intersight.intersight_info:
+ <<: *api_info
+ server_names:
+ register: all_results
+ # Place the servers in a group in the file
+ - debug:
+ msg: Inventory filepath "{{ filepath }}"
+ - lineinfile:
+ path: "{{ filepath }}"
+ line: "[{{ host_group }}]"
+ create: true
+ # Update servers in the file
+ - lineinfile:
+ path: "{{ filepath }}"
+ insertafter: "^\\[{{ host_group }}\\]"
+ regexp: "^{{ item.Name }} serial={{ item.Serial }} "
+ # Each line of the inventory has the following:
+ # Name server_moid=<Moid value> model=<Model value> boot_policy=<policy from tag> | 'na'
+ line: "{{ item.Name }} serial={{ item.Serial }} server_moid={{ item.Moid }} model={{ item.Model }}"
+ create: true
+ # Ansible and jmespath contains have type differences, so to/from_json used
+ loop: "{{ all_results.intersight_servers | json_query(platform_query) | to_json | from_json | json_query(model_query) }}"
+ loop_control:
+ label: "{{ item.Name }}"
+ vars:
+ # Filter for IMC and C-Series only (no HX)
+ platform_query: "[?PlatformType=='IMC']"
+ model_query: "[?contains(Model, 'HX')]"
+ when: all_results.intersight_servers is defined
+ delegate_to: localhost
+ run_once: true
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_hx_inventory.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_hx_inventory.yml
new file mode 100644
index 00000000..cb3e25ac
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_hx_inventory.yml
@@ -0,0 +1,61 @@
+---
+#
+# Summary: Auto generate (or update) the Ansible inventory file with all servers (Name and Moid or each discovered server)
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+# This playbook only runs once (and not for each server in the inventory), but the hosts group is used to get API key info
+#
+- hosts: "{{ group | default('Intersight') }}"
+ connection: local
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ # Change filepath if you want to update a different inventory file
+ filepath: "{{ inventory_file }}"
+ # Change host_group if you want to use another group name for your servers in the created inventory
+ host_group: Intersight_Servers
+ tasks:
+ # Enclose tasks in a block that is only run once
+ - block:
+ # Find all servers
+ - cisco.intersight.intersight_info:
+ <<: *api_info
+ server_names:
+ register: all_results
+ # Place the servers in a group in the file
+ - debug:
+ msg: Inventory filepath "{{ filepath }}"
+ - lineinfile:
+ path: "{{ filepath }}"
+ line: "[{{ host_group }}]"
+ create: true
+ # Update servers in the file
+ - lineinfile:
+ path: "{{ filepath }}"
+ insertafter: "^\\[{{ host_group }}\\]"
+ regexp: "^{{ item.Name }} serial={{ item.Serial }} "
+ # Each line of the inventory has the following:
+ # Name server_moid=<Moid value> model=<Model value> boot_policy=<policy from tag> | 'na'
+ line: "{{ item.Name }} serial={{ item.Serial }} server_moid={{ item.Moid }} model={{ item.Model }}"
+ create: true
+ # Ansible and jmespath contains have type differences, so to/from_json used
+ loop: "{{ all_results.intersight_servers | json_query(platform_query) | to_json | from_json | json_query(model_query) }}"
+ loop_control:
+ label: "{{ item.Name }}"
+ vars:
+ # Filter for IMC and C-Series only (no HX)
+ platform_query: "[?PlatformType=='UCSFI']"
+ model_query: "[?contains(Model, 'HX')]"
+ when: all_results.intersight_servers is defined
+ delegate_to: localhost
+ run_once: true
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_standalone_inventory.yml b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_standalone_inventory.yml
new file mode 100644
index 00000000..f1a55f79
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/playbooks/update_standalone_inventory.yml
@@ -0,0 +1,60 @@
+---
+#
+# Summary: Auto generate (or update) the Ansible inventory file with Standalone C-Series servers (Name and Moid or each discovered server)
+#
+# The hosts group used is provided by the group variable or defaulted to 'Intersight'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+# This playbook only runs once (and not for each server in the inventory), but the hosts group is used to get API key info
+#
+- hosts: "{{ group | default('Intersight') }}"
+ connection: local
+ gather_facts: false
+ vars:
+ # Create an anchor for api_info that can be used throughout the file
+ api_info: &api_info
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_uri: "{{ api_uri | default(omit) }}"
+ validate_certs: "{{ validate_certs | default(omit) }}"
+ state: "{{ state | default(omit) }}"
+ # Change filepath if you want to update a different inventory file
+ filepath: "{{ inventory_file }}"
+ # Change host_group if you want to use another group name for your servers in the created inventory
+ host_group: Intersight_Servers
+ tasks:
+ # Enclose tasks in a block that is only run once
+ - block:
+ # Find all servers
+ - cisco.intersight.intersight_rest_api:
+ <<: *api_info
+ resource_path: /compute/PhysicalSummaries
+ query_params:
+ $filter: "PlatformType eq 'IMC' and contains(Model, 'UCSC-C')"
+ $top: 1000
+ return_list: true
+ register: results
+ # Place the servers in a group in the file
+ - debug:
+ msg: Inventory filepath "{{ filepath }}"
+ - lineinfile:
+ path: "{{ filepath }}"
+ line: "[{{ host_group }}]"
+ create: true
+ # Update standalone servers (IMC) in the file
+ - lineinfile:
+ path: "{{ filepath }}"
+ insertafter: "^\\[{{ host_group }}\\]"
+ regexp: "^{{ item.Name }} "
+ # Each line of the inventory has the following:
+ # Name server_moid=<Moid value> model=<Model value> boot_policy=<policy from tag> | 'na'
+ line: "{{ item.Name }} server_moid={{ item.Moid }} model={{ item.Model }}"
+ create: true
+ loop: "{{ results.api_response }}"
+ loop_control:
+ label: "{{ item.Name }}"
+ when: results.api_response is defined
+ delegate_to: localhost
+ run_once: true
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/plugins/README.md b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/README.md
new file mode 100644
index 00000000..6541cf7c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/README.md
@@ -0,0 +1,31 @@
+# Collections Plugins Directory
+
+This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that
+is named after the type of plugin it is in. It can also include the `module_utils` and `modules` directory that
+would contain module utils and modules respectively.
+
+Here is an example directory of the majority of plugins currently supported by Ansible:
+
+```
+└── plugins
+ ├── action
+ ├── become
+ ├── cache
+ ├── callback
+ ├── cliconf
+ ├── connection
+ ├── filter
+ ├── httpapi
+ ├── inventory
+ ├── lookup
+ ├── module_utils
+ ├── modules
+ ├── netconf
+ ├── shell
+ ├── strategy
+ ├── terminal
+ ├── test
+ └── vars
+```
+
+A full list of plugin types can be found at [Working With Plugins](https://docs.ansible.com/ansible/2.9/plugins/plugins.html). \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/plugins/doc_fragments/intersight.py b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/doc_fragments/intersight.py
new file mode 100644
index 00000000..fb7f2f00
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/doc_fragments/intersight.py
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+
+# This code is part of Ansible, but is an independent component.
+# This particular file snippet, and this file snippet only, is BSD licensed.
+# Modules you write using this snippet, which is embedded dynamically by Ansible
+# still belong to the author of the module, and may assign their own license
+# to the complete work.
+#
+# (c) 2016 Red Hat Inc.
+# (c) 2017 Cisco Systems Inc.
+#
+# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
+#
+
+
+class ModuleDocFragment(object):
+ # Cisco Intersight doc fragment
+ DOCUMENTATION = '''
+options:
+ api_private_key:
+ description:
+ - 'Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication.'
+ - If a string is used, Ansible vault should be used to encrypt string data.
+ - "Ex. ansible-vault encrypt_string --vault-id tme@/Users/dsoper/Documents/vault_password_file '-----BEGIN EC PRIVATE KEY-----"
+ - " <your private key data>"
+ - " -----END EC PRIVATE KEY-----'"
+ type: path or str
+ required: yes
+ api_uri:
+ description:
+ - URI used to access the Intersight API.
+ type: str
+ default: https://intersight.com/api/v1
+ api_key_id:
+ description:
+ - Public API Key ID associated with the private key.
+ type: str
+ required: yes
+ validate_certs:
+ description:
+ - Boolean control for verifying the api_uri TLS certificate
+ type: bool
+ default: yes
+ use_proxy:
+ description:
+ - If C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+ type: bool
+ default: yes
+'''
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/plugins/module_utils/intersight.py b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/module_utils/intersight.py
new file mode 100644
index 00000000..36e0acc3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/module_utils/intersight.py
@@ -0,0 +1,470 @@
+# This code is part of Ansible, but is an independent component.
+# This particular file snippet, and this file snippet only, is BSD licensed.
+# Modules you write using this snippet, which is embedded dynamically by Ansible
+# still belong to the author of the module, and may assign their own license
+# to the complete work.
+#
+# (c) 2016 Red Hat Inc.
+# (c) 2020 Cisco Systems Inc.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Intersight REST API Module
+# Author: Matthew Garrett
+# Contributors: David Soper, Chris Gascoigne, John McDonough
+
+from base64 import b64encode
+from email.utils import formatdate
+import re
+import json
+import hashlib
+from ansible.module_utils.six import iteritems
+from ansible.module_utils.six.moves.urllib.parse import urlparse, urlencode
+from ansible.module_utils.urls import fetch_url
+
+try:
+ from cryptography.hazmat.primitives import serialization, hashes
+ from cryptography.hazmat.primitives.asymmetric import padding, ec
+ from cryptography.hazmat.backends import default_backend
+ HAS_CRYPTOGRAPHY = True
+except ImportError:
+ HAS_CRYPTOGRAPHY = False
+
+intersight_argument_spec = dict(
+ api_private_key=dict(type='path', required=True),
+ api_uri=dict(type='str', default='https://intersight.com/api/v1'),
+ api_key_id=dict(type='str', required=True),
+ validate_certs=dict(type='bool', default=True),
+ use_proxy=dict(type='bool', default=True),
+)
+
+
+def get_sha256_digest(data):
+ """
+ Generates a SHA256 digest from a String.
+
+ :param data: data string set by user
+ :return: instance of digest object
+ """
+
+ digest = hashlib.sha256()
+ digest.update(data.encode())
+
+ return digest
+
+
+def prepare_str_to_sign(req_tgt, hdrs):
+ """
+ Concatenates Intersight headers in preparation to be signed
+
+ :param req_tgt : http method plus endpoint
+ :param hdrs: dict with header keys
+ :return: concatenated header authorization string
+ """
+ ss = ""
+ ss = ss + "(request-target): " + req_tgt + "\n"
+
+ length = len(hdrs.items())
+
+ i = 0
+ for key, value in hdrs.items():
+ ss = ss + key.lower() + ": " + value
+ if i < length - 1:
+ ss = ss + "\n"
+ i += 1
+
+ return ss
+
+
+def get_gmt_date():
+ """
+ Generated a GMT formatted Date
+
+ :return: current date
+ """
+
+ return formatdate(timeval=None, localtime=False, usegmt=True)
+
+
+def compare_lists(expected_list, actual_list):
+ if len(expected_list) != len(actual_list):
+ # mismatch if list lengths aren't equal
+ return False
+ for expected, actual in zip(expected_list, actual_list):
+ # if compare_values returns False, stop the loop and return
+ if not compare_values(expected, actual):
+ return False
+ # loop complete with all items matching
+ return True
+
+
+def compare_values(expected, actual):
+ try:
+ if isinstance(expected, list) and isinstance(actual, list):
+ return compare_lists(expected, actual)
+ for (key, value) in iteritems(expected):
+ if re.search(r'P(ass)?w(or)?d', key) or key not in actual:
+ # do not compare any password related attributes or attributes that are not in the actual resource
+ continue
+ if not compare_values(value, actual[key]):
+ return False
+ # loop complete with all items matching
+ return True
+ except (AttributeError, TypeError):
+ # if expected and actual != expected:
+ if actual != expected:
+ return False
+ return True
+
+
+class IntersightModule():
+
+ def __init__(self, module):
+ self.module = module
+ self.result = dict(changed=False)
+ if not HAS_CRYPTOGRAPHY:
+ self.module.fail_json(msg='cryptography is required for this module')
+ self.host = self.module.params['api_uri']
+ self.public_key = self.module.params['api_key_id']
+ try:
+ with open(self.module.params['api_private_key'], 'r') as f:
+ self.private_key = f.read()
+ except FileNotFoundError:
+ self.private_key = self.module.params['api_private_key']
+ self.digest_algorithm = ''
+ self.response_list = []
+
+ def get_sig_b64encode(self, data):
+ """
+ Generates a signed digest from a String
+
+ :param digest: string to be signed & hashed
+ :return: instance of digest object
+ """
+ # Python SDK code: Verify PEM Pre-Encapsulation Boundary
+ r = re.compile(r"\s*-----BEGIN (.*)-----\s+")
+ m = r.match(self.private_key)
+ if not m:
+ raise ValueError("Not a valid PEM pre boundary")
+ pem_header = m.group(1)
+ key = serialization.load_pem_private_key(self.private_key.encode(), None, default_backend())
+ if pem_header == 'RSA PRIVATE KEY':
+ sign = key.sign(data.encode(), padding.PKCS1v15(), hashes.SHA256())
+ self.digest_algorithm = 'rsa-sha256'
+ elif pem_header == 'EC PRIVATE KEY':
+ sign = key.sign(data.encode(), ec.ECDSA(hashes.SHA256()))
+ self.digest_algorithm = 'hs2019'
+ else:
+ raise Exception("Unsupported key: {0}".format(pem_header))
+
+ return b64encode(sign)
+
+ def get_auth_header(self, hdrs, signed_msg):
+ """
+ Assmebled an Intersight formatted authorization header
+
+ :param hdrs : object with header keys
+ :param signed_msg: base64 encoded sha256 hashed body
+ :return: concatenated authorization header
+ """
+
+ auth_str = "Signature"
+
+ auth_str = auth_str + " " + "keyId=\"" + self.public_key + "\"," + "algorithm=\"" + self.digest_algorithm + "\","
+
+ auth_str = auth_str + "headers=\"(request-target)"
+
+ for key, dummy in hdrs.items():
+ auth_str = auth_str + " " + key.lower()
+ auth_str = auth_str + "\""
+
+ auth_str = auth_str + "," + "signature=\"" + signed_msg.decode('ascii') + "\""
+
+ return auth_str
+
+ def get_moid_by_name(self, resource_path, target_name):
+ """
+ Retrieve an Intersight object moid by name
+
+ :param resource_path: intersight resource path e.g. '/ntp/Policies'
+ :param target_name: intersight object name
+ :return: json http response object
+ """
+ query_params = {
+ "$filter": "Name eq '{0}'".format(target_name)
+ }
+
+ options = {
+ "http_method": "GET",
+ "resource_path": resource_path,
+ "query_params": query_params
+ }
+
+ get_moid = self.intersight_call(**options)
+
+ if get_moid.json()['Results'] is not None:
+ located_moid = get_moid.json()['Results'][0]['Moid']
+ else:
+ raise KeyError('Intersight object with name "{0}" not found!'.format(target_name))
+
+ return located_moid
+
+ def call_api(self, **options):
+ """
+ Call the Intersight API and check for success status
+ :param options: options dict with method and other params for API call
+ :return: json http response object
+ """
+
+ try:
+ response, info = self.intersight_call(**options)
+ if not re.match(r'2..', str(info['status'])):
+ raise RuntimeError(info['status'], info['msg'], info['body'])
+ except Exception as e:
+ self.module.fail_json(msg="API error: %s " % str(e))
+
+ response_data = response.read()
+ if len(response_data) > 0:
+ resp_json = json.loads(response_data)
+ resp_json['trace_id'] = info.get('x-starship-traceid')
+ return resp_json
+ return {}
+
+ def intersight_call(self, http_method="", resource_path="", query_params=None, body=None, moid=None, name=None):
+ """
+ Invoke the Intersight API
+
+ :param resource_path: intersight resource path e.g. '/ntp/Policies'
+ :param query_params: dictionary object with query string parameters as key/value pairs
+ :param body: dictionary object with intersight data
+ :param moid: intersight object moid
+ :param name: intersight object name
+ :return: json http response object
+ """
+
+ target_host = urlparse(self.host).netloc
+ target_path = urlparse(self.host).path
+ query_path = ""
+ method = http_method.upper()
+ bodyString = ""
+
+ # Verify an accepted HTTP verb was chosen
+ if(method not in ['GET', 'POST', 'PATCH', 'DELETE']):
+ raise ValueError('Please select a valid HTTP verb (GET/POST/PATCH/DELETE)')
+
+ # Verify the resource path isn't empy & is a valid <str> object
+ if(resource_path != "" and not (resource_path, str)):
+ raise TypeError('The *resource_path* value is required and must be of type "<str>"')
+
+ # Verify the query parameters isn't empy & is a valid <dict> object
+ if(query_params is not None and not isinstance(query_params, dict)):
+ raise TypeError('The *query_params* value must be of type "<dict>"')
+
+ # Verify the MOID is not null & of proper length
+ if(moid is not None and len(moid.encode('utf-8')) != 24):
+ raise ValueError('Invalid *moid* value!')
+
+ # Check for query_params, encode, and concatenate onto URL
+ if query_params:
+ query_path = "?" + urlencode(query_params)
+
+ # Handle PATCH/DELETE by Object "name" instead of "moid"
+ if method in ('PATCH', 'DELETE'):
+ if moid is None:
+ if name is not None:
+ if isinstance(name, str):
+ moid = self.get_moid_by_name(resource_path, name)
+ else:
+ raise TypeError('The *name* value must be of type "<str>"')
+ else:
+ raise ValueError('Must set either *moid* or *name* with "PATCH/DELETE!"')
+
+ # Check for moid and concatenate onto URL
+ if moid is not None:
+ resource_path += "/" + moid
+
+ # Check for GET request to properly form body
+ if method != "GET":
+ bodyString = json.dumps(body)
+
+ # Concatenate URLs for headers
+ target_url = self.host + resource_path + query_path
+ request_target = method.lower() + " " + target_path + resource_path + query_path
+
+ # Get the current GMT Date/Time
+ cdate = get_gmt_date()
+
+ # Generate the body digest
+ body_digest = get_sha256_digest(bodyString)
+ b64_body_digest = b64encode(body_digest.digest())
+
+ # Generate the authorization header
+ auth_header = {
+ 'Host': target_host,
+ 'Date': cdate,
+ 'Digest': "SHA-256=" + b64_body_digest.decode('ascii'),
+ }
+
+ string_to_sign = prepare_str_to_sign(request_target, auth_header)
+ b64_signed_msg = self.get_sig_b64encode(string_to_sign)
+ auth_header = self.get_auth_header(auth_header, b64_signed_msg)
+
+ # Generate the HTTP requests header
+ request_header = {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json',
+ 'Host': '{0}'.format(target_host),
+ 'Date': '{0}'.format(cdate),
+ 'Digest': 'SHA-256={0}'.format(b64_body_digest.decode('ascii')),
+ 'Authorization': '{0}'.format(auth_header),
+ }
+
+ response, info = fetch_url(self.module, target_url, data=bodyString, headers=request_header, method=method, use_proxy=self.module.params['use_proxy'])
+
+ return response, info
+
+ def get_resource(self, resource_path, query_params, return_list=False):
+ '''
+ GET a resource and return the 1st element found or the full Results list
+ '''
+ options = {
+ 'http_method': 'get',
+ 'resource_path': resource_path,
+ 'query_params': query_params,
+ }
+ response = self.call_api(**options)
+ if response.get('Results'):
+ if return_list:
+ self.result['api_response'] = response['Results']
+ else:
+ # return the 1st list element
+ self.result['api_response'] = response['Results'][0]
+ self.result['trace_id'] = response.get('trace_id')
+
+ def configure_resource(self, moid, resource_path, body, query_params, update_method=''):
+ if not self.module.check_mode:
+ if moid and update_method != 'post':
+ # update the resource - user has to specify all the props they want updated
+ options = {
+ 'http_method': 'patch',
+ 'resource_path': resource_path,
+ 'body': body,
+ 'moid': moid,
+ }
+ response_dict = self.call_api(**options)
+ if response_dict.get('Results'):
+ # return the 1st element in the results list
+ self.result['api_response'] = response_dict['Results'][0]
+ self.result['trace_id'] = response_dict.get('trace_id')
+ else:
+ # create the resource
+ options = {
+ 'http_method': 'post',
+ 'resource_path': resource_path,
+ 'body': body,
+ }
+ response_dict = self.call_api(**options)
+ if response_dict:
+ self.result['api_response'] = response_dict
+ self.result['trace_id'] = response_dict.get('trace_id')
+ elif query_params:
+ # POSTs may not return any data.
+ # Get the current state of the resource if query_params.
+ self.get_resource(
+ resource_path=resource_path,
+ query_params=query_params,
+ )
+ self.result['changed'] = True
+
+ def delete_resource(self, moid, resource_path):
+ # delete resource and create empty api_response
+ if not self.module.check_mode:
+ options = {
+ 'http_method': 'delete',
+ 'resource_path': resource_path,
+ 'moid': moid,
+ }
+ resp = self.call_api(**options)
+ self.result['api_response'] = {}
+ self.result['trace_id'] = resp.get('trace_id')
+ self.result['changed'] = True
+
+ def configure_policy_or_profile(self, resource_path):
+ # Configure (create, update, or delete) the policy or profile
+ organization_moid = None
+ # GET Organization Moid
+ self.get_resource(
+ resource_path='/organization/Organizations',
+ query_params={
+ '$filter': "Name eq '" + self.module.params['organization'] + "'",
+ '$select': 'Moid',
+ },
+ )
+ if self.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ organization_moid = self.result['api_response']['Moid']
+
+ self.result['api_response'] = {}
+ # Get the current state of the resource
+ filter_str = "Name eq '" + self.module.params['name'] + "'"
+ filter_str += "and Organization.Moid eq '" + organization_moid + "'"
+ self.get_resource(
+ resource_path=resource_path,
+ query_params={
+ '$filter': filter_str,
+ '$expand': 'Organization',
+ }
+ )
+
+ moid = None
+ resource_values_match = False
+ if self.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ moid = self.result['api_response']['Moid']
+ if self.module.params['state'] == 'present':
+ resource_values_match = compare_values(self.api_body, self.result['api_response'])
+ else: # state == 'absent'
+ self.delete_resource(
+ moid=moid,
+ resource_path=resource_path,
+ )
+ moid = None
+
+ if self.module.params['state'] == 'present' and not resource_values_match:
+ # remove read-only Organization key
+ self.api_body.pop('Organization')
+ if not moid:
+ # Organization must be set, but can't be changed after initial POST
+ self.api_body['Organization'] = {
+ 'Moid': organization_moid,
+ }
+ self.configure_resource(
+ moid=moid,
+ resource_path=resource_path,
+ body=self.api_body,
+ query_params={
+ '$filter': filter_str
+ }
+ )
+ if self.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ moid = self.result['api_response']['Moid']
+
+ return moid
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_boot_order_policy.py b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_boot_order_policy.py
new file mode 100644
index 00000000..0d9f4f67
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_boot_order_policy.py
@@ -0,0 +1,495 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: intersight_boot_order_policy
+short_description: Boot Order policy configuration for Cisco Intersight
+description:
+ - Boot Order policy configuration for Cisco Intersight.
+ - Used to configure Boot Order servers and timezone settings on Cisco Intersight managed devices.
+ - For more information see L(Cisco Intersight,https://intersight.com/apidocs).
+extends_documentation_fragment: intersight
+options:
+ state:
+ description:
+ - If C(present), will verify the resource is present and will create if needed.
+ - If C(absent), will verify the resource is absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ organization:
+ description:
+ - The name of the Organization this resource is assigned to.
+ - Profiles and Policies that are created within a Custom Organization are applicable only to devices in the same Organization.
+ default: default
+ name:
+ description:
+ - The name assigned to the Boot Order policy.
+ - The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_.
+ required: true
+ tags:
+ description:
+ - List of tags in Key:<user-defined key> Value:<user-defined value> format.
+ type: list
+ description:
+ description:
+ - The user-defined description of the Boot Order policy.
+ - Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_).
+ aliases: [descr]
+ configured_boot_mode:
+ description:
+ - Sets the BIOS boot mode.
+ - UEFI uses the GUID Partition Table (GPT) whereas Legacy mode uses the Master Boot Record (MBR) partitioning scheme.
+ choices: [Legacy, Uefi]
+ default: Legacy
+ uefi_enable_secure_boot:
+ description:
+ - Secure boot enforces that device boots using only software that is trusted by the Original Equipment Manufacturer (OEM).
+ - Option is only used if configured_boot_mode is set to Uefi.
+ type: bool
+ default: false
+ boot_devices:
+ description:
+ - List of Boot Devices configured on the endpoint.
+ type: list
+ suboptions:
+ enabled:
+ description:
+ - Specifies if the boot device is enabled or disabled.
+ type: bool
+ default: true
+ device_type:
+ description:
+ - Device type used with this boot option.
+ - Choices are based on each device title in the API schema.
+ choices: [iSCSI, Local CDD, Local Disk, NVMe, PCH Storage, PXE, SAN, SD Card, UEFI Shell, USB, Virtual Media]
+ required: true
+ device_name:
+ description:
+ - A name that helps identify a boot device.
+ - It can be any string that adheres to the following constraints.
+ - It should start and end with an alphanumeric character.
+ - It can have underscores and hyphens.
+ - It cannot be more than 30 characters.
+ required: true
+ network_slot:
+ description:
+ - The slot id of the controller for the iscsi and pxe device.
+ - Option is used when device_type is iscsi and pxe.
+ choices: [1 - 255, MLOM, L, L1, L2, OCP]
+ port:
+ description:
+ - The port id of the controller for the iscsi and pxe device.
+ - Option is used when device_type is iscsi and pxe.
+ - The port id need to be an integer from 0 to 255.
+ controller_slot:
+ description:
+ - The slot id of the controller for the local disk device.
+ - Option is used when device_type is local_disk.
+ choices: [1-255, M, HBA, SAS, RAID, MRAID, MSTOR-RAID]
+ bootloader_name:
+ description:
+ - Details of the bootloader to be used during boot from local disk.
+ - Option is used when device_type is local_disk and configured_boot_mode is Uefi.
+ bootloader_description:
+ description:
+ - Details of the bootloader to be used during boot from local disk.
+ - Option is used when device_type is local_disk and configured_boot_mode is Uefi.
+ bootloader_path:
+ description:
+ - Details of the bootloader to be used during boot from local disk.
+ - Option is used when device_type is local_disk and configured_boot_mode is Uefi.
+ ip_type:
+ description:
+ - The IP Address family type to use during the PXE Boot process.
+ - Option is used when device_type is pxe.
+ chocies: [None, IPv4, IPv6]
+ default: None
+ interface_source:
+ description:
+ - Lists the supported Interface Source for PXE device.
+ - Option is used when device_type is pxe.
+ choices: [name, mac, port]
+ default: name
+ intefrace_name:
+ description:
+ - The name of the underlying virtual ethernet interface used by the PXE boot device.
+ - Option is used when device_type is pxe and interface_source is name.
+ mac_address:
+ description:
+ - The MAC Address of the underlying virtual ethernet interface used by the PXE boot device.
+ - Option is used when device_type is pxe and interface_source is mac.
+ sd_card_subtype:
+ description:
+ - The subtype for the selected device type.
+ - Option is used when device_type is sd_card.
+ choices: [None, flex-util, flex-flash, SDCARD]
+ default: None
+ lun:
+ description:
+ - The Logical Unit Number (LUN) of the device.
+ - Option is used when device_type is pch, san and sd_card.
+ - The LUN need to be an integer from 0 to 255.
+ usb_subtype:
+ description:
+ - The subtype for the selected device type.
+ - Option is used when device_type is usb.
+ choices: [None, usb-cd, usb-fdd, usb-hdd]
+ default: None
+ virtual_media_subtype:
+ description:
+ - The subtype for the selected device type.
+ - Option is used when device_type is virtual_media.
+ choices: [None, cimc-mapped-dvd, cimc-mapped-hdd, kvm-mapped-dvd, kvm-mapped-hdd, kvm-mapped-fdd]
+ default: None
+author:
+ - Tse Kai "Kevin" Chan (@BrightScale)
+version_added: '2.10'
+'''
+
+EXAMPLES = r'''
+- name: Configure Boot Order Policy
+ cisco.intersight.intersight_boot_order_policy:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ organization: DevNet
+ name: COS-Boot
+ description: Boot Order policy for COS
+ tags:
+ - Key: Site
+ Value: RCDN
+ configured_boot_mode: legacy
+ boot_devices:
+ - device_type: Local Disk
+ device_name: Boot-Lun
+ controller_slot: MRAID
+
+- name: Delete Boot Order Policy
+ cisco.intersight.intersight_boot_policy:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ organization: DevNet
+ name: COS-Boot
+ state: absent
+'''
+
+RETURN = r'''
+api_repsonse:
+ description: The API response output returned by the specified resource.
+ returned: always
+ type: dict
+ sample:
+ "api_response": {
+ "Name": "COS-Boot",
+ "ObjectType": "boot.Policy",
+ "Tags": [
+ {
+ "Key": "Site",
+ "Value": "RCDN"
+ }
+ ]
+ }
+'''
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.intersight.plugins.module_utils.intersight import IntersightModule, intersight_argument_spec
+
+
+def main():
+ boot_device = dict(
+ enabled=dict(type='bool', default=True),
+ device_type=dict(
+ type='str',
+ choices=[
+ 'iSCSI',
+ 'Local CDD',
+ 'Local Disk',
+ 'NVMe',
+ 'PCH Storage',
+ 'PXE',
+ 'SAN',
+ 'SD Card',
+ 'UEFI Shell',
+ 'USB',
+ 'Virtual Media',
+ ],
+ required=True,
+ ),
+ device_name=dict(type='str', required=True),
+ # iscsi and pxe options
+ network_slot=dict(type='str', default=''),
+ port=dict(type='int', default=0),
+ # local disk options
+ controller_slot=dict(type='str', default=''),
+ # bootloader options
+ bootloader_name=dict(type='str', default=''),
+ bootloader_description=dict(type='str', default=''),
+ bootloader_path=dict(type='str', default=''),
+ # pxe only options
+ ip_type=dict(
+ type='str',
+ choices=[
+ 'None',
+ 'IPv4',
+ 'IPv6'
+ ],
+ default='None'
+ ),
+ interface_source=dict(
+ type='str',
+ choices=[
+ 'name',
+ 'mac',
+ 'port'
+ ],
+ default='name'
+ ),
+ interface_name=dict(type='str', default=''),
+ mac_address=dict(type='str', defualt=''),
+ # sd card options
+ sd_card_subtype=dict(
+ type='str',
+ choices=[
+ 'None',
+ 'flex-util',
+ 'flex-flash',
+ 'SDCARD'
+ ],
+ default='None',
+ ),
+ # lun for pch, san, sd_card
+ lun=dict(type='int', default=0),
+ # usb options
+ usb_subtype=dict(
+ type='str',
+ choices=[
+ 'None',
+ 'usb-cd',
+ 'usb-fdd',
+ 'usb-hdd'
+ ],
+ default='None',
+ ),
+ # virtual media options
+ virtual_media_subtype=dict(
+ type='str',
+ choices=[
+ 'None',
+ 'cimc-mapped-dvd',
+ 'cimc-mapped-hdd',
+ 'kvm-mapped-dvd',
+ 'kvm-mapped-hdd',
+ 'kvm-mapped-fdd'
+ ],
+ default='None',
+ ),
+ )
+ argument_spec = intersight_argument_spec
+ argument_spec.update(
+ state=dict(type='str', choices=['present', 'absent'], default='present'),
+ organization=dict(type='str', default='default'),
+ name=dict(type='str', required=True),
+ description=dict(type='str', aliases=['descr'], default=''),
+ tags=dict(type='list', default=[]),
+ configured_boot_mode=dict(type='str', choices=['Legacy', 'Uefi'], default='Legacy'),
+ uefi_enable_secure_boot=dict(type='bool', default=False),
+ boot_devices=dict(type='list', elements='dict', options=boot_device),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+
+ intersight = IntersightModule(module)
+ intersight.result['api_response'] = {}
+ intersight.result['trace_id'] = ''
+ #
+ # Argument spec above, resource path, and API body should be the only code changed in each policy module
+ #
+ # Resource path used to configure policy
+ resource_path = '/boot/PrecisionPolicies'
+ # Define API body used in compares or create
+ intersight.api_body = {
+ 'Organization': {
+ 'Name': intersight.module.params['organization'],
+ },
+ 'Name': intersight.module.params['name'],
+ 'Tags': intersight.module.params['tags'],
+ 'Description': intersight.module.params['description'],
+ 'ConfiguredBootMode': intersight.module.params['configured_boot_mode'],
+ "EnforceUefiSecureBoot": intersight.module.params['uefi_enable_secure_boot'],
+ 'BootDevices': [],
+ }
+ if intersight.module.params.get('boot_devices'):
+ for device in intersight.module.params['boot_devices']:
+ if device['device_type'] == 'iSCSI':
+ intersight.api_body['BootDevices'].append(
+ {
+ "ClassId": "boot.Iscsi",
+ "ObjectType": "boot.Iscsi",
+ "Enabled": device['enabled'],
+ "Name": device['device_name'],
+ "Slot": device['network_slot'],
+ "Port": device['port'],
+ }
+ )
+ elif device['device_type'] == 'Local CDD':
+ intersight.api_body['BootDevices'].append(
+ {
+ "ClassId": "boot.LocalCDD",
+ "ObjectType": "boot.LocalCDD",
+ "Enabled": device['enabled'],
+ "Name": device['device_name'],
+ }
+ )
+ elif device['device_type'] == 'Local Disk':
+ intersight.api_body['BootDevices'].append(
+ {
+ "ClassId": "boot.LocalDisk",
+ "ObjectType": "boot.LocalDisk",
+ "Enabled": device['enabled'],
+ "Name": device['device_name'],
+ "Slot": device['controller_slot'],
+ "Bootloader": {
+ "ClassId": "boot.Bootloader",
+ "ObjectType": "boot.Bootloader",
+ "Description": device['bootloader_description'],
+ "Name": device['bootloader_name'],
+ "Path": device['bootloader_path'],
+ },
+ }
+ )
+ elif device['device_type'] == 'NVMe':
+ intersight.api_body['BootDevices'].append(
+ {
+ "ClassId": "boot.NVMe",
+ "ObjectType": "boot.NVMe",
+ "Enabled": device['enabled'],
+ "Name": device['device_name'],
+ "Bootloader": {
+ "ClassId": "boot.Bootloader",
+ "ObjectType": "boot.Bootloader",
+ "Description": device['bootloader_description'],
+ "Name": device['bootloader_name'],
+ "Path": device['bootloader_path'],
+ },
+ }
+ )
+ elif device['device_type'] == 'PCH Storage':
+ intersight.api_body['BootDevices'].append(
+ {
+ "ClassId": "boot.PchStorage",
+ "ObjectType": "boot.PchStorage",
+ "Enabled": device['enabled'],
+ "Name": device['device_name'],
+ "Bootloader": {
+ "ClassId": "boot.Bootloader",
+ "ObjectType": "boot.Bootloader",
+ "Description": device['bootloader_description'],
+ "Name": device['bootloader_name'],
+ "Path": device['bootloader_path'],
+ },
+ "Lun": device['lun'],
+ }
+ )
+ elif device['device_type'] == 'PXE':
+ intersight.api_body['BootDevices'].append(
+ {
+ "ClassId": "boot.Pxe",
+ "ObjectType": "boot.Pxe",
+ "Enabled": device['enabled'],
+ "Name": device['device_name'],
+ "IpType": device['ip_type'],
+ "InterfaceSource": device['interface_source'],
+ "Slot": device['network_slot'],
+ "InterfaceName": device['interface_name'],
+ "Port": device['port'],
+ "MacAddress": device['mac_address'],
+ }
+ )
+ elif device['device_type'] == 'SAN':
+ intersight.api_body['BootDevices'].append(
+ {
+ "ClassId": "boot.San",
+ "ObjectType": "boot.San",
+ "Enabled": device['enabled'],
+ "Name": device['device_name'],
+ "Lun": device['lun'],
+ "Slot": device['network_slot'],
+ "Bootloader": {
+ "ClassId": "boot.Bootloader",
+ "ObjectType": "boot.Bootloader",
+ "Description": device['bootloader_description'],
+ "Name": device['bootloader_name'],
+ "Path": device['bootloader_path'],
+ },
+ }
+ )
+ elif device['device_type'] == 'SD Card':
+ intersight.api_body['BootDevices'].append(
+ {
+ "ClassId": "boot.SdCard",
+ "ObjectType": "boot.SdCard",
+ "Enabled": device['enabled'],
+ "Name": device['device_name'],
+ "Lun": device['lun'],
+ "SubType": device['sd_card_subtype'],
+ "Bootloader": {
+ "ClassId": "boot.Bootloader",
+ "ObjectType": "boot.Bootloader",
+ "Description": device['bootloader_description'],
+ "Name": device['bootloader_name'],
+ "Path": device['bootloader_path'],
+ },
+ }
+ )
+ elif device['device_type'] == 'UEFI Shell':
+ intersight.api_body['BootDevices'].append(
+ {
+ "ClassId": "boot.UefiShell",
+ "ObjectType": "boot.UefiShell",
+ "Enabled": device['enabled'],
+ "Name": device['device_name'],
+ }
+ )
+ elif device['device_type'] == 'USB':
+ intersight.api_body['BootDevices'].append(
+ {
+ "ClassId": "boot.Usb",
+ "ObjectType": "boot.Usb",
+ "Enabled": device['enabled'],
+ "Name": device['device_name'],
+ "SubType": device['usb_subtype'],
+ }
+ )
+ elif device['device_type'] == 'Virtual Media':
+ intersight.api_body['BootDevices'].append(
+ {
+ "ClassId": "boot.VirtualMedia",
+ "ObjectType": "boot.VirtualMedia",
+ "Enabled": device['enabled'],
+ "Name": device['device_name'],
+ "SubType": device['virtual_media_subtype'],
+ }
+ )
+ #
+ # Code below should be common across all policy modules
+ #
+ intersight.configure_policy_or_profile(resource_path=resource_path)
+
+ module.exit_json(**intersight.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_imc_access_policy.py b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_imc_access_policy.py
new file mode 100644
index 00000000..ec31898e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_imc_access_policy.py
@@ -0,0 +1,200 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: intersight_imc_access_policy
+short_description: IMC Access Policy configuration for Cisco Intersight
+description:
+ - IMC Access Policy configuration for Cisco Intersight.
+ - Used to configure IP addresses and VLAN used for external connectivity to Cisco IMC.
+ - For more information see L(Cisco Intersight,https://intersight.com/apidocs).
+extends_documentation_fragment: intersight
+options:
+ state:
+ description:
+ - If C(present), will verify the resource is present and will create if needed.
+ - If C(absent), will verify the resource is absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ organization:
+ description:
+ - The name of the Organization this resource is assigned to.
+ - Profiles and Policies that are created within a Custom Organization are applicable only to devices in the same Organization.
+ default: default
+ name:
+ description:
+ - The name assigned to the IMC Access Policy.
+ - The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_.
+ required: true
+ tags:
+ description:
+ - List of tags in Key:<user-defined key> Value:<user-defined value> format.
+ descrption:
+ description:
+ - The user-defined description of the IMC access policy.
+ - Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_).
+ aliases: [descr]
+ vlan_id:
+ description:
+ - VLAN to be used for server access over Inband network.
+ required: true
+ type: int
+ ip_pool:
+ description:
+ - IP Pool used to assign IP address and other required network settings.
+ required: true
+author:
+ - David Soper (@dsoper2)
+version_added: '2.10'
+'''
+
+EXAMPLES = r'''
+- name: Configure IMC Access policy
+ intersight_imc_access_policy:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ name: sjc02-d23-access
+ description: IMC access for SJC02 rack D23
+ tags:
+ - Site: D23
+ vlan_id: 131
+ ip_pool: sjc02-d23-ext-mgmt
+
+- name: Delete IMC Access policy
+ intersight_imc_access_policy:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ name: sjc02-d23-access
+ state: absent
+'''
+
+RETURN = r'''
+api_repsonse:
+ description: The API response output returned by the specified resource.
+ returned: always
+ type: dict
+ sample:
+ "api_response": {
+ "Name": "sjc02-d23-access",
+ "ObjectType": "access.Policy",
+ "Profiles": [
+ {
+ "Moid": "5e4ec7ae77696e2d30840cfc",
+ "ObjectType": "server.Profile",
+ },
+ {
+ "Moid": "5e84d78777696e2d302ec195",
+ "ObjectType": "server.Profile",
+ }
+ ],
+ "Tags": [
+ {
+ "Key": "Site",
+ "Value": "SJC02"
+ }
+ ]
+ }
+'''
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.intersight.plugins.module_utils.intersight import IntersightModule, intersight_argument_spec, compare_values
+
+
+def main():
+ argument_spec = intersight_argument_spec
+ argument_spec.update(
+ state=dict(type='str', choices=['present', 'absent'], default='present'),
+ organization=dict(type='str', default='default'),
+ name=dict(type='str', required=True),
+ description=dict(type='str', aliases=['descr'], default=''),
+ tags=dict(type='list', default=[]),
+ vlan_id=dict(type='int', required=True),
+ ip_pool=dict(type='str', required=True),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+
+ intersight = IntersightModule(module)
+ intersight.result['api_response'] = {}
+ intersight.result['trace_id'] = ''
+ intersight.api_body = {
+ 'Name': intersight.module.params['name'],
+ 'Tags': intersight.module.params['tags'],
+ 'Description': intersight.module.params['description'],
+ 'InbandVlan': intersight.module.params['vlan_id'],
+ 'Organization': {
+ 'Name': intersight.module.params['organization'],
+ },
+ }
+
+ # get the current state of the resource
+ intersight.get_resource(
+ resource_path='/access/Policies',
+ query_params={
+ '$filter': "Name eq '" + intersight.module.params['name'] + "'",
+ '$expand': 'Organization',
+ },
+ )
+
+ moid = None
+ resource_values_match = False
+ if intersight.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ moid = intersight.result['api_response']['Moid']
+ if module.params['state'] == 'present':
+ resource_values_match = compare_values(intersight.api_body, intersight.result['api_response'])
+ else: # state == 'absent'
+ intersight.delete_resource(
+ moid=moid,
+ resource_path='/access/Policies',
+ )
+ moid = None
+
+ if module.params['state'] == 'present' and not resource_values_match:
+ # remove read-only Organization key
+ intersight.api_body.pop('Organization')
+ if not moid:
+ # GET Organization Moid
+ intersight.get_resource(
+ resource_path='/organization/Organizations',
+ query_params={
+ '$filter': "Name eq '" + intersight.module.params['organization'] + "'",
+ '$select': 'Moid',
+ },
+ )
+ organization_moid = None
+ if intersight.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ organization_moid = intersight.result['api_response']['Moid']
+ # Organization must be set, but can't be changed after initial POST
+ intersight.api_body['Organization'] = {
+ 'Moid': organization_moid,
+ }
+ intersight.configure_resource(
+ moid=moid,
+ resource_path='/access/Policies',
+ body=intersight.api_body,
+ query_params={
+ '$filter': "Name eq '" + intersight.module.params['name'] + "'",
+ },
+ )
+
+ module.exit_json(**intersight.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_info.py b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_info.py
new file mode 100644
index 00000000..ba21df24
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_info.py
@@ -0,0 +1,117 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: intersight_info
+short_description: Gather information about Intersight
+description:
+- Gathers information about servers in L(Cisco Intersight,https://intersight.com).
+- This module was called C(intersight_facts) before Ansible 2.9. The usage did not change.
+extends_documentation_fragment: intersight
+options:
+ server_names:
+ description:
+ - Server names to retrieve information from.
+ - An empty list will return all servers.
+ type: list
+ required: yes
+author:
+- David Soper (@dsoper2)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.8'
+'''
+
+EXAMPLES = r'''
+- name: Get info for all servers
+ intersight_info:
+ api_private_key: ~/Downloads/SecretKey.txt
+ api_key_id: 64612d300d0982/64612d300d0b00/64612d300d3650
+ server_names:
+- debug:
+ msg: "server name {{ item.Name }}, moid {{ item.Moid }}"
+ loop: "{{ intersight_servers }}"
+ when: intersight_servers is defined
+
+- name: Get info for servers by name
+ intersight_info:
+ api_private_key: ~/Downloads/SecretKey.txt
+ api_key_id: 64612d300d0982/64612d300d0b00/64612d300d3650
+ server_names:
+ - SJC18-L14-UCS1-1
+- debug:
+ msg: "server moid {{ intersight_servers[0].Moid }}"
+ when: intersight_servers[0] is defined
+'''
+
+RETURN = r'''
+intersight_servers:
+ description: A list of Intersight Servers. See L(Cisco Intersight,https://intersight.com/apidocs) for details.
+ returned: always
+ type: complex
+ contains:
+ Name:
+ description: The name of the server.
+ returned: always
+ type: str
+ sample: SJC18-L14-UCS1-1
+ Moid:
+ description: The unique identifier of this Managed Object instance.
+ returned: always
+ type: str
+ sample: 5978bea36ad4b000018d63dc
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.intersight.plugins.module_utils.intersight import IntersightModule, intersight_argument_spec
+
+
+def get_servers(module, intersight):
+ query_list = []
+ if module.params['server_names']:
+ for server in module.params['server_names']:
+ query_list.append("Name eq '%s'" % server)
+ query_str = ' or '.join(query_list)
+ options = {
+ 'http_method': 'get',
+ 'resource_path': '/compute/PhysicalSummaries',
+ 'query_params': {
+ '$filter': query_str,
+ '$top': 1000,
+ }
+ }
+ response_dict = intersight.call_api(**options)
+
+ return response_dict.get('Results')
+
+
+def main():
+ argument_spec = intersight_argument_spec
+ argument_spec.update(
+ server_names=dict(type='list', required=True),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+ if module._name == 'intersight_facts':
+ module.deprecate("The 'intersight_facts' module has been renamed to 'intersight_info'", version='2.13')
+
+ intersight = IntersightModule(module)
+
+ # one API call returning all requested servers
+ module.exit_json(intersight_servers=get_servers(module, intersight))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_local_user_policy.py b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_local_user_policy.py
new file mode 100644
index 00000000..eae337f1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_local_user_policy.py
@@ -0,0 +1,361 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: intersight_local_user_policy
+short_description: Local User Policy configuration for Cisco Intersight
+description:
+ - Local User Policy configuration for Cisco Intersight.
+ - Used to configure local users on endpoint devices.
+ - For more information see L(Cisco Intersight,https://intersight.com/apidocs).
+extends_documentation_fragment: intersight
+options:
+ state:
+ description:
+ - If C(present), will verify the resource is present and will create if needed.
+ - If C(absent), will verify the resource is absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ organization:
+ description:
+ - The name of the Organization this resource is assigned to.
+ - Profiles and Policies that are created within a Custom Organization are applicable only to devices in the same Organization.
+ default: default
+ name:
+ description:
+ - The name assigned to the Local User Policy.
+ - The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_.
+ required: true
+ tags:
+ description:
+ - List of tags in Key:<user-defined key> Value:<user-defined value> format.
+ description:
+ description:
+ - The user-defined description of the Local User policy.
+ - Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_).
+ aliases: [descr]
+ enforce_strong_password:
+ description:
+ - If true, enables a strong password policy.
+ - Strong password requirements:.
+ - A. The password must have a minimum of 8 and a maximum of 20 characters.
+ - B. The password must not contain the User's Name.
+ - C. The password must contain characters from three of the following four categories.
+ - 1) English uppercase characters (A through Z).
+ - 2) English lowercase characters (a through z).
+ - 3) Base 10 digits (0 through 9).
+ - 4) Non-alphabetic characters (! , @, '#', $, %, ^, &, *, -, _, +, =).
+ type: bool
+ default: true
+ enable_password_expiry:
+ description:
+ - Enables password expiry on the endpoint.
+ type: bool
+ default: false
+ password_history:
+ description:
+ - Specifies number of times a password cannot repeat when changed (value between 0 and 5).
+ - Entering 0 disables this option.
+ type: int
+ default: 5
+ local_users:
+ description:
+ - List of local users on the endpoint.
+ - An admin user already exists on the endpoint.
+ - Add the admin user here only if you want to change the password, or enable or disable the user.
+ - To add admin user, provide a username as 'admin', select the admin user role, and then proceed.
+ suboptions:
+ username:
+ description:
+ - Name of the user created on the endpoint.
+ required: true
+ enable:
+ description:
+ - Enable or disable the user.
+ type: bool
+ default: true
+ role:
+ description:
+ - Roles associated with the user on the endpoint.
+ choices: [admin, readonly, user]
+ required: true
+ password:
+ description:
+ - Valid login password of the user.
+ required: true
+ purge:
+ description:
+ - The purge argument instructs the module to consider the resource definition absolute.
+ - If true, any previously configured usernames will be removed from the policy with the exception of the `admin` user which cannot be deleted.
+ default: false
+ always_update_password:
+ description:
+ - Since passwords are not returned by the API and are encrypted on the endpoint, this option will instruct the module when to change the password.
+ - If true, the password for each user will always be updated in the policy.
+ - If false, the password will be updated only if the user is created.
+ default: false
+author:
+ - David Soper (@dsoper2)
+version_added: '2.10'
+'''
+
+EXAMPLES = r'''
+- name: Configure Local User policy
+ intersight_local_user_policy:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ name: guest-admin
+ tags:
+ - Key: username
+ Value: guest
+ description: User named guest with admin role
+ local_users:
+ - username: guest
+ role: admin
+ password: vault_guest_password
+ - username: reader
+ role: readonly
+ password: vault_reader_password
+
+- name: Delete Local User policy
+ intersight_local_user_policy:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ name: guest-admin
+ state: absent
+'''
+
+RETURN = r'''
+api_repsonse:
+ description: The API response output returned by the specified resource.
+ returned: always
+ type: dict
+ sample:
+ "api_response": {
+ "Description": "User named guest with admin role",
+ "EndPointUserRoles": [
+ {
+ "ChangePassword": true,
+ "Enabled": true,
+ ...
+'''
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.intersight.plugins.module_utils.intersight import IntersightModule, intersight_argument_spec, compare_values
+
+
+def main():
+ local_user = dict(
+ username=dict(type='str', required=True),
+ enable=dict(type='bool', default=True),
+ role=dict(type='str', choices=['admin', 'readonly', 'user'], required=True),
+ password=dict(type='str', required=True, no_log=True),
+ )
+ argument_spec = intersight_argument_spec
+ argument_spec.update(
+ state=dict(type='str', choices=['present', 'absent'], default='present'),
+ organization=dict(type='str', default='default'),
+ name=dict(type='str', required=True),
+ description=dict(type='str', aliases=['descr'], default=''),
+ tags=dict(type='list', default=[]),
+ enforce_strong_password=dict(type='bool', default=True, no_log=False),
+ enable_password_expiry=dict(type='bool', default=False, no_log=False),
+ password_history=dict(type='int', default=5, no_log=False),
+ local_users=dict(type='list', elements='dict', options=local_user, default=[]),
+ purge=dict(type='bool', default=False),
+ always_update_password=dict(type='bool', default=False, no_log=False),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+
+ intersight = IntersightModule(module)
+ intersight.result['api_response'] = {}
+ intersight.result['trace_id'] = ''
+
+ # get the current state of the resource
+ intersight.get_resource(
+ resource_path='/iam/EndPointUserPolicies',
+ query_params={
+ '$filter': "Name eq '" + intersight.module.params['name'] + "'",
+ '$expand': 'EndPointUserRoles($expand=EndPointRole,EndPointUser),Organization',
+ },
+ )
+
+ user_policy_moid = None
+ resource_values_match = False
+ if intersight.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ user_policy_moid = intersight.result['api_response']['Moid']
+ #
+ # always_update_password
+ # false: compare expected vs. actual (won't check passwords)
+ # true: no compare
+ #
+ if module.params['state'] == 'present' and not module.params['always_update_password']:
+ # Create api body used to check current state
+ end_point_user_roles = []
+ for user in intersight.module.params['local_users']:
+ end_point_user_roles.append(
+ {
+ 'Enabled': user['enable'],
+ 'EndPointRole': [
+ {
+ 'Name': user['role'],
+ 'Type': 'IMC',
+ },
+ ],
+ 'EndPointUser': {
+ 'Name': user['username'],
+ },
+ }
+ )
+ intersight.api_body = {
+ 'Name': intersight.module.params['name'],
+ 'Tags': intersight.module.params['tags'],
+ 'Description': intersight.module.params['description'],
+ 'PasswordProperties': {
+ 'EnforceStrongPassword': intersight.module.params['enforce_strong_password'],
+ 'EnablePasswordExpiry': intersight.module.params['enable_password_expiry'],
+ 'PasswordHistory': intersight.module.params['password_history'],
+ },
+ 'EndPointUserRoles': end_point_user_roles,
+ 'Organization': {
+ 'Name': intersight.module.params['organization'],
+ },
+ }
+ resource_values_match = compare_values(intersight.api_body, intersight.result['api_response'])
+ elif module.params['state'] == 'absent':
+ intersight.delete_resource(
+ moid=user_policy_moid,
+ resource_path='/iam/EndPointUserPolicies',
+ )
+ user_policy_moid = None
+
+ if module.params['state'] == 'present' and not resource_values_match:
+ intersight.api_body = {
+ 'Name': intersight.module.params['name'],
+ 'Tags': intersight.module.params['tags'],
+ 'Description': intersight.module.params['description'],
+ 'PasswordProperties': {
+ 'EnforceStrongPassword': intersight.module.params['enforce_strong_password'],
+ 'EnablePasswordExpiry': intersight.module.params['enable_password_expiry'],
+ 'PasswordHistory': intersight.module.params['password_history'],
+ },
+ }
+ organization_moid = None
+ if not user_policy_moid or module.params['purge']:
+ # get Organization Moid which is needed when resources are created
+ saved_response = intersight.result['api_response']
+ intersight.get_resource(
+ resource_path='/organization/Organizations',
+ query_params={
+ '$filter': "Name eq '" + intersight.module.params['organization'] + "'",
+ '$select': 'Moid',
+ },
+ )
+ if intersight.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ organization_moid = intersight.result['api_response']['Moid']
+ intersight.result['api_response'] = saved_response
+ if not user_policy_moid:
+ # Initial create: Organization must be set, but can't be changed after initial POST
+ intersight.api_body['Organization'] = {
+ 'Moid': organization_moid,
+ }
+ elif module.params['purge']:
+ # update existing resource and purge any existing users
+ for end_point_user_role in intersight.result['api_response']['EndPointUserRoles']:
+ intersight.delete_resource(
+ moid=end_point_user_role['Moid'],
+ resource_path='/iam/EndPointUserRoles',
+ )
+ # configure the top-level policy resource
+ intersight.result['api_response'] = {}
+ intersight.configure_resource(
+ moid=user_policy_moid,
+ resource_path='/iam/EndPointUserPolicies',
+ body=intersight.api_body,
+ query_params={
+ '$filter': "Name eq '" + intersight.module.params['name'] + "'",
+ },
+ )
+ if intersight.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ user_policy_moid = intersight.result['api_response']['Moid']
+
+ # EndPointUser local_users list config
+ for user in intersight.module.params['local_users']:
+ intersight.api_body = {
+ 'Name': user['username'],
+ }
+ if organization_moid:
+ intersight.api_body['Organization'] = {
+ 'Moid': organization_moid,
+ }
+ intersight.configure_resource(
+ moid=None,
+ resource_path='/iam/EndPointUsers',
+ body=intersight.api_body,
+ query_params={
+ '$filter': "Name eq '" + user['username'] + "'",
+ },
+ )
+ user_moid = None
+ if intersight.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ user_moid = intersight.result['api_response']['Moid']
+ # GET EndPointRole Moid
+ intersight.get_resource(
+ resource_path='/iam/EndPointRoles',
+ query_params={
+ '$filter': "Name eq '" + user['role'] + "' and Type eq 'IMC'",
+ },
+ )
+ end_point_role_moid = None
+ if intersight.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ end_point_role_moid = intersight.result['api_response']['Moid']
+ # EndPointUserRole config
+ intersight.api_body = {
+ 'EndPointUser': {
+ 'Moid': user_moid,
+ },
+ 'EndPointRole': [
+ {
+ 'Moid': end_point_role_moid,
+ }
+ ],
+ 'Password': user['password'],
+ 'Enabled': user['enable'],
+ 'EndPointUserPolicy': {
+ 'Moid': user_policy_moid,
+ },
+ }
+ intersight.configure_resource(
+ moid=None,
+ resource_path='/iam/EndPointUserRoles',
+ body=intersight.api_body,
+ query_params={
+ '$filter': "EndPointUserPolicy.Moid eq '" + user_policy_moid + "'",
+ },
+ )
+
+ module.exit_json(**intersight.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_ntp_policy.py b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_ntp_policy.py
new file mode 100644
index 00000000..f43eb3a6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_ntp_policy.py
@@ -0,0 +1,160 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: intersight_ntp_policy
+short_description: NTP policy configuration for Cisco Intersight
+description:
+ - NTP policy configuration for Cisco Intersight.
+ - Used to configure NTP servers and timezone settings on Cisco Intersight managed devices.
+ - For more information see L(Cisco Intersight,https://intersight.com/apidocs).
+extends_documentation_fragment: intersight
+options:
+ state:
+ description:
+ - If C(present), will verify the resource is present and will create if needed.
+ - If C(absent), will verify the resource is absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ organization:
+ description:
+ - The name of the Organization this resource is assigned to.
+ - Profiles and Policies that are created within a Custom Organization are applicable only to devices in the same Organization.
+ default: default
+ name:
+ description:
+ - The name assigned to the NTP policy.
+ - The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_.
+ required: true
+ tags:
+ description:
+ - List of tags in Key:<user-defined key> Value:<user-defined value> format.
+ type: list
+ description:
+ description:
+ - The user-defined description of the NTP policy.
+ - Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_).
+ aliases: [descr]
+ enable:
+ description:
+ - Enable or disable NTP.
+ type: bool
+ default: true
+ ntp_servers:
+ description:
+ - List of NTP servers configured on the endpoint.
+ type: list
+ timezone:
+ description:
+ - Timezone of services on the endpoint.
+author:
+ - David Soper (@dsoper2)
+version_added: '2.10'
+'''
+
+EXAMPLES = r'''
+- name: Configure NTP Policy
+ cisco.intersight.intersight_ntp_policy:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ organization: DevNet
+ name: lab-ntp
+ description: NTP policy for lab use
+ tags:
+ - Key: Site
+ Value: RCDN
+ ntp_servers:
+ - ntp.esl.cisco.com
+ timezone: America/Chicago
+
+- name: Delete NTP Policy
+ cisco.intersight.intersight_ntp_policy:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ organization: DevNet
+ name: lab-ntp
+ state: absent
+'''
+
+RETURN = r'''
+api_repsonse:
+ description: The API response output returned by the specified resource.
+ returned: always
+ type: dict
+ sample:
+ "api_response": {
+ "Name": "lab-ntp",
+ "ObjectType": "ntp.Policy",
+ "Tags": [
+ {
+ "Key": "Site",
+ "Value": "RCDN"
+ }
+ ]
+ }
+'''
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.intersight.plugins.module_utils.intersight import IntersightModule, intersight_argument_spec
+
+
+def main():
+ argument_spec = intersight_argument_spec
+ argument_spec.update(
+ state=dict(type='str', choices=['present', 'absent'], default='present'),
+ organization=dict(type='str', default='default'),
+ name=dict(type='str', required=True),
+ description=dict(type='str', aliases=['descr'], default=''),
+ tags=dict(type='list', default=[]),
+ enable=dict(type='bool', default=True),
+ ntp_servers=dict(type='list', default=[]),
+ timezone=dict(type='str', default=''),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+
+ intersight = IntersightModule(module)
+ intersight.result['api_response'] = {}
+ intersight.result['trace_id'] = ''
+ #
+ # Argument spec above, resource path, and API body should be the only code changed in each policy module
+ #
+ # Resource path used to configure policy
+ resource_path = '/ntp/Policies'
+ # Define API body used in compares or create
+ intersight.api_body = {
+ 'Organization': {
+ 'Name': intersight.module.params['organization'],
+ },
+ 'Name': intersight.module.params['name'],
+ 'Tags': intersight.module.params['tags'],
+ 'Description': intersight.module.params['description'],
+ 'Enabled': intersight.module.params['enable'],
+ 'NtpServers': intersight.module.params['ntp_servers'],
+ 'Timezone': intersight.module.params['timezone'],
+ }
+
+ #
+ # Code below should be common across all policy modules
+ #
+ intersight.configure_policy_or_profile(resource_path=resource_path)
+
+ module.exit_json(**intersight.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_rest_api.py b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_rest_api.py
new file mode 100644
index 00000000..177468ca
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_rest_api.py
@@ -0,0 +1,206 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: intersight_rest_api
+short_description: REST API configuration for Cisco Intersight
+description:
+- Direct REST API configuration for Cisco Intersight.
+- All REST API resources and properties must be specified.
+- For more information see L(Cisco Intersight,https://intersight.com/apidocs).
+extends_documentation_fragment: intersight
+options:
+ resource_path:
+ description:
+ - Resource URI being configured related to api_uri.
+ type: str
+ required: yes
+ query_params:
+ description:
+ - Query parameters for the Intersight API query languange.
+ type: dict
+ update_method:
+ description:
+ - The HTTP method used for update operations.
+ - Some Intersight resources require POST operations for modifications.
+ type: str
+ choices: [ patch, post ]
+ default: patch
+ api_body:
+ description:
+ - The paylod for API requests used to modify resources.
+ type: dict
+ return_list:
+ description:
+ - If C(yes), will return a list of API results in the api_response.
+ - By default only the 1st element of the API Results list is returned.
+ - Can only be used with GET operations.
+ type: bool
+ default: no
+ state:
+ description:
+ - If C(present), will verify the resource is present and will create if needed.
+ - If C(absent), will verify the resource is absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+author:
+- David Soper (@dsoper2)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.8'
+'''
+
+EXAMPLES = r'''
+- name: Configure Boot Policy
+ intersight_rest_api:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_key_uri: "{{ api_key_uri }}"
+ validate_certs: "{{ validate_certs }}"
+ resource_path: /boot/PrecisionPolicies
+ query_params:
+ $filter: "Name eq 'vmedia-localdisk'"
+ api_body: {
+ "Name": "vmedia-localdisk",
+ "ConfiguredBootMode": "Legacy",
+ "BootDevices": [
+ {
+ "ObjectType": "boot.VirtualMedia",
+ "Enabled": true,
+ "Name": "remote-vmedia",
+ "Subtype": "cimc-mapped-dvd"
+ },
+ {
+ "ObjectType": "boot.LocalDisk",
+ "Enabled": true,
+ "Name": "localdisk",
+ "Slot": "MRAID",
+ "Bootloader": null
+ }
+ ],
+ }
+ state: present
+
+- name: Delete Boot Policy
+ intersight_rest_api:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ api_key_uri: "{{ api_key_uri }}"
+ validate_certs: "{{ validate_certs }}"
+ resource_path: /boot/PrecisionPolicies
+ query_params:
+ $filter: "Name eq 'vmedia-localdisk'"
+ state: absent
+'''
+
+RETURN = r'''
+api_repsonse:
+ description: The API response output returned by the specified resource.
+ returned: always
+ type: dict
+ sample:
+ "api_response": {
+ "BootDevices": [
+ {
+ "Enabled": true,
+ "Name": "remote-vmedia",
+ "ObjectType": "boot.VirtualMedia",
+ "Subtype": "cimc-mapped-dvd"
+ },
+ {
+ "Bootloader": null,
+ "Enabled": true,
+ "Name": "boot-lun",
+ "ObjectType": "boot.LocalDisk",
+ "Slot": "MRAID"
+ }
+ ],
+ "ConfiguredBootMode": "Legacy",
+ "Name": "vmedia-localdisk",
+ "ObjectType": "boot.PrecisionPolicy",
+ }
+'''
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.intersight.plugins.module_utils.intersight import IntersightModule, intersight_argument_spec, compare_values
+
+
+def main():
+ argument_spec = intersight_argument_spec
+ argument_spec.update(
+ resource_path=dict(type='str', required=True),
+ query_params=dict(type='dict', default={}),
+ update_method=dict(type='str', choices=['patch', 'post'], default='patch'),
+ api_body=dict(type='dict', default={}),
+ return_list=dict(type='bool', default=False),
+ state=dict(type='str', choices=['absent', 'present'], default='present'),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ mutually_exclusive=[
+ ['return_list', 'api_body'],
+ ['return_list', 'state'],
+ ],
+ )
+
+ intersight = IntersightModule(module)
+ intersight.result['api_response'] = {}
+ intersight.result['trace_id'] = ''
+
+ if module.params['update_method'] != 'post' or module.params['query_params']:
+ # get the current state of the resource
+ # skip if this is a post to /asset/DeviceClaims or similar resource without GET
+ intersight.get_resource(
+ resource_path=module.params['resource_path'],
+ query_params=module.params['query_params'],
+ return_list=module.params['return_list'],
+ )
+
+ # determine requested operation (config, delete, or neither (get resource only))
+ if module.params['state'] == 'present':
+ request_delete = False
+ # api_body implies resource configuration through post/patch
+ request_config = bool(module.params['api_body'])
+ else: # state == 'absent'
+ request_delete = True
+ request_config = False
+
+ moid = None
+ resource_values_match = False
+ if (request_config or request_delete) and intersight.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ moid = intersight.result['api_response']['Moid']
+ if request_config:
+ resource_values_match = compare_values(module.params['api_body'], intersight.result['api_response'])
+ else: # request_delete
+ intersight.delete_resource(
+ moid=moid,
+ resource_path=module.params['resource_path'],
+ )
+
+ if request_config and not resource_values_match:
+ intersight.configure_resource(
+ moid=moid,
+ resource_path=module.params['resource_path'],
+ body=module.params['api_body'],
+ query_params=module.params['query_params'],
+ update_method=module.params['update_method'],
+ )
+
+ module.exit_json(**intersight.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_server_profile.py b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_server_profile.py
new file mode 100644
index 00000000..16d00af3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_server_profile.py
@@ -0,0 +1,281 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: intersight_server_profile
+short_description: Server Profile configuration for Cisco Intersight
+description:
+ - Server Profile configuration for Cisco Intersight.
+ - Used to configure Server Profiles with assigned servers and server policies.
+ - For more information see L(Cisco Intersight,https://intersight.com/apidocs).
+extends_documentation_fragment: intersight
+options:
+ state:
+ description:
+ - If C(present), will verify the resource is present and will create if needed.
+ - If C(absent), will verify the resource is absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ organization:
+ description:
+ - The name of the Organization this resource is assigned to.
+ - Profiles and Policies that are created within a Custom Organization are applicable only to devices in the same Organization.
+ default: default
+ name:
+ description:
+ - The name assigned to the Server Profile.
+ - The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_.
+ required: true
+ target_platform:
+ description:
+ - The platform for which the server profile is applicable.
+ - Can either be a server that is operating in Standalone mode or which is attached to a Fabric Interconnect (FIAttached) managed by Intersight.
+ choices: [Standalone, FIAttached]
+ default: Standalone
+ tags:
+ description:
+ - List of tags in Key:<user-defined key> Value:<user-defined value> format.
+ description:
+ description:
+ - The user-defined description of the Server Profile.
+ - Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_).
+ aliases: [descr]
+ assigned_server:
+ description:
+ - Managed Obect ID (MOID) of assigned server.
+ - Option can be omitted if user wishes to assign server later.
+ boot_order_policy:
+ description:
+ - Name of Boot Order Policy to associate with this profile.
+ imc_access_policy:
+ description:
+ - Name of IMC Access Policy to associate with this profile.
+ lan_connectivity_policy:
+ description:
+ - Name of LAN Connectivity Policy to associate with this profile.
+ local_user_policy:
+ description:
+ - Name of Local User Policy to associate with this profile.
+ ntp_policy:
+ description:
+ - Name of NTP Policy to associate with this profile.
+ storage_policy:
+ description:
+ - Name of Storage Policy to associate with this profile.
+ virtual_media_policy:
+ description:
+ - Name of Virtual Media Policy to associate with this profile.
+author:
+ - David Soper (@dsoper2)
+ - Sid Nath (@SidNath21)
+ - Tse Kai "Kevin" Chan (@BrightScale)
+ - Soma Tummala (@SOMATUMMALA21)
+version_added: '2.10'
+'''
+
+EXAMPLES = r'''
+- name: Configure Server Profile
+ cisco.intersight.intersight_server_profile:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ name: SP-Server1
+ target_platform: FIAttached
+ tags:
+ - Key: Site
+ Value: SJC02
+ description: Profile for Server1
+ assigned_server: 5e3b517d6176752d319a9999
+ boot_order_policy: COS-Boot
+ imc_access_policy: sjc02-d23-access
+ lan_connectivity_policy: sjc02-d23-lan
+ local_user_policy: guest-admin
+ ntp_policy: lab-ntp
+ storage_policy: storage
+ virtual_media_policy: COS-VM
+
+- name: Delete Server Profile
+ cisco.intersight.intersight_server_profile:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ name: SP-Server1
+ state: absent
+'''
+
+RETURN = r'''
+api_repsonse:
+ description: The API response output returned by the specified resource.
+ returned: always
+ type: dict
+ sample:
+ "api_response": {
+ "AssignedServer": {
+ "Moid": "5e3b517d6176752d319a0881",
+ "ObjectType": "compute.Blade",
+ },
+ "Name": "SP-IMM-6454-D23-1-1",
+ "ObjectType": "server.Profile",
+ "Tags": [
+ {
+ "Key": "Site",
+ "Value": "SJC02"
+ }
+ ],
+ "TargetPlatform": "FIAttached",
+ "Type": "instance"
+ }
+'''
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.intersight.plugins.module_utils.intersight import IntersightModule, intersight_argument_spec
+
+
+def post_profile_to_policy(intersight, moid, resource_path, policy_name):
+ options = {
+ 'http_method': 'get',
+ 'resource_path': resource_path,
+ 'query_params': {
+ '$filter': "Name eq '" + policy_name + "'",
+ },
+ }
+ response = intersight.call_api(**options)
+ if response.get('Results'):
+ # get expected policy moid from 1st list element
+ expected_policy_moid = response['Results'][0]['Moid']
+ actual_policy_moid = ''
+ # check any current profiles and delete if needed
+ options = {
+ 'http_method': 'get',
+ 'resource_path': resource_path,
+ 'query_params': {
+ '$filter': "Profiles/any(t: t/Moid eq '" + moid + "')",
+ },
+ }
+ response = intersight.call_api(**options)
+ if response.get('Results'):
+ # get actual moid from 1st list element
+ actual_policy_moid = response['Results'][0]['Moid']
+ if actual_policy_moid != expected_policy_moid:
+ if not intersight.module.check_mode:
+ # delete the actual policy
+ options = {
+ 'http_method': 'delete',
+ 'resource_path': resource_path + '/' + actual_policy_moid + '/Profiles',
+ 'moid': moid,
+ }
+ intersight.call_api(**options)
+ actual_policy_moid = ''
+ if not actual_policy_moid:
+ if not intersight.module.check_mode:
+ # post profile to the expected policy
+ options = {
+ 'http_method': 'post',
+ 'resource_path': resource_path + '/' + expected_policy_moid + '/Profiles',
+ 'body': [
+ {
+ 'ObjectType': 'server.Profile',
+ 'Moid': moid,
+ }
+ ]
+ }
+ intersight.call_api(**options)
+ intersight.result['changed'] = True
+
+
+def main():
+ argument_spec = intersight_argument_spec
+ argument_spec.update(
+ state=dict(type='str', choices=['present', 'absent'], default='present'),
+ organization=dict(type='str', default='default'),
+ name=dict(type='str', required=True),
+ target_platform=dict(type='str', choices=['Standalone', 'FIAttached'], default='Standalone'),
+ tags=dict(type='list', default=[]),
+ description=dict(type='str', aliases=['descr'], default=''),
+ assigned_server=dict(type='str', default=''),
+ boot_order_policy=dict(type='str'),
+ imc_access_policy=dict(type='str'),
+ lan_connectivity_policy=dict(type='str'),
+ local_user_policy=dict(type='str'),
+ ntp_policy=dict(type='str'),
+ storage_policy=dict(type='str'),
+ virtual_media_policy=dict(type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+
+ intersight = IntersightModule(module)
+ intersight.result['api_response'] = {}
+ intersight.result['trace_id'] = ''
+ #
+ # Argument spec above, resource path, and API body should be the only code changed in this module
+ #
+ resource_path = '/server/Profiles'
+ # Get assigned server information
+ intersight.result['api_response'] = {}
+ intersight.get_resource(
+ resource_path='/compute/PhysicalSummaries',
+ query_params={
+ '$filter': "Moid eq '" + intersight.module.params['assigned_server'] + "'",
+ }
+ )
+ source_object_type = None
+ if intersight.result['api_response'].get('SourceObjectType'):
+ source_object_type = intersight.result['api_response']['SourceObjectType']
+ # Define API body used in compares or create
+ intersight.api_body = {
+ 'Organization': {
+ 'Name': intersight.module.params['organization'],
+ },
+ 'Name': intersight.module.params['name'],
+ 'Tags': intersight.module.params['tags'],
+ 'Description': intersight.module.params['description'],
+ 'AssignedServer': {
+ 'Moid': intersight.module.params['assigned_server'],
+ 'ObjectType': source_object_type,
+ },
+ }
+ if intersight.module.params['target_platform'] == 'FIAttached':
+ intersight.api_body['TargetPlatform'] = intersight.module.params['target_platform']
+
+ # Configure the profile
+ moid = intersight.configure_policy_or_profile(resource_path=resource_path)
+
+ if moid and intersight.module.params['boot_order_policy']:
+ post_profile_to_policy(intersight, moid, resource_path='/boot/PrecisionPolicies', policy_name=intersight.module.params['boot_order_policy'])
+
+ if moid and intersight.module.params['imc_access_policy']:
+ post_profile_to_policy(intersight, moid, resource_path='/access/Policies', policy_name=intersight.module.params['imc_access_policy'])
+
+ if moid and intersight.module.params['lan_connectivity_policy']:
+ post_profile_to_policy(intersight, moid, resource_path='/vnic/LanConnectivityPolicies', policy_name=intersight.module.params['lan_connectivity_policy'])
+
+ if moid and intersight.module.params['local_user_policy']:
+ post_profile_to_policy(intersight, moid, resource_path='/iam/EndPointUserPolicies', policy_name=intersight.module.params['local_user_policy'])
+
+ if moid and intersight.module.params['ntp_policy']:
+ post_profile_to_policy(intersight, moid, resource_path='/ntp/Policies', policy_name=intersight.module.params['ntp_policy'])
+
+ if moid and intersight.module.params['storage_policy']:
+ post_profile_to_policy(intersight, moid, resource_path='/storage/StoragePolicies', policy_name=intersight.module.params['storage_policy'])
+
+ if moid and intersight.module.params['virtual_media_policy']:
+ post_profile_to_policy(intersight, moid, resource_path='/vmedia/Policies', policy_name=intersight.module.params['virtual_media_policy'])
+
+ module.exit_json(**intersight.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_virtual_media_policy.py b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_virtual_media_policy.py
new file mode 100644
index 00000000..22ab2ddd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/intersight/plugins/modules/intersight_virtual_media_policy.py
@@ -0,0 +1,368 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: intersight_virtual_media_policy
+short_description: Virtual Media policy configuration for Cisco Intersight
+description:
+ - Virtual Media policy configuration for Cisco Intersight.
+ - Used to configure Virtual Media image mappings on Cisco Intersight managed devices.
+ - For more information see L(Cisco Intersight,https://intersight.com/apidocs).
+extends_documentation_fragment: intersight
+options:
+ state:
+ description:
+ - If C(present), will verify the resource is present and will create if needed.
+ - If C(absent), will verify the resource is absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ organization:
+ description:
+ - The name of the Organization this resource is assigned to.
+ - Profiles and Policies that are created within a Custom Organization are applicable only to devices in the same Organization.
+ default: default
+ name:
+ description:
+ - The name assigned to the NTP policy.
+ - The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_.
+ required: true
+ tags:
+ description:
+ - List of tags in Key:<user-defined key> Value:<user-defined value> format.
+ type: list
+ descrption:
+ description:
+ - The user-defined description of the NTP policy.
+ - Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_).
+ aliases: [descr]
+ enable:
+ description:
+ - Enable or disable virtual media.
+ type: bool
+ default: true
+ encryption:
+ description:
+ - If enabled, allows encryption of all Virtual Media communications
+ type: bool
+ default: false
+ low_power_usb:
+ description:
+ - If enabled, the virtual drives appear on the boot selection menu after mapping the image and rebooting the host.
+ type: bool
+ default: true
+ cdd_virtual_media:
+ description:
+ - CDD Virtual Media image mapping options.
+ suboptions:
+ enable:
+ description:
+ - Enable or disable CDD image mapping.
+ type: bool
+ default: true
+ mount_type:
+ description:
+ - Type (protocol) of network share used by the remote_hostname.
+ - Ensure that the remote_hostname's communication port for the mount type that you choose is accessible from the managed endpoint.
+ - For CIFS as your mount type, ensure port 445 (which is its communication port) on the remote_hostname is accessible.
+ - For HTTP, ensure port 80 is accessible.
+ - For HTTPS, ensure port 443 is accessible.
+ - For NFS, ensure port 2049 is accessible.
+ choices: [nfs,cifs,http,https]
+ required: true
+ volume:
+ description:
+ - A user defined name of the image mounted for mapping.
+ required: true
+ remote_hostname:
+ description:
+ - Hostname or IP address of the server hosting the virtual media image.
+ required: true
+ remote_path:
+ description:
+ - Filepath (not including the filename) of the remote image.
+ - Ex. mnt/SHARE/ISOS
+ required: true
+ remote_file:
+ description:
+ - Filename of the remote image.
+ - Ex. custom_image.iso
+ required: true
+ username:
+ description:
+ - The username for the specified Mount Type, if required.
+ password:
+ description:
+ - The password for the selected username, if required.
+ hdd_virtual_media:
+ description:
+ - HDD Virtual Media image mapping options.
+ suboptions:
+ enable:
+ description:
+ - Enable or disable HDD image mapping.
+ type: bool
+ default: false
+ mount_type:
+ description:
+ - Type (protocol) of network share used by the remote_hostname.
+ - Ensure that the remote_hostname's communication port for the mount type that you choose is accessible from the managed endpoint.
+ - For CIFS as your mount type, ensure port 445 (which is its communication port) on the remote_hostname is accessible.
+ - For HTTP, ensure port 80 is accessible.
+ - For HTTPS, ensure port 443 is accessible.
+ - For NFS, ensure port 2049 is accessible.
+ choices: [nfs,cifs,http,https]
+ required: true
+ volume:
+ description:
+ - A user defined name of the image mounted for mapping.
+ required: true
+ remote_hostname:
+ description:
+ - Hostname or IP address of the server hosting the virtual media image.
+ required: true
+ remote_path:
+ description:
+ - Filepath (not including the filename) of the remote image.
+ - Ex. mnt/SHARE/ISOS
+ required: true
+ remote_file:
+ description:
+ - Filename of the remote image.
+ - Ex. custom_image.iso
+ required: true
+ username:
+ description:
+ - The username for the specified Mount Type, if required.
+ password:
+ description:
+ - The password for the selected username, if required.
+ mount_options:
+ description:
+ - Mount options for the Virtual Media mapping.
+ - For NFS, supported options are ro, rw, nolock, noexec, soft, port=VALUE, timeo=VALUE, retry=VALUE
+ - For CIFS, supported options are soft, nounix, noserverino, guest
+ required: false
+ authentication_protocol:
+ description:
+ - Authentication Protocol for CIFS Mount Type
+ required: false
+author:
+ - David Soper (@dsoper2)
+ - Sid Nath (@SidNath21)
+version_added: '2.10'
+'''
+
+EXAMPLES = r'''
+- name: Configure Virtual Media Policy
+ cisco.intersight.intersight_virtual_media_policy:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ organization: DevNet
+ name: lab-vmedia
+ description: Virutal Media policy for lab use
+ tags:
+ - Key: Site
+ Value: RCDN
+ cdd_virtual_media:
+ mount_type: nfs
+ volume: nfs-cdd
+ remote_hostname: 172.28.224.77
+ remote_path: mnt/SHARE/ISOS/CENTOS
+ remote_file: CentOS7.iso
+ hdd_virtual_media:
+ mount_type: nfs
+ volume: nfs-hdd
+ remote_hostname: 172.28.224.77
+ remote_path: mnt/SHARE/ISOS/CENTOS
+ remote_file: CentOS7.iso
+
+- name: Delete Virtual Media Policy
+ cisco.intersight.intersight_virtual_media_policy:
+ api_private_key: "{{ api_private_key }}"
+ api_key_id: "{{ api_key_id }}"
+ organization: DevNet
+ name: lab-vmedia
+ state: absent
+'''
+
+RETURN = r'''
+api_repsonse:
+ description: The API response output returned by the specified resource.
+ returned: always
+ type: dict
+ sample:
+ "api_response": {
+ "Name": "lab-ntp",
+ "ObjectType": "ntp.Policy",
+ "Tags": [
+ {
+ "Key": "Site",
+ "Value": "RCDN"
+ }
+ ]
+ }
+'''
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.intersight.plugins.module_utils.intersight import IntersightModule, intersight_argument_spec, compare_values
+
+
+def main():
+ path = '/vmedia/Policies'
+ virtual_media_mapping = dict(
+ enable=dict(type='bool', default=True),
+ mount_type=dict(type='str', choices=['nfs', 'cifs', 'http', 'https'], required=True),
+ volume=dict(type='str', required=True),
+ remote_hostname=dict(type='str', required=True),
+ remote_path=dict(type='str', required=True),
+ remote_file=dict(type='str', required=True),
+ mount_options=dict(type='str', default=''),
+ username=dict(type='str', default=''),
+ password=dict(type='str', default='', no_log=True),
+ authentication_protocol=dict(type='str', default='none'),
+ )
+ argument_spec = intersight_argument_spec
+ argument_spec.update(
+ state=dict(type='str', choices=['present', 'absent'], default='present'),
+ organization=dict(type='str', default='default'),
+ name=dict(type='str', required=True),
+ description=dict(type='str', aliases=['descr'], default=''),
+ tags=dict(type='list', default=[]),
+ enable=dict(type='bool', default=True),
+ encryption=dict(type='bool', default=False),
+ low_power_usb=dict(type='bool', default=True),
+ cdd_virtual_media=dict(type='dict', options=virtual_media_mapping),
+ hdd_virtual_media=dict(type='dict', options=virtual_media_mapping),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+
+ intersight = IntersightModule(module)
+ intersight.result['api_response'] = {}
+ intersight.result['trace_id'] = ''
+ # Defined API body used in compares or create
+ intersight.api_body = {
+ 'Organization': {
+ 'Name': intersight.module.params['organization'],
+ },
+ 'Name': intersight.module.params['name'],
+ 'Tags': intersight.module.params['tags'],
+ 'Description': intersight.module.params['description'],
+ 'Enabled': intersight.module.params['enable'],
+ "Encryption": intersight.module.params['encryption'],
+ "LowPowerUsb": intersight.module.params['low_power_usb'],
+ 'Mappings': [],
+ }
+
+ if intersight.module.params.get('cdd_virtual_media'):
+ intersight.api_body['Mappings'].append(
+ {
+ "ClassId": "vmedia.Mapping",
+ "ObjectType": "vmedia.Mapping",
+ "AuthenticationProtocol": intersight.module.params['cdd_virtual_media']['authentication_protocol'],
+ "DeviceType": "cdd",
+ "HostName": intersight.module.params['cdd_virtual_media']['remote_hostname'],
+ "Password": intersight.module.params['cdd_virtual_media']['password'],
+ "IsPasswordSet": intersight.module.params['cdd_virtual_media']['password'] != '',
+ "MountOptions": intersight.module.params['cdd_virtual_media']['mount_options'],
+ "MountProtocol": intersight.module.params['cdd_virtual_media']['mount_type'],
+ "RemoteFile": intersight.module.params['cdd_virtual_media']['remote_file'],
+ "RemotePath": intersight.module.params['cdd_virtual_media']['remote_path'],
+ "Username": intersight.module.params['cdd_virtual_media']['username'],
+ "VolumeName": intersight.module.params['cdd_virtual_media']['volume'],
+ }
+ )
+ if intersight.module.params.get('hdd_virtual_media'):
+ intersight.api_body['Mappings'].append(
+ {
+ "ClassId": "vmedia.Mapping",
+ "ObjectType": "vmedia.Mapping",
+ "AuthenticationProtocol": intersight.module.params['hdd_virtual_media']['authentication_protocol'],
+ "DeviceType": "hdd",
+ "HostName": intersight.module.params['hdd_virtual_media']['remote_hostname'],
+ "Password": intersight.module.params['hdd_virtual_media']['password'],
+ "IsPasswordSet": intersight.module.params['hdd_virtual_media']['password'] != '',
+ "MountOptions": intersight.module.params['hdd_virtual_media']['mount_options'],
+ "MountProtocol": intersight.module.params['hdd_virtual_media']['mount_type'],
+ "RemoteFile": intersight.module.params['hdd_virtual_media']['remote_file'],
+ "RemotePath": intersight.module.params['hdd_virtual_media']['remote_path'],
+ "Username": intersight.module.params['hdd_virtual_media']['username'],
+ "VolumeName": intersight.module.params['hdd_virtual_media']['volume'],
+ }
+ )
+
+ organization_moid = None
+ # GET Organization Moid
+ intersight.get_resource(
+ resource_path='/organization/Organizations',
+ query_params={
+ '$filter': "Name eq '" + intersight.module.params['organization'] + "'",
+ '$select': 'Moid',
+ },
+ )
+ if intersight.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ organization_moid = intersight.result['api_response']['Moid']
+
+ intersight.result['api_response'] = {}
+ # get the current state of the resource
+ filter_str = "Name eq '" + intersight.module.params['name'] + "'"
+ filter_str += "and Organization.Moid eq '" + organization_moid + "'"
+ intersight.get_resource(
+ resource_path=path,
+ query_params={
+ '$filter': filter_str,
+ '$expand': 'Organization',
+ },
+ )
+
+ moid = None
+ resource_values_match = False
+ if intersight.result['api_response'].get('Moid'):
+ # resource exists and moid was returned
+ moid = intersight.result['api_response']['Moid']
+ if module.params['state'] == 'present':
+ resource_values_match = compare_values(intersight.api_body, intersight.result['api_response'])
+ else: # state == 'absent'
+ intersight.delete_resource(
+ moid=moid,
+ resource_path=path,
+ )
+ moid = None
+
+ if module.params['state'] == 'present' and not resource_values_match:
+ # remove read-only Organization key
+ intersight.api_body.pop('Organization')
+ if not moid:
+ # Organization must be set, but can't be changed after initial POST
+ intersight.api_body['Organization'] = {
+ 'Moid': organization_moid,
+ }
+ intersight.configure_resource(
+ moid=moid,
+ resource_path=path,
+ body=intersight.api_body,
+ query_params={
+ '$filter': filter_str,
+ },
+ )
+
+ module.exit_json(**intersight.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/.gitignore b/collections-debian-merged/ansible_collections/cisco/ios/.gitignore
new file mode 100644
index 00000000..6037698f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/.gitignore
@@ -0,0 +1,3 @@
+.tox
+__pycache__
+*.py[cod]
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/.yamllint b/collections-debian-merged/ansible_collections/cisco/ios/.yamllint
new file mode 100644
index 00000000..3adaf90c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/.yamllint
@@ -0,0 +1,15 @@
+---
+extends: default
+
+ignore: |
+ .tox
+ changelogs/*
+
+rules:
+ braces:
+ max-spaces-inside: 1
+ level: error
+ brackets:
+ max-spaces-inside: 1
+ level: error
+ line-length: disable
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/FILES.json b/collections-debian-merged/ansible_collections/cisco/ios/FILES.json
new file mode 100644
index 00000000..9051cc00
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/FILES.json
@@ -0,0 +1,7614 @@
+{
+ "files": [
+ {
+ "name": ".",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "LICENSE",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
+ "format": 1
+ },
+ {
+ "name": ".yamllint",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "827ef9e031ecdcaf137be239d33ef93fcbbc3611cbb6b30b0e507d0e03373d0e",
+ "format": 1
+ },
+ {
+ "name": "docs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_ospfv3_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "74e2be6334a29be7503747ba59b229b88d8c6000209799bbb243c78c5eb6f652",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_vrf_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c71060ef1b3d48f0cbb3eb0efd9eaa5589a2654e4dc4a2f3739dc11d067986c",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_linkagg_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "778a770081c633fbd81cfa4577fc31e16beb492f3682299115e164956b0446be",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_bgp_global_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ef55b062b32fbd96d306f2c1b6188fa625597988c2b85f9b7ccb30cf03bb1848",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_l2_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "218543c7086d013cee59befc33a325a89440e910a9add587552464563a9e3f09",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_acls_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fa7601417f546d0ee9dbf4c0252c012ab884b0989f715d6897df99ea922318c8",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_ping_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ef5c5f82202702f0a8e7b7393ffb95a39ee02671e7bae65ccf89f7e6b4cfa8af",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_l3_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e200429ad1fe685a02b402fa026ee0ddb89efbf6b466750e57bad3cc7bee04b2",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_config_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "658fc900d0a02a88de1851659b998fc9a7c7c8c92ebe94979c39950f82143c39",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_lldp_global_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5c927b32e1b9bff0369caa4000c27fbee9d4cf044e0fb5cb222e07a15b46edc1",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_l3_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58d166c3ff6658dec3fd92ec46cc22c852d82536483b030e845cdbd6ae26434b",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_acl_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "50cc1d5481c6414b85deaed2c6adc386945f386099dc1d4cd44739319be3160b",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_bgp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c2130418c8deb2c92fd10365d6811b1e538cd8a3594113c96e1e37429281c438",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_vlans_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "042c93bea389c1ef78ef0da30c52af6fbf30939613084232096cdb79cf690c4d",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_vlan_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7d8fc425d54bd8f33bece8b51fcbe96e3e9bafa6aac8b4085a3e2e3d61ab19a1",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_banner_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "59c141929bc22f9448b15b48880d724e6febe21bd7fed08ebffd7904013cca6a",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_facts_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "047ddccb9148c073a9ecfd74bfc319ce5545762d28eb3f5b1828756b11861df5",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0cab0406db57557fa7e271b63b5dfc4a85b0a8fd1ff45d83e29d388b424811bd",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_user_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "81b2d8eabb4d122093f8fd1f99360c14c2aee22d21ebff509fa436448baba571",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_system_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1410a8cba8910524911df58c9f53e8dbbb2a3c319c4bf8fce88893058f761ca5",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_static_routes_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2cfa1628d11e3cc476365fe8cfb78a2516ddca6a0ae32619f78aff84af0ebe7",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_lacp_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb8cdba2e6efa2efb03fcefee0518ecef34a32a78a95a21750d7efcc2906c6de",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_command_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf0fc722b314cfe7efd2d2c284208b49145b585525d9786bb8dec325c541cb1",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_static_route_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bb4db22c9c6bbfe635a1ea998a859d7616b4c4bb449e4e50fffb570eee7b28be",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_ospf_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0ad42283a5e687c486952415ab9ca72336def521e608dd7cca62d2f3b32fad33",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b9b4ecf9435bc6408671b476e1707c741e7d7a8bdfcf11cb3d643af5a250fbcb",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_lag_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6e02f79e7595c74feea32fdf8573de896c48c779cfc0040f960c8b983adb4414",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_lldp_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2f329b06f6e573894353d5005247f05b32f4241aa6489ba5992afe619ca18677",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_logging_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b442922626db1fb0d1fa50063faa6337de49cc521167a451b22c748bdc412cb0",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_ntp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e75e665aeaf5aaa786cbdd8480268251d47a8c837c2aef01fe3d6406de73b1c",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_lacp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "892db3a89b17c0afbc006fef990393d63bfb1d63f3264ada54a8185b4b3aaa1c",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_ospfv2_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9833c053f427d4e89aa340b84062a203f4e6b7dc197e9849c1ae61114b92d543",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_cliconf.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e427b1ed6a2288f9728b0e7420093ada804f119dc63bdd8832b35524fec6ef2",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_l2_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2d9a7b60b3e750044cdb0d352f0cc04828a37f9e6d73a8ec0408c939f4806c67",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.ios.ios_lldp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "818e9215d73788ab061696c5e36af68352a7c35767460974f239b1b3c1734099",
+ "format": 1
+ },
+ {
+ "name": "bindep.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "80645079eb025b3a905b4775ac545d080a3d7d35d537c31e04f7197c94315ab5",
+ "format": 1
+ },
+ {
+ "name": "test-requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f3c3034db738d9dd385446a8bb5275e8cdfa3661206dd97ac783c2f730534b24",
+ "format": 1
+ },
+ {
+ "name": "changelogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs/changelog.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a7026ce4d2faf2d706f3e08e35521192d5fdccc272fa5fd0f3dc3d97d1aba759",
+ "format": 1
+ },
+ {
+ "name": "changelogs/config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ea4bf1b6f634beae5b603bab1d38ebc0c6aa05450881a7d7accbe888c8780b62",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/132_update_ios_l3_doc_issue.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3812558da19f5edc1130dbe678b2fd89e8195576388dd78676d4888e3bc94469",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/upcap_ansible.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1600f7584ad11feb18d07e04d4b8fadc16100aaa6500b88a069135b27b9b3976",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/223_fix_static_routes_facts_parsing.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "457aa956edff6b066b7364defa6297552e73816cfdbd7fd65835fbf0f40e014a",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/141_add_int_virt_template_issue.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "691eeca5d61be6009df9ecd152a989503cb0111c6f6c0c9291ac366743cffe7c",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/144_add_interface_tunnel_issue.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "42aaae52019c1e84fd76dba01980926cdca614bca18aa7542cc327501db3cad1",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/ios_config_diff_doc_update.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bf62f20445fcfa0adb4d006d2184d48d1bf7d2dbf5653a153fe7d5fc506f338f",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/51-virtual-switch-system-detection.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ad74386cb6c5d8079270abc4a95629d796df0bf0b6ef5f8518b5d6dfc37976ba",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/135_accept_list_of_dict_for_ospfv2_network.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7b022e7c398f9bbe955adba92e84dabe4dc6322fa364bdd9aa7969ae5f4d56ab",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/update_resource_module_doc_discrepancy.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "36cfb95f5e77c3270bc399ff39fdfcfa19d607e5cc2ca4e45ec0b5d2a2230de6",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/148_add_ospv3_resource_module.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6cadc12d7b1823307a2ec221d10552884d3d71c8ed99c72890e80e8d1668cbbb",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/209_fix_ios_ospf_interfaces_authentication_param.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9f638e5926a3dde025fa397c5d473ba4380aea1ab8be57a99632e5bbed02c71d",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/galaxy-version.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dda8eb2efcf0e2d799b90db8e752e5d9b5bcc49cbb0d3a55a997fea15c0520a1",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/103_fix_l2_interfaces_traceback_error.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9077e187530e51ef748a95c5cdb805566445d2a24fe07882dee22bd5d8c51166",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/command-dicts.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0878798781e7643c03ec6736bbbae7f32746fcb87d73c2d77b882fb47177c836",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/211_update_ios_acls_module_to_use_resource_module_approach.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "54661f643be3b0734284cdcb8c5a4b184c1d22776523a3a40dd197c1c123e27b",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/228_ios_ping.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e0c8e0e014c75bea285064677a835b77dce55d0773c6f7f97394c268b4ac116d",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/192_add_ospf_interfaces_resource_module.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5c162bf542d913b911bbb24240adf5e8a0e8d3b27c559406d7aebf938655cd48",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/65_fixes_ios_interfaces_rm_where_interface_in_description_resulted_in_failure.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0c05814f5d9982548dcfd7e0619541f1fd469df98a242b61d30340858aa873f9",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/63_support_for_very_long_vlan_name.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d7f972e56d2f7537fb87ee5d0baa4fd0ae02f2569a4b3db603e8fe9f870c9f84",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/175_fix_ios_vlans_when_name_had_remote.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "11691237a5c181cf2bd78a054696638ef4d86b8008931a9b110c5c18524d1970",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/146_add_cdp_platform_info_to_ios_facts.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "984572e834b4a1f51e123a4ec2713d578799eeeab75f7c6375c2f4cfb6db4d8a",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/161_static_route_facts_cmd_update.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "db95cab6ab5d1ce063f71f9cf2bad7d7abd2b0be74c5da19e73d52e0251478e6",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/124_resolved_ios_acls_issue.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "057db279cb937df4b78a69fe1fcbd8f9df25ba521b95c913d1cbedc8ebdff571",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/165_enable_ospfv3_integration_tests.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b89fb94c423689958f004b9699a5227be29cc9e583d4c53914998459ccca5746",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/137_ios_static_routes_idempotency_issue.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "70ad3e8b7e340e563909966300a1f6e8eceba8184357fb100c6451f50c1e5305",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/148_add_bgp_global_resource_module.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b3a0001f0a5b89bd967f6102dde4e21fd17c6902450c554cc1af8f0a180ec50f",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/216_fix_command_rejected_issue.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6e85011e06de05e78ff0a12b613e2ceaa55cfb4dbb00aaa6d4b871775353d1d0",
+ "format": 1
+ },
+ {
+ "name": "changelogs/CHANGELOG.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bb9b80a1d19772ca9e442786c5da2545ca6a033b8f7dc146b1acf0451b484674",
+ "format": 1
+ },
+ {
+ "name": "meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "meta/runtime.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "13fc79ec75f433967f79302d2eb0fb67cdbaf4c43f2eabcee4d42c4f0e237545",
+ "format": 1
+ },
+ {
+ "name": "README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "139c61ac8f33454c00e270e904067b4f88661748e44fdf787042611bc7424d7a",
+ "format": 1
+ },
+ {
+ "name": ".gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "13efa8adb5f73be5234e611e5ec4cc509417641a49c47d861ae370cc86bbb981",
+ "format": 1
+ },
+ {
+ "name": "plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_lag_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8fabce7d6ee2bd5160dd29a134e23c99ceb5c30e4c51036003715450bb218ac",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_config.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b81ee1836e019050388b6e527425f0360510e85ebae9c3dd8cb41a99abfc8ae7",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "67fb90c1d4dd662048313f4fe446c624ac6803471a04ce19bf8548b5a643d4aa",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_user.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6dd9e94b095b8e8ced49a7732bbc0ba4da3efe1f88158c0d83f36213279b71c1",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "76c27736185bb25abfd209aa25203d05fc08080094e15eb33fcc4f20d89d2088",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_linkagg.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b1e8f381ec03eff2d89f09e3198b3e97256602eedde4c70c63418924aa37affe",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_l2_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "74156f80d2e022aeebdc442f3d4ce5b8d729e287c429868df34a3698c4fecdfe",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7c8e3ce262924dab1bff72e3977f10142b54710f647802c8b5411762f3b70342",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a33080d78f353ea635f47549dca3ed7e688e25ed8c0e7ea5a66afc3ce87c4fe",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_lldp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "739d99588bc6024d26816baf136498b5f1891f41d8750913d7c54d0ec8fbfc38",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_logging.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "082a46487a97ce8625373f2eac27c77698ba1821cb930406d6123d7b6c2b0d91",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_l3_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b16fe69dd57f10af7a037a2547c3fff72bfd13abc0d09aa32cea16387a186343",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_vlan.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "01b64e10811c893335326c56c1eb7ebd68faacdeceb47b3873825132f65b27e9",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55d90a90aab6ff0ba212a9f08c26174e163fcc1a6f1fc290ad0c740fa6a7074e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_system.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ce26d3a271fbf1733d15581ecf3a1a4884c39155aa5d90eb5d1631994501d953",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "74a931c245b961507064097b4d46c2b4e8e7a179c7746f33c4c142ef54624f13",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_command.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "09a02e3a7c4a950cd63430c408dec51d8fe9c1fa3bb93105b1c23f375eaac569",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_bgp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "012729b5afd0450c3551d2a4306bc177b92713ef323eb5b4f42655bf74c77f2e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3820f0c9e1191636aefdde6faf75b3463dc3d8a3e37979df293869e9b9f3f837",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_lldp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e235e34a49446f9f3d79d783e0c3f031a1ace4a313a87ded857fbc572e2e7eb7",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "03b2057cd730203d83ee9457f0620183fac3de176c8c69a6afb6a3e89b0add94",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1cc30586ac5f0e17d7606a2372b8713e0cda6982479ca5f0a2f65a0f7143400c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cd875a5046d98cc62591b279636e6562b9857c73d70997d14fe4ddc3052dea8c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_ping.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "25eb68b4412cf20691121c08e37589f59b0cffb7ad36036f8e6f6c2c1d49807b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_bgp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "94542b14c3c4221ee2fb44adc9bffcf505c4ca73f87342d0c4e6cba9f86a50dc",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_vlans.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2fea596e3d800ed40986f996ae1efea6cd58ef62f52df0b5a19162d94b9a9952",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_ntp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a46a40010c0704713e93ed62bc8bb1fca58312b29af85b9789b0be53b1d5c3a0",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_lacp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4c3d89b7b4758f8551a613d44d2f1292aa1ec4a24c3fc3ab6909ae1e604944a3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b7e833d065ff6c52afa6194ca91f0d80e105d4d2db3fc289299abcdd9352a44b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "01d5836db6e1c8728054e79a36d34c5bfbd46749206715a1f4257a0e88078725",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_vrf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e39c41ae7183034593d908d0cbc38183b8ae48d66a0730c82a9344c224abdae",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ea5944669366547ac9c0bd789cf26e56d68d9f1ede329915c590c1fb998f696c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_static_route.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "717b071aa28cc8838448692dc6e07ca16423419a946f24a1c388a0b6faf60bf5",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ios_banner.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e313e765f108dd7e3f730e5a2e79370eea612f380e27698a061142961c7d994",
+ "format": 1
+ },
+ {
+ "name": "plugins/action",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/action/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/action/ios.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c85d927519b8c779b33d5616f04bff5f7887032a5be300ca74a168cc9f40e4af",
+ "format": 1
+ },
+ {
+ "name": "plugins/cliconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/cliconf/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/cliconf/ios.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ff85864c74d3616cb3f2bcb963aca4a6949b59ad352e347098fd9b130397aa81",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/module.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a33a3e10d3b3220c99ccd2ac2bde0021aa8b9d61bf0beb0b0bf59ff6168fcb9c",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/providers.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1e40324ccc5b05d7a51c2a6d604362a4e80d92919581f319dc1b4efaff17008e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/cli/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/cli/config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/cli/config/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/cli/config/bgp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/cli/config/bgp/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/cli/config/bgp/neighbors.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb6fd236b7cd74b81f62704d27248b8ae6d54623cae3fbde0cd19e8dcb45afe6",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/cli/config/bgp/address_family.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a825b80d4b84ea95764dfd4363bb3fe95de11cb6a3f3799c0504396e39e94241",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/cli/config/bgp/process.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "91f9d1b15caa97d5852ec729f8be913cbb93785c69832a3ad63119b2bab54d32",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/providers/cli/config/base.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3686b522f34a831ec029cb3d78be9ad19fd8480c1a583ea7f2a37fce0f997a6c",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/bgp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/bgp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/bgp_global/bgp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b06282d2e3ad29572c5ada618be96b43c34ec411704d80be64335bd3236bed3f",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/l2_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/l2_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/l2_interfaces/l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6249e805d7e7d8cfd0863570ba2fcc7bf4f20756aec7442cc08237c7df58f4b5",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/ospf_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/ospf_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/ospf_interfaces/ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "473f098bd911f58d8b97ecc9c6c01a14903ea0b25d28c33dfc598973b252b8c0",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/static_routes/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/static_routes/static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c2f4cf56e98a4ee14d6dee1136852ff8282f25e5773c12559178e5243f7ed3dd",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lacp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lacp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lacp_interfaces/lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1c924bfaa3ae217061e03df9d19883593c9294adb052ad71d7da212289c58d2e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lag_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lag_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lag_interfaces/lag_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5c7ab35168a625c3bf372f1d0481c7f56a38897deccf8da2bb0784224e5b4c7b",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lacp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lacp/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lacp/lacp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6e9f4266782c8b3b0c445f6a69404bb5f3c2ee20ccc5e327d7552dac280d04c4",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lldp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lldp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lldp_interfaces/lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2af4e200f257c683508e2baeb1524463bf33c59474fd5d6a3ceb513fcc278c28",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/l3_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/l3_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/l3_interfaces/l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "effb693804b7b732e77362d83f1fe802588585f402a4c3968b880435e44af854",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/interfaces/interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3523616c06072d4a180adcda3cb6de589e17d1fbd64888178c251f0a7802562d",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/ospfv3",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/ospfv3/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/ospfv3/ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a0d9e671365f851f0d4b29f18d4959404519f2c565ff5bf46f72a5c283515cd4",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/acl_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/acl_interfaces/acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "850b25b0dc61fd541130b7fe74ac80bfff4ebda25917d6ccbc62d77a569c1f41",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d92403c63d1cf3a2a70b824a3ef927343f0667665bc239dc505a591fbd59bf4f",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/legacy",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/legacy/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/legacy/base.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4a732234c3ac856c9f5e90d836e38baef7573959eafedd9c4b7f138093071d7a",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/ospfv2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/ospfv2/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/ospfv2/ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9b872becfd8630bb3b0f72ca7d662ea34e0950accbc4dc51d6d307a8aa7d71ac",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/vlans",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/vlans/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/vlans/vlans.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6773a891d8ab30335bf943bfbb3c4e5154616e1c212404e719b48a2d02231d0a",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/acls/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/acls/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "98c99013042adac02bbda372a416a778b686fac10ad73488e100a618ddf03068",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lldp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lldp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/facts/lldp_global/lldp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55dfac9dd7c0d93d310a317a8f7dc6a3e696bbe44cb383bc4a99193b39e42381",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/bgp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/bgp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/bgp_global/bgp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a1b5e51f1fe8c9c68b19c30ee17532708198d56a862595cf614383d8dec41e9",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/l2_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/l2_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/l2_interfaces/l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f1885d136331fcabcd645fb7bc64a067e9cc694901abbeca536ecc8be4bc0f9a",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/ospf_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/ospf_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/ospf_interfaces/ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "176f018fa64264b5119ece8af84bd9877c23740d9bff01effe03f1589de0ec7c",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/static_routes/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/static_routes/static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "de94e6a905a5fcc1ec380e8118256b641830fa6705d2be50a4b7a8538b6da8b6",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lacp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lacp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lacp_interfaces/lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f94e1c00733ee3134508e8e339d96f7c843969250d8d469eb422798806ee75ab",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lag_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lag_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lag_interfaces/lag_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d727eab1c311da2a0cdbcd4b36506d8c05c9ed9c9d44f502d633b773880f42b6",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lacp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lacp/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lacp/lacp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f149ac93ea8b325017e82f52a05cc216074c18639b4ea752efa68395e2152c91",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lldp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lldp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lldp_interfaces/lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "85218f244c37ca5a1a29309a684caa147c3baa598a2e69b0c73ec398e09800cd",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/l3_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/l3_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/l3_interfaces/l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9f10eeedc9df343426839c1f91a7ceac567d12749183ad90a3d20a3fd0004968",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/interfaces/interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fa85a3ac23ae64fab1a82c4c5d0222ae37bcc0cc1155e997ec46de10c9ec17aa",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/ospfv3",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/ospfv3/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/ospfv3/ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1803b6ce93a54560dda00843553f570639fa2d70be58acaa16815ae7a7d515ea",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/acl_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/acl_interfaces/acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "abf19c869a9c454b777b24cfe5446111e45a940c31fe0d837f7c343625da605b",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/ospfv2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/ospfv2/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/ospfv2/ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0aa41db84154b490ce57636060c015d5076e57f43909c7647cfa612056ae881a",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/vlans",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/vlans/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/vlans/vlans.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3925f694cd06c1b8b2742fe928f53bcfdae8d9ae80faad5be468b6716d0d6605",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/acls/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/acls/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7a605cf670bbb8b43ca0711ca7612035a226d8ed749e35e886c572e4c14135f8",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lldp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lldp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/config/lldp_global/lldp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8e1a3a1944d634eb58d56bbf29d2fbcf40d89edc15f3d80db8a124a9cf067ccc",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/bgp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/bgp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/bgp_global/bgp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f730f010f81319e20e05b7fae6371de2ef2ff0afca54251fcf4b0438caac0d46",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/l2_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/l2_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/l2_interfaces/l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "597023a18e71b7c624956c0bffb38f3d6f56dd315f55cf69679bbfb75b9419cc",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/ospf_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/ospf_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/ospf_interfaces/ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3edb42cfcfa4b2d0679fed529a03baa0d1c7b0d33fb0f5673f25f448a2e74906",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/static_routes/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/static_routes/static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "47c41ae1f613f9390a746faf9378b46ba92b09bf3f2a04eb45b52d9c3a700cd8",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lacp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lacp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lacp_interfaces/lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "47b703ecd4b7f41d20ff2cf9f21f062fcd500887b4f03ae4a4488cc98d7c7733",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lag_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lag_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lag_interfaces/lag_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6119da8e5c85009db69f095c2f7a56c499ba6e23c9c57483932e859e6a620d74",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lacp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lacp/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lacp/lacp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d5a30a7a67b15fadeb132d1666e3135f404b064e2c636dbe4352e5a2e3c73a80",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lldp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lldp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lldp_interfaces/lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "76b60091455e99e4bad476ab84d1e4e238dc962fbda85377b44cea69b8cc8e87",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/l3_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/l3_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/l3_interfaces/l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0eee199ea1b43ab38d29a891d077a08c3fd155832cc663335b8ae35588debc8d",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/facts",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/facts/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/facts/facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "300cf93dfb2983fce0e9fe5ec3a92b3cb8ef42d1c14d861ba72b3531c00b6d4f",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/interfaces/interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "444d31446b3b2e9aa74ceb5b736475e49dcdcf75f92a7f5a079fa327e59e4a47",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/ospfv3",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/ospfv3/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/ospfv3/ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f3fc95473a428199358699c313eb78a1740b84c470e7007a3a487d47ea88798c",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/acl_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/acl_interfaces/acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d42905a9afda5199f3bfcaf9fe0214886821548bcd30d8c6c474afd61eafde97",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/ospfv2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/ospfv2/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/ospfv2/ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0ac2b3ed870b51b10a531b6028dcf676cde3f860430d3da66f633fbf3f56dfbe",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/vlans",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/vlans/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/vlans/vlans.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b14a56e9f15fcc8796cabef66fe29795f1286eefc8693350a7946a0e292f78af",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/acls/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/acls/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d8391bd3769777f0e5af3d4c4810b6cba6333eb879c900edf7934a51a402230c",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lldp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lldp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/argspec/lldp_global/lldp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3a9ee45c3d090050cafcc1bc6e68c04ecc98b4a9e1568882d33b8359631623dd",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/rm_templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/rm_templates/bgp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "09398a3d648ef1c3645fbf5d10ed08890de00b22c658a71e77ee632db94da8d2",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/rm_templates/ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "95fe62bc2ed00dbb80dddffcf9bdc0c0fec85093588f2be8b1faf454494fe1bc",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/rm_templates/ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f397b64b0002765de0c6cf10890c0bd9258c44b7cca5f10ce8d22a7b49ebb18b",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/rm_templates/ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e435e4a9ced111de9f09c2b0a290ad786f1263700b2027f7abc8f7e055e0ed78",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/rm_templates/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "19616ab7b905f3347f2ad8ca1cd6d5a1d2fd50ba46fb705f2c6de560d836d4c9",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/utils/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/utils/utils.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "64a69eb7e544ec4232e0fb1e90a198394df64100210ba70318a9bc459d5ac316",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/ios/ios.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "287c59afe40847a578e6db8074d49c17e1596f472bc4ca34d07f0aa502785239",
+ "format": 1
+ },
+ {
+ "name": "plugins/terminal",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/terminal/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/terminal/ios.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ffa8149fa5f5e9d1c345ce71693e5cf8633459e5bf613d45dda00ec68a34f497",
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/ios.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ac52bca746d9f2d2aa710495508f6b6dc46e7dc4364745bb202cccd96ba9f39d",
+ "format": 1
+ },
+ {
+ "name": "tox.ini",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8489be3acdfa2a0fc1afe08c62db1863042fcdcb812ae76487a6cdaf3d17eb9d",
+ "format": 1
+ },
+ {
+ "name": "tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "01c2cba0422bdac8688109a3e7d137ce710603686005afe4b323775a0511abde",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9b121bba6a0892e8ff599846aa1ea5c388ae3c8a9e6a85192f43b89cf992719f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f9197d0a4996205b420a60b2e87067fce0b51225e6821100fbe1b310c628cbc2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7d6c6a7d802005cd2c85fbda2160439806e81cdce14e0ff6a351d24b2edfe862",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "74bcc717859e6359673ba6d529c9658ce11d1d37ddf572fbb28b272ffacb785b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7667023709a6c9cbb6e4ae02cbd6048ac4594c7c7d8079e537a12d6ae94deeb3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f7c27cd157487084217a300cd0feb6a28914d373abf10486636dda1c4a367176",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7f3df1a8c6d7ddadfe184d5e44e3955ec0873514099dba52087ab14f8deb397b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "26db719f28795d48893b75acb7ab27865359b3958316b9c9380d3c4eb0979642",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d7fd53bfa448c08344322cc25bdead71c4939f04f6f33872949f044bfe440fe7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "265b64036c857b4db4526a1597060dc9d25031013b23261ba12a9dc9fe87279b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7d327294611eb611d6f35e9a2cb61b3874bb19464abb611263e0210dcc9a3064",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c5d533348c002828616b4f8406bcfa54e9c9a892ac23ad0cd8e558288b20ea36",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b2823addabb6ea8765af8c22b9deac38eb5fc2b707eccb9b80fddff27c7bc8a4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "46caec7aa1b09159e6984249b9196dd0133b3020aefebdccbe383e6870f041e9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da714367c037b52d99c4a49409a4a1640f7822e1f0d8586aeb9ddf37c44e8d89",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6275810432c22c259301c7672275cf310de6edfc4e6e4e3233450b68211eab9a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a81ce03dddaf3374eaf766c910cdc115e6bd6bb86207fd32ae7c303949dd5e7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "79157f261882a3c80e798e045e077fa01247699fb8e1f44528702d05ce74fbc0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "638da5e125389338a676c058d51f2e0f4e6a78f8ec16d56315c0f3f38cdba8a7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "512ff8a43bd990aba33ffb34e5bbbe10a33e32ba66e16da7d131bc3427521958",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "174be5b2e49206d58d51fc9ac065942280ea2c762345d745ba4d6e8cbfb4882e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e6aa2803ccc96af860a3b4d6456a0aaaffa1dcb4281b0ad532a6a11082379a3a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "642085133a90516dd423a546fbd8ac47d69f209dd5cfe4415a623506ab439a0d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/_initial_ipv6_setup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b90638bf0a5e6ccf1223191195dfe436dbf2919cd7f58509dd3474e897ff4373",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospf_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5aad47ebad8c598af540471e09d44eb59844b0c4fa5badf3e26925a9bffa51e1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fd14404c1d656a5d3b5799c224ae52331ecec92f00eb7bf53b862035785aa602",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d40f2c5cb855db5567d8c30a8d6525eb05a6b420f1293697dded7caa77e16936",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2f1261a7746841ddac98804fc6ddc815c5e571de8a632e327fafd976ea2d9cf8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3415068b46349aed852408f7ef280432b32ddfcf3c33e9173b197230d8f75fa0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "40721eff93f51b2081a7343b324840cfe9e8af8ab301a2af6379b24f08c50ddb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f8f69ae3107eda13e4da34224d276a12a02773db62dd1d86b22b49959bb5a721",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/_initial_vrf_setup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f754efff9cf7cfd7e0b941c7d178d6761a9f0972d79a095e35f53d2ea3014b25",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6ef92ac51d1e40c99598b9a3210a5c6c00a14e7971803df96851fc963921f6e2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2660f96968e549f00a5a3495eb3aa52fd55d108c1aab3ebc1c9556aebd7a6c77",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b2f5aa315413409a7cc566543432407ccd01c94187f1b2214aefcbacaf9ba1c1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f4ba9d828aed2609febc925384d34a36ea4575050b6790a84b2516275e1cc974",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "47caea1c48e2e7dac3ab13162b34153a831851ba5ef8b859e6dc840cbc1cdce7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "96bbf7646259334e76598c0eb51d0182dc58198286a223c0bbada7e8607a2710",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv2/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "372d741359caac42ade5c0002bdc782d1d938744f191204271157dbb2cd9bb92",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b6f2f2da7b4a6c3295349174bbcde0312211934bd3443fb997f853448b4f3b18",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "98caa48692613524412c717c8eb25ad523087bc1d844631dd6c77bd89931e464",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8d000d875420a138f0f5fb7fc3590a79a973f2d1d5553acf1db018f7d7499ab7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "248684bc32583841054af7096b04eb0c0dafde57cf659a6af48044bdb7f7b0cc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "31ad862316db120f597347fe7214aa450d975761e32bb3bd56b0068d58b78b96",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "50146d9bf938c13bb15670048549c6ca6a424b36005db3aab9b3d25dea68528a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a758928f768bfcd510176cf410545928207d74f665620890da1651f9e747c9e4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "98f38a291eab68c25db50373dd4914930bd149cb2b4f664b9325742d64da53e9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/_remove_vlan_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e35665bf02673c34ba3dc1339d0a5aff4ca227d4d06a244f3f53af31bb3f008e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb68296b0155bb33bf0bef8763a7e575caabd3b01e76d49a264c1f5015cb722d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a8a8f64f22491854226bc4e0bfed4b0d994adf05029ee7066185be014910b82a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "073481a9b551d8ff8bd2f63c557d7acf3e981e86afdb41b54fedb4ba508628a5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3e60013f8483a9df65a6c8fd0e2b8fcf9197fea50496aabcf1a11d78ed266319",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f9d39c2415640453a265dd53522de59dfe8b2928b7bf86841073c30cf0a6fe50",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "12638746d6f02a5836112cc574cb9e9bf25074fdab3bc957570d11eb7f687370",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c9bf8a4be9cd6a66964ac25c7d97551c74a5cd26eff0ea5f9619fcaa749c9ba1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "98caa48692613524412c717c8eb25ad523087bc1d844631dd6c77bd89931e464",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b036a77c5d14eab492db7d0eba2b569fa62e0834b856d07725040f2bfc35f91c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "79de4354f6353bcb35a9718a6b40ea15953daf3a8924916ab07e668ca33fa24f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ed08ea59f253f7b37c73cc4abfaab2a147871b18085961af8aa197487bd91b64",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "59601ab2e70119c4f2026b235324347b0de2dc81f9aefcce4a841c5ac3f0f62d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d7a7fa761d8b3ee52e686beb4d9171afe0848036b61e7b4e8604bc1f68492c07",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5bc03d4d1d986c373fd90117f897478881e2ec9d108b2fee8fb425c1664c6f5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ef455976f0c1c3746ded67a8abb50806e86185f50d7cf632f40c4b787523e0ee",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3a720368eebab029dd04c2984d92490252a06c36c0d7351acf7bb3232ec8d87",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aa8e40ffd7c87cf57184a2869674022db5ea63166d37fe9531f76281eedb7d26",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "de8d2676beaa03337eb9ba76d4e45d4dcf600102002fe2d17d8984211d312bf6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "21abbacb48512cfeb7c56f1f97c6ffdbaff33af7770174284d5d08eb4a25b817",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6b839588214685e499935c87a4ccf8a8fc92b5882dadef08887dd1c01830b2e8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ping",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ping/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ping/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ping/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ping/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ping/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ping/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ping/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ping/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ping/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ping/tests/cli/ping.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f60de9bc6e078018420c9147035ee119483682d5ecae80a7c7e3f9dfdd332df7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/tests/cli/set_lookup_source.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f0418eb06a8665aac17f04f159fb2b746b5e78ec9059cf43979c56a3208956ce",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/tests/cli/set_hostname.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d0839547e625a715aef9c74e186c7d773b2cc797ae69eaedaad0b473b4d86c5e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/tests/cli/set_domain_list.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4a2feee8ca8e87e948058b50280ddac54edda63e4dded07c448ad58572b270fc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/tests/cli/set_name_servers.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4cba18fbbc2844823825198f8073cafc96116262f7372d998320456a4b21b060",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/tests/cli/set_domain_name.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0f800638b80cb903b6b1b06874ddeb12439a926e796cac9c253d8aa2b1cb4250",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_system/tests/cli/net_system.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "17ed01eddfcf13b3d866c7f9615b0f7e9e7dcf1b5aa8a66df4d85fbb03dfa97d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ntp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ntp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ntp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ntp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ntp/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ntp/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ntp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ntp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ntp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ntp/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2226a7893a17ff86b297254650d0bb7c1be9c98ca15739de21c021e7d990f6cc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ca83c0d6a2d9ae96b4a283621594e488f384ed9b5e66533ad79419ddd71eefff",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface/tests/cli/intent.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "366347240efbf228868b2c42c0a2ec16c263d42ee1ec1dac87e40844f7286d2c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interface/tests/cli/net_interface.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bb5360c77922f6427c815b97de61764c4ba3a452aeb1a4b45d2abbcded112c36",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a159a96bd5b749abe2e943461fe85ad545ddaba6f7e3109f8e64ffc0acac0951",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bd18662484be5a36441132e995541a60c5a5e018030fdf54c95a5721f4f95230",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "410ec3b88cbf19c7684121fa80e41ff6499226a71c71ee3e94ffa274aed36d3b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ed13f0a1648017c5322e8bf27286eedf6e8a2bf8b27b7fa4b76977e11092d9fb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a1234e3fbf090e770038c7b0bb58808463cb21da283709c434f217b5559bcfe0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "717affaac7952aa865f93ca922cf2dee8f196356e7a4c62a0d3fa55ae5bda959",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "31f748d3d367a788eada6553244c7133bcad3f577bbce091b60e3edd31081209",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3f726a8058fcb45068789eeff628cb2699ef86ed79c24c8ef754e36473a5968a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cdf9d5d9a82b0a9e05e619b2d6e25788a3d6d8c192ad338082b25e923e7535b8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1fb8f050c5402b2a21ad4898c5f855860d50605269c551f89df566f4aee337d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f7cb827215f61a619075ac83e79739d2f574b55040d858f634f2f815c51bcdfb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "864413a0dd094399b969641e3205828dcf50cf6f0cfe4badc845f931ed956655",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acl_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "729a201d839d1892371d1e30f9d04b51dfaedbe7525cb6481671cd8721b0dcb0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_logging",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_logging/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_logging/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_logging/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_logging/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_logging/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_logging/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_logging/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_logging/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_logging/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_logging/tests/cli/net_logging.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eaaa69681362580326ce460fe64fb2fc6c042c99b4613a326710a94fd9459cb6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_logging/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8f9339885cbc9efe6904eb35850e3fad551547fb348c5135a46ce644e1edbed5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlan",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlan/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlan/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlan/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlan/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlan/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlan/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlan/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlan/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlan/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlan/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0f039a2a380ae9998ab1697361cfbe03a498d0d7f9afb9c028fcfc94ce4a7712",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_route",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_route/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_route/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_route/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_route/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_route/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_route/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_route/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_route/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_route/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_route/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5647c8d18f860c57ed8e1a94079fbf5360ed3b7b642031de67f05a24ed9113ba",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_route/tests/cli/net_static_route.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "39d4c6df49799186813c1b8edd86922aac76ee046cd091c690abcd5f49390b86",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7b64a991fb0542ca93eb647da8348deebe324631744703367815086d548d3657",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8defd549cdef879f20fe308a9c5cb2709d7cf60276fe7780dfb0752c5303efa6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6cccfe0f066c79a43a4a67146ccd18ad49a2a51208bed28616f61d0cc6814aa3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "80bf0fb385ec0ddecab2bdcdf15d182a552c5c2be5368d3ea23aac8f03a47cc9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d19eb6ccf96f20efc50fa089041cb1691e1404c66c8804b6c101defb5dd9a14b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7f1821e2db383e9baf7f6dc94697253fa2561e1aca75097f2f4d7ec0396dfb04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b37e815a73d04e7aafc210e70b2a8b6505c5f688824bd570001a2af3884b50d0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d8c2ef6c0ce2dc5bb2ea6a8c0eba6058a9f36153846564029d53cf97e91d5cad",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8782c2952905125ab49e10cbc38aa774f89ac1a2958410514608cb67228327dc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8576f0ce30b69342067cbaa1c7b6c95040710d1d1ad2b6543eaeeea18188f734",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c312d099303c7367b9e14fc72e1bd347680245bde9e199e22d263f33942acf6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b2510c593b806a1ee4e78a21ed66015213fac149e1957cc688e6b3466fdeaaca",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "94c5907f62731ebfec4c8de9ceca5c169595cfdfbf9b2fb4bd9ee7989bbc9f37",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_linkagg",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_linkagg/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_linkagg/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_linkagg/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_linkagg/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_linkagg/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_linkagg/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_linkagg/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_linkagg/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_linkagg/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_linkagg/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f64ab336138ed6dc086f704116a453ef876b78cc3e2b6adda12e69335e0f25ed",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8bfdae66690410878e43937993b9d090ebbc8371a3883b4f2c6d40861fdd38b2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "98caa48692613524412c717c8eb25ad523087bc1d844631dd6c77bd89931e464",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "31dcdedd876672aa1f15ac36c7b35b156cea9795b15f686e40b2eecaa0ea5392",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2926e432490a15eafcc5ea30088366536c529812ad9cf442596e1d806572deba",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "302d3ed8d3b66ca97253080b6c8adcf8aa8f76a49dee91ebaf721ad0bcdd3c5f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "19f7c631e76b31f1f70a4f42f16b222c636cc1502d9d54998546a58bb513640e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "db73ba9f198e50d457daec6f4bbf4b10bc17952fe8d96bebf282ecbc34ff2600",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "59dd29c3f24a09d430f692a85b7860c16f19aac1c51f387bf4bbd7e123faee68",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3e7dbdd9e080d674bb13e8a6e005cf6573ef79f1825d7d75f1debf17ed634ac3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7f63761c1394ae6ab94c50c96d783945080f9f1865b56abdfbb589a8fc87fb95",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a285a78aff5a523ab16b266c6aff19c7ea21c0fdcb144002eca41de82a77243",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "06f3fcb7eadaa087062564b82f098453ee0a6663694250cd8ee5b2d772496bd4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6fe49cd5fd28575634589d864d5a530849bf04f7bf722bd0eb74554133736cde",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_vlans/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c091c29932709a02400f74bc7a97bfa8ffd62367667058061dc3647642cfc11c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f7e16b3cd732f89c36b3fc13da4d52943cbe80c91fa39bc0ffd21abf4bd73702",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "98caa48692613524412c717c8eb25ad523087bc1d844631dd6c77bd89931e464",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "29e84f17b9cac3926148d1e50ede11ee0416559954a445d2044b2a2d342d120b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2702785ccdf153378ef622fe65cffad3c3aa14fe79101873ae536d001063dae8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "423d950268bc02402a1a1a345aace8641c4049d6887029d4e0bc40dd623d00e6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a4736716c7adce04f1ac956c3d3ad64bc69502ed50511aa93fceae52d158e9f7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9938f9bb5270a3354dd4bdd0abb9ee63b7aef6f08e1eabd81a5657e66499c109",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5222fe95fc6ef12482426687685b92181bfeb496729210771ae43432ca2fcfbd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/_populate_port_channel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6204ace83ea546604ba6676661dadab552e36c37d378be76e18928fd22949f2d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6414bdc86a513148a60079f00166b270eb950cf4349dd968f3da8e4f0bf34367",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "60dca0ec6c0a6b18d7fe628613bd388aa2778d5a7ee5f9149fd50d3cd09cf37b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "148f00f4f03a7834e04660ade280261ea5def4055197cdbed43d589575ad140d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "451e6c82436d5015d020059b27391dbbb0f283f64730d50104d03aa6a9574688",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "522847c2744621ab880087feba0d02a42e573cc14b7fe7da531cb3a472bc5163",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lag_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f8fc576e63012428e294f77954bd683d460a6df446f5b969aa6eb237f299c9bc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5d9a640abfe561027b4afaadcf0306d9f52437a9ca11c8c6bd33aa39668cfc2b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "75178f12ee6688bc6635aafb6d83adddbed9b5a0d12fb9d39c819afa14adba64",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6ca9087498025dc467bd0737ee5bea5773d6550281d1d3a8be1cbc627fbaaa71",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c067c840f27100f2b18efaf9f039b156ed885af45a9a77bb264893062c3c05d6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6b7debbd621f5a8edf96d49eeba53ee8622e795e5ccc1038d6f8a4207d628bc7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "159169e5c932726ac79abcb370450dc2afee7e9070cf1fb84b05f9f7fbcf1702",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/_initial_vrf_setup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "332e803ee3ce5797bea34d78e86a6a879da127418667c303a4ae99aa629c6091",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8531712da3738c16acf1cb21899d1fd5e597f2821c3d73c569fa4ec7a94f4a87",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a59972c045b227ae8e54b691605a1c24e0c900504de8fd0b279d67583d1a8e35",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "18335466957c6d86d7ebd1e08d88f695b48ce9efb0f34614ca553a4f5df504c8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "68d81914a3840dfe26ff646644729b0e9ed9a6843e3bdae953bbd7dbe0236d9e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2e9a68473b1ab7c5eff7082cf63cb875da8f1c853d76b51b7bb37a30fde45069",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d92ba4d016ccb9e18dd025f56f2c5bb7a740d9321f54411ae598a406a6bc9d60",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_ospfv3/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "952c8156e294e0734673d19ae3353ee40b4b54d59bed8bf27d1c3afc43cf3fad",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4704bda3308d41e4324ad6de7a5a791a3524b37b28b22a18c7b95cbb85f81c7d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/files",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/files/test_rsa.pub",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4552b1d9416ac1be7c90b10b182a6ff4a4c56efcba53bb31851808c5d1fd787c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/files/test_rsa",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "660b96e5ac6d6bd17900490c4749ff3a63898bb155db0a661fefbd6ac6f0fc44",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2d819ad27b89c7447246179e00a7031c53c7ed3307e903d6bd4d70d3d713678a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_user/tests/cli/auth.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "68706403accc9add56879153657a76220b2c98cfbbe01233f76b867694fce3b5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/tests/cli/net_banner.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "52cbe31b026c508d4fae39e90b528b85327d7ce2b30226d18b670871712b0515",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/tests/cli/multiple-login-exec.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9d9be6ad7e8e3ff56ac83472e563316c028edeabdb9219342e515efca7fd0bd2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/tests/cli/basic-no-login.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "09df55f560bdd86a377e800660024f18a2894af59abf447fdcee1e6a891235c2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/tests/cli/basic-motd.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "93bea8cbf0016a4594e6fdafae63d1ca198a4f5f14a63eb25e17560b91816b7c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_banner/tests/cli/basic-login.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5d3477ec6d1ccbfc7473f9d32e3984d088dab7a966fbd6e8609c51359beabc6d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "696155604ca0ca7b40a48e1c1164b90239170bb7ef534b018b57d1b2be6230f1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8531d1ae4cf48071c3f0cd56526ad6ba50798eca78d9e06caebc631ce9303c93",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/templates/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/templates/defaults/config.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "63cabaa434b59d994f3d56383ce682f57335258c9275f2f3db142dca3ece356e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "665288590cd4226da42511817f09ccdfc92df36c9621583cd2c82919af295c5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/tests/cli/common_utils.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f734bac34a0107d4d00665b60513b016d3599ab7f79f1511621cd90dddeac830",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/tests/cli/common_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3b5ea64fd1753c05a8315f23375fe9725cbe19ceb5ae497165e1df3c94700953",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_smoke/tests/cli/misc_tests.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "292f2175fc31b26fc51982074d399b351f754c86cae5612883b3b0c24c05a4c1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/tests/cli/contains.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2802a470e4e00bdfbd33c62dca835592020bd65adf89afe46e4642342068a568",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/tests/cli/error_regex.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da924dde120caf35bed512ffd26b69922f5fc9211358e351fe04051b9e4d208d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/tests/cli/bad_operator.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aacae494386399786aa09df529b7bec53c3769d6279674b5d15a7a3aae60b1ea",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/tests/cli/cli_command.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b9ed018e5e163e8f821a6034215f4b519b2d68151826aa3d676271d1a8317434",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/tests/cli/timeout.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a9f86a0c62932181e9d456c8bbfde8671744f801388f10eb0b12743348e7a87e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/tests/cli/invalid.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a4190c98ffd7c41a3340d19395d7805e39fb46d122910994fa4ff2c4e1aefc10",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_command/tests/cli/output.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6a09c43ebab142c101846c2f386ccdc2196812f70646fcd2c1669cf43fae7212",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fab2481e15366cac65f667178aec920f19fa9e6e9b94c1c288f0b1d4def6f496",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "310ea041808710ee6cd0923fa11ee216cb0c7d6648566f8c9082a754b3b09631",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cd37cb681c3273bfa2db4b735eb48e3bd6eaad60c2a7911a9f574590cd3a72e2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4890e93cae219d1bdb2c19bebf1bdde18169a8d09d5744d89343e1d797dfead7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8b582f7dfcc45db8ce601d1507f8413b3c5b498c6d1c5b6fe7c47989964ade1b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests/cli/purged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c245ca5d50c96e31c59b899d36823cf345d37a8b2f20a1bba619148001652c23",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b2da4ddbf8005d319cb8406880027dbceebb455674e15559ab2484fb2b53175d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "27a0abaffbbb3f242847ae239b63f908ac700802b6718f56785203fd08ad4197",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d63663c2b6e79824f0fbc2217b547d5430d12fb14f41272dc3aad18df627a3f4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8a7cce21c39bcd259b9cc943a7132fd52a9f6d37a5bcd9939948d3b5b18da9a6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "42b567ef2692551479ee9ffd64fa26d62b7782064926cb84ab7d2b8bf7440288",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp_global/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e5917e1c386c28d407fb3c2e9b6bbb9207bd41d0111897997ce985e79c4bf9e1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/tests/cli/invalid_subset.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b7e95b6edb1e5a1a65cbe303aa55646080e15a52431fae5e293f4589891920f5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/tests/cli/default_facts.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6559aafec8dc0ffe3922793190f90a004954617bb31a2a4066c2da0dc60bf63d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/tests/cli/not_hardware.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d84f5d25beb0026af15c516e2b051b760ab3cf0696989c2c1dc32e77cfc45d2b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_facts/tests/cli/all_facts.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6f6b2280d403e2619e10a4094c2dabfdad57ffba86fa0da4c0797360993b60c9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "87da87d01cf1b71104f49a1eb08d112511b7b4fedfba8b2680f3a37063f721ee",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "601584c238ab85d2e98bfbe79dbaea89223c2d158d1c1dfcb305b8eef1c27954",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interface/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interface/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interface/tests/cli/agg.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f78b337a47f13293de26707d822a5c48f4ea30a07658a8927547f64106a6b809",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l2_interface/tests/cli/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "746d8efba8c4ac8cc25a70656357e33db1348c67062a7051114b74b4c0619c08",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interface/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interface/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_l3_interface/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "377b5be49e97896ce08623bbfc5be19a728e9c2081cf5ff30d8f1c9ff84182ca",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2459ac3ec5afca9ebb776104b75666ed58f7dd16de2cbd3302112941b3b41b82",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tasks/cli_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6fb40eb0a58fa2ec842aa0b05ce9b85574fb6a99502e3a74f2f0226c7076e354",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7dfea86e7584dc37126acfe5ae7fecad5b7a1ce6b33349b5522bc8170c9da137",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tasks/redirection.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "24c235a52dd3f178bf104b6909e8852323ae8c7e31019efd6a86452c621c22a5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/basic",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/basic/setupexact.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "78abef2216f92c74b21c0a935660fa35625c923e4d3b5d6eaa014a2f7b9d5182",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/basic/configstrict1.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d7019ec0a3b0c34ed351eed7b9ea2979114804e6aac94b9433bd42789bec5b0c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/basic/configexact1.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a112244df64f4360549463724af9ae4c598c3f39c22310a4d0a98c44cf034408",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/basic/intended_running_config",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "69c0817a704c7ef0c5c3acbaa44a542c03a1ef42459a35957714b0a838636df8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/basic/setupstrict.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "78abef2216f92c74b21c0a935660fa35625c923e4d3b5d6eaa014a2f7b9d5182",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/basic/configblock.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d7019ec0a3b0c34ed351eed7b9ea2979114804e6aac94b9433bd42789bec5b0c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/basic/configexact2.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d7019ec0a3b0c34ed351eed7b9ea2979114804e6aac94b9433bd42789bec5b0c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/basic/macro.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "240ea6bffb5f8140b8fb61c0e4505e89f76ea5c0ade1103b63b25c6024e57892",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/basic/base_running_config",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7385f5112a2ea15a4ca3f480bf6830bf91439a67073d846367170819b02692c6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/basic/config.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8a1d61def7b5db197597c56f0c6c31f6aaf16ab38c990e99e386305f46ffa6a8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/basic/setupblock.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c7e470728246324f9d35d7d1f36e53f10a1d424cb9b14aea8ebd22ae03384985",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/templates/defaults/config.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "63cabaa434b59d994f3d56383ce682f57335258c9275f2f3db142dca3ece356e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli_config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7fe692780a98653506cf8820d82d790f9a0d0fa4207f373c225059f7ad7f3280",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli_config/cli_basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "db3b302a31fe498934442cdd7e8eb36f33adbe9275c5a2ea4995448f0f386c99",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e873d48d1a9c2a8d8fb4c66e5217f01a45fabf9057345ce4210c279041329e9a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli_config/cli_backup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8e3dc4e968e2149e65f78bf511fd56927fb8a0deb33233b24f6205f38bd5d3d8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "07a6d77ab31b7a2e9948ba9cf0f7c66269586ffaf4c15191909df635ddeb7a72",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/redirection",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/redirection/shortname.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dcb176c40f74838c5514cb619446c7e7d5bf45e3e79b5ea105cc1724ae987014",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/backup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "077a580bb1fb38b4a39c187c4d59f016bcb820d709ae8153a028762647bfce01",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/defaults.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "45ca9fc442124d5f6b9badf4d14bf575c3d5ebdda6824f219c78de0039ed24e5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/toplevel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d68ad1763287bc15ca8c470a8ee82ae549b0ce4609a4372b2ea48067826f0a8d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/toplevel_before.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c6170c4b9c4a2c9e8573bd6edac18aaf5169f4b8d8899ac532e8d9d30abb1dd2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/diff.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "feacddd26bbcd6b510468edb7659d0664a905fd3cc2b5a170c89469ab2e55463",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/save.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3d97ba05a1e9058163daef744f352416f86dbce90c4cf8b78aeceb14482960ae",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/sublevel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2c935a9ccdea62b5d8d5f06bc041f3dd5868588098186053494b42df8e93bbee",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/sublevel_strict.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f0cd6610a79297f0205b226cfacf01bd712ae66ed756f834887cab483e3538e2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b3f8924569731052bf142a6f8a55b793a9c4bb4e4604b747895212339b40dbcf",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/src_basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f4e60253e9103798a49fc60016447b078ac9a0c5b5931e8c529fe9c59478bbae",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/src_match_none.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a46810ba3e0d57f610a4c7adb367d3424e4b17d979bed6bcd8dff1d2603b05f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/sublevel_block.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d609783be0aaafc97777552aee41d9291799b1778b3be0cb31475507d819b700",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/src_invalid.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "869453b6c865ecc053bae989969a296348ce42a449d3d289d02d05a9352b1732",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/macro.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "546f4182e24f1e46458f2f69852d1e37163e2aba95d35a83f5e21209d652968b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "12a46c088957d5e84a037d94e31978626ccb7260abaa125bc52677fe093656dd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/toplevel_after.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3f66eaf80e762d26aa7684cf57754f6c196e4d798b5daa2c6a2f530a0a79e5fd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_config/tests/cli/sublevel_exact.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7a046d3257788c25299f7e11df7b23c91da7f03062e5c7b56eb69ba3f85bfca8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2b4a818bc4fc5a81fa2f98a0e133af948e6f96631a2e69d7f346fcc4148e62fd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0491773cc2527ff3af722f14867a5538a4967db5a1b717e0bdbb4db1afd3583e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a1f98c6e98c510dbb08ee5c76923de3ee2606b4f98eff6bb8a46f17924942bd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "23f54fb0c468fda513ee975fa2e47d73a9b08ac9e83168cc8bd52ba036b99629",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4413b53571a4b0fc057b05052827c343bf10920cb7785a20b1429d5ed01006",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3e9fb6dbcdcf968f420ab7a2905c750c78771576dd223626c65f0945ff37520c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b6324775b1ad6f2e86073138fd4ccdf544ef42a25048473ea15b6d357493bd75",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b0e29921e7333c5db5460c31aa84dda91275ef56e29530f6591e2630b4ba7950",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9d09ae34ab9af0ef314bb6764d677d9da6721c2ea6ee999a6509323d297907f0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57dbc0b90b7478c18048a7f9bae3d0d024564035838e2e7cf4313666a0b1914e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4c1335cf9df575d9d7584939967d245bb9a20d7c05fdc1329d5c3133ea954863",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "15bfcef5e975418d45878e4d6e20da467c732ed63c3e08906ea1e453750457d0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "492b145950e2e3277fa644396a716413e16f7c9fcde7b8fd3dcf650991bc87a7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9561612cbaa92216b8491e2128c11fab8798c2a073abeb875977b999c46e873d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "248861e24e404d07d4d7ad5b1e1581f6caa0c9fdbe7f90121c92188e94355e9f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aef016ff42f3c5acad560bea30e80e0a622f55c688d7e7b4f58927f3bfe6beb3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e75ca59ca7de8855b00216abc68e71d1176d610db66386198d49940fb8fca074",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1f1fc5128f0516cc0114b35b613e0409daafefd7061643fbc9f5928715bbca4f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8d4356c3e0714d399fbd2d3034dcd02fe0c21340a285122de1cf4d6539675100",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "81349a2741a30f2462a1c7791910c9c0f68937d0f375cf92af5fb82d4266040b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "94be65eb2f51dc8fad5d985c608f7d4a1666717341b585f7211b47d4d0e69cb1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6cefcfe20f54715dde671afa1f2c92aead3272ad10567a55d67047c4bd11835e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests/cli/_intial_setup_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2bd7f282ad1f962e2119ba76ffcb7726632986713300f21e2f6f44bf1d9fe0a1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_static_routes/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f97183b143a95aaa6e45db5f6a2bf7648e2f7e1451cb2de901139bc4e0503894",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a143f1637070f48f0d805d277b37161f2f28380a40fccdec53f388f02dc58bba",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7afeef95df204472049d68969563d0bce130d83df7ee56cf4cb41977ceccc6be",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "96279d4409a0798967325701c2afc44f30831c10b1b7f51cfbe88a189f61172d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4c99e7fd6e2eae766ff1499a5869e5c5269eba57ee45fb4f552d560a88f195d7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "82d38a7f53df95819fab2099e3a77112be8db7de94e49d1703bb1e9921dd7da1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "42ae03bd0a338028359088907ceb670b7ad96c65cde905b12aed9083a635bc1b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "93a4ffc09a1efe77e5c6e1d1f5333e5cebe0155160fdd4c8f1981a6a1c9997c0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/_enable_lldp.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5de1d929d534d14a5b6e680b77c600c324f693943d7af0ce24d7d0a75557b228",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "662492761a0d003a85490541067f11f2d5646ced351dcc0bfe2b1ad8033ef608",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cd7988ef24a50957436cdc0f0be5b585652931186291ecd1fdaa0ff8a0497a89",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e38937d74d7e7d5faa59ee68fcdaa5af2813452a2d6dee23e07eb7dd7e038216",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e67e436f1614422dda61c126abebe442aa9bdf87be325628b165e746eb4efffe",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8c81d733ff0fd8fbd90b6912ac9706f38577fec046b9a69e2a08b1e98465c256",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c91f8c007db3d0fa4630450ce4214eb94fb3eeb61acd4251898f16ec748772ba",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d47efd7341e66a847bbb70768c4b30876d4c6b044b2b65859416a4ce738e7191",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddf85efe18296ec17d890e6539366e7ae535082e3ddb5e795f3bbb3de8e9625e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lldp/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2ab12cdf400e4f09ac2823be50a835bdbcbcad55816b26f9f9bd320f886b500d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "348e33b47422ed5f7ea038fe5365638fcd086ee7a32b4cff9b42adfe8e049d8f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a5282279957f89f8930b279d9672664a1f7887d3996df2fcff9c0f08e9829d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_bgp/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1d38cf19d1bc5930d5d5e7f80f3580137da7c884535c0d3ba3ee9a8e679bd80e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_ios_tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_ios_tests/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_ios_tests/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1302dd51d004f880ec4612ec6e2f053dc0672adf212cf0fb662da78394ff3076",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_ios_tests/templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_ios_tests/templates/config.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7ca941952f4366404a261ceda3a81c9c28257e7c189280fe107be2b643565546",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "34537c31909d55ab6461991eb2ddfae9e4dd32b1b7e01133aa040dfe08ae02b9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "98caa48692613524412c717c8eb25ad523087bc1d844631dd6c77bd89931e464",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9b121bba6a0892e8ff599846aa1ea5c388ae3c8a9e6a85192f43b89cf992719f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cec8b5236bf31c60e732478db17fa577312110b32ff79337854aaff8ecb1772d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "11af977f9509c28860607ff9170d65975153d8554690aeff50a507d3baf20ab5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "75d21d0679a8d2158247e0f8d7dc98c3b41a9ae404dc270f9b65e912aaf6e98c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3861e5336a9a03bea43d9022a9e6273c26d28addc839c28c47ee459a6c8afe7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5ab54c78347e95e5d8cd7603518a069c83726a85f6434c5f22d8c7305dbfac62",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a1d1f8e37665348ab79e2b065266bfe958a4666e81c9f1510f6202e2d82b604a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "274c06d61c608744714ababc9846161da48f65c34eb9101177f286eb88998310",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "de667d557002ec93fd5996cb02c3898acf10320c105feeb30ac576dfcb84626a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c9e3364059e41ddf8ee03262a6fb8216237df1691ee880c50978b25c4bf339e0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_lacp/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a1f04e8c3243caa2a9c153e8d7cfeb4077fe71471f2b197bf4079b31b2e654a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec8248040d37fc5f43c5adf88a4e1e8d0c34369166810c71c171095eea90823f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli/_parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cd4c4ddfb23dfd766d9414e44d760ff41febdb8b88e9fa92e5f3fab86b5b387b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "671334b19c46a76eae6421800a1909239ced11404233ded662a70dd5c93d0755",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a91796bb081927844db93ac9dbc85c01c27dd51aed04df77fa6bbd78bfd97f21",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "72878b84b6c86e9209c840715748bec8c59a2c735fbb8b21eed09c55bb48fab1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0c0ebdd64b612d61cf679b72a9fe7477b92d5e93d247d9fbb62c0b0166757be1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1bac73f2af0c4b6a90e68c5321c74b5f9f6adb7145308b553ee4705cf642600c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "488cbd4a9ccdef6595ab6d11ba4fcd191f8e700d92702177dca35be628ce442c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5844e5ff91c0d27550a10f496e3bd6b26171da8a1b192da9f4ebb7a0354b69fb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a995671672aa6ca7cd507bf20117e940ca3eff64d55bc44c7f2f0191cd481361",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a9296c100c4dcd107a1fcd0f60247e90664e5a1ed6407dba3b86e320d9fb2f24",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1747222439d44687b11301df1102df884a619df6135eb888cf7833861dcb583d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/ios_acls/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7582a5d7b187379a9bcd002658e4395f9584c8ac96816df45a09cd0d93fb1ffb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/target-prefixes.network",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "48ee046028069a9c6ded9844911eab9020389ac067e2a8772244b99be182e063",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/network-integration.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d67b11263a8f50b30bf43c7c2b4bdd8dc4f173f0b5dd22761311360dfbd56a1d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0b8e6d123996061914929a42aa6f749f2f4f4c2e31cabbefce874868d6d1d8c1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_user.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e696ae7d9089da2b018b5d063e98df9ce12a7928249c0ad52101741d92a6293b",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_vlans.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9dbc48dc8ad3c1de295de2800de3e67eb9f3d01c558fb446aff3b836e3fa8725",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "308b9e24afe4ee6dc733601ff4b40021376650298819d47ae32969713236087d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_command.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "28cad95e496200197e2f944953a396f732b5174969e4e2401d2578bf67db59b1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/ios_module.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0e3376753daca30313c5e85bb11f4f03e0adc6b648a95635592bdd5f9a784cf2",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_config.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ae677b6f020333bc79d555251392f9c4d54b0fcb4e49b005acc13fa30c91c20b",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_banner.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f4f23f3a010e5bb93ee7634ccec86647479c5fbab700e61c2d328d91a0bdf93f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_ping.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c027e59908d7a1dc236e5b5aa79c6972f395a6a8390b43ab5a40fc106997745a",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ca4ffcf4681073a36b599e3613f1c1ca65c0a22f52d54d289d659da75922976c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a87a529e65a337112b2285e0f9c002dd0339f5628ba77e43caeb13fb62b716c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_bgp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "69ffd81b35e9c16361f9131b819410d88abc90fc75ea7ec8588cd2f10e1e4a46",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e5f58775a1c8d83e1ef0c1299b98eb60515c0c54e5c7ba902e77675d39107fd9",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_logging.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0cb87a4501dd4e8e8991d498e3d8bc29ccb134ba7a581d54f5847d53f1e68657",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_system.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a774208dc00cf88e81c0b6b189f15a881f17f0bcc94013baef122973d8ddb20",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1676134c4365f4e71bf82893f34f4afa9dd0bae9eae19b9fe26393ff6f014079",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_bgp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2095fab2b637515088e7ae8e2e28054cf5b7f61fd620649846eb43c60b61c3e7",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "843085ca26cb355fa6eae058a321efd78449cb30c59545d0dcaba99afa36dabb",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_vrf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb1793391c0e5aa98c2870048dd4fd9186e750030ad721b70e13e1cb2f952dc6",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_ntp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8eff29fe6aaea0a189085d407f71f249c899651462dbbd16c1a36e3203bca3d7",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_config_defaults.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "114e89387a2b3cb37c475ed22f287f83dd93bd16a51845286b27f8355d1ae0e5",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_facts_show_cdp_neighbors_detail",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c449f224b8f3dc1d11e310bed18bde4bc9a1ff71b856d948f7ad17d0a2916197",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_size_1400_df-bit",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8452a768d797ca829ff18314236a7275cf03a14f751c6f53c8b6711bc8a1d7f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_repeat_2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4962134fb2b2230a111b5b94f904ba094c12d0e0775e22c50b3db6599dbfcb36",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_system_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ecb0f88d690961592ffec4c1dbeebb4b6883ed2fee08fd60117a3b7937b37949",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_config_src.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57d42d2e8e8b7a4b6cae566115ee42fecea077b525cace10cefc3b7dbd85f033",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_logging_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "547917e90b62a4ef7eb05c6a2527019acf8e3790d7d5a0c9f6b24af6a82a2fb3",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_facts_show_cdp",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5abf76b46295216c079870fba8c70f8f6064ccd667e80d91e31b47ab84f6fd70",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_acls_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a56b3c434f21e90f25e0f12503cdfa2f261d09a0fc1a1bfe467e4dae8d45d727",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_bgp_global.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a2a266a1aa49e62f48977c7dc7bc6cfc354a9f7ff90b5eacc39116a9a8bf1bef",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_user_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "92081628d201c43cc40e2022f0ebac80f1ee5c1e78e19479d0b94780945a9657",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_vlans_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c251cad5781d9a1233b950340cf888ba271d4061b54b03c130c313f2dc29f208",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_static_routes_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "31c86739af2efa1f2a6329c94811363a53db0349590294f5a4d54449af2ca367",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_facts_show_memory_statistics",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_facts_show_ipv6_interface",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_acl_interfaces.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bd18662484be5a36441132e995541a60c5a5e018030fdf54c95a5721f4f95230",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_config_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6fe81e446733fef4e3643a80042ab4111b9b0c927599c4b5972ecea4c18b4ffd",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/configure_terminal",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_facts_show_interfaces",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a6ae9abc8c6e47a7f6d8b2a404ee70a4f389bea8ce2cf0b70090e4a50d09be68",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_vrf_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9ee43d746654712aed9c1163d6130a7b6de350a3efef3e6e228355378b20be50",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_logging_config_ios12.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2923b7e2af16ca384a4c44c7fc1c9944367fffc1769b9ee6c41d73a9e0a2c1fb",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_facts_show_version",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a6290b0be0cd8622c90617eace7c4c8bb1508a77d33c2b0e7bb9d6f7f8967282",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_vlan_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5bbdf12bc4e3492274b5370e88d533157373416503cb9e22191fab89bdb1ab16",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_facts_show_lldp",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ad64c29374175a8d737d01ae856c16364c442fca9ea7b9447ab8f22d9ed78dad",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_banner_show_running_config_ios12.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ed9d617788c3a95226fda5a0dfa4271afe77626709937b27a3af70ffde7af53a",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_ospf_interfaces.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "64c47152e30e7e18ef57862e1354f06ad6656e39d43ca6832363bf0ddc3cb3a6",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_ntp_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fbc202ae725e32e8511fd53c9ef52a5a8e361e766bdc74fa0ceda781a247ab5c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_facts_show_virtual_switch",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aa61d553aa1411a4ad0724f0b04d9f2cd39030eb96f550f67937973a674dfe08",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/show_version",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "65a51f235c73af72788a8add79a0e49311002d7a60ed9ab66b6d5ce9f514d23b",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_bgp_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8e1448b74254646dea1644addbebf552013bc999c32b8a90f3141fadfd2e045c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_l2_interfaces.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "357c88e0ff3c5ad2fe0b7262f3cbc311764cb190c31decdee75de65f9e913eff",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_ping_ping_10.255.255.250_repeat_2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f6102ec8eb37947bb6892dbb4c1252c794ef52376540c9d8ce2b9753aa613685",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_banner_show_banner.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fcbd9e21fbc41c072eed699ebf08ba9fc0e86b9084e4e54eb701cc12d4c764d0",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_size_1400",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "825819c8953b25588aadeb8264ebc23a52d06537049b7e3f4f0b9edfda1b7e45",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_facts_show_lldp_neighbors_detail",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "acecbe3bd51a94baad82569be08448c8902974c14c1cc191efc5e5771bd6ae70",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_facts_show_ip_interface",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_facts_dir",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "be78a9714687ce28322efe35f1df91b12b532d87f552aae6c321d44bab0109cb",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_ospfv3.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb0bb42a712513bc2ba44a00a3f7621109f5484ac35af4b6ca7f72dab288cb3a",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/fixtures/ios_ospfv2.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "80595dd882cfee31a890d13715964a5d750cb415c9b81fcf12fe6c236159b337",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c3ec4654b34ca0eadd02469f5096ffdda8b9a5b4cfc7982c4f88d1689958552f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/ios/test_ios_vlan.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "946254375410a80d85532bd14bd5b0d97a26c7331775661e2aa57e8659a155c8",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/conftest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2af4846e50d461a131ad3edfb609fbb39a9eb1796048c62e4ead8234bcf5c6a1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/utils.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "69901effdc8994417ed4d30ea1d4b75715633ede85b2df8cf4679519614a59ec",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/mock.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "52ecd54195edca933104eb3e937547c7395ff604ada2694a8b184c2c1466dbf1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/unittest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3ed698b1faec43d87a2c1ebcb15a2aae48b09ff355bb9a598e5f5a1c928dbb30",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/builtins.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ba13a350ade8ef804336f888d5883b8e54f8bddfb9d0fadc10277a8ca6540f4e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/loader.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0cfbf4c710a5d5725f84d5f34ab76ec1a0e853397cd945c90fd97769f89dddc5",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/procenv.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a8aa6e5f3fe85e6fc844a6e1f518b6cfbb468af74d4398ee898d8bde1cc235e7",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/yaml_helper.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "94e2f3c867d2582c9f7a0e99e544718e355025c4a51c9925e70158fa89b3609e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/path.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e4a4744bd9f35557ade9a309d57ba379db1101a61054964d1a7a2ceda6190133",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/vault_helper.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "feae23166b6eb502f7d9b77c314970516c9a99aaad7de01295b4dfdad53c5c09",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/test_ios.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "afa954732c939f47b211c593c7c734edfa0fc3fbebb230a5a72b558598ba1d84",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/nos",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/nos/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/nos/show_version",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a21600440d1fbd2208fd81eeeaa632cfdf6b69c060bcff46e5a3f4a5f5c26f68",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/nos/show_running-config",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "42f2e50d84821d1ce5c9ddfa082e7a6086254ef9908166a0d4523a3dc5b6b2df",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/nos/show_chassis",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a2890b7a8db9c1e8954a186fa311c8a2b44477b1d04bff9c32bf75b7797b4533",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/slxos",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/slxos/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/slxos/show_version",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e18e1a4f1640ca226a2f0d067a422af58218fa7f191a8b71394432a56177c7fd",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/slxos/show_startup-config",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d1a135373ce559af818475189bbfc8ff838f5891869b62e159e38ac4c30b3284",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/slxos/show_running-config",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d1a135373ce559af818475189bbfc8ff838f5891869b62e159e38ac4c30b3284",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/slxos/show_chassis",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2612f77ae1f3f24ce219d2ef967a20d86109fcb47b8a4220c9d0493c717a5743",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/ios",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/ios/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/cliconf/fixtures/ios/show_version",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "28896cfd7a101f137f8433db1efdb33343aa43425aaedc2d4f7eebec7e71204d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "49ba996dc4735c3463e9af561344346dfae14bcc1a68096ce78364b377f0df1f",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.9.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bbb39bdc5fea2e4d4f92cda125a7998d4d9dc3f9e0a67282cf65c166a0c280ea",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.11.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4d5b86543c5d0e71325edbf6019f42e4999f5ef2b9121a0c2e30bd0eae3d0fb1",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.10.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4d5b86543c5d0e71325edbf6019f42e4999f5ef2b9121a0c2e30bd0eae3d0fb1",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8a4ac4bfdef88e75d6e748e35a42fb4915947dfa2b7dd788626fd829600e014",
+ "format": 1
+ },
+ {
+ "name": "tests/.gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b5726d3ec9335a09c124469eca039523847a6b0f08a083efaefd002b83326600",
+ "format": 1
+ },
+ {
+ "name": "requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "883b106f13b0c6536f55619685ddca25968b4167dedb12e08fa37c93f4c63b25",
+ "format": 1
+ }
+ ],
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/LICENSE b/collections-debian-merged/ansible_collections/cisco/ios/LICENSE
new file mode 100644
index 00000000..f288702d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/MANIFEST.json b/collections-debian-merged/ansible_collections/cisco/ios/MANIFEST.json
new file mode 100644
index 00000000..c21b066d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/MANIFEST.json
@@ -0,0 +1,35 @@
+{
+ "collection_info": {
+ "namespace": "cisco",
+ "name": "ios",
+ "version": "1.3.0",
+ "authors": [
+ "Ansible Network Community (ansible-network)"
+ ],
+ "readme": "README.md",
+ "tags": [
+ "cisco",
+ "ios",
+ "iosxe",
+ "networking"
+ ],
+ "description": "Ansible Network Collection for Cisco IOS devices.",
+ "license": [],
+ "license_file": "LICENSE",
+ "dependencies": {
+ "ansible.netcommon": "*"
+ },
+ "repository": "https://github.com/ansible-collections/cisco.ios",
+ "documentation": null,
+ "homepage": null,
+ "issues": null
+ },
+ "file_manifest_file": {
+ "name": "FILES.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "74f9b10ef7fd3e8f88aa91f18a362ea97fdc5975d4a3eff0ef65a7dae2c32da9",
+ "format": 1
+ },
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/README.md b/collections-debian-merged/ansible_collections/cisco/ios/README.md
new file mode 100644
index 00000000..1137afd7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/README.md
@@ -0,0 +1,150 @@
+# Cisco IOS Collection
+[![CI](https://zuul-ci.org/gated.svg)](https://dashboard.zuul.ansible.com/t/ansible/project/github.com/ansible-collections/cisco.ios) <!--[![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/vyos)](https://codecov.io/gh/ansible-collections/cisco.ios)-->
+
+The Ansible Cisco IOS collection includes a variety of Ansible content to help automate the management of Cisco IOS network appliances.
+
+This collection has been tested against Cisco IOSv version 15.2 on VIRL.
+
+<!--start requires_ansible-->
+## Ansible version compatibility
+
+This collection has been tested against following Ansible versions: **>=2.9.10,<2.11**.
+
+Plugins and modules within a collection may be tested with only specific Ansible versions.
+A collection may contain metadata that identifies these versions.
+PEP440 is the schema used to describe the versions of Ansible.
+<!--end requires_ansible-->
+
+### Supported connections
+The Cisco IOS collection supports ``network_cli`` connections.
+
+## Included content
+
+<!--start collection content-->
+### Cliconf plugins
+Name | Description
+--- | ---
+[cisco.ios.ios](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_cliconf.rst)|Use ios cliconf to run command on Cisco IOS platform
+
+### Modules
+Name | Description
+--- | ---
+[cisco.ios.ios_acl_interfaces](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_acl_interfaces_module.rst)|ACL interfaces resource module
+[cisco.ios.ios_acls](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_acls_module.rst)|ACLs resource module
+[cisco.ios.ios_banner](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_banner_module.rst)|Manage multiline banners on Cisco IOS devices
+[cisco.ios.ios_bgp](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_bgp_module.rst)|Configure global BGP protocol settings on Cisco IOS.
+[cisco.ios.ios_bgp_global](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_bgp_global_module.rst)|Global BGP resource module
+[cisco.ios.ios_command](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_command_module.rst)|Run commands on remote devices running Cisco IOS
+[cisco.ios.ios_config](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_config_module.rst)|Manage Cisco IOS configuration sections
+[cisco.ios.ios_facts](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_facts_module.rst)|Collect facts from remote devices running Cisco IOS
+[cisco.ios.ios_interface](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_interface_module.rst)|(deprecated, removed after 2022-06-01) Manage Interface on Cisco IOS network devices
+[cisco.ios.ios_interfaces](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_interfaces_module.rst)|Interfaces resource module
+[cisco.ios.ios_l2_interface](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_l2_interface_module.rst)|(deprecated, removed after 2022-06-01) Manage Layer-2 interface on Cisco IOS devices.
+[cisco.ios.ios_l2_interfaces](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_l2_interfaces_module.rst)|L2 interfaces resource module
+[cisco.ios.ios_l3_interface](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_l3_interface_module.rst)|(deprecated, removed after 2022-06-01) Manage Layer-3 interfaces on Cisco IOS network devices.
+[cisco.ios.ios_l3_interfaces](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_l3_interfaces_module.rst)|L3 interfaces resource module
+[cisco.ios.ios_lacp](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_lacp_module.rst)|LACP resource module
+[cisco.ios.ios_lacp_interfaces](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_lacp_interfaces_module.rst)|LACP interfaces resource module
+[cisco.ios.ios_lag_interfaces](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_lag_interfaces_module.rst)|LAG interfaces resource module
+[cisco.ios.ios_linkagg](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_linkagg_module.rst)|Manage link aggregation groups on Cisco IOS network devices
+[cisco.ios.ios_lldp](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_lldp_module.rst)|Manage LLDP configuration on Cisco IOS network devices.
+[cisco.ios.ios_lldp_global](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_lldp_global_module.rst)|LLDP resource module
+[cisco.ios.ios_lldp_interfaces](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_lldp_interfaces_module.rst)|LLDP interfaces resource module
+[cisco.ios.ios_logging](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_logging_module.rst)|Manage logging on network devices
+[cisco.ios.ios_ntp](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_ntp_module.rst)|Manages core NTP configuration.
+[cisco.ios.ios_ospf_interfaces](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_ospf_interfaces_module.rst)|OSPF_Interfaces resource module
+[cisco.ios.ios_ospfv2](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_ospfv2_module.rst)|OSPFv2 resource module
+[cisco.ios.ios_ospfv3](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_ospfv3_module.rst)|OSPFv3 resource module
+[cisco.ios.ios_ping](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_ping_module.rst)|Tests reachability using ping from Cisco IOS network devices
+[cisco.ios.ios_static_route](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_static_route_module.rst)|(deprecated, removed after 2022-06-01) Manage static IP routes on Cisco IOS network devices
+[cisco.ios.ios_static_routes](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_static_routes_module.rst)|Static routes resource module
+[cisco.ios.ios_system](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_system_module.rst)|Manage the system attributes on Cisco IOS devices
+[cisco.ios.ios_user](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_user_module.rst)|Manage the aggregate of local users on Cisco IOS device
+[cisco.ios.ios_vlan](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_vlan_module.rst)|(deprecated, removed after 2022-06-01) Manage VLANs on IOS network devices
+[cisco.ios.ios_vlans](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_vlans_module.rst)|VLANs resource module
+[cisco.ios.ios_vrf](https://github.com/ansible-collections/cisco.ios/blob/main/docs/cisco.ios.ios_vrf_module.rst)|Manage the collection of VRF definitions on Cisco IOS devices
+
+<!--end collection content-->
+## Installing this collection
+
+You can install the Cisco IOS collection with the Ansible Galaxy CLI:
+
+ ansible-galaxy collection install cisco.ios
+
+You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format:
+
+```yaml
+---
+collections:
+ - name: cisco.ios
+```
+## Using this collection
+
+
+This collection includes [network resource modules](https://docs.ansible.com/ansible/latest/network/user_guide/network_resource_modules.html).
+
+### Using modules from the Cisco IOS collection in your playbooks
+
+You can call modules by their Fully Qualified Collection Namespace (FQCN), such as `cisco.ios.ios_l2_interfaces`.
+The following example task replaces configuration changes in the existing configuration on a Cisco IOS network device, using the FQCN:
+
+```yaml
+---
+ - name: Replace device configuration of specified L2 interfaces with provided configuration.
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ trunk:
+ - allowed_vlans: 20-25,40
+ native_vlan: 20
+ pruning_vlans: 10
+ encapsulation: isl
+ state: replaced
+
+```
+
+**NOTE**: For Ansible 2.9, you may not see deprecation warnings when you run your playbooks with this collection. Use this documentation to track when a module is deprecated.
+
+
+### See Also:
+
+* [Cisco IOS Platform Options](https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html)
+* [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.
+
+## Contributing to this collection
+
+We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the [Cisco IOS collection repository](https://github.com/ansible-collections/cisco.ios). See [Contributing to Ansible-maintained collections](https://docs.ansible.com/ansible/devel/community/contributing_maintained_collections.html#contributing-maintained-collections) for complete details.
+
+You can also join us on:
+
+- Freenode IRC - ``#ansible-network`` Freenode channel
+- Slack - https://ansiblenetwork.slack.com
+
+See the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) for details on contributing to Ansible.
+
+### Code of Conduct
+This collection follows the Ansible project's
+[Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html).
+Please read and familiarize yourself with this document.
+
+## Release notes
+<!--Add a link to a changelog.md file or an external docsite to cover this information. -->
+Release notes are available [here](https://github.com/ansible-collections/cisco.ios/blob/main/changelogs/CHANGELOG.rst).
+
+## Roadmap
+
+<!-- Optional. Include the roadmap for this collection, and the proposed release/versioning strategy so users can anticipate the upgrade/update cycle. -->
+
+## More information
+
+- [Ansible network resources](https://docs.ansible.com/ansible/latest/network/getting_started/network_resources.html)
+- [Ansible Collection overview](https://github.com/ansible-collections/overview)
+- [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html)
+- [Ansible Developer guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html)
+- [Ansible Community code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html)
+
+## Licensing
+
+GNU General Public License v3.0 or later.
+
+See [LICENSE](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text.
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/bindep.txt b/collections-debian-merged/ansible_collections/cisco/ios/bindep.txt
new file mode 100644
index 00000000..ba9c980f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/bindep.txt
@@ -0,0 +1,6 @@
+# This is a cross-platform list tracking distribution packages needed by tests;
+# see https://docs.openstack.org/infra/bindep/ for additional information.
+
+gcc-c++ [doc test platform:rpm]
+python3-devel [test platform:rpm]
+python3 [test platform:rpm]
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/CHANGELOG.rst b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/CHANGELOG.rst
new file mode 100644
index 00000000..a4fbb9ff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/CHANGELOG.rst
@@ -0,0 +1,162 @@
+==================================
+Cisco Ios Collection Release Notes
+==================================
+
+.. contents:: Topics
+
+v1.3.0
+======
+
+Minor Changes
+-------------
+
+- Add ios_bgp_global module.
+
+Bugfixes
+--------
+- IOS resource modules minor doc updates (https://github.com/ansible-collections/cisco.ios/pull/233).
+- To fix ios_static_routes facts parsing in presence of interface (https://github.com/ansible-collections/cisco.ios/pull/225).
+- Add support size and df_bit options for ios_ping (https://github.com/ansible-collections/cisco.ios/pull/228).
+- IOS_CONFIG, incorrectly claims success when Command Rejected (https://github.com/ansible-collections/cisco.ios/pull/215).
+- Update doc to clarify on input config pattern (https://github.com/ansible-collections/cisco.ios/pull/220).
+- Updating ios acls module to use newer CLI RM approach to resolve all of the ACL related bugs (https://github.com/ansible-collections/cisco.ios/pull/211).
+
+New Modules
+-----------
+
+- ios_bgp_global - BGP Global resource module
+
+v1.2.1
+======
+
+Bugfixes
+--------
+
+- To fix ios_ospf_interfaces resource module authentication param behaviour (https://github.com/ansible-collections/cisco.ios/issues/209).
+- Add version key to galaxy.yaml to work around ansible-galaxy bug.
+
+v1.2.0
+======
+
+Minor Changes
+-------------
+
+- Add ios_ospf_interfaces module.
+
+Bugfixes
+--------
+
+- To enable ios ospfv3 integration tests (https://github.com/ansible-collections/cisco.ios/pull/165).
+- To fix ios_static_routes where interface ip route-cache config was being parsed and resulted traceback (https://github.com/ansible-collections/cisco.ios/pull/176).
+- To fix IOS static routes idempotency issue coz of netmask to cidr conversion (https://github.com/ansible-collections/cisco.ios/pull/177).
+- To fix ios_vlans traceback bug when the name had Remote in it and added unit TC for the module (https://github.com/ansible-collections/cisco.ios/pull/179).
+- To fix the traceback issue for longer vlan name having more than 32 characters (https://github.com/ansible-collections/cisco.ios/pull/182).
+
+New Modules
+-----------
+
+- ios_ospf_interfaces - OSPF Interfaces resource module
+
+v1.1.0
+======
+
+Minor Changes
+-------------
+
+- Add ios_ospfv3 module.
+
+Bugfixes
+--------
+
+- Fix element type of ios_command's command parameter (https://github.com/ansible-collections/cisco.ios/pull/151).
+- Add support for interface type Virtual-Template (https://github.com/ansible-collections/cisco.ios/pull/154).
+- Added support for interface Tunnel (https://github.com/ansible-collections/cisco.ios/pull/145).
+- To fix the incorrect command displayed under ios_l3_interfaces resource module docs (https://github.com/ansible-collections/cisco.ios/pull/149).
+
+New Modules
+-----------
+
+- ios_ospfv3 - OSPFv3 resource module
+
+v1.0.3
+======
+
+Release Summary
+---------------
+
+- Releasing 1.0.3 with updated readme with changelog link, galaxy description, and bugfix.
+
+Bugfixes
+--------
+
+- To fix the issue where ios acls was complaining in absence of protocol option value (https://github.com/ansible-collections/cisco.ios/pull/124).
+- To fix IOS l2 interfaces for traceback error and merge operation not working as expected (https://github.com/ansible-collections/cisco.ios/pull/103).
+
+v1.0.2
+======
+
+Release Summary
+---------------
+
+- Re-releasing 1.0.1 with updated changelog.
+
+v1.0.1
+======
+
+Minor Changes
+-------------
+
+- Removes IOS sanity ignores and sync for argspec and docstring (https://github.com/ansible-collections/cisco.ios/pull/114).
+- Updated docs.
+
+Bugfixes
+--------
+
+- Make `src`, `backup` and `backup_options` in ios_config work when module alias is used (https://github.com/ansible-collections/cisco.ios/pull/107).
+
+
+v1.0.0
+======
+
+New Plugins
+-----------
+
+Cliconf
+~~~~~~~
+
+- ios - Use ios cliconf to run command on Cisco IOS platform
+
+New Modules
+-----------
+
+- ios_acl_interfaces - ACL interfaces resource module
+- ios_acls - ACLs resource module
+- ios_banner - Manage multiline banners on Cisco IOS devices
+- ios_bgp - Configure global BGP protocol settings on Cisco IOS.
+- ios_command - Run commands on remote devices running Cisco IOS
+- ios_config - Manage Cisco IOS configuration sections
+- ios_facts - Collect facts from remote devices running Cisco IOS
+- ios_interface - (deprecated, removed after 2022-06-01) Manage Interface on Cisco IOS network devices
+- ios_interfaces - Interfaces resource module
+- ios_l2_interface - (deprecated, removed after 2022-06-01) Manage Layer-2 interface on Cisco IOS devices.
+- ios_l2_interfaces - L2 interfaces resource module
+- ios_l3_interface - (deprecated, removed after 2022-06-01) Manage Layer-3 interfaces on Cisco IOS network devices.
+- ios_l3_interfaces - L3 interfaces resource module
+- ios_lacp - LACP resource module
+- ios_lacp_interfaces - LACP interfaces resource module
+- ios_lag_interfaces - LAG interfaces resource module
+- ios_linkagg - Manage link aggregation groups on Cisco IOS network devices
+- ios_lldp - Manage LLDP configuration on Cisco IOS network devices.
+- ios_lldp_global - LLDP resource module
+- ios_lldp_interfaces - LLDP interfaces resource module
+- ios_logging - Manage logging on network devices
+- ios_ntp - Manages core NTP configuration.
+- ios_ospfv2 - OSPFv2 resource module
+- ios_ping - Tests reachability using ping from Cisco IOS network devices
+- ios_static_route - (deprecated, removed after 2022-06-01) Manage static IP routes on Cisco IOS network devices
+- ios_static_routes - Static routes resource module
+- ios_system - Manage the system attributes on Cisco IOS devices
+- ios_user - Manage the aggregate of local users on Cisco IOS device
+- ios_vlan - (deprecated, removed after 2022-06-01) Manage VLANs on IOS network devices
+- ios_vlans - VLANs resource module
+- ios_vrf - Manage the collection of VRF definitions on Cisco IOS devices
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/changelog.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/changelog.yaml
new file mode 100644
index 00000000..8e072044
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/changelog.yaml
@@ -0,0 +1,189 @@
+ancestor: null
+releases:
+ 1.0.0:
+ modules:
+ - description: ACL interfaces resource module
+ name: ios_acl_interfaces
+ namespace: ''
+ - description: ACLs resource module
+ name: ios_acls
+ namespace: ''
+ - description: Manage multiline banners on Cisco IOS devices
+ name: ios_banner
+ namespace: ''
+ - description: Configure global BGP protocol settings on Cisco IOS.
+ name: ios_bgp
+ namespace: ''
+ - description: Run commands on remote devices running Cisco IOS
+ name: ios_command
+ namespace: ''
+ - description: Manage Cisco IOS configuration sections
+ name: ios_config
+ namespace: ''
+ - description: Collect facts from remote devices running Cisco IOS
+ name: ios_facts
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manage Interface on Cisco
+ IOS network devices
+ name: ios_interface
+ namespace: ''
+ - description: Interfaces resource module
+ name: ios_interfaces
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manage Layer-2 interface
+ on Cisco IOS devices.
+ name: ios_l2_interface
+ namespace: ''
+ - description: L2 interfaces resource module
+ name: ios_l2_interfaces
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manage Layer-3 interfaces
+ on Cisco IOS network devices.
+ name: ios_l3_interface
+ namespace: ''
+ - description: L3 interfaces resource module
+ name: ios_l3_interfaces
+ namespace: ''
+ - description: LACP resource module
+ name: ios_lacp
+ namespace: ''
+ - description: LACP interfaces resource module
+ name: ios_lacp_interfaces
+ namespace: ''
+ - description: LAG interfaces resource module
+ name: ios_lag_interfaces
+ namespace: ''
+ - description: Manage link aggregation groups on Cisco IOS network devices
+ name: ios_linkagg
+ namespace: ''
+ - description: Manage LLDP configuration on Cisco IOS network devices.
+ name: ios_lldp
+ namespace: ''
+ - description: LLDP resource module
+ name: ios_lldp_global
+ namespace: ''
+ - description: LLDP interfaces resource module
+ name: ios_lldp_interfaces
+ namespace: ''
+ - description: Manage logging on network devices
+ name: ios_logging
+ namespace: ''
+ - description: Manages core NTP configuration.
+ name: ios_ntp
+ namespace: ''
+ - description: OSPFv2 resource module
+ name: ios_ospfv2
+ namespace: ''
+ - description: Tests reachability using ping from Cisco IOS network devices
+ name: ios_ping
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manage static IP routes
+ on Cisco IOS network devices
+ name: ios_static_route
+ namespace: ''
+ - description: Static routes resource module
+ name: ios_static_routes
+ namespace: ''
+ - description: Manage the system attributes on Cisco IOS devices
+ name: ios_system
+ namespace: ''
+ - description: Manage the aggregate of local users on Cisco IOS device
+ name: ios_user
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manage VLANs on IOS network
+ devices
+ name: ios_vlan
+ namespace: ''
+ - description: VLANs resource module
+ name: ios_vlans
+ namespace: ''
+ - description: Manage the collection of VRF definitions on Cisco IOS devices
+ name: ios_vrf
+ namespace: ''
+ plugins:
+ cliconf:
+ - description: Use ios cliconf to run command on Cisco IOS platform
+ name: ios
+ namespace: null
+ release_date: '2020-06-23'
+ 1.0.1:
+ changes:
+ bugfixes:
+ - Make `src`, `backup` and `backup_options` in ios_config work when module alias is used
+ (https://github.com/ansible-collections/cisco.ios/pull/107).
+ minor_changes:
+ - Removes IOS sanity ignores and sync for argspec and docstring
+ (https://github.com/ansible-collections/cisco.ios/pull/114).
+ - Updated docs.
+ fragments:
+ - 90-add-change-log-1.0.0.yaml
+ - 1.1.0_update_docs.yaml
+ - handle_src_backup_with_module_alias.yaml
+ - remove_ios_ignore.yaml
+ release_date: '2020-08-03'
+ 1.0.2:
+ changes:
+ release_summary:
+ - Re-releasing 1.0.1 with updated changelog.
+ fragments:
+ - 1.0.2.yaml
+ release_date: '2020-08-07'
+ 1.0.3:
+ changes:
+ release_summary:
+ - Releasing 1.0.3 with updated readme with changelog link, galaxy description, and bugfix.
+ release_date: '2020-08-28'
+ 1.1.0:
+ changes:
+ bugfixes:
+ - Fix element type of ios_command's command parameter (https://github.com/ansible-collections/cisco.ios/pull/151).
+ - Add support for interface type Virtual-Template (https://github.com/ansible-collections/cisco.ios/pull/154).
+ - Added support for interface Tunnel (https://github.com/ansible-collections/cisco.ios/pull/145).
+ - To fix the incorrect command displayed under ios_l3_interfaces resource module docs (https://github.com/ansible-collections/cisco.ios/pull/149).
+ minor_changes:
+ - Add ios_ospfv3 module.
+ modules:
+ - description: OSPFv3 resource module
+ name: ios_ospfv3
+ namespace: ''
+ release_date: '2020-10-01'
+ 1.2.0:
+ changes:
+ bugfixes:
+ - To enable ios ospfv3 integration tests (https://github.com/ansible-collections/cisco.ios/pull/165).
+ - To fix ios_static_routes where interface ip route-cache config was being parsed and resulted traceback (https://github.com/ansible-collections/cisco.ios/pull/176).
+ - To fix IOS static routes idempotency issue coz of netmask to cidr conversion (https://github.com/ansible-collections/cisco.ios/pull/177).
+ - To fix ios_vlans traceback bug when the name had Remote in it and added unit TC for the module (https://github.com/ansible-collections/cisco.ios/pull/179).
+ - To fix the traceback issue for longer vlan name having more than 32 characters (https://github.com/ansible-collections/cisco.ios/pull/182).
+ minor_changes:
+ - Add ios_ospf_interfaces module.
+ modules:
+ - description: OSPF Interfaces resource module
+ name: ios_ospf_interfaces
+ namespace: ''
+ release_date: '2020-11-01'
+ 1.2.1:
+ changes:
+ bugfixes:
+ - To fix ios_ospf_interfaces resource module authentication param behaviour (https://github.com/ansible-collections/cisco.ios/issues/209).
+ - Add version key to galaxy.yaml to work around ansible-galaxy bug.
+ fragments:
+ - 209_fix_ios_ospf_interfaces_authentication_param.yaml
+ - galaxy-version.yaml
+ release_date: '2020-11-26'
+ 1.3.0:
+ changes:
+ bugfixes:
+ - IOS resource modules minor doc updates (https://github.com/ansible-collections/cisco.ios/pull/233).
+ - To fix ios_static_routes facts parsing in presence of interface (https://github.com/ansible-collections/cisco.ios/pull/225).
+ - Add support size and df_bit options for ios_ping (https://github.com/ansible-collections/cisco.ios/pull/228).
+ - IOS_CONFIG, incorrectly claims success when Command Rejected (https://github.com/ansible-collections/cisco.ios/pull/215).
+ - Update doc to clarify on input config pattern (https://github.com/ansible-collections/cisco.ios/pull/220).
+ - Updating ios acls module to use newer CLI RM approach to resolve all of the ACL related bugs (https://github.com/ansible-collections/cisco.ios/pull/211).
+ minor_changes:
+ - Add ios_bgp_global module.
+ modules:
+ - description: BGP Global resource module
+ name: ios_bgp_global
+ namespace: ''
+ release_date: '2021-1-29'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/config.yaml
new file mode 100644
index 00000000..fa19846e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/config.yaml
@@ -0,0 +1,30 @@
+changelog_filename_template: CHANGELOG.rst
+changelog_filename_version_depth: 0
+changes_file: changelog.yaml
+changes_format: combined
+keep_fragments: false
+mention_ancestor: true
+new_plugins_after_name: removed_features
+notesdir: fragments
+prelude_section_name: release_summary
+prelude_section_title: Release Summary
+flatmap: true
+sections:
+- - major_changes
+ - Major Changes
+- - minor_changes
+ - Minor Changes
+- - breaking_changes
+ - Breaking Changes / Porting Guide
+- - deprecated_features
+ - Deprecated Features
+- - removed_features
+ - Removed Features (previously deprecated)
+- - security_fixes
+ - Security Fixes
+- - bugfixes
+ - Bugfixes
+- - known_issues
+ - Known Issues
+title: Cisco Ios Collection
+trivial_section_name: trivial
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/103_fix_l2_interfaces_traceback_error.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/103_fix_l2_interfaces_traceback_error.yaml
new file mode 100644
index 00000000..fc236267
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/103_fix_l2_interfaces_traceback_error.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To fix IOS l2 interfaces for traceback error and merge operation not working as expected(https://github.com/ansible-collections/cisco.ios/pull/103).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/124_resolved_ios_acls_issue.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/124_resolved_ios_acls_issue.yaml
new file mode 100644
index 00000000..c8f85c95
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/124_resolved_ios_acls_issue.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To fix the issue where ios acls was complaining in absence of protocol option value(https://github.com/ansible-collections/cisco.ios/pull/124).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/132_update_ios_l3_doc_issue.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/132_update_ios_l3_doc_issue.yaml
new file mode 100644
index 00000000..c6d83d85
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/132_update_ios_l3_doc_issue.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To update the IOS L3 doc issue raised in issue(https://github.com/ansible-collections/cisco.ios/issue/132).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/135_accept_list_of_dict_for_ospfv2_network.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/135_accept_list_of_dict_for_ospfv2_network.yaml
new file mode 100644
index 00000000..f244b057
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/135_accept_list_of_dict_for_ospfv2_network.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To accept list of dict for OSPFv2 network param(https://github.com/ansible-collections/cisco.ios/issues/152)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/137_ios_static_routes_idempotency_issue.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/137_ios_static_routes_idempotency_issue.yaml
new file mode 100644
index 00000000..1937c2ce
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/137_ios_static_routes_idempotency_issue.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To fix IOS static routes idempotency issue coz of netmask to cidr conversion(https://github.com/ansible-collections/cisco.ios/issues/137).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/141_add_int_virt_template_issue.yml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/141_add_int_virt_template_issue.yml
new file mode 100644
index 00000000..c85d5f88
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/141_add_int_virt_template_issue.yml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To provide support for interface Virtual-Template raised in issue(https://github.com/ansible-collections/cisco.ios/issues/141)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/144_add_interface_tunnel_issue.yml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/144_add_interface_tunnel_issue.yml
new file mode 100644
index 00000000..7cb508f8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/144_add_interface_tunnel_issue.yml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To provide support for interface Tunnel in IOS raised in issue(https://github.com/ansible-collections/cisco.ios/issues/144)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/146_add_cdp_platform_info_to_ios_facts.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/146_add_cdp_platform_info_to_ios_facts.yaml
new file mode 100644
index 00000000..4c5d821d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/146_add_cdp_platform_info_to_ios_facts.yaml
@@ -0,0 +1,3 @@
+---
+minor_changes:
+ - Add CDP platform information to ios_facts module output.
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/148_add_bgp_global_resource_module.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/148_add_bgp_global_resource_module.yaml
new file mode 100644
index 00000000..3ffbf986
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/148_add_bgp_global_resource_module.yaml
@@ -0,0 +1,3 @@
+---
+minor_changes:
+ - Add ios_bgp_global resource module (fixes - https://github.com/ansible-collections/cisco.ios/issues/97).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/148_add_ospv3_resource_module.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/148_add_ospv3_resource_module.yaml
new file mode 100644
index 00000000..6e07984e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/148_add_ospv3_resource_module.yaml
@@ -0,0 +1,3 @@
+---
+minor_changes:
+ - Add ios_ospfv3 resource module (fixes - https://github.com/ansible-collections/cisco.ios/issues/95).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/161_static_route_facts_cmd_update.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/161_static_route_facts_cmd_update.yaml
new file mode 100644
index 00000000..de50229d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/161_static_route_facts_cmd_update.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To fix ios_static_routes where interface ip route-cache config was being parsed and resulted traceback
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/165_enable_ospfv3_integration_tests.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/165_enable_ospfv3_integration_tests.yaml
new file mode 100644
index 00000000..57ca6aa4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/165_enable_ospfv3_integration_tests.yaml
@@ -0,0 +1,3 @@
+---
+trivial:
+ - To enable ios ospfv3 integration tests for zuul ios instance.
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/175_fix_ios_vlans_when_name_had_remote.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/175_fix_ios_vlans_when_name_had_remote.yaml
new file mode 100644
index 00000000..a09943af
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/175_fix_ios_vlans_when_name_had_remote.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To fix ios_vlans traceback bug when the name had Remote in it(https://github.com/ansible-collections/cisco.ios/issues/175).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/192_add_ospf_interfaces_resource_module.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/192_add_ospf_interfaces_resource_module.yaml
new file mode 100644
index 00000000..010a3515
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/192_add_ospf_interfaces_resource_module.yaml
@@ -0,0 +1,3 @@
+---
+minor_changes:
+ - Adding ios_ospf_interfaces resource module.
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/209_fix_ios_ospf_interfaces_authentication_param.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/209_fix_ios_ospf_interfaces_authentication_param.yaml
new file mode 100644
index 00000000..22185b73
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/209_fix_ios_ospf_interfaces_authentication_param.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To fix ios_ospf_interfaces resource module authentication param behaviour (https://github.com/ansible-collections/cisco.ios/issues/209).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/211_update_ios_acls_module_to_use_resource_module_approach.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/211_update_ios_acls_module_to_use_resource_module_approach.yaml
new file mode 100644
index 00000000..ab75efbd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/211_update_ios_acls_module_to_use_resource_module_approach.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - Updating ios acls module to use newer CLI RM approach to resolve all of the ACL related bugs(https://github.com/ansible-collections/cisco.ios/pulls/211).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/216_fix_command_rejected_issue.yml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/216_fix_command_rejected_issue.yml
new file mode 100644
index 00000000..cf5da650
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/216_fix_command_rejected_issue.yml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To provide support return for "Command Rejected" (https://github.com/ansible-collections/cisco.ios/issues/216)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/223_fix_static_routes_facts_parsing.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/223_fix_static_routes_facts_parsing.yaml
new file mode 100644
index 00000000..7544800e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/223_fix_static_routes_facts_parsing.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - 223_fix_static_routes_facts_parsing_with_interface_present(https://github.com/ansible-collections/cisco.ios/issues/223).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/228_ios_ping.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/228_ios_ping.yaml
new file mode 100644
index 00000000..5d613563
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/228_ios_ping.yaml
@@ -0,0 +1,3 @@
+---
+minor_changes:
+ - Add support df-bit and size option for ios_ping (https://github.com/ansible-collections/cisco.ios/pull/228).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/51-virtual-switch-system-detection.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/51-virtual-switch-system-detection.yaml
new file mode 100644
index 00000000..aac0b7e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/51-virtual-switch-system-detection.yaml
@@ -0,0 +1,3 @@
+---
+minor_changes:
+ - Adding Detection of Virtual Switch System to facts (https://github.com/ansible-collections/cisco.ios/pull/51)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/63_support_for_very_long_vlan_name.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/63_support_for_very_long_vlan_name.yaml
new file mode 100644
index 00000000..3a5d558e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/63_support_for_very_long_vlan_name.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To add support for accepting vlan name more than 32 characters(https://github.com/ansible-collections/cisco.ios/issues/63).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/65_fixes_ios_interfaces_rm_where_interface_in_description_resulted_in_failure.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/65_fixes_ios_interfaces_rm_where_interface_in_description_resulted_in_failure.yaml
new file mode 100644
index 00000000..e2a0fbf9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/65_fixes_ios_interfaces_rm_where_interface_in_description_resulted_in_failure.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - fixes ios interfaces rm where interface in description resulted in failure (https://github.com/ansible-collections/cisco.ios/issues/65).
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/command-dicts.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/command-dicts.yaml
new file mode 100644
index 00000000..b8273850
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/command-dicts.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - ios_command - set command type to "raw" to support complex commands (with prompt and answer, for example)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/galaxy-version.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/galaxy-version.yaml
new file mode 100644
index 00000000..6d5e47ea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/galaxy-version.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - Add version key to galaxy.yaml to work around ansible-galaxy bug
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/ios_config_diff_doc_update.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/ios_config_diff_doc_update.yaml
new file mode 100644
index 00000000..a8d26e9b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/ios_config_diff_doc_update.yaml
@@ -0,0 +1,4 @@
+---
+bugfixes:
+ - Update docs to clarify the idemptonecy releated caveat and add it in the output warnings
+ (https://github.com/ansible-collections/ansible.netcommon/pull/189)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/upcap_ansible.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/upcap_ansible.yaml
new file mode 100644
index 00000000..97d1217d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/upcap_ansible.yaml
@@ -0,0 +1,4 @@
+---
+trivial:
+ - uncap ansible in meta/runtime.yaml
+ - address default documentation mismatch issues
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/update_resource_module_doc_discrepancy.yaml b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/update_resource_module_doc_discrepancy.yaml
new file mode 100644
index 00000000..eb23a028
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/changelogs/fragments/update_resource_module_doc_discrepancy.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - To fix few ios resource module discrepancy
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_acl_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_acl_interfaces_module.rst
new file mode 100644
index 00000000..5fd74c37
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_acl_interfaces_module.rst
@@ -0,0 +1,740 @@
+.. _cisco.ios.ios_acl_interfaces_module:
+
+
+****************************
+cisco.ios.ios_acl_interfaces
+****************************
+
+**ACL interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module configures and manages the access-control (ACL) attributes of interfaces on IOS platforms.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="4">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of ACL interfaces options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>access_groups</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify access-group for IP access list (standard or extended).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the ACLs for the provided AFI.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the direction of packets that the ACL will be applied on.</div>
+ <div>With one direction already assigned, other acl direction cannot be same.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the name of the IPv4/IPv4 ACL for the interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the AFI for the ACLs to be configured on this interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The <em>running_config</em> argument allows the implementer to pass in the configuration to use as the base config for comparison. This value of this option should be the output received from device by executing command.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ <li>rendered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using Merged
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+ # interface Loopback888
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # interface GigabitEthernet0/2
+ # ip access-group 123 out
+
+ - name: Merge module attributes of given access-groups
+ cisco.ios.ios_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: 110
+ direction: in
+ - name: 123
+ direction: out
+ - afi: ipv6
+ acls:
+ - name: test_v6
+ direction: out
+ - name: temp_v6
+ direction: in
+ - name: GigabitEthernet0/2
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: 100
+ direction: in
+ state: merged
+
+ # Commands Fired:
+ # ---------------
+ #
+ # interface GigabitEthernet0/1
+ # ip access-group 110 in
+ # ip access-group 123 out
+ # ipv6 traffic-filter test_v6 out
+ # ipv6 traffic-filter temp_v6 in
+ # interface GigabitEthernet0/2
+ # ip access-group 100 in
+ # ip access-group 123 out
+
+
+ # After state:
+ # -------------
+ #
+ # vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+ # interface Loopback888
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip access-group 110 in
+ # ip access-group 123 out
+ # ipv6 traffic-filter test_v6 out
+ # ipv6 traffic-filter temp_v6 in
+ # interface GigabitEthernet0/2
+ # ip access-group 110 in
+ # ip access-group 123 out
+
+ # Using Replaced
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+ # interface Loopback888
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip access-group 110 in
+ # ip access-group 123 out
+ # ipv6 traffic-filter test_v6 out
+ # ipv6 traffic-filter temp_v6 in
+ # interface GigabitEthernet0/2
+ # ip access-group 110 in
+ # ip access-group 123 out
+
+ - name: Replace module attributes of given access-groups
+ cisco.ios.ios_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: 100
+ direction: out
+ - name: 110
+ direction: in
+ state: replaced
+
+ # Commands Fired:
+ # ---------------
+ #
+ # interface GigabitEthernet0/1
+ # no ip access-group 123 out
+ # no ipv6 traffic-filter temp_v6 in
+ # no ipv6 traffic-filter test_v6 out
+ # ip access-group 100 out
+
+ # After state:
+ # -------------
+ #
+ # vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+ # interface Loopback888
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip access-group 100 out
+ # ip access-group 110 in
+ # interface GigabitEthernet0/2
+ # ip access-group 110 in
+ # ip access-group 123 out
+
+ # Using Overridden
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+ # interface Loopback888
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip access-group 110 in
+ # ip access-group 123 out
+ # ipv6 traffic-filter test_v6 out
+ # ipv6 traffic-filter temp_v6 in
+ # interface GigabitEthernet0/2
+ # ip access-group 110 in
+ # ip access-group 123 out
+
+ - name: Overridden module attributes of given access-groups
+ cisco.ios.ios_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: 100
+ direction: out
+ - name: 110
+ direction: in
+ state: overridden
+
+ # Commands Fired:
+ # ---------------
+ #
+ # interface GigabitEthernet0/1
+ # no ip access-group 123 out
+ # no ipv6 traffic-filter test_v6 out
+ # no ipv6 traffic-filter temp_v6 in
+ # ip access-group 100 out
+ # interface GigabitEthernet0/2
+ # no ip access-group 110 in
+ # no ip access-group 123 out
+
+ # After state:
+ # -------------
+ #
+ # vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+ # interface Loopback888
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip access-group 100 out
+ # ip access-group 110 in
+ # interface GigabitEthernet0/2
+
+ # Using Deleted
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+ # interface Loopback888
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip access-group 110 in
+ # ip access-group 123 out
+ # ipv6 traffic-filter test_v6 out
+ # ipv6 traffic-filter temp_v6 in
+ # interface GigabitEthernet0/2
+ # ip access-group 110 in
+ # ip access-group 123 out
+
+ - name: Delete module attributes of given Interface
+ cisco.ios.ios_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ state: deleted
+
+ # Commands Fired:
+ # ---------------
+ #
+ # interface GigabitEthernet0/1
+ # no ip access-group 110 in
+ # no ip access-group 123 out
+ # no ipv6 traffic-filter test_v6 out
+ # no ipv6 traffic-filter temp_v6 in
+
+ # After state:
+ # -------------
+ #
+ # vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+ # interface Loopback888
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # interface GigabitEthernet0/2
+ # ip access-group 110 in
+ # ip access-group 123 out
+
+ # Using DELETED without any config passed
+ #"(NOTE: This will delete all of configured resource module attributes from each configured interface)"
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+ # interface Loopback888
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip access-group 110 in
+ # ip access-group 123 out
+ # ipv6 traffic-filter test_v6 out
+ # ipv6 traffic-filter temp_v6 in
+ # interface GigabitEthernet0/2
+ # ip access-group 110 in
+ # ip access-group 123 out
+
+ - name: Delete module attributes of given access-groups from ALL Interfaces
+ cisco.ios.ios_acl_interfaces:
+ config:
+ state: deleted
+
+ # Commands Fired:
+ # ---------------
+ #
+ # interface GigabitEthernet0/1
+ # no ip access-group 110 in
+ # no ip access-group 123 out
+ # no ipv6 traffic-filter test_v6 out
+ # no ipv6 traffic-filter temp_v6 in
+ # interface GigabitEthernet0/2
+ # no ip access-group 110 out
+ # no ip access-group 123 out
+
+ # After state:
+ # -------------
+ #
+ # vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+ # interface Loopback888
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # interface GigabitEthernet0/2
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+ # interface Loopback888
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip access-group 110 in
+ # ip access-group 123 out
+ # ipv6 traffic-filter test_v6 out
+ # ipv6 traffic-filter temp_v6 in
+ # interface GigabitEthernet0/2
+ # ip access-group 110 in
+ # ip access-group 123 out
+
+ - name: Gather listed acl interfaces with provided configurations
+ cisco.ios.ios_acl_interfaces:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "name": "Loopback888"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0"
+ # },
+ # {
+ # "access_groups": [
+ # {
+ # "acls": [
+ # {
+ # "direction": "in",
+ # "name": "110"
+ # },
+ # {
+ # "direction": "out",
+ # "name": "123"
+ # }
+ # ],
+ # "afi": "ipv4"
+ # },
+ # {
+ # "acls": [
+ # {
+ # "direction": "in",
+ # "name": "temp_v6"
+ # },
+ # {
+ # "direction": "out",
+ # "name": "test_v6"
+ # }
+ # ],
+ # "afi": "ipv6"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/1"
+ # },
+ # {
+ # "access_groups": [
+ # {
+ # "acls": [
+ # {
+ # "direction": "in",
+ # "name": "100"
+ # },
+ # {
+ # "direction": "out",
+ # "name": "123"
+ # }
+ # ],
+ # "afi": "ipv4"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/2"
+ # }
+ # ]
+
+ # After state:
+ # ------------
+ #
+ # vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+ # interface Loopback888
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip access-group 110 in
+ # ip access-group 123 out
+ # ipv6 traffic-filter test_v6 out
+ # ipv6 traffic-filter temp_v6 in
+ # interface GigabitEthernet0/2
+ # ip access-group 110 in
+ # ip access-group 123 out
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: 110
+ direction: in
+ - name: 123
+ direction: out
+ - afi: ipv6
+ acls:
+ - name: test_v6
+ direction: out
+ - name: temp_v6
+ direction: in
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "interface GigabitEthernet0/1",
+ # "ip access-group 110 in",
+ # "ip access-group 123 out",
+ # "ipv6 traffic-filter temp_v6 in",
+ # "ipv6 traffic-filter test_v6 out"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # interface GigabitEthernet0/1
+ # ip access-group 110 in
+ # ip access-group 123 out
+ # ipv6 traffic-filter temp_v6 in
+ # ipv6 traffic-filter test_v6 out
+
+ - name: Parse the commands for provided configuration
+ cisco.ios.ios_acl_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": [
+ # {
+ # "access_groups": [
+ # {
+ # "acls": [
+ # {
+ # "direction": "in",
+ # "name": "110"
+ # }
+ # ],
+ # "afi": "ipv4"
+ # },
+ # {
+ # "acls": [
+ # {
+ # "direction": "in",
+ # "name": "temp_v6"
+ # }
+ # ],
+ # "afi": "ipv6"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/1"
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/1&#x27;, &#x27;ip access-group 110 in&#x27;, &#x27;ipv6 traffic-filter test_v6 out&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_acls_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_acls_module.rst
new file mode 100644
index 00000000..d2988a75
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_acls_module.rst
@@ -0,0 +1,4557 @@
+.. _cisco.ios.ios_acls_module:
+
+
+******************
+cisco.ios.ios_acls
+******************
+
+**ACLs resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module configures and manages the named or numbered ACLs on IOS platforms.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="7">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of ACL options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of Access Control Lists (ACL).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The entries within the ACL.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>destination</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the packet destination.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Host address to match, or any single host address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match any source address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A single destination host</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the destination port along with protocol.</div>
+ <div>Note, Valid with TCP/UDP protocol_options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a greater port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a lower port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets not on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Port group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the end of the port range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the start of the port range.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wildcard_bits</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination wildcard bits, valid with IPV4 address.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dscp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match packets with given dscp value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>evaluate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Evaluate an access list</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fragments</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Check non-initial fragments.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>grant</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>permit</li>
+ <li>deny</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the action.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log matches against this entry.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_input</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log matches against this entry, including input interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>option</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match packets with given IP Options value.</div>
+ <div>Valid only for named acls.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>add_ext</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Address Extension Option (147).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any_options</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with ANY Option.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>com_security</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Commercial Security Option (134).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dps</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Dynamic Packet State Option (151).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Encode Option (15).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eool</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with End of Options (0).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ext_ip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Extended IP Option (145).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ext_security</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Extended Security Option (133).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>finn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Experimental Flow Control Option (205).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>imitd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with IMI Traffic Desriptor Option (144).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsr</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Loose Source Route Option (131).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with MTU Probe Option (11).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtur</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with MTU Reply Option (12).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_op</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with No Operation Option (1).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nsapa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with NSAP Addresses Option (150).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>record_route</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Record Route Option (7).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_alert</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Router Alert Option (148).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sdb</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Selective Directed Broadcast Option (149).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>security</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Basic Security Option (130).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssr</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Strict Source Routing Option (137).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stream_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Stream ID Option (136).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timestamp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Time Stamp Option (68).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>traceroute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Trace Route Option (82).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ump</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Upstream Multicast Packet Option (152).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>visa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Experimental Access Control Option (142).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>zsu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with Experimental Measurement Option (10).</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>precedence</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match packets with given precedence value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the protocol to match.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol_options</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>protocol type.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ahp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Authentication Header Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eigrp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Cisco&#x27;s EIGRP routing protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>esp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Encapsulation Security Payload.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gre</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Cisco&#x27;s GRE tunneling.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hbh</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Hop by Hop options header. Valid for IPV6</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>icmp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Internet Control Message Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>administratively_prohibited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administratively prohibited</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>alternate_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Alternate address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>conversion_error</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Datagram conversion</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dod_host_prohibited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host prohibited</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dod_net_prohibited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Net prohibited</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo (ping)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo reply</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>general_parameter_problem</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Parameter problem</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_isolated</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host isolated</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_precedence_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host unreachable for precedence</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_tos_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host redirect for TOS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_tos_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host unreachable for TOS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_unknown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host unknown</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Information replies</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Information requests</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mask_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mask replies</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mask_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>mask_request</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mobile_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mobile host redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>net_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Network redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>net_tos_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Net redirect for TOS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>net_tos_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Network unreachable for TOS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>net_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Net unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network_unknown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Network unknown</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_room_for_option</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Parameter required but no room</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>option_missing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Parameter required but not present</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>packet_too_big</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Fragmentation needed and DF set</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parameter_problem</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All parameter problems</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Port unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>precedence_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Precedence cutoff</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Protocol unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reassembly_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Reassembly timeout</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All redirects</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_advertisement</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router discovery advertisements</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_solicitation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router discovery solicitations</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_quench</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Source quenches</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_route_failed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Source route failed</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time_exceeded</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All time exceededs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timestamp_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Timestamp replies</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timestamp_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Timestamp requests</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>traceroute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Traceroute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl_exceeded</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>TTL exceeded</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All unreachables</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>igmp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Internet Gateway Message Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dvmrp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Distance Vector Multicast Routing Protocol(2)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_query</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>IGMP Membership Query(0)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtrace_resp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Multicast Traceroute Response(7)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtrace_route</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Multicast Traceroute(8)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pim</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Protocol Independent Multicast(3)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trace</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Multicast trace(4)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>v1host_report</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>IGMPv1 Membership Report(1)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>v2host_report</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>IGMPv2 Membership Report(5)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>v2leave_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>IGMPv2 Leave Group(6)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>v3host_report</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>IGMPv3 Membership Report(9)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Any Internet Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipinip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>IP in IP tunneling.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Any IPv6.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nos</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>KA9Q NOS compatible IP over IP tunneling.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ospf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>OSPF routing protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pcp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Payload Compression Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pim</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Protocol Independent Multicast.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol_number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>An IP protocol number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sctp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Stream Control Transmission Protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tcp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match TCP packet flags</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ack</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the ACK bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>established</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match established connections</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fin</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the FIN bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>psh</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the PSH bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rst</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the RST bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>syn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the SYN bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>urg</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the URG bit</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>udp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>User Datagram Protocol.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sequence</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sequence Number for the Access Control Entry(ACE).</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the packet source.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source network address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match any source address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A single source host</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the destination port along with protocol.</div>
+ <div>Note, Valid with TCP/UDP protocol_options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a greater port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a lower port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets not on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Port group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the end of the port range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the start of the port range.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wildcard_bits</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination wildcard bits, valid with IPV4 address.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time_range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a time-range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tos</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match packets with given TOS value.</div>
+ <div>Note, DSCP and TOS are mutually exclusive</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_reliability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with max reliable TOS (2).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_throughput</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with max throughput TOS (4).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with min delay TOS (8).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_monetary_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with min monetary cost TOS (1).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>normal</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with normal TOS (0).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>service_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Type of service value</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match packets with given TTL value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets on a given TTL number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a greater TTL number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a lower TTL number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets not on a given TTL number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets in the range of TTLs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the end of the port range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the start of the port range.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acl_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>extended</li>
+ <li>standard</li>
+ </ul>
+ </td>
+ <td>
+ <div>ACL type</div>
+ <div>Note, it&#x27;s mandatory and required for Named ACL, but for Numbered ACL it&#x27;s not mandatory.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The name or the number of the ACL.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>The Address Family Indicator (AFI) for the Access Control Lists (ACL).</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>sh access-list</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh access-lists
+ # Extended IP access list 110
+ # 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10
+
+ - name: Merge provided configuration with device configuration
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: std_acl
+ acl_type: standard
+ aces:
+ - grant: deny
+ source:
+ address: 192.168.1.200
+ - grant: deny
+ source:
+ address: 192.168.2.0
+ wildcard_bits: 0.0.0.255
+ - name: 110
+ aces:
+ - sequence: 10
+ protocol_options:
+ icmp:
+ traceroute: true
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ host: 198.51.100.0
+ destination:
+ host: 198.51.110.0
+ port_protocol:
+ eq: telnet
+ - name: test
+ acl_type: extended
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp:
+ fin: true
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ option:
+ traceroute: true
+ ttl:
+ eq: 10
+ - name: 123
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 198.51.101.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ tos:
+ service_value: 12
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.4.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ lt: 20
+ - afi: ipv6
+ acls:
+ - name: R1_TRAFFIC
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ any: true
+ port_protocol:
+ eq: www
+ destination:
+ any: true
+ port_protocol:
+ eq: telnet
+ dscp: af11
+ state: merged
+
+ # Commands fired:
+ # ---------------
+ #
+ # - ip access-list standard std_acl
+ # - deny 192.168.1.200
+ # - deny 192.168.2.0 0.0.0.255
+ # - ip access-list extended 110
+ # - no 10
+ # - 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+ # - deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+ # - ip access-list extended test
+ # - deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+ # - ip access-list extended 123
+ # - deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+ # - deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+ # - ipv6 access-list R1_TRAFFIC
+ # - deny tcp any eq www any eq telnet ack dscp af11
+
+ # After state:
+ # ------------
+ #
+ # vios#sh access-lists
+ # Standard IP access list std_acl
+ # 10 deny 192.168.1.200
+ # 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+ # Extended IP access list 110
+ # 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+ # 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+ # Extended IP access list 123
+ # 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+ # 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+ # Extended IP access list test
+ # 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+ # IPv6 access list R1_TRAFFIC
+ # deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh access-lists
+ # Standard IP access list std_acl
+ # 10 deny 192.168.1.200
+ # 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+ # Extended IP access list 110
+ # 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+ # 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+ # Extended IP access list 123
+ # 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+ # 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+ # Extended IP access list test
+ # 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+ # IPv6 access list R1_TRAFFIC
+ # deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+
+ - name: Replaces device configuration of listed acls with provided configuration
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: 110
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ eq: 10
+ - name: 150
+ aces:
+ - grant: deny
+ sequence: 20
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ dscp: ef
+ ttl:
+ eq: 10
+ state: replaced
+
+ # Commands fired:
+ # ---------------
+ #
+ # - no ip access-list extended 110
+ # - ip access-list extended 110
+ # - deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www syn dscp ef ttl eq 10
+ # - ip access-list extended 150
+ # - 20 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10
+
+ # After state:
+ # -------------
+ #
+ # vios#sh access-lists
+ # Standard IP access list std_acl
+ # 10 deny 192.168.1.200
+ # 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+ # Extended IP access list 110
+ # 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www syn dscp ef ttl eq 10
+ # Extended IP access list 123
+ # 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+ # 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+ # Extended IP access list 150
+ # 20 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10
+ # Extended IP access list test
+ # 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+ # IPv6 access list R1_TRAFFIC
+ # deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh access-lists
+ # Standard IP access list std_acl
+ # 10 deny 192.168.1.200
+ # 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+ # Extended IP access list 110
+ # 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+ # 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+ # Extended IP access list 123
+ # 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+ # 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+ # Extended IP access list test
+ # 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+ # IPv6 access list R1_TRAFFIC
+ # deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+ - name: Override device configuration of all acls with provided configuration
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: 110
+ aces:
+ - grant: deny
+ sequence: 20
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ eq: 10
+ - name: 150
+ aces:
+ - grant: deny
+ sequence: 10
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ dscp: ef
+ ttl:
+ eq: 10
+ state: overridden
+
+ # Commands fired:
+ # ---------------
+ #
+ # - no ip access-list standard std_acl
+ # - no ip access-list extended 110
+ # - no ip access-list extended 123
+ # - no ip access-list extended 150
+ # - no ip access-list extended test
+ # - no ipv6 access-list R1_TRAFFIC
+ # - ip access-list extended 150
+ # - 10 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10
+ # - ip access-list extended 110
+ # - 20 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq www ack dscp ef ttl eq 10
+
+ # After state:
+ # -------------
+ #
+ # vios#sh access-lists
+ # Extended IP access list 110
+ # 20 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq www ack dscp ef ttl eq 10
+ # Extended IP access list 150
+ # 10 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10
+
+ # Using Deleted
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh access-lists
+ # Standard IP access list std_acl
+ # 10 deny 192.168.1.200
+ # 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+ # Extended IP access list 110
+ # 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+ # 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+ # Extended IP access list 123
+ # 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+ # 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+ # Extended IP access list test
+ # 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+ # IPv6 access list R1_TRAFFIC
+ # deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+ - name: "Delete ACLs (Note: This won't delete the all configured ACLs)"
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: test
+ acl_type: extended
+ - name: 110
+ - afi: ipv6
+ acls:
+ - name: R1_TRAFFIC
+ state: deleted
+
+ # Commands fired:
+ # ---------------
+ #
+ # - no ip access-list extended test
+ # - no ip access-list extended 110
+ # - no ipv6 access-list R1_TRAFFIC
+
+ # After state:
+ # -------------
+ #
+ # vios#sh access-lists
+ # Standard IP access list std_acl
+ # 10 deny 192.168.1.200
+ # 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+ # Extended IP access list 123
+ # 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+ # 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh access-lists
+ # Standard IP access list std_acl
+ # 10 deny 192.168.1.200
+ # 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+ # Extended IP access list 110
+ # 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+ # 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+ # Extended IP access list 123
+ # 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+ # 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+ # Extended IP access list test
+ # 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+ # IPv6 access list R1_TRAFFIC
+ # deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+ - name: "Delete ACLs based on AFI (Note: This won't delete the all configured ACLs)"
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ state: deleted
+
+ # Commands fired:
+ # ---------------
+ #
+ # - no ip access-list standard std_acl
+ # - no ip access-list extended test
+ # - no ip access-list extended 110
+ # - no ip access-list extended 123
+
+ # After state:
+ # -------------
+ #
+ # vios#sh access-lists
+ # IPv6 access list R1_TRAFFIC
+ # deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+ # Using Deleted without any config passed
+ #"(NOTE: This will delete all of configured ACLs)"
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh access-lists
+ # Standard IP access list std_acl
+ # 10 deny 192.168.1.200
+ # 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+ # Extended IP access list 110
+ # 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+ # 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+ # Extended IP access list 123
+ # 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+ # 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+ # Extended IP access list test
+ # 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+ # IPv6 access list R1_TRAFFIC
+ # deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+ - name: 'Delete ALL of configured ACLs (Note: This WILL delete the all configured
+ ACLs)'
+ cisco.ios.ios_acls:
+ state: deleted
+
+ # Commands fired:
+ # ---------------
+ #
+ # - no ip access-list extended test
+ # - no ip access-list extended 110
+ # - no ip access-list extended 123
+ # - no ip access-list extended test
+ # - no ipv6 access-list R1_TRAFFIC
+
+ # After state:
+ # -------------
+ #
+ # vios#sh access-lists
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh access-lists
+ # Standard IP access list std_acl
+ # 10 deny 192.168.1.200
+ # 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+ # Extended IP access list 110
+ # 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+ # 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+ # Extended IP access list 123
+ # 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+ # 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+ # Extended IP access list test
+ # 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+ # IPv6 access list R1_TRAFFIC
+ # deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+ - name: Gather listed acls with provided configurations
+ cisco.ios.ios_acls:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "acls": [
+ # {
+ # "aces": [
+ # {
+ # "destination": {
+ # "address": "192.0.3.0",
+ # "wildcard_bits": "0.0.0.255"
+ # },
+ # "dscp": "ef",
+ # "grant": "deny",
+ # "protocol_options": {
+ # "icmp": {
+ # "echo": true
+ # }
+ # },
+ # "sequence": 10,
+ # "source": {
+ # "address": "192.0.2.0",
+ # "wildcard_bits": "0.0.0.255"
+ # },
+ # "ttl": {
+ # "eq": 10
+ # }
+ # }
+ # ],
+ # "acl_type": "extended",
+ # "name": "110"
+ # },
+ # {
+ # "aces": [
+ # {
+ # "destination": {
+ # "address": "198.51.101.0",
+ # "port_protocol": {
+ # "eq": "telnet"
+ # },
+ # "wildcard_bits": "0.0.0.255"
+ # },
+ # "grant": "deny",
+ # "protocol_options": {
+ # "tcp": {
+ # "ack": true
+ # }
+ # },
+ # "sequence": 10,
+ # "source": {
+ # "address": "198.51.100.0",
+ # "wildcard_bits": "0.0.0.255"
+ # },
+ # "tos": {
+ # "service_value": 12
+ # }
+ # },
+ # {
+ # "destination": {
+ # "address": "192.0.4.0",
+ # "port_protocol": {
+ # "eq": "www"
+ # },
+ # "wildcard_bits": "0.0.0.255"
+ # },
+ # "dscp": "ef",
+ # "grant": "deny",
+ # "protocol_options": {
+ # "tcp": {
+ # "ack": true
+ # }
+ # },
+ # "sequence": 20,
+ # "source": {
+ # "address": "192.0.3.0",
+ # "wildcard_bits": "0.0.0.255"
+ # },
+ # "ttl": {
+ # "lt": 20
+ # }
+ # }
+ # ],
+ # "acl_type": "extended",
+ # "name": "123"
+ # },
+ # {
+ # "aces": [
+ # {
+ # "destination": {
+ # "address": "192.0.3.0",
+ # "port_protocol": {
+ # "eq": "www"
+ # },
+ # "wildcard_bits": "0.0.0.255"
+ # },
+ # "grant": "deny",
+ # "option": {
+ # "traceroute": true
+ # },
+ # "protocol_options": {
+ # "tcp": {
+ # "fin": true
+ # }
+ # },
+ # "sequence": 10,
+ # "source": {
+ # "address": "192.0.2.0",
+ # "wildcard_bits": "0.0.0.255"
+ # },
+ # "ttl": {
+ # "eq": 10
+ # }
+ # }
+ # ],
+ # "acl_type": "extended",
+ # "name": "test_acl"
+ # }
+ # ],
+ # "afi": "ipv4"
+ # },
+ # {
+ # "acls": [
+ # {
+ # "aces": [
+ # {
+ # "destination": {
+ # "any": true,
+ # "port_protocol": {
+ # "eq": "telnet"
+ # }
+ # },
+ # "dscp": "af11",
+ # "grant": "deny",
+ # "protocol_options": {
+ # "tcp": {
+ # "ack": true
+ # }
+ # },
+ # "sequence": 10,
+ # "source": {
+ # "any": true,
+ # "port_protocol": {
+ # "eq": "www"
+ # }
+ # }
+ # }
+ # ],
+ # "name": "R1_TRAFFIC"
+ # }
+ # ],
+ # "afi": "ipv6"
+ # }
+ # ]
+
+ # Using Rendered
+
+ - name: Rendered the provided configuration with the exisiting running configuration
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: 110
+ aces:
+ - grant: deny
+ sequence: 10
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ eq: 10
+ - name: 150
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ dscp: ef
+ ttl:
+ eq: 10
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "ip access-list extended 110",
+ # "10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www syn dscp ef ttl eq 10",
+ # "ip access-list extended 150",
+ # "deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # ipv6 access-list R1_TRAFFIC
+ # deny tcp any eq www any eq telnet ack dscp af11
+
+ - name: Parse the commands for provided configuration
+ cisco.ios.ios_acls:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": [
+ # {
+ # "acls": [
+ # {
+ # "aces": [
+ # {
+ # "destination": {
+ # "any": true,
+ # "port_protocol": {
+ # "eq": "telnet"
+ # }
+ # },
+ # "dscp": "af11",
+ # "grant": "deny",
+ # "protocol_options": {
+ # "tcp": {
+ # "ack": true
+ # }
+ # },
+ # "source": {
+ # "any": true,
+ # "port_protocol": {
+ # "eq": "www"
+ # }
+ # }
+ # }
+ # ],
+ # "name": "R1_TRAFFIC"
+ # }
+ # ],
+ # "afi": "ipv6"
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ip access-list extended 110&#x27;, &#x27;deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_banner_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_banner_module.rst
new file mode 100644
index 00000000..60205ea7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_banner_module.rst
@@ -0,0 +1,326 @@
+.. _cisco.ios.ios_banner_module:
+
+
+********************
+cisco.ios.ios_banner
+********************
+
+**Manage multiline banners on Cisco IOS devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This will configure both login and motd banners on remote devices running Cisco IOS. It allows playbooks to add or remote banner text from the active running configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>banner</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>login</li>
+ <li>motd</li>
+ <li>exec</li>
+ <li>incoming</li>
+ <li>slip-ppp</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies which banner should be configured on the remote device. In Ansible 2.4 and earlier only <em>login</em> and <em>motd</em> were supported.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies whether or not the configuration is present in the current devices active running configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>text</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The banner text that should be present in the remote device running configuration. This argument accepts a multiline string, with no empty lines. Requires <em>state=present</em>.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.6
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure the login banner
+ cisco.ios.ios_banner:
+ banner: login
+ text: |
+ this is my login banner
+ that contains a multiline
+ string
+ state: present
+
+ - name: remove the motd banner
+ cisco.ios.ios_banner:
+ banner: motd
+ state: absent
+
+ - name: Configure banner from file
+ cisco.ios.ios_banner:
+ banner: motd
+ text: "{{ lookup('file', './config_partial/raw_banner.cfg') }}"
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;banner login&#x27;, &#x27;this is my login banner&#x27;, &#x27;that contains a multiline&#x27;, &#x27;string&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Ricardo Carrillo Cruz (@rcarrillocruz)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_bgp_global_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_bgp_global_module.rst
new file mode 100644
index 00000000..ac4993e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_bgp_global_module.rst
@@ -0,0 +1,8801 @@
+.. _cisco.ios.ios_bgp_global_module:
+
+
+************************
+cisco.ios.ios_bgp_global
+************************
+
+**Global BGP resource module**
+
+
+Version added: 1.3.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module configures and manages the attributes of global bgp on Cisco IOS.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="7">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of configurations for global bgp.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure BGP aggregate entries</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Aggregate address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertise_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set condition to advertise attribute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>as_confed_set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Generate AS confed set path information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>as_set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Generate AS set path information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>attribute_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set attributes of aggregate</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>netmask</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Aggregate mask</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter more specific routes from updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Conditionally filter more specific routes from updates</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>as_number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Autonomous system number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable automatic network number summarization</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable address family and enter its config mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>additional_paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Additional paths in the BGP table</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>install</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Additional paths to install into RIB</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>receive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Receive additional paths from neighbors</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>select</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Selection criteria to pick the paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Select all available paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>best</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Select best N paths (2-3).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>best_external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Select best-external path</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_best</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Select group-best path</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>send</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Send additional paths to neighbors</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertise_best_external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise best external path to internal peers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate_timer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure Aggregation Timer</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always_compare_med</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Allow comparing MED from different neighbors</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>asnotation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Change the default asplain notation</div>
+ <div>asdot notation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Change the default bestpath selection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aigp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>if both paths doesn&#x27;t have aigp ignore on bestpath comparision</div>
+ <div>ignore</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>compare_routerid</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Compare router-id for identical EBGP paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost_community</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>cost community</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>igp_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>igp metric</div>
+ <div>Ignore igp metric in bestpath selection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>med</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MED attribute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>confed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Compare MED among confederation paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>missing_as_worst</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Treat missing MED as the least preferred one</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>client_to_client</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure client to client route reflection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>inter-cluster and intra-cluster (default)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>intra_cluster</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>intra cluster reflection</div>
+ <div>intra-cluster reflection for cluster-id</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>set reflection of routes allowed</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cluster_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure Route-Reflector Cluster-id (peers may reset)</div>
+ <div>A.B.C.D/Please refer vendor documentation for valid Route-Reflector Cluster-id</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>confederation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>AS confederation parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>identifier</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set routing domain confederation AS</div>
+ <div>AS number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Peer ASs in BGP confederation</div>
+ <div>AS number</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>consistency_checker</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Consistency-checker</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_repair</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Auto-Repair</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the bgp consistency checker</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable Auto-Repair</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>error_message</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log Error-Msg</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the bgp consistency checker</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable Error-Msg</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dampening</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable route-flap dampening</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_suppress</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum duration to suppress a stable route</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>penalty_half_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Half-life time for the penalty</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reuse_route_val</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Value to start reusing a route</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route-map to specify criteria for dampening</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_route_val</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Value to start suppressing a route</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>deterministic_med</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Pick the best-MED path among paths advertised from the neighboring AS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dmzlink_bw</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use DMZ Link Bandwidth as weight for BGP multipaths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enforce_first_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enforce the first AS for EBGP routes(default)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enhanced_error</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enabled BGP Enhanced error handling</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_external_fallover</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Immediately reset session if a link to a directly connected external peer goes down</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Graceful restart capability parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>extended</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable Graceful-Restart Extension</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>restart_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the max time needed to restart and come back up</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set Graceful-Restart</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stalepath_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the max time to hold onto restarting peer&#x27;s stale paths</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Graceful shutdown capability parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>community</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set Community for Gshut routes</div>
+ <div>community number/community number in aa:nn format</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_preference</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set Local Preference for Gshut routes</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbors</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Gracefully shut down all neigbors</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>activate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Activate graceful shutdown of all neigbors</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>time in seconds</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrfs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Gracefully shut down all vrf neigbors</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>activate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Activate graceful shutdown of all neigbors</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>time in seconds</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inject_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Routemap which specifies prefixes to inject</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>copy_attributes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Copy attributes from aggregate</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>exist_map_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>route-map name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>route-map name</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>listen</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor subnet range listener</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the max limit for the dynamic subnet range neighbors</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Subnet network range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv4_with_subnet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv4 subnet range(A.B.C.D/nn)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6_with_subnet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 subnet range(X:X:X:X::X/&lt;0-128&gt;)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Member of the peer-group</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_neighbor_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log neighbor up/down and reset reason</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maxas_limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Allow AS-PATH attribute from any neighbor imposing a limit on number of ASes</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maxcommunity_limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Allow COMMUNITY attribute from any neighbor imposing a limit on number of communities</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maxextcommunity_limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Allow EXTENDED COMMUNITY attribute from any neighbor imposing a limit on number of extended communities</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nexthop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Nexthop tracking commands</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map for valid nexthops</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trigger</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>nexthop trackings</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the delay to tigger nexthop tracking</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable nexthop tracking</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nopeerup_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set how long BGP will wait for the first peer to come up before beginning the update delay or graceful restart timers (in seconds)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cold_boot</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>How long to wait for the first peer to come up upon a cold boot</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nsf_switchover</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>How long to wait for the first peer, post NSF switchover</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>post_boot</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>How long to wait for the first peer to come up once the system is already booted and all peers go down</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>user_initiated</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>How long to wait for the first peer, post a manual clear of BGP peers by the admin user</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>recursion</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>recursion rule for the nexthops</div>
+ <div>recursion via host for the nexthops</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redistribute_internal</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Allow redistribution of iBGP into IGPs (dangerous)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>refresh</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>refresh</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_eor_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure refresh max-eor time</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stalepath_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure refresh stale-path time</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>regexp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Select regular expression engine</div>
+ <div>Enable bounded-execution-time regular expression engine</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>route-map control commands</div>
+ <div>Have route-map set commands take priority over BGP commands such as next-hop unchanged</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Override configured router identifier (peers will reset)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Manually configured router identifier(A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use IPv4 address on interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>vrf-specific router id configuration</div>
+ <div>Automatically assign per-vrf bgp router id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>scan_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure background scanner interval</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>slow_peer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure slow-peer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>detection</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Slow-peer detection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Slow-peer detection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the slow-peer detection threshold</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>split_update_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure slow-peer split-update-group</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dynamic</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Dynamically split the slow peer to slow-update group</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>permanent</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Keep the slow-peer permanently in slow-update group</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>snmp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>BGP SNMP options</div>
+ <div>BGP SNMP trap options</div>
+ <div>Use cbgpPeer2Type as part of index for traps</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>soft_reconfig_backup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use soft-reconfiguration inbound only when route-refresh is not negotiated</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sso</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Stateful Switchover</div>
+ <div>Enable SSO only for Route-Refresh capable peers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_inactive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress routes that are not in the routing table</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Global enable/disable transport session parameters</div>
+ <div>Transport path MTU discovery</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the max initial delay for sending update</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage peers in bgp update groups</div>
+ <div>Split update groups based on Policy</div>
+ <div>Keep peers with as-override in different update groups</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>upgrade_cli</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Upgrade to hierarchical AFI mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>af_mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Upgrade to AFI mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>enable upgrade to hierarchical AFI mode</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bmp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP Monitoring Protocol)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>buffer_size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BMP Buffer Size</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>initial_refresh</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Initial Refresh options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay before Initial Refresh</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>skip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>skip all refreshes</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>server</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Server Information</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Control distribution of default information</div>
+ <div>Distribute a default route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set metric of redistributed routes</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Define an administrative distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Administrative distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP Standard access list number</div>
+ <div>IP Standard expanded access list number</div>
+ <div>Standard access-list name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP Source address (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Administrative distance</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wildcard_bit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Wildcard bits (A.B.C.D)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>routes_external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance for routes external to the AS</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>routes_internal</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance for routes internal to the AS</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>routes_local</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance for local routes</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mbgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MBGP distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>routes_external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance for routes external to the AS</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>routes_internal</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance for routes internal to the AS</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>routes_local</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance for local routes</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distribute_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter networks in routing updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP access list number/name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter incoming routing updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>interface details</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter outgoing routing updates</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum_paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Forward packets over multiple paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eibgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Both eBGP and iBGP paths as multipath</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ibgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>iBGP-multipath</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Number of paths</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum_secondary_paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum secondary paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eibgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Both eBGP and iBGP paths as secondary multipath</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ibgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>iBGP-secondary-multipath</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Number of secondary paths</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a neighbor router</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>activate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable the Address Family for this Neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>additional_paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Negotiate additional paths capabilities with this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable additional paths for this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>receive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Receive additional paths from neighbors</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>send</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Send additional paths to neighbors</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor address (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Advertise to this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>additional_paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Advertise additional paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Select all available paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>best</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Select best N paths (2-3).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_best</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Select group-best path</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>best_external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise best-external (at RRs best-internal) path</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>diverse_path</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Advertise additional paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>backup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Diverse path can be backup path</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mpath</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Diverse path can be multipath</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertise_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>specify route-map for conditional advertisement</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>exist_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>advertise prefix only if prefix is in the condition exists</div>
+ <div>condition route-map name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>advertise route-map name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>non_exist_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>advertise prefix only if prefix in the condition does not exist</div>
+ <div>condition route-map name</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertisement_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum interval between sending BGP routing updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aigp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>AIGP on neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable AIGP</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>send</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cost community or MED carrying AIGP VALUE</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost_community</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cost extended community carrying AIGP Value</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Community ID</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>poi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Point of Insertion</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>igp_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Point of Insertion After IGP</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pre_bestpath</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Point of Insertion At Beginning</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transitive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Cost community is Transitive</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>med</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Med carrying AIGP Value</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>allow_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable the policy support for this IBGP Neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>allowas_in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Accept as-path with my AS present in it</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>as_override</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Override matching AS-number while sending update</div>
+ <div>Maintain Split Horizon while sending update</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bmp_activate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Activate the BMP monitoring for a BGP peer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Activate BMP monitoring for all servers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>server</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Activate BMP for server</div>
+ <div>BMP Server Number</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Advertise capability to the peer</div>
+ <div>Advertise ORF capability to the peer</div>
+ <div>Advertise prefixlist ORF capability to this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>both</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Capability to SEND and RECEIVE the ORF to/from this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>receive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Capability to RECEIVE the ORF from this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>send</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Capability to SEND the ORF to this neighbor</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cluster_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure Route-Reflector Cluster-id (peers may reset)</div>
+ <div>Route-Reflector Cluster-id as 32 bit quantity, or Route-Reflector Cluster-id in IP address format (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Originate default route to this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route-map to specify criteria to originate default</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Originate default route to this neighbor</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor specific description</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable_connected_check</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>one-hop away EBGP peer using loopback address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distribute_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter updates to/from this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP access list number/name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter incoming updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter outgoing updates</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dmzlink_bw</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Propagate the DMZ link bandwidth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ebgp_multihop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Allow EBGP neighbors not on directly connected networks</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Allow EBGP neighbors not on directly connected networks</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hop_count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum hop count</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fall_over</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Session fall on peer route lost</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use BFD to detect failure</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multi_hop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Force BFD multi-hop to detect failure</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>set bfd</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>single_hop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Force BFD single-hop to detect failure</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map for peer route</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Establish BGP filters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter incoming updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter outgoing updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>path_acl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>AS path access list</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ha_mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>high availability mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>disable graceful-restart</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>set ha-mode and graceful-restart for this peer</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inherit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Inherit a template</div>
+ <div>Inherit a peer-session template and Template name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6_adddress</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor ipv6 address (X:X:X:X::X)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a local-as number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dual_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Accept either real AS or local AS from the ebgp peer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_prepend</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Do not prepend local-as to updates from ebgp peers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>replace_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Replace real AS with local AS in the EBGP updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set prepend</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>AS number used as local AS</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>set local-as number</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_neighbor_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log neighbor up/down and reset reason</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>disable Log neighbor up/down and reset</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>set Log neighbor up/down and reset</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum_prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of prefixes accepted from this peer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_no</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>maximum no. of prefix limit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Restart bgp connection after limit is exceeded</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold_val</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Threshold value (%) at which to generate a warning msg</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>warning_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Only give warning message when limit is exceeded</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hop_self</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Disable the next hop calculation for this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable next-hop-self for both eBGP and iBGP received paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable next-hop-self</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hop_unchanged</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Propagate next hop unchanged for iBGP paths to this neighbor</div>
+ <div>Propagate next hop unchanged for all paths (iBGP and eBGP) to this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>allpaths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Propagate next hop unchanged for all paths (iBGP and eBGP) to this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable next-hop-unchanged</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set a password</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>path_attribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP optional attribute filtering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>discard</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Discard matching path-attribute for this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Perform inbound path-attribute filtering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>path attribute range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>path attribute range end value</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>path attribute range start value</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>path attribute type</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>treat_as_withdraw</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Treat-as-withdraw matching path-attribute for this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Perform inbound path-attribute filtering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>path attribute range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>path attribute range end value</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>path attribute range start value</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>path attribute type</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Member of the peer-group</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remote_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a BGP neighbor</div>
+ <div>AS of remote neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remove_private_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Remove private AS number from outbound updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Remove all private AS numbers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>replace_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Replace all private AS numbers with local AS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Remove private AS number</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route map to neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Apply map to incoming routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Replace all private AS numbers with local AS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Apply map to outbound routes</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_reflector_client</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure a neighbor as Route Reflector client</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_server_client</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure a neighbor as Route Server client</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>context</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Route Server context for neighbor</div>
+ <div>Route Server context name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set Route Server client</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>send_community</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Send Community attribute to this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>both</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Send Standard and Extended Community attributes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>extended</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Send Extended Community attribute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set send Community attribute to this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>standard</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Send Standard Community attribute</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>send_label</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Send NLRI + MPLS Label to this peer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>explicit_null</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise Explicit Null label in place of Implicit Null</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set send NLRI + MPLS Label to this peer</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Administratively shut down this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Gracefully shut down this neighbor</div>
+ <div>time in seconds</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>shut down</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>slow_peer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure slow-peer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>detection</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure slow-peer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable slow-peer detection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable slow-peer detection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the slow-peer detection threshold</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>split_update_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure slow-peer split-update-group</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dynamic</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Dynamically split the slow peer to slow-update group</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable slow-peer detection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable slow-peer detection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>permanent</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Keep the slow-peer permanently in slow-update group</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>static</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Static slow-peer</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>soft_reconfiguration</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Per neighbor soft reconfiguration</div>
+ <div>Allow inbound soft reconfiguration for this neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor tag</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP per neighbor timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Holdtime</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Keepalive interval</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum hold time from neighbor</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>translate_update</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate Update to MBGP format</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nlri</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify type of nlri to translate to</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multicast</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Translate Update to multicast nlri</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unicast</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Process Update as unicast nlri</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set Translate Update</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Transport options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>connection_mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify passive or active connection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>active</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Actively establish the TCP session</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Passively establish the TCP session</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multi_session</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use Multi-session for transport</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>path_mtu_discovery</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use transport path MTU discovery</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>disable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use path MTU discovery</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl_security</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP ttl security check</div>
+ <div>maximum number of hops</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unsuppress_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route-map to selectively unsuppress suppressed routes</div>
+ <div>Name of route map</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>version</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the BGP version to match a neighbor</div>
+ <div>Neighbor&#x27;s BGP version</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>weight</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set default weight for routes from this neighbor</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redistribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redistribute information from another routing protocol</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>application</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Application</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Application name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Border Gateway Protocol (BGP)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>as_number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Autonomous system number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>connected</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Connected</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eigrp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enhanced Interior Gateway Routing Protocol (EIGRP)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>as_number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Autonomous system number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>isis</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ISO IS-IS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ISO routing area tag</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clns</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribution of OSI dynamic routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribution of IP dynamic routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>iso_igrp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IGRP for OSI networks</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ISO routing area tag</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lisp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Locator ID Separation Protocol (LISP)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mobile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Mobile routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>odr</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>On Demand stub Routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ospf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Open Shortest Path First (OSPF)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>On Demand stub Routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute OSPF external routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>internal</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute OSPF internal routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa_external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute OSPF NSSA external routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type_1</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute NSSA external type 1 routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type_2</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute NSSA external type 2 routes</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>process_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Process ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VPN Routing/Forwarding Instance</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ospfv3</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv3</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>On Demand stub Routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute OSPF external routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>internal</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute OSPF internal routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa_external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute OSPF NSSA external routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type_1</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute NSSA external type 1 routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type_2</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute NSSA external type 2 routes</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>process_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Process ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Routing Information Protocol (RIP)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>static</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Static routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clns</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribution of OSI static routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribution of IP static routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map reference</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a source VRF</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>global</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>global VRF</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source VRF name</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_server_context</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter route server context command mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_family</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter address family command mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Address family</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>import_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Import matching routes using a route map</div>
+ <div>Name of route map</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>modifier</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>multicast</li>
+ <li>unicast</li>
+ </ul>
+ </td>
+ <td>
+ <div>Address Family modifier</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Textual description of the router server context</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of route server context</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>scope</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter scope command mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>global</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Global scope</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VRF scope</div>
+ <div>VPN Routing/Forwarding instance name</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>synchronization</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Perform IGP synchronization</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>table_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Map external entry attributes into routing table</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Selective route download</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>route-map name</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>template</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter template command mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Template configuration for policy parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_session</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Template configuration for session parameters</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adjust routing timers</div>
+ <div>BGP timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Holdtime</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keepalive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Keepalive interval</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum hold time from neighbor</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>sh running-config | section ^router bgp</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>purged</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | section ^router bgp
+
+ - name: Merge provided configuration with device configuration
+ cisco.ios.ios_bgp_global:
+ config:
+ as_number: 65000
+ bgp:
+ advertise_best_external: true
+ bestpath:
+ - compare_routerid: true
+ nopeerup_delay:
+ - post_boot: 10
+ dampening:
+ penalty_half_time: 1
+ reuse_route_val: 1
+ suppress_route_val: 1
+ max_suppress: 1
+ graceful_shutdown:
+ neighbors:
+ time: 50
+ community: 100
+ local_preference: 100
+ neighbor:
+ - address: 198.51.100.1
+ description: merge neighbor
+ remote_as: 100
+ aigp:
+ send:
+ cost_community:
+ id: 100
+ poi:
+ igp_cost: true
+ transitive: true
+ route_map:
+ name: test-route
+ out: true
+ state: merged
+
+ # Commands fired:
+ # ---------------
+ #
+ # "commands": [
+ # "router bgp 65000",
+ # "bgp dampening 1 1 1 1",
+ # "bgp graceful-shutdown all neighbors 50 community 100 local-preference 100",
+ # "bgp advertise-best-external",
+ # "bgp nopeerup-delay post-boot 10",
+ # "bgp bestpath compare-routerid",
+ # "neighbor 198.51.100.1 remote-as 100",
+ # "neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
+ # "neighbor 198.51.100.1 description merge neighbor",
+ # "neighbor 198.51.100.1 route-map test-route out"
+ # ]
+
+ # After state:
+ # ------------
+ #
+ # vios#sh running-config | section ^router bgp
+ # router bgp 65000
+ # bgp nopeerup-delay post-boot 10
+ # bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+ # bgp bestpath compare-routerid
+ # bgp dampening 1 1 1 1
+ # bgp advertise-best-external
+ # neighbor 198.51.100.1 remote-as 100
+ # neighbor 198.51.100.1 description merge neighbor
+ # neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+ # neighbor 198.51.100.1 route-map test-route out
+
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | section ^router bgp
+ # router bgp 65000
+ # bgp nopeerup-delay post-boot 10
+ # bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+ # bgp bestpath compare-routerid
+ # bgp dampening 1 1 1 1
+ # bgp advertise-best-external
+ # neighbor 198.51.100.1 remote-as 100
+ # neighbor 198.51.100.1 description merge neighbor
+ # neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+ # neighbor 198.51.100.1 route-map test-route out
+
+
+ - name: Replaces device configuration of listed global BGP with provided configuration
+ cisco.ios.ios_bgp_global:
+ config:
+ as_number: 65000
+ bgp:
+ advertise_best_external: true
+ bestpath:
+ - med:
+ confed: true
+ log_neighbor_changes: true
+ nopeerup_delay:
+ - post_boot: 10
+ cold_boot: 20
+ neighbor:
+ - address: 192.0.2.1
+ description: replace neighbor
+ remote_as: 100
+ slow_peer:
+ detection:
+ disable: true
+ state: replaced
+
+ # Commands fired:
+ # ---------------
+ #
+ # "commands": [
+ # "router bgp 65000"
+ # "no bgp dampening 1 1 1 1"
+ # "no timers bgp 100 200 150"
+ # "no bgp bestpath compare-routerid"
+ # "bgp bestpath med confed"
+ # "bgp nopeerup-delay cold-boot 20"
+ # "no neighbor 198.51.100.1 remote-as 100"
+ # "neighbor 192.0.2.1 remote-as 100"
+ # "no bgp graceful-shutdown all neighbors 50 local-preference 100 community 100"
+ # "no neighbor 198.51.100.1 route-map test-route out"
+ # "no neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive"
+ # "no neighbor 198.51.100.1 description merge neighbor"
+ # "neighbor 192.0.2.1 slow-peer detection disable"
+ # "neighbor 192.0.2.1 description replace neighbor"
+ # ]
+
+
+ # After state:
+ # -------------
+ #
+ # vios#sh running-config | section ^router bgp
+ # router bgp 65000
+ # bgp log-neighbor-changes
+ # bgp nopeerup-delay cold-boot 20
+ # bgp nopeerup-delay post-boot 10
+ # bgp bestpath med confed
+ # bgp advertise-best-external
+ # redistribute connected metric 10
+ # neighbor 192.0.2.1 remote-as 100
+ # neighbor 192.0.2.1 description replace neighbor
+ # neighbor 192.0.2.1 slow-peer detection disable
+
+ # Using Deleted
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | section ^router bgp
+ # router bgp 65000
+ # bgp nopeerup-delay post-boot 10
+ # bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+ # bgp bestpath compare-routerid
+ # bgp dampening 1 1 1 1
+ # bgp advertise-best-external
+ # neighbor 198.51.100.1 remote-as 100
+ # neighbor 198.51.100.1 description merge neighbor
+ # neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+ # neighbor 198.51.100.1 route-map test-route out
+
+ - name: "Delete global BGP (Note: This won't delete the configured global BGP)"
+ cisco.ios.ios_bgp_global:
+ config:
+ as_number: 65000
+ state: deleted
+
+ # Commands fired:
+ # ---------------
+ # "commands": [
+ # "router bgp 65000",
+ # "no bgp dampening 1 1 1 1",
+ # "no bgp graceful-shutdown all neighbors 50 community 100 local-preference 100",
+ # "no bgp advertise-best-external",
+ # "no bgp bestpath compare-routerid",
+ # "no bgp nopeerup-delay post-boot 10",
+ # "no neighbor 198.51.100.1 remote-as 100",
+ # "no neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
+ # "no neighbor 198.51.100.1 description merge neighbor",
+ # "no neighbor 198.51.100.1 route-map test-route out"
+ # ]
+
+
+ # After state:
+ # -------------
+ #
+ # vios#sh running-config | section ^router bgp
+ # router bgp 65000
+
+
+ # Using Deleted without any config passed
+ #"(NOTE: This will delete all of configured global BGP)"
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | section ^router bgp
+ # router bgp 65000
+ # bgp nopeerup-delay post-boot 10
+ # bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+ # bgp bestpath compare-routerid
+ # bgp dampening 1 1 1 1
+ # bgp advertise-best-external
+ # neighbor 198.51.100.1 remote-as 100
+ # neighbor 198.51.100.1 description merge neighbor
+ # neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+ # neighbor 198.51.100.1 route-map test-route out
+
+
+ - name: "Delete global BGP without config"
+ cisco.ios.ios_bgp_global:
+ state: deleted
+
+ # Commands fired:
+ # ---------------
+ # "commands": [
+ # "router bgp 65000",
+ # "no bgp dampening 1 1 1 1",
+ # "no bgp graceful-shutdown all neighbors 50 community 100 local-preference 100",
+ # "no bgp advertise-best-external",
+ # "no bgp bestpath compare-routerid",
+ # "no bgp nopeerup-delay post-boot 10",
+ # "no neighbor 198.51.100.1 remote-as 100",
+ # "no neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
+ # "no neighbor 198.51.100.1 description merge neighbor",
+ # "no neighbor 198.51.100.1 route-map test-route out"
+ # ]
+
+
+ # After state:
+ # -------------
+ #
+ # vios#sh running-config | section ^router bgp
+ # router bgp 65000
+
+ # Using Purged
+ #"(NOTE: This WILL delete the configured global BGP)"
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | section ^router bgp
+ # router bgp 65000
+ # bgp nopeerup-delay post-boot 10
+ # bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+ # bgp bestpath compare-routerid
+ # bgp dampening 1 1 1 1
+ # bgp advertise-best-external
+ # neighbor 198.51.100.1 remote-as 100
+ # neighbor 198.51.100.1 description merge neighbor
+ # neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+ # neighbor 198.51.100.1 route-map test-route out
+
+
+ - name: 'Delete the configured global BGP (Note: This WILL delete the the configured
+ global BGP)'
+ cisco.ios.ios_bgp_global:
+ state: purged
+
+ # Commands fired:
+ # ---------------
+ # "commands": [
+ # "no router bgp 65000",
+ # ]
+
+ # After state:
+ # -------------
+ #
+ # vios#sh running-config | section ^router bgp
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | section ^router bgp
+ # router bgp 65000
+ # bgp nopeerup-delay post-boot 10
+ # bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+ # bgp bestpath compare-routerid
+ # bgp dampening 1 1 1 1
+ # bgp advertise-best-external
+ # neighbor 198.51.100.1 remote-as 100
+ # neighbor 198.51.100.1 description merge neighbor
+ # neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+ # neighbor 198.51.100.1 route-map test-route out
+
+
+ - name: Gather listed global BGP with provided configurations
+ cisco.ios.ios_bgp_global:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": {
+ # "as_number": "65000",
+ # "bgp": {
+ # "advertise_best_external": true,
+ # "bestpath": [
+ # {
+ # "compare_routerid": true
+ # }
+ # ],
+ # "dampening": {
+ # "max_suppress": 1,
+ # "penalty_half_time": 1,
+ # "reuse_route_val": 1,
+ # "suppress_route_val": 1
+ # },
+ # "graceful_shutdown": {
+ # "community": "100",
+ # "local_preference": 100,
+ # "neighbors": {
+ # "time": 50
+ # }
+ # },
+ # "nopeerup_delay": [
+ # {
+ # "post_boot": 10
+ # }
+ # ]
+ # },
+ # "neighbor": [
+ # {
+ # "address": "198.51.100.1",
+ # "aigp": {
+ # "send": {
+ # "cost_community": {
+ # "id": 100,
+ # "poi": {
+ # "igp_cost": true,
+ # "transitive": true
+ # }
+ # }
+ # }
+ # },
+ # "description": "merge neighbor",
+ # "remote_as": 100,
+ # "route_map": {
+ # "name": "test-route",
+ # "out": true
+ # }
+ # }
+ # ]
+ # }
+
+ # Using Rendered
+
+ - name: Rendered the provided configuration with the exisiting running configuration
+ cisco.ios.ios_bgp_global:
+ config:
+ as_number: 65000
+ bgp:
+ advertise_best_external: true
+ bestpath:
+ - compare_routerid: true
+ nopeerup_delay:
+ - post_boot: 10
+ dampening:
+ penalty_half_time: 1
+ reuse_route_val: 1
+ suppress_route_val: 1
+ max_suppress: 1
+ graceful_shutdown:
+ neighbors:
+ time: 50
+ community: 100
+ local_preference: 100
+ neighbor:
+ - address: 198.51.100.1
+ description: merge neighbor
+ remote_as: 100
+ aigp:
+ send:
+ cost_community:
+ id: 100
+ poi:
+ igp_cost: true
+ transitive: true
+ route_map:
+ name: test-route
+ out: true
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "router bgp 65000",
+ # "bgp dampening 1 1 1 1",
+ # "bgp graceful-shutdown all neighbors 50 community 100 local-preference 100",
+ # "bgp advertise-best-external",
+ # "bgp nopeerup-delay post-boot 10",
+ # "bgp bestpath compare-routerid",
+ # "neighbor 198.51.100.1 remote-as 100",
+ # "neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
+ # "neighbor 198.51.100.1 description merge neighbor",
+ # "neighbor 198.51.100.1 route-map test-route out"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # router bgp 65000
+ # bgp nopeerup-delay post-boot 10
+ # bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+ # bgp bestpath compare-routerid
+ # bgp dampening 1 1 1 1
+ # bgp advertise-best-external
+ # neighbor 198.51.100.1 remote-as 100
+ # neighbor 198.51.100.1 description merge neighbor
+ # neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+ # neighbor 198.51.100.1 route-map test-route out
+
+ - name: Parse the commands for provided configuration
+ cisco.ios.ios_bgp_global:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": {
+ # "as_number": "65000",
+ # "bgp": {
+ # "advertise_best_external": true,
+ # "bestpath": [
+ # {
+ # "compare_routerid": true
+ # }
+ # ],
+ # "dampening": {
+ # "max_suppress": 1,
+ # "penalty_half_time": 1,
+ # "reuse_route_val": 1,
+ # "suppress_route_val": 1
+ # },
+ # "graceful_shutdown": {
+ # "community": "100",
+ # "local_preference": 100,
+ # "neighbors": {
+ # "time": 50
+ # }
+ # },
+ # "nopeerup_delay": [
+ # {
+ # "post_boot": 10
+ # }
+ # ]
+ # },
+ # "neighbor": [
+ # {
+ # "address": "198.51.100.1",
+ # "aigp": {
+ # "send": {
+ # "cost_community": {
+ # "id": 100,
+ # "poi": {
+ # "igp_cost": true,
+ # "transitive": true
+ # }
+ # }
+ # }
+ # },
+ # "description": "merge neighbor",
+ # "remote_as": 100,
+ # "route_map": {
+ # "name": "test-route",
+ # "out": true
+ # }
+ # }
+ # ]
+ # }
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router bgp 65000&#x27;, &#x27;bgp nopeerup-delay post-boot 10&#x27;, &#x27;bgp advertise-best-external&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_bgp_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_bgp_module.rst
new file mode 100644
index 00000000..ecab4da5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_bgp_module.rst
@@ -0,0 +1,1131 @@
+.. _cisco.ios.ios_bgp_module:
+
+
+*****************
+cisco.ios.ios_bgp
+*****************
+
+**Configure global BGP protocol settings on Cisco IOS.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides configuration management of global BGP parameters on devices running Cisco IOS
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="4">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the BGP related configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_family</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies BGP address family related configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Type of address family to configure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable automatic network number summarization.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbors</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies BGP neighbor related configurations in Address Family configuration mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>activate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable the Address Family for this Neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertisement_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum interval between sending BGP routing updates for this neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum_prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of prefixes to accept from this peer.</div>
+ <div>The range is from 1 to 2147483647.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor router address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hop_self</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable the next hop calculation for this neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hop_unchanged</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Propagate next hop unchanged for iBGP paths to this neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_list_in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of ip prefix-list to apply to incoming prefixes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_list_out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of ip prefix-list to apply to outgoing prefixes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remove_private_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Remove the private AS number from outbound updates.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_reflector_client</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify a neighbor as a route reflector client.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_server_client</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify a neighbor as a route server client.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>networks</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Networks to announce via BGP.</div>
+ <div>For operation replace, this option is mutually exclusive with root level networks option.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>masklen</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Subnet mask length for the Network to announce(e.g, 8, 16, 24, etc.).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network ID to announce via BGP.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map to modify the attributes.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redistribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the redistribute information from another routing protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Identifier for the routing protocol for configuring redistribute information.</div>
+ <div>Valid for protocols &#x27;ospf&#x27;, &#x27;ospfv3&#x27; and &#x27;eigrp&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the metric for redistributed routes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ospf</li>
+ <li>ospfv3</li>
+ <li>eigrp</li>
+ <li>isis</li>
+ <li>static</li>
+ <li>connected</li>
+ <li>odr</li>
+ <li>lisp</li>
+ <li>mobile</li>
+ <li>rip</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the protocol for configuring redistribute information.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the route map reference.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>safi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>flowspec</li>
+ <li><div style="color: blue"><b>unicast</b>&nbsp;&larr;</div></li>
+ <li>multicast</li>
+ <li>labeled-unicast</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the type of cast for the address family.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>synchronization</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable IGP synchronization.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bgp_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the BGP Autonomous System (AS) number to configure on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_neighbor_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable logging neighbor up/down and reset reason.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbors</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies BGP neighbor related configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor specific description.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ebgp_multihop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the maximum hop count for EBGP neighbors not on directly connected networks.</div>
+ <div>The range is from 1 to 255.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administratively shutdown or enable a neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The local AS number for the neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor router address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Password to authenticate the BGP peer connection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the peer group that the neighbor is a member of.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remote_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Remote AS of the BGP neighbor to configure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies BGP neighbor timer related configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interval (in seconds) after not receiving a keepalive message that IOS declares a peer dead.</div>
+ <div>The range is from 0 to 65535.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keepalive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Frequency (in seconds) with which the device sends keepalive messages to its peer.</div>
+ <div>The range is from 0 to 65535.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_neighbor_holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interval (in seconds) specifying the minimum acceptable hold-time from a BGP neighbor.</div>
+ <div>The minimum acceptable hold-time must be less than, or equal to, the interval specified in the holdtime argument.</div>
+ <div>The range is from 0 to 65535.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source of the routing updates.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>networks</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Networks to announce via BGP.</div>
+ <div>For operation replace, this option is mutually exclusive with networks option under address_family.</div>
+ <div>For operation replace, if the device already has an address family activated, this option is not allowed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>masklen</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Subnet mask length for the Network to announce(e.g, 8, 16, 24, etc.).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network ID to announce via BGP.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map to modify the attributes.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">null</div>
+ </td>
+ <td>
+ <div>Configures the BGP routing process router-id value.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>operation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merge</b>&nbsp;&larr;</div></li>
+ <li>replace</li>
+ <li>override</li>
+ <li>delete</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the operation to be performed on the BGP process configured on the device.</div>
+ <div>In case of merge, the input configuration will be merged with the existing BGP configuration on the device.</div>
+ <div>In case of replace, if there is a diff between the existing configuration and the input configuration, the existing configuration will be replaced by the input configuration for every option that has the diff.</div>
+ <div>In case of override, all the existing BGP configuration will be removed from the device and replaced with the input configuration.</div>
+ <div>In case of delete the existing BGP configuration will be removed from the device.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOS Version 15.6(3)M2
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure global bgp as 64496
+ cisco.ios.ios_bgp:
+ config:
+ bgp_as: 64496
+ router_id: 192.0.2.1
+ log_neighbor_changes: true
+ neighbors:
+ - neighbor: 203.0.113.5
+ remote_as: 64511
+ timers:
+ keepalive: 300
+ holdtime: 360
+ min_neighbor_holdtime: 360
+ - neighbor: 198.51.100.2
+ remote_as: 64498
+ networks:
+ - prefix: 198.51.100.0
+ route_map: RMAP_1
+ - prefix: 192.0.2.0
+ masklen: 23
+ address_family:
+ - afi: ipv4
+ safi: unicast
+ redistribute:
+ - protocol: ospf
+ id: 223
+ metric: 10
+ operation: merge
+
+ - name: Configure BGP neighbors
+ cisco.ios.ios_bgp:
+ config:
+ bgp_as: 64496
+ neighbors:
+ - neighbor: 192.0.2.10
+ remote_as: 64496
+ password: ansible
+ description: IBGP_NBR_1
+ ebgp_multihop: 100
+ timers:
+ keepalive: 300
+ holdtime: 360
+ min_neighbor_holdtime: 360
+ - neighbor: 192.0.2.15
+ remote_as: 64496
+ description: IBGP_NBR_2
+ ebgp_multihop: 150
+ operation: merge
+
+ - name: Configure root-level networks for BGP
+ cisco.ios.ios_bgp:
+ config:
+ bgp_as: 64496
+ networks:
+ - prefix: 203.0.113.0
+ masklen: 27
+ route_map: RMAP_1
+ - prefix: 203.0.113.32
+ masklen: 27
+ route_map: RMAP_2
+ operation: merge
+
+ - name: Configure BGP neighbors under address family mode
+ cisco.ios.ios_bgp:
+ config:
+ bgp_as: 64496
+ address_family:
+ - afi: ipv4
+ safi: unicast
+ neighbors:
+ - neighbor: 203.0.113.10
+ activate: yes
+ maximum_prefix: 250
+ advertisement_interval: 120
+ - neighbor: 192.0.2.15
+ activate: yes
+ route_reflector_client: true
+ operation: merge
+
+ - name: remove bgp as 64496 from config
+ cisco.ios.ios_bgp:
+ config:
+ bgp_as: 64496
+ operation: delete
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router bgp 64496&#x27;, &#x27;bgp router-id 192.0.2.1&#x27;, &#x27;bgp log-neighbor-changes&#x27;, &#x27;neighbor 203.0.113.5 remote-as 64511&#x27;, &#x27;neighbor 203.0.113.5 timers 300 360 360&#x27;, &#x27;neighbor 198.51.100.2 remote-as 64498&#x27;, &#x27;network 198.51.100.0 route-map RMAP_1&#x27;, &#x27;network 192.0.2.0 mask 255.255.254.0&#x27;, &#x27;address-family ipv4&#x27;, &#x27;redistribute ospf 223 metric 70&#x27;, &#x27;exit-address-family&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@NilashishC)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_cliconf.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_cliconf.rst
new file mode 100644
index 00000000..0b9ed642
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_cliconf.rst
@@ -0,0 +1,43 @@
+.. _cisco.ios.ios_cliconf:
+
+
+*************
+cisco.ios.ios
+*************
+
+**Use ios cliconf to run command on Cisco IOS platform**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This ios plugin provides low level abstraction apis for sending and receiving CLI commands from Cisco IOS network devices.
+
+
+
+
+
+
+
+
+
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Ansible Networking Team
+
+
+.. hint::
+ Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_command_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_command_module.rst
new file mode 100644
index 00000000..87d3acd4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_command_module.rst
@@ -0,0 +1,404 @@
+.. _cisco.ios.ios_command_module:
+
+
+*********************
+cisco.ios.ios_command
+*********************
+
+**Run commands on remote devices running Cisco IOS**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Sends arbitrary commands to an ios node and returns the results read from the device. This module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
+- This module does not support running commands in configuration mode. Please use :ref:`ios_config <ios_config_module>` to configure IOS devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of commands to send to the remote ios device over the configured provider. The resulting output from the command is returned. If the <em>wait_for</em> argument is provided, the module is not returned until the condition is satisfied or the number of retries has expired. If a command sent to the device requires answering a prompt, it is possible to pass a dict containing <em>command</em>, <em>answer</em> and <em>prompt</em>. Common answers are &#x27;y&#x27; or &quot;\r&quot; (carriage return, must be double quotes). See examples.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">1</div>
+ </td>
+ <td>
+ <div>Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditions, the interval indicates how long to wait before trying the command again.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>any</li>
+ <li><div style="color: blue"><b>all</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>The <em>match</em> argument is used in conjunction with the <em>wait_for</em> argument to specify the match policy. Valid values are <code>all</code> or <code>any</code>. If the value is set to <code>all</code> then all conditionals in the wait_for must be satisfied. If the value is set to <code>any</code> then only one of the values must be satisfied.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retries</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">10</div>
+ </td>
+ <td>
+ <div>Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the <em>wait_for</em> conditions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: waitfor</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.6
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: run show version on remote devices
+ cisco.ios.ios_command:
+ commands: show version
+
+ - name: run show version and check to see if output contains IOS
+ cisco.ios.ios_command:
+ commands: show version
+ wait_for: result[0] contains IOS
+
+ - name: run multiple commands on remote nodes
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ - show interfaces
+
+ - name: run multiple commands and evaluate the output
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ - show interfaces
+ wait_for:
+ - result[0] contains IOS
+ - result[1] contains Loopback0
+
+ - name: run commands that require answering a prompt
+ cisco.ios.ios_command:
+ commands:
+ - command: clear counters GigabitEthernet0/1
+ prompt: Clear "show interface" counters on this interface [confirm]
+ answer: y
+ - command: clear counters GigabitEthernet0/2
+ prompt: '[confirm]'
+ answer: '
+ '
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>failed_conditions</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>failed</td>
+ <td>
+ <div>The list of conditionals that have failed</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;...&#x27;, &#x27;...&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>stdout</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always apart from low level errors (such as action plugin)</td>
+ <td>
+ <div>The set of responses from the commands</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;...&#x27;, &#x27;...&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>stdout_lines</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always apart from low level errors (such as action plugin)</td>
+ <td>
+ <div>The value of stdout split into a list</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[[&#x27;...&#x27;, &#x27;...&#x27;], [&#x27;...&#x27;], [&#x27;...&#x27;]]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_config_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_config_module.rst
new file mode 100644
index 00000000..13e89caf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_config_module.rst
@@ -0,0 +1,755 @@
+.. _cisco.ios.ios_config_module:
+
+
+********************
+cisco.ios.ios_config
+********************
+
+**Manage Cisco IOS configuration sections**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Cisco IOS configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with IOS configuration sections in a deterministic way.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with <em>before</em> this allows the playbook designer to append a set of commands to be executed after the command set.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>backup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>This argument will cause the module to create a full backup of the current <code>running-config</code> from the remote device before any changes are made. If the <code>backup_options</code> value is not given, the backup file is written to the <code>backup</code> folder in the playbook root directory or role root directory, if playbook is part of an ansible role. If the directory does not exist, it is created.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>backup_options</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This is a dict object containing configurable options related to backup file path. The value of this option is read only when <code>backup</code> is set to <em>yes</em>, if <code>backup</code> is set to <em>no</em> this option will be silently ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dir_path</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of <code>filename</code> or default filename as described in <code>filename</code> options description. If the path value is not given in that case a <em>backup</em> directory will be created in the current working directory and backup configuration will be copied in <code>filename</code> within <em>backup</em> directory.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filename</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by &lt;hostname&gt;_config.&lt;current-date&gt;@&lt;current-time&gt;</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>defaults</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>This argument specifies whether or not to collect all defaults when getting the remote device running config. When enabled, the module will get the current config by issuing the command <code>show running-config all</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>diff_against</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>running</li>
+ <li>startup</li>
+ <li>intended</li>
+ </ul>
+ </td>
+ <td>
+ <div>When using the <code>ansible-playbook --diff</code> command line argument the module can generate diffs against different sources.</div>
+ <div>When this option is configure as <em>startup</em>, the module will return the diff of the running-config against the startup-config.</div>
+ <div>When this option is configured as <em>intended</em>, the module will return the diff of the running-config against the configuration provided in the <code>intended_config</code> argument.</div>
+ <div>When this option is configured as <em>running</em>, the module will return the before and after diff of the running-config with respect to any changes made to the device configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>diff_ignore_lines</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use this argument to specify one or more lines that should be ignored during the diff. This is used for lines in the configuration that are automatically updated by the system. This argument takes a list of regular expressions or exact line matches.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>intended_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <code>intended_config</code> provides the master configuration that the node should conform to and is used to check the final running-config against. This argument will not modify any settings on the remote device and is strictly used to check the compliance of the current device&#x27;s configuration against. When specifying this argument, the task should also modify the <code>diff_against</code> value and set it to <em>intended</em>. The configuration lines for this value should be similar to how it will appear if present in the running-configuration of the device including the indentation to ensure correct diff.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lines</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config to ensure idempotency and correct diff. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: commands</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>line</b>&nbsp;&larr;</div></li>
+ <li>strict</li>
+ <li>exact</li>
+ <li>none</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to <em>line</em>, commands are matched line by line. If match is set to <em>strict</em>, command lines are matched with respect to position. If match is set to <em>exact</em>, command lines must be an equal match. Finally, if match is set to <em>none</em>, the module will not attempt to compare the source configuration with the running configuration on the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multiline_delimiter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"@"</div>
+ </td>
+ <td>
+ <div>This argument is used when pushing a multiline configuration element to the IOS device. It specifies the character to use as the delimiting character. This only applies to the configuration action.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parents</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>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.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>replace</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>line</b>&nbsp;&larr;</div></li>
+ <li>block</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module on the way to perform the configuration on the device. If the replace argument is set to <em>line</em> then the modified lines are pushed to the device in configuration mode. If the replace argument is set to <em>block</em> then the entire command block is pushed to the device in configuration mode if any line is not correct.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The <em>running_config</em> argument allows the implementer to pass in the configuration to use as the base config for comparison. The configuration lines for this option should be similar to how it will appear if present in the running-configuration of the device including the indentation to ensure idempotency and correct diff.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: config</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>save_when</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>always</li>
+ <li><div style="color: blue"><b>never</b>&nbsp;&larr;</div></li>
+ <li>modified</li>
+ <li>changed</li>
+ </ul>
+ </td>
+ <td>
+ <div>When changes are made to the device running-configuration, the changes are not copied to non-volatile storage by default. Using this argument will change that before. If the argument is set to <em>always</em>, then the running-config will always be copied to the startup-config and the <em>modified</em> flag will always be set to True. If the argument is set to <em>modified</em>, then the running-config will only be copied to the startup-config if it has changed since the last save to startup-config. If the argument is set to <em>never</em>, the running-config will never be copied to the startup-config. If the argument is set to <em>changed</em>, then the running-config will only be copied to the startup-config if the task has made a change. <em>changed</em> was added in Ansible 2.5.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>src</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with <em>lines</em>, <em>parents</em>. The configuration lines in the source file should be similar to how it will appear if present in the running-configuration of the device including the indentation to ensure idempotency and correct diff.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.6
+ - Abbreviated commands are NOT idempotent, see L (Network FAQ,../network/user_guide/faq.html#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands).
+ - To ensure idempotency and correct diff the configuration lines in the relevant module options should be similar to how they appear if present in the running configuration on device including the indentation.
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure top level configuration
+ cisco.ios.ios_config:
+ lines: hostname {{ inventory_hostname }}
+
+ - name: configure interface settings
+ cisco.ios.ios_config:
+ lines:
+ - description test interface
+ - ip address 172.31.1.1 255.255.255.0
+ parents: interface Ethernet1
+
+ - name: configure ip helpers on multiple interfaces
+ cisco.ios.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
+ cisco.ios.ios_config:
+ lines:
+ - conform-action transmit
+ - exceed-action drop
+ parents:
+ - policy-map Foo
+ - class Scavenger
+ - police cir 64000
+
+ - name: load new acl into device
+ cisco.ios.ios_config:
+ lines:
+ - 10 permit ip host 192.0.2.1 any log
+ - 20 permit ip host 192.0.2.2 any log
+ - 30 permit ip host 192.0.2.3 any log
+ - 40 permit ip host 192.0.2.4 any log
+ - 50 permit ip host 192.0.2.5 any log
+ parents: ip access-list extended test
+ before: no ip access-list extended test
+ match: exact
+
+ - name: check the running-config against master config
+ cisco.ios.ios_config:
+ diff_against: intended
+ intended_config: "{{ lookup('file', 'master.cfg') }}"
+
+ - name: check the startup-config against the running-config
+ cisco.ios.ios_config:
+ diff_against: startup
+ diff_ignore_lines:
+ - ntp clock .*
+
+ - name: save running to startup when modified
+ cisco.ios.ios_config:
+ save_when: modified
+
+ - name: for idempotency, use full-form commands
+ cisco.ios.ios_config:
+ lines:
+ # - shut
+ - shutdown
+ # parents: int gig1/0/11
+ parents: interface GigabitEthernet1/0/11
+
+ # Set boot image based on comparison to a group_var (version) and the version
+ # that is returned from the `ios_facts` module
+ - name: SETTING BOOT IMAGE
+ cisco.ios.ios_config:
+ lines:
+ - no boot system
+ - boot system flash bootflash:{{new_image}}
+ host: '{{ inventory_hostname }}'
+ when: ansible_net_version != version
+ - name: render a Jinja2 template onto an IOS device
+ cisco.ios.ios_config:
+ backup: yes
+ src: ios_template.j2
+
+ - name: configurable backup path
+ cisco.ios.ios_config:
+ src: ios_template.j2
+ backup: yes
+ backup_options:
+ filename: backup.cfg
+ dir_path: /home/user
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>backup_path</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes</td>
+ <td>
+ <div>The full path to the backup file</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/playbooks/ansible/backup/ios_config.2016-07-16@22:28:34</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands that will be pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;hostname foo&#x27;, &#x27;router ospf 1&#x27;, &#x27;router-id 192.0.2.1&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>date</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes</td>
+ <td>
+ <div>The date extracted from the backup file name</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">2016-07-16</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>filename</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes and filename is not specified in backup options</td>
+ <td>
+ <div>The name of the backup file</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">ios_config.2016-07-16@22:28:34</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>shortname</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes and filename is not specified in backup options</td>
+ <td>
+ <div>The full path to the backup file excluding the timestamp</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/playbooks/ansible/backup/ios_config</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>time</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes</td>
+ <td>
+ <div>The time extracted from the backup file name</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">22:28:34</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands that will be pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;hostname foo&#x27;, &#x27;router ospf 1&#x27;, &#x27;router-id 192.0.2.1&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_facts_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_facts_module.rst
new file mode 100644
index 00000000..9722bf18
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_facts_module.rst
@@ -0,0 +1,626 @@
+.. _cisco.ios.ios_facts_module:
+
+
+*******************
+cisco.ios.ios_facts
+*******************
+
+**Collect facts from remote devices running Cisco IOS**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Collects a base set of device facts from a remote device that is running IOS. This module prepends all of the base network fact keys with ``ansible_net_<fact>``. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gather_network_resources</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>When supplied, this argument will restrict the facts collected 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. Values can also be used with an initial <code><span class='module'>!</span></code> to specify that a specific subset should not be collected. Valid subsets are &#x27;all&#x27;, &#x27;interfaces&#x27;, &#x27;l2_interfaces&#x27;, &#x27;vlans&#x27;, &#x27;lag_interfaces&#x27;, &#x27;lacp&#x27;, &#x27;lacp_interfaces&#x27;, &#x27;lldp_global&#x27;, &#x27;lldp_interfaces&#x27;, &#x27;l3_interfaces&#x27;, &#x27;acl_interfaces&#x27;, &#x27;static_routes&#x27;, &#x27;acls&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gather_subset</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"!config"</div>
+ </td>
+ <td>
+ <div>When supplied, this argument restricts the facts collected to a given subset.</div>
+ <div>Possible values for this argument include <code>all</code>, <code>min</code>, <code>hardware</code>, <code>config</code>, and <code>interfaces</code>.</div>
+ <div>Specify a list of values to include a larger subset.</div>
+ <div>Use a value with an initial <code>!</code> to collect all facts except that subset.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.6
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Gather all legacy facts
+ cisco.ios.ios_facts:
+ gather_subset: all
+
+ - name: Gather only the config and default facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - config
+
+ - name: Do not gather hardware facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!hardware'
+
+ - name: Gather legacy and resource facts
+ cisco.ios.ios_facts:
+ gather_subset: all
+ gather_network_resources: all
+
+ - name: Gather only the interfaces resource facts and no legacy facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - interfaces
+
+ - name: Gather interfaces resource and minimal legacy facts
+ cisco.ios.ios_facts:
+ gather_subset: min
+ gather_network_resources: interfaces
+
+ - name: Gather L2 interfaces resource and minimal legacy facts
+ cisco.ios.ios_facts:
+ gather_subset: min
+ gather_network_resources: l2_interfaces
+
+ - name: Gather L3 interfaces resource and minimal legacy facts
+ cisco.ios.ios_facts:
+ gather_subset: min
+ gather_network_resources: l3_interfaces
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_all_ipv4_addresses</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when interfaces is configured</td>
+ <td>
+ <div>All IPv4 addresses configured on the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_all_ipv6_addresses</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when interfaces is configured</td>
+ <td>
+ <div>All IPv6 addresses configured on the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_api</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The name of the transport</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_config</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when config is configured</td>
+ <td>
+ <div>The current active config from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_filesystems</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>All file system names available on the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_filesystems_info</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>A hash of all file systems containing info about each file system (e.g. free and total space)</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_gather_network_resources</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when the resource is configured</td>
+ <td>
+ <div>The list of fact for network resource subsets collected from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_gather_subset</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of fact subsets collected from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_hostname</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configured hostname of the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_image</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The image file the device is running</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_interfaces</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when interfaces is configured</td>
+ <td>
+ <div>A hash of all interfaces running on the system</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_iostype</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The operating system type (IOS or IOS-XE) running on the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_memfree_mb</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>The available free memory on the remote device in Mb</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_memtotal_mb</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>The total memory on the remote device in Mb</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_model</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The model name returned from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_neighbors</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when interfaces is configured</td>
+ <td>
+ <div>The list of CDP and LLDP neighbors from the remote device. If both, CDP and LLDP neighbor data is present on one port, CDP is preferred.</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_python_version</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The Python version Ansible controller is using</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_serialnum</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The serial number of the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_stacked_models</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when multiple devices are configured in a stack</td>
+ <td>
+ <div>The model names of each device in the stack</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_stacked_serialnums</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when multiple devices are configured in a stack</td>
+ <td>
+ <div>The serial numbers of each device in the stack</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_version</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The operating system version running on the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip)
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_interface_module.rst
new file mode 100644
index 00000000..66417786
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_interface_module.rst
@@ -0,0 +1,789 @@
+.. _cisco.ios.ios_interface_module:
+
+
+***********************
+cisco.ios.ios_interface
+***********************
+
+**(deprecated, removed after 2022-06-01) Manage Interface on Cisco IOS network devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Newer and updated modules released with more functionality in Ansible 2.9
+:Alternative: ios_interfaces
+
+
+
+Synopsis
+--------
+- This module provides declarative management of Interfaces on Cisco IOS network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of Interfaces definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state argument which are <em>state</em> with values <code>up</code>/<code>down</code>, <em>tx_rate</em> and <em>rx_rate</em>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Description of Interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>duplex</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>full</li>
+ <li>half</li>
+ <li>auto</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interface link status</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interface link status.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum size of transmit packet.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the Interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbors</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Check the operational state of given interface <code>name</code> for CDP/LLDP neighbor.</div>
+ <div>The following suboptions are available.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>CDP/LLDP neighbor host for given interface <code>name</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>CDP/LLDP neighbor port to which given interface <code>name</code> is connected.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rx_rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Receiver rate in bits per second (bps).</div>
+ <div>This is state check parameter only.</div>
+ <div>Supports conditionals, see <a href='../network/user_guide/network_working_with_command_output.html'>Conditionals in Networking Modules</a></div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>speed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface link speed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ <li>up</li>
+ <li>down</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the Interface configuration, <code>up</code> means present and operationally up and <code>down</code> means present and operationally <code>down</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tx_rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Transmit rate in bits per second (bps).</div>
+ <div>This is state check parameter only.</div>
+ <div>Supports conditionals, see <a href='../network/user_guide/network_working_with_command_output.html'>Conditionals in Networking Modules</a></div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">10</div>
+ </td>
+ <td>
+ <div>Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state argument which are <em>state</em> with values <code>up</code>/<code>down</code>, <em>tx_rate</em> and <em>rx_rate</em>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Description of Interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>duplex</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>full</li>
+ <li>half</li>
+ <li>auto</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interface link status</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Interface link status.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum size of transmit packet.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the Interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbors</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Check the operational state of given interface <code>name</code> for CDP/LLDP neighbor.</div>
+ <div>The following suboptions are available.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>CDP/LLDP neighbor host for given interface <code>name</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>CDP/LLDP neighbor port to which given interface <code>name</code> is connected.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rx_rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Receiver rate in bits per second (bps).</div>
+ <div>This is state check parameter only.</div>
+ <div>Supports conditionals, see <a href='../network/user_guide/network_working_with_command_output.html'>Conditionals in Networking Modules</a></div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>speed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface link speed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ <li>up</li>
+ <li>down</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the Interface configuration, <code>up</code> means present and operationally up and <code>down</code> means present and operationally <code>down</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tx_rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Transmit rate in bits per second (bps).</div>
+ <div>This is state check parameter only.</div>
+ <div>Supports conditionals, see <a href='../network/user_guide/network_working_with_command_output.html'>Conditionals in Networking Modules</a></div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.6
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure interface
+ cisco.ios.ios_interface:
+ name: GigabitEthernet0/2
+ description: test-interface
+ speed: 100
+ duplex: half
+ mtu: 512
+
+ - name: remove interface
+ cisco.ios.ios_interface:
+ name: Loopback9
+ state: absent
+
+ - name: make interface up
+ cisco.ios.ios_interface:
+ name: GigabitEthernet0/2
+ enabled: true
+
+ - name: make interface down
+ cisco.ios.ios_interface:
+ name: GigabitEthernet0/2
+ enabled: false
+
+ - name: Check intent arguments
+ cisco.ios.ios_interface:
+ name: GigabitEthernet0/2
+ state: up
+ tx_rate: ge(0)
+ rx_rate: le(0)
+
+ - name: Check neighbors intent arguments
+ cisco.ios.ios_interface:
+ name: Gi0/0
+ neighbors:
+ - port: eth0
+ host: netdev
+
+ - name: Config + intent
+ cisco.ios.ios_interface:
+ name: GigabitEthernet0/2
+ enabled: false
+ state: down
+
+ - name: Add interface using aggregate
+ cisco.ios.ios_interface:
+ aggregate:
+ - {name: GigabitEthernet0/1, mtu: 256, description: test-interface-1}
+ - {name: GigabitEthernet0/2, mtu: 516, description: test-interface-2}
+ duplex: full
+ speed: 100
+ state: present
+
+ - name: Delete interface using aggregate
+ cisco.ios.ios_interface:
+ aggregate:
+ - name: Loopback9
+ - name: Loopback10
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always, except for the platforms that use Netconf transport to manage the device.</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/2&#x27;, &#x27;description test-interface&#x27;, &#x27;duplex half&#x27;, &#x27;mtu 512&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Ganesh Nalawade (@ganeshrn)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_interfaces_module.rst
new file mode 100644
index 00000000..afe59318
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_interfaces_module.rst
@@ -0,0 +1,700 @@
+.. _cisco.ios.ios_interfaces_module:
+
+
+************************
+cisco.ios.ios_interfaces
+************************
+
+**Interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages the interface attributes of Cisco IOS network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of interface options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface description.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>duplex</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>full</li>
+ <li>half</li>
+ <li>auto</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interface link status. Applicable for Ethernet interfaces only, either in half duplex, full duplex or in automatic state which negotiates the duplex automatically.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Administrative state of the interface.</div>
+ <div>Set the value to <code>true</code> to administratively enable the interface or <code>false</code> to disable it.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MTU for a specific interface. Applicable for Ethernet interfaces only.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of interface, e.g. GigabitEthernet0/2, loopback999.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>speed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface link speed. Applicable for Ethernet interfaces only.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>show running-config | section ^interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # no ip address
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # no ip address
+ # duplex auto
+ # speed auto
+
+ - name: Merge provided configuration with device configuration
+ cisco.ios.ios_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ description: Configured and Merged by Ansible Network
+ enabled: true
+ - name: GigabitEthernet0/3
+ description: Configured and Merged by Ansible Network
+ mtu: 2800
+ enabled: false
+ speed: 100
+ duplex: full
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description Configured and Merged by Ansible Network
+ # no ip address
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # description Configured and Merged by Ansible Network
+ # mtu 2800
+ # no ip address
+ # shutdown
+ # duplex full
+ # speed 100
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description Configured by Ansible Network
+ # no ip address
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # mtu 2000
+ # no ip address
+ # shutdown
+ # duplex full
+ # speed 100
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ cisco.ios.ios_interfaces:
+ config:
+ - name: GigabitEthernet0/3
+ description: Configured and Replaced by Ansible Network
+ enabled: false
+ duplex: auto
+ mtu: 2500
+ speed: 1000
+ state: replaced
+
+ # After state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description Configured by Ansible Network
+ # no ip address
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # description Configured and Replaced by Ansible Network
+ # mtu 2500
+ # no ip address
+ # shutdown
+ # duplex full
+ # speed 1000
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface#
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # no ip address
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible
+ # mtu 2800
+ # no ip address
+ # shutdown
+ # duplex full
+ # speed 100
+
+ - name: Override device configuration of all interfaces with provided configuration
+ cisco.ios.ios_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ description: Configured and Overridden by Ansible Network
+ speed: 1000
+ - name: GigabitEthernet0/3
+ description: Configured and Overridden by Ansible Network
+ enabled: false
+ duplex: full
+ mtu: 2000
+ state: overridden
+
+ # After state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description Configured and Overridden by Ansible Network
+ # no ip address
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # description Configured and Overridden by Ansible Network
+ # mtu 2000
+ # no ip address
+ # shutdown
+ # duplex full
+ # speed 100
+
+ # Using Deleted
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description Configured by Ansible Network
+ # no ip address
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # mtu 2500
+ # no ip address
+ # shutdown
+ # duplex full
+ # speed 1000
+
+ - name: "Delete module attributes of given interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # mtu 2500
+ # no ip address
+ # shutdown
+ # duplex full
+ # speed 1000
+
+ # Using Deleted without any config passed
+ #"(NOTE: This will delete all of configured resource module attributes from each configured interface)"
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description Configured by Ansible Network
+ # no ip address
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # mtu 2500
+ # no ip address
+ # shutdown
+ # duplex full
+ # speed 1000
+
+ - name: "Delete module attributes of all interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_interfaces:
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/3
+ # no ip address
+ # duplex auto
+ # speed auto
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description this is interface1
+ # mtu 65
+ # duplex auto
+ # speed 10
+ # interface GigabitEthernet0/2
+ # description this is interface2
+ # mtu 110
+ # shutdown
+ # duplex auto
+ # speed 100
+
+ - name: Gather listed interfaces with provided configurations
+ cisco.ios.ios_interfaces:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "description": "this is interface1",
+ # "duplex": "auto",
+ # "enabled": true,
+ # "mtu": 65,
+ # "name": "GigabitEthernet0/1",
+ # "speed": "10"
+ # },
+ # {
+ # "description": "this is interface2",
+ # "duplex": "auto",
+ # "enabled": false,
+ # "mtu": 110,
+ # "name": "GigabitEthernet0/2",
+ # "speed": "100"
+ # }
+ # ]
+
+ # After state:
+ # ------------
+ #
+ # vios#sh running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description this is interface1
+ # mtu 65
+ # duplex auto
+ # speed 10
+ # interface GigabitEthernet0/2
+ # description this is interface2
+ # mtu 110
+ # shutdown
+ # duplex auto
+ # speed 100
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ description: Configured by Ansible-Network
+ mtu: 110
+ enabled: true
+ duplex: half
+ - name: GigabitEthernet0/2
+ description: Configured by Ansible-Network
+ mtu: 2800
+ enabled: false
+ speed: 100
+ duplex: full
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "interface GigabitEthernet0/1",
+ # "description Configured by Ansible-Network",
+ # "mtu 110",
+ # "duplex half",
+ # "no shutdown",
+ # "interface GigabitEthernet0/2",
+ # "description Configured by Ansible-Network",
+ # "mtu 2800",
+ # "speed 100",
+ # "duplex full",
+ # "shutdown"
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # interface GigabitEthernet0/1
+ # description interfaces 0/1
+ # mtu 110
+ # duplex half
+ # no shutdown
+ # interface GigabitEthernet0/2
+ # description interfaces 0/2
+ # mtu 2800
+ # speed 100
+ # duplex full
+ # shutdown
+
+ - name: Parse the commands for provided configuration
+ cisco.ios.ios_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": [
+ # {
+ # "description": "interfaces 0/1",
+ # "duplex": "half",
+ # "enabled": true,
+ # "mtu": 110,
+ # "name": "GigabitEthernet0/1"
+ # },
+ # {
+ # "description": "interfaces 0/2",
+ # "duplex": "full",
+ # "enabled": true,
+ # "mtu": 2800,
+ # "name": "GigabitEthernet0/2",
+ # "speed": "100"
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet 0/1&#x27;, &#x27;description This is test&#x27;, &#x27;speed 100&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l2_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l2_interface_module.rst
new file mode 100644
index 00000000..af23ae1c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l2_interface_module.rst
@@ -0,0 +1,542 @@
+.. _cisco.ios.ios_l2_interface_module:
+
+
+**************************
+cisco.ios.ios_l2_interface
+**************************
+
+**(deprecated, removed after 2022-06-01) Manage Layer-2 interface on Cisco IOS devices.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Newer and updated modules released with more functionality in Ansible 2.9
+:Alternative: ios_l2_interfaces
+
+
+
+Synopsis
+--------
+- This module provides declarative management of Layer-2 interfaces on Cisco IOS devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>access_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure given VLAN in access port. If <code>mode=access</code>, used as the access VLAN ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of Layer-2 interface definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>access_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure given VLAN in access port. If <code>mode=access</code>, used as the access VLAN ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>access</li>
+ <li>trunk</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mode in which interface needs to be configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>native_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Native VLAN to be configured in trunk port. If <code>mode=trunk</code>, used as the trunk native VLAN ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ <li>unconfigured</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the Layer-2 Interface configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trunk_allowed_vlans</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of allowed VLANs in a given trunk port. If <code>mode=trunk</code>, these are the only VLANs that will be configured on the trunk, i.e. &quot;2-10,15&quot;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trunk_vlans</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of VLANs to be configured in trunk port. If <code>mode=trunk</code>, used as the VLAN range to ADD or REMOVE from the trunk.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>access</li>
+ <li>trunk</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mode in which interface needs to be configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>native_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Native VLAN to be configured in trunk port. If <code>mode=trunk</code>, used as the trunk native VLAN ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ <li>unconfigured</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the Layer-2 Interface configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trunk_allowed_vlans</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of allowed VLANs in a given trunk port. If <code>mode=trunk</code>, these are the only VLANs that will be configured on the trunk, i.e. &quot;2-10,15&quot;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trunk_vlans</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of VLANs to be configured in trunk port. If <code>mode=trunk</code>, used as the VLAN range to ADD or REMOVE from the trunk.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Ensure GigabitEthernet0/5 is in its default l2 interface state
+ ios.ios_l2_interface:
+ name: GigabitEthernet0/5
+ state: unconfigured
+ - name: Ensure GigabitEthernet0/5 is configured for access vlan 20
+ ios.ios_l2_interface:
+ name: GigabitEthernet0/5
+ mode: access
+ access_vlan: 20
+ - name: Ensure GigabitEthernet0/5 only has vlans 5-10 as trunk vlans
+ ios.ios_l2_interface:
+ name: GigabitEthernet0/5
+ mode: trunk
+ native_vlan: 10
+ trunk_allowed_vlans: 5-10
+ - name: Ensure GigabitEthernet0/5 is a trunk port and ensure 2-50 are being tagged
+ (doesn't mean others aren't also being tagged)
+ ios.ios_l2_interface:
+ name: GigabitEthernet0/5
+ mode: trunk
+ native_vlan: 10
+ trunk_vlans: 2-50
+ - name: Ensure these VLANs are not being tagged on the trunk
+ ios.ios_l2_interface:
+ name: GigabitEthernet0/5
+ mode: trunk
+ trunk_vlans: 51-4094
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always, except for the platforms that use Netconf transport to manage the device.</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/5&#x27;, &#x27;switchport access vlan 20&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Nathaniel Case (@Qalthos)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l2_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l2_interfaces_module.rst
new file mode 100644
index 00000000..1472ff3d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l2_interfaces_module.rst
@@ -0,0 +1,750 @@
+.. _cisco.ios.ios_l2_interfaces_module:
+
+
+***************************
+cisco.ios.ios_l2_interfaces
+***************************
+
+**L2 interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of Layer-2 interface on Cisco IOS devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of Layer-2 interface options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>access</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Switchport mode access command to configure the interface as a layer 2 access.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure given VLAN in access port. It&#x27;s used as the access VLAN ID.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>access</li>
+ <li>trunk</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mode in which interface needs to be configured.</div>
+ <div>An interface whose trunk encapsulation is &quot;Auto&quot; can not be configured to &quot;trunk&quot; mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trunk</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Switchport mode trunk command to configure the interface as a Layer 2 trunk. Note The encapsulation is always set to dot1q.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>allowed_vlans</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of allowed VLANs in a given trunk port. These are the only VLANs that will be configured on the trunk.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encapsulation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>dot1q</li>
+ <li>isl</li>
+ <li>negotiate</li>
+ </ul>
+ </td>
+ <td>
+ <div>Trunking encapsulation when interface is in trunking mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>native_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Native VLAN to be configured in trunk port. It&#x27;s used as the trunk native VLAN ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pruning_vlans</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Pruning VLAN to be configured in trunk port. It&#x27;s used as the trunk pruning VLAN ID.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>voice</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Switchport mode voice command to configure the interface with a voice vlan.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure given voice VLAN on access port. It&#x27;s used as the voice VLAN ID.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>show running-config | section ^interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # viosl2#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # negotiation auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # switchport access vlan 20
+ # media-type rj45
+ # negotiation auto
+
+ - name: Merge provided configuration with device configuration
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ mode: access
+ access:
+ vlan: 10
+ voice:
+ vlan: 40
+ - name: GigabitEthernet0/2
+ mode: trunk
+ trunk:
+ allowed_vlans: 10-20,40
+ native_vlan: 20
+ pruning_vlans: 10,20
+ encapsulation: dot1q
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # viosl2#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # switchport access vlan 10
+ # switchport voice vlan 40
+ # switchport mode access
+ # negotiation auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # switchport trunk allowed vlan 10-20,40
+ # switchport trunk encapsulation dot1q
+ # switchport trunk native vlan 20
+ # switchport trunk pruning vlan 10,20
+ # switchport mode trunk
+ # media-type rj45
+ # negotiation auto
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # viosl2#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # switchport access vlan 20
+ # negotiation auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # switchport access vlan 20
+ # media-type rj45
+ # negotiation auto
+
+ - name: Replaces device configuration of listed l2 interfaces with provided configuration
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans: 20-25,40
+ native_vlan: 20
+ pruning_vlans: 10
+ encapsulation: isl
+ state: replaced
+
+ # After state:
+ # -------------
+ #
+ # viosl2#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # switchport access vlan 20
+ # negotiation auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # switchport trunk allowed vlan 20-25,40
+ # switchport trunk encapsulation isl
+ # switchport trunk native vlan 20
+ # switchport trunk pruning vlan 10
+ # media-type rj45
+ # negotiation auto
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # viosl2#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # switchport trunk encapsulation dot1q
+ # switchport trunk native vlan 20
+ # negotiation auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # switchport access vlan 20
+ # switchport trunk encapsulation dot1q
+ # switchport trunk native vlan 20
+ # media-type rj45
+ # negotiation auto
+
+ - name: Override device configuration of all l2 interfaces with provided configuration
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ access:
+ vlan: 20
+ voice:
+ vlan: 40
+ state: overridden
+
+ # After state:
+ # -------------
+ #
+ # viosl2#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # negotiation auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # switchport access vlan 20
+ # switchport voice vlan 40
+ # media-type rj45
+ # negotiation auto
+
+ # Using Deleted
+
+ # Before state:
+ # -------------
+ #
+ # viosl2#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # switchport access vlan 20
+ # negotiation auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # switchport access vlan 20
+ # switchport trunk allowed vlan 20-40,60,80
+ # switchport trunk encapsulation dot1q
+ # switchport trunk native vlan 10
+ # switchport trunk pruning vlan 10
+ # media-type rj45
+ # negotiation auto
+
+ - name: Delete IOS L2 interfaces as in given arguments
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # viosl2#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # negotiation auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # switchport access vlan 20
+ # switchport trunk allowed vlan 20-40,60,80
+ # switchport trunk encapsulation dot1q
+ # switchport trunk native vlan 10
+ # switchport trunk pruning vlan 10
+ # media-type rj45
+ # negotiation auto
+
+
+ # Using Deleted without any config passed
+ #"(NOTE: This will delete all of configured resource module attributes from each configured interface)"
+
+ # Before state:
+ # -------------
+ #
+ # viosl2#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # switchport access vlan 20
+ # negotiation auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # switchport access vlan 20
+ # switchport trunk allowed vlan 20-40,60,80
+ # switchport trunk encapsulation dot1q
+ # switchport trunk native vlan 10
+ # switchport trunk pruning vlan 10
+ # media-type rj45
+ # negotiation auto
+
+ - name: Delete IOS L2 interfaces as in given arguments
+ cisco.ios.ios_l2_interfaces:
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # viosl2#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # negotiation auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # media-type rj45
+ # negotiation auto
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # switchport access vlan 10
+ # interface GigabitEthernet0/2
+ # switchport trunk allowed vlan 10-20,40
+ # switchport trunk encapsulation dot1q
+ # switchport trunk native vlan 10
+ # switchport trunk pruning vlan 10,20
+ # switchport mode trunk
+
+ - name: Gather listed l2 interfaces with provided configurations
+ cisco.ios.ios_l2_interfaces:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "name": "GigabitEthernet0/0"
+ # },
+ # {
+ # "access": {
+ # "vlan": 10
+ # },
+ # "name": "GigabitEthernet0/1"
+ # },
+ # {
+ # "mode": "trunk",
+ # "name": "GigabitEthernet0/2",
+ # "trunk": {
+ # "allowed_vlans": [
+ # "10-20",
+ # "40"
+ # ],
+ # "encapsulation": "dot1q",
+ # "native_vlan": 10,
+ # "pruning_vlans": [
+ # "10",
+ # "20"
+ # ]
+ # }
+ # }
+ # ]
+
+ # After state:
+ # ------------
+ #
+ # vios#sh running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # switchport access vlan 10
+ # interface GigabitEthernet0/2
+ # switchport trunk allowed vlan 10-20,40
+ # switchport trunk encapsulation dot1q
+ # switchport trunk native vlan 10
+ # switchport trunk pruning vlan 10,20
+ # switchport mode trunk
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ access:
+ vlan: 30
+ - name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans: 10-20,40
+ native_vlan: 20
+ pruning_vlans: 10,20
+ encapsulation: dot1q
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "interface GigabitEthernet0/1",
+ # "switchport access vlan 30",
+ # "interface GigabitEthernet0/2",
+ # "switchport trunk encapsulation dot1q",
+ # "switchport trunk native vlan 20",
+ # "switchport trunk allowed vlan 10-20,40",
+ # "switchport trunk pruning vlan 10,20"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # interface GigabitEthernet0/1
+ # switchport mode access
+ # switchport access vlan 30
+ # interface GigabitEthernet0/2
+ # switchport trunk allowed vlan 15-20,40
+ # switchport trunk encapsulation dot1q
+ # switchport trunk native vlan 20
+ # switchport trunk pruning vlan 10,20
+
+ - name: Parse the commands for provided configuration
+ cisco.ios.ios_l2_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": [
+ # {
+ # "access": {
+ # "vlan": 30
+ # },
+ # "mode": "access",
+ # "name": "GigabitEthernet0/1"
+ # },
+ # {
+ # "name": "GigabitEthernet0/2",
+ # "trunk": {
+ # "allowed_vlans": [
+ # "15-20",
+ # "40"
+ # ],
+ # "encapsulation": "dot1q",
+ # "native_vlan": 20,
+ # "pruning_vlans": [
+ # "10",
+ # "20"
+ # ]
+ # }
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/1&#x27;, &#x27;switchport access vlan 20&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l3_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l3_interface_module.rst
new file mode 100644
index 00000000..c0e4a9cf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l3_interface_module.rst
@@ -0,0 +1,449 @@
+.. _cisco.ios.ios_l3_interface_module:
+
+
+**************************
+cisco.ios.ios_l3_interface
+**************************
+
+**(deprecated, removed after 2022-06-01) Manage Layer-3 interfaces on Cisco IOS network devices.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Newer and updated modules released with more functionality in Ansible 2.9
+:Alternative: ios_l3_interfaces
+
+
+
+Synopsis
+--------
+- This module provides declarative management of Layer-3 interfaces on IOS network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of Layer-3 interfaces definitions. Each of the entry in aggregate list should define name of interface <code>name</code> and a optional <code>ipv4</code> or <code>ipv6</code> address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv4 address to be set for the Layer-3 interface mentioned in <em>name</em> option. The address format is &lt;ipv4 address&gt;/&lt;mask&gt;, the mask is number in range 0-32 eg. 192.168.0.1/24</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 address to be set for the Layer-3 interface mentioned in <em>name</em> option. The address format is &lt;ipv6 address&gt;/&lt;mask&gt;, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the Layer-3 interface to be configured eg. GigabitEthernet0/2</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the Layer-3 interface configuration. It indicates if the configuration should be present or absent on remote device.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv4 address to be set for the Layer-3 interface mentioned in <em>name</em> option. The address format is &lt;ipv4 address&gt;/&lt;mask&gt;, the mask is number in range 0-32 eg. 192.168.0.1/24</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 address to be set for the Layer-3 interface mentioned in <em>name</em> option. The address format is &lt;ipv6 address&gt;/&lt;mask&gt;, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the Layer-3 interface to be configured eg. GigabitEthernet0/2</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the Layer-3 interface configuration. It indicates if the configuration should be present or absent on remote device.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.2
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Remove GigabitEthernet0/3 IPv4 and IPv6 address
+ cisco.ios.ios_l3_interface:
+ name: GigabitEthernet0/3
+ state: absent
+ - name: Set GigabitEthernet0/3 IPv4 address
+ cisco.ios.ios_l3_interface:
+ name: GigabitEthernet0/3
+ ipv4: 192.168.0.1/24
+ - name: Set GigabitEthernet0/3 IPv6 address
+ cisco.ios.ios_l3_interface:
+ name: GigabitEthernet0/3
+ ipv6: fd5d:12c9:2201:1::1/64
+ - name: Set GigabitEthernet0/3 in dhcp
+ cisco.ios.ios_l3_interface:
+ name: GigabitEthernet0/3
+ ipv4: dhcp
+ ipv6: dhcp
+ - name: Set interface Vlan1 (SVI) IPv4 address
+ cisco.ios.ios_l3_interface:
+ name: Vlan1
+ ipv4: 192.168.0.5/24
+ - name: Set IP addresses on aggregate
+ cisco.ios.ios_l3_interface:
+ aggregate:
+ - name: GigabitEthernet0/3
+ ipv4: 192.168.2.10/24
+ - name: GigabitEthernet0/3
+ ipv4: 192.168.3.10/24
+ ipv6: fd5d:12c9:2201:1::1/64
+ - name: Remove IP addresses on aggregate
+ cisco.ios.ios_l3_interface:
+ aggregate:
+ - name: GigabitEthernet0/3
+ ipv4: 192.168.2.10/24
+ - name: GigabitEthernet0/3
+ ipv4: 192.168.3.10/24
+ ipv6: fd5d:12c9:2201:1::1/64
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always, except for the platforms that use Netconf transport to manage the device.</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/2&#x27;, &#x27;ip address 192.168.0.1 255.255.255.0&#x27;, &#x27;ipv6 address fd5d:12c9:2201:1::1/64&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Ganesh Nalawade (@ganeshrn)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l3_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l3_interfaces_module.rst
new file mode 100644
index 00000000..3b6e274a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_l3_interfaces_module.rst
@@ -0,0 +1,760 @@
+.. _cisco.ios.ios_l3_interfaces_module:
+
+
+***************************
+cisco.ios.ios_l3_interfaces
+***************************
+
+**L3 interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of Layer-3 interface on Cisco IOS devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of Layer-3 interface options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv4 address to be set for the Layer-3 interface mentioned in <em>name</em> option. The address format is &lt;ipv4 address&gt;/&lt;mask&gt;, the mask is number in range 0-32 eg. 192.168.0.1/24.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the IPv4 address for Interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dhcp_client</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures and specifies client-id to use over DHCP ip. Note, This option shall work only when dhcp is configured as IP.</div>
+ <div>GigabitEthernet interface number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dhcp_hostname</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures and specifies value for hostname option over DHCP ip. Note, This option shall work only when dhcp is configured as IP.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>secondary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the IP address as a secondary address.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 address to be set for the Layer-3 interface mentioned in <em>name</em> option.</div>
+ <div>The address format is &lt;ipv6 address&gt;/&lt;mask&gt;, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the IPv6 address for Interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>show running-config | section ^interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | section ^interface</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # ip address 10.1.1.1 255.255.255.0
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # no ip address
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # no ip address
+ # interface GigabitEthernet0/3.100
+ # encapsulation dot1Q 20
+
+ - name: Merge provided configuration with device configuration
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ ipv4:
+ - address: 192.168.0.1/24
+ secondary: true
+ - name: GigabitEthernet0/2
+ ipv4:
+ - address: 192.168.0.2/24
+ - name: GigabitEthernet0/3
+ ipv6:
+ - address: fd5d:12c9:2201:1::1/64
+ - name: GigabitEthernet0/3.100
+ ipv4:
+ - address: 192.168.0.3/24
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # ip address 10.1.1.1 255.255.255.0
+ # ip address 192.168.0.1 255.255.255.0 secondary
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # ip address 192.168.0.2 255.255.255.0
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # ipv6 address FD5D:12C9:2201:1::1/64
+ # interface GigabitEthernet0/3.100
+ # encapsulation dot1Q 20
+ # ip address 192.168.0.3 255.255.255.0
+
+ # Using replaced
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # ip address 10.1.1.1 255.255.255.0
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # no ip address
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # ip address 192.168.2.0 255.255.255.0
+ # interface GigabitEthernet0/3.100
+ # encapsulation dot1Q 20
+ # ip address 192.168.0.2 255.255.255.0
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ ipv4:
+ - address: 192.168.2.0/24
+ - name: GigabitEthernet0/3
+ ipv4:
+ - address: dhcp
+ dhcp_client: 2
+ dhcp_hostname: test.com
+ - name: GigabitEthernet0/3.100
+ ipv4:
+ - address: 192.168.0.3/24
+ secondary: true
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # ip address 10.1.1.1 255.255.255.0
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # ip address 192.168.2.1 255.255.255.0
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # ip address dhcp client-id GigabitEthernet0/2 hostname test.com
+ # interface GigabitEthernet0/3.100
+ # encapsulation dot1Q 20
+ # ip address 192.168.0.2 255.255.255.0
+ # ip address 192.168.0.3 255.255.255.0 secondary
+
+ # Using overridden
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # ip address 10.1.1.1 255.255.255.0
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # ip address 192.168.2.1 255.255.255.0
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # ipv6 address FD5D:12C9:2201:1::1/64
+ # interface GigabitEthernet0/3.100
+ # encapsulation dot1Q 20
+ # ip address 192.168.0.2 255.255.255.0
+
+ - name: Override device configuration of all interfaces with provided configuration
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ ipv4:
+ - address: 192.168.0.1/24
+ - name: GigabitEthernet0/3.100
+ ipv6:
+ - address: autoconfig
+ state: overridden
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # description Configured by Ansible
+ # no ip address
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description This is test
+ # ip address 192.168.0.1 255.255.255.0
+ # duplex auto
+ # speed 1000
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # interface GigabitEthernet0/3.100
+ # encapsulation dot1Q 20
+ # ipv6 address autoconfig
+
+ # Using Deleted
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # ip address 192.0.2.10 255.255.255.0
+ # shutdown
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description Configured by Ansible Network
+ # ip address 192.168.1.0 255.255.255.0
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # ip address 192.168.0.1 255.255.255.0
+ # shutdown
+ # duplex full
+ # speed 10
+ # ipv6 address FD5D:12C9:2201:1::1/64
+ # interface GigabitEthernet0/3.100
+ # encapsulation dot1Q 20
+ # ip address 192.168.0.2 255.255.255.0
+
+ - name: "Delete attributes of given interfaces (NOTE: This won't delete the interface sitself)"
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ - name: GigabitEthernet0/3.100
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # no ip address
+ # shutdown
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description Configured by Ansible Network
+ # no ip address
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # ip address 192.168.0.1 255.255.255.0
+ # shutdown
+ # duplex full
+ # speed 10
+ # ipv6 address FD5D:12C9:2201:1::1/64
+ # interface GigabitEthernet0/3.100
+ # encapsulation dot1Q 20
+
+ # Using Deleted without any config passed
+ #"(NOTE: This will delete all of configured L3 resource module attributes from each configured interface)"
+
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # ip address 192.0.2.10 255.255.255.0
+ # shutdown
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description Configured by Ansible Network
+ # ip address 192.168.1.0 255.255.255.0
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # ip address 192.168.0.1 255.255.255.0
+ # shutdown
+ # duplex full
+ # speed 10
+ # ipv6 address FD5D:12C9:2201:1::1/64
+ # interface GigabitEthernet0/3.100
+ # encapsulation dot1Q 20
+ # ip address 192.168.0.2 255.255.255.0
+
+ - name: "Delete L3 attributes of ALL interfaces together (NOTE: This won't delete the interface itself)"
+ cisco.ios.ios_l3_interfaces:
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # no ip address
+ # shutdown
+ # duplex auto
+ # speed auto
+ # interface GigabitEthernet0/2
+ # description Configured by Ansible Network
+ # no ip address
+ # interface GigabitEthernet0/3
+ # description Configured by Ansible Network
+ # shutdown
+ # duplex full
+ # speed 10
+ # interface GigabitEthernet0/3.100
+ # encapsulation dot1Q 20
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # ip address 203.0.113.27 255.255.255.0
+ # interface GigabitEthernet0/2
+ # ip address 192.0.2.1 255.255.255.0 secondary
+ # ip address 192.0.2.2 255.255.255.0
+ # ipv6 address 2001:DB8:0:3::/64
+
+ - name: Gather listed l3 interfaces with provided configurations
+ cisco.ios.ios_l3_interfaces:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "ipv4": [
+ # {
+ # "address": "203.0.113.27 255.255.255.0"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/1"
+ # },
+ # {
+ # "ipv4": [
+ # {
+ # "address": "192.0.2.1 255.255.255.0",
+ # "secondary": true
+ # },
+ # {
+ # "address": "192.0.2.2 255.255.255.0"
+ # }
+ # ],
+ # "ipv6": [
+ # {
+ # "address": "2001:db8:0:3::/64"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/2"
+ # }
+ # ]
+
+ # After state:
+ # ------------
+ #
+ # vios#sh running-config | section ^interface
+ # interface GigabitEthernet0/1
+ # ip address 203.0.113.27 255.255.255.0
+ # interface GigabitEthernet0/2
+ # ip address 192.0.2.1 255.255.255.0 secondary
+ # ip address 192.0.2.2 255.255.255.0
+ # ipv6 address 2001:DB8:0:3::/64
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ ipv4:
+ - address: dhcp
+ dhcp_client: 0
+ dhcp_hostname: test.com
+ - name: GigabitEthernet0/2
+ ipv4:
+ - address: 198.51.100.1/24
+ secondary: true
+ - address: 198.51.100.2/24
+ ipv6:
+ - address: 2001:db8:0:3::/64
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "interface GigabitEthernet0/1",
+ # "ip address dhcp client-id GigabitEthernet 0/0 hostname test.com",
+ # "interface GigabitEthernet0/2",
+ # "ip address 198.51.100.1 255.255.255.0 secondary",
+ # "ip address 198.51.100.2 255.255.255.0",
+ # "ipv6 address 2001:db8:0:3::/64"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # interface GigabitEthernet0/1
+ # ip address dhcp client-id
+ # GigabitEthernet 0/0 hostname test.com
+ # interface GigabitEthernet0/2
+ # ip address 198.51.100.1 255.255.255.0
+ # secondary ip address 198.51.100.2 255.255.255.0
+ # ipv6 address 2001:db8:0:3::/64
+
+ - name: Parse the commands for provided configuration
+ cisco.ios.ios_l3_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": [
+ # {
+ # "ipv4": [
+ # {
+ # "address": "dhcp",
+ # "dhcp_client": 0,
+ # "dhcp_hostname": "test.com"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/1"
+ # },
+ # {
+ # "ipv4": [
+ # {
+ # "address": "198.51.100.1 255.255.255.0",
+ # "secondary": true
+ # },
+ # {
+ # "address": "198.51.100.2 255.255.255.0"
+ # }
+ # ],
+ # "ipv6": [
+ # {
+ # "address": "2001:db8:0:3::/64"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/2"
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/1&#x27;, &#x27;ip address 192.168.0.2 255.255.255.0&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lacp_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lacp_interfaces_module.rst
new file mode 100644
index 00000000..d0bbd10d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lacp_interfaces_module.rst
@@ -0,0 +1,615 @@
+.. _cisco.ios.ios_lacp_interfaces_module:
+
+
+*****************************
+cisco.ios.ios_lacp_interfaces
+*****************************
+
+**LACP interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of LACP on Cisco IOS network devices lacp_interfaces.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of LACP lacp_interfaces option</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_switchover</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>LACP fast switchover supported on this port channel.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_bundle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LACP maximum number of ports to bundle in this port channel.</div>
+ <div>Refer to vendor documentation for valid port values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the Interface for configuring LACP.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LACP priority on this interface.</div>
+ <div>Refer to vendor documentation for valid port values.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>show running-config | section ^interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # interface GigabitEthernet0/2
+ # shutdown
+ # interface GigabitEthernet0/3
+ # shutdown
+
+ - name: Merge provided configuration with device configuration
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ port_priority: 10
+ - name: GigabitEthernet0/2
+ port_priority: 20
+ - name: GigabitEthernet0/3
+ port_priority: 30
+ - name: Port-channel10
+ fast_switchover: true
+ max_bundle: 5
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # lacp fast-switchover
+ # lacp max-bundle 5
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # lacp port-priority 10
+ # interface GigabitEthernet0/2
+ # shutdown
+ # lacp port-priority 20
+ # interface GigabitEthernet0/3
+ # shutdown
+ # lacp port-priority 30
+
+ # Using overridden
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # lacp fast-switchover
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # lacp port-priority 10
+ # interface GigabitEthernet0/2
+ # shutdown
+ # lacp port-priority 20
+ # interface GigabitEthernet0/3
+ # shutdown
+ # lacp port-priority 30
+
+ - name: Override device configuration of all lacp_interfaces with provided configuration
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ port_priority: 20
+ - name: Port-channel10
+ max_bundle: 2
+ state: overridden
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # lacp max-bundle 2
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # lacp port-priority 20
+ # interface GigabitEthernet0/2
+ # shutdown
+ # interface GigabitEthernet0/3
+ # shutdown
+
+ # Using replaced
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # lacp max-bundle 5
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # lacp port-priority 10
+ # interface GigabitEthernet0/2
+ # shutdown
+ # lacp port-priority 20
+ # interface GigabitEthernet0/3
+ # shutdown
+ # lacp port-priority 30
+
+ - name: Replaces device configuration of listed lacp_interfaces with provided configuration
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/3
+ port_priority: 40
+ - name: Port-channel10
+ fast_switchover: true
+ max_bundle: 2
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # lacp fast-switchover
+ # lacp max-bundle 2
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # lacp port-priority 10
+ # interface GigabitEthernet0/2
+ # shutdown
+ # lacp port-priority 20
+ # interface GigabitEthernet0/3
+ # shutdown
+ # lacp port-priority 40
+
+ # Using Deleted
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # flowcontrol receive on
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # lacp port-priority 10
+ # interface GigabitEthernet0/2
+ # shutdown
+ # lacp port-priority 20
+ # interface GigabitEthernet0/3
+ # shutdown
+ # lacp port-priority 30
+
+ - name: "Delete LACP attributes of given interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # interface GigabitEthernet0/2
+ # shutdown
+ # lacp port-priority 20
+ # interface GigabitEthernet0/3
+ # shutdown
+ # lacp port-priority 30
+
+ # Using Deleted without any config passed
+ # "(NOTE: This will delete all of configured LLDP module attributes)"
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # lacp fast-switchover
+ # interface Port-channel20
+ # lacp max-bundle 2
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # lacp port-priority 10
+ # interface GigabitEthernet0/2
+ # shutdown
+ # lacp port-priority 20
+ # interface GigabitEthernet0/3
+ # shutdown
+ # lacp port-priority 30
+
+ - name: "Delete LACP attributes for all configured interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_lacp_interfaces:
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # interface GigabitEthernet0/2
+ # shutdown
+ # interface GigabitEthernet0/3
+ # shutdown
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | section ^interface
+ # interface Port-channel10
+ # lacp fast-switchover
+ # lacp max-bundle 2
+ # interface Port-channel40
+ # lacp max-bundle 5
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # lacp port-priority 30
+ # interface GigabitEthernet0/2
+ # lacp port-priority 20
+
+ - name: Gather listed LACP interfaces with provided configurations
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "fast_switchover": true,
+ # "max_bundle": 2,
+ # "name": "Port-channel10"
+ # },
+ # {
+ # "max_bundle": 5,
+ # "name": "Port-channel40"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0"
+ # },
+ # {
+ # "name": "GigabitEthernet0/1",
+ # "port_priority": 30
+ # },
+ # {
+ # "name": "GigabitEthernet0/2",
+ # "port_priority": 20
+ # }
+ # ]
+
+ # After state:
+ # ------------
+ #
+ # vios#sh running-config | section ^interface
+ # interface Port-channel10
+ # lacp fast-switchover
+ # lacp max-bundle 2
+ # interface Port-channel40
+ # lacp max-bundle 5
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # lacp port-priority 30
+ # interface GigabitEthernet0/2
+ # lacp port-priority 20
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ port_priority: 10
+ - name: GigabitEthernet0/2
+ port_priority: 20
+ - name: Port-channel10
+ fast_switchover: true
+ max_bundle: 2
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "interface GigabitEthernet0/1",
+ # "lacp port-priority 10",
+ # "interface GigabitEthernet0/2",
+ # "lacp port-priority 20",
+ # "interface Port-channel10",
+ # "lacp max-bundle 2",
+ # "lacp fast-switchover"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # interface GigabitEthernet0/1
+ # lacp port-priority 10
+ # interface GigabitEthernet0/2
+ # lacp port-priority 20
+ # interface Port-channel10
+ # lacp max-bundle 2 fast-switchover
+
+ - name: Parse the commands for provided configuration
+ cisco.ios.ios_lacp_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": [
+ # {
+ # "name": "GigabitEthernet0/1",
+ # "port_priority": 10
+ # },
+ # {
+ # "name": "GigabitEthernet0/2",
+ # "port_priority": 20
+ # },
+ # {
+ # "fast_switchover": true,
+ # "max_bundle": 2,
+ # "name": "Port-channel10"
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet 0/1&#x27;, &#x27;lacp port-priority 30&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lacp_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lacp_module.rst
new file mode 100644
index 00000000..7da03cd7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lacp_module.rst
@@ -0,0 +1,352 @@
+.. _cisco.ios.ios_lacp_module:
+
+
+******************
+cisco.ios.ios_lacp
+******************
+
+**LACP resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of Global LACP on Cisco IOS network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The provided configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option sets the default system parameters for LACP.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LACP priority for the system.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>show lacp sys-id</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>deleted</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ <li>gathered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show lacp sys-id
+ # 32768, 5e00.0000.8000
+
+ - name: Merge provided configuration with device configuration
+ cisco.ios.ios_lacp:
+ config:
+ system:
+ priority: 123
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # vios#show lacp sys-id
+ # 123, 5e00.0000.8000
+
+ # Using replaced
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show lacp sys-id
+ # 500, 5e00.0000.8000
+
+ - name: Replaces Global LACP configuration
+ cisco.ios.ios_lacp:
+ config:
+ system:
+ priority: 123
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # vios#show lacp sys-id
+ # 123, 5e00.0000.8000
+
+ # Using Deleted
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show lacp sys-id
+ # 500, 5e00.0000.8000
+
+ - name: Delete Global LACP attribute
+ cisco.ios.ios_lacp:
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios#show lacp sys-id
+ # 32768, 5e00.0000.8000
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios#show lacp sys-id
+ # 123, 5e00.0000.8000
+
+ - name: Gather listed LACP with provided configurations
+ cisco.ios.ios_lacp:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": {
+ # "system": {
+ # "priority": 500
+ # }
+ # }
+
+ # After state:
+ # ------------
+ #
+ # vios#show lacp sys-id
+ # 123, 5e00.0000.8000
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_lacp:
+ config:
+ system:
+ priority: 123
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "lacp system-priority 10"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # lacp system-priority 123
+
+ - name: Parse the commands for provided configuration
+ cisco.ios.ios_lacp:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": {
+ # "system": {
+ # "priority": 123
+ # }
+ # }
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;lacp system-priority 10&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lag_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lag_interfaces_module.rst
new file mode 100644
index 00000000..ad8df1cf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lag_interfaces_module.rst
@@ -0,0 +1,658 @@
+.. _cisco.ios.ios_lag_interfaces_module:
+
+
+****************************
+cisco.ios.ios_lag_interfaces
+****************************
+
+**LAG interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages properties of Link Aggregation Group on Cisco IOS devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of link aggregation group configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>members</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface options for the link aggregation group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>link</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Assign a link identifier used for load-balancing.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ <div>NOTE, parameter only supported on Cisco IOS XE platform.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>member</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface member of the link aggregation group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>auto</li>
+ <li>on</li>
+ <li>desirable</li>
+ <li>active</li>
+ <li>passive</li>
+ </ul>
+ </td>
+ <td>
+ <div>Etherchannel Mode of the interface for link aggregation.</div>
+ <div>On mode has to be quoted as &#x27;on&#x27; or else pyyaml will convert to True before it gets to Ansible.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ID of Ethernet Channel of interfaces.</div>
+ <div>Refer to vendor documentation for valid port values.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>show running-config | section ^interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ <li>gathered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface GigabitEthernet0/1
+ # shutdown
+ # interface GigabitEthernet0/2
+ # shutdown
+ # interface GigabitEthernet0/3
+ # shutdown
+ # interface GigabitEthernet0/4
+ # shutdown
+
+ - name: Merge provided configuration with device configuration
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: 10
+ members:
+ - member: GigabitEthernet0/1
+ mode: auto
+ - member: GigabitEthernet0/2
+ mode: auto
+ - name: 20
+ members:
+ - member: GigabitEthernet0/3
+ mode: on
+ - name: 30
+ members:
+ - member: GigabitEthernet0/4
+ mode: active
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # channel-group 10 mode auto
+ # interface GigabitEthernet0/2
+ # shutdown
+ # channel-group 10 mode auto
+ # interface GigabitEthernet0/3
+ # shutdown
+ # channel-group 20 mode on
+ # interface GigabitEthernet0/4
+ # shutdown
+ # channel-group 30 mode active
+
+ # Using overridden
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # channel-group 10 mode auto
+ # interface GigabitEthernet0/2
+ # shutdown
+ # channel-group 10 mode auto
+ # interface GigabitEthernet0/3
+ # shutdown
+ # channel-group 20 mode on
+ # interface GigabitEthernet0/4
+ # shutdown
+ # channel-group 30 mode active
+
+ - name: Override device configuration of all interfaces with provided configuration
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: 20
+ members:
+ - member: GigabitEthernet0/2
+ mode: auto
+ - member: GigabitEthernet0/3
+ mode: auto
+ state: overridden
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # interface GigabitEthernet0/2
+ # shutdown
+ # channel-group 20 mode auto
+ # interface GigabitEthernet0/3
+ # shutdown
+ # channel-group 20 mode auto
+ # interface GigabitEthernet0/4
+ # shutdown
+
+ # Using replaced
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # channel-group 10 mode auto
+ # interface GigabitEthernet0/2
+ # shutdown
+ # channel-group 10 mode auto
+ # interface GigabitEthernet0/3
+ # shutdown
+ # channel-group 20 mode on
+ # interface GigabitEthernet0/4
+ # shutdown
+ # channel-group 30 mode active
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: 40
+ members:
+ - member: GigabitEthernet0/3
+ mode: auto
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface Port-channel40
+ # interface GigabitEthernet0/1
+ # shutdown
+ # channel-group 10 mode auto
+ # interface GigabitEthernet0/2
+ # shutdown
+ # channel-group 10 mode auto
+ # interface GigabitEthernet0/3
+ # shutdown
+ # channel-group 40 mode on
+ # interface GigabitEthernet0/4
+ # shutdown
+ # channel-group 30 mode active
+
+ # Using Deleted
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # channel-group 10 mode auto
+ # interface GigabitEthernet0/2
+ # shutdown
+ # channel-group 10 mode auto
+ # interface GigabitEthernet0/3
+ # shutdown
+ # channel-group 20 mode on
+ # interface GigabitEthernet0/4
+ # shutdown
+ # channel-group 30 mode active
+
+ - name: "Delete LAG attributes of given interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: 10
+ - name: 20
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # interface GigabitEthernet0/2
+ # shutdown
+ # interface GigabitEthernet0/3
+ # shutdown
+ # interface GigabitEthernet0/4
+ # shutdown
+ # channel-group 30 mode active
+
+ # Using Deleted without any config passed
+ #"(NOTE: This will delete all of configured LLDP module attributes)"
+
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # channel-group 10 mode auto
+ # interface GigabitEthernet0/2
+ # shutdown
+ # channel-group 10 mode auto
+ # interface GigabitEthernet0/3
+ # shutdown
+ # channel-group 20 mode on
+ # interface GigabitEthernet0/4
+ # shutdown
+ # channel-group 30 mode active
+
+ - name: "Delete all configured LAG attributes for interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_lag_interfaces:
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel10
+ # interface Port-channel20
+ # interface Port-channel30
+ # interface GigabitEthernet0/1
+ # shutdown
+ # interface GigabitEthernet0/2
+ # shutdown
+ # interface GigabitEthernet0/3
+ # shutdown
+ # interface GigabitEthernet0/4
+ # shutdown
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | section ^interface
+ # interface Port-channel11
+ # interface Port-channel22
+ # interface GigabitEthernet0/1
+ # shutdown
+ # channel-group 11 mode active
+ # interface GigabitEthernet0/2
+ # shutdown
+ # channel-group 22 mode active
+
+ - name: Gather listed LAG interfaces with provided configurations
+ cisco.ios.ios_lag_interfaces:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "members": [
+ # {
+ # "member": "GigabitEthernet0/1",
+ # "mode": "active"
+ # }
+ # ],
+ # "name": "Port-channel11"
+ # },
+ # {
+ # "members": [
+ # {
+ # "member": "GigabitEthernet0/2",
+ # "mode": "active"
+ # }
+ # ],
+ # "name": "Port-channel22"
+ # }
+ # ]
+
+ # After state:
+ # ------------
+ #
+ # vios#sh running-config | section ^interface
+ # interface Port-channel11
+ # interface Port-channel22
+ # interface GigabitEthernet0/1
+ # shutdown
+ # channel-group 11 mode active
+ # interface GigabitEthernet0/2
+ # shutdown
+ # channel-group 22 mode active
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: Port-channel11
+ members:
+ - member: GigabitEthernet0/1
+ mode: active
+ - name: Port-channel22
+ members:
+ - member: GigabitEthernet0/2
+ mode: passive
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "interface GigabitEthernet0/1",
+ # "channel-group 11 mode active",
+ # "interface GigabitEthernet0/2",
+ # "channel-group 22 mode passive",
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # interface GigabitEthernet0/1
+ # channel-group 11 mode active
+ # interface GigabitEthernet0/2
+ # channel-group 22 mode passive
+
+ - name: Parse the commands for provided configuration
+ cisco.ios.ios_lag_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": [
+ # {
+ # "members": [
+ # {
+ # "member": "GigabitEthernet0/1",
+ # "mode": "active"
+ # }
+ # ],
+ # "name": "Port-channel11"
+ # },
+ # {
+ # "members": [
+ # {
+ # "member": "GigabitEthernet0/2",
+ # "mode": "passive"
+ # }
+ # ],
+ # "name": "Port-channel22"
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/1&#x27;, &#x27;channel-group 1 mode active&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_linkagg_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_linkagg_module.rst
new file mode 100644
index 00000000..4f75a66b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_linkagg_module.rst
@@ -0,0 +1,467 @@
+.. _cisco.ios.ios_linkagg_module:
+
+
+*********************
+cisco.ios.ios_linkagg
+*********************
+
+**Manage link aggregation groups on Cisco IOS network devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of link aggregation groups on Cisco IOS network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of link aggregation definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Channel-group number for the port-channel Link aggregation group. Range 1-255.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>members</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of members of the link aggregation group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>active</li>
+ <li>on</li>
+ <li>passive</li>
+ <li>auto</li>
+ <li>desirable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mode of the link aggregation group.</div>
+ <div>On mode has to be quoted as &#x27;on&#x27; or else pyyaml will convert to True before it gets to Ansible.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the link aggregation group.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Channel-group number for the port-channel Link aggregation group. Range 1-255.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>members</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of members of the link aggregation group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>active</li>
+ <li>on</li>
+ <li>passive</li>
+ <li>auto</li>
+ <li>desirable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mode of the link aggregation group.</div>
+ <div>On mode has to be quoted as &#x27;on&#x27; or else pyyaml will convert to True before it gets to Ansible.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>purge</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Purge links not defined in the <em>aggregate</em> parameter.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the link aggregation group.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.2
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: create link aggregation group
+ cisco.ios.ios_linkagg:
+ group: 10
+ state: present
+
+ - name: delete link aggregation group
+ cisco.ios.ios_linkagg:
+ group: 10
+ state: absent
+
+ - name: set link aggregation group to members
+ cisco.ios.ios_linkagg:
+ group: 200
+ mode: active
+ members:
+ - GigabitEthernet0/0
+ - GigabitEthernet0/1
+
+ - name: remove link aggregation group from GigabitEthernet0/0
+ cisco.ios.ios_linkagg:
+ group: 200
+ mode: active
+ members:
+ - GigabitEthernet0/1
+
+ - name: Create aggregate of linkagg definitions
+ cisco.ios.ios_linkagg:
+ aggregate:
+ - {group: 3, mode: on, members: [GigabitEthernet0/1]}
+ - {group: 100, mode: passive, members: [GigabitEthernet0/2]}
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always, except for the platforms that use Netconf transport to manage the device.</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface port-channel 30&#x27;, &#x27;interface GigabitEthernet0/3&#x27;, &#x27;channel-group 30 mode on&#x27;, &#x27;no interface port-channel 30&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lldp_global_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lldp_global_module.rst
new file mode 100644
index 00000000..eaa636dc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lldp_global_module.rst
@@ -0,0 +1,620 @@
+.. _cisco.ios.ios_lldp_global_module:
+
+
+*************************
+cisco.ios.ios_lldp_global
+*************************
+
+**LLDP resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module configures and manages the Link Layer Discovery Protocol(LLDP) attributes on IOS platforms.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of LLDP options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable LLDP</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LLDP holdtime (in sec) to be sent in packets.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reinit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the delay (in secs) for LLDP to initialize.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ <div>NOTE, if LLDP reinit is configured with a starting value, idempotency won&#x27;t be maintained as the Cisco device doesn&#x27;t record the starting reinit configured value. As such, Ansible cannot verify if the respective starting reinit value is already configured or not from the device side. If you try to apply starting reinit value in every play run, Ansible will show changed as True. For any other reinit value, idempotency will be maintained since any other reinit value is recorded in the Cisco device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the rate at which LLDP packets are sent (in sec).</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tlv_select</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Selection of LLDP TLVs i.e. type-length-value to send</div>
+ <div>NOTE, if tlv-select is configured idempotency won&#x27;t be maintained as Cisco device doesn&#x27;t record configured tlv-select options. As such, Ansible cannot verify if the respective tlv-select options is already configured or not from the device side. If you try to apply tlv-select option in every play run, Ansible will show changed as True.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>four_wire_power_management</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Cisco 4-wire Power via MDI TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mac_phy_cfg</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>IEEE 802.3 MAC/Phy Configuration/status TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>management_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Management Address TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Port Description TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Port VLAN ID TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>power_management</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>IEEE 802.3 DTE Power via MDI TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_capabilities</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>System Capabilities TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>System Description TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>System Name TLV</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>show running-config | section ^lldp</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>deleted</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ # vios#sh running-config | section ^lldp
+ # vios1#
+
+
+ - name: Merge provided configuration with device configuration
+ cisco.ios.ios_lldp_global:
+ config:
+ holdtime: 10
+ enabled: true
+ reinit: 3
+ timer: 10
+ state: merged
+
+ # After state:
+ # ------------
+ # vios#sh running-config | section ^lldp
+ # lldp timer 10
+ # lldp holdtime 10
+ # lldp reinit 3
+ # lldp run
+
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ # vios#sh running-config | section ^lldp
+ # lldp timer 10
+ # lldp holdtime 10
+ # lldp reinit 3
+ # lldp run
+
+
+ - name: Replaces LLDP device configuration with provided configuration
+ cisco.ios.ios_lldp_global:
+ config:
+ holdtime: 20
+ reinit: 5
+ state: replaced
+
+ # After state:
+ # -------------
+ # vios#sh running-config | section ^lldp
+ # lldp holdtime 20
+ # lldp reinit 5
+
+
+ # Using Deleted without any config passed
+ #"(NOTE: This will delete all of configured LLDP module attributes)"
+
+ # Before state:
+ # -------------
+ # vios#sh running-config | section ^lldp
+ # lldp timer 10
+ # lldp holdtime 10
+ # lldp reinit 3
+ # lldp run
+
+
+ - name: Delete LLDP attributes
+ cisco.ios.ios_lldp_global:
+ state: deleted
+
+ # After state:
+ # -------------
+ # vios#sh running-config | section ^lldp
+ # vios1#
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh running-config | section ^lldp
+ # lldp timer 10
+ # lldp holdtime 10
+ # lldp reinit 3
+ # lldp run
+
+ - name: Gather listed interfaces with provided configurations
+ cisco.ios.ios_lldp_global:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": {
+ # "enabled": true,
+ # "holdtime": 10,
+ # "reinit": 3,
+ # "timer": 10
+ # }
+
+ # After state:
+ # ------------
+ #
+ # vios#sh running-config | section ^lldp
+ # lldp timer 10
+ # lldp holdtime 10
+ # lldp reinit 3
+ # lldp run
+
+ # Using Rendered
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_lldp_global:
+ config:
+ holdtime: 10
+ enabled: true
+ reinit: 3
+ timer: 10
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "lldp holdtime 10",
+ # "lldp run",
+ # "lldp timer 10",
+ # "lldp reinit 3"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # lldp timer 10
+ # lldp holdtime 10
+ # lldp reinit 3
+ # lldp run
+
+ - name: Parse the commands for provided configuration
+ cisco.ios.ios_lldp_global:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": {
+ # "enabled": true,
+ # "holdtime": 10,
+ # "reinit": 3,
+ # "timer": 10
+ # }
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;lldp holdtime 10&#x27;, &#x27;lldp run&#x27;, &#x27;lldp timer 10&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lldp_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lldp_interfaces_module.rst
new file mode 100644
index 00000000..3cd60eb8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lldp_interfaces_module.rst
@@ -0,0 +1,814 @@
+.. _cisco.ios.ios_lldp_interfaces_module:
+
+
+*****************************
+cisco.ios.ios_lldp_interfaces
+*****************************
+
+**LLDP interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages link layer discovery protocol (LLDP) attributes of interfaces on Cisco IOS devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of LLDP options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>med_tlv_select</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Selection of LLDP MED TLVs to send</div>
+ <div>NOTE, if med-tlv-select is configured idempotency won&#x27;t be maintained as Cisco device doesn&#x27;t record configured med-tlv-select options. As such, Ansible cannot verify if the respective med-tlv-select options is already configured or not from the device side. If you try to apply med-tlv-select option in every play run, Ansible will show changed as True.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inventory_management</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>LLDP MED Inventory Management TLV</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>receive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable LLDP reception on interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tlv_select</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Selection of LLDP type-length-value i.e. TLVs to send</div>
+ <div>NOTE, if tlv-select is configured idempotency won&#x27;t be maintained as Cisco device doesn&#x27;t record configured tlv-select options. As such, Ansible cannot verify if the respective tlv-select options is already configured or not from the device side. If you try to apply tlv-select option in every play run, Ansible will show changed as True.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>power_management</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>IEEE 802.3 DTE Power via MDI TLV</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transmit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable LLDP transmission on interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>sh lldp interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#sh lldp interface
+ # GigabitEthernet0/0:
+ # Tx: enabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/2:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: INIT
+ #
+ # GigabitEthernet0/3:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+
+ - name: Merge provided configuration with device configuration
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ - name: GigabitEthernet0/3
+ transmit: true
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # vios#sh lldp interface
+ # GigabitEthernet0/0:
+ # Tx: enabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/2:
+ # Tx: disabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: INIT
+ #
+ # GigabitEthernet0/3:
+ # Tx: enabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+
+ # Using overridden
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#sh lldp interface
+ # GigabitEthernet0/0:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/2:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: INIT
+ #
+ # GigabitEthernet0/3:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+
+ - name: Override device configuration of all lldp_interfaces with provided configuration
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: true
+ state: overridden
+
+ # After state:
+ # ------------
+ #
+ # vios#sh lldp interface
+ # GigabitEthernet0/0:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/2:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: INIT
+ #
+ # GigabitEthernet0/3:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+
+ # Using replaced
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#sh lldp interface
+ # GigabitEthernet0/0:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/2:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: INIT
+ #
+ # GigabitEthernet0/3:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+
+ - name: Replaces device configuration of listed lldp_interfaces with provided configuration
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/3
+ receive: true
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # vios#sh lldp interface
+ # GigabitEthernet0/0:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/2:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: INIT
+ #
+ # GigabitEthernet0/3:
+ # Tx: disabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+
+ # Using Deleted
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#sh lldp interface
+ # GigabitEthernet0/0:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/2:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: INIT
+ #
+ # GigabitEthernet0/3:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+
+ - name: "Delete LLDP attributes of given interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios#sh lldp interface
+ # GigabitEthernet0/0:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/2:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: INIT
+ #
+ # GigabitEthernet0/3:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+
+ # Using Deleted without any config passed
+ # "(NOTE: This will delete all of configured LLDP module attributes)"
+ #
+ # Before state:
+ # -------------
+ #
+ # vios#sh lldp interface
+ # GigabitEthernet0/0:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/2:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: INIT
+ #
+ # GigabitEthernet0/3:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+
+ - name: "Delete LLDP attributes for all configured interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_lldp_interfaces:
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios#sh lldp interface
+ # GigabitEthernet0/0:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/2:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: INIT
+ #
+ # GigabitEthernet0/3:
+ # Tx: disabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios#sh lldp interface
+ # GigabitEthernet0/0:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/2:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+
+ - name: Gather listed LLDP interfaces with provided configurations
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "name": "GigabitEthernet0/0",
+ # "receive": true,
+ # "transmit": true
+ # },
+ # {
+ # "name": "GigabitEthernet0/1",
+ # "receive": true,
+ # "transmit": true
+ # },
+ # {
+ # "name": "GigabitEthernet0/2",
+ # "receive": true,
+ # "transmit": true
+ # }
+ # ]
+
+ # After state:
+ # ------------
+ #
+ # vios#sh lldp interface
+ # GigabitEthernet0/0:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+
+ # GigabitEthernet0/2:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "interface GigabitEthernet0/0",
+ # "lldp receive",
+ # "lldp transmit",
+ # "interface GigabitEthernet0/1",
+ # "lldp receive",
+ # "lldp transmit",
+ # "interface GigabitEthernet0/2",
+ # "lldp receive"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # GigabitEthernet0/0:
+ # Tx: enabled
+ # Rx: disabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/1:
+ # Tx: enabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: WAIT FOR FRAME
+ #
+ # GigabitEthernet0/2:
+ # Tx: disabled
+ # Rx: enabled
+ # Tx state: IDLE
+ # Rx state: INIT
+
+ - name: Parse the commands for provided configuration
+ cisco.ios.ios_lldp_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": [
+ # {
+ # "name": "GigabitEthernet0/0",
+ # "receive": false,
+ # "transmit": true
+ # },
+ # {
+ # "name": "GigabitEthernet0/1",
+ # "receive": true,
+ # "transmit": true
+ # },
+ # {
+ # "name": "GigabitEthernet0/2",
+ # "receive": true,
+ # "transmit": false
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet 0/1&#x27;, &#x27;lldp transmit&#x27;, &#x27;lldp receive&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lldp_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lldp_module.rst
new file mode 100644
index 00000000..f296f469
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_lldp_module.rst
@@ -0,0 +1,278 @@
+.. _cisco.ios.ios_lldp_module:
+
+
+******************
+cisco.ios.ios_lldp
+******************
+
+**Manage LLDP configuration on Cisco IOS network devices.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of LLDP service on Cisco IOS network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ <li>enabled</li>
+ <li>disabled</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the LLDP configuration. If value is <em>present</em> lldp will be enabled else if it is <em>absent</em> it will be disabled.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.2
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Enable LLDP service
+ cisco.ios.ios_lldp:
+ state: present
+
+ - name: Disable LLDP service
+ cisco.ios.ios_lldp:
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always, except for the platforms that use Netconf transport to manage the device.</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;lldp run&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Ganesh Nalawade (@ganeshrn)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_logging_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_logging_module.rst
new file mode 100644
index 00000000..98b1c986
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_logging_module.rst
@@ -0,0 +1,541 @@
+.. _cisco.ios.ios_logging_module:
+
+
+*********************
+cisco.ios.ios_logging
+*********************
+
+**Manage logging on network devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of logging on Cisco Ios devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of logging definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>on</li>
+ <li>host</li>
+ <li>console</li>
+ <li>monitor</li>
+ <li>buffered</li>
+ <li>trap</li>
+ </ul>
+ </td>
+ <td>
+ <div>Destination of the logs.</div>
+ <div>On dest has to be quoted as &#x27;on&#x27; or else pyyaml will convert to True before it gets to Ansible.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>facility</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set logging facility.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>level</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>emergencies</li>
+ <li>alerts</li>
+ <li>critical</li>
+ <li>errors</li>
+ <li>warnings</li>
+ <li>notifications</li>
+ <li>informational</li>
+ <li>debugging</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set logging severity levels.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The hostname or IP address of the destination.</div>
+ <div>Required when <em>dest=host</em>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Size of buffer. The acceptable value is in range from 4096 to 4294967295 bytes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the logging configuration.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>on</li>
+ <li>host</li>
+ <li>console</li>
+ <li>monitor</li>
+ <li>buffered</li>
+ <li>trap</li>
+ </ul>
+ </td>
+ <td>
+ <div>Destination of the logs.</div>
+ <div>On dest has to be quoted as &#x27;on&#x27; or else pyyaml will convert to True before it gets to Ansible.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>facility</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set logging facility.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>level</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>emergencies</li>
+ <li>alerts</li>
+ <li>critical</li>
+ <li>errors</li>
+ <li>warnings</li>
+ <li>notifications</li>
+ <li>informational</li>
+ <li><div style="color: blue"><b>debugging</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Set logging severity levels.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The hostname or IP address of the destination.</div>
+ <div>Required when <em>dest=host</em>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Size of buffer. The acceptable value is in range from 4096 to 4294967295 bytes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the logging configuration.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.6
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure host logging
+ cisco.ios.ios_logging:
+ dest: host
+ name: 172.16.0.1
+ state: present
+
+ - name: remove host logging configuration
+ cisco.ios.ios_logging:
+ dest: host
+ name: 172.16.0.1
+ state: absent
+
+ - name: configure console logging level and facility
+ cisco.ios.ios_logging:
+ dest: console
+ facility: local7
+ level: debugging
+ state: present
+
+ - name: enable logging to all
+ cisco.ios.ios_logging:
+ dest: on
+
+ - name: configure buffer size
+ cisco.ios.ios_logging:
+ dest: buffered
+ size: 5000
+
+ - name: Configure logging using aggregate
+ cisco.ios.ios_logging:
+ aggregate:
+ - {dest: console, level: notifications}
+ - {dest: buffered, size: 9000}
+
+ - name: remove logging using aggregate
+ cisco.ios.ios_logging:
+ aggregate:
+ - {dest: console, level: notifications}
+ - {dest: buffered, size: 9000}
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;logging facility local7&#x27;, &#x27;logging host 172.16.0.1&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ntp_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ntp_module.rst
new file mode 100644
index 00000000..d7f94622
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ntp_module.rst
@@ -0,0 +1,411 @@
+.. _cisco.ios.ios_ntp_module:
+
+
+*****************
+cisco.ios.ios_ntp
+*****************
+
+**Manages core NTP configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages core NTP configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ACL for peer/server access restricition.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable NTP authentication. Data type boolean.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>md5 NTP authentication key of tye 7.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>auth_key id. Data type string</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>logging</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable NTP logs. Data type boolean.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>server</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network address of NTP server.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_int</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source interface for NTP packets.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Set new NTP server and source interface
+ - cisco.ios.ios_ntp:
+ server: 10.0.255.10
+ source_int: Loopback0
+ logging: false
+ state: present
+
+ # Remove NTP ACL and logging
+ - cisco.ios.ios_ntp:
+ acl: NTP_ACL
+ logging: true
+ state: absent
+
+ # Set NTP authentication
+ - cisco.ios.ios_ntp:
+ key_id: 10
+ auth_key: 15435A030726242723273C21181319000A
+ auth: true
+ state: present
+
+ # Set new NTP configuration
+ - cisco.ios.ios_ntp:
+ server: 10.0.255.10
+ source_int: Loopback0
+ acl: NTP_ACL
+ logging: true
+ key_id: 10
+ auth_key: 15435A030726242723273C21181319000A
+ auth: true
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;no ntp server 10.0.255.10&#x27;, &#x27;no ntp source Loopback0&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Federico Olivieri (@Federico87)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ospf_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ospf_interfaces_module.rst
new file mode 100644
index 00000000..6b665ed5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ospf_interfaces_module.rst
@@ -0,0 +1,2223 @@
+.. _cisco.ios.ios_ospf_interfaces_module:
+
+
+*****************************
+cisco.ios.ios_ospf_interfaces
+*****************************
+
+**OSPF_Interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module configures and manages the Open Shortest Path First (OSPF) version 2 on IOS platforms.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="6">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of OSPF interfaces options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_family</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF interfaces settings on the interfaces in address-family context.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Adjacency staggering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Address Family Identifier (AFI) for OSPF interfaces settings on the interfaces.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key_chain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use a key-chain for cryptographic authentication keys</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use message-digest authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>null</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use no authentication</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>BFD configuration commands</div>
+ <div>Enable/Disable BFD on this interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface cost</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dynamic_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify dynamic cost options</div>
+ <div>Valid only with IPv6 OSPF config</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify default link metric value</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hysteresis</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify hysteresis value for LSA dampening</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>percent</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify hysteresis percent changed. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify hysteresis threshold value. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>weight</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify weight to be placed on individual metrics</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>l2_factor</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify weight to be given to L2-factor metric</div>
+ <div>Percentage weight of L2-factor metric. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>latency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify weight to be given to latency metric.</div>
+ <div>Percentage weight of latency metric. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>oc</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify weight to be given to cdr/mdr for oc</div>
+ <div>Give 100 percent weightage for current data rate(0 for maxdatarate)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>resources</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify weight to be given to resources metric</div>
+ <div>Percentage weight of resources metric. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throughput</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify weight to be given to throughput metric</div>
+ <div>Percentage weight of throughput metric. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface cost or Route cost of this interface</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>database_filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter OSPF LSA during synchronization and flooding</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dead_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interval after which a neighbor is declared dead</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>minimal</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set to 1 second and set multiplier for Hellos</div>
+ <div>Number of Hellos sent within 1 second. Please refer vendor documentation of Valid values.</div>
+ <div>Valid only with IP OSPF config</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>time in seconds</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>demand_circuit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF Demand Circuit, enable or disable the demand circuit&#x27;</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable demand circuit on this interface</div>
+ <div>Valid only with IPv6 OSPF config</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable Demand Circuit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Ignore demand circuit auto-negotiation requests</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flood_reduction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>OSPF Flood Reduction</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time between HELLO packets</div>
+ <div>Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Link-local Signaling (LLS) support</div>
+ <div>Valid only with IP OSPF config</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>manet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Mobile Adhoc Networking options</div>
+ <div>MANET Peering options</div>
+ <div>Valid only with IPv6 OSPF config</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redundant path cost improvement required to peer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>percent</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Relative incremental path cost. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Absolute incremental path cost. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>link_metrics</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redundant path cost improvement required to peer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost_threshold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum link cost threshold. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable link-metrics</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Ignores the MTU in DBD packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multi_area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the OSPF multi-area ID</div>
+ <div>Valid only with IP OSPF config</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface cost</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF multi-area ID as a decimal value. Please refer vendor documentation of Valid values.</div>
+ <div>OSPF multi-area ID in IP address format(e.g. A.B.C.D)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF neighbor link-local IPv6 address (X:X:X:X::X)</div>
+ <div>Valid only with IPv6 OSPF config</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor link-local IPv6 address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF cost for point-to-multipoint neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>database_filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter OSPF LSA during synchronization and flooding for point-to-multipoint neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>poll_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF dead-router polling interval</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF priority of non-broadcast neighbor</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>broadcast</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify OSPF broadcast multi-access network</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>manet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify MANET OSPF interface type</div>
+ <div>Valid only with IPv6 OSPF config</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>non_broadcast</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify OSPF NBMA network</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>point_to_multipoint</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify OSPF point-to-multipoint network</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>point_to_point</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify OSPF point-to-point network</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_suppression</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable OSPF prefix suppression</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router priority. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>process</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF interfaces process config</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF interfaces area ID as a decimal value. Please refer vendor documentation of Valid values.</div>
+ <div>OSPF interfaces area ID in IP address format(e.g. A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Address Family Identifier (AFI) for OSPF interfaces settings on the interfaces. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>instance_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the OSPF instance based on ID</div>
+ <div>Valid only with IPv6 OSPF config</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>secondaries</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Include or exclude secondary IP addresses.</div>
+ <div>Valid only with IPv4 config</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>resync_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interval after which adjacency is reset if oob-resync is not started. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retransmit_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time between retransmitting lost link state advertisements. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set OSPF protocol&#x27;s state to disable under current interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transmit_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Link state transmit delay. Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl_security</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>TTL security check</div>
+ <div>Valid only with IPV4 OSPF config</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hops</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of IP hops allowed</div>
+ <div>Please refer vendor documentation of Valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable TTL Security on all interfaces</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>sh running-config | section ^interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^interface
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ipv6 ospf 55 area 105
+ # ipv6 ospf priority 20
+ # ipv6 ospf transmit-delay 30
+ # ipv6 ospf adjacency stagger disable
+ # interface GigabitEthernet0/2
+ # ip ospf priority 40
+ # ip ospf adjacency stagger disable
+ # ip ospf ttl-security hops 50
+ # ip ospf 10 area 20
+ # ip ospf cost 30
+
+ - name: Delete provided OSPF Interface config
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ state: deleted
+
+ # Commands Fired:
+ # ---------------
+ #
+ # "commands": [
+ # "interface GigabitEthernet0/1",
+ # "no ipv6 ospf 55 area 105",
+ # "no ipv6 ospf adjacency stagger disable",
+ # "no ipv6 ospf priority 20",
+ # "no ipv6 ospf transmit-delay 30"
+ # ]
+
+ # After state:
+ # -------------
+ # router-ios#sh running-config | section ^interface
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # interface GigabitEthernet0/2
+ # ip ospf priority 40
+ # ip ospf adjacency stagger disable
+ # ip ospf ttl-security hops 50
+ # ip ospf 10 area 20
+ # ip ospf cost 30
+
+ # Using deleted without any config passed (NOTE: This will delete all OSPF Interfaces configuration from device)
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^interface
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ipv6 ospf 55 area 105
+ # ipv6 ospf priority 20
+ # ipv6 ospf transmit-delay 30
+ # ipv6 ospf adjacency stagger disable
+ # interface GigabitEthernet0/2
+ # ip ospf priority 40
+ # ip ospf adjacency stagger disable
+ # ip ospf ttl-security hops 50
+ # ip ospf 10 area 20
+ # ip ospf cost 30
+
+ - name: Delete all OSPF config from interfaces
+ cisco.ios.ios_ospf_interfaces:
+ state: deleted
+
+ # Commands Fired:
+ # ---------------
+ #
+ # "commands": [
+ # "interface GigabitEthernet0/2",
+ # "no ip ospf 10 area 20",
+ # "no ip ospf adjacency stagger disable",
+ # "no ip ospf cost 30",
+ # "no ip ospf priority 40",
+ # "no ip ospf ttl-security hops 50",
+ # "interface GigabitEthernet0/1",
+ # "no ipv6 ospf 55 area 105",
+ # "no ipv6 ospf adjacency stagger disable",
+ # "no ipv6 ospf priority 20",
+ # "no ipv6 ospf transmit-delay 30"
+ # ]
+
+ # After state:
+ # -------------
+ # router-ios#sh running-config | section ^interface
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # interface GigabitEthernet0/2
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^interface
+ # router-ios#
+
+ - name: Merge provided OSPF Interfaces configuration
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ address_family:
+ - afi: ipv4
+ process:
+ id: 10
+ area_id: 30
+ adjacency: true
+ bfd: true
+ cost:
+ interface_cost: 5
+ dead_interval:
+ time: 5
+ demand_circuit:
+ ignore: true
+ network:
+ broadcast: true
+ priority: 25
+ resync_timeout: 10
+ shutdown: true
+ ttl_security:
+ hops: 50
+ - afi: ipv6
+ process:
+ id: 35
+ area_id: 45
+ adjacency: true
+ database_filter: true
+ manet:
+ link_metrics:
+ cost_threshold: 10
+ priority: 55
+ transmit_delay: 45
+ state: merged
+
+ # Commands Fired:
+ # ---------------
+ #
+ # "commands": [
+ # "interface GigabitEthernet0/1",
+ # "ip ospf 10 area 30",
+ # "ip ospf adjacency stagger disable",
+ # "ip ospf bfd",
+ # "ip ospf cost 5",
+ # "ip ospf dead-interval 5",
+ # "ip ospf demand-circuit ignore",
+ # "ip ospf network broadcast",
+ # "ip ospf priority 25",
+ # "ip ospf resync-timeout 10",
+ # "ip ospf shutdown",
+ # "ip ospf ttl-security hops 50",
+ # "ipv6 ospf 35 area 45",
+ # "ipv6 ospf adjacency stagger disable",
+ # "ipv6 ospf database-filter all out",
+ # "ipv6 ospf manet peering link-metrics 10",
+ # "ipv6 ospf priority 55",
+ # "ipv6 ospf transmit-delay 45"
+ # ]
+
+ # After state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^interface
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip ospf network broadcast
+ # ip ospf resync-timeout 10
+ # ip ospf dead-interval 5
+ # ip ospf priority 25
+ # ip ospf demand-circuit ignore
+ # ip ospf bfd
+ # ip ospf adjacency stagger disable
+ # ip ospf ttl-security hops 50
+ # ip ospf shutdown
+ # ip ospf 10 area 30
+ # ip ospf cost 5
+ # ipv6 ospf 35 area 45
+ # ipv6 ospf priority 55
+ # ipv6 ospf transmit-delay 45
+ # ipv6 ospf database-filter all out
+ # ipv6 ospf adjacency stagger disable
+ # ipv6 ospf manet peering link-metrics 10
+ # interface GigabitEthernet0/2
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^interface
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip ospf network broadcast
+ # ip ospf resync-timeout 10
+ # ip ospf dead-interval 5
+ # ip ospf priority 25
+ # ip ospf demand-circuit ignore
+ # ip ospf bfd
+ # ip ospf adjacency stagger disable
+ # ip ospf ttl-security hops 50
+ # ip ospf shutdown
+ # ip ospf 10 area 30
+ # ip ospf cost 5
+ # ipv6 ospf 35 area 45
+ # ipv6 ospf priority 55
+ # ipv6 ospf transmit-delay 45
+ # ipv6 ospf database-filter all out
+ # ipv6 ospf adjacency stagger disable
+ # ipv6 ospf manet peering link-metrics 10
+ # interface GigabitEthernet0/2
+
+ - name: Override provided OSPF Interfaces configuration
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ address_family:
+ - afi: ipv6
+ process:
+ id: 55
+ area_id: 105
+ adjacency: true
+ priority: 20
+ transmit_delay: 30
+ - name: GigabitEthernet0/2
+ address_family:
+ - afi: ipv4
+ process:
+ id: 10
+ area_id: 20
+ adjacency: true
+ cost:
+ interface_cost: 30
+ priority: 40
+ ttl_security:
+ hops: 50
+ state: overridden
+
+ # Commands Fired:
+ # ---------------
+ #
+ # "commands": [
+ # "interface GigabitEthernet0/2",
+ # "ip ospf 10 area 20",
+ # "ip ospf adjacency stagger disable",
+ # "ip ospf cost 30",
+ # "ip ospf priority 40",
+ # "ip ospf ttl-security hops 50",
+ # "interface GigabitEthernet0/1",
+ # "ipv6 ospf 55 area 105",
+ # "no ipv6 ospf database-filter all out",
+ # "no ipv6 ospf manet peering link-metrics 10",
+ # "ipv6 ospf priority 20",
+ # "ipv6 ospf transmit-delay 30",
+ # "no ip ospf 10 area 30",
+ # "no ip ospf adjacency stagger disable",
+ # "no ip ospf bfd",
+ # "no ip ospf cost 5",
+ # "no ip ospf dead-interval 5",
+ # "no ip ospf demand-circuit ignore",
+ # "no ip ospf network broadcast",
+ # "no ip ospf priority 25",
+ # "no ip ospf resync-timeout 10",
+ # "no ip ospf shutdown",
+ # "no ip ospf ttl-security hops 50"
+ # ]
+
+ # After state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^interface
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ipv6 ospf 55 area 105
+ # ipv6 ospf priority 20
+ # ipv6 ospf transmit-delay 30
+ # ipv6 ospf adjacency stagger disable
+ # interface GigabitEthernet0/2
+ # ip ospf priority 40
+ # ip ospf adjacency stagger disable
+ # ip ospf ttl-security hops 50
+ # ip ospf 10 area 20
+ # ip ospf cost 30
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^interface
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip ospf network broadcast
+ # ip ospf resync-timeout 10
+ # ip ospf dead-interval 5
+ # ip ospf priority 25
+ # ip ospf demand-circuit ignore
+ # ip ospf bfd
+ # ip ospf adjacency stagger disable
+ # ip ospf ttl-security hops 50
+ # ip ospf shutdown
+ # ip ospf 10 area 30
+ # ip ospf cost 5
+ # ipv6 ospf 35 area 45
+ # ipv6 ospf priority 55
+ # ipv6 ospf transmit-delay 45
+ # ipv6 ospf database-filter all out
+ # ipv6 ospf adjacency stagger disable
+ # ipv6 ospf manet peering link-metrics 10
+ # interface GigabitEthernet0/2
+
+ - name: Replaced provided OSPF Interfaces configuration
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ address_family:
+ - afi: ipv6
+ process:
+ id: 55
+ area_id: 105
+ adjacency: true
+ priority: 20
+ transmit_delay: 30
+ state: replaced
+
+ # Commands Fired:
+ # ---------------
+ # "commands": [
+ # "interface GigabitEthernet0/2",
+ # "ipv6 ospf 55 area 105",
+ # "ipv6 ospf adjacency stagger disable",
+ # "ipv6 ospf priority 20",
+ # "ipv6 ospf transmit-delay 30"
+ # ]
+
+ # After state:
+ # -------------
+ # router-ios#sh running-config | section ^interface
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip ospf network broadcast
+ # ip ospf resync-timeout 10
+ # ip ospf dead-interval 5
+ # ip ospf priority 25
+ # ip ospf demand-circuit ignore
+ # ip ospf bfd
+ # ip ospf adjacency stagger disable
+ # ip ospf ttl-security hops 50
+ # ip ospf shutdown
+ # ip ospf 10 area 30
+ # ip ospf cost 5
+ # ipv6 ospf 35 area 45
+ # ipv6 ospf priority 55
+ # ipv6 ospf transmit-delay 45
+ # ipv6 ospf database-filter all out
+ # ipv6 ospf adjacency stagger disable
+ # ipv6 ospf manet peering link-metrics 10
+ # interface GigabitEthernet0/2
+ # ipv6 ospf 55 area 105
+ # ipv6 ospf priority 20
+ # ipv6 ospf transmit-delay 30
+ # ipv6 ospf adjacency stagger disable
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^interface
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip ospf network broadcast
+ # ip ospf resync-timeout 10
+ # ip ospf dead-interval 5
+ # ip ospf priority 25
+ # ip ospf demand-circuit ignore
+ # ip ospf bfd
+ # ip ospf adjacency stagger disable
+ # ip ospf ttl-security hops 50
+ # ip ospf shutdown
+ # ip ospf 10 area 30
+ # ip ospf cost 5
+ # ipv6 ospf 35 area 45
+ # ipv6 ospf priority 55
+ # ipv6 ospf transmit-delay 45
+ # ipv6 ospf database-filter all out
+ # ipv6 ospf adjacency stagger disable
+ # ipv6 ospf manet peering link-metrics 10
+ # interface GigabitEthernet0/2
+
+ - name: Gather OSPF Interfaces provided configurations
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "name": "GigabitEthernet0/2"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "adjacency": true,
+ # "afi": "ipv4",
+ # "bfd": true,
+ # "cost": {
+ # "interface_cost": 5
+ # },
+ # "dead_interval": {
+ # "time": 5
+ # },
+ # "demand_circuit": {
+ # "ignore": true
+ # },
+ # "network": {
+ # "broadcast": true
+ # },
+ # "priority": 25,
+ # "process": {
+ # "area_id": "30",
+ # "id": 10
+ # },
+ # "resync_timeout": 10,
+ # "shutdown": true,
+ # "ttl_security": {
+ # "hops": 50
+ # }
+ # },
+ # {
+ # "adjacency": true,
+ # "afi": "ipv6",
+ # "database_filter": true,
+ # "manet": {
+ # "link_metrics": {
+ # "cost_threshold": 10
+ # }
+ # },
+ # "priority": 55,
+ # "process": {
+ # "area_id": "45",
+ # "id": 35
+ # },
+ # "transmit_delay": 45
+ # }
+ # ],
+ # "name": "GigabitEthernet0/1"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0"
+ # }
+ # ]
+
+ # After state:
+ # ------------
+ #
+ # router-ios#sh running-config | section ^interface
+ # interface GigabitEthernet0/0
+ # interface GigabitEthernet0/1
+ # ip ospf network broadcast
+ # ip ospf resync-timeout 10
+ # ip ospf dead-interval 5
+ # ip ospf priority 25
+ # ip ospf demand-circuit ignore
+ # ip ospf bfd
+ # ip ospf adjacency stagger disable
+ # ip ospf ttl-security hops 50
+ # ip ospf shutdown
+ # ip ospf 10 area 30
+ # ip ospf cost 5
+ # ipv6 ospf 35 area 45
+ # ipv6 ospf priority 55
+ # ipv6 ospf transmit-delay 45
+ # ipv6 ospf database-filter all out
+ # ipv6 ospf adjacency stagger disable
+ # ipv6 ospf manet peering link-metrics 10
+ # interface GigabitEthernet0/2
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ address_family:
+ - afi: ipv4
+ process:
+ id: 10
+ area_id: 30
+ adjacency: true
+ bfd: true
+ cost:
+ interface_cost: 5
+ dead_interval:
+ time: 5
+ demand_circuit:
+ ignore: true
+ network:
+ broadcast: true
+ priority: 25
+ resync_timeout: 10
+ shutdown: true
+ ttl_security:
+ hops: 50
+ - afi: ipv6
+ process:
+ id: 35
+ area_id: 45
+ adjacency: true
+ database_filter: true
+ manet:
+ link_metrics:
+ cost_threshold: 10
+ priority: 55
+ transmit_delay: 45
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "interface GigabitEthernet0/1",
+ # "ip ospf 10 area 30",
+ # "ip ospf adjacency stagger disable",
+ # "ip ospf bfd",
+ # "ip ospf cost 5",
+ # "ip ospf dead-interval 5",
+ # "ip ospf demand-circuit ignore",
+ # "ip ospf network broadcast",
+ # "ip ospf priority 25",
+ # "ip ospf resync-timeout 10",
+ # "ip ospf shutdown",
+ # "ip ospf ttl-security hops 50",
+ # "ipv6 ospf 35 area 45",
+ # "ipv6 ospf adjacency stagger disable",
+ # "ipv6 ospf database-filter all out",
+ # "ipv6 ospf manet peering link-metrics 10",
+ # "ipv6 ospf priority 55",
+ # "ipv6 ospf transmit-delay 45"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # interface GigabitEthernet0/2
+ # interface GigabitEthernet0/1
+ # ip ospf network broadcast
+ # ip ospf resync-timeout 10
+ # ip ospf dead-interval 5
+ # ip ospf priority 25
+ # ip ospf demand-circuit ignore
+ # ip ospf bfd
+ # ip ospf adjacency stagger disable
+ # ip ospf ttl-security hops 50
+ # ip ospf shutdown
+ # ip ospf 10 area 30
+ # ip ospf cost 5
+ # ipv6 ospf 35 area 45
+ # ipv6 ospf priority 55
+ # ipv6 ospf transmit-delay 45
+ # ipv6 ospf database-filter all out
+ # ipv6 ospf adjacency stagger disable
+ # ipv6 ospf manet peering link-metrics 10
+ # interface GigabitEthernet0/0
+
+ - name: Parse the provided configuration with the exisiting running configuration
+ cisco.ios.ios_ospf_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": [
+ # },
+ # {
+ # "name": "GigabitEthernet0/2"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "adjacency": true,
+ # "afi": "ipv4",
+ # "bfd": true,
+ # "cost": {
+ # "interface_cost": 5
+ # },
+ # "dead_interval": {
+ # "time": 5
+ # },
+ # "demand_circuit": {
+ # "ignore": true
+ # },
+ # "network": {
+ # "broadcast": true
+ # },
+ # "priority": 25,
+ # "process": {
+ # "area_id": "30",
+ # "id": 10
+ # },
+ # "resync_timeout": 10,
+ # "shutdown": true,
+ # "ttl_security": {
+ # "hops": 50
+ # }
+ # },
+ # {
+ # "adjacency": true,
+ # "afi": "ipv6",
+ # "database_filter": true,
+ # "manet": {
+ # "link_metrics": {
+ # "cost_threshold": 10
+ # }
+ # },
+ # "priority": 55,
+ # "process": {
+ # "area_id": "45",
+ # "id": 35
+ # },
+ # "transmit_delay": 45
+ # }
+ # ],
+ # "name": "GigabitEthernet0/1"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0"
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/1&#x27;, &#x27;ip ospf 10 area 30&#x27;, &#x27;ip ospf cost 5&#x27;, &#x27;ip ospf priority 25&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ospfv2_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ospfv2_module.rst
new file mode 100644
index 00000000..70a5383b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ospfv2_module.rst
@@ -0,0 +1,5254 @@
+.. _cisco.ios.ios_ospfv2_module:
+
+
+********************
+cisco.ios.ios_ospfv2
+********************
+
+**OSPFv2 resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module configures and manages the Open Shortest Path First (OSPF) version 2 on IOS platforms.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="6">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of OSPF options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>processes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of OSPF instance configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_family</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router Address Family configuration mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set a command to its defaults</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>snmp_context</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Modify snmp parameters</div>
+ <div>Configure SNMP context name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>topology</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Associate the routing protocol to a topology instance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>base</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Entering router topology sub mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Routing topology instance name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tid</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configuring the routing protocol topology tid</div>
+ <div>Note, please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>To configure control adjacency formation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of adjacencies allowed to be forming</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Initial number of adjacencies allowed to be forming in an area</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>none</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>No initial</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF area parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF area ID as a decimal value. Please refer vendor documentation of Valid values.</div>
+ <div>OSPF area ID in IP address format(e.g. A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Area authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable area authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use IPsec authentication</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable area specific capability</div>
+ <div>Enable exclusion of links from base topology</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the summary default-cost of a NSSA/stub area</div>
+ <div>Stub&#x27;s advertised external route metric</div>
+ <div>Note, please refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter networks between OSPF areas</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>The direction to apply on the filter networks sent to and from this area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of an IP prefix-list</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Originate Type 7 default into NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF default metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>1</li>
+ <li>2</li>
+ </ul>
+ </td>
+ <td>
+ <div>OSPF metric type for default routes</div>
+ <div>OSPF Link State type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Limit default advertisement to this NSSA area</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_ext_capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send domain specific capabilities into NSSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_redistribution</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>No redistribution into this NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSA into NSSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable a NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>translate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>always</li>
+ <li>suppress-fa</li>
+ </ul>
+ </td>
+ <td>
+ <div>Translate LSA</div>
+ <div>Always translate LSAs on this ABR</div>
+ <div>Suppress forwarding address in translated LSAs</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ranges</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Summarize routes matching address/mask (border routers only)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP address to match</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise this range (default)</div>
+ <div>Since, advertise when enabled is not shown in running-config idempotency won&#x27;t be maintained for the play in the second or next run of the play.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>User specified metric for this range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>netmask</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP mask for address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>DoNotAdvertise this range</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sham_link</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Define a sham link and its parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Associate a cost with the sham-link</div>
+ <div>Cost of the sham-link</div>
+ <div>Note, please refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>destination</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP addr associated with sham-link destination (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP addr associated with sham-link source (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl_security</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>TTL security check</div>
+ <div>Maximum number of IP hops allowed</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a stub area</div>
+ <div>Backbone can not be configured as stub area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_ext_capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send domain specific capabilities into stub area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSA into stub area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable a stub area</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Calculate OSPF interface cost according to bandwidth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reference_bandwidth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use reference bandwidth method to assign OSPF cost</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable OSPF auto-cost</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>BFD configuration commands</div>
+ <div>Enable BFD on all interfaces</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable specific OSPF feature</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Link-local Signaling (LLS) support</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>opaque</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Opaque LSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Transit Area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf_lite</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not perform PE specific checks</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>compatible</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF router compatibility list</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rfc1583</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>compatible with RFC 1583</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rfc1587</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>compatible with RFC 1587</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rfc5243</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>supports DBD exchange optimization</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Control distribution of default information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always advertise default route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF default metric</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF metric type for default routes</div>
+ <div>Note, please refer vendor documentation for respective valid range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Distribute a default route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route-map reference name</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set metric of redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>discard_route</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable or disable discard-route installation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Discard route for redistributed summarised routes</div>
+ <div>Administrative distance for redistributed summarised routes</div>
+ <div>Note, please refer vendor documentation for respective valid range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>internal</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Discard route for summarised internal routes</div>
+ <div>Administrative distance for summarised internal routes</div>
+ <div>Note, please refer vendor documentation for respective valid range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable discard-route installation</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Define an administrative distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF Administrative distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Access-list name/number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP Source address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Administrative distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wildcard_bits</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Wildcard bits</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ospf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>External type 5 and type 7 routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inter_area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Inter-area routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>intra_area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Intra-area routes</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distribute_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter networks in routing updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP access list</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter incoming and outgoing routing updates.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface configuration (GigabitEthernet A/B)</div>
+ <div>Valid with incoming traffic</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP access list name/number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Protocol config (bgp 1).</div>
+ <div>Valid with outgoing traffic</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter prefixes in routing updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter incoming and outgoing routing updates.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gateway_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Gateway name for filtering incoming updates based on gateway</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface configuration (GigabitEthernet A/B)</div>
+ <div>Valid with incoming traffic</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of an IP prefix-list</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Protocol config (bgp 1).</div>
+ <div>Valid with outgoing traffic</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter prefixes in routing updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route-map name</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF domain-id</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ip_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF domain ID in IP address format</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>secondary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Secondary Domain-ID</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>null</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Null Domain-ID</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain_tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF domain-tag which is OSPF domain tag - 32-bit value</div>
+ <div>Note, please refer vendor documentation for respective valid range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>event_log</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Event Logging</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable event Logging</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>one_shot</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable Logging When Log Buffer Becomes Full</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pause</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Pause Event Logging</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum Number of Events Stored in the Event Log</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>help</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Description of the interactive help system</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not complain about specific event</div>
+ <div>Do not complain upon receiving LSA of the specified type, MOSPF Type 6 LSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Source of the interface ID</div>
+ <div>SNMP MIB ifIndex</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ispf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable incremental SPF computation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Limit a specific OSPF feature and LS update, DBD, and LS request retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dc</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Demand circuit retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disble the feature</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The maximum number of retransmissions</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>non_dc</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Non-demand-circuit retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disble the feature</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The maximum number of retransmissions</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_rib_criteria</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable or disable usage of local RIB as route criteria</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable usage of local RIB as route criteria</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>forwarding_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Local RIB used to validate external/NSSA forwarding addresses</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inter_area_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Local RIB used as criteria for inter-area summaries</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa_translation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Local RIB used as criteria for NSSA translation</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_adjacency_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log changes in adjacency state</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>detail</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log all state changes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log changes in adjacency state</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of non self-generated LSAs to accept</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of times adjacencies can be suppressed</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Number of minutes during which all adjacencies are suppressed</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of non self-generated LSAs to accept</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reset_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Number of minutes after which ignore-count is reset to zero</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Threshold value (%) at which to generate a warning msg</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>warning_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Only give a warning message when limit is exceeded</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set maximum metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Override external-lsa metric with max-metric value</div>
+ <div>Overriding metric in external-LSAs</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>include_stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set maximum metric for stub links in router-LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_startup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set maximum metric temporarily after reboot</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time, in seconds, router-LSAs are originated with max-metric</div>
+ <div>Note, please refer vendor documentation for respective valid range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for_bgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Let BGP decide when to originate router-LSA with normal metric</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Maximum metric in self-originated router-LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Override summary-lsa metric with max-metric value</div>
+ <div>Note, please refer vendor documentation for respective valid range</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum_paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Forward packets over multiple paths</div>
+ <div>Number of paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mpls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure MPLS routing protocol parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ldp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>routing protocol commands for MPLS LDP</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>autoconfig</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>routing protocol commands for MPLS LDP</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure an OSPF area to run MPLS LDP</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure LDP automatic configuration and set the config</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sync</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure LDP-IGP Synchronization</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>traffic_eng</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Let BGP decide when to originate router-LSA with normal metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure an ospf area to run MPLS Traffic Engineering</div>
+ <div>OSPF area ID as a decimal value or in IP address format</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>autoroute_exclude</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MPLS TE autoroute exclude</div>
+ <div>Filter prefixes based on name of an IP prefix-list</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MPLS TE interface configuration for this OSPF process</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Advertise MPLS TE information for this interface into area</div>
+ <div>OSPF area ID as a decimal value</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>TE Interface configuration (GigabitEthernet A/B)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mesh_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Traffic Engineering Mesh-Group advertisement</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>configure flooding scope as area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Mesh Group Id</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface configuration (GigabitEthernet A/B)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multicast_intact</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>MPLS TE and PIM interaction</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router Interface configuration (GigabitEthernet A/B)</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a neighbor router</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor address (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF cost for point-to-multipoint neighbor metric</div>
+ <div>Note, please refer vendor documentation for respective valid range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>database_filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter OSPF LSA during synchronization and flooding for point-to-multipoint neighbor</div>
+ <div>Filter all outgoing LSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>poll_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF dead-router polling interval of non-broadcast neighbor in Seconds</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF priority of non-broadcast neighbor priority</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable routing on an IP network</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the OSPF area ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wildcard_bits</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF wild card bits</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nsf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Non-stop forwarding</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cisco</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cisco Non-stop forwarding</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>disable helper support</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>helper</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>helper support</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ietf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IETF graceful restart</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>disable helper support</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>helper</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>helper support</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>strict_lsa_checking</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>enable helper strict LSA checking</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Suppress routing updates on an interface (GigabitEthernet A/B)</div>
+ <div>Interface name with respective interface number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_suppression</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable prefix suppression</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF topology priority</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>process_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Process ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>queue_depth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Hello/Router process queue depth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF Hello process queue depth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_packets</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>maximum number of packets in the queue</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unlimited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unlimited queue depth</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF Router process queue depth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_packets</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>maximum number of packets in the queue</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unlimited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unlimited queue depth</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router-id address for this OSPF process</div>
+ <div>OSPF router-id in IP address format (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Shutdown the router process</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure IP address summaries</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP summary address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mask</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP Summary mask</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not advertise or translate</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Limit summary to NSSA areas</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adjust routing timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF LSA timers, arrival timer</div>
+ <div>The minimum interval in milliseconds between accepting the same LSA</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pacing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF pacing timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flood</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF flood pacing timer</div>
+ <div>The minimum interval in msec to pace limit flooding on interface</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF LSA group pacing timer</div>
+ <div>Interval in sec between group of LSA being refreshed or maxaged</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retransmission</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF retransmission pacing timer</div>
+ <div>The minimum interval in msec between neighbor retransmissions</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throttle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF throttle timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF LSA throttle timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>first_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay to generate first occurrence of LSA in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum delay between originating the same LSA in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum delay between originating the same LSA in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF SPF throttle timers - Delay between receiving a change to SPF calculation in milliseconds - Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>between_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay between first and second SPF calculation in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum wait time in milliseconds for SPF calculations</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>receive_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay between receiving a change to SPF calculation in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>traffic_share</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>How to compute traffic share over alternate paths</div>
+ <div>All traffic shared among min metric paths</div>
+ <div>Use different interfaces for equal-cost paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl_security</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>TTL security check</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hops</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of IP hops allowed</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable TTL Security on all interfaces</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify parameters for a VPN Routing/Forwarding instance</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>sh running-config | section ^router ospf</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ <li>rendered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospf
+ # router ospf 200 vrf blue
+ # domain-id 192.0.3.1
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # area 10 capability default-exclusion
+ # distribute-list 10 out
+ # distribute-list 123 in
+ # router ospf 1
+ # max-metric router-lsa on-startup 110
+ # area 10 authentication message-digest
+ # area 10 nssa default-information-originate metric 10
+ # area 10 nssa translate type7 suppress-fa
+ # area 10 default-cost 10
+ # area 10 filter-list prefix test_prefix_out out
+ # network 198.51.100.0 0.0.0.255 area 5
+ # default-information originate
+
+ - name: Delete provided OSPF V2 processes
+ cisco.ios.ios_ospfv2:
+ config:
+ processes:
+ - process_id: 1
+ - process_id: 200
+ vrf: blue
+ state: deleted
+
+ # Commands Fired:
+ # ---------------
+ #
+ # "commands": [
+ # "no router ospf 1"
+ # ]
+
+ # After state:
+ # -------------
+ # router-ios#sh running-config | section ^router ospf
+ # router ospf 200 vrf blue
+ # domain-id 192.0.3.1
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # area 10 capability default-exclusion
+ # distribute-list 10 out
+ # distribute-list 123 in
+
+ # Using deleted without any config passed (NOTE: This will delete all OSPFV2 configuration from device)
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospf
+ # router ospf 200 vrf blue
+ # domain-id 192.0.3.1
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # area 10 capability default-exclusion
+ # distribute-list 10 out
+ # distribute-list 123 in
+ # router ospf 1
+ # max-metric router-lsa on-startup 110
+ # area 10 authentication message-digest
+ # area 10 nssa default-information-originate metric 10
+ # area 10 nssa translate type7 suppress-fa
+ # area 10 default-cost 10
+ # area 10 filter-list prefix test_prefix_out out
+ # network 198.51.100.0 0.0.0.255 area 5
+ # default-information originate
+
+ - name: Delete all OSPF processes
+ cisco.ios.ios_ospfv2:
+ state: deleted
+
+ # Commands Fired:
+ # ---------------
+ #
+ # "commands": [
+ # "no router ospf 200 vrf blue",
+ # "no router ospf 1"
+ # ]
+
+ # After state:
+ # -------------
+ # router-ios#sh running-config | section ^router ospf
+ # router-ios#
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospf
+ # router-ios#
+
+ - name: Merge provided OSPF V2 configuration
+ cisco.ios.ios_ospfv2:
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ areas:
+ - area_id: '5'
+ capability: true
+ authentication:
+ enable: true
+ - area_id: '10'
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ default_cost: 10
+ filter_list:
+ - name: test_prefix_in
+ direction: in
+ - name: test_prefix_out
+ direction: out
+ network:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ area: 5
+ default_information:
+ originate: true
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.3.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ areas:
+ - area_id: '10'
+ capability: true
+ distribute_list:
+ acls:
+ - name: 10
+ direction: out
+ - name: 123
+ direction: in
+ state: merged
+
+ # Commands Fired:
+ # ---------------
+ #
+ # "commands": [
+ # "router ospf 200 vrf blue",
+ # "auto-cost reference-bandwidth 4",
+ # "distribute-list 10 out",
+ # "distribute-list 123 in",
+ # "domain-id 192.0.3.1",
+ # "max-metric router-lsa on-startup 100",
+ # "area 10 capability default-exclusion",
+ # "router ospf 1",
+ # "default-information originate",
+ # "max-metric router-lsa on-startup 110",
+ # "network 198.51.100.0 0.0.0.255 area 5",
+ # "area 10 authentication message-digest",
+ # "area 10 default-cost 10",
+ # "area 10 nssa translate type7 suppress-fa",
+ # "area 10 nssa default-information-originate metric 10",
+ # "area 10 filter-list prefix test_prefix_out out",
+ # "area 10 filter-list prefix test_prefix_in in",
+ # "area 5 authentication",
+ # "area 5 capability default-exclusion"
+ # ]
+
+ # After state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospf
+ # router ospf 200 vrf blue
+ # domain-id 192.0.3.1
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # area 10 capability default-exclusion
+ # distribute-list 10 out
+ # distribute-list 123 in
+ # router ospf 1
+ # max-metric router-lsa on-startup 110
+ # area 10 authentication message-digest
+ # area 10 nssa default-information-originate metric 10
+ # area 10 nssa translate type7 suppress-fa
+ # area 10 default-cost 10
+ # area 10 filter-list prefix test_prefix_out out
+ # network 198.51.100.0 0.0.0.255 area 5
+ # default-information originate
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospf
+ # router ospf 200 vrf blue
+ # domain-id 192.0.3.1
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # area 10 capability default-exclusion
+ # distribute-list 10 out
+ # distribute-list 123 in
+ # router ospf 1
+ # max-metric router-lsa on-startup 110
+ # area 10 authentication message-digest
+ # area 10 nssa default-information-originate metric 10
+ # area 10 nssa translate type7 suppress-fa
+ # area 10 default-cost 10
+ # area 10 filter-list prefix test_prefix_out out
+ # network 198.51.100.0 0.0.0.255 area 5
+ # default-information originate
+
+ - name: Override provided OSPF V2 configuration
+ cisco.ios.ios_ospfv2:
+ config:
+ processes:
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.4.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ maximum_paths: 15
+ ttl_security:
+ hops: 7
+ areas:
+ - area_id: '10'
+ default_cost: 10
+ authentication:
+ message_digest: true
+ - process_id: 100
+ vrf: ospf_vrf
+ domain_id:
+ ip_address:
+ address: 192.0.5.1
+ auto_cost:
+ reference_bandwidth: 5
+ areas:
+ - area_id: '5'
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ state: overridden
+
+ # Commands Fired:
+ # ---------------
+ #
+ # "commands": [
+ # "no router ospf 1",
+ # "router ospf 100 vrf ospf_vrf",
+ # "auto-cost reference-bandwidth 5",
+ # "domain-id 192.0.5.1",
+ # "area 5 authentication message-digest",
+ # "area 5 nssa translate type7 suppress-fa",
+ # "area 5 nssa default-information-originate metric 10",
+ # "router ospf 200 vrf blue",
+ # "no auto-cost reference-bandwidth 4",
+ # "no distribute-list 10 out",
+ # "no distribute-list 123 in",
+ # "domain-id 192.0.4.1",
+ # "max-metric router-lsa on-startup 200",
+ # "maximum-paths 15",
+ # "ttl-security all-interfaces hops 7",
+ # "area 10 authentication message-digest",
+ # "no area 10 capability default-exclusion",
+ # "area 10 default-cost 10"
+ # ]
+
+ # After state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospf
+ # router ospf 200 vrf blue
+ # domain-id 192.0.4.1
+ # max-metric router-lsa on-startup 200
+ # ttl-security all-interfaces hops 7
+ # area 10 authentication message-digest
+ # area 10 default-cost 10
+ # maximum-paths 15
+ # router ospf 100 vrf ospf_vrf
+ # domain-id 192.0.5.1
+ # auto-cost reference-bandwidth 5
+ # area 5 authentication message-digest
+ # area 5 nssa default-information-originate metric 10
+ # area 5 nssa translate type7 suppress-fa
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospf
+ # router ospf 200 vrf blue
+ # domain-id 192.0.3.1
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # area 10 capability default-exclusion
+ # distribute-list 10 out
+ # distribute-list 123 in
+ # router ospf 1
+ # max-metric router-lsa on-startup 110
+ # area 10 authentication message-digest
+ # area 10 nssa default-information-originate metric 10
+ # area 10 nssa translate type7 suppress-fa
+ # area 10 default-cost 10
+ # area 10 filter-list prefix test_prefix_out out
+ # network 198.51.100.0 0.0.0.255 area 5
+ # default-information originate
+
+ - name: Replaced provided OSPF V2 configuration
+ cisco.ios.ios_ospfv2:
+ config:
+ processes:
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.4.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ maximum_paths: 15
+ ttl_security:
+ hops: 7
+ areas:
+ - area_id: '10'
+ default_cost: 10
+ authentication:
+ message_digest: true
+ - process_id: 100
+ vrf: ospf_vrf
+ domain_id:
+ ip_address:
+ address: 192.0.5.1
+ auto_cost:
+ reference_bandwidth: 5
+ areas:
+ - area_id: '5'
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ state: replaced
+
+ # Commands Fired:
+ # ---------------
+ # "commands": [
+ # "router ospf 100 vrf ospf_vrf",
+ # "auto-cost reference-bandwidth 5",
+ # "domain-id 192.0.5.1",
+ # "area 5 authentication message-digest",
+ # "area 5 nssa translate type7 suppress-fa",
+ # "area 5 nssa default-information-originate metric 10",
+ # "router ospf 200 vrf blue",
+ # "no auto-cost reference-bandwidth 4",
+ # "no distribute-list 10 out",
+ # "no distribute-list 123 in",
+ # "domain-id 192.0.4.1",
+ # "max-metric router-lsa on-startup 200",
+ # "maximum-paths 15",
+ # "ttl-security all-interfaces hops 7",
+ # "area 10 authentication message-digest",
+ # "no area 10 capability default-exclusion",
+ # "area 10 default-cost 10"
+ # ]
+
+ # After state:
+ # -------------
+ # router-ios#sh running-config | section ^router ospf
+ # router ospf 200 vrf blue
+ # domain-id 192.0.4.1
+ # max-metric router-lsa on-startup 200
+ # ttl-security all-interfaces hops 7
+ # area 10 authentication message-digest
+ # area 10 default-cost 10
+ # maximum-paths 15
+ # router ospf 100 vrf ospf_vrf
+ # domain-id 192.0.5.1
+ # auto-cost reference-bandwidth 5
+ # area 5 authentication message-digest
+ # area 5 nssa default-information-originate metric 10
+ # area 5 nssa translate type7 suppress-fa
+ # router ospf 1
+ # max-metric router-lsa on-startup 110
+ # area 5 capability default-exclusion
+ # area 5 authentication
+ # area 10 authentication message-digest
+ # area 10 nssa default-information-originate metric 10
+ # area 10 nssa translate type7 suppress-fa
+ # area 10 default-cost 10
+ # area 10 filter-list prefix test_prefix_in in
+ # area 10 filter-list prefix test_prefix_out out
+ # network 198.51.100.0 0.0.0.255 area 5
+ # default-information originate
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospf
+ # router ospf 200 vrf blue
+ # domain-id 192.0.3.1
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # area 10 capability default-exclusion
+ # distribute-list 10 out
+ # distribute-list 123 in
+ # router ospf 1
+ # max-metric router-lsa on-startup 110
+ # area 10 authentication message-digest
+ # area 10 nssa default-information-originate metric 10
+ # area 10 nssa translate type7 suppress-fa
+ # area 10 default-cost 10
+ # area 10 filter-list prefix test_prefix_out out
+ # network 198.51.100.0 0.0.0.255 area 5
+ # default-information originate
+
+ - name: Gather OSPFV2 provided configurations
+ cisco.ios.ios_ospfv2:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "5",
+ # "authentication": {
+ # "enable": true
+ # },
+ # "capability": true
+ # },
+ # {
+ # "area_id": "10",
+ # "authentication": {
+ # "message_digest": true
+ # },
+ # "default_cost": 10,
+ # "filter_list": [
+ # {
+ # "direction": "in",
+ # "name": "test_prefix_in"
+ # },
+ # {
+ # "direction": "out",
+ # "name": "test_prefix_out"
+ # }
+ # ],
+ # "nssa": {
+ # "default_information_originate": {
+ # "metric": 10
+ # },
+ # "translate": "suppress-fa"
+ # }
+ # }
+ # ],
+ # "default_information": {
+ # "originate": true
+ # },
+ # "max_metric": {
+ # "on_startup": {
+ # "time": 110
+ # },
+ # "router_lsa": true
+ # },
+ # "network": {
+ # "address": "198.51.100.0",
+ # "area": "5",
+ # "wildcard_bits": "0.0.0.255"
+ # },
+ # "process_id": 1
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "capability": true
+ # }
+ # ],
+ # "auto_cost": {
+ # "reference_bandwidth": 4
+ # },
+ # "distribute_list": {
+ # "acls": [
+ # {
+ # "direction": "out",
+ # "name": "10"
+ # },
+ # {
+ # "direction": "in",
+ # "name": "123"
+ # }
+ # ]
+ # },
+ # "domain_id": {
+ # "ip_address": {
+ # "address": "192.0.3.1"
+ # }
+ # },
+ # "max_metric": {
+ # "on_startup": {
+ # "time": 100
+ # },
+ # "router_lsa": true
+ # },
+ # "process_id": 200,
+ # "vrf": "blue"
+ # }
+ # ]
+ # }
+
+ # After state:
+ # ------------
+ #
+ # router-ios#sh running-config | section ^router ospf
+ # router ospf 200 vrf blue
+ # domain-id 192.0.3.1
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # area 10 capability default-exclusion
+ # distribute-list 10 out
+ # distribute-list 123 in
+ # router ospf 1
+ # max-metric router-lsa on-startup 110
+ # area 10 authentication message-digest
+ # area 10 nssa default-information-originate metric 10
+ # area 10 nssa translate type7 suppress-fa
+ # area 10 default-cost 10
+ # area 10 filter-list prefix test_prefix_out out
+ # network 198.51.100.0 0.0.0.255 area 5
+ # default-information originate
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_ospfv2:
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ areas:
+ - area_id: '5'
+ capability: true
+ authentication:
+ enable: true
+ - area_id: '10'
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ default_cost: 10
+ filter_list:
+ - name: test_prefix_in
+ direction: in
+ - name: test_prefix_out
+ direction: out
+ network:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ area: 5
+ default_information:
+ originate: true
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.3.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ areas:
+ - area_id: '10'
+ capability: true
+ distribute_list:
+ acls:
+ - name: 10
+ direction: out
+ - name: 123
+ direction: in
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "router ospf 200 vrf blue",
+ # "auto-cost reference-bandwidth 4",
+ # "distribute-list 10 out",
+ # "distribute-list 123 in",
+ # "domain-id 192.0.3.1",
+ # "max-metric router-lsa on-startup 100",
+ # "area 10 capability default-exclusion",
+ # "router ospf 1",
+ # "default-information originate",
+ # "max-metric router-lsa on-startup 110",
+ # "network 198.51.100.0 0.0.0.255 area 5",
+ # "area 10 authentication message-digest",
+ # "area 10 default-cost 10",
+ # "area 10 nssa translate type7 suppress-fa",
+ # "area 10 nssa default-information-originate metric 10",
+ # "area 10 filter-list prefix test_prefix_out out",
+ # "area 10 filter-list prefix test_prefix_in in",
+ # "area 5 authentication",
+ # "area 5 capability default-exclusion"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # router ospf 100
+ # auto-cost reference-bandwidth 5
+ # domain-id 192.0.5.1
+ # area 5 authentication message-digest
+ # area 5 nssa translate type7 suppress-fa
+ # area 5 nssa default-information-originate metric 10
+
+ - name: Parse the provided configuration with the exisiting running configuration
+ cisco.ios.ios_ospfv2:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "5",
+ # "authentication": {
+ # "message_digest": true
+ # },
+ # "nssa": {
+ # "default_information_originate": {
+ # "metric": 10
+ # },
+ # "translate": "suppress-fa"
+ # }
+ # }
+ # ],
+ # "auto_cost": {
+ # "reference_bandwidth": 5
+ # },
+ # "domain_id": {
+ # "ip_address": {
+ # "address": "192.0.5.1"
+ # }
+ # },
+ # "process_id": 100
+ # }
+ # ]
+ # }
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router ospf 200 vrf blue&#x27;, &#x27;auto-cost reference-bandwidth 5&#x27;, &#x27;domain-id 192.0.4.1&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ospfv3_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ospfv3_module.rst
new file mode 100644
index 00000000..882dc414
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ospfv3_module.rst
@@ -0,0 +1,7255 @@
+.. _cisco.ios.ios_ospfv3_module:
+
+
+********************
+cisco.ios.ios_ospfv3
+********************
+
+**OSPFv3 resource module**
+
+
+Version added: 1.1.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module configures and manages the Open Shortest Path First (OSPF) version 3 on IOS platforms.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="7">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of configurations for ospfv3.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>processes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of OSPF instance configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_family</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter Address Family command mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Control adjacency formation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable adjacency staggering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of adjacencies allowed to be forming</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Initial number of adjacencies allowed to be forming in an area</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>none</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>No initial</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enter Address Family command mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF area parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF area ID as a decimal value. Please refer vendor documentation of Valid values.</div>
+ <div>OSPF area ID in IP address format(e.g. A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key_chain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use a key-chain for cryptographic authentication keys</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>null</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use no authentication</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the summary default-cost of a NSSA/stub area</div>
+ <div>Stub&#x27;s advertised external route metric</div>
+ <div>Note, please refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter networks between OSPFv3 areas</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>The direction to apply on the filter networks sent to and from this area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of an IP prefix-list</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>normal</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify a normal area type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Originate Type 7 default into NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF default metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>1</li>
+ <li>2</li>
+ </ul>
+ </td>
+ <td>
+ <div>OSPF metric type for default routes</div>
+ <div>OSPF Link State type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Limit default advertisement to this NSSA area</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_redistribution</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>No redistribution into this NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSA into NSSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable a NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>translate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>always</li>
+ <li>suppress-fa</li>
+ </ul>
+ </td>
+ <td>
+ <div>Translate LSA</div>
+ <div>Always translate LSAs on this ABR</div>
+ <div>Suppress forwarding address in translated LSAs</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ranges</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Summarize routes matching address/mask (border routers only)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP address to match</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise this range (default)</div>
+ <div>Since, advertise when enabled is not shown in running-config idempotency won&#x27;t be maintained for the play in the second or next run of the play.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>User specified metric for this range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>netmask</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP mask for address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>DoNotAdvertise this range</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sham_link</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Define a sham link and its parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key_chain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use a key-chain for cryptographic authentication keys</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>null</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use no authentication</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Associate a cost with the sham-link</div>
+ <div>Cost of the sham-link</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>destination</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 address associated with sham-link destination (X:X:X:X::X)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 address associated with sham-link source (X:X:X:X::X)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl_security</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>TTL security check</div>
+ <div>maximum number of hops allowed</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a stub area</div>
+ <div>Backbone can not be configured as stub area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSA into stub area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable a stub area</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication parameters</div>
+ <div>Authentication operation mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>deployment</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Deployment mode of operation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>normal</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Normal mode of operation</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Calculate OSPF interface cost according to bandwidth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reference_bandwidth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use reference bandwidth method to assign OSPF cost</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable OSPF auto-cost</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD configuration commands</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all_interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable BFD on all interfaces</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable BFD on all interfaces</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable a specific feature</div>
+ <div>Do not perform PE specific checks</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>compatible</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv3 router compatibility list</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rfc1583</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>compatible with RFC 1583</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rfc1587</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>compatible with RFC 1587</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rfc5243</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>supports DBD exchange optimization</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Control distribution of default information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always advertise default route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF default metric</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF metric type for default routes</div>
+ <div>Note, please refer vendor documentation for respective valid range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Distribute a default route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route-map reference name</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set metric of redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>discard_route</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable or disable discard-route installation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Discard route for summarised redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>internal</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Discard route for summarised inter-area routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sham_link</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Discard route for sham-link routes</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Define an administrative distance</div>
+ <div>Note, please refer vendor documentation for respective valid range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distribute_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter networks in routing updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP access list</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter incoming and outgoing routing updates.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface configuration (GigabitEthernet A/B)</div>
+ <div>Valid with incoming traffic</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP access list name/number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Protocol config (bgp 1).</div>
+ <div>Valid with outgoing traffic</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter prefixes in routing updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter incoming and outgoing routing updates.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gateway_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Gateway name for filtering incoming updates based on gateway</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface configuration (GigabitEthernet A/B)</div>
+ <div>Valid with incoming traffic</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of an IP prefix-list</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Protocol config (bgp 1).</div>
+ <div>Valid with outgoing traffic</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter prefixes in routing updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route-map name</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>event_log</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Event Logging</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable event Logging</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>one_shot</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable Logging When Log Buffer Becomes Full</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pause</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Pause Event Logging</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum Number of Events Stored in the Event Log</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Graceful-restart options</div>
+ <div>helper support</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>disable helper support</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>helper support enabled</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>strict_lsa_checking</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>enable helper strict LSA checking</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source of the interface ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ios_if_index</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>IOS interface number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>snmp_if_index</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>SNMP MIB ifIndex</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Limit a specific OSPF feature</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dc</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Demand circuit retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disble the feature</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The maximum number of retransmissions</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>non_dc</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Non-demand-circuit retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disble the feature</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The maximum number of retransmissions</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_rib_criteria</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable or disable usage of local RIB as route criteria</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable usage of local RIB as route criteria</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>forwarding_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Local RIB used to validate external/NSSA forwarding addresses</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inter_area_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Local RIB used as criteria for inter-area summaries</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa_translation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Local RIB used as criteria for NSSA translation</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_adjacency_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log changes in adjacency state</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>detail</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log all state changes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log changes in adjacency state</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>manet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET OSPF parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cache</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET cache sizes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acknowledgement</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET acknowledgement cache size</div>
+ <div>Maximum number of acknowledgements in cache</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET LSA cache size</div>
+ <div>Maximum number of LSAs in cache</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Unicast Hellos rather than multicast</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multicast</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Multicast Hello requests and responses rather than unicast</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unicast</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unicast Hello requests and responses rather than multicast</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peering</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MANET OSPF Smart Peering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable selective peering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>per_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Select peers per interface rather than per node</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redundancy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redundant paths</div>
+ <div>Number of redundant OSPF paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable selective peering</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>willingness</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify and Relay willingness value</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of non self-generated LSAs to accept</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of times adjacencies can be suppressed</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Number of minutes during which all adjacencies are suppressed</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of non self-generated LSAs to accept</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reset_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Number of minutes after which ignore-count is reset to zero</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Threshold value (%) at which to generate a warning msg</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>warning_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Only give a warning message when limit is exceeded</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set maximum metric</div>
+ <div>Maximum metric in self-originated router-LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>disable maximum metric in self-originated router-LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Override external-lsa metric with max-metric value</div>
+ <div>Overriding metric in external-LSAs</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inter_area_lsas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Override inter-area-lsas metric with max-metric value</div>
+ <div>Overriding metric in inter-area-LSAs</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_startup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set maximum metric temporarily after reboot</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time, in seconds, router-LSAs are originated with max-metric</div>
+ <div>Note, please refer vendor documentation for respective valid range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for_bgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Let BGP decide when to originate router-LSA with normal metric</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub_prefix_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set maximum metric for stub links in prefix LSAs</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum_paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Forward packets over multiple paths</div>
+ <div>Number of paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Suppress routing updates on an interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_suppression</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Prefix suppression</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable prefix suppression</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable prefix suppression</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>queue_depth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Hello/Router process queue depth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF Hello process queue depth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_packets</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>maximum number of packets in the queue</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unlimited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unlimited queue depth</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF Router process queue depth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_packets</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>maximum number of packets in the queue</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unlimited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unlimited queue depth</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router-id address for this OSPF process</div>
+ <div>OSPF router-id in IP address format (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Shutdown the router process</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable Shutdown</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Shutdown the router process</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure IP address summaries</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP summary address (A.B.C.D)</div>
+ <div>IP prefix &lt;network&gt;/&lt;length&gt; (A.B.C.D/nn)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mask</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP Summary mask</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not advertise or translate</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Limit summary to NSSA areas</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adjust routing timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF LSA timers, arrival timer</div>
+ <div>The minimum interval in milliseconds between accepting the same LSA</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>manet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF MANET timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cache</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET cache sizes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acknowledgement</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET acknowledgement cache size</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redundancy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET LSA cache size</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unicast Hellos rather than multicast</div>
+ <div>Unicast Hello requests and responses rather than multicast</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peering</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MANET OSPF Smart Peering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>per_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Select peers per interface rather than per node</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redundancy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redundant paths</div>
+ <div>Number of redundant OSPF paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable selective peering</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>willingness</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify and Relay willingness value</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pacing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF pacing timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flood</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF flood pacing timer</div>
+ <div>The minimum interval in msec to pace limit flooding on interface</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF LSA group pacing timer</div>
+ <div>Interval in sec between group of LSA being refreshed or maxaged</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retransmission</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF retransmission pacing timer</div>
+ <div>The minimum interval in msec between neighbor retransmissions</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throttle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF throttle timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF LSA throttle timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>first_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay to generate first occurrence of LSA in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum delay between originating the same LSA in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum delay between originating the same LSA in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF SPF throttle timers - Delay between receiving a change to SPF calculation in milliseconds - Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>between_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay between first and second SPF calculation in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum wait time in milliseconds for SPF calculations</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>receive_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay between receiving a change to SPF calculation in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unicast</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Address Family modifier</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify parameters for a VPN Routing/Forwarding instance</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Control adjacency formation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of adjacencies allowed to be forming</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Initial number of adjacencies allowed to be forming in an area</div>
+ <div>Please refer vendor documentation for valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>none</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>No initial</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF area parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF area ID as a decimal value. Please refer vendor documentation of Valid values.</div>
+ <div>OSPF area ID in IP address format(e.g. A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use IPsec authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hex_string</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>SHA-1 key (40 chars)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>md5</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use MD5 authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sha1</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use SHA-1 authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the SPI (Security Parameters Index)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key_chain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use a key-chain for cryptographic authentication keys</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the summary default-cost of a NSSA/stub area</div>
+ <div>Stub&#x27;s advertised external route metric</div>
+ <div>Note, please refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Originate Type 7 default into NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF default metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>1</li>
+ <li>2</li>
+ </ul>
+ </td>
+ <td>
+ <div>OSPF metric type for default routes</div>
+ <div>OSPF Link State type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Limit default advertisement to this NSSA area</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_redistribution</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>No redistribution into this NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSA into NSSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable a NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>translate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>always</li>
+ <li>suppress-fa</li>
+ </ul>
+ </td>
+ <td>
+ <div>Translate LSA</div>
+ <div>Always translate LSAs on this ABR</div>
+ <div>Suppress forwarding address in translated LSAs</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a stub area</div>
+ <div>Backbone can not be configured as stub area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSA into stub area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable a stub area</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Authentication parameter mode</div>
+ <div>Deployment mode of operation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Calculate OSPF interface cost according to bandwidth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reference_bandwidth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use reference bandwidth method to assign OSPF cost</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable OSPF auto-cost</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>BFD configuration commands</div>
+ <div>Enable BFD on all interfaces</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>compatible</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv3 router compatibility list</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rfc1583</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>compatible with RFC 1583</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rfc1587</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>compatible with RFC 1587</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rfc5243</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>supports DBD exchange optimization</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>event_log</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Event Logging</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable event Logging</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>one_shot</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable Logging When Log Buffer Becomes Full</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pause</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Pause Event Logging</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum Number of Events Stored in the Event Log</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Graceful-restart options for helper support</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>disable helper support</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>strict_lsa_checking</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>enable helper strict LSA checking</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>help</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Description of the interactive help system</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Source of the interface ID</div>
+ <div>SNMP MIB ifIndex</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Limit a specific OSPF feature and LS update, DBD, and LS request retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dc</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Demand circuit retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disble the feature</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The maximum number of retransmissions</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>non_dc</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Non-demand-circuit retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disble the feature</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The maximum number of retransmissions</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_rib_criteria</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable or disable usage of local RIB as route criteria</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable usage of local RIB as route criteria</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>forwarding_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Local RIB used to validate external/NSSA forwarding addresses</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inter_area_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Local RIB used as criteria for inter-area summaries</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa_translation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Local RIB used as criteria for NSSA translation</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_adjacency_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log changes in adjacency state</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>detail</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log all state changes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log changes in adjacency state</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>manet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET OSPF parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cache</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET cache sizes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acknowledgement</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET acknowledgement cache size</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redundancy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET LSA cache size</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unicast Hellos rather than multicast</div>
+ <div>Unicast Hello requests and responses rather than multicast</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peering</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MANET OSPF Smart Peering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>per_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Select peers per interface rather than per node</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redundancy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redundant paths</div>
+ <div>Number of redundant OSPF paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable selective peering</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>willingness</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify and Relay willingness value</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of non self-generated LSAs to accept</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of times adjacencies can be suppressed</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Number of minutes during which all adjacencies are suppressed</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of non self-generated LSAs to accept</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reset_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Number of minutes after which ignore-count is reset to zero</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Threshold value (%) at which to generate a warning msg</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>warning_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Only give a warning message when limit is exceeded</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set maximum metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Override external-lsa metric with max-metric value</div>
+ <div>Overriding metric in external-LSAs</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>include_stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set maximum metric for stub links in router-LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_startup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set maximum metric temporarily after reboot</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time, in seconds, router-LSAs are originated with max-metric</div>
+ <div>Note, please refer vendor documentation for respective valid range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for_bgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Let BGP decide when to originate router-LSA with normal metric</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Maximum metric in self-originated router-LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Override summary-lsa metric with max-metric value</div>
+ <div>Note, please refer vendor documentation for respective valid range</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Suppress routing updates on an interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_suppression</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable prefix suppression</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>process_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Process ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>queue_depth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Hello/Router process queue depth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF Hello process queue depth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_packets</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>maximum number of packets in the queue</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unlimited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unlimited queue depth</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router-id address for this OSPF process</div>
+ <div>OSPF router-id in IP address format (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Shutdown the router process</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adjust routing timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF LSA timers, arrival timer</div>
+ <div>The minimum interval in milliseconds between accepting the same LSA</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>manet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF MANET timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cache</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET cache sizes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acknowledgement</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET acknowledgement cache size</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redundancy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MANET LSA cache size</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unicast Hellos rather than multicast</div>
+ <div>Unicast Hello requests and responses rather than multicast</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peering</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MANET OSPF Smart Peering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>per_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Select peers per interface rather than per node</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redundancy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redundant paths</div>
+ <div>Number of redundant OSPF paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable selective peering</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>willingness</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify and Relay willingness value</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pacing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF pacing timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flood</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF flood pacing timer</div>
+ <div>The minimum interval in msec to pace limit flooding on interface</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF LSA group pacing timer</div>
+ <div>Interval in sec between group of LSA being refreshed or maxaged</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retransmission</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF retransmission pacing timer</div>
+ <div>The minimum interval in msec between neighbor retransmissions</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throttle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF throttle timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF LSA throttle timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>first_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay to generate first occurrence of LSA in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum delay between originating the same LSA in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum delay between originating the same LSA in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF SPF throttle timers - Delay between receiving a change to SPF calculation in milliseconds - Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>between_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay between first and second SPF calculation in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum wait time in milliseconds for SPF calculations</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>receive_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay between receiving a change to SPF calculation in milliseconds</div>
+ <div>Note, refer vendor documentation for respective valid values</div>
+ </td>
+ </tr>
+
+
+
+
+
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>sh running-config | section ^router ospfv3</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ <li>rendered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospfv3
+ # router ospfv3 1
+ # max-metric router-lsa on-startup 110
+ # area 10 nssa default-information-originate metric 10
+ # !
+ # address-family ipv4 unicast vrf blue
+ # adjacency stagger 50 50
+ # area 25 nssa default-information-originate metric 25 nssa-only
+ # exit-address-family
+ # router ospfv3 200
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # !
+ # address-family ipv4 unicast
+ # adjacency stagger 200 200
+ # exit-address-family
+
+ - name: Delete provided OSPF V3 processes
+ cisco.ios.ios_ospfv3:
+ config:
+ processes:
+ - process_id: 1
+ state: deleted
+
+ # Commands Fired:
+ # ---------------
+ #
+ # "commands": [
+ # "no router ospfv3 1"
+ # ]
+
+ # After state:
+ # -------------
+ # router-ios#sh running-config | section ^router ospfv3
+ # router ospfv3 200
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # !
+ # address-family ipv4 unicast
+ # adjacency stagger 200 200
+ # exit-address-family
+
+ # Using deleted without any config passed (NOTE: This will delete all OSPFV3 configuration from device)
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospfv3
+ # router ospfv3 1
+ # max-metric router-lsa on-startup 110
+ # area 10 nssa default-information-originate metric 10
+ # !
+ # address-family ipv4 unicast vrf blue
+ # adjacency stagger 50 50
+ # area 25 nssa default-information-originate metric 25 nssa-only
+ # exit-address-family
+ # router ospfv3 200
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # !
+ # address-family ipv4 unicast
+ # adjacency stagger 200 200
+ # exit-address-family
+
+ - name: Delete all OSPF processes
+ cisco.ios.ios_ospfv3:
+ state: deleted
+
+ # Commands Fired:
+ # ---------------
+ #
+ # "commands": [
+ # "no router ospfv3 200",
+ # "no router ospfv3 1"
+ # ]
+
+ # After state:
+ # -------------
+ # router-ios#sh running-config | section ^router ospfv3
+ # router-ios#
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospfv3
+ # router-ios#
+
+ - name: Merge provided OSPFV3 configuration
+ cisco.ios.ios_ospfv3:
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ address_family:
+ - afi: ipv4
+ unicast: true
+ vrf: blue
+ adjacency:
+ min_adjacency: 50
+ max_adjacency: 50
+ areas:
+ - area_id: 25
+ nssa:
+ default_information_originate:
+ metric: 25
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ timers:
+ throttle:
+ lsa:
+ first_delay: 12
+ min_delay: 14
+ max_delay: 16
+ - process_id: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 200
+ max_adjacency: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ state: merged
+
+ # Commands Fired:
+ # ---------------
+ #
+ # "commands": [
+ # "router ospfv3 1",
+ # "max-metric router-lsa on-startup 110",
+ # "area 10 nssa default-information-originate metric 10",
+ # "address-family ipv4 unicast vrf blue",
+ # "adjacency stagger 50 50",
+ # "area 25 nssa default-information-originate metric 25 nssa-only",
+ # "exit-address-family",
+ # "router ospfv3 200",
+ # "auto-cost reference-bandwidth 4",
+ # "max-metric router-lsa on-startup 100",
+ # "address-family ipv4 unicast",
+ # "adjacency stagger 200 200",
+ # "exit-address-family"
+ # ]
+
+ # After state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospfv3
+ # router ospfv3 1
+ # max-metric router-lsa on-startup 110
+ # area 10 nssa default-information-originate metric 10
+ # !
+ # address-family ipv4 unicast vrf blue
+ # adjacency stagger 50 50
+ # area 25 nssa default-information-originate metric 25 nssa-only
+ # exit-address-family
+ # router ospfv3 200
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # !
+ # address-family ipv4 unicast
+ # adjacency stagger 200 200
+ # exit-address-family
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # router ospfv3 1
+ # max-metric router-lsa on-startup 110
+ # area 10 nssa default-information-originate metric 10
+ # !
+ # address-family ipv4 unicast vrf blue
+ # adjacency stagger 50 50
+ # area 25 nssa default-information-originate metric 25 nssa-only
+ # exit-address-family
+ # router ospfv3 200
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # !
+ # address-family ipv4 unicast
+ # adjacency stagger 200 200
+ # exit-address-family
+
+ - name: Override provided OSPFV3 configuration
+ cisco.ios.ios_ospfv3:
+ config:
+ processes:
+ - process_id: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 50
+ max_adjacency: 50
+ areas:
+ - area_id: 200
+ nssa:
+ default_information_originate:
+ metric: 200
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ state: overridden
+
+ # Commands Fired:
+ # ---------------
+ #
+ # "commands": [
+ # "no router ospfv3 1",
+ # "router ospfv3 200",
+ # "no auto-cost reference-bandwidth 4",
+ # "max-metric router-lsa on-startup 200",
+ # "area 10 nssa default-information-originate metric 10",
+ # "address-family ipv4 unicast",
+ # "adjacency stagger 50 50",
+ # "area 200 nssa default-information-originate metric 200 nssa-only",
+ # "exit-address-family"
+ # ]
+
+ # After state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospfv3
+ # router ospfv3 200
+ # max-metric router-lsa on-startup 200
+ # area 10 nssa default-information-originate metric 10
+ # !
+ # address-family ipv4 unicast
+ # adjacency stagger 50 50
+ # area 200 nssa default-information-originate metric 200 nssa-only
+ # exit-address-family
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospfv3
+ # router ospfv3 1
+ # max-metric router-lsa on-startup 110
+ # area 10 nssa default-information-originate metric 10
+ # !
+ # address-family ipv4 unicast vrf blue
+ # adjacency stagger 50 50
+ # area 25 nssa default-information-originate metric 25 nssa-only
+ # exit-address-family
+ # router ospfv3 200
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # !
+ # address-family ipv4 unicast
+ # adjacency stagger 200 200
+ # exit-address-family
+
+ - name: Replaced provided OSPFV3 configuration
+ cisco.ios.ios_ospfv3:
+ config:
+ processes:
+ - process_id: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 50
+ max_adjacency: 50
+ areas:
+ - area_id: 200
+ nssa:
+ default_information_originate:
+ metric: 200
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ state: replaced
+
+ # Commands Fired:
+ # ---------------
+ # "commands": [
+ # "router ospfv3 200",
+ # "no auto-cost reference-bandwidth 4",
+ # "max-metric router-lsa on-startup 200",
+ # "area 10 nssa default-information-originate metric 10",
+ # "address-family ipv4 unicast",
+ # "adjacency stagger 50 50",
+ # "area 200 nssa default-information-originate metric 200 nssa-only",
+ # "exit-address-family"
+ # ]
+
+ # After state:
+ # -------------
+ # router-ios#sh running-config | section ^router ospfv3
+ # router ospfv3 1
+ # max-metric router-lsa on-startup 110
+ # area 10 nssa default-information-originate metric 10
+ # !
+ # address-family ipv4 unicast vrf blue
+ # adjacency stagger 50 50
+ # area 25 nssa default-information-originate metric 25 nssa-only
+ # exit-address-family
+ # router ospfv3 200
+ # max-metric router-lsa on-startup 200
+ # area 10 nssa default-information-originate metric 10
+ # !
+ # address-family ipv4 unicast
+ # adjacency stagger 50 50
+ # area 200 nssa default-information-originate metric 200 nssa-only
+ # exit-address-family
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # router-ios#sh running-config | section ^router ospfv3
+ # router ospfv3 1
+ # max-metric router-lsa on-startup 110
+ # area 10 nssa default-information-originate metric 10
+ # !
+ # address-family ipv4 unicast vrf blue
+ # adjacency stagger 50 50
+ # area 25 nssa default-information-originate metric 25 nssa-only
+ # exit-address-family
+ # router ospfv3 200
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # !
+ # address-family ipv4 unicast
+ # adjacency stagger 200 200
+ # exit-address-family
+
+ - name: Gather OSPFV3 provided configurations
+ cisco.ios.ios_ospfv3:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": {
+ # "processes": [
+ # {
+ # "address_family": [
+ # {
+ # "adjacency": {
+ # "max_adjacency": 50,
+ # "min_adjacency": 50
+ # },
+ # "afi": "ipv4",
+ # "areas": [
+ # {
+ # "area_id": "25",
+ # "nssa": {
+ # "default_information_originate": {
+ # "metric": 25,
+ # "nssa_only": true
+ # }
+ # }
+ # }
+ # ],
+ # "unicast": true,
+ # "vrf": "blue"
+ # }
+ # ],
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "nssa": {
+ # "default_information_originate": {
+ # "metric": 10
+ # }
+ # }
+ # }
+ # ],
+ # "max_metric": {
+ # "on_startup": {
+ # "time": 110
+ # },
+ # "router_lsa": true
+ # },
+ # "process_id": 1
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "adjacency": {
+ # "max_adjacency": 200,
+ # "min_adjacency": 200
+ # },
+ # "afi": "ipv4",
+ # "unicast": true
+ # }
+ # ],
+ # "auto_cost": {
+ # "reference_bandwidth": 4
+ # },
+ # "max_metric": {
+ # "on_startup": {
+ # "time": 100
+ # },
+ # "router_lsa": true
+ # },
+ # "process_id": 200
+ # }
+ # ]
+ # }
+
+ # After state:
+ # ------------
+ #
+ # router-ios#sh running-config | section ^router ospfv3
+ # router ospfv3 1
+ # max-metric router-lsa on-startup 110
+ # area 10 nssa default-information-originate metric 10
+ # !
+ # address-family ipv4 unicast vrf blue
+ # adjacency stagger 50 50
+ # area 25 nssa default-information-originate metric 25 nssa-only
+ # exit-address-family
+ # router ospfv3 200
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # !
+ # address-family ipv4 unicast
+ # adjacency stagger 200 200
+ # exit-address-family
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_ospfv3:
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ address_family:
+ - afi: ipv4
+ unicast: true
+ vrf: blue
+ adjacency:
+ min_adjacency: 50
+ max_adjacency: 50
+ areas:
+ - area_id: 25
+ nssa:
+ default_information_originate:
+ metric: 25
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ timers:
+ throttle:
+ lsa:
+ first_delay: 12
+ min_delay: 14
+ max_delay: 16
+ - process_id: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 200
+ max_adjacency: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "router ospfv3 1",
+ # "max-metric router-lsa on-startup 110",
+ # "area 10 nssa default-information-originate metric 10",
+ # "address-family ipv4 unicast vrf blue",
+ # "adjacency stagger 50 50",
+ # "area 25 nssa default-information-originate metric 25 nssa-only",
+ # "exit-address-family",
+ # "router ospfv3 200",
+ # "auto-cost reference-bandwidth 4",
+ # "max-metric router-lsa on-startup 100",
+ # "address-family ipv4 unicast",
+ # "adjacency stagger 200 200",
+ # "exit-address-family"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # router ospfv3 1
+ # max-metric router-lsa on-startup 110
+ # area 10 nssa default-information-originate metric 10
+ # !
+ # address-family ipv4 unicast vrf blue
+ # adjacency stagger 50 50
+ # area 25 nssa default-information-originate metric 25 nssa-only
+ # exit-address-family
+ # router ospfv3 200
+ # max-metric router-lsa on-startup 100
+ # auto-cost reference-bandwidth 4
+ # !
+ # address-family ipv4 unicast
+ # adjacency stagger 200 200
+ # exit-address-family
+
+ - name: Parse the provided configuration with the exisiting running configuration
+ cisco.ios.ios_ospfv3:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": {
+ # "processes": [
+ # {
+ # "address_family": [
+ # {
+ # "adjacency": {
+ # "max_adjacency": 50,
+ # "min_adjacency": 50
+ # },
+ # "afi": "ipv4",
+ # "areas": [
+ # {
+ # "area_id": "25",
+ # "nssa": {
+ # "default_information_originate": {
+ # "metric": 25,
+ # "nssa_only": true
+ # }
+ # }
+ # }
+ # ],
+ # "unicast": true,
+ # "vrf": "blue"
+ # }
+ # ],
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "nssa": {
+ # "default_information_originate": {
+ # "metric": 10
+ # }
+ # }
+ # }
+ # ],
+ # "max_metric": {
+ # "on_startup": {
+ # "time": 110
+ # },
+ # "router_lsa": true
+ # },
+ # "process_id": 1
+ # }
+ # ]
+ # }
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router ospfv3 1&#x27;, &#x27;address-family ipv4 unicast vrf blue&#x27;, &#x27;adjacency stagger 50 50&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ping_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ping_module.rst
new file mode 100644
index 00000000..e39ba2ae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_ping_module.rst
@@ -0,0 +1,463 @@
+.. _cisco.ios.ios_ping_module:
+
+
+******************
+cisco.ios.ios_ping
+******************
+
+**Tests reachability using ping from Cisco IOS network devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Tests reachability using ping from switch to a remote destination.
+- For a general purpose network module, see the :ref:`net_ping <net_ping_module>` module.
+- For Windows targets, use the :ref:`win_ping <win_ping_module>` module instead.
+- For targets running Python, use the :ref:`ping <ping_module>` module instead.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Number of packets to send.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The IP Address or hostname (resolvable by switch) of the remote node.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>df_bit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set the DF bit.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Size of packets to send.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The source IP Address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>absent</li>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines if the expected result is success or fail.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The VRF to use for forwarding.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For a general purpose network module, see the :ref:`net_ping <net_ping_module>` module.
+ - For Windows targets, use the :ref:`win_ping <win_ping_module>` module instead.
+ - For targets running Python, use the :ref:`ping <ping_module>` module instead.
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Test reachability to 10.10.10.10 using default vrf
+ cisco.ios.ios_ping:
+ dest: 10.10.10.10
+
+ - name: Test reachability to 10.20.20.20 using prod vrf
+ cisco.ios.ios_ping:
+ dest: 10.20.20.20
+ vrf: prod
+
+ - name: Test unreachability to 10.30.30.30 using default vrf
+ cisco.ios.ios_ping:
+ dest: 10.30.30.30
+ state: absent
+
+ - name: Test reachability to 10.40.40.40 using prod vrf and setting count and source
+ cisco.ios.ios_ping:
+ dest: 10.40.40.40
+ source: loopback0
+ vrf: prod
+ count: 20
+
+ - name: Test reachability to 10.50.50.50 using df-bit and size
+ cisco.ios.ios_ping:
+ dest: 10.50.50.50
+ df_bit: true
+ size: 1400
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Show the command sent.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ping vrf prod 10.40.40.40 count 20 source loopback0&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>packet_loss</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Percentage of packets lost.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">0%</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>packets_rx</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Packets successfully received.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">20</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>packets_tx</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Packets successfully transmitted.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">20</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>rtt</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Show RTT stats.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;avg&#x27;: 2, &#x27;max&#x27;: 8, &#x27;min&#x27;: 1}</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jacob McGill (@jmcgill298)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_static_route_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_static_route_module.rst
new file mode 100644
index 00000000..f893faf8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_static_route_module.rst
@@ -0,0 +1,640 @@
+.. _cisco.ios.ios_static_route_module:
+
+
+**************************
+cisco.ios.ios_static_route
+**************************
+
+**(deprecated, removed after 2022-06-01) Manage static IP routes on Cisco IOS network devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Newer and updated modules released with more functionality.
+:Alternative: ios_static_routes
+
+
+
+Synopsis
+--------
+- This module provides declarative management of static IP routes on Cisco IOS network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Admin distance of the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of static route definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Admin distance of the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface of the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mask</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network prefix mask of the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the static route</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: description</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Next hop IP of the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network prefix of the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the static route configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag of the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>track</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Tracked item to depend on for the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VRF of the static route.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface of the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mask</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network prefix mask of the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the static route</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: description</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Next hop IP of the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network prefix of the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the static route configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag of the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>track</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Tracked item to depend on for the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VRF of the static route.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.6
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure static route
+ cisco.ios.ios_static_route:
+ prefix: 192.168.2.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.1
+
+ - name: configure black hole in vrf blue depending on tracked item 10
+ cisco.ios.ios_static_route:
+ prefix: 192.168.2.0
+ mask: 255.255.255.0
+ vrf: blue
+ interface: null0
+ track: 10
+
+ - name: configure ultimate route with name and tag
+ cisco.ios.ios_static_route:
+ prefix: 192.168.2.0
+ mask: 255.255.255.0
+ interface: GigabitEthernet1
+ name: hello world
+ tag: 100
+
+ - name: remove configuration
+ cisco.ios.ios_static_route:
+ prefix: 192.168.2.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.1
+ state: absent
+
+ - name: Add static route aggregates
+ cisco.ios.ios_static_route:
+ aggregate:
+ - {prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8}
+ - {prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8}
+
+ - name: Remove static route aggregates
+ cisco.ios.ios_static_route:
+ aggregate:
+ - {prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8}
+ - {prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8}
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ip route 192.168.2.0 255.255.255.0 10.0.0.1&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Ricardo Carrillo Cruz (@rcarrillocruz)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_static_routes_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_static_routes_module.rst
new file mode 100644
index 00000000..489f6a6c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_static_routes_module.rst
@@ -0,0 +1,1048 @@
+.. _cisco.ios.ios_static_routes_module:
+
+
+***************************
+cisco.ios.ios_static_routes
+***************************
+
+**Static routes resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module configures and manages the static routes on IOS platforms.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="5">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of static route options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_families</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Address family to use for the static routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Top level address family indicator.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>routes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configuring static route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination prefix with its subnet mask</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hops</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>next hop address or interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dhcp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Default gateway obtained from DHCP</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance metric for this route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>forward_router_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Forwarding router&#x27;s address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>global</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Next hop address is global</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface for directly connected static routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multicast</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>multicast route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify name of the next hop</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>permanent</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>permanent route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag for this route</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>track</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Install route depending on tracked item with tracked object number.</div>
+ <div>Tracking does not support multicast</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>topology</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure static route for a Topology Routing/Forwarding instance</div>
+ <div>NOTE, VRF and Topology can be used together only with Multicast and Topology should pre-exist before it can be used</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP VPN Routing/Forwarding instance name.</div>
+ <div>NOTE, In case of IPV4/IPV6 VRF routing table should pre-exist before configuring.</div>
+ <div>NOTE, if the vrf information is not provided then the routes shall be configured under global vrf.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>show running-config | include ip route|ipv6 route</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSv Version 15.2 on VIRL.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+
+ - name: Merge provided configuration with device configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - vrf: blue
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.0/24
+ next_hops:
+ - forward_router_address: 192.0.2.1
+ name: merged_blue
+ tag: 50
+ track: 150
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 198.51.100.0/24
+ next_hops:
+ - forward_router_address: 198.51.101.1
+ name: merged_route_1
+ distance_metric: 110
+ tag: 40
+ multicast: true
+ - forward_router_address: 198.51.101.2
+ name: merged_route_2
+ distance_metric: 30
+ - forward_router_address: 198.51.101.3
+ name: merged_route_3
+ - afi: ipv6
+ routes:
+ - dest: 2001:DB8:0:3::/64
+ next_hops:
+ - forward_router_address: 2001:DB8:0:3::2
+ name: merged_v6
+ tag: 105
+ state: merged
+
+ # Commands fired:
+ # ---------------
+ # ip route vrf blue 192.0.2.0 255.255.255.0 10.0.0.8 name merged_blue track 150 tag 50
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name merged_route_1 tag 40
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name merged_route_2
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.3 name merged_route_3
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name merged_v6 tag 105
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route vrf blue 192.0.2.0 255.255.255.0 192.0.2.1 tag 50 name merged_blue track 150
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.3 name merged_route_3
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name merged_route_2
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40 name merged_route_1 multicast
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name merged_v6
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+ - name: Replace provided configuration with device configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 198.51.100.0/24
+ next_hops:
+ - forward_router_address: 198.51.101.1
+ name: replaced_route
+ distance_metric: 175
+ tag: 70
+ multicast: true
+ state: replaced
+
+ # Commands fired:
+ # ---------------
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 175 name replaced_route track 150 tag 70
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 175 name replaced_route track 150 tag 70
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name test_v6
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+ - name: Override provided configuration with device configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - vrf: blue
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.0/24
+ next_hops:
+ - forward_router_address: 192.0.2.1
+ name: override_vrf
+ tag: 50
+ track: 150
+ state: overridden
+
+ # Commands fired:
+ # ---------------
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 198.51.101.8 name test_vrf track 150 tag 50
+ # no ipv6 route FD5D:12C9:2201:1::/64 FD5D:12C9:2202::2 name test_v6 tag 105
+ # ip route vrf blue 192.0.2.0 255.255.255.0 198.51.101.4 name override_vrf track 150 tag 50
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route vrf blue 192.0.2.0 255.255.255.0 192.0.2.1 tag 50 name override_vrf track 150
+
+ # Using Deleted
+
+ # Example 1:
+ # ----------
+ # To delete the exact static routes, with all the static routes explicitly mentioned in want
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+ - name: Delete provided configuration from the device configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - vrf: ansible_temp_vrf
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.0/24
+ next_hops:
+ - forward_router_address: 192.0.2.1
+ name: test_vrf
+ tag: 50
+ track: 150
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 198.51.100.0/24
+ next_hops:
+ - forward_router_address: 198.51.101.1
+ name: route_1
+ distance_metric: 110
+ tag: 40
+ multicast: true
+ - forward_router_address: 198.51.101.2
+ name: route_2
+ distance_metric: 30
+ - forward_router_address: 198.51.101.3
+ name: route_3
+ - afi: ipv6
+ routes:
+ - dest: 2001:DB8:0:3::/64
+ next_hops:
+ - forward_router_address: 2001:DB8:0:3::2
+ name: test_v6
+ tag: 105
+ state: deleted
+
+ # Commands fired:
+ # ---------------
+ # no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 198.51.101.8 name test_vrf track 150 tag 50
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # no ipv6 route FD5D:12C9:2201:1::/64 FD5D:12C9:2202::2 name test_v6 tag 105
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+
+ # Example 2:
+ # ----------
+ # To delete the destination specific static routes
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+ - name: Delete provided configuration from the device configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 198.51.100.0/24
+ state: deleted
+
+ # Commands fired:
+ # ---------------
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40 name route_1 multicast
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 tag 50 name test_vrf track 150
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name test_v6
+
+
+ # Example 3:
+ # ----------
+ # To delete the vrf specific static routes
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+ - name: Delete provided configuration from the device configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - vrf: ansible_temp_vrf
+ state: deleted
+
+ # Commands fired:
+ # ---------------
+ # no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40 name route_1 multicast
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name test_v6
+
+ # Using Deleted without any config passed
+ #"(NOTE: This will delete all of configured resource module attributes from each configured interface)"
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+ - name: Delete ALL configured IOS static routes
+ cisco.ios.ios_static_routes:
+ state: deleted
+
+ # Commands fired:
+ # ---------------
+ # no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 tag 50 name test_vrf track 150
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40 name route_1 multicast
+ # no ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name test_v6
+
+ # After state:
+ # -------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ #
+
+ # Using gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+ - name: Gather listed static routes with provided configurations
+ cisco.ios.ios_static_routes:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "address_families": [
+ # {
+ # "afi": "ipv4",
+ # "routes": [
+ # {
+ # "dest": "192.0.2.0/24",
+ # "next_hops": [
+ # {
+ # "forward_router_address": "192.0.2.1",
+ # "name": "test_vrf",
+ # "tag": 50,
+ # "track": 150
+ # }
+ # ]
+ # }
+ # ]
+ # }
+ # ],
+ # "vrf": "ansible_temp_vrf"
+ # },
+ # {
+ # "address_families": [
+ # {
+ # "afi": "ipv6",
+ # "routes": [
+ # {
+ # "dest": "2001:DB8:0:3::/64",
+ # "next_hops": [
+ # {
+ # "forward_router_address": "2001:DB8:0:3::2",
+ # "name": "test_v6",
+ # "tag": 105
+ # }
+ # ]
+ # }
+ # ]
+ # },
+ # {
+ # "afi": "ipv4",
+ # "routes": [
+ # {
+ # "dest": "198.51.100.0/24",
+ # "next_hops": [
+ # {
+ # "distance_metric": 110,
+ # "forward_router_address": "198.51.101.1",
+ # "multicast": true,
+ # "name": "route_1",
+ # "tag": 40
+ # },
+ # {
+ # "distance_metric": 30,
+ # "forward_router_address": "198.51.101.2",
+ # "name": "route_2"
+ # },
+ # {
+ # "forward_router_address": "198.51.101.3",
+ # "name": "route_3"
+ # }
+ # ]
+ # }
+ # ]
+ # }
+ # ]
+ # }
+ # ]
+
+ # After state:
+ # ------------
+ #
+ # vios#show running-config | include ip route|ipv6 route
+ # ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ # ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ # ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+ # Using rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - vrf: ansible_temp_vrf
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.0/24
+ next_hops:
+ - forward_router_address: 192.0.2.1
+ name: test_vrf
+ tag: 50
+ track: 150
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 198.51.100.0/24
+ next_hops:
+ - forward_router_address: 198.51.101.1
+ name: route_1
+ distance_metric: 110
+ tag: 40
+ multicast: true
+ - forward_router_address: 198.51.101.2
+ name: route_2
+ distance_metric: 30
+ - forward_router_address: 198.51.101.3
+ name: route_3
+ - afi: ipv6
+ routes:
+ - dest: 2001:DB8:0:3::/64
+ next_hops:
+ - forward_router_address: 2001:DB8:0:3::2
+ name: test_v6
+ tag: 105
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50",
+ # "ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40",
+ # "ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2",
+ # "ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3",
+ # "ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105"
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ip route vrf test 172.31.10.0 255.255.255.0 10.10.10.2 name new_test multicast&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>gathered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>When <code>state</code> is <em>gathered</em></td>
+ <td>
+ <div>The configuration as structured data transformed for the running configuration fetched from remote host</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>parsed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>When <code>state</code> is <em>parsed</em></td>
+ <td>
+ <div>The configuration as structured data transformed for the value of <code>running_config</code> option</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>rendered</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>When <code>state</code> is <em>rendered</em></td>
+ <td>
+ <div>The set of CLI commands generated from the value in <code>config</code> option</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/1&#x27;, &#x27;mtu 1800&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_system_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_system_module.rst
new file mode 100644
index 00000000..e384168a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_system_module.rst
@@ -0,0 +1,389 @@
+.. _cisco.ios.ios_system_module:
+
+
+********************
+cisco.ios.ios_system
+********************
+
+**Manage the system attributes on Cisco IOS devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of node system attributes on Cisco IOS devices. It provides an option to configure host system parameters or remove those parameters from the device active configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure the IP domain name on the remote device to the provided value. Value should be in the dotted name form and will be appended to the <code>hostname</code> to create a fully-qualified domain name.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain_search</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Provides the list of domain suffixes to append to the hostname for the purpose of doing name resolution. This argument accepts a list of names and will be reconciled with the current active configuration on the running node.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hostname</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure the device hostname parameter. This option takes an ASCII string value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lookup_enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administrative control for enabling or disabling DNS lookups. When this argument is set to True, lookups are performed and when it is set to False, lookups are not performed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lookup_source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Provides one or more source interfaces to use for performing DNS lookups. The interface provided in <code>lookup_source</code> must be a valid interface configured on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name_servers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of DNS name servers by IP address to use to perform name resolution lookups. This argument accepts either a list of DNS servers See examples.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the configuration values in the device&#x27;s current active configuration. When set to <em>present</em>, the values should be configured in the device active configuration and when set to <em>absent</em> the values should not be in the device active configuration</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.6
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure hostname and domain name
+ cisco.ios.ios_system:
+ hostname: ios01
+ domain_name: test.example.com
+ domain_search:
+ - ansible.com
+ - redhat.com
+ - cisco.com
+
+ - name: remove configuration
+ cisco.ios.ios_system:
+ state: absent
+
+ - name: configure DNS lookup sources
+ cisco.ios.ios_system:
+ lookup_source: MgmtEth0/0/CPU0/0
+ lookup_enabled: yes
+
+ - name: configure name servers
+ cisco.ios.ios_system:
+ name_servers:
+ - 8.8.8.8
+ - 8.8.4.4
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;hostname ios01&#x27;, &#x27;ip domain name test.example.com&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_user_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_user_module.rst
new file mode 100644
index 00000000..91ec51d3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_user_module.rst
@@ -0,0 +1,785 @@
+.. _cisco.ios.ios_user_module:
+
+
+******************
+cisco.ios.ios_user
+******************
+
+**Manage the aggregate of local users on Cisco IOS device**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of the local usernames configured on network devices. It allows playbooks to manage either individual usernames or the aggregate of usernames in the current running config. It also supports purging usernames from the configuration that are not explicitly defined.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The set of username objects to be configured on the remote Cisco IOS device. The list entries can either be the username or a hash of username and properties. This argument is mutually exclusive with the <code>name</code> argument.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: users, collection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>configured_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The password to be configured on the Cisco IOS device. The password needs to be provided in clear and it will be encrypted on the device. Please note that this option is not same as <code>provider password</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hashed_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option allows configuring hashed passwords on Cisco IOS devices.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the type of hash (e.g., 5 for MD5, 8 for PBKDF2, etc.)</div>
+ <div>For this to work, the device needs to support the desired hash type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The actual hashed password to be configured on the device</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The username to be configured on the Cisco IOS device. This argument accepts a string value and is mutually exclusive with the <code>aggregate</code> argument. Please note that this option is not same as <code>provider username</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nopassword</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Defines the username without assigning a password. This will allow the user to login to the system without being authenticated by a password.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>secret</li>
+ <li>password</li>
+ </ul>
+ </td>
+ <td>
+ <div>This argument determines whether a &#x27;password&#x27; or &#x27;secret&#x27; will be configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>privilege</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <code>privilege</code> argument configures the privilege level of the user when logged into the system. This argument accepts integer values in the range of 1 to 15.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sshkey</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies one or more SSH public key(s) to configure for the given username.</div>
+ <div>This argument accepts a valid SSH key value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the state of the username definition as it relates to the device operational configuration. When set to <em>present</em>, the username(s) should be configured in the device active configuration and when set to <em>absent</em> the username(s) should not be in the device active configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>on_create</li>
+ <li>always</li>
+ </ul>
+ </td>
+ <td>
+ <div>Since passwords are encrypted in the device running config, this argument will instruct the module when to change the password. When set to <code>always</code>, the password will always be updated in the device and when set to <code>on_create</code> the password will be updated only if the username is created.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>view</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the view for the username in the device running configuration. The argument accepts a string value defining the view name. This argument does not check if the view has been configured on the device.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: role</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>configured_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The password to be configured on the Cisco IOS device. The password needs to be provided in clear and it will be encrypted on the device. Please note that this option is not same as <code>provider password</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hashed_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option allows configuring hashed passwords on Cisco IOS devices.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the type of hash (e.g., 5 for MD5, 8 for PBKDF2, etc.)</div>
+ <div>For this to work, the device needs to support the desired hash type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The actual hashed password to be configured on the device</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The username to be configured on the Cisco IOS device. This argument accepts a string value and is mutually exclusive with the <code>aggregate</code> argument. Please note that this option is not same as <code>provider username</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nopassword</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Defines the username without assigning a password. This will allow the user to login to the system without being authenticated by a password.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>secret</b>&nbsp;&larr;</div></li>
+ <li>password</li>
+ </ul>
+ </td>
+ <td>
+ <div>This argument determines whether a &#x27;password&#x27; or &#x27;secret&#x27; will be configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>privilege</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <code>privilege</code> argument configures the privilege level of the user when logged into the system. This argument accepts integer values in the range of 1 to 15.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>purge</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to consider the resource definition absolute. It will remove any previously configured usernames on the device with the exception of the `admin` user (the current defined set of users).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sshkey</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies one or more SSH public key(s) to configure for the given username.</div>
+ <div>This argument accepts a valid SSH key value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the state of the username definition as it relates to the device operational configuration. When set to <em>present</em>, the username(s) should be configured in the device active configuration and when set to <em>absent</em> the username(s) should not be in the device active configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>on_create</li>
+ <li><div style="color: blue"><b>always</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Since passwords are encrypted in the device running config, this argument will instruct the module when to change the password. When set to <code>always</code>, the password will always be updated in the device and when set to <code>on_create</code> the password will be updated only if the username is created.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>view</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the view for the username in the device running configuration. The argument accepts a string value defining the view name. This argument does not check if the view has been configured on the device.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: role</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.6
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: create a new user
+ cisco.ios.ios_user:
+ name: ansible
+ nopassword: true
+ sshkey: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
+ state: present
+
+ - name: create a new user with multiple keys
+ cisco.ios.ios_user:
+ name: ansible
+ sshkey:
+ - "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
+ - "{{ lookup('file', '~/path/to/public_key') }}"
+ state: present
+
+ - name: remove all users except admin
+ cisco.ios.ios_user:
+ purge: yes
+
+ - name: remove all users except admin and these listed users
+ cisco.ios.ios_user:
+ aggregate:
+ - name: testuser1
+ - name: testuser2
+ - name: testuser3
+ purge: yes
+
+ - name: set multiple users to privilege level 15
+ cisco.ios.ios_user:
+ aggregate:
+ - name: netop
+ - name: netend
+ privilege: 15
+ state: present
+
+ - name: set user view/role
+ cisco.ios.ios_user:
+ name: netop
+ view: network-operator
+ state: present
+
+ - name: Change Password for User netop
+ cisco.ios.ios_user:
+ name: netop
+ configured_password: '{{ new_password }}'
+ update_password: always
+ state: present
+
+ - name: Aggregate of users
+ cisco.ios.ios_user:
+ aggregate:
+ - name: ansibletest2
+ - name: ansibletest3
+ view: network-admin
+
+ - name: Add a user specifying password type
+ cisco.ios.ios_user:
+ name: ansibletest4
+ configured_password: '{{ new_password }}'
+ password_type: password
+
+ - name: Add a user with MD5 hashed password
+ cisco.ios.ios_user:
+ name: ansibletest5
+ hashed_password:
+ type: 5
+ value: $3$8JcDilcYgFZi.yz4ApaqkHG2.8/
+
+ - name: Delete users with aggregate
+ cisco.ios.ios_user:
+ aggregate:
+ - name: ansibletest1
+ - name: ansibletest2
+ - name: ansibletest3
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;username ansible secret password&#x27;, &#x27;username admin secret admin&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_vlan_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_vlan_module.rst
new file mode 100644
index 00000000..a2f62d1e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_vlan_module.rst
@@ -0,0 +1,539 @@
+.. _cisco.ios.ios_vlan_module:
+
+
+******************
+cisco.ios.ios_vlan
+******************
+
+**(deprecated, removed after 2022-06-01) Manage VLANs on IOS network devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Newer and updated modules released with more functionality in Ansible 2.9
+:Alternative: ios_vlans
+
+
+
+Synopsis
+--------
+- This module provides declarative management of VLANs on Cisco IOS network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of VLANs definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>associated_interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This is a intent option and checks the operational state of the for given vlan <code>name</code> for associated interfaces. If the value in the <code>associated_interfaces</code> does not match with the operational state of vlan interfaces on device it will result in failure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay the play should wait to check for declarative intent params values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of interfaces that should be associated to the VLAN.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the VLAN.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ <li>active</li>
+ <li>suspend</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the VLAN configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ID of the VLAN. Range 1-4094.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>associated_interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This is a intent option and checks the operational state of the for given vlan <code>name</code> for associated interfaces. If the value in the <code>associated_interfaces</code> does not match with the operational state of vlan interfaces on device it will result in failure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">10</div>
+ </td>
+ <td>
+ <div>Delay the play should wait to check for declarative intent params values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of interfaces that should be associated to the VLAN.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the VLAN.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>purge</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Purge VLANs not defined in the <em>aggregate</em> parameter.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ <li>active</li>
+ <li>suspend</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the VLAN configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ID of the VLAN. Range 1-4094.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.2
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Create vlan
+ cisco.ios.ios_vlan:
+ vlan_id: 100
+ name: test-vlan
+ state: present
+
+ - name: Add interfaces to VLAN
+ cisco.ios.ios_vlan:
+ vlan_id: 100
+ interfaces:
+ - GigabitEthernet0/0
+ - GigabitEthernet0/1
+
+ - name: Check if interfaces is assigned to VLAN
+ cisco.ios.ios_vlan:
+ vlan_id: 100
+ associated_interfaces:
+ - GigabitEthernet0/0
+ - GigabitEthernet0/1
+
+ - name: Delete vlan
+ cisco.ios.ios_vlan:
+ vlan_id: 100
+ state: absent
+
+ - name: Add vlan using aggregate
+ cisco.ios.ios_vlan:
+ aggregate:
+ - {vlan_id: 100, name: test-vlan, interfaces: [GigabitEthernet0/1, GigabitEthernet0/2],
+ delay: 15, state: suspend}
+ - {vlan_id: 101, name: test-vlan, interfaces: GigabitEthernet0/3}
+
+ - name: Move interfaces to a different VLAN
+ cisco.ios.ios_vlan:
+ vlan_id: 102
+ interfaces:
+ - GigabitEthernet0/0
+ - GigabitEthernet0/1
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;vlan 100&#x27;, &#x27;name test-vlan&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_vlans_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_vlans_module.rst
new file mode 100644
index 00000000..f040d488
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_vlans_module.rst
@@ -0,0 +1,883 @@
+.. _cisco.ios.ios_vlans_module:
+
+
+*******************
+cisco.ios.ios_vlans
+*******************
+
+**VLANs resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of VLANs on Cisco IOS network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of VLANs options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VLAN Maximum Transmission Unit.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Ascii name of the VLAN.</div>
+ <div>NOTE, <em>name</em> should not be named/appended with <em>default</em> as it is reserved for device default vlans.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remote_span</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure as Remote SPAN VLAN</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enabled</li>
+ <li>disabled</li>
+ </ul>
+ </td>
+ <td>
+ <div>Shutdown VLAN switching.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>active</li>
+ <li>suspend</li>
+ </ul>
+ </td>
+ <td>
+ <div>Operational state of the VLAN</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ID of the VLAN. Range 1-4094</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS device by executing the command <b>show vlan</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ <div>The states <em>rendered</em>, <em>gathered</em> and <em>parsed</em> does not perform any change on the device.</div>
+ <div>The state <em>rendered</em> will transform the configuration in <code>config</code> option to platform specific CLI commands which will be returned in the <em>rendered</em> key within the result. For state <em>rendered</em> active connection to remote host is not required.</div>
+ <div>The state <em>gathered</em> will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the <em>gathered</em> key within the result.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into JSON format as per the resource module parameters and the value is returned in the <em>parsed</em> key within the result. The value of <code>running_config</code> option should be the same format as the output of command <em>show running-config | include ip route|ipv6 route</em> executed on device. For state <em>parsed</em> active connection to remote host is not required.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOSl2 device with Version 15.2 on VIRL.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # vios_l2#show vlan
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 1 default active Gi0/1, Gi0/2
+ # 1002 fddi-default act/unsup
+ # 1003 token-ring-default act/unsup
+ # 1004 fddinet-default act/unsup
+ # 1005 trnet-default act/unsup
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 1 enet 100001 1500 - - - - - 0 0
+ # 1002 fddi 101002 1500 - - - - - 0 0
+ # 1003 tr 101003 1500 - - - - - 0 0
+ # 1004 fdnet 101004 1500 - - - ieee - 0 0
+ # 1005 trnet 101005 1500 - - - ibm - 0 0
+
+ - name: Merge provided configuration with device configuration
+ cisco.ios.ios_vlans:
+ config:
+ - name: Vlan_10
+ vlan_id: 10
+ state: active
+ shutdown: disabled
+ remote_span: 10
+ - name: Vlan_20
+ vlan_id: 20
+ mtu: 610
+ state: active
+ shutdown: enabled
+ - name: Vlan_30
+ vlan_id: 30
+ state: suspend
+ shutdown: enabled
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # vios_l2#show vlan
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 1 default active Gi0/1, Gi0/2
+ # 10 vlan_10 active
+ # 20 vlan_20 act/lshut
+ # 30 vlan_30 sus/lshut
+ # 1002 fddi-default act/unsup
+ # 1003 token-ring-default act/unsup
+ # 1004 fddinet-default act/unsup
+ # 1005 trnet-default act/unsup
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 1 enet 100001 1500 - - - - - 0 0
+ # 10 enet 100010 1500 - - - - - 0 0
+ # 20 enet 100020 610 - - - - - 0 0
+ # 30 enet 100030 1500 - - - - - 0 0
+ # 1002 fddi 101002 1500 - - - - - 0 0
+ # 1003 tr 101003 1500 - - - - - 0 0
+ # 1004 fdnet 101004 1500 - - - ieee - 0 0
+ # 1005 trnet 101005 1500 - - - ibm - 0 0
+ #
+ # Remote SPAN VLANs
+ # ------------------------------------------------------------------------------
+ # 10
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # vios_l2#show vlan
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 1 default active Gi0/1, Gi0/2
+ # 10 vlan_10 active
+ # 20 vlan_20 act/lshut
+ # 30 vlan_30 sus/lshut
+ # 1002 fddi-default act/unsup
+ # 1003 token-ring-default act/unsup
+ # 1004 fddinet-default act/unsup
+ # 1005 trnet-default act/unsup
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 1 enet 100001 1500 - - - - - 0 0
+ # 10 enet 100010 1500 - - - - - 0 0
+ # 20 enet 100020 610 - - - - - 0 0
+ # 30 enet 100030 1500 - - - - - 0 0
+ # 1002 fddi 101002 1500 - - - - - 0 0
+ # 1003 tr 101003 1500 - - - - - 0 0
+ # 1004 fdnet 101004 1500 - - - ieee - 0 0
+ # 1005 trnet 101005 1500 - - - ibm - 0 0
+ #
+ # Remote SPAN VLANs
+ # ------------------------------------------------------------------------------
+ # 10
+
+ - name: Override device configuration of all VLANs with provided configuration
+ cisco.ios.ios_vlans:
+ config:
+ - name: Vlan_10
+ vlan_id: 10
+ mtu: 1000
+ state: overridden
+
+ # After state:
+ # ------------
+ #
+ # vios_l2#show vlan
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 10 Vlan_10 active
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 10 enet 100010 1000 - - - - - 0 0
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # vios_l2#show vlan
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 1 default active Gi0/1, Gi0/2
+ # 10 vlan_10 active
+ # 20 vlan_20 act/lshut
+ # 30 vlan_30 sus/lshut
+ # 1002 fddi-default act/unsup
+ # 1003 token-ring-default act/unsup
+ # 1004 fddinet-default act/unsup
+ # 1005 trnet-default act/unsup
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 1 enet 100001 1500 - - - - - 0 0
+ # 10 enet 100010 1500 - - - - - 0 0
+ # 20 enet 100020 610 - - - - - 0 0
+ # 30 enet 100030 1500 - - - - - 0 0
+ # 1002 fddi 101002 1500 - - - - - 0 0
+ # 1003 tr 101003 1500 - - - - - 0 0
+ # 1004 fdnet 101004 1500 - - - ieee - 0 0
+ # 1005 trnet 101005 1500 - - - ibm - 0 0
+ #
+ # Remote SPAN VLANs
+ # ------------------------------------------------------------------------------
+ # 10
+
+ - name: Replaces device configuration of listed VLANs with provided configuration
+ cisco.ios.ios_vlans:
+ config:
+ - vlan_id: 20
+ name: Test_VLAN20
+ mtu: 700
+ shutdown: disabled
+ - vlan_id: 30
+ name: Test_VLAN30
+ mtu: 1000
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # vios_l2#show vlan
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 1 default active Gi0/1, Gi0/2
+ # 10 vlan_10 active
+ # 20 Test_VLAN20 active
+ # 30 Test_VLAN30 sus/lshut
+ # 1002 fddi-default act/unsup
+ # 1003 token-ring-default act/unsup
+ # 1004 fddinet-default act/unsup
+ # 1005 trnet-default act/unsup
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 1 enet 100001 1500 - - - - - 0 0
+ # 10 enet 100010 1500 - - - - - 0 0
+ # 20 enet 100020 700 - - - - - 0 0
+ # 30 enet 100030 1000 - - - - - 0 0
+ # 1002 fddi 101002 1500 - - - - - 0 0
+ # 1003 tr 101003 1500 - - - - - 0 0
+ # 1004 fdnet 101004 1500 - - - ieee - 0 0
+ # 1005 trnet 101005 1500 - - - ibm - 0 0
+ #
+ # Remote SPAN VLANs
+ # ------------------------------------------------------------------------------
+ # 10
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ #
+ # vios_l2#show vlan
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 1 default active Gi0/1, Gi0/2
+ # 10 vlan_10 active
+ # 20 vlan_20 act/lshut
+ # 30 vlan_30 sus/lshut
+ # 1002 fddi-default act/unsup
+ # 1003 token-ring-default act/unsup
+ # 1004 fddinet-default act/unsup
+ # 1005 trnet-default act/unsup
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 1 enet 100001 1500 - - - - - 0 0
+ # 10 enet 100010 1500 - - - - - 0 0
+ # 20 enet 100020 610 - - - - - 0 0
+ # 30 enet 100030 1500 - - - - - 0 0
+ # 1002 fddi 101002 1500 - - - - - 0 0
+ # 1003 tr 101003 1500 - - - - - 0 0
+ # 1004 fdnet 101004 1500 - - - ieee - 0 0
+ # 1005 trnet 101005 1500 - - - ibm - 0 0
+ #
+ # Remote SPAN VLANs
+ # ------------------------------------------------------------------------------
+ # 10
+
+ - name: Delete attributes of given VLANs
+ cisco.ios.ios_vlans:
+ config:
+ - vlan_id: 10
+ - vlan_id: 20
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios_l2#show vlan
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 1 default active Gi0/1, Gi0/2
+ # 30 vlan_30 sus/lshut
+ # 1002 fddi-default act/unsup
+ # 1003 token-ring-default act/unsup
+ # 1004 fddinet-default act/unsup
+ # 1005 trnet-default act/unsup
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 1 enet 100001 1500 - - - - - 0 0
+ # 30 enet 100030 1500 - - - - - 0 0
+ # 1002 fddi 101002 1500 - - - - - 0 0
+ # 1003 tr 101003 1500 - - - - - 0 0
+ # 1004 fdnet 101004 1500 - - - ieee - 0 0
+ # 1005 trnet 101005 1500 - - - ibm - 0 0
+
+ # Using Deleted without any config passed
+ #"(NOTE: This will delete all of configured vlans attributes)"
+
+ # Before state:
+ # -------------
+ #
+ # vios_l2#show vlan
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 1 default active Gi0/1, Gi0/2
+ # 10 vlan_10 active
+ # 20 vlan_20 act/lshut
+ # 30 vlan_30 sus/lshut
+ # 1002 fddi-default act/unsup
+ # 1003 token-ring-default act/unsup
+ # 1004 fddinet-default act/unsup
+ # 1005 trnet-default act/unsup
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 1 enet 100001 1500 - - - - - 0 0
+ # 10 enet 100010 1500 - - - - - 0 0
+ # 20 enet 100020 610 - - - - - 0 0
+ # 30 enet 100030 1500 - - - - - 0 0
+ # 1002 fddi 101002 1500 - - - - - 0 0
+ # 1003 tr 101003 1500 - - - - - 0 0
+ # 1004 fdnet 101004 1500 - - - ieee - 0 0
+ # 1005 trnet 101005 1500 - - - ibm - 0 0
+ #
+ # Remote SPAN VLANs
+ # ------------------------------------------------------------------------------
+ # 10
+
+ - name: Delete attributes of ALL VLANs
+ cisco.ios.ios_vlans:
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # vios_l2#show vlan
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 1 default active Gi0/1, Gi0/2
+ # 1002 fddi-default act/unsup
+ # 1003 token-ring-default act/unsup
+ # 1004 fddinet-default act/unsup
+ # 1005 trnet-default act/unsup
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 1 enet 100001 1500 - - - - - 0 0
+ # 1002 fddi 101002 1500 - - - - - 0 0
+ # 1003 tr 101003 1500 - - - - - 0 0
+ # 1004 fdnet 101004 1500 - - - ieee - 0 0
+ # 1005 trnet 101005 1500 - - - ibm - 0 0
+
+ # Using Gathered
+
+ # Before state:
+ # -------------
+ #
+ # vios_l2#show vlan
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 1 default active Gi0/1, Gi0/2
+ # 10 vlan_10 active
+ # 20 vlan_20 act/lshut
+ # 30 vlan_30 sus/lshut
+ # 1002 fddi-default act/unsup
+ # 1003 token-ring-default act/unsup
+ # 1004 fddinet-default act/unsup
+ # 1005 trnet-default act/unsup
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 1 enet 100001 1500 - - - - - 0 0
+ # 10 enet 100010 1500 - - - - - 0 0
+ # 20 enet 100020 610 - - - - - 0 0
+ # 30 enet 100030 1500 - - - - - 0 0
+ # 1002 fddi 101002 1500 - - - - - 0 0
+ # 1003 tr 101003 1500 - - - - - 0 0
+ # 1004 fdnet 101004 1500 - - - ieee - 0 0
+ # 1005 trnet 101005 1500 - - - ibm - 0 0
+ #
+ # Remote SPAN VLANs
+ # ------------------------------------------------------------------------------
+ # 10
+
+ - name: Gather listed vlans with provided configurations
+ cisco.ios.ios_vlans:
+ config:
+ state: gathered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "gathered": [
+ # {
+ # "mtu": 1500,
+ # "name": "default",
+ # "shutdown": "disabled",
+ # "state": "active",
+ # "vlan_id": 1
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "VLAN0010",
+ # "shutdown": "disabled",
+ # "state": "active",
+ # "vlan_id": 10
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "VLAN0020",
+ # "shutdown": "disabled",
+ # "state": "active",
+ # "vlan_id": 20
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "VLAN0030",
+ # "shutdown": "disabled",
+ # "state": "active",
+ # "vlan_id": 30
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "fddi-default",
+ # "shutdown": "enabled",
+ # "state": "active",
+ # "vlan_id": 1002
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "token-ring-default",
+ # "shutdown": "enabled",
+ # "state": "active",
+ # "vlan_id": 1003
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "fddinet-default",
+ # "shutdown": "enabled",
+ # "state": "active",
+ # "vlan_id": 1004
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "trnet-default",
+ # "shutdown": "enabled",
+ # "state": "active",
+ # "vlan_id": 1005
+ # }
+ # ]
+
+ # After state:
+ # ------------
+ #
+ # vios_l2#show vlan
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 1 default active Gi0/1, Gi0/2
+ # 10 vlan_10 active
+ # 20 vlan_20 act/lshut
+ # 30 vlan_30 sus/lshut
+ # 1002 fddi-default act/unsup
+ # 1003 token-ring-default act/unsup
+ # 1004 fddinet-default act/unsup
+ # 1005 trnet-default act/unsup
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 1 enet 100001 1500 - - - - - 0 0
+ # 10 enet 100010 1500 - - - - - 0 0
+ # 20 enet 100020 610 - - - - - 0 0
+ # 30 enet 100030 1500 - - - - - 0 0
+ # 1002 fddi 101002 1500 - - - - - 0 0
+ # 1003 tr 101003 1500 - - - - - 0 0
+ # 1004 fdnet 101004 1500 - - - ieee - 0 0
+ # 1005 trnet 101005 1500 - - - ibm - 0 0
+ #
+ # Remote SPAN VLANs
+ # ------------------------------------------------------------------------------
+ # 10
+
+ # Using Rendered
+
+ - name: Render the commands for provided configuration
+ cisco.ios.ios_vlans:
+ config:
+ - name: Vlan_10
+ vlan_id: 10
+ state: active
+ shutdown: disabled
+ remote_span: 10
+ - name: Vlan_20
+ vlan_id: 20
+ mtu: 610
+ state: active
+ shutdown: enabled
+ - name: Vlan_30
+ vlan_id: 30
+ state: suspend
+ shutdown: enabled
+ state: rendered
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "rendered": [
+ # "vlan 10",
+ # "name Vlan_10",
+ # "state active",
+ # "remote-span",
+ # "no shutdown",
+ # "vlan 20",
+ # "name Vlan_20",
+ # "state active",
+ # "mtu 610",
+ # "shutdown",
+ # "vlan 30",
+ # "name Vlan_30",
+ # "state suspend",
+ # "shutdown"
+ # ]
+
+ # Using Parsed
+
+ # File: parsed.cfg
+ # ----------------
+ #
+ # VLAN Name Status Ports
+ # ---- -------------------------------- --------- -------------------------------
+ # 1 default active Gi0/1, Gi0/2
+ # 10 vlan_10 active
+ # 20 vlan_20 act/lshut
+ # 30 vlan_30 sus/lshut
+ # 1002 fddi-default act/unsup
+ # 1003 token-ring-default act/unsup
+ # 1004 fddinet-default act/unsup
+ # 1005 trnet-default act/unsup
+ #
+ # VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+ # ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+ # 1 enet 100001 1500 - - - - - 0 0
+ # 10 enet 100010 1500 - - - - - 0 0
+ # 20 enet 100020 1500 - - - - - 0 0
+ # 30 enet 100030 1500 - - - - - 0 0
+ # 1002 fddi 101002 1500 - - - - - 0 0
+ # 1003 tr 101003 1500 - - - - - 0 0
+ # 1004 fdnet 101004 1500 - - - ieee - 0 0
+ # 1005 trnet 101005 1500 - - - ibm - 0 0
+
+ - name: Parse the commands for provided configuration
+ cisco.ios.ios_vlans:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+
+ # Module Execution Result:
+ # ------------------------
+ #
+ # "parsed": [
+ # {
+ # "mtu": 1500,
+ # "name": "default",
+ # "shutdown": "disabled",
+ # "state": "active",
+ # "vlan_id": 1
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "vlan_10",
+ # "shutdown": "disabled",
+ # "state": "active",
+ # "vlan_id": 10
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "vlan_20",
+ # "shutdown": "enabled",
+ # "state": "active",
+ # "vlan_id": 20
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "vlan_30",
+ # "shutdown": "enabled",
+ # "state": "suspend",
+ # "vlan_id": 30
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "fddi-default",
+ # "shutdown": "enabled",
+ # "state": "active",
+ # "vlan_id": 1002
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "token-ring-default",
+ # "shutdown": "enabled",
+ # "state": "active",
+ # "vlan_id": 1003
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "fddinet-default",
+ # "shutdown": "enabled",
+ # "state": "active",
+ # "vlan_id": 1004
+ # },
+ # {
+ # "mtu": 1500,
+ # "name": "trnet-default",
+ # "shutdown": "enabled",
+ # "state": "active",
+ # "vlan_id": 1005
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;vlan 20&#x27;, &#x27;name vlan_20&#x27;, &#x27;mtu 600&#x27;, &#x27;remote-span&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_vrf_module.rst b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_vrf_module.rst
new file mode 100644
index 00000000..808a7f2d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/docs/cisco.ios.ios_vrf_module.rst
@@ -0,0 +1,690 @@
+.. _cisco.ios.ios_vrf_module:
+
+
+*****************
+cisco.ios.ios_vrf
+*****************
+
+**Manage the collection of VRF definitions on Cisco IOS devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of VRF definitions on Cisco IOS devices. It allows playbooks to manage individual or the entire VRF collection. It also supports purging VRF definitions from the configuration that are not explicitly defined.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>associated_interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This is a intent option and checks the operational state of the for given vrf <code>name</code> for associated interfaces. If the value in the <code>associated_interfaces</code> does not match with the operational state of vrf interfaces on device it will result in failure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">10</div>
+ </td>
+ <td>
+ <div>Time in seconds to wait before checking for the operational state on remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Provides a short description of the VRF definition in the current active configuration. The VRF definition value accepts alphanumeric characters used to provide additional information about the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Identifies the set of interfaces that should be configured in the VRF. Interfaces must be routed interfaces in order to be placed into a VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The name of the VRF definition to be managed on the remote IOS device. The VRF definition name is an ASCII string name used to uniquely identify the VRF. This argument is mutually exclusive with the <code>vrfs</code> argument</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_ios.html'>IOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>purge</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to consider the VRF definition absolute. It will remove any previously configured VRFs on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The router-distinguisher value uniquely identifies the VRF to routing processes on the remote IOS system. The RD value takes the form of <code>A:B</code> where <code>A</code> and <code>B</code> are both numeric values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_both</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adds an export and import list of extended route target communities to the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_both_ipv4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adds an export and import list of extended route target communities in address-family configuration submode to the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_both_ipv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adds an export and import list of extended route target communities in address-family configuration submode to the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_export</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adds an export list of extended route target communities to the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_export_ipv4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adds an export list of extended route target communities in address-family configuration submode to the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_export_ipv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adds an export list of extended route target communities in address-family configuration submode to the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_import</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adds an import list of extended route target communities to the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_import_ipv4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adds an import list of extended route target communities in address-family configuration submode to the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_import_ipv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adds an import list of extended route target communities in address-family configuration submode to the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the state of the VRF definition as it relates to the device operational configuration. When set to <em>present</em>, the VRF should be configured in the device active configuration and when set to <em>absent</em> the VRF should not be in the device active configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrfs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The set of VRF definition objects to be configured on the remote IOS device. Ths list entries can either be the VRF name or a hash of VRF definitions and attributes. This argument is mutually exclusive with the <code>name</code> argument.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS 15.6
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure a vrf named management
+ cisco.ios.ios_vrf:
+ name: management
+ description: oob mgmt vrf
+ interfaces:
+ - Management1
+
+ - name: remove a vrf named test
+ cisco.ios.ios_vrf:
+ name: test
+ state: absent
+
+ - name: configure set of VRFs and purge any others
+ cisco.ios.ios_vrf:
+ vrfs:
+ - red
+ - blue
+ - green
+ purge: yes
+
+ - name: Creates a list of import RTs for the VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_import
+ rd: 1:100
+ route_import:
+ - 1:100
+ - 3:100
+
+ - name: Creates a list of import RTs in address-family configuration submode for the
+ VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_import_ipv4
+ rd: 1:100
+ route_import_ipv4:
+ - 1:100
+ - 3:100
+
+ - name: Creates a list of import RTs in address-family configuration submode for the
+ VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_import_ipv6
+ rd: 1:100
+ route_import_ipv6:
+ - 1:100
+ - 3:100
+
+ - name: Creates a list of export RTs for the VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_export
+ rd: 1:100
+ route_export:
+ - 1:100
+ - 3:100
+
+ - name: Creates a list of export RTs in address-family configuration submode for the
+ VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_export_ipv4
+ rd: 1:100
+ route_export_ipv4:
+ - 1:100
+ - 3:100
+
+ - name: Creates a list of export RTs in address-family configuration submode for the
+ VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_export_ipv6
+ rd: 1:100
+ route_export_ipv6:
+ - 1:100
+ - 3:100
+
+ - name: Creates a list of import and export route targets for the VRF with the same
+ parameters
+ cisco.ios.ios_vrf:
+ name: test_both
+ rd: 1:100
+ route_both:
+ - 1:100
+ - 3:100
+
+ - name: Creates a list of import and export route targets in address-family configuration
+ submode for the VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_both_ipv4
+ rd: 1:100
+ route_both_ipv4:
+ - 1:100
+ - 3:100
+
+ - name: Creates a list of import and export route targets in address-family configuration
+ submode for the VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_both_ipv6
+ rd: 1:100
+ route_both_ipv6:
+ - 1:100
+ - 3:100
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;vrf definition ansible&#x27;, &#x27;description management vrf&#x27;, {&#x27;rd&#x27;: &#x27;1:100&#x27;}]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>delta</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The time elapsed to perform all operations</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">0:00:10.469466</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The time the job ended</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">2016-11-16 10:38:25.595612</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The time the job started</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">2016-11-16 10:38:15.126146</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/meta/runtime.yml b/collections-debian-merged/ansible_collections/cisco/ios/meta/runtime.yml
new file mode 100644
index 00000000..4623fd19
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/meta/runtime.yml
@@ -0,0 +1,232 @@
+---
+requires_ansible: '>=2.9.10'
+plugin_routing:
+ action:
+ ios_acl_interfaces:
+ redirect: cisco.ios.ios
+ acl_interfaces:
+ redirect: cisco.ios.ios
+ ios_acls:
+ redirect: cisco.ios.ios
+ acls:
+ redirect: cisco.ios.ios
+ ios_banner:
+ redirect: cisco.ios.ios
+ banner:
+ redirect: cisco.ios.ios
+ ios_bgp:
+ redirect: cisco.ios.ios
+ bgp:
+ redirect: cisco.ios.ios
+ ios_bgp_global:
+ redirect: cisco.ios.ios
+ bgp_global:
+ redirect: cisco.ios.ios
+ ios_command:
+ redirect: cisco.ios.ios
+ command:
+ redirect: cisco.ios.ios
+ ios_config:
+ redirect: cisco.ios.ios
+ config:
+ redirect: cisco.ios.ios
+ ios_facts:
+ redirect: cisco.ios.ios
+ facts:
+ redirect: cisco.ios.ios
+ ios_interface:
+ redirect: cisco.ios.ios
+ interface:
+ redirect: cisco.ios.ios
+ ios_interfaces:
+ redirect: cisco.ios.ios
+ interfaces:
+ redirect: cisco.ios.ios
+ ios_l2_interface:
+ redirect: cisco.ios.ios
+ l2_interface:
+ redirect: cisco.ios.ios
+ ios_l2_interfaces:
+ redirect: cisco.ios.ios
+ l2_interfaces:
+ redirect: cisco.ios.ios
+ ios_l3_interface:
+ redirect: cisco.ios.ios
+ l3_interface:
+ redirect: cisco.ios.ios
+ ios_l3_interfaces:
+ redirect: cisco.ios.ios
+ l3_interfaces:
+ redirect: cisco.ios.ios
+ ios_lacp:
+ redirect: cisco.ios.ios
+ lacp:
+ redirect: cisco.ios.ios
+ ios_lacp_interfaces:
+ redirect: cisco.ios.ios
+ lacp_interfaces:
+ redirect: cisco.ios.ios
+ ios_lag_interfaces:
+ redirect: cisco.ios.ios
+ lag_interfaces:
+ redirect: cisco.ios.ios
+ ios_linkagg:
+ redirect: cisco.ios.ios
+ linkagg:
+ redirect: cisco.ios.ios
+ ios_lldp:
+ redirect: cisco.ios.ios
+ lldp:
+ redirect: cisco.ios.ios
+ ios_lldp_global:
+ redirect: cisco.ios.ios
+ lldp_global:
+ redirect: cisco.ios.ios
+ ios_lldp_interfaces:
+ redirect: cisco.ios.ios
+ lldp_interfaces:
+ redirect: cisco.ios.ios
+ ios_logging:
+ redirect: cisco.ios.ios
+ logging:
+ redirect: cisco.ios.ios
+ ios_ntp:
+ redirect: cisco.ios.ios
+ ntp:
+ redirect: cisco.ios.ios
+ ios_ospfv2:
+ redirect: cisco.ios.ios
+ ospfv2:
+ redirect: cisco.ios.ios
+ ios_ping:
+ redirect: cisco.ios.ios
+ ping:
+ redirect: cisco.ios.ios
+ ios_static_route:
+ redirect: cisco.ios.ios
+ static_route:
+ redirect: cisco.ios.ios
+ ios_static_routes:
+ redirect: cisco.ios.ios
+ static_routes:
+ redirect: cisco.ios.ios
+ ios_system:
+ redirect: cisco.ios.ios
+ system:
+ redirect: cisco.ios.ios
+ ios_user:
+ redirect: cisco.ios.ios
+ user:
+ redirect: cisco.ios.ios
+ ios_vlan:
+ redirect: cisco.ios.ios
+ vlan:
+ redirect: cisco.ios.ios
+ ios_vlans:
+ redirect: cisco.ios.ios
+ vlans:
+ redirect: cisco.ios.ios
+ ios_vrf:
+ redirect: cisco.ios.ios
+ vrf:
+ redirect: cisco.ios.ios
+ modules:
+ acl_interfaces:
+ redirect: cisco.ios.ios_acl_interfaces
+ acls:
+ redirect: cisco.ios.ios_acls
+ banner:
+ redirect: cisco.ios.ios_banner
+ bgp:
+ redirect: cisco.ios.ios_bgp
+ bgp_global:
+ redirect: cisco.ios.ios_bgp_global
+ command:
+ redirect: cisco.ios.ios_command
+ config:
+ redirect: cisco.ios.ios_config
+ facts:
+ redirect: cisco.ios.ios_facts
+ interface:
+ redirect: cisco.ios.ios_interface
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ ios_interface:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ interfaces:
+ redirect: cisco.ios.ios_interfaces
+ l2_interface:
+ redirect: cisco.ios.ios_l2_interface
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ ios_l2_interface:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ l2_interfaces:
+ redirect: cisco.ios.ios_l2_interfaces
+ l3_interface:
+ redirect: cisco.ios.ios_l3_interface
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ ios_l3_interface:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ l3_interfaces:
+ redirect: cisco.ios.ios_l3_interfaces
+ lacp:
+ redirect: cisco.ios.ios_lacp
+ lacp_interfaces:
+ redirect: cisco.ios.ios_lacp_interfaces
+ lag_interfaces:
+ redirect: cisco.ios.ios_lag_interfaces
+ linkagg:
+ redirect: cisco.ios.ios_linkagg
+ lldp:
+ redirect: cisco.ios.ios_lldp
+ lldp_global:
+ redirect: cisco.ios.ios_lldp_global
+ lldp_interfaces:
+ redirect: cisco.ios.ios_lldp_interfaces
+ logging:
+ redirect: cisco.ios.ios_logging
+ ntp:
+ redirect: cisco.ios.ios_ntp
+ ospfv2:
+ redirect: cisco.ios.ios_ospfv2
+ ping:
+ redirect: cisco.ios.ios_ping
+ static_route:
+ redirect: cisco.ios.ios_static_route
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ ios_static_route:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ static_routes:
+ redirect: cisco.ios.ios_static_routes
+ system:
+ redirect: cisco.ios.ios_system
+ user:
+ redirect: cisco.ios.ios_user
+ vlan:
+ redirect: cisco.ios.ios_vlan
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ ios_vlan:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ vlans:
+ redirect: cisco.ios.ios_vlans
+ vrf:
+ redirect: cisco.ios.ios_vrf
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/action/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/action/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/action/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/action/ios.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/action/ios.py
new file mode 100644
index 00000000..6e06c47f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/action/ios.py
@@ -0,0 +1,135 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import sys
+import copy
+
+from ansible_collections.ansible.netcommon.plugins.action.network import (
+ ActionModule as ActionNetworkModule,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ load_provider,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_provider_spec,
+)
+from ansible.utils.display import Display
+
+display = Display()
+
+
+class ActionModule(ActionNetworkModule):
+ def run(self, tmp=None, task_vars=None):
+ del tmp # tmp no longer has any effect
+
+ module_name = self._task.action.split(".")[-1]
+ self._config_module = (
+ True if module_name in ["ios_config", "config"] else False
+ )
+ persistent_connection = self._play_context.connection.split(".")[-1]
+ warnings = []
+
+ if persistent_connection == "network_cli":
+ provider = self._task.args.get("provider", {})
+ if any(provider.values()):
+ display.warning(
+ "provider is unnecessary when using network_cli and will be ignored"
+ )
+ del self._task.args["provider"]
+ elif self._play_context.connection == "local":
+ provider = load_provider(ios_provider_spec, self._task.args)
+ pc = copy.deepcopy(self._play_context)
+ pc.connection = "ansible.netcommon.network_cli"
+ pc.network_os = "cisco.ios.ios"
+ pc.remote_addr = provider["host"] or self._play_context.remote_addr
+ pc.port = int(provider["port"] or self._play_context.port or 22)
+ pc.remote_user = (
+ provider["username"] or self._play_context.connection_user
+ )
+ pc.password = provider["password"] or self._play_context.password
+ pc.private_key_file = (
+ provider["ssh_keyfile"] or self._play_context.private_key_file
+ )
+ pc.become = provider["authorize"] or False
+ if pc.become:
+ pc.become_method = "enable"
+ pc.become_pass = provider["auth_pass"]
+
+ connection = self._shared_loader_obj.connection_loader.get(
+ "ansible.netcommon.persistent",
+ pc,
+ sys.stdin,
+ task_uuid=self._task._uuid,
+ )
+
+ # TODO: Remove below code after ansible minimal is cut out
+ if connection is None:
+ pc.connection = "network_cli"
+ pc.network_os = "ios"
+ connection = self._shared_loader_obj.connection_loader.get(
+ "persistent", pc, sys.stdin, task_uuid=self._task._uuid
+ )
+
+ display.vvv(
+ "using connection plugin %s (was local)" % pc.connection,
+ pc.remote_addr,
+ )
+
+ command_timeout = (
+ int(provider["timeout"])
+ if provider["timeout"]
+ else connection.get_option("persistent_command_timeout")
+ )
+ connection.set_options(
+ direct={"persistent_command_timeout": command_timeout}
+ )
+
+ socket_path = connection.run()
+ display.vvvv("socket_path: %s" % socket_path, pc.remote_addr)
+ if not socket_path:
+ return {
+ "failed": True,
+ "msg": "unable to open shell. Please see: "
+ + "https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell",
+ }
+
+ task_vars["ansible_socket"] = socket_path
+ warnings.append(
+ [
+ "connection local support for this module is deprecated and will be removed in version 2.14, use connection %s"
+ % pc.connection
+ ]
+ )
+ else:
+ return {
+ "failed": True,
+ "msg": "Connection type %s is not valid for this module"
+ % self._play_context.connection,
+ }
+
+ result = super(ActionModule, self).run(task_vars=task_vars)
+ if warnings:
+ if "warnings" in result:
+ result["warnings"].extend(warnings)
+ else:
+ result["warnings"] = warnings
+ return result
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/cliconf/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/cliconf/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/cliconf/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/cliconf/ios.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/cliconf/ios.py
new file mode 100644
index 00000000..e816389a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/cliconf/ios.py
@@ -0,0 +1,464 @@
+#
+# (c) 2017 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+author: Ansible Networking Team
+cliconf: ios
+short_description: Use ios cliconf to run command on Cisco IOS platform
+description:
+- This ios plugin provides low level abstraction apis for sending and receiving CLI
+ commands from Cisco IOS network devices.
+version_added: 1.0.0
+"""
+
+import re
+import time
+import json
+
+from ansible.errors import AnsibleConnectionFailure
+from ansible.module_utils._text import to_text
+from ansible.module_utils.common._collections_compat import Mapping
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+ dumps,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible.plugins.cliconf import CliconfBase, enable_mode
+
+
+class Cliconf(CliconfBase):
+ @enable_mode
+ def get_config(self, source="running", flags=None, format=None):
+ if source not in ("running", "startup"):
+ raise ValueError(
+ "fetching configuration from %s is not supported" % source
+ )
+
+ if format:
+ raise ValueError(
+ "'format' value %s is not supported for get_config" % format
+ )
+
+ if not flags:
+ flags = []
+ if source == "running":
+ cmd = "show running-config "
+ else:
+ cmd = "show startup-config "
+
+ cmd += " ".join(to_list(flags))
+ cmd = cmd.strip()
+
+ return self.send_command(cmd)
+
+ def get_diff(
+ self,
+ candidate=None,
+ running=None,
+ diff_match="line",
+ diff_ignore_lines=None,
+ path=None,
+ diff_replace="line",
+ ):
+ """
+ Generate diff between candidate and running configuration. If the
+ remote host supports onbox diff capabilities ie. supports_onbox_diff in that case
+ candidate and running configurations are not required to be passed as argument.
+ In case if onbox diff capability is not supported candidate argument is mandatory
+ and running argument is optional.
+ :param candidate: The configuration which is expected to be present on remote host.
+ :param running: The base configuration which is used to generate diff.
+ :param diff_match: Instructs how to match the candidate configuration with current device configuration
+ Valid values are 'line', 'strict', 'exact', 'none'.
+ 'line' - commands are matched line by line
+ 'strict' - command lines are matched with respect to position
+ 'exact' - command lines must be an equal match
+ 'none' - will not compare the candidate configuration with the running configuration
+ :param diff_ignore_lines: Use this argument to specify one or more lines that should be
+ ignored during the diff. This is used for lines in the configuration
+ that are automatically updated by the system. This argument takes
+ a list of regular expressions or exact line matches.
+ :param path: 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.
+ :param diff_replace: Instructs on the way to perform the configuration on the device.
+ If the replace argument is set to I(line) then the modified lines are
+ pushed to the device in configuration mode. If the replace argument is
+ set to I(block) then the entire command block is pushed to the device in
+ configuration mode if any line is not correct.
+ :return: Configuration diff in json format.
+ {
+ 'config_diff': '',
+ 'banner_diff': {}
+ }
+
+ """
+ diff = {}
+ device_operations = self.get_device_operations()
+ option_values = self.get_option_values()
+
+ if candidate is None and device_operations["supports_generate_diff"]:
+ raise ValueError(
+ "candidate configuration is required to generate diff"
+ )
+
+ if diff_match not in option_values["diff_match"]:
+ raise ValueError(
+ "'match' value %s in invalid, valid values are %s"
+ % (diff_match, ", ".join(option_values["diff_match"]))
+ )
+
+ if diff_replace not in option_values["diff_replace"]:
+ raise ValueError(
+ "'replace' value %s in invalid, valid values are %s"
+ % (diff_replace, ", ".join(option_values["diff_replace"]))
+ )
+
+ # prepare candidate configuration
+ candidate_obj = NetworkConfig(indent=1)
+ want_src, want_banners = self._extract_banners(candidate)
+ candidate_obj.load(want_src)
+
+ if running and diff_match != "none":
+ # running configuration
+ have_src, have_banners = self._extract_banners(running)
+ running_obj = NetworkConfig(
+ indent=1, contents=have_src, ignore_lines=diff_ignore_lines
+ )
+ configdiffobjs = candidate_obj.difference(
+ running_obj, path=path, match=diff_match, replace=diff_replace
+ )
+
+ else:
+ configdiffobjs = candidate_obj.items
+ have_banners = {}
+
+ diff["config_diff"] = (
+ dumps(configdiffobjs, "commands") if configdiffobjs else ""
+ )
+ banners = self._diff_banners(want_banners, have_banners)
+ diff["banner_diff"] = banners if banners else {}
+ return diff
+
+ @enable_mode
+ def edit_config(
+ self, candidate=None, commit=True, replace=None, comment=None
+ ):
+ resp = {}
+ operations = self.get_device_operations()
+ self.check_edit_config_capability(
+ operations, candidate, commit, replace, comment
+ )
+
+ results = []
+ requests = []
+ if commit:
+ self.send_command("configure terminal")
+ for line in to_list(candidate):
+ if not isinstance(line, Mapping):
+ line = {"command": line}
+
+ cmd = line["command"]
+ if cmd != "end" and cmd[0] != "!":
+ results.append(self.send_command(**line))
+ requests.append(cmd)
+
+ self.send_command("end")
+ else:
+ raise ValueError("check mode is not supported")
+
+ resp["request"] = requests
+ resp["response"] = results
+ return resp
+
+ def edit_macro(
+ self, candidate=None, commit=True, replace=None, comment=None
+ ):
+ """
+ ios_config:
+ lines: "{{ macro_lines }}"
+ parents: "macro name {{ macro_name }}"
+ after: '@'
+ match: line
+ replace: block
+ """
+ resp = {}
+ operations = self.get_device_operations()
+ self.check_edit_config_capability(
+ operations, candidate, commit, replace, comment
+ )
+
+ results = []
+ requests = []
+ if commit:
+ commands = ""
+ self.send_command("config terminal")
+ time.sleep(0.1)
+ # first item: macro command
+ commands += candidate.pop(0) + "\n"
+ multiline_delimiter = candidate.pop(-1)
+ for line in candidate:
+ commands += " " + line + "\n"
+ commands += multiline_delimiter + "\n"
+ obj = {"command": commands, "sendonly": True}
+ results.append(self.send_command(**obj))
+ requests.append(commands)
+
+ time.sleep(0.1)
+ self.send_command("end", sendonly=True)
+ time.sleep(0.1)
+ results.append(self.send_command("\n"))
+ requests.append("\n")
+
+ resp["request"] = requests
+ resp["response"] = results
+ return resp
+
+ def get(
+ self,
+ command=None,
+ prompt=None,
+ answer=None,
+ sendonly=False,
+ output=None,
+ newline=True,
+ check_all=False,
+ ):
+ if not command:
+ raise ValueError("must provide value of command to execute")
+ if output:
+ raise ValueError(
+ "'output' value %s is not supported for get" % output
+ )
+
+ return self.send_command(
+ command=command,
+ prompt=prompt,
+ answer=answer,
+ sendonly=sendonly,
+ newline=newline,
+ check_all=check_all,
+ )
+
+ def get_device_info(self):
+ device_info = {}
+
+ device_info["network_os"] = "ios"
+ reply = self.get(command="show version")
+ data = to_text(reply, errors="surrogate_or_strict").strip()
+
+ match = re.search(r"Version (\S+)", data)
+ if match:
+ device_info["network_os_version"] = match.group(1).strip(",")
+
+ model_search_strs = [
+ r"^[Cc]isco (.+) \(revision",
+ r"^[Cc]isco (\S+).+bytes of .*memory",
+ ]
+ for item in model_search_strs:
+ match = re.search(item, data, re.M)
+ if match:
+ version = match.group(1).split(" ")
+ device_info["network_os_model"] = version[0]
+ break
+
+ match = re.search(r"^(.+) uptime", data, re.M)
+ if match:
+ device_info["network_os_hostname"] = match.group(1)
+
+ match = re.search(r'image file is "(.+)"', data)
+ if match:
+ device_info["network_os_image"] = match.group(1)
+
+ return device_info
+
+ def get_device_operations(self):
+ return {
+ "supports_diff_replace": True,
+ "supports_commit": False,
+ "supports_rollback": False,
+ "supports_defaults": True,
+ "supports_onbox_diff": False,
+ "supports_commit_comment": False,
+ "supports_multiline_delimiter": True,
+ "supports_diff_match": True,
+ "supports_diff_ignore_lines": True,
+ "supports_generate_diff": True,
+ "supports_replace": False,
+ }
+
+ def get_option_values(self):
+ return {
+ "format": ["text"],
+ "diff_match": ["line", "strict", "exact", "none"],
+ "diff_replace": ["line", "block"],
+ "output": [],
+ }
+
+ def get_capabilities(self):
+ result = super(Cliconf, self).get_capabilities()
+ result["rpc"] += [
+ "edit_banner",
+ "get_diff",
+ "run_commands",
+ "get_defaults_flag",
+ ]
+ result["device_operations"] = self.get_device_operations()
+ result.update(self.get_option_values())
+ return json.dumps(result)
+
+ def edit_banner(
+ self, candidate=None, multiline_delimiter="@", commit=True
+ ):
+ """
+ Edit banner on remote device
+ :param banners: Banners to be loaded in json format
+ :param multiline_delimiter: Line delimiter for banner
+ :param commit: Boolean value that indicates if the device candidate
+ configuration should be pushed in the running configuration or discarded.
+ :param diff: Boolean flag to indicate if configuration that is applied on remote host should
+ generated and returned in response or not
+ :return: Returns response of executing the configuration command received
+ from remote host
+ """
+ resp = {}
+ banners_obj = json.loads(candidate)
+ results = []
+ requests = []
+ if commit:
+ for key, value in iteritems(banners_obj):
+ key += " %s" % multiline_delimiter
+ self.send_command("config terminal", sendonly=True)
+ for cmd in [key, value, multiline_delimiter]:
+ obj = {"command": cmd, "sendonly": True}
+ results.append(self.send_command(**obj))
+ requests.append(cmd)
+
+ self.send_command("end", sendonly=True)
+ time.sleep(0.1)
+ results.append(self.send_command("\n"))
+ requests.append("\n")
+
+ resp["request"] = requests
+ resp["response"] = results
+
+ return resp
+
+ def run_commands(self, commands=None, check_rc=True):
+ if commands is None:
+ raise ValueError("'commands' value is required")
+
+ responses = list()
+ for cmd in to_list(commands):
+ if not isinstance(cmd, Mapping):
+ cmd = {"command": cmd}
+
+ output = cmd.pop("output", None)
+ if output:
+ raise ValueError(
+ "'output' value %s is not supported for run_commands"
+ % output
+ )
+
+ try:
+ out = self.send_command(**cmd)
+ except AnsibleConnectionFailure as e:
+ if check_rc:
+ raise
+ out = getattr(e, "err", to_text(e))
+
+ responses.append(out)
+
+ return responses
+
+ def get_defaults_flag(self):
+ """
+ The method identifies the filter that should be used to fetch running-configuration
+ with defaults.
+ :return: valid default filter
+ """
+ out = self.get("show running-config ?")
+ out = to_text(out, errors="surrogate_then_replace")
+
+ commands = set()
+ for line in out.splitlines():
+ if line.strip():
+ commands.add(line.strip().split()[0])
+
+ if "all" in commands:
+ return "all"
+ else:
+ return "full"
+
+ def set_cli_prompt_context(self):
+ """
+ Make sure we are in the operational cli mode
+ :return: None
+ """
+ if self._connection.connected:
+ out = self._connection.get_prompt()
+
+ if out is None:
+ raise AnsibleConnectionFailure(
+ message=u"cli prompt is not identified from the last received"
+ u" response window: %s"
+ % self._connection._last_recv_window
+ )
+
+ if re.search(
+ r"config.*\)#",
+ to_text(out, errors="surrogate_then_replace").strip(),
+ ):
+ self._connection.queue_message(
+ "vvvv", "wrong context, sending end to device"
+ )
+ self._connection.send_command("end")
+
+ def _extract_banners(self, config):
+ banners = {}
+ banner_cmds = re.findall(r"^banner (\w+)", config, re.M)
+ for cmd in banner_cmds:
+ regex = r"banner %s \^C(.+?)(?=\^C)" % cmd
+ match = re.search(regex, config, re.S)
+ if match:
+ key = "banner %s" % cmd
+ banners[key] = match.group(1).strip()
+
+ for cmd in banner_cmds:
+ regex = r"banner %s \^C(.+?)(?=\^C)" % cmd
+ match = re.search(regex, config, re.S)
+ if match:
+ config = config.replace(str(match.group(1)), "")
+
+ config = re.sub(r"banner \w+ \^C\^C", "!! banner removed", config)
+ return config, banners
+
+ def _diff_banners(self, want, have):
+ candidate = {}
+ for key, value in iteritems(want):
+ if value != have.get(key):
+ candidate[key] = value
+ return candidate
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/doc_fragments/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/doc_fragments/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/doc_fragments/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/doc_fragments/ios.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/doc_fragments/ios.py
new file mode 100644
index 00000000..0bb9cae5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/doc_fragments/ios.py
@@ -0,0 +1,81 @@
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+class ModuleDocFragment(object):
+
+ # Standard files documentation fragment
+ DOCUMENTATION = r"""options:
+ provider:
+ description:
+ - B(Deprecated)
+ - 'Starting with Ansible 2.5 we recommend using C(connection: network_cli).'
+ - For more information please see the L(IOS Platform Options guide, ../network/user_guide/platform_ios.html).
+ - HORIZONTALLINE
+ - A dict object containing connection details.
+ type: dict
+ suboptions:
+ host:
+ description:
+ - Specifies the DNS host name or address for connecting to the remote device
+ over the specified transport. The value of host is used as the destination
+ address for the transport.
+ type: str
+ port:
+ description:
+ - Specifies the port to use when building the connection to the remote device.
+ type: int
+ username:
+ description:
+ - Configures the username to use to authenticate the connection to the remote
+ device. This value is used to authenticate the SSH session. If the value
+ is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME)
+ will be used instead.
+ type: str
+ password:
+ description:
+ - Specifies the password to use to authenticate the connection to the remote
+ device. This value is used to authenticate the SSH session. If the value
+ is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD)
+ will be used instead.
+ type: str
+ timeout:
+ description:
+ - Specifies the timeout in seconds for communicating with the network device
+ for either connecting or sending commands. If the timeout is exceeded before
+ the operation is completed, the module will error.
+ type: int
+ ssh_keyfile:
+ description:
+ - Specifies the SSH key to use to authenticate the connection to the remote
+ device. This value is the path to the key used to authenticate the SSH
+ session. If the value is not specified in the task, the value of environment
+ variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
+ type: path
+ authorize:
+ description:
+ - Instructs the module to enter privileged mode on the remote device before
+ sending any commands. If not specified, the device will attempt to execute
+ all commands in non-privileged mode. If the value is not specified in the
+ task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be
+ used instead.
+ type: bool
+ default: false
+ auth_pass:
+ description:
+ - Specifies the password to use if required to enter privileged mode on the
+ remote device. If I(authorize) is false, then this argument does nothing.
+ If the value is not specified in the task, the value of environment variable
+ C(ANSIBLE_NET_AUTH_PASS) will be used instead.
+ type: str
+notes:
+- For more information on using Ansible to manage network devices see the :ref:`Ansible
+ Network Guide <network_guide>`
+- For more information on using Ansible to manage Cisco devices see the `Cisco integration
+ page <https://www.ansible.com/integrations/networks/cisco>`_.
+"""
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acl_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acl_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acl_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acl_interfaces/acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acl_interfaces/acl_interfaces.py
new file mode 100644
index 00000000..24b32d7b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acl_interfaces/acl_interfaces.py
@@ -0,0 +1,83 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the ios_acl_interfaces module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Acl_InterfacesArgs(object):
+ """The arg spec for the ios_acl_interfaces module
+ """
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"required": True, "type": "str"},
+ "access_groups": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "afi": {
+ "required": True,
+ "choices": ["ipv4", "ipv6"],
+ "type": "str",
+ },
+ "acls": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"required": True, "type": "str"},
+ "direction": {
+ "required": True,
+ "choices": ["in", "out"],
+ "type": "str",
+ },
+ },
+ },
+ },
+ },
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acls/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acls/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acls/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acls/acls.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acls/acls.py
new file mode 100644
index 00000000..87faedb0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/acls/acls.py
@@ -0,0 +1,404 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the ios_acls module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class AclsArgs(object):
+ """The arg spec for the ios_acls module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "afi": {
+ "required": True,
+ "choices": ["ipv4", "ipv6"],
+ "type": "str",
+ },
+ "acls": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "name": {"required": True, "type": "str"},
+ "acl_type": {
+ "choices": ["extended", "standard"],
+ "type": "str",
+ },
+ "aces": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "grant": {
+ "choices": ["permit", "deny"],
+ "type": "str",
+ },
+ "sequence": {"type": "int"},
+ "evaluate": {"type": "str"},
+ "source": {
+ "type": "dict",
+ "mutually_exclusive": [
+ ["address", "any", "host"],
+ ["wildcard_bits", "any", "host"],
+ ],
+ "options": {
+ "address": {"type": "str"},
+ "wildcard_bits": {"type": "str"},
+ "any": {"type": "bool"},
+ "host": {"type": "str"},
+ "port_protocol": {
+ "type": "dict",
+ "options": {
+ "eq": {"type": "str"},
+ "gt": {"type": "str"},
+ "lt": {"type": "str"},
+ "neq": {"type": "str"},
+ "range": {
+ "type": "dict",
+ "options": {
+ "start": {
+ "type": "int"
+ },
+ "end": {"type": "int"},
+ },
+ },
+ },
+ },
+ },
+ },
+ "destination": {
+ "type": "dict",
+ "mutually_exclusive": [
+ ["address", "any", "host"],
+ ["wildcard_bits", "any", "host"],
+ ],
+ "options": {
+ "address": {"type": "str"},
+ "wildcard_bits": {"type": "str"},
+ "any": {"type": "bool"},
+ "host": {"type": "str"},
+ "port_protocol": {
+ "type": "dict",
+ "options": {
+ "eq": {"type": "str"},
+ "gt": {"type": "str"},
+ "lt": {"type": "str"},
+ "neq": {"type": "str"},
+ "range": {
+ "type": "dict",
+ "options": {
+ "start": {
+ "type": "int"
+ },
+ "end": {"type": "int"},
+ },
+ },
+ },
+ },
+ },
+ },
+ "protocol": {"type": "str"},
+ "protocol_options": {
+ "type": "dict",
+ "options": {
+ "protocol_number": {"type": "int"},
+ "ahp": {"type": "bool"},
+ "eigrp": {"type": "bool"},
+ "esp": {"type": "bool"},
+ "gre": {"type": "bool"},
+ "hbh": {"type": "bool"},
+ "icmp": {
+ "type": "dict",
+ "options": {
+ "administratively_prohibited": {
+ "type": "bool"
+ },
+ "alternate_address": {
+ "type": "bool"
+ },
+ "conversion_error": {
+ "type": "bool"
+ },
+ "dod_host_prohibited": {
+ "type": "bool"
+ },
+ "dod_net_prohibited": {
+ "type": "bool"
+ },
+ "echo": {"type": "bool"},
+ "echo_reply": {"type": "bool"},
+ "general_parameter_problem": {
+ "type": "bool"
+ },
+ "host_isolated": {
+ "type": "bool"
+ },
+ "host_precedence_unreachable": {
+ "type": "bool"
+ },
+ "host_redirect": {
+ "type": "bool"
+ },
+ "host_tos_redirect": {
+ "type": "bool"
+ },
+ "host_tos_unreachable": {
+ "type": "bool"
+ },
+ "host_unknown": {
+ "type": "bool"
+ },
+ "host_unreachable": {
+ "type": "bool"
+ },
+ "information_reply": {
+ "type": "bool"
+ },
+ "information_request": {
+ "type": "bool"
+ },
+ "mask_reply": {"type": "bool"},
+ "mask_request": {
+ "type": "bool"
+ },
+ "mobile_redirect": {
+ "type": "bool"
+ },
+ "net_redirect": {
+ "type": "bool"
+ },
+ "net_tos_redirect": {
+ "type": "bool"
+ },
+ "net_tos_unreachable": {
+ "type": "bool"
+ },
+ "net_unreachable": {
+ "type": "bool"
+ },
+ "network_unknown": {
+ "type": "bool"
+ },
+ "no_room_for_option": {
+ "type": "bool"
+ },
+ "option_missing": {
+ "type": "bool"
+ },
+ "packet_too_big": {
+ "type": "bool"
+ },
+ "parameter_problem": {
+ "type": "bool"
+ },
+ "port_unreachable": {
+ "type": "bool"
+ },
+ "precedence_unreachable": {
+ "type": "bool"
+ },
+ "protocol_unreachable": {
+ "type": "bool"
+ },
+ "reassembly_timeout": {
+ "type": "bool"
+ },
+ "redirect": {"type": "bool"},
+ "router_advertisement": {
+ "type": "bool"
+ },
+ "router_solicitation": {
+ "type": "bool"
+ },
+ "source_quench": {
+ "type": "bool"
+ },
+ "source_route_failed": {
+ "type": "bool"
+ },
+ "time_exceeded": {
+ "type": "bool"
+ },
+ "timestamp_reply": {
+ "type": "bool"
+ },
+ "timestamp_request": {
+ "type": "bool"
+ },
+ "traceroute": {"type": "bool"},
+ "ttl_exceeded": {
+ "type": "bool"
+ },
+ "unreachable": {
+ "type": "bool"
+ },
+ },
+ },
+ "igmp": {
+ "type": "dict",
+ "options": {
+ "dvmrp": {"type": "bool"},
+ "host_query": {"type": "bool"},
+ "mtrace_resp": {
+ "type": "bool"
+ },
+ "mtrace_route": {
+ "type": "bool"
+ },
+ "pim": {"type": "bool"},
+ "trace": {"type": "bool"},
+ "v1host_report": {
+ "type": "bool"
+ },
+ "v2host_report": {
+ "type": "bool"
+ },
+ "v2leave_group": {
+ "type": "bool"
+ },
+ "v3host_report": {
+ "type": "bool"
+ },
+ },
+ },
+ "ip": {"type": "bool"},
+ "ipv6": {"type": "bool"},
+ "ipinip": {"type": "bool"},
+ "nos": {"type": "bool"},
+ "ospf": {"type": "bool"},
+ "pcp": {"type": "bool"},
+ "pim": {"type": "bool"},
+ "sctp": {"type": "bool"},
+ "tcp": {
+ "options": {
+ "ack": {"type": "bool"},
+ "established": {
+ "type": "bool"
+ },
+ "fin": {"type": "bool"},
+ "psh": {"type": "bool"},
+ "rst": {"type": "bool"},
+ "syn": {"type": "bool"},
+ "urg": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "udp": {"type": "bool"},
+ },
+ },
+ "dscp": {"type": "str"},
+ "fragments": {"type": "str"},
+ "log": {"type": "str"},
+ "log_input": {"type": "str"},
+ "option": {
+ "type": "dict",
+ "options": {
+ "add_ext": {"type": "bool"},
+ "any_options": {"type": "bool"},
+ "com_security": {"type": "bool"},
+ "dps": {"type": "bool"},
+ "encode": {"type": "bool"},
+ "eool": {"type": "bool"},
+ "ext_ip": {"type": "bool"},
+ "ext_security": {"type": "bool"},
+ "finn": {"type": "bool"},
+ "imitd": {"type": "bool"},
+ "lsr": {"type": "bool"},
+ "mtup": {"type": "bool"},
+ "mtur": {"type": "bool"},
+ "no_op": {"type": "bool"},
+ "nsapa": {"type": "bool"},
+ "record_route": {"type": "bool"},
+ "router_alert": {"type": "bool"},
+ "sdb": {"type": "bool"},
+ "security": {"type": "bool"},
+ "ssr": {"type": "bool"},
+ "stream_id": {"type": "bool"},
+ "timestamp": {"type": "bool"},
+ "traceroute": {"type": "bool"},
+ "ump": {"type": "bool"},
+ "visa": {"type": "bool"},
+ "zsu": {"type": "bool"},
+ },
+ },
+ "precedence": {"type": "int"},
+ "time_range": {"type": "str"},
+ "tos": {
+ "type": "dict",
+ "options": {
+ "service_value": {"type": "int"},
+ "max_reliability": {"type": "bool"},
+ "max_throughput": {"type": "bool"},
+ "min_delay": {"type": "bool"},
+ "min_monetary_cost": {"type": "bool"},
+ "normal": {"type": "bool"},
+ },
+ },
+ "ttl": {
+ "type": "dict",
+ "options": {
+ "eq": {"type": "int"},
+ "gt": {"type": "int"},
+ "lt": {"type": "int"},
+ "neq": {"type": "int"},
+ "range": {
+ "type": "dict",
+ "options": {
+ "start": {"type": "int"},
+ "end": {"type": "int"},
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/bgp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/bgp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/bgp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/bgp_global/bgp_global.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/bgp_global/bgp_global.py
new file mode 100644
index 00000000..3666a359
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/bgp_global/bgp_global.py
@@ -0,0 +1,910 @@
+# -*- coding: utf-8 -*-
+# Copyright 2021 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the
+# cli_rm_builder.
+#
+# Manually editing this file is not advised.
+#
+# To update the argspec make the desired changes
+# in the module docstring and re-run
+# cli_rm_builder.
+#
+#############################################
+
+"""
+The arg spec for the cisco.ios_bgp_global module
+"""
+
+
+class Bgp_globalArgs(object): # pylint: disable=R0903
+ """The arg spec for the cisco.ios_bgp_global module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "type": "dict",
+ "options": {
+ "as_number": {"type": "str", "required": True},
+ "aggregate_address": {
+ "type": "dict",
+ "options": {
+ "address": {"type": "str"},
+ "netmask": {"type": "str"},
+ "advertise_map": {"type": "str"},
+ "as_confed_set": {"type": "bool"},
+ "as_set": {"type": "bool"},
+ "attribute_map": {"type": "str"},
+ "summary_only": {"type": "bool"},
+ "suppress_map": {"type": "str"},
+ },
+ },
+ "auto_summary": {"type": "bool"},
+ "bgp": {
+ "type": "dict",
+ "options": {
+ "additional_paths": {
+ "type": "dict",
+ "options": {
+ "install": {"type": "bool"},
+ "receive": {"type": "bool"},
+ "select": {
+ "type": "dict",
+ "options": {
+ "all": {"type": "bool"},
+ "best": {"type": "int"},
+ "best_external": {"type": "bool"},
+ "group_best": {"type": "bool"},
+ },
+ },
+ "send": {"type": "bool"},
+ },
+ },
+ "advertise_best_external": {"type": "bool"},
+ "aggregate_timer": {"type": "int"},
+ "always_compare_med": {"type": "bool"},
+ "asnotation": {"type": "bool"},
+ "bestpath": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "aigp": {"type": "bool"},
+ "compare_routerid": {"type": "bool"},
+ "cost_community": {"type": "bool"},
+ "igp_metric": {"type": "bool"},
+ "med": {
+ "type": "dict",
+ "options": {
+ "confed": {"type": "bool"},
+ "missing_as_worst": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "client_to_client": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "all": {"type": "bool"},
+ "intra_cluster": {"type": "str"},
+ },
+ },
+ "cluster_id": {"type": "bool"},
+ "confederation": {
+ "type": "dict",
+ "options": {
+ "identifier": {"type": "str"},
+ "peers": {"type": "str"},
+ },
+ },
+ "consistency_checker": {
+ "type": "dict",
+ "options": {
+ "auto_repair": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "interval": {"type": "int"},
+ },
+ },
+ "error_message": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "interval": {"type": "int"},
+ },
+ },
+ },
+ },
+ "dampening": {
+ "type": "dict",
+ "options": {
+ "penalty_half_time": {"type": "int"},
+ "reuse_route_val": {"type": "int"},
+ "suppress_route_val": {"type": "int"},
+ "max_suppress": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "deterministic_med": {"type": "bool"},
+ "dmzlink_bw": {"type": "bool"},
+ "enforce_first_as": {"type": "bool"},
+ "enhanced_error": {"type": "bool"},
+ "fast_external_fallover": {"type": "bool"},
+ "graceful_restart": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "extended": {"type": "bool"},
+ "restart_time": {"type": "int"},
+ "stalepath_time": {"type": "int"},
+ },
+ },
+ "graceful_shutdown": {
+ "type": "dict",
+ "options": {
+ "neighbors": {
+ "type": "dict",
+ "options": {
+ "time": {"type": "int"},
+ "activate": {"type": "bool"},
+ },
+ },
+ "vrfs": {
+ "type": "dict",
+ "options": {
+ "time": {"type": "int"},
+ "activate": {"type": "bool"},
+ },
+ },
+ "community": {"type": "str"},
+ "local_preference": {"type": "int"},
+ },
+ },
+ "inject_map": {
+ "type": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "exist_map_name": {"type": "str"},
+ "copy_attributes": {"type": "bool"},
+ },
+ },
+ "listen": {
+ "type": "dict",
+ "options": {
+ "limit": {"type": "int"},
+ "range": {
+ "type": "dict",
+ "options": {
+ "ipv4_with_subnet": {"type": "str"},
+ "ipv6_with_subnet": {"type": "str"},
+ "peer_group": {"type": "str"},
+ },
+ },
+ },
+ },
+ "log_neighbor_changes": {"type": "bool"},
+ "maxas_limit": {"type": "int"},
+ "maxcommunity_limit": {"type": "int"},
+ "maxextcommunity_limit": {"type": "int"},
+ "nexthop": {
+ "type": "dict",
+ "options": {
+ "route_map": {"type": "str"},
+ "trigger": {
+ "type": "dict",
+ "options": {
+ "delay": {"type": "int"},
+ "enable": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "nopeerup_delay": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "cold_boot": {"type": "int"},
+ "nsf_switchover": {"type": "int"},
+ "post_boot": {"type": "int"},
+ "user_initiated": {"type": "int"},
+ },
+ },
+ "recursion": {"type": "bool"},
+ "redistribute_internal": {"type": "bool"},
+ "refresh": {
+ "type": "dict",
+ "options": {
+ "max_eor_time": {"type": "int"},
+ "stalepath_time": {"type": "int"},
+ },
+ },
+ "regexp": {"type": "bool"},
+ "route_map": {"type": "bool"},
+ "router_id": {
+ "type": "dict",
+ "options": {
+ "address": {"type": "str"},
+ "interface": {"type": "str"},
+ "vrf": {"type": "bool"},
+ },
+ },
+ "scan_time": {"type": "int"},
+ "slow_peer": {
+ "type": "dict",
+ "options": {
+ "detection": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "threshold": {"type": "int"},
+ },
+ },
+ "split_update_group": {
+ "type": "dict",
+ "options": {
+ "dynamic": {"type": "bool"},
+ "permanent": {"type": "int"},
+ },
+ },
+ },
+ },
+ "snmp": {"type": "bool"},
+ "sso": {"type": "bool"},
+ "soft_reconfig_backup": {"type": "bool"},
+ "suppress_inactive": {"type": "bool"},
+ "transport": {"type": "bool"},
+ "update_delay": {"type": "int"},
+ "update_group": {"type": "bool"},
+ "upgrade_cli": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "af_mode": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "bmp": {
+ "type": "dict",
+ "options": {
+ "buffer_size": {"type": "int"},
+ "initial_refresh": {
+ "type": "dict",
+ "options": {
+ "delay": {"type": "int"},
+ "skip": {"type": "bool"},
+ },
+ },
+ "server": {"type": "int"},
+ },
+ },
+ "default_information": {"type": "bool"},
+ "default_metric": {"type": "int"},
+ "distance": {
+ "type": "dict",
+ "options": {
+ "admin": {
+ "type": "dict",
+ "options": {
+ "distance": {"type": "int"},
+ "address": {"type": "str"},
+ "wildcard_bit": {"type": "str"},
+ "acl": {"type": "str"},
+ },
+ },
+ "bgp": {
+ "type": "dict",
+ "options": {
+ "routes_external": {"type": "int"},
+ "routes_internal": {"type": "int"},
+ "routes_local": {"type": "int"},
+ },
+ },
+ "mbgp": {
+ "type": "dict",
+ "options": {
+ "routes_external": {"type": "int"},
+ "routes_internal": {"type": "int"},
+ "routes_local": {"type": "int"},
+ },
+ },
+ },
+ },
+ "distribute_list": {
+ "type": "dict",
+ "options": {
+ "acl": {"type": "str"},
+ "in": {"type": "bool"},
+ "out": {"type": "bool"},
+ "interface": {"type": "str"},
+ },
+ },
+ "maximum_paths": {
+ "type": "dict",
+ "options": {
+ "paths": {"type": "int"},
+ "eibgp": {"type": "int"},
+ "ibgp": {"type": "int"},
+ },
+ },
+ "maximum_secondary_paths": {
+ "type": "dict",
+ "options": {
+ "paths": {"type": "int"},
+ "eibgp": {"type": "int"},
+ "ibgp": {"type": "int"},
+ },
+ },
+ "neighbor": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "address": {"type": "str"},
+ "tag": {"type": "str"},
+ "ipv6_adddress": {"type": "str"},
+ "activate": {"type": "bool"},
+ "additional_paths": {
+ "type": "dict",
+ "options": {
+ "disable": {"type": "bool"},
+ "receive": {"type": "bool"},
+ "send": {"type": "bool"},
+ },
+ },
+ "advertise": {
+ "type": "dict",
+ "options": {
+ "additional_paths": {
+ "type": "dict",
+ "options": {
+ "all": {"type": "bool"},
+ "best": {"type": "int"},
+ "group_best": {"type": "bool"},
+ },
+ },
+ "best_external": {"type": "bool"},
+ "diverse_path": {
+ "type": "dict",
+ "options": {
+ "backup": {"type": "bool"},
+ "mpath": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "advertise_map": {
+ "type": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "exist_map": {"type": "str"},
+ "non_exist_map": {"type": "str"},
+ },
+ },
+ "advertisement_interval": {"type": "int"},
+ "aigp": {
+ "type": "dict",
+ "options": {
+ "enable": {"type": "bool"},
+ "send": {
+ "type": "dict",
+ "options": {
+ "cost_community": {
+ "type": "dict",
+ "options": {
+ "id": {"type": "int"},
+ "poi": {
+ "type": "dict",
+ "options": {
+ "igp_cost": {
+ "type": "bool"
+ },
+ "pre_bestpath": {
+ "type": "bool"
+ },
+ "transitive": {
+ "type": "bool"
+ },
+ },
+ },
+ },
+ },
+ "med": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "allow_policy": {"type": "bool"},
+ "allowas_in": {"type": "int"},
+ "as_override": {"type": "bool"},
+ "bmp_activate": {
+ "type": "dict",
+ "options": {
+ "all": {"type": "bool"},
+ "server": {"type": "int"},
+ },
+ },
+ "capability": {
+ "type": "dict",
+ "options": {
+ "both": {"type": "bool"},
+ "receive": {"type": "bool"},
+ "send": {"type": "bool"},
+ },
+ },
+ "cluster_id": {"type": "str"},
+ "default_originate": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "description": {"type": "str"},
+ "disable_connected_check": {"type": "bool"},
+ "distribute_list": {
+ "type": "dict",
+ "options": {
+ "acl": {"type": "str"},
+ "in": {"type": "bool"},
+ "out": {"type": "bool"},
+ },
+ },
+ "dmzlink_bw": {"type": "bool"},
+ "ebgp_multihop": {
+ "type": "dict",
+ "options": {
+ "enable": {"type": "bool"},
+ "hop_count": {"type": "int"},
+ },
+ },
+ "fall_over": {
+ "type": "dict",
+ "options": {
+ "bfd": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "multi_hop": {"type": "bool"},
+ "single_hop": {"type": "bool"},
+ },
+ },
+ "route_map": {"type": "str"},
+ },
+ },
+ "filter_list": {
+ "type": "dict",
+ "options": {
+ "path_acl": {"type": "str"},
+ "in": {"type": "bool"},
+ "out": {"type": "bool"},
+ },
+ },
+ "ha_mode": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "disable": {"type": "bool"},
+ },
+ },
+ "inherit": {"type": "str"},
+ "local_as": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "number": {"type": "int"},
+ "dual_as": {"type": "bool"},
+ "no_prepend": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "replace_as": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "log_neighbor_changes": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "disable": {"type": "bool"},
+ },
+ },
+ "maximum_prefix": {
+ "type": "dict",
+ "options": {
+ "max_no": {"type": "int"},
+ "threshold_val": {"type": "int"},
+ "restart": {"type": "int"},
+ "warning_only": {"type": "bool"},
+ },
+ },
+ "next_hop_self": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "all": {"type": "bool"},
+ },
+ },
+ "next_hop_unchanged": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "allpaths": {"type": "bool"},
+ },
+ },
+ "password": {"type": "str"},
+ "path_attribute": {
+ "type": "dict",
+ "options": {
+ "discard": {
+ "type": "dict",
+ "options": {
+ "type": {"type": "int"},
+ "range": {
+ "type": "dict",
+ "options": {
+ "start": {"type": "int"},
+ "end": {"type": "int"},
+ },
+ },
+ "in": {"type": "bool"},
+ },
+ },
+ "treat_as_withdraw": {
+ "type": "dict",
+ "options": {
+ "type": {"type": "int"},
+ "range": {
+ "type": "dict",
+ "options": {
+ "start": {"type": "int"},
+ "end": {"type": "int"},
+ },
+ },
+ "in": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "peer_group": {"type": "str"},
+ "remote_as": {"type": "int"},
+ "remove_private_as": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "all": {"type": "bool"},
+ "replace_as": {"type": "bool"},
+ },
+ },
+ "route_map": {
+ "type": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "in": {"type": "bool"},
+ "out": {"type": "bool"},
+ },
+ },
+ "route_reflector_client": {"type": "bool"},
+ "route_server_client": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "context": {"type": "str"},
+ },
+ },
+ "send_community": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "both": {"type": "bool"},
+ "extended": {"type": "bool"},
+ "standard": {"type": "bool"},
+ },
+ },
+ "send_label": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "explicit_null": {"type": "bool"},
+ },
+ },
+ "shutdown": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "graceful": {"type": "int"},
+ },
+ },
+ "slow_peer": {
+ "type": "dict",
+ "options": {
+ "detection": {
+ "type": "dict",
+ "options": {
+ "enable": {"type": "bool"},
+ "disable": {"type": "bool"},
+ "threshold": {"type": "int"},
+ },
+ },
+ "split_update_group": {
+ "type": "dict",
+ "options": {
+ "dynamic": {
+ "type": "dict",
+ "options": {
+ "enable": {"type": "bool"},
+ "disable": {"type": "bool"},
+ "permanent": {"type": "bool"},
+ },
+ },
+ "static": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "soft_reconfiguration": {"type": "bool"},
+ "timers": {
+ "type": "dict",
+ "options": {
+ "interval": {"type": "int"},
+ "holdtime": {"type": "int"},
+ "min_holdtime": {"type": "int"},
+ },
+ },
+ "translate_update": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "nlri": {
+ "type": "dict",
+ "options": {
+ "multicast": {"type": "bool"},
+ "unicast": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "transport": {
+ "type": "dict",
+ "options": {
+ "connection_mode": {
+ "type": "dict",
+ "options": {
+ "active": {"type": "bool"},
+ "passive": {"type": "bool"},
+ },
+ },
+ "multi_session": {"type": "bool"},
+ "path_mtu_discovery": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "disable": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "ttl_security": {"type": "int"},
+ "unsuppress_map": {"type": "str"},
+ "version": {"type": "int"},
+ "weight": {"type": "int"},
+ },
+ },
+ "redistribute": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "application": {
+ "type": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "metric": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "bgp": {
+ "type": "dict",
+ "options": {
+ "as_number": {"type": "str"},
+ "metric": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "connected": {
+ "type": "dict",
+ "options": {
+ "metric": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "eigrp": {
+ "type": "dict",
+ "options": {
+ "as_number": {"type": "str"},
+ "metric": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "isis": {
+ "type": "dict",
+ "options": {
+ "area_tag": {"type": "str"},
+ "clns": {"type": "bool"},
+ "ip": {"type": "bool"},
+ "metric": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "iso_igrp": {
+ "type": "dict",
+ "options": {
+ "area_tag": {"type": "str"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "lisp": {
+ "type": "dict",
+ "options": {
+ "metric": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "mobile": {
+ "type": "dict",
+ "options": {
+ "metric": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "odr": {
+ "type": "dict",
+ "options": {
+ "metric": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "ospf": {
+ "type": "dict",
+ "options": {
+ "process_id": {"type": "int"},
+ "match": {
+ "type": "dict",
+ "options": {
+ "external": {"type": "bool"},
+ "internal": {"type": "bool"},
+ "nssa_external": {"type": "bool"},
+ "type_1": {"type": "bool"},
+ "type_2": {"type": "bool"},
+ },
+ },
+ "metric": {"type": "int"},
+ "route_map": {"type": "str"},
+ "vrf": {"type": "str"},
+ },
+ },
+ "ospfv3": {
+ "type": "dict",
+ "options": {
+ "process_id": {"type": "int"},
+ "match": {
+ "type": "dict",
+ "options": {
+ "external": {"type": "bool"},
+ "internal": {"type": "bool"},
+ "nssa_external": {"type": "bool"},
+ "type_1": {"type": "bool"},
+ "type_2": {"type": "bool"},
+ },
+ },
+ "metric": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "rip": {
+ "type": "dict",
+ "options": {
+ "metric": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "static": {
+ "type": "dict",
+ "options": {
+ "clns": {"type": "bool"},
+ "ip": {"type": "bool"},
+ "metric": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "vrf": {
+ "type": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "global": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "route_server_context": {
+ "type": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "address_family": {
+ "type": "dict",
+ "options": {
+ "afi": {
+ "type": "str",
+ "choices": ["ipv4", "ipv6"],
+ },
+ "modifier": {
+ "type": "str",
+ "choices": ["multicast", "unicast"],
+ },
+ "import_map": {"type": "str"},
+ },
+ },
+ "description": {"type": "str"},
+ },
+ },
+ "scope": {
+ "type": "dict",
+ "options": {
+ "global": {"type": "bool"},
+ "vrf": {"type": "str"},
+ },
+ },
+ "synchronization": {"type": "bool"},
+ "table_map": {
+ "type": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "filter": {"type": "bool"},
+ },
+ },
+ "template": {
+ "type": "dict",
+ "options": {
+ "peer_policy": {"type": "str"},
+ "peer_session": {"type": "str"},
+ },
+ },
+ "timers": {
+ "type": "dict",
+ "options": {
+ "keepalive": {"type": "int"},
+ "holdtime": {"type": "int"},
+ "min_holdtime": {"type": "int"},
+ },
+ },
+ },
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "type": "str",
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "purged",
+ "gathered",
+ "parsed",
+ "rendered",
+ ],
+ "default": "merged",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/facts/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/facts/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/facts/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/facts/facts.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/facts/facts.py
new file mode 100644
index 00000000..935fee75
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/facts/facts.py
@@ -0,0 +1,27 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The arg spec for the ios facts module.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class FactsArgs(object):
+ """ The arg spec for the ios facts module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "gather_subset": dict(
+ default=["!config"], type="list", elements="str"
+ ),
+ "gather_network_resources": dict(type="list", elements="str"),
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/interfaces/interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/interfaces/interfaces.py
new file mode 100644
index 00000000..5dbdda17
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/interfaces/interfaces.py
@@ -0,0 +1,64 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the ios_interfaces module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class InterfacesArgs(object):
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str", "required": True},
+ "description": {"type": "str"},
+ "enabled": {"default": True, "type": "bool"},
+ "speed": {"type": "str"},
+ "mtu": {"type": "int"},
+ "duplex": {"type": "str", "choices": ["full", "half", "auto"]},
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "rendered",
+ "parsed",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l2_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l2_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l2_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l2_interfaces/l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l2_interfaces/l2_interfaces.py
new file mode 100644
index 00000000..0f21f3a3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l2_interfaces/l2_interfaces.py
@@ -0,0 +1,80 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the ios_l2_interfaces module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class L2_InterfacesArgs(object):
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str", "required": True},
+ "mode": {"type": "str", "choices": ["access", "trunk"]},
+ "access": {
+ "type": "dict",
+ "options": {"vlan": {"type": "int"}},
+ },
+ "voice": {
+ "type": "dict",
+ "options": {"vlan": {"type": "int"}},
+ },
+ "trunk": {
+ "type": "dict",
+ "options": {
+ "allowed_vlans": {"type": "list", "elements": "str"},
+ "encapsulation": {
+ "type": "str",
+ "choices": ["dot1q", "isl", "negotiate"],
+ },
+ "native_vlan": {"type": "int"},
+ "pruning_vlans": {"type": "list", "elements": "str"},
+ },
+ },
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "rendered",
+ "parsed",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l3_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l3_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l3_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l3_interfaces/l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l3_interfaces/l3_interfaces.py
new file mode 100644
index 00000000..ce8e1396
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/l3_interfaces/l3_interfaces.py
@@ -0,0 +1,75 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the ios_l3_interfaces module
+"""
+
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class L3_InterfacesArgs(object):
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str", "required": True},
+ "ipv4": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "address": {"type": "str"},
+ "secondary": {"type": "bool"},
+ "dhcp_client": {"type": "int"},
+ "dhcp_hostname": {"type": "str"},
+ },
+ },
+ "ipv6": {
+ "elements": "dict",
+ "type": "list",
+ "options": {"address": {"type": "str"}},
+ },
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "rendered",
+ "parsed",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp/lacp.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp/lacp.py
new file mode 100644
index 00000000..09f40b28
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp/lacp.py
@@ -0,0 +1,64 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the ios_lacp module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class LacpArgs(object):
+ """The arg spec for the ios_lacp module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "options": {
+ "system": {
+ "options": {"priority": {"required": True, "type": "int"}},
+ "type": "dict",
+ }
+ },
+ "type": "dict",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "deleted",
+ "rendered",
+ "parsed",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp_interfaces/lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp_interfaces/lacp_interfaces.py
new file mode 100644
index 00000000..b0af01a5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lacp_interfaces/lacp_interfaces.py
@@ -0,0 +1,66 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the ios_lacp_interfaces module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Lacp_InterfacesArgs(object):
+ """The arg spec for the ios_lacp_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"required": True, "type": "str"},
+ "port_priority": {"type": "int"},
+ "fast_switchover": {"type": "bool"},
+ "max_bundle": {"type": "int"},
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "rendered",
+ "parsed",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lag_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lag_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lag_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lag_interfaces/lag_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lag_interfaces/lag_interfaces.py
new file mode 100644
index 00000000..03021fed
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lag_interfaces/lag_interfaces.py
@@ -0,0 +1,79 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the ios_lag_interfaces module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Lag_interfacesArgs(object):
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"required": True, "type": "str"},
+ "members": {
+ "elements": "dict",
+ "options": {
+ "member": {"type": "str"},
+ "mode": {
+ "choices": [
+ "auto",
+ "on",
+ "desirable",
+ "active",
+ "passive",
+ ],
+ "type": "str",
+ "required": True,
+ },
+ "link": {"type": "int"},
+ },
+ "type": "list",
+ },
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "rendered",
+ "parsed",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_global/lldp_global.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_global/lldp_global.py
new file mode 100644
index 00000000..9133305e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_global/lldp_global.py
@@ -0,0 +1,74 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the ios_lldp_global module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Lldp_globalArgs(object):
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "options": {
+ "holdtime": {"type": "int"},
+ "reinit": {"type": "int"},
+ "enabled": {"type": "bool"},
+ "timer": {"type": "int"},
+ "tlv_select": {
+ "options": {
+ "four_wire_power_management": {"type": "bool"},
+ "mac_phy_cfg": {"type": "bool"},
+ "management_address": {"type": "bool"},
+ "port_description": {"type": "bool"},
+ "port_vlan": {"type": "bool"},
+ "power_management": {"type": "bool"},
+ "system_capabilities": {"type": "bool"},
+ "system_description": {"type": "bool"},
+ "system_name": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "deleted",
+ "rendered",
+ "parsed",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_interfaces/lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_interfaces/lldp_interfaces.py
new file mode 100644
index 00000000..f4ad39f5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/lldp_interfaces/lldp_interfaces.py
@@ -0,0 +1,73 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the ios_lldp_interfaces module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Lldp_InterfacesArgs(object):
+ """The arg spec for the ios_lldp_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"required": True, "type": "str"},
+ "transmit": {"type": "bool"},
+ "receive": {"type": "bool"},
+ "med_tlv_select": {
+ "options": {"inventory_management": {"type": "bool"}},
+ "type": "dict",
+ },
+ "tlv_select": {
+ "options": {"power_management": {"type": "bool"}},
+ "type": "dict",
+ },
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "rendered",
+ "parsed",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospf_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospf_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospf_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospf_interfaces/ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospf_interfaces/ospf_interfaces.py
new file mode 100644
index 00000000..b705c4b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospf_interfaces/ospf_interfaces.py
@@ -0,0 +1,200 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the cisco.ios_ospf_interfaces module
+"""
+
+
+class Ospf_InterfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the cisco.ios_ospf_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str", "required": True},
+ "address_family": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "afi": {
+ "type": "str",
+ "choices": ["ipv4", "ipv6"],
+ "required": True,
+ },
+ "process": {
+ "type": "dict",
+ "options": {
+ "id": {"type": "int"},
+ "area_id": {"type": "str"},
+ "secondaries": {"type": "bool"},
+ "instance_id": {"type": "int"},
+ },
+ },
+ "adjacency": {"type": "bool"},
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "key_chain": {"type": "str"},
+ "message_digest": {"type": "bool"},
+ "null": {"type": "bool"},
+ },
+ },
+ "bfd": {"type": "bool"},
+ "cost": {
+ "type": "dict",
+ "options": {
+ "interface_cost": {"type": "int"},
+ "dynamic_cost": {
+ "type": "dict",
+ "options": {
+ "default": {"type": "int"},
+ "hysteresis": {
+ "type": "dict",
+ "options": {
+ "percent": {"type": "int"},
+ "threshold": {"type": "int"},
+ },
+ },
+ "weight": {
+ "type": "dict",
+ "options": {
+ "l2_factor": {"type": "int"},
+ "latency": {"type": "int"},
+ "oc": {"type": "bool"},
+ "resources": {"type": "int"},
+ "throughput": {"type": "int"},
+ },
+ },
+ },
+ },
+ },
+ },
+ "database_filter": {"type": "bool"},
+ "dead_interval": {
+ "type": "dict",
+ "options": {
+ "time": {"type": "int"},
+ "minimal": {"type": "int"},
+ },
+ },
+ "demand_circuit": {
+ "type": "dict",
+ "options": {
+ "enable": {"type": "bool"},
+ "ignore": {"type": "bool"},
+ "disable": {"type": "bool"},
+ },
+ },
+ "flood_reduction": {"type": "bool"},
+ "hello_interval": {"type": "int"},
+ "lls": {"type": "bool"},
+ "manet": {
+ "type": "dict",
+ "options": {
+ "cost": {
+ "type": "dict",
+ "options": {
+ "percent": {"type": "int"},
+ "threshold": {"type": "int"},
+ },
+ },
+ "link_metrics": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "cost_threshold": {"type": "int"},
+ },
+ },
+ },
+ },
+ "mtu_ignore": {"type": "bool"},
+ "multi_area": {
+ "type": "dict",
+ "options": {
+ "id": {"type": "int"},
+ "cost": {"type": "int"},
+ },
+ },
+ "neighbor": {
+ "type": "dict",
+ "options": {
+ "address": {"type": "str"},
+ "cost": {"type": "int"},
+ "database_filter": {"type": "bool"},
+ "poll_interval": {"type": "int"},
+ "priority": {"type": "int"},
+ },
+ },
+ "network": {
+ "type": "dict",
+ "options": {
+ "broadcast": {"type": "bool"},
+ "manet": {"type": "bool"},
+ "non_broadcast": {"type": "bool"},
+ "point_to_multipoint": {"type": "bool"},
+ "point_to_point": {"type": "bool"},
+ },
+ },
+ "prefix_suppression": {"type": "bool"},
+ "priority": {"type": "int"},
+ "resync_timeout": {"type": "int"},
+ "retransmit_interval": {"type": "int"},
+ "shutdown": {"type": "bool"},
+ "transmit_delay": {"type": "int"},
+ "ttl_security": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "hops": {"type": "int"},
+ },
+ },
+ },
+ },
+ },
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "type": "str",
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv2/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv2/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv2/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv2/ospfv2.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv2/ospfv2.py
new file mode 100644
index 00000000..fb053745
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv2/ospfv2.py
@@ -0,0 +1,547 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the ios_ospfv2 module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Ospfv2Args(object):
+ """The arg spec for the ios_ospfv2 module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "options": {
+ "processes": {
+ "elements": "dict",
+ "options": {
+ "address_family": {
+ "options": {
+ "default": {"type": "bool"},
+ "snmp_context": {"type": "str"},
+ "topology": {
+ "options": {
+ "base": {"type": "bool"},
+ "name": {"type": "str"},
+ "tid": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "adjacency": {
+ "options": {
+ "max_adjacency": {"type": "int"},
+ "min_adjacency": {"type": "int"},
+ "none": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "areas": {
+ "elements": "dict",
+ "options": {
+ "area_id": {"type": "str"},
+ "authentication": {
+ "options": {
+ "enable": {"type": "bool"},
+ "message_digest": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "capability": {"type": "bool"},
+ "default_cost": {"type": "int"},
+ "filter_list": {
+ "elements": "dict",
+ "options": {
+ "direction": {
+ "choices": ["in", "out"],
+ "required": True,
+ "type": "str",
+ },
+ "name": {"type": "str"},
+ },
+ "type": "list",
+ },
+ "nssa": {
+ "options": {
+ "default_information_originate": {
+ "options": {
+ "metric": {"type": "int"},
+ "metric_type": {
+ "choices": [1, 2],
+ "type": "int",
+ },
+ "nssa_only": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "no_ext_capability": {"type": "bool"},
+ "no_redistribution": {"type": "bool"},
+ "no_summary": {"type": "bool"},
+ "set": {"type": "bool"},
+ "translate": {
+ "choices": [
+ "always",
+ "suppress-fa",
+ ],
+ "type": "str",
+ },
+ },
+ "type": "dict",
+ },
+ "ranges": {
+ "options": {
+ "address": {"type": "str"},
+ "advertise": {"type": "bool"},
+ "cost": {"type": "int"},
+ "netmask": {"type": "str"},
+ "not_advertise": {"type": "bool"},
+ },
+ "type": "list",
+ "elements": "dict",
+ },
+ "sham_link": {
+ "options": {
+ "cost": {"type": "int"},
+ "destination": {"type": "str"},
+ "source": {"type": "str"},
+ "ttl_security": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "stub": {
+ "options": {
+ "no_ext_capability": {"type": "bool"},
+ "no_summary": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "list",
+ },
+ "auto_cost": {
+ "options": {
+ "reference_bandwidth": {"type": "int"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "bfd": {"type": "bool"},
+ "capability": {
+ "options": {
+ "lls": {"type": "bool"},
+ "opaque": {"type": "bool"},
+ "transit": {"type": "bool"},
+ "vrf_lite": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "compatible": {
+ "options": {
+ "rfc1583": {"type": "bool"},
+ "rfc1587": {"type": "bool"},
+ "rfc5243": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "default_information": {
+ "options": {
+ "always": {"type": "bool"},
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "originate": {"type": "bool"},
+ "route_map": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ "default_metric": {"type": "int"},
+ "discard_route": {
+ "options": {
+ "external": {"type": "int"},
+ "internal": {"type": "int"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "distance": {
+ "options": {
+ "admin_distance": {
+ "options": {
+ "acl": {"type": "str"},
+ "address": {"type": "str"},
+ "distance": {"type": "int"},
+ "wildcard_bits": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ "ospf": {
+ "options": {
+ "external": {"type": "int"},
+ "inter_area": {"type": "int"},
+ "intra_area": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "distribute_list": {
+ "options": {
+ "acls": {
+ "elements": "dict",
+ "options": {
+ "direction": {
+ "choices": ["in", "out"],
+ "required": True,
+ "type": "str",
+ },
+ "interface": {"type": "str"},
+ "name": {
+ "required": True,
+ "type": "str",
+ },
+ "protocol": {"type": "str"},
+ },
+ "type": "list",
+ },
+ "prefix": {
+ "options": {
+ "direction": {
+ "choices": ["in", "out"],
+ "required": True,
+ "type": "str",
+ },
+ "gateway_name": {"type": "str"},
+ "interface": {"type": "str"},
+ "name": {
+ "required": True,
+ "type": "str",
+ },
+ "protocol": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ "route_map": {
+ "options": {
+ "name": {
+ "required": True,
+ "type": "str",
+ }
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "domain_id": {
+ "options": {
+ "ip_address": {
+ "options": {
+ "address": {"type": "str"},
+ "secondary": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "null": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "domain_tag": {"type": "int"},
+ "event_log": {
+ "options": {
+ "enable": {"type": "bool"},
+ "one_shot": {"type": "bool"},
+ "pause": {"type": "bool"},
+ "size": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "help": {"type": "bool"},
+ "ignore": {"type": "bool"},
+ "interface_id": {"type": "bool"},
+ "ispf": {"type": "bool"},
+ "limit": {
+ "options": {
+ "dc": {
+ "options": {
+ "disable": {"type": "bool"},
+ "number": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "non_dc": {
+ "options": {
+ "disable": {"type": "bool"},
+ "number": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "local_rib_criteria": {
+ "options": {
+ "enable": {"type": "bool"},
+ "forwarding_address": {"type": "bool"},
+ "inter_area_summary": {"type": "bool"},
+ "nssa_translation": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "log_adjacency_changes": {
+ "options": {
+ "detail": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "max_lsa": {
+ "options": {
+ "ignore_count": {"type": "int"},
+ "ignore_time": {"type": "int"},
+ "number": {"type": "int"},
+ "reset_time": {"type": "int"},
+ "threshold_value": {"type": "int"},
+ "warning_only": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "max_metric": {
+ "options": {
+ "external_lsa": {"type": "int"},
+ "include_stub": {"type": "bool"},
+ "on_startup": {
+ "options": {
+ "time": {"type": "int"},
+ "wait_for_bgp": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "router_lsa": {
+ "required": True,
+ "type": "bool",
+ },
+ "summary_lsa": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "maximum_paths": {"type": "int"},
+ "mpls": {
+ "options": {
+ "ldp": {
+ "options": {
+ "autoconfig": {
+ "options": {
+ "area": {"type": "str"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "sync": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "traffic_eng": {
+ "options": {
+ "area": {"type": "str"},
+ "autoroute_exclude": {"type": "str"},
+ "interface": {
+ "options": {
+ "area": {"type": "int"},
+ "interface_type": {
+ "type": "str"
+ },
+ },
+ "type": "dict",
+ },
+ "mesh_group": {
+ "options": {
+ "area": {"type": "str"},
+ "id": {"type": "int"},
+ "interface": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ "multicast_intact": {"type": "bool"},
+ "router_id_interface": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "neighbor": {
+ "options": {
+ "address": {"type": "str"},
+ "cost": {"type": "int"},
+ "database_filter": {"type": "bool"},
+ "poll_interval": {"type": "int"},
+ "priority": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "network": {
+ "options": {
+ "address": {"type": "str"},
+ "area": {"type": "str"},
+ "wildcard_bits": {"type": "str"},
+ },
+ "type": "list",
+ "elements": "dict",
+ },
+ "nsf": {
+ "options": {
+ "cisco": {
+ "options": {
+ "disable": {"type": "bool"},
+ "helper": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "ietf": {
+ "options": {
+ "disable": {"type": "bool"},
+ "helper": {"type": "bool"},
+ "strict_lsa_checking": {
+ "type": "bool"
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "passive_interface": {"type": "str"},
+ "prefix_suppression": {"type": "bool"},
+ "priority": {"type": "int"},
+ "process_id": {"required": True, "type": "int"},
+ "queue_depth": {
+ "options": {
+ "hello": {
+ "options": {
+ "max_packets": {"type": "int"},
+ "unlimited": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "update": {
+ "options": {
+ "max_packets": {"type": "int"},
+ "unlimited": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "router_id": {"type": "str"},
+ "shutdown": {"type": "bool"},
+ "summary_address": {
+ "options": {
+ "address": {"type": "str"},
+ "mask": {"type": "str"},
+ "not_advertise": {"type": "bool"},
+ "nssa_only": {"type": "bool"},
+ "tag": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "timers": {
+ "options": {
+ "lsa": {"type": "int"},
+ "pacing": {
+ "options": {
+ "flood": {"type": "int"},
+ "lsa_group": {"type": "int"},
+ "retransmission": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "throttle": {
+ "options": {
+ "lsa": {
+ "options": {
+ "first_delay": {"type": "int"},
+ "max_delay": {"type": "int"},
+ "min_delay": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "spf": {
+ "options": {
+ "between_delay": {
+ "type": "int"
+ },
+ "max_delay": {"type": "int"},
+ "receive_delay": {
+ "type": "int"
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "traffic_share": {"type": "bool"},
+ "ttl_security": {
+ "options": {
+ "hops": {"type": "int"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "vrf": {"type": "str"},
+ },
+ "type": "list",
+ }
+ },
+ "type": "dict",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv3/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv3/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv3/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv3/ospfv3.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv3/ospfv3.py
new file mode 100644
index 00000000..6b31ecd4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/ospfv3/ospfv3.py
@@ -0,0 +1,807 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the cisco.ios_ospfv3 module
+"""
+
+
+class Ospfv3Args(object): # pylint: disable=R0903
+ """The arg spec for the cisco.ios_ospfv3 module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "type": "dict",
+ "options": {
+ "processes": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "process_id": {"required": True, "type": "int"},
+ "address_family": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "afi": {
+ "type": "str",
+ "choices": ["ipv4", "ipv6"],
+ },
+ "unicast": {"type": "bool"},
+ "vrf": {"type": "str"},
+ "adjacency": {
+ "type": "dict",
+ "options": {
+ "min_adjacency": {"type": "int"},
+ "none": {"type": "bool"},
+ "max_adjacency": {"type": "int"},
+ "disable": {"type": "bool"},
+ },
+ },
+ "areas": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "area_id": {"type": "str"},
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "key_chain": {"type": "str"},
+ "null": {"type": "bool"},
+ },
+ },
+ "default_cost": {"type": "int"},
+ "filter_list": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "direction": {
+ "type": "str",
+ "choices": ["in", "out"],
+ "required": True,
+ },
+ },
+ },
+ "normal": {"type": "bool"},
+ "nssa": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "default_information_originate": {
+ "type": "dict",
+ "options": {
+ "metric": {
+ "type": "int"
+ },
+ "metric_type": {
+ "type": "int",
+ "choices": [1, 2],
+ },
+ "nssa_only": {
+ "type": "bool"
+ },
+ },
+ },
+ "no_redistribution": {
+ "type": "bool"
+ },
+ "no_summary": {"type": "bool"},
+ "translate": {
+ "type": "str",
+ "choices": [
+ "always",
+ "suppress-fa",
+ ],
+ },
+ },
+ },
+ "ranges": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "address": {"type": "str"},
+ "netmask": {"type": "str"},
+ "advertise": {"type": "bool"},
+ "cost": {"type": "int"},
+ "not_advertise": {
+ "type": "bool"
+ },
+ },
+ },
+ "sham_link": {
+ "type": "dict",
+ "options": {
+ "source": {"type": "str"},
+ "destination": {"type": "str"},
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "key_chain": {
+ "type": "str"
+ },
+ "null": {
+ "type": "bool"
+ },
+ },
+ },
+ "cost": {"type": "int"},
+ "ttl_security": {
+ "type": "int"
+ },
+ },
+ },
+ "stub": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "no_summary": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "deployment": {"type": "bool"},
+ "normal": {"type": "bool"},
+ },
+ },
+ "auto_cost": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "reference_bandwidth": {"type": "int"},
+ },
+ },
+ "bfd": {
+ "type": "dict",
+ "options": {
+ "all_interfaces": {"type": "bool"},
+ "disable": {"type": "bool"},
+ },
+ },
+ "capability": {"type": "bool"},
+ "compatible": {
+ "type": "dict",
+ "options": {
+ "rfc1583": {"type": "bool"},
+ "rfc1587": {"type": "bool"},
+ "rfc5243": {"type": "bool"},
+ },
+ },
+ "default_information": {
+ "type": "dict",
+ "options": {
+ "originate": {"type": "bool"},
+ "always": {"type": "bool"},
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "default_metric": {"type": "int"},
+ "discard_route": {
+ "type": "dict",
+ "options": {
+ "sham_link": {"type": "bool"},
+ "external": {"type": "bool"},
+ "internal": {"type": "bool"},
+ },
+ },
+ "distance": {"type": "int"},
+ "distribute_list": {
+ "type": "dict",
+ "options": {
+ "acls": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {
+ "type": "str",
+ "required": True,
+ },
+ "direction": {
+ "type": "str",
+ "required": True,
+ "choices": ["in", "out"],
+ },
+ "interface": {"type": "str"},
+ "protocol": {"type": "str"},
+ },
+ },
+ "prefix": {
+ "type": "dict",
+ "options": {
+ "name": {
+ "type": "str",
+ "required": True,
+ },
+ "gateway_name": {
+ "type": "str"
+ },
+ "direction": {
+ "type": "str",
+ "required": True,
+ "choices": ["in", "out"],
+ },
+ "interface": {"type": "str"},
+ "protocol": {"type": "str"},
+ },
+ },
+ "route_map": {
+ "type": "dict",
+ "options": {
+ "name": {
+ "type": "str",
+ "required": True,
+ }
+ },
+ },
+ },
+ },
+ "event_log": {
+ "type": "dict",
+ "options": {
+ "enable": {"type": "bool"},
+ "one_shot": {"type": "bool"},
+ "pause": {"type": "bool"},
+ "size": {"type": "int"},
+ },
+ },
+ "graceful_restart": {
+ "type": "dict",
+ "options": {
+ "enable": {"type": "bool"},
+ "disable": {"type": "bool"},
+ "strict_lsa_checking": {
+ "type": "bool"
+ },
+ },
+ },
+ "interface_id": {
+ "type": "dict",
+ "options": {
+ "ios_if_index": {"type": "bool"},
+ "snmp_if_index": {"type": "bool"},
+ },
+ },
+ "limit": {
+ "type": "dict",
+ "options": {
+ "dc": {
+ "type": "dict",
+ "options": {
+ "number": {"type": "int"},
+ "disable": {"type": "bool"},
+ },
+ },
+ "non_dc": {
+ "type": "dict",
+ "options": {
+ "number": {"type": "int"},
+ "disable": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "local_rib_criteria": {
+ "type": "dict",
+ "options": {
+ "enable": {"type": "bool"},
+ "forwarding_address": {"type": "bool"},
+ "inter_area_summary": {"type": "bool"},
+ "nssa_translation": {"type": "bool"},
+ },
+ },
+ "log_adjacency_changes": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "detail": {"type": "bool"},
+ },
+ },
+ "manet": {
+ "type": "dict",
+ "options": {
+ "cache": {
+ "type": "dict",
+ "options": {
+ "acknowledgement": {
+ "type": "int"
+ },
+ "update": {"type": "int"},
+ },
+ },
+ "hello": {
+ "type": "dict",
+ "options": {
+ "multicast": {"type": "bool"},
+ "unicast": {"type": "bool"},
+ },
+ },
+ "peering": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "disable": {"type": "bool"},
+ "per_interface": {
+ "type": "bool"
+ },
+ "redundancy": {"type": "int"},
+ },
+ },
+ "willingness": {"type": "int"},
+ },
+ },
+ "max_lsa": {
+ "type": "dict",
+ "options": {
+ "number": {"type": "int"},
+ "threshold_value": {"type": "int"},
+ "ignore_count": {"type": "int"},
+ "ignore_time": {"type": "int"},
+ "reset_time": {"type": "int"},
+ "warning_only": {"type": "bool"},
+ },
+ },
+ "max_metric": {
+ "type": "dict",
+ "options": {
+ "disable": {"type": "bool"},
+ "external_lsa": {"type": "int"},
+ "inter_area_lsas": {"type": "int"},
+ "on_startup": {
+ "type": "dict",
+ "options": {
+ "time": {"type": "int"},
+ "wait_for_bgp": {
+ "type": "bool"
+ },
+ },
+ },
+ "stub_prefix_lsa": {"type": "bool"},
+ },
+ },
+ "maximum_paths": {"type": "int"},
+ "passive_interface": {"type": "str"},
+ "prefix_suppression": {
+ "type": "dict",
+ "options": {
+ "enable": {"type": "bool"},
+ "disable": {"type": "bool"},
+ },
+ },
+ "queue_depth": {
+ "type": "dict",
+ "options": {
+ "hello": {
+ "type": "dict",
+ "options": {
+ "max_packets": {"type": "int"},
+ "unlimited": {"type": "bool"},
+ },
+ },
+ "update": {
+ "type": "dict",
+ "options": {
+ "max_packets": {"type": "int"},
+ "unlimited": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "router_id": {"type": "str"},
+ "shutdown": {
+ "type": "dict",
+ "options": {
+ "enable": {"type": "bool"},
+ "disable": {"type": "bool"},
+ },
+ },
+ "summary_prefix": {
+ "type": "dict",
+ "options": {
+ "address": {"type": "str"},
+ "mask": {"type": "str"},
+ "not_advertise": {"type": "bool"},
+ "nssa_only": {"type": "bool"},
+ "tag": {"type": "int"},
+ },
+ },
+ "timers": {
+ "type": "dict",
+ "options": {
+ "lsa": {"type": "int"},
+ "manet": {
+ "type": "dict",
+ "options": {
+ "cache": {
+ "type": "dict",
+ "options": {
+ "acknowledgement": {
+ "type": "int"
+ },
+ "redundancy": {
+ "type": "int"
+ },
+ },
+ },
+ "hello": {"type": "bool"},
+ "peering": {
+ "type": "dict",
+ "options": {
+ "set": {
+ "type": "bool"
+ },
+ "per_interface": {
+ "type": "bool"
+ },
+ "redundancy": {
+ "type": "int"
+ },
+ },
+ },
+ "willingness": {"type": "int"},
+ },
+ },
+ "pacing": {
+ "type": "dict",
+ "options": {
+ "flood": {"type": "int"},
+ "lsa_group": {"type": "int"},
+ "retransmission": {
+ "type": "int"
+ },
+ },
+ },
+ "throttle": {
+ "type": "dict",
+ "options": {
+ "lsa": {
+ "type": "dict",
+ "options": {
+ "first_delay": {
+ "type": "int"
+ },
+ "min_delay": {
+ "type": "int"
+ },
+ "max_delay": {
+ "type": "int"
+ },
+ },
+ },
+ "spf": {
+ "type": "dict",
+ "options": {
+ "receive_delay": {
+ "type": "int"
+ },
+ "between_delay": {
+ "type": "int"
+ },
+ "max_delay": {
+ "type": "int"
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "adjacency": {
+ "type": "dict",
+ "options": {
+ "min_adjacency": {"type": "int"},
+ "max_adjacency": {"type": "int"},
+ "none": {"type": "bool"},
+ },
+ },
+ "areas": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "area_id": {"type": "str"},
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "key_chain": {"type": "str"},
+ "ipsec": {
+ "type": "dict",
+ "options": {
+ "spi": {"type": "int"},
+ "md5": {"type": "int"},
+ "sha1": {"type": "int"},
+ "hex_string": {"type": "str"},
+ },
+ },
+ },
+ },
+ "default_cost": {"type": "int"},
+ "nssa": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "default_information_originate": {
+ "type": "dict",
+ "options": {
+ "metric": {"type": "int"},
+ "metric_type": {
+ "type": "int",
+ "choices": [1, 2],
+ },
+ "nssa_only": {"type": "bool"},
+ },
+ },
+ "no_redistribution": {"type": "bool"},
+ "no_summary": {"type": "bool"},
+ "translate": {
+ "type": "str",
+ "choices": [
+ "always",
+ "suppress-fa",
+ ],
+ },
+ },
+ },
+ "stub": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "no_summary": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "authentication": {"type": "bool"},
+ "auto_cost": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "reference_bandwidth": {"type": "int"},
+ },
+ },
+ "bfd": {"type": "bool"},
+ "compatible": {
+ "type": "dict",
+ "options": {
+ "rfc1583": {"type": "bool"},
+ "rfc1587": {"type": "bool"},
+ "rfc5243": {"type": "bool"},
+ },
+ },
+ "event_log": {
+ "type": "dict",
+ "options": {
+ "enable": {"type": "bool"},
+ "one_shot": {"type": "bool"},
+ "pause": {"type": "bool"},
+ "size": {"type": "int"},
+ },
+ },
+ "graceful_restart": {
+ "type": "dict",
+ "options": {
+ "disable": {"type": "bool"},
+ "strict_lsa_checking": {"type": "bool"},
+ },
+ },
+ "help": {"type": "bool"},
+ "interface_id": {"type": "bool"},
+ "limit": {
+ "type": "dict",
+ "options": {
+ "dc": {
+ "type": "dict",
+ "options": {
+ "number": {"type": "int"},
+ "disable": {"type": "bool"},
+ },
+ },
+ "non_dc": {
+ "type": "dict",
+ "options": {
+ "number": {"type": "int"},
+ "disable": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "local_rib_criteria": {
+ "type": "dict",
+ "options": {
+ "enable": {"type": "bool"},
+ "forwarding_address": {"type": "bool"},
+ "inter_area_summary": {"type": "bool"},
+ "nssa_translation": {"type": "bool"},
+ },
+ },
+ "log_adjacency_changes": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "detail": {"type": "bool"},
+ },
+ },
+ "manet": {
+ "type": "dict",
+ "options": {
+ "cache": {
+ "type": "dict",
+ "options": {
+ "acknowledgement": {"type": "int"},
+ "redundancy": {"type": "int"},
+ },
+ },
+ "hello": {"type": "bool"},
+ "peering": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "per_interface": {"type": "bool"},
+ "redundancy": {"type": "int"},
+ },
+ },
+ "willingness": {"type": "int"},
+ },
+ },
+ "max_lsa": {
+ "type": "dict",
+ "options": {
+ "number": {"type": "int"},
+ "threshold_value": {"type": "int"},
+ "ignore_count": {"type": "int"},
+ "ignore_time": {"type": "int"},
+ "reset_time": {"type": "int"},
+ "warning_only": {"type": "bool"},
+ },
+ },
+ "max_metric": {
+ "type": "dict",
+ "options": {
+ "router_lsa": {
+ "type": "bool",
+ "required": True,
+ },
+ "external_lsa": {"type": "int"},
+ "include_stub": {"type": "bool"},
+ "on_startup": {
+ "type": "dict",
+ "options": {
+ "time": {"type": "int"},
+ "wait_for_bgp": {"type": "bool"},
+ },
+ },
+ "summary_lsa": {"type": "int"},
+ },
+ },
+ "passive_interface": {"type": "str"},
+ "prefix_suppression": {"type": "bool"},
+ "queue_depth": {
+ "type": "dict",
+ "options": {
+ "hello": {
+ "type": "dict",
+ "options": {
+ "max_packets": {"type": "int"},
+ "unlimited": {"type": "bool"},
+ },
+ }
+ },
+ },
+ "router_id": {"type": "str"},
+ "shutdown": {"type": "bool"},
+ "timers": {
+ "type": "dict",
+ "options": {
+ "lsa": {"type": "int"},
+ "manet": {
+ "type": "dict",
+ "options": {
+ "cache": {
+ "type": "dict",
+ "options": {
+ "acknowledgement": {
+ "type": "int"
+ },
+ "redundancy": {"type": "int"},
+ },
+ },
+ "hello": {"type": "bool"},
+ "peering": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "per_interface": {
+ "type": "bool"
+ },
+ "redundancy": {"type": "int"},
+ },
+ },
+ "willingness": {"type": "int"},
+ },
+ },
+ "pacing": {
+ "type": "dict",
+ "options": {
+ "flood": {"type": "int"},
+ "lsa_group": {"type": "int"},
+ "retransmission": {"type": "int"},
+ },
+ },
+ "throttle": {
+ "type": "dict",
+ "options": {
+ "lsa": {
+ "type": "dict",
+ "options": {
+ "first_delay": {"type": "int"},
+ "min_delay": {"type": "int"},
+ "max_delay": {"type": "int"},
+ },
+ },
+ "spf": {
+ "type": "dict",
+ "options": {
+ "receive_delay": {
+ "type": "int"
+ },
+ "between_delay": {
+ "type": "int"
+ },
+ "max_delay": {"type": "int"},
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ },
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "type": "str",
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "parsed",
+ "rendered",
+ ],
+ "default": "merged",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/static_routes/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/static_routes/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/static_routes/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/static_routes/static_routes.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/static_routes/static_routes.py
new file mode 100644
index 00000000..e7dc942f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/static_routes/static_routes.py
@@ -0,0 +1,100 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the ios_static_routes module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Static_RoutesArgs(object):
+ """The arg spec for the ios_static_routes module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "vrf": {"type": "str"},
+ "address_families": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "afi": {
+ "required": True,
+ "choices": ["ipv4", "ipv6"],
+ "type": "str",
+ },
+ "routes": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "dest": {"required": True, "type": "str"},
+ "topology": {"type": "str"},
+ "next_hops": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "forward_router_address": {
+ "type": "str"
+ },
+ "interface": {"type": "str"},
+ "dhcp": {"type": "bool"},
+ "distance_metric": {"type": "int"},
+ "global": {"type": "bool"},
+ "name": {"type": "str"},
+ "multicast": {"type": "bool"},
+ "permanent": {"type": "bool"},
+ "tag": {"type": "int"},
+ "track": {"type": "int"},
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/vlans/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/vlans/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/vlans/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/vlans/vlans.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/vlans/vlans.py
new file mode 100644
index 00000000..29528962
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/argspec/vlans/vlans.py
@@ -0,0 +1,71 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the ios_vlans module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class VlansArgs(object):
+ """The arg spec for the ios_vlans module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "vlan_id": {"required": True, "type": "int"},
+ "mtu": {"type": "int"},
+ "remote_span": {"type": "bool"},
+ "state": {"type": "str", "choices": ["active", "suspend"]},
+ "shutdown": {
+ "type": "str",
+ "choices": ["enabled", "disabled"],
+ },
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "rendered",
+ "parsed",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acl_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acl_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acl_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acl_interfaces/acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acl_interfaces/acl_interfaces.py
new file mode 100644
index 00000000..a650b295
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acl_interfaces/acl_interfaces.py
@@ -0,0 +1,415 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_acl_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible.module_utils.six import iteritems
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ remove_duplicate_interface,
+ normalize_interface,
+)
+
+
+class Acl_Interfaces(ConfigBase):
+ """
+ The ios_acl_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["acl_interfaces"]
+
+ def __init__(self, module):
+ super(Acl_Interfaces, self).__init__(module)
+
+ def get_acl_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ acl_interfaces_facts = facts["ansible_network_resources"].get(
+ "acl_interfaces"
+ )
+ if not acl_interfaces_facts:
+ return []
+
+ return acl_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+ :rtype: A dictionary
+ :returns: The result from moduel execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_acl_interfaces_facts = self.get_acl_interfaces_facts()
+ else:
+ existing_acl_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_acl_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_acl_interfaces_facts = self.get_acl_interfaces_facts()
+ elif self.state == "rendered":
+ result["rendered"] = commands
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_acl_interfaces_facts(
+ data=running_config
+ )
+ else:
+ changed_acl_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_acl_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_acl_interfaces_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_acl_interfaces_facts
+
+ result["warnings"] = warnings
+
+ return result
+
+ def set_config(self, existing_acl_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the deisred configuration
+ """
+ want = self._module.params["config"]
+ if want:
+ for item in want:
+ item["name"] = normalize_interface(item["name"])
+
+ have = existing_acl_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the deisred configuration
+ """
+ commands = []
+
+ state = self._module.params["state"]
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ if state == "overridden":
+ commands = self._state_overridden(want, have)
+ elif state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif state == "merged" or state == "rendered":
+ commands = self._state_merged(want, have)
+ elif state == "replaced":
+ commands = self._state_replaced(want, have)
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the deisred configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ continue
+ commands.extend(self._clear_config(interface, each, "replaced"))
+ commands.extend(self._set_config(interface, each))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for each in have:
+ for interface in want:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ # We didn't find a matching desired state, which means we can
+ # pretend we recieved an empty desired state.
+ interface = dict(name=each["name"])
+ commands.extend(self._clear_config(interface, each))
+ continue
+ commands.extend(self._clear_config(interface, each, "overridden"))
+ commands.extend(self._set_config(interface, each))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+ :param want: the additive configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ # configuring non-existing interface
+ commands.extend(self._set_config(interface, dict()))
+ continue
+ commands.extend(self._set_config(interface, each))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+ :param want: the objects from which the configuration should be removed
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ continue
+ commands.extend(self._clear_config(interface, each))
+ else:
+ for each in have:
+ commands.extend(self._clear_config(dict(), each))
+
+ return commands
+
+ def dict_to_set(self, input_dict, test_set, final_set, count=0):
+ # recursive function to convert input dict to set for comparision
+ test_dict = dict()
+ if isinstance(input_dict, dict):
+ input_dict_len = len(input_dict)
+ for k, v in sorted(iteritems(input_dict)):
+ count += 1
+ if isinstance(v, list):
+ for each in v:
+ if isinstance(each, dict):
+ input_dict_len = len(each)
+ if [
+ True for i in each.values() if type(i) == list
+ ]:
+ self.dict_to_set(each, set(), final_set, count)
+ else:
+ self.dict_to_set(each, test_set, final_set, 0)
+ else:
+ if v is not None:
+ test_dict.update({k: v})
+ if (
+ tuple(iteritems(test_dict)) not in test_set
+ and count == input_dict_len
+ ):
+ test_set.add(tuple(iteritems(test_dict)))
+ count = 0
+ if count == input_dict_len + 1:
+ test_set.update(tuple(iteritems(test_dict)))
+ final_set.add(tuple(test_set))
+
+ def _set_config(self, want, have):
+ """ Function that sets the acls config based on the want and have config
+ :param want: want config
+ :param have: have config
+ :param acl_want: want acl config
+ :param afi: acl afi type
+ :rtype: A list
+ :returns: the commands generated based on input want/have params
+ """
+ commands = []
+
+ want_set = set()
+ have_set = set()
+ self.dict_to_set(want, set(), want_set)
+ self.dict_to_set(have, set(), have_set)
+
+ for w in want_set:
+ want_afi = dict(w).get("afi")
+ if have_set:
+
+ def common_diff_config_code(diff_list, cmd, commands):
+ for each in diff_list:
+ try:
+ temp = dict(each)
+ temp_cmd = cmd + " {0} {1}".format(
+ temp["name"], temp["direction"]
+ )
+ if temp_cmd not in commands:
+ commands.append(temp_cmd)
+ except ValueError:
+ continue
+
+ for h in have_set:
+ have_afi = dict(h).get("afi")
+ if have_afi == want_afi:
+ if want_afi == "ipv4":
+ diff = set(w) - set(h)
+ if diff:
+ cmd = "ip access-group"
+ common_diff_config_code(diff, cmd, commands)
+ if want_afi == "ipv6":
+ diff = set(w) - set(h)
+ if diff:
+ cmd = "ipv6 traffic-filter"
+ common_diff_config_code(diff, cmd, commands)
+ break
+ else:
+ if want_afi == "ipv4":
+ diff = set(w) - set(h)
+ if diff:
+ cmd = "ip access-group"
+ common_diff_config_code(diff, cmd, commands)
+ if want_afi == "ipv6":
+ diff = set(w) - set(h)
+ if diff:
+ cmd = "ipv6 traffic-filter"
+ common_diff_config_code(diff, cmd, commands)
+ else:
+
+ def common_want_config_code(want, cmd, commands):
+ for each in want:
+ if each[0] == "afi":
+ continue
+ temp = dict(each)
+ temp_cmd = cmd + " {0} {1}".format(
+ temp["name"], temp["direction"]
+ )
+ commands.append(temp_cmd)
+
+ if want_afi == "ipv4":
+ cmd = "ip access-group"
+ common_want_config_code(w, cmd, commands)
+ if want_afi == "ipv6":
+ cmd = "ipv6 traffic-filter"
+ common_want_config_code(w, cmd, commands)
+ commands.sort()
+ if commands:
+ interface = want.get("name")
+ commands.insert(0, "interface {0}".format(interface))
+
+ return commands
+
+ def _clear_config(self, want, have, state=""):
+ """ Function that deletes the acl config based on the want and have config
+ :param acl: acl config
+ :param config: config
+ :rtype: A list
+ :returns: the commands generated based on input acl/config params
+ """
+ commands = []
+
+ if want.get("name"):
+ interface = "interface " + want["name"]
+ else:
+ interface = "interface " + have["name"]
+
+ w_access_group = want.get("access_groups")
+ temp_want_acl_name = []
+ if w_access_group:
+ # get the user input afi and acls
+ for each in w_access_group:
+ want_acls = each.get("acls")
+ if want_acls:
+ for each in want_acls:
+ temp_want_acl_name.append(each.get("name"))
+
+ h_access_group = have.get("access_groups")
+ if h_access_group:
+ for access_grp in h_access_group:
+ for acl in access_grp.get("acls"):
+ acl_name = acl.get("name")
+ acl_direction = acl.get("direction")
+ if access_grp.get("afi") == "ipv4":
+ if acl_name in temp_want_acl_name:
+ continue
+ cmd = "no ip access-group"
+ cmd += " {0} {1}".format(acl_name, acl_direction)
+ commands.append(cmd)
+ elif access_grp.get("afi") == "ipv6":
+ if acl_name in temp_want_acl_name:
+ continue
+ cmd = "no ipv6 traffic-filter"
+ cmd += " {0} {1}".format(acl_name, acl_direction)
+ commands.append(cmd)
+ if commands:
+ # inserting the interface at first
+ commands.insert(0, interface)
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acls/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acls/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acls/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acls/acls.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acls/acls.py
new file mode 100644
index 00000000..b5f7e1dc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/acls/acls.py
@@ -0,0 +1,301 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_acls class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import copy
+
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.rm_templates.acls import (
+ AclsTemplate,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+
+
+class Acls(ResourceModule):
+ """
+ The ios_acls class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["acls"]
+
+ def __init__(self, module):
+ super(Acls, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="acls",
+ tmplt=AclsTemplate(),
+ )
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from moduel execution
+ """
+ self.gen_config()
+ self.run_commands()
+ return self.result
+
+ def gen_config(self):
+ """ Select the appropriate function based on the state provided
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+
+ if self.want:
+ wantd = self.want
+ else:
+ wantd = {}
+ if self.have:
+ haved = self.have
+ else:
+ haved = {}
+
+ # if state is merged, merge want onto have and then compare
+ if self.state == "merged":
+ temp_have = copy.deepcopy(haved)
+ temp = []
+ temp_acls = {}
+
+ for each in wantd:
+ want_in_have = False
+ for each_have in temp_have:
+ if each.get("afi") == each_have.get("afi"):
+ temp_acls["acls"] = []
+ for each_acls in each.get("acls"):
+ want_acls_in_have = False
+ for each_have_acls in each_have.get("acls"):
+ if each_acls["name"] == each_have_acls["name"]:
+ aces = []
+ for each_ace in each_acls["aces"]:
+ each_ace_sequence = each_ace.get(
+ "sequence"
+ )
+ if each_ace_sequence:
+ for (
+ each_have_ace
+ ) in each_have_acls["aces"]:
+ if (
+ each_ace_sequence
+ == each_have_ace.get(
+ "sequence"
+ )
+ ):
+ aces.append(
+ dict(
+ dict_merge(
+ each_have_ace,
+ each_ace,
+ )
+ )
+ )
+ break
+ if aces:
+ temp_acls["acls"].append(
+ {
+ "aces": aces,
+ "name": each_acls["name"],
+ }
+ )
+ else:
+ temp_acls["acls"].append(
+ dict(
+ dict_merge(
+ each_have_acls, each_acls
+ )
+ )
+ )
+ want_acls_in_have = True
+ if not want_acls_in_have:
+ temp_acls["acls"].append(each_acls)
+ temp_acls.update({"afi": each.get("afi")})
+ # temp.append(dict(dict_merge(each, each_have)))
+ temp.append(temp_acls)
+ want_in_have = True
+ if not want_in_have:
+ temp.append(each)
+ if temp:
+ wantd = temp
+
+ # if state is deleted, empty out wantd and set haved to wantd
+ if self.state == "deleted":
+ if wantd:
+ for each_have in haved:
+ count = 0
+ for every_have in each_have.get("acls"):
+ del_want = False
+ for each_want in wantd:
+ want_acls = each_want.get("acls")
+ want_afi = each_want.get("afi")
+ if want_acls:
+ for every_want in each_want.get("acls"):
+ if every_want.get(
+ "name"
+ ) == every_have.get("name"):
+ del_want = True
+ break
+ elif want_afi and want_afi == each_have["afi"]:
+ del_want = True
+ if not del_want:
+ del each_have.get("acls")[count]
+ count += 1
+ wantd = {}
+ for each in haved:
+ for every_acls in each.get("acls"):
+ every_acls.update({"afi": each.get("afi")})
+ self.addcmd(every_acls, "acls_name", True)
+
+ # remove superfluous config for overridden and deleted
+ if self.state in ["overridden"] and wantd:
+ for each_have in haved:
+ count = 0
+ for every_have in each_have.get("acls"):
+ del_want = False
+ for each_want in wantd:
+ for every_want in each_want.get("acls"):
+ if every_want.get("name") == every_have.get(
+ "name"
+ ):
+ del_want = True
+ break
+ if not del_want:
+ every_have.update({"afi": each_have.get("afi")})
+ self.addcmd(every_have, "acls_name", True)
+ count += 1
+
+ for w in wantd:
+ want_in_have = False
+ if haved:
+ for h in haved:
+ if w["afi"] == h["afi"]:
+ want_in_have = True
+ for e_w in w["acls"]:
+ set_want = True
+ for e_h in h["acls"]:
+ if e_w["name"] == e_h["name"]:
+ e_w.update({"afi": w.get("afi")})
+ e_h.update({"afi": h.get("afi")})
+ self._compare(want=e_w, have=e_h)
+ set_want = False
+ break
+ if set_want:
+ e_w.update({"afi": w.get("afi")})
+ self._compare(want=e_w, have={})
+ if not haved or not want_in_have:
+ for e_w in w["acls"]:
+ e_w.update({"afi": w["afi"]})
+ self._compare(want=e_w, have={})
+
+ def _compare(self, want, have):
+ """Leverages the base class `compare()` method and
+ populates the list of commands to be run by comparing
+ the `want` and `have` data with the `parsers` defined
+ for the Ospf_interfaces network resource.
+ """
+ parsers = ["aces"]
+
+ if want.get("aces"):
+ cmd_added = True
+ for each in want.get("aces"):
+ set_want = True
+ if have.get("aces"):
+ for each_have in have.get("aces"):
+ if each.get("source") == each_have.get(
+ "source"
+ ) and each.get("destination") == each_have.get(
+ "destination"
+ ):
+ set_want = False
+ if each.get("sequence") and not each_have.get(
+ "sequence"
+ ):
+ each_have.update(
+ {"sequence": each.get("sequence")}
+ )
+ elif not each.get("sequence") and each_have.get(
+ "sequence"
+ ):
+ each.update(
+ {"sequence": each_have.get("sequence")}
+ )
+ if each.get("protocol") and not each_have.get(
+ "protocol"
+ ):
+ each_have.update(
+ {"protocol": each.get("protocol")}
+ )
+ elif not each.get("protocol") and each_have.get(
+ "protocol"
+ ):
+ each.update(
+ {"protocol": each_have.get("protocol")}
+ )
+ if each != each_have:
+ if cmd_added:
+ self.addcmd(have, "acls_name", False)
+ cmd_added = False
+ self.compare(
+ parsers=parsers,
+ want={"aces": each, "afi": want["afi"]},
+ have={
+ "aces": each_have,
+ "afi": have["afi"],
+ },
+ )
+ elif each.get("sequence") == each_have.get("sequence"):
+ if cmd_added:
+ self.addcmd(have, "acls_name", False)
+ cmd_added = False
+ self.compare(
+ parsers=parsers,
+ want={},
+ have={"aces": each_have, "afi": have["afi"]},
+ )
+ self.compare(
+ parsers=parsers,
+ want={"aces": each, "afi": want["afi"]},
+ have={},
+ )
+ set_want = False
+ else:
+ if cmd_added:
+ self.addcmd(want, "acls_name", False)
+ cmd_added = False
+ self.compare(
+ parsers=parsers,
+ want={"aces": each, "afi": want["afi"]},
+ have=dict(),
+ )
+ set_want = False
+ if set_want:
+ if cmd_added:
+ self.addcmd(want, "acls_name", False)
+ cmd_added = False
+ self.compare(
+ parsers=parsers,
+ want={"aces": each, "afi": want["afi"]},
+ have=dict(),
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/bgp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/bgp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/bgp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/bgp_global/bgp_global.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/bgp_global/bgp_global.py
new file mode 100644
index 00000000..6a20e23b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/bgp_global/bgp_global.py
@@ -0,0 +1,452 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The cisco.ios_bgp_global config file.
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to its desired end-state is
+created.
+"""
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.rm_templates.bgp_global import (
+ Bgp_globalTemplate,
+)
+
+
+class Bgp_global(ResourceModule):
+ """
+ The cisco.ios_bgp_global config class
+ """
+
+ parsers = [
+ "as_number",
+ "bgp.additional_paths",
+ "bgp.dampening",
+ "bgp.graceful_shutdown",
+ "route_server_context",
+ "synchronization",
+ "table_map",
+ "timers",
+ ]
+
+ def __init__(self, module):
+ super(Bgp_global, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="bgp_global",
+ tmplt=Bgp_globalTemplate(),
+ )
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ if self.state not in ["parsed", "gathered"]:
+ self.generate_commands()
+ self.run_commands()
+ return self.result
+
+ def generate_commands(self):
+ """ Generate configuration commands to send based on
+ want, have and desired state.
+ """
+ if self.want:
+ wantd = {self.want["as_number"]: self.want}
+ else:
+ wantd = {}
+ if self.have:
+ haved = {self.have["as_number"]: self.have}
+ else:
+ haved = {}
+
+ wantd, haved = self.list_to_dict(wantd, haved)
+ # if state is merged, merge want onto have and then compare
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, empty out wantd and set haved to wantd
+ if self.state == "deleted" and self.have:
+ if (
+ not self.want
+ or self.have.get("as_number") == self.want.get("as_number")
+ and len(self.have) > 1
+ ):
+ self.addcmd(
+ {"as_number": haved[list(haved)[0]].pop("as_number")},
+ "as_number",
+ False,
+ )
+ self.compare(
+ parsers=self.parsers, want={}, have=haved[list(haved)[0]]
+ )
+ self._compare(want={}, have=haved[list(haved)[0]])
+ self._list_params_compare(want={}, have=haved[list(haved)[0]])
+ wantd = {}
+
+ if self.state == "purged" and self.have:
+ if (
+ not self.want
+ or (self.have.get("as_number") == self.want.get("as_number"))
+ and len(self.have) >= 1
+ ):
+ self.addcmd(
+ {"as_number": haved[list(haved)[0]].pop("as_number")},
+ "as_number",
+ True,
+ )
+ wantd = {}
+
+ for k, want in iteritems(wantd):
+ self._compare(want=want, have=haved.pop(k, {}))
+
+ def _compare(self, want, have):
+ """Leverages the base class `compare()` method and
+ populates the list of commands to be run by comparing
+ the `want` and `have` data with the `parsers` defined
+ for the Ospf_interfaces network resource.
+ """
+ if want != have and self.state != "deleted":
+ self.addcmd(have, "as_number", False)
+ self.compare(parsers=self.parsers, want=want, have=have)
+ self._bgp_config_compare(want.get("bgp"), have.get("bgp"))
+ self._list_params_compare(want, have)
+ elif self.state == "deleted":
+ self._bgp_config_compare(dict(), have.get("bgp"))
+
+ def _bgp_config_compare(self, want, have):
+ if want and have and want != have and isinstance(want, dict):
+ set_have = True
+ for k, val in iteritems(want):
+ if isinstance(val, dict):
+ if k in have:
+ self.compare(
+ parsers=["bgp.config"],
+ want={"bgp": {k: val}},
+ have={"bgp": {k: have[k]}},
+ )
+ if k in have and self.state == "replaced":
+ if set_have:
+ self.compare(
+ parsers=["bgp.config"],
+ want=dict(),
+ have={"bgp": {k: have[k]}},
+ )
+ self.compare(
+ parsers=["bgp.config"],
+ want={"bgp": {k: val}},
+ have={"bgp": {k: have[k]}},
+ )
+ else:
+ self.compare(
+ parsers=["bgp.config"],
+ want={"bgp": {k: val}},
+ have=dict(),
+ )
+ elif want and not have:
+ for k, val in iteritems(want):
+ if not isinstance(val, list):
+ self.compare(
+ parsers=["bgp.config"],
+ want={"bgp": {k: val}},
+ have=dict(),
+ )
+ elif not want and have:
+ for k, val in iteritems(have):
+ if not isinstance(val, list):
+ self.compare(
+ parsers=["bgp.config"],
+ want=dict(),
+ have={"bgp": {k: val}},
+ )
+
+ def _list_params_compare(self, want, have):
+ def multi_compare(parser, want, have):
+ if want:
+ dict_iter = want
+ else:
+ dict_iter = have
+ for k, v in iteritems(dict_iter):
+ if parser == "neighbor":
+ type = None
+ if want.get("address") or have.get("address"):
+ type = "address"
+ want_type_val = want.get("address")
+ have_type_val = have.get("address")
+ if want.get("tag") or have.get("tag"):
+ type = "tag"
+ want_type_val = want.get("tag")
+ have_type_val = have.get("tag")
+ if want.get("ipv6_adddress") or have.get("ipv6_address"):
+ type = "ipv6_adddress"
+ want_type_val = want.get("ipv6_adddress")
+ have_type_val = have.get("ipv6_adddress")
+ if want and have:
+ self.compare(
+ parsers=[parser],
+ want={parser: {k: v, type: want_type_val}},
+ have={
+ parser: {
+ k: have.get(k, {}),
+ type: have_type_val,
+ }
+ },
+ )
+ elif not have:
+ self.compare(
+ parsers=[parser],
+ want={parser: {k: v, type: want_type_val}},
+ have=dict(),
+ )
+ elif not want:
+ self.compare(
+ parsers=[parser],
+ want=dict(),
+ have={parser: {k: v, type: have_type_val}},
+ )
+ if parser == "redistribute":
+ if want and have:
+ self.compare(
+ parsers=[parser],
+ want={parser: {k: v}},
+ have={parser: {k: have.get(k, {})}},
+ )
+ elif not have:
+ self.compare(
+ parsers=[parser],
+ want={parser: {k: v}},
+ have=dict(),
+ )
+ elif not want:
+ self.compare(
+ parsers=[parser],
+ want=dict(),
+ have={parser: {k: v}},
+ )
+
+ for every in ["bgp", "neighbor", "redistribute"]:
+
+ param_want = want.get(every)
+ param_have = have.get(every)
+ if param_want and param_want != param_have:
+ set_have = True
+ if every == "bgp":
+ for each in ["bestpath", "nopeerup_delay"]:
+ set_have = True
+ for k, v in iteritems(param_want.get(each)):
+ if (
+ param_have
+ and k in param_have.get(each)
+ and self.state == "merged"
+ ):
+ if k in param_have.get(each):
+ self.compare(
+ parsers=[every + "." + each],
+ want={"bgp": {each: {k: v}}},
+ have={
+ "bgp": {
+ each: {
+ k: param_have.get(
+ each, {}
+ )[k]
+ }
+ }
+ },
+ )
+
+ elif param_have and self.state == "replaced":
+ if set_have and param_have.get(each):
+ if isinstance(each, dict):
+ for key_have, val_have in iteritems(
+ param_have.get(each)
+ ):
+ multi_compare(
+ parser=every,
+ want=dict(),
+ have=val_have,
+ )
+ else:
+ # q(param_have, param_want)
+ temp_have = {
+ each: {i: param_have[each][i]}
+ for i in list(param_have[each])
+ if i not in param_want[each]
+ }
+ temp_want = {
+ each: {i: param_want[each][i]}
+ for i in list(param_want[each])
+ if i not in param_have[each]
+ }
+ # q(temp_have)
+ if temp_have:
+ self.compare(
+ parsers=[every + "." + each],
+ want=dict(),
+ have={"bgp": temp_have},
+ )
+ if temp_want:
+ self.compare(
+ parsers=[every + "." + each],
+ want={"bgp": temp_want},
+ have=dict(),
+ )
+ set_have = False
+ else:
+ self.compare(
+ parsers=[every + "." + each],
+ want={"bgp": {each: {k: v}}},
+ have=dict(),
+ )
+ if every == "neighbor" or every == "redistribute":
+ for k, v in iteritems(param_want):
+ if every == "neighbor":
+ if param_have and self.state == "merged":
+ multi_compare(
+ parser=every,
+ want=v,
+ have=param_have.pop(k, {}),
+ )
+ elif param_have and self.state == "replaced":
+ if set_have:
+ for key_have, val_have in iteritems(
+ param_have
+ ):
+ multi_compare(
+ parser=every,
+ want=dict(),
+ have=val_have,
+ )
+ set_have = False
+ multi_compare(
+ parser=every, want=v, have=dict()
+ )
+ else:
+ multi_compare(
+ parser=every, want=v, have=dict()
+ )
+ self.commands = (
+ [
+ each
+ for each in self.commands
+ if "neighbor" not in each
+ ]
+ + [
+ each
+ for each in self.commands
+ if "remote-as" in each
+ and "neighbor" in each
+ ]
+ + [
+ each
+ for each in self.commands
+ if "remote-as" not in each
+ and "neighbor" in each
+ ]
+ )
+ elif every == "redistribute":
+ if param_have and self.state == "merged":
+ multi_compare(
+ parser=every,
+ want={k: v},
+ have={k: param_have.pop(k, {})},
+ )
+ if param_have and self.state == "replaced":
+ if set_have:
+ for key_have, val_have in iteritems(
+ param_have
+ ):
+ multi_compare(
+ parser=every,
+ want=dict(),
+ have=val_have,
+ )
+ set_have = False
+ multi_compare(
+ parser=every, want={k: v}, have=dict()
+ )
+ else:
+ multi_compare(
+ parser=every, want={k: v}, have=dict()
+ )
+ elif param_have and self.state == "deleted":
+ del_config_have = True
+ if param_have:
+ for k, v in iteritems(param_have):
+ if every == "bgp" and del_config_have:
+ for each in ["bestpath", "nopeerup_delay"]:
+ for k, v in iteritems(param_have.get(each)):
+ self.compare(
+ parsers=[every + "." + each],
+ want=dict(),
+ have={"bgp": {each: {k: v}}},
+ )
+ del_config_have = False
+ elif every == "neighbor":
+ multi_compare(parser=every, want=dict(), have=v)
+ elif every == "redistribute":
+ if param_have:
+ multi_compare(
+ parser=every, want=dict(), have={k: v}
+ )
+
+ def list_to_dict(self, wantd, haved):
+ for thing in wantd, haved:
+ if thing:
+ for key, val in iteritems(thing):
+ for every in ["bgp", "neighbor", "redistribute"]:
+ value = val.get(every)
+ if value:
+ if isinstance(value, dict):
+ for k, v in iteritems(val.get(every)):
+ if isinstance(v, list):
+ temp = dict()
+ temp[k] = {}
+ for each in v:
+ temp[k].update(each)
+ val[every][k] = temp[k]
+ elif isinstance(value, list):
+ temp = dict()
+ temp[every] = {}
+ for each in value:
+ if every == "neighbor":
+ if each.get("address"):
+ temp[every].update(
+ {each.get("address"): each}
+ )
+ elif each.get("tag"):
+ temp[every].update(
+ {each.get("tag"): each}
+ )
+ elif each.get("ipv6_adddress"):
+ temp[every].update(
+ {
+ each.get(
+ "ipv6_adddress"
+ ): each
+ }
+ )
+ elif every == "redistribute":
+ temp[every].update(each)
+ val[every] = temp[every]
+ return wantd, haved
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/interfaces/interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/interfaces/interfaces.py
new file mode 100644
index 00000000..a449f5f0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/interfaces/interfaces.py
@@ -0,0 +1,353 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ get_interface_type,
+ dict_to_set,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ remove_command_from_config_list,
+ add_command_to_config_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ filter_dict_having_none_value,
+ remove_duplicate_interface,
+)
+
+
+class Interfaces(ConfigBase):
+ """
+ The ios_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["interfaces"]
+
+ params = ("description", "mtu", "speed", "duplex")
+
+ def __init__(self, module):
+ super(Interfaces, self).__init__(module)
+
+ def get_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ interfaces_facts = facts["ansible_network_resources"].get("interfaces")
+ if not interfaces_facts:
+ return []
+
+ return interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from moduel execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_interfaces_facts = self.get_interfaces_facts()
+ else:
+ existing_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_interfaces_facts))
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_interfaces_facts = self.get_interfaces_facts()
+ elif self.state == "rendered":
+ result["rendered"] = commands
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_interfaces_facts(data=running_config)
+ else:
+ changed_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_interfaces_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_interfaces_facts
+ result["warnings"] = warnings
+
+ return result
+
+ def set_config(self, existing_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the deisred configuration
+ """
+ config = self._module.params.get("config")
+ want = []
+ if config:
+ for each in config:
+ each.update({"name": normalize_interface(each["name"])})
+ want.append(each)
+ have = existing_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the deisred configuration
+ """
+ commands = []
+
+ if (
+ self.state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ if self.state == "overridden":
+ commands = self._state_overridden(want, have)
+ elif self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state == "merged" or self.state == "rendered":
+ commands = self._state_merged(want, have)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have)
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :param interface_type: interface type
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the deisred configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ if interface["name"] in each["name"]:
+ break
+ else:
+ # configuring non-existing interface
+ commands.extend(self._set_config(interface, dict()))
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :param want: the desired configuration as a dictionary
+ :param obj_in_have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for each in have:
+ for interface in want:
+ count = 0
+ if each["name"] == interface["name"]:
+ break
+ if interface["name"] in each["name"]:
+ break
+ count += 1
+ else:
+ # We didn't find a matching desired state, which means we can
+ # pretend we received an empty desired state.
+ interface = dict(name=each["name"])
+ commands.extend(self._clear_config(interface, each))
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each))
+ # as the pre-existing interface are now configured by
+ # above set_config call, deleting the respective
+ # interface entry from the want list
+ del want[count]
+
+ # Iterating through want list which now only have new interfaces to be
+ # configured
+ for each in want:
+ commands.extend(self._set_config(each, dict()))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :param want: the additive configuration as a dictionary
+ :param obj_in_have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ # configuring non-existing interface
+ commands.extend(self._set_config(interface, dict()))
+ continue
+ commands.extend(self._set_config(interface, each))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :param want: the objects from which the configuration should be removed
+ :param obj_in_have: the current configuration as a dictionary
+ :param interface_type: interface type
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ continue
+ interface = dict(name=interface["name"])
+ commands.extend(self._clear_config(interface, each))
+ else:
+ for each in have:
+ want = dict()
+ commands.extend(self._clear_config(want, each))
+
+ return commands
+
+ def _set_config(self, want, have):
+ # Set the interface config based on the want and have config
+ commands = []
+ interface = "interface " + want["name"]
+
+ # Get the diff b/w want and have
+ want_dict = dict_to_set(want)
+ have_dict = dict_to_set(have)
+ diff = want_dict - have_dict
+
+ if diff:
+ diff = dict(diff)
+ for item in self.params:
+ if diff.get(item):
+ cmd = item + " " + str(want.get(item))
+ add_command_to_config_list(interface, cmd, commands)
+ if diff.get("enabled"):
+ add_command_to_config_list(interface, "no shutdown", commands)
+ elif diff.get("enabled") is False:
+ add_command_to_config_list(interface, "shutdown", commands)
+
+ return commands
+
+ def _clear_config(self, want, have):
+ # Delete the interface config based on the want and have config
+ commands = []
+
+ if want.get("name"):
+ interface_type = get_interface_type(want["name"])
+ interface = "interface " + want["name"]
+ else:
+ interface_type = get_interface_type(have["name"])
+ interface = "interface " + have["name"]
+
+ if have.get("description") and want.get("description") != have.get(
+ "description"
+ ):
+ remove_command_from_config_list(interface, "description", commands)
+ if not have.get("enabled") and want.get("enabled") != have.get(
+ "enabled"
+ ):
+ # if enable is False set enable as True which is the default behavior
+ remove_command_from_config_list(interface, "shutdown", commands)
+
+ if interface_type.lower() == "gigabitethernet":
+ if (
+ have.get("speed")
+ and have.get("speed") != "auto"
+ and want.get("speed") != have.get("speed")
+ ):
+ remove_command_from_config_list(interface, "speed", commands)
+ if (
+ have.get("duplex")
+ and have.get("duplex") != "auto"
+ and want.get("duplex") != have.get("duplex")
+ ):
+ remove_command_from_config_list(interface, "duplex", commands)
+ if have.get("mtu") and want.get("mtu") != have.get("mtu"):
+ remove_command_from_config_list(interface, "mtu", commands)
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l2_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l2_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l2_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l2_interfaces/l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l2_interfaces/l2_interfaces.py
new file mode 100644
index 00000000..b9451fe0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l2_interfaces/l2_interfaces.py
@@ -0,0 +1,478 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_l2_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ dict_to_set,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ remove_command_from_config_list,
+ add_command_to_config_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ filter_dict_having_none_value,
+ remove_duplicate_interface,
+)
+
+
+class L2_Interfaces(ConfigBase):
+ """
+ The ios_l2_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["l2_interfaces"]
+
+ access_cmds = {"access_vlan": "switchport access vlan"}
+ voice_cmds = {"voice_vlan": "switchport voice vlan"}
+ trunk_cmds = {
+ "encapsulation": "switchport trunk encapsulation",
+ "pruning_vlans": "switchport trunk pruning vlan",
+ "pruning_vlans_add": "switchport trunk pruning vlan add",
+ "native_vlan": "switchport trunk native vlan",
+ "allowed_vlans": "switchport trunk allowed vlan",
+ "allowed_vlans_add": "switchport trunk allowed vlan add",
+ }
+
+ def get_l2_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ l2_interfaces_facts = facts["ansible_network_resources"].get(
+ "l2_interfaces"
+ )
+ if not l2_interfaces_facts:
+ return []
+
+ return l2_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+ :rtype: A dictionary
+ :returns: The result from moduel execution
+ """
+ result = {"changed": False}
+ commands = []
+ warnings = []
+ if self.state in self.ACTION_STATES:
+ existing_l2_interfaces_facts = self.get_l2_interfaces_facts()
+ else:
+ existing_l2_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_l2_interfaces_facts))
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_l2_interfaces_facts = self.get_l2_interfaces_facts()
+ elif self.state == "rendered":
+ result["rendered"] = commands
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_l2_interfaces_facts(
+ data=running_config
+ )
+ else:
+ changed_l2_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_l2_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_l2_interfaces_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_l2_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the deisred configuration
+ """
+
+ config = self._module.params.get("config")
+ want = []
+ if config:
+ for each in config:
+ each.update({"name": normalize_interface(each["name"])})
+ want.append(each)
+ have = existing_facts
+ resp = self.set_state(want, have)
+
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the deisred configuration
+ """
+ commands = []
+
+ if (
+ self.state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ if self.state == "overridden":
+ commands = self._state_overridden(want, have, self._module)
+ elif self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state == "merged" or self.state == "rendered":
+ commands = self._state_merged(want, have, self._module)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have, self._module)
+
+ return commands
+
+ def _state_replaced(self, want, have, module):
+ """ The command generator when state is replaced
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :param interface_type: interface type
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the deisred configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each, module))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_overridden(self, want, have, module):
+ """ The command generator when state is overridden
+ :param want: the desired configuration as a dictionary
+ :param obj_in_have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for each in have:
+ for interface in want:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ # We didn't find a matching desired state, which means we can
+ # pretend we received an empty desired state.
+ interface = dict(name=each["name"])
+ kwargs = {"want": interface, "have": each}
+ commands.extend(self._clear_config(**kwargs))
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each, module))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_merged(self, want, have, module):
+ """ The command generator when state is merged
+ :param want: the additive configuration as a dictionary
+ :param obj_in_have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ # configuring non-existing interface
+ commands.extend(self._set_config(interface, dict(), module))
+ continue
+ commands.extend(self._set_config(interface, each, module))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+ :param want: the objects from which the configuration should be removed
+ :param obj_in_have: the current configuration as a dictionary
+ :param interface_type: interface type
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ continue
+ interface = dict(name=interface["name"])
+ commands.extend(self._clear_config(interface, each))
+ else:
+ for each in have:
+ want = dict()
+ commands.extend(self._clear_config(want, each))
+
+ return commands
+
+ def _check_for_correct_vlan_range(self, vlan, module):
+ # Function to check if the VLAN range passed is Valid
+ for each in vlan:
+ vlan_range = each.split("-")
+ if len(vlan_range) > 1:
+ if vlan_range[0] < vlan_range[1]:
+ return True
+ else:
+ module.fail_json(
+ msg="Command rejected: Bad VLAN list - end of range not larger than the"
+ " start of range!"
+ )
+ else:
+ return True
+
+ def _set_config(self, want, have, module):
+ # Set the interface config based on the want and have config
+ commands = []
+ interface = "interface " + want["name"]
+
+ # Get the diff b/w want and have
+ want_dict = dict_to_set(want)
+ have_dict = dict_to_set(have)
+ want_trunk = dict(want_dict).get("trunk")
+ have_trunk = dict(have_dict).get("trunk")
+ if want_trunk and have_trunk:
+ diff = set(tuple(dict(want_dict).get("trunk"))) - set(
+ tuple(dict(have_dict).get("trunk"))
+ )
+ else:
+ diff = want_dict - have_dict
+
+ if diff:
+ diff = dict(diff)
+ mode = diff.get("mode")
+ access = diff.get("access")
+ trunk = diff.get("trunk")
+
+ if access:
+ cmd = "switchport access vlan {0}".format(access[0][1])
+ add_command_to_config_list(interface, cmd, commands)
+
+ if diff.get("voice"):
+ cmd = "switchport voice vlan {0}".format(
+ diff.get("voice")[0][1]
+ )
+ add_command_to_config_list(interface, cmd, commands)
+
+ if want_trunk:
+ if trunk:
+ diff = dict(trunk)
+ if diff.get("encapsulation"):
+ cmd = self.trunk_cmds["encapsulation"] + " {0}".format(
+ diff.get("encapsulation")
+ )
+ add_command_to_config_list(interface, cmd, commands)
+ if diff.get("native_vlan"):
+ cmd = self.trunk_cmds["native_vlan"] + " {0}".format(
+ diff.get("native_vlan")
+ )
+ add_command_to_config_list(interface, cmd, commands)
+ allowed_vlans = diff.get("allowed_vlans")
+ pruning_vlans = diff.get("pruning_vlans")
+
+ if allowed_vlans and self._check_for_correct_vlan_range(
+ allowed_vlans, module
+ ):
+ diff = None
+ if self.state == "merged":
+ have_trunk = have.get("trunk")
+ if have_trunk and have_trunk.get("allowed_vlans"):
+ have_allowed_vlans = have_trunk.get(
+ "allowed_vlans"
+ )
+ allowed_vlans = list(allowed_vlans)
+ diff = set(allowed_vlans).difference(
+ set(have_allowed_vlans)
+ )
+ allowed_vlans = list(diff) if diff else tuple()
+ allowed_vlans = ",".join(allowed_vlans)
+ if allowed_vlans:
+ trunk_cmd = (
+ self.trunk_cmds["allowed_vlans_add"]
+ if self.state == "merged" and diff
+ else self.trunk_cmds["allowed_vlans"]
+ )
+ cmd = trunk_cmd + " {0}".format(allowed_vlans)
+ add_command_to_config_list(interface, cmd, commands)
+ if pruning_vlans and self._check_for_correct_vlan_range(
+ pruning_vlans, module
+ ):
+ diff = None
+ if self.state == "merged":
+ have_trunk = have.get("trunk")
+ if have_trunk and have_trunk.get("pruning_vlans"):
+ have_pruning_vlans = have_trunk.get(
+ "pruning_vlans"
+ )
+ pruning_vlans = list(pruning_vlans)
+ diff = set(pruning_vlans).difference(
+ set(have_pruning_vlans)
+ )
+ pruning_vlans = list(diff) if diff else tuple()
+ pruning_vlans = ",".join(pruning_vlans)
+ if pruning_vlans:
+ trunk_cmd = (
+ self.trunk_cmds["pruning_vlans_add"]
+ if self.state == "merged" and diff
+ else self.trunk_cmds["pruning_vlans"]
+ )
+ cmd = trunk_cmd + " {0}".format(pruning_vlans)
+ add_command_to_config_list(interface, cmd, commands)
+ if mode:
+ cmd = "switchport mode {0}".format(mode)
+ add_command_to_config_list(interface, cmd, commands)
+
+ return commands
+
+ def _clear_config(self, want, have):
+ # Delete the interface config based on the want and have config
+ commands = []
+ if want.get("name"):
+ interface = "interface " + want["name"]
+ else:
+ interface = "interface " + have["name"]
+
+ if have.get("mode") or want.get("mode"):
+ remove_command_from_config_list(
+ interface, "switchport mode", commands
+ )
+
+ if have.get("access") and want.get("access") is None:
+ remove_command_from_config_list(
+ interface, L2_Interfaces.access_cmds["access_vlan"], commands
+ )
+ elif have.get("access") and want.get("access"):
+ if have.get("access").get("vlan") != want.get("access").get(
+ "vlan"
+ ):
+ remove_command_from_config_list(
+ interface,
+ L2_Interfaces.access_cmds["access_vlan"],
+ commands,
+ )
+
+ if have.get("voice") and want.get("voice") is None:
+ remove_command_from_config_list(
+ interface, L2_Interfaces.voice_cmds["voice_vlan"], commands
+ )
+ elif have.get("voice") and want.get("voice"):
+ if have.get("voice").get("vlan") != want.get("voice").get("vlan"):
+ remove_command_from_config_list(
+ interface, L2_Interfaces.voice_cmds["voice_vlan"], commands
+ )
+
+ if have.get("trunk") and want.get("trunk") is None:
+ # Check when no config is passed
+ if have.get("trunk").get("encapsulation"):
+ remove_command_from_config_list(
+ interface, self.trunk_cmds["encapsulation"], commands
+ )
+ if have.get("trunk").get("native_vlan"):
+ remove_command_from_config_list(
+ interface, self.trunk_cmds["native_vlan"], commands
+ )
+ if have.get("trunk").get("allowed_vlans"):
+ remove_command_from_config_list(
+ interface, self.trunk_cmds["allowed_vlans"], commands
+ )
+ if have.get("trunk").get("pruning_vlans"):
+ remove_command_from_config_list(
+ interface, self.trunk_cmds["pruning_vlans"], commands
+ )
+ elif have.get("trunk") and want.get("trunk"):
+ # Check when config is passed, also used in replaced and override state
+ if have.get("trunk").get("encapsulation") and have.get(
+ "trunk"
+ ).get("encapsulation") != want.get("trunk").get("encapsulation"):
+ remove_command_from_config_list(
+ interface, self.trunk_cmds["encapsulation"], commands
+ )
+ if have.get("trunk").get("native_vlan") and have.get("trunk").get(
+ "native_vlan"
+ ) != want.get("trunk").get("native_vlan"):
+ remove_command_from_config_list(
+ interface, self.trunk_cmds["native_vlan"], commands
+ )
+ if have.get("trunk").get("allowed_vlans") and have.get(
+ "trunk"
+ ).get("allowed_vlans") != want.get("trunk").get("allowed_vlans"):
+ remove_command_from_config_list(
+ interface, self.trunk_cmds["allowed_vlans"], commands
+ )
+ if have.get("trunk").get("pruning_vlans") and have.get(
+ "trunk"
+ ).get("pruning_vlans") != want.get("trunk").get("pruning_vlans"):
+ remove_command_from_config_list(
+ interface, self.trunk_cmds["pruning_vlans"], commands
+ )
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l3_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l3_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l3_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l3_interfaces/l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l3_interfaces/l3_interfaces.py
new file mode 100644
index 00000000..3d45588b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/l3_interfaces/l3_interfaces.py
@@ -0,0 +1,435 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_l3_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ remove_empties,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ dict_to_set,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ remove_command_from_config_list,
+ add_command_to_config_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ filter_dict_having_none_value,
+ remove_duplicate_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ validate_n_expand_ipv4,
+ validate_ipv6,
+)
+
+
+class L3_Interfaces(ConfigBase):
+ """
+ The ios_l3_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["l3_interfaces"]
+
+ def get_l3_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ l3_interfaces_facts = facts["ansible_network_resources"].get(
+ "l3_interfaces"
+ )
+ if not l3_interfaces_facts:
+ return []
+
+ return l3_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_l3_interfaces_facts = self.get_l3_interfaces_facts()
+ else:
+ existing_l3_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_l3_interfaces_facts))
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_l3_interfaces_facts = self.get_l3_interfaces_facts()
+ elif self.state == "rendered":
+ result["rendered"] = commands
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_l3_interfaces_facts(
+ data=running_config
+ )
+ else:
+ changed_l3_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_l3_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_l3_interfaces_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_l3_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_l3_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params.get("config")
+ want = []
+ if config:
+ for each in config:
+ each.update({"name": normalize_interface(each["name"])})
+ want.append(each)
+ have = existing_l3_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ if (
+ self.state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ if self.state == "overridden":
+ commands = self._state_overridden(want, have, self._module)
+ elif self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state in ("merged", "rendered"):
+ commands = self._state_merged(want, have, self._module)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have, self._module)
+
+ return commands
+
+ def _state_replaced(self, want, have, module):
+ """ The command generator when state is replaced
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ if "." in interface["name"]:
+ commands.extend(
+ self._set_config(interface, dict(), module)
+ )
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each, module))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_overridden(self, want, have, module):
+ """ The command generator when state is overridden
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for each in have:
+ for interface in want:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ # We didn't find a matching desired state, which means we can
+ # pretend we received an empty desired state.
+ interface = dict(name=each["name"])
+ kwargs = {"want": interface, "have": each}
+ commands.extend(self._clear_config(**kwargs))
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each, module))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_merged(self, want, have, module):
+ """ The command generator when state is merged
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ if "." in interface["name"]:
+ commands.extend(
+ self._set_config(interface, dict(), module)
+ )
+ if self.state == "rendered":
+ commands.extend(
+ self._set_config(interface, dict(), module)
+ )
+ continue
+ commands.extend(self._set_config(interface, each, module))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ if interface["name"] in each["name"]:
+ break
+ else:
+ continue
+ interface = dict(name=interface["name"])
+ commands.extend(self._clear_config(interface, each))
+ else:
+ for each in have:
+ want = dict()
+ commands.extend(self._clear_config(want, each))
+
+ return commands
+
+ def verify_diff_again(self, want, have):
+ """
+ Verify the IPV4 difference again as sometimes due to
+ change in order of set, set difference may result into change,
+ when there's actually no difference between want and have
+ :param want: want_dict IPV4
+ :param have: have_dict IPV4
+ :return: diff
+ """
+ diff = False
+ for each in want:
+ each_want = remove_empties(dict(each))
+ for every in have:
+ every_have = dict(every)
+ if (
+ each_want.get("address") != every_have.get("address")
+ and each_want.get("secondary")
+ != every_have.get("secondary")
+ and len(each_want.keys()) == len(every_have.keys())
+ ):
+ diff = True
+ break
+ if (
+ each_want.get("dhcp_client")
+ != every_have.get("dhcp_client")
+ and each_want.get("dhcp_client") is not None
+ ):
+ diff = True
+ break
+ if (
+ each_want.get("dhcp_hostname")
+ != every_have.get("dhcp_hostname")
+ and each_want.get("dhcp_hostname") is not None
+ ):
+ diff = True
+ break
+ if each_want.get("address") != every_have.get(
+ "address"
+ ) and len(each_want.keys()) == len(every_have.keys()):
+ diff = True
+ break
+ if diff:
+ break
+
+ return diff
+
+ def _set_config(self, want, have, module):
+ # Set the interface config based on the want and have config
+ commands = []
+ interface = "interface " + want["name"]
+
+ # To handle L3 IPV4 configuration
+ if want.get("ipv4"):
+ for each in want.get("ipv4"):
+ if each.get("address") != "dhcp":
+ ip_addr_want = validate_n_expand_ipv4(module, each)
+ each["address"] = ip_addr_want
+
+ # Convert the want and have dict to set
+ want_dict = dict_to_set(want)
+ have_dict = dict_to_set(have)
+
+ # To handle L3 IPV4 configuration
+ if want.get("ipv4"):
+ # Get the diff b/w want and have IPV4
+ if have.get("ipv4"):
+ ipv4 = tuple(
+ set(dict(want_dict).get("ipv4"))
+ - set(dict(have_dict).get("ipv4"))
+ )
+ if ipv4:
+ ipv4 = (
+ ipv4
+ if self.verify_diff_again(
+ dict(want_dict).get("ipv4"),
+ dict(have_dict).get("ipv4"),
+ )
+ else ()
+ )
+ else:
+ diff = want_dict - have_dict
+ ipv4 = dict(diff).get("ipv4")
+ if ipv4:
+ for each in ipv4:
+ ipv4_dict = dict(each)
+ if ipv4_dict.get("address") != "dhcp":
+ cmd = "ip address {0}".format(ipv4_dict["address"])
+ if ipv4_dict.get("secondary"):
+ cmd += " secondary"
+ elif ipv4_dict.get("address") == "dhcp":
+ cmd = "ip address dhcp"
+ if "/" in interface:
+ dhcp_interface = want["name"].split("/")[0] + "/"
+ elif "gigabitethernet" in interface.lower():
+ dhcp_interface = "GigabitEthernet"
+ if ipv4_dict.get(
+ "dhcp_client"
+ ) is not None and ipv4_dict.get("dhcp_hostname"):
+ cmd = "ip address dhcp client-id {0}{1} hostname {2}".format(
+ dhcp_interface,
+ ipv4_dict.get("dhcp_client"),
+ ipv4_dict.get("dhcp_hostname"),
+ )
+ elif ipv4_dict.get(
+ "dhcp_client"
+ ) and not ipv4_dict.get("dhcp_hostname"):
+ cmd = "ip address dhcp client-id {0}{1}".format(
+ dhcp_interface, ipv4_dict.get("dhcp_client")
+ )
+ elif not ipv4_dict.get(
+ "dhcp_client"
+ ) and ipv4_dict.get("dhcp_hostname"):
+ cmd = "ip address dhcp hostname {0}".format(
+ ipv4_dict.get("dhcp_client")
+ )
+
+ add_command_to_config_list(interface, cmd, commands)
+
+ # To handle L3 IPV6 configuration
+ if want.get("ipv6"):
+ # Get the diff b/w want and have IPV6
+ if have.get("ipv6"):
+ ipv6 = tuple(
+ set(dict(want_dict).get("ipv6"))
+ - set(dict(have_dict).get("ipv6"))
+ )
+ else:
+ diff = want_dict - have_dict
+ ipv6 = dict(diff).get("ipv6")
+ if ipv6:
+ for each in ipv6:
+ ipv6_dict = dict(each)
+ validate_ipv6(ipv6_dict.get("address"), module)
+ cmd = "ipv6 address {0}".format(ipv6_dict.get("address"))
+ add_command_to_config_list(interface, cmd, commands)
+
+ return commands
+
+ def _clear_config(self, want, have):
+ # Delete the interface config based on the want and have config
+ count = 0
+ commands = []
+ if want.get("name"):
+ interface = "interface " + want["name"]
+ else:
+ interface = "interface " + have["name"]
+
+ if have.get("ipv4") and want.get("ipv4"):
+ for each in have.get("ipv4"):
+ if each.get("secondary") and not (
+ want.get("ipv4")[count].get("secondary")
+ ):
+ cmd = "ipv4 address {0} secondary".format(
+ each.get("address")
+ )
+ remove_command_from_config_list(interface, cmd, commands)
+ count += 1
+ if have.get("ipv4") and not want.get("ipv4"):
+ remove_command_from_config_list(interface, "ip address", commands)
+ if have.get("ipv6") and not want.get("ipv6"):
+ remove_command_from_config_list(
+ interface, "ipv6 address", commands
+ )
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp/lacp.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp/lacp.py
new file mode 100644
index 00000000..6adab3bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp/lacp.py
@@ -0,0 +1,224 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_lacp class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ dict_to_set,
+)
+
+
+class Lacp(ConfigBase):
+ """
+ The ios_lacp class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lacp"]
+
+ def __init__(self, module):
+ super(Lacp, self).__init__(module)
+
+ def get_lacp_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lacp_facts = facts["ansible_network_resources"].get("lacp")
+ if not lacp_facts:
+ return dict()
+
+ return lacp_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lacp_facts = self.get_lacp_facts()
+ else:
+ existing_lacp_facts = dict()
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lacp_facts))
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lacp_facts = self.get_lacp_facts()
+ elif self.state == "rendered":
+ result["rendered"] = commands
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lacp_facts(data=running_config)
+ else:
+ changed_lacp_facts = dict()
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lacp_facts
+ if result["changed"]:
+ result["after"] = changed_lacp_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_lacp_facts
+ result["warnings"] = warnings
+
+ return result
+
+ def set_config(self, existing_lacp_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ have = existing_lacp_facts
+ resp = self.set_state(want, have)
+
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ if self.state in ("merged", "replaced", "rendered") and not want:
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ if self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state in ("merged", "rendered"):
+ commands = self._state_merged(want, have)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have)
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ commands.extend(self._set_config(want, have))
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ commands.extend(self._set_config(want, have))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ commands.extend(self._clear_config(have))
+ else:
+ commands.extend(self._clear_config(have))
+
+ return commands
+
+ def _remove_command_from_config_list(self, cmd, commands):
+ commands.append("no %s" % cmd)
+ return commands
+
+ def _add_command_to_config_list(self, cmd, commands):
+ if cmd not in commands:
+ commands.append(cmd)
+
+ def _set_config(self, want, have):
+ # Set the interface config based on the want and have config
+ commands = []
+
+ want_dict = dict_to_set(want)
+ have_dict = dict_to_set(have)
+ diff = want_dict - have_dict
+
+ if diff:
+ cmd = "lacp system-priority {0}".format(
+ want.get("system").get("priority")
+ )
+ self._add_command_to_config_list(cmd, commands)
+
+ return commands
+
+ def _clear_config(self, have):
+ # Delete the interface config based on the want and have config
+ commands = []
+
+ if (
+ have.get("system").get("priority")
+ and have.get("system").get("priority") != 32768
+ ):
+ cmd = "lacp system-priority"
+ self._remove_command_from_config_list(cmd, commands)
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp_interfaces/lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp_interfaces/lacp_interfaces.py
new file mode 100644
index 00000000..3d21b635
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lacp_interfaces/lacp_interfaces.py
@@ -0,0 +1,314 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_lacp_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ dict_to_set,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ remove_command_from_config_list,
+ add_command_to_config_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ filter_dict_having_none_value,
+ remove_duplicate_interface,
+)
+
+
+class Lacp_Interfaces(ConfigBase):
+ """
+ The ios_lacp_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lacp_interfaces"]
+
+ def __init__(self, module):
+ super(Lacp_Interfaces, self).__init__(module)
+
+ def get_lacp_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lacp_interfaces_facts = facts["ansible_network_resources"].get(
+ "lacp_interfaces"
+ )
+
+ if not lacp_interfaces_facts:
+ return []
+ return lacp_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lacp_interfaces_facts = self.get_lacp_interfaces_facts()
+ else:
+ existing_lacp_interfaces_facts = []
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lacp_interfaces_facts))
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lacp_interfaces_facts = self.get_lacp_interfaces_facts()
+ elif self.state == "rendered":
+ result["rendered"] = commands
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lacp_interfaces_facts(
+ data=running_config
+ )
+ else:
+ changed_lacp_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lacp_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_lacp_interfaces_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_lacp_interfaces_facts
+
+ result["warnings"] = warnings
+
+ return result
+
+ def set_config(self, existing_lacp_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params.get("config")
+ want = []
+ if config:
+ for each in config:
+ each.update({"name": normalize_interface(each["name"])})
+ want.append(each)
+ have = existing_lacp_interfaces_facts
+ resp = self.set_state(want, have)
+
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ if (
+ self.state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ if self.state == "overridden":
+ commands = self._state_overridden(want, have)
+ elif self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state in ("merged", "rendered"):
+ commands = self._state_merged(want, have)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have)
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for each in have:
+ for interface in want:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ # We didn't find a matching desired state, which means we can
+ # pretend we received an empty desired state.
+ interface = dict(name=each["name"])
+ commands.extend(self._clear_config(interface, each))
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if interface["name"] == each["name"]:
+ break
+ else:
+ commands.extend(self._set_config(interface, dict()))
+ continue
+ commands.extend(self._set_config(interface, each))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ continue
+ interface = dict(name=interface["name"])
+ commands.extend(self._clear_config(interface, each))
+ else:
+ for each in have:
+ commands.extend(self._clear_config(dict(), each))
+
+ return commands
+
+ def _set_config(self, want, have):
+ # Set the interface config based on the want and have config
+ commands = []
+ interface = "interface " + want["name"]
+
+ want_dict = dict_to_set(want)
+ have_dict = dict_to_set(have)
+ diff = want_dict - have_dict
+
+ if diff:
+ port_priotity = dict(diff).get("port_priority")
+ max_bundle = dict(diff).get("max_bundle")
+ fast_switchover = dict(diff).get("fast_switchover")
+ if port_priotity:
+ cmd = "lacp port-priority {0}".format(port_priotity)
+ add_command_to_config_list(interface, cmd, commands)
+ if max_bundle:
+ cmd = "lacp max-bundle {0}".format(max_bundle)
+ add_command_to_config_list(interface, cmd, commands)
+ if fast_switchover:
+ cmd = "lacp fast-switchover"
+ add_command_to_config_list(interface, cmd, commands)
+
+ return commands
+
+ def _clear_config(self, want, have):
+ # Delete the interface config based on the want and have config
+ commands = []
+ if want.get("name"):
+ interface = "interface " + want["name"]
+ else:
+ interface = "interface " + have["name"]
+
+ if have.get("port_priority") and have.get("port_priority") != want.get(
+ "port_priority"
+ ):
+ cmd = "lacp port-priority"
+ remove_command_from_config_list(interface, cmd, commands)
+ if have.get("max_bundle") and have.get("max_bundle") != want.get(
+ "max_bundle"
+ ):
+ cmd = "lacp max-bundle"
+ remove_command_from_config_list(interface, cmd, commands)
+ if have.get("fast_switchover"):
+ cmd = "lacp fast-switchover"
+ remove_command_from_config_list(interface, cmd, commands)
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lag_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lag_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lag_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lag_interfaces/lag_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lag_interfaces/lag_interfaces.py
new file mode 100644
index 00000000..40482fc0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lag_interfaces/lag_interfaces.py
@@ -0,0 +1,404 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_lag_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import re
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ dict_to_set,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ remove_duplicate_interface,
+)
+
+
+class Lag_interfaces(ConfigBase):
+ """
+ The ios_lag_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lag_interfaces"]
+
+ def __init__(self, module):
+ super(Lag_interfaces, self).__init__(module)
+
+ def get_lag_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lag_interfaces_facts = facts["ansible_network_resources"].get(
+ "lag_interfaces"
+ )
+ if not lag_interfaces_facts:
+ return []
+ return lag_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lag_interfaces_facts = self.get_lag_interfaces_facts()
+ else:
+ existing_lag_interfaces_facts = []
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lag_interfaces_facts))
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lag_interfaces_facts = self.get_lag_interfaces_facts()
+ elif self.state == "rendered":
+ result["rendered"] = commands
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lag_interfaces_facts(
+ data=running_config
+ )
+ else:
+ changed_lag_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lag_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_lag_interfaces_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_lag_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_lag_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params.get("config")
+ want = []
+ if config:
+ for each in config:
+ each.update({"name": normalize_interface(each["name"])})
+ want.append(each)
+ have = existing_lag_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+
+ if (
+ self.state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ module = self._module
+ if self.state == "overridden":
+ commands = self._state_overridden(want, have, module)
+ elif self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state in ("merged", "rendered"):
+ commands = self._state_merged(want, have, module)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have, module)
+ return commands
+
+ def _state_replaced(self, want, have, module):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each_interface in interface.get("members"):
+ for each in have:
+ if each.get("members"):
+ for every in each.get("members"):
+ match = False
+ if every["member"] == each_interface["member"]:
+ match = True
+ break
+ continue
+ if match:
+ have_dict = self.filter_dict_having_none_value(
+ interface, each
+ )
+ commands.extend(
+ self._clear_config(dict(), have_dict)
+ )
+ commands.extend(
+ self._set_config(interface, each, module)
+ )
+ elif each.get("name") == each_interface["member"]:
+ have_dict = self.filter_dict_having_none_value(
+ interface, each
+ )
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(
+ self._set_config(interface, each, module)
+ )
+ break
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_overridden(self, want, have, module):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for interface in want:
+ if interface.get("members"):
+ for each_interface in interface.get("members"):
+ for each in have:
+ if each.get("members"):
+ for every in each.get("members"):
+ match = False
+ if every["member"] == each_interface["member"]:
+ match = True
+ break
+ commands.extend(
+ self._clear_config(interface, each)
+ )
+ continue
+ if match:
+ have_dict = self.filter_dict_having_none_value(
+ interface, each
+ )
+ commands.extend(
+ self._clear_config(dict(), have_dict)
+ )
+ commands.extend(
+ self._set_config(interface, each, module)
+ )
+ elif each.get("name") == each_interface["member"]:
+ have_dict = self.filter_dict_having_none_value(
+ interface, each
+ )
+ commands.extend(
+ self._clear_config(dict(), have_dict)
+ )
+ commands.extend(
+ self._set_config(interface, each, module)
+ )
+ break
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_merged(self, want, have, module):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each_interface in interface.get("members"):
+ for each in have:
+ if each.get("members"):
+ for every in each.get("members"):
+ if every["member"] == each_interface["member"]:
+ break
+ elif each.get("name") == each_interface["member"]:
+ break
+ else:
+ if self.state == "rendered":
+ commands.extend(
+ self._set_config(interface, dict(), module)
+ )
+ continue
+ commands.extend(self._set_config(interface, each, module))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ for interface in want:
+ for each in have:
+ if each.get("name") == interface["name"]:
+ break
+ else:
+ continue
+ commands.extend(self._clear_config(interface, each))
+ else:
+ for each in have:
+ commands.extend(self._clear_config(dict(), each))
+
+ return commands
+
+ def filter_dict_having_none_value(self, want, have):
+ # Generate dict with have dict value which is None in want dict
+ test_dict = dict()
+ test_key_dict = dict()
+ test_dict["name"] = want.get("name")
+ for k, v in iteritems(want):
+ if isinstance(v, dict):
+ for key, value in iteritems(v):
+ if value is None:
+ dict_val = have.get(k).get(key)
+ test_key_dict.update({key: dict_val})
+ test_dict.update({k: test_key_dict})
+ if v is None:
+ val = have.get(k)
+ test_dict.update({k: val})
+ return test_dict
+
+ def remove_command_from_config_list(self, interface, cmd, commands):
+ # To delete the passed config
+ if interface not in commands:
+ commands.append(interface)
+ commands.append("no %s" % cmd)
+ return commands
+
+ def add_command_to_config_list(self, interface, cmd, commands):
+ # To set the passed config
+ if interface not in commands:
+ commands.append(interface)
+ commands.append(cmd)
+ return commands
+
+ def _set_config(self, want, have, module):
+ # Set the interface config based on the want and have config
+ commands = []
+
+ # To remove keys with None values from want dict
+ want = utils.remove_empties(want)
+ # Get the diff b/w want and have
+ want_dict = dict_to_set(want)
+ have_dict = dict_to_set(have)
+ diff = want_dict - have_dict
+
+ # To get the channel-id from lag port-channel name
+ lag_config = dict(diff).get("members")
+ channel_name = re.search(r"(\d+)", want.get("name"))
+ if channel_name:
+ channel_id = channel_name.group()
+ else:
+ module.fail_json(msg="Lag Interface Name is not correct!")
+ if lag_config:
+ for each in lag_config:
+ each = dict(each)
+ each_interface = "interface {0}".format(each.get("member"))
+ if have.get("name") == want["members"][0][
+ "member"
+ ] or want.get("name").lower().startswith("po"):
+ if each.get("mode"):
+ cmd = "channel-group {0} mode {1}".format(
+ channel_id, each.get("mode")
+ )
+ self.add_command_to_config_list(
+ each_interface, cmd, commands
+ )
+ elif each.get("link"):
+ cmd = "channel-group {0} link {1}".format(
+ channel_id, each.get("link")
+ )
+ self.add_command_to_config_list(
+ each_interface, cmd, commands
+ )
+
+ return commands
+
+ def _clear_config(self, want, have):
+ # Delete the interface config based on the want and have config
+ commands = []
+
+ if have.get("members"):
+ for each in have["members"]:
+ interface = "interface " + each["member"]
+ if want.get("members"):
+ if (
+ each.get("member")
+ and each.get("member") != want["members"][0]["member"]
+ ):
+ self.remove_command_from_config_list(
+ interface, "channel-group", commands
+ )
+ elif each.get("member"):
+ self.remove_command_from_config_list(
+ interface, "channel-group", commands
+ )
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_global/lldp_global.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_global/lldp_global.py
new file mode 100644
index 00000000..b4e6a322
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_global/lldp_global.py
@@ -0,0 +1,275 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_lldp_global class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to its desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ dict_to_set,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ filter_dict_having_none_value,
+)
+
+
+class Lldp_global(ConfigBase):
+ """
+ The ios_lldp_global class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lldp_global"]
+
+ tlv_select_params = {
+ "four_wire_power_management": "4-wire-power-management",
+ "mac_phy_cfg": "mac-phy-cfg",
+ "management_address": "management-address",
+ "port_description": "port-description",
+ "port_vlan": "port-vlan",
+ "power_management": "power-management",
+ "system_capabilities": "system-capabilities",
+ "system_description": "system-description",
+ "system_name": "system-name",
+ }
+
+ def __init__(self, module):
+ super(Lldp_global, self).__init__(module)
+
+ def get_lldp_global_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lldp_global_facts = facts["ansible_network_resources"].get(
+ "lldp_global"
+ )
+ if not lldp_global_facts:
+ return {}
+
+ return lldp_global_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from moduel execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lldp_global_facts = self.get_lldp_global_facts()
+ else:
+ existing_lldp_global_facts = dict()
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lldp_global_facts))
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lldp_global_facts = self.get_lldp_global_facts()
+ elif self.state == "rendered":
+ result["rendered"] = commands
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lldp_global_facts(data=running_config)
+ else:
+ changed_lldp_global_facts = dict()
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lldp_global_facts
+ if result["changed"]:
+ result["after"] = changed_lldp_global_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_lldp_global_facts
+ result["warnings"] = warnings
+
+ return result
+
+ def set_config(self, existing_lldp_global_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the deisred configuration
+ """
+ want = self._module.params["config"]
+ have = existing_lldp_global_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the deisred configuration
+ """
+ commands = []
+ if self.state in ("merged", "replaced", "rendered") and not want:
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ if self.state == "overridden":
+ commands = self._state_overridden(want, have)
+ elif self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state in ("merged", "rendered"):
+ commands = self._state_merged(want, have)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have)
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the deisred configuration
+ """
+ commands = []
+
+ have_dict = filter_dict_having_none_value(want, have)
+ commands.extend(self._clear_config(have_dict))
+ commands.extend(self._set_config(want, have))
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :param want: the additive configuration as a dictionary
+ :param obj_in_have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ commands.extend(self._set_config(want, have))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :param want: the objects from which the configuration should be removed
+ :param obj_in_have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ commands.extend(self._clear_config(have))
+
+ return commands
+
+ def _remove_command_from_config_list(self, cmd, commands):
+ if cmd not in commands:
+ commands.append("no %s" % cmd)
+
+ def add_command_to_config_list(self, cmd, commands):
+ if cmd not in commands:
+ commands.append(cmd)
+
+ def _set_config(self, want, have):
+ # Set the lldp global config based on the want and have config
+ commands = []
+
+ # Get the diff b/w want and have
+ want_dict = dict_to_set(want)
+ have_dict = dict_to_set(have)
+ diff = want_dict - have_dict
+
+ if diff:
+ diff = dict(diff)
+ holdtime = diff.get("holdtime")
+ enabled = diff.get("enabled")
+ timer = diff.get("timer")
+ reinit = diff.get("reinit")
+ tlv_select = diff.get("tlv_select")
+
+ if holdtime:
+ cmd = "lldp holdtime {0}".format(holdtime)
+ self.add_command_to_config_list(cmd, commands)
+ if enabled:
+ cmd = "lldp run"
+ self.add_command_to_config_list(cmd, commands)
+ if timer:
+ cmd = "lldp timer {0}".format(timer)
+ self.add_command_to_config_list(cmd, commands)
+ if reinit:
+ cmd = "lldp reinit {0}".format(reinit)
+ self.add_command_to_config_list(cmd, commands)
+ if tlv_select:
+ tlv_selec_dict = dict(tlv_select)
+ for k, v in iteritems(self.tlv_select_params):
+ if k in tlv_selec_dict and tlv_selec_dict[k]:
+ cmd = "lldp tlv-select {0}".format(v)
+ self.add_command_to_config_list(cmd, commands)
+
+ return commands
+
+ def _clear_config(self, have):
+ # Delete the lldp global config based on the want and have config
+ commands = []
+
+ if have.get("holdtime"):
+ cmd = "lldp holdtime"
+ self._remove_command_from_config_list(cmd, commands)
+ if have.get("enabled"):
+ cmd = "lldp run"
+ self._remove_command_from_config_list(cmd, commands)
+ if have.get("timer"):
+ cmd = "lldp timer"
+ self._remove_command_from_config_list(cmd, commands)
+ if have.get("reinit"):
+ cmd = "lldp reinit"
+ self._remove_command_from_config_list(cmd, commands)
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_interfaces/lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_interfaces/lldp_interfaces.py
new file mode 100644
index 00000000..479f626c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/lldp_interfaces/lldp_interfaces.py
@@ -0,0 +1,328 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_lldp_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to its desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ dict_to_set,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ remove_command_from_config_list,
+ add_command_to_config_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ filter_dict_having_none_value,
+ remove_duplicate_interface,
+)
+
+
+class Lldp_Interfaces(ConfigBase):
+ """
+ The ios_lldp_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lldp_interfaces"]
+
+ def __init__(self, module):
+ super(Lldp_Interfaces, self).__init__(module)
+
+ def get_lldp_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lldp_interfaces_facts = facts["ansible_network_resources"].get(
+ "lldp_interfaces"
+ )
+ if not lldp_interfaces_facts:
+ return []
+ return lldp_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lldp_interfaces_facts = self.get_lldp_interfaces_facts()
+ else:
+ existing_lldp_interfaces_facts = []
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lldp_interfaces_facts))
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lldp_interfaces_facts = self.get_lldp_interfaces_facts()
+ elif self.state == "rendered":
+ result["rendered"] = commands
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lldp_interfaces_facts(
+ data=running_config
+ )
+ else:
+ changed_lldp_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lldp_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_lldp_interfaces_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_lldp_interfaces_facts
+
+ result["warnings"] = warnings
+
+ return result
+
+ def set_config(self, existing_lldp_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params.get("config")
+ want = []
+ if config:
+ for each in config:
+ each.update({"name": normalize_interface(each["name"])})
+ want.append(each)
+ have = existing_lldp_interfaces_facts
+ resp = self.set_state(want, have)
+
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+
+ if (
+ self.state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ if self.state == "overridden":
+ commands = self._state_overridden(want, have)
+ elif self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state in ("merged", "rendered"):
+ commands = self._state_merged(want, have)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have)
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for each in have:
+ for interface in want:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ # We didn't find a matching desired state, which means we can
+ # pretend we received an empty desired state.
+ interface = dict(name=each["name"])
+ commands.extend(self._clear_config(interface, each))
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if interface["name"] == each["name"]:
+ break
+ else:
+ if self.state == "rendered":
+ commands.extend(self._set_config(interface, dict()))
+ continue
+ commands.extend(self._set_config(interface, each))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ for interface in want:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ continue
+ interface = dict(name=interface["name"])
+ commands.extend(self._clear_config(interface, each))
+ else:
+ for each in have:
+ commands.extend(self._clear_config(dict(), each))
+
+ return commands
+
+ def _set_config(self, want, have):
+ # Set the interface config based on the want and have config
+ commands = []
+
+ interface = "interface " + want["name"]
+ # Get the diff b/w want and have
+ want_dict = dict_to_set(want)
+ have_dict = dict_to_set(have)
+ diff = want_dict - have_dict
+
+ if diff:
+ diff = dict(diff)
+ receive = diff.get("receive")
+ transmit = diff.get("transmit")
+ med_tlv_select = diff.get("med_tlv_select")
+ tlv_select = diff.get("tlv_select")
+ if receive:
+ cmd = "lldp receive"
+ add_command_to_config_list(interface, cmd, commands)
+ elif receive is False:
+ cmd = "no lldp receive"
+ add_command_to_config_list(interface, cmd, commands)
+ if transmit:
+ cmd = "lldp transmit"
+ add_command_to_config_list(interface, cmd, commands)
+ elif transmit is False:
+ cmd = "no lldp transmit"
+ add_command_to_config_list(interface, cmd, commands)
+
+ if med_tlv_select:
+ med_tlv_select = dict(med_tlv_select)
+ if med_tlv_select.get("inventory_management"):
+ add_command_to_config_list(
+ interface,
+ "lldp med-tlv-select inventory-management",
+ commands,
+ )
+ if tlv_select:
+ tlv_select = dict(tlv_select)
+ if tlv_select.get("power_management"):
+ add_command_to_config_list(
+ interface, "lldp tlv-select power-management", commands
+ )
+
+ return commands
+
+ def _clear_config(self, want, have):
+ # Delete the interface config based on the want and have config
+ commands = []
+ if want.get("name"):
+ interface = "interface " + want["name"]
+ else:
+ interface = "interface " + have["name"]
+
+ if have.get("receive") and have.get("receive") != want.get("receive"):
+ cmd = "lldp receive"
+ remove_command_from_config_list(interface, cmd, commands)
+ if have.get("transmit") and have.get("transmit") != want.get(
+ "transmit"
+ ):
+ cmd = "lldp transmit"
+ remove_command_from_config_list(interface, cmd, commands)
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospf_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospf_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospf_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospf_interfaces/ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospf_interfaces/ospf_interfaces.py
new file mode 100644
index 00000000..3640207d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospf_interfaces/ospf_interfaces.py
@@ -0,0 +1,165 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The cisco.ios_ospf_interfaces config file.
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to its desired end-state is
+created.
+"""
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.rm_templates.ospf_interfaces import (
+ Ospf_InterfacesTemplate,
+)
+
+
+class Ospf_Interfaces(ResourceModule):
+ """
+ The cisco.ios_ospf_interfaces config class
+ """
+
+ def __init__(self, module):
+ super(Ospf_Interfaces, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="ospf_interfaces",
+ tmplt=Ospf_InterfacesTemplate(),
+ )
+ self.parsers = []
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ if self.state not in ["parsed", "gathered"]:
+ self.generate_commands()
+ self.run_commands()
+ return self.result
+
+ def generate_commands(self):
+ """ Generate configuration commands to send based on
+ want, have and desired state.
+ """
+
+ wantd = {}
+ haved = {}
+ if self.want:
+ wantd = {(entry["name"]): entry for entry in self.want}
+ else:
+ wantd = {}
+ if self.have:
+ haved = {(entry["name"]): entry for entry in self.have}
+ else:
+ haved = {}
+
+ # if state is merged, merge want onto have and then compare
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, empty out wantd and set haved to wantd
+ if self.state == "deleted":
+ haved = {
+ k: v for k, v in iteritems(haved) if k in wantd or not wantd
+ }
+ wantd = {}
+
+ # remove superfluous config for overridden and deleted
+ if self.state in ["overridden", "deleted"]:
+ for k, have in iteritems(haved):
+ if k not in wantd:
+ self._compare(want={}, have=have)
+
+ for k, want in iteritems(wantd):
+ self._compare(want=want, have=haved.pop(k, {}))
+
+ def _compare(self, want, have):
+ """Leverages the base class `compare()` method and
+ populates the list of commands to be run by comparing
+ the `want` and `have` data with the `parsers` defined
+ for the Ospf_interfaces network resource.
+ """
+ parsers = [
+ "name",
+ "process",
+ "adjacency",
+ "authentication",
+ "bfd",
+ "cost_ip",
+ "cost_ipv6_dynamic_cost",
+ "database_filter",
+ "dead_interval",
+ "demand_circuit",
+ "flood_reduction",
+ "hello_interval",
+ "lls",
+ "manet",
+ "mtu_ignore",
+ "multi_area",
+ "neighbor",
+ "network",
+ "prefix_suppression",
+ "priority",
+ "resync_timeout",
+ "retransmit_interval",
+ "shutdown",
+ "transmit_delay",
+ "ttl_security",
+ ]
+
+ if (
+ want != have
+ ): # and (want.get('address_family') or self.state == 'deleted'):
+ if have.get("address_family"):
+ self.addcmd(have, "name", False)
+ elif want.get("address_family"):
+ self.addcmd(want, "name", False)
+
+ if want.get("address_family"):
+ for each in want["address_family"]:
+ set_want = True
+ if have.get("address_family"):
+ have_elements = len(have.get("address_family"))
+ while have_elements:
+ if have.get("address_family")[have_elements - 1].get(
+ "afi"
+ ) == each.get("afi"):
+ set_want = False
+ h_each = have["address_family"].pop(
+ have_elements - 1
+ )
+ self.compare(
+ parsers=parsers, want=each, have=h_each
+ )
+ have_elements -= 1
+ else:
+ h_each = dict()
+ self.compare(parsers=parsers, want=each, have=h_each)
+ set_want = False
+ if set_want:
+ self.compare(parsers=parsers, want=each, have=dict())
+ if self.state in ["overridden", "deleted"]:
+ if have.get("address_family"):
+ for each in have["address_family"]:
+ self.compare(parsers=parsers, want=dict(), have=each)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv2/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv2/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv2/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv2/ospfv2.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv2/ospfv2.py
new file mode 100644
index 00000000..08c0af36
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv2/ospfv2.py
@@ -0,0 +1,225 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_ospfv2 class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.rm_templates.ospfv2 import (
+ Ospfv2Template,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+
+
+class Ospfv2(ResourceModule):
+ """
+ The ios_ospfv2 class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["ospfv2"]
+
+ def __init__(self, module):
+ super(Ospfv2, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="ospfv2",
+ tmplt=Ospfv2Template(),
+ )
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ self.gen_config()
+ self.run_commands()
+ return self.result
+
+ def gen_config(self):
+ """ Select the appropriate function based on the state provided
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ if self.want:
+ wantd = {
+ (entry["process_id"], entry.get("vrf")): entry
+ for entry in self.want.get("processes", [])
+ }
+ else:
+ wantd = {}
+ if self.have:
+ haved = {
+ (entry["process_id"], entry.get("vrf")): entry
+ for entry in self.have.get("processes", [])
+ }
+ else:
+ haved = {}
+
+ # turn all lists of dicts into dicts prior to merge
+ for thing in wantd, haved:
+ for _pid, proc in iteritems(thing):
+ for area in proc.get("areas", []):
+ ranges = {
+ entry["address"]: entry
+ for entry in area.get("ranges", [])
+ }
+ if bool(ranges):
+ area["ranges"] = ranges
+ filter_list = {
+ entry["direction"]: entry
+ for entry in area.get("filter_list", [])
+ }
+ if bool(filter_list):
+ area["filter_list"] = filter_list
+ proc["areas"] = {
+ entry["area_id"]: entry for entry in proc.get("areas", [])
+ }
+ if proc.get("distribute_list"):
+ if "acls" in proc.get("distribute_list"):
+ proc["distribute_list"]["acls"] = {
+ entry["name"]: entry
+ for entry in proc["distribute_list"].get(
+ "acls", []
+ )
+ }
+
+ # if state is merged, merge want onto have
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, limit the have to anything in want
+ # set want to nothing
+ if self.state == "deleted":
+ haved = {
+ k: v for k, v in iteritems(haved) if k in wantd or not wantd
+ }
+ wantd = {}
+
+ # delete processes first so we do run into "more than one" errors
+ if self.state in ["overridden", "deleted"]:
+ for k, have in iteritems(haved):
+ if k not in wantd:
+ self.addcmd(have, "pid", True)
+
+ for k, want in iteritems(wantd):
+ self._compare(want=want, have=haved.pop(k, {}))
+
+ def _compare(self, want, have):
+ parsers = [
+ "adjacency",
+ "address_family",
+ "auto_cost",
+ "bfd",
+ "capability",
+ "compatible",
+ "default_information",
+ "default_metric",
+ "discard_route",
+ "distance.admin_distance",
+ "distance.ospf",
+ "distribute_list.acls",
+ "distribute_list.prefix",
+ "distribute_list.route_map",
+ "domain_id",
+ "domain_tag",
+ "event_log",
+ "help",
+ "ignore",
+ "interface_id",
+ "ispf",
+ "limit",
+ "local_rib_criteria",
+ "log_adjacency_changes",
+ "max_lsa",
+ "max_metric",
+ "maximum_paths",
+ "mpls.ldp",
+ "mpls.traffic_eng",
+ "neighbor",
+ "network",
+ "nsf.cisco",
+ "nsf.ietf",
+ "passive_interface",
+ "prefix_suppression",
+ "priority",
+ "queue_depth.hello",
+ "queue_depth.update",
+ "router_id",
+ "shutdown",
+ "summary_address",
+ "timers.throttle.lsa",
+ "timers.throttle.spf",
+ "traffic_share",
+ "ttl_security",
+ ]
+
+ if want != have:
+ self.addcmd(want or have, "pid", False)
+ self.compare(parsers, want, have)
+ self._areas_compare(want, have)
+
+ def _areas_compare(self, want, have):
+ wareas = want.get("areas", {})
+ hareas = have.get("areas", {})
+ for name, entry in iteritems(wareas):
+ self._area_compare(want=entry, have=hareas.pop(name, {}))
+ for name, entry in iteritems(hareas):
+ self._area_compare(want={}, have=entry)
+
+ def _area_compare(self, want, have):
+ parsers = [
+ "area.authentication",
+ "area.capability",
+ "area.default_cost",
+ "area.nssa",
+ "area.nssa.translate",
+ "area.ranges",
+ "area.sham_link",
+ "area.stub",
+ ]
+ self.compare(parsers=parsers, want=want, have=have)
+ self._area_compare_filters(want, have)
+
+ def _area_compare_filters(self, wantd, haved):
+ for name, entry in iteritems(wantd):
+ h_item = haved.pop(name, {})
+ if entry != h_item and name == "filter_list":
+ filter_list_entry = {}
+ filter_list_entry["area_id"] = wantd["area_id"]
+ if h_item:
+ li_diff = [
+ item
+ for item in entry + h_item
+ if item not in entry or item not in h_item
+ ]
+ else:
+ li_diff = entry
+ filter_list_entry["filter_list"] = li_diff
+ self.addcmd(filter_list_entry, "area.filter_list", False)
+ for name, entry in iteritems(haved):
+ if name == "filter_list":
+ self.addcmd(entry, "area.filter_list", True)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv3/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv3/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv3/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv3/ospfv3.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv3/ospfv3.py
new file mode 100644
index 00000000..f3c1e3d2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/ospfv3/ospfv3.py
@@ -0,0 +1,324 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_ospfv3 class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.rm_templates.ospfv3 import (
+ Ospfv3Template,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+
+
+class Ospfv3(ResourceModule):
+ """
+ The ios_ospfv3 class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["ospfv3"]
+
+ def __init__(self, module):
+ super(Ospfv3, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="ospfv3",
+ tmplt=Ospfv3Template(),
+ )
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ self.gen_config()
+ self.run_commands()
+ return self.result
+
+ def gen_config(self):
+ """ Select the appropriate function based on the state provided
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ if self.want:
+ wantd = {
+ (entry["process_id"], entry.get("vrf")): entry
+ for entry in self.want.get("processes", [])
+ }
+ else:
+ wantd = {}
+ if self.have:
+ haved = {
+ (entry["process_id"], entry.get("vrf")): entry
+ for entry in self.have.get("processes", [])
+ }
+ else:
+ haved = {}
+
+ # turn all lists of dicts into dicts prior to merge
+ for thing in wantd, haved:
+ for _pid, proc in iteritems(thing):
+ for area in proc.get("areas", []):
+ ranges = {
+ entry["address"]: entry
+ for entry in area.get("ranges", [])
+ }
+ if bool(ranges):
+ area["ranges"] = ranges
+ filter_list = {
+ entry["direction"]: entry
+ for entry in area.get("filter_list", [])
+ }
+ if bool(filter_list):
+ area["filter_list"] = filter_list
+ proc["areas"] = {
+ entry["area_id"]: entry for entry in proc.get("areas", [])
+ }
+ if proc.get("distribute_list"):
+ if "acls" in proc.get("distribute_list"):
+ proc["distribute_list"]["acls"] = {
+ entry["name"]: entry
+ for entry in proc["distribute_list"].get(
+ "acls", []
+ )
+ }
+
+ # if state is merged, merge want onto have
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, limit the have to anything in want
+ # set want to nothing
+ if self.state == "deleted":
+ haved = {
+ k: v for k, v in iteritems(haved) if k in wantd or not wantd
+ }
+ wantd = {}
+
+ # delete processes first so we do run into "more than one" errors
+ if self.state in ["overridden", "deleted"]:
+ for k, have in iteritems(haved):
+ if k not in wantd:
+ self.addcmd(have, "pid", True)
+
+ for k, want in iteritems(wantd):
+ self._compare(want=want, have=haved.pop(k, {}))
+
+ def _compare(self, want, have):
+ parsers = [
+ "adjacency",
+ "auto_cost",
+ "bfd",
+ "compatible",
+ "event_log",
+ "help",
+ "interface_id",
+ "limit",
+ "local_rib_criteria",
+ "log_adjacency_changes",
+ "manet",
+ "max_lsa",
+ "max_metric",
+ "passive_interface",
+ "prefix_suppression",
+ "queue_depth.hello",
+ "queue_depth.update",
+ "router_id",
+ "shutdown",
+ "timers.throttle.lsa",
+ "timers.throttle.spf",
+ ]
+
+ if want != have:
+ self.addcmd(want or have, "pid", False)
+ self.compare(parsers, want, have)
+ self._areas_compare(want, have)
+ self._address_family_compare(want, have)
+
+ if len(self.commands) == 1 and "router" in self.commands[0]:
+ del self.commands[0]
+
+ def _areas_compare(self, want, have):
+ wareas = want.get("areas", {})
+ hareas = have.get("areas", {})
+ for name, entry in iteritems(wareas):
+ self._area_compare(want=entry, have=hareas.pop(name, {}))
+ for name, entry in iteritems(hareas):
+ self._area_compare(want={}, have=entry)
+
+ def _area_compare(self, want, have):
+ parsers = [
+ "area.authentication",
+ "area.capability",
+ "area.default_cost",
+ "area.nssa",
+ "area.nssa.translate",
+ "area.ranges",
+ "area.sham_link",
+ "area.stub",
+ ]
+ self.compare(parsers=parsers, want=want, have=have)
+ self._area_compare_filters(want, have)
+
+ def _area_compare_filters(self, wantd, haved):
+ for name, entry in iteritems(wantd):
+ h_item = haved.pop(name, {})
+ if entry != h_item and name == "filter_list":
+ filter_list_entry = {}
+ filter_list_entry["area_id"] = wantd["area_id"]
+ if h_item:
+ li_diff = [
+ item
+ for item in entry + h_item
+ if item not in entry or item not in h_item
+ ]
+ else:
+ li_diff = entry
+ filter_list_entry["filter_list"] = li_diff
+ self.addcmd(filter_list_entry, "area.filter_list", False)
+ for name, entry in iteritems(haved):
+ if name == "filter_list":
+ self.addcmd(entry, "area.filter_list", True)
+
+ def _address_family_compare(self, want, have):
+ if want["process_id"] == have.get("process_id") or want["process_id"]:
+ af_parsers = [
+ "address_family.adjacency",
+ "address_family.auto_cost",
+ "address_family.bfd",
+ "address_family.capability",
+ "address_family.compatible",
+ "address_family.default_information",
+ "address_family.default_metric",
+ "address_family.distance.admin_distance",
+ "address_family.distance.ospf",
+ "address_family.distribute_list.acls",
+ "address_family.distribute_list.prefix",
+ "address_family.distribute_list.route_map",
+ "address_family.event_log",
+ "address_family.graceful_restart",
+ "address_family.interface_id",
+ "address_family.limit",
+ "address_family.local_rib_criteria",
+ "address_family.log_adjacency_changes",
+ "address_family.manet",
+ "address_family.max_lsa",
+ "address_family.max_metric",
+ "address_family.maximum_paths",
+ "address_family.passive_interface",
+ "address_family.prefix_suppression",
+ "address_family.queue_depth.hello",
+ "address_family.queue_depth.update",
+ "address_family.router_id",
+ "address_family.shutdown",
+ "address_family.summary_prefix",
+ "address_family.timers.throttle.lsa",
+ "address_family.timers.throttle.spf",
+ ]
+ delete_exit_family = False
+ for each_want_af in want["address_family"]:
+ if have.get("address_family"):
+ for each_have_af in have["address_family"]:
+ if each_have_af.get("vrf") == each_want_af.get(
+ "vrf"
+ ) and each_have_af.get("afi") == each_want_af.get(
+ "afi"
+ ):
+ self.compare(
+ parsers=["address_family"],
+ want={"address_family": each_want_af},
+ have={"address_family": each_have_af},
+ )
+ self.compare(
+ parsers=af_parsers,
+ want=each_want_af,
+ have=each_have_af,
+ )
+ elif each_have_af.get("afi") == each_want_af.get(
+ "afi"
+ ):
+ self.compare(
+ parsers=["address_family"],
+ want={"address_family": each_want_af},
+ have={"address_family": each_have_af},
+ )
+ self.compare(
+ parsers=af_parsers,
+ want={"address_family": each_want_af},
+ have={"address_family": each_have_af},
+ )
+ if each_want_af.get("areas"):
+ af_want_areas = {}
+ af_have_areas = {}
+ for each_area in each_want_af["areas"]:
+ af_want_areas.update(
+ {each_area["area_id"]: each_area}
+ )
+ if each_have_af.get("areas"):
+ for each_area in each_have_af["areas"]:
+ af_have_areas.update(
+ {each_area["area_id"]: each_area}
+ )
+
+ if "exit-address-family" in self.commands:
+ del self.commands[
+ self.commands.index("exit-address-family")
+ ]
+ delete_exit_family = True
+
+ if af_have_areas:
+ self._areas_compare(
+ {"areas": af_want_areas},
+ {"areas": af_have_areas},
+ )
+ else:
+ self._areas_compare(
+ {"areas": af_want_areas}, dict()
+ )
+ if delete_exit_family:
+ self.commands.append("exit-address-family")
+ else:
+ temp_cmd_before = self.commands
+ self.commands = []
+ self.compare(
+ parsers=["address_family"],
+ want={"address_family": each_want_af},
+ have=dict(),
+ )
+ self.compare(
+ parsers=af_parsers, want=each_want_af, have=dict()
+ )
+ if each_want_af.get("areas"):
+ af_areas = {}
+ for each_area in each_want_af["areas"]:
+ af_areas.update({each_area["area_id"]: each_area})
+ self._areas_compare({"areas": af_areas}, dict())
+ del self.commands[
+ self.commands.index("exit-address-family")
+ ]
+ self.commands.append("exit-address-family")
+ self.commands[0:0] = temp_cmd_before
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/static_routes/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/static_routes/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/static_routes/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/static_routes/static_routes.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/static_routes/static_routes.py
new file mode 100644
index 00000000..15053f44
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/static_routes/static_routes.py
@@ -0,0 +1,713 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_static_routes class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import copy
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ new_dict_to_set,
+ validate_n_expand_ipv4,
+ filter_dict_having_none_value,
+)
+
+
+class Static_Routes(ConfigBase):
+ """
+ The ios_static_routes class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["static_routes"]
+
+ def __init__(self, module):
+ super(Static_Routes, self).__init__(module)
+
+ def get_static_routes_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ static_routes_facts = facts["ansible_network_resources"].get(
+ "static_routes"
+ )
+ if not static_routes_facts:
+ return []
+ return static_routes_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_static_routes_facts = self.get_static_routes_facts()
+ else:
+ existing_static_routes_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_static_routes_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_static_routes_facts = self.get_static_routes_facts()
+ elif self.state == "rendered":
+ result["rendered"] = commands
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_static_routes_facts(
+ data=running_config
+ )
+ else:
+ changed_static_routes_facts = []
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_static_routes_facts
+ if result["changed"]:
+ result["after"] = changed_static_routes_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_static_routes_facts
+
+ result["warnings"] = warnings
+
+ return result
+
+ def set_config(self, existing_static_routes_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ have = existing_static_routes_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+ commands = []
+ if state == "overridden":
+ commands = self._state_overridden(want, have)
+ elif state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif state == "merged" or state == "rendered":
+ commands = self._state_merged(want, have)
+ elif state == "replaced":
+ commands = self._state_replaced(want, have)
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+
+ commands = []
+
+ # Drill each iteration of want n have and then based on dest and afi tyoe comparison take config call
+ for w in want:
+ for addr_want in w.get("address_families"):
+ for route_want in addr_want.get("routes"):
+ check = False
+ for h in have:
+ if h.get("address_families"):
+ for addr_have in h.get("address_families"):
+ for route_have in addr_have.get("routes"):
+ if (
+ route_want.get("dest")
+ == route_have.get("dest")
+ and addr_want["afi"]
+ == addr_have["afi"]
+ ):
+ check = True
+ have_set = set()
+ new_hops = []
+ for each in route_want.get(
+ "next_hops"
+ ):
+ want_set = set()
+ new_dict_to_set(
+ each, [], want_set, 0
+ )
+ new_hops.append(want_set)
+ new_dict_to_set(
+ addr_have, [], have_set, 0
+ )
+ # Check if the have dict next_hops value is diff from want dict next_hops
+ have_dict = filter_dict_having_none_value(
+ route_want.get("next_hops")[0],
+ route_have.get("next_hops")[0],
+ )
+ # update the have_dict with forward_router_address
+ have_dict.update(
+ {
+ "forward_router_address": route_have.get(
+ "next_hops"
+ )[
+ 0
+ ].get(
+ "forward_router_address"
+ )
+ }
+ )
+ # updating the have_dict with next_hops val that's not None
+ new_have_dict = {}
+ for k, v in have_dict.items():
+ if v is not None:
+ new_have_dict.update({k: v})
+
+ # Set the new config from the user provided want config
+ cmd = self._set_config(
+ w,
+ h,
+ addr_want,
+ route_want,
+ route_have,
+ new_hops,
+ have_set,
+ )
+
+ if cmd:
+ # since inplace update isn't allowed for static routes, preconfigured
+ # static routes needs to be deleted before the new want static routes changes
+ # are applied
+ clear_route_have = copy.deepcopy(
+ route_have
+ )
+ # inplace update is allowed in case of ipv6 static routes, so not deleting it
+ # before applying the want changes
+ if ":" not in route_want.get(
+ "dest"
+ ):
+ commands.extend(
+ self._clear_config(
+ {},
+ h,
+ {},
+ addr_have,
+ {},
+ clear_route_have,
+ )
+ )
+ commands.extend(cmd)
+ if check:
+ break
+ if check:
+ break
+ if not check:
+ # For configuring any non-existing want config
+ new_hops = []
+ for each in route_want.get("next_hops"):
+ want_set = set()
+ new_dict_to_set(each, [], want_set, 0)
+ new_hops.append(want_set)
+ commands.extend(
+ self._set_config(
+ w,
+ {},
+ addr_want,
+ route_want,
+ {},
+ new_hops,
+ set(),
+ )
+ )
+ commands = [each for each in commands if "no" in each] + [
+ each for each in commands if "no" not in each
+ ]
+
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+
+ commands = []
+ # Creating a copy of want, so that want dict is intact even after delete operation
+ # performed during override want n have comparison
+ temp_want = copy.deepcopy(want)
+
+ # Drill each iteration of want n have and then based on dest and afi tyoe comparison take config call
+ for h in have:
+ if h.get("address_families"):
+ for addr_have in h.get("address_families"):
+ for route_have in addr_have.get("routes"):
+ check = False
+ for w in temp_want:
+ for addr_want in w.get("address_families"):
+ count = 0
+ for route_want in addr_want.get("routes"):
+ if (
+ route_want.get("dest")
+ == route_have.get("dest")
+ and addr_want["afi"]
+ == addr_have["afi"]
+ ):
+ check = True
+ have_set = set()
+ new_hops = []
+ for each in route_want.get(
+ "next_hops"
+ ):
+ want_set = set()
+ new_dict_to_set(
+ each, [], want_set, 0
+ )
+ new_hops.append(want_set)
+ new_dict_to_set(
+ addr_have, [], have_set, 0
+ )
+ commands.extend(
+ self._clear_config(
+ w,
+ h,
+ addr_want,
+ addr_have,
+ route_want,
+ route_have,
+ )
+ )
+ commands.extend(
+ self._set_config(
+ w,
+ h,
+ addr_want,
+ route_want,
+ route_have,
+ new_hops,
+ have_set,
+ )
+ )
+ del addr_want.get("routes")[count]
+ count += 1
+ if check:
+ break
+ if check:
+ break
+ if not check:
+ commands.extend(
+ self._clear_config(
+ {}, h, {}, addr_have, {}, route_have
+ )
+ )
+ # For configuring any non-existing want config
+ for w in temp_want:
+ for addr_want in w.get("address_families"):
+ for route_want in addr_want.get("routes"):
+ new_hops = []
+ for each in route_want.get("next_hops"):
+ want_set = set()
+ new_dict_to_set(each, [], want_set, 0)
+ new_hops.append(want_set)
+ commands.extend(
+ self._set_config(
+ w, {}, addr_want, route_want, {}, new_hops, set()
+ )
+ )
+ # Arranging the cmds suct that all delete cmds are fired before all set cmds
+ commands = [each for each in sorted(commands) if "no" in each] + [
+ each for each in sorted(commands) if "no" not in each
+ ]
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ # Drill each iteration of want n have and then based on dest and afi tyoe comparison take config call
+ for w in want:
+ for addr_want in w.get("address_families"):
+ for route_want in addr_want.get("routes"):
+ check = False
+ for h in have:
+ if h.get("address_families"):
+ for addr_have in h.get("address_families"):
+ for route_have in addr_have.get("routes"):
+ if (
+ route_want.get("dest")
+ == route_have.get("dest")
+ and addr_want["afi"]
+ == addr_have["afi"]
+ ):
+ check = True
+ have_set = set()
+ new_hops = []
+ for each in route_want.get(
+ "next_hops"
+ ):
+ want_set = set()
+ new_dict_to_set(
+ each, [], want_set, 0
+ )
+ new_hops.append(want_set)
+ new_dict_to_set(
+ addr_have, [], have_set, 0
+ )
+ commands.extend(
+ self._set_config(
+ w,
+ h,
+ addr_want,
+ route_want,
+ route_have,
+ new_hops,
+ have_set,
+ )
+ )
+ if check:
+ break
+ if check:
+ break
+ if not check:
+ # For configuring any non-existing want config
+ new_hops = []
+ for each in route_want.get("next_hops"):
+ want_set = set()
+ new_dict_to_set(each, [], want_set, 0)
+ new_hops.append(want_set)
+ commands.extend(
+ self._set_config(
+ w,
+ {},
+ addr_want,
+ route_want,
+ {},
+ new_hops,
+ set(),
+ )
+ )
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ # Drill each iteration of want n have and then based on dest and afi type comparison fire delete config call
+ for w in want:
+ if w.get("address_families"):
+ for addr_want in w.get("address_families"):
+ for route_want in addr_want.get("routes"):
+ check = False
+ for h in have:
+ if h.get("address_families"):
+ for addr_have in h.get("address_families"):
+ for route_have in addr_have.get(
+ "routes"
+ ):
+ if (
+ route_want.get("dest")
+ == route_have.get("dest")
+ and addr_want["afi"]
+ == addr_have["afi"]
+ ):
+ check = True
+ if route_want.get("next_hops"):
+ commands.extend(
+ self._clear_config(
+ {},
+ w,
+ {},
+ addr_want,
+ {},
+ route_want,
+ )
+ )
+ else:
+ commands.extend(
+ self._clear_config(
+ {},
+ h,
+ {},
+ addr_have,
+ {},
+ route_have,
+ )
+ )
+ if check:
+ break
+ if check:
+ break
+ else:
+ for h in have:
+ for addr_have in h.get("address_families"):
+ for route_have in addr_have.get("routes"):
+ if w.get("vrf") == h.get("vrf"):
+ commands.extend(
+ self._clear_config(
+ {},
+ h,
+ {},
+ addr_have,
+ {},
+ route_have,
+ )
+ )
+ else:
+ # Drill each iteration of have and then based on dest and afi type comparison fire delete config call
+ for h in have:
+ for addr_have in h.get("address_families"):
+ for route_have in addr_have.get("routes"):
+ commands.extend(
+ self._clear_config(
+ {}, h, {}, addr_have, {}, route_have
+ )
+ )
+
+ return commands
+
+ def prepare_config_commands(self, config_dict, cmd):
+ """
+ function to parse the input dict and form the prepare the config commands
+ :rtype: A str
+ :returns: The command necessary to configure the static routes
+ """
+
+ dhcp = config_dict.get("dhcp")
+ distance_metric = config_dict.get("distance_metric")
+ forward_router_address = config_dict.get("forward_router_address")
+ global_route_config = config_dict.get("global")
+ interface = config_dict.get("interface")
+ multicast = config_dict.get("multicast")
+ name = config_dict.get("name")
+ permanent = config_dict.get("permanent")
+ tag = config_dict.get("tag")
+ track = config_dict.get("track")
+ dest = config_dict.get("dest")
+ temp_dest = dest.split("/")
+ if temp_dest and ":" not in dest:
+ dest = validate_n_expand_ipv4(self._module, {"address": dest})
+
+ cmd = cmd + dest
+ if interface:
+ cmd = cmd + " {0}".format(interface)
+ if forward_router_address:
+ cmd = cmd + " {0}".format(forward_router_address)
+ if dhcp:
+ cmd = cmd + " DHCP"
+ if distance_metric:
+ cmd = cmd + " {0}".format(distance_metric)
+ if global_route_config:
+ cmd = cmd + " global"
+ if multicast:
+ cmd = cmd + " multicast"
+ if name:
+ cmd = cmd + " name {0}".format(name)
+ if permanent:
+ cmd = cmd + " permanent"
+ elif track:
+ cmd = cmd + " track {0}".format(track)
+ if tag:
+ cmd = cmd + " tag {0}".format(tag)
+
+ return cmd
+
+ def _set_config(
+ self, want, have, addr_want, route_want, route_have, hops, have_set
+ ):
+ """
+ Set the interface config based on the want and have config
+ :rtype: A list
+ :returns: The commands necessary to configure the static routes
+ """
+
+ commands = []
+ cmd = None
+
+ vrf_diff = False
+ topology_diff = False
+ want_vrf = want.get("vrf")
+ have_vrf = have.get("vrf")
+ if want_vrf != have_vrf:
+ vrf_diff = True
+ want_topology = want.get("topology")
+ have_topology = have.get("topology")
+ if want_topology != have_topology:
+ topology_diff = True
+
+ have_dest = route_have.get("dest")
+ if have_dest:
+ have_set.add(tuple(iteritems({"dest": have_dest})))
+
+ # configure set cmd for each hops under the same destination
+ for each in hops:
+ diff = each - have_set
+ if vrf_diff:
+ each.add(tuple(iteritems({"vrf": want_vrf})))
+ if topology_diff:
+ each.add(tuple(iteritems({"topology": want_topology})))
+ if diff or vrf_diff or topology_diff:
+ if want_vrf and not vrf_diff:
+ each.add(tuple(iteritems({"vrf": want_vrf})))
+ if want_topology and not vrf_diff:
+ each.add(tuple(iteritems({"topology": want_topology})))
+ each.add(tuple(iteritems({"afi": addr_want.get("afi")})))
+ each.add(tuple(iteritems({"dest": route_want.get("dest")})))
+ temp_want = {}
+ for each_want in each:
+ temp_want.update(dict(each_want))
+
+ if temp_want.get("afi") == "ipv4":
+ cmd = "ip route "
+ vrf = temp_want.get("vrf")
+ if vrf:
+ cmd = cmd + "vrf {0} ".format(vrf)
+ cmd = self.prepare_config_commands(temp_want, cmd)
+ elif temp_want.get("afi") == "ipv6":
+ cmd = "ipv6 route "
+ cmd = self.prepare_config_commands(temp_want, cmd)
+ commands.append(cmd)
+
+ return commands
+
+ def _clear_config(
+ self, want, have, addr_want, addr_have, route_want, route_have
+ ):
+ """
+ Delete the interface config based on the want and have config
+ :rtype: A list
+ :returns: The commands necessary to configure the static routes
+ """
+
+ commands = []
+ cmd = None
+
+ vrf_diff = False
+ topology_diff = False
+ want_vrf = want.get("vrf")
+ have_vrf = have.get("vrf")
+ if want_vrf != have_vrf:
+ vrf_diff = True
+ want_topology = want.get("topology")
+ have_topology = have.get("topology")
+ if want_topology != have_topology:
+ topology_diff = True
+
+ want_set = set()
+ new_dict_to_set(addr_want, [], want_set, 0)
+
+ have_hops = []
+ for each in route_have.get("next_hops"):
+ temp_have_set = set()
+ new_dict_to_set(each, [], temp_have_set, 0)
+ have_hops.append(temp_have_set)
+
+ # configure delete cmd for each hops under the same destination
+ for each in have_hops:
+ diff = each - want_set
+ if vrf_diff:
+ each.add(tuple(iteritems({"vrf": have_vrf})))
+ if topology_diff:
+ each.add(tuple(iteritems({"topology": want_topology})))
+ if diff or vrf_diff or topology_diff:
+ if want_vrf and not vrf_diff:
+ each.add(tuple(iteritems({"vrf": want_vrf})))
+ if want_topology and not vrf_diff:
+ each.add(tuple(iteritems({"topology": want_topology})))
+ if addr_want:
+ each.add(tuple(iteritems({"afi": addr_want.get("afi")})))
+ else:
+ each.add(tuple(iteritems({"afi": addr_have.get("afi")})))
+ if route_want:
+ each.add(
+ tuple(iteritems({"dest": route_want.get("dest")}))
+ )
+ else:
+ each.add(
+ tuple(iteritems({"dest": route_have.get("dest")}))
+ )
+ temp_want = {}
+ for each_want in each:
+ temp_want.update(dict(each_want))
+
+ if temp_want.get("afi") == "ipv4":
+ cmd = "no ip route "
+ vrf = temp_want.get("vrf")
+ if vrf:
+ cmd = cmd + "vrf {0} ".format(vrf)
+ cmd = self.prepare_config_commands(temp_want, cmd)
+ elif temp_want.get("afi") == "ipv6":
+ cmd = "no ipv6 route "
+ cmd = self.prepare_config_commands(temp_want, cmd)
+ commands.append(cmd)
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/vlans/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/vlans/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/vlans/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/vlans/vlans.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/vlans/vlans.py
new file mode 100644
index 00000000..1e6edec8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/config/vlans/vlans.py
@@ -0,0 +1,337 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_vlans class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ dict_to_set,
+)
+
+
+class Vlans(ConfigBase):
+ """
+ The ios_vlans class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["vlans"]
+
+ def __init__(self, module):
+ super(Vlans, self).__init__(module)
+
+ def get_vlans_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ interfaces_facts = facts["ansible_network_resources"].get("vlans")
+ if not interfaces_facts:
+ return []
+ return interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_vlans_facts = self.get_vlans_facts()
+ else:
+ existing_vlans_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_vlans_facts))
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_vlans_facts = self.get_vlans_facts()
+ elif self.state == "rendered":
+ result["rendered"] = commands
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_vlans_facts(data=running_config)
+ else:
+ changed_vlans_facts = []
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_vlans_facts
+ if result["changed"]:
+ result["after"] = changed_vlans_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_vlans_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_vlans_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ have = existing_vlans_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+
+ if (
+ self.state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ if self.state == "overridden":
+ commands = self._state_overridden(want, have)
+ elif self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state in ("merged", "rendered"):
+ commands = self._state_merged(want, have)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have)
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ check = False
+ for each in want:
+ for every in have:
+ if every["vlan_id"] == each["vlan_id"]:
+ check = True
+ break
+ continue
+ if check:
+ commands.extend(self._set_config(each, every))
+ else:
+ commands.extend(self._set_config(each, dict()))
+
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ want_local = want
+ for each in have:
+ count = 0
+ for every in want_local:
+ if each["vlan_id"] == every["vlan_id"]:
+ break
+ count += 1
+ else:
+ # We didn't find a matching desired state, which means we can
+ # pretend we received an empty desired state.
+ commands.extend(self._clear_config(every, each))
+ continue
+ commands.extend(self._set_config(every, each))
+ # as the pre-existing VLAN are now configured by
+ # above set_config call, deleting the respective
+ # VLAN entry from the want_local list
+ del want_local[count]
+
+ # Iterating through want_local list which now only have new VLANs to be
+ # configured
+ for each in want_local:
+ commands.extend(self._set_config(each, dict()))
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ check = False
+ for each in want:
+ for every in have:
+ if each.get("vlan_id") == every.get("vlan_id"):
+ check = True
+ break
+ continue
+ if check:
+ commands.extend(self._set_config(each, every))
+ else:
+ commands.extend(self._set_config(each, dict()))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ check = False
+ for each in want:
+ for every in have:
+ if each.get("vlan_id") == every.get("vlan_id"):
+ check = True
+ break
+ check = False
+ continue
+ if check:
+ commands.extend(self._clear_config(each, every))
+ else:
+ for each in have:
+ commands.extend(self._clear_config(dict(), each))
+
+ return commands
+
+ def remove_command_from_config_list(self, vlan, cmd, commands):
+ if vlan not in commands and cmd != "vlan":
+ commands.insert(0, vlan)
+ elif cmd == "vlan":
+ commands.append("no %s" % vlan)
+ return commands
+ commands.append("no %s" % cmd)
+ return commands
+
+ def add_command_to_config_list(self, vlan_id, cmd, commands):
+ if vlan_id not in commands:
+ commands.insert(0, vlan_id)
+ if cmd not in commands:
+ commands.append(cmd)
+
+ def _set_config(self, want, have):
+ # Set the interface config based on the want and have config
+ commands = []
+ vlan = "vlan {0}".format(want.get("vlan_id"))
+
+ # Get the diff b/w want n have
+ want_dict = dict_to_set(want)
+ have_dict = dict_to_set(have)
+ diff = want_dict - have_dict
+
+ if diff:
+ name = dict(diff).get("name")
+ state = dict(diff).get("state")
+ shutdown = dict(diff).get("shutdown")
+ mtu = dict(diff).get("mtu")
+ remote_span = dict(diff).get("remote_span")
+ if name:
+ cmd = "name {0}".format(name)
+ self.add_command_to_config_list(vlan, cmd, commands)
+ if state:
+ cmd = "state {0}".format(state)
+ self.add_command_to_config_list(vlan, cmd, commands)
+ if mtu:
+ cmd = "mtu {0}".format(mtu)
+ self.add_command_to_config_list(vlan, cmd, commands)
+ if remote_span:
+ self.add_command_to_config_list(vlan, "remote-span", commands)
+ if shutdown == "enabled":
+ self.add_command_to_config_list(vlan, "shutdown", commands)
+ elif shutdown == "disabled":
+ self.add_command_to_config_list(vlan, "no shutdown", commands)
+
+ return commands
+
+ def _clear_config(self, want, have):
+ # Delete the interface config based on the want and have config
+ commands = []
+ vlan = "vlan {0}".format(have.get("vlan_id"))
+
+ if (
+ have.get("vlan_id")
+ and "default" not in have.get("name")
+ and (
+ have.get("vlan_id") != want.get("vlan_id")
+ or self.state == "deleted"
+ )
+ ):
+ self.remove_command_from_config_list(vlan, "vlan", commands)
+ elif "default" not in have.get("name"):
+ if have.get("mtu") != want.get("mtu"):
+ self.remove_command_from_config_list(vlan, "mtu", commands)
+ if have.get("remote_span") != want.get("remote_span") and want.get(
+ "remote_span"
+ ):
+ self.remove_command_from_config_list(
+ vlan, "remote-span", commands
+ )
+ if have.get("shutdown") != want.get("shutdown") and want.get(
+ "shutdown"
+ ):
+ self.remove_command_from_config_list(
+ vlan, "shutdown", commands
+ )
+ if have.get("state") != want.get("state") and want.get("state"):
+ self.remove_command_from_config_list(vlan, "state", commands)
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acl_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acl_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acl_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acl_interfaces/acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acl_interfaces/acl_interfaces.py
new file mode 100644
index 00000000..03d65e94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acl_interfaces/acl_interfaces.py
@@ -0,0 +1,133 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_acl_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ get_interface_type,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.acl_interfaces.acl_interfaces import (
+ Acl_InterfacesArgs,
+)
+
+
+class Acl_InterfacesFacts(object):
+ """ The ios_acl_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Acl_InterfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_acl_interfaces_data(self, connection):
+ return connection.get(
+ "sh running-config | include interface|ip access-group|ipv6 traffic-filter"
+ )
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+
+ if not data:
+ data = self.get_acl_interfaces_data(connection)
+ # operate on a collection of resource x
+ config = ("\n" + data).split("\ninterface ")
+ for conf in config:
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.append(obj)
+
+ facts = {}
+ if objs:
+ facts["acl_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+
+ for cfg in params["config"]:
+ facts["acl_interfaces"].append(utils.remove_empties(cfg))
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ match = re.search(r"^(\S+)", conf)
+ intf = match.group(1)
+
+ if get_interface_type(intf) == "unknown":
+ return {}
+ config["name"] = intf
+ config["access_groups"] = []
+ acl_v4_config = {}
+ acl_v6_config = {}
+
+ def common_iter_code(cmd, conf):
+ # Common code for IPV4 and IPV6 config parsing
+ acls = []
+ re_cmd = cmd + " (\\S+.*)"
+ ip_all = re.findall(re_cmd, conf)
+ for each in ip_all:
+ acl = {}
+ access_grp_config = each.split(" ")
+ acl["name"] = access_grp_config[0]
+ acl["direction"] = access_grp_config[1]
+ acls.append(acl)
+ return acls
+
+ if "ip" in conf:
+ acls = common_iter_code("ip access-group", conf)
+ acl_v4_config["afi"] = "ipv4"
+ acl_v4_config["acls"] = acls
+ config["access_groups"].append(acl_v4_config)
+ if "ipv6" in conf:
+ acls = common_iter_code("ipv6 traffic-filter", conf)
+ acl_v6_config["afi"] = "ipv6"
+ acl_v6_config["acls"] = acls
+ config["access_groups"].append(acl_v6_config)
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acls/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acls/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acls/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acls/acls.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acls/acls.py
new file mode 100644
index 00000000..7ef73e7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/acls/acls.py
@@ -0,0 +1,127 @@
+# pylint: skip-file
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_acls fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.acls.acls import (
+ AclsArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.rm_templates.acls import (
+ AclsTemplate,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+class AclsFacts(object):
+ """ The ios_acls fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+
+ self._module = module
+ self.argument_spec = AclsArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_acl_data(self, connection):
+ # Get the access-lists from the ios router
+ return connection.get("sh access-list")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for acls
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+
+ if not data:
+ data = self.get_acl_data(connection)
+
+ rmmod = NetworkTemplate(lines=data.splitlines(), tmplt=AclsTemplate())
+ current = rmmod.parse()
+
+ temp_v4 = []
+ temp_v6 = []
+ if current.get("acls"):
+ for k, v in iteritems(current.get("acls")):
+ if v.get("afi") == "ipv4":
+ del v["afi"]
+ temp_v4.append(v)
+ elif v.get("afi") == "ipv6":
+ del v["afi"]
+ temp_v6.append(v)
+ temp_v4 = sorted(temp_v4, key=lambda i: str(i["name"]))
+ temp_v6 = sorted(temp_v6, key=lambda i: str(i["name"]))
+ for each in temp_v4:
+ for each_ace in each.get("aces"):
+ if each["acl_type"] == "standard":
+ each_ace["source"] = each_ace.pop("std_source")
+ if each_ace.get("icmp_igmp_tcp_protocol"):
+ each_ace["protocol_options"] = {
+ each_ace["protocol"]: {
+ each_ace.pop("icmp_igmp_tcp_protocol").replace(
+ "-", "_"
+ ): True
+ }
+ }
+ if each_ace.get("std_source") == {}:
+ del each_ace["std_source"]
+ for each in temp_v6:
+ for each_ace in each.get("aces"):
+ if each_ace.get("std_source") == {}:
+ del each_ace["std_source"]
+ if each_ace.get("icmp_igmp_tcp_protocol"):
+ each_ace["protocol_options"] = {
+ each_ace["protocol"]: {
+ each_ace.pop("icmp_igmp_tcp_protocol").replace(
+ "-", "_"
+ ): True
+ }
+ }
+
+ objs = []
+ if temp_v4:
+ objs.append({"afi": "ipv4", "acls": temp_v4})
+ if temp_v6:
+ objs.append({"afi": "ipv6", "acls": temp_v6})
+ # objs['ipv6'] = {'acls': temp_v6}
+ facts = {}
+ if objs:
+ facts["acls"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["acls"].append(utils.remove_empties(cfg))
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/bgp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/bgp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/bgp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/bgp_global/bgp_global.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/bgp_global/bgp_global.py
new file mode 100644
index 00000000..d10002c6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/bgp_global/bgp_global.py
@@ -0,0 +1,97 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The cisco.ios bgp_global fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.rm_templates.bgp_global import (
+ Bgp_globalTemplate,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.bgp_global.bgp_global import (
+ Bgp_globalArgs,
+)
+
+
+class Bgp_globalFacts(object):
+ """ The cisco.ios bgp_global facts class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Bgp_globalArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_bgp_global_data(self, connection):
+ return connection.get("sh running-config | section ^router bgp")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for Bgp_global network resource
+
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+
+ :rtype: dictionary
+ :returns: facts
+ """
+ facts = {}
+
+ if not data:
+ data = self.get_bgp_global_data(connection)
+
+ # parse native config using the Bgp_global template
+ bgp_global_parser = Bgp_globalTemplate(lines=data.splitlines())
+ objs = bgp_global_parser.parse()
+
+ objs = utils.remove_empties(objs)
+ if "neighbor" in objs:
+ temp_neighbor = []
+ temp = {}
+ temp["address"] = None
+ for each in objs["neighbor"]:
+ if temp["address"] != each["address"]:
+ if temp["address"]:
+ temp_neighbor.append(temp)
+ temp = {}
+ temp["address"] = each.pop("address")
+ if each:
+ temp.update(each)
+ else:
+ each.pop("address")
+ temp.update(each)
+ if temp:
+ temp_neighbor.append(temp)
+ objs["neighbor"] = temp_neighbor
+ if objs:
+ ansible_facts["ansible_network_resources"].pop("bgp_global", None)
+
+ params = utils.remove_empties(
+ utils.validate_config(self.argument_spec, {"config": objs})
+ )
+ facts["bgp_global"] = params["config"]
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/facts.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/facts.py
new file mode 100644
index 00000000..91c00404
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/facts.py
@@ -0,0 +1,130 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The facts class for ios
+this file validates each subset of facts and selectively
+calls the appropriate facts gathering function
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts import (
+ FactsBase,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.interfaces.interfaces import (
+ InterfacesFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.l2_interfaces.l2_interfaces import (
+ L2_InterfacesFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.vlans.vlans import (
+ VlansFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.lag_interfaces.lag_interfaces import (
+ Lag_interfacesFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.lacp.lacp import (
+ LacpFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.lacp_interfaces.lacp_interfaces import (
+ Lacp_InterfacesFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.lldp_global.lldp_global import (
+ Lldp_globalFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.lldp_interfaces.lldp_interfaces import (
+ Lldp_InterfacesFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.l3_interfaces.l3_interfaces import (
+ L3_InterfacesFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.acl_interfaces.acl_interfaces import (
+ Acl_InterfacesFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.static_routes.static_routes import (
+ Static_RoutesFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.acls.acls import (
+ AclsFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.ospfv2.ospfv2 import (
+ Ospfv2Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.ospfv3.ospfv3 import (
+ Ospfv3Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.ospf_interfaces.ospf_interfaces import (
+ Ospf_InterfacesFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.bgp_global.bgp_global import (
+ Bgp_globalFacts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.legacy.base import (
+ Default,
+ Hardware,
+ Interfaces,
+ Config,
+)
+
+
+FACT_LEGACY_SUBSETS = dict(
+ default=Default, hardware=Hardware, interfaces=Interfaces, config=Config
+)
+
+FACT_RESOURCE_SUBSETS = dict(
+ interfaces=InterfacesFacts,
+ l2_interfaces=L2_InterfacesFacts,
+ vlans=VlansFacts,
+ lag_interfaces=Lag_interfacesFacts,
+ lacp=LacpFacts,
+ lacp_interfaces=Lacp_InterfacesFacts,
+ lldp_global=Lldp_globalFacts,
+ lldp_interfaces=Lldp_InterfacesFacts,
+ l3_interfaces=L3_InterfacesFacts,
+ acl_interfaces=Acl_InterfacesFacts,
+ static_routes=Static_RoutesFacts,
+ acls=AclsFacts,
+ ospfv2=Ospfv2Facts,
+ ospfv3=Ospfv3Facts,
+ ospf_interfaces=Ospf_InterfacesFacts,
+ bgp_global=Bgp_globalFacts,
+)
+
+
+class Facts(FactsBase):
+ """ The fact class for ios
+ """
+
+ VALID_LEGACY_GATHER_SUBSETS = frozenset(FACT_LEGACY_SUBSETS.keys())
+ VALID_RESOURCE_SUBSETS = frozenset(FACT_RESOURCE_SUBSETS.keys())
+
+ def __init__(self, module):
+ super(Facts, self).__init__(module)
+
+ def get_facts(
+ self, legacy_facts_type=None, resource_facts_type=None, data=None
+ ):
+ """ Collect the facts for ios
+ :param legacy_facts_type: List of legacy facts types
+ :param resource_facts_type: List of resource fact types
+ :param data: previously collected conf
+ :rtype: dict
+ :return: the facts gathered
+ """
+ if self.VALID_RESOURCE_SUBSETS:
+ self.get_network_resources_facts(
+ FACT_RESOURCE_SUBSETS, resource_facts_type, data
+ )
+
+ if self.VALID_LEGACY_GATHER_SUBSETS:
+ self.get_network_legacy_facts(
+ FACT_LEGACY_SUBSETS, legacy_facts_type
+ )
+
+ return self.ansible_facts, self._warnings
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/interfaces/interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/interfaces/interfaces.py
new file mode 100644
index 00000000..098b3707
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/interfaces/interfaces.py
@@ -0,0 +1,110 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ get_interface_type,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.interfaces.interfaces import (
+ InterfacesArgs,
+)
+
+
+class InterfacesFacts(object):
+ """ The ios interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = InterfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_interfaces_data(self, connection):
+ return connection.get("sh running-config | section ^interface")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+
+ if not data:
+ data = self.get_interfaces_data(connection)
+ # operate on a collection of resource x
+ config = ("\n" + data).split("\ninterface ")
+ for conf in config:
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.append(obj)
+ facts = {}
+
+ if objs:
+ facts["interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["interfaces"].append(utils.remove_empties(cfg))
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ match = re.search(r"^(\S+)", conf)
+ intf = match.group(1)
+
+ if get_interface_type(intf) == "unknown":
+ return {}
+ # populate the facts from the configuration
+ config["name"] = normalize_interface(intf)
+ config["description"] = utils.parse_conf_arg(conf, "description")
+ config["speed"] = utils.parse_conf_arg(conf, "speed")
+ if utils.parse_conf_arg(conf, "mtu"):
+ config["mtu"] = int(utils.parse_conf_arg(conf, "mtu"))
+ config["duplex"] = utils.parse_conf_arg(conf, "duplex")
+ enabled = utils.parse_conf_cmd_arg(conf, "shutdown", False)
+ config["enabled"] = enabled if enabled is not None else True
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l2_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l2_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l2_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l2_interfaces/l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l2_interfaces/l2_interfaces.py
new file mode 100644
index 00000000..a507b2d1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l2_interfaces/l2_interfaces.py
@@ -0,0 +1,138 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from copy import deepcopy
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ get_interface_type,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.l2_interfaces.l2_interfaces import (
+ L2_InterfacesArgs,
+)
+
+
+class L2_InterfacesFacts(object):
+ """ The ios l2 interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = L2_InterfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_l2_interfaces_data(self, connection):
+ return connection.get("show running-config | section ^interface")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+ if not data:
+ data = self.get_l2_interfaces_data(connection)
+
+ # operate on a collection of resource x
+ config = ("\n" + data).split("\ninterface ")
+ for conf in config:
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.append(obj)
+
+ facts = {}
+ if objs:
+ facts["l2_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["l2_interfaces"].append(utils.remove_empties(cfg))
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys from spec for null values
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ match = re.search(r"^(\S+)", conf)
+ intf = match.group(1)
+
+ if get_interface_type(intf) == "unknown":
+ return {}
+
+ if intf.upper()[:2] in (
+ "HU",
+ "FO",
+ "TW",
+ "TE",
+ "GI",
+ "FA",
+ "ET",
+ "PO",
+ ):
+ # populate the facts from the configuration
+ config["name"] = normalize_interface(intf)
+ has_mode = utils.parse_conf_arg(conf, "switchport mode")
+ if has_mode:
+ config["mode"] = has_mode
+ has_access = utils.parse_conf_arg(conf, "switchport access vlan")
+ if has_access:
+ config["access"] = {"vlan": int(has_access)}
+
+ has_voice = utils.parse_conf_arg(conf, "switchport voice vlan")
+ if has_voice:
+ config["voice"] = {"vlan": int(has_voice)}
+
+ trunk = dict()
+ trunk["encapsulation"] = utils.parse_conf_arg(
+ conf, "switchport trunk encapsulation"
+ )
+ native_vlan = utils.parse_conf_arg(conf, "native vlan")
+ if native_vlan:
+ trunk["native_vlan"] = int(native_vlan)
+ allowed_vlan = utils.parse_conf_arg(conf, "allowed vlan")
+ if allowed_vlan:
+ trunk["allowed_vlans"] = allowed_vlan.split(",")
+ pruning_vlan = utils.parse_conf_arg(conf, "pruning vlan")
+ if pruning_vlan:
+ trunk["pruning_vlans"] = pruning_vlan.split(",")
+
+ config["trunk"] = trunk
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l3_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l3_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l3_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l3_interfaces/l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l3_interfaces/l3_interfaces.py
new file mode 100644
index 00000000..8a709765
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/l3_interfaces/l3_interfaces.py
@@ -0,0 +1,148 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_l3_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ get_interface_type,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.l3_interfaces.l3_interfaces import (
+ L3_InterfacesArgs,
+)
+
+
+class L3_InterfacesFacts(object):
+ """ The ios l3 interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = L3_InterfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for l3 interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+
+ if not data:
+ data = connection.get("show running-config | section ^interface")
+ # operate on a collection of resource x
+ config = ("\n" + data).split("\ninterface ")
+ for conf in config:
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.append(obj)
+ facts = {}
+
+ if objs:
+ facts["l3_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["l3_interfaces"].append(utils.remove_empties(cfg))
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys from spec for null values
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ match = re.search(r"^(\S+)", conf)
+ intf = match.group(1)
+
+ if get_interface_type(intf) == "unknown":
+ return {}
+ # populate the facts from the configuration
+ config["name"] = normalize_interface(intf)
+
+ ipv4 = []
+ ipv4_all = re.findall(r"ip address (\S+.*)", conf)
+ for each in ipv4_all:
+ each_ipv4 = dict()
+ if "secondary" not in each and "dhcp" not in each:
+ each_ipv4["address"] = each
+ elif "secondary" in each:
+ each_ipv4["address"] = each.split(" secondary")[0]
+ each_ipv4["secondary"] = True
+ elif "dhcp" in each:
+ each_ipv4["address"] = "dhcp"
+ if "client-id" in each:
+ try:
+ each_ipv4["dhcp_client"] = int(
+ each.split(" hostname ")[0].split("/")[-1]
+ )
+ except ValueError:
+ obj = re.search("\\d+", each)
+ if obj:
+ dhcp_client = obj.group()
+ each_ipv4["dhcp_client"] = int(dhcp_client)
+ if "hostname" in each:
+ each_ipv4["dhcp_hostname"] = each.split(" hostname ")[-1]
+ if "client-id" in each and each_ipv4["dhcp_client"] is None:
+ try:
+ each_ipv4["dhcp_client"] = int(each.split("/")[-1])
+ except ValueError:
+ obj = re.search("\\d+", each)
+ if obj:
+ dhcp_client = obj.group()
+ each_ipv4["dhcp_client"] = int(dhcp_client)
+ if "hostname" in each and not each_ipv4["dhcp_hostname"]:
+ each_ipv4["dhcp_hostname"] = each.split(" hostname ")[-1]
+ ipv4.append(each_ipv4)
+ config["ipv4"] = ipv4
+
+ # Get the configured IPV6 details
+ ipv6 = []
+ ipv6_all = re.findall(r"ipv6 address (\S+)", conf)
+ for each in ipv6_all:
+ each_ipv6 = dict()
+ if "autoconfig" in each:
+ each_ipv6["autoconfig"] = True
+ if "dhcp" in each:
+ each_ipv6["dhcp"] = True
+ each_ipv6["address"] = each.lower()
+ ipv6.append(each_ipv6)
+ config["ipv6"] = ipv6
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp/lacp.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp/lacp.py
new file mode 100644
index 00000000..d67bd1bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp/lacp.py
@@ -0,0 +1,88 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios lacp fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.lacp.lacp import (
+ LacpArgs,
+)
+
+
+class LacpFacts(object):
+ """ The ios lacp fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = LacpArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lacp
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if connection:
+ pass
+
+ if not data:
+ data = connection.get("show lacp sys-id")
+
+ obj = {}
+ if data:
+ lacp_obj = self.render_config(self.generated_spec, data)
+ if lacp_obj:
+ obj = lacp_obj
+
+ ansible_facts["ansible_network_resources"].pop("lacp", None)
+ facts = {}
+
+ params = utils.validate_config(self.argument_spec, {"config": obj})
+ facts["lacp"] = utils.remove_empties(params["config"])
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ config["system"]["priority"] = int(conf.split(",")[0])
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp_interfaces/lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp_interfaces/lacp_interfaces.py
new file mode 100644
index 00000000..a1e4d6c4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lacp_interfaces/lacp_interfaces.py
@@ -0,0 +1,112 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_lacp_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import re
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ get_interface_type,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.lacp_interfaces.lacp_interfaces import (
+ Lacp_InterfacesArgs,
+)
+
+
+class Lacp_InterfacesFacts(object):
+ """ The ios_lacp_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+
+ self._module = module
+ self.argument_spec = Lacp_InterfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lacp_interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if connection:
+ pass
+
+ objs = []
+ if not data:
+ data = connection.get("show running-config | section ^interface")
+ # operate on a collection of resource x
+ config = ("\n" + data).split("\ninterface ")
+
+ for conf in config:
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.append(obj)
+ facts = {}
+
+ if objs:
+ facts["lacp_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["lacp_interfaces"].append(utils.remove_empties(cfg))
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ match = re.search(r"^(\S+)", conf)
+ intf = match.group(1)
+ if get_interface_type(intf) == "unknown":
+ return {}
+
+ config["name"] = normalize_interface(intf)
+ port_priority = utils.parse_conf_arg(conf, "lacp port-priority")
+ max_bundle = utils.parse_conf_arg(conf, "lacp max-bundle")
+ if port_priority:
+ config["port_priority"] = int(port_priority)
+ if "lacp fast-switchover" in conf:
+ config["fast_switchover"] = True
+ if max_bundle:
+ config["max_bundle"] = int(max_bundle)
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lag_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lag_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lag_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lag_interfaces/lag_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lag_interfaces/lag_interfaces.py
new file mode 100644
index 00000000..364d4e61
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lag_interfaces/lag_interfaces.py
@@ -0,0 +1,128 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios lag_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ get_interface_type,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.lag_interfaces.lag_interfaces import (
+ Lag_interfacesArgs,
+)
+
+
+class Lag_interfacesFacts(object):
+ """ The ios_lag_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Lag_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+
+ if not data:
+ data = connection.get("show running-config | section ^interface")
+ # operate on a collection of resource x
+ config = ("\n" + data).split("\ninterface ")
+ for conf in config:
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ if not obj.get("members"):
+ obj.update({"members": []})
+ objs.append(obj)
+
+ # for appending members configured with same channel-group
+ for each in range(len(objs)):
+ if each < (len(objs) - 1):
+ if objs[each]["name"] == objs[each + 1]["name"]:
+ objs[each]["members"].append(objs[each + 1]["members"][0])
+ del objs[each + 1]
+ facts = {}
+
+ if objs:
+ facts["lag_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+
+ for cfg in params["config"]:
+ facts["lag_interfaces"].append(utils.remove_empties(cfg))
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ match = re.search(r"^(\S+)", conf)
+ intf = match.group(1)
+
+ if get_interface_type(intf) == "unknown":
+ return {}
+ member_config = {}
+ channel_group = utils.parse_conf_arg(conf, "channel-group")
+ if intf.startswith("Gi"):
+ config["name"] = intf
+ config["members"] = []
+ if channel_group:
+ channel_group = channel_group.split(" ")
+ id = channel_group[0]
+ config["name"] = "Port-channel{0}".format(str(id))
+ if "mode" in channel_group:
+ mode = channel_group[2]
+ member_config.update({"mode": mode})
+ if "link" in channel_group:
+ link = channel_group[2]
+ member_config.update({"link": link})
+ if member_config.get("mode") or member_config.get("link"):
+ member_config["member"] = normalize_interface(intf)
+ config["members"].append(member_config)
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/legacy/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/legacy/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/legacy/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/legacy/base.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/legacy/base.py
new file mode 100644
index 00000000..520a402f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/legacy/base.py
@@ -0,0 +1,423 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+"""
+The ios legacy fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import platform
+import re
+
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ run_commands,
+ get_capabilities,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ normalize_interface,
+)
+from ansible.module_utils.six import iteritems
+from ansible.module_utils.six.moves import zip
+
+
+class FactsBase(object):
+
+ COMMANDS = list()
+
+ def __init__(self, module):
+ self.module = module
+ self.facts = dict()
+ self.warnings = list()
+ self.responses = None
+
+ def populate(self):
+ self.responses = run_commands(
+ self.module, commands=self.COMMANDS, check_rc=False
+ )
+
+ def run(self, cmd):
+ return run_commands(self.module, commands=cmd, check_rc=False)
+
+
+class Default(FactsBase):
+
+ COMMANDS = ["show version", "show virtual switch"]
+
+ def populate(self):
+ super(Default, self).populate()
+ self.facts.update(self.platform_facts())
+ data = self.responses[0]
+ if data:
+ self.facts["iostype"] = self.parse_iostype(data)
+ self.facts["serialnum"] = self.parse_serialnum(data)
+ self.parse_stacks(data)
+ data = self.responses[1]
+ vss_errs = ["Invalid input", "Switch Mode : Standalone"]
+ if data and not any(err in data for err in vss_errs):
+ self.parse_virtual_switch(data)
+
+ def parse_iostype(self, data):
+ match = re.search(r"\sIOS-XE\s", data)
+ if match:
+ return "IOS-XE"
+ else:
+ return "IOS"
+
+ def parse_serialnum(self, data):
+ match = re.search(r"board ID (\S+)", data)
+ if match:
+ return match.group(1)
+
+ def parse_stacks(self, data):
+ match = re.findall(r"^Model [Nn]umber\s+: (\S+)", data, re.M)
+ if match:
+ self.facts["stacked_models"] = match
+
+ match = re.findall(
+ r"^System [Ss]erial [Nn]umber\s+: (\S+)", data, re.M
+ )
+ if match:
+ self.facts["stacked_serialnums"] = match
+
+ if "stacked_models" in self.facts:
+ self.facts["virtual_switch"] = "STACK"
+
+ def parse_virtual_switch(self, data):
+ match = re.search(
+ r"^Virtual switch domain number : ([0-9]+)", data, re.M
+ )
+ if match:
+ self.facts["virtual_switch"] = "VSS"
+ self.facts["virtual_switch_domain"] = match.group(1)
+
+ def platform_facts(self):
+ platform_facts = {}
+
+ resp = get_capabilities(self.module)
+ device_info = resp["device_info"]
+
+ platform_facts["system"] = device_info["network_os"]
+
+ for item in ("model", "image", "version", "platform", "hostname"):
+ val = device_info.get("network_os_%s" % item)
+ if val:
+ platform_facts[item] = val
+
+ platform_facts["api"] = resp["network_api"]
+ platform_facts["python_version"] = platform.python_version()
+
+ return platform_facts
+
+
+class Hardware(FactsBase):
+
+ COMMANDS = ["dir", "show memory statistics"]
+
+ def populate(self):
+ warnings = list()
+ super(Hardware, self).populate()
+ data = self.responses[0]
+ if data:
+ self.facts["filesystems"] = self.parse_filesystems(data)
+ self.facts["filesystems_info"] = self.parse_filesystems_info(data)
+
+ data = self.responses[1]
+ if data:
+ if "Invalid input detected" in data:
+ warnings.append("Unable to gather memory statistics")
+ else:
+ processor_line = [
+ l for l in data.splitlines() if "Processor" in l
+ ].pop()
+ match = re.findall(r"\s(\d+)\s", processor_line)
+ if match:
+ self.facts["memtotal_mb"] = int(match[0]) / 1024
+ self.facts["memfree_mb"] = int(match[3]) / 1024
+
+ def parse_filesystems(self, data):
+ return re.findall(r"^Directory of (\S+)/", data, re.M)
+
+ def parse_filesystems_info(self, data):
+ facts = dict()
+ fs = ""
+ for line in data.split("\n"):
+ match = re.match(r"^Directory of (\S+)/", line)
+ if match:
+ fs = match.group(1)
+ facts[fs] = dict()
+ continue
+ match = re.match(r"^(\d+) bytes total \((\d+) bytes free\)", line)
+ if match:
+ facts[fs]["spacetotal_kb"] = int(match.group(1)) / 1024
+ facts[fs]["spacefree_kb"] = int(match.group(2)) / 1024
+ return facts
+
+
+class Config(FactsBase):
+
+ COMMANDS = ["show running-config"]
+
+ def populate(self):
+ super(Config, self).populate()
+ data = self.responses[0]
+ if data:
+ data = re.sub(
+ r"^Building configuration...\s+Current configuration : \d+ bytes\n",
+ "",
+ data,
+ flags=re.MULTILINE,
+ )
+ self.facts["config"] = data
+
+
+class Interfaces(FactsBase):
+
+ COMMANDS = [
+ "show interfaces",
+ "show ip interface",
+ "show ipv6 interface",
+ "show lldp",
+ "show cdp",
+ ]
+
+ def populate(self):
+ super(Interfaces, self).populate()
+
+ self.facts["all_ipv4_addresses"] = list()
+ self.facts["all_ipv6_addresses"] = list()
+ self.facts["neighbors"] = {}
+
+ data = self.responses[0]
+ if data:
+ interfaces = self.parse_interfaces(data)
+ self.facts["interfaces"] = self.populate_interfaces(interfaces)
+
+ data = self.responses[1]
+ if data:
+ data = self.parse_interfaces(data)
+ self.populate_ipv4_interfaces(data)
+
+ data = self.responses[2]
+ if data:
+ data = self.parse_interfaces(data)
+ self.populate_ipv6_interfaces(data)
+
+ data = self.responses[3]
+ lldp_errs = ["Invalid input", "LLDP is not enabled"]
+
+ if data and not any(err in data for err in lldp_errs):
+ neighbors = self.run(["show lldp neighbors detail"])
+ if neighbors:
+ self.facts["neighbors"].update(
+ self.parse_neighbors(neighbors[0])
+ )
+
+ data = self.responses[4]
+ cdp_errs = ["CDP is not enabled"]
+
+ if data and not any(err in data for err in cdp_errs):
+ cdp_neighbors = self.run(["show cdp neighbors detail"])
+ if cdp_neighbors:
+ self.facts["neighbors"].update(
+ self.parse_cdp_neighbors(cdp_neighbors[0])
+ )
+
+ def populate_interfaces(self, interfaces):
+ facts = dict()
+ for key, value in iteritems(interfaces):
+ intf = dict()
+ intf["description"] = self.parse_description(value)
+ intf["macaddress"] = self.parse_macaddress(value)
+
+ intf["mtu"] = self.parse_mtu(value)
+ intf["bandwidth"] = self.parse_bandwidth(value)
+ intf["mediatype"] = self.parse_mediatype(value)
+ intf["duplex"] = self.parse_duplex(value)
+ intf["lineprotocol"] = self.parse_lineprotocol(value)
+ intf["operstatus"] = self.parse_operstatus(value)
+ intf["type"] = self.parse_type(value)
+
+ facts[key] = intf
+ return facts
+
+ def populate_ipv4_interfaces(self, data):
+ for key, value in data.items():
+ self.facts["interfaces"][key]["ipv4"] = list()
+ primary_address = addresses = []
+ primary_address = re.findall(
+ r"Internet address is (.+)$", value, re.M
+ )
+ addresses = re.findall(r"Secondary address (.+)$", value, re.M)
+ if len(primary_address) == 0:
+ continue
+ addresses.append(primary_address[0])
+ for address in addresses:
+ addr, subnet = address.split("/")
+ ipv4 = dict(address=addr.strip(), subnet=subnet.strip())
+ self.add_ip_address(addr.strip(), "ipv4")
+ self.facts["interfaces"][key]["ipv4"].append(ipv4)
+
+ def populate_ipv6_interfaces(self, data):
+ for key, value in iteritems(data):
+ try:
+ self.facts["interfaces"][key]["ipv6"] = list()
+ except KeyError:
+ self.facts["interfaces"][key] = dict()
+ self.facts["interfaces"][key]["ipv6"] = list()
+ addresses = re.findall(r"\s+(.+), subnet", value, re.M)
+ subnets = re.findall(r", subnet is (.+)$", value, re.M)
+ for addr, subnet in zip(addresses, subnets):
+ ipv6 = dict(address=addr.strip(), subnet=subnet.strip())
+ self.add_ip_address(addr.strip(), "ipv6")
+ self.facts["interfaces"][key]["ipv6"].append(ipv6)
+
+ def add_ip_address(self, address, family):
+ if family == "ipv4":
+ self.facts["all_ipv4_addresses"].append(address)
+ else:
+ self.facts["all_ipv6_addresses"].append(address)
+
+ def parse_neighbors(self, neighbors):
+ facts = dict()
+ for entry in neighbors.split(
+ "------------------------------------------------"
+ ):
+ if entry == "":
+ continue
+ intf = self.parse_lldp_intf(entry)
+ if intf is None:
+ return facts
+ intf = normalize_interface(intf)
+ if intf not in facts:
+ facts[intf] = list()
+ fact = dict()
+ fact["host"] = self.parse_lldp_host(entry)
+ fact["port"] = self.parse_lldp_port(entry)
+ facts[intf].append(fact)
+ return facts
+
+ def parse_cdp_neighbors(self, neighbors):
+ facts = dict()
+ for entry in neighbors.split("-------------------------"):
+ if entry == "":
+ continue
+ intf_port = self.parse_cdp_intf_port(entry)
+ if intf_port is None:
+ return facts
+ intf, port = intf_port
+ if intf not in facts:
+ facts[intf] = list()
+ fact = dict()
+ fact["host"] = self.parse_cdp_host(entry)
+ fact["platform"] = self.parse_cdp_platform(entry)
+ fact["port"] = port
+ facts[intf].append(fact)
+ return facts
+
+ def parse_interfaces(self, data):
+ parsed = dict()
+ key = ""
+ for line in data.split("\n"):
+ if len(line) == 0:
+ continue
+ if line[0] == " ":
+ parsed[key] += "\n%s" % line
+ else:
+ match = re.match(r"^(\S+)", line)
+ if match:
+ key = match.group(1)
+ parsed[key] = line
+ return parsed
+
+ def parse_description(self, data):
+ match = re.search(r"Description: (.+)$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_macaddress(self, data):
+ match = re.search(r"Hardware is (?:.*), address is (\S+)", data)
+ if match:
+ return match.group(1)
+
+ def parse_ipv4(self, data):
+ match = re.search(r"Internet address is (\S+)", data)
+ if match:
+ addr, masklen = match.group(1).split("/")
+ return dict(address=addr, masklen=int(masklen))
+
+ def parse_mtu(self, data):
+ match = re.search(r"MTU (\d+)", data)
+ if match:
+ return int(match.group(1))
+
+ def parse_bandwidth(self, data):
+ match = re.search(r"BW (\d+)", data)
+ if match:
+ return int(match.group(1))
+
+ def parse_duplex(self, data):
+ match = re.search(r"(\w+) Duplex", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_mediatype(self, data):
+ match = re.search(r"media type is (.+)$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_type(self, data):
+ match = re.search(r"Hardware is (.+),", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_lineprotocol(self, data):
+ match = re.search(r"line protocol is (\S+)\s*$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_operstatus(self, data):
+ match = re.search(r"^(?:.+) is (.+),", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_lldp_intf(self, data):
+ match = re.search(r"^Local Intf: (.+)$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_lldp_host(self, data):
+ match = re.search(r"System Name: (.+)$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_lldp_port(self, data):
+ match = re.search(r"Port id: (.+)$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_cdp_intf_port(self, data):
+ match = re.search(
+ r"^Interface: (.+), Port ID \(outgoing port\): (.+)$", data, re.M
+ )
+ if match:
+ return match.group(1), match.group(2)
+
+ def parse_cdp_host(self, data):
+ match = re.search(r"^Device ID: (.+)$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_cdp_platform(self, data):
+ match = re.search(r"^Platform: (.+),", data, re.M)
+ if match:
+ return match.group(1)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_global/lldp_global.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_global/lldp_global.py
new file mode 100644
index 00000000..4c8ff3c1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_global/lldp_global.py
@@ -0,0 +1,100 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios lldp_global fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.lldp_global.lldp_global import (
+ Lldp_globalArgs,
+)
+
+
+class Lldp_globalFacts(object):
+ """ The ios lldp_global fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Lldp_globalArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_lldp_global_data(self, connection):
+ return connection.get("show running-config | section ^lldp")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lldp_global
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = dict()
+ if not data:
+ data = self.get_lldp_global_data(connection)
+ # operate on a collection of resource x
+ config = data.split("\n")
+ for conf in config:
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.update(obj)
+ facts = {}
+
+ if objs:
+ params = utils.validate_config(
+ self.argument_spec, {"config": utils.remove_empties(objs)}
+ )
+ facts["lldp_global"] = utils.remove_empties(params["config"])
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ holdtime = utils.parse_conf_arg(conf, "lldp holdtime")
+ timer = utils.parse_conf_arg(conf, "lldp timer")
+ reinit = utils.parse_conf_arg(conf, "lldp reinit")
+ if holdtime:
+ config["holdtime"] = int(holdtime)
+ if "lldp run" in conf:
+ config["enabled"] = True
+ if timer:
+ config["timer"] = int(timer)
+ if reinit:
+ config["reinit"] = int(reinit)
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_interfaces/lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_interfaces/lldp_interfaces.py
new file mode 100644
index 00000000..11a67238
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/lldp_interfaces/lldp_interfaces.py
@@ -0,0 +1,115 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_lldp_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import re
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ get_interface_type,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.lldp_interfaces.lldp_interfaces import (
+ Lldp_InterfacesArgs,
+)
+
+
+class Lldp_InterfacesFacts(object):
+ """ The ios_lldp_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+
+ self._module = module
+ self.argument_spec = Lldp_InterfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lldp_interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+
+ objs = []
+ if not data:
+ data = connection.get("show lldp interface")
+ # operate on a collection of resource x
+ config = data.split("\n\n")
+ for conf in config:
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.append(obj)
+ facts = {}
+
+ if objs:
+ facts["lldp_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["lldp_interfaces"].append(utils.remove_empties(cfg))
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ match = re.search(r"^(\S+)(:)", conf)
+ intf = ""
+ if match:
+ intf = match.group(1)
+
+ if get_interface_type(intf) == "unknown":
+ return {}
+ if intf.lower().startswith("gi"):
+ config["name"] = normalize_interface(intf)
+ receive = utils.parse_conf_arg(conf, "Rx:")
+ transmit = utils.parse_conf_arg(conf, "Tx:")
+
+ if receive == "enabled":
+ config["receive"] = True
+ elif receive == "disabled":
+ config["receive"] = False
+ if transmit == "enabled":
+ config["transmit"] = True
+ elif transmit == "disabled":
+ config["transmit"] = False
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospf_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospf_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospf_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospf_interfaces/ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospf_interfaces/ospf_interfaces.py
new file mode 100644
index 00000000..dcf96605
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospf_interfaces/ospf_interfaces.py
@@ -0,0 +1,95 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The cisco.ios ospf_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from copy import deepcopy
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.rm_templates.ospf_interfaces import (
+ Ospf_InterfacesTemplate,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.ospf_interfaces.ospf_interfaces import (
+ Ospf_InterfacesArgs,
+)
+
+
+class Ospf_InterfacesFacts(object):
+ """ The cisco.ios ospf_interfaces facts class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Ospf_InterfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_ospf_interfaces_data(self, connection):
+ return connection.get("sh running-config | section ^interface")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for Ospf_interfaces network resource
+
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+
+ :rtype: dictionary
+ :returns: facts
+ """
+ facts = {}
+ objs = []
+
+ if not data:
+ data = self.get_ospf_interfaces_data(connection)
+
+ # parse native config using the Ospf_interfaces template
+ ospf_interfaces_parser = Ospf_InterfacesTemplate(
+ lines=data.splitlines()
+ )
+
+ objs = ospf_interfaces_parser.parse()
+ final_objs = []
+ for key, value in iteritems(objs):
+ temp_af = []
+ if value["address_family"].get("ip"):
+ temp_af.append(value["address_family"].get("ip"))
+ if value["address_family"].get("ipv6"):
+ temp_af.append(value["address_family"].get("ipv6"))
+ if temp_af:
+ value["address_family"] = temp_af
+ if value:
+ value = utils.remove_empties(value)
+ final_objs.append(value)
+ ansible_facts["ansible_network_resources"].pop("ospf_interfaces", None)
+
+ params = utils.remove_empties(
+ utils.validate_config(self.argument_spec, {"config": final_objs})
+ )
+
+ facts["ospf_interfaces"] = params["config"]
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv2/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv2/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv2/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv2/ospfv2.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv2/ospfv2.py
new file mode 100644
index 00000000..7c67e3b7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv2/ospfv2.py
@@ -0,0 +1,99 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios ospfv2 fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.ospfv2.ospfv2 import (
+ Ospfv2Args,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.rm_templates.ospfv2 import (
+ Ospfv2Template,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+class Ospfv2Facts(object):
+ """ The ios ospfv2 fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Ospfv2Args.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_ospfv2_data(self, connection):
+ return connection.get("sh running-config | section ^router ospf")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for ospfv2
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = self.get_ospfv2_data(connection)
+
+ ipv4 = {"processes": []}
+ rmmod = NetworkTemplate(
+ lines=data.splitlines(), tmplt=Ospfv2Template()
+ )
+ current = rmmod.parse()
+
+ # convert some of the dicts to lists
+ for key, sortv in [("processes", "process_id")]:
+ if key in current and current[key]:
+ current[key] = current[key].values()
+ current[key] = sorted(
+ current[key], key=lambda k, sk=sortv: k[sk]
+ )
+
+ for process in current.get("processes", []):
+ if "areas" in process:
+ process["areas"] = list(process["areas"].values())
+ process["areas"] = sorted(
+ process["areas"], key=lambda k, sk="area_id": k[sk]
+ )
+ for area in process["areas"]:
+ if "filters" in area:
+ area["filters"].sort()
+ ipv4["processes"].append(process)
+
+ ansible_facts["ansible_network_resources"].pop("ospfv2", None)
+ facts = {}
+ if current:
+ params = utils.validate_config(
+ self.argument_spec, {"config": ipv4}
+ )
+ params = utils.remove_empties(params)
+
+ facts["ospfv2"] = params["config"]
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv3/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv3/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv3/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv3/ospfv3.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv3/ospfv3.py
new file mode 100644
index 00000000..50d3f32f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/ospfv3/ospfv3.py
@@ -0,0 +1,180 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios ospfv3 fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.ospfv3.ospfv3 import (
+ Ospfv3Args,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.rm_templates.ospfv3 import (
+ Ospfv3Template,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+class Ospfv3Facts(object):
+ """ The ios ospfv3 fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Ospfv3Args.argument_spec
+
+ def get_ospfv3_data(self, connection):
+ return connection.get("sh running-config | section ^router ospfv3")
+
+ def parse(self, net_template_obj):
+ """ Overrided network template parse
+ """
+ result = {}
+ shared = {}
+ temp_pid = None
+ for line in net_template_obj._lines:
+ for parser in net_template_obj._tmplt.PARSERS:
+ cap = re.match(parser["getval"], line)
+ if cap:
+ capdict = cap.groupdict()
+
+ capdict = {
+ k: v for k, v in iteritems(capdict) if v is not None
+ }
+ if "address-family" in line:
+ capdict.update({"id": temp_pid})
+ if (
+ "manet" in line
+ and "pid" not in shared
+ and shared.get("unicast")
+ ):
+ del shared["unicast"]
+
+ if "router ospfv3" in line:
+ temp_pid = None
+ if parser.get("shared"):
+ shared = capdict
+ if not temp_pid and (
+ shared.get("pid") or shared.get("id")
+ ):
+ temp_pid = shared.get("pid") or shared.get("id")
+ vals = utils.dict_merge(capdict, shared)
+ try:
+ res = net_template_obj._deepformat(
+ deepcopy(parser["result"]), vals
+ )
+ except Exception:
+ continue
+ result = utils.dict_merge(result, res)
+ break
+ return result
+
+ def parse_for_address_family(self, current):
+ """ Parsing and Fishing out address family contents
+ """
+ pid_addr_family_dict = {}
+ temp_dict = {}
+ temp_pid = None
+ temp = []
+ if current.get("address_family"):
+ for each in current.pop("address_family"):
+ each = utils.remove_empties(each)
+ if each.get("exit"):
+ if temp_pid == each.get("exit")["pid"]:
+ temp.append(temp_dict)
+ pid_addr_family_dict[temp_pid] = temp
+ temp_dict = dict()
+ else:
+ temp_pid = each.get("exit")["pid"]
+ pid_addr_family_dict[temp_pid] = [temp_dict]
+ temp = []
+ temp.append(temp_dict)
+ temp_dict = dict()
+ elif each.get("manet") and temp_dict.get("manet"):
+ for k, v in iteritems(each.get("manet")):
+ if k in temp_dict.get("manet"):
+ temp_dict.get("manet")[k].update(v)
+ else:
+ temp_dict["manet"].update(each.get("manet"))
+ elif each.get("manet") and not temp_dict.get("manet"):
+ temp_dict["manet"] = each.get("manet")
+ else:
+ temp_dict.update(each)
+ return pid_addr_family_dict
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for ospfv3
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = self.get_ospfv3_data(connection)
+
+ ipv4 = {"processes": []}
+ rmmod = NetworkTemplate(
+ lines=data.splitlines(), tmplt=Ospfv3Template()
+ )
+ current = self.parse(rmmod)
+ address_family = self.parse_for_address_family(current)
+ if address_family:
+ for k, v in iteritems(current["processes"]):
+ temp = address_family.pop(k)
+ v.update({"address_family": temp})
+ # convert some of the dicts to lists
+ for key, sortv in [("processes", "process_id")]:
+ if key in current and current[key]:
+ current[key] = current[key].values()
+ current[key] = sorted(
+ current[key], key=lambda k, sk=sortv: k[sk]
+ )
+
+ for process in current.get("processes", []):
+ if "areas" in process:
+ process["areas"] = list(process["areas"].values())
+ process["areas"] = sorted(
+ process["areas"], key=lambda k, sk="area_id": k[sk]
+ )
+ for area in process["areas"]:
+ if "filters" in area:
+ area["filters"].sort()
+ if "address_family" in process:
+ for each in process["address_family"]:
+ if "areas" in each:
+ each["areas"] = list(each["areas"].values())
+ each["areas"] = sorted(
+ each["areas"], key=lambda k, sk="area_id": k[sk]
+ )
+ for area in each["areas"]:
+ if "filters" in area:
+ area["filters"].sort()
+ ipv4["processes"].append(process)
+
+ ansible_facts["ansible_network_resources"].pop("ospfv3", None)
+ facts = {}
+ if current:
+ params = utils.validate_config(
+ self.argument_spec, {"config": ipv4}
+ )
+ params = utils.remove_empties(params)
+
+ facts["ospfv3"] = params["config"]
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/static_routes/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/static_routes/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/static_routes/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/static_routes/static_routes.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/static_routes/static_routes.py
new file mode 100644
index 00000000..09805ef0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/static_routes/static_routes.py
@@ -0,0 +1,272 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios_static_routes fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ netmask_to_cidr,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.static_routes.static_routes import (
+ Static_RoutesArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.utils.utils import (
+ is_valid_ip,
+)
+
+
+class Static_RoutesFacts(object):
+ """ The ios_static_routes fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+
+ self._module = module
+ self.argument_spec = Static_RoutesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_static_routes_data(self, connection):
+ return connection.get(
+ "sh running-config | section ^ip route|ipv6 route"
+ )
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for static_routes
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+
+ objs = []
+ if not data:
+ data = self.get_static_routes_data(connection)
+ # operate on a collection of resource x
+ config = data.split("\n")
+
+ same_dest = self.populate_destination(config)
+ for key in same_dest.keys():
+ if key:
+ obj = self.render_config(
+ self.generated_spec, key, same_dest[key]
+ )
+ if obj:
+ objs.append(obj)
+ facts = {}
+
+ # append all static routes address_family with NO VRF together
+ no_vrf_address_family = {
+ "address_families": [
+ each.get("address_families")[0]
+ for each in objs
+ if each.get("vrf") is None
+ ]
+ }
+
+ temp_objs = [each for each in objs if each.get("vrf") is not None]
+ temp_objs.append(no_vrf_address_family)
+ objs = temp_objs
+
+ if objs:
+ facts["static_routes"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["static_routes"].append(utils.remove_empties(cfg))
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def update_netmask_to_cidr(self, filter, pos, del_pos):
+ netmask = filter.split(" ")
+ dest = netmask[pos] + "/" + netmask_to_cidr(netmask[del_pos])
+ netmask[pos] = dest
+ del netmask[del_pos]
+ filter_vrf = " "
+ return filter_vrf.join(netmask), dest
+
+ def populate_destination(self, config):
+ same_dest = {}
+ ip_str = ""
+ for i in sorted(config):
+ if i and "ospf" not in i:
+ if "::" in i and "vrf" in i:
+ ip_str = "ipv6 route vrf"
+ elif "::" in i and "vrf" not in i:
+ ip_str = "ipv6 route"
+ elif "." in i and "vrf" in i:
+ ip_str = "ip route vrf"
+ elif "." in i and "vrf" not in i:
+ ip_str = "ip route"
+
+ if "vrf" in i:
+ filter_vrf = utils.parse_conf_arg(i, ip_str)
+ if "::" not in filter_vrf:
+ filter_vrf, dest_vrf = self.update_netmask_to_cidr(
+ filter_vrf, 1, 2
+ )
+ dest_vrf = dest_vrf + "_vrf"
+ else:
+ dest_vrf = filter_vrf.split(" ")[1]
+ if dest_vrf not in same_dest.keys():
+ same_dest[dest_vrf] = []
+ same_dest[dest_vrf].append("vrf " + filter_vrf)
+ elif "vrf" not in same_dest[dest_vrf][0]:
+ same_dest[dest_vrf] = []
+ same_dest[dest_vrf].append("vrf " + filter_vrf)
+ else:
+ same_dest[dest_vrf].append(("vrf " + filter_vrf))
+ else:
+ filter_non_vrf = utils.parse_conf_arg(i, ip_str)
+ if (
+ "::" not in filter_non_vrf
+ ): # "/" not in filter_non_vrf and
+ filter_non_vrf, dest = self.update_netmask_to_cidr(
+ filter_non_vrf, 0, 1
+ )
+ else:
+ dest = filter_non_vrf.split(" ")[0]
+ if dest not in same_dest.keys():
+ same_dest[dest] = []
+ same_dest[dest].append(filter_non_vrf)
+ elif "vrf" in same_dest[dest][0]:
+ same_dest[dest] = []
+ same_dest[dest].append(filter_non_vrf)
+ else:
+ same_dest[dest].append(filter_non_vrf)
+ return same_dest
+
+ def render_config(self, spec, conf, conf_val):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ config["address_families"] = []
+ route_dict = dict()
+ final_route = dict()
+ afi = dict()
+ final_route["routes"] = []
+ next_hops = []
+ hops = {}
+ vrf = ""
+ address_family = dict()
+ for each in conf_val:
+ route = each.split(" ")
+ if "vrf" in conf_val[0]:
+ vrf = route[route.index("vrf") + 1]
+ route_dict["dest"] = conf.split("_")[0]
+ else:
+ route_dict["dest"] = conf
+ if "vrf" in conf_val[0]:
+ hops = {}
+ if "::" in conf:
+ hops["forward_router_address"] = route[3]
+ afi["afi"] = "ipv6"
+ elif "." in conf:
+ if is_valid_ip(route[3]):
+ hops["forward_router_address"] = route[3]
+ afi["afi"] = "ipv4"
+ else:
+ hops["interface"] = route[3]
+ afi["afi"] = "ipv4"
+ if is_valid_ip(route[4]):
+ hops["forward_router_address"] = route[4]
+ else:
+
+ if "::" in conf:
+ if is_valid_ip(route[1]):
+ hops["forward_router_address"] = route[1]
+ afi["afi"] = "ipv6"
+ else:
+ hops["interface"] = route[1]
+ afi["afi"] = "ipv6"
+ if is_valid_ip(route[2]):
+ hops["forward_router_address"] = route[2]
+ elif "." in conf:
+ if is_valid_ip(route[1]):
+ hops["forward_router_address"] = route[1]
+ afi["afi"] = "ipv4"
+ else:
+ hops["interface"] = route[1]
+ afi["afi"] = "ipv4"
+ if is_valid_ip(route[2]):
+ hops["forward_router_address"] = route[2]
+ try:
+ temp_list = each.split(" ")
+ if "tag" in temp_list:
+ del temp_list[temp_list.index("tag") + 1]
+ if "track" in temp_list:
+ del temp_list[temp_list.index("track") + 1]
+ # find distance metric
+ dist_metrics = int(
+ [
+ i
+ for i in temp_list
+ if "." not in i
+ and ":" not in i
+ and ord(i[0]) > 48
+ and ord(i[0]) < 57
+ ][0]
+ )
+ except IndexError:
+ dist_metrics = None
+ if dist_metrics:
+ hops["distance_metric"] = dist_metrics
+ if "name" in route:
+ hops["name"] = route[route.index("name") + 1]
+ if "multicast" in route:
+ hops["multicast"] = True
+ if "dhcp" in route:
+ hops["dhcp"] = True
+ if "global" in route:
+ hops["global"] = True
+ if "permanent" in route:
+ hops["permanent"] = True
+ if "tag" in route:
+ hops["tag"] = route[route.index("tag") + 1]
+ if "track" in route:
+ hops["track"] = route[route.index("track") + 1]
+ next_hops.append(hops)
+ hops = {}
+ route_dict["next_hops"] = next_hops
+ if route_dict:
+ final_route["routes"].append(route_dict)
+ address_family.update(afi)
+ address_family.update(final_route)
+ config["address_families"].append(address_family)
+ if vrf:
+ config["vrf"] = vrf
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/vlans/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/vlans/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/vlans/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/vlans/vlans.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/vlans/vlans.py
new file mode 100644
index 00000000..d2959182
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/facts/vlans/vlans.py
@@ -0,0 +1,168 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The ios vlans fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.vlans.vlans import (
+ VlansArgs,
+)
+
+
+class VlansFacts(object):
+ """ The ios vlans fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = VlansArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_vlans_data(self, connection):
+ return connection.get("show vlan")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for vlans
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+
+ objs = []
+ mtu_objs = []
+ remote_objs = []
+ final_objs = []
+ if not data:
+ data = self.get_vlans_data(connection)
+ # operate on a collection of resource x
+ config = data.split("\n")
+ # Get individual vlan configs separately
+ vlan_info = ""
+ temp = ""
+ vlan_name = True
+ for conf in config:
+ if len(list(filter(None, conf.split(" ")))) <= 2 and vlan_name:
+ temp = temp + conf
+ if len(list(filter(None, temp.split(" ")))) <= 2:
+ continue
+ if "VLAN Name" in conf:
+ vlan_info = "Name"
+ elif "VLAN Type" in conf:
+ vlan_info = "Type"
+ vlan_name = False
+ elif "Remote SPAN" in conf:
+ vlan_info = "Remote"
+ vlan_name = False
+ elif "VLAN AREHops" in conf or "STEHops" in conf:
+ vlan_info = "Hops"
+ vlan_name = False
+ if temp:
+ conf = temp
+ temp = ""
+ if conf and " " not in filter(None, conf.split("-")):
+ obj = self.render_config(self.generated_spec, conf, vlan_info)
+ if "mtu" in obj:
+ mtu_objs.append(obj)
+ elif "remote_span" in obj:
+ remote_objs = obj
+ elif obj:
+ objs.append(obj)
+ # Appending MTU value to the retrieved dictionary
+ for o, m in zip(objs, mtu_objs):
+ o.update(m)
+ final_objs.append(o)
+
+ # Appending Remote Span value to related VLAN:
+ if remote_objs:
+ if remote_objs.get("remote_span"):
+ for each in remote_objs.get("remote_span"):
+ for every in final_objs:
+ if each == every.get("vlan_id"):
+ every.update({"remote_span": True})
+ break
+ facts = {}
+ if final_objs:
+ facts["vlans"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+
+ for cfg in params["config"]:
+ facts["vlans"].append(utils.remove_empties(cfg))
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf, vlan_info):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ if vlan_info == "Name" and "VLAN Name" not in conf:
+ conf = list(filter(None, conf.split(" ")))
+ config["vlan_id"] = int(conf[0])
+ config["name"] = conf[1]
+ try:
+ if len(conf[2].split("/")) > 1:
+ if conf[2].split("/")[0] == "sus":
+ config["state"] = "suspend"
+ elif conf[2].split("/")[0] == "act":
+ config["state"] = "active"
+ config["shutdown"] = "enabled"
+ else:
+ if conf[2] == "suspended":
+ config["state"] = "suspend"
+ elif conf[2] == "active":
+ config["state"] = "active"
+ config["shutdown"] = "disabled"
+ except IndexError:
+ pass
+ elif vlan_info == "Type" and "VLAN Type" not in conf:
+ conf = list(filter(None, conf.split(" ")))
+ config["mtu"] = int(conf[3])
+ elif vlan_info == "Remote":
+ if len(conf.split(",")) > 1 or conf.isdigit():
+ remote_span_vlan = []
+ if len(conf.split(",")) > 1:
+ remote_span_vlan = conf.split(",")
+ else:
+ remote_span_vlan.append(conf)
+ remote_span = []
+ for each in remote_span_vlan:
+ remote_span.append(int(each))
+ config["remote_span"] = remote_span
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py
new file mode 100644
index 00000000..18f87a09
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py
@@ -0,0 +1,205 @@
+# This code is part of Ansible, but is an independent component.
+# This particular file snippet, and this file snippet only, is BSD licensed.
+# Modules you write using this snippet, which is embedded dynamically by Ansible
+# still belong to the author of the module, and may assign their own license
+# to the complete work.
+#
+# (c) 2016 Red Hat Inc.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import json
+
+from ansible.module_utils._text import to_text
+from ansible.module_utils.basic import env_fallback
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible.module_utils.connection import Connection, ConnectionError
+
+_DEVICE_CONFIGS = {}
+
+ios_provider_spec = {
+ "host": dict(),
+ "port": dict(type="int"),
+ "username": dict(fallback=(env_fallback, ["ANSIBLE_NET_USERNAME"])),
+ "password": dict(
+ fallback=(env_fallback, ["ANSIBLE_NET_PASSWORD"]), no_log=True
+ ),
+ "ssh_keyfile": dict(
+ fallback=(env_fallback, ["ANSIBLE_NET_SSH_KEYFILE"]), type="path"
+ ),
+ "authorize": dict(
+ default=False,
+ fallback=(env_fallback, ["ANSIBLE_NET_AUTHORIZE"]),
+ type="bool",
+ ),
+ "auth_pass": dict(
+ fallback=(env_fallback, ["ANSIBLE_NET_AUTH_PASS"]), no_log=True
+ ),
+ "timeout": dict(type="int"),
+}
+ios_argument_spec = {
+ "provider": dict(
+ type="dict",
+ options=ios_provider_spec,
+ removed_at_date="2022-06-01",
+ removed_from_collection="cisco.ios",
+ )
+}
+
+
+def get_provider_argspec():
+ return ios_provider_spec
+
+
+def get_connection(module):
+ if hasattr(module, "_ios_connection"):
+ return module._ios_connection
+
+ capabilities = get_capabilities(module)
+ network_api = capabilities.get("network_api")
+ if network_api == "cliconf":
+ module._ios_connection = Connection(module._socket_path)
+ else:
+ module.fail_json(msg="Invalid connection type %s" % network_api)
+
+ return module._ios_connection
+
+
+def get_capabilities(module):
+ if hasattr(module, "_ios_capabilities"):
+ return module._ios_capabilities
+ try:
+ capabilities = Connection(module._socket_path).get_capabilities()
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+ module._ios_capabilities = json.loads(capabilities)
+ return module._ios_capabilities
+
+
+def get_defaults_flag(module):
+ connection = get_connection(module)
+ try:
+ out = connection.get_defaults_flag()
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+ return to_text(out, errors="surrogate_then_replace").strip()
+
+
+def get_config(module, flags=None):
+ flags = to_list(flags)
+
+ section_filter = False
+ if flags and "section" in flags[-1]:
+ section_filter = True
+
+ flag_str = " ".join(flags)
+
+ try:
+ return _DEVICE_CONFIGS[flag_str]
+ except KeyError:
+ connection = get_connection(module)
+ try:
+ out = connection.get_config(flags=flags)
+ except ConnectionError as exc:
+ if section_filter:
+ # Some ios devices don't understand `| section foo`
+ out = get_config(module, flags=flags[:-1])
+ else:
+ module.fail_json(
+ msg=to_text(exc, errors="surrogate_then_replace")
+ )
+ cfg = to_text(out, errors="surrogate_then_replace").strip()
+ _DEVICE_CONFIGS[flag_str] = cfg
+ return cfg
+
+
+def run_commands(module, commands, check_rc=True):
+ connection = get_connection(module)
+ try:
+ return connection.run_commands(commands=commands, check_rc=check_rc)
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc))
+
+
+def load_config(module, commands):
+ connection = get_connection(module)
+
+ try:
+ resp = connection.edit_config(commands)
+ return resp.get("response")
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc))
+
+
+def normalize_interface(name):
+ """Return the normalized interface name
+ """
+ if not name:
+ return
+
+ def _get_number(name):
+ digits = ""
+ for char in name:
+ if char.isdigit() or char in "/.":
+ digits += char
+ return digits
+
+ if name.lower().startswith("gi"):
+ if_type = "GigabitEthernet"
+ elif name.lower().startswith("te"):
+ if_type = "TenGigabitEthernet"
+ elif name.lower().startswith("fa"):
+ if_type = "FastEthernet"
+ elif name.lower().startswith("fo"):
+ if_type = "FortyGigabitEthernet"
+ elif name.lower().startswith("et"):
+ if_type = "Ethernet"
+ elif name.lower().startswith("vl"):
+ if_type = "Vlan"
+ elif name.lower().startswith("lo"):
+ if_type = "loopback"
+ elif name.lower().startswith("po"):
+ if_type = "port-channel"
+ elif name.lower().startswith("nv"):
+ if_type = "nve"
+ elif name.lower().startswith("twe"):
+ if_type = "TwentyFiveGigE"
+ elif name.lower().startswith("hu"):
+ if_type = "HundredGigE"
+ else:
+ if_type = None
+
+ number_list = name.split(" ")
+ if len(number_list) == 2:
+ if_number = number_list[-1].strip()
+ else:
+ if_number = _get_number(name)
+
+ if if_type:
+ proper_interface = if_type + if_number
+ else:
+ proper_interface = name
+
+ return proper_interface
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/base.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/base.py
new file mode 100644
index 00000000..848542bb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/base.py
@@ -0,0 +1,84 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+)
+
+
+class ConfigBase(object):
+
+ argument_spec = {}
+
+ mutually_exclusive = []
+
+ identifier = ()
+
+ def __init__(self, **kwargs):
+ self.values = {}
+ self._rendered_configuration = {}
+ self.active_configuration = None
+
+ for item in self.identifier:
+ self.values[item] = kwargs.pop(item)
+
+ for key, value in iteritems(kwargs):
+ if key in self.argument_spec:
+ setattr(self, key, value)
+
+ for key, value in iteritems(self.argument_spec):
+ if value.get("default"):
+ if not getattr(self, key, None):
+ setattr(self, key, value.get("default"))
+
+ def __getattr__(self, key):
+ if key in self.argument_spec:
+ return self.values.get(key)
+
+ def __setattr__(self, key, value):
+ if key in self.argument_spec:
+ if key in self.identifier:
+ raise TypeError("cannot set value")
+ elif value is not None:
+ self.values[key] = value
+ else:
+ super(ConfigBase, self).__setattr__(key, value)
+
+ def context_config(self, cmd):
+ if "context" not in self._rendered_configuration:
+ self._rendered_configuration["context"] = list()
+ self._rendered_configuration["context"].extend(to_list(cmd))
+
+ def global_config(self, cmd):
+ if "global" not in self._rendered_configuration:
+ self._rendered_configuration["global"] = list()
+ self._rendered_configuration["global"].extend(to_list(cmd))
+
+ def get_rendered_configuration(self):
+ config = list()
+ for section in ("context", "global"):
+ config.extend(self._rendered_configuration.get(section, []))
+ return config
+
+ def set_active_configuration(self, config):
+ self.active_configuration = config
+
+ def render(self, config=None):
+ raise NotImplementedError
+
+ def get_section(self, config, section):
+ if config is not None:
+ netcfg = NetworkConfig(indent=1, contents=config)
+ try:
+ config = netcfg.get_block_config(to_list(section))
+ except ValueError:
+ config = None
+ return config
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/address_family.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/address_family.py
new file mode 100644
index 00000000..0e0ce1ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/address_family.py
@@ -0,0 +1,158 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import re
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers import (
+ CliProvider,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.cli.config.bgp.neighbors import (
+ AFNeighbors,
+)
+from ansible.module_utils.common.network import to_netmask
+
+
+class AddressFamily(CliProvider):
+ def render(self, config=None):
+ commands = list()
+ safe_list = list()
+
+ router_context = "router bgp %s" % self.get_value("config.bgp_as")
+ context_config = None
+
+ for item in self.get_value("config.address_family"):
+ context = "address-family %s" % item["afi"]
+ if item["safi"] != "unicast":
+ context += " %s" % item["safi"]
+ context_commands = list()
+
+ if config:
+ context_path = [router_context, context]
+ context_config = self.get_config_context(
+ config, context_path, indent=1
+ )
+
+ for key, value in iteritems(item):
+ if value is not None:
+ meth = getattr(self, "_render_%s" % key, None)
+ if meth:
+ resp = meth(item, context_config)
+ if resp:
+ context_commands.extend(to_list(resp))
+
+ if context_commands:
+ commands.append(context)
+ commands.extend(context_commands)
+ commands.append("exit-address-family")
+
+ safe_list.append(context)
+
+ if self.params["operation"] == "replace":
+ if config:
+ resp = self._negate_config(config, safe_list)
+ commands.extend(resp)
+
+ return commands
+
+ def _negate_config(self, config, safe_list=None):
+ commands = list()
+ matches = re.findall(r"(address-family .+)$", config, re.M)
+ for item in set(matches).difference(safe_list):
+ commands.append("no %s" % item)
+ return commands
+
+ def _render_auto_summary(self, item, config=None):
+ cmd = "auto-summary"
+ if item["auto_summary"] is False:
+ cmd = "no %s" % cmd
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_synchronization(self, item, config=None):
+ cmd = "synchronization"
+ if item["synchronization"] is False:
+ cmd = "no %s" % cmd
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_networks(self, item, config=None):
+ commands = list()
+ safe_list = list()
+
+ for entry in item["networks"]:
+ network = entry["prefix"]
+ cmd = "network %s" % network
+ if entry["masklen"]:
+ cmd += " mask %s" % to_netmask(entry["masklen"])
+ network += " mask %s" % to_netmask(entry["masklen"])
+ if entry["route_map"]:
+ cmd += " route-map %s" % entry["route_map"]
+ network += " route-map %s" % entry["route_map"]
+
+ safe_list.append(network)
+
+ if not config or cmd not in config:
+ commands.append(cmd)
+
+ if self.params["operation"] == "replace":
+ if config:
+ matches = re.findall(r"network (.*)", config, re.M)
+ for entry in set(matches).difference(safe_list):
+ commands.append("no network %s" % entry)
+
+ return commands
+
+ def _render_redistribute(self, item, config=None):
+ commands = list()
+ safe_list = list()
+
+ for entry in item["redistribute"]:
+ option = entry["protocol"]
+
+ cmd = "redistribute %s" % entry["protocol"]
+
+ if entry["id"] and entry["protocol"] in (
+ "ospf",
+ "ospfv3",
+ "eigrp",
+ ):
+ cmd += " %s" % entry["id"]
+ option += " %s" % entry["id"]
+
+ if entry["metric"]:
+ cmd += " metric %s" % entry["metric"]
+
+ if entry["route_map"]:
+ cmd += " route-map %s" % entry["route_map"]
+
+ if not config or cmd not in config:
+ commands.append(cmd)
+
+ safe_list.append(option)
+
+ if self.params["operation"] == "replace":
+ if config:
+ matches = re.findall(
+ r"redistribute (\S+)(?:\s*)(\d*)", config, re.M
+ )
+ for i in range(0, len(matches)):
+ matches[i] = " ".join(matches[i]).strip()
+ for entry in set(matches).difference(safe_list):
+ commands.append("no redistribute %s" % entry)
+
+ return commands
+
+ def _render_neighbors(self, item, config):
+ """ generate bgp neighbor configuration
+ """
+ return AFNeighbors(self.params).render(
+ config, nbr_list=item["neighbors"]
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/neighbors.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/neighbors.py
new file mode 100644
index 00000000..4db23b9d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/neighbors.py
@@ -0,0 +1,225 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import re
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers import (
+ CliProvider,
+)
+
+
+class Neighbors(CliProvider):
+ def render(self, config=None, nbr_list=None):
+ commands = list()
+ safe_list = list()
+ if not nbr_list:
+ nbr_list = self.get_value("config.neighbors")
+
+ for item in nbr_list:
+ neighbor_commands = list()
+ context = "neighbor %s" % item["neighbor"]
+ cmd = "%s remote-as %s" % (context, item["remote_as"])
+
+ if not config or cmd not in config:
+ neighbor_commands.append(cmd)
+
+ for key, value in iteritems(item):
+ if value is not None:
+ meth = getattr(self, "_render_%s" % key, None)
+ if meth:
+ resp = meth(item, config)
+ if resp:
+ neighbor_commands.extend(to_list(resp))
+
+ commands.extend(neighbor_commands)
+ safe_list.append(context)
+
+ if self.params["operation"] == "replace":
+ if config and safe_list:
+ commands.extend(self._negate_config(config, safe_list))
+
+ return commands
+
+ def _negate_config(self, config, safe_list=None):
+ commands = list()
+ matches = re.findall(r"(neighbor \S+)", config, re.M)
+ for item in set(matches).difference(safe_list):
+ commands.append("no %s" % item)
+ return commands
+
+ def _render_local_as(self, item, config=None):
+ cmd = "neighbor %s local-as %s" % (item["neighbor"], item["local_as"])
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_port(self, item, config=None):
+ cmd = "neighbor %s port %s" % (item["neighbor"], item["port"])
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_description(self, item, config=None):
+ cmd = "neighbor %s description %s" % (
+ item["neighbor"],
+ item["description"],
+ )
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_enabled(self, item, config=None):
+ cmd = "neighbor %s shutdown" % item["neighbor"]
+ if item["enabled"] is True:
+ if not config or cmd in config:
+ cmd = "no %s" % cmd
+ return cmd
+ elif not config or cmd not in config:
+ return cmd
+
+ def _render_update_source(self, item, config=None):
+ cmd = "neighbor %s update-source %s" % (
+ item["neighbor"],
+ item["update_source"],
+ )
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_password(self, item, config=None):
+ cmd = "neighbor %s password %s" % (item["neighbor"], item["password"])
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_ebgp_multihop(self, item, config=None):
+ cmd = "neighbor %s ebgp-multihop %s" % (
+ item["neighbor"],
+ item["ebgp_multihop"],
+ )
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_peer_group(self, item, config=None):
+ cmd = "neighbor %s peer-group %s" % (
+ item["neighbor"],
+ item["peer_group"],
+ )
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_timers(self, item, config):
+ """generate bgp timer related configuration
+ """
+ keepalive = item["timers"]["keepalive"]
+ holdtime = item["timers"]["holdtime"]
+ min_neighbor_holdtime = item["timers"]["min_neighbor_holdtime"]
+ neighbor = item["neighbor"]
+
+ if keepalive and holdtime:
+ cmd = "neighbor %s timers %s %s" % (neighbor, keepalive, holdtime)
+ if min_neighbor_holdtime:
+ cmd += " %s" % min_neighbor_holdtime
+ if not config or cmd not in config:
+ return cmd
+
+
+class AFNeighbors(CliProvider):
+ def render(self, config=None, nbr_list=None):
+ commands = list()
+ if not nbr_list:
+ return
+
+ for item in nbr_list:
+ neighbor_commands = list()
+ for key, value in iteritems(item):
+ if value is not None:
+ meth = getattr(self, "_render_%s" % key, None)
+ if meth:
+ resp = meth(item, config)
+ if resp:
+ neighbor_commands.extend(to_list(resp))
+
+ commands.extend(neighbor_commands)
+
+ return commands
+
+ def _render_advertisement_interval(self, item, config=None):
+ cmd = "neighbor %s advertisement-interval %s" % (
+ item["neighbor"],
+ item["advertisement_interval"],
+ )
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_route_reflector_client(self, item, config=None):
+ cmd = "neighbor %s route-reflector-client" % item["neighbor"]
+ if item["route_reflector_client"] is False:
+ if not config or cmd in config:
+ cmd = "no %s" % cmd
+ return cmd
+ elif not config or cmd not in config:
+ return cmd
+
+ def _render_route_server_client(self, item, config=None):
+ cmd = "neighbor %s route-server-client" % item["neighbor"]
+ if item["route_server_client"] is False:
+ if not config or cmd in config:
+ cmd = "no %s" % cmd
+ return cmd
+ elif not config or cmd not in config:
+ return cmd
+
+ def _render_remove_private_as(self, item, config=None):
+ cmd = "neighbor %s remove-private-as" % item["neighbor"]
+ if item["remove_private_as"] is False:
+ if not config or cmd in config:
+ cmd = "no %s" % cmd
+ return cmd
+ elif not config or cmd not in config:
+ return cmd
+
+ def _render_next_hop_self(self, item, config=None):
+ cmd = "neighbor %s next-hop-self" % item["neighbor"]
+ if item["next_hop_self"] is False:
+ if not config or cmd in config:
+ cmd = "no %s" % cmd
+ return cmd
+ elif not config or cmd not in config:
+ return cmd
+
+ def _render_activate(self, item, config=None):
+ cmd = "neighbor %s activate" % item["neighbor"]
+ if item["activate"] is False:
+ if not config or cmd in config:
+ cmd = "no %s" % cmd
+ return cmd
+ elif not config or cmd not in config:
+ return cmd
+
+ def _render_maximum_prefix(self, item, config=None):
+ cmd = "neighbor %s maximum-prefix %s" % (
+ item["neighbor"],
+ item["maximum_prefix"],
+ )
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_prefix_list_in(self, item, config=None):
+ cmd = "neighbor %s prefix-list %s in" % (
+ item["neighbor"],
+ item["prefix_list_in"],
+ )
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_prefix_list_out(self, item, config=None):
+ cmd = "neighbor %s prefix-list %s out" % (
+ item["neighbor"],
+ item["prefix_list_out"],
+ )
+ if not config or cmd not in config:
+ return cmd
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/process.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/process.py
new file mode 100644
index 00000000..9512d9d2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/cli/config/bgp/process.py
@@ -0,0 +1,168 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import re
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers import (
+ register_provider,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers import (
+ CliProvider,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.cli.config.bgp.neighbors import (
+ Neighbors,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.cli.config.bgp.address_family import (
+ AddressFamily,
+)
+from ansible.module_utils.common.network import to_netmask
+
+REDISTRIBUTE_PROTOCOLS = [
+ "ospf",
+ "ospfv3",
+ "eigrp",
+ "isis",
+ "static",
+ "connected",
+ "odr",
+ "lisp",
+ "mobile",
+ "rip",
+]
+
+
+@register_provider("ios", "ios_bgp")
+class Provider(CliProvider):
+ def render(self, config=None):
+ commands = list()
+
+ existing_as = None
+ if config:
+ match = re.search(r"router bgp (\d+)", config, re.M)
+ if match:
+ existing_as = match.group(1)
+
+ operation = self.params["operation"]
+
+ context = None
+ if self.params["config"]:
+ context = "router bgp %s" % self.get_value("config.bgp_as")
+
+ if operation == "delete":
+ if existing_as:
+ commands.append("no router bgp %s" % existing_as)
+ elif context:
+ commands.append("no %s" % context)
+
+ else:
+ self._validate_input(config)
+ if operation == "replace":
+ if existing_as and int(existing_as) != self.get_value(
+ "config.bgp_as"
+ ):
+ commands.append("no router bgp %s" % existing_as)
+ config = None
+
+ elif operation == "override":
+ if existing_as:
+ commands.append("no router bgp %s" % existing_as)
+ config = None
+
+ context_commands = list()
+
+ for key, value in iteritems(self.get_value("config")):
+ if value is not None:
+ meth = getattr(self, "_render_%s" % key, None)
+ if meth:
+ resp = meth(config)
+ if resp:
+ context_commands.extend(to_list(resp))
+
+ if context and context_commands:
+ commands.append(context)
+ commands.extend(context_commands)
+ commands.append("exit")
+ return commands
+
+ def _render_router_id(self, config=None):
+ cmd = "bgp router-id %s" % self.get_value("config.router_id")
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_log_neighbor_changes(self, config=None):
+ cmd = "bgp log-neighbor-changes"
+ log_neighbor_changes = self.get_value("config.log_neighbor_changes")
+ if log_neighbor_changes is True:
+ if not config or cmd not in config:
+ return cmd
+ elif log_neighbor_changes is False:
+ if config and cmd in config:
+ return "no %s" % cmd
+
+ def _render_networks(self, config=None):
+ commands = list()
+ safe_list = list()
+
+ for entry in self.get_value("config.networks"):
+ network = entry["prefix"]
+ cmd = "network %s" % network
+ if entry["masklen"] and entry["masklen"] not in (24, 16, 8):
+ cmd += " mask %s" % to_netmask(entry["masklen"])
+ network += " mask %s" % to_netmask(entry["masklen"])
+
+ if entry["route_map"]:
+ cmd += " route-map %s" % entry["route_map"]
+ network += " route-map %s" % entry["route_map"]
+
+ safe_list.append(network)
+
+ if not config or cmd not in config:
+ commands.append(cmd)
+
+ if self.params["operation"] == "replace":
+ if config:
+ matches = re.findall(r"network (.*)", config, re.M)
+ for entry in set(matches).difference(safe_list):
+ commands.append("no network %s" % entry)
+
+ return commands
+
+ def _render_neighbors(self, config):
+ """ generate bgp neighbor configuration
+ """
+ return Neighbors(self.params).render(config)
+
+ def _render_address_family(self, config):
+ """ generate address-family configuration
+ """
+ return AddressFamily(self.params).render(config)
+
+ def _validate_input(self, config=None):
+ def device_has_AF(config):
+ return re.search(r"address-family (?:.*)", config)
+
+ address_family = self.get_value("config.address_family")
+ root_networks = self.get_value("config.networks")
+ operation = self.params["operation"]
+
+ if operation == "replace":
+ if address_family and root_networks:
+ for item in address_family:
+ if item["networks"]:
+ raise ValueError(
+ "operation is replace but provided both root level network(s) and network(s) under %s %s address family"
+ % (item["afi"], item["safi"])
+ )
+
+ if root_networks and config and device_has_AF(config):
+ raise ValueError(
+ "operation is replace and device has one or more address family activated but root level network(s) provided"
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/module.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/module.py
new file mode 100644
index 00000000..cc516ff1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/module.py
@@ -0,0 +1,72 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.connection import Connection
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers import (
+ providers,
+)
+from ansible.module_utils._text import to_text
+
+
+class NetworkModule(AnsibleModule):
+
+ fail_on_missing_provider = True
+
+ def __init__(self, connection=None, *args, **kwargs):
+ super(NetworkModule, self).__init__(*args, **kwargs)
+
+ if connection is None:
+ connection = Connection(self._socket_path)
+
+ self.connection = connection
+
+ @property
+ def provider(self):
+ if not hasattr(self, "_provider"):
+ capabilities = self.from_json(self.connection.get_capabilities())
+
+ network_os = capabilities["device_info"]["network_os"]
+ network_api = capabilities["network_api"]
+
+ if network_api == "cliconf":
+ connection_type = "network_cli"
+
+ cls = providers.get(
+ network_os, self._name.split(".")[-1], connection_type
+ )
+
+ if not cls:
+ msg = (
+ "unable to find suitable provider for network os %s"
+ % network_os
+ )
+ if self.fail_on_missing_provider:
+ self.fail_json(msg=msg)
+ else:
+ self.warn(msg)
+
+ obj = cls(self.params, self.connection, self.check_mode)
+
+ setattr(self, "_provider", obj)
+
+ return getattr(self, "_provider")
+
+ def get_facts(self, subset=None):
+ try:
+ self.provider.get_facts(subset)
+ except Exception as exc:
+ self.fail_json(msg=to_text(exc))
+
+ def edit_config(self, config_filter=None):
+ current_config = self.connection.get_config(flags=config_filter)
+ try:
+ commands = self.provider.edit_config(current_config)
+ changed = bool(commands)
+ return {"commands": commands, "changed": changed}
+ except Exception as exc:
+ self.fail_json(msg=to_text(exc))
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/providers.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/providers.py
new file mode 100644
index 00000000..485eb383
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/providers/providers.py
@@ -0,0 +1,128 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import json
+
+from threading import RLock
+
+from ansible.module_utils.six import itervalues
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+)
+
+
+_registered_providers = {}
+_provider_lock = RLock()
+
+
+def register_provider(network_os, module_name):
+ def wrapper(cls):
+ _provider_lock.acquire()
+ try:
+ if network_os not in _registered_providers:
+ _registered_providers[network_os] = {}
+ for ct in cls.supported_connections:
+ if ct not in _registered_providers[network_os]:
+ _registered_providers[network_os][ct] = {}
+ for item in to_list(module_name):
+ for entry in itervalues(_registered_providers[network_os]):
+ entry[item] = cls
+ finally:
+ _provider_lock.release()
+ return cls
+
+ return wrapper
+
+
+def get(network_os, module_name, connection_type):
+ network_os_providers = _registered_providers.get(network_os)
+ if network_os_providers is None:
+ raise ValueError("unable to find a suitable provider for this module")
+ if connection_type not in network_os_providers:
+ raise ValueError("provider does not support this connection type")
+ elif module_name not in network_os_providers[connection_type]:
+ raise ValueError("could not find a suitable provider for this module")
+ return network_os_providers[connection_type][module_name]
+
+
+class ProviderBase(object):
+
+ supported_connections = ()
+
+ def __init__(self, params, connection=None, check_mode=False):
+ self.params = params
+ self.connection = connection
+ self.check_mode = check_mode
+
+ @property
+ def capabilities(self):
+ if not hasattr(self, "_capabilities"):
+ resp = self.from_json(self.connection.get_capabilities())
+ setattr(self, "_capabilities", resp)
+ return getattr(self, "_capabilities")
+
+ def get_value(self, path):
+ params = self.params.copy()
+ for key in path.split("."):
+ params = params[key]
+ return params
+
+ def get_facts(self, subset=None):
+ raise NotImplementedError(self.__class__.__name__)
+
+ def edit_config(self):
+ raise NotImplementedError(self.__class__.__name__)
+
+
+class CliProvider(ProviderBase):
+
+ supported_connections = ("network_cli",)
+
+ @property
+ def capabilities(self):
+ if not hasattr(self, "_capabilities"):
+ resp = self.from_json(self.connection.get_capabilities())
+ setattr(self, "_capabilities", resp)
+ return getattr(self, "_capabilities")
+
+ def get_config_context(self, config, path, indent=1):
+ if config is not None:
+ netcfg = NetworkConfig(indent=indent, contents=config)
+ try:
+ config = netcfg.get_block_config(to_list(path))
+ except ValueError:
+ config = None
+ return config
+
+ def render(self, config=None):
+ raise NotImplementedError(self.__class__.__name__)
+
+ def cli(self, command):
+ try:
+ if not hasattr(self, "_command_output"):
+ setattr(self, "_command_output", {})
+ return self._command_output[command]
+ except KeyError:
+ out = self.connection.get(command)
+ try:
+ out = json.loads(out)
+ except ValueError:
+ pass
+ self._command_output[command] = out
+ return out
+
+ def get_facts(self, subset=None):
+ return self.populate()
+
+ def edit_config(self, config=None):
+ commands = self.render(config)
+ if commands and self.check_mode is False:
+ self.connection.edit_config(commands)
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/acls.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/acls.py
new file mode 100644
index 00000000..f9d64a58
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/acls.py
@@ -0,0 +1,284 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The acls parser templates file. This contains
+a list of parser definitions and associated functions that
+facilitates both facts gathering and native command generation for
+the given network resource.
+"""
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+def _tmplt_access_list_name(config_data):
+ try:
+ acl_id = int(config_data.get("name"))
+ if not config_data.get("acl_type"):
+ if acl_id >= 1 and acl_id <= 99:
+ config_data["acl_type"] = "standard"
+ if acl_id >= 100 and acl_id <= 199:
+ config_data["acl_type"] = "extended"
+ except ValueError:
+ pass
+ afi = config_data.get("afi")
+ if afi == "ipv4":
+ command = "ip access-list {acl_type} {name}".format(**config_data)
+ elif afi == "ipv6":
+ command = "ipv6 access-list {name}".format(**config_data)
+ return command
+
+
+def _tmplt_access_list_entries(config_data):
+ if "aces" in config_data:
+ command = []
+
+ def source_destination_common_config(config_data, command, type):
+ if config_data[type].get("address"):
+ command += " {address}".format(**config_data[type])
+ if config_data[type].get("wildcard_bits"):
+ command += " {wildcard_bits}".format(
+ **config_data["source"]
+ )
+ elif config_data[type].get("any"):
+ command += " any".format(**config_data[type])
+ elif config_data[type].get("host"):
+ command += " host {host}".format(**config_data[type])
+ if config_data[type].get("port_protocol"):
+ port_proto_type = list(
+ config_data[type]["port_protocol"].keys()
+ )[0]
+ command += " {0} {1}".format(
+ port_proto_type,
+ config_data[type]["port_protocol"][port_proto_type],
+ )
+ return command
+
+ command = ""
+ proto_option = None
+ if config_data.get("aces"):
+ aces = config_data["aces"]
+ if aces.get("sequence") and config_data.get("afi") == "ipv4":
+ command += "{sequence}".format(**aces)
+ if (
+ aces.get("grant")
+ and aces.get("sequence")
+ and config_data.get("afi") == "ipv4"
+ ):
+ command += " {grant}".format(**aces)
+ elif (
+ aces.get("grant")
+ and aces.get("sequence")
+ and config_data.get("afi") == "ipv6"
+ ):
+ command += "{grant}".format(**aces)
+ elif aces.get("grant"):
+ command += "{grant}".format(**aces)
+ if aces.get("protocol_options"):
+ if "protocol_number" in aces["protocol_options"]:
+ command += " {protocol_number}".format(
+ **aces["protocol_options"]
+ )
+ else:
+ command += " {0}".format(list(aces["protocol_options"])[0])
+ proto_option = aces["protocol_options"].get(
+ list(aces["protocol_options"])[0]
+ )
+ elif aces.get("protocol"):
+ command += " {protocol}".format(**aces)
+ if aces.get("source"):
+ command = source_destination_common_config(
+ aces, command, "source"
+ )
+ if aces.get("destination"):
+ command = source_destination_common_config(
+ aces, command, "destination"
+ )
+ if proto_option:
+ command += " {0}".format(list(proto_option.keys())[0])
+ if aces.get("dscp"):
+ command += " dscp {dscp}".format(**aces)
+ if aces.get("sequence") and config_data.get("afi") == "ipv6":
+ command += " sequence {sequence}".format(**aces)
+ if aces.get("fragments"):
+ command += " fragments {fragments}".format(**aces)
+ if aces.get("log"):
+ command += " log {log}".format(**aces)
+ if aces.get("log_input"):
+ command += " log-input {log_input}".format(**aces)
+ if aces.get("option"):
+ option_val = list(aces.get("option").keys())[0]
+ command += " option {0}".format(option_val)
+ if aces.get("precedence"):
+ command += " precedence {precedence}".format(**aces)
+ if aces.get("time_range"):
+ command += " time-range {time_range}".format(**aces)
+ if aces.get("tos"):
+ command += " tos"
+ if aces["tos"].get("service_value"):
+ command += " {service_value}".format(**aces["tos"])
+ elif aces["tos"].get("max_reliability"):
+ command += " max-reliability"
+ elif aces["tos"].get("max_throughput"):
+ command += " max-throughput"
+ elif aces["tos"].get("min_delay"):
+ command += " min-delay"
+ elif aces["tos"].get("min_monetary_cost"):
+ command += " min-monetary-cost"
+ elif aces["tos"].get("normal"):
+ command += " normal"
+ if aces.get("ttl"):
+ command += " ttl {0}".format(list(aces["ttl"])[0])
+ proto_option = aces["ttl"].get(list(aces["ttl"])[0])
+ command += " {0}".format(proto_option)
+ return command
+ return command
+
+
+class AclsTemplate(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(AclsTemplate, self).__init__(lines=lines, tmplt=self)
+
+ PARSERS = [
+ {
+ "name": "acls_name",
+ "getval": re.compile(
+ r"""^(?P<acl_type>Standard|Extended)*
+ \s*(?P<afi>IP|IPv6)*
+ \s*access*
+ \s*list*
+ \s*(?P<acl_name>\S+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "compval": "name",
+ "setval": _tmplt_access_list_name,
+ "result": {
+ "acls": {
+ "{{ acl_name }}": {
+ "name": "{{ acl_name }}",
+ "acl_type": "{{ acl_type.lower() if acl_type is defined }}",
+ "afi": "{{ 'ipv4' if afi == 'IP' else 'ipv6' }}",
+ }
+ }
+ },
+ "shared": True,
+ },
+ {
+ "name": "aces",
+ "getval": re.compile(
+ r"""\s*(?P<sequence>\d+)*
+ \s*(?P<grant>deny|permit)*
+ \s*(?P<std_source>any|(?:[0-9]{1,3}\.){3}[0-9]{1,3},\swildcard\sbits\s(?:[0-9]{1,3}\.){3}[0-9]{1,3}|(?:[0-9]{1,3}\.){3}[0-9]{1,3}|host\s(?:[0-9]{1,3}\.){3}[0-9]{1,3})*
+ \s*(?P<evaluate>evaluate\s\S+)*
+ \s*(?P<protocol>ahp|eigrp|esp|gre|icmp|igmp|ip|ipinip|nos|object-group|ospf|pcp|pim|sctp|tcp|udp)*
+ \s*(?P<protocol_num>\d+\s)*
+ \s*(?P<source>any|(?:[0-9]{1,3}\.){3}[0-9]{1,3}\s(?:[0-9]{1,3}\.){3}[0-9]{1,3}|(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\S+|host\s(?:[0-9]{1,3}\.){3}[0-9]{1,3}|object-group\s\S+)*
+ \s*(?P<source_port_protocol>(eq|gts|lt|neq)\s(\S+|\d+))*
+ \s*(?P<destination>any|(?:[0-9]{1,3}\.){3}[0-9]{1,3}\s(?:[0-9]{1,3}\.){3}[0-9]{1,3}|(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\S+|host\s(?:[0-9]{1,3}\.){3}[0-9]{1,3}|object-group\s\S+)*
+ \s*(?P<dest_port_protocol>(eq|gts|lt|neq)\s(\S+|\d+))*
+ \s*(?P<icmp_igmp_tcp_protocol>administratively-prohibited|alternate-address|conversion-error|dod-host-prohibited|dod-net-prohibited|echo|echo-reply|general-parameter-problem|host-isolated|host-precedence-unreachable|host-redirect|host-tos-redirect|host-tos-unreachable|host-unknown|host-unreachable|information-reply|information-request|mask-reply|mask-request|mobile-redirect|net-redirect|net-tos-redirect|net-tos-unreachable|net-unreachable|network-unknown|no-room-for-option|option-missing|packet-too-big|parameter-problem|port-unreachable|precedence-unreachable|protocol-unreachable|reassembly-timeout|redirect|router-advertisement|router-solicitation|source-quench|source-route-failed|time-exceeded|timestamp-reply|timestamp-request|traceroute|ttl-exceeded|unreachable|dvmrp|host-query|mtrace-resp|mtrace-route|pim|trace|v1host-report|v2host-report|v2leave-group|v3host-report|ack|established|fin|psh|rst|syn|urg)*
+ \s*(?P<dscp>dscp\s\S+)*
+ \s*(?P<fragment>fragments\s\S+)*
+ \s*(?P<log>log\s\S+)*
+ \s*(?P<log_input>log-input\s\S+)*
+ \s*(?P<option>option\s\S+|option\s\d+)*
+ \s*(?P<precedence>precedence\s\S+|precedence\s\d+)*
+ \s*(?P<time_range>time-range\s\S+)*
+ \s*(?P<tos>tos\s\S+|tos\s\d+)*
+ \s*(?P<ttl>ttl\s\S+\s\d+|ttl\s\d+\s\d+)*
+ \s*(?P<sequence_ipv6>sequence\s\d+)*
+ """,
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_access_list_entries,
+ "compval": "aces",
+ "result": {
+ "acls": {
+ "{{ acl_name }}": {
+ "name": "{{ acl_name }}",
+ "aces": [
+ {
+ "sequence": "{% if sequence is defined %}{{ sequence \
+ }}{% elif sequence_ipv6 is defined %}{{ sequence_ipv6.split('sequence ')[1] }}{% endif %}",
+ "grant": "{{ grant }}",
+ "remark": "{{ remark.split('remark ')[1] if remark is defined }}",
+ "evaluate": "{{ evaluate.split(' ')[1] if evaluate is defined }}",
+ "protocol": "{{ protocol if protocol is defined }}",
+ "protocol_number": "{{ protocol_num if protocol_num is defined }}",
+ "icmp_igmp_tcp_protocol": "{{ icmp_igmp_tcp_protocol if icmp_igmp_tcp_protocol is defined }}",
+ "std_source": {
+ "address": "{% if std_source is defined and 'wildcard' in std_source and std_source.split(',')|length == 2 %}{{\
+ std_source.split(',')[0]\
+ }}{% elif std_source is defined and '.' in std_source and std_source.split(' ')|length == 1 %}{{\
+ std_source }}{% endif %}",
+ "wildcard_bits": "{% if std_source is defined and 'wildcard' in std_source and std_source.split(',')|length == 2 %}{{\
+ std_source.split('wildcard bits ')[1] }}{% endif %}",
+ "host": "{% if std_source is defined and 'host' in std_source %}{{ std_source.split(' ')[1] }}{% endif %}",
+ "any": "{{ True if std_source is defined and std_source == 'any' }}",
+ },
+ "source": {
+ "address": "{% if source is defined and '.' in source and 'host' not in source %}{{\
+ source.split(' ')[0] }}{% elif source is defined and '::' in source %}{{ source }}{% endif %}",
+ "wildcard_bits": "{{ source.split(' ')[1] if source is defined and '.' in source and 'host' not in source }}",
+ "any": "{{ True if source is defined and source == 'any' }}",
+ "host": "{{ source.split(' ')[1] if source is defined and 'host' in source }}",
+ "object_group": "{{ source.split(' ')[1] if source is defined and 'object-group' in source }}",
+ "port_protocol": {
+ "{{ source_port_protocol.split(' ')[0] if source_port_protocol is defined else None }}": "{{\
+ source_port_protocol.split(' ')[1] if source_port_protocol is defined else None }}"
+ },
+ },
+ "destination": {
+ "address": "{% if destination is defined and '.' in destination and 'host' not in destination %}{{\
+ destination.split(' ')[0] }}{% elif std_dest is defined and '.' in std_dest and 'host' not in std_dest %}{{\
+ std_dest.split(' ')[0] }}{% elif destination is defined and '::' in destination %}{{ destination }}{% endif %}",
+ "wildcard_bits": "{% if destination is defined and '.' in destination and 'host' not in destination %}{{\
+ destination.split(' ')[1] }}{% elif std_dest is defined and '.' in std_dest and 'host' not in std_dest %}{{\
+ std_dest.split(' ')[1] }}{% endif %}",
+ "any": "{{ True if destination is defined and destination == 'any' else None }}",
+ "host": "{{ destination.split(' ')[1] if destination is defined and 'host' in destination }}",
+ "object_group": "{{ destination.split(' ')[1] if destination is defined and 'object-group' in destination else None }}",
+ "port_protocol": {
+ "{{ dest_port_protocol.split(' ')[0] if dest_port_protocol is defined else None }}": "{{\
+ dest_port_protocol.split(' ')[1] if dest_port_protocol is defined else None }}"
+ },
+ },
+ "dscp": "{{ dscp.split(' ')[1] if dscp is defined }}",
+ "fragments": "{{ fragments.split(' ')[1] if fragments is defined }}",
+ "log": "{{ log.split('log ')[1] if log is defined }}",
+ "log_input": "{{ log_input.split(' ')[1] if log_input is defined }}",
+ "option": {
+ "{% if option is defined %}{{ option.split(' ')[1] if option is defined }}{% endif %}": "{{ True if option is defined }}"
+ },
+ "precedence": "{{ precedence.split(' ')[1] if precedence is defined }}",
+ "time_range": "{{ time_range.split(' ')[1] if time_range is defined }}",
+ "tos": {
+ "max_reliability": "{{ True if tos is defined and 'max-reliability' in tos }}",
+ "max_throughput": "{{ True if tos is defined and 'max-throughput' in tos }}",
+ "min_delay": "{{ True if tos is defined and 'min-delay' in tos }}",
+ "min_monetary_cost": "{{ True if tos is defined and 'min-monetary-cost' in tos }}",
+ "normal": "{{ True if tos is defined and 'normal' in tos }}",
+ "service_value": "{{ tos.split(' ')[1] if tos is defined }}",
+ },
+ "ttl": {
+ "eq": "{{ ttl.split(' ')[2] if ttl is defined and 'eq' in ttl }}",
+ "gt": "{{ ttl.split(' ')[2] if ttl is defined and 'gt' in ttl }}",
+ "lt": "{{ ttl.split(' ')[2] if ttl is defined and 'lt' in ttl }}",
+ "neq": "{{ ttl.split(' ')[2] if ttl is defined and 'neq' in ttl }}",
+ },
+ }
+ ],
+ }
+ }
+ },
+ },
+ ]
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/bgp_global.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/bgp_global.py
new file mode 100644
index 00000000..f96d3467
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/bgp_global.py
@@ -0,0 +1,1835 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The Bgp_global parser templates file. This contains
+a list of parser definitions and associated functions that
+facilitates both facts gathering and native command generation for
+the given network resource.
+"""
+
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+def _tmplt_bgp_additional_paths(config_data):
+ if "bgp" in config_data:
+ if "additional_paths" in config_data["bgp"]:
+ cmd = "bgp additional-paths"
+ if "install" in config_data["bgp"]["additional_paths"]:
+ cmd += " install"
+ elif "select" in config_data["bgp"]["additional_paths"]:
+ cmd += " select"
+ if "all" in config_data["bgp"]["additional_paths"]["select"]:
+ cmd += " all"
+ elif (
+ "best" in config_data["bgp"]["additional_paths"]["select"]
+ ):
+ cmd += " best {best}".format(
+ **config_data["bgp"]["additional_paths"]["select"]
+ )
+ elif (
+ "best_external"
+ in config_data["bgp"]["additional_paths"]["select"]
+ ):
+ cmd += " best-external"
+ elif (
+ "group_best"
+ in config_data["bgp"]["additional_paths"]["select"]
+ ):
+ cmd += " group-best"
+ if "receive" in config_data["bgp"]["additional_paths"]:
+ cmd += " receive"
+ if "send" in config_data["bgp"]["additional_paths"]:
+ cmd += " send"
+ return cmd
+
+
+def _tmplt_bgp_bestpath(config_data):
+ if "bgp" in config_data and "bestpath" in config_data["bgp"]:
+ commands = []
+ val = config_data["bgp"]["bestpath"]
+ cmd = "bgp bestpath"
+ if val.get("aigp"):
+ commands.append("{0} aigp ignore".format(cmd))
+ elif val.get("compare_routerid"):
+ commands.append("{0} compare-routerid".format(cmd))
+ elif val.get("cost_community"):
+ commands.append("{0} cost-community ignore".format(cmd))
+ elif val.get("igp_metric"):
+ commands.append("{0} igp-metric ignore".format(cmd))
+ elif "med" in val:
+ self_cmd = "{0} med".format(cmd)
+ if "confed" in val["med"]:
+ self_cmd += " confed"
+ elif "missing_as_worst" in val["med"]:
+ self_cmd += " missing-as-worst"
+ commands.append(self_cmd)
+ return commands
+
+
+def _tmplt_bgp_config(config_data):
+ if "bgp" in config_data:
+ cmd = []
+ command = "bgp"
+ if config_data["bgp"].get("advertise_best_external"):
+ cmd.append("bgp advertise-best-external")
+ if config_data["bgp"].get("aggregate_timer"):
+ cmd.append(
+ "bgp aggregate-timer {aggregate_timer}".format(
+ **config_data["bgp"]
+ )
+ )
+ if config_data["bgp"].get("always_compare_med"):
+ cmd.append("bgp always-compare-med")
+ if config_data["bgp"].get("asnotation"):
+ cmd.append("bgp asnotation dot")
+ if "client_to_client" in config_data["bgp"]:
+ command = "bgp client-to-client reflection"
+ if "all" in config_data["bgp"]["client_to_client"]:
+ command += " all"
+ elif "intra_cluster" in config_data["bgp"]["client_to_client"]:
+ command += " intra-cluster cluster-id {intra_cluster}".format(
+ **config_data["bgp"]["client_to_client"]
+ )
+ cmd.append(command)
+ if config_data["bgp"].get("cluster_id"):
+ cmd.append(
+ "bgp cluster-id {cluster_id}".format(**config_data["bgp"])
+ )
+ if "confederation" in config_data["bgp"]:
+ command = "bgp confederation"
+ if "identifier" in config_data["bgp"]["confederation"]:
+ command += "bgp identifier {identifier}".format(
+ **config_data["bgp"]["confederation"]
+ )
+ elif "peers" in config_data["bgp"]["confederation"]:
+ command += "bgp peers {peers}".format(
+ **config_data["bgp"]["confederation"]
+ )
+ cmd.append(command)
+ if "consistency_checker" in config_data["bgp"]:
+ command = "bgp consistency-checker"
+ if "auto_repair" in config_data["bgp"]["consistency_checker"]:
+ command += " auto-repair"
+ if (
+ "interval"
+ in config_data["bgp"]["consistency_checker"]["auto_repair"]
+ ):
+ command += " interval {interval}".format(
+ **config_data["bgp"]["consistency_checker"][
+ "auto_repair"
+ ]
+ )
+ elif "error-message" in config_data["bgp"]["consistency_checker"]:
+ command += " error-message"
+ if (
+ "interval"
+ in config_data["bgp"]["consistency_checker"][
+ "error_message"
+ ]
+ ):
+ command += " interval {interval}".format(
+ **config_data["bgp"]["consistency_checker"][
+ "error_message"
+ ]
+ )
+ if config_data["bgp"].get("deterministic_med"):
+ cmd.append("bgp deterministic-med")
+ if config_data["bgp"].get("dmzlink_bw"):
+ cmd.append("bgp dmzlink-bw")
+ if config_data["bgp"].get("enforce_first_as"):
+ cmd.append("bgp enforce-first-as")
+ if config_data["bgp"].get("enhanced_error"):
+ cmd.append("bgp enhanced-error")
+ if config_data["bgp"].get("fast_external_fallover"):
+ cmd.append("bgp fast-external-fallover")
+ if "graceful_restart" in config_data["bgp"]:
+ command = "bgp graceful-restart"
+ if config_data["bgp"]["graceful_restart"].get("extended"):
+ command += " extended"
+ elif config_data["bgp"]["graceful_restart"].get("restart_time"):
+ command += " restart-time {restart_time}".format(
+ **config_data["bgp"]["graceful_restart"]
+ )
+ elif config_data["bgp"]["graceful_restart"].get("stalepath_time"):
+ command += " stalepath-time {stalepath_time}".format(
+ **config_data["bgp"]["graceful_restart"]
+ )
+ cmd.append(command)
+ if "inject_map" in config_data["bgp"]:
+ command = "bgp inject-map {name} exist-map {exist_map_name}".format(
+ **config_data["bgp"]["inject_map"]
+ )
+ if config_data["bgp"]["inject_map"].get("copy_attributes"):
+ command += "copy-attributes"
+ cmd.append(command)
+ if "listen" in config_data["bgp"]:
+ command = "bgp listen"
+ if "limit" in config_data["bgp"]["listen"]:
+ command += " limit {limit}".format(
+ **config_data["bgp"]["listen"]
+ )
+ elif "range" in config_data["bgp"]["listen"]:
+ if config_data["bgp"]["listen"]["range"].get(
+ "ipv4_with_subnet"
+ ):
+ command += " range {ipv4_with_subnet}".format(
+ **config_data["bgp"]["listen"]["range"]
+ )
+ elif config_data["bgp"]["listen"]["range"].get(
+ "ipv6_with_subnet"
+ ):
+ command += " range {ipv6_with_subnet}".format(
+ **config_data["bgp"]["listen"]["range"]
+ )
+ if config_data["bgp"]["listen"]["range"].get("peer_group"):
+ command += " peer-group {peer_group}".format(
+ **config_data["bgp"]["listen"]["range"]
+ )
+ cmd.append(command)
+ if config_data["bgp"].get("log_neighbor_changes"):
+ cmd.append("bgp log-neighbor-changes")
+ if config_data["bgp"].get("maxas_limit"):
+ cmd.append(
+ "bgp maxas-limit {maxas_limit}".format(**config_data["bgp"])
+ )
+ if config_data["bgp"].get("maxextcommunity_limit"):
+ cmd.append(
+ "bgp maxextcommunity-limit {maxextcommunity_limit}".format(
+ **config_data["bgp"]
+ )
+ )
+ if "nexthop" in config_data["bgp"]:
+ command = "bgp nexthop"
+ if "route_map" in config_data["bgp"]["nexthop"]:
+ command += " route-map {route_map}".format(
+ **config_data["bgp"]["nexthop"]
+ )
+ elif "trigger" in config_data["bgp"]["nexthop"]:
+ if config_data["bgp"]["nexthop"]["trigger"].get("delay"):
+ command += " trigger delay {delay}".format(
+ **config_data["bgp"]["nexthop"]["trigger"]
+ )
+ elif config_data["bgp"]["nexthop"]["trigger"].get("delay"):
+ command += " trigger enable"
+ cmd.append(command)
+ if config_data["bgp"].get("recursion"):
+ cmd.append("bgp recursion host")
+ if config_data["bgp"].get("redistribute_internal"):
+ cmd.append("bgp redistribute-internal")
+ if "refresh" in config_data["bgp"]:
+ command = "bgp refresh"
+ if "max_eor_time" in config_data["bgp"]["refresh"]:
+ command += " max-eor-time {max_eor_time}".format(
+ **config_data["bgp"]["refresh"]
+ )
+ elif "stalepath_time" in config_data["bgp"]["refresh"]:
+ command += " stalepath-time {stalepath_time}".format(
+ **config_data["bgp"]["refresh"]
+ )
+ cmd.append(command)
+ if config_data["bgp"].get("regexp"):
+ cmd.append("bgp regexp deterministic")
+ if config_data["bgp"].get("route_map"):
+ cmd.append("bgp route-map priority")
+ if "router_id" in config_data["bgp"]:
+ command = "bgp router-id"
+ if "address" in config_data["bgp"]["router_id"]:
+ command += " {address}".format(
+ **config_data["bgp"]["router_id"]
+ )
+ elif "interface" in config_data["bgp"]["router_id"]:
+ command += " interface {interface}".format(
+ **config_data["bgp"]["router_id"]
+ )
+ elif "vrf" in config_data["bgp"]["router_id"]:
+ command += " vrf auto-assign"
+ cmd.append(command)
+ if config_data["bgp"].get("scan_time"):
+ cmd.append(
+ "bgp scan-time {scan_time}".format(**config_data["bgp"])
+ )
+ if "slow_peer" in config_data["bgp"]:
+ command = "bgp slow-peer"
+ if "detection" in config_data["bgp"]["slow_peer"]:
+ command += " detection"
+ if "threshold" in config_data["bgp"]["slow_peer"]["detection"]:
+ command += " threshold {threshold}".format(
+ **config_data["bgp"]["slow_peer"]["detection"]
+ )
+ elif "split_update_group" in config_data["bgp"]["slow_peer"]:
+ if (
+ "dynamic"
+ in config_data["bgp"]["slow_peer"]["split_update_group"]
+ ):
+ command += " dynamic"
+ if (
+ "permanent"
+ in config_data["bgp"]["slow_peer"][
+ "split_update_group"
+ ]
+ ):
+ command += " permanent {permanent}".format(
+ **config_data["bgp"]["slow_peer"][
+ "split_update_group"
+ ]
+ )
+ cmd.append(command)
+ if config_data["bgp"].get("snmp"):
+ cmd.append("bgp snmp traps add-type")
+ if config_data["bgp"].get("sso"):
+ cmd.append("bgp sso route-refresh-enable")
+ if config_data["bgp"].get("soft_reconfig_backup"):
+ cmd.append("bgp soft-reconfig-backup")
+ if config_data["bgp"].get("suppress_inactive"):
+ cmd.append("bgp suppress-inactive")
+ if config_data["bgp"].get("transport"):
+ cmd.append("bgp transport path-mtu-discovery")
+ if config_data["bgp"].get("update_delay"):
+ cmd.append(
+ "bgp update-delay {update_delay}".format(**config_data["bgp"])
+ )
+ if config_data["bgp"].get("update_group"):
+ cmd.append("bgp update-group split as-override")
+ if config_data["bgp"].get("upgrade_cli"):
+ command += "bgp upgrade-cli"
+ if config_data["bgp"]["upgrade_cli"].get("af_mode"):
+ command += " af-mode"
+ return cmd
+
+
+def _tmplt_bgp_dampening(config_data):
+ if "bgp" in config_data and "dampening" in config_data["bgp"]:
+ if config_data["bgp"]["dampening"].get("penalty_half_time"):
+ command = "bgp dampening {penalty_half_time}".format(
+ **config_data["bgp"]["dampening"]
+ )
+ if config_data["bgp"]["dampening"].get("reuse_route_val"):
+ command += " {reuse_route_val}".format(
+ **config_data["bgp"]["dampening"]
+ )
+ if config_data["bgp"]["dampening"].get("suppress_route_val"):
+ command += " {suppress_route_val}".format(
+ **config_data["bgp"]["dampening"]
+ )
+ if config_data["bgp"]["dampening"].get("max_suppress"):
+ command += " {max_suppress}".format(
+ **config_data["bgp"]["dampening"]
+ )
+ elif config_data["bgp"]["dampening"].get("route_map"):
+ command = "bgp dampening {route_map}".format(
+ **config_data["bgp"]["dampening"]
+ )
+ return command
+
+
+def _tmplt_bgp_graceful_shutdown(config_data):
+ if "bgp" in config_data and "graceful_shutdown" in config_data["bgp"]:
+ command = "bgp graceful-shutdown all"
+ if config_data["bgp"]["graceful_shutdown"].get("neighbors"):
+ command += " neighbors"
+ if config_data["bgp"]["graceful_shutdown"]["neighbors"].get(
+ "activate"
+ ):
+ command += " activate"
+ elif config_data["bgp"]["graceful_shutdown"]["neighbors"].get(
+ "time"
+ ):
+ command += " {time}".format(
+ **config_data["bgp"]["graceful_shutdown"]["neighbors"]
+ )
+ elif config_data["bgp"]["graceful_shutdown"].get("vrfs"):
+ command += " vrfs"
+ if config_data["bgp"]["graceful_shutdown"]["vrfs"].get("activate"):
+ command += " activate"
+ elif config_data["bgp"]["graceful_shutdown"]["neighbors"].get(
+ "time"
+ ):
+ command += " {time}".format(
+ **config_data["bgp"]["graceful_shutdown"]["vrfs"]
+ )
+ if config_data["bgp"]["graceful_shutdown"].get("local_preference"):
+ command += " local-preference {local_preference}".format(
+ **config_data["bgp"]["graceful_shutdown"]
+ )
+ if config_data["bgp"]["graceful_shutdown"].get("community"):
+ command += " community {community}".format(
+ **config_data["bgp"]["graceful_shutdown"]
+ )
+ return command
+
+
+def _tmplt_bgp_nopeerup_delay(config_data):
+ if "bgp" in config_data and "nopeerup_delay" in config_data["bgp"]:
+ commands = []
+ val = config_data["bgp"]["nopeerup_delay"]
+ cmd = "bgp nopeerup-delay"
+ if val.get("cold_boot"):
+ commands.append("{0} cold-boot {cold_boot}".format(cmd, **val))
+ elif val.get("post_boot"):
+ commands.append("{0} post-boot {post_boot}".format(cmd, **val))
+ elif val.get("nsf_switchover"):
+ commands.append(
+ "{0} nsf-switchover {nsf_switchover}".format(cmd, **val)
+ )
+ elif val.get("user_initiated"):
+ commands.append(
+ "{0} user-initiated {user_initiated}".format(cmd, **val)
+ )
+ return commands
+
+
+def _tmplt_neighbor(config_data):
+ if "neighbor" in config_data:
+ commands = []
+ cmd = "neighbor"
+ if "address" in config_data["neighbor"]:
+ cmd += " {address}".format(**config_data["neighbor"])
+ elif "tag" in config_data["neighbor"]:
+ cmd += " {tag}".format(**config_data["neighbor"])
+ elif "ipv6_adddress" in config_data["neighbor"]:
+ cmd += " {ipv6_adddress}".format(**config_data["neighbor"])
+ if "remote_as" in config_data["neighbor"]:
+ commands.append(
+ "{0} remote-as {remote_as}".format(
+ cmd, **config_data["neighbor"]
+ )
+ )
+ if "activate" in config_data["neighbor"]:
+ commands.append("{0} activate".format(cmd))
+ if "additional_paths" in config_data["neighbor"]:
+ self_cmd = "{0} additional-paths".format(cmd)
+ if "disable" in config_data["neighbor"]["additional_paths"]:
+ self_cmd += " disable"
+ elif "receive" in config_data["neighbor"]["additional_paths"]:
+ self_cmd += " receive"
+ elif "send" in config_data["neighbor"]["additional_paths"]:
+ self_cmd += " send"
+ commands.append(self_cmd)
+ if "advertise" in config_data["neighbor"]:
+ self_cmd = "{0} advertise".format(cmd)
+ if "additional_paths" in config_data["neighbor"]["advertise"]:
+ self_cmd += " additional-paths"
+ if (
+ "all"
+ in config_data["neighbor"]["advertise"]["additional_paths"]
+ ):
+ self_cmd += " all"
+ elif (
+ "best"
+ in config_data["neighbor"]["advertise"]["additional_paths"]
+ ):
+ self_cmd += " best {best}".format(
+ **config_data["neighbor"]["advertise"][
+ "additional_paths"
+ ]
+ )
+ elif (
+ "group_best"
+ in config_data["neighbor"]["advertise"]["additional_paths"]
+ ):
+ self_cmd += " group-best"
+ elif "best_external" in config_data["neighbor"]["advertise"]:
+ self_cmd += " best-external"
+ elif "diverse_path" in config_data["neighbor"]["advertise"]:
+ self_cmd += "diverse-path"
+ if (
+ "backup"
+ in config_data["neighbor"]["advertise"]["diverse_path"]
+ ):
+ self_cmd += " backup"
+ elif (
+ "mpath"
+ in config_data["neighbor"]["advertise"]["diverse_path"]
+ ):
+ self_cmd += " mpath"
+ commands.append(self_cmd)
+ if config_data["neighbor"].get("advertise_map"):
+ self_cmd = "{0} advertise-map {name}".format(
+ cmd, **config_data["neighbor"]["advertise_map"]
+ )
+ if "exist_map" in config_data["neighbor"]["advertise_map"]:
+ self_cmd += " exist-map {exist_map}".format(
+ **config_data["neighbor"]["advertise_map"]
+ )
+ elif "non_exist_map" in config_data["neighbor"]["advertise_map"]:
+ self_cmd += " exist-map {non_exist_map}".format(
+ **config_data["neighbor"]["advertise_map"]
+ )
+ commands.append(self_cmd)
+ if config_data["neighbor"].get("advertisement_interval"):
+ commands.append(
+ "{0} advertisement-interval {advertisement_interval}".format(
+ cmd, **config_data["neighbor"]
+ )
+ )
+ if config_data["neighbor"].get("aigp"):
+ self_cmd = "{0} aigp".format(cmd)
+ if config_data["neighbor"]["aigp"].get("send"):
+ self_cmd += " send"
+ if config_data["neighbor"]["aigp"]["send"].get(
+ "cost_community"
+ ):
+ self_cmd += " cost-community {id}".format(
+ **config_data["neighbor"]["aigp"]["send"][
+ "cost_community"
+ ]
+ )
+ if config_data["neighbor"]["aigp"]["send"][
+ "cost_community"
+ ].get("poi"):
+ self_cmd += " poi"
+ if config_data["neighbor"]["aigp"]["send"][
+ "cost_community"
+ ]["poi"].get("igp_cost"):
+ self_cmd += " igp-cost"
+ if config_data["neighbor"]["aigp"]["send"][
+ "cost_community"
+ ]["poi"].get("pre_bestpath"):
+ self_cmd += " pre-bestpath"
+ if config_data["neighbor"]["aigp"]["send"][
+ "cost_community"
+ ]["poi"].get("transitive"):
+ self_cmd += " transitive"
+ if config_data["neighbor"]["aigp"]["send"].get("med"):
+ self_cmd += " med"
+ commands.append(self_cmd)
+ if config_data["neighbor"].get("allow_policy"):
+ commands.append("{0} allow-policy".format(cmd))
+ if config_data["neighbor"].get("allowas_in"):
+ commands.append(
+ "{0} allowas-in {allowas_in}".format(
+ cmd, **config_data["neighbor"]
+ )
+ )
+ if config_data["neighbor"].get("as_override"):
+ commands.append("{0} as-override".format(cmd))
+ if "bmp_activate" in config_data["neighbor"]:
+ self_cmd = "{0} bmp-activate".format(cmd)
+ if config_data["neighbor"]["bmp_activate"].get("all"):
+ self_cmd += " all"
+ if "server" in config_data["neighbor"]["bmp_activate"]:
+ self_cmd += " server {server}".format(
+ **config_data["neighbor"]["bmp_activate"]
+ )
+ commands.append(self_cmd)
+ if "capability" in config_data["neighbor"]:
+ self_cmd = "{0} capability".format(cmd)
+ if config_data["neighbor"]["capability"].get("both"):
+ self_cmd += " both"
+ elif config_data["neighbor"]["capability"].get("receive"):
+ self_cmd += " receive"
+ elif config_data["neighbor"]["capability"].get("send"):
+ self_cmd += " send"
+ commands.append(self_cmd)
+ if config_data["neighbor"].get("cluster_id"):
+ commands.append(
+ "{0} cluster-id {cluster_id}".format(
+ cmd, **config_data["neighbor"]
+ )
+ )
+ if "default_originate" in config_data["neighbor"]:
+ self_cmd = "{0} default-originate".format(cmd)
+ if config_data["neighbor"]["default_originate"].get("route_map"):
+ self_cmd += " route-map {route_map}".format(
+ **config_data["neighbor"]["default_originate"]
+ )
+ commands.append(self_cmd)
+ if "description" in config_data["neighbor"]:
+ commands.append(
+ "{0} description {description}".format(
+ cmd, **config_data["neighbor"]
+ )
+ )
+ if config_data["neighbor"].get("disable_connected_check"):
+ commands.append("{0} disable-connected-check".format(cmd))
+ if "distribute_list" in config_data["neighbor"]:
+ self_cmd = "{0} distribute-list".format(cmd)
+ if "acl" in config_data["neighbor"]["distribute_list"]:
+ self_cmd += " {acl}".format(
+ **config_data["neighbor"]["distribute_list"]
+ )
+ if config_data["neighbor"]["distribute_list"].get("in"):
+ self_cmd += " in"
+ elif config_data["neighbor"]["distribute_list"].get("out"):
+ self_cmd += " out"
+ commands.append(self_cmd)
+ if config_data["neighbor"].get("dmzlink_bw"):
+ commands.append("{0} dmzlink-bw".format(cmd))
+ if "ebgp_multihop" in config_data["neighbor"]:
+ self_cmd = "{0} ebgp-multihop".format(cmd)
+ if "hop_count" in config_data["neighbor"]["ebgp_multihop"]:
+ self_cmd += " {hop_count}".format(
+ **config_data["neighbor"]["ebgp_multihop"]
+ )
+ commands.append(self_cmd)
+ if "fall_over" in config_data["neighbor"]:
+ self_cmd = "{0} fall-over".format(cmd)
+ if "bfd" in config_data["neighbor"]["fall_over"]:
+ self_cmd += " bfd"
+ if config_data["neighbor"]["fall_over"]["bfd"].get(
+ "multi_hop"
+ ):
+ self_cmd += " multi-hop"
+ elif config_data["neighbor"]["fall_over"]["bfd"].get(
+ "single_hop"
+ ):
+ self_cmd += " single-hop"
+ elif "route_map" in config_data["neighbor"]["fall_over"]:
+ self_cmd += " {route_map}".format(
+ **config_data["neighbor"]["route_map"]
+ )
+ commands.append(self_cmd)
+ if "filter_list" in config_data["neighbor"]:
+ self_cmd = "{0} filter-list".format(cmd)
+ if "path_acl" in config_data["neighbor"]["filter_list"]:
+ self_cmd += " {path_acl}".format(
+ **config_data["neighbor"]["filter_list"]
+ )
+ if config_data["neighbor"]["filter_list"].get("in"):
+ self_cmd += " in"
+ elif config_data["neighbor"]["filter_list"].get("out"):
+ self_cmd += " out"
+ commands.append(self_cmd)
+ if "ha_mode" in config_data["neighbor"]:
+ self_cmd = "{0} ha-mode".format(cmd)
+ if config_data["neighbor"]["ha_mode"].get("disable"):
+ self_cmd += " disable"
+ commands.append(self_cmd)
+ if "inherit" in config_data["neighbor"]:
+ self_cmd = "{0} inherit {inherit}".format(
+ cmd, **config_data["neighbor"]
+ )
+ commands.append(self_cmd)
+ if "local_as" in config_data["neighbor"]:
+ self_cmd = "{0} local-as".format(cmd)
+ if "number" in config_data["neighbor"]["local_as"]:
+ self_cmd += " {number}".format(
+ **config_data["neighbor"]["local_as"]
+ )
+ if config_data["neighbor"]["local_as"].get("dual_as"):
+ self_cmd += " dual-as"
+ elif config_data["neighbor"]["local_as"].get("no_prepend"):
+ self_cmd += " no-prepend"
+ if config_data["neighbor"]["local_as"]["no_prepend"]:
+ self_cmd += " replace-as"
+ commands.append(self_cmd)
+ if "log_neighbor_changes" in config_data["neighbor"]:
+ self_cmd = "{0} log-neighbor-changes".format(cmd)
+ if config_data["neighbor"]["log_neighbor_changes"].get("disable"):
+ self_cmd += " disable"
+ commands.append(self_cmd)
+ if "maximum_prefix" in config_data["neighbor"]:
+ self_cmd = "{0} maximum-prefix".format(cmd)
+ if "max_no" in config_data["neighbor"]["maximum_prefix"]:
+ self_cmd += " {max_no}".format(
+ **config_data["neighbor"]["maximum_prefix"]
+ )
+ if "threshold_val" in config_data["neighbor"]["maximum_prefix"]:
+ self_cmd += " {threshold_val}".format(
+ **config_data["neighbor"]["maximum_prefix"]
+ )
+ if config_data["neighbor"]["maximum_prefix"].get("restart"):
+ self_cmd += " restart {restart}".format(
+ **config_data["neighbor"]["maximum_prefix"]
+ )
+ elif config_data["neighbor"]["filter_list"].get("warning_only"):
+ self_cmd += " warning-only"
+ commands.append(self_cmd)
+ if "next_hop_self" in config_data["neighbor"]:
+ self_cmd = "{0} next-hop-self".format(cmd)
+ if config_data["neighbor"]["next_hop_self"].get("all"):
+ self_cmd += " all"
+ commands.append(self_cmd)
+ if "next_hop_unchanged" in config_data["neighbor"]:
+ self_cmd = "{0} next-hop-unchanged".format(cmd)
+ if config_data["neighbor"]["next_hop_unchanged"].get("allpaths"):
+ self_cmd += " allpaths"
+ commands.append(self_cmd)
+ if "password" in config_data["neighbor"]:
+ commands.append(
+ "{0} password {password}".format(
+ cmd, **config_data["neighbor"]
+ )
+ )
+ if "path_attribute" in config_data["neighbor"]:
+ self_cmd = "{0} path-attribute".format(cmd)
+ if "discard" in config_data["neighbor"]["path_attribute"]:
+ self_cmd += " discard"
+ if (
+ "type"
+ in config_data["neighbor"]["path_attribute"]["discard"]
+ ):
+ self_cmd += " {type}".format(
+ **config_data["neighbor"]["path_attribute"]["discard"]
+ )
+ elif (
+ "range"
+ in config_data["neighbor"]["path_attribute"]["discard"]
+ ):
+ self_cmd += " range"
+ if (
+ "start"
+ in config_data["neighbor"]["path_attribute"][
+ "discard"
+ ]["range"]
+ ):
+ self_cmd += " {start}".format(
+ **config_data["neighbor"]["path_attribute"][
+ "discard"
+ ]["range"]
+ )
+ elif (
+ "end"
+ in config_data["neighbor"]["path_attribute"][
+ "discard"
+ ]["range"]
+ ):
+ self_cmd += " {start}".format(
+ **config_data["neighbor"]["path_attribute"][
+ "discard"
+ ]["range"]
+ )
+ if (
+ "in"
+ in config_data["neighbor"]["path_attribute"]["discard"]
+ ):
+ self_cmd += " in"
+ if (
+ "treat_as_withdraw"
+ in config_data["neighbor"]["path_attribute"]
+ ):
+ self_cmd += " treat-as-withdraw"
+ if (
+ "type"
+ in config_data["neighbor"]["path_attribute"][
+ "treat_as_withdraw"
+ ]
+ ):
+ self_cmd += " {type}".format(
+ **config_data["neighbor"]["path_attribute"][
+ "treat_as_withdraw"
+ ]
+ )
+ elif (
+ "range"
+ in config_data["neighbor"]["path_attribute"][
+ "treat_as_withdraw"
+ ]
+ ):
+ self_cmd += " range"
+ if (
+ "start"
+ in config_data["neighbor"]["path_attribute"][
+ "treat_as_withdraw"
+ ]["range"]
+ ):
+ self_cmd += " {start}".format(
+ **config_data["neighbor"]["path_attribute"][
+ "treat_as_withdraw"
+ ]["range"]
+ )
+ elif (
+ "end"
+ in config_data["neighbor"]["path_attribute"][
+ "treat_as_withdraw"
+ ]["range"]
+ ):
+ self_cmd += " {start}".format(
+ **config_data["neighbor"]["path_attribute"][
+ "treat_as_withdraw"
+ ]["range"]
+ )
+ if (
+ "in"
+ in config_data["neighbor"]["path_attribute"][
+ "treat_as_withdraw"
+ ]
+ ):
+ self_cmd += " in"
+ commands.append(self_cmd)
+ if "peer_group" in config_data["neighbor"]:
+ commands.append(
+ "{0} peer-group {peer_group}".format(
+ cmd, **config_data["neighbor"]
+ )
+ )
+ if "remove_private_as" in config_data["neighbor"]:
+ self_cmd = "{0} remove-private-as".format(cmd)
+ if config_data["neighbor"]["remove_private_as"].get("all"):
+ self_cmd += " all"
+ elif config_data["neighbor"]["remove_private_as"].get(
+ "replace_as"
+ ):
+ self_cmd += " replace_as"
+ commands.append(self_cmd)
+ if "route_map" in config_data["neighbor"]:
+ self_cmd = "{0} route-map".format(cmd)
+ if "name" in config_data["neighbor"]["route_map"]:
+ self_cmd += " {name}".format(
+ **config_data["neighbor"]["route_map"]
+ )
+ if "in" in config_data["neighbor"]["route_map"]:
+ self_cmd += " in"
+ elif "out" in config_data["neighbor"]["route_map"]:
+ self_cmd += " out"
+ commands.append(self_cmd)
+ if "route_reflector_client" in config_data["neighbor"]:
+ commands.append("{0} route-reflector-client".format(cmd))
+ if "route_server_client" in config_data["neighbor"]:
+ self_cmd = "{0} route-server-client".format(cmd)
+ if "context" in config_data["neighbor"]["route_map"]:
+ self_cmd += " context {context}".format(
+ **config_data["neighbor"]["route_server_client"]
+ )
+ commands.append(self_cmd)
+ if "send_community" in config_data["neighbor"]:
+ self_cmd = "{0} send-community".format(cmd)
+ if config_data["neighbor"]["send_community"].get("both"):
+ self_cmd += " both"
+ elif config_data["neighbor"]["send_community"].get("extended"):
+ self_cmd += " extended"
+ elif config_data["neighbor"]["send_community"].get("standard"):
+ self_cmd += " standard"
+ commands.append(self_cmd)
+ if "send_label" in config_data["neighbor"]:
+ self_cmd = "{0} send-label".format(cmd)
+ if config_data["neighbor"]["send_label"].get("explicit_null"):
+ self_cmd += " explicit-null"
+ commands.append(self_cmd)
+ if "shutdown" in config_data["neighbor"]:
+ self_cmd = "{0} shutdown".format(cmd)
+ if "graceful" in config_data["neighbor"]["route_map"]:
+ self_cmd += " graceful {graceful}".format(
+ **config_data["neighbor"]["shutdown"]
+ )
+ commands.append(self_cmd)
+ if "slow_peer" in config_data["neighbor"]:
+ self_cmd = "{0} slow-peer".format(cmd)
+ if "detection" in config_data["neighbor"]["slow_peer"]:
+ self_cmd += " detection"
+ if (
+ "disable"
+ in config_data["neighbor"]["slow_peer"]["detection"]
+ ):
+ self_cmd += " disable"
+ elif (
+ "threshold"
+ in config_data["neighbor"]["slow_peer"]["detection"]
+ ):
+ self_cmd += " threshold {threshold}".format(
+ **config_data["neighbor"]["slow_peer"]["detection"]
+ )
+ elif "split_update_group" in config_data["neighbor"]["slow_peer"]:
+ self_cmd += " split-update-group"
+ if (
+ "dynamic"
+ in config_data["neighbor"]["slow_peer"][
+ "split_update_group"
+ ]
+ ):
+ self_cmd += " dynamic"
+ if (
+ "disable"
+ in config_data["neighbor"]["slow_peer"][
+ "split_update_group"
+ ]["dynamic"]
+ ):
+ self_cmd += " disable"
+ elif (
+ "permanent"
+ in config_data["neighbor"]["slow_peer"][
+ "split_update_group"
+ ]["dynamic"]
+ ):
+ self_cmd += " permanent"
+ elif (
+ "static"
+ in config_data["neighbor"]["slow_peer"][
+ "split_update_group"
+ ]
+ ):
+ self_cmd += " static"
+ commands.append(self_cmd)
+ if "soft_reconfiguration" in config_data["neighbor"]:
+ commands.append("{0} soft-reconfiguration".format(cmd))
+ if "timers" in config_data["neighbor"]:
+ self_cmd = "{0} timers {interval} {holdtime}".format(
+ cmd, **config_data["neighbor"]["timers"]
+ )
+ if "min_holdtime" in config_data["neighbor"]["timers"]:
+ self_cmd += " {min_holdtime}".format(
+ **config_data["neighbor"]["timers"]
+ )
+ commands.append(self_cmd)
+ if "translate_update" in config_data["neighbor"]:
+ self_cmd = "{0} translate-update".format(cmd)
+ if config_data["neighbor"]["send_community"].get("nlri"):
+ self_cmd += " nlri"
+ if config_data["neighbor"]["nlri"].get("multicast"):
+ self_cmd += "multicast"
+ if config_data["neighbor"]["nlri"].get("unicast"):
+ self_cmd += "unicast"
+ commands.append(self_cmd)
+ if "transport" in config_data["neighbor"]:
+ self_cmd = "{0} transport".format(cmd)
+ if config_data["neighbor"]["transport"].get("connection_mode"):
+ self_cmd += " connection-mode"
+ if config_data["neighbor"]["transport"]["connection_mode"].get(
+ "active"
+ ):
+ self_cmd += " active"
+ elif config_data["neighbor"]["transport"][
+ "connection_mode"
+ ].get("passive"):
+ self_cmd += " passive"
+ elif config_data["neighbor"]["transport"].get("multi_session"):
+ self_cmd += " multi-session"
+ elif config_data["neighbor"]["transport"].get(
+ "path_mtu_discovery"
+ ):
+ self_cmd += " path-mtu-discovery"
+ if config_data["neighbor"]["transport"][
+ "path_mtu_discovery"
+ ].get("disable"):
+ self_cmd += " disable"
+ commands.append(self_cmd)
+ if "ttl_security" in config_data["neighbor"]:
+ commands.append(
+ "{0} ttl-security {ttl_security}".format(
+ cmd, **config_data["neighbor"]
+ )
+ )
+ if "unsuppress_map" in config_data["neighbor"]:
+ commands.append(
+ "{0} unsuppress-map {unsuppress_map}".format(
+ cmd, **config_data["neighbor"]
+ )
+ )
+ if "version" in config_data["neighbor"]:
+ commands.append(
+ "{0} version {version}".format(cmd, **config_data["neighbor"])
+ )
+ if "weight" in config_data["neighbor"]:
+ commands.append(
+ "{0} weight {weight}".format(cmd, **config_data["neighbor"])
+ )
+ return commands
+
+
+def _tmplt_redistribute(config_data):
+ if "redistribute" in config_data:
+
+ def common_config(command, param):
+ if config_data["redistribute"][param].get("metric"):
+ command += " metric {metric}".format(
+ **config_data["redistribute"][param]
+ )
+ if config_data["redistribute"][param].get("route_map"):
+ command += " route-map {route_map}".format(
+ **config_data["redistribute"][param]
+ )
+ return command
+
+ command = "redistribute"
+ if config_data["redistribute"].get("application"):
+ command += " application {name}".format(
+ **config_data["redistribute"]["application"]
+ )
+ command = common_config(command, "application")
+ elif config_data["redistribute"].get("bgp"):
+ command += " bgp {as_number}".format(
+ **config_data["redistribute"]["bgp"]
+ )
+ command = common_config(command, "bgp")
+ elif config_data["redistribute"].get("connected"):
+ command += " connected"
+ command = common_config(command, "connected")
+ elif config_data["redistribute"].get("eigrp"):
+ command += " eigrp {as_number}".format(
+ **config_data["redistribute"]["eigrp"]
+ )
+ command = common_config(command, "eigrp")
+ elif config_data["redistribute"].get("isis"):
+ command += " isis {area_tag}".format(
+ **config_data["redistribute"]["isis"]
+ )
+ if config_data["redistribute"]["isis"].get("clns"):
+ command += " clns"
+ elif config_data["redistribute"]["isis"].get("ip"):
+ command += " ip"
+ command = common_config(command, "isis")
+ elif config_data["redistribute"].get("iso_igrp"):
+ command += " iso-igrp {area_tag}".format(
+ **config_data["redistribute"]["iso_igrp"]
+ )
+ if config_data["redistribute"]["iso_igrp"].get("route_map"):
+ command += " route-map {route_map}".format(
+ **config_data["redistribute"]["iso_igrp"]
+ )
+ elif config_data["redistribute"].get("lisp"):
+ command += " lisp"
+ command = common_config(command, "lisp")
+ elif config_data["redistribute"].get("mobile"):
+ command += " mobile"
+ command = common_config(command, "mobile")
+ elif config_data["redistribute"].get("odr"):
+ command += " odr"
+ command = common_config(command, "odr")
+ elif config_data["redistribute"].get("rip"):
+ command += " rip"
+ command = common_config(command, "rip")
+ elif config_data["redistribute"].get("ospf"):
+ command += " ospf {process_id}".format(
+ **config_data["redistribute"]["ospf"]
+ )
+ if config_data["redistribute"]["ospf"].get("match"):
+ command += " match"
+ if config_data["redistribute"]["ospf"]["match"].get(
+ "external"
+ ):
+ command += " external"
+ if config_data["redistribute"]["ospf"]["match"].get(
+ "internal"
+ ):
+ command += " internal"
+ if config_data["redistribute"]["ospf"]["match"].get(
+ "nssa_external"
+ ):
+ command += " nssa-external"
+ if config_data["redistribute"]["ospf"]["match"].get("type_1"):
+ command += " 1"
+ elif config_data["redistribute"]["ospf"]["match"].get(
+ "type_2"
+ ):
+ command += " 2"
+ if config_data["redistribute"]["ospf"].get("vrf"):
+ command += " vrf"
+ command = common_config(command, "ospf")
+ elif config_data["redistribute"].get("ospfv3"):
+ command += " ospfv3 {process_id}".format(
+ **config_data["redistribute"]["ospfv3"]
+ )
+ if config_data["redistribute"]["ospfv3"].get("match"):
+ command += " match"
+ if config_data["redistribute"]["ospfv3"]["match"].get(
+ "external"
+ ):
+ command += " external"
+ if config_data["redistribute"]["ospfv3"]["match"].get(
+ "internal"
+ ):
+ command += " internal"
+ if config_data["redistribute"]["ospfv3"]["match"].get(
+ "nssa_external"
+ ):
+ command += " nssa-external"
+ if config_data["redistribute"]["ospfv3"]["match"].get(
+ "type_1"
+ ):
+ command += " 1"
+ elif config_data["redistribute"]["ospfv3"]["match"].get(
+ "type_2"
+ ):
+ command += " 2"
+ command = common_config(command, "ospf")
+ elif config_data["redistribute"].get("static"):
+ command += " static"
+ command = common_config(command, "static")
+ elif config_data["redistribute"].get("vrf"):
+ if config_data["redistribute"]["vrf"].get("name"):
+ command += " vrf {name}".format(
+ **config_data["redistribute"]["vrf"]
+ )
+ elif config_data["redistribute"]["vrf"].get("global"):
+ command += " vrf global"
+
+ return command
+
+
+def _tmplt_bgp_timers(config_data):
+ if "timers" in config_data:
+ command = "timers bgp"
+ if config_data["timers"].get("keepalive"):
+ command += " {keepalive}".format(**config_data["timers"])
+ if config_data["timers"].get("holdtime"):
+ command += " {holdtime}".format(**config_data["timers"])
+ if config_data["timers"].get("min_holdtime"):
+ command += " {min_holdtime}".format(**config_data["timers"])
+ return command
+
+
+class Bgp_globalTemplate(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(Bgp_globalTemplate, self).__init__(lines=lines, tmplt=self)
+
+ PARSERS = [
+ {
+ "name": "as_number",
+ "getval": re.compile(
+ r"""^router*
+ \s*bgp*
+ \s*(?P<as_number>\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "compval": "as_number",
+ "setval": "router bgp {{ as_number }}",
+ "result": {"as_number": "{{ as_number }}"},
+ "shared": True,
+ },
+ {
+ "name": "bgp.additional_paths",
+ "getval": re.compile(
+ r"""\s*bgp*
+ \s*additional-paths*
+ \s*(?P<install>install)*
+ \s*(?P<receive>receive)*
+ \s*(?P<select>select)*
+ \s*(?P<select_all>all)*
+ \s*(?P<select_backup>backup)*
+ \s*(?P<select_best>best\s\d)*
+ \s*(?P<select_best_external>best-external)*
+ \s*(?P<select_group_best>group-best)*
+ \s*(?P<send>send)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_bgp_additional_paths,
+ "result": {
+ "bgp": {
+ "additional_paths": {
+ "install": "{{ True if install is defined }}",
+ "receive": "{{ True if receive is defined }}",
+ "select": {
+ "all": "{{ True if select_all is defined }}",
+ "backup": "{{ True if select_backup is defined }}",
+ "best": "{{ select_best.split('best ')[1] if select_best is defined }}",
+ "best_external": "{{ True if select_best_external is defined }}",
+ "group_best": "{{ True if select_group_best is defined }}",
+ },
+ "send": "{{ True if send is defined }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "bgp.bestpath",
+ "getval": re.compile(
+ r"""\s*bgp*
+ \s*bestpath*
+ \s*(?P<aigp>aigp\signore)*
+ \s*(?P<compare_routerid>compare-routerid)*
+ \s*(?P<cost_community>cost-community\signore)*
+ \s*(?P<med>med\s(confed|missing-as-worst|confed\smissing-as-worst))*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_bgp_bestpath,
+ "result": {
+ "bgp": {
+ "bestpath": [
+ {
+ "aigp": "{{ True if aigp is defined }}",
+ "compare_routerid": "{{ True if compare_routerid is defined }}",
+ "cost_community": "{{ True if cost_community is defined }}",
+ "med": {
+ "confed": "{{ True if med is defined and 'confed' in med }}",
+ "missing_as_worst": "{{ True if med is defined and 'missing-as-worst' in med }}",
+ },
+ }
+ ]
+ }
+ },
+ },
+ {
+ "name": "bgp.config",
+ "getval": re.compile(
+ r"""\s*bgp*
+ \s*(?P<advertise_best_external>advertise-best-external)*
+ \s*(?P<aggregate_timer>aggregate-timer\s\d+)*
+ \s*(?P<always_compare_med>always-compare-med)*
+ \s*(?P<asnotation>asnotation\sdot)*
+ \s*(?P<client_to_client>client-to-client\sreflection\s(all|intra-cluster))*
+ \s*(?P<cluster_id>cluster-id\s.*)*
+ \s*(?P<confederation>confederation\s(identifier\s\d+|peers\s\d+))*
+ \s*(?P<consistency_checker>consistency-checker\s((auto-repair\sinterval\s\d+|auto-repair)|(error-message\sinterval\s\d+|error-message)))*
+ \s*(?P<deterministic_med>deterministic-med)*
+ \s*(?P<dmzlink_bw>dmzlink-bw)*
+ \s*(?P<enforce_first_as>enforce-first-as)*
+ \s*(?P<enhanced_error>enhanced-error)*
+ \s*(?P<fast_external_fallover>fast-external-fallover)*
+ \s*(?P<graceful_restart>graceful-restart(\sextended|\srestart-time\s\d+|\sstalepath-time\s\d+))*
+ \s*(?P<inject_map>inject-map\s\S+\sexist-map\s\S+\scopy-attributes|inject-map\s\S+\sexist-map\s\S+)*
+ \s*(?P<listen>listen\s(limit\s\d+|(range\s.*peer-group\s\S+|range\s.*)))*
+ \s*(?P<log_neighbor_changes>log-neighbor-changes)*
+ \s*(?P<maxas_limit>maxas-limit\s\d+)*
+ \s*(?P<maxcommunity_limit>maxas-limit\s\d+)*
+ \s*(?P<maxextcommunity_limit>maxextcommunity-limit\s\d+)*
+ \s*(?P<nexthop>nexthop\s(route-map\s\S+|trigger\s(delay\s\d+|enable)))*
+ \s*(?P<recursion>recursion\shost)*
+ \s*(?P<redistribute_internal>redistribute-internal)*
+ \s*(?P<refresh>refresh\s(max-eor-time\s\d+|stalepath-time\s\d+))*
+ \s*(?P<regexp>regexp\sdeterministic)*
+ \s*(?P<router_id>router-id\s((?:[0-9]{1,3}\.){3}[0-9]{1,3}|interface\s\S+\s\S+|vrf\sauto-assign))*
+ \s*(?P<route_map>route-map\spriority)*
+ \s*(?P<scan_time>scan-time\s\d+)*
+ \s*(?P<slow_peer>slow-peer((\sdetection\sthreshold\d+|\sdetection)|(\ssplit-update-group\sdynamic\spermanent|\ssplit-update-group\sdynamic)))*
+ \s*(?P<snmp>snmp\straps\sadd-type)*
+ \s*(?P<sso>sso\sroute-refresh-enable)*
+ \s*(?P<soft_reconfig_backup>soft-reconfig-backup)*
+ \s*(?P<suppress_inactive>suppress-inactive)*
+ \s*(?P<transport>transport\spath-mtu-discovery)*
+ \s*(?P<update_delay>update-delay\s\d+)*
+ \s*(?P<update_group>update-group\ssplit\sas-override)*
+ \s*(?P<upgrade_cli>upgrade-cli\saf-mode|upgrade-cli)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_bgp_config,
+ "compval": "bgp",
+ "result": {
+ "bgp": {
+ "advertise_best_external": "{{ True if advertise_best_external is defined }}",
+ "aggregate_timer": "{{ aggregate_timer.split('aggregate-timer ')[1] if aggregate_timer is defined }}",
+ "always_compare_med": "{{ True if always_compare_med is defined }}",
+ "asnotation": "{{ True if asnotation is defined }}",
+ "client_to_client": {
+ "set": "{{ True if client_to_client is defined and client_to_client.split(' ')|length == 2 }}",
+ "all": "{{ True if client_to_client is defined and 'all' in client_to_client }}",
+ "intra_cluster": "{{\
+ client_to_client.split('cluster-id ')[1]\
+ if client_to_client is defined and 'intra-cluster' in client_to_client }}",
+ },
+ "cluster_id": "{{ cluster_id.split('cluster-id ')[1] if cluster_id is defined }}",
+ "confederation": {
+ "identifier": "{{ confederation.split('confederation identifier ')[1] if confederation is defined }}",
+ "peers": "{{ confederation.split('confederation peers ')[1] if confederation is defined }}",
+ },
+ "consistency_checker": {
+ "auto_repair": {
+ "set": "{{\
+ True if consistency_checker is defined and\
+ 'auto-repair' in consistency_checker and\
+ consistency_checker.split(' ')|length == 2 }}",
+ "interval": "{{\
+ consistency_checker.split('interval ')[1] if consistency_checker is defined and\
+ consistency_checker.split(' ')|length > 2 }}",
+ },
+ "error_message": {
+ "set": "{{\
+ True if consistency_checker is defined and\
+ 'error-message' in consistency_checker and consistency_checker.split(' ')|length == 2 }}",
+ "interval": "{{\
+ consistency_checker.split('interval ')[1] if consistency_checker is defined and\
+ consistency_checker.split(' ')|length > 2 }}",
+ },
+ },
+ "deterministic_med": "{{ True if deterministic_med is defined }}",
+ "dmzlink_bw": "{{ True if dmzlink_bw is defined }}",
+ "enforce_first_as": "{{ True if enforce_first_as is defined }}",
+ "enhanced_error": "{{ True if enhanced_error is defined }}",
+ "fast_external_fallover": "{{ True if fast_external_fallover is defined }}",
+ "graceful_restart": {
+ "set": "{{ True if graceful_restart is defined and graceful_restart.split(' ')|length == 2 }}",
+ "extended": "{{ True if graceful_restart is defined and 'extended' in graceful_restart }}",
+ "restart_time": "{{\
+ graceful_restart.split('graceful-restart restart-time ')[1] if graceful_restart is defined and\
+ 'restart-time' in graceful_restart }}",
+ "stalepath_time": "{{\
+ graceful_restart.split('graceful-restart stalepath-time ')[1] if graceful_restart is defined and\
+ 'stalepath-time' in graceful_restart }}",
+ },
+ "inject_map": {
+ "name": "{{ inject_map.split(' ')[1] if inject_map is defined }}",
+ "exist_map_name": "{{ inject_map.split('exist-map ')[1].split(' ')[0] if inject_map is defined and 'exist-map' in inject_map }}",
+ "copy_attributes": "{{ True if inject_map is defined and 'copy-attributes' in inject_map }}",
+ },
+ "listen": {
+ "limit": "{{ listen.split('limit ')[1] if listen is defined and 'limit' in listen }}",
+ "range": {
+ "ipv4_with_subnet": "{{ listen.split('range ')[1].split(' ')[0] if listen is defined and ':' not in listen and '.' in listen }}",
+ "ipv6_with_subnet": "{{ listen.split('range ')[1].split(' ')[0] if listen is defined and ':' in listen and '.' in listen }}",
+ "peer_group": "{{ listen.split('peer-group ')[1] if listen is defined and 'peer-group' in listen }}",
+ },
+ },
+ "log_neighbor_changes": "{{ True if log_neighbor_changes is defined }}",
+ "maxas_limit": "{{ maxas_limit.split('maxas-limit ')[1] if maxas_limit is defined }}",
+ "maxcommunity_limit": "{{ maxcommunity_limit.split('maxcommunity-limit ')[1] if maxcommunity_limit is defined }}",
+ "maxextcommunity_limit": "{{ maxextcommunity_limit.split('maxextcommunity-limit ')[1] if maxextcommunity_limit is defined }}",
+ "nexthop": {
+ "route_map": "{{ nexthop.split('route-map ')[1] if nexthop is defined and 'route-map' in nexthop }}",
+ "trigger": {
+ "delay": "{{ nexthop.split('delay ')[1] if nexthop is defined and 'delay' in nexthop }}",
+ "enable": "{{ True if nexthop is defined and 'enable' in nexthop }}",
+ },
+ },
+ "recursion": "{{ True if recursion is defined }}",
+ "redistribute_internal": "{{ True if redistribute_internal is defined }}",
+ "refresh": {
+ "max_eor_time": "{{ refresh.split('max-eor-time ')[1] if refresh is defined }}",
+ "stalepath_time": "{{ refresh.split('stalepath-time ')[1] if refresh is defined }}",
+ },
+ "regexp": "{{ True if regexp is defined }}",
+ "router_id": {
+ "address": "{{ router_id.split(' ')[1] if router_id is defined and '.' in router_id }}",
+ "interface": "{{ router_id.split('interface ')[1] if router_id is defined and 'interface' in router_id }}",
+ "vrf": "{{ True if router_id is defined and 'vrf auto-assign' in router_id }}",
+ },
+ "route_map": "{{ True if route_map is defined }}",
+ "scan_time": "{{ scan_time.split('scan-time ')[1] if scan_time is defined }}",
+ "slow_peer": {
+ "detection": {
+ "set": "{{ True if slow_peer is defined and 'detection' in slow_peer and 'threshold' not in slow_peer }}",
+ "threshold": "{{ slow_peer.split('threshold ')[1] if slow_peer is defined and 'threshold' in slow_peer }}",
+ },
+ "split_update_group": {
+ "dynamic": "{{ True if split_dynamic is defined and split_dynamic.split('dynamic ')[1] == 'disable' }}",
+ "static": "{{ True if split_static is defined }}",
+ },
+ },
+ "snmp": "{{ True if snmp is defined }}",
+ "sso": "{{ True if sso is defined }}",
+ "soft_reconfig_backup": "{{ True if soft_reconfig_backup is defined }}",
+ "suppress_inactive": "{{ True if suppress_inactive is defined }}",
+ "transport": "{{ True if transport is defined }}",
+ "update_delay": "{{ update_delay.split('update-delay ')[1] if update_delay is defined }}",
+ "update_group": "{{ True if update_group is defined }}",
+ "upgrade_cli": {
+ "set": "{{ True if graceful_restart is defined and graceful_restart.split(' ')|length == 2 }}",
+ "af_mode": "{{ True if upgrade_cli is defined and 'af-mode' in upgrade_cli }}",
+ },
+ }
+ },
+ },
+ {
+ "name": "bgp.dampening",
+ "getval": re.compile(
+ r"""\s*bgp*
+ \s*dampening*
+ \s*(?P<penalty_half_time>\d+)*
+ \s*(?P<reuse_route_val>\d+)*
+ \s*(?P<suppress_route_val>\d+)*
+ \s*(?P<max_suppress>\d+)*
+ \s*(?P<route_map>\S+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_bgp_dampening,
+ "result": {
+ "bgp": {
+ "dampening": {
+ "penalty_half_time": "{{ penalty_half_time if penalty_half_time is defined }}",
+ "reuse_route_val": "{{ reuse_route_val if penalty_half_time is defined }}",
+ "suppress_route_val": "{{ suppress_route_val if penalty_half_time is defined }}",
+ "max_suppress": "{{ max_suppress if penalty_half_time is defined }}",
+ "route_map": "{{ dampening.split('route-map ')[1] if dampening is defined and 'route-map' in dampening }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "bgp.graceful_shutdown",
+ "getval": re.compile(
+ r"""\s*bgp*
+ \s*graceful-shutdown\sall*
+ \s*(?P<neighbors>neighbors\s(\d+|activate))*
+ \s*(?P<vrfs>vrfs\s(\d+|activate))*
+ \s*(?P<local_preference>local-preference\s\d+)*
+ \s*(?P<community>community\s\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_bgp_graceful_shutdown,
+ "result": {
+ "bgp": {
+ "graceful_shutdown": {
+ "neighbors": {
+ "time": "{{ neighbors.split('neighbors ')[1] if neighbors is defined and 'activate' not in neighbors }}",
+ "activate": "{{ True if neighbors is defined and 'activate' in neighbors }}",
+ },
+ "vrfs": {
+ "time": "{{ vrfs.split('vrfs ')[1] if vrfs is defined and 'activate' not in vrfs }}",
+ "activate": "{{ True if vrfs is defined and 'activate' in vrfs }}",
+ },
+ "community": "{{ community.split('community ')[1] if community is defined }}",
+ "local_preference": "{{ local_preference.split('local-preference ')[1] if local_preference is defined }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "bgp.nopeerup_delay",
+ "getval": re.compile(
+ r"""\s*bgp*
+ \s*nopeerup-delay*
+ \s*(?P<cold_boot>cold-boot\s\d+)*
+ \s*(?P<nsf_switchover>nsf-switchover\s\d+)*
+ \s*(?P<post_boot>post-boot\s\d+)*
+ \s*(?P<user_initiated>user-initiated\s\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_bgp_nopeerup_delay,
+ "result": {
+ "bgp": {
+ "nopeerup_delay": [
+ {
+ "cold_boot": "{{ cold_boot.split('cold-boot ')[1] if cold_boot is defined }}",
+ "nsf_switchover": "{{ nsf_switchover.split('nsf-switchover ')[1] if nsf_switchover is defined }}",
+ "post_boot": "{{ post_boot.split('post-boot ')[1] if post_boot is defined }}",
+ "user_initiated": "{{ user_initiated.split('user-initiated ')[1] if user_initiated is defined }}",
+ }
+ ]
+ }
+ },
+ },
+ {
+ "name": "neighbor",
+ "getval": re.compile(
+ r"""\s*neighbor*
+ \s*(?P<neighbor>(?:[0-9]{1,3}\.){3}[0-9]{1,3}|host\s(?:[0-9]{1,3}\.){3}[0-9]{1,3}|(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\S+|\S+)*
+ \s*(?P<activate>activate)*
+ \s*(?P<additional_paths>additional-paths\s(disable|receive|send))*
+ \s*(?P<advertise>advertise\sadditional-paths\sall\sbest\s\d+\sgroup-best|advertise\sadditional-paths\sbest\s\d+\sgroup-best|advertise\sadditional-paths\sall\sgroup-best|advertise\sbest-external|advertise\sdiverse-path\sbackup\smpath|advertise\sdiverse-path\sbackup|advertise\sdiverse-path\smpath)*
+ \s*(?P<advertisement_interval>advertisement-interval\s\d+)*
+ \s*(?P<aigp>aigp\ssend\scost-community\s\d+\spoi\sigp-cost\stransitive|aigp\ssend\scost-community\s\d+\spoi\spre-bestpath\stransitive|aigp\ssend\smed|aigp)*
+ \s*(?P<allow_policy>allow-policy)*
+ \s*(?P<allowas_in>allowas-in\s\d+)*
+ \s*(?P<as_override>as-override)*
+ \s*(?P<bmp_activate>bmp-activate\s(all|server\s\d+))*
+ \s*(?P<capability>capability\s(both|receive|send))*
+ \s*(?P<cluster_id>cluster-id\s\S+)*
+ \s*(?P<default_originate>default-originate\sroute-map|default-originate)*
+ \s*(?P<description>description\s\S.+)*
+ \s*(?P<disable_connected_check>disable-connected-check)*
+ \s*(?P<distribute_list>distribute-list\s\d+\s(in|out))*
+ \s*(?P<dmzlink_bw>dmzlink-bw)*
+ \s*(?P<ebgp_multihop>(ebgp-multihop\s\d+|ebgp-multihop))*
+ \s*(?P<fall_over>fall-over\s((bfd\s(single-hop|multi-hop)|bfd)|route-map\s\S+))*
+ \s*(?P<filter_list>filter-list\s\d+\s(in|out))*
+ \s*(?P<ha_mode>ha-mode\s(graceful-restart\sdisable|graceful-restart))*
+ \s*(?P<inherit>inherit\speer-session\s\S+)*
+ \s*(?P<local_as>(local-as\s\d+\s(dual-as|(no-prepend\sreplace-as|no-prepend))|local-as))*
+ \s*(?P<log_neighbor_changes>log-neighbor-changes\sdisable|log-neighbor-changes)*
+ \s*(?P<maximum_prefix>maximum-prefix\s(\d+\s\d+\s(restart\s\d+|warning-only)|\d+\s(restart\s\d+|warning-only)))*
+ \s*(?P<next_hop_self>next-hop-self\sall|next-hop-self)*
+ \s*(?P<next_hop_unchanged>next-hop-unchanged\sallpaths|next-hop-unchanged)*
+ \s*(?P<password>password\s\S+)*
+ \s*(?P<path_attribute>path-attribute\s(discard\srange\s\d+\s\d+\sin|discard\s\d+\sin)|path-attribute\s(treat-as-withdraw\srange\s\d+\s\d+\sin|treat-as-withdraw\s\d+\sin))*
+ \s*(?P<peer_group>peer-group\s\S+)*
+ \s*(?P<remote_as>remote-as\s\d+)*
+ \s*(?P<remove_private_as>remove-private-as\sall\sreplace-as|remove-private-as\sall|remove-private-as)*
+ \s*(?P<route_map>route-map\s\S+\s(in|out))*
+ \s*(?P<route_reflector_client>route-reflector-client)*
+ \s*(?P<route_server_client>route-server-client\scontext\s\S+|route-server-client)*
+ \s*(?P<send_community>send-community\s(both|extended|standard)|send-community)*
+ #\s*(?P<send_label>send-label\sexplicit-null|send-label)*
+ \s*(?P<soft_reconfiguration>soft-reconfiguration\sinbound)*
+ \s*(?P<slow_peer>slow-peer\s(detection.*|split-update-group.*))*
+ \s*(?P<timers>(timers\s\d+\s\d+\s\d+|timers\s\d+\s\d+))*
+ \s*(?P<transport>(transport\s(connection-mode\sactive|connection-mode\spassive)|transport\smulti-session|transport\s(path-mtu-discovery\sdisable|path-mtu-discovery)))*
+ \s*(?P<ttl_security>ttl-security\shops\s\d+)*
+ \s*(?P<unsuppress_map>unsuppress-map\s\S+)*
+ \s*(?P<version>version\s\d+)*
+ \s*(?P<weight>weight\s\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_neighbor,
+ "compval": "neighbor",
+ "result": {
+ "neighbor": [
+ {
+ "address": "{{ neighbor if ':' not in neighbor and '.' in neighbor }}",
+ "ipv6_address": "{{ neighbor if ':' in neighbor and '.' in neighbor }}",
+ "tag": "{{ neighbor if ':' not in neighbor and '.' not in neighbor }}",
+ "activate": "{{ True if activate is defined }}",
+ "additional_paths": {
+ "disable": "{{ True if additional_paths is defined and 'disable' in additional_paths }}",
+ "receive": "{{ True if additional_paths is defined and 'receive' in additional_paths }}",
+ "send": "{{ True if additional_paths is defined and 'send' in additional_paths }}",
+ },
+ "advertise": {
+ "additional_paths": {
+ "all": "{{ True if advertise is defined and 'additional-paths' in advertise and 'all' in advertise }}",
+ "best": "{{\
+ advertise.split('best ')[1].split(' ')[0] if advertise is defined and\
+ 'additional-paths' in advertise and 'best' in advertise }}",
+ "group_best": "{{ True if advertise is defined and 'additional-paths' in advertise and 'group-best' in advertise }}",
+ },
+ "best_external": "{{ True if advertise is defined and 'best-external' in advertise }}",
+ "diverse_path": {
+ "backup": "{{ True if advertise is defined and 'diverse-path' in advertise and 'backup' in advertise }}",
+ "mpath": "{{ True if advertise is defined and 'diverse-path' in advertise and 'mpath' in advertise }}",
+ },
+ },
+ "advertisement_interval": "{{ advertisement_interval.split('advertisement-interval ')[1] if advertisement_interval is defined }}",
+ "aigp": {
+ "enable": "{{ True if aigp is defined and aigp.split(' ')|length == 1 }}",
+ "send": {
+ "cost_community": {
+ "id": "{{ aigp.split('send cost-community ')[1].split(' ')[0] if aigp is defined and 'send cost-community' in aigp }}",
+ "poi": {
+ "igp_cost": "{{ True if aigp is defined and 'poi igp-cost' in aigp }}",
+ "pre_bestpath": "{{ True if aigp is defined and 'poi pre-bestpath' in aigp }}",
+ "transitive": "{{ True if aigp is defined and 'transitive' in aigp }}",
+ },
+ },
+ "med": "{{ True if aigp is defined and 'send med' in aigp }}",
+ },
+ },
+ "allow_policy": "{{ True if allow_policy is defined }}",
+ "allowas_in": "{{ allowas_in.split('allowas-in ')[1] if allowas_in is defined }}",
+ "as_override": "{{ True if as_override is defined }}",
+ "bmp_activate": {
+ "all": "{{ True if bmp_activate is defined and 'all' in bmp_activate }}",
+ "server": "{{ bmp_activate.split('server ')[1] if bmp_activate is defined and 'server' in bmp_activate }}",
+ },
+ "capability": {
+ "both": "{{ True if capability is defined and 'both' in capability }}",
+ "receive": "{{ True if capability is defined and 'receive' in capability }}",
+ "send": "{{ True if capability is defined and 'send' in capability }}",
+ },
+ "cluster_id": "{{ cluster_id.split('cluster-id ')[1] if bmp_activate is defined }}",
+ "default_originate": {
+ "set": "{{ True if default_originate is defined and default_originate.split(' ')|length == 1 }}",
+ "route_map": "{{ default_originate.split(' ')[1] if default_originate is defined and default_originate.split(' ')|length > 1 }}",
+ },
+ "description": "{{ description.split('description ')[1] if description is defined }}",
+ "disable_connected_check": "{{ True if disable_connected_check is defined }}",
+ "distribute_list": {
+ "acl": "{{ distribute_list.split(' ')[1] if distribute_list is defined }}",
+ "in": "{{ True if distribute_list is defined and 'in' in distribute_list }}",
+ "out": "{{ True if distribute_list is defined and 'out' in distribute_list }}",
+ },
+ "dmzlink_bw": "{{ True if dmzlink_bw is defined }}",
+ "ebgp_multihop": {
+ "enable": "{{ True if ebgp_multihop is defined and ebgp_multihop.split(' ')|length == 1 }}",
+ "hop_count": "{{ ebgp_multihop.split(' ')[1] if ebgp_multihop is defined and len(ebgp_multihop.split(' ')) > 1 }}",
+ },
+ "fall_over": {
+ "bfd": {
+ "set": "{{ True if fall_over is defined and\
+ 'bfd' in fall_over and 'single-hop' not in fall_over and 'multi-hop' not in fall_over }}",
+ "multi_hop": "{{ True if fall_over is defined and 'bfd' in fall_over and 'multi-hop' in fall_over }}",
+ "single_hop": "{{ True if fall_over is defined and 'bfd' in fall_over and 'single-hop' in fall_over }}",
+ },
+ "route_map": "{{ fall_over.split('fall-over route-map ')[1] if fall_over is defined and 'route-map' in fall_over }}",
+ },
+ "filter_list": {
+ "acl": "{{ filter_list.split(' ')[1] if filter_list is defined }}",
+ "in": "{{ True if filter_list is defined and 'in' in filter_list }}",
+ "out": "{{ True if filter_list is defined and 'out' in filter_list }}",
+ },
+ "ha_mode": {
+ "set": "{{ True if ha_mode is defined and 'disable' not in ha_mode }}",
+ "disable": "{{ True if ha_mode is defined and 'disable' in ha_mode }}",
+ },
+ "inherit": "{{ inherit.split('inherit peer-session ')[1] if inherit is defined }}",
+ "local_as": {
+ "set": "{{ True if local_as is defined and local_as.split(' ')|length == 1 }}",
+ "number": "{{ local_as.split(' ')[1] if local_as is defined and local_as.split(' ')|length > 1 }}",
+ "dual_as": "{{ True if local_as is defined and local_as.split(' ')|length > 2 and 'dual-as' in local_as }}",
+ "no_prepend": {
+ "set": "{{\
+ True if local_as is defined and\
+ local_as.split(' ')|length > 2 and 'no-prepend' in local_as and\
+ 'replace-as' not in local_as }}",
+ "replace_as": "{{ True if local_as is defined and\
+ local_as.split(' ')|length > 2 and 'no-prepend' in local_as and 'replace-as' in local_as }}",
+ },
+ },
+ "log_neighbor_changes": {
+ "set": "{{ True if log_neighbor_changes is defined and 'disable' not in log_neighbor_changes }}",
+ "disable": "{{ True if log_neighbor_changes is defined and 'disable' in log_neighbor_changes }}",
+ },
+ "maximum_prefix": {
+ "max_no": "{{ maximum_prefix.split(' ')[1] if maximum_prefix is defined }}",
+ "threshold_val": "{{ maximum_prefix.split(' ')[2] if maximum_prefix is defined and\
+ maximum_prefix.split(' ')|length > 3 and maximum_prefix.split(' ')[1] != 'restart' }}",
+ "restart": "{{ maximum_prefix.split('restart ')[1] if maximum_prefix is defined and 'restart' in maximum_prefix }}",
+ "warning_only": "{{ True if maximum_prefix is defined and 'warning-only' in maximum_prefix }}",
+ },
+ "next_hop_self": {
+ "set": "{{ True if next_hop_self is defined and next_hop_self.split(' ')|length == 1 }}",
+ "all": "{{ True if next_hop_self is defined and next_hop_self.split(' ')|length > 1 }}",
+ },
+ "next_hop_unchanged": {
+ "set": "{{ True if next_hop_unchanged is defined and next_hop_unchanged.split(' ')|length == 1 }}",
+ "allpaths": "{{ True if next_hop_unchanged is defined and next_hop_unchanged.split(' ')|length > 1 }}",
+ },
+ "password": "{{ password.split(' ')[1] if password is defined }}",
+ "path_attribute": {
+ "discard": {
+ "type": "{% if path_attribute is defined and 'discard range' in path_attribute and\
+ path_attribute.split(' ')|length <= 5 %}{{ path_attribute.split(' ')[3] }}{% endif %}",
+ "range": {
+ "start": "{% if path_attribute is defined and 'discard range' in path_attribute and\
+ path_attribute.split(' ')|length > 5 %}{{ path_attribute.split(' ')[3] }}{% endif %}",
+ "end": "{% if path_attribute is defined and 'discard range' in path_attribute and\
+ path_attribute.split(' ')|length > 5 %}{{ path_attribute.split(' ')[4] }}{% endif %}",
+ },
+ "in": "{% if path_attribute is defined and 'discard range' in path_attribute and\
+ 'in' in path_attribute %}{{ True }}{% endif %}",
+ },
+ "treat_as_withdraw": {
+ "type": "{% if path_attribute is defined and 'discard treat-as-withdraw' in path_attribute and\
+ path_attribute.split(' ')|length <= 5 %}{{ path_attribute.split(' ')[3] }}{% endif %}",
+ "range": {
+ "start": "{% if path_attribute is defined and 'discard treat-as-withdraw' in path_attribute and\
+ path_attribute.split(' ')|length > 5 %}{{ path_attribute.split(' ')[3] }}{% endif %}",
+ "end": "{% if path_attribute is defined and 'discard treat-as-withdraw' in path_attribute and\
+ path_attribute.split(' ')|length > 5 %}{{ path_attribute.split(' ')[4] }}{% endif %}",
+ },
+ "in": "{% if path_attribute is defined and 'discard treat-as-withdraw' in path_attribute and\
+ 'in' in path_attribute %}{{ True }}{% endif %}",
+ },
+ },
+ "peer_group": "{{ listen.split('peer-group ')[1] if listen is defined and 'peer-group' in listen }}",
+ "remote_as": "{{ remote_as.split('remote-as ')[1] if remote_as is defined }}",
+ "remove_private_as": {
+ "set": "{{ True if remove_private_as is defined and remove_private_as.split(' ')|length == 1 }}",
+ "all": "{{ True if remove_private_as is defined and remove_private_as.split(' ')|length > 1 and 'all' in remove_private_as }}",
+ "replace_as": "{{ True if remove_private_as is defined and remove_private_as.split(' ')|length > 1 and\
+ 'replace-as' in remove_private_as }}",
+ },
+ "route_map": {
+ "name": "{{ route_map.split(' ')[1] if route_map is defined }}",
+ "in": "{{ True if route_map is defined and 'in' in route_map.split(' ') }}",
+ "out": "{{ True if route_map is defined and 'out' in route_map.split(' ') }}",
+ },
+ "route_reflector_client": "{{ True if route_reflector_client is defined }}",
+ "route_server_client": {
+ "set": "{{ True if route_server_client is defined and route_server_client.split(' ')|length == 1 }}",
+ "context": "{{ route_server_client.split('route-server-client context ')[1] if route_server_client is defined }}",
+ },
+ "send_community": {
+ "set": "{{ True if send_community is defined and send_community.split(' ')|length == 1 }}",
+ "both": "{{ True if send_community is defined and 'both' in send_community }}",
+ "extended": "{{ True if send_community is defined and 'extended' in send_community }}",
+ "standard": "{{ True if send_community is defined and 'standard' in send_community }}",
+ },
+ "send_label": {
+ "set": "{{ True if send_label is defined and send_label.split(' ')|length == 1 }}",
+ "explicit_null": "{{ True if send_label is defined and 'explicit-null' in send_label }}",
+ },
+ "slow_peer": {
+ "detection": {
+ "enable": "{{ True if slow_peer is defined and 'disable' not in slow_peer and 'threshold' not in slow_peer }}",
+ "disable": "{{ True if slow_peer is defined and 'disable' in slow_peer }}",
+ "threshold": "{{ slow_peer.split('threshold ')[1] if slow_peer is defined and 'threshold' in slow_peer }}",
+ },
+ "split_update_group": {
+ "dynamic": {
+ "enable": "{{ True if slow_peer is defined and 'split-update-group' in slow_peer and\
+ 'disable' not in slow_peer and 'threshold' not in slow_peer }}",
+ "disable": "{{ True if slow_peer is defined and 'split-update-group' in slow_peer and 'disable' in slow_peer }}",
+ "permanent": "{{ True if slow_peer is defined and 'split-update-group' in slow_peer and 'permanent' in slow_peer }}",
+ },
+ "static": "{{ True if slow_peer is defined and 'split-update-group' in slow_peer and 'static' in slow_peer }}",
+ },
+ },
+ "soft_reconfiguration": "{{ True if soft_reconfiguration is defined }}",
+ "timers": {
+ "interval": "{{ timers.split(' ')[1] if timers is defined }}",
+ "holdtime": "{{ timers.split(' ')[2] if timers is defined }}",
+ "min_holdtime": "{{ timers.split(' ')[3] if timers is defined and timers.split(' ')|length > 3 }}",
+ },
+ "translate_update": {
+ "set": "{{ True if translate_update is defined and translate_update.split(' ')|length == 1 }}",
+ "nlri": {
+ "multicast": "{{ True if translate_update is defined and 'nlri multicast' in translate_update }}",
+ "unicast": "{{ True if translate_update is defined and 'nlri unicast' in translate_update }}",
+ },
+ },
+ "transport": {
+ "connection_mode": {
+ "active": "{{ True if transport is defined and 'connection-mode active' in transport }}",
+ "passive": "{{ True if transport is defined and 'connection-mode passive' in transport }}",
+ },
+ "multi_session": "{{ True if transport is defined and 'multi-session' in transport }}",
+ "path_mtu_discovery": {
+ "set": "{{ True if transport is defined and 'path-mtu-discovery' in transport and 'disable' not in transport }}",
+ "disable": "{{ True if transport is defined and 'path-mtu-discovery' in transport and 'disable' in transport }}",
+ },
+ },
+ "ttl_security": "{{ ttl_security.split('ttl-security hops ')[1] if ttl_security is defined }}",
+ "unsuppress_map": "{{ unsuppress_map.split('unsuppress-map ')[1] if unsuppress_map is defined }}",
+ "version": "{{ version.split('version ')[1] if version is defined }}",
+ "weight": "{{ weight.split('weight ')[1] if weight is defined }}",
+ }
+ ]
+ },
+ },
+ {
+ "name": "redistribute",
+ "getval": re.compile(
+ r"""\s*redistribute*
+ \s*(?P<application>application\s\S+\smetric\s\d+\sroute-map\s\S+|application\s\S+\s(metric\s\d+|route-map\s\S+))*
+ \s*(?P<bgp>bgp\s\d+\smetric\s\d+\sroute-map\s\S+|bgp\s\d+\s(metric\s\d+\sroute-map\s\S+))*
+ \s*(?P<connected>connected\s(metric\s\d+\sroute-map\s\S+|metric\s\d+))*
+ \s*(?P<eigrp>eigrp\s\d+\smetric\s\d+\sroute-map\s\S+|eigrp\s\d+\s(metric\s\d+\sroute-map\s\S+))*
+ \s*(?P<isis>isis\s\S+\sclns\smetric\s\d+\sroute-map\s\S+|isis\s\S+\sip\smetric\s\d+\sroute-map\s\S+|isis\s\S+\s(clns|ip)\s(metric\s\d+\sroute-map\s\S+))*
+ \s*(?P<iso_igrp>iso-igrp\s\S+\sroute-map\s\S+|iso-igrp\s\S+)*
+ \s*(?P<lisp>lisp\smetric\s\d+\sroute-map\s\S+|lisp\s(metric\s\d+\sroute-map\s\S+))*
+ \s*(?P<mobile>mobile\smetric\s\d+\sroute-map\s\S+|mobile\s(metric\s\d+\sroute-map\s\S+))*
+ \s*(?P<odr>odr\smetric\s\d+\sroute-map\s\S+|odr\s(metric\s\d+\sroute-map\s\S+))*
+ \s*(?P<ospf>ospf\s\d+(\s.*))*
+ \s*(?P<ospfv3>ospfv3\s\d+(\s.*))*
+ \s*(?P<rip>rip\smetric\s\d+\sroute-map\s\S+|rip\s(metric\s\d+\sroute-map\s\S+))*
+ \s*(?P<static>static\sclns\smetric\s\d+\sroute-map\s\S+|static\sip\smetric\s\d+\sroute-map\s\S+|static\s(clns|ip)\s(metric\s\d+\sroute-map\s\S+))*
+ \s*(?P<vrf>vrf\s\S+|vrf\sglobal)*
+ $""",
+ re.VERBOSE,
+ ),
+ "compval": "redistribute",
+ "setval": _tmplt_redistribute,
+ "result": {
+ "redistribute": [
+ {
+ "application": {
+ "name": "{{ application.split(' ')[1] if application is defined }}",
+ "metric": "{{ application.split('metric ')[1].split(' ')[0] if application is defined and 'metric' in application }}",
+ "route_map": "{{ application.split('route-map ')[1].split(' ')[0] if application is defined and 'route-map' in application }}",
+ },
+ "bgp": {
+ "as_number": "{{ bgp.split(' ')[1] if bgp is defined }}",
+ "metric": "{{ bgp.split('metric ')[1].split(' ')[0] if bgp is defined and 'metric' in bgp }}",
+ "route_map": "{{ bgp.split('route-map ')[1].split(' ')[0] if bgp is defined and 'route-map' in bgp }}",
+ },
+ "connected": {
+ "metric": "{{ connected.split('metric ')[1].split(' ')[0] if connected is defined and 'metric' in connected }}",
+ "route_map": "{{ connected.split('route-map ')[1].split(' ')[0] if connected is defined and 'route-map' in connected }}",
+ },
+ "eigrp": {
+ "as_number": "{{ eigrp.split(' ')[1] if eigrp is defined }}",
+ "metric": "{{ eigrp.split('metric ')[1].split(' ')[0] if eigrp is defined and 'metric' in eigrp }}",
+ "route_map": "{{ eigrp.split('route-map ')[1].split(' ')[0] if eigrp is defined and 'route-map' in eigrp }}",
+ },
+ "isis": {
+ "area_tag": "{{ isis.split(' ')[1] if isis is defined }}",
+ "clns": "{{ True if isis is defined and 'clns' in isis }}",
+ "ip": "{{ True if isis is defined and 'ip' in isis }}",
+ "metric": "{{ isis.split('metric ')[1].split(' ')[0] if isis is defined and 'metric' in isis }}",
+ "route_map": "{{ isis.split('route-map ')[1].split(' ')[0] if isis is defined and 'route-map' in isis }}",
+ },
+ "iso_igrp": {
+ "area_tag": "{{ iso_igrp.split(' ')[1] if iso_igrp is defined }}",
+ "route_map": "{{ iso_igrp.split('route-map ')[1].split(' ')[0] if iso_igrp is defined and 'route-map' in iso_igrp }}",
+ },
+ "lisp": {
+ "metric": "{{ lisp.split('metric ')[1].split(' ')[0] if lisp is defined and 'metric' in lisp }}",
+ "route_map": "{{ lisp.split('route-map ')[1].split(' ')[0] if lisp is defined and 'route-map' in lisp }}",
+ },
+ "mobile": {
+ "metric": "{{ mobile.split('metric ')[1].split(' ')[0] if mobile is defined and 'metric' in mobile }}",
+ "route_map": "{{ mobile.split('route-map ')[1].split(' ')[0] if mobile is defined and 'route-map' in mobile }}",
+ },
+ "odr": {
+ "metric": "{{ odr.split('metric ')[1].split(' ')[0] if odr is defined and 'metric' in odr }}",
+ "route_map": "{{ odr.split('route-map ')[1].split(' ')[0] if odr is defined and 'route-map' in odr }}",
+ },
+ "ospf": {
+ "process_id": "{{ ospf.split(' ')[1] if ospf is defined }}",
+ "match": {
+ "external": "{{ True if ospf is defined and 'external' in ospf }}",
+ "internal": "{{ True if ospf is defined and 'internal' in ospf }}",
+ "nssa_external": "{{ True if ospf is defined and 'nssa-external' in ospf }}",
+ "type_1": "{{ True if ospf is defined and '1' in ospf }}",
+ "type_2": "{{ True if ospf is defined and '2' in ospf }}",
+ },
+ "metric": "{{ ospf.split('metric ')[1].split(' ')[0] if ospf is defined and 'metric' in ospf }}",
+ "route_map": "{{ ospf.split('route-map ')[1].split(' ')[0] if ospf is defined and 'route-map' in ospf }}",
+ "vrf": "{{ ospf.split('vrf ')[1].split(' ')[0] if ospf is defined and 'vrf' in ospf }}",
+ },
+ "ospfv3": {
+ "process_id": "{{ ospfv3.split(' ')[1] if ospf is defined }}",
+ "match": {
+ "external": "{{ True if ospfv3 is defined and 'external' in ospfv3 }}",
+ "internal": "{{ True if ospfv3 is defined and 'internal' in ospfv3 }}",
+ "nssa_external": "{{ True if ospfv3 is defined and 'nssa-external' in ospfv3 }}",
+ "type_1": "{{ True if ospfv3 is defined and '1' in ospfv3 }}",
+ "type_2": "{{ True if ospfv3 is defined and '2' in ospfv3 }}",
+ },
+ "metric": "{{ ospfv3.split('metric ')[1].split(' ')[0] if ospfv3 is defined and 'metric' in ospfv3 }}",
+ "route_map": "{{ ospfv3.split('route-map ')[1].split(' ')[0] if ospfv3 is defined and 'route-map' in ospfv3 }}",
+ "vrf": "{{ ospfv3.split('vrf ')[1].split(' ')[0] if ospfv3 is defined and 'vrf' in ospfv3 }}",
+ },
+ "rip": {
+ "metric": "{{ rip.split('metric ')[1].split(' ')[0] if rip is defined and 'metric' in rip }}",
+ "route_map": "{{ rip.split('route-map ')[1].split(' ')[0] if rip is defined and 'route-map' in rip }}",
+ },
+ "static": {
+ "clns": "{{ True if static is defined and 'clns' in static }}",
+ "ip": "{{ True if static is defined and 'ip' in static }}",
+ "metric": "{{ static.split('metric ')[1].split(' ')[0] if static is defined and 'metric' in static }}",
+ "route_map": "{{ static.split('route-map ')[1].split(' ')[0] if static is defined and 'route-map' in static }}",
+ },
+ "vrf": {
+ "name": "{{ vrf.split('vrf ')[1].split(' ')[0] if vrf is defined and 'vrf' in vrf and 'global' not in vrf }}",
+ "global": "{{ True if vrf is defined and 'vrf' in vrf and 'global' in vrf }}",
+ },
+ }
+ ]
+ },
+ },
+ {
+ "name": "route_server_context",
+ "getval": re.compile(
+ r"""\s*(?P<route_server_context>route-server-context\s\S+)""",
+ re.VERBOSE,
+ ),
+ "compval": "route_server_context",
+ "setval": "",
+ "result": {
+ "route_server_context": "{{ route_server_context.split('route-server-context ')[1] if route_server_context is defined }}"
+ },
+ },
+ {
+ "name": "synchronization",
+ "getval": re.compile(
+ r"""\s*(?P<synchronization>synchronization)""", re.VERBOSE
+ ),
+ "compval": "synchronization",
+ "setval": "synchronization",
+ "result": {
+ "synchronization": "{{ Trues if synchronization is defined }}"
+ },
+ },
+ {
+ "name": "table_map",
+ "getval": re.compile(
+ r"""\s*(?P<table_map>route-server-context\s\S+)""", re.VERBOSE
+ ),
+ "compval": "table_map",
+ "setval": "",
+ "result": {
+ "table_map": "{{ table_map.split('route-server-context ')[1] if table_map is defined }}"
+ },
+ },
+ {
+ "name": "timers",
+ "getval": re.compile(
+ r"""\s*(?P<timers>timers\sbgp\s\d+\s\d+\s\d+)""", re.VERBOSE
+ ),
+ "compval": "timers",
+ "setval": _tmplt_bgp_timers,
+ "result": {
+ "timers": {
+ "keepalive": "{{ timers.split(' ')[2] if timers is defined }}",
+ "holdtime": "{{ timers.split(' ')[3] if timers is defined }}",
+ "min_holdtime": "{{ timers.split(' ')[4] if timers is defined and timers.split(' ')|length > 4 }}",
+ }
+ },
+ },
+ ]
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/ospf_interfaces.py
new file mode 100644
index 00000000..419c4859
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/ospf_interfaces.py
@@ -0,0 +1,895 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The Ospf_interfaces parser templates file. This contains
+a list of parser definitions and associated functions that
+facilitates both facts gathering and native command generation for
+the given network resource.
+"""
+
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+def _tmplt_ospf_interface(config_data):
+ command = "interface {name}".format(**config_data)
+ return command
+
+
+def _tmplt_ospf_interface_process(config_data):
+ if "process" in config_data:
+ if config_data.get("afi") == "ipv4":
+ command = "ip ospf {id} area {area_id}".format(
+ **config_data["process"]
+ )
+ elif config_data.get("afi") == "ipv6":
+ command = "ipv6 ospf {id} area {area_id}".format(
+ **config_data["process"]
+ )
+ if "secondaries" in config_data["process"]:
+ command += " secondaries"
+ return command
+
+
+def _tmplt_ip_ospf_authentication(config_data):
+ if "authentication" in config_data:
+ if config_data.get("afi") == "ipv4":
+ command = "ip ospf authentication"
+ elif config_data.get("afi") == "ipv6":
+ command = "ipv6 ospf authentication"
+ if "key_chain" in config_data["authentication"]:
+ command += " key-chain {key_chain}".format(
+ **config_data["authentication"]
+ )
+ elif "message_digest" in config_data["authentication"]:
+ command += " message-digest"
+ elif "null" in config_data["authentication"]:
+ command += " null"
+ return command
+
+
+def _tmplt_ip_ospf_cost(config_data):
+ if "cost" in config_data:
+ if config_data.get("afi") == "ipv4":
+ command = "ip ospf cost {interface_cost}".format(
+ **config_data["cost"]
+ )
+ elif config_data.get("afi") == "ipv6":
+ command = "ipv6 ospf cost"
+ if "interface_cost" in config_data["cost"]:
+ command = "ipv6 ospf cost {interface_cost}".format(
+ **config_data["cost"]
+ )
+ if "dynamic_cost" in config_data["cost"]:
+ if "default" in config_data["cost"]["dynamic_cost"]:
+ command += " dynamic default {default}".format(
+ **config_data["cost"]["dynamic_cost"]
+ )
+ elif "hysteresis" in config_data["cost"]["dynamic_cost"]:
+ command += " dynamic hysteresis"
+ if (
+ "percent"
+ in config_data["cost"]["dynamic_cost"]["hysteresis"]
+ ):
+ command += " percent {percent}".format(
+ **config_data["cost"]["dynamic_cost"]["hysteresis"]
+ )
+ elif (
+ "threshold"
+ in config_data["cost"]["dynamic_cost"]["hysteresis"]
+ ):
+ command += " threshold {threshold}".format(
+ **config_data["cost"]["dynamic_cost"]["hysteresis"]
+ )
+ elif "weight" in config_data["cost"]["dynamic_cost"]:
+ command += " dynamic weight"
+ if (
+ "l2_factor"
+ in config_data["cost"]["dynamic_cost"]["weight"]
+ ):
+ command += " L2-factor {l2_factor}".format(
+ **config_data["cost"]["dynamic_cost"]["weight"]
+ )
+ elif (
+ "latency"
+ in config_data["cost"]["dynamic_cost"]["weight"]
+ ):
+ command += " latency {latency}".format(
+ **config_data["cost"]["dynamic_cost"]["weight"]
+ )
+ elif (
+ "oc" in config_data["cost"]["dynamic_cost"]["weight"]
+ and config_data["cost"]["dynamic_cost"]["weight"]["oc"]
+ ):
+ command += " oc cdr"
+ elif (
+ "resources"
+ in config_data["cost"]["dynamic_cost"]["weight"]
+ ):
+ command += " resources {resources}".format(
+ **config_data["cost"]["dynamic_cost"]["weight"]
+ )
+ elif (
+ "throughput"
+ in config_data["cost"]["dynamic_cost"]["weight"]
+ ):
+ command += " throughput {throughput}".format(
+ **config_data["cost"]["dynamic_cost"]["weight"]
+ )
+ return command
+
+
+def _tmplt_ip_ospf_dead_interval(config_data):
+ if "dead_interval" in config_data:
+ if config_data.get("afi") == "ipv4":
+ command = "ip ospf dead-interval"
+ if "time" in config_data["dead_interval"]:
+ command += " {time}".format(**config_data["dead_interval"])
+ elif "minimal" in config_data["dead_interval"]:
+ command += " minimal hello-multiplier {minimal}".format(
+ **config_data["dead_interval"]
+ )
+ elif config_data.get("afi") == "ipv6":
+ command = "ipv6 ospf dead-interval {time}".format(
+ **config_data["dead_interval"]
+ )
+ return command
+
+
+def _tmplt_ip_ospf_demand_circuit(config_data):
+ if "demand_circuit" in config_data:
+ if config_data.get("afi") == "ipv4":
+ command = "ip ospf demand-circuit"
+ if config_data["demand_circuit"]["ignore"]:
+ command += " ignore"
+ elif config_data["demand_circuit"]["enable"]:
+ return command
+ elif config_data.get("afi") == "ipv6":
+ command = "ipv6 ospf demand-circuit"
+ if config_data["demand_circuit"]["enable"]:
+ return command
+ elif config_data["demand_circuit"]["ignore"]:
+ command += " ignore"
+ elif config_data["demand_circuit"]["disable"]:
+ command += " disable"
+ return command
+
+
+def _tmplt_ip_ospf_manet(config_data):
+ if "manet" in config_data:
+ command = "ipv6 ospf manet peering"
+ if "cost" in config_data["manet"]:
+ command += " cost"
+ if "percent" in config_data["manet"]["cost"]:
+ command += " percent {percent}".format(
+ **config_data["manet"]["cost"]
+ )
+ elif "threshold" in config_data["manet"]["cost"]:
+ command += " threshold {threshold}".format(
+ **config_data["manet"]["cost"]
+ )
+ elif "link_metrics" in config_data["manet"]:
+ command += " link-metrics"
+ if "cost_threshold" in config_data["manet"]["link_metrics"]:
+ command += " {cost_threshold}".format(
+ **config_data["manet"]["link_metrics"]
+ )
+ return command
+
+
+def _tmplt_ip_ospf_multi_area(config_data):
+ if "multi_area" in config_data:
+ command = "ip ospf multi-area {id}".format(**config_data["multi_area"])
+ if "cost" in config_data["multi_area"]:
+ command += " cost {cost}".format(**config_data["multi_area"])
+ return command
+
+
+def _tmplt_ip_ospf_neighbor(config_data):
+ if "neighbor" in config_data:
+ command = "ipv6 ospf neighbor {address}".format(
+ **config_data["neighbor"]
+ )
+ if "cost" in config_data["neighbor"]:
+ command += " cost {cost}".format(**config_data["neighbor"])
+ if (
+ "database_filter" in config_data["neighbor"]
+ and config_data["neighbor"]["database_filter"]
+ ):
+ command += " database-filter all out"
+ if "poll_interval" in config_data["neighbor"]:
+ command += " poll-interval {poll_interval}".format(
+ **config_data["neighbor"]["poll_interval"]
+ )
+ if "priority" in config_data["neighbor"]:
+ command += " priority {priority}".format(
+ **config_data["neighbor"]["priority"]
+ )
+ return command
+
+
+def _tmplt_ip_ospf_network(config_data):
+ if "network" in config_data:
+ if config_data.get("afi") == "ipv4":
+ command = "ip ospf network"
+ elif config_data.get("afi") == "ipv6":
+ command = "ipv6 ospf network"
+ if "broadcast" in config_data["network"]:
+ command += " broadcast"
+ if "manet" in config_data["network"]:
+ command += " manet"
+ if "non_broadcast" in config_data["network"]:
+ command += " non-broadcast"
+ if "point_to_multipoint" in config_data["network"]:
+ command += " point-to-multipoint"
+ if "point_to_point" in config_data["network"]:
+ command += " point-to-point"
+ return command
+
+
+def _tmplt_ip_ospf_ttl_security(config_data):
+ if "ttl_security" in config_data:
+ command = "ip ospf ttl-security"
+ if "hops" in config_data["ttl_security"]:
+ command += " hops {hops}".format(**config_data["ttl_security"])
+ return command
+
+
+class Ospf_InterfacesTemplate(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(Ospf_InterfacesTemplate, self).__init__(lines=lines, tmplt=self)
+
+ PARSERS = [
+ {
+ "name": "name",
+ "getval": re.compile(
+ r"""
+ ^interface
+ \s(?P<name>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "interface {{ name }}",
+ "result": {
+ "{{ name }}": {"name": "{{ name }}", "address_family": {}}
+ },
+ "shared": True,
+ },
+ {
+ "name": "process",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<id>\d+)*
+ \s*(?P<area>area\s\d+)*
+ \s*(?P<secondaries>secondaries)*
+
+ \s*(?P<instance>instance*\s*\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_interface_process,
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "process": {
+ "id": "{{ id }}",
+ "area_id": "{{ area.split(' ')[1] }}",
+ "secondaries": "{{ True if secondaries is defined }}",
+ "instance_id": "{{ instance.split(' ')[1]}}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "adjacency",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<adjacency>adjacency*\s*stagger)*
+ \s*(?P<disable>disable)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ospf' if afi == 'ipv4' else 'ipv6 ospf' }} adjacency stagger disable",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "adjacency": "{{ True if adjacency is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "authentication",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*authentication*
+ \s*(?P<key_chain>key-chain*\s*\S+)*
+ \s*(?P<message_digest>message-digest)*
+ \s*(?P<null>null)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ip_ospf_authentication,
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "authentication": {
+ "key_chain": "{{ key_chain.split(' ')[1] }}",
+ "message_digest": "{{ True if message_digest is defined }}",
+ "null": "{{ True if null is defined }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "bfd",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<bfd>bfd)*
+ \s*(?P<disable>disable)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ospf' if afi == 'ipv4' else 'ipv6 ospf' }} bfd",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "bfd": "{{ True if bfd is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "cost_ip",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)*
+ \s*ospf*
+ \s*(?P<cost>cost*\s*\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ip_ospf_cost,
+ "compval": "cost.interface_cost",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "cost": {
+ "interface_cost": "{{ cost.split(' ')[1] }}"
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "cost_ipv6_dynamic_cost",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ipv6)*
+ \s*ospf*
+ \s*cost*
+ \s*(?P<interface_cost>\d+)*
+ \s*dynamic*
+ \s*(?P<default>default*\s*\d+)*
+ \s*(?P<hysteresis>hysteresis*\s*)*
+ \s*(?P<h_params>(percent|threshold)*\s*\d+)*
+ \s*(?P<weight>weight)*
+ \s*(?P<w_params>(L2-factor|latency|resources|throughput)*\s*\d+)*
+ \s*(?P<weight_oc>oc)*
+ $""",
+ re.VERBOSE,
+ ),
+ "compval": "cost.dynamic_cost",
+ "setval": _tmplt_ip_ospf_cost,
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "cost": {
+ "interface_cost": "{{ interface_cost }}",
+ "dynamic_cost": {
+ "default": "{{ default.split(' ')[1] }}",
+ "hysteresis": {
+ "percent": "{{ h_params.split(' ')[1] if h_params is defined and 'percent' in h_params }}",
+ "threshold": "{{ h_params.split(' ')[1] if h_params is defined and 'threshold' in h_params }}",
+ },
+ "weight": {
+ "l2_factor": "{{ w_params.split(' ')[1] if w_params is defined and 'L2-factor' in w_params }}",
+ "latency": "{{ w_params.split(' ')[1] if w_params is defined and 'latency' in w_params }}",
+ "oc": "{{ True if weight_oc is defined}}",
+ "resources": "{{ w_params.split(' ')[1] if w_params is defined and 'resources' in w_params }}",
+ "throughput": "{{ w_params.split(' ')[1] if w_params is defined and 'throughput' in w_params }}",
+ },
+ },
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "database_filter",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<database_filter>database-filter\sall\sout)*
+ \s*(?P<disable>disable)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ospf' if afi == 'ipv4' else 'ipv6 ospf' }} database-filter all out",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "database_filter": "{{ True if database_filter is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "dead_interval",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<dead_interval>dead-interval)*
+ \s*(?P<seconds>\d+)*
+ \s*(?P<minimal>minimal\shello-multiplier\s\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ip_ospf_dead_interval,
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "dead_interval": {
+ "time": "{{ seconds }}",
+ "minimal": {
+ "hello_multiplier": "{{ minimal.split(' ')[2] }}"
+ },
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "demand_circuit",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<demand_circuit>demand-circuit)*
+ \s*(?P<ignore>ignore)*
+ \s*(?P<disable>disable)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ip_ospf_demand_circuit,
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "demand_circuit": {
+ "enable": "{{ True if demand_circuit is defined and ignore is not defined }}",
+ "ignore": "{{ True if ignore is defined }}",
+ "disable": "{{ True if disable is defined }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "flood_reduction",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<flood_reduction>flood-reduction)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ospf' if afi == 'ipv4' else 'ipv6 ospf' }} flood-reduction",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "flood_reduction": "{{ True if flood_reduction is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "hello_interval",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<hello_interval>hello-interval\s\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ospf' if afi == 'ipv4' else 'ipv6 ospf' }} hello-interval {{ hello_interval }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "hello_interval": "{{ hello_interval.split(' ')[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "lls",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)*
+ \s*ospf*
+ \s*(?P<lls>lls)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ospf' if afi == 'ipv4' else 'ipv6 ospf' }} lls",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "lls": "{{ True if lls is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "manet",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ipv6)*
+ \s*ospf*
+ \s*(?P<manet>manet\speering)*
+ \s*(?P<cost>(cost\spercent|cost\sthreshold)\s\d+)*
+ \s*(?P<link_metrics>link-metrics\s\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ip_ospf_manet,
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "manet": {
+ "cost": {
+ "percent": "{{ cost.split(' ')[2] }}",
+ "threshold": "{{ cost.split(' ')[2] }}",
+ },
+ "link_metrics": {
+ "set": "{{ True if link_metrics is not defined and link_metrics is defined }}",
+ "cost_threshold": "{{ link_metrics.split(' ')[1] }}",
+ },
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "mtu_ignore",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<mtu_ignore>mtu-ignore)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ospf' if afi == 'ipv4' else 'ipv6 ospf' }} mtu-ignore",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "mtu_ignore": "{{ True if mtu_ignore is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "multi_area",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)*
+ \s*ospf*
+ \s*(?P<multi_area>multi-area\s\d+)*
+ \s*(?P<cost>cost\s\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ip_ospf_multi_area,
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "multi_area": {
+ "id": "{{ multi_area.split(' ')[1] }}",
+ "cost": "{{ cost.split(' ')[1] }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "neighbor",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ipv6)*
+ \s*ospf*
+ \s*neighbor*
+ \s*(?P<address>(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\S+)*
+ \s*(?P<cost>cost\s\d+)*
+ \s*(?P<database_filter>database-filter\sall\sout)*
+ \s*(?P<poll_interval>poll-interval\s\d+)*
+ \s*(?P<priority>priority\s\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ip_ospf_neighbor,
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "neighbor": {
+ "address": "{{ address }}",
+ "cost": "{{ cost.split(' ')[1] }}",
+ "database_filter": "{{ True if database_filter is defined }}",
+ "poll_interval": "{{ poll_interval.split(' ')[1] }}",
+ "priority": "{{ priority.split(' ')[1] }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "network",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<network>network)*
+ \s*(?P<broadcast>broadcast)*
+ \s*(?P<manet>manet)*
+ \s*(?P<non_broadcast>non-broadcast)*
+ \s*(?P<point_to_multipoint>point-to-multipoint)*
+ \s*(?P<point_to_point>point-to-point)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ip_ospf_network,
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "network": {
+ "broadcast": "{{ True if broadcast is defined }}",
+ "manet": "{{ True if manet is defined }}",
+ "non_broadcast": "{{ True if non_broadcast is defined }}",
+ "point_to_multipoint": "{{ True if point_to_multipoint is defined }}",
+ "point_to_point": "{{ True if point_to_point is defined }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "prefix_suppression",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<prefix_suppression>prefix-suppression)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ospf' if afi == 'ipv4' else 'ipv6 ospf' }} prefix-suppression",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "prefix_suppression": "{{ True if prefix_suppression is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "priority",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<priority>priority*\s*\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ospf' if afi == 'ipv4' else 'ipv6 ospf' }} priority {{ priority }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "priority": "{{ priority.split(' ')[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "resync_timeout",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)*
+ \s*ospf*
+ \s*(?P<resync_timeout>resync-timeout*\s*\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "ip ospf resync-timeout {{ resync_timeout }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "resync_timeout": "{{ resync_timeout.split(' ')[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "retransmit_interval",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<retransmit_interval>retransmit-interval*\s*\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ospf' if afi == 'ipv4' else 'ipv6 ospf' }} retransmit-interval {{ retransmit_interval }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "retransmit_interval": "{{ retransmit_interval.split(' ')[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "shutdown",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)*
+ \s*ospf*
+ \s*(?P<shutdown>shutdown)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ospf' if afi == 'ipv4' else 'ipv6 ospf' }} shutdown",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "shutdown": "{{ True if shutdown is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "transmit_delay",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ipv6)*
+ \s*ospf*
+ \s*(?P<transmit_delay>transmit-delay*\s*\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "ipv6 ospf transmit-delay {{ transmit_delay }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "transmit_delay": "{{ transmit_delay.split(' ')[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "ttl_security",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)*
+ \s*ospf*
+ \s*(?P<ttl_security>ttl-security)*
+ \s*(?P<hops>hops\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ip_ospf_ttl_security,
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "ttl_security": {
+ "set": "{{ True if hops is not defined and ttl_security is defined }}",
+ "hops": "{{ hops.split(' ')[1] }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ ]
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/ospfv2.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/ospfv2.py
new file mode 100644
index 00000000..9a09e237
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/ospfv2.py
@@ -0,0 +1,1947 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+def _tmplt_ospf_vrf_cmd(process):
+ command = "router ospf {process_id}".format(**process)
+ if "vrf" in process:
+ command += " vrf {vrf}".format(**process)
+ return command
+
+
+def _tmplt_ospf_adjacency_cmd(config_data):
+ if "adjacency" in config_data:
+ command = "adjacency stagger "
+ if "none" in config_data["adjacency"]:
+ command += " none"
+ else:
+ command += " {min_adjacency}".format(**config_data["adjacency"])
+ if "max_adjacency" in config_data["adjacency"]:
+ command += " {min_adjacency}".format(**config_data["adjacency"])
+ return command
+
+
+def _tmplt_ospf_address_family_cmd(config_data):
+ if "address_family" in config_data:
+ command = ["address-family ipv4 multicast", "exit-address-family"]
+ if config_data["address_family"].get("topology"):
+ if "base" in config_data["address_family"].get("topology"):
+ command.insert(1, "topology base")
+ elif "name" in config_data["address_family"].get("topology"):
+ cmd = "topology {name}".format(
+ **config_data["address_family"].get("topology")
+ )
+ if "tid" in config_data["address_family"].get("topology"):
+ cmd += " tid {tid}".format(
+ **config_data["address_family"].get("topology")
+ )
+ command.insert(1, cmd)
+ return command
+
+
+def _tmplt_ospf_area_authentication(config_data):
+ if "authentication" in config_data:
+ command = "area {area_id} authentication".format(**config_data)
+ if config_data["authentication"].get("message_digest"):
+ command += " message-digest"
+ return command
+
+
+def _tmplt_ospf_area_filter(config_data):
+ if "filter_list" in config_data:
+ command = []
+ for key, value in iteritems(config_data.get("filter_list")):
+ cmd = "area {area_id}".format(**config_data)
+ if value.get("name") and value.get("direction"):
+ cmd += " filter-list prefix {name} {direction}".format(**value)
+ command.append(cmd)
+ return command
+
+
+def _tmplt_ospf_area_nssa(config_data):
+ if "nssa" in config_data:
+ command = "area {area_id} nssa".format(**config_data)
+ if "default_information_originate" in config_data["nssa"]:
+ command += " default-information-originate"
+ if (
+ "metric"
+ in config_data["nssa"]["default_information_originate"]
+ ):
+ command += " metric {metric}".format(
+ **config_data["nssa"]["default_information_originate"]
+ )
+ if (
+ "metric_type"
+ in config_data["nssa"]["default_information_originate"]
+ ):
+ command += " metric-type {metric_type}".format(
+ **config_data["nssa"]["default_information_originate"]
+ )
+ if (
+ "nssa_only"
+ in config_data["nssa"]["default_information_originate"]
+ ):
+ command += " nssa-only"
+ if config_data["nssa"].get("no_ext_capability"):
+ command += " no-ext-capability"
+ if config_data["nssa"].get("no_redistribution"):
+ command += " no-redistribution"
+ if config_data["nssa"].get("no_summary"):
+ command += " no-summary"
+ return command
+
+
+def _tmplt_ospf_area_nssa_translate(config_data):
+ if "nssa" in config_data:
+ command = "area {area_id} nssa".format(**config_data)
+ if "translate" in config_data["nssa"]:
+ command += " translate type7 {translate}".format(
+ **config_data["nssa"]
+ )
+ return command
+
+
+def _tmplt_ospf_area_ranges(config_data):
+ if "ranges" in config_data:
+ commands = []
+ for k, v in iteritems(config_data["ranges"]):
+ cmd = "area {area_id} range".format(**config_data)
+ temp_cmd = " {address} {netmask}".format(**v)
+ if "advertise" in v:
+ temp_cmd += " advertise"
+ elif "not_advertise" in v:
+ temp_cmd += " not-advertise"
+ if "cost" in v:
+ temp_cmd += " cost {cost}".format(**v)
+ cmd += temp_cmd
+ commands.append(cmd)
+ return commands
+
+
+def _tmplt_ospf_area_sham_link(config_data):
+ if "sham_link" in config_data:
+ command = "area {area_id} sham-link".format(**config_data)
+ if "source" in config_data["sham_link"]:
+ command += " {source} {destination}".format(
+ **config_data["sham_link"]
+ )
+ if "cost" in config_data["sham_link"]:
+ command += " cost {cost}".format(**config_data["sham_link"])
+ if "ttl_security" in config_data["sham_link"]:
+ command += " ttl-security hops {ttl_security}".format(
+ **config_data["sham_link"]
+ )
+ return command
+
+
+def _tmplt_ospf_area_stub_link(config_data):
+ if "stub" in config_data:
+ command = "area {area_id} stub".format(**config_data)
+ if "no_ext_capability" in config_data["stub"]:
+ command += " no-ext-capability"
+ if "no_summary" in config_data["stub"]:
+ command += " no-summary"
+ return command
+
+
+def _tmplt_ospf_auto_cost(config_data):
+ if "auto_cost" in config_data:
+ command = "auto-cost"
+ if "reference_bandwidth" in config_data["auto_cost"]:
+ command += " reference-bandwidth {reference_bandwidth}".format(
+ **config_data["auto_cost"]
+ )
+ return command
+
+
+def _tmplt_ospf_capability(config_data):
+ if "capability" in config_data:
+ if "lls" in config_data["capability"]:
+ command = "capability lls"
+ elif "opaque" in config_data["capability"]:
+ command = "capability opaque"
+ elif "transit" in config_data["capability"]:
+ command = "capability transit"
+ elif "vrf_lite" in config_data["capability"]:
+ command = "capability vrf_lite"
+ return command
+
+
+def _tmplt_ospf_compatible(config_data):
+ if "compatible" in config_data:
+ if "rfc1583" in config_data["compatible"]:
+ command = "compatible rfc1583"
+ elif "rfc1587" in config_data["compatible"]:
+ command = "compatible rfc1587"
+ elif "rfc5243" in config_data["compatible"]:
+ command = "compatible rfc5243"
+ return command
+
+
+def _tmplt_ospf_default_information(config_data):
+ if "default_information" in config_data:
+ command = "default-information"
+ if "originate" in config_data["default_information"]:
+ command += " originate"
+ if "always" in config_data["default_information"]:
+ command += " always"
+ if "metric" in config_data["default_information"]:
+ command += " metric {metric}".format(
+ **config_data["default_information"]
+ )
+ if "metric_type" in config_data["default_information"]:
+ command += " metric-type {metric_type}".format(
+ **config_data["default_information"]
+ )
+ if "metric" in config_data["default_information"]:
+ command += " route-map {route_map}".format(
+ **config_data["default_information"]
+ )
+ return command
+
+
+def _tmplt_ospf_discard_route(config_data):
+ if "discard_route" in config_data:
+ command = "discard-route"
+ if "external" in config_data["discard_route"]:
+ command += " external {external}".format(
+ **config_data["discard_route"]
+ )
+ if "internal" in config_data["discard_route"]:
+ command += " internal {internal}".format(
+ **config_data["discard_route"]
+ )
+ return command
+
+
+def _tmplt_ospf_distance_admin_distance(config_data):
+ if "admin_distance" in config_data["distance"]:
+ command = "distance {distance}".format(
+ **config_data["distance"]["admin_distance"]
+ )
+ if "address" in config_data["distance"]["admin_distance"]:
+ command += " {address} {wildcard_bits}".format(
+ **config_data["distance"]["admin_distance"]
+ )
+ if "acl" in config_data["distance"]["admin_distance"]:
+ command += " {acl}".format(
+ **config_data["distance"]["admin_distance"]
+ )
+ return command
+
+
+def _tmplt_ospf_distance_ospf(config_data):
+ if "ospf" in config_data["distance"]:
+ command = "distance ospf"
+ if "inter_area" in config_data["distance"]["ospf"]:
+ command += " inter-area {inter_area}".format(
+ **config_data["distance"]["ospf"]
+ )
+ if config_data["distance"].get("ospf").get("intra_area"):
+ command += " intra-area {intra_area}".format(
+ **config_data["distance"]["ospf"]
+ )
+ if config_data["distance"].get("ospf").get("external"):
+ command += " external {external}".format(
+ **config_data["distance"]["ospf"]
+ )
+ return command
+
+
+def _tmplt_ospf_distribute_list_acls(config_data):
+ if "acls" in config_data.get("distribute_list"):
+ command = []
+ for k, v in iteritems(config_data["distribute_list"]["acls"]):
+ cmd = "distribute-list {name} {direction}".format(**v)
+ if "interface" in v:
+ cmd += " {interface}".format(**v)
+ if "protocol" in v:
+ cmd += " {protocol}".format(**v)
+ command.append(cmd)
+ return command
+
+
+def _tmplt_ospf_distribute_list_prefix(config_data):
+ if "prefix" in config_data.get("distribute_list"):
+ command = "distribute-list prefix {name}".format(
+ **config_data["distribute_list"]["prefix"]
+ )
+ if "gateway_name" in config_data["distribute_list"]["prefix"]:
+ command += " gateway {gateway_name}".format(
+ **config_data["distribute_list"]["prefix"]
+ )
+ if "direction" in config_data["distribute_list"]["prefix"]:
+ command += " {direction}".format(
+ **config_data["distribute_list"]["prefix"]
+ )
+ if "interface" in config_data["distribute_list"]["prefix"]:
+ command += " {interface}".format(
+ **config_data["distribute_list"]["prefix"]
+ )
+ if "protocol" in config_data["distribute_list"]["prefix"]:
+ command += " {protocol}".format(
+ **config_data["distribute_list"]["prefix"]
+ )
+ return command
+
+
+def _tmplt_ospf_domain_id(config_data):
+ if "domain_id" in config_data:
+ command = "domain-id"
+ if "ip_address" in config_data["domain_id"]:
+ if "address" in config_data["domain_id"]["ip_address"]:
+ command += " {address}".format(
+ **config_data["domain_id"]["ip_address"]
+ )
+ if "secondary" in config_data["domain_id"]["ip_address"]:
+ command += " {secondary}".format(
+ **config_data["domain_id"]["ip_address"]
+ )
+ elif "null" in config_data["domain_id"]:
+ command += " null"
+ return command
+
+
+def _tmplt_ospf_event_log(config_data):
+ if "event_log" in config_data:
+ command = "event-log"
+ if "one_shot" in config_data["event_log"]:
+ command += " one-shot"
+ if "pause" in config_data["event_log"]:
+ command += " pause"
+ if "size" in config_data["event_log"]:
+ command += " size {size}".format(**config_data["event_log"])
+ return command
+
+
+def _tmplt_ospf_limit(config_data):
+ if "limit" in config_data:
+ command = "limit retransmissions"
+ if "dc" in config_data["limit"]:
+ if "number" in config_data["limit"]["dc"]:
+ command += " dc {number}".format(**config_data["limit"]["dc"])
+ if "disable" in config_data["limit"]["dc"]:
+ command += " dc disable"
+ if "non_dc" in config_data["limit"]:
+ if "number" in config_data["limit"]["non_dc"]:
+ command += " non-dc {number}".format(
+ **config_data["limit"]["non_dc"]
+ )
+ if "disable" in config_data["limit"]["dc"]:
+ command += " non-dc disable"
+ return command
+
+
+def _tmplt_ospf_vrf_local_rib_criteria(config_data):
+ if "local_rib_criteria" in config_data:
+ command = "local-rib-criteria"
+ if "forwarding_address" in config_data["local_rib_criteria"]:
+ command += " forwarding-address"
+ if "inter_area_summary" in config_data["local_rib_criteria"]:
+ command += " inter-area-summary"
+ if "nssa_translation" in config_data["local_rib_criteria"]:
+ command += " nssa-translation"
+ return command
+
+
+def _tmplt_ospf_log_adjacency_changes(config_data):
+ if "log_adjacency_changes" in config_data:
+ command = "log-adjacency-changes"
+ if "detail" in config_data["log_adjacency_changes"]:
+ command += " detail"
+ return command
+
+
+def _tmplt_ospf_max_lsa(config_data):
+ if "max_lsa" in config_data:
+ command = "max-lsa {number}".format(**config_data["max_lsa"])
+ if "threshold_value" in config_data["max_lsa"]:
+ command += " {threshold_value}".format(**config_data["max_lsa"])
+ if "ignore_count" in config_data["max_lsa"]:
+ command += " ignore-count {ignore_count}".format(
+ **config_data["max_lsa"]
+ )
+ if "ignore_time" in config_data["max_lsa"]:
+ command += " ignore-time {ignore_time}".format(
+ **config_data["max_lsa"]
+ )
+ if "reset_time" in config_data["max_lsa"]:
+ command += " reset-time {reset_time}".format(
+ **config_data["max_lsa"]
+ )
+ if "warning_only" in config_data["max_lsa"]:
+ command += " warning-only"
+ return command
+
+
+def _tmplt_ospf_max_metric(config_data):
+ if "max_metric" in config_data:
+ command = "max-metric"
+ if "router_lsa" in config_data["max_metric"]:
+ command += " router-lsa"
+ if "external_lsa" in config_data["max_metric"]:
+ command += " external-lsa {external_lsa}".format(
+ **config_data["max_metric"]
+ )
+ if "include_stub" in config_data["max_metric"]:
+ command += " include-stub"
+ if "on_startup" in config_data["max_metric"]:
+ if "time" in config_data["max_metric"]["on_startup"]:
+ command += " on-startup {time}".format(
+ **config_data["max_metric"]["on_startup"]
+ )
+ elif "wait_for_bgp" in config_data["max_metric"]["on_startup"]:
+ command += " on-startup wait-for-bgp"
+ if "summary_lsa" in config_data["max_metric"]:
+ command += " summary-lsa {summary_lsa}".format(
+ **config_data["max_metric"]
+ )
+ return command
+
+
+def _tmplt_ospf_mpls_ldp(config_data):
+ if "ldp" in config_data["mpls"]:
+ command = "mpls ldp"
+ if "autoconfig" in config_data["mpls"]["ldp"]:
+ command += " autoconfig"
+ if "area" in config_data["mpls"]["ldp"]["autoconfig"]:
+ command += " area {area}".format(
+ **config_data["mpls"]["ldp"]["autoconfig"]
+ )
+ elif "sync" in config_data["mpls"]["ldp"]:
+ command += " sync"
+ return command
+
+
+def _tmplt_ospf_mpls_traffic_eng(config_data):
+ if "traffic_eng" in config_data["mpls"]:
+ command = "mpls traffic-eng"
+ if "area" in config_data["mpls"]["traffic_eng"]:
+ command += " area {area}".format(
+ **config_data["mpls"]["traffic_eng"]
+ )
+ elif "autoroute_exclude" in config_data["mpls"]["traffic_eng"]:
+ command += " autoroute-exclude prefix-list {autoroute_exclude}".format(
+ **config_data["mpls"]["traffic_eng"]
+ )
+ elif "interface" in config_data["mpls"]["traffic_eng"]:
+ command += " interface {int_type}".format(
+ **config_data["mpls"]["traffic_eng"]["interface"]
+ )
+ if "area" in config_data["mpls"]["traffic_eng"]["interface"]:
+ command += " area {area}".format(
+ **config_data["mpls"]["traffic_eng"]["interface"]
+ )
+ elif "mesh_group" in config_data["mpls"]["traffic_eng"]:
+ command += " mesh-group {id} {interface}".format(
+ **config_data["mpls"]["traffic_eng"]["mesh_group"]
+ )
+ if "area" in config_data["mpls"]["traffic_eng"]["mesh_group"]:
+ command += " area {area}".format(
+ **config_data["mpls"]["traffic_eng"]["mesh_group"]
+ )
+ elif "multicast_intact" in config_data["mpls"]["traffic_eng"]:
+ command += " multicast-intact"
+ elif "router_id_interface" in config_data["mpls"]["traffic_eng"]:
+ command += " router-id {router_id_interface}".format(
+ **config_data["mpls"]["traffic_eng"]
+ )
+ return command
+
+
+def _tmplt_ospf_neighbor(config_data):
+ if "neighbor" in config_data:
+ command = "neighbor"
+ if "address" in config_data["neighbor"]:
+ command += " {address}".format(**config_data["neighbor"])
+ if "cost" in config_data["neighbor"]:
+ command += " cost {cost}".format(**config_data["neighbor"])
+ if "database_filter" in config_data["neighbor"]:
+ command += " database-filter all out"
+ if "poll_interval" in config_data["neighbor"]:
+ command += " poll-interval {poll_interval}".format(
+ **config_data["neighbor"]
+ )
+ if "priority" in config_data["neighbor"]:
+ command += " priority {priority}".format(**config_data["neighbor"])
+ return command
+
+
+def _tmplt_ospf_network(config_data):
+ if "network" in config_data:
+ command = []
+ for each in config_data["network"]:
+ cmd = "network"
+ if "address" in each:
+ cmd += " {address} {wildcard_bits}".format(**each)
+ if "area" in each:
+ cmd += " area {area}".format(**each)
+ command.append(cmd)
+ return command
+
+
+def _tmplt_ospf_nsf_cisco(config_data):
+ if "cisco" in config_data["nsf"]:
+ command = "nsf cisco helper"
+ if "disable" in config_data["nsf"]["cisco"]:
+ command += " disable"
+ return command
+
+
+def _tmplt_ospf_nsf_ietf(config_data):
+ if "ietf" in config_data["nsf"]:
+ command = "nsf ietf helper"
+ if "disable" in config_data["nsf"]["ietf"]:
+ command += " disable"
+ elif "strict_lsa_checking" in config_data["nsf"]["ietf"]:
+ command += " strict-lsa-checking"
+ return command
+
+
+def _tmplt_ospf_queue_depth_hello(config_data):
+ if "hello" in config_data["queue_depth"]:
+ command = "queue-depth hello"
+ if "max_packets" in config_data["queue_depth"]["hello"]:
+ command += " {max_packets}".format(
+ **config_data["queue_depth"]["hello"]
+ )
+ elif "unlimited" in config_data["queue_depth"]["hello"]:
+ command += " unlimited"
+ return command
+
+
+def _tmplt_ospf_queue_depth_update(config_data):
+ if "update" in config_data["queue_depth"]:
+ command = "queue-depth update"
+ if "max_packets" in config_data["queue_depth"]["update"]:
+ command += " {max_packets}".format(
+ **config_data["queue_depth"]["update"]
+ )
+ elif "unlimited" in config_data["queue_depth"]["update"]:
+ command += " unlimited"
+ return command
+
+
+def _tmplt_ospf_summary_address(config_data):
+ if "summary_address" in config_data:
+ command = "summary-address {address} {mask}".format(
+ **config_data["summary_address"]
+ )
+ if "not_advertise" in config_data["summary_address"]:
+ command += " not-advertise"
+ elif "nssa_only" in config_data["summary_address"]:
+ command += " nssa-only"
+ if "tag" in config_data["summary_address"]:
+ command += " tag {tag}".format(
+ **config_data["summary_address"]
+ )
+ return command
+
+
+def _tmplt_ospf_timers_pacing(config_data):
+ if "pacing" in config_data["timers"]:
+ command = "timers pacing"
+ if "flood" in config_data["timers"]["pacing"]:
+ command += " flood {flood}".format(
+ **config_data["timers"]["pacing"]
+ )
+ elif "lsa_group" in config_data["timers"]["pacing"]:
+ command += " lsa-group {lsa_group}".format(
+ **config_data["timers"]["pacing"]
+ )
+ elif "retransmission" in config_data["timers"]["pacing"]:
+ command += " retransmission {retransmission}".format(
+ **config_data["timers"]["pacing"]
+ )
+ return command
+
+
+def _tmplt_ospf_ttl_security(config_data):
+ if "ttl_security" in config_data:
+ command = "ttl-security all-interfaces"
+ if "hops" in config_data["ttl_security"]:
+ command += " hops {hops}".format(**config_data["ttl_security"])
+ return command
+
+
+class Ospfv2Template(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(Ospfv2Template, self).__init__(lines=lines, tmplt=self)
+
+ PARSERS = [
+ {
+ "name": "pid",
+ "getval": re.compile(
+ r"""
+ ^router\s
+ ospf*
+ \s(?P<pid>\S+)
+ \svrf
+ \s(?P<vrf>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_vrf_cmd,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "process_id": "{{ pid|int }}",
+ "vrf": "{{ vrf }}",
+ }
+ }
+ },
+ "shared": True,
+ },
+ {
+ "name": "pid",
+ "getval": re.compile(
+ r"""
+ ^router\s
+ ospf*
+ \s(?P<pid>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_vrf_cmd,
+ "result": {
+ "processes": {"{{ pid }}": {"process_id": "{{ pid|int }}"}}
+ },
+ "shared": True,
+ },
+ {
+ "name": "adjacency",
+ "getval": re.compile(
+ r"""\s+adjacency
+ \sstagger*
+ \s*((?P<min>\d+)|(?P<none_adj>none))*
+ \s*(?P<max>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_adjacency_cmd,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "adjacency": {
+ "min_adjacency": "{{ min|int }}",
+ "max_adjacency": "{{ max|int }}",
+ "none": "{{ True if none_adj is defined else None }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "address_family",
+ "getval": re.compile(
+ r"""\s+topology
+ \s(?P<base>base)*
+ \s*(?P<name>\S+)*
+ \s*(?P<tid>tid\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_address_family_cmd,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "address_family": {
+ "topology": {
+ "base": "{{ True if base is defined }}",
+ "name": "{{ name }}",
+ "tid": "{{ tid.split(" ")[1] }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.authentication",
+ "getval": re.compile(
+ r"""\s+area
+ \s(?P<area_id>\S+)*
+ \s*(?P<auth>authentication)*
+ \s*(?P<md>message-digest)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_authentication,
+ "compval": "authentication",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "authentication": {
+ "enable": "{{ True if auth is defined and md is undefined }}",
+ "message_digest": "{{ not not md }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.capability",
+ "getval": re.compile(
+ r"""\s+area
+ \s(?P<area_id>\S+)*
+ \s*(?P<capability>capability)*
+ \s*(?P<df>default-exclusion)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} capability default-exclusion",
+ "compval": "capability",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "capability": "{{ not not capability }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.default_cost",
+ "getval": re.compile(
+ r"""\s+area
+ \s(?P<area_id>\S+)*
+ \sdefault-cost*
+ \s*(?P<default_cost>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} default-cost {{ default_cost }}",
+ "compval": "default_cost",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "default_cost": "{{ default_cost|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.filter_list",
+ "getval": re.compile(
+ r"""\s+area
+ \s*(?P<area_id>\S+)*
+ \s*filter-list\sprefix*
+ \s*(?P<name>\S+)*
+ \s*(?P<dir>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_filter,
+ "compval": "filter_list",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "filter_list": [
+ {
+ "name": "{{ name }}",
+ "direction": "{{ dir }}",
+ }
+ ],
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa",
+ "getval": re.compile(
+ r"""\s+area\s(?P<area_id>\S+)
+ \s(?P<nssa>nssa)*
+ \s*(?P<no_redis>no-redistribution)*
+ \s*(?P<def_origin>default-information-originate)*
+ \s*(?P<metric>metric\s\d+)*
+ \s*(?P<metric_type>metric-type\s\d+)*
+ \s*(?P<no_summary>no-summary)*
+ \s*(?P<no_ext>no-ext-capability)*$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_nssa_translate,
+ "compval": "nssa",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "set": "{{ True if nssa is defined and def_origin is undefined and "
+ "no_ext is undefined and no_redis is undefined and nssa_only is undefined }}",
+ "default_information_originate": {
+ "set": "{{ True if def_origin is defined and metric is undefined and "
+ "metric_type is undefined and nssa_only is undefined }}",
+ "metric": "{{ metric.split("
+ ")[1]|int }}",
+ "metric_type": "{{ metric_type.split("
+ ")[1]|int }}",
+ "nssa_only": "{{ True if nssa_only is defined }}",
+ },
+ "no_ext_capability": "{{ True if no_ext is defined }}",
+ "no_redistribution": "{{ True if no_redis is defined }}",
+ "no_summary": "{{ True if no_summary is defined }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa.translate",
+ "getval": re.compile(
+ r"""\s+area*
+ \s*(?P<area_id>\S+)*
+ \s*(?P<nssa>nssa)*
+ \stranslate\stype7*
+ \s(?P<translate_always>always)*
+ \s* (?P<translate_supress>suppress-fa)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_nssa,
+ "compval": "nssa.translate",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "translate": "{{ translate_always if translate_always is defined else translate_supress if translate_supress is defined }}"
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.ranges",
+ "getval": re.compile(
+ r"""\s+area\s(?P<area_id>\S+)
+ \srange
+ \s(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+ \s(?P<netmask>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*((?P<advertise>advertise)|(?P<not_advertise>not-advertise))*
+ \s*(?P<cost>cost\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_ranges,
+ "compval": "ranges",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "ranges": [
+ {
+ "address": "{{ address }}",
+ "netmask": "{{ netmask }}",
+ "advertise": "{{ True if advertise is defined }}",
+ "cost": "{{ cost.split(" ")[1]|int }}",
+ "not_advertise": "{{ True if not_advertise is defined }}",
+ }
+ ],
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.sham_link",
+ "getval": re.compile(
+ r"""\s+area\s(?P<area_id>\S+)
+ \ssham-link
+ \s(?P<source>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+ \s(?P<destination>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<cost>cost\s\d+)*
+ \s*(?P<ttl_security>ttl-security\shops\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_sham_link,
+ "compval": "sham_link",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "sham_link": {
+ "source": "{{ source }}",
+ "destination": "{{ destination }}",
+ "cost": "{{ cost.split(" ")[1]|int }}",
+ "ttl_security": '{{ ttl_security.split("hops ")[1] }}',
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.stub",
+ "getval": re.compile(
+ r"""\s+area\s(?P<area_id>\S+)
+ \s(?P<stub>stub)*
+ \s*(?P<no_ext>no-ext-capability)*
+ \s*(?P<no_sum>no-summary)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_stub_link,
+ "compval": "stub",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "stub": {
+ "set": "{{ True if stub is defined and no_ext is undefined and no_sum is undefined }}",
+ "no_ext_capability": "{{ True if no_ext is defined }}",
+ "no_summary": "{{ True if no_sum is defined }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "auto_cost",
+ "getval": re.compile(
+ r"""\s+(?P<auto_cost>auto-cost)*
+ \s*(?P<ref_band>reference-bandwidth\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_auto_cost,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "auto_cost": {
+ "set": "{{ True if auto_cost is defined and ref_band is undefined }}",
+ "reference_bandwidth": '{{ ref_band.split(" ")[1] }}',
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "bfd",
+ "getval": re.compile(
+ r"""\s+bfd*
+ \s*(?P<bfd>all-interfaces)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "bfd all-interfaces",
+ "result": {
+ "processes": {
+ "{{ pid }}": {"bfd": "{{ True if bfd is defined }}"}
+ }
+ },
+ },
+ {
+ "name": "capability",
+ "getval": re.compile(
+ r"""\s+capability*
+ \s*((?P<lls>lls)|(?P<opaque>opaque)|(?P<transit>transit)|(?P<vrf_lite>vrf-lite))
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_capability,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "capability": {
+ "lls": "{{ True if lls is defined }}",
+ "opaque": "{{ True if opaque is defined }}",
+ "transit": "{{ True if transit is defined }}",
+ "vrf_lite": "{{ True if vrf_lite is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "compatible",
+ "getval": re.compile(
+ r"""\s+compatible*
+ \s*((?P<rfc1583>rfc1583)|(?P<rfc1587>rfc1587)|(?P<rfc5243>rfc5243))
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_compatible,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "compatible": {
+ "rfc1583": "{{ True if rfc1583 is defined }}",
+ "rfc1587": "{{ True if rfc1587 is defined }}",
+ "rfc5243": "{{ True if rfc5243 is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "default_information",
+ "getval": re.compile(
+ r"""\s+default-information*
+ \s*(?P<originate>originate)*
+ \s*(?P<always>always)*
+ \s*(?P<metric>metric\s\d+)*
+ \s*(?P<metric_type>metric-type\s\d+)*
+ \s*(?P<route_map>route-map\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_default_information,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "default_information": {
+ "originate": "{{ True if originate is defined }}",
+ "always": "{{ True if always is defined }}",
+ "metric": "{{ metric.split(" ")[1]|int }}",
+ "metric_type": "{{ metric_type.split("
+ ")[1]|int }}",
+ "route_map": "{{ route_map.split(" ")[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "default_metric",
+ "getval": re.compile(
+ r"""\s+default-metric(?P<default_metric>\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "default-metric {{ default_metric }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {"default_metric": "{{ default_metric| int}}"}
+ }
+ },
+ },
+ {
+ "name": "discard_route",
+ "getval": re.compile(
+ r"""\s+(?P<discard_route>discard-route)*
+ \s*(?P<external>external\s\d+)*
+ \s*(?P<internal>internal\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_discard_route,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "discard_route": {
+ "set": "{{ True if discard_route is defined and external is undefined and internal is undefined }}",
+ "external": "{{ external.split(" ")[1]|int }}",
+ "internal": "{{ internal.split(" ")[1]|int }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "distance.admin_distance",
+ "getval": re.compile(
+ r"""\s+distance
+ \s(?P<admin_dist>\S+)*
+ \s*(?P<source>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<wildcard>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<acl>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distance_admin_distance,
+ "compval": "admin_distance",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distance": {
+ "admin_distance": {
+ "distance": "{{ admin_dist }}",
+ "address": "{{ source }}",
+ "wildcard_bits": "{{ wildcard }}",
+ "acl": "{{ acl }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "distance.ospf",
+ "getval": re.compile(
+ r"""\s+distance
+ \sospf*
+ \s*(?P<intra>intra-area\s\d+)*
+ \s*(?P<inter>inter-area\s\d+)*
+ \s*(?P<external>external\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distance_ospf,
+ "compval": "ospf",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distance": {
+ "ospf": {
+ "inter_area": "{{ inter.split(" ")[1]|int }}",
+ "intra_area": "{{ intra.split(" ")[1]|int }}",
+ "external": "{{ external.split(" ")[1]|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "distribute_list.acls",
+ "getval": re.compile(
+ r"""\s+distribute-list
+ \s(?P<name>\S+)*
+ \s*(?P<dir>\S+)*
+ \s*(?P<int_pro>\S+\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distribute_list_acls,
+ "compval": "distribute_list.acls",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distribute_list": {
+ "acls": [
+ {
+ "name": "{{ name }}",
+ "direction": "{{ dir }}",
+ "interface": '{{ int_pro if dir == "in" }}',
+ "protocol": '{{ int_pro if dir == "out" }}',
+ }
+ ]
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "distribute_list.prefix",
+ "getval": re.compile(
+ r"""\s+distribute-list
+ \s(?P<prefix>prefix\s\S+)*
+ \s*(?P<gateway>gateway\s\S+)*
+ \s*(?P<dir>\S+)*
+ \s*(?P<int_pro>\S+\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distribute_list_prefix,
+ "compval": "distribute_list.prefix",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distribute_list": {
+ "prefix": {
+ "name": "{{ prefix.split(" ")[1] }}",
+ "gateway_name": "{{ gateway.split("
+ ")[1] if prefix is defined }}",
+ "direction": "{{ dir if gateway is undefined }}",
+ "interface": '{{ int_pro if dir == "in" }}',
+ "protocol": '{{ int_pro if dir == "out" }}',
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "distribute_list.route_map",
+ "getval": re.compile(
+ r"""\s+distribute-list
+ \s(?P<route_map>route-map\s\S+)*
+ \s*(?P<dir>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "distribute-list route-map {{ distribute_list.route_map.name }} in",
+ "compval": "distribute_list.route_map",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distribute_list": {
+ "route_map": {
+ "name": "{{ route_map.split(" ")[1] }}"
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "domain_id",
+ "getval": re.compile(
+ r"""\s+domain-id
+ \s(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<secondary>secondary)*
+ \s*(?P<null>null)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_domain_id,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "domain_id": {
+ "ip_address": {
+ "address": "{{ address }}",
+ "secondary": "{{ True if secondary is defined }}",
+ },
+ "null": "{{ True if null is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "domain_tag",
+ "getval": re.compile(
+ r"""\s+domain-tag
+ \s(?P<tag>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "domain-tag {{ domain_tag }}",
+ "result": {
+ "processes": {"{{ pid }}": {"domain_tag": "{{ tag|int }}"}}
+ },
+ },
+ {
+ "name": "event_log",
+ "getval": re.compile(
+ r"""\s+(?P<event_log>event-log)*
+ \s*(?P<one_shot>one-shot)*
+ \s*(?P<pause>pause)*
+ \s*(?P<size>size\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_event_log,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "event_log": {
+ "enable": "{{ True if event_log is defined and one_shot is undefined and pause is undefined and size is undefined }}",
+ "one_shot": "{{ True if one_shot is defined }}",
+ "pause": "{{ True if pause is defined }}",
+ "size": "{{ size.split(" ")[1]|int }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "help",
+ "getval": re.compile(
+ r"""\s+(?P<help>help)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "help",
+ "result": {
+ "processes": {
+ "{{ pid }}": {"help": "{{ True if help is defined }}"}
+ }
+ },
+ },
+ {
+ "name": "ignore",
+ "getval": re.compile(
+ r"""\s+(?P<ignore>ignore)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "ignore lsa mospf",
+ "result": {
+ "processes": {
+ "{{ pid }}": {"ignore": "{{ True if ignore is defined }}"}
+ }
+ },
+ },
+ {
+ "name": "interface_id",
+ "getval": re.compile(
+ r"""\s+(?P<interface_id>interface-id\ssnmp-if-index)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "interface-id snmp-if-index",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "interface_id": "{{ True if interface_id is defined }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "ispf",
+ "getval": re.compile(
+ r"""\s+(?P<ispf>ispf)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "ispf",
+ "result": {
+ "processes": {
+ "{{ pid }}": {"ispf": "{{ True if ispf is defined }}"}
+ }
+ },
+ },
+ {
+ "name": "limit",
+ "getval": re.compile(
+ r"""\s+limit\sretransmissions
+ \s((?P<dc_num>dc\s\d+)|(?P<dc_disable>dc\sdisable))*
+ \s*((?P<non_dc_num>non-dc\s\d+)|(?P<non_dc_disable>non-dc\sdisable))
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_limit,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "limit": {
+ "dc": {
+ "number": "{{ dc_num.split(" ")[1]|int }}",
+ "disable": "{{ True if dc_disable is defined }}",
+ },
+ "non_dc": {
+ "number": "{{ non_dc_num.split(" ")[1]|int }}",
+ "disable": "{{ True if dc_disable is defined }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "local_rib_criteria",
+ "getval": re.compile(
+ r"""\s+(?P<local>local-rib-criteria)*
+ \s*(?P<forward>forwarding-address)*
+ \s*(?P<inter>inter-area-summary)*
+ \s*(?P<nssa>nssa-translation)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_vrf_local_rib_criteria,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "local_rib_criteria": {
+ "enable": "{{ True if local is defined and forward is undefined and inter is undefined and nssa is undefined }}",
+ "forwarding_address": "{{ True if forward is defined }}",
+ "inter_area_summary": "{{ True if inter is defined }}",
+ "nssa_translation": "{{ True if nssa is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "log_adjacency_changes",
+ "getval": re.compile(
+ r"""\s+(?P<log>log-adjacency-changes)*
+ \s*(?P<detail>detail)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_log_adjacency_changes,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "log_adjacency_changes": {
+ "set": "{{ True if log is defined and detail is undefined }}",
+ "detail": "{{ True if detail is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "max_lsa",
+ "getval": re.compile(
+ r"""\s+max-lsa
+ \s(?P<number>\d+)*
+ \s*(?P<threshold>\d+)*
+ \s*(?P<ignore_count>ignore-count\s\d+)*
+ \s*(?P<ignore_time>ignore-time\s\d+)*
+ \s*(?P<reset_time>reset-time\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_max_lsa,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "max_lsa": {
+ "number": "{{ number }}",
+ "threshold_value": "{{ threshold }}",
+ "ignore_count": "{{ ignore_count.split(" ")[1] }}",
+ "ignore_time": "{{ ignore_time.split(" ")[1] }}",
+ "reset_time": "{{ reset_time.split(" ")[1] }}",
+ "warning_only": "{{ True if warning is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "max_metric",
+ "getval": re.compile(
+ r"""\s+max-metric*
+ \s*(?P<router_lsa>router-lsa)*
+ \s*(?P<include_stub>include-stub)*
+ \s*(?P<external_lsa>external-lsa\s\d+)*
+ \s*(?P<startup_time>on-startup\s\d+)*
+ \s*(?P<startup_wait>on-startup\s\S+)*
+ \s*(?P<summary_lsa>summary-lsa\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_max_metric,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "max_metric": {
+ "router_lsa": "{{ True if router_lsa is defined }}",
+ "external_lsa": "{{ external_lsa.split(" ")[1] }}",
+ "include_stub": "{{ ignore_count.split(" ")[1] }}",
+ "on_startup": {
+ "time": "{{ startup_time.split(" ")[1] }}",
+ "wait_for_bgp": "{{ True if startup_wait is defined }}",
+ },
+ "summary_lsa": "{{ summary_lsa.split(" ")[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "maximum_paths",
+ "getval": re.compile(
+ r"""\s+maximum-paths*
+ \s+(?P<paths>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "maximum-paths {{ maximum_paths }}",
+ "result": {
+ "processes": {"{{ pid }}": {"maximum_paths": "{{ paths }}"}}
+ },
+ },
+ {
+ "name": "mpls.ldp",
+ "getval": re.compile(
+ r"""\s+mpls
+ \sldp*
+ \s*(?P<autoconfig>autoconfig*\s*(?P<area>area\s\S+))*
+ \s*(?P<sync>sync)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_mpls_ldp,
+ "compval": "ldp",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "mpls": {
+ "ldp": {
+ "autoconfig": {
+ "set": "{{ True if autoconfig is defined and area is undefined }}",
+ "area": "{{ area.split(" ")[1] }}",
+ },
+ "sync": "{{ True if sync is defined }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "mpls.traffic_eng",
+ "getval": re.compile(
+ r"""\s+mpls
+ \straffic-eng*
+ \s*(?P<area>area\s\S+)*
+ \s*(?P<autoroute>autoroute-exclude\s\S+\s\S+)*
+ \s*(?P<interface>interface\s(?P<int_type>\S+\s\S+)\s(?P<int_area>area\s\S+))*
+ \s*(?P<mesh>mesh-group\s\d+\s(?P<mesh_int>\S+\s\S+)\s(?P<mesh_area>area\s\d+))*
+ \s*(?P<multicast>multicast-intact)*
+ \s*(?P<router>router-id\s(?P<router_int>\S+\s\S+))
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_mpls_traffic_eng,
+ "compval": "traffic_eng",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "mpls": {
+ "traffic_eng": {
+ "area": "{{ area.split(" ")[1] }}",
+ "autoroute_exclude": "{{ autoroute.split("
+ ")[2] }}",
+ "interface": {
+ "interface_type": "{{ int_type }}",
+ "area": "{{ int_area.split(" ")[1] }}",
+ },
+ "mesh_group": {
+ "id": "{{ mesh.split(" ")[1] }}",
+ "interface": "{{ mest_int }}",
+ "area": "{{ mesh_area.split(" ")[1] }}",
+ },
+ "multicast_intact": "{{ True if multicast is defined }}",
+ "router_id_interface": "{{ router_int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "neighbor",
+ "getval": re.compile(
+ r"""\s+neighbor
+ \s(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<cost>cost\s\d+)*
+ \s*(?P<db_filter>database-filter\sall\sout)*
+ \s*(?P<poll>poll-interval\s\d+)*
+ \s*(?P<priority>priority\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_neighbor,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "neighbor": {
+ "address": "{{ address }}",
+ "cost": "{{ cost.split(" ")[1] }}",
+ "database_filter": "{{ True if db_filter is defined }}",
+ "poll_interval": "{{ poll.split(" ")[1] }}",
+ "priority": "{{ priority.split(" ")[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "network",
+ "getval": re.compile(
+ r"""\s+network
+ \s(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<wildcard>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<area>area\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_network,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "network": [
+ {
+ "address": "{{ address }}",
+ "wildcard_bits": "{{ wildcard }}",
+ "area": "{{ area.split(" ")[1] }}",
+ }
+ ]
+ }
+ }
+ },
+ },
+ {
+ "name": "nsf.cisco",
+ "getval": re.compile(
+ r"""\s+nsf
+ \s(?P<cisco>cisco)*
+ \s*(?P<helper>helper)*
+ \s*(?P<disable>disable)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_nsf_cisco,
+ "compval": "cisco",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "nsf": {
+ "cisco": {
+ "helper": "{{ True if helper is defined }}",
+ "disable": "{{ True if disable is defined }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "nsf.ietf",
+ "getval": re.compile(
+ r"""\s+nsf
+ \s(?P<ietf>ietf)*
+ \s*(?P<helper>helper)*
+ \s*(?P<disable>disable)*
+ \s*(?P<strict>strict-lsa-checking)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_nsf_ietf,
+ "compval": "ietf",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "nsf": {
+ "ietf": {
+ "helper": "{{ True if helper is defined }}",
+ "disable": "{{ True if disable is defined }}",
+ "strict_lsa_checking": "{{ True if strict is defined }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "passive_interface",
+ "getval": re.compile(
+ r"""\s+passive-interface
+ \s(?P<interface>\S+\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "passive-interface {{ passive_interface }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {"passive_interface": "{{ interface }}"}
+ }
+ },
+ },
+ {
+ "name": "prefix_suppression",
+ "getval": re.compile(
+ r"""\s+(?P<prefix_sup>prefix-suppression)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "prefix-suppression",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "prefix_suppression": "{{ True if prefix_sup is defined }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "priority",
+ "getval": re.compile(
+ r"""\s+priority
+ \s(?P<priority>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "priority {{ priority }}",
+ "result": {
+ "processes": {"{{ pid }}": {"priority": "{{ priority }}"}}
+ },
+ },
+ {
+ "name": "queue_depth.hello",
+ "getval": re.compile(
+ r"""\s+queue-depth
+ \shello*
+ \s*(?P<max_packets>\d+)*
+ \s*(?P<unlimited>unlimited)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_queue_depth_hello,
+ "compval": "hello",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "queue_depth": {
+ "hello": {
+ "max_packets": "{{ max_packets }}",
+ "unlimited": "{{ True if unlimited is defined }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "queue_depth.update",
+ "getval": re.compile(
+ r"""\s+queue-depth
+ \supdate*
+ \s*(?P<max_packets>\d+)*
+ \s*(?P<unlimited>unlimited)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_queue_depth_update,
+ "compval": "update",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "queue_depth": {
+ "update": {
+ "max_packets": "{{ max_packets }}",
+ "unlimited": "{{ True if unlimited is defined }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "router_id",
+ "getval": re.compile(
+ r"""\s+router-id
+ \s(?P<id>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "router-id {{ router_id }}",
+ "result": {"processes": {"{{ pid }}": {"router_id": "{{ id }}"}}},
+ },
+ {
+ "name": "shutdown",
+ "getval": re.compile(
+ r"""\s+(?P<shutdown>shutdown)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "shutdown",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "shutdown": "{{ True if shutdown is defined }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "summary_address",
+ "getval": re.compile(
+ r"""\s+summary-address
+ \s(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<mask>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<not_adv>not-advertise)*
+ \s*(?P<nssa>nssa-only)*
+ \s*(?P<tag>tag\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_summary_address,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "summary_address": {
+ "address": "{{ address }}",
+ "mask": "{{ mask }}",
+ "not_advertise": "{{ True if not_adv is defined }}",
+ "nssa_only": "{{ True if nssa is defined }}",
+ "tag": "{{ tag.split(" ")[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.lsa",
+ "getval": re.compile(
+ r"""\s+timers
+ \slsa
+ \sarrival
+ \s(?P<lsa>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "timers lsa arrival {{ timers.lsa }}",
+ "compval": "lsa",
+ "result": {
+ "processes": {"{{ pid }}": {"timers": {"lsa": "{{ lsa }}"}}}
+ },
+ },
+ {
+ "name": "timers.pacing",
+ "getval": re.compile(
+ r"""\s+timers
+ \spacing
+ \s(?P<flood>flood\s\d+)*
+ \s*(?P<lsa_group>lsa-group\s\d+)*
+ \s*(?P<retransmission>retransmission\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_timers_pacing,
+ "compval": "pacing",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "pacing": {
+ "flood": "{{ flood.split(" ")[1] }}",
+ "lsa_group": "{{ lsa_group.split(" ")[1] }}",
+ "retransmission": "{{ retransmission.split("
+ ")[1] }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.throttle.lsa",
+ "getval": re.compile(
+ r"""\s+timers
+ \sthrottle
+ \s*(?P<lsa>lsa)*
+ \s*(?P<first_delay>\d+)*
+ \s*(?P<min_delay>\d+)*
+ \s*(?P<max_delay>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle lsa {{ throttle.lsa.first_delay }} {{ throttle.lsa.min_delay }} {{ throttle.lsa.max_delay }}",
+ "compval": "throttle.lsa",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "throttle": {
+ "lsa": {
+ "first_delay": "{{ first_delay }}",
+ "min_delay": "{{ min_delay }}",
+ "max_delay": "{{ max_delay }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.throttle.spf",
+ "getval": re.compile(
+ r"""\s+timers
+ \sthrottle
+ \s*(?P<spf>spf)*
+ \s*(?P<first_delay>\d+)*
+ \s*(?P<min_delay>\d+)*
+ \s*(?P<max_delay>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle spf {{ throttle.spf.receive_delay }} {{ throttle.spf.between_delay }} {{ throttle.spf.max_delay }}",
+ "compval": "throttle.spf",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "throttle": {
+ "spf": {
+ "receive_delay": "{{ first_delay }}",
+ "between_delay": "{{ min_delay }}",
+ "max_delay": "{{ max_delay }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "traffic_share",
+ "getval": re.compile(
+ r"""\s+(?P<traffic>traffic-share\smin\sacross-interfaces)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "traffic-share min across-interfaces",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "traffic_share": "{{ True if traffic is defined }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "ttl_security",
+ "getval": re.compile(
+ r"""\s+ttl-security
+ \s(?P<interfaces>all-interfaces)*
+ \s*(?P<hops>hops\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_ttl_security,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "ttl_security": {
+ "set": "{{ True if interfaces is defined and hops is undefined }}",
+ "hops": "{{ hops.split(" ")[1] }}",
+ }
+ }
+ }
+ },
+ },
+ ]
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/ospfv3.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/ospfv3.py
new file mode 100644
index 00000000..08830a61
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/rm_templates/ospfv3.py
@@ -0,0 +1,3132 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+def _tmplt_ospfv3_cmd(process):
+
+ command = "router ospfv3 {process_id}".format(**process)
+ if "vrf" in process:
+ command += " vrf {vrf}".format(**process)
+ return command
+
+
+def _tmplt_ospf_adjacency_cmd(config_data):
+ if "adjacency" in config_data:
+ command = "adjacency stagger"
+ if "none" in config_data["adjacency"]:
+ command += " none"
+ else:
+ command += " {min_adjacency}".format(**config_data["adjacency"])
+ if "max_adjacency" in config_data["adjacency"]:
+ command += " {min_adjacency}".format(**config_data["adjacency"])
+ return command
+
+
+def _tmplt_ospf_address_family_cmd(config_data):
+ if "address_family" in config_data:
+ command = []
+ # for config_data in config_data["address_family"]:
+ cmd = "address-family {afi}".format(**config_data["address_family"])
+ if config_data["address_family"].get("unicast"):
+ cmd += " unicast"
+ if config_data["address_family"].get("vrf"):
+ cmd += " vrf {vrf}".format(**config_data["address_family"])
+ command.append(cmd)
+ if command:
+ command.insert(len(command), "exit-address-family")
+ return command
+
+
+def _tmplt_address_family_graceful_restart(config_data):
+ if "graceful_restart" in config_data:
+ command = "graceful_restart {enable}".format(
+ **config_data["graceful_restart"]
+ )
+ if "disable" in config_data["graceful_restart"]:
+ command += " disable"
+ elif "strict_lsa_checking" in config_data["graceful_restart"]:
+ command += " strict-lsa-checking"
+ return command
+
+
+def _tmplt_ospf_area_authentication(config_data):
+ if "authentication" in config_data:
+ command = "area {area_id} authentication".format(**config_data)
+ if config_data["authentication"].get("message_digest"):
+ command += " message-digest"
+ return command
+
+
+def _tmplt_ospf_area_filter(config_data):
+ if "filter_list" in config_data:
+ command = []
+ for key, value in iteritems(config_data.get("filter_list")):
+ cmd = "area {area_id}".format(**config_data)
+ if value.get("name") and value.get("direction"):
+ cmd += " filter-list prefix {name} {direction}".format(**value)
+ command.append(cmd)
+ return command
+
+
+def _tmplt_ospf_area_nssa(config_data):
+ if "nssa" in config_data:
+ command = "area {area_id} nssa".format(**config_data)
+ if "default_information_originate" in config_data["nssa"]:
+ command += " default-information-originate"
+ if (
+ "metric"
+ in config_data["nssa"]["default_information_originate"]
+ ):
+ command += " metric {metric}".format(
+ **config_data["nssa"]["default_information_originate"]
+ )
+ if (
+ "metric_type"
+ in config_data["nssa"]["default_information_originate"]
+ ):
+ command += " metric-type {metric_type}".format(
+ **config_data["nssa"]["default_information_originate"]
+ )
+ if (
+ "nssa_only"
+ in config_data["nssa"]["default_information_originate"]
+ ):
+ command += " nssa-only"
+ if config_data["nssa"].get("no_ext_capability"):
+ command += " no-ext-capability"
+ if config_data["nssa"].get("no_redistribution"):
+ command += " no-redistribution"
+ if config_data["nssa"].get("no_summary"):
+ command += " no-summary"
+ return command
+
+
+def _tmplt_ospf_area_nssa_translate(config_data):
+ if "nssa" in config_data and "translate" in config_data["nssa"]:
+ command = "area {area_id} nssa".format(**config_data)
+ if "translate" in config_data["nssa"]:
+ command += " translate type7 {translate}".format(
+ **config_data["nssa"]
+ )
+ return command
+
+
+def _tmplt_ospf_area_ranges(config_data):
+ if "ranges" in config_data:
+ commands = []
+ for k, v in iteritems(config_data["ranges"]):
+ cmd = "area {area_id} range".format(**config_data)
+ temp_cmd = " {address} {netmask}".format(**v)
+ if "advertise" in v:
+ temp_cmd += " advertise"
+ elif "not_advertise" in v:
+ temp_cmd += " not-advertise"
+ if "cost" in v:
+ temp_cmd += " cost {cost}".format(**v)
+ cmd += temp_cmd
+ commands.append(cmd)
+ return commands
+
+
+def _tmplt_ospf_area_sham_link(config_data):
+ if "sham_link" in config_data:
+ command = "area {area_id} sham-link".format(**config_data)
+ if "source" in config_data["sham_link"]:
+ command += " {source} {destination}".format(
+ **config_data["sham_link"]
+ )
+ if "cost" in config_data["sham_link"]:
+ command += " cost {cost}".format(**config_data["sham_link"])
+ if "ttl_security" in config_data["sham_link"]:
+ command += " ttl-security hops {ttl_security}".format(
+ **config_data["sham_link"]
+ )
+ return command
+
+
+def _tmplt_ospf_area_stub_link(config_data):
+ if "stub" in config_data:
+ command = "area {area_id} stub".format(**config_data)
+ if "no_ext_capability" in config_data["stub"]:
+ command += " no-ext-capability"
+ if "no_summary" in config_data["stub"]:
+ command += " no-summary"
+ return command
+
+
+def _tmplt_ospf_auto_cost(config_data):
+ if "auto_cost" in config_data:
+ command = "auto-cost"
+ if "reference_bandwidth" in config_data["auto_cost"]:
+ command += " reference-bandwidth {reference_bandwidth}".format(
+ **config_data["auto_cost"]
+ )
+ return command
+
+
+def _tmplt_ospf_capability(config_data):
+ if "capability" in config_data:
+ if "lls" in config_data["capability"]:
+ command = "capability lls"
+ elif "opaque" in config_data["capability"]:
+ command = "capability opaque"
+ elif "transit" in config_data["capability"]:
+ command = "capability transit"
+ elif "vrf_lite" in config_data["capability"]:
+ command = "capability vrf_lite"
+ return command
+
+
+def _tmplt_ospf_compatible(config_data):
+ if "compatible" in config_data:
+ if "rfc1583" in config_data["compatible"]:
+ command = "compatible rfc1583"
+ elif "rfc1587" in config_data["compatible"]:
+ command = "compatible rfc1587"
+ elif "rfc5243" in config_data["compatible"]:
+ command = "compatible rfc5243"
+ return command
+
+
+def _tmplt_ospf_default_information(config_data):
+ if "default_information" in config_data:
+ command = "default-information"
+ if "originate" in config_data["default_information"]:
+ command += " originate"
+ if "always" in config_data["default_information"]:
+ command += " always"
+ if "metric" in config_data["default_information"]:
+ command += " metric {metric}".format(
+ **config_data["default_information"]
+ )
+ if "metric_type" in config_data["default_information"]:
+ command += " metric-type {metric_type}".format(
+ **config_data["default_information"]
+ )
+ if "metric" in config_data["default_information"]:
+ command += " route-map {route_map}".format(
+ **config_data["default_information"]
+ )
+ return command
+
+
+def _tmplt_ospf_discard_route(config_data):
+ if "discard_route" in config_data:
+ command = "discard-route"
+ if "external" in config_data["discard_route"]:
+ command += " external {external}".format(
+ **config_data["discard_route"]
+ )
+ if "internal" in config_data["discard_route"]:
+ command += " internal {internal}".format(
+ **config_data["discard_route"]
+ )
+ return command
+
+
+def _tmplt_ospf_distance_admin_distance(config_data):
+ if "admin_distance" in config_data["distance"]:
+ command = "distance {distance}".format(
+ **config_data["distance"]["admin_distance"]
+ )
+ if "address" in config_data["distance"]["admin_distance"]:
+ command += " {address} {wildcard_bits}".format(
+ **config_data["distance"]["admin_distance"]
+ )
+ if "acl" in config_data["distance"]["admin_distance"]:
+ command += " {acl}".format(
+ **config_data["distance"]["admin_distance"]
+ )
+ return command
+
+
+def _tmplt_ospf_distance_ospf(config_data):
+ if "ospf" in config_data["distance"]:
+ command = "distance ospf"
+ if "inter_area" in config_data["distance"]["ospf"]:
+ command += " inter-area {inter_area}".format(
+ **config_data["distance"]["ospf"]
+ )
+ if config_data["distance"].get("ospf").get("intra_area"):
+ command += " intra-area {intra_area}".format(
+ **config_data["distance"]["ospf"]
+ )
+ if config_data["distance"].get("ospf").get("external"):
+ command += " external {external}".format(
+ **config_data["distance"]["ospf"]
+ )
+ return command
+
+
+def _tmplt_ospf_distribute_list_acls(config_data):
+ if "acls" in config_data.get("distribute_list"):
+ command = []
+ for k, v in iteritems(config_data["distribute_list"]["acls"]):
+ cmd = "distribute-list {name} {direction}".format(**v)
+ if "interface" in v:
+ cmd += " {interface}".format(**v)
+ if "protocol" in v:
+ cmd += " {protocol}".format(**v)
+ command.append(cmd)
+ return command
+
+
+def _tmplt_ospf_distribute_list_prefix(config_data):
+ if "prefix" in config_data.get("distribute_list"):
+ command = "distribute-list prefix {name}".format(
+ **config_data["distribute_list"]["prefix"]
+ )
+ if "gateway_name" in config_data["distribute_list"]["prefix"]:
+ command += " gateway {gateway_name}".format(
+ **config_data["distribute_list"]["prefix"]
+ )
+ if "direction" in config_data["distribute_list"]["prefix"]:
+ command += " {direction}".format(
+ **config_data["distribute_list"]["prefix"]
+ )
+ if "interface" in config_data["distribute_list"]["prefix"]:
+ command += " {interface}".format(
+ **config_data["distribute_list"]["prefix"]
+ )
+ if "protocol" in config_data["distribute_list"]["prefix"]:
+ command += " {protocol}".format(
+ **config_data["distribute_list"]["prefix"]
+ )
+ return command
+
+
+def _tmplt_ospf_domain_id(config_data):
+ if "domain_id" in config_data:
+ command = "domain-id"
+ if "ip_address" in config_data["domain_id"]:
+ if "address" in config_data["domain_id"]["ip_address"]:
+ command += " {address}".format(
+ **config_data["domain_id"]["ip_address"]
+ )
+ if "secondary" in config_data["domain_id"]["ip_address"]:
+ command += " {secondary}".format(
+ **config_data["domain_id"]["ip_address"]
+ )
+ elif "null" in config_data["domain_id"]:
+ command += " null"
+ return command
+
+
+def _tmplt_ospf_event_log(config_data):
+ if "event_log" in config_data:
+ command = "event-log"
+ if "one_shot" in config_data["event_log"]:
+ command += " one-shot"
+ if "pause" in config_data["event_log"]:
+ command += " pause"
+ if "size" in config_data["event_log"]:
+ command += " size {size}".format(**config_data["event_log"])
+ return command
+
+
+def _tmplt_ospf_manet(config_data):
+ if "manet" in config_data:
+ command = []
+ if "cache" in config_data["manet"]:
+ cmd = "manet cache"
+ if "acknowledgement" in config_data["manet"]["cache"]:
+ cmd += " acknowledgement {acknowledgement}".format(
+ **config_data["manet"]["cache"]
+ )
+ elif "redundancy" in config_data["manet"]["cache"]:
+ cmd += " redundancy {redundancy}".format(
+ **config_data["manet"]["cache"]
+ )
+ command.append(cmd)
+ if "hello" in config_data["manet"] and config_data["manet"]["hello"]:
+ command.append("manet hello")
+ if "peering" in config_data["manet"]:
+ cmd = "manet peering selective"
+ if "per_interface" in config_data["manet"]["peering"]:
+ cmd += " per-interface"
+ if "redundancy" in config_data["manet"]["peering"]:
+ cmd += " redundancy {redundancy}".format(
+ **config_data["manet"]["peering"]
+ )
+ command.append(cmd)
+ if "willingness" in config_data["manet"]:
+ command.append(
+ "manet willingness".format(
+ **config_data["manet"]["willingness"]
+ )
+ )
+ return command
+
+
+def _tmplt_ospf_limit(config_data):
+ if "limit" in config_data:
+ command = "limit retransmissions"
+ if "dc" in config_data["limit"]:
+ if "number" in config_data["limit"]["dc"]:
+ command += " dc {number}".format(**config_data["limit"]["dc"])
+ if "disable" in config_data["limit"]["dc"]:
+ command += " dc disable"
+ if "non_dc" in config_data["limit"]:
+ if "number" in config_data["limit"]["non_dc"]:
+ command += " non-dc {number}".format(
+ **config_data["limit"]["non_dc"]
+ )
+ if "disable" in config_data["limit"]["dc"]:
+ command += " non-dc disable"
+ return command
+
+
+def _tmplt_ospf_vrf_local_rib_criteria(config_data):
+ if "local_rib_criteria" in config_data:
+ command = "local-rib-criteria"
+ if "forwarding_address" in config_data["local_rib_criteria"]:
+ command += " forwarding-address"
+ if "inter_area_summary" in config_data["local_rib_criteria"]:
+ command += " inter-area-summary"
+ if "nssa_translation" in config_data["local_rib_criteria"]:
+ command += " nssa-translation"
+ return command
+
+
+def _tmplt_ospf_log_adjacency_changes(config_data):
+ if "log_adjacency_changes" in config_data:
+ command = "log-adjacency-changes"
+ if "detail" in config_data["log_adjacency_changes"]:
+ command += " detail"
+ return command
+
+
+def _tmplt_ospf_max_lsa(config_data):
+ if "max_lsa" in config_data:
+ command = "max-lsa {number}".format(**config_data["max_lsa"])
+ if "threshold_value" in config_data["max_lsa"]:
+ command += " {threshold_value}".format(**config_data["max_lsa"])
+ if "ignore_count" in config_data["max_lsa"]:
+ command += " ignore-count {ignore_count}".format(
+ **config_data["max_lsa"]
+ )
+ if "ignore_time" in config_data["max_lsa"]:
+ command += " ignore-time {ignore_time}".format(
+ **config_data["max_lsa"]
+ )
+ if "reset_time" in config_data["max_lsa"]:
+ command += " reset-time {reset_time}".format(
+ **config_data["max_lsa"]
+ )
+ if "warning_only" in config_data["max_lsa"]:
+ command += " warning-only"
+ return command
+
+
+def _tmplt_ospf_max_metric(config_data):
+ if "max_metric" in config_data:
+ command = "max-metric"
+ if "router_lsa" in config_data["max_metric"]:
+ command += " router-lsa"
+ if "external_lsa" in config_data["max_metric"]:
+ command += " external-lsa {external_lsa}".format(
+ **config_data["max_metric"]
+ )
+ if "include_stub" in config_data["max_metric"]:
+ command += " include-stub"
+ if "on_startup" in config_data["max_metric"]:
+ if "time" in config_data["max_metric"]["on_startup"]:
+ command += " on-startup {time}".format(
+ **config_data["max_metric"]["on_startup"]
+ )
+ elif "wait_for_bgp" in config_data["max_metric"]["on_startup"]:
+ command += " on-startup wait-for-bgp"
+ if "summary_lsa" in config_data["max_metric"]:
+ command += " summary-lsa {summary_lsa}".format(
+ **config_data["max_metric"]
+ )
+ return command
+
+
+def _tmplt_ospf_mpls_ldp(config_data):
+ if "ldp" in config_data["mpls"]:
+ command = "mpls ldp"
+ if "autoconfig" in config_data["mpls"]["ldp"]:
+ command += " autoconfig"
+ if "area" in config_data["mpls"]["ldp"]["autoconfig"]:
+ command += " area {area}".format(
+ **config_data["mpls"]["ldp"]["autoconfig"]
+ )
+ elif "sync" in config_data["mpls"]["ldp"]:
+ command += " sync"
+ return command
+
+
+def _tmplt_ospf_mpls_traffic_eng(config_data):
+ if "traffic_eng" in config_data["mpls"]:
+ command = "mpls traffic-eng"
+ if "area" in config_data["mpls"]["traffic_eng"]:
+ command += " area {area}".format(
+ **config_data["mpls"]["traffic_eng"]
+ )
+ elif "autoroute_exclude" in config_data["mpls"]["traffic_eng"]:
+ command += " autoroute-exclude prefix-list {autoroute_exclude}".format(
+ **config_data["mpls"]["traffic_eng"]
+ )
+ elif "interface" in config_data["mpls"]["traffic_eng"]:
+ command += " interface {int_type}".format(
+ **config_data["mpls"]["traffic_eng"]["interface"]
+ )
+ if "area" in config_data["mpls"]["traffic_eng"]["interface"]:
+ command += " area {area}".format(
+ **config_data["mpls"]["traffic_eng"]["interface"]
+ )
+ elif "mesh_group" in config_data["mpls"]["traffic_eng"]:
+ command += " mesh-group {id} {interface}".format(
+ **config_data["mpls"]["traffic_eng"]["mesh_group"]
+ )
+ if "area" in config_data["mpls"]["traffic_eng"]["mesh_group"]:
+ command += " area {area}".format(
+ **config_data["mpls"]["traffic_eng"]["mesh_group"]
+ )
+ elif "multicast_intact" in config_data["mpls"]["traffic_eng"]:
+ command += " multicast-intact"
+ elif "router_id_interface" in config_data["mpls"]["traffic_eng"]:
+ command += " router-id {router_id_interface}".format(
+ **config_data["mpls"]["traffic_eng"]
+ )
+ return command
+
+
+def _tmplt_ospf_neighbor(config_data):
+ if "neighbor" in config_data:
+ command = "neighbor"
+ if "address" in config_data["neighbor"]:
+ command += " {address}".format(**config_data["neighbor"])
+ if "cost" in config_data["neighbor"]:
+ command += " cost {cost}".format(**config_data["neighbor"])
+ if "database_filter" in config_data["neighbor"]:
+ command += " database-filter all out"
+ if "poll_interval" in config_data["neighbor"]:
+ command += " poll-interval {poll_interval}".format(
+ **config_data["neighbor"]
+ )
+ if "priority" in config_data["neighbor"]:
+ command += " priority {priority}".format(**config_data["neighbor"])
+ return command
+
+
+def _tmplt_ospf_network(config_data):
+ if "network" in config_data:
+ command = "network"
+ if "address" in config_data["network"]:
+ command += " {address} {wildcard_bits}".format(
+ **config_data["network"]
+ )
+ if "area" in config_data["network"]:
+ command += " area {area}".format(**config_data["network"])
+ return command
+
+
+def _tmplt_ospf_nsf_cisco(config_data):
+ if "cisco" in config_data["nsf"]:
+ command = "nsf cisco helper"
+ if "disable" in config_data["nsf"]["cisco"]:
+ command += " disable"
+ return command
+
+
+def _tmplt_ospf_nsf_ietf(config_data):
+ if "ietf" in config_data["nsf"]:
+ command = "nsf ietf helper"
+ if "disable" in config_data["nsf"]["ietf"]:
+ command += " disable"
+ elif "strict_lsa_checking" in config_data["nsf"]["ietf"]:
+ command += " strict-lsa-checking"
+ return command
+
+
+def _tmplt_ospf_queue_depth_hello(config_data):
+ if "hello" in config_data["queue_depth"]:
+ command = "queue-depth hello"
+ if "max_packets" in config_data["queue_depth"]["hello"]:
+ command += " {max_packets}".format(
+ **config_data["queue_depth"]["hello"]
+ )
+ elif "unlimited" in config_data["queue_depth"]["hello"]:
+ command += " unlimited"
+ return command
+
+
+def _tmplt_ospf_queue_depth_update(config_data):
+ if "update" in config_data["queue_depth"]:
+ command = "queue-depth update"
+ if "max_packets" in config_data["queue_depth"]["update"]:
+ command += " {max_packets}".format(
+ **config_data["queue_depth"]["update"]
+ )
+ elif "unlimited" in config_data["queue_depth"]["update"]:
+ command += " unlimited"
+ return command
+
+
+def _tmplt_ospf_summary_prefix(config_data):
+ if "summary_prefix" in config_data:
+ command = "summary-prefix {address} {mask}".format(
+ **config_data["summary_prefix"]
+ )
+ if "not_advertise" in config_data["summary_prefix"]:
+ command += " not-advertise"
+ elif "nssa_only" in config_data["summary_prefix"]:
+ command += " nssa-only"
+ if "tag" in config_data["summary_prefix"]:
+ command += " tag {tag}".format(**config_data["summary_prefix"])
+ return command
+
+
+def _tmplt_ospf_timers_pacing(config_data):
+ if "pacing" in config_data["timers"]:
+ command = "timers pacing"
+ if "flood" in config_data["timers"]["pacing"]:
+ command += " flood {flood}".format(
+ **config_data["timers"]["pacing"]
+ )
+ elif "lsa_group" in config_data["timers"]["pacing"]:
+ command += " lsa-group {lsa_group}".format(
+ **config_data["timers"]["pacing"]
+ )
+ elif "retransmission" in config_data["timers"]["pacing"]:
+ command += " retransmission {retransmission}".format(
+ **config_data["timers"]["pacing"]
+ )
+ return command
+
+
+def _tmplt_ospf_ttl_security(config_data):
+ if "ttl_security" in config_data:
+ command = "ttl-security all-interfaces"
+ if "hops" in config_data["ttl_security"]:
+ command += " hops {hops}".format(**config_data["ttl_security"])
+ return command
+
+
+class Ospfv3Template(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(Ospfv3Template, self).__init__(lines=lines, tmplt=self)
+
+ PARSERS = [
+ {
+ "name": "pid",
+ "getval": re.compile(
+ r"""
+ ^router\s
+ ospfv3*
+ \s(?P<pid>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospfv3_cmd,
+ "result": {
+ "processes": {"{{ pid }}": {"process_id": "{{ pid|int }}"}}
+ },
+ "shared": True,
+ },
+ {
+ "name": "adjacency",
+ "getval": re.compile(
+ r"""\s+adjacency
+ \sstagger*
+ \s*((?P<min>\d+)|(?P<none_adj>none))*
+ \s*(?P<max>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_adjacency_cmd,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "adjacency": {
+ "min_adjacency": "{{ min|int }}",
+ "max_adjacency": "{{ max|int }}",
+ "none": "{{ True if none_adj is defined else None }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.authentication",
+ "getval": re.compile(
+ r"""\s+area
+ \s(?P<area_id>\S+)*
+ \s*(?P<auth>authentication)*
+ \s*(?P<md>message-digest)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_authentication,
+ "compval": "authentication",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "authentication": {
+ "enable": "{{ True if auth is defined and md is undefined }}",
+ "message_digest": "{{ not not md }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.capability",
+ "getval": re.compile(
+ r"""\s+area
+ \s(?P<area_id>\S+)*
+ \s*(?P<capability>capability)*
+ \s*(?P<df>default-exclusion)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} capability default-exclusion",
+ "compval": "capability",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "capability": "{{ not not capability }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.default_cost",
+ "getval": re.compile(
+ r"""\s+area
+ \s(?P<area_id>\S+)*
+ \sdefault-cost*
+ \s*(?P<default_cost>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} default-cost {{ default_cost }}",
+ "compval": "default_cost",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "default_cost": "{{ default_cost|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.filter_list",
+ "getval": re.compile(
+ r"""\s+area
+ \s*(?P<area_id>\S+)*
+ \s*filter-list\sprefix*
+ \s*(?P<name>\S+)*
+ \s*(?P<dir>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_filter,
+ "compval": "filter_list",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "filter_list": [
+ {
+ "name": "{{ name }}",
+ "direction": "{{ dir }}",
+ }
+ ],
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa",
+ "getval": re.compile(
+ r"""\s+area\s(?P<area_id>\S+)
+ \s(?P<nssa>nssa)*
+ \s*(?P<no_redis>no-redistribution)*
+ \s*(?P<def_origin>default-information-originate)*
+ \s*(?P<metric>metric\s\d+)*
+ \s*(?P<metric_type>metric-type\s\d+)*
+ \s*(?P<no_summary>no-summary)*
+ \s*(?P<no_ext>no-ext-capability)*$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_nssa,
+ "compval": "nssa",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "set": "{{ True if nssa is defined and def_origin is undefined and "
+ "no_ext is undefined and no_redis is undefined and nssa_only is undefined }}",
+ "default_information_originate": {
+ "set": "{{ True if def_origin is defined and metric is undefined and "
+ "metric_type is undefined and nssa_only is undefined }}",
+ "metric": "{{ metric.split("
+ ")[1]|int }}",
+ "metric_type": "{{ metric_type.split("
+ ")[1]|int }}",
+ "nssa_only": "{{ True if nssa_only is defined }}",
+ },
+ "no_ext_capability": "{{ True if no_ext is defined }}",
+ "no_redistribution": "{{ True if no_redis is defined }}",
+ "no_summary": "{{ True if no_summary is defined }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa.translate",
+ "getval": re.compile(
+ r"""\s+area*
+ \s*(?P<area_id>\S+)*
+ \s*(?P<nssa>nssa)*
+ \stranslate\stype7*
+ \s(?P<translate_always>always)*
+ \s* (?P<translate_supress>suppress-fa)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_nssa_translate,
+ "compval": "nssa.translate",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "translate": "{{ translate_always if translate_always is defined else translate_supress if translate_supress is defined }}"
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.ranges",
+ "getval": re.compile(
+ r"""\s+area\s(?P<area_id>\S+)
+ \srange
+ \s(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+ \s(?P<netmask>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*((?P<advertise>advertise)|(?P<not_advertise>not-advertise))*
+ \s*(?P<cost>cost\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_ranges,
+ "compval": "ranges",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "ranges": [
+ {
+ "address": "{{ address }}",
+ "netmask": "{{ netmask }}",
+ "advertise": "{{ True if advertise is defined }}",
+ "cost": "{{ cost.split(" ")[1]|int }}",
+ "not_advertise": "{{ True if not_advertise is defined }}",
+ }
+ ],
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.sham_link",
+ "getval": re.compile(
+ r"""\s+area\s(?P<area_id>\S+)
+ \ssham-link
+ \s(?P<source>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+ \s(?P<destination>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<cost>cost\s\d+)*
+ \s*(?P<ttl_security>ttl-security\shops\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_sham_link,
+ "compval": "sham_link",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "sham_link": {
+ "source": "{{ source }}",
+ "destination": "{{ destination }}",
+ "cost": "{{ cost.split(" ")[1]|int }}",
+ "ttl_security": '{{ ttl_security.split("hops ")[1] }}',
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.stub",
+ "getval": re.compile(
+ r"""\s+area\s(?P<area_id>\S+)
+ \s(?P<stub>stub)*
+ \s*(?P<no_ext>no-ext-capability)*
+ \s*(?P<no_sum>no-summary)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_stub_link,
+ "compval": "stub",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "stub": {
+ "set": "{{ True if stub is defined and no_ext is undefined and no_sum is undefined }}",
+ "no_ext_capability": "{{ True if no_ext is defined }}",
+ "no_summary": "{{ True if no_sum is defined }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "auto_cost",
+ "getval": re.compile(
+ r"""\s+(?P<auto_cost>auto-cost)*
+ \s*(?P<ref_band>reference-bandwidth\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_auto_cost,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "auto_cost": {
+ "set": "{{ True if auto_cost is defined and ref_band is undefined }}",
+ "reference_bandwidth": '{{ ref_band.split(" ")[1] }}',
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "bfd",
+ "getval": re.compile(
+ r"""\s+bfd*
+ \s*(?P<bfd>all-interfaces)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "bfd all-interfaces",
+ "result": {
+ "processes": {
+ "{{ pid }}": {"bfd": "{{ True if bfd is defined }}"}
+ }
+ },
+ },
+ {
+ "name": "capability",
+ "getval": re.compile(
+ r"""\s+capability*
+ \s*((?P<lls>lls)|(?P<opaque>opaque)|(?P<transit>transit)|(?P<vrf_lite>vrf-lite))
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_capability,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "capability": {
+ "lls": "{{ True if lls is defined }}",
+ "opaque": "{{ True if opaque is defined }}",
+ "transit": "{{ True if transit is defined }}",
+ "vrf_lite": "{{ True if vrf_lite is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "compatible",
+ "getval": re.compile(
+ r"""\s+compatible*
+ \s*((?P<rfc1583>rfc1583)|(?P<rfc1587>rfc1587)|(?P<rfc5243>rfc5243))
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_compatible,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "compatible": {
+ "rfc1583": "{{ True if rfc1583 is defined }}",
+ "rfc1587": "{{ True if rfc1587 is defined }}",
+ "rfc5243": "{{ True if rfc5243 is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "default_information",
+ "getval": re.compile(
+ r"""\s+default-information*
+ \s*(?P<originate>originate)*
+ \s*(?P<always>always)*
+ \s*(?P<metric>metric\s\d+)*
+ \s*(?P<metric_type>metric-type\s\d+)*
+ \s*(?P<route_map>route-map\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_default_information,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "default_information": {
+ "originate": "{{ True if originate is defined }}",
+ "always": "{{ True if always is defined }}",
+ "metric": "{{ metric.split(" ")[1]|int }}",
+ "metric_type": "{{ metric_type.split("
+ ")[1]|int }}",
+ "route_map": "{{ route_map.split(" ")[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "default_metric",
+ "getval": re.compile(
+ r"""\s+default-metric(?P<default_metric>\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "default-metric {{ default_metric }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {"default_metric": "{{ default_metric| int}}"}
+ }
+ },
+ },
+ {
+ "name": "discard_route",
+ "getval": re.compile(
+ r"""\s+(?P<discard_route>discard-route)*
+ \s*(?P<external>external\s\d+)*
+ \s*(?P<internal>internal\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_discard_route,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "discard_route": {
+ "set": "{{ True if discard_route is defined and external is undefined and internal is undefined }}",
+ "external": "{{ external.split(" ")[1]|int }}",
+ "internal": "{{ internal.split(" ")[1]|int }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "distance.admin_distance",
+ "getval": re.compile(
+ r"""\s+distance
+ \s(?P<admin_dist>\S+)*
+ \s*(?P<source>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<wildcard>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<acl>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distance_admin_distance,
+ "compval": "admin_distance",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distance": {
+ "admin_distance": {
+ "distance": "{{ admin_dist }}",
+ "address": "{{ source }}",
+ "wildcard_bits": "{{ wildcard }}",
+ "acl": "{{ acl }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "distance.ospf",
+ "getval": re.compile(
+ r"""\s+distance
+ \sospf*
+ \s*(?P<intra>intra-area\s\d+)*
+ \s*(?P<inter>inter-area\s\d+)*
+ \s*(?P<external>external\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distance_ospf,
+ "compval": "ospf",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distance": {
+ "ospf": {
+ "inter_area": "{{ inter.split(" ")[1]|int }}",
+ "intra_area": "{{ intra.split(" ")[1]|int }}",
+ "external": "{{ external.split(" ")[1]|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "distribute_list.acls",
+ "getval": re.compile(
+ r"""\s+distribute-list
+ \s(?P<name>\S+)*
+ \s*(?P<dir>\S+)*
+ \s*(?P<int_pro>\S+\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distribute_list_acls,
+ "compval": "distribute_list.acls",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distribute_list": {
+ "acls": [
+ {
+ "name": "{{ name }}",
+ "direction": "{{ dir }}",
+ "interface": '{{ int_pro if dir == "in" }}',
+ "protocol": '{{ int_pro if dir == "out" }}',
+ }
+ ]
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "distribute_list.prefix",
+ "getval": re.compile(
+ r"""\s+distribute-list
+ \s(?P<prefix>prefix\s\S+)*
+ \s*(?P<gateway>gateway\s\S+)*
+ \s*(?P<dir>\S+)*
+ \s*(?P<int_pro>\S+\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distribute_list_prefix,
+ "compval": "distribute_list.prefix",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distribute_list": {
+ "prefix": {
+ "name": "{{ prefix.split(" ")[1] }}",
+ "gateway_name": "{{ gateway.split("
+ ")[1] if prefix is defined }}",
+ "direction": "{{ dir if gateway is undefined }}",
+ "interface": '{{ int_pro if dir == "in" }}',
+ "protocol": '{{ int_pro if dir == "out" }}',
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "distribute_list.route_map",
+ "getval": re.compile(
+ r"""\s+distribute-list
+ \s(?P<route_map>route-map\s\S+)*
+ \s*(?P<dir>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "distribute-list route-map {{ distribute_list.route_map.name }} in",
+ "compval": "distribute_list.route_map",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distribute_list": {
+ "route_map": {
+ "name": "{{ route_map.split(" ")[1] }}"
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "domain_id",
+ "getval": re.compile(
+ r"""\s+domain-id
+ \s(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<secondary>secondary)*
+ \s*(?P<null>null)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_domain_id,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "domain_id": {
+ "ip_address": {
+ "address": "{{ address }}",
+ "secondary": "{{ True if secondary is defined }}",
+ },
+ "null": "{{ True if null is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "domain_tag",
+ "getval": re.compile(
+ r"""\s+domain-tag
+ \s(?P<tag>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "domain-tag {{ domain_tag }}",
+ "result": {
+ "processes": {"{{ pid }}": {"domain_tag": "{{ tag|int }}"}}
+ },
+ },
+ {
+ "name": "event_log",
+ "getval": re.compile(
+ r"""\s+(?P<event_log>event-log)*
+ \s*(?P<one_shot>one-shot)*
+ \s*(?P<pause>pause)*
+ \s*(?P<size>size\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_event_log,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "event_log": {
+ "enable": "{{ True if event_log is defined and one_shot is undefined and pause is undefined and size is undefined }}",
+ "one_shot": "{{ True if one_shot is defined }}",
+ "pause": "{{ True if pause is defined }}",
+ "size": "{{ size.split(" ")[1]|int }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "help",
+ "getval": re.compile(
+ r"""\s+(?P<help>help)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "help",
+ "result": {
+ "processes": {
+ "{{ pid }}": {"help": "{{ True if help is defined }}"}
+ }
+ },
+ },
+ {
+ "name": "ignore",
+ "getval": re.compile(
+ r"""\s+(?P<ignore>ignore)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "ignore lsa mospf",
+ "result": {
+ "processes": {
+ "{{ pid }}": {"ignore": "{{ True if ignore is defined }}"}
+ }
+ },
+ },
+ {
+ "name": "interface_id",
+ "getval": re.compile(
+ r"""\s+(?P<interface_id>interface-id\ssnmp-if-index)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "interface-id snmp-if-index",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "interface_id": "{{ True if interface_id is defined }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "ispf",
+ "getval": re.compile(
+ r"""\s+(?P<ispf>ispf)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "ispf",
+ "result": {
+ "processes": {
+ "{{ pid }}": {"ispf": "{{ True if ispf is defined }}"}
+ }
+ },
+ },
+ {
+ "name": "limit",
+ "getval": re.compile(
+ r"""\s+limit\sretransmissions
+ \s((?P<dc_num>dc\s\d+)|(?P<dc_disable>dc\sdisable))*
+ \s*((?P<non_dc_num>non-dc\s\d+)|(?P<non_dc_disable>non-dc\sdisable))
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_limit,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "limit": {
+ "dc": {
+ "number": "{{ dc_num.split(" ")[1]|int }}",
+ "disable": "{{ True if dc_disable is defined }}",
+ },
+ "non_dc": {
+ "number": "{{ non_dc_num.split(" ")[1]|int }}",
+ "disable": "{{ True if dc_disable is defined }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "local_rib_criteria",
+ "getval": re.compile(
+ r"""\s+(?P<local>local-rib-criteria)*
+ \s*(?P<forward>forwarding-address)*
+ \s*(?P<inter>inter-area-summary)*
+ \s*(?P<nssa>nssa-translation)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_vrf_local_rib_criteria,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "local_rib_criteria": {
+ "enable": "{{ True if local is defined and forward is undefined and inter is undefined and nssa is undefined }}",
+ "forwarding_address": "{{ True if forward is defined }}",
+ "inter_area_summary": "{{ True if inter is defined }}",
+ "nssa_translation": "{{ True if nssa is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "log_adjacency_changes",
+ "getval": re.compile(
+ r"""\s+(?P<log>log-adjacency-changes)*
+ \s*(?P<detail>detail)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_log_adjacency_changes,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "log_adjacency_changes": {
+ "set": "{{ True if log is defined and detail is undefined }}",
+ "detail": "{{ True if detail is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "manet",
+ "getval": re.compile(
+ r"""\s+manet*
+ \s*(?P<cache>cache)*
+ \s*(?P<acknowledgement>acknowledgement\s\d+)*
+ \s*(?P<update>update\s\d+)*
+ \s*(?P<hello>hello)*
+ \s*(?P<unicast>unicast)*
+ \s*(?P<multicast>multicast)*
+ \s*(?P<peering>peering\sselective)*
+ \s*(?P<disable>disable)*
+ \s*(?P<per_interface>per-interface)*
+ \s*(?P<redundancy>redundancy\s\d+)*
+ \s*(?P<willingness>willingness\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_manet,
+ "compval": "manet",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "manet": {
+ "cache": {
+ "acknowledgement": "{{ acknowledgement.split("
+ ")[1] }}",
+ "update": "{{ update.split(" ")[1] }}",
+ },
+ "hello": {
+ "unicast": "{{ True if unicast is defined }}",
+ "multicast": "{{ True if multicast is defined }}",
+ },
+ "peering": {
+ "set": "{{ True if peering is defined }}",
+ "disable": "{{ True if disable is defined }}",
+ "per_interface": "{{ True if per_interface is defined }}",
+ "redundancy": "{{ redundancy.split(" ")[1] }}",
+ },
+ "willingness": "{{ willingness.split(" ")[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "max_lsa",
+ "getval": re.compile(
+ r"""\s+max-lsa
+ \s(?P<number>\d+)*
+ \s*(?P<threshold>\d+)*
+ \s*(?P<ignore_count>ignore-count\s\d+)*
+ \s*(?P<ignore_time>ignore-time\s\d+)*
+ \s*(?P<reset_time>reset-time\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_max_lsa,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "max_lsa": {
+ "number": "{{ number }}",
+ "threshold_value": "{{ threshold }}",
+ "ignore_count": "{{ ignore_count.split(" ")[1] }}",
+ "ignore_time": "{{ ignore_time.split(" ")[1] }}",
+ "reset_time": "{{ reset_time.split(" ")[1] }}",
+ "warning_only": "{{ True if warning is defined }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "max_metric",
+ "getval": re.compile(
+ r"""\s+max-metric*
+ \s*(?P<router_lsa>router-lsa)*
+ \s*(?P<include_stub>include-stub)*
+ \s*(?P<external_lsa>external-lsa\s\d+)*
+ \s*(?P<startup_time>on-startup\s\d+)*
+ \s*(?P<startup_wait>on-startup\s\S+)*
+ \s*(?P<summary_lsa>summary-lsa\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_max_metric,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "max_metric": {
+ "router_lsa": "{{ True if router_lsa is defined }}",
+ "external_lsa": "{{ external_lsa.split(" ")[1] }}",
+ "include_stub": "{{ ignore_count.split(" ")[1] }}",
+ "on_startup": {
+ "time": "{{ startup_time.split(" ")[1] }}",
+ "wait_for_bgp": "{{ True if startup_wait is defined }}",
+ },
+ "summary_lsa": "{{ summary_lsa.split(" ")[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "maximum_paths",
+ "getval": re.compile(
+ r"""\s+maximum-paths*
+ \s+(?P<paths>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "maximum-paths {{ maximum_paths }}",
+ "result": {
+ "processes": {"{{ pid }}": {"maximum_paths": "{{ paths }}"}}
+ },
+ },
+ {
+ "name": "mpls.ldp",
+ "getval": re.compile(
+ r"""\s+mpls
+ \sldp*
+ \s*(?P<autoconfig>autoconfig*\s*(?P<area>area\s\S+))*
+ \s*(?P<sync>sync)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_mpls_ldp,
+ "compval": "ldp",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "mpls": {
+ "ldp": {
+ "autoconfig": {
+ "set": "{{ True if autoconfig is defined and area is undefined }}",
+ "area": "{{ area.split(" ")[1] }}",
+ },
+ "sync": "{{ True if sync is defined }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "mpls.traffic_eng",
+ "getval": re.compile(
+ r"""\s+mpls
+ \straffic-eng*
+ \s*(?P<area>area\s\S+)*
+ \s*(?P<autoroute>autoroute-exclude\s\S+\s\S+)*
+ \s*(?P<interface>interface\s(?P<int_type>\S+\s\S+)\s(?P<int_area>area\s\S+))*
+ \s*(?P<mesh>mesh-group\s\d+\s(?P<mesh_int>\S+\s\S+)\s(?P<mesh_area>area\s\d+))*
+ \s*(?P<multicast>multicast-intact)*
+ \s*(?P<router>router-id\s(?P<router_int>\S+\s\S+))
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_mpls_traffic_eng,
+ "compval": "traffic_eng",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "mpls": {
+ "traffic_eng": {
+ "area": "{{ area.split(" ")[1] }}",
+ "autoroute_exclude": "{{ autoroute.split("
+ ")[2] }}",
+ "interface": {
+ "interface_type": "{{ int_type }}",
+ "area": "{{ int_area.split(" ")[1] }}",
+ },
+ "mesh_group": {
+ "id": "{{ mesh.split(" ")[1] }}",
+ "interface": "{{ mest_int }}",
+ "area": "{{ mesh_area.split(" ")[1] }}",
+ },
+ "multicast_intact": "{{ True if multicast is defined }}",
+ "router_id_interface": "{{ router_int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "neighbor",
+ "getval": re.compile(
+ r"""\s+neighbor
+ \s(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<cost>cost\s\d+)*
+ \s*(?P<db_filter>database-filter\sall\sout)*
+ \s*(?P<poll>poll-interval\s\d+)*
+ \s*(?P<priority>priority\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_neighbor,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "neighbor": {
+ "address": "{{ address }}",
+ "cost": "{{ cost.split(" ")[1] }}",
+ "database_filter": "{{ True if db_filter is defined }}",
+ "poll_interval": "{{ poll.split(" ")[1] }}",
+ "priority": "{{ priority.split(" ")[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "network",
+ "getval": re.compile(
+ r"""\s+network
+ \s(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<wildcard>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<area>area\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_network,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "network": {
+ "address": "{{ address }}",
+ "wildcard_bits": "{{ wildcard }}",
+ "area": "{{ area.split(" ")[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "nsf.cisco",
+ "getval": re.compile(
+ r"""\s+nsf
+ \s(?P<cisco>cisco)*
+ \s*(?P<helper>helper)*
+ \s*(?P<disable>disable)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_nsf_cisco,
+ "compval": "cisco",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "nsf": {
+ "cisco": {
+ "helper": "{{ True if helper is defined }}",
+ "disable": "{{ True if disable is defined }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "nsf.ietf",
+ "getval": re.compile(
+ r"""\s+nsf
+ \s(?P<ietf>ietf)*
+ \s*(?P<helper>helper)*
+ \s*(?P<disable>disable)*
+ \s*(?P<strict>strict-lsa-checking)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_nsf_ietf,
+ "compval": "ietf",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "nsf": {
+ "ietf": {
+ "helper": "{{ True if helper is defined }}",
+ "disable": "{{ True if disable is defined }}",
+ "strict_lsa_checking": "{{ True if strict is defined }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "passive_interface",
+ "getval": re.compile(
+ r"""\s+passive-interface
+ \s(?P<interface>\S+\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "passive-interface {{ passive_interface }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {"passive_interface": "{{ interface }}"}
+ }
+ },
+ },
+ {
+ "name": "prefix_suppression",
+ "getval": re.compile(
+ r"""\s+(?P<prefix_sup>prefix-suppression)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "prefix-suppression",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "prefix_suppression": "{{ True if prefix_sup is defined }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "priority",
+ "getval": re.compile(
+ r"""\s+priority
+ \s(?P<priority>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "priority {{ priority }}",
+ "result": {
+ "processes": {"{{ pid }}": {"priority": "{{ priority }}"}}
+ },
+ },
+ {
+ "name": "queue_depth.hello",
+ "getval": re.compile(
+ r"""\s+queue-depth
+ \shello*
+ \s*(?P<max_packets>\d+)*
+ \s*(?P<unlimited>unlimited)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_queue_depth_hello,
+ "compval": "hello",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "queue_depth": {
+ "hello": {
+ "max_packets": "{{ max_packets }}",
+ "unlimited": "{{ True if unlimited is defined }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "queue_depth.update",
+ "getval": re.compile(
+ r"""\s+queue-depth
+ \supdate*
+ \s*(?P<max_packets>\d+)*
+ \s*(?P<unlimited>unlimited)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_queue_depth_update,
+ "compval": "update",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "queue_depth": {
+ "update": {
+ "max_packets": "{{ max_packets }}",
+ "unlimited": "{{ True if unlimited is defined }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "router_id",
+ "getval": re.compile(
+ r"""\s+router-id
+ \s(?P<id>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "router-id {{ router_id }}",
+ "result": {"processes": {"{{ pid }}": {"router_id": "{{ id }}"}}},
+ },
+ {
+ "name": "shutdown",
+ "getval": re.compile(
+ r"""\s+(?P<shutdown>shutdown)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "shutdown",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "shutdown": "{{ True if shutdown is defined }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.lsa",
+ "getval": re.compile(
+ r"""\s+timers
+ \slsa
+ \sarrival
+ \s(?P<lsa>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "timers lsa arrival {{ timers.lsa }}",
+ "compval": "lsa",
+ "result": {
+ "processes": {"{{ pid }}": {"timers": {"lsa": "{{ lsa }}"}}}
+ },
+ },
+ {
+ "name": "timers.pacing",
+ "getval": re.compile(
+ r"""\s+timers
+ \spacing
+ \s(?P<flood>flood\s\d+)*
+ \s*(?P<lsa_group>lsa-group\s\d+)*
+ \s*(?P<retransmission>retransmission\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_timers_pacing,
+ "compval": "pacing",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "pacing": {
+ "flood": "{{ flood.split(" ")[1] }}",
+ "lsa_group": "{{ lsa_group.split(" ")[1] }}",
+ "retransmission": "{{ retransmission.split("
+ ")[1] }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.throttle.lsa",
+ "getval": re.compile(
+ r"""\s+timers
+ \sthrottle
+ \s*(?P<lsa>lsa)*
+ \s*(?P<first_delay>\d+)*
+ \s*(?P<min_delay>\d+)*
+ \s*(?P<max_delay>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle lsa {{ throttle.lsa.first_delay }} {{ throttle.lsa.min_delay }} {{ throttle.lsa.max_delay }}",
+ "compval": "throttle.lsa",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "throttle": {
+ "lsa": {
+ "first_delay": "{{ first_delay }}",
+ "min_delay": "{{ min_delay }}",
+ "max_delay": "{{ max_delay }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.throttle.spf",
+ "getval": re.compile(
+ r"""\s+timers
+ \sthrottle
+ \s*(?P<spf>spf)*
+ \s*(?P<first_delay>\d+)*
+ \s*(?P<min_delay>\d+)*
+ \s*(?P<max_delay>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle spf {{ throttle.spf.receive_delay }} {{ throttle.spf.between_delay }} {{ throttle.spf.max_delay }}",
+ "compval": "throttle.spf",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "throttle": {
+ "spf": {
+ "receive_delay": "{{ first_delay }}",
+ "between_delay": "{{ min_delay }}",
+ "max_delay": "{{ max_delay }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "traffic_share",
+ "getval": re.compile(
+ r"""\s+(?P<traffic>traffic-share\smin\sacross-interfaces)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "traffic-share min across-interfaces",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "traffic_share": "{{ True if traffic is defined }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "ttl_security",
+ "getval": re.compile(
+ r"""\s+ttl-security
+ \s(?P<interfaces>all-interfaces)*
+ \s*(?P<hops>hops\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_ttl_security,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "ttl_security": {
+ "set": "{{ True if interfaces is defined and hops is undefined }}",
+ "hops": "{{ hops.split(" ")[1] }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "address_family",
+ "getval": re.compile(
+ r"""\s+address-family*
+ \s*(?P<afi>\S+)*
+ \s*(?P<unicast>unicast)*
+ \s*(?P<vrf>vrf\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_address_family_cmd,
+ # "compval": "afi",
+ "result": {
+ "address_family": [
+ {
+ "afi": "{{ afi }}",
+ "unicast": "{{ True if unicast is defined }}",
+ "vrf": "{{ vrf.split(" ")[1] }}",
+ }
+ ]
+ },
+ "shared": True,
+ },
+ {
+ "name": "address_family.exit",
+ "getval": re.compile(
+ r"""\s+exit-address-family
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_address_family_cmd,
+ "result": {
+ "address_family": [
+ {
+ "exit": {
+ "pid": "{{ id }}",
+ "afi": "{{ afi }}",
+ "unicast": "{{ True if unicast is defined }}",
+ "vrf": "{{ vrf.split(" ")[1] }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.adjacency",
+ "getval": re.compile(
+ r"""\s+adjacency
+ \sstagger*
+ \s*((?P<min>\d+)|(?P<none_adj>none))*
+ \s*(?P<max>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_adjacency_cmd,
+ "compval": "adjacency",
+ "result": {
+ "address_family": [
+ {
+ "adjacency": {
+ "min_adjacency": "{{ min|int }}",
+ "max_adjacency": "{{ max|int }}",
+ "none": "{{ True if none_adj is defined else None }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.area.authentication",
+ "getval": re.compile(
+ r"""\s+area
+ \s(?P<area_id>\S+)*
+ \s*(?P<auth>authentication)*
+ \s*(?P<md>message-digest)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_authentication,
+ "compval": "authentication",
+ "result": {
+ "address_family": [
+ {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "authentication": {
+ "enable": "{{ True if auth is defined and md is undefined }}",
+ "message_digest": "{{ not not md }}",
+ },
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.area.capability",
+ "getval": re.compile(
+ r"""\s+area
+ \s(?P<area_id>\S+)*
+ \s*(?P<capability>capability)*
+ \s*(?P<df>default-exclusion)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} capability default-exclusion",
+ "compval": "capability",
+ "result": {
+ "address_family": [
+ {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "capability": "{{ not not capability }}",
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.area.default_cost",
+ "getval": re.compile(
+ r"""\s+area
+ \s(?P<area_id>\S+)*
+ \sdefault-cost*
+ \s*(?P<default_cost>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} default-cost {{ default_cost }}",
+ "compval": "default_cost",
+ "result": {
+ "address_family": [
+ {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "default_cost": "{{ default_cost|int }}",
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.area.filter_list",
+ "getval": re.compile(
+ r"""\s+area
+ \s*(?P<area_id>\S+)*
+ \s*filter-list\sprefix*
+ \s*(?P<name>\S+)*
+ \s*(?P<dir>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_filter,
+ "compval": "filter_list",
+ "result": {
+ "address_family": [
+ {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "filter_list": [
+ {
+ "name": "{{ name }}",
+ "direction": "{{ dir }}",
+ }
+ ],
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.area.nssa",
+ "getval": re.compile(
+ r"""\s+area*
+ \s*(?P<area_id>\S+)*
+ \s*(?P<nssa>nssa)*
+ \s*(?P<no_redis>no-redistribution)*
+ \s*(?P<def_origin>default-information-originate)*
+ \s*(?P<metric>metric\s\d+)*
+ \s*(?P<metric_type>metric-type\s\d+)*
+ \s*(?P<nssa_only>nssa-only)*
+ \s*(?P<no_summary>no-summary)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_nssa,
+ "compval": "nssa",
+ "result": {
+ "address_family": [
+ {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "set": "{{ True if nssa is defined and def_origin is undefined and "
+ "no_ext is undefined and no_redis is undefined and nssa_only is undefined }}",
+ "default_information_originate": {
+ "set": "{{ True if def_origin is defined and metric is undefined and "
+ "metric_type is undefined and nssa_only is undefined }}",
+ "metric": "{{ metric.split("
+ ")[1]|int }}",
+ "metric_type": "{{ metric_type.split("
+ ")[1]|int }}",
+ "nssa_only": "{{ True if nssa_only is defined }}",
+ },
+ "no_ext_capability": "{{ True if no_ext is defined }}",
+ "no_redistribution": "{{ True if no_redis is defined }}",
+ "no_summary": "{{ True if no_summary is defined }}",
+ },
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.area.nssa.translate",
+ "getval": re.compile(
+ r"""\s+area*
+ \s*(?P<area_id>\S+)*
+ \s*(?P<nssa>nssa)*
+ \stranslate\stype7*
+ \s(?P<translate_always>always)*
+ \s* (?P<translate_supress>suppress-fa)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_nssa_translate,
+ "compval": "nssa.translate",
+ "result": {
+ "address_family": [
+ {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "translate": "{{ translate_always if translate_always is defined else translate_supress if translate_supress is defined }}"
+ },
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.area.ranges",
+ "getval": re.compile(
+ r"""\s+area\s(?P<area_id>\S+)
+ \srange
+ \s(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+ \s(?P<netmask>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*((?P<advertise>advertise)|(?P<not_advertise>not-advertise))*
+ \s*(?P<cost>cost\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_ranges,
+ "compval": "ranges",
+ "result": {
+ "address_family": [
+ {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "ranges": [
+ {
+ "address": "{{ address }}",
+ "netmask": "{{ netmask }}",
+ "advertise": "{{ True if advertise is defined }}",
+ "cost": "{{ cost.split(" ")[1]|int }}",
+ "not_advertise": "{{ True if not_advertise is defined }}",
+ }
+ ],
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.area.sham_link",
+ "getval": re.compile(
+ r"""\s+area\s(?P<area_id>\S+)
+ \ssham-link
+ \s(?P<source>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+ \s(?P<destination>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<cost>cost\s\d+)*
+ \s*(?P<ttl_security>ttl-security\shops\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_sham_link,
+ "compval": "sham_link",
+ "result": {
+ "address_family": [
+ {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "sham_link": {
+ "source": "{{ source }}",
+ "destination": "{{ destination }}",
+ "cost": "{{ cost.split(" ")[1]|int }}",
+ "ttl_security": '{{ ttl_security.split("hops ")[1] }}',
+ },
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.area.stub",
+ "getval": re.compile(
+ r"""\s+area\s(?P<area_id>\S+)
+ \s(?P<stub>stub)*
+ \s*(?P<no_ext>no-ext-capability)*
+ \s*(?P<no_sum>no-summary)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_stub_link,
+ "compval": "stub",
+ "result": {
+ "address_family": [
+ {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "stub": {
+ "set": "{{ True if stub is defined and no_ext is undefined and no_sum is undefined }}",
+ "no_ext_capability": "{{ True if no_ext is defined }}",
+ "no_summary": "{{ True if no_sum is defined }}",
+ },
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.auto_cost",
+ "getval": re.compile(
+ r"""\s+(?P<auto_cost>auto-cost)*
+ \s*(?P<ref_band>reference-bandwidth\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_auto_cost,
+ "compval": "auto_cost",
+ "result": {
+ "address_family": [
+ {
+ "auto_cost": {
+ "set": "{{ True if auto_cost is defined and ref_band is undefined }}",
+ "reference_bandwidth": '{{ ref_band.split(" ")[1] }}',
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.bfd",
+ "getval": re.compile(
+ r"""\s+bfd*
+ \s*(?P<bfd>all-interfaces)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "bfd all-interfaces",
+ "compval": "bfd",
+ "result": {
+ "address_family": [{"bfd": "{{ True if bfd is defined }}"}]
+ },
+ },
+ {
+ "name": "address_family.capability",
+ "getval": re.compile(
+ r"""\s+capability*
+ \s*((?P<lls>lls)|(?P<opaque>opaque)|(?P<transit>transit)|(?P<vrf_lite>vrf-lite))
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_capability,
+ "compval": "capability",
+ "result": {
+ "address_family": [
+ {
+ "capability": {
+ "lls": "{{ True if lls is defined }}",
+ "opaque": "{{ True if opaque is defined }}",
+ "transit": "{{ True if transit is defined }}",
+ "vrf_lite": "{{ True if vrf_lite is defined }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.compatible",
+ "getval": re.compile(
+ r"""\s+compatible*
+ \s*((?P<rfc1583>rfc1583)|(?P<rfc1587>rfc1587)|(?P<rfc5243>rfc5243))
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_compatible,
+ "compval": "compatible",
+ "result": {
+ "address_family": [
+ {
+ "compatible": {
+ "rfc1583": "{{ True if rfc1583 is defined }}",
+ "rfc1587": "{{ True if rfc1587 is defined }}",
+ "rfc5243": "{{ True if rfc5243 is defined }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.default_information",
+ "getval": re.compile(
+ r"""\s+default-information*
+ \s*(?P<originate>originate)*
+ \s*(?P<always>always)*
+ \s*(?P<metric>metric\s\d+)*
+ \s*(?P<metric_type>metric-type\s\d+)*
+ \s*(?P<route_map>route-map\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_default_information,
+ "compval": "default_information",
+ "result": {
+ "address_family": [
+ {
+ "default_information": {
+ "originate": "{{ True if originate is defined }}",
+ "always": "{{ True if always is defined }}",
+ "metric": "{{ metric.split(" ")[1]|int }}",
+ "metric_type": "{{ metric_type.split("
+ ")[1]|int }}",
+ "route_map": "{{ route_map.split(" ")[1] }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.default_metric",
+ "getval": re.compile(
+ r"""\s+default-metric(?P<default_metric>\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "default-metric {{ default_metric }}",
+ "compval": "default_metric",
+ "result": {
+ "address_family": [
+ {"default_metric": "{{ default_metric| int}}"}
+ ]
+ },
+ },
+ {
+ "name": "address_family.discard_route",
+ "getval": re.compile(
+ r"""\s+(?P<discard_route>discard-route)*
+ \s*(?P<external>external\s\d+)*
+ \s*(?P<internal>internal\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_discard_route,
+ "compval": "discard_route",
+ "result": {
+ "address_family": [
+ {
+ "discard_route": {
+ "set": "{{ True if discard_route is defined and external is undefined and internal is undefined }}",
+ "external": "{{ external.split(" ")[1]|int }}",
+ "internal": "{{ internal.split(" ")[1]|int }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.distance.admin_distance",
+ "getval": re.compile(
+ r"""\s+distance
+ \s(?P<admin_dist>\S+)*
+ \s*(?P<source>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<wildcard>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<acl>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distance_admin_distance,
+ "compval": "admin_distance",
+ "result": {
+ "address_family": [
+ {
+ "distance": {
+ "admin_distance": {
+ "distance": "{{ admin_dist }}",
+ "address": "{{ source }}",
+ "wildcard_bits": "{{ wildcard }}",
+ "acl": "{{ acl }}",
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.distance.ospf",
+ "getval": re.compile(
+ r"""\s+distance
+ \sospf*
+ \s*(?P<intra>intra-area\s\d+)*
+ \s*(?P<inter>inter-area\s\d+)*
+ \s*(?P<external>external\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distance_ospf,
+ "compval": "ospf",
+ "result": {
+ "address_family": [
+ {
+ "distance": {
+ "ospf": {
+ "inter_area": "{{ inter.split(" ")[1]|int }}",
+ "intra_area": "{{ intra.split(" ")[1]|int }}",
+ "external": "{{ external.split(" ")[1]|int }}",
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.distribute_list.acls",
+ "getval": re.compile(
+ r"""\s+distribute-list
+ \s(?P<name>\S+)*
+ \s*(?P<dir>\S+)*
+ \s*(?P<int_pro>\S+\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distribute_list_acls,
+ "compval": "distribute_list.acls",
+ "result": {
+ "address_family": [
+ {
+ "distribute_list": {
+ "acls": [
+ {
+ "name": "{{ name }}",
+ "direction": "{{ dir }}",
+ "interface": '{{ int_pro if dir == "in" }}',
+ "protocol": '{{ int_pro if dir == "out" }}',
+ }
+ ]
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.distribute_list.prefix",
+ "getval": re.compile(
+ r"""\s+distribute-list
+ \s(?P<prefix>prefix\s\S+)*
+ \s*(?P<gateway>gateway\s\S+)*
+ \s*(?P<dir>\S+)*
+ \s*(?P<int_pro>\S+\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distribute_list_prefix,
+ "compval": "distribute_list.prefix",
+ "result": {
+ "address_family": [
+ {
+ "distribute_list": {
+ "prefix": {
+ "name": "{{ prefix.split(" ")[1] }}",
+ "gateway_name": "{{ gateway.split("
+ ")[1] if prefix is defined }}",
+ "direction": "{{ dir if gateway is undefined }}",
+ "interface": '{{ int_pro if dir == "in" }}',
+ "protocol": '{{ int_pro if dir == "out" }}',
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.distribute_list.route_map",
+ "getval": re.compile(
+ r"""\s+distribute-list
+ \s(?P<route_map>route-map\s\S+)*
+ \s*(?P<dir>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "distribute-list route-map {{ distribute_list.route_map.name }} in",
+ "compval": "distribute_list.route_map",
+ "result": {
+ "address_family": [
+ {
+ "distribute_list": {
+ "route_map": {
+ "name": "{{ route_map.split(" ")[1] }}"
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.domain_id",
+ "getval": re.compile(
+ r"""\s+domain-id
+ \s(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<secondary>secondary)*
+ \s*(?P<null>null)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_domain_id,
+ "compval": "domain_id",
+ "result": {
+ "address_family": [
+ {
+ "domain_id": {
+ "ip_address": {
+ "address": "{{ address }}",
+ "secondary": "{{ True if secondary is defined }}",
+ },
+ "null": "{{ True if null is defined }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.domain_tag",
+ "getval": re.compile(
+ r"""\s+domain-tag
+ \s(?P<tag>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "domain-tag {{ domain_tag }}",
+ "compval": "domain_tag",
+ "result": {"address_family": [{"domain_tag": "{{ tag|int }}"}]},
+ },
+ {
+ "name": "address_family.graceful_restart",
+ "getval": re.compile(
+ r"""\s+graceful-restart*
+ \s*(?P<enable>helper)*
+ \s*(?P<disable>disable)*
+ \s*(?P<lsa>strict-lsa-checking)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_address_family_graceful_restart,
+ "compval": "graceful_restart",
+ "result": {
+ "address_family": [
+ {
+ "event_log": {
+ "enable": "{{ True if is enable defined }}",
+ "disable": "{{ True if disable is defined }}",
+ "strict_lsa_checking": "{{ True if lsa is defined }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.event_log",
+ "getval": re.compile(
+ r"""\s+(?P<event_log>event-log)*
+ \s*(?P<one_shot>one-shot)*
+ \s*(?P<pause>pause)*
+ \s*(?P<size>size\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_event_log,
+ "compval": "event_log",
+ "result": {
+ "address_family": [
+ {
+ "event_log": {
+ "enable": "{{ True if event_log is defined and one_shot is undefined and pause is undefined and size is undefined }}",
+ "one_shot": "{{ True if one_shot is defined }}",
+ "pause": "{{ True if pause is defined }}",
+ "size": "{{ size.split(" ")[1]|int }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.help",
+ "getval": re.compile(
+ r"""\s+(?P<help>help)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "help",
+ "compval": "help",
+ "result": {
+ "address_family": [{"help": "{{ True if help is defined }}"}]
+ },
+ },
+ {
+ "name": "address_family.interface_id",
+ "getval": re.compile(
+ r"""\s+(?P<interface_id>interface-id\ssnmp-if-index)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "interface-id snmp-if-index",
+ "compval": "interface_id",
+ "result": {
+ "address_family": [
+ {"interface_id": "{{ True if interface_id is defined }}"}
+ ]
+ },
+ },
+ {
+ "name": "address_family.limit",
+ "getval": re.compile(
+ r"""\s+limit\sretransmissions
+ \s((?P<dc_num>dc\s\d+)|(?P<dc_disable>dc\sdisable))*
+ \s*((?P<non_dc_num>non-dc\s\d+)|(?P<non_dc_disable>non-dc\sdisable))
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_limit,
+ "compval": "limit",
+ "result": {
+ "address_family": [
+ {
+ "limit": {
+ "dc": {
+ "number": "{{ dc_num.split(" ")[1]|int }}",
+ "disable": "{{ True if dc_disable is defined }}",
+ },
+ "non_dc": {
+ "number": "{{ non_dc_num.split(" ")[1]|int }}",
+ "disable": "{{ True if dc_disable is defined }}",
+ },
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.local_rib_criteria",
+ "getval": re.compile(
+ r"""\s+(?P<local>local-rib-criteria)*
+ \s*(?P<forward>forwarding-address)*
+ \s*(?P<inter>inter-area-summary)*
+ \s*(?P<nssa>nssa-translation)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_vrf_local_rib_criteria,
+ "compval": "local_rib_criteria",
+ "result": {
+ "address_family": [
+ {
+ "local_rib_criteria": {
+ "enable": "{{ True if local is defined and forward is undefined and inter is undefined and nssa is undefined }}",
+ "forwarding_address": "{{ True if forward is defined }}",
+ "inter_area_summary": "{{ True if inter is defined }}",
+ "nssa_translation": "{{ True if nssa is defined }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.log_adjacency_changes",
+ "getval": re.compile(
+ r"""\s+(?P<log>log-adjacency-changes)*
+ \s*(?P<detail>detail)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_log_adjacency_changes,
+ "compval": "log_adjacency_changes",
+ "result": {
+ "address_family": [
+ {
+ "log_adjacency_changes": {
+ "set": "{{ True if log is defined and detail is undefined }}",
+ "detail": "{{ True if detail is defined }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.manet",
+ "getval": re.compile(
+ r"""\s+manet*
+ \s*(?P<cache>cache)*
+ \s*(?P<acknowledgement>acknowledgement\s\d+)*
+ \s*(?P<update>update\s\d+)*
+ \s*(?P<hello>hello)*
+ \s*(?P<unicast>unicast)*
+ \s*(?P<multicast>multicast)*
+ \s*(?P<peering>peering\sselective)*
+ \s*(?P<disable>disable)*
+ \s*(?P<per_interface>per-interface)*
+ \s*(?P<redundancy>redundancy\s\d+)*
+ \s*(?P<willingness>willingness\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_max_lsa,
+ "compval": "manet",
+ "result": {
+ "address_family": [
+ {
+ "manet": {
+ "cache": {
+ "acknowledgement": "{{ acknowledgement.split("
+ ")[1] }}",
+ "update": "{{ update.split(" ")[1] }}",
+ },
+ "hello": {
+ "unicast": "{{ True if unicast is defined }}",
+ "multicast": "{{ True if multicast is defined }}",
+ },
+ "peering": {
+ "set": "{{ True if peering is defined }}",
+ "disable": "{{ True if disable is defined }}",
+ "per_interface": "{{ True if per_interface is defined }}",
+ "redundancy": "{{ redundancy.split(" ")[1] }}",
+ },
+ "willingness": "{{ willingness.split(" ")[1] }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.max_lsa",
+ "getval": re.compile(
+ r"""\s+max-lsa
+ \s(?P<number>\d+)*
+ \s*(?P<threshold>\d+)*
+ \s*(?P<ignore_count>ignore-count\s\d+)*
+ \s*(?P<ignore_time>ignore-time\s\d+)*
+ \s*(?P<reset_time>reset-time\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_max_lsa,
+ "compval": "max_lsa",
+ "result": {
+ "address_family": [
+ {
+ "max_lsa": {
+ "number": "{{ number }}",
+ "threshold_value": "{{ threshold }}",
+ "ignore_count": "{{ ignore_count.split(" ")[1] }}",
+ "ignore_time": "{{ ignore_time.split(" ")[1] }}",
+ "reset_time": "{{ reset_time.split(" ")[1] }}",
+ "warning_only": "{{ True if warning is defined }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.max_metric",
+ "getval": re.compile(
+ r"""\s+max-metric*
+ \s*(?P<router_lsa>router-lsa)*
+ \s*(?P<include_stub>include-stub)*
+ \s*(?P<external_lsa>external-lsa\s\d+)*
+ \s*(?P<startup_time>on-startup\s\d+)*
+ \s*(?P<startup_wait>on-startup\s\S+)*
+ \s*(?P<summary_lsa>summary-lsa\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_max_metric,
+ "compval": "max_metric",
+ "result": {
+ "address_family": [
+ {
+ "max_metric": {
+ "router_lsa": "{{ True if router_lsa is defined }}",
+ "external_lsa": "{{ external_lsa.split(" ")[1] }}",
+ "include_stub": "{{ ignore_count.split(" ")[1] }}",
+ "on_startup": {
+ "time": "{{ startup_time.split(" ")[1] }}",
+ "wait_for_bgp": "{{ True if startup_wait is defined }}",
+ },
+ "summary_lsa": "{{ summary_lsa.split(" ")[1] }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.maximum_paths",
+ "getval": re.compile(
+ r"""\s+maximum-paths*
+ \s+(?P<paths>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "maximum-paths {{ maximum_paths }}",
+ "compval": "maximum_paths",
+ "result": {"address_family": [{"maximum_paths": "{{ paths }}"}]},
+ },
+ {
+ "name": "address_family.passive_interface",
+ "getval": re.compile(
+ r"""\s+passive-interface
+ \s(?P<interface>\S+\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "passive-interface {{ passive_interface }}",
+ "compval": "passive_interface",
+ "result": {
+ "address_family": [{"passive_interface": "{{ interface }}"}]
+ },
+ },
+ {
+ "name": "address_family.prefix_suppression",
+ "getval": re.compile(
+ r"""\s+(?P<prefix_sup>prefix-suppression)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "prefix-suppression",
+ "compval": "prefix_suppression",
+ "result": {
+ "address_family": [
+ {
+ "prefix_suppression": "{{ True if prefix_sup is defined }}"
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.queue_depth.hello",
+ "getval": re.compile(
+ r"""\s+queue-depth
+ \shello*
+ \s*(?P<max_packets>\d+)*
+ \s*(?P<unlimited>unlimited)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_queue_depth_hello,
+ "compval": "hello",
+ "result": {
+ "address_family": [
+ {
+ "queue_depth": {
+ "hello": {
+ "max_packets": "{{ max_packets }}",
+ "unlimited": "{{ True if unlimited is defined }}",
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.queue_depth.update",
+ "getval": re.compile(
+ r"""\s+queue-depth
+ \supdate*
+ \s*(?P<max_packets>\d+)*
+ \s*(?P<unlimited>unlimited)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_queue_depth_update,
+ "compval": "update",
+ "result": {
+ "address_family": [
+ {
+ "queue_depth": {
+ "update": {
+ "max_packets": "{{ max_packets }}",
+ "unlimited": "{{ True if unlimited is defined }}",
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.router_id",
+ "getval": re.compile(
+ r"""\s+router-id
+ \s(?P<id>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "router-id {{ router_id }}",
+ "compval": "router_id",
+ "result": {"address_family": [{"router_id": "{{ id }}"}]},
+ },
+ {
+ "name": "address_family.summary_prefix",
+ "getval": re.compile(
+ r"""\s+summary-address
+ \s(?P<address>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<mask>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*
+ \s*(?P<not_adv>not-advertise)*
+ \s*(?P<nssa>nssa-only)*
+ \s*(?P<tag>tag\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_summary_prefix,
+ "compval": "summary_prefix",
+ "result": {
+ "address_family": [
+ {
+ "summary_prefix": {
+ "address": "{{ address }}",
+ "mask": "{{ mask }}",
+ "not_advertise": "{{ True if not_adv is defined }}",
+ "nssa_only": "{{ True if nssa is defined }}",
+ "tag": "{{ tag.split(" ")[1] }}",
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.shutdown",
+ "getval": re.compile(
+ r"""\s+(?P<shutdown>shutdown)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "shutdown",
+ "compval": "shutdown",
+ "result": {
+ "address_family": [
+ {"shutdown": "{{ True if shutdown is defined }}"}
+ ]
+ },
+ },
+ {
+ "name": "address_family.timers.lsa",
+ "getval": re.compile(
+ r"""\s+timers
+ \slsa
+ \sarrival
+ \s(?P<lsa>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "timers lsa arrival {{ timers.lsa }}",
+ "compval": "lsa",
+ "result": {"address_family": [{"timers": {"lsa": "{{ lsa }}"}}]},
+ },
+ {
+ "name": "address_family.timers.pacing",
+ "getval": re.compile(
+ r"""\s+timers
+ \spacing
+ \s(?P<flood>flood\s\d+)*
+ \s*(?P<lsa_group>lsa-group\s\d+)*
+ \s*(?P<retransmission>retransmission\s\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_timers_pacing,
+ "compval": "pacing",
+ "result": {
+ "address_family": [
+ {
+ "timers": {
+ "pacing": {
+ "flood": "{{ flood.split(" ")[1] }}",
+ "lsa_group": "{{ lsa_group.split(" ")[1] }}",
+ "retransmission": "{{ retransmission.split("
+ ")[1] }}",
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.timers.throttle.lsa",
+ "getval": re.compile(
+ r"""\s+timers
+ \sthrottle
+ \s*(?P<lsa>lsa)*
+ \s*(?P<first_delay>\d+)*
+ \s*(?P<min_delay>\d+)*
+ \s*(?P<max_delay>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle lsa {{ throttle.lsa.first_delay }} {{ throttle.lsa.min_delay }} {{ throttle.lsa.max_delay }}",
+ "compval": "throttle.lsa",
+ "result": {
+ "address_family": [
+ {
+ "timers": {
+ "throttle": {
+ "lsa": {
+ "first_delay": "{{ first_delay }}",
+ "min_delay": "{{ min_delay }}",
+ "max_delay": "{{ max_delay }}",
+ }
+ }
+ }
+ }
+ ]
+ },
+ },
+ {
+ "name": "address_family.timers.throttle.spf",
+ "getval": re.compile(
+ r"""\s+timers
+ \sthrottle
+ \s*(?P<spf>spf)*
+ \s*(?P<first_delay>\d+)*
+ \s*(?P<min_delay>\d+)*
+ \s*(?P<max_delay>\d+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle spf {{ throttle.spf.receive_delay }} {{ throttle.spf.between_delay }} {{ throttle.spf.max_delay }}",
+ "compval": "throttle.spf",
+ "result": {
+ "address_family": [
+ {
+ "timers": {
+ "throttle": {
+ "spf": {
+ "receive_delay": "{{ first_delay }}",
+ "between_delay": "{{ min_delay }}",
+ "max_delay": "{{ max_delay }}",
+ }
+ }
+ }
+ }
+ ]
+ },
+ },
+ ]
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/utils/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/utils/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/utils/utils.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/utils/utils.py
new file mode 100644
index 00000000..61da2db6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/module_utils/network/ios/utils/utils.py
@@ -0,0 +1,385 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+# utils
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import socket
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ is_masklen,
+ to_netmask,
+)
+
+
+def remove_command_from_config_list(interface, cmd, commands):
+ # To delete the passed config
+ if interface not in commands:
+ commands.insert(0, interface)
+ commands.append("no %s" % cmd)
+ return commands
+
+
+def add_command_to_config_list(interface, cmd, commands):
+ # To set the passed config
+ if interface not in commands:
+ commands.insert(0, interface)
+ commands.append(cmd)
+
+
+def reverify_diff_py35(want, have):
+ """ Function to re-verify the set diff for py35 as it doesn't maintains dict order which results
+ into unexpected set diff
+ :param config: want and have set config
+ :returns: True/False post checking if there's any actual diff b/w want and have sets
+ """
+ if not have:
+ return True
+ for each_want in want:
+ diff = True
+ for each_have in have:
+ if each_have == sorted(each_want) or sorted(each_have) == sorted(
+ each_want
+ ):
+ diff = False
+ if diff:
+ return True
+ return False
+
+
+def check_n_return_valid_ipv6_addr(module, input_list, filtered_ipv6_list):
+ # To verify the valid ipv6 address
+ try:
+ for each in input_list:
+ if "::" in each:
+ if "/" in each:
+ each = each.split("/")[0]
+ if socket.inet_pton(socket.AF_INET6, each):
+ filtered_ipv6_list.append(each)
+ return filtered_ipv6_list
+ except socket.error:
+ module.fail_json(msg="Incorrect IPV6 address!")
+
+
+def new_dict_to_set(input_dict, temp_list, test_set, count=0):
+ # recursive function to convert input dict to set for comparision
+ test_dict = dict()
+ if isinstance(input_dict, dict):
+ input_dict_len = len(input_dict)
+ for k, v in sorted(iteritems(input_dict)):
+ count += 1
+ if isinstance(v, list):
+ temp_list.append(k)
+ for each in v:
+ if isinstance(each, dict):
+ if [True for i in each.values() if type(i) == list]:
+ new_dict_to_set(each, temp_list, test_set, count)
+ else:
+ new_dict_to_set(each, temp_list, test_set, 0)
+ else:
+ if v is not None:
+ test_dict.update({k: v})
+ try:
+ if (
+ tuple(iteritems(test_dict)) not in test_set
+ and count == input_dict_len
+ ):
+ test_set.add(tuple(iteritems(test_dict)))
+ count = 0
+ except TypeError:
+ temp_dict = {}
+
+ def expand_dict(dict_to_expand):
+ temp = dict()
+ for k, v in iteritems(dict_to_expand):
+ if isinstance(v, dict):
+ expand_dict(v)
+ else:
+ if v is not None:
+ temp.update({k: v})
+ temp_dict.update(tuple(iteritems(temp)))
+
+ new_dict = {k: v}
+ expand_dict(new_dict)
+ if tuple(iteritems(temp_dict)) not in test_set:
+ test_set.add(tuple(iteritems(temp_dict)))
+
+
+def dict_to_set(sample_dict):
+ # Generate a set with passed dictionary for comparison
+ test_dict = dict()
+ if isinstance(sample_dict, dict):
+ for k, v in iteritems(sample_dict):
+ if v is not None:
+ if isinstance(v, list):
+ if isinstance(v[0], dict):
+ li = []
+ for each in v:
+ for key, value in iteritems(each):
+ if isinstance(value, list):
+ each[key] = tuple(value)
+ li.append(tuple(iteritems(each)))
+ v = tuple(li)
+ else:
+ v = tuple(v)
+ elif isinstance(v, dict):
+ li = []
+ for key, value in iteritems(v):
+ if isinstance(value, list):
+ v[key] = tuple(value)
+ li.extend(tuple(iteritems(v)))
+ v = tuple(li)
+ test_dict.update({k: v})
+ return_set = set(tuple(iteritems(test_dict)))
+ else:
+ return_set = set(sample_dict)
+ return return_set
+
+
+def filter_dict_having_none_value(want, have):
+ # Generate dict with have dict value which is None in want dict
+ test_dict = dict()
+ name = want.get("name")
+ if name:
+ test_dict["name"] = name
+ diff_ip = False
+ for k, v in iteritems(want):
+ if isinstance(v, dict):
+ for key, value in iteritems(v):
+ test_key_dict = dict()
+ if value is None:
+ if have.get(k):
+ dict_val = have.get(k).get(key)
+ test_key_dict.update({key: dict_val})
+ elif (
+ k == "ipv6"
+ and value.lower() != have.get(k)[0].get(key).lower()
+ ):
+ # as multiple IPV6 address can be configured on same
+ # interface, for replace state in place update will
+ # actually create new entry, which isn't as expected
+ # for replace state, so in case of IPV6 address
+ # every time 1st delete the existing IPV6 config and
+ # then apply the new change
+ dict_val = have.get(k)[0].get(key)
+ test_key_dict.update({key: dict_val})
+ if test_key_dict:
+ test_dict.update({k: test_key_dict})
+ if isinstance(v, list):
+ for key, value in iteritems(v[0]):
+ test_key_dict = dict()
+ if value is None:
+ if have.get(k) and key in have.get(k):
+ dict_val = have.get(k)[0].get(key)
+ test_key_dict.update({key: dict_val})
+ elif have.get(k):
+ if (
+ k == "ipv6"
+ and value.lower() != have.get(k)[0].get(key).lower()
+ ):
+ dict_val = have.get(k)[0].get(key)
+ test_key_dict.update({key: dict_val})
+ if test_key_dict:
+ test_dict.update({k: test_key_dict})
+ # below conditions checks are added to check if
+ # secondary IP is configured, if yes then delete
+ # the already configured IP if want and have IP
+ # is different else if it's same no need to delete
+ for each in v:
+ if each.get("secondary"):
+ want_ip = each.get("address").split("/")
+ have_ip = have.get("ipv4")
+ if (
+ len(want_ip) > 1
+ and have_ip
+ and have_ip[0].get("secondary")
+ ):
+ have_ip = have_ip[0]["address"].split(" ")[0]
+ if have_ip != want_ip[0]:
+ diff_ip = True
+ if each.get("secondary") and diff_ip is True:
+ test_key_dict.update({"secondary": True})
+ test_dict.update({"ipv4": test_key_dict})
+ if v is None:
+ val = have.get(k)
+ test_dict.update({k: val})
+ return test_dict
+
+
+def remove_duplicate_interface(commands):
+ # Remove duplicate interface from commands
+ set_cmd = []
+ for each in commands:
+ if "interface" in each:
+ if each not in set_cmd:
+ set_cmd.append(each)
+ else:
+ set_cmd.append(each)
+
+ return set_cmd
+
+
+def validate_ipv4(value, module):
+ if value:
+ address = value.split("/")
+ if len(address) != 2:
+ module.fail_json(
+ msg="address format is <ipv4 address>/<mask>, got invalid format {0}".format(
+ value
+ )
+ )
+
+ if not is_masklen(address[1]):
+ module.fail_json(
+ msg="invalid value for mask: {0}, mask should be in range 0-32".format(
+ address[1]
+ )
+ )
+
+
+def validate_ipv6(value, module):
+ if value:
+ address = value.split("/")
+ if len(address) != 2:
+ module.fail_json(
+ msg="address format is <ipv6 address>/<mask>, got invalid format {0}".format(
+ value
+ )
+ )
+ else:
+ if not 0 <= int(address[1]) <= 128:
+ module.fail_json(
+ msg="invalid value for mask: {0}, mask should be in range 0-128".format(
+ address[1]
+ )
+ )
+
+
+def validate_n_expand_ipv4(module, want):
+ # Check if input IPV4 is valid IP and expand IPV4 with its subnet mask
+ ip_addr_want = want.get("address")
+ if len(ip_addr_want.split(" ")) > 1:
+ return ip_addr_want
+ validate_ipv4(ip_addr_want, module)
+ ip = ip_addr_want.split("/")
+ if len(ip) == 2:
+ ip_addr_want = "{0} {1}".format(ip[0], to_netmask(ip[1]))
+
+ return ip_addr_want
+
+
+def netmask_to_cidr(netmask):
+ # convert netmask to cidr and returns the cidr notation
+ return str(sum([bin(int(x)).count("1") for x in netmask.split(".")]))
+
+
+def is_valid_ip(ip_str):
+ valid = True
+ try:
+ if "::" in ip_str:
+ socket.inet_pton(socket.AF_INET6, ip_str) # for IPv6
+ else:
+ socket.inet_pton(socket.AF_INET, ip_str) # for IPv4
+ except socket.error:
+ valid = False
+ return valid
+
+
+def normalize_interface(name):
+ """Return the normalized interface name
+ """
+ if not name:
+ return
+
+ def _get_number(name):
+ digits = ""
+ for char in name:
+ if char.isdigit() or char in "/.":
+ digits += char
+ return digits
+
+ if name.lower().startswith("gi"):
+ if_type = "GigabitEthernet"
+ elif name.lower().startswith("te"):
+ if_type = "TenGigabitEthernet"
+ elif name.lower().startswith("fa"):
+ if_type = "FastEthernet"
+ elif name.lower().startswith("fo"):
+ if_type = "FortyGigabitEthernet"
+ elif name.lower().startswith("long"):
+ if_type = "LongReachEthernet"
+ elif name.lower().startswith("et"):
+ if_type = "Ethernet"
+ elif name.lower().startswith("vl"):
+ if_type = "Vlan"
+ elif name.lower().startswith("lo"):
+ if_type = "loopback"
+ elif name.lower().startswith("po"):
+ if_type = "Port-channel"
+ elif name.lower().startswith("nv"):
+ if_type = "nve"
+ elif name.lower().startswith("twe"):
+ if_type = "TwentyFiveGigE"
+ elif name.lower().startswith("hu"):
+ if_type = "HundredGigE"
+ elif name.lower().startswith("virtual-te"):
+ if_type = "Virtual-Template"
+ elif name.lower().startswith("tu"):
+ if_type = "Tunnel"
+ else:
+ if_type = None
+
+ number_list = name.split(" ")
+ if len(number_list) == 2:
+ number = number_list[-1].strip()
+ else:
+ number = _get_number(name)
+
+ if if_type:
+ proper_interface = if_type + number
+ else:
+ proper_interface = name
+
+ return proper_interface
+
+
+def get_interface_type(interface):
+ """Gets the type of interface
+ """
+
+ if interface.upper().startswith("GI"):
+ return "GigabitEthernet"
+ elif interface.upper().startswith("TE"):
+ return "TenGigabitEthernet"
+ elif interface.upper().startswith("FA"):
+ return "FastEthernet"
+ elif interface.upper().startswith("FO"):
+ return "FortyGigabitEthernet"
+ elif interface.upper().startswith("LON"):
+ return "LongReachEthernet"
+ elif interface.upper().startswith("ET"):
+ return "Ethernet"
+ elif interface.upper().startswith("VL"):
+ return "Vlan"
+ elif interface.upper().startswith("LO"):
+ return "loopback"
+ elif interface.upper().startswith("PO"):
+ return "Port-channel"
+ elif interface.upper().startswith("NV"):
+ return "nve"
+ elif interface.upper().startswith("TWE"):
+ return "TwentyFiveGigE"
+ elif interface.upper().startswith("HU"):
+ return "HundredGigE"
+ elif interface.upper().startswith("VIRTUAL-TE"):
+ return "Virtual-Template"
+ elif interface.upper().startswith("TU"):
+ return "Tunnel"
+ else:
+ return "unknown"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_acl_interfaces.py
new file mode 100644
index 00000000..75094a92
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_acl_interfaces.py
@@ -0,0 +1,598 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_acl_interfaces
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_acl_interfaces
+short_description: ACL interfaces resource module
+description: This module configures and manages the access-control (ACL) attributes
+ of interfaces on IOS platforms.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL
+options:
+ config:
+ description: A dictionary of ACL interfaces options
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Full name of the interface excluding any logical unit number,
+ i.e. GigabitEthernet0/1.
+ type: str
+ required: true
+ access_groups:
+ description: Specify access-group for IP access list (standard or extended).
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description: Specifies the AFI for the ACLs to be configured on this interface.
+ type: str
+ required: true
+ choices:
+ - ipv4
+ - ipv6
+ acls:
+ description: Specifies the ACLs for the provided AFI.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specifies the name of the IPv4/IPv4 ACL for the interface.
+ type: str
+ required: true
+ direction:
+ description:
+ - Specifies the direction of packets that the ACL will be applied
+ on.
+ - With one direction already assigned, other acl direction cannot
+ be same.
+ type: str
+ required: true
+ choices:
+ - in
+ - out
+ running_config:
+ description:
+ - The module, by default, will connect to the remote device and retrieve the current
+ running-config to use as a base for comparing against the contents of source.
+ There are times when it is not desirable to have the task get the current running-config
+ for every task in a playbook. The I(running_config) argument allows the implementer
+ to pass in the configuration to use as the base config for comparison. This
+ value of this option should be the output received from device by executing
+ command.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - parsed
+ - rendered
+ default: merged
+"""
+EXAMPLES = """
+# Using Merged
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+# interface Loopback888
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# interface GigabitEthernet0/2
+# ip access-group 123 out
+
+- name: Merge module attributes of given access-groups
+ cisco.ios.ios_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: 110
+ direction: in
+ - name: 123
+ direction: out
+ - afi: ipv6
+ acls:
+ - name: test_v6
+ direction: out
+ - name: temp_v6
+ direction: in
+ - name: GigabitEthernet0/2
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: 100
+ direction: in
+ state: merged
+
+# Commands Fired:
+# ---------------
+#
+# interface GigabitEthernet0/1
+# ip access-group 110 in
+# ip access-group 123 out
+# ipv6 traffic-filter test_v6 out
+# ipv6 traffic-filter temp_v6 in
+# interface GigabitEthernet0/2
+# ip access-group 100 in
+# ip access-group 123 out
+
+
+# After state:
+# -------------
+#
+# vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+# interface Loopback888
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip access-group 110 in
+# ip access-group 123 out
+# ipv6 traffic-filter test_v6 out
+# ipv6 traffic-filter temp_v6 in
+# interface GigabitEthernet0/2
+# ip access-group 110 in
+# ip access-group 123 out
+
+# Using Replaced
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+# interface Loopback888
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip access-group 110 in
+# ip access-group 123 out
+# ipv6 traffic-filter test_v6 out
+# ipv6 traffic-filter temp_v6 in
+# interface GigabitEthernet0/2
+# ip access-group 110 in
+# ip access-group 123 out
+
+- name: Replace module attributes of given access-groups
+ cisco.ios.ios_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: 100
+ direction: out
+ - name: 110
+ direction: in
+ state: replaced
+
+# Commands Fired:
+# ---------------
+#
+# interface GigabitEthernet0/1
+# no ip access-group 123 out
+# no ipv6 traffic-filter temp_v6 in
+# no ipv6 traffic-filter test_v6 out
+# ip access-group 100 out
+
+# After state:
+# -------------
+#
+# vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+# interface Loopback888
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip access-group 100 out
+# ip access-group 110 in
+# interface GigabitEthernet0/2
+# ip access-group 110 in
+# ip access-group 123 out
+
+# Using Overridden
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+# interface Loopback888
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip access-group 110 in
+# ip access-group 123 out
+# ipv6 traffic-filter test_v6 out
+# ipv6 traffic-filter temp_v6 in
+# interface GigabitEthernet0/2
+# ip access-group 110 in
+# ip access-group 123 out
+
+- name: Overridden module attributes of given access-groups
+ cisco.ios.ios_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: 100
+ direction: out
+ - name: 110
+ direction: in
+ state: overridden
+
+# Commands Fired:
+# ---------------
+#
+# interface GigabitEthernet0/1
+# no ip access-group 123 out
+# no ipv6 traffic-filter test_v6 out
+# no ipv6 traffic-filter temp_v6 in
+# ip access-group 100 out
+# interface GigabitEthernet0/2
+# no ip access-group 110 in
+# no ip access-group 123 out
+
+# After state:
+# -------------
+#
+# vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+# interface Loopback888
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip access-group 100 out
+# ip access-group 110 in
+# interface GigabitEthernet0/2
+
+# Using Deleted
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+# interface Loopback888
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip access-group 110 in
+# ip access-group 123 out
+# ipv6 traffic-filter test_v6 out
+# ipv6 traffic-filter temp_v6 in
+# interface GigabitEthernet0/2
+# ip access-group 110 in
+# ip access-group 123 out
+
+- name: Delete module attributes of given Interface
+ cisco.ios.ios_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ state: deleted
+
+# Commands Fired:
+# ---------------
+#
+# interface GigabitEthernet0/1
+# no ip access-group 110 in
+# no ip access-group 123 out
+# no ipv6 traffic-filter test_v6 out
+# no ipv6 traffic-filter temp_v6 in
+
+# After state:
+# -------------
+#
+# vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+# interface Loopback888
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# interface GigabitEthernet0/2
+# ip access-group 110 in
+# ip access-group 123 out
+
+# Using DELETED without any config passed
+#"(NOTE: This will delete all of configured resource module attributes from each configured interface)"
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+# interface Loopback888
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip access-group 110 in
+# ip access-group 123 out
+# ipv6 traffic-filter test_v6 out
+# ipv6 traffic-filter temp_v6 in
+# interface GigabitEthernet0/2
+# ip access-group 110 in
+# ip access-group 123 out
+
+- name: Delete module attributes of given access-groups from ALL Interfaces
+ cisco.ios.ios_acl_interfaces:
+ config:
+ state: deleted
+
+# Commands Fired:
+# ---------------
+#
+# interface GigabitEthernet0/1
+# no ip access-group 110 in
+# no ip access-group 123 out
+# no ipv6 traffic-filter test_v6 out
+# no ipv6 traffic-filter temp_v6 in
+# interface GigabitEthernet0/2
+# no ip access-group 110 out
+# no ip access-group 123 out
+
+# After state:
+# -------------
+#
+# vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+# interface Loopback888
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# interface GigabitEthernet0/2
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+# interface Loopback888
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip access-group 110 in
+# ip access-group 123 out
+# ipv6 traffic-filter test_v6 out
+# ipv6 traffic-filter temp_v6 in
+# interface GigabitEthernet0/2
+# ip access-group 110 in
+# ip access-group 123 out
+
+- name: Gather listed acl interfaces with provided configurations
+ cisco.ios.ios_acl_interfaces:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "name": "Loopback888"
+# },
+# {
+# "name": "GigabitEthernet0/0"
+# },
+# {
+# "access_groups": [
+# {
+# "acls": [
+# {
+# "direction": "in",
+# "name": "110"
+# },
+# {
+# "direction": "out",
+# "name": "123"
+# }
+# ],
+# "afi": "ipv4"
+# },
+# {
+# "acls": [
+# {
+# "direction": "in",
+# "name": "temp_v6"
+# },
+# {
+# "direction": "out",
+# "name": "test_v6"
+# }
+# ],
+# "afi": "ipv6"
+# }
+# ],
+# "name": "GigabitEthernet0/1"
+# },
+# {
+# "access_groups": [
+# {
+# "acls": [
+# {
+# "direction": "in",
+# "name": "100"
+# },
+# {
+# "direction": "out",
+# "name": "123"
+# }
+# ],
+# "afi": "ipv4"
+# }
+# ],
+# "name": "GigabitEthernet0/2"
+# }
+# ]
+
+# After state:
+# ------------
+#
+# vios#sh running-config | include interface|ip access-group|ipv6 traffic-filter
+# interface Loopback888
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip access-group 110 in
+# ip access-group 123 out
+# ipv6 traffic-filter test_v6 out
+# ipv6 traffic-filter temp_v6 in
+# interface GigabitEthernet0/2
+# ip access-group 110 in
+# ip access-group 123 out
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: 110
+ direction: in
+ - name: 123
+ direction: out
+ - afi: ipv6
+ acls:
+ - name: test_v6
+ direction: out
+ - name: temp_v6
+ direction: in
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "interface GigabitEthernet0/1",
+# "ip access-group 110 in",
+# "ip access-group 123 out",
+# "ipv6 traffic-filter temp_v6 in",
+# "ipv6 traffic-filter test_v6 out"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# interface GigabitEthernet0/1
+# ip access-group 110 in
+# ip access-group 123 out
+# ipv6 traffic-filter temp_v6 in
+# ipv6 traffic-filter test_v6 out
+
+- name: Parse the commands for provided configuration
+ cisco.ios.ios_acl_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": [
+# {
+# "access_groups": [
+# {
+# "acls": [
+# {
+# "direction": "in",
+# "name": "110"
+# }
+# ],
+# "afi": "ipv4"
+# },
+# {
+# "acls": [
+# {
+# "direction": "in",
+# "name": "temp_v6"
+# }
+# ],
+# "afi": "ipv6"
+# }
+# ],
+# "name": "GigabitEthernet0/1"
+# }
+# ]
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['interface GigabitEthernet0/1', 'ip access-group 110 in', 'ipv6 traffic-filter test_v6 out']
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.acl_interfaces.acl_interfaces import (
+ Acl_InterfacesArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.acl_interfaces.acl_interfaces import (
+ Acl_Interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=Acl_InterfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = Acl_Interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_acls.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_acls.py
new file mode 100644
index 00000000..1f1b2831
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_acls.py
@@ -0,0 +1,1415 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_acls
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_acls
+short_description: ACLs resource module
+description: This module configures and manages the named or numbered ACLs on IOS
+ platforms.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL
+options:
+ config:
+ description: A dictionary of ACL options.
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description:
+ - The Address Family Indicator (AFI) for the Access Control Lists (ACL).
+ required: true
+ type: str
+ choices:
+ - ipv4
+ - ipv6
+ acls:
+ description:
+ - A list of Access Control Lists (ACL).
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: The name or the number of the ACL.
+ required: true
+ type: str
+ acl_type:
+ description:
+ - ACL type
+ - Note, it's mandatory and required for Named ACL, but for Numbered ACL
+ it's not mandatory.
+ type: str
+ choices:
+ - extended
+ - standard
+ aces:
+ description: The entries within the ACL.
+ elements: dict
+ type: list
+ suboptions:
+ grant:
+ description: Specify the action.
+ type: str
+ choices:
+ - permit
+ - deny
+ sequence:
+ description:
+ - Sequence Number for the Access Control Entry(ACE).
+ - Refer to vendor documentation for valid values.
+ type: int
+ evaluate:
+ description: Evaluate an access list
+ type: str
+ protocol:
+ description:
+ - Specify the protocol to match.
+ - Refer to vendor documentation for valid values.
+ type: str
+ protocol_options:
+ description: protocol type.
+ type: dict
+ suboptions:
+ protocol_number:
+ description: An IP protocol number
+ type: int
+ ahp:
+ description: Authentication Header Protocol.
+ type: bool
+ eigrp:
+ description: Cisco's EIGRP routing protocol.
+ type: bool
+ esp:
+ description: Encapsulation Security Payload.
+ type: bool
+ gre:
+ description: Cisco's GRE tunneling.
+ type: bool
+ hbh:
+ description: Hop by Hop options header. Valid for IPV6
+ type: bool
+ icmp:
+ description: Internet Control Message Protocol.
+ type: dict
+ suboptions:
+ administratively_prohibited:
+ description: Administratively prohibited
+ type: bool
+ alternate_address:
+ description: Alternate address
+ type: bool
+ conversion_error:
+ description: Datagram conversion
+ type: bool
+ dod_host_prohibited:
+ description: Host prohibited
+ type: bool
+ dod_net_prohibited:
+ description: Net prohibited
+ type: bool
+ echo:
+ description: Echo (ping)
+ type: bool
+ echo_reply:
+ description: Echo reply
+ type: bool
+ general_parameter_problem:
+ description: Parameter problem
+ type: bool
+ host_isolated:
+ description: Host isolated
+ type: bool
+ host_precedence_unreachable:
+ description: Host unreachable for precedence
+ type: bool
+ host_redirect:
+ description: Host redirect
+ type: bool
+ host_tos_redirect:
+ description: Host redirect for TOS
+ type: bool
+ host_tos_unreachable:
+ description: Host unreachable for TOS
+ type: bool
+ host_unknown:
+ description: Host unknown
+ type: bool
+ host_unreachable:
+ description: Host unreachable
+ type: bool
+ information_reply:
+ description: Information replies
+ type: bool
+ information_request:
+ description: Information requests
+ type: bool
+ mask_reply:
+ description: Mask replies
+ type: bool
+ mask_request:
+ description: mask_request
+ type: bool
+ mobile_redirect:
+ description: Mobile host redirect
+ type: bool
+ net_redirect:
+ description: Network redirect
+ type: bool
+ net_tos_redirect:
+ description: Net redirect for TOS
+ type: bool
+ net_tos_unreachable:
+ description: Network unreachable for TOS
+ type: bool
+ net_unreachable:
+ description: Net unreachable
+ type: bool
+ network_unknown:
+ description: Network unknown
+ type: bool
+ no_room_for_option:
+ description: Parameter required but no room
+ type: bool
+ option_missing:
+ description: Parameter required but not present
+ type: bool
+ packet_too_big:
+ description: Fragmentation needed and DF set
+ type: bool
+ parameter_problem:
+ description: All parameter problems
+ type: bool
+ port_unreachable:
+ description: Port unreachable
+ type: bool
+ precedence_unreachable:
+ description: Precedence cutoff
+ type: bool
+ protocol_unreachable:
+ description: Protocol unreachable
+ type: bool
+ reassembly_timeout:
+ description: Reassembly timeout
+ type: bool
+ redirect:
+ description: All redirects
+ type: bool
+ router_advertisement:
+ description: Router discovery advertisements
+ type: bool
+ router_solicitation:
+ description: Router discovery solicitations
+ type: bool
+ source_quench:
+ description: Source quenches
+ type: bool
+ source_route_failed:
+ description: Source route failed
+ type: bool
+ time_exceeded:
+ description: All time exceededs
+ type: bool
+ timestamp_reply:
+ description: Timestamp replies
+ type: bool
+ timestamp_request:
+ description: Timestamp requests
+ type: bool
+ traceroute:
+ description: Traceroute
+ type: bool
+ ttl_exceeded:
+ description: TTL exceeded
+ type: bool
+ unreachable:
+ description: All unreachables
+ type: bool
+ igmp:
+ description: Internet Gateway Message Protocol.
+ type: dict
+ suboptions:
+ dvmrp:
+ description: Distance Vector Multicast Routing Protocol(2)
+ type: bool
+ host_query:
+ description: IGMP Membership Query(0)
+ type: bool
+ mtrace_resp:
+ description: Multicast Traceroute Response(7)
+ type: bool
+ mtrace_route:
+ description: Multicast Traceroute(8)
+ type: bool
+ pim:
+ description: Protocol Independent Multicast(3)
+ type: bool
+ trace:
+ description: Multicast trace(4)
+ type: bool
+ v1host_report:
+ description: IGMPv1 Membership Report(1)
+ type: bool
+ v2host_report:
+ description: IGMPv2 Membership Report(5)
+ type: bool
+ v2leave_group:
+ description: IGMPv2 Leave Group(6)
+ type: bool
+ v3host_report:
+ description: IGMPv3 Membership Report(9)
+ type: bool
+ ip:
+ description: Any Internet Protocol.
+ type: bool
+ ipv6:
+ description: Any IPv6.
+ type: bool
+ ipinip:
+ description: IP in IP tunneling.
+ type: bool
+ nos:
+ description: KA9Q NOS compatible IP over IP tunneling.
+ type: bool
+ ospf:
+ description: OSPF routing protocol.
+ type: bool
+ pcp:
+ description: Payload Compression Protocol.
+ type: bool
+ pim:
+ description: Protocol Independent Multicast.
+ type: bool
+ sctp:
+ description: Stream Control Transmission Protocol.
+ type: bool
+ udp:
+ description: User Datagram Protocol.
+ type: bool
+ tcp:
+ description: Match TCP packet flags
+ type: dict
+ suboptions:
+ ack:
+ description: Match on the ACK bit
+ type: bool
+ established:
+ description: Match established connections
+ type: bool
+ fin:
+ description: Match on the FIN bit
+ type: bool
+ psh:
+ description: Match on the PSH bit
+ type: bool
+ rst:
+ description: Match on the RST bit
+ type: bool
+ syn:
+ description: Match on the SYN bit
+ type: bool
+ urg:
+ description: Match on the URG bit
+ type: bool
+ source:
+ description: Specify the packet source.
+ type: dict
+ suboptions:
+ address:
+ description: Source network address.
+ type: str
+ wildcard_bits:
+ description: Destination wildcard bits, valid with IPV4 address.
+ type: str
+ any:
+ description: Match any source address.
+ type: bool
+ host:
+ description: A single source host
+ type: str
+ port_protocol:
+ description:
+ - Specify the destination port along with protocol.
+ - Note, Valid with TCP/UDP protocol_options
+ type: dict
+ suboptions:
+ eq:
+ description: Match only packets on a given port number.
+ type: str
+ gt:
+ description: Match only packets with a greater port number.
+ type: str
+ lt:
+ description: Match only packets with a lower port number.
+ type: str
+ neq:
+ description: Match only packets not on a given port number.
+ type: str
+ range:
+ description: Port group.
+ type: dict
+ suboptions:
+ start:
+ description: Specify the start of the port range.
+ type: int
+ end:
+ description: Specify the end of the port range.
+ type: int
+ destination:
+ description: Specify the packet destination.
+ type: dict
+ suboptions:
+ address:
+ description: Host address to match, or any single host address.
+ type: str
+ wildcard_bits:
+ description: Destination wildcard bits, valid with IPV4 address.
+ type: str
+ any:
+ description: Match any source address.
+ type: bool
+ host:
+ description: A single destination host
+ type: str
+ port_protocol:
+ description:
+ - Specify the destination port along with protocol.
+ - Note, Valid with TCP/UDP protocol_options
+ type: dict
+ suboptions:
+ eq:
+ description: Match only packets on a given port number.
+ type: str
+ gt:
+ description: Match only packets with a greater port number.
+ type: str
+ lt:
+ description: Match only packets with a lower port number.
+ type: str
+ neq:
+ description: Match only packets not on a given port number.
+ type: str
+ range:
+ description: Port group.
+ type: dict
+ suboptions:
+ start:
+ description: Specify the start of the port range.
+ type: int
+ end:
+ description: Specify the end of the port range.
+ type: int
+ dscp:
+ description: Match packets with given dscp value.
+ type: str
+ fragments:
+ description: Check non-initial fragments.
+ type: str
+ log:
+ description: Log matches against this entry.
+ type: str
+ log_input:
+ description: Log matches against this entry, including input interface.
+ type: str
+ option:
+ description:
+ - Match packets with given IP Options value.
+ - Valid only for named acls.
+ type: dict
+ suboptions:
+ add_ext:
+ description: Match packets with Address Extension Option (147).
+ type: bool
+ any_options:
+ description: Match packets with ANY Option.
+ type: bool
+ com_security:
+ description: Match packets with Commercial Security Option (134).
+ type: bool
+ dps:
+ description: Match packets with Dynamic Packet State Option (151).
+ type: bool
+ encode:
+ description: Match packets with Encode Option (15).
+ type: bool
+ eool:
+ description: Match packets with End of Options (0).
+ type: bool
+ ext_ip:
+ description: Match packets with Extended IP Option (145).
+ type: bool
+ ext_security:
+ description: Match packets with Extended Security Option (133).
+ type: bool
+ finn:
+ description: Match packets with Experimental Flow Control Option
+ (205).
+ type: bool
+ imitd:
+ description: Match packets with IMI Traffic Desriptor Option (144).
+ type: bool
+ lsr:
+ description: Match packets with Loose Source Route Option (131).
+ type: bool
+ mtup:
+ description: Match packets with MTU Probe Option (11).
+ type: bool
+ mtur:
+ description: Match packets with MTU Reply Option (12).
+ type: bool
+ no_op:
+ description: Match packets with No Operation Option (1).
+ type: bool
+ nsapa:
+ description: Match packets with NSAP Addresses Option (150).
+ type: bool
+ record_route:
+ description: Match packets with Record Route Option (7).
+ type: bool
+ router_alert:
+ description: Match packets with Router Alert Option (148).
+ type: bool
+ sdb:
+ description: Match packets with Selective Directed Broadcast Option
+ (149).
+ type: bool
+ security:
+ description: Match packets with Basic Security Option (130).
+ type: bool
+ ssr:
+ description: Match packets with Strict Source Routing Option (137).
+ type: bool
+ stream_id:
+ description: Match packets with Stream ID Option (136).
+ type: bool
+ timestamp:
+ description: Match packets with Time Stamp Option (68).
+ type: bool
+ traceroute:
+ description: Match packets with Trace Route Option (82).
+ type: bool
+ ump:
+ description: Match packets with Upstream Multicast Packet Option
+ (152).
+ type: bool
+ visa:
+ description: Match packets with Experimental Access Control Option
+ (142).
+ type: bool
+ zsu:
+ description: Match packets with Experimental Measurement Option
+ (10).
+ type: bool
+ precedence:
+ description: Match packets with given precedence value.
+ type: int
+ time_range:
+ description: Specify a time-range.
+ type: str
+ tos:
+ description:
+ - Match packets with given TOS value.
+ - Note, DSCP and TOS are mutually exclusive
+ type: dict
+ suboptions:
+ service_value:
+ description: Type of service value
+ type: int
+ max_reliability:
+ description: Match packets with max reliable TOS (2).
+ type: bool
+ max_throughput:
+ description: Match packets with max throughput TOS (4).
+ type: bool
+ min_delay:
+ description: Match packets with min delay TOS (8).
+ type: bool
+ min_monetary_cost:
+ description: Match packets with min monetary cost TOS (1).
+ type: bool
+ normal:
+ description: Match packets with normal TOS (0).
+ type: bool
+ ttl:
+ description: Match packets with given TTL value.
+ type: dict
+ suboptions:
+ eq:
+ description: Match only packets on a given TTL number.
+ type: int
+ gt:
+ description: Match only packets with a greater TTL number.
+ type: int
+ lt:
+ description: Match only packets with a lower TTL number.
+ type: int
+ neq:
+ description: Match only packets not on a given TTL number.
+ type: int
+ range:
+ description: Match only packets in the range of TTLs.
+ type: dict
+ suboptions:
+ start:
+ description: Specify the start of the port range.
+ type: int
+ end:
+ description: Specify the end of the port range.
+ type: int
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS
+ device by executing the command B(sh access-list).
+ - The state I(parsed) reads the configuration from C(running_config)
+ option and transforms it into Ansible structured data as per the
+ resource module's argspec and the value is then returned in the
+ I(parsed) key within the result.
+ type: str
+ state:
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# vios#sh access-lists
+# Extended IP access list 110
+# 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10
+
+- name: Merge provided configuration with device configuration
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: std_acl
+ acl_type: standard
+ aces:
+ - grant: deny
+ source:
+ address: 192.168.1.200
+ - grant: deny
+ source:
+ address: 192.168.2.0
+ wildcard_bits: 0.0.0.255
+ - name: 110
+ aces:
+ - sequence: 10
+ protocol_options:
+ icmp:
+ traceroute: true
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ host: 198.51.100.0
+ destination:
+ host: 198.51.110.0
+ port_protocol:
+ eq: telnet
+ - name: test
+ acl_type: extended
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp:
+ fin: true
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ option:
+ traceroute: true
+ ttl:
+ eq: 10
+ - name: 123
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 198.51.101.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ tos:
+ service_value: 12
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.4.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ lt: 20
+ - afi: ipv6
+ acls:
+ - name: R1_TRAFFIC
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ any: true
+ port_protocol:
+ eq: www
+ destination:
+ any: true
+ port_protocol:
+ eq: telnet
+ dscp: af11
+ state: merged
+
+# Commands fired:
+# ---------------
+#
+# - ip access-list standard std_acl
+# - deny 192.168.1.200
+# - deny 192.168.2.0 0.0.0.255
+# - ip access-list extended 110
+# - no 10
+# - 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+# - deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+# - ip access-list extended test
+# - deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+# - ip access-list extended 123
+# - deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+# - deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+# - ipv6 access-list R1_TRAFFIC
+# - deny tcp any eq www any eq telnet ack dscp af11
+
+# After state:
+# ------------
+#
+# vios#sh access-lists
+# Standard IP access list std_acl
+# 10 deny 192.168.1.200
+# 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+# Extended IP access list 110
+# 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+# 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+# Extended IP access list 123
+# 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+# 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+# Extended IP access list test
+# 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+# IPv6 access list R1_TRAFFIC
+# deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# vios#sh access-lists
+# Standard IP access list std_acl
+# 10 deny 192.168.1.200
+# 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+# Extended IP access list 110
+# 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+# 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+# Extended IP access list 123
+# 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+# 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+# Extended IP access list test
+# 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+# IPv6 access list R1_TRAFFIC
+# deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+
+- name: Replaces device configuration of listed acls with provided configuration
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: 110
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ eq: 10
+ - name: 150
+ aces:
+ - grant: deny
+ sequence: 20
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ dscp: ef
+ ttl:
+ eq: 10
+ state: replaced
+
+# Commands fired:
+# ---------------
+#
+# - no ip access-list extended 110
+# - ip access-list extended 110
+# - deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www syn dscp ef ttl eq 10
+# - ip access-list extended 150
+# - 20 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10
+
+# After state:
+# -------------
+#
+# vios#sh access-lists
+# Standard IP access list std_acl
+# 10 deny 192.168.1.200
+# 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+# Extended IP access list 110
+# 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www syn dscp ef ttl eq 10
+# Extended IP access list 123
+# 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+# 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+# Extended IP access list 150
+# 20 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10
+# Extended IP access list test
+# 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+# IPv6 access list R1_TRAFFIC
+# deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# vios#sh access-lists
+# Standard IP access list std_acl
+# 10 deny 192.168.1.200
+# 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+# Extended IP access list 110
+# 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+# 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+# Extended IP access list 123
+# 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+# 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+# Extended IP access list test
+# 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+# IPv6 access list R1_TRAFFIC
+# deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+- name: Override device configuration of all acls with provided configuration
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: 110
+ aces:
+ - grant: deny
+ sequence: 20
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ eq: 10
+ - name: 150
+ aces:
+ - grant: deny
+ sequence: 10
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ dscp: ef
+ ttl:
+ eq: 10
+ state: overridden
+
+# Commands fired:
+# ---------------
+#
+# - no ip access-list standard std_acl
+# - no ip access-list extended 110
+# - no ip access-list extended 123
+# - no ip access-list extended 150
+# - no ip access-list extended test
+# - no ipv6 access-list R1_TRAFFIC
+# - ip access-list extended 150
+# - 10 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10
+# - ip access-list extended 110
+# - 20 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq www ack dscp ef ttl eq 10
+
+# After state:
+# -------------
+#
+# vios#sh access-lists
+# Extended IP access list 110
+# 20 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq www ack dscp ef ttl eq 10
+# Extended IP access list 150
+# 10 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10
+
+# Using Deleted
+
+# Before state:
+# -------------
+#
+# vios#sh access-lists
+# Standard IP access list std_acl
+# 10 deny 192.168.1.200
+# 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+# Extended IP access list 110
+# 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+# 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+# Extended IP access list 123
+# 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+# 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+# Extended IP access list test
+# 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+# IPv6 access list R1_TRAFFIC
+# deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+- name: "Delete ACLs (Note: This won't delete the all configured ACLs)"
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: test
+ acl_type: extended
+ - name: 110
+ - afi: ipv6
+ acls:
+ - name: R1_TRAFFIC
+ state: deleted
+
+# Commands fired:
+# ---------------
+#
+# - no ip access-list extended test
+# - no ip access-list extended 110
+# - no ipv6 access-list R1_TRAFFIC
+
+# After state:
+# -------------
+#
+# vios#sh access-lists
+# Standard IP access list std_acl
+# 10 deny 192.168.1.200
+# 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+# Extended IP access list 123
+# 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+# 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+
+# Before state:
+# -------------
+#
+# vios#sh access-lists
+# Standard IP access list std_acl
+# 10 deny 192.168.1.200
+# 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+# Extended IP access list 110
+# 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+# 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+# Extended IP access list 123
+# 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+# 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+# Extended IP access list test
+# 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+# IPv6 access list R1_TRAFFIC
+# deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+- name: "Delete ACLs based on AFI (Note: This won't delete the all configured ACLs)"
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ state: deleted
+
+# Commands fired:
+# ---------------
+#
+# - no ip access-list standard std_acl
+# - no ip access-list extended test
+# - no ip access-list extended 110
+# - no ip access-list extended 123
+
+# After state:
+# -------------
+#
+# vios#sh access-lists
+# IPv6 access list R1_TRAFFIC
+# deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+# Using Deleted without any config passed
+#"(NOTE: This will delete all of configured ACLs)"
+
+# Before state:
+# -------------
+#
+# vios#sh access-lists
+# Standard IP access list std_acl
+# 10 deny 192.168.1.200
+# 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+# Extended IP access list 110
+# 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+# 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+# Extended IP access list 123
+# 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+# 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+# Extended IP access list test
+# 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+# IPv6 access list R1_TRAFFIC
+# deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+- name: 'Delete ALL of configured ACLs (Note: This WILL delete the all configured
+ ACLs)'
+ cisco.ios.ios_acls:
+ state: deleted
+
+# Commands fired:
+# ---------------
+#
+# - no ip access-list extended test
+# - no ip access-list extended 110
+# - no ip access-list extended 123
+# - no ip access-list extended test
+# - no ipv6 access-list R1_TRAFFIC
+
+# After state:
+# -------------
+#
+# vios#sh access-lists
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# vios#sh access-lists
+# Standard IP access list std_acl
+# 10 deny 192.168.1.200
+# 20 deny 192.168.2.0, wildcard bits 0.0.0.255
+# Extended IP access list 110
+# 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 traceroute dscp ef ttl eq 10
+# 20 deny tcp host 198.51.100.0 host 198.51.110.0 eq telnet ack
+# Extended IP access list 123
+# 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+# 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+# Extended IP access list test
+# 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+# IPv6 access list R1_TRAFFIC
+# deny tcp any eq www any eq telnet ack dscp af11 sequence 10
+
+- name: Gather listed acls with provided configurations
+ cisco.ios.ios_acls:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "acls": [
+# {
+# "aces": [
+# {
+# "destination": {
+# "address": "192.0.3.0",
+# "wildcard_bits": "0.0.0.255"
+# },
+# "dscp": "ef",
+# "grant": "deny",
+# "protocol_options": {
+# "icmp": {
+# "echo": true
+# }
+# },
+# "sequence": 10,
+# "source": {
+# "address": "192.0.2.0",
+# "wildcard_bits": "0.0.0.255"
+# },
+# "ttl": {
+# "eq": 10
+# }
+# }
+# ],
+# "acl_type": "extended",
+# "name": "110"
+# },
+# {
+# "aces": [
+# {
+# "destination": {
+# "address": "198.51.101.0",
+# "port_protocol": {
+# "eq": "telnet"
+# },
+# "wildcard_bits": "0.0.0.255"
+# },
+# "grant": "deny",
+# "protocol_options": {
+# "tcp": {
+# "ack": true
+# }
+# },
+# "sequence": 10,
+# "source": {
+# "address": "198.51.100.0",
+# "wildcard_bits": "0.0.0.255"
+# },
+# "tos": {
+# "service_value": 12
+# }
+# },
+# {
+# "destination": {
+# "address": "192.0.4.0",
+# "port_protocol": {
+# "eq": "www"
+# },
+# "wildcard_bits": "0.0.0.255"
+# },
+# "dscp": "ef",
+# "grant": "deny",
+# "protocol_options": {
+# "tcp": {
+# "ack": true
+# }
+# },
+# "sequence": 20,
+# "source": {
+# "address": "192.0.3.0",
+# "wildcard_bits": "0.0.0.255"
+# },
+# "ttl": {
+# "lt": 20
+# }
+# }
+# ],
+# "acl_type": "extended",
+# "name": "123"
+# },
+# {
+# "aces": [
+# {
+# "destination": {
+# "address": "192.0.3.0",
+# "port_protocol": {
+# "eq": "www"
+# },
+# "wildcard_bits": "0.0.0.255"
+# },
+# "grant": "deny",
+# "option": {
+# "traceroute": true
+# },
+# "protocol_options": {
+# "tcp": {
+# "fin": true
+# }
+# },
+# "sequence": 10,
+# "source": {
+# "address": "192.0.2.0",
+# "wildcard_bits": "0.0.0.255"
+# },
+# "ttl": {
+# "eq": 10
+# }
+# }
+# ],
+# "acl_type": "extended",
+# "name": "test_acl"
+# }
+# ],
+# "afi": "ipv4"
+# },
+# {
+# "acls": [
+# {
+# "aces": [
+# {
+# "destination": {
+# "any": true,
+# "port_protocol": {
+# "eq": "telnet"
+# }
+# },
+# "dscp": "af11",
+# "grant": "deny",
+# "protocol_options": {
+# "tcp": {
+# "ack": true
+# }
+# },
+# "sequence": 10,
+# "source": {
+# "any": true,
+# "port_protocol": {
+# "eq": "www"
+# }
+# }
+# }
+# ],
+# "name": "R1_TRAFFIC"
+# }
+# ],
+# "afi": "ipv6"
+# }
+# ]
+
+# Using Rendered
+
+- name: Rendered the provided configuration with the exisiting running configuration
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: 110
+ aces:
+ - grant: deny
+ sequence: 10
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ eq: 10
+ - name: 150
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ dscp: ef
+ ttl:
+ eq: 10
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "ip access-list extended 110",
+# "10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www syn dscp ef ttl eq 10",
+# "ip access-list extended 150",
+# "deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# ipv6 access-list R1_TRAFFIC
+# deny tcp any eq www any eq telnet ack dscp af11
+
+- name: Parse the commands for provided configuration
+ cisco.ios.ios_acls:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": [
+# {
+# "acls": [
+# {
+# "aces": [
+# {
+# "destination": {
+# "any": true,
+# "port_protocol": {
+# "eq": "telnet"
+# }
+# },
+# "dscp": "af11",
+# "grant": "deny",
+# "protocol_options": {
+# "tcp": {
+# "ack": true
+# }
+# },
+# "source": {
+# "any": true,
+# "port_protocol": {
+# "eq": "www"
+# }
+# }
+# }
+# ],
+# "name": "R1_TRAFFIC"
+# }
+# ],
+# "afi": "ipv6"
+# }
+# ]
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['ip access-list extended 110', 'deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10']
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.acls.acls import (
+ AclsArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.acls.acls import (
+ Acls,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=AclsArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = Acls(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_banner.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_banner.py
new file mode 100644
index 00000000..4370857b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_banner.py
@@ -0,0 +1,188 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_banner
+author: Ricardo Carrillo Cruz (@rcarrillocruz)
+short_description: Manage multiline banners on Cisco IOS devices
+description:
+- This will configure both login and motd banners on remote devices running Cisco
+ IOS. It allows playbooks to add or remote banner text from the active running configuration.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.ios.ios
+notes:
+- Tested against IOS 15.6
+options:
+ banner:
+ description:
+ - Specifies which banner should be configured on the remote device. In Ansible
+ 2.4 and earlier only I(login) and I(motd) were supported.
+ required: true
+ choices:
+ - login
+ - motd
+ - exec
+ - incoming
+ - slip-ppp
+ type: str
+ text:
+ description:
+ - The banner text that should be present in the remote device running configuration. This
+ argument accepts a multiline string, with no empty lines. Requires I(state=present).
+ type: str
+ state:
+ description:
+ - Specifies whether or not the configuration is present in the current devices
+ active running configuration.
+ default: present
+ type: str
+ choices:
+ - present
+ - absent
+"""
+EXAMPLES = """
+- name: configure the login banner
+ cisco.ios.ios_banner:
+ banner: login
+ text: |
+ this is my login banner
+ that contains a multiline
+ string
+ state: present
+
+- name: remove the motd banner
+ cisco.ios.ios_banner:
+ banner: motd
+ state: absent
+
+- name: Configure banner from file
+ cisco.ios.ios_banner:
+ banner: motd
+ text: "{{ lookup('file', './config_partial/raw_banner.cfg') }}"
+ state: present
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - banner login
+ - this is my login banner
+ - that contains a multiline
+ - string
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+from re import search, M
+
+
+def map_obj_to_commands(updates, module):
+ commands = list()
+ want, have = updates
+ state = module.params["state"]
+ if state == "absent" and "text" in have.keys() and have["text"]:
+ commands.append("no banner %s" % module.params["banner"])
+ elif state == "present":
+ if want["text"] and (want["text"] != have.get("text")):
+ banner_cmd = "banner %s" % module.params["banner"]
+ banner_cmd += " @\n"
+ banner_cmd += want["text"].strip("\n")
+ banner_cmd += "\n@"
+ commands.append(banner_cmd)
+ return commands
+
+
+def map_config_to_obj(module):
+ """
+ This function gets the banner config without stripping any whitespaces,
+ and then fetches the required banner from it.
+ :param module:
+ :return: banner config dict object.
+ """
+ out = get_config(
+ module, flags="| begin banner %s" % module.params["banner"]
+ )
+ if out:
+ regex = "banner " + module.params["banner"] + " ^C\n"
+ if search("banner " + module.params["banner"], out, M):
+ output = str((out.split(regex))[1].split("^C\n")[0])
+ else:
+ output = None
+ else:
+ output = None
+ obj = {"banner": module.params["banner"], "state": "absent"}
+ if output:
+ obj["text"] = output
+ obj["state"] = "present"
+ return obj
+
+
+def map_params_to_obj(module):
+ text = module.params["text"]
+ return {
+ "banner": module.params["banner"],
+ "text": text,
+ "state": module.params["state"],
+ }
+
+
+def main():
+ """ main entry point for module execution
+ """
+ argument_spec = dict(
+ banner=dict(
+ required=True,
+ choices=["login", "motd", "exec", "incoming", "slip-ppp"],
+ ),
+ text=dict(),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+ argument_spec.update(ios_argument_spec)
+ required_if = [("state", "present", ("text",))]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+ warnings = list()
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands((want, have), module)
+ result["commands"] = commands
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_bgp.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_bgp.py
new file mode 100644
index 00000000..bc189436
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_bgp.py
@@ -0,0 +1,509 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_bgp
+author: Nilashish Chakraborty (@NilashishC)
+short_description: Configure global BGP protocol settings on Cisco IOS.
+description:
+- This module provides configuration management of global BGP parameters on devices
+ running Cisco IOS
+version_added: 1.0.0
+notes:
+- Tested against Cisco IOS Version 15.6(3)M2
+options:
+ config:
+ description:
+ - Specifies the BGP related configuration.
+ type: dict
+ suboptions:
+ bgp_as:
+ description:
+ - Specifies the BGP Autonomous System (AS) number to configure on the device.
+ type: int
+ required: true
+ router_id:
+ description:
+ - Configures the BGP routing process router-id value.
+ type: str
+ default:
+ log_neighbor_changes:
+ description:
+ - Enable/disable logging neighbor up/down and reset reason.
+ type: bool
+ neighbors:
+ description:
+ - Specifies BGP neighbor related configurations.
+ type: list
+ elements: dict
+ suboptions:
+ neighbor:
+ description:
+ - Neighbor router address.
+ required: true
+ type: str
+ remote_as:
+ description:
+ - Remote AS of the BGP neighbor to configure.
+ type: int
+ required: true
+ update_source:
+ description:
+ - Source of the routing updates.
+ type: str
+ password:
+ description:
+ - Password to authenticate the BGP peer connection.
+ type: str
+ enabled:
+ description:
+ - Administratively shutdown or enable a neighbor.
+ type: bool
+ description:
+ description:
+ - Neighbor specific description.
+ type: str
+ ebgp_multihop:
+ description:
+ - Specifies the maximum hop count for EBGP neighbors not on directly connected
+ networks.
+ - The range is from 1 to 255.
+ type: int
+ peer_group:
+ description:
+ - Name of the peer group that the neighbor is a member of.
+ type: str
+ timers:
+ description:
+ - Specifies BGP neighbor timer related configurations.
+ type: dict
+ suboptions:
+ keepalive:
+ description:
+ - Frequency (in seconds) with which the device sends keepalive messages
+ to its peer.
+ - The range is from 0 to 65535.
+ type: int
+ required: true
+ holdtime:
+ description:
+ - Interval (in seconds) after not receiving a keepalive message that
+ IOS declares a peer dead.
+ - The range is from 0 to 65535.
+ type: int
+ required: true
+ min_neighbor_holdtime:
+ description:
+ - Interval (in seconds) specifying the minimum acceptable hold-time
+ from a BGP neighbor.
+ - The minimum acceptable hold-time must be less than, or equal to,
+ the interval specified in the holdtime argument.
+ - The range is from 0 to 65535.
+ type: int
+ local_as:
+ description:
+ - The local AS number for the neighbor.
+ type: int
+ networks:
+ description:
+ - Specify Networks to announce via BGP.
+ - For operation replace, this option is mutually exclusive with networks option
+ under address_family.
+ - For operation replace, if the device already has an address family activated,
+ this option is not allowed.
+ type: list
+ elements: dict
+ suboptions:
+ prefix:
+ description:
+ - Network ID to announce via BGP.
+ required: true
+ type: str
+ masklen:
+ description:
+ - Subnet mask length for the Network to announce(e.g, 8, 16, 24, etc.).
+ type: int
+ route_map:
+ description:
+ - Route map to modify the attributes.
+ type: str
+ address_family:
+ description:
+ - Specifies BGP address family related configurations.
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description:
+ - Type of address family to configure.
+ choices:
+ - ipv4
+ - ipv6
+ required: true
+ type: str
+ safi:
+ description:
+ - Specifies the type of cast for the address family.
+ choices:
+ - flowspec
+ - unicast
+ - multicast
+ - labeled-unicast
+ default: unicast
+ type: str
+ synchronization:
+ description:
+ - Enable/disable IGP synchronization.
+ type: bool
+ auto_summary:
+ description:
+ - Enable/disable automatic network number summarization.
+ type: bool
+ redistribute:
+ description:
+ - Specifies the redistribute information from another routing protocol.
+ type: list
+ elements: dict
+ suboptions:
+ protocol:
+ description:
+ - Specifies the protocol for configuring redistribute information.
+ choices:
+ - ospf
+ - ospfv3
+ - eigrp
+ - isis
+ - static
+ - connected
+ - odr
+ - lisp
+ - mobile
+ - rip
+ required: true
+ type: str
+ id:
+ description:
+ - Identifier for the routing protocol for configuring redistribute
+ information.
+ - Valid for protocols 'ospf', 'ospfv3' and 'eigrp'.
+ type: str
+ metric:
+ description:
+ - Specifies the metric for redistributed routes.
+ type: int
+ route_map:
+ description:
+ - Specifies the route map reference.
+ type: str
+ networks:
+ description:
+ - Specify Networks to announce via BGP.
+ - For operation replace, this option is mutually exclusive with root level
+ networks option.
+ type: list
+ elements: dict
+ suboptions:
+ prefix:
+ description:
+ - Network ID to announce via BGP.
+ required: true
+ type: str
+ masklen:
+ description:
+ - Subnet mask length for the Network to announce(e.g, 8, 16, 24, etc.).
+ type: int
+ route_map:
+ description:
+ - Route map to modify the attributes.
+ type: str
+ neighbors:
+ description:
+ - Specifies BGP neighbor related configurations in Address Family configuration
+ mode.
+ type: list
+ elements: dict
+ suboptions:
+ neighbor:
+ description:
+ - Neighbor router address.
+ required: true
+ type: str
+ advertisement_interval:
+ description:
+ - Minimum interval between sending BGP routing updates for this neighbor.
+ type: int
+ route_reflector_client:
+ description:
+ - Specify a neighbor as a route reflector client.
+ type: bool
+ route_server_client:
+ description:
+ - Specify a neighbor as a route server client.
+ type: bool
+ activate:
+ description:
+ - Enable the Address Family for this Neighbor.
+ type: bool
+ remove_private_as:
+ description:
+ - Remove the private AS number from outbound updates.
+ type: bool
+ next_hop_self:
+ description:
+ - Enable/disable the next hop calculation for this neighbor.
+ type: bool
+ next_hop_unchanged:
+ description:
+ - Propagate next hop unchanged for iBGP paths to this neighbor.
+ type: bool
+ maximum_prefix:
+ description:
+ - Maximum number of prefixes to accept from this peer.
+ - The range is from 1 to 2147483647.
+ type: int
+ prefix_list_in:
+ description:
+ - Name of ip prefix-list to apply to incoming prefixes.
+ type: str
+ prefix_list_out:
+ description:
+ - Name of ip prefix-list to apply to outgoing prefixes.
+ type: str
+ operation:
+ description:
+ - Specifies the operation to be performed on the BGP process configured on the
+ device.
+ - In case of merge, the input configuration will be merged with the existing BGP
+ configuration on the device.
+ - In case of replace, if there is a diff between the existing configuration and
+ the input configuration, the existing configuration will be replaced by the
+ input configuration for every option that has the diff.
+ - In case of override, all the existing BGP configuration will be removed from
+ the device and replaced with the input configuration.
+ - In case of delete the existing BGP configuration will be removed from the device.
+ default: merge
+ type: str
+ choices:
+ - merge
+ - replace
+ - override
+ - delete
+"""
+EXAMPLES = """
+- name: configure global bgp as 64496
+ cisco.ios.ios_bgp:
+ config:
+ bgp_as: 64496
+ router_id: 192.0.2.1
+ log_neighbor_changes: true
+ neighbors:
+ - neighbor: 203.0.113.5
+ remote_as: 64511
+ timers:
+ keepalive: 300
+ holdtime: 360
+ min_neighbor_holdtime: 360
+ - neighbor: 198.51.100.2
+ remote_as: 64498
+ networks:
+ - prefix: 198.51.100.0
+ route_map: RMAP_1
+ - prefix: 192.0.2.0
+ masklen: 23
+ address_family:
+ - afi: ipv4
+ safi: unicast
+ redistribute:
+ - protocol: ospf
+ id: 223
+ metric: 10
+ operation: merge
+
+- name: Configure BGP neighbors
+ cisco.ios.ios_bgp:
+ config:
+ bgp_as: 64496
+ neighbors:
+ - neighbor: 192.0.2.10
+ remote_as: 64496
+ password: ansible
+ description: IBGP_NBR_1
+ ebgp_multihop: 100
+ timers:
+ keepalive: 300
+ holdtime: 360
+ min_neighbor_holdtime: 360
+ - neighbor: 192.0.2.15
+ remote_as: 64496
+ description: IBGP_NBR_2
+ ebgp_multihop: 150
+ operation: merge
+
+- name: Configure root-level networks for BGP
+ cisco.ios.ios_bgp:
+ config:
+ bgp_as: 64496
+ networks:
+ - prefix: 203.0.113.0
+ masklen: 27
+ route_map: RMAP_1
+ - prefix: 203.0.113.32
+ masklen: 27
+ route_map: RMAP_2
+ operation: merge
+
+- name: Configure BGP neighbors under address family mode
+ cisco.ios.ios_bgp:
+ config:
+ bgp_as: 64496
+ address_family:
+ - afi: ipv4
+ safi: unicast
+ neighbors:
+ - neighbor: 203.0.113.10
+ activate: yes
+ maximum_prefix: 250
+ advertisement_interval: 120
+ - neighbor: 192.0.2.15
+ activate: yes
+ route_reflector_client: true
+ operation: merge
+
+- name: remove bgp as 64496 from config
+ cisco.ios.ios_bgp:
+ config:
+ bgp_as: 64496
+ operation: delete
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - router bgp 64496
+ - bgp router-id 192.0.2.1
+ - bgp log-neighbor-changes
+ - neighbor 203.0.113.5 remote-as 64511
+ - neighbor 203.0.113.5 timers 300 360 360
+ - neighbor 198.51.100.2 remote-as 64498
+ - network 198.51.100.0 route-map RMAP_1
+ - network 192.0.2.0 mask 255.255.254.0
+ - address-family ipv4
+ - redistribute ospf 223 metric 70
+ - exit-address-family
+"""
+from ansible.module_utils._text import to_text
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.module import (
+ NetworkModule,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.cli.config.bgp.process import (
+ REDISTRIBUTE_PROTOCOLS,
+)
+
+
+def main():
+ """ main entry point for module execution
+ """
+ network_spec = {
+ "prefix": dict(required=True),
+ "masklen": dict(type="int"),
+ "route_map": dict(),
+ }
+ redistribute_spec = {
+ "protocol": dict(choices=REDISTRIBUTE_PROTOCOLS, required=True),
+ "id": dict(),
+ "metric": dict(type="int"),
+ "route_map": dict(),
+ }
+ timer_spec = {
+ "keepalive": dict(type="int", required=True),
+ "holdtime": dict(type="int", required=True),
+ "min_neighbor_holdtime": dict(type="int"),
+ }
+ neighbor_spec = {
+ "neighbor": dict(required=True),
+ "remote_as": dict(type="int", required=True),
+ "local_as": dict(type="int"),
+ "update_source": dict(),
+ "password": dict(no_log=True),
+ "enabled": dict(type="bool"),
+ "description": dict(),
+ "ebgp_multihop": dict(type="int"),
+ "timers": dict(type="dict", options=timer_spec),
+ "peer_group": dict(),
+ }
+ af_neighbor_spec = {
+ "neighbor": dict(required=True),
+ "activate": dict(type="bool"),
+ "advertisement_interval": dict(type="int"),
+ "remove_private_as": dict(type="bool"),
+ "next_hop_self": dict(type="bool"),
+ "next_hop_unchanged": dict(type="bool"),
+ "route_reflector_client": dict(type="bool"),
+ "route_server_client": dict(type="bool"),
+ "maximum_prefix": dict(type="int"),
+ "prefix_list_in": dict(),
+ "prefix_list_out": dict(),
+ }
+ address_family_spec = {
+ "afi": dict(choices=["ipv4", "ipv6"], required=True),
+ "safi": dict(
+ choices=["flowspec", "labeled-unicast", "multicast", "unicast"],
+ default="unicast",
+ ),
+ "auto_summary": dict(type="bool"),
+ "synchronization": dict(type="bool"),
+ "networks": dict(type="list", elements="dict", options=network_spec),
+ "redistribute": dict(
+ type="list", elements="dict", options=redistribute_spec
+ ),
+ "neighbors": dict(
+ type="list", elements="dict", options=af_neighbor_spec
+ ),
+ }
+ config_spec = {
+ "bgp_as": dict(type="int", required=True),
+ "router_id": dict(),
+ "log_neighbor_changes": dict(type="bool"),
+ "neighbors": dict(type="list", elements="dict", options=neighbor_spec),
+ "address_family": dict(
+ type="list", elements="dict", options=address_family_spec
+ ),
+ "networks": dict(type="list", elements="dict", options=network_spec),
+ }
+ argument_spec = {
+ "config": dict(type="dict", options=config_spec),
+ "operation": dict(
+ default="merge", choices=["merge", "replace", "override", "delete"]
+ ),
+ }
+ module = NetworkModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+ try:
+ result = module.edit_config(config_filter="| section ^router bgp")
+ except Exception as exc:
+ module.fail_json(msg=to_text(exc))
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_bgp_global.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_bgp_global.py
new file mode 100644
index 00000000..8e401986
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_bgp_global.py
@@ -0,0 +1,2139 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_bgp_global
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_bgp_global
+short_description: Global BGP resource module
+description: This module configures and manages the attributes of global bgp on Cisco IOS.
+version_added: 1.3.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL
+options:
+ config:
+ description: A list of configurations for global bgp.
+ type: dict
+ suboptions:
+ as_number:
+ description: Autonomous system number.
+ type: str
+ required: true
+ aggregate_address:
+ description: Configure BGP aggregate entries
+ type: dict
+ suboptions:
+ address:
+ description: Aggregate address
+ type: str
+ netmask:
+ description: Aggregate mask
+ type: str
+ advertise_map:
+ description: Set condition to advertise attribute
+ type: str
+ as_confed_set:
+ description: Generate AS confed set path information
+ type: bool
+ as_set:
+ description: Generate AS set path information
+ type: bool
+ attribute_map:
+ description: Set attributes of aggregate
+ type: str
+ summary_only:
+ description: Filter more specific routes from updates
+ type: bool
+ suppress_map:
+ description: Conditionally filter more specific routes from updates
+ type: str
+ auto_summary:
+ description: Enable automatic network number summarization
+ type: bool
+ bgp:
+ description: Enable address family and enter its config mode
+ type: dict
+ suboptions:
+ additional_paths:
+ description: Additional paths in the BGP table
+ type: dict
+ suboptions:
+ install:
+ description: Additional paths to install into RIB
+ type: bool
+ receive:
+ description: Receive additional paths from neighbors
+ type: bool
+ select:
+ description: Selection criteria to pick the paths
+ type: dict
+ suboptions:
+ all:
+ description: Select all available paths
+ type: bool
+ best:
+ description: Select best N paths (2-3).
+ type: int
+ best_external:
+ description: Select best-external path
+ type: bool
+ group_best:
+ description: Select group-best path
+ type: bool
+ send:
+ description: Send additional paths to neighbors
+ type: bool
+ advertise_best_external:
+ description: Advertise best external path to internal peers
+ type: bool
+ aggregate_timer:
+ description:
+ - Configure Aggregation Timer
+ - Please refer vendor documentation for valid values
+ type: int
+ always_compare_med:
+ description: Allow comparing MED from different neighbors
+ type: bool
+ asnotation:
+ description:
+ - Change the default asplain notation
+ - asdot notation
+ type: bool
+ bestpath:
+ description: Change the default bestpath selection
+ type: list
+ elements: dict
+ suboptions:
+ aigp:
+ description:
+ - if both paths doesn't have aigp ignore on bestpath comparision
+ - ignore
+ type: bool
+ compare_routerid:
+ description: Compare router-id for identical EBGP paths
+ type: bool
+ cost_community:
+ description: cost community
+ type: bool
+ igp_metric:
+ description:
+ - igp metric
+ - Ignore igp metric in bestpath selection
+ type: bool
+ med:
+ description: MED attribute
+ type: dict
+ suboptions:
+ confed:
+ description: Compare MED among confederation paths
+ type: bool
+ missing_as_worst:
+ description: Treat missing MED as the least preferred one
+ type: bool
+ client_to_client:
+ description: Configure client to client route reflection
+ type: dict
+ suboptions:
+ set:
+ description: set reflection of routes allowed
+ type: bool
+ all:
+ description: inter-cluster and intra-cluster (default)
+ type: bool
+ intra_cluster:
+ description:
+ - intra cluster reflection
+ - intra-cluster reflection for cluster-id
+ type: str
+ cluster_id:
+ description:
+ - Configure Route-Reflector Cluster-id (peers may reset)
+ - A.B.C.D/Please refer vendor documentation for valid Route-Reflector Cluster-id
+ type: bool
+ confederation:
+ description: AS confederation parameters
+ type: dict
+ suboptions:
+ identifier:
+ description:
+ - Set routing domain confederation AS
+ - AS number
+ type: str
+ peers:
+ description:
+ - Peer ASs in BGP confederation
+ - AS number
+ type: str
+ consistency_checker:
+ description: Consistency-checker
+ type: dict
+ suboptions:
+ auto_repair:
+ description: Auto-Repair
+ type: dict
+ suboptions:
+ set:
+ description: Enable Auto-Repair
+ type: bool
+ interval:
+ description:
+ - Set the bgp consistency checker
+ - Please refer vendor documentation for valid values
+ type: int
+ error_message:
+ description: Log Error-Msg
+ type: dict
+ suboptions:
+ set:
+ description: Enable Error-Msg
+ type: bool
+ interval:
+ description:
+ - Set the bgp consistency checker
+ - Please refer vendor documentation for valid values
+ type: int
+ dampening:
+ description: Enable route-flap dampening
+ type: dict
+ suboptions:
+ penalty_half_time:
+ description:
+ - Half-life time for the penalty
+ - Please refer vendor documentation for valid values
+ type: int
+ reuse_route_val:
+ description:
+ - Value to start reusing a route
+ - Please refer vendor documentation for valid values
+ type: int
+ suppress_route_val:
+ description:
+ - Value to start suppressing a route
+ - Please refer vendor documentation for valid values
+ type: int
+ max_suppress:
+ description:
+ - Maximum duration to suppress a stable route
+ - Please refer vendor documentation for valid values
+ type: int
+ route_map:
+ description: Route-map to specify criteria for dampening
+ type: str
+ deterministic_med:
+ description: Pick the best-MED path among paths advertised from the neighboring AS
+ type: bool
+ dmzlink_bw:
+ description: Use DMZ Link Bandwidth as weight for BGP multipaths
+ type: bool
+ enforce_first_as:
+ description: Enforce the first AS for EBGP routes(default)
+ type: bool
+ enhanced_error:
+ description: Enabled BGP Enhanced error handling
+ type: bool
+ fast_external_fallover:
+ description: Immediately reset session if a link to a directly connected external peer goes down
+ type: bool
+ graceful_restart:
+ description: Graceful restart capability parameters
+ type: dict
+ suboptions:
+ set:
+ description: Set Graceful-Restart
+ type: bool
+ extended:
+ description: Enable Graceful-Restart Extension
+ type: bool
+ restart_time:
+ description:
+ - Set the max time needed to restart and come back up
+ - Please refer vendor documentation for valid values
+ type: int
+ stalepath_time:
+ description:
+ - Set the max time to hold onto restarting peer's stale paths
+ - Please refer vendor documentation for valid values
+ type: int
+ graceful_shutdown:
+ description: Graceful shutdown capability parameters
+ type: dict
+ suboptions:
+ neighbors:
+ description: Gracefully shut down all neigbors
+ type: dict
+ suboptions:
+ time:
+ description:
+ - time in seconds
+ - Please refer vendor documentation for valid values
+ type: int
+ activate:
+ description: Activate graceful shutdown of all neigbors
+ type: bool
+ vrfs:
+ description: Gracefully shut down all vrf neigbors
+ type: dict
+ suboptions:
+ time:
+ description:
+ - time in seconds
+ - Please refer vendor documentation for valid values
+ type: int
+ activate:
+ description: Activate graceful shutdown of all neigbors
+ type: bool
+ community:
+ description:
+ - Set Community for Gshut routes
+ - community number/community number in aa:nn format
+ type: str
+ local_preference:
+ description:
+ - Set Local Preference for Gshut routes
+ - Please refer vendor documentation for valid values
+ type: int
+ inject_map:
+ description: Routemap which specifies prefixes to inject
+ type: dict
+ suboptions:
+ name:
+ description: route-map name
+ type: str
+ exist_map_name:
+ description: route-map name
+ type: str
+ copy_attributes:
+ description: Copy attributes from aggregate
+ type: bool
+ listen:
+ description: Neighbor subnet range listener
+ type: dict
+ suboptions:
+ limit:
+ description:
+ - Set the max limit for the dynamic subnet range neighbors
+ - Please refer vendor documentation for valid values
+ type: int
+ range:
+ description: Subnet network range
+ type: dict
+ suboptions:
+ ipv4_with_subnet:
+ description: IPv4 subnet range(A.B.C.D/nn)
+ type: str
+ ipv6_with_subnet:
+ description: IPv6 subnet range(X:X:X:X::X/<0-128>)
+ type: str
+ peer_group:
+ description: Member of the peer-group
+ type: str
+ log_neighbor_changes:
+ description: Log neighbor up/down and reset reason
+ type: bool
+ maxas_limit:
+ description:
+ - Allow AS-PATH attribute from any neighbor imposing a limit on number of ASes
+ - Please refer vendor documentation for valid values
+ type: int
+ maxcommunity_limit:
+ description:
+ - Allow COMMUNITY attribute from any neighbor imposing a limit on number of communities
+ - Please refer vendor documentation for valid values
+ type: int
+ maxextcommunity_limit:
+ description:
+ - Allow EXTENDED COMMUNITY attribute from any neighbor imposing a limit on number of extended communities
+ - Please refer vendor documentation for valid values
+ type: int
+ nexthop:
+ description: Nexthop tracking commands
+ type: dict
+ suboptions:
+ route_map:
+ description: Route map for valid nexthops
+ type: str
+ trigger:
+ description: nexthop trackings
+ type: dict
+ suboptions:
+ delay:
+ description:
+ - Set the delay to tigger nexthop tracking
+ - Please refer vendor documentation for valid values
+ type: int
+ enable:
+ description: Enable nexthop tracking
+ type: bool
+ nopeerup_delay:
+ description: Set how long BGP will wait for the first peer to come up before beginning the update delay or
+ graceful restart timers (in seconds)
+ type: list
+ elements: dict
+ suboptions:
+ cold_boot:
+ description:
+ - How long to wait for the first peer to come up upon a cold boot
+ - Please refer vendor documentation for valid values
+ type: int
+ nsf_switchover:
+ description:
+ - How long to wait for the first peer, post NSF switchover
+ - Please refer vendor documentation for valid values
+ type: int
+ post_boot:
+ description:
+ - How long to wait for the first peer to come up once the system is already
+ booted and all peers go down
+ - Please refer vendor documentation for valid values
+ type: int
+ user_initiated:
+ description:
+ - How long to wait for the first peer, post a manual clear of BGP peers by the admin user
+ - Please refer vendor documentation for valid values
+ type: int
+ recursion:
+ description:
+ - recursion rule for the nexthops
+ - recursion via host for the nexthops
+ type: bool
+ redistribute_internal:
+ description: Allow redistribution of iBGP into IGPs (dangerous)
+ type: bool
+ refresh:
+ description: refresh
+ type: dict
+ suboptions:
+ max_eor_time:
+ description:
+ - Configure refresh max-eor time
+ - Please refer vendor documentation for valid values
+ type: int
+ stalepath_time:
+ description:
+ - Configure refresh stale-path time
+ - Please refer vendor documentation for valid values
+ type: int
+ regexp:
+ description:
+ - Select regular expression engine
+ - Enable bounded-execution-time regular expression engine
+ type: bool
+ route_map:
+ description:
+ - route-map control commands
+ - Have route-map set commands take priority over BGP commands such as next-hop unchanged
+ type: bool
+ router_id:
+ description: Override configured router identifier (peers will reset)
+ type: dict
+ suboptions:
+ address:
+ description: Manually configured router identifier(A.B.C.D)
+ type: str
+ interface:
+ description: Use IPv4 address on interface
+ type: str
+ vrf:
+ description:
+ - vrf-specific router id configuration
+ - Automatically assign per-vrf bgp router id
+ type: bool
+ scan_time:
+ description:
+ - Configure background scanner interval
+ - Please refer vendor documentation for valid values
+ type: int
+ slow_peer:
+ description: Configure slow-peer
+ type: dict
+ suboptions:
+ detection:
+ description: Slow-peer detection
+ type: dict
+ suboptions:
+ set:
+ description: Slow-peer detection
+ type: bool
+ threshold:
+ description:
+ - Set the slow-peer detection threshold
+ - Please refer vendor documentation for valid values
+ type: int
+ split_update_group:
+ description: Configure slow-peer split-update-group
+ type: dict
+ suboptions:
+ dynamic:
+ description: Dynamically split the slow peer to slow-update group
+ type: bool
+ permanent:
+ description: Keep the slow-peer permanently in slow-update group
+ type: int
+ snmp:
+ description:
+ - BGP SNMP options
+ - BGP SNMP trap options
+ - Use cbgpPeer2Type as part of index for traps
+ type: bool
+ sso:
+ description:
+ - Stateful Switchover
+ - Enable SSO only for Route-Refresh capable peers
+ type: bool
+ soft_reconfig_backup:
+ description: Use soft-reconfiguration inbound only when route-refresh is not negotiated
+ type: bool
+ suppress_inactive:
+ description: Suppress routes that are not in the routing table
+ type: bool
+ transport:
+ description:
+ - Global enable/disable transport session parameters
+ - Transport path MTU discovery
+ type: bool
+ update_delay:
+ description:
+ - Set the max initial delay for sending update
+ - Please refer vendor documentation for valid values
+ type: int
+ update_group:
+ description:
+ - Manage peers in bgp update groups
+ - Split update groups based on Policy
+ - Keep peers with as-override in different update groups
+ type: bool
+ upgrade_cli:
+ description: Upgrade to hierarchical AFI mode
+ type: dict
+ suboptions:
+ set:
+ description: enable upgrade to hierarchical AFI mode
+ type: bool
+ af_mode:
+ description: Upgrade to AFI mode
+ type: bool
+ bmp:
+ description: BGP Monitoring Protocol)
+ type: dict
+ suboptions:
+ buffer_size:
+ description:
+ - BMP Buffer Size
+ - Please refer vendor documentation for valid values
+ type: int
+ initial_refresh:
+ description: Initial Refresh options
+ type: dict
+ suboptions:
+ delay:
+ description: Delay before Initial Refresh
+ type: int
+ skip:
+ description: skip all refreshes
+ type: bool
+ server:
+ description:
+ - Server Information
+ - Please refer vendor documentation for valid values
+ type: int
+ default_information:
+ description:
+ - Control distribution of default information
+ - Distribute a default route
+ type: bool
+ default_metric:
+ description:
+ - Set metric of redistributed routes
+ - Please refer vendor documentation for valid values
+ type: int
+ distance:
+ description: Define an administrative distance
+ type: dict
+ suboptions:
+ admin:
+ description: Administrative distance
+ type: dict
+ suboptions:
+ distance:
+ description:
+ - Administrative distance
+ - Please refer vendor documentation for valid values
+ type: int
+ address:
+ description: IP Source address (A.B.C.D)
+ type: str
+ wildcard_bit:
+ description: Wildcard bits (A.B.C.D)
+ type: str
+ acl:
+ description:
+ - IP Standard access list number
+ - IP Standard expanded access list number
+ - Standard access-list name
+ type: str
+ bgp:
+ description: BGP distance
+ type: dict
+ suboptions:
+ routes_external:
+ description:
+ - Distance for routes external to the AS
+ - Please refer vendor documentation for valid values
+ type: int
+ routes_internal:
+ description:
+ - Distance for routes internal to the AS
+ - Please refer vendor documentation for valid values
+ type: int
+ routes_local:
+ description:
+ - Distance for local routes
+ - Please refer vendor documentation for valid values
+ type: int
+ mbgp:
+ description: MBGP distance
+ type: dict
+ suboptions:
+ routes_external:
+ description:
+ - Distance for routes external to the AS
+ - Please refer vendor documentation for valid values
+ type: int
+ routes_internal:
+ description:
+ - Distance for routes internal to the AS
+ - Please refer vendor documentation for valid values
+ type: int
+ routes_local:
+ description:
+ - Distance for local routes
+ - Please refer vendor documentation for valid values
+ type: int
+ distribute_list:
+ description: Filter networks in routing updates
+ type: dict
+ suboptions:
+ acl:
+ description: IP access list number/name
+ type: str
+ in:
+ description: Filter incoming routing updates
+ type: bool
+ out:
+ description: Filter outgoing routing updates
+ type: bool
+ interface:
+ description: interface details
+ type: str
+ maximum_paths:
+ description: Forward packets over multiple paths
+ type: dict
+ suboptions:
+ paths:
+ description: Number of paths
+ type: int
+ eibgp:
+ description: Both eBGP and iBGP paths as multipath
+ type: int
+ ibgp:
+ description: iBGP-multipath
+ type: int
+ maximum_secondary_paths:
+ description: Maximum secondary paths
+ type: dict
+ suboptions:
+ paths:
+ description: Number of secondary paths
+ type: int
+ eibgp:
+ description: Both eBGP and iBGP paths as secondary multipath
+ type: int
+ ibgp:
+ description: iBGP-secondary-multipath
+ type: int
+ neighbor:
+ description: Specify a neighbor router
+ type: list
+ elements: dict
+ suboptions:
+ address:
+ description: Neighbor address (A.B.C.D)
+ type: str
+ tag:
+ description: Neighbor tag
+ type: str
+ ipv6_adddress:
+ description: Neighbor ipv6 address (X:X:X:X::X)
+ type: str
+ activate:
+ description: Enable the Address Family for this Neighbor
+ type: bool
+ additional_paths:
+ description: Negotiate additional paths capabilities with this neighbor
+ type: dict
+ suboptions:
+ disable:
+ description: Disable additional paths for this neighbor
+ type: bool
+ receive:
+ description: Receive additional paths from neighbors
+ type: bool
+ send:
+ description: Send additional paths to neighbors
+ type: bool
+ advertise:
+ description: Advertise to this neighbor
+ type: dict
+ suboptions:
+ additional_paths:
+ description: Advertise additional paths
+ type: dict
+ suboptions:
+ all:
+ description: Select all available paths
+ type: bool
+ best:
+ description: Select best N paths (2-3).
+ type: int
+ group_best:
+ description: Select group-best path
+ type: bool
+ best_external:
+ description: Advertise best-external (at RRs best-internal) path
+ type: bool
+ diverse_path:
+ description: Advertise additional paths
+ type: dict
+ suboptions:
+ backup:
+ description: Diverse path can be backup path
+ type: bool
+ mpath:
+ description: Diverse path can be multipath
+ type: bool
+ advertise_map:
+ description: specify route-map for conditional advertisement
+ type: dict
+ suboptions:
+ name:
+ description: advertise route-map name
+ type: str
+ exist_map:
+ description:
+ - advertise prefix only if prefix is in the condition exists
+ - condition route-map name
+ type: str
+ non_exist_map:
+ description:
+ - advertise prefix only if prefix in the condition does not exist
+ - condition route-map name
+ type: str
+ advertisement_interval:
+ description: Minimum interval between sending BGP routing updates
+ type: int
+ aigp:
+ description: AIGP on neighbor
+ type: dict
+ suboptions:
+ enable:
+ description: Enable AIGP
+ type: bool
+ send:
+ description: Cost community or MED carrying AIGP VALUE
+ type: dict
+ suboptions:
+ cost_community:
+ description: Cost extended community carrying AIGP Value
+ type: dict
+ suboptions:
+ id:
+ description:
+ - Community ID
+ - Please refer vendor documentation for valid values
+ type: int
+ poi:
+ description: Point of Insertion
+ type: dict
+ suboptions:
+ igp_cost:
+ description: Point of Insertion After IGP
+ type: bool
+ pre_bestpath:
+ description: Point of Insertion At Beginning
+ type: bool
+ transitive:
+ description: Cost community is Transitive
+ type: bool
+ med:
+ description: Med carrying AIGP Value
+ type: bool
+ allow_policy:
+ description: Enable the policy support for this IBGP Neighbor
+ type: bool
+ allowas_in:
+ description: Accept as-path with my AS present in it
+ type: int
+ as_override:
+ description:
+ - Override matching AS-number while sending update
+ - Maintain Split Horizon while sending update
+ type: bool
+ bmp_activate:
+ description: Activate the BMP monitoring for a BGP peer
+ type: dict
+ suboptions:
+ all:
+ description: Activate BMP monitoring for all servers
+ type: bool
+ server:
+ description:
+ - Activate BMP for server
+ - BMP Server Number
+ - Please refer vendor documentation for valid values
+ type: int
+ capability:
+ description:
+ - Advertise capability to the peer
+ - Advertise ORF capability to the peer
+ - Advertise prefixlist ORF capability to this neighbor
+ type: dict
+ suboptions:
+ both:
+ description: Capability to SEND and RECEIVE the ORF to/from this neighbor
+ type: bool
+ receive:
+ description: Capability to RECEIVE the ORF from this neighbor
+ type: bool
+ send:
+ description: Capability to SEND the ORF to this neighbor
+ type: bool
+ cluster_id:
+ description:
+ - Configure Route-Reflector Cluster-id (peers may reset)
+ - Route-Reflector Cluster-id as 32 bit quantity, or
+ Route-Reflector Cluster-id in IP address format (A.B.C.D)
+ type: str
+ default_originate:
+ description: Originate default route to this neighbor
+ type: dict
+ suboptions:
+ set:
+ description: Originate default route to this neighbor
+ type: bool
+ route_map:
+ description: Route-map to specify criteria to originate default
+ type: str
+ description:
+ description: Neighbor specific description
+ type: str
+ disable_connected_check:
+ description: one-hop away EBGP peer using loopback address
+ type: bool
+ distribute_list:
+ description: Filter updates to/from this neighbor
+ type: dict
+ suboptions:
+ acl:
+ description: IP access list number/name
+ type: str
+ in:
+ description: Filter incoming updates
+ type: bool
+ out:
+ description: Filter outgoing updates
+ type: bool
+ dmzlink_bw:
+ description: Propagate the DMZ link bandwidth
+ type: bool
+ ebgp_multihop:
+ description: Allow EBGP neighbors not on directly connected networks
+ type: dict
+ suboptions:
+ enable:
+ description: Allow EBGP neighbors not on directly connected networks
+ type: bool
+ hop_count:
+ description:
+ - Maximum hop count
+ - Please refer vendor documentation for valid values
+ type: int
+ fall_over:
+ description: Session fall on peer route lost
+ type: dict
+ suboptions:
+ bfd:
+ description: Use BFD to detect failure
+ type: dict
+ suboptions:
+ set:
+ description: set bfd
+ type: bool
+ multi_hop:
+ description: Force BFD multi-hop to detect failure
+ type: bool
+ single_hop:
+ description: Force BFD single-hop to detect failure
+ type: bool
+ route_map:
+ description: Route map for peer route
+ type: str
+ filter_list:
+ description: Establish BGP filters
+ type: dict
+ suboptions:
+ path_acl:
+ description: AS path access list
+ type: str
+ in:
+ description: Filter incoming updates
+ type: bool
+ out:
+ description: Filter outgoing updates
+ type: bool
+ ha_mode:
+ description: high availability mode
+ type: dict
+ suboptions:
+ set:
+ description: set ha-mode and graceful-restart for this peer
+ type: bool
+ disable:
+ description: disable graceful-restart
+ type: bool
+ inherit:
+ description:
+ - Inherit a template
+ - Inherit a peer-session template and Template name
+ type: str
+ local_as:
+ description: Specify a local-as number
+ type: dict
+ suboptions:
+ set:
+ description: set local-as number
+ type: bool
+ number:
+ description:
+ - AS number used as local AS
+ - Please refer vendor documentation for valid values
+ type: int
+ dual_as:
+ description: Accept either real AS or local AS from the ebgp peer
+ type: bool
+ no_prepend:
+ description: Do not prepend local-as to updates from ebgp peers
+ type: dict
+ suboptions:
+ set:
+ description: Set prepend
+ type: bool
+ replace_as:
+ description: Replace real AS with local AS in the EBGP updates
+ type: bool
+ log_neighbor_changes:
+ description: Log neighbor up/down and reset reason
+ type: dict
+ suboptions:
+ set:
+ description: set Log neighbor up/down and reset
+ type: bool
+ disable:
+ description: disable Log neighbor up/down and reset
+ type: bool
+ maximum_prefix:
+ description: Maximum number of prefixes accepted from this peer
+ type: dict
+ suboptions:
+ max_no:
+ description: maximum no. of prefix limit
+ type: int
+ threshold_val:
+ description: Threshold value (%) at which to generate a warning msg
+ type: int
+ restart:
+ description: Restart bgp connection after limit is exceeded
+ type: int
+ warning_only:
+ description: Only give warning message when limit is exceeded
+ type: bool
+ next_hop_self:
+ description: Disable the next hop calculation for this neighbor
+ type: dict
+ suboptions:
+ set:
+ description: Enable next-hop-self
+ type: bool
+ all:
+ description: Enable next-hop-self for both eBGP and iBGP received paths
+ type: bool
+ next_hop_unchanged:
+ description:
+ - Propagate next hop unchanged for iBGP paths to this neighbor
+ - Propagate next hop unchanged for all paths (iBGP and eBGP) to this neighbor
+ type: dict
+ suboptions:
+ set:
+ description: Enable next-hop-unchanged
+ type: bool
+ allpaths:
+ description: Propagate next hop unchanged for all paths (iBGP and eBGP) to this neighbor
+ type: bool
+ password:
+ description: Set a password
+ type: str
+ path_attribute:
+ description: BGP optional attribute filtering
+ type: dict
+ suboptions:
+ discard:
+ description: Discard matching path-attribute for this neighbor
+ type: dict
+ suboptions:
+ type:
+ description:
+ - path attribute type
+ - Please refer vendor documentation for valid values
+ type: int
+ range:
+ description: path attribute range
+ type: dict
+ suboptions:
+ start:
+ description:
+ - path attribute range start value
+ - Please refer vendor documentation for valid values
+ type: int
+ end:
+ description:
+ - path attribute range end value
+ - Please refer vendor documentation for valid values
+ type: int
+ in:
+ description: Perform inbound path-attribute filtering
+ type: bool
+ treat_as_withdraw:
+ description: Treat-as-withdraw matching path-attribute for this neighbor
+ type: dict
+ suboptions:
+ type:
+ description:
+ - path attribute type
+ - Please refer vendor documentation for valid values
+ type: int
+ range:
+ description: path attribute range
+ type: dict
+ suboptions:
+ start:
+ description:
+ - path attribute range start value
+ - Please refer vendor documentation for valid values
+ type: int
+ end:
+ description:
+ - path attribute range end value
+ - Please refer vendor documentation for valid values
+ type: int
+ in:
+ description: Perform inbound path-attribute filtering
+ type: bool
+ peer_group:
+ description: Member of the peer-group
+ type: str
+ remote_as:
+ description:
+ - Specify a BGP neighbor
+ - AS of remote neighbor
+ type: int
+ remove_private_as:
+ description: Remove private AS number from outbound updates
+ type: dict
+ suboptions:
+ set:
+ description: Remove private AS number
+ type: bool
+ all:
+ description: Remove all private AS numbers
+ type: bool
+ replace_as:
+ description: Replace all private AS numbers with local AS
+ type: bool
+ route_map:
+ description: Apply route map to neighbor
+ type: dict
+ suboptions:
+ name:
+ description: Replace all private AS numbers with local AS
+ type: str
+ in:
+ description: Apply map to incoming routes
+ type: bool
+ out:
+ description: Apply map to outbound routes
+ type: bool
+ route_reflector_client:
+ description: Configure a neighbor as Route Reflector client
+ type: bool
+ route_server_client:
+ description: Configure a neighbor as Route Server client
+ type: dict
+ suboptions:
+ set:
+ description: Set Route Server client
+ type: bool
+ context:
+ description:
+ - Specify Route Server context for neighbor
+ - Route Server context name
+ type: str
+ send_community:
+ description: Send Community attribute to this neighbor
+ type: dict
+ suboptions:
+ set:
+ description: Set send Community attribute to this neighbor
+ type: bool
+ both:
+ description: Send Standard and Extended Community attributes
+ type: bool
+ extended:
+ description: Send Extended Community attribute
+ type: bool
+ standard:
+ description: Send Standard Community attribute
+ type: bool
+ send_label:
+ description: Send NLRI + MPLS Label to this peer
+ type: dict
+ suboptions:
+ set:
+ description: Set send NLRI + MPLS Label to this peer
+ type: bool
+ explicit_null:
+ description: Advertise Explicit Null label in place of Implicit Null
+ type: bool
+ shutdown:
+ description: Administratively shut down this neighbor
+ type: dict
+ suboptions:
+ set:
+ description: shut down
+ type: bool
+ graceful:
+ description:
+ - Gracefully shut down this neighbor
+ - time in seconds
+ - Please refer vendor documentation for valid values
+ type: int
+ slow_peer:
+ description: Configure slow-peer
+ type: dict
+ suboptions:
+ detection:
+ description: Configure slow-peer
+ type: dict
+ suboptions:
+ enable:
+ description: Enable slow-peer detection
+ type: bool
+ disable:
+ description: Disable slow-peer detection
+ type: bool
+ threshold:
+ description: Set the slow-peer detection threshold
+ type: int
+ split_update_group:
+ description: Configure slow-peer split-update-group
+ type: dict
+ suboptions:
+ dynamic:
+ description: Dynamically split the slow peer to slow-update group
+ type: dict
+ suboptions:
+ enable:
+ description: Enable slow-peer detection
+ type: bool
+ disable:
+ description: Disable slow-peer detection
+ type: bool
+ permanent:
+ description: Keep the slow-peer permanently in slow-update group
+ type: bool
+ static:
+ description: Static slow-peer
+ type: bool
+ soft_reconfiguration:
+ description:
+ - Per neighbor soft reconfiguration
+ - Allow inbound soft reconfiguration for this neighbor
+ type: bool
+ timers:
+ description: BGP per neighbor timers
+ type: dict
+ suboptions:
+ interval:
+ description: Keepalive interval
+ type: int
+ holdtime:
+ description: Holdtime
+ type: int
+ min_holdtime:
+ description: Minimum hold time from neighbor
+ type: int
+ translate_update:
+ description: Translate Update to MBGP format
+ type: dict
+ suboptions:
+ set:
+ description: Set Translate Update
+ type: bool
+ nlri:
+ description: Specify type of nlri to translate to
+ type: dict
+ suboptions:
+ multicast:
+ description: Translate Update to multicast nlri
+ type: bool
+ unicast:
+ description: Process Update as unicast nlri
+ type: bool
+ transport:
+ description: Transport options
+ type: dict
+ suboptions:
+ connection_mode:
+ description: Specify passive or active connection
+ type: dict
+ suboptions:
+ active:
+ description: Actively establish the TCP session
+ type: bool
+ passive:
+ description: Passively establish the TCP session
+ type: bool
+ multi_session:
+ description: Use Multi-session for transport
+ type: bool
+ path_mtu_discovery:
+ description: Use transport path MTU discovery
+ type: dict
+ suboptions:
+ set:
+ description: Use path MTU discovery
+ type: bool
+ disable:
+ description: disable
+ type: bool
+ ttl_security:
+ description:
+ - BGP ttl security check
+ - maximum number of hops
+ - Please refer vendor documentation for valid values
+ type: int
+ unsuppress_map:
+ description:
+ - Route-map to selectively unsuppress suppressed routes
+ - Name of route map
+ type: str
+ version:
+ description:
+ - Set the BGP version to match a neighbor
+ - Neighbor's BGP version
+ - Please refer vendor documentation for valid values
+ type: int
+ weight:
+ description: Set default weight for routes from this neighbor
+ type: int
+ redistribute:
+ description: Redistribute information from another routing protocol
+ type: list
+ elements: dict
+ suboptions:
+ application:
+ description: Application
+ type: dict
+ suboptions:
+ name:
+ description: Application name
+ type: str
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ route_map:
+ description: Route map reference
+ type: str
+ bgp:
+ description: Border Gateway Protocol (BGP)
+ type: dict
+ suboptions:
+ as_number:
+ description: Autonomous system number
+ type: str
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ route_map:
+ description: Route map reference
+ type: str
+ connected:
+ description: Connected
+ type: dict
+ suboptions:
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ route_map:
+ description: Route map reference
+ type: str
+ eigrp:
+ description: Enhanced Interior Gateway Routing Protocol (EIGRP)
+ type: dict
+ suboptions:
+ as_number:
+ description: Autonomous system number
+ type: str
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ route_map:
+ description: Route map reference
+ type: str
+ isis:
+ description: ISO IS-IS
+ type: dict
+ suboptions:
+ area_tag:
+ description: ISO routing area tag
+ type: str
+ clns:
+ description: Redistribution of OSI dynamic routes
+ type: bool
+ ip:
+ description: Redistribution of IP dynamic routes
+ type: bool
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ route_map:
+ description: Route map reference
+ type: str
+ iso_igrp:
+ description: IGRP for OSI networks
+ type: dict
+ suboptions:
+ area_tag:
+ description: ISO routing area tag
+ type: str
+ route_map:
+ description: Route map reference
+ type: str
+ lisp:
+ description: Locator ID Separation Protocol (LISP)
+ type: dict
+ suboptions:
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ route_map:
+ description: Route map reference
+ type: str
+ mobile:
+ description: Mobile routes
+ type: dict
+ suboptions:
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ route_map:
+ description: Route map reference
+ type: str
+ odr:
+ description: On Demand stub Routes
+ type: dict
+ suboptions:
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ route_map:
+ description: Route map reference
+ type: str
+ ospf:
+ description: Open Shortest Path First (OSPF)
+ type: dict
+ suboptions:
+ process_id:
+ description: Process ID
+ type: int
+ match:
+ description: On Demand stub Routes
+ type: dict
+ suboptions:
+ external:
+ description: Redistribute OSPF external routes
+ type: bool
+ internal:
+ description: Redistribute OSPF internal routes
+ type: bool
+ nssa_external:
+ description: Redistribute OSPF NSSA external routes
+ type: bool
+ type_1:
+ description: Redistribute NSSA external type 1 routes
+ type: bool
+ type_2:
+ description: Redistribute NSSA external type 2 routes
+ type: bool
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ route_map:
+ description: Route map reference
+ type: str
+ vrf:
+ description: VPN Routing/Forwarding Instance
+ type: str
+ ospfv3:
+ description: OSPFv3
+ type: dict
+ suboptions:
+ process_id:
+ description: Process ID
+ type: int
+ match:
+ description: On Demand stub Routes
+ type: dict
+ suboptions:
+ external:
+ description: Redistribute OSPF external routes
+ type: bool
+ internal:
+ description: Redistribute OSPF internal routes
+ type: bool
+ nssa_external:
+ description: Redistribute OSPF NSSA external routes
+ type: bool
+ type_1:
+ description: Redistribute NSSA external type 1 routes
+ type: bool
+ type_2:
+ description: Redistribute NSSA external type 2 routes
+ type: bool
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ route_map:
+ description: Route map reference
+ type: str
+ rip:
+ description: Routing Information Protocol (RIP)
+ type: dict
+ suboptions:
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ route_map:
+ description: Route map reference
+ type: str
+ static:
+ description: Static routes
+ type: dict
+ suboptions:
+ clns:
+ description: Redistribution of OSI static routes
+ type: bool
+ ip:
+ description: Redistribution of IP static routes
+ type: bool
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ route_map:
+ description: Route map reference
+ type: str
+ vrf:
+ description: Specify a source VRF
+ type: dict
+ suboptions:
+ name:
+ description: Source VRF name
+ type: str
+ global:
+ description: global VRF
+ type: bool
+ route_server_context:
+ description: Enter route server context command mode
+ type: dict
+ suboptions:
+ name:
+ description: Name of route server context
+ type: str
+ address_family:
+ description: Enter address family command mode
+ type: dict
+ suboptions:
+ afi:
+ description: Address family
+ type: str
+ choices: ['ipv4', 'ipv6']
+ modifier:
+ description: Address Family modifier
+ type: str
+ choices: ['multicast', 'unicast']
+ import_map:
+ description:
+ - Import matching routes using a route map
+ - Name of route map
+ type: str
+ description:
+ description: Textual description of the router server context
+ type: str
+ scope:
+ description: Enter scope command mode
+ type: dict
+ suboptions:
+ global:
+ description: Global scope
+ type: bool
+ vrf:
+ description:
+ - VRF scope
+ - VPN Routing/Forwarding instance name
+ type: str
+ synchronization:
+ description: Perform IGP synchronization
+ type: bool
+ table_map:
+ description: Map external entry attributes into routing table
+ type: dict
+ suboptions:
+ name:
+ description: route-map name
+ type: str
+ filter:
+ description: Selective route download
+ type: bool
+ template:
+ description: Enter template command mode
+ type: dict
+ suboptions:
+ peer_policy:
+ description: Template configuration for policy parameters
+ type: str
+ peer_session:
+ description: Template configuration for session parameters
+ type: str
+ timers:
+ description:
+ - Adjust routing timers
+ - BGP timers
+ type: dict
+ suboptions:
+ keepalive:
+ description: Keepalive interval
+ type: int
+ holdtime:
+ description: Holdtime
+ type: int
+ min_holdtime:
+ description: Minimum hold time from neighbor
+ type: int
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS
+ device by executing the command B(sh running-config | section ^router bgp).
+ - The state I(parsed) reads the configuration from C(running_config)
+ option and transforms it into Ansible structured data as per the
+ resource module's argspec and the value is then returned in the
+ I(parsed) key within the result.
+ type: str
+ state:
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - purged
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | section ^router bgp
+
+- name: Merge provided configuration with device configuration
+ cisco.ios.ios_bgp_global:
+ config:
+ as_number: 65000
+ bgp:
+ advertise_best_external: true
+ bestpath:
+ - compare_routerid: true
+ nopeerup_delay:
+ - post_boot: 10
+ dampening:
+ penalty_half_time: 1
+ reuse_route_val: 1
+ suppress_route_val: 1
+ max_suppress: 1
+ graceful_shutdown:
+ neighbors:
+ time: 50
+ community: 100
+ local_preference: 100
+ neighbor:
+ - address: 198.51.100.1
+ description: merge neighbor
+ remote_as: 100
+ aigp:
+ send:
+ cost_community:
+ id: 100
+ poi:
+ igp_cost: true
+ transitive: true
+ route_map:
+ name: test-route
+ out: true
+ state: merged
+
+# Commands fired:
+# ---------------
+#
+# "commands": [
+# "router bgp 65000",
+# "bgp dampening 1 1 1 1",
+# "bgp graceful-shutdown all neighbors 50 community 100 local-preference 100",
+# "bgp advertise-best-external",
+# "bgp nopeerup-delay post-boot 10",
+# "bgp bestpath compare-routerid",
+# "neighbor 198.51.100.1 remote-as 100",
+# "neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
+# "neighbor 198.51.100.1 description merge neighbor",
+# "neighbor 198.51.100.1 route-map test-route out"
+# ]
+
+# After state:
+# ------------
+#
+# vios#sh running-config | section ^router bgp
+# router bgp 65000
+# bgp nopeerup-delay post-boot 10
+# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+# bgp bestpath compare-routerid
+# bgp dampening 1 1 1 1
+# bgp advertise-best-external
+# neighbor 198.51.100.1 remote-as 100
+# neighbor 198.51.100.1 description merge neighbor
+# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+# neighbor 198.51.100.1 route-map test-route out
+
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | section ^router bgp
+# router bgp 65000
+# bgp nopeerup-delay post-boot 10
+# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+# bgp bestpath compare-routerid
+# bgp dampening 1 1 1 1
+# bgp advertise-best-external
+# neighbor 198.51.100.1 remote-as 100
+# neighbor 198.51.100.1 description merge neighbor
+# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+# neighbor 198.51.100.1 route-map test-route out
+
+
+- name: Replaces device configuration of listed global BGP with provided configuration
+ cisco.ios.ios_bgp_global:
+ config:
+ as_number: 65000
+ bgp:
+ advertise_best_external: true
+ bestpath:
+ - med:
+ confed: true
+ log_neighbor_changes: true
+ nopeerup_delay:
+ - post_boot: 10
+ cold_boot: 20
+ neighbor:
+ - address: 192.0.2.1
+ description: replace neighbor
+ remote_as: 100
+ slow_peer:
+ detection:
+ disable: true
+ state: replaced
+
+# Commands fired:
+# ---------------
+#
+# "commands": [
+# "router bgp 65000"
+# "no bgp dampening 1 1 1 1"
+# "no timers bgp 100 200 150"
+# "no bgp bestpath compare-routerid"
+# "bgp bestpath med confed"
+# "bgp nopeerup-delay cold-boot 20"
+# "no neighbor 198.51.100.1 remote-as 100"
+# "neighbor 192.0.2.1 remote-as 100"
+# "no bgp graceful-shutdown all neighbors 50 local-preference 100 community 100"
+# "no neighbor 198.51.100.1 route-map test-route out"
+# "no neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive"
+# "no neighbor 198.51.100.1 description merge neighbor"
+# "neighbor 192.0.2.1 slow-peer detection disable"
+# "neighbor 192.0.2.1 description replace neighbor"
+# ]
+
+
+# After state:
+# -------------
+#
+# vios#sh running-config | section ^router bgp
+# router bgp 65000
+# bgp log-neighbor-changes
+# bgp nopeerup-delay cold-boot 20
+# bgp nopeerup-delay post-boot 10
+# bgp bestpath med confed
+# bgp advertise-best-external
+# redistribute connected metric 10
+# neighbor 192.0.2.1 remote-as 100
+# neighbor 192.0.2.1 description replace neighbor
+# neighbor 192.0.2.1 slow-peer detection disable
+
+# Using Deleted
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | section ^router bgp
+# router bgp 65000
+# bgp nopeerup-delay post-boot 10
+# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+# bgp bestpath compare-routerid
+# bgp dampening 1 1 1 1
+# bgp advertise-best-external
+# neighbor 198.51.100.1 remote-as 100
+# neighbor 198.51.100.1 description merge neighbor
+# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+# neighbor 198.51.100.1 route-map test-route out
+
+- name: "Delete global BGP (Note: This won't delete the configured global BGP)"
+ cisco.ios.ios_bgp_global:
+ config:
+ as_number: 65000
+ state: deleted
+
+# Commands fired:
+# ---------------
+# "commands": [
+# "router bgp 65000",
+# "no bgp dampening 1 1 1 1",
+# "no bgp graceful-shutdown all neighbors 50 community 100 local-preference 100",
+# "no bgp advertise-best-external",
+# "no bgp bestpath compare-routerid",
+# "no bgp nopeerup-delay post-boot 10",
+# "no neighbor 198.51.100.1 remote-as 100",
+# "no neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
+# "no neighbor 198.51.100.1 description merge neighbor",
+# "no neighbor 198.51.100.1 route-map test-route out"
+# ]
+
+
+# After state:
+# -------------
+#
+# vios#sh running-config | section ^router bgp
+# router bgp 65000
+
+
+# Using Deleted without any config passed
+#"(NOTE: This will delete all of configured global BGP)"
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | section ^router bgp
+# router bgp 65000
+# bgp nopeerup-delay post-boot 10
+# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+# bgp bestpath compare-routerid
+# bgp dampening 1 1 1 1
+# bgp advertise-best-external
+# neighbor 198.51.100.1 remote-as 100
+# neighbor 198.51.100.1 description merge neighbor
+# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+# neighbor 198.51.100.1 route-map test-route out
+
+
+- name: "Delete global BGP without config"
+ cisco.ios.ios_bgp_global:
+ state: deleted
+
+# Commands fired:
+# ---------------
+# "commands": [
+# "router bgp 65000",
+# "no bgp dampening 1 1 1 1",
+# "no bgp graceful-shutdown all neighbors 50 community 100 local-preference 100",
+# "no bgp advertise-best-external",
+# "no bgp bestpath compare-routerid",
+# "no bgp nopeerup-delay post-boot 10",
+# "no neighbor 198.51.100.1 remote-as 100",
+# "no neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
+# "no neighbor 198.51.100.1 description merge neighbor",
+# "no neighbor 198.51.100.1 route-map test-route out"
+# ]
+
+
+# After state:
+# -------------
+#
+# vios#sh running-config | section ^router bgp
+# router bgp 65000
+
+# Using Purged
+#"(NOTE: This WILL delete the configured global BGP)"
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | section ^router bgp
+# router bgp 65000
+# bgp nopeerup-delay post-boot 10
+# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+# bgp bestpath compare-routerid
+# bgp dampening 1 1 1 1
+# bgp advertise-best-external
+# neighbor 198.51.100.1 remote-as 100
+# neighbor 198.51.100.1 description merge neighbor
+# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+# neighbor 198.51.100.1 route-map test-route out
+
+
+- name: 'Delete the configured global BGP (Note: This WILL delete the the configured
+ global BGP)'
+ cisco.ios.ios_bgp_global:
+ state: purged
+
+# Commands fired:
+# ---------------
+# "commands": [
+# "no router bgp 65000",
+# ]
+
+# After state:
+# -------------
+#
+# vios#sh running-config | section ^router bgp
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | section ^router bgp
+# router bgp 65000
+# bgp nopeerup-delay post-boot 10
+# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+# bgp bestpath compare-routerid
+# bgp dampening 1 1 1 1
+# bgp advertise-best-external
+# neighbor 198.51.100.1 remote-as 100
+# neighbor 198.51.100.1 description merge neighbor
+# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+# neighbor 198.51.100.1 route-map test-route out
+
+
+- name: Gather listed global BGP with provided configurations
+ cisco.ios.ios_bgp_global:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": {
+# "as_number": "65000",
+# "bgp": {
+# "advertise_best_external": true,
+# "bestpath": [
+# {
+# "compare_routerid": true
+# }
+# ],
+# "dampening": {
+# "max_suppress": 1,
+# "penalty_half_time": 1,
+# "reuse_route_val": 1,
+# "suppress_route_val": 1
+# },
+# "graceful_shutdown": {
+# "community": "100",
+# "local_preference": 100,
+# "neighbors": {
+# "time": 50
+# }
+# },
+# "nopeerup_delay": [
+# {
+# "post_boot": 10
+# }
+# ]
+# },
+# "neighbor": [
+# {
+# "address": "198.51.100.1",
+# "aigp": {
+# "send": {
+# "cost_community": {
+# "id": 100,
+# "poi": {
+# "igp_cost": true,
+# "transitive": true
+# }
+# }
+# }
+# },
+# "description": "merge neighbor",
+# "remote_as": 100,
+# "route_map": {
+# "name": "test-route",
+# "out": true
+# }
+# }
+# ]
+# }
+
+# Using Rendered
+
+- name: Rendered the provided configuration with the exisiting running configuration
+ cisco.ios.ios_bgp_global:
+ config:
+ as_number: 65000
+ bgp:
+ advertise_best_external: true
+ bestpath:
+ - compare_routerid: true
+ nopeerup_delay:
+ - post_boot: 10
+ dampening:
+ penalty_half_time: 1
+ reuse_route_val: 1
+ suppress_route_val: 1
+ max_suppress: 1
+ graceful_shutdown:
+ neighbors:
+ time: 50
+ community: 100
+ local_preference: 100
+ neighbor:
+ - address: 198.51.100.1
+ description: merge neighbor
+ remote_as: 100
+ aigp:
+ send:
+ cost_community:
+ id: 100
+ poi:
+ igp_cost: true
+ transitive: true
+ route_map:
+ name: test-route
+ out: true
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "router bgp 65000",
+# "bgp dampening 1 1 1 1",
+# "bgp graceful-shutdown all neighbors 50 community 100 local-preference 100",
+# "bgp advertise-best-external",
+# "bgp nopeerup-delay post-boot 10",
+# "bgp bestpath compare-routerid",
+# "neighbor 198.51.100.1 remote-as 100",
+# "neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
+# "neighbor 198.51.100.1 description merge neighbor",
+# "neighbor 198.51.100.1 route-map test-route out"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# router bgp 65000
+# bgp nopeerup-delay post-boot 10
+# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+# bgp bestpath compare-routerid
+# bgp dampening 1 1 1 1
+# bgp advertise-best-external
+# neighbor 198.51.100.1 remote-as 100
+# neighbor 198.51.100.1 description merge neighbor
+# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+# neighbor 198.51.100.1 route-map test-route out
+
+- name: Parse the commands for provided configuration
+ cisco.ios.ios_bgp_global:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": {
+# "as_number": "65000",
+# "bgp": {
+# "advertise_best_external": true,
+# "bestpath": [
+# {
+# "compare_routerid": true
+# }
+# ],
+# "dampening": {
+# "max_suppress": 1,
+# "penalty_half_time": 1,
+# "reuse_route_val": 1,
+# "suppress_route_val": 1
+# },
+# "graceful_shutdown": {
+# "community": "100",
+# "local_preference": 100,
+# "neighbors": {
+# "time": 50
+# }
+# },
+# "nopeerup_delay": [
+# {
+# "post_boot": 10
+# }
+# ]
+# },
+# "neighbor": [
+# {
+# "address": "198.51.100.1",
+# "aigp": {
+# "send": {
+# "cost_community": {
+# "id": 100,
+# "poi": {
+# "igp_cost": true,
+# "transitive": true
+# }
+# }
+# }
+# },
+# "description": "merge neighbor",
+# "remote_as": 100,
+# "route_map": {
+# "name": "test-route",
+# "out": true
+# }
+# }
+# ]
+# }
+
+"""
+
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ["router bgp 65000", "bgp nopeerup-delay post-boot 10", "bgp advertise-best-external"]
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.bgp_global.bgp_global import (
+ Bgp_globalArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.bgp_global.bgp_global import (
+ Bgp_global,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=Bgp_globalArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = Bgp_global(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_command.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_command.py
new file mode 100644
index 00000000..7c502974
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_command.py
@@ -0,0 +1,215 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_command
+author: Peter Sprygada (@privateip)
+short_description: Run commands on remote devices running Cisco IOS
+description:
+- Sends arbitrary commands to an ios node and returns the results read from the device.
+ This module includes an argument that will cause the module to wait for a specific
+ condition before returning or timing out if the condition is not met.
+- This module does not support running commands in configuration mode. Please use
+ M(ios_config) to configure IOS devices.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.ios.ios
+notes:
+- Tested against IOS 15.6
+options:
+ commands:
+ description:
+ - List of commands to send to the remote ios device over the configured provider.
+ The resulting output from the command is returned. If the I(wait_for) argument
+ is provided, the module is not returned until the condition is satisfied or
+ the number of retries has expired. If a command sent to the device requires
+ answering a prompt, it is possible to pass a dict containing I(command), I(answer)
+ and I(prompt). Common answers are 'y' or "\\r" (carriage return, must be double
+ quotes). See examples.
+ required: true
+ type: list
+ elements: raw
+ wait_for:
+ description:
+ - List of conditions to evaluate against the output of the command. The task will
+ wait for each condition to be true before moving forward. If the conditional
+ is not true within the configured number of retries, the task fails. See examples.
+ aliases:
+ - waitfor
+ type: list
+ elements: str
+ match:
+ description:
+ - The I(match) argument is used in conjunction with the I(wait_for) argument to
+ specify the match policy. Valid values are C(all) or C(any). If the value
+ is set to C(all) then all conditionals in the wait_for must be satisfied. If
+ the value is set to C(any) then only one of the values must be satisfied.
+ default: all
+ type: str
+ choices:
+ - any
+ - all
+ retries:
+ description:
+ - Specifies the number of retries a command should by tried before it is considered
+ failed. The command is run on the target device every retry and evaluated against
+ the I(wait_for) conditions.
+ default: 10
+ type: int
+ interval:
+ description:
+ - Configures the interval in seconds to wait between retries of the command. If
+ the command does not pass the specified conditions, the interval indicates how
+ long to wait before trying the command again.
+ default: 1
+ type: int
+"""
+EXAMPLES = """
+- name: run show version on remote devices
+ cisco.ios.ios_command:
+ commands: show version
+
+- name: run show version and check to see if output contains IOS
+ cisco.ios.ios_command:
+ commands: show version
+ wait_for: result[0] contains IOS
+
+- name: run multiple commands on remote nodes
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ - show interfaces
+
+- name: run multiple commands and evaluate the output
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ - show interfaces
+ wait_for:
+ - result[0] contains IOS
+ - result[1] contains Loopback0
+
+- name: run commands that require answering a prompt
+ cisco.ios.ios_command:
+ commands:
+ - command: clear counters GigabitEthernet0/1
+ prompt: Clear "show interface" counters on this interface [confirm]
+ answer: y
+ - command: clear counters GigabitEthernet0/2
+ prompt: '[confirm]'
+ answer: '\r'
+"""
+RETURN = """
+stdout:
+ description: The set of responses from the commands
+ returned: always apart from low level errors (such as action plugin)
+ type: list
+ sample: ['...', '...']
+stdout_lines:
+ description: The value of stdout split into a list
+ returned: always apart from low level errors (such as action plugin)
+ type: list
+ sample: [['...', '...'], ['...'], ['...']]
+failed_conditions:
+ description: The list of conditionals that have failed
+ returned: failed
+ type: list
+ sample: ['...', '...']
+"""
+import time
+from ansible.module_utils._text import to_text
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.parsing import (
+ Conditional,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ transform_commands,
+ to_lines,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ run_commands,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+
+
+def parse_commands(module, warnings):
+ commands = transform_commands(module)
+ if module.check_mode:
+ for item in list(commands):
+ if not item["command"].startswith("show"):
+ warnings.append(
+ "Only show commands are supported when using check mode, not executing %s"
+ % item["command"]
+ )
+ commands.remove(item)
+ return commands
+
+
+def main():
+ """main entry point for module execution
+ """
+ argument_spec = dict(
+ commands=dict(type="list", elements="raw", required=True),
+ wait_for=dict(type="list", elements="str", aliases=["waitfor"]),
+ match=dict(default="all", choices=["all", "any"]),
+ retries=dict(default=10, type="int"),
+ interval=dict(default=1, type="int"),
+ )
+ argument_spec.update(ios_argument_spec)
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+ warnings = list()
+ result = {"changed": False, "warnings": warnings}
+ commands = parse_commands(module, warnings)
+ wait_for = module.params["wait_for"] or list()
+ try:
+ conditionals = [Conditional(c) for c in wait_for]
+ except AttributeError as exc:
+ module.fail_json(msg=to_text(exc))
+ retries = module.params["retries"]
+ interval = module.params["interval"]
+ match = module.params["match"]
+ while retries > 0:
+ responses = run_commands(module, commands)
+ for item in list(conditionals):
+ if item(responses):
+ if match == "any":
+ conditionals = list()
+ break
+ conditionals.remove(item)
+ if not conditionals:
+ break
+ time.sleep(interval)
+ retries -= 1
+ if conditionals:
+ failed_conditions = [item.raw for item in conditionals]
+ msg = "One or more conditional statements have not been satisfied"
+ module.fail_json(msg=msg, failed_conditions=failed_conditions)
+ result.update(
+ {"stdout": responses, "stdout_lines": list(to_lines(responses))}
+ )
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_config.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_config.py
new file mode 100644
index 00000000..260b74b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_config.py
@@ -0,0 +1,593 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_config
+author: Peter Sprygada (@privateip)
+short_description: Manage Cisco IOS configuration sections
+description:
+- Cisco IOS configurations use a simple block indent file syntax for segmenting configuration
+ into sections. This module provides an implementation for working with IOS configuration
+ sections in a deterministic way.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.ios.ios
+notes:
+- Tested against IOS 15.6
+- Abbreviated commands are NOT idempotent, see L
+ (Network FAQ,../network/user_guide/faq.html#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands).
+- To ensure idempotency and correct diff the configuration lines in the relevant module options should be similar to how they
+ appear if present in the running configuration on device including the indentation.
+options:
+ lines:
+ description:
+ - The ordered set of commands that should be configured in the section. The commands
+ must be the exact same commands as found in the device running-config to ensure
+ idempotency and correct diff. Be sure to note the configuration command syntax as
+ some commands are automatically modified by the device config parser.
+ type: list
+ elements: str
+ aliases:
+ - commands
+ parents:
+ description:
+ - 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.
+ type: list
+ elements: str
+ src:
+ description:
+ - Specifies the source path to the file that contains the configuration or configuration
+ template to load. The path to the source file can either be the full path on
+ the Ansible control host or a relative path from the playbook or role root directory. This
+ argument is mutually exclusive with I(lines), I(parents). The configuration lines in the
+ source file should be similar to how it will appear if present in the running-configuration
+ of the device including the indentation to ensure idempotency and correct diff.
+ type: str
+ before:
+ description:
+ - The ordered set of commands to push on to the command stack if a change needs
+ to be made. This allows the playbook designer the opportunity to perform configuration
+ commands prior to pushing any changes without affecting how the set of commands
+ are matched against the system.
+ type: list
+ elements: str
+ after:
+ description:
+ - The ordered set of commands to append to the end of the command stack if a change
+ needs to be made. Just like with I(before) this allows the playbook designer
+ to append a set of commands to be executed after the command set.
+ type: list
+ elements: str
+ match:
+ description:
+ - Instructs the module on the way to perform the matching of the set of commands
+ against the current device config. If match is set to I(line), commands are
+ matched line by line. If match is set to I(strict), command lines are matched
+ with respect to position. If match is set to I(exact), command lines must be
+ an equal match. Finally, if match is set to I(none), the module will not attempt
+ to compare the source configuration with the running configuration on the remote
+ device.
+ choices:
+ - line
+ - strict
+ - exact
+ - none
+ type: str
+ default: line
+ replace:
+ description:
+ - Instructs the module on the way to perform the configuration on the device.
+ If the replace argument is set to I(line) then the modified lines are pushed
+ to the device in configuration mode. If the replace argument is set to I(block)
+ then the entire command block is pushed to the device in configuration mode
+ if any line is not correct.
+ default: line
+ choices:
+ - line
+ - block
+ type: str
+ multiline_delimiter:
+ description:
+ - This argument is used when pushing a multiline configuration element to the
+ IOS device. It specifies the character to use as the delimiting character. This
+ only applies to the configuration action.
+ default: '@'
+ type: str
+ backup:
+ description:
+ - This argument will cause the module to create a full backup of the current C(running-config)
+ from the remote device before any changes are made. If the C(backup_options)
+ value is not given, the backup file is written to the C(backup) folder in the
+ playbook root directory or role root directory, if playbook is part of an ansible
+ role. If the directory does not exist, it is created.
+ type: bool
+ default: no
+ running_config:
+ description:
+ - The module, by default, will connect to the remote device and retrieve the current
+ running-config to use as a base for comparing against the contents of source.
+ There are times when it is not desirable to have the task get the current running-config
+ for every task in a playbook. The I(running_config) argument allows the implementer
+ to pass in the configuration to use as the base config for comparison.
+ The configuration lines for this option should be similar to how it will appear if present
+ in the running-configuration of the device including the indentation to ensure idempotency
+ and correct diff.
+ type: str
+ aliases:
+ - config
+ defaults:
+ description:
+ - This argument specifies whether or not to collect all defaults when getting
+ the remote device running config. When enabled, the module will get the current
+ config by issuing the command C(show running-config all).
+ type: bool
+ default: no
+ save_when:
+ description:
+ - When changes are made to the device running-configuration, the changes are not
+ copied to non-volatile storage by default. Using this argument will change
+ that before. If the argument is set to I(always), then the running-config will
+ always be copied to the startup-config and the I(modified) flag will always
+ be set to True. If the argument is set to I(modified), then the running-config
+ will only be copied to the startup-config if it has changed since the last save
+ to startup-config. If the argument is set to I(never), the running-config will
+ never be copied to the startup-config. If the argument is set to I(changed),
+ then the running-config will only be copied to the startup-config if the task
+ has made a change. I(changed) was added in Ansible 2.5.
+ default: never
+ choices:
+ - always
+ - never
+ - modified
+ - changed
+ type: str
+ diff_against:
+ description:
+ - When using the C(ansible-playbook --diff) command line argument the module can
+ generate diffs against different sources.
+ - When this option is configure as I(startup), the module will return the diff
+ of the running-config against the startup-config.
+ - When this option is configured as I(intended), the module will return the diff
+ of the running-config against the configuration provided in the C(intended_config)
+ argument.
+ - When this option is configured as I(running), the module will return the before
+ and after diff of the running-config with respect to any changes made to the
+ device configuration.
+ type: str
+ choices:
+ - running
+ - startup
+ - intended
+ diff_ignore_lines:
+ description:
+ - Use this argument to specify one or more lines that should be ignored during
+ the diff. This is used for lines in the configuration that are automatically
+ updated by the system. This argument takes a list of regular expressions or
+ exact line matches.
+ type: list
+ elements: str
+ intended_config:
+ description:
+ - The C(intended_config) provides the master configuration that the node should
+ conform to and is used to check the final running-config against. This argument
+ will not modify any settings on the remote device and is strictly used to check
+ the compliance of the current device's configuration against. When specifying
+ this argument, the task should also modify the C(diff_against) value and set
+ it to I(intended). The configuration lines for this value should be similar to how it
+ will appear if present in the running-configuration of the device including the indentation
+ to ensure correct diff.
+ type: str
+ backup_options:
+ description:
+ - This is a dict object containing configurable options related to backup file
+ path. The value of this option is read only when C(backup) is set to I(yes),
+ if C(backup) is set to I(no) this option will be silently ignored.
+ suboptions:
+ filename:
+ description:
+ - The filename to be used to store the backup configuration. If the filename
+ is not given it will be generated based on the hostname, current time and
+ date in format defined by <hostname>_config.<current-date>@<current-time>
+ type: str
+ dir_path:
+ description:
+ - This option provides the path ending with directory name in which the backup
+ configuration file will be stored. If the directory does not exist it will
+ be first created and the filename is either the value of C(filename) or
+ default filename as described in C(filename) options description. If the
+ path value is not given in that case a I(backup) directory will be created
+ in the current working directory and backup configuration will be copied
+ in C(filename) within I(backup) directory.
+ type: path
+ type: dict
+"""
+EXAMPLES = """
+- name: configure top level configuration
+ cisco.ios.ios_config:
+ lines: hostname {{ inventory_hostname }}
+
+- name: configure interface settings
+ cisco.ios.ios_config:
+ lines:
+ - description test interface
+ - ip address 172.31.1.1 255.255.255.0
+ parents: interface Ethernet1
+
+- name: configure ip helpers on multiple interfaces
+ cisco.ios.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
+ cisco.ios.ios_config:
+ lines:
+ - conform-action transmit
+ - exceed-action drop
+ parents:
+ - policy-map Foo
+ - class Scavenger
+ - police cir 64000
+
+- name: load new acl into device
+ cisco.ios.ios_config:
+ lines:
+ - 10 permit ip host 192.0.2.1 any log
+ - 20 permit ip host 192.0.2.2 any log
+ - 30 permit ip host 192.0.2.3 any log
+ - 40 permit ip host 192.0.2.4 any log
+ - 50 permit ip host 192.0.2.5 any log
+ parents: ip access-list extended test
+ before: no ip access-list extended test
+ match: exact
+
+- name: check the running-config against master config
+ cisco.ios.ios_config:
+ diff_against: intended
+ intended_config: "{{ lookup('file', 'master.cfg') }}"
+
+- name: check the startup-config against the running-config
+ cisco.ios.ios_config:
+ diff_against: startup
+ diff_ignore_lines:
+ - ntp clock .*
+
+- name: save running to startup when modified
+ cisco.ios.ios_config:
+ save_when: modified
+
+- name: for idempotency, use full-form commands
+ cisco.ios.ios_config:
+ lines:
+ # - shut
+ - shutdown
+ # parents: int gig1/0/11
+ parents: interface GigabitEthernet1/0/11
+
+# Set boot image based on comparison to a group_var (version) and the version
+# that is returned from the `ios_facts` module
+- name: SETTING BOOT IMAGE
+ cisco.ios.ios_config:
+ lines:
+ - no boot system
+ - boot system flash bootflash:{{new_image}}
+ host: '{{ inventory_hostname }}'
+ when: ansible_net_version != version
+- name: render a Jinja2 template onto an IOS device
+ cisco.ios.ios_config:
+ backup: yes
+ src: ios_template.j2
+
+- name: configurable backup path
+ cisco.ios.ios_config:
+ src: ios_template.j2
+ backup: yes
+ backup_options:
+ filename: backup.cfg
+ dir_path: /home/user
+"""
+RETURN = """
+updates:
+ description: The set of commands that will be pushed to the remote device
+ returned: always
+ type: list
+ sample: ['hostname foo', 'router ospf 1', 'router-id 192.0.2.1']
+commands:
+ description: The set of commands that will be pushed to the remote device
+ returned: always
+ type: list
+ sample: ['hostname foo', 'router ospf 1', 'router-id 192.0.2.1']
+backup_path:
+ description: The full path to the backup file
+ returned: when backup is yes
+ type: str
+ sample: /playbooks/ansible/backup/ios_config.2016-07-16@22:28:34
+filename:
+ description: The name of the backup file
+ returned: when backup is yes and filename is not specified in backup options
+ type: str
+ sample: ios_config.2016-07-16@22:28:34
+shortname:
+ description: The full path to the backup file excluding the timestamp
+ returned: when backup is yes and filename is not specified in backup options
+ type: str
+ sample: /playbooks/ansible/backup/ios_config
+date:
+ description: The date extracted from the backup file name
+ returned: when backup is yes
+ type: str
+ sample: "2016-07-16"
+time:
+ description: The time extracted from the backup file name
+ returned: when backup is yes
+ type: str
+ sample: "22:28:34"
+"""
+import json
+from ansible.module_utils._text import to_text
+from ansible.module_utils.connection import ConnectionError
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ run_commands,
+ get_config,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ get_defaults_flag,
+ get_connection,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+ dumps,
+)
+
+
+def check_args(module, warnings):
+ if module.params["multiline_delimiter"]:
+ if len(module.params["multiline_delimiter"]) != 1:
+ module.fail_json(
+ msg="multiline_delimiter value can only be a single character"
+ )
+
+
+def edit_config_or_macro(connection, commands):
+ # only catch the macro configuration command,
+ # not negated 'no' variation.
+ if commands[0].startswith("macro name"):
+ connection.edit_macro(candidate=commands)
+ else:
+ connection.edit_config(candidate=commands)
+
+
+def get_candidate_config(module):
+ candidate = ""
+ if module.params["src"]:
+ candidate = module.params["src"]
+ elif module.params["lines"]:
+ candidate_obj = NetworkConfig(indent=1)
+ parents = module.params["parents"] or list()
+ candidate_obj.add(module.params["lines"], parents=parents)
+ candidate = dumps(candidate_obj, "raw")
+ return candidate
+
+
+def get_running_config(module, current_config=None, flags=None):
+ running = module.params["running_config"]
+ if not running:
+ if not module.params["defaults"] and current_config:
+ running = current_config
+ else:
+ running = get_config(module, flags=flags)
+ return running
+
+
+def save_config(module, result):
+ result["changed"] = True
+ if not module.check_mode:
+ run_commands(module, "copy running-config startup-config\r")
+ else:
+ module.warn(
+ "Skipping command `copy running-config startup-config` due to check_mode. Configuration not copied to non-volatile storage"
+ )
+
+
+def main():
+ """ main entry point for module execution
+ """
+ backup_spec = dict(filename=dict(), dir_path=dict(type="path"))
+ argument_spec = dict(
+ src=dict(type="str"),
+ lines=dict(aliases=["commands"], type="list", elements="str"),
+ parents=dict(type="list", elements="str"),
+ before=dict(type="list", elements="str"),
+ after=dict(type="list", elements="str"),
+ match=dict(
+ default="line", choices=["line", "strict", "exact", "none"]
+ ),
+ replace=dict(default="line", choices=["line", "block"]),
+ multiline_delimiter=dict(default="@"),
+ running_config=dict(aliases=["config"]),
+ intended_config=dict(),
+ defaults=dict(type="bool", default=False),
+ backup=dict(type="bool", default=False),
+ backup_options=dict(type="dict", options=backup_spec),
+ save_when=dict(
+ choices=["always", "never", "modified", "changed"], default="never"
+ ),
+ diff_against=dict(choices=["startup", "intended", "running"]),
+ diff_ignore_lines=dict(type="list", elements="str"),
+ )
+ argument_spec.update(ios_argument_spec)
+ mutually_exclusive = [("lines", "src"), ("parents", "src")]
+ required_if = [
+ ("match", "strict", ["lines"]),
+ ("match", "exact", ["lines"]),
+ ("replace", "block", ["lines"]),
+ ("diff_against", "intended", ["intended_config"]),
+ ]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+ result = {"changed": False}
+ warnings = list()
+ check_args(module, warnings)
+ result["warnings"] = warnings
+ diff_ignore_lines = module.params["diff_ignore_lines"]
+ config = None
+ contents = None
+ flags = get_defaults_flag(module) if module.params["defaults"] else []
+ connection = get_connection(module)
+ if (
+ module.params["backup"]
+ or module._diff
+ and module.params["diff_against"] == "running"
+ ):
+ contents = get_config(module, flags=flags)
+ config = NetworkConfig(indent=1, contents=contents)
+ if module.params["backup"]:
+ result["__backup__"] = contents
+ if any((module.params["lines"], module.params["src"])):
+ msg = (
+ "To ensure idempotency and correct diff the input configuration lines should be"
+ " similar to how they appear if present in the running configuration on device"
+ )
+ if module.params["src"]:
+ msg += " including the indentation"
+ warnings.append(msg)
+ match = module.params["match"]
+ replace = module.params["replace"]
+ path = module.params["parents"]
+ candidate = get_candidate_config(module)
+ running = get_running_config(module, contents, flags=flags)
+ try:
+ response = connection.get_diff(
+ candidate=candidate,
+ running=running,
+ diff_match=match,
+ diff_ignore_lines=diff_ignore_lines,
+ path=path,
+ diff_replace=replace,
+ )
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+ config_diff = response["config_diff"]
+ banner_diff = response["banner_diff"]
+ if config_diff or banner_diff:
+ commands = config_diff.split("\n")
+ if module.params["before"]:
+ commands[:0] = module.params["before"]
+ if module.params["after"]:
+ commands.extend(module.params["after"])
+ result["commands"] = commands
+ result["updates"] = commands
+ result["banners"] = banner_diff
+
+ # send the configuration commands to the device and merge
+ # them with the current running config
+ if not module.check_mode:
+ if commands:
+ edit_config_or_macro(connection, commands)
+ if banner_diff:
+ connection.edit_banner(
+ candidate=json.dumps(banner_diff),
+ multiline_delimiter=module.params[
+ "multiline_delimiter"
+ ],
+ )
+ result["changed"] = True
+ running_config = module.params["running_config"]
+ startup_config = None
+ if module.params["save_when"] == "always":
+ save_config(module, result)
+ elif module.params["save_when"] == "modified":
+ output = run_commands(
+ module, ["show running-config", "show startup-config"]
+ )
+ running_config = NetworkConfig(
+ indent=1, contents=output[0], ignore_lines=diff_ignore_lines
+ )
+ startup_config = NetworkConfig(
+ indent=1, contents=output[1], ignore_lines=diff_ignore_lines
+ )
+ if running_config.sha1 != startup_config.sha1:
+ save_config(module, result)
+ elif module.params["save_when"] == "changed" and result["changed"]:
+ save_config(module, result)
+ if module._diff:
+ if not running_config:
+ output = run_commands(module, "show running-config")
+ contents = output[0]
+ else:
+ contents = running_config
+
+ # recreate the object in order to process diff_ignore_lines
+ running_config = NetworkConfig(
+ indent=1, contents=contents, ignore_lines=diff_ignore_lines
+ )
+ if module.params["diff_against"] == "running":
+ if module.check_mode:
+ module.warn(
+ "unable to perform diff against running-config due to check mode"
+ )
+ contents = None
+ else:
+ contents = config.config_text
+ elif module.params["diff_against"] == "startup":
+ if not startup_config:
+ output = run_commands(module, "show startup-config")
+ contents = output[0]
+ else:
+ contents = startup_config.config_text
+ elif module.params["diff_against"] == "intended":
+ contents = module.params["intended_config"]
+ if contents is not None:
+ base_config = NetworkConfig(
+ indent=1, contents=contents, ignore_lines=diff_ignore_lines
+ )
+ if running_config.sha1 != base_config.sha1:
+ if module.params["diff_against"] == "intended":
+ before = running_config
+ after = base_config
+ elif module.params["diff_against"] in ("startup", "running"):
+ before = base_config
+ after = running_config
+ result.update(
+ {
+ "changed": True,
+ "diff": {"before": str(before), "after": str(after)},
+ }
+ )
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_facts.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_facts.py
new file mode 100644
index 00000000..e66d9048
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_facts.py
@@ -0,0 +1,236 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_facts
+author:
+- Peter Sprygada (@privateip)
+- Sumit Jaiswal (@justjais)
+short_description: Collect facts from remote devices running Cisco IOS
+description:
+- Collects a base set of device facts from a remote device that is running IOS. This
+ module prepends all of the base network fact keys with C(ansible_net_<fact>). The
+ facts module will always collect a base set of facts from the device and can enable
+ or disable collection of additional facts.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.ios.ios
+notes:
+- Tested against IOS 15.6
+options:
+ gather_subset:
+ description:
+ - When supplied, this argument restricts the facts collected to a given subset.
+ - Possible values for this argument include C(all), C(min), C(hardware), C(config),
+ and C(interfaces).
+ - Specify a list of values to include a larger subset.
+ - Use a value with an initial C(!) to collect all facts except that subset.
+ required: false
+ default: '!config'
+ type: list
+ elements: str
+ gather_network_resources:
+ description:
+ - When supplied, this argument will restrict the facts collected 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. Values can
+ also be used with an initial C(M(!)) to specify that a specific subset should
+ not be collected. Valid subsets are 'all', 'interfaces', 'l2_interfaces', 'vlans',
+ 'lag_interfaces', 'lacp', 'lacp_interfaces', 'lldp_global', 'lldp_interfaces',
+ 'l3_interfaces', 'acl_interfaces', 'static_routes', 'acls'.
+ type: list
+ elements: str
+"""
+EXAMPLES = """
+- name: Gather all legacy facts
+ cisco.ios.ios_facts:
+ gather_subset: all
+
+- name: Gather only the config and default facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - config
+
+- name: Do not gather hardware facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!hardware'
+
+- name: Gather legacy and resource facts
+ cisco.ios.ios_facts:
+ gather_subset: all
+ gather_network_resources: all
+
+- name: Gather only the interfaces resource facts and no legacy facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - interfaces
+
+- name: Gather interfaces resource and minimal legacy facts
+ cisco.ios.ios_facts:
+ gather_subset: min
+ gather_network_resources: interfaces
+
+- name: Gather L2 interfaces resource and minimal legacy facts
+ cisco.ios.ios_facts:
+ gather_subset: min
+ gather_network_resources: l2_interfaces
+
+- name: Gather L3 interfaces resource and minimal legacy facts
+ cisco.ios.ios_facts:
+ gather_subset: min
+ gather_network_resources: l3_interfaces
+"""
+RETURN = """
+ansible_net_gather_subset:
+ description: The list of fact subsets collected from the device
+ returned: always
+ type: list
+
+ansible_net_gather_network_resources:
+ description: The list of fact for network resource subsets collected from the device
+ returned: when the resource is configured
+ type: list
+
+# default
+ansible_net_model:
+ description: The model name returned from the device
+ returned: always
+ type: str
+ansible_net_serialnum:
+ description: The serial number of the remote device
+ returned: always
+ type: str
+ansible_net_version:
+ description: The operating system version running on the remote device
+ returned: always
+ type: str
+ansible_net_iostype:
+ description: The operating system type (IOS or IOS-XE) running on the remote device
+ returned: always
+ type: str
+ansible_net_hostname:
+ description: The configured hostname of the device
+ returned: always
+ type: str
+ansible_net_image:
+ description: The image file the device is running
+ returned: always
+ type: str
+ansible_net_stacked_models:
+ description: The model names of each device in the stack
+ returned: when multiple devices are configured in a stack
+ type: list
+ansible_net_stacked_serialnums:
+ description: The serial numbers of each device in the stack
+ returned: when multiple devices are configured in a stack
+ type: list
+ansible_net_api:
+ description: The name of the transport
+ returned: always
+ type: str
+ansible_net_python_version:
+ description: The Python version Ansible controller is using
+ returned: always
+ type: str
+
+# hardware
+ansible_net_filesystems:
+ description: All file system names available on the device
+ returned: when hardware is configured
+ type: list
+ansible_net_filesystems_info:
+ description: A hash of all file systems containing info about each file system (e.g. free and total space)
+ returned: when hardware is configured
+ type: dict
+ansible_net_memfree_mb:
+ description: The available free memory on the remote device in Mb
+ returned: when hardware is configured
+ type: int
+ansible_net_memtotal_mb:
+ description: The total memory on the remote device in Mb
+ returned: when hardware is configured
+ type: int
+
+# config
+ansible_net_config:
+ description: The current active config from the device
+ returned: when config is configured
+ type: str
+
+# interfaces
+ansible_net_all_ipv4_addresses:
+ description: All IPv4 addresses configured on the device
+ returned: when interfaces is configured
+ type: list
+ansible_net_all_ipv6_addresses:
+ description: All IPv6 addresses configured on the device
+ returned: when interfaces is configured
+ type: list
+ansible_net_interfaces:
+ description: A hash of all interfaces running on the system
+ returned: when interfaces is configured
+ type: dict
+ansible_net_neighbors:
+ description:
+ - The list of CDP and LLDP neighbors from the remote device. If both,
+ CDP and LLDP neighbor data is present on one port, CDP is preferred.
+ returned: when interfaces is configured
+ type: dict
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.facts.facts import (
+ FactsArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: ansible_facts
+ """
+ argument_spec = FactsArgs.argument_spec
+ argument_spec.update(ios_argument_spec)
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+ warnings = []
+ if module.params["gather_subset"] == "!config":
+ warnings.append(
+ "default value for `gather_subset` will be changed to `min` from `!config` v2.11 onwards"
+ )
+ result = Facts(module).get_facts()
+ ansible_facts, additional_warnings = result
+ warnings.extend(additional_warnings)
+ module.exit_json(ansible_facts=ansible_facts, warnings=warnings)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_interface.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_interface.py
new file mode 100644
index 00000000..a1e540bc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_interface.py
@@ -0,0 +1,597 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_interface
+author: Ganesh Nalawade (@ganeshrn)
+short_description: (deprecated, removed after 2022-06-01) Manage Interface on Cisco
+ IOS network devices
+description:
+- This module provides declarative management of Interfaces on Cisco IOS network devices.
+version_added: 1.0.0
+deprecated:
+ alternative: ios_interfaces
+ why: Newer and updated modules released with more functionality in Ansible 2.9
+ removed_at_date: '2022-06-01'
+notes:
+- Tested against IOS 15.6
+options:
+ name:
+ description:
+ - Name of the Interface.
+ type: str
+ description:
+ description:
+ - Description of Interface.
+ type: str
+ enabled:
+ description:
+ - Interface link status.
+ default: True
+ type: bool
+ speed:
+ description:
+ - Interface link speed.
+ type: str
+ mtu:
+ description:
+ - Maximum size of transmit packet.
+ type: str
+ duplex:
+ description:
+ - Interface link status
+ type: str
+ choices:
+ - full
+ - half
+ - auto
+ tx_rate:
+ description:
+ - Transmit rate in bits per second (bps).
+ - This is state check parameter only.
+ - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
+ type: str
+ rx_rate:
+ description:
+ - Receiver rate in bits per second (bps).
+ - This is state check parameter only.
+ - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
+ type: str
+ neighbors:
+ description:
+ - Check the operational state of given interface C(name) for CDP/LLDP neighbor.
+ - The following suboptions are available.
+ type: list
+ elements: dict
+ suboptions:
+ host:
+ description:
+ - CDP/LLDP neighbor host for given interface C(name).
+ type: str
+ port:
+ description:
+ - CDP/LLDP neighbor port to which given interface C(name) is connected.
+ type: str
+ aggregate:
+ description: List of Interfaces definitions.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name of the Interface.
+ required: true
+ type: str
+ description:
+ description:
+ - Description of Interface.
+ type: str
+ enabled:
+ description:
+ - Interface link status.
+ type: bool
+ speed:
+ description:
+ - Interface link speed.
+ type: str
+ mtu:
+ description:
+ - Maximum size of transmit packet.
+ type: str
+ duplex:
+ description:
+ - Interface link status
+ choices:
+ - full
+ - half
+ - auto
+ type: str
+ tx_rate:
+ description:
+ - Transmit rate in bits per second (bps).
+ - This is state check parameter only.
+ - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
+ type: str
+ rx_rate:
+ description:
+ - Receiver rate in bits per second (bps).
+ - This is state check parameter only.
+ - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
+ type: str
+ neighbors:
+ description:
+ - Check the operational state of given interface C(name) for CDP/LLDP neighbor.
+ - The following suboptions are available.
+ type: list
+ elements: dict
+ suboptions:
+ host:
+ description:
+ - CDP/LLDP neighbor host for given interface C(name).
+ type: str
+ port:
+ description:
+ - CDP/LLDP neighbor port to which given interface C(name) is connected.
+ type: str
+ delay:
+ description:
+ - Time in seconds to wait before checking for the operational state on remote
+ device. This wait is applicable for operational state argument which are I(state)
+ with values C(up)/C(down), I(tx_rate) and I(rx_rate).
+ type: int
+ state:
+ description:
+ - State of the Interface configuration, C(up) means present and operationally
+ up and C(down) means present and operationally C(down)
+ choices:
+ - present
+ - absent
+ - up
+ - down
+ type: str
+ delay:
+ description:
+ - Time in seconds to wait before checking for the operational state on remote
+ device. This wait is applicable for operational state argument which are I(state)
+ with values C(up)/C(down), I(tx_rate) and I(rx_rate).
+ default: 10
+ type: int
+ state:
+ description:
+ - State of the Interface configuration, C(up) means present and operationally
+ up and C(down) means present and operationally C(down)
+ default: present
+ choices:
+ - present
+ - absent
+ - up
+ - down
+ type: str
+extends_documentation_fragment:
+- cisco.ios.ios
+
+
+"""
+EXAMPLES = """
+- name: configure interface
+ cisco.ios.ios_interface:
+ name: GigabitEthernet0/2
+ description: test-interface
+ speed: 100
+ duplex: half
+ mtu: 512
+
+- name: remove interface
+ cisco.ios.ios_interface:
+ name: Loopback9
+ state: absent
+
+- name: make interface up
+ cisco.ios.ios_interface:
+ name: GigabitEthernet0/2
+ enabled: true
+
+- name: make interface down
+ cisco.ios.ios_interface:
+ name: GigabitEthernet0/2
+ enabled: false
+
+- name: Check intent arguments
+ cisco.ios.ios_interface:
+ name: GigabitEthernet0/2
+ state: up
+ tx_rate: ge(0)
+ rx_rate: le(0)
+
+- name: Check neighbors intent arguments
+ cisco.ios.ios_interface:
+ name: Gi0/0
+ neighbors:
+ - port: eth0
+ host: netdev
+
+- name: Config + intent
+ cisco.ios.ios_interface:
+ name: GigabitEthernet0/2
+ enabled: false
+ state: down
+
+- name: Add interface using aggregate
+ cisco.ios.ios_interface:
+ aggregate:
+ - {name: GigabitEthernet0/1, mtu: 256, description: test-interface-1}
+ - {name: GigabitEthernet0/2, mtu: 516, description: test-interface-2}
+ duplex: full
+ speed: 100
+ state: present
+
+- name: Delete interface using aggregate
+ cisco.ios.ios_interface:
+ aggregate:
+ - name: Loopback9
+ - name: Loopback10
+ state: absent
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device.
+ returned: always, except for the platforms that use Netconf transport to manage the device.
+ type: list
+ sample:
+ - interface GigabitEthernet0/2
+ - description test-interface
+ - duplex half
+ - mtu 512
+"""
+import re
+from copy import deepcopy
+from time import sleep
+from ansible.module_utils._text import to_text
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.connection import exec_command
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ conditional,
+ remove_default_spec,
+)
+
+
+def validate_mtu(value, module):
+ if value and not 64 <= int(value) <= 9600:
+ module.fail_json(msg="mtu must be between 64 and 9600")
+
+
+def validate_param_values(module, obj, param=None):
+ if param is None:
+ param = module.params
+ for key in obj:
+ # validate the param value (if validator func exists)
+ validator = globals().get("validate_%s" % key)
+ if callable(validator):
+ validator(param.get(key), module)
+
+
+def parse_shutdown(configobj, name):
+ cfg = configobj["interface %s" % name]
+ cfg = "\n".join(cfg.children)
+ match = re.search("^shutdown", cfg, re.M)
+ if match:
+ return True
+ else:
+ return False
+
+
+def parse_config_argument(configobj, name, arg=None):
+ cfg = configobj["interface %s" % name]
+ cfg = "\n".join(cfg.children)
+ match = re.search("%s (.+)$" % arg, cfg, re.M)
+ if match:
+ return match.group(1)
+
+
+def search_obj_in_list(name, lst):
+ for o in lst:
+ if o["name"] == name:
+ return o
+ return None
+
+
+def add_command_to_interface(interface, cmd, commands):
+ if interface not in commands:
+ commands.append(interface)
+ commands.append(cmd)
+
+
+def map_config_to_obj(module):
+ config = get_config(module)
+ configobj = NetworkConfig(indent=1, contents=config)
+ match = re.findall("^interface (\\S+)", config, re.M)
+ if not match:
+ return list()
+ instances = list()
+ for item in set(match):
+ obj = {
+ "name": item,
+ "description": parse_config_argument(
+ configobj, item, "description"
+ ),
+ "speed": parse_config_argument(configobj, item, "speed"),
+ "duplex": parse_config_argument(configobj, item, "duplex"),
+ "mtu": parse_config_argument(configobj, item, "mtu"),
+ "disable": True if parse_shutdown(configobj, item) else False,
+ "state": "present",
+ }
+ instances.append(obj)
+ return instances
+
+
+def map_params_to_obj(module):
+ obj = []
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+ validate_param_values(module, item, item)
+ d = item.copy()
+ if d["enabled"]:
+ d["disable"] = False
+ else:
+ d["disable"] = True
+ obj.append(d)
+ else:
+ params = {
+ "name": module.params["name"],
+ "description": module.params["description"],
+ "speed": module.params["speed"],
+ "mtu": module.params["mtu"],
+ "duplex": module.params["duplex"],
+ "state": module.params["state"],
+ "delay": module.params["delay"],
+ "tx_rate": module.params["tx_rate"],
+ "rx_rate": module.params["rx_rate"],
+ "neighbors": module.params["neighbors"],
+ }
+ validate_param_values(module, params)
+ if module.params["enabled"]:
+ params.update({"disable": False})
+ else:
+ params.update({"disable": True})
+ obj.append(params)
+ return obj
+
+
+def map_obj_to_commands(updates):
+ commands = list()
+ want, have = updates
+ args = "speed", "description", "duplex", "mtu"
+ for w in want:
+ name = w["name"]
+ disable = w["disable"]
+ state = w["state"]
+ obj_in_have = search_obj_in_list(name, have)
+ interface = "interface " + name
+ if state == "absent" and obj_in_have:
+ commands.append("no " + interface)
+ elif state in ("present", "up", "down"):
+ if obj_in_have:
+ for item in args:
+ candidate = w.get(item)
+ running = obj_in_have.get(item)
+ if candidate != running:
+ if candidate:
+ cmd = item + " " + str(candidate)
+ add_command_to_interface(interface, cmd, commands)
+ if disable and not obj_in_have.get("disable", False):
+ add_command_to_interface(interface, "shutdown", commands)
+ elif not disable and obj_in_have.get("disable", False):
+ add_command_to_interface(
+ interface, "no shutdown", commands
+ )
+ else:
+ commands.append(interface)
+ for item in args:
+ value = w.get(item)
+ if value:
+ commands.append(item + " " + str(value))
+ if disable:
+ commands.append("no shutdown")
+ return commands
+
+
+def check_declarative_intent_params(module, want, result):
+ failed_conditions = []
+ have_neighbors_lldp = None
+ have_neighbors_cdp = None
+ for w in want:
+ want_state = w.get("state")
+ want_tx_rate = w.get("tx_rate")
+ want_rx_rate = w.get("rx_rate")
+ want_neighbors = w.get("neighbors")
+ if (
+ want_state not in ("up", "down")
+ and not want_tx_rate
+ and not want_rx_rate
+ and not want_neighbors
+ ):
+ continue
+ if result["changed"]:
+ sleep(w["delay"])
+ command = "show interfaces %s" % w["name"]
+ rc, out, err = exec_command(module, command)
+ if rc != 0:
+ module.fail_json(
+ msg=to_text(err, errors="surrogate_then_replace"),
+ command=command,
+ rc=rc,
+ )
+ if want_state in ("up", "down"):
+ match = re.search("%s (\\w+)" % "line protocol is", out, re.M)
+ have_state = None
+ if match:
+ have_state = match.group(1)
+ if have_state is None or not conditional(
+ want_state, have_state.strip()
+ ):
+ failed_conditions.append("state " + "eq(%s)" % want_state)
+ if want_tx_rate:
+ match = re.search("%s (\\d+)" % "output rate", out, re.M)
+ have_tx_rate = None
+ if match:
+ have_tx_rate = match.group(1)
+ if have_tx_rate is None or not conditional(
+ want_tx_rate, have_tx_rate.strip(), cast=int
+ ):
+ failed_conditions.append("tx_rate " + want_tx_rate)
+ if want_rx_rate:
+ match = re.search("%s (\\d+)" % "input rate", out, re.M)
+ have_rx_rate = None
+ if match:
+ have_rx_rate = match.group(1)
+ if have_rx_rate is None or not conditional(
+ want_rx_rate, have_rx_rate.strip(), cast=int
+ ):
+ failed_conditions.append("rx_rate " + want_rx_rate)
+ if want_neighbors:
+ have_host = []
+ have_port = []
+
+ # Process LLDP neighbors
+ if have_neighbors_lldp is None:
+ rc, have_neighbors_lldp, err = exec_command(
+ module, "show lldp neighbors detail"
+ )
+ if rc != 0:
+ module.fail_json(
+ msg=to_text(err, errors="surrogate_then_replace"),
+ command=command,
+ rc=rc,
+ )
+ if have_neighbors_lldp:
+ lines = have_neighbors_lldp.strip().split("Local Intf: ")
+ for line in lines:
+ field = line.split("\n")
+ if field[0].strip() == w["name"]:
+ for item in field:
+ if item.startswith("System Name:"):
+ have_host.append(item.split(":")[1].strip())
+ if item.startswith("Port Description:"):
+ have_port.append(item.split(":")[1].strip())
+ # Process CDP neighbors
+ if have_neighbors_cdp is None:
+ rc, have_neighbors_cdp, err = exec_command(
+ module, "show cdp neighbors detail"
+ )
+ if rc != 0:
+ module.fail_json(
+ msg=to_text(err, errors="surrogate_then_replace"),
+ command=command,
+ rc=rc,
+ )
+ if have_neighbors_cdp:
+ neighbors_cdp = re.findall(
+ """Device ID: (.*?)
+.*?Interface: (.*?), Port ID .outgoing port.: (.*?)
+""",
+ have_neighbors_cdp,
+ re.S,
+ )
+ for host, localif, remoteif in neighbors_cdp:
+ if localif == w["name"]:
+ have_host.append(host)
+ have_port.append(remoteif)
+ for item in want_neighbors:
+ host = item.get("host")
+ port = item.get("port")
+ if host and host not in have_host:
+ failed_conditions.append("host " + host)
+ if port and port not in have_port:
+ failed_conditions.append("port " + port)
+ return failed_conditions
+
+
+def main():
+ """ main entry point for module execution
+ """
+ neighbors_spec = dict(host=dict(), port=dict())
+ element_spec = dict(
+ name=dict(),
+ description=dict(),
+ speed=dict(),
+ mtu=dict(),
+ duplex=dict(choices=["full", "half", "auto"]),
+ enabled=dict(default=True, type="bool"),
+ tx_rate=dict(),
+ rx_rate=dict(),
+ neighbors=dict(type="list", elements="dict", options=neighbors_spec),
+ delay=dict(default=10, type="int"),
+ state=dict(
+ default="present", choices=["present", "absent", "up", "down"]
+ ),
+ )
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["name"] = dict(required=True)
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec)
+ )
+ argument_spec.update(element_spec)
+ argument_spec.update(ios_argument_spec)
+ required_one_of = [["name", "aggregate"]]
+ mutually_exclusive = [["name", "aggregate"]]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=required_one_of,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ warnings = list()
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands((want, have))
+ result["commands"] = commands
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+ failed_conditions = check_declarative_intent_params(module, want, result)
+ if failed_conditions:
+ msg = "One or more conditional statements have not been satisfied"
+ module.fail_json(msg=msg, failed_conditions=failed_conditions)
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_interfaces.py
new file mode 100644
index 00000000..aeb1561d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_interfaces.py
@@ -0,0 +1,568 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_interfaces
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+module: ios_interfaces
+short_description: Interfaces resource module
+description: This module manages the interface attributes of Cisco IOS network devices.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL
+options:
+ config:
+ description: A dictionary of interface options
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of interface, e.g. GigabitEthernet0/2, loopback999.
+ type: str
+ required: true
+ description:
+ description:
+ - Interface description.
+ type: str
+ enabled:
+ description:
+ - Administrative state of the interface.
+ - Set the value to C(true) to administratively enable the interface or C(false)
+ to disable it.
+ type: bool
+ default: true
+ speed:
+ description:
+ - Interface link speed. Applicable for Ethernet interfaces only.
+ type: str
+ mtu:
+ description:
+ - MTU for a specific interface. Applicable for Ethernet interfaces only.
+ - Refer to vendor documentation for valid values.
+ type: int
+ duplex:
+ description:
+ - Interface link status. Applicable for Ethernet interfaces only, either in
+ half duplex, full duplex or in automatic state which negotiates the duplex
+ automatically.
+ type: str
+ choices:
+ - full
+ - half
+ - auto
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS device by
+ executing the command B(show running-config | section ^interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - rendered
+ - gathered
+ - parsed
+ default: merged
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+"""
+
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description This is test
+# no ip address
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# no ip address
+# duplex auto
+# speed auto
+
+- name: Merge provided configuration with device configuration
+ cisco.ios.ios_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ description: Configured and Merged by Ansible Network
+ enabled: true
+ - name: GigabitEthernet0/3
+ description: Configured and Merged by Ansible Network
+ mtu: 2800
+ enabled: false
+ speed: 100
+ duplex: full
+ state: merged
+
+# After state:
+# ------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description Configured and Merged by Ansible Network
+# no ip address
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# description Configured and Merged by Ansible Network
+# mtu 2800
+# no ip address
+# shutdown
+# duplex full
+# speed 100
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description Configured by Ansible Network
+# no ip address
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# mtu 2000
+# no ip address
+# shutdown
+# duplex full
+# speed 100
+
+- name: Replaces device configuration of listed interfaces with provided configuration
+ cisco.ios.ios_interfaces:
+ config:
+ - name: GigabitEthernet0/3
+ description: Configured and Replaced by Ansible Network
+ enabled: false
+ duplex: auto
+ mtu: 2500
+ speed: 1000
+ state: replaced
+
+# After state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description Configured by Ansible Network
+# no ip address
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# description Configured and Replaced by Ansible Network
+# mtu 2500
+# no ip address
+# shutdown
+# duplex full
+# speed 1000
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface#
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description This is test
+# no ip address
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# description Configured by Ansible
+# mtu 2800
+# no ip address
+# shutdown
+# duplex full
+# speed 100
+
+- name: Override device configuration of all interfaces with provided configuration
+ cisco.ios.ios_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ description: Configured and Overridden by Ansible Network
+ speed: 1000
+ - name: GigabitEthernet0/3
+ description: Configured and Overridden by Ansible Network
+ enabled: false
+ duplex: full
+ mtu: 2000
+ state: overridden
+
+# After state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description Configured and Overridden by Ansible Network
+# no ip address
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# description Configured and Overridden by Ansible Network
+# mtu 2000
+# no ip address
+# shutdown
+# duplex full
+# speed 100
+
+# Using Deleted
+
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description Configured by Ansible Network
+# no ip address
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# mtu 2500
+# no ip address
+# shutdown
+# duplex full
+# speed 1000
+
+- name: "Delete module attributes of given interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# mtu 2500
+# no ip address
+# shutdown
+# duplex full
+# speed 1000
+
+# Using Deleted without any config passed
+#"(NOTE: This will delete all of configured resource module attributes from each configured interface)"
+
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description Configured by Ansible Network
+# no ip address
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# mtu 2500
+# no ip address
+# shutdown
+# duplex full
+# speed 1000
+
+- name: "Delete module attributes of all interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_interfaces:
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/3
+# no ip address
+# duplex auto
+# speed auto
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | section ^interface
+# interface GigabitEthernet0/1
+# description this is interface1
+# mtu 65
+# duplex auto
+# speed 10
+# interface GigabitEthernet0/2
+# description this is interface2
+# mtu 110
+# shutdown
+# duplex auto
+# speed 100
+
+- name: Gather listed interfaces with provided configurations
+ cisco.ios.ios_interfaces:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "description": "this is interface1",
+# "duplex": "auto",
+# "enabled": true,
+# "mtu": 65,
+# "name": "GigabitEthernet0/1",
+# "speed": "10"
+# },
+# {
+# "description": "this is interface2",
+# "duplex": "auto",
+# "enabled": false,
+# "mtu": 110,
+# "name": "GigabitEthernet0/2",
+# "speed": "100"
+# }
+# ]
+
+# After state:
+# ------------
+#
+# vios#sh running-config | section ^interface
+# interface GigabitEthernet0/1
+# description this is interface1
+# mtu 65
+# duplex auto
+# speed 10
+# interface GigabitEthernet0/2
+# description this is interface2
+# mtu 110
+# shutdown
+# duplex auto
+# speed 100
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ description: Configured by Ansible-Network
+ mtu: 110
+ enabled: true
+ duplex: half
+ - name: GigabitEthernet0/2
+ description: Configured by Ansible-Network
+ mtu: 2800
+ enabled: false
+ speed: 100
+ duplex: full
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "interface GigabitEthernet0/1",
+# "description Configured by Ansible-Network",
+# "mtu 110",
+# "duplex half",
+# "no shutdown",
+# "interface GigabitEthernet0/2",
+# "description Configured by Ansible-Network",
+# "mtu 2800",
+# "speed 100",
+# "duplex full",
+# "shutdown"
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# interface GigabitEthernet0/1
+# description interfaces 0/1
+# mtu 110
+# duplex half
+# no shutdown
+# interface GigabitEthernet0/2
+# description interfaces 0/2
+# mtu 2800
+# speed 100
+# duplex full
+# shutdown
+
+- name: Parse the commands for provided configuration
+ cisco.ios.ios_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": [
+# {
+# "description": "interfaces 0/1",
+# "duplex": "half",
+# "enabled": true,
+# "mtu": 110,
+# "name": "GigabitEthernet0/1"
+# },
+# {
+# "description": "interfaces 0/2",
+# "duplex": "full",
+# "enabled": true,
+# "mtu": 2800,
+# "name": "GigabitEthernet0/2",
+# "speed": "100"
+# }
+# ]
+
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['interface GigabitEthernet 0/1', 'description This is test', 'speed 100']
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.interfaces.interfaces import (
+ InterfacesArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.interfaces.interfaces import (
+ Interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=InterfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = Interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l2_interface.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l2_interface.py
new file mode 100644
index 00000000..dfe8ca63
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l2_interface.py
@@ -0,0 +1,581 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_l2_interface
+extends_documentation_fragment:
+- cisco.ios.ios
+short_description: (deprecated, removed after 2022-06-01) Manage Layer-2 interface
+ on Cisco IOS devices.
+description:
+- This module provides declarative management of Layer-2 interfaces on Cisco IOS devices.
+version_added: 1.0.0
+deprecated:
+ alternative: ios_l2_interfaces
+ why: Newer and updated modules released with more functionality in Ansible 2.9
+ removed_at_date: '2022-06-01'
+author:
+- Nathaniel Case (@Qalthos)
+options:
+ name:
+ description:
+ - Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.
+ aliases:
+ - interface
+ type: str
+ mode:
+ description:
+ - Mode in which interface needs to be configured.
+ choices:
+ - access
+ - trunk
+ type: str
+ access_vlan:
+ description:
+ - Configure given VLAN in access port. If C(mode=access), used as the access VLAN
+ ID.
+ type: str
+ trunk_vlans:
+ description:
+ - List of VLANs to be configured in trunk port. If C(mode=trunk), used as the
+ VLAN range to ADD or REMOVE from the trunk.
+ type: str
+ native_vlan:
+ description:
+ - Native VLAN to be configured in trunk port. If C(mode=trunk), used as the trunk
+ native VLAN ID.
+ type: str
+ trunk_allowed_vlans:
+ description:
+ - List of allowed VLANs in a given trunk port. If C(mode=trunk), these are the
+ only VLANs that will be configured on the trunk, i.e. "2-10,15".
+ type: str
+ aggregate:
+ description:
+ - List of Layer-2 interface definitions.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.
+ aliases:
+ - interface
+ type: str
+ mode:
+ description:
+ - Mode in which interface needs to be configured.
+ choices:
+ - access
+ - trunk
+ type: str
+ access_vlan:
+ description:
+ - Configure given VLAN in access port. If C(mode=access), used as the access VLAN
+ ID.
+ type: str
+ trunk_vlans:
+ description:
+ - List of VLANs to be configured in trunk port. If C(mode=trunk), used as the
+ VLAN range to ADD or REMOVE from the trunk.
+ type: str
+ native_vlan:
+ description:
+ - Native VLAN to be configured in trunk port. If C(mode=trunk), used as the trunk
+ native VLAN ID.
+ type: str
+ trunk_allowed_vlans:
+ description:
+ - List of allowed VLANs in a given trunk port. If C(mode=trunk), these are the
+ only VLANs that will be configured on the trunk, i.e. "2-10,15".
+ type: str
+ state:
+ description:
+ - Manage the state of the Layer-2 Interface configuration.
+ choices:
+ - present
+ - absent
+ - unconfigured
+ type: str
+ state:
+ description:
+ - Manage the state of the Layer-2 Interface configuration.
+ default: present
+ choices:
+ - present
+ - absent
+ - unconfigured
+ type: str
+
+"""
+EXAMPLES = """
+- name: Ensure GigabitEthernet0/5 is in its default l2 interface state
+ ios.ios_l2_interface:
+ name: GigabitEthernet0/5
+ state: unconfigured
+- name: Ensure GigabitEthernet0/5 is configured for access vlan 20
+ ios.ios_l2_interface:
+ name: GigabitEthernet0/5
+ mode: access
+ access_vlan: 20
+- name: Ensure GigabitEthernet0/5 only has vlans 5-10 as trunk vlans
+ ios.ios_l2_interface:
+ name: GigabitEthernet0/5
+ mode: trunk
+ native_vlan: 10
+ trunk_allowed_vlans: 5-10
+- name: Ensure GigabitEthernet0/5 is a trunk port and ensure 2-50 are being tagged
+ (doesn't mean others aren't also being tagged)
+ ios.ios_l2_interface:
+ name: GigabitEthernet0/5
+ mode: trunk
+ native_vlan: 10
+ trunk_vlans: 2-50
+- name: Ensure these VLANs are not being tagged on the trunk
+ ios.ios_l2_interface:
+ name: GigabitEthernet0/5
+ mode: trunk
+ trunk_vlans: 51-4094
+ state: absent
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always, except for the platforms that use Netconf transport to manage the device.
+ type: list
+ sample:
+ - interface GigabitEthernet0/5
+ - switchport access vlan 20
+"""
+import re
+from copy import deepcopy
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+
+
+def get_interface_type(interface):
+ intf_type = "unknown"
+ if interface.upper()[:2] in (
+ "ET",
+ "GI",
+ "FA",
+ "TE",
+ "FO",
+ "HU",
+ "TWE",
+ "TW",
+ ):
+ intf_type = "ethernet"
+ elif interface.upper().startswith("VL"):
+ intf_type = "svi"
+ elif interface.upper().startswith("LO"):
+ intf_type = "loopback"
+ elif interface.upper()[:2] in ("MG", "MA"):
+ intf_type = "management"
+ elif interface.upper().startswith("PO"):
+ intf_type = "portchannel"
+ elif interface.upper().startswith("NV"):
+ intf_type = "nve"
+ return intf_type
+
+
+def is_switchport(name, module):
+ intf_type = get_interface_type(name)
+ if intf_type in ("ethernet", "portchannel"):
+ config = run_commands(
+ module, ["show interface {0} switchport".format(name)]
+ )[0]
+ match = re.search("Switchport: Enabled", config)
+ return bool(match)
+ return False
+
+
+def interface_is_portchannel(name, module):
+ if get_interface_type(name) == "ethernet":
+ config = run_commands(module, ["show run interface {0}".format(name)])[
+ 0
+ ]
+ if any(c in config for c in ["channel group", "channel-group"]):
+ return True
+ return False
+
+
+def get_switchport(name, module):
+ config = run_commands(
+ module, ["show interface {0} switchport".format(name)]
+ )[0]
+ mode = re.search("Administrative Mode: (?:.* )?(\\w+)$", config, re.M)
+ access = re.search("Access Mode VLAN: (\\d+)", config)
+ native = re.search("Trunking Native Mode VLAN: (\\d+)", config)
+ trunk = re.search("Trunking VLANs Enabled: (.+)$", config, re.M)
+ if mode:
+ mode = mode.group(1)
+ if access:
+ access = access.group(1)
+ if native:
+ native = native.group(1)
+ if trunk:
+ trunk = trunk.group(1)
+ if trunk == "ALL":
+ trunk = "1-4094"
+ switchport_config = {
+ "interface": name,
+ "mode": mode,
+ "access_vlan": access,
+ "native_vlan": native,
+ "trunk_vlans": trunk,
+ }
+ return switchport_config
+
+
+def remove_switchport_config_commands(name, existing, proposed, module):
+ mode = proposed.get("mode")
+ commands = []
+ command = None
+ if mode == "access":
+ av_check = existing.get("access_vlan") == proposed.get("access_vlan")
+ if av_check:
+ command = "no switchport access vlan {0}".format(
+ existing.get("access_vlan")
+ )
+ commands.append(command)
+ elif mode == "trunk":
+ # Supported Remove Scenarios for trunk_vlans_list
+ # 1) Existing: 1,2,3 Proposed: 1,2,3 - Remove all
+ # 2) Existing: 1,2,3 Proposed: 1,2 - Remove 1,2 Leave 3
+ # 3) Existing: 1,2,3 Proposed: 2,3 - Remove 2,3 Leave 1
+ # 4) Existing: 1,2,3 Proposed: 4,5,6 - None removed.
+ # 5) Existing: None Proposed: 1,2,3 - None removed.
+ existing_vlans = existing.get("trunk_vlans_list")
+ proposed_vlans = proposed.get("trunk_vlans_list")
+ vlans_to_remove = set(proposed_vlans).intersection(existing_vlans)
+ if vlans_to_remove:
+ proposed_allowed_vlans = proposed.get("trunk_allowed_vlans")
+ remove_trunk_allowed_vlans = proposed.get(
+ "trunk_vlans", proposed_allowed_vlans
+ )
+ command = "switchport trunk allowed vlan remove {0}".format(
+ remove_trunk_allowed_vlans
+ )
+ commands.append(command)
+ native_check = existing.get("native_vlan") == proposed.get(
+ "native_vlan"
+ )
+ if native_check and proposed.get("native_vlan"):
+ command = "no switchport trunk native vlan {0}".format(
+ existing.get("native_vlan")
+ )
+ commands.append(command)
+ if commands:
+ commands.insert(0, "interface " + name)
+ return commands
+
+
+def get_switchport_config_commands(name, existing, proposed, module):
+ """Gets commands required to config a given switchport interface
+ """
+ proposed_mode = proposed.get("mode")
+ existing_mode = existing.get("mode")
+ commands = []
+ command = None
+ if proposed_mode != existing_mode:
+ if proposed_mode == "trunk":
+ command = "switchport mode trunk"
+ elif proposed_mode == "access":
+ command = "switchport mode access"
+ if command:
+ commands.append(command)
+ if proposed_mode == "access":
+ av_check = str(existing.get("access_vlan")) == str(
+ proposed.get("access_vlan")
+ )
+ if not av_check:
+ command = "switchport access vlan {0}".format(
+ proposed.get("access_vlan")
+ )
+ commands.append(command)
+ elif proposed_mode == "trunk":
+ tv_check = existing.get("trunk_vlans_list") == proposed.get(
+ "trunk_vlans_list"
+ )
+ if not tv_check:
+ if proposed.get("allowed"):
+ command = "switchport trunk allowed vlan {0}".format(
+ proposed.get("trunk_allowed_vlans")
+ )
+ commands.append(command)
+ else:
+ existing_vlans = existing.get("trunk_vlans_list")
+ proposed_vlans = proposed.get("trunk_vlans_list")
+ vlans_to_add = set(proposed_vlans).difference(existing_vlans)
+ if vlans_to_add:
+ command = "switchport trunk allowed vlan add {0}".format(
+ proposed.get("trunk_vlans")
+ )
+ commands.append(command)
+ native_check = str(existing.get("native_vlan")) == str(
+ proposed.get("native_vlan")
+ )
+ if not native_check and proposed.get("native_vlan"):
+ command = "switchport trunk native vlan {0}".format(
+ proposed.get("native_vlan")
+ )
+ commands.append(command)
+ if commands:
+ commands.insert(0, "interface " + name)
+ return commands
+
+
+def is_switchport_default(existing):
+ """Determines if switchport has a default config based on mode
+ Args:
+ existing (dict): existing switchport configuration from Ansible mod
+ Returns:
+ boolean: True if switchport has OOB Layer 2 config, i.e.
+ vlan 1 and trunk all and mode is access
+ """
+ c1 = str(existing["access_vlan"]) == "1"
+ c2 = str(existing["native_vlan"]) == "1"
+ c3 = existing["trunk_vlans"] == "1-4094"
+ c4 = existing["mode"] == "access"
+ default = c1 and c2 and c3 and c4
+ return default
+
+
+def default_switchport_config(name):
+ commands = []
+ commands.append("interface " + name)
+ commands.append("switchport mode access")
+ commands.append("switch access vlan 1")
+ commands.append("switchport trunk native vlan 1")
+ commands.append("switchport trunk allowed vlan all")
+ return commands
+
+
+def vlan_range_to_list(vlans):
+ result = []
+ if vlans:
+ for part in vlans.split(","):
+ if part.lower() == "none":
+ break
+ if part:
+ if "-" in part:
+ start, stop = (int(i) for i in part.split("-"))
+ result.extend(range(start, stop + 1))
+ else:
+ result.append(int(part))
+ return sorted(result)
+
+
+def get_list_of_vlans(module):
+ config = run_commands(module, ["show vlan"])[0]
+ vlans = set()
+ lines = config.strip().splitlines()
+ for line in lines:
+ line_parts = line.split()
+ if line_parts:
+ try:
+ int(line_parts[0])
+ except ValueError:
+ continue
+ vlans.add(line_parts[0])
+ return list(vlans)
+
+
+def flatten_list(commands):
+ flat_list = []
+ for command in commands:
+ if isinstance(command, list):
+ flat_list.extend(command)
+ else:
+ flat_list.append(command)
+ return flat_list
+
+
+def map_params_to_obj(module):
+ obj = []
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+ obj.append(item.copy())
+ else:
+ obj.append(
+ {
+ "name": module.params["name"],
+ "mode": module.params["mode"],
+ "access_vlan": module.params["access_vlan"],
+ "native_vlan": module.params["native_vlan"],
+ "trunk_vlans": module.params["trunk_vlans"],
+ "trunk_allowed_vlans": module.params["trunk_allowed_vlans"],
+ "state": module.params["state"],
+ }
+ )
+ return obj
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ name=dict(type="str", aliases=["interface"]),
+ mode=dict(choices=["access", "trunk"]),
+ access_vlan=dict(type="str"),
+ native_vlan=dict(type="str"),
+ trunk_vlans=dict(type="str"),
+ trunk_allowed_vlans=dict(type="str"),
+ state=dict(
+ choices=["absent", "present", "unconfigured"], default="present"
+ ),
+ )
+ aggregate_spec = deepcopy(element_spec)
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec)
+ )
+ argument_spec.update(element_spec)
+ argument_spec.update(ios_argument_spec)
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=[
+ ["access_vlan", "trunk_vlans"],
+ ["access_vlan", "native_vlan"],
+ ["access_vlan", "trunk_allowed_vlans"],
+ ],
+ supports_check_mode=True,
+ )
+ warnings = list()
+ commands = []
+ result = {"changed": False, "warnings": warnings}
+ want = map_params_to_obj(module)
+ for w in want:
+ name = w["name"]
+ mode = w["mode"]
+ access_vlan = w["access_vlan"]
+ state = w["state"]
+ trunk_vlans = w["trunk_vlans"]
+ native_vlan = w["native_vlan"]
+ trunk_allowed_vlans = w["trunk_allowed_vlans"]
+ args = dict(
+ name=name,
+ mode=mode,
+ access_vlan=access_vlan,
+ native_vlan=native_vlan,
+ trunk_vlans=trunk_vlans,
+ trunk_allowed_vlans=trunk_allowed_vlans,
+ )
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+ name = name.lower()
+ if mode == "access" and state == "present" and not access_vlan:
+ module.fail_json(
+ msg="access_vlan param is required when mode=access && state=present"
+ )
+ if mode == "trunk" and access_vlan:
+ module.fail_json(
+ msg="access_vlan param not supported when using mode=trunk"
+ )
+ if not is_switchport(name, module):
+ module.fail_json(
+ msg="""Ensure interface is configured to be a L2
+port first before using this module. You can use
+the ios_interface module for this."""
+ )
+ if interface_is_portchannel(name, module):
+ module.fail_json(
+ msg="""Cannot change L2 config on physical
+port because it is in a portchannel.
+You should update the portchannel config."""
+ )
+ # existing will never be null for Eth intfs as there is always a default
+ existing = get_switchport(name, module)
+ # Safeguard check
+ # If there isn't an existing, something is wrong per previous comment
+ if not existing:
+ module.fail_json(
+ msg="Make sure you are using the FULL interface name"
+ )
+ if trunk_vlans or trunk_allowed_vlans:
+ if trunk_vlans:
+ trunk_vlans_list = vlan_range_to_list(trunk_vlans)
+ elif trunk_allowed_vlans:
+ trunk_vlans_list = vlan_range_to_list(trunk_allowed_vlans)
+ proposed["allowed"] = True
+ existing_trunks_list = vlan_range_to_list(existing["trunk_vlans"])
+ existing["trunk_vlans_list"] = existing_trunks_list
+ proposed["trunk_vlans_list"] = trunk_vlans_list
+ current_vlans = get_list_of_vlans(module)
+ if state == "present":
+ if access_vlan and access_vlan not in current_vlans:
+ module.fail_json(
+ msg="""You are trying to configure a VLAN on an interface that
+does not exist on the switch yet!""",
+ vlan=access_vlan,
+ )
+ elif native_vlan and native_vlan not in current_vlans:
+ module.fail_json(
+ msg="""You are trying to configure a VLAN on an interface that
+does not exist on the switch yet!""",
+ vlan=native_vlan,
+ )
+ else:
+ command = get_switchport_config_commands(
+ name, existing, proposed, module
+ )
+ commands.append(command)
+ elif state == "unconfigured":
+ is_default = is_switchport_default(existing)
+ if not is_default:
+ command = default_switchport_config(name)
+ commands.append(command)
+ elif state == "absent":
+ command = remove_switchport_config_commands(
+ name, existing, proposed, module
+ )
+ commands.append(command)
+ if trunk_vlans or trunk_allowed_vlans:
+ existing.pop("trunk_vlans_list")
+ proposed.pop("trunk_vlans_list")
+ cmds = flatten_list(commands)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ result["changed"] = True
+ load_config(module, cmds)
+ if "configure" in cmds:
+ cmds.pop(0)
+ result["commands"] = cmds
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l2_interfaces.py
new file mode 100644
index 00000000..08b208d4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l2_interfaces.py
@@ -0,0 +1,560 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_l2_interfaces
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: ios_l2_interfaces
+short_description: L2 interfaces resource module
+description: This module provides declarative management of Layer-2 interface on Cisco
+ IOS devices.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL.
+options:
+ config:
+ description: A dictionary of Layer-2 interface options
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.
+ type: str
+ required: true
+ access:
+ description:
+ - Switchport mode access command to configure the interface as a layer 2 access.
+ type: dict
+ suboptions:
+ vlan:
+ description:
+ - Configure given VLAN in access port. It's used as the access VLAN ID.
+ type: int
+ voice:
+ description:
+ - Switchport mode voice command to configure the interface with a voice vlan.
+ type: dict
+ suboptions:
+ vlan:
+ description:
+ - Configure given voice VLAN on access port. It's used as the voice VLAN
+ ID.
+ type: int
+ trunk:
+ description:
+ - Switchport mode trunk command to configure the interface as a Layer 2 trunk.
+ Note The encapsulation is always set to dot1q.
+ type: dict
+ suboptions:
+ allowed_vlans:
+ description:
+ - List of allowed VLANs in a given trunk port. These are the only VLANs
+ that will be configured on the trunk.
+ type: list
+ elements: str
+ native_vlan:
+ description:
+ - Native VLAN to be configured in trunk port. It's used as the trunk native
+ VLAN ID.
+ type: int
+ encapsulation:
+ description:
+ - Trunking encapsulation when interface is in trunking mode.
+ choices:
+ - dot1q
+ - isl
+ - negotiate
+ type: str
+ pruning_vlans:
+ description:
+ - Pruning VLAN to be configured in trunk port. It's used as the trunk
+ pruning VLAN ID.
+ type: list
+ elements: str
+ mode:
+ description:
+ - Mode in which interface needs to be configured.
+ - An interface whose trunk encapsulation is "Auto" can not be configured to
+ "trunk" mode.
+ type: str
+ choices:
+ - access
+ - trunk
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS device by
+ executing the command B(show running-config | section ^interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - rendered
+ - gathered
+ - parsed
+ default: merged
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+
+"""
+
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# viosl2#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# negotiation auto
+# interface GigabitEthernet0/2
+# description This is test
+# switchport access vlan 20
+# media-type rj45
+# negotiation auto
+
+- name: Merge provided configuration with device configuration
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ mode: access
+ access:
+ vlan: 10
+ voice:
+ vlan: 40
+ - name: GigabitEthernet0/2
+ mode: trunk
+ trunk:
+ allowed_vlans: 10-20,40
+ native_vlan: 20
+ pruning_vlans: 10,20
+ encapsulation: dot1q
+ state: merged
+
+# After state:
+# ------------
+#
+# viosl2#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# switchport access vlan 10
+# switchport voice vlan 40
+# switchport mode access
+# negotiation auto
+# interface GigabitEthernet0/2
+# description This is test
+# switchport trunk allowed vlan 10-20,40
+# switchport trunk encapsulation dot1q
+# switchport trunk native vlan 20
+# switchport trunk pruning vlan 10,20
+# switchport mode trunk
+# media-type rj45
+# negotiation auto
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# viosl2#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# switchport access vlan 20
+# negotiation auto
+# interface GigabitEthernet0/2
+# description This is test
+# switchport access vlan 20
+# media-type rj45
+# negotiation auto
+
+- name: Replaces device configuration of listed l2 interfaces with provided configuration
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans: 20-25,40
+ native_vlan: 20
+ pruning_vlans: 10
+ encapsulation: isl
+ state: replaced
+
+# After state:
+# -------------
+#
+# viosl2#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# switchport access vlan 20
+# negotiation auto
+# interface GigabitEthernet0/2
+# description This is test
+# switchport trunk allowed vlan 20-25,40
+# switchport trunk encapsulation isl
+# switchport trunk native vlan 20
+# switchport trunk pruning vlan 10
+# media-type rj45
+# negotiation auto
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# viosl2#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# switchport trunk encapsulation dot1q
+# switchport trunk native vlan 20
+# negotiation auto
+# interface GigabitEthernet0/2
+# description This is test
+# switchport access vlan 20
+# switchport trunk encapsulation dot1q
+# switchport trunk native vlan 20
+# media-type rj45
+# negotiation auto
+
+- name: Override device configuration of all l2 interfaces with provided configuration
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ access:
+ vlan: 20
+ voice:
+ vlan: 40
+ state: overridden
+
+# After state:
+# -------------
+#
+# viosl2#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# negotiation auto
+# interface GigabitEthernet0/2
+# description This is test
+# switchport access vlan 20
+# switchport voice vlan 40
+# media-type rj45
+# negotiation auto
+
+# Using Deleted
+
+# Before state:
+# -------------
+#
+# viosl2#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# switchport access vlan 20
+# negotiation auto
+# interface GigabitEthernet0/2
+# description This is test
+# switchport access vlan 20
+# switchport trunk allowed vlan 20-40,60,80
+# switchport trunk encapsulation dot1q
+# switchport trunk native vlan 10
+# switchport trunk pruning vlan 10
+# media-type rj45
+# negotiation auto
+
+- name: Delete IOS L2 interfaces as in given arguments
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ state: deleted
+
+# After state:
+# -------------
+#
+# viosl2#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# negotiation auto
+# interface GigabitEthernet0/2
+# description This is test
+# switchport access vlan 20
+# switchport trunk allowed vlan 20-40,60,80
+# switchport trunk encapsulation dot1q
+# switchport trunk native vlan 10
+# switchport trunk pruning vlan 10
+# media-type rj45
+# negotiation auto
+
+
+# Using Deleted without any config passed
+#"(NOTE: This will delete all of configured resource module attributes from each configured interface)"
+
+# Before state:
+# -------------
+#
+# viosl2#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# switchport access vlan 20
+# negotiation auto
+# interface GigabitEthernet0/2
+# description This is test
+# switchport access vlan 20
+# switchport trunk allowed vlan 20-40,60,80
+# switchport trunk encapsulation dot1q
+# switchport trunk native vlan 10
+# switchport trunk pruning vlan 10
+# media-type rj45
+# negotiation auto
+
+- name: Delete IOS L2 interfaces as in given arguments
+ cisco.ios.ios_l2_interfaces:
+ state: deleted
+
+# After state:
+# -------------
+#
+# viosl2#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# negotiation auto
+# interface GigabitEthernet0/2
+# description This is test
+# media-type rj45
+# negotiation auto
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | section ^interface
+# interface GigabitEthernet0/1
+# switchport access vlan 10
+# interface GigabitEthernet0/2
+# switchport trunk allowed vlan 10-20,40
+# switchport trunk encapsulation dot1q
+# switchport trunk native vlan 10
+# switchport trunk pruning vlan 10,20
+# switchport mode trunk
+
+- name: Gather listed l2 interfaces with provided configurations
+ cisco.ios.ios_l2_interfaces:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "name": "GigabitEthernet0/0"
+# },
+# {
+# "access": {
+# "vlan": 10
+# },
+# "name": "GigabitEthernet0/1"
+# },
+# {
+# "mode": "trunk",
+# "name": "GigabitEthernet0/2",
+# "trunk": {
+# "allowed_vlans": [
+# "10-20",
+# "40"
+# ],
+# "encapsulation": "dot1q",
+# "native_vlan": 10,
+# "pruning_vlans": [
+# "10",
+# "20"
+# ]
+# }
+# }
+# ]
+
+# After state:
+# ------------
+#
+# vios#sh running-config | section ^interface
+# interface GigabitEthernet0/1
+# switchport access vlan 10
+# interface GigabitEthernet0/2
+# switchport trunk allowed vlan 10-20,40
+# switchport trunk encapsulation dot1q
+# switchport trunk native vlan 10
+# switchport trunk pruning vlan 10,20
+# switchport mode trunk
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ access:
+ vlan: 30
+ - name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans: 10-20,40
+ native_vlan: 20
+ pruning_vlans: 10,20
+ encapsulation: dot1q
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "interface GigabitEthernet0/1",
+# "switchport access vlan 30",
+# "interface GigabitEthernet0/2",
+# "switchport trunk encapsulation dot1q",
+# "switchport trunk native vlan 20",
+# "switchport trunk allowed vlan 10-20,40",
+# "switchport trunk pruning vlan 10,20"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# interface GigabitEthernet0/1
+# switchport mode access
+# switchport access vlan 30
+# interface GigabitEthernet0/2
+# switchport trunk allowed vlan 15-20,40
+# switchport trunk encapsulation dot1q
+# switchport trunk native vlan 20
+# switchport trunk pruning vlan 10,20
+
+- name: Parse the commands for provided configuration
+ cisco.ios.ios_l2_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": [
+# {
+# "access": {
+# "vlan": 30
+# },
+# "mode": "access",
+# "name": "GigabitEthernet0/1"
+# },
+# {
+# "name": "GigabitEthernet0/2",
+# "trunk": {
+# "allowed_vlans": [
+# "15-20",
+# "40"
+# ],
+# "encapsulation": "dot1q",
+# "native_vlan": 20,
+# "pruning_vlans": [
+# "10",
+# "20"
+# ]
+# }
+# }
+# ]
+
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['interface GigabitEthernet0/1', 'switchport access vlan 20']
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.l2_interfaces.l2_interfaces import (
+ L2_InterfacesArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.l2_interfaces.l2_interfaces import (
+ L2_Interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=L2_InterfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = L2_Interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l3_interface.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l3_interface.py
new file mode 100644
index 00000000..2a2b10a5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l3_interface.py
@@ -0,0 +1,382 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_l3_interface
+author: Ganesh Nalawade (@ganeshrn)
+short_description: (deprecated, removed after 2022-06-01) Manage Layer-3 interfaces
+ on Cisco IOS network devices.
+description:
+- This module provides declarative management of Layer-3 interfaces on IOS network
+ devices.
+version_added: 1.0.0
+deprecated:
+ alternative: ios_l3_interfaces
+ why: Newer and updated modules released with more functionality in Ansible 2.9
+ removed_at_date: '2022-06-01'
+notes:
+- Tested against IOS 15.2
+options:
+ name:
+ description:
+ - Name of the Layer-3 interface to be configured eg. GigabitEthernet0/2
+ type: str
+ ipv4:
+ description:
+ - IPv4 address to be set for the Layer-3 interface mentioned in I(name) option.
+ The address format is <ipv4 address>/<mask>, the mask is number in range 0-32
+ eg. 192.168.0.1/24
+ type: str
+ ipv6:
+ description:
+ - IPv6 address to be set for the Layer-3 interface mentioned in I(name) option.
+ The address format is <ipv6 address>/<mask>, the mask is number in range 0-128
+ eg. fd5d:12c9:2201:1::1/64
+ type: str
+ aggregate:
+ description:
+ - List of Layer-3 interfaces definitions. Each of the entry in aggregate list
+ should define name of interface C(name) and a optional C(ipv4) or C(ipv6) address.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name of the Layer-3 interface to be configured eg. GigabitEthernet0/2
+ type: str
+ required: true
+ ipv4:
+ description:
+ - IPv4 address to be set for the Layer-3 interface mentioned in I(name) option.
+ The address format is <ipv4 address>/<mask>, the mask is number in range 0-32
+ eg. 192.168.0.1/24
+ type: str
+ ipv6:
+ description:
+ - IPv6 address to be set for the Layer-3 interface mentioned in I(name) option.
+ The address format is <ipv6 address>/<mask>, the mask is number in range 0-128
+ eg. fd5d:12c9:2201:1::1/64
+ type: str
+ state:
+ description:
+ - State of the Layer-3 interface configuration. It indicates if the configuration
+ should be present or absent on remote device.
+ type: str
+ choices:
+ - present
+ - absent
+ state:
+ description:
+ - State of the Layer-3 interface configuration. It indicates if the configuration
+ should be present or absent on remote device.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+extends_documentation_fragment:
+- cisco.ios.ios
+
+
+"""
+EXAMPLES = """
+- name: Remove GigabitEthernet0/3 IPv4 and IPv6 address
+ cisco.ios.ios_l3_interface:
+ name: GigabitEthernet0/3
+ state: absent
+- name: Set GigabitEthernet0/3 IPv4 address
+ cisco.ios.ios_l3_interface:
+ name: GigabitEthernet0/3
+ ipv4: 192.168.0.1/24
+- name: Set GigabitEthernet0/3 IPv6 address
+ cisco.ios.ios_l3_interface:
+ name: GigabitEthernet0/3
+ ipv6: fd5d:12c9:2201:1::1/64
+- name: Set GigabitEthernet0/3 in dhcp
+ cisco.ios.ios_l3_interface:
+ name: GigabitEthernet0/3
+ ipv4: dhcp
+ ipv6: dhcp
+- name: Set interface Vlan1 (SVI) IPv4 address
+ cisco.ios.ios_l3_interface:
+ name: Vlan1
+ ipv4: 192.168.0.5/24
+- name: Set IP addresses on aggregate
+ cisco.ios.ios_l3_interface:
+ aggregate:
+ - name: GigabitEthernet0/3
+ ipv4: 192.168.2.10/24
+ - name: GigabitEthernet0/3
+ ipv4: 192.168.3.10/24
+ ipv6: fd5d:12c9:2201:1::1/64
+- name: Remove IP addresses on aggregate
+ cisco.ios.ios_l3_interface:
+ aggregate:
+ - name: GigabitEthernet0/3
+ ipv4: 192.168.2.10/24
+ - name: GigabitEthernet0/3
+ ipv4: 192.168.3.10/24
+ ipv6: fd5d:12c9:2201:1::1/64
+ state: absent
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always, except for the platforms that use Netconf transport to manage the device.
+ type: list
+ sample:
+ - interface GigabitEthernet0/2
+ - ip address 192.168.0.1 255.255.255.0
+ - ipv6 address fd5d:12c9:2201:1::1/64
+"""
+import re
+from copy import deepcopy
+from ansible.module_utils._text import to_text
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ is_netmask,
+ is_masklen,
+ to_netmask,
+ to_masklen,
+)
+
+
+def validate_ipv4(value, module):
+ if value:
+ address = value.split("/")
+ if len(address) != 2:
+ module.fail_json(
+ msg="address format is <ipv4 address>/<mask>, got invalid format %s"
+ % value
+ )
+ if not is_masklen(address[1]):
+ module.fail_json(
+ msg="invalid value for mask: %s, mask should be in range 0-32"
+ % address[1]
+ )
+
+
+def validate_ipv6(value, module):
+ if value:
+ address = value.split("/")
+ if len(address) != 2:
+ module.fail_json(
+ msg="address format is <ipv6 address>/<mask>, got invalid format %s"
+ % value
+ )
+ elif not 0 <= int(address[1]) <= 128:
+ module.fail_json(
+ msg="invalid value for mask: %s, mask should be in range 0-128"
+ % address[1]
+ )
+
+
+def validate_param_values(module, obj, param=None):
+ if param is None:
+ param = module.params
+ for key in obj:
+ # validate the param value (if validator func exists)
+ validator = globals().get("validate_%s" % key)
+ if callable(validator):
+ validator(param.get(key), module)
+
+
+def parse_config_argument(configobj, name, arg=None):
+ cfg = configobj["interface %s" % name]
+ cfg = "\n".join(cfg.children)
+ values = []
+ matches = re.finditer("%s (.+)$" % arg, cfg, re.M)
+ for match in matches:
+ match_str = match.group(1).strip()
+ if arg == "ipv6 address":
+ values.append(match_str)
+ else:
+ values = match_str
+ break
+ return values or None
+
+
+def search_obj_in_list(name, lst):
+ for o in lst:
+ if o["name"] == name:
+ return o
+ return None
+
+
+def map_obj_to_commands(updates, module):
+ commands = list()
+ want, have = updates
+ for w in want:
+ name = w["name"]
+ ipv4 = w["ipv4"]
+ ipv6 = w["ipv6"]
+ state = w["state"]
+ interface = "interface " + name
+ commands.append(interface)
+ obj_in_have = search_obj_in_list(name, have)
+ if state == "absent" and obj_in_have:
+ if obj_in_have["ipv4"]:
+ if ipv4:
+ address = ipv4.split("/")
+ if len(address) == 2:
+ ipv4 = "{0} {1}".format(
+ address[0], to_netmask(address[1])
+ )
+ commands.append("no ip address {0}".format(ipv4))
+ else:
+ commands.append("no ip address")
+ if obj_in_have["ipv6"]:
+ if ipv6:
+ commands.append("no ipv6 address {0}".format(ipv6))
+ else:
+ commands.append("no ipv6 address")
+ if "dhcp" in obj_in_have["ipv6"]:
+ commands.append("no ipv6 address dhcp")
+ elif state == "present":
+ if ipv4:
+ if (
+ obj_in_have is None
+ or obj_in_have.get("ipv4") is None
+ or ipv4 != obj_in_have["ipv4"]
+ ):
+ address = ipv4.split("/")
+ if len(address) == 2:
+ ipv4 = "{0} {1}".format(
+ address[0], to_netmask(address[1])
+ )
+ commands.append("ip address {0}".format(ipv4))
+ if ipv6:
+ if (
+ obj_in_have is None
+ or obj_in_have.get("ipv6") is None
+ or ipv6.lower()
+ not in [addr.lower() for addr in obj_in_have["ipv6"]]
+ ):
+ commands.append("ipv6 address {0}".format(ipv6))
+ if commands[-1] == interface:
+ commands.pop(-1)
+ return commands
+
+
+def map_config_to_obj(module):
+ config = get_config(module)
+ configobj = NetworkConfig(indent=1, contents=config)
+ match = re.findall("^interface (\\S+)", config, re.M)
+ if not match:
+ return list()
+ instances = list()
+ for item in set(match):
+ ipv4 = parse_config_argument(configobj, item, "ip address")
+ if ipv4:
+ address = ipv4.strip().split(" ")
+ if len(address) == 2 and is_netmask(address[1]):
+ ipv4 = "{0}/{1}".format(
+ address[0], to_text(to_masklen(address[1]))
+ )
+ obj = {
+ "name": item,
+ "ipv4": ipv4,
+ "ipv6": parse_config_argument(configobj, item, "ipv6 address"),
+ "state": "present",
+ }
+ instances.append(obj)
+ return instances
+
+
+def map_params_to_obj(module):
+ obj = []
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+ validate_param_values(module, item, item)
+ obj.append(item.copy())
+ else:
+ obj.append(
+ {
+ "name": module.params["name"],
+ "ipv4": module.params["ipv4"],
+ "ipv6": module.params["ipv6"],
+ "state": module.params["state"],
+ }
+ )
+ validate_param_values(module, obj)
+ return obj
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ name=dict(),
+ ipv4=dict(),
+ ipv6=dict(),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["name"] = dict(required=True)
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec)
+ )
+ argument_spec.update(element_spec)
+ argument_spec.update(ios_argument_spec)
+ required_one_of = [["name", "aggregate"]]
+ mutually_exclusive = [["name", "aggregate"]]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=required_one_of,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ warnings = list()
+ result = {"changed": False}
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands((want, have), module)
+ result["commands"] = commands
+ if commands:
+ if not module.check_mode:
+ resp = load_config(module, commands)
+ warnings.extend(out for out in resp if out)
+ result["changed"] = True
+ if warnings:
+ result["warnings"] = warnings
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l3_interfaces.py
new file mode 100644
index 00000000..0ea1bb3a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_l3_interfaces.py
@@ -0,0 +1,605 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_l3_interfaces
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: ios_l3_interfaces
+short_description: L3 interfaces resource module
+description:
+- This module provides declarative management of Layer-3 interface on Cisco IOS devices.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL.
+options:
+ config:
+ description: A dictionary of Layer-3 interface options
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.
+ type: str
+ required: true
+ ipv4:
+ description:
+ - IPv4 address to be set for the Layer-3 interface mentioned in I(name) option.
+ The address format is <ipv4 address>/<mask>, the mask is number in range
+ 0-32 eg. 192.168.0.1/24.
+ type: list
+ elements: dict
+ suboptions:
+ address:
+ description:
+ - Configures the IPv4 address for Interface.
+ type: str
+ secondary:
+ description:
+ - Configures the IP address as a secondary address.
+ type: bool
+ dhcp_client:
+ description:
+ - Configures and specifies client-id to use over DHCP ip. Note, This option
+ shall work only when dhcp is configured as IP.
+ - GigabitEthernet interface number
+ type: int
+ dhcp_hostname:
+ description:
+ - Configures and specifies value for hostname option over DHCP ip. Note,
+ This option shall work only when dhcp is configured as IP.
+ type: str
+ ipv6:
+ description:
+ - IPv6 address to be set for the Layer-3 interface mentioned in I(name) option.
+ - The address format is <ipv6 address>/<mask>, the mask is number in range
+ 0-128 eg. fd5d:12c9:2201:1::1/64
+ type: list
+ elements: dict
+ suboptions:
+ address:
+ description:
+ - Configures the IPv6 address for Interface.
+ type: str
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS device
+ by executing the command B(show running-config | section ^interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - rendered
+ - gathered
+ - parsed
+ default: merged
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command
+ I(show running-config | section ^interface) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+
+"""
+
+EXAMPLES = """
+# Using merged
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# ip address 10.1.1.1 255.255.255.0
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description This is test
+# no ip address
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# no ip address
+# interface GigabitEthernet0/3.100
+# encapsulation dot1Q 20
+
+- name: Merge provided configuration with device configuration
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ ipv4:
+ - address: 192.168.0.1/24
+ secondary: true
+ - name: GigabitEthernet0/2
+ ipv4:
+ - address: 192.168.0.2/24
+ - name: GigabitEthernet0/3
+ ipv6:
+ - address: fd5d:12c9:2201:1::1/64
+ - name: GigabitEthernet0/3.100
+ ipv4:
+ - address: 192.168.0.3/24
+ state: merged
+
+# After state:
+# ------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# ip address 10.1.1.1 255.255.255.0
+# ip address 192.168.0.1 255.255.255.0 secondary
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description This is test
+# ip address 192.168.0.2 255.255.255.0
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# ipv6 address FD5D:12C9:2201:1::1/64
+# interface GigabitEthernet0/3.100
+# encapsulation dot1Q 20
+# ip address 192.168.0.3 255.255.255.0
+
+# Using replaced
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# ip address 10.1.1.1 255.255.255.0
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description This is test
+# no ip address
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# ip address 192.168.2.0 255.255.255.0
+# interface GigabitEthernet0/3.100
+# encapsulation dot1Q 20
+# ip address 192.168.0.2 255.255.255.0
+
+- name: Replaces device configuration of listed interfaces with provided configuration
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ ipv4:
+ - address: 192.168.2.0/24
+ - name: GigabitEthernet0/3
+ ipv4:
+ - address: dhcp
+ dhcp_client: 2
+ dhcp_hostname: test.com
+ - name: GigabitEthernet0/3.100
+ ipv4:
+ - address: 192.168.0.3/24
+ secondary: true
+ state: replaced
+
+# After state:
+# ------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# ip address 10.1.1.1 255.255.255.0
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description This is test
+# ip address 192.168.2.1 255.255.255.0
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# ip address dhcp client-id GigabitEthernet0/2 hostname test.com
+# interface GigabitEthernet0/3.100
+# encapsulation dot1Q 20
+# ip address 192.168.0.2 255.255.255.0
+# ip address 192.168.0.3 255.255.255.0 secondary
+
+# Using overridden
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# ip address 10.1.1.1 255.255.255.0
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description This is test
+# ip address 192.168.2.1 255.255.255.0
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# ipv6 address FD5D:12C9:2201:1::1/64
+# interface GigabitEthernet0/3.100
+# encapsulation dot1Q 20
+# ip address 192.168.0.2 255.255.255.0
+
+- name: Override device configuration of all interfaces with provided configuration
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ ipv4:
+ - address: 192.168.0.1/24
+ - name: GigabitEthernet0/3.100
+ ipv6:
+ - address: autoconfig
+ state: overridden
+
+# After state:
+# ------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# description Configured by Ansible
+# no ip address
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description This is test
+# ip address 192.168.0.1 255.255.255.0
+# duplex auto
+# speed 1000
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# interface GigabitEthernet0/3.100
+# encapsulation dot1Q 20
+# ipv6 address autoconfig
+
+# Using Deleted
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# ip address 192.0.2.10 255.255.255.0
+# shutdown
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description Configured by Ansible Network
+# ip address 192.168.1.0 255.255.255.0
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# ip address 192.168.0.1 255.255.255.0
+# shutdown
+# duplex full
+# speed 10
+# ipv6 address FD5D:12C9:2201:1::1/64
+# interface GigabitEthernet0/3.100
+# encapsulation dot1Q 20
+# ip address 192.168.0.2 255.255.255.0
+
+- name: "Delete attributes of given interfaces (NOTE: This won't delete the interface sitself)"
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ - name: GigabitEthernet0/3.100
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# no ip address
+# shutdown
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description Configured by Ansible Network
+# no ip address
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# ip address 192.168.0.1 255.255.255.0
+# shutdown
+# duplex full
+# speed 10
+# ipv6 address FD5D:12C9:2201:1::1/64
+# interface GigabitEthernet0/3.100
+# encapsulation dot1Q 20
+
+# Using Deleted without any config passed
+#"(NOTE: This will delete all of configured L3 resource module attributes from each configured interface)"
+
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# ip address 192.0.2.10 255.255.255.0
+# shutdown
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description Configured by Ansible Network
+# ip address 192.168.1.0 255.255.255.0
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# ip address 192.168.0.1 255.255.255.0
+# shutdown
+# duplex full
+# speed 10
+# ipv6 address FD5D:12C9:2201:1::1/64
+# interface GigabitEthernet0/3.100
+# encapsulation dot1Q 20
+# ip address 192.168.0.2 255.255.255.0
+
+- name: "Delete L3 attributes of ALL interfaces together (NOTE: This won't delete the interface itself)"
+ cisco.ios.ios_l3_interfaces:
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface GigabitEthernet0/1
+# no ip address
+# shutdown
+# duplex auto
+# speed auto
+# interface GigabitEthernet0/2
+# description Configured by Ansible Network
+# no ip address
+# interface GigabitEthernet0/3
+# description Configured by Ansible Network
+# shutdown
+# duplex full
+# speed 10
+# interface GigabitEthernet0/3.100
+# encapsulation dot1Q 20
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | section ^interface
+# interface GigabitEthernet0/1
+# ip address 203.0.113.27 255.255.255.0
+# interface GigabitEthernet0/2
+# ip address 192.0.2.1 255.255.255.0 secondary
+# ip address 192.0.2.2 255.255.255.0
+# ipv6 address 2001:DB8:0:3::/64
+
+- name: Gather listed l3 interfaces with provided configurations
+ cisco.ios.ios_l3_interfaces:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "ipv4": [
+# {
+# "address": "203.0.113.27 255.255.255.0"
+# }
+# ],
+# "name": "GigabitEthernet0/1"
+# },
+# {
+# "ipv4": [
+# {
+# "address": "192.0.2.1 255.255.255.0",
+# "secondary": true
+# },
+# {
+# "address": "192.0.2.2 255.255.255.0"
+# }
+# ],
+# "ipv6": [
+# {
+# "address": "2001:db8:0:3::/64"
+# }
+# ],
+# "name": "GigabitEthernet0/2"
+# }
+# ]
+
+# After state:
+# ------------
+#
+# vios#sh running-config | section ^interface
+# interface GigabitEthernet0/1
+# ip address 203.0.113.27 255.255.255.0
+# interface GigabitEthernet0/2
+# ip address 192.0.2.1 255.255.255.0 secondary
+# ip address 192.0.2.2 255.255.255.0
+# ipv6 address 2001:DB8:0:3::/64
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ ipv4:
+ - address: dhcp
+ dhcp_client: 0
+ dhcp_hostname: test.com
+ - name: GigabitEthernet0/2
+ ipv4:
+ - address: 198.51.100.1/24
+ secondary: true
+ - address: 198.51.100.2/24
+ ipv6:
+ - address: 2001:db8:0:3::/64
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "interface GigabitEthernet0/1",
+# "ip address dhcp client-id GigabitEthernet 0/0 hostname test.com",
+# "interface GigabitEthernet0/2",
+# "ip address 198.51.100.1 255.255.255.0 secondary",
+# "ip address 198.51.100.2 255.255.255.0",
+# "ipv6 address 2001:db8:0:3::/64"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# interface GigabitEthernet0/1
+# ip address dhcp client-id
+# GigabitEthernet 0/0 hostname test.com
+# interface GigabitEthernet0/2
+# ip address 198.51.100.1 255.255.255.0
+# secondary ip address 198.51.100.2 255.255.255.0
+# ipv6 address 2001:db8:0:3::/64
+
+- name: Parse the commands for provided configuration
+ cisco.ios.ios_l3_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": [
+# {
+# "ipv4": [
+# {
+# "address": "dhcp",
+# "dhcp_client": 0,
+# "dhcp_hostname": "test.com"
+# }
+# ],
+# "name": "GigabitEthernet0/1"
+# },
+# {
+# "ipv4": [
+# {
+# "address": "198.51.100.1 255.255.255.0",
+# "secondary": true
+# },
+# {
+# "address": "198.51.100.2 255.255.255.0"
+# }
+# ],
+# "ipv6": [
+# {
+# "address": "2001:db8:0:3::/64"
+# }
+# ],
+# "name": "GigabitEthernet0/2"
+# }
+# ]
+
+"""
+
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['interface GigabitEthernet0/1', 'ip address 192.168.0.2 255.255.255.0']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.l3_interfaces.l3_interfaces import (
+ L3_InterfacesArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.l3_interfaces.l3_interfaces import (
+ L3_Interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=L3_InterfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = L3_Interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lacp.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lacp.py
new file mode 100644
index 00000000..71884ab0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lacp.py
@@ -0,0 +1,273 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_lacp
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: ios_lacp
+short_description: LACP resource module
+description: This module provides declarative management of Global LACP on Cisco IOS
+ network devices.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL.
+options:
+ config:
+ description: The provided configurations.
+ type: dict
+ suboptions:
+ system:
+ description: This option sets the default system parameters for LACP.
+ type: dict
+ suboptions:
+ priority:
+ description:
+ - LACP priority for the system.
+ - Refer to vendor documentation for valid values.
+ type: int
+ required: true
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS device by
+ executing the command B(show lacp sys-id).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - deleted
+ - rendered
+ - parsed
+ - gathered
+ default: merged
+"""
+
+EXAMPLES = """
+# Using merged
+#
+# Before state:
+# -------------
+#
+# vios#show lacp sys-id
+# 32768, 5e00.0000.8000
+
+- name: Merge provided configuration with device configuration
+ cisco.ios.ios_lacp:
+ config:
+ system:
+ priority: 123
+ state: merged
+
+# After state:
+# ------------
+#
+# vios#show lacp sys-id
+# 123, 5e00.0000.8000
+
+# Using replaced
+#
+# Before state:
+# -------------
+#
+# vios#show lacp sys-id
+# 500, 5e00.0000.8000
+
+- name: Replaces Global LACP configuration
+ cisco.ios.ios_lacp:
+ config:
+ system:
+ priority: 123
+ state: replaced
+
+# After state:
+# ------------
+#
+# vios#show lacp sys-id
+# 123, 5e00.0000.8000
+
+# Using Deleted
+#
+# Before state:
+# -------------
+#
+# vios#show lacp sys-id
+# 500, 5e00.0000.8000
+
+- name: Delete Global LACP attribute
+ cisco.ios.ios_lacp:
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios#show lacp sys-id
+# 32768, 5e00.0000.8000
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# vios#show lacp sys-id
+# 123, 5e00.0000.8000
+
+- name: Gather listed LACP with provided configurations
+ cisco.ios.ios_lacp:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": {
+# "system": {
+# "priority": 500
+# }
+# }
+
+# After state:
+# ------------
+#
+# vios#show lacp sys-id
+# 123, 5e00.0000.8000
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_lacp:
+ config:
+ system:
+ priority: 123
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "lacp system-priority 10"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# lacp system-priority 123
+
+- name: Parse the commands for provided configuration
+ cisco.ios.ios_lacp:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": {
+# "system": {
+# "priority": 123
+# }
+# }
+
+"""
+
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['lacp system-priority 10']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.lacp.lacp import (
+ LacpArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.lacp.lacp import (
+ Lacp,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=LacpArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = Lacp(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lacp_interfaces.py
new file mode 100644
index 00000000..7bf4092a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lacp_interfaces.py
@@ -0,0 +1,508 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_lacp_interfaces
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: ios_lacp_interfaces
+short_description: LACP interfaces resource module
+description: This module provides declarative management of LACP on Cisco IOS network
+ devices lacp_interfaces.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL.
+options:
+ config:
+ description: A dictionary of LACP lacp_interfaces option
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name of the Interface for configuring LACP.
+ type: str
+ required: true
+ port_priority:
+ description:
+ - LACP priority on this interface.
+ - Refer to vendor documentation for valid port values.
+ type: int
+ fast_switchover:
+ description:
+ - LACP fast switchover supported on this port channel.
+ type: bool
+ max_bundle:
+ description:
+ - LACP maximum number of ports to bundle in this port channel.
+ - Refer to vendor documentation for valid port values.
+ type: int
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS device by
+ executing the command B(show running-config | section ^interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - rendered
+ - gathered
+ - parsed
+ default: merged
+"""
+
+EXAMPLES = """
+# Using merged
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# interface GigabitEthernet0/2
+# shutdown
+# interface GigabitEthernet0/3
+# shutdown
+
+- name: Merge provided configuration with device configuration
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ port_priority: 10
+ - name: GigabitEthernet0/2
+ port_priority: 20
+ - name: GigabitEthernet0/3
+ port_priority: 30
+ - name: Port-channel10
+ fast_switchover: true
+ max_bundle: 5
+ state: merged
+
+# After state:
+# ------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# lacp fast-switchover
+# lacp max-bundle 5
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# lacp port-priority 10
+# interface GigabitEthernet0/2
+# shutdown
+# lacp port-priority 20
+# interface GigabitEthernet0/3
+# shutdown
+# lacp port-priority 30
+
+# Using overridden
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# lacp fast-switchover
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# lacp port-priority 10
+# interface GigabitEthernet0/2
+# shutdown
+# lacp port-priority 20
+# interface GigabitEthernet0/3
+# shutdown
+# lacp port-priority 30
+
+- name: Override device configuration of all lacp_interfaces with provided configuration
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ port_priority: 20
+ - name: Port-channel10
+ max_bundle: 2
+ state: overridden
+
+# After state:
+# ------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# lacp max-bundle 2
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# lacp port-priority 20
+# interface GigabitEthernet0/2
+# shutdown
+# interface GigabitEthernet0/3
+# shutdown
+
+# Using replaced
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# lacp max-bundle 5
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# lacp port-priority 10
+# interface GigabitEthernet0/2
+# shutdown
+# lacp port-priority 20
+# interface GigabitEthernet0/3
+# shutdown
+# lacp port-priority 30
+
+- name: Replaces device configuration of listed lacp_interfaces with provided configuration
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/3
+ port_priority: 40
+ - name: Port-channel10
+ fast_switchover: true
+ max_bundle: 2
+ state: replaced
+
+# After state:
+# ------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# lacp fast-switchover
+# lacp max-bundle 2
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# lacp port-priority 10
+# interface GigabitEthernet0/2
+# shutdown
+# lacp port-priority 20
+# interface GigabitEthernet0/3
+# shutdown
+# lacp port-priority 40
+
+# Using Deleted
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# flowcontrol receive on
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# lacp port-priority 10
+# interface GigabitEthernet0/2
+# shutdown
+# lacp port-priority 20
+# interface GigabitEthernet0/3
+# shutdown
+# lacp port-priority 30
+
+- name: "Delete LACP attributes of given interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# interface GigabitEthernet0/2
+# shutdown
+# lacp port-priority 20
+# interface GigabitEthernet0/3
+# shutdown
+# lacp port-priority 30
+
+# Using Deleted without any config passed
+# "(NOTE: This will delete all of configured LLDP module attributes)"
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# lacp fast-switchover
+# interface Port-channel20
+# lacp max-bundle 2
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# lacp port-priority 10
+# interface GigabitEthernet0/2
+# shutdown
+# lacp port-priority 20
+# interface GigabitEthernet0/3
+# shutdown
+# lacp port-priority 30
+
+- name: "Delete LACP attributes for all configured interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_lacp_interfaces:
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# interface GigabitEthernet0/2
+# shutdown
+# interface GigabitEthernet0/3
+# shutdown
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | section ^interface
+# interface Port-channel10
+# lacp fast-switchover
+# lacp max-bundle 2
+# interface Port-channel40
+# lacp max-bundle 5
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# lacp port-priority 30
+# interface GigabitEthernet0/2
+# lacp port-priority 20
+
+- name: Gather listed LACP interfaces with provided configurations
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "fast_switchover": true,
+# "max_bundle": 2,
+# "name": "Port-channel10"
+# },
+# {
+# "max_bundle": 5,
+# "name": "Port-channel40"
+# },
+# {
+# "name": "GigabitEthernet0/0"
+# },
+# {
+# "name": "GigabitEthernet0/1",
+# "port_priority": 30
+# },
+# {
+# "name": "GigabitEthernet0/2",
+# "port_priority": 20
+# }
+# ]
+
+# After state:
+# ------------
+#
+# vios#sh running-config | section ^interface
+# interface Port-channel10
+# lacp fast-switchover
+# lacp max-bundle 2
+# interface Port-channel40
+# lacp max-bundle 5
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# lacp port-priority 30
+# interface GigabitEthernet0/2
+# lacp port-priority 20
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ port_priority: 10
+ - name: GigabitEthernet0/2
+ port_priority: 20
+ - name: Port-channel10
+ fast_switchover: true
+ max_bundle: 2
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "interface GigabitEthernet0/1",
+# "lacp port-priority 10",
+# "interface GigabitEthernet0/2",
+# "lacp port-priority 20",
+# "interface Port-channel10",
+# "lacp max-bundle 2",
+# "lacp fast-switchover"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# interface GigabitEthernet0/1
+# lacp port-priority 10
+# interface GigabitEthernet0/2
+# lacp port-priority 20
+# interface Port-channel10
+# lacp max-bundle 2 fast-switchover
+
+- name: Parse the commands for provided configuration
+ cisco.ios.ios_lacp_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": [
+# {
+# "name": "GigabitEthernet0/1",
+# "port_priority": 10
+# },
+# {
+# "name": "GigabitEthernet0/2",
+# "port_priority": 20
+# },
+# {
+# "fast_switchover": true,
+# "max_bundle": 2,
+# "name": "Port-channel10"
+# }
+# ]
+
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface GigabitEthernet 0/1', 'lacp port-priority 30']
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.lacp_interfaces.lacp_interfaces import (
+ Lacp_InterfacesArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.lacp_interfaces.lacp_interfaces import (
+ Lacp_Interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Lacp_InterfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = Lacp_Interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lag_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lag_interfaces.py
new file mode 100644
index 00000000..679925ea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lag_interfaces.py
@@ -0,0 +1,534 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_l3_interfaces
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_lag_interfaces
+short_description: LAG interfaces resource module
+description: This module manages properties of Link Aggregation Group on Cisco IOS
+ devices.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL.
+options:
+ config:
+ description: A list of link aggregation group configurations.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - ID of Ethernet Channel of interfaces.
+ - Refer to vendor documentation for valid port values.
+ type: str
+ required: true
+ members:
+ description:
+ - Interface options for the link aggregation group.
+ type: list
+ elements: dict
+ suboptions:
+ member:
+ description:
+ - Interface member of the link aggregation group.
+ type: str
+ mode:
+ description:
+ - Etherchannel Mode of the interface for link aggregation.
+ - On mode has to be quoted as 'on' or else pyyaml will convert
+ to True before it gets to Ansible.
+ type: str
+ required: true
+ choices:
+ - auto
+ - 'on'
+ - desirable
+ - active
+ - passive
+ link:
+ description:
+ - Assign a link identifier used for load-balancing.
+ - Refer to vendor documentation for valid values.
+ - NOTE, parameter only supported on Cisco IOS XE platform.
+ type: int
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS device
+ by executing the command B(show running-config | section ^interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - rendered
+ - parsed
+ - gathered
+ default: merged
+"""
+EXAMPLES = """
+# Using merged
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface GigabitEthernet0/1
+# shutdown
+# interface GigabitEthernet0/2
+# shutdown
+# interface GigabitEthernet0/3
+# shutdown
+# interface GigabitEthernet0/4
+# shutdown
+
+- name: Merge provided configuration with device configuration
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: 10
+ members:
+ - member: GigabitEthernet0/1
+ mode: auto
+ - member: GigabitEthernet0/2
+ mode: auto
+ - name: 20
+ members:
+ - member: GigabitEthernet0/3
+ mode: on
+ - name: 30
+ members:
+ - member: GigabitEthernet0/4
+ mode: active
+ state: merged
+
+# After state:
+# ------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# channel-group 10 mode auto
+# interface GigabitEthernet0/2
+# shutdown
+# channel-group 10 mode auto
+# interface GigabitEthernet0/3
+# shutdown
+# channel-group 20 mode on
+# interface GigabitEthernet0/4
+# shutdown
+# channel-group 30 mode active
+
+# Using overridden
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# channel-group 10 mode auto
+# interface GigabitEthernet0/2
+# shutdown
+# channel-group 10 mode auto
+# interface GigabitEthernet0/3
+# shutdown
+# channel-group 20 mode on
+# interface GigabitEthernet0/4
+# shutdown
+# channel-group 30 mode active
+
+- name: Override device configuration of all interfaces with provided configuration
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: 20
+ members:
+ - member: GigabitEthernet0/2
+ mode: auto
+ - member: GigabitEthernet0/3
+ mode: auto
+ state: overridden
+
+# After state:
+# ------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# interface GigabitEthernet0/2
+# shutdown
+# channel-group 20 mode auto
+# interface GigabitEthernet0/3
+# shutdown
+# channel-group 20 mode auto
+# interface GigabitEthernet0/4
+# shutdown
+
+# Using replaced
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# channel-group 10 mode auto
+# interface GigabitEthernet0/2
+# shutdown
+# channel-group 10 mode auto
+# interface GigabitEthernet0/3
+# shutdown
+# channel-group 20 mode on
+# interface GigabitEthernet0/4
+# shutdown
+# channel-group 30 mode active
+
+- name: Replaces device configuration of listed interfaces with provided configuration
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: 40
+ members:
+ - member: GigabitEthernet0/3
+ mode: auto
+ state: replaced
+
+# After state:
+# ------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface Port-channel20
+# interface Port-channel30
+# interface Port-channel40
+# interface GigabitEthernet0/1
+# shutdown
+# channel-group 10 mode auto
+# interface GigabitEthernet0/2
+# shutdown
+# channel-group 10 mode auto
+# interface GigabitEthernet0/3
+# shutdown
+# channel-group 40 mode on
+# interface GigabitEthernet0/4
+# shutdown
+# channel-group 30 mode active
+
+# Using Deleted
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# channel-group 10 mode auto
+# interface GigabitEthernet0/2
+# shutdown
+# channel-group 10 mode auto
+# interface GigabitEthernet0/3
+# shutdown
+# channel-group 20 mode on
+# interface GigabitEthernet0/4
+# shutdown
+# channel-group 30 mode active
+
+- name: "Delete LAG attributes of given interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: 10
+ - name: 20
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# interface GigabitEthernet0/2
+# shutdown
+# interface GigabitEthernet0/3
+# shutdown
+# interface GigabitEthernet0/4
+# shutdown
+# channel-group 30 mode active
+
+# Using Deleted without any config passed
+#"(NOTE: This will delete all of configured LLDP module attributes)"
+
+#
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# channel-group 10 mode auto
+# interface GigabitEthernet0/2
+# shutdown
+# channel-group 10 mode auto
+# interface GigabitEthernet0/3
+# shutdown
+# channel-group 20 mode on
+# interface GigabitEthernet0/4
+# shutdown
+# channel-group 30 mode active
+
+- name: "Delete all configured LAG attributes for interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_lag_interfaces:
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel10
+# interface Port-channel20
+# interface Port-channel30
+# interface GigabitEthernet0/1
+# shutdown
+# interface GigabitEthernet0/2
+# shutdown
+# interface GigabitEthernet0/3
+# shutdown
+# interface GigabitEthernet0/4
+# shutdown
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# vios#show running-config | section ^interface
+# interface Port-channel11
+# interface Port-channel22
+# interface GigabitEthernet0/1
+# shutdown
+# channel-group 11 mode active
+# interface GigabitEthernet0/2
+# shutdown
+# channel-group 22 mode active
+
+- name: Gather listed LAG interfaces with provided configurations
+ cisco.ios.ios_lag_interfaces:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "members": [
+# {
+# "member": "GigabitEthernet0/1",
+# "mode": "active"
+# }
+# ],
+# "name": "Port-channel11"
+# },
+# {
+# "members": [
+# {
+# "member": "GigabitEthernet0/2",
+# "mode": "active"
+# }
+# ],
+# "name": "Port-channel22"
+# }
+# ]
+
+# After state:
+# ------------
+#
+# vios#sh running-config | section ^interface
+# interface Port-channel11
+# interface Port-channel22
+# interface GigabitEthernet0/1
+# shutdown
+# channel-group 11 mode active
+# interface GigabitEthernet0/2
+# shutdown
+# channel-group 22 mode active
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: Port-channel11
+ members:
+ - member: GigabitEthernet0/1
+ mode: active
+ - name: Port-channel22
+ members:
+ - member: GigabitEthernet0/2
+ mode: passive
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "interface GigabitEthernet0/1",
+# "channel-group 11 mode active",
+# "interface GigabitEthernet0/2",
+# "channel-group 22 mode passive",
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# interface GigabitEthernet0/1
+# channel-group 11 mode active
+# interface GigabitEthernet0/2
+# channel-group 22 mode passive
+
+- name: Parse the commands for provided configuration
+ cisco.ios.ios_lag_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": [
+# {
+# "members": [
+# {
+# "member": "GigabitEthernet0/1",
+# "mode": "active"
+# }
+# ],
+# "name": "Port-channel11"
+# },
+# {
+# "members": [
+# {
+# "member": "GigabitEthernet0/2",
+# "mode": "passive"
+# }
+# ],
+# "name": "Port-channel22"
+# }
+# ]
+
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['interface GigabitEthernet0/1', 'channel-group 1 mode active']
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.lag_interfaces.lag_interfaces import (
+ Lag_interfacesArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.lag_interfaces.lag_interfaces import (
+ Lag_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Lag_interfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = Lag_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_linkagg.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_linkagg.py
new file mode 100644
index 00000000..ebf934d8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_linkagg.py
@@ -0,0 +1,363 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = r"""
+module: ios_linkagg
+author: Trishna Guha (@trishnaguha)
+short_description: Manage link aggregation groups on Cisco IOS network devices
+description:
+- This module provides declarative management of link aggregation groups on Cisco
+ IOS network devices.
+version_added: 1.0.0
+notes:
+- Tested against IOS 15.2
+options:
+ group:
+ description:
+ - Channel-group number for the port-channel Link aggregation group. Range 1-255.
+ type: int
+ mode:
+ description:
+ - Mode of the link aggregation group.
+ - On mode has to be quoted as 'on' or else pyyaml will convert
+ to True before it gets to Ansible.
+ choices:
+ - active
+ - 'on'
+ - passive
+ - auto
+ - desirable
+ type: str
+ members:
+ description:
+ - List of members of the link aggregation group.
+ type: list
+ elements: str
+ aggregate:
+ description: List of link aggregation definitions.
+ type: list
+ elements: dict
+ suboptions:
+ group:
+ description:
+ - Channel-group number for the port-channel Link aggregation group. Range 1-255.
+ type: str
+ required: true
+ mode:
+ description:
+ - Mode of the link aggregation group.
+ - On mode has to be quoted as 'on' or else pyyaml will convert
+ to True before it gets to Ansible.
+ choices:
+ - active
+ - 'on'
+ - passive
+ - auto
+ - desirable
+ type: str
+ members:
+ description:
+ - List of members of the link aggregation group.
+ type: list
+ elements: str
+ state:
+ description:
+ - State of the link aggregation group.
+ choices:
+ - present
+ - absent
+ type: str
+ state:
+ description:
+ - State of the link aggregation group.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+ purge:
+ description:
+ - Purge links not defined in the I(aggregate) parameter.
+ default: false
+ type: bool
+extends_documentation_fragment:
+- cisco.ios.ios
+"""
+EXAMPLES = """
+- name: create link aggregation group
+ cisco.ios.ios_linkagg:
+ group: 10
+ state: present
+
+- name: delete link aggregation group
+ cisco.ios.ios_linkagg:
+ group: 10
+ state: absent
+
+- name: set link aggregation group to members
+ cisco.ios.ios_linkagg:
+ group: 200
+ mode: active
+ members:
+ - GigabitEthernet0/0
+ - GigabitEthernet0/1
+
+- name: remove link aggregation group from GigabitEthernet0/0
+ cisco.ios.ios_linkagg:
+ group: 200
+ mode: active
+ members:
+ - GigabitEthernet0/1
+
+- name: Create aggregate of linkagg definitions
+ cisco.ios.ios_linkagg:
+ aggregate:
+ - {group: 3, mode: on, members: [GigabitEthernet0/1]}
+ - {group: 100, mode: passive, members: [GigabitEthernet0/2]}
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always, except for the platforms that use Netconf transport to manage the device.
+ type: list
+ sample:
+ - interface port-channel 30
+ - interface GigabitEthernet0/3
+ - channel-group 30 mode on
+ - no interface port-channel 30
+"""
+import re
+from copy import deepcopy
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+
+
+def search_obj_in_list(group, lst):
+ for o in lst:
+ if o["group"] == group:
+ return o
+
+
+def map_obj_to_commands(updates, module):
+ commands = list()
+ want, have = updates
+ purge = module.params["purge"]
+ for w in want:
+ group = w["group"]
+ mode = w["mode"]
+ members = w.get("members") or []
+ state = w["state"]
+ del w["state"]
+ obj_in_have = search_obj_in_list(group, have)
+ if state == "absent":
+ if obj_in_have:
+ commands.append("no interface port-channel {0}".format(group))
+ elif state == "present":
+ cmd = ["interface port-channel {0}".format(group), "end"]
+ if not obj_in_have:
+ if not group:
+ module.fail_json(msg="group is a required option")
+ commands.extend(cmd)
+ if members:
+ for m in members:
+ commands.append("interface {0}".format(m))
+ commands.append(
+ "channel-group {0} mode {1}".format(group, mode)
+ )
+ elif members:
+ if "members" not in obj_in_have.keys():
+ for m in members:
+ commands.extend(cmd)
+ commands.append("interface {0}".format(m))
+ commands.append(
+ "channel-group {0} mode {1}".format(group, mode)
+ )
+ elif set(members) != set(obj_in_have["members"]):
+ missing_members = list(
+ set(members) - set(obj_in_have["members"])
+ )
+ for m in missing_members:
+ commands.extend(cmd)
+ commands.append("interface {0}".format(m))
+ commands.append(
+ "channel-group {0} mode {1}".format(group, mode)
+ )
+ superfluous_members = list(
+ set(obj_in_have["members"]) - set(members)
+ )
+ for m in superfluous_members:
+ commands.extend(cmd)
+ commands.append("interface {0}".format(m))
+ commands.append(
+ "no channel-group {0} mode {1}".format(group, mode)
+ )
+ if purge:
+ for h in have:
+ obj_in_want = search_obj_in_list(h["group"], want)
+ if not obj_in_want:
+ commands.append(
+ "no interface port-channel {0}".format(h["group"])
+ )
+ return commands
+
+
+def map_params_to_obj(module):
+ obj = []
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+ d = item.copy()
+ d["group"] = str(d["group"])
+ obj.append(d)
+ else:
+ obj.append(
+ {
+ "group": str(module.params["group"]),
+ "mode": module.params["mode"],
+ "members": module.params["members"],
+ "state": module.params["state"],
+ }
+ )
+ return obj
+
+
+def parse_mode(module, config, group, member):
+ mode = None
+ netcfg = CustomNetworkConfig(indent=1, contents=config)
+ parents = ["interface {0}".format(member)]
+ body = netcfg.get_section(parents)
+ match_int = re.findall("interface {0}\\n".format(member), body, re.M)
+ if match_int:
+ match = re.search(
+ "channel-group {0} mode (\\S+)".format(group), body, re.M
+ )
+ if match:
+ mode = match.group(1)
+ return mode
+
+
+def parse_members(module, config, group):
+ members = []
+ for line in config.strip().split("!"):
+ l = line.strip()
+ if l.startswith("interface"):
+ match_group = re.findall(
+ "channel-group {0} mode".format(group), l, re.M
+ )
+ if match_group:
+ match = re.search("interface (\\S+)", l, re.M)
+ if match:
+ members.append(match.group(1))
+ return members
+
+
+def get_channel(module, config, group):
+ match = re.findall("^interface (\\S+)", config, re.M)
+ if not match:
+ return {}
+ channel = {}
+ for item in set(match):
+ member = item
+ channel["mode"] = parse_mode(module, config, group, member)
+ channel["members"] = parse_members(module, config, group)
+ return channel
+
+
+def map_config_to_obj(module):
+ objs = list()
+ config = get_config(module)
+ for line in config.split("\n"):
+ l = line.strip()
+ match = re.search("interface Port-channel(\\S+)", l, re.M)
+ if match:
+ obj = {}
+ group = match.group(1)
+ obj["group"] = group
+ obj.update(get_channel(module, config, group))
+ objs.append(obj)
+ return objs
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ group=dict(type="int"),
+ mode=dict(choices=["active", "on", "passive", "auto", "desirable"]),
+ members=dict(type="list", elements="str"),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["group"] = dict(required=True)
+ required_one_of = [["group", "aggregate"]]
+ required_together = [["members", "mode"]]
+ mutually_exclusive = [["group", "aggregate"]]
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+ argument_spec = dict(
+ aggregate=dict(
+ type="list",
+ elements="dict",
+ options=aggregate_spec,
+ required_together=required_together,
+ ),
+ purge=dict(default=False, type="bool"),
+ )
+ argument_spec.update(element_spec)
+ argument_spec.update(ios_argument_spec)
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=required_one_of,
+ required_together=required_together,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ warnings = list()
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands((want, have), module)
+ result["commands"] = commands
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lldp.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lldp.py
new file mode 100644
index 00000000..7b6d48e6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lldp.py
@@ -0,0 +1,113 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_lldp
+author: Ganesh Nalawade (@ganeshrn)
+short_description: Manage LLDP configuration on Cisco IOS network devices.
+description:
+- This module provides declarative management of LLDP service on Cisco IOS network
+ devices.
+version_added: 1.0.0
+notes:
+- Tested against IOS 15.2
+options:
+ state:
+ description:
+ - State of the LLDP configuration. If value is I(present) lldp will be enabled
+ else if it is I(absent) it will be disabled.
+ default: present
+ choices:
+ - present
+ - absent
+ - enabled
+ - disabled
+ type: str
+extends_documentation_fragment:
+- cisco.ios.ios
+"""
+EXAMPLES = """
+- name: Enable LLDP service
+ cisco.ios.ios_lldp:
+ state: present
+
+- name: Disable LLDP service
+ cisco.ios.ios_lldp:
+ state: absent
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always, except for the platforms that use Netconf transport to manage the device.
+ type: list
+ sample:
+ - lldp run
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+
+
+def has_lldp(module):
+ output = run_commands(module, ["show lldp"])
+ is_lldp_enable = False
+ if len(output) > 0 and "LLDP is not enabled" not in output[0]:
+ is_lldp_enable = True
+ return is_lldp_enable
+
+
+def main():
+ """ main entry point for module execution
+ """
+ argument_spec = dict(
+ state=dict(
+ default="present",
+ choices=["present", "absent", "enabled", "disabled"],
+ )
+ )
+ argument_spec.update(ios_argument_spec)
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+ warnings = list()
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+ HAS_LLDP = has_lldp(module)
+ commands = []
+ if module.params["state"] == "absent" and HAS_LLDP:
+ commands.append("no lldp run")
+ elif module.params["state"] == "present" and not HAS_LLDP:
+ commands.append("lldp run")
+ result["commands"] = commands
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lldp_global.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lldp_global.py
new file mode 100644
index 00000000..77f65a05
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lldp_global.py
@@ -0,0 +1,356 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_lldp_global
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_lldp_global
+short_description: LLDP resource module
+description: This module configures and manages the Link Layer Discovery Protocol(LLDP)
+ attributes on IOS platforms.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL.
+options:
+ config:
+ description: A dictionary of LLDP options
+ type: dict
+ suboptions:
+ holdtime:
+ description:
+ - LLDP holdtime (in sec) to be sent in packets.
+ - Refer to vendor documentation for valid values.
+ type: int
+ reinit:
+ description:
+ - Specify the delay (in secs) for LLDP to initialize.
+ - Refer to vendor documentation for valid values.
+ - NOTE, if LLDP reinit is configured with a starting value, idempotency won't
+ be maintained as the Cisco device doesn't record the starting reinit configured
+ value. As such, Ansible cannot verify if the respective starting reinit
+ value is already configured or not from the device side. If you try to apply
+ starting reinit value in every play run, Ansible will show changed as True.
+ For any other reinit value, idempotency will be maintained since any other
+ reinit value is recorded in the Cisco device.
+ type: int
+ enabled:
+ description:
+ - Enable LLDP
+ type: bool
+ timer:
+ description:
+ - Specify the rate at which LLDP packets are sent (in sec).
+ - Refer to vendor documentation for valid values.
+ type: int
+ tlv_select:
+ description:
+ - Selection of LLDP TLVs i.e. type-length-value to send
+ - NOTE, if tlv-select is configured idempotency won't be maintained as Cisco
+ device doesn't record configured tlv-select options. As such, Ansible cannot
+ verify if the respective tlv-select options is already configured or not
+ from the device side. If you try to apply tlv-select option in every play
+ run, Ansible will show changed as True.
+ type: dict
+ suboptions:
+ four_wire_power_management:
+ description:
+ - Cisco 4-wire Power via MDI TLV
+ type: bool
+ mac_phy_cfg:
+ description:
+ - IEEE 802.3 MAC/Phy Configuration/status TLV
+ type: bool
+ management_address:
+ description:
+ - Management Address TLV
+ type: bool
+ port_description:
+ description:
+ - Port Description TLV
+ type: bool
+ port_vlan:
+ description:
+ - Port VLAN ID TLV
+ type: bool
+ power_management:
+ description:
+ - IEEE 802.3 DTE Power via MDI TLV
+ type: bool
+ system_capabilities:
+ description:
+ - System Capabilities TLV
+ type: bool
+ system_description:
+ description:
+ - System Description TLV
+ type: bool
+ system_name:
+ description:
+ - System Name TLV
+ type: bool
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS device
+ by executing the command B(show running-config | section ^lldp).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - deleted
+ - rendered
+ - gathered
+ - parsed
+ default: merged
+
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+# vios#sh running-config | section ^lldp
+# vios1#
+
+
+- name: Merge provided configuration with device configuration
+ cisco.ios.ios_lldp_global:
+ config:
+ holdtime: 10
+ enabled: true
+ reinit: 3
+ timer: 10
+ state: merged
+
+# After state:
+# ------------
+# vios#sh running-config | section ^lldp
+# lldp timer 10
+# lldp holdtime 10
+# lldp reinit 3
+# lldp run
+
+
+# Using replaced
+
+# Before state:
+# -------------
+# vios#sh running-config | section ^lldp
+# lldp timer 10
+# lldp holdtime 10
+# lldp reinit 3
+# lldp run
+
+
+- name: Replaces LLDP device configuration with provided configuration
+ cisco.ios.ios_lldp_global:
+ config:
+ holdtime: 20
+ reinit: 5
+ state: replaced
+
+# After state:
+# -------------
+# vios#sh running-config | section ^lldp
+# lldp holdtime 20
+# lldp reinit 5
+
+
+# Using Deleted without any config passed
+#"(NOTE: This will delete all of configured LLDP module attributes)"
+
+# Before state:
+# -------------
+# vios#sh running-config | section ^lldp
+# lldp timer 10
+# lldp holdtime 10
+# lldp reinit 3
+# lldp run
+
+
+- name: Delete LLDP attributes
+ cisco.ios.ios_lldp_global:
+ state: deleted
+
+# After state:
+# -------------
+# vios#sh running-config | section ^lldp
+# vios1#
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# vios#sh running-config | section ^lldp
+# lldp timer 10
+# lldp holdtime 10
+# lldp reinit 3
+# lldp run
+
+- name: Gather listed interfaces with provided configurations
+ cisco.ios.ios_lldp_global:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": {
+# "enabled": true,
+# "holdtime": 10,
+# "reinit": 3,
+# "timer": 10
+# }
+
+# After state:
+# ------------
+#
+# vios#sh running-config | section ^lldp
+# lldp timer 10
+# lldp holdtime 10
+# lldp reinit 3
+# lldp run
+
+# Using Rendered
+- name: Render the commands for provided configuration
+ cisco.ios.ios_lldp_global:
+ config:
+ holdtime: 10
+ enabled: true
+ reinit: 3
+ timer: 10
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "lldp holdtime 10",
+# "lldp run",
+# "lldp timer 10",
+# "lldp reinit 3"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# lldp timer 10
+# lldp holdtime 10
+# lldp reinit 3
+# lldp run
+
+- name: Parse the commands for provided configuration
+ cisco.ios.ios_lldp_global:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": {
+# "enabled": true,
+# "holdtime": 10,
+# "reinit": 3,
+# "timer": 10
+# }
+
+"""
+
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: dict
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: dict
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['lldp holdtime 10', 'lldp run', 'lldp timer 10']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.lldp_global.lldp_global import (
+ Lldp_globalArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.lldp_global.lldp_global import (
+ Lldp_global,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Lldp_globalArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = Lldp_global(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lldp_interfaces.py
new file mode 100644
index 00000000..32629d09
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_lldp_interfaces.py
@@ -0,0 +1,666 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_lldp_interfaces
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: ios_lldp_interfaces
+short_description: LLDP interfaces resource module
+description: This module manages link layer discovery protocol (LLDP) attributes of
+ interfaces on Cisco IOS devices.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL.
+options:
+ config:
+ description: A dictionary of LLDP options
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.
+ type: str
+ required: true
+ receive:
+ description:
+ - Enable LLDP reception on interface.
+ type: bool
+ transmit:
+ description:
+ - Enable LLDP transmission on interface.
+ type: bool
+ med_tlv_select:
+ description:
+ - Selection of LLDP MED TLVs to send
+ - NOTE, if med-tlv-select is configured idempotency won't be maintained as
+ Cisco device doesn't record configured med-tlv-select options. As such,
+ Ansible cannot verify if the respective med-tlv-select options is already
+ configured or not from the device side. If you try to apply med-tlv-select
+ option in every play run, Ansible will show changed as True.
+ type: dict
+ suboptions:
+ inventory_management:
+ description:
+ - LLDP MED Inventory Management TLV
+ type: bool
+ tlv_select:
+ description:
+ - Selection of LLDP type-length-value i.e. TLVs to send
+ - NOTE, if tlv-select is configured idempotency won't be maintained as Cisco
+ device doesn't record configured tlv-select options. As such, Ansible cannot
+ verify if the respective tlv-select options is already configured or not
+ from the device side. If you try to apply tlv-select option in every play
+ run, Ansible will show changed as True.
+ type: dict
+ suboptions:
+ power_management:
+ description:
+ - IEEE 802.3 DTE Power via MDI TLV
+ type: bool
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS device by
+ executing the command B(sh lldp interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - rendered
+ - gathered
+ - parsed
+ default: merged
+"""
+
+EXAMPLES = """
+# Using merged
+#
+# Before state:
+# -------------
+#
+# vios#sh lldp interface
+# GigabitEthernet0/0:
+# Tx: enabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/2:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: INIT
+#
+# GigabitEthernet0/3:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+
+- name: Merge provided configuration with device configuration
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ - name: GigabitEthernet0/3
+ transmit: true
+ state: merged
+
+# After state:
+# ------------
+#
+# vios#sh lldp interface
+# GigabitEthernet0/0:
+# Tx: enabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/2:
+# Tx: disabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: INIT
+#
+# GigabitEthernet0/3:
+# Tx: enabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+
+# Using overridden
+#
+# Before state:
+# -------------
+#
+# vios#sh lldp interface
+# GigabitEthernet0/0:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/2:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: INIT
+#
+# GigabitEthernet0/3:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+
+- name: Override device configuration of all lldp_interfaces with provided configuration
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: true
+ state: overridden
+
+# After state:
+# ------------
+#
+# vios#sh lldp interface
+# GigabitEthernet0/0:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/2:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: INIT
+#
+# GigabitEthernet0/3:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+
+# Using replaced
+#
+# Before state:
+# -------------
+#
+# vios#sh lldp interface
+# GigabitEthernet0/0:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/2:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: INIT
+#
+# GigabitEthernet0/3:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+
+- name: Replaces device configuration of listed lldp_interfaces with provided configuration
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/3
+ receive: true
+ state: replaced
+
+# After state:
+# ------------
+#
+# vios#sh lldp interface
+# GigabitEthernet0/0:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/2:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: INIT
+#
+# GigabitEthernet0/3:
+# Tx: disabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+
+# Using Deleted
+#
+# Before state:
+# -------------
+#
+# vios#sh lldp interface
+# GigabitEthernet0/0:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/2:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: INIT
+#
+# GigabitEthernet0/3:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+
+- name: "Delete LLDP attributes of given interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios#sh lldp interface
+# GigabitEthernet0/0:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/2:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: INIT
+#
+# GigabitEthernet0/3:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+
+# Using Deleted without any config passed
+# "(NOTE: This will delete all of configured LLDP module attributes)"
+#
+# Before state:
+# -------------
+#
+# vios#sh lldp interface
+# GigabitEthernet0/0:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/2:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: INIT
+#
+# GigabitEthernet0/3:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+
+- name: "Delete LLDP attributes for all configured interfaces (Note: This won't delete the interface itself)"
+ cisco.ios.ios_lldp_interfaces:
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios#sh lldp interface
+# GigabitEthernet0/0:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/2:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: INIT
+#
+# GigabitEthernet0/3:
+# Tx: disabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# vios#sh lldp interface
+# GigabitEthernet0/0:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/2:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+
+- name: Gather listed LLDP interfaces with provided configurations
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "name": "GigabitEthernet0/0",
+# "receive": true,
+# "transmit": true
+# },
+# {
+# "name": "GigabitEthernet0/1",
+# "receive": true,
+# "transmit": true
+# },
+# {
+# "name": "GigabitEthernet0/2",
+# "receive": true,
+# "transmit": true
+# }
+# ]
+
+# After state:
+# ------------
+#
+# vios#sh lldp interface
+# GigabitEthernet0/0:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+
+# GigabitEthernet0/2:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "interface GigabitEthernet0/0",
+# "lldp receive",
+# "lldp transmit",
+# "interface GigabitEthernet0/1",
+# "lldp receive",
+# "lldp transmit",
+# "interface GigabitEthernet0/2",
+# "lldp receive"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# GigabitEthernet0/0:
+# Tx: enabled
+# Rx: disabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/1:
+# Tx: enabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: WAIT FOR FRAME
+#
+# GigabitEthernet0/2:
+# Tx: disabled
+# Rx: enabled
+# Tx state: IDLE
+# Rx state: INIT
+
+- name: Parse the commands for provided configuration
+ cisco.ios.ios_lldp_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": [
+# {
+# "name": "GigabitEthernet0/0",
+# "receive": false,
+# "transmit": true
+# },
+# {
+# "name": "GigabitEthernet0/1",
+# "receive": true,
+# "transmit": true
+# },
+# {
+# "name": "GigabitEthernet0/2",
+# "receive": true,
+# "transmit": false
+# }
+# ]
+
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface GigabitEthernet 0/1', 'lldp transmit', 'lldp receive']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.lldp_interfaces.lldp_interfaces import (
+ Lldp_InterfacesArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.lldp_interfaces.lldp_interfaces import (
+ Lldp_Interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Lldp_InterfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = Lldp_Interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_logging.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_logging.py
new file mode 100644
index 00000000..0d1046a1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_logging.py
@@ -0,0 +1,511 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_logging
+author: Trishna Guha (@trishnaguha)
+short_description: Manage logging on network devices
+description:
+- This module provides declarative management of logging on Cisco Ios devices.
+version_added: 1.0.0
+notes:
+- Tested against IOS 15.6
+options:
+ dest:
+ description:
+ - Destination of the logs.
+ - On dest has to be quoted as 'on' or else pyyaml will convert
+ to True before it gets to Ansible.
+ choices:
+ - 'on'
+ - host
+ - console
+ - monitor
+ - buffered
+ - trap
+ type: str
+ name:
+ description:
+ - The hostname or IP address of the destination.
+ - Required when I(dest=host).
+ type: str
+ size:
+ description:
+ - Size of buffer. The acceptable value is in range from 4096 to 4294967295 bytes.
+ type: int
+ facility:
+ description:
+ - Set logging facility.
+ type: str
+ level:
+ description:
+ - Set logging severity levels.
+ default: debugging
+ choices:
+ - emergencies
+ - alerts
+ - critical
+ - errors
+ - warnings
+ - notifications
+ - informational
+ - debugging
+ type: str
+ aggregate:
+ description: List of logging definitions.
+ type: list
+ elements: dict
+ suboptions:
+ dest:
+ description:
+ - Destination of the logs.
+ - On dest has to be quoted as 'on' or else pyyaml will convert
+ to True before it gets to Ansible.
+ choices:
+ - 'on'
+ - host
+ - console
+ - monitor
+ - buffered
+ - trap
+ type: str
+ name:
+ description:
+ - The hostname or IP address of the destination.
+ - Required when I(dest=host).
+ type: str
+ size:
+ description:
+ - Size of buffer. The acceptable value is in range from 4096 to 4294967295 bytes.
+ type: int
+ facility:
+ description:
+ - Set logging facility.
+ type: str
+ level:
+ description:
+ - Set logging severity levels.
+ type: str
+ choices:
+ - emergencies
+ - alerts
+ - critical
+ - errors
+ - warnings
+ - notifications
+ - informational
+ - debugging
+ state:
+ description:
+ - State of the logging configuration.
+ choices:
+ - present
+ - absent
+ type: str
+ state:
+ description:
+ - State of the logging configuration.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+extends_documentation_fragment:
+- cisco.ios.ios
+"""
+EXAMPLES = """
+- name: configure host logging
+ cisco.ios.ios_logging:
+ dest: host
+ name: 172.16.0.1
+ state: present
+
+- name: remove host logging configuration
+ cisco.ios.ios_logging:
+ dest: host
+ name: 172.16.0.1
+ state: absent
+
+- name: configure console logging level and facility
+ cisco.ios.ios_logging:
+ dest: console
+ facility: local7
+ level: debugging
+ state: present
+
+- name: enable logging to all
+ cisco.ios.ios_logging:
+ dest: on
+
+- name: configure buffer size
+ cisco.ios.ios_logging:
+ dest: buffered
+ size: 5000
+
+- name: Configure logging using aggregate
+ cisco.ios.ios_logging:
+ aggregate:
+ - {dest: console, level: notifications}
+ - {dest: buffered, size: 9000}
+
+- name: remove logging using aggregate
+ cisco.ios.ios_logging:
+ aggregate:
+ - {dest: console, level: notifications}
+ - {dest: buffered, size: 9000}
+ state: absent
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - logging facility local7
+ - logging host 172.16.0.1
+"""
+import re
+from copy import deepcopy
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+ validate_ip_address,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ get_capabilities,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+
+
+def validate_size(value, module):
+ if value:
+ if not int(4096) <= int(value) <= int(4294967295):
+ module.fail_json(msg="size must be between 4096 and 4294967295")
+ else:
+ return value
+
+
+def map_obj_to_commands(updates, module, os_version):
+ dest_group = "console", "monitor", "buffered", "on", "trap"
+ commands = list()
+ want, have = updates
+ for w in want:
+ dest = w["dest"]
+ name = w["name"]
+ size = w["size"]
+ facility = w["facility"]
+ level = w["level"]
+ state = w["state"]
+ del w["state"]
+ if facility:
+ w["dest"] = "facility"
+ if state == "absent" and w in have:
+ if dest:
+ if dest == "host":
+ if "12." in os_version:
+ commands.append("no logging {0}".format(name))
+ else:
+ commands.append("no logging host {0}".format(name))
+ elif dest in dest_group:
+ commands.append("no logging {0}".format(dest))
+ else:
+ module.fail_json(
+ msg="dest must be among console, monitor, buffered, host, on, trap"
+ )
+ if facility:
+ commands.append("no logging facility {0}".format(facility))
+ if state == "present" and w not in have:
+ if facility:
+ present = False
+ for entry in have:
+ if (
+ entry["dest"] == "facility"
+ and entry["facility"] == facility
+ ):
+ present = True
+ if not present:
+ commands.append("logging facility {0}".format(facility))
+ if dest == "host":
+ if "12." in os_version:
+ commands.append("logging {0}".format(name))
+ else:
+ commands.append("logging host {0}".format(name))
+ elif dest == "on":
+ commands.append("logging on")
+ elif dest == "buffered" and size:
+ present = False
+ for entry in have:
+ if (
+ entry["dest"] == "buffered"
+ and entry["size"] == size
+ and entry["level"] == level
+ ):
+ present = True
+ if not present:
+ if level and level != "debugging":
+ commands.append(
+ "logging buffered {0} {1}".format(size, level)
+ )
+ else:
+ commands.append("logging buffered {0}".format(size))
+ elif dest:
+ dest_cmd = "logging {0}".format(dest)
+ if level:
+ dest_cmd += " {0}".format(level)
+ commands.append(dest_cmd)
+ return commands
+
+
+def parse_facility(line, dest):
+ facility = None
+ if dest == "facility":
+ match = re.search("logging facility (\\S+)", line, re.M)
+ if match:
+ facility = match.group(1)
+ return facility
+
+
+def parse_size(line, dest):
+ size = None
+ if dest == "buffered":
+ match = re.search(
+ "logging buffered(?: (\\d+))?(?: [a-z]+)?", line, re.M
+ )
+ if match:
+ if match.group(1) is not None:
+ size = match.group(1)
+ else:
+ size = "4096"
+ return size
+
+
+def parse_name(line, dest):
+ if dest == "host":
+ match = re.search("logging host (\\S+)", line, re.M)
+ if match:
+ name = match.group(1)
+ else:
+ name = None
+ return name
+
+
+def parse_level(line, dest):
+ level_group = (
+ "emergencies",
+ "alerts",
+ "critical",
+ "errors",
+ "warnings",
+ "notifications",
+ "informational",
+ "debugging",
+ )
+ if dest == "host":
+ level = "debugging"
+ else:
+ if dest == "buffered":
+ match = re.search(
+ "logging buffered(?: \\d+)?(?: ([a-z]+))?", line, re.M
+ )
+ else:
+ match = re.search("logging {0} (\\S+)".format(dest), line, re.M)
+ if match and match.group(1) in level_group:
+ level = match.group(1)
+ else:
+ level = "debugging"
+ return level
+
+
+def map_config_to_obj(module):
+ obj = []
+ dest_group = (
+ "console",
+ "host",
+ "monitor",
+ "buffered",
+ "on",
+ "facility",
+ "trap",
+ )
+ data = get_config(module, flags=["| include logging"])
+ for line in data.split("\n"):
+ match = re.search("^logging (\\S+)", line, re.M)
+ if match:
+ if match.group(1) in dest_group:
+ dest = match.group(1)
+ obj.append(
+ {
+ "dest": dest,
+ "name": parse_name(line, dest),
+ "size": parse_size(line, dest),
+ "facility": parse_facility(line, dest),
+ "level": parse_level(line, dest),
+ }
+ )
+ elif validate_ip_address(match.group(1)):
+ dest = "host"
+ obj.append(
+ {
+ "dest": dest,
+ "name": match.group(1),
+ "size": parse_size(line, dest),
+ "facility": parse_facility(line, dest),
+ "level": parse_level(line, dest),
+ }
+ )
+ else:
+ ip_match = re.search(
+ "\\d+\\.\\d+\\.\\d+\\.\\d+", match.group(1), re.M
+ )
+ if ip_match:
+ dest = "host"
+ obj.append(
+ {
+ "dest": dest,
+ "name": match.group(1),
+ "size": parse_size(line, dest),
+ "facility": parse_facility(line, dest),
+ "level": parse_level(line, dest),
+ }
+ )
+ return obj
+
+
+def map_params_to_obj(module, required_if=None):
+ obj = []
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+ module._check_required_if(required_if, item)
+ d = item.copy()
+ if d["dest"] != "host":
+ d["name"] = None
+ if d["dest"] == "buffered":
+ if "size" in d:
+ d["size"] = str(validate_size(d["size"], module))
+ elif "size" not in d:
+ d["size"] = str(4096)
+ else:
+ pass
+ if d["dest"] != "buffered":
+ d["size"] = None
+ obj.append(d)
+ else:
+ if module.params["dest"] != "host":
+ module.params["name"] = None
+ if module.params["dest"] == "buffered":
+ if not module.params["size"]:
+ module.params["size"] = str(4096)
+ else:
+ module.params["size"] = None
+ if module.params["size"] is None:
+ obj.append(
+ {
+ "dest": module.params["dest"],
+ "name": module.params["name"],
+ "size": module.params["size"],
+ "facility": module.params["facility"],
+ "level": module.params["level"],
+ "state": module.params["state"],
+ }
+ )
+ else:
+ obj.append(
+ {
+ "dest": module.params["dest"],
+ "name": module.params["name"],
+ "size": str(validate_size(module.params["size"], module)),
+ "facility": module.params["facility"],
+ "level": module.params["level"],
+ "state": module.params["state"],
+ }
+ )
+ return obj
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ dest=dict(
+ type="str",
+ choices=["on", "host", "console", "monitor", "buffered", "trap"],
+ ),
+ name=dict(type="str"),
+ size=dict(type="int"),
+ facility=dict(type="str"),
+ level=dict(
+ type="str",
+ default="debugging",
+ choices=[
+ "emergencies",
+ "alerts",
+ "critical",
+ "errors",
+ "warnings",
+ "notifications",
+ "informational",
+ "debugging",
+ ],
+ ),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+ aggregate_spec = deepcopy(element_spec)
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec)
+ )
+ argument_spec.update(element_spec)
+ argument_spec.update(ios_argument_spec)
+ required_if = [("dest", "host", ["name"])]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+ device_info = get_capabilities(module)
+ os_version = device_info["device_info"]["network_os_version"]
+ warnings = list()
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+ want = map_params_to_obj(module, required_if=required_if)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands((want, have), module, os_version)
+ result["commands"] = commands
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ntp.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ntp.py
new file mode 100644
index 00000000..8f8e0da4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ntp.py
@@ -0,0 +1,326 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_ntp
+extends_documentation_fragment:
+- cisco.ios.ios
+short_description: Manages core NTP configuration.
+description:
+- Manages core NTP configuration.
+version_added: 1.0.0
+author:
+- Federico Olivieri (@Federico87)
+options:
+ server:
+ description:
+ - Network address of NTP server.
+ type: str
+ source_int:
+ description:
+ - Source interface for NTP packets.
+ type: str
+ acl:
+ description:
+ - ACL for peer/server access restricition.
+ type: str
+ logging:
+ description:
+ - Enable NTP logs. Data type boolean.
+ type: bool
+ default: false
+ auth:
+ description:
+ - Enable NTP authentication. Data type boolean.
+ type: bool
+ default: false
+ auth_key:
+ description:
+ - md5 NTP authentication key of tye 7.
+ type: str
+ key_id:
+ description:
+ - auth_key id. Data type string
+ type: str
+ state:
+ description:
+ - Manage the state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+EXAMPLES = """
+# Set new NTP server and source interface
+- cisco.ios.ios_ntp:
+ server: 10.0.255.10
+ source_int: Loopback0
+ logging: false
+ state: present
+
+# Remove NTP ACL and logging
+- cisco.ios.ios_ntp:
+ acl: NTP_ACL
+ logging: true
+ state: absent
+
+# Set NTP authentication
+- cisco.ios.ios_ntp:
+ key_id: 10
+ auth_key: 15435A030726242723273C21181319000A
+ auth: true
+ state: present
+
+# Set new NTP configuration
+- cisco.ios.ios_ntp:
+ server: 10.0.255.10
+ source_int: Loopback0
+ acl: NTP_ACL
+ logging: true
+ key_id: 10
+ auth_key: 15435A030726242723273C21181319000A
+ auth: true
+ state: present
+"""
+RETURN = """
+commands:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["no ntp server 10.0.255.10", "no ntp source Loopback0"]
+"""
+import re
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+
+
+def parse_server(line, dest):
+ if dest == "server":
+ match = re.search(
+ "(ntp server )(\\d+\\.\\d+\\.\\d+\\.\\d+)", line, re.M
+ )
+ if match:
+ server = match.group(2)
+ return server
+
+
+def parse_source_int(line, dest):
+ if dest == "source":
+ match = re.search("(ntp source )(\\S+)", line, re.M)
+ if match:
+ source = match.group(2)
+ return source
+
+
+def parse_acl(line, dest):
+ if dest == "access-group":
+ match = re.search(
+ "ntp access-group (?:peer|serve)(?:\\s+)(\\S+)", line, re.M
+ )
+ if match:
+ acl = match.group(1)
+ return acl
+
+
+def parse_logging(line, dest):
+ if dest == "logging":
+ logging = dest
+ return logging
+
+
+def parse_auth_key(line, dest):
+ if dest == "authentication-key":
+ match = re.search(
+ "(ntp authentication-key \\d+ md5 )(\\w+)", line, re.M
+ )
+ if match:
+ auth_key = match.group(2)
+ return auth_key
+
+
+def parse_key_id(line, dest):
+ if dest == "trusted-key":
+ match = re.search("(ntp trusted-key )(\\d+)", line, re.M)
+ if match:
+ auth_key = match.group(2)
+ return auth_key
+
+
+def parse_auth(dest):
+ if dest == "authenticate":
+ return dest
+
+
+def map_config_to_obj(module):
+ obj_dict = {}
+ obj = []
+ server_list = []
+ config = get_config(module, flags=["| include ntp"])
+ for line in config.splitlines():
+ match = re.search("ntp (\\S+)", line, re.M)
+ if match:
+ dest = match.group(1)
+ server = parse_server(line, dest)
+ source_int = parse_source_int(line, dest)
+ acl = parse_acl(line, dest)
+ logging = parse_logging(line, dest)
+ auth = parse_auth(dest)
+ auth_key = parse_auth_key(line, dest)
+ key_id = parse_key_id(line, dest)
+ if server:
+ server_list.append(server)
+ if source_int:
+ obj_dict["source_int"] = source_int
+ if acl:
+ obj_dict["acl"] = acl
+ if logging:
+ obj_dict["logging"] = True
+ if auth:
+ obj_dict["auth"] = True
+ if auth_key:
+ obj_dict["auth_key"] = auth_key
+ if key_id:
+ obj_dict["key_id"] = key_id
+ obj_dict["server"] = server_list
+ obj.append(obj_dict)
+ return obj
+
+
+def map_params_to_obj(module):
+ obj = []
+ obj.append(
+ {
+ "state": module.params["state"],
+ "server": module.params["server"],
+ "source_int": module.params["source_int"],
+ "logging": module.params["logging"],
+ "acl": module.params["acl"],
+ "auth": module.params["auth"],
+ "auth_key": module.params["auth_key"],
+ "key_id": module.params["key_id"],
+ }
+ )
+ return obj
+
+
+def map_obj_to_commands(want, have, module):
+ commands = list()
+ server_have = have[0].get("server", None)
+ source_int_have = have[0].get("source_int", None)
+ acl_have = have[0].get("acl", None)
+ logging_have = have[0].get("logging", None)
+ auth_have = have[0].get("auth", None)
+ auth_key_have = have[0].get("auth_key", None)
+ key_id_have = have[0].get("key_id", None)
+ for w in want:
+ server = w["server"]
+ source_int = w["source_int"]
+ acl = w["acl"]
+ logging = w["logging"]
+ state = w["state"]
+ auth = w["auth"]
+ auth_key = w["auth_key"]
+ key_id = w["key_id"]
+ if state == "absent":
+ if server_have and server in server_have:
+ commands.append("no ntp server {0}".format(server))
+ if source_int and source_int_have:
+ commands.append("no ntp source {0}".format(source_int))
+ if acl and acl_have:
+ commands.append("no ntp access-group peer {0}".format(acl))
+ if logging is True and logging_have:
+ commands.append("no ntp logging")
+ if auth is True and auth_have:
+ commands.append("no ntp authenticate")
+ if key_id and key_id_have:
+ commands.append("no ntp trusted-key {0}".format(key_id))
+ if auth_key and auth_key_have:
+ if key_id and key_id_have:
+ commands.append(
+ "no ntp authentication-key {0} md5 {1} 7".format(
+ key_id, auth_key
+ )
+ )
+ elif state == "present":
+ if server is not None and server not in server_have:
+ commands.append("ntp server {0}".format(server))
+ if source_int is not None and source_int != source_int_have:
+ commands.append("ntp source {0}".format(source_int))
+ if acl is not None and acl != acl_have:
+ commands.append("ntp access-group peer {0}".format(acl))
+ if (
+ logging is not None
+ and logging != logging_have
+ and logging is not False
+ ):
+ commands.append("ntp logging")
+ if auth is not None and auth != auth_have and auth is not False:
+ commands.append("ntp authenticate")
+ if key_id is not None and key_id != key_id_have:
+ commands.append("ntp trusted-key {0}".format(key_id))
+ if auth_key is not None and auth_key != auth_key_have:
+ if key_id is not None:
+ commands.append(
+ "ntp authentication-key {0} md5 {1} 7".format(
+ key_id, auth_key
+ )
+ )
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ server=dict(),
+ source_int=dict(),
+ acl=dict(),
+ logging=dict(type="bool", default=False),
+ auth=dict(type="bool", default=False),
+ auth_key=dict(),
+ key_id=dict(),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+ argument_spec.update(ios_argument_spec)
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+ result = {"changed": False}
+ warnings = list()
+ if warnings:
+ result["warnings"] = warnings
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands(want, have, module)
+ result["commands"] = commands
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ospf_interfaces.py
new file mode 100644
index 00000000..b5bdc775
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ospf_interfaces.py
@@ -0,0 +1,1101 @@
+#!/usr/bin/python
+#
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for ios_ospf_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: ios_ospf_interfaces
+short_description: OSPF_Interfaces resource module
+description: This module configures and manages the Open Shortest Path First (OSPF)
+ version 2 on IOS platforms.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL.
+options:
+ config:
+ description: A dictionary of OSPF interfaces options.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of the interface excluding any logical unit number,
+ i.e. GigabitEthernet0/1.
+ type: str
+ required: true
+ address_family:
+ description:
+ - OSPF interfaces settings on the interfaces in address-family
+ context.
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description:
+ - Address Family Identifier (AFI) for OSPF interfaces settings
+ on the interfaces.
+ type: str
+ choices:
+ - ipv4
+ - ipv6
+ required: true
+ process:
+ description: OSPF interfaces process config
+ type: dict
+ suboptions:
+ id:
+ description:
+ - Address Family Identifier (AFI) for OSPF interfaces settings
+ on the interfaces. Please refer vendor documentation of Valid
+ values.
+ type: int
+ area_id:
+ description:
+ - OSPF interfaces area ID as a decimal value. Please
+ refer vendor documentation of Valid values.
+ - OSPF interfaces area ID in IP address format(e.g.
+ A.B.C.D)
+ type: str
+ secondaries:
+ description:
+ - Include or exclude secondary IP addresses.
+ - Valid only with IPv4 config
+ type: bool
+ instance_id:
+ description:
+ - Set the OSPF instance based on ID
+ - Valid only with IPv6 OSPF config
+ type: int
+ adjacency:
+ description: Adjacency staggering
+ type: bool
+ authentication:
+ description: Enable authentication
+ type: dict
+ suboptions:
+ key_chain:
+ description: Use a key-chain for cryptographic
+ authentication keys
+ type: str
+ message_digest:
+ description: Use message-digest authentication
+ type: bool
+ 'null':
+ description: Use no authentication
+ type: bool
+ bfd:
+ description:
+ - BFD configuration commands
+ - Enable/Disable BFD on this interface
+ type: bool
+ cost:
+ description: Interface cost
+ type: dict
+ suboptions:
+ interface_cost:
+ description: Interface cost or Route cost of this interface
+ type: int
+ dynamic_cost:
+ description:
+ - Specify dynamic cost options
+ - Valid only with IPv6 OSPF config
+ type: dict
+ suboptions:
+ default:
+ description: Specify default link metric value
+ type: int
+ hysteresis:
+ description: Specify hysteresis value for LSA dampening
+ type: dict
+ suboptions:
+ percent:
+ description: Specify hysteresis percent changed.
+ Please refer vendor documentation of Valid values.
+ type: int
+ threshold:
+ description: Specify hysteresis threshold value.
+ Please refer vendor documentation of Valid values.
+ type: int
+ weight:
+ description: Specify weight to be placed on individual
+ metrics
+ type: dict
+ suboptions:
+ l2_factor:
+ description:
+ - Specify weight to be given to L2-factor metric
+ - Percentage weight of L2-factor metric. Please refer
+ vendor documentation of Valid values.
+ type: int
+ latency:
+ description:
+ - Specify weight to be given to latency metric.
+ - Percentage weight of latency metric. Please refer
+ vendor documentation of Valid values.
+ type: int
+ oc:
+ description:
+ - Specify weight to be given to cdr/mdr for oc
+ - Give 100 percent weightage for current data rate(0
+ for maxdatarate)
+ type: bool
+ resources:
+ description:
+ - Specify weight to be given to resources metric
+ - Percentage weight of resources metric. Please refer
+ vendor documentation of Valid values.
+ type: int
+ throughput:
+ description:
+ - Specify weight to be given to throughput metric
+ - Percentage weight of throughput metric. Please refer
+ vendor documentation of Valid values.
+ type: int
+ database_filter:
+ description: Filter OSPF LSA during synchronization and flooding
+ type: bool
+ dead_interval:
+ description: Interval after which a neighbor is declared dead
+ type: dict
+ suboptions:
+ time:
+ description: time in seconds
+ type: int
+ minimal:
+ description:
+ - Set to 1 second and set multiplier for Hellos
+ - Number of Hellos sent within 1 second. Please refer
+ vendor documentation of Valid values.
+ - Valid only with IP OSPF config
+ type: int
+ demand_circuit:
+ description: OSPF Demand Circuit, enable or disable
+ the demand circuit'
+ type: dict
+ suboptions:
+ enable:
+ description: Enable Demand Circuit
+ type: bool
+ ignore:
+ description: Ignore demand circuit auto-negotiation requests
+ type: bool
+ disable:
+ description:
+ - Disable demand circuit on this interface
+ - Valid only with IPv6 OSPF config
+ type: bool
+ flood_reduction:
+ description: OSPF Flood Reduction
+ type: bool
+ hello_interval:
+ description:
+ - Time between HELLO packets
+ - Please refer vendor documentation of Valid values.
+ type: int
+ lls:
+ description:
+ - Link-local Signaling (LLS) support
+ - Valid only with IP OSPF config
+ type: bool
+ manet:
+ description:
+ - Mobile Adhoc Networking options
+ - MANET Peering options
+ - Valid only with IPv6 OSPF config
+ type: dict
+ suboptions:
+ cost:
+ description: Redundant path cost improvement required to peer
+ type: dict
+ suboptions:
+ percent:
+ description: Relative incremental path cost.
+ Please refer vendor documentation of Valid values.
+ type: int
+ threshold:
+ description: Absolute incremental path cost.
+ Please refer vendor documentation of Valid values.
+ type: int
+ link_metrics:
+ description: Redundant path cost improvement required to peer
+ type: dict
+ suboptions:
+ set:
+ description: Enable link-metrics
+ type: bool
+ cost_threshold:
+ description: Minimum link cost threshold.
+ Please refer vendor documentation of Valid values.
+ type: int
+ mtu_ignore:
+ description: Ignores the MTU in DBD packets
+ type: bool
+ multi_area:
+ description:
+ - Set the OSPF multi-area ID
+ - Valid only with IP OSPF config
+ type: dict
+ suboptions:
+ id:
+ description:
+ - OSPF multi-area ID as a decimal value. Please refer vendor
+ documentation of Valid values.
+ - OSPF multi-area ID in IP address format(e.g. A.B.C.D)
+ type: int
+ cost:
+ description: Interface cost
+ type: int
+ neighbor:
+ description:
+ - OSPF neighbor link-local IPv6 address (X:X:X:X::X)
+ - Valid only with IPv6 OSPF config
+ type: dict
+ suboptions:
+ address:
+ description: Neighbor link-local IPv6 address
+ type: str
+ cost:
+ description: OSPF cost for point-to-multipoint neighbor
+ type: int
+ database_filter:
+ description: Filter OSPF LSA during synchronization and flooding for point-to-multipoint neighbor
+ type: bool
+ poll_interval:
+ description: OSPF dead-router polling interval
+ type: int
+ priority:
+ description: OSPF priority of non-broadcast neighbor
+ type: int
+ network:
+ description: Network type
+ type: dict
+ suboptions:
+ broadcast:
+ description: Specify OSPF broadcast multi-access network
+ type: bool
+ manet:
+ description:
+ - Specify MANET OSPF interface type
+ - Valid only with IPv6 OSPF config
+ type: bool
+ non_broadcast:
+ description: Specify OSPF NBMA network
+ type: bool
+ point_to_multipoint:
+ description: Specify OSPF point-to-multipoint network
+ type: bool
+ point_to_point:
+ description: Specify OSPF point-to-point network
+ type: bool
+ prefix_suppression:
+ description: Enable/Disable OSPF prefix suppression
+ type: bool
+ priority:
+ description: Router priority. Please refer vendor documentation
+ of Valid values.
+ type: int
+ resync_timeout:
+ description: Interval after which adjacency is reset if oob-resync
+ is not started. Please refer vendor documentation of Valid values.
+ type: int
+ retransmit_interval:
+ description: Time between retransmitting lost link state
+ advertisements. Please refer vendor documentation of Valid values.
+ type: int
+ shutdown:
+ description: Set OSPF protocol's state to disable under
+ current interface
+ type: bool
+ transmit_delay:
+ description: Link state transmit delay.
+ Please refer vendor documentation of Valid values.
+ type: int
+ ttl_security:
+ description:
+ - TTL security check
+ - Valid only with IPV4 OSPF config
+ type: dict
+ suboptions:
+ set:
+ description: Enable TTL Security on all interfaces
+ type: bool
+ hops:
+ description:
+ - Maximum number of IP hops allowed
+ - Please refer vendor documentation of Valid values.
+ type: int
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS
+ device by executing the command B(sh running-config | section
+ ^interface).
+ - The state I(parsed) reads the configuration from C(running_config)
+ option and transforms it into Ansible structured data as per the
+ resource module's argspec and the value is then returned in the
+ I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any
+ change on the device.
+ - The state I(rendered) will transform the configuration in C(config)
+ option to platform specific CLI commands which will be returned in the
+ I(rendered) key within the result. For state I(rendered) active
+ connection to remote host is not required.
+ - The state I(gathered) will fetch the running configuration from device
+ and transform it into structured data in the format as per the resource
+ module argspec and the value is returned in the I(gathered) key within
+ the result.
+ - The state I(parsed) reads the configuration from C(running_config)
+ option and transforms it into JSON format as per the resource module
+ parameters and the value is returned in the I(parsed) key within the
+ result. The value of C(running_config) option should be the same format
+ as the output of command I(show running-config | include ip route|ipv6
+ route) executed on device. For state I(parsed) active connection to
+ remote host is not required.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+
+# Using deleted
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^interface
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ipv6 ospf 55 area 105
+# ipv6 ospf priority 20
+# ipv6 ospf transmit-delay 30
+# ipv6 ospf adjacency stagger disable
+# interface GigabitEthernet0/2
+# ip ospf priority 40
+# ip ospf adjacency stagger disable
+# ip ospf ttl-security hops 50
+# ip ospf 10 area 20
+# ip ospf cost 30
+
+- name: Delete provided OSPF Interface config
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ state: deleted
+
+# Commands Fired:
+# ---------------
+#
+# "commands": [
+# "interface GigabitEthernet0/1",
+# "no ipv6 ospf 55 area 105",
+# "no ipv6 ospf adjacency stagger disable",
+# "no ipv6 ospf priority 20",
+# "no ipv6 ospf transmit-delay 30"
+# ]
+
+# After state:
+# -------------
+# router-ios#sh running-config | section ^interface
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# interface GigabitEthernet0/2
+# ip ospf priority 40
+# ip ospf adjacency stagger disable
+# ip ospf ttl-security hops 50
+# ip ospf 10 area 20
+# ip ospf cost 30
+
+# Using deleted without any config passed (NOTE: This will delete all OSPF Interfaces configuration from device)
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^interface
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ipv6 ospf 55 area 105
+# ipv6 ospf priority 20
+# ipv6 ospf transmit-delay 30
+# ipv6 ospf adjacency stagger disable
+# interface GigabitEthernet0/2
+# ip ospf priority 40
+# ip ospf adjacency stagger disable
+# ip ospf ttl-security hops 50
+# ip ospf 10 area 20
+# ip ospf cost 30
+
+- name: Delete all OSPF config from interfaces
+ cisco.ios.ios_ospf_interfaces:
+ state: deleted
+
+# Commands Fired:
+# ---------------
+#
+# "commands": [
+# "interface GigabitEthernet0/2",
+# "no ip ospf 10 area 20",
+# "no ip ospf adjacency stagger disable",
+# "no ip ospf cost 30",
+# "no ip ospf priority 40",
+# "no ip ospf ttl-security hops 50",
+# "interface GigabitEthernet0/1",
+# "no ipv6 ospf 55 area 105",
+# "no ipv6 ospf adjacency stagger disable",
+# "no ipv6 ospf priority 20",
+# "no ipv6 ospf transmit-delay 30"
+# ]
+
+# After state:
+# -------------
+# router-ios#sh running-config | section ^interface
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# interface GigabitEthernet0/2
+
+# Using merged
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^interface
+# router-ios#
+
+- name: Merge provided OSPF Interfaces configuration
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ address_family:
+ - afi: ipv4
+ process:
+ id: 10
+ area_id: 30
+ adjacency: true
+ bfd: true
+ cost:
+ interface_cost: 5
+ dead_interval:
+ time: 5
+ demand_circuit:
+ ignore: true
+ network:
+ broadcast: true
+ priority: 25
+ resync_timeout: 10
+ shutdown: true
+ ttl_security:
+ hops: 50
+ - afi: ipv6
+ process:
+ id: 35
+ area_id: 45
+ adjacency: true
+ database_filter: true
+ manet:
+ link_metrics:
+ cost_threshold: 10
+ priority: 55
+ transmit_delay: 45
+ state: merged
+
+# Commands Fired:
+# ---------------
+#
+# "commands": [
+# "interface GigabitEthernet0/1",
+# "ip ospf 10 area 30",
+# "ip ospf adjacency stagger disable",
+# "ip ospf bfd",
+# "ip ospf cost 5",
+# "ip ospf dead-interval 5",
+# "ip ospf demand-circuit ignore",
+# "ip ospf network broadcast",
+# "ip ospf priority 25",
+# "ip ospf resync-timeout 10",
+# "ip ospf shutdown",
+# "ip ospf ttl-security hops 50",
+# "ipv6 ospf 35 area 45",
+# "ipv6 ospf adjacency stagger disable",
+# "ipv6 ospf database-filter all out",
+# "ipv6 ospf manet peering link-metrics 10",
+# "ipv6 ospf priority 55",
+# "ipv6 ospf transmit-delay 45"
+# ]
+
+# After state:
+# -------------
+#
+# router-ios#sh running-config | section ^interface
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip ospf network broadcast
+# ip ospf resync-timeout 10
+# ip ospf dead-interval 5
+# ip ospf priority 25
+# ip ospf demand-circuit ignore
+# ip ospf bfd
+# ip ospf adjacency stagger disable
+# ip ospf ttl-security hops 50
+# ip ospf shutdown
+# ip ospf 10 area 30
+# ip ospf cost 5
+# ipv6 ospf 35 area 45
+# ipv6 ospf priority 55
+# ipv6 ospf transmit-delay 45
+# ipv6 ospf database-filter all out
+# ipv6 ospf adjacency stagger disable
+# ipv6 ospf manet peering link-metrics 10
+# interface GigabitEthernet0/2
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^interface
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip ospf network broadcast
+# ip ospf resync-timeout 10
+# ip ospf dead-interval 5
+# ip ospf priority 25
+# ip ospf demand-circuit ignore
+# ip ospf bfd
+# ip ospf adjacency stagger disable
+# ip ospf ttl-security hops 50
+# ip ospf shutdown
+# ip ospf 10 area 30
+# ip ospf cost 5
+# ipv6 ospf 35 area 45
+# ipv6 ospf priority 55
+# ipv6 ospf transmit-delay 45
+# ipv6 ospf database-filter all out
+# ipv6 ospf adjacency stagger disable
+# ipv6 ospf manet peering link-metrics 10
+# interface GigabitEthernet0/2
+
+- name: Override provided OSPF Interfaces configuration
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ address_family:
+ - afi: ipv6
+ process:
+ id: 55
+ area_id: 105
+ adjacency: true
+ priority: 20
+ transmit_delay: 30
+ - name: GigabitEthernet0/2
+ address_family:
+ - afi: ipv4
+ process:
+ id: 10
+ area_id: 20
+ adjacency: true
+ cost:
+ interface_cost: 30
+ priority: 40
+ ttl_security:
+ hops: 50
+ state: overridden
+
+# Commands Fired:
+# ---------------
+#
+# "commands": [
+# "interface GigabitEthernet0/2",
+# "ip ospf 10 area 20",
+# "ip ospf adjacency stagger disable",
+# "ip ospf cost 30",
+# "ip ospf priority 40",
+# "ip ospf ttl-security hops 50",
+# "interface GigabitEthernet0/1",
+# "ipv6 ospf 55 area 105",
+# "no ipv6 ospf database-filter all out",
+# "no ipv6 ospf manet peering link-metrics 10",
+# "ipv6 ospf priority 20",
+# "ipv6 ospf transmit-delay 30",
+# "no ip ospf 10 area 30",
+# "no ip ospf adjacency stagger disable",
+# "no ip ospf bfd",
+# "no ip ospf cost 5",
+# "no ip ospf dead-interval 5",
+# "no ip ospf demand-circuit ignore",
+# "no ip ospf network broadcast",
+# "no ip ospf priority 25",
+# "no ip ospf resync-timeout 10",
+# "no ip ospf shutdown",
+# "no ip ospf ttl-security hops 50"
+# ]
+
+# After state:
+# -------------
+#
+# router-ios#sh running-config | section ^interface
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ipv6 ospf 55 area 105
+# ipv6 ospf priority 20
+# ipv6 ospf transmit-delay 30
+# ipv6 ospf adjacency stagger disable
+# interface GigabitEthernet0/2
+# ip ospf priority 40
+# ip ospf adjacency stagger disable
+# ip ospf ttl-security hops 50
+# ip ospf 10 area 20
+# ip ospf cost 30
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^interface
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip ospf network broadcast
+# ip ospf resync-timeout 10
+# ip ospf dead-interval 5
+# ip ospf priority 25
+# ip ospf demand-circuit ignore
+# ip ospf bfd
+# ip ospf adjacency stagger disable
+# ip ospf ttl-security hops 50
+# ip ospf shutdown
+# ip ospf 10 area 30
+# ip ospf cost 5
+# ipv6 ospf 35 area 45
+# ipv6 ospf priority 55
+# ipv6 ospf transmit-delay 45
+# ipv6 ospf database-filter all out
+# ipv6 ospf adjacency stagger disable
+# ipv6 ospf manet peering link-metrics 10
+# interface GigabitEthernet0/2
+
+- name: Replaced provided OSPF Interfaces configuration
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ address_family:
+ - afi: ipv6
+ process:
+ id: 55
+ area_id: 105
+ adjacency: true
+ priority: 20
+ transmit_delay: 30
+ state: replaced
+
+# Commands Fired:
+# ---------------
+# "commands": [
+# "interface GigabitEthernet0/2",
+# "ipv6 ospf 55 area 105",
+# "ipv6 ospf adjacency stagger disable",
+# "ipv6 ospf priority 20",
+# "ipv6 ospf transmit-delay 30"
+# ]
+
+# After state:
+# -------------
+# router-ios#sh running-config | section ^interface
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip ospf network broadcast
+# ip ospf resync-timeout 10
+# ip ospf dead-interval 5
+# ip ospf priority 25
+# ip ospf demand-circuit ignore
+# ip ospf bfd
+# ip ospf adjacency stagger disable
+# ip ospf ttl-security hops 50
+# ip ospf shutdown
+# ip ospf 10 area 30
+# ip ospf cost 5
+# ipv6 ospf 35 area 45
+# ipv6 ospf priority 55
+# ipv6 ospf transmit-delay 45
+# ipv6 ospf database-filter all out
+# ipv6 ospf adjacency stagger disable
+# ipv6 ospf manet peering link-metrics 10
+# interface GigabitEthernet0/2
+# ipv6 ospf 55 area 105
+# ipv6 ospf priority 20
+# ipv6 ospf transmit-delay 30
+# ipv6 ospf adjacency stagger disable
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^interface
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip ospf network broadcast
+# ip ospf resync-timeout 10
+# ip ospf dead-interval 5
+# ip ospf priority 25
+# ip ospf demand-circuit ignore
+# ip ospf bfd
+# ip ospf adjacency stagger disable
+# ip ospf ttl-security hops 50
+# ip ospf shutdown
+# ip ospf 10 area 30
+# ip ospf cost 5
+# ipv6 ospf 35 area 45
+# ipv6 ospf priority 55
+# ipv6 ospf transmit-delay 45
+# ipv6 ospf database-filter all out
+# ipv6 ospf adjacency stagger disable
+# ipv6 ospf manet peering link-metrics 10
+# interface GigabitEthernet0/2
+
+- name: Gather OSPF Interfaces provided configurations
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "name": "GigabitEthernet0/2"
+# },
+# {
+# "address_family": [
+# {
+# "adjacency": true,
+# "afi": "ipv4",
+# "bfd": true,
+# "cost": {
+# "interface_cost": 5
+# },
+# "dead_interval": {
+# "time": 5
+# },
+# "demand_circuit": {
+# "ignore": true
+# },
+# "network": {
+# "broadcast": true
+# },
+# "priority": 25,
+# "process": {
+# "area_id": "30",
+# "id": 10
+# },
+# "resync_timeout": 10,
+# "shutdown": true,
+# "ttl_security": {
+# "hops": 50
+# }
+# },
+# {
+# "adjacency": true,
+# "afi": "ipv6",
+# "database_filter": true,
+# "manet": {
+# "link_metrics": {
+# "cost_threshold": 10
+# }
+# },
+# "priority": 55,
+# "process": {
+# "area_id": "45",
+# "id": 35
+# },
+# "transmit_delay": 45
+# }
+# ],
+# "name": "GigabitEthernet0/1"
+# },
+# {
+# "name": "GigabitEthernet0/0"
+# }
+# ]
+
+# After state:
+# ------------
+#
+# router-ios#sh running-config | section ^interface
+# interface GigabitEthernet0/0
+# interface GigabitEthernet0/1
+# ip ospf network broadcast
+# ip ospf resync-timeout 10
+# ip ospf dead-interval 5
+# ip ospf priority 25
+# ip ospf demand-circuit ignore
+# ip ospf bfd
+# ip ospf adjacency stagger disable
+# ip ospf ttl-security hops 50
+# ip ospf shutdown
+# ip ospf 10 area 30
+# ip ospf cost 5
+# ipv6 ospf 35 area 45
+# ipv6 ospf priority 55
+# ipv6 ospf transmit-delay 45
+# ipv6 ospf database-filter all out
+# ipv6 ospf adjacency stagger disable
+# ipv6 ospf manet peering link-metrics 10
+# interface GigabitEthernet0/2
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ address_family:
+ - afi: ipv4
+ process:
+ id: 10
+ area_id: 30
+ adjacency: true
+ bfd: true
+ cost:
+ interface_cost: 5
+ dead_interval:
+ time: 5
+ demand_circuit:
+ ignore: true
+ network:
+ broadcast: true
+ priority: 25
+ resync_timeout: 10
+ shutdown: true
+ ttl_security:
+ hops: 50
+ - afi: ipv6
+ process:
+ id: 35
+ area_id: 45
+ adjacency: true
+ database_filter: true
+ manet:
+ link_metrics:
+ cost_threshold: 10
+ priority: 55
+ transmit_delay: 45
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "interface GigabitEthernet0/1",
+# "ip ospf 10 area 30",
+# "ip ospf adjacency stagger disable",
+# "ip ospf bfd",
+# "ip ospf cost 5",
+# "ip ospf dead-interval 5",
+# "ip ospf demand-circuit ignore",
+# "ip ospf network broadcast",
+# "ip ospf priority 25",
+# "ip ospf resync-timeout 10",
+# "ip ospf shutdown",
+# "ip ospf ttl-security hops 50",
+# "ipv6 ospf 35 area 45",
+# "ipv6 ospf adjacency stagger disable",
+# "ipv6 ospf database-filter all out",
+# "ipv6 ospf manet peering link-metrics 10",
+# "ipv6 ospf priority 55",
+# "ipv6 ospf transmit-delay 45"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# interface GigabitEthernet0/2
+# interface GigabitEthernet0/1
+# ip ospf network broadcast
+# ip ospf resync-timeout 10
+# ip ospf dead-interval 5
+# ip ospf priority 25
+# ip ospf demand-circuit ignore
+# ip ospf bfd
+# ip ospf adjacency stagger disable
+# ip ospf ttl-security hops 50
+# ip ospf shutdown
+# ip ospf 10 area 30
+# ip ospf cost 5
+# ipv6 ospf 35 area 45
+# ipv6 ospf priority 55
+# ipv6 ospf transmit-delay 45
+# ipv6 ospf database-filter all out
+# ipv6 ospf adjacency stagger disable
+# ipv6 ospf manet peering link-metrics 10
+# interface GigabitEthernet0/0
+
+- name: Parse the provided configuration with the exisiting running configuration
+ cisco.ios.ios_ospf_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": [
+# },
+# {
+# "name": "GigabitEthernet0/2"
+# },
+# {
+# "address_family": [
+# {
+# "adjacency": true,
+# "afi": "ipv4",
+# "bfd": true,
+# "cost": {
+# "interface_cost": 5
+# },
+# "dead_interval": {
+# "time": 5
+# },
+# "demand_circuit": {
+# "ignore": true
+# },
+# "network": {
+# "broadcast": true
+# },
+# "priority": 25,
+# "process": {
+# "area_id": "30",
+# "id": 10
+# },
+# "resync_timeout": 10,
+# "shutdown": true,
+# "ttl_security": {
+# "hops": 50
+# }
+# },
+# {
+# "adjacency": true,
+# "afi": "ipv6",
+# "database_filter": true,
+# "manet": {
+# "link_metrics": {
+# "cost_threshold": 10
+# }
+# },
+# "priority": 55,
+# "process": {
+# "area_id": "45",
+# "id": 35
+# },
+# "transmit_delay": 45
+# }
+# ],
+# "name": "GigabitEthernet0/1"
+# },
+# {
+# "name": "GigabitEthernet0/0"
+# }
+# ]
+
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+ type: dict
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+ type: dict
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface GigabitEthernet0/1', 'ip ospf 10 area 30', 'ip ospf cost 5', 'ip ospf priority 25']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.ospf_interfaces.ospf_interfaces import (
+ Ospf_InterfacesArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.ospf_interfaces.ospf_interfaces import (
+ Ospf_Interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Ospf_InterfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Ospf_Interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ospfv2.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ospfv2.py
new file mode 100644
index 00000000..6a435b43
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ospfv2.py
@@ -0,0 +1,1691 @@
+#!/usr/bin/python
+#
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for ios_ospfv2
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: ios_ospfv2
+short_description: OSPFv2 resource module
+description: This module configures and manages the Open Shortest Path First (OSPF)
+ version 2 on IOS platforms.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL.
+options:
+ config:
+ description: A dictionary of OSPF options.
+ type: dict
+ suboptions:
+ processes:
+ description:
+ - List of OSPF instance configurations.
+ type: list
+ elements: dict
+ suboptions:
+ process_id:
+ description: Process ID
+ required: true
+ type: int
+ vrf:
+ description: Specify parameters for a VPN Routing/Forwarding instance
+ type: str
+ address_family:
+ description: Router Address Family configuration mode
+ type: dict
+ suboptions:
+ default:
+ description: Set a command to its defaults
+ type: bool
+ snmp_context:
+ description:
+ - Modify snmp parameters
+ - Configure SNMP context name
+ type: str
+ topology:
+ description: Associate the routing protocol to a topology instance
+ type: dict
+ suboptions:
+ name:
+ description: Routing topology instance name
+ type: str
+ base:
+ description: Entering router topology sub mode
+ type: bool
+ tid:
+ description:
+ - Configuring the routing protocol topology tid
+ - Note, please refer vendor documentation for valid values
+ type: bool
+ adjacency:
+ description: To configure control adjacency formation
+ type: dict
+ suboptions:
+ min_adjacency:
+ description:
+ - Initial number of adjacencies allowed to be forming in an area
+ - Please refer vendor documentation for valid values
+ type: int
+ max_adjacency:
+ description:
+ - Maximum number of adjacencies allowed to be forming
+ - Please refer vendor documentation for valid values
+ type: int
+ none:
+ description: No initial
+ type: bool
+ areas:
+ description: OSPF area parameters
+ type: list
+ elements: dict
+ suboptions:
+ area_id:
+ description:
+ - OSPF area ID as a decimal value. Please refer vendor documentation
+ of Valid values.
+ - OSPF area ID in IP address format(e.g. A.B.C.D)
+ type: str
+ authentication:
+ description: Area authentication
+ type: dict
+ suboptions:
+ enable:
+ description: Enable area authentication
+ type: bool
+ message_digest:
+ description: Use IPsec authentication
+ type: bool
+ capability:
+ description:
+ - Enable area specific capability
+ - Enable exclusion of links from base topology
+ type: bool
+ default_cost:
+ description:
+ - Set the summary default-cost of a NSSA/stub area
+ - Stub's advertised external route metric
+ - Note, please refer vendor documentation for respective valid values
+ type: int
+ filter_list:
+ description: Filter networks between OSPF areas
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Name of an IP prefix-list
+ type: str
+ direction:
+ description: The direction to apply on the filter networks sent to and from this area.
+ type: str
+ choices: ['in', 'out']
+ required: true
+ nssa:
+ description: Specify a NSSA area
+ type: dict
+ suboptions:
+ set:
+ description: Enable a NSSA area
+ type: bool
+ default_information_originate:
+ description: Originate Type 7 default into NSSA area
+ type: dict
+ suboptions:
+ metric:
+ description: OSPF default metric
+ type: int
+ metric_type:
+ description:
+ - OSPF metric type for default routes
+ - OSPF Link State type
+ type: int
+ choices: [1, 2]
+ nssa_only:
+ description: Limit default advertisement to this NSSA area
+ type: bool
+ no_ext_capability:
+ description: Do not send domain specific capabilities into NSSA
+ type: bool
+ no_redistribution:
+ description: No redistribution into this NSSA area
+ type: bool
+ no_summary:
+ description: Do not send summary LSA into NSSA
+ type: bool
+ translate:
+ description:
+ - Translate LSA
+ - Always translate LSAs on this ABR
+ - Suppress forwarding address in translated LSAs
+ type: str
+ choices: ['always', 'suppress-fa']
+ ranges:
+ description: Summarize routes matching address/mask (border routers only)
+ type: list
+ elements: dict
+ suboptions:
+ address:
+ description: IP address to match
+ type: str
+ netmask:
+ description: IP mask for address
+ type: str
+ advertise:
+ description:
+ - Advertise this range (default)
+ - Since, advertise when enabled is not shown in running-config
+ idempotency won't be maintained for the play in the second or
+ next run of the play.
+ type: bool
+ cost:
+ description: User specified metric for this range
+ type: int
+ not_advertise:
+ description: DoNotAdvertise this range
+ type: bool
+ sham_link:
+ description: Define a sham link and its parameters
+ type: dict
+ suboptions:
+ source:
+ description: IP addr associated with sham-link source (A.B.C.D)
+ type: str
+ destination:
+ description: IP addr associated with sham-link destination (A.B.C.D)
+ type: str
+ cost:
+ description:
+ - Associate a cost with the sham-link
+ - Cost of the sham-link
+ - Note, please refer vendor documentation for respective valid values
+ type: int
+ ttl_security:
+ description:
+ - TTL security check
+ - Maximum number of IP hops allowed
+ type: int
+ stub:
+ description:
+ - Specify a stub area
+ - Backbone can not be configured as stub area
+ type: dict
+ suboptions:
+ set:
+ description: Enable a stub area
+ type: bool
+ no_ext_capability:
+ description: Do not send domain specific capabilities into stub area
+ type: bool
+ no_summary:
+ description: Do not send summary LSA into stub area
+ type: bool
+ auto_cost:
+ description: Calculate OSPF interface cost according to bandwidth
+ type: dict
+ suboptions:
+ set:
+ description: Enable OSPF auto-cost
+ type: bool
+ reference_bandwidth:
+ description:
+ - Use reference bandwidth method to assign OSPF cost
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ bfd:
+ description:
+ - BFD configuration commands
+ - Enable BFD on all interfaces
+ type: bool
+ capability:
+ description: Enable specific OSPF feature
+ type: dict
+ suboptions:
+ lls:
+ description: Link-local Signaling (LLS) support
+ type: bool
+ opaque:
+ description: Opaque LSA
+ type: bool
+ transit:
+ description: Transit Area
+ type: bool
+ vrf_lite:
+ description: Do not perform PE specific checks
+ type: bool
+ compatible:
+ description: OSPF router compatibility list
+ type: dict
+ suboptions:
+ rfc1583:
+ description: compatible with RFC 1583
+ type: bool
+ rfc1587:
+ description: compatible with RFC 1587
+ type: bool
+ rfc5243:
+ description: supports DBD exchange optimization
+ type: bool
+ default_information:
+ description: Control distribution of default information
+ type: dict
+ suboptions:
+ originate:
+ description: Distribute a default route
+ type: bool
+ always:
+ description: Always advertise default route
+ type: bool
+ metric:
+ description:
+ - OSPF default metric
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ metric_type:
+ description:
+ - OSPF metric type for default routes
+ - Note, please refer vendor documentation for respective valid range
+ type: int
+ route_map:
+ description: Route-map reference name
+ type: str
+ default_metric:
+ description: Set metric of redistributed routes
+ type: int
+ discard_route:
+ description: Enable or disable discard-route installation
+ type: dict
+ suboptions:
+ set:
+ description: Enable discard-route installation
+ type: bool
+ external:
+ description:
+ - Discard route for redistributed summarised routes
+ - Administrative distance for redistributed summarised routes
+ - Note, please refer vendor documentation for respective valid range
+ type: int
+ internal:
+ description:
+ - Discard route for summarised internal routes
+ - Administrative distance for summarised internal routes
+ - Note, please refer vendor documentation for respective valid range
+ type: int
+ distance:
+ description: Define an administrative distance
+ type: dict
+ suboptions:
+ admin_distance:
+ description: OSPF Administrative distance
+ type: dict
+ suboptions:
+ distance:
+ description: Administrative distance
+ type: int
+ address:
+ description: IP Source address
+ type: str
+ wildcard_bits:
+ description: Wildcard bits
+ type: str
+ acl:
+ description: Access-list name/number
+ type: str
+ ospf:
+ description: OSPF distance
+ type: dict
+ suboptions:
+ external:
+ description: External type 5 and type 7 routes
+ type: int
+ inter_area:
+ description: Inter-area routes
+ type: int
+ intra_area:
+ description: Intra-area routes
+ type: int
+ distribute_list:
+ description: Filter networks in routing updates
+ type: dict
+ suboptions:
+ acls:
+ description: IP access list
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: IP access list name/number
+ type: str
+ required: true
+ direction:
+ description: Filter incoming and outgoing routing updates.
+ type: str
+ required: true
+ choices: ['in', 'out']
+ interface:
+ description:
+ - Interface configuration (GigabitEthernet A/B)
+ - Valid with incoming traffic
+ type: str
+ protocol:
+ description:
+ - Protocol config (bgp 1).
+ - Valid with outgoing traffic
+ type: str
+ prefix:
+ description: Filter prefixes in routing updates
+ type: dict
+ suboptions:
+ name:
+ description: Name of an IP prefix-list
+ type: str
+ required: true
+ gateway_name:
+ description: Gateway name for filtering incoming updates based on gateway
+ type: str
+ direction:
+ description: Filter incoming and outgoing routing updates.
+ type: str
+ required: true
+ choices: ['in', 'out']
+ interface:
+ description:
+ - Interface configuration (GigabitEthernet A/B)
+ - Valid with incoming traffic
+ type: str
+ protocol:
+ description:
+ - Protocol config (bgp 1).
+ - Valid with outgoing traffic
+ type: str
+ route_map:
+ description: Filter prefixes in routing updates
+ type: dict
+ suboptions:
+ name:
+ description: Route-map name
+ type: str
+ required: true
+ domain_id:
+ description: OSPF domain-id
+ type: dict
+ suboptions:
+ ip_address:
+ description: IP address
+ type: dict
+ suboptions:
+ address:
+ description: OSPF domain ID in IP address format
+ type: str
+ secondary:
+ description: Secondary Domain-ID
+ type: bool
+ 'null':
+ description: Null Domain-ID
+ type: bool
+ domain_tag:
+ description:
+ - OSPF domain-tag which is OSPF domain tag - 32-bit value
+ - Note, please refer vendor documentation for respective valid range
+ type: int
+ event_log:
+ description: Event Logging
+ type: dict
+ suboptions:
+ enable:
+ description: Enable event Logging
+ type: bool
+ one_shot:
+ description: Disable Logging When Log Buffer Becomes Full
+ type: bool
+ pause:
+ description: Pause Event Logging
+ type: bool
+ size:
+ description:
+ - Maximum Number of Events Stored in the Event Log
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ help:
+ description: Description of the interactive help system
+ type: bool
+ ignore:
+ description:
+ - Do not complain about specific event
+ - Do not complain upon receiving LSA of the specified type, MOSPF Type 6 LSA
+ type: bool
+ interface_id:
+ description:
+ - Source of the interface ID
+ - SNMP MIB ifIndex
+ type: bool
+ ispf:
+ description: Enable incremental SPF computation
+ type: bool
+ limit:
+ description: Limit a specific OSPF feature and LS update, DBD, and LS request retransmissions
+ type: dict
+ suboptions:
+ dc:
+ description: Demand circuit retransmissions
+ type: dict
+ suboptions:
+ number:
+ description: The maximum number of retransmissions
+ type: int
+ disable:
+ description: Disble the feature
+ type: bool
+ non_dc:
+ description: Non-demand-circuit retransmissions
+ type: dict
+ suboptions:
+ number:
+ description: The maximum number of retransmissions
+ type: int
+ disable:
+ description: Disble the feature
+ type: bool
+ local_rib_criteria:
+ description: Enable or disable usage of local RIB as route criteria
+ type: dict
+ suboptions:
+ enable:
+ description: Enable usage of local RIB as route criteria
+ type: bool
+ forwarding_address:
+ description: Local RIB used to validate external/NSSA forwarding addresses
+ type: bool
+ inter_area_summary:
+ description: Local RIB used as criteria for inter-area summaries
+ type: bool
+ nssa_translation:
+ description: Local RIB used as criteria for NSSA translation
+ type: bool
+ log_adjacency_changes:
+ description: Log changes in adjacency state
+ type: dict
+ suboptions:
+ set:
+ description: Log changes in adjacency state
+ type: bool
+ detail:
+ description: Log all state changes
+ type: bool
+ max_lsa:
+ description: Maximum number of non self-generated LSAs to accept
+ type: dict
+ suboptions:
+ number:
+ description:
+ - Maximum number of non self-generated LSAs to accept
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ threshold_value:
+ description:
+ - Threshold value (%) at which to generate a warning msg
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ ignore_count:
+ description:
+ - Maximum number of times adjacencies can be suppressed
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ ignore_time:
+ description:
+ - Number of minutes during which all adjacencies are suppressed
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ reset_time:
+ description:
+ - Number of minutes after which ignore-count is reset to zero
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ warning_only:
+ description: Only give a warning message when limit is exceeded
+ type: bool
+ max_metric:
+ description: Set maximum metric
+ type: dict
+ suboptions:
+ router_lsa:
+ description: Maximum metric in self-originated router-LSAs
+ type: bool
+ required: true
+ external_lsa:
+ description:
+ - Override external-lsa metric with max-metric value
+ - Overriding metric in external-LSAs
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ include_stub:
+ description: Set maximum metric for stub links in router-LSAs
+ type: bool
+ on_startup:
+ description: Set maximum metric temporarily after reboot
+ type: dict
+ suboptions:
+ time:
+ description:
+ - Time, in seconds, router-LSAs are originated with max-metric
+ - Note, please refer vendor documentation for respective valid range
+ type: int
+ wait_for_bgp:
+ description: Let BGP decide when to originate router-LSA with normal metric
+ type: bool
+ summary_lsa:
+ description:
+ - Override summary-lsa metric with max-metric value
+ - Note, please refer vendor documentation for respective valid range
+ type: int
+ maximum_paths:
+ description:
+ - Forward packets over multiple paths
+ - Number of paths
+ type: int
+ mpls:
+ description: Configure MPLS routing protocol parameters
+ type: dict
+ suboptions:
+ ldp:
+ description: routing protocol commands for MPLS LDP
+ type: dict
+ suboptions:
+ autoconfig:
+ description: routing protocol commands for MPLS LDP
+ type: dict
+ suboptions:
+ set:
+ description: Configure LDP automatic configuration and set the config
+ type: bool
+ area:
+ description: Configure an OSPF area to run MPLS LDP
+ type: str
+ sync:
+ description: Configure LDP-IGP Synchronization
+ type: bool
+ traffic_eng:
+ description: Let BGP decide when to originate router-LSA with normal metric
+ type: dict
+ suboptions:
+ area:
+ description:
+ - Configure an ospf area to run MPLS Traffic Engineering
+ - OSPF area ID as a decimal value or in IP address format
+ type: str
+ autoroute_exclude:
+ description:
+ - MPLS TE autoroute exclude
+ - Filter prefixes based on name of an IP prefix-list
+ type: str
+ interface:
+ description: MPLS TE interface configuration for this OSPF process
+ type: dict
+ suboptions:
+ interface_type:
+ description: TE Interface configuration (GigabitEthernet A/B)
+ type: str
+ area:
+ description:
+ - Advertise MPLS TE information for this interface into area
+ - OSPF area ID as a decimal value
+ type: int
+ mesh_group:
+ description: Traffic Engineering Mesh-Group advertisement
+ type: dict
+ suboptions:
+ id:
+ description: Mesh Group Id
+ type: int
+ interface:
+ description: Interface configuration (GigabitEthernet A/B)
+ type: str
+ area:
+ description: configure flooding scope as area
+ type: str
+ multicast_intact:
+ description: MPLS TE and PIM interaction
+ type: bool
+ router_id_interface:
+ description: Router Interface configuration (GigabitEthernet A/B)
+ type: str
+ neighbor:
+ description: Specify a neighbor router
+ type: dict
+ suboptions:
+ address:
+ description: Neighbor address (A.B.C.D)
+ type: str
+ cost:
+ description:
+ - OSPF cost for point-to-multipoint neighbor metric
+ - Note, please refer vendor documentation for respective valid range
+ type: int
+ database_filter:
+ description:
+ - Filter OSPF LSA during synchronization and flooding for point-to-multipoint neighbor
+ - Filter all outgoing LSA
+ type: bool
+ poll_interval:
+ description: OSPF dead-router polling interval of non-broadcast neighbor in Seconds
+ type: int
+ priority:
+ description: OSPF priority of non-broadcast neighbor priority
+ type: int
+ network:
+ description: Enable routing on an IP network
+ type: list
+ elements: dict
+ suboptions:
+ address:
+ description: Network number
+ type: str
+ wildcard_bits:
+ description: OSPF wild card bits
+ type: str
+ area:
+ description: Set the OSPF area ID
+ type: str
+ nsf:
+ description: Non-stop forwarding
+ type: dict
+ suboptions:
+ cisco:
+ description: Cisco Non-stop forwarding
+ type: dict
+ suboptions:
+ helper:
+ description: helper support
+ type: bool
+ disable:
+ description: disable helper support
+ type: bool
+ ietf:
+ description: IETF graceful restart
+ type: dict
+ suboptions:
+ helper:
+ description: helper support
+ type: bool
+ disable:
+ description: disable helper support
+ type: bool
+ strict_lsa_checking:
+ description: enable helper strict LSA checking
+ type: bool
+ passive_interface:
+ description:
+ - Suppress routing updates on an interface (GigabitEthernet A/B)
+ - Interface name with respective interface number
+ type: str
+ prefix_suppression:
+ description: Enable prefix suppression
+ type: bool
+ priority:
+ description:
+ - OSPF topology priority
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ queue_depth:
+ description: Hello/Router process queue depth
+ type: dict
+ suboptions:
+ hello:
+ description: OSPF Hello process queue depth
+ type: dict
+ suboptions:
+ max_packets:
+ description: maximum number of packets in the queue
+ type: int
+ unlimited:
+ description: Unlimited queue depth
+ type: bool
+ update:
+ description: OSPF Router process queue depth
+ type: dict
+ suboptions:
+ max_packets:
+ description: maximum number of packets in the queue
+ type: int
+ unlimited:
+ description: Unlimited queue depth
+ type: bool
+ router_id:
+ description:
+ - Router-id address for this OSPF process
+ - OSPF router-id in IP address format (A.B.C.D)
+ type: str
+ shutdown:
+ description: Shutdown the router process
+ type: bool
+ summary_address:
+ description: Configure IP address summaries
+ type: dict
+ suboptions:
+ address:
+ description: IP summary address
+ type: str
+ mask:
+ description: IP Summary mask
+ type: str
+ not_advertise:
+ description: Do not advertise or translate
+ type: bool
+ nssa_only:
+ description: Limit summary to NSSA areas
+ type: bool
+ tag:
+ description: Set tag
+ type: int
+ timers:
+ description: Adjust routing timers
+ type: dict
+ suboptions:
+ lsa:
+ description:
+ - OSPF LSA timers, arrival timer
+ - The minimum interval in milliseconds between accepting the same LSA
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ pacing:
+ description: OSPF pacing timers
+ type: dict
+ suboptions:
+ flood:
+ description:
+ - OSPF flood pacing timer
+ - The minimum interval in msec to pace limit flooding on interface
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ lsa_group:
+ description:
+ - OSPF LSA group pacing timer
+ - Interval in sec between group of LSA being refreshed or maxaged
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ retransmission:
+ description:
+ - OSPF retransmission pacing timer
+ - The minimum interval in msec between neighbor retransmissions
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ throttle:
+ description: OSPF throttle timers
+ type: dict
+ suboptions:
+ lsa:
+ description: OSPF LSA throttle timers
+ type: dict
+ suboptions:
+ first_delay:
+ description:
+ - Delay to generate first occurrence of LSA in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ min_delay:
+ description:
+ - Minimum delay between originating the same LSA in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ max_delay:
+ description:
+ - Maximum delay between originating the same LSA in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ spf:
+ description: OSPF SPF throttle timers
+ - Delay between receiving a change to SPF calculation in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: dict
+ suboptions:
+ receive_delay:
+ description:
+ - Delay between receiving a change to SPF calculation in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ between_delay:
+ description:
+ - Delay between first and second SPF calculation in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ max_delay:
+ description:
+ - Maximum wait time in milliseconds for SPF calculations
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ traffic_share:
+ description:
+ - How to compute traffic share over alternate paths
+ - All traffic shared among min metric paths
+ - Use different interfaces for equal-cost paths
+ type: bool
+ ttl_security:
+ description: TTL security check
+ type: dict
+ suboptions:
+ set:
+ description: Enable TTL Security on all interfaces
+ type: bool
+ hops:
+ description:
+ - Maximum number of IP hops allowed
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS
+ device by executing the command B(sh running-config | section ^router ospf).
+ - The state I(parsed) reads the configuration from C(running_config)
+ option and transforms it into Ansible structured data as per the
+ resource module's argspec and the value is then returned in the
+ I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - parsed
+ - rendered
+ default: merged
+
+"""
+EXAMPLES = """
+
+# Using deleted
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospf
+# router ospf 200 vrf blue
+# domain-id 192.0.3.1
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# area 10 capability default-exclusion
+# distribute-list 10 out
+# distribute-list 123 in
+# router ospf 1
+# max-metric router-lsa on-startup 110
+# area 10 authentication message-digest
+# area 10 nssa default-information-originate metric 10
+# area 10 nssa translate type7 suppress-fa
+# area 10 default-cost 10
+# area 10 filter-list prefix test_prefix_out out
+# network 198.51.100.0 0.0.0.255 area 5
+# default-information originate
+
+- name: Delete provided OSPF V2 processes
+ cisco.ios.ios_ospfv2:
+ config:
+ processes:
+ - process_id: 1
+ - process_id: 200
+ vrf: blue
+ state: deleted
+
+# Commands Fired:
+# ---------------
+#
+# "commands": [
+# "no router ospf 1"
+# ]
+
+# After state:
+# -------------
+# router-ios#sh running-config | section ^router ospf
+# router ospf 200 vrf blue
+# domain-id 192.0.3.1
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# area 10 capability default-exclusion
+# distribute-list 10 out
+# distribute-list 123 in
+
+# Using deleted without any config passed (NOTE: This will delete all OSPFV2 configuration from device)
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospf
+# router ospf 200 vrf blue
+# domain-id 192.0.3.1
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# area 10 capability default-exclusion
+# distribute-list 10 out
+# distribute-list 123 in
+# router ospf 1
+# max-metric router-lsa on-startup 110
+# area 10 authentication message-digest
+# area 10 nssa default-information-originate metric 10
+# area 10 nssa translate type7 suppress-fa
+# area 10 default-cost 10
+# area 10 filter-list prefix test_prefix_out out
+# network 198.51.100.0 0.0.0.255 area 5
+# default-information originate
+
+- name: Delete all OSPF processes
+ cisco.ios.ios_ospfv2:
+ state: deleted
+
+# Commands Fired:
+# ---------------
+#
+# "commands": [
+# "no router ospf 200 vrf blue",
+# "no router ospf 1"
+# ]
+
+# After state:
+# -------------
+# router-ios#sh running-config | section ^router ospf
+# router-ios#
+
+# Using merged
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospf
+# router-ios#
+
+- name: Merge provided OSPF V2 configuration
+ cisco.ios.ios_ospfv2:
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ areas:
+ - area_id: '5'
+ capability: true
+ authentication:
+ enable: true
+ - area_id: '10'
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ default_cost: 10
+ filter_list:
+ - name: test_prefix_in
+ direction: in
+ - name: test_prefix_out
+ direction: out
+ network:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ area: 5
+ default_information:
+ originate: true
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.3.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ areas:
+ - area_id: '10'
+ capability: true
+ distribute_list:
+ acls:
+ - name: 10
+ direction: out
+ - name: 123
+ direction: in
+ state: merged
+
+# Commands Fired:
+# ---------------
+#
+# "commands": [
+# "router ospf 200 vrf blue",
+# "auto-cost reference-bandwidth 4",
+# "distribute-list 10 out",
+# "distribute-list 123 in",
+# "domain-id 192.0.3.1",
+# "max-metric router-lsa on-startup 100",
+# "area 10 capability default-exclusion",
+# "router ospf 1",
+# "default-information originate",
+# "max-metric router-lsa on-startup 110",
+# "network 198.51.100.0 0.0.0.255 area 5",
+# "area 10 authentication message-digest",
+# "area 10 default-cost 10",
+# "area 10 nssa translate type7 suppress-fa",
+# "area 10 nssa default-information-originate metric 10",
+# "area 10 filter-list prefix test_prefix_out out",
+# "area 10 filter-list prefix test_prefix_in in",
+# "area 5 authentication",
+# "area 5 capability default-exclusion"
+# ]
+
+# After state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospf
+# router ospf 200 vrf blue
+# domain-id 192.0.3.1
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# area 10 capability default-exclusion
+# distribute-list 10 out
+# distribute-list 123 in
+# router ospf 1
+# max-metric router-lsa on-startup 110
+# area 10 authentication message-digest
+# area 10 nssa default-information-originate metric 10
+# area 10 nssa translate type7 suppress-fa
+# area 10 default-cost 10
+# area 10 filter-list prefix test_prefix_out out
+# network 198.51.100.0 0.0.0.255 area 5
+# default-information originate
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospf
+# router ospf 200 vrf blue
+# domain-id 192.0.3.1
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# area 10 capability default-exclusion
+# distribute-list 10 out
+# distribute-list 123 in
+# router ospf 1
+# max-metric router-lsa on-startup 110
+# area 10 authentication message-digest
+# area 10 nssa default-information-originate metric 10
+# area 10 nssa translate type7 suppress-fa
+# area 10 default-cost 10
+# area 10 filter-list prefix test_prefix_out out
+# network 198.51.100.0 0.0.0.255 area 5
+# default-information originate
+
+- name: Override provided OSPF V2 configuration
+ cisco.ios.ios_ospfv2:
+ config:
+ processes:
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.4.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ maximum_paths: 15
+ ttl_security:
+ hops: 7
+ areas:
+ - area_id: '10'
+ default_cost: 10
+ authentication:
+ message_digest: true
+ - process_id: 100
+ vrf: ospf_vrf
+ domain_id:
+ ip_address:
+ address: 192.0.5.1
+ auto_cost:
+ reference_bandwidth: 5
+ areas:
+ - area_id: '5'
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ state: overridden
+
+# Commands Fired:
+# ---------------
+#
+# "commands": [
+# "no router ospf 1",
+# "router ospf 100 vrf ospf_vrf",
+# "auto-cost reference-bandwidth 5",
+# "domain-id 192.0.5.1",
+# "area 5 authentication message-digest",
+# "area 5 nssa translate type7 suppress-fa",
+# "area 5 nssa default-information-originate metric 10",
+# "router ospf 200 vrf blue",
+# "no auto-cost reference-bandwidth 4",
+# "no distribute-list 10 out",
+# "no distribute-list 123 in",
+# "domain-id 192.0.4.1",
+# "max-metric router-lsa on-startup 200",
+# "maximum-paths 15",
+# "ttl-security all-interfaces hops 7",
+# "area 10 authentication message-digest",
+# "no area 10 capability default-exclusion",
+# "area 10 default-cost 10"
+# ]
+
+# After state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospf
+# router ospf 200 vrf blue
+# domain-id 192.0.4.1
+# max-metric router-lsa on-startup 200
+# ttl-security all-interfaces hops 7
+# area 10 authentication message-digest
+# area 10 default-cost 10
+# maximum-paths 15
+# router ospf 100 vrf ospf_vrf
+# domain-id 192.0.5.1
+# auto-cost reference-bandwidth 5
+# area 5 authentication message-digest
+# area 5 nssa default-information-originate metric 10
+# area 5 nssa translate type7 suppress-fa
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospf
+# router ospf 200 vrf blue
+# domain-id 192.0.3.1
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# area 10 capability default-exclusion
+# distribute-list 10 out
+# distribute-list 123 in
+# router ospf 1
+# max-metric router-lsa on-startup 110
+# area 10 authentication message-digest
+# area 10 nssa default-information-originate metric 10
+# area 10 nssa translate type7 suppress-fa
+# area 10 default-cost 10
+# area 10 filter-list prefix test_prefix_out out
+# network 198.51.100.0 0.0.0.255 area 5
+# default-information originate
+
+- name: Replaced provided OSPF V2 configuration
+ cisco.ios.ios_ospfv2:
+ config:
+ processes:
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.4.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ maximum_paths: 15
+ ttl_security:
+ hops: 7
+ areas:
+ - area_id: '10'
+ default_cost: 10
+ authentication:
+ message_digest: true
+ - process_id: 100
+ vrf: ospf_vrf
+ domain_id:
+ ip_address:
+ address: 192.0.5.1
+ auto_cost:
+ reference_bandwidth: 5
+ areas:
+ - area_id: '5'
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ state: replaced
+
+# Commands Fired:
+# ---------------
+# "commands": [
+# "router ospf 100 vrf ospf_vrf",
+# "auto-cost reference-bandwidth 5",
+# "domain-id 192.0.5.1",
+# "area 5 authentication message-digest",
+# "area 5 nssa translate type7 suppress-fa",
+# "area 5 nssa default-information-originate metric 10",
+# "router ospf 200 vrf blue",
+# "no auto-cost reference-bandwidth 4",
+# "no distribute-list 10 out",
+# "no distribute-list 123 in",
+# "domain-id 192.0.4.1",
+# "max-metric router-lsa on-startup 200",
+# "maximum-paths 15",
+# "ttl-security all-interfaces hops 7",
+# "area 10 authentication message-digest",
+# "no area 10 capability default-exclusion",
+# "area 10 default-cost 10"
+# ]
+
+# After state:
+# -------------
+# router-ios#sh running-config | section ^router ospf
+# router ospf 200 vrf blue
+# domain-id 192.0.4.1
+# max-metric router-lsa on-startup 200
+# ttl-security all-interfaces hops 7
+# area 10 authentication message-digest
+# area 10 default-cost 10
+# maximum-paths 15
+# router ospf 100 vrf ospf_vrf
+# domain-id 192.0.5.1
+# auto-cost reference-bandwidth 5
+# area 5 authentication message-digest
+# area 5 nssa default-information-originate metric 10
+# area 5 nssa translate type7 suppress-fa
+# router ospf 1
+# max-metric router-lsa on-startup 110
+# area 5 capability default-exclusion
+# area 5 authentication
+# area 10 authentication message-digest
+# area 10 nssa default-information-originate metric 10
+# area 10 nssa translate type7 suppress-fa
+# area 10 default-cost 10
+# area 10 filter-list prefix test_prefix_in in
+# area 10 filter-list prefix test_prefix_out out
+# network 198.51.100.0 0.0.0.255 area 5
+# default-information originate
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospf
+# router ospf 200 vrf blue
+# domain-id 192.0.3.1
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# area 10 capability default-exclusion
+# distribute-list 10 out
+# distribute-list 123 in
+# router ospf 1
+# max-metric router-lsa on-startup 110
+# area 10 authentication message-digest
+# area 10 nssa default-information-originate metric 10
+# area 10 nssa translate type7 suppress-fa
+# area 10 default-cost 10
+# area 10 filter-list prefix test_prefix_out out
+# network 198.51.100.0 0.0.0.255 area 5
+# default-information originate
+
+- name: Gather OSPFV2 provided configurations
+ cisco.ios.ios_ospfv2:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "5",
+# "authentication": {
+# "enable": true
+# },
+# "capability": true
+# },
+# {
+# "area_id": "10",
+# "authentication": {
+# "message_digest": true
+# },
+# "default_cost": 10,
+# "filter_list": [
+# {
+# "direction": "in",
+# "name": "test_prefix_in"
+# },
+# {
+# "direction": "out",
+# "name": "test_prefix_out"
+# }
+# ],
+# "nssa": {
+# "default_information_originate": {
+# "metric": 10
+# },
+# "translate": "suppress-fa"
+# }
+# }
+# ],
+# "default_information": {
+# "originate": true
+# },
+# "max_metric": {
+# "on_startup": {
+# "time": 110
+# },
+# "router_lsa": true
+# },
+# "network": {
+# "address": "198.51.100.0",
+# "area": "5",
+# "wildcard_bits": "0.0.0.255"
+# },
+# "process_id": 1
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "capability": true
+# }
+# ],
+# "auto_cost": {
+# "reference_bandwidth": 4
+# },
+# "distribute_list": {
+# "acls": [
+# {
+# "direction": "out",
+# "name": "10"
+# },
+# {
+# "direction": "in",
+# "name": "123"
+# }
+# ]
+# },
+# "domain_id": {
+# "ip_address": {
+# "address": "192.0.3.1"
+# }
+# },
+# "max_metric": {
+# "on_startup": {
+# "time": 100
+# },
+# "router_lsa": true
+# },
+# "process_id": 200,
+# "vrf": "blue"
+# }
+# ]
+# }
+
+# After state:
+# ------------
+#
+# router-ios#sh running-config | section ^router ospf
+# router ospf 200 vrf blue
+# domain-id 192.0.3.1
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# area 10 capability default-exclusion
+# distribute-list 10 out
+# distribute-list 123 in
+# router ospf 1
+# max-metric router-lsa on-startup 110
+# area 10 authentication message-digest
+# area 10 nssa default-information-originate metric 10
+# area 10 nssa translate type7 suppress-fa
+# area 10 default-cost 10
+# area 10 filter-list prefix test_prefix_out out
+# network 198.51.100.0 0.0.0.255 area 5
+# default-information originate
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_ospfv2:
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ areas:
+ - area_id: '5'
+ capability: true
+ authentication:
+ enable: true
+ - area_id: '10'
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ default_cost: 10
+ filter_list:
+ - name: test_prefix_in
+ direction: in
+ - name: test_prefix_out
+ direction: out
+ network:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ area: 5
+ default_information:
+ originate: true
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.3.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ areas:
+ - area_id: '10'
+ capability: true
+ distribute_list:
+ acls:
+ - name: 10
+ direction: out
+ - name: 123
+ direction: in
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "router ospf 200 vrf blue",
+# "auto-cost reference-bandwidth 4",
+# "distribute-list 10 out",
+# "distribute-list 123 in",
+# "domain-id 192.0.3.1",
+# "max-metric router-lsa on-startup 100",
+# "area 10 capability default-exclusion",
+# "router ospf 1",
+# "default-information originate",
+# "max-metric router-lsa on-startup 110",
+# "network 198.51.100.0 0.0.0.255 area 5",
+# "area 10 authentication message-digest",
+# "area 10 default-cost 10",
+# "area 10 nssa translate type7 suppress-fa",
+# "area 10 nssa default-information-originate metric 10",
+# "area 10 filter-list prefix test_prefix_out out",
+# "area 10 filter-list prefix test_prefix_in in",
+# "area 5 authentication",
+# "area 5 capability default-exclusion"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# router ospf 100
+# auto-cost reference-bandwidth 5
+# domain-id 192.0.5.1
+# area 5 authentication message-digest
+# area 5 nssa translate type7 suppress-fa
+# area 5 nssa default-information-originate metric 10
+
+- name: Parse the provided configuration with the exisiting running configuration
+ cisco.ios.ios_ospfv2:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "5",
+# "authentication": {
+# "message_digest": true
+# },
+# "nssa": {
+# "default_information_originate": {
+# "metric": 10
+# },
+# "translate": "suppress-fa"
+# }
+# }
+# ],
+# "auto_cost": {
+# "reference_bandwidth": 5
+# },
+# "domain_id": {
+# "ip_address": {
+# "address": "192.0.5.1"
+# }
+# },
+# "process_id": 100
+# }
+# ]
+# }
+
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+ type: dict
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+ type: dict
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['router ospf 200 vrf blue', 'auto-cost reference-bandwidth 5', 'domain-id 192.0.4.1']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.ospfv2.ospfv2 import (
+ Ospfv2Args,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.ospfv2.ospfv2 import (
+ Ospfv2,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Ospfv2Args.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Ospfv2(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ospfv3.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ospfv3.py
new file mode 100644
index 00000000..f566a2e2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ospfv3.py
@@ -0,0 +1,1974 @@
+#!/usr/bin/python
+#
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for ios_ospfv3
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: ios_ospfv3
+short_description: OSPFv3 resource module
+description: This module configures and manages the Open Shortest Path First (OSPF)
+ version 3 on IOS platforms.
+version_added: 1.1.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL.
+options:
+ config:
+ description: A list of configurations for ospfv3.
+ type: dict
+ suboptions:
+ processes:
+ description: List of OSPF instance configurations.
+ type: list
+ elements: dict
+ suboptions:
+ process_id:
+ description: Process ID
+ required: true
+ type: int
+ address_family:
+ description: Enter Address Family command mode
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description: Enter Address Family command mode
+ type: str
+ choices:
+ - ipv4
+ - ipv6
+ unicast:
+ description: Address Family modifier
+ type: bool
+ vrf:
+ description: Specify parameters for a VPN Routing/Forwarding instance
+ type: str
+ adjacency:
+ description: Control adjacency formation
+ type: dict
+ suboptions:
+ min_adjacency:
+ description:
+ - Initial number of adjacencies allowed to be forming in an area
+ - Please refer vendor documentation for valid values
+ type: int
+ none:
+ description: No initial
+ type: bool
+ max_adjacency:
+ description:
+ - Maximum number of adjacencies allowed to be forming
+ - Please refer vendor documentation for valid values
+ type: int
+ disable:
+ description: Disable adjacency staggering
+ type: bool
+ areas:
+ description: OSPF area parameters
+ type: list
+ elements: dict
+ suboptions:
+ area_id:
+ description:
+ - OSPF area ID as a decimal value. Please refer vendor documentation
+ of Valid values.
+ - OSPF area ID in IP address format(e.g. A.B.C.D)
+ type: str
+ authentication:
+ description: Authentication parameters
+ type: dict
+ suboptions:
+ key_chain:
+ description: Use a key-chain for cryptographic authentication keys
+ type: str
+ 'null':
+ description: Use no authentication
+ type: bool
+ default_cost:
+ description:
+ - Set the summary default-cost of a NSSA/stub area
+ - Stub's advertised external route metric
+ - Note, please refer vendor documentation for respective valid values
+ type: int
+ filter_list:
+ description: Filter networks between OSPFv3 areas
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Name of an IP prefix-list
+ type: str
+ direction:
+ description: The direction to apply on the filter networks sent to and from this area.
+ type: str
+ choices: ['in', 'out']
+ required: True
+ normal:
+ description: Specify a normal area type
+ type: bool
+ nssa:
+ description: Specify a NSSA area
+ type: dict
+ suboptions:
+ set:
+ description: Enable a NSSA area
+ type: bool
+ default_information_originate:
+ description: Originate Type 7 default into NSSA area
+ type: dict
+ suboptions:
+ metric:
+ description: OSPF default metric
+ type: int
+ metric_type:
+ description:
+ - OSPF metric type for default routes
+ - OSPF Link State type
+ type: int
+ choices: [1, 2]
+ nssa_only:
+ description: Limit default advertisement to this NSSA area
+ type: bool
+ no_redistribution:
+ description: No redistribution into this NSSA area
+ type: bool
+ no_summary:
+ description: Do not send summary LSA into NSSA
+ type: bool
+ translate:
+ description:
+ - Translate LSA
+ - Always translate LSAs on this ABR
+ - Suppress forwarding address in translated LSAs
+ type: str
+ choices: ['always', 'suppress-fa']
+ ranges:
+ description: Summarize routes matching address/mask (border routers only)
+ type: list
+ elements: dict
+ suboptions:
+ address:
+ description: IP address to match
+ type: str
+ netmask:
+ description: IP mask for address
+ type: str
+ advertise:
+ description:
+ - Advertise this range (default)
+ - Since, advertise when enabled is not shown in running-config
+ idempotency won't be maintained for the play in the second or
+ next run of the play.
+ type: bool
+ cost:
+ description: User specified metric for this range
+ type: int
+ not_advertise:
+ description: DoNotAdvertise this range
+ type: bool
+ sham_link:
+ description: Define a sham link and its parameters
+ type: dict
+ suboptions:
+ source:
+ description: IPv6 address associated with sham-link source (X:X:X:X::X)
+ type: str
+ destination:
+ description: IPv6 address associated with sham-link destination (X:X:X:X::X)
+ type: str
+ authentication:
+ description: Authentication parameters
+ type: dict
+ suboptions:
+ key_chain:
+ description: Use a key-chain for cryptographic authentication keys
+ type: str
+ 'null':
+ description: Use no authentication
+ type: bool
+ cost:
+ description:
+ - Associate a cost with the sham-link
+ - Cost of the sham-link
+ type: int
+ ttl_security:
+ description:
+ - TTL security check
+ - maximum number of hops allowed
+ type: int
+ stub:
+ description:
+ - Specify a stub area
+ - Backbone can not be configured as stub area
+ type: dict
+ suboptions:
+ set:
+ description: Enable a stub area
+ type: bool
+ no_summary:
+ description: Do not send summary LSA into stub area
+ type: bool
+ authentication:
+ description:
+ - Authentication parameters
+ - Authentication operation mode
+ type: dict
+ suboptions:
+ deployment:
+ description: Deployment mode of operation
+ type: bool
+ normal:
+ description: Normal mode of operation
+ type: bool
+ auto_cost:
+ description: Calculate OSPF interface cost according to bandwidth
+ type: dict
+ suboptions:
+ set:
+ description: Enable OSPF auto-cost
+ type: bool
+ reference_bandwidth:
+ description:
+ - Use reference bandwidth method to assign OSPF cost
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ bfd:
+ description: BFD configuration commands
+ type: dict
+ suboptions:
+ all_interfaces:
+ description: Enable BFD on all interfaces
+ type: bool
+ disable:
+ description: Disable BFD on all interfaces
+ type: bool
+ capability:
+ description:
+ - Enable a specific feature
+ - Do not perform PE specific checks
+ type: bool
+ compatible:
+ description: OSPFv3 router compatibility list
+ type: dict
+ suboptions:
+ rfc1583:
+ description: compatible with RFC 1583
+ type: bool
+ rfc1587:
+ description: compatible with RFC 1587
+ type: bool
+ rfc5243:
+ description: supports DBD exchange optimization
+ type: bool
+ default_information:
+ description: Control distribution of default information
+ type: dict
+ suboptions:
+ originate:
+ description: Distribute a default route
+ type: bool
+ always:
+ description: Always advertise default route
+ type: bool
+ metric:
+ description:
+ - OSPF default metric
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ metric_type:
+ description:
+ - OSPF metric type for default routes
+ - Note, please refer vendor documentation for respective valid range
+ type: int
+ route_map:
+ description: Route-map reference name
+ type: str
+ default_metric:
+ description: Set metric of redistributed routes
+ type: int
+ discard_route:
+ description: Enable or disable discard-route installation
+ type: dict
+ suboptions:
+ sham_link:
+ description: Discard route for sham-link routes
+ type: bool
+ external:
+ description: Discard route for summarised redistributed routes
+ type: bool
+ internal:
+ description: Discard route for summarised inter-area routes
+ type: bool
+ distance:
+ description:
+ - Define an administrative distance
+ - Note, please refer vendor documentation for respective valid range
+ type: int
+ distribute_list:
+ description: Filter networks in routing updates
+ type: dict
+ suboptions:
+ acls:
+ description: IP access list
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: IP access list name/number
+ type: str
+ required: true
+ direction:
+ description: Filter incoming and outgoing routing updates.
+ type: str
+ required: true
+ choices: ['in', 'out']
+ interface:
+ description:
+ - Interface configuration (GigabitEthernet A/B)
+ - Valid with incoming traffic
+ type: str
+ protocol:
+ description:
+ - Protocol config (bgp 1).
+ - Valid with outgoing traffic
+ type: str
+ prefix:
+ description: Filter prefixes in routing updates
+ type: dict
+ suboptions:
+ name:
+ description: Name of an IP prefix-list
+ type: str
+ required: true
+ gateway_name:
+ description: Gateway name for filtering incoming updates based on gateway
+ type: str
+ direction:
+ description: Filter incoming and outgoing routing updates.
+ type: str
+ required: true
+ choices: ['in', 'out']
+ interface:
+ description:
+ - Interface configuration (GigabitEthernet A/B)
+ - Valid with incoming traffic
+ type: str
+ protocol:
+ description:
+ - Protocol config (bgp 1).
+ - Valid with outgoing traffic
+ type: str
+ route_map:
+ description: Filter prefixes in routing updates
+ type: dict
+ suboptions:
+ name:
+ description: Route-map name
+ type: str
+ required: true
+ event_log:
+ description: Event Logging
+ type: dict
+ suboptions:
+ enable:
+ description: Enable event Logging
+ type: bool
+ one_shot:
+ description: Disable Logging When Log Buffer Becomes Full
+ type: bool
+ pause:
+ description: Pause Event Logging
+ type: bool
+ size:
+ description:
+ - Maximum Number of Events Stored in the Event Log
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ graceful_restart:
+ description:
+ - Graceful-restart options
+ - helper support
+ type: dict
+ suboptions:
+ enable:
+ description: helper support enabled
+ type: bool
+ disable:
+ description: disable helper support
+ type: bool
+ strict_lsa_checking:
+ description: enable helper strict LSA checking
+ type: bool
+ interface_id:
+ description: Source of the interface ID
+ type: dict
+ suboptions:
+ ios_if_index:
+ description: IOS interface number
+ type: bool
+ snmp_if_index:
+ description: SNMP MIB ifIndex
+ type: bool
+ limit:
+ description: Limit a specific OSPF feature
+ type: dict
+ suboptions:
+ dc:
+ description: Demand circuit retransmissions
+ type: dict
+ suboptions:
+ number:
+ description: The maximum number of retransmissions
+ type: int
+ disable:
+ description: Disble the feature
+ type: bool
+ non_dc:
+ description: Non-demand-circuit retransmissions
+ type: dict
+ suboptions:
+ number:
+ description: The maximum number of retransmissions
+ type: int
+ disable:
+ description: Disble the feature
+ type: bool
+ local_rib_criteria:
+ description: Enable or disable usage of local RIB as route criteria
+ type: dict
+ suboptions:
+ enable:
+ description: Enable usage of local RIB as route criteria
+ type: bool
+ forwarding_address:
+ description: Local RIB used to validate external/NSSA forwarding addresses
+ type: bool
+ inter_area_summary:
+ description: Local RIB used as criteria for inter-area summaries
+ type: bool
+ nssa_translation:
+ description: Local RIB used as criteria for NSSA translation
+ type: bool
+ log_adjacency_changes:
+ description: Log changes in adjacency state
+ type: dict
+ suboptions:
+ set:
+ description: Log changes in adjacency state
+ type: bool
+ detail:
+ description: Log all state changes
+ type: bool
+ manet:
+ description: Specify MANET OSPF parameters
+ type: dict
+ suboptions:
+ cache:
+ description: Specify MANET cache sizes
+ type: dict
+ suboptions:
+ acknowledgement:
+ description:
+ - Specify MANET acknowledgement cache size
+ - Maximum number of acknowledgements in cache
+ type: int
+ update:
+ description:
+ - Specify MANET LSA cache size
+ - Maximum number of LSAs in cache
+ type: int
+ hello:
+ description: Unicast Hellos rather than multicast
+ type: dict
+ suboptions:
+ multicast:
+ description: Multicast Hello requests and responses rather than unicast
+ type: bool
+ unicast:
+ description: Unicast Hello requests and responses rather than multicast
+ type: bool
+ peering:
+ description: MANET OSPF Smart Peering
+ type: dict
+ suboptions:
+ set:
+ description: Enable selective peering
+ type: bool
+ disable:
+ description: Disable selective peering
+ type: bool
+ per_interface:
+ description: Select peers per interface rather than per node
+ type: bool
+ redundancy:
+ description:
+ - Redundant paths
+ - Number of redundant OSPF paths
+ type: int
+ willingness:
+ description: Specify and Relay willingness value
+ type: int
+ max_lsa:
+ description: Maximum number of non self-generated LSAs to accept
+ type: dict
+ suboptions:
+ number:
+ description:
+ - Maximum number of non self-generated LSAs to accept
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ threshold_value:
+ description:
+ - Threshold value (%) at which to generate a warning msg
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ ignore_count:
+ description:
+ - Maximum number of times adjacencies can be suppressed
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ ignore_time:
+ description:
+ - Number of minutes during which all adjacencies are suppressed
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ reset_time:
+ description:
+ - Number of minutes after which ignore-count is reset to zero
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ warning_only:
+ description: Only give a warning message when limit is exceeded
+ type: bool
+ max_metric:
+ description:
+ - Set maximum metric
+ - Maximum metric in self-originated router-LSAs
+ type: dict
+ suboptions:
+ disable:
+ description: disable maximum metric in self-originated router-LSAs
+ type: bool
+ external_lsa:
+ description:
+ - Override external-lsa metric with max-metric value
+ - Overriding metric in external-LSAs
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ inter_area_lsas:
+ description:
+ - Override inter-area-lsas metric with max-metric value
+ - Overriding metric in inter-area-LSAs
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ on_startup:
+ description: Set maximum metric temporarily after reboot
+ type: dict
+ suboptions:
+ time:
+ description:
+ - Time, in seconds, router-LSAs are originated with max-metric
+ - Note, please refer vendor documentation for respective valid range
+ type: int
+ wait_for_bgp:
+ description: Let BGP decide when to originate router-LSA with normal metric
+ type: bool
+ stub_prefix_lsa:
+ description: Set maximum metric for stub links in prefix LSAs
+ type: bool
+ maximum_paths:
+ description:
+ - Forward packets over multiple paths
+ - Number of paths
+ type: int
+ passive_interface:
+ description: Suppress routing updates on an interface
+ type: str
+ prefix_suppression:
+ description: Prefix suppression
+ type: dict
+ suboptions:
+ enable:
+ description: Enable prefix suppression
+ type: bool
+ disable:
+ description: Disable prefix suppression
+ type: bool
+ queue_depth:
+ description: Hello/Router process queue depth
+ type: dict
+ suboptions:
+ hello:
+ description: OSPF Hello process queue depth
+ type: dict
+ suboptions:
+ max_packets:
+ description: maximum number of packets in the queue
+ type: int
+ unlimited:
+ description: Unlimited queue depth
+ type: bool
+ update:
+ description: OSPF Router process queue depth
+ type: dict
+ suboptions:
+ max_packets:
+ description: maximum number of packets in the queue
+ type: int
+ unlimited:
+ description: Unlimited queue depth
+ type: bool
+ router_id:
+ description:
+ - Router-id address for this OSPF process
+ - OSPF router-id in IP address format (A.B.C.D)
+ type: str
+ shutdown:
+ description: Shutdown the router process
+ type: dict
+ suboptions:
+ enable:
+ description: Shutdown the router process
+ type: bool
+ disable:
+ description: Disable Shutdown
+ type: bool
+ summary_prefix:
+ description: Configure IP address summaries
+ type: dict
+ suboptions:
+ address:
+ description:
+ - IP summary address (A.B.C.D)
+ - IP prefix <network>/<length> (A.B.C.D/nn)
+ type: str
+ mask:
+ description: IP Summary mask
+ type: str
+ not_advertise:
+ description: Do not advertise or translate
+ type: bool
+ nssa_only:
+ description: Limit summary to NSSA areas
+ type: bool
+ tag:
+ description: Set tag
+ type: int
+ timers:
+ description: Adjust routing timers
+ type: dict
+ suboptions:
+ lsa:
+ description:
+ - OSPF LSA timers, arrival timer
+ - The minimum interval in milliseconds between accepting the same LSA
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ manet:
+ description: OSPF MANET timers
+ type: dict
+ suboptions:
+ cache:
+ description: Specify MANET cache sizes
+ type: dict
+ suboptions:
+ acknowledgement:
+ description: Specify MANET acknowledgement cache size
+ type: int
+ redundancy:
+ description: Specify MANET LSA cache size
+ type: int
+ hello:
+ description:
+ - Unicast Hellos rather than multicast
+ - Unicast Hello requests and responses rather than multicast
+ type: bool
+ peering:
+ description: MANET OSPF Smart Peering
+ type: dict
+ suboptions:
+ set:
+ description: Enable selective peering
+ type: bool
+ per_interface:
+ description: Select peers per interface rather than per node
+ type: bool
+ redundancy:
+ description:
+ - Redundant paths
+ - Number of redundant OSPF paths
+ type: int
+ willingness:
+ description: Specify and Relay willingness value
+ type: int
+ pacing:
+ description: OSPF pacing timers
+ type: dict
+ suboptions:
+ flood:
+ description:
+ - OSPF flood pacing timer
+ - The minimum interval in msec to pace limit flooding on interface
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ lsa_group:
+ description:
+ - OSPF LSA group pacing timer
+ - Interval in sec between group of LSA being refreshed or maxaged
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ retransmission:
+ description:
+ - OSPF retransmission pacing timer
+ - The minimum interval in msec between neighbor retransmissions
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ throttle:
+ description: OSPF throttle timers
+ type: dict
+ suboptions:
+ lsa:
+ description: OSPF LSA throttle timers
+ type: dict
+ suboptions:
+ first_delay:
+ description:
+ - Delay to generate first occurrence of LSA in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ min_delay:
+ description:
+ - Minimum delay between originating the same LSA in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ max_delay:
+ description:
+ - Maximum delay between originating the same LSA in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ spf:
+ description: OSPF SPF throttle timers
+ - Delay between receiving a change to SPF calculation in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: dict
+ suboptions:
+ receive_delay:
+ description:
+ - Delay between receiving a change to SPF calculation in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ between_delay:
+ description:
+ - Delay between first and second SPF calculation in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ max_delay:
+ description:
+ - Maximum wait time in milliseconds for SPF calculations
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ adjacency:
+ description: Control adjacency formation
+ type: dict
+ suboptions:
+ min_adjacency:
+ description:
+ - Initial number of adjacencies allowed to be forming in an area
+ - Please refer vendor documentation for valid values
+ type: int
+ max_adjacency:
+ description:
+ - Maximum number of adjacencies allowed to be forming
+ - Please refer vendor documentation for valid values
+ type: int
+ none:
+ description: No initial
+ type: bool
+ areas:
+ description: OSPF area parameters
+ type: list
+ elements: dict
+ suboptions:
+ area_id:
+ description:
+ - OSPF area ID as a decimal value. Please refer vendor documentation
+ of Valid values.
+ - OSPF area ID in IP address format(e.g. A.B.C.D)
+ type: str
+ authentication:
+ description: Authentication parameters
+ type: dict
+ suboptions:
+ key_chain:
+ description: Use a key-chain for cryptographic authentication keys
+ type: str
+ ipsec:
+ description: Use IPsec authentication
+ type: dict
+ suboptions:
+ spi:
+ description: Set the SPI (Security Parameters Index)
+ type: int
+ md5:
+ description: Use MD5 authentication
+ type: int
+ sha1:
+ description: Use SHA-1 authentication
+ type: int
+ hex_string:
+ description: SHA-1 key (40 chars)
+ type: str
+ default_cost:
+ description:
+ - Set the summary default-cost of a NSSA/stub area
+ - Stub's advertised external route metric
+ - Note, please refer vendor documentation for respective valid values
+ type: int
+ nssa:
+ description: Specify a NSSA area
+ type: dict
+ suboptions:
+ set:
+ description: Enable a NSSA area
+ type: bool
+ default_information_originate:
+ description: Originate Type 7 default into NSSA area
+ type: dict
+ suboptions:
+ metric:
+ description: OSPF default metric
+ type: int
+ metric_type:
+ description:
+ - OSPF metric type for default routes
+ - OSPF Link State type
+ type: int
+ choices: [1, 2]
+ nssa_only:
+ description: Limit default advertisement to this NSSA area
+ type: bool
+ no_redistribution:
+ description: No redistribution into this NSSA area
+ type: bool
+ no_summary:
+ description: Do not send summary LSA into NSSA
+ type: bool
+ translate:
+ description:
+ - Translate LSA
+ - Always translate LSAs on this ABR
+ - Suppress forwarding address in translated LSAs
+ type: str
+ choices: ['always', 'suppress-fa']
+ stub:
+ description:
+ - Specify a stub area
+ - Backbone can not be configured as stub area
+ type: dict
+ suboptions:
+ set:
+ description: Enable a stub area
+ type: bool
+ no_summary:
+ description: Do not send summary LSA into stub area
+ type: bool
+ authentication:
+ description:
+ - Authentication parameter mode
+ - Deployment mode of operation
+ type: bool
+ auto_cost:
+ description: Calculate OSPF interface cost according to bandwidth
+ type: dict
+ suboptions:
+ set:
+ description: Enable OSPF auto-cost
+ type: bool
+ reference_bandwidth:
+ description:
+ - Use reference bandwidth method to assign OSPF cost
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ bfd:
+ description:
+ - BFD configuration commands
+ - Enable BFD on all interfaces
+ type: bool
+ compatible:
+ description: OSPFv3 router compatibility list
+ type: dict
+ suboptions:
+ rfc1583:
+ description: compatible with RFC 1583
+ type: bool
+ rfc1587:
+ description: compatible with RFC 1587
+ type: bool
+ rfc5243:
+ description: supports DBD exchange optimization
+ type: bool
+ event_log:
+ description: Event Logging
+ type: dict
+ suboptions:
+ enable:
+ description: Enable event Logging
+ type: bool
+ one_shot:
+ description: Disable Logging When Log Buffer Becomes Full
+ type: bool
+ pause:
+ description: Pause Event Logging
+ type: bool
+ size:
+ description:
+ - Maximum Number of Events Stored in the Event Log
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ graceful_restart:
+ description: Graceful-restart options for helper support
+ type: dict
+ suboptions:
+ disable:
+ description: disable helper support
+ type: bool
+ strict_lsa_checking:
+ description: enable helper strict LSA checking
+ type: bool
+ help:
+ description: Description of the interactive help system
+ type: bool
+ interface_id:
+ description:
+ - Source of the interface ID
+ - SNMP MIB ifIndex
+ type: bool
+ limit:
+ description: Limit a specific OSPF feature and LS update, DBD, and LS request retransmissions
+ type: dict
+ suboptions:
+ dc:
+ description: Demand circuit retransmissions
+ type: dict
+ suboptions:
+ number:
+ description: The maximum number of retransmissions
+ type: int
+ disable:
+ description: Disble the feature
+ type: bool
+ non_dc:
+ description: Non-demand-circuit retransmissions
+ type: dict
+ suboptions:
+ number:
+ description: The maximum number of retransmissions
+ type: int
+ disable:
+ description: Disble the feature
+ type: bool
+ local_rib_criteria:
+ description: Enable or disable usage of local RIB as route criteria
+ type: dict
+ suboptions:
+ enable:
+ description: Enable usage of local RIB as route criteria
+ type: bool
+ forwarding_address:
+ description: Local RIB used to validate external/NSSA forwarding addresses
+ type: bool
+ inter_area_summary:
+ description: Local RIB used as criteria for inter-area summaries
+ type: bool
+ nssa_translation:
+ description: Local RIB used as criteria for NSSA translation
+ type: bool
+ log_adjacency_changes:
+ description: Log changes in adjacency state
+ type: dict
+ suboptions:
+ set:
+ description: Log changes in adjacency state
+ type: bool
+ detail:
+ description: Log all state changes
+ type: bool
+ manet:
+ description: Specify MANET OSPF parameters
+ type: dict
+ suboptions:
+ cache:
+ description: Specify MANET cache sizes
+ type: dict
+ suboptions:
+ acknowledgement:
+ description: Specify MANET acknowledgement cache size
+ type: int
+ redundancy:
+ description: Specify MANET LSA cache size
+ type: int
+ hello:
+ description:
+ - Unicast Hellos rather than multicast
+ - Unicast Hello requests and responses rather than multicast
+ type: bool
+ peering:
+ description: MANET OSPF Smart Peering
+ type: dict
+ suboptions:
+ set:
+ description: Enable selective peering
+ type: bool
+ per_interface:
+ description: Select peers per interface rather than per node
+ type: bool
+ redundancy:
+ description:
+ - Redundant paths
+ - Number of redundant OSPF paths
+ type: int
+ willingness:
+ description: Specify and Relay willingness value
+ type: int
+ max_lsa:
+ description: Maximum number of non self-generated LSAs to accept
+ type: dict
+ suboptions:
+ number:
+ description:
+ - Maximum number of non self-generated LSAs to accept
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ threshold_value:
+ description:
+ - Threshold value (%) at which to generate a warning msg
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ ignore_count:
+ description:
+ - Maximum number of times adjacencies can be suppressed
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ ignore_time:
+ description:
+ - Number of minutes during which all adjacencies are suppressed
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ reset_time:
+ description:
+ - Number of minutes after which ignore-count is reset to zero
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ warning_only:
+ description: Only give a warning message when limit is exceeded
+ type: bool
+ max_metric:
+ description: Set maximum metric
+ type: dict
+ suboptions:
+ router_lsa:
+ description: Maximum metric in self-originated router-LSAs
+ type: bool
+ required: true
+ external_lsa:
+ description:
+ - Override external-lsa metric with max-metric value
+ - Overriding metric in external-LSAs
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ include_stub:
+ description: Set maximum metric for stub links in router-LSAs
+ type: bool
+ on_startup:
+ description: Set maximum metric temporarily after reboot
+ type: dict
+ suboptions:
+ time:
+ description:
+ - Time, in seconds, router-LSAs are originated with max-metric
+ - Note, please refer vendor documentation for respective valid range
+ type: int
+ wait_for_bgp:
+ description: Let BGP decide when to originate router-LSA with normal metric
+ type: bool
+ summary_lsa:
+ description:
+ - Override summary-lsa metric with max-metric value
+ - Note, please refer vendor documentation for respective valid range
+ type: int
+ passive_interface:
+ description: Suppress routing updates on an interface
+ type: str
+ prefix_suppression:
+ description: Enable prefix suppression
+ type: bool
+ queue_depth:
+ description: Hello/Router process queue depth
+ type: dict
+ suboptions:
+ hello:
+ description: OSPF Hello process queue depth
+ type: dict
+ suboptions:
+ max_packets:
+ description: maximum number of packets in the queue
+ type: int
+ unlimited:
+ description: Unlimited queue depth
+ type: bool
+ router_id:
+ description:
+ - Router-id address for this OSPF process
+ - OSPF router-id in IP address format (A.B.C.D)
+ type: str
+ shutdown:
+ description: Shutdown the router process
+ type: bool
+ timers:
+ description: Adjust routing timers
+ type: dict
+ suboptions:
+ lsa:
+ description:
+ - OSPF LSA timers, arrival timer
+ - The minimum interval in milliseconds between accepting the same LSA
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ manet:
+ description: OSPF MANET timers
+ type: dict
+ suboptions:
+ cache:
+ description: Specify MANET cache sizes
+ type: dict
+ suboptions:
+ acknowledgement:
+ description: Specify MANET acknowledgement cache size
+ type: int
+ redundancy:
+ description: Specify MANET LSA cache size
+ type: int
+ hello:
+ description:
+ - Unicast Hellos rather than multicast
+ - Unicast Hello requests and responses rather than multicast
+ type: bool
+ peering:
+ description: MANET OSPF Smart Peering
+ type: dict
+ suboptions:
+ set:
+ description: Enable selective peering
+ type: bool
+ per_interface:
+ description: Select peers per interface rather than per node
+ type: bool
+ redundancy:
+ description:
+ - Redundant paths
+ - Number of redundant OSPF paths
+ type: int
+ willingness:
+ description: Specify and Relay willingness value
+ type: int
+ pacing:
+ description: OSPF pacing timers
+ type: dict
+ suboptions:
+ flood:
+ description:
+ - OSPF flood pacing timer
+ - The minimum interval in msec to pace limit flooding on interface
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ lsa_group:
+ description:
+ - OSPF LSA group pacing timer
+ - Interval in sec between group of LSA being refreshed or maxaged
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ retransmission:
+ description:
+ - OSPF retransmission pacing timer
+ - The minimum interval in msec between neighbor retransmissions
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ throttle:
+ description: OSPF throttle timers
+ type: dict
+ suboptions:
+ lsa:
+ description: OSPF LSA throttle timers
+ type: dict
+ suboptions:
+ first_delay:
+ description:
+ - Delay to generate first occurrence of LSA in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ min_delay:
+ description:
+ - Minimum delay between originating the same LSA in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ max_delay:
+ description:
+ - Maximum delay between originating the same LSA in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ spf:
+ description: OSPF SPF throttle timers
+ - Delay between receiving a change to SPF calculation in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: dict
+ suboptions:
+ receive_delay:
+ description:
+ - Delay between receiving a change to SPF calculation in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ between_delay:
+ description:
+ - Delay between first and second SPF calculation in milliseconds
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ max_delay:
+ description:
+ - Maximum wait time in milliseconds for SPF calculations
+ - Note, refer vendor documentation for respective valid values
+ type: int
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS device by
+ executing the command B(sh running-config | section ^router ospfv3).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - parsed
+ - rendered
+ default: merged
+
+"""
+EXAMPLES = """
+
+# Using deleted
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospfv3
+# router ospfv3 1
+# max-metric router-lsa on-startup 110
+# area 10 nssa default-information-originate metric 10
+# !
+# address-family ipv4 unicast vrf blue
+# adjacency stagger 50 50
+# area 25 nssa default-information-originate metric 25 nssa-only
+# exit-address-family
+# router ospfv3 200
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# !
+# address-family ipv4 unicast
+# adjacency stagger 200 200
+# exit-address-family
+
+- name: Delete provided OSPF V3 processes
+ cisco.ios.ios_ospfv3:
+ config:
+ processes:
+ - process_id: 1
+ state: deleted
+
+# Commands Fired:
+# ---------------
+#
+# "commands": [
+# "no router ospfv3 1"
+# ]
+
+# After state:
+# -------------
+# router-ios#sh running-config | section ^router ospfv3
+# router ospfv3 200
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# !
+# address-family ipv4 unicast
+# adjacency stagger 200 200
+# exit-address-family
+
+# Using deleted without any config passed (NOTE: This will delete all OSPFV3 configuration from device)
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospfv3
+# router ospfv3 1
+# max-metric router-lsa on-startup 110
+# area 10 nssa default-information-originate metric 10
+# !
+# address-family ipv4 unicast vrf blue
+# adjacency stagger 50 50
+# area 25 nssa default-information-originate metric 25 nssa-only
+# exit-address-family
+# router ospfv3 200
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# !
+# address-family ipv4 unicast
+# adjacency stagger 200 200
+# exit-address-family
+
+- name: Delete all OSPF processes
+ cisco.ios.ios_ospfv3:
+ state: deleted
+
+# Commands Fired:
+# ---------------
+#
+# "commands": [
+# "no router ospfv3 200",
+# "no router ospfv3 1"
+# ]
+
+# After state:
+# -------------
+# router-ios#sh running-config | section ^router ospfv3
+# router-ios#
+
+# Using merged
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospfv3
+# router-ios#
+
+- name: Merge provided OSPFV3 configuration
+ cisco.ios.ios_ospfv3:
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ address_family:
+ - afi: ipv4
+ unicast: true
+ vrf: blue
+ adjacency:
+ min_adjacency: 50
+ max_adjacency: 50
+ areas:
+ - area_id: 25
+ nssa:
+ default_information_originate:
+ metric: 25
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ timers:
+ throttle:
+ lsa:
+ first_delay: 12
+ min_delay: 14
+ max_delay: 16
+ - process_id: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 200
+ max_adjacency: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ state: merged
+
+# Commands Fired:
+# ---------------
+#
+# "commands": [
+# "router ospfv3 1",
+# "max-metric router-lsa on-startup 110",
+# "area 10 nssa default-information-originate metric 10",
+# "address-family ipv4 unicast vrf blue",
+# "adjacency stagger 50 50",
+# "area 25 nssa default-information-originate metric 25 nssa-only",
+# "exit-address-family",
+# "router ospfv3 200",
+# "auto-cost reference-bandwidth 4",
+# "max-metric router-lsa on-startup 100",
+# "address-family ipv4 unicast",
+# "adjacency stagger 200 200",
+# "exit-address-family"
+# ]
+
+# After state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospfv3
+# router ospfv3 1
+# max-metric router-lsa on-startup 110
+# area 10 nssa default-information-originate metric 10
+# !
+# address-family ipv4 unicast vrf blue
+# adjacency stagger 50 50
+# area 25 nssa default-information-originate metric 25 nssa-only
+# exit-address-family
+# router ospfv3 200
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# !
+# address-family ipv4 unicast
+# adjacency stagger 200 200
+# exit-address-family
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# router ospfv3 1
+# max-metric router-lsa on-startup 110
+# area 10 nssa default-information-originate metric 10
+# !
+# address-family ipv4 unicast vrf blue
+# adjacency stagger 50 50
+# area 25 nssa default-information-originate metric 25 nssa-only
+# exit-address-family
+# router ospfv3 200
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# !
+# address-family ipv4 unicast
+# adjacency stagger 200 200
+# exit-address-family
+
+- name: Override provided OSPFV3 configuration
+ cisco.ios.ios_ospfv3:
+ config:
+ processes:
+ - process_id: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 50
+ max_adjacency: 50
+ areas:
+ - area_id: 200
+ nssa:
+ default_information_originate:
+ metric: 200
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ state: overridden
+
+# Commands Fired:
+# ---------------
+#
+# "commands": [
+# "no router ospfv3 1",
+# "router ospfv3 200",
+# "no auto-cost reference-bandwidth 4",
+# "max-metric router-lsa on-startup 200",
+# "area 10 nssa default-information-originate metric 10",
+# "address-family ipv4 unicast",
+# "adjacency stagger 50 50",
+# "area 200 nssa default-information-originate metric 200 nssa-only",
+# "exit-address-family"
+# ]
+
+# After state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospfv3
+# router ospfv3 200
+# max-metric router-lsa on-startup 200
+# area 10 nssa default-information-originate metric 10
+# !
+# address-family ipv4 unicast
+# adjacency stagger 50 50
+# area 200 nssa default-information-originate metric 200 nssa-only
+# exit-address-family
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospfv3
+# router ospfv3 1
+# max-metric router-lsa on-startup 110
+# area 10 nssa default-information-originate metric 10
+# !
+# address-family ipv4 unicast vrf blue
+# adjacency stagger 50 50
+# area 25 nssa default-information-originate metric 25 nssa-only
+# exit-address-family
+# router ospfv3 200
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# !
+# address-family ipv4 unicast
+# adjacency stagger 200 200
+# exit-address-family
+
+- name: Replaced provided OSPFV3 configuration
+ cisco.ios.ios_ospfv3:
+ config:
+ processes:
+ - process_id: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 50
+ max_adjacency: 50
+ areas:
+ - area_id: 200
+ nssa:
+ default_information_originate:
+ metric: 200
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ state: replaced
+
+# Commands Fired:
+# ---------------
+# "commands": [
+# "router ospfv3 200",
+# "no auto-cost reference-bandwidth 4",
+# "max-metric router-lsa on-startup 200",
+# "area 10 nssa default-information-originate metric 10",
+# "address-family ipv4 unicast",
+# "adjacency stagger 50 50",
+# "area 200 nssa default-information-originate metric 200 nssa-only",
+# "exit-address-family"
+# ]
+
+# After state:
+# -------------
+# router-ios#sh running-config | section ^router ospfv3
+# router ospfv3 1
+# max-metric router-lsa on-startup 110
+# area 10 nssa default-information-originate metric 10
+# !
+# address-family ipv4 unicast vrf blue
+# adjacency stagger 50 50
+# area 25 nssa default-information-originate metric 25 nssa-only
+# exit-address-family
+# router ospfv3 200
+# max-metric router-lsa on-startup 200
+# area 10 nssa default-information-originate metric 10
+# !
+# address-family ipv4 unicast
+# adjacency stagger 50 50
+# area 200 nssa default-information-originate metric 200 nssa-only
+# exit-address-family
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# router-ios#sh running-config | section ^router ospfv3
+# router ospfv3 1
+# max-metric router-lsa on-startup 110
+# area 10 nssa default-information-originate metric 10
+# !
+# address-family ipv4 unicast vrf blue
+# adjacency stagger 50 50
+# area 25 nssa default-information-originate metric 25 nssa-only
+# exit-address-family
+# router ospfv3 200
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# !
+# address-family ipv4 unicast
+# adjacency stagger 200 200
+# exit-address-family
+
+- name: Gather OSPFV3 provided configurations
+ cisco.ios.ios_ospfv3:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": {
+# "processes": [
+# {
+# "address_family": [
+# {
+# "adjacency": {
+# "max_adjacency": 50,
+# "min_adjacency": 50
+# },
+# "afi": "ipv4",
+# "areas": [
+# {
+# "area_id": "25",
+# "nssa": {
+# "default_information_originate": {
+# "metric": 25,
+# "nssa_only": true
+# }
+# }
+# }
+# ],
+# "unicast": true,
+# "vrf": "blue"
+# }
+# ],
+# "areas": [
+# {
+# "area_id": "10",
+# "nssa": {
+# "default_information_originate": {
+# "metric": 10
+# }
+# }
+# }
+# ],
+# "max_metric": {
+# "on_startup": {
+# "time": 110
+# },
+# "router_lsa": true
+# },
+# "process_id": 1
+# },
+# {
+# "address_family": [
+# {
+# "adjacency": {
+# "max_adjacency": 200,
+# "min_adjacency": 200
+# },
+# "afi": "ipv4",
+# "unicast": true
+# }
+# ],
+# "auto_cost": {
+# "reference_bandwidth": 4
+# },
+# "max_metric": {
+# "on_startup": {
+# "time": 100
+# },
+# "router_lsa": true
+# },
+# "process_id": 200
+# }
+# ]
+# }
+
+# After state:
+# ------------
+#
+# router-ios#sh running-config | section ^router ospfv3
+# router ospfv3 1
+# max-metric router-lsa on-startup 110
+# area 10 nssa default-information-originate metric 10
+# !
+# address-family ipv4 unicast vrf blue
+# adjacency stagger 50 50
+# area 25 nssa default-information-originate metric 25 nssa-only
+# exit-address-family
+# router ospfv3 200
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# !
+# address-family ipv4 unicast
+# adjacency stagger 200 200
+# exit-address-family
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_ospfv3:
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ address_family:
+ - afi: ipv4
+ unicast: true
+ vrf: blue
+ adjacency:
+ min_adjacency: 50
+ max_adjacency: 50
+ areas:
+ - area_id: 25
+ nssa:
+ default_information_originate:
+ metric: 25
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ timers:
+ throttle:
+ lsa:
+ first_delay: 12
+ min_delay: 14
+ max_delay: 16
+ - process_id: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 200
+ max_adjacency: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "router ospfv3 1",
+# "max-metric router-lsa on-startup 110",
+# "area 10 nssa default-information-originate metric 10",
+# "address-family ipv4 unicast vrf blue",
+# "adjacency stagger 50 50",
+# "area 25 nssa default-information-originate metric 25 nssa-only",
+# "exit-address-family",
+# "router ospfv3 200",
+# "auto-cost reference-bandwidth 4",
+# "max-metric router-lsa on-startup 100",
+# "address-family ipv4 unicast",
+# "adjacency stagger 200 200",
+# "exit-address-family"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# router ospfv3 1
+# max-metric router-lsa on-startup 110
+# area 10 nssa default-information-originate metric 10
+# !
+# address-family ipv4 unicast vrf blue
+# adjacency stagger 50 50
+# area 25 nssa default-information-originate metric 25 nssa-only
+# exit-address-family
+# router ospfv3 200
+# max-metric router-lsa on-startup 100
+# auto-cost reference-bandwidth 4
+# !
+# address-family ipv4 unicast
+# adjacency stagger 200 200
+# exit-address-family
+
+- name: Parse the provided configuration with the exisiting running configuration
+ cisco.ios.ios_ospfv3:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": {
+# "processes": [
+# {
+# "address_family": [
+# {
+# "adjacency": {
+# "max_adjacency": 50,
+# "min_adjacency": 50
+# },
+# "afi": "ipv4",
+# "areas": [
+# {
+# "area_id": "25",
+# "nssa": {
+# "default_information_originate": {
+# "metric": 25,
+# "nssa_only": true
+# }
+# }
+# }
+# ],
+# "unicast": true,
+# "vrf": "blue"
+# }
+# ],
+# "areas": [
+# {
+# "area_id": "10",
+# "nssa": {
+# "default_information_originate": {
+# "metric": 10
+# }
+# }
+# }
+# ],
+# "max_metric": {
+# "on_startup": {
+# "time": 110
+# },
+# "router_lsa": true
+# },
+# "process_id": 1
+# }
+# ]
+# }
+
+"""
+
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+ type: dict
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+ type: dict
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['router ospfv3 1', 'address-family ipv4 unicast vrf blue', 'adjacency stagger 50 50']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.ospfv3.ospfv3 import (
+ Ospfv3Args,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.ospfv3.ospfv3 import (
+ Ospfv3,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Ospfv3Args.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Ospfv3(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ping.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ping.py
new file mode 100644
index 00000000..b67edc57
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_ping.py
@@ -0,0 +1,242 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_ping
+short_description: Tests reachability using ping from Cisco IOS network devices
+description:
+- Tests reachability using ping from switch to a remote destination.
+- For a general purpose network module, see the M(net_ping) module.
+- For Windows targets, use the M(win_ping) module instead.
+- For targets running Python, use the M(ping) module instead.
+version_added: 1.0.0
+author:
+- Jacob McGill (@jmcgill298)
+extends_documentation_fragment:
+- cisco.ios.ios
+options:
+ count:
+ description:
+ - Number of packets to send.
+ type: int
+ dest:
+ description:
+ - The IP Address or hostname (resolvable by switch) of the remote node.
+ required: true
+ type: str
+ df_bit:
+ description:
+ - Set the DF bit.
+ default: false
+ type: bool
+ size:
+ description:
+ - Size of packets to send.
+ type: int
+ source:
+ description:
+ - The source IP Address.
+ type: str
+ state:
+ description:
+ - Determines if the expected result is success or fail.
+ choices:
+ - absent
+ - present
+ default: present
+ type: str
+ vrf:
+ description:
+ - The VRF to use for forwarding.
+ type: str
+notes:
+- For a general purpose network module, see the M(net_ping) module.
+- For Windows targets, use the M(win_ping) module instead.
+- For targets running Python, use the M(ping) module instead.
+"""
+EXAMPLES = """
+- name: Test reachability to 10.10.10.10 using default vrf
+ cisco.ios.ios_ping:
+ dest: 10.10.10.10
+
+- name: Test reachability to 10.20.20.20 using prod vrf
+ cisco.ios.ios_ping:
+ dest: 10.20.20.20
+ vrf: prod
+
+- name: Test unreachability to 10.30.30.30 using default vrf
+ cisco.ios.ios_ping:
+ dest: 10.30.30.30
+ state: absent
+
+- name: Test reachability to 10.40.40.40 using prod vrf and setting count and source
+ cisco.ios.ios_ping:
+ dest: 10.40.40.40
+ source: loopback0
+ vrf: prod
+ count: 20
+
+- name: Test reachability to 10.50.50.50 using df-bit and size
+ cisco.ios.ios_ping:
+ dest: 10.50.50.50
+ df_bit: true
+ size: 1400
+"""
+RETURN = """
+commands:
+ description: Show the command sent.
+ returned: always
+ type: list
+ sample: ["ping vrf prod 10.40.40.40 count 20 source loopback0"]
+packet_loss:
+ description: Percentage of packets lost.
+ returned: always
+ type: str
+ sample: "0%"
+packets_rx:
+ description: Packets successfully received.
+ returned: always
+ type: int
+ sample: 20
+packets_tx:
+ description: Packets successfully transmitted.
+ returned: always
+ type: int
+ sample: 20
+rtt:
+ description: Show RTT stats.
+ returned: always
+ type: dict
+ sample: {"avg": 2, "max": 8, "min": 1}
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ run_commands,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+import re
+
+
+def main():
+ """ main entry point for module execution
+ """
+ argument_spec = dict(
+ count=dict(type="int"),
+ dest=dict(type="str", required=True),
+ df_bit=dict(type="bool", default=False),
+ size=dict(type="int"),
+ source=dict(type="str"),
+ state=dict(
+ type="str", choices=["absent", "present"], default="present"
+ ),
+ vrf=dict(type="str"),
+ )
+ argument_spec.update(ios_argument_spec)
+ module = AnsibleModule(argument_spec=argument_spec)
+ count = module.params["count"]
+ dest = module.params["dest"]
+ df_bit = module.params["df_bit"]
+ size = module.params["size"]
+ source = module.params["source"]
+ vrf = module.params["vrf"]
+ warnings = list()
+ results = {}
+ if warnings:
+ results["warnings"] = warnings
+ results["commands"] = [build_ping(dest, count, source, vrf, size, df_bit)]
+ ping_results = run_commands(module, commands=results["commands"])
+ ping_results_list = ping_results[0].split("\n")
+ stats = ""
+ for line in ping_results_list:
+ if line.startswith("Success"):
+ stats = line
+ success, rx, tx, rtt = parse_ping(stats)
+ loss = abs(100 - int(success))
+ results["packet_loss"] = str(loss) + "%"
+ results["packets_rx"] = int(rx)
+ results["packets_tx"] = int(tx)
+ # Convert rtt values to int
+ for k, v in rtt.items():
+ if rtt[k] is not None:
+ rtt[k] = int(v)
+ results["rtt"] = rtt
+ validate_results(module, loss, results)
+ module.exit_json(**results)
+
+
+def build_ping(
+ dest, count=None, source=None, vrf=None, size=None, df_bit=False
+):
+ """
+ Function to build the command to send to the terminal for the switch
+ to execute. All args come from the module's unique params.
+ """
+ if vrf is not None:
+ cmd = "ping vrf {0} {1}".format(vrf, dest)
+ else:
+ cmd = "ping {0}".format(dest)
+ if count is not None:
+ cmd += " repeat {0}".format(str(count))
+ if size is not None:
+ cmd += " size {0}".format(size)
+ if df_bit:
+ cmd += " df-bit"
+ if source is not None:
+ cmd += " source {0}".format(source)
+ return cmd
+
+
+def parse_ping(ping_stats):
+ """
+ Function used to parse the statistical information from the ping response.
+ Example: "Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/8 ms"
+ Returns the percent of packet loss, received packets, transmitted packets, and RTT dict.
+ """
+ rate_re = re.compile(
+ "^\\w+\\s+\\w+\\s+\\w+\\s+(?P<pct>\\d+)\\s+\\w+\\s+\\((?P<rx>\\d+)/(?P<tx>\\d+)\\)"
+ )
+ rtt_re = re.compile(
+ ".*,\\s+\\S+\\s+\\S+\\s+=\\s+(?P<min>\\d+)/(?P<avg>\\d+)/(?P<max>\\d+)\\s+\\w+\\s*$|.*\\s*$"
+ )
+ rate = rate_re.match(ping_stats)
+ rtt = rtt_re.match(ping_stats)
+ return (
+ rate.group("pct"),
+ rate.group("rx"),
+ rate.group("tx"),
+ rtt.groupdict(),
+ )
+
+
+def validate_results(module, loss, results):
+ """
+ This function is used to validate whether the ping results were unexpected per "state" param.
+ """
+ state = module.params["state"]
+ if state == "present" and loss == 100:
+ module.fail_json(msg="Ping failed unexpectedly", **results)
+ elif state == "absent" and loss < 100:
+ module.fail_json(msg="Ping succeeded unexpectedly", **results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_static_route.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_static_route.py
new file mode 100644
index 00000000..a3b5a957
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_static_route.py
@@ -0,0 +1,372 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_static_route
+author: Ricardo Carrillo Cruz (@rcarrillocruz)
+short_description: (deprecated, removed after 2022-06-01) Manage static IP routes
+ on Cisco IOS network devices
+description:
+- This module provides declarative management of static IP routes on Cisco IOS network
+ devices.
+version_added: 1.0.0
+deprecated:
+ alternative: ios_static_routes
+ why: Newer and updated modules released with more functionality.
+ removed_at_date: '2022-06-01'
+notes:
+- Tested against IOS 15.6
+options:
+ prefix:
+ description:
+ - Network prefix of the static route.
+ type: str
+ mask:
+ description:
+ - Network prefix mask of the static route.
+ type: str
+ next_hop:
+ description:
+ - Next hop IP of the static route.
+ type: str
+ vrf:
+ description:
+ - VRF of the static route.
+ type: str
+ interface:
+ description:
+ - Interface of the static route.
+ type: str
+ name:
+ description:
+ - Name of the static route
+ type: str
+ aliases:
+ - description
+ admin_distance:
+ description:
+ - Admin distance of the static route.
+ type: str
+ tag:
+ description:
+ - Set tag of the static route.
+ type: str
+ track:
+ description:
+ - Tracked item to depend on for the static route.
+ type: str
+ aggregate:
+ description: List of static route definitions.
+ type: list
+ elements: dict
+ suboptions:
+ prefix:
+ description:
+ - Network prefix of the static route.
+ type: str
+ required: true
+ mask:
+ description:
+ - Network prefix mask of the static route.
+ type: str
+ next_hop:
+ description:
+ - Next hop IP of the static route.
+ type: str
+ vrf:
+ description:
+ - VRF of the static route.
+ type: str
+ interface:
+ description:
+ - Interface of the static route.
+ type: str
+ name:
+ description:
+ - Name of the static route
+ aliases:
+ - description
+ type: str
+ admin_distance:
+ description:
+ - Admin distance of the static route.
+ type: str
+ tag:
+ description:
+ - Set tag of the static route.
+ type: str
+ track:
+ description:
+ - Tracked item to depend on for the static route.
+ type: str
+ state:
+ description:
+ - State of the static route configuration.
+ choices:
+ - present
+ - absent
+ type: str
+ state:
+ description:
+ - State of the static route configuration.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+extends_documentation_fragment:
+- cisco.ios.ios
+"""
+EXAMPLES = """
+- name: configure static route
+ cisco.ios.ios_static_route:
+ prefix: 192.168.2.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.1
+
+- name: configure black hole in vrf blue depending on tracked item 10
+ cisco.ios.ios_static_route:
+ prefix: 192.168.2.0
+ mask: 255.255.255.0
+ vrf: blue
+ interface: null0
+ track: 10
+
+- name: configure ultimate route with name and tag
+ cisco.ios.ios_static_route:
+ prefix: 192.168.2.0
+ mask: 255.255.255.0
+ interface: GigabitEthernet1
+ name: hello world
+ tag: 100
+
+- name: remove configuration
+ cisco.ios.ios_static_route:
+ prefix: 192.168.2.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.1
+ state: absent
+
+- name: Add static route aggregates
+ cisco.ios.ios_static_route:
+ aggregate:
+ - {prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8}
+ - {prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8}
+
+- name: Remove static route aggregates
+ cisco.ios.ios_static_route:
+ aggregate:
+ - {prefix: 172.16.32.0, mask: 255.255.255.0, next_hop: 10.0.0.8}
+ - {prefix: 172.16.33.0, mask: 255.255.255.0, next_hop: 10.0.0.8}
+ state: absent
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - ip route 192.168.2.0 255.255.255.0 10.0.0.1
+"""
+from copy import deepcopy
+from re import findall
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+ validate_ip_address,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+
+
+def map_obj_to_commands(want, have):
+ commands = list()
+ for w in want:
+ state = w["state"]
+ del w["state"]
+ # Try to match an existing config with the desired config
+ for h in have:
+ # Try to match an existing config with the desired config
+ if not w.get("admin_distance") and h.get("admin_distance"):
+ del h["admin_distance"]
+ diff = list(set(w.items()) ^ set(h.items()))
+ if not diff:
+ break
+ # Try to match an existing config with the desired config
+ if (
+ len(diff) == 2
+ and diff[0][0] == diff[1][0] == "name"
+ and (not w["name"] or h["name"].startswith(w["name"]))
+ ):
+ break
+ # If no matches found, clear `h`
+ else:
+ h = None
+ command = "ip route"
+ prefix = w["prefix"]
+ mask = w["mask"]
+ vrf = w.get("vrf")
+ if vrf:
+ command = " ".join((command, "vrf", vrf, prefix, mask))
+ else:
+ command = " ".join((command, prefix, mask))
+ for key in [
+ "interface",
+ "next_hop",
+ "admin_distance",
+ "tag",
+ "name",
+ "track",
+ ]:
+ if w.get(key):
+ if key == "name" and len(w.get(key).split()) > 1:
+ command = " ".join((command, key, '"%s"' % w.get(key)))
+ elif key in ("name", "tag", "track"):
+ command = " ".join((command, key, w.get(key)))
+ else:
+ command = " ".join((command, w.get(key)))
+ if state == "absent" and h:
+ commands.append("no %s" % command)
+ elif state == "present" and not h:
+ commands.append(command)
+ return commands
+
+
+def map_config_to_obj(module):
+ obj = []
+ out = get_config(module, flags="| include ip route")
+ for line in out.splitlines():
+ # Split by whitespace but do not split quotes, needed for name parameter
+ splitted_line = findall('[^"\\s]\\S*|".+?"', line)
+ if splitted_line[2] == "vrf":
+ route = {"vrf": splitted_line[3]}
+ del splitted_line[:4] # Removes the words ip route vrf vrf_name
+ else:
+ route = {}
+ del splitted_line[:2] # Removes the words ip route
+ prefix = splitted_line[0]
+ mask = splitted_line[1]
+ route.update({"prefix": prefix, "mask": mask, "admin_distance": "1"})
+ next_word = None
+ for word in splitted_line[2:]:
+ if next_word:
+ route[next_word] = word.strip('"')
+ next_word = None
+ elif validate_ip_address(word):
+ route.update(next_hop=word)
+ elif word.isdigit():
+ route.update(admin_distance=word)
+ elif word in ("tag", "name", "track"):
+ next_word = word
+ else:
+ route.update(interface=word)
+ obj.append(route)
+ return obj
+
+
+def map_params_to_obj(module, required_together=None):
+ keys = [
+ "prefix",
+ "mask",
+ "state",
+ "next_hop",
+ "vrf",
+ "interface",
+ "name",
+ "admin_distance",
+ "track",
+ "tag",
+ ]
+ obj = []
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ route = item.copy()
+ for key in keys:
+ if route.get(key) is None:
+ route[key] = module.params.get(key)
+ route = dict((k, v) for k, v in route.items() if v is not None)
+ module._check_required_together(required_together, route)
+ obj.append(route)
+ else:
+ module._check_required_together(required_together, module.params)
+ route = dict()
+ for key in keys:
+ if module.params.get(key) is not None:
+ route[key] = module.params.get(key)
+ obj.append(route)
+ return obj
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ prefix=dict(type="str"),
+ mask=dict(type="str"),
+ next_hop=dict(type="str"),
+ vrf=dict(type="str"),
+ interface=dict(type="str"),
+ name=dict(type="str", aliases=["description"]),
+ admin_distance=dict(type="str"),
+ track=dict(type="str"),
+ tag=dict(type="str"),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["prefix"] = dict(required=True)
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec)
+ )
+ argument_spec.update(element_spec)
+ argument_spec.update(ios_argument_spec)
+ required_one_of = [["aggregate", "prefix"]]
+ required_together = [["prefix", "mask"]]
+ mutually_exclusive = [["aggregate", "prefix"]]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=required_one_of,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ warnings = list()
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+ want = map_params_to_obj(module, required_together=required_together)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands(want, have)
+ result["commands"] = commands
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_static_routes.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_static_routes.py
new file mode 100644
index 00000000..f8115095
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_static_routes.py
@@ -0,0 +1,692 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_static_routes
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_static_routes
+short_description: Static routes resource module
+description: This module configures and manages the static routes on IOS platforms.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSv Version 15.2 on VIRL.
+options:
+ config:
+ description: A dictionary of static route options
+ type: list
+ elements: dict
+ suboptions:
+ vrf:
+ description:
+ - IP VPN Routing/Forwarding instance name.
+ - NOTE, In case of IPV4/IPV6 VRF routing table should pre-exist before configuring.
+ - NOTE, if the vrf information is not provided then the routes shall be configured
+ under global vrf.
+ type: str
+ address_families:
+ elements: dict
+ description:
+ - Address family to use for the static routes
+ type: list
+ suboptions:
+ afi:
+ description:
+ - Top level address family indicator.
+ required: true
+ type: str
+ choices:
+ - ipv4
+ - ipv6
+ routes:
+ description: Configuring static route
+ type: list
+ elements: dict
+ suboptions:
+ dest:
+ description: Destination prefix with its subnet mask
+ type: str
+ required: true
+ topology:
+ description:
+ - Configure static route for a Topology Routing/Forwarding instance
+ - NOTE, VRF and Topology can be used together only with Multicast
+ and Topology should pre-exist before it can be used
+ type: str
+ next_hops:
+ description:
+ - next hop address or interface
+ type: list
+ elements: dict
+ suboptions:
+ forward_router_address:
+ description: Forwarding router's address
+ type: str
+ interface:
+ description: Interface for directly connected static routes
+ type: str
+ dhcp:
+ description: Default gateway obtained from DHCP
+ type: bool
+ distance_metric:
+ description: Distance metric for this route
+ type: int
+ global:
+ description: Next hop address is global
+ type: bool
+ name:
+ description: Specify name of the next hop
+ type: str
+ multicast:
+ description: multicast route
+ type: bool
+ permanent:
+ description: permanent route
+ type: bool
+ tag:
+ description:
+ - Set tag for this route
+ - Refer to vendor documentation for valid values.
+ type: int
+ track:
+ description:
+ - Install route depending on tracked item with tracked object
+ number.
+ - Tracking does not support multicast
+ - Refer to vendor documentation for valid values.
+ type: int
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS
+ device by executing the command B(show running-config | include ip route|ipv6 route).
+ - The state I(parsed) reads the configuration from C(running_config)
+ option and transforms it into Ansible structured data as per the
+ resource module's argspec and the value is then returned in the
+ I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# vios#show running-config | include ip route|ipv6 route
+
+- name: Merge provided configuration with device configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - vrf: blue
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.0/24
+ next_hops:
+ - forward_router_address: 192.0.2.1
+ name: merged_blue
+ tag: 50
+ track: 150
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 198.51.100.0/24
+ next_hops:
+ - forward_router_address: 198.51.101.1
+ name: merged_route_1
+ distance_metric: 110
+ tag: 40
+ multicast: true
+ - forward_router_address: 198.51.101.2
+ name: merged_route_2
+ distance_metric: 30
+ - forward_router_address: 198.51.101.3
+ name: merged_route_3
+ - afi: ipv6
+ routes:
+ - dest: 2001:DB8:0:3::/64
+ next_hops:
+ - forward_router_address: 2001:DB8:0:3::2
+ name: merged_v6
+ tag: 105
+ state: merged
+
+# Commands fired:
+# ---------------
+# ip route vrf blue 192.0.2.0 255.255.255.0 10.0.0.8 name merged_blue track 150 tag 50
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name merged_route_1 tag 40
+# ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name merged_route_2
+# ip route 198.51.100.0 255.255.255.0 198.51.101.3 name merged_route_3
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name merged_v6 tag 105
+
+# After state:
+# ------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route vrf blue 192.0.2.0 255.255.255.0 192.0.2.1 tag 50 name merged_blue track 150
+# ip route 198.51.100.0 255.255.255.0 198.51.101.3 name merged_route_3
+# ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name merged_route_2
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40 name merged_route_1 multicast
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name merged_v6
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+# ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+- name: Replace provided configuration with device configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 198.51.100.0/24
+ next_hops:
+ - forward_router_address: 198.51.101.1
+ name: replaced_route
+ distance_metric: 175
+ tag: 70
+ multicast: true
+ state: replaced
+
+# Commands fired:
+# ---------------
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 175 name replaced_route track 150 tag 70
+
+# After state:
+# ------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 175 name replaced_route track 150 tag 70
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name test_v6
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+# ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+- name: Override provided configuration with device configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - vrf: blue
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.0/24
+ next_hops:
+ - forward_router_address: 192.0.2.1
+ name: override_vrf
+ tag: 50
+ track: 150
+ state: overridden
+
+# Commands fired:
+# ---------------
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 198.51.101.8 name test_vrf track 150 tag 50
+# no ipv6 route FD5D:12C9:2201:1::/64 FD5D:12C9:2202::2 name test_v6 tag 105
+# ip route vrf blue 192.0.2.0 255.255.255.0 198.51.101.4 name override_vrf track 150 tag 50
+
+# After state:
+# ------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route vrf blue 192.0.2.0 255.255.255.0 192.0.2.1 tag 50 name override_vrf track 150
+
+# Using Deleted
+
+# Example 1:
+# ----------
+# To delete the exact static routes, with all the static routes explicitly mentioned in want
+
+# Before state:
+# -------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+# ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+- name: Delete provided configuration from the device configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - vrf: ansible_temp_vrf
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.0/24
+ next_hops:
+ - forward_router_address: 192.0.2.1
+ name: test_vrf
+ tag: 50
+ track: 150
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 198.51.100.0/24
+ next_hops:
+ - forward_router_address: 198.51.101.1
+ name: route_1
+ distance_metric: 110
+ tag: 40
+ multicast: true
+ - forward_router_address: 198.51.101.2
+ name: route_2
+ distance_metric: 30
+ - forward_router_address: 198.51.101.3
+ name: route_3
+ - afi: ipv6
+ routes:
+ - dest: 2001:DB8:0:3::/64
+ next_hops:
+ - forward_router_address: 2001:DB8:0:3::2
+ name: test_v6
+ tag: 105
+ state: deleted
+
+# Commands fired:
+# ---------------
+# no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 198.51.101.8 name test_vrf track 150 tag 50
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# no ipv6 route FD5D:12C9:2201:1::/64 FD5D:12C9:2202::2 name test_v6 tag 105
+
+# After state:
+# ------------
+#
+# vios#show running-config | include ip route|ipv6 route
+
+# Example 2:
+# ----------
+# To delete the destination specific static routes
+
+# Before state:
+# -------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+# ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+- name: Delete provided configuration from the device configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 198.51.100.0/24
+ state: deleted
+
+# Commands fired:
+# ---------------
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40 name route_1 multicast
+
+# After state:
+# ------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 tag 50 name test_vrf track 150
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name test_v6
+
+
+# Example 3:
+# ----------
+# To delete the vrf specific static routes
+
+# Before state:
+# -------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+# ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+- name: Delete provided configuration from the device configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - vrf: ansible_temp_vrf
+ state: deleted
+
+# Commands fired:
+# ---------------
+# no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+
+# After state:
+# ------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40 name route_1 multicast
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name test_v6
+
+# Using Deleted without any config passed
+#"(NOTE: This will delete all of configured resource module attributes from each configured interface)"
+
+# Before state:
+# -------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+# ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+- name: Delete ALL configured IOS static routes
+ cisco.ios.ios_static_routes:
+ state: deleted
+
+# Commands fired:
+# ---------------
+# no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 tag 50 name test_vrf track 150
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40 name route_1 multicast
+# no ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name test_v6
+
+# After state:
+# -------------
+#
+# vios#show running-config | include ip route|ipv6 route
+#
+
+# Using gathered
+
+# Before state:
+# -------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+# ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+- name: Gather listed static routes with provided configurations
+ cisco.ios.ios_static_routes:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "address_families": [
+# {
+# "afi": "ipv4",
+# "routes": [
+# {
+# "dest": "192.0.2.0/24",
+# "next_hops": [
+# {
+# "forward_router_address": "192.0.2.1",
+# "name": "test_vrf",
+# "tag": 50,
+# "track": 150
+# }
+# ]
+# }
+# ]
+# }
+# ],
+# "vrf": "ansible_temp_vrf"
+# },
+# {
+# "address_families": [
+# {
+# "afi": "ipv6",
+# "routes": [
+# {
+# "dest": "2001:DB8:0:3::/64",
+# "next_hops": [
+# {
+# "forward_router_address": "2001:DB8:0:3::2",
+# "name": "test_v6",
+# "tag": 105
+# }
+# ]
+# }
+# ]
+# },
+# {
+# "afi": "ipv4",
+# "routes": [
+# {
+# "dest": "198.51.100.0/24",
+# "next_hops": [
+# {
+# "distance_metric": 110,
+# "forward_router_address": "198.51.101.1",
+# "multicast": true,
+# "name": "route_1",
+# "tag": 40
+# },
+# {
+# "distance_metric": 30,
+# "forward_router_address": "198.51.101.2",
+# "name": "route_2"
+# },
+# {
+# "forward_router_address": "198.51.101.3",
+# "name": "route_3"
+# }
+# ]
+# }
+# ]
+# }
+# ]
+# }
+# ]
+
+# After state:
+# ------------
+#
+# vios#show running-config | include ip route|ipv6 route
+# ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50
+# ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40
+# ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+# ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+# ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+
+# Using rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_static_routes:
+ config:
+ - vrf: ansible_temp_vrf
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.0/24
+ next_hops:
+ - forward_router_address: 192.0.2.1
+ name: test_vrf
+ tag: 50
+ track: 150
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 198.51.100.0/24
+ next_hops:
+ - forward_router_address: 198.51.101.1
+ name: route_1
+ distance_metric: 110
+ tag: 40
+ multicast: true
+ - forward_router_address: 198.51.101.2
+ name: route_2
+ distance_metric: 30
+ - forward_router_address: 198.51.101.3
+ name: route_3
+ - afi: ipv6
+ routes:
+ - dest: 2001:DB8:0:3::/64
+ next_hops:
+ - forward_router_address: 2001:DB8:0:3::2
+ name: test_v6
+ tag: 105
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50",
+# "ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40",
+# "ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2",
+# "ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3",
+# "ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105"
+# ]
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['ip route vrf test 172.31.10.0 255.255.255.0 10.10.10.2 name new_test multicast']
+rendered:
+ description: The set of CLI commands generated from the value in C(config) option
+ returned: When C(state) is I(rendered)
+ type: list
+ sample: ['interface Ethernet1/1', 'mtu 1800']
+gathered:
+ description:
+ - The configuration as structured data transformed for the running configuration
+ fetched from remote host
+ returned: When C(state) is I(gathered)
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+parsed:
+ description:
+ - The configuration as structured data transformed for the value of
+ C(running_config) option
+ returned: When C(state) is I(parsed)
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.static_routes.static_routes import (
+ Static_RoutesArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.static_routes.static_routes import (
+ Static_Routes,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=Static_RoutesArgs.argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ mutually_exclusive=mutually_exclusive,
+ )
+ result = Static_Routes(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_system.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_system.py
new file mode 100644
index 00000000..208270bc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_system.py
@@ -0,0 +1,382 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_system
+author: Peter Sprygada (@privateip)
+short_description: Manage the system attributes on Cisco IOS devices
+description:
+- This module provides declarative management of node system attributes on Cisco IOS
+ devices. It provides an option to configure host system parameters or remove those
+ parameters from the device active configuration.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.ios.ios
+notes:
+- Tested against IOS 15.6
+options:
+ hostname:
+ description:
+ - Configure the device hostname parameter. This option takes an ASCII string value.
+ type: str
+ domain_name:
+ description:
+ - Configure the IP domain name on the remote device to the provided value. Value
+ should be in the dotted name form and will be appended to the C(hostname) to
+ create a fully-qualified domain name.
+ type: list
+ elements: raw
+ domain_search:
+ description:
+ - Provides the list of domain suffixes to append to the hostname for the purpose
+ of doing name resolution. This argument accepts a list of names and will be
+ reconciled with the current active configuration on the running node.
+ type: list
+ elements: raw
+ lookup_source:
+ description:
+ - Provides one or more source interfaces to use for performing DNS lookups. The
+ interface provided in C(lookup_source) must be a valid interface configured
+ on the device.
+ type: str
+ lookup_enabled:
+ description:
+ - Administrative control for enabling or disabling DNS lookups. When this argument
+ is set to True, lookups are performed and when it is set to False, lookups are
+ not performed.
+ type: bool
+ name_servers:
+ description:
+ - List of DNS name servers by IP address to use to perform name resolution lookups. This
+ argument accepts either a list of DNS servers See examples.
+ type: list
+ elements: raw
+ state:
+ description:
+ - State of the configuration values in the device's current active configuration. When
+ set to I(present), the values should be configured in the device active configuration
+ and when set to I(absent) the values should not be in the device active configuration
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+EXAMPLES = """
+- name: configure hostname and domain name
+ cisco.ios.ios_system:
+ hostname: ios01
+ domain_name: test.example.com
+ domain_search:
+ - ansible.com
+ - redhat.com
+ - cisco.com
+
+- name: remove configuration
+ cisco.ios.ios_system:
+ state: absent
+
+- name: configure DNS lookup sources
+ cisco.ios.ios_system:
+ lookup_source: MgmtEth0/0/CPU0/0
+ lookup_enabled: yes
+
+- name: configure name servers
+ cisco.ios.ios_system:
+ name_servers:
+ - 8.8.8.8
+ - 8.8.4.4
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - hostname ios01
+ - ip domain name test.example.com
+"""
+import re
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ ComplexList,
+)
+
+_CONFIGURED_VRFS = None
+
+
+def has_vrf(module, vrf):
+ global _CONFIGURED_VRFS
+ if _CONFIGURED_VRFS is not None:
+ return vrf in _CONFIGURED_VRFS
+ config = get_config(module)
+ _CONFIGURED_VRFS = re.findall("vrf definition (\\S+)", config)
+ return vrf in _CONFIGURED_VRFS
+
+
+def requires_vrf(module, vrf):
+ if not has_vrf(module, vrf):
+ module.fail_json(msg="vrf %s is not configured" % vrf)
+
+
+def diff_list(want, have):
+ adds = [w for w in want if w not in have]
+ removes = [h for h in have if h not in want]
+ return adds, removes
+
+
+def map_obj_to_commands(want, have, module):
+ commands = list()
+ state = module.params["state"]
+
+ def needs_update(x):
+ return want.get(x) is not None and want.get(x) != have.get(x)
+
+ if state == "absent":
+ if have["hostname"] != "Router":
+ commands.append("no hostname")
+ if have["lookup_source"]:
+ commands.append(
+ "no ip domain lookup source-interface %s"
+ % have["lookup_source"]
+ )
+ if have["lookup_enabled"] is False:
+ commands.append("ip domain lookup")
+ vrfs = set()
+ for item in have["domain_name"]:
+ if item["vrf"] and item["vrf"] not in vrfs:
+ vrfs.add(item["vrf"])
+ commands.append("no ip domain name vrf %s" % item["vrf"])
+ elif None not in vrfs:
+ vrfs.add(None)
+ commands.append("no ip domain name")
+ vrfs = set()
+ for item in have["domain_search"]:
+ if item["vrf"] and item["vrf"] not in vrfs:
+ vrfs.add(item["vrf"])
+ commands.append("no ip domain list vrf %s" % item["vrf"])
+ elif None not in vrfs:
+ vrfs.add(None)
+ commands.append("no ip domain list")
+ vrfs = set()
+ for item in have["name_servers"]:
+ if item["vrf"] and item["vrf"] not in vrfs:
+ vrfs.add(item["vrf"])
+ commands.append("no ip name-server vrf %s" % item["vrf"])
+ elif None not in vrfs:
+ vrfs.add(None)
+ commands.append("no ip name-server")
+ elif state == "present":
+ if needs_update("hostname"):
+ commands.append("hostname %s" % want["hostname"])
+ if needs_update("lookup_source"):
+ commands.append(
+ "ip domain lookup source-interface %s" % want["lookup_source"]
+ )
+ if needs_update("lookup_enabled"):
+ cmd = "ip domain lookup"
+ if want["lookup_enabled"] is False:
+ cmd = "no %s" % cmd
+ commands.append(cmd)
+ if want["domain_name"]:
+ adds, removes = diff_list(want["domain_name"], have["domain_name"])
+ for item in removes:
+ if item["vrf"]:
+ commands.append(
+ "no ip domain name vrf %s %s"
+ % (item["vrf"], item["name"])
+ )
+ else:
+ commands.append("no ip domain name %s" % item["name"])
+ for item in adds:
+ if item["vrf"]:
+ requires_vrf(module, item["vrf"])
+ commands.append(
+ "ip domain name vrf %s %s"
+ % (item["vrf"], item["name"])
+ )
+ else:
+ commands.append("ip domain name %s" % item["name"])
+ if want["domain_search"]:
+ adds, removes = diff_list(
+ want["domain_search"], have["domain_search"]
+ )
+ for item in removes:
+ if item["vrf"]:
+ commands.append(
+ "no ip domain list vrf %s %s"
+ % (item["vrf"], item["name"])
+ )
+ else:
+ commands.append("no ip domain list %s" % item["name"])
+ for item in adds:
+ if item["vrf"]:
+ requires_vrf(module, item["vrf"])
+ commands.append(
+ "ip domain list vrf %s %s"
+ % (item["vrf"], item["name"])
+ )
+ else:
+ commands.append("ip domain list %s" % item["name"])
+ if want["name_servers"]:
+ adds, removes = diff_list(
+ want["name_servers"], have["name_servers"]
+ )
+ for item in removes:
+ if item["vrf"]:
+ commands.append(
+ "no ip name-server vrf %s %s"
+ % (item["vrf"], item["server"])
+ )
+ else:
+ commands.append("no ip name-server %s" % item["server"])
+ for item in adds:
+ if item["vrf"]:
+ requires_vrf(module, item["vrf"])
+ commands.append(
+ "ip name-server vrf %s %s"
+ % (item["vrf"], item["server"])
+ )
+ else:
+ commands.append("ip name-server %s" % item["server"])
+ return commands
+
+
+def parse_hostname(config):
+ match = re.search("^hostname (\\S+)", config, re.M)
+ return match.group(1)
+
+
+def parse_domain_name(config):
+ match = re.findall(
+ "^ip domain[- ]name (?:vrf (\\S+) )*(\\S+)", config, re.M
+ )
+ matches = list()
+ for vrf, name in match:
+ if not vrf:
+ vrf = None
+ matches.append({"name": name, "vrf": vrf})
+ return matches
+
+
+def parse_domain_search(config):
+ match = re.findall(
+ "^ip domain[- ]list (?:vrf (\\S+) )*(\\S+)", config, re.M
+ )
+ matches = list()
+ for vrf, name in match:
+ if not vrf:
+ vrf = None
+ matches.append({"name": name, "vrf": vrf})
+ return matches
+
+
+def parse_name_servers(config):
+ match = re.findall("^ip name-server (?:vrf (\\S+) )*(.*)", config, re.M)
+ matches = list()
+ for vrf, servers in match:
+ if not vrf:
+ vrf = None
+ for server in servers.split():
+ matches.append({"server": server, "vrf": vrf})
+ return matches
+
+
+def parse_lookup_source(config):
+ match = re.search(
+ "ip domain[- ]lookup source-interface (\\S+)", config, re.M
+ )
+ if match:
+ return match.group(1)
+
+
+def map_config_to_obj(module):
+ config = get_config(module)
+ return {
+ "hostname": parse_hostname(config),
+ "domain_name": parse_domain_name(config),
+ "domain_search": parse_domain_search(config),
+ "lookup_source": parse_lookup_source(config),
+ "lookup_enabled": "no ip domain lookup" not in config
+ and "no ip domain-lookup" not in config,
+ "name_servers": parse_name_servers(config),
+ }
+
+
+def map_params_to_obj(module):
+ obj = {
+ "hostname": module.params["hostname"],
+ "lookup_source": module.params["lookup_source"],
+ "lookup_enabled": module.params["lookup_enabled"],
+ }
+ domain_name = ComplexList(dict(name=dict(key=True), vrf=dict()), module)
+ domain_search = ComplexList(dict(name=dict(key=True), vrf=dict()), module)
+ name_servers = ComplexList(dict(server=dict(key=True), vrf=dict()), module)
+ for arg, cast in [
+ ("domain_name", domain_name),
+ ("domain_search", domain_search),
+ ("name_servers", name_servers),
+ ]:
+ if module.params[arg]:
+ obj[arg] = cast(module.params[arg])
+ else:
+ obj[arg] = None
+ return obj
+
+
+def main():
+ """ Main entry point for Ansible module execution
+ """
+ argument_spec = dict(
+ hostname=dict(),
+ domain_name=dict(type="list", elements="raw"),
+ domain_search=dict(type="list", elements="raw"),
+ name_servers=dict(type="list", elements="raw"),
+ lookup_source=dict(),
+ lookup_enabled=dict(type="bool"),
+ state=dict(choices=["present", "absent"], default="present"),
+ )
+ argument_spec.update(ios_argument_spec)
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+ result = {"changed": False}
+ warnings = list()
+ result["warnings"] = warnings
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands(want, have, module)
+ result["commands"] = commands
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_user.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_user.py
new file mode 100644
index 00000000..8c94ef96
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_user.py
@@ -0,0 +1,616 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_user
+author: Trishna Guha (@trishnaguha)
+short_description: Manage the aggregate of local users on Cisco IOS device
+description:
+- This module provides declarative management of the local usernames configured on
+ network devices. It allows playbooks to manage either individual usernames or the
+ aggregate of usernames in the current running config. It also supports purging usernames
+ from the configuration that are not explicitly defined.
+version_added: 1.0.0
+notes:
+- Tested against IOS 15.6
+options:
+ aggregate:
+ description:
+ - The set of username objects to be configured on the remote Cisco IOS device.
+ The list entries can either be the username or a hash of username and properties.
+ This argument is mutually exclusive with the C(name) argument.
+ aliases:
+ - users
+ - collection
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - The username to be configured on the Cisco IOS device. This argument accepts
+ a string value and is mutually exclusive with the C(aggregate) argument. Please
+ note that this option is not same as C(provider username).
+ type: str
+ required: true
+ configured_password:
+ description:
+ - The password to be configured on the Cisco IOS device. The password needs to
+ be provided in clear and it will be encrypted on the device. Please note that
+ this option is not same as C(provider password).
+ type: str
+ update_password:
+ description:
+ - Since passwords are encrypted in the device running config, this argument will
+ instruct the module when to change the password. When set to C(always), the
+ password will always be updated in the device and when set to C(on_create) the
+ password will be updated only if the username is created.
+ choices:
+ - on_create
+ - always
+ type: str
+ password_type:
+ description:
+ - This argument determines whether a 'password' or 'secret' will be configured.
+ choices:
+ - secret
+ - password
+ type: str
+ hashed_password:
+ description:
+ - This option allows configuring hashed passwords on Cisco IOS devices.
+ type: dict
+ suboptions:
+ type:
+ description:
+ - Specifies the type of hash (e.g., 5 for MD5, 8 for PBKDF2, etc.)
+ - For this to work, the device needs to support the desired hash type
+ type: int
+ required: true
+ value:
+ description:
+ - The actual hashed password to be configured on the device
+ required: true
+ type: str
+ privilege:
+ description:
+ - The C(privilege) argument configures the privilege level of the user when logged
+ into the system. This argument accepts integer values in the range of 1 to 15.
+ type: int
+ view:
+ description:
+ - Configures the view for the username in the device running configuration. The
+ argument accepts a string value defining the view name. This argument does not
+ check if the view has been configured on the device.
+ aliases:
+ - role
+ type: str
+ sshkey:
+ description:
+ - Specifies one or more SSH public key(s) to configure for the given username.
+ - This argument accepts a valid SSH key value.
+ type: list
+ elements: str
+ nopassword:
+ description:
+ - Defines the username without assigning a password. This will allow the user
+ to login to the system without being authenticated by a password.
+ type: bool
+ state:
+ description:
+ - Configures the state of the username definition as it relates to the device
+ operational configuration. When set to I(present), the username(s) should be
+ configured in the device active configuration and when set to I(absent) the
+ username(s) should not be in the device active configuration
+ choices:
+ - present
+ - absent
+ type: str
+ name:
+ description:
+ - The username to be configured on the Cisco IOS device. This argument accepts
+ a string value and is mutually exclusive with the C(aggregate) argument. Please
+ note that this option is not same as C(provider username).
+ type: str
+ configured_password:
+ description:
+ - The password to be configured on the Cisco IOS device. The password needs to
+ be provided in clear and it will be encrypted on the device. Please note that
+ this option is not same as C(provider password).
+ type: str
+ update_password:
+ description:
+ - Since passwords are encrypted in the device running config, this argument will
+ instruct the module when to change the password. When set to C(always), the
+ password will always be updated in the device and when set to C(on_create) the
+ password will be updated only if the username is created.
+ default: always
+ choices:
+ - on_create
+ - always
+ type: str
+ password_type:
+ description:
+ - This argument determines whether a 'password' or 'secret' will be configured.
+ default: secret
+ choices:
+ - secret
+ - password
+ type: str
+ hashed_password:
+ description:
+ - This option allows configuring hashed passwords on Cisco IOS devices.
+ type: dict
+ suboptions:
+ type:
+ description:
+ - Specifies the type of hash (e.g., 5 for MD5, 8 for PBKDF2, etc.)
+ - For this to work, the device needs to support the desired hash type
+ type: int
+ required: true
+ value:
+ description:
+ - The actual hashed password to be configured on the device
+ required: true
+ type: str
+ privilege:
+ description:
+ - The C(privilege) argument configures the privilege level of the user when logged
+ into the system. This argument accepts integer values in the range of 1 to 15.
+ type: int
+ view:
+ description:
+ - Configures the view for the username in the device running configuration. The
+ argument accepts a string value defining the view name. This argument does not
+ check if the view has been configured on the device.
+ aliases:
+ - role
+ type: str
+ sshkey:
+ description:
+ - Specifies one or more SSH public key(s) to configure for the given username.
+ - This argument accepts a valid SSH key value.
+ type: list
+ elements: str
+ nopassword:
+ description:
+ - Defines the username without assigning a password. This will allow the user
+ to login to the system without being authenticated by a password.
+ type: bool
+ purge:
+ description:
+ - Instructs the module to consider the resource definition absolute. It will remove
+ any previously configured usernames on the device with the exception of the
+ `admin` user (the current defined set of users).
+ type: bool
+ default: false
+ state:
+ description:
+ - Configures the state of the username definition as it relates to the device
+ operational configuration. When set to I(present), the username(s) should be
+ configured in the device active configuration and when set to I(absent) the
+ username(s) should not be in the device active configuration
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+extends_documentation_fragment:
+- cisco.ios.ios
+"""
+EXAMPLES = """
+- name: create a new user
+ cisco.ios.ios_user:
+ name: ansible
+ nopassword: true
+ sshkey: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
+ state: present
+
+- name: create a new user with multiple keys
+ cisco.ios.ios_user:
+ name: ansible
+ sshkey:
+ - "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
+ - "{{ lookup('file', '~/path/to/public_key') }}"
+ state: present
+
+- name: remove all users except admin
+ cisco.ios.ios_user:
+ purge: yes
+
+- name: remove all users except admin and these listed users
+ cisco.ios.ios_user:
+ aggregate:
+ - name: testuser1
+ - name: testuser2
+ - name: testuser3
+ purge: yes
+
+- name: set multiple users to privilege level 15
+ cisco.ios.ios_user:
+ aggregate:
+ - name: netop
+ - name: netend
+ privilege: 15
+ state: present
+
+- name: set user view/role
+ cisco.ios.ios_user:
+ name: netop
+ view: network-operator
+ state: present
+
+- name: Change Password for User netop
+ cisco.ios.ios_user:
+ name: netop
+ configured_password: '{{ new_password }}'
+ update_password: always
+ state: present
+
+- name: Aggregate of users
+ cisco.ios.ios_user:
+ aggregate:
+ - name: ansibletest2
+ - name: ansibletest3
+ view: network-admin
+
+- name: Add a user specifying password type
+ cisco.ios.ios_user:
+ name: ansibletest4
+ configured_password: '{{ new_password }}'
+ password_type: password
+
+- name: Add a user with MD5 hashed password
+ cisco.ios.ios_user:
+ name: ansibletest5
+ hashed_password:
+ type: 5
+ value: $3$8JcDilcYgFZi.yz4ApaqkHG2.8/
+
+- name: Delete users with aggregate
+ cisco.ios.ios_user:
+ aggregate:
+ - name: ansibletest1
+ - name: ansibletest2
+ - name: ansibletest3
+ state: absent
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - username ansible secret password
+ - username admin secret admin
+"""
+import base64
+import hashlib
+import re
+from copy import deepcopy
+from functools import partial
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+from ansible.module_utils.six import iteritems
+
+
+def validate_privilege(value, module):
+ if value and not 1 <= value <= 15:
+ module.fail_json(
+ msg="privilege must be between 1 and 15, got %s" % value
+ )
+
+
+def user_del_cmd(username):
+ return {
+ "command": "no username %s" % username,
+ "prompt": "This operation will remove all username related configurations with same name",
+ "answer": "y",
+ "newline": False,
+ }
+
+
+def sshkey_fingerprint(sshkey):
+ # IOS will accept a MD5 fingerprint of the public key
+ # and is easier to configure in a single line
+ # we calculate this fingerprint here
+ if not sshkey:
+ return None
+ if " " in sshkey:
+ # ssh-rsa AAA...== comment
+ keyparts = sshkey.split(" ")
+ keyparts[1] = (
+ hashlib.md5(base64.b64decode(keyparts[1])).hexdigest().upper()
+ )
+ return " ".join(keyparts)
+ else:
+ # just the key, assume rsa type
+ return (
+ "ssh-rsa %s"
+ % hashlib.md5(base64.b64decode(sshkey)).hexdigest().upper()
+ )
+
+
+def map_obj_to_commands(updates, module):
+ commands = list()
+ update_password = module.params["update_password"]
+ password_type = module.params["password_type"]
+
+ def needs_update(want, have, x):
+ return want.get(x) and want.get(x) != have.get(x)
+
+ def add(command, want, x):
+ command.append("username %s %s" % (want["name"], x))
+
+ def add_hashed_password(command, want, x):
+ command.append(
+ "username %s secret %s %s"
+ % (want["name"], x.get("type"), x.get("value"))
+ )
+
+ def add_ssh(command, want, x=None):
+ command.append("ip ssh pubkey-chain")
+ if x:
+ command.append("username %s" % want["name"])
+ for item in x:
+ command.append("key-hash %s" % item)
+ command.append("exit")
+ else:
+ command.append("no username %s" % want["name"])
+ command.append("exit")
+
+ for update in updates:
+ want, have = update
+ if want["state"] == "absent":
+ if have["sshkey"]:
+ add_ssh(commands, want)
+ else:
+ commands.append(user_del_cmd(want["name"]))
+ if needs_update(want, have, "view"):
+ add(commands, want, "view %s" % want["view"])
+ if needs_update(want, have, "privilege"):
+ add(commands, want, "privilege %s" % want["privilege"])
+ if needs_update(want, have, "sshkey"):
+ add_ssh(commands, want, want["sshkey"])
+ if needs_update(want, have, "configured_password"):
+ if update_password == "always" or not have:
+ if have and password_type != have["password_type"]:
+ module.fail_json(
+ msg="Can not have both a user password and a user secret."
+ + " Please choose one or the other."
+ )
+ add(
+ commands,
+ want,
+ "%s %s" % (password_type, want["configured_password"]),
+ )
+ if needs_update(want, have, "hashed_password"):
+ add_hashed_password(commands, want, want["hashed_password"])
+ if needs_update(want, have, "nopassword"):
+ if want["nopassword"]:
+ add(commands, want, "nopassword")
+ else:
+ add(commands, want, user_del_cmd(want["name"]))
+ return commands
+
+
+def parse_view(data):
+ match = re.search("view (\\S+)", data, re.M)
+ if match:
+ return match.group(1)
+
+
+def parse_sshkey(data, user):
+ sshregex = "username %s(\\n\\s+key-hash .+$)+" % user
+ sshcfg = re.search(sshregex, data, re.M)
+ key_list = []
+ if sshcfg:
+ match = re.findall(
+ "key-hash (\\S+ \\S+(?: .+)?)$", sshcfg.group(), re.M
+ )
+ if match:
+ key_list = match
+ return key_list
+
+
+def parse_privilege(data):
+ match = re.search("privilege (\\S+)", data, re.M)
+ if match:
+ return int(match.group(1))
+
+
+def parse_password_type(data):
+ type = None
+ if data and data.split()[-3] in ["password", "secret"]:
+ type = data.split()[-3]
+ return type
+
+
+def map_config_to_obj(module):
+ data = get_config(module, flags=["| section username"])
+ match = re.findall("(?:^(?:u|\\s{2}u))sername (\\S+)", data, re.M)
+ if not match:
+ return list()
+ instances = list()
+ for user in set(match):
+ regex = "username %s .+$" % user
+ cfg = re.findall(regex, data, re.M)
+ cfg = "\n".join(cfg)
+ obj = {
+ "name": user,
+ "state": "present",
+ "nopassword": "nopassword" in cfg,
+ "configured_password": None,
+ "hashed_password": None,
+ "password_type": parse_password_type(cfg),
+ "sshkey": parse_sshkey(data, user),
+ "privilege": parse_privilege(cfg),
+ "view": parse_view(cfg),
+ }
+ instances.append(obj)
+ return instances
+
+
+def get_param_value(key, item, module):
+ # if key doesn't exist in the item, get it from module.params
+ if not item.get(key):
+ value = module.params[key]
+ # if key does exist, do a type check on it to validate it
+ else:
+ value_type = module.argument_spec[key].get("type", "str")
+ type_checker = module._CHECK_ARGUMENT_TYPES_DISPATCHER[value_type]
+ type_checker(item[key])
+ value = item[key]
+ # validate the param value (if validator func exists)
+ validator = globals().get("validate_%s" % key)
+ if all((value, validator)):
+ validator(value, module)
+ return value
+
+
+def map_params_to_obj(module):
+ users = module.params["aggregate"]
+ if not users:
+ if not module.params["name"] and module.params["purge"]:
+ return list()
+ elif not module.params["name"]:
+ module.fail_json(msg="username is required")
+ else:
+ aggregate = [{"name": module.params["name"]}]
+ else:
+ aggregate = list()
+ for item in users:
+ if not isinstance(item, dict):
+ aggregate.append({"name": item})
+ elif "name" not in item:
+ module.fail_json(msg="name is required")
+ else:
+ aggregate.append(item)
+ objects = list()
+ for item in aggregate:
+ get_value = partial(get_param_value, item=item, module=module)
+ item["configured_password"] = get_value("configured_password")
+ item["hashed_password"] = get_value("hashed_password")
+ item["nopassword"] = get_value("nopassword")
+ item["privilege"] = get_value("privilege")
+ item["view"] = get_value("view")
+ item["sshkey"] = render_key_list(get_value("sshkey"))
+ item["state"] = get_value("state")
+ objects.append(item)
+ return objects
+
+
+def render_key_list(ssh_keys):
+ key_list = []
+ if ssh_keys:
+ for item in ssh_keys:
+ key_list.append(sshkey_fingerprint(item))
+ return key_list
+
+
+def update_objects(want, have):
+ updates = list()
+ for entry in want:
+ item = next((i for i in have if i["name"] == entry["name"]), None)
+ if all((item is None, entry["state"] == "present")):
+ updates.append((entry, {}))
+ elif item:
+ for key, value in iteritems(entry):
+ if value and value != item[key]:
+ updates.append((entry, item))
+ return updates
+
+
+def main():
+ """ main entry point for module execution
+ """
+ hashed_password_spec = dict(
+ type=dict(type="int", required=True),
+ value=dict(no_log=True, required=True),
+ )
+ element_spec = dict(
+ name=dict(),
+ configured_password=dict(no_log=True),
+ hashed_password=dict(
+ no_log=True, type="dict", options=hashed_password_spec
+ ),
+ nopassword=dict(type="bool"),
+ update_password=dict(
+ default="always", choices=["on_create", "always"]
+ ),
+ password_type=dict(default="secret", choices=["secret", "password"]),
+ privilege=dict(type="int"),
+ view=dict(aliases=["role"]),
+ sshkey=dict(type="list", elements="str"),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["name"] = dict(required=True)
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+ argument_spec = dict(
+ aggregate=dict(
+ type="list",
+ elements="dict",
+ options=aggregate_spec,
+ aliases=["users", "collection"],
+ ),
+ purge=dict(type="bool", default=False),
+ )
+ argument_spec.update(element_spec)
+ argument_spec.update(ios_argument_spec)
+ mutually_exclusive = [
+ ("name", "aggregate"),
+ ("nopassword", "hashed_password", "configured_password"),
+ ]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ warnings = list()
+ result = {"changed": False, "warnings": warnings}
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands(update_objects(want, have), module)
+ if module.params["purge"]:
+ want_users = [x["name"] for x in want]
+ have_users = [x["name"] for x in have]
+ for item in set(have_users).difference(want_users):
+ if item != "admin":
+ commands.append(user_del_cmd(item))
+ result["commands"] = commands
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_vlan.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_vlan.py
new file mode 100644
index 00000000..f18f3027
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_vlan.py
@@ -0,0 +1,416 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_vlan
+author: Trishna Guha (@trishnaguha)
+short_description: (deprecated, removed after 2022-06-01) Manage VLANs on IOS network
+ devices
+description:
+- This module provides declarative management of VLANs on Cisco IOS network devices.
+version_added: 1.0.0
+deprecated:
+ alternative: ios_vlans
+ why: Newer and updated modules released with more functionality in Ansible 2.9
+ removed_at_date: '2022-06-01'
+notes:
+- Tested against IOS 15.2
+options:
+ name:
+ description:
+ - Name of the VLAN.
+ type: str
+ vlan_id:
+ description:
+ - ID of the VLAN. Range 1-4094.
+ type: int
+ interfaces:
+ description:
+ - List of interfaces that should be associated to the VLAN.
+ type: list
+ elements: str
+ associated_interfaces:
+ description:
+ - This is a intent option and checks the operational state of the for given vlan
+ C(name) for associated interfaces. If the value in the C(associated_interfaces)
+ does not match with the operational state of vlan interfaces on device it will
+ result in failure.
+ type: list
+ elements: str
+ delay:
+ description:
+ - Delay the play should wait to check for declarative intent params values.
+ default: 10
+ type: int
+ aggregate:
+ description: List of VLANs definitions.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name of the VLAN.
+ type: str
+ vlan_id:
+ description:
+ - ID of the VLAN. Range 1-4094.
+ required: true
+ type: str
+ interfaces:
+ description:
+ - List of interfaces that should be associated to the VLAN.
+ type: list
+ elements: str
+ associated_interfaces:
+ description:
+ - This is a intent option and checks the operational state of the for given vlan
+ C(name) for associated interfaces. If the value in the C(associated_interfaces)
+ does not match with the operational state of vlan interfaces on device it will
+ result in failure.
+ type: list
+ elements: str
+ delay:
+ description:
+ - Delay the play should wait to check for declarative intent params values.
+ type: int
+ state:
+ description:
+ - State of the VLAN configuration.
+ type: str
+ choices:
+ - present
+ - absent
+ - active
+ - suspend
+ purge:
+ description:
+ - Purge VLANs not defined in the I(aggregate) parameter.
+ default: false
+ type: bool
+ state:
+ description:
+ - State of the VLAN configuration.
+ default: present
+ choices:
+ - present
+ - absent
+ - active
+ - suspend
+ type: str
+extends_documentation_fragment:
+- cisco.ios.ios
+
+
+"""
+EXAMPLES = """
+- name: Create vlan
+ cisco.ios.ios_vlan:
+ vlan_id: 100
+ name: test-vlan
+ state: present
+
+- name: Add interfaces to VLAN
+ cisco.ios.ios_vlan:
+ vlan_id: 100
+ interfaces:
+ - GigabitEthernet0/0
+ - GigabitEthernet0/1
+
+- name: Check if interfaces is assigned to VLAN
+ cisco.ios.ios_vlan:
+ vlan_id: 100
+ associated_interfaces:
+ - GigabitEthernet0/0
+ - GigabitEthernet0/1
+
+- name: Delete vlan
+ cisco.ios.ios_vlan:
+ vlan_id: 100
+ state: absent
+
+- name: Add vlan using aggregate
+ cisco.ios.ios_vlan:
+ aggregate:
+ - {vlan_id: 100, name: test-vlan, interfaces: [GigabitEthernet0/1, GigabitEthernet0/2],
+ delay: 15, state: suspend}
+ - {vlan_id: 101, name: test-vlan, interfaces: GigabitEthernet0/3}
+
+- name: Move interfaces to a different VLAN
+ cisco.ios.ios_vlan:
+ vlan_id: 102
+ interfaces:
+ - GigabitEthernet0/0
+ - GigabitEthernet0/1
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - vlan 100
+ - name test-vlan
+"""
+import re
+import time
+from copy import deepcopy
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ load_config,
+ run_commands,
+ normalize_interface,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+
+
+def search_obj_in_list(vlan_id, lst):
+ for o in lst:
+ if o["vlan_id"] == vlan_id:
+ return o
+
+
+def map_obj_to_commands(updates, module):
+ commands = list()
+ want, have = updates
+ purge = module.params["purge"]
+ for w in want:
+ vlan_id = w["vlan_id"]
+ name = w["name"]
+ interfaces = w["interfaces"]
+ state = w["state"]
+ obj_in_have = search_obj_in_list(vlan_id, have)
+ if state == "absent":
+ if obj_in_have:
+ commands.append("no vlan {0}".format(vlan_id))
+ elif state == "present":
+ if not obj_in_have:
+ commands.append("vlan {0}".format(vlan_id))
+ if name:
+ commands.append("name {0}".format(name))
+ if interfaces:
+ for i in interfaces:
+ commands.append("interface {0}".format(i))
+ commands.append("switchport mode access")
+ commands.append(
+ "switchport access vlan {0}".format(vlan_id)
+ )
+ else:
+ if name:
+ if name != obj_in_have["name"]:
+ commands.append("vlan {0}".format(vlan_id))
+ commands.append("name {0}".format(name))
+ if interfaces:
+ if not obj_in_have["interfaces"]:
+ for i in interfaces:
+ commands.append("vlan {0}".format(vlan_id))
+ commands.append("interface {0}".format(i))
+ commands.append("switchport mode access")
+ commands.append(
+ "switchport access vlan {0}".format(vlan_id)
+ )
+ elif set(interfaces) != set(obj_in_have["interfaces"]):
+ missing_interfaces = list(
+ set(interfaces) - set(obj_in_have["interfaces"])
+ )
+ for i in missing_interfaces:
+ commands.append("vlan {0}".format(vlan_id))
+ commands.append("interface {0}".format(i))
+ commands.append("switchport mode access")
+ commands.append(
+ "switchport access vlan {0}".format(vlan_id)
+ )
+ superfluous_interfaces = list(
+ set(obj_in_have["interfaces"]) - set(interfaces)
+ )
+ for i in superfluous_interfaces:
+ commands.append("vlan {0}".format(vlan_id))
+ commands.append("interface {0}".format(i))
+ commands.append("switchport mode access")
+ commands.append(
+ "no switchport access vlan {0}".format(vlan_id)
+ )
+ else:
+ commands.append("vlan {0}".format(vlan_id))
+ if name:
+ commands.append("name {0}".format(name))
+ commands.append("state {0}".format(state))
+ if purge:
+ for h in have:
+ obj_in_want = search_obj_in_list(h["vlan_id"], want)
+ if not obj_in_want and h["vlan_id"] != "1":
+ commands.append("no vlan {0}".format(h["vlan_id"]))
+ return commands
+
+
+def map_params_to_obj(module):
+ obj = []
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+ d = item.copy()
+ d["vlan_id"] = str(d["vlan_id"])
+ obj.append(d)
+ else:
+ obj.append(
+ {
+ "vlan_id": str(module.params["vlan_id"]),
+ "name": module.params["name"],
+ "interfaces": module.params["interfaces"],
+ "associated_interfaces": module.params[
+ "associated_interfaces"
+ ],
+ "state": module.params["state"],
+ }
+ )
+ return obj
+
+
+def parse_to_logical_rows(out):
+ started_yielding = False
+ cur_row = []
+ for l in out.splitlines()[2:]:
+ if not l:
+ """Skip empty lines."""
+ continue
+ if "0" < l[0] <= "9":
+ """Line starting with a number."""
+ if started_yielding:
+ yield cur_row
+ cur_row = [] # Reset it to hold a next chunk
+ started_yielding = True
+ cur_row.append(l)
+ yield cur_row
+
+
+def map_ports_str_to_list(ports_str):
+ return list(
+ filter(
+ bool,
+ (normalize_interface(p.strip()) for p in ports_str.split(", ")),
+ )
+ )
+
+
+def parse_to_obj(logical_rows):
+ first_row = logical_rows[0]
+ rest_rows = logical_rows[1:]
+ obj = re.match(
+ "(?P<vlan_id>\\d+)\\s+(?P<name>[^\\s]+)\\s+(?P<state>[^\\s]+)\\s*(?P<interfaces>.*)",
+ first_row,
+ ).groupdict()
+ if obj["state"] == "suspended":
+ obj["state"] = "suspend"
+ obj["interfaces"] = map_ports_str_to_list(obj["interfaces"])
+ obj["interfaces"].extend(
+ prts_r for prts in rest_rows for prts_r in map_ports_str_to_list(prts)
+ )
+ return obj
+
+
+def parse_vlan_brief(vlan_out):
+ return [parse_to_obj(r) for r in parse_to_logical_rows(vlan_out)]
+
+
+def map_config_to_obj(module):
+ return parse_vlan_brief(run_commands(module, ["show vlan brief"])[0])
+
+
+def check_declarative_intent_params(want, module, result):
+ have = None
+ is_delay = False
+ for w in want:
+ if w.get("associated_interfaces") is None:
+ continue
+ if result["changed"] and not is_delay:
+ time.sleep(module.params["delay"])
+ is_delay = True
+ if have is None:
+ have = map_config_to_obj(module)
+ for i in w["associated_interfaces"]:
+ obj_in_have = search_obj_in_list(w["vlan_id"], have)
+ if (
+ obj_in_have
+ and "interfaces" in obj_in_have
+ and i not in obj_in_have["interfaces"]
+ ):
+ module.fail_json(
+ msg="Interface %s not configured on vlan %s"
+ % (i, w["vlan_id"])
+ )
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ vlan_id=dict(type="int"),
+ name=dict(),
+ interfaces=dict(type="list", elements="str"),
+ associated_interfaces=dict(type="list", elements="str"),
+ delay=dict(default=10, type="int"),
+ state=dict(
+ default="present",
+ choices=["present", "absent", "active", "suspend"],
+ ),
+ )
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["vlan_id"] = dict(required=True)
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec),
+ purge=dict(default=False, type="bool"),
+ )
+ argument_spec.update(element_spec)
+ argument_spec.update(ios_argument_spec)
+ required_one_of = [["vlan_id", "aggregate"]]
+ mutually_exclusive = [["vlan_id", "aggregate"]]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=required_one_of,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ warnings = list()
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands((want, have), module)
+ result["commands"] = commands
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+ check_declarative_intent_params(want, module, result)
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_vlans.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_vlans.py
new file mode 100644
index 00000000..d215a62e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_vlans.py
@@ -0,0 +1,748 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+"""
+The module file for ios_vlans
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_vlans
+short_description: VLANs resource module
+description: This module provides declarative management of VLANs on Cisco IOS network
+ devices.
+version_added: 1.0.0
+author: Sumit Jaiswal (@justjais)
+notes:
+- Tested against Cisco IOSl2 device with Version 15.2 on VIRL.
+options:
+ config:
+ description: A dictionary of VLANs options
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Ascii name of the VLAN.
+ - NOTE, I(name) should not be named/appended with I(default) as it is reserved
+ for device default vlans.
+ type: str
+ vlan_id:
+ description:
+ - ID of the VLAN. Range 1-4094
+ type: int
+ required: true
+ mtu:
+ description:
+ - VLAN Maximum Transmission Unit.
+ - Refer to vendor documentation for valid values.
+ type: int
+ state:
+ description:
+ - Operational state of the VLAN
+ type: str
+ choices:
+ - active
+ - suspend
+ remote_span:
+ description:
+ - Configure as Remote SPAN VLAN
+ type: bool
+ shutdown:
+ description:
+ - Shutdown VLAN switching.
+ type: str
+ choices:
+ - enabled
+ - disabled
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS device
+ by executing the command B(show vlan).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ - The states I(rendered), I(gathered) and I(parsed) does not perform any change
+ on the device.
+ - The state I(rendered) will transform the configuration in C(config) option to
+ platform specific CLI commands which will be returned in the I(rendered) key
+ within the result. For state I(rendered) active connection to remote host is
+ not required.
+ - The state I(gathered) will fetch the running configuration from device and transform
+ it into structured data in the format as per the resource module argspec and
+ the value is returned in the I(gathered) key within the result.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into JSON format as per the resource module parameters and the
+ value is returned in the I(parsed) key within the result. The value of C(running_config)
+ option should be the same format as the output of command I(show running-config
+ | include ip route|ipv6 route) executed on device. For state I(parsed) active
+ connection to remote host is not required.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - rendered
+ - gathered
+ - parsed
+ default: merged
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# vios_l2#show vlan
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 1 default active Gi0/1, Gi0/2
+# 1002 fddi-default act/unsup
+# 1003 token-ring-default act/unsup
+# 1004 fddinet-default act/unsup
+# 1005 trnet-default act/unsup
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 1 enet 100001 1500 - - - - - 0 0
+# 1002 fddi 101002 1500 - - - - - 0 0
+# 1003 tr 101003 1500 - - - - - 0 0
+# 1004 fdnet 101004 1500 - - - ieee - 0 0
+# 1005 trnet 101005 1500 - - - ibm - 0 0
+
+- name: Merge provided configuration with device configuration
+ cisco.ios.ios_vlans:
+ config:
+ - name: Vlan_10
+ vlan_id: 10
+ state: active
+ shutdown: disabled
+ remote_span: 10
+ - name: Vlan_20
+ vlan_id: 20
+ mtu: 610
+ state: active
+ shutdown: enabled
+ - name: Vlan_30
+ vlan_id: 30
+ state: suspend
+ shutdown: enabled
+ state: merged
+
+# After state:
+# ------------
+#
+# vios_l2#show vlan
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 1 default active Gi0/1, Gi0/2
+# 10 vlan_10 active
+# 20 vlan_20 act/lshut
+# 30 vlan_30 sus/lshut
+# 1002 fddi-default act/unsup
+# 1003 token-ring-default act/unsup
+# 1004 fddinet-default act/unsup
+# 1005 trnet-default act/unsup
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 1 enet 100001 1500 - - - - - 0 0
+# 10 enet 100010 1500 - - - - - 0 0
+# 20 enet 100020 610 - - - - - 0 0
+# 30 enet 100030 1500 - - - - - 0 0
+# 1002 fddi 101002 1500 - - - - - 0 0
+# 1003 tr 101003 1500 - - - - - 0 0
+# 1004 fdnet 101004 1500 - - - ieee - 0 0
+# 1005 trnet 101005 1500 - - - ibm - 0 0
+#
+# Remote SPAN VLANs
+# ------------------------------------------------------------------------------
+# 10
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# vios_l2#show vlan
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 1 default active Gi0/1, Gi0/2
+# 10 vlan_10 active
+# 20 vlan_20 act/lshut
+# 30 vlan_30 sus/lshut
+# 1002 fddi-default act/unsup
+# 1003 token-ring-default act/unsup
+# 1004 fddinet-default act/unsup
+# 1005 trnet-default act/unsup
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 1 enet 100001 1500 - - - - - 0 0
+# 10 enet 100010 1500 - - - - - 0 0
+# 20 enet 100020 610 - - - - - 0 0
+# 30 enet 100030 1500 - - - - - 0 0
+# 1002 fddi 101002 1500 - - - - - 0 0
+# 1003 tr 101003 1500 - - - - - 0 0
+# 1004 fdnet 101004 1500 - - - ieee - 0 0
+# 1005 trnet 101005 1500 - - - ibm - 0 0
+#
+# Remote SPAN VLANs
+# ------------------------------------------------------------------------------
+# 10
+
+- name: Override device configuration of all VLANs with provided configuration
+ cisco.ios.ios_vlans:
+ config:
+ - name: Vlan_10
+ vlan_id: 10
+ mtu: 1000
+ state: overridden
+
+# After state:
+# ------------
+#
+# vios_l2#show vlan
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 10 Vlan_10 active
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 10 enet 100010 1000 - - - - - 0 0
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# vios_l2#show vlan
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 1 default active Gi0/1, Gi0/2
+# 10 vlan_10 active
+# 20 vlan_20 act/lshut
+# 30 vlan_30 sus/lshut
+# 1002 fddi-default act/unsup
+# 1003 token-ring-default act/unsup
+# 1004 fddinet-default act/unsup
+# 1005 trnet-default act/unsup
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 1 enet 100001 1500 - - - - - 0 0
+# 10 enet 100010 1500 - - - - - 0 0
+# 20 enet 100020 610 - - - - - 0 0
+# 30 enet 100030 1500 - - - - - 0 0
+# 1002 fddi 101002 1500 - - - - - 0 0
+# 1003 tr 101003 1500 - - - - - 0 0
+# 1004 fdnet 101004 1500 - - - ieee - 0 0
+# 1005 trnet 101005 1500 - - - ibm - 0 0
+#
+# Remote SPAN VLANs
+# ------------------------------------------------------------------------------
+# 10
+
+- name: Replaces device configuration of listed VLANs with provided configuration
+ cisco.ios.ios_vlans:
+ config:
+ - vlan_id: 20
+ name: Test_VLAN20
+ mtu: 700
+ shutdown: disabled
+ - vlan_id: 30
+ name: Test_VLAN30
+ mtu: 1000
+ state: replaced
+
+# After state:
+# ------------
+#
+# vios_l2#show vlan
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 1 default active Gi0/1, Gi0/2
+# 10 vlan_10 active
+# 20 Test_VLAN20 active
+# 30 Test_VLAN30 sus/lshut
+# 1002 fddi-default act/unsup
+# 1003 token-ring-default act/unsup
+# 1004 fddinet-default act/unsup
+# 1005 trnet-default act/unsup
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 1 enet 100001 1500 - - - - - 0 0
+# 10 enet 100010 1500 - - - - - 0 0
+# 20 enet 100020 700 - - - - - 0 0
+# 30 enet 100030 1000 - - - - - 0 0
+# 1002 fddi 101002 1500 - - - - - 0 0
+# 1003 tr 101003 1500 - - - - - 0 0
+# 1004 fdnet 101004 1500 - - - ieee - 0 0
+# 1005 trnet 101005 1500 - - - ibm - 0 0
+#
+# Remote SPAN VLANs
+# ------------------------------------------------------------------------------
+# 10
+
+# Using deleted
+
+# Before state:
+# -------------
+#
+# vios_l2#show vlan
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 1 default active Gi0/1, Gi0/2
+# 10 vlan_10 active
+# 20 vlan_20 act/lshut
+# 30 vlan_30 sus/lshut
+# 1002 fddi-default act/unsup
+# 1003 token-ring-default act/unsup
+# 1004 fddinet-default act/unsup
+# 1005 trnet-default act/unsup
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 1 enet 100001 1500 - - - - - 0 0
+# 10 enet 100010 1500 - - - - - 0 0
+# 20 enet 100020 610 - - - - - 0 0
+# 30 enet 100030 1500 - - - - - 0 0
+# 1002 fddi 101002 1500 - - - - - 0 0
+# 1003 tr 101003 1500 - - - - - 0 0
+# 1004 fdnet 101004 1500 - - - ieee - 0 0
+# 1005 trnet 101005 1500 - - - ibm - 0 0
+#
+# Remote SPAN VLANs
+# ------------------------------------------------------------------------------
+# 10
+
+- name: Delete attributes of given VLANs
+ cisco.ios.ios_vlans:
+ config:
+ - vlan_id: 10
+ - vlan_id: 20
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios_l2#show vlan
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 1 default active Gi0/1, Gi0/2
+# 30 vlan_30 sus/lshut
+# 1002 fddi-default act/unsup
+# 1003 token-ring-default act/unsup
+# 1004 fddinet-default act/unsup
+# 1005 trnet-default act/unsup
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 1 enet 100001 1500 - - - - - 0 0
+# 30 enet 100030 1500 - - - - - 0 0
+# 1002 fddi 101002 1500 - - - - - 0 0
+# 1003 tr 101003 1500 - - - - - 0 0
+# 1004 fdnet 101004 1500 - - - ieee - 0 0
+# 1005 trnet 101005 1500 - - - ibm - 0 0
+
+# Using Deleted without any config passed
+#"(NOTE: This will delete all of configured vlans attributes)"
+
+# Before state:
+# -------------
+#
+# vios_l2#show vlan
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 1 default active Gi0/1, Gi0/2
+# 10 vlan_10 active
+# 20 vlan_20 act/lshut
+# 30 vlan_30 sus/lshut
+# 1002 fddi-default act/unsup
+# 1003 token-ring-default act/unsup
+# 1004 fddinet-default act/unsup
+# 1005 trnet-default act/unsup
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 1 enet 100001 1500 - - - - - 0 0
+# 10 enet 100010 1500 - - - - - 0 0
+# 20 enet 100020 610 - - - - - 0 0
+# 30 enet 100030 1500 - - - - - 0 0
+# 1002 fddi 101002 1500 - - - - - 0 0
+# 1003 tr 101003 1500 - - - - - 0 0
+# 1004 fdnet 101004 1500 - - - ieee - 0 0
+# 1005 trnet 101005 1500 - - - ibm - 0 0
+#
+# Remote SPAN VLANs
+# ------------------------------------------------------------------------------
+# 10
+
+- name: Delete attributes of ALL VLANs
+ cisco.ios.ios_vlans:
+ state: deleted
+
+# After state:
+# -------------
+#
+# vios_l2#show vlan
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 1 default active Gi0/1, Gi0/2
+# 1002 fddi-default act/unsup
+# 1003 token-ring-default act/unsup
+# 1004 fddinet-default act/unsup
+# 1005 trnet-default act/unsup
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 1 enet 100001 1500 - - - - - 0 0
+# 1002 fddi 101002 1500 - - - - - 0 0
+# 1003 tr 101003 1500 - - - - - 0 0
+# 1004 fdnet 101004 1500 - - - ieee - 0 0
+# 1005 trnet 101005 1500 - - - ibm - 0 0
+
+# Using Gathered
+
+# Before state:
+# -------------
+#
+# vios_l2#show vlan
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 1 default active Gi0/1, Gi0/2
+# 10 vlan_10 active
+# 20 vlan_20 act/lshut
+# 30 vlan_30 sus/lshut
+# 1002 fddi-default act/unsup
+# 1003 token-ring-default act/unsup
+# 1004 fddinet-default act/unsup
+# 1005 trnet-default act/unsup
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 1 enet 100001 1500 - - - - - 0 0
+# 10 enet 100010 1500 - - - - - 0 0
+# 20 enet 100020 610 - - - - - 0 0
+# 30 enet 100030 1500 - - - - - 0 0
+# 1002 fddi 101002 1500 - - - - - 0 0
+# 1003 tr 101003 1500 - - - - - 0 0
+# 1004 fdnet 101004 1500 - - - ieee - 0 0
+# 1005 trnet 101005 1500 - - - ibm - 0 0
+#
+# Remote SPAN VLANs
+# ------------------------------------------------------------------------------
+# 10
+
+- name: Gather listed vlans with provided configurations
+ cisco.ios.ios_vlans:
+ config:
+ state: gathered
+
+# Module Execution Result:
+# ------------------------
+#
+# "gathered": [
+# {
+# "mtu": 1500,
+# "name": "default",
+# "shutdown": "disabled",
+# "state": "active",
+# "vlan_id": 1
+# },
+# {
+# "mtu": 1500,
+# "name": "VLAN0010",
+# "shutdown": "disabled",
+# "state": "active",
+# "vlan_id": 10
+# },
+# {
+# "mtu": 1500,
+# "name": "VLAN0020",
+# "shutdown": "disabled",
+# "state": "active",
+# "vlan_id": 20
+# },
+# {
+# "mtu": 1500,
+# "name": "VLAN0030",
+# "shutdown": "disabled",
+# "state": "active",
+# "vlan_id": 30
+# },
+# {
+# "mtu": 1500,
+# "name": "fddi-default",
+# "shutdown": "enabled",
+# "state": "active",
+# "vlan_id": 1002
+# },
+# {
+# "mtu": 1500,
+# "name": "token-ring-default",
+# "shutdown": "enabled",
+# "state": "active",
+# "vlan_id": 1003
+# },
+# {
+# "mtu": 1500,
+# "name": "fddinet-default",
+# "shutdown": "enabled",
+# "state": "active",
+# "vlan_id": 1004
+# },
+# {
+# "mtu": 1500,
+# "name": "trnet-default",
+# "shutdown": "enabled",
+# "state": "active",
+# "vlan_id": 1005
+# }
+# ]
+
+# After state:
+# ------------
+#
+# vios_l2#show vlan
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 1 default active Gi0/1, Gi0/2
+# 10 vlan_10 active
+# 20 vlan_20 act/lshut
+# 30 vlan_30 sus/lshut
+# 1002 fddi-default act/unsup
+# 1003 token-ring-default act/unsup
+# 1004 fddinet-default act/unsup
+# 1005 trnet-default act/unsup
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 1 enet 100001 1500 - - - - - 0 0
+# 10 enet 100010 1500 - - - - - 0 0
+# 20 enet 100020 610 - - - - - 0 0
+# 30 enet 100030 1500 - - - - - 0 0
+# 1002 fddi 101002 1500 - - - - - 0 0
+# 1003 tr 101003 1500 - - - - - 0 0
+# 1004 fdnet 101004 1500 - - - ieee - 0 0
+# 1005 trnet 101005 1500 - - - ibm - 0 0
+#
+# Remote SPAN VLANs
+# ------------------------------------------------------------------------------
+# 10
+
+# Using Rendered
+
+- name: Render the commands for provided configuration
+ cisco.ios.ios_vlans:
+ config:
+ - name: Vlan_10
+ vlan_id: 10
+ state: active
+ shutdown: disabled
+ remote_span: 10
+ - name: Vlan_20
+ vlan_id: 20
+ mtu: 610
+ state: active
+ shutdown: enabled
+ - name: Vlan_30
+ vlan_id: 30
+ state: suspend
+ shutdown: enabled
+ state: rendered
+
+# Module Execution Result:
+# ------------------------
+#
+# "rendered": [
+# "vlan 10",
+# "name Vlan_10",
+# "state active",
+# "remote-span",
+# "no shutdown",
+# "vlan 20",
+# "name Vlan_20",
+# "state active",
+# "mtu 610",
+# "shutdown",
+# "vlan 30",
+# "name Vlan_30",
+# "state suspend",
+# "shutdown"
+# ]
+
+# Using Parsed
+
+# File: parsed.cfg
+# ----------------
+#
+# VLAN Name Status Ports
+# ---- -------------------------------- --------- -------------------------------
+# 1 default active Gi0/1, Gi0/2
+# 10 vlan_10 active
+# 20 vlan_20 act/lshut
+# 30 vlan_30 sus/lshut
+# 1002 fddi-default act/unsup
+# 1003 token-ring-default act/unsup
+# 1004 fddinet-default act/unsup
+# 1005 trnet-default act/unsup
+#
+# VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+# ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+# 1 enet 100001 1500 - - - - - 0 0
+# 10 enet 100010 1500 - - - - - 0 0
+# 20 enet 100020 1500 - - - - - 0 0
+# 30 enet 100030 1500 - - - - - 0 0
+# 1002 fddi 101002 1500 - - - - - 0 0
+# 1003 tr 101003 1500 - - - - - 0 0
+# 1004 fdnet 101004 1500 - - - ieee - 0 0
+# 1005 trnet 101005 1500 - - - ibm - 0 0
+
+- name: Parse the commands for provided configuration
+ cisco.ios.ios_vlans:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+
+# Module Execution Result:
+# ------------------------
+#
+# "parsed": [
+# {
+# "mtu": 1500,
+# "name": "default",
+# "shutdown": "disabled",
+# "state": "active",
+# "vlan_id": 1
+# },
+# {
+# "mtu": 1500,
+# "name": "vlan_10",
+# "shutdown": "disabled",
+# "state": "active",
+# "vlan_id": 10
+# },
+# {
+# "mtu": 1500,
+# "name": "vlan_20",
+# "shutdown": "enabled",
+# "state": "active",
+# "vlan_id": 20
+# },
+# {
+# "mtu": 1500,
+# "name": "vlan_30",
+# "shutdown": "enabled",
+# "state": "suspend",
+# "vlan_id": 30
+# },
+# {
+# "mtu": 1500,
+# "name": "fddi-default",
+# "shutdown": "enabled",
+# "state": "active",
+# "vlan_id": 1002
+# },
+# {
+# "mtu": 1500,
+# "name": "token-ring-default",
+# "shutdown": "enabled",
+# "state": "active",
+# "vlan_id": 1003
+# },
+# {
+# "mtu": 1500,
+# "name": "fddinet-default",
+# "shutdown": "enabled",
+# "state": "active",
+# "vlan_id": 1004
+# },
+# {
+# "mtu": 1500,
+# "name": "trnet-default",
+# "shutdown": "enabled",
+# "state": "active",
+# "vlan_id": 1005
+# }
+# ]
+
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['vlan 20', 'name vlan_20', 'mtu 600', 'remote-span']
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.vlans.vlans import (
+ VlansArgs,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.vlans.vlans import (
+ Vlans,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=VlansArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = Vlans(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_vrf.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_vrf.py
new file mode 100644
index 00000000..b86df5a0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/modules/ios_vrf.py
@@ -0,0 +1,750 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: ios_vrf
+author: Peter Sprygada (@privateip)
+short_description: Manage the collection of VRF definitions on Cisco IOS devices
+description:
+- This module provides declarative management of VRF definitions on Cisco IOS devices. It
+ allows playbooks to manage individual or the entire VRF collection. It also supports
+ purging VRF definitions from the configuration that are not explicitly defined.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.ios.ios
+notes:
+- Tested against IOS 15.6
+options:
+ vrfs:
+ description:
+ - The set of VRF definition objects to be configured on the remote IOS device. Ths
+ list entries can either be the VRF name or a hash of VRF definitions and attributes. This
+ argument is mutually exclusive with the C(name) argument.
+ type: list
+ elements: raw
+ name:
+ description:
+ - The name of the VRF definition to be managed on the remote IOS device. The
+ VRF definition name is an ASCII string name used to uniquely identify the VRF. This
+ argument is mutually exclusive with the C(vrfs) argument
+ type: str
+ description:
+ description:
+ - Provides a short description of the VRF definition in the current active configuration. The
+ VRF definition value accepts alphanumeric characters used to provide additional
+ information about the VRF.
+ type: str
+ rd:
+ description:
+ - The router-distinguisher value uniquely identifies the VRF to routing processes
+ on the remote IOS system. The RD value takes the form of C(A:B) where C(A)
+ and C(B) are both numeric values.
+ type: str
+ interfaces:
+ description:
+ - Identifies the set of interfaces that should be configured in the VRF. Interfaces
+ must be routed interfaces in order to be placed into a VRF.
+ type: list
+ elements: str
+ associated_interfaces:
+ description:
+ - This is a intent option and checks the operational state of the for given vrf
+ C(name) for associated interfaces. If the value in the C(associated_interfaces)
+ does not match with the operational state of vrf interfaces on device it will
+ result in failure.
+ type: list
+ elements: str
+ delay:
+ description:
+ - Time in seconds to wait before checking for the operational state on remote
+ device.
+ default: 10
+ type: int
+ purge:
+ description:
+ - Instructs the module to consider the VRF definition absolute. It will remove
+ any previously configured VRFs on the device.
+ default: false
+ type: bool
+ state:
+ description:
+ - Configures the state of the VRF definition as it relates to the device operational
+ configuration. When set to I(present), the VRF should be configured in the
+ device active configuration and when set to I(absent) the VRF should not be
+ in the device active configuration
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+ route_both:
+ description:
+ - Adds an export and import list of extended route target communities to the VRF.
+ type: list
+ elements: str
+ route_export:
+ description:
+ - Adds an export list of extended route target communities to the VRF.
+ type: list
+ elements: str
+ route_import:
+ description:
+ - Adds an import list of extended route target communities to the VRF.
+ type: list
+ elements: str
+ route_both_ipv4:
+ description:
+ - Adds an export and import list of extended route target communities in address-family
+ configuration submode to the VRF.
+ type: list
+ elements: str
+ route_export_ipv4:
+ description:
+ - Adds an export list of extended route target communities in address-family configuration
+ submode to the VRF.
+ type: list
+ elements: str
+ route_import_ipv4:
+ description:
+ - Adds an import list of extended route target communities in address-family configuration
+ submode to the VRF.
+ type: list
+ elements: str
+ route_both_ipv6:
+ description:
+ - Adds an export and import list of extended route target communities in address-family
+ configuration submode to the VRF.
+ type: list
+ elements: str
+ route_export_ipv6:
+ description:
+ - Adds an export list of extended route target communities in address-family configuration
+ submode to the VRF.
+ type: list
+ elements: str
+ route_import_ipv6:
+ description:
+ - Adds an import list of extended route target communities in address-family configuration
+ submode to the VRF.
+ type: list
+ elements: str
+"""
+EXAMPLES = """
+- name: configure a vrf named management
+ cisco.ios.ios_vrf:
+ name: management
+ description: oob mgmt vrf
+ interfaces:
+ - Management1
+
+- name: remove a vrf named test
+ cisco.ios.ios_vrf:
+ name: test
+ state: absent
+
+- name: configure set of VRFs and purge any others
+ cisco.ios.ios_vrf:
+ vrfs:
+ - red
+ - blue
+ - green
+ purge: yes
+
+- name: Creates a list of import RTs for the VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_import
+ rd: 1:100
+ route_import:
+ - 1:100
+ - 3:100
+
+- name: Creates a list of import RTs in address-family configuration submode for the
+ VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_import_ipv4
+ rd: 1:100
+ route_import_ipv4:
+ - 1:100
+ - 3:100
+
+- name: Creates a list of import RTs in address-family configuration submode for the
+ VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_import_ipv6
+ rd: 1:100
+ route_import_ipv6:
+ - 1:100
+ - 3:100
+
+- name: Creates a list of export RTs for the VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_export
+ rd: 1:100
+ route_export:
+ - 1:100
+ - 3:100
+
+- name: Creates a list of export RTs in address-family configuration submode for the
+ VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_export_ipv4
+ rd: 1:100
+ route_export_ipv4:
+ - 1:100
+ - 3:100
+
+- name: Creates a list of export RTs in address-family configuration submode for the
+ VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_export_ipv6
+ rd: 1:100
+ route_export_ipv6:
+ - 1:100
+ - 3:100
+
+- name: Creates a list of import and export route targets for the VRF with the same
+ parameters
+ cisco.ios.ios_vrf:
+ name: test_both
+ rd: 1:100
+ route_both:
+ - 1:100
+ - 3:100
+
+- name: Creates a list of import and export route targets in address-family configuration
+ submode for the VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_both_ipv4
+ rd: 1:100
+ route_both_ipv4:
+ - 1:100
+ - 3:100
+
+- name: Creates a list of import and export route targets in address-family configuration
+ submode for the VRF with the same parameters
+ cisco.ios.ios_vrf:
+ name: test_both_ipv6
+ rd: 1:100
+ route_both_ipv6:
+ - 1:100
+ - 3:100
+"""
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - vrf definition ansible
+ - description management vrf
+ - rd: 1:100
+start:
+ description: The time the job started
+ returned: always
+ type: str
+ sample: "2016-11-16 10:38:15.126146"
+end:
+ description: The time the job ended
+ returned: always
+ type: str
+ sample: "2016-11-16 10:38:25.595612"
+delta:
+ description: The time elapsed to perform all operations
+ returned: always
+ type: str
+ sample: "0:00:10.469466\"
+"""
+import re
+import time
+from functools import partial
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.connection import exec_command
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ load_config,
+ get_config,
+)
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.ios import (
+ ios_argument_spec,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+)
+from ansible.module_utils.six import iteritems
+
+
+def get_interface_type(interface):
+ if interface.upper().startswith("ET"):
+ return "ethernet"
+ elif interface.upper().startswith("VL"):
+ return "svi"
+ elif interface.upper().startswith("LO"):
+ return "loopback"
+ elif interface.upper().startswith("MG"):
+ return "management"
+ elif interface.upper().startswith("MA"):
+ return "management"
+ elif interface.upper().startswith("PO"):
+ return "portchannel"
+ elif interface.upper().startswith("NV"):
+ return "nve"
+ else:
+ return "unknown"
+
+
+def add_command_to_vrf(name, cmd, commands):
+ if "vrf definition %s" % name not in commands:
+ commands.extend(["vrf definition %s" % name])
+ commands.append(cmd)
+
+
+def map_obj_to_commands(updates, module):
+ commands = list()
+ for update in updates:
+ want, have = update
+
+ def needs_update(want, have, x):
+ if isinstance(want.get(x), list) and isinstance(have.get(x), list):
+ return (
+ want.get(x)
+ and want.get(x) != have.get(x)
+ and not all(elem in have.get(x) for elem in want.get(x))
+ )
+ return want.get(x) and want.get(x) != have.get(x)
+
+ if want["state"] == "absent":
+ commands.append("no vrf definition %s" % want["name"])
+ continue
+ if not have.get("state"):
+ commands.extend(["vrf definition %s" % want["name"]])
+ ipv6 = (
+ len(
+ [
+ k
+ for k, v in module.params.items()
+ if (k.endswith("_ipv6") or k.endswith("_both")) and v
+ ]
+ )
+ != 0
+ )
+ ipv4 = (
+ len(
+ [
+ k
+ for k, v in module.params.items()
+ if (k.endswith("_ipv4") or k.endswith("_both")) and v
+ ]
+ )
+ != 0
+ )
+ if ipv4:
+ commands.extend(["address-family ipv4", "exit"])
+ if ipv6:
+ commands.extend(["address-family ipv6", "exit"])
+ if needs_update(want, have, "description"):
+ cmd = "description %s" % want["description"]
+ add_command_to_vrf(want["name"], cmd, commands)
+ if needs_update(want, have, "rd"):
+ cmd = "rd %s" % want["rd"]
+ add_command_to_vrf(want["name"], cmd, commands)
+ if needs_update(want, have, "route_import"):
+ for route in want["route_import"]:
+ cmd = "route-target import %s" % route
+ add_command_to_vrf(want["name"], cmd, commands)
+ if needs_update(want, have, "route_export"):
+ for route in want["route_export"]:
+ cmd = "route-target export %s" % route
+ add_command_to_vrf(want["name"], cmd, commands)
+ if needs_update(want, have, "route_import_ipv4"):
+ cmd = "address-family ipv4"
+ add_command_to_vrf(want["name"], cmd, commands)
+ for route in want["route_import_ipv4"]:
+ cmd = "route-target import %s" % route
+ add_command_to_vrf(want["name"], cmd, commands)
+ cmd = "exit-address-family"
+ add_command_to_vrf(want["name"], cmd, commands)
+ if needs_update(want, have, "route_export_ipv4"):
+ cmd = "address-family ipv4"
+ add_command_to_vrf(want["name"], cmd, commands)
+ for route in want["route_export_ipv4"]:
+ cmd = "route-target export %s" % route
+ add_command_to_vrf(want["name"], cmd, commands)
+ cmd = "exit-address-family"
+ add_command_to_vrf(want["name"], cmd, commands)
+ if needs_update(want, have, "route_import_ipv6"):
+ cmd = "address-family ipv6"
+ add_command_to_vrf(want["name"], cmd, commands)
+ for route in want["route_import_ipv6"]:
+ cmd = "route-target import %s" % route
+ add_command_to_vrf(want["name"], cmd, commands)
+ cmd = "exit-address-family"
+ add_command_to_vrf(want["name"], cmd, commands)
+ if needs_update(want, have, "route_export_ipv6"):
+ cmd = "address-family ipv6"
+ add_command_to_vrf(want["name"], cmd, commands)
+ for route in want["route_export_ipv6"]:
+ cmd = "route-target export %s" % route
+ add_command_to_vrf(want["name"], cmd, commands)
+ cmd = "exit-address-family"
+ add_command_to_vrf(want["name"], cmd, commands)
+ if want["interfaces"] is not None:
+ for intf in set(have.get("interfaces", [])).difference(
+ want["interfaces"]
+ ):
+ commands.extend(
+ [
+ "interface %s" % intf,
+ "no vrf forwarding %s" % want["name"],
+ ]
+ )
+ for intf in set(want["interfaces"]).difference(
+ have.get("interfaces", [])
+ ):
+ cfg = get_config(module)
+ configobj = NetworkConfig(indent=1, contents=cfg)
+ children = configobj["interface %s" % intf].children
+ intf_config = "\n".join(children)
+ commands.extend(
+ ["interface %s" % intf, "vrf forwarding %s" % want["name"]]
+ )
+ match = re.search("ip address .+", intf_config, re.M)
+ if match:
+ commands.append(match.group())
+ return commands
+
+
+def parse_description(configobj, name):
+ cfg = configobj["vrf definition %s" % name]
+ cfg = "\n".join(cfg.children)
+ match = re.search("description (.+)$", cfg, re.M)
+ if match:
+ return match.group(1)
+
+
+def parse_rd(configobj, name):
+ cfg = configobj["vrf definition %s" % name]
+ cfg = "\n".join(cfg.children)
+ match = re.search("rd (.+)$", cfg, re.M)
+ if match:
+ return match.group(1)
+
+
+def parse_interfaces(configobj):
+ vrf_cfg = "vrf forwarding"
+ interfaces = dict()
+ for intf in set(re.findall("^interface .+", str(configobj), re.M)):
+ for line in configobj[intf].children:
+ if vrf_cfg in line:
+ try:
+ interfaces[line.split()[-1]].append(intf.split(" ")[1])
+ except KeyError:
+ interfaces[line.split()[-1]] = [intf.split(" ")[1]]
+ return interfaces
+
+
+def parse_import(configobj, name):
+ cfg = configobj["vrf definition %s" % name]
+ cfg = "\n".join(cfg.children)
+ matches = re.findall("route-target\\s+import\\s+(.+)", cfg, re.M)
+ return matches
+
+
+def parse_export(configobj, name):
+ cfg = configobj["vrf definition %s" % name]
+ cfg = "\n".join(cfg.children)
+ matches = re.findall("route-target\\s+export\\s+(.+)", cfg, re.M)
+ return matches
+
+
+def parse_both(configobj, name, address_family="global"):
+ rd_pattern = re.compile("(?P<rd>.+:.+)")
+ matches = list()
+ export_match = None
+ import_match = None
+ if address_family == "global":
+ export_match = parse_export(configobj, name)
+ import_match = parse_import(configobj, name)
+ elif address_family == "ipv4":
+ export_match = parse_export_ipv4(configobj, name)
+ import_match = parse_import_ipv4(configobj, name)
+ elif address_family == "ipv6":
+ export_match = parse_export_ipv6(configobj, name)
+ import_match = parse_import_ipv6(configobj, name)
+ if import_match and export_match:
+ for ex in export_match:
+ exrd = rd_pattern.search(ex)
+ exrd = exrd.groupdict().get("rd")
+ for im in import_match:
+ imrd = rd_pattern.search(im)
+ imrd = imrd.groupdict().get("rd")
+ if exrd == imrd:
+ matches.extend([exrd]) if exrd not in matches else None
+ matches.extend([imrd]) if imrd not in matches else None
+ return matches
+
+
+def parse_import_ipv4(configobj, name):
+ cfg = configobj["vrf definition %s" % name]
+ try:
+ subcfg = cfg["address-family ipv4"]
+ subcfg = "\n".join(subcfg.children)
+ matches = re.findall("route-target\\s+import\\s+(.+)", subcfg, re.M)
+ return matches
+ except KeyError:
+ pass
+
+
+def parse_export_ipv4(configobj, name):
+ cfg = configobj["vrf definition %s" % name]
+ try:
+ subcfg = cfg["address-family ipv4"]
+ subcfg = "\n".join(subcfg.children)
+ matches = re.findall("route-target\\s+export\\s+(.+)", subcfg, re.M)
+ return matches
+ except KeyError:
+ pass
+
+
+def parse_import_ipv6(configobj, name):
+ cfg = configobj["vrf definition %s" % name]
+ try:
+ subcfg = cfg["address-family ipv6"]
+ subcfg = "\n".join(subcfg.children)
+ matches = re.findall("route-target\\s+import\\s+(.+)", subcfg, re.M)
+ return matches
+ except KeyError:
+ pass
+
+
+def parse_export_ipv6(configobj, name):
+ cfg = configobj["vrf definition %s" % name]
+ try:
+ subcfg = cfg["address-family ipv6"]
+ subcfg = "\n".join(subcfg.children)
+ matches = re.findall("route-target\\s+export\\s+(.+)", subcfg, re.M)
+ return matches
+ except KeyError:
+ pass
+
+
+def map_config_to_obj(module):
+ config = get_config(module)
+ configobj = NetworkConfig(indent=1, contents=config)
+ match = re.findall("^vrf definition (\\S+)", config, re.M)
+ if not match:
+ return list()
+ instances = list()
+ interfaces = parse_interfaces(configobj)
+ for item in set(match):
+ obj = {
+ "name": item,
+ "state": "present",
+ "description": parse_description(configobj, item),
+ "rd": parse_rd(configobj, item),
+ "interfaces": interfaces.get(item),
+ "route_import": parse_import(configobj, item),
+ "route_export": parse_export(configobj, item),
+ "route_both": parse_both(configobj, item),
+ "route_import_ipv4": parse_import_ipv4(configobj, item),
+ "route_export_ipv4": parse_export_ipv4(configobj, item),
+ "route_both_ipv4": parse_both(
+ configobj, item, address_family="ipv4"
+ ),
+ "route_import_ipv6": parse_import_ipv6(configobj, item),
+ "route_export_ipv6": parse_export_ipv6(configobj, item),
+ "route_both_ipv6": parse_both(
+ configobj, item, address_family="ipv6"
+ ),
+ }
+ instances.append(obj)
+ return instances
+
+
+def get_param_value(key, item, module):
+ # if key doesn't exist in the item, get it from module.params
+ if not item.get(key):
+ value = module.params[key]
+ # if key does exist, do a type check on it to validate it
+ else:
+ value_type = module.argument_spec[key].get("type", "str")
+ type_checker = module._CHECK_ARGUMENT_TYPES_DISPATCHER[value_type]
+ type_checker(item[key])
+ value = item[key]
+ # validate the param value (if validator func exists)
+ validator = globals().get("validate_%s" % key)
+ if validator:
+ validator(value, module)
+ return value
+
+
+def map_params_to_obj(module):
+ vrfs = module.params.get("vrfs")
+ if not vrfs:
+ if not module.params["name"] and module.params["purge"]:
+ return list()
+ elif not module.params["name"]:
+ module.fail_json(msg="name is required")
+ collection = [{"name": module.params["name"]}]
+ else:
+ collection = list()
+ for item in vrfs:
+ if not isinstance(item, dict):
+ collection.append({"name": item})
+ elif "name" not in item:
+ module.fail_json(msg="name is required")
+ else:
+ collection.append(item)
+ objects = list()
+ for item in collection:
+ get_value = partial(get_param_value, item=item, module=module)
+ item["description"] = get_value("description")
+ item["rd"] = get_value("rd")
+ item["interfaces"] = get_value("interfaces")
+ item["state"] = get_value("state")
+ item["route_import"] = get_value("route_import")
+ item["route_export"] = get_value("route_export")
+ item["route_both"] = get_value("route_both")
+ item["route_import_ipv4"] = get_value("route_import_ipv4")
+ item["route_export_ipv4"] = get_value("route_export_ipv4")
+ item["route_both_ipv4"] = get_value("route_both_ipv4")
+ item["route_import_ipv6"] = get_value("route_import_ipv6")
+ item["route_export_ipv6"] = get_value("route_export_ipv6")
+ item["route_both_ipv6"] = get_value("route_both_ipv6")
+ both_addresses_family = ["", "_ipv6", "_ipv4"]
+ for address_family in both_addresses_family:
+ if item["route_both%s" % address_family]:
+ if not item["route_export%s" % address_family]:
+ item["route_export%s" % address_family] = list()
+ if not item["route_import%s" % address_family]:
+ item["route_import%s" % address_family] = list()
+ item["route_export%s" % address_family].extend(
+ get_value("route_both%s" % address_family)
+ )
+ item["route_import%s" % address_family].extend(
+ get_value("route_both%s" % address_family)
+ )
+ item["associated_interfaces"] = get_value("associated_interfaces")
+ objects.append(item)
+ return objects
+
+
+def update_objects(want, have):
+ updates = list()
+ for entry in want:
+ item = next((i for i in have if i["name"] == entry["name"]), None)
+ if all((item is None, entry["state"] == "present")):
+ updates.append((entry, {}))
+ else:
+ for key, value in iteritems(entry):
+ if value:
+ try:
+ if isinstance(value, list):
+ if sorted(value) != sorted(item[key]):
+ if (entry, item) not in updates:
+ updates.append((entry, item))
+ elif value != item[key]:
+ if (entry, item) not in updates:
+ updates.append((entry, item))
+ except TypeError:
+ pass
+ return updates
+
+
+def check_declarative_intent_params(want, module, result):
+ if module.params["associated_interfaces"]:
+ if result["changed"]:
+ time.sleep(module.params["delay"])
+ name = module.params["name"]
+ rc, out, err = exec_command(
+ module, "show vrf | include {0}".format(name)
+ )
+ if rc == 0:
+ data = out.strip().split()
+ if not data:
+ return
+ vrf = data[0]
+ interface = data[-1]
+ for w in want:
+ if w["name"] == vrf:
+ if w.get("associated_interfaces") is None:
+ continue
+ for i in w["associated_interfaces"]:
+ if get_interface_type(i) is not get_interface_type(
+ interface
+ ):
+ module.fail_json(
+ msg="Interface %s not configured on vrf %s"
+ % (interface, name)
+ )
+
+
+def main():
+ """ main entry point for module execution
+ """
+ argument_spec = dict(
+ vrfs=dict(type="list", elements="raw"),
+ name=dict(),
+ description=dict(),
+ rd=dict(),
+ route_export=dict(type="list", elements="str"),
+ route_import=dict(type="list", elements="str"),
+ route_both=dict(type="list", elements="str"),
+ route_export_ipv4=dict(type="list", elements="str"),
+ route_import_ipv4=dict(type="list", elements="str"),
+ route_both_ipv4=dict(type="list", elements="str"),
+ route_export_ipv6=dict(type="list", elements="str"),
+ route_import_ipv6=dict(type="list", elements="str"),
+ route_both_ipv6=dict(type="list", elements="str"),
+ interfaces=dict(type="list", elements="str"),
+ associated_interfaces=dict(type="list", elements="str"),
+ delay=dict(default=10, type="int"),
+ purge=dict(type="bool", default=False),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+ argument_spec.update(ios_argument_spec)
+ mutually_exclusive = [("name", "vrfs")]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ result = {"changed": False}
+ warnings = list()
+ result["warnings"] = warnings
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands(update_objects(want, have), module)
+ if module.params["purge"]:
+ want_vrfs = [x["name"] for x in want]
+ have_vrfs = [x["name"] for x in have]
+ for item in set(have_vrfs).difference(want_vrfs):
+ cmd = "no vrf definition %s" % item
+ if cmd not in commands:
+ commands.append(cmd)
+ result["commands"] = commands
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+ check_declarative_intent_params(want, module, result)
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/terminal/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/terminal/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/terminal/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/plugins/terminal/ios.py b/collections-debian-merged/ansible_collections/cisco/ios/plugins/terminal/ios.py
new file mode 100644
index 00000000..f519952c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/plugins/terminal/ios.py
@@ -0,0 +1,116 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+import re
+
+from ansible.errors import AnsibleConnectionFailure
+from ansible.module_utils._text import to_text, to_bytes
+from ansible.plugins.terminal import TerminalBase
+from ansible.utils.display import Display
+
+display = Display()
+
+
+class TerminalModule(TerminalBase):
+
+ terminal_stdout_re = [
+ re.compile(br"[\r\n]?[\w\+\-\.:\/\[\]]+(?:\([^\)]+\)){0,3}(?:[>#]) ?$")
+ ]
+
+ terminal_stderr_re = [
+ re.compile(br"% ?Error"),
+ # re.compile(br"^% \w+", re.M),
+ re.compile(br"% ?Bad secret"),
+ re.compile(br"[\r\n%] Bad passwords"),
+ re.compile(br"invalid input", re.I),
+ re.compile(br"(?:incomplete|ambiguous) command", re.I),
+ re.compile(br"connection timed out", re.I),
+ re.compile(br"[^\r\n]+ not found"),
+ re.compile(br"'[^']' +returned error code: ?\d+"),
+ re.compile(br"Bad mask", re.I),
+ re.compile(br"% ?(\S+) ?overlaps with ?(\S+)", re.I),
+ re.compile(br"[%\S] ?Error: ?[\s]+", re.I),
+ re.compile(br"[%\S] ?Informational: ?[\s]+", re.I),
+ re.compile(br"Command authorization failed"),
+ re.compile(br"Command Rejected: ?[\s]+", re.I),
+ ]
+
+ def on_open_shell(self):
+ try:
+ self._exec_cli_command(b"terminal length 0")
+ except AnsibleConnectionFailure:
+ raise AnsibleConnectionFailure("unable to set terminal parameters")
+
+ try:
+ self._exec_cli_command(b"terminal width 512")
+ try:
+ self._exec_cli_command(b"terminal width 0")
+ except AnsibleConnectionFailure:
+ pass
+ except AnsibleConnectionFailure:
+ display.display(
+ "WARNING: Unable to set terminal width, command responses may be truncated"
+ )
+
+ def on_become(self, passwd=None):
+ if self._get_prompt().endswith(b"#"):
+ return
+
+ cmd = {u"command": u"enable"}
+ if passwd:
+ # Note: python-3.5 cannot combine u"" and r"" together. Thus make
+ # an r string and use to_text to ensure it's text on both py2 and py3.
+ cmd[u"prompt"] = to_text(
+ r"[\r\n]?(?:.*)?[Pp]assword: ?$", errors="surrogate_or_strict"
+ )
+ cmd[u"answer"] = passwd
+ cmd[u"prompt_retry_check"] = True
+ try:
+ self._exec_cli_command(
+ to_bytes(json.dumps(cmd), errors="surrogate_or_strict")
+ )
+ prompt = self._get_prompt()
+ if prompt is None or not prompt.endswith(b"#"):
+ raise AnsibleConnectionFailure(
+ "failed to elevate privilege to enable mode still at prompt [%s]"
+ % prompt
+ )
+ except AnsibleConnectionFailure as e:
+ prompt = self._get_prompt()
+ raise AnsibleConnectionFailure(
+ "unable to elevate privilege to enable mode, at prompt [%s] with error: %s"
+ % (prompt, e.message)
+ )
+
+ def on_unbecome(self):
+ prompt = self._get_prompt()
+ if prompt is None:
+ # if prompt is None most likely the terminal is hung up at a prompt
+ return
+
+ if b"(config" in prompt:
+ self._exec_cli_command(b"end")
+ self._exec_cli_command(b"disable")
+
+ elif prompt.endswith(b"#"):
+ self._exec_cli_command(b"disable")
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/requirements.txt b/collections-debian-merged/ansible_collections/cisco/ios/requirements.txt
new file mode 100644
index 00000000..e98b9313
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/requirements.txt
@@ -0,0 +1,2 @@
+ansible-pylibssh
+paramiko
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/test-requirements.txt b/collections-debian-merged/ansible_collections/cisco/ios/test-requirements.txt
new file mode 100644
index 00000000..fa041776
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/test-requirements.txt
@@ -0,0 +1,7 @@
+black==19.3b0 ; python_version > '3.5'
+flake8
+mock
+pexpect
+pytest-xdist
+yamllint
+coverage==4.5.4
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/.gitignore b/collections-debian-merged/ansible_collections/cisco/ios/tests/.gitignore
new file mode 100644
index 00000000..ea1472ec
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/.gitignore
@@ -0,0 +1 @@
+output/
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/network-integration.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/network-integration.cfg
new file mode 100644
index 00000000..d12c1efe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/network-integration.cfg
@@ -0,0 +1,4 @@
+[persistent_connection]
+command_timeout = 100
+connect_timeout = 100
+connect_retry_timeout = 100
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/target-prefixes.network b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/target-prefixes.network
new file mode 100644
index 00000000..d99afd61
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/target-prefixes.network
@@ -0,0 +1 @@
+ios \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..1462c135
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/_parsed.cfg
@@ -0,0 +1,8 @@
+interface GigabitEthernet0/1
+ip access-group 110 in
+ip access-group 123 out
+ipv6 traffic-filter temp_v6 in
+ipv6 traffic-filter test_v6 out
+interface GigabitEthernet0/2
+ip access-group 110 in
+ip access-group 123 out
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..ad7ca4ac
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,9 @@
+---
+- name: Populate Config
+ vars:
+ lines: "interface GigabitEthernet 0/1\nip access-group 110 in\nip access-group\
+ \ 123 out\nipv6 traffic-filter temp_v6 in\nipv6 traffic-filter test_v6 out\n\
+ interface GigabitEthernet 0/2\nip access-group 110 in\nip access-group 123\
+ \ out\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..b5c69165
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,9 @@
+---
+- name: Remove Config
+ vars:
+ lines: "interface GigabitEthernet 0/1\nno ip access-group 110 in\nno ip access-group\
+ \ 100 out\nno ip access-group 123 out\nno ipv6 traffic-filter temp_v6 in\n\
+ no ipv6 traffic-filter test_v6 out\ninterface GigabitEthernet 0/2\nno ip access-group\
+ \ 110 in\nno ip access-group 123 out\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..caa03991
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,39 @@
+---
+- debug:
+ msg: Start ios_acl_interfaces deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete module attributes of given Interface.
+ register: result
+ cisco.ios.ios_acl_interfaces:
+ config:
+
+ - name: GigabitEthernet0/1
+ state: deleted
+
+ - assert:
+ that:
+ - result.commands|length == 5
+ - result.changed == true
+ - result.commands|symmetric_difference(deleted.commands) == []
+
+ - name: Delete module attributes of given Interface (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_acl_interfaces:
+ config:
+
+ - name: GigabitEthernet0/1
+ state: deleted
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..1a931456
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START ios_acl_interfaces empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_acl_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_acl_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_acl_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_acl_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_acl_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..56de45dd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,23 @@
+---
+- debug:
+ msg: START ios_acl_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_acl_interfaces:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - gathered['config'] | symmetric_difference(result.gathered) == []
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..93c8e409
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,66 @@
+---
+- debug:
+ msg: Start ios_acl_interfaces merged integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_acl_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: 110
+ direction: in
+
+ - name: 123
+ direction: out
+
+ - afi: ipv6
+ acls:
+
+ - name: temp_v6
+ direction: in
+
+ - name: test_v6
+ direction: out
+
+ - name: GigabitEthernet0/2
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: 110
+ direction: in
+
+ - name: 123
+ direction: out
+ state: merged
+
+ - assert:
+ that:
+ - result.commands|length == 8
+ - result.changed == true
+ - result.commands|symmetric_difference(merged.commands) == []
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_acl_interfaces: *id001
+
+ - assert:
+ that:
+ - result.commands|length == 0
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..7ccf928f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,47 @@
+---
+- debug:
+ msg: Start ios_acl_interfaces overridden integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device configuration of all acl_interfaces with provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_acl_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: 100
+ direction: out
+
+ - name: 110
+ direction: in
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 8
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Override device configuration of all acl_interfaces with provided configuration
+ (IDEMPOTENT)
+ become: true
+ register: result
+ cisco.ios.ios_acl_interfaces: *id001
+
+ - assert:
+ that:
+ - result.commands|length == 0
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..ded11455
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START ios_acl_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_acl_interfaces:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+- assert:
+ that:
+ - result.changed == false
+ - parsed['config']|symmetric_difference(result.parsed) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..13c626eb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,51 @@
+---
+- debug:
+ msg: Start ios_acl_interfaces rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+
+ - name: Render the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_acl_interfaces:
+ config:
+
+ - name: GigabitEthernet0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: 110
+ direction: in
+
+ - name: 123
+ direction: out
+
+ - afi: ipv6
+ acls:
+
+ - name: test_v6
+ direction: out
+
+ - name: temp_v6
+ direction: in
+
+ - name: GigabitEthernet0/2
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: 110
+ direction: in
+
+ - name: 123
+ direction: out
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..53c8cad7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,48 @@
+---
+- debug:
+ msg: Start ios_acl_interfaces replced integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device configuration of listed acl_interfaces with provided
+ configuration
+ become: true
+ register: result
+ cisco.ios.ios_acl_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: 100
+ direction: out
+
+ - name: 110
+ direction: in
+ state: replaced
+
+ - assert:
+ that:
+ - result.commands|length == 5
+ - result.changed == true
+ - result.commands|symmetric_difference(replaced.commands) == []
+
+ - name: Replaces device configuration of listed acl_interfaces with provided
+ configuration (IDEMPOTENT)
+ become: true
+ register: result
+ cisco.ios.ios_acl_interfaces: *id001
+
+ - assert:
+ that:
+ - result.commands|length == 0
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..868600a2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,94 @@
+---
+- debug:
+ msg: START ios_acl_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.ios.ios_acl_interfaces:
+ config:
+
+ - name: GigabitEthernet0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: 110
+ direction: in
+
+ - name: 123
+ direction: out
+
+ - afi: ipv6
+ acls:
+
+ - name: temp_v6
+ direction: in
+
+ - name: test_v6
+ direction: out
+
+ - name: GigabitEthernet0/2
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: 110
+ direction: in
+
+ - name: 123
+ direction: out
+ state: merged
+
+ - name: Gather acl interfaces facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - acl_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.ios.ios_acl_interfaces:
+ config:
+
+ - name: GigabitEthernet0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: 100
+ direction: out
+
+ - name: 110
+ direction: in
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 8
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.ios.ios_acl_interfaces:
+ config: "{{ ansible_facts['network_resources']['acl_interfaces'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 8
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/vars/main.yaml
new file mode 100644
index 00000000..3ed2a0a1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acl_interfaces/vars/main.yaml
@@ -0,0 +1,97 @@
+---
+interfaces:
+ int1: GigabitEthernet0/1
+ int2: GigabitEthernet0/2
+merged:
+ commands:
+ - interface GigabitEthernet0/1
+ - ip access-group 110 in
+ - ip access-group 123 out
+ - ipv6 traffic-filter temp_v6 in
+ - ipv6 traffic-filter test_v6 out
+ - interface GigabitEthernet0/2
+ - ip access-group 110 in
+ - ip access-group 123 out
+replaced:
+ commands:
+ - interface GigabitEthernet0/1
+ - no ip access-group 123 out
+ - no ipv6 traffic-filter temp_v6 in
+ - no ipv6 traffic-filter test_v6 out
+ - ip access-group 100 out
+overridden:
+ commands:
+ - interface GigabitEthernet0/1
+ - no ip access-group 123 out
+ - no ipv6 traffic-filter test_v6 out
+ - no ipv6 traffic-filter temp_v6 in
+ - ip access-group 100 out
+ - interface GigabitEthernet0/2
+ - no ip access-group 110 in
+ - no ip access-group 123 out
+deleted:
+ commands:
+ - interface GigabitEthernet0/1
+ - no ip access-group 110 in
+ - no ip access-group 123 out
+ - no ipv6 traffic-filter temp_v6 in
+ - no ipv6 traffic-filter test_v6 out
+gathered:
+ config:
+ - name: GigabitEthernet0/0
+ - access_groups:
+ - acls:
+ - direction: in
+ name: '110'
+ - direction: out
+ name: '123'
+ afi: ipv4
+ - acls:
+ - direction: in
+ name: temp_v6
+ - direction: out
+ name: test_v6
+ afi: ipv6
+ name: GigabitEthernet0/1
+ - access_groups:
+ - acls:
+ - direction: in
+ name: '110'
+ - direction: out
+ name: '123'
+ afi: ipv4
+ name: GigabitEthernet0/2
+parsed:
+ config:
+ - access_groups:
+ - acls:
+ - direction: in
+ name: '110'
+ - direction: out
+ name: '123'
+ afi: ipv4
+ - acls:
+ - direction: in
+ name: temp_v6
+ - direction: out
+ name: test_v6
+ afi: ipv6
+ name: GigabitEthernet0/1
+ - access_groups:
+ - acls:
+ - direction: in
+ name: '110'
+ - direction: out
+ name: '123'
+ afi: ipv4
+ name: GigabitEthernet0/2
+rtt:
+ commands:
+ - interface GigabitEthernet0/1
+ - no ip access-group 100 out
+ - ip access-group 123 out
+ - ipv6 traffic-filter temp_v6 in
+ - ipv6 traffic-filter test_v6 out
+ - interface GigabitEthernet0/2
+ - ip access-group 110 in
+ - ip access-group 123 out
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..08a88445
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/_parsed.cfg
@@ -0,0 +1,9 @@
+Extended IP access list 110
+ 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10
+Extended IP access list 123
+ 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+ 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+Extended IP access list test_acl
+ 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+IPv6 access list R1_TRAFFIC
+ deny tcp any eq www any eq telnet ack dscp af11 sequence 10 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..6bc193c3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/_populate_config.yaml
@@ -0,0 +1,12 @@
+---
+- name: Populate Config
+ vars:
+ lines: "ip access-list extended test_acl\ndeny tcp 192.0.2.0 0.0.0.255 192.0.3.0\
+ \ 0.0.0.255 eq www fin option traceroute ttl eq 10\nip access-list extended\
+ \ 110\ndeny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl\
+ \ eq 10\nip access-list extended 123\ndeny tcp 198.51.100.0 0.0.0.255 198.51.101.0\
+ \ 0.0.0.255 eq telnet ack tos 12\ndeny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255\
+ \ eq www ack dscp ef ttl lt 20\nipv6 access-list R1_TRAFFIC\ndeny tcp any\
+ \ eq www any eq telnet ack dscp af11\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..1a9240db
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/_remove_config.yaml
@@ -0,0 +1,8 @@
+---
+- name: Remove Config
+ vars:
+ lines: "no ip access-list standard std_acl\nno ip access-list extended test_acl\n\
+ no ip access-list extended 110\nno ip access-list extended 123\nno ip access-list\
+ \ extended 150\nno ipv6 access-list R1_TRAFFIC\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/deleted.yaml
new file mode 100644
index 00000000..556f33ea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/deleted.yaml
@@ -0,0 +1,97 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_acls ansible_connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete attributes of provided configured ACLs
+ register: result
+ cisco.ios.ios_acls: &id001
+ config:
+ - afi: ipv4
+ acls:
+ - name: test_acl
+ - name: 110
+ - afi: ipv6
+ acls:
+ - name: R1_TRAFFIC
+ state: deleted
+
+ - assert:
+ that:
+ - result.commands|length == 3
+ - result.changed == true
+ - result.commands|symmetric_difference(deleted.commands) == []
+
+ - name: Delete configured ACLs (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_acls: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result.changed == false
+
+ - include_tasks: _remove_config.yaml
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete ACL attributes based on AFI
+ register: result
+ cisco.ios.ios_acls: &id002
+ config:
+
+ - afi: ipv4
+ state: deleted
+
+ - assert:
+ that:
+ - result.commands|length == 3
+ - result.changed == true
+ - result.commands|symmetric_difference(deleted_afi.commands) == []
+
+ - name: Delete ACL attributes based on AFI
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_acls: *id002
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result.changed == false
+
+ - include_tasks: _remove_config.yaml
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete ALL configured ACLs
+ register: result
+ cisco.ios.ios_acls: &id003
+ state: deleted
+
+ - assert:
+ that:
+ - result.commands|length == 4
+ - result.changed == true
+ - result.commands|symmetric_difference(deleted_all.commands) == []
+
+ - name: Delete ALL configured ACLs
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_acls: *id003
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..141e382f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START ios_acls empty_config.yaml integration tests on connection={{ ansible_connection
+ }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_acls:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_acls:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_acls:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_acls:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_acls:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/gathered.yaml
new file mode 100644
index 00000000..bc7a5a32
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/gathered.yaml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START ios_acls gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_acls:
+ config:
+ state: gathered
+
+ - assert:
+ that:
+ - gathered['config'] | symmetric_difference(result.gathered) == []
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/merged.yaml
new file mode 100644
index 00000000..38f05d39
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/merged.yaml
@@ -0,0 +1,142 @@
+---
+- debug:
+ msg: START Merged ios_acls state for integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ - name: Merge initial config with device configuration
+ cisco.ios.ios_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: test_acl
+ acl_type: extended
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp:
+ fin: true
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ option:
+ traceroute: true
+ ttl:
+ eq: 10
+ state: merged
+
+ - name: Merge new configuration with existing device configuration
+ register: result
+ cisco.ios.ios_acls: &id001
+ config:
+ - afi: ipv4
+ acls:
+ - name: std_acl
+ acl_type: standard
+ aces:
+ - grant: deny
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ - name: test_acl
+ acl_type: extended
+ aces:
+ - sequence: 10
+ source:
+ address: 192.0.4.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.5.0
+ wildcard_bits: 0.0.0.255
+ - name: 110
+ aces:
+ - grant: deny
+ sequence: 10
+ protocol_options:
+ icmp:
+ echo: true
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ dscp: ef
+ ttl:
+ eq: 10
+ - name: 123
+ aces:
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 198.51.101.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ tos:
+ service_value: 12
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.4.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ lt: 20
+ - afi: ipv6
+ acls:
+ - name: R1_TRAFFIC
+ aces:
+
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ any: true
+ port_protocol:
+ eq: www
+ destination:
+ any: true
+ port_protocol:
+ eq: telnet
+ dscp: af11
+ state: merged
+
+ - assert:
+ that:
+ - result.commands|length == 12
+ - result.changed == true
+ - result.commands|symmetric_difference(merged.commands) == []
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_acls: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/overridden.yaml
new file mode 100644
index 00000000..988aff8d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/overridden.yaml
@@ -0,0 +1,82 @@
+---
+- debug:
+ msg: START Overridden ios_acls state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device configuration of all interfaces with provided configuration
+ register: result
+ cisco.ios.ios_acls: &id001
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: 110
+ aces:
+
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ sequence: 10
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ eq: 10
+
+ - name: 150
+ aces:
+
+ - grant: deny
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ dscp: ef
+ ttl:
+ eq: 10
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 8
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Override device configuration of all interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_acls: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/parsed.yaml
new file mode 100644
index 00000000..a1b1d9d8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START ios_acls parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_acls:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+- assert:
+ that:
+ - result.changed == false
+ - gathered['config']|symmetric_difference(result.parsed) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/rendered.yaml
new file mode 100644
index 00000000..2c03bf73
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/rendered.yaml
@@ -0,0 +1,61 @@
+---
+- debug:
+ msg: Start ios_acls rendered integration tests ansible_connection={{ ansible_connection
+ }}
+
+- block:
+
+ - name: Rendered the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_acls:
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: 110
+ aces:
+
+ - grant: deny
+ sequence: 10
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ eq: 10
+
+ - name: 150
+ aces:
+
+ - grant: deny
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ dscp: ef
+ ttl:
+ eq: 10
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(rendered.commands) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/replaced.yaml
new file mode 100644
index 00000000..7150f90f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/replaced.yaml
@@ -0,0 +1,81 @@
+---
+- debug:
+ msg: START Replaced ios_acls state for integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ register: result
+ cisco.ios.ios_acls: &id001
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: 110
+ aces:
+
+ - grant: deny
+ protocol_options:
+ tcp:
+ syn: true
+ sequence: 10
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ eq: 10
+
+ - name: 150
+ aces:
+
+ - grant: deny
+ sequence: 20
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ dscp: ef
+ ttl:
+ eq: 10
+ state: replaced
+
+ - assert:
+ that:
+ - result.commands|length == 5
+ - result.changed == true
+ - result.commands|symmetric_difference(replaced.commands) == []
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_acls: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/rtt.yaml
new file mode 100644
index 00000000..b2fdd39a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/tests/cli/rtt.yaml
@@ -0,0 +1,192 @@
+---
+- debug:
+ msg: START ios_acls round trip integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.ios.ios_acls:
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: test_acl
+ acl_type: extended
+ aces:
+
+ - grant: deny
+ protocol_options:
+ tcp:
+ fin: true
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ option:
+ traceroute: true
+ ttl:
+ eq: 10
+
+ - name: 110
+ aces:
+
+ - grant: deny
+ protocol_options:
+ icmp:
+ echo: true
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ dscp: ef
+ ttl:
+ eq: 10
+
+ - name: 123
+ aces:
+
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 198.51.101.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ tos:
+ service_value: 12
+
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ destination:
+ address: 192.0.4.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ lt: 20
+
+ - afi: ipv6
+ acls:
+
+ - name: R1_TRAFFIC
+ aces:
+
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ source:
+ any: true
+ port_protocol:
+ eq: www
+ destination:
+ any: true
+ port_protocol:
+ eq: telnet
+ dscp: af11
+ state: merged
+
+ - name: Gather ACLs facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - acls
+
+ - name: Apply the configuration which need to be reverted
+ register: result
+ cisco.ios.ios_acls:
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: 110
+ aces:
+
+ - grant: deny
+ protocol_options:
+ tcp:
+ ack: true
+ sequence: 10
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: www
+ dscp: ef
+ ttl:
+ eq: 10
+
+ - name: 150
+ aces:
+
+ - grant: deny
+ protocol_options:
+ tcp:
+ syn: true
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ destination:
+ address: 198.51.110.0
+ wildcard_bits: 0.0.0.255
+ port_protocol:
+ eq: telnet
+ dscp: ef
+ ttl:
+ eq: 10
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 8
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.ios.ios_acls:
+ config: "{{ ansible_facts['network_resources']['acls'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 11
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/vars/main.yaml
new file mode 100644
index 00000000..7503cd82
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_acls/vars/main.yaml
@@ -0,0 +1,174 @@
+---
+deleted:
+ commands:
+ - no ip access-list extended test_acl
+ - no ip access-list extended 110
+ - no ipv6 access-list R1_TRAFFIC
+deleted_afi:
+ commands:
+ - no ip access-list extended 110
+ - no ip access-list extended 123
+ - no ip access-list extended test_acl
+deleted_all:
+ commands:
+ - no ip access-list extended test_acl
+ - no ip access-list extended 110
+ - no ip access-list extended 123
+ - no ipv6 access-list R1_TRAFFIC
+merged:
+ commands:
+ - ip access-list standard std_acl
+ - deny 192.0.2.0 0.0.0.255
+ - ip access-list extended test_acl
+ - no 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute ttl eq 10
+ - 10 deny tcp 192.0.4.0 0.0.0.255 192.0.5.0 0.0.0.255 eq www fin option traceroute
+ ttl eq 10
+ - ip access-list extended 110
+ - 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10
+ - ip access-list extended 123
+ - deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12
+ - deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt 20
+ - ipv6 access-list R1_TRAFFIC
+ - deny tcp any eq www any eq telnet ack dscp af11
+replaced:
+ commands:
+ - ip access-list extended 110
+ - no 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10
+ - 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www syn dscp ef ttl eq 10
+ - ip access-list extended 150
+ - 20 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet
+ syn dscp ef ttl eq 10
+overridden:
+ commands:
+ - no ip access-list extended 123
+ - no ip access-list extended test_acl
+ - no ipv6 access-list R1_TRAFFIC
+ - ip access-list extended 110
+ - no 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10
+ - 10 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq www ack
+ dscp ef ttl eq 10
+ - ip access-list extended 150
+ - deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn
+ dscp ef ttl eq 10
+gathered:
+ config:
+ - acls:
+ - aces:
+ - destination:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ dscp: ef
+ grant: deny
+ protocol: icmp
+ protocol_options:
+ icmp:
+ echo: true
+ sequence: 10
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ ttl:
+ eq: 10
+ acl_type: extended
+ name: '110'
+ - aces:
+ - destination:
+ address: 198.51.101.0
+ port_protocol:
+ eq: telnet
+ wildcard_bits: 0.0.0.255
+ grant: deny
+ protocol: tcp
+ protocol_options:
+ tcp:
+ ack: true
+ sequence: 10
+ source:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ tos:
+ service_value: 12
+ - destination:
+ address: 192.0.4.0
+ port_protocol:
+ eq: www
+ wildcard_bits: 0.0.0.255
+ dscp: ef
+ grant: deny
+ protocol: tcp
+ protocol_options:
+ tcp:
+ ack: true
+ sequence: 20
+ source:
+ address: 192.0.3.0
+ wildcard_bits: 0.0.0.255
+ ttl:
+ lt: 20
+ acl_type: extended
+ name: '123'
+ - aces:
+ - destination:
+ address: 192.0.3.0
+ port_protocol:
+ eq: www
+ wildcard_bits: 0.0.0.255
+ grant: deny
+ option:
+ traceroute: true
+ protocol: tcp
+ protocol_options:
+ tcp:
+ fin: true
+ sequence: 10
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.0.255
+ ttl:
+ eq: 10
+ acl_type: extended
+ name: test_acl
+ afi: ipv4
+ - acls:
+ - aces:
+ - destination:
+ any: true
+ port_protocol:
+ eq: telnet
+ dscp: af11
+ grant: deny
+ protocol: tcp
+ protocol_options:
+ tcp:
+ ack: true
+ sequence: 10
+ source:
+ any: true
+ port_protocol:
+ eq: www
+ name: R1_TRAFFIC
+ afi: ipv6
+rendered:
+ commands:
+ - ip access-list extended 110
+ - 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www syn dscp ef ttl eq
+ 10
+ - ip access-list extended 150
+ - deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn
+ dscp ef ttl eq 10
+rtt:
+ commands:
+ - no ip access-list extended 150
+ - ip access-list extended 123
+ - 10 deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos
+ 12
+ - 20 deny tcp 192.0.3.0 0.0.0.255 192.0.4.0 0.0.0.255 eq www ack dscp ef ttl lt
+ 20
+ - ip access-list extended test_acl
+ - 10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www fin option traceroute
+ ttl eq 10
+ - ip access-list extended 110
+ - no 10 deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq www ack dscp ef ttl eq 10
+ - 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10
+ - ipv6 access-list R1_TRAFFIC
+ - deny tcp any eq www any eq telnet ack dscp af11 sequence 10
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/meta/main.yml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/basic-login.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/basic-login.yaml
new file mode 100644
index 00000000..c4cdc36f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/basic-login.yaml
@@ -0,0 +1,36 @@
+---
+- name: setup - remove login
+ cisco.ios.ios_banner:
+ banner: login
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Set login
+ register: result
+ cisco.ios.ios_banner:
+ banner: login
+ text: "this is my login banner\nthat has a multiline\nstring\n"
+ state: present
+ provider: '{{ cli }}'
+
+- debug:
+ msg: '{{ result }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'banner login @\nthis is my login banner\nthat has a multiline\nstring\n\
+ @' in result.commands"
+
+- name: Set login again (idempotent)
+ register: result
+ cisco.ios.ios_banner:
+ banner: login
+ text: "this is my login banner\nthat has a multiline\nstring\n"
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/basic-motd.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/basic-motd.yaml
new file mode 100644
index 00000000..c33c9cde
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/basic-motd.yaml
@@ -0,0 +1,36 @@
+---
+- name: setup - remove motd
+ cisco.ios.ios_banner:
+ banner: motd
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Set motd
+ register: result
+ cisco.ios.ios_banner:
+ banner: motd
+ text: "this is my motd banner\nthat has a multiline\nstring\n"
+ state: present
+ provider: '{{ cli }}'
+
+- debug:
+ msg: '{{ result }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'banner motd @\nthis is my motd banner\nthat has a multiline\nstring\n\
+ @' in result.commands"
+
+- name: Set motd again (idempotent)
+ register: result
+ cisco.ios.ios_banner:
+ banner: motd
+ text: "this is my motd banner\nthat has a multiline\nstring\n"
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/basic-no-login.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/basic-no-login.yaml
new file mode 100644
index 00000000..ef490cfd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/basic-no-login.yaml
@@ -0,0 +1,34 @@
+---
+- name: Setup
+ cisco.ios.ios_banner:
+ banner: login
+ text: "Junk login banner\nover multiple lines\n"
+ state: present
+ provider: '{{ cli }}'
+
+- name: remove login
+ register: result
+ cisco.ios.ios_banner:
+ banner: login
+ state: absent
+ provider: '{{ cli }}'
+
+- debug:
+ msg: '{{ result }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'no banner login' in result.commands"
+
+- name: remove login (idempotent)
+ register: result
+ cisco.ios.ios_banner:
+ banner: login
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/multiple-login-exec.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/multiple-login-exec.yaml
new file mode 100644
index 00000000..63441ebd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/multiple-login-exec.yaml
@@ -0,0 +1,42 @@
+---
+- name: Setup - set login and exec
+ loop:
+ - login
+ - exec
+ cisco.ios.ios_banner:
+ banner: '{{ item }}'
+ text: "this is my login banner\nthat as a multiline\nstring\n"
+ state: present
+ provider: '{{ cli }}'
+
+- name: Set login
+ register: result
+ cisco.ios.ios_banner:
+ banner: login
+ text: "this is my login banner\nthat as a multiline\nstring\n"
+ state: present
+ provider: '{{ cli }}'
+
+- debug:
+ msg: '{{ result }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
+
+- name: Set exec
+ register: result
+ cisco.ios.ios_banner:
+ banner: exec
+ text: "this is my login banner\nthat as a multiline\nstring\n"
+ state: present
+ provider: '{{ cli }}'
+
+- debug:
+ msg: '{{ result }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/net_banner.yml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/net_banner.yml
new file mode 100644
index 00000000..a4345bba
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_banner/tests/cli/net_banner.yml
@@ -0,0 +1,31 @@
+---
+- debug: msg="START ios cli/net_banner.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup - remove login
+ ansible.netcommon.net_banner:
+ banner: login
+ state: absent
+ authorize: true
+
+- name: Set login
+ register: result
+ ansible.netcommon.net_banner:
+ banner: login
+ text: this is my login banner confgiured by net_banner
+ state: present
+ authorize: true
+
+- assert:
+ that:
+ - result.changed == true
+ - "'banner login @\nthis is my login banner confgiured by net_banner\n@' in\
+ \ result.commands"
+
+- name: teardown - remove login
+ ansible.netcommon.net_banner:
+ banner: login
+ state: absent
+ authorize: true
+
+- debug: msg="END ios cli/net_banner.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/meta/main.yaml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/tasks/cli.yaml
new file mode 100644
index 00000000..a3aae347
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/tasks/cli.yaml
@@ -0,0 +1,16 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/tests/cli/basic.yaml
new file mode 100644
index 00000000..ea53f186
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp/tests/cli/basic.yaml
@@ -0,0 +1,526 @@
+---
+- debug: msg="START ios cli/ios_bgp.yaml on connection={{ ansible_connection }}"
+
+- name: Clear existing BGP config
+ ignore_errors: true
+ cisco.ios.ios_bgp:
+ operation: delete
+
+- block:
+
+ - name: Add fake config with 'bgp' string
+ cisco.ios.ios_config:
+ match: none
+ replace: block
+ lines:
+ - no ip access-list extended BGP_ACL
+ - ip access-list extended BGP_ACL
+ - permit tcp any any eq bgp
+
+ - name: Try delete fake bgp config
+ register: result
+ cisco.ios.ios_bgp:
+ operation: delete
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Clean fake config with 'bgp' string
+ cisco.ios.ios_config:
+ match: none
+ replace: block
+ lines:
+ - no ip access-list extended BGP_ACL
+
+ - name: Add fake bgp-like config
+ cisco.ios.ios_config:
+ match: none
+ replace: block
+ lines:
+ - no ip access-list extended BGP_ACL_2
+ - ip access-list extended BGP_ACL_2
+ - remark router bgp 64496
+ - remark neighbor 192.0.2.10 remote-as 64496
+ - remark neighbor 192.0.2.10 shutdown
+ - remark address-family ipv4
+ - remark neighbor 192.0.2.10 activate
+ - remark exit-address-family
+ - permit tcp any any eq bgp
+
+ - name: Try delete fake bgp-like config
+ register: result
+ cisco.ios.ios_bgp:
+ operation: delete
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Clean fake bgp-like config
+ cisco.ios.ios_config:
+ match: none
+ replace: block
+ lines:
+ - no ip access-list extended BGP_ACL_2
+
+ - name: Configure BGP with AS 64496 and a router-id
+ register: result
+ cisco.ios.ios_bgp: &id001
+ operation: merge
+ config:
+ bgp_as: 64496
+ router_id: 192.0.2.2
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'router bgp 64496' in result.commands"
+ - "'bgp router-id 192.0.2.2' in result.commands"
+
+ - name: Configure BGP with AS 64496 and a router-id (idempotent)
+ register: result
+ cisco.ios.ios_bgp: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Configure BGP neighbors
+ register: result
+ cisco.ios.ios_bgp: &id002
+ operation: merge
+ config:
+ bgp_as: 64496
+ neighbors:
+
+ - neighbor: 192.0.2.10
+ remote_as: 64496
+ password: ansible
+ description: IBGP_NBR_1
+ ebgp_multihop: 100
+ timers:
+ keepalive: 300
+ holdtime: 360
+ min_neighbor_holdtime: 360
+
+ - neighbor: 192.0.2.15
+ remote_as: 64496
+ description: IBGP_NBR_2
+ ebgp_multihop: 150
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'router bgp 64496' in result.commands"
+ - "'neighbor 192.0.2.10 remote-as 64496' in result.commands"
+ - "'neighbor 192.0.2.10 description IBGP_NBR_1' in result.commands"
+ - "'neighbor 192.0.2.10 ebgp-multihop 100' in result.commands"
+ - "'neighbor 192.0.2.10 timers 300 360 360' in result.commands"
+ - "'neighbor 192.0.2.15 remote-as 64496' in result.commands"
+ - "'neighbor 192.0.2.15 description IBGP_NBR_2' in result.commands"
+ - "'neighbor 192.0.2.15 ebgp-multihop 150' in result.commands"
+
+ - name: Configure BGP neighbors (idempotent)
+ register: result
+ cisco.ios.ios_bgp: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Configure BGP neighbors with operation replace
+ register: result
+ cisco.ios.ios_bgp: &id003
+ operation: replace
+ config:
+ bgp_as: 64496
+ neighbors:
+
+ - neighbor: 192.0.2.15
+ remote_as: 64496
+ description: IBGP_NBR_2
+ ebgp_multihop: 150
+
+ - neighbor: 203.0.113.10
+ remote_as: 64511
+ description: EBGP_NBR_1
+ local_as: 64497
+
+ - neighbor: 10.10.20.20
+ remote_as: 65012
+ description: BGP_NBR_2
+ ebgp_multihop: 100
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'neighbor 203.0.113.10 remote-as 64511' in result.commands"
+ - "'neighbor 203.0.113.10 description EBGP_NBR_1' in result.commands"
+ - "'neighbor 203.0.113.10 local-as 64497' in result.commands"
+ - "'neighbor 10.10.20.20 remote-as 65012' in result.commands"
+ - "'neighbor 10.10.20.20 description BGP_NBR_2' in result.commands"
+ - "'no neighbor 192.0.2.10' in result.commands"
+
+ - name: Configure BGP neighbors with operation replace (idempotent)
+ register: result
+ cisco.ios.ios_bgp: *id003
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Configure root-level networks for BGP
+ register: result
+ cisco.ios.ios_bgp: &id004
+ operation: merge
+ config:
+ bgp_as: 64496
+ networks:
+
+ - prefix: 203.0.113.0
+ masklen: 27
+ route_map: RMAP_1
+
+ - prefix: 203.0.113.32
+ masklen: 27
+ route_map: RMAP_2
+
+ - assert:
+ that:
+ - result.changed == True
+ - "'router bgp 64496' in result.commands"
+ - "'network 203.0.113.0 mask 255.255.255.224 route-map RMAP_1' in result.commands"
+ - "'network 203.0.113.32 mask 255.255.255.224 route-map RMAP_2' in result.commands"
+
+ - name: Configure root-level networks for BGP (idempotent)
+ register: result
+ cisco.ios.ios_bgp: *id004
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Configure root-level networks for BGP with operation replace
+ register: result
+ cisco.ios.ios_bgp: &id005
+ operation: replace
+ config:
+ bgp_as: 64496
+ networks:
+
+ - prefix: 203.0.113.0
+ masklen: 27
+ route_map: RMAP_1
+
+ - prefix: 198.51.100.16
+ masklen: 28
+
+ - assert:
+ that:
+ - result.changed == True
+ - "'router bgp 64496' in result.commands"
+ - "'network 198.51.100.16 mask 255.255.255.240' in result.commands"
+ - "'no network 203.0.113.32 mask 255.255.255.224 route-map RMAP_2' in\
+ \ result.commands"
+
+ - name: Configure root-level networks for BGP with operation replace (idempotent)
+ register: result
+ cisco.ios.ios_bgp: *id005
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Configure BGP neighbors under address family mode
+ register: result
+ cisco.ios.ios_bgp: &id006
+ operation: merge
+ config:
+ bgp_as: 64496
+ address_family:
+
+ - afi: ipv4
+ safi: unicast
+ neighbors:
+
+ - neighbor: 203.0.113.10
+ activate: true
+ maximum_prefix: 250
+ advertisement_interval: 120
+
+ - neighbor: 192.0.2.15
+ activate: true
+ route_reflector_client: true
+
+ - neighbor: 10.10.20.20
+ activate: true
+ prefix_list_in: incoming-prefixes
+ prefix_list_out: outgoing-prefixes
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'router bgp 64496' in result.commands"
+ - "'address-family ipv4' in result.commands"
+ - "'neighbor 203.0.113.10 activate' in result.commands"
+ - "'neighbor 203.0.113.10 maximum-prefix 250' in result.commands"
+ - "'neighbor 203.0.113.10 advertisement-interval 120' in result.commands"
+ - "'neighbor 192.0.2.15 activate' in result.commands"
+ - "'neighbor 192.0.2.15 route-reflector-client' in result.commands"
+ - "'neighbor 10.10.20.20 activate' in result.commands"
+ - "'neighbor 10.10.20.20 prefix-list incoming-prefixes in' in result.commands"
+ - "'neighbor 10.10.20.20 prefix-list outgoing-prefixes out' in result.commands"
+
+ - name: Configure BGP neighbors under address family mode (idempotent)
+ register: result
+ cisco.ios.ios_bgp: *id006
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Configure networks under address family
+ register: result
+ cisco.ios.ios_bgp: &id007
+ operation: merge
+ config:
+ bgp_as: 64496
+ address_family:
+
+ - afi: ipv4
+ safi: multicast
+ networks:
+
+ - prefix: 198.51.100.48
+ masklen: 28
+ route_map: RMAP_1
+
+ - prefix: 192.0.2.64
+ masklen: 27
+
+ - prefix: 203.0.113.160
+ masklen: 27
+ route_map: RMAP_2
+
+ - afi: ipv4
+ safi: unicast
+ networks:
+
+ - prefix: 198.51.100.64
+ masklen: 28
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'router bgp 64496' in result.commands"
+ - "'address-family ipv4 multicast' in result.commands"
+ - "'network 198.51.100.48 mask 255.255.255.240 route-map RMAP_1' in result.commands"
+ - "'network 192.0.2.64 mask 255.255.255.224' in result.commands"
+ - "'network 203.0.113.160 mask 255.255.255.224 route-map RMAP_2' in result.commands"
+ - "'exit-address-family' in result.commands"
+ - "'address-family ipv4' in result.commands"
+ - "'network 198.51.100.64 mask 255.255.255.240' in result.commands"
+ - "'exit-address-family' in result.commands"
+
+ - name: Configure networks under address family (idempotent)
+ register: result
+ cisco.ios.ios_bgp: *id007
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Configure networks under address family with operation replace
+ register: result
+ cisco.ios.ios_bgp: &id008
+ operation: replace
+ config:
+ bgp_as: 64496
+ address_family:
+
+ - afi: ipv4
+ safi: multicast
+ networks:
+
+ - prefix: 198.51.100.80
+ masklen: 28
+
+ - prefix: 192.0.2.64
+ masklen: 27
+
+ - prefix: 203.0.113.192
+ masklen: 27
+
+ - afi: ipv4
+ safi: unicast
+ networks:
+
+ - prefix: 198.51.100.64
+ masklen: 28
+
+ - assert:
+ that:
+ - result.changed == true
+ - '"router bgp 64496" in result.commands'
+ - '"address-family ipv4 multicast" in result.commands'
+ - '"network 198.51.100.80 mask 255.255.255.240" in result.commands'
+ - '"network 203.0.113.192 mask 255.255.255.224" in result.commands'
+ - '"no network 198.51.100.48 mask 255.255.255.240 route-map RMAP_1" in
+ result.commands'
+ - '"no network 203.0.113.160 mask 255.255.255.224 route-map RMAP_2" in
+ result.commands'
+ - '"exit-address-family" in result.commands'
+
+ - name: Configure networks under address family with operation replace (idempotent)
+ register: result
+ cisco.ios.ios_bgp: *id008
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Configure redistribute information under address family mode
+ register: result
+ cisco.ios.ios_bgp: &id009
+ operation: merge
+ config:
+ bgp_as: 64496
+ address_family:
+
+ - afi: ipv4
+ safi: multicast
+ redistribute:
+
+ - protocol: ospf
+ id: 112
+ metric: 64
+
+ - protocol: eigrp
+ id: 233
+ metric: 256
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'router bgp 64496' in result.commands"
+ - "'address-family ipv4 multicast' in result.commands"
+ - "'redistribute ospf 112 metric 64' in result.commands"
+ - "'redistribute eigrp 233 metric 256' in result.commands"
+ - "'exit-address-family' in result.commands"
+
+ - name: Configure redistribute information under address family mode (idempotent)
+ register: result
+ cisco.ios.ios_bgp: *id009
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Get the IOS version
+ cisco.ios.ios_facts:
+ gather_subset: all
+
+ - name: Configure redistribute information under address family mode with operation
+ replace
+ register: result
+ cisco.ios.ios_bgp: &id010
+ operation: replace
+ config:
+ bgp_as: 64496
+ address_family:
+
+ - afi: ipv4
+ safi: multicast
+ redistribute:
+
+ - protocol: ospf
+ id: 112
+ metric: 64
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'router bgp 64496' in result.commands"
+ - "'address-family ipv4 multicast' in result.commands"
+ - "'no redistribute eigrp 233' in result.commands"
+ - "'exit-address-family' in result.commands"
+
+ - name: Configure redistribute information under address family mode with operation
+ replace (idempotent)
+ register: result
+ when: ansible_net_version != "15.6(2)T"
+ cisco.ios.ios_bgp: *id010
+
+ - assert:
+ that:
+ - result.changed == false
+ when: ansible_net_version != "15.6(2)T"
+
+ - name: Override all the exisiting BGP config
+ register: result
+ cisco.ios.ios_bgp:
+ operation: override
+ config:
+ bgp_as: 64497
+ router_id: 192.0.2.10
+ log_neighbor_changes: true
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'no router bgp 64496' in result.commands"
+ - "'router bgp 64497' in result.commands"
+ - "'bgp router-id 192.0.2.10' in result.commands"
+ - "'bgp log-neighbor-changes' in result.commands"
+
+ - name: Configure BGP neighbors with classful boundary
+ register: result
+ cisco.ios.ios_bgp: &id011
+ config:
+ bgp_as: 64497
+ log_neighbor_changes: true
+ networks:
+
+ - prefix: 198.51.100.0
+ masklen: 23
+
+ - prefix: 201.0.113.32
+ masklen: 24
+ operation: merge
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'router bgp 64497' in result.commands"
+ - "'network 198.51.100.0 mask 255.255.254.0' in result.commands"
+ - "'network 201.0.113.32' in result.commands"
+
+ - name: Configure BGP neighbors with classful boundary (idempotent)
+ register: result
+ cisco.ios.ios_bgp: *id011
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - name: Teardown
+ register: result
+ cisco.ios.ios_bgp: &id012
+ operation: delete
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'no router bgp 64497' in result.commands"
+
+ - name: Teardown again (idempotent)
+ register: result
+ cisco.ios.ios_bgp: *id012
+
+ - assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END ios cli/ios_bgp.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..6be7fad0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/_parsed.cfg
@@ -0,0 +1,13 @@
+router bgp 65000
+ bgp nopeerup-delay post-boot 10
+ bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+ bgp bestpath compare-routerid
+ bgp dampening 1 1 1 1
+ bgp advertise-best-external
+ bgp log-neighbor-changes
+ timers bgp 100 200 150
+ redistribute connected metric 10
+ neighbor 198.51.100.1 remote-as 100
+ neighbor 198.51.100.1 description merge neighbor
+ neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+ neighbor 198.51.100.1 route-map test-route out \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..bb50abd6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/_populate_config.yaml
@@ -0,0 +1,44 @@
+---
+- name: Populate BGP Global Configuration
+ cisco.ios.ios_bgp_global:
+ config:
+ as_number: 65000
+ bgp:
+ advertise_best_external: true
+ bestpath:
+ - compare_routerid: true
+ dampening:
+ penalty_half_time: 1
+ reuse_route_val: 1
+ suppress_route_val: 1
+ max_suppress: 1
+ graceful_shutdown:
+ neighbors:
+ time: 50
+ community: 100
+ local_preference: 100
+ log_neighbor_changes: true
+ nopeerup_delay:
+ - post_boot: 10
+ neighbor:
+ - address: 198.51.100.1
+ description: merge neighbor
+ remote_as: 100
+ aigp:
+ send:
+ cost_community:
+ id: 100
+ poi:
+ igp_cost: true
+ transitive: true
+ route_map:
+ name: test-route
+ out: true
+ redistribute:
+ - connected:
+ metric: 10
+ timers:
+ keepalive: 100
+ holdtime: 200
+ min_holdtime: 150
+ state: merged
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..d857052b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/_remove_config.yaml
@@ -0,0 +1,4 @@
+---
+- name: Remove BGP Global Config
+ cisco.ios.ios_bgp_global:
+ state: purged
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/deleted.yaml
new file mode 100644
index 00000000..c1273f59
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/deleted.yaml
@@ -0,0 +1,40 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_bgp_global ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete provided BGP Global
+ register: result
+ cisco.ios.ios_bgp_global: &id001
+ config:
+ as_number: 65000
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dicts are correctly generated
+ assert:
+ that:
+ - deleted['after'] == result['after']
+
+ - name: Delete provided BGP Global (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_bgp_global: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..fea162f1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START ios_bgp_global empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_bgp_global:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_bgp_global:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_bgp_global:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_bgp_global:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_bgp_global:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/gathered.yaml
new file mode 100644
index 00000000..bbf39bc9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/gathered.yaml
@@ -0,0 +1,25 @@
+---
+- debug:
+ msg: START ios_bgp_global gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_bgp_global:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - result.changed == false
+ - merged['after'] == result['gathered']
+
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/merged.yaml
new file mode 100644
index 00000000..23dae8c6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/merged.yaml
@@ -0,0 +1,81 @@
+---
+- debug:
+ msg: START Merged ios_bgp_global state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.ios.ios_bgp_global: &id001
+ config:
+ as_number: 65000
+ bgp:
+ advertise_best_external: true
+ bestpath:
+ - compare_routerid: true
+ dampening:
+ penalty_half_time: 1
+ reuse_route_val: 1
+ suppress_route_val: 1
+ max_suppress: 1
+ graceful_shutdown:
+ neighbors:
+ time: 50
+ community: 100
+ local_preference: 100
+ log_neighbor_changes: true
+ nopeerup_delay:
+ - post_boot: 10
+ neighbor:
+ - address: 198.51.100.1
+ description: merge neighbor
+ remote_as: 100
+ aigp:
+ send:
+ cost_community:
+ id: 100
+ poi:
+ igp_cost: true
+ transitive: true
+ route_map:
+ name: test-route
+ out: true
+ redistribute:
+ - connected:
+ metric: 10
+ timers:
+ keepalive: 100
+ holdtime: 200
+ min_holdtime: 150
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - merged['before'] == {}
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - merged['after'] == result['after']
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_bgp_global: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/parsed.yaml
new file mode 100644
index 00000000..5bf1d33c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/parsed.yaml
@@ -0,0 +1,15 @@
+---
+- debug:
+ msg: START ios_bgp_global parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse the commands for provided configuration
+ register: result
+ cisco.ios.ios_bgp_global:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+- assert:
+ that:
+ - result.changed == false
+ - merged['after'] == result['parsed']
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/purged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/purged.yaml
new file mode 100644
index 00000000..7b676011
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/purged.yaml
@@ -0,0 +1,33 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_bgp_global ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Purge provided BGP Global
+ register: result
+ cisco.ios.ios_bgp_global: &id001
+ state: purged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "'no router bgp 65000' in result.commands"
+ - result.commands|length == 1
+
+ - name: Purge provided BGP Global (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_bgp_global: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/rendered.yaml
new file mode 100644
index 00000000..5ae909f2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/rendered.yaml
@@ -0,0 +1,55 @@
+---
+- debug:
+ msg: Start ios_bgp_global rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+ - name: Render the commands for provided configuration
+ register: result
+ cisco.ios.ios_bgp_global: &id001
+ config:
+ as_number: 65000
+ bgp:
+ advertise_best_external: true
+ bestpath:
+ - compare_routerid: true
+ dampening:
+ penalty_half_time: 1
+ reuse_route_val: 1
+ suppress_route_val: 1
+ max_suppress: 1
+ graceful_shutdown:
+ neighbors:
+ time: 50
+ community: 100
+ local_preference: 100
+ log_neighbor_changes: true
+ nopeerup_delay:
+ - post_boot: 10
+ neighbor:
+ - address: 198.51.100.1
+ description: merge neighbor
+ remote_as: 100
+ aigp:
+ send:
+ cost_community:
+ id: 100
+ poi:
+ igp_cost: true
+ transitive: true
+ route_map:
+ name: test-route
+ out: true
+ redistribute:
+ - connected:
+ metric: 10
+ timers:
+ keepalive: 100
+ holdtime: 200
+ min_holdtime: 150
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/replaced.yaml
new file mode 100644
index 00000000..5881158e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/tests/cli/replaced.yaml
@@ -0,0 +1,59 @@
+---
+- debug:
+ msg: START Replaced ios_bgp_global state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaced provided BGP Global configuration
+ register: result
+ cisco.ios.ios_bgp_global: &id001
+ config:
+ as_number: 65000
+ bgp:
+ advertise_best_external: true
+ bestpath:
+ - med:
+ confed: true
+ log_neighbor_changes: true
+ nopeerup_delay:
+ - post_boot: 10
+ cold_boot: 20
+ neighbor:
+ - address: 192.0.2.1
+ description: replace neighbor
+ remote_as: 100
+ slow_peer:
+ detection:
+ disable: true
+ redistribute:
+ - connected:
+ metric: 10
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - replaced['after'] == result['after']
+
+ - name: Replaced provided BGP Global configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_bgp_global: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/vars/main.yaml
new file mode 100644
index 00000000..fb80663f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_bgp_global/vars/main.yaml
@@ -0,0 +1,117 @@
+---
+merged:
+ before: {}
+
+ commands:
+ - router bgp 65000
+ - bgp bestpath compare-routerid
+ - bgp nopeerup-delay post-boot 10
+ - bgp dampening 1 1 1 1
+ - timers bgp 100 200 150
+ - bgp advertise-best-external
+ - neighbor 198.51.100.1 remote-as 100
+ - bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+ - bgp log-neighbor-changes
+ - neighbor 198.51.100.1 route-map test-route out
+ - neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+ - neighbor 198.51.100.1 description merge neighbor
+ - redistribute connected metric 10
+
+ after:
+ as_number: "65000"
+ bgp:
+ advertise_best_external: true
+ bestpath:
+ - compare_routerid: true
+ dampening:
+ max_suppress: 1
+ penalty_half_time: 1
+ reuse_route_val: 1
+ suppress_route_val: 1
+ graceful_shutdown:
+ community: "100"
+ local_preference: 100
+ neighbors:
+ time: 50
+ log_neighbor_changes: true
+ nopeerup_delay:
+ - post_boot: 10
+ neighbor:
+ - address: "198.51.100.1"
+ aigp:
+ send:
+ cost_community:
+ id: 100
+ poi:
+ igp_cost: true
+ transitive: true
+ description: merge neighbor
+ remote_as: 100
+ route_map:
+ name: test-route
+ out: true
+ redistribute:
+ - connected:
+ metric: 10
+ timers:
+ holdtime: 200
+ keepalive: 100
+ min_holdtime: 150
+
+replaced:
+ commands:
+ - router bgp 65000
+ - no bgp dampening 1 1 1 1
+ - no timers bgp 100 200 150
+ - no bgp bestpath compare-routerid
+ - bgp bestpath med confed
+ - bgp nopeerup-delay cold-boot 20
+ - no neighbor 198.51.100.1 remote-as 100
+ - neighbor 192.0.2.1 remote-as 100
+ - no bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+ - no neighbor 198.51.100.1 route-map test-route out
+ - no neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+ - no neighbor 198.51.100.1 description merge neighbor
+ - neighbor 192.0.2.1 slow-peer detection disable
+ - neighbor 192.0.2.1 description replace neighbor
+
+ after:
+ as_number: "65000"
+ bgp:
+ advertise_best_external: true
+ bestpath:
+ - med:
+ confed: true
+ log_neighbor_changes: true
+ nopeerup_delay:
+ - cold_boot: 20
+ - post_boot: 10
+ neighbor:
+ - address: "192.0.2.1"
+ description: "replace neighbor"
+ remote_as: 100
+ slow_peer:
+ detection:
+ disable: true
+ redistribute:
+ - connected:
+ metric: 10
+
+deleted:
+ commands:
+ - router bgp 65000
+ - no bgp bestpath compare-routerid
+ - no bgp nopeerup-delay post-boot 10
+ - no bgp dampening 1 1 1 1
+ - no timers bgp 100 200 150
+ - no bgp advertise-best-external
+ - no neighbor 198.51.100.1 remote-as 100
+ - no bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
+ - no bgp log-neighbor-changes
+ - no neighbor 198.51.100.1 route-map test-route out
+ - no neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
+ - no neighbor 198.51.100.1 description merge neighbor
+ - no redistribute connected metric 10
+
+ after:
+ as_number: "65000"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/meta/main.yml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/bad_operator.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/bad_operator.yaml
new file mode 100644
index 00000000..7f98f1ff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/bad_operator.yaml
@@ -0,0 +1,21 @@
+---
+- debug: msg="START cli/bad_operator.yaml on connection={{ ansible_connection }}"
+
+- name: test bad operator
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ - show interfaces GigabitEthernet 0/0
+ provider: '{{ cli }}'
+ wait_for:
+
+ - "result[0] contains 'Description: Foo'"
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+
+- debug: msg="END cli/bad_operator.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/cli_command.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/cli_command.yaml
new file mode 100644
index 00000000..306128e2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/cli_command.yaml
@@ -0,0 +1,29 @@
+---
+- debug:
+ msg: START cli/cli_command.yaml on connection={{ ansible_connection }}
+
+- block:
+
+ - name: get output for single command
+ register: result
+ ansible.netcommon.cli_command:
+ command: show version
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+
+ - name: send invalid command
+ register: result
+ ignore_errors: true
+ ansible.netcommon.cli_command:
+ command: show foo
+
+ - assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+ when: ansible_connection == 'ansible.netcommon.network_cli'
+
+- debug: msg="END cli/cli_command.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/contains.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/contains.yaml
new file mode 100644
index 00000000..e0c01a51
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/contains.yaml
@@ -0,0 +1,20 @@
+---
+- debug: msg="START cli/contains.yaml on connection={{ ansible_connection }}"
+
+- name: test contains operator
+ register: result
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ - show interface loopback 888
+ provider: '{{ cli }}'
+ wait_for:
+ - result[0] contains Cisco
+ - result[1] contains Loopback888
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+
+- debug: msg="END cli/contains.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/error_regex.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/error_regex.yaml
new file mode 100644
index 00000000..167e19bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/error_regex.yaml
@@ -0,0 +1,69 @@
+---
+- debug: msg="START cli/error_regex.yaml on connection={{ ansible_connection }}"
+
+- block:
+
+ - name: clear logs 1
+ ignore_errors: true
+ ansible.netcommon.cli_command: &id001
+ command: clear logging
+ prompt:
+ - Clear logging buffer
+ answer:
+ - "\r"
+
+ - name: increase log buffer size
+ ansible.netcommon.cli_config:
+ config: logging buffered 9600000
+
+ - name: send log with error regex match 1
+ ignore_errors: true
+ ansible.netcommon.cli_command: &id002
+ command: "send log 'IPSEC-3-REPLAY_ERROR: test log_1'\n"
+
+ - name: pause to avoid rate limiting-1
+ pause:
+ seconds: 20
+
+ - name: fetch logs without command specific error regex
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_command:
+ commands:
+ - show logging
+
+ - name: ensure task fails due to mismatched regex
+ assert:
+ that:
+ - result.failed == true
+
+ - name: pause to avoid rate limiting-2
+ pause:
+ seconds: 20
+
+ - name: clear logs 2
+ ignore_errors: true
+ ansible.netcommon.cli_command: *id001
+
+ - name: send log with error regex match 2
+ ignore_errors: true
+ ansible.netcommon.cli_command: *id002
+
+ - name: fetch logs with command specific error regex
+ register: result
+ vars:
+ ansible_terminal_stderr_re:
+
+ - pattern: connection timed out
+ flags: re.I
+ cisco.ios.ios_command:
+ commands:
+ - show logging
+
+ - name: ensure task with modified error regex is success
+ assert:
+ that:
+ - result.failed == false
+ when: ansible_connection == 'ansible.netcommon.network_cli'
+
+- debug: msg="END cli/error_regex.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/invalid.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/invalid.yaml
new file mode 100644
index 00000000..d3f34b78
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/invalid.yaml
@@ -0,0 +1,28 @@
+---
+- debug: msg="START cli/invalid.yaml on connection={{ ansible_connection }}"
+
+- name: run invalid command
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_command:
+ commands: show foo
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed
+
+- name: run commands that include invalid command
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ - show foo
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed
+
+- debug: msg="END cli/invalid.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/output.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/output.yaml
new file mode 100644
index 00000000..adfcca95
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/output.yaml
@@ -0,0 +1,30 @@
+---
+- debug: msg="START cli/output.yaml on connection={{ ansible_connection }}"
+
+- name: get output for single command
+ register: result
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+
+- name: get output for multiple commands
+ register: result
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ - show interfaces
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+ - result.stdout | length == 2
+
+- debug: msg="END cli/output.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/timeout.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/timeout.yaml
new file mode 100644
index 00000000..d1097de3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_command/tests/cli/timeout.yaml
@@ -0,0 +1,19 @@
+---
+- debug: msg="START cli/timeout.yaml on connection={{ ansible_connection }}"
+
+- name: test bad condition
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ provider: '{{ cli }}'
+ wait_for:
+ - result[0] contains bad_value_string
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+
+- debug: msg="END cli/timeout.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/meta/main.yml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/cli.yaml
new file mode 100644
index 00000000..ce5fdc46
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/cli.yaml
@@ -0,0 +1,16 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/cli_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/cli_config.yaml
new file mode 100644
index 00000000..2feb4468
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/cli_config.yaml
@@ -0,0 +1,16 @@
+---
+- name: collect all cli_config test cases
+ find:
+ paths: '{{ role_path }}/tests/cli_config'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/main.yaml
new file mode 100644
index 00000000..49d8d06f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
+
+- include: cli_config.yaml
+ tags:
+ - network_cli
+
+- include: redirection.yaml
+ when: ansible_version.full is version('2.10.0', '>=')
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/redirection.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/redirection.yaml
new file mode 100644
index 00000000..6282ad40
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tasks/redirection.yaml
@@ -0,0 +1,16 @@
+---
+- name: collect all redirection cli test cases
+ find:
+ paths: '{{ role_path }}/tests/redirection'
+ patterns: '{{ testcase }}.yaml'
+ register: shortname_test_cases
+ delegate_to: localhost
+
+- name: set test_items for redirection
+ set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/base_running_config b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/base_running_config
new file mode 100644
index 00000000..37254dc9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/base_running_config
@@ -0,0 +1,9 @@
+version 15.6
+service timestamps debug datetime msec
+service timestamps log datetime msec
+no service password-encryption
+!
+hostname an-ios-01.ansible.com
+!
+boot-start-marker
+boot-end-marker
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/config.j2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/config.j2
new file mode 100644
index 00000000..06f98488
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/config.j2
@@ -0,0 +1,4 @@
+interface Loopback999
+ description this is a test
+ shutdown
+
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configblock.j2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configblock.j2
new file mode 100644
index 00000000..46150c4d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configblock.j2
@@ -0,0 +1,5 @@
+ip access-list extended test
+ permit ip host 192.0.2.1 any log
+ permit ip host 192.0.2.2 any log
+ permit ip host 192.0.2.3 any log
+ permit ip host 192.0.2.4 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configexact1.j2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configexact1.j2
new file mode 100644
index 00000000..82ad080c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configexact1.j2
@@ -0,0 +1,6 @@
+no ip access-list extended test
+ip access-list extended test
+ permit ip host 192.0.2.1 any log
+ permit ip host 192.0.2.2 any log
+ permit ip host 192.0.2.3 any log
+ permit ip host 192.0.2.4 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configexact2.j2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configexact2.j2
new file mode 100644
index 00000000..46150c4d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configexact2.j2
@@ -0,0 +1,5 @@
+ip access-list extended test
+ permit ip host 192.0.2.1 any log
+ permit ip host 192.0.2.2 any log
+ permit ip host 192.0.2.3 any log
+ permit ip host 192.0.2.4 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configstrict1.j2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configstrict1.j2
new file mode 100644
index 00000000..46150c4d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/configstrict1.j2
@@ -0,0 +1,5 @@
+ip access-list extended test
+ permit ip host 192.0.2.1 any log
+ permit ip host 192.0.2.2 any log
+ permit ip host 192.0.2.3 any log
+ permit ip host 192.0.2.4 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/intended_running_config b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/intended_running_config
new file mode 100644
index 00000000..bdad8d3d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/intended_running_config
@@ -0,0 +1,9 @@
+version 15.6
+service timestamps debug datetime msec
+service timestamps log datetime msec
+no service password-encryption
+!
+hostname an-ios-02.ansible.com
+!
+boot-start-marker
+boot-end-marker
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/macro.j2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/macro.j2
new file mode 100644
index 00000000..44a7a9bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/macro.j2
@@ -0,0 +1,8 @@
+ A12345678 123456789 123456789 123456789 123456789 123456789 123456789
+ B12345678 123456789 123456789 123456789 123456789 123456789 123456789
+ C12345678 123456789 123456789 123456789 123456789 123456789 123456789
+ D12345678 123456789 123456789 123456789 123456789 123456789 123456789
+ E12345678 123456789 123456789 123456789 123456789 123456789 123456789
+ F12345678 123456789 123456789 123456789 123456789 123456789 123456789
+ G12345678 123456789 123456789 123456789 123456789 123456789 123456789
+ H12345678 123456789 123456789 123456789 123456789 123456789 123456789
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/setupblock.j2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/setupblock.j2
new file mode 100644
index 00000000..f57aa49b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/setupblock.j2
@@ -0,0 +1,5 @@
+no ip access-list extended test
+ip access-list extended test
+ permit ip host 192.0.2.1 any log
+ permit ip host 192.0.2.2 any log
+ permit ip host 192.0.2.3 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/setupexact.j2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/setupexact.j2
new file mode 100644
index 00000000..e8791e27
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/setupexact.j2
@@ -0,0 +1,7 @@
+no ip access-list extended test
+ip access-list extended test
+ permit ip host 192.0.2.1 any log
+ permit ip host 192.0.2.2 any log
+ permit ip host 192.0.2.3 any log
+ permit ip host 192.0.2.4 any log
+ permit ip host 192.0.2.5 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/setupstrict.j2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/setupstrict.j2
new file mode 100644
index 00000000..e8791e27
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/basic/setupstrict.j2
@@ -0,0 +1,7 @@
+no ip access-list extended test
+ip access-list extended test
+ permit ip host 192.0.2.1 any log
+ permit ip host 192.0.2.2 any log
+ permit ip host 192.0.2.3 any log
+ permit ip host 192.0.2.4 any log
+ permit ip host 192.0.2.5 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/defaults/config.j2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/defaults/config.j2
new file mode 100644
index 00000000..1d4d9da8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/templates/defaults/config.j2
@@ -0,0 +1,4 @@
+interface Loopback999
+ description this is a test
+ no shutdown
+
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/backup.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/backup.yaml
new file mode 100644
index 00000000..3088ab9a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/backup.yaml
@@ -0,0 +1,123 @@
+---
+- debug: msg="START cli/cli_backup.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface Loopback999
+ match: none
+
+- name: collect any backup files
+ find:
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_files
+ connection: local
+
+- name: delete backup files
+ file:
+ path: '{{ item.path }}'
+ state: absent
+ with_items: '{{backup_files.files|default([])}}'
+
+- name: configure device with config
+ register: result
+ cisco.ios.ios_config:
+ src: basic/config.j2
+ backup: true
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: collect any backup files
+ find:
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_files
+ connection: local
+
+- assert:
+ that:
+ - backup_files.files is defined
+
+- name: delete configurable backup file path
+ file:
+ path: '{{ item }}'
+ state: absent
+ with_items:
+ - '{{ role_path }}/backup_test_dir/'
+ - '{{ role_path }}/backup/backup.cfg'
+
+- name: take configuration backup in custom filename and directory path
+ become: true
+ register: result
+ cisco.ios.ios_config:
+ backup: true
+ backup_options:
+ filename: backup.cfg
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-1 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- name: take configuration backup in custom filename
+ become: true
+ register: result
+ cisco.ios.ios_config:
+ backup: true
+ backup_options:
+ filename: backup.cfg
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-2 exist
+ find:
+ paths: '{{ role_path }}/backup/backup.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- name: take configuration backup in custom path and default filename
+ become: true
+ register: result
+ cisco.ios.ios_config:
+ backup: true
+ backup_options:
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-3 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- debug: msg="END cli/cli_backup.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/defaults.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/defaults.yaml
new file mode 100644
index 00000000..09beebb3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/defaults.yaml
@@ -0,0 +1,67 @@
+---
+- debug: msg="START cli/defaults.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ commands:
+ - no description
+ - shutdown
+ parents:
+ - interface Loopback999
+ match: none
+
+- name: configure device with defaults included
+ register: result
+ cisco.ios.ios_config:
+ src: defaults/config.j2
+ defaults: true
+
+- debug: var=result
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check device with defaults included
+ register: result
+ cisco.ios.ios_config:
+ src: defaults/config.j2
+ defaults: true
+
+- debug: var=result
+
+- assert:
+ that:
+ - result.changed == false
+ - result.updates is not defined
+
+- name: Check device is in proper prompt after error
+ ignore_errors: true
+ cisco.ios.ios_config:
+ lines:
+ - mac-address-table notification mac-move
+
+- name: show interfaces brief to ensure deivce goes to valid prompt
+ register: result
+ cisco.ios.ios_command:
+ commands:
+ - show interfaces
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+
+- name: Validate Terminal Error Regex
+ ios_config:
+ lines:
+ - switchport private-vlan mapping 10 6000
+ parents: interface GigabitEthernet0/1
+ register: result
+ ignore_errors: true
+
+- assert:
+ that:
+ - result.failed == True
+
+- debug: msg="END cli/defaults.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/diff.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/diff.yaml
new file mode 100644
index 00000000..548bb3e4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/diff.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg="START cli/diff.yaml on connection={{ ansible_connection }}"
+
+- name: Ensure hostname is preset
+ cisco.ios.ios_system:
+ hostname: '{{ shorter_hostname }}'
+
+- name: ios_config diff against retrieved config
+ diff: true
+ register: result
+ cisco.ios.ios_config:
+ diff_against: intended
+ intended_config: "{{ lookup('file', '{{ role_path }}/templates/basic/intended_running_config')\
+ \ }}"
+
+- assert:
+ that:
+ - "'hostname an-ios-02.ansible.com' in result['diff']['after']"
+ - "'hostname {{ shorter_hostname }}' in result['diff']['before']"
+
+- name: ios_config diff against provided running_config
+ diff: true
+ register: result
+ cisco.ios.ios_config:
+ diff_against: intended
+ intended_config: "{{ lookup('file', '{{ role_path }}/templates/basic/intended_running_config')\
+ \ }}"
+ running_config: "{{ lookup('file', '{{ role_path }}/templates/basic/base_running_config')\
+ \ }}"
+
+- assert:
+ that:
+ - "'hostname an-ios-02.ansible.com' in result['diff']['after']"
+ - "'hostname an-ios-01.ansible.com' in result['diff']['before']"
+
+- debug: msg="END cli/diff.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/macro.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/macro.yaml
new file mode 100644
index 00000000..dcb1bd29
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/macro.yaml
@@ -0,0 +1,64 @@
+---
+- debug: msg="START cli/cli_macro.yaml on connection={{ ansible_connection }}"
+
+- name: Check for macro support
+ register: supports_macro
+ ignore_errors: true
+ cisco.ios.ios_command:
+ commands:
+ - show parser macro brief
+
+- name: ios_config macro integration tests
+ when: supports_macro is succeeded
+ block:
+
+ - name: Define macro name
+ set_fact:
+ macro_name: MACRO_ANSIBLE_TEST
+
+ - name: setup - remove configuration
+ cisco.ios.ios_config:
+ lines:
+ - no macro name {{ macro_name }}
+ - do show clock
+ match: none
+
+ - name: configure macro
+ register: result
+ cisco.ios.ios_config:
+ parents: macro name {{ macro_name }}
+ multiline_delimiter: '@'
+ after: '@'
+ match: line
+ replace: block
+ lines: "{{ lookup('template', 'basic/macro.j2') }}"
+
+ - name: Check if macro has been added
+ assert:
+ that:
+ - result.changed == true
+
+ - name: configure macro again - idempotent check
+ register: result
+ cisco.ios.ios_config:
+ parents: macro name {{ macro_name }}
+ multiline_delimiter: '@'
+ after: '@'
+ match: line
+ replace: block
+ lines: "{{ lookup('template', 'basic/macro.j2') }}"
+
+ - name: macro already/correctly configured ?
+ assert:
+ that:
+ - result.changed == false
+ always:
+
+ - name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - no macro name {{ macro_name }}
+ - do show clock
+ match: none
+
+- debug: msg="END cli/cli_macro.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/save.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/save.yaml
new file mode 100644
index 00000000..4f7d3241
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/save.yaml
@@ -0,0 +1,49 @@
+---
+- debug: msg="START cli/save.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface Loopback999
+ match: none
+ save_when: modified
+
+- name: save should always run
+ register: result
+ cisco.ios.ios_config:
+ save_when: always
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: delete config (setup)
+ register: result
+ cisco.ios.ios_config:
+ replace: line
+ lines:
+ - no ip http server
+ save_when: modified
+
+- name: save should run when changed
+ register: result
+ cisco.ios.ios_config:
+ replace: line
+ lines:
+ - ip http server
+ save_when: modified
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: teardown
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - no ip http server
+
+- debug: msg="END cli/save.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/src_basic.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/src_basic.yaml
new file mode 100644
index 00000000..c2f41123
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/src_basic.yaml
@@ -0,0 +1,64 @@
+---
+- debug: msg="START cli/src_basic.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface Loopback999
+ match: none
+
+- name: configure device with config
+ register: result
+ cisco.ios.ios_config:
+ src: basic/config.j2
+
+- name: debug, remove me
+ debug:
+ msg: '{{ result }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check device with config
+ register: result
+ cisco.ios.ios_config:
+ src: basic/config.j2
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: check for empty diff
+ check_mode: true
+ register: result
+ cisco.ios.ios_config:
+ running_config: "service timestamps debug datetime msec\nservice timestamps\
+ \ log datetime msec\n"
+ lines:
+ - service timestamps debug datetime msec
+ - service timestamps log datetime msec
+
+- assert:
+ that:
+ - result.updates is undefined
+
+- name: check for diff with ignore lines for running config
+ check_mode: true
+ register: result
+ cisco.ios.ios_config:
+ running_config: "service timestamps debug datetime msec\nservice timestamps\
+ \ log datetime msec\n"
+ lines:
+ - service timestamps debug datetime msec
+ - service timestamps log datetime msec
+ diff_ignore_lines: service timestamps log datetime msec
+
+- assert:
+ that:
+ - "'service timestamps log datetime msec' in result.updates"
+
+- debug: msg="END cli/src_basic.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/src_invalid.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/src_invalid.yaml
new file mode 100644
index 00000000..852a3d45
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/src_invalid.yaml
@@ -0,0 +1,16 @@
+---
+- debug: msg="START cli/src_invalid.yaml on connection={{ ansible_connection }}"
+
+- name: configure with invalid src
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_config:
+ src: basic/foobar.j2
+
+- assert:
+ that:
+ - result.changed == false
+ - result.failed == true
+ - result.msg == 'path specified in src not found'
+
+- debug: msg="END cli/src_invalid.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/src_match_none.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/src_match_none.yaml
new file mode 100644
index 00000000..5a8cf448
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/src_match_none.yaml
@@ -0,0 +1,34 @@
+---
+- debug: msg="START cli/src_match_none.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface Loopback999
+ match: none
+
+- name: configure device with config
+ register: result
+ cisco.ios.ios_config:
+ src: basic/config.j2
+ match: none
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check device with config
+ register: result
+ cisco.ios.ios_config:
+ src: basic/config.j2
+
+- assert:
+ that:
+ - result.changed == false
+ - result.updates is not defined
+
+- debug: msg="END cli/src_match_none.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel.yaml
new file mode 100644
index 00000000..59f0c8b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel.yaml
@@ -0,0 +1,43 @@
+---
+- debug: msg="START cli/sublevel.yaml on connection={{ ansible_connection }}"
+
+- name: setup test
+ cisco.ios.ios_config:
+ lines:
+ - no ip access-list extended test
+ - no ip access-list standard test
+ match: none
+
+- name: configure sub level command
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - permit ip any any log
+ parents:
+ - ip access-list extended test
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip access-list extended test' in result.updates"
+ - "'permit ip any any log' in result.updates"
+
+- name: configure sub level command idempotent check
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - permit ip any any log
+ parents:
+ - ip access-list extended test
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - no ip access-list extended test
+ match: none
+
+- debug: msg="END cli/sublevel.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_block.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_block.yaml
new file mode 100644
index 00000000..ded1fccc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_block.yaml
@@ -0,0 +1,66 @@
+---
+- debug: msg="START cli/sublevel_block.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines:
+ - permit ip host 192.0.2.1 any log
+ - permit ip host 192.0.2.2 any log
+ - permit ip host 192.0.2.3 any log
+ parents:
+ - ip access-list extended test
+ before:
+ - no ip access-list extended test
+ after:
+ - exit
+ match: none
+
+- name: configure sub level command using block resplace
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - permit ip host 192.0.2.1 any log
+ - permit ip host 192.0.2.2 any log
+ - permit ip host 192.0.2.3 any log
+ - permit ip host 192.0.2.4 any log
+ parents:
+ - ip access-list extended test
+ replace: block
+ after:
+ - exit
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip access-list extended test' in result.updates"
+ - "'permit ip host 192.0.2.1 any log' in result.updates"
+ - "'permit ip host 192.0.2.2 any log' in result.updates"
+ - "'permit ip host 192.0.2.3 any log' in result.updates"
+ - "'permit ip host 192.0.2.4 any log' in result.updates"
+
+- name: check sub level command using block replace
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - permit ip host 192.0.2.1 any log
+ - permit ip host 192.0.2.2 any log
+ - permit ip host 192.0.2.3 any log
+ - permit ip host 192.0.2.4 any log
+ parents:
+ - ip access-list extended test
+ replace: block
+ after:
+ - exit
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - no ip access-list extended test
+ match: none
+
+- debug: msg="END cli/sublevel_block.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_exact.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_exact.yaml
new file mode 100644
index 00000000..d340184a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_exact.yaml
@@ -0,0 +1,62 @@
+---
+- debug: msg="START cli/sublevel_exact.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines:
+ - permit ip host 192.0.2.1 any log
+ - permit ip host 192.0.2.2 any log
+ - permit ip host 192.0.2.3 any log
+ - permit ip host 192.0.2.4 any log
+ - permit ip host 192.0.2.5 any log
+ parents: ip access-list extended test
+ before: no ip access-list extended test
+ after: exit
+ match: none
+
+- name: configure sub level command using exact match
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - permit ip host 192.0.2.1 any log
+ - permit ip host 192.0.2.2 any log
+ - permit ip host 192.0.2.3 any log
+ - permit ip host 192.0.2.4 any log
+ parents: ip access-list extended test
+ before: no ip access-list extended test
+ after: exit
+ match: exact
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip access-list extended test' in result.updates"
+ - "'permit ip host 192.0.2.1 any log' in result.updates"
+ - "'permit ip host 192.0.2.2 any log' in result.updates"
+ - "'permit ip host 192.0.2.3 any log' in result.updates"
+ - "'permit ip host 192.0.2.4 any log' in result.updates"
+ - "'permit ip host 192.0.2.5 any log' not in result.updates"
+
+- name: check sub level command using exact match
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - permit ip host 192.0.2.1 any log
+ - permit ip host 192.0.2.2 any log
+ - permit ip host 192.0.2.3 any log
+ - permit ip host 192.0.2.4 any log
+ parents: ip access-list extended test
+ match: exact
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - no ip access-list extended test
+ match: none
+
+- debug: msg="END cli/sublevel_exact.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_strict.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_strict.yaml
new file mode 100644
index 00000000..81d0e772
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_strict.yaml
@@ -0,0 +1,58 @@
+---
+- debug: msg="START cli/sublevel_strict.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines:
+ - permit ip host 192.0.2.1 any log
+ - permit ip host 192.0.2.2 any log
+ - permit ip host 192.0.2.3 any log
+ - permit ip host 192.0.2.4 any log
+ - permit ip host 192.0.2.5 any log
+ parents: ip access-list extended test
+ before: no ip access-list extended test
+ match: none
+
+- name: configure sub level command using strict match
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - permit ip host 192.0.2.1 any log
+ - permit ip host 192.0.2.2 any log
+ - permit ip host 192.0.2.3 any log
+ - permit ip host 192.0.2.4 any log
+ parents: ip access-list extended test
+ match: strict
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: check sub level command using strict match
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - permit ip host 192.0.2.1 any log
+ - permit ip host 192.0.2.3 any log
+ - permit ip host 192.0.2.2 any log
+ parents: ip access-list extended test
+ after: exit
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip access-list extended test' in result.updates"
+ - "'permit ip host 192.0.2.1 any log' not in result.updates"
+ - "'permit ip host 192.0.2.2 any log' in result.updates"
+ - "'permit ip host 192.0.2.3 any log' in result.updates"
+ - "'permit ip host 192.0.2.4 any log' not in result.updates"
+ - "'permit ip host 192.0.2.5 any log' not in result.updates"
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines: no ip access-list extended test
+ match: none
+
+- debug: msg="END cli/sublevel_strict.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml
new file mode 100644
index 00000000..9419dc3d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/sublevel_strict_mul_parents.yaml
@@ -0,0 +1,74 @@
+---
+- debug: msg="START cli/sublevel_strict_mul_parents.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines:
+ - class-map c1
+ - match precedence 7
+ - policy-map p1
+ - class c1
+ before:
+ - no policy-map p1
+ - no class-map c1
+ match: none
+
+- name: configure sub level command using strict match
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - set ip precedence 5
+ - police cir percent 10
+ parents:
+ - policy-map p1
+ - class c1
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+ - "'set ip precedence 5' in result.updates"
+ - "'police cir percent 10' in result.updates"
+
+- name: change sub level command order and config with strict match
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - police cir percent 10
+ - set ip precedence 5
+ parents:
+ - policy-map p1
+ - class c1
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+ - "'set ip precedence 5' in result.updates"
+ - "'police cir percent 10' in result.updates"
+
+- name: Config sub level command with strict match (Idempotency)
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - set ip precedence 5
+ - police cir percent 10
+ parents:
+ - policy-map p1
+ - class c1
+ match: strict
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - no policy-map p1
+ - no class-map c1
+ match: none
+
+- debug: msg="END cli/sublevel_strict_mul_parents.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel.yaml
new file mode 100644
index 00000000..6b951870
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel.yaml
@@ -0,0 +1,37 @@
+---
+- debug: msg="START cli/toplevel.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines:
+ - hostname {{ shorter_hostname }}
+ match: none
+
+- name: configure top level command
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - hostname foo
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+
+- name: configure top level command idempotent check
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - hostname foo
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - hostname {{ shorter_hostname }}
+ match: none
+
+- debug: msg="END cli/toplevel.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel_after.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel_after.yaml
new file mode 100644
index 00000000..1e139f68
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel_after.yaml
@@ -0,0 +1,45 @@
+---
+- debug: msg="START cli/toplevel_after.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines:
+ - snmp-server contact ansible
+ - hostname {{ shorter_hostname }}
+ match: none
+
+- name: configure top level command with before
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - hostname foo
+ after:
+ - snmp-server contact bar
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+ - "'snmp-server contact bar' in result.updates"
+
+- name: configure top level command with before idempotent check
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - hostname foo
+ after:
+ - snmp-server contact foo
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - no snmp-server contact
+ - hostname {{ shorter_hostname }}
+ match: none
+
+- debug: msg="END cli/toplevel_after.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel_before.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel_before.yaml
new file mode 100644
index 00000000..f90d629e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel_before.yaml
@@ -0,0 +1,45 @@
+---
+- debug: msg="START cli/toplevel_before.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines:
+ - snmp-server contact ansible
+ - hostname {{ shorter_hostname }}
+ match: none
+
+- name: configure top level command with before
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - hostname foo
+ before:
+ - snmp-server contact bar
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+ - "'snmp-server contact bar' in result.updates"
+
+- name: configure top level command with before idempotent check
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - hostname foo
+ before:
+ - snmp-server contact foo
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - no snmp-server contact
+ - hostname {{ shorter_hostname }}
+ match: none
+
+- debug: msg="END cli/toplevel_before.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml
new file mode 100644
index 00000000..e958eef3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli/toplevel_nonidempotent.yaml
@@ -0,0 +1,41 @@
+---
+- debug: msg="START cli/toplevel_nonidempotent.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines:
+ - hostname {{ shorter_hostname }}
+ match: none
+
+- name: configure top level command
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - hostname foo
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+
+- name: configure top level command idempotent check
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - hostname foo
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - hostname {{ shorter_hostname }}
+ match: none
+
+- debug: msg="END cli/toplevel_nonidempotent.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_backup.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_backup.yaml
new file mode 100644
index 00000000..3880a040
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_backup.yaml
@@ -0,0 +1,114 @@
+---
+- debug: msg="END cli_config/backup.yaml on connection={{ ansible_connection }}"
+
+- name: delete configurable backup file path
+ file:
+ path: '{{ item }}'
+ state: absent
+ with_items:
+ - '{{ role_path }}/backup_test_dir/'
+ - '{{ role_path }}/backup/backup.cfg'
+
+- name: collect any backup files
+ find:
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_files
+ connection: local
+
+- name: delete backup files
+ file:
+ path: '{{ item.path }}'
+ state: absent
+ with_items: '{{backup_files.files|default([])}}'
+
+- name: take config backup
+ become: true
+ register: result
+ ansible.netcommon.cli_config:
+ backup: true
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: collect any backup files
+ find:
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_files
+ connection: local
+
+- assert:
+ that:
+ - backup_files.files is defined
+
+- name: take configuration backup in custom filename and directory path
+ become: true
+ register: result
+ ansible.netcommon.cli_config:
+ backup: true
+ backup_options:
+ filename: backup.cfg
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-1 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- name: take configuration backup in custom filename
+ become: true
+ register: result
+ ansible.netcommon.cli_config:
+ backup: true
+ backup_options:
+ filename: backup.cfg
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-2 exist
+ find:
+ paths: '{{ role_path }}/backup/backup.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- name: take configuration backup in custom path and default filename
+ become: true
+ register: result
+ ansible.netcommon.cli_config:
+ backup: true
+ backup_options:
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-3 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- debug: msg="END cli_config/backup.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_basic.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_basic.yaml
new file mode 100644
index 00000000..2285fe3a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_basic.yaml
@@ -0,0 +1,44 @@
+---
+- debug: msg="START cli_config/cli_basic.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ ansible.netcommon.cli_config: &id002
+ config: "interface loopback999\nno description\nshutdown\n"
+ diff_match: none
+
+- name: configure device with config
+ register: result
+ ansible.netcommon.cli_config: &id001
+ config: "{{ lookup('template', 'basic/config.j2') }}"
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Idempotence
+ register: result
+ ansible.netcommon.cli_config: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove config
+ ansible.netcommon.cli_config: *id002
+
+- name: configure device with config
+ register: result
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/config.j2') }}"
+ defaults: true
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: teardown
+ ansible.netcommon.cli_config: *id002
+
+- debug: msg="END cli_config/cli_basic.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml
new file mode 100644
index 00000000..d5505579
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_block_replace.yaml
@@ -0,0 +1,34 @@
+---
+- debug: msg="START cli_config/cli_block_replace.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup - remove configuration
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/setupblock.j2') }}"
+ diff_match: none
+
+- name: block replace
+ register: result
+ ansible.netcommon.cli_config: &id001
+ config: "{{ lookup('template', 'basic/configblock.j2') }}"
+ diff_replace: block
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: block replace (Idempotence)
+ register: result
+ ansible.netcommon.cli_config: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ ansible.netcommon.cli_config:
+ config: no ip access-list extended test
+ diff_match: none
+
+- debug: msg="END cli_config/cli_block_replace.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml
new file mode 100644
index 00000000..4d5d95dd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_exact_match.yaml
@@ -0,0 +1,35 @@
+---
+- debug: msg="START cli_config/cli_exact_match.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup - remove configuration
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/setupexact.j2') }}"
+ diff_match: none
+
+- name: configure using exact match
+ register: result
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/configexact1.j2') }}"
+ diff_match: exact
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check using exact match
+ register: result
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/configexact2.j2') }}"
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ ansible.netcommon.cli_config:
+ config: no ip access-list extended test
+ diff_match: none
+
+- debug: msg="END cli_config/cli_exact_match.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml
new file mode 100644
index 00000000..bf86cf58
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/cli_config/cli_strict_match.yaml
@@ -0,0 +1,26 @@
+---
+- debug: msg="START cli_config/cli_strict_match.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup - remove configuration
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/setupstrict.j2') }}"
+ diff_match: none
+
+- name: configure using strict match
+ register: result
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/configstrict1.j2') }}"
+ diff_match: strict
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: teardown
+ ansible.netcommon.cli_config:
+ config: no ip access-list extended test
+ diff_match: none
+
+- debug: msg="END cli_config/cli_strict_match.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/redirection/shortname.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/redirection/shortname.yaml
new file mode 100644
index 00000000..7248eca0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_config/tests/redirection/shortname.yaml
@@ -0,0 +1,37 @@
+---
+- debug: msg="START cli/shortname.yaml on connection={{ ansible_connection }}"
+
+- name: Use src with module alias
+ register: result
+ cisco.ios.config:
+ src: basic/config.j2
+
+- assert:
+ that:
+ # make sure that the template content was read and not the path
+ - result.changed == true
+ - result.updates is defined
+
+- name: use module alias to take configuration backup
+ register: result
+ cisco.ios.config:
+ backup: true
+ backup_options:
+ filename: backup_with_alias.cfg
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-4 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup_with_alias.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- debug: msg="END cli/shortname.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/meta/main.yml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/all_facts.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/all_facts.yaml
new file mode 100644
index 00000000..beaa956f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/all_facts.yaml
@@ -0,0 +1,27 @@
+---
+- debug: msg="START cli/all_facts.yaml on connection={{ ansible_connection }}"
+
+- name: test getting all facts
+ register: result
+ cisco.ios.ios_facts:
+ gather_subset:
+ - all
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'config' in result.ansible_facts.ansible_net_gather_subset"
+ - "'hardware' in result.ansible_facts.ansible_net_gather_subset"
+ - "'default' in result.ansible_facts.ansible_net_gather_subset"
+ - "'interfaces' in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - result.ansible_facts.ansible_net_memfree_mb > 1
+ - result.ansible_facts.ansible_net_memtotal_mb > 1
+
+- assert:
+ that: '{{ item.value.spacetotal_kb }} > {{ item.value.spacefree_kb }}'
+ loop: "{{ lookup('dict', result.ansible_facts.ansible_net_filesystems_info, wantlist=True)\
+ \ }}"
+
+- debug: msg="END cli/all_facts.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/default_facts.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/default_facts.yaml
new file mode 100644
index 00000000..3499b0fc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/default_facts.yaml
@@ -0,0 +1,27 @@
+---
+- debug: msg="START cli/default_facts.yaml on connection={{ ansible_connection }}"
+
+- name: test getting default facts
+ register: result
+ cisco.ios.ios_facts:
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'hardware' in result.ansible_facts.ansible_net_gather_subset"
+ - "'default' in result.ansible_facts.ansible_net_gather_subset"
+ - "'interfaces' in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - "'config' not in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - result.ansible_facts.ansible_net_memtotal_mb > 10
+ - result.ansible_facts.ansible_net_interfaces | length > 1
+ - result.ansible_facts.ansible_net_config is not defined
+
+- assert:
+ that: '{{ item.value.spacetotal_kb }} > {{ item.value.spacefree_kb }}'
+ loop: "{{ lookup('dict', result.ansible_facts.ansible_net_filesystems_info, wantlist=True)\
+ \ }}"
+
+- debug: msg="END cli/default.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/invalid_subset.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/invalid_subset.yaml
new file mode 100644
index 00000000..fd483430
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/invalid_subset.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg="START cli/invalid_subset.yaml on connection={{ ansible_connection
+ }}"
+
+- name: test invalid subset (foobar)
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_facts:
+ gather_subset:
+ - foobar
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.failed == true
+ - result.msg == 'Subset must be one of [config, default, hardware, interfaces],
+ got foobar'
+
+- name: test subset specified multiple times
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!hardware'
+ - hardware
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.failed == true
+ - result.msg == 'Bad subset'
+ ignore_errors: true
+
+- debug: msg="END cli/invalid_subset.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/not_hardware.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/not_hardware.yaml
new file mode 100644
index 00000000..671c4c99
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_facts/tests/cli/not_hardware.yaml
@@ -0,0 +1,24 @@
+---
+- debug: msg="START cli/not_hardware_facts.yaml on connection={{ ansible_connection
+ }}"
+
+- name: test not hardware
+ register: result
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!hardware'
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'config' in result.ansible_facts.ansible_net_gather_subset"
+ - "'default' in result.ansible_facts.ansible_net_gather_subset"
+ - "'interfaces' in result.ansible_facts.ansible_net_gather_subset"
+ - "'hardware' not in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_interfaces | length > 1
+ - result.ansible_facts.ansible_net_filesystems is not defined
+ - result.ansible_facts.ansible_net_filesystems_info is not defined
+
+- debug: msg="END cli/not_hardware_facts.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/meta/main.yaml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tests/cli/basic.yaml
new file mode 100644
index 00000000..1fdf50e7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tests/cli/basic.yaml
@@ -0,0 +1,254 @@
+---
+- debug: msg="START ios_interface cli/basic.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Configure interface (setup)
+ register: result
+ cisco.ios.ios_interface:
+ name: '{{ test_interface }}'
+ description: test-interface-1
+ speed: 1000
+ mtu: 1800
+ state: present
+ provider: '{{ cli }}'
+
+- name: Configure interface
+ register: result
+ cisco.ios.ios_interface:
+ name: '{{ test_interface }}'
+ description: test-interface-initial
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"description test-interface-initial" in result.commands'
+
+- name: Confgure interface (idempotent)
+ register: result
+ cisco.ios.ios_interface:
+ name: '{{ test_interface }}'
+ description: test-interface-initial
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Confgure interface parameters
+ register: result
+ cisco.ios.ios_interface:
+ name: '{{ test_interface }}'
+ description: test-interface
+ mtu: 2000
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"description test-interface" in result.commands'
+ - '"mtu 2000" in result.commands'
+
+- name: Change interface parameters
+ register: result
+ cisco.ios.ios_interface:
+ name: '{{ test_interface }}'
+ description: test-interface-1
+ mtu: 1800
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"description test-interface-1" in result.commands'
+ - '"mtu 1800" in result.commands'
+
+- name: Disable interface
+ register: result
+ cisco.ios.ios_interface:
+ name: '{{ test_interface }}'
+ enabled: false
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"shutdown" in result.commands'
+
+- name: Enable interface
+ register: result
+ cisco.ios.ios_interface:
+ name: '{{ test_interface }}'
+ enabled: true
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"no shutdown" in result.commands'
+
+- name: Confgure second interface (setup)
+ register: result
+ cisco.ios.ios_interface:
+ name: '{{ test_interface2 }}'
+ description: test-interface-initial
+ speed: 1000
+ mtu: 1800
+ state: present
+ provider: '{{ cli }}'
+
+- name: Add interface aggregate
+ register: result
+ cisco.ios.ios_interface:
+ aggregate:
+
+ - name: '{{ test_interface }}'
+ mtu: 2000
+ description: test-interface-1
+
+ - name: '{{ test_interface2 }}'
+ mtu: 2000
+ description: test-interface-2
+ speed: 1000
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"mtu 2000" in result.commands'
+ - '"interface {{ test_interface2 }}" in result.commands'
+ - '"description test-interface-2" in result.commands'
+ - '"mtu 2000" in result.commands'
+
+- name: Add interface aggregate (idempotent)
+ register: result
+ cisco.ios.ios_interface:
+ aggregate:
+
+ - name: '{{ test_interface }}'
+ mtu: 2000
+ description: test-interface-1
+
+ - name: '{{ test_interface2 }}'
+ mtu: 2000
+ description: test-interface-2
+ speed: 1000
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Disable interface aggregate
+ register: result
+ cisco.ios.ios_interface:
+ aggregate:
+
+ - name: '{{ test_interface }}'
+
+ - name: '{{ test_interface2 }}'
+ enabled: false
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"shutdown" in result.commands'
+ - '"interface {{ test_interface2 }}" in result.commands'
+ - '"shutdown" in result.commands'
+
+- name: Enable interface aggregate
+ register: result
+ cisco.ios.ios_interface:
+ aggregate:
+
+ - name: '{{ test_interface }}'
+
+ - name: '{{ test_interface2 }}'
+ enabled: true
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"no shutdown" in result.commands'
+ - '"interface {{ test_interface2 }}" in result.commands'
+ - '"no shutdown" in result.commands'
+
+- name: loopback interface setup
+ cisco.ios.ios_interface:
+ aggregate:
+
+ - name: Loopback9
+
+ - name: Loopback10
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Create loopback interface aggregate
+ register: result
+ cisco.ios.ios_interface:
+ aggregate:
+
+ - name: Loopback9
+
+ - name: Loopback10
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface Loopback9" in result.commands'
+ - '"interface Loopback10" in result.commands'
+
+- name: Delete loopback interface aggregate
+ register: result
+ cisco.ios.ios_interface:
+ aggregate:
+
+ - name: Loopback9
+
+ - name: Loopback10
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no interface Loopback9" in result.commands'
+ - '"no interface Loopback10" in result.commands'
+
+- name: Delete loopback interface aggregate (idempotent)
+ register: result
+ cisco.ios.ios_interface:
+ aggregate:
+
+ - name: Loopback9
+
+ - name: Loopback10
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END ios_interface cli/basic.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tests/cli/intent.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tests/cli/intent.yaml
new file mode 100644
index 00000000..0665e111
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tests/cli/intent.yaml
@@ -0,0 +1,151 @@
+---
+- debug: msg="START ios_interface cli/intent.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Check intent arguments
+ register: result
+ cisco.ios.ios_interface:
+ name: '{{ test_interface }}'
+ state: up
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed == false
+
+- name: Check intent arguments (failed condition)
+ ignore_errors: true
+ register: result
+ cisco.ios.ios_interface:
+ name: '{{ test_interface }}'
+ state: down
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed == true
+ - "'state eq(down)' in result.failed_conditions"
+
+- name: Config + intent
+ register: result
+ cisco.ios.ios_interface:
+ name: '{{ test_interface }}'
+ enabled: false
+ state: down
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed == false
+
+- name: Config + intent (fail)
+ ignore_errors: true
+ register: result
+ cisco.ios.ios_interface:
+ name: '{{ test_interface }}'
+ enabled: false
+ provider: '{{ cli }}'
+ state: up
+
+- assert:
+ that:
+ - result.failed == true
+ - "'state eq(up)' in result.failed_conditions"
+
+- name: Register show neighbors detail
+ register: show_lldp_neighbors_result
+ cisco.ios.ios_command:
+ commands:
+ - show lldp neighbors
+ provider: '{{ cli }}'
+
+- block:
+
+ - name: Check neighbors intent arguments
+ register: result
+ cisco.ios.ios_interface:
+ name: Gi0/0
+ neighbors:
+
+ - port: eth0
+ host: netdev
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.failed == false
+
+ - name: Check neighbors intent arguments (failed condition)
+ ignore_errors: true
+ register: result
+ cisco.ios.ios_interface:
+ name: Gi0/0
+ neighbors:
+
+ - port: dummy_port
+ host: dummy_host
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.failed == true
+ - "'host dummy_host' in result.failed_conditions"
+ - "'port dummy_port' in result.failed_conditions"
+ when: '"netdev" in show_lldp_neighbors_result.stdout[0]'
+
+- name: Aggregate config + intent (pass)
+ ignore_errors: true
+ register: result
+ cisco.ios.ios_interface:
+ aggregate:
+
+ - name: '{{ test_interface }}'
+ enabled: true
+ state: up
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed == false
+
+- block:
+
+ - name: Aggregate neighbors intent (pass)
+ ignore_errors: true
+ register: result
+ cisco.ios.ios_interface:
+ aggregate:
+
+ - name: Gi0/0
+ neighbors:
+
+ - port: eth0
+ host: netdev
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.failed == false
+
+ - name: Aggregate neighbors intent (fail)
+ ignore_errors: true
+ register: result
+ cisco.ios.ios_interface:
+ aggregate:
+
+ - name: Gi0/0
+ neighbors:
+
+ - port: eth0
+ host: netdev
+
+ - port: dummy_port
+ host: dummy_host
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.failed == true
+ - "'host dummy_host' in result.failed_conditions"
+ - "'port dummy_port' in result.failed_conditions"
+ when: "'netdev' in show_lldp_neighbors_result.stdout[0]"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tests/cli/net_interface.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tests/cli/net_interface.yaml
new file mode 100644
index 00000000..5309775c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interface/tests/cli/net_interface.yaml
@@ -0,0 +1,46 @@
+---
+- debug: msg="START ios cli/net_interface.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Configure interface (setup)
+ register: result
+ ansible.netcommon.net_interface:
+ name: '{{ test_interface }}'
+ description: test-interface-1
+ speed: 1000
+ mtu: 1800
+ state: present
+ provider: '{{ cli }}'
+
+- name: Configure interface using platform agnostic module
+ register: result
+ ansible.netcommon.net_interface:
+ name: '{{ test_interface }}'
+ description: test-interface-initial
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"description test-interface-initial" in result.commands'
+
+- name: Confgure interface parameters using platform agnostic module
+ register: result
+ ansible.netcommon.net_interface:
+ name: '{{ test_interface }}'
+ description: test-interface
+ mtu: 2000
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"description test-interface" in result.commands'
+ - '"mtu 2000" in result.commands'
+
+- debug: msg="START ios cli/net_interface.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..7effa5c6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/_parsed.cfg
@@ -0,0 +1,11 @@
+interface GigabitEthernet0/1
+description interfaces 0/1
+mtu 110
+duplex half
+no shutdown
+interface GigabitEthernet0/2
+description interfaces 0/2
+mtu 2800
+speed 100
+duplex full
+shutdown \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..00c30911
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,8 @@
+---
+- name: Populate Config
+ vars:
+ lines: "interface GigabitEthernet 0/1\ndescription this is interface1\nmtu 65\n\
+ speed 10\nno shutdown\ninterface GigabitEthernet 0/2\ndescription this is interface\
+ \ for testing\nmtu 110\nduplex auto\nspeed 100\nshutdown\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..2c5d64a8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,9 @@
+---
+- name: Remove Config
+ vars:
+ lines: "interface loopback888\nno description\nno shutdown\ninterface loopback999\n\
+ no description\nno shutdown\ninterface GigabitEthernet 0/1\nno description\n\
+ no mtu\nno duplex\nno speed\nno shutdown\ninterface GigabitEthernet 0/2\n\
+ no description\nno mtu\nno duplex\nno speed\nno shutdown\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..3ada7a2d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,51 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_interfaces ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete attributes of all configured interfaces
+ register: result
+ cisco.ios.ios_interfaces: &id001
+ state: deleted
+
+ - debug:
+ msg:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) }}"
+ - "{{ deleted['before'] | symmetric_difference(result['before']) }}"
+ - "{{ deleted['after'] | symmetric_difference(result['after']) }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Delete attributes of all configured interfaces (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..2e8cd156
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START ios_interfaces empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..bb09af37
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START ios_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_interfaces:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - gathered['config'] | symmetric_difference(result.gathered) == []
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..3c87c2a6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,57 @@
+---
+- debug:
+ msg: START Merged ios_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.ios.ios_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/1
+ description: Configured and Merged by Ansible-Network
+ mtu: 110
+ enabled: true
+ duplex: half
+
+ - name: GigabitEthernet0/2
+ description: Configured and Merged by Ansible-Network
+ mtu: 2800
+ enabled: false
+ speed: 100
+ duplex: full
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..d08482fb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,53 @@
+---
+- debug:
+ msg: START Overridden ios_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device configuration of all interfaces with provided configuration
+ register: result
+ cisco.ios.ios_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/2
+ description: Configured and Overridden by Ansible-Network
+ enabled: false
+ duplex: full
+ mtu: 2000
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ overridden['before'] | symmetric_difference(result['before']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Override device configuration of all interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..ac58283a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START ios_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_interfaces:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+- assert:
+ that:
+ - result.changed == false
+ - parsed['config']|symmetric_difference(result.parsed) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..dc9e8344
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,29 @@
+---
+- debug:
+ msg: Start ios_interfaces rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+
+ - name: Render the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ description: Configured by Ansible-Network
+ mtu: 110
+ enabled: true
+ duplex: half
+ - name: GigabitEthernet0/2
+ description: Configured by Ansible-Network
+ mtu: 2800
+ enabled: false
+ speed: 100
+ duplex: full
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(rendered.commands) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..f3003344
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,55 @@
+---
+- debug:
+ msg: START Replaced ios_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ register: result
+ cisco.ios.ios_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/1
+ description: Configured and Replaced by Ansible-Network
+ mtu: 110
+
+ - name: GigabitEthernet0/2
+ description: Configured and Replaced by Ansible-Network
+ speed: 10
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/vars/main.yaml
new file mode 100644
index 00000000..0ae1cead
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_interfaces/vars/main.yaml
@@ -0,0 +1,251 @@
+---
+merged:
+ before:
+ - enabled: true
+ name: loopback888
+ - enabled: true
+ name: loopback999
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/0
+ speed: auto
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/1
+ speed: auto
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/2
+ speed: auto
+ commands:
+ - interface GigabitEthernet0/1
+ - description Configured and Merged by Ansible-Network
+ - mtu 110
+ - duplex half
+ - interface GigabitEthernet0/2
+ - description Configured and Merged by Ansible-Network
+ - mtu 2800
+ - speed 100
+ - duplex full
+ - shutdown
+ after:
+ - enabled: true
+ name: loopback888
+ - enabled: true
+ name: loopback999
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/0
+ speed: auto
+ - description: Configured and Merged by Ansible-Network
+ duplex: half
+ enabled: true
+ mtu: 110
+ name: GigabitEthernet0/1
+ speed: auto
+ - description: Configured and Merged by Ansible-Network
+ duplex: full
+ enabled: false
+ mtu: 2800
+ name: GigabitEthernet0/2
+ speed: '100'
+replaced:
+ before:
+ - enabled: true
+ name: loopback888
+ - enabled: true
+ name: loopback999
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/0
+ speed: auto
+ - description: this is interface1
+ duplex: auto
+ enabled: true
+ mtu: 65
+ name: GigabitEthernet0/1
+ speed: '10'
+ - description: this is interface for testing
+ duplex: auto
+ enabled: false
+ mtu: 110
+ name: GigabitEthernet0/2
+ speed: '100'
+ commands:
+ - interface GigabitEthernet0/1
+ - no speed
+ - description Configured and Replaced by Ansible-Network
+ - mtu 110
+ - interface GigabitEthernet0/2
+ - no shutdown
+ - no mtu
+ - description Configured and Replaced by Ansible-Network
+ - speed 10
+ after:
+ - enabled: true
+ name: loopback888
+ - enabled: true
+ name: loopback999
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/0
+ speed: auto
+ - description: Configured and Replaced by Ansible-Network
+ duplex: auto
+ enabled: true
+ mtu: 110
+ name: GigabitEthernet0/1
+ speed: auto
+ - description: Configured and Replaced by Ansible-Network
+ duplex: auto
+ enabled: true
+ name: GigabitEthernet0/2
+ speed: '10'
+overridden:
+ before:
+ - enabled: true
+ name: loopback888
+ - enabled: true
+ name: loopback999
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/0
+ speed: auto
+ - description: this is interface1
+ duplex: auto
+ enabled: true
+ mtu: 65
+ name: GigabitEthernet0/1
+ speed: '10'
+ - description: this is interface for testing
+ duplex: auto
+ enabled: false
+ mtu: 110
+ name: GigabitEthernet0/2
+ speed: '100'
+ commands:
+ - interface GigabitEthernet0/1
+ - no description
+ - no speed
+ - no mtu
+ - interface GigabitEthernet0/2
+ - no speed
+ - description Configured and Overridden by Ansible-Network
+ - mtu 2000
+ - duplex full
+ after:
+ - enabled: true
+ name: loopback888
+ - enabled: true
+ name: loopback999
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/0
+ speed: auto
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/1
+ speed: auto
+ - description: Configured and Overridden by Ansible-Network
+ duplex: full
+ enabled: false
+ mtu: 2000
+ name: GigabitEthernet0/2
+ speed: auto
+deleted:
+ before:
+ - enabled: true
+ name: loopback888
+ - enabled: true
+ name: loopback999
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/0
+ speed: auto
+ - description: this is interface1
+ duplex: auto
+ enabled: true
+ mtu: 65
+ name: GigabitEthernet0/1
+ speed: '10'
+ - description: this is interface for testing
+ duplex: auto
+ enabled: false
+ mtu: 110
+ name: GigabitEthernet0/2
+ speed: '100'
+ commands:
+ - interface GigabitEthernet0/1
+ - no description
+ - no speed
+ - no mtu
+ - interface GigabitEthernet0/2
+ - no description
+ - no shutdown
+ - no speed
+ - no mtu
+ after:
+ - enabled: true
+ name: loopback888
+ - enabled: true
+ name: loopback999
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/0
+ speed: auto
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/1
+ speed: auto
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/2
+ speed: auto
+gathered:
+ config:
+ - enabled: true
+ name: loopback888
+ - enabled: true
+ name: loopback999
+ - duplex: auto
+ enabled: true
+ name: GigabitEthernet0/0
+ speed: auto
+ - description: this is interface1
+ duplex: auto
+ enabled: true
+ mtu: 65
+ name: GigabitEthernet0/1
+ speed: "10"
+ - description: this is interface for testing
+ duplex: auto
+ enabled: false
+ mtu: 110
+ name: GigabitEthernet0/2
+ speed: "100"
+parsed:
+ config:
+ - description: interfaces 0/1
+ duplex: half
+ enabled: true
+ mtu: 110
+ name: GigabitEthernet0/1
+ - description: interfaces 0/2
+ duplex: full
+ enabled: true
+ mtu: 2800
+ name: GigabitEthernet0/2
+ speed: "100"
+rendered:
+ commands:
+ - interface GigabitEthernet0/1
+ - description Configured by Ansible-Network
+ - mtu 110
+ - duplex half
+ - no shutdown
+ - interface GigabitEthernet0/2
+ - description Configured by Ansible-Network
+ - mtu 2800
+ - speed 100
+ - duplex full
+ - shutdown
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/meta/main.yml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tasks/cli.yaml
new file mode 100644
index 00000000..c00ee31e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tasks/cli.yaml
@@ -0,0 +1,27 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found:
+
+ - files: '{{ test_items|default([]) }}'
+ skip: true
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tasks/main.yaml
new file mode 100644
index 00000000..f4c48370
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tasks/main.yaml
@@ -0,0 +1,6 @@
+---
+- block:
+ - include: cli.yaml
+ tags:
+ - network_cli
+ when: switch_type == "L2"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tests/cli/agg.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tests/cli/agg.yaml
new file mode 100644
index 00000000..ed2a05c1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tests/cli/agg.yaml
@@ -0,0 +1,106 @@
+---
+- debug: msg="START connection={{ ansible_connection }} ios_l2_interface aggregate
+ test"
+
+- name: Setup - Ensure interfaces are switchport
+ loop:
+ - '{{ test_interface }}'
+ - '{{ test_interface2 }}'
+ cisco.ios.ios_config:
+ lines:
+ - switchport
+ parents:
+ - interface {{ item }}
+
+- name: Setup vlans
+ cisco.ios.ios_vlan:
+ aggregate:
+
+ - vlan_id: 6
+
+ - vlan_id: 15
+ provider: '{{ cli }}'
+
+- name: Setup - Remove interface aggregate before testing
+ cisco.ios.ios_l2_interface:
+ aggregate:
+
+ - name: '{{ test_interface }}'
+ mode: access
+ access_vlan: 6
+
+ - name: '{{ test_interface2 }}'
+ mode: access
+ access_vlan: 15
+ state: absent
+ provider: '{{ cli }}'
+
+- block:
+
+ - name: Configure interface for access_vlan aggregate
+ register: result
+ cisco.ios.ios_l2_interface: &id001
+ aggregate:
+
+ - name: '{{ test_interface }}'
+ mode: access
+ access_vlan: 6
+
+ - name: '{{ test_interface2 }}'
+ mode: access
+ access_vlan: 15
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Configure interface for access_vlan aggregate(Idempotence)
+ register: result
+ cisco.ios.ios_l2_interface: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Remove interface aggregate
+ register: result
+ cisco.ios.ios_l2_interface: &id002
+ aggregate:
+
+ - name: '{{ test_interface }}'
+ mode: access
+ access_vlan: 6
+
+ - name: '{{ test_interface2 }}'
+ mode: access
+ access_vlan: 15
+ provider: '{{ cli }}'
+ state: absent
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Remove interface aggregate(Idempotence)
+ register: result
+ cisco.ios.ios_l2_interface: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - name: remove vlans
+ ignore_errors: true
+ cisco.ios.ios_vlan:
+ aggregate:
+
+ - vlan_id: 6
+
+ - vlan_id: 15
+ state: absent
+ provider: '{{ cli }}'
+
+- debug: msg="END connection={{ ansible_connection }} ios_l2_interface aggregate
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tests/cli/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tests/cli/sanity.yaml
new file mode 100644
index 00000000..15a8a237
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interface/tests/cli/sanity.yaml
@@ -0,0 +1,186 @@
+---
+- debug: msg="START connection={{ ansible_connection }} ios_l2_interface sanity
+ test"
+
+- name: Setup interface
+ cisco.ios.ios_config: &id009
+ lines:
+ - default interface {{ test_interface }}
+ provider: '{{ cli }}'
+
+- name: set trunk encapsulation type
+ cisco.ios.ios_config:
+ lines:
+ - switchport trunk encapsulation dot1q
+ parents:
+ - interface {{ test_interface }}
+ provider: '{{ cli }}'
+
+- name: Setup vlans
+ cisco.ios.ios_vlan:
+ aggregate:
+
+ - vlan_id: 5
+
+ - vlan_id: 6
+
+ - vlan_id: 7
+
+ - vlan_id: 8
+
+ - vlan_id: 9
+
+ - vlan_id: 10
+
+ - vlan_id: 20
+ provider: '{{ cli }}'
+
+- block:
+
+ - name: Ensure interface is in its default switchport state
+ cisco.ios.ios_l2_interface: &id008
+ name: '{{ test_interface }}'
+ state: unconfigured
+ provider: '{{ cli }}'
+
+ - name: Ensure interface is configured for access vlan 20
+ register: result
+ cisco.ios.ios_l2_interface: &id001
+ name: '{{ test_interface }}'
+ mode: access
+ access_vlan: 20
+ provider: '{{ cli }}'
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: access vlan Idempotence
+ register: result
+ cisco.ios.ios_l2_interface: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Ensure interface only has vlans 5-10 as trunk vlans
+ register: result
+ cisco.ios.ios_l2_interface: &id003
+ name: '{{ test_interface }}'
+ mode: trunk
+ native_vlan: 10
+ trunk_allowed_vlans: 5-10
+ provider: '{{ cli }}'
+
+ - assert: *id002
+
+ - name: trunk vlan Idempotence
+ register: result
+ cisco.ios.ios_l2_interface: *id003
+
+ - assert: *id004
+
+ - name: Ensure interface is a trunk port and ensure 2-50 are being tagged (doesn't
+ mean others aren't also being tagged)
+ register: result
+ cisco.ios.ios_l2_interface: &id005
+ name: '{{ test_interface }}'
+ mode: trunk
+ native_vlan: 10
+ trunk_vlans: 2-50
+ provider: '{{ cli }}'
+
+ - assert: *id002
+
+ - name: tag vlan Idempotence
+ register: result
+ cisco.ios.ios_l2_interface: *id005
+
+ - assert: *id004
+
+ - name: Remove full trunk vlan range 2-50
+ register: result
+ cisco.ios.ios_l2_interface: &id006
+ name: '{{ test_interface }}'
+ mode: trunk
+ trunk_vlans: 2-50
+ state: absent
+ provider: '{{ cli }}'
+
+ - assert: *id002
+
+ - name: Check Idempotence Remove full trunk vlan range 2-50
+ register: result
+ cisco.ios.ios_l2_interface: *id006
+
+ - assert: *id004
+
+ - name: Reconfigure interface trunk port and ensure 2-50 are being tagged
+ register: result
+ cisco.ios.ios_l2_interface: *id005
+
+ - assert: *id002
+
+ - name: Check Idempotence Reconfigure interface trunk port and ensure 2-50 are
+ being tagged
+ register: result
+ cisco.ios.ios_l2_interface: *id005
+
+ - assert: *id004
+
+ - name: Remove partial trunk vlan range 30-4094 are removed
+ register: result
+ cisco.ios.ios_l2_interface: &id007
+ name: '{{ test_interface }}'
+ mode: trunk
+ trunk_vlans: 30-4094
+ state: absent
+ provider: '{{ cli }}'
+
+ - assert: *id002
+
+ - name: Check Idempotence Remove partial trunk vlan range 30-4094 are removed
+ register: result
+ cisco.ios.ios_l2_interface: *id007
+
+ - assert: *id004
+
+ - name: put interface default state
+ register: result
+ cisco.ios.ios_l2_interface: *id008
+
+ - assert: *id002
+
+ - name: default state idempotence
+ register: result
+ cisco.ios.ios_l2_interface: *id008
+
+ - assert: *id004
+ always:
+
+ - name: remove vlans
+ ignore_errors: true
+ cisco.ios.ios_vlan:
+ aggregate:
+
+ - vlan_id: 5
+
+ - vlan_id: 6
+
+ - vlan_id: 7
+
+ - vlan_id: 8
+
+ - vlan_id: 9
+
+ - vlan_id: 10
+
+ - vlan_id: 20
+ state: absent
+ provider: '{{ cli }}'
+
+ - name: default interface
+ ignore_errors: true
+ cisco.ios.ios_config: *id009
+
+- debug: msg="END connection={{ ansible_connection }} ios_l2_interface sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..b14576a6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Get the IOS version
+ cisco.ios.ios_facts:
+ gather_subset: all
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..a0ffc5f9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_parsed.cfg
@@ -0,0 +1,8 @@
+interface GigabitEthernet0/1
+ switchport mode access
+ switchport access vlan 30
+interface GigabitEthernet0/2
+ switchport trunk allowed vlan 15-20,40
+ switchport trunk encapsulation dot1q
+ switchport trunk native vlan 20
+ switchport trunk pruning vlan 10,20 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..71449eae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,10 @@
+---
+- name: Populate Config
+ vars:
+ lines: "interface GigabitEthernet 0/1\nswitchport access vlan 10\ninterface\
+ \ GigabitEthernet 0/2\nswitchport trunk encapsulation dot1q\nswitchport trunk\
+ \ native vlan 10\nswitchport trunk allowed vlan 10-20,40\nswitchport trunk\
+ \ pruning vlan 10,20\nswitchport mode trunk\n"
+ when: ansible_net_version != "15.6(2)T"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..339e37d6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,12 @@
+---
+- name: Remove Config
+ vars:
+ lines: "interface GigabitEthernet 0/1\nno switchport access vlan\nno switchport\
+ \ trunk encapsulation\nno switchport trunk native vlan\nno switchport trunk\
+ \ allowed vlan\nno switchport trunk pruning vlan\nno switchport mode\nno switchport voice vlan\ninterface\
+ \ GigabitEthernet 0/2\nno switchport access vlan\nno switchport trunk encapsulation\n\
+ no switchport trunk native vlan\nno switchport trunk allowed vlan\nno switchport\
+ \ trunk pruning vlan\nno switchport mode\nno switchport voice vlan\n"
+ when: ansible_net_version != "15.6(2)T"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_remove_vlan_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_remove_vlan_config.yaml
new file mode 100644
index 00000000..15e3eb58
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/_remove_vlan_config.yaml
@@ -0,0 +1,5 @@
+---
+- name: Remove ALL VLAN Config
+ cisco.ios.ios_vlans:
+ state: deleted
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..c80c7609
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,47 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_l2_interfaces ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete L2 attributes from all configured interfaces
+ register: result
+ cisco.ios.ios_l2_interfaces: &id001
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Delete attributes of all configured interfaces (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_l2_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_vlan_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..ce93edb3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START ios_l2_interfaces empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_l2_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_l2_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_l2_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_l2_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_l2_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..852d586b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START ios_l2_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_l2_interfaces:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - gathered['config'] | symmetric_difference(result.gathered) == []
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..03fbf9e7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,97 @@
+---
+- debug:
+ msg: START Merged ios_l2_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.ios.ios_l2_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/1
+ access:
+ vlan: 30
+ voice:
+ vlan: 40
+ - name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans: 15-20,40
+ native_vlan: 20
+ pruning_vlans: 10,20
+ encapsulation: dot1q
+ mode: trunk
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_l2_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+
+ - name: Merge new configuration with already merged configuration
+ register: result
+ cisco.ios.ios_l2_interfaces: &id002
+ config:
+ - name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans: 200
+ pruning_vlans: 40-60
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged_again['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged_again['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge new configuration with already merged configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_l2_interfaces: *id002
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_vlan_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..36370507
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,55 @@
+---
+- debug:
+ msg: START Overridden ios_l2_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device L2 configuration from all interfaces with provided configuration
+ register: result
+ cisco.ios.ios_l2_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans: 30-35,40
+ native_vlan: 30
+ encapsulation: isl
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ overridden['before'] | symmetric_difference(result['before']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Override device L2 configuration from all interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_l2_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_vlan_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..29dfe300
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,18 @@
+---
+- debug:
+ msg: START ios_l2_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+ - name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_l2_interfaces:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+ - assert:
+ that:
+ - result.changed == false
+ - parsed['config']|symmetric_difference(result.parsed) == []
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..e1e02ed4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,30 @@
+---
+- debug:
+ msg: Start ios_l2_interfaces rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+
+ - name: Render the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_l2_interfaces:
+ config:
+
+ - name: GigabitEthernet0/1
+ access:
+ vlan: 30
+
+ - name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans: 10-20,40
+ native_vlan: 20
+ pruning_vlans: 10,20
+ encapsulation: dot1q
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(rendered.commands) == []
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..fe8e7d62
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,61 @@
+---
+- debug:
+ msg: START Replaced ios_l2_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device L2 configuration from listed interfaces with provided
+ configuration
+ register: result
+ cisco.ios.ios_l2_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/1
+ access:
+ vlan: 40
+ voice:
+ vlan: 20
+ - name: GigabitEthernet0/2
+ trunk:
+ native_vlan: 20
+ pruning_vlans: 10-20,30
+ encapsulation: dot1q
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Replaces device L2 configuration from listed interfaces with provided
+ configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_l2_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
+ - include_tasks: _remove_vlan_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..6243c860
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,65 @@
+---
+- debug:
+ msg: START ios_l2_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ access:
+ vlan: 30
+ - mode: trunk
+ name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans: 15-20,40
+ native_vlan: 20
+ pruning_vlans: 10,20
+ encapsulation: dot1q
+ state: merged
+
+ - name: Gather L2 interfaces facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - l2_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.ios.ios_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans: 30-35,40
+ native_vlan: 30
+ encapsulation: isl
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 8
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.ios.ios_l2_interfaces:
+ config: "{{ ansible_facts['network_resources']['l2_interfaces'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 7
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/vars/main.yaml
new file mode 100644
index 00000000..251b5585
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l2_interfaces/vars/main.yaml
@@ -0,0 +1,213 @@
+---
+merged:
+ before:
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ - name: GigabitEthernet0/2
+ commands:
+ - interface GigabitEthernet0/1
+ - switchport access vlan 30
+ - switchport voice vlan 40
+ - interface GigabitEthernet0/2
+ - switchport trunk encapsulation dot1q
+ - switchport trunk native vlan 20
+ - switchport trunk allowed vlan 15-20,40
+ - switchport trunk pruning vlan 10,20
+ - switchport mode trunk
+ after:
+ - name: GigabitEthernet0/0
+ - access:
+ vlan: 30
+ voice:
+ vlan: 40
+ name: GigabitEthernet0/1
+ - mode: trunk
+ name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans:
+ - 15-20
+ - '40'
+ encapsulation: dot1q
+ native_vlan: 20
+ pruning_vlans:
+ - '10'
+ - '20'
+merged_again:
+ commands:
+ - interface GigabitEthernet0/2
+ - switchport trunk allowed vlan 200,15-20,40
+ - switchport trunk pruning vlan 40-60,10,20
+ after:
+ - name: GigabitEthernet0/0
+ - access:
+ vlan: 30
+ name: GigabitEthernet0/1
+ - mode: trunk
+ name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans:
+ - 15-20
+ - '40'
+ - '200'
+ encapsulation: dot1q
+ native_vlan: 20
+ pruning_vlans:
+ - '10'
+ - '20'
+ - 40-60
+replaced:
+ before:
+ - name: GigabitEthernet0/0
+ - access:
+ vlan: 10
+ name: GigabitEthernet0/1
+ - mode: trunk
+ name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans:
+ - 10-20
+ - '40'
+ encapsulation: dot1q
+ native_vlan: 10
+ pruning_vlans:
+ - '10'
+ - '20'
+ commands:
+ - interface GigabitEthernet0/1
+ - switchport access vlan 40
+ - switchport voice vlan 20
+ - interface GigabitEthernet0/2
+ - no switchport mode
+ - no switchport trunk allowed vlan
+ - switchport trunk native vlan 20
+ - switchport trunk pruning vlan 10-20,30
+ after:
+ - name: GigabitEthernet0/0
+ - access:
+ vlan: 40
+ name: GigabitEthernet0/1
+ voice:
+ vlan: 20
+ - name: GigabitEthernet0/2
+ trunk:
+ encapsulation: dot1q
+ native_vlan: 20
+ pruning_vlans:
+ - 10-20
+ - '30'
+overridden:
+ before:
+ - name: GigabitEthernet0/0
+ - access:
+ vlan: 10
+ name: GigabitEthernet0/1
+ - mode: trunk
+ name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans:
+ - 10-20
+ - '40'
+ encapsulation: dot1q
+ native_vlan: 10
+ pruning_vlans:
+ - '10'
+ - '20'
+ commands:
+ - interface GigabitEthernet0/1
+ - no switchport access vlan
+ - interface GigabitEthernet0/2
+ - no switchport mode
+ - no switchport trunk pruning vlan
+ - switchport trunk encapsulation isl
+ - switchport trunk native vlan 30
+ - switchport trunk allowed vlan 30-35,40
+ after:
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ - name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans:
+ - 30-35
+ - '40'
+ encapsulation: isl
+ native_vlan: 30
+deleted:
+ before:
+ - name: GigabitEthernet0/0
+ - access:
+ vlan: 10
+ name: GigabitEthernet0/1
+ - mode: trunk
+ name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans:
+ - 10-20
+ - '40'
+ encapsulation: dot1q
+ native_vlan: 10
+ pruning_vlans:
+ - '10'
+ - '20'
+ commands:
+ - interface GigabitEthernet0/1
+ - no switchport access vlan
+ - interface GigabitEthernet0/2
+ - no switchport mode
+ - no switchport trunk encapsulation
+ - no switchport trunk native vlan
+ - no switchport trunk allowed vlan
+ - no switchport trunk pruning vlan
+ after:
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ - name: GigabitEthernet0/2
+gathered:
+ config:
+ - access:
+ vlan: 30
+ name: GigabitEthernet0/1
+ - mode: trunk
+ name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans:
+ - "10-20"
+ - "40"
+ encapsulation: dot1q
+ native_vlan: 10
+ pruning_vlans:
+ - "10"
+ - "20"
+parsed:
+ config:
+ - access:
+ vlan: 30
+ mode: access
+ name: GigabitEthernet0/1
+ - name: GigabitEthernet0/2
+ trunk:
+ allowed_vlans:
+ - "15-20"
+ - "40"
+ encapsulation: dot1q
+ native_vlan: 20
+ pruning_vlans:
+ - "10"
+ - "20"
+rendered:
+ commands:
+ - interface GigabitEthernet0/1
+ - switchport access vlan 30
+ - interface GigabitEthernet0/2
+ - switchport trunk encapsulation dot1q
+ - switchport trunk native vlan 20
+ - switchport trunk allowed vlan 10-20,40
+ - switchport trunk pruning vlan 10,20
+rtt:
+ commands:
+ - interface GigabitEthernet0/1
+ - switchport access vlan 30
+ - interface GigabitEthernet0/2
+ - switchport trunk encapsulation dot1q
+ - switchport trunk native vlan 20
+ - switchport trunk allowed vlan 15-20,40
+ - switchport trunk pruning vlan 10,20
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/meta/main.yaml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/tests/cli/basic.yaml
new file mode 100644
index 00000000..3b02731b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interface/tests/cli/basic.yaml
@@ -0,0 +1,280 @@
+---
+- debug: msg="START ios_l3_interface cli/basic.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Delete interface ipv4 and ipv6 address(setup)
+ register: result
+ cisco.ios.ios_l3_interface:
+ name: '{{ test_interface }}'
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Setup - Ensure interfaces are switchport
+ loop:
+ - '{{ test_interface }}'
+ - '{{ test_interface2 }}'
+ cisco.ios.ios_config:
+ lines:
+ - no shutdown
+ parents:
+ - interface {{ item }}
+ provider: '{{ cli }}'
+
+- name: Configure interface ipv4 address
+ register: result
+ cisco.ios.ios_l3_interface:
+ name: '{{ test_interface }}'
+ ipv4: 192.168.20.1/24
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"ip address 192.168.20.1 255.255.255.0" in result.commands'
+
+- name: Configure interface ipv4 address (idempotent)
+ register: result
+ cisco.ios.ios_l3_interface:
+ name: '{{ test_interface }}'
+ ipv4: 192.168.20.1/24
+ state: present
+ provider: '{{ cli }}'
+
+- assert: &id002
+ that:
+ - result.changed == false
+
+- name: Assign same ipv4 address to other interface (fail)
+ ignore_errors: true
+ register: result
+ cisco.ios.ios_l3_interface:
+ name: '{{ test_interface2 }}'
+ ipv4: 192.168.20.1/24
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+
+- name: Change interface ipv4 address
+ register: result
+ cisco.ios.ios_l3_interface:
+ name: '{{ test_interface }}'
+ ipv4: dhcp
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"ip address dhcp" in result.commands'
+
+- name: Configure interface ipv6 address
+ register: result
+ cisco.ios.ios_l3_interface: &id001
+ name: '{{ test_interface }}'
+ ipv6: fd5d:12c9:2201:1::1/64
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"ipv6 address fd5d:12c9:2201:1::1/64" in result.commands'
+
+- name: Configure interface ipv6 address (idempotent)
+ register: result
+ cisco.ios.ios_l3_interface: *id001
+
+- assert: *id002
+
+- name: Configure second ipv6 address on interface
+ register: result
+ cisco.ios.ios_l3_interface: &id003
+ name: '{{ test_interface }}'
+ ipv6: fd5d:12c9:2291:1::1/64
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"ipv6 address fd5d:12c9:2291:1::1/64" in result.commands'
+
+- name: Ensure first ipv6 address still associated with interface
+ register: result
+ cisco.ios.ios_l3_interface: *id001
+
+- assert: *id002
+
+- name: Ensure second ipv6 address still associated with interface
+ register: result
+ cisco.ios.ios_l3_interface: *id003
+
+- assert: *id002
+
+- name: Assign same ipv6 address to other interface (fail)
+ ignore_errors: true
+ register: result
+ cisco.ios.ios_l3_interface:
+ name: '{{ test_interface2 }}'
+ ipv6: fd5d:12c9:2201:1::1/64
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+
+- name: Change interface ipv6 address
+ register: result
+ cisco.ios.ios_l3_interface:
+ name: '{{ test_interface }}'
+ ipv6: dhcp
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"ipv6 address dhcp" in result.commands'
+
+- name: Delete interface ipv4 and ipv6 address
+ register: result
+ cisco.ios.ios_l3_interface:
+ name: '{{ test_interface }}'
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"no ip address" in result.commands'
+ - '"no ipv6 address" in result.commands'
+
+- name: Delete interface ipv4 and ipv6 address (idempotent)
+ register: result
+ cisco.ios.ios_l3_interface:
+ name: '{{ test_interface }}'
+ state: absent
+ provider: '{{ cli }}'
+
+- assert: *id002
+
+- name: Delete second interface ipv4 and ipv6 address (setup)
+ register: result
+ cisco.ios.ios_l3_interface:
+ name: '{{ test_interface2 }}'
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Configure ipv4 and ipv6 address using aggregate
+ register: result
+ cisco.ios.ios_l3_interface:
+ aggregate:
+
+ - name: '{{ test_interface }}'
+ ipv4: 192.161.0.1/24
+ ipv6: fd5d:12c9:2201:2::2/64
+
+ - name: '{{ test_interface2 }}'
+ ipv4: 192.162.0.2/16
+ ipv6: fd5e:12c9:2201:3::3/32
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"ip address 192.161.0.1 255.255.255.0" in result.commands'
+ - '"ipv6 address fd5d:12c9:2201:2::2/64" in result.commands'
+ - '"interface {{ test_interface2 }}" in result.commands'
+ - '"ip address 192.162.0.2 255.255.0.0" in result.commands'
+ - '"ipv6 address fd5e:12c9:2201:3::3/32" in result.commands'
+
+- name: Configure ipv4 and ipv6 address using aggregate (idempotent)
+ register: result
+ cisco.ios.ios_l3_interface:
+ aggregate:
+
+ - name: '{{ test_interface }}'
+ ipv4: 192.161.0.1/24
+ ipv6: fd5d:12c9:2201:2::2/64
+
+ - name: '{{ test_interface2 }}'
+ ipv4: 192.162.0.2/16
+ ipv6: fd5e:12c9:2201:3::3/32
+ provider: '{{ cli }}'
+
+- assert: *id002
+
+- name: Change ipv4 and ipv6 address using aggregate
+ register: result
+ cisco.ios.ios_l3_interface:
+ aggregate:
+
+ - name: '{{ test_interface }}'
+ ipv4: 193.167.1.1/8
+ ipv6: fd5a:12c9:2201:4::4/32
+
+ - name: '{{ test_interface2 }}'
+ ipv4: 192.169.2.2/24
+ ipv6: fd5b:12c9:2201:5::5/90
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"ip address 193.167.1.1 255.0.0.0" in result.commands'
+ - '"ipv6 address fd5a:12c9:2201:4::4/32" in result.commands'
+ - '"interface {{ test_interface2 }}" in result.commands'
+ - '"ip address 192.169.2.2 255.255.255.0" in result.commands'
+ - '"ipv6 address fd5b:12c9:2201:5::5/90" in result.commands'
+
+- name: Delete ipv4 and ipv6 address using aggregate
+ register: result
+ cisco.ios.ios_l3_interface:
+ aggregate:
+
+ - name: '{{ test_interface }}'
+
+ - name: '{{ test_interface2 }}'
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"no ip address" in result.commands'
+ - '"no ipv6 address" in result.commands'
+ - '"interface {{ test_interface2 }}" in result.commands'
+ - '"no ip address" in result.commands'
+ - '"no ipv6 address" in result.commands'
+
+- name: Delete ipv4 and ipv6 address using aggregate (idempotent)
+ register: result
+ cisco.ios.ios_l3_interface:
+ aggregate:
+
+ - name: '{{ test_interface }}'
+
+ - name: '{{ test_interface2 }}'
+ state: absent
+ provider: '{{ cli }}'
+
+- assert: *id002
+
+- debug: msg="END ios_l3_interface cli/basic.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..dc22f5fc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/_parsed.cfg
@@ -0,0 +1,6 @@
+interface GigabitEthernet0/1
+ ip address dhcp client-id GigabitEthernet 0/0 hostname test.com
+interface GigabitEthernet0/2
+ ip address 198.51.100.1 255.255.255.0 secondary
+ ip address 198.51.100.2 255.255.255.0
+ ipv6 address 2001:db8:0:3::/64 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..9d3861d3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,8 @@
+---
+- name: Populate Config
+ vars:
+ lines: "interface GigabitEthernet 0/1\nip address 203.0.113.27 255.255.255.0\n\
+ interface GigabitEthernet 0/2\nip address 192.0.2.1 255.255.255.0 secondary\n\
+ ip address 192.0.2.2 255.255.255.0\nipv6 address 2001:db8:0:3::/64\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..14b8fbdf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,7 @@
+---
+- name: Remove Config
+ vars:
+ lines: "interface Loopback 999\nno ip address\ninterface GigabitEthernet 0/1\nno ip address\nno ipv6 address\ninterface\
+ \ GigabitEthernet 0/2\nno ip address\nno ipv6 address\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..c2929490
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,50 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_l3_interfaces ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete attributes of provided configured interfaces
+ register: result
+ cisco.ios.ios_l3_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/1
+
+ - name: GigabitEthernet0/2
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Delete attributes of all configured interfaces (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_l3_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..e86ecbf7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START ios_l3_interfaces empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_l3_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_l3_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_l3_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_l3_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_l3_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..7748b8c3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,23 @@
+---
+- debug:
+ msg: START ios_l3_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_l3_interfaces:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - gathered['config'] | symmetric_difference(result.gathered) == []
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..6aed7ca1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,59 @@
+---
+- debug:
+ msg: START Merged ios_l3_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.ios.ios_l3_interfaces: &id001
+ config:
+ - name: Loopback999
+ ipv4:
+ - address: 192.0.2.1/24
+ - name: GigabitEthernet0/1
+ ipv4:
+ - address: dhcp
+ dhcp_client: 0
+ dhcp_hostname: test.com
+ - name: GigabitEthernet0/2
+ ipv4:
+ - address: 198.51.100.1/24
+ secondary: true
+ - address: 198.51.100.2/24
+ ipv6:
+ - address: 2001:db8:0:3::/64
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_l3_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..e1f9c021
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START Overridden ios_l3_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device configuration of all interfaces with provided configuration
+ register: result
+ cisco.ios.ios_l3_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0
+ ipv4:
+
+ - address: dhcp
+
+ - name: GigabitEthernet0/2
+ ipv4:
+
+ - address: 198.51.100.1/24
+
+ - address: 198.51.100.2/24
+ secondary: true
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ overridden['before'] | symmetric_difference(result['before']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Override device configuration of all interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_l3_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..9abf5cf9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START ios_l3_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_l3_interfaces:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+- assert:
+ that:
+ - result.changed == false
+ - parsed['config']|symmetric_difference(result.parsed) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..399409b2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,33 @@
+---
+- debug:
+ msg: Start ios_l3_interfaces rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+
+ - name: Render the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: Loopback999
+ ipv4:
+ - address: 192.0.2.1/24
+ - name: GigabitEthernet0/1
+ ipv4:
+ - address: dhcp
+ dhcp_client: 0
+ dhcp_hostname: test.com
+ - name: GigabitEthernet0/2
+ ipv4:
+ - address: 198.51.100.1/24
+ secondary: true
+ - address: 198.51.100.2/24
+ ipv6:
+ - address: 2001:db8:0:3::/64
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..826f7fb2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,63 @@
+---
+- debug:
+ msg: START Replaced ios_l3_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ register: result
+ cisco.ios.ios_l3_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/1
+ ipv4:
+
+ - address: 203.0.114.1/24
+
+ - name: GigabitEthernet0/2
+ ipv4:
+
+ - address: 198.51.100.1/24
+ secondary: true
+
+ - address: 198.51.100.2/24
+ ipv6:
+
+ - address: 2001:db8:1:1::/64
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_l3_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..e123ac1f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,79 @@
+---
+- debug:
+ msg: START ios_l3_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Apply the provided configuration (Base config)
+ register: result
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: Loopback999
+ ipv4:
+ - address: 192.0.2.1/24
+ - name: GigabitEthernet0/0
+ ipv4:
+ - address: dhcp
+ - name: GigabitEthernet0/1
+ ipv4:
+ - address: dhcp
+ dhcp_client: 0
+ dhcp_hostname: test.com
+ - name: GigabitEthernet0/2
+ ipv4:
+ - address: 198.51.100.1/24
+ secondary: true
+ - address: 198.51.100.2/24
+ ipv6:
+ - address: 2001:db8:0:3::/64
+ state: merged
+
+ - name: Gather L3 interfaces facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - l3_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.ios.ios_l3_interfaces:
+ config:
+ - name: Loopback999
+ ipv4:
+ - address: 192.0.2.1/24
+ - name: GigabitEthernet0/0
+ ipv4:
+ - address: dhcp
+ - name: GigabitEthernet0/2
+ ipv4:
+ - address: 198.51.100.1/24
+ - address: 198.51.100.2/24
+ secondary: true
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 7
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.ios.ios_l3_interfaces:
+ config: "{{ ansible_facts['network_resources']['l3_interfaces'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 6
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/vars/main.yaml
new file mode 100644
index 00000000..cc5614f6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_l3_interfaces/vars/main.yaml
@@ -0,0 +1,188 @@
+---
+merged:
+ before:
+ - name: loopback888
+ - name: loopback999
+ - ipv4:
+ - address: dhcp
+ name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ - name: GigabitEthernet0/2
+ commands:
+ - interface loopback999
+ - ip address 192.0.2.1 255.255.255.0
+ - interface GigabitEthernet0/1
+ - ip address dhcp client-id GigabitEthernet0/0 hostname test.com
+ - interface GigabitEthernet0/2
+ - ip address 198.51.100.1 255.255.255.0 secondary
+ - ip address 198.51.100.2 255.255.255.0
+ - ipv6 address 2001:db8:0:3::/64
+ after:
+ - name: loopback888
+ - ipv4:
+ - address: 192.0.2.1 255.255.255.0
+ name: loopback999
+ - ipv4:
+ - address: dhcp
+ name: GigabitEthernet0/0
+ - ipv4:
+ - address: dhcp
+ dhcp_client: 0
+ dhcp_hostname: test.com
+ name: GigabitEthernet0/1
+ - ipv4:
+ - address: 198.51.100.1 255.255.255.0
+ secondary: true
+ - address: 198.51.100.2 255.255.255.0
+ ipv6:
+ - address: 2001:db8:0:3::/64
+ name: GigabitEthernet0/2
+replaced:
+ before:
+ - name: loopback888
+ - name: loopback999
+ - ipv4:
+ - address: dhcp
+ name: GigabitEthernet0/0
+ - ipv4:
+ - address: 203.0.113.27 255.255.255.0
+ name: GigabitEthernet0/1
+ - ipv4:
+ - address: 192.0.2.1 255.255.255.0
+ secondary: true
+ - address: 192.0.2.2 255.255.255.0
+ ipv6:
+ - address: 2001:db8:0:3::/64
+ name: GigabitEthernet0/2
+ commands:
+ - interface GigabitEthernet0/1
+ - ip address 203.0.114.1 255.255.255.0
+ - interface GigabitEthernet0/2
+ - no ip address
+ - no ipv6 address
+ - ip address 198.51.100.1 255.255.255.0 secondary
+ - ip address 198.51.100.2 255.255.255.0
+ - ipv6 address 2001:db8:1:1::/64
+ after:
+ - name: loopback888
+ - name: loopback999
+ - ipv4:
+ - address: dhcp
+ name: GigabitEthernet0/0
+ - ipv4:
+ - address: 203.0.114.1 255.255.255.0
+ name: GigabitEthernet0/1
+ - ipv4:
+ - address: 198.51.100.1 255.255.255.0
+ secondary: true
+ - address: 198.51.100.2 255.255.255.0
+ ipv6:
+ - address: 2001:db8:1:1::/64
+ name: GigabitEthernet0/2
+overridden:
+ before:
+ - name: loopback888
+ - name: loopback999
+ - ipv4:
+ - address: dhcp
+ name: GigabitEthernet0/0
+ - ipv4:
+ - address: 203.0.113.27 255.255.255.0
+ name: GigabitEthernet0/1
+ - ipv4:
+ - address: 192.0.2.1 255.255.255.0
+ secondary: true
+ - address: 192.0.2.2 255.255.255.0
+ ipv6:
+ - address: 2001:db8:0:3::/64
+ name: GigabitEthernet0/2
+ commands:
+ - interface GigabitEthernet0/1
+ - no ip address
+ - interface GigabitEthernet0/2
+ - no ip address
+ - no ipv6 address
+ - ip address 198.51.100.1 255.255.255.0
+ - ip address 198.51.100.2 255.255.255.0 secondary
+ after:
+ - name: loopback888
+ - name: loopback999
+ - ipv4:
+ - address: dhcp
+ name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ - ipv4:
+ - address: 198.51.100.2 255.255.255.0
+ secondary: true
+ - address: 198.51.100.1 255.255.255.0
+ name: GigabitEthernet0/2
+deleted:
+ before:
+ - name: loopback888
+ - name: loopback999
+ - ipv4:
+ - address: dhcp
+ name: GigabitEthernet0/0
+ - ipv4:
+ - address: 203.0.113.27 255.255.255.0
+ name: GigabitEthernet0/1
+ - ipv4:
+ - address: 192.0.2.1 255.255.255.0
+ secondary: true
+ - address: 192.0.2.2 255.255.255.0
+ ipv6:
+ - address: 2001:db8:0:3::/64
+ name: GigabitEthernet0/2
+ commands:
+ - interface GigabitEthernet0/1
+ - no ip address
+ - interface GigabitEthernet0/2
+ - no ip address
+ - no ipv6 address
+ after:
+ - name: loopback888
+ - name: loopback999
+ - ipv4:
+ - address: dhcp
+ name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ - name: GigabitEthernet0/2
+gathered:
+ config:
+ - name: loopback888
+ - name: loopback999
+ - ipv4:
+ - address: dhcp
+ name: GigabitEthernet0/0
+ - ipv4:
+ - address: 203.0.113.27 255.255.255.0
+ name: GigabitEthernet0/1
+ - ipv4:
+ - address: 192.0.2.1 255.255.255.0
+ secondary: true
+ - address: 192.0.2.2 255.255.255.0
+ ipv6:
+ - address: 2001:db8:0:3::/64
+ name: GigabitEthernet0/2
+parsed:
+ config:
+ - ipv4:
+ - address: dhcp
+ dhcp_client: 0
+ dhcp_hostname: test.com
+ name: GigabitEthernet0/1
+ - ipv4:
+ - address: 198.51.100.1 255.255.255.0
+ secondary: true
+ - address: 198.51.100.2 255.255.255.0
+ ipv6:
+ - address: 2001:db8:0:3::/64
+ name: GigabitEthernet0/2
+rtt:
+ commands:
+ - interface GigabitEthernet0/1
+ - ip address dhcp client-id GigabitEthernet0/0 hostname test.com
+ - interface GigabitEthernet0/2
+ - ip address 198.51.100.1 255.255.255.0 secondary
+ - ip address 198.51.100.2 255.255.255.0
+ - ipv6 address 2001:db8:0:3::/64
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/aliases b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/aliases
new file mode 100644
index 00000000..6bb69158
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/aliases
@@ -0,0 +1 @@
+shippable/ios/group1
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tasks/cli.yaml
new file mode 100644
index 00000000..b14576a6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Get the IOS version
+ cisco.ios.ios_facts:
+ gather_subset: all
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..c2bbb7a5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/_parsed.cfg
@@ -0,0 +1 @@
+123, 5e00.0000.8000 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..52b5b9b2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/_populate_config.yaml
@@ -0,0 +1,7 @@
+---
+- name: Populate Config
+ vars:
+ lines: "lacp system-priority 500\n"
+ when: ansible_net_version != "15.6(2)T"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..d418aad3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/_remove_config.yaml
@@ -0,0 +1,7 @@
+---
+- name: Remove Config
+ vars:
+ lines: "no lacp system-priority\n"
+ when: ansible_net_version != "15.6(2)T"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/deleted.yaml
new file mode 100644
index 00000000..df55dfb6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/deleted.yaml
@@ -0,0 +1,44 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_lacp ansible_connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete configured System LACP
+ register: result
+ cisco.ios.ios_lacp: &id001
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] == result['before'] }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] == result['before'] }}"
+
+ - name: Delete configured System LACP (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lacp: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..7a6991df
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/empty_config.yaml
@@ -0,0 +1,54 @@
+---
+- debug:
+ msg: START ios_lacp empty_config.yaml integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+
+ - name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lacp:
+ config:
+ state: merged
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state
+ merged'
+
+ - name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lacp:
+ config:
+ state: replaced
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state
+ replaced'
+
+ - name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lacp:
+ config:
+ state: rendered
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+ - name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lacp:
+ running_config:
+ state: parsed
+
+ - assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/gathered.yaml
new file mode 100644
index 00000000..d84a0232
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/gathered.yaml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START ios_lacp gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_lacp:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - "{{result['gathered'] == gathered['config'] }}"
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/merged.yaml
new file mode 100644
index 00000000..40f12640
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/merged.yaml
@@ -0,0 +1,45 @@
+---
+- debug:
+ msg: START Merged ios_lacp state for integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge provided configuration system LACP
+ register: result
+ cisco.ios.ios_lacp: &id001
+ config:
+ system:
+ priority: 10
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] == result['before'] }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] == result['before'] }}"
+
+ - name: Merge provided configuration system LACP (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lacp: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/parsed.yaml
new file mode 100644
index 00000000..bb2b8b2f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/parsed.yaml
@@ -0,0 +1,18 @@
+---
+- debug:
+ msg: START ios_lacp parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+ - name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_lacp:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+ - assert:
+ that:
+ - result.changed == false
+ - "{{result['parsed'] == parsed['config'] }}"
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/rendered.yaml
new file mode 100644
index 00000000..943b783c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/rendered.yaml
@@ -0,0 +1,21 @@
+---
+- debug:
+ msg: Start ios_lacp rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+
+ - name: Render the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_lacp:
+ config:
+ system:
+ priority: 10
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/replaced.yaml
new file mode 100644
index 00000000..9a9f5b83
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/tests/cli/replaced.yaml
@@ -0,0 +1,47 @@
+---
+- debug:
+ msg: START Replaced ios_lacp state for integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces system LACP configuration provided LACP configuration
+ register: result
+ cisco.ios.ios_lacp: &id001
+ config:
+ system:
+ priority: 20
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] == result['before'] }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] == result['before'] }}"
+
+ - name: Replaces system LACP configuration provided LACP configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lacp: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/vars/main.yaml
new file mode 100644
index 00000000..5c3611f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp/vars/main.yaml
@@ -0,0 +1,38 @@
+---
+merged:
+ before:
+ system:
+ priority: 32768
+ commands:
+ - lacp system-priority 10
+ after:
+ - system:
+ priority: 10
+replaced:
+ before:
+ system:
+ priority: 500
+ commands:
+ - lacp system-priority 20
+ after:
+ system:
+ priority: 20
+deleted:
+ before:
+ system:
+ priority: 500
+ commands:
+ - no lacp system-priority
+ after:
+ system:
+ priority: 32768
+
+gathered:
+ config:
+ system:
+ priority: 500
+
+parsed:
+ config:
+ system:
+ priority: 123
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..b14576a6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Get the IOS version
+ cisco.ios.ios_facts:
+ gather_subset: all
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..792196c8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/_parsed.cfg
@@ -0,0 +1,7 @@
+interface GigabitEthernet0/1
+ lacp port-priority 10
+interface GigabitEthernet0/2
+ lacp port-priority 20
+interface Port-channel10
+ lacp max-bundle 2
+ lacp fast-switchover
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..5739706d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,9 @@
+---
+- name: Populate Config
+ vars:
+ lines: "interface GigabitEthernet 0/1\nlacp port-priority 30\ninterface GigabitEthernet\
+ \ 0/2\nlacp port-priority 20\ninterface Port-channel 10\nlacp fast-switchover\n\
+ lacp max-bundle 2\ninterface Port-channel 40\nlacp max-bundle 5\n"
+ when: ansible_net_version != "15.6(2)T"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..334a22b1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,10 @@
+---
+- name: Remove Config
+ vars:
+ lines: "interface GigabitEthernet 0/1\nno lacp port-priority\ninterface GigabitEthernet\
+ \ 0/2\nno lacp port-priority\ninterface Port-channel 10\nno lacp fast-switchover\n\
+ no lacp max-bundle\ninterface Port-channel 40\nno lacp fast-switchover\nno\
+ \ lacp max-bundle\n"
+ when: ansible_net_version != "15.6(2)T"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..c08115c4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,46 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_lacp_interfaces ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete LACP attributes for all configured interfaces
+ register: result
+ cisco.ios.ios_lacp_interfaces: &id001
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Delete LACP attributes for all configured interfaces (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lacp_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..f022d2cd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,66 @@
+---
+- debug:
+ msg: START ios_lacp_interfaces empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- block:
+
+ - name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ state: merged
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state
+ merged'
+
+ - name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ state: replaced
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state
+ replaced'
+
+ - name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ state: overridden
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state
+ overridden'
+
+ - name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ state: rendered
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+ - name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lacp_interfaces:
+ running_config:
+ state: parsed
+
+ - assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..212482dd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START ios_lacp_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - gathered['config'] | symmetric_difference(result.gathered) == []
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..9244fbd6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,56 @@
+---
+- debug:
+ msg: START Merged ios_lacp_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_lacp_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/1
+ port_priority: 30
+
+ - name: GigabitEthernet0/2
+ port_priority: 20
+
+ - name: Port-channel10
+ fast_switchover: true
+ max_bundle: 2
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lacp_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..a925578e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,55 @@
+---
+- debug:
+ msg: START Overridden ios_lacp_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device configuration of all lacp_interfaces with provided configuration
+ register: result
+ cisco.ios.ios_lacp_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/2
+ port_priority: 40
+
+ - name: Port-channel40
+ fast_switchover: true
+ max_bundle: 2
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ overridden['before'] | symmetric_difference(result['before']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Override device configuration of all lacp_interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lacp_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..fac0c714
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,18 @@
+---
+- debug:
+ msg: START ios_lacp_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+ - name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_lacp_interfaces:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+ - assert:
+ that:
+ - result.changed == false
+ - parsed['config']|symmetric_difference(result.parsed) == []
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..5fbb6601
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: Start ios_lacp_interfaces rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+
+ - name: Render the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ port_priority: 30
+ - name: GigabitEthernet0/2
+ port_priority: 20
+ - name: Port-channel10
+ fast_switchover: true
+ max_bundle: 2
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..bfcfe4fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,55 @@
+---
+- debug:
+ msg: START Replaced ios_lacp_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device configuration of listed lacp_interfaces with provided
+ configuration
+ register: result
+ cisco.ios.ios_lacp_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/1
+ port_priority: 10
+
+ - name: Port-channel40
+ fast_switchover: true
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Replaces device configuration of listed lacp_interfaces with provided
+ configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lacp_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..83f5af6b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START ios_lacp_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ port_priority: 30
+ - name: GigabitEthernet0/2
+ port_priority: 20
+ - name: Port-channel10
+ fast_switchover: true
+ max_bundle: 2
+ state: merged
+
+ - name: Gather lacp interfaces facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - lacp_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.ios.ios_lacp_interfaces:
+ config:
+ - name: GigabitEthernet0/2
+ port_priority: 40
+ - name: Port-channel40
+ fast_switchover: true
+ max_bundle: 2
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 10
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.ios.ios_lacp_interfaces:
+ config: "{{ ansible_facts['network_resources']['lacp_interfaces'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 10
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/vars/main.yaml
new file mode 100644
index 00000000..d9d55b5e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lacp_interfaces/vars/main.yaml
@@ -0,0 +1,148 @@
+---
+merged:
+ before:
+ - name: Port-channel10
+ - name: Port-channel40
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ - name: GigabitEthernet0/2
+ commands:
+ - interface GigabitEthernet0/1
+ - lacp port-priority 30
+ - interface GigabitEthernet0/2
+ - lacp port-priority 20
+ - interface Port-channel10
+ - lacp max-bundle 2
+ - lacp fast-switchover
+ after:
+ - fast_switchover: true
+ max_bundle: 2
+ name: Port-channel10
+ - name: Port-channel40
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ port_priority: 30
+ - name: GigabitEthernet0/2
+ port_priority: 20
+replaced:
+ before:
+ - fast_switchover: true
+ max_bundle: 2
+ name: Port-channel10
+ - max_bundle: 5
+ name: Port-channel40
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ port_priority: 30
+ - name: GigabitEthernet0/2
+ port_priority: 20
+ commands:
+ - interface GigabitEthernet0/1
+ - lacp port-priority 10
+ - interface Port-channel40
+ - no lacp max-bundle
+ - lacp fast-switchover
+ after:
+ - fast_switchover: true
+ max_bundle: 2
+ name: Port-channel10
+ - fast_switchover: true
+ name: Port-channel40
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ port_priority: 10
+ - name: GigabitEthernet0/2
+ port_priority: 20
+overridden:
+ before:
+ - fast_switchover: true
+ max_bundle: 2
+ name: Port-channel10
+ - max_bundle: 5
+ name: Port-channel40
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ port_priority: 30
+ - name: GigabitEthernet0/2
+ port_priority: 20
+ commands:
+ - interface GigabitEthernet0/1
+ - no lacp port-priority
+ - interface GigabitEthernet0/2
+ - lacp port-priority 40
+ - interface Port-channel10
+ - no lacp fast-switchover
+ - no lacp max-bundle
+ - interface Port-channel40
+ - lacp fast-switchover
+ - lacp max-bundle 2
+ after:
+ - name: Port-channel10
+ - fast_switchover: true
+ max_bundle: 2
+ name: Port-channel40
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ - name: GigabitEthernet0/2
+ port_priority: 40
+deleted:
+ before:
+ - fast_switchover: true
+ max_bundle: 2
+ name: Port-channel10
+ - max_bundle: 5
+ name: Port-channel40
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ port_priority: 30
+ - name: GigabitEthernet0/2
+ port_priority: 20
+ commands:
+ - interface GigabitEthernet0/1
+ - no lacp port-priority
+ - interface GigabitEthernet0/2
+ - no lacp port-priority
+ - interface Port-channel10
+ - no lacp fast-switchover
+ - no lacp max-bundle
+ - interface Port-channel40
+ - no lacp max-bundle
+ after:
+ - name: Port-channel10
+ - name: Port-channel40
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ - name: GigabitEthernet0/2
+gathered:
+ config:
+ - fast_switchover: true
+ max_bundle: 2
+ name: Port-channel10
+ - max_bundle: 5
+ name: Port-channel40
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ port_priority: 30
+ - name: GigabitEthernet0/2
+ port_priority: 20
+parsed:
+ config:
+ - name: GigabitEthernet0/1
+ port_priority: 10
+ - name: GigabitEthernet0/2
+ port_priority: 20
+ - fast_switchover: true
+ max_bundle: 2
+ name: Port-channel10
+rtt:
+ commands:
+ - interface Port-channel10
+ - lacp max-bundle 2
+ - lacp fast-switchover
+ - interface Port-channel40
+ - no lacp max-bundle
+ - no lacp fast-switchover
+ - interface GigabitEthernet0/1
+ - lacp port-priority 30
+ - interface GigabitEthernet0/2
+ - lacp port-priority 20
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..b14576a6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Get the IOS version
+ cisco.ios.ios_facts:
+ gather_subset: all
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..5d2a5826
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_parsed.cfg
@@ -0,0 +1,4 @@
+interface GigabitEthernet0/1
+channel-group 11 mode active
+interface GigabitEthernet0/2
+channel-group 22 mode passive
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..57404ef7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,8 @@
+---
+- name: Populate Config
+ vars:
+ lines: "interface GigabitEthernet 0/1\nchannel-group 11 mode active\ninterface\
+ \ GigabitEthernet 0/2\nchannel-group 22 mode active\n"
+ when: ansible_net_version != "15.6(2)T"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_populate_port_channel.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_populate_port_channel.yaml
new file mode 100644
index 00000000..83034823
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_populate_port_channel.yaml
@@ -0,0 +1,7 @@
+---
+- name: Populate Port-Channel Config
+ vars:
+ lines: "interface Port-channel11\ninterface Port-channel22\n"
+ when: ansible_net_version != "15.6(2)T"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..3273e4da
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,8 @@
+---
+- name: Remove Config
+ vars:
+ lines: "interface GigabitEthernet 0/1\nno channel-group\ninterface GigabitEthernet\
+ \ 0/2\nno channel-group\nno interface Port-channel11\nno interface Port-channel22"
+ when: ansible_net_version != "15.6(2)T"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..ec06444d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,47 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_lag_interfaces ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _populate_port_channel.yaml
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete attributes of all configured interfaces
+ register: result
+ cisco.ios.ios_lag_interfaces: &id001
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Delete attributes of all configured interfaces (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lag_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..3160561f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,67 @@
+---
+- debug:
+ msg: START ios_lag_interfaces empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- block:
+
+ - name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lag_interfaces:
+ config:
+ state: merged
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state
+ merged'
+
+ - name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lag_interfaces:
+ config:
+ state: replaced
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state
+ replaced'
+
+ - name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lag_interfaces:
+ config:
+ state: overridden
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state
+ overridden'
+
+ - name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lag_interfaces:
+ config:
+ state: rendered
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+ - name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lag_interfaces:
+ running_config:
+ state: parsed
+
+ - assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
+
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..b06af796
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: START ios_lag_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _populate_port_channel.yaml
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_lag_interfaces:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - gathered['config'] | symmetric_difference(result.gathered) == []
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..2492ff95
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,55 @@
+---
+- debug:
+ msg: START Merged ios_lag_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _populate_port_channel.yaml
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.ios.ios_lag_interfaces: &id001
+ config:
+
+ - name: Port-channel11
+ members:
+ - member: GigabitEthernet0/1
+ mode: active
+ - name: Port-channel22
+ members:
+ - member: GigabitEthernet0/2
+ mode: passive
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lag_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..30aaa7bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,54 @@
+---
+- debug:
+ msg: START Overridden ios_lag_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _populate_port_channel.yaml
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device configuration of all interfaces with provided configuration
+ register: result
+ cisco.ios.ios_lag_interfaces: &id001
+ config:
+
+ - name: Port-channel22
+ members:
+ - member: GigabitEthernet0/2
+ mode: passive
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ overridden['before'] | symmetric_difference(result['before']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Override device configuration of all interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lag_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..21ba2ca8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,18 @@
+---
+- debug:
+ msg: START ios_lag_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+ - name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_lag_interfaces:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+ - assert:
+ that:
+ - result.changed == false
+ - parsed['config']|symmetric_difference(result.parsed) == []
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..07cce311
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: Start ios_lag_interfaces rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+ - name: Render the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: Port-channel11
+ members:
+ - member: GigabitEthernet0/1
+ mode: active
+ - name: Port-channel22
+ members:
+ - member: GigabitEthernet0/2
+ mode: passive
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..3eabb6a6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,55 @@
+---
+- debug:
+ msg: START Replaced ios_lag_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _populate_port_channel.yaml
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ register: result
+ cisco.ios.ios_lag_interfaces: &id001
+ config:
+
+ - name: Port-channel11
+ members:
+
+ - member: GigabitEthernet0/1
+ mode: passive
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lag_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..04e1ea2f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,63 @@
+---
+- debug:
+ msg: START ios_lag_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _populate_port_channel.yaml
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: Port-channel11
+ members:
+ - member: GigabitEthernet0/1
+ mode: active
+ - name: Port-channel22
+ members:
+ - member: GigabitEthernet0/2
+ mode: active
+ state: merged
+
+ - name: Gather LAG interfaces facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - lag_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.ios.ios_lag_interfaces:
+ config:
+ - name: Port-channel22
+ members:
+ - member: GigabitEthernet0/2
+ mode: passive
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 4
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.ios.ios_lag_interfaces:
+ config: "{{ ansible_facts['network_resources']['lag_interfaces'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 4
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/vars/main.yaml
new file mode 100644
index 00000000..34c3712e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lag_interfaces/vars/main.yaml
@@ -0,0 +1,115 @@
+---
+merged:
+ before:
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ - name: GigabitEthernet0/2
+ commands:
+ - interface GigabitEthernet0/1
+ - channel-group 11 mode active
+ - interface GigabitEthernet0/2
+ - channel-group 22 mode passive
+ after:
+ - name: GigabitEthernet0/0
+ - members:
+ - member: GigabitEthernet0/1
+ mode: active
+ name: Port-channel11
+ - members:
+ - member: GigabitEthernet0/2
+ mode: passive
+ name: Port-channel22
+replaced:
+ before:
+ - name: GigabitEthernet0/0
+ - members:
+ - member: GigabitEthernet0/1
+ mode: active
+ name: Port-channel11
+ - members:
+ - member: GigabitEthernet0/2
+ mode: active
+ name: Port-channel22
+ commands:
+ - interface GigabitEthernet0/1
+ - channel-group 11 mode passive
+ after:
+ - name: GigabitEthernet0/0
+ - members:
+ - member: GigabitEthernet0/1
+ mode: passive
+ name: Port-channel11
+ - members:
+ - member: GigabitEthernet0/2
+ mode: active
+ name: Port-channel22
+overridden:
+ before:
+ - name: GigabitEthernet0/0
+ - members:
+ - member: GigabitEthernet0/1
+ mode: active
+ name: Port-channel11
+ - members:
+ - member: GigabitEthernet0/2
+ mode: active
+ name: Port-channel22
+ commands:
+ - interface GigabitEthernet0/1
+ - no channel-group
+ - interface GigabitEthernet0/2
+ - channel-group 22 mode passive
+ after:
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ - members:
+ - member: GigabitEthernet0/2
+ mode: passive
+ name: Port-channel22
+deleted:
+ before:
+ - name: GigabitEthernet0/0
+ - members:
+ - member: GigabitEthernet0/1
+ mode: active
+ name: Port-channel11
+ - members:
+ - member: GigabitEthernet0/2
+ mode: active
+ name: Port-channel22
+ commands:
+ - interface GigabitEthernet0/1
+ - no channel-group
+ - interface GigabitEthernet0/2
+ - no channel-group
+ after:
+ - name: GigabitEthernet0/0
+ - name: GigabitEthernet0/1
+ - name: GigabitEthernet0/2
+gathered:
+ config:
+ - name: GigabitEthernet0/0
+ - members:
+ - member: GigabitEthernet0/1
+ mode: active
+ name: Port-channel11
+ - members:
+ - member: GigabitEthernet0/2
+ mode: active
+ name: Port-channel22
+parsed:
+ config:
+ - members:
+ - member: GigabitEthernet0/1
+ mode: active
+ name: Port-channel11
+ - members:
+ - member: GigabitEthernet0/2
+ mode: passive
+ name: Port-channel22
+rtt:
+ commands:
+ - interface GigabitEthernet0/1
+ - channel-group 11 mode active
+ - interface GigabitEthernet0/2
+ - channel-group 22 mode active
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/meta/main.yaml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/tests/cli/basic.yaml
new file mode 100644
index 00000000..9e4fb400
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_linkagg/tests/cli/basic.yaml
@@ -0,0 +1,175 @@
+---
+- debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}"
+
+- set_fact: switch_type="{{ switch_type }}"
+
+- block:
+
+ - name: setup - remove config used in test(part1)
+ ignore_errors: true
+ cisco.ios.ios_config:
+ lines:
+ - no interface port-channel 20
+ provider: '{{ cli }}'
+
+ - name: setup - remove config used in test(part2)
+ ignore_errors: true
+ cisco.ios.ios_config:
+ lines:
+ - no interface port-channel 5
+ provider: '{{ cli }}'
+
+ - name: setup - remove config used in test(part3)
+ loop:
+ - interface GigabitEthernet0/1
+ - interface GigabitEthernet0/2
+ cisco.ios.ios_config:
+ lines:
+ - no channel-group 20 mode active
+ provider: '{{ cli }}'
+ parents: '{{ item }}'
+
+ - name: create linkagg
+ register: result
+ cisco.ios.ios_linkagg: &id001
+ group: 20
+ state: present
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface port-channel 20' in result.commands"
+
+ - name: create linkagg(Idempotence)
+ register: result
+ cisco.ios.ios_linkagg: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: set link aggregation group to members
+ register: result
+ cisco.ios.ios_linkagg: &id002
+ group: 20
+ mode: active
+ members:
+ - GigabitEthernet0/1
+ - GigabitEthernet0/2
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface GigabitEthernet0/1' in result.commands"
+ - "'channel-group 20 mode active' in result.commands"
+ - "'interface GigabitEthernet0/2' in result.commands"
+ - "'channel-group 20 mode active' in result.commands"
+
+ - name: set link aggregation group to members(Idempotence)
+ register: result
+ cisco.ios.ios_linkagg: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: remove link aggregation group from member
+ register: result
+ cisco.ios.ios_linkagg: &id003
+ group: 20
+ mode: active
+ members:
+ - GigabitEthernet0/2
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface GigabitEthernet0/1' in result.commands"
+ - "'no channel-group 20 mode active' in result.commands"
+
+ - name: remove link aggregation group from member(Idempotence)
+ register: result
+ cisco.ios.ios_linkagg: *id003
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: remove linkagg
+ register: result
+ cisco.ios.ios_linkagg: &id004
+ group: 20
+ state: absent
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'no interface port-channel 20' in result.commands"
+
+ - name: remove linkagg(Idempotence)
+ register: result
+ cisco.ios.ios_linkagg: *id004
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: create aggregate of linkagg definitions
+ register: result
+ cisco.ios.ios_linkagg: &id005
+ aggregate:
+
+ - group: 5
+
+ - group: 20
+ mode: active
+ members:
+ - GigabitEthernet0/1
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface port-channel 5' in result.commands"
+ - "'interface port-channel 20' in result.commands"
+ - "'interface GigabitEthernet0/1' in result.commands"
+ - "'channel-group 20 mode active' in result.commands"
+
+ - name: create aggregate of linkagg definitions(Idempotence)
+ register: result
+ cisco.ios.ios_linkagg: *id005
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: teardown(part1)
+ ignore_errors: true
+ cisco.ios.ios_config:
+ lines:
+ - no interface port-channel 20
+ provider: '{{ cli }}'
+
+ - name: teardown(part2)
+ ignore_errors: true
+ cisco.ios.ios_config:
+ lines:
+ - no interface port-channel 5
+ provider: '{{ cli }}'
+
+ - name: teardown(part3)
+ loop:
+ - interface GigabitEthernet0/1
+ - interface GigabitEthernet0/2
+ cisco.ios.ios_config:
+ lines:
+ - no channel-group 20 mode active
+ provider: '{{ cli }}'
+ parents: '{{ item }}'
+ when: switch_type == 'L2'
+
+- debug: msg="END cli/basic.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/meta/main.yaml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/tests/cli/basic.yaml
new file mode 100644
index 00000000..44ad2e97
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp/tests/cli/basic.yaml
@@ -0,0 +1,52 @@
+---
+- debug: msg="START ios_lldp cli/basic.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Make sure LLDP is not running before tests
+ cisco.ios.ios_config:
+ lines: no lldp run
+ provider: '{{ cli }}'
+
+- name: Enable LLDP service
+ register: result
+ cisco.ios.ios_lldp:
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"lldp run" in result.commands'
+
+- name: Enable LLDP service again (idempotent)
+ register: result
+ cisco.ios.ios_lldp:
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Disable LLDP service
+ register: result
+ cisco.ios.ios_lldp:
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no lldp run" in result.commands'
+
+- name: Disable LLDP service (idempotent)
+ register: result
+ cisco.ios.ios_lldp:
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END ios_lldp cli/basic.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/aliases b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/aliases
new file mode 100644
index 00000000..6bb69158
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/aliases
@@ -0,0 +1 @@
+shippable/ios/group1
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..a294c041
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/_parsed.cfg
@@ -0,0 +1,4 @@
+lldp timer 10
+lldp holdtime 10
+lldp reinit 3
+lldp run \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..80a30cda
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/_populate_config.yaml
@@ -0,0 +1,6 @@
+---
+- name: Populate Config
+ vars:
+ lines: "lldp holdtime 10\nlldp run\nlldp timer 100\nlldp reinit 3\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..15ffe6c1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/_remove_config.yaml
@@ -0,0 +1,6 @@
+---
+- name: Remove Config
+ vars:
+ lines: "no lldp holdtime\nno lldp run\nno lldp timer\nno lldp reinit\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/deleted.yaml
new file mode 100644
index 00000000..36dee599
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/deleted.yaml
@@ -0,0 +1,43 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_lldp_global ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete configured Global LLDP
+ register: result
+ cisco.ios.ios_lldp_global: &id001
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] == result['before'] }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] == result['before'] }}"
+
+ - name: Delete configured Global LLDP (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lldp_global: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..587a70fc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/empty_config.yaml
@@ -0,0 +1,49 @@
+---
+- debug:
+ msg: START ios_lldp_global empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lldp_global:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lldp_global:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lldp_global:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lldp_global:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/gathered.yaml
new file mode 100644
index 00000000..766e4004
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/gathered.yaml
@@ -0,0 +1,23 @@
+---
+- debug:
+ msg: START ios_lldp_global gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_lldp_global:
+ config:
+ state: gathered
+
+
+ - name: Assert
+ assert:
+ that:
+ - "{{ result['gathered'] == gathered['config'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/merged.yaml
new file mode 100644
index 00000000..4be9bbe6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/merged.yaml
@@ -0,0 +1,46 @@
+---
+- debug:
+ msg: START Merged ios_lldp_global state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge provided configuration Global LLDP
+ register: result
+ cisco.ios.ios_lldp_global: &id001
+ config:
+ holdtime: 10
+ enabled: true
+ reinit: 3
+ timer: 20
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] == result['before'] }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] == result['before'] }}"
+
+ - name: Merge provided configuration Global LLDP (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lldp_global: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/parsed.yaml
new file mode 100644
index 00000000..9151e6d5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START ios_lldp_global parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_lldp_global:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+- assert:
+ that:
+ - result.changed == false
+ - "{{ result['parsed'] == parsed['config'] }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/rendered.yaml
new file mode 100644
index 00000000..77b9f54d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/rendered.yaml
@@ -0,0 +1,22 @@
+---
+- debug:
+ msg: Start ios_lldp_global rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+
+ - name: Render the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_lldp_global:
+ config:
+ holdtime: 10
+ enabled: true
+ reinit: 3
+ timer: 20
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/replaced.yaml
new file mode 100644
index 00000000..82251200
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/tests/cli/replaced.yaml
@@ -0,0 +1,47 @@
+---
+- debug:
+ msg: START Replaced ios_lldp_global state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces Global LLDP configuration with provided LLDP configuration
+ register: result
+ cisco.ios.ios_lldp_global: &id001
+ config:
+ holdtime: 20
+ reinit: 5
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] == result['before'] }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] == result['before'] }}"
+
+ - name: Replaces Global LLDP configuration with provided LLDP configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lldp_global: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/vars/main.yaml
new file mode 100644
index 00000000..ac53fbe9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_global/vars/main.yaml
@@ -0,0 +1,51 @@
+---
+merged:
+ before: {}
+ commands:
+ - lldp holdtime 10
+ - lldp run
+ - lldp timer 20
+ - lldp reinit 3
+ after:
+ timer: 20
+ holdtime: 10
+ reinit: 3
+ enabled: true
+replaced:
+ before:
+ timer: 100
+ holdtime: 10
+ reinit: 3
+ enabled: true
+ commands:
+ - no lldp run
+ - no lldp timer
+ - lldp holdtime 20
+ - lldp reinit 5
+ after:
+ holdtime: 10
+ reinit: 3
+deleted:
+ before:
+ timer: 100
+ holdtime: 10
+ reinit: 3
+ enabled: true
+ commands:
+ - no lldp holdtime
+ - no lldp run
+ - no lldp timer
+ - no lldp reinit
+ after: {}
+gathered:
+ config:
+ enabled: true
+ holdtime: 10
+ reinit: 3
+ timer: 100
+parsed:
+ config:
+ enabled: true
+ holdtime: 10
+ reinit: 3
+ timer: 10
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_enable_lldp.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_enable_lldp.yaml
new file mode 100644
index 00000000..dc8ecfaf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_enable_lldp.yaml
@@ -0,0 +1,6 @@
+---
+- name: Enable LLDP Config
+ vars:
+ lines: "lldp run\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..3089d48f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_parsed.cfg
@@ -0,0 +1,17 @@
+GigabitEthernet0/0:
+ Tx: enabled
+ Rx: disabled
+ Tx state: IDLE
+ Rx state: WAIT FOR FRAME
+
+GigabitEthernet0/1:
+ Tx: enabled
+ Rx: enabled
+ Tx state: IDLE
+ Rx state: WAIT FOR FRAME
+
+GigabitEthernet0/2:
+ Tx: disabled
+ Rx: enabled
+ Tx state: IDLE
+ Rx state: INIT \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..41d1bed7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,8 @@
+---
+- name: Populate Config
+ vars:
+ lines: "interface GigabitEthernet 0/0\nlldp receive\nlldp transmit\ninterface\
+ \ GigabitEthernet 0/1\nlldp receive\nlldp transmit\ninterface GigabitEthernet\
+ \ 0/2\nlldp receive\nlldp transmit\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..8a41fcc8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,8 @@
+---
+- name: Remove Config
+ vars:
+ lines: "interface GigabitEthernet 0/0\nno lldp receive\nno lldp transmit\ninterface\
+ \ GigabitEthernet 0/1\nno lldp receive\nno lldp transmit\ninterface GigabitEthernet\
+ \ 0/2\nno lldp receive\nno lldp transmit\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..dbf6ea30
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,47 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_lldp_interfaces ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _enable_lldp.yaml
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete LLDP attributes for respective configured interfaces
+ register: result
+ cisco.ios.ios_lldp_interfaces: &id001
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Delete LLDP attributes for respective configured interfaces (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lldp_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..58c29743
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START ios_lldp_interfaces empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_lldp_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..f16b6f30
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,25 @@
+---
+- debug:
+ msg: START ios_lldp_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _enable_lldp.yaml
+- include_tasks: _remove_config.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - gathered['config'] | symmetric_difference(result.gathered) == []
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..2c578118
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,59 @@
+---
+- debug:
+ msg: START Merged ios_lldp_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _enable_lldp.yaml
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_lldp_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: false
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lldp_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..adb7b4a1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,56 @@
+---
+- debug:
+ msg: START Overridden ios_lldp_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _enable_lldp.yaml
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device configuration of all lldp_interfaces with provided configuration
+ register: result
+ cisco.ios.ios_lldp_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+
+ - name: GigabitEthernet0/2
+ receive: true
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ overridden['before'] | symmetric_difference(result['before']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Override device configuration of all lldp_interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lldp_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..1d064834
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START ios_lldp_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_lldp_interfaces:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+- assert:
+ that:
+ - result.changed == false
+ - parsed['config']|symmetric_difference(result.parsed) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..71b0c971
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: Start ios_lldp_interfaces rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+
+ - name: Render the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..3bb30e42
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,57 @@
+---
+- debug:
+ msg: START Replaced ios_lldp_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _enable_lldp.yaml
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device configuration of listed lldp_interfaces with provided
+ configuration
+ register: result
+ cisco.ios.ios_lldp_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/1
+ transmit: true
+
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: false
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Replaces device configuration of listed lldp_interfaces with provided
+ configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_lldp_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..3bc6a841
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,65 @@
+---
+- debug:
+ msg: START ios_lldp_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _enable_lldp.yaml
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: true
+ state: merged
+
+ - name: Gather LLDP interfaces facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - lldp_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.ios.ios_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 5
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.ios.ios_lldp_interfaces:
+ config: "{{ ansible_facts['network_resources']['lldp_interfaces'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 5
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/vars/main.yaml
new file mode 100644
index 00000000..74c66eea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_lldp_interfaces/vars/main.yaml
@@ -0,0 +1,147 @@
+---
+merged:
+ before:
+ - name: GigabitEthernet0/0
+ receive: false
+ transmit: false
+ - name: GigabitEthernet0/1
+ receive: false
+ transmit: false
+ - name: GigabitEthernet0/2
+ receive: false
+ transmit: false
+ commands:
+ - interface GigabitEthernet0/0
+ - lldp receive
+ - lldp transmit
+ - interface GigabitEthernet0/1
+ - lldp receive
+ - lldp transmit
+ - interface GigabitEthernet0/2
+ - lldp receive
+ after:
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: false
+replaced:
+ before:
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: true
+ commands:
+ - interface GigabitEthernet0/1
+ - no lldp receive
+ - interface GigabitEthernet0/2
+ - no lldp transmit
+ after:
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/1
+ receive: false
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: false
+overridden:
+ before:
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: true
+ commands:
+ - interface GigabitEthernet0/1
+ - no lldp receive
+ - no lldp transmit
+ - interface GigabitEthernet0/2
+ - no lldp transmit
+ after:
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/1
+ receive: false
+ transmit: false
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: false
+deleted:
+ before:
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: true
+ commands:
+ - interface GigabitEthernet0/0
+ - no lldp receive
+ - no lldp transmit
+ - interface GigabitEthernet0/1
+ - no lldp receive
+ - no lldp transmit
+ - interface GigabitEthernet0/2
+ - no lldp receive
+ - no lldp transmit
+ after:
+ - name: GigabitEthernet0/0
+ receive: false
+ transmit: false
+ - name: GigabitEthernet0/1
+ receive: false
+ transmit: false
+ - name: GigabitEthernet0/2
+ receive: false
+ transmit: false
+
+gathered:
+ config:
+ - name: GigabitEthernet0/0
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: true
+
+parsed:
+ config:
+ - name: GigabitEthernet0/0
+ receive: false
+ transmit: true
+ - name: GigabitEthernet0/1
+ receive: true
+ transmit: true
+ - name: GigabitEthernet0/2
+ receive: true
+ transmit: false
+
+rtt:
+ commands:
+ - interface GigabitEthernet0/1
+ - lldp receive
+ - lldp transmit
+ - interface GigabitEthernet0/2
+ - lldp transmit
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/meta/main.yaml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tests/cli/basic.yaml
new file mode 100644
index 00000000..467e29d0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tests/cli/basic.yaml
@@ -0,0 +1,151 @@
+---
+- name: Remove host logging
+ cisco.ios.ios_logging: &id001
+ dest: host
+ name: 172.16.0.1
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Remove console
+ cisco.ios.ios_logging:
+ dest: console
+ level: warnings
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Remove buffer
+ cisco.ios.ios_logging:
+ dest: buffered
+ size: 8000
+ provider: '{{ cli }}'
+ state: absent
+
+- name: Set up host logging
+ register: result
+ cisco.ios.ios_logging:
+ dest: host
+ name: 172.16.0.1
+ facility: local7
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging host 172.16.0.1" in result.commands'
+ - '"logging facility local7" in result.commands'
+
+- name: Set up host logging again (idempotent)
+ register: result
+ cisco.ios.ios_logging:
+ dest: host
+ name: 172.16.0.1
+ state: present
+ provider: '{{ cli }}'
+
+- assert: &id002
+ that:
+ - result.changed == false
+
+- name: Delete/disable host logging
+ register: result
+ cisco.ios.ios_logging: *id001
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no logging host 172.16.0.1" in result.commands'
+
+- name: Delete/disable host logging (idempotent)
+ register: result
+ cisco.ios.ios_logging: *id001
+
+- assert: *id002
+
+- name: Console logging with level warnings
+ register: result
+ cisco.ios.ios_logging:
+ dest: console
+ level: warnings
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging console warnings" in result.commands'
+
+- name: Configure Buffer size
+ register: result
+ cisco.ios.ios_logging:
+ dest: buffered
+ size: 8000
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging buffered 8000" in result.commands'
+
+- name: Change logging parameters using aggregate
+ register: result
+ cisco.ios.ios_logging:
+ aggregate:
+
+ - dest: console
+ level: notifications
+
+ - dest: buffered
+ size: 9000
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging buffered 9000" in result.commands'
+ - '"logging console notifications" in result.commands'
+
+- name: Set both logging destination and facility
+ register: result
+ cisco.ios.ios_logging: &id003
+ dest: buffered
+ facility: uucp
+ level: alerts
+ size: 4096
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging buffered 4096 alerts" in result.commands'
+ - '"logging facility uucp" in result.commands'
+
+- name: Set both logging destination and facility (idempotent)
+ register: result
+ cisco.ios.ios_logging: *id003
+
+- assert: *id002
+
+- name: remove logging as collection tearDown
+ register: result
+ cisco.ios.ios_logging:
+ aggregate:
+
+ - dest: console
+ level: notifications
+
+ - dest: buffered
+ size: 4096
+ level: alerts
+
+ - facility: uucp
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no logging console" in result.commands'
+ - '"no logging buffered" in result.commands'
+ - '"no logging facility uucp" in result.commands'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tests/cli/net_logging.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tests/cli/net_logging.yaml
new file mode 100644
index 00000000..75e5eb5c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_logging/tests/cli/net_logging.yaml
@@ -0,0 +1,34 @@
+---
+- debug: msg="START ios cli/net_logging.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Remove host logging - setup
+ ansible.netcommon.net_logging:
+ dest: host
+ name: 172.16.0.1
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Set up host logging using platform agnostic module
+ register: result
+ ansible.netcommon.net_logging:
+ dest: host
+ name: 172.16.0.1
+ facility: local7
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging host 172.16.0.1" in result.commands'
+ - '"logging facility local7" in result.commands'
+
+- name: Remove host logging - teardown
+ ansible.netcommon.net_logging:
+ dest: host
+ name: 172.16.0.1
+ state: absent
+ provider: '{{ cli }}'
+
+- debug: msg="END ios cli/net_logging.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/meta/main.yml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml
new file mode 100644
index 00000000..41364ad1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml
@@ -0,0 +1,106 @@
+---
+- debug: msg="START connection={{ ansible_connection }} ios_ntp sanity test"
+
+- name: remove NTP (if set)
+ ignore_errors: true
+ cisco.ios.ios_ntp: &id007
+ server: 10.75.32.5
+ source_int: '{{ test_interface }}'
+ acl: NTP_ACL
+ logging: true
+ key_id: 10
+ auth_key: 15435A030726242723273C21181319000A
+ auth: true
+ state: absent
+ provider: '{{ cli }}'
+
+- block:
+
+ - name: configure NTP
+ register: result
+ cisco.ios.ios_ntp: &id001
+ server: 10.75.32.5
+ source_int: '{{ test_interface }}'
+ state: present
+ provider: '{{ cli }}'
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: idempotence check
+ register: result
+ cisco.ios.ios_ntp: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: load acl NTP_ACL into device
+ register: result
+ cisco.ios.ios_config:
+ lines:
+ - 10 permit ip host 192.0.2.1 any log
+ parents: ip access-list extended NTP_ACL
+ provider: '{{ cli }}'
+
+ - assert: *id002
+
+ - name: configure NTP
+ register: result
+ cisco.ios.ios_ntp: &id003
+ acl: NTP_ACL
+ logging: true
+ state: present
+ provider: '{{ cli }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.ios.ios_ntp: *id003
+
+ - assert: *id004
+
+ - name: configure NTP with diffferen values
+ register: result
+ cisco.ios.ios_ntp: &id005
+ key_id: 10
+ auth_key: 15435A030726242723273C21181319000A
+ auth: true
+ state: present
+ provider: '{{ cli }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.ios.ios_ntp: *id005
+
+ - assert: *id004
+
+ - name: remove part of config
+ register: result
+ cisco.ios.ios_ntp: &id006
+ acl: NTP_ACL
+ logging: true
+ state: absent
+ provider: '{{ cli }}'
+
+ - assert: *id002
+
+ - name: idempotence check
+ register: result
+ cisco.ios.ios_ntp: *id006
+
+ - assert: *id004
+ always:
+
+ - name: Remove ntp config
+ cisco.ios.ios_ntp: *id007
+
+ - name: remove NTP_ACL from device
+ cisco.ios.ios_config:
+ lines:
+ - no ip access-list extended NTP_ACL
+ provider: '{{ cli }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_initial_ipv6_setup.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_initial_ipv6_setup.yaml
new file mode 100644
index 00000000..b9b5e0f8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_initial_ipv6_setup.yaml
@@ -0,0 +1,6 @@
+---
+- name: Create and Setup IPv6 configuration
+ vars:
+ lines: "interface GigabitEthernet 0/1\nipv6 address 2001:db8:0:1::/64\ninterface GigabitEthernet 0/2\nipv6 address 2001:db8:0:2::/64\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..e3e70651
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_parsed.cfg
@@ -0,0 +1,22 @@
+interface Loopback888
+interface Loopback999
+interface GigabitEthernet0/0
+interface GigabitEthernet0/1
+ ip ospf network broadcast
+ ip ospf authentication message-digest
+ ip ospf resync-timeout 10
+ ip ospf dead-interval 5
+ ip ospf priority 25
+ ip ospf demand-circuit ignore
+ ip ospf bfd
+ ip ospf adjacency stagger disable
+ ip ospf ttl-security hops 50
+ ip ospf shutdown
+ ip ospf 10 area 30
+ ip ospf cost 5
+ ipv6 ospf priority 55
+ ipv6 ospf transmit-delay 45
+ ipv6 ospf database-filter all out
+ ipv6 ospf adjacency stagger disable
+ ipv6 ospf manet peering link-metrics 10
+interface GigabitEthernet0/2 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..5312a2d7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,36 @@
+---
+- name: Populate OSPF Interfaces Configuration
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ address_family:
+ - afi: ipv4
+ authentication:
+ message_digest: true
+ process:
+ id: 10
+ area_id: 30
+ adjacency: true
+ bfd: true
+ cost:
+ interface_cost: 5
+ dead_interval:
+ time: 5
+ demand_circuit:
+ ignore: true
+ network:
+ broadcast: true
+ priority: 25
+ resync_timeout: 10
+ shutdown: true
+ ttl_security:
+ hops: 50
+ - afi: ipv6
+ adjacency: true
+ database_filter: true
+ manet:
+ link_metrics:
+ cost_threshold: 10
+ priority: 55
+ transmit_delay: 45
+ state: merged
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..313daccd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,10 @@
+---
+- name: Remove OSPF Interfaces Config
+ cisco.ios.ios_ospf_interfaces:
+ state: deleted
+
+- name: Delete and Clean IPv6 configuration
+ vars:
+ lines: "interface GigabitEthernet 0/1\nno ipv6 address 2001:DB8:0:1::/64\ninterface GigabitEthernet 0/2\nno ipv6 address 2001:DB8:0:2::/64\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..72c9f316
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,70 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_ospf_interfaces ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_ipv6_setup.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete provided OSPF Interfaces
+ register: result
+ cisco.ios.ios_ospf_interfaces: &id001
+ config:
+ - name: GigabitEthernet0/1
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Delete provided OSPF Interfaces (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospf_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete provided OSPF Interfaces without any config
+ register: result
+ cisco.ios.ios_ospf_interfaces: &id002
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Delete provided OSPF Interfaces without any config (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospf_interfaces: *id002
+
+ - name: Assert that the delete task was idempotent
+ assert:
+ that:
+ - result.changed == false
+
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..ac76a8fc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START ios_ospf_interfaces empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospf_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..189fbdd1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,27 @@
+---
+- debug:
+ msg: START ios_ospf_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_ipv6_setup.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - result.changed == false
+ - "{{ merged['after'] | symmetric_difference(result['gathered']) |length\
+ \ == 0 }}"
+
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..6e82d25b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,75 @@
+---
+- debug:
+ msg: START Merged ios_ospf_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_ipv6_setup.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.ios.ios_ospf_interfaces: &id001
+ config:
+ - name: GigabitEthernet0/1
+ address_family:
+ - afi: ipv4
+ authentication:
+ message_digest: true
+ process:
+ id: 10
+ area_id: 30
+ adjacency: true
+ bfd: true
+ cost:
+ interface_cost: 5
+ dead_interval:
+ time: 5
+ demand_circuit:
+ ignore: true
+ network:
+ broadcast: true
+ priority: 25
+ resync_timeout: 10
+ shutdown: true
+ ttl_security:
+ hops: 50
+ - afi: ipv6
+ adjacency: true
+ database_filter: true
+ manet:
+ link_metrics:
+ cost_threshold: 10
+ priority: 55
+ transmit_delay: 45
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] == {} }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospf_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..3a978bbf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,65 @@
+---
+- debug:
+ msg: START Overridden ios_ospf_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_ipv6_setup.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override provided OSPF Interfaces configuration
+ register: result
+ cisco.ios.ios_ospf_interfaces: &id001
+ config:
+ - name: GigabitEthernet0/1
+ address_family:
+ - afi: ipv6
+ adjacency: true
+ priority: 20
+ transmit_delay: 30
+ - name: GigabitEthernet0/2
+ address_family:
+ - afi: ipv4
+ process:
+ id: 10
+ area_id: 20
+ adjacency: true
+ cost:
+ interface_cost: 30
+ priority: 40
+ ttl_security:
+ hops: 50
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Override provided OSPF Interfaces configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospf_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..518affbe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START ios_ospf_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse the commands for provided configuration
+ register: result
+ cisco.ios.ios_ospf_interfaces:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+- assert:
+ that:
+ - result.changed == false
+ - "{{ merged['after'] | symmetric_difference(result['parsed']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..a28a7262
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,47 @@
+---
+- debug:
+ msg: Start ios_ospf_interfaces rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+ - name: Render the commands for provided configuration
+ register: result
+ cisco.ios.ios_ospf_interfaces: &id001
+ config:
+ - name: GigabitEthernet0/1
+ address_family:
+ - afi: ipv4
+ authentication:
+ message_digest: true
+ process:
+ id: 10
+ area_id: 30
+ adjacency: true
+ bfd: true
+ cost:
+ interface_cost: 5
+ dead_interval:
+ time: 5
+ demand_circuit:
+ ignore: true
+ network:
+ broadcast: true
+ priority: 25
+ resync_timeout: 10
+ shutdown: true
+ ttl_security:
+ hops: 50
+ - afi: ipv6
+ adjacency: true
+ database_filter: true
+ manet:
+ link_metrics:
+ cost_threshold: 10
+ priority: 55
+ transmit_delay: 45
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..fe5c253d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,53 @@
+---
+- debug:
+ msg: START Replaced ios_ospf_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_ipv6_setup.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaced provided OSPF Interfaces configuration
+ register: result
+ cisco.ios.ios_ospf_interfaces: &id001
+ config:
+ - name: GigabitEthernet0/2
+ address_family:
+ - afi: ipv6
+ adjacency: true
+ priority: 20
+ transmit_delay: 30
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Replaced provided OSPF Interfaces configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospf_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..d556e3ba
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,99 @@
+---
+- debug:
+ msg: START ios_ospf_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_ipv6_setup.yaml
+
+- block:
+
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.ios.ios_ospf_interfaces: &id001
+ config:
+ - name: GigabitEthernet0/1
+ address_family:
+ - afi: ipv4
+ authentication:
+ message_digest: true
+ process:
+ id: 10
+ area_id: 30
+ adjacency: true
+ bfd: true
+ cost:
+ interface_cost: 5
+ dead_interval:
+ time: 5
+ demand_circuit:
+ ignore: true
+ network:
+ broadcast: true
+ priority: 25
+ resync_timeout: 10
+ shutdown: true
+ ttl_security:
+ hops: 50
+ - afi: ipv6
+ adjacency: true
+ database_filter: true
+ manet:
+ link_metrics:
+ cost_threshold: 10
+ priority: 55
+ transmit_delay: 45
+ state: merged
+
+ - name: Gather OSPF Interfaces facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - ospf_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.ios.ios_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/1
+ address_family:
+ - afi: ipv6
+ adjacency: true
+ priority: 20
+ transmit_delay: 30
+ - name: GigabitEthernet0/2
+ address_family:
+ - afi: ipv4
+ process:
+ id: 10
+ area_id: 20
+ adjacency: true
+ cost:
+ interface_cost: 30
+ priority: 40
+ ttl_security:
+ hops: 50
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 23
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.ios.ios_ospf_interfaces:
+ config: "{{ ansible_facts['network_resources']['ospf_interfaces'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 23
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/vars/main.yaml
new file mode 100644
index 00000000..ee9a9254
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospf_interfaces/vars/main.yaml
@@ -0,0 +1,207 @@
+---
+merged:
+ before: {}
+
+ commands:
+ - interface GigabitEthernet0/1
+ - ip ospf 10 area 30
+ - ip ospf adjacency stagger disable
+ - ip ospf authentication message-digest
+ - ip ospf bfd
+ - ip ospf cost 5
+ - ip ospf dead-interval 5
+ - ip ospf demand-circuit ignore
+ - ip ospf network broadcast
+ - ip ospf priority 25
+ - ip ospf resync-timeout 10
+ - ip ospf shutdown
+ - ip ospf ttl-security hops 50
+ - ipv6 ospf adjacency stagger disable
+ - ipv6 ospf database-filter all out
+ - ipv6 ospf manet peering link-metrics 10
+ - ipv6 ospf priority 55
+ - ipv6 ospf transmit-delay 45
+
+ after:
+ - name: Loopback888
+ - name: Loopback999
+ - name: GigabitEthernet0/0
+ - address_family:
+ - adjacency: true
+ afi: ipv4
+ authentication:
+ message_digest: true
+ bfd: true
+ cost:
+ interface_cost: 5
+ dead_interval:
+ time: 5
+ demand_circuit:
+ ignore: true
+ network:
+ broadcast: true
+ priority: 25
+ process:
+ area_id: "30"
+ id: 10
+ resync_timeout: 10
+ shutdown: true
+ ttl_security:
+ hops: 50
+ - adjacency: true
+ afi: ipv6
+ database_filter: true
+ manet:
+ link_metrics:
+ cost_threshold: 10
+ priority: 55
+ transmit_delay: 45
+ name: GigabitEthernet0/1
+ - name: GigabitEthernet0/2
+
+replaced:
+ commands:
+ - interface GigabitEthernet0/2
+ - ipv6 ospf adjacency stagger disable
+ - ipv6 ospf priority 20
+ - ipv6 ospf transmit-delay 30
+
+ after:
+ - name: Loopback888
+ - name: Loopback999
+ - name: GigabitEthernet0/0
+ - address_family:
+ - adjacency: true
+ afi: ipv4
+ authentication:
+ message_digest: true
+ bfd: true
+ cost:
+ interface_cost: 5
+ dead_interval:
+ time: 5
+ demand_circuit:
+ ignore: true
+ network:
+ broadcast: true
+ priority: 25
+ process:
+ area_id: "30"
+ id: 10
+ resync_timeout: 10
+ shutdown: true
+ ttl_security:
+ hops: 50
+ - adjacency: true
+ afi: ipv6
+ database_filter: true
+ manet:
+ link_metrics:
+ cost_threshold: 10
+ priority: 55
+ transmit_delay: 45
+ name: GigabitEthernet0/1
+ - address_family:
+ - adjacency: true
+ afi: ipv6
+ priority: 20
+ transmit_delay: 30
+ name: GigabitEthernet0/2
+
+overridden:
+ commands:
+ - interface GigabitEthernet0/2
+ - ip ospf 10 area 20
+ - ip ospf adjacency stagger disable
+ - ip ospf cost 30
+ - ip ospf priority 40
+ - ip ospf ttl-security hops 50
+ - interface GigabitEthernet0/1
+ - no ipv6 ospf database-filter all out
+ - no ipv6 ospf manet peering link-metrics 10
+ - ipv6 ospf priority 20
+ - ipv6 ospf transmit-delay 30
+ - no ip ospf 10 area 30
+ - no ip ospf adjacency stagger disable
+ - no ip ospf authentication message-digest
+ - no ip ospf bfd
+ - no ip ospf cost 5
+ - no ip ospf dead-interval 5
+ - no ip ospf demand-circuit ignore
+ - no ip ospf network broadcast
+ - no ip ospf priority 25
+ - no ip ospf resync-timeout 10
+ - no ip ospf shutdown
+ - no ip ospf ttl-security hops 50
+
+ after:
+ - name: Loopback888
+ - name: Loopback999
+ - name: GigabitEthernet0/0
+ - address_family:
+ - adjacency: true
+ afi: ipv6
+ priority: 20
+ transmit_delay: 30
+ name: GigabitEthernet0/1
+ - address_family:
+ - adjacency: true
+ afi: ipv4
+ cost:
+ interface_cost: 30
+ priority: 40
+ process:
+ area_id: "20"
+ id: 10
+ ttl_security:
+ hops: 50
+ name: GigabitEthernet0/2
+
+deleted:
+ commands:
+ - interface GigabitEthernet0/1
+ - no ip ospf 10 area 30
+ - no ip ospf adjacency stagger disable
+ - no ip ospf authentication message-digest
+ - no ip ospf bfd
+ - no ip ospf cost 5
+ - no ip ospf dead-interval 5
+ - no ip ospf demand-circuit ignore
+ - no ip ospf network broadcast
+ - no ip ospf priority 25
+ - no ip ospf resync-timeout 10
+ - no ip ospf shutdown
+ - no ip ospf ttl-security hops 50
+ - no ipv6 ospf adjacency stagger disable
+ - no ipv6 ospf database-filter all out
+ - no ipv6 ospf manet peering link-metrics 10
+ - no ipv6 ospf priority 55
+ - no ipv6 ospf transmit-delay 45
+
+ after: {}
+
+rtt:
+ commands:
+ - interface GigabitEthernet0/2
+ - no ip ospf 10 area 20
+ - no ip ospf adjacency stagger disable
+ - no ip ospf cost 30
+ - no ip ospf priority 40
+ - no ip ospf ttl-security hops 50
+ - interface GigabitEthernet0/1
+ - ip ospf 10 area 30
+ - ip ospf adjacency stagger disable
+ - ip ospf authentication message-digest
+ - ip ospf bfd
+ - ip ospf cost 5
+ - ip ospf dead-interval 5
+ - ip ospf demand-circuit ignore
+ - ip ospf network broadcast
+ - ip ospf priority 25
+ - ip ospf resync-timeout 10
+ - ip ospf shutdown
+ - ip ospf ttl-security hops 50
+ - ipv6 ospf database-filter all out
+ - ipv6 ospf manet peering link-metrics 10
+ - ipv6 ospf priority 55
+ - ipv6 ospf transmit-delay 45
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_initial_vrf_setup.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_initial_vrf_setup.yaml
new file mode 100644
index 00000000..af7e0238
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_initial_vrf_setup.yaml
@@ -0,0 +1,6 @@
+---
+- name: Create and Setup VRF configuration
+ vars:
+ lines: "vrf definition ospf_vrf\naddress-family ipv4\nvrf definition blue\naddress-family ipv4\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..c3b4affb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_parsed.cfg
@@ -0,0 +1,19 @@
+router ospf 200 vrf blue
+ auto-cost reference-bandwidth 4
+ distribute-list 10 out
+ distribute-list 123 in
+ domain-id 192.0.3.1
+ max-metric router-lsa on-startup 100
+ area 10 capability default-exclusion
+router ospf 1
+ default-information originate
+ max-metric router-lsa on-startup 110
+ network 198.51.100.0 0.0.0.255 area 5
+ area 10 authentication message-digest
+ area 10 default-cost 10
+ area 10 nssa translate type7 suppress-fa
+ area 10 nssa default-information-originate metric 10
+ area 10 filter-list prefix test_prefix_in in
+ area 10 filter-list prefix test_prefix_out out
+ area 5 authentication
+ area 5 capability default-exclusion
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..178a6702
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_populate_config.yaml
@@ -0,0 +1,55 @@
+---
+- name: Populate OSPF Configuration
+ cisco.ios.ios_ospfv2:
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ areas:
+ - area_id: "5"
+ capability: true
+ authentication:
+ enable: true
+ - area_id: "10"
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ default_cost: 10
+ filter_list:
+ - name: test_prefix_in
+ direction: in
+ - name: test_prefix_out
+ direction: out
+ network:
+ - address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ area: 5
+ default_information:
+ originate: true
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.3.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ areas:
+ - area_id: "10"
+ capability: true
+ distribute_list:
+ acls:
+ - name: 10
+ direction: out
+ - name: 123
+ direction: in
+ state: merged
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..d616c3da
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/_remove_config.yaml
@@ -0,0 +1,10 @@
+---
+- name: Remove OSPFV2 Config
+ cisco.ios.ios_ospfv2:
+ state: deleted
+
+- name: Delete and Clean VRF configuration
+ vars:
+ lines: "no vrf definition ospf_vrf\nno vrf definition blue\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/deleted.yaml
new file mode 100644
index 00000000..a6fdb0e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/deleted.yaml
@@ -0,0 +1,83 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_ospfv2 ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_vrf_setup.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete provided OSPF V2 processes
+ register: result
+ cisco.ios.ios_ospfv2: &id001
+ config:
+ processes:
+ - process_id: 1
+ - process_id: 200
+ vrf: blue
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['before']['processes']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ result['after'] == {} }}"
+
+ - name: Delete provided OSPF V2 processes (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospfv2: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete provided OSPF V2 processes without any config
+ register: result
+ cisco.ios.ios_ospfv2: &id002
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['before']['processes']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ result['after'] == {} }}"
+
+ - name: Delete provided OSPF V2 processes without any config (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospfv2: *id002
+
+ - name: Assert that the merge task was idempotent
+ assert:
+ that:
+ - result.changed == false
+
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..4fdff081
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START ios_ospfv2 empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospfv2:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospfv2:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospfv2:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospfv2:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospfv2:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/gathered.yaml
new file mode 100644
index 00000000..de90db3f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/gathered.yaml
@@ -0,0 +1,27 @@
+---
+- debug:
+ msg: START ios_ospfv2 gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_vrf_setup.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_ospfv2:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - result.changed == false
+ - "{{ merged['after']['processes'] | symmetric_difference(result['gathered']['processes']) |length\
+ \ == 0 }}"
+
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/merged.yaml
new file mode 100644
index 00000000..f1a28ae7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/merged.yaml
@@ -0,0 +1,94 @@
+---
+- debug:
+ msg: START Merged ios_ospfv2 state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_vrf_setup.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.ios.ios_ospfv2: &id001
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ areas:
+ - area_id: "5"
+ capability: true
+ authentication:
+ enable: true
+ - area_id: "10"
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ default_cost: 10
+ filter_list:
+ - name: test_prefix_in
+ direction: in
+ - name: test_prefix_out
+ direction: out
+ network:
+ - address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ area: 5
+ default_information:
+ originate: true
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.3.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ areas:
+ - area_id: "10"
+ capability: true
+ distribute_list:
+ acls:
+ - name: 10
+ direction: out
+ - name: 123
+ direction: in
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] == {} }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['after']['processes']) | length\
+ \ == 0 }}"
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospfv2: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/overridden.yaml
new file mode 100644
index 00000000..4e5281e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/overridden.yaml
@@ -0,0 +1,80 @@
+---
+- debug:
+ msg: START Overridden ios_ospfv2 state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_vrf_setup.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override provided OSPF V2 configuration
+ register: result
+ cisco.ios.ios_ospfv2: &id001
+ config:
+ processes:
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.4.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ maximum_paths: 15
+ ttl_security:
+ hops: 7
+ areas:
+ - area_id: "10"
+ default_cost: 10
+ authentication:
+ message_digest: true
+ - process_id: 100
+ vrf: ospf_vrf
+ domain_id:
+ ip_address:
+ address: 192.0.5.1
+ auto_cost:
+ reference_bandwidth: 5
+ areas:
+ - area_id: "5"
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['before']['processes']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after']['processes'] | symmetric_difference(result['after']['processes']) | length\
+ \ == 0 }}"
+
+ - name: Override provided OSPF V2 configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospfv2: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/parsed.yaml
new file mode 100644
index 00000000..19592f97
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START ios_ospfv2 parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse the commands for provided configuration
+ register: result
+ cisco.ios.ios_ospfv2:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+- assert:
+ that:
+ - result.changed == false
+ - "{{ merged['after']['processes'] | symmetric_difference(result['parsed']['processes']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/rendered.yaml
new file mode 100644
index 00000000..f3014839
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/rendered.yaml
@@ -0,0 +1,66 @@
+---
+- debug:
+ msg: Start ios_ospfv2 rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+ - name: Render the commands for provided configuration
+ register: result
+ cisco.ios.ios_ospfv2: &id001
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ areas:
+ - area_id: "5"
+ capability: true
+ authentication:
+ enable: true
+ - area_id: "10"
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ default_cost: 10
+ filter_list:
+ - name: test_prefix_in
+ direction: in
+ - name: test_prefix_out
+ direction: out
+ network:
+ - address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ area: 5
+ default_information:
+ originate: true
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.3.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ areas:
+ - area_id: "10"
+ capability: true
+ distribute_list:
+ acls:
+ - name: 10
+ direction: out
+ - name: 123
+ direction: in
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/replaced.yaml
new file mode 100644
index 00000000..4f11673e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/replaced.yaml
@@ -0,0 +1,80 @@
+---
+- debug:
+ msg: START Replaced ios_ospfv2 state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_vrf_setup.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaced provided OSPF V2 configuration
+ register: result
+ cisco.ios.ios_ospfv2: &id001
+ config:
+ processes:
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.4.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ maximum_paths: 15
+ ttl_security:
+ hops: 7
+ areas:
+ - area_id: "10"
+ default_cost: 10
+ authentication:
+ message_digest: true
+ - process_id: 100
+ vrf: ospf_vrf
+ domain_id:
+ ip_address:
+ address: 192.0.5.1
+ auto_cost:
+ reference_bandwidth: 5
+ areas:
+ - area_id: "5"
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['before']['processes']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after']['processes'] | symmetric_difference(result['after']['processes']) | length\
+ \ == 0 }}"
+
+ - name: Replaced provided OSPF V2 configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospfv2: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/rtt.yaml
new file mode 100644
index 00000000..1bb85144
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/tests/cli/rtt.yaml
@@ -0,0 +1,133 @@
+---
+- debug:
+ msg: START ios_ospfv2 round trip integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_vrf_setup.yaml
+
+- block:
+
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.ios.ios_ospfv2: &id001
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ areas:
+ - area_id: "5"
+ capability: true
+ authentication:
+ enable: true
+ - area_id: "10"
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ default_cost: 10
+ filter_list:
+ - name: test_prefix_in
+ direction: in
+ - name: test_prefix_out
+ direction: out
+ network:
+ - address: 198.51.100.0
+ wildcard_bits: 0.0.0.255
+ area: 5
+ default_information:
+ originate: true
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.3.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ areas:
+ - area_id: "10"
+ capability: true
+ distribute_list:
+ acls:
+ - name: 10
+ direction: out
+ - name: 123
+ direction: in
+ state: merged
+
+ - name: Gather OSPFV2 facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - ospfv2
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.ios.ios_ospfv2:
+ config:
+ processes:
+ - process_id: 200
+ vrf: blue
+ domain_id:
+ ip_address:
+ address: 192.0.4.1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ maximum_paths: 15
+ ttl_security:
+ hops: 7
+ areas:
+ - area_id: "10"
+ default_cost: 10
+ authentication:
+ message_digest: true
+ - process_id: 100
+ vrf: ospf_vrf
+ domain_id:
+ ip_address:
+ address: 192.0.5.1
+ auto_cost:
+ reference_bandwidth: 5
+ areas:
+ - area_id: "5"
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 18
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.ios.ios_ospfv2:
+ config: "{{ ansible_facts['network_resources']['ospfv2'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 24
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/vars/main.yaml
new file mode 100644
index 00000000..307b591e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv2/vars/main.yaml
@@ -0,0 +1,250 @@
+---
+merged:
+ before: {}
+
+ commands:
+ - router ospf 200 vrf blue
+ - auto-cost reference-bandwidth 4
+ - distribute-list 10 out
+ - distribute-list 123 in
+ - domain-id 192.0.3.1
+ - max-metric router-lsa on-startup 100
+ - area 10 capability default-exclusion
+ - router ospf 1
+ - default-information originate
+ - max-metric router-lsa on-startup 110
+ - network 198.51.100.0 0.0.0.255 area 5
+ - area 10 authentication message-digest
+ - area 10 default-cost 10
+ - area 10 nssa translate type7 suppress-fa
+ - area 10 nssa default-information-originate metric 10
+ - area 10 filter-list prefix test_prefix_out out
+ - area 10 filter-list prefix test_prefix_in in
+ - area 5 authentication
+ - area 5 capability default-exclusion
+
+ after:
+ processes:
+ - areas:
+ - area_id: "5"
+ authentication:
+ enable: true
+ capability: true
+ - area_id: "10"
+ authentication:
+ message_digest: true
+ default_cost: 10
+ filter_list:
+ - direction: in
+ name: test_prefix_in
+ - direction: out
+ name: test_prefix_out
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ default_information:
+ originate: true
+ max_metric:
+ on_startup:
+ time: 110
+ router_lsa: true
+ network:
+ - address: 198.51.100.0
+ area: "5"
+ wildcard_bits: 0.0.0.255
+ process_id: 1
+ - areas:
+ - area_id: "10"
+ capability: true
+ auto_cost:
+ reference_bandwidth: 4
+ distribute_list:
+ acls:
+ - direction: out
+ name: "10"
+ - direction: in
+ name: "123"
+ domain_id:
+ ip_address:
+ address: 192.0.3.1
+ max_metric:
+ on_startup:
+ time: 100
+ router_lsa: true
+ process_id: 200
+ vrf: blue
+
+replaced:
+ commands:
+ - router ospf 100 vrf ospf_vrf
+ - auto-cost reference-bandwidth 5
+ - domain-id 192.0.5.1
+ - area 5 authentication message-digest
+ - area 5 nssa translate type7 suppress-fa
+ - area 5 nssa default-information-originate metric 10
+ - router ospf 200 vrf blue
+ - no auto-cost reference-bandwidth 4
+ - no distribute-list 10 out
+ - no distribute-list 123 in
+ - domain-id 192.0.4.1
+ - max-metric router-lsa on-startup 200
+ - maximum-paths 15
+ - ttl-security all-interfaces hops 7
+ - area 10 authentication message-digest
+ - no area 10 capability default-exclusion
+ - area 10 default-cost 10
+
+ after:
+ processes:
+ - areas:
+ - area_id: "5"
+ authentication:
+ enable: true
+ capability: true
+ - area_id: "10"
+ authentication:
+ message_digest: true
+ default_cost: 10
+ filter_list:
+ - direction: in
+ name: test_prefix_in
+ - direction: out
+ name: test_prefix_out
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ default_information:
+ originate: true
+ max_metric:
+ on_startup:
+ time: 110
+ router_lsa: true
+ network:
+ - address: 198.51.100.0
+ area: "5"
+ wildcard_bits: 0.0.0.255
+ process_id: 1
+ - areas:
+ - area_id: "5"
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ auto_cost:
+ reference_bandwidth: 5
+ domain_id:
+ ip_address:
+ address: 192.0.5.1
+ process_id: 100
+ vrf: ospf_vrf
+ - areas:
+ - area_id: "10"
+ authentication:
+ message_digest: true
+ default_cost: 10
+ domain_id:
+ ip_address:
+ address: 192.0.4.1
+ max_metric:
+ on_startup:
+ time: 200
+ router_lsa: true
+ maximum_paths: 15
+ process_id: 200
+ ttl_security:
+ hops: 7
+ vrf: blue
+
+overridden:
+ commands:
+ - no router ospf 1
+ - router ospf 100 vrf ospf_vrf
+ - auto-cost reference-bandwidth 5
+ - domain-id 192.0.5.1
+ - area 5 authentication message-digest
+ - area 5 nssa translate type7 suppress-fa
+ - area 5 nssa default-information-originate metric 10
+ - router ospf 200 vrf blue
+ - no auto-cost reference-bandwidth 4
+ - no distribute-list 10 out
+ - no distribute-list 123 in
+ - domain-id 192.0.4.1
+ - max-metric router-lsa on-startup 200
+ - maximum-paths 15
+ - ttl-security all-interfaces hops 7
+ - area 10 authentication message-digest
+ - no area 10 capability default-exclusion
+ - area 10 default-cost 10
+
+ after:
+ processes:
+ - areas:
+ - area_id: "5"
+ authentication:
+ message_digest: true
+ nssa:
+ default_information_originate:
+ metric: 10
+ translate: suppress-fa
+ auto_cost:
+ reference_bandwidth: 5
+ domain_id:
+ ip_address:
+ address: 192.0.5.1
+ process_id: 100
+ vrf: ospf_vrf
+ - areas:
+ - area_id: "10"
+ authentication:
+ message_digest: true
+ default_cost: 10
+ domain_id:
+ ip_address:
+ address: 192.0.4.1
+ max_metric:
+ on_startup:
+ time: 200
+ router_lsa: true
+ maximum_paths: 15
+ process_id: 200
+ ttl_security:
+ hops: 7
+ vrf: blue
+
+deleted:
+ commands:
+ - no router ospf 200 vrf blue
+ - no router ospf 1
+
+ after: {}
+
+rtt:
+ commands:
+ - no router ospf 100 vrf ospf_vrf
+ - router ospf 200 vrf blue
+ - auto-cost reference-bandwidth 4
+ - distribute-list 10 out
+ - distribute-list 123 in
+ - domain-id 192.0.3.1
+ - max-metric router-lsa on-startup 100
+ - no maximum-paths 15
+ - no ttl-security all-interfaces hops 7
+ - no area 10 authentication message-digest
+ - area 10 capability default-exclusion
+ - no area 10 default-cost 10
+ - router ospf 1
+ - default-information originate
+ - max-metric router-lsa on-startup 110
+ - network 198.51.100.0 0.0.0.255 area 5
+ - area 10 authentication message-digest
+ - area 10 default-cost 10
+ - area 10 nssa translate type7 suppress-fa
+ - area 10 nssa default-information-originate metric 10
+ - area 10 filter-list prefix test_prefix_out out
+ - area 10 filter-list prefix test_prefix_in in
+ - area 5 authentication
+ - area 5 capability default-exclusion
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_initial_vrf_setup.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_initial_vrf_setup.yaml
new file mode 100644
index 00000000..1128695b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_initial_vrf_setup.yaml
@@ -0,0 +1,11 @@
+---
+- name: Enable IPV6 routing configuration
+ vars:
+ lines: "ipv6 unicast-routing\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
+- name: Create and Setup VRF configuration
+ vars:
+ lines: "vrf definition ospf_vrf\naddress-family ipv4\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..2c504a6a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_parsed.cfg
@@ -0,0 +1,15 @@
+router ospfv3 1
+ max-metric router-lsa on-startup 110
+ area 10 nssa default-information-originate metric 10
+ !
+ address-family ipv4 unicast vrf ospf_vrf
+ adjacency stagger 25 25
+ area 25 nssa default-information-originate metric 25 nssa-only
+ exit-address-family
+router ospfv3 200
+ max-metric router-lsa on-startup 100
+ auto-cost reference-bandwidth 4
+ !
+ address-family ipv4 unicast
+ adjacency stagger 200 200
+ exit-address-family
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..c45cf5f9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_populate_config.yaml
@@ -0,0 +1,42 @@
+---
+- name: Populate OSPFv3 Configuration
+ cisco.ios.ios_ospfv3:
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ address_family:
+ - afi: ipv4
+ unicast: true
+ vrf: ospf_vrf
+ adjacency:
+ min_adjacency: 25
+ max_adjacency: 25
+ areas:
+ - area_id: 25
+ nssa:
+ default_information_originate:
+ metric: 25
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ - process_id: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 200
+ max_adjacency: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ state: merged
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..d073b216
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/_remove_config.yaml
@@ -0,0 +1,16 @@
+---
+- name: Remove OSPFv3 Config
+ cisco.ios.ios_ospfv3:
+ state: deleted
+
+- name: Delete and Clean IPv6 routings configuration
+ vars:
+ lines: "no ipv6 unicast-routing\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
+
+- name: Delete and Clean VRF configuration
+ vars:
+ lines: "no vrf definition ospf_vrf\nno vrf definition blue\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/deleted.yaml
new file mode 100644
index 00000000..c941a125
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/deleted.yaml
@@ -0,0 +1,69 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_ospfv3 ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_vrf_setup.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete provided OSPF V3 processes
+ register: result
+ cisco.ios.ios_ospfv3: &id001
+ config:
+ processes:
+ - process_id: 1
+ - process_id: 200
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ result['after'] == {} }}"
+
+ - name: Delete provided OSPF V3 processes (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospfv3: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete provided OSPF V3 processes without any config
+ register: result
+ cisco.ios.ios_ospfv3: &id002
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ result['after'] == {} }}"
+
+ - name: Delete provided OSPF V3 processes without any config (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospfv3: *id002
+
+ - name: Assert that the merge task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..3b4474e5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/empty_config.yaml
@@ -0,0 +1,61 @@
+---
+- block:
+ - debug:
+ msg: START ios_ospfv3 empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+ - name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospfv3:
+ config:
+ state: merged
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+ - name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospfv3:
+ config:
+ state: replaced
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+ - name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospfv3:
+ config:
+ state: overridden
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+ - name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospfv3:
+ config:
+ state: rendered
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+ - name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_ospfv3:
+ running_config:
+ state: parsed
+
+ - assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/gathered.yaml
new file mode 100644
index 00000000..04caed7b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/gathered.yaml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: START ios_ospfv3 gathered integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+
+ - include_tasks: _remove_config.yaml
+ - include_tasks: _initial_vrf_setup.yaml
+ - include_tasks: _populate_config.yaml
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_ospfv3:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - result.changed == false
+ - "{{ merged['after']['processes'] | symmetric_difference(result['gathered']['processes']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/merged.yaml
new file mode 100644
index 00000000..5f1194c3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/merged.yaml
@@ -0,0 +1,75 @@
+---
+- debug:
+ msg: START Merged ios_ospfv3 state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_vrf_setup.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.ios.ios_ospfv3: &id001
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ address_family:
+ - afi: ipv4
+ unicast: true
+ vrf: ospf_vrf
+ adjacency:
+ min_adjacency: 25
+ max_adjacency: 25
+ areas:
+ - area_id: 25
+ nssa:
+ default_information_originate:
+ metric: 25
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ - process_id: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 200
+ max_adjacency: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] == {} }}"
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospfv3: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/overridden.yaml
new file mode 100644
index 00000000..b04dd626
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/overridden.yaml
@@ -0,0 +1,58 @@
+---
+- debug:
+ msg: START Overridden ios_ospfv3 state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_vrf_setup.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override provided OSPF V3 configuration
+ register: result
+ cisco.ios.ios_ospfv3: &id001
+ config:
+ processes:
+ - process_id: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 50
+ max_adjacency: 50
+ areas:
+ - area_id: 200
+ nssa:
+ default_information_originate:
+ metric: 200
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Override provided OSPF V3 configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospfv3: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/parsed.yaml
new file mode 100644
index 00000000..e17a2b16
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/parsed.yaml
@@ -0,0 +1,17 @@
+---
+- block:
+ - debug:
+ msg: START ios_ospfv3 parsed integration tests on connection={{ ansible_connection
+ }}
+
+ - name: Parse the commands for provided configuration
+ register: result
+ cisco.ios.ios_ospfv3:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+ - assert:
+ that:
+ - result.changed == false
+ - "{{ merged['after']['processes'] | symmetric_difference(result['parsed']['processes']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/rendered.yaml
new file mode 100644
index 00000000..0f323c24
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/rendered.yaml
@@ -0,0 +1,53 @@
+---
+- debug:
+ msg: Start ios_ospfv3 rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+ - name: Render the commands for provided configuration
+ register: result
+ cisco.ios.ios_ospfv3: &id001
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ address_family:
+ - afi: ipv4
+ unicast: true
+ vrf: ospf_vrf
+ adjacency:
+ min_adjacency: 25
+ max_adjacency: 25
+ areas:
+ - area_id: 25
+ nssa:
+ default_information_originate:
+ metric: 25
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ - process_id: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 200
+ max_adjacency: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/replaced.yaml
new file mode 100644
index 00000000..7bf5f651
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/replaced.yaml
@@ -0,0 +1,58 @@
+---
+- debug:
+ msg: START Replaced ios_ospfv3 state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_vrf_setup.yaml
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaced provided OSPF V3 configuration
+ register: result
+ cisco.ios.ios_ospfv3: &id001
+ config:
+ processes:
+ - process_id: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 50
+ max_adjacency: 50
+ areas:
+ - area_id: 200
+ nssa:
+ default_information_originate:
+ metric: 200
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Replaced provided OSPF V3 configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_ospfv3: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/rtt.yaml
new file mode 100644
index 00000000..1707db0f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/tests/cli/rtt.yaml
@@ -0,0 +1,116 @@
+---
+- debug:
+ msg: START ios_ospfv3 round trip integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+- include_tasks: _initial_vrf_setup.yaml
+
+- block:
+
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.ios.ios_ospfv3: &id001
+ config:
+ processes:
+ - process_id: 1
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 110
+ address_family:
+ - afi: ipv4
+ unicast: true
+ vrf: ospf_vrf
+ adjacency:
+ min_adjacency: 25
+ max_adjacency: 25
+ areas:
+ - area_id: 25
+ nssa:
+ default_information_originate:
+ metric: 25
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ timers:
+ throttle:
+ lsa:
+ first_delay: 12
+ min_delay: 14
+ max_delay: 16
+ - process_id: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 200
+ max_adjacency: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 100
+ auto_cost:
+ reference_bandwidth: 4
+ state: merged
+
+ - name: Gather OSPFV3 facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - ospfv3
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.ios.ios_ospfv3:
+ config:
+ processes:
+ - process_id: 200
+ max_metric:
+ router_lsa: true
+ on_startup:
+ time: 200
+ address_family:
+ - afi: ipv4
+ unicast: true
+ adjacency:
+ min_adjacency: 50
+ max_adjacency: 50
+ areas:
+ - area_id: 200
+ nssa:
+ default_information_originate:
+ metric: 200
+ nssa_only: true
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 9
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.ios.ios_ospfv3:
+ config: "{{ ansible_facts['network_resources']['ospfv3'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 14
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/vars/main.yaml
new file mode 100644
index 00000000..1424f459
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ospfv3/vars/main.yaml
@@ -0,0 +1,104 @@
+---
+merged:
+ before: {}
+
+ commands:
+ - router ospfv3 1
+ - max-metric router-lsa on-startup 110
+ - area 10 nssa default-information-originate metric 10
+ - address-family ipv4 unicast vrf ospf_vrf
+ - adjacency stagger 25 25
+ - area 25 nssa default-information-originate metric 25 nssa-only
+ - exit-address-family
+ - router ospfv3 200
+ - auto-cost reference-bandwidth 4
+ - max-metric router-lsa on-startup 100
+ - address-family ipv4 unicast
+ - adjacency stagger 200 200
+ - exit-address-family
+
+ after:
+ processes:
+ - address_family:
+ - adjacency:
+ max_adjacency: 25
+ min_adjacency: 25
+ afi: ipv4
+ areas:
+ - area_id: "25"
+ nssa:
+ default_information_originate:
+ metric: 25
+ nssa_only: true
+ unicast: true
+ vrf: ospf_vrf
+ areas:
+ - area_id: "10"
+ nssa:
+ default_information_originate:
+ metric: 10
+ max_metric:
+ on_startup:
+ time: 110
+ router_lsa: true
+ process_id: 1
+ - address_family:
+ - adjacency:
+ max_adjacency: 200
+ min_adjacency: 200
+ afi: ipv4
+ unicast: true
+ auto_cost:
+ reference_bandwidth: 4
+ max_metric:
+ on_startup:
+ time: 100
+ router_lsa: true
+ process_id: 200
+
+replaced:
+ commands:
+ - router ospfv3 200
+ - no auto-cost reference-bandwidth 4
+ - max-metric router-lsa on-startup 200
+ - area 10 nssa default-information-originate metric 10
+ - address-family ipv4 unicast
+ - adjacency stagger 50 50
+ - area 200 nssa default-information-originate metric 200 nssa-only
+ - exit-address-family
+
+overridden:
+ commands:
+ - no router ospfv3 1
+ - router ospfv3 200
+ - no auto-cost reference-bandwidth 4
+ - max-metric router-lsa on-startup 200
+ - area 10 nssa default-information-originate metric 10
+ - address-family ipv4 unicast
+ - adjacency stagger 50 50
+ - area 200 nssa default-information-originate metric 200 nssa-only
+ - exit-address-family
+
+deleted:
+ commands:
+ - no router ospfv3 1
+ - no router ospfv3 200
+
+ after: {}
+
+rtt:
+ commands:
+ - router ospfv3 1
+ - max-metric router-lsa on-startup 110
+ - area 10 nssa default-information-originate metric 10
+ - address-family ipv4 unicast vrf ospf_vrf
+ - adjacency stagger 25 25
+ - area 25 nssa default-information-originate metric 25 nssa-only
+ - exit-address-family
+ - router ospfv3 200
+ - auto-cost reference-bandwidth 4
+ - max-metric router-lsa on-startup 100
+ - no area 10 nssa default-information-originate metric 10
+ - address-family ipv4 unicast
+ - exit-address-family
+ - adjacency stagger 200 200
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/meta/main.yaml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/tests/cli/ping.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/tests/cli/ping.yaml
new file mode 100644
index 00000000..ed365b5e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_ping/tests/cli/ping.yaml
@@ -0,0 +1,58 @@
+---
+- debug: msg="START cli/ping.yaml on connection={{ ansible_connection }}"
+
+- register: show_version_result
+ cisco.ios.ios_command:
+ commands: show version
+ provider: '{{ cli }}'
+
+- set_fact: management_interface=GigabitEthernet0/0
+ when: "'Cisco IOS' in show_version_result.stdout[0]"
+
+- set_fact: management_interface=GigabitEthernet1
+ when: "'Cisco IOS-XE' in show_version_result.stdout[0]"
+
+- name: Get show ip management nterface output
+ register: show_ip_interface_result
+ cisco.ios.ios_command:
+ commands:
+ - show ip interface {{ management_interface }} | include Internet address
+ provider: '{{ cli }}'
+
+- name: Extract the IP address from registered output
+ set_fact: management_ip="{{ show_ip_interface_result.stdout[0].split()[-1].split('/')[0]
+ }}"
+
+- name: expected successful ping
+ register: esp
+ cisco.ios.ios_ping:
+ dest: '{{ management_ip }}'
+ provider: '{{ cli }}'
+
+- name: unexpected unsuccessful ping
+ register: uup
+ ignore_errors: true
+ cisco.ios.ios_ping:
+ dest: 10.255.255.250
+ provider: '{{ cli }}'
+
+- name: unexpected successful ping
+ register: usp
+ ignore_errors: true
+ cisco.ios.ios_ping:
+ dest: '{{ management_ip }}'
+ provider: '{{ cli }}'
+ state: absent
+
+- name: expected unsuccessful ping
+ register: eup
+ cisco.ios.ios_ping:
+ dest: 10.255.255.250
+ provider: '{{ cli }}'
+ state: absent
+
+- name: assert
+ assert:
+ that:
+ - esp.failed == eup.failed == false
+ - usp.failed == uup.failed == true
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/defaults/main.yaml
new file mode 100644
index 00000000..9ef5ba51
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: "*"
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/meta/main.yaml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tasks/cli.yaml
new file mode 100644
index 00000000..826f6a84
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tasks/cli.yaml
@@ -0,0 +1,22 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: "{{ role_path }}/tests/cli"
+ patterns: "{{ testcase }}.yaml"
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=network_cli)
+ include: "{{ test_case_to_run }}"
+ with_items: "{{ test_items }}"
+ loop_control:
+ loop_var: test_case_to_run
+
+- name: run test case (connection=local)
+ include: "{{ test_case_to_run }} ansible_connection=local"
+ with_items: "{{ test_items }}"
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tasks/main.yaml
new file mode 100644
index 00000000..4dfb58b9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- { include: cli.yaml, tags: ['network_cli'] }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/templates/defaults/config.j2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/templates/defaults/config.j2
new file mode 100644
index 00000000..1d4d9da8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/templates/defaults/config.j2
@@ -0,0 +1,4 @@
+interface Loopback999
+ description this is a test
+ no shutdown
+
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tests/cli/common_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tests/cli/common_config.yaml
new file mode 100644
index 00000000..1aff5d6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tests/cli/common_config.yaml
@@ -0,0 +1,213 @@
+---
+# ios_linkagg -> CustomNetworkConfig
+# cisco.ios.ios_config -> dumps, NetworkConfig
+
+- debug: msg="START cli/common_config.yaml on connection={{ ansible_connection }}"
+
+# Hit NetworkConfig
+- name: set hostname
+ cisco.ios.ios_config:
+ lines: ['hostname ios-smoke']
+ match: none
+ provider: "{{ cli }}"
+
+- name: hit diff_ignore_lines
+ cisco.ios.ios_config:
+ lines: ['hostname ios-smoke-diff']
+ diff_ignore_lines:
+ - hostname ios-smoke
+ save_when: modified
+ provider: "{{ cli }}"
+
+- name: return hostname
+ cisco.ios.ios_config:
+ lines: ['hostname {{ shorter_hostname }}']
+ match: none
+ provider: "{{ cli }}"
+
+- name: hit items with parents
+ cisco.ios.ios_config:
+ lines: ['permit ip any any log']
+ parents: ['ip access-list extended test']
+ provider: "{{ cli }}"
+ match: exact
+ register: result
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - 'no ip access-list extended test'
+ match: none
+ provider: "{{ cli }}"
+
+- name: setup test NetworkConfig.difference, replace=block
+ cisco.ios.ios_config:
+ lines:
+ - permit ip host 192.0.2.1 any log
+ - permit ip host 192.0.2.2 any log
+ - permit ip host 192.0.2.3 any log
+ parents: ['ip access-list extended test']
+ before: ['no ip access-list extended test']
+ after: ['exit']
+ provider: "{{ cli }}"
+ match: none
+
+- name: test NetworkConfig.difference, replace=block
+ cisco.ios.ios_config:
+ lines:
+ - permit ip host 192.0.2.1 any log
+ - permit ip host 192.0.2.2 any log
+ - permit ip host 192.0.2.3 any log
+ - permit ip host 192.0.2.4 any log
+ parents: ['ip access-list extended test']
+ replace: block
+ after: ['exit']
+ provider: "{{ cli }}"
+ register: result
+
+- assert:
+ that:
+ - "result.changed == true"
+ - "'ip access-list extended test' in result.updates"
+ - "'permit ip host 192.0.2.1 any log' in result.updates"
+ - "'permit ip host 192.0.2.2 any log' in result.updates"
+ - "'permit ip host 192.0.2.3 any log' in result.updates"
+ - "'permit ip host 192.0.2.4 any log' in result.updates"
+
+- name: teardown- NetworkConfig.difference, replace=block
+ cisco.ios.ios_config:
+ lines:
+ - no ip access-list extended test
+ match: none
+ provider: "{{ cli }}"
+
+# CustomNetworkConfig
+# currently gets skipped because switch_type != 'L2'
+- set_fact: switch_type="{{ switch_type }}"
+
+- block:
+
+ - name: setup - remove config used in test(part1)
+ cisco.ios.ios_config:
+ lines:
+ - no interface port-channel 20
+ provider: "{{ cli }}"
+ ignore_errors: true
+
+ - name: setup - remove config used in test(part2)
+ cisco.ios.ios_config:
+ lines:
+ - no interface port-channel 5
+ provider: "{{ cli }}"
+ ignore_errors: true
+
+ - name: setup - remove config used in test(part3)
+ cisco.ios.ios_config:
+ lines:
+ - no channel-group 20 mode active
+ provider: "{{ cli }}"
+ parents: "{{ item }}"
+ loop:
+ - interface GigabitEthernet0/1
+ - interface GigabitEthernet0/2
+
+ - name: create linkagg
+ ios_linkagg: &create
+ group: 20
+ state: present
+ provider: "{{ cli }}"
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == true"
+ - "'interface port-channel 20' in result.commands"
+
+ - name: set link aggregation group to members
+ ios_linkagg: &configure_member
+ group: 20
+ mode: active
+ members:
+ - GigabitEthernet0/1
+ - GigabitEthernet0/2
+ provider: "{{ cli }}"
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == true"
+ - "'interface GigabitEthernet0/1' in result.commands"
+ - "'channel-group 20 mode active' in result.commands"
+ - "'interface GigabitEthernet0/2' in result.commands"
+ - "'channel-group 20 mode active' in result.commands"
+
+ - name: remove link aggregation group from member
+ ios_linkagg: &remove_member
+ group: 20
+ mode: active
+ members:
+ - GigabitEthernet0/2
+ provider: "{{ cli }}"
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == true"
+ - "'interface GigabitEthernet0/1' in result.commands"
+ - "'no channel-group 20 mode active' in result.commands"
+
+ - name: remove linkagg
+ ios_linkagg: &remove
+ group: 20
+ state: absent
+ provider: "{{ cli }}"
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == true"
+ - "'no interface port-channel 20' in result.commands"
+
+ - name: create aggregate of linkagg definitions
+ ios_linkagg: &create_agg
+ aggregate:
+ - { group: 5 }
+ - { group: 20, mode: active, members: ['GigabitEthernet0/1'] }
+ provider: "{{ cli }}"
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == true"
+ - "'interface port-channel 5' in result.commands"
+ - "'interface port-channel 20' in result.commands"
+ - "'interface GigabitEthernet0/1' in result.commands"
+ - "'channel-group 20 mode active' in result.commands"
+
+ - name: teardown(part1)
+ cisco.ios.ios_config:
+ lines:
+ - no interface port-channel 20
+ provider: "{{ cli }}"
+ ignore_errors: true
+
+ - name: teardown(part2)
+ cisco.ios.ios_config:
+ lines:
+ - no interface port-channel 5
+ provider: "{{ cli }}"
+ ignore_errors: true
+
+ - name: teardown(part3)
+ cisco.ios.ios_config:
+ lines:
+ - no channel-group 20 mode active
+ provider: "{{ cli }}"
+ parents: "{{ item }}"
+ loop:
+ - interface GigabitEthernet0/1
+ - interface GigabitEthernet0/2
+
+ when: switch_type == 'L2'
+
+- debug: msg="END cli/common_config.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tests/cli/common_utils.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tests/cli/common_utils.yaml
new file mode 100644
index 00000000..ef0d0d95
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tests/cli/common_utils.yaml
@@ -0,0 +1,152 @@
+---
+# ios_command -> ComplexList
+# ios_interface -> conditional, remove_default_spec
+# ios_logging -> validate_ip_address
+# ios_l3_interface -> is_netmask, is_masklen, to_subnet, to_netmask, to_masklen
+
+# ComplexList already covered
+
+- debug: msg="START ios_smoke cli/common_utils.yaml on connection={{ ansible_connection }}"
+
+# hit is_netmask(), is_masklen(), to_netmask(), to_masklen()
+- name: Delete interface ipv4 and ipv6 address(setup)
+ cisco.ios.ios_l3_interface:
+ name: "{{ test_interface }}"
+ state: absent
+ provider: "{{ cli }}"
+ register: result
+
+- name: Setup - Ensure interfaces are switchport
+ cisco.ios.ios_config:
+ lines:
+ - no shutdown
+ parents:
+ - "interface {{ item }}"
+ provider: "{{ cli }}"
+ loop:
+ - "{{ test_interface }}"
+ - "{{ test_interface2 }}"
+
+- name: Configure interface ipv4 address
+ cisco.ios.ios_l3_interface:
+ name: "{{ test_interface }}"
+ ipv4: 192.168.20.1/24
+ state: present
+ provider: "{{ cli }}"
+ register: result
+
+- assert:
+ that:
+ - 'result.changed == true'
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"ip address 192.168.20.1 255.255.255.0" in result.commands'
+
+- name: test invalid subnet
+ cisco.ios.ios_l3_interface:
+ name: "{{ test_interface }}"
+ ipv4: 192.168.20.1/45
+ state: present
+ provider: "{{ cli }}"
+ register: result
+ ignore_errors: true
+
+- debug: var=result
+
+- assert:
+ that:
+ - 'result.failed == true'
+
+- name: Change ipv4 and ipv6 address using aggregate
+ cisco.ios.ios_l3_interface:
+ aggregate:
+ - { name: "{{ test_interface }}", ipv4: 193.167.1.1/8, ipv6: "fd5a:12c9:2201:4::4/32" }
+ - { name: "{{ test_interface2 }}", ipv4: 192.169.2.2/24, ipv6: "fd5b:12c9:2201:5::5/90" }
+ provider: "{{ cli }}"
+ register: result
+
+- assert:
+ that:
+ - 'result.changed == true'
+ - '"interface {{ test_interface }}" in result.commands'
+ - '"ip address 193.167.1.1 255.0.0.0" in result.commands'
+ - '"ipv6 address fd5a:12c9:2201:4::4/32" in result.commands'
+ - '"interface {{ test_interface2 }}" in result.commands'
+ - '"ip address 192.169.2.2 255.255.255.0" in result.commands'
+ - '"ipv6 address fd5b:12c9:2201:5::5/90" in result.commands'
+
+- name: Delete ipv4 and ipv6 address using aggregate
+ cisco.ios.ios_l3_interface:
+ aggregate:
+ - { name: "{{ test_interface }}" }
+ - { name: "{{ test_interface2 }}" }
+ state: absent
+ provider: "{{ cli }}"
+ register: result
+
+# hit validate_ip_address()
+- name: Remove host logging - setup
+ net_logging:
+ dest: host
+ name: 172.16.0.1
+ state: absent
+ provider: "{{ cli }}"
+
+- name: Remove host logging - teardown
+ net_logging:
+ dest: host
+ name: 172.16.0.1
+ state: absent
+ provider: "{{ cli }}"
+
+# hit conditional(), remove_default_spec()
+- name: Check intent arguments
+ ios_interface:
+ name: "{{ test_interface }}"
+ state: up
+ provider: "{{ cli }}"
+ register: result
+
+- assert:
+ that:
+ - "result.failed == false"
+
+- name: Check intent arguments (failed condition)
+ ios_interface:
+ name: "{{ test_interface }}"
+ state: down
+ provider: "{{ cli }}"
+ ignore_errors: true
+ register: result
+
+- assert:
+ that:
+ - "result.failed == true"
+ - "'state eq(down)' in result.failed_conditions"
+
+- name: Config + intent
+ ios_interface:
+ name: "{{ test_interface }}"
+ enabled: false
+ state: down
+ provider: "{{ cli }}"
+ register: result
+
+- assert:
+ that:
+ - "result.failed == false"
+
+- name: Config + intent (fail)
+ ios_interface:
+ name: "{{ test_interface }}"
+ enabled: false
+ provider: "{{ cli }}"
+ state: up
+ ignore_errors: true
+ register: result
+
+- assert:
+ that:
+ - "result.failed == true"
+ - "'state eq(up)' in result.failed_conditions"
+
+- debug: msg="END ios_smoke cli/common_utils.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tests/cli/misc_tests.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tests/cli/misc_tests.yaml
new file mode 100644
index 00000000..b406505a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_smoke/tests/cli/misc_tests.yaml
@@ -0,0 +1,41 @@
+---
+- debug: msg="START ios_smoke cli/misc_tests.yaml on connection={{ ansible_connection }}"
+
+# hit network.ios.ios- get_defaults_flag()
+- name: setup
+ cisco.ios.ios_config:
+ commands:
+ - no description
+ - shutdown
+ parents:
+ - interface Loopback999
+ match: none
+ provider: "{{ cli }}"
+
+- name: configure device with defaults included
+ cisco.ios.ios_config:
+ src: defaults/config.j2
+ defaults: true
+ provider: "{{ cli }}"
+ register: result
+
+- name: run ios commands to test command_timeout
+ cisco.ios.ios_command:
+ commands:
+ - show running-config all
+ - show interfaces
+ - show running-config all
+ vars:
+ ansible_command_timeout: 1
+ ansible_buffer_read_timeout: 2
+ ignore_errors: true
+ register: result
+ when: ansible_connection == 'network_cli'
+
+- assert:
+ that:
+ - 'result.failed == true'
+ - "'timeout value 1 seconds reached' in result.msg"
+ when: ansible_connection == 'network_cli'
+
+- debug: msg="END ios_smoke cli/misc_tests.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/meta/main.yaml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tests/cli/basic.yaml
new file mode 100644
index 00000000..3a05ffb1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tests/cli/basic.yaml
@@ -0,0 +1,159 @@
+---
+- debug: msg="START ios cli/ios_static_route.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Clear all static routes
+ cisco.ios.ios_static_route: &id003
+ aggregate:
+
+ - prefix: 172.16.31.0
+
+ - prefix: 172.16.32.0
+
+ - prefix: 172.16.33.0
+
+ - prefix: 172.16.34.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.8
+ state: absent
+ provider: '{{ cli }}'
+
+- name: create static route
+ register: result
+ cisco.ios.ios_static_route:
+ prefix: 172.16.31.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.8
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands == ["ip route 172.16.31.0 255.255.255.0 10.0.0.8"]
+
+- name: Verify idempotence with default admin_distance
+ register: result
+ cisco.ios.ios_static_route:
+ prefix: 172.16.31.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.8
+ admin_distance: 1
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: modify admin distance of static route
+ register: result
+ cisco.ios.ios_static_route: &id001
+ prefix: 172.16.31.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.8
+ admin_distance: 2
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands == ["ip route 172.16.31.0 255.255.255.0 10.0.0.8 2"]
+
+- name: modify admin distance of static route again (idempotent)
+ register: result
+ cisco.ios.ios_static_route: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Verify idempotence with unspecified admin_distance
+ register: result
+ cisco.ios.ios_static_route:
+ prefix: 172.16.31.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.8
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: delete static route
+ register: result
+ cisco.ios.ios_static_route: &id002
+ prefix: 172.16.31.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.8
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands == ["no ip route 172.16.31.0 255.255.255.0 10.0.0.8"]
+
+- name: delete static route again (idempotent)
+ register: result
+ cisco.ios.ios_static_route: *id002
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Add static route aggregates
+ register: result
+ cisco.ios.ios_static_route:
+ aggregate:
+
+ - prefix: 172.16.32.0
+
+ - prefix: 172.16.33.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.8
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands == ["ip route 172.16.32.0 255.255.255.0 10.0.0.8", "ip route
+ 172.16.33.0 255.255.255.0 10.0.0.8"]
+
+- name: Add and remove static route aggregates with overrides
+ register: result
+ cisco.ios.ios_static_route:
+ aggregate:
+
+ - prefix: 172.16.32.0
+
+ - prefix: 172.16.33.0
+ state: absent
+
+ - prefix: 172.16.34.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.8
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands == ["no ip route 172.16.33.0 255.255.255.0 10.0.0.8", "ip
+ route 172.16.34.0 255.255.255.0 10.0.0.8"]
+
+- name: Remove static route aggregates
+ register: result
+ cisco.ios.ios_static_route: *id003
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands == ["no ip route 172.16.32.0 255.255.255.0 10.0.0.8", "no
+ ip route 172.16.34.0 255.255.255.0 10.0.0.8"]
+
+- debug: msg="END ios cli/ios_static_route.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tests/cli/net_static_route.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tests/cli/net_static_route.yaml
new file mode 100644
index 00000000..b892be53
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_route/tests/cli/net_static_route.yaml
@@ -0,0 +1,32 @@
+---
+- debug: msg="START ios cli/net_static_route.yaml on connection={{ ansible_connection
+ }}"
+
+- name: delete static route - setup
+ ansible.netcommon.net_static_route: &id001
+ prefix: 172.16.31.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.8
+ state: absent
+ provider: '{{ cli }}'
+
+- name: create static route using platform agnostic module
+ register: result
+ ansible.netcommon.net_static_route:
+ prefix: 172.16.31.0
+ mask: 255.255.255.0
+ next_hop: 10.0.0.8
+ admin_distance: 1
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands == ["ip route 172.16.31.0 255.255.255.0 10.0.0.8 1"]
+
+- name: delete static route - teardown
+ ansible.netcommon.net_static_route: *id001
+
+- debug: msg="END ios cli/net_static_route.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/_intial_setup_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/_intial_setup_config.yaml
new file mode 100644
index 00000000..4606dcd4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/_intial_setup_config.yaml
@@ -0,0 +1,11 @@
+---
+- name: Intitial Setup Config
+ vars:
+ lines: "vrf definition ansible_temp_vrf\naddress-family ipv4\nip route vrf ansible_temp_vrf\
+ \ 192.0.2.0 255.255.255.0 192.0.2.1 tag 50 name test_vrf track 150\nip route\
+ \ 198.51.100.0 255.255.255.0 198.51.101.3 name route_3\nip route 198.51.100.0\
+ \ 255.255.255.0 198.51.101.2 30 name route_2\nip route 198.51.100.0 255.255.255.0\
+ \ 198.51.101.1 110 tag 40 name route_1 multicast\nipv6 route 2001:DB8:0:3::/64\
+ \ 2001:DB8:0:3::2 tag 105 name test_v6\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..7c58707a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/_populate_config.yaml
@@ -0,0 +1,10 @@
+---
+- name: Populate Config
+ vars:
+ lines: "ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 tag\
+ \ 50 name test_vrf track 150\nip route 198.51.100.0 255.255.255.0 198.51.101.3\
+ \ name route_3\nip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2\n\
+ ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40 name route_1 multicast\n\
+ ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 tag 105 name test_v6\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..633751e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/_remove_config.yaml
@@ -0,0 +1,11 @@
+---
+- name: Remove Config
+ vars:
+ lines: "no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 tag\
+ \ 50 name test_vrf track 150\nno ip route 198.51.100.0 255.255.255.0 198.51.101.3\
+ \ name route_3\nno ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name\
+ \ route_2\nno ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 tag 40\
+ \ name route_1 multicast\nno ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2\
+ \ tag 105 name test_v6\nno vrf definition ansible_temp_vrf\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/deleted.yaml
new file mode 100644
index 00000000..f7480c7c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/deleted.yaml
@@ -0,0 +1,82 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_static_routes ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _intial_setup_config.yaml
+
+- block:
+
+ - name: Delete attributes of provided configured interfaces
+ register: result
+ cisco.ios.ios_static_routes: &id001
+ config:
+
+ - vrf: ansible_temp_vrf
+ address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 192.0.2.0/24
+ next_hops:
+
+ - forward_router_address: 192.0.2.1
+ name: test_vrf
+ tag: 50
+ track: 150
+
+ - address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 198.51.100.0/24
+ next_hops:
+
+ - forward_router_address: 198.51.101.1
+ name: route_1
+ distance_metric: 110
+ tag: 40
+ multicast: true
+
+ - forward_router_address: 198.51.101.2
+ name: route_2
+ distance_metric: 30
+
+ - forward_router_address: 198.51.101.3
+ name: route_3
+
+ - afi: ipv6
+ routes:
+
+ - dest: 2001:DB8:0:3::/64
+ next_hops:
+
+ - forward_router_address: 2001:DB8:0:3::2
+ name: test_v6
+ tag: 105
+ state: deleted
+
+ - assert:
+ that:
+ - result.commands|length == 5
+ - result.changed == true
+ - result.commands|symmetric_difference(deleted.commands) == []
+
+ - name: Delete attributes of all configured interfaces (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_static_routes: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result.changed == false
+ always:
+
+ - include_tasks: _populate_config.yaml
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..5de7bf25
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START ios_static_routes empty_config.yaml integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_static_routes:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_static_routes:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_static_routes:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_static_routes:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_static_routes:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/gathered.yaml
new file mode 100644
index 00000000..1d4743ac
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/gathered.yaml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START ios_static_routes gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _intial_setup_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_static_routes:
+ config:
+ state: gathered
+
+ - name: Assert that gathered dicts was correctly generated
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/merged.yaml
new file mode 100644
index 00000000..255c7f2e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/merged.yaml
@@ -0,0 +1,89 @@
+---
+- debug:
+ msg: START Merged ios_static_routes state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _intial_setup_config.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.ios.ios_static_routes: &id001
+ config:
+
+ - vrf: ansible_temp_vrf
+ address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 192.0.2.0/24
+ next_hops:
+
+ - forward_router_address: 192.0.2.1
+ name: merged_vrf
+ tag: 50
+ track: 150
+ - dest: 192.51.110.0/32
+ next_hops:
+
+ - distance_metric: 10
+ forward_router_address: 192.51.111.1
+ interface: GigabitEthernet0/2
+ name: partner_vrf
+
+ - address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 198.51.100.0/24
+ next_hops:
+
+ - forward_router_address: 198.51.101.1
+ name: merged_route_1
+ distance_metric: 110
+ tag: 40
+ multicast: true
+
+ - forward_router_address: 198.51.101.2
+ name: merged_route_2
+ distance_metric: 30
+
+ - forward_router_address: 198.51.101.3
+ name: merged_route_3
+
+ - afi: ipv6
+ routes:
+
+ - dest: 2001:DB8:0:3::/64
+ next_hops:
+
+ - forward_router_address: 2001:DB8:0:3::2
+ name: merged_v6
+ tag: 105
+ state: merged
+
+ - assert:
+ that:
+ - result.commands|length == 6
+ - result.changed == true
+ - result.commands|symmetric_difference(merged.commands) == []
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_static_routes: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _populate_config.yaml
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/overridden.yaml
new file mode 100644
index 00000000..0fd4210a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/overridden.yaml
@@ -0,0 +1,73 @@
+---
+- debug:
+ msg: START Overridden ios_static_routes state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _intial_setup_config.yaml
+
+- block:
+
+ - name: Override device configuration of all interfaces with provided configuration
+ register: result
+ cisco.ios.ios_static_routes: &id001
+ config:
+
+ - vrf: ansible_temp_vrf
+ address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 192.0.2.0/24
+ next_hops:
+
+ - forward_router_address: 192.0.2.1
+ name: override_vrf
+ tag: 50
+ track: 150
+
+ - address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 198.51.100.0/24
+ next_hops:
+
+ - forward_router_address: 198.51.101.3
+ name: override_route
+
+ - afi: ipv6
+ routes:
+
+ - dest: 2001:DB8:0:3::/64
+ next_hops:
+
+ - forward_router_address: 2001:DB8:0:3::2
+ name: override_v6
+ tag: 175
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 8
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Override device configuration of all interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_static_routes: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _populate_config.yaml
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/rendered.yaml
new file mode 100644
index 00000000..4b4b7050
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/rendered.yaml
@@ -0,0 +1,69 @@
+---
+- debug:
+ msg: START ios_static_routes rendered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _intial_setup_config.yaml
+
+- block:
+
+ - name: Rendered the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_static_routes:
+ config:
+
+ - vrf: ansible_temp_vrf
+ address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 192.0.2.0/24
+ next_hops:
+
+ - forward_router_address: 192.0.2.1
+ name: test_vrf
+ tag: 50
+ track: 150
+
+ - address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 198.51.100.0/24
+ next_hops:
+
+ - forward_router_address: 198.51.101.1
+ name: route_1
+ distance_metric: 110
+ tag: 40
+ multicast: true
+
+ - forward_router_address: 198.51.101.2
+ name: route_2
+ distance_metric: 30
+
+ - forward_router_address: 198.51.101.3
+ name: route_3
+
+ - afi: ipv6
+ routes:
+
+ - dest: 2001:DB8:0:3::/64
+ next_hops:
+
+ - forward_router_address: 2001:DB8:0:3::2
+ name: test_v6
+ tag: 105
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(rendered.commands) == []
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/replaced.yaml
new file mode 100644
index 00000000..9fe5a94c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/replaced.yaml
@@ -0,0 +1,76 @@
+---
+- debug:
+ msg: START Replaced ios_static_routes state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _intial_setup_config.yaml
+
+- block:
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ register: result
+ cisco.ios.ios_static_routes: &id001
+ config:
+
+ - vrf: ansible_temp_vrf
+ address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 192.0.2.0/24
+ next_hops:
+
+ - forward_router_address: 192.0.2.1
+ name: replaced_vrf
+ tag: 75
+ track: 155
+
+ - address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 198.51.100.0/24
+ next_hops:
+
+ - forward_router_address: 198.51.101.1
+ name: replaced_route
+ distance_metric: 175
+ tag: 70
+ multicast: true
+
+ - afi: ipv6
+ routes:
+
+ - dest: 2001:DB8:0:3::/64
+ next_hops:
+
+ - forward_router_address: 2001:DB8:0:3::2
+ name: replaced_v6
+ tag: 110
+ state: replaced
+
+ - assert:
+ that:
+ - result.commands|length == 7
+ - result.changed == true
+ - result.commands|symmetric_difference(replaced.commands) == []
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_static_routes: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result.commands|length == 0
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _populate_config.yaml
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/rtt.yaml
new file mode 100644
index 00000000..a76554f1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/tests/cli/rtt.yaml
@@ -0,0 +1,94 @@
+---
+- debug:
+ msg: START ios_static_routes round trip integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.ios.ios_static_routes:
+ config:
+
+ - vrf: ansible_temp_vrf
+ address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 192.0.2.0/24
+ next_hops:
+
+ - forward_router_address: 192.0.2.1
+ name: rtt_vrf
+ tag: 50
+ track: 150
+
+ - address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 198.51.100.0/24
+ next_hops:
+
+ - forward_router_address: 198.51.101.1
+ name: rtt_route_1
+ distance_metric: 110
+ tag: 40
+ multicast: true
+ state: merged
+
+ - name: Gather static routes facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - static_routes
+
+ - name: Apply the configuration which need to be reverted
+ register: result
+ cisco.ios.ios_static_routes:
+ config:
+
+ - vrf: ansible_temp_vrf
+ address_families:
+
+ - afi: ipv4
+ routes:
+
+ - dest: 192.0.2.0/24
+ next_hops:
+
+ - forward_router_address: 192.0.2.12
+ name: new_rtt_vrf
+ tag: 10
+ track: 150
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 2
+ - result.changed == true
+ - result.commands|symmetric_difference(rtt.override_commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.ios.ios_static_routes:
+ config: "{{ ansible_facts['network_resources']['static_routes'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 1
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.override_revert_commands) ==
+ []
+ always:
+
+ - include_tasks: _populate_config.yaml
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/vars/main.yaml
new file mode 100644
index 00000000..ffc04270
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_static_routes/vars/main.yaml
@@ -0,0 +1,96 @@
+---
+deleted:
+ commands:
+ - no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf
+ track 150 tag 50
+ - no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1
+ tag 40
+ - no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ - no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ - no ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+merged:
+ commands:
+ - ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name merged_vrf track 150 tag 50
+ - ip route vrf ansible_temp_vrf 192.51.110.0 255.255.255.255 GigabitEthernet0/2 192.51.111.1 10 name partner_vrf
+ - ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name merged_route_1 tag 40
+ - ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name merged_route_2
+ - ip route 198.51.100.0 255.255.255.0 198.51.101.3 name merged_route_3
+ - ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name merged_v6 tag 105
+replaced:
+ commands:
+ - no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf
+ track 150 tag 50
+ - no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1
+ tag 40
+ - no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ - no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ - ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name replaced_vrf
+ track 155 tag 75
+ - ip route 198.51.100.0 255.255.255.0 198.51.101.1 175 multicast name replaced_route
+ tag 70
+ - ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name replaced_v6 tag 110
+overridden:
+ commands:
+ - no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1
+ tag 40
+ - no ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ - no ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ - no ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf
+ track 150 tag 50
+ - no ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+ - ip route 198.51.100.0 255.255.255.0 198.51.101.3 name override_route
+ - ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name override_vrf
+ track 150 tag 50
+ - ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name override_v6 tag 175
+rendered:
+ commands:
+ - ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf
+ track 150 tag 50
+ - ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1
+ tag 40
+ - ip route 198.51.100.0 255.255.255.0 198.51.101.2 30 name route_2
+ - ip route 198.51.100.0 255.255.255.0 198.51.101.3 name route_3
+ - ipv6 route 2001:DB8:0:3::/64 2001:DB8:0:3::2 name test_v6 tag 105
+gathered:
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.0/24
+ next_hops:
+ - forward_router_address: 192.0.2.1
+ name: test_vrf
+ tag: 50
+ track: 150
+ vrf: ansible_temp_vrf
+ - address_families:
+ - afi: ipv6
+ routes:
+ - dest: 2001:DB8:0:3::/64
+ next_hops:
+ - forward_router_address: 2001:DB8:0:3::2
+ name: test_v6
+ tag: 105
+ - afi: ipv4
+ routes:
+ - dest: 198.51.100.0/24
+ next_hops:
+ - distance_metric: 110
+ forward_router_address: 198.51.101.1
+ multicast: true
+ name: route_1
+ tag: 40
+ - distance_metric: 30
+ forward_router_address: 198.51.101.2
+ name: route_2
+ - forward_router_address: 198.51.101.3
+ name: route_3
+rtt:
+ override_commands:
+ - no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name rtt_route_1
+ tag 40
+ - ip route vrf ansible_temp_vrf 192.0.2.0 255.255.255.0 192.0.2.12 name new_rtt_vrf
+ track 150 tag 10
+ override_revert_commands:
+ - ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name rtt_route_1
+ tag 40
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/meta/main.yml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/net_system.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/net_system.yaml
new file mode 100644
index 00000000..52b172c2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/net_system.yaml
@@ -0,0 +1,35 @@
+---
+- debug: msg="START ios cli/net_system.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines:
+ - no ip domain-list ansible.com
+ - no ip domain-list redhat.com
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure domain_search using platform agnostic module
+ register: result
+ ansible.netcommon.net_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip domain list ansible.com' in result.commands"
+ - "'ip domain list redhat.com' in result.commands"
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - no ip domain-list ansible.com
+ - no ip domain-list redhat.com
+ match: none
+ provider: '{{ cli }}'
+
+- debug: msg="END ios cli/net_system.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_domain_list.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_domain_list.yaml
new file mode 100644
index 00000000..d051d216
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_domain_list.yaml
@@ -0,0 +1,124 @@
+---
+- debug: msg="START cli/set_domain_search.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines:
+ - no ip domain-list ansible.com
+ - no ip domain-list redhat.com
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure domain_search
+ register: result
+ cisco.ios.ios_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip domain list ansible.com' in result.commands"
+ - "'ip domain list redhat.com' in result.commands"
+
+- name: verify domain_search
+ register: result
+ cisco.ios.ios_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove one entry
+ register: result
+ cisco.ios.ios_system:
+ domain_search:
+ - ansible.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'no ip domain list redhat.com' in result.commands"
+
+- name: verify remove one entry
+ register: result
+ cisco.ios.ios_system:
+ domain_search:
+ - ansible.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: add one entry
+ register: result
+ cisco.ios.ios_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip domain list redhat.com' in result.commands"
+
+- name: verify add one entry
+ register: result
+ cisco.ios.ios_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: add and remove one entry
+ register: result
+ cisco.ios.ios_system:
+ domain_search:
+ - ansible.com
+ - eng.ansible.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'no ip domain list redhat.com' in result.commands"
+ - "'ip domain list eng.ansible.com' in result.commands"
+ - result.commands|length == 2
+
+- name: verify add and remove one entry
+ register: result
+ cisco.ios.ios_system:
+ domain_search:
+ - ansible.com
+ - eng.ansible.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - no ip domain-list ansible.com
+ - no ip domain-list redhat.com
+ - no ip domain-list eng.ansible.com
+ match: none
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/set_domain_search.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_domain_name.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_domain_name.yaml
new file mode 100644
index 00000000..eb44e22a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_domain_name.yaml
@@ -0,0 +1,37 @@
+---
+- debug: msg="START cli/set_domain_name.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines: no ip domain-name
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure domain_name
+ register: result
+ cisco.ios.ios_system:
+ domain_name: eng.ansible.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify domain_name
+ register: result
+ cisco.ios.ios_system:
+ domain_name: eng.ansible.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines: no ip domain-name
+ match: none
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/set_domain_name.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_hostname.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_hostname.yaml
new file mode 100644
index 00000000..82053356
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_hostname.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg="START cli/set_hostname.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines: hostname switch
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure hostname
+ register: result
+ cisco.ios.ios_system:
+ hostname: foo
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify hostname
+ register: result
+ cisco.ios.ios_system:
+ hostname: foo
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines: hostname {{ inventory_hostname }}
+ match: none
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/set_hostname.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_lookup_source.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_lookup_source.yaml
new file mode 100644
index 00000000..46fa39d0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_lookup_source.yaml
@@ -0,0 +1,66 @@
+---
+- debug: msg="START cli/set_lookup_source.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines:
+ - no ip domain lookup source-interface Loopback888
+ - vrf definition ansible
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure lookup_source
+ register: result
+ cisco.ios.ios_system:
+ lookup_source: Loopback888
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip domain lookup source-interface Loopback888' in result.commands"
+
+- name: verify lookup_source
+ register: result
+ cisco.ios.ios_system:
+ lookup_source: Loopback888
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Disable lookup_source
+ register: result
+ cisco.ios.ios_system:
+ lookup_enabled: false
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'no ip domain lookup' in result.commands"
+
+- name: Disable lookup_source
+ register: result
+ cisco.ios.ios_system:
+ lookup_enabled: true
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip domain lookup' in result.commands"
+
+- name: teardown
+ ignore_errors: true
+ cisco.ios.ios_config:
+ lines:
+ - no ip domain lookup source-interface Loopback888
+ - no vrf definition ansible
+ match: none
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/set_lookup_source.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_name_servers.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_name_servers.yaml
new file mode 100644
index 00000000..b313edac
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_system/tests/cli/set_name_servers.yaml
@@ -0,0 +1,64 @@
+---
+- debug: msg="START cli/set_name_servers.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.ios.ios_config:
+ lines:
+ - no ip name-server
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure name_servers
+ register: result
+ cisco.ios.ios_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands|length == 3
+ - "'ip name-server 192.0.2.1' in result.commands"
+ - "'ip name-server 192.0.2.2' in result.commands"
+ - "'ip name-server 192.0.2.3' in result.commands"
+
+- name: verify name_servers
+ register: result
+ cisco.ios.ios_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove one
+ register: result
+ cisco.ios.ios_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands|length == 1
+ - "'no ip name-server 192.0.2.3' in result.commands"
+
+- name: teardown
+ cisco.ios.ios_config:
+ lines:
+ - no ip name-server
+ match: none
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/set_name_servers.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/files/test_rsa b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/files/test_rsa
new file mode 100644
index 00000000..9fdc8c3a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/files/test_rsa
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAseTsv6oTMJbsRgOSaNEVBlsqE4tKI2MBEOHzTlUnE3GBRtZi
+xlUlF9rZcjtk+hTIz3N3UrLtxMnWqv0YGM8tXZTcz50M9ANDE/oNXrXkkMKX5WWr
+OcgDCAAZYSVJ/vIt/xZkYteax6zMZQqEBIc/rKo8KuxKZTUMqj0GHkCQbA/o7lBQ
+hpdUZxtU/Y2uc9tXVhav3jVzTFUOdwZrCAJghdCCweJfwAj1DdHODip+/hNu+3Sk
+DNl0bdhWoNNnUFCYPOUK2B79OMg2+r5bwH7xgURIoTuc54HlGectJpIzI7GB6VfL
+UCsJn0uQ7HwX7XAtZjhJWP8dKPd1FuUgg5M8MwIDAQABAoIBACfBVz9GDN/Q+qBy
+7+dIwoAXI4IWoMzjtTtGo48f7Iml1hQ0mQJlyNJZ8DpdF6XjuzTRQxtSLVzLFpRD
+13zD4AmH2Qj0ug5WJEl0mkRONfQ76KI1ZFyXXEYPb5yMLssw6CKXqHuGX2q8LTlv
+bi1s5Ef8C1I0WDPh9SCeXp2oJB5h2G+HtCXDyxASK2nAKqhkpQqPhg5Rd50mBOpD
+WE/lor358hU0Aj/qhzjeWKNNK8pgeahXz5anEQZ69TUH102B6bNh8Ao4ZL2j3tr0
+6FbE3ooQT7+zOLm5xOFJ9OnJ2yDVW6Dj1Czllx2vJUcxKsKxaGF76xNCIPiSUUfS
+mnOnEfECgYEA2bBFc9Pb8AI0bZZ8Q6XE7Jqa6BOaLbzyjK6IzdyAV/LKdk3yRfEZ
+Rb2iNy8poBUYBqBUMfRsRVq5dabjYkz9X5e+75S8Lm/qiktlhTpQYWk5q+eBZdPm
+I+dG64Tdyv+Y/NwN4enIsw8LGllY472iUf37ms2+uOA8/BysQ2n7ss0CgYEA0TPD
+IhmLqNhQGkS2GU6tM8G7LyGOaIH3mmyCviYgEauWWw3bn/Hhiq/6tLtQc6pv2nIa
+ifbACnI+GiIoBFwz8ofuFA8dm76uro7o6eWP5iUizoGISYSewCFpcCpp0xn7/FNR
+3RT4YRBMt3yL8J1cVBpPRRbIwp/bZ+pRb0Ggqv8CgYEAoNAFHqHdkhou3N4UgmzN
+YvR7hwIkHbG9hIvS6DECZvYm9upyFZUcVFbYpOekWmv6ybpbOGQWL83rv6w/wfia
+HKofFSHNOojWvL8iCh+gDbYMMp/dCXpWQyOxUn9e0X2saO+vGbr41r5AN4DVl7gZ
+V3THD/75691Lb/tGjq6Wj+kCgYB6ZhadNOUJfMYhGGKSm/2qcobaJH/1lVUQ/Lvi
+FNxeek4WKB1/jz2urxe39oAzrFyVKn1sivoBIqZDFAjlxCyAkhcxlUZ1gTMi3mpX
+rwBqXv/mYtMicH2RW/scrTQNVv6fuwACoepQoADCuhQGS4thiaMngRUlCfKM8gOD
+XJpscQKBgQDIMURtVIV/2ZcGqHv/3G5jsPJPsTycv6YR4gTs5GUBy5If2Rs7DMWE
+pJLIcU+SJhMeVKTZPrePibzCp2+rMSI5pc6T+9LC79RKsfie3UybWfLZrSmtnxJx
+MgC49TR4NFP6yoYJPYiTdRJ/1Bu68WfVafFK86i9MKAI5OU2ba3/Bg==
+-----END RSA PRIVATE KEY-----
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/files/test_rsa.pub b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/files/test_rsa.pub
new file mode 100644
index 00000000..e6939a29
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/files/test_rsa.pub
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCx5Oy/qhMwluxGA5Jo0RUGWyoTi0ojYwEQ4fNOVScTcYFG1mLGVSUX2tlyO2T6FMjPc3dSsu3Eydaq/RgYzy1dlNzPnQz0A0MT+g1eteSQwpflZas5yAMIABlhJUn+8i3/FmRi15rHrMxlCoQEhz+sqjwq7EplNQyqPQYeQJBsD+juUFCGl1RnG1T9ja5z21dWFq/eNXNMVQ53BmsIAmCF0ILB4l/ACPUN0c4OKn7+E277dKQM2XRt2Fag02dQUJg85QrYHv04yDb6vlvAfvGBREihO5zngeUZ5y0mkjMjsYHpV8tQKwmfS5DsfBftcC1mOElY/x0o93UW5SCDkzwz ansible_ios_user_test
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/meta/main.yaml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tasks/cli.yaml
new file mode 100644
index 00000000..dd8b399e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tasks/cli.yaml
@@ -0,0 +1,17 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tests/cli/auth.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tests/cli/auth.yaml
new file mode 100644
index 00000000..2ed3dbaf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tests/cli/auth.yaml
@@ -0,0 +1,109 @@
+---
+- block:
+
+ - name: Create user with password
+ cisco.ios.ios_user:
+ name: auth_user
+ privilege: 15
+ role: network-operator
+ state: present
+ configured_password: pass123
+
+ - name: reset connection with {{ ansible_user }
+ meta: reset_connection
+
+ - name: test login for {{ ansible_user }} user with password
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ vars:
+ ansible_user: auth_user
+ ansible_password: pass123
+
+ - name: reset connection with {{ ansible_user }
+ meta: reset_connection
+
+ - name: test login with invalid password (should fail)
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ ignore_errors: true
+ register: results
+ vars:
+ ansible_user: auth_user
+ ansible_password: badpass
+
+ - name: reset connection with {{ ansible_user }
+ meta: reset_connection
+
+ - name: check that attempt failed
+ assert:
+ that:
+ - results.failed
+ always:
+
+ - name: delete user
+ register: result
+ cisco.ios.ios_user:
+ name: auth_user
+ state: absent
+
+ - name: reset connection
+ meta: reset_connection
+
+- block:
+
+ - name: Ensure ssh key is not world readable
+ file:
+ path: '{{ role_path }}/files/test_rsa'
+ mode: 384
+
+ - name: Create user with sshkey
+ cisco.ios.ios_user:
+ name: ssh_user
+ privilege: 15
+ role: network-operator
+ state: present
+ sshkey: "{{ lookup('file', 'files/test_rsa.pub') }}"
+
+ - name: reset connection with {{ ansible_user }
+ meta: reset_connection
+
+ - name: test sshkey login for {{ ansible_user }} user
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ vars:
+ ansible_user: ssh_user
+ ansible_private_key_file: "{{ role_path }}/files/test_rsa"
+
+ - name: reset connection with {{ ansible_user }}
+ meta: reset_connection
+
+ - name: test with {{ ansible_user }} user without keys
+ cisco.ios.ios_command:
+ commands:
+ - show version
+ ignore_errors: true
+ register: results
+ vars:
+ ansible_user: ssh_user
+ ansible_private_key_file: ""
+
+ - name: reset connection with {{ ansible_user }}
+ meta: reset_connection
+
+ - name: check that attempt failed
+ assert:
+ that:
+ - results.failed
+ always:
+
+ - name: delete user
+ register: result
+ cisco.ios.ios_user:
+ name: ssh_user
+ state: absent
+
+ - name: reset connection
+ meta: reset_connection
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tests/cli/basic.yaml
new file mode 100644
index 00000000..e3159a0a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_user/tests/cli/basic.yaml
@@ -0,0 +1,160 @@
+---
+- name: tear down old users if they exist (Setup)
+ become: true
+ cisco.ios.ios_user:
+ aggregate:
+
+ - name: ansibletest1
+
+ - name: ansibletest2
+
+ - name: ansibletest3
+
+ - name: ansibletest4
+
+ - name: ansibletest5
+
+ - name: ansibletest6
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Create user (SetUp)
+ become: true
+ register: result
+ cisco.ios.ios_user:
+ name: ansibletest1
+ privilege: 15
+ role: network-operator
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands == ["username ansibletest1 view network-operator", "username
+ ansibletest1 privilege 15"]
+
+- name: Collection of users (SetUp)
+ become: true
+ register: result
+ cisco.ios.ios_user:
+ aggregate:
+
+ - name: ansibletest2
+
+ - name: ansibletest3
+ provider: '{{ cli }}'
+ state: present
+ view: network-admin
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands == ["username ansibletest2 view network-admin", "username
+ ansibletest3 view network-admin"]
+
+- name: Add user again (Idempotent)
+ become: true
+ register: result
+ cisco.ios.ios_user:
+ name: ansibletest1
+ privilege: 15
+ role: network-operator
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
+
+- name: Add collection of users again (Idempotent)
+ become: true
+ register: result
+ cisco.ios.ios_user:
+ aggregate:
+
+ - name: ansibletest2
+
+ - name: ansibletest3
+ provider: '{{ cli }}'
+ state: present
+ view: network-admin
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
+
+- name: Create user with password_type (password)
+ become: true
+ register: result
+ cisco.ios.ios_user:
+ name: ansibleuser4
+ password_type: password
+ configured_password: testpass
+ provider: '{{ cli }}'
+ state: present
+
+- assert:
+ that:
+ - result.changed == true
+ - "'username ansibleuser4 password' in result.commands[0]"
+
+- name: Create user with password_type (secret)
+ become: true
+ register: result
+ cisco.ios.ios_user:
+ name: ansibleuser5
+ password_type: secret
+ configured_password: testpass
+ provider: '{{ cli }}'
+ state: present
+
+- assert:
+ that:
+ - result.changed == true
+ - "'username ansibleuser5 secret' in result.commands[0]"
+
+- name: Create user with hashed_password
+ become: true
+ register: result
+ cisco.ios.ios_user:
+ name: ansibleuser6
+ hashed_password:
+ type: 5
+ value: $3$8JcDilcYgFZi.yz4ApaqkHG2.8/
+ provider: '{{ cli }}'
+ state: present
+
+- assert:
+ that:
+ - result.changed == true
+ - "'username ansibleuser6 secret' in result.commands[0]"
+
+- name: tearDown
+ become: true
+ register: result
+ cisco.ios.ios_user:
+ aggregate:
+
+ - name: ansibletest1
+
+ - name: ansibletest2
+
+ - name: ansibletest3
+
+ - name: ansibletest4
+
+ - name: ansibletest5
+
+ - name: ansibletest6
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no username ansibletest1" in result.commands[0]["command"]'
+ - '"no username ansibletest2" in result.commands[1]["command"]'
+ - '"no username ansibletest3" in result.commands[2]["command"]'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/meta/main.yaml
new file mode 100644
index 00000000..ab3ad91b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_ios_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/tasks/cli.yaml
new file mode 100644
index 00000000..a65d756b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: local
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/tasks/main.yaml
new file mode 100644
index 00000000..07b0f2e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- include: cli.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/tests/cli/basic.yaml
new file mode 100644
index 00000000..3b56f537
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlan/tests/cli/basic.yaml
@@ -0,0 +1,246 @@
+---
+- debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}"
+
+- set_fact: switch_type="{{ switch_type }}"
+
+- block:
+
+ - name: setup - remove vlan used in test
+ cisco.ios.ios_config:
+ lines:
+ - no vlan 100
+ - no vlan 200
+ - no vlan 300
+ provider: '{{ cli }}'
+
+ - name: setup - remove switchport settings on interfaces used in test
+ loop:
+ - interface GigabitEthernet0/1
+ - interface GigabitEthernet0/2
+ cisco.ios.ios_config:
+ lines:
+ - switchport mode access
+ - no switchport access vlan 100
+ provider: '{{ cli }}'
+ parents: '{{ item }}'
+
+ - name: create vlan
+ register: result
+ cisco.ios.ios_vlan: &id001
+ vlan_id: 100
+ name: test-vlan
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'vlan 100' in result.commands"
+ - "'name test-vlan' in result.commands"
+
+ - name: create vlan(idempotence)
+ register: result
+ cisco.ios.ios_vlan: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Add interfaces to vlan
+ register: result
+ cisco.ios.ios_vlan: &id002
+ vlan_id: 100
+ interfaces:
+ - GigabitEthernet0/1
+ - GigabitEthernet0/2
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface GigabitEthernet0/1' in result.commands"
+ - "'switchport mode access' in result.commands"
+ - "'switchport access vlan 100' in result.commands"
+ - "'interface GigabitEthernet0/2' in result.commands"
+ - "'switchport mode access' in result.commands"
+ - "'switchport access vlan 100' in result.commands"
+
+ - name: Add interfaces to vlan(idempotence)
+ register: result
+ cisco.ios.ios_vlan: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Check interface assigned to vrf (intent)
+ register: result
+ cisco.ios.ios_vlan:
+ vlan_id: 100
+ associated_interfaces:
+ - GigabitEthernet0/1
+ - GigabitEthernet0/2
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.failed == false
+
+ - name: Check interface assigned to vrf (fail)
+ ignore_errors: true
+ register: result
+ cisco.ios.ios_vlan:
+ vlan_id: 100
+ associated_interfaces:
+ - test
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.failed == True
+
+ - name: Remove interface from vlan
+ register: result
+ cisco.ios.ios_vlan: &id003
+ vlan_id: 100
+ interfaces:
+ - GigabitEthernet0/1
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'vlan 100' in result.commands"
+ - "'interface GigabitEthernet0/2' in result.commands"
+ - "'switchport mode access' in result.commands"
+ - "'no switchport access vlan 100' in result.commands"
+
+ - name: Remove interface from vlan(idempotence)
+ register: result
+ cisco.ios.ios_vlan: *id003
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Suspend vlan
+ register: result
+ cisco.ios.ios_vlan:
+ vlan_id: 100
+ state: suspend
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'vlan 100' in result.commands"
+ - "'state suspend' in result.commands"
+
+ - name: Unsuspend vlan
+ register: result
+ cisco.ios.ios_vlan:
+ vlan_id: 100
+ state: active
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'vlan 100' in result.commands"
+ - "'state active' in result.commands"
+
+ - name: delete vlan
+ register: result
+ cisco.ios.ios_vlan: &id004
+ vlan_id: 100
+ provider: '{{ cli }}'
+ state: absent
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'no vlan 100' in result.commands"
+
+ - name: delete vlan(idempotence)
+ register: result
+ cisco.ios.ios_vlan: *id004
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: create vlans using aggregate
+ register: result
+ cisco.ios.ios_vlan: &id005
+ aggregate:
+
+ - vlan_id: 200
+ name: vlan-200
+
+ - vlan_id: 300
+ name: vlan-300
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'vlan 200' in result.commands"
+ - "'name vlan-200' in result.commands"
+ - "'vlan 300' in result.commands"
+ - "'name vlan-300' in result.commands"
+
+ - name: create vlans using aggregate(idempotence)
+ register: result
+ cisco.ios.ios_vlan: *id005
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: delete vlans using aggregate
+ register: result
+ cisco.ios.ios_vlan: &id006
+ aggregate:
+
+ - vlan_id: 200
+ name: vlan-200
+
+ - vlan_id: 300
+ name: vlan-300
+ state: absent
+ provider: '{{ cli }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'no vlan 200' in result.commands"
+ - "'no vlan 300' in result.commands"
+
+ - name: delete vlans using aggregate(idempotence)
+ register: result
+ cisco.ios.ios_vlan: *id006
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: teardown(part1)
+ cisco.ios.ios_config:
+ lines:
+ - no vlan 100
+ - no vlan 200
+ - no vlan 300
+ provider: '{{ cli }}'
+
+ - name: teardown(part2)
+ loop:
+ - interface GigabitEthernet0/1
+ - interface GigabitEthernet0/2
+ cisco.ios.ios_config:
+ lines:
+ - switchport mode access
+ - no switchport access vlan 100
+ provider: '{{ cli }}'
+ parents: '{{ item }}'
+ when: switch_type == 'L2'
+
+- debug: msg="END cli/basic.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tasks/cli.yaml
new file mode 100644
index 00000000..b14576a6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tasks/cli.yaml
@@ -0,0 +1,24 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Get the IOS version
+ cisco.ios.ios_facts:
+ gather_subset: all
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/_parsed.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/_parsed.cfg
new file mode 100644
index 00000000..409931d2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/_parsed.cfg
@@ -0,0 +1,21 @@
+VLAN Name Status Ports
+---- -------------------------------- --------- -------------------------------
+1 default active Gi0/1, Gi0/2
+10 vlan_10 active
+20 vlan_20 act/lshut
+30 vlan_30 sus/lshut
+1002 fddi-default act/unsup
+1003 token-ring-default act/unsup
+1004 fddinet-default act/unsup
+1005 trnet-default act/unsup
+
+VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+1 enet 100001 1500 - - - - - 0 0
+10 enet 100010 1500 - - - - - 0 0
+20 enet 100020 1500 - - - - - 0 0
+30 enet 100030 1500 - - - - - 0 0
+1002 fddi 101002 1500 - - - - - 0 0
+1003 tr 101003 1500 - - - - - 0 0
+1004 fdnet 101004 1500 - - - ieee - 0 0
+1005 trnet 101005 1500 - - - ibm - 0 0
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..81e1ba39
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/_populate_config.yaml
@@ -0,0 +1,7 @@
+---
+- name: Setup
+ vars:
+ lines: "vlan 10\nvlan 20\nvlan 30\n"
+ when: ansible_net_version != "15.6(2)T"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..2ff9dcb7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/_remove_config.yaml
@@ -0,0 +1,7 @@
+---
+- name: Remove Config
+ vars:
+ lines: "no vlan 10\nno vlan 20\nno vlan 30\nno vlan 40\n"
+ when: ansible_net_version != "15.6(2)T"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/deleted.yaml
new file mode 100644
index 00000000..2f3da53f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/deleted.yaml
@@ -0,0 +1,46 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_vlans ansible_connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete VLANs attributes for all configured VLANs
+ register: result
+ cisco.ios.ios_vlans: &id001
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Delete VLANs attributes for all configured VLANs (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_vlans: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..06ed21a9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/empty_config.yaml
@@ -0,0 +1,66 @@
+---
+- debug:
+ msg: START ios_vlans empty_config.yaml integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+
+ - name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_vlans:
+ config:
+ state: merged
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state
+ merged'
+
+ - name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_vlans:
+ config:
+ state: replaced
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state
+ replaced'
+
+ - name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_vlans:
+ config:
+ state: overridden
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state
+ overridden'
+
+ - name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_vlans:
+ config:
+ state: rendered
+
+ - assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+ - name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.ios.ios_vlans:
+ running_config:
+ state: parsed
+
+ - assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/gathered.yaml
new file mode 100644
index 00000000..0faf02b1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/gathered.yaml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START ios_vlans gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the exisiting running configuration
+ register: result
+ cisco.ios.ios_vlans:
+ config:
+ state: gathered
+
+ - name: Assert
+ assert:
+ that:
+ - gathered['config'] | symmetric_difference(result.gathered) == []
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/merged.yaml
new file mode 100644
index 00000000..8e828372
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/merged.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START Merged ios_vlans state for integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.ios.ios_vlans: &id001
+ config:
+
+ - name: Vlan_10
+ vlan_id: 10
+ state: active
+ shutdown: disabled
+ remote_span: true
+
+ - name: Vlan_20
+ vlan_id: 20
+ mtu: 610
+ state: active
+ shutdown: enabled
+
+ - name: Vlan_30
+ vlan_id: 30
+ state: suspend
+ shutdown: enabled
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_vlans: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/overridden.yaml
new file mode 100644
index 00000000..dfd6430b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/overridden.yaml
@@ -0,0 +1,56 @@
+---
+- debug:
+ msg: START Overridden ios_vlans state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device configuration of all VLANs with provided configuration
+ register: result
+ cisco.ios.ios_vlans: &id001
+ config:
+
+ - name: VLAN_10
+ vlan_id: 10
+ mtu: 1000
+
+ - name: VLAN_40
+ vlan_id: 40
+ mtu: 850
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ overridden['before'] | symmetric_difference(result['before']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Override device configuration of all interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_vlans: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/parsed.yaml
new file mode 100644
index 00000000..1e9d6a39
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/parsed.yaml
@@ -0,0 +1,18 @@
+---
+- debug:
+ msg: START ios_vlans parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+ - name: Parse the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_vlans:
+ running_config: "{{ lookup('file', '_parsed.cfg') }}"
+ state: parsed
+
+ - assert:
+ that:
+ - result.changed == false
+ - parsed['config']|symmetric_difference(result.parsed) == []
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/rendered.yaml
new file mode 100644
index 00000000..f55d3c8c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/rendered.yaml
@@ -0,0 +1,33 @@
+---
+- debug:
+ msg: Start ios_vlans rendered integration tests ansible_connection={{
+ ansible_connection }}
+
+- block:
+
+ - name: Render the commands for provided configuration
+ become: true
+ register: result
+ cisco.ios.ios_vlans:
+ config:
+ - name: Vlan_10
+ vlan_id: 10
+ state: active
+ shutdown: disabled
+ remote_span: true
+ - name: Vlan_20
+ vlan_id: 20
+ mtu: 610
+ state: active
+ shutdown: enabled
+ - name: Vlan_30
+ vlan_id: 30
+ state: suspend
+ shutdown: enabled
+ state: rendered
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.rendered|symmetric_difference(merged.commands) == []
+ when: ansible_net_version != "15.6(2)T"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/replaced.yaml
new file mode 100644
index 00000000..fbb5c036
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/replaced.yaml
@@ -0,0 +1,61 @@
+---
+- debug:
+ msg: START Replaced ios_vlans state for integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device configuration of listed VLANs with provided configuration
+ register: result
+ cisco.ios.ios_vlans: &id001
+ config:
+
+ - vlan_id: 20
+ name: Test_VLAN20
+ mtu: 700
+ shutdown: disabled
+
+ - vlan_id: 30
+ name: Test_VLAN30
+ mtu: 1000
+
+ - vlan_id: 40
+ name: Test_new_VLAN40
+ state: suspend
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.ios.ios_vlans: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ when: ansible_net_version != "15.6(2)T"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/rtt.yaml
new file mode 100644
index 00000000..b4874485
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tests/cli/rtt.yaml
@@ -0,0 +1,72 @@
+---
+- debug:
+ msg: START ios_vlans round trip integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.ios.ios_vlans:
+ config:
+ - name: Vlan_10
+ vlan_id: 10
+ state: active
+ shutdown: disabled
+ remote_span: true
+
+ - name: Vlan_20
+ vlan_id: 20
+ mtu: 610
+ state: active
+ shutdown: enabled
+
+ - name: Vlan_30
+ vlan_id: 30
+ state: suspend
+ shutdown: enabled
+ state: merged
+
+ - name: Gather VLANs interfaces facts
+ cisco.ios.ios_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - vlans
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.ios.ios_vlans:
+ config:
+ - name: VLAN_10
+ vlan_id: 10
+ mtu: 1000
+
+ - name: VLAN_40
+ vlan_id: 40
+ mtu: 850
+ state: overridden
+
+ - assert:
+ that:
+ - result.commands|length == 8
+ - result.changed == true
+ - result.commands|symmetric_difference(overridden.commands) == []
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.ios.ios_vlans:
+ config: "{{ ansible_facts['network_resources']['vlans'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - revert.commands|length == 14
+ - revert.changed == true
+ - revert.commands|symmetric_difference(rtt.commands) == []
+ when: ansible_net_version != "15.6(2)T"
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/vars/main.yaml
new file mode 100644
index 00000000..3b3d3477
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/vars/main.yaml
@@ -0,0 +1,442 @@
+---
+merged:
+ before:
+ - mtu: 1500
+ name: default
+ shutdown: disabled
+ state: active
+ vlan_id: 1
+ - mtu: 1500
+ name: fddi-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1002
+ - mtu: 1500
+ name: token-ring-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1003
+ - mtu: 1500
+ name: fddinet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1004
+ - mtu: 1500
+ name: trnet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1005
+ commands:
+ - vlan 10
+ - name Vlan_10
+ - state active
+ - remote-span
+ - no shutdown
+ - vlan 20
+ - name Vlan_20
+ - state active
+ - mtu 610
+ - shutdown
+ - vlan 30
+ - name Vlan_30
+ - state suspend
+ - shutdown
+ after:
+ - mtu: 1500
+ name: default
+ shutdown: disabled
+ state: active
+ vlan_id: 1
+ - mtu: 1500
+ name: Vlan_10
+ remote_span: true
+ shutdown: disabled
+ state: active
+ vlan_id: 10
+ - mtu: 610
+ name: Vlan_20
+ shutdown: enabled
+ state: active
+ vlan_id: 20
+ - mtu: 1500
+ name: Vlan_30
+ shutdown: enabled
+ state: suspend
+ vlan_id: 30
+ - mtu: 1500
+ name: fddi-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1002
+ - mtu: 1500
+ name: token-ring-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1003
+ - mtu: 1500
+ name: fddinet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1004
+ - mtu: 1500
+ name: trnet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1005
+replaced:
+ before:
+ - mtu: 1500
+ name: default
+ shutdown: disabled
+ state: active
+ vlan_id: 1
+ - mtu: 1500
+ name: VLAN0010
+ shutdown: disabled
+ state: active
+ vlan_id: 10
+ - mtu: 1500
+ name: VLAN0020
+ shutdown: disabled
+ state: active
+ vlan_id: 20
+ - mtu: 1500
+ name: VLAN0030
+ shutdown: disabled
+ state: active
+ vlan_id: 30
+ - mtu: 1500
+ name: fddi-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1002
+ - mtu: 1500
+ name: token-ring-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1003
+ - mtu: 1500
+ name: fddinet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1004
+ - mtu: 1500
+ name: trnet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1005
+ commands:
+ - vlan 20
+ - name Test_VLAN20
+ - mtu 700
+ - vlan 30
+ - name Test_VLAN30
+ - mtu 1000
+ - vlan 40
+ - name Test_new_VLAN40
+ - state suspend
+ after:
+ - mtu: 1500
+ name: default
+ shutdown: disabled
+ state: active
+ vlan_id: 1
+ - mtu: 1500
+ name: VLAN0010
+ shutdown: disabled
+ state: active
+ vlan_id: 10
+ - mtu: 700
+ name: Test_VLAN20
+ shutdown: disabled
+ state: active
+ vlan_id: 20
+ - mtu: 1000
+ name: Test_VLAN30
+ shutdown: disabled
+ state: active
+ vlan_id: 30
+ - mtu: 1500
+ name: Test_new_VLAN40
+ shutdown: disabled
+ state: suspend
+ vlan_id: 40
+ - mtu: 1500
+ name: fddi-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1002
+ - mtu: 1500
+ name: token-ring-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1003
+ - mtu: 1500
+ name: fddinet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1004
+ - mtu: 1500
+ name: trnet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1005
+overridden:
+ before:
+ - mtu: 1500
+ name: default
+ shutdown: disabled
+ state: active
+ vlan_id: 1
+ - mtu: 1500
+ name: VLAN0010
+ shutdown: disabled
+ state: active
+ vlan_id: 10
+ - mtu: 1500
+ name: VLAN0020
+ shutdown: disabled
+ state: active
+ vlan_id: 20
+ - mtu: 1500
+ name: VLAN0030
+ shutdown: disabled
+ state: active
+ vlan_id: 30
+ - mtu: 1500
+ name: fddi-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1002
+ - mtu: 1500
+ name: token-ring-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1003
+ - mtu: 1500
+ name: fddinet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1004
+ - mtu: 1500
+ name: trnet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1005
+ commands:
+ - vlan 10
+ - name VLAN_10
+ - mtu 1000
+ - no vlan 20
+ - no vlan 30
+ - vlan 40
+ - name VLAN_40
+ - mtu 850
+ after:
+ - mtu: 1500
+ name: default
+ shutdown: disabled
+ state: active
+ vlan_id: 1
+ - mtu: 1000
+ name: VLAN_10
+ shutdown: disabled
+ state: active
+ vlan_id: 10
+ - mtu: 850
+ name: VLAN_40
+ shutdown: disabled
+ state: active
+ vlan_id: 40
+ - mtu: 1500
+ name: fddi-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1002
+ - mtu: 1500
+ name: token-ring-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1003
+ - mtu: 1500
+ name: fddinet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1004
+ - mtu: 1500
+ name: trnet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1005
+deleted:
+ before:
+ - mtu: 1500
+ name: default
+ shutdown: disabled
+ state: active
+ vlan_id: 1
+ - mtu: 1500
+ name: VLAN0010
+ shutdown: disabled
+ state: active
+ vlan_id: 10
+ - mtu: 1500
+ name: VLAN0020
+ shutdown: disabled
+ state: active
+ vlan_id: 20
+ - mtu: 1500
+ name: VLAN0030
+ shutdown: disabled
+ state: active
+ vlan_id: 30
+ - mtu: 1500
+ name: fddi-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1002
+ - mtu: 1500
+ name: token-ring-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1003
+ - mtu: 1500
+ name: fddinet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1004
+ - mtu: 1500
+ name: trnet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1005
+ commands:
+ - no vlan 10
+ - no vlan 20
+ - no vlan 30
+ after:
+ - mtu: 1500
+ name: default
+ shutdown: disabled
+ state: active
+ vlan_id: 1
+ - mtu: 1500
+ name: fddi-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1002
+ - mtu: 1500
+ name: token-ring-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1003
+ - mtu: 1500
+ name: fddinet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1004
+ - mtu: 1500
+ name: trnet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1005
+gathered:
+ config:
+ - mtu: 1500
+ name: default
+ shutdown: disabled
+ state: active
+ vlan_id: 1
+ - mtu: 1500
+ name: VLAN0010
+ shutdown: disabled
+ state: active
+ vlan_id: 10
+ - mtu: 1500
+ name: VLAN0020
+ shutdown: disabled
+ state: active
+ vlan_id: 20
+ - mtu: 1500
+ name: VLAN0030
+ shutdown: disabled
+ state: active
+ vlan_id: 30
+ - mtu: 1500
+ name: fddi-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1002
+ - mtu: 1500
+ name: token-ring-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1003
+ - mtu: 1500
+ name: fddinet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1004
+ - mtu: 1500
+ name: trnet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1005
+parsed:
+ config:
+ - mtu: 1500
+ name: default
+ shutdown: disabled
+ state: active
+ vlan_id: 1
+ - mtu: 1500
+ name: vlan_10
+ shutdown: disabled
+ state: active
+ vlan_id: 10
+ - mtu: 1500
+ name: vlan_20
+ shutdown: enabled
+ state: active
+ vlan_id: 20
+ - mtu: 1500
+ name: vlan_30
+ shutdown: enabled
+ state: suspend
+ vlan_id: 30
+ - mtu: 1500
+ name: fddi-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1002
+ - mtu: 1500
+ name: token-ring-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1003
+ - mtu: 1500
+ name: fddinet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1004
+ - mtu: 1500
+ name: trnet-default
+ shutdown: enabled
+ state: active
+ vlan_id: 1005
+rtt:
+ commands:
+ - vlan 10
+ - name Vlan_10
+ - mtu 1500
+ - no vlan 40
+ - vlan 20
+ - name Vlan_20
+ - state active
+ - mtu 610
+ - shutdown
+ - vlan 30
+ - name Vlan_30
+ - state suspend
+ - mtu 1500
+ - shutdown
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/prepare_ios_tests/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/prepare_ios_tests/tasks/main.yml
new file mode 100644
index 00000000..c0800ee8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/prepare_ios_tests/tasks/main.yml
@@ -0,0 +1,54 @@
+---
+- name: Ensure we have loopback 888 for testing
+ connection: ansible.netcommon.network_cli
+ become: true
+ cisco.ios.ios_config:
+ src: config.j2
+
+- set_fact:
+ shorter_hostname: '{{ inventory_hostname_short| truncate(10, True, "") }}'
+
+- name: Discover IOS L2/L3 switch type
+ connection: ansible.netcommon.network_cli
+ become: true
+ register: result
+ cisco.ios.ios_command:
+ commands:
+ - show version
+
+- set_fact: switch_type=""
+
+- set_fact: switch_type="L2"
+ when: '"l2" in result.stdout[0]'
+
+- block:
+
+ - name: Set test interface to GigabitEthernet0/1 as we are on Cisco IOS
+ set_fact: test_interface=GigabitEthernet0/1
+
+ - name: Set test interface 2 to GigabitEthernet0/2 as we are on Cisco IOS
+ set_fact: test_interface2=GigabitEthernet0/2
+ when: "'Cisco IOS' in result.stdout[0]"
+
+- block:
+
+ - name: Set test interface to GigabitEthernet2 as we are on Cisco IOS-XE
+ set_fact: test_interface=GigabitEthernet2
+
+ - name: Disable autonegotiation on GigabitEthernet2
+ cisco.ios.ios_config:
+ lines:
+ - no negotiation auto
+ parents: int GigabitEthernet2
+ authorize: true
+
+ - name: Set test interface 2 to GigabitEthernet3 as we are on Cisco IOS-XE
+ set_fact: test_interface2=GigabitEthernet3
+
+ - name: Disable autonegotiation on GigabitEthernet3
+ cisco.ios.ios_config:
+ lines:
+ - no negotiation auto
+ parents: int GigabitEthernet3
+ authorize: true
+ when: "'Cisco IOS-XE' in result.stdout[0]"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/prepare_ios_tests/templates/config.j2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/prepare_ios_tests/templates/config.j2
new file mode 100644
index 00000000..c8eb3457
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/integration/targets/prepare_ios_tests/templates/config.j2
@@ -0,0 +1,4 @@
+interface Loopback888
+ description test for ansible
+ shutdown
+
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/ignore-2.10.txt b/collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/ignore-2.10.txt
new file mode 100644
index 00000000..d7ff17ca
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/ignore-2.10.txt
@@ -0,0 +1 @@
+plugins/action/ios.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/ignore-2.11.txt b/collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/ignore-2.11.txt
new file mode 100644
index 00000000..d7ff17ca
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/ignore-2.11.txt
@@ -0,0 +1 @@
+plugins/action/ios.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/ignore-2.9.txt b/collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/ignore-2.9.txt
new file mode 100644
index 00000000..d8cc7b28
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/ignore-2.9.txt
@@ -0,0 +1,11 @@
+plugins/modules/ios_interface.py validate-modules:deprecation-mismatch
+plugins/modules/ios_interface.py validate-modules:invalid-documentation
+plugins/modules/ios_l2_interface.py validate-modules:deprecation-mismatch
+plugins/modules/ios_l2_interface.py validate-modules:invalid-documentation
+plugins/modules/ios_l3_interface.py validate-modules:deprecation-mismatch
+plugins/modules/ios_l3_interface.py validate-modules:invalid-documentation
+plugins/modules/ios_static_route.py validate-modules:deprecation-mismatch
+plugins/modules/ios_static_route.py validate-modules:invalid-documentation
+plugins/modules/ios_vlan.py validate-modules:deprecation-mismatch
+plugins/modules/ios_vlan.py validate-modules:invalid-documentation
+plugins/action/ios.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/requirements.txt b/collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/requirements.txt
new file mode 100644
index 00000000..3e3a9669
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/sanity/requirements.txt
@@ -0,0 +1,4 @@
+packaging # needed for update-bundled and changelog
+sphinx ; python_version >= '3.5' # docs build requires python 3+
+sphinx-notfound-page ; python_version >= '3.5' # docs build requires python 3+
+straight.plugin ; python_version >= '3.5' # needed for hacking/build-ansible.py which will host changelog generation and requires python 3+
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/builtins.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/builtins.py
new file mode 100644
index 00000000..bfc8adfb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/builtins.py
@@ -0,0 +1,34 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+#
+# Compat for python2.7
+#
+
+# One unittest needs to import builtins via __import__() so we need to have
+# the string that represents it
+try:
+ import __builtin__
+except ImportError:
+ BUILTINS = "builtins"
+else:
+ BUILTINS = "__builtin__"
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/mock.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/mock.py
new file mode 100644
index 00000000..2ea98a17
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/mock.py
@@ -0,0 +1,128 @@
+# pylint: skip-file
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+Compat module for Python3.x's unittest.mock module
+"""
+import sys
+
+# Python 2.7
+
+# Note: Could use the pypi mock library on python3.x as well as python2.x. It
+# is the same as the python3 stdlib mock library
+
+try:
+ # Allow wildcard import because we really do want to import all of mock's
+ # symbols into this compat shim
+ # pylint: disable=wildcard-import,unused-wildcard-import
+ from unittest.mock import *
+except ImportError:
+ # Python 2
+ # pylint: disable=wildcard-import,unused-wildcard-import
+ try:
+ from mock import *
+ except ImportError:
+ print("You need the mock library installed on python2.x to run tests")
+
+
+# Prior to 3.4.4, mock_open cannot handle binary read_data
+if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
+ file_spec = None
+
+ def _iterate_read_data(read_data):
+ # Helper for mock_open:
+ # Retrieve lines from read_data via a generator so that separate calls to
+ # readline, read, and readlines are properly interleaved
+ sep = b"\n" if isinstance(read_data, bytes) else "\n"
+ data_as_list = [l + sep for l in read_data.split(sep)]
+
+ if data_as_list[-1] == sep:
+ # If the last line ended in a newline, the list comprehension will have an
+ # extra entry that's just a newline. Remove this.
+ data_as_list = data_as_list[:-1]
+ else:
+ # If there wasn't an extra newline by itself, then the file being
+ # emulated doesn't have a newline to end the last line remove the
+ # newline that our naive format() added
+ data_as_list[-1] = data_as_list[-1][:-1]
+
+ for line in data_as_list:
+ yield line
+
+ def mock_open(mock=None, read_data=""):
+ """
+ A helper function to create a mock to replace the use of `open`. It works
+ for `open` called directly or used as a context manager.
+
+ The `mock` argument is the mock object to configure. If `None` (the
+ default) then a `MagicMock` will be created for you, with the API limited
+ to methods or attributes available on standard file handles.
+
+ `read_data` is a string for the `read` methoddline`, and `readlines` of the
+ file handle to return. This is an empty string by default.
+ """
+
+ def _readlines_side_effect(*args, **kwargs):
+ if handle.readlines.return_value is not None:
+ return handle.readlines.return_value
+ return list(_data)
+
+ def _read_side_effect(*args, **kwargs):
+ if handle.read.return_value is not None:
+ return handle.read.return_value
+ return type(read_data)().join(_data)
+
+ def _readline_side_effect():
+ if handle.readline.return_value is not None:
+ while True:
+ yield handle.readline.return_value
+ for line in _data:
+ yield line
+
+ global file_spec
+ if file_spec is None:
+ import _io
+
+ file_spec = list(
+ set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO)))
+ )
+
+ if mock is None:
+ mock = MagicMock(name="open", spec=open)
+
+ handle = MagicMock(spec=file_spec)
+ handle.__enter__.return_value = handle
+
+ _data = _iterate_read_data(read_data)
+
+ handle.write.return_value = None
+ handle.read.return_value = None
+ handle.readline.return_value = None
+ handle.readlines.return_value = None
+
+ handle.read.side_effect = _read_side_effect
+ handle.readline.side_effect = _readline_side_effect()
+ handle.readlines.side_effect = _readlines_side_effect
+
+ mock.return_value = handle
+ return mock
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/unittest.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/unittest.py
new file mode 100644
index 00000000..df3379b8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/compat/unittest.py
@@ -0,0 +1,39 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+Compat module for Python2.7's unittest module
+"""
+
+import sys
+
+# Allow wildcard import because we really do want to import all of
+# unittests's symbols into this compat shim
+# pylint: disable=wildcard-import,unused-wildcard-import
+if sys.version_info < (2, 7):
+ try:
+ # Need unittest2 on python2.6
+ from unittest2 import *
+ except ImportError:
+ print("You need unittest2 installed on python2.6.x to run tests")
+else:
+ from unittest import *
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/loader.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/loader.py
new file mode 100644
index 00000000..c21188ee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/loader.py
@@ -0,0 +1,116 @@
+# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import os
+
+from ansible.errors import AnsibleParserError
+from ansible.parsing.dataloader import DataLoader
+from ansible.module_utils._text import to_bytes, to_text
+
+
+class DictDataLoader(DataLoader):
+ def __init__(self, file_mapping=None):
+ file_mapping = {} if file_mapping is None else file_mapping
+ assert type(file_mapping) == dict
+
+ super(DictDataLoader, self).__init__()
+
+ self._file_mapping = file_mapping
+ self._build_known_directories()
+ self._vault_secrets = None
+
+ def load_from_file(self, path, cache=True, unsafe=False):
+ path = to_text(path)
+ if path in self._file_mapping:
+ return self.load(self._file_mapping[path], path)
+ return None
+
+ # TODO: the real _get_file_contents returns a bytestring, so we actually convert the
+ # unicode/text it's created with to utf-8
+ def _get_file_contents(self, path):
+ path = to_text(path)
+ if path in self._file_mapping:
+ return (to_bytes(self._file_mapping[path]), False)
+ else:
+ raise AnsibleParserError("file not found: %s" % path)
+
+ def path_exists(self, path):
+ path = to_text(path)
+ return path in self._file_mapping or path in self._known_directories
+
+ def is_file(self, path):
+ path = to_text(path)
+ return path in self._file_mapping
+
+ def is_directory(self, path):
+ path = to_text(path)
+ return path in self._known_directories
+
+ def list_directory(self, path):
+ ret = []
+ path = to_text(path)
+ for x in list(self._file_mapping.keys()) + self._known_directories:
+ if x.startswith(path):
+ if os.path.dirname(x) == path:
+ ret.append(os.path.basename(x))
+ return ret
+
+ def is_executable(self, path):
+ # FIXME: figure out a way to make paths return true for this
+ return False
+
+ def _add_known_directory(self, directory):
+ if directory not in self._known_directories:
+ self._known_directories.append(directory)
+
+ def _build_known_directories(self):
+ self._known_directories = []
+ for path in self._file_mapping:
+ dirname = os.path.dirname(path)
+ while dirname not in ("/", ""):
+ self._add_known_directory(dirname)
+ dirname = os.path.dirname(dirname)
+
+ def push(self, path, content):
+ rebuild_dirs = False
+ if path not in self._file_mapping:
+ rebuild_dirs = True
+
+ self._file_mapping[path] = content
+
+ if rebuild_dirs:
+ self._build_known_directories()
+
+ def pop(self, path):
+ if path in self._file_mapping:
+ del self._file_mapping[path]
+ self._build_known_directories()
+
+ def clear(self):
+ self._file_mapping = dict()
+ self._known_directories = []
+
+ def get_basedir(self):
+ return os.getcwd()
+
+ def set_vault_secrets(self, vault_secrets):
+ self._vault_secrets = vault_secrets
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/path.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/path.py
new file mode 100644
index 00000000..356cd59f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/path.py
@@ -0,0 +1,10 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+from ansible_collections.cisco.ios.tests.unit.compat.mock import MagicMock
+from ansible.utils.path import unfrackpath
+
+
+mock_unfrackpath_noop = MagicMock(
+ spec_set=unfrackpath, side_effect=lambda x, *args, **kwargs: x
+)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/procenv.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/procenv.py
new file mode 100644
index 00000000..44fe6bf0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/procenv.py
@@ -0,0 +1,94 @@
+# (c) 2016, Matt Davis <mdavis@ansible.com>
+# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import sys
+import json
+
+from contextlib import contextmanager
+from io import BytesIO, StringIO
+from ansible_collections.cisco.ios.tests.unit.compat import unittest
+from ansible.module_utils.six import PY3
+from ansible.module_utils._text import to_bytes
+
+
+@contextmanager
+def swap_stdin_and_argv(stdin_data="", argv_data=tuple()):
+ """
+ context manager that temporarily masks the test runner's values for stdin and argv
+ """
+ real_stdin = sys.stdin
+ real_argv = sys.argv
+
+ if PY3:
+ fake_stream = StringIO(stdin_data)
+ fake_stream.buffer = BytesIO(to_bytes(stdin_data))
+ else:
+ fake_stream = BytesIO(to_bytes(stdin_data))
+
+ try:
+ sys.stdin = fake_stream
+ sys.argv = argv_data
+
+ yield
+ finally:
+ sys.stdin = real_stdin
+ sys.argv = real_argv
+
+
+@contextmanager
+def swap_stdout():
+ """
+ context manager that temporarily replaces stdout for tests that need to verify output
+ """
+ old_stdout = sys.stdout
+
+ if PY3:
+ fake_stream = StringIO()
+ else:
+ fake_stream = BytesIO()
+
+ try:
+ sys.stdout = fake_stream
+
+ yield fake_stream
+ finally:
+ sys.stdout = old_stdout
+
+
+class ModuleTestCase(unittest.TestCase):
+ def setUp(self, module_args=None):
+ if module_args is None:
+ module_args = {
+ "_ansible_remote_tmp": "/tmp",
+ "_ansible_keep_remote_files": False,
+ }
+
+ args = json.dumps(dict(ANSIBLE_MODULE_ARGS=module_args))
+
+ # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
+ self.stdin_swap = swap_stdin_and_argv(stdin_data=args)
+ self.stdin_swap.__enter__()
+
+ def tearDown(self):
+ # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
+ self.stdin_swap.__exit__(None, None, None)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/vault_helper.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/vault_helper.py
new file mode 100644
index 00000000..b34ae134
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/vault_helper.py
@@ -0,0 +1,42 @@
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible.module_utils._text import to_bytes
+
+from ansible.parsing.vault import VaultSecret
+
+
+class TextVaultSecret(VaultSecret):
+ """A secret piece of text. ie, a password. Tracks text encoding.
+
+ The text encoding of the text may not be the default text encoding so
+ we keep track of the encoding so we encode it to the same bytes."""
+
+ def __init__(self, text, encoding=None, errors=None, _bytes=None):
+ super(TextVaultSecret, self).__init__()
+ self.text = text
+ self.encoding = encoding or "utf-8"
+ self._bytes = _bytes
+ self.errors = errors or "strict"
+
+ @property
+ def bytes(self):
+ """The text encoded with encoding, unless we specifically set _bytes."""
+ return self._bytes or to_bytes(
+ self.text, encoding=self.encoding, errors=self.errors
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/yaml_helper.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/yaml_helper.py
new file mode 100644
index 00000000..5df30aae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/mock/yaml_helper.py
@@ -0,0 +1,167 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import io
+import yaml
+
+from ansible.module_utils.six import PY3
+from ansible.parsing.yaml.loader import AnsibleLoader
+from ansible.parsing.yaml.dumper import AnsibleDumper
+
+
+class YamlTestUtils(object):
+ """Mixin class to combine with a unittest.TestCase subclass."""
+
+ def _loader(self, stream):
+ """Vault related tests will want to override this.
+
+ Vault cases should setup a AnsibleLoader that has the vault password."""
+ return AnsibleLoader(stream)
+
+ def _dump_stream(self, obj, stream, dumper=None):
+ """Dump to a py2-unicode or py3-string stream."""
+ if PY3:
+ return yaml.dump(obj, stream, Dumper=dumper)
+ else:
+ return yaml.dump(obj, stream, Dumper=dumper, encoding=None)
+
+ def _dump_string(self, obj, dumper=None):
+ """Dump to a py2-unicode or py3-string"""
+ if PY3:
+ return yaml.dump(obj, Dumper=dumper)
+ else:
+ return yaml.dump(obj, Dumper=dumper, encoding=None)
+
+ def _dump_load_cycle(self, obj):
+ # Each pass though a dump or load revs the 'generation'
+ # obj to yaml string
+ string_from_object_dump = self._dump_string(obj, dumper=AnsibleDumper)
+
+ # wrap a stream/file like StringIO around that yaml
+ stream_from_object_dump = io.StringIO(string_from_object_dump)
+ loader = self._loader(stream_from_object_dump)
+ # load the yaml stream to create a new instance of the object (gen 2)
+ obj_2 = loader.get_data()
+
+ # dump the gen 2 objects directory to strings
+ string_from_object_dump_2 = self._dump_string(
+ obj_2, dumper=AnsibleDumper
+ )
+
+ # The gen 1 and gen 2 yaml strings
+ self.assertEqual(string_from_object_dump, string_from_object_dump_2)
+ # the gen 1 (orig) and gen 2 py object
+ self.assertEqual(obj, obj_2)
+
+ # again! gen 3... load strings into py objects
+ stream_3 = io.StringIO(string_from_object_dump_2)
+ loader_3 = self._loader(stream_3)
+ obj_3 = loader_3.get_data()
+
+ string_from_object_dump_3 = self._dump_string(
+ obj_3, dumper=AnsibleDumper
+ )
+
+ self.assertEqual(obj, obj_3)
+ # should be transitive, but...
+ self.assertEqual(obj_2, obj_3)
+ self.assertEqual(string_from_object_dump, string_from_object_dump_3)
+
+ def _old_dump_load_cycle(self, obj):
+ """Dump the passed in object to yaml, load it back up, dump again, compare."""
+ stream = io.StringIO()
+
+ yaml_string = self._dump_string(obj, dumper=AnsibleDumper)
+ self._dump_stream(obj, stream, dumper=AnsibleDumper)
+
+ yaml_string_from_stream = stream.getvalue()
+
+ # reset stream
+ stream.seek(0)
+
+ loader = self._loader(stream)
+ # loader = AnsibleLoader(stream, vault_password=self.vault_password)
+ obj_from_stream = loader.get_data()
+
+ stream_from_string = io.StringIO(yaml_string)
+ loader2 = self._loader(stream_from_string)
+ # loader2 = AnsibleLoader(stream_from_string, vault_password=self.vault_password)
+ obj_from_string = loader2.get_data()
+
+ stream_obj_from_stream = io.StringIO()
+ stream_obj_from_string = io.StringIO()
+
+ if PY3:
+ yaml.dump(
+ obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper
+ )
+ yaml.dump(
+ obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper
+ )
+ else:
+ yaml.dump(
+ obj_from_stream,
+ stream_obj_from_stream,
+ Dumper=AnsibleDumper,
+ encoding=None,
+ )
+ yaml.dump(
+ obj_from_stream,
+ stream_obj_from_string,
+ Dumper=AnsibleDumper,
+ encoding=None,
+ )
+
+ yaml_string_stream_obj_from_stream = stream_obj_from_stream.getvalue()
+ yaml_string_stream_obj_from_string = stream_obj_from_string.getvalue()
+
+ stream_obj_from_stream.seek(0)
+ stream_obj_from_string.seek(0)
+
+ if PY3:
+ yaml_string_obj_from_stream = yaml.dump(
+ obj_from_stream, Dumper=AnsibleDumper
+ )
+ yaml_string_obj_from_string = yaml.dump(
+ obj_from_string, Dumper=AnsibleDumper
+ )
+ else:
+ yaml_string_obj_from_stream = yaml.dump(
+ obj_from_stream, Dumper=AnsibleDumper, encoding=None
+ )
+ yaml_string_obj_from_string = yaml.dump(
+ obj_from_string, Dumper=AnsibleDumper, encoding=None
+ )
+
+ assert yaml_string == yaml_string_obj_from_stream
+ assert (
+ yaml_string
+ == yaml_string_obj_from_stream
+ == yaml_string_obj_from_string
+ )
+ assert (
+ yaml_string
+ == yaml_string_obj_from_stream
+ == yaml_string_obj_from_string
+ == yaml_string_stream_obj_from_stream
+ == yaml_string_stream_obj_from_string
+ )
+ assert obj == obj_from_stream
+ assert obj == obj_from_string
+ assert obj == yaml_string_obj_from_stream
+ assert obj == yaml_string_obj_from_string
+ assert (
+ obj
+ == obj_from_stream
+ == obj_from_string
+ == yaml_string_obj_from_stream
+ == yaml_string_obj_from_string
+ )
+ return {
+ "obj": obj,
+ "yaml_string": yaml_string,
+ "yaml_string_from_stream": yaml_string_from_stream,
+ "obj_from_stream": obj_from_stream,
+ "obj_from_string": obj_from_string,
+ "yaml_string_obj_from_string": yaml_string_obj_from_string,
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/conftest.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/conftest.py
new file mode 100644
index 00000000..e19a1e04
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/conftest.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2017 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+
+import pytest
+
+from ansible.module_utils.six import string_types
+from ansible.module_utils._text import to_bytes
+from ansible.module_utils.common._collections_compat import MutableMapping
+
+
+@pytest.fixture
+def patch_ansible_module(request, mocker):
+ if isinstance(request.param, string_types):
+ args = request.param
+ elif isinstance(request.param, MutableMapping):
+ if "ANSIBLE_MODULE_ARGS" not in request.param:
+ request.param = {"ANSIBLE_MODULE_ARGS": request.param}
+ if "_ansible_remote_tmp" not in request.param["ANSIBLE_MODULE_ARGS"]:
+ request.param["ANSIBLE_MODULE_ARGS"][
+ "_ansible_remote_tmp"
+ ] = "/tmp"
+ if (
+ "_ansible_keep_remote_files"
+ not in request.param["ANSIBLE_MODULE_ARGS"]
+ ):
+ request.param["ANSIBLE_MODULE_ARGS"][
+ "_ansible_keep_remote_files"
+ ] = False
+ args = json.dumps(request.param)
+ else:
+ raise Exception(
+ "Malformed data to the patch_ansible_module pytest fixture"
+ )
+
+ mocker.patch("ansible.module_utils.basic._ANSIBLE_ARGS", to_bytes(args))
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/configure_terminal b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/configure_terminal
new file mode 100644
index 00000000..139597f9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/configure_terminal
@@ -0,0 +1,2 @@
+
+
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_acl_interfaces.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_acl_interfaces.cfg
new file mode 100644
index 00000000..1462c135
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_acl_interfaces.cfg
@@ -0,0 +1,8 @@
+interface GigabitEthernet0/1
+ip access-group 110 in
+ip access-group 123 out
+ipv6 traffic-filter temp_v6 in
+ipv6 traffic-filter test_v6 out
+interface GigabitEthernet0/2
+ip access-group 110 in
+ip access-group 123 out
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_acls_config.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_acls_config.cfg
new file mode 100644
index 00000000..cf9ad041
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_acls_config.cfg
@@ -0,0 +1,4 @@
+Extended IP access list 110
+ 10 deny icmp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 echo dscp ef ttl eq 10
+IPv6 access list R1_TRAFFIC
+ deny tcp any eq www any eq telnet ack dscp af11 sequence 10 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_banner_show_banner.txt b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_banner_show_banner.txt
new file mode 100644
index 00000000..a134a317
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_banner_show_banner.txt
@@ -0,0 +1,3 @@
+this is a sample
+mulitline banner
+used for testing
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_banner_show_running_config_ios12.txt b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_banner_show_running_config_ios12.txt
new file mode 100644
index 00000000..004387a9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_banner_show_running_config_ios12.txt
@@ -0,0 +1,15 @@
+banner exec ^C
+this is a sample
+mulitline banner
+used for testing
+^C
+banner login ^C
+this is a sample
+mulitline banner
+used for testing
+^C
+!
+dummy
+end
+of
+config
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_bgp_config.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_bgp_config.cfg
new file mode 100644
index 00000000..9fec934a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_bgp_config.cfg
@@ -0,0 +1,24 @@
+!
+router bgp 64496
+ bgp router-id 192.0.2.1
+ bgp log-neighbor-changes
+ neighbor 192.51.100.1 remote-as 64496
+ neighbor 192.51.100.1 timers 120 360 360
+ neighbor 198.51.100.3 remote-as 64498
+ neighbor 203.0.113.5 remote-as 500
+ neighbor 203.0.113.5 description EBGP_PEER
+ !
+ address-family ipv4
+ network 192.0.2.0 mask 255.255.254.0 route-map RMAP_1
+ network 198.51.100.0 mask 255.255.255.128 route-map RMAP_2
+ redistribute static metric 100
+ redistribute eigrp metric 10 route-map RMAP_3
+ neighbor 203.0.113.1 remove-private-as
+ neighbor 203.0.113.1 maximum-prefix 100
+ exit-address-family
+ !
+ address-family ipv4 multicast
+ network 203.0.113.0 mask 255.255.255.224 route-map RMAP_1
+ network 192.0.2.0 mask 255.255.255.192 route-map RMAP_2
+ exit-address-family
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_bgp_global.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_bgp_global.cfg
new file mode 100644
index 00000000..17df6fd7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_bgp_global.cfg
@@ -0,0 +1,8 @@
+router bgp 65000
+ bgp nopeerup-delay post-boot 10
+ bgp bestpath compare-routerid
+ bgp advertise-best-external
+ timers bgp 100 200 150
+ redistribute connected metric 10
+ neighbor 198.51.100.1 remote-as 100
+ neighbor 198.51.100.1 route-map test-route out \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_config_config.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_config_config.cfg
new file mode 100644
index 00000000..afad9d08
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_config_config.cfg
@@ -0,0 +1,12 @@
+!
+hostname router
+!
+interface GigabitEthernet0/0
+ ip address 1.2.3.4 255.255.255.0
+ description test string
+!
+interface GigabitEthernet0/1
+ ip address 6.7.8.9 255.255.255.0
+ description test string
+ shutdown
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_config_defaults.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_config_defaults.cfg
new file mode 100644
index 00000000..e54645ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_config_defaults.cfg
@@ -0,0 +1,13 @@
+!
+hostname router
+!
+interface GigabitEthernet0/0
+ ip address 1.2.3.4 255.255.255.0
+ description test string
+ no shutdown
+!
+interface GigabitEthernet0/1
+ ip address 6.7.8.9 255.255.255.0
+ description test string
+ shutdown
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_config_src.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_config_src.cfg
new file mode 100644
index 00000000..b3d8961a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_config_src.cfg
@@ -0,0 +1,11 @@
+!
+hostname foo
+!
+interface GigabitEthernet0/0
+ no ip address
+!
+interface GigabitEthernet0/1
+ ip address 6.7.8.9 255.255.255.0
+ description test string
+ shutdown
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_dir b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_dir
new file mode 100644
index 00000000..3adc44ad
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_dir
@@ -0,0 +1,23 @@
+Directory of bootflash:/
+
+ 11 drwx 16384 Jun 1 2017 13:03:27 +00:00 lost+found
+325121 drwx 4096 Jun 1 2017 13:03:54 +00:00 .super.iso.dir
+ 12 -rw- 31 Jun 22 2018 15:17:06 +00:00 .CsrLxc_LastInstall
+ 13 -rw- 69 Jun 1 2017 13:05:53 +00:00 virtual-instance.conf
+438913 drwx 4096 Jun 1 2017 13:04:57 +00:00 core
+ 15 -rw- 125736960 Jun 1 2017 13:03:54 +00:00 iosxe-remote-mgmt.16.03.04.ova
+105667 -rw- 292164568 Jun 1 2017 13:04:04 +00:00 csr1000v-mono-universalk9.16.03.04.SPA.pkg
+105668 -rw- 34370768 Jun 1 2017 13:04:10 +00:00 csr1000v-rpboot.16.03.04.SPA.pkg
+105666 -rw- 5317 Jun 1 2017 13:04:10 +00:00 packages.conf
+195073 drwx 4096 Jun 1 2017 13:04:51 +00:00 .prst_sync
+414529 drwx 4096 Jun 1 2017 13:04:57 +00:00 .rollback_timer
+ 16 -rw- 0 Jun 1 2017 13:05:00 +00:00 tracelogs.kZn
+16257 drwx 24576 Jun 22 2018 16:03:11 +00:00 tracelogs
+349505 drwx 4096 Jun 1 2017 13:05:08 +00:00 .installer
+292609 drwx 4096 Jun 1 2017 13:05:59 +00:00 virtual-instance
+ 17 -rw- 30 Jun 22 2018 15:17:59 +00:00 throughput_monitor_params
+48769 drwx 4096 Jun 1 2017 13:06:04 +00:00 onep
+ 19 -rw- 376 Jun 22 2018 15:18:11 +00:00 csrlxc-cfg.log
+ 20 -rw- 0 Jun 22 2018 15:17:59 +00:00 cvac.log
+
+7897796608 bytes total (6608056320 bytes free)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_cdp b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_cdp
new file mode 100644
index 00000000..c5fff7d2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_cdp
@@ -0,0 +1,4 @@
+Global CDP information:
+ Sending CDP packets every 60 seconds
+ Sending a holdtime value of 180 seconds
+ Sending CDPv2 advertisements is enabled
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_cdp_neighbors_detail b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_cdp_neighbors_detail
new file mode 100644
index 00000000..b3d5453d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_cdp_neighbors_detail
@@ -0,0 +1,40 @@
+-------------------------
+Device ID: R2
+Entry address(es):
+ IP address: 10.0.0.3
+Platform: cisco CSR1000V, Capabilities: Router IGMP
+Interface: GigabitEthernet1, Port ID (outgoing port): GigabitEthernet2
+Holdtime : 149 sec
+
+Version :
+Cisco IOS Software [Everest], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.4, RELEASE SOFTWARE (fc3)
+Technical Support: http://www.cisco.com/techsupport
+Copyright (c) 1986-2018 by Cisco Systems, Inc.
+Compiled Sun 08-Jul-18 04:30 by mcpre
+
+advertisement version: 2
+Duplex: full
+Management address(es):
+ IP address: 10.0.0.3
+
+-------------------------
+Device ID: R3
+Entry address(es):
+ IP address: 10.0.0.4
+Platform: cisco CSR1000V, Capabilities: Router IGMP
+Interface: GigabitEthernet1, Port ID (outgoing port): GigabitEthernet3
+Holdtime : 149 sec
+
+Version :
+Cisco IOS Software [Everest], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.4, RELEASE SOFTWARE (fc3)
+Technical Support: http://www.cisco.com/techsupport
+Copyright (c) 1986-2018 by Cisco Systems, Inc.
+Compiled Sun 08-Jul-18 04:30 by mcpre
+
+advertisement version: 2
+Duplex: full
+Management address(es):
+ IP address: 10.0.0.4
+
+
+Total cdp entries displayed : 2
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_interfaces b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_interfaces
new file mode 100644
index 00000000..002b8b9e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_interfaces
@@ -0,0 +1,61 @@
+GigabitEthernet0/0 is up, line protocol is up
+ Hardware is iGbE, address is 5e00.0003.0000 (bia 5e00.0003.0000)
+ Description: OOB Management
+ Internet address is 10.8.38.66/24
+ MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
+ reliability 253/255, txload 1/255, rxload 1/255
+ Encapsulation ARPA, loopback not set
+ Keepalive set (10 sec)
+ Full Duplex, Auto Speed, link type is auto, media type is RJ45
+ output flow-control is unsupported, input flow-control is unsupported
+ ARP type: ARPA, ARP Timeout 04:00:00
+ Last input 00:00:00, output 00:00:00, output hang never
+ Last clearing of "show interface" counters never
+ Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
+ Queueing strategy: fifo
+ Output queue: 0/40 (size/max)
+ 5 minute input rate 3000 bits/sec, 2 packets/sec
+ 5 minute output rate 2000 bits/sec, 2 packets/sec
+ 2226666 packets input, 398288440 bytes, 0 no buffer
+ Received 156442 broadcasts (0 IP multicasts)
+ 25440 runts, 0 giants, 0 throttles
+ 25440 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
+ 0 watchdog, 0 multicast, 0 pause input
+ 1304895 packets output, 119337031 bytes, 0 underruns
+ 0 output errors, 0 collisions, 3 interface resets
+ 1083697 unknown protocol drops
+ 0 babbles, 0 late collision, 0 deferred
+ 1 lost carrier, 0 no carrier, 0 pause output
+ 0 output buffer failures, 0 output buffers swapped out
+GigabitEthernet1 is up, line protocol is up
+ Hardware is CSR vNIC, address is 5e00.0006.0000 (bia 5e00.0006.0000)
+ Description: OOB Management
+ Internet address is 10.8.38.67/24
+ MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
+ reliability 255/255, txload 1/255, rxload 1/255
+ Encapsulation ARPA, loopback not set
+ Keepalive set (10 sec)
+ Full Duplex, 1000Mbps, link type is auto, media type is RJ45
+ output flow-control is unsupported, input flow-control is unsupported
+ ARP type: ARPA, ARP Timeout 04:00:00
+ Last input 00:00:01, output 00:00:07, output hang never
+ Last clearing of "show interface" counters never
+ Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0
+ Queueing strategy: fifo
+ Output queue: 0/40 (size/max)
+ 5 minute input rate 3000 bits/sec, 3 packets/sec
+ 5 minute output rate 3000 bits/sec, 3 packets/sec
+ 8463791 packets input, 1445150230 bytes, 0 no buffer
+ Received 0 broadcasts (0 IP multicasts)
+ 0 runts, 0 giants, 0 throttles
+ 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
+ 0 watchdog, 0 multicast, 0 pause input
+ 3521571 packets output, 348781823 bytes, 0 underruns
+ 0 output errors, 0 collisions, 1 interface resets
+ 4150764 unknown protocol drops
+ 0 babbles, 0 late collision, 0 deferred
+ 0 lost carrier, 0 no carrier, 0 pause output
+ 0 output buffer failures, 0 output buffers swapped out
+Tunnel1110 is up, line protocol is up
+ Hardware is Tunnel
+ Internet address is 10.10.10.2/30
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_ip_interface b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_ip_interface
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_ip_interface
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_ipv6_interface b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_ipv6_interface
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_ipv6_interface
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_lldp b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_lldp
new file mode 100644
index 00000000..09847c31
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_lldp
@@ -0,0 +1,6 @@
+
+Global LLDP Information:
+ Status: ACTIVE
+ LLDP advertisements are sent every 30 seconds
+ LLDP hold time advertised is 120 seconds
+ LLDP interface reinitialisation delay is 2 seconds
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_lldp_neighbors_detail b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_lldp_neighbors_detail
new file mode 100644
index 00000000..adc4f30e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_lldp_neighbors_detail
@@ -0,0 +1,50 @@
+------------------------------------------------
+Local Intf: Gi1
+Chassis id: 001e.14d4.5300
+Port id: Gi3
+Port Description: GigabitEthernet3
+System Name: R3
+
+System Description:
+Cisco IOS Software [Everest], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.4, RELEASE SOFTWARE (fc3)
+Technical Support: http://www.cisco.com/techsupport
+Copyright (c) 1986-2018 by Cisco Systems, Inc.
+Compiled Sun 08-Jul-18 04:30 by
+
+Time remaining: 116 seconds
+System Capabilities: B,R
+Enabled Capabilities: R
+Management Addresses:
+ IP: 10.0.0.4
+Auto Negotiation - not supported
+Physical media capabilities - not advertised
+Media Attachment Unit type - not advertised
+Vlan ID: - not advertised
+
+------------------------------------------------
+Local Intf: Gi3
+Chassis id: 001e.e6c9.6d00
+Port id: Gi1
+Port Description: GigabitEthernet1
+System Name: Rtest
+
+System Description:
+Cisco IOS Software [Everest], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.4, RELEASE SOFTWARE (fc3)
+Technical Support: http://www.cisco.com/techsupport
+Copyright (c) 1986-2018 by Cisco Systems, Inc.
+Compiled Sun 08-Jul-18 04:30 by
+
+Time remaining: 116 seconds
+System Capabilities: B,R
+Enabled Capabilities: R
+Management Addresses:
+ IP: 10.3.0.3
+Auto Negotiation - not supported
+Physical media capabilities - not advertised
+Media Attachment Unit type - not advertised
+Vlan ID: - not advertised
+
+
+Total entries displayed: 2
+
+
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_memory_statistics b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_memory_statistics
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_memory_statistics
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_version b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_version
new file mode 100644
index 00000000..58322c80
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_version
@@ -0,0 +1,68 @@
+Cisco Internetwork Operating System Software
+IOS (tm) C3750 Software (C3750-I5-M), Version 12.1(14)EA1, RELEASE SOFTWARE (fc1)
+Copyright (c) 1986-2003 by cisco Systems, Inc.
+Compiled Tue 22-Jul-03 13:17 by antonino
+Image text-base: 0x00003000, data-base: 0x008F0CF8
+
+ROM: Bootstrap program is C3750 boot loader
+BOOTLDR: C3750 Boot Loader (C3750-HBOOT-M) Version 12.1(11r)AX, RELEASE SOFTWARE (fc1)
+
+3750RJ uptime is 1 hour, 29 minutes
+System returned to ROM by power-on
+System image file is "flash:c3750-i5-mz.121.14-EA1/c3750-i5-mz.121.14-EA1.bin"
+
+cisco WS-C3750-24TS (PowerPC405) processor (revision A0) with 120822K/10240K bytes of memory.
+Processor board ID CAT0726R0ZU
+Last reset from power-on
+Bridging software.
+2 Virtual Ethernet/IEEE 802.3 interface(s)
+48 FastEthernet/IEEE 802.3 interface(s)
+16 Gigabit Ethernet/IEEE 802.3 interface(s)
+The password-recovery mechanism is enabled.
+
+512K bytes of flash-simulated non-volatile configuration memory.
+Base ethernet MAC Address : 00:0D:29:B4:18:00
+Motherboard assembly number : 73-7055-06
+Power supply part number : 341-0034-01
+Motherboard serial number : CAT0726043V
+Power supply serial number : PHI0708009K
+Model revision number : A0
+Motherboard revision number : A0
+Model number : WS-C3750-24TS-E
+System serial number : CAT0726R0ZU
+
+Switch Ports Model SW Version SW Image
+------ ----- ----- ---------- ----------
+* 1 26 WS-C3750-24TS 12.1(14)EA1 C3750-I5-M
+2 26 WS-C3750-24TS 12.1(14)EA1 C3750-I5-M
+3 12 WS-C3750G-12S 12.1(14)EA1 C3750-I5-M
+
+Switch 02
+---------
+Switch Uptime : 1 hour, 29 minutes
+Base ethernet MAC Address : 00:0D:29:B4:3F:00
+Motherboard assembly number : 73-7055-06
+Power supply part number : 341-0034-01
+Motherboard serial number : CAT07260438
+Power supply serial number : PHI0708008X
+Model revision number : A0
+Motherboard revision number : A0
+Model number : WS-C3750-24TS-E
+System serial number : CAT0726R10A
+
+Switch 03
+---------
+Switch Uptime : 1 hour, 29 minutes
+Base ethernet MAC Address : 00:0D:BD:6A:3E:00
+Motherboard assembly number : 73-8307-06
+Power supply part number : 341-0048-01
+Motherboard serial number : CAT073205S2
+Power supply serial number : DTH0731055Z
+Model revision number : A0
+Motherboard revision number : A0
+Model number : WS-C3750G-12S-E
+System serial number : CAT0732R0M4
+Top assembly part number : 800-23419-01
+Top assembly revision number : A0
+
+Configuration register is 0xF
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_virtual_switch b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_virtual_switch
new file mode 100644
index 00000000..be3c5f87
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_facts_show_virtual_switch
@@ -0,0 +1,21 @@
+
+Executing the command on VSS member switch role = VSS Active, id = 1
+
+
+Switch mode : Virtual Switch
+Virtual switch domain number : 102
+Local switch number : 1
+Local switch operational role: Virtual Switch Active
+Peer switch number : 2
+Peer switch operational role : Virtual Switch Standby
+
+Executing the command on VSS member switch role = VSS Standby, id = 2
+
+
+Switch mode : Virtual Switch
+Virtual switch domain number : 102
+Local switch number : 2
+Local switch operational role: Virtual Switch Standby
+Peer switch number : 1
+Peer switch operational role : Virtual Switch Active
+
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_l2_interfaces.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_l2_interfaces.cfg
new file mode 100644
index 00000000..c62ec0d5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_l2_interfaces.cfg
@@ -0,0 +1,9 @@
+interface GigabitEthernet0/1
+ switchport mode access
+ switchport access vlan 10
+interface GigabitEthernet0/2
+ switchport trunk allowed vlan 10-20,40
+ switchport trunk encapsulation dot1q
+ switchport trunk native vlan 10
+ switchport trunk pruning vlan 10,20
+ switchport mode trunk \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_logging_config.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_logging_config.cfg
new file mode 100644
index 00000000..8a51afa7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_logging_config.cfg
@@ -0,0 +1,11 @@
+!
+logging buffered 5000
+logging console informational
+logging facility local0
+no logging monitor
+logging host 1.2.3.4 transport tcp
+logging host 1.2.3.4
+logging host 2.3.4.5
+logging host 1.2.3.4 transport tcp port 1000
+logging host 1.2.3.4 transport udp port 1000
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_logging_config_ios12.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_logging_config_ios12.cfg
new file mode 100644
index 00000000..58be36df
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_logging_config_ios12.cfg
@@ -0,0 +1,6 @@
+!
+logging buffered 5000
+logging console informational
+logging facility local0
+logging 2.3.4.5
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ntp_config.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ntp_config.cfg
new file mode 100644
index 00000000..ccd8558a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ntp_config.cfg
@@ -0,0 +1,7 @@
+ntp logging
+ntp authentication-key 10 md5 15435A030726242723273C21181319000A 7
+ntp authenticate
+ntp trusted-key 10
+ntp source Loopback0
+ntp access-group peer NTP_ACL
+ntp server 10.75.32.5
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ospf_interfaces.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ospf_interfaces.cfg
new file mode 100644
index 00000000..bc65ecc3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ospf_interfaces.cfg
@@ -0,0 +1,11 @@
+interface GigabitEthernet0/2
+ ip ospf priority 40
+ ip ospf adjacency stagger disable
+ ip ospf ttl-security hops 50
+ ip ospf 10 area 20
+ ip ospf cost 30
+interface GigabitEthernet0/3
+ ipv6 ospf 55 area 105
+ ipv6 ospf priority 20
+ ipv6 ospf transmit-delay 30
+ ipv6 ospf adjacency stagger disable
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ospfv2.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ospfv2.cfg
new file mode 100644
index 00000000..ce0cbc99
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ospfv2.cfg
@@ -0,0 +1,8 @@
+router ospf 200 vrf blue
+ auto-cost reference-bandwidth 4
+ distribute-list 10 out
+ distribute-list 123 in
+ domain-id 192.0.3.1
+ max-metric router-lsa on-startup 100
+ area 10 capability default-exclusion
+ \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ospfv3.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ospfv3.cfg
new file mode 100644
index 00000000..e27e9419
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ospfv3.cfg
@@ -0,0 +1,8 @@
+router ospfv3 1
+ max-metric router-lsa on-startup 110
+ area 10 nssa default-information-originate metric 10
+ !
+ address-family ipv4 unicast vrf blue
+ adjacency stagger 50 50
+ area 25 nssa default-information-originate metric 25 nssa-only
+ exit-address-family \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_10.255.255.250_repeat_2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_10.255.255.250_repeat_2
new file mode 100644
index 00000000..9b25d645
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_10.255.255.250_repeat_2
@@ -0,0 +1,4 @@
+Type escape sequence to abort.
+Sending 2, 100-byte ICMP Echos to 10.255.255.250, timeout is 2 seconds:
+..
+Success rate is 0 percent (0/2)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_repeat_2 b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_repeat_2
new file mode 100644
index 00000000..4dddd76b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_repeat_2
@@ -0,0 +1,4 @@
+Type escape sequence to abort.
+Sending 2, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
+!!
+Success rate is 100 percent (2/2), round-trip min/avg/max = 25/25/25 ms
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_size_1400 b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_size_1400
new file mode 100644
index 00000000..2e8d64cd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_size_1400
@@ -0,0 +1,4 @@
+Type escape sequence to abort.
+Sending 5, 1400-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
+!!!!!
+Success rate is 100 percent (5/5), round-trip min/avg/max = 25/25/25 ms
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_size_1400_df-bit b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_size_1400_df-bit
new file mode 100644
index 00000000..fe84e260
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_ping_ping_8.8.8.8_size_1400_df-bit
@@ -0,0 +1,5 @@
+Type escape sequence to abort.
+Sending 5, 1400-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
+Packet sent with the DF bit set
+!!!!!
+Success rate is 100 percent (5/5), round-trip min/avg/max = 25/25/25 ms
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_static_routes_config.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_static_routes_config.cfg
new file mode 100644
index 00000000..04aeeb2c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_static_routes_config.cfg
@@ -0,0 +1,5 @@
+ip route vrf ansible_vrf 0.0.0.0 0.0.0.0 198.51.101.1 name test_vrf_1 track 150 tag 100
+ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf_2 track 175 tag 50
+ip route vrf ansible_vrf 192.51.110.0 255.255.255.255 GigabitEthernet0/2 192.51.111.1 10 name partner
+ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 60
+ipv6 route 2001:DB8:0:3::/64 GigabitEthernet0/2 2001:DB8:0:3::2 tag 105 name test_v6
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_system_config.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_system_config.cfg
new file mode 100644
index 00000000..3330b4aa
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_system_config.cfg
@@ -0,0 +1,14 @@
+!
+hostname ios01
+!
+ip domain list vrf management example.net
+ip domain list example.net
+ip domain list example.com
+ip domain lookup source-interface GigabitEthernet0/0
+ip domain name vrf management eng.example.net
+ip domain name eng.example.net
+ip name-server vrf management 8.8.8.8
+ip name-server 8.8.8.8
+!
+vrf definition test
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_user_config.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_user_config.cfg
new file mode 100644
index 00000000..dd5b2095
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_user_config.cfg
@@ -0,0 +1,2 @@
+username admin view network-admin secret 5 $1$mdQIUxjg$3t3lzBpfKfITKvFm1uEIY.
+username ansible view network-admin secret 5 $1$3yWSXiIi$VdzV59ChiurrNdGxlDeAW/
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_vlan_config.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_vlan_config.cfg
new file mode 100644
index 00000000..69ac0b5e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_vlan_config.cfg
@@ -0,0 +1,9 @@
+VLAN Name Status Ports
+---- -------------------------------- --------- -------------------------------
+1 default active Gi1/0/4, Gi1/0/5
+ Gi1/0/52
+ Gi1/0/54
+2 vlan2 active Gi1/0/6, Gi1/0/7
+9 vlan9 active Gi1/0/6
+1002 fddi-default act/unsup
+1003 fddo-default act/unsup
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_vlans_config.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_vlans_config.cfg
new file mode 100644
index 00000000..416bc3d4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_vlans_config.cfg
@@ -0,0 +1,34 @@
+VLAN Name Status Ports
+---- -------------------------------- --------- -------------------------------
+1 default active Gi0/1, Gi0/2
+123 RemoteIsInMyName act/unsup
+150 VLAN0150 active
+888 a_very_long_vlan_name_a_very_long_vlan_name
+ active
+1002 fddi-default act/unsup
+1003 trcrf-default act/unsup
+1004 fddinet-default act/unsup
+1005 trbrf-default act/unsup
+
+VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
+---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
+1 enet 100001 1500 - - - - - 0 0
+123 enet 100123 610 - - - - - 0 0
+150 enet 100150 1500 - - - - - 0 0
+888 enet 100888 1500 - - - - - 0 0
+1002 fddi 101002 1500 - - - - - 0 0
+1003 trcrf 101003 4472 1005 3276 - - srb 0 0
+1004 fdnet 101004 1500 - - - ieee - 0 0
+1005 trbrf 101005 4472 - - 15 ibm - 0 0
+
+
+VLAN AREHops STEHops Backup CRF
+---- ------- ------- ----------
+1003 7 7 off
+
+Remote SPAN VLANs
+------------------------------------------------------------------------------
+150
+
+Primary Secondary Type Ports
+------- --------- ----------------- ------------------------------------------ \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_vrf_config.cfg b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_vrf_config.cfg
new file mode 100644
index 00000000..0a2d35f8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/ios_vrf_config.cfg
@@ -0,0 +1,81 @@
+!
+vrf definition test_1
+ description test vrf 1
+ rd 1:100
+!
+vrf definition test_2
+ description test vrf 2
+!
+vrf definition test_3
+!
+vrf definition test_17
+ rd 2:100
+ !
+ address-family ipv4
+ exit-address-family
+ !
+ address-family ipv6
+ route-target export 168.0.0.15:100
+ route-target export 4:100
+ route-target export 2:100
+ route-target export 168.0.0.13:100
+ route-target import 168.0.0.14:100
+ route-target import 2:100
+ route-target import 168.0.0.13:100
+ exit-address-family
+!
+vrf definition test_18
+ rd 168.0.0.9:100
+ !
+ address-family ipv4
+ route-target export 168.0.0.10:100
+ route-target export 168.0.0.9:100
+ route-target export 3:100
+ route-target import 168.0.0.9:100
+ route-target import 3:100
+ route-target import 168.0.0.10:600
+ exit-address-family
+ !
+ address-family ipv6
+ exit-address-family
+!
+vrf definition test_19
+ rd 10:700
+ route-target export 2:102
+ route-target export 2:103
+ route-target export 2:100
+ route-target export 2:101
+ route-target import 2:104
+ route-target import 2:105
+ route-target import 2:100
+ route-target import 2:101
+ !
+ address-family ipv4
+ route-target export 2:102
+ route-target export 2:103
+ route-target export 2:100
+ route-target export 2:101
+ route-target import 2:104
+ route-target import 2:105
+ route-target import 2:100
+ route-target import 2:101
+ exit-address-family
+ !
+ address-family ipv6
+ route-target export 2:102
+ route-target export 2:103
+ route-target export 2:100
+ route-target export 2:101
+ route-target import 2:104
+ route-target import 2:105
+ route-target import 2:100
+ route-target import 2:101
+ exit-address-family
+!
+interface Ethernet1
+ ip address 1.2.3.4/5
+!
+interface Ethernet2
+ ip address 1.2.3.4/5
+ vrf forwarding test_1
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/show_version b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/show_version
new file mode 100644
index 00000000..d293df3a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/fixtures/show_version
@@ -0,0 +1,45 @@
+Cisco IOS Software, IOSv Software (VIOS-ADVENTERPRISEK9-M), Version 15.6(1)T, RELEASE SOFTWARE (fc1)
+Technical Support: http://www.cisco.com/techsupport
+Copyright (c) 1986-2015 by Cisco Systems, Inc.
+Compiled Fri 20-Nov-15 13:39 by prod_rel_team
+
+
+ROM: Bootstrap program is IOSv
+
+ios01 uptime is 7 weeks, 5 days, 11 hours, 14 minutes
+System returned to ROM by reload
+System image file is "flash0:/vios-adventerprisek9-m"
+Last reload reason: Unknown reason
+
+
+
+This product contains cryptographic features and is subject to United
+States and local country laws governing import, export, transfer and
+use. Delivery of Cisco cryptographic products does not imply
+third-party authority to import, export, distribute or use encryption.
+Importers, exporters, distributors and users are responsible for
+compliance with U.S. and local country laws. By using this product you
+agree to comply with applicable laws and regulations. If you are unable
+to comply with U.S. and local laws, return this product immediately.
+
+A summary of U.S. laws governing Cisco cryptographic products may be found at:
+http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
+
+If you require further assistance please contact us by sending email to
+export@cisco.com.
+
+Cisco IOSv (revision 1.0) with with 472441K/50176K bytes of memory.
+Processor board ID 99I10YFMUCJ3JEZMV4DQB
+3 Gigabit Ethernet interfaces
+DRAM configuration is 72 bits wide with parity disabled.
+256K bytes of non-volatile configuration memory.
+2097152K bytes of ATA System CompactFlash 0 (Read/Write)
+0K bytes of ATA CompactFlash 1 (Read/Write)
+0K bytes of ATA CompactFlash 2 (Read/Write)
+10080K bytes of ATA CompactFlash 3 (Read/Write)
+
+
+
+Configuration register is 0x0
+
+
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/ios_module.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/ios_module.py
new file mode 100644
index 00000000..d6848ddc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/ios_module.py
@@ -0,0 +1,104 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import os
+import json
+
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ AnsibleExitJson,
+ AnsibleFailJson,
+ ModuleTestCase,
+)
+
+
+fixture_path = os.path.join(os.path.dirname(__file__), "fixtures")
+fixture_data = {}
+
+
+def load_fixture(name):
+ path = os.path.join(fixture_path, name)
+
+ if path in fixture_data:
+ return fixture_data[path]
+
+ with open(path) as f:
+ data = f.read()
+
+ try:
+ data = json.loads(data)
+ except Exception:
+ pass
+
+ fixture_data[path] = data
+ return data
+
+
+class TestIosModule(ModuleTestCase):
+ def execute_module(
+ self,
+ failed=False,
+ changed=False,
+ commands=None,
+ sort=True,
+ defaults=False,
+ ):
+ self.load_fixtures(commands)
+
+ if failed:
+ result = self.failed()
+ self.assertTrue(result["failed"], result)
+ else:
+ result = self.changed(changed)
+ self.assertEqual(result["changed"], changed, result)
+
+ if commands is not None:
+ if sort:
+ self.assertEqual(
+ sorted(commands),
+ sorted(result["commands"]),
+ result["commands"],
+ )
+ else:
+ self.assertEqual(
+ commands, result["commands"], result["commands"]
+ )
+
+ return result
+
+ def failed(self):
+ with self.assertRaises(AnsibleFailJson) as exc:
+ self.module.main()
+
+ result = exc.exception.args[0]
+ self.assertTrue(result["failed"], result)
+ return result
+
+ def changed(self, changed=False):
+ with self.assertRaises(AnsibleExitJson) as exc:
+ self.module.main()
+
+ result = exc.exception.args[0]
+ self.assertEqual(result["changed"], changed, result)
+ return result
+
+ def load_fixtures(self, commands=None):
+ pass
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_acl_interfaces.py
new file mode 100644
index 00000000..c9bb3328
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_acl_interfaces.py
@@ -0,0 +1,390 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_acl_interfaces
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosAclInterfacesModule(TestIosModule):
+ module = ios_acl_interfaces
+
+ def setUp(self):
+ super(TestIosAclInterfacesModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.acl_interfaces.acl_interfaces."
+ "Acl_InterfacesFacts.get_acl_interfaces_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosAclInterfacesModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("ios_acl_interfaces.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_ios_acl_interfaces_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/1",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(name="merge_110", direction="in"),
+ dict(name="merge_123", direction="out"),
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(name="merge_temp_v6", direction="in"),
+ dict(
+ name="merge_test_v6", direction="out"
+ ),
+ ],
+ ),
+ ],
+ ),
+ dict(
+ name="GigabitEthernet0/2",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(name="merge_110", direction="in"),
+ dict(name="merge_123", direction="out"),
+ ],
+ )
+ ],
+ ),
+ ],
+ state="merged",
+ )
+ )
+ commands = [
+ "interface GigabitEthernet0/1",
+ "ip access-group merge_110 in",
+ "ip access-group merge_123 out",
+ "ipv6 traffic-filter merge_temp_v6 in",
+ "ipv6 traffic-filter merge_test_v6 out",
+ "interface GigabitEthernet0/2",
+ "ip access-group merge_110 in",
+ "ip access-group merge_123 out",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_acl_interfaces_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/1",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(name="110", direction="in"),
+ dict(name="123", direction="out"),
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(name="test_v6", direction="out"),
+ dict(name="temp_v6", direction="in"),
+ ],
+ ),
+ ],
+ ),
+ dict(
+ name="GigabitEthernet0/2",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(name="110", direction="in"),
+ dict(name="123", direction="out"),
+ ],
+ )
+ ],
+ ),
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_acl_interfaces_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/1",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(name="replace_100", direction="out"),
+ dict(name="110", direction="in"),
+ ],
+ )
+ ],
+ )
+ ],
+ state="replaced",
+ )
+ )
+ commands = [
+ "interface GigabitEthernet0/1",
+ "no ip access-group 123 out",
+ "no ipv6 traffic-filter temp_v6 in",
+ "no ipv6 traffic-filter test_v6 out",
+ "ip access-group replace_100 out",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_acl_interfaces_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/1",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(name="110", direction="in"),
+ dict(name="123", direction="out"),
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(name="test_v6", direction="out"),
+ dict(name="temp_v6", direction="in"),
+ ],
+ ),
+ ],
+ )
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_acl_interfaces_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/1",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(name="100", direction="out"),
+ dict(name="110", direction="in"),
+ ],
+ )
+ ],
+ )
+ ],
+ state="overridden",
+ )
+ )
+
+ commands = [
+ "interface GigabitEthernet0/1",
+ "no ip access-group 123 out",
+ "no ipv6 traffic-filter test_v6 out",
+ "no ipv6 traffic-filter temp_v6 in",
+ "ip access-group 100 out",
+ "interface GigabitEthernet0/2",
+ "no ip access-group 110 in",
+ "no ip access-group 123 out",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_acl_interfaces_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/1",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(name="110", direction="in"),
+ dict(name="123", direction="out"),
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(name="test_v6", direction="out"),
+ dict(name="temp_v6", direction="in"),
+ ],
+ ),
+ ],
+ ),
+ dict(
+ name="GigabitEthernet0/2",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(name="110", direction="in"),
+ dict(name="123", direction="out"),
+ ],
+ )
+ ],
+ ),
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_acl_interfaces_deleted_interface(self):
+ set_module_args(
+ dict(config=[dict(name="GigabitEthernet0/1")], state="deleted")
+ )
+ commands = [
+ "interface GigabitEthernet0/1",
+ "no ip access-group 110 in",
+ "no ip access-group 123 out",
+ "no ipv6 traffic-filter test_v6 out",
+ "no ipv6 traffic-filter temp_v6 in",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_acl_interfaces_deleted(self):
+ set_module_args(
+ dict(config=[dict(name="GigabitEthernet0/1")], state="deleted")
+ )
+ commands = [
+ "interface GigabitEthernet0/1",
+ "no ip access-group 110 in",
+ "no ip access-group 123 out",
+ "no ipv6 traffic-filter test_v6 out",
+ "no ipv6 traffic-filter temp_v6 in",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_acl_interfaces_parsed(self):
+ set_module_args(
+ dict(
+ running_config="interface GigabitEthernet0/1\nip access-group 110 in\nipv6 traffic-filter test_v6 out",
+ state="parsed",
+ )
+ )
+ result = self.execute_module(changed=False)
+ parsed_list = [
+ {
+ "access_groups": [
+ {
+ "acls": [{"direction": "in", "name": "110"}],
+ "afi": "ipv4",
+ },
+ {
+ "acls": [{"direction": "out", "name": "test_v6"}],
+ "afi": "ipv6",
+ },
+ ],
+ "name": "GigabitEthernet0/1",
+ }
+ ]
+ self.assertEqual(parsed_list, result["parsed"])
+
+ def test_ios_acl_interfaces_rendered(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/1",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(name="110", direction="in"),
+ dict(name="123", direction="out"),
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(name="temp_v6", direction="in"),
+ dict(name="test_v6", direction="out"),
+ ],
+ ),
+ ],
+ )
+ ],
+ state="rendered",
+ )
+ )
+ commands = [
+ "interface GigabitEthernet0/1",
+ "ip access-group 110 in",
+ "ip access-group 123 out",
+ "ipv6 traffic-filter temp_v6 in",
+ "ipv6 traffic-filter test_v6 out",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(sorted(result["rendered"]), commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_acls.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_acls.py
new file mode 100644
index 00000000..5e99b2da
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_acls.py
@@ -0,0 +1,540 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import sys
+
+import pytest
+
+# These tests and/or the module under test are unstable on Python 3.5.
+# See: https://app.shippable.com/github/ansible/ansible/runs/161331/15/tests
+# This is most likely due to CPython 3.5 not maintaining dict insertion order.
+pytestmark = pytest.mark.skipif(
+ sys.version_info[:2] == (3, 5),
+ reason="Tests and/or module are unstable on Python 3.5.",
+)
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_acls
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosAclsModule(TestIosModule):
+ module = ios_acls
+
+ def setUp(self):
+ super(TestIosAclsModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.acls.acls."
+ "AclsFacts.get_acl_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosAclsModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None, transport="cli"):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("ios_acls_config.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_ios_acls_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="std_acl",
+ acl_type="standard",
+ aces=[
+ dict(
+ grant="deny",
+ source=dict(
+ address="192.0.2.0",
+ wildcard_bits="0.0.0.255",
+ ),
+ )
+ ],
+ ),
+ dict(
+ name="in_to_out",
+ acl_type="extended",
+ aces=[
+ dict(
+ grant="permit",
+ protocol="tcp",
+ source=dict(host="10.1.1.2"),
+ destination=dict(
+ host="172.16.1.1",
+ port_protocol=dict(eq="telnet"),
+ ),
+ )
+ ],
+ ),
+ ],
+ )
+ ],
+ state="merged",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "ip access-list standard std_acl",
+ "deny 192.0.2.0 0.0.0.255",
+ "ip access-list extended in_to_out",
+ "permit tcp host 10.1.1.2 host 172.16.1.1 eq telnet",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_acls_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="110",
+ aces=[
+ dict(
+ grant="deny",
+ protocol_options=dict(
+ icmp=dict(echo="true")
+ ),
+ sequence="10",
+ source=dict(
+ address="192.0.2.0",
+ wildcard_bits="0.0.0.255",
+ ),
+ destination=dict(
+ address="192.0.3.0",
+ wildcard_bits="0.0.0.255",
+ ),
+ dscp="ef",
+ ttl=dict(eq=10),
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(
+ name="R1_TRAFFIC",
+ aces=[
+ dict(
+ grant="deny",
+ protocol_options=dict(
+ tcp=dict(ack="true")
+ ),
+ sequence="10",
+ source=dict(
+ any="true",
+ port_protocol=dict(eq="www"),
+ ),
+ destination=dict(
+ any="true",
+ port_protocol=dict(eq="telnet"),
+ ),
+ dscp="af11",
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_ios_acls_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="replace_acl",
+ acl_type="extended",
+ aces=[
+ dict(
+ grant="deny",
+ protocol_options=dict(
+ tcp=dict(ack="true")
+ ),
+ source=dict(
+ address="198.51.100.0",
+ wildcard_bits="0.0.0.255",
+ ),
+ destination=dict(
+ address="198.51.101.0",
+ wildcard_bits="0.0.0.255",
+ port_protocol=dict(eq="telnet"),
+ ),
+ tos=dict(service_value=12),
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="replaced",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "ip access-list extended replace_acl",
+ "deny tcp 198.51.100.0 0.0.0.255 198.51.101.0 0.0.0.255 eq telnet ack tos 12",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_acls_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="110",
+ aces=[
+ dict(
+ grant="deny",
+ protocol_options=dict(
+ icmp=dict(echo="true")
+ ),
+ sequence="10",
+ source=dict(
+ address="192.0.2.0",
+ wildcard_bits="0.0.0.255",
+ ),
+ destination=dict(
+ address="192.0.3.0",
+ wildcard_bits="0.0.0.255",
+ ),
+ dscp="ef",
+ ttl=dict(eq=10),
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_ios_acls_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="150",
+ aces=[
+ dict(
+ grant="deny",
+ protocol_options=dict(
+ tcp=dict(syn="true")
+ ),
+ source=dict(
+ address="198.51.100.0",
+ wildcard_bits="0.0.0.255",
+ port_protocol=dict(eq="telnet"),
+ ),
+ destination=dict(
+ address="198.51.110.0",
+ wildcard_bits="0.0.0.255",
+ port_protocol=dict(eq="telnet"),
+ ),
+ dscp="ef",
+ ttl=dict(eq=10),
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="overridden",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "no ip access-list extended 110",
+ "no ipv6 access-list R1_TRAFFIC",
+ "ip access-list extended 150",
+ "deny tcp 198.51.100.0 0.0.0.255 eq telnet 198.51.110.0 0.0.0.255 eq telnet syn dscp ef ttl eq 10",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_acls_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="110",
+ aces=[
+ dict(
+ grant="deny",
+ protocol_options=dict(
+ icmp=dict(echo="true")
+ ),
+ sequence="10",
+ source=dict(
+ address="192.0.2.0",
+ wildcard_bits="0.0.0.255",
+ ),
+ destination=dict(
+ address="192.0.3.0",
+ wildcard_bits="0.0.0.255",
+ ),
+ dscp="ef",
+ ttl=dict(eq=10),
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(
+ name="R1_TRAFFIC",
+ aces=[
+ dict(
+ grant="deny",
+ protocol_options=dict(
+ tcp=dict(ack="true")
+ ),
+ sequence="10",
+ source=dict(
+ any="true",
+ port_protocol=dict(eq="www"),
+ ),
+ destination=dict(
+ any="true",
+ port_protocol=dict(eq="telnet"),
+ ),
+ dscp="af11",
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_ios_acls_deleted_afi_based(self):
+ set_module_args(dict(config=[dict(afi="ipv4")], state="deleted"))
+ result = self.execute_module(changed=True)
+ commands = ["no ip access-list extended 110"]
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_acls_deleted_acl_based(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="110",
+ aces=[
+ dict(
+ grant="deny",
+ protocol_options=dict(
+ icmp=dict(echo="true")
+ ),
+ sequence="10",
+ source=dict(
+ address="192.0.2.0",
+ wildcard_bits="0.0.0.255",
+ ),
+ destination=dict(
+ address="192.0.3.0",
+ wildcard_bits="0.0.0.255",
+ ),
+ dscp="ef",
+ ttl=dict(eq=10),
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(
+ name="R1_TRAFFIC",
+ aces=[
+ dict(
+ grant="deny",
+ protocol_options=dict(
+ tcp=dict(ack="true")
+ ),
+ sequence="10",
+ source=dict(
+ any="true",
+ port_protocol=dict(eq="www"),
+ ),
+ destination=dict(
+ any="true",
+ port_protocol=dict(eq="telnet"),
+ ),
+ dscp="af11",
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="deleted",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "no ip access-list extended 110",
+ "no ipv6 access-list R1_TRAFFIC",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_acls_rendered(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="110",
+ aces=[
+ dict(
+ grant="deny",
+ sequence="10",
+ protocol_options=dict(
+ tcp=dict(syn="true")
+ ),
+ source=dict(
+ address="192.0.2.0",
+ wildcard_bits="0.0.0.255",
+ ),
+ destination=dict(
+ address="192.0.3.0",
+ wildcard_bits="0.0.0.255",
+ port_protocol=dict(eq="www"),
+ ),
+ dscp="ef",
+ ttl=dict(eq=10),
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="rendered",
+ )
+ )
+ commands = [
+ "ip access-list extended 110",
+ "10 deny tcp 192.0.2.0 0.0.0.255 192.0.3.0 0.0.0.255 eq www syn dscp ef ttl eq 10",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["rendered"], commands)
+
+ def test_ios_acls_parsed(self):
+ set_module_args(
+ dict(
+ running_config="IPv6 access list R1_TRAFFIC\ndeny tcp any eq www any eq telnet ack dscp af11 sequence 10",
+ state="parsed",
+ )
+ )
+ result = self.execute_module(changed=False)
+ parsed_list = [
+ {
+ "acls": [
+ {
+ "aces": [
+ {
+ "destination": {
+ "any": True,
+ "port_protocol": {"eq": "telnet"},
+ },
+ "dscp": "af11",
+ "grant": "deny",
+ "protocol": "tcp",
+ "protocol_options": {"tcp": {"ack": True}},
+ "sequence": 10,
+ "source": {
+ "any": True,
+ "port_protocol": {"eq": "www"},
+ },
+ }
+ ],
+ "name": "R1_TRAFFIC",
+ }
+ ],
+ "afi": "ipv6",
+ }
+ ]
+ self.assertEqual(parsed_list, result["parsed"])
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_banner.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_banner.py
new file mode 100644
index 00000000..bb3bf4fd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_banner.py
@@ -0,0 +1,88 @@
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_banner
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosBannerModule(TestIosModule):
+
+ module = ios_banner
+
+ def setUp(self):
+ super(TestIosBannerModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_banner.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_banner.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestIosBannerModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("ios_banner_show_running_config_ios12.txt")
+
+ self.get_config.side_effect = load_from_file
+
+ def test_ios_banner_create(self):
+ for banner_type in ("login", "motd", "exec", "incoming", "slip-ppp"):
+ set_module_args(
+ dict(banner=banner_type, text="test\nbanner\nstring")
+ )
+ commands = [
+ "banner {0} @\ntest\nbanner\nstring\n@".format(banner_type)
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_banner_remove(self):
+ set_module_args(dict(banner="login", state="absent"))
+ commands = ["no banner login"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_banner_nochange(self):
+ banner_text = load_fixture("ios_banner_show_banner.txt")
+ set_module_args(dict(banner="login", text=banner_text))
+ self.execute_module()
+
+
+class TestIosBannerIos12Module(TestIosBannerModule):
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("ios_banner_show_running_config_ios12.txt")
+
+ self.get_config.side_effect = load_from_file
+
+ def test_ios_banner_nochange(self):
+ banner_text = load_fixture("ios_banner_show_banner.txt")
+ set_module_args(dict(banner="exec", text=banner_text))
+ self.execute_module()
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_bgp.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_bgp.py
new file mode 100644
index 00000000..f0b08980
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_bgp.py
@@ -0,0 +1,390 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.cli.config.bgp.process import (
+ Provider,
+)
+from ansible_collections.cisco.ios.plugins.modules import ios_bgp
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosBgpModule(TestIosModule):
+ module = ios_bgp
+
+ def setUp(self):
+ super(TestIosBgpModule, self).setUp()
+ self._bgp_config = load_fixture("ios_bgp_config.cfg")
+
+ def test_ios_bgp(self):
+ obj = Provider(
+ params=dict(
+ config=dict(
+ bgp_as=64496,
+ router_id="192.0.2.2",
+ networks=None,
+ address_family=None,
+ ),
+ operation="merge",
+ )
+ )
+ commands = obj.render(self._bgp_config)
+ self.assertEqual(
+ commands, ["router bgp 64496", "bgp router-id 192.0.2.2", "exit"]
+ )
+
+ def test_ios_bgp_idempotent(self):
+ obj = Provider(
+ params=dict(
+ config=dict(
+ bgp_as=64496,
+ router_id="192.0.2.1",
+ networks=None,
+ address_family=None,
+ ),
+ operation="merge",
+ )
+ )
+ commands = obj.render(self._bgp_config)
+ self.assertEqual(commands, [])
+
+ def test_ios_bgp_remove(self):
+ obj = Provider(
+ params=dict(
+ config=dict(bgp_as=64496, networks=None, address_family=None),
+ operation="delete",
+ )
+ )
+ commands = obj.render(self._bgp_config)
+ self.assertEqual(commands, ["no router bgp 64496"])
+
+ def test_ios_bgp_neighbor(self):
+ obj = Provider(
+ params=dict(
+ config=dict(
+ bgp_as=64496,
+ neighbors=[dict(neighbor="192.51.100.2", remote_as=64496)],
+ networks=None,
+ address_family=None,
+ ),
+ operation="merge",
+ )
+ )
+ commands = obj.render(self._bgp_config)
+ self.assertEqual(
+ commands,
+ [
+ "router bgp 64496",
+ "neighbor 192.51.100.2 remote-as 64496",
+ "exit",
+ ],
+ )
+
+ def test_ios_bgp_neighbor_idempotent(self):
+ obj = Provider(
+ params=dict(
+ config=dict(
+ bgp_as=64496,
+ neighbors=[
+ dict(
+ neighbor="192.51.100.1",
+ remote_as=64496,
+ timers=dict(
+ keepalive=120,
+ holdtime=360,
+ min_neighbor_holdtime=360,
+ ),
+ )
+ ],
+ networks=None,
+ address_family=None,
+ ),
+ operation="merge",
+ )
+ )
+ commands = obj.render(self._bgp_config)
+ self.assertEqual(commands, [])
+
+ def test_ios_bgp_network(self):
+ obj = Provider(
+ params=dict(
+ config=dict(
+ bgp_as=64496,
+ networks=[
+ dict(
+ prefix="192.0.1.0", masklen=23, route_map="RMAP_1"
+ )
+ ],
+ address_family=None,
+ ),
+ operation="merge",
+ )
+ )
+ commands = obj.render(self._bgp_config)
+ self.assertEqual(
+ sorted(commands),
+ sorted(
+ [
+ "router bgp 64496",
+ "network 192.0.1.0 mask 255.255.254.0 route-map RMAP_1",
+ "exit",
+ ]
+ ),
+ )
+
+ def test_ios_bgp_network_idempotent(self):
+ obj = Provider(
+ params=dict(
+ config=dict(
+ bgp_as=64496,
+ networks=[
+ dict(
+ prefix="192.0.2.0", masklen=23, route_map="RMAP_1"
+ ),
+ dict(
+ prefix="198.51.100.0",
+ masklen=25,
+ route_map="RMAP_2",
+ ),
+ ],
+ address_family=None,
+ ),
+ operation="merge",
+ )
+ )
+ commands = obj.render(self._bgp_config)
+ self.assertEqual(commands, [])
+
+ def test_ios_bgp_address_family_redistribute(self):
+ rd_1 = dict(protocol="ospf", id="233", metric=90, route_map=None)
+
+ config = dict(
+ bgp_as=64496,
+ address_family=[
+ dict(afi="ipv4", safi="unicast", redistribute=[rd_1])
+ ],
+ networks=None,
+ )
+
+ obj = Provider(params=dict(config=config, operation="merge"))
+
+ commands = obj.render(self._bgp_config)
+ cmd = [
+ "router bgp 64496",
+ "address-family ipv4",
+ "redistribute ospf 233 metric 90",
+ "exit-address-family",
+ "exit",
+ ]
+ self.assertEqual(sorted(commands), sorted(cmd))
+
+ def test_ios_bgp_address_family_redistribute_idempotent(self):
+ rd_1 = dict(protocol="eigrp", metric=10, route_map="RMAP_3", id=None)
+ rd_2 = dict(protocol="static", metric=100, id=None, route_map=None)
+
+ config = dict(
+ bgp_as=64496,
+ address_family=[
+ dict(afi="ipv4", safi="unicast", redistribute=[rd_1, rd_2])
+ ],
+ networks=None,
+ )
+
+ obj = Provider(params=dict(config=config, operation="merge"))
+
+ commands = obj.render(self._bgp_config)
+ self.assertEqual(commands, [])
+
+ def test_ios_bgp_address_family_neighbors(self):
+ af_nbr_1 = dict(
+ neighbor="192.51.100.1", maximum_prefix=35, activate=True
+ )
+ af_nbr_2 = dict(
+ neighbor="192.51.100.3", route_reflector_client=True, activate=True
+ )
+
+ config = dict(
+ bgp_as=64496,
+ address_family=[
+ dict(
+ afi="ipv4",
+ safi="multicast",
+ neighbors=[af_nbr_1, af_nbr_2],
+ )
+ ],
+ networks=None,
+ )
+
+ obj = Provider(params=dict(config=config, operation="merge"))
+
+ commands = obj.render(self._bgp_config)
+ cmd = [
+ "router bgp 64496",
+ "address-family ipv4 multicast",
+ "neighbor 192.51.100.1 activate",
+ "neighbor 192.51.100.1 maximum-prefix 35",
+ "neighbor 192.51.100.3 activate",
+ "neighbor 192.51.100.3 route-reflector-client",
+ "exit-address-family",
+ "exit",
+ ]
+ self.assertEqual(sorted(commands), sorted(cmd))
+
+ def test_ios_bgp_address_family_neighbors_idempotent(self):
+ af_nbr_1 = dict(
+ neighbor="203.0.113.1", remove_private_as=True, maximum_prefix=100
+ )
+
+ config = dict(
+ bgp_as=64496,
+ address_family=[
+ dict(afi="ipv4", safi="unicast", neighbors=[af_nbr_1])
+ ],
+ networks=None,
+ )
+
+ obj = Provider(params=dict(config=config, operation="merge"))
+
+ commands = obj.render(self._bgp_config)
+ self.assertEqual(commands, [])
+
+ def test_ios_bgp_address_family_networks(self):
+ net = dict(prefix="1.0.0.0", masklen=8, route_map="RMAP_1")
+ net2 = dict(prefix="192.168.1.0", masklen=24, route_map="RMAP_2")
+
+ config = dict(
+ bgp_as=64496,
+ address_family=[
+ dict(afi="ipv4", safi="multicast", networks=[net, net2])
+ ],
+ networks=None,
+ )
+
+ obj = Provider(params=dict(config=config, operation="merge"))
+
+ commands = obj.render(self._bgp_config)
+ cmd = [
+ "router bgp 64496",
+ "address-family ipv4 multicast",
+ "network 1.0.0.0 mask 255.0.0.0 route-map RMAP_1",
+ "network 192.168.1.0 mask 255.255.255.0 route-map RMAP_2",
+ "exit-address-family",
+ "exit",
+ ]
+ self.assertEqual(sorted(commands), sorted(cmd))
+
+ def test_ios_bgp_address_family_networks_idempotent(self):
+ net = dict(prefix="203.0.113.0", masklen=27, route_map="RMAP_1")
+ net2 = dict(prefix="192.0.2.0", masklen=26, route_map="RMAP_2")
+
+ config = dict(
+ bgp_as=64496,
+ address_family=[
+ dict(afi="ipv4", safi="multicast", networks=[net, net2])
+ ],
+ networks=None,
+ )
+
+ obj = Provider(params=dict(config=config, operation="merge"))
+
+ commands = obj.render(self._bgp_config)
+ self.assertEqual(commands, [])
+
+ def test_ios_bgp_operation_override(self):
+ net_1 = dict(prefix="1.0.0.0", masklen=8, route_map="RMAP_1")
+ net_2 = dict(prefix="192.168.1.0", masklen=24, route_map="RMAP_2")
+ nbr_1 = dict(
+ neighbor="192.51.100.1",
+ remote_as=64496,
+ update_source="GigabitEthernet0/1",
+ )
+ nbr_2 = dict(
+ neighbor="192.51.100.3",
+ remote_as=64496,
+ timers=dict(
+ keepalive=300, holdtime=360, min_neighbor_holdtime=360
+ ),
+ )
+ af_nbr_1 = dict(neighbor="192.51.100.1", maximum_prefix=35)
+ af_nbr_2 = dict(neighbor="192.51.100.3", route_reflector_client=True)
+
+ af_1 = dict(afi="ipv4", safi="unicast", neighbors=[af_nbr_1, af_nbr_2])
+ af_2 = dict(afi="ipv4", safi="multicast", networks=[net_1, net_2])
+ config = dict(
+ bgp_as=64496,
+ neighbors=[nbr_1, nbr_2],
+ address_family=[af_1, af_2],
+ networks=None,
+ )
+
+ obj = Provider(params=dict(config=config, operation="override"))
+ commands = obj.render(self._bgp_config)
+
+ cmd = [
+ "no router bgp 64496",
+ "router bgp 64496",
+ "neighbor 192.51.100.1 remote-as 64496",
+ "neighbor 192.51.100.1 update-source GigabitEthernet0/1",
+ "neighbor 192.51.100.3 remote-as 64496",
+ "neighbor 192.51.100.3 timers 300 360 360",
+ "address-family ipv4",
+ "neighbor 192.51.100.1 maximum-prefix 35",
+ "neighbor 192.51.100.3 route-reflector-client",
+ "exit-address-family",
+ "address-family ipv4 multicast",
+ "network 1.0.0.0 mask 255.0.0.0 route-map RMAP_1",
+ "network 192.168.1.0 mask 255.255.255.0 route-map RMAP_2",
+ "exit-address-family",
+ "exit",
+ ]
+
+ self.assertEqual(sorted(commands), sorted(cmd))
+
+ def test_ios_bgp_operation_replace(self):
+ rd = dict(protocol="ospf", id=223, metric=110, route_map=None)
+ net = dict(prefix="203.0.113.0", masklen=27, route_map="RMAP_1")
+ net2 = dict(prefix="192.0.2.0", masklen=26, route_map="RMAP_2")
+
+ af_1 = dict(afi="ipv4", safi="unicast", redistribute=[rd])
+ af_2 = dict(afi="ipv4", safi="multicast", networks=[net, net2])
+
+ config = dict(bgp_as=64496, address_family=[af_1, af_2], networks=None)
+ obj = Provider(params=dict(config=config, operation="replace"))
+ commands = obj.render(self._bgp_config)
+
+ cmd = [
+ "router bgp 64496",
+ "address-family ipv4",
+ "redistribute ospf 223 metric 110",
+ "no redistribute eigrp",
+ "no redistribute static",
+ "exit-address-family",
+ "exit",
+ ]
+
+ self.assertEqual(sorted(commands), sorted(cmd))
+
+ def test_ios_bgp_operation_replace_with_new_as(self):
+ rd = dict(protocol="ospf", id=223, metric=110, route_map=None)
+
+ af_1 = dict(afi="ipv4", safi="unicast", redistribute=[rd])
+
+ config = dict(bgp_as=64497, address_family=[af_1], networks=None)
+ obj = Provider(params=dict(config=config, operation="replace"))
+ commands = obj.render(self._bgp_config)
+
+ cmd = [
+ "no router bgp 64496",
+ "router bgp 64497",
+ "address-family ipv4",
+ "redistribute ospf 223 metric 110",
+ "exit-address-family",
+ "exit",
+ ]
+
+ self.assertEqual(sorted(commands), sorted(cmd))
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_bgp_global.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_bgp_global.py
new file mode 100644
index 00000000..c6b6f6bc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_bgp_global.py
@@ -0,0 +1,244 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_bgp_global
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosBgpGlobalModule(TestIosModule):
+ module = ios_bgp_global
+
+ def setUp(self):
+ super(TestIosBgpGlobalModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.bgp_global.bgp_global."
+ "Bgp_globalFacts.get_bgp_global_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosBgpGlobalModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("ios_bgp_global.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_ios_bgp_global_merged(self):
+ set_module_args(
+ dict(
+ config=dict(
+ as_number="65000",
+ bgp=dict(
+ dampening=dict(
+ penalty_half_time=1,
+ reuse_route_val=1,
+ suppress_route_val=1,
+ max_suppress=1,
+ ),
+ graceful_shutdown=dict(
+ neighbors=dict(time=50),
+ community=100,
+ local_preference=100,
+ ),
+ ),
+ neighbor=[
+ dict(
+ address="198.51.100.1",
+ description="merge neighbor",
+ aigp=dict(
+ send=dict(
+ cost_community=dict(
+ id=100,
+ poi=dict(
+ igp_cost=True, transitive=True
+ ),
+ )
+ )
+ ),
+ )
+ ],
+ ),
+ state="merged",
+ )
+ )
+ commands = [
+ "router bgp 65000",
+ "bgp graceful-shutdown all neighbors 50 local-preference 100 community 100",
+ "bgp dampening 1 1 1 1",
+ "neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
+ "neighbor 198.51.100.1 description merge neighbor",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_ios_bgp_global_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ as_number="65000",
+ bgp=dict(
+ advertise_best_external=True,
+ bestpath=[dict(compare_routerid=True)],
+ nopeerup_delay=[dict(post_boot=10)],
+ ),
+ redistribute=[dict(connected=dict(metric=10))],
+ neighbor=[
+ dict(
+ address="198.51.100.1",
+ remote_as=100,
+ route_map=dict(name="test-route", out=True),
+ )
+ ],
+ timers=dict(keepalive=100, holdtime=200, min_holdtime=150),
+ ),
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_bgp_global_replaced(self):
+ set_module_args(
+ dict(
+ config=dict(
+ as_number="65000",
+ bgp=dict(
+ advertise_best_external=True,
+ bestpath=[dict(compare_routerid=True)],
+ log_neighbor_changes=True,
+ nopeerup_delay=[
+ dict(cold_boot=20),
+ dict(post_boot=10),
+ ],
+ ),
+ redistribute=[dict(connected=dict(metric=10))],
+ neighbor=[
+ dict(
+ address="192.0.2.1",
+ remote_as=200,
+ description="replace neighbor",
+ )
+ ],
+ ),
+ state="replaced",
+ )
+ )
+ commands = [
+ "bgp nopeerup-delay cold-boot 20",
+ "neighbor 192.0.2.1 description replace neighbor",
+ "neighbor 192.0.2.1 remote-as 200",
+ "no neighbor 198.51.100.1 remote-as 100",
+ "no neighbor 198.51.100.1 route-map test-route out",
+ "no timers bgp 100 200 150",
+ "router bgp 65000",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_ios_bgp_global_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ as_number="65000",
+ bgp=dict(
+ advertise_best_external=True,
+ bestpath=[dict(compare_routerid=True)],
+ nopeerup_delay=[dict(post_boot=10)],
+ ),
+ redistribute=[dict(connected=dict(metric=10))],
+ neighbor=[
+ dict(
+ address="198.51.100.1",
+ remote_as=100,
+ route_map=dict(name="test-route", out=True),
+ )
+ ],
+ timers=dict(keepalive=100, holdtime=200, min_holdtime=150),
+ ),
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_bgp_global_deleted(self):
+ set_module_args(dict(config=dict(as_number=65000), state="deleted"))
+ commands = [
+ "router bgp 65000",
+ "no bgp nopeerup-delay post-boot 10",
+ "no bgp bestpath compare-routerid",
+ "no bgp advertise-best-external",
+ "no timers bgp 100 200 150",
+ "no redistribute connected metric 10",
+ "no neighbor 198.51.100.1 remote-as 100",
+ "no neighbor 198.51.100.1 route-map test-route out",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_ios_bgp_global_purged(self):
+ set_module_args(dict(config=dict(as_number=65000), state="purged"))
+ commands = ["no router bgp 65000"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_bgp_global_parsed(self):
+ set_module_args(
+ dict(
+ running_config="router bgp 65000\n bgp nopeerup-delay post-boot 10",
+ state="parsed",
+ )
+ )
+ result = self.execute_module(changed=False)
+ parsed_list = {
+ "as_number": "65000",
+ "bgp": {"nopeerup_delay": [{"post_boot": 10}]},
+ }
+ self.assertEqual(parsed_list, result["parsed"])
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_command.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_command.py
new file mode 100644
index 00000000..6d50176e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_command.py
@@ -0,0 +1,143 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_command
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosCommandModule(TestIosModule):
+
+ module = ios_command
+
+ def setUp(self):
+ super(TestIosCommandModule, self).setUp()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_command.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ def tearDown(self):
+ super(TestIosCommandModule, self).tearDown()
+ self.mock_run_commands.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+
+ for item in commands:
+ try:
+ obj = json.loads(item["command"])
+ command = obj["command"]
+ except ValueError:
+ command = item["command"]
+ filename = str(command).replace(" ", "_")
+ output.append(load_fixture(filename))
+ return output
+
+ self.run_commands.side_effect = load_from_file
+
+ def test_ios_command_simple(self):
+ set_module_args(dict(commands=["show version"]))
+ result = self.execute_module()
+ self.assertEqual(len(result["stdout"]), 1)
+ self.assertTrue(result["stdout"][0].startswith("Cisco IOS Software"))
+
+ def test_ios_command_multiple(self):
+ set_module_args(dict(commands=["show version", "show version"]))
+ result = self.execute_module()
+ self.assertEqual(len(result["stdout"]), 2)
+ self.assertTrue(result["stdout"][0].startswith("Cisco IOS Software"))
+
+ def test_ios_command_wait_for(self):
+ wait_for = 'result[0] contains "Cisco IOS"'
+ set_module_args(dict(commands=["show version"], wait_for=wait_for))
+ self.execute_module()
+
+ def test_ios_command_wait_for_fails(self):
+ wait_for = 'result[0] contains "test string"'
+ set_module_args(dict(commands=["show version"], wait_for=wait_for))
+ self.execute_module(failed=True)
+ self.assertEqual(self.run_commands.call_count, 10)
+
+ def test_ios_command_retries(self):
+ wait_for = 'result[0] contains "test string"'
+ set_module_args(
+ dict(commands=["show version"], wait_for=wait_for, retries=2)
+ )
+ self.execute_module(failed=True)
+ self.assertEqual(self.run_commands.call_count, 2)
+
+ def test_ios_command_match_any(self):
+ wait_for = [
+ 'result[0] contains "Cisco IOS"',
+ 'result[0] contains "test string"',
+ ]
+ set_module_args(
+ dict(commands=["show version"], wait_for=wait_for, match="any")
+ )
+ self.execute_module()
+
+ def test_ios_command_match_all(self):
+ wait_for = [
+ 'result[0] contains "Cisco IOS"',
+ 'result[0] contains "IOSv Software"',
+ ]
+ set_module_args(
+ dict(commands=["show version"], wait_for=wait_for, match="all")
+ )
+ self.execute_module()
+
+ def test_ios_command_match_all_failure(self):
+ wait_for = [
+ 'result[0] contains "Cisco IOS"',
+ 'result[0] contains "test string"',
+ ]
+ commands = ["show version", "show version"]
+ set_module_args(
+ dict(commands=commands, wait_for=wait_for, match="all")
+ )
+ self.execute_module(failed=True)
+
+ def test_ios_command_configure_check_warning(self):
+ commands = ["configure terminal"]
+ set_module_args({"commands": commands, "_ansible_check_mode": True})
+ result = self.execute_module()
+ self.assertEqual(
+ result["warnings"],
+ [
+ "Only show commands are supported when using check mode, not executing configure terminal"
+ ],
+ )
+
+ def test_ios_command_configure_not_warning(self):
+ commands = ["configure terminal"]
+ set_module_args(dict(commands=commands))
+ result = self.execute_module()
+ self.assertEqual(result["warnings"], [])
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_config.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_config.py
new file mode 100644
index 00000000..b279328b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_config.py
@@ -0,0 +1,339 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import (
+ patch,
+ MagicMock,
+)
+from ansible_collections.cisco.ios.plugins.modules import ios_config
+from ansible_collections.cisco.ios.plugins.cliconf.ios import Cliconf
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosConfigModule(TestIosModule):
+
+ module = ios_config
+
+ def setUp(self):
+ super(TestIosConfigModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_get_connection = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_config.get_connection"
+ )
+ self.get_connection = self.mock_get_connection.start()
+
+ self.conn = self.get_connection()
+ self.conn.edit_config = MagicMock()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_config.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.cliconf_obj = Cliconf(MagicMock())
+ self.running_config = load_fixture("ios_config_config.cfg")
+
+ def tearDown(self):
+ super(TestIosConfigModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_run_commands.stop()
+ self.mock_get_connection.stop()
+
+ def load_fixtures(self, commands=None):
+ config_file = "ios_config_config.cfg"
+ self.get_config.return_value = load_fixture(config_file)
+ self.get_connection.edit_config.return_value = None
+
+ def test_ios_config_unchanged(self):
+ src = load_fixture("ios_config_config.cfg")
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(src, src)
+ )
+ set_module_args(dict(src=src))
+ self.execute_module()
+
+ def test_ios_config_src(self):
+ src = load_fixture("ios_config_src.cfg")
+ set_module_args(dict(src=src))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(src, self.running_config)
+ )
+ commands = [
+ "hostname foo",
+ "interface GigabitEthernet0/0",
+ "no ip address",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_config_backup(self):
+ set_module_args(dict(backup=True))
+ result = self.execute_module()
+ self.assertIn("__backup__", result)
+
+ def test_ios_config_save_changed_true(self):
+ src = load_fixture("ios_config_src.cfg")
+ set_module_args(dict(src=src, save_when="changed"))
+ commands = [
+ "hostname foo",
+ "interface GigabitEthernet0/0",
+ "no ip address",
+ ]
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(src, self.running_config)
+ )
+ self.execute_module(changed=True, commands=commands)
+ self.assertEqual(self.run_commands.call_count, 1)
+ self.assertEqual(self.get_config.call_count, 1)
+ self.assertEqual(self.conn.edit_config.call_count, 1)
+ args = self.run_commands.call_args[0][1]
+ self.assertIn("copy running-config startup-config\r", args)
+
+ def test_ios_config_save_changed_false(self):
+ set_module_args(dict(save_when="changed"))
+ self.execute_module(changed=False)
+ self.assertEqual(self.run_commands.call_count, 0)
+ self.assertEqual(self.get_config.call_count, 0)
+ self.assertEqual(self.conn.edit_config.call_count, 0)
+
+ def test_ios_config_save_always(self):
+ self.run_commands.return_value = "hostname foo"
+ set_module_args(dict(save_when="always"))
+ self.execute_module(changed=True)
+ self.assertEqual(self.run_commands.call_count, 1)
+ self.assertEqual(self.get_config.call_count, 0)
+ self.assertEqual(self.conn.edit_config.call_count, 0)
+ args = self.run_commands.call_args[0][1]
+ self.assertIn("copy running-config startup-config\r", args)
+
+ def test_ios_config_lines_wo_parents(self):
+ lines = ["hostname foo"]
+ set_module_args(dict(lines=lines))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ commands = ["hostname foo"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_config_lines_w_parents(self):
+ lines = ["shutdown"]
+ parents = ["interface GigabitEthernet0/0"]
+ set_module_args(dict(lines=lines, parents=parents))
+ module = MagicMock()
+ module.params = {"lines": lines, "parents": parents, "src": None}
+ candidate_config = ios_config.get_candidate_config(module)
+
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ candidate_config, self.running_config
+ )
+ )
+
+ commands = ["interface GigabitEthernet0/0", "shutdown"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_config_before(self):
+ lines = ["hostname foo"]
+ set_module_args(dict(lines=lines, before=["test1", "test2"]))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ commands = ["test1", "test2", "hostname foo"]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_config_after(self):
+ lines = ["hostname foo"]
+ set_module_args(dict(lines=lines, after=["test1", "test2"]))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ commands = ["hostname foo", "test1", "test2"]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_config_before_after_no_change(self):
+ lines = ["hostname router"]
+ set_module_args(
+ dict(
+ lines=lines,
+ before=["test1", "test2"],
+ after=["test3", "test4"],
+ )
+ )
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ self.execute_module()
+
+ def test_ios_config_config(self):
+ config = "hostname localhost"
+ lines = ["hostname router"]
+ set_module_args(dict(lines=lines, config=config))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff("\n".join(lines), config)
+ )
+ commands = ["hostname router"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_config_replace_block(self):
+ lines = ["description test string", "test string"]
+ parents = ["interface GigabitEthernet0/0"]
+ set_module_args(dict(lines=lines, replace="block", parents=parents))
+
+ module = MagicMock()
+ module.params = {"lines": lines, "parents": parents, "src": None}
+ candidate_config = ios_config.get_candidate_config(module)
+
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ candidate_config,
+ self.running_config,
+ diff_replace="block",
+ path=parents,
+ )
+ )
+
+ commands = parents + lines
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_config_match_none(self):
+ lines = ["hostname router"]
+ set_module_args(dict(lines=lines, match="none"))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config, diff_match="none"
+ )
+ )
+ self.execute_module(changed=True, commands=lines)
+
+ def test_ios_config_match_none2(self):
+ lines = ["ip address 1.2.3.4 255.255.255.0", "description test string"]
+ parents = ["interface GigabitEthernet0/0"]
+ set_module_args(dict(lines=lines, parents=parents, match="none"))
+
+ module = MagicMock()
+ module.params = {"lines": lines, "parents": parents, "src": None}
+ candidate_config = ios_config.get_candidate_config(module)
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ candidate_config,
+ self.running_config,
+ diff_match="none",
+ path=parents,
+ )
+ )
+
+ commands = parents + lines
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_config_match_strict(self):
+ lines = [
+ "ip address 1.2.3.4 255.255.255.0",
+ "description test string",
+ "shutdown",
+ ]
+ parents = ["interface GigabitEthernet0/0"]
+ set_module_args(dict(lines=lines, parents=parents, match="strict"))
+
+ module = MagicMock()
+ module.params = {"lines": lines, "parents": parents, "src": None}
+ candidate_config = ios_config.get_candidate_config(module)
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ candidate_config,
+ self.running_config,
+ diff_match="strict",
+ path=parents,
+ )
+ )
+
+ commands = parents + ["shutdown"]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_config_match_exact(self):
+ lines = [
+ "ip address 1.2.3.4 255.255.255.0",
+ "description test string",
+ "shutdown",
+ ]
+ parents = ["interface GigabitEthernet0/0"]
+ set_module_args(dict(lines=lines, parents=parents, match="exact"))
+
+ module = MagicMock()
+ module.params = {"lines": lines, "parents": parents, "src": None}
+ candidate_config = ios_config.get_candidate_config(module)
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ candidate_config,
+ self.running_config,
+ diff_match="exact",
+ path=parents,
+ )
+ )
+
+ commands = parents + lines
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_config_src_and_lines_fails(self):
+ args = dict(src="foo", lines="foo")
+ set_module_args(args)
+ self.execute_module(failed=True)
+
+ def test_ios_config_src_and_parents_fails(self):
+ args = dict(src="foo", parents="foo")
+ set_module_args(args)
+ self.execute_module(failed=True)
+
+ def test_ios_config_match_exact_requires_lines(self):
+ args = dict(match="exact")
+ set_module_args(args)
+ self.execute_module(failed=True)
+
+ def test_ios_config_match_strict_requires_lines(self):
+ args = dict(match="strict")
+ set_module_args(args)
+ self.execute_module(failed=True)
+
+ def test_ios_config_replace_block_requires_lines(self):
+ args = dict(replace="block")
+ set_module_args(args)
+ self.execute_module(failed=True)
+
+ def test_ios_config_replace_config_requires_src(self):
+ args = dict(replace="config")
+ set_module_args(args)
+ self.execute_module(failed=True)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_facts.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_facts.py
new file mode 100644
index 00000000..e26aad69
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_facts.py
@@ -0,0 +1,168 @@
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_facts
+from ansible.module_utils.six import assertCountEqual
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosFactsModule(TestIosModule):
+
+ module = ios_facts
+
+ def setUp(self):
+ super(TestIosFactsModule, self).setUp()
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.legacy.base.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_get_resource_connection = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection = (
+ self.mock_get_resource_connection.start()
+ )
+
+ self.mock_get_capabilities = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.legacy.base.get_capabilities"
+ )
+ self.get_capabilities = self.mock_get_capabilities.start()
+ self.get_capabilities.return_value = {
+ "device_info": {
+ "network_os": "ios",
+ "network_os_hostname": "an-ios-01",
+ "network_os_image": "flash0:/vios-adventerprisek9-m",
+ "network_os_model": "WS-C3750-24TS",
+ "network_os_version": "15.6(3)M2",
+ },
+ "network_api": "cliconf",
+ }
+
+ def tearDown(self):
+ super(TestIosFactsModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_get_capabilities.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ commands = kwargs["commands"]
+ output = list()
+
+ for command in commands:
+ filename = str(command).split(" | ")[0].replace(" ", "_")
+ output.append(load_fixture("ios_facts_%s" % filename))
+ return output
+
+ self.run_commands.side_effect = load_from_file
+
+ def test_ios_facts_stacked(self):
+ set_module_args(dict(gather_subset="default"))
+ result = self.execute_module()
+ self.assertEqual(
+ result["ansible_facts"]["ansible_net_model"], "WS-C3750-24TS"
+ )
+ self.assertEqual(
+ result["ansible_facts"]["ansible_net_serialnum"], "CAT0726R0ZU"
+ )
+ self.assertEqual(
+ result["ansible_facts"]["ansible_net_stacked_models"],
+ ["WS-C3750-24TS-E", "WS-C3750-24TS-E", "WS-C3750G-12S-E"],
+ )
+ self.assertEqual(
+ result["ansible_facts"]["ansible_net_stacked_serialnums"],
+ ["CAT0726R0ZU", "CAT0726R10A", "CAT0732R0M4"],
+ )
+
+ def test_ios_facts_tunnel_address(self):
+ set_module_args(dict(gather_subset="interfaces"))
+ result = self.execute_module()
+ self.assertEqual(
+ result["ansible_facts"]["ansible_net_interfaces"][
+ "GigabitEthernet0/0"
+ ]["macaddress"],
+ "5e00.0003.0000",
+ )
+ self.assertEqual(
+ result["ansible_facts"]["ansible_net_interfaces"][
+ "GigabitEthernet1"
+ ]["macaddress"],
+ "5e00.0006.0000",
+ )
+ self.assertIsNone(
+ result["ansible_facts"]["ansible_net_interfaces"]["Tunnel1110"][
+ "macaddress"
+ ]
+ )
+
+ def test_ios_facts_filesystems_info(self):
+ set_module_args(dict(gather_subset="hardware"))
+ result = self.execute_module()
+ self.assertEqual(
+ result["ansible_facts"]["ansible_net_filesystems_info"][
+ "bootflash:"
+ ]["spacetotal_kb"],
+ 7712692.0,
+ )
+ self.assertEqual(
+ result["ansible_facts"]["ansible_net_filesystems_info"][
+ "bootflash:"
+ ]["spacefree_kb"],
+ 6453180.0,
+ )
+
+ def test_ios_facts_neighbors(self):
+ set_module_args(dict(gather_subset="interfaces"))
+ result = self.execute_module()
+ assertCountEqual(
+ self,
+ result["ansible_facts"]["ansible_net_neighbors"].keys(),
+ ["GigabitEthernet1", "GigabitEthernet3"],
+ )
+ assertCountEqual(
+ self,
+ result["ansible_facts"]["ansible_net_neighbors"][
+ "GigabitEthernet1"
+ ],
+ [
+ {
+ "platform": "cisco CSR1000V",
+ "host": "R2",
+ "port": "GigabitEthernet2",
+ },
+ {
+ "platform": "cisco CSR1000V",
+ "host": "R3",
+ "port": "GigabitEthernet3",
+ },
+ ],
+ )
+ assertCountEqual(
+ self,
+ result["ansible_facts"]["ansible_net_neighbors"][
+ "GigabitEthernet3"
+ ],
+ [{"host": "Rtest", "port": "Gi1"}],
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_l2_interfaces.py
new file mode 100644
index 00000000..8f4934e1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_l2_interfaces.py
@@ -0,0 +1,327 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_l2_interfaces
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosL2InterfacesModule(TestIosModule):
+ module = ios_l2_interfaces
+
+ def setUp(self):
+ super(TestIosL2InterfacesModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.l2_interfaces.l2_interfaces."
+ "L2_InterfacesFacts.get_l2_interfaces_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosL2InterfacesModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("ios_l2_interfaces.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_ios_l2_interfaces_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ access=dict(vlan=20),
+ mode="access",
+ name="GigabitEthernet0/1",
+ voice=dict(vlan=40),
+ ),
+ dict(
+ mode="trunk",
+ name="GigabitEthernet0/2",
+ trunk=dict(
+ allowed_vlans=["60"],
+ encapsulation="isl",
+ native_vlan=20,
+ pruning_vlans=["12-15", "20"],
+ ),
+ ),
+ ],
+ state="merged",
+ )
+ )
+ commands = [
+ "interface GigabitEthernet0/1",
+ "switchport access vlan 20",
+ "switchport voice vlan 40",
+ "interface GigabitEthernet0/2",
+ "switchport trunk encapsulation isl",
+ "switchport trunk native vlan 20",
+ "switchport trunk allowed vlan add 60",
+ "switchport trunk pruning vlan add 12-15",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_l2_interfaces_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ access=dict(vlan=10),
+ mode="access",
+ name="GigabitEthernet0/1",
+ ),
+ dict(
+ mode="trunk",
+ name="GigabitEthernet0/2",
+ trunk=dict(
+ allowed_vlans=["10-20", "40"],
+ encapsulation="dot1q",
+ native_vlan=10,
+ pruning_vlans=["10", "20"],
+ ),
+ ),
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_l2_interfaces_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/2",
+ trunk=dict(
+ allowed_vlans=["20-25", "40"],
+ encapsulation="isl",
+ native_vlan=20,
+ pruning_vlans=["10"],
+ ),
+ )
+ ],
+ state="replaced",
+ )
+ )
+ commands = [
+ "interface GigabitEthernet0/2",
+ "no switchport mode",
+ "switchport trunk encapsulation isl",
+ "switchport trunk native vlan 20",
+ "switchport trunk allowed vlan 20-25,40",
+ "switchport trunk pruning vlan 10",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_l2_interfaces_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ access=dict(vlan=10),
+ mode="access",
+ name="GigabitEthernet0/1",
+ ),
+ dict(
+ mode="trunk",
+ name="GigabitEthernet0/2",
+ trunk=dict(
+ allowed_vlans=["10-20", "40"],
+ encapsulation="dot1q",
+ native_vlan=10,
+ pruning_vlans=["10", "20"],
+ ),
+ ),
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_l2_interfaces_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ access=dict(vlan=10),
+ voice=dict(vlan=20),
+ mode="access",
+ name="GigabitEthernet0/2",
+ )
+ ],
+ state="overridden",
+ )
+ )
+ commands = [
+ "interface GigabitEthernet0/1",
+ "no switchport mode",
+ "no switchport access vlan",
+ "interface GigabitEthernet0/2",
+ "no switchport trunk encapsulation",
+ "no switchport trunk native vlan",
+ "no switchport trunk allowed vlan",
+ "no switchport trunk pruning vlan",
+ "switchport access vlan 10",
+ "switchport voice vlan 20",
+ "switchport mode access",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_l2_interfaces_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ access=dict(vlan=10),
+ mode="access",
+ name="GigabitEthernet0/1",
+ ),
+ dict(
+ mode="trunk",
+ name="GigabitEthernet0/2",
+ trunk=dict(
+ allowed_vlans=["10-20", "40"],
+ encapsulation="dot1q",
+ native_vlan=10,
+ pruning_vlans=["10", "20"],
+ ),
+ ),
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_l2_interfaces_deleted_interface(self):
+ set_module_args(
+ dict(config=[dict(name="GigabitEthernet0/1")], state="deleted")
+ )
+ commands = [
+ "interface GigabitEthernet0/1",
+ "no switchport mode",
+ "no switchport access vlan",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_l2_interfaces_deleted_all(self):
+ set_module_args(dict(config=[], state="deleted"))
+ commands = [
+ "interface GigabitEthernet0/1",
+ "no switchport mode",
+ "no switchport access vlan",
+ "interface GigabitEthernet0/2",
+ "no switchport mode",
+ "no switchport trunk encapsulation",
+ "no switchport trunk native vlan",
+ "no switchport trunk allowed vlan",
+ "no switchport trunk pruning vlan",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_l2_interfaces_parsed(self):
+ set_module_args(
+ dict(
+ running_config="interface GigabitEthernet0/1\nswitchport mode trunk\nswitchport trunk native vlan 10\nswitchport trunk encapsulation dot1q\n",
+ state="parsed",
+ )
+ )
+ result = self.execute_module(changed=False)
+ parsed_list = [
+ {
+ "mode": "trunk",
+ "name": "GigabitEthernet0/1",
+ "trunk": {"encapsulation": "dot1q", "native_vlan": 10},
+ }
+ ]
+ self.assertEqual(parsed_list, result["parsed"])
+
+ def test_ios_l2_interfaces_rendered(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ access=dict(vlan=20),
+ mode="access",
+ name="GigabitEthernet0/1",
+ voice=dict(vlan=40),
+ ),
+ dict(
+ mode="trunk",
+ name="GigabitEthernet0/2",
+ trunk=dict(
+ allowed_vlans=["10-20", "40"],
+ encapsulation="isl",
+ native_vlan=20,
+ pruning_vlans=["12-15", "20"],
+ ),
+ ),
+ ],
+ state="rendered",
+ )
+ )
+ commands = [
+ "interface GigabitEthernet0/1",
+ "switchport access vlan 20",
+ "switchport voice vlan 40",
+ "switchport mode access",
+ "interface GigabitEthernet0/2",
+ "switchport trunk encapsulation isl",
+ "switchport trunk native vlan 20",
+ "switchport trunk allowed vlan 10-20,40",
+ "switchport trunk pruning vlan 12-15,20",
+ "switchport mode trunk",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["rendered"], commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_logging.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_logging.py
new file mode 100644
index 00000000..3f2c227a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_logging.py
@@ -0,0 +1,161 @@
+#
+# (c) 2016 Red Hat Inc.
+# (c) 2017 Paul Neumann
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_logging
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosLoggingModule(TestIosModule):
+
+ module = ios_logging
+
+ def setUp(self):
+ super(TestIosLoggingModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_logging.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_logging.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_capabilities = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_logging.get_capabilities"
+ )
+ self.get_capabilities = self.mock_get_capabilities.start()
+ self.get_capabilities.return_value = {
+ "device_info": {"network_os_version": "15.6(2)T"}
+ }
+
+ def tearDown(self):
+ super(TestIosLoggingModule, self).tearDown()
+
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_get_capabilities.stop()
+
+ def load_fixtures(self, commands=None):
+ self.get_config.return_value = load_fixture("ios_logging_config.cfg")
+ self.load_config.return_value = None
+
+ def test_ios_logging_buffer_size_changed_implicit(self):
+ set_module_args(dict(dest="buffered"))
+ commands = ["logging buffered 4096"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_logging_buffer_size_changed_explicit(self):
+ set_module_args(dict(dest="buffered", size=6000))
+ commands = ["logging buffered 6000"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_logging_add_host(self):
+ set_module_args(dict(dest="host", name="192.168.1.1"))
+ commands = ["logging host 192.168.1.1"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_logging_host_idempotent(self):
+ set_module_args(dict(dest="host", name="2.3.4.5"))
+ commands = []
+ self.execute_module(changed=False, commands=commands)
+
+ def test_ios_logging_delete_non_exist_host(self):
+ set_module_args(dict(dest="host", name="192.168.1.1", state="absent"))
+ commands = []
+ self.execute_module(changed=False, commands=commands)
+
+ def test_ios_logging_delete_host(self):
+ set_module_args(dict(dest="host", name="2.3.4.5", state="absent"))
+ commands = ["no logging host 2.3.4.5"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_logging_configure_disabled_monitor_destination(self):
+ set_module_args(dict(dest="monitor", level="debugging"))
+ commands = ["logging monitor debugging"]
+ self.execute_module(changed=True, commands=commands)
+
+
+class TestIosLoggingModuleIOS12(TestIosModule):
+
+ module = ios_logging
+
+ def setUp(self):
+ super(TestIosLoggingModuleIOS12, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_logging.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_logging.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_capabilities = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_logging.get_capabilities"
+ )
+ self.get_capabilities = self.mock_get_capabilities.start()
+ self.get_capabilities.return_value = {
+ "device_info": {"network_os_version": "12.1(2)T"}
+ }
+
+ def tearDown(self):
+ super(TestIosLoggingModuleIOS12, self).tearDown()
+
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_get_capabilities.stop()
+
+ def load_fixtures(self, commands=None):
+ self.get_config.return_value = load_fixture(
+ "ios_logging_config_ios12.cfg"
+ )
+ self.load_config.return_value = None
+
+ def test_ios_logging_add_host(self):
+ set_module_args(dict(dest="host", name="192.168.1.1"))
+ commands = ["logging 192.168.1.1"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_logging_host_idempotent(self):
+ set_module_args(dict(dest="host", name="2.3.4.5"))
+ commands = []
+ self.execute_module(changed=False, commands=commands)
+
+ def test_ios_logging_delete_non_exist_host(self):
+ set_module_args(dict(dest="host", name="192.168.1.1", state="absent"))
+ commands = []
+ self.execute_module(changed=False, commands=commands)
+
+ def test_ios_logging_delete_host(self):
+ set_module_args(dict(dest="host", name="2.3.4.5", state="absent"))
+ commands = ["no logging 2.3.4.5"]
+ self.execute_module(changed=True, commands=commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ntp.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ntp.py
new file mode 100644
index 00000000..38cf00a8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ntp.py
@@ -0,0 +1,111 @@
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_ntp
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosNtpModule(TestIosModule):
+
+ module = ios_ntp
+
+ def setUp(self):
+ super(TestIosNtpModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_ntp.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_ntp.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestIosNtpModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None):
+ self.get_config.return_value = load_fixture(
+ "ios_ntp_config.cfg"
+ ).strip()
+ self.load_config.return_value = dict(diff=None, session="session")
+
+ def test_ios_ntp_idempotent(self):
+ set_module_args(
+ dict(
+ server="10.75.32.5",
+ source_int="Loopback0",
+ acl="NTP_ACL",
+ logging=True,
+ auth=True,
+ auth_key="15435A030726242723273C21181319000A",
+ key_id="10",
+ state="present",
+ )
+ )
+ commands = []
+ self.execute_module(changed=False, commands=commands)
+
+ def test_ios_ntp_config(self):
+ set_module_args(
+ dict(
+ server="10.75.33.5",
+ source_int="Vlan2",
+ acl="NTP_ACL",
+ logging=True,
+ auth=True,
+ auth_key="15435A030726242723273C21181319000A",
+ key_id="10",
+ state="present",
+ )
+ )
+ commands = ["ntp server 10.75.33.5", "ntp source Vlan2"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_ntp_remove(self):
+ set_module_args(
+ dict(
+ server="10.75.32.5",
+ source_int="Loopback0",
+ acl="NTP_ACL",
+ logging=True,
+ auth=True,
+ auth_key="15435A030726242723273C21181319000A",
+ key_id="10",
+ state="absent",
+ )
+ )
+ commands = [
+ "no ntp server 10.75.32.5",
+ "no ntp source Loopback0",
+ "no ntp access-group peer NTP_ACL",
+ "no ntp logging",
+ "no ntp authenticate",
+ "no ntp trusted-key 10",
+ "no ntp authentication-key 10 md5 15435A030726242723273C21181319000A 7",
+ ]
+ self.execute_module(changed=True, commands=commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ospf_interfaces.py
new file mode 100644
index 00000000..3a49a1bc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ospf_interfaces.py
@@ -0,0 +1,405 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_ospf_interfaces
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosOspfInterfacesModule(TestIosModule):
+ module = ios_ospf_interfaces
+
+ def setUp(self):
+ super(TestIosOspfInterfacesModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.ospf_interfaces.ospf_interfaces."
+ "Ospf_InterfacesFacts.get_ospf_interfaces_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosOspfInterfacesModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("ios_ospf_interfaces.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_ios_ospf_interfaces_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/2",
+ address_family=[
+ dict(
+ afi="ipv4",
+ bfd=True,
+ cost=dict(interface_cost=30),
+ network=dict(broadcast=True),
+ priority=60,
+ resync_timeout=90,
+ ttl_security=dict(hops=120),
+ authentication=dict(key_chain="test_key"),
+ ),
+ dict(
+ afi="ipv6",
+ bfd=True,
+ dead_interval=dict(time=100),
+ network=dict(manet=True),
+ priority=50,
+ ),
+ ],
+ ),
+ dict(
+ name="GigabitEthernet0/3",
+ address_family=[
+ dict(
+ afi="ipv4",
+ bfd=True,
+ cost=dict(interface_cost=50),
+ priority=50,
+ ttl_security=dict(hops=150),
+ )
+ ],
+ ),
+ ],
+ state="merged",
+ )
+ )
+ commands = [
+ "interface GigabitEthernet0/3",
+ "ip ospf bfd",
+ "ip ospf cost 50",
+ "ip ospf priority 50",
+ "ip ospf ttl-security hops 150",
+ "interface GigabitEthernet0/2",
+ "ip ospf authentication key-chain test_key",
+ "ip ospf bfd",
+ "ip ospf cost 30",
+ "ip ospf network broadcast",
+ "ip ospf priority 60",
+ "ip ospf resync-timeout 90",
+ "ip ospf ttl-security hops 120",
+ "ipv6 ospf bfd",
+ "ipv6 ospf dead-interval 100",
+ "ipv6 ospf network manet",
+ "ipv6 ospf priority 50",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_ios_ospf_interfaces_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_family=[
+ dict(
+ afi="ipv4",
+ adjacency=True,
+ cost=dict(interface_cost=30),
+ priority=40,
+ process=dict(id=10, area_id="20"),
+ ttl_security=dict(hops=50),
+ )
+ ],
+ name="GigabitEthernet0/2",
+ ),
+ dict(
+ address_family=[
+ dict(
+ afi="ipv6",
+ adjacency=True,
+ priority=20,
+ process=dict(id=55, area_id="105"),
+ transmit_delay=30,
+ )
+ ],
+ name="GigabitEthernet0/3",
+ ),
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_ospf_interfaces_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/3",
+ address_family=[
+ dict(
+ afi="ipv4",
+ bfd=True,
+ cost=dict(interface_cost=50),
+ priority=50,
+ ttl_security=dict(hops=150),
+ )
+ ],
+ )
+ ],
+ state="replaced",
+ )
+ )
+ commands = [
+ "interface GigabitEthernet0/3",
+ "ip ospf bfd",
+ "ip ospf cost 50",
+ "ip ospf priority 50",
+ "ip ospf ttl-security hops 150",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_ios_ospf_interfaces_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_family=[
+ dict(
+ afi="ipv4",
+ adjacency=True,
+ cost=dict(interface_cost=30),
+ priority=40,
+ process=dict(id=10, area_id="20"),
+ ttl_security=dict(hops=50),
+ )
+ ],
+ name="GigabitEthernet0/2",
+ ),
+ dict(
+ address_family=[
+ dict(
+ afi="ipv6",
+ adjacency=True,
+ priority=20,
+ process=dict(id=55, area_id="105"),
+ transmit_delay=30,
+ )
+ ],
+ name="GigabitEthernet0/3",
+ ),
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_ospf_interfaces_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_family=[
+ dict(
+ afi="ipv6",
+ manet=dict(cost=dict(percent=10)),
+ priority=40,
+ process=dict(id=10, area_id="20"),
+ transmit_delay=50,
+ )
+ ],
+ name="GigabitEthernet0/3",
+ )
+ ],
+ state="overridden",
+ )
+ )
+ commands = [
+ "interface GigabitEthernet0/2",
+ "no ip ospf 10 area 20",
+ "no ip ospf adjacency stagger disable",
+ "no ip ospf cost 30",
+ "no ip ospf priority 40",
+ "no ip ospf ttl-security hops 50",
+ "interface GigabitEthernet0/3",
+ "ipv6 ospf 10 area 20",
+ "no ipv6 ospf adjacency stagger disable",
+ "ipv6 ospf manet peering cost percent 10",
+ "ipv6 ospf priority 40",
+ "ipv6 ospf transmit-delay 50" "",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_ios_ospf_interfaces_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_family=[
+ dict(
+ afi="ipv4",
+ adjacency=True,
+ cost=dict(interface_cost=30),
+ priority=40,
+ process=dict(id=10, area_id="20"),
+ ttl_security=dict(hops=50),
+ )
+ ],
+ name="GigabitEthernet0/2",
+ ),
+ dict(
+ address_family=[
+ dict(
+ afi="ipv6",
+ adjacency=True,
+ priority=20,
+ process=dict(id=55, area_id="105"),
+ transmit_delay=30,
+ )
+ ],
+ name="GigabitEthernet0/3",
+ ),
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_ospf_interfaces_deleted_interface(self):
+ set_module_args(
+ dict(config=[dict(name="GigabitEthernet0/2")], state="deleted")
+ )
+ commands = [
+ "interface GigabitEthernet0/2",
+ "no ip ospf priority 40",
+ "no ip ospf adjacency stagger disable",
+ "no ip ospf ttl-security hops 50",
+ "no ip ospf 10 area 20",
+ "no ip ospf cost 30",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_ios_ospf_interfaces_deleted_all(self):
+ set_module_args(dict(config=[], state="deleted"))
+ commands = [
+ "interface GigabitEthernet0/3",
+ "no ipv6 ospf 55 area 105",
+ "no ipv6 ospf adjacency stagger disable",
+ "no ipv6 ospf priority 20",
+ "no ipv6 ospf transmit-delay 30",
+ "interface GigabitEthernet0/2",
+ "no ip ospf 10 area 20",
+ "no ip ospf adjacency stagger disable",
+ "no ip ospf cost 30",
+ "no ip ospf priority 40",
+ "no ip ospf ttl-security hops 50",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_ios_ospf_interfaces_rendered(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/2",
+ address_family=[
+ dict(
+ afi="ipv4",
+ bfd=True,
+ cost=dict(interface_cost=30),
+ network=dict(broadcast=True),
+ priority=60,
+ resync_timeout=90,
+ ttl_security=dict(hops=120),
+ ),
+ dict(
+ afi="ipv6",
+ bfd=True,
+ dead_interval=dict(time=100),
+ network=dict(manet=True),
+ priority=50,
+ ),
+ ],
+ ),
+ dict(
+ name="GigabitEthernet0/3",
+ address_family=[
+ dict(
+ afi="ipv4",
+ bfd=True,
+ cost=dict(interface_cost=50),
+ priority=50,
+ ttl_security=dict(hops=150),
+ )
+ ],
+ ),
+ ],
+ state="rendered",
+ )
+ )
+ commands = [
+ "interface GigabitEthernet0/3",
+ "ip ospf bfd",
+ "ip ospf cost 50",
+ "ip ospf priority 50",
+ "ip ospf ttl-security hops 150",
+ "interface GigabitEthernet0/2",
+ "ip ospf bfd",
+ "ip ospf cost 30",
+ "ip ospf network broadcast",
+ "ip ospf priority 60",
+ "ip ospf resync-timeout 90",
+ "ip ospf ttl-security hops 120",
+ "ipv6 ospf bfd",
+ "ipv6 ospf dead-interval 100",
+ "ipv6 ospf network manet",
+ "ipv6 ospf priority 50",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(sorted(result["rendered"]), sorted(commands))
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ospfv2.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ospfv2.py
new file mode 100644
index 00000000..97e9b81c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ospfv2.py
@@ -0,0 +1,353 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_ospfv2
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosOspfV2Module(TestIosModule):
+ module = ios_ospfv2
+
+ def setUp(self):
+ super(TestIosOspfV2Module, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.ospfv2.ospfv2."
+ "Ospfv2Facts.get_ospfv2_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosOspfV2Module, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("ios_ospfv2.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_ios_ospfv2_merged(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ auto_cost=dict(reference_bandwidth="4"),
+ distribute_list=dict(
+ acls=[
+ dict(direction="out", name="10"),
+ dict(direction="in", name="123"),
+ ]
+ ),
+ network=[
+ dict(
+ address="198.51.100.0",
+ wildcard_bits="0.0.0.255",
+ area=5,
+ ),
+ dict(
+ address="192.0.2.0",
+ wildcard_bits="0.0.0.255",
+ area=5,
+ ),
+ ],
+ domain_id=dict(
+ ip_address=dict(address="192.0.3.1")
+ ),
+ max_metric=dict(
+ on_startup=dict(time=100), router_lsa=True
+ ),
+ vrf="blue",
+ )
+ ]
+ ),
+ state="merged",
+ )
+ )
+ commands = [
+ "router ospf 100 vrf blue",
+ "auto-cost reference-bandwidth 4",
+ "distribute-list 123 in",
+ "distribute-list 10 out",
+ "network 198.51.100.0 0.0.0.255 area 5",
+ "network 192.0.2.0 0.0.0.255 area 5",
+ "domain-id 192.0.3.1",
+ "max-metric router-lsa on-startup 100",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_ios_ospfv2_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="200",
+ auto_cost=dict(reference_bandwidth="4"),
+ distribute_list=dict(
+ acls=[
+ dict(direction="out", name="10"),
+ dict(direction="in", name="123"),
+ ]
+ ),
+ domain_id=dict(
+ ip_address=dict(address="192.0.3.1")
+ ),
+ max_metric=dict(
+ on_startup=dict(time=100), router_lsa=True
+ ),
+ areas=[dict(area_id="10", capability=True)],
+ vrf="blue",
+ )
+ ]
+ ),
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_ospfv2_replaced(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="200",
+ auto_cost=dict(reference_bandwidth="4"),
+ domain_id=dict(
+ ip_address=dict(address="192.0.1.1")
+ ),
+ max_metric=dict(
+ on_startup=dict(time=200), router_lsa=True
+ ),
+ areas=[dict(area_id="10", capability=True)],
+ vrf="blue",
+ )
+ ]
+ ),
+ state="replaced",
+ )
+ )
+ commands = [
+ "router ospf 200 vrf blue",
+ "no distribute-list 123 in",
+ "no distribute-list 10 out",
+ "domain-id 192.0.1.1",
+ "max-metric router-lsa on-startup 200",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ #
+ def test_ios_ospfv2_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="200",
+ auto_cost=dict(reference_bandwidth="4"),
+ distribute_list=dict(
+ acls=[
+ dict(direction="out", name="10"),
+ dict(direction="in", name="123"),
+ ]
+ ),
+ domain_id=dict(
+ ip_address=dict(address="192.0.3.1")
+ ),
+ max_metric=dict(
+ on_startup=dict(time=100), router_lsa=True
+ ),
+ areas=[dict(area_id="10", capability=True)],
+ vrf="blue",
+ )
+ ]
+ ),
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_ospfv2_overridden(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="200",
+ auto_cost=dict(reference_bandwidth="4"),
+ domain_id=dict(
+ ip_address=dict(address="192.0.1.1")
+ ),
+ max_metric=dict(
+ on_startup=dict(time=200), router_lsa=True
+ ),
+ areas=[dict(area_id="10", capability=True)],
+ vrf="blue",
+ )
+ ]
+ ),
+ state="overridden",
+ )
+ )
+
+ commands = [
+ "router ospf 200 vrf blue",
+ "no distribute-list 10 out",
+ "no distribute-list 123 in",
+ "domain-id 192.0.1.1",
+ "max-metric router-lsa on-startup 200",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_ospfv2_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="200",
+ auto_cost=dict(reference_bandwidth="4"),
+ distribute_list=dict(
+ acls=[
+ dict(direction="out", name="10"),
+ dict(direction="in", name="123"),
+ ]
+ ),
+ domain_id=dict(
+ ip_address=dict(address="192.0.3.1")
+ ),
+ max_metric=dict(
+ on_startup=dict(time=100), router_lsa=True
+ ),
+ areas=[dict(area_id="10", capability=True)],
+ vrf="blue",
+ )
+ ]
+ ),
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_ospfv2_deleted(self):
+ set_module_args(
+ dict(
+ config=dict(processes=[dict(process_id="200", vrf="blue")]),
+ state="deleted",
+ )
+ )
+ commands = ["no router ospf 200 vrf blue"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_ospfv2_parsed(self):
+ set_module_args(
+ dict(
+ running_config="router ospf 1\n area 5 authentication\n area 5 capability default-exclusion",
+ state="parsed",
+ )
+ )
+ result = self.execute_module(changed=False)
+ parsed_list = {
+ "processes": [
+ {
+ "areas": [
+ {
+ "area_id": "5",
+ "authentication": {"enable": True},
+ "capability": True,
+ }
+ ],
+ "process_id": 1,
+ }
+ ]
+ }
+ self.assertEqual(parsed_list, result["parsed"])
+
+ def test_ios_ospfv2_rendered(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ vrf="blue",
+ auto_cost=dict(reference_bandwidth="4"),
+ distribute_list=dict(
+ acls=[
+ dict(direction="out", name="10"),
+ dict(direction="in", name="123"),
+ ]
+ ),
+ domain_id=dict(
+ ip_address=dict(address="192.0.3.1")
+ ),
+ max_metric=dict(
+ on_startup=dict(time=100), router_lsa=True
+ ),
+ )
+ ]
+ ),
+ state="rendered",
+ )
+ )
+ commands = [
+ "auto-cost reference-bandwidth 4",
+ "distribute-list 10 out",
+ "distribute-list 123 in",
+ "domain-id 192.0.3.1",
+ "max-metric router-lsa on-startup 100",
+ "router ospf 100 vrf blue",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(sorted(result["rendered"]), commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ospfv3.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ospfv3.py
new file mode 100644
index 00000000..bacbc3fa
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ospfv3.py
@@ -0,0 +1,427 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_ospfv3
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosOspfV3Module(TestIosModule):
+ module = ios_ospfv3
+
+ def setUp(self):
+ super(TestIosOspfV3Module, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.ospfv3.ospfv3."
+ "Ospfv3Facts.get_ospfv3_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosOspfV3Module, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("ios_ospfv3.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_ios_ospfv3_merged(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="1",
+ auto_cost=dict(reference_bandwidth="4"),
+ areas=[dict(area_id=10, default_cost=10)],
+ address_family=[
+ dict(
+ afi="ipv4",
+ unicast=True,
+ vrf="blue",
+ adjacency=dict(
+ min_adjacency=100, max_adjacency=100
+ ),
+ )
+ ],
+ )
+ ]
+ ),
+ state="merged",
+ )
+ )
+ commands = [
+ "router ospfv3 1",
+ "auto-cost reference-bandwidth 4",
+ "area 10 default-cost 10",
+ "address-family ipv4 unicast vrf blue",
+ "adjacency stagger 100 100",
+ "exit-address-family",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_ios_ospfv3_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="1",
+ max_metric=dict(
+ router_lsa=True, on_startup=dict(time=110)
+ ),
+ areas=[
+ dict(
+ area_id=10,
+ nssa=dict(
+ default_information_originate=dict(
+ metric=10
+ )
+ ),
+ )
+ ],
+ address_family=[
+ dict(
+ afi="ipv4",
+ unicast=True,
+ vrf="blue",
+ adjacency=dict(
+ min_adjacency=50, max_adjacency=50
+ ),
+ areas=[
+ dict(
+ area_id=25,
+ nssa=dict(
+ default_information_originate=dict(
+ metric=25, nssa_only=True
+ )
+ ),
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_ospfv3_replaced(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="1",
+ max_metric=dict(
+ router_lsa=True, on_startup=dict(time=100)
+ ),
+ address_family=[
+ dict(
+ afi="ipv4",
+ unicast=True,
+ vrf="blue",
+ adjacency=dict(
+ min_adjacency=100, max_adjacency=100
+ ),
+ )
+ ],
+ )
+ ]
+ ),
+ state="replaced",
+ )
+ )
+ commands = [
+ "router ospfv3 1",
+ "max-metric router-lsa on-startup 100",
+ "no area 10 nssa default-information-originate metric 10",
+ "address-family ipv4 unicast vrf blue",
+ "adjacency stagger 100 100",
+ "exit-address-family",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ #
+ def test_ios_ospfv3_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="1",
+ max_metric=dict(
+ router_lsa=True, on_startup=dict(time=110)
+ ),
+ areas=[
+ dict(
+ area_id=10,
+ nssa=dict(
+ default_information_originate=dict(
+ metric=10
+ )
+ ),
+ )
+ ],
+ address_family=[
+ dict(
+ afi="ipv4",
+ unicast=True,
+ vrf="blue",
+ adjacency=dict(
+ min_adjacency=50, max_adjacency=50
+ ),
+ areas=[
+ dict(
+ area_id=25,
+ nssa=dict(
+ default_information_originate=dict(
+ metric=25, nssa_only=True
+ )
+ ),
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_ospfv3_overridden(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="200",
+ max_metric=dict(
+ router_lsa=True, on_startup=dict(time=200)
+ ),
+ areas=[
+ dict(
+ area_id=10,
+ nssa=dict(
+ default_information_originate=dict(
+ metric=10
+ )
+ ),
+ )
+ ],
+ address_family=[
+ dict(
+ afi="ipv4",
+ unicast=True,
+ adjacency=dict(
+ min_adjacency=50, max_adjacency=50
+ ),
+ areas=[
+ dict(
+ area_id=200,
+ nssa=dict(
+ default_information_originate=dict(
+ metric=200, nssa_only=True
+ )
+ ),
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ state="overridden",
+ )
+ )
+
+ commands = [
+ "no router ospfv3 1",
+ "router ospfv3 200",
+ "max-metric router-lsa on-startup 200",
+ "area 10 nssa default-information-originate metric 10",
+ "address-family ipv4 unicast",
+ "adjacency stagger 50 50",
+ "area 200 nssa default-information-originate metric 200 nssa-only",
+ "exit-address-family",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_ospfv3_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="1",
+ max_metric=dict(
+ router_lsa=True, on_startup=dict(time=110)
+ ),
+ areas=[
+ dict(
+ area_id=10,
+ nssa=dict(
+ default_information_originate=dict(
+ metric=10
+ )
+ ),
+ )
+ ],
+ address_family=[
+ dict(
+ afi="ipv4",
+ unicast=True,
+ vrf="blue",
+ adjacency=dict(
+ min_adjacency=50, max_adjacency=50
+ ),
+ areas=[
+ dict(
+ area_id=25,
+ nssa=dict(
+ default_information_originate=dict(
+ metric=25, nssa_only=True
+ )
+ ),
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_ios_ospfv3_deleted(self):
+ set_module_args(
+ dict(
+ config=dict(processes=[dict(process_id="1")]), state="deleted"
+ )
+ )
+ commands = ["no router ospfv3 1"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_ospfv3_parsed(self):
+ set_module_args(
+ dict(running_config="router ospfv3 1\n area 5", state="parsed")
+ )
+ result = self.execute_module(changed=False)
+ parsed_list = {
+ "processes": [{"areas": [{"area_id": "5"}], "process_id": 1}]
+ }
+ self.assertEqual(parsed_list, result["parsed"])
+
+ def test_ios_ospfv3_rendered(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="1",
+ max_metric=dict(
+ router_lsa=True, on_startup=dict(time=110)
+ ),
+ areas=[
+ dict(
+ area_id=10,
+ nssa=dict(
+ default_information_originate=dict(
+ metric=10
+ )
+ ),
+ )
+ ],
+ address_family=[
+ dict(
+ afi="ipv4",
+ unicast=True,
+ vrf="blue",
+ adjacency=dict(
+ min_adjacency=50, max_adjacency=50
+ ),
+ areas=[
+ dict(
+ area_id=25,
+ nssa=dict(
+ default_information_originate=dict(
+ metric=25, nssa_only=True
+ )
+ ),
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ state="rendered",
+ )
+ )
+ commands = [
+ "address-family ipv4 unicast vrf blue",
+ "adjacency stagger 50 50",
+ "area 10 nssa default-information-originate metric 10",
+ "area 25 nssa default-information-originate metric 25 nssa-only",
+ "exit-address-family",
+ "max-metric router-lsa on-startup 110",
+ "router ospfv3 1",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(sorted(result["rendered"]), commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ping.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ping.py
new file mode 100644
index 00000000..72e45e9d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_ping.py
@@ -0,0 +1,90 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_ping
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosPingModule(TestIosModule):
+ """ Class used for Unit Tests agains ios_ping module """
+
+ module = ios_ping
+
+ def setUp(self):
+ super(TestIosPingModule, self).setUp()
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_ping.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ def tearDown(self):
+ super(TestIosPingModule, self).tearDown()
+ self.mock_run_commands.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ commands = kwargs["commands"]
+ output = list()
+
+ for command in commands:
+ filename = str(command).split(" | ")[0].replace(" ", "_")
+ output.append(load_fixture("ios_ping_%s" % filename))
+ return output
+
+ self.run_commands.side_effect = load_from_file
+
+ def test_ios_ping_expected_success(self):
+ """ Test for successful pings when destination should be reachable """
+ set_module_args(dict(count=2, dest="8.8.8.8"))
+ self.execute_module()
+
+ def test_ios_ping_expected_failure(self):
+ """ Test for unsuccessful pings when destination should not be reachable """
+ set_module_args(dict(count=2, dest="10.255.255.250", state="absent"))
+ self.execute_module()
+
+ def test_ios_ping_unexpected_success(self):
+ """ Test for successful pings when destination should not be reachable - FAIL. """
+ set_module_args(dict(count=2, dest="8.8.8.8", state="absent"))
+ self.execute_module(failed=True)
+
+ def test_ios_ping_unexpected_failure(self):
+ """ Test for unsuccessful pings when destination should be reachable - FAIL. """
+ set_module_args(dict(count=2, dest="10.255.255.250"))
+ self.execute_module(failed=True)
+
+ def test_ios_ping_with_size(self):
+ """ Test for successful pings using size option. """
+ set_module_args(dict(size=1400, dest="8.8.8.8"))
+ commands = ["ping 8.8.8.8 size 1400"]
+ self.execute_module(commands=commands)
+
+ def test_ios_ping_with_size_df_bit(self):
+ """ Test for successful pings using size and df-bit options. """
+ set_module_args(dict(size=1400, df_bit=True, dest="8.8.8.8"))
+ commands = ["ping 8.8.8.8 size 1400 df-bit"]
+ self.execute_module(commands=commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_static_routes.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_static_routes.py
new file mode 100644
index 00000000..624ff16d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_static_routes.py
@@ -0,0 +1,707 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_static_routes
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosStaticRoutesModule(TestIosModule):
+ module = ios_static_routes
+
+ def setUp(self):
+ super(TestIosStaticRoutesModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.static_routes.static_routes."
+ "Static_RoutesFacts.get_static_routes_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosStaticRoutesModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None, transport="cli"):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("ios_static_routes_config.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_ios_static_routes_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.0 255.255.255.0",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.1",
+ name="test_vrf",
+ tag=50,
+ track=150,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="198.51.100.0 255.255.255.0",
+ next_hops=[
+ dict(
+ forward_router_address="198.51.101.1",
+ name="route_1",
+ distance_metric=110,
+ tag=40,
+ multicast=True,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ ],
+ state="merged",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 150 tag 50",
+ "ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 40",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_static_routes_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="0.0.0.0/0",
+ next_hops=[
+ dict(
+ forward_router_address="198.51.101.1",
+ name="test_vrf_1",
+ tag=100,
+ track=150,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.0/24",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.1",
+ name="test_vrf_2",
+ tag=50,
+ track=175,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.51.110.0/32",
+ next_hops=[
+ dict(
+ distance_metric=10,
+ forward_router_address="192.51.111.1",
+ interface="GigabitEthernet0/2",
+ name="partner",
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="198.51.100.0/24",
+ next_hops=[
+ dict(
+ forward_router_address="198.51.101.1",
+ name="route_1",
+ distance_metric=110,
+ tag=60,
+ multicast=True,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ dict(
+ address_families=[
+ dict(
+ afi="ipv6",
+ routes=[
+ dict(
+ dest="2001:DB8:0:3::/64",
+ next_hops=[
+ dict(
+ forward_router_address="2001:DB8:0:3::2",
+ interface="GigabitEthernet0/2",
+ name="test_v6",
+ tag=105,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_ios_static_routes_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.0 255.255.255.0",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.1",
+ name="replaced_vrf",
+ tag=10,
+ track=170,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="198.51.100.0 255.255.255.0",
+ next_hops=[
+ dict(
+ forward_router_address="198.51.101.1",
+ name="replaced_route_1",
+ distance_metric=110,
+ tag=60,
+ multicast=True,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ ],
+ state="replaced",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name replaced_vrf track 170 tag 10",
+ "ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name replaced_route_1 tag 60",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_static_routes_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="0.0.0.0/0",
+ next_hops=[
+ dict(
+ forward_router_address="198.51.101.1",
+ name="test_vrf_1",
+ tag=100,
+ track=150,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.0/24",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.1",
+ name="test_vrf_2",
+ tag=50,
+ track=175,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.51.110.0/32",
+ next_hops=[
+ dict(
+ distance_metric=10,
+ forward_router_address="192.51.111.1",
+ interface="GigabitEthernet0/2",
+ name="partner",
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="198.51.100.0/24",
+ next_hops=[
+ dict(
+ forward_router_address="198.51.101.1",
+ name="route_1",
+ distance_metric=110,
+ tag=60,
+ multicast=True,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ dict(
+ address_families=[
+ dict(
+ afi="ipv6",
+ routes=[
+ dict(
+ dest="2001:DB8:0:3::/64",
+ next_hops=[
+ dict(
+ forward_router_address="2001:DB8:0:3::2",
+ interface="GigabitEthernet0/2",
+ name="test_v6",
+ tag=105,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_ios_static_routes_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="198.51.100.0 255.255.255.0",
+ next_hops=[
+ dict(
+ forward_router_address="198.51.101.1",
+ name="override_route_1",
+ distance_metric=150,
+ tag=50,
+ multicast=True,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ )
+ ],
+ state="overridden",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 60",
+ "no ip route vrf ansible_vrf 0.0.0.0 0.0.0.0 198.51.101.1 name test_vrf_1 track 150 tag 100",
+ "no ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf_2 track 175 tag 50",
+ "no ip route vrf ansible_vrf 192.51.110.0 255.255.255.255 GigabitEthernet0/2 192.51.111.1 10 name partner",
+ "no ipv6 route 2001:DB8:0:3::/64 GigabitEthernet0/2 2001:DB8:0:3::2 name test_v6 tag 105",
+ "ip route 198.51.100.0 255.255.255.0 198.51.101.1 150 multicast name override_route_1 tag 50",
+ ]
+
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_static_routes_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="0.0.0.0/0",
+ next_hops=[
+ dict(
+ forward_router_address="198.51.101.1",
+ name="test_vrf_1",
+ tag=100,
+ track=150,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.0/24",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.1",
+ name="test_vrf_2",
+ tag=50,
+ track=175,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.51.110.0/32",
+ next_hops=[
+ dict(
+ distance_metric=10,
+ forward_router_address="192.51.111.1",
+ interface="GigabitEthernet0/2",
+ name="partner",
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="198.51.100.0/24",
+ next_hops=[
+ dict(
+ forward_router_address="198.51.101.1",
+ name="route_1",
+ distance_metric=110,
+ tag=60,
+ multicast=True,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ dict(
+ address_families=[
+ dict(
+ afi="ipv6",
+ routes=[
+ dict(
+ dest="2001:DB8:0:3::/64",
+ next_hops=[
+ dict(
+ forward_router_address="2001:DB8:0:3::2",
+ interface="GigabitEthernet0/2",
+ name="test_v6",
+ tag=105,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_ios_delete_static_route_config(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.0/24",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.1",
+ name="test_vrf",
+ tag=50,
+ track=175,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="198.51.100.0/24",
+ next_hops=[
+ dict(
+ forward_router_address="198.51.101.1",
+ name="route_1",
+ distance_metric=110,
+ tag=60,
+ multicast=True,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ ],
+ state="deleted",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "no ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 175 tag 50",
+ "no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 60",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_delete_static_route_dest_based(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[dict(dest="198.51.100.0/24")],
+ )
+ ]
+ )
+ ],
+ state="deleted",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "no ip route 198.51.100.0 255.255.255.0 198.51.101.1 110 multicast name route_1 tag 60"
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_delete_static_route_vrf_based(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4", routes=[dict(dest="192.0.2.0/24")]
+ )
+ ],
+ )
+ ],
+ state="deleted",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "no ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf_2 track 175 tag 50"
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_static_route_rendered(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="ansible_vrf",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.0/24",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.1",
+ name="test_vrf",
+ tag=50,
+ track=175,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="rendered",
+ )
+ )
+ commands = [
+ "ip route vrf ansible_vrf 192.0.2.0 255.255.255.0 192.0.2.1 name test_vrf track 175 tag 50"
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(sorted(result["rendered"]), commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_system.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_system.py
new file mode 100644
index 00000000..6c62d39f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_system.py
@@ -0,0 +1,155 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_system
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosSystemModule(TestIosModule):
+
+ module = ios_system
+
+ def setUp(self):
+ super(TestIosSystemModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_system.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_system.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestIosSystemModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None):
+ self.get_config.return_value = load_fixture("ios_system_config.cfg")
+ self.load_config.return_value = None
+
+ def test_ios_system_hostname_changed(self):
+ set_module_args(dict(hostname="foo"))
+ commands = ["hostname foo"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_system_domain_name(self):
+ set_module_args(dict(domain_name=["test.com"]))
+ commands = [
+ "ip domain name test.com",
+ "no ip domain name eng.example.net",
+ "no ip domain name vrf management eng.example.net",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_system_domain_name_complex(self):
+ set_module_args(
+ dict(
+ domain_name=[
+ {"name": "test.com", "vrf": "test"},
+ {"name": "eng.example.net"},
+ ]
+ )
+ )
+ commands = [
+ "ip domain name vrf test test.com",
+ "no ip domain name vrf management eng.example.net",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_system_domain_search(self):
+ set_module_args(dict(domain_search=["ansible.com", "redhat.com"]))
+ commands = [
+ "no ip domain list vrf management example.net",
+ "no ip domain list example.net",
+ "no ip domain list example.com",
+ "ip domain list ansible.com",
+ "ip domain list redhat.com",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_system_domain_search_complex(self):
+ set_module_args(
+ dict(domain_search=[{"name": "ansible.com", "vrf": "test"}])
+ )
+ commands = [
+ "no ip domain list vrf management example.net",
+ "no ip domain list example.net",
+ "no ip domain list example.com",
+ "ip domain list vrf test ansible.com",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_system_lookup_source(self):
+ set_module_args(dict(lookup_source="Ethernet1"))
+ commands = ["ip domain lookup source-interface Ethernet1"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_system_name_servers(self):
+ name_servers = ["8.8.8.8", "8.8.4.4"]
+ set_module_args(dict(name_servers=name_servers))
+ commands = [
+ "no ip name-server vrf management 8.8.8.8",
+ "ip name-server 8.8.4.4",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def rest_ios_system_name_servers_complex(self):
+ name_servers = dict(server="8.8.8.8", vrf="test")
+ set_module_args(dict(name_servers=name_servers))
+ commands = [
+ "no name-server 8.8.8.8",
+ "no name-server vrf management 8.8.8.8",
+ "ip name-server vrf test 8.8.8.8",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_system_state_absent(self):
+ set_module_args(dict(state="absent"))
+ commands = [
+ "no hostname",
+ "no ip domain lookup source-interface GigabitEthernet0/0",
+ "no ip domain list vrf management",
+ "no ip domain list",
+ "no ip domain name vrf management",
+ "no ip domain name",
+ "no ip name-server vrf management",
+ "no ip name-server",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_system_no_change(self):
+ set_module_args(dict(hostname="ios01"))
+ self.execute_module(commands=[])
+
+ def test_ios_system_missing_vrf(self):
+ name_servers = dict(server="8.8.8.8", vrf="missing")
+ set_module_args(dict(name_servers=name_servers))
+ self.execute_module(failed=True)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_user.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_user.py
new file mode 100644
index 00000000..e24542d5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_user.py
@@ -0,0 +1,170 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_user
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosUserModule(TestIosModule):
+
+ module = ios_user
+
+ def setUp(self):
+ super(TestIosUserModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_user.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_user.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestIosUserModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, transport="cli"):
+ self.get_config.return_value = load_fixture("ios_user_config.cfg")
+ self.load_config.return_value = dict(diff=None, session="session")
+
+ def test_ios_user_create(self):
+ set_module_args(dict(name="test", nopassword=True))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["username test nopassword"])
+
+ def test_ios_user_delete(self):
+ set_module_args(dict(name="ansible", state="absent"))
+ result = self.execute_module(changed=True)
+ cmds = [
+ {
+ "command": "no username ansible",
+ "answer": "y",
+ "newline": False,
+ "prompt": "This operation will remove all username related configurations with same name",
+ }
+ ]
+
+ result_cmd = []
+ for i in result["commands"]:
+ result_cmd.append(i)
+
+ self.assertEqual(result_cmd, cmds)
+
+ def test_ios_user_password(self):
+ set_module_args(dict(name="ansible", configured_password="test"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["username ansible secret test"])
+
+ def test_ios_user_privilege(self):
+ set_module_args(dict(name="ansible", privilege=15))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["username ansible privilege 15"])
+
+ def test_ios_user_privilege_invalid(self):
+ set_module_args(dict(name="ansible", privilege=25))
+ self.execute_module(failed=True)
+
+ def test_ios_user_purge(self):
+ set_module_args(dict(purge=True))
+ result = self.execute_module(changed=True)
+ cmd = {
+ "command": "no username ansible",
+ "answer": "y",
+ "newline": False,
+ "prompt": "This operation will remove all username related configurations with same name",
+ }
+
+ result_cmd = []
+ for i in result["commands"]:
+ result_cmd.append(i)
+
+ self.assertEqual(result_cmd, [cmd])
+
+ def test_ios_user_view(self):
+ set_module_args(dict(name="ansible", view="test"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["username ansible view test"])
+
+ def test_ios_user_update_password_changed(self):
+ set_module_args(
+ dict(
+ name="test",
+ configured_password="test",
+ update_password="on_create",
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["username test secret test"])
+
+ def test_ios_user_update_password_on_create_ok(self):
+ set_module_args(
+ dict(
+ name="ansible",
+ configured_password="test",
+ update_password="on_create",
+ )
+ )
+ self.execute_module()
+
+ def test_ios_user_update_password_always(self):
+ set_module_args(
+ dict(
+ name="ansible",
+ configured_password="test",
+ update_password="always",
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["username ansible secret test"])
+
+ def test_ios_user_set_sshkey(self):
+ set_module_args(dict(name="ansible", sshkey="dGVzdA=="))
+ commands = [
+ "ip ssh pubkey-chain",
+ "username ansible",
+ "key-hash ssh-rsa 098F6BCD4621D373CADE4E832627B4F6",
+ "exit",
+ "exit",
+ ]
+ result = self.execute_module(changed=True, commands=commands)
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_user_set_sshkey_multiple(self):
+ set_module_args(dict(name="ansible", sshkey=["dGVzdA==", "eHWacB2=="]))
+ commands = [
+ "ip ssh pubkey-chain",
+ "username ansible",
+ "key-hash ssh-rsa 098F6BCD4621D373CADE4E832627B4F6",
+ "key-hash ssh-rsa A019918340A1E9183388D9A675603036",
+ "exit",
+ "exit",
+ ]
+ result = self.execute_module(changed=True, commands=commands)
+ self.assertEqual(result["commands"], commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_vlan.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_vlan.py
new file mode 100644
index 00000000..ae18be6a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_vlan.py
@@ -0,0 +1,161 @@
+# (c) 2018 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_vlan
+from ansible_collections.cisco.ios.plugins.modules.ios_vlan import (
+ parse_vlan_brief,
+)
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosVlanModule(TestIosModule):
+
+ module = ios_vlan
+
+ def setUp(self):
+ super(TestIosVlanModule, self).setUp()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_vlan.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_vlan.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestIosVlanModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, transport="cli"):
+ self.run_commands.return_value = [load_fixture("ios_vlan_config.cfg")]
+ self.load_config.return_value = {"diff": None, "session": "session"}
+
+ def test_ios_vlan_create(self):
+ set_module_args({"vlan_id": "3", "name": "test", "state": "present"})
+ result = self.execute_module(changed=True)
+ expected_commands = ["vlan 3", "name test"]
+ self.assertEqual(result["commands"], expected_commands)
+
+ def test_ios_vlan_id_startwith_9(self):
+ set_module_args({"vlan_id": "9", "name": "vlan9", "state": "present"})
+ result = self.execute_module(changed=False)
+ expected_commands = []
+ self.assertEqual(result["commands"], expected_commands)
+
+ def test_ios_vlan_rename(self):
+ set_module_args({"vlan_id": "2", "name": "test", "state": "present"})
+ result = self.execute_module(changed=True)
+ expected_commands = ["vlan 2", "name test"]
+ self.assertEqual(result["commands"], expected_commands)
+
+ def test_ios_vlan_with_interfaces(self):
+ set_module_args(
+ {
+ "vlan_id": "2",
+ "name": "vlan2",
+ "state": "present",
+ "interfaces": ["GigabitEthernet1/0/8", "GigabitEthernet1/0/7"],
+ }
+ )
+ result = self.execute_module(changed=True)
+ expected_commands = [
+ "vlan 2",
+ "interface GigabitEthernet1/0/8",
+ "switchport mode access",
+ "switchport access vlan 2",
+ "vlan 2",
+ "interface GigabitEthernet1/0/6",
+ "switchport mode access",
+ "no switchport access vlan 2",
+ ]
+ self.assertEqual(result["commands"], expected_commands)
+
+ def test_ios_vlan_with_interfaces_and_newvlan(self):
+ set_module_args(
+ {
+ "vlan_id": "3",
+ "name": "vlan3",
+ "state": "present",
+ "interfaces": ["GigabitEthernet1/0/8", "GigabitEthernet1/0/7"],
+ }
+ )
+ result = self.execute_module(changed=True)
+ expected_commands = [
+ "vlan 3",
+ "name vlan3",
+ "interface GigabitEthernet1/0/8",
+ "switchport mode access",
+ "switchport access vlan 3",
+ "interface GigabitEthernet1/0/7",
+ "switchport mode access",
+ "switchport access vlan 3",
+ ]
+ self.assertEqual(result["commands"], expected_commands)
+
+ def test_parse_vlan_brief(self):
+ result = parse_vlan_brief(load_fixture("ios_vlan_config.cfg"))
+ obj = [
+ {
+ "name": "default",
+ "interfaces": [
+ "GigabitEthernet1/0/4",
+ "GigabitEthernet1/0/5",
+ "GigabitEthernet1/0/52",
+ "GigabitEthernet1/0/54",
+ ],
+ "state": "active",
+ "vlan_id": "1",
+ },
+ {
+ "name": "vlan2",
+ "interfaces": ["GigabitEthernet1/0/6", "GigabitEthernet1/0/7"],
+ "state": "active",
+ "vlan_id": "2",
+ },
+ {
+ "name": "vlan9",
+ "interfaces": ["GigabitEthernet1/0/6"],
+ "state": "active",
+ "vlan_id": "9",
+ },
+ {
+ "name": "fddi-default",
+ "interfaces": [],
+ "state": "act/unsup",
+ "vlan_id": "1002",
+ },
+ {
+ "name": "fddo-default",
+ "interfaces": [],
+ "state": "act/unsup",
+ "vlan_id": "1003",
+ },
+ ]
+ self.assertEqual(result, obj)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_vlans.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_vlans.py
new file mode 100644
index 00000000..0e6744f9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_vlans.py
@@ -0,0 +1,385 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_vlans
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosVlansModule(TestIosModule):
+ module = ios_vlans
+
+ def setUp(self):
+ super(TestIosVlansModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.ios.plugins.module_utils.network.ios.facts.vlans.vlans."
+ "VlansFacts.get_vlans_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosVlansModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None, transport="cli"):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("ios_vlans_config.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_ios_vlans_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="test_vlan_200",
+ state="active",
+ shutdown="disabled",
+ remote_span=True,
+ vlan_id=200,
+ )
+ ],
+ state="merged",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "vlan 200",
+ "name test_vlan_200",
+ "state active",
+ "remote-span",
+ "no shutdown",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_vlans_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ mtu=1500,
+ name="default",
+ shutdown="disabled",
+ state="active",
+ vlan_id=1,
+ ),
+ dict(
+ mtu=610,
+ name="RemoteIsInMyName",
+ shutdown="enabled",
+ state="active",
+ vlan_id=123,
+ ),
+ dict(
+ mtu=1500,
+ name="VLAN0150",
+ remote_span=True,
+ shutdown="disabled",
+ state="active",
+ vlan_id=150,
+ ),
+ dict(
+ mtu=1500,
+ name="a_very_long_vlan_name_a_very_long_vlan_name",
+ shutdown="disabled",
+ state="active",
+ vlan_id=888,
+ ),
+ dict(
+ mtu=1500,
+ name="fddi-default",
+ shutdown="enabled",
+ state="active",
+ vlan_id=1002,
+ ),
+ dict(
+ mtu=4472,
+ name="trcrf-default",
+ shutdown="enabled",
+ state="active",
+ vlan_id=1003,
+ ),
+ dict(
+ mtu=1500,
+ name="fddinet-default",
+ shutdown="enabled",
+ state="active",
+ vlan_id=1004,
+ ),
+ dict(
+ mtu=4472,
+ name="trbrf-default",
+ shutdown="enabled",
+ state="active",
+ vlan_id=1005,
+ ),
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_ios_vlans_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="test_vlan_200",
+ state="active",
+ shutdown="disabled",
+ remote_span=True,
+ vlan_id=200,
+ )
+ ],
+ state="replaced",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "vlan 200",
+ "name test_vlan_200",
+ "state active",
+ "remote-span",
+ "no shutdown",
+ ]
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_vlans_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ mtu=1500,
+ name="default",
+ shutdown="disabled",
+ state="active",
+ vlan_id=1,
+ ),
+ dict(
+ mtu=610,
+ name="RemoteIsInMyName",
+ shutdown="enabled",
+ state="active",
+ vlan_id=123,
+ ),
+ dict(
+ mtu=1500,
+ name="VLAN0150",
+ remote_span=True,
+ shutdown="disabled",
+ state="active",
+ vlan_id=150,
+ ),
+ dict(
+ mtu=1500,
+ name="a_very_long_vlan_name_a_very_long_vlan_name",
+ shutdown="disabled",
+ state="active",
+ vlan_id=888,
+ ),
+ dict(
+ mtu=1500,
+ name="fddi-default",
+ shutdown="enabled",
+ state="active",
+ vlan_id=1002,
+ ),
+ dict(
+ mtu=4472,
+ name="trcrf-default",
+ shutdown="enabled",
+ state="active",
+ vlan_id=1003,
+ ),
+ dict(
+ mtu=1500,
+ name="fddinet-default",
+ shutdown="enabled",
+ state="active",
+ vlan_id=1004,
+ ),
+ dict(
+ mtu=4472,
+ name="trbrf-default",
+ shutdown="enabled",
+ state="active",
+ vlan_id=1005,
+ ),
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_ios_vlans_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="test_vlan_200",
+ state="active",
+ shutdown="disabled",
+ remote_span=True,
+ vlan_id=200,
+ )
+ ],
+ state="overridden",
+ )
+ )
+ result = self.execute_module(changed=True)
+ commands = [
+ "no vlan 123",
+ "no vlan 150",
+ "no vlan 888",
+ "vlan 200",
+ "name test_vlan_200",
+ "state active",
+ "remote-span",
+ "no shutdown",
+ ]
+
+ self.assertEqual(result["commands"], commands)
+
+ def test_ios_vlans_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ mtu=1500,
+ name="default",
+ shutdown="disabled",
+ state="active",
+ vlan_id=1,
+ ),
+ dict(
+ mtu=610,
+ name="RemoteIsInMyName",
+ shutdown="enabled",
+ state="active",
+ vlan_id=123,
+ ),
+ dict(
+ mtu=1500,
+ name="VLAN0150",
+ remote_span=True,
+ shutdown="disabled",
+ state="active",
+ vlan_id=150,
+ ),
+ dict(
+ mtu=1500,
+ name="a_very_long_vlan_name_a_very_long_vlan_name",
+ shutdown="disabled",
+ state="active",
+ vlan_id=888,
+ ),
+ dict(
+ mtu=1500,
+ name="fddi-default",
+ shutdown="enabled",
+ state="active",
+ vlan_id=1002,
+ ),
+ dict(
+ mtu=4472,
+ name="trcrf-default",
+ shutdown="enabled",
+ state="active",
+ vlan_id=1003,
+ ),
+ dict(
+ mtu=1500,
+ name="fddinet-default",
+ shutdown="enabled",
+ state="active",
+ vlan_id=1004,
+ ),
+ dict(
+ mtu=4472,
+ name="trbrf-default",
+ shutdown="enabled",
+ state="active",
+ vlan_id=1005,
+ ),
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=True)
+
+ def test_ios_delete_vlans_config(self):
+ set_module_args(dict(config=[dict(vlan_id=150)], state="deleted"))
+ result = self.execute_module(changed=True)
+ commands = ["no vlan 150"]
+ self.assertEqual(result["commands"], commands)
+
+ def test_vlans_rendered(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="test_vlan_200",
+ state="active",
+ shutdown="disabled",
+ remote_span=True,
+ vlan_id=200,
+ )
+ ],
+ state="rendered",
+ )
+ )
+ commands = [
+ "name test_vlan_200",
+ "no shutdown",
+ "remote-span",
+ "state active",
+ "vlan 200",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(sorted(result["rendered"]), commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_vrf.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_vrf.py
new file mode 100644
index 00000000..f09376c2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/network/ios/test_ios_vrf.py
@@ -0,0 +1,420 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible_collections.cisco.ios.plugins.modules import ios_vrf
+from ansible_collections.cisco.ios.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .ios_module import TestIosModule, load_fixture
+
+
+class TestIosVrfModule(TestIosModule):
+ module = ios_vrf
+
+ def setUp(self):
+ super(TestIosVrfModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_vrf.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_vrf.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_exec_command = patch(
+ "ansible_collections.cisco.ios.plugins.modules.ios_vrf.exec_command"
+ )
+ self.exec_command = self.mock_exec_command.start()
+
+ def tearDown(self):
+ super(TestIosVrfModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_exec_command.stop()
+
+ def load_fixtures(self, commands=None):
+ self.get_config.return_value = load_fixture("ios_vrf_config.cfg")
+ self.exec_command.return_value = (
+ 0,
+ load_fixture("ios_vrf_config.cfg").strip(),
+ None,
+ )
+ self.load_config.return_value = None
+
+ def test_ios_vrf_name(self):
+ set_module_args(dict(name="test_4"))
+ commands = ["vrf definition test_4"]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_name_unchanged(self):
+ set_module_args(
+ dict(name="test_1", rd="1:100", description="test vrf 1")
+ )
+ self.execute_module()
+
+ def test_ios_vrf_description(self):
+ set_module_args(dict(name="test_1", description="test string"))
+ commands = ["vrf definition test_1", "description test string"]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_rd(self):
+ set_module_args(dict(name="test_1", rd="2:100"))
+ commands = ["vrf definition test_1", "rd 2:100"]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_interfaces(self):
+ set_module_args(dict(name="test_1", interfaces=["Ethernet1"]))
+ commands = [
+ "interface Ethernet2",
+ "no vrf forwarding test_1",
+ "interface Ethernet1",
+ "vrf forwarding test_1",
+ "ip address 1.2.3.4/5",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_state_absent(self):
+ set_module_args(dict(name="test_1", state="absent"))
+ commands = ["no vrf definition test_1"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_vrf_purge_all(self):
+ set_module_args(dict(purge=True))
+ commands = [
+ "no vrf definition test_1",
+ "no vrf definition test_2",
+ "no vrf definition test_3",
+ "no vrf definition test_17",
+ "no vrf definition test_18",
+ "no vrf definition test_19",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_vrf_purge_all_but_one(self):
+ set_module_args(dict(name="test_1", purge=True))
+ commands = [
+ "no vrf definition test_2",
+ "no vrf definition test_3",
+ "no vrf definition test_17",
+ "no vrf definition test_18",
+ "no vrf definition test_19",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_vrfs_no_purge(self):
+ vrfs = [{"name": "test_1"}, {"name": "test_4"}]
+ set_module_args(dict(vrfs=vrfs))
+ commands = ["vrf definition test_4"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_vrfs_purge(self):
+ vrfs = [{"name": "test_1"}, {"name": "test_4"}]
+ set_module_args(dict(vrfs=vrfs, purge=True))
+ commands = [
+ "vrf definition test_4",
+ "no vrf definition test_2",
+ "no vrf definition test_3",
+ "no vrf definition test_17",
+ "no vrf definition test_18",
+ "no vrf definition test_19",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_ios_vrfs_global_arg(self):
+ vrfs = [{"name": "test_1"}, {"name": "test_2"}]
+ set_module_args(dict(vrfs=vrfs, description="test string"))
+ commands = [
+ "vrf definition test_1",
+ "description test string",
+ "vrf definition test_2",
+ "description test string",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrfs_local_override_description(self):
+ vrfs = [
+ {"name": "test_1", "description": "test vrf 1"},
+ {"name": "test_2"},
+ ]
+ set_module_args(dict(vrfs=vrfs, description="test string"))
+ commands = ["vrf definition test_2", "description test string"]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrfs_local_override_state(self):
+ vrfs = [{"name": "test_1", "state": "absent"}, {"name": "test_2"}]
+ set_module_args(dict(vrfs=vrfs, description="test string"))
+ commands = [
+ "no vrf definition test_1",
+ "vrf definition test_2",
+ "description test string",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_route_both(self):
+ set_module_args(
+ dict(name="test_5", rd="2:100", route_both=["2:100", "3:100"])
+ )
+ commands = [
+ "vrf definition test_5",
+ "address-family ipv4",
+ "exit",
+ "address-family ipv6",
+ "exit",
+ "rd 2:100",
+ "route-target import 2:100",
+ "route-target import 3:100",
+ "route-target export 2:100",
+ "route-target export 3:100",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_route_import(self):
+ set_module_args(
+ dict(name="test_6", rd="3:100", route_import=["3:100", "4:100"])
+ )
+ commands = [
+ "vrf definition test_6",
+ "rd 3:100",
+ "route-target import 3:100",
+ "route-target import 4:100",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_route_export(self):
+ set_module_args(
+ dict(name="test_7", rd="4:100", route_export=["3:100", "4:100"])
+ )
+ commands = [
+ "vrf definition test_7",
+ "rd 4:100",
+ "route-target export 3:100",
+ "route-target export 4:100",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_route_both_mixed(self):
+ set_module_args(
+ dict(
+ name="test_8",
+ rd="5:100",
+ route_both=["3:100", "4:100"],
+ route_export=["3:100", "4:100"],
+ )
+ )
+ self.execute_module(changed=True)
+
+ def test_ios_vrf_route_both_ipv4(self):
+ set_module_args(
+ dict(
+ name="test_9",
+ rd="168.0.0.9:100",
+ route_both_ipv4=["168.0.0.9:100", "3:100"],
+ )
+ )
+ commands = [
+ "vrf definition test_9",
+ "address-family ipv4",
+ "exit",
+ "rd 168.0.0.9:100",
+ "address-family ipv4",
+ "route-target import 168.0.0.9:100",
+ "route-target import 3:100",
+ "exit-address-family",
+ "address-family ipv4",
+ "route-target export 168.0.0.9:100",
+ "route-target export 3:100",
+ "exit-address-family",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_route_import_ipv4(self):
+ set_module_args(
+ dict(
+ name="test_10",
+ rd="168.0.0.10:100",
+ route_import_ipv4=["168.0.0.10:100", "3:100"],
+ )
+ )
+ commands = [
+ "vrf definition test_10",
+ "address-family ipv4",
+ "exit",
+ "rd 168.0.0.10:100",
+ "address-family ipv4",
+ "route-target import 168.0.0.10:100",
+ "route-target import 3:100",
+ "exit-address-family",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_route_export_ipv4(self):
+ set_module_args(
+ dict(
+ name="test_11",
+ rd="168.0.0.11:100",
+ route_export_ipv4=["168.0.0.11:100", "3:100"],
+ )
+ )
+ commands = [
+ "vrf definition test_11",
+ "address-family ipv4",
+ "exit",
+ "rd 168.0.0.11:100",
+ "address-family ipv4",
+ "route-target export 168.0.0.11:100",
+ "route-target export 3:100",
+ "exit-address-family",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_route_both_ipv4_mixed(self):
+ set_module_args(
+ dict(
+ name="test_12",
+ rd="168.0.0.12:100",
+ route_both_ipv4=["168.0.0.12:100", "3:100"],
+ route_export_ipv4=["168.0.0.15:100", "6:100"],
+ )
+ )
+ self.execute_module(changed=True)
+
+ def test_ios_vrf_route_both_ipv6(self):
+ set_module_args(
+ dict(
+ name="test_13",
+ rd="2:100",
+ route_both_ipv6=["2:100", "168.0.0.13:100"],
+ )
+ )
+ commands = [
+ "vrf definition test_13",
+ "address-family ipv6",
+ "exit",
+ "rd 2:100",
+ "address-family ipv6",
+ "route-target import 2:100",
+ "route-target import 168.0.0.13:100",
+ "exit-address-family",
+ "address-family ipv6",
+ "route-target export 2:100",
+ "route-target export 168.0.0.13:100",
+ "exit-address-family",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_route_import_ipv6(self):
+ set_module_args(
+ dict(
+ name="test_14",
+ rd="3:100",
+ route_import_ipv6=["3:100", "168.0.0.14:100"],
+ )
+ )
+ commands = [
+ "vrf definition test_14",
+ "address-family ipv6",
+ "exit",
+ "rd 3:100",
+ "address-family ipv6",
+ "route-target import 3:100",
+ "route-target import 168.0.0.14:100",
+ "exit-address-family",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_route_export_ipv6(self):
+ set_module_args(
+ dict(
+ name="test_15",
+ rd="4:100",
+ route_export_ipv6=["168.0.0.15:100", "4:100"],
+ )
+ )
+ commands = [
+ "vrf definition test_15",
+ "address-family ipv6",
+ "exit",
+ "rd 4:100",
+ "address-family ipv6",
+ "route-target export 168.0.0.15:100",
+ "route-target export 4:100",
+ "exit-address-family",
+ ]
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_ios_vrf_route_both_ipv6_mixed(self):
+ set_module_args(
+ dict(
+ name="test_16",
+ rd="5:100",
+ route_both_ipv6=["168.0.0.9:100", "4:100"],
+ route_export_ipv6=["168.0.0.12:100", "6:100"],
+ )
+ )
+ self.execute_module(changed=True)
+
+ def test_ios_vrf_route_both_ipv6_mixed_idempotent(self):
+ set_module_args(
+ dict(
+ name="test_17",
+ rd="2:100",
+ route_import_ipv6=["168.0.0.14:100"],
+ route_both_ipv6=["2:100", "168.0.0.13:100"],
+ route_export_ipv6=["168.0.0.15:100", "4:100"],
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=False)
+
+ def test_ios_vrf_route_both_ipv4_mixed_idempotent(self):
+ set_module_args(
+ dict(
+ name="test_18",
+ rd="168.0.0.9:100",
+ route_import_ipv4=["168.0.0.10:600"],
+ route_export_ipv4=["168.0.0.10:100"],
+ route_both_ipv4=["168.0.0.9:100", "3:100"],
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=False)
+
+ def test_ios_vrf_all_route_both_idempotent(self):
+ set_module_args(
+ dict(
+ name="test_19",
+ rd="10:700",
+ route_both=["2:100", "2:101"],
+ route_export=["2:102", "2:103"],
+ route_import=["2:104", "2:105"],
+ route_both_ipv4=["2:100", "2:101"],
+ route_export_ipv4=["2:102", "2:103"],
+ route_import_ipv4=["2:104", "2:105"],
+ route_both_ipv6=["2:100", "2:101"],
+ route_export_ipv6=["2:102", "2:103"],
+ route_import_ipv6=["2:104", "2:105"],
+ )
+ )
+ self.execute_module(changed=False, commands=[], sort=False)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/utils.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/utils.py
new file mode 100644
index 00000000..0b8fee88
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/modules/utils.py
@@ -0,0 +1,51 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import json
+
+from ansible_collections.cisco.ios.tests.unit.compat import unittest
+from ansible_collections.cisco.ios.tests.unit.compat.mock import patch
+from ansible.module_utils import basic
+from ansible.module_utils._text import to_bytes
+
+
+def set_module_args(args):
+ if "_ansible_remote_tmp" not in args:
+ args["_ansible_remote_tmp"] = "/tmp"
+ if "_ansible_keep_remote_files" not in args:
+ args["_ansible_keep_remote_files"] = False
+
+ args = json.dumps({"ANSIBLE_MODULE_ARGS": args})
+ basic._ANSIBLE_ARGS = to_bytes(args)
+
+
+class AnsibleExitJson(Exception):
+ pass
+
+
+class AnsibleFailJson(Exception):
+ pass
+
+
+def exit_json(*args, **kwargs):
+ if "changed" not in kwargs:
+ kwargs["changed"] = False
+ raise AnsibleExitJson(kwargs)
+
+
+def fail_json(*args, **kwargs):
+ kwargs["failed"] = True
+ raise AnsibleFailJson(kwargs)
+
+
+class ModuleTestCase(unittest.TestCase):
+ def setUp(self):
+ self.mock_module = patch.multiple(
+ basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json
+ )
+ self.mock_module.start()
+ self.mock_sleep = patch("time.sleep")
+ self.mock_sleep.start()
+ set_module_args({})
+ self.addCleanup(self.mock_module.stop)
+ self.addCleanup(self.mock_sleep.stop)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/ios/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/ios/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/ios/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/ios/show_version b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/ios/show_version
new file mode 100644
index 00000000..eadd3d3a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/ios/show_version
@@ -0,0 +1,54 @@
+Cisco IOS XE Software, Version 16.06.01
+Cisco IOS Software [Everest], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.1, RELEASE SOFTWARE (fc2)
+Technical Support: http://www.cisco.com/techsupport
+Copyright (c) 1986-2017 by Cisco Systems, Inc.
+Compiled Sat 22-Jul-17 05:51 by mcpre
+
+
+Cisco IOS-XE software, Copyright (c) 2005-2017 by cisco Systems, Inc.
+All rights reserved. Certain components of Cisco IOS-XE software are
+licensed under the GNU General Public License ("GPL") Version 2.0. The
+software code licensed under GPL Version 2.0 is free software that comes
+with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such
+GPL code under the terms of GPL Version 2.0. For more details, see the
+documentation or "License Notice" file accompanying the IOS-XE software,
+or the applicable URL provided on the flyer accompanying the IOS-XE
+software.
+
+
+ROM: IOS-XE ROMMON
+
+an-csr-01 uptime is 1 day, 16 hours, 15 minutes
+Uptime for this control processor is 1 day, 16 hours, 16 minutes
+System returned to ROM by reload
+System image file is "bootflash:packages.conf"
+Last reload reason: Reload Command
+
+
+
+This product contains cryptographic features and is subject to United
+States and local country laws governing import, export, transfer and
+use. Delivery of Cisco cryptographic products does not imply
+third-party authority to import, export, distribute or use encryption.
+Importers, exporters, distributors and users are responsible for
+compliance with U.S. and local country laws. By using this product you
+agree to comply with applicable laws and regulations. If you are unable
+to comply with U.S. and local laws, return this product immediately.
+
+A summary of U.S. laws governing Cisco cryptographic products may be found at:
+http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
+
+If you require further assistance please contact us by sending email to
+export@cisco.com.
+
+License Level: ax
+License Type: Default. No valid license found.
+Next reload license Level: ax
+
+cisco CSR1000V (VXE) processor (revision VXE) with 1225511K/3075K bytes of memory.
+Processor board ID 9I5BX4UHSO4
+3 Gigabit Ethernet interfaces
+32768K bytes of non-volatile configuration memory.
+3018776K bytes of physical memory.
+16162815K bytes of virtual hard disk at bootflash:.
+0K bytes of WebUI ODM Files at webui:.
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/show_chassis b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/show_chassis
new file mode 100644
index 00000000..af51cbaf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/show_chassis
@@ -0,0 +1,30 @@
+
+Chassis Name: BR-VDX6740
+switchType: 131
+
+FAN Unit: 1
+Time Awake: 0 days
+
+FAN Unit: 2
+Time Awake: 0 days
+
+POWER SUPPLY Unit: 1
+Factory Part Num: 23-1000043-01
+Factory Serial Num:
+Time Awake: 0 days
+
+POWER SUPPLY Unit: 2
+Factory Part Num: 23-1000043-01
+Factory Serial Num:
+Time Awake: 0 days
+
+CHASSIS/WWN Unit: 1
+Power Consume Factor: 0
+Factory Part Num: 40-1000927-06
+Factory Serial Num: CPL2541K01E
+Manufacture: Day: 11 Month: 8 Year: 14
+Update: Day: 18 Month: 7 Year: 2018
+Time Alive: 1116 days
+Time Awake: 0 days
+
+Airflow direction : Port side INTAKE
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/show_running-config b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/show_running-config
new file mode 100644
index 00000000..8a4f631f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/show_running-config
@@ -0,0 +1,549 @@
+diag post rbridge-id 104 enable
+ntp server 10.10.10.1 use-vrf mgmt-vrf
+logging raslog console INFO
+logging auditlog class SECURITY
+logging auditlog class CONFIGURATION
+logging auditlog class FIRMWARE
+logging syslog-facility local LOG_LOCAL7
+logging syslog-client localip CHASSIS_IP
+switch-attributes 104
+ chassis-name VDX6740
+ host-name LEAF4
+!
+no support autoupload enable
+line vty
+ exec-timeout 10
+!
+zoning enabled-configuration cfg-name ""
+zoning enabled-configuration default-zone-access allaccess
+zoning enabled-configuration cfg-action cfg-save
+dpod 104/0/1
+ reserve
+!
+dpod 104/0/2
+!
+dpod 104/0/3
+!
+dpod 104/0/4
+!
+dpod 104/0/5
+!
+dpod 104/0/6
+!
+dpod 104/0/7
+!
+dpod 104/0/8
+!
+dpod 104/0/9
+!
+dpod 104/0/10
+!
+dpod 104/0/11
+!
+dpod 104/0/12
+!
+dpod 104/0/13
+!
+dpod 104/0/14
+!
+dpod 104/0/15
+!
+dpod 104/0/16
+!
+dpod 104/0/17
+!
+dpod 104/0/18
+!
+dpod 104/0/19
+!
+dpod 104/0/20
+!
+dpod 104/0/21
+!
+dpod 104/0/22
+!
+dpod 104/0/23
+!
+dpod 104/0/24
+!
+dpod 104/0/25
+!
+dpod 104/0/26
+!
+dpod 104/0/27
+!
+dpod 104/0/28
+!
+dpod 104/0/29
+!
+dpod 104/0/30
+!
+dpod 104/0/31
+!
+dpod 104/0/32
+!
+dpod 104/0/33
+!
+dpod 104/0/34
+!
+dpod 104/0/35
+!
+dpod 104/0/36
+!
+dpod 104/0/37
+!
+dpod 104/0/38
+!
+dpod 104/0/39
+!
+dpod 104/0/40
+!
+dpod 104/0/41
+!
+dpod 104/0/42
+!
+dpod 104/0/43
+!
+dpod 104/0/44
+!
+dpod 104/0/45
+!
+dpod 104/0/46
+!
+dpod 104/0/47
+!
+dpod 104/0/48
+!
+dpod 104/0/49
+!
+dpod 104/0/50
+!
+dpod 104/0/51
+!
+dpod 104/0/52
+!
+role name admin desc Administrator
+role name user desc User
+aaa authentication login local
+aaa accounting exec default start-stop none
+aaa accounting commands default start-stop none
+service password-encryption
+username admin password "BwrsDbB+tABWGWpINOVKoQ==\n" encryption-level 7 role admin desc Administrator
+username user password "BwrsDbB+tABWGWpINOVKoQ==\n" encryption-level 7 role user desc User
+ip access-list extended test
+ seq 10 permit ip host 1.1.1.1 any log
+!
+snmp-server contact "Field Support."
+snmp-server location "End User Premise."
+snmp-server sys-descr "Extreme VDX Switch."
+snmp-server enable trap
+snmp-server community private groupname admin
+snmp-server community public groupname user
+snmp-server view All 1 included
+snmp-server group admin v1 read All write All notify All
+snmp-server group public v1 read All
+snmp-server group public v2c read All
+snmp-server group user v1 read All
+snmp-server group user v2c read All
+hardware
+ connector-group 104/0/1
+ speed LowMixed
+ !
+ connector-group 104/0/3
+ speed LowMixed
+ !
+ connector-group 104/0/5
+ speed LowMixed
+ !
+ connector-group 104/0/6
+ speed LowMixed
+ !
+!
+cee-map default
+ precedence 1
+ priority-group-table 1 weight 40 pfc on
+ priority-group-table 15.0 pfc off
+ priority-group-table 15.1 pfc off
+ priority-group-table 15.2 pfc off
+ priority-group-table 15.3 pfc off
+ priority-group-table 15.4 pfc off
+ priority-group-table 15.5 pfc off
+ priority-group-table 15.6 pfc off
+ priority-group-table 15.7 pfc off
+ priority-group-table 2 weight 60 pfc off
+ priority-table 2 2 2 1 2 2 2 15.0
+ remap fabric-priority priority 0
+ remap lossless-priority priority 0
+!
+fcoe
+ fabric-map default
+ vlan 1002
+ san-mode local
+ priority 3
+ virtual-fabric 128
+ fcmap 0E:FC:00
+ advertisement interval 8000
+ keep-alive timeout
+ !
+!
+interface Vlan 1
+!
+fabric route mcast rbridge-id 104
+!
+protocol lldp
+ advertise dcbx-fcoe-app-tlv
+ advertise dcbx-fcoe-logical-link-tlv
+ advertise dcbx-tlv
+ advertise bgp-auto-nbr-tlv
+ advertise optional-tlv management-address
+ advertise optional-tlv system-name
+ system-description Extreme-VDX-VCS 120
+!
+vlan dot1q tag native
+port-profile UpgradedVlanProfile
+ vlan-profile
+ switchport
+ switchport mode trunk
+ switchport trunk allowed vlan all
+ !
+!
+port-profile default
+ vlan-profile
+ switchport
+ switchport mode trunk
+ switchport trunk native-vlan 1
+ !
+!
+port-profile-domain default
+ port-profile UpgradedVlanProfile
+!
+class-map cee
+!
+class-map default
+!
+rbridge-id 104
+ switch-attributes chassis-name VDX6740
+ switch-attributes host-name LEAF4
+ vrf mgmt-vrf
+ address-family ipv4 unicast
+ ip route 0.0.0.0/0 10.26.0.1
+ !
+ address-family ipv6 unicast
+ !
+ !
+ system-monitor fan threshold marginal-threshold 1 down-threshold 2
+ system-monitor fan alert state removed action raslog
+ system-monitor power threshold marginal-threshold 1 down-threshold 2
+ system-monitor power alert state removed action raslog
+ system-monitor temp threshold marginal-threshold 1 down-threshold 2
+ system-monitor cid-card threshold marginal-threshold 1 down-threshold 2
+ system-monitor cid-card alert state none action none
+ system-monitor sfp alert state none action none
+ system-monitor compact-flash threshold marginal-threshold 1 down-threshold 0
+ system-monitor MM threshold marginal-threshold 1 down-threshold 0
+ system-monitor LineCard threshold marginal-threshold 1 down-threshold 2
+ system-monitor LineCard alert state none action none
+ system-monitor SFM threshold marginal-threshold 1 down-threshold 2
+ resource-monitor cpu enable
+ resource-monitor memory enable threshold 100 action raslog
+ resource-monitor process memory enable alarm 500 critical 600
+ no protocol vrrp
+ no protocol vrrp-extended
+ hardware-profile tcam default
+ hardware-profile route-table default maximum_paths 8 openflow off
+ hardware-profile kap default
+ fabric neighbor-discovery
+ clock timezone America/Los_Angeles
+ ag
+ enable
+ counter reliability 25
+ timeout fnm 120
+ pg 0
+ modes lb
+ rename pg0
+ !
+ !
+ telnet server use-vrf default-vrf
+ telnet server use-vrf mgmt-vrf
+ ssh server key rsa 2048
+ ssh server key ecdsa 256
+ ssh server key dsa
+ ssh server use-vrf default-vrf
+ ssh server use-vrf mgmt-vrf
+ http server use-vrf default-vrf
+ http server use-vrf mgmt-vrf
+ fcoe
+ fcoe-enodes 0
+ !
+!
+interface Management 104/0
+ no tcp burstrate
+ ip icmp echo-reply
+ no ip address dhcp
+ ip address 10.26.7.226/17
+ ipv6 icmpv6 echo-reply
+ no ipv6 address autoconfig
+ no ipv6 address dhcp
+ vrf forwarding mgmt-vrf
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/1
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/2
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/3
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/4
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/5
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/6
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/7
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/8
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/9
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/10
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/11
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/12
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/13
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/14
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/15
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/16
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/17
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/18
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/19
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/20
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/21
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/22
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/23
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/24
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/25
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/26
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/27
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/28
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/29
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/30
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/31
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/32
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/33
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/34
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/35
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/36
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/37
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/38
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/39
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/40
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/41
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/42
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/43
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/44
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/45
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/46
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/47
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface TenGigabitEthernet 104/0/48
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface FortyGigabitEthernet 104/0/49
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface FortyGigabitEthernet 104/0/50
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface FortyGigabitEthernet 104/0/51
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
+interface FortyGigabitEthernet 104/0/52
+ fabric isl enable
+ fabric trunk enable
+ no shutdown
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/show_version b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/show_version
new file mode 100644
index 00000000..1accd819
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/nos/show_version
@@ -0,0 +1,17 @@
+Network Operating System Software
+Network Operating System Version: 7.2.0
+Copyright (c) 1995-2017 Brocade Communications Systems, Inc.
+Firmware name: 7.2.0
+Build Time: 10:52:47 Jul 10, 2017
+Install Time: 01:32:03 Jan 5, 2018
+Kernel: 2.6.34.6
+
+BootProm: 1.0.1
+Control Processor: e500mc with 4096 MB of memory
+
+Slot Name Primary/Secondary Versions Status
+---------------------------------------------------------------------------
+SW/0 NOS 7.2.0 ACTIVE*
+ 7.2.0
+SW/1 NOS 7.2.0 STANDBY
+ 7.2.0
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/__init__.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_chassis b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_chassis
new file mode 100644
index 00000000..1f7f0c51
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_chassis
@@ -0,0 +1,40 @@
+
+Chassis Name: BR-SLX9140
+switchType: 3001
+
+FAN Unit: 1
+Time Awake: 36 days
+
+FAN Unit: 2
+Time Awake: 36 days
+
+FAN Unit: 3
+Time Awake: 36 days
+
+FAN Unit: 5
+Time Awake: 36 days
+
+FAN Unit: 6
+Time Awake: 36 days
+
+POWER SUPPLY Unit: 1
+Factory Part Num: 11-1111111-11
+Factory Serial Num: ASERIALNUMB
+Time Awake: 36 days
+
+POWER SUPPLY Unit: 2
+Factory Part Num: 11-1111111-11
+Factory Serial Num: ASERIALNUMB
+Time Awake: 36 days
+
+CHASSIS/WWN Unit: 1
+Power Consume Factor: 0
+Factory Part Num: 11-1111111-11
+Factory Serial Num: ASERIALNUMB
+Manufacture: Day: 12 Month: 1 Year: 2017
+Update: Day: 5 Month: 4 Year: 2018
+Time Alive: 277 days
+Time Awake: 36 days
+
+Airflow direction : Port side INTAKE
+
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_running-config b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_running-config
new file mode 100644
index 00000000..b2e540d9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_running-config
@@ -0,0 +1,624 @@
+root enable
+host-table aging-mode conversational
+clock timezone Europe/Warsaw
+hardware
+ profile tcam default
+ profile overlay-visibility default
+ profile route-table default maximum_paths 8
+ system-mode default
+!
+http server use-vrf default-vrf
+http server use-vrf mgmt-vrf
+node-id 1
+!
+ntp server 172.16.10.2 use-vrf mgmt-vrf
+!
+logging raslog console INFO
+logging syslog-server 10.1.5.11 use-vrf mgmt-vrf
+!
+logging auditlog class SECURITY
+logging auditlog class CONFIGURATION
+logging auditlog class FIRMWARE
+logging syslog-facility local LOG_LOCAL0
+logging syslog-client localip CHASSIS_IP
+switch-attributes chassis-name SLX9140-LEAF2
+switch-attributes host-name DC2LEAF2
+no support autoupload enable
+support ffdc
+resource-monitor cpu enable threshold 90 action raslog
+resource-monitor memory enable threshold 100 action raslog
+resource-monitor process memory enable alarm 1000 critical 1200
+system-monitor fan threshold marginal-threshold 1 down-threshold 2
+system-monitor fan alert state removed action raslog
+system-monitor power threshold marginal-threshold 1 down-threshold 2
+system-monitor power alert state removed action raslog
+system-monitor temp threshold marginal-threshold 1 down-threshold 2
+system-monitor cid-card threshold marginal-threshold 1 down-threshold 2
+system-monitor cid-card alert state none action none
+system-monitor compact-flash threshold marginal-threshold 1 down-threshold 0
+system-monitor MM threshold marginal-threshold 1 down-threshold 0
+system-monitor LineCard threshold marginal-threshold 1 down-threshold 2
+system-monitor LineCard alert state none action none
+system-monitor SFM threshold marginal-threshold 1 down-threshold 2
+telemetry server use-vrf mgmt-vrf
+ transport tcp
+ port 50051
+ activate
+!
+telemetry profile system-utilization default_system_utilization_statistics
+ interval 60
+ add total-system-memory
+ add total-used-memory
+ add total-free-memory
+ add cached-memory
+ add buffers
+ add user-free-memory
+ add kernel-free-memory
+ add total-swap-memory
+ add total-free-swap-memory
+ add total-used-swap-memory
+ add user-process
+ add system-process
+ add niced-process
+ add iowait
+ add hw-interrupt
+ add sw-interrupt
+ add idle-state
+ add steal-time
+ add uptime
+!
+telemetry profile interface default_interface_statistics
+ interval 30
+ add out-pkts
+ add in-pkts
+ add out-unicast-pkts
+ add in-unicast-pkts
+ add out-broadcast-pkts
+ add in-broadcast-pkts
+ add out-multicast-pkts
+ add in-multicast-pkts
+ add out-pkts-per-second
+ add in-pkts-per-second
+ add out-bandwidth
+ add in-bandwidth
+ add out-octets
+ add in-octets
+ add out-errors
+ add in-errors
+ add out-crc-errors
+ add in-crc-errors
+ add out-discards
+ add in-discards
+!
+line vty
+ exec-timeout 10
+!
+threshold-monitor Buffer limit 70
+vrf mgmt-vrf
+ address-family ipv4 unicast
+ ip route 0.0.0.0/0 172.168.192.1
+ !
+ address-family ipv6 unicast
+ !
+!
+ssh server key rsa 2048
+ssh server key ecdsa 256
+ssh server key dsa
+ssh server use-vrf default-vrf
+ssh server use-vrf mgmt-vrf
+telnet server use-vrf default-vrf
+telnet server use-vrf mgmt-vrf
+role name admin desc Administrator
+role name user desc User
+aaa authentication login local
+aaa accounting exec default start-stop none
+aaa accounting commands default start-stop none
+service password-encryption
+username admin password "AINTNOPARTYLIKEAHOTELPARTYCAUSEAHOTELPARTYDONTSLEEPNOONEWOULDEVERACTUALLYTYPETHISWHYAREYOUHERE\n" encryption-level 7 role admin desc Administrator
+cee-map default
+ precedence 1
+ priority-group-table 1 weight 40 pfc on
+ priority-group-table 15.0 pfc off
+ priority-group-table 15.1 pfc off
+ priority-group-table 15.2 pfc off
+ priority-group-table 15.3 pfc off
+ priority-group-table 15.4 pfc off
+ priority-group-table 15.5 pfc off
+ priority-group-table 15.6 pfc off
+ priority-group-table 15.7 pfc off
+ priority-group-table 2 weight 60 pfc off
+ priority-table 2 2 2 1 2 2 2 15.0
+ remap lossless-priority priority 0
+!
+mac access-list extended M1
+ seq 10 permit any any
+!
+vlan 1
+ ip igmp snooping startup-query-interval 100
+ ipv6 mld snooping startup-query-interval 100
+!
+vlan 100
+!
+vlan 200
+!
+vlan 1001
+ router-interface Ve 1001
+ description Thomas-Test-Cluster
+!
+qos map cos-mutation all-zero-map
+ map cos 0 to cos 0
+ map cos 1 to cos 0
+ map cos 2 to cos 0
+ map cos 3 to cos 0
+ map cos 4 to cos 0
+ map cos 5 to cos 0
+ map cos 6 to cos 0
+ map cos 7 to cos 0
+!
+qos map cos-mutation default
+ map cos 0 to cos 0
+ map cos 1 to cos 1
+ map cos 2 to cos 2
+ map cos 3 to cos 3
+ map cos 4 to cos 4
+ map cos 5 to cos 5
+ map cos 6 to cos 6
+ map cos 7 to cos 7
+!
+qos map cos-traffic-class all-zero-map
+ map cos 0 to traffic-class 0
+ map cos 1 to traffic-class 0
+ map cos 2 to traffic-class 0
+ map cos 3 to traffic-class 0
+ map cos 4 to traffic-class 0
+ map cos 5 to traffic-class 0
+ map cos 6 to traffic-class 0
+ map cos 7 to traffic-class 0
+!
+qos map cos-traffic-class default
+ map cos 0 to traffic-class 1
+ map cos 1 to traffic-class 0
+ map cos 2 to traffic-class 2
+ map cos 3 to traffic-class 3
+ map cos 4 to traffic-class 4
+ map cos 5 to traffic-class 5
+ map cos 6 to traffic-class 6
+ map cos 7 to traffic-class 7
+!
+qos map cos-dscp all-zero-map
+ map cos 0 to dscp 0
+ map cos 1 to dscp 0
+ map cos 2 to dscp 0
+ map cos 3 to dscp 0
+ map cos 4 to dscp 0
+ map cos 5 to dscp 0
+ map cos 6 to dscp 0
+ map cos 7 to dscp 0
+!
+qos map cos-dscp default
+ map cos 0 to dscp 0
+ map cos 1 to dscp 8
+ map cos 2 to dscp 16
+ map cos 3 to dscp 24
+ map cos 4 to dscp 32
+ map cos 5 to dscp 40
+ map cos 6 to dscp 48
+ map cos 7 to dscp 56
+!
+qos map traffic-class-cos all-zero-map
+ map traffic-class 0 to cos 0
+ map traffic-class 1 to cos 0
+ map traffic-class 2 to cos 0
+ map traffic-class 3 to cos 0
+ map traffic-class 4 to cos 0
+ map traffic-class 5 to cos 0
+ map traffic-class 6 to cos 0
+ map traffic-class 7 to cos 0
+!
+qos map traffic-class-cos default
+ map traffic-class 0 to cos 0
+ map traffic-class 1 to cos 1
+ map traffic-class 2 to cos 2
+ map traffic-class 3 to cos 3
+ map traffic-class 4 to cos 4
+ map traffic-class 5 to cos 5
+ map traffic-class 6 to cos 6
+ map traffic-class 7 to cos 7
+!
+qos map traffic-class-mutation all-zero-map
+ map traffic-class 0 to traffic-class 0
+ map traffic-class 1 to traffic-class 0
+ map traffic-class 2 to traffic-class 0
+ map traffic-class 3 to traffic-class 0
+ map traffic-class 4 to traffic-class 0
+ map traffic-class 5 to traffic-class 0
+ map traffic-class 6 to traffic-class 0
+ map traffic-class 7 to traffic-class 0
+!
+qos map traffic-class-mutation default
+ map traffic-class 0 to traffic-class 0
+ map traffic-class 1 to traffic-class 1
+ map traffic-class 2 to traffic-class 2
+ map traffic-class 3 to traffic-class 3
+ map traffic-class 4 to traffic-class 4
+ map traffic-class 5 to traffic-class 5
+ map traffic-class 6 to traffic-class 6
+ map traffic-class 7 to traffic-class 7
+!
+qos map traffic-class-dscp all-zero-map
+ map traffic-class 0 to dscp 0
+ map traffic-class 1 to dscp 0
+ map traffic-class 2 to dscp 0
+ map traffic-class 3 to dscp 0
+ map traffic-class 4 to dscp 0
+ map traffic-class 5 to dscp 0
+ map traffic-class 6 to dscp 0
+ map traffic-class 7 to dscp 0
+!
+qos map traffic-class-dscp default
+ map traffic-class 0 to dscp 0
+ map traffic-class 1 to dscp 8
+ map traffic-class 2 to dscp 16
+ map traffic-class 3 to dscp 24
+ map traffic-class 4 to dscp 32
+ map traffic-class 5 to dscp 40
+ map traffic-class 6 to dscp 48
+ map traffic-class 7 to dscp 56
+!
+qos map dscp-mutation all-zero-map
+ map dscp 0-63 to dscp 0
+!
+qos map dscp-mutation default
+ map dscp 0 to dscp 0
+ map dscp 1 to dscp 1
+ map dscp 10 to dscp 10
+ map dscp 11 to dscp 11
+ map dscp 12 to dscp 12
+ map dscp 13 to dscp 13
+ map dscp 14 to dscp 14
+ map dscp 15 to dscp 15
+ map dscp 16 to dscp 16
+ map dscp 17 to dscp 17
+ map dscp 18 to dscp 18
+ map dscp 19 to dscp 19
+ map dscp 2 to dscp 2
+ map dscp 20 to dscp 20
+ map dscp 21 to dscp 21
+ map dscp 22 to dscp 22
+ map dscp 23 to dscp 23
+ map dscp 24 to dscp 24
+ map dscp 25 to dscp 25
+ map dscp 26 to dscp 26
+ map dscp 27 to dscp 27
+ map dscp 28 to dscp 28
+ map dscp 29 to dscp 29
+ map dscp 3 to dscp 3
+ map dscp 30 to dscp 30
+ map dscp 31 to dscp 31
+ map dscp 32 to dscp 32
+ map dscp 33 to dscp 33
+ map dscp 34 to dscp 34
+ map dscp 35 to dscp 35
+ map dscp 36 to dscp 36
+ map dscp 37 to dscp 37
+ map dscp 38 to dscp 38
+ map dscp 39 to dscp 39
+ map dscp 4 to dscp 4
+ map dscp 40 to dscp 40
+ map dscp 41 to dscp 41
+ map dscp 42 to dscp 42
+ map dscp 43 to dscp 43
+ map dscp 44 to dscp 44
+ map dscp 45 to dscp 45
+ map dscp 46 to dscp 46
+ map dscp 47 to dscp 47
+ map dscp 48 to dscp 48
+ map dscp 49 to dscp 49
+ map dscp 5 to dscp 5
+ map dscp 50 to dscp 50
+ map dscp 51 to dscp 51
+ map dscp 52 to dscp 52
+ map dscp 53 to dscp 53
+ map dscp 54 to dscp 54
+ map dscp 55 to dscp 55
+ map dscp 56 to dscp 56
+ map dscp 57 to dscp 57
+ map dscp 58 to dscp 58
+ map dscp 59 to dscp 59
+ map dscp 6 to dscp 6
+ map dscp 60 to dscp 60
+ map dscp 61 to dscp 61
+ map dscp 62 to dscp 62
+ map dscp 63 to dscp 63
+ map dscp 7 to dscp 7
+ map dscp 8 to dscp 8
+ map dscp 9 to dscp 9
+!
+qos map dscp-traffic-class all-zero-map
+ map dscp 0-63 to traffic-class 0
+!
+qos map dscp-traffic-class default
+ map dscp 0-7 to traffic-class 0
+ map dscp 16-23 to traffic-class 2
+ map dscp 24-31 to traffic-class 3
+ map dscp 32-39 to traffic-class 4
+ map dscp 40-47 to traffic-class 5
+ map dscp 48-55 to traffic-class 6
+ map dscp 56-63 to traffic-class 7
+ map dscp 8-15 to traffic-class 1
+!
+qos map dscp-cos all-zero-map
+ map dscp 0-63 to cos 0
+!
+qos map dscp-cos default
+ map dscp 0-7 to cos 0
+ map dscp 16-23 to cos 2
+ map dscp 24-31 to cos 3
+ map dscp 32-39 to cos 4
+ map dscp 40-47 to cos 5
+ map dscp 48-55 to cos 6
+ map dscp 56-63 to cos 7
+ map dscp 8-15 to cos 1
+!
+protocol lldp
+ advertise optional-tlv management-address
+ system-description Brocade BR-SLX9140 Router
+!
+vlan dot1q tag native
+police-remark-profile default
+!
+class-map BD-100
+!
+class-map C1
+ match access-group M1
+!
+class-map cee
+!
+class-map default
+!
+policy-map P1
+ class C1
+ police cir 1000000
+ !
+!
+policy-map P2
+ class default
+ police cir 12121212
+ !
+!
+no protocol vrrp
+no protocol vrrp-extended
+router bgp
+ local-as 65301
+ capability as4-enable
+ bfd interval 300 min-rx 300 multiplier 3
+ neighbor leaf_group peer-group
+ neighbor leaf_group remote-as 65500
+ neighbor leaf_group bfd
+ neighbor 10.220.4.3 remote-as 65500
+ neighbor 10.220.4.3 peer-group leaf_group
+ address-family ipv4 unicast
+ network 172.32.252.5/32
+ maximum-paths 8
+ !
+ address-family ipv6 unicast
+ !
+ address-family l2vpn evpn
+ !
+!
+interface Loopback 1
+ ip address 172.16.128.6/32
+ no shutdown
+!
+interface Loopback 2
+ ip address 172.16.129.5/32
+ no shutdown
+!
+interface Management 0
+ no tcp burstrate
+ no shutdown
+ vrf forwarding mgmt-vrf
+ ip address dhcp
+!
+interface Ethernet 0/1
+ speed 25000
+ fec mode disabled
+ switchport
+ switchport mode access
+ switchport access vlan 1
+ no shutdown
+!
+interface Ethernet 0/2
+ no shutdown
+!
+interface Ethernet 0/3
+ speed 25000
+ fec mode RS-FEC
+ no shutdown
+!
+interface Ethernet 0/4
+ shutdown
+!
+interface Ethernet 0/5
+ service-policy in P1
+ no shutdown
+!
+interface Ethernet 0/6
+ mtu 1548
+ description L2 Interface
+ no shutdown
+!
+interface Ethernet 0/7
+ mtu 1548
+ description L2 Interface
+ no shutdown
+!
+interface Ethernet 0/8
+ switchport
+ switchport mode trunk
+ switchport trunk allowed vlan add 100,200
+ switchport trunk tag native-vlan
+ shutdown
+!
+interface Ethernet 0/9
+ shutdown
+!
+interface Ethernet 0/10
+ no shutdown
+!
+interface Ethernet 0/11
+ no shutdown
+!
+interface Ethernet 0/12
+ no shutdown
+!
+interface Ethernet 0/13
+ no shutdown
+!
+interface Ethernet 0/14
+ no shutdown
+!
+interface Ethernet 0/15
+ shutdown
+!
+interface Ethernet 0/16
+ shutdown
+!
+interface Ethernet 0/17
+ shutdown
+!
+interface Ethernet 0/18
+ shutdown
+!
+interface Ethernet 0/19
+ shutdown
+!
+interface Ethernet 0/20
+ shutdown
+!
+interface Ethernet 0/21
+ shutdown
+!
+interface Ethernet 0/22
+ shutdown
+!
+interface Ethernet 0/23
+ shutdown
+!
+interface Ethernet 0/24
+ shutdown
+!
+interface Ethernet 0/25
+ shutdown
+!
+interface Ethernet 0/26
+ shutdown
+!
+interface Ethernet 0/27
+ shutdown
+!
+interface Ethernet 0/28
+ shutdown
+!
+interface Ethernet 0/29
+ shutdown
+!
+interface Ethernet 0/30
+ shutdown
+!
+interface Ethernet 0/31
+ shutdown
+!
+interface Ethernet 0/32
+ shutdown
+!
+interface Ethernet 0/33
+ shutdown
+!
+interface Ethernet 0/34
+ shutdown
+!
+interface Ethernet 0/35
+ shutdown
+!
+interface Ethernet 0/36
+ shutdown
+!
+interface Ethernet 0/37
+ shutdown
+!
+interface Ethernet 0/38
+ shutdown
+!
+interface Ethernet 0/39
+ shutdown
+!
+interface Ethernet 0/40
+ shutdown
+!
+interface Ethernet 0/41
+ shutdown
+!
+interface Ethernet 0/42
+ shutdown
+!
+interface Ethernet 0/43
+ shutdown
+!
+interface Ethernet 0/44
+ shutdown
+!
+interface Ethernet 0/45
+ shutdown
+!
+interface Ethernet 0/46
+ shutdown
+!
+interface Ethernet 0/47
+ shutdown
+!
+interface Ethernet 0/48
+ shutdown
+!
+interface Ethernet 0/49
+ shutdown
+!
+interface Ethernet 0/50
+ fec mode RS-FEC
+ no shutdown
+!
+interface Ethernet 0/51
+ fec mode RS-FEC
+ no shutdown
+!
+interface Ethernet 0/52
+ fec mode RS-FEC
+ no shutdown
+!
+interface Ethernet 0/53
+ fec mode RS-FEC
+ no shutdown
+!
+interface Ethernet 0/54
+ fec mode disabled
+ no shutdown
+!
+interface Port-channel 200
+ switchport
+ switchport mode access
+ switchport access vlan 200
+ shutdown
+!
+interface Port-channel 1024
+ insight enable
+ no shutdown
+!
+monitor session 1
+ source ethernet 0/1 destination port-channel 1024 direction both
+!
+monitor session 2
+!
+bridge-domain 100 p2mp
+!
+cluster MCT1 1
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_startup-config b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_startup-config
new file mode 100644
index 00000000..b2e540d9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_startup-config
@@ -0,0 +1,624 @@
+root enable
+host-table aging-mode conversational
+clock timezone Europe/Warsaw
+hardware
+ profile tcam default
+ profile overlay-visibility default
+ profile route-table default maximum_paths 8
+ system-mode default
+!
+http server use-vrf default-vrf
+http server use-vrf mgmt-vrf
+node-id 1
+!
+ntp server 172.16.10.2 use-vrf mgmt-vrf
+!
+logging raslog console INFO
+logging syslog-server 10.1.5.11 use-vrf mgmt-vrf
+!
+logging auditlog class SECURITY
+logging auditlog class CONFIGURATION
+logging auditlog class FIRMWARE
+logging syslog-facility local LOG_LOCAL0
+logging syslog-client localip CHASSIS_IP
+switch-attributes chassis-name SLX9140-LEAF2
+switch-attributes host-name DC2LEAF2
+no support autoupload enable
+support ffdc
+resource-monitor cpu enable threshold 90 action raslog
+resource-monitor memory enable threshold 100 action raslog
+resource-monitor process memory enable alarm 1000 critical 1200
+system-monitor fan threshold marginal-threshold 1 down-threshold 2
+system-monitor fan alert state removed action raslog
+system-monitor power threshold marginal-threshold 1 down-threshold 2
+system-monitor power alert state removed action raslog
+system-monitor temp threshold marginal-threshold 1 down-threshold 2
+system-monitor cid-card threshold marginal-threshold 1 down-threshold 2
+system-monitor cid-card alert state none action none
+system-monitor compact-flash threshold marginal-threshold 1 down-threshold 0
+system-monitor MM threshold marginal-threshold 1 down-threshold 0
+system-monitor LineCard threshold marginal-threshold 1 down-threshold 2
+system-monitor LineCard alert state none action none
+system-monitor SFM threshold marginal-threshold 1 down-threshold 2
+telemetry server use-vrf mgmt-vrf
+ transport tcp
+ port 50051
+ activate
+!
+telemetry profile system-utilization default_system_utilization_statistics
+ interval 60
+ add total-system-memory
+ add total-used-memory
+ add total-free-memory
+ add cached-memory
+ add buffers
+ add user-free-memory
+ add kernel-free-memory
+ add total-swap-memory
+ add total-free-swap-memory
+ add total-used-swap-memory
+ add user-process
+ add system-process
+ add niced-process
+ add iowait
+ add hw-interrupt
+ add sw-interrupt
+ add idle-state
+ add steal-time
+ add uptime
+!
+telemetry profile interface default_interface_statistics
+ interval 30
+ add out-pkts
+ add in-pkts
+ add out-unicast-pkts
+ add in-unicast-pkts
+ add out-broadcast-pkts
+ add in-broadcast-pkts
+ add out-multicast-pkts
+ add in-multicast-pkts
+ add out-pkts-per-second
+ add in-pkts-per-second
+ add out-bandwidth
+ add in-bandwidth
+ add out-octets
+ add in-octets
+ add out-errors
+ add in-errors
+ add out-crc-errors
+ add in-crc-errors
+ add out-discards
+ add in-discards
+!
+line vty
+ exec-timeout 10
+!
+threshold-monitor Buffer limit 70
+vrf mgmt-vrf
+ address-family ipv4 unicast
+ ip route 0.0.0.0/0 172.168.192.1
+ !
+ address-family ipv6 unicast
+ !
+!
+ssh server key rsa 2048
+ssh server key ecdsa 256
+ssh server key dsa
+ssh server use-vrf default-vrf
+ssh server use-vrf mgmt-vrf
+telnet server use-vrf default-vrf
+telnet server use-vrf mgmt-vrf
+role name admin desc Administrator
+role name user desc User
+aaa authentication login local
+aaa accounting exec default start-stop none
+aaa accounting commands default start-stop none
+service password-encryption
+username admin password "AINTNOPARTYLIKEAHOTELPARTYCAUSEAHOTELPARTYDONTSLEEPNOONEWOULDEVERACTUALLYTYPETHISWHYAREYOUHERE\n" encryption-level 7 role admin desc Administrator
+cee-map default
+ precedence 1
+ priority-group-table 1 weight 40 pfc on
+ priority-group-table 15.0 pfc off
+ priority-group-table 15.1 pfc off
+ priority-group-table 15.2 pfc off
+ priority-group-table 15.3 pfc off
+ priority-group-table 15.4 pfc off
+ priority-group-table 15.5 pfc off
+ priority-group-table 15.6 pfc off
+ priority-group-table 15.7 pfc off
+ priority-group-table 2 weight 60 pfc off
+ priority-table 2 2 2 1 2 2 2 15.0
+ remap lossless-priority priority 0
+!
+mac access-list extended M1
+ seq 10 permit any any
+!
+vlan 1
+ ip igmp snooping startup-query-interval 100
+ ipv6 mld snooping startup-query-interval 100
+!
+vlan 100
+!
+vlan 200
+!
+vlan 1001
+ router-interface Ve 1001
+ description Thomas-Test-Cluster
+!
+qos map cos-mutation all-zero-map
+ map cos 0 to cos 0
+ map cos 1 to cos 0
+ map cos 2 to cos 0
+ map cos 3 to cos 0
+ map cos 4 to cos 0
+ map cos 5 to cos 0
+ map cos 6 to cos 0
+ map cos 7 to cos 0
+!
+qos map cos-mutation default
+ map cos 0 to cos 0
+ map cos 1 to cos 1
+ map cos 2 to cos 2
+ map cos 3 to cos 3
+ map cos 4 to cos 4
+ map cos 5 to cos 5
+ map cos 6 to cos 6
+ map cos 7 to cos 7
+!
+qos map cos-traffic-class all-zero-map
+ map cos 0 to traffic-class 0
+ map cos 1 to traffic-class 0
+ map cos 2 to traffic-class 0
+ map cos 3 to traffic-class 0
+ map cos 4 to traffic-class 0
+ map cos 5 to traffic-class 0
+ map cos 6 to traffic-class 0
+ map cos 7 to traffic-class 0
+!
+qos map cos-traffic-class default
+ map cos 0 to traffic-class 1
+ map cos 1 to traffic-class 0
+ map cos 2 to traffic-class 2
+ map cos 3 to traffic-class 3
+ map cos 4 to traffic-class 4
+ map cos 5 to traffic-class 5
+ map cos 6 to traffic-class 6
+ map cos 7 to traffic-class 7
+!
+qos map cos-dscp all-zero-map
+ map cos 0 to dscp 0
+ map cos 1 to dscp 0
+ map cos 2 to dscp 0
+ map cos 3 to dscp 0
+ map cos 4 to dscp 0
+ map cos 5 to dscp 0
+ map cos 6 to dscp 0
+ map cos 7 to dscp 0
+!
+qos map cos-dscp default
+ map cos 0 to dscp 0
+ map cos 1 to dscp 8
+ map cos 2 to dscp 16
+ map cos 3 to dscp 24
+ map cos 4 to dscp 32
+ map cos 5 to dscp 40
+ map cos 6 to dscp 48
+ map cos 7 to dscp 56
+!
+qos map traffic-class-cos all-zero-map
+ map traffic-class 0 to cos 0
+ map traffic-class 1 to cos 0
+ map traffic-class 2 to cos 0
+ map traffic-class 3 to cos 0
+ map traffic-class 4 to cos 0
+ map traffic-class 5 to cos 0
+ map traffic-class 6 to cos 0
+ map traffic-class 7 to cos 0
+!
+qos map traffic-class-cos default
+ map traffic-class 0 to cos 0
+ map traffic-class 1 to cos 1
+ map traffic-class 2 to cos 2
+ map traffic-class 3 to cos 3
+ map traffic-class 4 to cos 4
+ map traffic-class 5 to cos 5
+ map traffic-class 6 to cos 6
+ map traffic-class 7 to cos 7
+!
+qos map traffic-class-mutation all-zero-map
+ map traffic-class 0 to traffic-class 0
+ map traffic-class 1 to traffic-class 0
+ map traffic-class 2 to traffic-class 0
+ map traffic-class 3 to traffic-class 0
+ map traffic-class 4 to traffic-class 0
+ map traffic-class 5 to traffic-class 0
+ map traffic-class 6 to traffic-class 0
+ map traffic-class 7 to traffic-class 0
+!
+qos map traffic-class-mutation default
+ map traffic-class 0 to traffic-class 0
+ map traffic-class 1 to traffic-class 1
+ map traffic-class 2 to traffic-class 2
+ map traffic-class 3 to traffic-class 3
+ map traffic-class 4 to traffic-class 4
+ map traffic-class 5 to traffic-class 5
+ map traffic-class 6 to traffic-class 6
+ map traffic-class 7 to traffic-class 7
+!
+qos map traffic-class-dscp all-zero-map
+ map traffic-class 0 to dscp 0
+ map traffic-class 1 to dscp 0
+ map traffic-class 2 to dscp 0
+ map traffic-class 3 to dscp 0
+ map traffic-class 4 to dscp 0
+ map traffic-class 5 to dscp 0
+ map traffic-class 6 to dscp 0
+ map traffic-class 7 to dscp 0
+!
+qos map traffic-class-dscp default
+ map traffic-class 0 to dscp 0
+ map traffic-class 1 to dscp 8
+ map traffic-class 2 to dscp 16
+ map traffic-class 3 to dscp 24
+ map traffic-class 4 to dscp 32
+ map traffic-class 5 to dscp 40
+ map traffic-class 6 to dscp 48
+ map traffic-class 7 to dscp 56
+!
+qos map dscp-mutation all-zero-map
+ map dscp 0-63 to dscp 0
+!
+qos map dscp-mutation default
+ map dscp 0 to dscp 0
+ map dscp 1 to dscp 1
+ map dscp 10 to dscp 10
+ map dscp 11 to dscp 11
+ map dscp 12 to dscp 12
+ map dscp 13 to dscp 13
+ map dscp 14 to dscp 14
+ map dscp 15 to dscp 15
+ map dscp 16 to dscp 16
+ map dscp 17 to dscp 17
+ map dscp 18 to dscp 18
+ map dscp 19 to dscp 19
+ map dscp 2 to dscp 2
+ map dscp 20 to dscp 20
+ map dscp 21 to dscp 21
+ map dscp 22 to dscp 22
+ map dscp 23 to dscp 23
+ map dscp 24 to dscp 24
+ map dscp 25 to dscp 25
+ map dscp 26 to dscp 26
+ map dscp 27 to dscp 27
+ map dscp 28 to dscp 28
+ map dscp 29 to dscp 29
+ map dscp 3 to dscp 3
+ map dscp 30 to dscp 30
+ map dscp 31 to dscp 31
+ map dscp 32 to dscp 32
+ map dscp 33 to dscp 33
+ map dscp 34 to dscp 34
+ map dscp 35 to dscp 35
+ map dscp 36 to dscp 36
+ map dscp 37 to dscp 37
+ map dscp 38 to dscp 38
+ map dscp 39 to dscp 39
+ map dscp 4 to dscp 4
+ map dscp 40 to dscp 40
+ map dscp 41 to dscp 41
+ map dscp 42 to dscp 42
+ map dscp 43 to dscp 43
+ map dscp 44 to dscp 44
+ map dscp 45 to dscp 45
+ map dscp 46 to dscp 46
+ map dscp 47 to dscp 47
+ map dscp 48 to dscp 48
+ map dscp 49 to dscp 49
+ map dscp 5 to dscp 5
+ map dscp 50 to dscp 50
+ map dscp 51 to dscp 51
+ map dscp 52 to dscp 52
+ map dscp 53 to dscp 53
+ map dscp 54 to dscp 54
+ map dscp 55 to dscp 55
+ map dscp 56 to dscp 56
+ map dscp 57 to dscp 57
+ map dscp 58 to dscp 58
+ map dscp 59 to dscp 59
+ map dscp 6 to dscp 6
+ map dscp 60 to dscp 60
+ map dscp 61 to dscp 61
+ map dscp 62 to dscp 62
+ map dscp 63 to dscp 63
+ map dscp 7 to dscp 7
+ map dscp 8 to dscp 8
+ map dscp 9 to dscp 9
+!
+qos map dscp-traffic-class all-zero-map
+ map dscp 0-63 to traffic-class 0
+!
+qos map dscp-traffic-class default
+ map dscp 0-7 to traffic-class 0
+ map dscp 16-23 to traffic-class 2
+ map dscp 24-31 to traffic-class 3
+ map dscp 32-39 to traffic-class 4
+ map dscp 40-47 to traffic-class 5
+ map dscp 48-55 to traffic-class 6
+ map dscp 56-63 to traffic-class 7
+ map dscp 8-15 to traffic-class 1
+!
+qos map dscp-cos all-zero-map
+ map dscp 0-63 to cos 0
+!
+qos map dscp-cos default
+ map dscp 0-7 to cos 0
+ map dscp 16-23 to cos 2
+ map dscp 24-31 to cos 3
+ map dscp 32-39 to cos 4
+ map dscp 40-47 to cos 5
+ map dscp 48-55 to cos 6
+ map dscp 56-63 to cos 7
+ map dscp 8-15 to cos 1
+!
+protocol lldp
+ advertise optional-tlv management-address
+ system-description Brocade BR-SLX9140 Router
+!
+vlan dot1q tag native
+police-remark-profile default
+!
+class-map BD-100
+!
+class-map C1
+ match access-group M1
+!
+class-map cee
+!
+class-map default
+!
+policy-map P1
+ class C1
+ police cir 1000000
+ !
+!
+policy-map P2
+ class default
+ police cir 12121212
+ !
+!
+no protocol vrrp
+no protocol vrrp-extended
+router bgp
+ local-as 65301
+ capability as4-enable
+ bfd interval 300 min-rx 300 multiplier 3
+ neighbor leaf_group peer-group
+ neighbor leaf_group remote-as 65500
+ neighbor leaf_group bfd
+ neighbor 10.220.4.3 remote-as 65500
+ neighbor 10.220.4.3 peer-group leaf_group
+ address-family ipv4 unicast
+ network 172.32.252.5/32
+ maximum-paths 8
+ !
+ address-family ipv6 unicast
+ !
+ address-family l2vpn evpn
+ !
+!
+interface Loopback 1
+ ip address 172.16.128.6/32
+ no shutdown
+!
+interface Loopback 2
+ ip address 172.16.129.5/32
+ no shutdown
+!
+interface Management 0
+ no tcp burstrate
+ no shutdown
+ vrf forwarding mgmt-vrf
+ ip address dhcp
+!
+interface Ethernet 0/1
+ speed 25000
+ fec mode disabled
+ switchport
+ switchport mode access
+ switchport access vlan 1
+ no shutdown
+!
+interface Ethernet 0/2
+ no shutdown
+!
+interface Ethernet 0/3
+ speed 25000
+ fec mode RS-FEC
+ no shutdown
+!
+interface Ethernet 0/4
+ shutdown
+!
+interface Ethernet 0/5
+ service-policy in P1
+ no shutdown
+!
+interface Ethernet 0/6
+ mtu 1548
+ description L2 Interface
+ no shutdown
+!
+interface Ethernet 0/7
+ mtu 1548
+ description L2 Interface
+ no shutdown
+!
+interface Ethernet 0/8
+ switchport
+ switchport mode trunk
+ switchport trunk allowed vlan add 100,200
+ switchport trunk tag native-vlan
+ shutdown
+!
+interface Ethernet 0/9
+ shutdown
+!
+interface Ethernet 0/10
+ no shutdown
+!
+interface Ethernet 0/11
+ no shutdown
+!
+interface Ethernet 0/12
+ no shutdown
+!
+interface Ethernet 0/13
+ no shutdown
+!
+interface Ethernet 0/14
+ no shutdown
+!
+interface Ethernet 0/15
+ shutdown
+!
+interface Ethernet 0/16
+ shutdown
+!
+interface Ethernet 0/17
+ shutdown
+!
+interface Ethernet 0/18
+ shutdown
+!
+interface Ethernet 0/19
+ shutdown
+!
+interface Ethernet 0/20
+ shutdown
+!
+interface Ethernet 0/21
+ shutdown
+!
+interface Ethernet 0/22
+ shutdown
+!
+interface Ethernet 0/23
+ shutdown
+!
+interface Ethernet 0/24
+ shutdown
+!
+interface Ethernet 0/25
+ shutdown
+!
+interface Ethernet 0/26
+ shutdown
+!
+interface Ethernet 0/27
+ shutdown
+!
+interface Ethernet 0/28
+ shutdown
+!
+interface Ethernet 0/29
+ shutdown
+!
+interface Ethernet 0/30
+ shutdown
+!
+interface Ethernet 0/31
+ shutdown
+!
+interface Ethernet 0/32
+ shutdown
+!
+interface Ethernet 0/33
+ shutdown
+!
+interface Ethernet 0/34
+ shutdown
+!
+interface Ethernet 0/35
+ shutdown
+!
+interface Ethernet 0/36
+ shutdown
+!
+interface Ethernet 0/37
+ shutdown
+!
+interface Ethernet 0/38
+ shutdown
+!
+interface Ethernet 0/39
+ shutdown
+!
+interface Ethernet 0/40
+ shutdown
+!
+interface Ethernet 0/41
+ shutdown
+!
+interface Ethernet 0/42
+ shutdown
+!
+interface Ethernet 0/43
+ shutdown
+!
+interface Ethernet 0/44
+ shutdown
+!
+interface Ethernet 0/45
+ shutdown
+!
+interface Ethernet 0/46
+ shutdown
+!
+interface Ethernet 0/47
+ shutdown
+!
+interface Ethernet 0/48
+ shutdown
+!
+interface Ethernet 0/49
+ shutdown
+!
+interface Ethernet 0/50
+ fec mode RS-FEC
+ no shutdown
+!
+interface Ethernet 0/51
+ fec mode RS-FEC
+ no shutdown
+!
+interface Ethernet 0/52
+ fec mode RS-FEC
+ no shutdown
+!
+interface Ethernet 0/53
+ fec mode RS-FEC
+ no shutdown
+!
+interface Ethernet 0/54
+ fec mode disabled
+ no shutdown
+!
+interface Port-channel 200
+ switchport
+ switchport mode access
+ switchport access vlan 200
+ shutdown
+!
+interface Port-channel 1024
+ insight enable
+ no shutdown
+!
+monitor session 1
+ source ethernet 0/1 destination port-channel 1024 direction both
+!
+monitor session 2
+!
+bridge-domain 100 p2mp
+!
+cluster MCT1 1
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_version b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_version
new file mode 100644
index 00000000..0d648378
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/fixtures/slxos/show_version
@@ -0,0 +1,18 @@
+SLX-OS Operating System Software
+SLX-OS Operating System Version: 17s.1.02
+Copyright (c) 1995-2018 Brocade Communications Systems, Inc.
+Firmware name: 17s.1.02
+Build Time: 00:06:59 Sep 28, 2017
+Install Time: 15:58:29 Feb 9, 2018
+Kernel: 2.6.34.6
+Host Version: Ubuntu 14.04 LTS
+Host Kernel: Linux 3.14.17
+
+Control Processor: QEMU Virtual CPU version 2.0.0
+
+System Uptime: 34days 4hrs 41mins 53secs
+
+Slot Name Primary/Secondary Versions Status
+---------------------------------------------------------------------------
+SW/0 SLX-OS 17s.1.02 ACTIVE*
+ 17s.1.02
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/test_ios.py b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/test_ios.py
new file mode 100644
index 00000000..bce2dbef
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/plugins/cliconf/test_ios.py
@@ -0,0 +1,135 @@
+#
+# (c) 2019 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from os import path
+import json
+
+from mock import MagicMock
+
+from ansible_collections.cisco.ios.tests.unit.compat import unittest
+from ansible_collections.cisco.ios.plugins.cliconf import ios
+from ansible.module_utils._text import to_bytes
+
+
+b_FIXTURE_DIR = b"%s/fixtures/ios" % (
+ to_bytes(
+ path.dirname(path.abspath(__file__)), errors="surrogate_or_strict"
+ )
+)
+
+
+def _connection_side_effect(*args, **kwargs):
+ try:
+ if args:
+ value = args[0]
+ else:
+ value = kwargs.get("command")
+
+ fixture_path = path.abspath(
+ b"%s/%s" % (b_FIXTURE_DIR, b"_".join(value.split(b" ")))
+ )
+ with open(fixture_path, "rb") as file_desc:
+ return file_desc.read()
+ except (OSError, IOError):
+ if args:
+ value = args[0]
+ return value
+ elif kwargs.get("command"):
+ value = kwargs.get("command")
+ return value
+
+ return "Nope"
+
+
+class TestPluginCLIConfIOS(unittest.TestCase):
+ """ Test class for IOS CLI Conf Methods
+ """
+
+ def setUp(self):
+ self._mock_connection = MagicMock()
+ self._mock_connection.send.side_effect = _connection_side_effect
+ self._cliconf = ios.Cliconf(self._mock_connection)
+ self.maxDiff = None
+
+ def tearDown(self):
+ pass
+
+ def test_get_device_info(self):
+ """ Test get_device_info
+ """
+ device_info = self._cliconf.get_device_info()
+
+ mock_device_info = {
+ "network_os": "ios",
+ "network_os_model": "CSR1000V",
+ "network_os_version": "16.06.01",
+ "network_os_hostname": "an-csr-01",
+ "network_os_image": "bootflash:packages.conf",
+ }
+
+ self.assertEqual(device_info, mock_device_info)
+
+ def test_get_capabilities(self):
+ """ Test get_capabilities
+ """
+ capabilities = json.loads(self._cliconf.get_capabilities())
+ mock_capabilities = {
+ "network_api": "cliconf",
+ "rpc": [
+ "get_config",
+ "edit_config",
+ "get_capabilities",
+ "get",
+ "enable_response_logging",
+ "disable_response_logging",
+ "edit_banner",
+ "get_diff",
+ "run_commands",
+ "get_defaults_flag",
+ ],
+ "device_operations": {
+ "supports_diff_replace": True,
+ "supports_commit": False,
+ "supports_rollback": False,
+ "supports_defaults": True,
+ "supports_onbox_diff": False,
+ "supports_commit_comment": False,
+ "supports_multiline_delimiter": True,
+ "supports_diff_match": True,
+ "supports_diff_ignore_lines": True,
+ "supports_generate_diff": True,
+ "supports_replace": False,
+ },
+ "device_info": {
+ "network_os_hostname": "an-csr-01",
+ "network_os_image": "bootflash:packages.conf",
+ "network_os_model": "CSR1000V",
+ "network_os_version": "16.06.01",
+ "network_os": "ios",
+ },
+ "format": ["text"],
+ "diff_match": ["line", "strict", "exact", "none"],
+ "diff_replace": ["line", "block"],
+ "output": [],
+ }
+
+ self.assertEqual(mock_capabilities, capabilities)
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/requirements.txt b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/requirements.txt
new file mode 100644
index 00000000..a9772bea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tests/unit/requirements.txt
@@ -0,0 +1,42 @@
+boto3
+placebo
+pycrypto
+passlib
+pypsrp
+python-memcached
+pytz
+pyvmomi
+redis
+requests
+setuptools > 0.6 # pytest-xdist installed via requirements does not work with very old setuptools (sanity_ok)
+unittest2 ; python_version < '2.7'
+importlib ; python_version < '2.7'
+netaddr
+ipaddress
+netapp-lib
+solidfire-sdk-python
+
+# requirements for F5 specific modules
+f5-sdk ; python_version >= '2.7'
+f5-icontrol-rest ; python_version >= '2.7'
+deepdiff
+
+# requirement for Fortinet specific modules
+pyFMG
+
+# requirement for aci_rest module
+xmljson
+
+# requirement for winrm connection plugin tests
+pexpect
+
+# requirement for the linode module
+linode-python # APIv3
+linode_api4 ; python_version > '2.6' # APIv4
+
+# requirement for the gitlab module
+python-gitlab
+httmock
+
+# requirment for kubevirt modules
+openshift ; python_version >= '2.7'
diff --git a/collections-debian-merged/ansible_collections/cisco/ios/tox.ini b/collections-debian-merged/ansible_collections/cisco/ios/tox.ini
new file mode 100644
index 00000000..40c467b8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ios/tox.ini
@@ -0,0 +1,32 @@
+[tox]
+minversion = 1.4.2
+envlist = linters
+skipsdist = True
+
+[testenv]
+deps = -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+
+[testenv:black]
+install_command = pip install {opts} {packages}
+commands =
+ black -v -l79 {toxinidir}
+
+[testenv:linters]
+install_command = pip install {opts} {packages}
+commands =
+ black -v -l79 --diff --check {toxinidir}
+ flake8 {posargs}
+ yamllint -s .
+
+[testenv:venv]
+commands = {posargs}
+
+[flake8]
+# E123, E125 skipped as they are invalid PEP-8.
+
+show-source = True
+ignore = E123,E125,E402,E501,E741,W503
+max-line-length = 160
+builtins = _
+exclude = .git,.tox,tests/unit/compat/
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/.gitignore b/collections-debian-merged/ansible_collections/cisco/iosxr/.gitignore
new file mode 100644
index 00000000..d9fe27b7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/.gitignore
@@ -0,0 +1,91 @@
+# build products...
+*.py[co]
+build
+AUTHORS.TXT
+# Emacs backup and autosave files...
+*~
+.\#*
+\#*
+# RPM stuff...
+MANIFEST
+dist
+rpm-build
+# Eclipse/PyDev stuff...
+.project
+.pydevproject
+# PyCharm stuff...
+.idea
+#IntelliJ IDEA stuff..
+*.iml
+#VSCode stuff..
+.vscode/
+# Mac OS X stuff...
+.DS_Store
+# manpage build stuff...
+docs/man/man1/ansible*.1
+docs/man/man1/ansible*.1.asciidoc.in
+docs/man/man3/*
+# Sublime stuff
+*.sublime-project
+*.sublime-workspace
+# docsite stuff...
+docs/docsite/_build
+docs/docsite/*.html
+docs/docsite/htmlout
+docs/docsite/rst/cli/ansible-*.rst
+docs/docsite/rst/cli/ansible.rst
+docs/docsite/rst/dev_guide/collections_galaxy_meta.rst
+docs/docsite/rst/dev_guide/testing/sanity/index.rst.new
+docs/docsite/rst/modules/*.rst
+docs/docsite/rst/playbooks_directives.rst
+docs/docsite/rst/plugins_by_category.rst
+docs/docsite/rst/plugins/*/*.rst
+docs/docsite/rst/reference_appendices/config.rst
+docs/docsite/rst/reference_appendices/playbooks_keywords.rst
+docs/docsite/rst_warnings
+docs/docsite/searchindex.js
+docs/docsite/_static/*.gif
+docs/docsite/_static/*.png
+docs/docsite/_static/websupport.js
+# deb building stuff...
+/debian/
+deb-build
+# Vim swap files
+*.swp
+*.swo
+credentials.yml
+# test output
+*.retry
+*.out
+.pytest_cache/
+.tox
+.cache
+.pytest_cache
+results.xml
+coverage.xml
+/tests/units/cover-html
+/tests/integration/inventory
+/tests/integration/targets/*/backup/
+/tests/cache/*
+# Development
+/tests/develop
+venv
+Vagrantfile
+.vagrant
+.python-version
+# Release directory
+packaging/release/ansible_release
+/.cache/
+# python 'rope' stuff
+.ropeproject
+# local 'ack' config files
+.ackrc
+# default 'coverage html' results
+htmlcov/
+# default 'coverage' tool data
+.coverage
+# ansible-test coverage results
+tests/units/.coverage.*
+/SYMLINK_CACHE.json
+changelogs/.plugin-cache.yaml
+.ansible-test-timeout.json
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/.yamllint b/collections-debian-merged/ansible_collections/cisco/iosxr/.yamllint
new file mode 100644
index 00000000..3adaf90c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/.yamllint
@@ -0,0 +1,15 @@
+---
+extends: default
+
+ignore: |
+ .tox
+ changelogs/*
+
+rules:
+ braces:
+ max-spaces-inside: 1
+ level: error
+ brackets:
+ max-spaces-inside: 1
+ level: error
+ line-length: disable
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/.zuul.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/.zuul.yaml
new file mode 100644
index 00000000..a892ec72
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/.zuul.yaml
@@ -0,0 +1,8 @@
+---
+- project:
+ check:
+ jobs:
+ - ansible-tox-linters
+ gate:
+ jobs:
+ - ansible-tox-linters
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/FILES.json b/collections-debian-merged/ansible_collections/cisco/iosxr/FILES.json
new file mode 100644
index 00000000..cccd0ab1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/FILES.json
@@ -0,0 +1,6060 @@
+{
+ "files": [
+ {
+ "name": ".",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": ".gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "445eae124a1f5bb47770dec970cb756d2b736e0e009182ea2175dd3f0d7b7317",
+ "format": 1
+ },
+ {
+ "name": "test-requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f3c3034db738d9dd385446a8bb5275e8cdfa3661206dd97ac783c2f730534b24",
+ "format": 1
+ },
+ {
+ "name": "changelogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs/changelog.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0c0fcafb6761cdb68fde8cffd1077e7735797b3ffae193901b388ec26a97fa35",
+ "format": 1
+ },
+ {
+ "name": "changelogs/CHANGELOG.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d5815eb64788888adbc903167ceb07a15a9eab2df908d49d6a871c85ec793182",
+ "format": 1
+ },
+ {
+ "name": "changelogs/config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "abdc4b233c55892747806c9d6132ac05820da64e8e57aa84d1b8428181b6046a",
+ "format": 1
+ },
+ {
+ "name": "LICENSE",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
+ "format": 1
+ },
+ {
+ "name": "plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/filter",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/filter/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/terminal",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/terminal/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/terminal/iosxr.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "467e04ae9e63de658e49375a7b24f643d41d9794581beb86d5576192c6e326b1",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4667dc1c462fd95ffdbffb893f8f68c0326c323ed84672e82cf15b8aa058be96",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "997f251e74143e434a9192bdcdb6a8532f26b2eb81fd12039e07ae8ce395580e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_banner.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "33abeb945197b4921b21e2b7de3c5537be3e4fab3b8cb566c8b65c122541775b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_user.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7f5751ea7f9d2c396d0402539789f60be67cae7b3fc0e7f08b3c7b161fa48fe8",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_netconf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e78655a59b45d2856033a04e0b8337b1bfeaab7e7b01b0f0d4630708e24a858a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "282f7120689bcaa659b463b67f23360621801676248837d0263760267c0b9993",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_lldp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2a3a27e710f607784c7cb571b35bb0fba36988a75b28ade647bf672f7fb32849",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_lacp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7bfde7a158f682fe99b072050957fd0ee3cad57e7b03430729f209e4daf13132",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9ec15f89ee0d33a633cde851a0ed534700df934f3415c5226d07f5cd5ff6f7e2",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "993677624fd3d72670537c2fc75ea82766d297efe8ab02184b6829cd3f9d53f7",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ef4262ad0f1389dccf0e800ea0e805a6d2c5bd0bd9d97b7696fce72f66d8f427",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_lag_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f79d252d7460b0c2afd73850d39d964a8bb15e53a5f5d27039b0cc898711e9e6",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f05e6c2d7d364cabf7314bdde96f210bda457ac434f2cf17af7f536bba65347e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_config.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8482a5c263f39e9cfa7a3db19e3dd3df1bcc2a2459ead4ab646e54425224360e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_command.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4c8caf35b203867134eaf31419472a8d3c973f6c8e46d413e1fede7d3200c8cb",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5adba9b0ff2cbe2a468d96ea253a190483d2b4c87b8f234342f8997eaca7869b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "46f3e6becdf80acd88f881d960d6be164a4f025eedb266f1d9061d1ce49868f5",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0285187fcc13312681406940765cde4828d0bb5c0257bc2194d57657f0399728",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c179dfdfa9c25c1cb204e6858114d475ac38474e8c40e1452ddbc9ff8a68cbe4",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_system.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ee20eadc48b9f164603845ff71a19c72ec5eb60e42a6a4e8e5dd345a302bc458",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4fa035848c073c56e2385b8171dc5e7544084146ffa7b729ec411d59c6ede95f",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_logging.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3b3317fbd94f3ceec1c32a9237f5bdc48ee98e132e10e34b9680dc8067a2bf80",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_bgp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e335832dde0f7b4555b21fbe5abf07adc72e32af32a89d8c9015140fa561155d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/iosxr_ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb5b43beb548aa7ccd0f296d49ba1d61de1c6c119ac96aca34338089a8962aab",
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/iosxr.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d4036427d7ad91be3f9f39bd6f84418e19b504e2910af31ea922e17152d8ab34",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/acl_interfaces/acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a3f3eef1a8283e8ea5b787102dbc51fd99d9827db6818cafe5c95ee5fff12ac0",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/acl_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "802b358a2230ae0f01b7f4fd491f6d58a3aeb9caa6aac42ed9f27e98895dfcfa",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lldp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lldp_global/lldp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb38bfebbbfd4eb54f0c5eefff90eb4d4e08eb53a8c283aca3ffbfdc3c3ce296",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lldp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lldp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lldp_interfaces/lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6285fc62d4b69dc85689af932c7a2727ec96f888d4a092d25344cfc624ec1d45",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lldp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/ospf_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/ospf_interfaces/ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "014e7b9fc324e9ca0b6e1c81e146349a7890969be72c1c839024d3681c6e6a04",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/ospf_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/ospfv3",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/ospfv3/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/ospfv3/ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e82c00186645a179edaffa9a8bf821c1b1f2b5ed8c758709d9c0beb0e5165f6b",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/ospfv2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/ospfv2/ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e595db1fb5560f6200e76b4ac21b4806527cd2d7c14e9f40e0e0192f736a05f9",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/ospfv2/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/legacy",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/legacy/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/legacy/base.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a3ae541948810a0f8c0bfbeb3e521b3eb434cc4d923c3a8b7c9dee71d57d6942",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/l2_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/l2_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/l2_interfaces/l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5b15df321c0d14af58f5e979eaa5bcc02a5e67f744aa9b687b3c1e7136388da4",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/interfaces/interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "07837ce8a8c7fe7b667d9c57c485410d45deae38873d9e46989a6277685e0b98",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lacp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lacp/lacp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ad37d89c606c0cee6f71737a4c79a7ab508c4a3c7f4c1a9b5bc1e4bee731aa49",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lacp/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/acls/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9f9f7a90d0bc72ee5df009f77c9bd86b76f220906577179556967b3346852987",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/acls/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lacp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lacp_interfaces/lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb25f1d7c7a22849a2100b615832df34925c971b9e33ce33d05fe81b34365991",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lacp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/l3_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/l3_interfaces/l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ef8d3b20e6146008634cba321d0b7e524ce94333154073a686a86161d30b6cd2",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/l3_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lag_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lag_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/lag_interfaces/lag_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4b338732e667c8b10e0aef06af6e17dbff0ec3c73e1974e5be381d7663317c75",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/static_routes/static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "922c0016c8a51057b9367a0fcb1bdfce778beac14810cf107c69baf8185620fe",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/facts/static_routes/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/rm_templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/rm_templates/ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3e0f9980f9cb5bb2c7613c39fa4b637b10bb5270a937e1ce6be8050667be5573",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/rm_templates/acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "369d020fcad32c8eb940b0f7dce87ada19ea059120e1da4048cfa03519c78174",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/rm_templates/ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da06d1aa13d79cdc2c44ef637caef3af806489d500f2d277bdfe5f4d242f2a05",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/rm_templates/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/rm_templates/ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0912a19da0e67ea59c89734df9579ba064928802d572639a4fb9e035d8f1ff81",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/utils/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/utils/utils.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "06ecd83eee8676e27212eff14efedb25b0c87c958e3cf468bf3c4dd991d22ad3",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers/cli/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers/cli/config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers/cli/config/bgp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers/cli/config/bgp/neighbors.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1f0fe02a5b90312811821234526a3d9347ec172979c08887f9328d754a3af3c7",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers/cli/config/bgp/process.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f1f7688872e43e58a70fcfe2794e20713abf894620e0ef58ab5bedfd52bfa604",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers/cli/config/bgp/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers/cli/config/bgp/address_family.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bbd9d47ef4e765f7234392bbdae8ad3097550cfd4cd548e8291f70e834c6d43c",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers/cli/config/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers/providers.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1e40324ccc5b05d7a51c2a6d604362a4e80d92919581f319dc1b4efaff17008e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/providers/module.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8447fe8d9b72ba930a6f122dbbfba2e3e69d95e715f258cf0db00d2238efe080",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/iosxr.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c28b104c4a8b1700fcd2b27192584a2cb8784e18835ab3da03f075115cff533c",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/acl_interfaces/acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "94329a82cc6e01af58e9d83b6c62deeb0ec12d8b5997aa5ce092305346481d57",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/acl_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lldp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lldp_global/lldp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1db99aa643eb0ceb0c854294ad1a76ba3ff9df2eac39d0942c7ebcea4541f5e7",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lldp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lldp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lldp_interfaces/lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d6565fbfebdb82082df6515d03da939fe2973567e956d268e2c036eea7501477",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lldp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/ospf_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/ospf_interfaces/ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5c4595541af2551d3c8288b6eb5ae8cddc106bfd4cd81eb7363eda9cb4069e56",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/ospf_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/ospfv3",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/ospfv3/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/ospfv3/ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f00583e6194c4501cc7151b52c06af8ee02734586f1d1ef020c4d0a045ed5500",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/ospfv2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/ospfv2/ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "85aa7eff9f7a15838859354f22001bae07131763898e3c2e89b17163c07637ed",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/ospfv2/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/l2_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/l2_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/l2_interfaces/l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7d9015280aebe553c0ab314bfd738ddbc2d4c82e059292033c7348f02b02a412",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/interfaces/interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "633a87dd870bb8ad9705b4c85aad149015d89f15b25fa8d6a33b51c842aa267d",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lacp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lacp/lacp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4c0e9217f94de5490fde99ec8cfbb4355d792c320dfabb3621541ef278d4a58a",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lacp/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/acls/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8d80f17d8b1d3e4b905b74efd01e57322f41155824ae76a2c91f2464e6970f66",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/acls/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lacp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lacp_interfaces/lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c453e997bc6b9551d988a334e8fd057621eae22a6963836a4d3221f90c3bee45",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lacp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/l3_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/l3_interfaces/l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ad96804e7df1d14ffd2eae35527bc3bee07e4c03caf8f91b2954984c3c15bed2",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/l3_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lag_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lag_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/lag_interfaces/lag_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2dbcdfee62503e98d182e0607275e24858bbed8db31625a89efac8929e798c60",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/static_routes/static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0caac77796cd33abeca3624b6d4ba29ca8ef40e7090d04f04db118068791e96f",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/config/static_routes/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/acl_interfaces/acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cce504b4e4ec93a8feaad5280cb0cf51935f1caad15efed7d0d3a0d2455c632d",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/acl_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lldp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lldp_global/lldp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7dde1b9caccdbeae41bcaea288ab37a40eb1f66e1fa58326af8f13f7a36fa1e0",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lldp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/facts",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/facts/facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1e016a9c622b391dfc45d799e53567ffa111892a102b872a320cd09c2dfe866d",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/facts/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lldp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lldp_interfaces/lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "afb71a2a28a1b07ec1a81d4d3876986cfcb136f0736dd816248ceed4fb89af17",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lldp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/ospf_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/ospf_interfaces/ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "510dfc623241f91c7bc9395178d84baecab54d377985c0a6f5ed790f2fd1891e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/ospf_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/ospfv3",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/ospfv3/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/ospfv3/ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a70cd977f22b1812e9cd23e041e52390cae1f221f9409c4bc962032dbc37b951",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/ospfv2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/ospfv2/ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ab84f0e6dd560a0d98982f056d58dc81fc2084a1a98faadd104c0b5eebe4762c",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/ospfv2/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/l2_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/l2_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/l2_interfaces/l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d54c83221db6effdf8329ecb56f8d6a7d648775ef66073630b4c52c20e74fca5",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/interfaces/interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d161df41b6c6ec712e6dfcbaf02193e17f053b2e33a7988920e076b46d4a8a8b",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lacp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lacp/lacp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "15addbe1a782a4af2d36f2dcbf3bb784abb5b20c2d5a3a3e2408db7c9f68dd74",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lacp/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/acls/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5bf535800a3964edf745b15e28d6f7c5b4558796d0a1027fc7ec181f7287ccc2",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/acls/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lacp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lacp_interfaces/lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cdee15d3154a7b8142735bae3e8c33fe0d3e7c6ba2c58c9a0d4f1bfd6c613f6f",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lacp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/l3_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/l3_interfaces/l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "10653524d7f4d186beaca1a1fcc2a4d82ff29eabf0b7ebe658ae9725fc65cb10",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/l3_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lag_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lag_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/lag_interfaces/lag_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "db5f3a940eef2dc2c232e6aa0316dcbeaf097b4539fe0b5d636506cf15fed9ac",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/static_routes/static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "77e910a1f0f28d68757bd8203a4c91466a51e04b3e55348207cd229232f7059e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/iosxr/argspec/static_routes/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/netconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/netconf/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/netconf/iosxr.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "332075c1a79c8cf74988a708123d3ac685c54a20b2ecbdfa6ee1cfb33ca4a873",
+ "format": 1
+ },
+ {
+ "name": "plugins/cliconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/cliconf/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/cliconf/iosxr.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bcf4036628bd6a2e974bfba1ef470af75300b7b2998f303da3886abbc10819c9",
+ "format": 1
+ },
+ {
+ "name": "plugins/action",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/action/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/action/iosxr.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "757b8897cf2d3e41b840326c12ba7bac26964f7d9b7db2fb3df54d85ec1d1aa4",
+ "format": 1
+ },
+ {
+ "name": "tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/sanity",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.9.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d66d9c2176146a0cf541569e6d8ae8b1314b5fded8708e116ac43447527873b1",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.10.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d00606e57fbb8dc1fd70d3b23ff2398c5c31ce53cbfd68688fdd810d6df019f7",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8a4ac4bfdef88e75d6e748e35a42fb4915947dfa2b7dd788626fd829600e014",
+ "format": 1
+ },
+ {
+ "name": "tests/.gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b5726d3ec9335a09c124469eca039523847a6b0f08a083efaefd002b83326600",
+ "format": 1
+ },
+ {
+ "name": "tests/unit",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/test_iosxr_ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3793dc659fc0934c8d83e9b0b2fc20bad1ac32e41aa45199e801f9e5ff1d6ba0",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/test_iosxr_system.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5e30a55a0b49ed300b160e441b6e2d3007cee03c7b07163f5060e23fdeea473f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/iosxr_module.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "def63fd47add5418789d93e11d3949ade38de3f09a66ecd8b20fd01f4d511e8a",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/test_iosxr_user.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a561eac2d4ccd67f9f5a5438031cd335d3b47693944edb678f62babf3555f851",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/test_iosxr_netconf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c3726605a47672fbe738d5bb95d492193c8b071c297b0a92576fdad91ce87cb",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/test_iosxr_facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2375fe79d8f39c4e5dbef6d2eb6f726a2f584928728f0d4ac25841840d4af91d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/test_iosxr_static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c36b2e27259a09467d9902d1a2c734441be908603e304f4de056712ca6963c2e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/iosxr_config_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6fe81e446733fef4e3643a80042ab4111b9b0c927599c4b5972ecea4c18b4ffd",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/show_interfaces",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f7710c99d663a4da8192b24b35157411e23a037a2a4a989af21eaa44dc4c850d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/show_version",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "089ab6658c475d1146f913b1cdee2671b46051958e2b7f562da626d327456726",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/iosxr_static_routes_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "32ee56a46ecc87911222ff89e44693c8ae2cc8464170f8b24f225d082ee417fe",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/dir_7all",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c5e2c218c5731bee3f874af0bc5d5694a426ceba650efc03795a5739235f0120",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/iosxr_user_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e387d5d8b668b1f290872aab2a3e8f8de3d4bdcb99906b8bbf618b950f0c60e9",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/show_memory_summary",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0fedc43463c95b152254b43d741b62c704ffc82b2707b758d1294283384c4e0",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/iosxr_ospf_interfaces.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "17444c54f6bc1f9e356cbec7c9c2ffdb4a4b42879aeceff12a7a809e8a6735ca",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/show_lldp",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4135607fe98acfedbef4f2d3305b4ade7e5e833130f049f310b68f32ce451c66",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/iosxr_ospfv3.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8a6d31304503f7cd58289c7ab493bab726a003a69dbcfff3177f82e051180ff4",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/iosxr_config_src.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57d42d2e8e8b7a4b6cae566115ee42fecea077b525cace10cefc3b7dbd85f033",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/show_version_brief",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e4eb1b26a35a3c5bcf1e45eab472c8d59ff0559cfbfe701cd60c17ee6d9d6957",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/iosxr_acls_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "59430ac3ee2b54911b34f033b88f76f5099ddcd4fa2c84c363ec0748f202ccb6",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/show_lldp_neighbors_detail",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4135607fe98acfedbef4f2d3305b4ade7e5e833130f049f310b68f32ce451c66",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/iosxr_ospfv2.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "27b9a4a53478778c5781170c052ba66bcc09dcb40aab0709d28018f6cd332126",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/show_ipv6_interface",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "151235002e58119649b79a98cbacb5ce155225e31aa0188dd8085ee0961feacf",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/iosxr_system_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "18ae20e11b3f557435b212a739a50c59c95e4162dc13989695e6c14ae35e58f7",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/show_running-config",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9442b8aa3e29caa5725d8968da29fa173e998d7c664c92b3ddd66a7aea76a71e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/fixtures/show_version___utility_head_-n_20",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e4eb1b26a35a3c5bcf1e45eab472c8d59ff0559cfbfe701cd60c17ee6d9d6957",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/test_iosxr_config.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "99b72b70e776abc53d5943c430f1ad8179195a37c4294552ed0560d6f47d090f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/test_iosxr_ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2881e6402d44975a5fd818023b2810f6186c8050748d31bca9d6a4228ca5e620",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/test_iosxr_ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "df39e72c8603aaa7199a29b189b9594a178986897d4792c428a3db7280f72a85",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/test_iosxr_command.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3becd7ceba917cdb6152fb0deb070ee19cc7bd11154e30b0102187f5db9b5031",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/iosxr/test_iosxr_acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4dfc0f525f331013e0b716da3b1eb402d108251079bb7cb350b7f6d1b706e7f5",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/conftest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2af4846e50d461a131ad3edfb609fbb39a9eb1796048c62e4ead8234bcf5c6a1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/utils.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a1413ca906b0ea8de94f1c3cfa100b421a5b01f1dc40a2ef63f049e8411ef83f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/unittest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3ed698b1faec43d87a2c1ebcb15a2aae48b09ff355bb9a598e5f5a1c928dbb30",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/mock.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "92c05c107e3254b8c0e3ec6fcef2be9d36255008b1d22488e48e554ca5ebb70d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/builtins.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ba13a350ade8ef804336f888d5883b8e54f8bddfb9d0fadc10277a8ca6540f4e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "49ba996dc4735c3463e9af561344346dfae14bcc1a68096ce78364b377f0df1f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/yaml_helper.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "94e2f3c867d2582c9f7a0e99e544718e355025c4a51c9925e70158fa89b3609e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/loader.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0cfbf4c710a5d5725f84d5f34ab76ec1a0e853397cd945c90fd97769f89dddc5",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/vault_helper.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "feae23166b6eb502f7d9b77c314970516c9a99aaad7de01295b4dfdad53c5c09",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/path.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "53bb779a7669696754c1bea32052fb5b6f93e0fdf843e1d3cca36862aeb0e539",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/procenv.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dbc77e7aa7a3e236a676c228affc887adca4c82ce764f1dc4938463992808787",
+ "format": 1
+ },
+ {
+ "name": "tests/integration",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/network-integration.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d67b11263a8f50b30bf43c7c2b4bdd8dc4f173f0b5dd22761311360dfbd56a1d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/target-prefixes.network",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "60c1f89345b308be75e572c064735f2fc749d9bb89ef936f14f33d212582fefa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "43e211ff2be29a1695024c0c5477e4107c0aa6866eafc18c1d89fcf4bcb9732e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b535abaa4359adb10027bbd428cb9ea859ba2c8e440ddca1bc487a5d0f8bee48",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "48c54e7dd68a06ad182239166357d72c31e708f468c479c89552b926cceae9c6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b8218f3c1610ae394c49f23d30bbc4805ed119afd4bfc76e3b9fc50ef839bcd9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "07241fb0e9cbf3884bc1c29a8410446c84223339b54df1277fd0bd651164956e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2b5e724b1e3d4af1180b806854fe9f97eb3bc6576382c70d38c63c8f6228f007",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "12fe077aa8d1066b49e853c3cc287b5584aebefffb9fa81964d6a5e8a029f641",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "add273b22d632699d86230ae4268c1445f1c10759eaa2a13dd7c15413ab737b7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4096307ac120e94447b5d22b035955375aba4f10fa2ab83d18f8af2d50ac8e5b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "be9488078cfc215d6b02fc46e063cbd9c5dffff4ea8eefa8eea0eef53de7b1db",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0141ad7c14a94c53d284b7bc917d8ed146f87bbacfd37b70fdc216ae3ee61885",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5f69f92e46aa5661bd8bdd0ac6ecaf7497db0732b5fe1a8e2da13eb1a1318ad0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a15baf460706b8582ac802d4392e3037101cc9a9bc6a73cc8a9edbae8226e1ab",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l3_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8bb0f6a9c16f4f45bf0a6d8138526e3b2292689ed10c6805c3125b79f60bfaf8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "27cfe3d5911b55b4595d7b075c3988d0bd442b0e5e2884453b9179f7b4647751",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8be7ac792f388d8c3a87b62f6200b51b5bb1f256e4df34aa9adf259b6c99b5ef",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5c2cebf9171a9e0be32861c815bc196e701de1f8563f630f2da6aba28f765853",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0923adff921d0e4de4105214951d027ce19bc185740a58076b79e892ba3c085e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "22efaad73407e942e8dbc0c169249fe95c0708d94128a14bb179512cf1017394",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "84e37db31c9e53db90e934237cfe3c0ecdff5a550b413d01277dff0666438e3f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "76ebdef5a5ee76343c0b67c1e43d6e060f7b7b49ad5d635a3084d84e6eabd3af",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "93cd8ccbe893e42887580c016bc62f606dd7f9c5476f9e1968f82e6240ee05d9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cb65d3bdc0b39c5c5b00eba55af8ea91ff85b7ab162cc46a8e58c425bc838b6c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8f326a4f98d10e69c3a58b40e713141fb58aae383c114a8dd61561c54954373a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6e148c74b09c0b22e87e8e55b815a0250281aa8daabde38b951b425cfbec2442",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d2335eeeaa4ace8094a5daa3fa60d634693f9b07c483babba9e3c6c265d77508",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_static_routes/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a54c117eb0f0891dd3967377157c9751f07734b67a9ca1fa359535a644e5fe13",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e5e8635685d1cf9f914f590c4d836ac5ec30a69e596ca80ab0588f7c72dffdf5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "616b36bd1930bf54e1492f749f8319afb947e7d845791eccd078f091a422b3fd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/_populate.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "264a8c0b8cada72e14090c9791e6798f0c28202baea158f42424b8d87e397ba9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "48ce40d16eee57cce3beea805938696e99d93fc4e30318f6e1ddf5fee8de4a0a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "09906ee86cc2c5b1a515dafa190e3576def507f53ed9563c471db011ab76eb54",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a83663cb7e49f95429a2053b940681641db3af45be2515c4524d97294a6d9be6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b2510cb59cc827cd9597ea07d906ba48a38252016418bc6f4fa4442eeca91c57",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "13333546167098eafc10253dce20230f3f3b7687a07a918aeb1c4752c8610f66",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f1a020d8a69aeda43a49f410ce2fc0c8b388e74dbdb3bc3ad77c021462a6b2c8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2b66427a9463b4fba069c1f986a69e96f41b353153b8c722dec871eb435a2a31",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b465248b3ed4cc3dba91bd97095052880845c905452c54760651e1b622de343e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0dca88a635c4df7935a64b62dcc4e29afc8ea29e79c5a69790d9fa39248aa593",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f6303a1c157aa43d3ed0dfada52fa54d6e23ac300e8bd0192b46760e24bc7f81",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3745bcbda25a847e68a067ae213b4c5f28e09749d7930b535aa6d5582608412f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5b599806dc1e9a93b2066e99a74e3a38f525e6cfd6b2d29f0439bbf160624f96",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e785c692c44e1fdcd006aac67e0dd469483dcffb212f129a7c54f5c41e3784c5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e9f4b4e2adf8ee4debe61d78d7f4b32953f7a756935246950b5648de39b433fe",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "02b46d715d998a51eecc65973e02e8b67cc96486953d6df2a567c47d4969945c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8a027624c6fa1c9f737b05c3d38065c7fda1d6f94cd34f52c7c5c37992410f7a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f7b9ce25078f6ab45f83789648b30900aa86f2afc1400491090816f8bbec9df1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ae753ba768b9b68abbf018652a8230d66e04d343053e221ab97d9073f7f80899",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "af60093fa5b2b70c9a49d9309cbc5472c0d52db3954552e63890ed3e66a0ad36",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "20e48336887c67da6536c6c7ab606f61de00dc9a02e0251a30ee1e566330fe32",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d11bd78a2d74e8dc46a2880b54b3500e2f88cc4e3e6fd42a249138556e94964a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "934f6f7a277e34f616d5459e1989f9e0faeaf4e0a61444289abfaf37ee120659",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospf_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "afdc5ba7f0888dd67f958a04419f06713f71671f16b66f754cb9322c3b0d47e6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "027d22fde5f7c211b58e9ec9558b559bae58e826ebdba35a6ef447b38a2ba6f4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli/_populate.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "77726b8cda1f319642e5120c9046ba1bc83d6d740b65651926698d0e81ffee80",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0a53a4cfeb9780a5a3f92b2e9de9f212331e9b7b089f654ffc881f6207c1f88d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b053b09f9388c7f6208c51e8b9e53867bd6352bf37c9688f28b02ab348ed3767",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fbe39661405e904c9b5c5d44d8930d77a970ac6dd0678928cd694c217068f386",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "be9449d3c5b834037691283129216a5412ea04f0ca29e0cf0f61fba2e48b717e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b81de3612853980a891e9dd857b58eecd173cc9a66332980193964fae74be491",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2c556f462a4bbb6ae614bbfff91b44c08e1afcd0806508dad6b0443c3e15d0f7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cc6eb54188aada720c9f28d8330869007b39e153b43979aee7ca468cfc24ad5f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "600a13d3c273d281ef9459b57e0f410b3ebc257fecc08f768feb7d17bf763a68",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "28efea0049957f8eb23160dce61b09a38b89b1fa61bc53f4f53b7f809b4eebd1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tests/cli/basic-motd.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7a44af81bfa24e44efc39d5e21900a9a7deae759f75940d737dc63a7f94b7dd2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tests/cli/basic-no-login.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0d7660a39a5eec8bd189f135d4ec50e5c1b24c1382c8509e2c16f0c881d78b67",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tests/cli/basic-login.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6e641b60f523c27a9cbd306bf7aab90518be633c22067e2b5240eebf7628abca",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tests/netconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tests/netconf/basic-motd.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "397891b7d69315e72a073956f9762f0588b2d4eca4bf69449ad608094b17ff6d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tests/netconf/basic-no-login.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fa495a963720cfb63f16e37eaa139d646a8cde6e754b1bea6911b04fb6511ba1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tests/netconf/basic-login.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2fc8cd01d0b141794a008521670e5d7454df687a247bfbd953874fb330a92cbe",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55144d29457d670189e343c566fbc6b465b90dbd9f2028efbb12d7fcc9f07b06",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "549cfb05d51408c3c60065091160390246d2d63458bf3a0c697731efe3ff3b59",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tasks/netconf.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "190abeacd88f15b161e12beb10157c146d8d51df6d7eb0e7c11abfbe70dac0e7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_banner/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "31cfb1ca71bf9a422c1b29c516d44cb879dbd4e6f5735e8be27fd4e8099d0490",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb66720686dcdeeb2c23a88b66b11666b7f66fccd425f36aa15e10f11d4b2055",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f86a36a7d796eb8e87a197360380c81bae9e72403da205852288508e03bff892",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7837c657f7e9a274b42d4a24cbfb1d5642e615225abedda7a69f2105b12f428d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bb12466312e5733309eaabab1e0c777c50175e77d4412ff66f770dca3a8cbdd1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a69fc90e1abe390279edff54a7df34d0fe64cbf54c9f58ba588b62df6bfc8a2a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d2329fbd002ae7078d3804fb64f9f4a5b16329824aa532c05d77c490e66a2228",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ab00c0cd1495cf4b208b57b938e217433aeff919e76da9a9519d5671f764b2ae",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2dc35edb15902e5bdf892b4ecba5bc6dd3ae073340d6ce2e4aacfed713248a7d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7a76f4b2951d08a3177b800e9d91d9c732a672281fbb2ecf2a1544e5332e4f9e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e0d97189c0b7eb7675266020b4758a2859d44ad8c3118c6c533ad63e575f7b7a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a212d2a103dc8062630508d8f9c5ccceea4ee5efd68b9750b8abb505f2ae47da",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3b34c0c85643741818360d5c423c01170201efa2f106024ee29d77c43baf3461",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d709bbb76c9b147fa2300279037cddd5865131a790152a66a788ff999d4cb6e1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acls/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_bgp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_bgp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_bgp/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_bgp/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e42b6d0a58fa927942ed7af4b0d99a57dfb96fc33c946ed9c714a9de75986ffc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_bgp/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_bgp/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55144d29457d670189e343c566fbc6b465b90dbd9f2028efbb12d7fcc9f07b06",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_bgp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_bgp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_bgp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_bgp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_bgp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "03c73c1ce648bd2159b91cef3220d52324a7a5e3877f403199543c637c13d6f3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8bfa536743433e0079566eac32dfa10849255f4da2e765c64ed0e2a951ba308e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "14812527603f825ca610f79736c3b2458b2bcd275e3326fa26a7daf5d6a391db",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f72c0f3cbaacba74908e31af49ea52c74269e97ec3dc651c0d2c0475672e2edb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "47a8c375bd4d77f371f4b7db372756bfd619aaca44e5ad99e8b045fa9c3c5d06",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1d7b3fa83a6dcf767633f7258ec977dd805bca495bfb100a9e3ed837324a81d8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "89576040392a674c9fe8a8fd5a2415af6b28acf093d46047712515b4913474c5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "10085a2c4317c52c8d4da5d3e14cf4242c6ad591ba5c96a32819cc7e45206079",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d09a6dee989d0adbbcd2c9c1ea8b87d68dcddffead2202a3111058f0a6c3b1ad",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "363b709312362746ba12cee67204daff50e8c0062784a6d371db38d53661c912",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b5a28be618d4ca93d0a40679321ed7458e73d92aeb6be03867eebee8bde8c3db",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "79537223380b09c48326da6e22e02f21dcdd19a3c0d777a57031b743f9fef4b0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3547bdfd2ad689e926e5ce4f36e680b06552c752ac73fd3ad092c9dfe402fc9c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c4de7c47f2b8925c29801c2f697f1cd3a888331f1c57fdd66883eafe4e7b5584",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lag_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/templates/basic",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/templates/basic/configuration.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1fd4692dc95cf561f544f8f680c9046add01c85c6fb83c17db2690cb854d3bb8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/templates/basic/change_prefix_set.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e9ef2a7080051a1b23e1fbc6cf3bb437bc99d89a735d1a3c23f85672a5e31014",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/templates/basic/route_policy.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "83c3226c2070afbe01cde658ec7852261ac925abed96766989888c70a2f8bc92",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/templates/basic/init_prefix_set.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "92dec92ecf095d1c33c493f4769541caa745787d80e498d6ae81decc93351e0a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/templates/basic/config.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8a1d61def7b5db197597c56f0c6c31f6aaf16ab38c990e99e386305f46ffa6a8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/templates/basic/route_policy_change.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e876ec5c5b2ae5f93154312c627b80b164860f49bc6283d5184ef592c7cdb1a2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/templates/basic/route_policy_clean.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "213238a72856965973d969bbc5afe4fb6f21655ea1f9a2e8ffd58fc80b6a0489",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/templates/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/templates/defaults/config.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "63cabaa434b59d994f3d56383ce682f57335258c9275f2f3db142dca3ece356e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/comment.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5ae96a07d00ae791d8814019a9bd6912d1d1861d8d97ec7367a951732538ee5b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/route_policy.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "223c0a0e5cc8ef2175c8f59814291bcf8ead8d8d34fb82f660655d6fad2a9b53",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/sublevel_strict.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c33f4502f82499a59e2acdba8c4bdafefd7b8ba878c3600f24c2cdb75c77f751",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/toplevel_before.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9221bd5feab29374f57f6a49a2bfd1850561c9ff5de825e4b5893a02b8aa7c3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/misplaced_sublevel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a4565f5d3caf86349a6b20861984681534ca099fc2eef871f69ea996879e080e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/src_match_none.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "568329f352ff9a731a8169bd936cb7bd88b948eb42be09e57f441f817a596bf1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/commit_label.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "506f066de485bb4366c348b7e8f1a965b8dc261cf486c0c820d4651382cb1366",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/replace_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e365cdbe0305fb8ebd82ad1a08e4421629532f7c851fd9f23716904be6ac8043",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/sublevel_exact.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "056077aada0da146880cce571cb4c3fe13ee75a314ad74c0265e2134c7cd0a84",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/src_invalid.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bbe8bfd0a1efa1acd89ded22d3ef6eb3c9523678d7820a8bb5bbe88a094e0f72",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/toplevel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "480c9a149f7d17ff2f86aa51ace917b16ff5f23d03ab9f103fe9f535c8e84390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/toplevel_after.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ccd2e49a74a7fa5ef2aaee1d7ef39e1ded0fd6aa27966001032bf3c2d99931f2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/sublevel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c3dec8392ed195964672f1a0ae74fe7e214f4ee3542d83d0adde38b84b75766b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/toplevel_nonidempotent.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "21c43fd562d62435db0af5b03c6104c03666c6be646a212561878f343b767819",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/src_basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2c52f6a8c62a96dcfff611118f83d5e4c562e03cd72737f66f4cd2e95bd739de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/sublevel_strict_mul_parents.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b6c391f806beaf3474d65555eab2923c747a218c0a966c08e6975b01b5b820f8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/sublevel_block.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "14b7b67fbe3d5e141f8a14eed092ecefc8e7476a774aa2fc21c85915583796bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/backup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7f2339914583108ac68fd6a448a0ce75d00aa0da235ff2ac49d66be0a162fa19",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/prefix_set_remark.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "418f2968defac06af79b0920a6c7af07a2a6f66d0dbc97c9c7b14aafbe412918",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli/comment-too-long.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b631b5e63ff83ba8892d97a7c556203bbc2b3616e71912c136342ca5dc814a39",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli_config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli_config/cli_backup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8e3dc4e968e2149e65f78bf511fd56927fb8a0deb33233b24f6205f38bd5d3d8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/cli_config/cli_basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "db93483ff0390cd576694545907a377fe21b3357bc8b83ec8dc3f9a265b551d1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/redirection",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tests/redirection/shortname.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "586a928e6c3f6c7e1103a55e7515a5d977a60904dd77d354e16d9367d46c3393",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/fixtures/config_del_interface.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bd232ca03ce45663aa31c2d1d3035d34a9404325a787d130315cb25c6768da7f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/fixtures/config_add_interface.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "10c5704da15d8c2c23f8a3e4005ee50843e5244d7dfdd5b397537bbaea299c5b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55144d29457d670189e343c566fbc6b465b90dbd9f2028efbb12d7fcc9f07b06",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cb0eb9495a97d94113e86ce70c78b774f2788ea642aa2ccd18efc740f056f626",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "31cfb1ca71bf9a422c1b29c516d44cb879dbd4e6f5735e8be27fd4e8099d0490",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tasks/redirection.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "24c235a52dd3f178bf104b6909e8852323ae8c7e31019efd6a86452c621c22a5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_config/tasks/cli_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3b49a8fe96428a8ff73c067c2efb3fffc30d0986cd48994b88bfc3ba148b51fa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9487a70ea6b6c46733030646171880120914099dbbb5ee23d02d74dee8629779",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ea248765e98099b7b2019a8dee05687abf9538d3897ed53aabc850eb64ea69f7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "37e97d40f5ece6e31da74f566d7661b561d2cb9de149c08470312dddd4632d3f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/_populate.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e8ecd186c842220523445b7623d23e7a3cec31dca381e25716cdb8cd894067ba",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c85ce351a9c10632bad83c51259e023f68b8beda416fd253e5035b1c01762464",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d2d60ebae8ece4e0b0b755137203b5ea618f87c277f2f8b605891d29db7dff83",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3c7d168e78d262be3e22279d77eac23faadba9b75543aed00fc3b8ea88037dba",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eed1547180bdc0630f77250a118244716299170831e5b4761b9e62757b6702ca",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a2417b9f418c00b16921d12449a6340bb92cebc21a55fad7582a19e1aeb34357",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "405bd74b0af982f23a0478cd6fa23465cb96fb6ef550a69b3969ed5bc61bb358",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "598e0b62bf647e769d16ba01625b74ea23087439779c23d7445410182fd0baed",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2c7a3e5edeac0c518c37446c999c361e1eca7a8a4d40a4b7dab96e99fdc89e2e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "29a8acf3766df1e54abe6a3dadfc393571647722393b132444952162b30a60ae",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lacp_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/tests/cli/not_hardware.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6bb48d2fc105bf70d6a6588d6159f5a7154f8cd5e53ad3b828c3657fdd8a42f0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/tests/cli/invalid_subset.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c6c4691c1b051e05d76778de367c44f6f737f857fbf7b555c6703ee345a8a6e6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/tests/cli/all_facts.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "def6cdb1bb85ad5f2dd94243094e7a27a9d8b85d59b0afd535a209a66878cc5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/tests/cli/default_facts.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "77059041cb45f20b8ca2dd9a915eb3cb864ce18325c162dbe8312638c2931af8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55144d29457d670189e343c566fbc6b465b90dbd9f2028efbb12d7fcc9f07b06",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_facts/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "03c73c1ce648bd2159b91cef3220d52324a7a5e3877f403199543c637c13d6f3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/cli/set_domain_list.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6fe20d020c2d55d0449771fb39a92387ff06e474ac8f5b75569f6ca6238e630b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/cli/set_hostname.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "65cb14ba37d93c75860508494678f4f332b99b1e3ef80cfae596efe8ace975d6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/cli/set_lookup_source.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "53cda39cfd8bbb13bce2958062fad4776c582b5a3b7409057baaf109c48fcde0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/cli/set_domain_name.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "429379d40cdcf6f5a5ec5083a6668c35232ae58cbfc2d35f806fdc534f9d57f6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/cli/net_system.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d066b65327fddc5ebb988daa19afa503b6af3ccde750f5934370ff42c4060f91",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/cli/set_name_servers.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "447f9cb29635a711722d47d98f2fc24d607c0675b0551fc2db2d6d608779421c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/netconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/netconf/set_domain_list.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0d7c18d4b50fc97835c921d36699769f81d56b48e08618cc7b501ad25ddd6a55",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/netconf/set_hostname.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "06731e212efa0967b942123e39dc3b5545f52d3f80300fe53209ad29c4b89db7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/netconf/set_lookup_source.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "feb2d072b3575c422948c68fa0e52ab35a79eed4b0c4aed8929570bcf6156233",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/netconf/set_domain_name.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ee04d41b5c01613d6395b66c430274ff3c95a5d0b1c292f774d565cfdbb70571",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tests/netconf/set_name_servers.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a90b23a80fdd0634ee3c80d4175b10c79afc85364ad493c23f7a7576c493db76",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55144d29457d670189e343c566fbc6b465b90dbd9f2028efbb12d7fcc9f07b06",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "549cfb05d51408c3c60065091160390246d2d63458bf3a0c697731efe3ff3b59",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tasks/netconf.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0434014351f94d6611d1f4e7b2cdfdf23ec1ccb86b1b33986f410820537e38f1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_system/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8b9faf104c52c534386b8e738f64269d6a8f2ce95a9b82d43e89f5d2c931b0c9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_iosxr_tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_iosxr_tests/templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_iosxr_tests/templates/config.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7ca941952f4366404a261ceda3a81c9c28257e7c189280fe107be2b643565546",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_iosxr_tests/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_iosxr_tests/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "be72e331af68859c94e6106693906f8eedc7e0f1e0f1871cec6063d6573469fc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_netconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_netconf/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_netconf/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_netconf/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "77f22d17431b4aaf868d0ecb66af6baf4087e83cffcd2b94b27198e52782e34f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_netconf/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_netconf/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55144d29457d670189e343c566fbc6b465b90dbd9f2028efbb12d7fcc9f07b06",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_netconf/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_netconf/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_netconf/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_netconf/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_netconf/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "03c73c1ce648bd2159b91cef3220d52324a7a5e3877f403199543c637c13d6f3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5bf1ebb8c51ab33116071b2db75ec0f4653f040f797c8d6cff4e953568960559",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/tests/cli/net_logging.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "443aa0b0afe4c3d230a88f771c9a32a5340ffa1afec23875184e182a857a1872",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/tests/netconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/tests/netconf/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eed5fd4e7e1bcae6ed1b1f0c3758ba9398bd3c1918b834ea0e2de52ebb638e73",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55144d29457d670189e343c566fbc6b465b90dbd9f2028efbb12d7fcc9f07b06",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "549cfb05d51408c3c60065091160390246d2d63458bf3a0c697731efe3ff3b59",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/tasks/netconf.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "383275b8234d718abeb21a0c40146f428189419f122d03b074331e71d462ee8e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_logging/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3de2f427f12d15af36a09be6fe89647b1f82ed8a0d99985194c460ae3b9378ce",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/tests/cli/common_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "524d04ed70b825db5543df8469f0d184d65ea7e10f28952b437cb7487f5e06d8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/tests/cli/common_utils.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bc1d83f2bba36eca3b1536ccdc8f4e682beb41953839fc27dedfa79a917aa623",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/tests/netconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/tests/netconf/misc_tests.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "795c408df67a745b03b0b60c86f989d51262551fd365d0b844f334178dca7d47",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/tests/netconf/common_netconf.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "15427acf2a757cf29574dd39f45c7cc5c6f4ac3ff9c440d82ecdf97b9df6c3d5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55144d29457d670189e343c566fbc6b465b90dbd9f2028efbb12d7fcc9f07b06",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "665288590cd4226da42511817f09ccdfc92df36c9621583cd2c82919af295c5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "549cfb05d51408c3c60065091160390246d2d63458bf3a0c697731efe3ff3b59",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/tasks/netconf.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1545c3e0b0193ea1d9ae89278742f5aa770debfc75959bce20df891575592501",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_smoke/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a7ec5b439ea0123aceb116bc54c862a613b37bbdc5e0bcbe10837361c4bfbd4b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b777429051ce464eeaf8011eccdf779310b9cfbb2cf119059f94119c357e4dd6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a974ea180eebe0b0691a70be2357a9cd31e6a282ee3b222065eaa7aceba255d1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2d495e0656c2c47fee2ae0063ede06afaeb6ed388338557d97ead0dc2682568",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dffad5b9e4bc949658aa3f82a369cf969374307b65925e026307c6a546434b4c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3bb6727e8ca619c3b6539b19e7fd1ef13d7adc173c4adf12c2e277d3d350ffc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7c0761a956b29ef1863f96e4ac35d295e2e97ec31ebac5270bbe97509cd9e8ae",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "19faaea60c2be7a1165f50bd710f280b9af1316af7cea473d7dd0de817418f60",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "202fa7f5c412da1e52ba675f2864e7ca8666b9dfc7bc7bfd33c25d0bda45fafd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "67e44a89e03d3874599648c693123c1a1d755121c89f1837d939e269b99e02c5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5ff94e58a4a24c7f79840ac6b4379f77902b839d3281229f4f3e32bacaec2c42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8b118298711bf10c69fecd8422d16e9c10d1109fc725c44d9ada29f6178fa14",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a9778fba31c09aa6795fe422c8056f851535642282dee55864dc3185cce4149e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bd2c4200a2c8d15171d205041e6622cf990ef703a459684cb15301cade089220",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "befd90d5e15da96e7d05ae3922240830496d4c64bef7e508a2ece8707f8e49d1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eab98e509d6f665a08283924c8b24d00140a5041fcca90b849d9f26d223010cf",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2abb52f64ab00ea05c63fdf8d79d673b1e6ccca4a16268eba95271661a94431e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2eedf6932473c98d452747eba0f44114b5e7f4864671f35c79e1d4cf68e6fdc7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f4385b7f23bc9f1ffe3dd330faa4e7ff572cc9940f6fe7e43bc12e21e296ea9d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "982cf6a4099b5d9847d56c437f767459e0ee8c15c6d56bd609584a3df2355f0c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cee4a074041a65c2ae60a003e4b070385064a0139a532a36df00adf555d0d8b0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7d201f3b376a0d58b3b268b00547a5c61796d068dc9257afd3c051947864e290",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e8a50e755506284f320d3d2ba1c29e994c77025021c3e414a58c2f1e9444434c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ae3e2714ba35525b9c2083876c00108675c9c187df415425a6f29ada3909b2e1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "717d5351bebea57a2f0ccd874a2517595c2dda6c4ca8cb3c6de7c0902aa14b75",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb19a75341b8cd045204b896abc234440510f9b2a9ee079bc5afe45123ebe9e7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv3/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "72128fcfcb919567ff7cc8ef25ad986251080a425f3491e84fc739631d38307f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57d8f1277b1b645ecae495982bf267757151bdd955d453962e6265c9d0b096e5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "242644c5a8a72b726ee65e042f0f359ac2aca81e95cb29dae26a4ae5af2990ea",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0b01e26f2525609e71032cc93c832f4e0ce2e61793269051eab98f84845671c0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6d7f4ec7fdec43a457981bd0e09f904dc6bce7bda05c9444dd16eb92fc4a698e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5278abfbc0cf97dd55bd0c4158cd280f306354a14556097d27c241bc348a3f57",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "40c946b531d7d2cfef88939f5c6cf55d8017b5ed31616a9e7a071cbfca316ac4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ca26b4158eb614153ed0062f85ff25cf17d34c1395c4bf997f377cd324ba54d3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ce659aa5549eb95e1258dba081a7030de685cd6455e0717360cbd151b8ce2c5f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6bf6e25cf3147b919e1c87115f391989a0fd37388321efbaca953ff626dfeab5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d4ccabca2b0f3e9fe176f72d103b0f96b4b7098f7c15e2daa7647bd551ec7cf3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7200105e66871ab7b8ae409eacde75f173708b19fbc46b5dfd512816beb5c0fd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "99346169bd730ad926053bdb6a9c076745625b9ed479019a62507e0dc7447d86",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_ospfv2/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/tests/cli/cli_command.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0de4ac687dc2ba6552f75440fce5eecc4dc039e45e78317761e6ae44e74a1267",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/tests/cli/output.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "458348f49d9fffa9ac331feba477ddbafb5cedd9b23355c8098251be691be8e8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/tests/cli/invalid.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bc2dd00bb154f69de8b5bf29081254c9ab5e763380c95914fd98f2f8c42422cc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/tests/cli/prompt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "820f0f375cb6fb3a1aa82e85e8d353b08c30677edf09bedb6da958cd5e9f066d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/tests/cli/timeout.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0a1a4211377dbfb265842a08d887a5d79bdbd514e0ae023a55e28a500af2173",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/tests/cli/bad_operator.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fc1cacddb46378cdc038a18598919d1514c0df49e4fab3055df211fba2eea250",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/tests/cli/contains.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5b3941e022e40944b25661111af17864508b347e2a955d02b91e823117df06b1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55144d29457d670189e343c566fbc6b465b90dbd9f2028efbb12d7fcc9f07b06",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_command/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "03c73c1ce648bd2159b91cef3220d52324a7a5e3877f403199543c637c13d6f3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "66b2ac21bcd8f4a2da15c6b7ea7fce725841457ce0b791f2e68048180865977c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2226b94d04e1fb716bf69c941b9b72c7e67c8d4e493851244245969845b72dc9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a547b59a58a7709cbdef0d993d9d5c64ae5996b7d1a535a22ff1dfb4ff6873d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/_populate.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4f7f2f0d23a4b5701aeea3af1219f259761cb1e264d71be7adbf73dca2c1dcf7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7bb63a77791f1e56fa596f54fc7bf895290f8360eb271e98f6ea42981808b5b2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a4b7d79bb62c8044f72ce338537100c0d4fd1526b73d1ecda61cabfb8d3a98fa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7d7e721da202c7d0bad2ef019bb339e540ad67be10be6899e510d2c5425602b7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "af465c559750ca939573c88c271a286d7c533513f473d8a19d91a71600b17221",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec711b83177c995449aa4735455ec1e5714d5935a3a952a2c22c0a57649c2e55",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/deleted_all.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "75bab8b5d272963514a704c10ad108c948672baab33b9aaa2c5d730891191b93",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c73c549a4b78f54b9fc1361e0f49687fbb4f69646a8f7ee19810ec105da3e17e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "485af2cedc892533b257cd66f392f354f6f125fe2b1007f4608fc90188c56808",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "199bf47e96500d8905225fa79e76ecf9b1df5f17807aea2d48c826ff902e8ebe",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e159ecb19984c90d7b670f4d9a1be5e893c822d25ce204cc2176e2602cd8eecd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_acl_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "67ffd6e9552f55c250f9d7bb1e0ab7838c266d37deee383105b11963ca95611f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "42188300de28845817de67208bcdbeed34cc73ffbe4b574266acaf246951d521",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli/_populate.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0f345534b60858c2a0cc00b83d32101b267b4d6dc370b69aac7cda311d4146f3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4abc08aceef2579b4a247e81beba6e306c4fafad7421e2bbc2af2ce174096dc7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "576970062a5818579acbb6be83fb2973b2080d833d88f04b369baf6508b9ee67",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d51ace0aaffc2b14581e942c73649990785065e7b89a8e12d6f37a7150cd1845",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "911b64cb53c7eae6673f82eb9cb42e0913b7dfbf7dd73c58e3a334ac5794caeb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "439480acae03caa0a5f19f25e7cb8db271fcf6e5bf52e2e9ca36b14f1f807631",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e9f804628cb14a6fe8e3d0426db91ec646310f76d5aa94b4b1d4ea1b1edde449",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b5d80f62ce5fef5d650cb373ff21ab0391ad05f30d036487caf22b6e314221d7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7b26f69931de2b34eb9bdc7544520b6e52494b5c408caa2d3914d0022723ca2a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3a4ed71b399bcf1bbc0fd2978888ebf6d151bee360e2ab4d1c87fbe35198c936",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_lldp_global/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5e3a4ec41803fd082099a1f89ec45f530fc450062083b1cc1133e38a46bce57d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bd4a70bc35f26fc2d998a06770cd29741c0ed39eecec19c4986420936fb5b623",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3454f33f1e288fe83f937b6a4e68c9687a5e1d8b27f97f7e4d63713d3f9a912b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7eea9853e9b7841c5a8856151339bb59d52fe48e06f3528a571bbf504ab96035",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dc96339b5bc4eee747eca626faf3bce62cc514ccf017556e0ead6fe29b2bb8a9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ecba8436f1295b7644b1be0d59204e38083c6bec8d2387c7c3f195c98f2865d3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bebeda97e6b06c820e9c3e647a789512a903ab709eecfd7845ff47c313979ed7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "410e96224f36a63e4e111b87441c75b8ba3b3cf25fea000faa6bd4abf791bb9d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a0b7ffadbd391f7df091ed5deab94128859a9b00296d3025a8d21ed4f2faa6eb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "862dd8b949b52de5dcc7c126861f66471a772a0b8cc9bcd3703adb89cc89f7e8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tests/cli/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b6d9291bd9021d78f34ff051dd8534d26ece40dceec06d33f95146e6368c190b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/vars/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5a69feefeab189f95f21fc8cea8ffbac698a9ac1a0221c44f0c744a05decd21f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c7a04f67f78ee48d4cd68a3fc7ec07e8736cf82ecdca0f9600eb2fbb621d390",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2ed6e2e9ba3726d6661ba7938c2a5bb607cce4e616fc0edb05e1e43d365e5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_l2_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90528688ff4d0b98df05918adb9b9740dfcc14e9c9a544c2f7507613d21e98a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/files",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/files/private",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "defce0b7196d17e47b5dd1ba865e6287590deb3638a980bcbc3cc2d2b9975060",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/files/public2.pub",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "84fba91f96acc846b7c33b308b9005d335053679b828127d67f26d500a5a4036",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/files/public.pub",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cd8730417146b7691724621b213a5c6aa5e5120829714a2f62334ee23f8c4c6f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "85a10631a55c69ea44597b2516d9698198b36eeb7afcca51ce32a951ce5a0de4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/tests/common/auth.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "df95fcb8003807c2262391d722c858b96d84bb17bb2d7995504c7433199b435a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/tests/netconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/tests/netconf/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "23a4dc778c05fa2c50f9c43dd896bb5f557c3f354e2cb5a3eac774ad50be65a2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55144d29457d670189e343c566fbc6b465b90dbd9f2028efbb12d7fcc9f07b06",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "549cfb05d51408c3c60065091160390246d2d63458bf3a0c697731efe3ff3b59",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/tasks/netconf.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c825cc804755db74748aaad4505ffdcc9594e85c65b37235905c8128fff66de1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_user/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6502b43e3efc55fef84c81e70115c95f24580b588fd6f92be1772894e7be27e7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tests/cli/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b2efa8378b880bf3b2f29ff8726838f9961c351b41aff7ff5b2396afea52fa51",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tests/cli/net_interface.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5cda7a61a2172c720dfb3ad2ba6e57fab99d310642dfbf0c0160f065107641f4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tests/cli/intent.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fe19e36f2173fe00bf842634e812024b74d9f67bfcfcd8b3187f92f6e7730b76",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tests/netconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tests/netconf/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e2222f146c454e4eff2ece7fe8bdba4cffe7b4d0b550769985c21c9a0996b499",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tests/netconf/net_interface.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "63ee675e67664632f570f147843ca0bf82582663aa2e4e68e77da8c09c635ae9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tests/netconf/intent.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb06be783fcbfe143eefd6a0b2e76d8627cf87f5337988eca5ac48220391e7fa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55144d29457d670189e343c566fbc6b465b90dbd9f2028efbb12d7fcc9f07b06",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "549cfb05d51408c3c60065091160390246d2d63458bf3a0c697731efe3ff3b59",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tasks/netconf.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "936b653bc700e0fc678c95bf7d0f499f0888446cc5577d0f2f1c86baf7ab88d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/iosxr_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "31cfb1ca71bf9a422c1b29c516d44cb879dbd4e6f5735e8be27fd4e8099d0490",
+ "format": 1
+ },
+ {
+ "name": "tox.ini",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c6e94fc72827b917d55ef15386cbe48fc9eca81755aed8f532d8da97a0be3483",
+ "format": 1
+ },
+ {
+ "name": "bindep.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "80645079eb025b3a905b4775ac545d080a3d7d35d537c31e04f7197c94315ab5",
+ "format": 1
+ },
+ {
+ "name": ".yamllint",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "827ef9e031ecdcaf137be239d33ef93fcbbc3611cbb6b30b0e507d0e03373d0e",
+ "format": 1
+ },
+ {
+ "name": "meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "meta/runtime.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e46736dd2d3de276da22e919ffefa469879c17d18a265d568d9dae41f2d48794",
+ "format": 1
+ },
+ {
+ "name": "README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "39fecdddbdc4cf001784d967e83be781e74060a31dbab7dce1c3e5dd8159355a",
+ "format": 1
+ },
+ {
+ "name": "requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3b7aa3bebb06a3546133073f5d120b176829f651e0124f8bf2d8288d5b0fa368",
+ "format": 1
+ },
+ {
+ "name": ".zuul.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "98905acf2eec9aa791cbf5a9effe6e7402bfaa3d2d204c30013120e00668da6e",
+ "format": 1
+ },
+ {
+ "name": "docs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_command_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2f25570ea9b9ed670793f13aafe994d60eee881528a1ec3c6e5edeabe7f4b349",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_logging_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "045da4183021715026faae3ac4af07b26e8bbb403a387da64ffcdecfb406555c",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fc7c248be198a09d144a65cdede8b5ff5f88a9b1c227c51f8807e27e5a8eddcf",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_acls_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "38340cb085b7cbb935eef7c613c7d4e90e37104928941e07601dad3d91f41c76",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_system_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d4bd4d382be85042d0aab91e60f2cd481786bb343cb676518df0fc8ed42fe5e0",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_netconf.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0b0305fa0ec4e467f8e3b14597ff86cd1c70c4aaf007c46386a980d5138016bd",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_ospfv3_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bdf4e54a429edbe73da54f8d833ddc12f2ee29e7cd4b4353deadfbc8fce6c256",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_static_routes_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "96060c509808d2948c880644829c8e7d3aa38d9563aa11e0e654cad6e13b7a8c",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_ospfv2_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "68c4f74076032ef1d697e74dc8f12654173ad24a60cec3ad9b769c55640d1363",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_acl_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f1fea6b133aa9f957d6f32371e4956c5ed20b78483e2f0df7c4a07494a196a62",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_lag_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5afc74470d233d99fb8ebfcef625f0f01ed9d906ce71f8f3d894005d99c7ef67",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_cliconf.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d943266ec3c20d3afadd5275c5d330a0c63b3cef3a18522d9f2bd92fc0d7e425",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_ospf_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec1faf0712bc7f9671ff9273d0ca0e2bd6f0d0e6ed53cf8cfafdf867451e7c38",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_l2_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c86c80fe84adeb1faa34c750feca8a9aaa0cb39c59e8fa3573f55c19cf4637cc",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_facts_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b774e4df9507613adcbceecd530488a78c92b41e1fc30f51ac6e453a4223db31",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_netconf_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e0ab5040ed80f4e528ade4dcc493b10227b7a2fa360b9763cebb34ca167d2f46",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_lacp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ed7657079e260c2c00a1581aac025b49079b10eff2233d218c17340cc82b1c91",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_lacp_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c3c2f4cd8cb5a595ce36425b970c2555e4eb70986a94615b346cf08b0ef3c2d3",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_config_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a6c917df4f62708c9c62ec0d89998bc7e1bbb0389fcd07b7871bca65d4be060e",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_lldp_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57f3ca36b100170d1696a95f910246b70c17677661ccca9d92ddb67f9a744101",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dc17f5e09fd605fa747b39a0df671d685bc888cfd28163f726de0b21ec655e87",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_user_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "61180d85901d74d9b6ec2bc5ff382f7303b0d805f49dbb2389991e452610ed6b",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_l3_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2658b11270dd401e435f72a822fa0d0e3d3cc3069c0d0d49e34ce1bd7e09bdd8",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_lldp_global_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "68356dd1ae98e0bec8fefd2b1af27341f085104d59a63b675435f05512ef3e96",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_banner_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c99e9d23652b892532c1e2721f453a65503c413f6ab1d303e0f538b28d8546ab",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.iosxr.iosxr_bgp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3de347a4f436bb7fa5c15fbd76abc3667337f994dddc8e96ef44be5f228a1a63",
+ "format": 1
+ }
+ ],
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/LICENSE b/collections-debian-merged/ansible_collections/cisco/iosxr/LICENSE
new file mode 100644
index 00000000..f288702d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/MANIFEST.json b/collections-debian-merged/ansible_collections/cisco/iosxr/MANIFEST.json
new file mode 100644
index 00000000..17aa0726
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/MANIFEST.json
@@ -0,0 +1,35 @@
+{
+ "collection_info": {
+ "namespace": "cisco",
+ "name": "iosxr",
+ "version": "1.2.1",
+ "authors": [
+ "Ansible Network Community (ansible-network)"
+ ],
+ "readme": "README.md",
+ "tags": [
+ "cisco",
+ "iosxr",
+ "networking",
+ "netconf"
+ ],
+ "description": "Ansible Network Collection for Cisco IOSXR devices.",
+ "license": [],
+ "license_file": "LICENSE",
+ "dependencies": {
+ "ansible.netcommon": "*"
+ },
+ "repository": "https://github.com/ansible-collections/cisco.iosxr",
+ "documentation": null,
+ "homepage": null,
+ "issues": null
+ },
+ "file_manifest_file": {
+ "name": "FILES.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0db56178177fc6841d3fefa01bdaf998da31ba0cb26ce204644969818b31460",
+ "format": 1
+ },
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/README.md b/collections-debian-merged/ansible_collections/cisco/iosxr/README.md
new file mode 100644
index 00000000..257ec82f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/README.md
@@ -0,0 +1,154 @@
+# Cisco IOSXR Collection
+[![CI](https://zuul-ci.org/gated.svg)](https://dashboard.zuul.ansible.com/t/ansible/project/github.com/ansible-collections/cisco.iosxr) <!--[![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/vyos)](https://codecov.io/gh/ansible-collections/cisco.iosxr)-->
+
+The Ansible Cisco IOSXR collection includes a variety of Ansible content to help automate the management of Cisco IOSXR network appliances.
+
+This collection has been tested against Cisco IOSXR version 6.1.3.
+
+<!--start requires_ansible-->
+## Ansible version compatibility
+
+This collection has been tested against following Ansible versions: **>=2.9.10,<2.11**.
+
+Plugins and modules within a collection may be tested with only specific Ansible versions.
+A collection may contain metadata that identifies these versions.
+PEP440 is the schema used to describe the versions of Ansible.
+<!--end requires_ansible-->
+
+### Supported connections
+The Cisco IOSXR collection supports ``network_cli`` and ``netconf`` connections.
+
+## Included content
+<!--start collection content-->
+### Cliconf plugins
+Name | Description
+--- | ---
+[cisco.iosxr.iosxr](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_cliconf.rst)|Use iosxr cliconf to run command on Cisco IOS XR platform
+
+### Filter plugins
+Name | Description
+--- | ---
+
+### Netconf plugins
+Name | Description
+--- | ---
+[cisco.iosxr.iosxr](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_netconf.rst)|Use iosxr netconf plugin to run netconf commands on Cisco IOSXR platform
+
+### Modules
+Name | Description
+--- | ---
+[cisco.iosxr.iosxr_acl_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_acl_interfaces_module.rst)|ACL interfaces resource module
+[cisco.iosxr.iosxr_acls](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_acls_module.rst)|ACLs resource module
+[cisco.iosxr.iosxr_banner](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_banner_module.rst)|Manage multiline banners on Cisco IOS XR devices
+[cisco.iosxr.iosxr_bgp](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_bgp_module.rst)|Configure global BGP protocol settings on Cisco IOS-XR
+[cisco.iosxr.iosxr_command](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_command_module.rst)|Run commands on remote devices running Cisco IOS XR
+[cisco.iosxr.iosxr_config](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_config_module.rst)|Manage Cisco IOS XR configuration sections
+[cisco.iosxr.iosxr_facts](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_facts_module.rst)|Get facts about iosxr devices.
+[cisco.iosxr.iosxr_interface](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_interface_module.rst)|(deprecated, removed after 2022-06-01) Manage Interface on Cisco IOS XR network devices
+[cisco.iosxr.iosxr_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_interfaces_module.rst)|Interfaces resource module
+[cisco.iosxr.iosxr_l2_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_l2_interfaces_module.rst)|L2 interfaces resource module
+[cisco.iosxr.iosxr_l3_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_l3_interfaces_module.rst)|L3 interfaces resource module
+[cisco.iosxr.iosxr_lacp](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_lacp_module.rst)|LACP resource module
+[cisco.iosxr.iosxr_lacp_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_lacp_interfaces_module.rst)|LACP interfaces resource module
+[cisco.iosxr.iosxr_lag_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_lag_interfaces_module.rst)|LAG interfaces resource module
+[cisco.iosxr.iosxr_lldp_global](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_lldp_global_module.rst)|LLDP resource module
+[cisco.iosxr.iosxr_lldp_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_lldp_interfaces_module.rst)|LLDP interfaces resource module
+[cisco.iosxr.iosxr_logging](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_logging_module.rst)|Configuration management of system logging services on network devices
+[cisco.iosxr.iosxr_netconf](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_netconf_module.rst)|Configures NetConf sub-system service on Cisco IOS-XR devices
+[cisco.iosxr.iosxr_ospf_interfaces](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_ospf_interfaces_module.rst)|OSPF Interfaces Resource Module.
+[cisco.iosxr.iosxr_ospfv2](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_ospfv2_module.rst)|OSPFv2 resource module
+[cisco.iosxr.iosxr_ospfv3](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_ospfv3_module.rst)|ospfv3 resource module
+[cisco.iosxr.iosxr_static_routes](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_static_routes_module.rst)|Static routes resource module
+[cisco.iosxr.iosxr_system](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_system_module.rst)|Manage the system attributes on Cisco IOS XR devices
+[cisco.iosxr.iosxr_user](https://github.com/ansible-collections/cisco.iosxr/blob/main/docs/cisco.iosxr.iosxr_user_module.rst)|Manage the aggregate of local users on Cisco IOS XR device
+
+<!--end collection content-->
+
+Click the ``Content`` button to see the list of content included in this collection.
+
+## Installing this collection
+
+You can install the Cisco IOSXR collection with the Ansible Galaxy CLI:
+
+ ansible-galaxy collection install cisco.iosxr
+
+You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format:
+
+```yaml
+---
+collections:
+ - name: cisco.iosxr
+```
+## Using this collection
+
+
+This collection includes [network resource modules](https://docs.ansible.com/ansible/latest/network/user_guide/network_resource_modules.html).
+
+### Using modules from the Cisco IOSXR collection in your playbooks
+
+You can call modules by their Fully Qualified Collection Namespace (FQCN), such as `cisco.iosxr.iosxr_l2_interfaces`.
+The following example task replaces configuration changes in the existing configuration on a Cisco IOSXR network device, using the FQCN:
+
+```yaml
+---
+ - name: Replace device configuration of specified L2 interfaces with provided configuration.
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ l2transport: True
+ l2protocol:
+ - stp: forward
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - any
+ state: replaced
+
+```
+
+**NOTE**: For Ansible 2.9, you may not see deprecation warnings when you run your playbooks with this collection. Use this documentation to track when a module is deprecated.
+
+
+### See Also:
+
+* [Cisco IOSXR Platform Options](https://docs.ansible.com/ansible/latest/network/user_guide/platform_iosxr.html)
+* [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.
+
+## Contributing to this collection
+
+We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the [Cisco IOSXR collection repository](https://github.com/ansible-collections/cisco.iosxr). See [Contributing to Ansible-maintained collections](https://docs.ansible.com/ansible/devel/community/contributing_maintained_collections.html#contributing-maintained-collections) for complete details.
+
+You can also join us on:
+
+- Freenode IRC - ``#ansible-network`` Freenode channel
+- Slack - https://ansiblenetwork.slack.com
+
+See the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) for details on contributing to Ansible.
+
+### Code of Conduct
+This collection follows the Ansible project's
+[Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html).
+Please read and familiarize yourself with this document.
+
+## Release notes
+
+Release notes are available [here](https://github.com/ansible-collections/cisco.iosxr/blob/main/changelogs/CHANGELOG.rst).
+
+## Roadmap
+
+<!-- Optional. Include the roadmap for this collection, and the proposed release/versioning strategy so users can anticipate the upgrade/update cycle. -->
+
+## More information
+
+- [Ansible network resources](https://docs.ansible.com/ansible/latest/network/getting_started/network_resources.html)
+- [Ansible Collection overview](https://github.com/ansible-collections/overview)
+- [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html)
+- [Ansible Developer guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html)
+- [Ansible Community code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html)
+
+## Licensing
+
+GNU General Public License v3.0 or later.
+
+See [LICENSE](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text.
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/bindep.txt b/collections-debian-merged/ansible_collections/cisco/iosxr/bindep.txt
new file mode 100644
index 00000000..ba9c980f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/bindep.txt
@@ -0,0 +1,6 @@
+# This is a cross-platform list tracking distribution packages needed by tests;
+# see https://docs.openstack.org/infra/bindep/ for additional information.
+
+gcc-c++ [doc test platform:rpm]
+python3-devel [test platform:rpm]
+python3 [test platform:rpm]
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/changelogs/CHANGELOG.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/changelogs/CHANGELOG.rst
new file mode 100644
index 00000000..b217dbb7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/changelogs/CHANGELOG.rst
@@ -0,0 +1,133 @@
+====================================
+Cisco Iosxr Collection Release Notes
+====================================
+
+.. contents:: Topics
+
+
+v1.2.1
+======
+
+Bugfixes
+--------
+
+- Update docs to clarify the idemptonecy releated caveat and add it in the output warnings (https://github.com/ansible-collections/ansible.netcommon/pull/189)
+
+v1.2.0
+======
+
+Minor Changes
+-------------
+
+- Added iosxr ospf_interfaces resource module (https://github.com/ansible-collections/cisco.iosxr/pull/84).
+
+Bugfixes
+--------
+
+- Add version key to galaxy.yaml to work around ansible-galaxy bug
+- Fix iosxr_acls throwing a traceback with overridden (https://github.com/ansible-collections/cisco.iosxr/issues/87).
+- require one to specify a banner delimiter in order to fix a timeout when using multi-line strings
+
+New Modules
+-----------
+
+- iosxr_ospf_interfaces - OSPF Interfaces Resource Module.
+
+v1.1.0
+======
+
+Minor Changes
+-------------
+
+- Added iosxr ospfv3 resource module (https://github.com/ansible-collections/cisco.iosxr/pull/81).
+- Platform supported coments token to be provided when invoking the object.
+
+New Modules
+-----------
+
+- iosxr_ospfv3 - ospfv3 resource module
+
+v1.0.5
+======
+
+Bugfixes
+--------
+
+- Confirmed commit fails with TypeError in IOS XR netconf plugin (https://github.com/ansible-collections/cisco.iosxr/issues/74)
+- running config data for interface split when substring interface starts with newline
+
+v1.0.4
+======
+
+Release Summary
+---------------
+
+- Rereleased 1.0.3 with updated changelog.
+
+v1.0.3
+======
+
+Release Summary
+---------------
+
+- Rereleased 1.0.2 with regenerated documentation.
+
+v1.0.2
+======
+
+Bugfixes
+--------
+
+- Make `src`, `backup` and `backup_options` in iosxr_config work when module alias is used (https://github.com/ansible-collections/cisco.iosxr/pull/63).
+- Makes sure that docstring and argspec are in sync and removes sanity ignores (https://github.com/ansible-collections/cisco.iosxr/pull/62).
+- Update docs after sanity fixes to modules.
+
+v1.0.1
+======
+
+Minor Changes
+-------------
+
+- Bring plugin table to correct position (https://github.com/ansible-collections/cisco.iosxr/pull/44)
+
+v1.0.0
+======
+
+New Plugins
+-----------
+
+Cliconf
+~~~~~~~
+
+- iosxr - Use iosxr cliconf to run command on Cisco IOS XR platform
+
+Netconf
+~~~~~~~
+
+- iosxr - Use iosxr netconf plugin to run netconf commands on Cisco IOSXR platform
+
+New Modules
+-----------
+
+- iosxr_acl_interfaces - ACL interfaces resource module
+- iosxr_acls - ACLs resource module
+- iosxr_banner - Manage multiline banners on Cisco IOS XR devices
+- iosxr_bgp - Configure global BGP protocol settings on Cisco IOS-XR
+- iosxr_command - Run commands on remote devices running Cisco IOS XR
+- iosxr_config - Manage Cisco IOS XR configuration sections
+- iosxr_facts - Get facts about iosxr devices.
+- iosxr_interface - (deprecated, removed after 2022-06-01) Manage Interface on Cisco IOS XR network devices
+- iosxr_interfaces - Interfaces resource module
+- iosxr_l2_interfaces - L2 interfaces resource module
+- iosxr_l3_interfaces - L3 interfaces resource module
+- iosxr_lacp - LACP resource module
+- iosxr_lacp_interfaces - LACP interfaces resource module
+- iosxr_lag_interfaces - LAG interfaces resource module
+- iosxr_lldp_global - LLDP resource module
+- iosxr_lldp_interfaces - LLDP interfaces resource module
+- iosxr_logging - Configuration management of system logging services on network devices
+- iosxr_netconf - Configures NetConf sub-system service on Cisco IOS-XR devices
+- iosxr_ospfv2 - OSPFv2 resource module
+- iosxr_static_routes - Static routes resource module
+- iosxr_system - Manage the system attributes on Cisco IOS XR devices
+- iosxr_user - Manage the aggregate of local users on Cisco IOS XR device
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/changelogs/changelog.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/changelogs/changelog.yaml
new file mode 100644
index 00000000..399b9b6e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/changelogs/changelog.yaml
@@ -0,0 +1,167 @@
+ancestor: null
+releases:
+ 1.0.0:
+ modules:
+ - description: ACL interfaces resource module
+ name: iosxr_acl_interfaces
+ namespace: ''
+ - description: ACLs resource module
+ name: iosxr_acls
+ namespace: ''
+ - description: Manage multiline banners on Cisco IOS XR devices
+ name: iosxr_banner
+ namespace: ''
+ - description: Configure global BGP protocol settings on Cisco IOS-XR
+ name: iosxr_bgp
+ namespace: ''
+ - description: Run commands on remote devices running Cisco IOS XR
+ name: iosxr_command
+ namespace: ''
+ - description: Manage Cisco IOS XR configuration sections
+ name: iosxr_config
+ namespace: ''
+ - description: Get facts about iosxr devices.
+ name: iosxr_facts
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manage Interface on Cisco
+ IOS XR network devices
+ name: iosxr_interface
+ namespace: ''
+ - description: Interfaces resource module
+ name: iosxr_interfaces
+ namespace: ''
+ - description: L2 interfaces resource module
+ name: iosxr_l2_interfaces
+ namespace: ''
+ - description: L3 interfaces resource module
+ name: iosxr_l3_interfaces
+ namespace: ''
+ - description: LACP resource module
+ name: iosxr_lacp
+ namespace: ''
+ - description: LACP interfaces resource module
+ name: iosxr_lacp_interfaces
+ namespace: ''
+ - description: LAG interfaces resource module
+ name: iosxr_lag_interfaces
+ namespace: ''
+ - description: LLDP resource module
+ name: iosxr_lldp_global
+ namespace: ''
+ - description: LLDP interfaces resource module
+ name: iosxr_lldp_interfaces
+ namespace: ''
+ - description: Configuration management of system logging services on network
+ devices
+ name: iosxr_logging
+ namespace: ''
+ - description: Configures NetConf sub-system service on Cisco IOS-XR devices
+ name: iosxr_netconf
+ namespace: ''
+ - description: OSPFv2 resource module
+ name: iosxr_ospfv2
+ namespace: ''
+ - description: Static routes resource module
+ name: iosxr_static_routes
+ namespace: ''
+ - description: Manage the system attributes on Cisco IOS XR devices
+ name: iosxr_system
+ namespace: ''
+ - description: Manage the aggregate of local users on Cisco IOS XR device
+ name: iosxr_user
+ namespace: ''
+ plugins:
+ cliconf:
+ - description: Use iosxr cliconf to run command on Cisco IOS XR platform
+ name: iosxr
+ namespace: null
+ netconf:
+ - description: Use iosxr netconf plugin to run netconf commands on Cisco IOSXR
+ platform
+ name: iosxr
+ namespace: null
+ release_date: '2020-06-23'
+ 1.0.1:
+ changes:
+ minor_changes:
+ - Bring plugin table to correct position (https://github.com/ansible-collections/cisco.iosxr/pull/44)
+ fragments:
+ - 44-plugin-doc-fixes.yaml
+ release_date: '2020-06-23'
+ 1.0.2:
+ changes:
+ bugfixes:
+ - Make `src`, `backup` and `backup_options` in iosxr_config work when module
+ alias is used (https://github.com/ansible-collections/cisco.iosxr/pull/63).
+ - Makes sure that docstring and argspec are in sync and removes sanity ignores
+ (https://github.com/ansible-collections/cisco.iosxr/pull/62).
+ - Update docs after sanity fixes to modules.
+ fragments:
+ - handle_src_backup_with_module_alias.yaml
+ - remove_ignores_for_sanity.yaml
+ - update_docs.yaml
+ release_date: '2020-06-23'
+ 1.0.3:
+ changes:
+ release_summary:
+ - Rereleased 1.0.2 with regenerated documentation.
+ fragments:
+ - 1.0.3.yaml
+ release_date: '2020-07-31'
+ 1.0.4:
+ changes:
+ release_summary:
+ - Rereleased 1.0.3 with updated changelog.
+ fragments:
+ - 1.0.4.yaml
+ release_date: '2020-08-07'
+ 1.0.5:
+ changes:
+ bugfixes:
+ - Confirmed commit fails with TypeError in IOS XR netconf plugin (https://github.com/ansible-collections/cisco.iosxr/issues/74)
+ - running config data for interface split when substring interface starts with
+ newline
+ fragments:
+ - 64-incorrect-interface-decription-parsing-fix.yaml
+ - iosxr_netconf_config_commit_fix.yaml
+ release_date: '2020-08-28'
+ 1.1.0:
+ changes:
+ minor_changes:
+ - Added iosxr ospfv3 resource module (https://github.com/ansible-collections/cisco.iosxr/pull/81).
+ - Platform supported coments token to be provided when invoking the object.
+ fragments:
+ - 54_iosxr_ospfv3_module_added.yaml
+ - provide_fuctionality_to_utilize_remarks.yaml
+ modules:
+ - description: ospfv3 resource module
+ name: iosxr_ospfv3
+ namespace: ''
+ release_date: '2020-10-01'
+ 1.2.0:
+ changes:
+ bugfixes:
+ - Add version key to galaxy.yaml to work around ansible-galaxy bug
+ - Fix iosxr_acls throwing a traceback with overridden (https://github.com/ansible-collections/cisco.iosxr/issues/87).
+ - require one to specify a banner delimiter in order to fix a timeout when using
+ multi-line strings
+ minor_changes:
+ - Added iosxr ospf_interfaces resource module (https://github.com/ansible-collections/cisco.iosxr/pull/84).
+ fragments:
+ - 79-iosxr-multi-line-banner-fix.yaml
+ - fix_iosxr_acls.yaml
+ - galaxy-version.yaml
+ - ospf_interfaces_resource_module_added.yaml
+ modules:
+ - description: OSPF Interfaces Resource Module.
+ name: iosxr_ospf_interfaces
+ namespace: ''
+ release_date: '2020-11-26'
+ 1.2.1:
+ changes:
+ bugfixes:
+ - Update docs to clarify the idemptonecy releated caveat and add it in the output
+ warnings (https://github.com/ansible-collections/ansible.netcommon/pull/189)
+ fragments:
+ - iosxr_config_diff_doc_update.yaml
+ release_date: '2021-01-28'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/changelogs/config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/changelogs/config.yaml
new file mode 100644
index 00000000..b5f824ee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/changelogs/config.yaml
@@ -0,0 +1,30 @@
+changelog_filename_template: CHANGELOG.rst
+changelog_filename_version_depth: 0
+changes_file: changelog.yaml
+changes_format: combined
+keep_fragments: false
+mention_ancestor: true
+new_plugins_after_name: removed_features
+notesdir: fragments
+prelude_section_name: release_summary
+prelude_section_title: Release Summary
+flatmap: true
+sections:
+- - major_changes
+ - Major Changes
+- - minor_changes
+ - Minor Changes
+- - breaking_changes
+ - Breaking Changes / Porting Guide
+- - deprecated_features
+ - Deprecated Features
+- - removed_features
+ - Removed Features (previously deprecated)
+- - security_fixes
+ - Security Fixes
+- - bugfixes
+ - Bugfixes
+- - known_issues
+ - Known Issues
+title: Cisco Iosxr Collection
+trivial_section_name: trivial
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_acl_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_acl_interfaces_module.rst
new file mode 100644
index 00000000..7097b018
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_acl_interfaces_module.rst
@@ -0,0 +1,774 @@
+.. _cisco.iosxr.iosxr_acl_interfaces_module:
+
+
+********************************
+cisco.iosxr.iosxr_acl_interfaces
+********************************
+
+**ACL interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages adding and removing Access Control Lists (ACLs) from interfaces on devices running IOS-XR software.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="4">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of ACL options for interfaces.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>access_groups</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies ACLs attached to the interfaces.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the ACLs for the provided AFI.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the direction of packets that the ACL will be applied on.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the name of the IPv4/IPv6 ACL for the interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the AFI for the ACL(s) to be configured on this interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name/Identifier for the interface</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ <li>rendered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:ios#sh running-config interface
+ # Wed Jan 15 12:22:32.911 UTC
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+
+ - name: Merge the provided configuration with the existing running configuration
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: acl_1
+ direction: in
+ - name: acl_2
+ direction: out
+ - afi: ipv6
+ acls:
+ - name: acl6_1
+ direction: in
+ - name: acl6_2
+ direction: out
+
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: acl_1
+ direction: out
+ state: merged
+
+ # After state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:ios#sh running-config interface
+ # Wed Jan 15 12:27:49.378 UTC
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # ipv4 access-group acl_1 ingress
+ # ipv4 access-group acl_2 egress
+ # ipv6 access-group acl6_1 ingress
+ # ipv6 access-group acl6_2 egress
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # ipv4 access-group acl_1 egress
+ # !
+
+ # Using merged to update interface ACL configuration
+
+ # Before state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:ios#sh running-config interface
+ # Wed Jan 15 12:27:49.378 UTC
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # ipv4 access-group acl_1 ingress
+ # ipv4 access-group acl_2 egress
+ # ipv6 access-group acl6_1 ingress
+ # ipv6 access-group acl6_2 egress
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # ipv4 access-group acl_1 egress
+ # !
+ #
+
+ - name: Update acl_interfaces configuration using merged
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: acl_2
+ direction: out
+ - name: acl_1
+ direction: in
+ state: merged
+
+ # After state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:ios#sh running-config interface
+ # Wed Jan 15 12:27:49.378 UTC
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # ipv4 access-group acl_1 ingress
+ # ipv4 access-group acl_2 egress
+ # ipv6 access-group acl6_1 ingress
+ # ipv6 access-group acl6_2 egress
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # ipv4 access-group acl_1 ingress
+ # ipv4 access-group acl_2 egress
+ # !
+ #
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:ios#sh running-config interface
+ # Wed Jan 15 12:34:56.689 UTC
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # ipv4 access-group acl_1 ingress
+ # ipv4 access-group acl_2 egress
+ # ipv6 access-group acl6_1 ingress
+ # ipv6 access-group acl6_2 egress
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # ipv4 access-group acl_1 egress
+ # !
+
+ - name: Replace device configurations of listed interface with provided configurations
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+ - afi: ipv6
+ acls:
+ - name: acl6_3
+ direction: in
+ state: replaced
+
+ # After state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:ios#sh running-config interface
+ # Wed Jan 15 12:34:56.689 UTC
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # ipv6 access-group acl6_3 ingress
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # ipv4 access-group acl_1 egress
+ # !
+ #
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:ios#sh running-config interface
+ # Wed Jan 15 12:34:56.689 UTC
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # ipv4 access-group acl_1 ingress
+ # ipv4 access-group acl_2 egress
+ # ipv6 access-group acl6_1 ingress
+ # ipv6 access-group acl6_2 egress
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # ipv4 access-group acl_1 egress
+ # !
+ #
+
+ - name: Overridde all interface ACL configuration with provided configuration
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: acl_2
+ direction: in
+ - afi: ipv6
+ acls:
+ - name: acl6_3
+ direction: out
+ state: overridden
+
+ # After state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:ios#sh running-config interface
+ # Wed Jan 15 12:34:56.689 UTC
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # ipv4 access-group acl_2 ingress
+ # ipv6 access-group acl6_3 egress
+ # !
+ #
+
+ # Using 'deleted' to delete all ACL attributes of a single interface
+
+ # Before state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:ios#sh running-config interface
+ # Wed Jan 15 12:34:56.689 UTC
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # ipv4 access-group acl_1 ingress
+ # ipv4 access-group acl_2 egress
+ # ipv6 access-group acl6_1 ingress
+ # ipv6 access-group acl6_2 egress
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # ipv4 access-group acl_1 egress
+ # !
+ #
+
+ - name: Delete all ACL attributes of GigabitEthernet0/0/0/1
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:ios#sh running-config interface
+ # Wed Jan 15 12:34:56.689 UTC
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # ipv4 access-group acl_1 ingress
+ # ipv4 access-group acl_2 egress
+ # ipv6 access-group acl6_1 ingress
+ # ipv6 access-group acl6_2 egress
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ #
+
+ # Using 'deleted' to remove all ACLs attached to all the interfaces in the device
+
+ # Before state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:ios#sh running-config interface
+ # Wed Jan 15 12:34:56.689 UTC
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # ipv4 access-group acl_1 ingress
+ # ipv4 access-group acl_2 egress
+ # ipv6 access-group acl6_1 ingress
+ # ipv6 access-group acl6_2 egress
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # ipv4 access-group acl_1 egress
+ # !
+ #
+
+ - name: Delete all ACL interfaces configuration from the device
+ cisco.iosxr.iosxr_acl_interfaces:
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:ios#sh running-config interface
+ # Wed Jan 15 12:34:56.689 UTC
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ #
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ #
+ # interface MgmtEth0/RP0/CPU0/0
+ # ipv4 address dhcp
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # ipv4 access-group acl_1 ingress
+ # ipv4 access-group acl_2 egress
+ # ipv6 access-group acl6_1 ingress
+ # ipv6 access-group acl6_2 egress
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # ipv4 access-group acl_1 egress
+ # !
+
+ # - name: Convert ACL interfaces config to argspec without connecting to the appliance
+ # cisco.iosxr.iosxr_acl_interfaces:
+ # running_config: "{{ lookup('file', './parsed.cfg') }}"
+ # state: parsed
+
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # "parsed": [
+ # {
+ # "name": "MgmtEth0/RP0/CPU0/0"
+ # },
+ # {
+ # "access_groups": [
+ # {
+ # "acls": [
+ # {
+ # "direction": "in",
+ # "name": "acl_1"
+ # },
+ # {
+ # "direction": "out",
+ # "name": "acl_2"
+ # }
+ # ],
+ # "afi": "ipv4"
+ # },
+ # {
+ # "acls": [
+ # {
+ # "direction": "in",
+ # "name": "acl6_1"
+ # },
+ # {
+ # "direction": "out",
+ # "name": "acl6_2"
+ # }
+ # ],
+ # "afi": "ipv6"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/0"
+ # },
+ # {
+ # "access_groups": [
+ # {
+ # "acls": [
+ # {
+ # "direction": "out",
+ # "name": "acl_1"
+ # }
+ # ],
+ # "afi": "ipv4"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/1"
+ # }
+ # ]
+ # }
+
+
+ # Using gathered
+
+ - name: Gather ACL interfaces facts using gathered state
+ cisco.iosxr.iosxr_acl_interfaces:
+ state: gathered
+
+
+ # Task Output (redacted)
+ # -----------------------
+ #
+ # "gathered": [
+ # {
+ # "name": "MgmtEth0/RP0/CPU0/0"
+ # },
+ # {
+ # "access_groups": [
+ # {
+ # "acls": [
+ # {
+ # "direction": "in",
+ # "name": "acl_1"
+ # },
+ # {
+ # "direction": "out",
+ # "name": "acl_2"
+ # }
+ # ],
+ # "afi": "ipv4"
+ # }
+ # "name": "GigabitEthernet0/0/0/0"
+ # },
+ # {
+ # "access_groups": [
+ # {
+ # "acls": [
+ # {
+ # "direction": "in",
+ # "name": "acl6_1"
+ # }
+ # ],
+ # "afi": "ipv6"
+ # }
+ # "name": "GigabitEthernet0/0/0/1"
+ # }
+ # ]
+
+
+ # Using rendered
+
+ - name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: acl_1
+ direction: in
+ - name: acl_2
+ direction: out
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # "rendered": [
+ # "interface GigabitEthernet0/0/0/0",
+ # "ipv4 access-group acl_1 ingress",
+ # "ipv4 access-group acl_2 egress"
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/0/0/1&#x27;, &#x27;ipv4 access-group acl_1 ingress&#x27;, &#x27;ipv4 access-group acl_2 egress&#x27;, &#x27;ipv6 access-group acl6_1 ingress&#x27;, &#x27;interface GigabitEthernet0/0/0/2&#x27;, &#x27;no ipv4 access-group acl_3 ingress&#x27;, &#x27;ipv4 access-group acl_4 egress&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@NilashishC)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_acls_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_acls_module.rst
new file mode 100644
index 00000000..a03f2a21
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_acls_module.rst
@@ -0,0 +1,4731 @@
+.. _cisco.iosxr.iosxr_acls_module:
+
+
+**********************
+cisco.iosxr.iosxr_acls
+**********************
+
+**ACLs resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages Access Control Lists (ACLs) on devices running IOS-XR.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="7">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of dictionaries specifying ACL configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of Access Control Lists (ACLs).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of Access Control Entries (ACEs) for this Access Control List (ACL).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authen</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match if authentication header is present.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>capture</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Capture matched packet.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>destination</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the packet destination.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The destination IP address to match.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match any destination address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The host IP address to match.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the source port or protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a greater port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a lower port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets not on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets in the range of port numbers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the end of the port range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the start of the port range</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination network prefix.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wildcard_bits</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Wildcard bits to apply to destination address.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>destopts</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match if destination opts header is present.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dscp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match packets with given DSCP value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets on a given dscp value</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a greater dscp value</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a lower dscp value</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets not on a given dscp value</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets in the range of dscp values</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>End of the dscp range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Start of the dscp range</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fragments</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Check non-intial fragments.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>grant</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>permit</li>
+ <li>deny</li>
+ </ul>
+ </td>
+ <td>
+ <div>Forward or drop packets matching the Access Control Entry (ACE).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hop_by_hop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match if hop-by-hop opts header is present.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>icmp_off</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable the ICMP message for this entry.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>line</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>An ACE excluding the sequence number.</div>
+ <div>This key is mutually exclusive with all the other attributes except &#x27;sequence&#x27;.</div>
+ <div>When used with other attributes, the value of this key will get precedence and the other keys will be ignored.</div>
+ <div>This should only be used when an attribute doesn&#x27;t exist in the argspec but is valid for the device.</div>
+ <div>For fact gathering, any ACE that is not fully parsed, will show up as a value of this attribute, excluding the sequence number, which will be populated as value of the sequence key.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: ace</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable log matches against this entry.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_input</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable log matches against this entry, including input interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>packet_length</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match packets given packet length.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets on a given packet length</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a greater packet length</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a lower packet length</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets not on a given packet length</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets in the range of packet lengths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>End of the packet length range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Start of the packet length range</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>precedence</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match packets with given precedence value</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the protocol to match.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol_options</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Additional suboptions for the protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>icmp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Internet Control Message Protocol settings.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>administratively_prohibited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administratively prohibited</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>alternate_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Alternate address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>conversion_error</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Datagram conversion</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dod_host_prohibited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host prohibited</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dod_net_prohibited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Net prohibited</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo (ping)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo reply</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>general_parameter_problem</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Parameter problem</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_isolated</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host isolated</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_precedence_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host unreachable for precedence</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_tos_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host redirect for TOS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_tos_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host unreachable for TOS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_unknown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host unknown</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Information replies</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Information requests</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mask_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mask replies</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mask_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mask requests</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mobile_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mobile host redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>net_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Network redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>net_tos_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Net redirect for TOS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>net_tos_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Network unreachable for TOS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>net_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Net unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network_unknown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Network unknown</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_room_for_option</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Parameter required but no room</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>option_missing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Parameter required but not present</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>packet_too_big</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Fragmentation needed and DF set</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parameter_problem</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All parameter problems</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Port unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>precedence_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Precedence cutoff</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Protocol unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reassembly_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Reassembly timeout</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All redirects</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_advertisement</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router discovery advertisements</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_solicitation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router discovery solicitations</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_quench</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Source quenches</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_route_failed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Source route failed</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time_exceeded</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All time exceededs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timestamp_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Timestamp replies</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timestamp_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Timestamp requests</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>traceroute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Traceroute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl_exceeded</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>TTL exceeded</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All unreachables</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>icmpv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Internet Control Message Protocol settings for IPv6.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Address Unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>administratively_prohibited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administratively Prohibited</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>beyond_scope_of_source_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administratively Prohibited</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>destination_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Destination Unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo Reply</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>erroneous_header_field</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Erroneous Header Field</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_membership_query</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Group Membership Query</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_membership_report</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Group Membership Report</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_membership_termination</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Group Membership Termination</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host Unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nd_na</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Neighbor Discovery - Neighbor Advertisement</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nd_ns</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Neighbor Discovery - Neighbor Solicitation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Neighbor Redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_route_to_destination</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>No Route To Destination</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>node_information_request_is_refused</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Node Information Request Is Refused</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>node_information_successful_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Node Information Successful Reply</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>packet_too_big</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Packet Too Big</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parameter_problem</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Parameter Problem</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Port Unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>query_subject_is_domainname</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Query Subject Is Domain name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>query_subject_is_IPv4address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Query Subject Is IPv4 address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>query_subject_is_IPv6address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Query Subject Is IPv6 address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reassembly_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Reassembly Timeout</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_advertisement</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router Advertisement</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_renumbering</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router Renumbering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_solicitation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router Solicitation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rr_command</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>RR Command</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rr_result</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>RR Result</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rr_seqnum_reset</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>RR Seqnum Reset</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time_exceeded</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Time Exceeded</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl_exceeded</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>TTL Exceeded</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unknown_query_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unknown Query Type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unrecognized_next_header</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unrecognized Next Header</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unrecognized_option</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Unrecognized Option</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>whoareyou_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Whoareyou Reply</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>whoareyou_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Whoareyou Request</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>igmp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Internet Group Management Protocol (IGMP) settings.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dvmrp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match Distance Vector Multicast Routing Protocol</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_query</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match Host Query</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_report</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match Host Report</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtrace</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match mtrace</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtrace_response</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match mtrace response</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pim</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match Protocol Independent Multicast</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trace</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Multicast trace</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tcp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match TCP packet flags</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ack</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the ACK bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>established</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match established connections</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fin</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the FIN bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>psh</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the PSH bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rst</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the RST bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>syn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the SYN bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>urg</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the URG bit</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remark</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Comments or a description for the access list.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>routing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match if routing header is present.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sequence</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sequence number for the Access Control Entry (ACE).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the packet source.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The source IP address to match.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match any source address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The host IP address to match.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the source port or protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a greater port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a lower port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets not on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets in the range of port numbers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the end of the port range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the start of the port range</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source network prefix.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wildcard_bits</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Wildcard bits to apply to source address.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match against specified TTL value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with exact TTL value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a greater TTL value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a lower TTL value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets that won&#x27;t have the given TTL value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets in the range of given TTL values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>End of the TTL range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Start of the TTL range.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The name of the Access Control List (ACL).</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>The Address Family Indicator (AFI) for the Access Control Lists (ACL).</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The <em>running_config</em> argument allows the implementer to pass in the configuration to use as the base config for comparison. This value of this option should be the output received from device by executing command <b>show running-config router static</b>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged to add new ACLs
+
+ # Before state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 05:07:45.767 UTC
+ # RP/0/RP0/CPU0:ios#
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv6
+ acls:
+ - name: acl6_1
+ aces:
+ - sequence: 10
+ grant: deny
+ protocol: tcp
+ source:
+ prefix: 2001:db8:1234::/48
+ port_protocol:
+ range:
+ start: ftp
+ end: telnet
+ destination:
+ any: true
+ protocol_options:
+ tcp:
+ syn: true
+ ttl:
+ range:
+ start: 180
+ end: 250
+ routing: true
+ authen: true
+ log: true
+
+ - sequence: 20
+ grant: permit
+ protocol: icmpv6
+ source:
+ any: true
+ destination:
+ any: true
+ protocol_options:
+ icmpv6:
+ router_advertisement: true
+ precedence: network
+ destopts: true
+
+ - afi: ipv4
+ acls:
+ - name: acl_1
+ aces:
+ - sequence: 16
+ remark: TEST_ACL_1_REMARK
+
+ - sequence: 21
+ grant: permit
+ protocol: tcp
+ source:
+ host: 192.0.2.10
+ port_protocol:
+ range:
+ start: pop3
+ end: 121
+ destination:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.15
+ protocol_options:
+ tcp:
+ rst: true
+
+ - sequence: 23
+ grant: deny
+ protocol: icmp
+ source:
+ any: true
+ destination:
+ prefix: 198.51.100.0/28
+ protocol_options:
+ icmp:
+ reassembly_timeout: true
+ dscp:
+ lt: af12
+
+ - name: acl_2
+ aces:
+ - sequence: 10
+ remark: TEST_ACL_2_REMARK
+ state: merged
+
+ # After state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 05:22:57.021 UTC
+ # ipv4 access-list acl_1
+ # 16 remark TEST_ACL_1_REMARK
+ # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+ # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+ # ipv4 access-list acl_2
+ # 10 remark TEST_ACL_2_REMARK
+ # ipv6 access-list acl6_1
+ # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+ # 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+ # Using merged to update existing ACLs
+
+ # Before state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 05:22:57.021 UTC
+ # ipv4 access-list acl_1
+ # 16 remark TEST_ACL_1_REMARK
+ # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+ # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+ # ipv4 access-list acl_2
+ # 10 remark TEST_ACL_2_REMARK
+ # ipv6 access-list acl6_1
+ # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+ # 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+ - name: Update existing ACEs
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: acl_1
+ aces:
+ - sequence: 21
+ source:
+ prefix: 198.51.100.32/28
+ port_protocol:
+ range:
+ start: pop3
+ end: 121
+ protocol_options:
+ tcp:
+ syn: true
+
+ - sequence: 23
+ protocol_options:
+ icmp:
+ router_advertisement: true
+ dscp:
+ eq: af23
+
+ # After state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 05:47:18.711 UTC
+ # ipv4 access-list acl_1
+ # 16 remark TEST_ACL_1_REMARK
+ # 21 permit tcp 198.51.100.32 0.0.0.15 range pop3 121 198.51.100.0 0.0.0.15 syn
+ # 23 deny icmp any 198.51.100.0 0.0.0.15 router-advertisement dscp eq af23
+ # ipv4 access-list acl_2
+ # 10 remark TEST_ACL_2_REMARK
+ # ipv6 access-list acl6_1
+ # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+ # 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+ # Using replaced to replace a whole ACL
+
+ # Before state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 05:22:57.021 UTC
+ # ipv4 access-list acl_1
+ # 16 remark TEST_ACL_1_REMARK
+ # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+ # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+ # ipv4 access-list acl_2
+ # 10 remark TEST_ACL_2_REMARK
+ # ipv6 access-list acl6_1
+ # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+ # 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+ - name: Replace device configurations of listed ACL with provided configurations
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: acl_2
+ aces:
+ - sequence: 11
+ grant: permit
+ protocol: igmp
+ source:
+ host: 198.51.100.130
+ destination:
+ any: true
+ ttl:
+ eq: 100
+
+ - sequence: 12
+ grant: deny
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: icmp
+ state: replaced
+
+ # After state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 06:19:51.496 UTC
+ # ipv4 access-list acl_1
+ # 16 remark TEST_ACL_1_REMARK
+ # 21 permit tcp 198.51.100.32 0.0.0.15 range pop3 121 198.51.100.0 0.0.0.15 syn
+ # 23 deny icmp any 198.51.100.0 0.0.0.15 router-advertisement dscp eq af23
+ # ipv4 access-list acl_2
+ # 11 permit igmp host 198.51.100.130 any ttl eq 100
+ # 12 deny icmp any any
+ # ipv6 access-list acl6_1
+ # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+ # 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+ # Using overridden to override all ACLs in the device
+
+ # Before state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 05:22:57.021 UTC
+ # ipv4 access-list acl_1
+ # 16 remark TEST_ACL_1_REMARK
+ # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+ # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+ # ipv4 access-list acl_2
+ # 10 remark TEST_ACL_2_REMARK
+ # ipv6 access-list acl6_1
+ # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+ # 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+ - name: Overridde all ACLs configuration with provided configuration
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: acl_1
+ aces:
+ - sequence: 10
+ grant: permit
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: tcp
+
+ - name: acl_2
+ aces:
+ - sequence: 20
+ grant: permit
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: igmp
+ state: overridden
+
+ # After state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 06:31:22.178 UTC
+ # ipv4 access-list acl_1
+ # 10 permit tcp any any
+ # ipv4 access-list acl_2
+ # 20 permit igmp any any
+
+ # Using deleted to delete an entire ACL
+
+ # Before state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 05:22:57.021 UTC
+ # ipv4 access-list acl_1
+ # 16 remark TEST_ACL_1_REMARK
+ # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+ # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+ # ipv4 access-list acl_2
+ # 10 remark TEST_ACL_2_REMARK
+ # ipv6 access-list acl6_1
+ # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+ # 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+ - name: Delete a single ACL
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv6
+ acls:
+ - name: acl6_1
+ state: deleted
+
+ # After state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 05:22:57.021 UTC
+ # ipv4 access-list acl_1
+ # 16 remark TEST_ACL_1_REMARK
+ # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+ # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+ # ipv4 access-list acl_2
+ # 10 remark TEST_ACL_2_REMARK
+
+ # Using deleted to delete all ACLs under one AFI
+
+ # Before state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 05:22:57.021 UTC
+ # ipv4 access-list acl_1
+ # 16 remark TEST_ACL_1_REMARK
+ # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+ # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+ # ipv4 access-list acl_2
+ # 10 remark TEST_ACL_2_REMARK
+ # ipv6 access-list acl6_1
+ # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+ # 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+ - name: Delete all ACLs under one AFI
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv4
+ state: deleted
+
+ # After state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 05:22:57.021 UTC
+ # ipv6 access-list acl6_1
+ # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+ # 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+ # Using deleted to delete all ACLs from the device
+
+ # Before state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 05:22:57.021 UTC
+ # ipv4 access-list acl_1
+ # 16 remark TEST_ACL_1_REMARK
+ # 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+ # 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+ # ipv4 access-list acl_2
+ # 10 remark TEST_ACL_2_REMARK
+ # ipv6 access-list acl6_1
+ # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+ # 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+ - name: Delete all ACLs from the device
+ cisco.iosxr.iosxr_acls:
+ state: deleted
+
+ # After state:
+ # -------------
+
+ # RP/0/RP0/CPU0:ios#sh access-lists afi-all
+ # Thu Feb 20 05:07:45.767 UTC
+ # RP/0/RP0/CPU0:ios#
+
+ # Using gathered to gather ACL facts from the device
+
+ - name: Gather ACL interfaces facts using gathered state
+ cisco.iosxr.iosxr_acls:
+ state: gathered
+
+ # Task Output (redacted)
+ # -----------------------
+ #
+
+ # "gathered": [
+ # {
+ # "acls": [
+ # {
+ # "aces": [
+ # {
+ # "remark": "TEST_ACL_1_REMARK",
+ # "sequence": 16
+ # },
+ # {
+ # "destination": {
+ # "address": "198.51.100.0",
+ # "wildcard_bits": "0.0.0.15"
+ # },
+ # "grant": "permit",
+ # "protocol": "tcp",
+ # "protocol_options": {
+ # "tcp": {
+ # "rst": true
+ # }
+ # },
+ # "sequence": 21,
+ # "source": {
+ # "host": "192.0.2.10",
+ # "port_protocol": {
+ # "range": {
+ # "end": "121",
+ # "start": "pop3"
+ # }
+ # }
+ # }
+ # },
+ # {
+ # "destination": {
+ # "address": "198.51.100.0",
+ # "wildcard_bits": "0.0.0.15"
+ # },
+ # "dscp": {
+ # "lt": "af12"
+ # },
+ # "grant": "deny",
+ # "protocol": "icmp",
+ # "protocol_options": {
+ # "icmp": {
+ # "reassembly_timeout": true
+ # }
+ # },
+ # "sequence": 23,
+ # "source": {
+ # "any": true
+ # }
+ # }
+ # ],
+ # "name": "acl_1"
+ # },
+ # {
+ # "aces": [
+ # {
+ # "remark": "TEST_ACL_2_REMARK",
+ # "sequence": 10
+ # }
+ # ],
+ # "name": "acl_2"
+ # }
+ # ],
+ # "afi": "ipv4"
+ # },
+ # {
+ # "acls": [
+ # {
+ # "aces": [
+ # {
+ # "authen": true,
+ # "destination": {
+ # "any": true
+ # },
+ # "grant": "deny",
+ # "log": true,
+ # "protocol": "tcp",
+ # "protocol_options": {
+ # "tcp": {
+ # "syn": true
+ # }
+ # },
+ # "routing": true,
+ # "sequence": 10,
+ # "source": {
+ # "port_protocol": {
+ # "range": {
+ # "end": "telnet",
+ # "start": "ftp"
+ # }
+ # },
+ # "prefix": "2001:db8:1234::/48"
+ # },
+ # "ttl": {
+ # "range": {
+ # "end": 250,
+ # "start": 180
+ # }
+ # }
+ # },
+ # {
+ # "destination": {
+ # "any": true
+ # },
+ # "destopts": true,
+ # "grant": "permit",
+ # "precedence": "network",
+ # "protocol": "icmpv6",
+ # "protocol_options": {
+ # "icmpv6": {
+ # "router_advertisement": true
+ # }
+ # },
+ # "sequence": 20,
+ # "source": {
+ # "any": true
+ # }
+ # }
+ # ],
+ # "name": "acl6_1"
+ # }
+ # ],
+ # "afi": "ipv6"
+ # }
+ # ]
+
+ # Using rendered
+
+ - name: Render platform specific commands (without connecting to the device)
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: acl_2
+ aces:
+ - sequence: 11
+ grant: permit
+ protocol: igmp
+ source:
+ host: 198.51.100.130
+ destination:
+ any: true
+ ttl:
+ eq: 100
+
+ - sequence: 12
+ grant: deny
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: icmp
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # "rendered": [
+ # "ipv4 access-list acl_2",
+ # "11 permit igmp host 198.51.100.130 any ttl eq 100",
+ # "12 deny icmp any any"
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ #
+ # ipv4 access-list acl_1
+ # 10 remark TEST_ACL_2_REMARK
+ # ipv4 access-list acl_2
+ # 11 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 authen routing log
+ # 21 permit icmpv6 any any router-advertisement precedence network packet-length eq 576 destopts
+ # ipv6 access-list acl6_1
+ # 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+ # 20 permit icmpv6 any any router-advertisement precedence network packet-length eq 576 destopts
+
+ - name: Parse externally provided ACL config to agnostic model
+ cisco.iosxr.iosxr_acls:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Task Output (redacted)
+ # -----------------------
+ # "parsed": [
+ # {
+ # "acls": [
+ # {
+ # "aces": [
+ # {
+ # "remark": "TEST_ACL_2_REMARK",
+ # "sequence": 10
+ # }
+ # ],
+ # "name": "acl_1"
+ # },
+ # {
+ # "aces": [
+ # {
+ # "authen": true,
+ # "destination": {
+ # "any": true
+ # },
+ # "grant": "deny",
+ # "log": true,
+ # "protocol": "tcp",
+ # "protocol_options": {
+ # "tcp": {
+ # "syn": true
+ # }
+ # },
+ # "routing": true,
+ # "sequence": 11,
+ # "source": {
+ # "port_protocol": {
+ # "range": {
+ # "end": "telnet",
+ # "start": "ftp"
+ # }
+ # },
+ # "prefix": "2001:db8:1234::/48"
+ # },
+ # "ttl": {
+ # "range": {
+ # "end": 250,
+ # "start": 180
+ # }
+ # }
+ # },
+ # {
+ # "destination": {
+ # "any": true
+ # },
+ # "destopts": true,
+ # "grant": "permit",
+ # "packet_length": {
+ # "eq": 576
+ # },
+ # "precedence": "network",
+ # "protocol": "icmpv6",
+ # "protocol_options": {
+ # "icmpv6": {
+ # "router_advertisement": true
+ # }
+ # },
+ # "sequence": 21,
+ # "source": {
+ # "any": true
+ # }
+ # }
+ # ],
+ # "name": "acl_2"
+ # }
+ # ],
+ # "afi": "ipv4"
+ # },
+ # {
+ # "acls": [
+ # {
+ # "aces": [
+ # {
+ # "authen": true,
+ # "destination": {
+ # "any": true
+ # },
+ # "grant": "deny",
+ # "log": true,
+ # "protocol": "tcp",
+ # "protocol_options": {
+ # "tcp": {
+ # "syn": true
+ # }
+ # },
+ # "routing": true,
+ # "sequence": 10,
+ # "source": {
+ # "port_protocol": {
+ # "range": {
+ # "end": "telnet",
+ # "start": "ftp"
+ # }
+ # },
+ # "prefix": "2001:db8:1234::/48"
+ # },
+ # "ttl": {
+ # "range": {
+ # "end": 250,
+ # "start": 180
+ # }
+ # }
+ # },
+ # {
+ # "destination": {
+ # "any": true
+ # },
+ # "destopts": true,
+ # "grant": "permit",
+ # "packet_length": {
+ # "eq": 576
+ # },
+ # "precedence": "network",
+ # "protocol": "icmpv6",
+ # "protocol_options": {
+ # "icmpv6": {
+ # "router_advertisement": true
+ # }
+ # },
+ # "sequence": 20,
+ # "source": {
+ # "any": true
+ # }
+ # }
+ # ],
+ # "name": "acl6_1"
+ # }
+ # ],
+ # "afi": "ipv6"
+ # }
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ipv6 access-list acl6_1&#x27;, &#x27;10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 authen routing log&#x27;, &#x27;20 permit icmpv6 any any router-advertisement precedence network destopts&#x27;, &#x27;ipv4 access-list acl_1&#x27;, &#x27;16 remark TEST_ACL_1_REMARK&#x27;, &#x27;21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst&#x27;, &#x27;23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@NilashishC)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_banner_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_banner_module.rst
new file mode 100644
index 00000000..1790f614
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_banner_module.rst
@@ -0,0 +1,331 @@
+.. _cisco.iosxr.iosxr_banner_module:
+
+
+************************
+cisco.iosxr.iosxr_banner
+************************
+
+**Manage multiline banners on Cisco IOS XR devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module will configure both exec and motd banners on remote device running Cisco IOS XR. It allows playbooks to add or remove banner text from the running configuration.
+
+
+
+Requirements
+------------
+The below requirements are needed on the host that executes this module.
+
+- ncclient >= 0.5.3 when using netconf
+- lxml >= 4.1.1 when using netconf
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>banner</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>login</li>
+ <li>motd</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the type of banner to configure on remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>netconf</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the type of connection based transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Existential state of the configuration on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>text</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Banner text to be configured. Accepts multi line string, without empty lines. When using a multi line string, the first and last characters must be the start and end delimiters for the banner Requires <em>state=present</em>.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS XRv 6.1.3.
+ - This module works with connection ``network_cli`` and ``netconf``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure the login banner
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ text: |
+ @this is my login banner
+ that contains a multiline
+ string@
+ state: present
+ - name: remove the motd banner
+ cisco.iosxr.iosxr_banner:
+ banner: motd
+ state: absent
+ - name: Configure banner from file
+ cisco.iosxr.iosxr_banner:
+ banner: motd
+ text: "{{ lookup('file', './config_partial/raw_banner.cfg') }}"
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always (empty list when no commands to send)</td>
+ <td>
+ <div>The list of configuration mode commands sent to device with transport <code>cli</code></div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;banner login&#x27;, &#x27;@this is my login banner&#x27;, &#x27;that contains a multiline&#x27;, &#x27;string@&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>xml</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always (empty list when no xml rpc to send)</td>
+ <td>
+ <div>NetConf rpc xml sent to device with transport <code>netconf</code></div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;config xmlns:xc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt; &lt;banners xmlns=&quot;http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg&quot;&gt; &lt;banner xc:operation=&quot;merge&quot;&gt; &lt;banner-name&gt;motd&lt;/banner-name&gt; &lt;banner-text&gt;Ansible banner example&lt;/banner-text&gt; &lt;/banner&gt; &lt;/banners&gt; &lt;/config&gt;&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
+- Kedar Kekan (@kedarX)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_bgp_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_bgp_module.rst
new file mode 100644
index 00000000..57486f68
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_bgp_module.rst
@@ -0,0 +1,718 @@
+.. _cisco.iosxr.iosxr_bgp_module:
+
+
+*********************
+cisco.iosxr.iosxr_bgp
+*********************
+
+**Configure global BGP protocol settings on Cisco IOS-XR**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides configuration management of global BGP parameters on devices running Cisco IOS-XR
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="4">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the BGP related configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_family</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies BGP address family related configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Type of address family to configure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>networks</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify networks to announce via BGP.</div>
+ <div>For operation replace, this option is mutually exclusive with root level networks option.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>masklen</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Subnet mask length for the network to announce(e.g, 8, 16, 24, etc.).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network ID to announce via BGP.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: prefix</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map to modify the attributes.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redistribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the redistribute information from another routing protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Identifier for the routing protocol for configuring redistribute information.</div>
+ <div>Valid for protocols &#x27;ospf&#x27;, &#x27;eigrp&#x27;, &#x27;isis&#x27; and &#x27;ospfv3&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the metric for redistributed routes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ospf</li>
+ <li>ospfv3</li>
+ <li>eigrp</li>
+ <li>isis</li>
+ <li>static</li>
+ <li>connected</li>
+ <li>lisp</li>
+ <li>mobile</li>
+ <li>rip</li>
+ <li>subscriber</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the protocol for configuring redistribute information.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the route map reference.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>safi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>flowspec</li>
+ <li><div style="color: blue"><b>unicast</b>&nbsp;&larr;</div></li>
+ <li>multicast</li>
+ <li>labeled-unicast</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the type of cast for the address family.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bgp_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the BGP Autonomous System (AS) number to configure on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_neighbor_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable logging neighbor up/down and reset reason.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbors</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies BGP neighbor related configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertisement_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the minimum interval (in seconds) between sending BGP routing updates.</div>
+ <div>The range is from 0 to 600.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor specific description.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ebgp_multihop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the maximum hop count for EBGP neighbors not on directly connected networks.</div>
+ <div>The range is from 0 to 255.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administratively shutdown or enable a neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor router address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Password to authenticate the BGP peer connection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remote_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Remote AS of the BGP neighbor to configure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tcp_mss</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the TCP initial maximum segment size to use.</div>
+ <div>The range is from 68 to 10000.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies BGP neighbor timer related configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interval after not receiving a keepalive message that the software declares a peer dead.</div>
+ <div>The range is from 3 to 65535.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keepalive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Frequency with which the Cisco IOS-XR software sends keepalive messages to its peer.</div>
+ <div>The range is from 0 to 65535.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_neighbor_holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interval specifying the minimum acceptable hold-time from a BGP neighbor.</div>
+ <div>The minimum acceptable hold-time must be less than, or equal to, the interval specified in the holdtime argument.</div>
+ <div>The range is from 3 to 65535.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source of the routing updates.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the BGP routing process router-id value.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>operation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merge</b>&nbsp;&larr;</div></li>
+ <li>replace</li>
+ <li>override</li>
+ <li>delete</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the operation to be performed on the BGP process configured on the device.</div>
+ <div>In case of merge, the input configuration will be merged with the existing BGP configuration on the device.</div>
+ <div>In case of replace, if there is a diff between the existing configuration and the input configuration, the existing configuration will be replaced by the input configuration for every option that has the diff.</div>
+ <div>In case of override, all the existing BGP configuration will be removed from the device and replaced with the input configuration.</div>
+ <div>In case of delete the existing BGP configuration will be removed from the device.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOS XR Software Version 6.1.3
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure global bgp as 65000
+ cisco.iosxr.iosxr_bgp:
+ bgp_as: 65000
+ router_id: 1.1.1.1
+ neighbors:
+ - neighbor: 182.168.10.1
+ remote_as: 500
+ description: PEER_1
+ - neighbor: 192.168.20.1
+ remote_as: 500
+ update_source: GigabitEthernet 0/0/0/0
+ address_family:
+ - name: ipv4
+ cast: unicast
+ networks:
+ - network: 192.168.2.0/23
+ - network: 10.0.0.0/8
+ redistribute:
+ - protocol: ospf
+ id: 400
+ metric: 110
+
+ - name: remove bgp as 65000 from config
+ ios_bgp:
+ bgp_as: 65000
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router bgp 65000&#x27;, &#x27;bgp router-id 1.1.1.1&#x27;, &#x27;neighbor 182.168.10.1 remote-as 500&#x27;, &#x27;neighbor 182.168.10.1 description PEER_1&#x27;, &#x27;neighbor 192.168.20.1 remote-as 500&#x27;, &#x27;neighbor 192.168.20.1 update-source GigabitEthernet0/0/0/0&#x27;, &#x27;address-family ipv4 unicast&#x27;, &#x27;redistribute ospf 400 metric 110&#x27;, &#x27;network 192.168.2.0/23&#x27;, &#x27;network 10.0.0.0/8&#x27;, &#x27;exit&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@NilashishC)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_cliconf.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_cliconf.rst
new file mode 100644
index 00000000..9f5dab9b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_cliconf.rst
@@ -0,0 +1,43 @@
+.. _cisco.iosxr.iosxr_cliconf:
+
+
+*****************
+cisco.iosxr.iosxr
+*****************
+
+**Use iosxr cliconf to run command on Cisco IOS XR platform**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This iosxr plugin provides low level abstraction apis for sending and receiving CLI commands from Cisco IOS XR network devices.
+
+
+
+
+
+
+
+
+
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Ansible Networking Team
+
+
+.. hint::
+ Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_command_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_command_module.rst
new file mode 100644
index 00000000..679e3b4d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_command_module.rst
@@ -0,0 +1,382 @@
+.. _cisco.iosxr.iosxr_command_module:
+
+
+*************************
+cisco.iosxr.iosxr_command
+*************************
+
+**Run commands on remote devices running Cisco IOS XR**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Sends arbitrary commands to an IOS XR node and returns the results read from the device. This module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
+- This module does not support running commands in configuration mode. Please use :ref:`iosxr_config <iosxr_config_module>` to configure iosxr devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of commands to send to the remote iosxr device over the configured provider. The resulting output from the command is returned. If the <em>wait_for</em> argument is provided, the module is not returned until the condition is satisfied or the number of retries has expired.</div>
+ <div>If a command sent to the device requires answering a prompt, it is possible to pass a dict containing command, answer and prompt. Common answers are &#x27;y&#x27; or &quot;\r&quot; (carriage return, must be double quotes). See examples</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">1</div>
+ </td>
+ <td>
+ <div>Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditions, the interval indicates how long to wait before trying the command again.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>any</li>
+ <li><div style="color: blue"><b>all</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>The <em>match</em> argument is used in conjunction with the <em>wait_for</em> argument to specify the match policy. Valid values are <code>all</code> or <code>any</code>. If the value is set to <code>all</code> then all conditionals in the wait_for must be satisfied. If the value is set to <code>any</code> then only one of the values must be satisfied.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>netconf</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the type of connection based transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retries</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">10</div>
+ </td>
+ <td>
+ <div>Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the <em>wait_for</em> conditions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of conditions to evaluate against the output of the command. The task will wait for each condition to be true before moving forward. If the conditional is not true within the configured number of retries, the task fails. See examples.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: waitfor</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Make sure the user has been authorized to execute commands terminal length 0, terminal width 512 and terminal exec prompt no-timestamp.
+ - This module works with ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+ - This module does not support ``netconf`` connection.
+ - Tested against IOS XR 6.1.3
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: run show version on remote devices
+ cisco.iosxr.iosxr_command:
+ commands: show version
+
+ - name: run show version and check to see if output contains iosxr
+ cisco.iosxr.iosxr_command:
+ commands: show version
+ wait_for: result[0] contains IOS-XR
+
+ - name: run multiple commands on remote nodes
+ cisco.iosxr.iosxr_command:
+ commands:
+ - show version
+ - show interfaces
+ - {command: example command that prompts, prompt: expected prompt, answer: yes}
+
+ - name: run multiple commands and evaluate the output
+ cisco.iosxr.iosxr_command:
+ commands:
+ - show version
+ - show interfaces
+ wait_for:
+ - result[0] contains IOS-XR
+ - result[1] contains Loopback0
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>failed_conditions</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>failed</td>
+ <td>
+ <div>The list of conditionals that have failed</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;...&#x27;, &#x27;...&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>stdout</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always apart from low level errors (such as action plugin)</td>
+ <td>
+ <div>The set of responses from the commands</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;...&#x27;, &#x27;...&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>stdout_lines</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always apart from low level errors (such as action plugin)</td>
+ <td>
+ <div>The value of stdout split into a list</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[[&#x27;...&#x27;, &#x27;...&#x27;], [&#x27;...&#x27;], [&#x27;...&#x27;]]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Ricardo Carrillo Cruz (@rcarrillocruz)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_config_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_config_module.rst
new file mode 100644
index 00000000..85523490
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_config_module.rst
@@ -0,0 +1,649 @@
+.. _cisco.iosxr.iosxr_config_module:
+
+
+************************
+cisco.iosxr.iosxr_config
+************************
+
+**Manage Cisco IOS XR configuration sections**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Cisco IOS XR configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with IOS XR configuration sections in a deterministic way.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enters into administration configuration mode for making config changes to the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with <em>before</em> this allows the playbook designer to append a set of commands to be executed after the command set.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>backup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>This argument will cause the module to create a full backup of the current <code>running-config</code> from the remote device before any changes are made. If the <code>backup_options</code> value is not given, the backup file is written to the <code>backup</code> folder in the playbook root directory or role root directory, if playbook is part of an ansible role. If the directory does not exist, it is created.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>backup_options</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This is a dict object containing configurable options related to backup file path. The value of this option is read only when <code>backup</code> is set to <em>yes</em>, if <code>backup</code> is set to <em>no</em> this option will be silently ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dir_path</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be first created and the filename is either the value of <code>filename</code> or default filename as described in <code>filename</code> options description. If the path value is not given in that case a <em>backup</em> directory will be created in the current working directory and backup configuration will be copied in <code>filename</code> within <em>backup</em> directory.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filename</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by &lt;hostname&gt;_config.&lt;current-date&gt;@&lt;current-time&gt;</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>comment</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"configured by iosxr_config"</div>
+ </td>
+ <td>
+ <div>Allows a commit description to be specified to be included when the configuration is committed. If the configuration is not changed or committed, this argument is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The <em>config</em> argument allows the implementer to pass in the configuration to use as the base config for comparison. The configuration lines for this option should be similar to how it will appear if present in the running-configuration of the device to ensure idempotency and correct diff.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>exclusive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enters into exclusive configuration mode that locks out all users from committing configuration changes until the exclusive session ends.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>force</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>The force argument instructs the module to not consider the current devices running-config. When set to true, this will cause the module to push the contents of <em>src</em> into the device without first checking if already configured.</div>
+ <div>Note this argument should be considered deprecated. To achieve the equivalent, set the <code>match=none</code> which is idempotent. This argument will be removed in a future release.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>label</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Allows a commit label to be specified to be included when the configuration is committed. A valid label must begin with an alphabet and not exceed 30 characters, only alphabets, digits, hyphens and underscores are allowed. If the configuration is not changed or committed, this argument is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lines</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config as found in the device running-config to ensure idempotency and correct diff. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: commands</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>line</b>&nbsp;&larr;</div></li>
+ <li>strict</li>
+ <li>exact</li>
+ <li>none</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to <em>line</em>, commands are matched line by line. If match is set to <em>strict</em>, command lines are matched with respect to position. If match is set to <em>exact</em>, command lines must be an equal match. Finally, if match is set to <em>none</em>, the module will not attempt to compare the source configuration with the running configuration on the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parents</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>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.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>netconf</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the type of connection based transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>replace</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>line</b>&nbsp;&larr;</div></li>
+ <li>block</li>
+ <li>config</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module on the way to perform the configuration on the device. If the replace argument is set to <em>line</em> then the modified lines are pushed to the device in configuration mode. If the replace argument is set to <em>block</em> then the entire command block is pushed to the device in configuration mode if any line is not correct.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>src</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the source path to the file that contains the configuration or configuration template to load. The path to the source file can either be the full path on the Ansible control host or a relative path from the playbook or role root directory. This argument is mutually exclusive with <em>lines</em>, <em>parents</em>. The configuration lines in the source file should be similar to how it will appear if present in the running-configuration of the device to ensure idempotency and correct diff.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+ - Tested against IOS XRv 6.1.3.
+ - This module does not support ``netconf`` connection
+ - Abbreviated commands are NOT idempotent, see L(Network FAQ,../network/user_guide/faq.html
+ - Avoid service disrupting changes (viz. Management IP) from config replace.
+ - Do not use ``end`` in the replace config file.
+ - To ensure idempotency and correct diff the configuration lines in the relevant module options should be similar to how they appear if present in the running configuration on device including the indentation.
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure top level configuration
+ cisco.iosxr.iosxr_config:
+ lines: hostname {{ inventory_hostname }}
+
+ - name: configure interface settings
+ cisco.iosxr.iosxr_config:
+ lines:
+ - description test interface
+ - ip address 172.31.1.1 255.255.255.0
+ parents: interface GigabitEthernet0/0/0/0
+
+ - name: load a config from disk and replace the current config
+ cisco.iosxr.iosxr_config:
+ src: config.cfg
+ replace: config
+ backup: yes
+
+ - name: for idempotency, use full-form commands
+ cisco.iosxr.iosxr_config:
+ lines:
+ # - shut
+ - shutdown
+ # parents: int g0/0/0/1
+ parents: interface GigabitEthernet0/0/0/1
+
+ - name: configurable backup path
+ cisco.iosxr.iosxr_config:
+ src: config.cfg
+ backup: yes
+ backup_options:
+ filename: backup.cfg
+ dir_path: /home/user
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>backup_path</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes</td>
+ <td>
+ <div>The full path to the backup file</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/playbooks/ansible/backup/iosxr01_config.2016-07-16@22:28:34</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>If there are commands to run against the host</td>
+ <td>
+ <div>The set of commands that will be pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;hostname foo&#x27;, &#x27;router ospf 1&#x27;, &#x27;router-id 1.1.1.1&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>date</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes</td>
+ <td>
+ <div>The date extracted from the backup file name</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">2016-07-16</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>filename</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes and filename is not specified in backup options</td>
+ <td>
+ <div>The name of the backup file</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">iosxr01_config.2016-07-16@22:28:34</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>shortname</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes and filename is not specified in backup options</td>
+ <td>
+ <div>The full path to the backup file excluding the timestamp</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/playbooks/ansible/backup/iosxr01_config</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>time</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes</td>
+ <td>
+ <div>The time extracted from the backup file name</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">22:28:34</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Ricardo Carrillo Cruz (@rcarrillocruz)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_facts_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_facts_module.rst
new file mode 100644
index 00000000..be3701fc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_facts_module.rst
@@ -0,0 +1,533 @@
+.. _cisco.iosxr.iosxr_facts_module:
+
+
+***********************
+cisco.iosxr.iosxr_facts
+***********************
+
+**Get facts about iosxr devices.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Collects facts from network devices running the iosxr operating system. This module places the facts gathered in the fact tree keyed by the respective resource name. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gather_network_resources</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all and the resources like interfaces, lacp etc. Can specify a list of values to include a larger subset. Values can also be used with an initial <code><span class='module'>!</span></code> to specify that a specific subset should not be collected. Valid subsets are &#x27;all&#x27;, &#x27;lacp&#x27;, &#x27;lacp_interfaces&#x27;, &#x27;lldp_global&#x27;, &#x27;lldp_interfaces&#x27;, &#x27;interfaces&#x27;, &#x27;l2_interfaces&#x27;, &#x27;l3_interfaces&#x27;, &#x27;lag_interfaces&#x27;, &#x27;acls&#x27;, &#x27;acl_interfaces&#x27;, &#x27;static_routes&#x27;, &#x27;ospfv2&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gather_subset</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"!config"</div>
+ </td>
+ <td>
+ <div>When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial <code><span class='module'>!</span></code> to specify that a specific subset should not be collected.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>netconf</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the type of connection based transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS-XR 6.1.3.
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Gather all facts
+ - cisco.iosxr.iosxr_facts:
+ gather_subset: all
+ gather_network_resources: all
+
+ # Collect only the config and default facts
+ - cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - config
+
+ # Do not collect hardware facts
+ - cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!hardware'
+
+ # Collect only the lacp facts
+ - cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - lacp
+
+ # Do not collect lacp_interfaces facts
+ - cisco.iosxr.iosxr_facts:
+ gather_network_resources:
+ - '!lacp_interfaces'
+
+ # Collect lacp and minimal default facts
+ - cisco.iosxr.iosxr_facts:
+ gather_subset: min
+ gather_network_resources: lacp
+
+ # Collect only the interfaces facts
+ - cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - interfaces
+ - l2_interfaces
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_all_ipv4_addresses</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when interfaces is configured</td>
+ <td>
+ <div>All IPv4 addresses configured on the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_all_ipv6_addresses</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when interfaces is configured</td>
+ <td>
+ <div>All IPv6 addresses configured on the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_api</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The name of the transport</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_config</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when config is configured</td>
+ <td>
+ <div>The current active config from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_filesystems</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>All file system names available on the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_gather_network_resources</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of fact resource subsets collected from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_gather_subset</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of fact subsets collected from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_hostname</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configured hostname of the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_image</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The image file the device is running</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_interfaces</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when interfaces is configured</td>
+ <td>
+ <div>A hash of all interfaces running on the system</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_memfree_mb</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>The available free memory on the remote device in Mb</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_memtotal_mb</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>The total memory on the remote device in Mb</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_model</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The model name returned from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_neighbors</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when interfaces is configured</td>
+ <td>
+ <div>The list of LLDP neighbors from the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_python_version</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The Python version Ansible controller is using</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_version</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The operating system version running on the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Ricardo Carrillo Cruz (@rcarrillocruz)
+- Nilashish Chakraborty (@Nilashishc)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_interface_module.rst
new file mode 100644
index 00000000..977e369c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_interface_module.rst
@@ -0,0 +1,748 @@
+.. _cisco.iosxr.iosxr_interface_module:
+
+
+***************************
+cisco.iosxr.iosxr_interface
+***************************
+
+**(deprecated, removed after 2022-06-01) Manage Interface on Cisco IOS XR network devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Newer and updated modules released with more functionality in Ansible 2.9
+:Alternative: iosxr_interfaces
+
+
+
+Synopsis
+--------
+- This module provides declarative management of Interfaces on Cisco IOS XR network devices.
+
+
+
+Requirements
+------------
+The below requirements are needed on the host that executes this module.
+
+- ncclient >= 0.5.3 when using netconf
+- lxml >= 4.1.1 when using netconf
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>active</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>active</b>&nbsp;&larr;</div></li>
+ <li>preconfigure</li>
+ </ul>
+ </td>
+ <td>
+ <div>Whether the interface is <code>active</code> or <code>preconfigured</code>. Preconfiguration allows you to configure modular services cards before they are inserted into the router. When the cards are inserted, they are instantly configured. Active cards are the ones already inserted.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of interfaces definition</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>active</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>active</li>
+ <li>preconfigure</li>
+ </ul>
+ </td>
+ <td>
+ <div>Whether the interface is <code>active</code> or <code>preconfigured</code>. Preconfiguration allows you to configure modular services cards before they are inserted into the router. When the cards are inserted, they are instantly configured. Active cards are the ones already inserted.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state argument which are <em>state</em> with values <code>up</code>/<code>down</code>, <em>tx_rate</em> and <em>rx_rate</em>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Description of Interface being configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>duplex</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>full</li>
+ <li>half</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the interface duplex mode. Default is auto-negotiation when not configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Removes the shutdown configuration, which removes the forced administrative down on the interface, enabling it to move to an up or down state.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the MTU value for the interface. Range is between 64 and 65535&#x27;</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the interface to configure in <code>type + path</code> format. e.g. <code>GigabitEthernet0/0/0/0</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rx_rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Receiver rate in bits per second (bps).</div>
+ <div>This is state check parameter only.</div>
+ <div>Supports conditionals, see <a href='../network/user_guide/network_working_with_command_output.html'>Conditionals in Networking Modules</a></div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>speed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>10</li>
+ <li>100</li>
+ <li>1000</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure the speed for an interface. Default is auto-negotiation when not configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ <li>up</li>
+ <li>down</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the Interface configuration, <code>up</code> means present and operationally up and <code>down</code> means present and operationally <code>down</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tx_rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Transmit rate in bits per second (bps).</div>
+ <div>This is state check parameter only.</div>
+ <div>Supports conditionals, see <a href='../network/user_guide/network_working_with_command_output.html'>Conditionals in Networking Modules</a></div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">10</div>
+ </td>
+ <td>
+ <div>Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state argument which are <em>state</em> with values <code>up</code>/<code>down</code>, <em>tx_rate</em> and <em>rx_rate</em>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Description of Interface being configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>duplex</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>full</li>
+ <li>half</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the interface duplex mode. Default is auto-negotiation when not configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Removes the shutdown configuration, which removes the forced administrative down on the interface, enabling it to move to an up or down state.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the MTU value for the interface. Range is between 64 and 65535&#x27;</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the interface to configure in <code>type + path</code> format. e.g. <code>GigabitEthernet0/0/0/0</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>netconf</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the type of connection based transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rx_rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Receiver rate in bits per second (bps).</div>
+ <div>This is state check parameter only.</div>
+ <div>Supports conditionals, see <a href='../network/user_guide/network_working_with_command_output.html'>Conditionals in Networking Modules</a></div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>speed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>10</li>
+ <li>100</li>
+ <li>1000</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure the speed for an interface. Default is auto-negotiation when not configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ <li>up</li>
+ <li>down</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the Interface configuration, <code>up</code> means present and operationally up and <code>down</code> means present and operationally <code>down</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tx_rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Transmit rate in bits per second (bps).</div>
+ <div>This is state check parameter only.</div>
+ <div>Supports conditionals, see <a href='../network/user_guide/network_working_with_command_output.html'>Conditionals in Networking Modules</a></div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - This module works with connection ``network_cli`` and ``netconf``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+ - Tested against IOS XRv 6.1.3.
+ - Preconfiguration of physical interfaces is not supported with ``netconf`` transport.
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure interface
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ description: test-interface
+ speed: 100
+ duplex: half
+ mtu: 512
+
+ - name: remove interface
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ state: absent
+
+ - name: make interface up
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ enabled: true
+
+ - name: make interface down
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ enabled: false
+
+ - name: Create interface using aggregate
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+ - name: GigabitEthernet0/0/0/3
+ - name: GigabitEthernet0/0/0/2
+ speed: 100
+ duplex: full
+ mtu: 512
+ state: present
+
+ - name: Create interface using aggregate along with additional params in aggregate
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+ - {name: GigabitEthernet0/0/0/3, description: test-interface 3}
+ - {name: GigabitEthernet0/0/0/2, description: test-interface 2}
+ speed: 100
+ duplex: full
+ mtu: 512
+ state: present
+
+ - name: Delete interface using aggregate
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+ - name: GigabitEthernet0/0/0/3
+ - name: GigabitEthernet0/0/0/2
+ state: absent
+
+ - name: Check intent arguments
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/5
+ state: up
+ delay: 20
+
+ - name: Config + intent
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/5
+ enabled: false
+ state: down
+ delay: 20
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always (empty list when no commands to send)</td>
+ <td>
+ <div>The list of configuration mode commands sent to device with transport <code>cli</code></div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/0/0/2&#x27;, &#x27;description test-interface&#x27;, &#x27;duplex half&#x27;, &#x27;mtu 512&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>xml</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always (empty list when no xml rpc to send)</td>
+ <td>
+ <div>NetConf rpc xml sent to device with transport <code>netconf</code></div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;config xmlns:xc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt; &lt;interface-configurations xmlns=&quot;http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg&quot;&gt; &lt;interface-configuration xc:operation=&quot;merge&quot;&gt; &lt;active&gt;act&lt;/active&gt; &lt;interface-name&gt;GigabitEthernet0/0/0/0&lt;/interface-name&gt; &lt;description&gt;test-interface-0&lt;/description&gt; &lt;mtus&gt;&lt;mtu&gt; &lt;owner&gt;GigabitEthernet&lt;/owner&gt; &lt;mtu&gt;512&lt;/mtu&gt; &lt;/mtu&gt;&lt;/mtus&gt; &lt;ethernet xmlns=&quot;http://cisco.com/ns/yang/Cisco-IOS-XR-drivers-media-eth-cfg&quot;&gt; &lt;speed&gt;100&lt;/speed&gt; &lt;duplex&gt;half&lt;/duplex&gt; &lt;/ethernet&gt; &lt;/interface-configuration&gt; &lt;/interface-configurations&gt;&lt;/config&gt;&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Ganesh Nalawade (@ganeshrn)
+- Kedar Kekan (@kedarX)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_interfaces_module.rst
new file mode 100644
index 00000000..6afcf871
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_interfaces_module.rst
@@ -0,0 +1,697 @@
+.. _cisco.iosxr.iosxr_interfaces_module:
+
+
+****************************
+cisco.iosxr.iosxr_interfaces
+****************************
+
+**Interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages the interface attributes on Cisco IOS-XR network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of interface options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface description.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>duplex</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>full</li>
+ <li>half</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the interface duplex mode. Default is auto-negotiation when not configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Administrative state of the interface.</div>
+ <div>Set the value to <code>True</code> to administratively enable the interface or <code>False</code> to disable it.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the MTU value for the interface. Applicable for Ethernet interfaces only.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface to configure in <code>type + path</code> format. e.g. <code>GigabitEthernet0/0/0/0</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>speed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure the speed for an interface. Default is auto-negotiation when not configured.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>parsed</li>
+ <li>deleted</li>
+ <li>replaced</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ <li>overridden</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOS-XRv Version 6.1.3 on VIRL.
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ # Before state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # vrf custB
+ # ipv4 address 178.18.169.23 255.255.255.0
+ # dot1q native vlan 30
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description Replaced by Ansible Team
+ # mtu 2000
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # dot1q native vlan 1021
+ # !
+ - name: Configure Ethernet interfaces
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/2
+ description: Configured by Ansible
+ enabled: true
+ - name: GigabitEthernet0/0/0/3
+ description: Configured by Ansible Network
+ enabled: false
+ duplex: full
+ state: merged
+ # After state:
+ # ------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description Configured and Merged by Ansible Network
+ # vrf custB
+ # ipv4 address 178.18.169.23 255.255.255.0
+ # dot1q native vlan 30
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description Configured and Merged by Ansible Network
+ # mtu 2600
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex full
+ # shutdown
+ # dot1q native vlan 1021
+ # !
+ # Using replaced
+ # Before state:
+ # ------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # description Configured by Ansible
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description Test
+ # vrf custB
+ # ipv4 address 178.18.169.23 255.255.255.0
+ # dot1q native vlan 30
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # dot1q native vlan 1021
+ # !
+ - name: Configure following interfaces and replace their existing config
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/2
+ description: Configured by Ansible
+ enabled: true
+ mtu: 2000
+ - name: GigabitEthernet0/0/0/3
+ description: Configured by Ansible Network
+ enabled: false
+ duplex: auto
+ state: replaced
+ # After state:
+ # ------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # description Configured by Ansible
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description Configured and Replaced by Ansible
+ # mtu 2000
+ # vrf custB
+ # ipv4 address 178.18.169.23 255.255.255.0
+ # dot1q native vlan 30
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description Configured and Replaced by Ansible Network
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex half
+ # shutdown
+ # dot1q native vlan 1021
+ # !
+ # Using overridden
+ # Before state:
+ # ------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description Configured by Ansible
+ # vrf custB
+ # ipv4 address 178.18.169.23 255.255.255.0
+ # dot1q native vlan 30
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description Configured by Ansible
+ # mtu 2600
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex full
+ # shutdown
+ # dot1q native vlan 1021
+ # !
+ - name: Override interfaces
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/2
+ description: Configured by Ansible
+ enabled: true
+ duplex: auto
+ - name: GigabitEthernet0/0/0/3
+ description: Configured by Ansible Network
+ enabled: false
+ speed: 1000
+ state: overridden
+ # After state:
+ # ------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description Configured and Overridden by Ansible Network
+ # vrf custB
+ # ipv4 address 178.18.169.23 255.255.255.0
+ # speed 1000
+ # dot1q native vlan 30
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description Configured and Overridden by Ansible Network
+ # mtu 2000
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex full
+ # shutdown
+ # dot1q native vlan 1021
+ # !
+ # Using deleted
+ # Before state:
+ # ------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description Configured and Overridden by Ansible Network
+ # vrf custB
+ # ipv4 address 178.18.169.23 255.255.255.0
+ # speed 1000
+ # dot1q native vlan 30
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description Configured and Overridden by Ansible Network
+ # mtu 2000
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex full
+ # shutdown
+ # dot1q native vlan 1021
+ # !
+ - name: Delete IOSXR interfaces as in given arguments
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/2
+ - name: GigabitEthernet0/0/0/3
+ state: deleted
+ # After state:
+ # ------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # vrf custB
+ # ipv4 address 178.18.169.23 255.255.255.0
+ # dot1q native vlan 30
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # dot1q native vlan 1021
+ # !
+ # Using parsed
+ # parsed.cfg
+ # ------------
+ #
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 10.8.38.70 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # description Configured and Merged by Ansible-Network
+ # mtu 110
+ # ipv4 address 172.31.1.1 255.255.255.0
+ # duplex half
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # shutdown
+ # !
+ # - name: Convert ACL interfaces config to argspec without connecting to the appliance
+ # cisco.iosxr.iosxr_interfaces:
+ # running_config: "{{ lookup('file', './parsed.cfg') }}"
+ # state: parsed
+ # Task Output (redacted)
+ # -----------------------
+ # "parsed": [
+ # {
+ # "name": "MgmtEth0/RP0/CPU0/0"
+ # },
+ # {
+ # "access_groups": [
+ # {
+ # "acls": [
+ # {
+ # "direction": "in",
+ # "name": "acl_1"
+ # },
+ # {
+ # "direction": "out",
+ # "name": "acl_2"
+ # }
+ # ],
+ # "afi": "ipv4"
+ # },
+ # {
+ # "acls": [
+ # {
+ # "direction": "in",
+ # "name": "acl6_1"
+ # },
+ # {
+ # "direction": "out",
+ # "name": "acl6_2"
+ # }
+ # ],
+ # "afi": "ipv6"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/0"
+ # },
+ # {
+ # "access_groups": [
+ # {
+ # "acls": [
+ # {
+ # "direction": "out",
+ # "name": "acl_1"
+ # }
+ # ],
+ # "afi": "ipv4"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/1"
+ # }
+ # ]
+ # }
+ # Using rendered
+ - name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ description: Configured and Merged by Ansible-Network
+ mtu: 110
+ enabled: true
+ duplex: half
+ - name: GigabitEthernet0/0/0/1
+ description: Configured and Merged by Ansible-Network
+ mtu: 2800
+ enabled: false
+ speed: 100
+ duplex: full
+ state: rendered
+ # Task Output (redacted)
+ # -----------------------
+ # "rendered": [
+ # "interface GigabitEthernet0/0/0/0",
+ # "description Configured and Merged by Ansible-Network",
+ # "mtu 110",
+ # "duplex half",
+ # "no shutdown",
+ # "interface GigabitEthernet0/0/0/1",
+ # "description Configured and Merged by Ansible-Network",
+ # "mtu 2800",
+ # "speed 100",
+ # "duplex full",
+ # "shutdown"
+ # ]
+ # Using gathered
+ # Before state:
+ # ------------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config interface
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 10.8.38.70 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # description Configured and Merged by Ansible-Network
+ # mtu 110
+ # ipv4 address 172.31.1.1 255.255.255.0
+ # duplex half
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # shutdown
+ # !
+ - name: Gather IOSXR interfaces as in given arguments
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ state: gathered
+ # Task Output (redacted)
+ # -----------------------
+ #
+ # "gathered": [
+ # {
+ # "description": "test for ansible",
+ # "enabled": false,
+ # "name": "Loopback888"
+ # },
+ # {
+ # "description": "Configured and Merged by Ansible-Network",
+ # "duplex": "half",
+ # "enabled": true,
+ # "mtu": 110,
+ # "name": "GigabitEthernet0/0/0/0"
+ # },
+ # {
+ # "enabled": false,
+ # "name": "GigabitEthernet0/0/0/3"
+ # },
+ # {
+ # "enabled": false,
+ # "name": "GigabitEthernet0/0/0/4"
+ # }
+ # ]
+ # After state:
+ # ------------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config interface
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 10.8.38.70 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # description Configured and Merged by Ansible-Network
+ # mtu 110
+ # ipv4 address 172.31.1.1 255.255.255.0
+ # duplex half
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # shutdown
+ # !
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/0/0/2&#x27;, &#x27;description: Configured by Ansible&#x27;, &#x27;shutdown&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
+- Rohit Thakur (@rohitthakur2590)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_l2_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_l2_interfaces_module.rst
new file mode 100644
index 00000000..e9d2bd66
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_l2_interfaces_module.rst
@@ -0,0 +1,879 @@
+.. _cisco.iosxr.iosxr_l2_interfaces_module:
+
+
+*******************************
+cisco.iosxr.iosxr_l2_interfaces
+*******************************
+
+**L2 interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages the Layer-2 interface attributes on Cisco IOS-XR devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of Layer-2 interface options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>l2protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures Layer 2 protocol tunneling and protocol data unit (PDU) filtering on an interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cdp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>drop</li>
+ <li>forward</li>
+ <li>tunnel</li>
+ </ul>
+ </td>
+ <td>
+ <div>Cisco Discovery Protocol (CDP) tunneling and data unit parameters.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pvst</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>drop</li>
+ <li>forward</li>
+ <li>tunnel</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the per-VLAN Spanning Tree Protocol (PVST) tunneling and data unit parameters.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>drop</li>
+ <li>forward</li>
+ <li>tunnel</li>
+ </ul>
+ </td>
+ <td>
+ <div>Spanning Tree Protocol (STP) tunneling and data unit parameters.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vtp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>drop</li>
+ <li>forward</li>
+ <li>tunnel</li>
+ </ul>
+ </td>
+ <td>
+ <div>VLAN Trunk Protocol (VTP) tunneling and data unit parameters.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>l2transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Switchport mode access command to configure the interface as a layer 2 access</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface/sub-interface excluding any logical unit number, e.g. GigabitEthernet0/0/0/1 or GigabitEthernet0/0/0/1.100.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>native_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure a native VLAN ID for the trunk</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>propagate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Propagate Layer 2 transport events. Note that it will work only when the <em>l2tranport</em> option is set to TRUE</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>q_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>802.1Q VLAN configuration. Note that it can accept either 2 VLAN IDs when configuring Q-in-Q VLAN, or it will accept 1 VLAN ID and &#x27;any&#x27; as input list when configuring Q-in-any vlan as input. Note, that this option is valid only with respect to Sub-Interface and is not valid when configuring for Interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOS-XRv Version 6.1.3 on VIRL.
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ #
+ # Before state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/3
+ # description Ansible Network
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex half
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description Test description
+ # !
+
+ - name: Merge provided configuration with device configuration
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/3
+ native_vlan: 20
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ l2transport: true
+ l2protocol:
+ - stp: tunnel
+ - name: GigabitEthernet0/0/0/3.900
+ l2transport: true
+ q_vlan:
+ - 20
+ - 40
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/3
+ # description Ansible Network
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex half
+ # shutdown
+ # dot1q native vlan 20
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description Test description
+ # dot1q native vlan 10
+ # l2transport
+ # l2protocol stp tunnel
+ # !
+ # !
+ # interface GigabitEthernet0/0/0/3.900 l2transport
+ # dot1q vlan 20 40
+ # !
+
+ # Using replaced
+ #
+ # Before state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/3
+ # description Ansible Network
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex half
+ # shutdown
+ # dot1q native vlan 20
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description Test description
+ # dot1q native vlan 10
+ # l2transport
+ # l2protocol stp tunnel
+ # !
+ # !
+ # interface GigabitEthernet0/0/0/3.900 l2transport
+ # dot1q vlan 20 40
+ # !
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ l2transport: true
+ l2protocol:
+ - stp: forward
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - any
+ state: replaced
+
+ # After state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/3
+ # description Ansible Network
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex half
+ # shutdown
+ # dot1q native vlan 20
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description Test description
+ # dot1q native vlan 40
+ # l2transport
+ # l2protocol stp forward
+ # !
+ # !
+ # interface GigabitEthernet0/0/0/3.900 l2transport
+ # dot1q vlan 20 any
+ # !
+
+ # Using overridden
+ #
+ # Before state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/3
+ # description Ansible Network
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex half
+ # shutdown
+ # dot1q native vlan 20
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description Test description
+ # dot1q native vlan 10
+ # l2transport
+ # l2protocol stp tunnel
+ # !
+ # !
+ # interface GigabitEthernet0/0/0/3.900 l2transport
+ # dot1q vlan 20 40
+ # !
+
+ - name: Override device configuration of all interfaces with provided configuration
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ l2transport: true
+ l2protocol:
+ - stp: forward
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - any
+ state: overridden
+
+ # After state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/3
+ # description Ansible Network
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex half
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description Test description
+ # dot1q native vlan 40
+ # l2transport
+ # l2protocol stp forward
+ # !
+ # !
+ # interface GigabitEthernet0/0/0/3.900
+ # dot1q vlan 20 any
+ # !
+
+ # Using deleted
+ #
+ # Before state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/3
+ # description Ansible Network
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex half
+ # shutdown
+ # dot1q native vlan 20
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description Test description
+ # dot1q native vlan 10
+ # l2transport
+ # l2protocol stp tunnel
+ # !
+ # !
+ #
+
+ - name: "Delete L2 attributes of given interfaces (Note: This won't delete the interface itself)"
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/4
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/3
+ # description Ansible Network
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex half
+ # shutdown
+ # dot1q native vlan 20
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description Test description
+ # !
+
+ # Using Deleted without any config passed
+ # "(NOTE: This will delete all of configured resource module attributes from each configured interface)"
+ #
+ # Before state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/3
+ # description Ansible Network
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex half
+ # shutdown
+ # dot1q native vlan 20
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description Test description
+ # dot1q native vlan 10
+ # l2transport
+ # l2protocol stp tunnel
+ # !
+ # !
+
+ - name: "Delete L2 attributes of all interfaces (Note: This won't delete the interface itself)"
+ cisco.iosxr.iosxr_l2_interfaces:
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/3
+ # description Ansible Network
+ # vrf custB
+ # ipv4 address 10.10.0.2 255.255.255.0
+ # duplex half
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description Test description
+ # !
+
+
+ # Using parsed
+ # parsed.cfg
+ # ------------
+ #
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 10.8.38.70 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # description Configured and Merged by Ansible-Network
+ # mtu 110
+ # ipv4 address 172.31.1.1 255.255.255.0
+ # duplex half
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # dot1q native vlan 10
+ # l2transport
+ # l2protocol cdp forward
+ # l2protocol pvst tunnel
+ # propagate remote-status
+ # !
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.900
+ # encapsulation dot1q 20 second-dot1q 40
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # shutdown
+ # dot1q native vlan 40
+ # !
+ - name: Convert L2 interfaces config to argspec without connecting to the appliance
+ cisco.iosxr.iosxr_l2_interfaces:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+ # Task Output (redacted)
+ # -----------------------
+ # "parsed": [
+ # {
+ # "name": "GigabitEthernet0/0/0/0"
+ # },
+ # {
+ # "l2protocol": [
+ # {
+ # "cdp": "forward"
+ # },
+ # {
+ # "pvst": "tunnel"
+ # }
+ # ],
+ # "l2transport": true,
+ # "name": "GigabitEthernet0/0/0/1",
+ # "native_vlan": 10,
+ # "propagate": true
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/3"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/3.900",
+ # "q_vlan": [
+ # 20,
+ # 40
+ # ]
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/4",
+ # "native_vlan": 40
+ # }
+ # ]
+
+
+ # Using rendered
+ - name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/1
+ native_vlan: 10
+ l2transport: true
+ l2protocol:
+
+ - pvst: tunnel
+
+ - cdp: forward
+ propagate: true
+
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - 40
+
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ state: rendered
+ # Task Output (redacted)
+ # -----------------------
+ # "rendered": [
+ # "interface GigabitEthernet0/0/0/1",
+ # "dot1q native vlan 10",
+ # "l2transport l2protocol pvst tunnel",
+ # "l2transport l2protocol cdp forward",
+ # "l2transport propagate remote-status",
+ # "interface GigabitEthernet0/0/0/3.900",
+ # "dot1q vlan 20 40",
+ # "interface GigabitEthernet0/0/0/4",
+ # "dot1q native vlan 40"
+ # ]
+
+
+ # Using gathered
+ # Before state:
+ # ------------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config interface
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 10.8.38.70 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # description Configured and Merged by Ansible-Network
+ # mtu 110
+ # ipv4 address 172.31.1.1 255.255.255.0
+ # duplex half
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # dot1q native vlan 10
+ # l2transport
+ # l2protocol cdp forward
+ # l2protocol pvst tunnel
+ # propagate remote-status
+ # !
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.900
+ # encapsulation dot1q 20 second-dot1q 40
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # shutdown
+ # dot1q native vlan 40
+ # !
+ - name: Gather IOSXR l2 interfaces as in given arguments
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ state: gathered
+ # Task Output (redacted)
+ # -----------------------
+ #
+ # "gathered": [
+ # {
+ # "name": "GigabitEthernet0/0/0/0"
+ # },
+ # {
+ # "l2protocol": [
+ # {
+ # "cdp": "forward"
+ # },
+ # {
+ # "pvst": "tunnel"
+ # }
+ # ],
+ # "l2transport": true,
+ # "name": "GigabitEthernet0/0/0/1",
+ # "native_vlan": 10,
+ # "propagate": true
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/3"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/3.900",
+ # "q_vlan": [
+ # 20,
+ # 40
+ # ]
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/4",
+ # "native_vlan": 40
+ # }
+ # ]
+ # After state:
+ # ------------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config interface
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 10.8.38.70 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # description Configured and Merged by Ansible-Network
+ # mtu 110
+ # ipv4 address 172.31.1.1 255.255.255.0
+ # duplex half
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # dot1q native vlan 10
+ # l2transport
+ # l2protocol cdp forward
+ # l2protocol pvst tunnel
+ # propagate remote-status
+ # !
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.900
+ # encapsulation dot1q 20 second-dot1q 40
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # shutdown
+ # dot1q native vlan 40
+ # !
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/0/0/2&#x27;, &#x27;l2transport l2protocol pvst tunnel&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
+- Rohit Thakur (@rohitthakur2590)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_l3_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_l3_interfaces_module.rst
new file mode 100644
index 00000000..a13faf8d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_l3_interfaces_module.rst
@@ -0,0 +1,803 @@
+.. _cisco.iosxr.iosxr_l3_interfaces_module:
+
+
+*******************************
+cisco.iosxr.iosxr_l3_interfaces
+*******************************
+
+**L3 interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of Layer-3 interface on Cisco IOS-XR devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of Layer-3 interface options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv4 address to be set for the Layer-3 interface mentioned in <em>name</em> option.</div>
+ <div>The address format is &lt;ipv4 address&gt;/&lt;mask&gt;, the mask is number in range 0-32 eg. 192.168.0.1/24</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the IPv4 address for Interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>secondary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the IP address as a secondary address.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 address to be set for the Layer-3 interface mentioned in <em>name</em> option.</div>
+ <div>The address format is &lt;ipv6 address&gt;/&lt;mask&gt;, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the IPv6 address for Interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>parsed</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against Cisco IOS-XRv Version 6.1.3 on VIRL.
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # ipv4 address 192.168.0.2 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.700
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # ipv6 address fd5d:12c9:2201:1::1/64
+ # shutdown
+ # !
+
+ - name: Merge provided configuration with device configuration
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/2
+ ipv4:
+ - address: 192.168.0.1/24
+ - name: GigabitEthernet0/0/0/3
+ ipv4:
+ - address: 192.168.2.1/24
+ secondary: true
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # ipv4 address 192.168.0.1 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # ipv4 address 192.168.1.0 255.255.255.0
+ # ipv4 address 192.168.2.1 255.255.255.0 secondary
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.700
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # ipv6 address fd5d:12c9:2201:1::1/64
+ # shutdown
+ # !
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # ipv4 address 192.168.0.1 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # ipv4 address 192.168.1.0 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.700
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # ipv6 address fd5d:12c9:2201:1::1/64
+ # shutdown
+ # !
+
+ - name: Override device configuration of all interfaces with provided configuration
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/3
+ ipv4:
+ - address: 192.168.0.1/24
+ - name: GigabitEthernet0/0/0/3.700
+ ipv4:
+ - address: 192.168.0.2/24
+ - address: 192.168.2.1/24
+ secondary: true
+ state: overridden
+
+ # After state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # ipv4 address 192.168.0.1 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.700
+ # ipv4 address 192.168.0.2 255.255.255.0
+ # ipv4 address 192.168.2.1 255.255.255.0 secondary
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # shutdown
+ # !
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # ipv4 address 192.168.0.2 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.700
+ # ipv4 address 192.168.0.1 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # ipv6 address fd5d:12c9:2201:1::1/64
+ # shutdown
+ # !
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/3
+ ipv6:
+ - address: fd5d:12c9:2201:1::1/64
+ - name: GigabitEthernet0/0/0/4
+ ipv4:
+ - address: 192.168.0.2/24
+ state: replaced
+
+ # After state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # ipv6 address fd5d:12c9:2201:1::1/64
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.700
+ # ipv4 address 192.168.0.1 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # ipv4 address 192.168.0.2 255.255.255.0
+ # shutdown
+ # !
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # ipv4 address 192.168.2.1 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # ipv4 address 192.168.3.1 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # ipv4 address 192.168.0.2 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.700
+ # ipv4 address 192.168.0.1 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # ipv6 address fd5d:12c9:2201:1::1/64
+ # shutdown
+ # !
+
+ - name: "Delete L3 attributes of given interfaces (Note: This won't delete the interface itself)"
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/3
+ - name: GigabitEthernet0/0/0/4
+ - name: GigabitEthernet0/0/0/3.700
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # ipv4 address 192.168.2.1 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # ipv4 address 192.168.3.1 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.700
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # shutdown
+ # !
+
+ # Using Deleted without any config passed
+ # "(NOTE: This will delete all of configured resource module attributes from each configured interface)"
+
+ # Before state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # ipv4 address 192.168.2.1 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # ipv4 address 192.168.3.1 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # ipv4 address 192.168.0.2 255.255.255.0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.700
+ # ipv4 address 192.168.0.1 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # ipv6 address fd5d:12c9:2201:1::1/64
+ # shutdown
+ # !
+
+
+ - name: "Delete L3 attributes of all interfaces (Note: This won't delete the interface itself)"
+ cisco.iosxr.iosxr_l3_interfaces:
+ state: deleted
+
+ # After state:
+ # -------------
+ #
+ # viosxr#show running-config interface
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3.700
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # shutdown
+ # !
+
+
+ # Using parsed
+ # parsed.cfg
+ # ------------
+ #
+ # nterface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 10.8.38.70 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # description Configured and Merged by Ansible-Network
+ # mtu 66
+ # ipv4 address 192.0.2.1 255.255.255.0
+ # ipv4 address 192.0.2.2 255.255.255.0 secondary
+ # ipv6 address 2001:db8:0:3::/64
+ # duplex half
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description Configured and Merged by Ansible-Network
+ # mtu 66
+ # speed 100
+ # duplex full
+ # dot1q native vlan 10
+ # l2transport
+ # l2protocol cdp forward
+ # l2protocol pvst tunnel
+ # propagate remote-status
+ # !
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # ipv4 address 192.0.22.1 255.255.255.0
+ # ipv4 address 192.0.23.1 255.255.255.0
+ # !
+ # - name: Convert L3 interfaces config to argspec without connecting to the appliance
+ # cisco.iosxr.iosxr_l3_interfaces:
+ # running_config: "{{ lookup('file', './parsed.cfg') }}"
+ # state: parsed
+ # Task Output (redacted)
+ # -----------------------
+ # "parsed": [
+ # {
+ # "ipv4": [
+ # {
+ # "address": "192.0.2.1 255.255.255.0"
+ # },
+ # {
+ # "address": "192.0.2.2 255.255.255.0",
+ # "secondary": true
+ # }
+ # ],
+ # "ipv6": [
+ # {
+ # "address": "2001:db8:0:3::/64"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/0"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/1"
+ # },
+ # {
+ # "ipv4": [
+ # {
+ # "address": "192.0.22.1 255.255.255.0"
+ # },
+ # {
+ # "address": "192.0.23.1 255.255.255.0"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/3"
+ # }
+ # ]
+
+
+ # Using rendered
+ - name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ ipv4:
+
+ - address: 198.51.100.1/24
+
+ - name: GigabitEthernet0/0/0/1
+ ipv6:
+
+ - address: 2001:db8:0:3::/64
+ ipv4:
+
+ - address: 192.0.2.1/24
+
+ - address: 192.0.2.2/24
+ secondary: true
+ state: rendered
+ # Task Output (redacted)
+ # -----------------------
+ # "rendered": [
+ # "interface GigabitEthernet0/0/0/0",
+ # "ipv4 address 198.51.100.1 255.255.255.0",
+ # "interface GigabitEthernet0/0/0/1",
+ # "ipv4 address 192.0.2.2 255.255.255.0 secondary",
+ # "ipv4 address 192.0.2.1 255.255.255.0",
+ # "ipv6 address 2001:db8:0:3::/64"
+ # ]
+ # Using gathered
+ # Before state:
+ # ------------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config interface
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 10.8.38.70 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # description Configured and Merged by Ansible-Network
+ # mtu 66
+ # ipv4 address 192.0.2.1 255.255.255.0
+ # ipv4 address 192.0.2.2 255.255.255.0 secondary
+ # ipv6 address 2001:db8:0:3::/64
+ # duplex half
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description Configured and Merged by Ansible-Network
+ # mtu 66
+ # speed 100
+ # duplex full
+ # dot1q native vlan 10
+ # l2transport
+ # l2protocol cdp forward
+ # l2protocol pvst tunnel
+ # propagate remote-status
+ # !
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # shutdown
+ # dot1q native vlan 40
+ # !
+ - name: Gather IOSXR l3 interfaces as in given arguments
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ state: gathered
+ # Task Output (redacted)
+ # -----------------------
+ #
+ # "gathered": [
+ # {
+ # "name": "Loopback888"
+ # },
+ # {
+ # "ipv4": [
+ # {
+ # "address": "192.0.2.1 255.255.255.0"
+ # },
+ # {
+ # "address": "192.0.2.2 255.255.255.0",
+ # "secondary": true
+ # }
+ # ],
+ # "ipv6": [
+ # {
+ # "address": "2001:db8:0:3::/64"
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/0"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/1"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/3"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/4"
+ # }
+ # ]
+ # After state:
+ # ------------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config interface
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 10.8.38.70 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # description Configured and Merged by Ansible-Network
+ # mtu 66
+ # ipv4 address 192.0.2.1 255.255.255.0
+ # ipv4 address 192.0.2.2 255.255.255.0 secondary
+ # ipv6 address 2001:db8:0:3::/64
+ # duplex half
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description Configured and Merged by Ansible-Network
+ # mtu 66
+ # speed 100
+ # duplex full
+ # dot1q native vlan 10
+ # l2transport
+ # l2protocol cdp forward
+ # l2protocol pvst tunnel
+ # propagate remote-status
+ # !
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # shutdown
+ # dot1q native vlan 40
+ # !
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/0/0/1&#x27;, &#x27;ipv4 address 192.168.0.1 255.255.255.0&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sumit Jaiswal (@justjais)
+- Rohit Thakur (@rohitthakur2590)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lacp_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lacp_interfaces_module.rst
new file mode 100644
index 00000000..badc6eb8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lacp_interfaces_module.rst
@@ -0,0 +1,802 @@
+.. _cisco.iosxr.iosxr_lacp_interfaces_module:
+
+
+*********************************
+cisco.iosxr.iosxr_lacp_interfaces
+*********************************
+
+**LACP interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages Link Aggregation Control Protocol (LACP) attributes of interfaces on IOS-XR devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of LACP interfaces options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>churn_logging</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>actor</li>
+ <li>partner</li>
+ <li>both</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the parameter for logging of LACP churn events.</div>
+ <div>Valid only for ether-bundles.</div>
+ <div>Mode &#x27;actor&#x27; logs actor churn events only.</div>
+ <div>Mode &#x27;partner&#x27; logs partner churn events only.</div>
+ <div>Mode &#x27;both&#x27; logs actor and partner churn events only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>collector_max_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the collector max delay to be signaled to the LACP partner.</div>
+ <div>Valid only for ether-bundles.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name/Identifier of the interface or Ether-Bundle.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>period</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the rate at which packets are sent or received.</div>
+ <div>For ether-bundles, this specifies the period to be used by its member links.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>switchover_suppress_flaps</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the time for which to suppress flaps during a LACP switchover.</div>
+ <div>Valid only for ether-bundles.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This dict object contains configurable options related to LACP system parameters for ether-bundles.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mac</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the system ID to use in LACP negotiations for the bundle, encoded as a MAC address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the system priority to use in LACP negotiations for the bundle.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config int</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>parsed</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS-XR 6.1.3.
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ #
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr#sh running-config interface
+ # Sun Jul 21 18:01:35.079 UTC
+ # interface Bundle-Ether10
+ # !
+ # interface Bundle-Ether11
+ # !
+ # interface Bundle-Ether12
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1'
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # !
+ #
+ #
+
+ - name: Merge provided configuration with device configuration
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ - name: Bundle-Ether10
+ churn_logging: actor
+ collector_max_delay: 100
+ switchover_suppress_flaps: 500
+
+ - name: Bundle-Ether11
+ system:
+ mac: 00c2.4c00.bd15
+
+ - name: GigabitEthernet0/0/0/1
+ period: 200
+ state: merged
+
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run int
+ # Sun Jul 21 18:24:52.413 UTC
+ # interface Bundle-Ether10
+ # lacp churn logging actor
+ # lacp switchover suppress-flaps 500
+ # lacp collector-max-delay 100
+ # !
+ # interface Bundle-Ether11
+ # lacp system mac 00c2.4c00.bd15
+ # !
+ # interface Bundle-Ether12
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # lacp period 200
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # !
+ #
+
+
+ # Using replaced
+ #
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run int
+ # Sun Jul 21 18:24:52.413 UTC
+ # interface Bundle-Ether10
+ # lacp churn logging actor
+ # lacp switchover suppress-flaps 500
+ # lacp collector-max-delay 100
+ # !
+ # interface Bundle-Ether11
+ # lacp system mac 00c2.4c00.bd15
+ # !
+ # interface Bundle-Ether12
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # lacp period 200
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # !
+ #
+
+ - name: Replace LACP configuration of listed interfaces with provided configuration
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ - name: Bundle-Ether10
+ churn_logging: partner
+
+ - name: GigabitEthernet0/0/0/2
+ period: 300
+ state: replaced
+
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run int
+ # Sun Jul 21 18:50:21.929 UTC
+ # interface Bundle-Ether10
+ # lacp churn logging partner
+ # !
+ # interface Bundle-Ether11
+ # lacp system mac 00c2.4c00.bd15
+ # !
+ # interface Bundle-Ether12
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # lacp period 200
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # lacp period 300
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # !
+ #
+ #
+
+
+ # Using overridden
+ #
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run int
+ # Sun Jul 21 18:24:52.413 UTC
+ # interface Bundle-Ether10
+ # lacp churn logging actor
+ # lacp switchover suppress-flaps 500
+ # lacp collector-max-delay 100
+ # !
+ # interface Bundle-Ether11
+ # lacp system mac 00c2.4c00.bd15
+ # !
+ # interface Bundle-Ether12
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # lacp period 200
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # lacp period 200
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # !
+ #
+ #
+
+ - name: Override all interface LACP configuration with provided configuration
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ - name: Bundle-Ether12
+ churn_logging: both
+ collector_max_delay: 100
+ switchover_suppress_flaps: 500
+
+ - name: GigabitEthernet0/0/0/1
+ period: 300
+ state: overridden
+
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr(config-if)#do sh run int
+ # Sun Jul 21 19:32:36.115 UTC
+ # interface Bundle-Ether10
+ # !
+ # interface Bundle-Ether11
+ # !
+ # interface Bundle-Ether12
+ # lacp churn logging both
+ # lacp switchover suppress-flaps 500
+ # lacp collector-max-delay 100
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # lacp period 300
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # !
+ #
+
+
+ # Using deleted
+ #
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run int
+ # Sun Jul 21 18:24:52.413 UTC
+ # interface Bundle-Ether10
+ # lacp churn logging actor
+ # lacp switchover suppress-flaps 500
+ # lacp collector-max-delay 100
+ # !
+ # interface Bundle-Ether11
+ # lacp non-revertive
+ # !
+ # interface Bundle-Ether12
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # lacp period 200
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # lacp period 300
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # !
+ #
+
+ - name: Deleted LACP configurations of provided interfaces (Note - This won't delete
+ the interface itself)
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ - name: Bundle-Ether10
+ - name: Bundle-Ether11
+ - name: GigabitEthernet0/0/0/1
+ - name: GigabitEthernet0/0/0/2
+ state: deleted
+
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ #
+ # Using parsed:
+
+ # parsed.cfg
+ # interface Bundle-Ether10
+ # lacp churn logging actor
+ # lacp switchover suppress-flaps 500
+ # lacp collector-max-delay 100
+ # !
+ # interface Bundle-Ether11
+ # lacp system mac 00c2.4c00.bd15
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # lacp period 200
+ # !
+ #
+
+ - name: Convert lacp interfaces config to argspec without connecting to the appliance
+ cisco.iosxr.iosxr_lacp_interfaces:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+
+ # --------------
+ # Output:
+ # --------------
+
+ # parsed:
+ # - name: Bundle-Ether10
+ # churn_logging: actor
+ # collector_max_delay: 100
+ # switchover_suppress_flaps: 500
+ #
+ # - name: Bundle-Ether11
+ # system:
+ # mac: 00c2.4c00.bd15
+ #
+ # - name: GigabitEthernet0/0/0/1
+ # period: 200
+ #
+ #
+
+ # Using gathered:
+
+ # Native config:
+ # interface Bundle-Ether10
+ # lacp churn logging actor
+ # lacp switchover suppress-flaps 500
+ # lacp collector-max-delay 100
+ # !
+ # interface Bundle-Ether11
+ # lacp system mac 00c2.4c00.bd15
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # lacp period 200
+ # !
+ #
+
+ - name: Gather IOSXR lacp interfaces configuration
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ state: gathered
+
+ # ----------
+ # Output
+ # ---------
+ # gathered:
+ # - name: Bundle-Ether10
+ # churn_logging: actor
+ # collector_max_delay: 100
+ # switchover_suppress_flaps: 500
+ #
+ # - name: Bundle-Ether11
+ # system:
+ # mac: 00c2.4c00.bd15
+ #
+ # - name: GigabitEthernet0/0/0/1
+ # period: 200
+
+ # Using rendered:
+
+ - name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ - name: Bundle-Ether10
+ churn_logging: actor
+ collector_max_delay: 100
+ switchover_suppress_flaps: 500
+
+ - name: Bundle-Ether11
+ system:
+ mac: 00c2.4c00.bd15
+
+ - name: GigabitEthernet0/0/0/1
+ period: 200
+ state: rendered
+
+ # -------------
+ # Output
+ # -------------
+ # rendered: [
+ # - "interface Bundle-Ether10"
+ # - " lacp churn logging actor"
+ # - " lacp switchover suppress-flaps 500"
+ # - " lacp collector-max-delay 100"
+ # - "interface Bundle-Ether11"
+ # - " lacp system mac 00c2.4c00.bd15"
+ # - "interface MgmtEth0/0/CPU0/0"
+ # - " ipv4 address 192.0.2.11 255.255.255.0"
+ # - "interface GigabitEthernet0/0/0/1"
+ # - " lacp period 200"
+ #
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Bundle-Ether10&#x27;, &#x27;lacp churn logging partner&#x27;, &#x27;lacp period 150&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@nilashishc)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lacp_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lacp_module.rst
new file mode 100644
index 00000000..a42ae0d6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lacp_module.rst
@@ -0,0 +1,500 @@
+.. _cisco.iosxr.iosxr_lacp_module:
+
+
+**********************
+cisco.iosxr.iosxr_lacp
+**********************
+
+**LACP resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages Global Link Aggregation Control Protocol (LACP) on IOS-XR devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="4">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The provided configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option sets the default system parameters for LACP bundles.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mac</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The system MAC related configuration for LACP.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The system ID to use in LACP negotiations.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The system priority to use in LACP negotiations.</div>
+ <div>Lower value is higher priority.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config lacp</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>deleted</li>
+ <li>parsed</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS-XR 6.1.3.
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ #
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:iosxr01#show running-config lacp
+ # Tue Jul 16 17:46:08.147 UTC
+ # % No such configuration item(s)
+ #
+ #
+
+ - name: Merge provided configuration with device configuration
+ cisco.iosxr.iosxr_lacp:
+ config:
+ system:
+ priority: 10
+ mac:
+ address: 00c1.4c00.bd15
+ state: merged
+
+ #
+ #
+ # -----------------------
+ # Module Execution Result
+ # -----------------------
+ #
+ # "before": {}
+ #
+ #
+ # "commands": [
+ # "lacp system priority 10",
+ # "lacp system mac 00c1.4c00.bd15"
+ # ]
+ #
+ #
+ # "after": {
+ # "system": {
+ # "mac": {
+ # "address": "00c1.4c00.bd15"
+ # },
+ # "priority": 10
+ # }
+ # }
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ #
+ # RP/0/0/CPU0:iosxr01#sh run lacp
+ # Tue Jul 16 17:51:29.365 UTC
+ # lacp system mac 00c1.4c00.bd15
+ # lacp system priority 10
+ #
+ #
+
+ # Using replaced
+ #
+ #
+ # -------------
+ # Before state
+ # -------------
+ #
+ #
+ # RP/0/0/CPU0:iosxr01#sh run lacp
+ # Tue Jul 16 17:53:59.904 UTC
+ # lacp system mac 00c1.4c00.bd15
+ # lacp system priority 10
+ #
+
+ - name: Replace device global lacp configuration with the given configuration
+ cisco.iosxr.iosxr_lacp:
+ config:
+ system:
+ priority: 11
+ state: replaced
+ #
+ #
+ # -----------------------
+ # Module Execution Result
+ # -----------------------
+ # "before": {
+ # "system": {
+ # "mac": {
+ # "address": "00c1.4c00.bd15"
+ # },
+ # "priority": 10
+ # }
+ # }
+ #
+ #
+ # "commands": [
+ # "no lacp system mac",
+ # "lacp system priority 11"
+ # ]
+ #
+ #
+ # "after": {
+ # "system": {
+ # "priority": 11
+ # }
+ # }
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ #
+ # RP/0/0/CPU0:iosxr01#sh run lacp
+ # Tue Jul 16 18:02:40.379 UTC
+ # lacp system priority 11
+ #
+ #
+
+ # Using deleted
+ #
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:iosxr01#sh run lacp
+ # Tue Jul 16 18:37:09.727 UTC
+ # lacp system mac 00c1.4c00.bd15
+ # lacp system priority 11
+ #
+ #
+
+ - name: Delete global LACP configurations from the device
+ cisco.iosxr.iosxr_lacp:
+ state: deleted
+
+ #
+ #
+ # -----------------------
+ # Module Execution Result
+ # -----------------------
+ # "before": {
+ # "system": {
+ # "mac": {
+ # "address": "00c1.4c00.bd15"
+ # },
+ # "priority": 11
+ # }
+ # }
+ #
+ #
+ # "commands": [
+ # "no lacp system mac",
+ # "no lacp system priority"
+ # ]
+ #
+ #
+ # "after": {}
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:iosxr01#sh run lacp
+ # Tue Jul 16 18:39:44.116 UTC
+ # % No such configuration item(s)
+ #
+ #
+
+
+ # Using parsed
+ # parsed.cfg
+ # ------------
+ #
+ # lacp system mac 00c1.4c00.bd15
+ # lacp system priority 11
+ # - name: Convert LACP config to argspec without connecting to the appliance
+ # cisco.iosxr.iosxr_lacp:
+ # running_config: "{{ lookup('file', './parsed.cfg') }}"
+ # state: parsed
+ # Task Output (redacted)
+ # -----------------------
+ # "parsed": {
+ # "system": {
+ # "mac": {
+ # "address": "00c1.4c00.bd15"
+ # },
+ # "priority": 11
+ # }
+ # }
+
+
+ # Using rendered
+ - name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_lacp:
+ config:
+ system:
+ priority: 11
+ mac:
+ address: 00c1.4c00.bd15
+ state: rendered
+ # Task Output (redacted)
+ # -----------------------
+ # "rendered": [
+ # "lacp system priority 11",
+ # "lacp system mac 00c1.4c00.bd15"
+ # ]
+
+
+ # Using gathered
+ # Before state:
+ # ------------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config lacp
+ # lacp system mac 00c1.4c00.bd15
+ # lacp system priority 11
+ - name: Gather IOSXR LACP configuration
+ cisco.iosxr.iosxr_lacp:
+ config:
+ state: gathered
+ # Task Output (redacted)
+ # -----------------------
+ #
+ # "gathered": {
+ # "system": {
+ # "mac": {
+ # "address": "00c1.4c00.bd15"
+ # },
+ # "priority": 11
+ # }
+ # }
+ # After state:
+ # ------------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config lacp
+ # lacp system mac 00c1.4c00.bd15
+ # lacp system priority
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;lacp system priority 10&#x27;, &#x27;lacp system mac 00c1.4c00.bd15&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@nilashishc)
+- Rohit Thakur (@rohitthakur2590)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lag_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lag_interfaces_module.rst
new file mode 100644
index 00000000..12463e21
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lag_interfaces_module.rst
@@ -0,0 +1,1033 @@
+.. _cisco.iosxr.iosxr_lag_interfaces_module:
+
+
+********************************
+cisco.iosxr.iosxr_lag_interfaces
+********************************
+
+**LAG interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages the attributes of LAG/Ether-Bundle interfaces on IOS-XR devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A provided Link Aggregation Group (LAG) configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>links</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This dict contains configurable options related to LAG/Ether-Bundle links.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_active</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the limit on the number of links that can be active in the LAG/Ether-Bundle.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_active</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the minimum number of active links needed to bring up the LAG/Ether-Bundle.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>load_balancing_hash</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>dst-ip</li>
+ <li>src-ip</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the hash function used for traffic forwarded over the LAG/Ether-Bundle.</div>
+ <div>Option &#x27;dst-ip&#x27; uses the destination IP as the hash function.</div>
+ <div>Option &#x27;src-ip&#x27; uses the source IP as the hash function.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>members</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of member interfaces for the LAG/Ether-Bundle.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>member</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the member interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>on</li>
+ <li>active</li>
+ <li>passive</li>
+ <li>inherit</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the mode of the operation for the member interface.</div>
+ <div>Mode &#x27;active&#x27; runs LACP in active mode.</div>
+ <div>Mode &#x27;on&#x27; does not run LACP over the port.</div>
+ <div>Mode &#x27;passive&#x27; runs LACP in passive mode over the port.</div>
+ <div>Mode &#x27;inherit&#x27; runs LACP as configured in the bundle.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>on</li>
+ <li>active</li>
+ <li>passive</li>
+ </ul>
+ </td>
+ <td>
+ <div>LAG mode.</div>
+ <div>Mode &#x27;active&#x27; runs LACP in active mode over the port.</div>
+ <div>Mode &#x27;on&#x27; does not run LACP over the port.</div>
+ <div>Mode &#x27;passive&#x27; runs LACP in passive mode over the port.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name/Identifier of the LAG/Ether-Bundle to configure.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config int</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>parsed</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS-XR 6.1.3.
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ #
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ # RP/0/0/CPU0:iosxr01#show run int
+ # Sun Jul 7 19:42:59.416 UTC
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description "GigabitEthernet - 1"
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # !
+ #
+ #
+ - name: Merge provided configuration with device configuration
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ - name: Bundle-Ether10
+ members:
+ - member: GigabitEthernet0/0/0/1
+ mode: inherit
+ - member: GigabitEthernet0/0/0/3
+ mode: inherit
+ mode: active
+ links:
+ max_active: 5
+ min_active: 2
+ load_balancing_hash: src-ip
+
+ - name: Bundle-Ether12
+ members:
+ - member: GigabitEthernet0/0/0/2
+ mode: passive
+ - member: GigabitEthernet0/0/0/4
+ mode: passive
+ load_balancing_hash: dst-ip
+ state: merged
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ # RP/0/0/CPU0:iosxr01#show run int
+ # Sun Jul 7 20:51:17.685 UTC
+ # interface Bundle-Ether10
+ # lacp mode active
+ # bundle load-balancing hash src-ip
+ # bundle maximum-active links 5
+ # bundle minimum-active links 2
+ # !
+ # interface Bundle-Ether12
+ # bundle load-balancing hash dst-ip
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # bundle id 12 mode passive
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # bundle id 12 mode passive
+ # !
+ #
+
+
+ # Using replaced
+ #
+ #
+ # -------------
+ # Before state
+ # -------------
+ #
+ #
+ # RP/0/0/CPU0:iosxr01#sho run int
+ # Sun Jul 7 20:58:06.527 UTC
+ # interface Bundle-Ether10
+ # lacp mode active
+ # bundle load-balancing hash src-ip
+ # bundle maximum-active links 5
+ # bundle minimum-active links 2
+ # !
+ # interface Bundle-Ether12
+ # bundle load-balancing hash dst-ip
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # bundle id 12 mode passive
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # bundle id 12 mode passive
+ # !
+ #
+ #
+ - name: Replace device configuration of listed Bundles with provided configurations
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ - name: Bundle-Ether12
+ members:
+ - name: GigabitEthernet0/0/0/2
+ mode: passive
+
+ - name: Bundle-Ether11
+ members:
+ - name: GigabitEthernet0/0/0/4
+ load_balancing_hash: src-ip
+ state: replaced
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ #
+ # RP/0/0/CPU0:iosxr01#sh run int
+ # Sun Jul 7 21:22:27.397 UTC
+ # interface Bundle-Ether10
+ # lacp mode active
+ # bundle load-balancing hash src-ip
+ # bundle maximum-active links 5
+ # bundle minimum-active links 2
+ # !
+ # interface Bundle-Ether11
+ # bundle load-balancing hash src-ip
+ # !
+ # interface Bundle-Ether12
+ # lacp mode passive
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # bundle id 12 mode on
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # bundle id 11 mode on
+ # !
+ #
+ #
+
+
+ # Using overridden
+ #
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:iosxr01#sh run int
+ # Sun Jul 7 21:22:27.397 UTC
+ # interface Bundle-Ether10
+ # lacp mode active
+ # bundle load-balancing hash src-ip
+ # bundle maximum-active links 5
+ # bundle minimum-active links 2
+ # !
+ # interface Bundle-Ether11
+ # bundle load-balancing hash src-ip
+ # !
+ # interface Bundle-Ether12
+ # lacp mode passive
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # bundle id 12 mode on
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # bundle id 11 mode on
+ # !
+ #
+ #
+
+ - name: Overrides all device configuration with provided configuration
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ - name: Bundle-Ether10
+ members:
+ - member: GigabitEthernet0/0/0/1
+ mode: inherit
+ - member: GigabitEthernet0/0/0/2
+ mode: inherit
+ mode: active
+ load_balancing_hash: dst-ip
+ state: overridden
+ #
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:iosxr01#sh run int
+ # Sun Jul 7 21:43:04.802 UTC
+ # interface Bundle-Ether10
+ # lacp mode active
+ # bundle load-balancing hash dst-ip
+ # !
+ # interface Bundle-Ether11
+ # !
+ # interface Bundle-Ether12
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # !
+ #
+ #
+
+
+ # Using deleted
+ #
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ # RP/0/0/CPU0:iosxr01#sh run int
+ # Sun Jul 7 21:22:27.397 UTC
+ # interface Bundle-Ether10
+ # lacp mode active
+ # bundle load-balancing hash src-ip
+ # bundle maximum-active links 5
+ # bundle minimum-active links 2
+ # !
+ # interface Bundle-Ether11
+ # bundle load-balancing hash src-ip
+ # !
+ # interface Bundle-Ether12
+ # lacp mode passive
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # bundle id 12 mode on
+ # !n
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # bundle id 11 mode on
+ # !
+ #
+ #
+
+ - name: Delete attributes of given bundles and removes member interfaces from them
+ (Note - This won't delete the bundles themselves)
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ - name: Bundle-Ether10
+ - name: Bundle-Ether11
+ - name: Bundle-Ether12
+ state: deleted
+
+ #
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ # RP/0/0/CPU0:iosxr01#sh run int
+ # Sun Jul 7 21:49:50.004 UTC
+ # interface Bundle-Ether10
+ # !
+ # interface Bundle-Ether11
+ # !
+ # interface Bundle-Ether12
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # !
+ #
+ #
+
+ # Using deleted (without config)
+ #
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run int
+ # Sun Aug 18 19:49:51.908 UTC
+ # interface Bundle-Ether10
+ # lacp mode active
+ # bundle load-balancing hash src-ip
+ # bundle maximum-active links 10
+ # bundle minimum-active links 2
+ # !
+ # interface Bundle-Ether11
+ # bundle load-balancing hash dst-ip
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # bundle id 10 mode inherit
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # bundle id 10 mode passive
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # bundle id 11 mode passive
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # bundle id 11 mode passive
+ # shutdown
+ # !
+ #
+
+ - name: Delete attributes of all bundles and removes member interfaces from them (Note
+ - This won't delete the bundles themselves)
+ cisco.iosxr.iosxr_lag_interfaces:
+ state: deleted
+
+ #
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run int
+ # Sun Aug 18 19:54:22.389 UTC
+ # interface Bundle-Ether10
+ # !
+ # interface Bundle-Ether11
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 10.8.38.69 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/0
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # shutdown
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # shutdown
+ # !
+
+ # Using parsed:
+
+ # parsed.cfg
+
+ # interface Bundle-Ether10
+ # lacp mode active
+ # bundle load-balancing hash src-ip
+ # bundle maximum-active links 5
+ # bundle minimum-active links 2
+ # !
+ # interface Bundle-Ether12
+ # bundle load-balancing hash dst-ip
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # bundle id 12 mode passive
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # bundle id 12 mode passive
+ # !
+ #
+ - name: Convert lag interfaces config to argspec without connecting to the appliance
+ cisco.iosxr.iosxr_lag_interfaces:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+
+ # --------------
+ # Output
+ # --------------
+ # parsed:
+ # - name: Bundle-Ether10
+ # members:
+ # - member: GigabitEthernet0/0/0/1
+ # mode: inherit
+ # - member: GigabitEthernet0/0/0/3
+ # mode: inherit
+ # mode: active
+ # links:
+ # max_active: 5
+ # min_active: 2
+ # load_balancing_hash: src-ip
+
+ # - name: Bundle-Ether12
+ # members:
+ # - member: GigabitEthernet0/0/0/2
+ # mode: passive
+ # - member: GigabitEthernet0/0/0/4
+ # mode: passive
+ # load_balancing_hash: dst-ip
+
+ # using gathered
+
+ # Device Config:
+ # -------------
+
+ # interface Bundle-Ether10
+ # lacp mode active
+ # bundle load-balancing hash src-ip
+ # bundle maximum-active links 5
+ # bundle minimum-active links 2
+ # !
+ # interface Bundle-Ether12
+ # bundle load-balancing hash dst-ip
+ # !
+ # interface Loopback888
+ # description test for ansible
+ # shutdown
+ # !
+ # interface MgmtEth0/0/CPU0/0
+ # ipv4 address 192.0.2.11 255.255.255.0
+ # !
+ # interface GigabitEthernet0/0/0/1
+ # description 'GigabitEthernet - 1"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/2
+ # description "GigabitEthernet - 2"
+ # bundle id 12 mode passive
+ # !
+ # interface GigabitEthernet0/0/0/3
+ # description "GigabitEthernet - 3"
+ # bundle id 10 mode inherit
+ # !
+ # interface GigabitEthernet0/0/0/4
+ # description "GigabitEthernet - 4"
+ # bundle id 12 mode passive
+ # !
+ #
+
+ - name: Gather IOSXR lag interfaces configuration
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ state: gathered
+
+ # --------------
+ # Output
+ # --------------
+ # gathered:
+ # - name: Bundle-Ether10
+ # members:
+ # - member: GigabitEthernet0/0/0/1
+ # mode: inherit
+ # - member: GigabitEthernet0/0/0/3
+ # mode: inherit
+ # mode: active
+ # links:
+ # max_active: 5
+ # min_active: 2
+ # load_balancing_hash: src-ip
+
+ # - name: Bundle-Ether12
+ # members:
+ # - member: GigabitEthernet0/0/0/2
+ # mode: passive
+ # - member: GigabitEthernet0/0/0/4
+ # mode: passive
+ # load_balancing_hash: dst-ip
+
+ # Using rendered:
+ - name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ - name: Bundle-Ether10
+ members:
+ - member: GigabitEthernet0/0/0/1
+ mode: inherit
+ - member: GigabitEthernet0/0/0/3
+ mode: inherit
+ mode: active
+ links:
+ max_active: 5
+ min_active: 2
+ load_balancing_hash: src-ip
+
+ - name: Bundle-Ether12
+ members:
+ - member: GigabitEthernet0/0/0/2
+ mode: passive
+ - member: GigabitEthernet0/0/0/4
+ mode: passive
+ load_balancing_hash: dst-ip
+ state: rendered
+
+ # Output:
+
+ # rendered:
+ # [
+ # - "interface Bundle-Ether10"
+ # - " lacp mode active"
+ # - " bundle load-balancing hash src-ip"
+ # - " bundle maximum-active links 5"
+ # - " bundle minimum-active links 2"
+ # - "interface Bundle-Ether12"
+ # - " bundle load-balancing hash dst-ip"
+ # - "interface Loopback888"
+ # - " description test for ansible"
+ # - " shutdown"
+ # - "interface MgmtEth0/0/CPU0/0"
+ # - " ipv4 address 192.0.2.11 255.255.255.0"
+ # - "interface GigabitEthernet0/0/0/1"
+ # - " description 'GigabitEthernet - 1""
+ # - " bundle id 10 mode inherit"
+ # - "interface GigabitEthernet0/0/0/2"
+ # - " description "GigabitEthernet - 2""
+ # - " bundle id 12 mode passive"
+ # - "interface GigabitEthernet0/0/0/3"
+ # - " description "GigabitEthernet - 3""
+ # - " bundle id 10 mode inherit"
+ # - "interface GigabitEthernet0/0/0/4"
+ # - " description "GigabitEthernet - 4""
+ # - " bundle id 12 mode passive"
+ # ]
+ #
+ #
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Bundle-Ether10&#x27;, &#x27;bundle minimum-active links 2&#x27;, &#x27;bundle load-balancing hash src-ip&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@NilashishC)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lldp_global_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lldp_global_module.rst
new file mode 100644
index 00000000..a667db37
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lldp_global_module.rst
@@ -0,0 +1,692 @@
+.. _cisco.iosxr.iosxr_lldp_global_module:
+
+
+*****************************
+cisco.iosxr.iosxr_lldp_global
+*****************************
+
+**LLDP resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages Global Link Layer Discovery Protocol (LLDP) settings on IOS-XR devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The provided global LLDP configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the holdtime (in sec) to be sent in packets.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reinit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the delay (in sec) for LLDP initialization on any interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>subinterfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable or disable LLDP over sub-interfaces.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the rate at which LLDP packets are sent (in sec).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tlv_select</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the LLDP TLVs to enable or disable.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>management_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable or disable management address TLV.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable or disable port description TLV.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_capabilities</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable or disable system capabilities TLV.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable or disable system description TLV.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable or disable system name TLV.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config lldp</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>deleted</li>
+ <li>parsed</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS-XR 6.1.3.
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ #
+ #
+ # -------------
+ # Before State
+ # -------------
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run lldp
+ # Tue Aug 6 19:27:54.933 UTC
+ # % No such configuration item(s)
+ #
+ #
+
+ - name: Merge provided LLDP configuration with the existing configuration
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ holdtime: 100
+ reinit: 2
+ timer: 3000
+ subinterfaces: true
+ tlv_select:
+ management_address: false
+ system_description: false
+ state: merged
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": {}
+ #
+ # "commands": [
+ # "lldp subinterfaces enable",
+ # "lldp holdtime 100",
+ # "lldp reinit 2",
+ # "lldp tlv-select system-description disable",
+ # "lldp tlv-select management-address disable",
+ # "lldp timer 3000"
+ # ]
+ #
+ # "after": {
+ # "holdtime": 100,
+ # "reinit": 2,
+ # "subinterfaces": true,
+ # "timer": 3000,
+ # "tlv_select": {
+ # "management_address": false,
+ # "system_description": false
+ # }
+ # }
+ #
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run lldp
+ # Tue Aug 6 21:31:10.587 UTC
+ # lldp
+ # timer 3000
+ # reinit 2
+ # subinterfaces enable
+ # holdtime 100
+ # tlv-select
+ # management-address disable
+ # system-description disable
+ # !
+ # !
+ #
+ #
+
+
+ # Using replaced
+ #
+ #
+ # -------------
+ # Before State
+ # -------------
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run lldp
+ # Tue Aug 6 21:31:10.587 UTC
+ # lldp
+ # timer 3000
+ # reinit 2
+ # subinterfaces enable
+ # holdtime 100
+ # tlv-select
+ # management-address disable
+ # system-description disable
+ # !
+ # !
+ #
+ #
+
+ - name: Replace existing LLDP device configuration with provided configuration
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ holdtime: 100
+ tlv_select:
+ port_description: false
+ system_description: true
+ management_description: true
+ state: replaced
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": {
+ # "holdtime": 100,
+ # "reinit": 2,
+ # "subinterfaces": true,
+ # "timer": 3000,
+ # "tlv_select": {
+ # "management_address": false,
+ # "system_description": false
+ # }
+ # }
+ #
+ # "commands": [
+ # "no lldp reinit 2",
+ # "no lldp subinterfaces enable",
+ # "no lldp timer 3000",
+ # "no lldp tlv-select management-address disable",
+ # "no lldp tlv-select system-description disable",
+ # "lldp tlv-select port-description disable"
+ # ]
+ #
+ # "after": {
+ # "holdtime": 100,
+ # "tlv_select": {
+ # "port_description": false
+ # }
+ # }
+ #
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run lldp
+ # Tue Aug 6 21:53:08.407 UTC
+ # lldp
+ # holdtime 100
+ # tlv-select
+ # port-description disable
+ # !
+ # !
+ #
+ #
+
+
+ # Using deleted
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run lldp
+ # Tue Aug 6 21:31:10.587 UTC
+ # lldp
+ # timer 3000
+ # reinit 2
+ # subinterfaces enable
+ # holdtime 100
+ # tlv-select
+ # management-address disable
+ # system-description disable
+ # !
+ # !
+ #
+ #
+
+ - name: Deleted existing LLDP configurations from the device
+ cisco.iosxr.iosxr_lldp_global:
+ state: deleted
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": {
+ # "holdtime": 100,
+ # "reinit": 2,
+ # "subinterfaces": true,
+ # "timer": 3000,
+ # "tlv_select": {
+ # "management_address": false,
+ # "system_description": false
+ # }
+ # },
+ #
+ # "commands": [
+ # "no lldp holdtime 100",
+ # "no lldp reinit 2",
+ # "no lldp subinterfaces enable",
+ # "no lldp timer 3000",
+ # "no lldp tlv-select management-address disable",
+ # "no lldp tlv-select system-description disable"
+ # ]
+ #
+ # "after": {}
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ # RP/0/0/CPU0:an-iosxr#sh run lldp
+ # Tue Aug 6 21:38:31.187 UTC
+ # lldp
+ # !
+ #
+ # Using parsed:
+
+ # parsed.cfg
+ # lldp
+ # timer 3000
+ # reinit 2
+ # subinterfaces enable
+ # holdtime 100
+ # tlv-select
+ # management-address disable
+ # system-description disable
+ # !
+ # !
+
+ - name: Convert lldp global config to argspec without connecting to the appliance
+ cisco.iosxr.iosxr_lldp_global:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ # parsed:
+ # holdtime: 100
+ # reinit: 2
+ # timer: 3000
+ # subinterfaces: True
+ # tlv_select:
+ # management_address: False
+ # system_description: False
+
+ # using gathered:
+
+ # Device config:
+ # lldp
+ # timer 3000
+ # reinit 2
+ # subinterfaces enable
+ # holdtime 100
+ # tlv-select
+ # management-address disable
+ # system-description disable
+ # !
+ # !
+
+ - name: Gather IOSXR lldp global configuration
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ state: gathered
+
+
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ # gathered:
+ # holdtime: 100
+ # reinit: 2
+ # timer: 3000
+ # subinterfaces: True
+ # tlv_select:
+ # management_address: False
+ # system_description: False
+
+ # using rendered:
+
+ - name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ holdtime: 100
+ reinit: 2
+ timer: 3000
+ subinterfaces: true
+ tlv_select:
+ management_address: false
+ system_description: false
+ state: rendered
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "rendered": [
+ # "lldp subinterfaces enable",
+ # "lldp holdtime 100",
+ # "lldp reinit 2",
+ # "lldp tlv-select system-description disable",
+ # "lldp tlv-select management-address disable",
+ # "lldp timer 3000"
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;lldp subinterfaces enable&#x27;, &#x27;lldp holdtime 100&#x27;, &#x27;no lldp tlv-select management-address disable&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@NilashishC)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lldp_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lldp_interfaces_module.rst
new file mode 100644
index 00000000..1ecb8fa5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_lldp_interfaces_module.rst
@@ -0,0 +1,849 @@
+.. _cisco.iosxr.iosxr_lldp_interfaces_module:
+
+
+*********************************
+cisco.iosxr.iosxr_lldp_interfaces
+*********************************
+
+**LLDP interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages Link Layer Discovery Protocol (LLDP) attributes of interfaces on IOS-XR devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of LLDP interfaces options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>destination</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies LLDP destination configuration on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mac_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ieee-nearest-bridge</li>
+ <li>ieee-nearest-non-tmpr-bridge</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the LLDP destination mac address on the interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name/Identifier of the interface or Ether-Bundle.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>receive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable LLDP RX on an interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transmit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable LLDP TX on an interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config int</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>parsed</li>
+ <li>rendered</li>
+ <li>gathered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS-XR 6.1.3.
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ #
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/RP0/CPU0:ios#sh run int
+ # Mon Aug 12 12:40:23.104 UTC
+ # interface TenGigE0/0/0/0
+ # ipv4 address 192.0.2.11 255.255.255.192
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/1
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/2
+ # !
+ #
+ #
+
+ - name: Merge provided configuration with running configuration
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ destination:
+ mac_address: ieee-nearest-non-tmpr-bridge
+ transmit: false
+
+ - name: GigabitEthernet0/0/0/2
+ destination:
+ mac_address: ieee-nearest-bridge
+ receive: false
+ state: merged
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ #
+ # "before": [
+ # {
+ # "name": "TenGigE0/0/0/0"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/1"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/2"
+ # }
+ # ]
+ #
+ # "commands": [
+ # "interface GigabitEthernet0/0/0/2",
+ # "lldp destination mac-address ieee-nearest-non-tmpr-bridge",
+ # "lldp transmit disable",
+ # "interface GigabitEthernet0/0/0/1",
+ # "lldp receive disable",
+ # "lldp destination mac-address ieee-nearest-bridge"
+ # ]
+ #
+ # "after": [
+ # {
+ # "name": "TenGigE0/0/0/0"
+ # },
+ # {
+ # "destination": {
+ # "mac_address": "ieee-nearest-bridge"
+ # },
+ # "name": "GigabitEthernet0/0/0/1",
+ # "receive": false
+ # },
+ # {
+ # "destination": {
+ # "mac_address": "ieee-nearest-non-tmpr-bridge"
+ # },
+ # "name": "GigabitEthernet0/0/0/2",
+ # "transmit": false
+ # }
+ # ]
+ #
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ #
+ # RP/0/RP0/CPU0:ios#sh run int
+ # Mon Aug 12 12:49:51.517 UTC
+ # interface TenGigE0/0/0/0
+ # ipv4 address 192.0.2.11 255.255.255.192
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/1
+ # lldp
+ # receive disable
+ # destination mac-address
+ # ieee-nearest-bridge
+ # !
+ # !
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/2
+ # lldp
+ # transmit disable
+ # destination mac-address
+ # ieee-nearest-non-tmpr-bridge
+ # !
+ # !
+ # !
+ #
+ #
+
+
+ # Using replaced
+ #
+ #
+ # -------------
+ # Before state
+ # -------------
+ #
+ #
+ # RP/0/RP0/CPU0:ios#sh run int
+ # Mon Aug 12 12:49:51.517 UTC
+ # interface TenGigE0/0/0/0
+ # ipv4 address 192.0.2.11 255.255.255.192
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/1
+ # lldp
+ # receive disable
+ # destination mac-address
+ # ieee-nearest-bridge
+ # !
+ # !
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/2
+ # lldp
+ # transmit disable
+ # destination mac-address
+ # ieee-nearest-non-tmpr-bridge
+ # !
+ # !
+ # !
+ #
+ #
+
+ - name: Replace existing LLDP configurations of specified interfaces with provided
+ configuration
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ destination:
+ mac_address: ieee-nearest-non-tmpr-bridge
+ state: replaced
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": [
+ # {
+ # "name": "TenGigE0/0/0/0"
+ # },
+ # {
+ # "destination": {
+ # "mac_address": "ieee-nearest-bridge"
+ # },
+ # "name": "GigabitEthernet0/0/0/1",
+ # "receive": false
+ # },
+ # {
+ # "destination": {
+ # "mac_address": "ieee-nearest-non-tmpr-bridge"
+ # },
+ # "name": "GigabitEthernet0/0/0/2",
+ # "transmit": false
+ # }
+ # ]
+ #
+ #
+ # "commands": [
+ # "interface GigabitEthernet0/0/0/1",
+ # "no lldp receive disable",
+ # "lldp destination mac-address ieee-nearest-non-tmpr-bridge"
+ # ]
+ #
+ #
+ # "after": [
+ # {
+ # "name": "TenGigE0/0/0/0"
+ # },
+ # {
+ # "destination": {
+ # "mac_address": "ieee-nearest-non-tmpr-bridge"
+ # },
+ # "name": "GigabitEthernet0/0/0/1"
+ # },
+ # {
+ # "destination": {
+ # "mac_address": "ieee-nearest-non-tmpr-bridge"
+ # },
+ # "name": "GigabitEthernet0/0/0/2",
+ # "transmit": false
+ # }
+ # ]
+ #
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ #
+ # RP/0/RP0/CPU0:ios#sh run int
+ # Mon Aug 12 13:02:57.062 UTC
+ # interface TenGigE0/0/0/0
+ # ipv4 address 192.0.2.11 255.255.255.192
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/1
+ # lldp
+ # destination mac-address
+ # ieee-nearest-non-tmpr-bridge
+ # !
+ # !
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/2
+ # lldp
+ # transmit disable
+ # destination mac-address
+ # ieee-nearest-non-tmpr-bridge
+ # !
+ # !
+ # !
+ #
+ #
+
+
+ # Using overridden
+ #
+ #
+ # -------------
+ # Before state
+ # -------------
+ #
+ #
+ # RP/0/RP0/CPU0:ios#sh run int
+ # Mon Aug 12 13:15:40.465 UTC
+ # interface TenGigE0/0/0/0
+ # ipv4 address 192.0.2.11 255.255.255.192
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/1
+ # lldp
+ # receive disable
+ # destination mac-address
+ # ieee-nearest-bridge
+ # !
+ # !
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/2
+ # lldp
+ # transmit disable
+ # destination mac-address
+ # ieee-nearest-non-tmpr-bridge
+ # !
+ # !
+ # !
+ #
+ #
+
+ - name: Override the LLDP configurations of all the interfaces with provided configurations
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ transmit: false
+ state: overridden
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ #
+ # "before": [
+ # {
+ # "name": "TenGigE0/0/0/0"
+ # },
+ # {
+ # "destination": {
+ # "mac_address": "ieee-nearest-bridge"
+ # },
+ # "name": "GigabitEthernet0/0/0/1",
+ # "receive": false
+ # },
+ # {
+ # "destination": {
+ # "mac_address": "ieee-nearest-non-tmpr-bridge"
+ # },
+ # "name": "GigabitEthernet0/0/0/2",
+ # "transmit": false
+ # }
+ # ]
+ #
+ # "commands": [
+ # "interface GigabitEthernet0/0/0/2",
+ # "no lldp destination mac-address ieee-nearest-non-tmpr-bridge",
+ # "no lldp transmit disable",
+ # "interface GigabitEthernet0/0/0/1",
+ # "no lldp destination mac-address ieee-nearest-bridge",
+ # "no lldp receive disable",
+ # "lldp transmit disable"
+ # ]
+ #
+ #
+ # "after": [
+ # {
+ # "name": "TenGigE0/0/0/0"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/1",
+ # "transmit": false
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/2"
+ # }
+ # ]
+ #
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ #
+ # RP/0/RP0/CPU0:ios#sh run int
+ # Mon Aug 12 13:22:25.604 UTC
+ # interface TenGigE0/0/0/0
+ # ipv4 address 192.0.2.11 255.255.255.192
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/1
+ # lldp
+ # transmit disable
+ # !
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/2
+ # !
+ #
+ #
+
+
+ # Using deleted
+ #
+ #
+ # -------------
+ # Before state
+ # -------------
+ #
+ #
+ # RP/0/RP0/CPU0:ios#sh run int
+ # Mon Aug 12 13:26:21.498 UTC
+ # interface TenGigE0/0/0/0
+ # ipv4 address 192.0.2.11 255.255.255.192
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/1
+ # lldp
+ # receive disable
+ # destination mac-address
+ # ieee-nearest-bridge
+ # !
+ # !
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/2
+ # lldp
+ # transmit disable
+ # destination mac-address
+ # ieee-nearest-non-tmpr-bridge
+ # !
+ # !
+ # !
+ #
+ #
+
+ - name: Delete LLDP configurations of all interfaces (Note - This won't delete the
+ interfaces themselves)
+ cisco.iosxr.iosxr_lldp_interfaces:
+ state: deleted
+
+ #
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ #
+ # "before": [
+ # {
+ # "name": "TenGigE0/0/0/0"
+ # },
+ # {
+ # "destination": {
+ # "mac_address": "ieee-nearest-bridge"
+ # },
+ # "name": "GigabitEthernet0/0/0/1",
+ # "receive": false
+ # },
+ # {
+ # "destination": {
+ # "mac_address": "ieee-nearest-non-tmpr-bridge"
+ # },
+ # "name": "GigabitEthernet0/0/0/2",
+ # "transmit": false
+ # }
+ # ]
+ #
+ #
+ # "commands": [
+ # "interface GigabitEthernet0/0/0/1",
+ # "no lldp destination mac-address ieee-nearest-bridge",
+ # "no lldp receive disable",
+ # "interface GigabitEthernet0/0/0/2",
+ # "no lldp destination mac-address ieee-nearest-non-tmpr-bridge",
+ # "no lldp transmit disable"
+ # ]
+ #
+ #
+ # "after": [
+ # {
+ # "name": "TenGigE0/0/0/0"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/1"
+ # },
+ # {
+ # "name": "GigabitEthernet0/0/0/2"
+ # }
+ # ]
+ #
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ #
+ # RP/0/RP0/CPU0:ios#sh run int
+ # Mon Aug 12 13:30:14.618 UTC
+ # interface TenGigE0/0/0/0
+ # ipv4 address 192.0.2.11 255.255.255.192
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/1
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/2
+ # !
+ #
+ #
+ # Using parsed:
+ # parsed.cfg
+
+ # interface TenGigE0/0/0/0
+ # ipv4 address 192.0.2.11 255.255.255.192
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/1
+ # lldp
+ # receive disable
+ # destination mac-address
+ # ieee-nearest-bridge
+ # !
+ # !
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/2
+ # lldp
+ # transmit disable
+ # destination mac-address
+ # ieee-nearest-non-tmpr-bridge
+
+ - name: Convert lacp interfaces config to argspec without connecting to the appliance
+ cisco.iosxr.iosxr_lldp_interfaces:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+
+ # parsed: [
+ # - name: GigabitEthernet0/0/0/1
+ # destination:
+ # mac_address: ieee-nearest-non-tmpr-bridge
+ # transmit: False
+
+ # - name: GigabitEthernet0/0/0/2
+ # destination:
+ # mac_address: ieee-nearest-bridge
+ # receive: False
+ # ]
+
+ # Using gathered:
+ # Device config:
+
+ # RP/0/RP0/CPU0:ios#sh run int
+ # Mon Aug 12 12:49:51.517 UTC
+ # interface TenGigE0/0/0/0
+ # ipv4 address 192.0.2.11 255.255.255.192
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/1
+ # lldp
+ # receive disable
+ # destination mac-address
+ # ieee-nearest-bridge
+ # !
+ # !
+ # !
+ # interface preconfigure GigabitEthernet0/0/0/2
+ # lldp
+ # transmit disable
+ # destination mac-address
+ # ieee-nearest-non-tmpr-bridge
+
+ - name: Gather IOSXR lldp interfaces configuration
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ state: gathered
+
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+
+ # gathered:
+ # - name: GigabitEthernet0/0/0/1
+ # destination:
+ # mac_address: ieee-nearest-non-tmpr-bridge
+ # transmit: False
+
+ # - name: GigabitEthernet0/0/0/2
+ # destination:
+ # mac_address: ieee-nearest-bridge
+ # receive: False
+
+ # Using rendred:
+ - name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ destination:
+ mac_address: ieee-nearest-non-tmpr-bridge
+ transmit: false
+
+ - name: GigabitEthernet0/0/0/2
+ destination:
+ mac_address: ieee-nearest-bridge
+ receive: false
+ state: rendered
+
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+
+ # "rendered": [
+ # "interface GigabitEthernet0/0/0/2",
+ # "lldp destination mac-address ieee-nearest-non-tmpr-bridge",
+ # "lldp transmit disable",
+ # "interface GigabitEthernet0/0/0/1",
+ # "lldp receive disable",
+ # "lldp destination mac-address ieee-nearest-bridge"
+ # ]
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface GigabitEthernet0/0/0/1&#x27;, &#x27;lldp destination mac-address ieee-nearest-non-tmpr-bridge&#x27;, &#x27;no lldp transmit disable&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@nilashishc)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_logging_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_logging_module.rst
new file mode 100644
index 00000000..f361af44
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_logging_module.rst
@@ -0,0 +1,633 @@
+.. _cisco.iosxr.iosxr_logging_module:
+
+
+*************************
+cisco.iosxr.iosxr_logging
+*************************
+
+**Configuration management of system logging services on network devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management configuration of system logging (syslog) on Cisco IOS XR devices.
+
+
+
+Requirements
+------------
+The below requirements are needed on the host that executes this module.
+
+- ncclient >= 0.5.3 when using netconf
+- lxml >= 4.1.1 when using netconf
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of syslog logging configuration definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>host</li>
+ <li>console</li>
+ <li>monitor</li>
+ <li>buffered</li>
+ <li>file</li>
+ </ul>
+ </td>
+ <td>
+ <div>Destination for system logging (syslog) messages.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>facility</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>To configure the type of syslog facility in which system logging (syslog) messages are sent to syslog servers Optional config for <code>dest</code> = <code>host</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hostnameprefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>To append a hostname prefix to system logging (syslog) messages logged to syslog servers. Optional config for <code>dest</code> = <code>host</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>level</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>emergencies</li>
+ <li>alerts</li>
+ <li>critical</li>
+ <li>errors</li>
+ <li>warning</li>
+ <li>notifications</li>
+ <li>informational</li>
+ <li>debugging</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the severity level for the logging.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: severity</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>When <code>dest</code> = <em>file</em> name indicates file-name</div>
+ <div>When <code>dest</code> = <em>host</em> name indicates the host-name or ip-address of syslog server.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Size of buffer when <code>dest</code> = <code>buffered</code>. The acceptable value is in the range <em>307200 to 125000000 bytes</em>. Default 307200</div>
+ <div>Size of file when <code>dest</code> = <code>file</code>. The acceptable value is in the range <em>1 to 2097152</em>KB. Default 2 GB</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Existential state of the logging configuration on the node.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>vrf name when syslog server is configured, <code>dest</code> = <code>host</code></div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>host</li>
+ <li>console</li>
+ <li>monitor</li>
+ <li>buffered</li>
+ <li>file</li>
+ </ul>
+ </td>
+ <td>
+ <div>Destination for system logging (syslog) messages.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>facility</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"local7"</div>
+ </td>
+ <td>
+ <div>To configure the type of syslog facility in which system logging (syslog) messages are sent to syslog servers Optional config for <code>dest</code> = <code>host</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hostnameprefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>To append a hostname prefix to system logging (syslog) messages logged to syslog servers. Optional config for <code>dest</code> = <code>host</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>level</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>emergencies</li>
+ <li>alerts</li>
+ <li>critical</li>
+ <li>errors</li>
+ <li>warning</li>
+ <li>notifications</li>
+ <li>informational</li>
+ <li><div style="color: blue"><b>debugging</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the severity level for the logging.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: severity</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>When <code>dest</code> = <em>file</em> name indicates file-name</div>
+ <div>When <code>dest</code> = <em>host</em> name indicates the host-name or ip-address of syslog server.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>netconf</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the type of connection based transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Size of buffer when <code>dest</code> = <code>buffered</code>. The acceptable value is in the range <em>307200 to 125000000 bytes</em>. Default 307200</div>
+ <div>Size of file when <code>dest</code> = <code>file</code>. The acceptable value is in the range <em>1 to 2097152</em>KB. Default 2 GB</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Existential state of the logging configuration on the node.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"default"</div>
+ </td>
+ <td>
+ <div>vrf name when syslog server is configured, <code>dest</code> = <code>host</code></div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - This module works with connection ``network_cli`` and ``netconf``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+ - Tested against IOS XRv 6.1.3
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure logging for syslog server host
+ cisco.iosxr.iosxr_logging:
+ dest: host
+ name: 10.10.10.1
+ level: critical
+ state: present
+
+ - name: add hostnameprefix configuration
+ cisco.iosxr.iosxr_logging:
+ hostnameprefix: host1
+ state: absent
+
+ - name: add facility configuration
+ cisco.iosxr.iosxr_logging:
+ facility: local1
+ state: present
+
+ - name: configure console logging level
+ cisco.iosxr.iosxr_logging:
+ dest: console
+ level: debugging
+ state: present
+
+ - name: configure monitor logging level
+ cisco.iosxr.iosxr_logging:
+ dest: monitor
+ level: errors
+ state: present
+
+ - name: configure syslog to a file
+ cisco.iosxr.iosxr_logging:
+ dest: file
+ name: file_name
+ size: 2048
+ level: errors
+ state: present
+
+ - name: configure buffered logging with size
+ cisco.iosxr.iosxr_logging:
+ dest: buffered
+ size: 5100000
+
+ - name: Configure logging using aggregate
+ cisco.iosxr.iosxr_logging:
+ aggregate:
+ - {dest: console, level: warning}
+ - {dest: buffered, size: 4800000}
+ - {dest: file, name: file3, size: 2048}
+ - {dest: host, name: host3, level: critical}
+
+ - name: Delete logging using aggregate
+ cisco.iosxr.iosxr_logging:
+ aggregate:
+ - {dest: console, level: warning}
+ - {dest: buffered, size: 4800000}
+ - {dest: file, name: file3, size: 2048}
+ - {dest: host, name: host3, level: critical}
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always (empty list when no commands to send)</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;logging 10.10.10.1 vrf default severity debugging&#x27;, &#x27;logging facility local7&#x27;, &#x27;logging hostnameprefix host1&#x27;, &#x27;logging console critical&#x27;, &#x27;logging buffered 2097153&#x27;, &#x27;logging buffered warnings&#x27;, &#x27;logging monitor errors&#x27;, &#x27;logging file log_file maxfilesize 1024 severity info&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>xml</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always (empty list when no xml rpc to send)</td>
+ <td>
+ <div>NetConf rpc xml sent to device with transport <code>netconf</code></div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;config xmlns:xc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt; &lt;syslog xmlns=&quot;http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-cfg&quot;&gt; &lt;files&gt; &lt;file xc:operation=&quot;delete&quot;&gt; &lt;file-name&gt;file1&lt;/file-name&gt; &lt;file-log-attributes&gt; &lt;max-file-size&gt;2097152&lt;/max-file-size&gt; &lt;severity&gt;2&lt;/severity&gt; &lt;/file-log-attributes&gt; &lt;/file&gt; &lt;/files&gt; &lt;/syslog&gt; &lt;/config&gt;&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
+- Kedar Kekan (@kedarX)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_netconf.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_netconf.rst
new file mode 100644
index 00000000..927cb82a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_netconf.rst
@@ -0,0 +1,76 @@
+.. _cisco.iosxr.iosxr_netconf:
+
+
+*****************
+cisco.iosxr.iosxr
+*****************
+
+**Use iosxr netconf plugin to run netconf commands on Cisco IOSXR platform**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This iosxr plugin provides low level abstraction apis for sending and receiving netconf commands from Cisco iosxr network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th>Configuration</th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ncclient_device_handler</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"iosxr"</div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the ncclient device handler name for Cisco iosxr network os. To identify the ncclient device handler name refer ncclient library documentation.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+
+
+
+
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Ansible Networking Team
+
+
+.. hint::
+ Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_netconf_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_netconf_module.rst
new file mode 100644
index 00000000..a1078284
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_netconf_module.rst
@@ -0,0 +1,296 @@
+.. _cisco.iosxr.iosxr_netconf_module:
+
+
+*************************
+cisco.iosxr.iosxr_netconf
+*************************
+
+**Configures NetConf sub-system service on Cisco IOS-XR devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides an abstraction that enables and configures the netconf system service running on Cisco IOS-XR Software. This module can be used to easily enable the Netconf API. Netconf provides a programmatic interface for working with configuration and state resources as defined in RFC 6242.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>netconf_port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">830</div>
+ </td>
+ <td>
+ <div>This argument specifies the port the netconf service should listen on for SSH connections. The default port as defined in RFC 6242 is 830.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: listens_on</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>netconf_vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"default"</div>
+ </td>
+ <td>
+ <div>netconf vrf name</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: vrf</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>netconf</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the type of connection based transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the state of the <code>iosxr_netconf</code> resource on the remote device. If the <em>state</em> argument is set to <em>present</em> the netconf service will be configured. If the <em>state</em> argument is set to <em>absent</em> the netconf service will be removed from the configuration.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+ - Tested against Cisco IOS XR Software, Version 6.1.3
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: enable netconf service on port 830
+ cisco.iosxr.iosxr_netconf:
+ listens_on: 830
+ state: present
+
+ - name: disable netconf service
+ cisco.iosxr.iosxr_netconf:
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when changed is True</td>
+ <td>
+ <div>Returns the command sent to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">ssh server netconf port 830</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Kedar Kekan (@kedarX)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ospf_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ospf_interfaces_module.rst
new file mode 100644
index 00000000..d7497835
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ospf_interfaces_module.rst
@@ -0,0 +1,3089 @@
+.. _cisco.iosxr.iosxr_ospf_interfaces_module:
+
+
+*********************************
+cisco.iosxr.iosxr_ospf_interfaces
+*********************************
+
+**OSPF Interfaces Resource Module.**
+
+
+Version added: 1.2.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages OSPF(v2/v3) configuration of interfaces on devices running Cisco IOS-XR.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="7">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of OSPF configuration for interfaces.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_family</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF settings on the interfaces in address-family context.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Address Family Identifier (AFI) for OSPF settings on the interfaces.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>apply_group_option</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify configuration from a group</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the name of the group</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>operation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>add</li>
+ <li>remove</li>
+ <li>append</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the group config operation</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use message-digest authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keychain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify keychain name</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>null_auth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use no authentication</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify authentication password (key)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies an UNENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encrypted</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies an ENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The OSPFv2 password (key)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure BFD parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_detect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure fast detection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable fast detection only</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>strict_mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Hold down neighbor session until BFD session is up</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>minimum_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Hello interval in milli-seconds</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multiplier</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Detect multiplier</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Interface cost</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost_fallback</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Cost when cumulative bandwidth goes below the theshold</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify cost w.r.t cummulative bandwidth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify threshold bandwidth when cost-fallback is applied</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>database_filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter OSPF LSAs during synchronization and flooding</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all_outgoing_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter all outgoing LSA</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dead_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify interval after which a neighbor is declared dead</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>demand_circuit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable demand circuits</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_reroute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IP Fast Reroute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable IP fast reroute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>per_link</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify per-prefix computation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>exclude</li>
+ <li>lfa_candidate</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify per-link LFA exclusion or FRR LFA candidate information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Per-link LFA exclusion information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bundle_ether</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Aggregated Ethernet interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bvi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Bridge-Group Virtual Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_ethernet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FastEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fiftygige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FiftyGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fortygige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FortyGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fourhundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FourHundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gigabitethernet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify GigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify HundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mgmteth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MgmtEth/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multilink</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Multilink network interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nve</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Network Virtualization Endpoint Interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pos_int</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Aggregated pos interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pw_ether</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify PWHE Ethernet Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pw_iw</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify PWHE VC11 IP Interworking Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>serial</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Serial network interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>srp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify SRP interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tengige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TenGigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_ip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify GRE/IPinIP Tunnel Interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IPSec Tunnel interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_mpls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MPLS Transport Protocol Tunnel interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_mte</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MPLS Traffic Engineering P2MP Tunnel interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>twentyfivegige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>twohundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TwoHundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the interface id</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_candidate_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable backup selection from candidate-list only</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flood_reduction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable flood reduction</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Time between HELLO packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>link_down_fast_detect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure interface down parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Message digest authentication password (key)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Key ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>md5</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use MD5 Algorithm</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies an UNENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encrypted</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies an ENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The OSPFv2 password (key)</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mpls_ldp_sync</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable MPLS LDP Sync</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable ignoring of MTU in DBD packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbors</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a neighbor routers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPF cost for point-to-multipoint neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>db_filter_all_out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify Filter OSPF LSA during synchronization and flooding for point-to-multipoint neighbor</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Neighbor address (name)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>poll_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPF dead-router polling interval</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPF priority of non-broadcast neighbor</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>broadcast</li>
+ <li>non-broadcast</li>
+ <li>point-to-multipoint</li>
+ <li>point-to-point</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify Network type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>packet_size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Customize size of OSPF packets upto MTU</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable passive</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_suppression</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress advertisement of the prefixes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Router priority</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>processes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interfaces configuration for an OSPF process.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the area-id</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF interfaces area ID as a decimal value. Please refer vendor documentation of Valid values.</div>
+ <div>OSPF interfaces area ID in IP address format(e.g. A.B.C.D)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>process_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF process tag.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retransmit_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify time between retransmitting lost link state advertisements</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>security_ttl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable security</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hops</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of IP hops allowed &lt;1-254&gt;</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable ttl security</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transmit_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify estimated time needed to send link-state update packet</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name/Identifier of the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Type of the interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config router ospf&#x27;</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ <li>rendered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS-XR 6.1.3
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospf
+ # % No such configuration item(s)
+ #
+
+ - name: Merge provided OSPF interfaces configuration with the existing configuration
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.3
+ cost: 20
+ authentication:
+ message_digest:
+ keychain: cisco
+ - afi: ipv6
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.2
+ cost: 30
+ state: merged
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": []
+ #
+ # "commands": [
+ # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 cost 20",
+ # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest",
+ # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest keychain cisco",
+ # "router ospfv3 LAB3 area 0.0.0.2 interface GigabitEthernet 0/0/0/0 cost 30"
+ # ]
+ #
+ # "after": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "cisco"
+ # }
+ # },
+ # "cost": 20,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.3"
+ # },
+ # "process_id": "LAB3"
+ # }
+ # ]
+ # },
+ # {
+ # "afi": "ipv6",
+ # "cost": 30,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.2"
+ # },
+ # "process_id": "LAB3"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/0",
+ # "type": "gigabitethernet"
+ # }
+ # ]
+ #
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+ # Thu Oct 23 06:00:57.217 UTC
+ # router ospf LAB
+ # area 0.0.0.0
+ # !
+ # area 0.0.0.9
+ # !
+ # !
+ # router ospf LAB1
+ # area 0.0.0.1
+ # !
+ # area 0.0.0.3
+ # !
+ # !
+ # router ospf LAB3
+ # area 0.0.0.3
+ # interface GigabitEthernet0/0/0/0
+ # cost 20
+ # authentication message-digest keychain cisco
+ # !
+ # !
+ # !
+ # router ospf ipv4
+ # !
+
+ # Using replaced
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+ # Thu Oct 23 06:00:57.217 UTC
+ # router ospf LAB
+ # area 0.0.0.0
+ # !
+ # area 0.0.0.9
+ # !
+ # !
+ # router ospf LAB1
+ # area 0.0.0.1
+ # !
+ # area 0.0.0.3
+ # !
+ # !
+ # router ospf LAB3
+ # area 0.0.0.3
+ # interface GigabitEthernet0/0/0/0
+ # cost 20
+ # authentication message-digest keychain cisco
+ # !
+ # !
+ # !
+ # router ospf ipv4
+ # !
+
+ - name: Replace OSPF interfaces configuration
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.3
+ cost: 30
+ authentication:
+ message_digest:
+ keychain: ciscoiosxr
+ - afi: ipv6
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.2
+ cost: 30
+ state: replaced
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "cisco"
+ # }
+ # },
+ # "cost": 20,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.3"
+ # },
+ # "process_id": "LAB3"
+ # }
+ # ]
+ # },
+ # {
+ # "afi": "ipv6",
+ # "cost": 30,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.2"
+ # },
+ # "process_id": "LAB3"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/0",
+ # "type": "gigabitethernet"
+ # }
+ # ]
+ #
+ # "commands": [
+ # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 cost 30",
+ # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest",
+ # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest keychain ciscoiosxr"
+ # ]
+ #
+ # "after": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "ciscoiosxr"
+ # }
+ # },
+ # "cost": 30,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.3"
+ # },
+ # "process_id": "LAB3"
+ # }
+ # ]
+ # },
+ # {
+ # "afi": "ipv6",
+ # "cost": 30,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.2"
+ # },
+ # "process_id": "LAB3"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/0",
+ # "type": "gigabitethernet"
+ # }
+ # ]
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+ # Thu Oct 23 06:10:39.827 UTC
+ # router ospf LAB
+ # area 0.0.0.0
+ # !
+ # area 0.0.0.9
+ # !
+ # !
+ # router ospf LAB1
+ # area 0.0.0.1
+ # !
+ # area 0.0.0.3
+ # !
+ # !
+ # router ospf LAB3
+ # area 0.0.0.3
+ # interface GigabitEthernet0/0/0/0
+ # cost 30
+ # authentication message-digest keychain ciscoiosxr
+ # !
+ # !
+ # !
+ # router ospf ipv4
+ # !
+
+ - name: Override existing OSPF interfaces configuration
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB1"
+ area:
+ area_id: 0.0.0.3
+ cost: 10
+ authentication:
+ message_digest:
+ keychain: iosxr
+ state: overridden
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "ciscoiosxr"
+ # }
+ # },
+ # "cost": 30,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.3"
+ # },
+ # "process_id": "LAB3"
+ # }
+ # ]
+ # },
+ # {
+ # "afi": "ipv6",
+ # "cost": 30,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.2"
+ # },
+ # "process_id": "LAB3"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/0",
+ # "type": "gigabitethernet"
+ # }
+ # ]
+ #
+ # "commands": [
+ # "no router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0",
+ # "no router ospfv3 LAB3 area 0.0.0.2 interface GigabitEthernet 0/0/0/0",
+ # "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 cost 10",
+ # "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 authentication message-digest",
+ # "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 authentication message-digest keychain iosxr"
+ # ]
+ #
+ # "after": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "iosxr"
+ # }
+ # },
+ # "cost": 10,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.3"
+ # },
+ # "process_id": "LAB1"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/1",
+ # "type": "gigabitethernet"
+ # }
+ # ]
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+ # Thu Oct 23 06:28:15.025 UTC
+ # router ospf LAB
+ # area 0.0.0.0
+ # !
+ # area 0.0.0.9
+ # !
+ # !
+ # router ospf LAB1
+ # area 0.0.0.1
+ # !
+ # area 0.0.0.3
+ # interface GigabitEthernet0/0/0/1
+ # cost 10
+ # authentication message-digest keychain iosxr
+ # !
+ # !
+ # !
+ # router ospf LAB3
+ # area 0.0.0.3
+ # !
+ # !
+ # router ospf ipv4
+ # !
+
+ # Using deleted
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+ # Thu Oct 23 06:28:15.025 UTC
+ # router ospf LAB
+ # area 0.0.0.0
+ # !
+ # area 0.0.0.9
+ # !
+ # !
+ # router ospf LAB1
+ # area 0.0.0.1
+ # !
+ # area 0.0.0.3
+ # interface GigabitEthernet0/0/0/1
+ # cost 10
+ # authentication message-digest keychain iosxr
+ # !
+ # !
+ # !
+ # router ospf LAB3
+ # area 0.0.0.3
+ # !
+ # !
+ # router ospf ipv4
+ # !
+
+ - name: Deleted existing OSPF interfaces from the device
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ type: gigabitethernet
+ state: deleted
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "iosxr"
+ # }
+ # },
+ # "cost": 10,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.3"
+ # },
+ # "process_id": "LAB1"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/1",
+ # "type": "gigabitethernet"
+ # }
+ # ],
+ #
+ # "commands": [
+ # "no router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1"
+ # ]
+ #
+ # "after": []
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+ # Thu Oct 23 06:34:38.319 UTC
+ # router ospf LAB
+ # area 0.0.0.0
+ # !
+ # area 0.0.0.9
+ # !
+ # !
+ # router ospf LAB1
+ # area 0.0.0.1
+ # !
+ # area 0.0.0.3
+ # !
+ # !
+ # router ospf LAB3
+ # area 0.0.0.3
+ # !
+ # !
+ # router ospf ipv4
+ # !
+
+ # Using parsed
+ # parsed.cfg
+ # ------------
+ # router ospf LAB
+ # area 0.0.0.0
+ # !
+ # area 0.0.0.9
+ # !
+ # !
+ # router ospf LAB1
+ # area 0.0.0.1
+ # !
+ # area 0.0.0.3
+ # !
+ # !
+ # router ospf LAB3
+ # area 0.0.0.3
+ # interface GigabitEthernet0/0/0/0
+ # cost 20
+ # authentication message-digest keychain cisco
+ # !
+ # !
+ # !
+ # router ospf ipv4
+ # !
+ - name: Parsed the device configuration to get output commands
+ cisco.iosxr.iosxr_ospf_interfaces:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+ #
+ #
+ # -------------------------
+ # Module Execution Result
+ # -------------------------
+ #
+ #
+ # "parsed": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "cisco"
+ # }
+ # },
+ # "cost": 20,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.3"
+ # },
+ # "process_id": "LAB3"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/0",
+ # "type": "gigabitethernet"
+ # }
+ # ]
+ #
+ # Using rendered
+ #
+ #
+ - name: Render the commands for provided configuration
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.3
+ cost: 20
+ authentication:
+ message_digest:
+ keychain: cisco
+ - afi: ipv6
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.2
+ cost: 30
+ state: rendered
+
+ #
+ #
+ # -------------------------
+ # Module Execution Result
+ # -------------------------
+ #
+ #
+ # "rendered": [
+ # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 cost 20",
+ # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest",
+ # "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest keychain cisco",
+ # "router ospfv3 LAB3 area 0.0.0.2 interface GigabitEthernet 0/0/0/0 cost 30"
+ # ]
+
+
+ # Using gathered
+ #
+ # Before state:
+ # -------------
+ #
+ # RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+ # Thu Oct 23 06:50:38.743 UTC
+ # router ospf LAB
+ # area 0.0.0.0
+ # !
+ # area 0.0.0.9
+ # !
+ # !
+ # router ospf LAB1
+ # area 0.0.0.1
+ # !
+ # area 0.0.0.3
+ # !
+ # !
+ # router ospf LAB3
+ # area 0.0.0.3
+ # interface GigabitEthernet0/0/0/0
+ # cost 20
+ # authentication message-digest keychain cisco
+ # !
+ # !
+ # !
+ # router ospf ipv4
+ # !
+
+
+ - name: Gather ospf_interfaces routes configuration
+ cisco.iosxr.iosxr_ospf_interfaces:
+ state: gathered
+ #
+ #
+ # -------------------------
+ # Module Execution Result
+ # -------------------------
+ #
+ # "gathered": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "cisco"
+ # }
+ # },
+ # "cost": 20,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.3"
+ # },
+ # "process_id": "LAB3"
+ # }
+ # ]
+ # },
+ # {
+ # "afi": "ipv6",
+ # "cost": 30,
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "0.0.0.2"
+ # },
+ # "process_id": "LAB3"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "GigabitEthernet0/0/0/0",
+ # "type": "gigabitethernet"
+ # }
+ # ]
+ #
+
+
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Rohit Thakur (@rohitthakur2590)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ospfv2_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ospfv2_module.rst
new file mode 100644
index 00000000..5cdfbd84
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ospfv2_module.rst
@@ -0,0 +1,7069 @@
+.. _cisco.iosxr.iosxr_ospfv2_module:
+
+
+************************
+cisco.iosxr.iosxr_ospfv2
+************************
+
+**OSPFv2 resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages global OSPFv2 configuration on devices running Cisco IOS-XR
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="7">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of OSPFv2 process configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>processes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of OSPFv2 instances configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_family_unicast</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable unicast topology for ipv4 address family</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>adjacency_stagger</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Stagger OSPFv2 adjacency bring up</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable stagger OSPFv2 adjacency</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum simultaneous neighbors to bring up</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Initial number of neighbors to bring up per area (default 2)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>apply_weight</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable weights configured under interfaces for load sharing</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bandwidth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Reference bandwidth to use for calculation (Mbits/sec)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_weight</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify default weight value to use when it is not configured under interface</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure OSPFv2 areas&#x27; properties</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Area ID as IP address or integer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keychain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify keychain name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use message-digest authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keychain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify keychain name</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_auth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use no authentication</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Used to mention authentication password (key)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies an UNENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encrypted</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies an ENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The OSPFv2 password (key)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure BFD parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_detect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure fast detection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable fast detection only</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>strict_mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Hold down neighbor session until BFD session is up</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>minimum_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Hello interval in milli-seconds</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multiplier</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Detect multiplier</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface cost</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dead_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interval after which a neighbor is declared dead</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the summary default-cost of a NSSA/stub area. Stub&#x27;s advertised external route metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time between HELLO packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mpls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure MPLS routing protocol parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ldp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure LDP parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable LDP IGP interface auto-configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sync</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable LDP IGP synchronization</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sync_igp_shortcuts</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>LDP sync for igp-shortcut tunnels</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>traffic_eng</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure an ospf area to run MPLS Traffic Engineering</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable ignoring of MTU in DBD packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>NSSA settings for the area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Originate default Type 7 LSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv2 default metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric type for default routes</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_redistribution</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send redistributed LSAs into NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSAs into NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure area as NSSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>translate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate LSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type7</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate from Type 7 to Type 5</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always translate LSAs</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ranges</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Summarize routes matching address/mask (border routers only)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP in Prefix format (x.x.x.x/len)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise this range (default)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>DoNotAdvertise this range</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the route-policy to filter type 3 LSAs (list can have one inbound and/or one outbound policy only)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify inbound or outbound</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parameters</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify parameter values for the policy</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Settings for configuring the area as a stub</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSA into stub area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure the area as a stub</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transmit_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Estimated time needed to send link-state update packet</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>virtual_link</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Define a virtual link</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keychain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify keychain name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use message-digest authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keychain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify keychain name</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_auth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use no authentication</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Used to mention authentication password (key)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies an UNENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encrypted</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies an ENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The OSPFv2 password (key)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dead_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interval after which a neighbor is declared dead</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time between HELLO packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router-ID of virtual link neighbor (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Message digest authentication password (key)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Key ID (1-255)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>md5</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use MD5 Algorithm</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies an UNENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encrypted</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies an ENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The OSPFv2 password (key)</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retransmit_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay between LSA retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transmit_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Link state transmit delay</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keychain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify keychain name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use message-digest authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keychain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify keychain name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify message-digest selection</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_auth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use no authentication</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Used to mention authentication password (key)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies an UNENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encrypted</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies an ENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The OSPFv2 password (key)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Calculate OSPFv2 interface cost according to bandwidth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Assign OSPFv2 cost based on interface type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reference_bandwidth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify reference bandwidth in megabits per sec</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure BFD parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_detect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure fast detection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable fast detection only</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>strict_mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Hold down neighbor session until BFD session is up</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>minimum_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Hello interval in milli-seconds</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multiplier</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Detect multiplier</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable specific OSPFv2 feature</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>opaque</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure opaque LSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable Opaque LSA capability</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable opaque LSA</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type7</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>NSSA capability</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface cost (1-65535)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>database_filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter OSPFv2 LSA during synchronization and flooding (all outgoing LSA). Enable/Disable filtering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dead_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interval after which a neighbor is declared dead</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distribute default route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always advertise default route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv2 default metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv2 metric type for default routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route-policy to default-information origination</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable distribution of default route</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set metric of redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>demand_circuit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable OSPFv2 demand circuit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Define an administrative distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Administrative distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>access_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Access list name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source IP address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance value</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wildcard</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP wild card bits (A.B.C.D)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ospf_distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv2 administrative distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance for external routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inter_area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance for inter-area routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>intra_area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance for intra-area routes</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distribute_bgp_ls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable Distribution of LSAs to external services</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>instance_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set distribution process instance identifier</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throttle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Throttle time between successive LSA updates</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distribute_link_state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable Distribution of LSAs to external services</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>instance_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set distribution process instance identifier</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throttle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Throttle time between successive LSA updates</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distribute_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter networks in routing updates (list can have one inbound and/or one outbound policy only)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>access_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Inbound/outbound access-list</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter incoming/outgoing routing updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>outgoing_params</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify additional parameters for outgoing updates only</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>For BGP, specify AS number. 2-byte AS number (or) 4-byte AS number in asdot (X.Y) format (or) 4-byte AS number in asplain format</div>
+ <div>For OSPF, specify OSPFv2 instance name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>bgp</li>
+ <li>connected</li>
+ <li>dagr</li>
+ <li>ospf</li>
+ <li>static</li>
+ </ul>
+ </td>
+ <td>
+ <div>Type of routes</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route Policy to filter OSPFv2 prefixes (for incoming updates only)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external_out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable advertisement of intra-area prefixes as external</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flood_reduction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable OSPFv2 Flood Reduction</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time between HELLO packets (&lt;1-65535&gt; seconds)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_lsa_mospf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not complain upon receiving MOSPFv2 Type 6 LSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>link_down_fast_detect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable fast or early detection of link-down events</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_adjacency_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log adjacency state changes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>detail</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log all state changes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable log adjacency changes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set log adjacency</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>loopback_stub_network</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise loopback as a stub network</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Feature to limit the number of non-self-originated LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set count on how many times adjacencies can be suppressed</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set number of minutes during which all adjacencies are suppressed</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reset_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set number of minutes after which ignore-count is reset to zero</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Threshold value (%) at which to generate a warning message</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>warning_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log a warning message when limit is exceeded</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set maximum metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum metric in self-originated router-LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>External LSA configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set max metric value for external LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set external-lsa attribute</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>include_stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise Max metric for Stub links as well</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_startup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Effective only at startup</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set on-startup attribute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for_bgp_asn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ASN of BGP to wait for</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_period</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Wait period in seconds after startup</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set router-lsa attribute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Summary LSAs configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Max metric value for summary LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set summary-lsa attribute</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Message digest authentication password (key)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Key ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>md5</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use MD5 Algorithm</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies an UNENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encrypted</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies an ENCRYPTED password (key) will follow</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The OSPFv2 password (key)</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>microloop_avoidance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Avoid microloops</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protected</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Avoid microloops for protected prefixes only)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rib_update_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay to introduce between SPF and RIB updates</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>segment_routing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable segment routing microloop avoidance</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>monitor_convergence</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enables OSPFv2 route convergence monitoring</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enables Individual Prefix Monitoring</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>track_external_routes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables Tracking External(Type-5/7) Prefix monitoring</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>track_ip_frr</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables Tracking IP-Frr Convergence</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>track_summary_routes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables Tracking Summary(Inter-Area) Prefix monitoring</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mpls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure MPLS routing protocol parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ldp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure LDP parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable LDP IGP interface auto-configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sync</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable LDP IGP synchronization</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sync_igp_shortcuts</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>LDP sync for igp-shortcut tunnels</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>traffic_eng</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Routing protocol commands for MPLS Traffic Engineering</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>autoroute_exclude</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Exclude IP address destinations from using TE tunnels</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parameters</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify parameter values for the policy</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Policy name</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>igp_intact</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Retain one or more IPv4 nexthops with tunnel nexthops</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ldp_sync_update</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable LDP sync induced metric propagation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multicast_intact</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Publish multicast-intact paths to RIB</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Traffic Engineering stable IP address for system</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable ignoring of MTU in DBD packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>broadcast</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify OSPFv2 broadcast multi-access network</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>non_broadcast</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify OSPFv2 NBMA network</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>point_to_multipoint</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify OSPFv2 point-to-multipoint network</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>point_to_point</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify OSPFv2 point-to-point network</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nsf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Non-stop forwarding</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cisco</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cisco Non-stop forwarding</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enforce_global</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Cancel NSF restart when non-NSF-aware neighbors detected for the whole OSPFv2 process</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable Cisco NSF</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flush_delay_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum time allowed for external route learning</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ietf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IETF graceful restart</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>helper_disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable router&#x27;s helper support level</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Only enable ietf option</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum interval between NSF restarts (&lt;90-3600&gt; seconds)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lifetime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum route lifetime following restart (&lt;90-1800&gt; seconds)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nsr</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable NSR for all VRFs in this process. &#x27;False&#x27; option to disable NSR for all VRFs in this process</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>packet_size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Size of OSPFv2 packets to use. min=576 max=MTU bytes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable passive</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_suppression</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Suppress advertisement of the prefixes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>secondary_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable secondary address suppression</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set the suppression option</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router priority</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>process_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The OSPFv2 Process ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol_shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Protocol specific configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Only traffic destined for this box allowed(cisco-support)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>High watermark for incoming priority events</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>high</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Hello events are dropped when incoming event queue exceeds this value</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>low</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>DBD/LS Update/Req packets are dropped when incoming event queue exceeds this value</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>medium</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LSA ACKs are dropped when incoming event queue exceeds this value</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_reload</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Shutdown post reload only</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Shutdown the OSPFv2 Protocol</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redistribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redistribute information from another routing Protocol</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OnePK application name for application routes (or) AS number for bgp and eigrp (or) instance name for isis and ospf</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>level</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>1</li>
+ <li>2</li>
+ <li>12</li>
+ </ul>
+ </td>
+ <td>
+ <div>ISIS levels</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_type_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>LSA type 3 for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redistribution of routes. For OSPFv2 - external/internal/nssa-external 1/2. For EIGRP - external/internal</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>1</li>
+ <li>2</li>
+ </ul>
+ </td>
+ <td>
+ <div>OSPFv2 exterior metric type for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute to NSSA areas only</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>preserve_med</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Preserve med of BGP routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route-policy to redistribution</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the policy</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parameters</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify parameter values for the policy</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>application</li>
+ <li>bgp</li>
+ <li>connected</li>
+ <li>dagr</li>
+ <li>eigrp</li>
+ <li>isis</li>
+ <li>mobile</li>
+ <li>ospf</li>
+ <li>rip</li>
+ <li>static</li>
+ <li>subscriber</li>
+ </ul>
+ </td>
+ <td>
+ <div>Route type to redistribute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag for routes redistributed into OSPFv2</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retransmit_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay between LSA retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv2 router-id in IPv4 address format (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>security_ttl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable security</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hops</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum number of IP hops allowed &lt;1-254&gt;</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable ttl security</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable advertisement of external prefixes as inter-area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure IP address summaries</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress routes that match the specified prefix/mask pair</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP summary address/mask (A.B.C.D/prefix)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure timer related constants</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Timers for graceful shutdown(cisco-support)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>initial_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay before starting graceful shutdown</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retain_routes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time to keep routes active after graceful shutdown</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv2 global LSA timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_pacing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv2 LSA group pacing timer. Interval between group of LSA being refreshed or maxaged</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_arrival</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv2 MinLSArrival timer. The minimum interval in millisec between accepting the same LSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>refresh</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv2 LSA refresh interval. How often self-originated LSAs should be refreshed, in seconds</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pacing_flood</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv2 flood pacing timer. Interval in msec to pace flooding on all interfaces</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throttle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv2 throttle timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_reroute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Fast-reroute throttle timer. Delay between end of SPF and start of the fast-reroute computation in milliseconds</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_all</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LSA throttle timers for all types of OSPFv2 LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>initial_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay to generate first occurance of LSA in milliseconds</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum delay between originating the same LSA in milliseconds</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum delay between originating the same LSA in milliseconds</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv2 SPF throttle timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>change_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay between receiving a change to SPF calculation in milliseconds</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_wait</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum wait time in milliseconds for SPF calculations</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>second_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay between first and second SPF calculation in milliseconds</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transmit_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Estimated time needed to send link-state update packet</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>weight</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface weight</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config router ospf</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>deleted</li>
+ <li>parsed</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>overridden</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS-XR 6.1.3
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospf
+ # Thu Jun 11 15:54:44.569 UTC
+ # % No such configuration item(s)
+ #
+
+ - name: Merge provided OSPFv2 configuration with the existing configuration
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: '27'
+ areas:
+ - area_id: '10'
+ hello_interval: 2
+ authentication:
+ keychain: ansi11393
+ - process_id: '26'
+ adjacency_stagger:
+ max_adjacency: 20
+ min_adjacency: 10
+ - process_id: '10'
+ authentication:
+ keychain: ansible_test1102
+ areas:
+ - area_id: '11'
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: '30'
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ weight: 2
+ packet_size: 577
+ priority: 1
+ router_id: 2.2.2.2
+ demand_circuit: enable
+ passive: disable
+ summary_in: enable
+ flood_reduction: disable
+ mtu_ignore: enable
+ external_out: disable
+ state: merged
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": {}
+ #
+ # "commands": [
+ # "router ospf 30",
+ # "cost 2",
+ # "weight 2",
+ # "passive disable",
+ # "priority 1",
+ # "flood-reduction disable",
+ # "default-metric 10",
+ # "router-id 2.2.2.2",
+ # "demand-circuit enable",
+ # "packet-size 577",
+ # "transmit-delay 2",
+ # "summary-in enable",
+ # "external-out disable",
+ # "dead-interval 2",
+ # "hello-interval 1",
+ # "retransmit-interval 2",
+ # "mtu-ignore enable",
+ # "area 11 default-cost 5",
+ # "area 22 default-cost 6",
+ # "router ospf 26",
+ # "adjacency stagger 10 20",
+ # "authentication message-digest keychain ansible1101pass",
+ # "router ospf 27",
+ # "area 10 authentication keychain ansi11393",
+ # "area 10 hello-interval 2",
+ # "router ospf 10",
+ # "authentication keychain ansible_test1102",
+ # "area 11 default-cost 5",
+ # "area 11 cost 11",
+ # "area 22 default-cost 6"
+ # ]
+ #
+ # "after": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "authentication": {
+ # "keychain": "ansible_test1102"
+ # },
+ # "process_id": "10"
+ # },
+ # {
+ # "adjacency_stagger": {
+ # "max_adjacency": 20,
+ # "min_adjacency": 10
+ # },
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "ansible1101pass"
+ # }
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "authentication": {
+ # "keychain": "ansi11393"
+ # },
+ # "hello_interval": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": "enable",
+ # "external_out": "disable",
+ # "flood_reduction": "disable",
+ # "hello_interval": 1,
+ # "mtu_ignore": "enable",
+ # "packet_size": 577,
+ # "passive": "disable",
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "summary_in": "enable",
+ # "transmit_delay": 2,
+ # "weight": 2
+ # }
+ # ]
+ # }
+ #
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospf
+ # Thu Jun 11 16:06:44.406 UTC
+ # router ospf 10
+ # authentication keychain ansible_test1102
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospf 26
+ # authentication message-digest keychain ansible1101pass
+ # adjacency stagger 10 20
+ # !
+ # router ospf 27
+ # area 10
+ # authentication keychain ansi11393
+ # hello-interval 2
+ # !
+ # !
+ # router ospf 30
+ # router-id 2.2.2.2
+ # summary-in enable
+ # external-out disable
+ # cost 2
+ # packet-size 577
+ # weight 2
+ # passive disable
+ # priority 1
+ # mtu-ignore enable
+ # flood-reduction disable
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit enable
+ # hello-interval 1
+ # transmit-delay 2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ #
+
+
+ # Using replaced
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospf
+ # Thu Jun 11 16:06:44.406 UTC
+ # router ospf 10
+ # authentication keychain ansible_test1102
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospf 26
+ # authentication message-digest keychain ansible1101pass
+ # adjacency stagger 10 20
+ # !
+ # router ospf 27
+ # area 10
+ # authentication keychain ansi11393
+ # hello-interval 2
+ # !
+ # !
+ # router ospf 30
+ # router-id 2.2.2.2
+ # summary-in enable
+ # external-out disable
+ # cost 2
+ # packet-size 577
+ # weight 2
+ # passive disable
+ # priority 1
+ # mtu-ignore enable
+ # flood-reduction disable
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit enable
+ # hello-interval 1
+ # transmit-delay 2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ #
+
+ - name: Replace OSPFv2 routes configurations from the device
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ authentication:
+ keychain: ansi11393
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ state: replaced
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "authentication": {
+ # "keychain": "ansible_test1102"
+ # },
+ # "process_id": "10"
+ # },
+ # {
+ # "adjacency_stagger": {
+ # "max_adjacency": 20,
+ # "min_adjacency": 10
+ # },
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "ansible1101pass"
+ # }
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "authentication": {
+ # "keychain": "ansi11393"
+ # },
+ # "hello_interval": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": "enable",
+ # "external_out": "disable",
+ # "flood_reduction": "disable",
+ # "hello_interval": 1,
+ # "mtu_ignore": "enable",
+ # "packet_size": 577,
+ # "passive": "disable",
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "summary_in": "enable",
+ # "transmit_delay": 2,
+ # "weight": 2
+ # }
+ # ]
+ # }
+ #
+ # "commands": [
+ # "router ospf 27",
+ # "no area 10 authentication keychain ansi11393",
+ # "area 20 authentication keychain ansi11393",
+ # "area 20 default-cost 2",
+ # "area 20 cost 2"
+ # ]
+ #
+ # "after": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "authentication": {
+ # "keychain": "ansible_test1102"
+ # },
+ # "process_id": "10"
+ # },
+ # {
+ # "adjacency_stagger": {
+ # "max_adjacency": 20,
+ # "min_adjacency": 10
+ # },
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "ansible1101pass"
+ # }
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "hello_interval": 2
+ # },
+ # {
+ # "area_id": "20",
+ # "authentication": {
+ # "keychain": "ansi11393"
+ # },
+ # "cost": 2,
+ # "default_cost": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": "enable",
+ # "external_out": "disable",
+ # "flood_reduction": "disable",
+ # "hello_interval": 1,
+ # "mtu_ignore": "enable",
+ # "packet_size": 577,
+ # "passive": "disable",
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "summary_in": "enable",
+ # "transmit_delay": 2,
+ # "weight": 2
+ # }
+ # ]
+ # }
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ # RP/0/RP0/CPU0:anton(config)#do show running-config router ospf
+ # Thu Jun 11 16:40:31.038 UTC
+ # router ospf 10
+ # authentication keychain ansible_test1102
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospf 26
+ # authentication message-digest keychain ansible1101pass
+ # adjacency stagger 10 20
+ # !
+ # router ospf 27
+ # area 10
+ # hello-interval 2
+ # !
+ # area 20
+ # cost 2
+ # authentication keychain ansi11393
+ # default-cost 2
+ # !
+ # !
+ # router ospf 30
+ # router-id 2.2.2.2
+ # summary-in enable
+ # external-out disable
+ # cost 2
+ # packet-size 577
+ # weight 2
+ # passive disable
+ # priority 1
+ # mtu-ignore enable
+ # flood-reduction disable
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit enable
+ # hello-interval 1
+ # transmit-delay 2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ #
+
+
+ # Using overridden
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospf
+ # Thu Jun 11 16:06:44.406 UTC
+ # router ospf 10
+ # authentication keychain ansible_test1102
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospf 26
+ # authentication message-digest keychain ansible1101pass
+ # adjacency stagger 10 20
+ # !
+ # router ospf 27
+ # area 10
+ # authentication keychain ansi11393
+ # hello-interval 2
+ # !
+ # !
+ # router ospf 30
+ # router-id 2.2.2.2
+ # summary-in enable
+ # external-out disable
+ # cost 2
+ # packet-size 577
+ # weight 2
+ # passive disable
+ # priority 1
+ # mtu-ignore enable
+ # flood-reduction disable
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit enable
+ # hello-interval 1
+ # transmit-delay 2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ #
+
+ - name: Override existing OSPFv2 configurations from the device
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ authentication:
+ keychain: ansi11393
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ authentication:
+ keychain: ansi11393
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ state: overridden
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "authentication": {
+ # "keychain": "ansible_test1102"
+ # },
+ # "process_id": "10"
+ # },
+ # {
+ # "adjacency_stagger": {
+ # "max_adjacency": 20,
+ # "min_adjacency": 10
+ # },
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "ansible1101pass"
+ # }
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "authentication": {
+ # "keychain": "ansi11393"
+ # },
+ # "hello_interval": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": "enable",
+ # "external_out": "disable",
+ # "flood_reduction": "disable",
+ # "hello_interval": 1,
+ # "mtu_ignore": "enable",
+ # "packet_size": 577,
+ # "passive": "disable",
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "summary_in": "enable",
+ # "transmit_delay": 2,
+ # "weight": 2
+ # }
+ # ]
+ # }
+ #
+ # "commands": [
+ # "router ospf 10",
+ # "no authentication keychain ansible_test1102",
+ # "no area 11 default-cost 5",
+ # "no area 11 cost 11",
+ # "no area 22 default-cost 6",
+ # "router ospf 30",
+ # "no cost 2",
+ # "no weight 2",
+ # "no passive disable",
+ # "no priority 1",
+ # "no flood-reduction disable",
+ # "no default-metric 10",
+ # "no router-id 2.2.2.2",
+ # "no demand-circuit enable",
+ # "no packet-size 577",
+ # "no transmit-delay 2",
+ # "no summary-in enable",
+ # "no external-out disable",
+ # "no dead-interval 2",
+ # "no hello-interval 1",
+ # "no retransmit-interval 2",
+ # "no mtu-ignore enable",
+ # "no area 11 default-cost 5",
+ # "no area 22 default-cost 6",
+ # "router ospf 27",
+ # "area 20 authentication keychain ansi11393",
+ # "area 20 default-cost 2",
+ # "area 20 cost 2"
+ # ]
+ #
+ # "after": {
+ # "processes": [
+ # {
+ # "process_id": "10"
+ # },
+ # {
+ # "adjacency_stagger": {
+ # "max_adjacency": 20,
+ # "min_adjacency": 10
+ # },
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "ansible1101pass"
+ # }
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "authentication": {
+ # "keychain": "ansi11393"
+ # },
+ # "hello_interval": 2
+ # },
+ # {
+ # "area_id": "20",
+ # "authentication": {
+ # "keychain": "ansi11393"
+ # },
+ # "cost": 2,
+ # "default_cost": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "process_id": "30"
+ # }
+ # ]
+ # }
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospf
+ # Thu Jun 11 16:50:36.332 UTC
+ # router ospf 10
+ # !
+ # router ospf 26
+ # authentication message-digest keychain ansible1101pass
+ # adjacency stagger 10 20
+ # !
+ # router ospf 27
+ # area 10
+ # authentication keychain ansi11393
+ # hello-interval 2
+ # !
+ # area 20
+ # cost 2
+ # authentication keychain ansi11393
+ # default-cost 2
+ # !
+ # !
+ # router ospf 30
+ # !
+ #
+
+
+ # Using deleted
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospf
+ # Thu Jun 11 16:06:44.406 UTC
+ # router ospf 10
+ # authentication keychain ansible_test1102
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospf 26
+ # authentication message-digest keychain ansible1101pass
+ # adjacency stagger 10 20
+ # !
+ # router ospf 27
+ # area 10
+ # authentication keychain ansi11393
+ # hello-interval 2
+ # !
+ # !
+ # router ospf 30
+ # router-id 2.2.2.2
+ # summary-in enable
+ # external-out disable
+ # cost 2
+ # packet-size 577
+ # weight 2
+ # passive disable
+ # priority 1
+ # mtu-ignore enable
+ # flood-reduction disable
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit enable
+ # hello-interval 1
+ # transmit-delay 2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ #
+
+ - name: Deleted existing OSPFv2 configurations from the device
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: '10'
+ - process_id: '26'
+ - process_id: '27'
+ - process_id: '30'
+ state: deleted
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "authentication": {
+ # "keychain": "ansible_test1102"
+ # },
+ # "process_id": "10"
+ # },
+ # {
+ # "adjacency_stagger": {
+ # "max_adjacency": 20,
+ # "min_adjacency": 10
+ # },
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "ansible1101pass"
+ # }
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "authentication": {
+ # "keychain": "ansi11393"
+ # },
+ # "hello_interval": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": "enable",
+ # "external_out": "disable",
+ # "flood_reduction": "disable",
+ # "hello_interval": 1,
+ # "mtu_ignore": "enable",
+ # "packet_size": 577,
+ # "passive": "disable",
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "summary_in": "enable",
+ # "transmit_delay": 2,
+ # "weight": 2
+ # }
+ # ]
+ # },
+ #
+ # "commands": [
+ # "router ospf 10",
+ # "no authentication keychain ansible_test1102",
+ # "no area 11 default-cost 5",
+ # "no area 11 cost 11",
+ # "no area 22 default-cost 6",
+ # "router ospf 26",
+ # "no adjacency stagger 10 20",
+ # "no authentication message-digest keychain ansible1101pass",
+ # "router ospf 27",
+ # "no area 10 authentication keychain ansi11393",
+ # "no area 10 hello-interval 2",
+ # "router ospf 30",
+ # "no cost 2",
+ # "no weight 2",
+ # "no passive disable",
+ # "no priority 1",
+ # "no flood-reduction disable",
+ # "no default-metric 10",
+ # "no router-id 2.2.2.2",
+ # "no demand-circuit enable",
+ # "no packet-size 577",
+ # "no transmit-delay 2",
+ # "no summary-in enable",
+ # "no external-out disable",
+ # "no dead-interval 2",
+ # "no hello-interval 1",
+ # "no retransmit-interval 2",
+ # "no mtu-ignore enable",
+ # "no area 11 default-cost 5",
+ # "no area 22 default-cost 6"
+ # ]
+ #
+ # "after": {
+ # "processes": [
+ # {
+ # "process_id": "10"
+ # },
+ # {
+ # "process_id": "26"
+ # },
+ # {
+ # "process_id": "27"
+ # },
+ # {
+ # "process_id": "30"
+ # }
+ # ]
+ # }
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ # RP/0/RP0/CPU0:anton(config)#show running-config router ospf
+ # Thu Jun 11 17:07:34.218 UTC
+ # router ospf 10
+ # !
+ # router ospf 26
+ # !
+ # router ospf 27
+ # !
+ # router ospf 30
+ # !
+
+
+ # Using parsed
+ # parsed.cfg
+ # ------------
+ # Thu Jun 11 17:28:51.918 UTC
+ # router ospf 10
+ # authentication keychain ansible_test1102
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospf 26
+ # authentication message-digest keychain ansible1101pass
+ # adjacency stagger 10 20
+ # !
+ # router ospf 27
+ # area 10
+ # authentication keychain ansi11393
+ # hello-interval 2
+ # !
+ # !
+ # router ospf 30
+ # router-id 2.2.2.2
+ # summary-in enable
+ # external-out disable
+ # cost 2
+ # packet-size 577
+ # weight 2
+ # passive disable
+ # priority 1
+ # mtu-ignore enable
+ # flood-reduction disable
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit enable
+ # hello-interval 1
+ # transmit-delay 2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ - name: Parsed the device configuration to get output commands
+ cisco.iosxr.iosxr_ospfv2:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+ #
+ #
+ # -------------------------
+ # Module Execution Result
+ # -------------------------
+ #
+ #
+ # "parsed": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "authentication": {
+ # "keychain": "ansible_test1102"
+ # },
+ # "process_id": "10"
+ # },
+ # {
+ # "adjacency_stagger": {
+ # "max_adjacency": 20,
+ # "min_adjacency": 10
+ # },
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "ansible1101pass"
+ # }
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "authentication": {
+ # "keychain": "ansi11393"
+ # },
+ # "hello_interval": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": "enable",
+ # "external_out": "disable",
+ # "flood_reduction": "disable",
+ # "hello_interval": 1,
+ # "mtu_ignore": "enable",
+ # "packet_size": 577,
+ # "passive": "disable",
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "summary_in": "enable",
+ # "transmit_delay": 2,
+ # "weight": 2
+ # }
+ # ]
+ # }
+
+
+
+ # Using rendered
+ #
+ #
+ - name: Render the commands for provided configuration
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ authentication:
+ keychain: ansi11393
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ - process_id: 10
+ authentication:
+ keychain: ansible_test1102
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ weight: 2
+ packet_size: 577
+ priority: 1
+ router_id: 2.2.2.2
+ demand_circuit: enable
+ passive: disable
+ summary_in: enable
+ flood_reduction: disable
+ mtu_ignore: enable
+ external_out: disable
+ state: rendered
+
+ #
+ #
+ # -------------------------
+ # Module Execution Result
+ # -------------------------
+ #
+ #
+ # "rendered": [
+ # "router ospf 27",
+ # "area 10 authentication keychain ansi11393",
+ # "area 10 hello-interval 2",
+ # "router ospf 26",
+ # "adjacency stagger 10 20",
+ # "authentication message-digest keychain ansible1101pass",
+ # "router ospf 10",
+ # "authentication keychain ansible_test1102",
+ # "area 11 default-cost 5",
+ # "area 11 cost 11",
+ # "area 22 default-cost 6",
+ # "router ospf 30",
+ # "cost 2",
+ # "weight 2",
+ # "passive disable",
+ # "priority 1",
+ # "flood-reduction disable",
+ # "default-metric 10",
+ # "router-id 2.2.2.2",
+ # "demand-circuit enable",
+ # "packet-size 577",
+ # "transmit-delay 2",
+ # "summary-in enable",
+ # "external-out disable",
+ # "dead-interval 2",
+ # "hello-interval 1",
+ # "retransmit-interval 2",
+ # "mtu-ignore enable",
+ # "area 11 default-cost 5",
+ # "area 22 default-cost 6"
+ # ]
+
+
+ # Using gathered
+ #
+ # Before state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospf
+ # Thu Jun 11 16:06:44.406 UTC
+ # router ospf 10
+ # authentication keychain ansible_test1102
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospf 26
+ # authentication message-digest keychain ansible1101pass
+ # adjacency stagger 10 20
+ # !
+ # router ospf 27
+ # area 10
+ # authentication keychain ansi11393
+ # hello-interval 2
+ # !
+ # !
+ # router ospf 30
+ # router-id 2.2.2.2
+ # summary-in enable
+ # external-out disable
+ # cost 2
+ # packet-size 577
+ # weight 2
+ # passive disable
+ # priority 1
+ # mtu-ignore enable
+ # flood-reduction disable
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit enable
+ # hello-interval 1
+ # transmit-delay 2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ #
+ - name: Gather ospfv2 routes configuration
+ cisco.iosxr.iosxr_ospfv2:
+ state: gathered
+ #
+ #
+ # -------------------------
+ # Module Execution Result
+ # -------------------------
+ #
+ # "gathered": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "authentication": {
+ # "keychain": "ansible_test1102"
+ # },
+ # "process_id": "10"
+ # },
+ # {
+ # "adjacency_stagger": {
+ # "max_adjacency": 20,
+ # "min_adjacency": 10
+ # },
+ # "authentication": {
+ # "message_digest": {
+ # "keychain": "ansible1101pass"
+ # }
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "authentication": {
+ # "keychain": "ansi11393"
+ # },
+ # "hello_interval": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": "enable",
+ # "external_out": "disable",
+ # "flood_reduction": "disable",
+ # "hello_interval": 1,
+ # "mtu_ignore": "enable",
+ # "packet_size": 577,
+ # "passive": "disable",
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "summary_in": "enable",
+ # "transmit_delay": 2,
+ # "weight": 2
+ # }
+ # ]
+ # }
+ #
+ # After state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospf
+ # Thu Jun 11 16:06:44.406 UTC
+ # router ospf 10
+ # authentication keychain ansible_test1102
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospf 26
+ # authentication message-digest keychain ansible1101pass
+ # adjacency stagger 10 20
+ # !
+ # router ospf 27
+ # area 10
+ # authentication keychain ansi11393
+ # hello-interval 2
+ # !
+ # !
+ # router ospf 30
+ # router-id 2.2.2.2
+ # summary-in enable
+ # external-out disable
+ # cost 2
+ # packet-size 577
+ # weight 2
+ # passive disable
+ # priority 1
+ # mtu-ignore enable
+ # flood-reduction disable
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit enable
+ # hello-interval 1
+ # transmit-delay 2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ #
+ #
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router ospf 30&#x27;, &quot;authentication message-digest keychain &#x27;ansible1101pass&#x27;&quot;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Rohit Thakur (@rohitthakur2590)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ospfv3_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ospfv3_module.rst
new file mode 100644
index 00000000..f9fa3d0c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_ospfv3_module.rst
@@ -0,0 +1,10348 @@
+.. _cisco.iosxr.iosxr_ospfv3_module:
+
+
+************************
+cisco.iosxr.iosxr_ospfv3
+************************
+
+**ospfv3 resource module**
+
+
+Version added: 1.1.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages global ospfv3 configuration on devices running Cisco IOS-XR
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="10">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="10">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of ospfv3 process configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="9">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>processes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of ospfv3 instances configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_family_unicast</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable unicast topology for ipv4 address family</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure ospfv3 areas&#x27; properties</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Area ID as IP address or integer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not authenticate OSPFv3 packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IPSec AH authentication attributes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>algorithim_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>md5</li>
+ <li>sha1</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the type of algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key in encrypted form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the Security Parameter Index value</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure BFD parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_detect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure fast detection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable fast detection only</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>strict_mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Hold down neighbor session until BFD session is up</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>minimum_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Hello interval in milli-seconds</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multiplier</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Detect multiplier</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface cost</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>database_filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter LSAs during synchronization and flooding</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all_outgoing_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter all outgoing LSA</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dead_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interval after which a neighbor is declared dead</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the summary default-cost of a NSSA/stub area. Stub&#x27;s advertised external route metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>demand_circuit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable ospfv3 demand circuit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distrinbute_rib_prefix_list_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter LSAs during synchronization and flooding</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encryption</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Encrypt and authenticate OSPFv3 packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not encrypt OSPFv3 packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IPSec ESP encryption and authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>esp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify encryption parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This specify the aes algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>algorithim_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>192</li>
+ <li>256</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the bit encryption for aes algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify AES key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cleartext AES key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify AES key in encrypted form</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>des</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This specify the des algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify AES key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cleartext AES key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify AES key in encrypted form</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>null_encryption</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify null encryption attributes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify authentication parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>algorithim_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>md5</li>
+ <li>sha1</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the type of algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key in encrypted form</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>triple_des</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This specify the triple DES algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify 3DES key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cleartext 3DES key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify 3DES key in encrypted form</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the Security Parameter Index value</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_reroute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IP Fast Reroute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable IP fast reroute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>per_link</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify per-prefix computation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>exclude</li>
+ <li>lfa_candidate</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify per-link LFA exclusion or FRR LFA candidate information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Per-link LFA exclusion information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bundle_ether</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Aggregated Ethernet interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bvi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Bridge-Group Virtual Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_ethernet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FastEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fiftygige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FiftyGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fortygige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FortyGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fourhundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FourHundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gigabitethernet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify GigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify HundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mgmteth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MgmtEth/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multilink</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Multilink network interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nve</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Network Virtualization Endpoint Interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pos_int</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Aggregated pos interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pw_ether</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify PWHE Ethernet Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pw_iw</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify PWHE VC11 IP Interworking Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>serial</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Serial network interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>srp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify SRP interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tengige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TenGigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_ip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify GRE/IPinIP Tunnel Interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IPSec Tunnel interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_mpls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MPLS Transport Protocol Tunnel interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_mte</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MPLS Traffic Engineering P2MP Tunnel interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>twentyfivegige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>twohundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TwoHundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_candidate_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable backup selection from candidate-list only</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>per_prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify per-prefix computation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>exclude</li>
+ <li>lfa_candidate</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify per_prefix LFA exclusion or FRR LFA candidate information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Per-link LFA exclusion information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bundle_ether</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Aggregated Ethernet interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bvi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Bridge-Group Virtual Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_ethernet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FastEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fiftygige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FiftyGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fortygige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FortyGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fourhundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FourHundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gigabitethernet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify GigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify HundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mgmteth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MgmtEth/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multilink</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Multilink network interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nve</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Network Virtualization Endpoint Interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pos_int</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Aggregated pos interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pw_ether</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify PWHE Ethernet Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pw_iw</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify PWHE VC11 IP Interworking Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>serial</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Serial network interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>srp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify SRP interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tengige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TenGigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_ip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify GRE/IPinIP Tunnel Interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IPSec Tunnel interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_mpls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MPLS Transport Protocol Tunnel interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_mte</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MPLS Traffic Engineering P2MP Tunnel interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>twentyfivegige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>twohundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TwoHundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_candidate_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable backup selection from candidate-list only</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flood_reduction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable flood reduction</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Time between HELLO packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>instance_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify instance ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mpls_ldp_sync</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable MPLS LDP Sync</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable ignoring of MTU in DBD packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>broadcast</li>
+ <li>non-broadcast</li>
+ <li>point-to-multipoint</li>
+ <li>point-to-point</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify Network type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>NSSA settings for the area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Originate default Type 7 LSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ospfv3 default metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric type for default routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set nssa to default information originate</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_redistribution</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send redistributed LSAs into NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSAs into NSSA area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure area as NSSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>translate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate LSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type7</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate from Type 7 to Type 5</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always translate LSAs</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>packet_size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify limit size of OSPFv3 packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable routing updates on an interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_suppression</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Hide all transit addresses on this interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Router priority</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ranges</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Summarize routes matching address/mask (border routers only)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP in Prefix format (X:X::X/length)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise this range (default)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify user specified metric for this range</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>DoNotAdvertise this range</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retransmit_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Delay between LSA retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Settings for configuring the area as a stub</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSA into stub area</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure the area as a stub</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transmit_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify estimated time needed to send link-state update packet</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>virtual_link</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Define a virtual link</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not authenticate OSPFv3 packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IPSec AH authentication attributes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>algorithim_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>md5</li>
+ <li>sha1</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the type of algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key in encrypted form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the Security Parameter Index value</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dead_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interval after which a neighbor is declared dead</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encryption</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Encrypt and authenticate OSPFv3 packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not encrypt OSPFv3 packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IPSec ESP encryption and authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>esp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify encryption parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This specify the aes algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>algorithim_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>192</li>
+ <li>256</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the bit encryption for aes algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify AES key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cleartext AES key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify AES key in encrypted form</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>des</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This specify the des algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify AES key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cleartext AES key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify AES key in encrypted form</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>null_encryption</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify null encryption attributes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify authentication parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>algorithim_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>md5</li>
+ <li>sha1</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the type of algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key in encrypted form</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>triple_des</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This specify the triple DES algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify 3DES key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cleartext 3DES key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify 3DES key in encrypted form</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the Security Parameter Index value</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time between HELLO packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router-ID of virtual link neighbor (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retransmit_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay between LSA retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transmit_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Link state transmit delay</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not authenticate OSPFv3 packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IPSec AH authentication attributes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>algorithim_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>md5</li>
+ <li>sha1</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the type of algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key in encrypted form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the Security Parameter Index value</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Calculate ospfv3 interface cost according to bandwidth</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Assign ospfv3 cost based on interface type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reference_bandwidth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify reference bandwidth in megabits per sec</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure BFD parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_detect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure fast detection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable fast detection only</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>strict_mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Hold down neighbor session until BFD session is up</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>minimum_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Hello interval in milli-seconds</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multiplier</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Detect multiplier</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable specific OSPFv3 feature</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type7</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify type7 nssa capability</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Prefer type7 externals over type5</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>translate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Translate type7 to type5</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Interface cost</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>database_filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter LSAs during synchronization and flooding</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all_outgoing_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter all outgoing LSA</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dead_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interval after which a neighbor is declared dead</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Control distribution of default information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always advertise default route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ospfv3 default metric</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ospfv3 metric type for default routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route-policy to default-information origination</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable distribution of default route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag for default route</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set metric of redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>demand_circuit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable ospfv3 demand circuit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Define an administrative distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Administrative distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ospfv3_distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ospfv3 administrative distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance for external routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inter_area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance for inter-area routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>intra_area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distance for intra-area routes</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distribute_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter prefixes to/from RIB</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter prefixes based on an IPv6 prefix-list</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter prefixes installed to RIB</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Prefix-list name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filter prefixes redistributed from RIB</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encryption</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Encrypt and authenticate OSPFv3 packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not encrypt OSPFv3 packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IPSec ESP encryption and authentication</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>esp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify encryption parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This specify the aes algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>algorithim_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>192</li>
+ <li>256</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the bit encryption for aes algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify AES key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cleartext AES key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify AES key in encrypted form</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>des</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This specify the des algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify AES key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cleartext AES key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify AES key in encrypted form</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>null_encryption</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify null encryption attributes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify authentication parameters</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>algorithim_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>md5</li>
+ <li>sha1</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the type of algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify key in encrypted form</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>triple_des</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This specify the triple DES algorithim</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>clear_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify 3DES key in cleartext form</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cleartext 3DES key</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify 3DES key in encrypted form</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the Security Parameter Index value</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_reroute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IP Fast Reroute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable IP fast reroute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>per_link</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify per-prefix computation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>exclude</li>
+ <li>lfa_candidate</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify per-link LFA exclusion or FRR LFA candidate information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Per-link LFA exclusion information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bundle_ether</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Aggregated Ethernet interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bvi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Bridge-Group Virtual Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_ethernet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FastEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fiftygige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FiftyGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fortygige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FortyGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fourhundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FourHundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gigabitethernet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify GigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify HundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mgmteth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MgmtEth/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multilink</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Multilink network interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nve</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Network Virtualization Endpoint Interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pos_int</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Aggregated pos interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pw_ether</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify PWHE Ethernet Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pw_iw</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify PWHE VC11 IP Interworking Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>serial</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Serial network interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>srp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify SRP interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tengige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TenGigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_ip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify GRE/IPinIP Tunnel Interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IPSec Tunnel interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_mpls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MPLS Transport Protocol Tunnel interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_mte</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MPLS Traffic Engineering P2MP Tunnel interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>twentyfivegige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>twohundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TwoHundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_candidate_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable backup selection from candidate-list only</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>per_prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify per-prefix computation</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>exclude</li>
+ <li>lfa_candidate</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify per_prefix LFA exclusion or FRR LFA candidate information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Per-link LFA exclusion information</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bundle_ether</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Aggregated Ethernet interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bvi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Bridge-Group Virtual Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_ethernet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FastEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fiftygige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FiftyGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fortygige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FortyGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fourhundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify FourHundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gigabitethernet</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify GigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify HundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mgmteth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MgmtEth/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multilink</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Multilink network interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nve</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Network Virtualization Endpoint Interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>post_int</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Aggregated pos interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pw_ether</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify PWHE Ethernet Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pw_iw</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify PWHE VC11 IP Interworking Interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>serial</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Serial network interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>srp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify SRP interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tengige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TenGigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_ip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify GRE/IPinIP Tunnel Interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_ipsec</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IPSec Tunnel interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_mpls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MPLS Transport Protocol Tunnel interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_mte</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify MPLS Traffic Engineering P2MP Tunnel interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>twentyfivegige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>twohundredgige</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify TwoHundredGigE/IEEE 802.3 interface(s)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_candidate_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable backup selection from candidate-list only</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flood_reduction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable flood reduction</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable Graceful-Restart</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>helper_disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable router&#x27;s helper support level</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum route lifetime following restart</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum interval between Graceful Restarts</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set graceful restart</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Time between HELLO packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_mospf_type6_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Ignore MOSPF Type 6 LSA</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>instance_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify instance ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_adjacency_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log adjacency state changes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>detail</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log all state changes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable log adjacency changes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set log adjacency</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set OSPFv3 limits</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify limit for number of interfaces</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify limit for number of paths</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redistributed_prefixes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify limit for number of redistributed prefixes</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mpls_ldp_sync</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable MPLS LDP Sync</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable ignoring of MTU in DBD packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>broadcast</li>
+ <li>non-broadcast</li>
+ <li>point-to-multipoint</li>
+ <li>point-to-point</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify Network type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nsr</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable NSR for all VRFs in this process</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>packet_size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify limit size of OSPFv3 packets</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable routing updates on an interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_suppression</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Hide all transit addresses on this interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Router priority</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>process_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The OSPFv3 Process ID</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol_shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Gracefully shutdown the OSPFv3 protocol</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redistribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redistribute information from another routing Protocol</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>application</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify application routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OnePK Application name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPFv3 exterior metric type for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route policy to redistribution</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set application route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag for routes redistributed into OSPFv3</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify bgp routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP process name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPFv3 exterior metric type for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>preserved_med</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify preserve med of BGP routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route policy to redistribution</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set bgp route number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag for routes redistributed into OSPFv3</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>connected</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify connected routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPFv3 exterior metric type for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route policy to redistribution</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set connected route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag for routes redistributed into OSPFv3</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eigrp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify eigrp routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>EIGRP process name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>external</li>
+ <li>internal</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribution of EIGRP routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPFv3 exterior metric type for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route policy to redistribution</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set bgp route number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag for routes redistributed into OSPFv3</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>isis</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify IS-IS routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IS-IS name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>level</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>level-1</li>
+ <li>level-1-2</li>
+ <li>level-2</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify IS-IS level routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPFv3 exterior metric type for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route policy to redistribution</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set IS-IS route number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag for routes redistributed into OSPFv3</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mobile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify mobile routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPFv3 exterior metric type for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route policy to redistribution</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set mobile route number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag for routes redistributed into OSPFv3</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ospfv3</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify ospfv3 routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPFv3 process name</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redistribution of OSPFv3 routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>1</li>
+ <li>2</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute OSPFv3 external routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>internal</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute OSPFv3 internal routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa_external</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>1</li>
+ <li>2</li>
+ </ul>
+ </td>
+ <td>
+ <div>Redistribute NSSA OSPFv3 external routes</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPFv3 exterior metric type for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route policy to redistribution</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set ospfv3 route number</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag for routes redistributed into OSPFv3</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>static</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify static routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPFv3 exterior metric type for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route policy to redistribution</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set static route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag for routes redistributed into OSPFv3</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>subscriber</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify subscriber routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify metric for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPFv3 exterior metric type for redistributed routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route policy to redistribution</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set static route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag for routes redistributed into OSPFv3</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retransmit_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay between LSA retransmissions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ospfv3 router-id in IPv4 address format (A.B.C.D)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spf_prefix_priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify SPF configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable SPF prefix priority</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the route-policy to prioritize route install</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify name of the policy</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify parameter values for the policy ()</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub_router</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter stub router configuration submode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Modify self originated router LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertise_with</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>max-metric</li>
+ <li>r-bit</li>
+ <li>v6-bit</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise LSAs with specified type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Force ospfv3 stub router mode unconditionally</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Override External LSA metric in stub router mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric to use while in stub router mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set external lsa</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>include_stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set maximum metric for stub links in stub router mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_proc_migration</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter stub router mode on ospfv3 process migration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_proc_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter stub router mode on ospfv3 process restart</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_startup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter stub router mode on startup</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time in seconds to stay in stub router mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for_bgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Exit stub router mode when BGP converges</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_switchover</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enter stub router mode on RP switchover</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Override Summary LSA metric in stub router mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Metric to use while in stub router mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable summary LSA</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure IP address summaries</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress routes that match the specified prefix/mask pair</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP summary address/mask (A.B.C.D/prefix)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set tag</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adjust routing timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_arrival</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify LSA arrival timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pacing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify pacing timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flood</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Flood pacing timer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LSA group pacing timer</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retransmission</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LSA group pacing timer</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throttle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Adjust throttle timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify LSA throttle timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all_lsa_initial</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay to generate first occurrence of LSA in milliseconds</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all_lsa_minimum</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum delay between originating the same LSA in milliseconds</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify SPF throttle timers</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spf_initial</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delay to generate first occurrence of SPF in ms</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spf_minimum</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum delay between originating the same SPF in ms</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trace</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify OSPF tracing options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Delete existing buffer and create one with N entries</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify trace entry</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transmit_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Estimated time needed to send link-state update packet</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="10">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config router ospfv3</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="10">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against IOS-XR 6.1.3
+ - This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospfv3
+ # Thu Jun 11 15:54:44.569 UTC
+ # % No such configuration item(s)
+ #
+
+ - name: Merge provided OSPFv3 configuration with the existing configuration
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ - process_id: 10
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ packet_size: 577
+ priority: 1
+ router_id: '2.2.2.2'
+ demand_circuit: true
+ mtu_ignore: true
+ state: merged
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": {}
+ #
+ # "commands": [
+ # "router ospfv3 10",
+ # "area 11 default-cost 5",
+ # "area 11 cost 11",
+ # "area 22 default-cost 6",
+ # "router ospfv3 26",
+ # "authentication disable",
+ # "router ospfv3 27",
+ # "area 10 hello-interval 2",
+ # "router ospfv3 30",
+ # "cost 2",
+ # "priority 1",
+ # "default-metric 10",
+ # "router-id 2.2.2.2",
+ # "demand-circuit",
+ # "packet-size 577",
+ # "transmit-delay 2",
+ # "dead-interval 2",
+ # "hello-interval 1",
+ # "retransmit-interval 2",
+ # "mtu-ignore",
+ # "area 11 default-cost 5",
+ # "area 22 default-cost 6"
+ # ]
+ #
+ # "after": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "process_id": "10"
+ # },
+ # {
+ # "authentication": {
+ # "disable": true
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "hello_interval": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": true,
+ # "hello_interval": 1,
+ # "mtu_ignore": true,
+ # "packet_size": 577,
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "transmit_delay": 2
+ # }
+ # ]
+ # }
+ #
+ #
+ # ------------
+ # After state
+ # ------------
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospfv3
+ # router ospfv3 10
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospfv3 26
+ # authentication disable
+ # !
+ # router ospfv3 27
+ # area 10
+ # hello-interval 2
+ # !
+ # area 20
+ # !
+ # area 30
+ # !
+ # !
+ # router ospfv3 30
+ # cost 2
+ # priority 1
+ # mtu-ignore
+ # packet-size 577
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit
+ # hello-interval 1
+ # transmit-delay 2
+ # router-id 2.2.2.2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # router ospfv3 10
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospfv3 26
+ # authentication disable
+ # !
+ # router ospfv3 27
+ # area 10
+ # hello-interval 2
+ # !
+ # area 20
+ # !
+ # area 30
+ # !
+ # !
+ # router ospfv3 30
+ # cost 2
+ # priority 1
+ # mtu-ignore
+ # packet-size 577
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit
+ # hello-interval 1
+ # transmit-delay 2
+ # router-id 2.2.2.2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+
+
+
+ # Using replaced
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospf
+ # router ospfv3 10
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospfv3 26
+ # authentication disable
+ # !
+ # router ospfv3 27
+ # area 10
+ # hello-interval 2
+ # !
+ # area 20
+ # !
+ # area 30
+ # !
+ # !
+ # router ospfv3 30
+ # cost 2
+ # priority 1
+ # mtu-ignore
+ # packet-size 577
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit
+ # hello-interval 1
+ # transmit-delay 2
+ # router-id 2.2.2.2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # router ospfv3 10
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospfv3 26
+ # authentication disable
+ # !
+ # router ospfv3 27
+ # area 10
+ # hello-interval 2
+ # !
+ # area 20
+ # !
+ # area 30
+ # !
+ # !
+ # router ospfv3 30
+ # cost 2
+ # priority 1
+ # mtu-ignore
+ # packet-size 577
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit
+ # hello-interval 1
+ # transmit-delay 2
+ # router-id 2.2.2.2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+
+ - name: Replace OSPFv3 routes configurations from the device
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ state: replaced
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "process_id": "10"
+ # },
+ # {
+ # "authentication": {
+ # "disable": true
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "hello_interval": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": true,
+ # "hello_interval": 1,
+ # "mtu_ignore": true,
+ # "packet_size": 577,
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "transmit_delay": 2
+ # }
+ # ]
+ # }
+ #
+ # "commands": [
+ # "router ospfv3 27",
+ # "area 20 default-cost 2",
+ # "area 20 cost 2"
+ # ]
+ #
+ # "after": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "process_id": "10"
+ # },
+ # {
+ # "authentication": {
+ # "disable": true
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "hello_interval": 2
+ # },
+ # {
+ # "area_id": "20",
+ # "cost": 2,
+ # "default_cost": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": true,
+ # "hello_interval": 1,
+ # "mtu_ignore": true,
+ # "packet_size": 577,
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "transmit_delay": 2
+ # }
+ # ]
+ # }
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ # RP/0/RP0/CPU0:anton(config)#do show running-config router ospfv3
+ # router ospfv3 10
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospfv3 26
+ # authentication disable
+ # !
+ # router ospfv3 27
+ # area 10
+ # hello-interval 2
+ # !
+ # area 20
+ # cost 2
+ # default-cost 2
+ # !
+ # area 30
+ # !
+ # !
+ # router ospfv3 30
+ # cost 2
+ # priority 1
+ # mtu-ignore
+ # packet-size 577
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit
+ # hello-interval 1
+ # transmit-delay 2
+ # router-id 2.2.2.2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+
+
+ - name: Override existing OSPFv3 configurations from the device
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ authentication:
+ disable: true
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ authentication:
+ disable: true
+ - process_id: 26
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ authentication:
+ disable: true
+ state: overridden
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "process_id": "10"
+ # },
+ # {
+ # "authentication": {
+ # "disable": true
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "hello_interval": 2
+ # },
+ # {
+ # "area_id": "20",
+ # "cost": 2,
+ # "default_cost": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": true,
+ # "hello_interval": 1,
+ # "mtu_ignore": true,
+ # "packet_size": 577,
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "transmit_delay": 2
+ # }
+ # ]
+ # }
+ #
+ # "commands": [
+ # "router ospfv3 10",
+ # "no area 11 default-cost 5",
+ # "no area 11 cost 11",
+ # "no area 22 default-cost 6",
+ # "router ospfv3 30",
+ # "no cost 2",
+ # "no priority 1",
+ # "no default-metric 10",
+ # "no router-id 2.2.2.2",
+ # "no demand-circuit",
+ # "no packet-size 577",
+ # "no transmit-delay 2",
+ # "no dead-interval 2",
+ # "no hello-interval 1",
+ # "no retransmit-interval 2",
+ # "no mtu-ignore",
+ # "no area 11 default-cost 5",
+ # "no area 22 default-cost 6",
+ # "router ospfv3 26",
+ # "area 10 hello-interval 4"
+ # ]
+ #
+ # "after": {
+ # "processes": [
+ # {
+ # "process_id": "10"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "hello_interval": 4
+ # }
+ # ],
+ # "authentication": {
+ # "disable": true
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "hello_interval": 2
+ # },
+ # {
+ # "area_id": "20",
+ # "cost": 2,
+ # "default_cost": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "process_id": "30"
+ # }
+ # ]
+ # }
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospfv3
+ # router ospfv3 10
+ # area 11
+ # !
+ # area 22
+ # !
+ # !
+ # router ospfv3 26
+ # authentication disable
+ # area 10
+ # hello-interval 4
+ # !
+ # !
+ # router ospfv3 27
+ # area 10
+ # hello-interval 2
+ # !
+ # area 20
+ # cost 2
+ # default-cost 2
+ # !
+ # area 30
+ # !
+ # !
+ # router ospfv3 30
+ # area 11
+ # !
+ # area 22
+ # !
+ # !
+
+
+
+ # Using deleted
+ #
+ # ------------
+ # Before state
+ # ------------
+ #
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospfv3
+ # router ospfv3 10
+ # area 11
+ # !
+ # area 22
+ # !
+ # !
+ # router ospfv3 26
+ # authentication disable
+ # area 10
+ # hello-interval 4
+ # !
+ # !
+ # router ospfv3 27
+ # area 10
+ # hello-interval 2
+ # !
+ # area 20
+ # cost 2
+ # default-cost 2
+ # !
+ # area 30
+ # !
+ # !
+ # router ospfv3 30
+ # area 11
+ # !
+ # area 22
+ # !
+ # !
+
+ - name: Deleted existing OSPFv3 configurations from the device
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: '10'
+ - process_id: '26'
+ - process_id: '27'
+ - process_id: '30'
+ state: deleted
+
+ #
+ #
+ # ------------------------
+ # Module Execution Result
+ # ------------------------
+ #
+ # "before": {
+ # "processes": [
+ # {
+ # "process_id": "10"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "hello_interval": 4
+ # }
+ # ],
+ # "authentication": {
+ # "disable": true
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "hello_interval": 2
+ # },
+ # {
+ # "area_id": "20",
+ # "cost": 2,
+ # "default_cost": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "process_id": "30"
+ # }
+ # ]
+ # },
+ #
+ # "commands": [
+ # "router ospfv3 26",
+ # "no authentication disable",
+ # "no area 10 hello-interval 4",
+ # "router ospfv3 27",
+ # "no area 10 hello-interval 2",
+ # "no area 20 default-cost 2",
+ # "no area 20 cost 2"
+ # ]
+ #
+ # "after": {
+ # "processes": [
+ # {
+ # "process_id": "10"
+ # },
+ # {
+ # "process_id": "26"
+ # },
+ # {
+ # "process_id": "27"
+ # },
+ # {
+ # "process_id": "30"
+ # }
+ # ]
+ # }
+ #
+ #
+ # -----------
+ # After state
+ # -----------
+ #
+ # RP/0/RP0/CPU0:anton(config)#show running-config router ospfv3
+ # router ospfv3 10
+ # !
+ # router ospfv3 26
+ # !
+ # router ospfv3 27
+ # !
+ # router ospfv3 30
+ # !
+
+
+ # Using parsed
+ # parsed.cfg
+ # ------------
+ # router ospfv3 10
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospfv3 26
+ # authentication disable
+ # !
+ # router ospfv3 27
+ # area 10
+ # hello-interval 2
+ # !
+ # !
+ # router ospfv3 30
+ # router-id 2.2.2.2
+ # cost 2
+ # packet-size 577
+ # priority 1
+ # mtu-ignore
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit
+ # hello-interval 1
+ # transmit-delay 2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ - name: Parsed the device configuration to get output commands
+ cisco.iosxr.iosxr_ospfv3:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+ #
+ #
+ # -------------------------
+ # Module Execution Result
+ # -------------------------
+ #
+ #
+ # "parsed": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "process_id": "10"
+ # },
+ # {
+ # "authentication": {
+ # "disable": true
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "hello_interval": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": true,
+ # "hello_interval": 1,
+ # "mtu_ignore": true,
+ # "packet_size": 577,
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "transmit_delay": 2
+ # }
+ # ]
+ # }
+ #
+ # Using rendered
+ #
+ #
+ - name: Render the commands for provided configuration
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ - process_id: 10
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ packet_size: 577
+ priority: 1
+ router_id: '2.2.2.2'
+ demand_circuit: true
+ mtu_ignore: true
+ state: rendered
+
+ #
+ #
+ # -------------------------
+ # Module Execution Result
+ # -------------------------
+ #
+ #
+ # "rendered": [
+ # "router ospfv3 27",
+ # "area 10 hello-interval 2",
+ # "router ospfv3 26",
+ # "authentication disable",
+ # "router ospfv3 10",
+ # "area 11 default-cost 5",
+ # "area 11 cost 11",
+ # "area 22 default-cost 6",
+ # "router ospfv3 30",
+ # "cost 2",
+ # "priority 1",
+ # "default-metric 10",
+ # "router-id 2.2.2.2",
+ # "demand-circuit",
+ # "packet-size 577",
+ # "transmit-delay 2",
+ # "dead-interval 2",
+ # "hello-interval 1",
+ # "retransmit-interval 2",
+ # "mtu-ignore",
+ # "area 11 default-cost 5",
+ # "area 22 default-cost 6"
+ # ]
+
+
+ # Using gathered
+ #
+ # Before state:
+ # -------------
+ #
+ # RP/0/RP0/CPU0:anton#show running-config router ospf
+ # router ospfv3 10
+ # area 11
+ # cost 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+ # router ospfv3 26
+ # authentication disable
+ # area 10
+ # !
+ # !
+ # router ospfv3 27
+ # area 10
+ # hello-interval 2
+ # !
+ # area 20
+ # !
+ # area 30
+ # !
+ # !
+ # router ospfv3 30
+ # cost 2
+ # priority 1
+ # mtu-ignore
+ # packet-size 577
+ # dead-interval 2
+ # retransmit-interval 2
+ # demand-circuit
+ # hello-interval 1
+ # transmit-delay 2
+ # router-id 2.2.2.2
+ # default-metric 10
+ # area 11
+ # default-cost 5
+ # !
+ # area 22
+ # default-cost 6
+ # !
+ # !
+
+ - name: Gather ospfv3 routes configuration
+ cisco.iosxr.iosxr_ospfv3:
+ state: gathered
+ #
+ #
+ # -------------------------
+ # Module Execution Result
+ # -------------------------
+ #
+ # "gathered": {
+ # "processes": [
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "cost": 11,
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "process_id": "10"
+ # },
+ # {
+ # "authentication": {
+ # "disable": true
+ # },
+ # "process_id": "26"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "10",
+ # "hello_interval": 2
+ # }
+ # ],
+ # "process_id": "27"
+ # },
+ # {
+ # "areas": [
+ # {
+ # "area_id": "11",
+ # "default_cost": 5
+ # },
+ # {
+ # "area_id": "22",
+ # "default_cost": 6
+ # }
+ # ],
+ # "cost": 2,
+ # "dead_interval": 2,
+ # "default_metric": 10,
+ # "demand_circuit": true,
+ # "hello_interval": 1,
+ # "mtu_ignore": true,
+ # "packet_size": 577,
+ # "priority": 1,
+ # "process_id": "30",
+ # "retransmit_interval": 2,
+ # "router_id": "2.2.2.2",
+ # "transmit_delay": 2
+ # }
+ # ]
+ # }
+ #
+
+
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Rohit Thakur (@rohitthakur2590)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_static_routes_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_static_routes_module.rst
new file mode 100644
index 00000000..266e6fcc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_static_routes_module.rst
@@ -0,0 +1,1141 @@
+.. _cisco.iosxr.iosxr_static_routes_module:
+
+
+*******************************
+cisco.iosxr.iosxr_static_routes
+*******************************
+
+**Static routes resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages static routes on devices running Cisco IOS-XR.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="5">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of static route options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_families</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary specifying the address family to which the static route(s) belong.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the top level address family indicator.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>routes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary that specifies the static route configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>An IPv4 or IPv6 address in CIDR notation that specifies the destination network for the static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hops</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Next hops to the specified destination.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The administrative distance for this static route.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the description for this static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest_vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The destination VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>forward_router_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The IP address of the next hop that can be used to reach the destination network.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The interface to use to reach the destination.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifes the metric for this static route.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies a numeric tag for this static route.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>track</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the object to be tracked.</div>
+ <div>This enables object tracking for static routes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tunnel_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies a tunnel id for the route.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrflabel</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the VRF label for this static route.</div>
+ <div>Refer to vendor documentation for valid values.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>safi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>unicast</li>
+ <li>multicast</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the subsequent address family indicator.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The VRF to which the static route(s) belong.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the IOS-XR device by executing the command <b>show running-config router static</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state
+ # -------------
+ # RP/0/RP0/CPU0:ios#show running-config router static
+ # Sat Feb 22 07:46:30.089 UTC
+ # % No such configuration item(s)
+ #
+ - name: Merge the provided configuration with the exisiting running configuration
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - forward_router_address: 192.0.2.10
+ interface: FastEthernet0/0/0/1
+ description: LAB
+ metric: 120
+ tag: 10
+
+ - interface: FastEthernet0/0/0/5
+ track: ip_sla_1
+
+ - dest: 192.0.2.32/28
+ next_hops:
+ - forward_router_address: 192.0.2.11
+ admin_distance: 100
+
+ - afi: ipv6
+ safi: unicast
+ routes:
+ - dest: 2001:db8:1000::/36
+ next_hops:
+ - interface: FastEthernet0/0/0/7
+ description: DC
+
+ - interface: FastEthernet0/0/0/8
+ forward_router_address: 2001:db8:2000:2::1
+
+ - vrf: DEV_SITE
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.12
+ description: DEV
+ dest_vrf: test_1
+
+ - dest: 192.0.2.80/28
+ next_hops:
+ - interface: FastEthernet0/0/0/2
+ forward_router_address: 192.0.2.14
+ dest_vrf: test_1
+ track: ip_sla_2
+ vrflabel: 124
+ state: merged
+
+ # After state
+ # -------------
+ # RP/0/RP0/CPU0:ios#show running-config router static
+ # Sat Feb 22 07:49:11.754 UTC
+ # router static
+ # address-family ipv4 unicast
+ # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+ # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ # 192.0.2.32/28 192.0.2.11 100
+ # !
+ # address-family ipv6 unicast
+ # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+ # !
+ # vrf DEV_SITE
+ # address-family ipv4 unicast
+ # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+ # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+ # !
+ # !
+ # !
+
+ # Using merged to update existing static routes
+
+ # Before state
+ # -------------
+ # RP/0/RP0/CPU0:ios#show running-config router static
+ # Sat Feb 22 07:49:11.754 UTC
+ # router static
+ # address-family ipv4 unicast
+ # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+ # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ # 192.0.2.32/28 192.0.2.11 100
+ # !
+ # address-family ipv6 unicast
+ # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+ # !
+ # vrf DEV_SITE
+ # address-family ipv4 unicast
+ # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+ # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+ # !
+ # !
+ # !
+
+ - name: Update existing static routes configuration using merged
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ - vrf: DEV_SITE
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.12
+ vrflabel: 2301
+ dest_vrf: test_1
+
+ - dest: 192.0.2.80/28
+ next_hops:
+ - interface: FastEthernet0/0/0/2
+ forward_router_address: 192.0.2.14
+ dest_vrf: test_1
+ description: rt_test_1
+ state: merged
+
+ # After state
+ # -------------
+ # RP/0/RP0/CPU0:ios#show running-config router static
+ # Sat Feb 22 07:49:11.754 UTC
+ # router static
+ # address-family ipv4 unicast
+ # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+ # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ # 192.0.2.32/28 192.0.2.11 100
+ # !
+ # address-family ipv6 unicast
+ # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+ # !
+ # vrf DEV_SITE
+ # address-family ipv4 unicast
+ # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV vrflabel 2301
+ # 192.0.2.80/28 vrf test_1 192.0.2.14 FastEthernet0/0/0/2 description rt_test_1 track ip_sla_2 vrflabel 124
+ # !
+ # !
+ # !
+
+ # Using replaced to replace all next hop entries for a single destination network
+
+ # Before state
+ # --------------
+
+ # RP/0/RP0/CPU0:ios#sh running-config router static
+ # Sat Feb 22 07:59:08.669 UTC
+ # router static
+ # address-family ipv4 unicast
+ # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+ # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ # 192.0.2.32/28 192.0.2.11 100
+ # !
+ # address-family ipv6 unicast
+ # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+ # !
+ # vrf DEV_SITE
+ # address-family ipv4 unicast
+ # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+ # 192.0.2.48/28 GigabitEthernet0/0/0/1 192.0.3.24 vrflabel 2302
+ # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+ # !
+ # !
+ # !
+
+ - name: Replace device configurations of static routes with provided configurations
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ - vrf: DEV_SITE
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.15
+ interface: FastEthernet0/0/0/3
+ description: DEV_NEW
+ dest_vrf: dev_test_2
+ state: replaced
+
+ # After state
+ # ------------
+ # RP/0/RP0/CPU0:ios#sh running-config router static
+ # Sat Feb 22 08:04:07.085 UTC
+ # router static
+ # address-family ipv4 unicast
+ # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+ # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ # 192.0.2.32/28 192.0.2.11 100
+ # !
+ # address-family ipv6 unicast
+ # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+ # !
+ # vrf DEV_SITE
+ # address-family ipv4 unicast
+ # 192.0.2.48/28 vrf dev_test_2 FastEthernet0/0/0/3 192.0.2.15 description DEV_NEW
+ # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+ # !
+ # !
+ # !
+
+ # Using overridden to override all static route entries on the device
+
+ # Before state
+ # -------------
+ # RP/0/RP0/CPU0:ios#sh running-config router static
+ # Sat Feb 22 07:59:08.669 UTC
+ # router static
+ # address-family ipv4 unicast
+ # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+ # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ # 192.0.2.32/28 192.0.2.11 100
+ # !
+ # address-family ipv6 unicast
+ # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+ # !
+ # vrf DEV_SITE
+ # address-family ipv4 unicast
+ # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+ # 192.0.2.48/28 GigabitEthernet0/0/0/1 192.0.3.24 vrflabel 2302
+ # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+ # !
+ # !
+ # !
+
+ - name: Overridde all static routes configuration with provided configuration
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ - vrf: DEV_NEW
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.15
+ interface: FastEthernet0/0/0/3
+ description: DEV1
+ - afi: ipv6
+ safi: unicast
+ routes:
+ - dest: 2001:db8:3000::/36
+ next_hops:
+ - interface: FastEthernet0/0/0/4
+ forward_router_address: 2001:db8:2000:2::2
+ description: PROD1
+ track: ip_sla_1
+ state: overridden
+
+ # After state
+ # -------------
+ # RP/0/RP0/CPU0:ios#sh running-config router static
+ # Sat Feb 22 08:07:41.516 UTC
+ # router static
+ # vrf DEV_NEW
+ # address-family ipv4 unicast
+ # 192.0.2.48/28 FastEthernet0/0/0/3 192.0.2.15 description DEV1
+ # !
+ # address-family ipv6 unicast
+ # 2001:db8:3000::/36 FastEthernet0/0/0/4 2001:db8:2000:2::2 description PROD1 track ip_sla_1
+ # !
+ # !
+ # !
+
+ # Using deleted to delete all destination network entries under a single AFI
+
+ # Before state
+ # -------------
+ # RP/0/RP0/CPU0:ios#sh running-config router static
+ # Sat Feb 22 07:59:08.669 UTC
+ # router static
+ # address-family ipv4 unicast
+ # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+ # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ # 192.0.2.32/28 192.0.2.11 100
+ # !
+ # address-family ipv6 unicast
+ # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+ # !
+ # vrf DEV_SITE
+ # address-family ipv4 unicast
+ # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+ # 192.0.2.48/28 GigabitEthernet0/0/0/1 192.0.3.24 vrflabel 2302
+ # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+ # !
+ # !
+ # !
+
+ - name: Delete all destination network entries under a single AFI
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ - vrf: DEV_SITE
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ state: deleted
+
+ # After state
+ # ------------
+
+ # RP/0/RP0/CPU0:ios#sh running-config router static
+ # Sat Feb 22 08:16:41.464 UTC
+ # router static
+ # address-family ipv4 unicast
+ # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+ # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ # 192.0.2.32/28 192.0.2.11 100
+ # !
+ # address-family ipv6 unicast
+ # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+ # !
+ # vrf DEV_SITE
+ # !
+ # !
+
+ # Using deleted to remove all static route entries from the device
+
+ # Before state
+ # -------------
+ # RP/0/RP0/CPU0:ios#sh running-config router static
+ # Sat Feb 22 07:59:08.669 UTC
+ # router static
+ # address-family ipv4 unicast
+ # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+ # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ # 192.0.2.32/28 192.0.2.11 100
+ # !
+ # address-family ipv6 unicast
+ # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+ # !
+ # vrf DEV_SITE
+ # address-family ipv4 unicast
+ # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+ # 192.0.2.48/28 GigabitEthernet0/0/0/1 192.0.3.24 vrflabel 2302
+ # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+ # !
+ # !
+ # !
+
+ - name: Delete static routes configuration
+ cisco.iosxr.iosxr_static_routes:
+ state: deleted
+
+ # After state
+ # ------------
+ # RP/0/RP0/CPU0:ios#sh running-config router static
+ # Sat Feb 22 08:50:43.038 UTC
+ # % No such configuration item(s)
+
+ # Using gathered to gather static route facts from the device
+
+ - name: Gather static routes facts from the device using iosxr_static_routes module
+ cisco.iosxr.iosxr_static_routes:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+ # "gathered": [
+ # {
+ # "address_families": [
+ # {
+ # "afi": "ipv4",
+ # "routes": [
+ # {
+ # "dest": "192.0.2.16/28",
+ # "next_hops": [
+ # {
+ # "description": "LAB",
+ # "forward_router_address": "192.0.2.10",
+ # "interface": "FastEthernet0/0/0/1",
+ # "metric": 120,
+ # "tag": 10
+ # },
+ # {
+ # "interface": "FastEthernet0/0/0/5",
+ # "track": "ip_sla_1"
+ # }
+ # ]
+ # },
+ # {
+ # "dest": "192.0.2.32/28",
+ # "next_hops": [
+ # {
+ # "admin_distance": 100,
+ # "forward_router_address": "192.0.2.11"
+ # }
+ # ]
+ # }
+ # ],
+ # "safi": "unicast"
+ # },
+ # {
+ # "afi": "ipv6",
+ # "routes": [
+ # {
+ # "dest": "2001:db8:1000::/36",
+ # "next_hops": [
+ # {
+ # "description": "DC",
+ # "interface": "FastEthernet0/0/0/7"
+ # },
+ # {
+ # "forward_router_address": "2001:db8:2000:2::1",
+ # "interface": "FastEthernet0/0/0/8"
+ # }
+ # ]
+ # }
+ # ],
+ # "safi": "unicast"
+ # }
+ # ]
+ # },
+ # {
+ # "address_families": [
+ # {
+ # "afi": "ipv4",
+ # "routes": [
+ # {
+ # "dest": "192.0.2.48/28",
+ # "next_hops": [
+ # {
+ # "description": "DEV",
+ # "dest_vrf": "test_1",
+ # "forward_router_address": "192.0.2.12"
+ # },
+ # {
+ # "forward_router_address": "192.0.3.24",
+ # "interface": "GigabitEthernet0/0/0/1",
+ # "vrflabel": 2302
+ # }
+ # ]
+ # },
+ # {
+ # "dest": "192.0.2.80/28",
+ # "next_hops": [
+ # {
+ # "dest_vrf": "test_1",
+ # "forward_router_address": "192.0.2.14",
+ # "interface": "FastEthernet0/0/0/2",
+ # "track": "ip_sla_2",
+ # "vrflabel": 124
+ # }
+ # ]
+ # }
+ # ],
+ # "safi": "unicast"
+ # }
+ # ],
+ # "vrf": "DEV_SITE"
+ # }
+ # ]
+
+ # Using rendered
+
+ - name: Render platform specific commands (without connecting to the device)
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ - vrf: DEV_SITE
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.12
+ description: DEV
+ dest_vrf: test_1
+
+ - dest: 192.0.2.80/28
+ next_hops:
+ - interface: FastEthernet0/0/0/2
+ forward_router_address: 192.0.2.14
+ dest_vrf: test_1
+ track: ip_sla_2
+ vrflabel: 124
+
+ # Task Output (redacted)
+ # -----------------------
+ # "rendered": [
+ # "router static"s,
+ # "vrf DEV_SITE",
+ # "address-family ipv4 unicast",
+ # "192.0.2.48/28 vrf test_1 192.0.2.12 description DEV",
+ # "192.0.2.80/28 vrf test_1 192.0.2.14 FastEthernet0/0/0/2 track ip_sla_2 vrflabel 124"
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # Fri Nov 29 21:10:41.896 UTC
+ # router static
+ # address-family ipv4 unicast
+ # 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+ # 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ # 192.0.2.32/28 192.0.2.11 100
+ # !
+ # address-family ipv6 unicast
+ # 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ # 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+ # !
+ # vrf DEV_SITE
+ # address-family ipv4 unicast
+ # 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+ # 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+ # !
+ # !
+ # !
+
+ - name: Use parsed state to convert externally supplied device specific static routes
+ commands to structured format
+ cisco.iosxr.iosxr_static_routes:
+ running_config: "{{ lookup('file', '../../fixtures/parsed.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+ # "parsed": [
+ # {
+ # "address_families": [
+ # {
+ # "afi": "ipv4",
+ # "routes": [
+ # {
+ # "dest": "192.0.2.16/28",
+ # "next_hops": [
+ # {
+ # "description": "LAB",
+ # "forward_router_address": "192.0.2.10",
+ # "interface": "FastEthernet0/0/0/1",
+ # "metric": 120,
+ # "tag": 10
+ # },
+ # {
+ # "interface": "FastEthernet0/0/0/5",
+ # "track": "ip_sla_1"
+ # }
+ # ]
+ # },
+ # {
+ # "dest": "192.0.2.32/28",
+ # "next_hops": [
+ # {
+ # "admin_distance": 100,
+ # "forward_router_address": "192.0.2.11"
+ # }
+ # ]
+ # }
+ # ],
+ # "safi": "unicast"
+ # },
+ # {
+ # "afi": "ipv6",
+ # "routes": [
+ # {
+ # "dest": "2001:db8:1000::/36",
+ # "next_hops": [
+ # {
+ # "description": "DC",
+ # "interface": "FastEthernet0/0/0/7"
+ # },
+ # {
+ # "forward_router_address": "2001:db8:2000:2::1",
+ # "interface": "FastEthernet0/0/0/8"
+ # }
+ # ]
+ # }
+ # ],
+ # "safi": "unicast"
+ # }
+ # ]
+ # },
+ # {
+ # "address_families": [
+ # {
+ # "afi": "ipv4",
+ # "routes": [
+ # {
+ # "dest": "192.0.2.48/28",
+ # "next_hops": [
+ # {
+ # "description": "DEV",
+ # "dest_vrf": "test_1",
+ # "forward_router_address": "192.0.2.12"
+ # }
+ # ]
+ # },
+ # {
+ # "dest": "192.0.2.80/28",
+ # "next_hops": [
+ # {
+ # "dest_vrf": "test_1",
+ # "forward_router_address": "192.0.2.14",
+ # "interface": "FastEthernet0/0/0/2",
+ # "track": "ip_sla_2",
+ # "vrflabel": 124
+ # }
+ # ]
+ # }
+ # ],
+ # "safi": "unicast"
+ # }
+ # ],
+ # "vrf": "DEV_SITE"
+ # }
+ # ]
+ # }
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router static&#x27;, &#x27;vrf dev_site&#x27;, &#x27;address-family ipv4 unicast&#x27;, &#x27;192.0.2.48/28 192.0.2.12 FastEthernet0/0/0/1 track ip_sla_10 description dev1&#x27;, &#x27;address-family ipv6 unicast&#x27;, &#x27;no 2001:db8:1000::/36&#x27;, &#x27;2001:db8:3000::/36 2001:db8:2000:2::2 FastEthernet0/0/0/4 track ip_sla_11 description prod1&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@NilashishC)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_system_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_system_module.rst
new file mode 100644
index 00000000..c2c25a78
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_system_module.rst
@@ -0,0 +1,427 @@
+.. _cisco.iosxr.iosxr_system_module:
+
+
+************************
+cisco.iosxr.iosxr_system
+************************
+
+**Manage the system attributes on Cisco IOS XR devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of node system attributes on Cisco IOS XR devices. It provides an option to configure host system parameters or remove those parameters from the device active configuration.
+
+
+
+Requirements
+------------
+The below requirements are needed on the host that executes this module.
+
+- ncclient >= 0.5.3 when using netconf
+- lxml >= 4.1.1 when using netconf
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure the IP domain name on the remote device to the provided value. Value should be in the dotted name form and will be appended to the <code>hostname</code> to create a fully-qualified domain name.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain_search</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Provides the list of domain suffixes to append to the hostname for the purpose of doing name resolution. This argument accepts a list of names and will be reconciled with the current active configuration on the running node.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hostname</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure the device hostname parameter. This option takes an ASCII string value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lookup_enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Provides administrative control for enabling or disabling DNS lookups. When this argument is set to True, lookups are performed and when it is set to False, lookups are not performed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lookup_source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <code>lookup_source</code> argument provides one or more source interfaces to use for performing DNS lookups. The interface provided in <code>lookup_source</code> must be a valid interface configured on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name_servers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <code>name_serves</code> argument accepts a list of DNS name servers by way of either FQDN or IP address to use to perform name resolution lookups. This argument accepts wither a list of DNS servers See examples.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>netconf</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the type of connection based transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the configuration values in the device&#x27;s current active configuration. When set to <em>present</em>, the values should be configured in the device active configuration and when set to <em>absent</em> the values should not be in the device active configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"default"</div>
+ </td>
+ <td>
+ <div>VRF name for domain services</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - This module works with connection ``network_cli`` and ``netconf``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+ - Tested against IOS XRv 6.1.3
+ - name-servers *state=absent* operation with ``netconf`` transport is a success, but with rpc-error. This is due to XR platform issue. Recommended to use *ignore_errors* option with the task as a workaround.
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure hostname and domain-name (default vrf=default)
+ cisco.iosxr.iosxr_system:
+ hostname: iosxr01
+ domain_name: test.example.com
+ domain_search:
+ - ansible.com
+ - redhat.com
+ - cisco.com
+ - name: remove configuration
+ cisco.iosxr.iosxr_system:
+ hostname: iosxr01
+ domain_name: test.example.com
+ domain_search:
+ - ansible.com
+ - redhat.com
+ - cisco.com
+ state: absent
+ - name: configure hostname and domain-name with vrf
+ cisco.iosxr.iosxr_system:
+ hostname: iosxr01
+ vrf: nondefault
+ domain_name: test.example.com
+ domain_search:
+ - ansible.com
+ - redhat.com
+ - cisco.com
+ - name: configure DNS lookup sources
+ cisco.iosxr.iosxr_system:
+ lookup_source: MgmtEth0/0/CPU0/0
+ lookup_enabled: true
+ - name: configure name servers
+ cisco.iosxr.iosxr_system:
+ name_servers:
+ - 8.8.8.8
+ - 8.8.4.4
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;hostname iosxr01&#x27;, &#x27;ip domain-name test.example.com&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>xml</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always (empty list when no xml rpc to send)</td>
+ <td>
+ <div>NetConf rpc xml sent to device with transport <code>netconf</code></div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;config xmlns:xc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt; &lt;ip-domain xmlns=&quot;http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-cfg&quot;&gt; &lt;vrfs&gt; &lt;vrf&gt; &lt;vrf-name&gt;default&lt;/vrf-name&gt; &lt;lists&gt; &lt;list xc:operation=&quot;merge&quot;&gt; &lt;order&gt;0&lt;/order&gt; &lt;list-name&gt;redhat.com&lt;/list-name&gt; &lt;/list&gt; &lt;/lists&gt; &lt;/vrf&gt; &lt;/vrfs&gt; &lt;/ip-domain&gt; &lt;/config&gt;&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip)
+- Kedar Kekan (@kedarX)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_user_module.rst b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_user_module.rst
new file mode 100644
index 00000000..fc8cefb3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/docs/cisco.iosxr.iosxr_user_module.rst
@@ -0,0 +1,651 @@
+.. _cisco.iosxr.iosxr_user_module:
+
+
+**********************
+cisco.iosxr.iosxr_user
+**********************
+
+**Manage the aggregate of local users on Cisco IOS XR device**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of the local usernames configured on network devices. It allows playbooks to manage either individual usernames or the aggregate of usernames in the current running config. It also supports purging usernames from the configuration that are not explicitly defined.
+
+
+
+Requirements
+------------
+The below requirements are needed on the host that executes this module.
+
+- ncclient >= 0.5.3 when using netconf
+- lxml >= 4.1.1 when using netconf
+- base64 when using *public_key_contents* or *public_key*
+- paramiko when using *public_key_contents* or *public_key*
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enters into administration configuration mode for making config changes to the device.</div>
+ <div>Applicable only when using network_cli transport</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The set of username objects to be configured on the remote Cisco IOS XR device. The list entries can either be the username or a hash of username and properties. This argument is mutually exclusive with the <code>name</code> argument.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: users, collection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enters into administration configuration mode for making config changes to the device.</div>
+ <div>Applicable only when using network_cli transport</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>configured_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The password to be configured on the Cisco IOS XR device. The password needs to be provided in clear text. Password is encrypted on the device when used with <em>cli</em> and by Ansible when used with <em>netconf</em> using the same MD5 hash technique with salt size of 3. Please note that this option is not same as <code>provider password</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the group for the username in the device running configuration. The argument accepts a string value defining the group name. This argument does not check if the group has been configured on the device.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: role</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>groups</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the groups for the username in the device running configuration. The argument accepts a list of group names. This argument does not check if the group has been configured on the device. It is similar to the aggregate command for usernames, but lets you configure multiple groups for the user(s).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The username to be configured on the Cisco IOS XR device. This argument accepts a string value and is mutually exclusive with the <code>aggregate</code> argument. Please note that this option is not same as <code>provider username</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>public_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the contents of the public keyfile to upload to the IOS-XR node. This enables users to login using the accompanying private key. IOS-XR only accepts base64 decoded files, so this will be decoded and uploaded to the node. Do note that this requires an OpenSSL public key file, PuTTy generated files will not work! Mutually exclusive with public_key_contents. If used with multiple users in aggregates, then the same key file is used for all users.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>public_key_contents</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the contents of the public keyfile to upload to the IOS-XR node. This enables users to login using the accompanying private key. IOS-XR only accepts base64 decoded files, so this will be decoded and uploaded to the node. Do note that this requires an OpenSSL public key file, PuTTy generated files will not work! Mutually exclusive with public_key.If used with multiple users in aggregates, then the same key file is used for all users.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the state of the username definition as it relates to the device operational configuration. When set to <em>present</em>, the username(s) should be configured in the device active configuration and when set to <em>absent</em> the username(s) should not be in the device active configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>on_create</li>
+ <li>always</li>
+ </ul>
+ </td>
+ <td>
+ <div>Since passwords are encrypted in the device running config, this argument will instruct the module when to change the password. When set to <code>always</code>, the password will always be updated in the device and when set to <code>on_create</code> the password will be updated only if the username is created.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>configured_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The password to be configured on the Cisco IOS XR device. The password needs to be provided in clear text. Password is encrypted on the device when used with <em>cli</em> and by Ansible when used with <em>netconf</em> using the same MD5 hash technique with salt size of 3. Please note that this option is not same as <code>provider password</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the group for the username in the device running configuration. The argument accepts a string value defining the group name. This argument does not check if the group has been configured on the device.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: role</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>groups</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the groups for the username in the device running configuration. The argument accepts a list of group names. This argument does not check if the group has been configured on the device. It is similar to the aggregate command for usernames, but lets you configure multiple groups for the user(s).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The username to be configured on the Cisco IOS XR device. This argument accepts a string value and is mutually exclusive with the <code>aggregate</code> argument. Please note that this option is not same as <code>provider username</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>For more information please see the <a href='../network/getting_started/network_differences.html#multiple-communication-protocols'>Network Guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>netconf</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the type of connection based transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>public_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the contents of the public keyfile to upload to the IOS-XR node. This enables users to login using the accompanying private key. IOS-XR only accepts base64 decoded files, so this will be decoded and uploaded to the node. Do note that this requires an OpenSSL public key file, PuTTy generated files will not work! Mutually exclusive with public_key_contents. If used with multiple users in aggregates, then the same key file is used for all users.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>public_key_contents</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the contents of the public keyfile to upload to the IOS-XR node. This enables users to login using the accompanying private key. IOS-XR only accepts base64 decoded files, so this will be decoded and uploaded to the node. Do note that this requires an OpenSSL public key file, PuTTy generated files will not work! Mutually exclusive with public_key.If used with multiple users in aggregates, then the same key file is used for all users.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>purge</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to consider the resource definition absolute. It will remove any previously configured usernames on the device with the exception of the `admin` user and the current defined set of users.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the state of the username definition as it relates to the device operational configuration. When set to <em>present</em>, the username(s) should be configured in the device active configuration and when set to <em>absent</em> the username(s) should not be in the device active configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>on_create</li>
+ <li><div style="color: blue"><b>always</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Since passwords are encrypted in the device running config, this argument will instruct the module when to change the password. When set to <code>always</code>, the password will always be updated in the device and when set to <code>on_create</code> the password will be updated only if the username is created.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - This module works with connection ``network_cli`` and ``netconf``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_.
+ - Tested against IOS XRv 6.1.3
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: create a new user
+ cisco.iosxr.iosxr_user:
+ name: ansible
+ configured_password: mypassword
+ state: present
+ - name: create a new user in admin configuration mode
+ cisco.iosxr.iosxr_user:
+ name: ansible
+ configured_password: mypassword
+ admin: true
+ state: present
+ - name: remove all users except admin
+ cisco.iosxr.iosxr_user:
+ purge: true
+ - name: set multiple users to group sys-admin
+ cisco.iosxr.iosxr_user:
+ aggregate:
+ - name: netop
+ - name: netend
+ group: sysadmin
+ state: present
+ - name: set multiple users to multiple groups
+ cisco.iosxr.iosxr_user:
+ aggregate:
+ - name: netop
+ - name: netend
+ groups:
+ - sysadmin
+ - root-system
+ state: present
+ - name: Change Password for User netop
+ cisco.iosxr.iosxr_user:
+ name: netop
+ configured_password: '{{ new_password }}'
+ update_password: always
+ state: present
+ - name: Add private key authentication for user netop
+ cisco.iosxr.iosxr_user:
+ name: netop
+ state: present
+ public_key_contents: "{{ lookup('file', '/home/netop/.ssh/id_rsa.pub' }}"
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;username ansible secret password group sysadmin&#x27;, &#x27;username admin secret admin&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>xml</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always (empty list when no xml rpc to send)</td>
+ <td>
+ <div>NetConf rpc xml sent to device with transport <code>netconf</code></div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;&lt;config xmlns:xc=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&gt; &lt;aaa xmlns=&quot;http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-lib-cfg&quot;&gt; &lt;usernames xmlns=&quot;http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-cfg&quot;&gt; &lt;username xc:operation=&quot;merge&quot;&gt; &lt;name&gt;test7&lt;/name&gt; &lt;usergroup-under-usernames&gt; &lt;usergroup-under-username&gt; &lt;name&gt;sysadmin&lt;/name&gt; &lt;/usergroup-under-username&gt; &lt;/usergroup-under-usernames&gt; &lt;secret&gt;$1$ZsXC$zZ50wqhDC543ZWQkkAHLW0&lt;/secret&gt; &lt;/username&gt; &lt;/usernames&gt; &lt;/aaa&gt; &lt;/config&gt;&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
+- Sebastiaan van Doesselaar (@sebasdoes)
+- Kedar Kekan (@kedarX)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/meta/runtime.yml b/collections-debian-merged/ansible_collections/cisco/iosxr/meta/runtime.yml
new file mode 100644
index 00000000..fd538c9d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/meta/runtime.yml
@@ -0,0 +1,156 @@
+---
+requires_ansible: '>=2.9.10,<2.11'
+plugin_routing:
+ action:
+ iosxr_acl_interfaces:
+ redirect: cisco.iosxr.iosxr
+ acl_interfaces:
+ redirect: cisco.iosxr.iosxr
+ iosxr_acls:
+ redirect: cisco.iosxr.iosxr
+ acls:
+ redirect: cisco.iosxr.iosxr
+ iosxr_banner:
+ redirect: cisco.iosxr.iosxr
+ banner:
+ redirect: cisco.iosxr.iosxr
+ iosxr_bgp:
+ redirect: cisco.iosxr.iosxr
+ bgp:
+ redirect: cisco.iosxr.iosxr
+ iosxr_command:
+ redirect: cisco.iosxr.iosxr
+ command:
+ redirect: cisco.iosxr.iosxr
+ iosxr_config:
+ redirect: cisco.iosxr.iosxr
+ config:
+ redirect: cisco.iosxr.iosxr
+ iosxr_facts:
+ redirect: cisco.iosxr.iosxr
+ facts:
+ redirect: cisco.iosxr.iosxr
+ iosxr_interface:
+ redirect: cisco.iosxr.iosxr
+ interface:
+ redirect: cisco.iosxr.iosxr
+ iosxr_interfaces:
+ redirect: cisco.iosxr.iosxr
+ interfaces:
+ redirect: cisco.iosxr.iosxr
+ iosxr_l2_interfaces:
+ redirect: cisco.iosxr.iosxr
+ l2_interfaces:
+ redirect: cisco.iosxr.iosxr
+ iosxr_l3_interfaces:
+ redirect: cisco.iosxr.iosxr
+ l3_interfaces:
+ redirect: cisco.iosxr.iosxr
+ iosxr_lacp:
+ redirect: cisco.iosxr.iosxr
+ lacp:
+ redirect: cisco.iosxr.iosxr
+ iosxr_lacp_interfaces:
+ redirect: cisco.iosxr.iosxr
+ lacp_interfaces:
+ redirect: cisco.iosxr.iosxr
+ iosxr_lag_interfaces:
+ redirect: cisco.iosxr.iosxr
+ lag_interfaces:
+ redirect: cisco.iosxr.iosxr
+ iosxr_lldp_global:
+ redirect: cisco.iosxr.iosxr
+ lldp_global:
+ redirect: cisco.iosxr.iosxr
+ iosxr_lldp_interfaces:
+ redirect: cisco.iosxr.iosxr
+ lldp_interfaces:
+ redirect: cisco.iosxr.iosxr
+ iosxr_logging:
+ redirect: cisco.iosxr.iosxr
+ logging:
+ redirect: cisco.iosxr.iosxr
+ iosxr_netconf:
+ redirect: cisco.iosxr.iosxr
+ netconf:
+ redirect: cisco.iosxr.iosxr
+ iosxr_ospfv2:
+ redirect: cisco.iosxr.iosxr
+ ospfv2:
+ redirect: cisco.iosxr.iosxr
+ iosxr_ospfv3:
+ redirect: cisco.iosxr.iosxr
+ ospfv3:
+ redirect: cisco.iosxr.iosxr
+ iosxr_ospf_interfaces:
+ redirect: cisco.iosxr.iosxr
+ ospf_interfaces:
+ redirect: cisco.iosxr.iosxr
+ iosxr_static_routes:
+ redirect: cisco.iosxr.iosxr
+ static_routes:
+ redirect: cisco.iosxr.iosxr
+ iosxr_system:
+ redirect: cisco.iosxr.iosxr
+ system:
+ redirect: cisco.iosxr.iosxr
+ iosxr_user:
+ redirect: cisco.iosxr.iosxr
+ user:
+ redirect: cisco.iosxr.iosxr
+ modules:
+ acl_interfaces:
+ redirect: cisco.iosxr.iosxr_acl_interfaces
+ acls:
+ redirect: cisco.iosxr.iosxr_acls
+ banner:
+ redirect: cisco.iosxr.iosxr_banner
+ bgp:
+ redirect: cisco.iosxr.iosxr_bgp
+ command:
+ redirect: cisco.iosxr.iosxr_command
+ config:
+ redirect: cisco.iosxr.iosxr_config
+ facts:
+ redirect: cisco.iosxr.iosxr_facts
+ interface:
+ redirect: cisco.iosxr.iosxr_interface
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ iosxr_interface:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ interfaces:
+ redirect: cisco.iosxr.iosxr_interfaces
+ l2_interfaces:
+ redirect: cisco.iosxr.iosxr_l2_interfaces
+ l3_interfaces:
+ redirect: cisco.iosxr.iosxr_l3_interfaces
+ lacp:
+ redirect: cisco.iosxr.iosxr_lacp
+ lacp_interfaces:
+ redirect: cisco.iosxr.iosxr_lacp_interfaces
+ lag_interfaces:
+ redirect: cisco.iosxr.iosxr_lag_interfaces
+ lldp_global:
+ redirect: cisco.iosxr.iosxr_lldp_global
+ lldp_interfaces:
+ redirect: cisco.iosxr.iosxr_lldp_interfaces
+ logging:
+ redirect: cisco.iosxr.iosxr_logging
+ netconf:
+ redirect: cisco.iosxr.iosxr_netconf
+ ospfv2:
+ redirect: cisco.iosxr.iosxr_ospfv2
+ ospfv3:
+ redirect: cisco.iosxr.iosxr_ospfv3
+ ospf_interfaces:
+ redirect: cisco.iosxr.iosxr_ospf_interfaces
+ static_routes:
+ redirect: cisco.iosxr.iosxr_static_routes
+ system:
+ redirect: cisco.iosxr.iosxr_system
+ user:
+ redirect: cisco.iosxr.iosxr_user
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/action/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/action/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/action/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/action/iosxr.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/action/iosxr.py
new file mode 100644
index 00000000..2d5819bc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/action/iosxr.py
@@ -0,0 +1,162 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import sys
+import copy
+
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ iosxr_provider_spec,
+)
+from ansible_collections.ansible.netcommon.plugins.action.network import (
+ ActionModule as ActionNetworkModule,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ load_provider,
+)
+from ansible.utils.display import Display
+
+display = Display()
+
+
+class ActionModule(ActionNetworkModule):
+ def run(self, tmp=None, task_vars=None):
+ del tmp # tmp no longer has any effect
+
+ module_name = self._task.action.split(".")[-1]
+ self._config_module = (
+ True if module_name in ["iosxr_config", "config"] else False
+ )
+ force_cli = module_name in (
+ "iosxr_netconf",
+ "iosxr_config",
+ "iosxr_command",
+ "iosxr_facts",
+ )
+ persistent_connection = self._play_context.connection.split(".")[-1]
+ warnings = []
+
+ if self._play_context.connection == "local":
+ provider = load_provider(iosxr_provider_spec, self._task.args)
+ pc = copy.deepcopy(self._play_context)
+ pc.network_os = "cisco.iosxr.iosxr"
+ if force_cli or provider["transport"] == "cli":
+ pc.connection = "ansible.netcommon.network_cli"
+ pc.port = int(
+ provider["port"] or self._play_context.port or 22
+ )
+ elif provider["transport"] == "netconf":
+ pc.connection = "ansible.netcommon.netconf"
+ pc.port = int(
+ provider["port"] or self._play_context.port or 830
+ )
+ else:
+ return {
+ "failed": True,
+ "msg": "Transport type %s is not valid for this module"
+ % provider["transport"],
+ }
+
+ pc.remote_addr = provider["host"] or self._play_context.remote_addr
+ pc.port = int(provider["port"] or self._play_context.port or 22)
+ pc.remote_user = (
+ provider["username"] or self._play_context.connection_user
+ )
+ pc.password = provider["password"] or self._play_context.password
+
+ connection = self._shared_loader_obj.connection_loader.get(
+ "ansible.netcommon.persistent",
+ pc,
+ sys.stdin,
+ task_uuid=self._task._uuid,
+ )
+
+ # TODO: Remove below code after ansible minimal is cut out
+ if connection is None:
+ pc.network_os = "iosxr"
+ if pc.connection.split(".")[-1] == "netconf":
+ pc.connection = "netconf"
+ else:
+ pc.connection = "network_cli"
+
+ connection = self._shared_loader_obj.connection_loader.get(
+ "persistent", pc, sys.stdin, task_uuid=self._task._uuid
+ )
+
+ display.vvv(
+ "using connection plugin %s (was local)" % pc.connection,
+ pc.remote_addr,
+ )
+
+ command_timeout = (
+ int(provider["timeout"])
+ if provider["timeout"]
+ else connection.get_option("persistent_command_timeout")
+ )
+ connection.set_options(
+ direct={"persistent_command_timeout": command_timeout}
+ )
+
+ socket_path = connection.run()
+ display.vvvv("socket_path: %s" % socket_path, pc.remote_addr)
+ if not socket_path:
+ return {
+ "failed": True,
+ "msg": "unable to open shell. Please see: "
+ + "https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell",
+ }
+
+ task_vars["ansible_socket"] = socket_path
+ warnings.append(
+ [
+ "connection local support for this module is deprecated and will be removed in version 2.14, use connection %s"
+ % pc.connection
+ ]
+ )
+ elif persistent_connection in ("netconf", "network_cli"):
+ if force_cli and persistent_connection != "network_cli":
+ return {
+ "failed": True,
+ "msg": "Connection type %s is not valid for module %s"
+ % (self._play_context.connection, module_name),
+ }
+ provider = self._task.args.get("provider", {})
+ if any(provider.values()):
+ display.warning(
+ "provider is unnecessary when using {0} and will be ignored".format(
+ self._play_context.connection
+ )
+ )
+ del self._task.args["provider"]
+ else:
+ return {
+ "failed": True,
+ "msg": "Connection type %s is not valid for this module"
+ % self._play_context.connection,
+ }
+
+ result = super(ActionModule, self).run(task_vars=task_vars)
+ if warnings:
+ if "warnings" in result:
+ result["warnings"].extend(warnings)
+ else:
+ result["warnings"] = warnings
+ return result
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/cliconf/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/cliconf/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/cliconf/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/cliconf/iosxr.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/cliconf/iosxr.py
new file mode 100644
index 00000000..0a2d81c9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/cliconf/iosxr.py
@@ -0,0 +1,366 @@
+#
+# (c) 2017 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+author: Ansible Networking Team
+cliconf: iosxr
+short_description: Use iosxr cliconf to run command on Cisco IOS XR platform
+description:
+- This iosxr plugin provides low level abstraction apis for sending and receiving
+ CLI commands from Cisco IOS XR network devices.
+version_added: 1.0.0
+"""
+
+import re
+import json
+
+from ansible.errors import AnsibleConnectionFailure
+from ansible.module_utils._text import to_text
+from ansible.module_utils.common._collections_compat import Mapping
+from ansible.module_utils.connection import ConnectionError
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+ dumps,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ sanitize_config,
+ mask_config_blocks_from_diff,
+)
+from ansible.plugins.cliconf import CliconfBase
+
+
+class Cliconf(CliconfBase):
+ def get_device_info(self):
+ device_info = {}
+
+ device_info["network_os"] = "iosxr"
+ reply = self.get("show version | utility head -n 20")
+ data = to_text(reply, errors="surrogate_or_strict").strip()
+
+ match = re.search(r"Version (\S+)$", data, re.M)
+ if match:
+ device_info["network_os_version"] = match.group(1)
+
+ match = re.search(r'image file is "(.+)"', data)
+ if match:
+ device_info["network_os_image"] = match.group(1)
+
+ model_search_strs = [
+ r"^[Cc]isco (.+) \(revision",
+ r"^[Cc]isco (\S+ \S+).+bytes of .*memory",
+ ]
+ for item in model_search_strs:
+ match = re.search(item, data, re.M)
+ if match:
+ device_info["network_os_model"] = match.group(1)
+ break
+
+ match = re.search(r"^(.+) uptime", data, re.M)
+ if match:
+ device_info["network_os_hostname"] = match.group(1)
+
+ return device_info
+
+ def configure(self, admin=False, exclusive=False):
+ prompt = to_text(
+ self._connection.get_prompt(), errors="surrogate_or_strict"
+ ).strip()
+ if not prompt.endswith(")#"):
+ if admin and "admin-" not in prompt:
+ self.send_command("admin")
+ if exclusive:
+ self.send_command("configure exclusive")
+ return
+ self.send_command("configure terminal")
+
+ def abort(self, admin=False):
+ prompt = to_text(
+ self._connection.get_prompt(), errors="surrogate_or_strict"
+ ).strip()
+ if prompt.endswith(")#"):
+ self.send_command("abort")
+ if admin and "admin-" in prompt:
+ self.send_command("exit")
+
+ def get_config(self, source="running", format="text", flags=None):
+ if source not in ["running"]:
+ raise ValueError(
+ "fetching configuration from %s is not supported" % source
+ )
+
+ lookup = {"running": "running-config"}
+
+ cmd = "show {0} ".format(lookup[source])
+ cmd += " ".join(to_list(flags))
+ cmd = cmd.strip()
+
+ return self.send_command(cmd)
+
+ def edit_config(
+ self,
+ candidate=None,
+ commit=True,
+ admin=False,
+ exclusive=False,
+ replace=None,
+ comment=None,
+ label=None,
+ ):
+ operations = self.get_device_operations()
+ self.check_edit_config_capability(
+ operations, candidate, commit, replace, comment
+ )
+
+ resp = {}
+ results = []
+ requests = []
+
+ self.configure(admin=admin, exclusive=exclusive)
+
+ if replace:
+ candidate = "load {0}".format(replace)
+
+ for line in to_list(candidate):
+ if not isinstance(line, Mapping):
+ line = {"command": line}
+ cmd = line["command"]
+ results.append(self.send_command(**line))
+ requests.append(cmd)
+
+ # Before any commit happend, we can get a real configuration
+ # diff from the device and make it available by the iosxr_config module.
+ # This information can be usefull either in check mode or normal mode.
+ resp["show_commit_config_diff"] = self.get("show commit changes diff")
+
+ if commit:
+ self.commit(comment=comment, label=label, replace=replace)
+ else:
+ self.discard_changes()
+
+ self.abort(admin=admin)
+
+ resp["request"] = requests
+ resp["response"] = results
+ return resp
+
+ def get_diff(
+ self,
+ candidate=None,
+ running=None,
+ diff_match="line",
+ diff_ignore_lines=None,
+ path=None,
+ diff_replace="line",
+ ):
+ diff = {}
+ device_operations = self.get_device_operations()
+ option_values = self.get_option_values()
+
+ if candidate is None and device_operations["supports_generate_diff"]:
+ raise ValueError(
+ "candidate configuration is required to generate diff"
+ )
+
+ if diff_match not in option_values["diff_match"]:
+ raise ValueError(
+ "'match' value %s in invalid, valid values are %s"
+ % (diff_match, ", ".join(option_values["diff_match"]))
+ )
+
+ if diff_replace not in option_values["diff_replace"]:
+ raise ValueError(
+ "'replace' value %s in invalid, valid values are %s"
+ % (diff_replace, ", ".join(option_values["diff_replace"]))
+ )
+
+ # prepare candidate configuration
+ sanitized_candidate = sanitize_config(candidate)
+ candidate_obj = NetworkConfig(indent=1, comment_tokens=["!"])
+ candidate_obj.load(sanitized_candidate)
+
+ if running and diff_match != "none":
+ # running configuration
+ running = mask_config_blocks_from_diff(
+ running, candidate, "ansible"
+ )
+ running = sanitize_config(running)
+
+ running_obj = NetworkConfig(
+ indent=1,
+ contents=running,
+ ignore_lines=diff_ignore_lines,
+ comment_tokens=["!"],
+ )
+ configdiffobjs = candidate_obj.difference(
+ running_obj, path=path, match=diff_match, replace=diff_replace
+ )
+
+ else:
+ configdiffobjs = candidate_obj.items
+
+ diff["config_diff"] = (
+ dumps(configdiffobjs, "commands") if configdiffobjs else ""
+ )
+ return diff
+
+ def get(
+ self,
+ command=None,
+ prompt=None,
+ answer=None,
+ sendonly=False,
+ newline=True,
+ output=None,
+ check_all=False,
+ ):
+ if output:
+ raise ValueError(
+ "'output' value %s is not supported for get" % output
+ )
+ return self.send_command(
+ command=command,
+ prompt=prompt,
+ answer=answer,
+ sendonly=sendonly,
+ newline=newline,
+ check_all=check_all,
+ )
+
+ def commit(self, comment=None, label=None, replace=None):
+ cmd_obj = {}
+ if replace:
+ cmd_obj["command"] = "commit replace"
+ cmd_obj[
+ "prompt"
+ ] = "This commit will replace or remove the entire running configuration"
+ cmd_obj["answer"] = "yes"
+ else:
+ if comment and label:
+ cmd_obj["command"] = "commit label {0} comment {1}".format(
+ label, comment
+ )
+ elif comment:
+ cmd_obj["command"] = "commit comment {0}".format(comment)
+ elif label:
+ cmd_obj["command"] = "commit label {0}".format(label)
+ else:
+ cmd_obj["command"] = "commit show-error"
+ # In some cases even a normal commit, i.e., !replace,
+ # throws a prompt and we need to handle it before
+ # proceeding further
+ cmd_obj["prompt"] = "(C|c)onfirm"
+ cmd_obj["answer"] = "y"
+
+ self.send_command(**cmd_obj)
+
+ def run_commands(self, commands=None, check_rc=True):
+ if commands is None:
+ raise ValueError("'commands' value is required")
+ responses = list()
+ for cmd in to_list(commands):
+ if not isinstance(cmd, Mapping):
+ cmd = {"command": cmd}
+
+ output = cmd.pop("output", None)
+ if output:
+ raise ValueError(
+ "'output' value %s is not supported for run_commands"
+ % output
+ )
+
+ try:
+ out = self.send_command(**cmd)
+ except AnsibleConnectionFailure as e:
+ if check_rc:
+ raise
+ out = getattr(e, "err", e)
+
+ if out is not None:
+ try:
+ out = to_text(out, errors="surrogate_or_strict").strip()
+ except UnicodeError:
+ raise ConnectionError(
+ message=u"Failed to decode output from %s: %s"
+ % (cmd, to_text(out))
+ )
+
+ try:
+ out = json.loads(out)
+ except ValueError:
+ pass
+
+ responses.append(out)
+ return responses
+
+ def discard_changes(self):
+ self.send_command("abort")
+
+ def get_device_operations(self):
+ return {
+ "supports_diff_replace": True,
+ "supports_commit": True,
+ "supports_rollback": False,
+ "supports_defaults": False,
+ "supports_onbox_diff": False,
+ "supports_commit_comment": True,
+ "supports_multiline_delimiter": False,
+ "supports_diff_match": True,
+ "supports_diff_ignore_lines": True,
+ "supports_generate_diff": True,
+ "supports_replace": True,
+ "supports_admin": True,
+ "supports_commit_label": True,
+ }
+
+ def get_option_values(self):
+ return {
+ "format": ["text"],
+ "diff_match": ["line", "strict", "exact", "none"],
+ "diff_replace": ["line", "block", "config"],
+ "output": [],
+ }
+
+ def get_capabilities(self):
+ result = super(Cliconf, self).get_capabilities()
+ result["rpc"] += [
+ "commit",
+ "discard_changes",
+ "get_diff",
+ "configure",
+ "exit",
+ ]
+ result["device_operations"] = self.get_device_operations()
+ result.update(self.get_option_values())
+ return json.dumps(result)
+
+ def set_cli_prompt_context(self):
+ """
+ Make sure we are in the operational cli mode
+ :return: None
+ """
+ if self._connection.connected:
+ self._update_cli_prompt_context(
+ config_context=")#", exit_command="abort"
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/doc_fragments/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/doc_fragments/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/doc_fragments/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/doc_fragments/iosxr.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/doc_fragments/iosxr.py
new file mode 100644
index 00000000..9e552ded
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/doc_fragments/iosxr.py
@@ -0,0 +1,73 @@
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+class ModuleDocFragment(object):
+
+ # Standard files documentation fragment
+ DOCUMENTATION = r"""options:
+ provider:
+ description:
+ - B(Deprecated)
+ - 'Starting with Ansible 2.5 we recommend using C(connection: network_cli).'
+ - For more information please see the L(Network Guide, ../network/getting_started/network_differences.html#multiple-communication-protocols).
+ - HORIZONTALLINE
+ - A dict object containing connection details.
+ type: dict
+ suboptions:
+ host:
+ description:
+ - Specifies the DNS host name or address for connecting to the remote device
+ over the specified transport. The value of host is used as the destination
+ address for the transport.
+ type: str
+ port:
+ description:
+ - Specifies the port to use when building the connection to the remote device.
+ type: int
+ username:
+ description:
+ - Configures the username to use to authenticate the connection to the remote
+ device. This value is used to authenticate the SSH session. If the value
+ is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME)
+ will be used instead.
+ type: str
+ password:
+ description:
+ - Specifies the password to use to authenticate the connection to the remote
+ device. This value is used to authenticate the SSH session. If the value
+ is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD)
+ will be used instead.
+ type: str
+ timeout:
+ description:
+ - Specifies the timeout in seconds for communicating with the network device
+ for either connecting or sending commands. If the timeout is exceeded before
+ the operation is completed, the module will error.
+ type: int
+ ssh_keyfile:
+ description:
+ - Specifies the SSH key to use to authenticate the connection to the remote
+ device. This value is the path to the key used to authenticate the SSH
+ session. If the value is not specified in the task, the value of environment
+ variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
+ type: path
+ transport:
+ description:
+ - Specifies the type of connection based transport.
+ type: str
+ default: cli
+ choices:
+ - cli
+ - netconf
+notes:
+- For more information on using Ansible to manage network devices see the :ref:`Ansible
+ Network Guide <network_guide>`
+- For more information on using Ansible to manage Cisco devices see the `Cisco integration
+ page <https://www.ansible.com/integrations/networks/cisco>`_.
+"""
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/filter/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/filter/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/filter/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acl_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acl_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acl_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acl_interfaces/acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acl_interfaces/acl_interfaces.py
new file mode 100644
index 00000000..9e847a16
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acl_interfaces/acl_interfaces.py
@@ -0,0 +1,85 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the iosxr_acl_interfaces module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Acl_interfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the iosxr_acl_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "elements": "dict",
+ "options": {
+ "access_groups": {
+ "elements": "dict",
+ "options": {
+ "acls": {
+ "elements": "dict",
+ "options": {
+ "direction": {
+ "choices": ["in", "out"],
+ "type": "str",
+ "required": True,
+ },
+ "name": {"type": "str", "required": True},
+ },
+ "type": "list",
+ },
+ "afi": {
+ "choices": ["ipv4", "ipv6"],
+ "type": "str",
+ "required": True,
+ },
+ },
+ "type": "list",
+ },
+ "name": {"type": "str", "required": True},
+ },
+ "type": "list",
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "parsed",
+ "rendered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acls/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acls/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acls/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acls/acls.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acls/acls.py
new file mode 100644
index 00000000..0b3a7afc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/acls/acls.py
@@ -0,0 +1,538 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the iosxr_acls module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class AclsArgs(object): # pylint: disable=R0903
+ """The arg spec for the iosxr_acls module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "elements": "dict",
+ "options": {
+ "acls": {
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "aces": {
+ "elements": "dict",
+ "mutually_exclusive": [
+ ["grant", "remark", "line"]
+ ],
+ "options": {
+ "destination": {
+ "mutually_exclusive": [
+ ["address", "any", "host", "prefix"],
+ [
+ "wildcard_bits",
+ "any",
+ "host",
+ "prefix",
+ ],
+ ],
+ "options": {
+ "host": {"type": "str"},
+ "address": {"type": "str"},
+ "any": {"type": "bool"},
+ "prefix": {"type": "str"},
+ "port_protocol": {
+ "mutually_exclusive": [
+ [
+ "eq",
+ "gt",
+ "lt",
+ "neq",
+ "range",
+ ]
+ ],
+ "options": {
+ "eq": {"type": "str"},
+ "gt": {"type": "str"},
+ "lt": {"type": "str"},
+ "neq": {"type": "str"},
+ "range": {
+ "options": {
+ "end": {"type": "str"},
+ "start": {
+ "type": "str"
+ },
+ },
+ "required_together": [
+ ["start", "end"]
+ ],
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "wildcard_bits": {"type": "str"},
+ },
+ "required_together": [
+ ["address", "wildcard_bits"]
+ ],
+ "type": "dict",
+ },
+ "dscp": {
+ "mutually_exclusive": [
+ ["eq", "gt", "lt", "neq", "range"]
+ ],
+ "type": "dict",
+ "options": {
+ "eq": {"type": "str"},
+ "gt": {"type": "str"},
+ "lt": {"type": "str"},
+ "neq": {"type": "str"},
+ "range": {
+ "options": {
+ "end": {"type": "str"},
+ "start": {"type": "str"},
+ },
+ "required_together": [
+ ["start", "end"]
+ ],
+ "type": "dict",
+ },
+ },
+ },
+ "fragments": {"type": "bool"},
+ "capture": {"type": "bool"},
+ "destopts": {"type": "bool"},
+ "authen": {"type": "bool"},
+ "routing": {"type": "bool"},
+ "hop_by_hop": {"type": "bool"},
+ "grant": {
+ "type": "str",
+ "choices": ["permit", "deny"],
+ },
+ "icmp_off": {"type": "bool"},
+ "log": {"type": "bool"},
+ "log_input": {"type": "bool"},
+ "line": {"type": "str", "aliases": ["ace"]},
+ "packet_length": {
+ "mutually_exclusive": [
+ ["eq", "lt", "neq", "range"],
+ ["eq", "gt", "neq", "range"],
+ ],
+ "options": {
+ "eq": {"type": "int"},
+ "gt": {"type": "int"},
+ "lt": {"type": "int"},
+ "neq": {"type": "int"},
+ "range": {
+ "options": {
+ "end": {"type": "int"},
+ "start": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "precedence": {"type": "str"},
+ "protocol": {"type": "str"},
+ "protocol_options": {
+ "mutually_exclusive": [
+ ["icmp", "tcp", "igmp", "icmpv6"]
+ ],
+ "options": {
+ "icmpv6": {
+ "type": "dict",
+ "options": {
+ "address_unreachable": {
+ "type": "bool"
+ },
+ "administratively_prohibited": {
+ "type": "bool"
+ },
+ "beyond_scope_of_source_address": {
+ "type": "bool"
+ },
+ "destination_unreachable": {
+ "type": "bool"
+ },
+ "echo": {"type": "bool"},
+ "echo_reply": {"type": "bool"},
+ "erroneous_header_field": {
+ "type": "bool"
+ },
+ "group_membership_query": {
+ "type": "bool"
+ },
+ "group_membership_report": {
+ "type": "bool"
+ },
+ "group_membership_termination": {
+ "type": "bool"
+ },
+ "host_unreachable": {
+ "type": "bool"
+ },
+ "nd_na": {"type": "bool"},
+ "nd_ns": {"type": "bool"},
+ "neighbor_redirect": {
+ "type": "bool"
+ },
+ "no_route_to_destination": {
+ "type": "bool"
+ },
+ "node_information_request_is_refused": {
+ "type": "bool"
+ },
+ "node_information_successful_reply": {
+ "type": "bool"
+ },
+ "packet_too_big": {
+ "type": "bool"
+ },
+ "parameter_problem": {
+ "type": "bool"
+ },
+ "port_unreachable": {
+ "type": "bool"
+ },
+ "query_subject_is_IPv4address": {
+ "type": "bool"
+ },
+ "query_subject_is_IPv6address": {
+ "type": "bool"
+ },
+ "query_subject_is_domainname": {
+ "type": "bool"
+ },
+ "reassembly_timeout": {
+ "type": "bool"
+ },
+ "redirect": {"type": "bool"},
+ "router_advertisement": {
+ "type": "bool"
+ },
+ "router_renumbering": {
+ "type": "bool"
+ },
+ "router_solicitation": {
+ "type": "bool"
+ },
+ "rr_command": {"type": "bool"},
+ "rr_result": {"type": "bool"},
+ "rr_seqnum_reset": {
+ "type": "bool"
+ },
+ "time_exceeded": {
+ "type": "bool"
+ },
+ "ttl_exceeded": {
+ "type": "bool"
+ },
+ "unknown_query_type": {
+ "type": "bool"
+ },
+ "unreachable": {
+ "type": "bool"
+ },
+ "unrecognized_next_header": {
+ "type": "bool"
+ },
+ "unrecognized_option": {
+ "type": "bool"
+ },
+ "whoareyou_reply": {
+ "type": "bool"
+ },
+ "whoareyou_request": {
+ "type": "bool"
+ },
+ },
+ },
+ "icmp": {
+ "options": {
+ "administratively_prohibited": {
+ "type": "bool"
+ },
+ "alternate_address": {
+ "type": "bool"
+ },
+ "conversion_error": {
+ "type": "bool"
+ },
+ "dod_host_prohibited": {
+ "type": "bool"
+ },
+ "dod_net_prohibited": {
+ "type": "bool"
+ },
+ "echo": {"type": "bool"},
+ "echo_reply": {"type": "bool"},
+ "general_parameter_problem": {
+ "type": "bool"
+ },
+ "host_isolated": {
+ "type": "bool"
+ },
+ "host_precedence_unreachable": {
+ "type": "bool"
+ },
+ "host_redirect": {
+ "type": "bool"
+ },
+ "host_tos_redirect": {
+ "type": "bool"
+ },
+ "host_tos_unreachable": {
+ "type": "bool"
+ },
+ "host_unknown": {
+ "type": "bool"
+ },
+ "host_unreachable": {
+ "type": "bool"
+ },
+ "information_reply": {
+ "type": "bool"
+ },
+ "information_request": {
+ "type": "bool"
+ },
+ "mask_reply": {"type": "bool"},
+ "mask_request": {
+ "type": "bool"
+ },
+ "mobile_redirect": {
+ "type": "bool"
+ },
+ "net_redirect": {
+ "type": "bool"
+ },
+ "net_tos_redirect": {
+ "type": "bool"
+ },
+ "net_tos_unreachable": {
+ "type": "bool"
+ },
+ "net_unreachable": {
+ "type": "bool"
+ },
+ "network_unknown": {
+ "type": "bool"
+ },
+ "no_room_for_option": {
+ "type": "bool"
+ },
+ "option_missing": {
+ "type": "bool"
+ },
+ "packet_too_big": {
+ "type": "bool"
+ },
+ "parameter_problem": {
+ "type": "bool"
+ },
+ "port_unreachable": {
+ "type": "bool"
+ },
+ "precedence_unreachable": {
+ "type": "bool"
+ },
+ "protocol_unreachable": {
+ "type": "bool"
+ },
+ "reassembly_timeout": {
+ "type": "bool"
+ },
+ "redirect": {"type": "bool"},
+ "router_advertisement": {
+ "type": "bool"
+ },
+ "router_solicitation": {
+ "type": "bool"
+ },
+ "source_quench": {
+ "type": "bool"
+ },
+ "source_route_failed": {
+ "type": "bool"
+ },
+ "time_exceeded": {
+ "type": "bool"
+ },
+ "timestamp_reply": {
+ "type": "bool"
+ },
+ "timestamp_request": {
+ "type": "bool"
+ },
+ "traceroute": {"type": "bool"},
+ "ttl_exceeded": {
+ "type": "bool"
+ },
+ "unreachable": {
+ "type": "bool"
+ },
+ },
+ "type": "dict",
+ },
+ "igmp": {
+ "options": {
+ "dvmrp": {"type": "bool"},
+ "host_query": {"type": "bool"},
+ "host_report": {
+ "type": "bool"
+ },
+ "mtrace": {"type": "bool"},
+ "mtrace_response": {
+ "type": "bool"
+ },
+ "pim": {"type": "bool"},
+ "trace": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "tcp": {
+ "options": {
+ "ack": {"type": "bool"},
+ "established": {
+ "type": "bool"
+ },
+ "fin": {"type": "bool"},
+ "psh": {"type": "bool"},
+ "rst": {"type": "bool"},
+ "syn": {"type": "bool"},
+ "urg": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "remark": {"type": "str"},
+ "sequence": {"type": "int"},
+ "source": {
+ "mutually_exclusive": [
+ ["address", "any", "host", "prefix"],
+ [
+ "wildcard_bits",
+ "any",
+ "host",
+ "prefix",
+ ],
+ ],
+ "options": {
+ "host": {"type": "str"},
+ "address": {"type": "str"},
+ "any": {"type": "bool"},
+ "prefix": {"type": "str"},
+ "port_protocol": {
+ "mutually_exclusive": [
+ [
+ "eq",
+ "gt",
+ "lt",
+ "neq",
+ "range",
+ ]
+ ],
+ "options": {
+ "eq": {"type": "str"},
+ "gt": {"type": "str"},
+ "lt": {"type": "str"},
+ "neq": {"type": "str"},
+ "range": {
+ "options": {
+ "end": {"type": "str"},
+ "start": {
+ "type": "str"
+ },
+ },
+ "required_together": [
+ ["start", "end"]
+ ],
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "wildcard_bits": {"type": "str"},
+ },
+ "required_together": [
+ ["address", "wildcard_bits"]
+ ],
+ "type": "dict",
+ },
+ "ttl": {
+ "mutually_exclusive": [
+ ["eq", "gt", "lt", "neq", "range"]
+ ],
+ "options": {
+ "eq": {"type": "int"},
+ "gt": {"type": "int"},
+ "lt": {"type": "int"},
+ "neq": {"type": "int"},
+ "range": {
+ "options": {
+ "end": {"type": "int"},
+ "start": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "list",
+ },
+ },
+ "type": "list",
+ },
+ "afi": {
+ "choices": ["ipv4", "ipv6"],
+ "required": True,
+ "type": "str",
+ },
+ },
+ "type": "list",
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/facts/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/facts/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/facts/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/facts/facts.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/facts/facts.py
new file mode 100644
index 00000000..af84f8be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/facts/facts.py
@@ -0,0 +1,27 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The arg spec for the iosxr facts module.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class FactsArgs(object): # pylint: disable=R0903
+ """ The arg spec for the iosxr facts module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "gather_subset": dict(
+ default=["!config"], type="list", elements="str"
+ ),
+ "gather_network_resources": dict(type="list", elements="str"),
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/interfaces/interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/interfaces/interfaces.py
new file mode 100644
index 00000000..e119c159
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/interfaces/interfaces.py
@@ -0,0 +1,64 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the ios_interfaces module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class InterfacesArgs(object):
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str", "required": True},
+ "description": {"type": "str"},
+ "enabled": {"default": True, "type": "bool"},
+ "speed": {"type": "int"},
+ "mtu": {"type": "int"},
+ "duplex": {"type": "str", "choices": ["full", "half"]},
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "parsed",
+ "rendered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l2_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l2_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l2_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l2_interfaces/l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l2_interfaces/l2_interfaces.py
new file mode 100644
index 00000000..fbe5e870
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l2_interfaces/l2_interfaces.py
@@ -0,0 +1,85 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the iosxr_l2_interfaces module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class L2_InterfacesArgs(object):
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str", "required": True},
+ "native_vlan": {"type": "int"},
+ "l2transport": {"type": "bool"},
+ "l2protocol": {
+ "elements": "dict",
+ "options": {
+ "cdp": {
+ "type": "str",
+ "choices": ["drop", "forward", "tunnel"],
+ },
+ "pvst": {
+ "type": "str",
+ "choices": ["drop", "forward", "tunnel"],
+ },
+ "stp": {
+ "type": "str",
+ "choices": ["drop", "forward", "tunnel"],
+ },
+ "vtp": {
+ "type": "str",
+ "choices": ["drop", "forward", "tunnel"],
+ },
+ },
+ "type": "list",
+ },
+ "q_vlan": {"type": "list", "elements": "int"},
+ "propagate": {"type": "bool"},
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "parsed",
+ "rendered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l3_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l3_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l3_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l3_interfaces/l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l3_interfaces/l3_interfaces.py
new file mode 100644
index 00000000..2e63dae9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/l3_interfaces/l3_interfaces.py
@@ -0,0 +1,72 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the ios_l3_interfaces module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class L3_InterfacesArgs(object):
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str", "required": True},
+ "ipv4": {
+ "elements": "dict",
+ "type": "list",
+ "options": {
+ "address": {"type": "str"},
+ "secondary": {"type": "bool"},
+ },
+ },
+ "ipv6": {
+ "elements": "dict",
+ "type": "list",
+ "options": {"address": {"type": "str"}},
+ },
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "parsed",
+ "rendered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp/lacp.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp/lacp.py
new file mode 100644
index 00000000..9b09053f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp/lacp.py
@@ -0,0 +1,69 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the iosxr_lacp module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class LacpArgs(object): # pylint: disable=R0903
+ """The arg spec for the iosxr_lacp module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "options": {
+ "system": {
+ "options": {
+ "mac": {
+ "type": "dict",
+ "options": {"address": {"type": "str"}},
+ },
+ "priority": {"type": "int"},
+ },
+ "type": "dict",
+ }
+ },
+ "type": "dict",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "deleted",
+ "parsed",
+ "rendered",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp_interfaces/lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp_interfaces/lacp_interfaces.py
new file mode 100644
index 00000000..8dfab9ff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lacp_interfaces/lacp_interfaces.py
@@ -0,0 +1,77 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the iosxr_lacp_interfaces module
+"""
+
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Lacp_interfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the iosxr_lacp_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "churn_logging": {
+ "choices": ["actor", "partner", "both"],
+ "type": "str",
+ },
+ "collector_max_delay": {"type": "int"},
+ "name": {"type": "str"},
+ "period": {"type": "int"},
+ "switchover_suppress_flaps": {"type": "int"},
+ "system": {
+ "options": {
+ "mac": {"type": "str"},
+ "priority": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "deleted",
+ "overridden",
+ "parsed",
+ "rendered",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lag_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lag_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lag_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lag_interfaces/lag_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lag_interfaces/lag_interfaces.py
new file mode 100644
index 00000000..cf076046
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lag_interfaces/lag_interfaces.py
@@ -0,0 +1,88 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the iosxr_lag_interfaces module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Lag_interfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the iosxr_lag_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "links": {
+ "options": {
+ "max_active": {"type": "int"},
+ "min_active": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "load_balancing_hash": {
+ "choices": ["dst-ip", "src-ip"],
+ "type": "str",
+ },
+ "members": {
+ "elements": "dict",
+ "options": {
+ "member": {"type": "str"},
+ "mode": {
+ "choices": ["on", "active", "passive", "inherit"],
+ "type": "str",
+ },
+ },
+ "type": "list",
+ },
+ "mode": {
+ "choices": ["on", "active", "passive"],
+ "type": "str",
+ },
+ "name": {"required": True, "type": "str"},
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "parsed",
+ "rendered",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_global/lldp_global.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_global/lldp_global.py
new file mode 100644
index 00000000..97efae08
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_global/lldp_global.py
@@ -0,0 +1,73 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the iosxr_lldp_global module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Lldp_globalArgs(object): # pylint: disable=R0903
+ """The arg spec for the iosxr_lldp module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "options": {
+ "holdtime": {"type": "int"},
+ "reinit": {"type": "int"},
+ "subinterfaces": {"type": "bool"},
+ "timer": {"type": "int"},
+ "tlv_select": {
+ "options": {
+ "management_address": {"type": "bool"},
+ "port_description": {"type": "bool"},
+ "system_capabilities": {"type": "bool"},
+ "system_description": {"type": "bool"},
+ "system_name": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "deleted",
+ "parsed",
+ "rendered",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_interfaces/lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_interfaces/lldp_interfaces.py
new file mode 100644
index 00000000..0dca5800
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/lldp_interfaces/lldp_interfaces.py
@@ -0,0 +1,77 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the iosxr_lldp_interfaces module
+"""
+
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Lldp_interfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the iosxr_lldp_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "destination": {
+ "type": "dict",
+ "options": {
+ "mac_address": {
+ "type": "str",
+ "choices": [
+ "ieee-nearest-bridge",
+ "ieee-nearest-non-tmpr-bridge",
+ ],
+ }
+ },
+ },
+ "name": {"type": "str"},
+ "receive": {"type": "bool"},
+ "transmit": {"type": "bool"},
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "deleted",
+ "overridden",
+ "parsed",
+ "rendered",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospf_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospf_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospf_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospf_interfaces/ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospf_interfaces/ospf_interfaces.py
new file mode 100644
index 00000000..8bf33fd0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospf_interfaces/ospf_interfaces.py
@@ -0,0 +1,379 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the
+# cli_rm_builder.
+#
+# Manually editing this file is not advised.
+#
+# To update the argspec make the desired changes
+# in the module docstring and re-run
+# cli_rm_builder.
+#
+#############################################
+
+"""
+The arg spec for the iosxr_ospf_interfaces module
+"""
+
+
+class Ospf_interfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the iosxr_ospf_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str", "required": True},
+ "type": {"type": "str", "required": True},
+ "address_family": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "afi": {
+ "type": "str",
+ "choices": ["ipv4", "ipv6"],
+ "required": True,
+ },
+ "processes": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "process_id": {
+ "type": "str",
+ "required": True,
+ },
+ "area": {
+ "type": "dict",
+ "options": {"area_id": {"type": "str"}},
+ },
+ },
+ },
+ "apply_group_option": {
+ "type": "dict",
+ "options": {
+ "group_name": {"type": "str"},
+ "operation": {
+ "type": "str",
+ "choices": ["add", "remove", "append"],
+ },
+ },
+ },
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "message_digest": {
+ "type": "dict",
+ "options": {"keychain": {"type": "str"}},
+ },
+ "null_auth": {"type": "bool"},
+ },
+ },
+ "authentication_key": {
+ "type": "dict",
+ "options": {
+ "password": {"type": "str"},
+ "clear": {"type": "str"},
+ "encrypted": {"type": "str"},
+ },
+ },
+ "bfd": {
+ "type": "dict",
+ "options": {
+ "fast_detect": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "strict_mode": {"type": "bool"},
+ },
+ },
+ "minimum_interval": {"type": "int"},
+ "multiplier": {"type": "int"},
+ },
+ },
+ "cost": {"type": "int"},
+ "cost_fallback": {
+ "type": "dict",
+ "options": {
+ "cost": {"type": "int"},
+ "threshold": {"type": "int"},
+ },
+ },
+ "database_filter": {
+ "type": "dict",
+ "options": {"all_outgoing_lsa": {"type": "bool"}},
+ },
+ "dead_interval": {"type": "int"},
+ "demand_circuit": {"type": "bool"},
+ "fast_reroute": {
+ "type": "dict",
+ "options": {
+ "disabled": {"type": "bool"},
+ "per_link": {
+ "type": "dict",
+ "options": {
+ "information_type": {
+ "type": "str",
+ "choices": [
+ "exclude",
+ "lfa_candidate",
+ ],
+ },
+ "use_candidate_only": {"type": "bool"},
+ "interface": {
+ "type": "dict",
+ "options": {
+ "bvi": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "int"}
+ },
+ },
+ "bundle_ether": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "int"}
+ },
+ },
+ "pos_int": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "int"}
+ },
+ },
+ "fast_ethernet": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "fiftygige": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "fortygige": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "fourhundredgige": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "gigabitethernet": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "hundredgige": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "mgmteth": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "multilink": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "pw_ether": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "int"}
+ },
+ },
+ "pw_iw": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "int"}
+ },
+ },
+ "srp": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "serial": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "tengige": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "twentyfivegige": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "twohundredgige": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ "nve": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "int"}
+ },
+ },
+ "tunnel_ip": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "int"}
+ },
+ },
+ "tunnel_ipsec": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "int"}
+ },
+ },
+ "tunnel_mte": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "int"}
+ },
+ },
+ "tunnel_mpls": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"}
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "flood_reduction": {"type": "bool"},
+ "hello_interval": {"type": "int"},
+ "link_down_fast_detect": {"type": "bool"},
+ "message_digest_key": {
+ "type": "dict",
+ "options": {
+ "id": {"type": "int", "required": True},
+ "md5": {
+ "type": "dict",
+ "required": True,
+ "options": {
+ "password": {"type": "str"},
+ "clear": {"type": "bool"},
+ "encrypted": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "mpls_ldp_sync": {"type": "bool"},
+ "mtu_ignore": {"type": "bool"},
+ "network": {
+ "type": "str",
+ "choices": [
+ "broadcast",
+ "non-broadcast",
+ "point-to-multipoint",
+ "point-to-point",
+ ],
+ },
+ "neighbors": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "neighbor_id": {"type": "str"},
+ "cost": {"type": "int"},
+ "db_filter_all_out": {"type": "bool"},
+ "poll_interval": {"type": "int"},
+ "priority": {"type": "int"},
+ },
+ },
+ "packet_size": {"type": "int"},
+ "passive": {"type": "bool"},
+ "prefix_suppression": {"type": "bool"},
+ "priority": {"type": "int"},
+ "retransmit_interval": {"type": "int"},
+ "security_ttl": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "hops": {"type": "int"},
+ },
+ },
+ "transmit_delay": {"type": "int"},
+ },
+ },
+ },
+ },
+ "state": {
+ "type": "str",
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "parsed",
+ "rendered",
+ ],
+ "default": "merged",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv2/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv2/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv2/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv2/ospfv2.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv2/ospfv2.py
new file mode 100644
index 00000000..fb41a1e3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv2/ospfv2.py
@@ -0,0 +1,795 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the iosxr_ospfv2 module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Ospfv2Args(object): # pylint: disable=R0903
+ """The arg spec for the iosxr_ospfv2 module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "options": {
+ "processes": {
+ "elements": "dict",
+ "options": {
+ "address_family_unicast": {"type": "bool"},
+ "adjacency_stagger": {
+ "options": {
+ "disable": {"type": "bool"},
+ "max_adjacency": {"type": "int"},
+ "min_adjacency": {"type": "int"},
+ },
+ "required_together": [
+ ["min_adjacency", "max_adjacency"]
+ ],
+ "type": "dict",
+ },
+ "apply_weight": {
+ "mutually_exclusive": [
+ ["bandwidth", "default_weight"]
+ ],
+ "options": {
+ "bandwidth": {"type": "int"},
+ "default_weight": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "areas": {
+ "elements": "dict",
+ "options": {
+ "area_id": {"required": True, "type": "str"},
+ "authentication": {
+ "mutually_exclusive": [
+ [
+ "keychain",
+ "message_digest",
+ "no_auth",
+ ]
+ ],
+ "options": {
+ "keychain": {"type": "str"},
+ "message_digest": {
+ "options": {
+ "keychain": {"type": "str"}
+ },
+ "type": "dict",
+ },
+ "no_auth": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "authentication_key": {
+ "mutually_exclusive": [
+ ["clear", "encrypted"]
+ ],
+ "options": {
+ "clear": {"type": "str"},
+ "encrypted": {"type": "str"},
+ "password": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ "bfd": {
+ "options": {
+ "fast_detect": {
+ "options": {
+ "set": {"type": "bool"},
+ "strict_mode": {
+ "type": "bool"
+ },
+ },
+ "type": "dict",
+ },
+ "minimum_interval": {"type": "int"},
+ "multiplier": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "cost": {"type": "int"},
+ "dead_interval": {"type": "int"},
+ "default_cost": {"type": "int"},
+ "hello_interval": {"type": "int"},
+ "mpls": {
+ "options": {
+ "ldp": {
+ "options": {
+ "auto_config": {
+ "type": "bool"
+ },
+ "sync": {"type": "bool"},
+ "sync_igp_shortcuts": {
+ "type": "bool"
+ },
+ },
+ "type": "dict",
+ },
+ "traffic_eng": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "mtu_ignore": {
+ "choices": ["enable", "disable"],
+ "type": "str",
+ },
+ "nssa": {
+ "options": {
+ "default_information_originate": {
+ "options": {
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "no_redistribution": {"type": "bool"},
+ "no_summary": {"type": "bool"},
+ "set": {"type": "bool"},
+ "translate": {
+ "options": {
+ "type7": {
+ "options": {
+ "always": {
+ "type": "bool"
+ }
+ },
+ "type": "dict",
+ }
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "ranges": {
+ "elements": "dict",
+ "mutually_exclusive": [
+ ["advertise", "not_advertise"]
+ ],
+ "options": {
+ "address": {
+ "required": True,
+ "type": "str",
+ },
+ "advertise": {"type": "bool"},
+ "not_advertise": {"type": "bool"},
+ },
+ "type": "list",
+ },
+ "route_policy": {
+ "elements": "dict",
+ "options": {
+ "direction": {
+ "choices": ["in", "out"],
+ "type": "str",
+ },
+ "parameters": {
+ "elements": "str",
+ "type": "list",
+ },
+ },
+ "type": "list",
+ },
+ "stub": {
+ "options": {
+ "no_summary": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "transmit_delay": {"type": "int"},
+ "virtual_link": {
+ "elements": "dict",
+ "options": {
+ "authentication": {
+ "mutually_exclusive": [
+ [
+ "keychain",
+ "message_digest",
+ "no_auth",
+ ]
+ ],
+ "options": {
+ "keychain": {"type": "str"},
+ "message_digest": {
+ "options": {
+ "keychain": {
+ "type": "str"
+ }
+ },
+ "type": "dict",
+ },
+ "no_auth": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "authentication_key": {
+ "mutually_exclusive": [
+ ["clear", "encrypted"]
+ ],
+ "options": {
+ "clear": {"type": "str"},
+ "encrypted": {"type": "str"},
+ "password": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ "dead_interval": {"type": "int"},
+ "hello_interval": {"type": "int"},
+ "id": {
+ "required": True,
+ "type": "str",
+ },
+ "message_digest_key": {
+ "options": {
+ "id": {
+ "required": True,
+ "type": "int",
+ },
+ "md5": {
+ "mutually_exclusive": [
+ ["clear", "encrypted"]
+ ],
+ "options": {
+ "clear": {
+ "type": "bool"
+ },
+ "encrypted": {
+ "type": "bool"
+ },
+ "password": {
+ "type": "str"
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "retransmit_interval": {"type": "int"},
+ "transmit_delay": {"type": "int"},
+ },
+ "type": "list",
+ },
+ },
+ "type": "list",
+ },
+ "authentication": {
+ "mutually_exclusive": [
+ ["keychain", "message_digest", "no_auth"]
+ ],
+ "options": {
+ "keychain": {"type": "str"},
+ "message_digest": {
+ "options": {
+ "keychain": {"type": "str"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "no_auth": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "authentication_key": {
+ "mutually_exclusive": [["clear", "encrypted"]],
+ "options": {
+ "clear": {"type": "bool"},
+ "encrypted": {"type": "bool"},
+ "password": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ "auto_cost": {
+ "mutually_exclusive": [
+ ["reference_bandwidth", "disable"]
+ ],
+ "options": {
+ "disable": {"type": "bool"},
+ "reference_bandwidth": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "bfd": {
+ "options": {
+ "fast_detect": {
+ "options": {
+ "set": {"type": "bool"},
+ "strict_mode": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "minimum_interval": {"type": "int"},
+ "multiplier": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "capability": {
+ "options": {
+ "opaque": {
+ "mutually_exclusive": [["set", "disable"]],
+ "options": {
+ "disable": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "type7": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ "cost": {"type": "int"},
+ "database_filter": {
+ "choices": ["enable", "disable"],
+ "type": "str",
+ },
+ "dead_interval": {"type": "int"},
+ "default_information_originate": {
+ "options": {
+ "always": {"type": "bool"},
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "route_policy": {"type": "str"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "default_metric": {"type": "int"},
+ "demand_circuit": {
+ "choices": ["enable", "disable"],
+ "type": "str",
+ },
+ "distance": {
+ "options": {
+ "admin_distance": {
+ "elements": "dict",
+ "options": {
+ "access_list": {"type": "str"},
+ "source": {"type": "str"},
+ "value": {"type": "int"},
+ "wildcard": {"type": "str"},
+ },
+ "required_together": [
+ ["value", "source", "wildcard"]
+ ],
+ "type": "list",
+ },
+ "ospf_distance": {
+ "options": {
+ "external": {"type": "int"},
+ "inter_area": {"type": "int"},
+ "intra_area": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "distribute_bgp_ls": {
+ "options": {
+ "instance_id": {"type": "int"},
+ "throttle": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "distribute_link_state": {
+ "options": {
+ "instance_id": {"type": "int"},
+ "throttle": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "distribute_list": {
+ "elements": "dict",
+ "mutually_exclusive": [
+ ["access_list", "route_policy"]
+ ],
+ "options": {
+ "access_list": {"type": "str"},
+ "direction": {
+ "choices": ["in", "out"],
+ "type": "str",
+ },
+ "outgoing_params": {
+ "options": {
+ "id": {"type": "str"},
+ "route_type": {
+ "choices": [
+ "bgp",
+ "connected",
+ "dagr",
+ "ospf",
+ "static",
+ ],
+ "type": "str",
+ },
+ },
+ "type": "dict",
+ },
+ "route_policy": {"type": "str"},
+ },
+ "type": "list",
+ },
+ "external_out": {
+ "choices": ["enable", "disable"],
+ "type": "str",
+ },
+ "flood_reduction": {
+ "choices": ["enable", "disable"],
+ "type": "str",
+ },
+ "hello_interval": {"type": "int"},
+ "ignore_lsa_mospf": {"type": "bool"},
+ "link_down_fast_detect": {"type": "bool"},
+ "log_adjacency_changes": {
+ "options": {
+ "detail": {"type": "bool"},
+ "disable": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "loopback_stub_network": {
+ "choices": ["enable", "disable"],
+ "type": "str",
+ },
+ "max_lsa": {
+ "options": {
+ "ignore_count": {"type": "int"},
+ "ignore_time": {"type": "int"},
+ "reset_time": {"type": "int"},
+ "threshold": {"type": "int"},
+ "warning_only": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "max_metric": {
+ "options": {
+ "router_lsa": {
+ "options": {
+ "external_lsa": {
+ "options": {
+ "max_metric_value": {
+ "type": "int"
+ },
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "include_stub": {"type": "bool"},
+ "on_startup": {
+ "options": {
+ "set": {"type": "bool"},
+ "wait_for_bgp_asn": {
+ "type": "int"
+ },
+ "wait_period": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "set": {"type": "bool"},
+ "summary_lsa": {
+ "options": {
+ "max_metric_value": {
+ "type": "int"
+ },
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ }
+ },
+ "type": "dict",
+ },
+ "message_digest_key": {
+ "options": {
+ "id": {"required": True, "type": "int"},
+ "md5": {
+ "mutually_exclusive": [
+ ["clear", "encrypted"]
+ ],
+ "options": {
+ "clear": {"type": "bool"},
+ "encrypted": {"type": "bool"},
+ "password": {"type": "str"},
+ },
+ "required": True,
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "microloop_avoidance": {
+ "mutually_exclusive": [
+ [
+ "protected",
+ "rib_update_delay",
+ "segment_routing",
+ ]
+ ],
+ "options": {
+ "protected": {"type": "bool"},
+ "rib_update_delay": {"type": "int"},
+ "segment_routing": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "monitor_convergence": {
+ "options": {
+ "prefix_list": {"type": "str"},
+ "track_external_routes": {"type": "bool"},
+ "track_ip_frr": {"type": "bool"},
+ "track_summary_routes": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "mpls": {
+ "options": {
+ "ldp": {
+ "options": {
+ "auto_config": {"type": "bool"},
+ "sync": {"type": "bool"},
+ "sync_igp_shortcuts": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "traffic_eng": {
+ "options": {
+ "autoroute_exclude": {
+ "options": {
+ "parameters": {
+ "elements": "str",
+ "type": "list",
+ },
+ "route_policy": {
+ "type": "str"
+ },
+ },
+ "type": "dict",
+ },
+ "igp_intact": {"type": "bool"},
+ "ldp_sync_update": {"type": "bool"},
+ "multicast_intact": {"type": "bool"},
+ "router_id": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "mtu_ignore": {
+ "choices": ["enable", "disable"],
+ "type": "str",
+ },
+ "network": {
+ "options": {
+ "broadcast": {"type": "bool"},
+ "non_broadcast": {"type": "bool"},
+ "point_to_multipoint": {"type": "bool"},
+ "point_to_point": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "nsf": {
+ "options": {
+ "cisco": {
+ "options": {
+ "enforce_global": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "flush_delay_time": {"type": "int"},
+ "ietf": {
+ "options": {
+ "helper_disable": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "interval": {"type": "int"},
+ "lifetime": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "nsr": {"type": "bool"},
+ "packet_size": {"type": "int"},
+ "passive": {
+ "choices": ["enable", "disable"],
+ "type": "str",
+ },
+ "prefix_suppression": {
+ "options": {
+ "secondary_address": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "priority": {"type": "int"},
+ "process_id": {"required": True, "type": "str"},
+ "protocol_shutdown": {
+ "options": {
+ "host_mode": {"type": "bool"},
+ "limit": {
+ "options": {
+ "high": {"type": "int"},
+ "low": {"type": "int"},
+ "medium": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "on_reload": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "redistribute": {
+ "options": {
+ "id": {"type": "str"},
+ "level": {
+ "choices": [1, 2, 12],
+ "type": "int",
+ },
+ "lsa_type_summary": {"type": "bool"},
+ "match": {"type": "str"},
+ "metric": {"type": "int"},
+ "metric_type": {
+ "choices": [1, 2],
+ "type": "int",
+ },
+ "nssa_only": {"type": "bool"},
+ "preserve_med": {"type": "bool"},
+ "route_policy": {
+ "options": {
+ "name": {"type": "str"},
+ "parameters": {
+ "elements": "str",
+ "type": "list",
+ },
+ },
+ "type": "dict",
+ },
+ "route_type": {
+ "choices": [
+ "application",
+ "bgp",
+ "connected",
+ "dagr",
+ "eigrp",
+ "isis",
+ "mobile",
+ "ospf",
+ "rip",
+ "static",
+ "subscriber",
+ ],
+ "type": "str",
+ },
+ "tag": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "retransmit_interval": {"type": "int"},
+ "router_id": {"type": "str"},
+ "security_ttl": {
+ "options": {
+ "hops": {"type": "int"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "summary_in": {
+ "choices": ["enable", "disable"],
+ "type": "str",
+ },
+ "summary_prefix": {
+ "elements": "dict",
+ "options": {
+ "not_advertise": {"type": "bool"},
+ "prefix": {"required": True, "type": "str"},
+ "tag": {"type": "int"},
+ },
+ "type": "list",
+ },
+ "timers": {
+ "options": {
+ "graceful_shutdown": {
+ "options": {
+ "initial_delay": {"type": "int"},
+ "retain_routes": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "lsa": {
+ "options": {
+ "group_pacing": {"type": "int"},
+ "min_arrival": {"type": "int"},
+ "refresh": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "pacing_flood": {"type": "int"},
+ "throttle": {
+ "options": {
+ "fast_reroute": {"type": "int"},
+ "lsa_all": {
+ "options": {
+ "initial_delay": {
+ "type": "int"
+ },
+ "max_delay": {"type": "int"},
+ "min_delay": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "spf": {
+ "options": {
+ "change_delay": {
+ "type": "int"
+ },
+ "max_wait": {"type": "int"},
+ "second_delay": {
+ "type": "int"
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "transmit_delay": {"type": "int"},
+ "weight": {"type": "int"},
+ },
+ "type": "list",
+ }
+ },
+ "type": "dict",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv3/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv3/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv3/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv3/ospfv3.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv3/ospfv3.py
new file mode 100644
index 00000000..e9d82720
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/ospfv3/ospfv3.py
@@ -0,0 +1,1376 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the iosxr_ospfv3 module
+"""
+
+
+class Ospfv3Args(object): # pylint: disable=R0903
+ """The arg spec for the iosxr_ospfv3 module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "type": "dict",
+ "options": {
+ "processes": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "process_id": {"type": "str", "required": True},
+ "address_family_unicast": {"type": "bool"},
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "disable": {"type": "bool", "default": False},
+ "ipsec": {
+ "type": "dict",
+ "options": {
+ "spi": {"type": "int"},
+ "algorithim_type": {
+ "type": "str",
+ "choices": ["md5", "sha1"],
+ },
+ "key": {"type": "str"},
+ "clear_key": {"type": "str"},
+ "password_key": {"type": "str"},
+ },
+ },
+ },
+ },
+ "auto_cost": {
+ "type": "dict",
+ "options": {
+ "reference_bandwidth": {"type": "int"},
+ "disable": {"type": "bool"},
+ },
+ },
+ "bfd": {
+ "type": "dict",
+ "options": {
+ "fast_detect": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "strict_mode": {"type": "bool"},
+ },
+ },
+ "minimum_interval": {"type": "int"},
+ "multiplier": {"type": "int"},
+ },
+ },
+ "areas": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "area_id": {"type": "str", "required": True},
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "disable": {
+ "type": "bool",
+ "default": False,
+ },
+ "ipsec": {
+ "type": "dict",
+ "options": {
+ "spi": {"type": "int"},
+ "algorithim_type": {
+ "type": "str",
+ "choices": ["md5", "sha1"],
+ },
+ "key": {"type": "str"},
+ "clear_key": {"type": "str"},
+ "password_key": {
+ "type": "str"
+ },
+ },
+ },
+ },
+ },
+ "bfd": {
+ "type": "dict",
+ "options": {
+ "fast_detect": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "strict_mode": {
+ "type": "bool"
+ },
+ },
+ },
+ "minimum_interval": {"type": "int"},
+ "multiplier": {"type": "int"},
+ },
+ },
+ "cost": {"type": "int"},
+ "database_filter": {
+ "type": "dict",
+ "options": {
+ "all_outgoing_lsa": {"type": "bool"}
+ },
+ },
+ "dead_interval": {"type": "int"},
+ "default_cost": {"type": "int"},
+ "demand_circuit": {"type": "bool"},
+ "distrinbute_rib_prefix_list_name": {
+ "type": "str"
+ },
+ "fast_reroute": {
+ "type": "dict",
+ "options": {
+ "disabled": {"type": "bool"},
+ "per_link": {
+ "type": "dict",
+ "options": {
+ "information_type": {
+ "type": "str",
+ "choices": [
+ "exclude",
+ "lfa_candidate",
+ ],
+ },
+ "use_candidate_only": {
+ "type": "bool"
+ },
+ "interface": {
+ "type": "dict",
+ "options": {
+ "bvi": {
+ "type": "list",
+ "elements": "int",
+ },
+ "bundle_ether": {
+ "type": "list",
+ "elements": "int",
+ },
+ "pos_int": {
+ "type": "list",
+ "elements": "int",
+ },
+ "fast_ethernet": {
+ "type": "list",
+ "elements": "str",
+ },
+ "fiftygige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "fortygige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "fourhundredgige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "gigabitethernet": {
+ "type": "list",
+ "elements": "str",
+ },
+ "hundredgige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "mgmteth": {
+ "type": "list",
+ "elements": "str",
+ },
+ "multilink": {
+ "type": "list",
+ "elements": "str",
+ },
+ "pw_ether": {
+ "type": "list",
+ "elements": "int",
+ },
+ "pw_iw": {
+ "type": "list",
+ "elements": "int",
+ },
+ "srp": {
+ "type": "list",
+ "elements": "str",
+ },
+ "serial": {
+ "type": "list",
+ "elements": "str",
+ },
+ "tengige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "twentyfivegige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "twohundredgige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "nve": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_ip": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_ipsec": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_mte": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_mpls": {
+ "type": "int"
+ },
+ },
+ },
+ },
+ },
+ "per_prefix": {
+ "type": "dict",
+ "options": {
+ "information_type": {
+ "type": "str",
+ "choices": [
+ "exclude",
+ "lfa_candidate",
+ ],
+ },
+ "use_candidate_only": {
+ "type": "bool"
+ },
+ "interface": {
+ "type": "dict",
+ "options": {
+ "bvi": {
+ "type": "list",
+ "elements": "int",
+ },
+ "bundle_ether": {
+ "type": "list",
+ "elements": "int",
+ },
+ "pos_int": {
+ "type": "list",
+ "elements": "int",
+ },
+ "fast_ethernet": {
+ "type": "list",
+ "elements": "str",
+ },
+ "fiftygige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "fortygige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "fourhundredgige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "gigabitethernet": {
+ "type": "list",
+ "elements": "str",
+ },
+ "hundredgige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "mgmteth": {
+ "type": "list",
+ "elements": "str",
+ },
+ "multilink": {
+ "type": "list",
+ "elements": "str",
+ },
+ "pw_ether": {
+ "type": "list",
+ "elements": "int",
+ },
+ "pw_iw": {
+ "type": "list",
+ "elements": "int",
+ },
+ "srp": {
+ "type": "list",
+ "elements": "str",
+ },
+ "serial": {
+ "type": "list",
+ "elements": "str",
+ },
+ "tengige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "twentyfivegige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "twohundredgige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "nve": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_ip": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_ipsec": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_mte": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_mpls": {
+ "type": "int"
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "flood_reduction": {"type": "bool"},
+ "hello_interval": {"type": "int"},
+ "instance_id": {"type": "int"},
+ "mtu_ignore": {"type": "bool"},
+ "mpls_ldp_sync": {"type": "bool"},
+ "network": {
+ "type": "str",
+ "choices": [
+ "broadcast",
+ "non-broadcast",
+ "point-to-multipoint",
+ "point-to-point",
+ ],
+ },
+ "nssa": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "default_information_originate": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ },
+ },
+ "no_redistribution": {"type": "bool"},
+ "no_summary": {"type": "bool"},
+ "translate": {
+ "type": "dict",
+ "options": {
+ "type7": {
+ "type": "dict",
+ "options": {
+ "always": {
+ "type": "bool",
+ "required": True,
+ }
+ },
+ }
+ },
+ },
+ },
+ },
+ "packet_size": {"type": "int"},
+ "passive": {"type": "bool"},
+ "prefix_suppression": {"type": "bool"},
+ "priority": {"type": "int"},
+ "ranges": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "address": {
+ "type": "str",
+ "required": True,
+ },
+ "cost": {"type": "int"},
+ "advertise": {"type": "bool"},
+ "not_advertise": {"type": "bool"},
+ },
+ },
+ "retransmit_interval": {"type": "int"},
+ "stub": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "no_summary": {"type": "bool"},
+ },
+ },
+ "transmit_delay": {"type": "int"},
+ "virtual_link": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "id": {
+ "type": "str",
+ "required": True,
+ },
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "disable": {
+ "type": "bool",
+ "default": False,
+ },
+ "ipsec": {
+ "type": "dict",
+ "options": {
+ "spi": {"type": "int"},
+ "algorithim_type": {
+ "type": "str",
+ "choices": [
+ "md5",
+ "sha1",
+ ],
+ },
+ "key": {"type": "str"},
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ },
+ },
+ },
+ "dead_interval": {"type": "int"},
+ "hello_interval": {"type": "int"},
+ "retransmit_interval": {"type": "int"},
+ "transmit_delay": {"type": "int"},
+ "encryption": {
+ "type": "dict",
+ "options": {
+ "disable": {
+ "type": "bool",
+ "default": False,
+ },
+ "ipsec": {
+ "type": "dict",
+ "options": {
+ "spi": {"type": "int"},
+ "esp": {
+ "type": "dict",
+ "options": {
+ "triple_des": {
+ "type": "dict",
+ "options": {
+ "key": {
+ "type": "str"
+ },
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ },
+ "aes": {
+ "type": "dict",
+ "options": {
+ "algorithim_type": {
+ "type": "str",
+ "choices": [
+ "192",
+ "256",
+ ],
+ },
+ "key": {
+ "type": "str"
+ },
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ },
+ "des": {
+ "type": "dict",
+ "options": {
+ "key": {
+ "type": "str"
+ },
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ },
+ "null_encryption": {
+ "type": "dict",
+ "options": {
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "algorithim_type": {
+ "type": "str",
+ "choices": [
+ "md5",
+ "sha1",
+ ],
+ },
+ "key": {
+ "type": "str"
+ },
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ }
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "encryption": {
+ "type": "dict",
+ "options": {
+ "disable": {
+ "type": "bool",
+ "default": False,
+ },
+ "ipsec": {
+ "type": "dict",
+ "options": {
+ "spi": {"type": "int"},
+ "esp": {
+ "type": "dict",
+ "options": {
+ "triple_des": {
+ "type": "dict",
+ "options": {
+ "key": {
+ "type": "str"
+ },
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ },
+ "aes": {
+ "type": "dict",
+ "options": {
+ "algorithim_type": {
+ "type": "str",
+ "choices": [
+ "192",
+ "256",
+ ],
+ },
+ "key": {
+ "type": "str"
+ },
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ },
+ "des": {
+ "type": "dict",
+ "options": {
+ "key": {
+ "type": "str"
+ },
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ },
+ "null_encryption": {
+ "type": "dict",
+ "options": {
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "algorithim_type": {
+ "type": "str",
+ "choices": [
+ "md5",
+ "sha1",
+ ],
+ },
+ "key": {
+ "type": "str"
+ },
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ }
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "capability": {
+ "type": "dict",
+ "options": {
+ "type7": {
+ "type": "dict",
+ "options": {
+ "prefer": {"type": "bool"},
+ "translate": {"type": "bool"},
+ },
+ }
+ },
+ },
+ "cost": {"type": "int"},
+ "database_filter": {
+ "type": "dict",
+ "options": {"all_outgoing_lsa": {"type": "bool"}},
+ },
+ "dead_interval": {"type": "int"},
+ "default_information_originate": {
+ "type": "dict",
+ "options": {
+ "always": {"type": "bool"},
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "route_policy": {"type": "str"},
+ "tag": {"type": "int"},
+ "set": {"type": "bool"},
+ },
+ },
+ "default_metric": {"type": "int"},
+ "demand_circuit": {"type": "bool"},
+ "distance": {
+ "type": "dict",
+ "options": {
+ "admin_distance": {"type": "int"},
+ "ospfv3_distance": {
+ "type": "dict",
+ "options": {
+ "external": {"type": "int"},
+ "inter_area": {"type": "int"},
+ "intra_area": {"type": "int"},
+ },
+ },
+ },
+ },
+ "distribute_list": {
+ "type": "dict",
+ "options": {
+ "prefix_list": {
+ "type": "list",
+ "elements": "str",
+ "options": {
+ "name": {"type": "str"},
+ "in": {"type": "bool"},
+ "out": {"type": "bool"},
+ },
+ }
+ },
+ },
+ "encryption": {
+ "type": "dict",
+ "options": {
+ "disable": {"type": "bool", "default": False},
+ "ipsec": {
+ "type": "dict",
+ "options": {
+ "spi": {"type": "int"},
+ "esp": {
+ "type": "dict",
+ "options": {
+ "triple_des": {
+ "type": "dict",
+ "options": {
+ "key": {"type": "str"},
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ },
+ "aes": {
+ "type": "dict",
+ "options": {
+ "algorithim_type": {
+ "type": "str",
+ "choices": [
+ "192",
+ "256",
+ ],
+ },
+ "key": {"type": "str"},
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ },
+ "des": {
+ "type": "dict",
+ "options": {
+ "key": {"type": "str"},
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ },
+ "null_encryption": {
+ "type": "dict",
+ "options": {
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "algorithim_type": {
+ "type": "str",
+ "choices": [
+ "md5",
+ "sha1",
+ ],
+ },
+ "key": {
+ "type": "str"
+ },
+ "clear_key": {
+ "type": "str"
+ },
+ "password_key": {
+ "type": "str"
+ },
+ },
+ }
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ "fast_reroute": {
+ "type": "dict",
+ "options": {
+ "disabled": {"type": "bool"},
+ "per_link": {
+ "type": "dict",
+ "options": {
+ "information_type": {
+ "type": "str",
+ "choices": [
+ "exclude",
+ "lfa_candidate",
+ ],
+ },
+ "use_candidate_only": {"type": "bool"},
+ "interface": {
+ "type": "dict",
+ "options": {
+ "bvi": {
+ "type": "list",
+ "elements": "int",
+ },
+ "bundle_ether": {
+ "type": "list",
+ "elements": "int",
+ },
+ "pos_int": {
+ "type": "list",
+ "elements": "int",
+ },
+ "fast_ethernet": {
+ "type": "list",
+ "elements": "str",
+ },
+ "fiftygige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "fortygige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "fourhundredgige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "gigabitethernet": {
+ "type": "list",
+ "elements": "str",
+ },
+ "hundredgige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "mgmteth": {
+ "type": "list",
+ "elements": "str",
+ },
+ "multilink": {
+ "type": "list",
+ "elements": "str",
+ },
+ "pw_ether": {
+ "type": "list",
+ "elements": "int",
+ },
+ "pw_iw": {
+ "type": "list",
+ "elements": "int",
+ },
+ "srp": {
+ "type": "list",
+ "elements": "str",
+ },
+ "serial": {
+ "type": "list",
+ "elements": "str",
+ },
+ "tengige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "twentyfivegige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "twohundredgige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "nve": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_ip": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_ipsec": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_mte": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_mpls": {"type": "int"},
+ },
+ },
+ },
+ },
+ "per_prefix": {
+ "type": "dict",
+ "options": {
+ "information_type": {
+ "type": "str",
+ "choices": [
+ "exclude",
+ "lfa_candidate",
+ ],
+ },
+ "use_candidate_only": {"type": "bool"},
+ "interface": {
+ "type": "dict",
+ "options": {
+ "bvi": {
+ "type": "list",
+ "elements": "int",
+ },
+ "bundle_ether": {
+ "type": "list",
+ "elements": "int",
+ },
+ "post_int": {
+ "type": "list",
+ "elements": "int",
+ },
+ "fast_ethernet": {
+ "type": "list",
+ "elements": "str",
+ },
+ "fiftygige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "fortygige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "fourhundredgige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "gigabitethernet": {
+ "type": "list",
+ "elements": "str",
+ },
+ "hundredgige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "mgmteth": {
+ "type": "list",
+ "elements": "str",
+ },
+ "multilink": {
+ "type": "list",
+ "elements": "str",
+ },
+ "pw_ether": {
+ "type": "list",
+ "elements": "int",
+ },
+ "pw_iw": {
+ "type": "list",
+ "elements": "int",
+ },
+ "srp": {
+ "type": "list",
+ "elements": "str",
+ },
+ "serial": {
+ "type": "list",
+ "elements": "str",
+ },
+ "tengige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "twentyfivegige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "twohundredgige": {
+ "type": "list",
+ "elements": "str",
+ },
+ "nve": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_ip": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_ipsec": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_mte": {
+ "type": "list",
+ "elements": "int",
+ },
+ "tunnel_mpls": {"type": "int"},
+ },
+ },
+ },
+ },
+ },
+ },
+ "flood_reduction": {"type": "bool"},
+ "graceful_restart": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "helper_disable": {"type": "bool"},
+ "min_interval": {"type": "int"},
+ "max_interval": {"type": "int"},
+ },
+ },
+ "hello_interval": {"type": "int"},
+ "ignore_mospf_type6_lsa": {"type": "bool"},
+ "instance_id": {"type": "int"},
+ "log_adjacency_changes": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "disable": {"type": "bool"},
+ "detail": {"type": "bool"},
+ },
+ },
+ "maximum": {
+ "type": "dict",
+ "options": {
+ "interfaces": {"type": "int"},
+ "paths": {"type": "int"},
+ "redistributed_prefixes": {"type": "int"},
+ },
+ },
+ "mpls_ldp_sync": {"type": "bool"},
+ "mtu_ignore": {"type": "bool"},
+ "network": {
+ "type": "str",
+ "choices": [
+ "broadcast",
+ "non-broadcast",
+ "point-to-multipoint",
+ "point-to-point",
+ ],
+ },
+ "nsr": {"type": "bool"},
+ "packet_size": {"type": "int"},
+ "passive": {"type": "bool"},
+ "prefix_suppression": {"type": "bool"},
+ "priority": {"type": "int"},
+ "protocol_shutdown": {"type": "bool"},
+ "redistribute": {
+ "type": "dict",
+ "options": {
+ "application": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "id": {
+ "type": "str",
+ "required": True,
+ },
+ "set": {"type": "bool"},
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "route_policy": {"type": "str"},
+ "tag": {"type": "int"},
+ },
+ },
+ "bgp": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "id": {
+ "type": "int",
+ "required": True,
+ },
+ "set": {"type": "bool"},
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "preserved_med": {"type": "str"},
+ "route_policy": {"type": "str"},
+ "tag": {"type": "int"},
+ },
+ },
+ "connected": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "route_policy": {"type": "str"},
+ "tag": {"type": "int"},
+ },
+ },
+ "eigrp": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "id": {
+ "type": "int",
+ "required": True,
+ },
+ "set": {"type": "bool"},
+ "match": {
+ "type": "str",
+ "choices": [
+ "external",
+ "internal",
+ ],
+ },
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "route_policy": {"type": "str"},
+ "tag": {"type": "int"},
+ },
+ },
+ "isis": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "id": {
+ "type": "str",
+ "required": True,
+ },
+ "set": {"type": "bool"},
+ "level": {
+ "type": "str",
+ "choices": [
+ "level-1",
+ "level-1-2",
+ "level-2",
+ ],
+ },
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "route_policy": {"type": "str"},
+ "tag": {"type": "int"},
+ },
+ },
+ "mobile": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "route_policy": {"type": "str"},
+ "tag": {"type": "int"},
+ },
+ },
+ "ospfv3": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "id": {
+ "type": "str",
+ "required": True,
+ },
+ "set": {"type": "bool"},
+ "match": {
+ "type": "dict",
+ "options": {
+ "external": {
+ "type": "int",
+ "choices": ["1", "2"],
+ },
+ "nssa_external": {
+ "type": "int",
+ "choices": ["1", "2"],
+ },
+ "internal": {"type": "bool"},
+ },
+ },
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "route_policy": {"type": "str"},
+ "tag": {"type": "int"},
+ },
+ },
+ "static": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "route_policy": {"type": "str"},
+ "tag": {"type": "int"},
+ },
+ },
+ "subscriber": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "route_policy": {"type": "str"},
+ "tag": {"type": "int"},
+ },
+ },
+ },
+ },
+ "retransmit_interval": {"type": "int"},
+ "router_id": {"type": "str"},
+ "spf_prefix_priority": {
+ "type": "dict",
+ "options": {
+ "disable": {"type": "bool"},
+ "route_policy": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "value": {"type": "str"},
+ },
+ },
+ },
+ },
+ "stub_router": {
+ "type": "dict",
+ "options": {
+ "router_lsa": {
+ "type": "dict",
+ "options": {
+ "advertise_with": {
+ "type": "str",
+ "choices": [
+ "max-metric",
+ "r-bit",
+ "v6-bit",
+ ],
+ },
+ "always": {"type": "bool"},
+ "external_lsa": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "metric": {"type": "int"},
+ },
+ },
+ "include_stub": {"type": "bool"},
+ "on_proc_migration": {"type": "int"},
+ "on_proc_restart": {"type": "int"},
+ "on_startup": {
+ "type": "dict",
+ "options": {
+ "time": {"type": "int"},
+ "wait_for_bgp": {
+ "type": "bool"
+ },
+ },
+ },
+ "on_switchover": {"type": "int"},
+ "summary_lsa": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "metric": {"type": "int"},
+ },
+ },
+ },
+ }
+ },
+ },
+ "summary_prefix": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "prefix": {"type": "str", "required": True},
+ "not_advertise": {"type": "bool"},
+ "tag": {"type": "int"},
+ },
+ },
+ "timers": {
+ "type": "dict",
+ "options": {
+ "lsa_arrival": {"type": "int"},
+ "pacing": {
+ "type": "dict",
+ "options": {
+ "flood": {"type": "int"},
+ "lsa_group": {"type": "int"},
+ "retransmission": {"type": "int"},
+ },
+ },
+ "throttle": {
+ "type": "dict",
+ "options": {
+ "lsa": {
+ "type": "dict",
+ "options": {
+ "all_lsa_initial": {
+ "type": "int"
+ },
+ "all_lsa_minimum": {
+ "type": "int"
+ },
+ },
+ },
+ "spf": {
+ "type": "dict",
+ "options": {
+ "spf_initial": {"type": "int"},
+ "spf_minimum": {"type": "int"},
+ },
+ },
+ },
+ },
+ },
+ },
+ "trace": {
+ "type": "dict",
+ "options": {
+ "size": {"type": "str"},
+ "value": {"type": "int"},
+ },
+ },
+ "transmit_delay": {"type": "int"},
+ },
+ }
+ },
+ },
+ "state": {
+ "type": "str",
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/static_routes/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/static_routes/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/static_routes/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/static_routes/static_routes.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/static_routes/static_routes.py
new file mode 100644
index 00000000..362477b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/argspec/static_routes/static_routes.py
@@ -0,0 +1,103 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the iosxr_static_routes module
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Static_routesArgs(object): # pylint: disable=R0903
+ """The arg spec for the iosxr_static_routes module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "vrf": {"type": "str"},
+ "address_families": {
+ "elements": "dict",
+ "options": {
+ "afi": {
+ "choices": ["ipv4", "ipv6"],
+ "required": True,
+ "type": "str",
+ },
+ "safi": {
+ "choices": ["unicast", "multicast"],
+ "required": True,
+ "type": "str",
+ },
+ "routes": {
+ "elements": "dict",
+ "options": {
+ "dest": {"required": True, "type": "str"},
+ "next_hops": {
+ "elements": "dict",
+ "options": {
+ "admin_distance": {"type": "int"},
+ "description": {"type": "str"},
+ "dest_vrf": {"type": "str"},
+ "forward_router_address": {
+ "type": "str"
+ },
+ "interface": {"type": "str"},
+ "metric": {"type": "int"},
+ "tag": {"type": "int"},
+ "track": {"type": "str"},
+ "tunnel_id": {"type": "int"},
+ "vrflabel": {"type": "int"},
+ },
+ "type": "list",
+ },
+ },
+ "type": "list",
+ },
+ },
+ "type": "list",
+ },
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acl_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acl_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acl_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acl_interfaces/acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acl_interfaces/acl_interfaces.py
new file mode 100644
index 00000000..924abba2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acl_interfaces/acl_interfaces.py
@@ -0,0 +1,126 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_acl_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.rm_templates.acl_interfaces import (
+ Acl_interfacesTemplate,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+
+
+class Acl_interfaces(ResourceModule):
+ """
+ The iosxr_acl_interfaces class
+ """
+
+ def __init__(self, module):
+ super(Acl_interfaces, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="acl_interfaces",
+ tmplt=Acl_interfacesTemplate(),
+ )
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ if self.state not in ["parsed", "gathered"]:
+ self.gen_config()
+ self.run_commands()
+ return self.result
+
+ def gen_config(self):
+ """ Select the appropriate function based on the state provided
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ # convert list of dicts to dicts of dicts
+ wantd = {entry["name"]: entry for entry in self.want}
+ haved = {entry["name"]: entry for entry in self.have}
+
+ # turn all lists of dicts into dicts prior to merge
+ for entry in wantd, haved:
+ self._list_to_dict(entry)
+
+ # if state is merged, merge want onto have and then compare
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, empty out wantd and set haved to wantd
+ if self.state == "deleted":
+ haved = {k: v for k, v in haved.items() if k in wantd or not wantd}
+ wantd = {}
+
+ # remove superfluous config
+ if self.state in ["overridden", "deleted"]:
+ for k, have in haved.items():
+ if k not in wantd:
+ self._compare(want={}, have=have)
+
+ for k, want in wantd.items():
+ self._compare(want=want, have=haved.pop(k, {}))
+
+ def _compare(self, want, have):
+ begin = len(self.commands)
+ self._compare_lists(want=want, have=have)
+ if len(self.commands) != begin:
+ self.commands.insert(
+ begin, self._tmplt.render(want or have, "interface", False)
+ )
+
+ def _compare_lists(self, want, have):
+ wdict = want.get("access_groups", {})
+ hdict = have.get("access_groups", {})
+
+ for afi in ("ipv4", "ipv6"):
+ wacls = wdict.pop(afi, {}).pop("acls", {})
+ hacls = hdict.pop(afi, {}).pop("acls", {})
+
+ for key, entry in wacls.items():
+ if entry != hacls.pop(key, {}):
+ entry["afi"] = afi
+ self.addcmd(entry, "access_groups", False)
+ # remove remaining items in have for replaced
+ for entry in hacls.values():
+ entry["afi"] = afi
+ self.addcmd(entry, "access_groups", True)
+
+ def _list_to_dict(self, entry):
+ for item in entry.values():
+ for ag in item.get("access_groups", []):
+ ag["acls"] = {
+ subentry["direction"]: subentry
+ for subentry in ag.get("acls", [])
+ }
+ item["access_groups"] = {
+ subentry["afi"]: subentry
+ for subentry in item.get("access_groups", [])
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py
new file mode 100644
index 00000000..c07b3b3e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/acls/acls.py
@@ -0,0 +1,518 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_acls class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ flatten_dict,
+ prefix_to_address_wildcard,
+ is_ipv4_address,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ search_obj_in_list,
+ dict_diff,
+ remove_empties,
+)
+from ansible.module_utils.six import iteritems
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+
+
+class Acls(ConfigBase):
+ """
+ The iosxr_acls class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["acls"]
+
+ def __init__(self, module):
+ super(Acls, self).__init__(module)
+
+ def get_acls_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ acls_facts = facts["ansible_network_resources"].get("acls")
+ if not acls_facts:
+ return []
+ return acls_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_acls_facts = self.get_acls_facts()
+ else:
+ existing_acls_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_acls_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_acls_facts = self.get_acls_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_acls_facts(data=running_config)
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_acls_facts
+ if result["changed"]:
+ result["after"] = changed_acls_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_acls_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_acls_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ have = existing_acls_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ commands = []
+
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ if state == "overridden":
+ commands.extend(self._state_overridden(want, have))
+
+ elif state == "deleted":
+ commands.extend(self._state_deleted(want, have))
+
+ else:
+ # Instead of passing entire want and have
+ # list of dictionaries to the respective
+ # _state_* methods we are passing the want
+ # and have dictionaries per AFI
+ for item in want:
+ afi = item["afi"]
+ obj_in_have = search_obj_in_list(afi, have, key="afi") or {}
+
+ if state == "merged" or self.state == "rendered":
+ commands.extend(
+ self._state_merged(remove_empties(item), obj_in_have)
+ )
+
+ elif state == "replaced":
+ commands.extend(
+ self._state_replaced(remove_empties(item), obj_in_have)
+ )
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for want_acl in want["acls"]:
+ have_acl = (
+ search_obj_in_list(want_acl["name"], have.get("acls", []))
+ or {}
+ )
+ acl_updates = []
+
+ for have_ace in have_acl.get("aces", []):
+ want_ace = (
+ search_obj_in_list(
+ have_ace["sequence"], want_acl["aces"], key="sequence"
+ )
+ or {}
+ )
+ if not want_ace:
+ acl_updates.append("no {0}".format(have_ace["sequence"]))
+
+ for want_ace in want_acl.get("aces", []):
+ have_ace = (
+ search_obj_in_list(
+ want_ace.get("sequence"),
+ have_acl.get("aces", []),
+ key="sequence",
+ )
+ or {}
+ )
+ set_cmd = self._set_commands(want_ace, have_ace)
+ if set_cmd:
+ acl_updates.append(set_cmd)
+
+ if acl_updates:
+ acl_updates.insert(
+ 0,
+ "{0} access-list {1}".format(
+ want["afi"], want_acl["name"]
+ ),
+ )
+ commands.extend(acl_updates)
+
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ # Remove extraneous AFI that are present in config but not
+ # specified in `want`
+ for have_afi in have:
+ want_afi = (
+ search_obj_in_list(have_afi["afi"], want, key="afi") or {}
+ )
+ if not want_afi:
+ for acl in have_afi.get("acls", []):
+ commands.append(
+ "no {0} access-list {1}".format(
+ have_afi["afi"], acl["name"]
+ )
+ )
+
+ # First we remove the extraneous ACLs from the AFIs that
+ # are present both in `want` and in `have` and then
+ # we call `_state_replaced` to update the ACEs within those ACLs
+ for want_afi in want:
+ want_afi = remove_empties(want_afi)
+ have_afi = (
+ search_obj_in_list(want_afi["afi"], have, key="afi") or {}
+ )
+ if have_afi:
+ for have_acl in have_afi.get("acls", []):
+ want_acl = (
+ search_obj_in_list(
+ have_acl["name"], want_afi.get("acls", [])
+ )
+ or {}
+ )
+ if not want_acl:
+ commands.append(
+ "no {0} access-list {1}".format(
+ have_afi["afi"], have_acl["name"]
+ )
+ )
+
+ commands.extend(self._state_replaced(want_afi, have_afi))
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+ if not have:
+ have = {}
+
+ for want_acl in want["acls"]:
+ have_acl = (
+ search_obj_in_list(want_acl["name"], have.get("acls", {}))
+ or {}
+ )
+
+ acl_updates = []
+ for want_ace in want_acl["aces"]:
+ have_ace = (
+ search_obj_in_list(
+ want_ace.get("sequence"),
+ have_acl.get("aces", []),
+ key="sequence",
+ )
+ or {}
+ )
+ set_cmd = self._set_commands(want_ace, have_ace)
+ if set_cmd:
+ acl_updates.append(set_cmd)
+
+ if acl_updates:
+ acl_updates.insert(
+ 0,
+ "{0} access-list {1}".format(
+ want["afi"], want_acl["name"]
+ ),
+ )
+ commands.extend(acl_updates)
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if not want:
+ want = [{"afi": "ipv4"}, {"afi": "ipv6"}]
+
+ for item in want:
+ item = remove_empties(item)
+ have_item = search_obj_in_list(item["afi"], have, key="afi") or {}
+ if "acls" not in item:
+ if have_item:
+ for acl in have_item["acls"]:
+ commands.append(
+ "no {0} access-list {1}".format(
+ have_item["afi"], acl["name"]
+ )
+ )
+ else:
+ for want_acl in item["acls"]:
+ have_acl = (
+ search_obj_in_list(
+ want_acl["name"], have_item.get("acls", [])
+ )
+ or {}
+ )
+ if have_acl:
+ commands.append(
+ "no {0} access-list {1}".format(
+ have_item["afi"], have_acl["name"]
+ )
+ )
+
+ return commands
+
+ def _compute_commands(self, want_ace):
+ """This command creates an ACE line from an ACE dictionary
+
+ :rtype: A string
+ :returns: An ACE generated from a structured ACE dictionary
+ """
+
+ def __compute_src_dest(dir_dict):
+ cmd = ""
+ if "any" in dir_dict:
+ cmd += "any "
+ elif "host" in dir_dict:
+ cmd += "host {0} ".format(dir_dict["host"])
+ elif "prefix" in dir_dict:
+ cmd += "{0} ".format(dir_dict["prefix"])
+ else:
+ cmd += "{0} {1} ".format(
+ dir_dict["address"], dir_dict["wildcard_bits"]
+ )
+
+ if "port_protocol" in dir_dict:
+ protocol_range = dir_dict["port_protocol"].get("range")
+ if protocol_range:
+ cmd += "range {0} {1} ".format(
+ protocol_range["start"], protocol_range["end"]
+ )
+ else:
+ for key, value in iteritems(dir_dict["port_protocol"]):
+ cmd += "{0} {1} ".format(key, value)
+
+ return cmd
+
+ def __compute_protocol_options(protocol_dict):
+ cmd = ""
+ for value in protocol_options.values():
+ for subkey, subvalue in iteritems(value):
+ if subvalue:
+ cmd += "{0} ".format(subkey.replace("_", "-"))
+ return cmd
+
+ def __compute_match_options(want_ace):
+ cmd = ""
+
+ if "precedence" in want_ace:
+ cmd += "precedence {0} ".format(want_ace["precedence"])
+
+ for x in ["dscp", "packet_length", "ttl"]:
+ if x in want_ace:
+ opt_range = want_ace[x].get("range")
+ if opt_range:
+ cmd += "{0} range {1} {2} ".format(
+ x.replace("_", "-"),
+ opt_range["start"],
+ opt_range["end"],
+ )
+ else:
+ for key, value in iteritems(want_ace[x]):
+ cmd += "{0} {1} {2} ".format(
+ x.replace("_", "-"), key, value
+ )
+
+ for x in (
+ "authen",
+ "capture",
+ "fragments",
+ "routing",
+ "log",
+ "log_input",
+ "icmp_off",
+ "destopts",
+ "hop_by_hop",
+ ):
+ if x in want_ace:
+ cmd += "{0} ".format(x.replace("_", "-"))
+
+ return cmd
+
+ cmd = ""
+ if "sequence" in want_ace:
+ cmd += "{0} ".format(want_ace["sequence"])
+
+ if "remark" in want_ace:
+ cmd += "remark {0}".format(want_ace["remark"])
+
+ elif "line" in want_ace:
+ cmd += want_ace["line"]
+
+ else:
+ cmd += "{0} ".format(want_ace["grant"])
+ if "protocol" in want_ace:
+ cmd += "{0} ".format(want_ace["protocol"])
+
+ cmd += __compute_src_dest(want_ace["source"])
+ cmd += __compute_src_dest(want_ace["destination"])
+
+ protocol_options = want_ace.get("protocol_options", {})
+ if protocol_options:
+ cmd += __compute_protocol_options(protocol_options)
+
+ cmd += __compute_match_options(want_ace)
+
+ return cmd.strip()
+
+ def _set_commands(self, want_ace, have_ace):
+ """A helped method that checks if there is
+ a delta between the `have_ace` and `want_ace`.
+ If there is a delta then it calls `_compute_commands`
+ to create the ACE line.
+
+ :rtype: A string
+ :returns: An ACE generated from a structured ACE dictionary
+ via a call to `_compute_commands`
+ """
+
+ if "line" in want_ace:
+ if want_ace["line"] != have_ace.get("line"):
+ return self._compute_commands(want_ace)
+
+ else:
+ if ("prefix" in want_ace.get("source", {})) or (
+ "prefix" in want_ace.get("destination", {})
+ ):
+ self._prepare_for_diff(want_ace)
+
+ protocol_opt_delta = {}
+ delta = dict_diff(have_ace, want_ace)
+
+ # `dict_diff` doesn't work properly for `protocol_options` diff,
+ # so we need to handle it separately
+ if want_ace.get("protocol_options", {}):
+ protocol_opt_delta = set(
+ flatten_dict(have_ace.get("protocol_options", {}))
+ ) ^ set(flatten_dict(want_ace.get("protocol_options", {})))
+
+ if delta or protocol_opt_delta:
+ want_ace = self._dict_merge(have_ace, want_ace)
+ return self._compute_commands(want_ace)
+
+ def _prepare_for_diff(self, ace):
+ """This method prepares the want ace dict
+ for diff calculation against the have ace dict.
+
+ :param ace: The want ace to prepare for diff calculation
+ """
+ # Convert prefixes to "address wildcard bits" format for IPv4 addresses
+ # Not valid for IPv6 addresses because those can only be specified as prefixes
+ # and are always rendered in running-config as prefixes too
+ for x in ["source", "destination"]:
+ prefix = ace.get(x, {}).get("prefix")
+ if prefix and is_ipv4_address(prefix):
+ del ace[x]["prefix"]
+ ace[x]["address"], ace[x][
+ "wildcard_bits"
+ ] = prefix_to_address_wildcard(prefix)
+
+ def _dict_merge(self, have_ace, want_ace):
+ for x in want_ace:
+ have_ace[x] = want_ace[x]
+ return have_ace
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/interfaces/interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/interfaces/interfaces.py
new file mode 100644
index 00000000..ce3534b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/interfaces/interfaces.py
@@ -0,0 +1,327 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ get_interface_type,
+ dict_to_set,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ remove_command_from_config_list,
+ add_command_to_config_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ filter_dict_having_none_value,
+ remove_duplicate_interface,
+)
+
+
+class Interfaces(ConfigBase):
+ """
+ The iosxr_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["interfaces"]
+
+ params = ("description", "mtu", "speed", "duplex")
+
+ def __init__(self, module):
+ super(Interfaces, self).__init__(module)
+
+ def get_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ interfaces_facts = facts["ansible_network_resources"].get("interfaces")
+ if not interfaces_facts:
+ return []
+ return interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_interfaces_facts = self.get_interfaces_facts()
+ else:
+ existing_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_interfaces_facts = self.get_interfaces_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_interfaces_facts(data=running_config)
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_interfaces_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ have = existing_interfaces_facts
+ resp = self.set_state(want, have)
+
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ if (
+ self.state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ if self.state == "overridden":
+ commands = self._state_overridden(want, have)
+ elif self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state in ("merged", "rendered"):
+ commands = self._state_merged(want, have)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have)
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for interface in want:
+ for each in have:
+ if (
+ each["name"] == interface["name"]
+ or interface["name"] in each["name"]
+ ):
+ break
+ else:
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ want = dict()
+ commands.extend(self._clear_config(want, have_dict))
+ commands.extend(self._set_config(interface, each))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for each in have:
+ for interface in want:
+ if (
+ each["name"] == interface["name"]
+ or interface["name"] in each["name"]
+ ):
+ break
+ else:
+ # We didn't find a matching desired state, which means we can
+ # pretend we received an empty desired state.
+ interface = dict(name=each["name"])
+ commands.extend(self._clear_config(interface, each))
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ want = dict()
+ commands.extend(self._clear_config(want, have_dict))
+ commands.extend(self._set_config(interface, each))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ for interface in want:
+ if self.state == "rendered":
+ commands.extend(self._set_config(interface, dict()))
+ else:
+ for each in have:
+ if (
+ each["name"] == interface["name"]
+ or interface["name"] in each["name"]
+ ):
+ break
+ else:
+ continue
+ commands.extend(self._set_config(interface, each))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ for interface in want:
+ for each in have:
+ if (
+ each["name"] == interface["name"]
+ or interface["name"] in each["name"]
+ ):
+ break
+ else:
+ continue
+ interface = dict(name=interface["name"])
+ commands.extend(self._clear_config(interface, each))
+ else:
+ for each in have:
+ want = dict()
+ commands.extend(self._clear_config(want, each))
+
+ return commands
+
+ def _set_config(self, want, have):
+ # Set the interface config based on the want and have config
+ commands = []
+ interface = "interface " + want["name"]
+
+ # Get the diff b/w want and have
+ want_dict = dict_to_set(want)
+ have_dict = dict_to_set(have)
+ diff = want_dict - have_dict
+
+ if diff:
+ diff = dict(diff)
+ for item in self.params:
+ if diff.get(item):
+ cmd = item + " " + str(want.get(item))
+ add_command_to_config_list(interface, cmd, commands)
+ if diff.get("enabled"):
+ add_command_to_config_list(interface, "no shutdown", commands)
+ elif diff.get("enabled") is False:
+ add_command_to_config_list(interface, "shutdown", commands)
+
+ return commands
+
+ def _clear_config(self, want, have):
+ # Delete the interface config based on the want and have config
+ commands = []
+
+ if want.get("name"):
+ interface_type = get_interface_type(want["name"])
+ interface = "interface " + want["name"]
+ else:
+ interface_type = get_interface_type(have["name"])
+ interface = "interface " + have["name"]
+
+ if have.get("description") and want.get("description") != have.get(
+ "description"
+ ):
+ remove_command_from_config_list(interface, "description", commands)
+ if not have.get("enabled") and want.get("enabled") != have.get(
+ "enabled"
+ ):
+ # if enable is False set enable as True which is the default behavior
+ remove_command_from_config_list(interface, "shutdown", commands)
+
+ if interface_type.lower() == "gigabitethernet":
+ if (
+ have.get("speed")
+ and have.get("speed") != "auto"
+ and want.get("speed") != have.get("speed")
+ ):
+ remove_command_from_config_list(interface, "speed", commands)
+ if (
+ have.get("duplex")
+ and have.get("duplex") != "auto"
+ and want.get("duplex") != have.get("duplex")
+ ):
+ remove_command_from_config_list(interface, "duplex", commands)
+ if have.get("mtu") and want.get("mtu") != have.get("mtu"):
+ remove_command_from_config_list(interface, "mtu", commands)
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l2_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l2_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l2_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l2_interfaces/l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l2_interfaces/l2_interfaces.py
new file mode 100644
index 00000000..a5596d18
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l2_interfaces/l2_interfaces.py
@@ -0,0 +1,373 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_l2_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ remove_empties,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ normalize_interface,
+ dict_to_set,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ remove_command_from_config_list,
+ add_command_to_config_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ filter_dict_having_none_value,
+ remove_duplicate_interface,
+)
+
+
+class L2_Interfaces(ConfigBase):
+ """
+ The iosxr_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["l2_interfaces"]
+
+ def get_l2_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ l2_interfaces_facts = facts["ansible_network_resources"].get(
+ "l2_interfaces"
+ )
+ if not l2_interfaces_facts:
+ return []
+ return l2_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_l2_interfaces_facts = self.get_l2_interfaces_facts()
+ else:
+ existing_l2_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_l2_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_l2_interfaces_facts = self.get_l2_interfaces_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_l2_interfaces_facts(
+ data=running_config
+ )
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_l2_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_l2_interfaces_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_l2_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_l2_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ have = existing_l2_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ if (
+ self.state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ if self.state == "overridden":
+ commands = self._state_overridden(want, have, self._module)
+ elif self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state in ("merged", "rendered"):
+ commands = self._state_merged(want, have, self._module)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have, self._module)
+
+ return commands
+
+ def _state_replaced(self, want, have, module):
+ """ The command generator when state is replaced
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ for interface in want:
+ interface["name"] = normalize_interface(interface["name"])
+ for each in have:
+ if (
+ each["name"] == interface["name"]
+ or interface["name"] in each["name"]
+ ):
+ break
+ else:
+ commands.extend(self._set_config(interface, {}, module))
+ continue
+ interface = remove_empties(interface)
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each, module))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_overridden(self, want, have, module):
+ """ The command generator when state is overridden
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ not_in_have = set()
+ in_have = set()
+ for each in have:
+ for interface in want:
+ interface["name"] = normalize_interface(interface["name"])
+ if each["name"] == interface["name"]:
+ in_have.add(interface["name"])
+ break
+ if interface["name"] != each["name"]:
+ not_in_have.add(interface["name"])
+ else:
+ # We didn't find a matching desired state, which means we can
+ # pretend we received an empty desired state.
+ interface = dict(name=each["name"])
+ commands.extend(self._clear_config(interface, each))
+ continue
+ interface = remove_empties(interface)
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each, module))
+ # Add the want interface that's not already configured in have interface
+ for each in not_in_have - in_have:
+ for every in want:
+ interface = "interface {0}".format(every["name"])
+ if each and interface not in commands:
+ commands.extend(self._set_config(every, {}, module))
+
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_merged(self, want, have, module):
+ """ The command generator when state is merged
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ for interface in want:
+ interface["name"] = normalize_interface(interface["name"])
+ interface = remove_empties(interface)
+ for each in have:
+ if (
+ each["name"] == interface["name"]
+ or interface["name"] in each["name"]
+ ):
+ break
+ else:
+ commands.extend(self._set_config(interface, {}, module))
+ continue
+ commands.extend(self._set_config(interface, each, module))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ for interface in want:
+ interface["name"] = normalize_interface(interface["name"])
+ for each in have:
+ if (
+ each["name"] == interface["name"]
+ or interface["name"] in each["name"]
+ ):
+ break
+ else:
+ continue
+ interface = dict(name=interface["name"])
+ commands.extend(self._clear_config(interface, each))
+ else:
+ for each in have:
+ want = dict()
+ commands.extend(self._clear_config(want, each))
+
+ return commands
+
+ def _set_config(self, want, have, module):
+ # Set the interface config based on the want and have config
+ commands = []
+ interface = "interface " + want["name"]
+ l2_protocol_bool = False
+ # Get the diff b/w want and have
+ want_dict = dict_to_set(want)
+ have_dict = dict_to_set(have)
+ diff = want_dict - have_dict
+
+ if diff:
+ # For merging with already configured l2protocol
+ if have.get("l2protocol") and len(have.get("l2protocol")) > 1:
+ l2_protocol_diff = []
+ for each in want.get("l2protocol"):
+ for every in have.get("l2protocol"):
+ if every == each:
+ break
+ if each not in have.get("l2protocol"):
+ l2_protocol_diff.append(each)
+ l2_protocol_bool = True
+ l2protocol = tuple(l2_protocol_diff)
+ else:
+ l2protocol = {}
+
+ diff = dict(diff)
+ wants_native = diff.get("native_vlan")
+ l2transport = diff.get("l2transport")
+ q_vlan = diff.get("q_vlan")
+ propagate = diff.get("propagate")
+ if l2_protocol_bool is False:
+ l2protocol = diff.get("l2protocol")
+
+ if wants_native:
+ cmd = "dot1q native vlan {0}".format(wants_native)
+ add_command_to_config_list(interface, cmd, commands)
+
+ if l2transport or l2protocol:
+ for each in l2protocol:
+ each = dict(each)
+ if isinstance(each, dict):
+ cmd = "l2transport l2protocol {0} {1}".format(
+ list(each.keys())[0], list(each.values())[0]
+ )
+ add_command_to_config_list(interface, cmd, commands)
+ if propagate and not have.get("propagate"):
+ cmd = "l2transport propagate remote-status"
+ add_command_to_config_list(interface, cmd, commands)
+ elif want.get("l2transport") is False and (
+ want.get("l2protocol") or want.get("propagate")
+ ):
+ module.fail_json(
+ msg="L2transport L2protocol or Propagate can only be configured when "
+ "L2transport set to True!"
+ )
+
+ if q_vlan and "." in interface:
+ q_vlans = " ".join(map(str, want.get("q_vlan")))
+ if q_vlans != have.get("q_vlan"):
+ cmd = "dot1q vlan {0}".format(q_vlans)
+ add_command_to_config_list(interface, cmd, commands)
+
+ return commands
+
+ def _clear_config(self, want, have):
+ # Delete the interface config based on the want and have config
+ commands = []
+
+ if want.get("name"):
+ interface = "interface " + want["name"]
+ else:
+ interface = "interface " + have["name"]
+ if have.get("native_vlan"):
+ remove_command_from_config_list(
+ interface, "dot1q native vlan", commands
+ )
+
+ if have.get("q_vlan"):
+ remove_command_from_config_list(
+ interface, "encapsulation dot1q", commands
+ )
+
+ if have.get("l2protocol") and (
+ want.get("l2protocol") is None or want.get("propagate") is None
+ ):
+ if "no l2transport" not in commands:
+ remove_command_from_config_list(
+ interface, "l2transport", commands
+ )
+ elif have.get("l2transport") and have.get("l2transport") != want.get(
+ "l2transport"
+ ):
+ if "no l2transport" not in commands:
+ remove_command_from_config_list(
+ interface, "l2transport", commands
+ )
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l3_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l3_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l3_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l3_interfaces/l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l3_interfaces/l3_interfaces.py
new file mode 100644
index 00000000..47949a77
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/l3_interfaces/l3_interfaces.py
@@ -0,0 +1,397 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_l3_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ normalize_interface,
+ dict_to_set,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ remove_command_from_config_list,
+ add_command_to_config_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ filter_dict_having_none_value,
+ remove_duplicate_interface,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ validate_n_expand_ipv4,
+ validate_ipv6,
+)
+
+
+class L3_Interfaces(ConfigBase):
+ """
+ The iosxr_l3_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["l3_interfaces"]
+
+ def get_l3_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ l3_interfaces_facts = facts["ansible_network_resources"].get(
+ "l3_interfaces"
+ )
+ if not l3_interfaces_facts:
+ return []
+ return l3_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_l3_interfaces_facts = self.get_l3_interfaces_facts()
+ else:
+ existing_l3_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_l3_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_l3_interfaces_facts = self.get_l3_interfaces_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_l3_interfaces_facts(
+ data=running_config
+ )
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_l3_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_l3_interfaces_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_l3_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_l3_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ have = existing_l3_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ if (
+ self.state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ if self.state == "overridden":
+ commands = self._state_overridden(want, have, self._module)
+ elif self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state in ("merged", "rendered"):
+ commands = self._state_merged(want, have, self._module)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have, self._module)
+
+ return commands
+
+ def _state_replaced(self, want, have, module):
+ """ The command generator when state is replaced
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for interface in want:
+ interface["name"] = normalize_interface(interface["name"])
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ commands.extend(self._set_config(interface, dict(), module))
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each, module))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_overridden(self, want, have, module):
+ """ The command generator when state is overridden
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ not_in_have = set()
+ in_have = set()
+
+ for each in have:
+ for interface in want:
+ interface["name"] = normalize_interface(interface["name"])
+ if each["name"] == interface["name"]:
+ in_have.add(interface["name"])
+ break
+ if interface["name"] != each["name"]:
+ not_in_have.add(interface["name"])
+ else:
+ # We didn't find a matching desired state, which means we can
+ # pretend we received an empty desired state.
+ interface = dict(name=each["name"])
+ kwargs = {"want": interface, "have": each}
+ commands.extend(self._clear_config(**kwargs))
+ continue
+ have_dict = filter_dict_having_none_value(interface, each)
+ commands.extend(self._clear_config(dict(), have_dict))
+ commands.extend(self._set_config(interface, each, module))
+ # Add the want interface that's not already configured in have interface
+ for each in not_in_have - in_have:
+ for every in want:
+ interface = "interface {0}".format(every["name"])
+ if each and interface not in commands:
+ commands.extend(self._set_config(every, {}, module))
+ # Remove the duplicate interface call
+ commands = remove_duplicate_interface(commands)
+
+ return commands
+
+ def _state_merged(self, want, have, module):
+ """ The command generator when state is merged
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ for interface in want:
+ interface["name"] = normalize_interface(interface["name"])
+ if self.state == "rendered":
+ commands.extend(self._set_config(interface, dict(), module))
+ else:
+ for each in have:
+ if each["name"] == interface["name"]:
+ break
+ else:
+ commands.extend(
+ self._set_config(interface, dict(), module)
+ )
+ continue
+ commands.extend(self._set_config(interface, each, module))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if want:
+ for interface in want:
+ interface["name"] = normalize_interface(interface["name"])
+ for each in have:
+ if (
+ each["name"] == interface["name"]
+ or interface["name"] in each["name"]
+ ):
+ break
+ else:
+ continue
+ interface = dict(name=interface["name"])
+ commands.extend(self._clear_config(interface, each))
+ else:
+ for each in have:
+ want = dict()
+ commands.extend(self._clear_config(want, each))
+
+ return commands
+
+ def verify_diff_again(self, want, have):
+ """
+ Verify the IPV4 difference again as sometimes due to
+ change in order of set, set difference may result into change,
+ when there's actually no difference between want and have
+ :param want: want_dict IPV4
+ :param have: have_dict IPV4
+ :return: diff
+ """
+ diff = False
+ for each in want:
+ each_want = dict(each)
+ for every in have:
+ every_have = dict(every)
+
+ if each_want.get("address") == every_have.get("address"):
+ if len(each_want.keys()) == len(every_have.keys()) and (
+ each_want.get("secondary")
+ == every_have.get("secondary")
+ ):
+ diff = False
+ break
+ if not each_want.get("secondary") and not every_have.get(
+ "secondary"
+ ):
+ diff = False
+ break
+
+ diff = True
+ else:
+ diff = True
+ if diff:
+ break
+
+ return diff
+
+ def _set_config(self, want, have, module):
+ # Set the interface config based on the want and have config
+ commands = []
+ interface = "interface " + want["name"]
+
+ # To handle L3 IPV4 configuration
+ if want.get("ipv4"):
+ for each in want.get("ipv4"):
+ if each.get("address") != "dhcp":
+ ip_addr_want = validate_n_expand_ipv4(module, each)
+ each["address"] = ip_addr_want
+
+ # Get the diff b/w want and have
+ want_dict = dict_to_set(want)
+ have_dict = dict_to_set(have)
+
+ # To handle L3 IPV4 configuration
+ want_ipv4 = dict(want_dict).get("ipv4")
+ have_ipv4 = dict(have_dict).get("ipv4")
+ if want_ipv4:
+ if have_ipv4:
+ diff_ipv4 = set(want_ipv4) - set(dict(have_dict).get("ipv4"))
+ if diff_ipv4:
+ diff_ipv4 = (
+ diff_ipv4
+ if self.verify_diff_again(want_ipv4, have_ipv4)
+ else ()
+ )
+ else:
+ diff_ipv4 = set(want_ipv4)
+ for each in diff_ipv4:
+ ipv4_dict = dict(each)
+ if ipv4_dict.get("address") != "dhcp":
+ cmd = "ipv4 address {0}".format(ipv4_dict["address"])
+ if ipv4_dict.get("secondary"):
+ cmd += " secondary"
+ add_command_to_config_list(interface, cmd, commands)
+
+ # To handle L3 IPV6 configuration
+ want_ipv6 = dict(want_dict).get("ipv6")
+ have_ipv6 = dict(have_dict).get("ipv6")
+ if want_ipv6:
+ if have_ipv6:
+ diff_ipv6 = set(want_ipv6) - set(have_ipv6)
+ else:
+ diff_ipv6 = set(want_ipv6)
+ for each in diff_ipv6:
+ ipv6_dict = dict(each)
+ validate_ipv6(ipv6_dict.get("address"), module)
+ cmd = "ipv6 address {0}".format(ipv6_dict.get("address"))
+ add_command_to_config_list(interface, cmd, commands)
+
+ return commands
+
+ def _clear_config(self, want, have):
+ # Delete the interface config based on the want and have config
+ count = 0
+ commands = []
+ if want.get("name"):
+ interface = "interface " + want["name"]
+ else:
+ interface = "interface " + have["name"]
+
+ if have.get("ipv4") and want.get("ipv4"):
+ for each in have.get("ipv4"):
+ if each.get("secondary") and not (
+ want.get("ipv4")[count].get("secondary")
+ ):
+ cmd = "ipv4 address {0} secondary".format(
+ each.get("address")
+ )
+ remove_command_from_config_list(interface, cmd, commands)
+ count += 1
+ if have.get("ipv4") and not (want.get("ipv4")):
+ remove_command_from_config_list(
+ interface, "ipv4 address", commands
+ )
+ if have.get("ipv6") and not (want.get("ipv6")):
+ remove_command_from_config_list(
+ interface, "ipv6 address", commands
+ )
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp/lacp.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp/lacp.py
new file mode 100644
index 00000000..1c5d53f2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp/lacp.py
@@ -0,0 +1,213 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_lacp class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_diff,
+)
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_empties,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ flatten_dict,
+)
+
+
+class Lacp(ConfigBase):
+ """
+ The iosxr_lacp class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lacp"]
+
+ def __init__(self, module):
+ super(Lacp, self).__init__(module)
+
+ def get_lacp_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lacp_facts = facts["ansible_network_resources"].get("lacp")
+ if not lacp_facts:
+ return {}
+ return lacp_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lacp_facts = self.get_lacp_facts()
+ else:
+ existing_lacp_facts = {}
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lacp_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lacp_facts = self.get_lacp_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lacp_facts(data=running_config)
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lacp_facts
+ if result["changed"]:
+ result["after"] = changed_lacp_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_lacp_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_lacp_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params.get("config")
+ if not want:
+ want = {}
+ have = existing_lacp_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ if self.state in ("merged", "replaced", "rendered") and not want:
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ if self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state in ("merged", "rendered"):
+ commands = self._state_merged(want, have)
+ elif self.state == "replaced":
+ commands = self._state_replaced(want, have)
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ commands.extend(self._state_deleted(want, have))
+
+ commands.extend(self._state_merged(want, have))
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ updates = dict_diff(have, want)
+ if self.state == "rendered":
+ updates = want
+ if updates:
+ for key, value in iteritems(
+ flatten_dict(remove_empties(updates["system"]))
+ ):
+ commands.append(
+ "lacp system {0} {1}".format(
+ key.replace("address", "mac"), value
+ )
+ )
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ for x in [
+ k
+ for k in have.get("system", {})
+ if k not in remove_empties(want.get("system", {}))
+ ]:
+ commands.append("no lacp system {0}".format(x))
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp_interfaces/lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp_interfaces/lacp_interfaces.py
new file mode 100644
index 00000000..83c1ee9d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lacp_interfaces/lacp_interfaces.py
@@ -0,0 +1,312 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_lacp_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_diff,
+ remove_empties,
+)
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ search_obj_in_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ dict_delete,
+ pad_commands,
+ flatten_dict,
+)
+
+
+class Lacp_interfaces(ConfigBase):
+ """
+ The iosxr_lacp_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lacp_interfaces"]
+
+ def __init__(self, module):
+ super(Lacp_interfaces, self).__init__(module)
+
+ def get_lacp_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lacp_interfaces_facts = facts["ansible_network_resources"].get(
+ "lacp_interfaces"
+ )
+ if not lacp_interfaces_facts:
+ return []
+ return lacp_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lacp_interfaces_facts = self.get_lacp_interfaces_facts()
+ else:
+ existing_lacp_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lacp_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lacp_interfaces_facts = self.get_lacp_interfaces_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lacp_interfaces_facts(
+ data=running_config
+ )
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lacp_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_lacp_interfaces_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_lacp_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_lacp_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ have = existing_lacp_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ state = self._module.params["state"]
+
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ if state == "overridden":
+ commands.extend(Lacp_interfaces._state_overridden(want, have))
+
+ elif state == "deleted":
+ if not want:
+ for intf in have:
+ commands.extend(
+ Lacp_interfaces._state_deleted(
+ {"name": intf["name"]}, intf
+ )
+ )
+ else:
+ for item in want:
+ obj_in_have = search_obj_in_list(item["name"], have)
+ commands.extend(
+ Lacp_interfaces._state_deleted(item, obj_in_have)
+ )
+
+ else:
+ for item in want:
+ name = item["name"]
+ obj_in_have = search_obj_in_list(name, have)
+
+ if state in ("merged", "rendered"):
+ commands.extend(
+ Lacp_interfaces._state_merged(item, obj_in_have)
+ )
+
+ elif state == "replaced":
+ commands.extend(
+ Lacp_interfaces._state_replaced(item, obj_in_have)
+ )
+
+ return commands
+
+ @staticmethod
+ def _state_replaced(want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ replaced_commands = []
+ merged_commands = []
+
+ if have:
+ replaced_commands = Lacp_interfaces._state_deleted(want, have)
+
+ merged_commands = Lacp_interfaces._state_merged(want, have)
+
+ if merged_commands and replaced_commands:
+ del merged_commands[0]
+
+ commands.extend(replaced_commands)
+ commands.extend(merged_commands)
+
+ return commands
+
+ @staticmethod
+ def _state_overridden(want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ for intf in have:
+ intf_in_want = search_obj_in_list(intf["name"], want)
+ if not intf_in_want:
+ commands.extend(
+ Lacp_interfaces._state_deleted(
+ {"name": intf["name"]}, intf
+ )
+ )
+
+ for intf in want:
+ intf_in_have = search_obj_in_list(intf["name"], have)
+ commands.extend(
+ Lacp_interfaces._state_replaced(intf, intf_in_have)
+ )
+
+ return commands
+
+ @staticmethod
+ def _state_merged(want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ if not have:
+ have = {"name": want["name"]}
+
+ for key, value in iteritems(
+ flatten_dict(remove_empties(dict_diff(have, want)))
+ ):
+ commands.append(Lacp_interfaces._compute_commands(key, value))
+
+ if commands:
+ pad_commands(commands, want["name"])
+
+ return commands
+
+ @staticmethod
+ def _state_deleted(want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ for key, value in iteritems(
+ flatten_dict(dict_delete(have, remove_empties(want)))
+ ):
+ commands.append(
+ Lacp_interfaces._compute_commands(key, value, remove=True)
+ )
+
+ if commands:
+ pad_commands(commands, have["name"])
+
+ return commands
+
+ @staticmethod
+ def _compute_commands(key, value, remove=False):
+ if key == "churn_logging":
+ cmd = "lacp churn logging {0}".format(value)
+
+ elif key == "collector_max_delay":
+ cmd = "lacp collector-max-delay {0}".format(value)
+
+ elif key == "period":
+ cmd = "lacp period {0}".format(value)
+
+ elif key == "switchover_suppress_flaps":
+ cmd = "lacp switchover suppress-flaps {0}".format(value)
+
+ elif key == "mac":
+ cmd = "lacp system mac {0}".format(value)
+
+ elif key == "priority":
+ cmd = "lacp system priority {0}".format(value)
+
+ if remove:
+ cmd = "no " + cmd
+
+ return cmd
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lag_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lag_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lag_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lag_interfaces/lag_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lag_interfaces/lag_interfaces.py
new file mode 100644
index 00000000..a877341b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lag_interfaces/lag_interfaces.py
@@ -0,0 +1,439 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_lag_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from copy import deepcopy
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ dict_diff,
+ remove_empties,
+ search_obj_in_list,
+ param_list_to_dict,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ diff_list_of_dicts,
+ pad_commands,
+ flatten_dict,
+ dict_delete,
+ normalize_interface,
+)
+
+
+class Lag_interfaces(ConfigBase):
+ """
+ The iosxr_lag_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lag_interfaces"]
+
+ def __init__(self, module):
+ super(Lag_interfaces, self).__init__(module)
+
+ def get_lag_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lag_interfaces_facts = facts["ansible_network_resources"].get(
+ "lag_interfaces"
+ )
+ if not lag_interfaces_facts:
+ return []
+ return lag_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lag_interfaces_facts = self.get_lag_interfaces_facts()
+ else:
+ existing_lag_interfaces_facts = {}
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lag_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lag_interfaces_facts = self.get_lag_interfaces_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lag_interfaces_facts(
+ data=running_config
+ )
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lag_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_lag_interfaces_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_lag_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_lag_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ if want:
+ for item in want:
+ item["name"] = normalize_interface(item["name"])
+ if "members" in want and want["members"]:
+ for item in want["members"]:
+ item.update(
+ {
+ "member": normalize_interface(item["member"]),
+ "mode": item["mode"],
+ }
+ )
+ have = existing_lag_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ commands = []
+
+ if (
+ self.state in ("merged", "replaced", "overridden", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ if state == "overridden":
+ commands.extend(self._state_overridden(want, have))
+
+ elif state == "deleted":
+ commands.extend(self._state_deleted(want, have))
+
+ else:
+ # Instead of passing entire want and have
+ # list of dictionaries to the respective
+ # _state_* methods we are passing the want
+ # and have dictionaries per interface
+ for item in want:
+ name = item["name"]
+ obj_in_have = search_obj_in_list(name, have)
+
+ if state in ("merged", "rendered"):
+ commands.extend(self._state_merged(item, obj_in_have))
+
+ elif state == "replaced":
+ commands.extend(self._state_replaced(item, obj_in_have))
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ if have:
+ commands.extend(self._render_bundle_del_commands(want, have))
+ commands.extend(self._render_bundle_updates(want, have))
+
+ if commands or have == {}:
+ pad_commands(commands, want["name"])
+
+ if have:
+ commands.extend(self._render_interface_del_commands(want, have))
+ commands.extend(self._render_interface_updates(want, have))
+
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ for have_intf in have:
+ intf_in_want = search_obj_in_list(have_intf["name"], want)
+ if not intf_in_want:
+ commands.extend(self._purge_attribs(have_intf))
+
+ for intf in want:
+ intf_in_have = search_obj_in_list(intf["name"], have)
+ commands.extend(self._state_replaced(intf, intf_in_have))
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+ commands.extend(self._render_bundle_updates(want, have))
+
+ if commands or have == {}:
+ pad_commands(commands, want["name"])
+
+ commands.extend(self._render_interface_updates(want, have))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ if not want:
+ for item in have:
+ commands.extend(self._purge_attribs(intf=item))
+ else:
+ for item in want:
+ name = item["name"]
+ obj_in_have = search_obj_in_list(name, have)
+ if not obj_in_have:
+ self._module.fail_json(
+ msg=("interface {0} does not exist".format(name))
+ )
+ commands.extend(self._purge_attribs(intf=obj_in_have))
+
+ return commands
+
+ def _render_bundle_updates(self, want, have):
+ """ The command generator for updates to bundles
+ :rtype: A list
+ :returns: the commands necessary to update bundles
+ """
+ commands = []
+ if not have:
+ have = {"name": want["name"]}
+
+ want_copy = deepcopy(want)
+ have_copy = deepcopy(have)
+
+ want_copy.pop("members", [])
+ have_copy.pop("members", [])
+
+ bundle_updates = dict_diff(have_copy, want_copy)
+
+ if bundle_updates:
+ for key, value in iteritems(
+ flatten_dict(remove_empties(bundle_updates))
+ ):
+ commands.append(self._compute_commands(key=key, value=value))
+
+ return commands
+
+ def _render_interface_updates(self, want, have):
+ """ The command generator for updates to member
+ interfaces
+ :rtype: A list
+ :returns: the commands necessary to update member
+ interfaces
+ """
+ commands = []
+
+ if not have:
+ have = {"name": want["name"]}
+
+ member_diff = diff_list_of_dicts(
+ want["members"], have.get("members", [])
+ )
+
+ for diff in member_diff:
+ diff_cmd = []
+ bundle_cmd = "bundle id {0}".format(
+ want["name"].split("Bundle-Ether")[1]
+ )
+ if diff.get("mode"):
+ bundle_cmd += " mode {0}".format(diff.get("mode"))
+ diff_cmd.append(bundle_cmd)
+ pad_commands(diff_cmd, diff["member"])
+ commands.extend(diff_cmd)
+
+ return commands
+
+ def _render_bundle_del_commands(self, want, have):
+ """ The command generator for delete commands
+ w.r.t bundles
+ :rtype: A list
+ :returns: the commands necessary to update member
+ interfaces
+ """
+ commands = []
+ if not want:
+ want = {"name": have["name"]}
+
+ want_copy = deepcopy(want)
+ have_copy = deepcopy(have)
+ want_copy.pop("members", [])
+ have_copy.pop("members", [])
+
+ to_delete = dict_delete(have_copy, remove_empties(want_copy))
+ if to_delete:
+ for key, value in iteritems(
+ flatten_dict(remove_empties(to_delete))
+ ):
+ commands.append(
+ self._compute_commands(key=key, value=value, remove=True)
+ )
+
+ return commands
+
+ def _render_interface_del_commands(self, want, have):
+ """ The command generator for delete commands
+ w.r.t member interfaces
+ :rtype: A list
+ :returns: the commands necessary to update member
+ interfaces
+ """
+ commands = []
+ if not want:
+ want = {}
+ have_members = have.get("members")
+
+ if have_members:
+ have_members = param_list_to_dict(
+ deepcopy(have_members), unique_key="member"
+ )
+ want_members = param_list_to_dict(
+ deepcopy(want).get("members", []), unique_key="member"
+ )
+
+ for key in have_members:
+ if key not in want_members:
+ member_cmd = ["no bundle id"]
+ pad_commands(member_cmd, key)
+ commands.extend(member_cmd)
+
+ return commands
+
+ def _purge_attribs(self, intf):
+ """ The command generator for purging attributes
+ :rtype: A list
+ :returns: the commands necessary to purge attributes
+ """
+ commands = []
+ have_copy = deepcopy(intf)
+ members = have_copy.pop("members", [])
+
+ to_delete = dict_delete(
+ have_copy, remove_empties({"name": have_copy["name"]})
+ )
+ if to_delete:
+ for key, value in iteritems(
+ flatten_dict(remove_empties(to_delete))
+ ):
+ commands.append(
+ self._compute_commands(key=key, value=value, remove=True)
+ )
+
+ if commands:
+ pad_commands(commands, intf["name"])
+
+ if members:
+ members = param_list_to_dict(
+ deepcopy(members), unique_key="member"
+ )
+ for key in members:
+ member_cmd = ["no bundle id"]
+ pad_commands(member_cmd, key)
+ commands.extend(member_cmd)
+
+ return commands
+
+ def _compute_commands(self, key, value, remove=False):
+ """ The method generates LAG commands based on the
+ key, value passed. When remove is set to True,
+ the command is negated.
+ :rtype: str
+ :returns: a command based on the `key`, `value` pair
+ passed and the value of `remove`
+ """
+ if key == "mode":
+ cmd = "lacp mode {0}".format(value)
+
+ elif key == "load_balancing_hash":
+ cmd = "bundle load-balancing hash {0}".format(value)
+
+ elif key == "max_active":
+ cmd = "bundle maximum-active links {0}".format(value)
+
+ elif key == "min_active":
+ cmd = "bundle minimum-active links {0}".format(value)
+
+ if remove:
+ cmd = "no {0}".format(cmd)
+
+ return cmd
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_global/lldp_global.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_global/lldp_global.py
new file mode 100644
index 00000000..af15f791
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_global/lldp_global.py
@@ -0,0 +1,221 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_lldp_global class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ dict_diff,
+ remove_empties,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+from ansible.module_utils.six import iteritems
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ flatten_dict,
+ dict_delete,
+)
+
+
+class Lldp_global(ConfigBase):
+ """
+ The iosxr_lldp class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lldp_global"]
+
+ def __init__(self, module):
+ super(Lldp_global, self).__init__(module)
+
+ def get_lldp_global_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lldp_facts = facts["ansible_network_resources"].get("lldp_global")
+ if not lldp_facts:
+ return {}
+ return lldp_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+ if self.state in self.ACTION_STATES:
+ existing_lldp_global_facts = self.get_lldp_global_facts()
+ else:
+ existing_lldp_global_facts = {}
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lldp_global_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lldp_global_facts = self.get_lldp_global_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lldp_global_facts(data=running_config)
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lldp_global_facts
+ if result["changed"]:
+ result["after"] = changed_lldp_global_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_lldp_global_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_lldp_global_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ if not want and self._module.params["state"] == "deleted":
+ want = {}
+ have = existing_lldp_global_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ if state in ("merged", "replaced", "rendered") and not want:
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ if state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif state in ("merged", "rendered"):
+ commands = self._state_merged(want, have)
+ elif state == "replaced":
+ commands = self._state_replaced(want, have)
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ commands.extend(self._state_deleted(want, have))
+
+ commands.extend(self._state_merged(want, have))
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+ updates = dict_diff(have, want)
+ if updates:
+ for key, value in iteritems(flatten_dict(remove_empties(updates))):
+ commands.append(self._compute_commands(key, value))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ for key, value in iteritems(
+ flatten_dict(dict_delete(have, remove_empties(want)))
+ ):
+ cmd = self._compute_commands(key, value, remove=True)
+ if cmd:
+ commands.append(cmd)
+
+ return commands
+
+ def _compute_commands(self, key, value=None, remove=False):
+ if key in ["holdtime", "reinit", "timer"]:
+ cmd = "lldp {0} {1}".format(key, value)
+ if remove:
+ return "no {0}".format(cmd)
+ else:
+ return cmd
+
+ elif key == "subinterfaces":
+ cmd = "lldp subinterfaces enable"
+ if value and not remove:
+ return cmd
+ elif (not value and not remove) or (value and remove):
+ return "no {0}".format(cmd)
+
+ else:
+ cmd = "lldp tlv-select {0} disable".format(key.replace("_", "-"))
+ if not value and not remove:
+ return cmd
+ elif (value and not remove) or (not value and remove):
+ return "no {0}".format(cmd)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_interfaces/lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_interfaces/lldp_interfaces.py
new file mode 100644
index 00000000..70394f10
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/lldp_interfaces/lldp_interfaces.py
@@ -0,0 +1,278 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_lldp_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ search_obj_in_list,
+ dict_diff,
+ remove_empties,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+from ansible.module_utils.six import iteritems
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ dict_delete,
+ pad_commands,
+ flatten_dict,
+)
+
+
+class Lldp_interfaces(ConfigBase):
+ """
+ The iosxr_lldp_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lldp_interfaces"]
+
+ def __init__(self, module):
+ super(Lldp_interfaces, self).__init__(module)
+
+ def get_lldp_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lldp_interfaces_facts = facts["ansible_network_resources"].get(
+ "lldp_interfaces"
+ )
+ if not lldp_interfaces_facts:
+ return []
+ return lldp_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lldp_interfaces_facts = self.get_lldp_interfaces_facts()
+ else:
+ existing_lldp_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lldp_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lldp_interfaces_facts = self.get_lldp_interfaces_facts()
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lldp_interfaces_facts(
+ data=running_config
+ )
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lldp_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_lldp_interfaces_facts
+ elif self.state == "gathered":
+ result["gathered"] = changed_lldp_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_lldp_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ have = existing_lldp_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ commands = []
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ if state == "overridden":
+ commands.extend(self._state_overridden(want, have))
+
+ elif state == "deleted":
+ if not want:
+ for intf in have:
+ commands.extend(
+ self._state_deleted({"name": intf["name"]}, intf)
+ )
+ else:
+ for item in want:
+ obj_in_have = search_obj_in_list(item["name"], have)
+ commands.extend(self._state_deleted(item, obj_in_have))
+
+ else:
+ for item in want:
+ name = item["name"]
+ obj_in_have = search_obj_in_list(name, have)
+
+ if state in ("merged", "rendered"):
+ commands.extend(self._state_merged(item, obj_in_have))
+
+ elif state == "replaced":
+ commands.extend(self._state_replaced(item, obj_in_have))
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ replaced_commands = []
+ merged_commands = []
+
+ if have:
+ replaced_commands = self._state_deleted(want, have)
+
+ merged_commands = self._state_merged(want, have)
+
+ if merged_commands and replaced_commands:
+ del merged_commands[0]
+
+ commands.extend(replaced_commands)
+ commands.extend(merged_commands)
+
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for intf in have:
+ intf_in_want = search_obj_in_list(intf["name"], want)
+ if not intf_in_want:
+ commands.extend(
+ self._state_deleted({"name": intf["name"]}, intf)
+ )
+
+ for intf in want:
+ intf_in_have = search_obj_in_list(intf["name"], have)
+ commands.extend(self._state_replaced(intf, intf_in_have))
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+ if not have:
+ have = {"name": want["name"]}
+
+ for key, value in iteritems(
+ flatten_dict(remove_empties(dict_diff(have, want)))
+ ):
+ commands.append(self._compute_commands(key, value))
+
+ if commands:
+ pad_commands(commands, want["name"])
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+
+ for key, value in iteritems(
+ flatten_dict(dict_delete(have, remove_empties(want)))
+ ):
+ commands.append(self._compute_commands(key, value, remove=True))
+
+ if commands:
+ pad_commands(commands, have["name"])
+
+ return commands
+
+ def _compute_commands(self, key, value=None, remove=False):
+ if key == "mac_address":
+ cmd = "lldp destination mac-address {0}".format(value)
+ if remove:
+ return "no {0}".format(cmd)
+ else:
+ return cmd
+
+ else:
+ cmd = "lldp {0} disable".format(key)
+ if not value and not remove:
+ return cmd
+ elif (value and not remove) or (not value and remove):
+ return "no {0}".format(cmd)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospf_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospf_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospf_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospf_interfaces/ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospf_interfaces/ospf_interfaces.py
new file mode 100644
index 00000000..343124b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospf_interfaces/ospf_interfaces.py
@@ -0,0 +1,240 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The iosxr_ospf_interfaces config file.
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to its desired end-state is
+created.
+"""
+
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.rm_templates.ospf_interfaces import (
+ Ospf_interfacesTemplate,
+)
+
+
+class Ospf_interfaces(ResourceModule):
+ """
+ The iosxr_ospf_interfaces config class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["ospf_interfaces"]
+
+ def __init__(self, module):
+ super(Ospf_interfaces, self).__init__(
+ empty_fact_val=[],
+ facts_module=Facts(module),
+ module=module,
+ resource="ospf_interfaces",
+ tmplt=Ospf_interfacesTemplate(),
+ )
+ self.parsers = [
+ "authentication.message_digest",
+ "authentication.null_auth",
+ "authentication.message_digest.keychain",
+ "authentication_key",
+ "bfd.minimum_interval",
+ "bfd.multiplier",
+ "bfd.fast_detect.set",
+ "bfd.fast_detect.disable",
+ "bfd.fast_detect.strict_mode",
+ "cost",
+ "cost_fallback",
+ "dead_interval",
+ "demand_circuit",
+ "flood_reduction",
+ "hello_interval",
+ "link_down.set",
+ "link_down.disable",
+ "message_digest_key",
+ "mpls.set_ldp",
+ "mpls.ldp_sync",
+ "mpls.ldp_sync_disable",
+ "mtu_ignore",
+ "network",
+ "packet_size",
+ "passive",
+ "prefix_suppression.disable",
+ "prefix_suppression.secondary_address",
+ "priority",
+ "retransmit_interval",
+ "security.ttl_hops",
+ "security.ttl",
+ "transmit_delay",
+ ]
+
+ def execute_module(self):
+ """ Execute the module
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ if self.state not in ["parsed", "gathered"]:
+ self.generate_commands()
+ self.run_commands()
+ return self.result
+
+ def generate_commands(self):
+ """ Generate configuration commands to send based on
+ want, have and desired state.
+ """
+ wantd = {entry["name"]: entry for entry in self.want}
+ haved = {entry["name"]: entry for entry in self.have}
+
+ # turn all lists of dicts into dicts prior to merge
+ for entry in wantd, haved:
+ self._ospf_int_list_to_dict(entry)
+
+ # if state is merged, merge want onto have and then compare
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, empty out wantd and set haved to wantd
+ if self.state == "deleted":
+ haved = {
+ k: v for k, v in iteritems(haved) if k in wantd or not wantd
+ }
+ have_int = []
+ if wantd == {}:
+ for k, have in iteritems(haved):
+ self._remove_ospf_int(have)
+
+ for k, have in iteritems(haved):
+ if k in wantd:
+ have_int.append(k)
+ self._remove_ospf_int(have)
+ wantd = {}
+
+ # remove superfluous config for overridden and deleted
+ if self.state == "overridden":
+ for k, have in iteritems(haved):
+ if k not in wantd:
+ self._remove_ospf_int(have)
+ if self.state != "deleted":
+ for k, want in iteritems(wantd):
+ self._compare(want=want, have=haved.pop(k, {}))
+
+ def _remove_ospf_int(self, entry):
+ int_name = entry.get("name", {})
+ int_addr = entry.get("address_family", {})
+ for k, addr in iteritems(int_addr):
+ for key, value in addr["processes"].items():
+ rem_entry = {
+ "name": int_name,
+ "afi": addr["afi"],
+ "process": value["process_id"],
+ "area": value["area"],
+ }
+ self.addcmd(rem_entry, "name", True)
+
+ def _compare(self, want, have):
+ """Leverages the base class `compare()` method and
+ populates the list of commands to be run by comparing
+ the `want` and `have` data with the `parsers` defined
+ for the Ospf_interfaces network resource.
+ """
+ self._compare_interface(want=want, have=have)
+
+ self._compare_addr_family(want=want, have=have)
+
+ def _compare_interface(self, want, have):
+ wdict = want.get("address_family", {})
+ hdict = have.get("address_family", {})
+ wname = want.get("name")
+ hname = have.get("name")
+ h_value = {}
+
+ for key, w_value in iteritems(wdict):
+ if hdict and hdict.get(key):
+ h_value = hdict[key]
+ else:
+ h_value = None
+ w = {
+ "name": wname,
+ "type": w_value["afi"],
+ "address_family": w_value,
+ }
+ if h_value is not None:
+ h = {
+ "name": hname,
+ "type": h_value["afi"],
+ "address_family": h_value,
+ }
+ else:
+ h = {}
+ self.compare(parsers="name", want=w, have=h)
+
+ def _compare_addr_family(self, want, have):
+ wdict = want.get("address_family", {})
+ hdict = have.get("address_family", {})
+ wname = want.get("name")
+ hname = have.get("name")
+ # Fetch the area info as that would be common to all the attributes per interface
+ for name, entry in iteritems(wdict):
+ w_process = {}
+ h_process = {}
+ for key, value in iteritems(entry):
+ if key == "processes":
+ for pname, pentry in iteritems(value):
+ w_process = pentry
+ for key, param in iteritems(entry):
+ w_addr = {"afi": name, key: param, "processes": w_process}
+ h_addr = {}
+ if hdict.get(name):
+ hdict_entry = hdict.get(name)
+ for item, value in iteritems(hdict_entry):
+ if item == "processes":
+ for pname, pentry in iteritems(value):
+ h_process = pentry
+ h_addr = {
+ "afi": name,
+ key: hdict[name].pop(key, {}),
+ "processes": h_process,
+ }
+ w = {"name": wname, "address_family": w_addr}
+ h = {"name": hname, "address_family": h_addr}
+ self.compare(parsers=self.parsers, want=w, have=h)
+ for name, entry in iteritems(hdict):
+ for key, param in iteritems(entry):
+ h_addr = {"afi": name, key: param}
+ w_addr = {}
+ w = {"name": wname, "address_family": w_addr}
+ h = {"name": hname, "address_family": h_addr}
+ self.compare(parsers=self.parsers, want=w, have=h)
+
+ def _ospf_int_list_to_dict(self, entry):
+ for name, family in iteritems(entry):
+ if "address_family" in family:
+ family["address_family"] = {
+ entry["afi"]: entry
+ for entry in family.get("address_family", [])
+ }
+ self._ospf_int_list_to_dict(family["address_family"])
+ for name, ospf_processes in iteritems(entry):
+ if "processes" in ospf_processes:
+ ospf_processes["processes"] = {
+ entry["process_id"]: entry
+ for entry in ospf_processes.get("processes", [])
+ }
+ self._ospf_int_list_to_dict(ospf_processes["processes"])
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv2/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv2/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv2/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv2/ospfv2.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv2/ospfv2.py
new file mode 100644
index 00000000..d593c7ac
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv2/ospfv2.py
@@ -0,0 +1,262 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_ospfv2 class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from copy import deepcopy
+from ansible.module_utils.six import iteritems
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.rm_templates.ospfv2 import (
+ Ospfv2Template,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+
+
+class Ospfv2(ResourceModule):
+ """
+ The ios_ospfv2 class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["ospfv2"]
+
+ def __init__(self, module):
+ super(Ospfv2, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="ospfv2",
+ tmplt=Ospfv2Template(),
+ )
+
+ def execute_module(self):
+ """ Execute the module
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ self.gen_config()
+ self.run_commands()
+
+ return self.result
+
+ def gen_config(self):
+ """ Select the appropriate function based on the state provided
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ if self.want:
+ wantd = {
+ (entry["process_id"], entry.get("vrf")): entry
+ for entry in self.want.get("processes", [])
+ }
+ else:
+ wantd = {}
+ if self.have:
+ haved = {
+ (entry["process_id"], entry.get("vrf")): entry
+ for entry in self.have.get("processes", [])
+ }
+ else:
+ haved = {}
+
+ # turn all lists of dicts into dicts prior to merge
+ for thing in wantd, haved:
+ for _pid, proc in iteritems(thing):
+ for area in proc.get("areas", []):
+ virtual_link = {
+ entry["id"]: entry
+ for entry in area.get("virtual_link", [])
+ }
+ if bool(virtual_link):
+ area["virtual_link"] = virtual_link
+ ranges = {
+ entry["address"]: entry
+ for entry in area.get("ranges", [])
+ }
+ if bool(ranges):
+ area["ranges"] = ranges
+
+ proc["areas"] = {
+ entry["area_id"]: entry for entry in proc.get("areas", [])
+ }
+ if proc.get("distribute_list"):
+ if "acls" in proc.get("distribute_list"):
+ proc["distribute_list"]["acls"] = {
+ entry["name"]: entry
+ for entry in proc["distribute_list"].get(
+ "acls", []
+ )
+ }
+
+ # if state is merged, merge want onto have
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, limit the have to anything in want
+ # set want to nothing
+ if self.state == "deleted":
+ haved = {
+ k: v for k, v in iteritems(haved) if k in wantd or not wantd
+ }
+ wantd = {}
+
+ # delete processes first so we do run into "more than one" errors
+ if self.state == "deleted":
+ haved_del = deepcopy(haved)
+ want_process = {}
+ for k, t_want in iteritems(haved_del):
+ want_process["process_id"] = t_want.get("process_id")
+ if not (len(t_want) == 2 and not t_want.get("areas")):
+ self._compare(want=want_process, have=haved_del.get(k, {}))
+ if self.state == "overridden":
+ haved_del = deepcopy(haved)
+ want = {}
+ for k, t_want in iteritems(haved_del):
+ if k not in wantd:
+ want["process_id"] = t_want.get("process_id")
+ if not (len(t_want) == 2 and not t_want.get("areas")):
+ self._compare(want=want, have=haved_del.get(k, {}))
+
+ for k, want in iteritems(wantd):
+ self._compare(want=want, have=haved.pop(k, {}))
+
+ def _compare(self, want, have):
+ parsers = [
+ "bfd",
+ "cost",
+ "weight",
+ "passive",
+ "priority",
+ "protocol",
+ "auto_cost",
+ "bandwidth",
+ "flood_reduction",
+ "default_metric",
+ "default_weight",
+ "router_id",
+ "demand_circuit",
+ "packet_size",
+ "transmit_delay",
+ "summary_in",
+ "external_out",
+ "dead_interval",
+ "hello_interval",
+ "authentication",
+ "adjacency_stagger",
+ "retransmit_interval",
+ "mtu_ignore",
+ "bfd.fast_detect",
+ "capability",
+ "capability.opaque",
+ "admin_distance",
+ "ospf_distance",
+ "address_family_unicast",
+ "loopback_stub_network",
+ "authentication.message_digest",
+ "default_information_originate",
+ "link_down_fast_detect",
+ "nsr",
+ "database_filter",
+ "log_adjacency",
+ "distribute_bgp_ls",
+ "distribute_link_state",
+ "max_lsa",
+ "max_metric",
+ "mpls_ldp",
+ "mpls_traffic_eng",
+ "microloop_avoidance",
+ "prefix_suppression",
+ "protocol_shutdown",
+ "timers.lsa",
+ "timers.graceful_shutdown",
+ "throttle.lsa_all",
+ "throttle.spf",
+ "throttle.fast_reroute",
+ "timers.pacing_flood",
+ ]
+
+ if want != have:
+ self.addcmd(want or have, "pid", False)
+ self.compare(parsers, want, have)
+ self._areas_compare(want, have)
+
+ def _areas_compare(self, want, have):
+ wareas = want.get("areas", {})
+ hareas = have.get("areas", {})
+ for name, entry in iteritems(wareas):
+ self._area_compare(want=entry, have=hareas.pop(name, {}))
+ for name, entry in iteritems(hareas):
+ self._area_compare(want={}, have=entry)
+
+ def _area_compare(self, want, have):
+ parsers = [
+ "area.authentication",
+ "area.authentication_key",
+ "area.authentication.message_digest",
+ "area.mpls_traffic_eng",
+ "area.mpls_ldp",
+ "area.bfd",
+ "area.bfd.fast_detect",
+ "area.nssa",
+ "area.nssa.default_information_originate",
+ "area.nssa.translate",
+ "area.default_cost",
+ "area.stub",
+ "area.ranges",
+ "area.cost",
+ "area.dead_interval",
+ "area.hello_interval",
+ "area.transmit_delay",
+ "area.mtu_ignore",
+ "area.packet_size",
+ "area.priority",
+ "area.weight",
+ "area.external_out",
+ "area.summary_in",
+ "area.demand_circuit",
+ "area.passive",
+ ]
+ self.compare(parsers=parsers, want=want, have=have)
+ self._areas_compare_virtual_link(want, have)
+
+ def _areas_compare_virtual_link(self, want, have):
+ wvlinks = want.get("virtual_link", {})
+ hvlinks = have.get("virtual_link", {})
+ for name, entry in iteritems(wvlinks):
+ self._area_compare_virtual_link(
+ want=entry, have=hvlinks.pop(name, {})
+ )
+ for name, entry in iteritems(hvlinks):
+ self._area_compare_virtual_link(want={}, have=entry)
+
+ def _area_compare_virtual_link(self, want, have):
+ parsers = [
+ "virtual_link.authentication",
+ "virtual_link.authentication_key",
+ "virtual_link.authentication.message_digest",
+ "virtual_link.hello_interval",
+ "virtual_link.dead_interval",
+ "virtual_link.retransmit_interval",
+ ]
+ self.compare(parsers=parsers, want=want, have=have)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv3/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv3/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv3/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv3/ospfv3.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv3/ospfv3.py
new file mode 100644
index 00000000..f68b1292
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/ospfv3/ospfv3.py
@@ -0,0 +1,255 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from copy import deepcopy
+from ansible.module_utils.six import iteritems
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.rm_templates.ospfv3 import (
+ Ospfv3Template,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+
+
+class Ospfv3(ResourceModule):
+ """
+ The ios_ospfv3 class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["ospfv3"]
+
+ def __init__(self, module):
+ super(Ospfv3, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="ospfv3",
+ tmplt=Ospfv3Template(),
+ )
+
+ def execute_module(self):
+ """ Execute the module
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ self.gen_config()
+ self.run_commands()
+
+ return self.result
+
+ def gen_config(self):
+ """ Select the appropriate function based on the state provided
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ if self.want:
+ wantd = {
+ (entry["process_id"], entry.get("vrf")): entry
+ for entry in self.want.get("processes", [])
+ }
+ else:
+ wantd = {}
+ if self.have:
+ haved = {
+ (entry["process_id"], entry.get("vrf")): entry
+ for entry in self.have.get("processes", [])
+ }
+ else:
+ haved = {}
+
+ # turn all lists of dicts into dicts prior to merge
+ for thing in wantd, haved:
+ for _pid, proc in iteritems(thing):
+ for area in proc.get("areas", []):
+ virtual_link = {
+ entry["id"]: entry
+ for entry in area.get("virtual_link", [])
+ }
+ if bool(virtual_link):
+ area["virtual_link"] = virtual_link
+ ranges = {
+ entry["address"]: entry
+ for entry in area.get("ranges", [])
+ }
+ if bool(ranges):
+ area["ranges"] = ranges
+
+ proc["areas"] = {
+ entry["area_id"]: entry for entry in proc.get("areas", [])
+ }
+ if proc.get("distribute_list"):
+ if "acls" in proc.get("distribute_list"):
+ proc["distribute_list"]["acls"] = {
+ entry["name"]: entry
+ for entry in proc["distribute_list"].get(
+ "acls", []
+ )
+ }
+
+ # if state is merged, merge want onto have
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, limit the have to anything in want
+ # set want to nothing
+ if self.state == "deleted":
+ haved = {
+ k: v for k, v in iteritems(haved) if k in wantd or not wantd
+ }
+ wantd = {}
+
+ # delete processes first so we do run into "more than one" errors
+ if self.state == "deleted":
+ haved_del = deepcopy(haved)
+ want_process = {}
+ for k, t_want in iteritems(haved_del):
+ want_process["process_id"] = t_want.get("process_id")
+ if not (len(t_want) == 2 and not t_want.get("areas")):
+ self._compare(want=want_process, have=haved_del.get(k, {}))
+ if self.state == "overridden":
+ haved_del = deepcopy(haved)
+ want = {}
+ for k, t_want in iteritems(haved_del):
+ if k not in wantd:
+ want["process_id"] = t_want.get("process_id")
+ if not (len(t_want) == 2 and not t_want.get("areas")):
+ self._compare(want=want, have=haved_del.get(k, {}))
+
+ for k, want in iteritems(wantd):
+ self._compare(want=want, have=haved.pop(k, {}))
+
+ def _compare(self, want, have):
+ parsers = [
+ "bfd.minimum_interval",
+ "bfd.multiplier",
+ "cost",
+ "weight",
+ "passive",
+ "priority",
+ "protocol",
+ "auto_cost",
+ "bandwidth",
+ "flood_reduction",
+ "default_metric",
+ "default_weight",
+ "router_id",
+ "demand_circuit",
+ "packet_size",
+ "transmit_delay",
+ "dead_interval",
+ "hello_interval",
+ "authentication",
+ "retransmit_interval",
+ "mtu_ignore",
+ "bfd.fast_detect",
+ "capability",
+ "capability.opaque",
+ "admin_distance",
+ "ospf_distance",
+ "address_family_unicast",
+ "loopback_stub_network",
+ "authentication.ipsec",
+ "default_information_originate",
+ "link_down_fast_detect",
+ "nsr",
+ "database_filter",
+ "log_adjacency",
+ "distribute_bgp_ls",
+ "distribute_link_state",
+ "max_lsa",
+ "max_metric",
+ "mpls_ldp",
+ "mpls_traffic_eng",
+ "microloop_avoidance",
+ "prefix_suppression",
+ "protocol_shutdown",
+ "timers.lsa",
+ "timers.graceful_shutdown",
+ "throttle.lsa_all",
+ "throttle.spf",
+ "throttle.fast_reroute",
+ "timers.pacing_flood",
+ ]
+
+ if want != have:
+ self.addcmd(want or have, "pid", False)
+ self.compare(parsers, want, have)
+ self._areas_compare(want, have)
+
+ def _areas_compare(self, want, have):
+ wareas = want.get("areas", {})
+ hareas = have.get("areas", {})
+ for name, entry in iteritems(wareas):
+ self._area_compare(want=entry, have=hareas.pop(name, {}))
+ for name, entry in iteritems(hareas):
+ self._area_compare(want={}, have=entry)
+
+ def _area_compare(self, want, have):
+ parsers = [
+ "area.authentication",
+ "area.authentication.ipsec",
+ "area.mpls_traffic_eng",
+ "area.mpls_ldp",
+ "area.bfd.minimum_interval",
+ "area.bfd.multiplier",
+ "area.bfd.fast_detect",
+ "area.nssa",
+ "area.nssa.default_information_originate",
+ "area.nssa.translate",
+ "area.default_cost",
+ "area.stub",
+ "area.ranges",
+ "area.cost",
+ "area.dead_interval",
+ "area.hello_interval",
+ "area.transmit_delay",
+ "area.mtu_ignore",
+ "area.packet_size",
+ "area.priority",
+ "area.weight",
+ "area.external_out",
+ "area.summary_in",
+ "area.demand_circuit",
+ "area.passive",
+ ]
+ self.compare(parsers=parsers, want=want, have=have)
+ self._areas_compare_virtual_link(want, have)
+
+ def _areas_compare_virtual_link(self, want, have):
+ wvlinks = want.get("virtual_link", {})
+ hvlinks = have.get("virtual_link", {})
+ for name, entry in iteritems(wvlinks):
+ self._area_compare_virtual_link(
+ want=entry, have=hvlinks.pop(name, {})
+ )
+ for name, entry in iteritems(hvlinks):
+ self._area_compare_virtual_link(want={}, have=entry)
+
+ def _area_compare_virtual_link(self, want, have):
+ parsers = [
+ "virtual_link.authentication",
+ "virtual_link.authentication_key",
+ "virtual_link.authentication.message_digest",
+ "virtual_link.hello_interval",
+ "virtual_link.dead_interval",
+ "virtual_link.retransmit_interval",
+ ]
+ self.compare(parsers=parsers, want=want, have=have)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/static_routes/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/static_routes/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/static_routes/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/static_routes/static_routes.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/static_routes/static_routes.py
new file mode 100644
index 00000000..246966e4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/config/static_routes/static_routes.py
@@ -0,0 +1,549 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_static_routes class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ search_obj_in_list,
+ remove_empties,
+ dict_diff,
+ dict_merge,
+)
+
+
+class Static_routes(ConfigBase):
+ """
+ The iosxr_static_routes class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["static_routes"]
+
+ def __init__(self, module):
+ super(Static_routes, self).__init__(module)
+
+ def get_static_routes_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ static_routes_facts = facts["ansible_network_resources"].get(
+ "static_routes"
+ )
+ if not static_routes_facts:
+ return []
+ return static_routes_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_static_routes_facts = self.get_static_routes_facts()
+ else:
+ existing_static_routes_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_static_routes_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_static_routes_facts = self.get_static_routes_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_static_routes_facts(
+ data=running_config
+ )
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_static_routes_facts
+ if result["changed"]:
+ result["after"] = changed_static_routes_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_static_routes_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_static_routes_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ have = existing_static_routes_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ commands = []
+
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ if state == "overridden":
+ commands.extend(self._state_overridden(want, have))
+
+ elif state == "deleted":
+ if not want:
+ if len(have) >= 1:
+ return "no router static"
+
+ else:
+ for w_item in want:
+ obj_in_have = self._find_vrf(w_item, have)
+ if obj_in_have:
+ commands.extend(
+ self._state_deleted(
+ remove_empties(w_item), obj_in_have
+ )
+ )
+
+ else:
+ for w_item in want:
+ obj_in_have = self._find_vrf(w_item, have)
+ if state == "merged" or self.state == "rendered":
+ commands.extend(
+ self._state_merged(remove_empties(w_item), obj_in_have)
+ )
+
+ elif state == "replaced":
+ commands.extend(
+ self._state_replaced(
+ remove_empties(w_item), obj_in_have
+ )
+ )
+
+ if commands:
+ commands.insert(0, "router static")
+
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ for want_afi in want.get("address_families", []):
+ have_afi = (
+ self.find_af_context(
+ want_afi, have.get("address_families", [])
+ )
+ or {}
+ )
+ update_commands = []
+ for want_route in want_afi.get("routes", []):
+ have_route = (
+ search_obj_in_list(
+ want_route["dest"],
+ have_afi.get("routes", []),
+ key="dest",
+ )
+ or {}
+ )
+
+ rotated_have_next_hops = self.rotate_next_hops(
+ have_route.get("next_hops", {})
+ )
+ rotated_want_next_hops = self.rotate_next_hops(
+ want_route.get("next_hops", {})
+ )
+
+ for key in rotated_have_next_hops.keys():
+ if key not in rotated_want_next_hops:
+ cmd = "no {0}".format(want_route["dest"])
+ for item in key:
+ if "." in item or ":" in item or "/" in item:
+ cmd += " {0}".format(item)
+ else:
+ cmd += " vrf {0}".format(item)
+ update_commands.append(cmd)
+
+ for key, value in iteritems(rotated_want_next_hops):
+ if key in rotated_have_next_hops:
+ existing = True
+ have_exit_point_attribs = rotated_have_next_hops[key]
+
+ else:
+ existing = False
+ have_exit_point_attribs = {}
+
+ updates = dict_diff(have_exit_point_attribs, value)
+
+ if updates or not existing:
+ update_commands.append(
+ self._compute_commands(
+ dest=want_route["dest"],
+ next_hop=key,
+ updates=updates,
+ )
+ )
+
+ if update_commands:
+ update_commands.insert(
+ 0,
+ "address-family {0} {1}".format(
+ want_afi["afi"], want_afi["safi"]
+ ),
+ )
+ commands.extend(update_commands)
+
+ if "vrf" in want and update_commands:
+ commands.insert(0, "vrf {0}".format(want["vrf"]))
+
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+
+ # Iterate through all the entries, i.e., VRFs and Global entry in have
+ # and fully remove the ones that are not present in want and then call
+ # replaced
+
+ for h_item in have:
+ w_item = self._find_vrf(h_item, want)
+
+ # Delete all the top-level keys (VRFs/Global Route Entry) that are
+ # not specified in want.
+ if not w_item:
+ if "vrf" in h_item:
+ commands.append("no vrf {0}".format(h_item["vrf"]))
+ else:
+ for have_afi in h_item.get("address_families", []):
+ commands.append(
+ "no address-family {0} {1}".format(
+ have_afi["afi"], have_afi["safi"]
+ )
+ )
+
+ # For VRFs/Global Entry present in want, we also need to delete extraneous routes
+ # from them. We cannot reuse `_state_replaced` for this purpose since its scope is
+ # limited to replacing a single `dest`.
+ else:
+ del_cmds = []
+ for have_afi in h_item.get("address_families", []):
+ want_afi = (
+ self.find_af_context(
+ have_afi, w_item.get("address_families", [])
+ )
+ or {}
+ )
+ update_commands = []
+ for h_route in have_afi.get("routes", []):
+ w_route = (
+ search_obj_in_list(
+ h_route["dest"],
+ want_afi.get("routes", []),
+ key="dest",
+ )
+ or {}
+ )
+ if not w_route:
+ update_commands.append(
+ "no {0}".format(h_route["dest"])
+ )
+
+ if update_commands:
+ update_commands.insert(
+ 0,
+ "address-family {0} {1}".format(
+ want_afi["afi"], want_afi["safi"]
+ ),
+ )
+ del_cmds.extend(update_commands)
+
+ if "vrf" in want and update_commands:
+ del_cmds.insert(0, "vrf {0}".format(want["vrf"]))
+
+ commands.extend(del_cmds)
+
+ # We finally call `_state_replaced` to replace exiting `dest` entries
+ # or add new ones as specified in want.
+ for w_item in want:
+ h_item = self._find_vrf(w_item, have)
+ commands.extend(
+ self._state_replaced(remove_empties(w_item), h_item)
+ )
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+
+ for want_afi in want.get("address_families", []):
+ have_afi = (
+ self.find_af_context(
+ want_afi, have.get("address_families", [])
+ )
+ or {}
+ )
+
+ update_commands = []
+ for want_route in want_afi.get("routes", []):
+ have_route = (
+ search_obj_in_list(
+ want_route["dest"],
+ have_afi.get("routes", []),
+ key="dest",
+ )
+ or {}
+ )
+
+ # convert the next_hops list of dictionaries to dictionary of
+ # dictionaries with (`dest_vrf`, `forward_router_address`, `interface`) tuple
+ # being the key for each dictionary.
+ # a combination of these 3 attributes uniquely identifies a route entry.
+ # in case `dest_vrf` is not specified, `forward_router_address` and `interface`
+ # become the unique identifier
+ rotated_have_next_hops = self.rotate_next_hops(
+ have_route.get("next_hops", {})
+ )
+ rotated_want_next_hops = self.rotate_next_hops(
+ want_route.get("next_hops", {})
+ )
+
+ # for every dict in the want next_hops dictionaries, if the key
+ # is present in `rotated_have_next_hops`, we set `existing` to True,
+ # which means the the given want exit point exists and we run dict_diff
+ # on `value` which is basically all the other attributes of the exit point
+ # if the key is not present, it means that this is a new exit point
+ for key, value in iteritems(rotated_want_next_hops):
+ if key in rotated_have_next_hops:
+ existing = True
+ have_exit_point_attribs = rotated_have_next_hops[key]
+
+ else:
+ existing = False
+ have_exit_point_attribs = {}
+
+ updates = dict_diff(have_exit_point_attribs, value)
+ if updates or not existing:
+ update_commands.append(
+ self._compute_commands(
+ dest=want_route["dest"],
+ next_hop=key,
+ # dict_merge() is necessary to make sure that we
+ # don't end up overridding the entry and also to
+ # allow incremental updates
+ updates=dict_merge(
+ rotated_have_next_hops.get(key, {}),
+ updates,
+ ),
+ )
+ )
+
+ if update_commands:
+ update_commands.insert(
+ 0,
+ "address-family {0} {1}".format(
+ want_afi["afi"], want_afi["safi"]
+ ),
+ )
+ commands.extend(update_commands)
+
+ if "vrf" in want and update_commands:
+ commands.insert(0, "vrf {0}".format(want["vrf"]))
+
+ return commands
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if "address_families" not in want:
+ return ["no vrf {0}".format(want["vrf"])]
+
+ else:
+ for want_afi in want.get("address_families", []):
+ have_afi = (
+ self.find_af_context(
+ want_afi, have.get("address_families", [])
+ )
+ or {}
+ )
+ if have_afi:
+ commands.append(
+ "no address-family {0} {1}".format(
+ have_afi["afi"], have_afi["safi"]
+ )
+ )
+ if "vrf" in want and commands:
+ commands.insert(0, "vrf {0}".format(want["vrf"]))
+
+ return commands
+
+ def _find_vrf(self, item, entries):
+ """ This method iterates through the items
+ in `entries` and returns the object that
+ matches `item`.
+
+ :rtype: A dict
+ :returns: the obj in `entries` that matches `item`
+ """
+ obj = {}
+ afi = item.get("vrf")
+
+ if afi:
+ obj = search_obj_in_list(afi, entries, key="vrf") or {}
+ else:
+ for x in entries:
+ if "vrf" not in remove_empties(x):
+ obj = x
+ break
+ return obj
+
+ def find_af_context(self, want_af_context, have_address_families):
+ """ This method iterates through the have AFs
+ and returns the one that matches the want AF
+
+ :rtype: A dict
+ :returns: the corresponding AF in have AFs
+ that matches the want AF
+ """
+ for have_af in have_address_families:
+ if (
+ have_af["afi"] == want_af_context["afi"]
+ and have_af["safi"] == want_af_context["safi"]
+ ):
+ return have_af
+
+ def rotate_next_hops(self, next_hops):
+ """ This method iterates through the list of
+ next hops for a given destination network
+ and converts it to a dictionary of dictionaries.
+ Each dictionary has a primary key indicated by the
+ tuple of `dest_vrf`, `forward_router_address` and
+ `interface` and the value of this key is a dictionary
+ that contains all the other attributes of the next hop.
+
+ :rtype: A dict
+ :returns: A next_hops list in a dictionary of dictionaries format
+ """
+ next_hops_dict = {}
+
+ for entry in next_hops:
+ entry = entry.copy()
+ key_list = []
+
+ for x in ["dest_vrf", "forward_router_address", "interface"]:
+ if entry.get(x):
+ key_list.append(entry.pop(x))
+
+ key = tuple(key_list)
+ next_hops_dict[key] = entry
+
+ return next_hops_dict
+
+ def _compute_commands(self, dest, next_hop, updates=None):
+ """ This method computes a static route entry command
+ from the specified `dest`, `next_hop` and `updates`
+
+ :rtype: A str
+ :returns: A platform specific static routes command
+ """
+ if not updates:
+ updates = {}
+
+ command = dest
+
+ for x in next_hop:
+ if "." in x or ":" in x or "/" in x:
+ command += " {0}".format(x)
+ else:
+ command += " vrf {0}".format(x)
+
+ for key in sorted(updates):
+ if key == "admin_distance":
+ command += " {0}".format(updates[key])
+ else:
+ command += " {0} {1}".format(key, updates[key])
+
+ return command
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acl_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acl_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acl_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acl_interfaces/acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acl_interfaces/acl_interfaces.py
new file mode 100644
index 00000000..e9c476a3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acl_interfaces/acl_interfaces.py
@@ -0,0 +1,78 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr acl_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from copy import deepcopy
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.rm_templates.acl_interfaces import (
+ Acl_interfacesTemplate,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.acl_interfaces.acl_interfaces import (
+ Acl_interfacesArgs,
+)
+
+
+class Acl_interfacesFacts(object):
+ """ The iosxr acl_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Acl_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for acl_interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+
+ if not data:
+ data = connection.get_config(flags="interface")
+
+ config_parser = Acl_interfacesTemplate(lines=data.splitlines())
+ entry = sorted(
+ list(config_parser.parse().values()),
+ key=lambda k, sk="name": k[sk],
+ )
+ if entry:
+ for item in entry:
+ item["access_groups"] = sorted(
+ list(item["access_groups"].values()),
+ key=lambda k, sk="afi": k[sk],
+ )
+
+ ansible_facts["ansible_network_resources"].pop("acl_interfaces", None)
+ facts = {"acl_interfaces": []}
+ params = utils.validate_config(self.argument_spec, {"config": entry})
+ for cfg in params["config"]:
+ facts["acl_interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acls/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acls/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acls/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acls/acls.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acls/acls.py
new file mode 100644
index 00000000..32375b7f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/acls/acls.py
@@ -0,0 +1,457 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr acls fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from copy import deepcopy
+
+from collections import deque
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.acls.acls import (
+ AclsArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ isipaddress,
+)
+
+PROTOCOL_OPTIONS = {
+ "tcp": ("ack", "fin", "psh", "rst", "syn", "urg", "established"),
+ "igmp": (
+ "dvmrp",
+ "host_query",
+ "host_report",
+ "mtrace",
+ "mtrace_response",
+ "pim",
+ "trace",
+ "v2_leave",
+ "v2_report",
+ "v3_report",
+ ),
+ "icmp": (
+ "administratively_prohibited",
+ "alternate_address",
+ "conversion_error",
+ "dod_host_prohibited",
+ "dod_net_prohibited",
+ "echo",
+ "echo_reply",
+ "general_parameter_problem",
+ "host_isolated",
+ "host_precedence_unreachable",
+ "host_redirect",
+ "host_tos_redirect",
+ "host_tos_unreachable",
+ "host_unknown",
+ "host_unreachable",
+ "information_reply",
+ "information_request",
+ "mask_reply",
+ "mask_request",
+ "mobile_redirect",
+ "net_redirect",
+ "net_tos_redirect",
+ "net_tos_unreachable",
+ "net_unreachable",
+ "network_unknown",
+ "no_room_for_option",
+ "option_missing",
+ "packet_too_big",
+ "parameter_problem",
+ "port_unreachable",
+ "precedence_unreachable",
+ "protocol_unreachable",
+ "reassembly_timeout",
+ "redirect",
+ "router_advertisement",
+ "router_solicitation",
+ "source_quench",
+ "source_route_failed",
+ "time_exceeded",
+ "timestamp_reply",
+ "timestamp_request",
+ "traceroute",
+ "ttl_exceeded",
+ "unreachable",
+ ),
+ "icmpv6": (
+ "address_unreachable",
+ "administratively_prohibited",
+ "beyond_scope_of_source_address",
+ "destination_unreachable",
+ "echo",
+ "echo_reply",
+ "erroneous_header_field",
+ "group_membership_query",
+ "group_membership_report",
+ "group_membership_termination",
+ "host_unreachable",
+ "nd_na",
+ "nd_ns",
+ "neighbor_redirect",
+ "no_route_to_destination",
+ "node_information_request_is_refused",
+ "node_information_successful_reply",
+ "packet_too_big",
+ "parameter_problem",
+ "port_unreachable",
+ "query_subject_is_IPv4address",
+ "query_subject_is_IPv6address",
+ "query_subject_is_domainname",
+ "reassembly_timeout",
+ "redirect",
+ "router_advertisement",
+ "router_renumbering",
+ "router_solicitation",
+ "rr_command",
+ "rr_result",
+ "rr_seqnum_reset",
+ "time_exceeded",
+ "ttl_exceeded",
+ "unknown_query_type",
+ "unreachable",
+ "unrecognized_next_header",
+ "unrecognized_option",
+ "whoareyou_reply",
+ "whoareyou_request",
+ ),
+}
+
+
+class AclsFacts(object):
+ """ The iosxr acls fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = AclsArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_device_data(self, connection):
+ return connection.get("show access-lists afi-all")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for acls
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = self.get_device_data(connection)
+
+ objs = []
+
+ acl_lines = data.splitlines()
+
+ # We iterate through the data and create a list of ACLs
+ # where each ACL is a dictionary in the following format:
+ # {'afi': 'ipv4', 'name': 'acl_1', 'aces': ['10 permit 172.16.0.0 0.0.255.255', '20 deny 192.168.34.0 0.0.0.255']}
+ if acl_lines:
+ acl, acls = {}, []
+ for line in acl_lines:
+ if line.startswith("ip"):
+ if acl:
+ acls.append(acl)
+ acl = {"aces": []}
+ acl["afi"], acl["name"] = line.split()[0], line.split()[2]
+ else:
+ acl["aces"].append(line.strip())
+ acls.append(acl)
+
+ # Here we group the ACLs based on AFI
+ # {
+ # 'ipv6': [{'aces': ['10 permit ipv6 2000::/12 any'], 'name': 'acl_2'}],
+ # 'ipv4': [{'aces': ['10 permit 172.16.0.0 0.0.255.255', '20 deny 192.168.34.0 0.0.0.255'], 'name': 'acl_1'},
+ # {'aces': ['20 deny 10.0.0.0/8 log'], 'name': 'acl_3'}]
+ # }
+
+ grouped_acls = {"ipv4": [], "ipv6": []}
+ for acl in acls:
+ acl_copy = deepcopy(acl)
+ del acl_copy["afi"]
+ grouped_acls[acl["afi"]].append(acl_copy)
+
+ # Now that we have the ACLs in a fairly structured format,
+ # we pass it on to render_config to convert it to model spec
+ for key, value in iteritems(grouped_acls):
+ obj = self.render_config(self.generated_spec, value)
+ if obj:
+ obj["afi"] = key
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("acls", None)
+ facts = {}
+
+ facts["acls"] = []
+ params = utils.validate_config(self.argument_spec, {"config": objs})
+ for cfg in params["config"]:
+ facts["acls"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ config["acls"] = []
+
+ for item in conf:
+ acl = {"name": item["name"]}
+ aces = item.get("aces", [])
+ if aces:
+ acl["aces"] = []
+ for ace in aces:
+ acl["aces"].append(self._render_ace(ace))
+ config["acls"].append(acl)
+
+ return utils.remove_empties(config)
+
+ def _render_ace(self, ace):
+ """
+ Parses an Access Control Entry (ACE) and converts it
+ into model spec
+
+ :param ace: An ACE in device specific format
+ :rtype: dictionary
+ :returns: The ACE in structured format
+ """
+
+ def __parse_src_dest(rendered_ace, ace_queue, direction):
+ """
+ Parses the ACE queue and populates address, wildcard_bits,
+ host or any keys in the source/destination dictionary of
+ ace dictionary, i.e., `rendered_ace`.
+
+ :param rendered_ace: The dictionary containing the ACE in structured format
+ :param ace_queue: The ACE queue
+ :param direction: Specifies whether to populate `source` or `destination`
+ dictionary
+ """
+ element = ace_queue.popleft()
+ if element == "host":
+ rendered_ace[direction] = {"host": ace_queue.popleft()}
+
+ elif element == "any":
+ rendered_ace[direction] = {"any": True}
+
+ elif "/" in element:
+ rendered_ace[direction] = {"prefix": element}
+
+ elif isipaddress(element):
+ rendered_ace[direction] = {
+ "address": element,
+ "wildcard_bits": ace_queue.popleft(),
+ }
+
+ def __parse_port_protocol(rendered_ace, ace_queue, direction):
+ """
+ Parses the ACE queue and populates `port_protocol` dictionary in the
+ ACE dictionary, i.e., `rendered_ace`.
+
+ :param rendered_ace: The dictionary containing the ACE in structured format
+ :param ace_queue: The ACE queue
+ :param direction: Specifies whether to populate `source` or `destination`
+ dictionary
+ """
+ if len(ace_queue) > 0 and ace_queue[0] in (
+ "eq",
+ "gt",
+ "lt",
+ "neq",
+ "range",
+ ):
+ element = ace_queue.popleft()
+ port_protocol = {}
+
+ if element == "range":
+ port_protocol["range"] = {
+ "start": ace_queue.popleft(),
+ "end": ace_queue.popleft(),
+ }
+ else:
+ port_protocol[element] = ace_queue.popleft()
+
+ rendered_ace[direction]["port_protocol"] = port_protocol
+
+ def __parse_protocol_options(rendered_ace, ace_queue, protocol):
+ """
+ Parses the ACE queue and populates protocol specific options
+ of the required dictionary and updates the ACE dictionary, i.e.,
+ `rendered_ace`.
+
+ :param rendered_ace: The dictionary containing the ACE in structured format
+ :param ace_queue: The ACE queue
+ :param protocol: Specifies the protocol that will be populated under
+ `protocol_options` dictionary
+ """
+ if len(ace_queue) > 0:
+ protocol_options = {protocol: {}}
+
+ for match_bit in PROTOCOL_OPTIONS.get(protocol, ()):
+ if match_bit.replace("_", "-") in ace_queue:
+ protocol_options[protocol][match_bit] = True
+ ace_queue.remove(match_bit.replace("_", "-"))
+
+ rendered_ace["protocol_options"] = protocol_options
+
+ def __parse_match_options(rendered_ace, ace_queue):
+ """
+ Parses the ACE queue and populates remaining options in the ACE dictionary,
+ i.e., `rendered_ace`
+
+ :param rendered_ace: The dictionary containing the ACE in structured format
+ :param ace_queue: The ACE queue
+ """
+ if len(ace_queue) > 0:
+ # We deepcopy the actual queue and iterate through the
+ # copied queue. However, we pop off the elements from
+ # the actual queue. Then, in every pass we update the copied
+ # queue with the current state of the original queue.
+ # This is done because a queue cannot be mutated during iteration.
+ copy_ace_queue = deepcopy(ace_queue)
+
+ for element in copy_ace_queue:
+ if element == "precedence":
+ ace_queue.popleft()
+ rendered_ace["precedence"] = ace_queue.popleft()
+
+ elif element == "dscp":
+ ace_queue.popleft()
+ dscp = {}
+ operation = ace_queue.popleft()
+
+ if operation in ("eq", "gt", "neq", "lt", "range"):
+ if operation == "range":
+ dscp["range"] = {
+ "start": ace_queue.popleft(),
+ "end": ace_queue.popleft(),
+ }
+ else:
+ dscp[operation] = ace_queue.popleft()
+ else:
+ # `dscp` can be followed by either the dscp value itself or
+ # the same thing can be represented using "dscp eq <dscp_value>".
+ # In both cases, it would show up as {'dscp': {'eq': "dscp_value"}}.
+ dscp["eq"] = operation
+
+ rendered_ace["dscp"] = dscp
+
+ elif element in ("packet-length", "ttl"):
+ ace_queue.popleft()
+ element_dict = {}
+ operation = ace_queue.popleft()
+
+ if operation == "range":
+ element_dict["range"] = {
+ "start": ace_queue.popleft(),
+ "end": ace_queue.popleft(),
+ }
+ else:
+ element_dict[operation] = ace_queue.popleft()
+
+ rendered_ace[element.replace("-", "_")] = element_dict
+
+ elif element in (
+ "log",
+ "log-input",
+ "fragments",
+ "icmp-off",
+ "capture",
+ "destopts",
+ "authen",
+ "routing",
+ "hop-by-hop",
+ ):
+ rendered_ace[element.replace("-", "_")] = True
+ ace_queue.remove(element)
+
+ copy_ace_queue = deepcopy(ace_queue)
+
+ rendered_ace = {}
+ split_ace = ace.split()
+
+ # Create a queue with each word in the ace
+ # We parse each element and pop it off the queue
+ ace_queue = deque(split_ace)
+
+ # An ACE will always have a sequence number, even if
+ # it is not explicitly provided while configuring
+ sequence = int(ace_queue.popleft())
+ rendered_ace["sequence"] = sequence
+ operation = ace_queue.popleft()
+
+ if operation == "remark":
+ rendered_ace["remark"] = " ".join(split_ace[2:])
+
+ else:
+ rendered_ace["grant"] = operation
+
+ # If the entry is a non-remark entry, the third element
+ # will always be the protocol specified. By default, it's
+ # the AFI.
+ rendered_ace["protocol"] = ace_queue.popleft()
+
+ # Populate source dictionary
+ __parse_src_dest(rendered_ace, ace_queue, direction="source")
+ # Populate port_protocol key in source dictionary
+ __parse_port_protocol(rendered_ace, ace_queue, direction="source")
+ # Populate destination dictionary
+ __parse_src_dest(rendered_ace, ace_queue, direction="destination")
+ # Populate port_protocol key in destination dictionary
+ __parse_port_protocol(
+ rendered_ace, ace_queue, direction="destination"
+ )
+ # Populate protocol_options dictionary
+ __parse_protocol_options(
+ rendered_ace, ace_queue, protocol=rendered_ace["protocol"]
+ )
+ # Populate remaining match options' dictionaries
+ __parse_match_options(rendered_ace, ace_queue)
+
+ # At this stage the queue should be empty
+ # If the queue is not empty, it means that
+ # we haven't been able to parse the entire ACE
+ # In this case, we add the whole unprocessed ACE
+ # to a key called `line` and send it back
+ if len(ace_queue) > 0:
+ rendered_ace = {
+ "sequence": sequence,
+ "line": " ".join(split_ace[1:]),
+ }
+
+ return utils.remove_empties(rendered_ace)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/facts.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/facts.py
new file mode 100644
index 00000000..1441ef6d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/facts.py
@@ -0,0 +1,122 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The facts class for iosxr
+this file validates each subset of facts and selectively
+calls the appropriate facts gathering function
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts import (
+ FactsBase,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.legacy.base import (
+ Default,
+ Hardware,
+ Interfaces,
+ Config,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.lacp.lacp import (
+ LacpFacts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.lacp_interfaces.lacp_interfaces import (
+ Lacp_interfacesFacts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.lldp_global.lldp_global import (
+ Lldp_globalFacts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.lldp_interfaces.lldp_interfaces import (
+ Lldp_interfacesFacts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.interfaces.interfaces import (
+ InterfacesFacts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.lag_interfaces.lag_interfaces import (
+ Lag_interfacesFacts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.l2_interfaces.l2_interfaces import (
+ L2_InterfacesFacts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.l3_interfaces.l3_interfaces import (
+ L3_InterfacesFacts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.acl_interfaces.acl_interfaces import (
+ Acl_interfacesFacts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.acls.acls import (
+ AclsFacts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.static_routes.static_routes import (
+ Static_routesFacts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.ospfv2.ospfv2 import (
+ Ospfv2Facts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.ospfv3.ospfv3 import (
+ Ospfv3Facts,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.ospf_interfaces.ospf_interfaces import (
+ Ospf_interfacesFacts,
+)
+
+
+FACT_LEGACY_SUBSETS = dict(
+ default=Default, hardware=Hardware, interfaces=Interfaces, config=Config
+)
+FACT_RESOURCE_SUBSETS = dict(
+ lacp=LacpFacts,
+ lacp_interfaces=Lacp_interfacesFacts,
+ lldp_global=Lldp_globalFacts,
+ lldp_interfaces=Lldp_interfacesFacts,
+ interfaces=InterfacesFacts,
+ l2_interfaces=L2_InterfacesFacts,
+ lag_interfaces=Lag_interfacesFacts,
+ l3_interfaces=L3_InterfacesFacts,
+ acl_interfaces=Acl_interfacesFacts,
+ acls=AclsFacts,
+ static_routes=Static_routesFacts,
+ ospfv2=Ospfv2Facts,
+ ospfv3=Ospfv3Facts,
+ ospf_interfaces=Ospf_interfacesFacts,
+)
+
+
+class Facts(FactsBase):
+ """ The fact class for iosxr
+ """
+
+ VALID_LEGACY_GATHER_SUBSETS = frozenset(FACT_LEGACY_SUBSETS.keys())
+ VALID_RESOURCE_SUBSETS = frozenset(FACT_RESOURCE_SUBSETS.keys())
+
+ def __init__(self, module):
+ super(Facts, self).__init__(module)
+
+ def get_facts(
+ self, legacy_facts_type=None, resource_facts_type=None, data=None
+ ):
+ """ Collect the facts for iosxr
+
+ :param legacy_facts_type: List of legacy facts types
+ :param resource_facts_type: List of resource fact types
+ :param data: previously collected conf
+ :rtype: dict
+ :return: the facts gathered
+ """
+ if self.VALID_RESOURCE_SUBSETS:
+ self.get_network_resources_facts(
+ FACT_RESOURCE_SUBSETS, resource_facts_type, data
+ )
+
+ if self.VALID_LEGACY_GATHER_SUBSETS:
+ self.get_network_legacy_facts(
+ FACT_LEGACY_SUBSETS, legacy_facts_type
+ )
+
+ return self.ansible_facts, self._warnings
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/interfaces/interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/interfaces/interfaces.py
new file mode 100644
index 00000000..bc4450fc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/interfaces/interfaces.py
@@ -0,0 +1,110 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from copy import deepcopy
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ get_interface_type,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.interfaces.interfaces import (
+ InterfacesArgs,
+)
+
+
+class InterfacesFacts(object):
+ """ The iosxr interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = InterfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for interfaces
+ :param module: the module instance
+ :param connection: the device connection
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+ if not data:
+ data = connection.get("show running-config interface")
+
+ # operate on a collection of resource x
+ config = ("\n" + data).split("\ninterface ")
+ for conf in config:
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.append(obj)
+
+ facts = {}
+ if objs:
+ facts["interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys from spec for null values
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+
+ config = deepcopy(spec)
+ match = re.search(r"^(\S+)", conf)
+
+ intf = match.group(1)
+ if match.group(1).lower() == "preconfigure":
+ match = re.search(r"^(\S+) (.*)", conf)
+ if match:
+ intf = match.group(2)
+
+ if get_interface_type(intf) == "unknown":
+ return {}
+ # populate the facts from the configuration
+ config["name"] = intf
+ config["description"] = utils.parse_conf_arg(conf, "description")
+ if utils.parse_conf_arg(conf, "speed"):
+ config["speed"] = int(utils.parse_conf_arg(conf, "speed"))
+ if utils.parse_conf_arg(conf, "mtu"):
+ config["mtu"] = int(utils.parse_conf_arg(conf, "mtu"))
+ config["duplex"] = utils.parse_conf_arg(conf, "duplex")
+ enabled = utils.parse_conf_cmd_arg(conf, "shutdown", False)
+ config["enabled"] = enabled if enabled is not None else True
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l2_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l2_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l2_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l2_interfaces/l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l2_interfaces/l2_interfaces.py
new file mode 100644
index 00000000..82220d89
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l2_interfaces/l2_interfaces.py
@@ -0,0 +1,134 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr l2_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ get_interface_type,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.l2_interfaces.l2_interfaces import (
+ L2_InterfacesArgs,
+)
+
+
+class L2_InterfacesFacts(object):
+ """ The iosxr l2_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = L2_InterfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for l2_interfaces
+ :param module: the module instance
+ :param connection: the device connection
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+ if not data:
+ data = connection.get("show running-config interface")
+
+ # operate on a collection of resource x
+ config = ("\n" + data).split("\ninterface ")
+ for conf in config:
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.append(obj)
+ facts = {}
+ if objs:
+ facts["l2_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["l2_interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys from spec for null values
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ match = re.search(r"^(\S+)", conf)
+
+ intf = match.group(1)
+
+ if match.group(1).lower() == "preconfigure":
+ match = re.search(r"^(\S+) (.*)", conf)
+ if match:
+ intf = match.group(2)
+
+ if get_interface_type(intf) == "unknown":
+ return {}
+
+ if intf.lower().startswith("gi"):
+ config["name"] = intf
+
+ # populate the facts from the configuration
+ native_vlan = re.search(r"dot1q native vlan (\d+)", conf)
+ if native_vlan:
+ config["native_vlan"] = int(native_vlan.group(1))
+
+ dot1q = utils.parse_conf_arg(conf, "encapsulation dot1q")
+ config["q_vlan"] = []
+ if dot1q:
+ config["q_vlan"].append(int(dot1q.split(" ")[0]))
+ if len(dot1q.split(" ")) > 1:
+ config["q_vlan"].append(int(dot1q.split(" ")[2]))
+
+ if utils.parse_conf_cmd_arg(conf, "l2transport", True):
+ config["l2transport"] = True
+ if utils.parse_conf_arg(conf, "propagate"):
+ config["propagate"] = True
+ config["l2protocol"] = []
+
+ cdp = utils.parse_conf_arg(conf, "l2protocol cdp")
+ pvst = utils.parse_conf_arg(conf, "l2protocol pvst")
+ stp = utils.parse_conf_arg(conf, "l2protocol stp")
+ vtp = utils.parse_conf_arg(conf, "l2protocol vtp")
+ if cdp:
+ config["l2protocol"].append({"cdp": cdp})
+ if pvst:
+ config["l2protocol"].append({"pvst": pvst})
+ if stp:
+ config["l2protocol"].append({"stp": stp})
+ if vtp:
+ config["l2protocol"].append({"vtp": vtp})
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l3_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l3_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l3_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l3_interfaces/l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l3_interfaces/l3_interfaces.py
new file mode 100644
index 00000000..5bc589d3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/l3_interfaces/l3_interfaces.py
@@ -0,0 +1,126 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr_l3_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.utils.utils import (
+ get_interface_type,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.l3_interfaces.l3_interfaces import (
+ L3_InterfacesArgs,
+)
+
+
+class L3_InterfacesFacts(object):
+ """ The iosxr_l3_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = L3_InterfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+
+ if not data:
+ data = connection.get("show running-config interface")
+ # operate on a collection of resource x
+ config = ("\n" + data).split("\ninterface ")
+ for conf in config:
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.append(obj)
+ facts = {}
+
+ if objs:
+ facts["l3_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["l3_interfaces"].append(utils.remove_empties(cfg))
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys from spec for null values
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ match = re.search(r"^(\S+)", conf)
+
+ intf = match.group(1)
+ if match.group(1).lower() == "preconfigure":
+ match = re.search(r"^(\S+) (.*)", conf)
+ if match:
+ intf = match.group(2)
+
+ if get_interface_type(intf) == "unknown":
+ return {}
+
+ # populate the facts from the configuration
+ config["name"] = intf
+
+ # Get the configured IPV4 details
+ ipv4 = []
+ ipv4_all = re.findall(r"ipv4 address (\S+.*)", conf)
+ for each in ipv4_all:
+ each_ipv4 = dict()
+ if "secondary" in each:
+ each_ipv4["address"] = each.split(" secondary")[0]
+ each_ipv4["secondary"] = True
+ else:
+ each_ipv4["address"] = each
+ ipv4.append(each_ipv4)
+ config["ipv4"] = ipv4
+
+ # Get the configured IPV6 details
+ ipv6 = []
+ ipv6_all = re.findall(r"ipv6 address (\S+)", conf)
+ for each in ipv6_all:
+ each_ipv6 = dict()
+ each_ipv6["address"] = each
+ ipv6.append(each_ipv6)
+ config["ipv6"] = ipv6
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp/lacp.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp/lacp.py
new file mode 100644
index 00000000..e052f116
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp/lacp.py
@@ -0,0 +1,89 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr lacp fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.lacp.lacp import (
+ LacpArgs,
+)
+
+
+class LacpFacts(object):
+ """ The iosxr lacp fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = LacpArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lacp
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = connection.get_config(flags="lacp")
+
+ obj = {}
+ if data:
+ lacp_obj = self.render_config(self.generated_spec, data)
+ if lacp_obj:
+ obj = lacp_obj
+
+ ansible_facts["ansible_network_resources"].pop("lacp", None)
+ facts = {}
+
+ params = utils.validate_config(self.argument_spec, {"config": obj})
+ facts["lacp"] = utils.remove_empties(params["config"])
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ system_priority = utils.parse_conf_arg(conf, "priority")
+ config["system"]["priority"] = (
+ int(system_priority) if system_priority else system_priority
+ )
+ config["system"]["mac"]["address"] = utils.parse_conf_arg(conf, "mac")
+
+ return config
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp_interfaces/lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp_interfaces/lacp_interfaces.py
new file mode 100644
index 00000000..8cb5fcda
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lacp_interfaces/lacp_interfaces.py
@@ -0,0 +1,115 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr lacp_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.lacp_interfaces.lacp_interfaces import (
+ Lacp_interfacesArgs,
+)
+from ansible.module_utils.six import iteritems
+
+
+class Lacp_interfacesFacts(object):
+ """ The iosxr lacp_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Lacp_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lacp_interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+
+ if not data:
+ data = connection.get_config(flags="interface")
+ interfaces = ("\n" + data).split("\ninterface ")
+
+ objs = []
+ for interface in interfaces:
+ obj = self.render_config(self.generated_spec, interface)
+ if obj:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("lacp_interfaces", None)
+ facts = {}
+ if objs:
+ facts["lacp_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["lacp_interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ match = re.search(
+ r"(GigabitEthernet|Bundle-Ether|TenGigE|FortyGigE|HundredGigE)(\S+)",
+ conf,
+ re.M,
+ )
+ if match:
+ config["name"] = match.group(1) + match.group(2)
+
+ temp = {
+ "churn_logging": "lacp churn logging",
+ "switchover_suppress_flaps": "lacp switchover suppress-flaps",
+ "collector_max_delay": "lacp collector-max-delay",
+ "period": "lacp period",
+ }
+
+ for key, value in iteritems(temp):
+ config[key] = utils.parse_conf_arg(conf, value)
+
+ for key in config["system"].keys():
+ config["system"][key] = utils.parse_conf_arg(
+ conf, "lacp system {0}".format(key)
+ )
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lag_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lag_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lag_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lag_interfaces/lag_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lag_interfaces/lag_interfaces.py
new file mode 100644
index 00000000..2b911398
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lag_interfaces/lag_interfaces.py
@@ -0,0 +1,141 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr lag_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.lag_interfaces.lag_interfaces import (
+ Lag_interfacesArgs,
+)
+
+
+class Lag_interfacesFacts(object):
+ """ The iosxr lag_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Lag_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lag_interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+
+ if not data:
+ data = connection.get_config(flags="interface")
+ interfaces = ("\n" + data).split("\ninterface ")
+
+ objs = []
+
+ for interface in interfaces:
+ if interface.startswith("Bundle-Ether"):
+ obj = self.render_config(
+ self.generated_spec, interface, interfaces
+ )
+ if obj:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("lag_interfaces", None)
+ facts = {}
+
+ facts["lag_interfaces"] = []
+ params = utils.validate_config(self.argument_spec, {"config": objs})
+ for cfg in params["config"]:
+ facts["lag_interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf, data):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ match = re.search(r"(Bundle-Ether)(\d+)", conf, re.M)
+ if match:
+ config["name"] = match.group(1) + match.group(2)
+ config["load_balancing_hash"] = utils.parse_conf_arg(
+ conf, "bundle load-balancing hash"
+ )
+ config["mode"] = utils.parse_conf_arg(conf, "lacp mode")
+ config["links"]["max_active"] = utils.parse_conf_arg(
+ conf, "bundle maximum-active links"
+ )
+ config["links"]["min_active"] = utils.parse_conf_arg(
+ conf, "bundle minimum-active links"
+ )
+ config["members"] = self.parse_members(match.group(2), data)
+
+ return utils.remove_empties(config)
+
+ def parse_members(self, bundle_id, interfaces):
+ """
+ Renders a list of member interfaces for every bundle
+ present in running-config.
+
+ :param bundle_id: The Bundle-Ether ID fetched from running-config
+ :param interfaces: Data of all interfaces present in running-config
+ :rtype: list
+ :returns: A list of member interfaces
+ """
+
+ def _parse_interface(name):
+ if name.startswith("preconfigure"):
+ return name.split()[1]
+ else:
+ return name.split()[0]
+
+ members = []
+ for interface in interfaces:
+ if not interface.startswith("Bu"):
+ match = re.search(
+ r"bundle id (\d+) mode (\S+)", interface, re.M
+ )
+ if match:
+ if bundle_id == match.group(1):
+ members.append(
+ {
+ "member": _parse_interface(interface),
+ "mode": match.group(2),
+ }
+ )
+
+ return members
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/legacy/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/legacy/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/legacy/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/legacy/base.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/legacy/base.py
new file mode 100644
index 00000000..463190cd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/legacy/base.py
@@ -0,0 +1,261 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+"""
+The iosxr legacy fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import platform
+import re
+
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ run_commands,
+ get_capabilities,
+)
+from ansible.module_utils.six import iteritems
+from ansible.module_utils.six.moves import zip
+
+
+class FactsBase(object):
+
+ COMMANDS = frozenset()
+
+ def __init__(self, module):
+ self.module = module
+ self.facts = dict()
+ self.warnings = list()
+ self.responses = None
+
+ def populate(self):
+ self.responses = run_commands(
+ self.module, list(self.COMMANDS), check_rc=False
+ )
+
+
+class Default(FactsBase):
+ def populate(self):
+ self.facts.update(self.platform_facts())
+
+ def platform_facts(self):
+ platform_facts = {}
+
+ resp = get_capabilities(self.module)
+ device_info = resp["device_info"]
+
+ platform_facts["system"] = device_info["network_os"]
+
+ for item in ("model", "image", "version", "platform", "hostname"):
+ val = device_info.get("network_os_%s" % item)
+ if val:
+ platform_facts[item] = val
+
+ platform_facts["api"] = resp["network_api"]
+ platform_facts["python_version"] = platform.python_version()
+
+ return platform_facts
+
+
+class Hardware(FactsBase):
+
+ COMMANDS = ["dir /all", "show memory summary"]
+
+ def populate(self):
+ super(Hardware, self).populate()
+ data = self.responses[0]
+ self.facts["filesystems"] = self.parse_filesystems(data)
+
+ data = self.responses[1]
+ match = re.search(r"Physical Memory: (\d+)M total \((\d+)", data)
+ if match:
+ self.facts["memtotal_mb"] = match.group(1)
+ self.facts["memfree_mb"] = match.group(2)
+
+ def parse_filesystems(self, data):
+ return re.findall(r"^Directory of (\S+)", data, re.M)
+
+
+class Config(FactsBase):
+
+ COMMANDS = ["show running-config"]
+
+ def populate(self):
+ super(Config, self).populate()
+ self.facts["config"] = self.responses[0]
+
+
+class Interfaces(FactsBase):
+
+ COMMANDS = [
+ "show interfaces",
+ "show ipv6 interface",
+ "show lldp",
+ "show lldp neighbors detail",
+ ]
+
+ def populate(self):
+ super(Interfaces, self).populate()
+ self.facts["all_ipv4_addresses"] = list()
+ self.facts["all_ipv6_addresses"] = list()
+
+ interfaces = self.parse_interfaces(self.responses[0])
+ self.facts["interfaces"] = self.populate_interfaces(interfaces)
+
+ data = self.responses[1]
+ if len(data) > 0:
+ data = self.parse_interfaces(data)
+ self.populate_ipv6_interfaces(data)
+
+ if "LLDP is not enabled" not in self.responses[2]:
+ neighbors = self.responses[3]
+ self.facts["neighbors"] = self.parse_neighbors(neighbors)
+
+ def populate_interfaces(self, interfaces):
+ facts = dict()
+ for key, value in iteritems(interfaces):
+ intf = dict()
+ intf["description"] = self.parse_description(value)
+ intf["macaddress"] = self.parse_macaddress(value)
+
+ ipv4 = self.parse_ipv4(value)
+ intf["ipv4"] = self.parse_ipv4(value)
+ if ipv4:
+ self.add_ip_address(ipv4["address"], "ipv4")
+
+ intf["mtu"] = self.parse_mtu(value)
+ intf["bandwidth"] = self.parse_bandwidth(value)
+ intf["duplex"] = self.parse_duplex(value)
+ intf["lineprotocol"] = self.parse_lineprotocol(value)
+ intf["operstatus"] = self.parse_operstatus(value)
+ intf["type"] = self.parse_type(value)
+
+ facts[key] = intf
+ return facts
+
+ def populate_ipv6_interfaces(self, data):
+ for key, value in iteritems(data):
+ if key in ["No", "RPF"] or key.startswith("IP"):
+ continue
+ self.facts["interfaces"][key]["ipv6"] = list()
+ addresses = re.findall(r"\s+(.+), subnet", value, re.M)
+ subnets = re.findall(r", subnet is (.+)$", value, re.M)
+ for addr, subnet in zip(addresses, subnets):
+ ipv6 = dict(address=addr.strip(), subnet=subnet.strip())
+ self.add_ip_address(addr.strip(), "ipv6")
+ self.facts["interfaces"][key]["ipv6"].append(ipv6)
+
+ def add_ip_address(self, address, family):
+ if family == "ipv4":
+ self.facts["all_ipv4_addresses"].append(address)
+ else:
+ self.facts["all_ipv6_addresses"].append(address)
+
+ def parse_neighbors(self, neighbors):
+ facts = dict()
+ nbors = neighbors.split(
+ "------------------------------------------------"
+ )
+ for entry in nbors[1:]:
+ if entry == "":
+ continue
+ intf = self.parse_lldp_intf(entry)
+ if intf not in facts:
+ facts[intf] = list()
+ fact = dict()
+ fact["host"] = self.parse_lldp_host(entry)
+ fact["remote_description"] = self.parse_lldp_remote_desc(entry)
+ fact["port"] = self.parse_lldp_port(entry)
+ facts[intf].append(fact)
+ return facts
+
+ def parse_interfaces(self, data):
+ parsed = dict()
+ key = ""
+ for line in data.split("\n"):
+ if len(line) == 0:
+ continue
+ if line[0] == " ":
+ parsed[key] += "\n%s" % line
+ else:
+ match = re.match(r"^(\S+)", line)
+ if match:
+ key = match.group(1)
+ parsed[key] = line
+ return parsed
+
+ def parse_description(self, data):
+ match = re.search(r"Description: (.+)$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_macaddress(self, data):
+ match = re.search(r"address is (\S+)", data)
+ if match:
+ return match.group(1)
+
+ def parse_ipv4(self, data):
+ match = re.search(r"Internet address is (\S+)/(\d+)", data)
+ if match:
+ addr = match.group(1)
+ masklen = int(match.group(2))
+ return dict(address=addr, masklen=masklen)
+
+ def parse_mtu(self, data):
+ match = re.search(r"MTU (\d+)", data)
+ if match:
+ return int(match.group(1))
+
+ def parse_bandwidth(self, data):
+ match = re.search(r"BW (\d+)", data)
+ if match:
+ return int(match.group(1))
+
+ def parse_duplex(self, data):
+ match = re.search(r"(\w+)(?: D|-d)uplex", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_type(self, data):
+ match = re.search(r"Hardware is (.+),", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_lineprotocol(self, data):
+ match = re.search(r"line protocol is (.+)\s+?$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_operstatus(self, data):
+ match = re.search(r"^(?:.+) is (.+),", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_lldp_intf(self, data):
+ match = re.search(r"^Local Interface: (.+)$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_lldp_remote_desc(self, data):
+ match = re.search(r"Port Description: (.+)$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_lldp_host(self, data):
+ match = re.search(r"System Name: (.+)$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_lldp_port(self, data):
+ match = re.search(r"Port id: (.+)$", data, re.M)
+ if match:
+ return match.group(1)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_global/lldp_global.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_global/lldp_global.py
new file mode 100644
index 00000000..13d7f0cf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_global/lldp_global.py
@@ -0,0 +1,107 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr lldp fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.lldp_global.lldp_global import (
+ Lldp_globalArgs,
+)
+
+
+class Lldp_globalFacts(object):
+ """ The iosxr lldp fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Lldp_globalArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lldp
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = connection.get_config(flags="lldp")
+
+ obj = {}
+ if data:
+ lldp_obj = self.render_config(self.generated_spec, data)
+ if lldp_obj:
+ obj = lldp_obj
+
+ ansible_facts["ansible_network_resources"].pop("lldp_global", None)
+ facts = {}
+
+ params = utils.validate_config(self.argument_spec, {"config": obj})
+ facts["lldp_global"] = utils.remove_empties(params["config"])
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ for key in spec.keys():
+ if key == "subinterfaces":
+ config[key] = True if "subinterfaces enable" in conf else None
+
+ elif key == "tlv_select":
+ for item in [
+ "system_name",
+ "port_description",
+ "management_address",
+ "system_description",
+ "system_capabilities",
+ ]:
+ config[key][item] = (
+ False
+ if ("{0} disable".format(item.replace("_", "-")))
+ in conf
+ else None
+ )
+
+ else:
+ value = utils.parse_conf_arg(conf, key)
+ config[key] = int(value) if value else value
+
+ return config
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_interfaces/lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_interfaces/lldp_interfaces.py
new file mode 100644
index 00000000..57fbc425
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/lldp_interfaces/lldp_interfaces.py
@@ -0,0 +1,109 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr lldp_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.lldp_interfaces.lldp_interfaces import (
+ Lldp_interfacesArgs,
+)
+
+
+class Lldp_interfacesFacts(object):
+ """ The iosxr lldp_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Lldp_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lldp_interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+
+ if not data:
+ data = connection.get_config(flags="interface")
+ interfaces = ("\n" + data).split("\ninterface ")
+
+ objs = []
+ for interface in interfaces:
+ obj = self.render_config(self.generated_spec, interface)
+ if obj:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("lldp_interfaces", None)
+ facts = {}
+
+ if objs:
+ facts["lldp_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["lldp_interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ match = re.search(
+ r"(GigabitEthernet|Bundle-Ether|TenGigE|FortyGigE|HundredGigE)(\S+)",
+ conf,
+ re.M,
+ )
+ if match:
+ config["name"] = match.group(1) + match.group(2)
+
+ for key in ["receive", "transmit"]:
+ config[key] = (
+ False if ("{0} disable".format(key)) in conf else None
+ )
+
+ for x in ["ieee-nearest-bridge", "ieee-nearest-non-tmpr-bridge"]:
+ if x in conf:
+ config["destination"]["mac_address"] = x
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospf_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospf_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospf_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospf_interfaces/ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospf_interfaces/ospf_interfaces.py
new file mode 100644
index 00000000..c21eaf0d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospf_interfaces/ospf_interfaces.py
@@ -0,0 +1,137 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The iosxr ospf_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from copy import deepcopy
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.rm_templates.ospf_interfaces import (
+ Ospf_interfacesTemplate,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.ospf_interfaces.ospf_interfaces import (
+ Ospf_interfacesArgs,
+)
+
+
+class Ospf_interfacesFacts(object):
+ """ The iosxr ospf_interfaces facts class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Ospf_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_ospf_interfaces(self, connection, flag):
+ cmd = "show running-config router " + flag
+ return connection.get(cmd)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for Ospf_interfaces network resource
+
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+
+ :rtype: dictionary
+ :returns: facts
+ """
+ facts = {}
+ objs = []
+ if not data:
+ data = self.get_ospf_interfaces(connection, flag="ospf")
+ data += "\n" + self.get_ospf_interfaces(connection, flag="ospfv3")
+ end_flag, end_mark, count, v_read = 0, 0, 0, False
+ areas, config_commands = [], []
+ area_str, process, curr_process = "", "", ""
+ data = data.splitlines()
+
+ for line in data:
+ if (
+ line.startswith("router")
+ and curr_process != ""
+ and curr_process != line
+ ):
+ end_mark, count, end_flag, area_str = 0, 0, 0, ""
+ if end_mark == 0 and count == 0 and line.startswith("router ospf"):
+ curr_process = line
+ process = re.sub("\n", "", line)
+ count += 1
+ config_commands.append(process)
+ else:
+ if line.startswith(" area") or line.startswith(" vrf"):
+ area_str = process + re.sub("\n", "", line)
+ config_commands.append(area_str.replace(" ", " "))
+ end_flag += 1
+ elif line.startswith(" interface"):
+ ospf_int = area_str + re.sub("\n", "", line)
+ # default output format has more spaces with default identation
+ # reset the spaces with replace
+ config_commands.append(ospf_int.replace(" ", " "))
+ v_read = True
+ elif v_read:
+ if "!" not in line:
+ command = ospf_int.replace(" ", " ") + re.sub(
+ "\n", "", line
+ )
+ config_commands.append(command.replace(" ", " "))
+ else:
+ v_read = False
+ elif end_flag > 0 and "!" not in line:
+ command = area_str + re.sub("\n", "", line)
+ config_commands.append(command.replace(" ", " "))
+ elif "!" in line:
+ end_flag = 0
+ end_mark += 1
+ if end_mark == 3:
+ end_mark, count = 0, 0
+ area_str = ""
+ else:
+ command = process + line
+ command.replace(" ", " ")
+ config_commands.append(re.sub("\n", "", command))
+ areas.append(re.sub("\n", "", command))
+ data = config_commands
+
+ ospf_interfaces_parser = Ospf_interfacesTemplate(lines=data)
+ objs = list(ospf_interfaces_parser.parse().values())
+ if objs:
+ for item in objs:
+ item["address_family"] = list(item["address_family"].values())
+ for af in item["address_family"]:
+ if af.get("processes"):
+ af["processes"] = list(af["processes"].values())
+
+ ansible_facts["ansible_network_resources"].pop("ospf_interfaces", None)
+
+ params = utils.remove_empties(
+ utils.validate_config(self.argument_spec, {"config": objs})
+ )
+
+ facts["ospf_interfaces"] = params.get("config", [])
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv2/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv2/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv2/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv2/ospfv2.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv2/ospfv2.py
new file mode 100644
index 00000000..1da5ea8e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv2/ospfv2.py
@@ -0,0 +1,157 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr snmp fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from copy import deepcopy
+import re
+
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.rm_templates.ospfv2 import (
+ Ospfv2Template,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.ospfv2.ospfv2 import (
+ Ospfv2Args,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+class Ospfv2Facts(object):
+ """ The iosxr snmp fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Ospfv2Args.argument_spec
+
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_ospfv2_data(self, connection):
+ return connection.get("show running-config router ospf")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+
+ if not data:
+ data = self.get_ospfv2_data(connection)
+ end_flag, end_mark, count, v_read = 0, 0, 0, False
+ areas, config_commands = [], []
+ area_str, process, curr_process = "", "", ""
+ data = data.splitlines()
+ for line in data:
+ if (
+ line.startswith("router ospf")
+ and curr_process != ""
+ and curr_process != line
+ ):
+ end_mark, count, end_flag, area_str = 0, 0, 0, ""
+ if end_mark == 0 and count == 0 and line.startswith("router ospf"):
+ curr_process = line
+ process = re.sub("\n", "", line)
+ count += 1
+ config_commands.append(process)
+ else:
+ if line.startswith(" area") or line.startswith(" vrf"):
+ area_str = process + re.sub("\n", "", line)
+ config_commands.append(area_str.replace(" ", " "))
+ end_flag += 1
+ elif line.startswith(" virtual-link"):
+ virtual_str = area_str + re.sub("\n", "", line)
+ config_commands.append(virtual_str.replace(" ", " "))
+ v_read = True
+ elif v_read:
+ if "!" not in line:
+ command = virtual_str.replace(" ", " ") + re.sub(
+ "\n", "", line
+ )
+ config_commands.append(command.replace(" ", " "))
+ else:
+ v_read = False
+ elif end_flag > 0 and "!" not in line:
+ command = area_str + re.sub("\n", "", line)
+ config_commands.append(command.replace(" ", " "))
+ elif "!" in line:
+ end_flag = 0
+ end_mark += 1
+ if end_mark == 3:
+ end_mark, count = 0, 0
+ area_str = ""
+ else:
+ command = process + line
+ command.replace(" ", " ")
+ config_commands.append(re.sub("\n", "", command))
+ areas.append(re.sub("\n", "", command))
+ data = config_commands
+ ipv4 = {"processes": []}
+ rmmod = NetworkTemplate(lines=data, tmplt=Ospfv2Template())
+ current = rmmod.parse()
+
+ # convert some of the dicts to lists
+ for key, sortv in [("processes", "process_id")]:
+ if key in current and current[key]:
+ current[key] = current[key].values()
+ current[key] = sorted(
+ current[key], key=lambda k, sk=sortv: k[sk]
+ )
+
+ for process in current.get("processes", []):
+ if "areas" in process:
+ process["areas"] = list(process["areas"].values())
+ process["areas"] = sorted(
+ process["areas"], key=lambda k, sk="area_id": k[sk]
+ )
+ for area in process["areas"]:
+ if "ranges" in area:
+ area["ranges"] = sorted(
+ area["ranges"], key=lambda k, s="ranges": k[s]
+ )
+ if "virtual_link" in area:
+ area["virtual_link"] = list(
+ area["virtual_link"].values()
+ )
+ area["virtual_link"] = sorted(
+ area["virtual_link"], key=lambda k, sk="id": k[sk]
+ )
+ ipv4["processes"].append(process)
+
+ ansible_facts["ansible_network_resources"].pop("ospfv2", None)
+ facts = {}
+ if current:
+ params = utils.validate_config(
+ self.argument_spec, {"config": ipv4}
+ )
+ params = utils.remove_empties(params)
+
+ facts["ospfv2"] = params["config"]
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv3/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv3/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv3/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv3/ospfv3.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv3/ospfv3.py
new file mode 100644
index 00000000..8e54e3f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/ospfv3/ospfv3.py
@@ -0,0 +1,155 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from copy import deepcopy
+import re
+
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.rm_templates.ospfv3 import (
+ Ospfv3Template,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.ospfv3.ospfv3 import (
+ Ospfv3Args,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+class Ospfv3Facts(object):
+ """ The iosxr snmp fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Ospfv3Args.argument_spec
+
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_ospfv3_data(self, connection):
+ return connection.get("show running-config router ospfv3")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+
+ if not data:
+ data = self.get_ospfv3_data(connection)
+ end_flag, end_mark, count, v_read = 0, 0, 0, False
+ areas, config_commands = [], []
+ area_str, process, curr_process = "", "", ""
+ data = data.splitlines()
+ for line in data:
+ if (
+ line.startswith("router ospfv3")
+ and curr_process != ""
+ and curr_process != line
+ ):
+ end_mark, count, end_flag, area_str = 0, 0, 0, ""
+ if (
+ end_mark == 0
+ and count == 0
+ and line.startswith("router ospfv3")
+ ):
+ curr_process = line
+ process = re.sub("\n", "", line)
+ count += 1
+ config_commands.append(process)
+ else:
+ if line.startswith(" area") or line.startswith(" vrf"):
+ area_str = process + re.sub("\n", "", line)
+ config_commands.append(area_str.replace(" ", " "))
+ end_flag += 1
+ elif line.startswith(" virtual-link"):
+ virtual_str = area_str + re.sub("\n", "", line)
+ config_commands.append(virtual_str.replace(" ", " "))
+ v_read = True
+ elif v_read:
+ if "!" not in line:
+ command = virtual_str.replace(" ", " ") + re.sub(
+ "\n", "", line
+ )
+ config_commands.append(command.replace(" ", " "))
+ else:
+ v_read = False
+ elif end_flag > 0 and "!" not in line:
+ command = area_str + re.sub("\n", "", line)
+ config_commands.append(command.replace(" ", " "))
+ elif "!" in line:
+ end_flag = 0
+ end_mark += 1
+ if end_mark == 3:
+ end_mark, count = 0, 0
+ area_str = ""
+ else:
+ command = process + line
+ command.replace(" ", " ")
+ config_commands.append(re.sub("\n", "", command))
+ areas.append(re.sub("\n", "", command))
+ data = config_commands
+ ipv4 = {"processes": []}
+ rmmod = NetworkTemplate(lines=data, tmplt=Ospfv3Template())
+ current = rmmod.parse()
+
+ # convert some of the dicts to lists
+ for key, sortv in [("processes", "process_id")]:
+ if key in current and current[key]:
+ current[key] = current[key].values()
+ current[key] = sorted(
+ current[key], key=lambda k, sk=sortv: k[sk]
+ )
+
+ for process in current.get("processes", []):
+ if "areas" in process:
+ process["areas"] = list(process["areas"].values())
+ process["areas"] = sorted(
+ process["areas"], key=lambda k, sk="area_id": k[sk]
+ )
+ for area in process["areas"]:
+ if "ranges" in area:
+ area["ranges"] = sorted(
+ area["ranges"], key=lambda k, s="ranges": k[s]
+ )
+ if "virtual_link" in area:
+ area["virtual_link"] = list(
+ area["virtual_link"].values()
+ )
+ area["virtual_link"] = sorted(
+ area["virtual_link"], key=lambda k, sk="id": k[sk]
+ )
+ ipv4["processes"].append(process)
+
+ ansible_facts["ansible_network_resources"].pop("ospfv3", None)
+ facts = {}
+ if current:
+ params = utils.validate_config(
+ self.argument_spec, {"config": ipv4}
+ )
+ params = utils.remove_empties(params)
+
+ facts["ospfv3"] = params["config"]
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/static_routes/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/static_routes/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/static_routes/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/static_routes/static_routes.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/static_routes/static_routes.py
new file mode 100644
index 00000000..7df0e8bc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/facts/static_routes/static_routes.py
@@ -0,0 +1,191 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The iosxr static_routes fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import re
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.static_routes.static_routes import (
+ Static_routesArgs,
+)
+
+
+class Static_routesFacts(object):
+ """ The iosxr static_routes fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Static_routesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_device_data(self, connection):
+ return connection.get_config(flags="router static")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for static_routes
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = self.get_device_data(connection)
+
+ objs = []
+
+ if "No such configuration" not in data:
+ for entry in re.compile(r"(\s) vrf").split(data):
+ obj = self.render_config(self.generated_spec, entry)
+ if obj:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("static_routes", None)
+ facts = {}
+
+ facts["static_routes"] = []
+ params = utils.validate_config(self.argument_spec, {"config": objs})
+ for cfg in params["config"]:
+ facts["static_routes"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ entry_list = conf.split(" address-family")
+ config["address_families"] = []
+
+ if "router static" not in entry_list[0]:
+ config["vrf"] = entry_list[0].replace("!", "").strip()
+
+ for item in entry_list[1:]:
+ routes = []
+ address_family = {"routes": []}
+ address_family["afi"], address_family["safi"] = self.parse_af(item)
+
+ destinations = re.findall(r"((?:\S+)/(?:\d+)) (?:.*)", item, re.M)
+ for dest in set(destinations):
+ route = {"next_hops": []}
+ route["dest"] = dest
+
+ regex = r"%s .+$" % dest
+ cfg = re.findall(regex, item, re.M)
+
+ for route_entry in cfg:
+ exit_point = {}
+ exit_point["forward_router_address"] = self.parse_faddr(
+ route_entry
+ )
+ exit_point["interface"] = self.parse_intf(route_entry)
+ exit_point["admin_distance"] = self.parse_admin_distance(
+ route_entry
+ )
+
+ for x in [
+ "tag",
+ "tunnel-id",
+ "metric",
+ "description",
+ "track",
+ "vrflabel",
+ "dest_vrf",
+ ]:
+ exit_point[x.replace("-", "_")] = self.parse_attrib(
+ route_entry, x.replace("dest_vrf", "vrf")
+ )
+
+ route["next_hops"].append(exit_point)
+
+ routes.append(route)
+ address_family["routes"] = sorted(
+ routes, key=lambda i: i["dest"]
+ )
+ config["address_families"].append(address_family)
+
+ return utils.remove_empties(config)
+
+ def parse_af(self, item):
+ match = re.search(r"(?:\s*)(\w+)(?:\s*)(\w+)", item, re.M)
+ if match:
+ return match.group(1), match.group(2)
+
+ def parse_faddr(self, item):
+ for x in item.split(" "):
+ if (":" in x or "." in x) and "/" not in x:
+ return x
+
+ def parse_intf(self, item):
+ match = re.search(r" ((\w+)((?:\d)/(?:\d)/(?:\d)/(?:\d+)))", item)
+ if match:
+ return match.group(1)
+
+ def parse_attrib(self, item, attrib):
+ match = re.search(r" %s (\S+)" % attrib, item)
+ if match:
+ val = match.group(1).strip("'")
+ if attrib in ["tunnel-id", "vrflabel", "tag", "metric"]:
+ val = int(val)
+ return val
+
+ def parse_admin_distance(self, item):
+ split_item = item.split(" ")
+ for item in [
+ "vrf",
+ "metric",
+ "tunnel-id",
+ "vrflabel",
+ "track",
+ "tag",
+ "description",
+ ]:
+ try:
+ del split_item[split_item.index(item) + 1]
+ del split_item[split_item.index(item)]
+ except ValueError:
+ continue
+ try:
+ return [
+ i
+ for i in split_item
+ if "." not in i
+ and ":" not in i
+ and ord(i[0]) > 48
+ and ord(i[0]) < 57
+ ][0]
+ except IndexError:
+ return None
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/iosxr.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/iosxr.py
new file mode 100644
index 00000000..771aec74
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/iosxr.py
@@ -0,0 +1,671 @@
+# This code is part of Ansible, but is an independent component.
+# This particular file snippet, and this file snippet only, is BSD licensed.
+# Modules you write using this snippet, which is embedded dynamically by Ansible
+# still belong to the author of the module, and may assign their own license
+# to the complete work.
+#
+# Copyright (c) 2015 Peter Sprygada, <psprygada@ansible.com>
+# Copyright (c) 2017 Red Hat Inc.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import json
+import re
+from difflib import Differ
+
+from ansible.module_utils._text import to_text, to_bytes
+from ansible.module_utils.basic import env_fallback
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible.module_utils.connection import Connection, ConnectionError
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.netconf import (
+ NetconfConnection,
+)
+
+try:
+ from ncclient.xml_ import to_xml
+
+ HAS_NCCLIENT = True
+except ImportError:
+ HAS_NCCLIENT = False
+
+try:
+ from lxml import etree
+
+ HAS_XML = True
+except ImportError:
+ HAS_XML = False
+
+_EDIT_OPS = frozenset(["merge", "create", "replace", "delete"])
+
+BASE_1_0 = "{urn:ietf:params:xml:ns:netconf:base:1.0}"
+
+NS_DICT = {
+ "BASE_NSMAP": {"xc": "urn:ietf:params:xml:ns:netconf:base:1.0"},
+ "BANNERS_NSMAP": {
+ None: "http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg"
+ },
+ "INTERFACES_NSMAP": {None: "http://openconfig.net/yang/interfaces"},
+ "INSTALL_NSMAP": {
+ None: "http://cisco.com/ns/yang/Cisco-IOS-XR-installmgr-admin-oper"
+ },
+ "HOST-NAMES_NSMAP": {
+ None: "http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg"
+ },
+ "M:TYPE_NSMAP": {"idx": "urn:ietf:params:xml:ns:yang:iana-if-type"},
+ "ETHERNET_NSMAP": {None: "http://openconfig.net/yang/interfaces/ethernet"},
+ "CETHERNET_NSMAP": {
+ None: "http://cisco.com/ns/yang/Cisco-IOS-XR-drivers-media-eth-cfg"
+ },
+ "INTERFACE-CONFIGURATIONS_NSMAP": {
+ None: "http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg"
+ },
+ "INFRA-STATISTICS_NSMAP": {
+ None: "http://cisco.com/ns/yang/Cisco-IOS-XR-infra-statsd-oper"
+ },
+ "INTERFACE-PROPERTIES_NSMAP": {
+ None: "http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper"
+ },
+ "IP-DOMAIN_NSMAP": {
+ None: "http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-cfg"
+ },
+ "SYSLOG_NSMAP": {
+ None: "http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-cfg"
+ },
+ "AAA_NSMAP": {None: "http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-lib-cfg"},
+ "AAA_LOCALD_NSMAP": {
+ None: "http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-cfg"
+ },
+}
+
+iosxr_provider_spec = {
+ "host": dict(),
+ "port": dict(type="int"),
+ "username": dict(fallback=(env_fallback, ["ANSIBLE_NET_USERNAME"])),
+ "password": dict(
+ fallback=(env_fallback, ["ANSIBLE_NET_PASSWORD"]), no_log=True
+ ),
+ "ssh_keyfile": dict(
+ fallback=(env_fallback, ["ANSIBLE_NET_SSH_KEYFILE"]), type="path"
+ ),
+ "timeout": dict(type="int"),
+ "transport": dict(type="str", default="cli", choices=["cli", "netconf"]),
+}
+
+iosxr_argument_spec = {
+ "provider": dict(
+ type="dict",
+ options=iosxr_provider_spec,
+ removed_at_date="2022-06-01",
+ removed_from_collection="cisco.iosxr",
+ )
+}
+
+command_spec = {
+ "command": dict(),
+ "prompt": dict(default=None),
+ "answer": dict(default=None),
+}
+
+CONFIG_MISPLACED_CHILDREN = [re.compile(r"^end-\s*(.+)$")]
+
+# Objects defined in Route-policy Language guide of IOS_XR.
+# Reconfiguring these objects replace existing configurations.
+# Hence these objects should be played direcly from candidate
+# configurations
+CONFIG_BLOCKS_FORCED_IN_DIFF = [
+ {"start": re.compile(r"^route-policy"), "end": re.compile(r"end-policy$")},
+ {"start": re.compile(r"^prefix-set"), "end": re.compile(r"end-set$")},
+ {"start": re.compile(r"^as-path-set"), "end": re.compile(r"end-set$")},
+ {"start": re.compile(r"^community-set"), "end": re.compile(r"end-set$")},
+ {"start": re.compile(r"^rd-set"), "end": re.compile(r"end-set$")},
+ {
+ "start": re.compile(r"^extcommunity-set"),
+ "end": re.compile(r"end-set$"),
+ },
+]
+
+
+def get_provider_argspec():
+ return iosxr_provider_spec
+
+
+def get_connection(module):
+ if hasattr(module, "connection"):
+ return module.connection
+
+ capabilities = get_capabilities(module)
+ network_api = capabilities.get("network_api")
+ if network_api == "cliconf":
+ module.connection = Connection(module._socket_path)
+ elif network_api == "netconf":
+ module.connection = NetconfConnection(module._socket_path)
+ else:
+ module.fail_json(
+ msg="Invalid connection type {0!s}".format(network_api)
+ )
+
+ return module.connection
+
+
+def get_capabilities(module):
+ if hasattr(module, "capabilities"):
+ return module.capabilities
+ try:
+ capabilities = Connection(module._socket_path).get_capabilities()
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+ module.capabilities = json.loads(capabilities)
+
+ return module.capabilities
+
+
+def build_xml_subtree(container_ele, xmap, param=None, opcode=None):
+ sub_root = container_ele
+ meta_subtree = list()
+
+ for key, meta in xmap.items():
+ candidates = meta.get("xpath", "").split("/")
+ if container_ele.tag == candidates[-2]:
+ parent = container_ele
+ elif sub_root.tag == candidates[-2]:
+ parent = sub_root
+ else:
+ parent = sub_root.find(
+ ".//"
+ + meta.get("xpath", "")
+ .split(sub_root.tag + "/", 1)[1]
+ .rsplit("/", 1)[0]
+ )
+
+ if (
+ opcode in ("delete", "merge")
+ and meta.get("operation", "unknown") == "edit"
+ ) or meta.get("operation", None) is None:
+
+ if meta.get("tag", False) is True:
+ if parent.tag == container_ele.tag:
+ if meta.get("ns", False) is True:
+ child = etree.Element(
+ candidates[-1],
+ nsmap=NS_DICT[key.upper() + "_NSMAP"],
+ )
+ else:
+ child = etree.Element(candidates[-1])
+ meta_subtree.append(child)
+ sub_root = child
+ else:
+ if meta.get("ns", False) is True:
+ child = etree.SubElement(
+ parent,
+ candidates[-1],
+ nsmap=NS_DICT[key.upper() + "_NSMAP"],
+ )
+ else:
+ child = etree.SubElement(parent, candidates[-1])
+
+ if meta.get("attrib", None) is not None and opcode in (
+ "delete",
+ "merge",
+ ):
+ child.set(BASE_1_0 + meta.get("attrib"), opcode)
+
+ continue
+
+ text = None
+ param_key = key.split(":")
+ if param_key[0] == "a":
+ if (
+ param is not None
+ and param.get(param_key[1], None) is not None
+ ):
+ text = param.get(param_key[1])
+ elif param_key[0] == "m":
+ if meta.get("value", None) is not None:
+ text = meta.get("value")
+
+ if text:
+ if meta.get("ns", False) is True:
+ child = etree.SubElement(
+ parent,
+ candidates[-1],
+ nsmap=NS_DICT[key.upper() + "_NSMAP"],
+ )
+ else:
+ child = etree.SubElement(parent, candidates[-1])
+ child.text = text
+
+ if meta.get("attrib", None) is not None and opcode in (
+ "delete",
+ "merge",
+ ):
+ child.set(BASE_1_0 + meta.get("attrib"), opcode)
+
+ if len(meta_subtree) > 1:
+ for item in meta_subtree:
+ container_ele.append(item)
+
+ if sub_root == container_ele:
+ return None
+ else:
+ return sub_root
+
+
+def build_xml(container, xmap=None, params=None, opcode=None):
+ """
+ Builds netconf xml rpc document from meta-data
+
+ Args:
+ container: the YANG container within the namespace
+ xmap: meta-data map to build xml tree
+ params: Input params that feed xml tree values
+ opcode: operation to be performed (merge, delete etc.)
+
+ Example:
+ Module inputs:
+ banner_params = [{'banner':'motd', 'text':'Ansible banner example', 'state':'present'}]
+
+ Meta-data definition:
+ bannermap = collections.OrderedDict()
+ bannermap.update([
+ ('banner', {'xpath' : 'banners/banner', 'tag' : True, 'attrib' : "operation"}),
+ ('a:banner', {'xpath' : 'banner/banner-name'}),
+ ('a:text', {'xpath' : 'banner/banner-text', 'operation' : 'edit'})
+ ])
+
+ Fields:
+ key: exact match to the key in arg_spec for a parameter
+ (prefixes --> a: value fetched from arg_spec, m: value fetched from meta-data)
+ xpath: xpath of the element (based on YANG model)
+ tag: True if no text on the element
+ attrib: attribute to be embedded in the element (e.g. xc:operation="merge")
+ operation: if edit --> includes the element in edit_config() query else ignores for get() queries
+ value: if key is prefixed with "m:", value is required in meta-data
+
+ Output:
+ <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <banners xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg">
+ <banner xc:operation="merge">
+ <banner-name>motd</banner-name>
+ <banner-text>Ansible banner example</banner-text>
+ </banner>
+ </banners>
+ </config>
+ :returns: xml rpc document as a string
+ """
+ if opcode == "filter":
+ root = etree.Element("filter", type="subtree")
+ elif opcode in ("delete", "merge"):
+ root = etree.Element("config", nsmap=NS_DICT["BASE_NSMAP"])
+
+ container_ele = etree.SubElement(
+ root, container, nsmap=NS_DICT[container.upper() + "_NSMAP"]
+ )
+
+ if xmap is not None:
+ if params is None:
+ build_xml_subtree(container_ele, xmap, opcode=opcode)
+ else:
+ subtree_list = list()
+ for param in to_list(params):
+ subtree_ele = build_xml_subtree(
+ container_ele, xmap, param=param, opcode=opcode
+ )
+ if subtree_ele is not None:
+ subtree_list.append(subtree_ele)
+
+ for item in subtree_list:
+ container_ele.append(item)
+
+ return etree.tostring(root, encoding="unicode")
+
+
+def etree_find(root, node):
+ try:
+ root = etree.fromstring(to_bytes(root))
+ except (ValueError, etree.XMLSyntaxError):
+ pass
+
+ return root.find(".//%s" % node.strip())
+
+
+def etree_findall(root, node):
+ try:
+ root = etree.fromstring(to_bytes(root))
+ except (ValueError, etree.XMLSyntaxError):
+ pass
+
+ return root.findall(".//%s" % node.strip())
+
+
+def is_cliconf(module):
+ capabilities = get_capabilities(module)
+ return capabilities.get("network_api") == "cliconf"
+
+
+def is_netconf(module):
+ capabilities = get_capabilities(module)
+ network_api = capabilities.get("network_api")
+ if network_api == "netconf":
+ if not HAS_NCCLIENT:
+ module.fail_json(msg="ncclient is not installed")
+ if not HAS_XML:
+ module.fail_json(msg="lxml is not installed")
+ return True
+
+ return False
+
+
+def get_config_diff(module, running=None, candidate=None):
+ conn = get_connection(module)
+
+ if is_cliconf(module):
+ try:
+ response = conn.get("show commit changes diff")
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+ return response
+ elif is_netconf(module):
+ if running and candidate:
+ # ignore rpc-reply root node and diff from data element onwards
+ running_data_ele = etree.fromstring(
+ to_bytes(running.strip())
+ ).getchildren()[0]
+ candidate_data_ele = etree.fromstring(
+ to_bytes(candidate.strip())
+ ).getchildren()[0]
+
+ running_data = to_text(etree.tostring(running_data_ele)).strip()
+ candidate_data = to_text(
+ etree.tostring(candidate_data_ele)
+ ).strip()
+ if running_data != candidate_data:
+ d = Differ()
+ diff = list(
+ d.compare(
+ running_data.splitlines(), candidate_data.splitlines()
+ )
+ )
+ return "\n".join(diff).strip()
+
+ return None
+
+
+def discard_config(module):
+ conn = get_connection(module)
+ try:
+ if is_netconf(module):
+ conn.discard_changes(remove_ns=True)
+ else:
+ conn.discard_changes()
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+
+
+def commit_config(
+ module,
+ comment=None,
+ confirmed=False,
+ confirm_timeout=None,
+ persist=False,
+ check=False,
+ label=None,
+):
+ conn = get_connection(module)
+ reply = None
+ try:
+ if is_netconf(module):
+ if check:
+ reply = conn.validate(remove_ns=True)
+ else:
+ reply = conn.commit(
+ confirmed=confirmed,
+ timeout=confirm_timeout,
+ persist=persist,
+ remove_ns=True,
+ )
+ elif is_cliconf(module):
+ if check:
+ module.fail_json(
+ msg="Validate configuration is not supported with network_cli connection type"
+ )
+ else:
+ reply = conn.commit(comment=comment, label=label)
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+
+ return reply
+
+
+def get_oper(module, filter=None):
+ conn = get_connection(module)
+
+ if filter is not None:
+ try:
+ if is_netconf(module):
+ response = conn.get(filter=filter, remove_ns=True)
+ else:
+ response = conn.get(filter)
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+ else:
+ return None
+
+ return to_bytes(
+ etree.tostring(response), errors="surrogate_then_replace"
+ ).strip()
+
+
+def get_config(module, config_filter=None, source="running"):
+ conn = get_connection(module)
+
+ # Note: Does not cache config in favour of latest config on every get operation.
+ try:
+ if is_netconf(module):
+ out = to_xml(
+ conn.get_config(
+ source=source, filter=config_filter, remove_ns=True
+ )
+ )
+ elif is_cliconf(module):
+ out = conn.get_config(source=source, flags=config_filter)
+ cfg = out.strip()
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+ return cfg
+
+
+def check_existing_commit_labels(conn, label):
+ out = conn.get(
+ command="show configuration history detail | include %s" % label
+ )
+ label_exist = re.search(label, out, re.M)
+ if label_exist:
+ return True
+ else:
+ return False
+
+
+def load_config(
+ module,
+ command_filter,
+ commit=False,
+ replace=False,
+ comment=None,
+ admin=False,
+ exclusive=False,
+ running=None,
+ nc_get_filter=None,
+ label=None,
+):
+
+ conn = get_connection(module)
+
+ diff = None
+ if is_netconf(module):
+ # FIXME: check for platform behaviour and restore this
+ # conn.lock(target = 'candidate')
+ # conn.discard_changes()
+
+ try:
+ for filter in to_list(command_filter):
+ conn.edit_config(config=filter, remove_ns=True)
+
+ candidate = get_config(
+ module, source="candidate", config_filter=nc_get_filter
+ )
+ diff = get_config_diff(module, running, candidate)
+
+ if commit and diff:
+ commit_config(module)
+ else:
+ discard_config(module)
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+ finally:
+ # conn.unlock(target = 'candidate')
+ pass
+
+ elif is_cliconf(module):
+ try:
+ if label:
+ old_label = check_existing_commit_labels(conn, label)
+ if old_label:
+ module.fail_json(
+ msg="commit label {%s} is already used for"
+ " an earlier commit, please choose a different label"
+ " and rerun task" % label
+ )
+
+ response = conn.edit_config(
+ candidate=command_filter,
+ commit=commit,
+ admin=admin,
+ exclusive=exclusive,
+ replace=replace,
+ comment=comment,
+ label=label,
+ )
+ if module._diff:
+ diff = response.get("diff")
+
+ # Overwrite the default diff by the IOS XR commit diff.
+ # See plugins/cliconf/iosxr.py for this key set: show_commit_config_diff
+ diff = response.get("show_commit_config_diff")
+
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+
+ return diff
+
+
+def run_commands(module, commands, check_rc=True):
+ connection = get_connection(module)
+ try:
+ return connection.run_commands(commands=commands, check_rc=check_rc)
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc))
+
+
+def copy_file(module, src, dst, proto="scp"):
+ conn = get_connection(module)
+ try:
+ conn.copy_file(source=src, destination=dst, proto=proto)
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+
+
+def get_file(module, src, dst, proto="scp"):
+ conn = get_connection(module)
+ try:
+ conn.get_file(source=src, destination=dst, proto=proto)
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+
+
+# A list of commands like {end-set, end-policy, ...} are part of configuration
+# block like { prefix-set, as-path-set , ... } but they are not indented properly
+# to be included with their parent. sanitize_config will add indentation to
+# end-* commands so they are included with their parents
+def sanitize_config(config, force_diff_prefix=None):
+ conf_lines = config.split("\n")
+ for regex in CONFIG_MISPLACED_CHILDREN:
+ for index, line in enumerate(conf_lines):
+ m = regex.search(line)
+ if m and m.group(0):
+ if force_diff_prefix:
+ conf_lines[index] = " " + m.group(0) + force_diff_prefix
+ else:
+ conf_lines[index] = " " + m.group(0)
+ conf = ("\n").join(conf_lines)
+ return conf
+
+
+def mask_config_blocks_from_diff(config, candidate, force_diff_prefix):
+ conf_lines = config.split("\n")
+ candidate_lines = candidate.split("\n")
+
+ for regex in CONFIG_BLOCKS_FORCED_IN_DIFF:
+ block_index_start_end = []
+ for index, line in enumerate(candidate_lines):
+ startre = regex["start"].search(line)
+ if startre and startre.group(0):
+ start_index = index
+ else:
+ endre = regex["end"].search(line)
+ if endre and endre.group(0):
+ end_index = index
+ new_block = True
+ for prev_start, prev_end in block_index_start_end:
+ if start_index == prev_start:
+ # This might be end-set of another regex
+ # otherwise we would be having new start
+ new_block = False
+ break
+ if new_block and start_index:
+ block_index_start_end.append((start_index, end_index))
+
+ for start, end in block_index_start_end:
+ diff = False
+ if candidate_lines[start] in conf_lines:
+ run_conf_start_index = conf_lines.index(candidate_lines[start])
+ else:
+ diff = False
+ continue
+ for i in range(start, end + 1):
+ if conf_lines[run_conf_start_index] == candidate_lines[i]:
+ run_conf_start_index = run_conf_start_index + 1
+ else:
+ diff = True
+ break
+ if diff:
+ run_conf_start_index = conf_lines.index(candidate_lines[start])
+ for i in range(start, end + 1):
+ conf_lines[run_conf_start_index] = (
+ conf_lines[run_conf_start_index] + force_diff_prefix
+ )
+ run_conf_start_index = run_conf_start_index + 1
+
+ conf = ("\n").join(conf_lines)
+ return conf
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/address_family.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/address_family.py
new file mode 100644
index 00000000..fd9c9bf2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/address_family.py
@@ -0,0 +1,129 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import re
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.providers.providers import (
+ CliProvider,
+)
+
+
+class AddressFamily(CliProvider):
+ def render(self, config=None):
+ commands = list()
+ safe_list = list()
+
+ router_context = "router bgp %s" % self.get_value("config.bgp_as")
+ context_config = None
+
+ for item in self.get_value("config.address_family"):
+ context = "address-family %s %s" % (item["afi"], item["safi"])
+ context_commands = list()
+
+ if config:
+ context_path = [router_context, context]
+ context_config = self.get_config_context(
+ config, context_path, indent=1
+ )
+
+ for key, value in iteritems(item):
+ if value is not None:
+ meth = getattr(self, "_render_%s" % key, None)
+ if meth:
+ resp = meth(item, context_config)
+ if resp:
+ context_commands.extend(to_list(resp))
+
+ if context_commands:
+ commands.append(context)
+ commands.extend(context_commands)
+ commands.append("exit")
+
+ safe_list.append(context)
+
+ if config:
+ resp = self._negate_config(config, safe_list)
+ commands.extend(resp)
+
+ return commands
+
+ def _negate_config(self, config, safe_list=None):
+ commands = list()
+ matches = re.findall(r"(address-family .+)$", config, re.M)
+ for item in set(matches).difference(safe_list):
+ commands.append("no %s" % item)
+ return commands
+
+ def _render_networks(self, item, config=None):
+ commands = list()
+ safe_list = list()
+
+ for entry in item["networks"]:
+ network = entry["prefix"]
+ if entry["masklen"]:
+ network = "%s/%s" % (entry["prefix"], entry["masklen"])
+ safe_list.append(network)
+
+ cmd = "network %s" % network
+
+ if entry["route_map"]:
+ cmd += " route-policy %s" % entry["route_map"]
+
+ if not config or cmd not in config:
+ commands.append(cmd)
+
+ if config and self.params["operation"] == "replace":
+ matches = re.findall(r"network (\S+)", config, re.M)
+ for entry in set(matches).difference(safe_list):
+ commands.append("no network %s" % entry)
+
+ return commands
+
+ def _render_redistribute(self, item, config=None):
+ commands = list()
+ safe_list = list()
+
+ for entry in item["redistribute"]:
+ option = entry["protocol"]
+
+ cmd = "redistribute %s" % entry["protocol"]
+
+ if entry["id"] and entry["protocol"] in (
+ "ospf",
+ "eigrp",
+ "isis",
+ "ospfv3",
+ ):
+ cmd += " %s" % entry["id"]
+ option += " %s" % entry["id"]
+
+ if entry["metric"]:
+ cmd += " metric %s" % entry["metric"]
+
+ if entry["route_map"]:
+ cmd += " route-policy %s" % entry["route_map"]
+
+ if not config or cmd not in config:
+ commands.append(cmd)
+
+ safe_list.append(option)
+
+ if self.params["operation"] == "replace":
+ if config:
+ matches = re.findall(
+ r"redistribute (\S+)(?:\s*)(\d*)", config, re.M
+ )
+ for i in range(0, len(matches)):
+ matches[i] = " ".join(matches[i]).strip()
+ for entry in set(matches).difference(safe_list):
+ commands.append("no redistribute %s" % entry)
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/neighbors.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/neighbors.py
new file mode 100644
index 00000000..1ea870f7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/neighbors.py
@@ -0,0 +1,135 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import re
+import socket
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.providers.providers import (
+ CliProvider,
+)
+
+
+class Neighbors(CliProvider):
+ def render(self, config=None):
+ commands = list()
+ safe_list = list()
+
+ router_context = "router bgp %s" % self.get_value("config.bgp_as")
+ context_config = None
+
+ for item in self.get_value("config.neighbors"):
+ context_commands = list()
+
+ neighbor = item["neighbor"]
+
+ try:
+ socket.inet_aton(neighbor)
+ context = "neighbor %s" % neighbor
+ except socket.error:
+ context = "neighbor-group %s" % neighbor
+
+ if config:
+ context_path = [router_context, context]
+ context_config = self.get_config_context(
+ config, context_path, indent=1
+ )
+
+ for key, value in iteritems(item):
+ if value is not None:
+ meth = getattr(self, "_render_%s" % key, None)
+ if meth:
+ resp = meth(item, context_config)
+ if resp:
+ context_commands.extend(to_list(resp))
+
+ if context_commands:
+ commands.append(context)
+ commands.extend(context_commands)
+ commands.append("exit")
+
+ safe_list.append(context)
+
+ if config and safe_list:
+ commands.extend(self._negate_config(config, safe_list))
+
+ return commands
+
+ def _negate_config(self, config, safe_list=None):
+ commands = list()
+ matches = re.findall(r"(neighbor \S+)", config, re.M)
+ for item in set(matches).difference(safe_list):
+ commands.append("no %s" % item)
+ return commands
+
+ def _render_remote_as(self, item, config=None):
+ cmd = "remote-as %s" % item["remote_as"]
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_description(self, item, config=None):
+ cmd = "description %s" % item["description"]
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_enabled(self, item, config=None):
+ cmd = "shutdown"
+ if item["enabled"] is True:
+ cmd = "no %s" % cmd
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_update_source(self, item, config=None):
+ cmd = "update-source %s" % item["update_source"].replace(" ", "")
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_password(self, item, config=None):
+ cmd = "password %s" % item["password"]
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_ebgp_multihop(self, item, config=None):
+ cmd = "ebgp-multihop %s" % item["ebgp_multihop"]
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_tcp_mss(self, item, config=None):
+ cmd = "tcp mss %s" % item["tcp_mss"]
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_advertisement_interval(self, item, config=None):
+ cmd = "advertisement-interval %s" % item["advertisement_interval"]
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_neighbor_group(self, item, config=None):
+ cmd = "use neighbor-group %s" % item["neighbor_group"]
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_timers(self, item, config):
+ """generate bgp timer related configuration
+ """
+ keepalive = item["timers"]["keepalive"]
+ holdtime = item["timers"]["holdtime"]
+ min_neighbor_holdtime = item["timers"]["min_neighbor_holdtime"]
+
+ if keepalive and holdtime:
+ cmd = "timers %s %s" % (keepalive, holdtime)
+ if min_neighbor_holdtime:
+ cmd += " %s" % min_neighbor_holdtime
+ if not config or cmd not in config:
+ return cmd
+ else:
+ raise ValueError(
+ "required both options for timers: keepalive and holdtime"
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/process.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/process.py
new file mode 100644
index 00000000..8b0aec3a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/cli/config/bgp/process.py
@@ -0,0 +1,126 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import re
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.providers.providers import (
+ register_provider,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.providers.providers import (
+ CliProvider,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.providers.cli.config.bgp.neighbors import (
+ Neighbors,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.providers.cli.config.bgp.address_family import (
+ AddressFamily,
+)
+
+REDISTRIBUTE_PROTOCOLS = frozenset(
+ [
+ "ospf",
+ "ospfv3",
+ "eigrp",
+ "isis",
+ "static",
+ "connected",
+ "lisp",
+ "mobile",
+ "rip",
+ "subscriber",
+ ]
+)
+
+
+@register_provider("iosxr", "iosxr_bgp")
+class Provider(CliProvider):
+ def render(self, config=None):
+ commands = list()
+
+ existing_as = None
+ if config:
+ match = re.search(r"router bgp (\d+)", config, re.M)
+ if match:
+ existing_as = match.group(1)
+
+ operation = self.params["operation"]
+
+ context = None
+
+ if self.params["config"]:
+ context = "router bgp %s" % self.get_value("config.bgp_as")
+
+ if operation == "delete":
+ if existing_as:
+ commands.append("no router bgp %s" % existing_as)
+ elif context:
+ commands.append("no %s" % context)
+
+ else:
+ if operation == "replace":
+ if existing_as and int(existing_as) != self.get_value(
+ "config.bgp_as"
+ ):
+ # The negate command has to be committed before new BGP AS is used.
+ self.connection.edit_config(
+ "no router bgp %s" % existing_as
+ )
+ config = None
+
+ elif operation == "override":
+ if existing_as:
+ # The negate command has to be committed before new BGP AS is used.
+ self.connection.edit_config(
+ "no router bgp %s" % existing_as
+ )
+ config = None
+
+ context_commands = list()
+
+ for key, value in iteritems(self.get_value("config")):
+ if value is not None:
+ meth = getattr(self, "_render_%s" % key, None)
+ if meth:
+ resp = meth(config)
+ if resp:
+ context_commands.extend(to_list(resp))
+
+ if context and context_commands:
+ commands.append(context)
+ commands.extend(context_commands)
+ commands.append("exit")
+
+ return commands
+
+ def _render_router_id(self, config=None):
+ cmd = "bgp router-id %s" % self.get_value("config.router_id")
+ if not config or cmd not in config:
+ return cmd
+
+ def _render_log_neighbor_changes(self, config=None):
+ cmd = "bgp log neighbor changes"
+ log_neighbor_changes = self.get_value("config.log_neighbor_changes")
+ if log_neighbor_changes is True:
+ if not config or cmd not in config:
+ return "%s detail" % cmd
+ elif log_neighbor_changes is False:
+ if config and cmd in config:
+ return "%s disable" % cmd
+
+ def _render_neighbors(self, config):
+ """ generate bgp neighbor configuration
+ """
+ return Neighbors(self.params).render(config)
+
+ def _render_address_family(self, config):
+ """ generate address-family configuration
+ """
+ return AddressFamily(self.params).render(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/module.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/module.py
new file mode 100644
index 00000000..4786b80c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/module.py
@@ -0,0 +1,72 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.connection import Connection
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.providers import (
+ providers,
+)
+from ansible.module_utils._text import to_text
+
+
+class NetworkModule(AnsibleModule):
+
+ fail_on_missing_provider = True
+
+ def __init__(self, connection=None, *args, **kwargs):
+ super(NetworkModule, self).__init__(*args, **kwargs)
+
+ if connection is None:
+ connection = Connection(self._socket_path)
+
+ self.connection = connection
+
+ @property
+ def provider(self):
+ if not hasattr(self, "_provider"):
+ capabilities = self.from_json(self.connection.get_capabilities())
+
+ network_os = capabilities["device_info"]["network_os"]
+ network_api = capabilities["network_api"]
+
+ if network_api == "cliconf":
+ connection_type = "network_cli"
+
+ cls = providers.get(
+ network_os, self._name.split(".")[-1], connection_type
+ )
+
+ if not cls:
+ msg = (
+ "unable to find suitable provider for network os %s"
+ % network_os
+ )
+ if self.fail_on_missing_provider:
+ self.fail_json(msg=msg)
+ else:
+ self.warn(msg)
+
+ obj = cls(self.params, self.connection, self.check_mode)
+
+ setattr(self, "_provider", obj)
+
+ return getattr(self, "_provider")
+
+ def get_facts(self, subset=None):
+ try:
+ self.provider.get_facts(subset)
+ except Exception as exc:
+ self.fail_json(msg=to_text(exc))
+
+ def edit_config(self, config_filter=None):
+ current_config = self.connection.get_config(flags=config_filter)
+ try:
+ commands = self.provider.edit_config(current_config)
+ changed = bool(commands)
+ return {"commands": commands, "changed": changed}
+ except Exception as exc:
+ self.fail_json(msg=to_text(exc))
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/providers.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/providers.py
new file mode 100644
index 00000000..485eb383
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/providers/providers.py
@@ -0,0 +1,128 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import json
+
+from threading import RLock
+
+from ansible.module_utils.six import itervalues
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+)
+
+
+_registered_providers = {}
+_provider_lock = RLock()
+
+
+def register_provider(network_os, module_name):
+ def wrapper(cls):
+ _provider_lock.acquire()
+ try:
+ if network_os not in _registered_providers:
+ _registered_providers[network_os] = {}
+ for ct in cls.supported_connections:
+ if ct not in _registered_providers[network_os]:
+ _registered_providers[network_os][ct] = {}
+ for item in to_list(module_name):
+ for entry in itervalues(_registered_providers[network_os]):
+ entry[item] = cls
+ finally:
+ _provider_lock.release()
+ return cls
+
+ return wrapper
+
+
+def get(network_os, module_name, connection_type):
+ network_os_providers = _registered_providers.get(network_os)
+ if network_os_providers is None:
+ raise ValueError("unable to find a suitable provider for this module")
+ if connection_type not in network_os_providers:
+ raise ValueError("provider does not support this connection type")
+ elif module_name not in network_os_providers[connection_type]:
+ raise ValueError("could not find a suitable provider for this module")
+ return network_os_providers[connection_type][module_name]
+
+
+class ProviderBase(object):
+
+ supported_connections = ()
+
+ def __init__(self, params, connection=None, check_mode=False):
+ self.params = params
+ self.connection = connection
+ self.check_mode = check_mode
+
+ @property
+ def capabilities(self):
+ if not hasattr(self, "_capabilities"):
+ resp = self.from_json(self.connection.get_capabilities())
+ setattr(self, "_capabilities", resp)
+ return getattr(self, "_capabilities")
+
+ def get_value(self, path):
+ params = self.params.copy()
+ for key in path.split("."):
+ params = params[key]
+ return params
+
+ def get_facts(self, subset=None):
+ raise NotImplementedError(self.__class__.__name__)
+
+ def edit_config(self):
+ raise NotImplementedError(self.__class__.__name__)
+
+
+class CliProvider(ProviderBase):
+
+ supported_connections = ("network_cli",)
+
+ @property
+ def capabilities(self):
+ if not hasattr(self, "_capabilities"):
+ resp = self.from_json(self.connection.get_capabilities())
+ setattr(self, "_capabilities", resp)
+ return getattr(self, "_capabilities")
+
+ def get_config_context(self, config, path, indent=1):
+ if config is not None:
+ netcfg = NetworkConfig(indent=indent, contents=config)
+ try:
+ config = netcfg.get_block_config(to_list(path))
+ except ValueError:
+ config = None
+ return config
+
+ def render(self, config=None):
+ raise NotImplementedError(self.__class__.__name__)
+
+ def cli(self, command):
+ try:
+ if not hasattr(self, "_command_output"):
+ setattr(self, "_command_output", {})
+ return self._command_output[command]
+ except KeyError:
+ out = self.connection.get(command)
+ try:
+ out = json.loads(out)
+ except ValueError:
+ pass
+ self._command_output[command] = out
+ return out
+
+ def get_facts(self, subset=None):
+ return self.populate()
+
+ def edit_config(self, config=None):
+ commands = self.render(config)
+ if commands and self.check_mode is False:
+ self.connection.edit_config(commands)
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/acl_interfaces.py
new file mode 100644
index 00000000..7f07a123
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/acl_interfaces.py
@@ -0,0 +1,61 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+class Acl_interfacesTemplate(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(Acl_interfacesTemplate, self).__init__(lines=lines, tmplt=self)
+
+ # fmt: off
+ PARSERS = [
+ {
+ 'name': 'interface',
+ 'getval': re.compile(r'''
+ ^interface
+ \s(preconfigure)*\s*
+ (?P<name>\S+)$''', re.VERBOSE),
+ 'setval': 'interface {{ name }}',
+ 'result': {
+ '{{ name }}': {
+ 'name': '{{ name }}',
+ 'access_groups': {},
+ },
+ },
+ 'shared': True
+ },
+ {
+ "name": "access_groups",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ipv4|ipv6)
+ \saccess-group\s(?P<acl_name>\S+)
+ \s(?P<direction>\S+)$
+ """,
+ re.VERBOSE,
+ ),
+ "setval": "{{ afi }} access-group {{ name }} {{ 'egress' if direction == 'out' else 'ingress' }}",
+ "result": {
+ "{{ name }}": {
+ "access_groups": {
+ "{{ afi }}": {
+ "afi": "{{ afi }}",
+ "acls": [
+ {
+ "name": "{{ acl_name }}",
+ "direction": "{{ 'in' if direction == 'ingress' else 'out' }}",
+ },
+ ],
+ }
+ }
+ }
+ }
+ },
+ ]
+ # fmt: on
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospf_interfaces.py
new file mode 100644
index 00000000..3cd153d7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospf_interfaces.py
@@ -0,0 +1,1370 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+def get_ospf_type(afi):
+ return "ospf" if afi == "ipv4" else "ospfv3"
+
+
+def get_interface_type(name):
+ return (
+ "GigabitEthernet" if name.startswith("GigabitEthernet") else "Loopback"
+ )
+
+
+def _compute_command(cfg):
+ ospf_type = get_ospf_type(cfg["address_family"]["afi"])
+ type = get_interface_type(cfg["name"])
+ area = cfg["address_family"]["processes"]["area"]
+ pid = cfg["address_family"]["processes"]["process_id"]
+ cmd = "router {0} {1} area {2} interface {3} {4}".format(
+ ospf_type, pid, area["area_id"], type, cfg["name"].split(type)[1]
+ )
+ return cmd
+
+
+def _tmplt_ospf_int_delete(config_data):
+ ospf_type = get_ospf_type(config_data["afi"])
+ type = get_interface_type(config_data["name"])
+ area = config_data["area"]
+ command = "router {0} {1} area {2} interface {3} {4}".format(
+ ospf_type,
+ config_data["process"],
+ area["area_id"],
+ type,
+ config_data["name"].split(type)[1],
+ )
+ return command
+
+
+def _tmplt_ospf_config(config_data):
+ command = _compute_command(config_data)
+ return command
+
+
+def _tmplt_ospf_authentication_md_config(config_data):
+ command = _compute_command(config_data)
+ auth = config_data["address_family"]["authentication"]
+ if auth["message_digest"].get("keychain"):
+ command += (
+ " authentication message-digest keychain "
+ + auth["message_digest"]["keychain"]
+ )
+ return command
+
+
+def _tmplt_ospf_authentication_md_set(config_data):
+ command = _compute_command(config_data)
+ auth = config_data["address_family"]["authentication"]
+ if auth.get("message_digest") and auth["message_digest"].get("keychain"):
+ command += " authentication message-digest"
+ elif auth.get("null_auth"):
+ command += " authentication null"
+ return command
+
+
+def _tmplt_ospf_authentication_key(config_data):
+ command = _compute_command(config_data)
+ auth = config_data["address_family"]["authentication_key"]
+ if auth.get("password"):
+ command += " authentication-key " + auth["password"]
+ elif auth.get("encrypted"):
+ command += " authentication-key encrypted " + auth["encrypted"]
+ elif auth.get("clear"):
+ command += " authentication-key clear " + auth["clear"]
+ return command
+
+
+def _tmplt_ospf_int_bfd_min_int(config_data):
+ command = _compute_command(config_data)
+ bfd = config_data["address_family"]["bfd"]
+ if bfd.get("minimum_interval"):
+ command += " bfd minimum-interval " + str(bfd["minimum_interval"])
+ return command
+
+
+def _tmplt_ospf_int_bfd_mult(config_data):
+ command = _compute_command(config_data)
+ bfd = config_data["address_family"]["bfd"]
+ if bfd.get("multiplier"):
+ command += " bfd multiplier " + str(bfd["multiplier"])
+ return command
+
+
+def _tmplt_ospf_int_bfd_fd(config_data):
+ command = _compute_command(config_data)
+ bfd = config_data["address_family"]["bfd"]
+ if bfd.get("fast_detect") and bfd["fast_detect"].get("set"):
+ command += " bfd fast-detect"
+ elif bfd.get("fast_detect") and bfd["fast_detect"].get("disable"):
+ command += " bfd fast-detect disable"
+ elif bfd.get("fast_detect") and bfd["fast_detect"].get("strict_mode"):
+ command += " bfd fast-detect strict-mode"
+ return command
+
+
+def _tmplt_ospf_cost_config(config_data):
+ command = _compute_command(config_data)
+ command += " cost " + str(config_data["address_family"]["cost"])
+ return command
+
+
+def _tmplt_ospf_cost_fallback_config(config_data):
+ command = _compute_command(config_data)
+ fallback = config_data["address_family"]["cost_fallback"]
+ command += (
+ " cost-fallback "
+ + str(fallback["cost"])
+ + " threshold "
+ + str(fallback["threshold"])
+ )
+ return command
+
+
+def _tmplt_ospf_dead_int_config(config_data):
+ command = _compute_command(config_data)
+ command += " dead-interval " + str(
+ config_data["address_family"]["dead_interval"]
+ )
+ return command
+
+
+def _tmplt_ospf_demand_config(config_data):
+ command = _compute_command(config_data)
+ if config_data["address_family"]["demand_circuit"]:
+ command += " demand-circuit enable"
+ else:
+ command += " demand-circuit disable"
+ return command
+
+
+class Ospf_interfacesTemplate(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(Ospf_interfacesTemplate, self).__init__(lines=lines, tmplt=self)
+
+ # fmt: off
+ PARSERS = [
+ {
+ "name": "name",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ $''',
+ re.VERBOSE),
+ "remval": _tmplt_ospf_int_delete,
+ "setval": _tmplt_ospf_config,
+ "compval": "name",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ },
+ },
+ },
+ "shared": True,
+ },
+ {
+ "name": "authentication.message_digest",
+ "getval": re.compile(
+ r"""
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sauthentication(?P<authentication>)
+ \s(?P<opt>message-digest)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_authentication_md_set,
+ "compval": "address_family.authentication.message_digest",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "authentication": {
+ "set": "{{ True if authentication is defined and opt is undefined }}",
+ "message_digest": {
+ "set": "{{ True if opt == 'message-digest' else None }}",
+ },
+ }
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "authentication.message_digest.keychain",
+ "getval": re.compile(
+ r"""
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sauthentication(?P<authentication>)
+ \s(?P<message_digest>message-digest)
+ \skeychain\s(?P<keychain>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_authentication_md_config,
+ "compval": "address_family.authentication.message_digest.keychain",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "authentication": {
+ "message_digest": {
+ "keychain": "{{ keychain }}",
+ },
+ }
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "authentication.null_auth",
+ "getval": re.compile(
+ r"""
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sauthentication(?P<authentication>)
+ \s(?P<opt>null)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_authentication_md_set,
+ "compval": "address_family.authentication.null_auth",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "authentication": {
+ "set": "{{ True if authentication is defined and opt is undefined }}",
+ "null_auth": "{{ True if opt == 'null' else None }}",
+ }
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "authentication_key",
+ "getval": re.compile(
+ r"""
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sauthentication-key
+ (\sencrypted\s(?P<encrypted>\S+))?
+ (\s(?P<key>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_authentication_key,
+ "compval": "address_family.authentication_key",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "authentication_key": {
+ "encrypted": "{{ encrypted }}",
+ }
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "bfd.minimum_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sbfd(?P<bfd>)
+ \sminimum-interval\s(?P<minimum_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_int_bfd_min_int,
+ "compval": "address_family.bfd.minimum_interval",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+
+ }
+ },
+ "bfd": {
+ "minimum_interval": "{{ minimum_interval|int }}",
+ },
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "bfd.multiplier",
+ "getval": re.compile(
+ r"""
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sbfd(?P<bfd>)
+ \smultiplier\s(?P<multiplier>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_int_bfd_mult,
+ "compval": "address_family.bfd.multiplier",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+
+ }
+ },
+ "bfd": {
+ "multiplier": "{{ multiplier|int }}",
+ },
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "bfd.fast_detect.set",
+ "getval": re.compile(
+ r"""
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sbfd(?P<bfd>)
+ \sfast-detect(?P<fast_detect>)
+ (\s(?P<opt>(disable|strict-mode)))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_int_bfd_fd,
+ "compval": "address_family.bfd.fast_detect.set",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+
+ }
+ },
+ "bfd": {
+ "fast_detect": {
+ "set": "{{ True if opt != 'disable' and opt != 'strict-mode' and fast_detect is defined else None }}",
+ },
+ },
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "bfd.fast_detect.disable",
+ "getval": re.compile(
+ r"""
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sbfd(?P<bfd>)
+ \sfast-detect(?P<fast_detect>)
+ (\s(?P<opt>(disable|strict-mode)))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_int_bfd_fd,
+ "compval": "address_family.bfd.fast_detect.disable",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+
+ }
+ },
+ "bfd": {
+ "fast_detect": {
+ "disable": "{{ True if opt == 'disable' else None }}"
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ {
+ "name": "bfd.fast_detect.strict_mode",
+ "getval": re.compile(
+ r"""
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sbfd(?P<bfd>)
+ \sfast-detect(?P<fast_detect>)
+ \s(?P<opt>strict-mode)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_int_bfd_fd,
+ "compval": "address_family.bfd.fast_detect.strict_mode",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "bfd": {
+ "fast_detect": {
+ "strict_mode": "{{ True if opt == 'strict-mode' else None }}",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ {
+ "name": "cost",
+ "getval": re.compile(
+ r"""
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \scost\s(?P<cost>\S+)$""",
+ re.VERBOSE),
+ "setval": _tmplt_ospf_cost_config,
+ "compval": "address_family.cost",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "cost": "{{ cost }}"
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "cost_fallback",
+ "getval": re.compile(
+ r"""
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \scost-fallback\s(?P<cost>\S+)
+ \sthreshold\s(?P<threshold>\S+)
+ $""",
+ re.VERBOSE),
+ "setval": _tmplt_ospf_cost_fallback_config,
+ "compval": "address_family.cost_fallback",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "cost_fallback": {
+ "cost": "{{ cost }}",
+ "threshold": "{{ threshold }}"
+ }
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "dead_interval",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sdead-interval\s(?P<dead_interval>\S+)
+ $''',
+ re.VERBOSE),
+ "setval": _tmplt_ospf_dead_int_config,
+ "compval": "address_family.dead_interval",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "dead_interval": "{{ dead_interval }}"
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "demand_circuit",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sdemand-circuit\s(?P<demand_circuit>\S+)
+ $''',
+ re.VERBOSE),
+ "setval": _tmplt_ospf_demand_config,
+ "compval": "address_family.demand_circuit",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "demand_circuit": "{{ True if demand_circuit == 'enable' else False if demand_circuit == 'disable' else None }}"
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "flood_reduction",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sflood-reduction\s(?P<flood_reduction>\S+)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "flood-reduction {{ 'enable' if flood_reduction == True else 'disable' }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "flood_reduction": "{{ True if flood_reduction == 'enable' else False if flood_reduction == 'disable' else None }}"
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "hello_interval",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \shello-interval\s(?P<dead_interval>\S+)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "hello-interval {{ hello_interval }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "hello_interval": "{{ hello_interval }}"
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "link_down.set",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \s(?P<link_down>link-down)
+ (\s(?P<disable>disable))?
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "link-down",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "link_down": {
+ "set": "{{ True if link_down is defined and disable is undefined else None}}"
+ }
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "link_down.disable",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \s(?P<link_down>link-down)
+ \s(?P<disable>disable)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "link-down disable",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "link_down": {
+ "disable": "{{ True if disable is defined else None }}"
+ }
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "message_digest_key",
+ "getval": re.compile(
+ r"""
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \smessage-digest-key
+ \s(?P<id>\d+)
+ \smd5
+ \s(?P<encryption>\d)
+ \s(?P<key>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface "
+ "{{ type }} {{ name }} #message-digest-key {{ message_digest_key.id }} "
+ "md5 encrypted {{ message_digest_key.encrypted}}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "message_digest_key": {
+ "id": "{{ id }}",
+ "encrypted": "{{ encryption }}",
+ }
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "mpls.set_ldp",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \s(?P<mpls>mpls)
+ \s(?P<ldp>set_ldp)
+ (\s(?P<sync>sync))?
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "mpls ldp",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "mpls": {
+ "set_ldp": "{{ True if set_ldp is defined and sync is undefined else None}}"
+ }
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "mpls.ldp_sync",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \s(?P<mpls>mpls)
+ \s(?P<ldp>ldp)
+ \s(?P<sync>sync)
+ (\s(?P<disable>disable))?
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "mpls ldp sync",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "mpls": {
+ "ldp_sync": "{{ True if sync is defined and disable is undefined else None}}"
+ }
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "mpls.ldp_sync_disable",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \s(?P<mpls>mpls)
+ \s(?P<ldp>ldp)
+ \s(?P<sync>sync)
+ \s(?P<disable>disable)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "mpls ldp sync disable",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "mpls": {
+ "ldp_sync": "{{ False if disable is defined }}"
+ }
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "mtu_ignore",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \smtu-ignore\s(?P<mtu_ignore>\S+)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "mtu_ignore {{ 'enable' if mtu_ignore == 'True' else 'disable' if mtu_ignore == 'False' }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "mtu_ignore": "{{ True if mtu_ignore == 'enable' else False if mtu_ignore == 'disable' else None }}"
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "network",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \snetwork\s(?P<network>\S+)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "network {{ network }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "network": "{{ network }}"
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "packet_size",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \spacket-size\s(?P<packet_size>\S+)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "packet-size {{ packet_size }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "packet_size": "{{ packet_size }}"
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "passive",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \spassive\s(?P<passive>\S+)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "passive {{ 'enable' if passive == 'True' else 'disable' if passive == 'False' }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "passive": "{{ True if passive == 'enable' else False if passive == 'disable' else None }}"
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "prefix_suppression.disable",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sprefix-suppression\s(?P<prefix_suppression>\S+)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "prefix-suppression {{ prefix_suppression }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "prefix_suppression": {
+ "disable": "{{ True if prefix_suppression == 'disable' else None }}"
+ }
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "prefix_suppression.secondary_address",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \s(?P<prefix_suppression>prefix-suppression)
+ \s(?P<secondary_address>secondary-address)
+ (\s(?P<disable>disable))?
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "prefix-suppression secondary-address {{ disable if secondary_address is False }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "prefix_suppression": {
+ "secondary_address": "{{ True if secondary_address is defined and "
+ "disable is undefined else False if disable is defined else None }}"
+ },
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "priority",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \spriority\s(?P<priority>\d+)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "priority {{ priority }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "priority": "{{ priority|int }}"
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "retransmit_interval",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \sretransmit-interval\s(?P<retransmit_interval>\d+)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "retransmit-interval {{ retransmit_interval }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "retransmit_interval": "{{ retransmit_interval|int }}"
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "security.ttl_hops",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \s(?P<security>security)
+ \s(?P<ttl>ttl)
+ \shops\s(?P<hops>\d+)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "security ttl hops {{ hops }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "security_ttl": {
+ "hops": "{{ hops|int }}"
+ },
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "security.ttl",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \s(?P<security>security)
+ \s(?P<ttl>ttl)
+ (\s(?P<hops>hops))?
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "security ttl",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "security_ttl": {
+ "set": "{{ True if ttl is defined and hops is undefined }}"
+ },
+ },
+ },
+ },
+ }
+ },
+ {
+ "name": "transmit_delay",
+ "getval": re.compile(r'''
+ ^router
+ \s(?P<ospf_type>ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sinterface\s(?P<name>\S+)
+ \stransmit-delay\s(?P<transmit_delay>\d+)
+ $''',
+ re.VERBOSE),
+ "setval": "router {{ ospf_type }} {{ process_id }} area {{ area_id }} interface {{ type }} {{ name }} "
+ "transmit-delay {{ transmit_delay }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "type": "{{ 'gigabitethernet' if 'GigabitEthernet' in name else 'loopback' if 'Loopback' in name }}",
+ "address_family": {
+ "{{ ospf_type }}": {
+ "afi": "{{ 'ipv4' if ospf_type == 'ospf' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ },
+ }
+ },
+ "transmit_delay": "{{ transmit_delay|int }}"
+ },
+ },
+ },
+ }
+ },
+ ]
+ # fmt: on
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospfv2.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospfv2.py
new file mode 100644
index 00000000..83527d03
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospfv2.py
@@ -0,0 +1,2876 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+from ansible.module_utils.six import iteritems
+
+
+def _tmplt_ospf_default_information(config_data):
+ if "default_information_originate" in config_data:
+ command = "default-information originate"
+ if "always" in config_data["default_information_originate"]:
+ command += " always"
+ if "metric" in config_data["default_information_originate"]:
+ command += " metric {metric}".format(
+ **config_data["default_information_originate"]
+ )
+ if "metric_type" in config_data["default_information_originate"]:
+ command += " metric-type {metric_type}".format(
+ **config_data["default_information_originate"]
+ )
+ if "route_policy" in config_data["default_information_originate"]:
+ command += " route-policy {route_policy}".format(
+ **config_data["default_information_originate"]
+ )
+ return command
+
+
+def _tmplt_ospf_auto_cost(config_data):
+ if "auto_cost" in config_data:
+ command = "auto-cost"
+ if "disable" in config_data["auto_cost"]:
+ command += " disable"
+ if "reference_bandwidth" in config_data["auto_cost"]:
+ command += " reference-bandwidth {reference_bandwidth}".format(
+ **config_data["auto_cost"]
+ )
+ return command
+
+
+def _tmplt_ospf_bfd(config_data):
+ if "bfd" in config_data:
+ command = "bfd"
+ if "minimum_interval" in config_data["bfd"]:
+ command += " minimum-interval {minimum_interval}".format(
+ **config_data["bfd"]
+ )
+
+ if "multiplier" in config_data["bfd"]:
+ command += " multiplier {multiplier}".format(**config_data["bfd"])
+
+ return command
+
+
+def _tmplt_ospf_security(config_data):
+ if "security_ttl" in config_data:
+ command = "security_ttl"
+ if "set" in config_data["security_ttl"]:
+ command += " ttl"
+ elif config_data["security_ttl"].get("hops"):
+ command += " ttl hops {0}".format(
+ config_data["security_ttl"].get("hops")
+ )
+ return command
+
+
+def _tmplt_ospf_log_adjacency(config_data):
+ if "log_adjacency_changes" in config_data:
+ command = "log adjacency"
+ if "set" in config_data["log_adjacency_changes"]:
+ command += " changes"
+ elif config_data["log_adjacency_changes"].get("disable"):
+ command += " disable"
+ elif config_data["log_adjacency_changes"].get("details"):
+ command += " details"
+ return command
+
+
+def _tmplt_ospf_log_max_lsa(config_data):
+ if "max_lsa" in config_data:
+ command = "max-lsa"
+ if "threshold" in config_data["max_lsa"]:
+ command += " {0}".format(config_data["max_lsa"].get("threshold"))
+ if "warning_only" in config_data["max_lsa"]:
+ command += " warning-only {0}".format(
+ config_data["max_lsa"].get("warning_only")
+ )
+ if "ignore_time" in config_data["max_lsa"]:
+ command += " ignore-time {0}".format(
+ config_data["max_lsa"].get("ignore_time")
+ )
+ if "ignore_count" in config_data["max_lsa"]:
+ command += " ignore-count {0}".format(
+ config_data["max_lsa"].get("ignore_count")
+ )
+ if "reset_time" in config_data["max_lsa"]:
+ command += " reset-time {0}".format(
+ config_data["max_lsa"].get("reset_time")
+ )
+ return command
+
+
+def _tmplt_ospf_max_metric(config_data):
+ if "max_metric" in config_data:
+ command = "max-metric"
+ if "router_lsa" in config_data["max_metric"]:
+ command += " router-lsa"
+ if "external_lsa" in config_data["max_metric"]:
+ command += " external-lsa {external_lsa}".format(
+ **config_data["max_metric"]
+ )
+ if "include_stub" in config_data["max_metric"]:
+ command += " include-stub"
+ if "on_startup" in config_data["max_metric"]:
+ if "time" in config_data["max_metric"]["on_startup"]:
+ command += " on-startup {time}".format(
+ **config_data["max_metric"]["on_startup"]
+ )
+ elif "wait_for_bgp" in config_data["max_metric"]["on_startup"]:
+ command += " on-startup wait-for-bgp"
+ if "summary_lsa" in config_data["max_metric"]:
+ command += " summary-lsa {summary_lsa}".format(
+ **config_data["max_metric"]
+ )
+ return command
+
+
+def _tmplt_ospf_distance_admin(config_data):
+ if "admin_distance" in config_data:
+ command = "distance"
+ if config_data["admin_distance"].get("value"):
+ command += " {0}".format(
+ config_data["admin_distance"].get("value")
+ )
+ if config_data["admin_distance"].get("source"):
+ command += " {0}".format(
+ config_data["admin_distance"].get("source")
+ )
+ if config_data["admin_distance"].get("wildcard"):
+ command += " {0}".format(
+ config_data["admin_distance"].get("wildcard")
+ )
+ if config_data["admin_distance"].get("access_list"):
+ command += " {0}".format(
+ config_data["admin_distance"].get("access_list")
+ )
+ return command
+
+
+def _tmplt_ospf_distance_ospf(config_data):
+ if "ospf_distance" in config_data:
+ command = "distance ospf"
+ if config_data["ospf_distance"].get("external"):
+ command += " external {0}".format(
+ config_data["ospf_distance"].get("external")
+ )
+ if config_data["ospf_distance"].get("inter_area"):
+ command += " inter-area {0}".format(
+ config_data["ospf_distance"].get("inter_area")
+ )
+ if config_data["ospf_distance"].get("intra_area"):
+ command += " intra-area {0}".format(
+ config_data["ospf_distance"].get("intra_area")
+ )
+ return command
+
+
+def _tmplt_ospf_nsr(config_data):
+ if "nsr" in config_data:
+ command = "nsr"
+ if "set" in config_data["nsr"]:
+ command += " nsr"
+ elif config_data["nsr"].get("disable"):
+ command += " nsr {0}".format("disable")
+ return command
+
+
+def _tmplt_ospf_protocol(config_data):
+ if "protocol_shutdown" in config_data:
+ command = "protocol"
+ if "set" in config_data["protocol_shutdown"]:
+ command += " shutdown"
+ elif config_data["shutdown"].get("host_mode"):
+ command += " shutdown host-mode"
+ elif config_data["shutdown"].get("on_reload"):
+ command += " shutdown on-reload"
+ return command
+
+
+def _tmplt_microloop_avoidance(config_data):
+ if "microloop_avoidance" in config_data:
+ command = "microloop avoidance"
+ if "protected" in config_data["microloop_avoidance"]:
+ command += " protected"
+ if "segment_routing" in config_data["microloop_avoidance"]:
+ command += " segment_routing"
+ if "rib_update_delay" in config_data["microloop_avoidance"]:
+ command += " rin-update-delay {0}".config_data[
+ "microloop_avoidance"
+ ].get("rib_update_delay")
+ return command
+
+
+def _tmplt_ospf_bfd_fast_detect(config_data):
+ if "bfd" in config_data:
+ command = "bfd"
+ if "fast_detect" in config_data["bfd"]:
+ fast_detect = config_data["bfd"].get("fast_detect")
+ command += " fast-detect"
+ if "strict_mode" in fast_detect:
+ command += " strict-mode"
+ return command
+
+
+def _tmplt_ospf_mpls_traffic_eng(config_data):
+ if "traffic_eng" in config_data:
+ command = "mpls traffic-eng"
+ if "igp_intact" in config_data["traffic_eng"]:
+ command += " igp-intact"
+ if "ldp_sync_update" in config_data["traffic_eng"]:
+ command += " ldp_sync_update"
+ if "multicast_intact" in config_data["traffic_eng"]:
+ command += " multicast_intact"
+ if "auto_route_exclude" in config_data["traffic_eng"]:
+ policy = config_data["traffic_eng"].get("autoroute_exclude")
+ command += " autoroute-exlude route-policy {0}".format(
+ policy.get("route_policy")
+ )
+ return command
+
+
+def _tmplt_ospf_authentication_md(config_data):
+ command = []
+ if "authentication" in config_data:
+ if config_data["authentication"].get("message_digest"):
+ command = "authentication message-digest"
+ md = config_data["authentication"].get("message_digest")
+ if md.get("keychain"):
+ command += " keychain " + md.get("keychain")
+ return command
+
+
+def _tmplt_ospf_authentication(config_data):
+ command = []
+ if "authentication" in config_data:
+ if config_data["authentication"].get("keychain"):
+ command = "authentication keychain " + config_data[
+ "authentication"
+ ].get("keychain")
+ elif config_data["authentication"].get("no_auth"):
+ command = "authentication null"
+ return command
+
+
+def _tmplt_ospf_adjacency_stagger(config_data):
+ if "adjacency_stagger" in config_data:
+ command = "adjacency stagger".format(**config_data)
+ if config_data["adjacency_stagger"].get(
+ "min_adjacency"
+ ) and config_data["adjacency_stagger"].get("min_adjacency"):
+ command += " {0} {1}".format(
+ config_data["adjacency_stagger"].get("min_adjacency"),
+ config_data["adjacency_stagger"].get("max_adjacency"),
+ )
+ elif config_data["adjacency_stagger"].get("disable"):
+ command += " disable"
+ return command
+
+
+def _tmplt_ospf_adjacency_distribute_bgp_state(config_data):
+ if "distribute_link_list" in config_data:
+ command = "distribute link-state"
+ if config_data["distribute_link_list"].get("instance_id"):
+ command += " instance-id {0}".format(
+ config_data["distribute_link_list"].get("instance_id")
+ )
+ elif config_data["distribute_link_list"].get("throttle"):
+ command += " throttle {0}".format(
+ config_data["distribute_link_list"].get("throttle")
+ )
+ return command
+ elif "distribute_bgp_ls" in config_data:
+ command = "distribute bgp-ls"
+ if config_data["distribute_bgp_ls"].get("instance_id"):
+ command += " instance-id {0}".format(
+ config_data["distribute_bgp_ls"].get("instance_id")
+ )
+ elif config_data["distribute_bgp_ls"].get("throttle"):
+ command += " throttle {0}".format(
+ config_data["distribute_bgp_ls"].get("throttle")
+ )
+ return command
+
+
+def _tmplt_ospf_capability_opaque(config_data):
+ if "capability" in config_data:
+ if "opaque" in config_data["capability"]:
+ command = "capability opaque"
+ opaque = config_data["capability"].get("opaque")
+ if "disable" in opaque:
+ command += "capability opaque disable"
+ return command
+
+
+def _tmplt_ospf_authentication_key(config_data):
+ if "authentication_key" in config_data:
+ command = "authentication-key".format(**config_data)
+ if config_data["authentication_key"].get("password"):
+ command += " {0}".format(
+ config_data["authentication_key"].get("password")
+ )
+ return command
+
+
+def _tmplt_ospf_area_authentication(config_data):
+ if "authentication" in config_data:
+ command = "area {area_id} authentication".format(**config_data)
+ if config_data["authentication"].get("keychain"):
+ command += " keychain " + config_data["authentication"].get(
+ "keychain"
+ )
+ elif config_data["authentication"].get("no_auth"):
+ command += " null"
+ return command
+
+
+def _tmplt_ospf_area_authentication_md(config_data):
+ if "authentication" in config_data:
+ command = "area {area_id} authentication".format(**config_data)
+ if "message_digest" in config_data["authentication"]:
+ command = "authentication message-digest"
+ md = config_data["authentication"].get("message_digest")
+ if md.get("keychain"):
+ command += " keychain " + md.get("keychain")
+ return command
+
+
+def _tmplt_ospf_area_authentication_key(config_data):
+ if "authentication_key" in config_data:
+ command = "area {area_id} authentication-key".format(**config_data)
+ if config_data["authentication_key"].get("password"):
+ command += " {0}".format(
+ config_data["authentication_key"].get("password")
+ )
+ return command
+
+
+def _tmplt_ospf_area_mpls_ldp(config_data):
+ commands = []
+ if "mpls" in config_data:
+ command = "area {area_id} mpls".format(**config_data)
+ if config_data["mpls"].get("ldp"):
+ ldp = config_data["mpls"].get("ldp")
+ if "auto_config" in ldp:
+ command += " auto-config"
+ commands.append(command)
+ if "sync" in ldp:
+ command += " sync"
+ commands.append(command)
+ if "sync_igp_shortcuts" in ldp:
+ command += " sync-igp-shortcuts"
+ commands.append(command)
+ return commands
+
+
+def _tmplt_ospf_area_bfd(config_data):
+ if "bfd" in config_data:
+ command = "area {area_id} bfd".format(**config_data)
+ if "minimum_interval" in config_data["bfd"]:
+ command += " minimum-interval {minimum_interval}".format(
+ **config_data["bfd"]
+ )
+
+ if "multiplier" in config_data["bfd"]:
+ command += " multiplier {multiplier}".format(**config_data["bfd"])
+
+ return command
+
+
+def _tmplt_ospf_area_bfd_fast_detect(config_data):
+ if "bfd" in config_data:
+ command = "area {area_id} bfd".format(**config_data)
+ if "fast_detect" in config_data["bfd"]:
+ fast_detect = config_data["bfd"].get("fast_detect")
+ command += " fast-detect"
+ if "strict_mode" in fast_detect:
+ command += " strict-mode"
+ return command
+
+
+def _tmplt_ospf_mpls_ldp(config_data):
+ commands = []
+ if "mpls" in config_data:
+ command = "mpls".format(**config_data)
+ if config_data["mpls"].get("ldp"):
+ ldp = config_data["mpls"].get("ldp")
+ if "auto_config" in ldp:
+ command += " auto-config"
+ commands.append(command)
+ if "sync" in ldp:
+ command += " sync"
+ commands.append(command)
+ if "sync_igp_shortcuts" in ldp:
+ command += " sync-igp-shortcuts"
+ commands.append(command)
+ return commands
+
+
+def _tmplt_ospf_area_nssa(config_data):
+ if "nssa" in config_data:
+ command = "area {area_id} nssa".format(**config_data)
+ if config_data["nssa"].get("no_redistribution"):
+ command += " no-redistribution"
+ if config_data["nssa"].get("no_summary"):
+ command += " no-summary"
+ return command
+
+
+def _tmplt_ospf_area_nssa_def_info_origin(config_data):
+ if "nssa" in config_data:
+ command = "area {area_id} nssa".format(**config_data)
+ if "default_information_originate" in config_data["nssa"]:
+ command += " default-information-originate"
+ def_info_origin = config_data["nssa"].get(
+ "default_information_originate"
+ )
+ if "metric" in def_info_origin:
+ command += " metric {metric}".format(
+ **config_data["nssa"]["default_information_originate"]
+ )
+ if "metric_type" in def_info_origin:
+ command += " metric-type {metric_type}".format(
+ **config_data["nssa"]["default_information_originate"]
+ )
+ return command
+
+
+def _tmplt_ospf_area_nssa_translate(config_data):
+ if "nssa" in config_data:
+ command = "area {area_id} nssa".format(**config_data)
+ if config_data["nssa"].get("translate"):
+ command += " translate"
+ translate = config_data["nssa"].get("translate")
+ if "type7" in translate:
+ command += " type7"
+ if translate["type7"].get("always"):
+ command += " always"
+ return command
+
+
+def _tmplt_ospf_area_vlink_authentication(config_data):
+ if "authentication" in config_data:
+ command = "area {area_id} virtual-link {id} authentication".format(
+ **config_data
+ )
+ if config_data["authentication"].get("keychain"):
+ command += " keychain " + config_data["authentication"].get(
+ "keychain"
+ )
+ elif config_data["authentication"].get("no_auth"):
+ command += " null"
+ return command
+
+
+def _tmplt_ospf_area_vlink_authentication_md(config_data):
+ if "authentication" in config_data:
+ command = "area {area_id} virtual-link {id} authentication".format(
+ **config_data
+ )
+ if config_data["authentication"].get("message_digest"):
+ command = "authentication message-digest"
+ md = config_data["authentication"].get("message_digest")
+ if md.get("keychain"):
+ command += " keychain " + md.get("keychain")
+ return command
+
+
+def _tmplt_ospf_area_vlink_authentication_key(config_data):
+ if "authentication_key" in config_data:
+ command = "area {area_id} virtual-link {id} authentication-key".format(
+ **config_data
+ )
+ if config_data["authentication_key"].get("password"):
+ command += " {0}".format(
+ config_data["authentication_key"].get("password")
+ )
+ return command
+
+
+def _tmplt_ospf_area_stub(config_data):
+ if "stub" in config_data:
+ command = "area {area_id} stub".format(**config_data)
+ if config_data["stub"].get("no_summary"):
+ command += " no-summary"
+ return command
+
+
+def _tmplt_ospf_area_ranges(config_data):
+ if "ranges" in config_data:
+ commands = []
+ for k, v in iteritems(config_data["ranges"]):
+ cmd = "area {area_id} range".format(**config_data)
+ temp_cmd = " {address}".format(**v)
+ if "advertise" in v:
+ temp_cmd += " advertise"
+ elif "not_advertise" in v:
+ temp_cmd += " not-advertise"
+ cmd += temp_cmd
+ commands.append(cmd)
+ return commands
+
+
+def _tmplt_prefix_suppression(config_data):
+ if "prefix_suppression" in config_data:
+ if "set" in config_data["prefix_suppression"]:
+ command = "prefix-suppression"
+ if "secondary_address" in config_data["prefix_suppression"]:
+ command = "prefix-suppression secondary-address"
+ return command
+
+
+def _tmplt_protocol_shutdown(config_data):
+ if "protocol_shutdown" in config_data:
+ if "set" in config_data["protocol_shutdown"]:
+ command = "protocol-shutdown"
+ if "host_mode" in config_data["protocol_shutdown"]:
+ command = "protocol-shutdown host-mode"
+ if "on_reload" in config_data["protocol_shutdown"]:
+ command = "protocol-shutdown on-reload"
+ return command
+
+
+def _tmplt_timers_lsa(config_data):
+ if "timers" in config_data:
+ command = "timers lsa"
+ if "group_pacing" in config_data["timers"]["lsa"]:
+ command += " group-pacing {group_pacing}".format(
+ **config_data["timers"]["lsa"]
+ )
+ if "min_arrival" in config_data["timers"]["lsa"]:
+ command += " min-arrival {min_arrival}".format(
+ **config_data["timers"]["lsa"]
+ )
+ if "refresh" in config_data["timers"]["lsa"]:
+ command += " refresh {refresh}".format(
+ **config_data["timers"]["lsa"]
+ )
+ return command
+
+
+def _tmplt_timers_graceful_shutdown(config_data):
+ if "timers" in config_data:
+ command = "timers graceful-shutdown"
+ if "initial_delay" in config_data["timers"]["graceful-shutdown"]:
+ command += " initial delay {initial_delay}".format(
+ **config_data["timers"]["graceful-shutdown"]
+ )
+ if "retain_routes" in config_data["timers"]["graceful-shutdown"]:
+ command += " retain routes {retain_routes}".format(
+ **config_data["timers"]["graceful-shutdown"]
+ )
+ return command
+
+
+class Ospfv2Template(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(Ospfv2Template, self).__init__(lines=lines, tmplt=self)
+
+ # fmt: off
+ PARSERS = [
+ {
+ "name": "pid",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "router ospf {{ process_id }}",
+ "result": {
+ "processes": {"{{ pid }}": {"process_id": "{{ pid }}"}}
+ },
+ "shared": True,
+ },
+ {
+ "name": "cost",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \scost(?P<cost>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "cost {{ cost }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "cost": "{{ cost|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "default_metric",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sdefault-metric(?P<default_metric>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "default-metric {{ default_metric }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "default_metric": "{{ default_metric|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "packet_size",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \spacket-size(?P<packet_size>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "packet-size {{ packet_size }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "packet_size": "{{ packet_size|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "dead_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sdead-interval(?P<dead_interval>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "dead-interval {{ dead_interval }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "dead_interval": "{{ dead_interval|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "hello_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \shello-interval(?P<hello_interval>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "hello-interval {{ hello_interval }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "hello_interval": "{{ hello_interval|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "priority",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \spriority(?P<priority>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "priority {{ priority }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "priority": "{{ priority|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "weight",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sweight(?P<weight>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "weight {{ weight }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "weight": "{{ weight|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "retransmit_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sretransmit-interval(?P<retransmit_interval>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "retransmit-interval {{ retransmit_interval }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "retransmit_interval": "{{ retransmit_interval|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "transmit_delay",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \stransmit-delay(?P<transmit_delay>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "transmit-delay {{ transmit_delay }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "transmit_delay": "{{ transmit_delay|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "passive",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \spassive\s(?P<passive>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "passive {{ passive }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "passive": "{{ passive }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "process.database_filter",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sdatabase-filter
+ \sall
+ \sout\s(?P<database_filter>\s\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "process.database_filter",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "database_filter": "{{ database_filter }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "demand_circuit",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sdemand-circuit\s(?P<demand_circuit>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "demand-circuit {{ demand_circuit }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "demand_circuit": "{{ demand_circuit }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "external_out",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sexternal-out\s(?P<external_out>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "external-out {{ external_out }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "external_out": "{{ external_out }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "router_id",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \srouter-id\s(?P<router_id>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "router-id {{ router_id }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "router_id": "{{ router_id }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "summary_in",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \ssummary-in\s(?P<summary_in>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "summary-in {{ summary_in }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "summary_in": "{{ summary_in }}",
+ }
+ }
+ },
+ },
+
+ {
+ "name": "mtu_ignore",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \smtu-ignore\s(?P<mtu_ignore>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "mtu-ignore {{ mtu_ignore }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "mtu_ignore": "{{ mtu_ignore }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "flood_reduction",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sflood-reduction\s(?P<flood_reduction>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "flood-reduction {{ flood_reduction }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "flood_reduction": "{{ flood_reduction }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "loopback_stub_network",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sloopback(?P<loopback>)
+ \sstub-network\s(?P<stub_network>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "loopback stub-network {{ stub_network }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "loopback_stub_network": "{{ loopback_stub_network }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "address_family_unicast",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \saddress-family(?P<address_family>)
+ \sipv4(?P<ipv4>)
+ \sunicast(?P<unicast>)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "address_family_unicast",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "address_family_unicast": "{{ True if unicast is defined }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "default_weight",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sapply-weight(?P<apply_weight>)
+ \sdefault-weight(?P<default_weight>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "apply-weight default-weight {{ default_weight }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "apply_weight": {
+ "default_weight": "{{ default_weight|int }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "bandwidth",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sapply-weight(?P<apply_weight>)
+ \sbandwidth(?P<bandwidth>\s\d+)?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "apply-weight bandwidth {{ bandwidth }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "apply_weight": {
+ "bandwidth": "{{ bandwidth|int }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "adjacency_stagger",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sadjacency(?P<adjacency>)
+ \sstagger(?P<stagger>)
+ (\s(?P<min_adjacency>\d+))?
+ (\s(?P<max_adjacency>\d+))?
+ (\sdisable(?P<disable>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_adjacency_stagger,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "adjacency_stagger": {
+ "min_adjacency": "{{ min_adjacency|int }}",
+ "max_adjacency": "{{ max_adjacency }}",
+ "disable": "{{ True if disable is defined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "authentication",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sauthentication(?P<auth>)
+ (\skeychain\s(?P<keychain>\S+)*)?
+ (\snull(?P<no_auth>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_authentication,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "authentication": {
+ "no_auth": "{{ True if no_auth is defined }}",
+ "keychain": "{{ keychain }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "authentication.message_digest",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sauthentication(?P<auth>)
+ \smessage-digest(?P<md>)
+ \skeychain\s(?P<md_key>\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_authentication_md,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "authentication": {
+ "message_digest": {
+ "keychain": "{{ md_key }}",
+ "set": "{{ True if md is defined and md_key is undefined }}",
+ }
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "default_information_originate",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sdefault-information(?P<default_information>)
+ (\soriginate(?P<originate>))?
+ (\salways(?P<always>))?
+ (\smetric\s(?P<metric>\d+))?
+ (\smetric-type\s(?P<metric_type>\d+))?
+ (\sroute_policy\s(?P<route_policy>)\S+)?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_default_information,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "default_information_originate": {
+ "always": "{{ True if always is defined }}",
+ "metric": "{{ metric|int }}",
+ "metric_type": "{{ metric_type|int }}",
+ "route_policy": "{{ route_policy }}",
+ "set": "{{ True if default_information is defined and always is undefined and metric "
+ "is undefined and metric_type is undefined and route_policy is undefined }}"
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "auto_cost",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sauto-cost(?P<auto_cost>)
+ (\sreference-bandwidth\s(?P<reference_bandwidth>\d+))?
+ (\sdisable(?P<disable>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_auto_cost,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "auto_cost": {
+ "disable": "{{ True if disable is defined }}",
+ "reference_bandwidth": "{{ reference_bandwidth|int }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "bfd",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sbfd(?P<bfd>)
+ (\sminimum-interval\s(?P<minimum_interval>\d+))?
+ (\smultiplier\s(?P<multiplier>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_bfd,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "bfd": {
+ "minimum_interval": "{{ minimum_interval|int }}",
+ "multiplier": "{{ multiplier|int }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "bfd.fast_detect",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sbfd(?P<bfd>)
+ \sfast-detect(?P<fast_detect>)
+ (\s(?P<disable>disable))?
+ (\s(?P<strict_mode>strict-mode))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_bfd_fast_detect,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "bfd": {
+ "fast_detect": {
+ "set": "{{ True if disable is undefined and strict_mode is undefined }}",
+ "strict_mode": "{{ True if strict_mode is defined }}",
+ },
+ },
+ }
+ },
+ },
+ },
+ {
+ "name": "security",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \ssecurity(?P<security>)
+ \sttl(?P<ttl>)?
+ (\shops\s(?P<hops>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_security,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "security_ttl": {
+ "set": "{{ True if ttl is defined and hops is undefined }}",
+ "hops": "{{ hops }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "nsr",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \snsr(?P<nsr>)
+ \sdisable(?P<disable>)?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_nsr,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "nsr": {
+ "set": "{{ True if nsr is defined and disable is undefined }}",
+ "disable": "{{ True if disable is defined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "protocol",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sprotocol(?P<protocol>)
+ \s(shutdown(?P<shutdown>))
+ (\shost-mode(?P<host_mode>))?
+ (\son-reload\s(?P<on_reload>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_protocol,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "protocol_shutdown": {
+ "set": "{{ True if shutdown is defined and host-mode is undefined and on_reload is undefined }}",
+ "host_mode": "{{ True if host_mode is defined }}",
+ "on_reload": "{{ True if on_reload is defined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "capability",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \scapability(?P<capability>)
+ (\stype7\s(?P<type7>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "capability type7 {{ type7 }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "capability": {
+ "type7": "{{ type7 }}"
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "capability.opaque",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \scapability(?P<capability>)?
+ \sopaque(?P<opaque>)
+ (\sdisable(?P<disable>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_capability_opaque,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "capability": {
+ "opaque": {
+ "disable": "{{ True if disable is defined }}",
+ "set": "{{ True if opaque is defined and disable is undefined }}",
+ },
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "admin_distance",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sdistance\s(?P<value>d+)
+ \s(?P<source>\S+)
+ \s(?P<wildcard>\S+)
+ (\s(?P<access_list>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distance_admin,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distance": {
+ "admin_distance": {
+ "value": "{{ value|int }}",
+ "source": "{{ source }}",
+ "wildcard": "{{ wildcard }}",
+ "access_list": "{{ access_list }}",
+ }
+ },
+ }
+ }
+ },
+ },
+
+ {
+ "name": "ospf_distance",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sdistance(?P<value>)
+ \sospf(?P<ospf>)
+ (\sexternal\s(?P<external>\d+))?
+ (\sinter-area\s(?P<inter_area>\d+))?
+ (\sintra-area\s(?P<intra_area>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distance_ospf,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distance": {
+ "ospf_distance": {
+ "external": "{{ external|int }}",
+ "inter_area": "{{ inter_area|int }}",
+ "intra_area": "{{ intra_area|int }}",
+ }
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "authentication_key",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sauthentication-key(?P<auth_key>)
+ (\s(?P<password>\S+))?
+ (\sclear\s(?P<clear>)\S+)?
+ (\sencrypted(?P<encrypted>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_authentication_key,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "authentication_key": {
+ "clear": "{{ clear }}",
+ "encrypted": "{{ encrypted}}",
+ "password": "{{ password if clear is undefined and encrypted is undefined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "area.default_cost",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sdefault-cost\s(?P<default_cost>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} default-cost {{ default_cost }}",
+ "compval": "default_cost",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "default_cost": "{{ default_cost|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.dead_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sdead-interval\s(?P<dead_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} dead-interval {{ dead_interval }}",
+ "compval": "dead_interval",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "dead_interval": "{{ dead_interval|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.hello_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \shello-interval\s(?P<hello_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} hello-interval {{ hello_interval }}",
+ "compval": "hello_interval",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "hello_interval": "{{ hello_interval|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.transmit_delay",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \stransmit-delay\s(?P<transmit_delay>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} transmit-delay {{ transmit_delay }}",
+ "compval": "transmit_delay",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "transmit_delay": "{{ transmit_delay|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.cost",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \scost\s(?P<cost>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} cost {{ cost }}",
+ "compval": "cost",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "cost": "{{ cost|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.priority",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \spriority\s(?P<priority>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} priority {{ priority }}",
+ "compval": "priority",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "priority": "{{ priority|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.weight",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sweight\s(?P<weight>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} weight {{ weight }}",
+ "compval": "weight",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "weight": "{{ weight|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.packet_size",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \spacket-size\s(?P<packet_size>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} packet-size {{ packet_size }}",
+ "compval": "packet_size",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "packet_size": "{{ packet_size|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.summary_in",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \ssummary-in\s(?P<summary_in>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} summary-in {{ summary_in }}",
+ "compval": "summary_in",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "summary_in": "{{ summary_in }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.demand_circuit",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sdemand-circuit\s(?P<demand_circuit>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} demand-circuit {{ demand_circuit }}",
+ "compval": "demand_circuit",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "demand_circuit": "{{ demand_circuit }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.passive",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \spassive\s(?P<passive>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} passive {{ passive }}",
+ "compval": "passive",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "passive": "{{ passive }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.external_out",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sexternal-out\s(?P<external_out>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} external-out {{ external_out }}",
+ "compval": "passive",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "external_out": "{{ external_out }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.mtu_ignore",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \smtu-ignore\s(?P<mtu_ignore>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} mtu-ignore {{ mtu_ignore }}",
+ "compval": "mtu_ignore",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "mtu_ignore": "{{ mtu_ignore }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.authentication",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sauthentication(?P<auth>)
+ (\skeychain\s(?P<keychain>\S+))?
+ (\snull(?P<no_auth>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_authentication,
+ "compval": "authentication",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "authentication": {
+ "no_auth": "{{ True if no_auth is defined }}",
+ "keychain": "{{ keychain }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.authentication_key",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sauthentication-key(?P<auth_key>)
+ (\s(?P<password>\S+))?
+ (\sclear\s(?P<clear>)\S+)?
+ (\sencrypted(?P<encrypted>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_authentication_key,
+ "compval": "authentication_key",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "authentication_key": {
+ "clear": "{{ clear }}",
+ "encrypted": "{{ encrypted}}",
+ "password": "{{ password if clear is undefined and encrypted is undefined }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.authentication.message_digest",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sauthentication(?P<auth>)
+ \smessage-digest(?P<md>)
+ \skeychain(?P<md_key>\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_authentication_md,
+ "compval": "authentication.message_digest",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "authentication": {
+ "message_digest": {
+ "keychain": "{{ md_key }}",
+ }
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.mpls_traffic_eng",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \smpls(?P<mpls>)
+ \straffic-end(?P<traffic_eng>)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} mpls traffic-eng",
+ "compval": "mpls_traffic_eng",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "mpls": {
+ "traffic_eng": "{{ True if traffic_eng is defined }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.mpls_ldp",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \smpls(?P<mpls>)
+ (\sauto-config(?P<auto_config>))?
+ (\ssync(?P<sync>))?
+ (\ssync-igp-shortcuts(?P<syn_igp_shortcuts>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_mpls_ldp,
+ "compval": "mpls_ldp",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "mpls": {
+ "ldp": {
+ "auto_config": "{{ True if auto_config is defined }}",
+ "sync": "{{ True if sync is defined }}",
+ "sync_igp_shortcuts": "{{ True if sync_igp_shortcuts is defined }}",
+
+ }
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.bfd",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sbfd(?P<bfd>)
+ (\sminimum-interval\s(?P<minimum_interval>\d+))?
+ (\smultiplier\s(?P<multiplier>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_bfd,
+ "compval": "bfd",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "bfd": {
+ "minimum_interval": "{{ minimum_interval|int }}",
+ "multiplier": "{{ multiplier|int }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.bfd.fast_detect",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sbfd(?P<bfd>)
+ \sarea(?P<area_id>)
+ \sfast-detect(?P<fast_detect>)
+ (\s(?P<disable>disable))?
+ (\s(?P<strict_mode>strict-mode))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_bfd_fast_detect,
+ "compval": "bfd.fast_detect",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "bfd": {
+ "fast_detect": {
+ "set": "{{ True if disable is undefined and strict_mode is undefined }}",
+ "strict_mode": "{{ True if strict_mode is defined }}",
+ },
+ },
+ }
+ }
+ }
+ },
+ },
+ },
+ {
+ "name": "area.stub",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sstub(?P<nssa>)
+ (\sno-summary(?P<no_sum>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_stub,
+ "compval": "stub",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "area_id": "{{ area_id }}",
+ "stub": {
+ "set": "{{ True if stub is defined and no_summary is undefined }}",
+ "no_summary": "{{ True if no_summary is defined }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \snssa(?P<nssa>)
+ (\sno-redistribution(?P<no_redis>))?
+ (\sno-summary(?P<no_sum>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_nssa,
+ "compval": "nssa",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "set": "{{ True if nssa is defined and no_summary is undefined and no_redis is undefined }}",
+ "no_summary": "{{ True if no_summary is defined }}",
+ "no_redistribution": "{{ True if no_redis is defined }}"
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa.default_information_originate",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \snssa(?P<nssa>)
+ (\sno-redistribution(?P<no_redis>))?
+ (\sdefault-information-originate(?P<def_info_origin>))?
+ (\smetric\s(?P<metric>\d+))?
+ (\smetric-type\s(?P<metric_type>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_nssa_def_info_origin,
+ "compval": "nssa.default_information_originate",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "default_information_originate": {
+ "metric": "{{ metric|int }}",
+ "metric_type": "{{ metric_type|int }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ },
+ {
+ "name": "area.ranges",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \srange(?P<range>)
+ \s(?P<address>\S+)
+ (\sadvertise(?P<advertise>))
+ (\snot-advertise(?P<not_advertise>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_ranges,
+ "compval": "ranges",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "ranges": [
+ {
+ "address": "{{ address }}",
+ "advertise": "{{ True if advertise is defined }}",
+ "not_advertise": "{{ True if not_advertise is defined }}",
+ }
+ ],
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa.translate",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \snssa(?P<nssa>)
+ \stranslate(?P<translate>)
+ \stype7(?P<type7>)
+ \salways\s(?P<always>)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_nssa_translate,
+ "compval": "nssa.translate",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "translate": {
+ "type7": {
+ "always": "{{ True if always is defined }}"
+ }
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "virtual_link.hello_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \svirtual-link\s(?P<id>\S+)
+ \shello-interval\s(?P<hello_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} virtual-link {{ id }} hello-interval {{ hello_interval }}",
+ "compval": "hello_interval",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "virtual_link": {
+ "{{ id }}":
+ {
+ "id": "{{ id }}",
+ "hello_interval": "{{ hello_interval|int }}"
+ }
+
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "virtual_link.dead_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \svirtual-link\s(?P<id>\S+)
+ \sdead-interval\s(?P<dead_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} virtual-link {{ id }} dead-interval {{ dead_interval }}",
+ "compval": "dead_interval",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "virtual_link": {
+ "{{ id }}": {
+ "id": "{{ id }}",
+ "dead_interval": "{{ dead_interval|int }}"
+ }
+
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "virtual_link.retransmit_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \svirtual-link\s(?P<id>\S+)
+ \sretransmit-interval\s(?P<retransmit_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} virtual-link {{ id }} retransmit-interval {{ retransmit_interval }}",
+ "compval": "retransmit_interval",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "virtual_link": {
+ "{{ id }}": {
+ "id": "{{ id }}",
+ "retransmit_interval": "{{ retransmit_interval|int }}"
+ }
+ }
+
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "virtual_link.authentication",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \savirtual-link\s(?P<id>\S+)
+ \sauthentication(?P<auth>)
+ (\skeychain\s(?P<keychain>\S+))?
+ (\snull(?P<no_auth>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_vlink_authentication,
+ "compval": "authentication",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "authentication": {
+ "no_auth": "{{ True if no_auth is defined }}",
+ "keychain": "{{ keychain }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "virtual_link.authentication_key",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \svirtual-link\s(?P<id>\S+)
+ \sauthentication-key(?P<auth_key>)
+ (\s(?P<password>\S+))?
+ (\sclear\s(?P<clear>)\S+)?
+ (\sencrypted(?P<encrypted>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_vlink_authentication_key,
+ "compval": "authentication_key",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "virtual_link": {
+ "{{ id }}": {
+ "authentication_key": {
+ "clear": "{{ clear }}",
+ "encrypted": "{{ encrypted}}",
+ "password": "{{ password if clear is undefined and encrypted is undefined }}",
+ },
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "virtual_link.authentication.message_digest",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \svirtual-link\s(?P<id>\S+)
+ \sauthentication(?P<auth>)
+ \smessage-digest(?P<md>)
+ \skeychain(?P<md_key>\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_vlink_authentication_md,
+ "compval": "authentication.message_digest",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "virtual_link": {
+ "{{ id }}": {
+ "authentication": {
+ "message_digest": {
+ "keychain": "{{ md_key }}",
+ }
+ },
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "link_down_fast_detect",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \slink-down
+ \sfast-detect(?P<fast_detect>)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "link-down fast-detect",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "link_down_fast_detect": "{{ True if fast_detect is defined }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "nsr",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \snsr
+ \sdisable(?P<disable>)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "nsr disable",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "disable": "{{ True if disable is defined }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "database_filter",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sdatabase-filter
+ \sall
+ \sout\s(?P<outing>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "database-filter all out {{ outing }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "outing": "{{ outing }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "distribute_link_state",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sdistribute(?P<distribute>)
+ \slink-state(?P<link_state>)
+ (\sinstance-id(?P<inst_id>\d+))?
+ (\sthrottle(?P<throttle>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_adjacency_distribute_bgp_state,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distribute_link_list": {
+ "instance_id": "{{ inst_id|int }}",
+ "throttle": "{{ throttle }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "distribute_bgp_ls",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sdistribute(?P<distribute>)
+ \sbgp-ls(?P<bgp_ls>)
+ (\sinstance-id(?P<inst_id>\d+))?
+ (\sthrottle(?P<throttle>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_adjacency_distribute_bgp_state,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distribute_bgp_ls": {
+ "instance_id": "{{ inst_id|int }}",
+ "throttle": "{{ throttle }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "log_adjacency",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \slog(?P<security>)
+ \sadjacency(?P<adjacency>)?
+ (\schanges(?P<changes>))?
+ (\sdisable(?P<disable>))?
+ (\sdetails(?P<details>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_log_adjacency,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "log_adjacency_changes": {
+ "set": "{{ True changes id defined and disable is undefined and detail is undefined }}",
+ "disable": "{{ True if disable is defined }}",
+ "details": "{{ True if details is defined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "max_lsa",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ (\smax-lsa\s(?P<threshold>\d+))?
+ (\swarning-only\s(?P<warning_only>\d+)?
+ (\signore-time\s(?P<ignore_time>\d+))?
+ (\signore-count\s(?P<ignore_count>\d+))?
+ (\sreset-time\s(?P<reset_time>)\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_log_max_lsa,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "max_lsa": {
+ "threshold": "{{ threshold|int }}",
+ "warning_only": "{{ warning_only|int }}",
+ "ignore_time": "{{ ignore_time|int }}",
+ "ignore_count": "{{ ignore_count|int }}",
+ "reset_time": "{{ reset_time|int }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "max_metric",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \smax-metric
+ \s*(?P<router_lsa>)
+ (\s*external-lsa(?P<external_lsa>))?
+ (\s(?P<max_metric_value>\d+))?
+ \s*(?P<include_stub>include-stub)*
+ \s*(?P<on_startup>on-startup)*
+ \s*(?P<wait_period>\d+)*
+ \s*(wait-for\sbgp)*
+ \s*(?P<bgp_asn>\d+)*
+ \s*(?P<summary_lsa>summary-lsa)*
+ \s*(?P<sum_lsa_max_metric_value>\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_max_metric,
+ "remval": "max-metric router-lsa",
+ "result": {
+ "processes": {
+ '{{ "pid" }}': {
+ "max_metric": {
+ "router_lsa": {
+ "set": "{{ True if router_lsa is defined and external_lsa is undefined else None }}",
+ "external_lsa": {
+ "set": "{{ True if external_lsa is defined and max_metric_value is undefined else None }}",
+ "max_metric_value": "{{ max_metric_value }}",
+ },
+ "include_stub": "{{ not not include_stub }}",
+ "on_startup": {
+ "set": "{{ True if on_startup is defined and (wait_period and bgp_asn) is undefined else None }}",
+ "wait_period": "{{ wait_period }}",
+ "wait_for_bgp_asn": "{{ bgp_asn }}",
+ },
+ "summary_lsa": {
+ "set": "{{ True if summary_lsa is defined and sum_lsa_max_metric_value is undefined else None }}",
+ "max_metric_value": "{{ sum_lsa_max_metric_value }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "mpls_ldp",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \smpls(?P<mpls>)
+ (\sauto-config(?P<auto_config>))?
+ (\ssync(?P<sync>))?
+ (\ssync-igp-shortcuts(?P<syn_igp_shortcuts>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_mpls_ldp,
+ "compval": "mpls_ldp",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "mpls": {
+ "ldp": {
+ "auto_config": "{{ True if auto_config is defined }}",
+ "sync": "{{ True if sync is defined }}",
+ "sync_igp_shortcuts": "{{ True if sync_igp_shortcuts is defined }}",
+ }
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "microloop_avoidance",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \smicroloop(?P<microloop>)
+ \savoidance(?P<avoidance>)
+ (\s(?P<protected>protected))?
+ (\s(?P<segment_routing>segment-routing))?
+ (\srib-update-delay\s(?P<rib_update_delay>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_microloop_avoidance,
+ "compval": "microloop_avoidance",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "microloop_avoidance": {
+ "protected": "{{ True if protected is defined }}",
+ "segment_routing": "{{ True if segment_routing is defined }}",
+ "rib_update_delay": "{{ rib_update_delay }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "mpls_traffic_eng",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \smpls(?P<mpls>)
+ \straffic-end(?P<traffic_eng>)
+ (\sautoroute-exclude(?P<autoroute>))?
+ (\sroute-policy(?P<route_policy>\S+))?
+ (\s(?P<igp_intact>igp_intact))?
+ (\s(?P<ldp_sync_update>ldp-sync-update))?
+ (\s(?P<multicast_intact>multicast-intact))?
+ (\srouter-id\s(?P<router_id>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_mpls_traffic_eng,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "mpls": {
+ "autoroute_exclude": {
+ "route_policy": "{{ route_policy }}"
+ },
+ "igp_intact": "{{ True if igp_intact is defined }}",
+ "ldp_sync_update": "{{ True if ldp_sync_update is defined }}",
+ "multicast_intact": "{{ True if multicast_intact is defined }}",
+ "router_id": "{{ router_id }}"
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "prefix_suppression",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sprefix-suppression(?P<prefix_suppression>)
+ (\s(?P<secondary_address>secondary-address))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_prefix_suppression,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "prefix_suppression": {
+ "set": "{{ True if prefix_suppression is defined and secondary_address is undefined }}",
+ "secondary_address": "{{ True if secondary_address is defined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "protocol_shutdown",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \sprotocol-shutdown(?P<protocol_shutdown>)
+ (\s(?P<host_mode>host-mode))?
+ (\s(?P<on_reload>on-reload))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_protocol_shutdown,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "protocol_shutdown": {
+ "set": "{{ True if protocol_shutdown is defined and host_mode is undefined and on_reload is undefined }}",
+ "host_mode": "{{ True if host_mode is defined }}",
+ "on_reload": "{{ True if on_reload is defined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.lsa",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \stimers
+ \slsa
+ (\sgroup-pacing\s(?P<group_pacing>\d+))?
+ (\smin-arrival\s(?P<min_arrival>\d+))?
+ (\srefresh\s(?P<refresh>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_timers_lsa,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "lsa": {
+ "group_pacing": "{{ group_pacing|int }}",
+ "min_arrival": "{{ min_arrival|int }}",
+ "refresh": "{{ refresh|int }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.graceful_shutdown",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \stimers
+ \sgraceful_shutdown
+ (\sinitial delay\s(?P<initial_delay>\d+))?
+ (\sretain routes\s(?P<retain_routes>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_timers_graceful_shutdown,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "graceful_shutdown": {
+ "initial_delay": "{{ initial_delay|int }}",
+ "retain_routes": "{{ retain_routes|int }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "throttle.spf",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \stimers
+ \sthrottle
+ \sspf
+ (\s(?P<change_delay>\d+))
+ (\s(?P<second_delay>\d+))
+ (\s(?P<max_wait>\d+))
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle spf {{ throttle.spf.change_delay }} {{ throttle.spf.second_delay }} {{ throttle.spf.max_wait }}",
+ "compval": "throttle.lsa_all",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "throttle": {
+ "lsa_all": {
+ "initial_delay": "{{ initial_delay }}",
+ "min_delay": "{{ min_delay }}",
+ "max_delay": "{{ max_delay }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "throttle.lsa_all",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \stimers
+ \sthrottle
+ \slsa
+ \sall
+ (\s(?P<initial_delay>\d+))
+ (\s(?P<min_delay>\d+))
+ (\s(?P<max_delay>\d+))
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle lsa all {{ throttle.lsa_all.initial_delay }} {{ throttle.lsa_all.min_delay }} {{ throttle.lsa_all.max_delay }}",
+ "compval": "throttle.lsa_all",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "throttle": {
+ "lsa_all": {
+ "initial_delay": "{{ initial_delay }}",
+ "min_delay": "{{ min_delay }}",
+ "max_delay": "{{ max_delay }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "throttle.fast_reroute",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \stimers
+ \sthrottle
+ \sfast-reroute\s(?P<fast_reroute>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle fast-reroute {{ fast_reroute }}",
+ "compval": "throttle.fast_reroute",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "throttle": {
+ "fast_reroute": "{{ fast_reroute }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.pacing_flood",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospf\s(?P<pid>\S+)
+ \stimers
+ \spacing
+ \sflood\s(?P<pacing_flood>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers pacing flood {{ pacing_flood }}",
+ "compval": "timers.pacing_flood",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "pacing_flood": "{{ pacing_flood }}",
+
+ }
+ }
+ }
+ },
+ },
+ ]
+ # fmt: on
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospfv3.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospfv3.py
new file mode 100644
index 00000000..d458615e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/rm_templates/ospfv3.py
@@ -0,0 +1,2801 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+from ansible.module_utils.six import iteritems
+
+
+def _tmplt_ospf_default_information(config_data):
+ if "default_information_originate" in config_data:
+ command = "default-information originate"
+ if "always" in config_data["default_information_originate"]:
+ command += " always"
+ if "metric" in config_data["default_information_originate"]:
+ command += " metric {metric}".format(
+ **config_data["default_information_originate"]
+ )
+ if "metric_type" in config_data["default_information_originate"]:
+ command += " metric-type {metric_type}".format(
+ **config_data["default_information_originate"]
+ )
+ if "route_policy" in config_data["default_information_originate"]:
+ command += " route-policy {route_policy}".format(
+ **config_data["default_information_originate"]
+ )
+ return command
+
+
+def _tmplt_ospf_auto_cost(config_data):
+ if "auto_cost" in config_data:
+ command = "auto-cost"
+ if "disable" in config_data["auto_cost"]:
+ command += " disable"
+ if "reference_bandwidth" in config_data["auto_cost"]:
+ command += " reference-bandwidth {reference_bandwidth}".format(
+ **config_data["auto_cost"]
+ )
+ return command
+
+
+def _tmplt_ospfv3_bfd_minimum_interval(config_data):
+ if "bfd" in config_data:
+ if "minimum_interval" in config_data["bfd"]:
+ command = "bfd minimum-interval {minimum_interval}".format(
+ **config_data["bfd"]
+ )
+ return command
+
+
+def _tmplt_ospfv3_bfd_multiplier(config_data):
+ if "bfd" in config_data:
+ if "multiplier" in config_data["bfd"]:
+ command = "bfd multiplier {multiplier}".format(
+ **config_data["bfd"]
+ )
+ return command
+
+
+def _tmplt_ospf_security(config_data):
+ if "security_ttl" in config_data:
+ command = "security_ttl"
+ if "set" in config_data["security_ttl"]:
+ command += " ttl"
+ elif config_data["security_ttl"].get("hops"):
+ command += " ttl hops {0}".format(
+ config_data["security_ttl"].get("hops")
+ )
+ return command
+
+
+def _tmplt_ospf_log_adjacency(config_data):
+ if "log_adjacency_changes" in config_data:
+ command = "log adjacency"
+ if "set" in config_data["log_adjacency_changes"]:
+ command += " changes"
+ elif config_data["log_adjacency_changes"].get("disable"):
+ command += " disable"
+ elif config_data["log_adjacency_changes"].get("details"):
+ command += " details"
+ return command
+
+
+def _tmplt_ospf_log_max_lsa(config_data):
+ if "max_lsa" in config_data:
+ command = "max-lsa"
+ if "threshold" in config_data["max_lsa"]:
+ command += " {0}".format(config_data["max_lsa"].get("threshold"))
+ if "warning_only" in config_data["max_lsa"]:
+ command += " warning-only {0}".format(
+ config_data["max_lsa"].get("warning_only")
+ )
+ if "ignore_time" in config_data["max_lsa"]:
+ command += " ignore-time {0}".format(
+ config_data["max_lsa"].get("ignore_time")
+ )
+ if "ignore_count" in config_data["max_lsa"]:
+ command += " ignore-count {0}".format(
+ config_data["max_lsa"].get("ignore_count")
+ )
+ if "reset_time" in config_data["max_lsa"]:
+ command += " reset-time {0}".format(
+ config_data["max_lsa"].get("reset_time")
+ )
+ return command
+
+
+def _tmplt_ospf_max_metric(config_data):
+ if "max_metric" in config_data:
+ command = "max-metric"
+ if "router_lsa" in config_data["max_metric"]:
+ command += " router-lsa"
+ if "external_lsa" in config_data["max_metric"]:
+ command += " external-lsa {external_lsa}".format(
+ **config_data["max_metric"]
+ )
+ if "include_stub" in config_data["max_metric"]:
+ command += " include-stub"
+ if "on_startup" in config_data["max_metric"]:
+ if "time" in config_data["max_metric"]["on_startup"]:
+ command += " on-startup {time}".format(
+ **config_data["max_metric"]["on_startup"]
+ )
+ elif "wait_for_bgp" in config_data["max_metric"]["on_startup"]:
+ command += " on-startup wait-for-bgp"
+ if "summary_lsa" in config_data["max_metric"]:
+ command += " summary-lsa {summary_lsa}".format(
+ **config_data["max_metric"]
+ )
+ return command
+
+
+def _tmplt_ospf_distance_admin(config_data):
+ if "admin_distance" in config_data:
+ command = "distance"
+ if config_data["admin_distance"].get("value"):
+ command += " {0}".format(
+ config_data["admin_distance"].get("value")
+ )
+ if config_data["admin_distance"].get("source"):
+ command += " {0}".format(
+ config_data["admin_distance"].get("source")
+ )
+ if config_data["admin_distance"].get("wildcard"):
+ command += " {0}".format(
+ config_data["admin_distance"].get("wildcard")
+ )
+ if config_data["admin_distance"].get("access_list"):
+ command += " {0}".format(
+ config_data["admin_distance"].get("access_list")
+ )
+ return command
+
+
+def _tmplt_ospf_distance_ospf(config_data):
+ if "ospf_distance" in config_data:
+ command = "distance ospf"
+ if config_data["ospf_distance"].get("external"):
+ command += " external {0}".format(
+ config_data["ospf_distance"].get("external")
+ )
+ if config_data["ospf_distance"].get("inter_area"):
+ command += " inter-area {0}".format(
+ config_data["ospf_distance"].get("inter_area")
+ )
+ if config_data["ospf_distance"].get("intra_area"):
+ command += " intra-area {0}".format(
+ config_data["ospf_distance"].get("intra_area")
+ )
+ return command
+
+
+def _tmplt_ospf_nsr(config_data):
+ if "nsr" in config_data:
+ command = "nsr"
+ if "set" in config_data["nsr"]:
+ command += " nsr"
+ elif config_data["nsr"].get("disable"):
+ command += " nsr {0}".format("disable")
+ return command
+
+
+def _tmplt_ospf_protocol(config_data):
+ if "protocol_shutdown" in config_data:
+ command = "protocol"
+ if "set" in config_data["protocol_shutdown"]:
+ command += " shutdown"
+ elif config_data["shutdown"].get("host_mode"):
+ command += " shutdown host-mode"
+ elif config_data["shutdown"].get("on_reload"):
+ command += " shutdown on-reload"
+ return command
+
+
+def _tmplt_microloop_avoidance(config_data):
+ if "microloop_avoidance" in config_data:
+ command = "microloop avoidance"
+ if "protected" in config_data["microloop_avoidance"]:
+ command += " protected"
+ if "segment_routing" in config_data["microloop_avoidance"]:
+ command += " segment_routing"
+ if "rib_update_delay" in config_data["microloop_avoidance"]:
+ command += " rin-update-delay {0}".config_data[
+ "microloop_avoidance"
+ ].get("rib_update_delay")
+ return command
+
+
+def _tmplt_ospf_bfd_fast_detect(config_data):
+ if "bfd" in config_data:
+ if "fast_detect" in config_data["bfd"]:
+ command = "bfd"
+ fast_detect = config_data["bfd"].get("fast_detect")
+ command += " fast-detect"
+ if "strict_mode" in fast_detect:
+ command += " strict-mode"
+ return command
+
+
+def _tmplt_ospf_mpls_traffic_eng(config_data):
+ if "traffic_eng" in config_data:
+ command = "mpls traffic-eng"
+ if "igp_intact" in config_data["traffic_eng"]:
+ command += " igp-intact"
+ if "ldp_sync_update" in config_data["traffic_eng"]:
+ command += " ldp_sync_update"
+ if "multicast_intact" in config_data["traffic_eng"]:
+ command += " multicast_intact"
+ if "auto_route_exclude" in config_data["traffic_eng"]:
+ policy = config_data["traffic_eng"].get("autoroute_exclude")
+ command += " autoroute-exlude route-policy {0}".format(
+ policy.get("route_policy")
+ )
+ return command
+
+
+def _tmplt_ospf_authentication_ipsec(config_data):
+ if "authentication" in config_data:
+ if config_data["authentication"].get("ipsec"):
+ command = "authentication ipsec"
+ md = config_data["authentication"].get("ipsec")
+ if md.get("spi"):
+ command += " spi " + str(md.get("spi"))
+ if md.get("algorithim_type"):
+ command += " " + md.get("algorithim_type")
+ if md.get("clear_key"):
+ command += " clear " + md.get("clear_key")
+ elif md.get("password_key"):
+ command += " password " + md.get("password_key")
+ elif md.get("key"):
+ command += " " + md.get("key")
+ return command
+
+
+def _tmplt_ospfv3_demand_circuit(config_data):
+ if "demand_circuit" in config_data:
+ command = "demand-circuit"
+ return command
+
+
+def _tmplt_ospfv3_passive(config_data):
+ if "passive" in config_data:
+ command = "passive"
+ return command
+
+
+def _tmplt_ospfv3_demand_mtu_ignore(config_data):
+ if "mtu_ignore" in config_data:
+ command = "mtu-ignore"
+ return command
+
+
+def _tmplt_ospfv3_authentication(config_data):
+ if "authentication" in config_data:
+ if config_data["authentication"].get("disable"):
+ command = "authentication disable"
+ return command
+
+
+def _tmplt_ospf_adjacency_distribute_bgp_state(config_data):
+ if "distribute_link_list" in config_data:
+ command = "distribute link-state"
+ if config_data["distribute_link_list"].get("instance_id"):
+ command += " instance-id {0}".format(
+ config_data["distribute_link_list"].get("instance_id")
+ )
+ elif config_data["distribute_link_list"].get("throttle"):
+ command += " throttle {0}".format(
+ config_data["distribute_link_list"].get("throttle")
+ )
+ return command
+ elif "distribute_bgp_ls" in config_data:
+ command = "distribute bgp-ls"
+ if config_data["distribute_bgp_ls"].get("instance_id"):
+ command += " instance-id {0}".format(
+ config_data["distribute_bgp_ls"].get("instance_id")
+ )
+ elif config_data["distribute_bgp_ls"].get("throttle"):
+ command += " throttle {0}".format(
+ config_data["distribute_bgp_ls"].get("throttle")
+ )
+ return command
+
+
+def _tmplt_ospf_capability_opaque(config_data):
+ if "capability" in config_data:
+ if "opaque" in config_data["capability"]:
+ command = "capability opaque"
+ opaque = config_data["capability"].get("opaque")
+ if "disable" in opaque:
+ command += "capability opaque disable"
+ return command
+
+
+def _tmplt_ospfv3_area_authentication(config_data):
+ if "authentication" in config_data:
+ if config_data["authentication"].get("disable"):
+ command = "area {area_id} ".format(**config_data)
+ command += "authentication disable"
+ return command
+
+
+def _tmplt_ospfv3_area_authentication_ipsec(config_data):
+ if "authentication" in config_data:
+ command = "area {area_id} ".format(**config_data)
+ if config_data["authentication"].get("ipsec"):
+ command += "authentication ipsec"
+ md = config_data["authentication"].get("ipsec")
+ if md.get("spi"):
+ command += " spi " + str(md.get("spi"))
+ if md.get("algorithim_type"):
+ command += " " + md.get("algorithim_type")
+ if md.get("clear_key"):
+ command += " clear " + md.get("clear_key")
+ elif md.get("password_key"):
+ command += " password " + md.get("password_key")
+ elif md.get("key"):
+ command += " " + md.get("key")
+ return command
+
+
+def _tmplt_ospf_area_mpls_ldp(config_data):
+ commands = []
+ if "mpls" in config_data:
+ command = "area {area_id} mpls".format(**config_data)
+ if config_data["mpls"].get("ldp"):
+ ldp = config_data["mpls"].get("ldp")
+ if "auto_config" in ldp:
+ command += " auto-config"
+ commands.append(command)
+ if "sync" in ldp:
+ command += " sync"
+ commands.append(command)
+ if "sync_igp_shortcuts" in ldp:
+ command += " sync-igp-shortcuts"
+ commands.append(command)
+ return commands
+
+
+def _tmplt_ospfv3_area_bfd_minimum_interval(config_data):
+ if "bfd" in config_data:
+ if "minimum_interval" in config_data["bfd"]:
+ command = "area {area_id} ".format(**config_data)
+ command += " bfd minimum-interval {minimum_interval}".format(
+ **config_data["bfd"]
+ )
+ return command
+
+
+def _tmplt_ospfv3_area_bfd_multiplier(config_data):
+ if "bfd" in config_data:
+ if "multiplier" in config_data["bfd"]:
+ command = "area {area_id} ".format(**config_data)
+ command += "bfd multiplier {multiplier}".format(
+ **config_data["bfd"]
+ )
+ return command
+
+
+def _tmplt_ospfv3_area_bfd_fast_detect(config_data):
+ if "bfd" in config_data:
+ if "fast_detect" in config_data["bfd"]:
+ command = "area {area_id} ".format(**config_data)
+ fast_detect = config_data["bfd"].get("fast_detect")
+ command += "bfd fast-detect"
+ if "strict_mode" in fast_detect:
+ command += " strict-mode"
+ return command
+
+
+def _tmplt_ospf_mpls_ldp(config_data):
+ commands = []
+ if "mpls" in config_data:
+ command = "mpls".format(**config_data)
+ if config_data["mpls"].get("ldp"):
+ ldp = config_data["mpls"].get("ldp")
+ if "auto_config" in ldp:
+ command += " auto-config"
+ commands.append(command)
+ if "sync" in ldp:
+ command += " sync"
+ commands.append(command)
+ if "sync_igp_shortcuts" in ldp:
+ command += " sync-igp-shortcuts"
+ commands.append(command)
+ return commands
+
+
+def _tmplt_ospf_area_nssa(config_data):
+ if "nssa" in config_data:
+ command = "area {area_id} nssa".format(**config_data)
+ if config_data["nssa"].get("no_redistribution"):
+ command += " no-redistribution"
+ if config_data["nssa"].get("no_summary"):
+ command += " no-summary"
+ return command
+
+
+def _tmplt_ospf_area_nssa_def_info_origin(config_data):
+ if "nssa" in config_data:
+ command = "area {area_id} nssa".format(**config_data)
+ if "default_information_originate" in config_data["nssa"]:
+ command += " default-information-originate"
+ def_info_origin = config_data["nssa"].get(
+ "default_information_originate"
+ )
+ if "metric" in def_info_origin:
+ command += " metric {metric}".format(
+ **config_data["nssa"]["default_information_originate"]
+ )
+ if "metric_type" in def_info_origin:
+ command += " metric-type {metric_type}".format(
+ **config_data["nssa"]["default_information_originate"]
+ )
+ return command
+
+
+def _tmplt_ospf_area_nssa_translate(config_data):
+ if "nssa" in config_data:
+ command = "area {area_id} nssa".format(**config_data)
+ if config_data["nssa"].get("translate"):
+ command += " translate"
+ translate = config_data["nssa"].get("translate")
+ if "type7" in translate:
+ command += " type7"
+ if translate["type7"].get("always"):
+ command += " always"
+ return command
+
+
+def _tmplt_ospf_area_vlink_authentication(config_data):
+ if "authentication" in config_data:
+ command = "area {area_id} virtual-link {id} authentication".format(
+ **config_data
+ )
+ if config_data["authentication"].get("keychain"):
+ command += " keychain " + config_data["authentication"].get(
+ "keychain"
+ )
+ elif config_data["authentication"].get("no_auth"):
+ command += " null"
+ return command
+
+
+def _tmplt_ospf_area_vlink_authentication_md(config_data):
+ if "authentication" in config_data:
+ command = "area {area_id} virtual-link {id} authentication".format(
+ **config_data
+ )
+ if config_data["authentication"].get("message_digest"):
+ command = "authentication message-digest"
+ md = config_data["authentication"].get("message_digest")
+ if md.get("keychain"):
+ command += " keychain " + md.get("keychain")
+ return command
+
+
+def _tmplt_ospf_area_vlink_authentication_key(config_data):
+ if "authentication_key" in config_data:
+ command = "area {area_id} virtual-link {id} authentication-key".format(
+ **config_data
+ )
+ if config_data["authentication_key"].get("password"):
+ command += " {0}".format(
+ config_data["authentication_key"].get("password")
+ )
+ return command
+
+
+def _tmplt_ospf_area_stub(config_data):
+ if "stub" in config_data:
+ command = "area {area_id} stub".format(**config_data)
+ if config_data["stub"].get("no_summary"):
+ command += " no-summary"
+ return command
+
+
+def _tmplt_ospf_area_ranges(config_data):
+ if "ranges" in config_data:
+ commands = []
+ for k, v in iteritems(config_data["ranges"]):
+ cmd = "area {area_id} range".format(**config_data)
+ temp_cmd = " {address}".format(**v)
+ if "advertise" in v:
+ temp_cmd += " advertise"
+ elif "not_advertise" in v:
+ temp_cmd += " not-advertise"
+ cmd += temp_cmd
+ commands.append(cmd)
+ return commands
+
+
+def _tmplt_prefix_suppression(config_data):
+ if "prefix_suppression" in config_data:
+ if "set" in config_data["prefix_suppression"]:
+ command = "prefix-suppression"
+ if "secondary_address" in config_data["prefix_suppression"]:
+ command = "prefix-suppression secondary-address"
+ return command
+
+
+def _tmplt_protocol_shutdown(config_data):
+ if "protocol_shutdown" in config_data:
+ if "set" in config_data["protocol_shutdown"]:
+ command = "protocol-shutdown"
+ if "host_mode" in config_data["protocol_shutdown"]:
+ command = "protocol-shutdown host-mode"
+ if "on_reload" in config_data["protocol_shutdown"]:
+ command = "protocol-shutdown on-reload"
+ return command
+
+
+def _tmplt_timers_lsa(config_data):
+ if "timers" in config_data:
+ command = "timers lsa"
+ if "group_pacing" in config_data["timers"]["lsa"]:
+ command += " group-pacing {group_pacing}".format(
+ **config_data["timers"]["lsa"]
+ )
+ if "min_arrival" in config_data["timers"]["lsa"]:
+ command += " min-arrival {min_arrival}".format(
+ **config_data["timers"]["lsa"]
+ )
+ if "refresh" in config_data["timers"]["lsa"]:
+ command += " refresh {refresh}".format(
+ **config_data["timers"]["lsa"]
+ )
+ return command
+
+
+def _tmplt_timers_graceful_shutdown(config_data):
+ if "timers" in config_data:
+ command = "timers graceful-shutdown"
+ if "initial_delay" in config_data["timers"]["graceful-shutdown"]:
+ command += " initial delay {initial_delay}".format(
+ **config_data["timers"]["graceful-shutdown"]
+ )
+ if "retain_routes" in config_data["timers"]["graceful-shutdown"]:
+ command += " retain routes {retain_routes}".format(
+ **config_data["timers"]["graceful-shutdown"]
+ )
+ return command
+
+
+class Ospfv3Template(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(Ospfv3Template, self).__init__(lines=lines, tmplt=self)
+
+ # fmt: off
+ PARSERS = [
+ {
+ "name": "pid",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "router ospfv3 {{ process_id }}",
+ "result": {
+ "processes": {"{{ pid }}": {"process_id": "{{ pid }}"}}
+ },
+ "shared": True,
+ },
+ {
+ "name": "cost",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \scost(?P<cost>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "cost {{ cost }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "cost": "{{ cost|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "default_metric",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sdefault-metric(?P<default_metric>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "default-metric {{ default_metric }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "default_metric": "{{ default_metric|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "packet_size",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \spacket-size(?P<packet_size>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "packet-size {{ packet_size }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "packet_size": "{{ packet_size|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "dead_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sdead-interval(?P<dead_interval>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "dead-interval {{ dead_interval }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "dead_interval": "{{ dead_interval|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "hello_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \shello-interval(?P<hello_interval>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "hello-interval {{ hello_interval }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "hello_interval": "{{ hello_interval|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "priority",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \spriority(?P<priority>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "priority {{ priority }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "priority": "{{ priority|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "weight",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sweight(?P<weight>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "weight {{ weight }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "weight": "{{ weight|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "retransmit_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sretransmit-interval(?P<retransmit_interval>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "retransmit-interval {{ retransmit_interval }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "retransmit_interval": "{{ retransmit_interval|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "transmit_delay",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \stransmit-delay(?P<transmit_delay>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "transmit-delay {{ transmit_delay }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "transmit_delay": "{{ transmit_delay|int }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "passive",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ (\spassive(?P<passive>))?
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": _tmplt_ospfv3_passive,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "passive": "{{ True if passive is defined }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "process.database_filter",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sdatabase-filter
+ \sall
+ \sout\s(?P<database_filter>\s\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "process.database_filter",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "database_filter": "{{ database_filter }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "demand_circuit",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ (\sdemand-circuit(?P<demand_circuit>))?
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": _tmplt_ospfv3_demand_circuit,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "demand_circuit": "{{ True if demand_circuit is defined }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "router_id",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \srouter-id\s(?P<router_id>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "router-id {{ router_id }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "router_id": "{{ router_id }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "mtu_ignore",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ (\smtu-ignore(?P<mtu_ignore>))?
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": _tmplt_ospfv3_demand_mtu_ignore,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "mtu_ignore": "{{ True if mtu_ignore is defined }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "flood_reduction",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sflood-reduction\s(?P<flood_reduction>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "flood-reduction {{ True if flood_reduction is defined }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "flood_reduction": "{{ flood_reduction }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "loopback_stub_network",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sloopback(?P<loopback>)
+ \sstub-network\s(?P<stub_network>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "loopback stub-network {{ stub_network }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "loopback_stub_network": "{{ loopback_stub_network }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "address_family_unicast",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \saddress-family(?P<address_family>)
+ \sipv4(?P<ipv4>)
+ \sunicast(?P<unicast>)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "address_family_unicast",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "address_family_unicast": "{{ True if unicast is defined }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "default_weight",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sapply-weight(?P<apply_weight>)
+ \sdefault-weight(?P<default_weight>\s\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "apply-weight default-weight {{ default_weight }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "apply_weight": {
+ "default_weight": "{{ default_weight|int }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "bandwidth",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sapply-weight(?P<apply_weight>)
+ \sbandwidth(?P<bandwidth>\s\d+)?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "apply-weight bandwidth {{ bandwidth }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "apply_weight": {
+ "bandwidth": "{{ bandwidth|int }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "authentication",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sauthentication(?P<auth>)
+ (\sdisable(?P<disable>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospfv3_authentication,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "authentication": {
+ "disable": "{{ True if disable is defined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "authentication.ipsec",
+ "getval": re.compile(
+ r"""^router
+ \sospfv3\s(?P<pid>\S+)
+ \sauthentication(?P<auth>)
+ \sipsec(?P<ipsec>)
+ \sspi\s(?P<spi>\d+)
+ (\s(?P<algo_type>\S+))?
+ (\spassword\s(?P<password_key>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_authentication_ipsec,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "authentication": {
+ "ipsec": {
+ "spi": "{{ spi }}",
+ "algorithim_type": "{{ algo_type }}",
+ "clear_key": "{{ clear_key }}",
+ "password_key": "{{ password_key }}",
+ "key": "{{ key }}",
+ }
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "default_information_originate",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sdefault-information(?P<default_information>)
+ (\soriginate(?P<originate>))?
+ (\salways(?P<always>))?
+ (\smetric\s(?P<metric>\d+))?
+ (\smetric-type\s(?P<metric_type>\d+))?
+ (\sroute_policy\s(?P<route_policy>)\S+)?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_default_information,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "default_information_originate": {
+ "always": "{{ True if always is defined }}",
+ "metric": "{{ metric|int }}",
+ "metric_type": "{{ metric_type|int }}",
+ "route_policy": "{{ route_policy }}",
+ "set": "{{ True if default_information is defined and always is undefined and metric "
+ "is undefined and metric_type is undefined and route_policy is undefined }}"
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "auto_cost",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sauto-cost(?P<auto_cost>)
+ (\sreference-bandwidth\s(?P<reference_bandwidth>\d+))?
+ (\sdisable(?P<disable>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_auto_cost,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "auto_cost": {
+ "disable": "{{ True if disable is defined }}",
+ "reference_bandwidth": "{{ reference_bandwidth|int }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "bfd.minimum_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sbfd(?P<bfd>)
+ \sminimum-interval\s(?P<minimum_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospfv3_bfd_minimum_interval,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "bfd": {
+ "minimum_interval": "{{ minimum_interval|int }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "bfd.multiplier",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sbfd(?P<bfd>)
+ \smultiplier\s(?P<multiplier>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospfv3_bfd_multiplier,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "bfd": {
+ "multiplier": "{{ multiplier|int }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "bfd.fast_detect",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sbfd(?P<bfd>)
+ \sfast-detect(?P<fast_detect>)
+ (\s(?P<disable>disable))?
+ (\s(?P<strict_mode>strict-mode))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_bfd_fast_detect,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "bfd": {
+ "fast_detect": {
+ "set": "{{ True if disable is undefined and strict_mode is undefined }}",
+ "strict_mode": "{{ True if strict_mode is defined }}",
+ },
+ },
+ }
+ },
+ },
+ },
+ {
+ "name": "security",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \ssecurity(?P<security>)
+ \sttl(?P<ttl>)?
+ (\shops\s(?P<hops>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_security,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "security_ttl": {
+ "set": "{{ True if ttl is defined and hops is undefined }}",
+ "hops": "{{ hops }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "nsr",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \snsr(?P<nsr>)
+ \sdisable(?P<disable>)?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_nsr,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "nsr": {
+ "set": "{{ True if nsr is defined and disable is undefined }}",
+ "disable": "{{ True if disable is defined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "protocol",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sprotocol(?P<protocol>)
+ \s(shutdown(?P<shutdown>))
+ (\shost-mode(?P<host_mode>))?
+ (\son-reload\s(?P<on_reload>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_protocol,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "protocol_shutdown": {
+ "set": "{{ True if shutdown is defined and host-mode is undefined and on_reload is undefined }}",
+ "host_mode": "{{ True if host_mode is defined }}",
+ "on_reload": "{{ True if on_reload is defined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "capability",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \scapability(?P<capability>)
+ (\stype7\s(?P<type7>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "capability type7 {{ type7 }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "capability": {
+ "type7": "{{ type7 }}"
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "capability.opaque",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \scapability(?P<capability>)?
+ \sopaque(?P<opaque>)
+ (\sdisable(?P<disable>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_capability_opaque,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "capability": {
+ "opaque": {
+ "disable": "{{ True if disable is defined }}",
+ "set": "{{ True if opaque is defined and disable is undefined }}",
+ },
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "admin_distance",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sdistance\s(?P<value>d+)
+ \s(?P<source>\S+)
+ \s(?P<wildcard>\S+)
+ (\s(?P<access_list>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distance_admin,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distance": {
+ "admin_distance": {
+ "value": "{{ value|int }}",
+ "source": "{{ source }}",
+ "wildcard": "{{ wildcard }}",
+ "access_list": "{{ access_list }}",
+ }
+ },
+ }
+ }
+ },
+ },
+
+ {
+ "name": "ospf_distance",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sdistance(?P<value>)
+ \sospfv3(?P<ospf>)
+ (\sexternal\s(?P<external>\d+))?
+ (\sinter-area\s(?P<inter_area>\d+))?
+ (\sintra-area\s(?P<intra_area>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_distance_ospf,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distance": {
+ "ospf_distance": {
+ "external": "{{ external|int }}",
+ "inter_area": "{{ inter_area|int }}",
+ "intra_area": "{{ intra_area|int }}",
+ }
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "area.default_cost",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sdefault-cost\s(?P<default_cost>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} default-cost {{ default_cost }}",
+ "compval": "default_cost",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "default_cost": "{{ default_cost|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.dead_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sdead-interval\s(?P<dead_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} dead-interval {{ dead_interval }}",
+ "compval": "dead_interval",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "dead_interval": "{{ dead_interval|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.hello_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \shello-interval\s(?P<hello_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} hello-interval {{ hello_interval }}",
+ "compval": "hello_interval",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "hello_interval": "{{ hello_interval|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.transmit_delay",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \stransmit-delay\s(?P<transmit_delay>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} transmit-delay {{ transmit_delay }}",
+ "compval": "transmit_delay",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "transmit_delay": "{{ transmit_delay|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.cost",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \scost\s(?P<cost>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} cost {{ cost }}",
+ "compval": "cost",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "cost": "{{ cost|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.priority",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \spriority\s(?P<priority>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} priority {{ priority }}",
+ "compval": "priority",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "priority": "{{ priority|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.weight",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sweight\s(?P<weight>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} weight {{ weight }}",
+ "compval": "weight",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "weight": "{{ weight|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.packet_size",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \spacket-size\s(?P<packet_size>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} packet-size {{ packet_size }}",
+ "compval": "packet_size",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "packet_size": "{{ packet_size|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.summary_in",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \ssummary-in\s(?P<summary_in>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} summary-in {{ summary_in }}",
+ "compval": "summary_in",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "summary_in": "{{ summary_in }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.demand_circuit",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sdemand-circuit\s(?P<demand_circuit>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} demand-circuit {{ demand_circuit }}",
+ "compval": "demand_circuit",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "demand_circuit": "{{ demand_circuit }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.passive",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \spassive\s(?P<passive>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} passive {{ passive }}",
+ "compval": "passive",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "passive": "{{ passive }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.external_out",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sexternal-out\s(?P<external_out>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} external-out {{ external_out }}",
+ "compval": "passive",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "external_out": "{{ external_out }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.mtu_ignore",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \smtu-ignore\s(?P<mtu_ignore>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "area {{ area_id }} mtu-ignore {{ mtu_ignore }}",
+ "compval": "mtu_ignore",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "mtu_ignore": "{{ mtu_ignore }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.authentication",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sauthentication(?P<auth>)
+ (\sdisable(?P<disable>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospfv3_area_authentication,
+ "compval": "authentication",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "authentication": {
+ "disable": "{{ True if disable is defined }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.authentication.ipsec",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sauthentication(?P<auth_key>)
+ \sipsec(?P<ipsec>)
+ \sspi\s(?P<spi>\d+)
+ (\s(?P<algo_type>\S+))?
+ (\spassword\s(?P<password_key>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospfv3_area_authentication_ipsec,
+ "compval": "authentication.ipsec",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "authentication": {
+ "ipsec": {
+ "spi": "{{ spi }}",
+ "algorithim_type": "{{ algo_type }}",
+ "clear_key": "{{ clear_key }}",
+ "password_key": "{{ password_key }}",
+ "key": "{{ key }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ },
+ {
+ "name": "area.mpls_traffic_eng",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \smpls(?P<mpls>)
+ \straffic-end(?P<traffic_eng>)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} mpls traffic-eng",
+ "compval": "mpls_traffic_eng",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "mpls": {
+ "traffic_eng": "{{ True if traffic_eng is defined }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.mpls_ldp",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \smpls(?P<mpls>)
+ (\sauto-config(?P<auto_config>))?
+ (\ssync(?P<sync>))?
+ (\ssync-igp-shortcuts(?P<syn_igp_shortcuts>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_mpls_ldp,
+ "compval": "mpls_ldp",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "mpls": {
+ "ldp": {
+ "auto_config": "{{ True if auto_config is defined }}",
+ "sync": "{{ True if sync is defined }}",
+ "sync_igp_shortcuts": "{{ True if sync_igp_shortcuts is defined }}",
+
+ }
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.bfd.minimum_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sbfd(?P<bfd>)
+ \sminimum-interval\s(?P<minimum_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospfv3_area_bfd_minimum_interval,
+ "compval": "bfd.minimum_interval",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "bfd": {
+ "minimum_interval": "{{ minimum_interval|int }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.bfd.multiplier",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sbfd(?P<bfd>)
+ \smultiplier\s(?P<multiplier>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospfv3_area_bfd_multiplier,
+ "compval": "bfd.multiplier",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "bfd": {
+ "multiplier": "{{ multiplier|int }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.bfd.fast_detect",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sbfd(?P<bfd>)
+ \sarea(?P<area_id>)
+ \sfast-detect(?P<fast_detect>)
+ (\s(?P<disable>disable))?
+ (\s(?P<strict_mode>strict-mode))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospfv3_area_bfd_fast_detect,
+ "compval": "bfd.fast_detect",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "bfd": {
+ "fast_detect": {
+ "set": "{{ True if disable is undefined and strict_mode is undefined }}",
+ "strict_mode": "{{ True if strict_mode is defined }}",
+ },
+ },
+ }
+ }
+ }
+ },
+ },
+ },
+ {
+ "name": "area.stub",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \sstub(?P<nssa>)
+ (\sno-summary(?P<no_sum>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_stub,
+ "compval": "stub",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "area_id": "{{ area_id }}",
+ "stub": {
+ "set": "{{ True if stub is defined and no_summary is undefined }}",
+ "no_summary": "{{ True if no_summary is defined }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \snssa(?P<nssa>)
+ (\sno-redistribution(?P<no_redis>))?
+ (\sno-summary(?P<no_sum>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_nssa,
+ "compval": "nssa",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "set": "{{ True if nssa is defined and no_summary is undefined and no_redis is undefined }}",
+ "no_summary": "{{ True if no_summary is defined }}",
+ "no_redistribution": "{{ True if no_redis is defined }}"
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa.default_information_originate",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \snssa(?P<nssa>)
+ (\sno-redistribution(?P<no_redis>))?
+ (\sdefault-information-originate(?P<def_info_origin>))?
+ (\smetric\s(?P<metric>\d+))?
+ (\smetric-type\s(?P<metric_type>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_nssa_def_info_origin,
+ "compval": "nssa.default_information_originate",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "default_information_originate": {
+ "metric": "{{ metric|int }}",
+ "metric_type": "{{ metric_type|int }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ },
+ {
+ "name": "area.ranges",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \srange(?P<range>)
+ \s(?P<address>\S+)
+ (\sadvertise(?P<advertise>))
+ (\snot-advertise(?P<not_advertise>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_ranges,
+ "compval": "ranges",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "ranges": [
+ {
+ "address": "{{ address }}",
+ "advertise": "{{ True if advertise is defined }}",
+ "not_advertise": "{{ True if not_advertise is defined }}",
+ }
+ ],
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa.translate",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \snssa(?P<nssa>)
+ \stranslate(?P<translate>)
+ \stype7(?P<type7>)
+ \salways\s(?P<always>)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_nssa_translate,
+ "compval": "nssa.translate",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "translate": {
+ "type7": {
+ "always": "{{ True if always is defined }}"
+ }
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "virtual_link.hello_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \svirtual-link\s(?P<id>\S+)
+ \shello-interval\s(?P<hello_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} virtual-link {{ id }} hello-interval {{ hello_interval }}",
+ "compval": "hello_interval",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "virtual_link": {
+ "{{ id }}":
+ {
+ "id": "{{ id }}",
+ "hello_interval": "{{ hello_interval|int }}"
+ }
+
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "virtual_link.dead_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \svirtual-link\s(?P<id>\S+)
+ \sdead-interval\s(?P<dead_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} virtual-link {{ id }} dead-interval {{ dead_interval }}",
+ "compval": "dead_interval",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "virtual_link": {
+ "{{ id }}": {
+ "id": "{{ id }}",
+ "dead_interval": "{{ dead_interval|int }}"
+ }
+
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "virtual_link.retransmit_interval",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \svirtual-link\s(?P<id>\S+)
+ \sretransmit-interval\s(?P<retransmit_interval>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} virtual-link {{ id }} retransmit-interval {{ retransmit_interval }}",
+ "compval": "retransmit_interval",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "virtual_link": {
+ "{{ id }}": {
+ "id": "{{ id }}",
+ "retransmit_interval": "{{ retransmit_interval|int }}"
+ }
+ }
+
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "virtual_link.authentication",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \savirtual-link\s(?P<id>\S+)
+ \sauthentication(?P<auth>)
+ (\skeychain\s(?P<keychain>\S+))?
+ (\snull(?P<no_auth>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_vlink_authentication,
+ "compval": "authentication",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "authentication": {
+ "no_auth": "{{ True if no_auth is defined }}",
+ "keychain": "{{ keychain }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "virtual_link.authentication_key",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \svirtual-link\s(?P<id>\S+)
+ \sauthentication-key(?P<auth_key>)
+ (\s(?P<password>\S+))?
+ (\sclear\s(?P<clear>)\S+)?
+ (\sencrypted(?P<encrypted>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_vlink_authentication_key,
+ "compval": "authentication_key",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "virtual_link": {
+ "{{ id }}": {
+ "authentication_key": {
+ "clear": "{{ clear }}",
+ "encrypted": "{{ encrypted}}",
+ "password": "{{ password if clear is undefined and encrypted is undefined }}",
+ },
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "virtual_link.authentication.message_digest",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sarea\s(?P<area_id>\S+)
+ \svirtual-link\s(?P<id>\S+)
+ \sauthentication(?P<auth>)
+ \smessage-digest(?P<md>)
+ \skeychain(?P<md_key>\s\S+)
+ *$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_area_vlink_authentication_md,
+ "compval": "authentication.message_digest",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "virtual_link": {
+ "{{ id }}": {
+ "authentication": {
+ "message_digest": {
+ "keychain": "{{ md_key }}",
+ }
+ },
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "link_down_fast_detect",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \slink-down
+ \sfast-detect(?P<fast_detect>)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "link-down fast-detect",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "link_down_fast_detect": "{{ True if fast_detect is defined }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "nsr",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \snsr
+ \sdisable(?P<disable>)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "nsr disable",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "disable": "{{ True if disable is defined }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "database_filter",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sdatabase-filter
+ \sall
+ \sout\s(?P<outing>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+
+ "setval": "database-filter all out {{ outing }}",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "outing": "{{ outing }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "distribute_link_state",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sdistribute(?P<distribute>)
+ \slink-state(?P<link_state>)
+ (\sinstance-id(?P<inst_id>\d+))?
+ (\sthrottle(?P<throttle>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_adjacency_distribute_bgp_state,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distribute_link_list": {
+ "instance_id": "{{ inst_id|int }}",
+ "throttle": "{{ throttle }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "distribute_bgp_ls",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sdistribute(?P<distribute>)
+ \sbgp-ls(?P<bgp_ls>)
+ (\sinstance-id(?P<inst_id>\d+))?
+ (\sthrottle(?P<throttle>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_adjacency_distribute_bgp_state,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "distribute_bgp_ls": {
+ "instance_id": "{{ inst_id|int }}",
+ "throttle": "{{ throttle }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "log_adjacency",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \slog(?P<security>)
+ \sadjacency(?P<adjacency>)?
+ (\schanges(?P<changes>))?
+ (\sdisable(?P<disable>))?
+ (\sdetails(?P<details>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_log_adjacency,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "log_adjacency_changes": {
+ "set": "{{ True changes id defined and disable is undefined and detail is undefined }}",
+ "disable": "{{ True if disable is defined }}",
+ "details": "{{ True if details is defined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "max_lsa",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ (\smax-lsa\s(?P<threshold>\d+))?
+ (\swarning-only\s(?P<warning_only>\d+)?
+ (\signore-time\s(?P<ignore_time>\d+))?
+ (\signore-count\s(?P<ignore_count>\d+))?
+ (\sreset-time\s(?P<reset_time>)\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_log_max_lsa,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "max_lsa": {
+ "threshold": "{{ threshold|int }}",
+ "warning_only": "{{ warning_only|int }}",
+ "ignore_time": "{{ ignore_time|int }}",
+ "ignore_count": "{{ ignore_count|int }}",
+ "reset_time": "{{ reset_time|int }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "max_metric",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \smax-metric
+ \s*(?P<router_lsa>)
+ (\s*external-lsa(?P<external_lsa>))?
+ (\s(?P<max_metric_value>\d+))?
+ \s*(?P<include_stub>include-stub)*
+ \s*(?P<on_startup>on-startup)*
+ \s*(?P<wait_period>\d+)*
+ \s*(wait-for\sbgp)*
+ \s*(?P<bgp_asn>\d+)*
+ \s*(?P<summary_lsa>summary-lsa)*
+ \s*(?P<sum_lsa_max_metric_value>\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_max_metric,
+ "remval": "max-metric router-lsa",
+ "result": {
+ "processes": {
+ '{{ "pid" }}': {
+ "max_metric": {
+ "router_lsa": {
+ "set": "{{ True if router_lsa is defined and external_lsa is undefined else None }}",
+ "external_lsa": {
+ "set": "{{ True if external_lsa is defined and max_metric_value is undefined else None }}",
+ "max_metric_value": "{{ max_metric_value }}",
+ },
+ "include_stub": "{{ not not include_stub }}",
+ "on_startup": {
+ "set": "{{ True if on_startup is defined and (wait_period and bgp_asn) is undefined else None }}",
+ "wait_period": "{{ wait_period }}",
+ "wait_for_bgp_asn": "{{ bgp_asn }}",
+ },
+ "summary_lsa": {
+ "set": "{{ True if summary_lsa is defined and sum_lsa_max_metric_value is undefined else None }}",
+ "max_metric_value": "{{ sum_lsa_max_metric_value }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "mpls_ldp",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \smpls(?P<mpls>)
+ (\sauto-config(?P<auto_config>))?
+ (\ssync(?P<sync>))?
+ (\ssync-igp-shortcuts(?P<syn_igp_shortcuts>))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_mpls_ldp,
+ "compval": "mpls_ldp",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "mpls": {
+ "ldp": {
+ "auto_config": "{{ True if auto_config is defined }}",
+ "sync": "{{ True if sync is defined }}",
+ "sync_igp_shortcuts": "{{ True if sync_igp_shortcuts is defined }}",
+ }
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "microloop_avoidance",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \smicroloop(?P<microloop>)
+ \savoidance(?P<avoidance>)
+ (\s(?P<protected>protected))?
+ (\s(?P<segment_routing>segment-routing))?
+ (\srib-update-delay\s(?P<rib_update_delay>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_microloop_avoidance,
+ "compval": "microloop_avoidance",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "microloop_avoidance": {
+ "protected": "{{ True if protected is defined }}",
+ "segment_routing": "{{ True if segment_routing is defined }}",
+ "rib_update_delay": "{{ rib_update_delay }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "mpls_traffic_eng",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \smpls(?P<mpls>)
+ \straffic-end(?P<traffic_eng>)
+ (\sautoroute-exclude(?P<autoroute>))?
+ (\sroute-policy(?P<route_policy>\S+))?
+ (\s(?P<igp_intact>igp_intact))?
+ (\s(?P<ldp_sync_update>ldp-sync-update))?
+ (\s(?P<multicast_intact>multicast-intact))?
+ (\srouter-id\s(?P<router_id>\S+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_ospf_mpls_traffic_eng,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "mpls": {
+ "autoroute_exclude": {
+ "route_policy": "{{ route_policy }}"
+ },
+ "igp_intact": "{{ True if igp_intact is defined }}",
+ "ldp_sync_update": "{{ True if ldp_sync_update is defined }}",
+ "multicast_intact": "{{ True if multicast_intact is defined }}",
+ "router_id": "{{ router_id }}"
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "prefix_suppression",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sprefix-suppression(?P<prefix_suppression>)
+ (\s(?P<secondary_address>secondary-address))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_prefix_suppression,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "prefix_suppression": {
+ "set": "{{ True if prefix_suppression is defined and secondary_address is undefined }}",
+ "secondary_address": "{{ True if secondary_address is defined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "protocol_shutdown",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \sprotocol-shutdown(?P<protocol_shutdown>)
+ (\s(?P<host_mode>host-mode))?
+ (\s(?P<on_reload>on-reload))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_protocol_shutdown,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "protocol_shutdown": {
+ "set": "{{ True if protocol_shutdown is defined and host_mode is undefined and on_reload is undefined }}",
+ "host_mode": "{{ True if host_mode is defined }}",
+ "on_reload": "{{ True if on_reload is defined }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.lsa",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \stimers
+ \slsa
+ (\sgroup-pacing\s(?P<group_pacing>\d+))?
+ (\smin-arrival\s(?P<min_arrival>\d+))?
+ (\srefresh\s(?P<refresh>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_timers_lsa,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "lsa": {
+ "group_pacing": "{{ group_pacing|int }}",
+ "min_arrival": "{{ min_arrival|int }}",
+ "refresh": "{{ refresh|int }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.graceful_shutdown",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \stimers
+ \sgraceful_shutdown
+ (\sinitial delay\s(?P<initial_delay>\d+))?
+ (\sretain routes\s(?P<retain_routes>\d+))?
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_timers_graceful_shutdown,
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "graceful_shutdown": {
+ "initial_delay": "{{ initial_delay|int }}",
+ "retain_routes": "{{ retain_routes|int }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "throttle.spf",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \stimers
+ \sthrottle
+ \sspf
+ (\s(?P<change_delay>\d+))
+ (\s(?P<second_delay>\d+))
+ (\s(?P<max_wait>\d+))
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle spf {{ throttle.spf.change_delay }} {{ throttle.spf.second_delay }} {{ throttle.spf.max_wait }}",
+ "compval": "throttle.lsa_all",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "throttle": {
+ "lsa_all": {
+ "initial_delay": "{{ initial_delay }}",
+ "min_delay": "{{ min_delay }}",
+ "max_delay": "{{ max_delay }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "throttle.lsa_all",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \stimers
+ \sthrottle
+ \slsa
+ \sall
+ (\s(?P<initial_delay>\d+))
+ (\s(?P<min_delay>\d+))
+ (\s(?P<max_delay>\d+))
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle lsa all {{ throttle.lsa_all.initial_delay }} {{ throttle.lsa_all.min_delay }} {{ throttle.lsa_all.max_delay }}",
+ "compval": "throttle.lsa_all",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "throttle": {
+ "lsa_all": {
+ "initial_delay": "{{ initial_delay }}",
+ "min_delay": "{{ min_delay }}",
+ "max_delay": "{{ max_delay }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "throttle.fast_reroute",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \stimers
+ \sthrottle
+ \sfast-reroute\s(?P<fast_reroute>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle fast-reroute {{ fast_reroute }}",
+ "compval": "throttle.fast_reroute",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "throttle": {
+ "fast_reroute": "{{ fast_reroute }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.pacing_flood",
+ "getval": re.compile(
+ r"""
+ ^router
+ \sospfv3\s(?P<pid>\S+)
+ \stimers
+ \spacing
+ \sflood\s(?P<pacing_flood>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers pacing flood {{ pacing_flood }}",
+ "compval": "timers.pacing_flood",
+ "result": {
+ "processes": {
+ "{{ pid }}": {
+ "timers": {
+ "pacing_flood": "{{ pacing_flood }}",
+
+ }
+ }
+ }
+ },
+ },
+ ]
+ # fmt: on
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/utils/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/utils/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/utils/utils.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/utils/utils.py
new file mode 100644
index 00000000..059c8167
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/module_utils/network/iosxr/utils/utils.py
@@ -0,0 +1,391 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+# utils
+
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+from ansible.module_utils._text import to_text
+from ansible_collections.ansible.netcommon.plugins.module_utils.compat import (
+ ipaddress,
+)
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_diff,
+ is_masklen,
+ to_netmask,
+ search_obj_in_list,
+)
+
+
+def remove_command_from_config_list(interface, cmd, commands):
+ # To delete the passed config
+ if interface not in commands:
+ commands.insert(0, interface)
+ commands.append("no %s" % cmd)
+ return commands
+
+
+def add_command_to_config_list(interface, cmd, commands):
+ # To set the passed config
+ if interface not in commands:
+ commands.insert(0, interface)
+ commands.append(cmd)
+
+
+def dict_to_set(sample_dict):
+ # Generate a set with passed dictionary for comparison
+ test_dict = {}
+ if isinstance(sample_dict, dict):
+ for k, v in iteritems(sample_dict):
+ if v is not None:
+ if isinstance(v, list):
+ if isinstance(v[0], dict):
+ li = []
+ for each in v:
+ for key, value in iteritems(each):
+ if isinstance(value, list):
+ each[key] = tuple(value)
+ li.append(tuple(iteritems(each)))
+ v = tuple(li)
+ else:
+ v = tuple(v)
+ elif isinstance(v, dict):
+ li = []
+ for key, value in iteritems(v):
+ if isinstance(value, list):
+ v[key] = tuple(value)
+ li.extend(tuple(iteritems(v)))
+ v = tuple(li)
+ test_dict.update({k: v})
+ return_set = set(tuple(iteritems(test_dict)))
+ else:
+ return_set = set(sample_dict)
+ return return_set
+
+
+def filter_dict_having_none_value(want, have):
+ # Generate dict with have dict value which is None in want dict
+ test_dict = dict()
+ test_key_dict = dict()
+ name = want.get("name")
+ if name:
+ test_dict["name"] = name
+ diff_ip = False
+ want_ip = ""
+ for k, v in iteritems(want):
+ if isinstance(v, dict):
+ for key, value in iteritems(v):
+ if value is None and k in have and key in have.get(k):
+ dict_val = have.get(k).get(key)
+ test_key_dict.update({key: dict_val})
+ test_dict.update({k: test_key_dict})
+ if isinstance(v, list) and isinstance(v[0], dict):
+ for key, value in iteritems(v[0]):
+ if value is None and k in have and key in have.get(k):
+ dict_val = have.get(k).get(key)
+ test_key_dict.update({key: dict_val})
+ test_dict.update({k: test_key_dict})
+ # below conditions checks are added to check if
+ # secondary IP is configured, if yes then delete
+ # the already configured IP if want and have IP
+ # is different else if it's same no need to delete
+ for each in v:
+ if each.get("secondary"):
+ want_ip = each.get("address").split("/")
+ have_ip = have.get("ipv4")
+ for each in have_ip:
+ if len(want_ip) > 1 and each.get("secondary"):
+ have_ip = each.get("address").split(" ")[0]
+ if have_ip != want_ip[0]:
+ diff_ip = True
+ if each.get("secondary") and diff_ip is True:
+ test_key_dict.update({"secondary": True})
+ test_dict.update({"ipv4": test_key_dict})
+ # Checks if want doesn't have secondary IP but have has secondary IP set
+ elif have.get("ipv4"):
+ if [
+ True
+ for each_have in have.get("ipv4")
+ if "secondary" in each_have
+ ]:
+ test_dict.update({"ipv4": {"secondary": True}})
+ if k == "l2protocol":
+ diff = True
+ h_proto = have.get("l2protocol")
+ w_proto = want.get("l2protocol")
+ if h_proto:
+ if w_proto:
+ for h in h_proto:
+ for w in w_proto:
+ if h == w:
+ diff = False
+ if not diff:
+ break
+ else:
+ diff = True
+ if diff:
+ test_dict.update({k: v})
+ if v is None:
+ val = have.get(k)
+ test_dict.update({k: val})
+ return test_dict
+
+
+def remove_duplicate_interface(commands):
+ # Remove duplicate interface from commands
+ set_cmd = []
+ for each in commands:
+ if "interface" in each:
+ if each not in set_cmd:
+ set_cmd.append(each)
+ else:
+ set_cmd.append(each)
+
+ return set_cmd
+
+
+def flatten_dict(x):
+ result = {}
+ if not isinstance(x, dict):
+ return result
+
+ for key, value in iteritems(x):
+ if isinstance(value, dict):
+ result.update(flatten_dict(value))
+ else:
+ result[key] = value
+
+ return result
+
+
+def dict_delete(base, comparable):
+ """
+
+ This function generates a dict containing key, value pairs for keys
+ that are present in the `base` dict but not present in the `comparable`
+ dict.
+
+ :param base: dict object to base the diff on
+ :param comparable: dict object to compare against base
+
+ :returns: new dict object with key, value pairs that needs to be deleted.
+
+ """
+ to_delete = dict()
+
+ for key in base:
+ if isinstance(base[key], dict):
+ sub_diff = dict_delete(base[key], comparable.get(key, {}))
+ if sub_diff:
+ to_delete[key] = sub_diff
+ else:
+ if key not in comparable:
+ to_delete[key] = base[key]
+
+ return to_delete
+
+
+def pad_commands(commands, interface):
+ commands.insert(0, "interface {0}".format(interface))
+
+
+def diff_list_of_dicts(w, h, key="member"):
+ """
+ Returns a list containing diff between
+ two list of dictionaries
+ """
+ if not w:
+ w = []
+ if not h:
+ h = []
+
+ diff = []
+ for w_item in w:
+ h_item = search_obj_in_list(w_item[key], h, key=key) or {}
+ d = dict_diff(h_item, w_item)
+ if d:
+ if key not in d.keys():
+ d[key] = w_item[key]
+ diff.append(d)
+
+ return diff
+
+
+def validate_ipv4(value, module):
+ if value:
+ address = value.split("/")
+ if len(address) != 2:
+ module.fail_json(
+ msg="address format is <ipv4 address>/<mask>, got invalid format {0}".format(
+ value
+ )
+ )
+
+ if not is_masklen(address[1]):
+ module.fail_json(
+ msg="invalid value for mask: {0}, mask should be in range 0-32".format(
+ address[1]
+ )
+ )
+
+
+def validate_ipv6(value, module):
+ if value:
+ address = value.split("/")
+ if len(address) != 2:
+ module.fail_json(
+ msg="address format is <ipv6 address>/<mask>, got invalid format {0}".format(
+ value
+ )
+ )
+ else:
+ if not 0 <= int(address[1]) <= 128:
+ module.fail_json(
+ msg="invalid value for mask: {0}, mask should be in range 0-128".format(
+ address[1]
+ )
+ )
+
+
+def validate_n_expand_ipv4(module, want):
+ # Check if input IPV4 is valid IP and expand IPV4 with its subnet mask
+ ip_addr_want = want.get("address")
+ if len(ip_addr_want.split(" ")) > 1:
+ return ip_addr_want
+ validate_ipv4(ip_addr_want, module)
+ ip = ip_addr_want.split("/")
+ if len(ip) == 2:
+ ip_addr_want = "{0} {1}".format(ip[0], to_netmask(ip[1]))
+
+ return ip_addr_want
+
+
+def normalize_interface(name):
+ """Return the normalized interface name
+ """
+ if not name:
+ return
+
+ def _get_number(name):
+ digits = ""
+ for char in name:
+ if char.isdigit() or char in "/.":
+ digits += char
+ return digits
+
+ if name.lower().startswith("gi"):
+ if_type = "GigabitEthernet"
+ elif name.lower().startswith("fa"):
+ if_type = "FastEthernet"
+ elif name.lower().startswith("fo"):
+ if_type = "FortyGigE"
+ elif name.lower().startswith("te"):
+ if_type = "TenGigE"
+ elif name.lower().startswith("twe"):
+ if_type = "TwentyFiveGigE"
+ elif name.lower().startswith("hu"):
+ if_type = "HundredGigE"
+ elif name.lower().startswith("vl"):
+ if_type = "Vlan"
+ elif name.lower().startswith("lo"):
+ if_type = "Loopback"
+ elif name.lower().startswith("be"):
+ if_type = "Bundle-Ether"
+ elif name.lower().startswith("bp"):
+ if_type = "Bundle-POS"
+ else:
+ if_type = None
+
+ number_list = name.split(" ")
+ if len(number_list) == 2:
+ number = number_list[-1].strip()
+ else:
+ number = _get_number(name)
+
+ if if_type:
+ proper_interface = if_type + number
+ else:
+ proper_interface = name
+
+ return proper_interface
+
+
+def get_interface_type(interface):
+ """Gets the type of interface
+ """
+
+ if interface.upper().startswith("GI"):
+ return "GigabitEthernet"
+ elif interface.upper().startswith("FA"):
+ return "FastEthernet"
+ elif interface.upper().startswith("FO"):
+ return "FortyGigE"
+ elif interface.upper().startswith("ET"):
+ return "Ethernet"
+ elif interface.upper().startswith("LO"):
+ return "Loopback"
+ elif interface.upper().startswith("BE"):
+ return "Bundle-Ether"
+ elif interface.upper().startswith("NV"):
+ return "nve"
+ elif interface.upper().startswith("TWE"):
+ return "TwentyFiveGigE"
+ elif interface.upper().startswith("HU"):
+ return "HundredGigE"
+ elif interface.upper().startswith("PRE"):
+ return "preconfigure"
+ else:
+ return "unknown"
+
+
+def isipaddress(data):
+ """
+ Checks if the passed string is
+ a valid IPv4 or IPv6 address
+ """
+ isipaddress = True
+
+ try:
+ ipaddress.ip_address(data)
+ except ValueError:
+ isipaddress = False
+
+ return isipaddress
+
+
+def is_ipv4_address(data):
+ """
+ Checks if the passed string is
+ a valid IPv4 address
+ """
+ if "/" in data:
+ data = data.split("/")[0]
+
+ if not isipaddress(to_text(data)):
+ raise ValueError("{0} is not a valid IP address".format(data))
+
+ return ipaddress.ip_address(to_text(data)).version == 4
+
+
+def prefix_to_address_wildcard(prefix):
+ """ Converts a IPv4 prefix into address and
+ wildcard mask
+
+ :returns: IPv4 address and wildcard mask
+ """
+ wildcard = []
+
+ subnet = to_text(ipaddress.IPv4Network(to_text(prefix)).netmask)
+
+ for x in subnet.split("."):
+ component = 255 - int(x)
+ wildcard.append(str(component))
+
+ wildcard = ".".join(wildcard)
+
+ return prefix.split("/")[0], wildcard
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_acl_interfaces.py
new file mode 100644
index 00000000..378b845c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_acl_interfaces.py
@@ -0,0 +1,651 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for iosxr_acl_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_acl_interfaces
+short_description: ACL interfaces resource module
+description:
+- This module manages adding and removing Access Control Lists (ACLs) from interfaces
+ on devices running IOS-XR software.
+version_added: 1.0.0
+author: Nilashish Chakraborty (@NilashishC)
+options:
+ config:
+ description: A dictionary of ACL options for interfaces.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name/Identifier for the interface
+ type: str
+ required: true
+ access_groups:
+ type: list
+ elements: dict
+ description:
+ - Specifies ACLs attached to the interfaces.
+ suboptions:
+ afi:
+ description:
+ - Specifies the AFI for the ACL(s) to be configured on this interface.
+ type: str
+ choices:
+ - ipv4
+ - ipv6
+ required: true
+ acls:
+ type: list
+ description:
+ - Specifies the ACLs for the provided AFI.
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Specifies the name of the IPv4/IPv6 ACL for the interface.
+ type: str
+ required: true
+ direction:
+ description:
+ - Specifies the direction of packets that the ACL will be applied
+ on.
+ type: str
+ choices:
+ - in
+ - out
+ required: true
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - parsed
+ - rendered
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# RP/0/RP0/CPU0:ios#sh running-config interface
+# Wed Jan 15 12:22:32.911 UTC
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+
+- name: Merge the provided configuration with the existing running configuration
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: acl_1
+ direction: in
+ - name: acl_2
+ direction: out
+ - afi: ipv6
+ acls:
+ - name: acl6_1
+ direction: in
+ - name: acl6_2
+ direction: out
+
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: acl_1
+ direction: out
+ state: merged
+
+# After state:
+# -------------
+#
+# RP/0/RP0/CPU0:ios#sh running-config interface
+# Wed Jan 15 12:27:49.378 UTC
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# ipv4 access-group acl_1 ingress
+# ipv4 access-group acl_2 egress
+# ipv6 access-group acl6_1 ingress
+# ipv6 access-group acl6_2 egress
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# ipv4 access-group acl_1 egress
+# !
+
+# Using merged to update interface ACL configuration
+
+# Before state:
+# -------------
+#
+# RP/0/RP0/CPU0:ios#sh running-config interface
+# Wed Jan 15 12:27:49.378 UTC
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# ipv4 access-group acl_1 ingress
+# ipv4 access-group acl_2 egress
+# ipv6 access-group acl6_1 ingress
+# ipv6 access-group acl6_2 egress
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# ipv4 access-group acl_1 egress
+# !
+#
+
+- name: Update acl_interfaces configuration using merged
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: acl_2
+ direction: out
+ - name: acl_1
+ direction: in
+ state: merged
+
+# After state:
+# -------------
+#
+# RP/0/RP0/CPU0:ios#sh running-config interface
+# Wed Jan 15 12:27:49.378 UTC
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# ipv4 access-group acl_1 ingress
+# ipv4 access-group acl_2 egress
+# ipv6 access-group acl6_1 ingress
+# ipv6 access-group acl6_2 egress
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# ipv4 access-group acl_1 ingress
+# ipv4 access-group acl_2 egress
+# !
+#
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# RP/0/RP0/CPU0:ios#sh running-config interface
+# Wed Jan 15 12:34:56.689 UTC
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# ipv4 access-group acl_1 ingress
+# ipv4 access-group acl_2 egress
+# ipv6 access-group acl6_1 ingress
+# ipv6 access-group acl6_2 egress
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# ipv4 access-group acl_1 egress
+# !
+
+- name: Replace device configurations of listed interface with provided configurations
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+ - afi: ipv6
+ acls:
+ - name: acl6_3
+ direction: in
+ state: replaced
+
+# After state:
+# -------------
+#
+# RP/0/RP0/CPU0:ios#sh running-config interface
+# Wed Jan 15 12:34:56.689 UTC
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# ipv6 access-group acl6_3 ingress
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# ipv4 access-group acl_1 egress
+# !
+#
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# RP/0/RP0/CPU0:ios#sh running-config interface
+# Wed Jan 15 12:34:56.689 UTC
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# ipv4 access-group acl_1 ingress
+# ipv4 access-group acl_2 egress
+# ipv6 access-group acl6_1 ingress
+# ipv6 access-group acl6_2 egress
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# ipv4 access-group acl_1 egress
+# !
+#
+
+- name: Overridde all interface ACL configuration with provided configuration
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: acl_2
+ direction: in
+ - afi: ipv6
+ acls:
+ - name: acl6_3
+ direction: out
+ state: overridden
+
+# After state:
+# -------------
+#
+# RP/0/RP0/CPU0:ios#sh running-config interface
+# Wed Jan 15 12:34:56.689 UTC
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# ipv4 access-group acl_2 ingress
+# ipv6 access-group acl6_3 egress
+# !
+#
+
+# Using 'deleted' to delete all ACL attributes of a single interface
+
+# Before state:
+# -------------
+#
+# RP/0/RP0/CPU0:ios#sh running-config interface
+# Wed Jan 15 12:34:56.689 UTC
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# ipv4 access-group acl_1 ingress
+# ipv4 access-group acl_2 egress
+# ipv6 access-group acl6_1 ingress
+# ipv6 access-group acl6_2 egress
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# ipv4 access-group acl_1 egress
+# !
+#
+
+- name: Delete all ACL attributes of GigabitEthernet0/0/0/1
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ state: deleted
+
+# After state:
+# -------------
+#
+# RP/0/RP0/CPU0:ios#sh running-config interface
+# Wed Jan 15 12:34:56.689 UTC
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# ipv4 access-group acl_1 ingress
+# ipv4 access-group acl_2 egress
+# ipv6 access-group acl6_1 ingress
+# ipv6 access-group acl6_2 egress
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+#
+
+# Using 'deleted' to remove all ACLs attached to all the interfaces in the device
+
+# Before state:
+# -------------
+#
+# RP/0/RP0/CPU0:ios#sh running-config interface
+# Wed Jan 15 12:34:56.689 UTC
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# ipv4 access-group acl_1 ingress
+# ipv4 access-group acl_2 egress
+# ipv6 access-group acl6_1 ingress
+# ipv6 access-group acl6_2 egress
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# ipv4 access-group acl_1 egress
+# !
+#
+
+- name: Delete all ACL interfaces configuration from the device
+ cisco.iosxr.iosxr_acl_interfaces:
+ state: deleted
+
+# After state:
+# -------------
+#
+# RP/0/RP0/CPU0:ios#sh running-config interface
+# Wed Jan 15 12:34:56.689 UTC
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+#
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+#
+# interface MgmtEth0/RP0/CPU0/0
+# ipv4 address dhcp
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# ipv4 access-group acl_1 ingress
+# ipv4 access-group acl_2 egress
+# ipv6 access-group acl6_1 ingress
+# ipv6 access-group acl6_2 egress
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# ipv4 access-group acl_1 egress
+# !
+
+# - name: Convert ACL interfaces config to argspec without connecting to the appliance
+# cisco.iosxr.iosxr_acl_interfaces:
+# running_config: "{{ lookup('file', './parsed.cfg') }}"
+# state: parsed
+
+
+# Task Output (redacted)
+# -----------------------
+
+# "parsed": [
+# {
+# "name": "MgmtEth0/RP0/CPU0/0"
+# },
+# {
+# "access_groups": [
+# {
+# "acls": [
+# {
+# "direction": "in",
+# "name": "acl_1"
+# },
+# {
+# "direction": "out",
+# "name": "acl_2"
+# }
+# ],
+# "afi": "ipv4"
+# },
+# {
+# "acls": [
+# {
+# "direction": "in",
+# "name": "acl6_1"
+# },
+# {
+# "direction": "out",
+# "name": "acl6_2"
+# }
+# ],
+# "afi": "ipv6"
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/0"
+# },
+# {
+# "access_groups": [
+# {
+# "acls": [
+# {
+# "direction": "out",
+# "name": "acl_1"
+# }
+# ],
+# "afi": "ipv4"
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/1"
+# }
+# ]
+# }
+
+
+# Using gathered
+
+- name: Gather ACL interfaces facts using gathered state
+ cisco.iosxr.iosxr_acl_interfaces:
+ state: gathered
+
+
+# Task Output (redacted)
+# -----------------------
+#
+# "gathered": [
+# {
+# "name": "MgmtEth0/RP0/CPU0/0"
+# },
+# {
+# "access_groups": [
+# {
+# "acls": [
+# {
+# "direction": "in",
+# "name": "acl_1"
+# },
+# {
+# "direction": "out",
+# "name": "acl_2"
+# }
+# ],
+# "afi": "ipv4"
+# }
+# "name": "GigabitEthernet0/0/0/0"
+# },
+# {
+# "access_groups": [
+# {
+# "acls": [
+# {
+# "direction": "in",
+# "name": "acl6_1"
+# }
+# ],
+# "afi": "ipv6"
+# }
+# "name": "GigabitEthernet0/0/0/1"
+# }
+# ]
+
+
+# Using rendered
+
+- name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: acl_1
+ direction: in
+ - name: acl_2
+ direction: out
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+
+# "rendered": [
+# "interface GigabitEthernet0/0/0/0",
+# "ipv4 access-group acl_1 ingress",
+# "ipv4 access-group acl_2 egress"
+# ]
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample:
+ - "interface GigabitEthernet0/0/0/1"
+ - "ipv4 access-group acl_1 ingress"
+ - "ipv4 access-group acl_2 egress"
+ - "ipv6 access-group acl6_1 ingress"
+ - "interface GigabitEthernet0/0/0/2"
+ - "no ipv4 access-group acl_3 ingress"
+ - "ipv4 access-group acl_4 egress"
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.acl_interfaces.acl_interfaces import (
+ Acl_interfacesArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.acl_interfaces.acl_interfaces import (
+ Acl_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Acl_interfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Acl_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_acls.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_acls.py
new file mode 100644
index 00000000..ef31676c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_acls.py
@@ -0,0 +1,1451 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for iosxr_acls
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_acls
+short_description: ACLs resource module
+description:
+- This module manages Access Control Lists (ACLs) on devices running IOS-XR.
+version_added: 1.0.0
+author: Nilashish Chakraborty (@NilashishC)
+options:
+ config:
+ description: A list of dictionaries specifying ACL configurations.
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description:
+ - The Address Family Indicator (AFI) for the Access Control Lists (ACL).
+ type: str
+ required: true
+ choices:
+ - ipv4
+ - ipv6
+ acls:
+ description:
+ - A list of Access Control Lists (ACLs).
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - The name of the Access Control List (ACL).
+ type: str
+ aces:
+ description:
+ - List of Access Control Entries (ACEs) for this Access Control List (ACL).
+ type: list
+ elements: dict
+ suboptions:
+ sequence:
+ description:
+ - Sequence number for the Access Control Entry (ACE).
+ type: int
+ grant:
+ description:
+ - Forward or drop packets matching the Access Control Entry (ACE).
+ type: str
+ choices:
+ - permit
+ - deny
+ remark:
+ description:
+ - Comments or a description for the access list.
+ type: str
+ line:
+ description:
+ - An ACE excluding the sequence number.
+ - This key is mutually exclusive with all the other attributes except
+ 'sequence'.
+ - When used with other attributes, the value of this key will get
+ precedence and the other keys will be ignored.
+ - This should only be used when an attribute doesn't exist in the
+ argspec but is valid for the device.
+ - For fact gathering, any ACE that is not fully parsed, will show
+ up as a value of this attribute, excluding the sequence number,
+ which will be populated as value of the sequence key.
+ type: str
+ aliases:
+ - ace
+ source:
+ description:
+ - Specifies the packet source.
+ type: dict
+ suboptions:
+ host:
+ description:
+ - The host IP address to match.
+ type: str
+ address:
+ description:
+ - The source IP address to match.
+ type: str
+ wildcard_bits:
+ description:
+ - The Wildcard bits to apply to source address.
+ type: str
+ any:
+ description:
+ - Match any source address.
+ type: bool
+ prefix:
+ description:
+ - Source network prefix.
+ type: str
+ port_protocol:
+ description:
+ - Specify the source port or protocol.
+ type: dict
+ suboptions:
+ eq:
+ description:
+ - Match only packets on a given port number.
+ type: str
+ gt:
+ description:
+ - Match only packets with a greater port number.
+ type: str
+ lt:
+ description:
+ - Match only packets with a lower port number.
+ type: str
+ neq:
+ description:
+ - Match only packets not on a given port number.
+ type: str
+ range:
+ description:
+ - Match only packets in the range of port numbers
+ type: dict
+ suboptions:
+ start:
+ description:
+ - Specify the start of the port range
+ type: str
+ end:
+ description:
+ - Specify the end of the port range
+ type: str
+ destination:
+ description:
+ - Specifies the packet destination.
+ type: dict
+ suboptions:
+ host:
+ description:
+ - The host IP address to match.
+ type: str
+ address:
+ description:
+ - The destination IP address to match.
+ type: str
+ wildcard_bits:
+ description:
+ - The Wildcard bits to apply to destination address.
+ type: str
+ any:
+ description:
+ - Match any destination address.
+ type: bool
+ prefix:
+ description:
+ - Destination network prefix.
+ type: str
+ port_protocol:
+ description:
+ - Specify the source port or protocol.
+ type: dict
+ suboptions:
+ eq:
+ description:
+ - Match only packets on a given port number.
+ type: str
+ gt:
+ description:
+ - Match only packets with a greater port number.
+ type: str
+ lt:
+ description:
+ - Match only packets with a lower port number.
+ type: str
+ neq:
+ description:
+ - Match only packets not on a given port number.
+ type: str
+ range:
+ description:
+ - Match only packets in the range of port numbers
+ type: dict
+ suboptions:
+ start:
+ description:
+ - Specify the start of the port range
+ type: str
+ end:
+ description:
+ - Specify the end of the port range
+ type: str
+ protocol:
+ description:
+ - Specify the protocol to match.
+ - Refer to vendor documentation for valid values.
+ type: str
+ protocol_options:
+ description:
+ - Additional suboptions for the protocol.
+ type: dict
+ suboptions:
+ icmpv6:
+ description: Internet Control Message Protocol settings for IPv6.
+ type: dict
+ suboptions:
+ address_unreachable:
+ description: Address Unreachable
+ type: bool
+ administratively_prohibited:
+ description: Administratively Prohibited
+ type: bool
+ beyond_scope_of_source_address:
+ description: Administratively Prohibited
+ type: bool
+ destination_unreachable:
+ description: Destination Unreachable
+ type: bool
+ echo:
+ description: Echo
+ type: bool
+ echo_reply:
+ description: Echo Reply
+ type: bool
+ erroneous_header_field:
+ description: Erroneous Header Field
+ type: bool
+ group_membership_query:
+ description: Group Membership Query
+ type: bool
+ group_membership_report:
+ description: Group Membership Report
+ type: bool
+ group_membership_termination:
+ description: Group Membership Termination
+ type: bool
+ host_unreachable:
+ description: Host Unreachable
+ type: bool
+ nd_na:
+ description: Neighbor Discovery - Neighbor Advertisement
+ type: bool
+ nd_ns:
+ description: Neighbor Discovery - Neighbor Solicitation
+ type: bool
+ neighbor_redirect:
+ description: Neighbor Redirect
+ type: bool
+ no_route_to_destination:
+ description: No Route To Destination
+ type: bool
+ node_information_request_is_refused:
+ description: Node Information Request Is Refused
+ type: bool
+ node_information_successful_reply:
+ description: Node Information Successful Reply
+ type: bool
+ packet_too_big:
+ description: Packet Too Big
+ type: bool
+ parameter_problem:
+ description: Parameter Problem
+ type: bool
+ port_unreachable:
+ description: Port Unreachable
+ type: bool
+ query_subject_is_IPv4address:
+ description: Query Subject Is IPv4 address
+ type: bool
+ query_subject_is_IPv6address:
+ description: Query Subject Is IPv6 address
+ type: bool
+ query_subject_is_domainname:
+ description: Query Subject Is Domain name
+ type: bool
+ reassembly_timeout:
+ description: Reassembly Timeout
+ type: bool
+ redirect:
+ description: Redirect
+ type: bool
+ router_advertisement:
+ description: Router Advertisement
+ type: bool
+ router_renumbering:
+ description: Router Renumbering
+ type: bool
+ router_solicitation:
+ description: Router Solicitation
+ type: bool
+ rr_command:
+ description: RR Command
+ type: bool
+ rr_result:
+ description: RR Result
+ type: bool
+ rr_seqnum_reset:
+ description: RR Seqnum Reset
+ type: bool
+ time_exceeded:
+ description: Time Exceeded
+ type: bool
+ ttl_exceeded:
+ description: TTL Exceeded
+ type: bool
+ unknown_query_type:
+ description: Unknown Query Type
+ type: bool
+ unreachable:
+ description: Unreachable
+ type: bool
+ unrecognized_next_header:
+ description: Unrecognized Next Header
+ type: bool
+ unrecognized_option:
+ description: Unrecognized Option
+ type: bool
+ whoareyou_reply:
+ description: Whoareyou Reply
+ type: bool
+ whoareyou_request:
+ description: Whoareyou Request
+ type: bool
+ icmp:
+ description: Internet Control Message Protocol settings.
+ type: dict
+ suboptions:
+ administratively_prohibited:
+ description: Administratively prohibited
+ type: bool
+ alternate_address:
+ description: Alternate address
+ type: bool
+ conversion_error:
+ description: Datagram conversion
+ type: bool
+ dod_host_prohibited:
+ description: Host prohibited
+ type: bool
+ dod_net_prohibited:
+ description: Net prohibited
+ type: bool
+ echo:
+ description: Echo (ping)
+ type: bool
+ echo_reply:
+ description: Echo reply
+ type: bool
+ general_parameter_problem:
+ description: Parameter problem
+ type: bool
+ host_isolated:
+ description: Host isolated
+ type: bool
+ host_precedence_unreachable:
+ description: Host unreachable for precedence
+ type: bool
+ host_redirect:
+ description: Host redirect
+ type: bool
+ host_tos_redirect:
+ description: Host redirect for TOS
+ type: bool
+ host_tos_unreachable:
+ description: Host unreachable for TOS
+ type: bool
+ host_unknown:
+ description: Host unknown
+ type: bool
+ host_unreachable:
+ description: Host unreachable
+ type: bool
+ information_reply:
+ description: Information replies
+ type: bool
+ information_request:
+ description: Information requests
+ type: bool
+ mask_reply:
+ description: Mask replies
+ type: bool
+ mask_request:
+ description: Mask requests
+ type: bool
+ mobile_redirect:
+ description: Mobile host redirect
+ type: bool
+ net_redirect:
+ description: Network redirect
+ type: bool
+ net_tos_redirect:
+ description: Net redirect for TOS
+ type: bool
+ net_tos_unreachable:
+ description: Network unreachable for TOS
+ type: bool
+ net_unreachable:
+ description: Net unreachable
+ type: bool
+ network_unknown:
+ description: Network unknown
+ type: bool
+ no_room_for_option:
+ description: Parameter required but no room
+ type: bool
+ option_missing:
+ description: Parameter required but not present
+ type: bool
+ packet_too_big:
+ description: Fragmentation needed and DF set
+ type: bool
+ parameter_problem:
+ description: All parameter problems
+ type: bool
+ port_unreachable:
+ description: Port unreachable
+ type: bool
+ precedence_unreachable:
+ description: Precedence cutoff
+ type: bool
+ protocol_unreachable:
+ description: Protocol unreachable
+ type: bool
+ reassembly_timeout:
+ description: Reassembly timeout
+ type: bool
+ redirect:
+ description: All redirects
+ type: bool
+ router_advertisement:
+ description: Router discovery advertisements
+ type: bool
+ router_solicitation:
+ description: Router discovery solicitations
+ type: bool
+ source_quench:
+ description: Source quenches
+ type: bool
+ source_route_failed:
+ description: Source route failed
+ type: bool
+ time_exceeded:
+ description: All time exceededs
+ type: bool
+ timestamp_reply:
+ description: Timestamp replies
+ type: bool
+ timestamp_request:
+ description: Timestamp requests
+ type: bool
+ traceroute:
+ description: Traceroute
+ type: bool
+ ttl_exceeded:
+ description: TTL exceeded
+ type: bool
+ unreachable:
+ description: All unreachables
+ type: bool
+ tcp:
+ description: Match TCP packet flags
+ type: dict
+ suboptions:
+ ack:
+ description: Match on the ACK bit
+ type: bool
+ established:
+ description: Match established connections
+ type: bool
+ fin:
+ description: Match on the FIN bit
+ type: bool
+ psh:
+ description: Match on the PSH bit
+ type: bool
+ rst:
+ description: Match on the RST bit
+ type: bool
+ syn:
+ description: Match on the SYN bit
+ type: bool
+ urg:
+ description: Match on the URG bit
+ type: bool
+ igmp:
+ description: Internet Group Management Protocol (IGMP) settings.
+ type: dict
+ suboptions:
+ dvmrp:
+ description: Match Distance Vector Multicast Routing Protocol
+ type: bool
+ host_query:
+ description: Match Host Query
+ type: bool
+ host_report:
+ description: Match Host Report
+ type: bool
+ pim:
+ description: Match Protocol Independent Multicast
+ type: bool
+ trace:
+ description: Multicast trace
+ type: bool
+ mtrace:
+ description: Match mtrace
+ type: bool
+ mtrace_response:
+ description: Match mtrace response
+ type: bool
+ dscp:
+ description:
+ - Match packets with given DSCP value.
+ type: dict
+ suboptions:
+ eq:
+ description: Match only packets on a given dscp value
+ type: str
+ gt:
+ description: Match only packets with a greater dscp value
+ type: str
+ lt:
+ description: Match only packets with a lower dscp value
+ type: str
+ neq:
+ description: Match only packets not on a given dscp value
+ type: str
+ range:
+ description: Match only packets in the range of dscp values
+ type: dict
+ suboptions:
+ start:
+ description: Start of the dscp range
+ type: str
+ end:
+ description: End of the dscp range
+ type: str
+ fragments:
+ description:
+ - Check non-intial fragments.
+ type: bool
+ packet_length:
+ description:
+ - Match packets given packet length.
+ type: dict
+ suboptions:
+ eq:
+ description: Match only packets on a given packet length
+ type: int
+ gt:
+ description: Match only packets with a greater packet length
+ type: int
+ lt:
+ description: Match only packets with a lower packet length
+ type: int
+ neq:
+ description: Match only packets not on a given packet length
+ type: int
+ range:
+ description: Match only packets in the range of packet lengths
+ type: dict
+ suboptions:
+ start:
+ description: Start of the packet length range
+ type: int
+ end:
+ description: End of the packet length range
+ type: int
+ precedence:
+ description: Match packets with given precedence value
+ type: str
+ ttl:
+ description: Match against specified TTL value.
+ type: dict
+ suboptions:
+ eq:
+ description: Match only packets with exact TTL value.
+ type: int
+ gt:
+ description: Match only packets with a greater TTL value.
+ type: int
+ lt:
+ description: Match only packets with a lower TTL value.
+ type: int
+ neq:
+ description: Match only packets that won't have the given TTL
+ value.
+ type: int
+ range:
+ description: Match only packets in the range of given TTL values.
+ type: dict
+ suboptions:
+ start:
+ description: Start of the TTL range.
+ type: int
+ end:
+ description: End of the TTL range.
+ type: int
+ log:
+ description:
+ - Enable/disable log matches against this entry.
+ type: bool
+ log_input:
+ description:
+ - Enable/disable log matches against this entry, including input interface.
+ type: bool
+ icmp_off:
+ description:
+ - Enable/disable the ICMP message for this entry.
+ type: bool
+ capture:
+ description:
+ - Capture matched packet.
+ type: bool
+ destopts:
+ description:
+ - Match if destination opts header is present.
+ type: bool
+ authen:
+ description:
+ - Match if authentication header is present.
+ type: bool
+ routing:
+ description:
+ - Match if routing header is present.
+ type: bool
+ hop_by_hop:
+ description:
+ - Match if hop-by-hop opts header is present.
+ type: bool
+ running_config:
+ description:
+ - The module, by default, will connect to the remote device and retrieve the current
+ running-config to use as a base for comparing against the contents of source.
+ There are times when it is not desirable to have the task get the current running-config
+ for every task in a playbook. The I(running_config) argument allows the implementer
+ to pass in the configuration to use as the base config for comparison. This
+ value of this option should be the output received from device by executing
+ command B(show running-config router static).
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged to add new ACLs
+
+# Before state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 05:07:45.767 UTC
+# RP/0/RP0/CPU0:ios#
+
+- name: Merge the provided configuration with the exisiting running configuration
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv6
+ acls:
+ - name: acl6_1
+ aces:
+ - sequence: 10
+ grant: deny
+ protocol: tcp
+ source:
+ prefix: 2001:db8:1234::/48
+ port_protocol:
+ range:
+ start: ftp
+ end: telnet
+ destination:
+ any: true
+ protocol_options:
+ tcp:
+ syn: true
+ ttl:
+ range:
+ start: 180
+ end: 250
+ routing: true
+ authen: true
+ log: true
+
+ - sequence: 20
+ grant: permit
+ protocol: icmpv6
+ source:
+ any: true
+ destination:
+ any: true
+ protocol_options:
+ icmpv6:
+ router_advertisement: true
+ precedence: network
+ destopts: true
+
+ - afi: ipv4
+ acls:
+ - name: acl_1
+ aces:
+ - sequence: 16
+ remark: TEST_ACL_1_REMARK
+
+ - sequence: 21
+ grant: permit
+ protocol: tcp
+ source:
+ host: 192.0.2.10
+ port_protocol:
+ range:
+ start: pop3
+ end: 121
+ destination:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.15
+ protocol_options:
+ tcp:
+ rst: true
+
+ - sequence: 23
+ grant: deny
+ protocol: icmp
+ source:
+ any: true
+ destination:
+ prefix: 198.51.100.0/28
+ protocol_options:
+ icmp:
+ reassembly_timeout: true
+ dscp:
+ lt: af12
+
+ - name: acl_2
+ aces:
+ - sequence: 10
+ remark: TEST_ACL_2_REMARK
+ state: merged
+
+# After state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 05:22:57.021 UTC
+# ipv4 access-list acl_1
+# 16 remark TEST_ACL_1_REMARK
+# 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+# 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+# ipv4 access-list acl_2
+# 10 remark TEST_ACL_2_REMARK
+# ipv6 access-list acl6_1
+# 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+# 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+# Using merged to update existing ACLs
+
+# Before state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 05:22:57.021 UTC
+# ipv4 access-list acl_1
+# 16 remark TEST_ACL_1_REMARK
+# 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+# 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+# ipv4 access-list acl_2
+# 10 remark TEST_ACL_2_REMARK
+# ipv6 access-list acl6_1
+# 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+# 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+- name: Update existing ACEs
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: acl_1
+ aces:
+ - sequence: 21
+ source:
+ prefix: 198.51.100.32/28
+ port_protocol:
+ range:
+ start: pop3
+ end: 121
+ protocol_options:
+ tcp:
+ syn: true
+
+ - sequence: 23
+ protocol_options:
+ icmp:
+ router_advertisement: true
+ dscp:
+ eq: af23
+
+# After state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 05:47:18.711 UTC
+# ipv4 access-list acl_1
+# 16 remark TEST_ACL_1_REMARK
+# 21 permit tcp 198.51.100.32 0.0.0.15 range pop3 121 198.51.100.0 0.0.0.15 syn
+# 23 deny icmp any 198.51.100.0 0.0.0.15 router-advertisement dscp eq af23
+# ipv4 access-list acl_2
+# 10 remark TEST_ACL_2_REMARK
+# ipv6 access-list acl6_1
+# 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+# 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+# Using replaced to replace a whole ACL
+
+# Before state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 05:22:57.021 UTC
+# ipv4 access-list acl_1
+# 16 remark TEST_ACL_1_REMARK
+# 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+# 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+# ipv4 access-list acl_2
+# 10 remark TEST_ACL_2_REMARK
+# ipv6 access-list acl6_1
+# 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+# 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+- name: Replace device configurations of listed ACL with provided configurations
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: acl_2
+ aces:
+ - sequence: 11
+ grant: permit
+ protocol: igmp
+ source:
+ host: 198.51.100.130
+ destination:
+ any: true
+ ttl:
+ eq: 100
+
+ - sequence: 12
+ grant: deny
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: icmp
+ state: replaced
+
+# After state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 06:19:51.496 UTC
+# ipv4 access-list acl_1
+# 16 remark TEST_ACL_1_REMARK
+# 21 permit tcp 198.51.100.32 0.0.0.15 range pop3 121 198.51.100.0 0.0.0.15 syn
+# 23 deny icmp any 198.51.100.0 0.0.0.15 router-advertisement dscp eq af23
+# ipv4 access-list acl_2
+# 11 permit igmp host 198.51.100.130 any ttl eq 100
+# 12 deny icmp any any
+# ipv6 access-list acl6_1
+# 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+# 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+# Using overridden to override all ACLs in the device
+
+# Before state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 05:22:57.021 UTC
+# ipv4 access-list acl_1
+# 16 remark TEST_ACL_1_REMARK
+# 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+# 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+# ipv4 access-list acl_2
+# 10 remark TEST_ACL_2_REMARK
+# ipv6 access-list acl6_1
+# 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+# 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+- name: Overridde all ACLs configuration with provided configuration
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: acl_1
+ aces:
+ - sequence: 10
+ grant: permit
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: tcp
+
+ - name: acl_2
+ aces:
+ - sequence: 20
+ grant: permit
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: igmp
+ state: overridden
+
+# After state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 06:31:22.178 UTC
+# ipv4 access-list acl_1
+# 10 permit tcp any any
+# ipv4 access-list acl_2
+# 20 permit igmp any any
+
+# Using deleted to delete an entire ACL
+
+# Before state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 05:22:57.021 UTC
+# ipv4 access-list acl_1
+# 16 remark TEST_ACL_1_REMARK
+# 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+# 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+# ipv4 access-list acl_2
+# 10 remark TEST_ACL_2_REMARK
+# ipv6 access-list acl6_1
+# 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+# 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+- name: Delete a single ACL
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv6
+ acls:
+ - name: acl6_1
+ state: deleted
+
+# After state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 05:22:57.021 UTC
+# ipv4 access-list acl_1
+# 16 remark TEST_ACL_1_REMARK
+# 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+# 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+# ipv4 access-list acl_2
+# 10 remark TEST_ACL_2_REMARK
+
+# Using deleted to delete all ACLs under one AFI
+
+# Before state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 05:22:57.021 UTC
+# ipv4 access-list acl_1
+# 16 remark TEST_ACL_1_REMARK
+# 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+# 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+# ipv4 access-list acl_2
+# 10 remark TEST_ACL_2_REMARK
+# ipv6 access-list acl6_1
+# 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+# 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+- name: Delete all ACLs under one AFI
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv4
+ state: deleted
+
+# After state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 05:22:57.021 UTC
+# ipv6 access-list acl6_1
+# 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+# 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+# Using deleted to delete all ACLs from the device
+
+# Before state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 05:22:57.021 UTC
+# ipv4 access-list acl_1
+# 16 remark TEST_ACL_1_REMARK
+# 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+# 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+# ipv4 access-list acl_2
+# 10 remark TEST_ACL_2_REMARK
+# ipv6 access-list acl6_1
+# 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+# 20 permit icmpv6 any any router-advertisement precedence network destopts
+
+- name: Delete all ACLs from the device
+ cisco.iosxr.iosxr_acls:
+ state: deleted
+
+# After state:
+# -------------
+
+# RP/0/RP0/CPU0:ios#sh access-lists afi-all
+# Thu Feb 20 05:07:45.767 UTC
+# RP/0/RP0/CPU0:ios#
+
+# Using gathered to gather ACL facts from the device
+
+- name: Gather ACL interfaces facts using gathered state
+ cisco.iosxr.iosxr_acls:
+ state: gathered
+
+# Task Output (redacted)
+# -----------------------
+#
+
+# "gathered": [
+# {
+# "acls": [
+# {
+# "aces": [
+# {
+# "remark": "TEST_ACL_1_REMARK",
+# "sequence": 16
+# },
+# {
+# "destination": {
+# "address": "198.51.100.0",
+# "wildcard_bits": "0.0.0.15"
+# },
+# "grant": "permit",
+# "protocol": "tcp",
+# "protocol_options": {
+# "tcp": {
+# "rst": true
+# }
+# },
+# "sequence": 21,
+# "source": {
+# "host": "192.0.2.10",
+# "port_protocol": {
+# "range": {
+# "end": "121",
+# "start": "pop3"
+# }
+# }
+# }
+# },
+# {
+# "destination": {
+# "address": "198.51.100.0",
+# "wildcard_bits": "0.0.0.15"
+# },
+# "dscp": {
+# "lt": "af12"
+# },
+# "grant": "deny",
+# "protocol": "icmp",
+# "protocol_options": {
+# "icmp": {
+# "reassembly_timeout": true
+# }
+# },
+# "sequence": 23,
+# "source": {
+# "any": true
+# }
+# }
+# ],
+# "name": "acl_1"
+# },
+# {
+# "aces": [
+# {
+# "remark": "TEST_ACL_2_REMARK",
+# "sequence": 10
+# }
+# ],
+# "name": "acl_2"
+# }
+# ],
+# "afi": "ipv4"
+# },
+# {
+# "acls": [
+# {
+# "aces": [
+# {
+# "authen": true,
+# "destination": {
+# "any": true
+# },
+# "grant": "deny",
+# "log": true,
+# "protocol": "tcp",
+# "protocol_options": {
+# "tcp": {
+# "syn": true
+# }
+# },
+# "routing": true,
+# "sequence": 10,
+# "source": {
+# "port_protocol": {
+# "range": {
+# "end": "telnet",
+# "start": "ftp"
+# }
+# },
+# "prefix": "2001:db8:1234::/48"
+# },
+# "ttl": {
+# "range": {
+# "end": 250,
+# "start": 180
+# }
+# }
+# },
+# {
+# "destination": {
+# "any": true
+# },
+# "destopts": true,
+# "grant": "permit",
+# "precedence": "network",
+# "protocol": "icmpv6",
+# "protocol_options": {
+# "icmpv6": {
+# "router_advertisement": true
+# }
+# },
+# "sequence": 20,
+# "source": {
+# "any": true
+# }
+# }
+# ],
+# "name": "acl6_1"
+# }
+# ],
+# "afi": "ipv6"
+# }
+# ]
+
+# Using rendered
+
+- name: Render platform specific commands (without connecting to the device)
+ cisco.iosxr.iosxr_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: acl_2
+ aces:
+ - sequence: 11
+ grant: permit
+ protocol: igmp
+ source:
+ host: 198.51.100.130
+ destination:
+ any: true
+ ttl:
+ eq: 100
+
+ - sequence: 12
+ grant: deny
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: icmp
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+
+# "rendered": [
+# "ipv4 access-list acl_2",
+# "11 permit igmp host 198.51.100.130 any ttl eq 100",
+# "12 deny icmp any any"
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+#
+# ipv4 access-list acl_1
+# 10 remark TEST_ACL_2_REMARK
+# ipv4 access-list acl_2
+# 11 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 authen routing log
+# 21 permit icmpv6 any any router-advertisement precedence network packet-length eq 576 destopts
+# ipv6 access-list acl6_1
+# 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+# 20 permit icmpv6 any any router-advertisement precedence network packet-length eq 576 destopts
+
+- name: Parse externally provided ACL config to agnostic model
+ cisco.iosxr.iosxr_acls:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Task Output (redacted)
+# -----------------------
+# "parsed": [
+# {
+# "acls": [
+# {
+# "aces": [
+# {
+# "remark": "TEST_ACL_2_REMARK",
+# "sequence": 10
+# }
+# ],
+# "name": "acl_1"
+# },
+# {
+# "aces": [
+# {
+# "authen": true,
+# "destination": {
+# "any": true
+# },
+# "grant": "deny",
+# "log": true,
+# "protocol": "tcp",
+# "protocol_options": {
+# "tcp": {
+# "syn": true
+# }
+# },
+# "routing": true,
+# "sequence": 11,
+# "source": {
+# "port_protocol": {
+# "range": {
+# "end": "telnet",
+# "start": "ftp"
+# }
+# },
+# "prefix": "2001:db8:1234::/48"
+# },
+# "ttl": {
+# "range": {
+# "end": 250,
+# "start": 180
+# }
+# }
+# },
+# {
+# "destination": {
+# "any": true
+# },
+# "destopts": true,
+# "grant": "permit",
+# "packet_length": {
+# "eq": 576
+# },
+# "precedence": "network",
+# "protocol": "icmpv6",
+# "protocol_options": {
+# "icmpv6": {
+# "router_advertisement": true
+# }
+# },
+# "sequence": 21,
+# "source": {
+# "any": true
+# }
+# }
+# ],
+# "name": "acl_2"
+# }
+# ],
+# "afi": "ipv4"
+# },
+# {
+# "acls": [
+# {
+# "aces": [
+# {
+# "authen": true,
+# "destination": {
+# "any": true
+# },
+# "grant": "deny",
+# "log": true,
+# "protocol": "tcp",
+# "protocol_options": {
+# "tcp": {
+# "syn": true
+# }
+# },
+# "routing": true,
+# "sequence": 10,
+# "source": {
+# "port_protocol": {
+# "range": {
+# "end": "telnet",
+# "start": "ftp"
+# }
+# },
+# "prefix": "2001:db8:1234::/48"
+# },
+# "ttl": {
+# "range": {
+# "end": 250,
+# "start": 180
+# }
+# }
+# },
+# {
+# "destination": {
+# "any": true
+# },
+# "destopts": true,
+# "grant": "permit",
+# "packet_length": {
+# "eq": 576
+# },
+# "precedence": "network",
+# "protocol": "icmpv6",
+# "protocol_options": {
+# "icmpv6": {
+# "router_advertisement": true
+# }
+# },
+# "sequence": 20,
+# "source": {
+# "any": true
+# }
+# }
+# ],
+# "name": "acl6_1"
+# }
+# ],
+# "afi": "ipv6"
+# }
+# ]
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample:
+ - ipv6 access-list acl6_1
+ - 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 authen routing log
+ - 20 permit icmpv6 any any router-advertisement precedence network destopts
+ - ipv4 access-list acl_1
+ - 16 remark TEST_ACL_1_REMARK
+ - 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+ - 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.acls.acls import (
+ AclsArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.acls.acls import (
+ Acls,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+
+ module = AnsibleModule(
+ argument_spec=AclsArgs.argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+
+ result = Acls(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_banner.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_banner.py
new file mode 100644
index 00000000..be75ecaf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_banner.py
@@ -0,0 +1,316 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_banner
+author:
+- Trishna Guha (@trishnaguha)
+- Kedar Kekan (@kedarX)
+short_description: Manage multiline banners on Cisco IOS XR devices
+description:
+- This module will configure both exec and motd banners on remote device running Cisco
+ IOS XR. It allows playbooks to add or remove banner text from the running configuration.
+version_added: 1.0.0
+requirements:
+- ncclient >= 0.5.3 when using netconf
+- lxml >= 4.1.1 when using netconf
+extends_documentation_fragment:
+- cisco.iosxr.iosxr
+notes:
+- Tested against IOS XRv 6.1.3.
+- This module works with connection C(network_cli) and C(netconf). See L(the IOS-XR
+ Platform Options,../network/user_guide/platform_iosxr.html).
+options:
+ banner:
+ description:
+ - Specifies the type of banner to configure on remote device.
+ required: true
+ type: str
+ choices:
+ - login
+ - motd
+ text:
+ description:
+ - Banner text to be configured. Accepts multi line string, without empty lines.
+ When using a multi line string, the first and last characters must be the
+ start and end delimiters for the banner
+ Requires I(state=present).
+ type: str
+ state:
+ description:
+ - Existential state of the configuration on the device.
+ default: present
+ type: str
+ choices:
+ - present
+ - absent
+"""
+
+EXAMPLES = """
+- name: configure the login banner
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ text: |
+ @this is my login banner
+ that contains a multiline
+ string@
+ state: present
+- name: remove the motd banner
+ cisco.iosxr.iosxr_banner:
+ banner: motd
+ state: absent
+- name: Configure banner from file
+ cisco.iosxr.iosxr_banner:
+ banner: motd
+ text: "{{ lookup('file', './config_partial/raw_banner.cfg') }}"
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands sent to device with transport C(cli)
+ returned: always (empty list when no commands to send)
+ type: list
+ sample:
+ - banner login
+ - "@this is my login banner"
+ - that contains a multiline
+ - string@
+
+xml:
+ description: NetConf rpc xml sent to device with transport C(netconf)
+ returned: always (empty list when no xml rpc to send)
+ type: list
+ sample:
+ - '<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <banners xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg">
+ <banner xc:operation="merge">
+ <banner-name>motd</banner-name>
+ <banner-text>Ansible banner example</banner-text>
+ </banner>
+ </banners>
+ </config>'
+"""
+
+import re
+import collections
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ iosxr_argument_spec,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ build_xml,
+ is_cliconf,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ etree_find,
+ is_netconf,
+)
+
+
+class ConfigBase(object):
+ def __init__(self, module):
+ self._module = module
+ self._result = {"changed": False, "warnings": []}
+ self._want = {}
+ self._have = {}
+
+ def map_params_to_obj(self):
+ text = self._module.params["text"]
+ if text:
+ text = "{0}".format(str(text).strip())
+ self._want.update(
+ {
+ "banner": self._module.params["banner"],
+ "text": text,
+ "state": self._module.params["state"],
+ }
+ )
+
+
+class CliConfiguration(ConfigBase):
+ def __init__(self, module):
+ super(CliConfiguration, self).__init__(module)
+
+ def map_obj_to_commands(self):
+ commands = list()
+ state = self._module.params["state"]
+ if state == "absent":
+ if self._have.get("state") != "absent" and (
+ "text" in self._have.keys() and self._have["text"]
+ ):
+ commands.append(
+ "no banner {0!s}".format(self._module.params["banner"])
+ )
+ elif state == "present":
+ if self._want["text"] and self._want["text"].encode().decode(
+ "unicode_escape"
+ ) != self._have.get("text"):
+ banner_cmd = "banner {0!s} ".format(
+ self._module.params["banner"]
+ )
+ banner_cmd += self._want["text"].strip()
+ commands.append(banner_cmd)
+ self._result["commands"] = commands
+ if commands:
+ commit = not self._module.check_mode
+ diff = load_config(self._module, commands, commit=commit)
+ if diff:
+ self._result["diff"] = dict(prepared=diff)
+ self._result["changed"] = True
+
+ def map_config_to_obj(self):
+ cli_filter = "banner {0!s}".format(self._module.params["banner"])
+ output = get_config(self._module, config_filter=cli_filter)
+ match = re.search(r"banner (\S+) (.*)", output, re.DOTALL)
+ if match:
+ text = match.group(2)
+ else:
+ text = None
+ obj = {"banner": self._module.params["banner"], "state": "absent"}
+ if output:
+ obj["text"] = text
+ obj["state"] = "present"
+ self._have.update(obj)
+
+ def run(self):
+ self.map_params_to_obj()
+ self.map_config_to_obj()
+ self.map_obj_to_commands()
+
+ return self._result
+
+
+class NCConfiguration(ConfigBase):
+ def __init__(self, module):
+ super(NCConfiguration, self).__init__(module)
+ self._banners_meta = collections.OrderedDict()
+ self._banners_meta.update(
+ [
+ (
+ "banner",
+ {
+ "xpath": "banners/banner",
+ "tag": True,
+ "attrib": "operation",
+ },
+ ),
+ ("a:banner", {"xpath": "banner/banner-name"}),
+ (
+ "a:text",
+ {"xpath": "banner/banner-text", "operation": "edit"},
+ ),
+ ]
+ )
+
+ def map_obj_to_xml_rpc(self):
+ state = self._module.params["state"]
+ _get_filter = build_xml(
+ "banners",
+ xmap=self._banners_meta,
+ params=self._module.params,
+ opcode="filter",
+ )
+
+ running = get_config(
+ self._module, source="running", config_filter=_get_filter
+ )
+
+ banner_name = None
+ banner_text = None
+ if etree_find(running, "banner-text") is not None:
+ banner_name = etree_find(running, "banner-name").text
+ banner_text = etree_find(running, "banner-text").text
+
+ opcode = None
+ if (
+ state == "absent"
+ and banner_name == self._module.params["banner"]
+ and len(banner_text)
+ ):
+ opcode = "delete"
+ elif state == "present":
+ opcode = "merge"
+
+ self._result["xml"] = []
+ if opcode:
+ _edit_filter = build_xml(
+ "banners",
+ xmap=self._banners_meta,
+ params=self._module.params,
+ opcode=opcode,
+ )
+
+ if _edit_filter is not None:
+ commit = not self._module.check_mode
+ diff = load_config(
+ self._module,
+ _edit_filter,
+ commit=commit,
+ running=running,
+ nc_get_filter=_get_filter,
+ )
+
+ if diff:
+ self._result["xml"] = _edit_filter
+ if self._module._diff:
+ self._result["diff"] = dict(prepared=diff)
+
+ self._result["changed"] = True
+
+ def run(self):
+ self.map_params_to_obj()
+ self.map_obj_to_xml_rpc()
+
+ return self._result
+
+
+def main():
+ """ main entry point for module execution
+ """
+ argument_spec = dict(
+ banner=dict(required=True, choices=["login", "motd"]),
+ text=dict(),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+
+ argument_spec.update(iosxr_argument_spec)
+
+ required_if = [("state", "present", ("text",))]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+
+ config_object = None
+ if is_cliconf(module):
+ # Commenting the below cliconf deprecation support call for Ansible 2.9 as it'll be continued to be supported
+ # module.deprecate("cli support for 'iosxr_interface' is deprecated. Use transport netconf instead",
+ # version='2.9')
+ config_object = CliConfiguration(module)
+ elif is_netconf(module):
+ config_object = NCConfiguration(module)
+
+ result = None
+ if config_object is not None:
+ result = config_object.run()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_bgp.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_bgp.py
new file mode 100644
index 00000000..7e496545
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_bgp.py
@@ -0,0 +1,355 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_bgp
+author: Nilashish Chakraborty (@NilashishC)
+short_description: Configure global BGP protocol settings on Cisco IOS-XR
+description:
+- This module provides configuration management of global BGP parameters on devices
+ running Cisco IOS-XR
+version_added: 1.0.0
+notes:
+- Tested against Cisco IOS XR Software Version 6.1.3
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+options:
+ config:
+ description:
+ - Specifies the BGP related configuration.
+ type: dict
+ suboptions:
+ bgp_as:
+ description:
+ - Specifies the BGP Autonomous System (AS) number to configure on the device.
+ type: int
+ required: true
+ router_id:
+ description:
+ - Configures the BGP routing process router-id value.
+ type: str
+ log_neighbor_changes:
+ description:
+ - Enable/disable logging neighbor up/down and reset reason.
+ type: bool
+ neighbors:
+ description:
+ - Specifies BGP neighbor related configurations.
+ type: list
+ elements: dict
+ suboptions:
+ neighbor:
+ description:
+ - Neighbor router address.
+ type: str
+ required: true
+ remote_as:
+ description:
+ - Remote AS of the BGP neighbor to configure.
+ type: int
+ required: true
+ update_source:
+ description:
+ - Source of the routing updates.
+ type: str
+ password:
+ description:
+ - Password to authenticate the BGP peer connection.
+ type: str
+ enabled:
+ description:
+ - Administratively shutdown or enable a neighbor.
+ type: bool
+ description:
+ description:
+ - Neighbor specific description.
+ type: str
+ advertisement_interval:
+ description:
+ - Specifies the minimum interval (in seconds) between sending BGP routing
+ updates.
+ - The range is from 0 to 600.
+ type: int
+ tcp_mss:
+ description:
+ - Specifies the TCP initial maximum segment size to use.
+ - The range is from 68 to 10000.
+ type: int
+ ebgp_multihop:
+ description:
+ - Specifies the maximum hop count for EBGP neighbors not on directly connected
+ networks.
+ - The range is from 0 to 255.
+ type: int
+ timers:
+ description:
+ - Specifies BGP neighbor timer related configurations.
+ type: dict
+ suboptions:
+ keepalive:
+ description:
+ - Frequency with which the Cisco IOS-XR software sends keepalive messages
+ to its peer.
+ - The range is from 0 to 65535.
+ type: int
+ holdtime:
+ description:
+ - Interval after not receiving a keepalive message that the software
+ declares a peer dead.
+ - The range is from 3 to 65535.
+ type: int
+ min_neighbor_holdtime:
+ description:
+ - Interval specifying the minimum acceptable hold-time from a BGP
+ neighbor.
+ - The minimum acceptable hold-time must be less than, or equal to,
+ the interval specified in the holdtime argument.
+ - The range is from 3 to 65535.
+ type: int
+ address_family:
+ description:
+ - Specifies BGP address family related configurations.
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description:
+ - Type of address family to configure.
+ choices:
+ - ipv4
+ - ipv6
+ required: true
+ type: str
+ safi:
+ description:
+ - Specifies the type of cast for the address family.
+ choices:
+ - flowspec
+ - unicast
+ - multicast
+ - labeled-unicast
+ type: str
+ default: unicast
+ redistribute:
+ description:
+ - Specifies the redistribute information from another routing protocol.
+ type: list
+ elements: dict
+ suboptions:
+ protocol:
+ description:
+ - Specifies the protocol for configuring redistribute information.
+ type: str
+ choices:
+ - ospf
+ - ospfv3
+ - eigrp
+ - isis
+ - static
+ - connected
+ - lisp
+ - mobile
+ - rip
+ - subscriber
+ required: true
+ id:
+ description:
+ - Identifier for the routing protocol for configuring redistribute
+ information.
+ - Valid for protocols 'ospf', 'eigrp', 'isis' and 'ospfv3'.
+ type: str
+ metric:
+ description:
+ - Specifies the metric for redistributed routes.
+ type: int
+ route_map:
+ description:
+ - Specifies the route map reference.
+ type: str
+ networks:
+ description:
+ - Specify networks to announce via BGP.
+ - For operation replace, this option is mutually exclusive with root level
+ networks option.
+ type: list
+ elements: dict
+ suboptions:
+ network:
+ description:
+ - Network ID to announce via BGP.
+ required: true
+ aliases:
+ - prefix
+ type: str
+ masklen:
+ description:
+ - Subnet mask length for the network to announce(e.g, 8, 16, 24, etc.).
+ type: int
+ required: true
+ route_map:
+ description:
+ - Route map to modify the attributes.
+ type: str
+ operation:
+ description:
+ - Specifies the operation to be performed on the BGP process configured on the
+ device.
+ - In case of merge, the input configuration will be merged with the existing BGP
+ configuration on the device.
+ - In case of replace, if there is a diff between the existing configuration and
+ the input configuration, the existing configuration will be replaced by the
+ input configuration for every option that has the diff.
+ - In case of override, all the existing BGP configuration will be removed from
+ the device and replaced with the input configuration.
+ - In case of delete the existing BGP configuration will be removed from the device.
+ default: merge
+ type: str
+ choices:
+ - merge
+ - replace
+ - override
+ - delete
+"""
+
+EXAMPLES = """
+- name: configure global bgp as 65000
+ cisco.iosxr.iosxr_bgp:
+ bgp_as: 65000
+ router_id: 1.1.1.1
+ neighbors:
+ - neighbor: 182.168.10.1
+ remote_as: 500
+ description: PEER_1
+ - neighbor: 192.168.20.1
+ remote_as: 500
+ update_source: GigabitEthernet 0/0/0/0
+ address_family:
+ - name: ipv4
+ cast: unicast
+ networks:
+ - network: 192.168.2.0/23
+ - network: 10.0.0.0/8
+ redistribute:
+ - protocol: ospf
+ id: 400
+ metric: 110
+
+- name: remove bgp as 65000 from config
+ ios_bgp:
+ bgp_as: 65000
+ state: absent
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - router bgp 65000
+ - bgp router-id 1.1.1.1
+ - neighbor 182.168.10.1 remote-as 500
+ - neighbor 182.168.10.1 description PEER_1
+ - neighbor 192.168.20.1 remote-as 500
+ - neighbor 192.168.20.1 update-source GigabitEthernet0/0/0/0
+ - address-family ipv4 unicast
+ - redistribute ospf 400 metric 110
+ - network 192.168.2.0/23
+ - network 10.0.0.0/8
+ - exit
+"""
+from ansible.module_utils._text import to_text
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.providers.module import (
+ NetworkModule,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.providers.cli.config.bgp.process import (
+ REDISTRIBUTE_PROTOCOLS,
+)
+
+
+def main():
+ """ main entry point for module execution
+ """
+ network_spec = {
+ "network": dict(aliases=["prefix"], required=True),
+ "masklen": dict(type="int", required=True),
+ "route_map": dict(),
+ }
+
+ redistribute_spec = {
+ "protocol": dict(choices=REDISTRIBUTE_PROTOCOLS, required=True),
+ "id": dict(),
+ "metric": dict(type="int"),
+ "route_map": dict(),
+ }
+
+ timer_spec = {
+ "keepalive": dict(type="int"),
+ "holdtime": dict(type="int"),
+ "min_neighbor_holdtime": dict(type="int"),
+ }
+
+ neighbor_spec = {
+ "neighbor": dict(required=True),
+ "remote_as": dict(type="int", required=True),
+ "update_source": dict(),
+ "password": dict(no_log=True),
+ "enabled": dict(type="bool"),
+ "description": dict(),
+ "advertisement_interval": dict(type="int"),
+ "ebgp_multihop": dict(type="int"),
+ "tcp_mss": dict(type="int"),
+ "timers": dict(type="dict", options=timer_spec),
+ }
+
+ address_family_spec = {
+ "afi": dict(choices=["ipv4", "ipv6"], required=True),
+ "safi": dict(
+ choices=["flowspec", "labeled-unicast", "multicast", "unicast"],
+ default="unicast",
+ ),
+ "networks": dict(type="list", elements="dict", options=network_spec),
+ "redistribute": dict(
+ type="list", elements="dict", options=redistribute_spec
+ ),
+ }
+
+ config_spec = {
+ "bgp_as": dict(type="int", required=True),
+ "router_id": dict(),
+ "log_neighbor_changes": dict(type="bool"),
+ "neighbors": dict(type="list", elements="dict", options=neighbor_spec),
+ "address_family": dict(
+ type="list", elements="dict", options=address_family_spec
+ ),
+ }
+
+ argument_spec = {
+ "config": dict(type="dict", options=config_spec),
+ "operation": dict(
+ default="merge", choices=["merge", "replace", "override", "delete"]
+ ),
+ }
+
+ module = NetworkModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ try:
+ result = module.edit_config(config_filter="router bgp")
+ except Exception as exc:
+ module.fail_json(msg=to_text(exc))
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_command.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_command.py
new file mode 100644
index 00000000..68e990b1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_command.py
@@ -0,0 +1,213 @@
+#!/usr/bin/python
+#
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+module: iosxr_command
+author: Ricardo Carrillo Cruz (@rcarrillocruz)
+short_description: Run commands on remote devices running Cisco IOS XR
+description:
+- Sends arbitrary commands to an IOS XR node and returns the results read from the
+ device. This module includes an argument that will cause the module to wait for
+ a specific condition before returning or timing out if the condition is not met.
+- This module does not support running commands in configuration mode. Please use
+ M(iosxr_config) to configure iosxr devices.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.iosxr.iosxr
+notes:
+- Make sure the user has been authorized to execute commands terminal length 0, terminal
+ width 512 and terminal exec prompt no-timestamp.
+- This module works with C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+- This module does not support C(netconf) connection.
+- Tested against IOS XR 6.1.3
+options:
+ commands:
+ description:
+ - List of commands to send to the remote iosxr device over the configured provider.
+ The resulting output from the command is returned. If the I(wait_for) argument
+ is provided, the module is not returned until the condition is satisfied or
+ the number of retries has expired.
+ - If a command sent to the device requires answering a prompt, it is possible to pass
+ a dict containing command, answer and prompt. Common answers are 'y' or "\\r"
+ (carriage return, must be double quotes). See examples
+ type: list
+ elements: raw
+ required: true
+ wait_for:
+ description:
+ - List of conditions to evaluate against the output of the command. The task will
+ wait for each condition to be true before moving forward. If the conditional
+ is not true within the configured number of retries, the task fails. See examples.
+ aliases:
+ - waitfor
+ type: list
+ elements: str
+ match:
+ description:
+ - The I(match) argument is used in conjunction with the I(wait_for) argument to
+ specify the match policy. Valid values are C(all) or C(any). If the value
+ is set to C(all) then all conditionals in the wait_for must be satisfied. If
+ the value is set to C(any) then only one of the values must be satisfied.
+ default: all
+ choices:
+ - any
+ - all
+ type: str
+ retries:
+ description:
+ - Specifies the number of retries a command should by tried before it is considered
+ failed. The command is run on the target device every retry and evaluated against
+ the I(wait_for) conditions.
+ default: 10
+ type: int
+ interval:
+ description:
+ - Configures the interval in seconds to wait between retries of the command. If
+ the command does not pass the specified conditions, the interval indicates how
+ long to wait before trying the command again.
+ default: 1
+ type: int
+"""
+
+EXAMPLES = """
+- name: run show version on remote devices
+ cisco.iosxr.iosxr_command:
+ commands: show version
+
+- name: run show version and check to see if output contains iosxr
+ cisco.iosxr.iosxr_command:
+ commands: show version
+ wait_for: result[0] contains IOS-XR
+
+- name: run multiple commands on remote nodes
+ cisco.iosxr.iosxr_command:
+ commands:
+ - show version
+ - show interfaces
+ - {command: example command that prompts, prompt: expected prompt, answer: yes}
+
+- name: run multiple commands and evaluate the output
+ cisco.iosxr.iosxr_command:
+ commands:
+ - show version
+ - show interfaces
+ wait_for:
+ - result[0] contains IOS-XR
+ - result[1] contains Loopback0
+"""
+
+RETURN = """
+stdout:
+ description: The set of responses from the commands
+ returned: always apart from low level errors (such as action plugin)
+ type: list
+ sample: ['...', '...']
+stdout_lines:
+ description: The value of stdout split into a list
+ returned: always apart from low level errors (such as action plugin)
+ type: list
+ sample: [['...', '...'], ['...'], ['...']]
+failed_conditions:
+ description: The list of conditionals that have failed
+ returned: failed
+ type: list
+ sample: ['...', '...']
+"""
+import time
+
+from ansible.module_utils._text import to_text
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.parsing import (
+ Conditional,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_lines,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ run_commands,
+ iosxr_argument_spec,
+)
+
+
+def parse_commands(module, warnings):
+ commands = module.params["commands"]
+ for item in list(commands):
+ try:
+ command = item["command"]
+ except Exception:
+ command = item
+ if module.check_mode and not command.startswith("show"):
+ warnings.append(
+ "Only show commands are supported when using check mode, not "
+ "executing %s" % command
+ )
+ commands.remove(item)
+
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ commands=dict(type="list", required=True, elements="raw"),
+ wait_for=dict(type="list", aliases=["waitfor"], elements="str"),
+ match=dict(default="all", choices=["all", "any"]),
+ retries=dict(default=10, type="int"),
+ interval=dict(default=1, type="int"),
+ )
+
+ argument_spec.update(iosxr_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ result = {"changed": False, "warnings": warnings}
+ commands = parse_commands(module, warnings)
+ wait_for = module.params["wait_for"] or list()
+
+ try:
+ conditionals = [Conditional(c) for c in wait_for]
+ except AttributeError as exc:
+ module.fail_json(msg=to_text(exc))
+
+ retries = module.params["retries"]
+ interval = module.params["interval"]
+ match = module.params["match"]
+
+ while retries > 0:
+ responses = run_commands(module, commands)
+
+ for item in list(conditionals):
+ if item(responses):
+ if match == "any":
+ conditionals = list()
+ break
+ conditionals.remove(item)
+
+ if not conditionals:
+ break
+
+ time.sleep(interval)
+ retries -= 1
+
+ if conditionals:
+ failed_conditions = [item.raw for item in conditionals]
+ msg = "One or more conditional statements have not been satisfied"
+ module.fail_json(msg=msg, failed_conditions=failed_conditions)
+
+ result.update(
+ {"stdout": responses, "stdout_lines": list(to_lines(responses))}
+ )
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_config.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_config.py
new file mode 100644
index 00000000..2a5d3080
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_config.py
@@ -0,0 +1,480 @@
+#!/usr/bin/python
+#
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_config
+author: Ricardo Carrillo Cruz (@rcarrillocruz)
+short_description: Manage Cisco IOS XR configuration sections
+description:
+- Cisco IOS XR configurations use a simple block indent file syntax for segmenting
+ configuration into sections. This module provides an implementation for working
+ with IOS XR configuration sections in a deterministic way.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.iosxr.iosxr
+notes:
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+- Tested against IOS XRv 6.1.3.
+- This module does not support C(netconf) connection
+- Abbreviated commands are NOT idempotent, see L(Network FAQ,../network/user_guide/faq.html
+ #why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands).
+- Avoid service disrupting changes (viz. Management IP) from config replace.
+- Do not use C(end) in the replace config file.
+- To ensure idempotency and correct diff the configuration lines in the relevant module options should be similar to how they
+ appear if present in the running configuration on device including the indentation.
+options:
+ lines:
+ description:
+ - The ordered set of commands that should be configured in the section. The commands
+ must be the exact same commands as found in the device running-config as found in the
+ device running-config to ensure idempotency and correct diff. Be sure to note the
+ configuration command syntax as some commands are automatically modified by the
+ device config parser.
+ type: list
+ elements: str
+ aliases:
+ - commands
+ parents:
+ description:
+ - 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.
+ type: list
+ elements: str
+ src:
+ description:
+ - Specifies the source path to the file that contains the configuration or configuration
+ template to load. The path to the source file can either be the full path on
+ the Ansible control host or a relative path from the playbook or role root directory. This
+ argument is mutually exclusive with I(lines), I(parents). The configuration lines in the
+ source file should be similar to how it will appear if present in the running-configuration
+ of the device to ensure idempotency and correct diff.
+ type: path
+ before:
+ description:
+ - The ordered set of commands to push on to the command stack if a change needs
+ to be made. This allows the playbook designer the opportunity to perform configuration
+ commands prior to pushing any changes without affecting how the set of commands
+ are matched against the system.
+ type: list
+ elements: str
+ after:
+ description:
+ - The ordered set of commands to append to the end of the command stack if a change
+ needs to be made. Just like with I(before) this allows the playbook designer
+ to append a set of commands to be executed after the command set.
+ type: list
+ elements: str
+ match:
+ description:
+ - Instructs the module on the way to perform the matching of the set of commands
+ against the current device config. If match is set to I(line), commands are
+ matched line by line. If match is set to I(strict), command lines are matched
+ with respect to position. If match is set to I(exact), command lines must be
+ an equal match. Finally, if match is set to I(none), the module will not attempt
+ to compare the source configuration with the running configuration on the remote
+ device.
+ type: str
+ default: line
+ choices:
+ - line
+ - strict
+ - exact
+ - none
+ replace:
+ description:
+ - Instructs the module on the way to perform the configuration on the device. If
+ the replace argument is set to I(line) then the modified lines are pushed to
+ the device in configuration mode. If the replace argument is set to I(block)
+ then the entire command block is pushed to the device in configuration mode
+ if any line is not correct.
+ type: str
+ default: line
+ choices:
+ - line
+ - block
+ - config
+ force:
+ description:
+ - The force argument instructs the module to not consider the current devices
+ running-config. When set to true, this will cause the module to push the contents
+ of I(src) into the device without first checking if already configured.
+ - Note this argument should be considered deprecated. To achieve the equivalent,
+ set the C(match=none) which is idempotent. This argument will be removed in
+ a future release.
+ type: bool
+ default: no
+ config:
+ description:
+ - The module, by default, will connect to the remote device and retrieve the current
+ running-config to use as a base for comparing against the contents of source. There
+ are times when it is not desirable to have the task get the current running-config
+ for every task in a playbook. The I(config) argument allows the implementer
+ to pass in the configuration to use as the base config for comparison.
+ The configuration lines for this option should be similar to how it will appear if present
+ in the running-configuration of the device to ensure idempotency and correct diff.
+ type: str
+ backup:
+ description:
+ - This argument will cause the module to create a full backup of the current C(running-config)
+ from the remote device before any changes are made. If the C(backup_options)
+ value is not given, the backup file is written to the C(backup) folder in the
+ playbook root directory or role root directory, if playbook is part of an ansible
+ role. If the directory does not exist, it is created.
+ type: bool
+ default: no
+ comment:
+ description:
+ - Allows a commit description to be specified to be included when the configuration
+ is committed. If the configuration is not changed or committed, this argument
+ is ignored.
+ type: str
+ default: configured by iosxr_config
+ admin:
+ description:
+ - Enters into administration configuration mode for making config changes to the
+ device.
+ type: bool
+ default: no
+ label:
+ description:
+ - Allows a commit label to be specified to be included when the configuration
+ is committed. A valid label must begin with an alphabet and not exceed 30 characters,
+ only alphabets, digits, hyphens and underscores are allowed. If the configuration
+ is not changed or committed, this argument is ignored.
+ type: str
+ backup_options:
+ description:
+ - This is a dict object containing configurable options related to backup file
+ path. The value of this option is read only when C(backup) is set to I(yes),
+ if C(backup) is set to I(no) this option will be silently ignored.
+ suboptions:
+ filename:
+ description:
+ - The filename to be used to store the backup configuration. If the filename
+ is not given it will be generated based on the hostname, current time and
+ date in format defined by <hostname>_config.<current-date>@<current-time>
+ type: str
+ dir_path:
+ description:
+ - This option provides the path ending with directory name in which the backup
+ configuration file will be stored. If the directory does not exist it will
+ be first created and the filename is either the value of C(filename) or
+ default filename as described in C(filename) options description. If the
+ path value is not given in that case a I(backup) directory will be created
+ in the current working directory and backup configuration will be copied
+ in C(filename) within I(backup) directory.
+ type: path
+ type: dict
+ exclusive:
+ description:
+ - Enters into exclusive configuration mode that locks out all users from committing
+ configuration changes until the exclusive session ends.
+ type: bool
+ default: false
+"""
+
+EXAMPLES = """
+- name: configure top level configuration
+ cisco.iosxr.iosxr_config:
+ lines: hostname {{ inventory_hostname }}
+
+- name: configure interface settings
+ cisco.iosxr.iosxr_config:
+ lines:
+ - description test interface
+ - ip address 172.31.1.1 255.255.255.0
+ parents: interface GigabitEthernet0/0/0/0
+
+- name: load a config from disk and replace the current config
+ cisco.iosxr.iosxr_config:
+ src: config.cfg
+ replace: config
+ backup: yes
+
+- name: for idempotency, use full-form commands
+ cisco.iosxr.iosxr_config:
+ lines:
+ # - shut
+ - shutdown
+ # parents: int g0/0/0/1
+ parents: interface GigabitEthernet0/0/0/1
+
+- name: configurable backup path
+ cisco.iosxr.iosxr_config:
+ src: config.cfg
+ backup: yes
+ backup_options:
+ filename: backup.cfg
+ dir_path: /home/user
+"""
+
+RETURN = """
+commands:
+ description: The set of commands that will be pushed to the remote device
+ returned: If there are commands to run against the host
+ type: list
+ sample: ['hostname foo', 'router ospf 1', 'router-id 1.1.1.1']
+backup_path:
+ description: The full path to the backup file
+ returned: when backup is yes
+ type: str
+ sample: /playbooks/ansible/backup/iosxr01_config.2016-07-16@22:28:34
+filename:
+ description: The name of the backup file
+ returned: when backup is yes and filename is not specified in backup options
+ type: str
+ sample: iosxr01_config.2016-07-16@22:28:34
+shortname:
+ description: The full path to the backup file excluding the timestamp
+ returned: when backup is yes and filename is not specified in backup options
+ type: str
+ sample: /playbooks/ansible/backup/iosxr01_config
+date:
+ description: The date extracted from the backup file name
+ returned: when backup is yes
+ type: str
+ sample: "2016-07-16"
+time:
+ description: The time extracted from the backup file name
+ returned: when backup is yes
+ type: str
+ sample: "22:28:34"
+"""
+import re
+
+from ansible.module_utils._text import to_text, to_bytes
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.connection import ConnectionError
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ load_config,
+ get_config,
+ get_connection,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ iosxr_argument_spec,
+ copy_file,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+ dumps,
+)
+
+DEFAULT_COMMIT_COMMENT = "configured by iosxr_config"
+
+
+def copy_file_to_node(module):
+ """ Copy config file to IOS-XR node. We use SFTP because older IOS-XR versions don't handle SCP very well.
+ """
+ src = "/tmp/ansible_config.txt"
+ file = open(src, "wb")
+ file.write(to_bytes(module.params["src"], errors="surrogate_or_strict"))
+ file.close()
+
+ dst = "/harddisk:/ansible_config.txt"
+ copy_file(module, src, dst, "sftp")
+
+ return True
+
+
+def check_args(module, warnings):
+ if module.params["comment"]:
+ if len(module.params["comment"]) > 60:
+ module.fail_json(
+ msg="comment argument cannot be more than 60 characters"
+ )
+ if module.params["label"]:
+ label = module.params["label"]
+ if len(label) > 30:
+ module.fail_json(
+ msg="label argument cannot be more than 30 characters"
+ )
+ if not label[0].isalpha():
+ module.fail_json(msg="label argument must begin with an alphabet")
+ valid_chars = re.match(r"[\w-]*$", label)
+ if not valid_chars:
+ module.fail_json(
+ msg="label argument must only contain alphabets,"
+ + "digits, underscores or hyphens"
+ )
+ if module.params["force"]:
+ warnings.append(
+ "The force argument is deprecated, please use "
+ "match=none instead. This argument will be "
+ "removed in the future"
+ )
+
+
+def get_running_config(module):
+ contents = module.params["config"]
+ if not contents:
+ contents = get_config(module)
+ return contents
+
+
+def get_candidate(module):
+ candidate = ""
+ if module.params["src"]:
+ candidate = module.params["src"]
+ elif module.params["lines"]:
+ candidate_obj = NetworkConfig(indent=1, comment_tokens=["!"])
+ parents = module.params["parents"] or list()
+ candidate_obj.add(module.params["lines"], parents=parents)
+ candidate = dumps(candidate_obj, "raw")
+ return candidate
+
+
+def run(module, result):
+ match = module.params["match"]
+ replace = module.params["replace"]
+ replace_config = replace == "config"
+ path = module.params["parents"]
+ comment = module.params["comment"]
+ admin = module.params["admin"]
+ exclusive = module.params["exclusive"]
+ check_mode = module.check_mode
+ label = module.params["label"]
+
+ candidate_config = get_candidate(module)
+ running_config = get_running_config(module)
+
+ commands = None
+ replace_file_path = None
+ connection = get_connection(module)
+ try:
+ response = connection.get_diff(
+ candidate=candidate_config,
+ running=running_config,
+ diff_match=match,
+ path=path,
+ diff_replace=replace,
+ )
+ except ConnectionError as exc:
+ module.fail_json(msg=to_text(exc, errors="surrogate_then_replace"))
+
+ config_diff = response.get("config_diff")
+
+ if replace_config:
+ running_base_diff_resp = connection.get_diff(
+ candidate=running_config,
+ running=candidate_config,
+ diff_match=match,
+ path=path,
+ diff_replace=replace,
+ )
+ if config_diff or running_base_diff_resp["config_diff"]:
+ ret = copy_file_to_node(module)
+ if not ret:
+ module.fail_json(msg="Copy of config file to the node failed")
+
+ commands = ["load harddisk:/ansible_config.txt"]
+ replace_file_path = "harddisk:/ansible_config.txt"
+
+ if config_diff or commands:
+ if not replace_config:
+ commands = config_diff.split("\n")
+
+ if any((module.params["lines"], module.params["src"])):
+ msg = (
+ "To ensure idempotency and correct diff the input configuration lines should be"
+ " similar to how they appear if present in the running configuration on device"
+ )
+ if module.params["src"]:
+ msg += " including the indentation"
+ module.warn(msg)
+
+ if module.params["before"]:
+ commands[:0] = module.params["before"]
+
+ if module.params["after"]:
+ commands.extend(module.params["after"])
+
+ result["commands"] = commands
+
+ commit = not check_mode
+ diff = load_config(
+ module,
+ commands,
+ commit=commit,
+ replace=replace_file_path,
+ comment=comment,
+ admin=admin,
+ exclusive=exclusive,
+ label=label,
+ )
+ if diff:
+ result["diff"] = dict(prepared=diff)
+
+ result["changed"] = True
+
+
+def main():
+ """main entry point for module execution
+ """
+ backup_spec = dict(filename=dict(), dir_path=dict(type="path"))
+ argument_spec = dict(
+ src=dict(type="path"),
+ lines=dict(aliases=["commands"], type="list", elements="str"),
+ parents=dict(type="list", elements="str"),
+ before=dict(type="list", elements="str"),
+ after=dict(type="list", elements="str"),
+ match=dict(
+ default="line", choices=["line", "strict", "exact", "none"]
+ ),
+ replace=dict(default="line", choices=["line", "block", "config"]),
+ # this argument is deprecated in favor of setting match: none
+ # it will be removed in a future version
+ force=dict(default=False, type="bool"),
+ config=dict(),
+ backup=dict(type="bool", default=False),
+ backup_options=dict(type="dict", options=backup_spec),
+ comment=dict(default=DEFAULT_COMMIT_COMMENT),
+ admin=dict(type="bool", default=False),
+ exclusive=dict(type="bool", default=False),
+ label=dict(),
+ )
+
+ argument_spec.update(iosxr_argument_spec)
+
+ mutually_exclusive = [("lines", "src"), ("parents", "src")]
+
+ required_if = [
+ ("match", "strict", ["lines"]),
+ ("match", "exact", ["lines"]),
+ ("replace", "block", ["lines"]),
+ ("replace", "config", ["src"]),
+ ]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+
+ if module.params["force"] is True:
+ module.params["match"] = "none"
+
+ warnings = list()
+ check_args(module, warnings)
+
+ result = dict(changed=False, warnings=warnings)
+
+ if module.params["backup"]:
+ result["__backup__"] = get_config(module)
+
+ if any((module.params["src"], module.params["lines"])):
+ run(module, result)
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_facts.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_facts.py
new file mode 100644
index 00000000..5ac8effa
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_facts.py
@@ -0,0 +1,218 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The module file for iosxr_facts
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_facts
+short_description: Get facts about iosxr devices.
+extends_documentation_fragment:
+- cisco.iosxr.iosxr
+description:
+- Collects facts from network devices running the iosxr operating system. This module
+ places the facts gathered in the fact tree keyed by the respective resource name. The
+ facts module will always collect a base set of facts from the device and can enable
+ or disable collection of additional facts.
+version_added: 1.0.0
+notes:
+- Tested against IOS-XR 6.1.3.
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+author:
+- Ricardo Carrillo Cruz (@rcarrillocruz)
+- Nilashish Chakraborty (@Nilashishc)
+options:
+ gather_subset:
+ description:
+ - When supplied, this argument will restrict the facts collected to a given subset. Possible
+ values for this argument include all, hardware, config, and interfaces. Can
+ specify a list of values to include a larger subset. Values can also be used
+ with an initial C(M(!)) to specify that a specific subset should not be collected.
+ required: false
+ default: '!config'
+ type: list
+ elements: str
+ gather_network_resources:
+ description:
+ - When supplied, this argument will restrict the facts collected to a given subset.
+ Possible values for this argument include all and the resources like interfaces,
+ lacp etc. Can specify a list of values to include a larger subset. Values can
+ also be used with an initial C(M(!)) to specify that a specific subset should
+ not be collected. Valid subsets are 'all', 'lacp', 'lacp_interfaces', 'lldp_global',
+ 'lldp_interfaces', 'interfaces', 'l2_interfaces', 'l3_interfaces', 'lag_interfaces',
+ 'acls', 'acl_interfaces', 'static_routes', 'ospfv2'.
+ required: false
+ type: list
+ elements: str
+"""
+
+EXAMPLES = """
+# Gather all facts
+- cisco.iosxr.iosxr_facts:
+ gather_subset: all
+ gather_network_resources: all
+
+# Collect only the config and default facts
+- cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - config
+
+# Do not collect hardware facts
+- cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!hardware'
+
+# Collect only the lacp facts
+- cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - lacp
+
+# Do not collect lacp_interfaces facts
+- cisco.iosxr.iosxr_facts:
+ gather_network_resources:
+ - '!lacp_interfaces'
+
+# Collect lacp and minimal default facts
+- cisco.iosxr.iosxr_facts:
+ gather_subset: min
+ gather_network_resources: lacp
+
+# Collect only the interfaces facts
+- cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - interfaces
+ - l2_interfaces
+"""
+
+RETURN = """
+ansible_net_gather_subset:
+ description: The list of fact subsets collected from the device
+ returned: always
+ type: list
+
+# default
+ansible_net_version:
+ description: The operating system version running on the remote device
+ returned: always
+ type: str
+ansible_net_hostname:
+ description: The configured hostname of the device
+ returned: always
+ type: str
+ansible_net_image:
+ description: The image file the device is running
+ returned: always
+ type: str
+ansible_net_api:
+ description: The name of the transport
+ returned: always
+ type: str
+ansible_net_python_version:
+ description: The Python version Ansible controller is using
+ returned: always
+ type: str
+ansible_net_model:
+ description: The model name returned from the device
+ returned: always
+ type: str
+
+# hardware
+ansible_net_filesystems:
+ description: All file system names available on the device
+ returned: when hardware is configured
+ type: list
+ansible_net_memfree_mb:
+ description: The available free memory on the remote device in Mb
+ returned: when hardware is configured
+ type: int
+ansible_net_memtotal_mb:
+ description: The total memory on the remote device in Mb
+ returned: when hardware is configured
+ type: int
+
+# config
+ansible_net_config:
+ description: The current active config from the device
+ returned: when config is configured
+ type: str
+
+# interfaces
+ansible_net_all_ipv4_addresses:
+ description: All IPv4 addresses configured on the device
+ returned: when interfaces is configured
+ type: list
+ansible_net_all_ipv6_addresses:
+ description: All IPv6 addresses configured on the device
+ returned: when interfaces is configured
+ type: list
+ansible_net_interfaces:
+ description: A hash of all interfaces running on the system
+ returned: when interfaces is configured
+ type: dict
+ansible_net_neighbors:
+ description: The list of LLDP neighbors from the remote device
+ returned: when interfaces is configured
+ type: dict
+
+# network resources
+ansible_net_gather_network_resources:
+ description: The list of fact resource subsets collected from the device
+ returned: always
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ iosxr_argument_spec,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.facts.facts import (
+ FactsArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.facts import (
+ Facts,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: ansible_facts
+ """
+ argument_spec = FactsArgs.argument_spec
+ argument_spec.update(iosxr_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = []
+ if module.params["gather_subset"] == "!config":
+ warnings.append(
+ "default value for `gather_subset` will be changed to `min` from `!config` v2.11 onwards"
+ )
+
+ result = Facts(module).get_facts()
+
+ ansible_facts, additional_warnings = result
+ warnings.extend(additional_warnings)
+
+ module.exit_json(ansible_facts=ansible_facts, warnings=warnings)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_interface.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_interface.py
new file mode 100644
index 00000000..d3dca6e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_interface.py
@@ -0,0 +1,1057 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_interface
+author:
+- Ganesh Nalawade (@ganeshrn)
+- Kedar Kekan (@kedarX)
+short_description: (deprecated, removed after 2022-06-01) Manage Interface on Cisco
+ IOS XR network devices
+description:
+- This module provides declarative management of Interfaces on Cisco IOS XR network
+ devices.
+version_added: 1.0.0
+deprecated:
+ alternative: iosxr_interfaces
+ why: Newer and updated modules released with more functionality in Ansible 2.9
+ removed_at_date: '2022-06-01'
+requirements:
+- ncclient >= 0.5.3 when using netconf
+- lxml >= 4.1.1 when using netconf
+extends_documentation_fragment:
+- cisco.iosxr.iosxr
+notes:
+- This module works with connection C(network_cli) and C(netconf). See L(the IOS-XR
+ Platform Options,../network/user_guide/platform_iosxr.html).
+- Tested against IOS XRv 6.1.3.
+- Preconfiguration of physical interfaces is not supported with C(netconf) transport.
+options:
+ name:
+ description:
+ - Name of the interface to configure in C(type + path) format. e.g. C(GigabitEthernet0/0/0/0)
+ type: str
+ required: true
+ description:
+ description:
+ - Description of Interface being configured.
+ type: str
+ enabled:
+ description:
+ - Removes the shutdown configuration, which removes the forced administrative
+ down on the interface, enabling it to move to an up or down state.
+ type: bool
+ default: true
+ active:
+ description:
+ - Whether the interface is C(active) or C(preconfigured). Preconfiguration allows
+ you to configure modular services cards before they are inserted into the router.
+ When the cards are inserted, they are instantly configured. Active cards are
+ the ones already inserted.
+ type: str
+ choices:
+ - active
+ - preconfigure
+ default: active
+ speed:
+ description:
+ - Configure the speed for an interface. Default is auto-negotiation when not configured.
+ choices:
+ - '10'
+ - '100'
+ - '1000'
+ type: str
+ mtu:
+ description:
+ - Sets the MTU value for the interface. Range is between 64 and 65535'
+ type: str
+ duplex:
+ description:
+ - Configures the interface duplex mode. Default is auto-negotiation when not configured.
+ type: str
+ choices:
+ - full
+ - half
+ tx_rate:
+ description:
+ - Transmit rate in bits per second (bps).
+ - This is state check parameter only.
+ - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
+ type: str
+ rx_rate:
+ description:
+ - Receiver rate in bits per second (bps).
+ - This is state check parameter only.
+ - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
+ type: str
+ delay:
+ description:
+ - Time in seconds to wait before checking for the operational state on remote
+ device. This wait is applicable for operational state argument which are I(state)
+ with values C(up)/C(down), I(tx_rate) and I(rx_rate).
+ default: 10
+ type: int
+ aggregate:
+ description: List of interfaces definition
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name of the interface to configure in C(type + path) format. e.g. C(GigabitEthernet0/0/0/0)
+ type: str
+ description:
+ description:
+ - Description of Interface being configured.
+ type: str
+ enabled:
+ description:
+ - Removes the shutdown configuration, which removes the forced administrative
+ down on the interface, enabling it to move to an up or down state.
+ type: bool
+ active:
+ description:
+ - Whether the interface is C(active) or C(preconfigured). Preconfiguration allows
+ you to configure modular services cards before they are inserted into the router.
+ When the cards are inserted, they are instantly configured. Active cards are
+ the ones already inserted.
+ type: str
+ choices:
+ - active
+ - preconfigure
+ speed:
+ description:
+ - Configure the speed for an interface. Default is auto-negotiation when not configured.
+ choices:
+ - '10'
+ - '100'
+ - '1000'
+ type: str
+ mtu:
+ description:
+ - Sets the MTU value for the interface. Range is between 64 and 65535'
+ type: str
+ duplex:
+ description:
+ - Configures the interface duplex mode. Default is auto-negotiation when not configured.
+ type: str
+ choices:
+ - full
+ - half
+ tx_rate:
+ description:
+ - Transmit rate in bits per second (bps).
+ - This is state check parameter only.
+ - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
+ type: str
+ rx_rate:
+ description:
+ - Receiver rate in bits per second (bps).
+ - This is state check parameter only.
+ - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
+ type: str
+ delay:
+ description:
+ - Time in seconds to wait before checking for the operational state on remote
+ device. This wait is applicable for operational state argument which are I(state)
+ with values C(up)/C(down), I(tx_rate) and I(rx_rate).
+ type: int
+ state:
+ description:
+ - State of the Interface configuration, C(up) means present and operationally
+ up and C(down) means present and operationally C(down)
+ type: str
+ choices:
+ - present
+ - absent
+ - up
+ - down
+ state:
+ description:
+ - State of the Interface configuration, C(up) means present and operationally
+ up and C(down) means present and operationally C(down)
+ type: str
+ default: present
+ choices:
+ - present
+ - absent
+ - up
+ - down
+
+
+"""
+
+EXAMPLES = """
+- name: configure interface
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ description: test-interface
+ speed: 100
+ duplex: half
+ mtu: 512
+
+- name: remove interface
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ state: absent
+
+- name: make interface up
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ enabled: true
+
+- name: make interface down
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ enabled: false
+
+- name: Create interface using aggregate
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+ - name: GigabitEthernet0/0/0/3
+ - name: GigabitEthernet0/0/0/2
+ speed: 100
+ duplex: full
+ mtu: 512
+ state: present
+
+- name: Create interface using aggregate along with additional params in aggregate
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+ - {name: GigabitEthernet0/0/0/3, description: test-interface 3}
+ - {name: GigabitEthernet0/0/0/2, description: test-interface 2}
+ speed: 100
+ duplex: full
+ mtu: 512
+ state: present
+
+- name: Delete interface using aggregate
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+ - name: GigabitEthernet0/0/0/3
+ - name: GigabitEthernet0/0/0/2
+ state: absent
+
+- name: Check intent arguments
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/5
+ state: up
+ delay: 20
+
+- name: Config + intent
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/5
+ enabled: false
+ state: down
+ delay: 20
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands sent to device with transport C(cli)
+ returned: always (empty list when no commands to send)
+ type: list
+ sample:
+ - interface GigabitEthernet0/0/0/2
+ - description test-interface
+ - duplex half
+ - mtu 512
+
+xml:
+ description: NetConf rpc xml sent to device with transport C(netconf)
+ returned: always (empty list when no xml rpc to send)
+ type: list
+ sample:
+ - '<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
+ <interface-configuration xc:operation="merge">
+ <active>act</active>
+ <interface-name>GigabitEthernet0/0/0/0</interface-name>
+ <description>test-interface-0</description>
+ <mtus><mtu>
+ <owner>GigabitEthernet</owner>
+ <mtu>512</mtu>
+ </mtu></mtus>
+ <ethernet xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-drivers-media-eth-cfg">
+ <speed>100</speed>
+ <duplex>half</duplex>
+ </ethernet>
+ </interface-configuration>
+ </interface-configurations></config>'
+"""
+import re
+from time import sleep
+from copy import deepcopy
+import collections
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ get_config,
+ load_config,
+ build_xml,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ run_commands,
+ iosxr_argument_spec,
+ get_oper,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ is_netconf,
+ is_cliconf,
+ etree_findall,
+ etree_find,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ conditional,
+ remove_default_spec,
+)
+
+
+def validate_mtu(value):
+ if value and not 64 <= int(value) <= 65535:
+ return False, "mtu must be between 64 and 65535"
+ return True, None
+
+
+class ConfigBase(object):
+ def __init__(self, module):
+ self._module = module
+ self._result = {"changed": False, "warnings": []}
+ self._want = list()
+ self._have = list()
+
+ def validate_param_values(self, param=None):
+ for key, value in param.items():
+ # validate the param value (if validator func exists)
+ validator = globals().get("validate_%s" % key)
+ if callable(validator):
+ rc, msg = validator(value)
+ if not rc:
+ self._module.fail_json(msg=msg)
+
+ def map_params_to_obj(self):
+ aggregate = self._module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = self._module.params[key]
+
+ self.validate_param_values(item)
+ d = item.copy()
+
+ match = re.match(r"(^[a-z]+)([0-9/]+$)", d["name"], re.I)
+ if match:
+ d["owner"] = match.groups()[0]
+
+ if d["active"] == "preconfigure":
+ d["active"] = "pre"
+ else:
+ d["active"] = "act"
+
+ self._want.append(d)
+
+ else:
+ self.validate_param_values(self._module.params)
+ params = {
+ "name": self._module.params["name"],
+ "description": self._module.params["description"],
+ "speed": self._module.params["speed"],
+ "mtu": self._module.params["mtu"],
+ "duplex": self._module.params["duplex"],
+ "state": self._module.params["state"],
+ "delay": self._module.params["delay"],
+ "tx_rate": self._module.params["tx_rate"],
+ "rx_rate": self._module.params["rx_rate"],
+ "enabled": self._module.params["enabled"],
+ "active": self._module.params["active"],
+ }
+
+ match = re.match(r"(^[a-z]+)([0-9/]+$)", params["name"], re.I)
+ if match:
+ params["owner"] = match.groups()[0]
+
+ if params["active"] == "preconfigure":
+ params["active"] = "pre"
+ else:
+ params["active"] = "act"
+
+ self._want.append(params)
+
+
+class CliConfiguration(ConfigBase):
+ def __init__(self, module):
+ super(CliConfiguration, self).__init__(module)
+
+ def parse_shutdown(self, intf_config):
+ for cfg in intf_config:
+ match = re.search(r"%s" % "shutdown", cfg, re.M)
+ if match:
+ return True
+ return False
+
+ def parse_config_argument(self, intf_config, arg):
+ for cfg in intf_config:
+ match = re.search(r"%s (.+)$" % arg, cfg, re.M)
+ if match:
+ return match.group(1)
+
+ def search_obj_in_list(self, name):
+ for obj in self._have:
+ if obj["name"] == name:
+ return obj
+ return None
+
+ def map_config_to_obj(self):
+ data = get_config(self._module, config_filter="interface")
+ data_lines = data.splitlines()
+ start_indexes = [
+ i for i, e in enumerate(data_lines) if e.startswith("interface")
+ ]
+ end_indexes = [i for i, e in enumerate(data_lines) if e == "!"]
+
+ intf_configs = list()
+ for start_index, end_index in zip(start_indexes, end_indexes):
+ intf_configs.append(
+ [i.strip() for i in data_lines[start_index:end_index]]
+ )
+
+ if not intf_configs:
+ return list()
+
+ for intf_config in intf_configs:
+ name = intf_config[0].strip().split()[1]
+
+ active = "act"
+ if name == "preconfigure":
+ active = "pre"
+ name = intf_config[0].strip().split()[2]
+
+ obj = {
+ "name": name,
+ "description": self.parse_config_argument(
+ intf_config, "description"
+ ),
+ "speed": self.parse_config_argument(intf_config, "speed"),
+ "duplex": self.parse_config_argument(intf_config, "duplex"),
+ "mtu": self.parse_config_argument(intf_config, "mtu"),
+ "enabled": not bool(self.parse_shutdown(intf_config)),
+ "active": active,
+ "state": "present",
+ }
+ self._have.append(obj)
+
+ def map_obj_to_commands(self):
+ commands = list()
+
+ args = ("speed", "description", "duplex", "mtu")
+ for want_item in self._want:
+ name = want_item["name"]
+ disable = not want_item["enabled"]
+ state = want_item["state"]
+
+ obj_in_have = self.search_obj_in_list(name)
+ interface = "interface " + name
+
+ if state == "absent" and obj_in_have:
+ commands.append("no " + interface)
+
+ elif state in ("present", "up", "down"):
+ if obj_in_have:
+ for item in args:
+ candidate = want_item.get(item)
+ running = obj_in_have.get(item)
+ if candidate != running:
+ if candidate:
+ cmd = (
+ interface
+ + " "
+ + item
+ + " "
+ + str(candidate)
+ )
+ commands.append(cmd)
+
+ if disable and obj_in_have.get("enabled", False):
+ commands.append(interface + " shutdown")
+ elif not disable and not obj_in_have.get("enabled", False):
+ commands.append("no " + interface + " shutdown")
+ else:
+ for item in args:
+ value = want_item.get(item)
+ if value:
+ commands.append(
+ interface + " " + item + " " + str(value)
+ )
+ if not disable:
+ commands.append("no " + interface + " shutdown")
+ self._result["commands"] = commands
+
+ if commands:
+ commit = not self._module.check_mode
+ diff = load_config(self._module, commands, commit=commit)
+ if diff:
+ self._result["diff"] = dict(prepared=diff)
+ self._result["changed"] = True
+
+ def check_declarative_intent_params(self):
+ failed_conditions = []
+ for want_item in self._want:
+ want_state = want_item.get("state")
+ want_tx_rate = want_item.get("tx_rate")
+ want_rx_rate = want_item.get("rx_rate")
+ if (
+ want_state not in ("up", "down")
+ and not want_tx_rate
+ and not want_rx_rate
+ ):
+ continue
+
+ if self._result["changed"]:
+ sleep(want_item["delay"])
+
+ command = "show interfaces {0!s}".format(want_item["name"])
+ out = run_commands(self._module, command)[0]
+
+ if want_state in ("up", "down"):
+ match = re.search(r"%s (\w+)" % "line protocol is", out, re.M)
+ have_state = None
+ if match:
+ have_state = match.group(1)
+ if have_state.strip() == "administratively":
+ match = re.search(
+ r"%s (\w+)" % "administratively", out, re.M
+ )
+ if match:
+ have_state = match.group(1)
+
+ if have_state is None or not conditional(
+ want_state, have_state.strip()
+ ):
+ failed_conditions.append(
+ "state " + "eq({0!s})".format(want_state)
+ )
+
+ if want_tx_rate:
+ match = re.search(r"%s (\d+)" % "output rate", out, re.M)
+ have_tx_rate = None
+ if match:
+ have_tx_rate = match.group(1)
+
+ if have_tx_rate is None or not conditional(
+ want_tx_rate, have_tx_rate.strip(), cast=int
+ ):
+ failed_conditions.append("tx_rate " + want_tx_rate)
+
+ if want_rx_rate:
+ match = re.search(r"%s (\d+)" % "input rate", out, re.M)
+ have_rx_rate = None
+ if match:
+ have_rx_rate = match.group(1)
+
+ if have_rx_rate is None or not conditional(
+ want_rx_rate, have_rx_rate.strip(), cast=int
+ ):
+ failed_conditions.append("rx_rate " + want_rx_rate)
+
+ if failed_conditions:
+ msg = "One or more conditional statements have not been satisfied"
+ self._module.fail_json(
+ msg=msg, failed_conditions=failed_conditions
+ )
+
+ def run(self):
+ self.map_params_to_obj()
+ self.map_config_to_obj()
+ self.map_obj_to_commands()
+ self.check_declarative_intent_params()
+
+ return self._result
+
+
+class NCConfiguration(ConfigBase):
+ def __init__(self, module):
+ super(NCConfiguration, self).__init__(module)
+
+ self._intf_meta = collections.OrderedDict()
+ self._shut_meta = collections.OrderedDict()
+ self._data_rate_meta = collections.OrderedDict()
+ self._line_state_meta = collections.OrderedDict()
+
+ def map_obj_to_xml_rpc(self):
+ self._intf_meta.update(
+ [
+ (
+ "interface-configuration",
+ {
+ "xpath": "interface-configurations/interface-configuration",
+ "tag": True,
+ "attrib": "operation",
+ },
+ ),
+ (
+ "a:active",
+ {
+ "xpath": "interface-configurations/interface-configuration/active",
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:name",
+ {
+ "xpath": "interface-configurations/interface-configuration/interface-name"
+ },
+ ),
+ (
+ "a:description",
+ {
+ "xpath": "interface-configurations/interface-configuration/description",
+ "operation": "edit",
+ },
+ ),
+ (
+ "mtus",
+ {
+ "xpath": "interface-configurations/interface-configuration/mtus",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "mtu",
+ {
+ "xpath": "interface-configurations/interface-configuration/mtus/mtu",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:owner",
+ {
+ "xpath": "interface-configurations/interface-configuration/mtus/mtu/owner",
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:mtu",
+ {
+ "xpath": "interface-configurations/interface-configuration/mtus/mtu/mtu",
+ "operation": "edit",
+ },
+ ),
+ (
+ "CEthernet",
+ {
+ "xpath": "interface-configurations/interface-configuration/ethernet",
+ "tag": True,
+ "operation": "edit",
+ "ns": True,
+ },
+ ),
+ (
+ "a:speed",
+ {
+ "xpath": "interface-configurations/interface-configuration/ethernet/speed",
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:duplex",
+ {
+ "xpath": "interface-configurations/interface-configuration/ethernet/duplex",
+ "operation": "edit",
+ },
+ ),
+ ]
+ )
+
+ self._shut_meta.update(
+ [
+ (
+ "interface-configuration",
+ {
+ "xpath": "interface-configurations/interface-configuration",
+ "tag": True,
+ },
+ ),
+ (
+ "a:active",
+ {
+ "xpath": "interface-configurations/interface-configuration/active",
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:name",
+ {
+ "xpath": "interface-configurations/interface-configuration/interface-name"
+ },
+ ),
+ (
+ "shutdown",
+ {
+ "xpath": "interface-configurations/interface-configuration/shutdown",
+ "tag": True,
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ ]
+ )
+ state = self._module.params["state"]
+
+ _get_filter = build_xml(
+ "interface-configurations",
+ xmap=self._intf_meta,
+ params=self._want,
+ opcode="filter",
+ )
+
+ running = get_config(
+ self._module, source="running", config_filter=_get_filter
+ )
+ intfcfg_nodes = etree_findall(running, "interface-configuration")
+
+ intf_list = set()
+ shut_list = set()
+ for item in intfcfg_nodes:
+ intf_name = etree_find(item, "interface-name").text
+ if intf_name is not None:
+ intf_list.add(intf_name)
+
+ if etree_find(item, "shutdown") is not None:
+ shut_list.add(intf_name)
+
+ intf_params = list()
+ shut_params = list()
+ noshut_params = list()
+ for index, item in enumerate(self._want):
+ if item["name"] in intf_list:
+ intf_params.append(item)
+ if not item["enabled"]:
+ shut_params.append(item)
+ if item["name"] in shut_list and item["enabled"]:
+ noshut_params.append(item)
+
+ opcode = None
+ if state == "absent":
+ if intf_params:
+ opcode = "delete"
+ elif state in ("present", "up", "down"):
+ intf_params = self._want
+ opcode = "merge"
+
+ self._result["xml"] = []
+ _edit_filter_list = list()
+ if opcode:
+ _edit_filter_list.append(
+ build_xml(
+ "interface-configurations",
+ xmap=self._intf_meta,
+ params=intf_params,
+ opcode=opcode,
+ )
+ )
+
+ if opcode == "merge":
+ if len(shut_params):
+ _edit_filter_list.append(
+ build_xml(
+ "interface-configurations",
+ xmap=self._shut_meta,
+ params=shut_params,
+ opcode="merge",
+ )
+ )
+ if len(noshut_params):
+ _edit_filter_list.append(
+ build_xml(
+ "interface-configurations",
+ xmap=self._shut_meta,
+ params=noshut_params,
+ opcode="delete",
+ )
+ )
+ diff = None
+ if len(_edit_filter_list):
+ commit = not self._module.check_mode
+ diff = load_config(
+ self._module,
+ _edit_filter_list,
+ commit=commit,
+ running=running,
+ nc_get_filter=_get_filter,
+ )
+
+ if diff:
+ if self._module._diff:
+ self._result["diff"] = dict(prepared=diff)
+
+ self._result["xml"] = _edit_filter_list
+ self._result["changed"] = True
+
+ def check_declarative_intent_params(self):
+ failed_conditions = []
+
+ self._data_rate_meta.update(
+ [
+ (
+ "interfaces",
+ {"xpath": "infra-statistics/interfaces", "tag": True},
+ ),
+ (
+ "interface",
+ {
+ "xpath": "infra-statistics/interfaces/interface",
+ "tag": True,
+ },
+ ),
+ (
+ "a:name",
+ {
+ "xpath": "infra-statistics/interfaces/interface/interface-name"
+ },
+ ),
+ (
+ "cache",
+ {
+ "xpath": "infra-statistics/interfaces/interface/cache",
+ "tag": True,
+ },
+ ),
+ (
+ "data-rate",
+ {
+ "xpath": "infra-statistics/interfaces/interface/cache/data-rate",
+ "tag": True,
+ },
+ ),
+ (
+ "input-data-rate",
+ {
+ "xpath": "infra-statistics/interfaces/interface/cache/data-rate/input-data-rate",
+ "tag": True,
+ },
+ ),
+ (
+ "output-data-rate",
+ {
+ "xpath": "infra-statistics/interfaces/interface/cache/data-rate/output-data-rate",
+ "tag": True,
+ },
+ ),
+ ]
+ )
+
+ self._line_state_meta.update(
+ [
+ (
+ "data-nodes",
+ {"xpath": "interface-properties/data-nodes", "tag": True},
+ ),
+ (
+ "data-node",
+ {
+ "xpath": "interface-properties/data-nodes/data-node",
+ "tag": True,
+ },
+ ),
+ (
+ "system-view",
+ {
+ "xpath": "interface-properties/data-nodes/data-node/system-view",
+ "tag": True,
+ },
+ ),
+ (
+ "interfaces",
+ {
+ "xpath": "interface-properties/data-nodes/data-node/system-view/interfaces",
+ "tag": True,
+ },
+ ),
+ (
+ "interface",
+ {
+ "xpath": "interface-properties/data-nodes/data-node/system-view/interfaces/interface",
+ "tag": True,
+ },
+ ),
+ (
+ "a:name",
+ {
+ "xpath": "interface-properties/data-nodes/data-node/system-view/interfaces/interface/interface-name"
+ },
+ ),
+ (
+ "line-state",
+ {
+ "xpath": "interface-properties/data-nodes/data-node/system-view/interfaces/interface/line-state",
+ "tag": True,
+ },
+ ),
+ ]
+ )
+
+ _rate_filter = build_xml(
+ "infra-statistics",
+ xmap=self._data_rate_meta,
+ params=self._want,
+ opcode="filter",
+ )
+ out = get_oper(self._module, filter=_rate_filter)
+ data_rate_list = etree_findall(out, "interface")
+ data_rate_map = dict()
+ for item in data_rate_list:
+ data_rate_map.update(
+ {etree_find(item, "interface-name").text: dict()}
+ )
+ data_rate_map[etree_find(item, "interface-name").text].update(
+ {
+ "input-data-rate": etree_find(
+ item, "input-data-rate"
+ ).text,
+ "output-data-rate": etree_find(
+ item, "output-data-rate"
+ ).text,
+ }
+ )
+
+ _line_state_filter = build_xml(
+ "interface-properties",
+ xmap=self._line_state_meta,
+ params=self._want,
+ opcode="filter",
+ )
+ out = get_oper(self._module, filter=_line_state_filter)
+ line_state_list = etree_findall(out, "interface")
+ line_state_map = dict()
+ for item in line_state_list:
+ line_state_map.update(
+ {
+ etree_find(item, "interface-name")
+ .text: etree_find(item, "line-state")
+ .text
+ }
+ )
+
+ for want_item in self._want:
+ want_state = want_item.get("state")
+ want_tx_rate = want_item.get("tx_rate")
+ want_rx_rate = want_item.get("rx_rate")
+ if (
+ want_state not in ("up", "down")
+ and not want_tx_rate
+ and not want_rx_rate
+ ):
+ continue
+
+ if self._result["changed"]:
+ sleep(want_item["delay"])
+
+ if want_state in ("up", "down"):
+ if want_state not in line_state_map[want_item["name"]]:
+ failed_conditions.append(
+ "state " + "eq({0!s})".format(want_state)
+ )
+
+ if want_tx_rate:
+ if (
+ want_tx_rate
+ != data_rate_map[want_item["name"]]["output-data-rate"]
+ ):
+ failed_conditions.append("tx_rate " + want_tx_rate)
+
+ if want_rx_rate:
+ if (
+ want_rx_rate
+ != data_rate_map[want_item["name"]]["input-data-rate"]
+ ):
+ failed_conditions.append("rx_rate " + want_rx_rate)
+
+ if failed_conditions:
+ msg = "One or more conditional statements have not been satisfied"
+ self._module.fail_json(
+ msg=msg, failed_conditions=failed_conditions
+ )
+
+ def run(self):
+ self.map_params_to_obj()
+ self.map_obj_to_xml_rpc()
+ self.check_declarative_intent_params()
+ return self._result
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ name=dict(type="str"),
+ description=dict(type="str"),
+ speed=dict(choices=["10", "100", "1000"]),
+ mtu=dict(),
+ duplex=dict(choices=["full", "half"]),
+ enabled=dict(default=True, type="bool"),
+ active=dict(
+ type="str", choices=["active", "preconfigure"], default="active"
+ ),
+ tx_rate=dict(),
+ rx_rate=dict(),
+ delay=dict(default=10, type="int"),
+ state=dict(
+ default="present", choices=["present", "absent", "up", "down"]
+ ),
+ )
+
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["name"] = dict(required=True)
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec)
+ )
+
+ argument_spec.update(element_spec)
+ argument_spec.update(iosxr_argument_spec)
+
+ required_one_of = [["name", "aggregate"]]
+ mutually_exclusive = [["name", "aggregate"]]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=required_one_of,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ config_object = None
+ if is_cliconf(module):
+ # Commenting the below cliconf deprecation support call for Ansible 2.9 as it'll be continued to be supported
+ # module.deprecate("cli support for 'iosxr_interface' is deprecated. Use transport netconf instead",
+ # version='2.9')
+ config_object = CliConfiguration(module)
+ elif is_netconf(module):
+ if module.params["active"] == "preconfigure":
+ module.fail_json(
+ msg="Physical interface pre-configuration is not supported with transport 'netconf'"
+ )
+ config_object = NCConfiguration(module)
+
+ result = {}
+ if config_object:
+ result = config_object.run()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_interfaces.py
new file mode 100644
index 00000000..8a607f65
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_interfaces.py
@@ -0,0 +1,558 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+
+"""
+The module file for iosxr_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: iosxr_interfaces
+short_description: Interfaces resource module
+description: This module manages the interface attributes on Cisco IOS-XR network
+ devices.
+version_added: 1.0.0
+author:
+- Sumit Jaiswal (@justjais)
+- Rohit Thakur (@rohitthakur2590)
+notes:
+- Tested against Cisco IOS-XRv Version 6.1.3 on VIRL.
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+options:
+ config:
+ description: A dictionary of interface options
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of the interface to configure in C(type + path) format. e.g. C(GigabitEthernet0/0/0/0)
+ type: str
+ required: true
+ description:
+ description:
+ - Interface description.
+ type: str
+ enabled:
+ default: true
+ description:
+ - Administrative state of the interface.
+ - Set the value to C(True) to administratively enable the interface or C(False)
+ to disable it.
+ type: bool
+ speed:
+ description:
+ - Configure the speed for an interface. Default is auto-negotiation when not
+ configured.
+ type: int
+ mtu:
+ description:
+ - Sets the MTU value for the interface. Applicable for Ethernet interfaces
+ only.
+ - Refer to vendor documentation for valid values.
+ type: int
+ duplex:
+ description:
+ - Configures the interface duplex mode. Default is auto-negotiation when not
+ configured.
+ type: str
+ choices:
+ - full
+ - half
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ choices:
+ - merged
+ - parsed
+ - deleted
+ - replaced
+ - rendered
+ - gathered
+ - overridden
+ default: merged
+ description:
+ - The state of the configuration after module completion
+ type: str
+"""
+
+EXAMPLES = """
+# Using merged
+# Before state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# vrf custB
+# ipv4 address 178.18.169.23 255.255.255.0
+# dot1q native vlan 30
+# !
+# interface GigabitEthernet0/0/0/3
+# description Replaced by Ansible Team
+# mtu 2000
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# dot1q native vlan 1021
+# !
+- name: Configure Ethernet interfaces
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/2
+ description: Configured by Ansible
+ enabled: true
+ - name: GigabitEthernet0/0/0/3
+ description: Configured by Ansible Network
+ enabled: false
+ duplex: full
+ state: merged
+# After state:
+# ------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# description Configured and Merged by Ansible Network
+# vrf custB
+# ipv4 address 178.18.169.23 255.255.255.0
+# dot1q native vlan 30
+# !
+# interface GigabitEthernet0/0/0/3
+# description Configured and Merged by Ansible Network
+# mtu 2600
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex full
+# shutdown
+# dot1q native vlan 1021
+# !
+# Using replaced
+# Before state:
+# ------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# description Configured by Ansible
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# description Test
+# vrf custB
+# ipv4 address 178.18.169.23 255.255.255.0
+# dot1q native vlan 30
+# !
+# interface GigabitEthernet0/0/0/3
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# dot1q native vlan 1021
+# !
+- name: Configure following interfaces and replace their existing config
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/2
+ description: Configured by Ansible
+ enabled: true
+ mtu: 2000
+ - name: GigabitEthernet0/0/0/3
+ description: Configured by Ansible Network
+ enabled: false
+ duplex: auto
+ state: replaced
+# After state:
+# ------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# description Configured by Ansible
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# description Configured and Replaced by Ansible
+# mtu 2000
+# vrf custB
+# ipv4 address 178.18.169.23 255.255.255.0
+# dot1q native vlan 30
+# !
+# interface GigabitEthernet0/0/0/3
+# description Configured and Replaced by Ansible Network
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex half
+# shutdown
+# dot1q native vlan 1021
+# !
+# Using overridden
+# Before state:
+# ------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# description Configured by Ansible
+# vrf custB
+# ipv4 address 178.18.169.23 255.255.255.0
+# dot1q native vlan 30
+# !
+# interface GigabitEthernet0/0/0/3
+# description Configured by Ansible
+# mtu 2600
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex full
+# shutdown
+# dot1q native vlan 1021
+# !
+- name: Override interfaces
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/2
+ description: Configured by Ansible
+ enabled: true
+ duplex: auto
+ - name: GigabitEthernet0/0/0/3
+ description: Configured by Ansible Network
+ enabled: false
+ speed: 1000
+ state: overridden
+# After state:
+# ------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# description Configured and Overridden by Ansible Network
+# vrf custB
+# ipv4 address 178.18.169.23 255.255.255.0
+# speed 1000
+# dot1q native vlan 30
+# !
+# interface GigabitEthernet0/0/0/3
+# description Configured and Overridden by Ansible Network
+# mtu 2000
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex full
+# shutdown
+# dot1q native vlan 1021
+# !
+# Using deleted
+# Before state:
+# ------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# description Configured and Overridden by Ansible Network
+# vrf custB
+# ipv4 address 178.18.169.23 255.255.255.0
+# speed 1000
+# dot1q native vlan 30
+# !
+# interface GigabitEthernet0/0/0/3
+# description Configured and Overridden by Ansible Network
+# mtu 2000
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex full
+# shutdown
+# dot1q native vlan 1021
+# !
+- name: Delete IOSXR interfaces as in given arguments
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/2
+ - name: GigabitEthernet0/0/0/3
+ state: deleted
+# After state:
+# ------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# vrf custB
+# ipv4 address 178.18.169.23 255.255.255.0
+# dot1q native vlan 30
+# !
+# interface GigabitEthernet0/0/0/3
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# dot1q native vlan 1021
+# !
+# Using parsed
+# parsed.cfg
+# ------------
+#
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 10.8.38.70 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/0
+# description Configured and Merged by Ansible-Network
+# mtu 110
+# ipv4 address 172.31.1.1 255.255.255.0
+# duplex half
+# !
+# interface GigabitEthernet0/0/0/3
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/4
+# shutdown
+# !
+# - name: Convert ACL interfaces config to argspec without connecting to the appliance
+# cisco.iosxr.iosxr_interfaces:
+# running_config: "{{ lookup('file', './parsed.cfg') }}"
+# state: parsed
+# Task Output (redacted)
+# -----------------------
+# "parsed": [
+# {
+# "name": "MgmtEth0/RP0/CPU0/0"
+# },
+# {
+# "access_groups": [
+# {
+# "acls": [
+# {
+# "direction": "in",
+# "name": "acl_1"
+# },
+# {
+# "direction": "out",
+# "name": "acl_2"
+# }
+# ],
+# "afi": "ipv4"
+# },
+# {
+# "acls": [
+# {
+# "direction": "in",
+# "name": "acl6_1"
+# },
+# {
+# "direction": "out",
+# "name": "acl6_2"
+# }
+# ],
+# "afi": "ipv6"
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/0"
+# },
+# {
+# "access_groups": [
+# {
+# "acls": [
+# {
+# "direction": "out",
+# "name": "acl_1"
+# }
+# ],
+# "afi": "ipv4"
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/1"
+# }
+# ]
+# }
+# Using rendered
+- name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ description: Configured and Merged by Ansible-Network
+ mtu: 110
+ enabled: true
+ duplex: half
+ - name: GigabitEthernet0/0/0/1
+ description: Configured and Merged by Ansible-Network
+ mtu: 2800
+ enabled: false
+ speed: 100
+ duplex: full
+ state: rendered
+# Task Output (redacted)
+# -----------------------
+# "rendered": [
+# "interface GigabitEthernet0/0/0/0",
+# "description Configured and Merged by Ansible-Network",
+# "mtu 110",
+# "duplex half",
+# "no shutdown",
+# "interface GigabitEthernet0/0/0/1",
+# "description Configured and Merged by Ansible-Network",
+# "mtu 2800",
+# "speed 100",
+# "duplex full",
+# "shutdown"
+# ]
+# Using gathered
+# Before state:
+# ------------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config interface
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 10.8.38.70 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/0
+# description Configured and Merged by Ansible-Network
+# mtu 110
+# ipv4 address 172.31.1.1 255.255.255.0
+# duplex half
+# !
+# interface GigabitEthernet0/0/0/3
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/4
+# shutdown
+# !
+- name: Gather IOSXR interfaces as in given arguments
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ state: gathered
+# Task Output (redacted)
+# -----------------------
+#
+# "gathered": [
+# {
+# "description": "test for ansible",
+# "enabled": false,
+# "name": "Loopback888"
+# },
+# {
+# "description": "Configured and Merged by Ansible-Network",
+# "duplex": "half",
+# "enabled": true,
+# "mtu": 110,
+# "name": "GigabitEthernet0/0/0/0"
+# },
+# {
+# "enabled": false,
+# "name": "GigabitEthernet0/0/0/3"
+# },
+# {
+# "enabled": false,
+# "name": "GigabitEthernet0/0/0/4"
+# }
+# ]
+# After state:
+# ------------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config interface
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 10.8.38.70 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/0
+# description Configured and Merged by Ansible-Network
+# mtu 110
+# ipv4 address 172.31.1.1 255.255.255.0
+# duplex half
+# !
+# interface GigabitEthernet0/0/0/3
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/4
+# shutdown
+# !
+"""
+
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['interface GigabitEthernet0/0/0/2', 'description: Configured by Ansible', 'shutdown']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.interfaces.interfaces import (
+ InterfacesArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.interfaces.interfaces import (
+ Interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=InterfacesArgs.argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ mutually_exclusive=mutually_exclusive,
+ )
+
+ result = Interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_l2_interfaces.py
new file mode 100644
index 00000000..c92104d9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_l2_interfaces.py
@@ -0,0 +1,687 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+GENERATOR_VERSION = "1.0"
+
+
+DOCUMENTATION = """
+module: iosxr_l2_interfaces
+short_description: L2 interfaces resource module
+description: This module manages the Layer-2 interface attributes on Cisco IOS-XR
+ devices.
+version_added: 1.0.0
+author:
+- Sumit Jaiswal (@justjais)
+- Rohit Thakur (@rohitthakur2590)
+notes:
+- Tested against Cisco IOS-XRv Version 6.1.3 on VIRL.
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+options:
+ config:
+ description: A dictionary of Layer-2 interface options
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of the interface/sub-interface excluding any logical unit number,
+ e.g. GigabitEthernet0/0/0/1 or GigabitEthernet0/0/0/1.100.
+ type: str
+ required: true
+ native_vlan:
+ description:
+ - Configure a native VLAN ID for the trunk
+ type: int
+ l2transport:
+ description:
+ - Switchport mode access command to configure the interface as a layer 2 access
+ type: bool
+ l2protocol:
+ description:
+ - Configures Layer 2 protocol tunneling and protocol data unit (PDU) filtering
+ on an interface.
+ type: list
+ elements: dict
+ suboptions:
+ cdp:
+ description:
+ - Cisco Discovery Protocol (CDP) tunneling and data unit parameters.
+ choices:
+ - drop
+ - forward
+ - tunnel
+ type: str
+ pvst:
+ description:
+ - Configures the per-VLAN Spanning Tree Protocol (PVST) tunneling and
+ data unit parameters.
+ choices:
+ - drop
+ - forward
+ - tunnel
+ type: str
+ stp:
+ description:
+ - Spanning Tree Protocol (STP) tunneling and data unit parameters.
+ choices:
+ - drop
+ - forward
+ - tunnel
+ type: str
+ vtp:
+ description:
+ - VLAN Trunk Protocol (VTP) tunneling and data unit parameters.
+ choices:
+ - drop
+ - forward
+ - tunnel
+ type: str
+ q_vlan:
+ description:
+ - 802.1Q VLAN configuration. Note that it can accept either 2 VLAN IDs when
+ configuring Q-in-Q VLAN, or it will accept 1 VLAN ID and 'any' as input
+ list when configuring Q-in-any vlan as input. Note, that this option is
+ valid only with respect to Sub-Interface and is not valid when configuring
+ for Interface.
+ type: list
+ elements: int
+ propagate:
+ description:
+ - Propagate Layer 2 transport events. Note that it will work only when the
+ I(l2tranport) option is set to TRUE
+ type: bool
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - rendered
+ - gathered
+ - parsed
+ default: merged
+ description:
+ - The state of the configuration after module completion
+ type: str
+"""
+
+EXAMPLES = """
+# Using merged
+#
+# Before state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/3
+# description Ansible Network
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex half
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/4
+# description Test description
+# !
+
+- name: Merge provided configuration with device configuration
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/3
+ native_vlan: 20
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ l2transport: true
+ l2protocol:
+ - stp: tunnel
+ - name: GigabitEthernet0/0/0/3.900
+ l2transport: true
+ q_vlan:
+ - 20
+ - 40
+ state: merged
+
+# After state:
+# ------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/3
+# description Ansible Network
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex half
+# shutdown
+# dot1q native vlan 20
+# !
+# interface GigabitEthernet0/0/0/4
+# description Test description
+# dot1q native vlan 10
+# l2transport
+# l2protocol stp tunnel
+# !
+# !
+# interface GigabitEthernet0/0/0/3.900 l2transport
+# dot1q vlan 20 40
+# !
+
+# Using replaced
+#
+# Before state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/3
+# description Ansible Network
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex half
+# shutdown
+# dot1q native vlan 20
+# !
+# interface GigabitEthernet0/0/0/4
+# description Test description
+# dot1q native vlan 10
+# l2transport
+# l2protocol stp tunnel
+# !
+# !
+# interface GigabitEthernet0/0/0/3.900 l2transport
+# dot1q vlan 20 40
+# !
+
+- name: Replaces device configuration of listed interfaces with provided configuration
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ l2transport: true
+ l2protocol:
+ - stp: forward
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - any
+ state: replaced
+
+# After state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/3
+# description Ansible Network
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex half
+# shutdown
+# dot1q native vlan 20
+# !
+# interface GigabitEthernet0/0/0/4
+# description Test description
+# dot1q native vlan 40
+# l2transport
+# l2protocol stp forward
+# !
+# !
+# interface GigabitEthernet0/0/0/3.900 l2transport
+# dot1q vlan 20 any
+# !
+
+# Using overridden
+#
+# Before state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/3
+# description Ansible Network
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex half
+# shutdown
+# dot1q native vlan 20
+# !
+# interface GigabitEthernet0/0/0/4
+# description Test description
+# dot1q native vlan 10
+# l2transport
+# l2protocol stp tunnel
+# !
+# !
+# interface GigabitEthernet0/0/0/3.900 l2transport
+# dot1q vlan 20 40
+# !
+
+- name: Override device configuration of all interfaces with provided configuration
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ l2transport: true
+ l2protocol:
+ - stp: forward
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - any
+ state: overridden
+
+# After state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/3
+# description Ansible Network
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex half
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/4
+# description Test description
+# dot1q native vlan 40
+# l2transport
+# l2protocol stp forward
+# !
+# !
+# interface GigabitEthernet0/0/0/3.900
+# dot1q vlan 20 any
+# !
+
+# Using deleted
+#
+# Before state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/3
+# description Ansible Network
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex half
+# shutdown
+# dot1q native vlan 20
+# !
+# interface GigabitEthernet0/0/0/4
+# description Test description
+# dot1q native vlan 10
+# l2transport
+# l2protocol stp tunnel
+# !
+# !
+#
+
+- name: "Delete L2 attributes of given interfaces (Note: This won't delete the interface itself)"
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/4
+ state: deleted
+
+# After state:
+# ------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/3
+# description Ansible Network
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex half
+# shutdown
+# dot1q native vlan 20
+# !
+# interface GigabitEthernet0/0/0/4
+# description Test description
+# !
+
+# Using Deleted without any config passed
+# "(NOTE: This will delete all of configured resource module attributes from each configured interface)"
+#
+# Before state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/3
+# description Ansible Network
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex half
+# shutdown
+# dot1q native vlan 20
+# !
+# interface GigabitEthernet0/0/0/4
+# description Test description
+# dot1q native vlan 10
+# l2transport
+# l2protocol stp tunnel
+# !
+# !
+
+- name: "Delete L2 attributes of all interfaces (Note: This won't delete the interface itself)"
+ cisco.iosxr.iosxr_l2_interfaces:
+ state: deleted
+
+# After state:
+# ------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/3
+# description Ansible Network
+# vrf custB
+# ipv4 address 10.10.0.2 255.255.255.0
+# duplex half
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/4
+# description Test description
+# !
+
+
+# Using parsed
+# parsed.cfg
+# ------------
+#
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 10.8.38.70 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/0
+# description Configured and Merged by Ansible-Network
+# mtu 110
+# ipv4 address 172.31.1.1 255.255.255.0
+# duplex half
+# !
+# interface GigabitEthernet0/0/0/1
+# dot1q native vlan 10
+# l2transport
+# l2protocol cdp forward
+# l2protocol pvst tunnel
+# propagate remote-status
+# !
+# !
+# interface GigabitEthernet0/0/0/3
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.900
+# encapsulation dot1q 20 second-dot1q 40
+# !
+# interface GigabitEthernet0/0/0/4
+# shutdown
+# dot1q native vlan 40
+# !
+- name: Convert L2 interfaces config to argspec without connecting to the appliance
+ cisco.iosxr.iosxr_l2_interfaces:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+# Task Output (redacted)
+# -----------------------
+# "parsed": [
+# {
+# "name": "GigabitEthernet0/0/0/0"
+# },
+# {
+# "l2protocol": [
+# {
+# "cdp": "forward"
+# },
+# {
+# "pvst": "tunnel"
+# }
+# ],
+# "l2transport": true,
+# "name": "GigabitEthernet0/0/0/1",
+# "native_vlan": 10,
+# "propagate": true
+# },
+# {
+# "name": "GigabitEthernet0/0/0/3"
+# },
+# {
+# "name": "GigabitEthernet0/0/0/3.900",
+# "q_vlan": [
+# 20,
+# 40
+# ]
+# },
+# {
+# "name": "GigabitEthernet0/0/0/4",
+# "native_vlan": 40
+# }
+# ]
+
+
+# Using rendered
+- name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/1
+ native_vlan: 10
+ l2transport: true
+ l2protocol:
+
+ - pvst: tunnel
+
+ - cdp: forward
+ propagate: true
+
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - 40
+
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ state: rendered
+# Task Output (redacted)
+# -----------------------
+# "rendered": [
+# "interface GigabitEthernet0/0/0/1",
+# "dot1q native vlan 10",
+# "l2transport l2protocol pvst tunnel",
+# "l2transport l2protocol cdp forward",
+# "l2transport propagate remote-status",
+# "interface GigabitEthernet0/0/0/3.900",
+# "dot1q vlan 20 40",
+# "interface GigabitEthernet0/0/0/4",
+# "dot1q native vlan 40"
+# ]
+
+
+# Using gathered
+# Before state:
+# ------------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config interface
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 10.8.38.70 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/0
+# description Configured and Merged by Ansible-Network
+# mtu 110
+# ipv4 address 172.31.1.1 255.255.255.0
+# duplex half
+# !
+# interface GigabitEthernet0/0/0/1
+# dot1q native vlan 10
+# l2transport
+# l2protocol cdp forward
+# l2protocol pvst tunnel
+# propagate remote-status
+# !
+# !
+# interface GigabitEthernet0/0/0/3
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.900
+# encapsulation dot1q 20 second-dot1q 40
+# !
+# interface GigabitEthernet0/0/0/4
+# shutdown
+# dot1q native vlan 40
+# !
+- name: Gather IOSXR l2 interfaces as in given arguments
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ state: gathered
+# Task Output (redacted)
+# -----------------------
+#
+# "gathered": [
+# {
+# "name": "GigabitEthernet0/0/0/0"
+# },
+# {
+# "l2protocol": [
+# {
+# "cdp": "forward"
+# },
+# {
+# "pvst": "tunnel"
+# }
+# ],
+# "l2transport": true,
+# "name": "GigabitEthernet0/0/0/1",
+# "native_vlan": 10,
+# "propagate": true
+# },
+# {
+# "name": "GigabitEthernet0/0/0/3"
+# },
+# {
+# "name": "GigabitEthernet0/0/0/3.900",
+# "q_vlan": [
+# 20,
+# 40
+# ]
+# },
+# {
+# "name": "GigabitEthernet0/0/0/4",
+# "native_vlan": 40
+# }
+# ]
+# After state:
+# ------------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config interface
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 10.8.38.70 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/0
+# description Configured and Merged by Ansible-Network
+# mtu 110
+# ipv4 address 172.31.1.1 255.255.255.0
+# duplex half
+# !
+# interface GigabitEthernet0/0/0/1
+# dot1q native vlan 10
+# l2transport
+# l2protocol cdp forward
+# l2protocol pvst tunnel
+# propagate remote-status
+# !
+# !
+# interface GigabitEthernet0/0/0/3
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.900
+# encapsulation dot1q 20 second-dot1q 40
+# !
+# interface GigabitEthernet0/0/0/4
+# shutdown
+# dot1q native vlan 40
+# !
+
+
+
+"""
+
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['interface GigabitEthernet0/0/0/2', 'l2transport l2protocol pvst tunnel']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.l2_interfaces.l2_interfaces import (
+ L2_InterfacesArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.l2_interfaces.l2_interfaces import (
+ L2_Interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=L2_InterfacesArgs.argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ mutually_exclusive=mutually_exclusive,
+ )
+
+ result = L2_Interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_l3_interfaces.py
new file mode 100644
index 00000000..07af8314
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_l3_interfaces.py
@@ -0,0 +1,671 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat Inc.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+##############################################
+# WARNING
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#
+##############################################
+
+"""
+The module file for ios_l3_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_l3_interfaces
+short_description: L3 interfaces resource module
+description: This module provides declarative management of Layer-3 interface on Cisco
+ IOS-XR devices.
+version_added: 1.0.0
+author:
+- Sumit Jaiswal (@justjais)
+- Rohit Thakur (@rohitthakur2590)
+notes:
+- Tested against Cisco IOS-XRv Version 6.1.3 on VIRL.
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+options:
+ config:
+ description: A dictionary of Layer-3 interface options
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.
+ type: str
+ required: true
+ ipv4:
+ description:
+ - IPv4 address to be set for the Layer-3 interface mentioned in I(name) option.
+ - The address format is <ipv4 address>/<mask>, the mask is number in range
+ 0-32 eg. 192.168.0.1/24
+ type: list
+ elements: dict
+ suboptions:
+ address:
+ description:
+ - Configures the IPv4 address for Interface.
+ type: str
+ secondary:
+ description:
+ - Configures the IP address as a secondary address.
+ type: bool
+ ipv6:
+ description:
+ - IPv6 address to be set for the Layer-3 interface mentioned in I(name) option.
+ - The address format is <ipv6 address>/<mask>, the mask is number in range
+ 0-128 eg. fd5d:12c9:2201:1::1/64
+ type: list
+ elements: dict
+ suboptions:
+ address:
+ description:
+ - Configures the IPv6 address for Interface.
+ type: str
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - parsed
+ - rendered
+ - gathered
+ default: merged
+ description:
+ - The state of the configuration after module completion
+ type: str
+"""
+
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3
+# ipv4 address 192.168.0.2 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.700
+# !
+# interface GigabitEthernet0/0/0/4
+# ipv6 address fd5d:12c9:2201:1::1/64
+# shutdown
+# !
+
+- name: Merge provided configuration with device configuration
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/2
+ ipv4:
+ - address: 192.168.0.1/24
+ - name: GigabitEthernet0/0/0/3
+ ipv4:
+ - address: 192.168.2.1/24
+ secondary: true
+ state: merged
+
+# After state:
+# ------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# ipv4 address 192.168.0.1 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3
+# ipv4 address 192.168.1.0 255.255.255.0
+# ipv4 address 192.168.2.1 255.255.255.0 secondary
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.700
+# !
+# interface GigabitEthernet0/0/0/4
+# ipv6 address fd5d:12c9:2201:1::1/64
+# shutdown
+# !
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# ipv4 address 192.168.0.1 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3
+# ipv4 address 192.168.1.0 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.700
+# !
+# interface GigabitEthernet0/0/0/4
+# ipv6 address fd5d:12c9:2201:1::1/64
+# shutdown
+# !
+
+- name: Override device configuration of all interfaces with provided configuration
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/3
+ ipv4:
+ - address: 192.168.0.1/24
+ - name: GigabitEthernet0/0/0/3.700
+ ipv4:
+ - address: 192.168.0.2/24
+ - address: 192.168.2.1/24
+ secondary: true
+ state: overridden
+
+# After state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3
+# ipv4 address 192.168.0.1 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.700
+# ipv4 address 192.168.0.2 255.255.255.0
+# ipv4 address 192.168.2.1 255.255.255.0 secondary
+# !
+# interface GigabitEthernet0/0/0/4
+# shutdown
+# !
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3
+# ipv4 address 192.168.0.2 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.700
+# ipv4 address 192.168.0.1 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/4
+# ipv6 address fd5d:12c9:2201:1::1/64
+# shutdown
+# !
+
+- name: Replaces device configuration of listed interfaces with provided configuration
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/3
+ ipv6:
+ - address: fd5d:12c9:2201:1::1/64
+ - name: GigabitEthernet0/0/0/4
+ ipv4:
+ - address: 192.168.0.2/24
+ state: replaced
+
+# After state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3
+# ipv6 address fd5d:12c9:2201:1::1/64
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.700
+# ipv4 address 192.168.0.1 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/4
+# ipv4 address 192.168.0.2 255.255.255.0
+# shutdown
+# !
+
+# Using deleted
+
+# Before state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# ipv4 address 192.168.2.1 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# ipv4 address 192.168.3.1 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3
+# ipv4 address 192.168.0.2 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.700
+# ipv4 address 192.168.0.1 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/4
+# ipv6 address fd5d:12c9:2201:1::1/64
+# shutdown
+# !
+
+- name: "Delete L3 attributes of given interfaces (Note: This won't delete the interface itself)"
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/3
+ - name: GigabitEthernet0/0/0/4
+ - name: GigabitEthernet0/0/0/3.700
+ state: deleted
+
+# After state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# ipv4 address 192.168.2.1 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# ipv4 address 192.168.3.1 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.700
+# !
+# interface GigabitEthernet0/0/0/4
+# shutdown
+# !
+
+# Using Deleted without any config passed
+# "(NOTE: This will delete all of configured resource module attributes from each configured interface)"
+
+# Before state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# ipv4 address 192.168.2.1 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# ipv4 address 192.168.3.1 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3
+# ipv4 address 192.168.0.2 255.255.255.0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.700
+# ipv4 address 192.168.0.1 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/4
+# ipv6 address fd5d:12c9:2201:1::1/64
+# shutdown
+# !
+
+
+- name: "Delete L3 attributes of all interfaces (Note: This won't delete the interface itself)"
+ cisco.iosxr.iosxr_l3_interfaces:
+ state: deleted
+
+# After state:
+# -------------
+#
+# viosxr#show running-config interface
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3.700
+# !
+# interface GigabitEthernet0/0/0/4
+# shutdown
+# !
+
+
+# Using parsed
+# parsed.cfg
+# ------------
+#
+# nterface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 10.8.38.70 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/0
+# description Configured and Merged by Ansible-Network
+# mtu 66
+# ipv4 address 192.0.2.1 255.255.255.0
+# ipv4 address 192.0.2.2 255.255.255.0 secondary
+# ipv6 address 2001:db8:0:3::/64
+# duplex half
+# !
+# interface GigabitEthernet0/0/0/1
+# description Configured and Merged by Ansible-Network
+# mtu 66
+# speed 100
+# duplex full
+# dot1q native vlan 10
+# l2transport
+# l2protocol cdp forward
+# l2protocol pvst tunnel
+# propagate remote-status
+# !
+# !
+# interface GigabitEthernet0/0/0/3
+# ipv4 address 192.0.22.1 255.255.255.0
+# ipv4 address 192.0.23.1 255.255.255.0
+# !
+# - name: Convert L3 interfaces config to argspec without connecting to the appliance
+# cisco.iosxr.iosxr_l3_interfaces:
+# running_config: "{{ lookup('file', './parsed.cfg') }}"
+# state: parsed
+# Task Output (redacted)
+# -----------------------
+# "parsed": [
+# {
+# "ipv4": [
+# {
+# "address": "192.0.2.1 255.255.255.0"
+# },
+# {
+# "address": "192.0.2.2 255.255.255.0",
+# "secondary": true
+# }
+# ],
+# "ipv6": [
+# {
+# "address": "2001:db8:0:3::/64"
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/0"
+# },
+# {
+# "name": "GigabitEthernet0/0/0/1"
+# },
+# {
+# "ipv4": [
+# {
+# "address": "192.0.22.1 255.255.255.0"
+# },
+# {
+# "address": "192.0.23.1 255.255.255.0"
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/3"
+# }
+# ]
+
+
+# Using rendered
+- name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ ipv4:
+
+ - address: 198.51.100.1/24
+
+ - name: GigabitEthernet0/0/0/1
+ ipv6:
+
+ - address: 2001:db8:0:3::/64
+ ipv4:
+
+ - address: 192.0.2.1/24
+
+ - address: 192.0.2.2/24
+ secondary: true
+ state: rendered
+# Task Output (redacted)
+# -----------------------
+# "rendered": [
+# "interface GigabitEthernet0/0/0/0",
+# "ipv4 address 198.51.100.1 255.255.255.0",
+# "interface GigabitEthernet0/0/0/1",
+# "ipv4 address 192.0.2.2 255.255.255.0 secondary",
+# "ipv4 address 192.0.2.1 255.255.255.0",
+# "ipv6 address 2001:db8:0:3::/64"
+# ]
+# Using gathered
+# Before state:
+# ------------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config interface
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 10.8.38.70 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/0
+# description Configured and Merged by Ansible-Network
+# mtu 66
+# ipv4 address 192.0.2.1 255.255.255.0
+# ipv4 address 192.0.2.2 255.255.255.0 secondary
+# ipv6 address 2001:db8:0:3::/64
+# duplex half
+# !
+# interface GigabitEthernet0/0/0/1
+# description Configured and Merged by Ansible-Network
+# mtu 66
+# speed 100
+# duplex full
+# dot1q native vlan 10
+# l2transport
+# l2protocol cdp forward
+# l2protocol pvst tunnel
+# propagate remote-status
+# !
+# !
+# interface GigabitEthernet0/0/0/3
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/4
+# shutdown
+# dot1q native vlan 40
+# !
+- name: Gather IOSXR l3 interfaces as in given arguments
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ state: gathered
+# Task Output (redacted)
+# -----------------------
+#
+# "gathered": [
+# {
+# "name": "Loopback888"
+# },
+# {
+# "ipv4": [
+# {
+# "address": "192.0.2.1 255.255.255.0"
+# },
+# {
+# "address": "192.0.2.2 255.255.255.0",
+# "secondary": true
+# }
+# ],
+# "ipv6": [
+# {
+# "address": "2001:db8:0:3::/64"
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/0"
+# },
+# {
+# "name": "GigabitEthernet0/0/0/1"
+# },
+# {
+# "name": "GigabitEthernet0/0/0/3"
+# },
+# {
+# "name": "GigabitEthernet0/0/0/4"
+# }
+# ]
+# After state:
+# ------------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config interface
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 10.8.38.70 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/0
+# description Configured and Merged by Ansible-Network
+# mtu 66
+# ipv4 address 192.0.2.1 255.255.255.0
+# ipv4 address 192.0.2.2 255.255.255.0 secondary
+# ipv6 address 2001:db8:0:3::/64
+# duplex half
+# !
+# interface GigabitEthernet0/0/0/1
+# description Configured and Merged by Ansible-Network
+# mtu 66
+# speed 100
+# duplex full
+# dot1q native vlan 10
+# l2transport
+# l2protocol cdp forward
+# l2protocol pvst tunnel
+# propagate remote-status
+# !
+# !
+# interface GigabitEthernet0/0/0/3
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/4
+# shutdown
+# dot1q native vlan 40
+# !
+
+
+"""
+
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: The configuration returned will always be in the same format of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device
+ returned: always
+ type: list
+ sample: ['interface GigabitEthernet0/0/0/1', 'ipv4 address 192.168.0.1 255.255.255.0']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.l3_interfaces.l3_interfaces import (
+ L3_InterfacesArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.l3_interfaces.l3_interfaces import (
+ L3_Interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=L3_InterfacesArgs.argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ mutually_exclusive=mutually_exclusive,
+ )
+
+ result = L3_Interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lacp.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lacp.py
new file mode 100644
index 00000000..a005f90a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lacp.py
@@ -0,0 +1,392 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for iosxr_lacp
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_lacp
+short_description: LACP resource module
+description:
+- This module manages Global Link Aggregation Control Protocol (LACP) on IOS-XR devices.
+version_added: 1.0.0
+author:
+- Nilashish Chakraborty (@nilashishc)
+- Rohit Thakur (@rohitthakur2590)
+notes:
+- Tested against IOS-XR 6.1.3.
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+options:
+ config:
+ description: The provided configurations.
+ type: dict
+ suboptions:
+ system:
+ description: This option sets the default system parameters for LACP bundles.
+ type: dict
+ suboptions:
+ priority:
+ description:
+ - The system priority to use in LACP negotiations.
+ - Lower value is higher priority.
+ - Refer to vendor documentation for valid values.
+ type: int
+ mac:
+ type: dict
+ description:
+ - The system MAC related configuration for LACP.
+ suboptions:
+ address:
+ description:
+ - The system ID to use in LACP negotiations.
+ type: str
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config lacp).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state of the configuration after module completion.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - deleted
+ - parsed
+ - rendered
+ - gathered
+ default: merged
+"""
+EXAMPLES = """
+# Using merged
+#
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/0/CPU0:iosxr01#show running-config lacp
+# Tue Jul 16 17:46:08.147 UTC
+# % No such configuration item(s)
+#
+#
+
+- name: Merge provided configuration with device configuration
+ cisco.iosxr.iosxr_lacp:
+ config:
+ system:
+ priority: 10
+ mac:
+ address: 00c1.4c00.bd15
+ state: merged
+
+#
+#
+# -----------------------
+# Module Execution Result
+# -----------------------
+#
+# "before": {}
+#
+#
+# "commands": [
+# "lacp system priority 10",
+# "lacp system mac 00c1.4c00.bd15"
+# ]
+#
+#
+# "after": {
+# "system": {
+# "mac": {
+# "address": "00c1.4c00.bd15"
+# },
+# "priority": 10
+# }
+# }
+#
+# -----------
+# After state
+# -----------
+#
+#
+# RP/0/0/CPU0:iosxr01#sh run lacp
+# Tue Jul 16 17:51:29.365 UTC
+# lacp system mac 00c1.4c00.bd15
+# lacp system priority 10
+#
+#
+
+# Using replaced
+#
+#
+# -------------
+# Before state
+# -------------
+#
+#
+# RP/0/0/CPU0:iosxr01#sh run lacp
+# Tue Jul 16 17:53:59.904 UTC
+# lacp system mac 00c1.4c00.bd15
+# lacp system priority 10
+#
+
+- name: Replace device global lacp configuration with the given configuration
+ cisco.iosxr.iosxr_lacp:
+ config:
+ system:
+ priority: 11
+ state: replaced
+#
+#
+# -----------------------
+# Module Execution Result
+# -----------------------
+# "before": {
+# "system": {
+# "mac": {
+# "address": "00c1.4c00.bd15"
+# },
+# "priority": 10
+# }
+# }
+#
+#
+# "commands": [
+# "no lacp system mac",
+# "lacp system priority 11"
+# ]
+#
+#
+# "after": {
+# "system": {
+# "priority": 11
+# }
+# }
+#
+# -----------
+# After state
+# -----------
+#
+#
+# RP/0/0/CPU0:iosxr01#sh run lacp
+# Tue Jul 16 18:02:40.379 UTC
+# lacp system priority 11
+#
+#
+
+# Using deleted
+#
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/0/CPU0:iosxr01#sh run lacp
+# Tue Jul 16 18:37:09.727 UTC
+# lacp system mac 00c1.4c00.bd15
+# lacp system priority 11
+#
+#
+
+- name: Delete global LACP configurations from the device
+ cisco.iosxr.iosxr_lacp:
+ state: deleted
+
+#
+#
+# -----------------------
+# Module Execution Result
+# -----------------------
+# "before": {
+# "system": {
+# "mac": {
+# "address": "00c1.4c00.bd15"
+# },
+# "priority": 11
+# }
+# }
+#
+#
+# "commands": [
+# "no lacp system mac",
+# "no lacp system priority"
+# ]
+#
+#
+# "after": {}
+#
+# ------------
+# After state
+# ------------
+#
+#
+# RP/0/0/CPU0:iosxr01#sh run lacp
+# Tue Jul 16 18:39:44.116 UTC
+# % No such configuration item(s)
+#
+#
+
+
+# Using parsed
+# parsed.cfg
+# ------------
+#
+# lacp system mac 00c1.4c00.bd15
+# lacp system priority 11
+# - name: Convert LACP config to argspec without connecting to the appliance
+# cisco.iosxr.iosxr_lacp:
+# running_config: "{{ lookup('file', './parsed.cfg') }}"
+# state: parsed
+# Task Output (redacted)
+# -----------------------
+# "parsed": {
+# "system": {
+# "mac": {
+# "address": "00c1.4c00.bd15"
+# },
+# "priority": 11
+# }
+# }
+
+
+# Using rendered
+- name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_lacp:
+ config:
+ system:
+ priority: 11
+ mac:
+ address: 00c1.4c00.bd15
+ state: rendered
+# Task Output (redacted)
+# -----------------------
+# "rendered": [
+# "lacp system priority 11",
+# "lacp system mac 00c1.4c00.bd15"
+# ]
+
+
+# Using gathered
+# Before state:
+# ------------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config lacp
+# lacp system mac 00c1.4c00.bd15
+# lacp system priority 11
+- name: Gather IOSXR LACP configuration
+ cisco.iosxr.iosxr_lacp:
+ config:
+ state: gathered
+# Task Output (redacted)
+# -----------------------
+#
+# "gathered": {
+# "system": {
+# "mac": {
+# "address": "00c1.4c00.bd15"
+# },
+# "priority": 11
+# }
+# }
+# After state:
+# ------------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config lacp
+# lacp system mac 00c1.4c00.bd15
+# lacp system priority
+
+
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['lacp system priority 10', 'lacp system mac 00c1.4c00.bd15']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.lacp.lacp import (
+ LacpArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.lacp.lacp import (
+ Lacp,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=LacpArgs.argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ mutually_exclusive=mutually_exclusive,
+ )
+
+ result = Lacp(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lacp_interfaces.py
new file mode 100644
index 00000000..dc156891
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lacp_interfaces.py
@@ -0,0 +1,652 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for iosxr_lacp_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_lacp_interfaces
+short_description: LACP interfaces resource module
+description:
+- This module manages Link Aggregation Control Protocol (LACP) attributes of interfaces
+ on IOS-XR devices.
+version_added: 1.0.0
+notes:
+- Tested against IOS-XR 6.1.3.
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+author: Nilashish Chakraborty (@nilashishc)
+options:
+ config:
+ description: A dictionary of LACP interfaces options.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name/Identifier of the interface or Ether-Bundle.
+ type: str
+ churn_logging:
+ description:
+ - Specifies the parameter for logging of LACP churn events.
+ - Valid only for ether-bundles.
+ - Mode 'actor' logs actor churn events only.
+ - Mode 'partner' logs partner churn events only.
+ - Mode 'both' logs actor and partner churn events only.
+ type: str
+ choices:
+ - actor
+ - partner
+ - both
+ collector_max_delay:
+ description:
+ - Specifies the collector max delay to be signaled to the LACP partner.
+ - Valid only for ether-bundles.
+ - Refer to vendor documentation for valid values.
+ type: int
+ period:
+ description:
+ - Specifies the rate at which packets are sent or received.
+ - For ether-bundles, this specifies the period to be used by its member links.
+ - Refer to vendor documentation for valid values.
+ type: int
+ switchover_suppress_flaps:
+ description:
+ - Specifies the time for which to suppress flaps during a LACP switchover.
+ - Valid only for ether-bundles.
+ - Refer to vendor documentation for valid values.
+ type: int
+ system:
+ description:
+ - This dict object contains configurable options related to LACP system parameters
+ for ether-bundles.
+ type: dict
+ suboptions:
+ priority:
+ description:
+ - Specifies the system priority to use in LACP negotiations for the bundle.
+ - Refer to vendor documentation for valid values.
+ type: int
+ mac:
+ description:
+ - Specifies the system ID to use in LACP negotiations for the bundle,
+ encoded as a MAC address.
+ type: str
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config int).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state of the configuration after module completion.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - parsed
+ - gathered
+ - rendered
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+#
+#
+# ------------
+# Before state
+# ------------
+#
+#
+#
+# RP/0/0/CPU0:an-iosxr#sh running-config interface
+# Sun Jul 21 18:01:35.079 UTC
+# interface Bundle-Ether10
+# !
+# interface Bundle-Ether11
+# !
+# interface Bundle-Ether12
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1'
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# !
+#
+#
+
+- name: Merge provided configuration with device configuration
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ - name: Bundle-Ether10
+ churn_logging: actor
+ collector_max_delay: 100
+ switchover_suppress_flaps: 500
+
+ - name: Bundle-Ether11
+ system:
+ mac: 00c2.4c00.bd15
+
+ - name: GigabitEthernet0/0/0/1
+ period: 200
+ state: merged
+
+#
+#
+# -----------
+# After state
+# -----------
+#
+#
+# RP/0/0/CPU0:an-iosxr#sh run int
+# Sun Jul 21 18:24:52.413 UTC
+# interface Bundle-Ether10
+# lacp churn logging actor
+# lacp switchover suppress-flaps 500
+# lacp collector-max-delay 100
+# !
+# interface Bundle-Ether11
+# lacp system mac 00c2.4c00.bd15
+# !
+# interface Bundle-Ether12
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# lacp period 200
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# !
+#
+
+
+# Using replaced
+#
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/0/CPU0:an-iosxr#sh run int
+# Sun Jul 21 18:24:52.413 UTC
+# interface Bundle-Ether10
+# lacp churn logging actor
+# lacp switchover suppress-flaps 500
+# lacp collector-max-delay 100
+# !
+# interface Bundle-Ether11
+# lacp system mac 00c2.4c00.bd15
+# !
+# interface Bundle-Ether12
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# lacp period 200
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# !
+#
+
+- name: Replace LACP configuration of listed interfaces with provided configuration
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ - name: Bundle-Ether10
+ churn_logging: partner
+
+ - name: GigabitEthernet0/0/0/2
+ period: 300
+ state: replaced
+
+#
+#
+# -----------
+# After state
+# -----------
+#
+#
+# RP/0/0/CPU0:an-iosxr#sh run int
+# Sun Jul 21 18:50:21.929 UTC
+# interface Bundle-Ether10
+# lacp churn logging partner
+# !
+# interface Bundle-Ether11
+# lacp system mac 00c2.4c00.bd15
+# !
+# interface Bundle-Ether12
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# lacp period 200
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# lacp period 300
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# !
+#
+#
+
+
+# Using overridden
+#
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/0/CPU0:an-iosxr#sh run int
+# Sun Jul 21 18:24:52.413 UTC
+# interface Bundle-Ether10
+# lacp churn logging actor
+# lacp switchover suppress-flaps 500
+# lacp collector-max-delay 100
+# !
+# interface Bundle-Ether11
+# lacp system mac 00c2.4c00.bd15
+# !
+# interface Bundle-Ether12
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# lacp period 200
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# lacp period 200
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# !
+#
+#
+
+- name: Override all interface LACP configuration with provided configuration
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ - name: Bundle-Ether12
+ churn_logging: both
+ collector_max_delay: 100
+ switchover_suppress_flaps: 500
+
+ - name: GigabitEthernet0/0/0/1
+ period: 300
+ state: overridden
+
+#
+#
+# -----------
+# After state
+# -----------
+#
+#
+# RP/0/0/CPU0:an-iosxr(config-if)#do sh run int
+# Sun Jul 21 19:32:36.115 UTC
+# interface Bundle-Ether10
+# !
+# interface Bundle-Ether11
+# !
+# interface Bundle-Ether12
+# lacp churn logging both
+# lacp switchover suppress-flaps 500
+# lacp collector-max-delay 100
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# lacp period 300
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# !
+#
+
+
+# Using deleted
+#
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/0/CPU0:an-iosxr#sh run int
+# Sun Jul 21 18:24:52.413 UTC
+# interface Bundle-Ether10
+# lacp churn logging actor
+# lacp switchover suppress-flaps 500
+# lacp collector-max-delay 100
+# !
+# interface Bundle-Ether11
+# lacp non-revertive
+# !
+# interface Bundle-Ether12
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# lacp period 200
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# lacp period 300
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# !
+#
+
+- name: Deleted LACP configurations of provided interfaces (Note - This won't delete
+ the interface itself)
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ - name: Bundle-Ether10
+ - name: Bundle-Ether11
+ - name: GigabitEthernet0/0/0/1
+ - name: GigabitEthernet0/0/0/2
+ state: deleted
+
+#
+#
+# -----------
+# After state
+# -----------
+#
+#
+# Using parsed:
+
+# parsed.cfg
+# interface Bundle-Ether10
+# lacp churn logging actor
+# lacp switchover suppress-flaps 500
+# lacp collector-max-delay 100
+# !
+# interface Bundle-Ether11
+# lacp system mac 00c2.4c00.bd15
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# lacp period 200
+# !
+#
+
+- name: Convert lacp interfaces config to argspec without connecting to the appliance
+ cisco.iosxr.iosxr_lacp_interfaces:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+
+# --------------
+# Output:
+# --------------
+
+# parsed:
+# - name: Bundle-Ether10
+# churn_logging: actor
+# collector_max_delay: 100
+# switchover_suppress_flaps: 500
+#
+# - name: Bundle-Ether11
+# system:
+# mac: 00c2.4c00.bd15
+#
+# - name: GigabitEthernet0/0/0/1
+# period: 200
+#
+#
+
+# Using gathered:
+
+# Native config:
+# interface Bundle-Ether10
+# lacp churn logging actor
+# lacp switchover suppress-flaps 500
+# lacp collector-max-delay 100
+# !
+# interface Bundle-Ether11
+# lacp system mac 00c2.4c00.bd15
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# lacp period 200
+# !
+#
+
+- name: Gather IOSXR lacp interfaces configuration
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ state: gathered
+
+# ----------
+# Output
+# ---------
+# gathered:
+# - name: Bundle-Ether10
+# churn_logging: actor
+# collector_max_delay: 100
+# switchover_suppress_flaps: 500
+#
+# - name: Bundle-Ether11
+# system:
+# mac: 00c2.4c00.bd15
+#
+# - name: GigabitEthernet0/0/0/1
+# period: 200
+
+# Using rendered:
+
+- name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ - name: Bundle-Ether10
+ churn_logging: actor
+ collector_max_delay: 100
+ switchover_suppress_flaps: 500
+
+ - name: Bundle-Ether11
+ system:
+ mac: 00c2.4c00.bd15
+
+ - name: GigabitEthernet0/0/0/1
+ period: 200
+ state: rendered
+
+# -------------
+# Output
+# -------------
+# rendered: [
+# - "interface Bundle-Ether10"
+# - " lacp churn logging actor"
+# - " lacp switchover suppress-flaps 500"
+# - " lacp collector-max-delay 100"
+# - "interface Bundle-Ether11"
+# - " lacp system mac 00c2.4c00.bd15"
+# - "interface MgmtEth0/0/CPU0/0"
+# - " ipv4 address 192.0.2.11 255.255.255.0"
+# - "interface GigabitEthernet0/0/0/1"
+# - " lacp period 200"
+#
+
+
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface Bundle-Ether10', 'lacp churn logging partner', 'lacp period 150']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.lacp_interfaces.lacp_interfaces import (
+ Lacp_interfacesArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.lacp_interfaces.lacp_interfaces import (
+ Lacp_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=Lacp_interfacesArgs.argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ mutually_exclusive=mutually_exclusive,
+ )
+
+ result = Lacp_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lag_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lag_interfaces.py
new file mode 100644
index 00000000..201365e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lag_interfaces.py
@@ -0,0 +1,853 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for iosxr_lag_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+DOCUMENTATION = """
+module: iosxr_lag_interfaces
+short_description: LAG interfaces resource module
+description:
+- This module manages the attributes of LAG/Ether-Bundle interfaces on IOS-XR devices.
+version_added: 1.0.0
+notes:
+- Tested against IOS-XR 6.1.3.
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+author: Nilashish Chakraborty (@NilashishC)
+options:
+ config:
+ description: A provided Link Aggregation Group (LAG) configuration.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name/Identifier of the LAG/Ether-Bundle to configure.
+ type: str
+ required: true
+ members:
+ description:
+ - List of member interfaces for the LAG/Ether-Bundle.
+ type: list
+ elements: dict
+ suboptions:
+ member:
+ description:
+ - Name of the member interface.
+ type: str
+ mode:
+ description:
+ - Specifies the mode of the operation for the member interface.
+ - Mode 'active' runs LACP in active mode.
+ - Mode 'on' does not run LACP over the port.
+ - Mode 'passive' runs LACP in passive mode over the port.
+ - Mode 'inherit' runs LACP as configured in the bundle.
+ type: str
+ choices: ["on", "active", "passive", "inherit"]
+ mode:
+ description:
+ - LAG mode.
+ - Mode 'active' runs LACP in active mode over the port.
+ - Mode 'on' does not run LACP over the port.
+ - Mode 'passive' runs LACP in passive mode over the port.
+ type: str
+ choices: ["on", "active", "passive"]
+ links:
+ description:
+ - This dict contains configurable options related to LAG/Ether-Bundle links.
+ type: dict
+ suboptions:
+ max_active:
+ description:
+ - Specifies the limit on the number of links that can be active in the LAG/Ether-Bundle.
+ - Refer to vendor documentation for valid values.
+ type: int
+ min_active:
+ description:
+ - Specifies the minimum number of active links needed to bring up the LAG/Ether-Bundle.
+ - Refer to vendor documentation for valid values.
+ type: int
+ load_balancing_hash:
+ description:
+ - Specifies the hash function used for traffic forwarded over the LAG/Ether-Bundle.
+ - Option 'dst-ip' uses the destination IP as the hash function.
+ - Option 'src-ip' uses the source IP as the hash function.
+ type: str
+ choices: ["dst-ip", "src-ip"]
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config int).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state of the configuration after module completion.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - parsed
+ - rendered
+ - gathered
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+#
+#
+# ------------
+# Before state
+# ------------
+#
+# RP/0/0/CPU0:iosxr01#show run int
+# Sun Jul 7 19:42:59.416 UTC
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description "GigabitEthernet - 1"
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# !
+#
+#
+- name: Merge provided configuration with device configuration
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ - name: Bundle-Ether10
+ members:
+ - member: GigabitEthernet0/0/0/1
+ mode: inherit
+ - member: GigabitEthernet0/0/0/3
+ mode: inherit
+ mode: active
+ links:
+ max_active: 5
+ min_active: 2
+ load_balancing_hash: src-ip
+
+ - name: Bundle-Ether12
+ members:
+ - member: GigabitEthernet0/0/0/2
+ mode: passive
+ - member: GigabitEthernet0/0/0/4
+ mode: passive
+ load_balancing_hash: dst-ip
+ state: merged
+#
+#
+# -----------
+# After state
+# -----------
+#
+# RP/0/0/CPU0:iosxr01#show run int
+# Sun Jul 7 20:51:17.685 UTC
+# interface Bundle-Ether10
+# lacp mode active
+# bundle load-balancing hash src-ip
+# bundle maximum-active links 5
+# bundle minimum-active links 2
+# !
+# interface Bundle-Ether12
+# bundle load-balancing hash dst-ip
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# bundle id 12 mode passive
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# bundle id 12 mode passive
+# !
+#
+
+
+# Using replaced
+#
+#
+# -------------
+# Before state
+# -------------
+#
+#
+# RP/0/0/CPU0:iosxr01#sho run int
+# Sun Jul 7 20:58:06.527 UTC
+# interface Bundle-Ether10
+# lacp mode active
+# bundle load-balancing hash src-ip
+# bundle maximum-active links 5
+# bundle minimum-active links 2
+# !
+# interface Bundle-Ether12
+# bundle load-balancing hash dst-ip
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# bundle id 12 mode passive
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# bundle id 12 mode passive
+# !
+#
+#
+- name: Replace device configuration of listed Bundles with provided configurations
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ - name: Bundle-Ether12
+ members:
+ - name: GigabitEthernet0/0/0/2
+ mode: passive
+
+ - name: Bundle-Ether11
+ members:
+ - name: GigabitEthernet0/0/0/4
+ load_balancing_hash: src-ip
+ state: replaced
+#
+#
+# -----------
+# After state
+# -----------
+#
+#
+# RP/0/0/CPU0:iosxr01#sh run int
+# Sun Jul 7 21:22:27.397 UTC
+# interface Bundle-Ether10
+# lacp mode active
+# bundle load-balancing hash src-ip
+# bundle maximum-active links 5
+# bundle minimum-active links 2
+# !
+# interface Bundle-Ether11
+# bundle load-balancing hash src-ip
+# !
+# interface Bundle-Ether12
+# lacp mode passive
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# bundle id 12 mode on
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# bundle id 11 mode on
+# !
+#
+#
+
+
+# Using overridden
+#
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/0/CPU0:iosxr01#sh run int
+# Sun Jul 7 21:22:27.397 UTC
+# interface Bundle-Ether10
+# lacp mode active
+# bundle load-balancing hash src-ip
+# bundle maximum-active links 5
+# bundle minimum-active links 2
+# !
+# interface Bundle-Ether11
+# bundle load-balancing hash src-ip
+# !
+# interface Bundle-Ether12
+# lacp mode passive
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# bundle id 12 mode on
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# bundle id 11 mode on
+# !
+#
+#
+
+- name: Overrides all device configuration with provided configuration
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ - name: Bundle-Ether10
+ members:
+ - member: GigabitEthernet0/0/0/1
+ mode: inherit
+ - member: GigabitEthernet0/0/0/2
+ mode: inherit
+ mode: active
+ load_balancing_hash: dst-ip
+ state: overridden
+#
+#
+# ------------
+# After state
+# ------------
+#
+#
+# RP/0/0/CPU0:iosxr01#sh run int
+# Sun Jul 7 21:43:04.802 UTC
+# interface Bundle-Ether10
+# lacp mode active
+# bundle load-balancing hash dst-ip
+# !
+# interface Bundle-Ether11
+# !
+# interface Bundle-Ether12
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# !
+#
+#
+
+
+# Using deleted
+#
+#
+# ------------
+# Before state
+# ------------
+#
+# RP/0/0/CPU0:iosxr01#sh run int
+# Sun Jul 7 21:22:27.397 UTC
+# interface Bundle-Ether10
+# lacp mode active
+# bundle load-balancing hash src-ip
+# bundle maximum-active links 5
+# bundle minimum-active links 2
+# !
+# interface Bundle-Ether11
+# bundle load-balancing hash src-ip
+# !
+# interface Bundle-Ether12
+# lacp mode passive
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# bundle id 12 mode on
+# !n
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# bundle id 11 mode on
+# !
+#
+#
+
+- name: Delete attributes of given bundles and removes member interfaces from them
+ (Note - This won't delete the bundles themselves)
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ - name: Bundle-Ether10
+ - name: Bundle-Ether11
+ - name: Bundle-Ether12
+ state: deleted
+
+#
+#
+# ------------
+# After state
+# ------------
+#
+# RP/0/0/CPU0:iosxr01#sh run int
+# Sun Jul 7 21:49:50.004 UTC
+# interface Bundle-Ether10
+# !
+# interface Bundle-Ether11
+# !
+# interface Bundle-Ether12
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# !
+#
+#
+
+# Using deleted (without config)
+#
+#
+# ------------
+# Before state
+# ------------
+#
+# RP/0/0/CPU0:an-iosxr#sh run int
+# Sun Aug 18 19:49:51.908 UTC
+# interface Bundle-Ether10
+# lacp mode active
+# bundle load-balancing hash src-ip
+# bundle maximum-active links 10
+# bundle minimum-active links 2
+# !
+# interface Bundle-Ether11
+# bundle load-balancing hash dst-ip
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/1
+# bundle id 10 mode inherit
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# bundle id 10 mode passive
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3
+# bundle id 11 mode passive
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/4
+# bundle id 11 mode passive
+# shutdown
+# !
+#
+
+- name: Delete attributes of all bundles and removes member interfaces from them (Note
+ - This won't delete the bundles themselves)
+ cisco.iosxr.iosxr_lag_interfaces:
+ state: deleted
+
+#
+#
+# ------------
+# After state
+# ------------
+#
+#
+# RP/0/0/CPU0:an-iosxr#sh run int
+# Sun Aug 18 19:54:22.389 UTC
+# interface Bundle-Ether10
+# !
+# interface Bundle-Ether11
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 10.8.38.69 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/0
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/1
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/2
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/3
+# shutdown
+# !
+# interface GigabitEthernet0/0/0/4
+# shutdown
+# !
+
+# Using parsed:
+
+# parsed.cfg
+
+# interface Bundle-Ether10
+# lacp mode active
+# bundle load-balancing hash src-ip
+# bundle maximum-active links 5
+# bundle minimum-active links 2
+# !
+# interface Bundle-Ether12
+# bundle load-balancing hash dst-ip
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# bundle id 12 mode passive
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# bundle id 12 mode passive
+# !
+#
+- name: Convert lag interfaces config to argspec without connecting to the appliance
+ cisco.iosxr.iosxr_lag_interfaces:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+
+# --------------
+# Output
+# --------------
+# parsed:
+# - name: Bundle-Ether10
+# members:
+# - member: GigabitEthernet0/0/0/1
+# mode: inherit
+# - member: GigabitEthernet0/0/0/3
+# mode: inherit
+# mode: active
+# links:
+# max_active: 5
+# min_active: 2
+# load_balancing_hash: src-ip
+
+# - name: Bundle-Ether12
+# members:
+# - member: GigabitEthernet0/0/0/2
+# mode: passive
+# - member: GigabitEthernet0/0/0/4
+# mode: passive
+# load_balancing_hash: dst-ip
+
+# using gathered
+
+# Device Config:
+# -------------
+
+# interface Bundle-Ether10
+# lacp mode active
+# bundle load-balancing hash src-ip
+# bundle maximum-active links 5
+# bundle minimum-active links 2
+# !
+# interface Bundle-Ether12
+# bundle load-balancing hash dst-ip
+# !
+# interface Loopback888
+# description test for ansible
+# shutdown
+# !
+# interface MgmtEth0/0/CPU0/0
+# ipv4 address 192.0.2.11 255.255.255.0
+# !
+# interface GigabitEthernet0/0/0/1
+# description 'GigabitEthernet - 1"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/2
+# description "GigabitEthernet - 2"
+# bundle id 12 mode passive
+# !
+# interface GigabitEthernet0/0/0/3
+# description "GigabitEthernet - 3"
+# bundle id 10 mode inherit
+# !
+# interface GigabitEthernet0/0/0/4
+# description "GigabitEthernet - 4"
+# bundle id 12 mode passive
+# !
+#
+
+- name: Gather IOSXR lag interfaces configuration
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ state: gathered
+
+# --------------
+# Output
+# --------------
+# gathered:
+# - name: Bundle-Ether10
+# members:
+# - member: GigabitEthernet0/0/0/1
+# mode: inherit
+# - member: GigabitEthernet0/0/0/3
+# mode: inherit
+# mode: active
+# links:
+# max_active: 5
+# min_active: 2
+# load_balancing_hash: src-ip
+
+# - name: Bundle-Ether12
+# members:
+# - member: GigabitEthernet0/0/0/2
+# mode: passive
+# - member: GigabitEthernet0/0/0/4
+# mode: passive
+# load_balancing_hash: dst-ip
+
+# Using rendered:
+- name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ - name: Bundle-Ether10
+ members:
+ - member: GigabitEthernet0/0/0/1
+ mode: inherit
+ - member: GigabitEthernet0/0/0/3
+ mode: inherit
+ mode: active
+ links:
+ max_active: 5
+ min_active: 2
+ load_balancing_hash: src-ip
+
+ - name: Bundle-Ether12
+ members:
+ - member: GigabitEthernet0/0/0/2
+ mode: passive
+ - member: GigabitEthernet0/0/0/4
+ mode: passive
+ load_balancing_hash: dst-ip
+ state: rendered
+
+# Output:
+
+# rendered:
+# [
+# - "interface Bundle-Ether10"
+# - " lacp mode active"
+# - " bundle load-balancing hash src-ip"
+# - " bundle maximum-active links 5"
+# - " bundle minimum-active links 2"
+# - "interface Bundle-Ether12"
+# - " bundle load-balancing hash dst-ip"
+# - "interface Loopback888"
+# - " description test for ansible"
+# - " shutdown"
+# - "interface MgmtEth0/0/CPU0/0"
+# - " ipv4 address 192.0.2.11 255.255.255.0"
+# - "interface GigabitEthernet0/0/0/1"
+# - " description 'GigabitEthernet - 1""
+# - " bundle id 10 mode inherit"
+# - "interface GigabitEthernet0/0/0/2"
+# - " description "GigabitEthernet - 2""
+# - " bundle id 12 mode passive"
+# - "interface GigabitEthernet0/0/0/3"
+# - " description "GigabitEthernet - 3""
+# - " bundle id 10 mode inherit"
+# - "interface GigabitEthernet0/0/0/4"
+# - " description "GigabitEthernet - 4""
+# - " bundle id 12 mode passive"
+# ]
+#
+#
+
+
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface Bundle-Ether10', 'bundle minimum-active links 2', 'bundle load-balancing hash src-ip']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.lag_interfaces.lag_interfaces import (
+ Lag_interfacesArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.lag_interfaces.lag_interfaces import (
+ Lag_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=Lag_interfacesArgs.argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ mutually_exclusive=mutually_exclusive,
+ )
+
+ result = Lag_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lldp_global.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lldp_global.py
new file mode 100644
index 00000000..0aa7bb4b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lldp_global.py
@@ -0,0 +1,489 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for iosxr_lldp_global
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_lldp_global
+short_description: LLDP resource module
+description:
+- This module manages Global Link Layer Discovery Protocol (LLDP) settings on IOS-XR
+ devices.
+version_added: 1.0.0
+notes:
+- Tested against IOS-XR 6.1.3.
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+author: Nilashish Chakraborty (@NilashishC)
+options:
+ config:
+ description: The provided global LLDP configuration.
+ type: dict
+ suboptions:
+ holdtime:
+ description:
+ - Specifies the holdtime (in sec) to be sent in packets.
+ type: int
+ reinit:
+ description:
+ - Specifies the delay (in sec) for LLDP initialization on any interface.
+ type: int
+ subinterfaces:
+ description:
+ - Enable or disable LLDP over sub-interfaces.
+ type: bool
+ timer:
+ description:
+ - Specifies the rate at which LLDP packets are sent (in sec).
+ type: int
+ tlv_select:
+ description:
+ - Specifies the LLDP TLVs to enable or disable.
+ type: dict
+ suboptions:
+ management_address:
+ description:
+ - Enable or disable management address TLV.
+ type: bool
+ port_description:
+ description:
+ - Enable or disable port description TLV.
+ type: bool
+ system_capabilities:
+ description:
+ - Enable or disable system capabilities TLV.
+ type: bool
+ system_description:
+ description:
+ - Enable or disable system description TLV.
+ type: bool
+ system_name:
+ description:
+ - Enable or disable system name TLV.
+ type: bool
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config lldp).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state of the configuration after module completion.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - deleted
+ - parsed
+ - gathered
+ - rendered
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+#
+#
+# -------------
+# Before State
+# -------------
+#
+#
+# RP/0/0/CPU0:an-iosxr#sh run lldp
+# Tue Aug 6 19:27:54.933 UTC
+# % No such configuration item(s)
+#
+#
+
+- name: Merge provided LLDP configuration with the existing configuration
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ holdtime: 100
+ reinit: 2
+ timer: 3000
+ subinterfaces: true
+ tlv_select:
+ management_address: false
+ system_description: false
+ state: merged
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": {}
+#
+# "commands": [
+# "lldp subinterfaces enable",
+# "lldp holdtime 100",
+# "lldp reinit 2",
+# "lldp tlv-select system-description disable",
+# "lldp tlv-select management-address disable",
+# "lldp timer 3000"
+# ]
+#
+# "after": {
+# "holdtime": 100,
+# "reinit": 2,
+# "subinterfaces": true,
+# "timer": 3000,
+# "tlv_select": {
+# "management_address": false,
+# "system_description": false
+# }
+# }
+#
+#
+# ------------
+# After state
+# ------------
+#
+#
+# RP/0/0/CPU0:an-iosxr#sh run lldp
+# Tue Aug 6 21:31:10.587 UTC
+# lldp
+# timer 3000
+# reinit 2
+# subinterfaces enable
+# holdtime 100
+# tlv-select
+# management-address disable
+# system-description disable
+# !
+# !
+#
+#
+
+
+# Using replaced
+#
+#
+# -------------
+# Before State
+# -------------
+#
+# RP/0/0/CPU0:an-iosxr#sh run lldp
+# Tue Aug 6 21:31:10.587 UTC
+# lldp
+# timer 3000
+# reinit 2
+# subinterfaces enable
+# holdtime 100
+# tlv-select
+# management-address disable
+# system-description disable
+# !
+# !
+#
+#
+
+- name: Replace existing LLDP device configuration with provided configuration
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ holdtime: 100
+ tlv_select:
+ port_description: false
+ system_description: true
+ management_description: true
+ state: replaced
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": {
+# "holdtime": 100,
+# "reinit": 2,
+# "subinterfaces": true,
+# "timer": 3000,
+# "tlv_select": {
+# "management_address": false,
+# "system_description": false
+# }
+# }
+#
+# "commands": [
+# "no lldp reinit 2",
+# "no lldp subinterfaces enable",
+# "no lldp timer 3000",
+# "no lldp tlv-select management-address disable",
+# "no lldp tlv-select system-description disable",
+# "lldp tlv-select port-description disable"
+# ]
+#
+# "after": {
+# "holdtime": 100,
+# "tlv_select": {
+# "port_description": false
+# }
+# }
+#
+#
+# ------------
+# After state
+# ------------
+#
+# RP/0/0/CPU0:an-iosxr#sh run lldp
+# Tue Aug 6 21:53:08.407 UTC
+# lldp
+# holdtime 100
+# tlv-select
+# port-description disable
+# !
+# !
+#
+#
+
+
+# Using deleted
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/0/CPU0:an-iosxr#sh run lldp
+# Tue Aug 6 21:31:10.587 UTC
+# lldp
+# timer 3000
+# reinit 2
+# subinterfaces enable
+# holdtime 100
+# tlv-select
+# management-address disable
+# system-description disable
+# !
+# !
+#
+#
+
+- name: Deleted existing LLDP configurations from the device
+ cisco.iosxr.iosxr_lldp_global:
+ state: deleted
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": {
+# "holdtime": 100,
+# "reinit": 2,
+# "subinterfaces": true,
+# "timer": 3000,
+# "tlv_select": {
+# "management_address": false,
+# "system_description": false
+# }
+# },
+#
+# "commands": [
+# "no lldp holdtime 100",
+# "no lldp reinit 2",
+# "no lldp subinterfaces enable",
+# "no lldp timer 3000",
+# "no lldp tlv-select management-address disable",
+# "no lldp tlv-select system-description disable"
+# ]
+#
+# "after": {}
+#
+#
+# -----------
+# After state
+# -----------
+#
+# RP/0/0/CPU0:an-iosxr#sh run lldp
+# Tue Aug 6 21:38:31.187 UTC
+# lldp
+# !
+#
+# Using parsed:
+
+# parsed.cfg
+# lldp
+# timer 3000
+# reinit 2
+# subinterfaces enable
+# holdtime 100
+# tlv-select
+# management-address disable
+# system-description disable
+# !
+# !
+
+- name: Convert lldp global config to argspec without connecting to the appliance
+ cisco.iosxr.iosxr_lldp_global:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+
+# ------------------------
+# Module Execution Result
+# ------------------------
+# parsed:
+# holdtime: 100
+# reinit: 2
+# timer: 3000
+# subinterfaces: True
+# tlv_select:
+# management_address: False
+# system_description: False
+
+# using gathered:
+
+# Device config:
+# lldp
+# timer 3000
+# reinit 2
+# subinterfaces enable
+# holdtime 100
+# tlv-select
+# management-address disable
+# system-description disable
+# !
+# !
+
+- name: Gather IOSXR lldp global configuration
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ state: gathered
+
+
+# ------------------------
+# Module Execution Result
+# ------------------------
+# gathered:
+# holdtime: 100
+# reinit: 2
+# timer: 3000
+# subinterfaces: True
+# tlv_select:
+# management_address: False
+# system_description: False
+
+# using rendered:
+
+- name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ holdtime: 100
+ reinit: 2
+ timer: 3000
+ subinterfaces: true
+ tlv_select:
+ management_address: false
+ system_description: false
+ state: rendered
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "rendered": [
+# "lldp subinterfaces enable",
+# "lldp holdtime 100",
+# "lldp reinit 2",
+# "lldp tlv-select system-description disable",
+# "lldp tlv-select management-address disable",
+# "lldp timer 3000"
+# ]
+
+
+
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['lldp subinterfaces enable', 'lldp holdtime 100', 'no lldp tlv-select management-address disable']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.lldp_global.lldp_global import (
+ Lldp_globalArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.lldp_global.lldp_global import (
+ Lldp_global,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=Lldp_globalArgs.argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ mutually_exclusive=mutually_exclusive,
+ )
+
+ result = Lldp_global(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lldp_interfaces.py
new file mode 100644
index 00000000..f730f62a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lldp_interfaces.py
@@ -0,0 +1,724 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for iosxr_lldp_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_lldp_interfaces
+short_description: LLDP interfaces resource module
+description:
+- This module manages Link Layer Discovery Protocol (LLDP) attributes of interfaces
+ on IOS-XR devices.
+version_added: 1.0.0
+notes:
+- Tested against IOS-XR 6.1.3.
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+author: Nilashish Chakraborty (@nilashishc)
+options:
+ config:
+ description: A dictionary of LLDP interfaces options.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name/Identifier of the interface or Ether-Bundle.
+ type: str
+ destination:
+ description:
+ - Specifies LLDP destination configuration on the interface.
+ suboptions:
+ mac_address:
+ description:
+ - Specifies the LLDP destination mac address on the interface.
+ type: str
+ choices:
+ - ieee-nearest-bridge
+ - ieee-nearest-non-tmpr-bridge
+ type: dict
+ receive:
+ description:
+ - Enable/disable LLDP RX on an interface.
+ type: bool
+ transmit:
+ description:
+ - Enable/disable LLDP TX on an interface.
+ type: bool
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config int).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state of the configuration after module completion.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - parsed
+ - rendered
+ - gathered
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+#
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/RP0/CPU0:ios#sh run int
+# Mon Aug 12 12:40:23.104 UTC
+# interface TenGigE0/0/0/0
+# ipv4 address 192.0.2.11 255.255.255.192
+# !
+# interface preconfigure GigabitEthernet0/0/0/1
+# !
+# interface preconfigure GigabitEthernet0/0/0/2
+# !
+#
+#
+
+- name: Merge provided configuration with running configuration
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ destination:
+ mac_address: ieee-nearest-non-tmpr-bridge
+ transmit: false
+
+ - name: GigabitEthernet0/0/0/2
+ destination:
+ mac_address: ieee-nearest-bridge
+ receive: false
+ state: merged
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+#
+# "before": [
+# {
+# "name": "TenGigE0/0/0/0"
+# },
+# {
+# "name": "GigabitEthernet0/0/0/1"
+# },
+# {
+# "name": "GigabitEthernet0/0/0/2"
+# }
+# ]
+#
+# "commands": [
+# "interface GigabitEthernet0/0/0/2",
+# "lldp destination mac-address ieee-nearest-non-tmpr-bridge",
+# "lldp transmit disable",
+# "interface GigabitEthernet0/0/0/1",
+# "lldp receive disable",
+# "lldp destination mac-address ieee-nearest-bridge"
+# ]
+#
+# "after": [
+# {
+# "name": "TenGigE0/0/0/0"
+# },
+# {
+# "destination": {
+# "mac_address": "ieee-nearest-bridge"
+# },
+# "name": "GigabitEthernet0/0/0/1",
+# "receive": false
+# },
+# {
+# "destination": {
+# "mac_address": "ieee-nearest-non-tmpr-bridge"
+# },
+# "name": "GigabitEthernet0/0/0/2",
+# "transmit": false
+# }
+# ]
+#
+#
+# ------------
+# After state
+# ------------
+#
+#
+# RP/0/RP0/CPU0:ios#sh run int
+# Mon Aug 12 12:49:51.517 UTC
+# interface TenGigE0/0/0/0
+# ipv4 address 192.0.2.11 255.255.255.192
+# !
+# interface preconfigure GigabitEthernet0/0/0/1
+# lldp
+# receive disable
+# destination mac-address
+# ieee-nearest-bridge
+# !
+# !
+# !
+# interface preconfigure GigabitEthernet0/0/0/2
+# lldp
+# transmit disable
+# destination mac-address
+# ieee-nearest-non-tmpr-bridge
+# !
+# !
+# !
+#
+#
+
+
+# Using replaced
+#
+#
+# -------------
+# Before state
+# -------------
+#
+#
+# RP/0/RP0/CPU0:ios#sh run int
+# Mon Aug 12 12:49:51.517 UTC
+# interface TenGigE0/0/0/0
+# ipv4 address 192.0.2.11 255.255.255.192
+# !
+# interface preconfigure GigabitEthernet0/0/0/1
+# lldp
+# receive disable
+# destination mac-address
+# ieee-nearest-bridge
+# !
+# !
+# !
+# interface preconfigure GigabitEthernet0/0/0/2
+# lldp
+# transmit disable
+# destination mac-address
+# ieee-nearest-non-tmpr-bridge
+# !
+# !
+# !
+#
+#
+
+- name: Replace existing LLDP configurations of specified interfaces with provided
+ configuration
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ destination:
+ mac_address: ieee-nearest-non-tmpr-bridge
+ state: replaced
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": [
+# {
+# "name": "TenGigE0/0/0/0"
+# },
+# {
+# "destination": {
+# "mac_address": "ieee-nearest-bridge"
+# },
+# "name": "GigabitEthernet0/0/0/1",
+# "receive": false
+# },
+# {
+# "destination": {
+# "mac_address": "ieee-nearest-non-tmpr-bridge"
+# },
+# "name": "GigabitEthernet0/0/0/2",
+# "transmit": false
+# }
+# ]
+#
+#
+# "commands": [
+# "interface GigabitEthernet0/0/0/1",
+# "no lldp receive disable",
+# "lldp destination mac-address ieee-nearest-non-tmpr-bridge"
+# ]
+#
+#
+# "after": [
+# {
+# "name": "TenGigE0/0/0/0"
+# },
+# {
+# "destination": {
+# "mac_address": "ieee-nearest-non-tmpr-bridge"
+# },
+# "name": "GigabitEthernet0/0/0/1"
+# },
+# {
+# "destination": {
+# "mac_address": "ieee-nearest-non-tmpr-bridge"
+# },
+# "name": "GigabitEthernet0/0/0/2",
+# "transmit": false
+# }
+# ]
+#
+#
+# ------------
+# After state
+# ------------
+#
+#
+# RP/0/RP0/CPU0:ios#sh run int
+# Mon Aug 12 13:02:57.062 UTC
+# interface TenGigE0/0/0/0
+# ipv4 address 192.0.2.11 255.255.255.192
+# !
+# interface preconfigure GigabitEthernet0/0/0/1
+# lldp
+# destination mac-address
+# ieee-nearest-non-tmpr-bridge
+# !
+# !
+# !
+# interface preconfigure GigabitEthernet0/0/0/2
+# lldp
+# transmit disable
+# destination mac-address
+# ieee-nearest-non-tmpr-bridge
+# !
+# !
+# !
+#
+#
+
+
+# Using overridden
+#
+#
+# -------------
+# Before state
+# -------------
+#
+#
+# RP/0/RP0/CPU0:ios#sh run int
+# Mon Aug 12 13:15:40.465 UTC
+# interface TenGigE0/0/0/0
+# ipv4 address 192.0.2.11 255.255.255.192
+# !
+# interface preconfigure GigabitEthernet0/0/0/1
+# lldp
+# receive disable
+# destination mac-address
+# ieee-nearest-bridge
+# !
+# !
+# !
+# interface preconfigure GigabitEthernet0/0/0/2
+# lldp
+# transmit disable
+# destination mac-address
+# ieee-nearest-non-tmpr-bridge
+# !
+# !
+# !
+#
+#
+
+- name: Override the LLDP configurations of all the interfaces with provided configurations
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ transmit: false
+ state: overridden
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+#
+# "before": [
+# {
+# "name": "TenGigE0/0/0/0"
+# },
+# {
+# "destination": {
+# "mac_address": "ieee-nearest-bridge"
+# },
+# "name": "GigabitEthernet0/0/0/1",
+# "receive": false
+# },
+# {
+# "destination": {
+# "mac_address": "ieee-nearest-non-tmpr-bridge"
+# },
+# "name": "GigabitEthernet0/0/0/2",
+# "transmit": false
+# }
+# ]
+#
+# "commands": [
+# "interface GigabitEthernet0/0/0/2",
+# "no lldp destination mac-address ieee-nearest-non-tmpr-bridge",
+# "no lldp transmit disable",
+# "interface GigabitEthernet0/0/0/1",
+# "no lldp destination mac-address ieee-nearest-bridge",
+# "no lldp receive disable",
+# "lldp transmit disable"
+# ]
+#
+#
+# "after": [
+# {
+# "name": "TenGigE0/0/0/0"
+# },
+# {
+# "name": "GigabitEthernet0/0/0/1",
+# "transmit": false
+# },
+# {
+# "name": "GigabitEthernet0/0/0/2"
+# }
+# ]
+#
+#
+# ------------
+# After state
+# ------------
+#
+#
+# RP/0/RP0/CPU0:ios#sh run int
+# Mon Aug 12 13:22:25.604 UTC
+# interface TenGigE0/0/0/0
+# ipv4 address 192.0.2.11 255.255.255.192
+# !
+# interface preconfigure GigabitEthernet0/0/0/1
+# lldp
+# transmit disable
+# !
+# !
+# interface preconfigure GigabitEthernet0/0/0/2
+# !
+#
+#
+
+
+# Using deleted
+#
+#
+# -------------
+# Before state
+# -------------
+#
+#
+# RP/0/RP0/CPU0:ios#sh run int
+# Mon Aug 12 13:26:21.498 UTC
+# interface TenGigE0/0/0/0
+# ipv4 address 192.0.2.11 255.255.255.192
+# !
+# interface preconfigure GigabitEthernet0/0/0/1
+# lldp
+# receive disable
+# destination mac-address
+# ieee-nearest-bridge
+# !
+# !
+# !
+# interface preconfigure GigabitEthernet0/0/0/2
+# lldp
+# transmit disable
+# destination mac-address
+# ieee-nearest-non-tmpr-bridge
+# !
+# !
+# !
+#
+#
+
+- name: Delete LLDP configurations of all interfaces (Note - This won't delete the
+ interfaces themselves)
+ cisco.iosxr.iosxr_lldp_interfaces:
+ state: deleted
+
+#
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+#
+# "before": [
+# {
+# "name": "TenGigE0/0/0/0"
+# },
+# {
+# "destination": {
+# "mac_address": "ieee-nearest-bridge"
+# },
+# "name": "GigabitEthernet0/0/0/1",
+# "receive": false
+# },
+# {
+# "destination": {
+# "mac_address": "ieee-nearest-non-tmpr-bridge"
+# },
+# "name": "GigabitEthernet0/0/0/2",
+# "transmit": false
+# }
+# ]
+#
+#
+# "commands": [
+# "interface GigabitEthernet0/0/0/1",
+# "no lldp destination mac-address ieee-nearest-bridge",
+# "no lldp receive disable",
+# "interface GigabitEthernet0/0/0/2",
+# "no lldp destination mac-address ieee-nearest-non-tmpr-bridge",
+# "no lldp transmit disable"
+# ]
+#
+#
+# "after": [
+# {
+# "name": "TenGigE0/0/0/0"
+# },
+# {
+# "name": "GigabitEthernet0/0/0/1"
+# },
+# {
+# "name": "GigabitEthernet0/0/0/2"
+# }
+# ]
+#
+#
+# ------------
+# After state
+# ------------
+#
+#
+# RP/0/RP0/CPU0:ios#sh run int
+# Mon Aug 12 13:30:14.618 UTC
+# interface TenGigE0/0/0/0
+# ipv4 address 192.0.2.11 255.255.255.192
+# !
+# interface preconfigure GigabitEthernet0/0/0/1
+# !
+# interface preconfigure GigabitEthernet0/0/0/2
+# !
+#
+#
+# Using parsed:
+# parsed.cfg
+
+# interface TenGigE0/0/0/0
+# ipv4 address 192.0.2.11 255.255.255.192
+# !
+# interface preconfigure GigabitEthernet0/0/0/1
+# lldp
+# receive disable
+# destination mac-address
+# ieee-nearest-bridge
+# !
+# !
+# !
+# interface preconfigure GigabitEthernet0/0/0/2
+# lldp
+# transmit disable
+# destination mac-address
+# ieee-nearest-non-tmpr-bridge
+
+- name: Convert lacp interfaces config to argspec without connecting to the appliance
+ cisco.iosxr.iosxr_lldp_interfaces:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+
+# ------------------------
+# Module Execution Result
+# ------------------------
+
+# parsed: [
+# - name: GigabitEthernet0/0/0/1
+# destination:
+# mac_address: ieee-nearest-non-tmpr-bridge
+# transmit: False
+
+# - name: GigabitEthernet0/0/0/2
+# destination:
+# mac_address: ieee-nearest-bridge
+# receive: False
+# ]
+
+# Using gathered:
+# Device config:
+
+# RP/0/RP0/CPU0:ios#sh run int
+# Mon Aug 12 12:49:51.517 UTC
+# interface TenGigE0/0/0/0
+# ipv4 address 192.0.2.11 255.255.255.192
+# !
+# interface preconfigure GigabitEthernet0/0/0/1
+# lldp
+# receive disable
+# destination mac-address
+# ieee-nearest-bridge
+# !
+# !
+# !
+# interface preconfigure GigabitEthernet0/0/0/2
+# lldp
+# transmit disable
+# destination mac-address
+# ieee-nearest-non-tmpr-bridge
+
+- name: Gather IOSXR lldp interfaces configuration
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ state: gathered
+
+# ------------------------
+# Module Execution Result
+# ------------------------
+
+# gathered:
+# - name: GigabitEthernet0/0/0/1
+# destination:
+# mac_address: ieee-nearest-non-tmpr-bridge
+# transmit: False
+
+# - name: GigabitEthernet0/0/0/2
+# destination:
+# mac_address: ieee-nearest-bridge
+# receive: False
+
+# Using rendred:
+- name: Render platform specific commands from task input using rendered state
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ destination:
+ mac_address: ieee-nearest-non-tmpr-bridge
+ transmit: false
+
+ - name: GigabitEthernet0/0/0/2
+ destination:
+ mac_address: ieee-nearest-bridge
+ receive: false
+ state: rendered
+
+# ------------------------
+# Module Execution Result
+# ------------------------
+
+# "rendered": [
+# "interface GigabitEthernet0/0/0/2",
+# "lldp destination mac-address ieee-nearest-non-tmpr-bridge",
+# "lldp transmit disable",
+# "interface GigabitEthernet0/0/0/1",
+# "lldp receive disable",
+# "lldp destination mac-address ieee-nearest-bridge"
+# ]
+
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface GigabitEthernet0/0/0/1', 'lldp destination mac-address ieee-nearest-non-tmpr-bridge', 'no lldp transmit disable']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.lldp_interfaces.lldp_interfaces import (
+ Lldp_interfacesArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.lldp_interfaces.lldp_interfaces import (
+ Lldp_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=Lldp_interfacesArgs.argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ mutually_exclusive=mutually_exclusive,
+ )
+
+ result = Lldp_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_logging.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_logging.py
new file mode 100644
index 00000000..bb6bf2e1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_logging.py
@@ -0,0 +1,1220 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# (c) 2017, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_logging
+author:
+- Trishna Guha (@trishnaguha)
+- Kedar Kekan (@kedarX)
+short_description: Configuration management of system logging services on network
+ devices
+description:
+- This module provides declarative management configuration of system logging (syslog)
+ on Cisco IOS XR devices.
+version_added: 1.0.0
+requirements:
+- ncclient >= 0.5.3 when using netconf
+- lxml >= 4.1.1 when using netconf
+notes:
+- This module works with connection C(network_cli) and C(netconf). See L(the IOS-XR
+ Platform Options,../network/user_guide/platform_iosxr.html).
+- Tested against IOS XRv 6.1.3
+options:
+ dest:
+ description:
+ - Destination for system logging (syslog) messages.
+ choices:
+ - host
+ - console
+ - monitor
+ - buffered
+ - file
+ type: str
+ name:
+ description:
+ - When C(dest) = I(file) name indicates file-name
+ - When C(dest) = I(host) name indicates the host-name or ip-address of syslog
+ server.
+ type: str
+ vrf:
+ description:
+ - vrf name when syslog server is configured, C(dest) = C(host)
+ type: str
+ default: default
+ size:
+ description:
+ - Size of buffer when C(dest) = C(buffered). The acceptable value is in the range
+ I(307200 to 125000000 bytes). Default 307200
+ - Size of file when C(dest) = C(file). The acceptable value is in the range I(1
+ to 2097152)KB. Default 2 GB
+ type: int
+ facility:
+ description:
+ - To configure the type of syslog facility in which system logging (syslog) messages
+ are sent to syslog servers Optional config for C(dest) = C(host)
+ default: local7
+ type: str
+ hostnameprefix:
+ description:
+ - To append a hostname prefix to system logging (syslog) messages logged to syslog
+ servers. Optional config for C(dest) = C(host)
+ type: str
+ level:
+ description:
+ - Specifies the severity level for the logging.
+ type: str
+ default: debugging
+ aliases:
+ - severity
+ choices: ["emergencies", "alerts", "critical", "errors", "warning", "notifications", "informational", "debugging"]
+ aggregate:
+ description: List of syslog logging configuration definitions.
+ type: list
+ elements: dict
+ suboptions:
+ dest:
+ description:
+ - Destination for system logging (syslog) messages.
+ choices:
+ - host
+ - console
+ - monitor
+ - buffered
+ - file
+ type: str
+ name:
+ description:
+ - When C(dest) = I(file) name indicates file-name
+ - When C(dest) = I(host) name indicates the host-name or ip-address of syslog
+ server.
+ type: str
+ vrf:
+ description:
+ - vrf name when syslog server is configured, C(dest) = C(host)
+ type: str
+ size:
+ description:
+ - Size of buffer when C(dest) = C(buffered). The acceptable value is in the range
+ I(307200 to 125000000 bytes). Default 307200
+ - Size of file when C(dest) = C(file). The acceptable value is in the range I(1
+ to 2097152)KB. Default 2 GB
+ type: int
+ facility:
+ description:
+ - To configure the type of syslog facility in which system logging (syslog) messages
+ are sent to syslog servers Optional config for C(dest) = C(host)
+ type: str
+ hostnameprefix:
+ description:
+ - To append a hostname prefix to system logging (syslog) messages logged to syslog
+ servers. Optional config for C(dest) = C(host)
+ type: str
+ level:
+ description:
+ - Specifies the severity level for the logging.
+ type: str
+ aliases:
+ - severity
+ choices: ["emergencies", "alerts", "critical", "errors", "warning", "notifications", "informational", "debugging"]
+ state:
+ description:
+ - Existential state of the logging configuration on the node.
+ choices:
+ - present
+ - absent
+ type: str
+ state:
+ description:
+ - Existential state of the logging configuration on the node.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+extends_documentation_fragment:
+- cisco.iosxr.iosxr
+"""
+
+EXAMPLES = """
+- name: configure logging for syslog server host
+ cisco.iosxr.iosxr_logging:
+ dest: host
+ name: 10.10.10.1
+ level: critical
+ state: present
+
+- name: add hostnameprefix configuration
+ cisco.iosxr.iosxr_logging:
+ hostnameprefix: host1
+ state: absent
+
+- name: add facility configuration
+ cisco.iosxr.iosxr_logging:
+ facility: local1
+ state: present
+
+- name: configure console logging level
+ cisco.iosxr.iosxr_logging:
+ dest: console
+ level: debugging
+ state: present
+
+- name: configure monitor logging level
+ cisco.iosxr.iosxr_logging:
+ dest: monitor
+ level: errors
+ state: present
+
+- name: configure syslog to a file
+ cisco.iosxr.iosxr_logging:
+ dest: file
+ name: file_name
+ size: 2048
+ level: errors
+ state: present
+
+- name: configure buffered logging with size
+ cisco.iosxr.iosxr_logging:
+ dest: buffered
+ size: 5100000
+
+- name: Configure logging using aggregate
+ cisco.iosxr.iosxr_logging:
+ aggregate:
+ - {dest: console, level: warning}
+ - {dest: buffered, size: 4800000}
+ - {dest: file, name: file3, size: 2048}
+ - {dest: host, name: host3, level: critical}
+
+- name: Delete logging using aggregate
+ cisco.iosxr.iosxr_logging:
+ aggregate:
+ - {dest: console, level: warning}
+ - {dest: buffered, size: 4800000}
+ - {dest: file, name: file3, size: 2048}
+ - {dest: host, name: host3, level: critical}
+ state: absent
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always (empty list when no commands to send)
+ type: list
+ sample:
+ - logging 10.10.10.1 vrf default severity debugging
+ - logging facility local7
+ - logging hostnameprefix host1
+ - logging console critical
+ - logging buffered 2097153
+ - logging buffered warnings
+ - logging monitor errors
+ - logging file log_file maxfilesize 1024 severity info
+xml:
+ description: NetConf rpc xml sent to device with transport C(netconf)
+ returned: always (empty list when no xml rpc to send)
+ type: list
+ sample:
+ - '<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <syslog xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-infra-syslog-cfg">
+ <files>
+ <file xc:operation="delete">
+ <file-name>file1</file-name>
+ <file-log-attributes>
+ <max-file-size>2097152</max-file-size>
+ <severity>2</severity>
+ </file-log-attributes>
+ </file>
+ </files>
+ </syslog>
+ </config>'
+"""
+
+import re
+import collections
+from copy import deepcopy
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ get_config,
+ load_config,
+ build_xml,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ iosxr_argument_spec,
+ etree_findall,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ is_netconf,
+ is_cliconf,
+ etree_find,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+
+
+severity_level = {
+ "emergency": "0",
+ "alert": "1",
+ "critical": "2",
+ "error": "3",
+ "warning": "4",
+ "notice": "5",
+ "info": "6",
+ "debug": "7",
+ "disable": "15",
+}
+
+severity_transpose = {
+ "emergencies": "emergency",
+ "alerts": "alert",
+ "critical": "critical",
+ "errors": "error",
+ "warning": "warning",
+ "notifications": "notice",
+ "informational": "info",
+ "debugging": "debug",
+}
+
+
+class ConfigBase(object):
+ def __init__(self, module):
+ self._flag = None
+ self._module = module
+ self._result = {"changed": False, "warnings": []}
+ self._want = list()
+ self._have = list()
+
+ def validate_size(self, value, type=None):
+ if value:
+ if type == "buffer":
+ if value and not int(307200) <= value <= int(125000000):
+ self._module.fail_json(
+ msg="buffer size must be between 307200 and 125000000"
+ )
+ elif type == "file":
+ if value and not int(1) <= value <= int(2097152):
+ self._module.fail_json(
+ msg="file size must be between 1 and 2097152"
+ )
+ return value
+
+ def map_params_to_obj(self, required_if=None):
+ aggregate = self._module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = self._module.params[key]
+
+ d = item.copy()
+
+ if d["dest"] not in ("host", "file"):
+ d["name"] = None
+
+ if d["dest"] == "buffered":
+ if d["size"] is not None:
+ d["size"] = str(
+ self.validate_size(d["size"], "buffer")
+ )
+ else:
+ d["size"] = str(307200)
+ elif d["dest"] == "file":
+ if d["size"] is not None:
+ d["size"] = str(self.validate_size(d["size"], "file"))
+ else:
+ d["size"] = str(2097152)
+ else:
+ d["size"] = None
+
+ if self._flag == "NC":
+ d["level"] = severity_transpose[d["level"]]
+
+ self._want.append(d)
+
+ else:
+ params = self._module.params
+ if params["dest"] not in ("host", "file"):
+ params["name"] = None
+
+ if params["dest"] == "buffered":
+ if params["size"] is not None:
+ params["size"] = str(
+ self.validate_size(params["size"], "buffer")
+ )
+ else:
+ params["size"] = str(307200)
+ elif params["dest"] == "file":
+ if params["size"] is not None:
+ params["size"] = str(
+ self.validate_size(params["size"], "file")
+ )
+ else:
+ params["size"] = str(2097152)
+ else:
+ params["size"] = None
+
+ if self._flag == "NC":
+ params["level"] = severity_transpose[params["level"]]
+
+ self._want.append(
+ {
+ "dest": params["dest"],
+ "name": params["name"],
+ "vrf": params["vrf"],
+ "size": params["size"],
+ "facility": params["facility"],
+ "level": params["level"],
+ "hostnameprefix": params["hostnameprefix"],
+ "state": params["state"],
+ }
+ )
+
+
+class CliConfiguration(ConfigBase):
+ def __init__(self, module):
+ super(CliConfiguration, self).__init__(module)
+ self._file_list = set()
+ self._host_list = set()
+
+ def map_obj_to_commands(self):
+ commands = list()
+ for want_item in self._want:
+ dest = want_item["dest"]
+ name = want_item["name"]
+ size = want_item["size"]
+ facility = want_item["facility"]
+ level = want_item["level"]
+ vrf = want_item["vrf"]
+ hostnameprefix = want_item["hostnameprefix"]
+ state = want_item["state"]
+ del want_item["state"]
+
+ have_size = None
+ have_console_level = None
+ have_monitor_level = None
+ have_prefix = None
+ have_facility = None
+
+ for item in self._have:
+ if item["dest"] == "buffered":
+ have_size = item["size"]
+ if item["dest"] == "console":
+ have_console_level = item["level"]
+ if item["dest"] == "monitor":
+ have_monitor_level = item["level"]
+ if item["dest"] is None and item["hostnameprefix"] is not None:
+ have_prefix = item["hostnameprefix"]
+ if (
+ item["dest"] is None
+ and item["hostnameprefix"] is None
+ and item["facility"] is not None
+ ):
+ have_facility = item["facility"]
+
+ if state == "absent":
+ if dest == "host" and name in self._host_list:
+ commands.append("no logging {0} vrf {1}".format(name, vrf))
+ elif dest == "file" and name in self._file_list:
+ commands.append("no logging file {0}".format(name))
+ elif dest == "console" and have_console_level is not None:
+ commands.append("no logging {0}".format(dest))
+ elif dest == "monitor" and have_monitor_level:
+ commands.append("no logging {0}".format(dest))
+ elif dest == "buffered" and have_size:
+ commands.append("no logging {0}".format(dest))
+
+ if (
+ dest is None
+ and hostnameprefix is not None
+ and have_prefix == hostnameprefix
+ ):
+ commands.append(
+ "no logging hostnameprefix {0}".format(hostnameprefix)
+ )
+ if (
+ dest is None
+ and facility is not None
+ and have_facility == facility
+ ):
+ commands.append("no logging facility {0}".format(facility))
+
+ if state == "present":
+ if dest == "host" and name not in self._host_list:
+ if level == "errors" or level == "informational":
+ level = severity_transpose[level]
+ commands.append(
+ "logging {0} vrf {1} severity {2}".format(
+ name, vrf, level
+ )
+ )
+ elif dest == "file" and name not in self._file_list:
+ if level == "errors" or level == "informational":
+ level = severity_transpose[level]
+ commands.append(
+ "logging file {0} maxfilesize {1} severity {2}".format(
+ name, size, level
+ )
+ )
+ elif dest == "buffered" and (
+ have_size is None
+ or (have_size is not None and size != have_size)
+ ):
+ commands.append("logging buffered {0}".format(size))
+ elif dest == "console" and (
+ have_console_level is None
+ or (
+ have_console_level is not None
+ and have_console_level != level
+ )
+ ):
+ commands.append("logging console {0}".format(level))
+ elif dest == "monitor" and (
+ have_monitor_level is None
+ or (
+ have_monitor_level is not None
+ and have_monitor_level != level
+ )
+ ):
+ commands.append("logging monitor {0}".format(level))
+
+ if (
+ dest is None
+ and hostnameprefix is not None
+ and (
+ have_prefix is None
+ or (
+ have_prefix is not None
+ and hostnameprefix != have_prefix
+ )
+ )
+ ):
+ commands.append(
+ "logging hostnameprefix {0}".format(hostnameprefix)
+ )
+ if (
+ dest is None
+ and hostnameprefix is None
+ and facility != have_facility
+ ):
+ commands.append("logging facility {0}".format(facility))
+
+ self._result["commands"] = commands
+ if commands:
+ commit = not self._module.check_mode
+ diff = load_config(self._module, commands, commit=commit)
+ if diff:
+ self._result["diff"] = dict(prepared=diff)
+ self._result["changed"] = True
+
+ def parse_facility(self, line):
+ match = re.search(r"logging facility (\S+)", line, re.M)
+ facility = None
+ if match:
+ facility = match.group(1)
+
+ return facility
+
+ def parse_size(self, line, dest):
+ size = None
+
+ if dest == "buffered":
+ match = re.search(r"logging buffered (\S+)", line, re.M)
+ if match:
+ try:
+ int_size = int(match.group(1))
+ except ValueError:
+ int_size = None
+
+ if int_size is not None:
+ if isinstance(int_size, int):
+ size = str(match.group(1))
+ return size
+
+ def parse_hostnameprefix(self, line):
+ prefix = None
+ match = re.search(r"logging hostnameprefix (\S+)", line, re.M)
+ if match:
+ prefix = match.group(1)
+ return prefix
+
+ def parse_name(self, line, dest):
+ name = None
+ if dest == "file":
+ match = re.search(r"logging file (\S+)", line, re.M)
+ if match:
+ name = match.group(1)
+ elif dest == "host":
+ match = re.search(r"logging (\S+)", line, re.M)
+ if match:
+ name = match.group(1)
+
+ return name
+
+ def parse_level(self, line, dest):
+ level_group = (
+ "emergencies",
+ "alerts",
+ "critical",
+ "errors",
+ "warning",
+ "notifications",
+ "informational",
+ "debugging",
+ )
+
+ level = None
+ match = re.search(r"logging {0} (\S+)".format(dest), line, re.M)
+ if match:
+ if match.group(1) in level_group:
+ level = match.group(1)
+
+ return level
+
+ def parse_dest(self, line, group):
+ dest_group = ("console", "monitor", "buffered", "file")
+ dest = None
+ if group in dest_group:
+ dest = group
+ elif "vrf" in line:
+ dest = "host"
+
+ return dest
+
+ def parse_vrf(self, line, dest):
+ vrf = None
+ if dest == "host":
+ match = re.search(r"logging (\S+) vrf (\S+)", line, re.M)
+ if match:
+ vrf = match.group(2)
+ return vrf
+
+ def map_config_to_obj(self):
+ data = get_config(self._module, config_filter="logging")
+ lines = data.split("\n")
+
+ for line in lines:
+ match = re.search(r"logging (\S+)", line, re.M)
+ if match:
+ dest = self.parse_dest(line, match.group(1))
+ name = self.parse_name(line, dest)
+ if dest == "host" and name is not None:
+ self._host_list.add(name)
+ if dest == "file" and name is not None:
+ self._file_list.add(name)
+
+ self._have.append(
+ {
+ "dest": dest,
+ "name": name,
+ "size": self.parse_size(line, dest),
+ "facility": self.parse_facility(line),
+ "level": self.parse_level(line, dest),
+ "vrf": self.parse_vrf(line, dest),
+ "hostnameprefix": self.parse_hostnameprefix(line),
+ }
+ )
+
+ def run(self):
+ self.map_params_to_obj()
+ self.map_config_to_obj()
+ self.map_obj_to_commands()
+
+ return self._result
+
+
+class NCConfiguration(ConfigBase):
+ def __init__(self, module):
+ super(NCConfiguration, self).__init__(module)
+ self._flag = "NC"
+ self._log_file_meta = collections.OrderedDict()
+ self._log_host_meta = collections.OrderedDict()
+ self._log_console_meta = collections.OrderedDict()
+ self._log_monitor_meta = collections.OrderedDict()
+ self._log_buffered_size_meta = collections.OrderedDict()
+ self._log_buffered_level_meta = collections.OrderedDict()
+ self._log_facility_meta = collections.OrderedDict()
+ self._log_prefix_meta = collections.OrderedDict()
+
+ def map_obj_to_xml_rpc(self):
+ self._log_file_meta.update(
+ [
+ (
+ "files",
+ {
+ "xpath": "syslog/files",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "file",
+ {
+ "xpath": "syslog/files/file",
+ "tag": True,
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ (
+ "a:name",
+ {
+ "xpath": "syslog/files/file/file-name",
+ "operation": "edit",
+ },
+ ),
+ (
+ "file-attrib",
+ {
+ "xpath": "syslog/files/file/file-log-attributes",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:size",
+ {
+ "xpath": "syslog/files/file/file-log-attributes/max-file-size",
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:level",
+ {
+ "xpath": "syslog/files/file/file-log-attributes/severity",
+ "operation": "edit",
+ },
+ ),
+ ]
+ )
+ self._log_host_meta.update(
+ [
+ (
+ "host-server",
+ {
+ "xpath": "syslog/host-server",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "vrfs",
+ {
+ "xpath": "syslog/host-server/vrfs",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "vrf",
+ {
+ "xpath": "syslog/host-server/vrfs/vrf",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:vrf",
+ {
+ "xpath": "syslog/host-server/vrfs/vrf/vrf-name",
+ "operation": "edit",
+ },
+ ),
+ (
+ "ipv4s",
+ {
+ "xpath": "syslog/host-server/vrfs/vrf/ipv4s",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "ipv4",
+ {
+ "xpath": "syslog/host-server/vrfs/vrf/ipv4s/ipv4",
+ "tag": True,
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ (
+ "a:name",
+ {
+ "xpath": "syslog/host-server/vrfs/vrf/ipv4s/ipv4/address",
+ "operation": "edit",
+ },
+ ),
+ (
+ "ipv4-sev",
+ {
+ "xpath": "syslog/host-server/vrfs/vrf/ipv4s/ipv4/ipv4-severity-port",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:level",
+ {
+ "xpath": "syslog/host-server/vrfs/vrf/ipv4s/ipv4/ipv4-severity-port/severity",
+ "operation": "edit",
+ },
+ ),
+ ]
+ )
+ self._log_console_meta.update(
+ [
+ (
+ "a:enable-console",
+ {
+ "xpath": "syslog/enable-console-logging",
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ (
+ "console",
+ {
+ "xpath": "syslog/console-logging",
+ "tag": True,
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ (
+ "a:console-level",
+ {
+ "xpath": "syslog/console-logging/logging-level",
+ "operation": "edit",
+ },
+ ),
+ ]
+ )
+ self._log_monitor_meta.update(
+ [
+ (
+ "monitor",
+ {
+ "xpath": "syslog/monitor-logging",
+ "tag": True,
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ (
+ "a:monitor-level",
+ {
+ "xpath": "syslog/monitor-logging/logging-level",
+ "operation": "edit",
+ },
+ ),
+ ]
+ )
+ self._log_buffered_size_meta.update(
+ [
+ (
+ "buffered",
+ {
+ "xpath": "syslog/buffered-logging",
+ "tag": True,
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ (
+ "a:size",
+ {
+ "xpath": "syslog/buffered-logging/buffer-size",
+ "operation": "edit",
+ },
+ ),
+ ]
+ )
+ self._log_buffered_level_meta.update(
+ [
+ (
+ "buffered",
+ {
+ "xpath": "syslog/buffered-logging",
+ "tag": True,
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ (
+ "a:level",
+ {
+ "xpath": "syslog/buffered-logging/logging-level",
+ "operation": "edit",
+ },
+ ),
+ ]
+ )
+ self._log_facility_meta.update(
+ [
+ (
+ "facility",
+ {
+ "xpath": "syslog/logging-facilities",
+ "tag": True,
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ (
+ "a:facility",
+ {
+ "xpath": "syslog/logging-facilities/facility-level",
+ "operation": "edit",
+ },
+ ),
+ ]
+ )
+ self._log_prefix_meta.update(
+ [
+ (
+ "a:hostnameprefix",
+ {
+ "xpath": "syslog/host-name-prefix",
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ )
+ ]
+ )
+
+ state = self._module.params["state"]
+
+ _get_filter = build_xml("syslog", opcode="filter")
+ running = get_config(
+ self._module, source="running", config_filter=_get_filter
+ )
+
+ file_ele = etree_findall(running, "file")
+ file_list = list()
+ if len(file_ele):
+ for file in file_ele:
+ file_name = etree_find(file, "file-name")
+ file_list.append(
+ file_name.text if file_name is not None else None
+ )
+ vrf_ele = etree_findall(running, "vrf")
+ host_list = list()
+ for vrf in vrf_ele:
+ host_ele = etree_findall(vrf, "ipv4")
+ for host in host_ele:
+ host_name = etree_find(host, "address")
+ host_list.append(
+ host_name.text if host_name is not None else None
+ )
+
+ console_ele = etree_find(running, "console-logging")
+ console_level = (
+ etree_find(console_ele, "logging-level")
+ if console_ele is not None
+ else None
+ )
+ have_console = (
+ console_level.text if console_level is not None else None
+ )
+
+ monitor_ele = etree_find(running, "monitor-logging")
+ monitor_level = (
+ etree_find(monitor_ele, "logging-level")
+ if monitor_ele is not None
+ else None
+ )
+ have_monitor = (
+ monitor_level.text if monitor_level is not None else None
+ )
+
+ buffered_ele = etree_find(running, "buffered-logging")
+ buffered_size = (
+ etree_find(buffered_ele, "buffer-size")
+ if buffered_ele is not None
+ else None
+ )
+ have_buffered = (
+ buffered_size.text if buffered_size is not None else None
+ )
+
+ facility_ele = etree_find(running, "logging-facilities")
+ facility_level = (
+ etree_find(facility_ele, "facility-level")
+ if facility_ele is not None
+ else None
+ )
+ have_facility = (
+ facility_level.text if facility_level is not None else None
+ )
+
+ prefix_ele = etree_find(running, "host-name-prefix")
+ have_prefix = prefix_ele.text if prefix_ele is not None else None
+
+ file_params = list()
+ host_params = list()
+ console_params = dict()
+ monitor_params = dict()
+ buffered_params = dict()
+ facility_params = dict()
+ prefix_params = dict()
+
+ opcode = None
+ if state == "absent":
+ opcode = "delete"
+ for item in self._want:
+ if item["dest"] == "file" and item["name"] in file_list:
+ item["level"] = severity_level[item["level"]]
+ file_params.append(item)
+ elif item["dest"] == "host" and item["name"] in host_list:
+ item["level"] = severity_level[item["level"]]
+ host_params.append(item)
+ elif item["dest"] == "console" and have_console:
+ console_params.update({"console-level": item["level"]})
+ elif item["dest"] == "monitor" and have_monitor:
+ monitor_params.update({"monitor-level": item["level"]})
+ elif item["dest"] == "buffered" and have_buffered:
+ buffered_params["size"] = (
+ str(item["size"]) if item["size"] else None
+ )
+ buffered_params["level"] = (
+ item["level"] if item["level"] else None
+ )
+ elif (
+ item["dest"] is None
+ and item["hostnameprefix"] is None
+ and item["facility"] is not None
+ and have_facility
+ ):
+ facility_params.update({"facility": item["facility"]})
+ elif (
+ item["dest"] is None
+ and item["hostnameprefix"] is not None
+ and have_prefix
+ ):
+ prefix_params.update(
+ {"hostnameprefix": item["hostnameprefix"]}
+ )
+ elif state == "present":
+ opcode = "merge"
+ for item in self._want:
+ if item["dest"] == "file":
+ item["level"] = severity_level[item["level"]]
+ file_params.append(item)
+ elif item["dest"] == "host":
+ item["level"] = severity_level[item["level"]]
+ host_params.append(item)
+ elif item["dest"] == "console":
+ console_params.update({"console-level": item["level"]})
+ elif item["dest"] == "monitor":
+ monitor_params.update({"monitor-level": item["level"]})
+ elif item["dest"] == "buffered":
+ buffered_params["size"] = (
+ str(item["size"]) if item["size"] else None
+ )
+ buffered_params["level"] = (
+ item["level"] if item["level"] else None
+ )
+ elif (
+ item["dest"] is None
+ and item["hostnameprefix"] is None
+ and item["facility"] is not None
+ ):
+ facility_params.update({"facility": item["facility"]})
+ elif (
+ item["dest"] is None and item["hostnameprefix"] is not None
+ ):
+ prefix_params.update(
+ {"hostnameprefix": item["hostnameprefix"]}
+ )
+
+ self._result["xml"] = []
+ _edit_filter_list = list()
+ if opcode:
+ if len(file_params):
+ _edit_filter_list.append(
+ build_xml(
+ "syslog",
+ xmap=self._log_file_meta,
+ params=file_params,
+ opcode=opcode,
+ )
+ )
+ if len(host_params):
+ _edit_filter_list.append(
+ build_xml(
+ "syslog",
+ xmap=self._log_host_meta,
+ params=host_params,
+ opcode=opcode,
+ )
+ )
+ if len(console_params):
+ _edit_filter_list.append(
+ build_xml(
+ "syslog",
+ xmap=self._log_console_meta,
+ params=console_params,
+ opcode=opcode,
+ )
+ )
+ if len(monitor_params):
+ _edit_filter_list.append(
+ build_xml(
+ "syslog",
+ xmap=self._log_monitor_meta,
+ params=monitor_params,
+ opcode=opcode,
+ )
+ )
+ if len(buffered_params):
+ _edit_filter_list.append(
+ build_xml(
+ "syslog",
+ xmap=self._log_buffered_size_meta,
+ params=buffered_params,
+ opcode=opcode,
+ )
+ )
+ _edit_filter_list.append(
+ build_xml(
+ "syslog",
+ xmap=self._log_buffered_level_meta,
+ params=buffered_params,
+ opcode=opcode,
+ )
+ )
+ if len(facility_params):
+ _edit_filter_list.append(
+ build_xml(
+ "syslog",
+ xmap=self._log_facility_meta,
+ params=facility_params,
+ opcode=opcode,
+ )
+ )
+ if len(prefix_params):
+ _edit_filter_list.append(
+ build_xml(
+ "syslog",
+ xmap=self._log_prefix_meta,
+ params=prefix_params,
+ opcode=opcode,
+ )
+ )
+
+ diff = None
+ if len(_edit_filter_list):
+ commit = not self._module.check_mode
+ diff = load_config(
+ self._module,
+ _edit_filter_list,
+ commit=commit,
+ running=running,
+ nc_get_filter=_get_filter,
+ )
+
+ if diff:
+ if self._module._diff:
+ self._result["diff"] = dict(prepared=diff)
+
+ self._result["xml"] = _edit_filter_list
+ self._result["changed"] = True
+
+ def run(self):
+ self.map_params_to_obj()
+ self.map_obj_to_xml_rpc()
+
+ return self._result
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ dest=dict(
+ type="str",
+ choices=["host", "console", "monitor", "buffered", "file"],
+ ),
+ name=dict(type="str"),
+ size=dict(type="int"),
+ vrf=dict(type="str", default="default"),
+ facility=dict(type="str", default="local7"),
+ hostnameprefix=dict(type="str"),
+ level=dict(
+ type="str",
+ default="debugging",
+ aliases=["severity"],
+ choices=[
+ "emergencies",
+ "alerts",
+ "critical",
+ "errors",
+ "warning",
+ "notifications",
+ "informational",
+ "debugging",
+ ],
+ ),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+
+ aggregate_spec = deepcopy(element_spec)
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+
+ mutually_exclusive = [("dest", "facility", "hostnameprefix")]
+
+ required_if = [
+ ("dest", "host", ["name"]),
+ ("dest", "file", ["name"]),
+ ("dest", "buffered", ["size"]),
+ ("dest", "console", ["level"]),
+ ("dest", "monitor", ["level"]),
+ ]
+
+ argument_spec = dict(
+ aggregate=dict(
+ type="list",
+ elements="dict",
+ options=aggregate_spec,
+ mutually_exclusive=mutually_exclusive,
+ required_if=required_if,
+ )
+ )
+
+ argument_spec.update(element_spec)
+ argument_spec.update(iosxr_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+
+ config_object = None
+ if is_cliconf(module):
+ # Commenting the below cliconf deprecation support call for Ansible 2.9 as it'll be continued to be supported
+ # module.deprecate("cli support for 'iosxr_interface' is deprecated. Use transport netconf instead",
+ # version='2.9')
+ config_object = CliConfiguration(module)
+ elif is_netconf(module):
+ config_object = NCConfiguration(module)
+
+ if config_object:
+ result = config_object.run()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_netconf.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_netconf.py
new file mode 100644
index 00000000..a075958f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_netconf.py
@@ -0,0 +1,221 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# (c) 2017, Ansible by Red Hat, Inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_netconf
+author: Kedar Kekan (@kedarX)
+short_description: Configures NetConf sub-system service on Cisco IOS-XR devices
+description:
+- This module provides an abstraction that enables and configures the netconf system
+ service running on Cisco IOS-XR Software. This module can be used to easily enable
+ the Netconf API. Netconf provides a programmatic interface for working with configuration
+ and state resources as defined in RFC 6242.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.iosxr.iosxr
+options:
+ netconf_port:
+ description:
+ - This argument specifies the port the netconf service should listen on for SSH
+ connections. The default port as defined in RFC 6242 is 830.
+ required: false
+ type: int
+ default: 830
+ aliases:
+ - listens_on
+ netconf_vrf:
+ description:
+ - netconf vrf name
+ required: false
+ type: str
+ default: default
+ aliases:
+ - vrf
+ state:
+ description:
+ - Specifies the state of the C(iosxr_netconf) resource on the remote device. If
+ the I(state) argument is set to I(present) the netconf service will be configured. If
+ the I(state) argument is set to I(absent) the netconf service will be removed
+ from the configuration.
+ type: str
+ required: false
+ default: present
+ choices:
+ - present
+ - absent
+notes:
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
+- Tested against Cisco IOS XR Software, Version 6.1.3
+"""
+
+EXAMPLES = """
+- name: enable netconf service on port 830
+ cisco.iosxr.iosxr_netconf:
+ listens_on: 830
+ state: present
+
+- name: disable netconf service
+ cisco.iosxr.iosxr_netconf:
+ state: absent
+"""
+
+RETURN = """
+commands:
+ description: Returns the command sent to the remote device
+ returned: when changed is True
+ type: str
+ sample: 'ssh server netconf port 830'
+"""
+import re
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ iosxr_argument_spec,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ get_config,
+ load_config,
+)
+from ansible.module_utils.six import iteritems
+
+USE_PERSISTENT_CONNECTION = True
+
+
+def map_obj_to_commands(updates):
+ want, have = updates
+ commands = list()
+
+ if want["state"] == "absent":
+ if have["state"] == "present":
+ commands.append("no netconf-yang agent ssh")
+
+ if "netconf_port" in have:
+ commands.append(
+ "no ssh server netconf port %s" % have["netconf_port"]
+ )
+
+ if have["netconf_vrf"]:
+ for vrf in have["netconf_vrf"]:
+ commands.append("no ssh server netconf vrf %s" % vrf)
+ else:
+ if have["state"] == "absent":
+ commands.append("netconf-yang agent ssh")
+
+ if want["netconf_port"] is not None and (
+ want["netconf_port"] != have.get("netconf_port")
+ ):
+ commands.append(
+ "ssh server netconf port %s" % want["netconf_port"]
+ )
+ if want["netconf_vrf"] is not None and (
+ want["netconf_vrf"] not in have["netconf_vrf"]
+ ):
+ commands.append("ssh server netconf vrf %s" % want["netconf_vrf"])
+
+ return commands
+
+
+def parse_vrf(config):
+ match = re.search(r"vrf (\w+)", config)
+ if match:
+ return match.group(1)
+
+
+def parse_port(config):
+ match = re.search(r"port (\d+)", config)
+ if match:
+ return int(match.group(1))
+
+
+def map_config_to_obj(module):
+ obj = {"state": "absent"}
+
+ netconf_config = get_config(module, config_filter="netconf-yang agent")
+
+ ssh_config = get_config(module, config_filter="ssh server")
+ ssh_config = [
+ config_line
+ for config_line in (line.strip() for line in ssh_config.splitlines())
+ if config_line
+ ]
+ obj["netconf_vrf"] = []
+ for config in ssh_config:
+ if "netconf port" in config:
+ obj.update({"netconf_port": parse_port(config)})
+ if "netconf vrf" in config:
+ obj["netconf_vrf"].append(parse_vrf(config))
+ if "ssh" in netconf_config and (
+ "netconf_port" in obj or obj["netconf_vrf"]
+ ):
+ obj.update({"state": "present"})
+
+ if "ssh" in netconf_config and "netconf_port" not in obj:
+ obj.update({"netconf_port": 830})
+
+ return obj
+
+
+def validate_netconf_port(value, module):
+ if not 1 <= value <= 65535:
+ module.fail_json(msg="netconf_port must be between 1 and 65535")
+
+
+def map_params_to_obj(module):
+ obj = {
+ "netconf_port": module.params["netconf_port"],
+ "netconf_vrf": module.params["netconf_vrf"],
+ "state": module.params["state"],
+ }
+
+ for key, value in iteritems(obj):
+ # validate the param value (if validator func exists)
+ validator = globals().get("validate_%s" % key)
+ if callable(validator):
+ validator(value, module)
+
+ return obj
+
+
+def main():
+ """main entry point for module execution
+ """
+ argument_spec = dict(
+ netconf_port=dict(type="int", default=830, aliases=["listens_on"]),
+ netconf_vrf=dict(aliases=["vrf"], default="default"),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+ argument_spec.update(iosxr_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ result = {"changed": False, "warnings": warnings}
+
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands((want, have))
+ result["commands"] = commands
+
+ if commands:
+ commit = not module.check_mode
+ diff = load_config(module, commands, commit=commit)
+ if diff:
+ result["diff"] = dict(prepared=diff)
+ result["changed"] = True
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_ospf_interfaces.py
new file mode 100644
index 00000000..0626461c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_ospf_interfaces.py
@@ -0,0 +1,1210 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+"""
+The module file for iosxr_ospf_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+module: iosxr_ospf_interfaces
+version_added: 1.2.0
+short_description: OSPF Interfaces Resource Module.
+description:
+ - This module manages OSPF(v2/v3) configuration of interfaces on devices running Cisco IOS-XR.
+author: Rohit Thakur (@rohitthakur2590)
+notes:
+ - Tested against IOS-XR 6.1.3
+ - This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html)
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config router ospf').
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A list of OSPF configuration for interfaces.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name/Identifier of the interface.
+ type: str
+ required: True
+ type:
+ description:
+ - Type of the interface.
+ type: str
+ required: True
+ address_family:
+ description:
+ - OSPF settings on the interfaces in address-family context.
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description:
+ - Address Family Identifier (AFI) for OSPF settings on the interfaces.
+ type: str
+ choices: ['ipv4', 'ipv6']
+ required: True
+ processes:
+ description:
+ - Interfaces configuration for an OSPF process.
+ type: list
+ elements: dict
+ suboptions:
+ process_id:
+ description:
+ - OSPF process tag.
+ type: str
+ required: True
+ area:
+ description: Specify the area-id
+ type: dict
+ suboptions:
+ area_id:
+ description:
+ - OSPF interfaces area ID as a decimal value. Please
+ refer vendor documentation of Valid values.
+ - OSPF interfaces area ID in IP address format(e.g.
+ A.B.C.D)
+ type: str
+ apply_group_option:
+ description: Specify configuration from a group
+ type: dict
+ suboptions:
+ group_name:
+ description: Specify the name of the group
+ type: str
+ operation:
+ description: Specify the group config operation
+ type: str
+ choices: [add, remove, append]
+ authentication:
+ description: Enable authentication
+ type: dict
+ suboptions:
+ message_digest:
+ description: Use message-digest authentication
+ type: dict
+ suboptions:
+ keychain:
+ description: Specify keychain name
+ type: str
+ null_auth:
+ description: Use no authentication
+ type: bool
+ authentication_key:
+ description: Specify authentication password (key)
+ type: dict
+ suboptions:
+ password:
+ description: The OSPFv2 password (key)
+ type: str
+ clear:
+ description: Specifies an UNENCRYPTED password (key) will follow
+ type: str
+ encrypted:
+ description: Specifies an ENCRYPTED password (key) will follow
+ type: str
+ bfd:
+ description: Configure BFD parameters
+ type: dict
+ suboptions:
+ fast_detect:
+ description: Configure fast detection
+ type: dict
+ suboptions:
+ set:
+ description: Enable fast detection only
+ type: bool
+ strict_mode:
+ description: Hold down neighbor session until BFD session is up
+ type: bool
+ minimum_interval:
+ description: Hello interval in milli-seconds
+ type: int
+ multiplier:
+ description: Detect multiplier
+ type: int
+ cost:
+ description: Specify Interface cost
+ type: int
+ cost_fallback:
+ description: Specify Cost when cumulative bandwidth goes below the theshold
+ type: dict
+ suboptions:
+ cost:
+ description: Specify cost w.r.t cummulative bandwidth
+ type: int
+ threshold:
+ description: Specify threshold bandwidth when cost-fallback is applied
+ type: int
+ database_filter:
+ description: Filter OSPF LSAs during synchronization and flooding
+ type: dict
+ suboptions:
+ all_outgoing_lsa:
+ description: Filter all outgoing LSA
+ type: bool
+ dead_interval:
+ description: Specify interval after which a neighbor is declared dead
+ type: int
+ demand_circuit:
+ description: Enable/Disable demand circuits
+ type: bool
+ fast_reroute:
+ description: Specify IP Fast Reroute
+ type: dict
+ suboptions:
+ disabled:
+ description: Disable IP fast reroute
+ type: bool
+ per_link:
+ description: Specify per-prefix computation
+ type: dict
+ suboptions:
+ information_type:
+ description: Specify per-link LFA exclusion or FRR LFA candidate information
+ type: str
+ choices: ["exclude", "lfa_candidate"]
+ use_candidate_only:
+ description: Enable/Disable backup selection from candidate-list only
+ type: bool
+ interface:
+ description: Specify Per-link LFA exclusion information
+ type: dict
+ suboptions:
+ bvi:
+ description: Specify Bridge-Group Virtual Interface
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: int
+ bundle_ether:
+ description: Specify Aggregated Ethernet interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: int
+ pos_int:
+ description: Specify Aggregated pos interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: int
+ fast_ethernet:
+ description: Specify FastEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ fiftygige:
+ description: Specify FiftyGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ fortygige:
+ description: Specify FortyGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ fourhundredgige:
+ description: Specify FourHundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ gigabitethernet:
+ description: Specify GigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ hundredgige:
+ description: Specify HundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ mgmteth:
+ description: Specify MgmtEth/IEEE 802.3 interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ multilink:
+ description: Specify Multilink network interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ pw_ether:
+ description: Specify PWHE Ethernet Interface
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: int
+ pw_iw:
+ description: Specify PWHE VC11 IP Interworking Interface
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: int
+ srp:
+ description: Specify SRP interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ serial:
+ description: Specify Serial network interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ tengige:
+ description: Specify TenGigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ twentyfivegige:
+ description: Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ twohundredgige:
+ description: Specify TwoHundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ nve:
+ description: Specify Network Virtualization Endpoint Interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: int
+ tunnel_ip:
+ description: Specify GRE/IPinIP Tunnel Interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: int
+ tunnel_ipsec:
+ description: Specify IPSec Tunnel interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: int
+ tunnel_mte:
+ description: Specify MPLS Traffic Engineering P2MP Tunnel interface(s)
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: int
+ tunnel_mpls:
+ description: MPLS Transport Protocol Tunnel interface
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify the interface id
+ type: str
+ flood_reduction:
+ description: Enable/Disable flood reduction
+ type: bool
+ hello_interval:
+ description: Specify Time between HELLO packets
+ type: int
+ link_down_fast_detect:
+ description: Configure interface down parameters
+ type: bool
+ message_digest_key:
+ description: Message digest authentication password (key)
+ type: dict
+ suboptions:
+ id:
+ description: Key ID
+ type: int
+ required: true
+ md5:
+ description: Use MD5 Algorithm
+ type: dict
+ required: true
+ suboptions:
+ password:
+ description: The OSPFv2 password (key)
+ type: str
+ clear:
+ description: Specifies an UNENCRYPTED password (key) will follow
+ type: bool
+ encrypted:
+ description: Specifies an ENCRYPTED password (key) will follow
+ type: bool
+ mpls_ldp_sync:
+ description: Enable/Disable MPLS LDP Sync
+ type: bool
+ mtu_ignore:
+ description: Enable/Disable ignoring of MTU in DBD packets
+ type: bool
+ network:
+ description: Specify Network type
+ type: str
+ choices: ["broadcast", "non-broadcast", "point-to-multipoint", "point-to-point"]
+ neighbors:
+ description: Specify a neighbor routers
+ type: list
+ elements: dict
+ suboptions:
+ neighbor_id:
+ description: Specify Neighbor address (name)
+ type: str
+ cost:
+ description: Specify OSPF cost for point-to-multipoint neighbor
+ type: int
+ db_filter_all_out:
+ description: Specify Filter OSPF LSA during synchronization and flooding for point-to-multipoint neighbor
+ type: bool
+ poll_interval:
+ description: Specify OSPF dead-router polling interval
+ type: int
+ priority:
+ description: Specify OSPF priority of non-broadcast neighbor
+ type: int
+ packet_size:
+ description: Customize size of OSPF packets upto MTU
+ type: int
+ passive:
+ description: Enable/Disable passive
+ type: bool
+ prefix_suppression:
+ description: Suppress advertisement of the prefixes
+ type: bool
+ priority:
+ description: Specify Router priority
+ type: int
+ retransmit_interval:
+ description: Specify time between retransmitting lost link state advertisements
+ type: int
+ security_ttl:
+ description: Enable security
+ type: dict
+ suboptions:
+ set:
+ description: Enable ttl security
+ type: bool
+ hops:
+ description: Maximum number of IP hops allowed <1-254>
+ type: int
+ transmit_delay:
+ description: Specify estimated time needed to send link-state update packet
+ type: int
+ state:
+ description:
+ - The state the configuration should be left in.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - parsed
+ - rendered
+ default: merged
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospf
+# % No such configuration item(s)
+#
+
+- name: Merge provided OSPF interfaces configuration with the existing configuration
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.3
+ cost: 20
+ authentication:
+ message_digest:
+ keychain: cisco
+ - afi: ipv6
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.2
+ cost: 30
+ state: merged
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": []
+#
+# "commands": [
+# "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 cost 20",
+# "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest",
+# "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest keychain cisco",
+# "router ospfv3 LAB3 area 0.0.0.2 interface GigabitEthernet 0/0/0/0 cost 30"
+# ]
+#
+# "after": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "message_digest": {
+# "keychain": "cisco"
+# }
+# },
+# "cost": 20,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.3"
+# },
+# "process_id": "LAB3"
+# }
+# ]
+# },
+# {
+# "afi": "ipv6",
+# "cost": 30,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.2"
+# },
+# "process_id": "LAB3"
+# }
+# ]
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/0",
+# "type": "gigabitethernet"
+# }
+# ]
+#
+#
+# ------------
+# After state
+# ------------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+# Thu Oct 23 06:00:57.217 UTC
+# router ospf LAB
+# area 0.0.0.0
+# !
+# area 0.0.0.9
+# !
+# !
+# router ospf LAB1
+# area 0.0.0.1
+# !
+# area 0.0.0.3
+# !
+# !
+# router ospf LAB3
+# area 0.0.0.3
+# interface GigabitEthernet0/0/0/0
+# cost 20
+# authentication message-digest keychain cisco
+# !
+# !
+# !
+# router ospf ipv4
+# !
+
+# Using replaced
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+# Thu Oct 23 06:00:57.217 UTC
+# router ospf LAB
+# area 0.0.0.0
+# !
+# area 0.0.0.9
+# !
+# !
+# router ospf LAB1
+# area 0.0.0.1
+# !
+# area 0.0.0.3
+# !
+# !
+# router ospf LAB3
+# area 0.0.0.3
+# interface GigabitEthernet0/0/0/0
+# cost 20
+# authentication message-digest keychain cisco
+# !
+# !
+# !
+# router ospf ipv4
+# !
+
+- name: Replace OSPF interfaces configuration
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.3
+ cost: 30
+ authentication:
+ message_digest:
+ keychain: ciscoiosxr
+ - afi: ipv6
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.2
+ cost: 30
+ state: replaced
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "message_digest": {
+# "keychain": "cisco"
+# }
+# },
+# "cost": 20,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.3"
+# },
+# "process_id": "LAB3"
+# }
+# ]
+# },
+# {
+# "afi": "ipv6",
+# "cost": 30,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.2"
+# },
+# "process_id": "LAB3"
+# }
+# ]
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/0",
+# "type": "gigabitethernet"
+# }
+# ]
+#
+# "commands": [
+# "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 cost 30",
+# "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest",
+# "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest keychain ciscoiosxr"
+# ]
+#
+# "after": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "message_digest": {
+# "keychain": "ciscoiosxr"
+# }
+# },
+# "cost": 30,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.3"
+# },
+# "process_id": "LAB3"
+# }
+# ]
+# },
+# {
+# "afi": "ipv6",
+# "cost": 30,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.2"
+# },
+# "process_id": "LAB3"
+# }
+# ]
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/0",
+# "type": "gigabitethernet"
+# }
+# ]
+#
+#
+# -----------
+# After state
+# -----------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+# Thu Oct 23 06:10:39.827 UTC
+# router ospf LAB
+# area 0.0.0.0
+# !
+# area 0.0.0.9
+# !
+# !
+# router ospf LAB1
+# area 0.0.0.1
+# !
+# area 0.0.0.3
+# !
+# !
+# router ospf LAB3
+# area 0.0.0.3
+# interface GigabitEthernet0/0/0/0
+# cost 30
+# authentication message-digest keychain ciscoiosxr
+# !
+# !
+# !
+# router ospf ipv4
+# !
+
+- name: Override existing OSPF interfaces configuration
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB1"
+ area:
+ area_id: 0.0.0.3
+ cost: 10
+ authentication:
+ message_digest:
+ keychain: iosxr
+ state: overridden
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "message_digest": {
+# "keychain": "ciscoiosxr"
+# }
+# },
+# "cost": 30,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.3"
+# },
+# "process_id": "LAB3"
+# }
+# ]
+# },
+# {
+# "afi": "ipv6",
+# "cost": 30,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.2"
+# },
+# "process_id": "LAB3"
+# }
+# ]
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/0",
+# "type": "gigabitethernet"
+# }
+# ]
+#
+# "commands": [
+# "no router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0",
+# "no router ospfv3 LAB3 area 0.0.0.2 interface GigabitEthernet 0/0/0/0",
+# "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 cost 10",
+# "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 authentication message-digest",
+# "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 authentication message-digest keychain iosxr"
+# ]
+#
+# "after": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "message_digest": {
+# "keychain": "iosxr"
+# }
+# },
+# "cost": 10,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.3"
+# },
+# "process_id": "LAB1"
+# }
+# ]
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/1",
+# "type": "gigabitethernet"
+# }
+# ]
+#
+#
+# -----------
+# After state
+# -----------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+# Thu Oct 23 06:28:15.025 UTC
+# router ospf LAB
+# area 0.0.0.0
+# !
+# area 0.0.0.9
+# !
+# !
+# router ospf LAB1
+# area 0.0.0.1
+# !
+# area 0.0.0.3
+# interface GigabitEthernet0/0/0/1
+# cost 10
+# authentication message-digest keychain iosxr
+# !
+# !
+# !
+# router ospf LAB3
+# area 0.0.0.3
+# !
+# !
+# router ospf ipv4
+# !
+
+# Using deleted
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+# Thu Oct 23 06:28:15.025 UTC
+# router ospf LAB
+# area 0.0.0.0
+# !
+# area 0.0.0.9
+# !
+# !
+# router ospf LAB1
+# area 0.0.0.1
+# !
+# area 0.0.0.3
+# interface GigabitEthernet0/0/0/1
+# cost 10
+# authentication message-digest keychain iosxr
+# !
+# !
+# !
+# router ospf LAB3
+# area 0.0.0.3
+# !
+# !
+# router ospf ipv4
+# !
+
+- name: Deleted existing OSPF interfaces from the device
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ type: gigabitethernet
+ state: deleted
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "message_digest": {
+# "keychain": "iosxr"
+# }
+# },
+# "cost": 10,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.3"
+# },
+# "process_id": "LAB1"
+# }
+# ]
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/1",
+# "type": "gigabitethernet"
+# }
+# ],
+#
+# "commands": [
+# "no router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1"
+# ]
+#
+# "after": []
+#
+#
+# -----------
+# After state
+# -----------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+# Thu Oct 23 06:34:38.319 UTC
+# router ospf LAB
+# area 0.0.0.0
+# !
+# area 0.0.0.9
+# !
+# !
+# router ospf LAB1
+# area 0.0.0.1
+# !
+# area 0.0.0.3
+# !
+# !
+# router ospf LAB3
+# area 0.0.0.3
+# !
+# !
+# router ospf ipv4
+# !
+
+# Using parsed
+# parsed.cfg
+# ------------
+# router ospf LAB
+# area 0.0.0.0
+# !
+# area 0.0.0.9
+# !
+# !
+# router ospf LAB1
+# area 0.0.0.1
+# !
+# area 0.0.0.3
+# !
+# !
+# router ospf LAB3
+# area 0.0.0.3
+# interface GigabitEthernet0/0/0/0
+# cost 20
+# authentication message-digest keychain cisco
+# !
+# !
+# !
+# router ospf ipv4
+# !
+- name: Parsed the device configuration to get output commands
+ cisco.iosxr.iosxr_ospf_interfaces:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+#
+#
+# -------------------------
+# Module Execution Result
+# -------------------------
+#
+#
+# "parsed": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "message_digest": {
+# "keychain": "cisco"
+# }
+# },
+# "cost": 20,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.3"
+# },
+# "process_id": "LAB3"
+# }
+# ]
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/0",
+# "type": "gigabitethernet"
+# }
+# ]
+#
+# Using rendered
+#
+#
+- name: Render the commands for provided configuration
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.3
+ cost: 20
+ authentication:
+ message_digest:
+ keychain: cisco
+ - afi: ipv6
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.2
+ cost: 30
+ state: rendered
+
+#
+#
+# -------------------------
+# Module Execution Result
+# -------------------------
+#
+#
+# "rendered": [
+# "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 cost 20",
+# "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest",
+# "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest keychain cisco",
+# "router ospfv3 LAB3 area 0.0.0.2 interface GigabitEthernet 0/0/0/0 cost 30"
+# ]
+
+
+# Using gathered
+#
+# Before state:
+# -------------
+#
+# RP/0/0/CPU0:an-iosxr-02#show running-config router ospf
+# Thu Oct 23 06:50:38.743 UTC
+# router ospf LAB
+# area 0.0.0.0
+# !
+# area 0.0.0.9
+# !
+# !
+# router ospf LAB1
+# area 0.0.0.1
+# !
+# area 0.0.0.3
+# !
+# !
+# router ospf LAB3
+# area 0.0.0.3
+# interface GigabitEthernet0/0/0/0
+# cost 20
+# authentication message-digest keychain cisco
+# !
+# !
+# !
+# router ospf ipv4
+# !
+
+
+- name: Gather ospf_interfaces routes configuration
+ cisco.iosxr.iosxr_ospf_interfaces:
+ state: gathered
+#
+#
+# -------------------------
+# Module Execution Result
+# -------------------------
+#
+# "gathered": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "message_digest": {
+# "keychain": "cisco"
+# }
+# },
+# "cost": 20,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.3"
+# },
+# "process_id": "LAB3"
+# }
+# ]
+# },
+# {
+# "afi": "ipv6",
+# "cost": 30,
+# "processes": [
+# {
+# "area": {
+# "area_id": "0.0.0.2"
+# },
+# "process_id": "LAB3"
+# }
+# ]
+# }
+# ],
+# "name": "GigabitEthernet0/0/0/0",
+# "type": "gigabitethernet"
+# }
+# ]
+#
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.ospf_interfaces.ospf_interfaces import (
+ Ospf_interfacesArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.ospf_interfaces.ospf_interfaces import (
+ Ospf_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ module = AnsibleModule(
+ argument_spec=Ospf_interfacesArgs.argument_spec,
+ mutually_exclusive=[["config", "running_config"]],
+ required_if=[
+ ["state", "merged", ["config"]],
+ ["state", "replaced", ["config"]],
+ ["state", "overridden", ["config"]],
+ ["state", "rendered", ["config"]],
+ ["state", "parsed", ["running_config"]],
+ ],
+ supports_check_mode=True,
+ )
+
+ result = Ospf_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_ospfv2.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_ospfv2.py
new file mode 100644
index 00000000..660387bb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_ospfv2.py
@@ -0,0 +1,2544 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+
+"""
+The module file for iosxr_ospfv2
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+module: iosxr_ospfv2
+short_description: OSPFv2 resource module
+description: This module manages global OSPFv2 configuration on devices running Cisco
+ IOS-XR
+version_added: 1.0.0
+author:
+- Rohit Thakur (@rohitthakur2590)
+notes:
+- Tested against IOS-XR 6.1.3
+- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html)
+options:
+ config:
+ description: A list of OSPFv2 process configuration
+ type: dict
+ suboptions:
+ processes:
+ description: A list of OSPFv2 instances configuration
+ type: list
+ elements: dict
+ suboptions:
+ address_family_unicast:
+ description: Enable unicast topology for ipv4 address family
+ type: bool
+ adjacency_stagger:
+ description: Stagger OSPFv2 adjacency bring up
+ type: dict
+ suboptions:
+ min_adjacency:
+ description: Initial number of neighbors to bring up per area (default
+ 2)
+ type: int
+ max_adjacency:
+ description: Maximum simultaneous neighbors to bring up
+ type: int
+ disable:
+ description: Disable stagger OSPFv2 adjacency
+ type: bool
+ authentication:
+ description: Enable authentication
+ type: dict
+ suboptions:
+ keychain:
+ description: Specify keychain name
+ type: str
+ message_digest:
+ description: Use message-digest authentication
+ type: dict
+ suboptions:
+ set:
+ description: Specify message-digest selection
+ type: bool
+ keychain:
+ description: Specify keychain name
+ type: str
+ no_auth:
+ description: Use no authentication
+ type: bool
+ apply_weight:
+ description: Enable weights configured under interfaces for load sharing
+ type: dict
+ suboptions:
+ bandwidth:
+ description: Reference bandwidth to use for calculation (Mbits/sec)
+ type: int
+ default_weight:
+ description: Specify default weight value to use when it is not configured
+ under interface
+ type: int
+ areas:
+ description: Configure OSPFv2 areas' properties
+ type: list
+ elements: dict
+ suboptions:
+ area_id:
+ description: Area ID as IP address or integer
+ type: str
+ required: true
+ authentication:
+ description: Enable authentication
+ type: dict
+ suboptions:
+ keychain:
+ description: Specify keychain name
+ type: str
+ message_digest:
+ description: Use message-digest authentication
+ type: dict
+ suboptions:
+ keychain:
+ description: Specify keychain name
+ type: str
+ no_auth:
+ description: Use no authentication
+ type: bool
+ authentication_key:
+ description: Used to mention authentication password (key)
+ type: dict
+ suboptions:
+ password:
+ description: The OSPFv2 password (key)
+ type: str
+ clear:
+ description: Specifies an UNENCRYPTED password (key) will follow
+ type: str
+ encrypted:
+ description: Specifies an ENCRYPTED password (key) will follow
+ type: str
+ default_cost:
+ description: Set the summary default-cost of a NSSA/stub area. Stub's
+ advertised external route metric
+ type: int
+ cost:
+ description: Interface cost
+ type: int
+ dead_interval:
+ description: Interval after which a neighbor is declared dead
+ type: int
+ hello_interval:
+ description: Time between HELLO packets
+ type: int
+ transmit_delay:
+ description: Estimated time needed to send link-state update packet
+ type: int
+ mpls:
+ description: Configure MPLS routing protocol parameters
+ type: dict
+ suboptions:
+ traffic_eng:
+ description: Configure an ospf area to run MPLS Traffic Engineering
+ type: bool
+ ldp:
+ description: Configure LDP parameters
+ type: dict
+ suboptions:
+ auto_config:
+ description: Enable LDP IGP interface auto-configuration
+ type: bool
+ sync:
+ description: Enable LDP IGP synchronization
+ type: bool
+ sync_igp_shortcuts:
+ description: LDP sync for igp-shortcut tunnels
+ type: bool
+ mtu_ignore:
+ description: Enable/Disable ignoring of MTU in DBD packets
+ type: str
+ choices:
+ - enable
+ - disable
+ bfd:
+ description: Configure BFD parameters
+ type: dict
+ suboptions:
+ fast_detect:
+ description: Configure fast detection
+ type: dict
+ suboptions:
+ set:
+ description: Enable fast detection only
+ type: bool
+ strict_mode:
+ description: Hold down neighbor session until BFD session is up
+ type: bool
+ minimum_interval:
+ description: Hello interval in milli-seconds
+ type: int
+ multiplier:
+ description: Detect multiplier
+ type: int
+ nssa:
+ description:
+ - NSSA settings for the area
+ type: dict
+ suboptions:
+ set:
+ description: Configure area as NSSA
+ type: bool
+ default_information_originate:
+ description: Originate default Type 7 LSA
+ type: dict
+ suboptions:
+ metric:
+ description: OSPFv2 default metric
+ type: int
+ metric_type:
+ description: Metric type for default routes
+ type: int
+ no_redistribution:
+ description: Do not send redistributed LSAs into NSSA area
+ type: bool
+ no_summary:
+ description: Do not send summary LSAs into NSSA area
+ type: bool
+ translate:
+ description: Translate LSA
+ type: dict
+ suboptions:
+ type7:
+ description:
+ - Translate from Type 7 to Type 5
+ type: dict
+ suboptions:
+ always:
+ description:
+ - Always translate LSAs
+ type: bool
+ ranges:
+ description: Summarize routes matching address/mask (border routers
+ only)
+ type: list
+ elements: dict
+ suboptions:
+ address:
+ description: IP in Prefix format (x.x.x.x/len)
+ type: str
+ required: true
+ advertise:
+ description: Advertise this range (default)
+ type: bool
+ not_advertise:
+ description: DoNotAdvertise this range
+ type: bool
+ route_policy:
+ description: Specify the route-policy to filter type 3 LSAs (list
+ can have one inbound and/or one outbound policy only)
+ type: list
+ elements: dict
+ suboptions:
+ parameters:
+ description: Specify parameter values for the policy
+ type: list
+ elements: str
+ direction:
+ description: Specify inbound or outbound
+ type: str
+ choices:
+ - in
+ - out
+ stub:
+ description:
+ - Settings for configuring the area as a stub
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Configure the area as a stub
+ type: bool
+ no_summary:
+ description:
+ - Do not send summary LSA into stub area
+ type: bool
+ virtual_link:
+ description: Define a virtual link
+ type: list
+ elements: dict
+ suboptions:
+ id:
+ description: Router-ID of virtual link neighbor (A.B.C.D)
+ type: str
+ required: true
+ authentication:
+ description: Enable authentication
+ type: dict
+ suboptions:
+ keychain:
+ description: Specify keychain name
+ type: str
+ message_digest:
+ description: Use message-digest authentication
+ type: dict
+ suboptions:
+ keychain:
+ description: Specify keychain name
+ type: str
+ no_auth:
+ description: Use no authentication
+ type: bool
+ authentication_key:
+ description: Used to mention authentication password (key)
+ type: dict
+ suboptions:
+ password:
+ description: The OSPFv2 password (key)
+ type: str
+ clear:
+ description: Specifies an UNENCRYPTED password (key) will
+ follow
+ type: str
+ encrypted:
+ description: Specifies an ENCRYPTED password (key) will follow
+ type: str
+ dead_interval:
+ description: Interval after which a neighbor is declared dead
+ type: int
+ hello_interval:
+ description: Time between HELLO packets
+ type: int
+ retransmit_interval:
+ description: Delay between LSA retransmissions
+ type: int
+ transmit_delay:
+ description: Link state transmit delay
+ type: int
+ message_digest_key:
+ description: Message digest authentication password (key)
+ type: dict
+ suboptions:
+ id:
+ description: Key ID (1-255)
+ type: int
+ required: true
+ md5:
+ description: Use MD5 Algorithm
+ type: dict
+ suboptions:
+ password:
+ description: The OSPFv2 password (key)
+ type: str
+ clear:
+ description: Specifies an UNENCRYPTED password (key) will
+ follow
+ type: bool
+ encrypted:
+ description: Specifies an ENCRYPTED password (key) will
+ follow
+ type: bool
+
+ authentication_key:
+ description: Used to mention authentication password (key)
+ type: dict
+ suboptions:
+ password:
+ description: The OSPFv2 password (key)
+ type: str
+ clear:
+ description: Specifies an UNENCRYPTED password (key) will follow
+ type: bool
+ encrypted:
+ description: Specifies an ENCRYPTED password (key) will follow
+ type: bool
+ auto_cost:
+ description: Calculate OSPFv2 interface cost according to bandwidth
+ type: dict
+ suboptions:
+ reference_bandwidth:
+ description: Specify reference bandwidth in megabits per sec
+ type: int
+ disable:
+ description: Assign OSPFv2 cost based on interface type
+ type: bool
+ bfd:
+ description: Configure BFD parameters
+ type: dict
+ suboptions:
+ fast_detect:
+ description: Configure fast detection
+ type: dict
+ suboptions:
+ set:
+ description: Enable fast detection only
+ type: bool
+ strict_mode:
+ description: Hold down neighbor session until BFD session is up
+ type: bool
+ minimum_interval:
+ description: Hello interval in milli-seconds
+ type: int
+ multiplier:
+ description: Detect multiplier
+ type: int
+ capability:
+ description: Enable specific OSPFv2 feature
+ type: dict
+ suboptions:
+ type7:
+ description: NSSA capability
+ type: str
+ opaque:
+ description: Configure opaque LSA
+ type: dict
+ suboptions:
+ disable:
+ description: Disable Opaque LSA capability
+ type: bool
+ set:
+ description: Enable opaque LSA
+ type: bool
+ cost:
+ description: Interface cost (1-65535)
+ type: int
+ database_filter:
+ description: Filter OSPFv2 LSA during synchronization and flooding (all
+ outgoing LSA). Enable/Disable filtering
+ type: str
+ choices: [enable, disable]
+ dead_interval:
+ description: Interval after which a neighbor is declared dead
+ type: int
+ default_information_originate:
+ description: Distribute default route
+ type: dict
+ suboptions:
+ always:
+ description: Always advertise default route
+ type: bool
+ metric:
+ description: OSPFv2 default metric
+ type: int
+ metric_type:
+ description: OSPFv2 metric type for default routes
+ type: int
+ route_policy:
+ description: Apply route-policy to default-information origination
+ type: str
+ set:
+ description: Enable distribution of default route
+ type: bool
+ default_metric:
+ description: Set metric of redistributed routes
+ type: int
+ demand_circuit:
+ description: Enable/Disable OSPFv2 demand circuit
+ type: str
+ choices: [enable, disable]
+ distance:
+ description: Define an administrative distance
+ type: dict
+ suboptions:
+ admin_distance:
+ description: Administrative distance
+ type: list
+ elements: dict
+ suboptions:
+ value:
+ description: Distance value
+ type: int
+ source:
+ description: Source IP address
+ type: str
+ wildcard:
+ description: IP wild card bits (A.B.C.D)
+ type: str
+ access_list:
+ description: Access list name
+ type: str
+ ospf_distance:
+ description: OSPFv2 administrative distance
+ type: dict
+ suboptions:
+ external:
+ description: Distance for external routes
+ type: int
+ inter_area:
+ description: Distance for inter-area routes
+ type: int
+ intra_area:
+ description: Distance for intra-area routes
+ type: int
+ distribute_link_state:
+ description: Enable Distribution of LSAs to external services
+ type: dict
+ suboptions:
+ instance_id:
+ description: Set distribution process instance identifier
+ type: int
+ throttle:
+ description: Throttle time between successive LSA updates
+ type: int
+ distribute_bgp_ls:
+ description: Enable Distribution of LSAs to external services
+ type: dict
+ suboptions:
+ instance_id:
+ description: Set distribution process instance identifier
+ type: int
+ throttle:
+ description: Throttle time between successive LSA updates
+ type: int
+ distribute_list:
+ description: Filter networks in routing updates (list can have one inbound
+ and/or one outbound policy only)
+ type: list
+ elements: dict
+ suboptions:
+ access_list:
+ description: Inbound/outbound access-list
+ type: str
+ direction:
+ description: Filter incoming/outgoing routing updates
+ type: str
+ choices:
+ - in
+ - out
+ outgoing_params:
+ description: Specify additional parameters for outgoing updates only
+ type: dict
+ suboptions:
+ route_type:
+ description: Type of routes
+ type: str
+ choices:
+ - bgp
+ - connected
+ - dagr
+ - ospf
+ - static
+ id:
+ description:
+ - For BGP, specify AS number. 2-byte AS number (or) 4-byte AS
+ number in asdot (X.Y) format (or) 4-byte AS number in asplain
+ format
+ - For OSPF, specify OSPFv2 instance name
+ type: str
+ route_policy:
+ description: Route Policy to filter OSPFv2 prefixes (for incoming
+ updates only)
+ type: str
+ external_out:
+ description: Enable/Disable advertisement of intra-area prefixes as external
+ type: str
+ choices:
+ - enable
+ - disable
+ flood_reduction:
+ description: Enable/Disable OSPFv2 Flood Reduction
+ type: str
+ choices:
+ - enable
+ - disable
+ hello_interval:
+ description: Time between HELLO packets (<1-65535> seconds)
+ type: int
+ ignore_lsa_mospf:
+ description: Do not complain upon receiving MOSPFv2 Type 6 LSA
+ type: bool
+ link_down_fast_detect:
+ description: Enable fast or early detection of link-down events
+ type: bool
+ log_adjacency_changes:
+ description: Log adjacency state changes
+ type: dict
+ suboptions:
+ set:
+ description: Set log adjacency
+ type: bool
+ disable:
+ description: Disable log adjacency changes
+ type: bool
+ detail:
+ description: Log all state changes
+ type: bool
+ loopback_stub_network:
+ description: Advertise loopback as a stub network
+ type: str
+ choices:
+ - enable
+ - disable
+ max_lsa:
+ description:
+ - Feature to limit the number of non-self-originated LSAs
+ type: dict
+ suboptions:
+ threshold:
+ description:
+ - Threshold value (%) at which to generate a warning message
+ type: int
+ ignore_count:
+ description:
+ - Set count on how many times adjacencies can be suppressed
+ type: int
+ ignore_time:
+ description:
+ - Set number of minutes during which all adjacencies are suppressed
+ type: int
+ reset_time:
+ description:
+ - Set number of minutes after which ignore-count is reset to zero
+ type: int
+ warning_only:
+ description:
+ - Log a warning message when limit is exceeded
+ type: bool
+ max_metric:
+ description: Set maximum metric
+ type: dict
+ suboptions:
+ router_lsa:
+ description: Maximum metric in self-originated router-LSAs
+ type: dict
+ suboptions:
+ set:
+ description: Set router-lsa attribute
+ type: bool
+ external_lsa:
+ description: External LSA configuration
+ type: dict
+ suboptions:
+ set:
+ description: Set external-lsa attribute
+ type: bool
+ max_metric_value:
+ description: Set max metric value for external LSAs
+ type: int
+ include_stub:
+ description:
+ - Advertise Max metric for Stub links as well
+ type: bool
+ on_startup:
+ description:
+ - Effective only at startup
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set on-startup attribute
+ type: bool
+ wait_period:
+ description:
+ - Wait period in seconds after startup
+ type: int
+ wait_for_bgp_asn:
+ description:
+ - ASN of BGP to wait for
+ type: int
+ summary_lsa:
+ description:
+ - Summary LSAs configuration
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set summary-lsa attribute
+ type: bool
+ max_metric_value:
+ description:
+ - Max metric value for summary LSAs
+ type: int
+ message_digest_key:
+ description: Message digest authentication password (key)
+ type: dict
+ suboptions:
+ id:
+ description: Key ID
+ type: int
+ required: true
+ md5:
+ description: Use MD5 Algorithm
+ type: dict
+ required: true
+ suboptions:
+ password:
+ description: The OSPFv2 password (key)
+ type: str
+ clear:
+ description: Specifies an UNENCRYPTED password (key) will follow
+ type: bool
+ encrypted:
+ description: Specifies an ENCRYPTED password (key) will follow
+ type: bool
+ microloop_avoidance:
+ description: Avoid microloops
+ type: dict
+ suboptions:
+ protected:
+ description: Avoid microloops for protected prefixes only)
+ type: bool
+ rib_update_delay:
+ description: Delay to introduce between SPF and RIB updates
+ type: int
+ segment_routing:
+ description: Enable segment routing microloop avoidance
+ type: bool
+ monitor_convergence:
+ description: Enables OSPFv2 route convergence monitoring
+ type: dict
+ suboptions:
+ prefix_list:
+ description: Enables Individual Prefix Monitoring
+ type: str
+ track_external_routes:
+ description: Enables Tracking External(Type-5/7) Prefix monitoring
+ type: bool
+ track_ip_frr:
+ description: Enables Tracking IP-Frr Convergence
+ type: bool
+ track_summary_routes:
+ description: Enables Tracking Summary(Inter-Area) Prefix monitoring
+ type: bool
+ mpls:
+ description: Configure MPLS routing protocol parameters
+ type: dict
+ suboptions:
+ traffic_eng:
+ description: Routing protocol commands for MPLS Traffic Engineering
+ type: dict
+ suboptions:
+ autoroute_exclude:
+ description: Exclude IP address destinations from using TE tunnels
+ type: dict
+ suboptions:
+ route_policy:
+ description: Policy name
+ type: str
+ parameters:
+ description: Specify parameter values for the policy
+ type: list
+ elements: str
+ igp_intact:
+ description: Retain one or more IPv4 nexthops with tunnel nexthops
+ type: bool
+ ldp_sync_update:
+ description: Enable LDP sync induced metric propagation
+ type: bool
+ multicast_intact:
+ description: Publish multicast-intact paths to RIB
+ type: bool
+ router_id:
+ description: Traffic Engineering stable IP address for system
+ type: str
+ ldp:
+ description: Configure LDP parameters
+ type: dict
+ suboptions:
+ auto_config:
+ description: Enable LDP IGP interface auto-configuration
+ type: bool
+ sync:
+ description: Enable LDP IGP synchronization
+ type: bool
+ sync_igp_shortcuts:
+ description: LDP sync for igp-shortcut tunnels
+ type: bool
+ mtu_ignore:
+ description: Enable/Disable ignoring of MTU in DBD packets
+ type: str
+ choices:
+ - enable
+ - disable
+ network:
+ description: Network type
+ type: dict
+ suboptions:
+ broadcast:
+ description: Specify OSPFv2 broadcast multi-access network
+ type: bool
+ non_broadcast:
+ description: Specify OSPFv2 NBMA network
+ type: bool
+ point_to_multipoint:
+ description: Specify OSPFv2 point-to-multipoint network
+ type: bool
+ point_to_point:
+ description: Specify OSPFv2 point-to-point network
+ type: bool
+ nsf:
+ description: Non-stop forwarding
+ type: dict
+ suboptions:
+ cisco:
+ description: Cisco Non-stop forwarding
+ type: dict
+ suboptions:
+ enforce_global:
+ description: Cancel NSF restart when non-NSF-aware neighbors detected
+ for the whole OSPFv2 process
+ type: bool
+ set:
+ description: Enable Cisco NSF
+ type: bool
+ flush_delay_time:
+ description: Maximum time allowed for external route learning
+ type: int
+ ietf:
+ description: IETF graceful restart
+ type: dict
+ suboptions:
+ helper_disable:
+ description: Disable router's helper support level
+ type: bool
+ set:
+ description: Only enable ietf option
+ type: bool
+ interval:
+ description: Minimum interval between NSF restarts (<90-3600> seconds)
+ type: int
+ lifetime:
+ description: Maximum route lifetime following restart (<90-1800> seconds)
+ type: int
+ nsr:
+ description: Enable NSR for all VRFs in this process. 'False' option to
+ disable NSR for all VRFs in this process
+ type: bool
+ packet_size:
+ description: Size of OSPFv2 packets to use. min=576 max=MTU bytes
+ type: int
+ passive:
+ description: Enable/Disable passive
+ type: str
+ choices:
+ - enable
+ - disable
+ prefix_suppression:
+ description: Suppress advertisement of the prefixes
+ type: dict
+ suboptions:
+ set:
+ description: Set the suppression option
+ type: bool
+ secondary_address:
+ description: Enable/Disable secondary address suppression
+ type: bool
+ priority:
+ description: Router priority
+ type: int
+ process_id:
+ description: The OSPFv2 Process ID
+ type: str
+ required: true
+ protocol_shutdown:
+ description: Protocol specific configuration
+ type: dict
+ suboptions:
+ host_mode:
+ description: Only traffic destined for this box allowed(cisco-support)
+ type: bool
+ on_reload:
+ description: Shutdown post reload only
+ type: bool
+ set:
+ description: Shutdown the OSPFv2 Protocol
+ type: bool
+ limit:
+ description: High watermark for incoming priority events
+ type: dict
+ suboptions:
+ high:
+ description: Hello events are dropped when incoming event queue
+ exceeds this value
+ type: int
+ low:
+ description: DBD/LS Update/Req packets are dropped when incoming
+ event queue exceeds this value
+ type: int
+ medium:
+ description: LSA ACKs are dropped when incoming event queue exceeds
+ this value
+ type: int
+ redistribute:
+ description: Redistribute information from another routing Protocol
+ type: dict
+ suboptions:
+ route_type:
+ description: Route type to redistribute
+ type: str
+ choices: [application, bgp, connected, dagr, eigrp, isis, mobile,
+ ospf, rip, static, subscriber]
+ id:
+ description: OnePK application name for application routes (or) AS
+ number for bgp and eigrp (or) instance name for isis and ospf
+ type: str
+ level:
+ description: ISIS levels
+ choices: [1, 2, 12]
+ type: int
+ lsa_type_summary:
+ description: LSA type 3 for redistributed routes
+ type: bool
+ match:
+ description: Redistribution of routes. For OSPFv2 - external/internal/nssa-external
+ 1/2. For EIGRP - external/internal
+ type: str
+ metric:
+ description: Metric for redistributed routes
+ type: int
+ metric_type:
+ description: OSPFv2 exterior metric type for redistributed routes
+ type: int
+ choices: [1, 2]
+ route_policy:
+ description: Apply route-policy to redistribution
+ type: dict
+ suboptions:
+ name:
+ description: Name of the policy
+ type: str
+ parameters:
+ description: Specify parameter values for the policy
+ type: list
+ elements: str
+ nssa_only:
+ description: Redistribute to NSSA areas only
+ type: bool
+ preserve_med:
+ description: Preserve med of BGP routes
+ type: bool
+ tag:
+ description: Set tag for routes redistributed into OSPFv2
+ type: int
+ retransmit_interval:
+ description: Delay between LSA retransmissions
+ type: int
+ router_id:
+ description: OSPFv2 router-id in IPv4 address format (A.B.C.D)
+ type: str
+ security_ttl:
+ description: Enable security
+ type: dict
+ suboptions:
+ set:
+ description: Enable ttl security
+ type: bool
+ hops:
+ description: Maximum number of IP hops allowed <1-254>
+ type: int
+ summary_in:
+ description: Enable/Disable advertisement of external prefixes as inter-area
+ type: str
+ choices: [enable, disable]
+ summary_prefix:
+ description: Configure IP address summaries
+ type: list
+ elements: dict
+ suboptions:
+ prefix:
+ description: IP summary address/mask (A.B.C.D/prefix)
+ type: str
+ required: true
+ not_advertise:
+ description: Suppress routes that match the specified prefix/mask
+ pair
+ type: bool
+ tag:
+ description: Set tag
+ type: int
+ timers:
+ description: Configure timer related constants
+ type: dict
+ suboptions:
+ graceful_shutdown:
+ description: Timers for graceful shutdown(cisco-support)
+ type: dict
+ suboptions:
+ initial_delay:
+ description: Delay before starting graceful shutdown
+ type: int
+ retain_routes:
+ description: Time to keep routes active after graceful shutdown
+ type: int
+ lsa:
+ description: OSPFv2 global LSA timers
+ type: dict
+ suboptions:
+ group_pacing:
+ description: OSPFv2 LSA group pacing timer. Interval between group
+ of LSA being refreshed or maxaged
+ type: int
+ min_arrival:
+ description: OSPFv2 MinLSArrival timer. The minimum interval in
+ millisec between accepting the same LSA
+ type: int
+ refresh:
+ description: OSPFv2 LSA refresh interval. How often self-originated
+ LSAs should be refreshed, in seconds
+ type: int
+ throttle:
+ description: OSPFv2 throttle timers
+ type: dict
+ suboptions:
+ lsa_all:
+ description: LSA throttle timers for all types of OSPFv2 LSAs
+ type: dict
+ suboptions:
+ initial_delay:
+ description: Delay to generate first occurance of LSA in milliseconds
+ type: int
+ min_delay:
+ description: Minimum delay between originating the same LSA
+ in milliseconds
+ type: int
+ max_delay:
+ description: Maximum delay between originating the same LSA
+ in milliseconds
+ type: int
+ spf:
+ description: OSPFv2 SPF throttle timers
+ type: dict
+ suboptions:
+ change_delay:
+ description: Delay between receiving a change to SPF calculation
+ in milliseconds
+ type: int
+ second_delay:
+ description: Delay between first and second SPF calculation
+ in milliseconds
+ type: int
+ max_wait:
+ description: Maximum wait time in milliseconds for SPF calculations
+ type: int
+ fast_reroute:
+ description: Fast-reroute throttle timer. Delay between end of
+ SPF and start of the fast-reroute computation in milliseconds
+ type: int
+ pacing_flood:
+ description: OSPFv2 flood pacing timer. Interval in msec to pace flooding
+ on all interfaces
+ type: int
+ transmit_delay:
+ description: Estimated time needed to send link-state update packet
+ type: int
+ weight:
+ description: Interface weight
+ type: int
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config router ospf).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - deleted
+ - parsed
+ - gathered
+ - rendered
+ - overridden
+ default: merged
+
+"""
+
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospf
+# Thu Jun 11 15:54:44.569 UTC
+# % No such configuration item(s)
+#
+
+- name: Merge provided OSPFv2 configuration with the existing configuration
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: '27'
+ areas:
+ - area_id: '10'
+ hello_interval: 2
+ authentication:
+ keychain: ansi11393
+ - process_id: '26'
+ adjacency_stagger:
+ max_adjacency: 20
+ min_adjacency: 10
+ - process_id: '10'
+ authentication:
+ keychain: ansible_test1102
+ areas:
+ - area_id: '11'
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: '30'
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ weight: 2
+ packet_size: 577
+ priority: 1
+ router_id: 2.2.2.2
+ demand_circuit: enable
+ passive: disable
+ summary_in: enable
+ flood_reduction: disable
+ mtu_ignore: enable
+ external_out: disable
+ state: merged
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": {}
+#
+# "commands": [
+# "router ospf 30",
+# "cost 2",
+# "weight 2",
+# "passive disable",
+# "priority 1",
+# "flood-reduction disable",
+# "default-metric 10",
+# "router-id 2.2.2.2",
+# "demand-circuit enable",
+# "packet-size 577",
+# "transmit-delay 2",
+# "summary-in enable",
+# "external-out disable",
+# "dead-interval 2",
+# "hello-interval 1",
+# "retransmit-interval 2",
+# "mtu-ignore enable",
+# "area 11 default-cost 5",
+# "area 22 default-cost 6",
+# "router ospf 26",
+# "adjacency stagger 10 20",
+# "authentication message-digest keychain ansible1101pass",
+# "router ospf 27",
+# "area 10 authentication keychain ansi11393",
+# "area 10 hello-interval 2",
+# "router ospf 10",
+# "authentication keychain ansible_test1102",
+# "area 11 default-cost 5",
+# "area 11 cost 11",
+# "area 22 default-cost 6"
+# ]
+#
+# "after": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "authentication": {
+# "keychain": "ansible_test1102"
+# },
+# "process_id": "10"
+# },
+# {
+# "adjacency_stagger": {
+# "max_adjacency": 20,
+# "min_adjacency": 10
+# },
+# "authentication": {
+# "message_digest": {
+# "keychain": "ansible1101pass"
+# }
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "authentication": {
+# "keychain": "ansi11393"
+# },
+# "hello_interval": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": "enable",
+# "external_out": "disable",
+# "flood_reduction": "disable",
+# "hello_interval": 1,
+# "mtu_ignore": "enable",
+# "packet_size": 577,
+# "passive": "disable",
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "summary_in": "enable",
+# "transmit_delay": 2,
+# "weight": 2
+# }
+# ]
+# }
+#
+#
+# ------------
+# After state
+# ------------
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospf
+# Thu Jun 11 16:06:44.406 UTC
+# router ospf 10
+# authentication keychain ansible_test1102
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospf 26
+# authentication message-digest keychain ansible1101pass
+# adjacency stagger 10 20
+# !
+# router ospf 27
+# area 10
+# authentication keychain ansi11393
+# hello-interval 2
+# !
+# !
+# router ospf 30
+# router-id 2.2.2.2
+# summary-in enable
+# external-out disable
+# cost 2
+# packet-size 577
+# weight 2
+# passive disable
+# priority 1
+# mtu-ignore enable
+# flood-reduction disable
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit enable
+# hello-interval 1
+# transmit-delay 2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+#
+
+
+# Using replaced
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospf
+# Thu Jun 11 16:06:44.406 UTC
+# router ospf 10
+# authentication keychain ansible_test1102
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospf 26
+# authentication message-digest keychain ansible1101pass
+# adjacency stagger 10 20
+# !
+# router ospf 27
+# area 10
+# authentication keychain ansi11393
+# hello-interval 2
+# !
+# !
+# router ospf 30
+# router-id 2.2.2.2
+# summary-in enable
+# external-out disable
+# cost 2
+# packet-size 577
+# weight 2
+# passive disable
+# priority 1
+# mtu-ignore enable
+# flood-reduction disable
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit enable
+# hello-interval 1
+# transmit-delay 2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+#
+
+- name: Replace OSPFv2 routes configurations from the device
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ authentication:
+ keychain: ansi11393
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ state: replaced
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "authentication": {
+# "keychain": "ansible_test1102"
+# },
+# "process_id": "10"
+# },
+# {
+# "adjacency_stagger": {
+# "max_adjacency": 20,
+# "min_adjacency": 10
+# },
+# "authentication": {
+# "message_digest": {
+# "keychain": "ansible1101pass"
+# }
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "authentication": {
+# "keychain": "ansi11393"
+# },
+# "hello_interval": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": "enable",
+# "external_out": "disable",
+# "flood_reduction": "disable",
+# "hello_interval": 1,
+# "mtu_ignore": "enable",
+# "packet_size": 577,
+# "passive": "disable",
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "summary_in": "enable",
+# "transmit_delay": 2,
+# "weight": 2
+# }
+# ]
+# }
+#
+# "commands": [
+# "router ospf 27",
+# "no area 10 authentication keychain ansi11393",
+# "area 20 authentication keychain ansi11393",
+# "area 20 default-cost 2",
+# "area 20 cost 2"
+# ]
+#
+# "after": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "authentication": {
+# "keychain": "ansible_test1102"
+# },
+# "process_id": "10"
+# },
+# {
+# "adjacency_stagger": {
+# "max_adjacency": 20,
+# "min_adjacency": 10
+# },
+# "authentication": {
+# "message_digest": {
+# "keychain": "ansible1101pass"
+# }
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "hello_interval": 2
+# },
+# {
+# "area_id": "20",
+# "authentication": {
+# "keychain": "ansi11393"
+# },
+# "cost": 2,
+# "default_cost": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": "enable",
+# "external_out": "disable",
+# "flood_reduction": "disable",
+# "hello_interval": 1,
+# "mtu_ignore": "enable",
+# "packet_size": 577,
+# "passive": "disable",
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "summary_in": "enable",
+# "transmit_delay": 2,
+# "weight": 2
+# }
+# ]
+# }
+#
+#
+# -----------
+# After state
+# -----------
+#
+# RP/0/RP0/CPU0:anton(config)#do show running-config router ospf
+# Thu Jun 11 16:40:31.038 UTC
+# router ospf 10
+# authentication keychain ansible_test1102
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospf 26
+# authentication message-digest keychain ansible1101pass
+# adjacency stagger 10 20
+# !
+# router ospf 27
+# area 10
+# hello-interval 2
+# !
+# area 20
+# cost 2
+# authentication keychain ansi11393
+# default-cost 2
+# !
+# !
+# router ospf 30
+# router-id 2.2.2.2
+# summary-in enable
+# external-out disable
+# cost 2
+# packet-size 577
+# weight 2
+# passive disable
+# priority 1
+# mtu-ignore enable
+# flood-reduction disable
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit enable
+# hello-interval 1
+# transmit-delay 2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+#
+
+
+# Using overridden
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospf
+# Thu Jun 11 16:06:44.406 UTC
+# router ospf 10
+# authentication keychain ansible_test1102
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospf 26
+# authentication message-digest keychain ansible1101pass
+# adjacency stagger 10 20
+# !
+# router ospf 27
+# area 10
+# authentication keychain ansi11393
+# hello-interval 2
+# !
+# !
+# router ospf 30
+# router-id 2.2.2.2
+# summary-in enable
+# external-out disable
+# cost 2
+# packet-size 577
+# weight 2
+# passive disable
+# priority 1
+# mtu-ignore enable
+# flood-reduction disable
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit enable
+# hello-interval 1
+# transmit-delay 2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+#
+
+- name: Override existing OSPFv2 configurations from the device
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ authentication:
+ keychain: ansi11393
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ authentication:
+ keychain: ansi11393
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ state: overridden
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "authentication": {
+# "keychain": "ansible_test1102"
+# },
+# "process_id": "10"
+# },
+# {
+# "adjacency_stagger": {
+# "max_adjacency": 20,
+# "min_adjacency": 10
+# },
+# "authentication": {
+# "message_digest": {
+# "keychain": "ansible1101pass"
+# }
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "authentication": {
+# "keychain": "ansi11393"
+# },
+# "hello_interval": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": "enable",
+# "external_out": "disable",
+# "flood_reduction": "disable",
+# "hello_interval": 1,
+# "mtu_ignore": "enable",
+# "packet_size": 577,
+# "passive": "disable",
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "summary_in": "enable",
+# "transmit_delay": 2,
+# "weight": 2
+# }
+# ]
+# }
+#
+# "commands": [
+# "router ospf 10",
+# "no authentication keychain ansible_test1102",
+# "no area 11 default-cost 5",
+# "no area 11 cost 11",
+# "no area 22 default-cost 6",
+# "router ospf 30",
+# "no cost 2",
+# "no weight 2",
+# "no passive disable",
+# "no priority 1",
+# "no flood-reduction disable",
+# "no default-metric 10",
+# "no router-id 2.2.2.2",
+# "no demand-circuit enable",
+# "no packet-size 577",
+# "no transmit-delay 2",
+# "no summary-in enable",
+# "no external-out disable",
+# "no dead-interval 2",
+# "no hello-interval 1",
+# "no retransmit-interval 2",
+# "no mtu-ignore enable",
+# "no area 11 default-cost 5",
+# "no area 22 default-cost 6",
+# "router ospf 27",
+# "area 20 authentication keychain ansi11393",
+# "area 20 default-cost 2",
+# "area 20 cost 2"
+# ]
+#
+# "after": {
+# "processes": [
+# {
+# "process_id": "10"
+# },
+# {
+# "adjacency_stagger": {
+# "max_adjacency": 20,
+# "min_adjacency": 10
+# },
+# "authentication": {
+# "message_digest": {
+# "keychain": "ansible1101pass"
+# }
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "authentication": {
+# "keychain": "ansi11393"
+# },
+# "hello_interval": 2
+# },
+# {
+# "area_id": "20",
+# "authentication": {
+# "keychain": "ansi11393"
+# },
+# "cost": 2,
+# "default_cost": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "process_id": "30"
+# }
+# ]
+# }
+#
+#
+# -----------
+# After state
+# -----------
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospf
+# Thu Jun 11 16:50:36.332 UTC
+# router ospf 10
+# !
+# router ospf 26
+# authentication message-digest keychain ansible1101pass
+# adjacency stagger 10 20
+# !
+# router ospf 27
+# area 10
+# authentication keychain ansi11393
+# hello-interval 2
+# !
+# area 20
+# cost 2
+# authentication keychain ansi11393
+# default-cost 2
+# !
+# !
+# router ospf 30
+# !
+#
+
+
+# Using deleted
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospf
+# Thu Jun 11 16:06:44.406 UTC
+# router ospf 10
+# authentication keychain ansible_test1102
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospf 26
+# authentication message-digest keychain ansible1101pass
+# adjacency stagger 10 20
+# !
+# router ospf 27
+# area 10
+# authentication keychain ansi11393
+# hello-interval 2
+# !
+# !
+# router ospf 30
+# router-id 2.2.2.2
+# summary-in enable
+# external-out disable
+# cost 2
+# packet-size 577
+# weight 2
+# passive disable
+# priority 1
+# mtu-ignore enable
+# flood-reduction disable
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit enable
+# hello-interval 1
+# transmit-delay 2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+#
+
+- name: Deleted existing OSPFv2 configurations from the device
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: '10'
+ - process_id: '26'
+ - process_id: '27'
+ - process_id: '30'
+ state: deleted
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "authentication": {
+# "keychain": "ansible_test1102"
+# },
+# "process_id": "10"
+# },
+# {
+# "adjacency_stagger": {
+# "max_adjacency": 20,
+# "min_adjacency": 10
+# },
+# "authentication": {
+# "message_digest": {
+# "keychain": "ansible1101pass"
+# }
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "authentication": {
+# "keychain": "ansi11393"
+# },
+# "hello_interval": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": "enable",
+# "external_out": "disable",
+# "flood_reduction": "disable",
+# "hello_interval": 1,
+# "mtu_ignore": "enable",
+# "packet_size": 577,
+# "passive": "disable",
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "summary_in": "enable",
+# "transmit_delay": 2,
+# "weight": 2
+# }
+# ]
+# },
+#
+# "commands": [
+# "router ospf 10",
+# "no authentication keychain ansible_test1102",
+# "no area 11 default-cost 5",
+# "no area 11 cost 11",
+# "no area 22 default-cost 6",
+# "router ospf 26",
+# "no adjacency stagger 10 20",
+# "no authentication message-digest keychain ansible1101pass",
+# "router ospf 27",
+# "no area 10 authentication keychain ansi11393",
+# "no area 10 hello-interval 2",
+# "router ospf 30",
+# "no cost 2",
+# "no weight 2",
+# "no passive disable",
+# "no priority 1",
+# "no flood-reduction disable",
+# "no default-metric 10",
+# "no router-id 2.2.2.2",
+# "no demand-circuit enable",
+# "no packet-size 577",
+# "no transmit-delay 2",
+# "no summary-in enable",
+# "no external-out disable",
+# "no dead-interval 2",
+# "no hello-interval 1",
+# "no retransmit-interval 2",
+# "no mtu-ignore enable",
+# "no area 11 default-cost 5",
+# "no area 22 default-cost 6"
+# ]
+#
+# "after": {
+# "processes": [
+# {
+# "process_id": "10"
+# },
+# {
+# "process_id": "26"
+# },
+# {
+# "process_id": "27"
+# },
+# {
+# "process_id": "30"
+# }
+# ]
+# }
+#
+#
+# -----------
+# After state
+# -----------
+#
+# RP/0/RP0/CPU0:anton(config)#show running-config router ospf
+# Thu Jun 11 17:07:34.218 UTC
+# router ospf 10
+# !
+# router ospf 26
+# !
+# router ospf 27
+# !
+# router ospf 30
+# !
+
+
+# Using parsed
+# parsed.cfg
+# ------------
+# Thu Jun 11 17:28:51.918 UTC
+# router ospf 10
+# authentication keychain ansible_test1102
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospf 26
+# authentication message-digest keychain ansible1101pass
+# adjacency stagger 10 20
+# !
+# router ospf 27
+# area 10
+# authentication keychain ansi11393
+# hello-interval 2
+# !
+# !
+# router ospf 30
+# router-id 2.2.2.2
+# summary-in enable
+# external-out disable
+# cost 2
+# packet-size 577
+# weight 2
+# passive disable
+# priority 1
+# mtu-ignore enable
+# flood-reduction disable
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit enable
+# hello-interval 1
+# transmit-delay 2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+- name: Parsed the device configuration to get output commands
+ cisco.iosxr.iosxr_ospfv2:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+#
+#
+# -------------------------
+# Module Execution Result
+# -------------------------
+#
+#
+# "parsed": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "authentication": {
+# "keychain": "ansible_test1102"
+# },
+# "process_id": "10"
+# },
+# {
+# "adjacency_stagger": {
+# "max_adjacency": 20,
+# "min_adjacency": 10
+# },
+# "authentication": {
+# "message_digest": {
+# "keychain": "ansible1101pass"
+# }
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "authentication": {
+# "keychain": "ansi11393"
+# },
+# "hello_interval": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": "enable",
+# "external_out": "disable",
+# "flood_reduction": "disable",
+# "hello_interval": 1,
+# "mtu_ignore": "enable",
+# "packet_size": 577,
+# "passive": "disable",
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "summary_in": "enable",
+# "transmit_delay": 2,
+# "weight": 2
+# }
+# ]
+# }
+
+
+
+# Using rendered
+#
+#
+- name: Render the commands for provided configuration
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ authentication:
+ keychain: ansi11393
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ - process_id: 10
+ authentication:
+ keychain: ansible_test1102
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ weight: 2
+ packet_size: 577
+ priority: 1
+ router_id: 2.2.2.2
+ demand_circuit: enable
+ passive: disable
+ summary_in: enable
+ flood_reduction: disable
+ mtu_ignore: enable
+ external_out: disable
+ state: rendered
+
+#
+#
+# -------------------------
+# Module Execution Result
+# -------------------------
+#
+#
+# "rendered": [
+# "router ospf 27",
+# "area 10 authentication keychain ansi11393",
+# "area 10 hello-interval 2",
+# "router ospf 26",
+# "adjacency stagger 10 20",
+# "authentication message-digest keychain ansible1101pass",
+# "router ospf 10",
+# "authentication keychain ansible_test1102",
+# "area 11 default-cost 5",
+# "area 11 cost 11",
+# "area 22 default-cost 6",
+# "router ospf 30",
+# "cost 2",
+# "weight 2",
+# "passive disable",
+# "priority 1",
+# "flood-reduction disable",
+# "default-metric 10",
+# "router-id 2.2.2.2",
+# "demand-circuit enable",
+# "packet-size 577",
+# "transmit-delay 2",
+# "summary-in enable",
+# "external-out disable",
+# "dead-interval 2",
+# "hello-interval 1",
+# "retransmit-interval 2",
+# "mtu-ignore enable",
+# "area 11 default-cost 5",
+# "area 22 default-cost 6"
+# ]
+
+
+# Using gathered
+#
+# Before state:
+# -------------
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospf
+# Thu Jun 11 16:06:44.406 UTC
+# router ospf 10
+# authentication keychain ansible_test1102
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospf 26
+# authentication message-digest keychain ansible1101pass
+# adjacency stagger 10 20
+# !
+# router ospf 27
+# area 10
+# authentication keychain ansi11393
+# hello-interval 2
+# !
+# !
+# router ospf 30
+# router-id 2.2.2.2
+# summary-in enable
+# external-out disable
+# cost 2
+# packet-size 577
+# weight 2
+# passive disable
+# priority 1
+# mtu-ignore enable
+# flood-reduction disable
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit enable
+# hello-interval 1
+# transmit-delay 2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+#
+- name: Gather ospfv2 routes configuration
+ cisco.iosxr.iosxr_ospfv2:
+ state: gathered
+#
+#
+# -------------------------
+# Module Execution Result
+# -------------------------
+#
+# "gathered": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "authentication": {
+# "keychain": "ansible_test1102"
+# },
+# "process_id": "10"
+# },
+# {
+# "adjacency_stagger": {
+# "max_adjacency": 20,
+# "min_adjacency": 10
+# },
+# "authentication": {
+# "message_digest": {
+# "keychain": "ansible1101pass"
+# }
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "authentication": {
+# "keychain": "ansi11393"
+# },
+# "hello_interval": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": "enable",
+# "external_out": "disable",
+# "flood_reduction": "disable",
+# "hello_interval": 1,
+# "mtu_ignore": "enable",
+# "packet_size": 577,
+# "passive": "disable",
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "summary_in": "enable",
+# "transmit_delay": 2,
+# "weight": 2
+# }
+# ]
+# }
+#
+# After state:
+# -------------
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospf
+# Thu Jun 11 16:06:44.406 UTC
+# router ospf 10
+# authentication keychain ansible_test1102
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospf 26
+# authentication message-digest keychain ansible1101pass
+# adjacency stagger 10 20
+# !
+# router ospf 27
+# area 10
+# authentication keychain ansi11393
+# hello-interval 2
+# !
+# !
+# router ospf 30
+# router-id 2.2.2.2
+# summary-in enable
+# external-out disable
+# cost 2
+# packet-size 577
+# weight 2
+# passive disable
+# priority 1
+# mtu-ignore enable
+# flood-reduction disable
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit enable
+# hello-interval 1
+# transmit-delay 2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+#
+#
+
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample:
+ - "router ospf 30"
+ - "authentication message-digest keychain 'ansible1101pass'"
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.ospfv2.ospfv2 import (
+ Ospfv2Args,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.ospfv2.ospfv2 import (
+ Ospfv2,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+ module = AnsibleModule(
+ argument_spec=Ospfv2Args.argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ mutually_exclusive=mutually_exclusive,
+ )
+ result = Ospfv2(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_ospfv3.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_ospfv3.py
new file mode 100644
index 00000000..ae9f5719
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_ospfv3.py
@@ -0,0 +1,2783 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for iosxr_ospfv3
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+module: iosxr_ospfv3
+version_added: 1.1.0
+short_description: ospfv3 resource module
+description:
+ - This module manages global ospfv3 configuration on devices running Cisco IOS-XR
+author: Rohit Thakur (@rohitthakur2590)
+notes:
+ - Tested against IOS-XR 6.1.3
+ - This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html)
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config router ospfv3).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A list of ospfv3 process configuration
+ type: dict
+ suboptions:
+ processes:
+ description: A list of ospfv3 instances configuration
+ type: list
+ elements: dict
+ suboptions:
+ process_id:
+ description: The OSPFv3 Process ID
+ type: str
+ required: true
+ address_family_unicast:
+ description: Enable unicast topology for ipv4 address family
+ type: bool
+ authentication:
+ description: Enable authentication
+ type: dict
+ suboptions:
+ disable:
+ description: Do not authenticate OSPFv3 packets
+ type: bool
+ default: false
+ ipsec:
+ description: Specify IPSec AH authentication attributes
+ type: dict
+ suboptions:
+ spi:
+ description: Specify the Security Parameter Index value
+ type: int
+ algorithim_type:
+ description: Specify the type of algorithim
+ type: str
+ choices: ["md5", "sha1"]
+ key:
+ description: Specify key
+ type: str
+ clear_key:
+ description: Specify key in cleartext form
+ type: str
+ password_key:
+ description: Specify key in encrypted form
+ type: str
+ auto_cost:
+ description: Calculate ospfv3 interface cost according to bandwidth
+ type: dict
+ suboptions:
+ reference_bandwidth:
+ description: Specify reference bandwidth in megabits per sec
+ type: int
+ disable:
+ description: Assign ospfv3 cost based on interface type
+ type: bool
+ bfd:
+ description: Configure BFD parameters
+ type: dict
+ suboptions:
+ fast_detect:
+ description: Configure fast detection
+ type: dict
+ suboptions:
+ set:
+ description: Enable fast detection only
+ type: bool
+ strict_mode:
+ description: Hold down neighbor session until BFD session is up
+ type: bool
+ minimum_interval:
+ description: Hello interval in milli-seconds
+ type: int
+ multiplier:
+ description: Detect multiplier
+ type: int
+ areas:
+ description: Configure ospfv3 areas' properties
+ type: list
+ elements: dict
+ suboptions:
+ area_id:
+ description: Area ID as IP address or integer
+ type: str
+ required: True
+ authentication:
+ description: Enable authentication
+ type: dict
+ suboptions:
+ disable:
+ description: Do not authenticate OSPFv3 packets
+ type: bool
+ default: false
+ ipsec:
+ description: Specify IPSec AH authentication attributes
+ type: dict
+ suboptions:
+ spi:
+ description: Specify the Security Parameter Index value
+ type: int
+ algorithim_type:
+ description: Specify the type of algorithim
+ type: str
+ choices: ["md5", "sha1"]
+ key:
+ description: Specify key
+ type: str
+ clear_key:
+ description: Specify key in cleartext form
+ type: str
+ password_key:
+ description: Specify key in encrypted form
+ type: str
+ bfd:
+ description: Configure BFD parameters
+ type: dict
+ suboptions:
+ fast_detect:
+ description: Configure fast detection
+ type: dict
+ suboptions:
+ set:
+ description: Enable fast detection only
+ type: bool
+ strict_mode:
+ description: Hold down neighbor session until BFD session is up
+ type: bool
+ minimum_interval:
+ description: Hello interval in milli-seconds
+ type: int
+ multiplier:
+ description: Detect multiplier
+ type: int
+ cost:
+ description: Interface cost
+ type: int
+ database_filter:
+ description: Filter LSAs during synchronization and flooding
+ type: dict
+ suboptions:
+ all_outgoing_lsa:
+ description: Filter all outgoing LSA
+ type: bool
+ dead_interval:
+ description: Interval after which a neighbor is declared dead
+ type: int
+ default_cost:
+ description: Set the summary default-cost of a NSSA/stub area. Stub's advertised external route metric
+ type: int
+ demand_circuit:
+ description: Enable/Disable ospfv3 demand circuit
+ type: bool
+ distrinbute_rib_prefix_list_name:
+ description: Filter LSAs during synchronization and flooding
+ type: str
+ fast_reroute:
+ description: Specify IP Fast Reroute
+ type: dict
+ suboptions:
+ disabled:
+ description: Disable IP fast reroute
+ type: bool
+ per_link:
+ description: Specify per-prefix computation
+ type: dict
+ suboptions:
+ information_type:
+ description: Specify per-link LFA exclusion or FRR LFA candidate information
+ type: str
+ choices: ["exclude", "lfa_candidate"]
+ use_candidate_only:
+ description: Enable/Disable backup selection from candidate-list only
+ type: bool
+ interface:
+ description: Specify Per-link LFA exclusion information
+ type: dict
+ suboptions:
+ bvi:
+ description: Specify Bridge-Group Virtual Interface
+ type: list
+ elements: int
+ bundle_ether:
+ description: Specify Aggregated Ethernet interface(s)
+ type: list
+ elements: int
+ pos_int:
+ description: Specify Aggregated pos interface(s)
+ type: list
+ elements: int
+ fast_ethernet:
+ description: Specify FastEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ fiftygige:
+ description: Specify FiftyGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ fortygige:
+ description: Specify FortyGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ fourhundredgige:
+ description: Specify FourHundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ gigabitethernet:
+ description: Specify GigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ hundredgige:
+ description: Specify HundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ mgmteth:
+ description: Specify MgmtEth/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ multilink:
+ description: Specify Multilink network interface(s)
+ type: list
+ elements: str
+ pw_ether:
+ description: Specify PWHE Ethernet Interface
+ type: list
+ elements: int
+ pw_iw:
+ description: Specify PWHE VC11 IP Interworking Interface
+ type: list
+ elements: int
+ srp:
+ description: Specify SRP interface(s)
+ type: list
+ elements: str
+ serial:
+ description: Specify Serial network interface(s)
+ type: list
+ elements: str
+ tengige:
+ description: Specify TenGigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ twentyfivegige:
+ description: Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ twohundredgige:
+ description: Specify TwoHundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ nve:
+ description: Specify Network Virtualization Endpoint Interface(s)
+ type: list
+ elements: int
+ tunnel_ip:
+ description: Specify GRE/IPinIP Tunnel Interface(s)
+ type: list
+ elements: int
+ tunnel_ipsec:
+ description: Specify IPSec Tunnel interface(s)
+ type: list
+ elements: int
+ tunnel_mte:
+ description: Specify MPLS Traffic Engineering P2MP Tunnel interface(s)
+ type: list
+ elements: int
+ tunnel_mpls:
+ description: MPLS Transport Protocol Tunnel interface
+ type: int
+ per_prefix:
+ description: Specify per-prefix computation
+ type: dict
+ suboptions:
+ information_type:
+ description: Specify per_prefix LFA exclusion or FRR LFA candidate information
+ type: str
+ choices: ["exclude", "lfa_candidate"]
+ use_candidate_only:
+ description: Enable/Disable backup selection from candidate-list only
+ type: bool
+ interface:
+ description: Specify Per-link LFA exclusion information
+ type: dict
+ suboptions:
+ bvi:
+ description: Specify Bridge-Group Virtual Interface
+ type: list
+ elements: int
+ bundle_ether:
+ description: Specify Aggregated Ethernet interface(s)
+ type: list
+ elements: int
+ pos_int:
+ description: Specify Aggregated pos interface(s)
+ type: list
+ elements: int
+ fast_ethernet:
+ description: Specify FastEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ fiftygige:
+ description: Specify FiftyGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ fortygige:
+ description: Specify FortyGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ fourhundredgige:
+ description: Specify FourHundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ gigabitethernet:
+ description: Specify GigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ hundredgige:
+ description: Specify HundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ mgmteth:
+ description: Specify MgmtEth/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ multilink:
+ description: Specify Multilink network interface(s)
+ type: list
+ elements: str
+ pw_ether:
+ description: Specify PWHE Ethernet Interface
+ type: list
+ elements: int
+ pw_iw:
+ description: Specify PWHE VC11 IP Interworking Interface
+ type: list
+ elements: int
+ srp:
+ description: Specify SRP interface(s)
+ type: list
+ elements: str
+ serial:
+ description: Specify Serial network interface(s)
+ type: list
+ elements: str
+ tengige:
+ description: Specify TenGigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ twentyfivegige:
+ description: Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ twohundredgige:
+ description: Specify TwoHundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ nve:
+ description: Specify Network Virtualization Endpoint Interface(s)
+ type: list
+ elements: int
+ tunnel_ip:
+ description: Specify GRE/IPinIP Tunnel Interface(s)
+ type: list
+ elements: int
+ tunnel_ipsec:
+ description: Specify IPSec Tunnel interface(s)
+ type: list
+ elements: int
+ tunnel_mte:
+ description: Specify MPLS Traffic Engineering P2MP Tunnel interface(s)
+ type: list
+ elements: int
+ tunnel_mpls:
+ description: MPLS Transport Protocol Tunnel interface
+ type: int
+ flood_reduction:
+ description: Enable/Disable flood reduction
+ type: bool
+ hello_interval:
+ description: Specify Time between HELLO packets
+ type: int
+ instance_id:
+ description: Specify instance ID
+ type: int
+ mtu_ignore:
+ description: Enable/Disable ignoring of MTU in DBD packets
+ type: bool
+ mpls_ldp_sync:
+ description: Enable/Disable MPLS LDP Sync
+ type: bool
+ network:
+ description: Specify Network type
+ type: str
+ choices: ["broadcast", "non-broadcast", "point-to-multipoint", "point-to-point"]
+ nssa:
+ description: NSSA settings for the area
+ type: dict
+ suboptions:
+ set:
+ description: Configure area as NSSA
+ type: bool
+ default_information_originate:
+ description: Originate default Type 7 LSA
+ type: dict
+ suboptions:
+ set:
+ description: Set nssa to default information originate
+ type: bool
+ metric:
+ description: ospfv3 default metric
+ type: int
+ metric_type:
+ description: Metric type for default routes
+ type: int
+ no_redistribution:
+ description: Do not send redistributed LSAs into NSSA area
+ type: bool
+ no_summary:
+ description: Do not send summary LSAs into NSSA area
+ type: bool
+ translate:
+ description: Translate LSA
+ type: dict
+ suboptions:
+ type7:
+ description: Translate from Type 7 to Type 5
+ type: dict
+ suboptions:
+ always:
+ description: Always translate LSAs
+ type: bool
+ required: true
+ packet_size:
+ description: Specify limit size of OSPFv3 packets
+ type: int
+ passive:
+ description: Enable/Disable routing updates on an interface
+ type: bool
+ prefix_suppression:
+ description: Hide all transit addresses on this interface
+ type: bool
+ priority:
+ description: Specify Router priority
+ type: int
+ ranges:
+ description: Summarize routes matching address/mask (border routers only)
+ type: list
+ elements: dict
+ suboptions:
+ address:
+ description: IP in Prefix format (X:X::X/length)
+ type: str
+ required: True
+ cost:
+ description: Specify user specified metric for this range
+ type: int
+ advertise:
+ description: Advertise this range (default)
+ type: bool
+ not_advertise:
+ description: DoNotAdvertise this range
+ type: bool
+ retransmit_interval:
+ description: Specify Delay between LSA retransmissions
+ type: int
+ stub:
+ description: Settings for configuring the area as a stub
+ type: dict
+ suboptions:
+ set:
+ description: Configure the area as a stub
+ type: bool
+ no_summary:
+ description: Do not send summary LSA into stub area
+ type: bool
+ transmit_delay:
+ description: Specify estimated time needed to send link-state update packet
+ type: int
+ virtual_link:
+ description: Define a virtual link
+ type: list
+ elements: dict
+ suboptions:
+ id:
+ description: Router-ID of virtual link neighbor (A.B.C.D)
+ type: str
+ required: True
+ authentication:
+ description: Enable authentication
+ type: dict
+ suboptions:
+ disable:
+ description: Do not authenticate OSPFv3 packets
+ type: bool
+ default: false
+ ipsec:
+ description: Specify IPSec AH authentication attributes
+ type: dict
+ suboptions:
+ spi:
+ description: Specify the Security Parameter Index value
+ type: int
+ algorithim_type:
+ description: Specify the type of algorithim
+ type: str
+ choices: ["md5", "sha1"]
+ key:
+ description: Specify key
+ type: str
+ clear_key:
+ description: Specify key in cleartext form
+ type: str
+ password_key:
+ description: Specify key in encrypted form
+ type: str
+ dead_interval:
+ description: Interval after which a neighbor is declared dead
+ type: int
+ hello_interval:
+ description: Time between HELLO packets
+ type: int
+ retransmit_interval:
+ description: Delay between LSA retransmissions
+ type: int
+ transmit_delay:
+ description: Link state transmit delay
+ type: int
+ encryption:
+ description: Encrypt and authenticate OSPFv3 packets
+ type: dict
+ suboptions:
+ disable:
+ description: Do not encrypt OSPFv3 packets
+ type: bool
+ default: false
+ ipsec:
+ description: Specify IPSec ESP encryption and authentication
+ type: dict
+ suboptions:
+ spi:
+ description: Specify the Security Parameter Index value
+ type: int
+ esp:
+ description: Specify encryption parameters
+ type: dict
+ suboptions:
+ triple_des:
+ description: This specify the triple DES algorithim
+ type: dict
+ suboptions:
+ key:
+ description: Cleartext 3DES key
+ type: str
+ clear_key:
+ description: Specify 3DES key in cleartext form
+ type: str
+ password_key:
+ description: Specify 3DES key in encrypted form
+ type: str
+ aes:
+ description: This specify the aes algorithim
+ type: dict
+ suboptions:
+ algorithim_type:
+ description: Specify the bit encryption for aes algorithim
+ type: str
+ choices: ["192", "256"]
+ key:
+ description: Cleartext AES key
+ type: str
+ clear_key:
+ description: Specify AES key in cleartext form
+ type: str
+ password_key:
+ description: Specify AES key in encrypted form
+ type: str
+ des:
+ description: This specify the des algorithim
+ type: dict
+ suboptions:
+ key:
+ description: Cleartext AES key
+ type: str
+ clear_key:
+ description: Specify AES key in cleartext form
+ type: str
+ password_key:
+ description: Specify AES key in encrypted form
+ type: str
+ null_encryption:
+ description: Specify null encryption attributes
+ type: dict
+ suboptions:
+ authentication:
+ description: Specify authentication parameters
+ type: dict
+ suboptions:
+ algorithim_type:
+ description: Specify the type of algorithim
+ type: str
+ choices: ["md5", "sha1"]
+ key:
+ description: Specify key
+ type: str
+ clear_key:
+ description: Specify key in cleartext form
+ type: str
+ password_key:
+ description: Specify key in encrypted form
+ type: str
+ encryption:
+ description: Encrypt and authenticate OSPFv3 packets
+ type: dict
+ suboptions:
+ disable:
+ description: Do not encrypt OSPFv3 packets
+ type: bool
+ default: false
+ ipsec:
+ description: Specify IPSec ESP encryption and authentication
+ type: dict
+ suboptions:
+ spi:
+ description: Specify the Security Parameter Index value
+ type: int
+ esp:
+ description: Specify encryption parameters
+ type: dict
+ suboptions:
+ triple_des:
+ description: This specify the triple DES algorithim
+ type: dict
+ suboptions:
+ key:
+ description: Cleartext 3DES key
+ type: str
+ clear_key:
+ description: Specify 3DES key in cleartext form
+ type: str
+ password_key:
+ description: Specify 3DES key in encrypted form
+ type: str
+ aes:
+ description: This specify the aes algorithim
+ type: dict
+ suboptions:
+ algorithim_type:
+ description: Specify the bit encryption for aes algorithim
+ type: str
+ choices: ["192", "256"]
+ key:
+ description: Cleartext AES key
+ type: str
+ clear_key:
+ description: Specify AES key in cleartext form
+ type: str
+ password_key:
+ description: Specify AES key in encrypted form
+ type: str
+ des:
+ description: This specify the des algorithim
+ type: dict
+ suboptions:
+ key:
+ description: Cleartext AES key
+ type: str
+ clear_key:
+ description: Specify AES key in cleartext form
+ type: str
+ password_key:
+ description: Specify AES key in encrypted form
+ type: str
+ null_encryption:
+ description: Specify null encryption attributes
+ type: dict
+ suboptions:
+ authentication:
+ description: Specify authentication parameters
+ type: dict
+ suboptions:
+ algorithim_type:
+ description: Specify the type of algorithim
+ type: str
+ choices: ["md5", "sha1"]
+ key:
+ description: Specify key
+ type: str
+ clear_key:
+ description: Specify key in cleartext form
+ type: str
+ password_key:
+ description: Specify key in encrypted form
+ type: str
+ capability:
+ description: Enable specific OSPFv3 feature
+ type: dict
+ suboptions:
+ type7:
+ description: Specify type7 nssa capability
+ type: dict
+ suboptions:
+ prefer:
+ description: Prefer type7 externals over type5
+ type: bool
+ translate:
+ description: Translate type7 to type5
+ type: bool
+ cost:
+ description: Specify Interface cost
+ type: int
+ database_filter:
+ description: Filter LSAs during synchronization and flooding
+ type: dict
+ suboptions:
+ all_outgoing_lsa:
+ description: Filter all outgoing LSA
+ type: bool
+ dead_interval:
+ description: Interval after which a neighbor is declared dead
+ type: int
+ default_information_originate:
+ description: Control distribution of default information
+ type: dict
+ suboptions:
+ always:
+ description: Always advertise default route
+ type: bool
+ metric:
+ description: ospfv3 default metric
+ type: int
+ metric_type:
+ description: ospfv3 metric type for default routes
+ type: int
+ route_policy:
+ description: Apply route-policy to default-information origination
+ type: str
+ tag:
+ description: Set tag for default route
+ type: int
+ set:
+ description: Enable distribution of default route
+ type: bool
+ default_metric:
+ description: Set metric of redistributed routes
+ type: int
+ demand_circuit:
+ description: Enable/Disable ospfv3 demand circuit
+ type: bool
+ distance:
+ description: Define an administrative distance
+ type: dict
+ suboptions:
+ admin_distance:
+ description: Administrative distance
+ type: int
+ ospfv3_distance:
+ description: ospfv3 administrative distance
+ type: dict
+ suboptions:
+ external:
+ description: Distance for external routes
+ type: int
+ inter_area:
+ description: Distance for inter-area routes
+ type: int
+ intra_area:
+ description: Distance for intra-area routes
+ type: int
+ distribute_list:
+ description: Filter prefixes to/from RIB
+ type: dict
+ suboptions:
+ prefix_list:
+ description: Filter prefixes based on an IPv6 prefix-list
+ type: list
+ elements: str
+ suboptions:
+ name:
+ description: Specify Prefix-list name
+ type: str
+ in:
+ description: Filter prefixes installed to RIB
+ type: bool
+ out:
+ description: Filter prefixes redistributed from RIB
+ type: bool
+ encryption:
+ description: Encrypt and authenticate OSPFv3 packets
+ type: dict
+ suboptions:
+ disable:
+ description: Do not encrypt OSPFv3 packets
+ type: bool
+ default: false
+ ipsec:
+ description: Specify IPSec ESP encryption and authentication
+ type: dict
+ suboptions:
+ spi:
+ description: Specify the Security Parameter Index value
+ type: int
+ esp:
+ description: Specify encryption parameters
+ type: dict
+ suboptions:
+ triple_des:
+ description: This specify the triple DES algorithim
+ type: dict
+ suboptions:
+ key:
+ description: Cleartext 3DES key
+ type: str
+ clear_key:
+ description: Specify 3DES key in cleartext form
+ type: str
+ password_key:
+ description: Specify 3DES key in encrypted form
+ type: str
+ aes:
+ description: This specify the aes algorithim
+ type: dict
+ suboptions:
+ algorithim_type:
+ description: Specify the bit encryption for aes algorithim
+ type: str
+ choices: ["192", "256"]
+ key:
+ description: Cleartext AES key
+ type: str
+ clear_key:
+ description: Specify AES key in cleartext form
+ type: str
+ password_key:
+ description: Specify AES key in encrypted form
+ type: str
+ des:
+ description: This specify the des algorithim
+ type: dict
+ suboptions:
+ key:
+ description: Cleartext AES key
+ type: str
+ clear_key:
+ description: Specify AES key in cleartext form
+ type: str
+ password_key:
+ description: Specify AES key in encrypted form
+ type: str
+ null_encryption:
+ description: Specify null encryption attributes
+ type: dict
+ suboptions:
+ authentication:
+ description: Specify authentication parameters
+ type: dict
+ suboptions:
+ algorithim_type:
+ description: Specify the type of algorithim
+ type: str
+ choices: ["md5", "sha1"]
+ key:
+ description: Specify key
+ type: str
+ clear_key:
+ description: Specify key in cleartext form
+ type: str
+ password_key:
+ description: Specify key in encrypted form
+ type: str
+ fast_reroute:
+ description: Specify IP Fast Reroute
+ type: dict
+ suboptions:
+ disabled:
+ description: Disable IP fast reroute
+ type: bool
+ per_link:
+ description: Specify per-prefix computation
+ type: dict
+ suboptions:
+ information_type:
+ description: Specify per-link LFA exclusion or FRR LFA candidate information
+ type: str
+ choices: ["exclude", "lfa_candidate"]
+ use_candidate_only:
+ description: Enable/Disable backup selection from candidate-list only
+ type: bool
+ interface:
+ description: Specify Per-link LFA exclusion information
+ type: dict
+ suboptions:
+ bvi:
+ description: Specify Bridge-Group Virtual Interface
+ type: list
+ elements: int
+ bundle_ether:
+ description: Specify Aggregated Ethernet interface(s)
+ type: list
+ elements: int
+ pos_int:
+ description: Specify Aggregated pos interface(s)
+ type: list
+ elements: int
+ fast_ethernet:
+ description: Specify FastEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ fiftygige:
+ description: Specify FiftyGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ fortygige:
+ description: Specify FortyGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ fourhundredgige:
+ description: Specify FourHundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ gigabitethernet:
+ description: Specify GigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ hundredgige:
+ description: Specify HundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ mgmteth:
+ description: Specify MgmtEth/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ multilink:
+ description: Specify Multilink network interface(s)
+ type: list
+ elements: str
+ pw_ether:
+ description: Specify PWHE Ethernet Interface
+ type: list
+ elements: int
+ pw_iw:
+ description: Specify PWHE VC11 IP Interworking Interface
+ type: list
+ elements: int
+ srp:
+ description: Specify SRP interface(s)
+ type: list
+ elements: str
+ serial:
+ description: Specify Serial network interface(s)
+ type: list
+ elements: str
+ tengige:
+ description: Specify TenGigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ twentyfivegige:
+ description: Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ twohundredgige:
+ description: Specify TwoHundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ nve:
+ description: Specify Network Virtualization Endpoint Interface(s)
+ type: list
+ elements: int
+ tunnel_ip:
+ description: Specify GRE/IPinIP Tunnel Interface(s)
+ type: list
+ elements: int
+ tunnel_ipsec:
+ description: Specify IPSec Tunnel interface(s)
+ type: list
+ elements: int
+ tunnel_mte:
+ description: Specify MPLS Traffic Engineering P2MP Tunnel interface(s)
+ type: list
+ elements: int
+ tunnel_mpls:
+ description: MPLS Transport Protocol Tunnel interface
+ type: int
+ per_prefix:
+ description: Specify per-prefix computation
+ type: dict
+ suboptions:
+ information_type:
+ description: Specify per_prefix LFA exclusion or FRR LFA candidate information
+ type: str
+ choices: ["exclude", "lfa_candidate"]
+ use_candidate_only:
+ description: Enable/Disable backup selection from candidate-list only
+ type: bool
+ interface:
+ description: Specify Per-link LFA exclusion information
+ type: dict
+ suboptions:
+ bvi:
+ description: Specify Bridge-Group Virtual Interface
+ type: list
+ elements: int
+ bundle_ether:
+ description: Specify Aggregated Ethernet interface(s)
+ type: list
+ elements: int
+ post_int:
+ description: Specify Aggregated pos interface(s)
+ type: list
+ elements: int
+ fast_ethernet:
+ description: Specify FastEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ fiftygige:
+ description: Specify FiftyGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ fortygige:
+ description: Specify FortyGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ fourhundredgige:
+ description: Specify FourHundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ gigabitethernet:
+ description: Specify GigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ hundredgige:
+ description: Specify HundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ mgmteth:
+ description: Specify MgmtEth/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ multilink:
+ description: Specify Multilink network interface(s)
+ type: list
+ elements: str
+ pw_ether:
+ description: Specify PWHE Ethernet Interface
+ type: list
+ elements: int
+ pw_iw:
+ description: Specify PWHE VC11 IP Interworking Interface
+ type: list
+ elements: int
+ srp:
+ description: Specify SRP interface(s)
+ type: list
+ elements: str
+ serial:
+ description: Specify Serial network interface(s)
+ type: list
+ elements: str
+ tengige:
+ description: Specify TenGigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ twentyfivegige:
+ description: Specify TwentyFiveGigabitEthernet/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ twohundredgige:
+ description: Specify TwoHundredGigE/IEEE 802.3 interface(s)
+ type: list
+ elements: str
+ nve:
+ description: Specify Network Virtualization Endpoint Interface(s)
+ type: list
+ elements: int
+ tunnel_ip:
+ description: Specify GRE/IPinIP Tunnel Interface(s)
+ type: list
+ elements: int
+ tunnel_ipsec:
+ description: Specify IPSec Tunnel interface(s)
+ type: list
+ elements: int
+ tunnel_mte:
+ description: Specify MPLS Traffic Engineering P2MP Tunnel interface(s)
+ type: list
+ elements: int
+ tunnel_mpls:
+ description: MPLS Transport Protocol Tunnel interface
+ type: int
+ flood_reduction:
+ description: Enable/Disable flood reduction
+ type: bool
+ graceful_restart:
+ description: Enable Graceful-Restart
+ type: dict
+ suboptions:
+ set:
+ description: Set graceful restart
+ type: bool
+ helper_disable:
+ description: Disable router's helper support level
+ type: bool
+ min_interval:
+ description: Minimum interval between Graceful Restarts
+ type: int
+ max_interval:
+ description: Maximum route lifetime following restart
+ type: int
+ hello_interval:
+ description: Specify Time between HELLO packets
+ type: int
+ ignore_mospf_type6_lsa:
+ description: Ignore MOSPF Type 6 LSA
+ type: bool
+ instance_id:
+ description: Specify instance ID
+ type: int
+ log_adjacency_changes:
+ description: Log adjacency state changes
+ type: dict
+ suboptions:
+ set:
+ description: Set log adjacency
+ type: bool
+ disable:
+ description: Disable log adjacency changes
+ type: bool
+ detail:
+ description: Log all state changes
+ type: bool
+ maximum:
+ description: Set OSPFv3 limits
+ type: dict
+ suboptions:
+ interfaces:
+ description: Specify limit for number of interfaces
+ type: int
+ paths:
+ description: Specify limit for number of paths
+ type: int
+ redistributed_prefixes:
+ description: Specify limit for number of redistributed prefixes
+ type: int
+ mpls_ldp_sync:
+ description: Enable/Disable MPLS LDP Sync
+ type: bool
+ mtu_ignore:
+ description: Enable/Disable ignoring of MTU in DBD packets
+ type: bool
+ network:
+ description: Specify Network type
+ type: str
+ choices: ["broadcast", "non-broadcast", "point-to-multipoint", "point-to-point"]
+ nsr:
+ description: Enable/Disable NSR for all VRFs in this process
+ type: bool
+ packet_size:
+ description: Specify limit size of OSPFv3 packets
+ type: int
+ passive:
+ description: Enable/Disable routing updates on an interface
+ type: bool
+ prefix_suppression:
+ description: Hide all transit addresses on this interface
+ type: bool
+ priority:
+ description: Specify Router priority
+ type: int
+ protocol_shutdown:
+ description: Gracefully shutdown the OSPFv3 protocol
+ type: bool
+ redistribute:
+ description: Redistribute information from another routing Protocol
+ type: dict
+ suboptions:
+ application:
+ description: Specify application routes
+ type: list
+ elements: dict
+ suboptions:
+ id:
+ description: OnePK Application name
+ type: str
+ required: true
+ set:
+ description: Set application route
+ type: bool
+ metric:
+ description: Specify metric for redistributed routes
+ type: int
+ metric_type:
+ description: Specify OSPFv3 exterior metric type for redistributed routes
+ type: int
+ route_policy:
+ description: Apply route policy to redistribution
+ type: str
+ tag:
+ description: Set tag for routes redistributed into OSPFv3
+ type: int
+ bgp:
+ description: Specify bgp routes
+ type: list
+ elements: dict
+ suboptions:
+ id:
+ description: BGP process name
+ type: int
+ required: true
+ set:
+ description: Set bgp route number
+ type: bool
+ metric:
+ description: Specify metric for redistributed routes
+ type: int
+ metric_type:
+ description: Specify OSPFv3 exterior metric type for redistributed routes
+ type: int
+ preserved_med:
+ description: Specify preserve med of BGP routes
+ type: str
+ route_policy:
+ description: Apply route policy to redistribution
+ type: str
+ tag:
+ description: Set tag for routes redistributed into OSPFv3
+ type: int
+ connected:
+ description: Specify connected routes
+ type: dict
+ suboptions:
+ set:
+ description: Set connected route
+ type: bool
+ metric:
+ description: Specify metric for redistributed routes
+ type: int
+ metric_type:
+ description: Specify OSPFv3 exterior metric type for redistributed routes
+ type: int
+ route_policy:
+ description: Apply route policy to redistribution
+ type: str
+ tag:
+ description: Set tag for routes redistributed into OSPFv3
+ type: int
+ eigrp:
+ description: Specify eigrp routes
+ type: list
+ elements: dict
+ suboptions:
+ id:
+ description: EIGRP process name
+ type: int
+ required: true
+ set:
+ description: Set bgp route number
+ type: bool
+ match:
+ description: Redistribution of EIGRP routes
+ type: str
+ choices: ["external", "internal"]
+ metric:
+ description: Specify metric for redistributed routes
+ type: int
+ metric_type:
+ description: Specify OSPFv3 exterior metric type for redistributed routes
+ type: int
+ route_policy:
+ description: Apply route policy to redistribution
+ type: str
+ tag:
+ description: Set tag for routes redistributed into OSPFv3
+ type: int
+ isis:
+ description: Specify IS-IS routes
+ type: list
+ elements: dict
+ suboptions:
+ id:
+ description: IS-IS name
+ type: str
+ required: true
+ set:
+ description: Set IS-IS route number
+ type: bool
+ level:
+ description: Specify IS-IS level routes
+ type: str
+ choices: ["level-1", "level-1-2", "level-2"]
+ metric:
+ description: Specify metric for redistributed routes
+ type: int
+ metric_type:
+ description: Specify OSPFv3 exterior metric type for redistributed routes
+ type: int
+ route_policy:
+ description: Apply route policy to redistribution
+ type: str
+ tag:
+ description: Set tag for routes redistributed into OSPFv3
+ type: int
+ mobile:
+ description: Specify mobile routes
+ type: dict
+ suboptions:
+ set:
+ description: Set mobile route number
+ type: bool
+ metric:
+ description: Specify metric for redistributed routes
+ type: int
+ metric_type:
+ description: Specify OSPFv3 exterior metric type for redistributed routes
+ type: int
+ route_policy:
+ description: Apply route policy to redistribution
+ type: str
+ tag:
+ description: Set tag for routes redistributed into OSPFv3
+ type: int
+ ospfv3:
+ description: Specify ospfv3 routes
+ type: list
+ elements: dict
+ suboptions:
+ id:
+ description: OSPFv3 process name
+ type: str
+ required: true
+ set:
+ description: Set ospfv3 route number
+ type: bool
+ match:
+ description: Redistribution of OSPFv3 routes
+ type: dict
+ suboptions:
+ external:
+ description: Redistribute OSPFv3 external routes
+ type: int
+ choices: ["1", "2"]
+ nssa_external:
+ description: Redistribute NSSA OSPFv3 external routes
+ type: int
+ choices: ["1", "2"]
+ internal:
+ description: Redistribute OSPFv3 internal routes
+ type: bool
+ metric:
+ description: Specify metric for redistributed routes
+ type: int
+ metric_type:
+ description: Specify OSPFv3 exterior metric type for redistributed routes
+ type: int
+ route_policy:
+ description: Apply route policy to redistribution
+ type: str
+ tag:
+ description: Set tag for routes redistributed into OSPFv3
+ type: int
+ static:
+ description: Specify static routes
+ type: dict
+ suboptions:
+ set:
+ description: Set static route
+ type: bool
+ metric:
+ description: Specify metric for redistributed routes
+ type: int
+ metric_type:
+ description: Specify OSPFv3 exterior metric type for redistributed routes
+ type: int
+ route_policy:
+ description: Apply route policy to redistribution
+ type: str
+ tag:
+ description: Set tag for routes redistributed into OSPFv3
+ type: int
+ subscriber:
+ description: Specify subscriber routes
+ type: dict
+ suboptions:
+ set:
+ description: Set static route
+ type: bool
+ metric:
+ description: Specify metric for redistributed routes
+ type: int
+ metric_type:
+ description: Specify OSPFv3 exterior metric type for redistributed routes
+ type: int
+ route_policy:
+ description: Apply route policy to redistribution
+ type: str
+ tag:
+ description: Set tag for routes redistributed into OSPFv3
+ type: int
+ retransmit_interval:
+ description: Delay between LSA retransmissions
+ type: int
+ router_id:
+ description: ospfv3 router-id in IPv4 address format (A.B.C.D)
+ type: str
+ spf_prefix_priority:
+ description: Specify SPF configuration
+ type: dict
+ suboptions:
+ disable:
+ description: Disable SPF prefix priority
+ type: bool
+ route_policy:
+ description: Specify the route-policy to prioritize route install
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Specify name of the policy
+ type: str
+ value:
+ description: Specify parameter values for the policy ()
+ type: str
+ stub_router:
+ description: Enter stub router configuration submode
+ type: dict
+ suboptions:
+ router_lsa:
+ description: Modify self originated router LSAs
+ type: dict
+ suboptions:
+ advertise_with:
+ description: Advertise LSAs with specified type
+ type: str
+ choices: ["max-metric", "r-bit", "v6-bit"]
+ always:
+ description: Force ospfv3 stub router mode unconditionally
+ type: bool
+ external_lsa:
+ description: Override External LSA metric in stub router mode
+ type: dict
+ suboptions:
+ set:
+ description: Set external lsa
+ type: bool
+ metric:
+ description: Metric to use while in stub router mode
+ type: int
+ include_stub:
+ description: Set maximum metric for stub links in stub router mode
+ type: bool
+ on_proc_migration:
+ description: Enter stub router mode on ospfv3 process migration
+ type: int
+ on_proc_restart:
+ description: Enter stub router mode on ospfv3 process restart
+ type: int
+ on_startup:
+ description: Enter stub router mode on startup
+ type: dict
+ suboptions:
+ time:
+ description: Time in seconds to stay in stub router mode
+ type: int
+ wait_for_bgp:
+ description: Exit stub router mode when BGP converges
+ type: bool
+ on_switchover:
+ description: Enter stub router mode on RP switchover
+ type: int
+ summary_lsa:
+ description: Override Summary LSA metric in stub router mode
+ type: dict
+ suboptions:
+ set:
+ description: Enable summary LSA
+ type: bool
+ metric:
+ description: Metric to use while in stub router mode
+ type: int
+ summary_prefix:
+ description: Configure IP address summaries
+ type: list
+ elements: dict
+ suboptions:
+ prefix:
+ description: IP summary address/mask (A.B.C.D/prefix)
+ type: str
+ required: True
+ not_advertise:
+ description: Suppress routes that match the specified prefix/mask pair
+ type: bool
+ tag:
+ description: Set tag
+ type: int
+ timers:
+ description: Adjust routing timers
+ type: dict
+ suboptions:
+ lsa_arrival:
+ description: Specify LSA arrival timers
+ type: int
+ pacing:
+ description: Specify pacing timers
+ type: dict
+ suboptions:
+ flood:
+ description: Flood pacing timer
+ type: int
+ lsa_group:
+ description: LSA group pacing timer
+ type: int
+ retransmission:
+ description: LSA group pacing timer
+ type: int
+ throttle:
+ description: Adjust throttle timers
+ type: dict
+ suboptions:
+ lsa:
+ description: Specify LSA throttle timers
+ type: dict
+ suboptions:
+ all_lsa_initial:
+ description: Delay to generate first occurrence of LSA in milliseconds
+ type: int
+ all_lsa_minimum:
+ description: Minimum delay between originating the same LSA in milliseconds
+ type: int
+ spf:
+ description: Specify SPF throttle timers
+ type: dict
+ suboptions:
+ spf_initial:
+ description: Delay to generate first occurrence of SPF in ms
+ type: int
+ spf_minimum:
+ description: Minimum delay between originating the same SPF in ms
+ type: int
+ trace:
+ description: Specify OSPF tracing options
+ type: dict
+ suboptions:
+ size:
+ description: Delete existing buffer and create one with N entries
+ type: str
+ value:
+ description: Specify trace entry
+ type: int
+ transmit_delay:
+ description: Estimated time needed to send link-state update packet
+ type: int
+ state:
+ description:
+ - The state the configuration should be left in
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospfv3
+# Thu Jun 11 15:54:44.569 UTC
+# % No such configuration item(s)
+#
+
+- name: Merge provided OSPFv3 configuration with the existing configuration
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ - process_id: 10
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ packet_size: 577
+ priority: 1
+ router_id: '2.2.2.2'
+ demand_circuit: true
+ mtu_ignore: true
+ state: merged
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": {}
+#
+# "commands": [
+# "router ospfv3 10",
+# "area 11 default-cost 5",
+# "area 11 cost 11",
+# "area 22 default-cost 6",
+# "router ospfv3 26",
+# "authentication disable",
+# "router ospfv3 27",
+# "area 10 hello-interval 2",
+# "router ospfv3 30",
+# "cost 2",
+# "priority 1",
+# "default-metric 10",
+# "router-id 2.2.2.2",
+# "demand-circuit",
+# "packet-size 577",
+# "transmit-delay 2",
+# "dead-interval 2",
+# "hello-interval 1",
+# "retransmit-interval 2",
+# "mtu-ignore",
+# "area 11 default-cost 5",
+# "area 22 default-cost 6"
+# ]
+#
+# "after": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "process_id": "10"
+# },
+# {
+# "authentication": {
+# "disable": true
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "hello_interval": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": true,
+# "hello_interval": 1,
+# "mtu_ignore": true,
+# "packet_size": 577,
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "transmit_delay": 2
+# }
+# ]
+# }
+#
+#
+# ------------
+# After state
+# ------------
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospfv3
+# router ospfv3 10
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospfv3 26
+# authentication disable
+# !
+# router ospfv3 27
+# area 10
+# hello-interval 2
+# !
+# area 20
+# !
+# area 30
+# !
+# !
+# router ospfv3 30
+# cost 2
+# priority 1
+# mtu-ignore
+# packet-size 577
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit
+# hello-interval 1
+# transmit-delay 2
+# router-id 2.2.2.2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# router ospfv3 10
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospfv3 26
+# authentication disable
+# !
+# router ospfv3 27
+# area 10
+# hello-interval 2
+# !
+# area 20
+# !
+# area 30
+# !
+# !
+# router ospfv3 30
+# cost 2
+# priority 1
+# mtu-ignore
+# packet-size 577
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit
+# hello-interval 1
+# transmit-delay 2
+# router-id 2.2.2.2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+
+
+
+# Using replaced
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospf
+# router ospfv3 10
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospfv3 26
+# authentication disable
+# !
+# router ospfv3 27
+# area 10
+# hello-interval 2
+# !
+# area 20
+# !
+# area 30
+# !
+# !
+# router ospfv3 30
+# cost 2
+# priority 1
+# mtu-ignore
+# packet-size 577
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit
+# hello-interval 1
+# transmit-delay 2
+# router-id 2.2.2.2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# router ospfv3 10
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospfv3 26
+# authentication disable
+# !
+# router ospfv3 27
+# area 10
+# hello-interval 2
+# !
+# area 20
+# !
+# area 30
+# !
+# !
+# router ospfv3 30
+# cost 2
+# priority 1
+# mtu-ignore
+# packet-size 577
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit
+# hello-interval 1
+# transmit-delay 2
+# router-id 2.2.2.2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+
+- name: Replace OSPFv3 routes configurations from the device
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ state: replaced
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "process_id": "10"
+# },
+# {
+# "authentication": {
+# "disable": true
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "hello_interval": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": true,
+# "hello_interval": 1,
+# "mtu_ignore": true,
+# "packet_size": 577,
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "transmit_delay": 2
+# }
+# ]
+# }
+#
+# "commands": [
+# "router ospfv3 27",
+# "area 20 default-cost 2",
+# "area 20 cost 2"
+# ]
+#
+# "after": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "process_id": "10"
+# },
+# {
+# "authentication": {
+# "disable": true
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "hello_interval": 2
+# },
+# {
+# "area_id": "20",
+# "cost": 2,
+# "default_cost": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": true,
+# "hello_interval": 1,
+# "mtu_ignore": true,
+# "packet_size": 577,
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "transmit_delay": 2
+# }
+# ]
+# }
+#
+#
+# -----------
+# After state
+# -----------
+#
+# RP/0/RP0/CPU0:anton(config)#do show running-config router ospfv3
+# router ospfv3 10
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospfv3 26
+# authentication disable
+# !
+# router ospfv3 27
+# area 10
+# hello-interval 2
+# !
+# area 20
+# cost 2
+# default-cost 2
+# !
+# area 30
+# !
+# !
+# router ospfv3 30
+# cost 2
+# priority 1
+# mtu-ignore
+# packet-size 577
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit
+# hello-interval 1
+# transmit-delay 2
+# router-id 2.2.2.2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+
+
+- name: Override existing OSPFv3 configurations from the device
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ authentication:
+ disable: true
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ authentication:
+ disable: true
+ - process_id: 26
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ authentication:
+ disable: true
+ state: overridden
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "process_id": "10"
+# },
+# {
+# "authentication": {
+# "disable": true
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "hello_interval": 2
+# },
+# {
+# "area_id": "20",
+# "cost": 2,
+# "default_cost": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": true,
+# "hello_interval": 1,
+# "mtu_ignore": true,
+# "packet_size": 577,
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "transmit_delay": 2
+# }
+# ]
+# }
+#
+# "commands": [
+# "router ospfv3 10",
+# "no area 11 default-cost 5",
+# "no area 11 cost 11",
+# "no area 22 default-cost 6",
+# "router ospfv3 30",
+# "no cost 2",
+# "no priority 1",
+# "no default-metric 10",
+# "no router-id 2.2.2.2",
+# "no demand-circuit",
+# "no packet-size 577",
+# "no transmit-delay 2",
+# "no dead-interval 2",
+# "no hello-interval 1",
+# "no retransmit-interval 2",
+# "no mtu-ignore",
+# "no area 11 default-cost 5",
+# "no area 22 default-cost 6",
+# "router ospfv3 26",
+# "area 10 hello-interval 4"
+# ]
+#
+# "after": {
+# "processes": [
+# {
+# "process_id": "10"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "hello_interval": 4
+# }
+# ],
+# "authentication": {
+# "disable": true
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "hello_interval": 2
+# },
+# {
+# "area_id": "20",
+# "cost": 2,
+# "default_cost": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "process_id": "30"
+# }
+# ]
+# }
+#
+#
+# -----------
+# After state
+# -----------
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospfv3
+# router ospfv3 10
+# area 11
+# !
+# area 22
+# !
+# !
+# router ospfv3 26
+# authentication disable
+# area 10
+# hello-interval 4
+# !
+# !
+# router ospfv3 27
+# area 10
+# hello-interval 2
+# !
+# area 20
+# cost 2
+# default-cost 2
+# !
+# area 30
+# !
+# !
+# router ospfv3 30
+# area 11
+# !
+# area 22
+# !
+# !
+
+
+
+# Using deleted
+#
+# ------------
+# Before state
+# ------------
+#
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospfv3
+# router ospfv3 10
+# area 11
+# !
+# area 22
+# !
+# !
+# router ospfv3 26
+# authentication disable
+# area 10
+# hello-interval 4
+# !
+# !
+# router ospfv3 27
+# area 10
+# hello-interval 2
+# !
+# area 20
+# cost 2
+# default-cost 2
+# !
+# area 30
+# !
+# !
+# router ospfv3 30
+# area 11
+# !
+# area 22
+# !
+# !
+
+- name: Deleted existing OSPFv3 configurations from the device
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: '10'
+ - process_id: '26'
+ - process_id: '27'
+ - process_id: '30'
+ state: deleted
+
+#
+#
+# ------------------------
+# Module Execution Result
+# ------------------------
+#
+# "before": {
+# "processes": [
+# {
+# "process_id": "10"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "hello_interval": 4
+# }
+# ],
+# "authentication": {
+# "disable": true
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "hello_interval": 2
+# },
+# {
+# "area_id": "20",
+# "cost": 2,
+# "default_cost": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "process_id": "30"
+# }
+# ]
+# },
+#
+# "commands": [
+# "router ospfv3 26",
+# "no authentication disable",
+# "no area 10 hello-interval 4",
+# "router ospfv3 27",
+# "no area 10 hello-interval 2",
+# "no area 20 default-cost 2",
+# "no area 20 cost 2"
+# ]
+#
+# "after": {
+# "processes": [
+# {
+# "process_id": "10"
+# },
+# {
+# "process_id": "26"
+# },
+# {
+# "process_id": "27"
+# },
+# {
+# "process_id": "30"
+# }
+# ]
+# }
+#
+#
+# -----------
+# After state
+# -----------
+#
+# RP/0/RP0/CPU0:anton(config)#show running-config router ospfv3
+# router ospfv3 10
+# !
+# router ospfv3 26
+# !
+# router ospfv3 27
+# !
+# router ospfv3 30
+# !
+
+
+# Using parsed
+# parsed.cfg
+# ------------
+# router ospfv3 10
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospfv3 26
+# authentication disable
+# !
+# router ospfv3 27
+# area 10
+# hello-interval 2
+# !
+# !
+# router ospfv3 30
+# router-id 2.2.2.2
+# cost 2
+# packet-size 577
+# priority 1
+# mtu-ignore
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit
+# hello-interval 1
+# transmit-delay 2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+- name: Parsed the device configuration to get output commands
+ cisco.iosxr.iosxr_ospfv3:
+ running_config: "{{ lookup('file', './parsed.cfg') }}"
+ state: parsed
+#
+#
+# -------------------------
+# Module Execution Result
+# -------------------------
+#
+#
+# "parsed": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "process_id": "10"
+# },
+# {
+# "authentication": {
+# "disable": true
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "hello_interval": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": true,
+# "hello_interval": 1,
+# "mtu_ignore": true,
+# "packet_size": 577,
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "transmit_delay": 2
+# }
+# ]
+# }
+#
+# Using rendered
+#
+#
+- name: Render the commands for provided configuration
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ - process_id: 10
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ packet_size: 577
+ priority: 1
+ router_id: '2.2.2.2'
+ demand_circuit: true
+ mtu_ignore: true
+ state: rendered
+
+#
+#
+# -------------------------
+# Module Execution Result
+# -------------------------
+#
+#
+# "rendered": [
+# "router ospfv3 27",
+# "area 10 hello-interval 2",
+# "router ospfv3 26",
+# "authentication disable",
+# "router ospfv3 10",
+# "area 11 default-cost 5",
+# "area 11 cost 11",
+# "area 22 default-cost 6",
+# "router ospfv3 30",
+# "cost 2",
+# "priority 1",
+# "default-metric 10",
+# "router-id 2.2.2.2",
+# "demand-circuit",
+# "packet-size 577",
+# "transmit-delay 2",
+# "dead-interval 2",
+# "hello-interval 1",
+# "retransmit-interval 2",
+# "mtu-ignore",
+# "area 11 default-cost 5",
+# "area 22 default-cost 6"
+# ]
+
+
+# Using gathered
+#
+# Before state:
+# -------------
+#
+# RP/0/RP0/CPU0:anton#show running-config router ospf
+# router ospfv3 10
+# area 11
+# cost 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+# router ospfv3 26
+# authentication disable
+# area 10
+# !
+# !
+# router ospfv3 27
+# area 10
+# hello-interval 2
+# !
+# area 20
+# !
+# area 30
+# !
+# !
+# router ospfv3 30
+# cost 2
+# priority 1
+# mtu-ignore
+# packet-size 577
+# dead-interval 2
+# retransmit-interval 2
+# demand-circuit
+# hello-interval 1
+# transmit-delay 2
+# router-id 2.2.2.2
+# default-metric 10
+# area 11
+# default-cost 5
+# !
+# area 22
+# default-cost 6
+# !
+# !
+
+- name: Gather ospfv3 routes configuration
+ cisco.iosxr.iosxr_ospfv3:
+ state: gathered
+#
+#
+# -------------------------
+# Module Execution Result
+# -------------------------
+#
+# "gathered": {
+# "processes": [
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "cost": 11,
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "process_id": "10"
+# },
+# {
+# "authentication": {
+# "disable": true
+# },
+# "process_id": "26"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "10",
+# "hello_interval": 2
+# }
+# ],
+# "process_id": "27"
+# },
+# {
+# "areas": [
+# {
+# "area_id": "11",
+# "default_cost": 5
+# },
+# {
+# "area_id": "22",
+# "default_cost": 6
+# }
+# ],
+# "cost": 2,
+# "dead_interval": 2,
+# "default_metric": 10,
+# "demand_circuit": true,
+# "hello_interval": 1,
+# "mtu_ignore": true,
+# "packet_size": 577,
+# "priority": 1,
+# "process_id": "30",
+# "retransmit_interval": 2,
+# "router_id": "2.2.2.2",
+# "transmit_delay": 2
+# }
+# ]
+# }
+#
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.ospfv3.ospfv3 import (
+ Ospfv3Args,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.ospfv3.ospfv3 import (
+ Ospfv3,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ module = AnsibleModule(
+ argument_spec=Ospfv3Args.argument_spec,
+ mutually_exclusive=[["config", "running_config"]],
+ required_if=[
+ ["state", "merged", ["config"]],
+ ["state", "replaced", ["config"]],
+ ["state", "overridden", ["config"]],
+ ["state", "rendered", ["config"]],
+ ["state", "parsed", ["running_config"]],
+ ],
+ supports_check_mode=True,
+ )
+
+ result = Ospfv3(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_static_routes.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_static_routes.py
new file mode 100644
index 00000000..238582d2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_static_routes.py
@@ -0,0 +1,854 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for iosxr_static_routes
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_static_routes
+short_description: Static routes resource module
+description:
+- This module manages static routes on devices running Cisco IOS-XR.
+version_added: 1.0.0
+author: Nilashish Chakraborty (@NilashishC)
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the IOS-XR device
+ by executing the command B(show running-config router static).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A dictionary of static route options.
+ type: list
+ elements: dict
+ suboptions:
+ vrf:
+ description:
+ - The VRF to which the static route(s) belong.
+ type: str
+ address_families:
+ description: A dictionary specifying the address family to which the static
+ route(s) belong.
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description:
+ - Specifies the top level address family indicator.
+ type: str
+ choices:
+ - ipv4
+ - ipv6
+ required: true
+ safi:
+ description:
+ - Specifies the subsequent address family indicator.
+ type: str
+ choices:
+ - unicast
+ - multicast
+ required: true
+ routes:
+ description: A dictionary that specifies the static route configurations.
+ elements: dict
+ type: list
+ suboptions:
+ dest:
+ description:
+ - An IPv4 or IPv6 address in CIDR notation that specifies the destination
+ network for the static route.
+ type: str
+ required: true
+ next_hops:
+ description:
+ - Next hops to the specified destination.
+ type: list
+ elements: dict
+ suboptions:
+ forward_router_address:
+ description:
+ - The IP address of the next hop that can be used to reach the
+ destination network.
+ type: str
+ interface:
+ description:
+ - The interface to use to reach the destination.
+ type: str
+ dest_vrf:
+ description:
+ - The destination VRF.
+ type: str
+ admin_distance:
+ description:
+ - The administrative distance for this static route.
+ - Refer to vendor documentation for valid values.
+ type: int
+ metric:
+ description:
+ - Specifes the metric for this static route.
+ - Refer to vendor documentation for valid values.
+ type: int
+ description:
+ description:
+ - Specifies the description for this static route.
+ type: str
+ vrflabel:
+ description:
+ - Specifies the VRF label for this static route.
+ - Refer to vendor documentation for valid values.
+ type: int
+ tag:
+ description:
+ - Specifies a numeric tag for this static route.
+ - Refer to vendor documentation for valid values.
+ type: int
+ track:
+ description:
+ - Specifies the object to be tracked.
+ - This enables object tracking for static routes.
+ type: str
+ tunnel_id:
+ description:
+ - Specifies a tunnel id for the route.
+ - Refer to vendor documentation for valid values.
+ type: int
+ state:
+ description:
+ - The state the configuration should be left in.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+
+# Using merged
+
+# Before state
+# -------------
+# RP/0/RP0/CPU0:ios#show running-config router static
+# Sat Feb 22 07:46:30.089 UTC
+# % No such configuration item(s)
+#
+- name: Merge the provided configuration with the exisiting running configuration
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - forward_router_address: 192.0.2.10
+ interface: FastEthernet0/0/0/1
+ description: LAB
+ metric: 120
+ tag: 10
+
+ - interface: FastEthernet0/0/0/5
+ track: ip_sla_1
+
+ - dest: 192.0.2.32/28
+ next_hops:
+ - forward_router_address: 192.0.2.11
+ admin_distance: 100
+
+ - afi: ipv6
+ safi: unicast
+ routes:
+ - dest: 2001:db8:1000::/36
+ next_hops:
+ - interface: FastEthernet0/0/0/7
+ description: DC
+
+ - interface: FastEthernet0/0/0/8
+ forward_router_address: 2001:db8:2000:2::1
+
+ - vrf: DEV_SITE
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.12
+ description: DEV
+ dest_vrf: test_1
+
+ - dest: 192.0.2.80/28
+ next_hops:
+ - interface: FastEthernet0/0/0/2
+ forward_router_address: 192.0.2.14
+ dest_vrf: test_1
+ track: ip_sla_2
+ vrflabel: 124
+ state: merged
+
+# After state
+# -------------
+# RP/0/RP0/CPU0:ios#show running-config router static
+# Sat Feb 22 07:49:11.754 UTC
+# router static
+# address-family ipv4 unicast
+# 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+# 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+# 192.0.2.32/28 192.0.2.11 100
+# !
+# address-family ipv6 unicast
+# 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+# 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+# !
+# vrf DEV_SITE
+# address-family ipv4 unicast
+# 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+# 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+# !
+# !
+# !
+
+# Using merged to update existing static routes
+
+# Before state
+# -------------
+# RP/0/RP0/CPU0:ios#show running-config router static
+# Sat Feb 22 07:49:11.754 UTC
+# router static
+# address-family ipv4 unicast
+# 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+# 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+# 192.0.2.32/28 192.0.2.11 100
+# !
+# address-family ipv6 unicast
+# 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+# 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+# !
+# vrf DEV_SITE
+# address-family ipv4 unicast
+# 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+# 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+# !
+# !
+# !
+
+- name: Update existing static routes configuration using merged
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ - vrf: DEV_SITE
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.12
+ vrflabel: 2301
+ dest_vrf: test_1
+
+ - dest: 192.0.2.80/28
+ next_hops:
+ - interface: FastEthernet0/0/0/2
+ forward_router_address: 192.0.2.14
+ dest_vrf: test_1
+ description: rt_test_1
+ state: merged
+
+# After state
+# -------------
+# RP/0/RP0/CPU0:ios#show running-config router static
+# Sat Feb 22 07:49:11.754 UTC
+# router static
+# address-family ipv4 unicast
+# 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+# 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+# 192.0.2.32/28 192.0.2.11 100
+# !
+# address-family ipv6 unicast
+# 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+# 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+# !
+# vrf DEV_SITE
+# address-family ipv4 unicast
+# 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV vrflabel 2301
+# 192.0.2.80/28 vrf test_1 192.0.2.14 FastEthernet0/0/0/2 description rt_test_1 track ip_sla_2 vrflabel 124
+# !
+# !
+# !
+
+# Using replaced to replace all next hop entries for a single destination network
+
+# Before state
+# --------------
+
+# RP/0/RP0/CPU0:ios#sh running-config router static
+# Sat Feb 22 07:59:08.669 UTC
+# router static
+# address-family ipv4 unicast
+# 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+# 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+# 192.0.2.32/28 192.0.2.11 100
+# !
+# address-family ipv6 unicast
+# 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+# 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+# !
+# vrf DEV_SITE
+# address-family ipv4 unicast
+# 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+# 192.0.2.48/28 GigabitEthernet0/0/0/1 192.0.3.24 vrflabel 2302
+# 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+# !
+# !
+# !
+
+- name: Replace device configurations of static routes with provided configurations
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ - vrf: DEV_SITE
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.15
+ interface: FastEthernet0/0/0/3
+ description: DEV_NEW
+ dest_vrf: dev_test_2
+ state: replaced
+
+# After state
+# ------------
+# RP/0/RP0/CPU0:ios#sh running-config router static
+# Sat Feb 22 08:04:07.085 UTC
+# router static
+# address-family ipv4 unicast
+# 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+# 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+# 192.0.2.32/28 192.0.2.11 100
+# !
+# address-family ipv6 unicast
+# 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+# 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+# !
+# vrf DEV_SITE
+# address-family ipv4 unicast
+# 192.0.2.48/28 vrf dev_test_2 FastEthernet0/0/0/3 192.0.2.15 description DEV_NEW
+# 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+# !
+# !
+# !
+
+# Using overridden to override all static route entries on the device
+
+# Before state
+# -------------
+# RP/0/RP0/CPU0:ios#sh running-config router static
+# Sat Feb 22 07:59:08.669 UTC
+# router static
+# address-family ipv4 unicast
+# 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+# 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+# 192.0.2.32/28 192.0.2.11 100
+# !
+# address-family ipv6 unicast
+# 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+# 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+# !
+# vrf DEV_SITE
+# address-family ipv4 unicast
+# 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+# 192.0.2.48/28 GigabitEthernet0/0/0/1 192.0.3.24 vrflabel 2302
+# 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+# !
+# !
+# !
+
+- name: Overridde all static routes configuration with provided configuration
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ - vrf: DEV_NEW
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.15
+ interface: FastEthernet0/0/0/3
+ description: DEV1
+ - afi: ipv6
+ safi: unicast
+ routes:
+ - dest: 2001:db8:3000::/36
+ next_hops:
+ - interface: FastEthernet0/0/0/4
+ forward_router_address: 2001:db8:2000:2::2
+ description: PROD1
+ track: ip_sla_1
+ state: overridden
+
+# After state
+# -------------
+# RP/0/RP0/CPU0:ios#sh running-config router static
+# Sat Feb 22 08:07:41.516 UTC
+# router static
+# vrf DEV_NEW
+# address-family ipv4 unicast
+# 192.0.2.48/28 FastEthernet0/0/0/3 192.0.2.15 description DEV1
+# !
+# address-family ipv6 unicast
+# 2001:db8:3000::/36 FastEthernet0/0/0/4 2001:db8:2000:2::2 description PROD1 track ip_sla_1
+# !
+# !
+# !
+
+# Using deleted to delete all destination network entries under a single AFI
+
+# Before state
+# -------------
+# RP/0/RP0/CPU0:ios#sh running-config router static
+# Sat Feb 22 07:59:08.669 UTC
+# router static
+# address-family ipv4 unicast
+# 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+# 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+# 192.0.2.32/28 192.0.2.11 100
+# !
+# address-family ipv6 unicast
+# 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+# 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+# !
+# vrf DEV_SITE
+# address-family ipv4 unicast
+# 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+# 192.0.2.48/28 GigabitEthernet0/0/0/1 192.0.3.24 vrflabel 2302
+# 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+# !
+# !
+# !
+
+- name: Delete all destination network entries under a single AFI
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ - vrf: DEV_SITE
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ state: deleted
+
+# After state
+# ------------
+
+# RP/0/RP0/CPU0:ios#sh running-config router static
+# Sat Feb 22 08:16:41.464 UTC
+# router static
+# address-family ipv4 unicast
+# 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+# 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+# 192.0.2.32/28 192.0.2.11 100
+# !
+# address-family ipv6 unicast
+# 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+# 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+# !
+# vrf DEV_SITE
+# !
+# !
+
+# Using deleted to remove all static route entries from the device
+
+# Before state
+# -------------
+# RP/0/RP0/CPU0:ios#sh running-config router static
+# Sat Feb 22 07:59:08.669 UTC
+# router static
+# address-family ipv4 unicast
+# 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+# 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+# 192.0.2.32/28 192.0.2.11 100
+# !
+# address-family ipv6 unicast
+# 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+# 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+# !
+# vrf DEV_SITE
+# address-family ipv4 unicast
+# 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+# 192.0.2.48/28 GigabitEthernet0/0/0/1 192.0.3.24 vrflabel 2302
+# 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+# !
+# !
+# !
+
+- name: Delete static routes configuration
+ cisco.iosxr.iosxr_static_routes:
+ state: deleted
+
+# After state
+# ------------
+# RP/0/RP0/CPU0:ios#sh running-config router static
+# Sat Feb 22 08:50:43.038 UTC
+# % No such configuration item(s)
+
+# Using gathered to gather static route facts from the device
+
+- name: Gather static routes facts from the device using iosxr_static_routes module
+ cisco.iosxr.iosxr_static_routes:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+# "gathered": [
+# {
+# "address_families": [
+# {
+# "afi": "ipv4",
+# "routes": [
+# {
+# "dest": "192.0.2.16/28",
+# "next_hops": [
+# {
+# "description": "LAB",
+# "forward_router_address": "192.0.2.10",
+# "interface": "FastEthernet0/0/0/1",
+# "metric": 120,
+# "tag": 10
+# },
+# {
+# "interface": "FastEthernet0/0/0/5",
+# "track": "ip_sla_1"
+# }
+# ]
+# },
+# {
+# "dest": "192.0.2.32/28",
+# "next_hops": [
+# {
+# "admin_distance": 100,
+# "forward_router_address": "192.0.2.11"
+# }
+# ]
+# }
+# ],
+# "safi": "unicast"
+# },
+# {
+# "afi": "ipv6",
+# "routes": [
+# {
+# "dest": "2001:db8:1000::/36",
+# "next_hops": [
+# {
+# "description": "DC",
+# "interface": "FastEthernet0/0/0/7"
+# },
+# {
+# "forward_router_address": "2001:db8:2000:2::1",
+# "interface": "FastEthernet0/0/0/8"
+# }
+# ]
+# }
+# ],
+# "safi": "unicast"
+# }
+# ]
+# },
+# {
+# "address_families": [
+# {
+# "afi": "ipv4",
+# "routes": [
+# {
+# "dest": "192.0.2.48/28",
+# "next_hops": [
+# {
+# "description": "DEV",
+# "dest_vrf": "test_1",
+# "forward_router_address": "192.0.2.12"
+# },
+# {
+# "forward_router_address": "192.0.3.24",
+# "interface": "GigabitEthernet0/0/0/1",
+# "vrflabel": 2302
+# }
+# ]
+# },
+# {
+# "dest": "192.0.2.80/28",
+# "next_hops": [
+# {
+# "dest_vrf": "test_1",
+# "forward_router_address": "192.0.2.14",
+# "interface": "FastEthernet0/0/0/2",
+# "track": "ip_sla_2",
+# "vrflabel": 124
+# }
+# ]
+# }
+# ],
+# "safi": "unicast"
+# }
+# ],
+# "vrf": "DEV_SITE"
+# }
+# ]
+
+# Using rendered
+
+- name: Render platform specific commands (without connecting to the device)
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ - vrf: DEV_SITE
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.12
+ description: DEV
+ dest_vrf: test_1
+
+ - dest: 192.0.2.80/28
+ next_hops:
+ - interface: FastEthernet0/0/0/2
+ forward_router_address: 192.0.2.14
+ dest_vrf: test_1
+ track: ip_sla_2
+ vrflabel: 124
+
+# Task Output (redacted)
+# -----------------------
+# "rendered": [
+# "router static"s,
+# "vrf DEV_SITE",
+# "address-family ipv4 unicast",
+# "192.0.2.48/28 vrf test_1 192.0.2.12 description DEV",
+# "192.0.2.80/28 vrf test_1 192.0.2.14 FastEthernet0/0/0/2 track ip_sla_2 vrflabel 124"
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+# Fri Nov 29 21:10:41.896 UTC
+# router static
+# address-family ipv4 unicast
+# 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+# 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+# 192.0.2.32/28 192.0.2.11 100
+# !
+# address-family ipv6 unicast
+# 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+# 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+# !
+# vrf DEV_SITE
+# address-family ipv4 unicast
+# 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+# 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+# !
+# !
+# !
+
+- name: Use parsed state to convert externally supplied device specific static routes
+ commands to structured format
+ cisco.iosxr.iosxr_static_routes:
+ running_config: "{{ lookup('file', '../../fixtures/parsed.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+# "parsed": [
+# {
+# "address_families": [
+# {
+# "afi": "ipv4",
+# "routes": [
+# {
+# "dest": "192.0.2.16/28",
+# "next_hops": [
+# {
+# "description": "LAB",
+# "forward_router_address": "192.0.2.10",
+# "interface": "FastEthernet0/0/0/1",
+# "metric": 120,
+# "tag": 10
+# },
+# {
+# "interface": "FastEthernet0/0/0/5",
+# "track": "ip_sla_1"
+# }
+# ]
+# },
+# {
+# "dest": "192.0.2.32/28",
+# "next_hops": [
+# {
+# "admin_distance": 100,
+# "forward_router_address": "192.0.2.11"
+# }
+# ]
+# }
+# ],
+# "safi": "unicast"
+# },
+# {
+# "afi": "ipv6",
+# "routes": [
+# {
+# "dest": "2001:db8:1000::/36",
+# "next_hops": [
+# {
+# "description": "DC",
+# "interface": "FastEthernet0/0/0/7"
+# },
+# {
+# "forward_router_address": "2001:db8:2000:2::1",
+# "interface": "FastEthernet0/0/0/8"
+# }
+# ]
+# }
+# ],
+# "safi": "unicast"
+# }
+# ]
+# },
+# {
+# "address_families": [
+# {
+# "afi": "ipv4",
+# "routes": [
+# {
+# "dest": "192.0.2.48/28",
+# "next_hops": [
+# {
+# "description": "DEV",
+# "dest_vrf": "test_1",
+# "forward_router_address": "192.0.2.12"
+# }
+# ]
+# },
+# {
+# "dest": "192.0.2.80/28",
+# "next_hops": [
+# {
+# "dest_vrf": "test_1",
+# "forward_router_address": "192.0.2.14",
+# "interface": "FastEthernet0/0/0/2",
+# "track": "ip_sla_2",
+# "vrflabel": 124
+# }
+# ]
+# }
+# ],
+# "safi": "unicast"
+# }
+# ],
+# "vrf": "DEV_SITE"
+# }
+# ]
+# }
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample:
+ - router static
+ - vrf dev_site
+ - address-family ipv4 unicast
+ - 192.0.2.48/28 192.0.2.12 FastEthernet0/0/0/1 track ip_sla_10 description dev1
+ - address-family ipv6 unicast
+ - no 2001:db8:1000::/36
+ - 2001:db8:3000::/36 2001:db8:2000:2::2 FastEthernet0/0/0/4 track ip_sla_11 description prod1
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.argspec.static_routes.static_routes import (
+ Static_routesArgs,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.config.static_routes.static_routes import (
+ Static_routes,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Static_routesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Static_routes(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_system.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_system.py
new file mode 100644
index 00000000..4e9ccc6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_system.py
@@ -0,0 +1,943 @@
+#!/usr/bin/python
+#
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_system
+author:
+- Peter Sprygada (@privateip)
+- Kedar Kekan (@kedarX)
+short_description: Manage the system attributes on Cisco IOS XR devices
+description:
+- This module provides declarative management of node system attributes on Cisco IOS
+ XR devices. It provides an option to configure host system parameters or remove
+ those parameters from the device active configuration.
+version_added: 1.0.0
+requirements:
+- ncclient >= 0.5.3 when using netconf
+- lxml >= 4.1.1 when using netconf
+extends_documentation_fragment:
+- cisco.iosxr.iosxr
+notes:
+- This module works with connection C(network_cli) and C(netconf). See L(the IOS-XR
+ Platform Options,../network/user_guide/platform_iosxr.html).
+- Tested against IOS XRv 6.1.3
+- name-servers I(state=absent) operation with C(netconf) transport is a success, but
+ with rpc-error. This is due to XR platform issue. Recommended to use I(ignore_errors)
+ option with the task as a workaround.
+options:
+ hostname:
+ description:
+ - Configure the device hostname parameter. This option takes an ASCII string value.
+ type: str
+ vrf:
+ description:
+ - VRF name for domain services
+ type: str
+ default: "default"
+ domain_name:
+ description:
+ - Configure the IP domain name on the remote device to the provided value. Value
+ should be in the dotted name form and will be appended to the C(hostname) to
+ create a fully-qualified domain name.
+ type: str
+ domain_search:
+ description:
+ - Provides the list of domain suffixes to append to the hostname for the purpose
+ of doing name resolution. This argument accepts a list of names and will be
+ reconciled with the current active configuration on the running node.
+ type: list
+ elements: str
+ lookup_source:
+ description:
+ - The C(lookup_source) argument provides one or more source interfaces to use
+ for performing DNS lookups. The interface provided in C(lookup_source) must
+ be a valid interface configured on the device.
+ type: str
+ lookup_enabled:
+ description:
+ - Provides administrative control for enabling or disabling DNS lookups. When
+ this argument is set to True, lookups are performed and when it is set to False,
+ lookups are not performed.
+ type: bool
+ default: true
+ name_servers:
+ description:
+ - The C(name_serves) argument accepts a list of DNS name servers by way of either
+ FQDN or IP address to use to perform name resolution lookups. This argument
+ accepts wither a list of DNS servers See examples.
+ type: list
+ elements: str
+ state:
+ description:
+ - State of the configuration values in the device's current active configuration. When
+ set to I(present), the values should be configured in the device active configuration
+ and when set to I(absent) the values should not be in the device active configuration
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+- name: configure hostname and domain-name (default vrf=default)
+ cisco.iosxr.iosxr_system:
+ hostname: iosxr01
+ domain_name: test.example.com
+ domain_search:
+ - ansible.com
+ - redhat.com
+ - cisco.com
+- name: remove configuration
+ cisco.iosxr.iosxr_system:
+ hostname: iosxr01
+ domain_name: test.example.com
+ domain_search:
+ - ansible.com
+ - redhat.com
+ - cisco.com
+ state: absent
+- name: configure hostname and domain-name with vrf
+ cisco.iosxr.iosxr_system:
+ hostname: iosxr01
+ vrf: nondefault
+ domain_name: test.example.com
+ domain_search:
+ - ansible.com
+ - redhat.com
+ - cisco.com
+- name: configure DNS lookup sources
+ cisco.iosxr.iosxr_system:
+ lookup_source: MgmtEth0/0/CPU0/0
+ lookup_enabled: true
+- name: configure name servers
+ cisco.iosxr.iosxr_system:
+ name_servers:
+ - 8.8.8.8
+ - 8.8.4.4
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - hostname iosxr01
+ - ip domain-name test.example.com
+xml:
+ description: NetConf rpc xml sent to device with transport C(netconf)
+ returned: always (empty list when no xml rpc to send)
+ type: list
+ sample:
+ - '<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <ip-domain xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-cfg">
+ <vrfs>
+ <vrf>
+ <vrf-name>default</vrf-name>
+ <lists>
+ <list xc:operation="merge">
+ <order>0</order>
+ <list-name>redhat.com</list-name>
+ </list>
+ </lists>
+ </vrf>
+ </vrfs>
+ </ip-domain>
+ </config>'
+"""
+
+import re
+import collections
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ get_config,
+ load_config,
+ etree_findall,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ is_cliconf,
+ is_netconf,
+ etree_find,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ iosxr_argument_spec,
+ build_xml,
+)
+
+
+def diff_list(want, have):
+ adds = set(want).difference(have)
+ removes = set(have).difference(want)
+ return (adds, removes)
+
+
+class ConfigBase(object):
+ def __init__(self, module):
+ self._module = module
+ self._result = {"changed": False, "warnings": []}
+ self._want = dict()
+ self._have = dict()
+
+ def map_params_to_obj(self):
+ self._want.update(
+ {
+ "hostname": self._module.params["hostname"],
+ "vrf": self._module.params["vrf"],
+ "domain_name": self._module.params["domain_name"],
+ "domain_search": self._module.params["domain_search"],
+ "lookup_source": self._module.params["lookup_source"],
+ "lookup_enabled": self._module.params["lookup_enabled"],
+ "name_servers": self._module.params["name_servers"],
+ }
+ )
+
+
+class CliConfiguration(ConfigBase):
+ def __init__(self, module):
+ super(CliConfiguration, self).__init__(module)
+
+ def map_obj_to_commands(self):
+ commands = list()
+ state = self._module.params["state"]
+
+ def needs_update(x):
+ return self._want.get(x) and (
+ self._want.get(x) != self._have.get(x)
+ )
+
+ if state == "absent":
+ if self._have["hostname"] != "ios":
+ commands.append("no hostname")
+ if self._have["domain_name"]:
+ commands.append("no domain name")
+ if self._have["lookup_source"]:
+ commands.append(
+ "no domain lookup source-interface {0!s}".format(
+ self._have["lookup_source"]
+ )
+ )
+ if not self._have["lookup_enabled"]:
+ commands.append("no domain lookup disable")
+ for item in self._have["name_servers"]:
+ commands.append("no domain name-server {0!s}".format(item))
+ for item in self._have["domain_search"]:
+ commands.append("no domain list {0!s}".format(item))
+
+ elif state == "present":
+ if needs_update("hostname"):
+ commands.append(
+ "hostname {0!s}".format(self._want["hostname"])
+ )
+
+ if needs_update("domain_name"):
+ commands.append(
+ "domain name {0!s}".format(self._want["domain_name"])
+ )
+
+ if needs_update("lookup_source"):
+ commands.append(
+ "domain lookup source-interface {0!s}".format(
+ self._want["lookup_source"]
+ )
+ )
+
+ cmd = None
+ if (
+ not self._want["lookup_enabled"]
+ and self._have["lookup_enabled"]
+ ):
+ cmd = "domain lookup disable"
+ elif (
+ self._want["lookup_enabled"]
+ and not self._have["lookup_enabled"]
+ ):
+ cmd = "no domain lookup disable"
+ if cmd is not None:
+ commands.append(cmd)
+
+ if self._want["name_servers"] is not None:
+ adds, removes = diff_list(
+ self._want["name_servers"], self._have["name_servers"]
+ )
+ for item in adds:
+ commands.append("domain name-server {0!s}".format(item))
+ for item in removes:
+ commands.append("no domain name-server {0!s}".format(item))
+
+ if self._want["domain_search"] is not None:
+ adds, removes = diff_list(
+ self._want["domain_search"], self._have["domain_search"]
+ )
+ for item in adds:
+ commands.append("domain list {0!s}".format(item))
+ for item in removes:
+ commands.append("no domain list {0!s}".format(item))
+
+ self._result["commands"] = []
+ if commands:
+ commit = not self._module.check_mode
+ diff = load_config(self._module, commands, commit=commit)
+ if diff:
+ self._result["diff"] = dict(prepared=diff)
+
+ self._result["commands"] = commands
+ self._result["changed"] = True
+
+ def parse_hostname(self, config):
+ match = re.search(r"^hostname (\S+)", config, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_domain_name(self, config):
+ match = re.search(r"^domain name (\S+)", config, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_lookup_source(self, config):
+ match = re.search(
+ r"^domain lookup source-interface (\S+)", config, re.M
+ )
+ if match:
+ return match.group(1)
+
+ def map_config_to_obj(self):
+ config = get_config(self._module)
+ self._have.update(
+ {
+ "hostname": self.parse_hostname(config),
+ "domain_name": self.parse_domain_name(config),
+ "domain_search": re.findall(
+ r"^domain list (\S+)", config, re.M
+ ),
+ "lookup_source": self.parse_lookup_source(config),
+ "lookup_enabled": "domain lookup disable" not in config,
+ "name_servers": re.findall(
+ r"^domain name-server (\S+)", config, re.M
+ ),
+ }
+ )
+
+ def run(self):
+ self.map_params_to_obj()
+ self.map_config_to_obj()
+ self.map_obj_to_commands()
+
+ return self._result
+
+
+class NCConfiguration(ConfigBase):
+ def __init__(self, module):
+ super(NCConfiguration, self).__init__(module)
+ self._system_meta = collections.OrderedDict()
+ self._system_domain_meta = collections.OrderedDict()
+ self._system_server_meta = collections.OrderedDict()
+ self._hostname_meta = collections.OrderedDict()
+ self._lookup_source_meta = collections.OrderedDict()
+ self._lookup_meta = collections.OrderedDict()
+
+ def map_obj_to_xml_rpc(self):
+ self._system_meta.update(
+ [
+ (
+ "vrfs",
+ {
+ "xpath": "ip-domain/vrfs",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "vrf",
+ {
+ "xpath": "ip-domain/vrfs/vrf",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:vrf",
+ {
+ "xpath": "ip-domain/vrfs/vrf/vrf-name",
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:domain_name",
+ {
+ "xpath": "ip-domain/vrfs/vrf/name",
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ ]
+ )
+
+ self._system_domain_meta.update(
+ [
+ (
+ "vrfs",
+ {
+ "xpath": "ip-domain/vrfs",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "vrf",
+ {
+ "xpath": "ip-domain/vrfs/vrf",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:vrf",
+ {
+ "xpath": "ip-domain/vrfs/vrf/vrf-name",
+ "operation": "edit",
+ },
+ ),
+ (
+ "lists",
+ {
+ "xpath": "ip-domain/vrfs/vrf/lists",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "list",
+ {
+ "xpath": "ip-domain/vrfs/vrf/lists/list",
+ "tag": True,
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ (
+ "a:order",
+ {
+ "xpath": "ip-domain/vrfs/vrf/lists/list/order",
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:domain_search",
+ {
+ "xpath": "ip-domain/vrfs/vrf/lists/list/list-name",
+ "operation": "edit",
+ },
+ ),
+ ]
+ )
+
+ self._system_server_meta.update(
+ [
+ (
+ "vrfs",
+ {
+ "xpath": "ip-domain/vrfs",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "vrf",
+ {
+ "xpath": "ip-domain/vrfs/vrf",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:vrf",
+ {
+ "xpath": "ip-domain/vrfs/vrf/vrf-name",
+ "operation": "edit",
+ },
+ ),
+ (
+ "servers",
+ {
+ "xpath": "ip-domain/vrfs/vrf/servers",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "server",
+ {
+ "xpath": "ip-domain/vrfs/vrf/servers/server",
+ "tag": True,
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ (
+ "a:order",
+ {
+ "xpath": "ip-domain/vrfs/vrf/servers/server/order",
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:name_servers",
+ {
+ "xpath": "ip-domain/vrfs/vrf/servers/server/server-address",
+ "operation": "edit",
+ },
+ ),
+ ]
+ )
+
+ self._hostname_meta.update(
+ [
+ (
+ "a:hostname",
+ {
+ "xpath": "host-names/host-name",
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ )
+ ]
+ )
+
+ self._lookup_source_meta.update(
+ [
+ (
+ "vrfs",
+ {
+ "xpath": "ip-domain/vrfs",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "vrf",
+ {
+ "xpath": "ip-domain/vrfs/vrf",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:vrf",
+ {
+ "xpath": "ip-domain/vrfs/vrf/vrf-name",
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:lookup_source",
+ {
+ "xpath": "ip-domain/vrfs/vrf/source-interface",
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ ]
+ )
+
+ self._lookup_meta.update(
+ [
+ (
+ "vrfs",
+ {
+ "xpath": "ip-domain/vrfs",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "vrf",
+ {
+ "xpath": "ip-domain/vrfs/vrf",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:vrf",
+ {
+ "xpath": "ip-domain/vrfs/vrf/vrf-name",
+ "operation": "edit",
+ },
+ ),
+ (
+ "lookup",
+ {
+ "xpath": "ip-domain/vrfs/vrf/lookup",
+ "tag": True,
+ "operation": "edit",
+ "attrib": "operation",
+ },
+ ),
+ ]
+ )
+
+ state = self._module.params["state"]
+ _get_filter = build_xml("ip-domain", opcode="filter")
+ running = get_config(
+ self._module, source="running", config_filter=_get_filter
+ )
+ _get_filter = build_xml("host-names", opcode="filter")
+ hostname_runn = get_config(
+ self._module, source="running", config_filter=_get_filter
+ )
+
+ hostname_ele = etree_find(hostname_runn, "host-name")
+ hostname = hostname_ele.text if hostname_ele is not None else None
+
+ vrf_ele = etree_findall(running, "vrf")
+ vrf_map = {}
+ for vrf in vrf_ele:
+ name_server_list = list()
+ domain_list = list()
+ vrf_name_ele = etree_find(vrf, "vrf-name")
+ vrf_name = vrf_name_ele.text if vrf_name_ele is not None else None
+
+ domain_name_ele = etree_find(vrf, "name")
+ domain_name = (
+ domain_name_ele.text if domain_name_ele is not None else None
+ )
+
+ domain_ele = etree_findall(vrf, "list-name")
+ for domain in domain_ele:
+ domain_list.append(domain.text)
+
+ server_ele = etree_findall(vrf, "server-address")
+ for server in server_ele:
+ name_server_list.append(server.text)
+
+ lookup_source_ele = etree_find(vrf, "source-interface")
+ lookup_source = (
+ lookup_source_ele.text
+ if lookup_source_ele is not None
+ else None
+ )
+
+ lookup_enabled = (
+ False if etree_find(vrf, "lookup") is not None else True
+ )
+
+ vrf_map[vrf_name] = {
+ "domain_name": domain_name,
+ "domain_search": domain_list,
+ "name_servers": name_server_list,
+ "lookup_source": lookup_source,
+ "lookup_enabled": lookup_enabled,
+ }
+
+ opcode = None
+ hostname_param = {}
+ lookup_param = {}
+ system_param = {}
+ sys_server_params = list()
+ sys_domain_params = list()
+ add_domain_params = list()
+ del_domain_params = list()
+ add_server_params = list()
+ del_server_params = list()
+ lookup_source_params = {}
+
+ try:
+ sys_node = vrf_map[self._want["vrf"]]
+ except KeyError:
+ sys_node = {
+ "domain_name": None,
+ "domain_search": [],
+ "name_servers": [],
+ "lookup_source": None,
+ "lookup_enabled": True,
+ }
+
+ if state == "absent":
+ opcode = "delete"
+
+ def needs_update(x):
+ return (
+ self._want[x] is not None and self._want[x] == sys_node[x]
+ )
+
+ if needs_update("domain_name"):
+ system_param = {
+ "vrf": self._want["vrf"],
+ "domain_name": self._want["domain_name"],
+ }
+
+ if needs_update("hostname"):
+ hostname_param = {"hostname": hostname}
+
+ if (
+ not self._want["lookup_enabled"]
+ and not sys_node["lookup_enabled"]
+ ):
+ lookup_param["vrf"] = self._want["vrf"]
+
+ if needs_update("lookup_source"):
+ lookup_source_params["vrf"] = self._want["vrf"]
+ lookup_source_params["lookup_source"] = self._want[
+ "lookup_source"
+ ]
+
+ if self._want["domain_search"]:
+ domain_param = {}
+ domain_param["domain_name"] = self._want["domain_name"]
+ domain_param["vrf"] = self._want["vrf"]
+ domain_param["order"] = "0"
+ for domain in self._want["domain_search"]:
+ if domain in sys_node["domain_search"]:
+ domain_param["domain_search"] = domain
+ sys_domain_params.append(domain_param.copy())
+
+ if self._want["name_servers"]:
+ server_param = {}
+ server_param["vrf"] = self._want["vrf"]
+ server_param["order"] = "0"
+ for server in self._want["name_servers"]:
+ if server in sys_node["name_servers"]:
+ server_param["name_servers"] = server
+ sys_server_params.append(server_param.copy())
+
+ elif state == "present":
+ opcode = "merge"
+
+ def needs_update(x):
+ return self._want[x] is not None and (
+ sys_node[x] is None
+ or (
+ sys_node[x] is not None
+ and self._want[x] != sys_node[x]
+ )
+ )
+
+ if needs_update("domain_name"):
+ system_param = {
+ "vrf": self._want["vrf"],
+ "domain_name": self._want["domain_name"],
+ }
+
+ if (
+ self._want["hostname"] is not None
+ and self._want["hostname"] != hostname
+ ):
+ hostname_param = {"hostname": self._want["hostname"]}
+
+ if not self._want["lookup_enabled"] and sys_node["lookup_enabled"]:
+ lookup_param["vrf"] = self._want["vrf"]
+
+ if needs_update("lookup_source"):
+ lookup_source_params["vrf"] = self._want["vrf"]
+ lookup_source_params["lookup_source"] = self._want[
+ "lookup_source"
+ ]
+
+ if self._want["domain_search"]:
+ domain_adds, domain_removes = diff_list(
+ self._want["domain_search"], sys_node["domain_search"]
+ )
+ domain_param = {}
+ domain_param["domain_name"] = self._want["domain_name"]
+ domain_param["vrf"] = self._want["vrf"]
+ domain_param["order"] = "0"
+ for domain in domain_adds:
+ if domain not in sys_node["domain_search"]:
+ domain_param["domain_search"] = domain
+ add_domain_params.append(domain_param.copy())
+ for domain in domain_removes:
+ if domain in sys_node["domain_search"]:
+ domain_param["domain_search"] = domain
+ del_domain_params.append(domain_param.copy())
+
+ if self._want["name_servers"]:
+ server_adds, server_removes = diff_list(
+ self._want["name_servers"], sys_node["name_servers"]
+ )
+ server_param = {}
+ server_param["vrf"] = self._want["vrf"]
+ server_param["order"] = "0"
+ for domain in server_adds:
+ if domain not in sys_node["name_servers"]:
+ server_param["name_servers"] = domain
+ add_server_params.append(server_param.copy())
+ for domain in server_removes:
+ if domain in sys_node["name_servers"]:
+ server_param["name_servers"] = domain
+ del_server_params.append(server_param.copy())
+
+ self._result["xml"] = []
+ _edit_filter_list = list()
+ if opcode:
+ if hostname_param:
+ _edit_filter_list.append(
+ build_xml(
+ "host-names",
+ xmap=self._hostname_meta,
+ params=hostname_param,
+ opcode=opcode,
+ )
+ )
+
+ if system_param:
+ _edit_filter_list.append(
+ build_xml(
+ "ip-domain",
+ xmap=self._system_meta,
+ params=system_param,
+ opcode=opcode,
+ )
+ )
+
+ if lookup_source_params:
+ _edit_filter_list.append(
+ build_xml(
+ "ip-domain",
+ xmap=self._lookup_source_meta,
+ params=lookup_source_params,
+ opcode=opcode,
+ )
+ )
+ if lookup_param:
+ _edit_filter_list.append(
+ build_xml(
+ "ip-domain",
+ xmap=self._lookup_meta,
+ params=lookup_param,
+ opcode=opcode,
+ )
+ )
+
+ if opcode == "delete":
+ if sys_domain_params:
+ _edit_filter_list.append(
+ build_xml(
+ "ip-domain",
+ xmap=self._system_domain_meta,
+ params=sys_domain_params,
+ opcode=opcode,
+ )
+ )
+ if sys_server_params:
+ _edit_filter_list.append(
+ build_xml(
+ "ip-domain",
+ xmap=self._system_server_meta,
+ params=sys_server_params,
+ opcode=opcode,
+ )
+ )
+ if self._want["vrf"] != "default":
+ self._result["warnings"] = [
+ "name-servers delete operation with non-default vrf is a success, "
+ "but with rpc-error. Recommended to use 'ignore_errors' option with the task as a workaround"
+ ]
+ elif opcode == "merge":
+ if add_domain_params:
+ _edit_filter_list.append(
+ build_xml(
+ "ip-domain",
+ xmap=self._system_domain_meta,
+ params=add_domain_params,
+ opcode=opcode,
+ )
+ )
+ if del_domain_params:
+ _edit_filter_list.append(
+ build_xml(
+ "ip-domain",
+ xmap=self._system_domain_meta,
+ params=del_domain_params,
+ opcode="delete",
+ )
+ )
+
+ if add_server_params:
+ _edit_filter_list.append(
+ build_xml(
+ "ip-domain",
+ xmap=self._system_server_meta,
+ params=add_server_params,
+ opcode=opcode,
+ )
+ )
+ if del_server_params:
+ _edit_filter_list.append(
+ build_xml(
+ "ip-domain",
+ xmap=self._system_server_meta,
+ params=del_server_params,
+ opcode="delete",
+ )
+ )
+
+ diff = None
+ if _edit_filter_list:
+ commit = not self._module.check_mode
+ diff = load_config(
+ self._module,
+ _edit_filter_list,
+ commit=commit,
+ running=running,
+ nc_get_filter=_get_filter,
+ )
+
+ if diff:
+ if self._module._diff:
+ self._result["diff"] = dict(prepared=diff)
+
+ self._result["xml"] = _edit_filter_list
+ self._result["changed"] = True
+
+ def run(self):
+ self.map_params_to_obj()
+ self.map_obj_to_xml_rpc()
+
+ return self._result
+
+
+def main():
+ """ Main entry point for Ansible module execution
+ """
+ argument_spec = dict(
+ hostname=dict(type="str"),
+ vrf=dict(type="str", default="default"),
+ domain_name=dict(type="str"),
+ domain_search=dict(type="list", elements="str"),
+ name_servers=dict(type="list", elements="str"),
+ lookup_source=dict(type="str"),
+ lookup_enabled=dict(type="bool", default=True),
+ state=dict(choices=["present", "absent"], default="present"),
+ )
+
+ argument_spec.update(iosxr_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ config_object = None
+ if is_cliconf(module):
+ # Commenting the below cliconf deprecation support call for Ansible 2.9 as it'll be continued to be supported
+ # module.deprecate("cli support for 'iosxr_interface' is deprecated. Use transport netconf instead",
+ # version='2.9')
+ config_object = CliConfiguration(module)
+ elif is_netconf(module):
+ config_object = NCConfiguration(module)
+
+ result = None
+ if config_object:
+ result = config_object.run()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_user.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_user.py
new file mode 100644
index 00000000..e1c39905
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/modules/iosxr_user.py
@@ -0,0 +1,973 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# (c) 2017, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: iosxr_user
+author:
+- Trishna Guha (@trishnaguha)
+- Sebastiaan van Doesselaar (@sebasdoes)
+- Kedar Kekan (@kedarX)
+short_description: Manage the aggregate of local users on Cisco IOS XR device
+description:
+- This module provides declarative management of the local usernames configured on
+ network devices. It allows playbooks to manage either individual usernames or the
+ aggregate of usernames in the current running config. It also supports purging usernames
+ from the configuration that are not explicitly defined.
+version_added: 1.0.0
+extends_documentation_fragment:
+- cisco.iosxr.iosxr
+notes:
+- This module works with connection C(network_cli) and C(netconf). See L(the IOS-XR
+ Platform Options,../network/user_guide/platform_iosxr.html).
+- Tested against IOS XRv 6.1.3
+options:
+ aggregate:
+ description:
+ - The set of username objects to be configured on the remote Cisco IOS XR device.
+ The list entries can either be the username or a hash of username and properties.
+ This argument is mutually exclusive with the C(name) argument.
+ aliases:
+ - users
+ - collection
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - The username to be configured on the Cisco IOS XR device. This argument accepts
+ a string value and is mutually exclusive with the C(aggregate) argument. Please
+ note that this option is not same as C(provider username).
+ type: str
+ required: true
+ configured_password:
+ description:
+ - The password to be configured on the Cisco IOS XR device. The password needs
+ to be provided in clear text. Password is encrypted on the device when used
+ with I(cli) and by Ansible when used with I(netconf) using the same MD5 hash
+ technique with salt size of 3. Please note that this option is not same as C(provider
+ password).
+ type: str
+ update_password:
+ description:
+ - Since passwords are encrypted in the device running config, this argument will
+ instruct the module when to change the password. When set to C(always), the
+ password will always be updated in the device and when set to C(on_create) the
+ password will be updated only if the username is created.
+ type: str
+ choices:
+ - on_create
+ - always
+ group:
+ description:
+ - Configures the group for the username in the device running configuration. The
+ argument accepts a string value defining the group name. This argument does
+ not check if the group has been configured on the device.
+ type: str
+ aliases:
+ - role
+ groups:
+ description:
+ - Configures the groups for the username in the device running configuration.
+ The argument accepts a list of group names. This argument does not check if
+ the group has been configured on the device. It is similar to the aggregate
+ command for usernames, but lets you configure multiple groups for the user(s).
+ type: list
+ elements: str
+ admin:
+ description:
+ - Enters into administration configuration mode for making config changes to the
+ device.
+ - Applicable only when using network_cli transport
+ type: bool
+ state:
+ description:
+ - Configures the state of the username definition as it relates to the device
+ operational configuration. When set to I(present), the username(s) should be
+ configured in the device active configuration and when set to I(absent) the
+ username(s) should not be in the device active configuration
+ type: str
+ choices:
+ - present
+ - absent
+ public_key:
+ description:
+ - Configures the contents of the public keyfile to upload to the IOS-XR node.
+ This enables users to login using the accompanying private key. IOS-XR only
+ accepts base64 decoded files, so this will be decoded and uploaded to the node.
+ Do note that this requires an OpenSSL public key file, PuTTy generated files
+ will not work! Mutually exclusive with public_key_contents. If used with multiple
+ users in aggregates, then the same key file is used for all users.
+ type: str
+ public_key_contents:
+ description:
+ - Configures the contents of the public keyfile to upload to the IOS-XR node.
+ This enables users to login using the accompanying private key. IOS-XR only
+ accepts base64 decoded files, so this will be decoded and uploaded to the node.
+ Do note that this requires an OpenSSL public key file, PuTTy generated files
+ will not work! Mutually exclusive with public_key.If used with multiple users
+ in aggregates, then the same key file is used for all users.
+ type: str
+ name:
+ description:
+ - The username to be configured on the Cisco IOS XR device. This argument accepts
+ a string value and is mutually exclusive with the C(aggregate) argument. Please
+ note that this option is not same as C(provider username).
+ type: str
+ configured_password:
+ description:
+ - The password to be configured on the Cisco IOS XR device. The password needs
+ to be provided in clear text. Password is encrypted on the device when used
+ with I(cli) and by Ansible when used with I(netconf) using the same MD5 hash
+ technique with salt size of 3. Please note that this option is not same as C(provider
+ password).
+ type: str
+ update_password:
+ description:
+ - Since passwords are encrypted in the device running config, this argument will
+ instruct the module when to change the password. When set to C(always), the
+ password will always be updated in the device and when set to C(on_create) the
+ password will be updated only if the username is created.
+ type: str
+ default: always
+ choices:
+ - on_create
+ - always
+ group:
+ description:
+ - Configures the group for the username in the device running configuration. The
+ argument accepts a string value defining the group name. This argument does
+ not check if the group has been configured on the device.
+ type: str
+ aliases:
+ - role
+ groups:
+ description:
+ - Configures the groups for the username in the device running configuration.
+ The argument accepts a list of group names. This argument does not check if
+ the group has been configured on the device. It is similar to the aggregate
+ command for usernames, but lets you configure multiple groups for the user(s).
+ type: list
+ elements: str
+ purge:
+ description:
+ - Instructs the module to consider the resource definition absolute. It will remove
+ any previously configured usernames on the device with the exception of the
+ `admin` user and the current defined set of users.
+ type: bool
+ default: false
+ admin:
+ description:
+ - Enters into administration configuration mode for making config changes to the
+ device.
+ - Applicable only when using network_cli transport
+ type: bool
+ default: false
+ state:
+ description:
+ - Configures the state of the username definition as it relates to the device
+ operational configuration. When set to I(present), the username(s) should be
+ configured in the device active configuration and when set to I(absent) the
+ username(s) should not be in the device active configuration
+ type: str
+ default: present
+ choices:
+ - present
+ - absent
+ public_key:
+ description:
+ - Configures the contents of the public keyfile to upload to the IOS-XR node.
+ This enables users to login using the accompanying private key. IOS-XR only
+ accepts base64 decoded files, so this will be decoded and uploaded to the node.
+ Do note that this requires an OpenSSL public key file, PuTTy generated files
+ will not work! Mutually exclusive with public_key_contents. If used with multiple
+ users in aggregates, then the same key file is used for all users.
+ type: str
+ public_key_contents:
+ description:
+ - Configures the contents of the public keyfile to upload to the IOS-XR node.
+ This enables users to login using the accompanying private key. IOS-XR only
+ accepts base64 decoded files, so this will be decoded and uploaded to the node.
+ Do note that this requires an OpenSSL public key file, PuTTy generated files
+ will not work! Mutually exclusive with public_key.If used with multiple users
+ in aggregates, then the same key file is used for all users.
+ type: str
+
+requirements:
+- ncclient >= 0.5.3 when using netconf
+- lxml >= 4.1.1 when using netconf
+- base64 when using I(public_key_contents) or I(public_key)
+- paramiko when using I(public_key_contents) or I(public_key)
+"""
+
+EXAMPLES = """
+- name: create a new user
+ cisco.iosxr.iosxr_user:
+ name: ansible
+ configured_password: mypassword
+ state: present
+- name: create a new user in admin configuration mode
+ cisco.iosxr.iosxr_user:
+ name: ansible
+ configured_password: mypassword
+ admin: true
+ state: present
+- name: remove all users except admin
+ cisco.iosxr.iosxr_user:
+ purge: true
+- name: set multiple users to group sys-admin
+ cisco.iosxr.iosxr_user:
+ aggregate:
+ - name: netop
+ - name: netend
+ group: sysadmin
+ state: present
+- name: set multiple users to multiple groups
+ cisco.iosxr.iosxr_user:
+ aggregate:
+ - name: netop
+ - name: netend
+ groups:
+ - sysadmin
+ - root-system
+ state: present
+- name: Change Password for User netop
+ cisco.iosxr.iosxr_user:
+ name: netop
+ configured_password: '{{ new_password }}'
+ update_password: always
+ state: present
+- name: Add private key authentication for user netop
+ cisco.iosxr.iosxr_user:
+ name: netop
+ state: present
+ public_key_contents: "{{ lookup('file', '/home/netop/.ssh/id_rsa.pub' }}"
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - username ansible secret password group sysadmin
+ - username admin secret admin
+xml:
+ description: NetConf rpc xml sent to device with transport C(netconf)
+ returned: always (empty list when no xml rpc to send)
+ type: list
+ sample:
+ - '<config xmlns:xc=\"urn:ietf:params:xml:ns:netconf:base:1.0\">
+ <aaa xmlns=\"http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-lib-cfg\">
+ <usernames xmlns=\"http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-cfg\">
+ <username xc:operation=\"merge\">
+ <name>test7</name>
+ <usergroup-under-usernames>
+ <usergroup-under-username>
+ <name>sysadmin</name>
+ </usergroup-under-username>
+ </usergroup-under-usernames>
+ <secret>$1$ZsXC$zZ50wqhDC543ZWQkkAHLW0</secret>
+ </username>
+ </usernames>
+ </aaa>
+ </config>'
+"""
+
+import os
+from functools import partial
+from copy import deepcopy
+import collections
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.compat.paramiko import paramiko
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ get_config,
+ load_config,
+ is_netconf,
+ is_cliconf,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ iosxr_argument_spec,
+ build_xml,
+ etree_findall,
+)
+
+try:
+ from base64 import b64decode
+
+ HAS_B64 = True
+except ImportError:
+ HAS_B64 = False
+
+
+class PublicKeyManager(object):
+ def __init__(self, module, result):
+ self._module = module
+ self._result = result
+
+ def convert_key_to_base64(self):
+ """ IOS-XR only accepts base64 decoded files, this converts the public key to a temp file.
+ """
+ if self._module.params["aggregate"]:
+ name = "aggregate"
+ else:
+ name = self._module.params["name"]
+
+ if self._module.params["public_key_contents"]:
+ key = self._module.params["public_key_contents"]
+ elif self._module.params["public_key"]:
+ readfile = open(self._module.params["public_key"], "r")
+ key = readfile.read()
+ splitfile = key.split()[1]
+
+ base64key = b64decode(splitfile)
+ base64file = open("/tmp/publickey_%s.b64" % (name), "wb")
+ base64file.write(base64key)
+ base64file.close()
+
+ return "/tmp/publickey_%s.b64" % (name)
+
+ def copy_key_to_node(self, base64keyfile):
+ """ Copy key to IOS-XR node. We use SFTP because older IOS-XR versions don't handle SCP very well.
+ """
+ provider = self._module.params.get("provider") or {}
+ node = provider.get("host")
+ if node is None:
+ return False
+
+ user = provider.get("username")
+ if user is None:
+ return False
+
+ password = provider.get("password")
+ ssh_keyfile = provider.get("ssh_keyfile")
+
+ if self._module.params["aggregate"]:
+ name = "aggregate"
+ else:
+ name = self._module.params["name"]
+
+ src = base64keyfile
+ dst = "/harddisk:/publickey_%s.b64" % (name)
+
+ ssh = paramiko.SSHClient()
+ ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+ if not ssh_keyfile:
+ ssh.connect(node, username=user, password=password)
+ else:
+ ssh.connect(node, username=user, allow_agent=True)
+ sftp = ssh.open_sftp()
+ sftp.put(src, dst)
+ sftp.close()
+ ssh.close()
+
+ def addremovekey(self, command):
+ """ Add or remove key based on command
+ """
+ provider = self._module.params.get("provider") or {}
+ node = provider.get("host")
+ if node is None:
+ return False
+
+ user = provider.get("username")
+ if user is None:
+ return False
+
+ password = provider.get("password")
+ ssh_keyfile = provider.get("ssh_keyfile")
+
+ ssh = paramiko.SSHClient()
+ ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+ if not ssh_keyfile:
+ ssh.connect(node, username=user, password=password)
+ else:
+ ssh.connect(node, username=user, allow_agent=True)
+ ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command(
+ "%s \r" % (command)
+ )
+ readmsg = ssh_stdout.read(
+ 100
+ ) # We need to read a bit to actually apply for some reason
+ if (
+ ("already" in readmsg)
+ or ("removed" in readmsg)
+ or ("really" in readmsg)
+ ):
+ ssh_stdin.write("yes\r")
+ ssh_stdout.read(
+ 1
+ ) # We need to read a bit to actually apply for some reason
+ ssh.close()
+
+ return readmsg
+
+ def run(self):
+ if self._module.params["state"] == "present":
+ if not self._module.check_mode:
+ key = self.convert_key_to_base64()
+ copykeys = self.copy_key_to_node(key)
+ if copykeys is False:
+ self._result["warnings"].append(
+ "Please set up your provider before running this playbook"
+ )
+
+ if self._module.params["aggregate"]:
+ for user in self._module.params["aggregate"]:
+ cmdtodo = (
+ "admin crypto key import authentication rsa username %s harddisk:/publickey_aggregate.b64"
+ % (user)
+ )
+ addremove = self.addremovekey(cmdtodo)
+ if addremove is False:
+ self._result["warnings"].append(
+ "Please set up your provider before running this playbook"
+ )
+ else:
+ cmdtodo = (
+ "admin crypto key import authentication rsa username %s harddisk:/publickey_%s.b64"
+ % (
+ self._module.params["name"],
+ self._module.params["name"],
+ )
+ )
+ addremove = self.addremovekey(cmdtodo)
+ if addremove is False:
+ self._result["warnings"].append(
+ "Please set up your provider before running this playbook"
+ )
+ elif self._module.params["state"] == "absent":
+ if not self._module.check_mode:
+ if self._module.params["aggregate"]:
+ for user in self._module.params["aggregate"]:
+ cmdtodo = (
+ "admin crypto key zeroize authentication rsa username %s"
+ % (user)
+ )
+ addremove = self.addremovekey(cmdtodo)
+ if addremove is False:
+ self._result["warnings"].append(
+ "Please set up your provider before running this playbook"
+ )
+ else:
+ cmdtodo = (
+ "admin crypto key zeroize authentication rsa username %s"
+ % (self._module.params["name"])
+ )
+ addremove = self.addremovekey(cmdtodo)
+ if addremove is False:
+ self._result["warnings"].append(
+ "Please set up your provider before running this playbook"
+ )
+ elif self._module.params["purge"] is True:
+ if not self._module.check_mode:
+ cmdtodo = "admin crypto key zeroize authentication rsa all"
+ addremove = self.addremovekey(cmdtodo)
+ if addremove is False:
+ self._result["warnings"].append(
+ "Please set up your provider before running this playbook"
+ )
+
+ return self._result
+
+
+def search_obj_in_list(name, lst):
+ for o in lst:
+ if o["name"] == name:
+ return o
+
+ return None
+
+
+class ConfigBase(object):
+ def __init__(self, module, result, flag=None):
+ self._module = module
+ self._result = result
+ self._want = list()
+ self._have = list()
+
+ def get_param_value(self, key, item):
+ # if key doesn't exist in the item, get it from module.params
+ if not item.get(key):
+ value = self._module.params[key]
+
+ # if key does exist, do a type check on it to validate it
+ else:
+ value_type = self._module.argument_spec[key].get("type", "str")
+ type_checker = self._module._CHECK_ARGUMENT_TYPES_DISPATCHER[
+ value_type
+ ]
+ type_checker(item[key])
+ value = item[key]
+
+ # validate the param value (if validator func exists)
+ validator = globals().get("validate_%s" % key)
+ if all((value, validator)):
+ validator(value, self._module)
+
+ return value
+
+ def map_params_to_obj(self):
+ users = self._module.params["aggregate"]
+
+ aggregate = list()
+ if not users:
+ if (
+ not self._module.params["name"]
+ and self._module.params["purge"]
+ ):
+ pass
+ elif not self._module.params["name"]:
+ self._module.fail_json(msg="username is required")
+ else:
+ aggregate = [{"name": self._module.params["name"]}]
+ else:
+ for item in users:
+ if not isinstance(item, dict):
+ aggregate.append({"name": item})
+ elif "name" not in item:
+ self._module.fail_json(msg="name is required")
+ else:
+ aggregate.append(item)
+
+ for item in aggregate:
+ get_value = partial(self.get_param_value, item=item)
+ item["configured_password"] = get_value("configured_password")
+ item["group"] = get_value("group")
+ item["groups"] = get_value("groups")
+ item["state"] = get_value("state")
+ self._want.append(item)
+
+
+class CliConfiguration(ConfigBase):
+ def __init__(self, module, result):
+ super(CliConfiguration, self).__init__(module, result)
+
+ def map_config_to_obj(self):
+ data = get_config(self._module, config_filter="username")
+ users = data.strip().rstrip("!").split("!")
+
+ for user in users:
+ user_config = user.strip().splitlines()
+
+ name = user_config[0].strip().split()[1]
+ group = None
+
+ if len(user_config) > 1:
+ group_or_secret = user_config[1].strip().split()
+ if group_or_secret[0] == "group":
+ group = group_or_secret[1]
+
+ obj = {
+ "name": name,
+ "state": "present",
+ "configured_password": None,
+ "group": group,
+ }
+ self._have.append(obj)
+
+ def map_obj_to_commands(self):
+ commands = list()
+
+ for w in self._want:
+ name = w["name"]
+ state = w["state"]
+
+ obj_in_have = search_obj_in_list(name, self._have)
+
+ if state == "absent" and obj_in_have:
+ commands.append("no username " + name)
+ elif state == "present" and not obj_in_have:
+ user_cmd = "username " + name
+ commands.append(user_cmd)
+
+ if w["configured_password"]:
+ commands.append(
+ user_cmd + " secret " + w["configured_password"]
+ )
+ if w["group"]:
+ commands.append(user_cmd + " group " + w["group"])
+ elif w["groups"]:
+ for group in w["groups"]:
+ commands.append(user_cmd + " group " + group)
+
+ elif state == "present" and obj_in_have:
+ user_cmd = "username " + name
+
+ if (
+ self._module.params["update_password"] == "always"
+ and w["configured_password"]
+ ):
+ commands.append(
+ user_cmd + " secret " + w["configured_password"]
+ )
+ if w["group"] and w["group"] != obj_in_have["group"]:
+ commands.append(user_cmd + " group " + w["group"])
+ elif w["groups"]:
+ for group in w["groups"]:
+ commands.append(user_cmd + " group " + group)
+
+ if self._module.params["purge"]:
+ want_users = [x["name"] for x in self._want]
+ have_users = [x["name"] for x in self._have]
+ for item in set(have_users).difference(set(want_users)):
+ if item != "admin":
+ commands.append("no username %s" % item)
+
+ if "no username admin" in commands:
+ self._module.fail_json(msg="cannot delete the `admin` account")
+
+ self._result["commands"] = []
+ if commands:
+ commit = not self._module.check_mode
+ admin = self._module.params["admin"]
+ diff = load_config(
+ self._module, commands, commit=commit, admin=admin
+ )
+ if diff:
+ self._result["diff"] = dict(prepared=diff)
+
+ self._result["commands"] = commands
+ self._result["changed"] = True
+
+ def run(self):
+ self.map_params_to_obj()
+ self.map_config_to_obj()
+ self.map_obj_to_commands()
+
+ return self._result
+
+
+class NCConfiguration(ConfigBase):
+ def __init__(self, module, result):
+ super(NCConfiguration, self).__init__(module, result)
+ self._locald_meta = collections.OrderedDict()
+ self._locald_group_meta = collections.OrderedDict()
+
+ def generate_md5_hash(self, arg):
+ """
+ Generate MD5 hash with randomly generated salt size of 3.
+ :param arg:
+ :return passwd:
+ """
+ cmd = "openssl passwd -salt `openssl rand -base64 3` -1 "
+ return os.popen(cmd + arg).readlines()[0].strip()
+
+ def map_obj_to_xml_rpc(self):
+ self._locald_meta.update(
+ [
+ (
+ "aaa_locald",
+ {"xpath": "aaa/usernames", "tag": True, "ns": True},
+ ),
+ (
+ "username",
+ {
+ "xpath": "aaa/usernames/username",
+ "tag": True,
+ "attrib": "operation",
+ },
+ ),
+ ("a:name", {"xpath": "aaa/usernames/username/name"}),
+ (
+ "a:configured_password",
+ {
+ "xpath": "aaa/usernames/username/secret",
+ "operation": "edit",
+ },
+ ),
+ ]
+ )
+
+ self._locald_group_meta.update(
+ [
+ (
+ "aaa_locald",
+ {"xpath": "aaa/usernames", "tag": True, "ns": True},
+ ),
+ (
+ "username",
+ {
+ "xpath": "aaa/usernames/username",
+ "tag": True,
+ "attrib": "operation",
+ },
+ ),
+ ("a:name", {"xpath": "aaa/usernames/username/name"}),
+ (
+ "usergroups",
+ {
+ "xpath": "aaa/usernames/username/usergroup-under-usernames",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "usergroup",
+ {
+ "xpath": "aaa/usernames/username/usergroup-under-usernames/usergroup-under-username",
+ "tag": True,
+ "operation": "edit",
+ },
+ ),
+ (
+ "a:group",
+ {
+ "xpath": "aaa/usernames/username/usergroup-under-usernames/usergroup-under-username/name",
+ "operation": "edit",
+ },
+ ),
+ ]
+ )
+
+ state = self._module.params["state"]
+ _get_filter = build_xml("aaa", opcode="filter")
+ running = get_config(
+ self._module, source="running", config_filter=_get_filter
+ )
+
+ elements = etree_findall(running, "username")
+ users = list()
+ for element in elements:
+ name_list = etree_findall(element, "name")
+ users.append(name_list[0].text)
+ list_size = len(name_list)
+ if list_size == 1:
+ self._have.append(
+ {"name": name_list[0].text, "group": None, "groups": None}
+ )
+ elif list_size == 2:
+ self._have.append(
+ {
+ "name": name_list[0].text,
+ "group": name_list[1].text,
+ "groups": None,
+ }
+ )
+ elif list_size > 2:
+ name_iter = iter(name_list)
+ next(name_iter)
+ tmp_list = list()
+ for name in name_iter:
+ tmp_list.append(name.text)
+
+ self._have.append(
+ {
+ "name": name_list[0].text,
+ "group": None,
+ "groups": tmp_list,
+ }
+ )
+
+ locald_params = list()
+ locald_group_params = list()
+ opcode = None
+
+ if state == "absent":
+ opcode = "delete"
+ for want_item in self._want:
+ if want_item["name"] in users:
+ want_item["configured_password"] = None
+ locald_params.append(want_item)
+ elif state == "present":
+ opcode = "merge"
+ for want_item in self._want:
+ if want_item["name"] not in users:
+ want_item["configured_password"] = self.generate_md5_hash(
+ want_item["configured_password"]
+ )
+ locald_params.append(want_item)
+
+ if want_item["group"] is not None:
+ locald_group_params.append(want_item)
+ if want_item["groups"] is not None:
+ for group in want_item["groups"]:
+ want_item["group"] = group
+ locald_group_params.append(want_item.copy())
+ else:
+ if (
+ self._module.params["update_password"] == "always"
+ and want_item["configured_password"] is not None
+ ):
+ want_item[
+ "configured_password"
+ ] = self.generate_md5_hash(
+ want_item["configured_password"]
+ )
+ locald_params.append(want_item)
+ else:
+ want_item["configured_password"] = None
+
+ obj_in_have = search_obj_in_list(
+ want_item["name"], self._have
+ )
+ if (
+ want_item["group"] is not None
+ and want_item["group"] != obj_in_have["group"]
+ ):
+ locald_group_params.append(want_item)
+ elif want_item["groups"] is not None:
+ for group in want_item["groups"]:
+ want_item["group"] = group
+ locald_group_params.append(want_item.copy())
+
+ purge_params = list()
+ if self._module.params["purge"]:
+ want_users = [x["name"] for x in self._want]
+ have_users = [x["name"] for x in self._have]
+ for item in set(have_users).difference(set(want_users)):
+ if item != "admin":
+ purge_params.append({"name": item})
+
+ self._result["xml"] = []
+ _edit_filter_list = list()
+ if opcode is not None:
+ if locald_params:
+ _edit_filter_list.append(
+ build_xml(
+ "aaa",
+ xmap=self._locald_meta,
+ params=locald_params,
+ opcode=opcode,
+ )
+ )
+
+ if locald_group_params:
+ _edit_filter_list.append(
+ build_xml(
+ "aaa",
+ xmap=self._locald_group_meta,
+ params=locald_group_params,
+ opcode=opcode,
+ )
+ )
+
+ if purge_params:
+ _edit_filter_list.append(
+ build_xml(
+ "aaa",
+ xmap=self._locald_meta,
+ params=purge_params,
+ opcode="delete",
+ )
+ )
+
+ diff = None
+ if _edit_filter_list:
+ commit = not self._module.check_mode
+ diff = load_config(
+ self._module,
+ _edit_filter_list,
+ commit=commit,
+ running=running,
+ nc_get_filter=_get_filter,
+ )
+
+ if diff:
+ if self._module._diff:
+ self._result["diff"] = dict(prepared=diff)
+
+ self._result["xml"] = _edit_filter_list
+ self._result["changed"] = True
+
+ def run(self):
+ self.map_params_to_obj()
+ self.map_obj_to_xml_rpc()
+
+ return self._result
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ name=dict(type="str"),
+ configured_password=dict(type="str", no_log=True),
+ update_password=dict(
+ type="str", default="always", choices=["on_create", "always"]
+ ),
+ admin=dict(type="bool", default=False),
+ public_key=dict(type="str"),
+ public_key_contents=dict(type="str"),
+ group=dict(type="str", aliases=["role"]),
+ groups=dict(type="list", elements="str"),
+ state=dict(
+ type="str", default="present", choices=["present", "absent"]
+ ),
+ )
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["name"] = dict(required=True)
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+
+ mutually_exclusive = [
+ ("name", "aggregate"),
+ ("public_key", "public_key_contents"),
+ ("group", "groups"),
+ ]
+
+ argument_spec = dict(
+ aggregate=dict(
+ type="list",
+ elements="dict",
+ options=aggregate_spec,
+ aliases=["users", "collection"],
+ ),
+ purge=dict(type="bool", default=False),
+ )
+
+ argument_spec.update(element_spec)
+ argument_spec.update(iosxr_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ if module.params["public_key_contents"] or module.params["public_key"]:
+ if not HAS_B64:
+ module.fail_json(
+ msg="library base64 is required but does not appear to be "
+ "installed. It can be installed using `pip install base64`"
+ )
+ if paramiko is None:
+ module.fail_json(
+ msg="library paramiko is required but does not appear to be "
+ "installed. It can be installed using `pip install paramiko`"
+ )
+
+ result = {"changed": False, "warnings": []}
+
+ config_object = None
+ if is_cliconf(module):
+ # Commenting the below cliconf deprecation support call for Ansible 2.9 as it'll be continued to be supported
+ # module.deprecate("cli support for 'iosxr_interface' is deprecated. Use transport netconf instead",
+ # version='2.9')
+ config_object = CliConfiguration(module, result)
+ elif is_netconf(module):
+ config_object = NCConfiguration(module, result)
+
+ if config_object:
+ result = config_object.run()
+
+ if module.params["public_key_contents"] or module.params["public_key"]:
+ pubkey_object = PublicKeyManager(module, result)
+ result = pubkey_object.run()
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/netconf/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/netconf/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/netconf/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/netconf/iosxr.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/netconf/iosxr.py
new file mode 100644
index 00000000..6e9255e0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/netconf/iosxr.py
@@ -0,0 +1,297 @@
+#
+# (c) 2017 Red Hat Inc.
+# (c) 2017 Kedar Kekan (kkekan@redhat.com)
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+author: Ansible Networking Team
+netconf: iosxr
+short_description: Use iosxr netconf plugin to run netconf commands on Cisco IOSXR
+ platform
+description:
+- This iosxr plugin provides low level abstraction apis for sending and receiving
+ netconf commands from Cisco iosxr network devices.
+version_added: 1.0.0
+options:
+ ncclient_device_handler:
+ type: str
+ default: iosxr
+ description:
+ - Specifies the ncclient device handler name for Cisco iosxr network os. To identify
+ the ncclient device handler name refer ncclient library documentation.
+"""
+
+import json
+import re
+import collections
+
+from ansible.module_utils._text import to_native, to_text
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.netconf import (
+ remove_namespaces,
+)
+from ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.iosxr import (
+ build_xml,
+ etree_find,
+)
+from ansible.errors import AnsibleConnectionFailure
+from ansible.plugins.netconf import NetconfBase, ensure_ncclient
+
+try:
+ from ncclient import manager
+ from ncclient.operations import RPCError
+ from ncclient.transport.errors import SSHUnknownHostError
+ from ncclient.xml_ import to_xml
+
+ HAS_NCCLIENT = True
+except (
+ ImportError,
+ AttributeError,
+): # paramiko and gssapi are incompatible and raise AttributeError not ImportError
+ HAS_NCCLIENT = False
+
+
+class Netconf(NetconfBase):
+ def get_device_info(self):
+ device_info = {}
+ device_info["network_os"] = "iosxr"
+ install_meta = collections.OrderedDict()
+ install_meta.update(
+ [
+ (
+ "boot-variables",
+ {"xpath": "install/boot-variables", "tag": True},
+ ),
+ (
+ "boot-variable",
+ {
+ "xpath": "install/boot-variables/boot-variable",
+ "tag": True,
+ "lead": True,
+ },
+ ),
+ ("software", {"xpath": "install/software", "tag": True}),
+ (
+ "alias-devices",
+ {"xpath": "install/software/alias-devices", "tag": True},
+ ),
+ (
+ "alias-device",
+ {
+ "xpath": "install/software/alias-devices/alias-device",
+ "tag": True,
+ },
+ ),
+ (
+ "m:device-name",
+ {
+ "xpath": "install/software/alias-devices/alias-device/device-name",
+ "value": "disk0:",
+ },
+ ),
+ ]
+ )
+
+ install_filter = build_xml("install", install_meta, opcode="filter")
+ try:
+ reply = self.get(install_filter)
+ resp = remove_namespaces(
+ re.sub(r'<\?xml version="1.0" encoding="UTF-8"\?>', "", reply)
+ )
+ ele_boot_variable = etree_find(resp, "boot-variable/boot-variable")
+ if ele_boot_variable is not None:
+ device_info["network_os_image"] = re.split(
+ "[:|,]", ele_boot_variable.text
+ )[1]
+ ele_package_name = etree_find(reply, "package-name")
+ if ele_package_name is not None:
+ device_info["network_os_package"] = ele_package_name.text
+ device_info["network_os_version"] = re.split(
+ "-", ele_package_name.text
+ )[-1]
+
+ hostname_filter = build_xml("host-names", opcode="filter")
+ reply = self.get(hostname_filter)
+ resp = remove_namespaces(
+ re.sub(r'<\?xml version="1.0" encoding="UTF-8"\?>', "", reply)
+ )
+ hostname_ele = etree_find(resp.strip(), "host-name")
+ device_info["network_os_hostname"] = (
+ hostname_ele.text if hostname_ele is not None else None
+ )
+ except Exception as exc:
+ self._connection.queue_message(
+ "vvvv", "Fail to retrieve device info %s" % exc
+ )
+ return device_info
+
+ def get_capabilities(self):
+ result = dict()
+ result["rpc"] = self.get_base_rpc()
+ result["network_api"] = "netconf"
+ result["device_info"] = self.get_device_info()
+ result["server_capabilities"] = list(self.m.server_capabilities)
+ result["client_capabilities"] = list(self.m.client_capabilities)
+ result["session_id"] = self.m.session_id
+ result["device_operations"] = self.get_device_operations(
+ result["server_capabilities"]
+ )
+ return json.dumps(result)
+
+ @staticmethod
+ @ensure_ncclient
+ def guess_network_os(obj):
+ """
+ Guess the remote network os name
+ :param obj: Netconf connection class object
+ :return: Network OS name
+ """
+ try:
+ m = manager.connect(
+ host=obj._play_context.remote_addr,
+ port=obj._play_context.port or 830,
+ username=obj._play_context.remote_user,
+ password=obj._play_context.password,
+ key_filename=obj.key_filename,
+ hostkey_verify=obj.get_option("host_key_checking"),
+ look_for_keys=obj.get_option("look_for_keys"),
+ allow_agent=obj._play_context.allow_agent,
+ timeout=obj.get_option("persistent_connect_timeout"),
+ # We need to pass in the path to the ssh_config file when guessing
+ # the network_os so that a jumphost is correctly used if defined
+ ssh_config=obj._ssh_config,
+ )
+ except SSHUnknownHostError as exc:
+ raise AnsibleConnectionFailure(to_native(exc))
+
+ guessed_os = None
+ for c in m.server_capabilities:
+ if re.search("IOS-XR", c):
+ guessed_os = "iosxr"
+ break
+
+ m.close_session()
+ return guessed_os
+
+ # TODO: change .xml to .data_xml, when ncclient supports data_xml on all platforms
+ def get(self, filter=None, remove_ns=False):
+ if isinstance(filter, list):
+ filter = tuple(filter)
+ try:
+ resp = self.m.get(filter=filter)
+ if remove_ns:
+ response = remove_namespaces(resp)
+ else:
+ response = (
+ resp.data_xml if hasattr(resp, "data_xml") else resp.xml
+ )
+ return response
+ except RPCError as exc:
+ raise Exception(to_xml(exc.xml))
+
+ def get_config(self, source=None, filter=None, remove_ns=False):
+ if isinstance(filter, list):
+ filter = tuple(filter)
+ try:
+ resp = self.m.get_config(source=source, filter=filter)
+ if remove_ns:
+ response = remove_namespaces(resp)
+ else:
+ response = (
+ resp.data_xml if hasattr(resp, "data_xml") else resp.xml
+ )
+ return response
+ except RPCError as exc:
+ raise Exception(to_xml(exc.xml))
+
+ def edit_config(
+ self,
+ config=None,
+ format="xml",
+ target="candidate",
+ default_operation=None,
+ test_option=None,
+ error_option=None,
+ remove_ns=False,
+ ):
+ if config is None:
+ raise ValueError("config value must be provided")
+ try:
+ resp = self.m.edit_config(
+ config,
+ format=format,
+ target=target,
+ default_operation=default_operation,
+ test_option=test_option,
+ error_option=error_option,
+ )
+ if remove_ns:
+ response = remove_namespaces(resp)
+ else:
+ response = (
+ resp.data_xml if hasattr(resp, "data_xml") else resp.xml
+ )
+ return response
+ except RPCError as exc:
+ raise Exception(to_xml(exc.xml))
+
+ def commit(
+ self, confirmed=False, timeout=None, persist=None, remove_ns=False
+ ):
+ timeout = to_text(timeout, errors="surrogate_or_strict")
+ try:
+ resp = self.m.commit(
+ confirmed=confirmed, timeout=timeout, persist=persist
+ )
+ if remove_ns:
+ response = remove_namespaces(resp)
+ else:
+ response = (
+ resp.data_xml if hasattr(resp, "data_xml") else resp.xml
+ )
+ return response
+ except RPCError as exc:
+ raise Exception(to_xml(exc.xml))
+
+ def validate(self, source="candidate", remove_ns=False):
+ try:
+ resp = self.m.validate(source=source)
+ if remove_ns:
+ response = remove_namespaces(resp)
+ else:
+ response = (
+ resp.data_xml if hasattr(resp, "data_xml") else resp.xml
+ )
+ return response
+ except RPCError as exc:
+ raise Exception(to_xml(exc.xml))
+
+ def discard_changes(self, remove_ns=False):
+ try:
+ resp = self.m.discard_changes()
+ if remove_ns:
+ response = remove_namespaces(resp)
+ else:
+ response = (
+ resp.data_xml if hasattr(resp, "data_xml") else resp.xml
+ )
+ return response
+ except RPCError as exc:
+ raise Exception(to_xml(exc.xml))
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/terminal/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/terminal/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/terminal/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/terminal/iosxr.py b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/terminal/iosxr.py
new file mode 100644
index 00000000..89a7fd15
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/plugins/terminal/iosxr.py
@@ -0,0 +1,57 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+
+from ansible.plugins.terminal import TerminalBase
+from ansible.errors import AnsibleConnectionFailure
+
+
+class TerminalModule(TerminalBase):
+
+ terminal_stdout_re = [
+ re.compile(br"[\r\n]*[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"),
+ re.compile(br"]]>]]>[\r\n]?"),
+ ]
+
+ terminal_stderr_re = [
+ re.compile(br"% ?Error"),
+ re.compile(br"% ?Bad secret"),
+ re.compile(br"% ?This command is not authorized"),
+ re.compile(br"invalid input", re.I),
+ re.compile(br"(?:incomplete|ambiguous) command", re.I),
+ re.compile(br"(?<!\()connection timed out(?!\))", re.I),
+ re.compile(br"[^\r\n]+ not found", re.I),
+ re.compile(br"'[^']' +returned error code: ?\d+"),
+ re.compile(br"Failed to commit", re.I),
+ ]
+
+ def on_open_shell(self):
+ try:
+ for cmd in (
+ b"terminal length 0",
+ b"terminal width 512",
+ b"terminal exec prompt no-timestamp",
+ ):
+ self._exec_cli_command(cmd)
+ except AnsibleConnectionFailure:
+ raise AnsibleConnectionFailure("unable to set terminal parameters")
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/requirements.txt b/collections-debian-merged/ansible_collections/cisco/iosxr/requirements.txt
new file mode 100644
index 00000000..093f172e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/requirements.txt
@@ -0,0 +1,3 @@
+lxml
+ncclient
+paramiko
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/test-requirements.txt b/collections-debian-merged/ansible_collections/cisco/iosxr/test-requirements.txt
new file mode 100644
index 00000000..fa041776
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/test-requirements.txt
@@ -0,0 +1,7 @@
+black==19.3b0 ; python_version > '3.5'
+flake8
+mock
+pexpect
+pytest-xdist
+yamllint
+coverage==4.5.4
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/.gitignore b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/.gitignore
new file mode 100644
index 00000000..ea1472ec
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/.gitignore
@@ -0,0 +1 @@
+output/
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/network-integration.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/network-integration.cfg
new file mode 100644
index 00000000..d12c1efe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/network-integration.cfg
@@ -0,0 +1,4 @@
+[persistent_connection]
+command_timeout = 100
+connect_timeout = 100
+connect_retry_timeout = 100
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/target-prefixes.network b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/target-prefixes.network
new file mode 100644
index 00000000..97a9d298
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/target-prefixes.network
@@ -0,0 +1 @@
+iosxr \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/_populate.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/_populate.yaml
new file mode 100644
index 00000000..85fe0a12
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/_populate.yaml
@@ -0,0 +1,18 @@
+---
+- name: Populate the device with ACLs
+ cisco.iosxr.iosxr_config:
+ lines: "ipv4 access-list acl_1\n10 permit ipv4 any any\nipv4 access-list acl_2\n\
+ 10 permit ipv4 any any\nipv4 access-list acl_3\n10 permit ipv4 any any\nipv6\
+ \ access-list acl6_1\n10 permit ipv6 any any\nipv6 access-list acl6_2\n10\
+ \ permit ipv6 any any\nipv6 access-list acl6_3\n10 permit ipv6 any any\n"
+
+- name: Setup ACL interfaces configuration for GigabitEthernet0/0/0/0
+ cisco.iosxr.iosxr_config:
+ lines: "ipv4 access-group acl_1 ingress\nipv4 access-group acl_2 egress\nipv6\
+ \ access-group acl6_1 ingress\nipv6 access-group acl6_2 egress\n"
+ parents: interface GigabitEthernet0/0/0/0
+
+- name: Setup ACL interfaces configuration for GigabitEthernet0/0/0/1
+ cisco.iosxr.iosxr_config:
+ lines: ipv4 access-group acl_1 egress
+ parents: interface GigabitEthernet0/0/0/1
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..830213fc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,27 @@
+---
+- name: Remove/Default Resources
+ vars:
+ lines: "default interface GigabitEthernet0/0/0/0\ndefault interface GigabitEthernet0/0/0/1\n\
+ no ipv4 access-list acl_1\nno ipv4 access-list acl_2\nno ipv6 access-list\
+ \ acl6_1\nno ipv6 access-list acl6_2\nno ipv6 access-list acl6_3\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
+
+- name: Initialize interfaces
+ loop:
+ - interface GigabitEthernet0/0/0/0
+ - interface GigabitEthernet0/0/0/1
+ cisco.iosxr.iosxr_config:
+ lines: shutdown
+ parents: '{{ item }}'
+
+- name: Remove unwanted interfaces from config
+ loop:
+ - 0/0/0/2
+ - 0/0/0/3
+ - 0/0/0/4
+ - 0/0/0/5
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no interface GigabitEthernet{{ item }}
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..0481e755
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,33 @@
+---
+- debug:
+ msg: Start iosxr_acl_interfaces deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+ - name: Delete ACL attributes of GigabitEthernet0/0/0/1
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces: &id001
+ config:
+ - name: GigabitEthernet0/0/0/1
+ state: deleted
+
+ - assert:
+ that:
+ - "'interface GigabitEthernet0/0/0/1' in result.commands"
+ - "'no ipv4 access-group acl_1 egress' in result.commands"
+ - result.commands|length == 2
+
+ - name: Delete ACL attributes of GigabitEthernet0/0/0/1 (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == False
+ - result.commands|length == 0
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/deleted_all.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/deleted_all.yaml
new file mode 100644
index 00000000..f980a08f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/deleted_all.yaml
@@ -0,0 +1,52 @@
+---
+- debug:
+ msg: Start iosxr_acl_interfaces deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Delete all ACL interfaces configuration from the device
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces: &id001
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Delete ACL attributes of all interfaces (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..fe75770e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START iosxr_acl_interfaces empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_acl_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/fixtures/parsed.cfg
new file mode 100644
index 00000000..81823360
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/fixtures/parsed.cfg
@@ -0,0 +1,14 @@
+interface MgmtEth0/0/CPU0/0
+ ipv4 address dhcp
+!
+interface GigabitEthernet0/0/0/0
+ shutdown
+ ipv4 access-group acl_1 ingress
+ ipv4 access-group acl_2 egress
+ ipv6 access-group acl6_1 ingress
+ ipv6 access-group acl6_2 egress
+!
+interface GigabitEthernet0/0/0/1
+ shutdown
+ ipv4 access-group acl_1 egress
+! \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..d6404ef3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,63 @@
+---
+- debug:
+ msg: START iosxr_acl_interfaces gathered integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- name: Populate the device with ACLs
+ cisco.iosxr.iosxr_config:
+ lines: "ipv4 access-list acl_1\n10 permit ipv4 any any\nipv4 access-list acl_2\n\
+ 10 permit ipv4 any any\nipv6 access-list acl6_1\n10 permit ipv6 any any\n\
+ ipv6 access-list acl6_2\n10 permit ipv6 any any\n"
+
+- block:
+
+ - name: Merge the provided configuration with the existing running configuration
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ direction: in
+
+ - name: acl_2
+ direction: out
+
+ - afi: ipv6
+ acls:
+
+ - name: acl6_1
+ direction: in
+
+ - name: acl6_2
+ direction: out
+
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ direction: out
+ state: merged
+
+ - name: Gather ACL interfaces facts using gathered state
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: "{{ merged['after'] | symmetric_difference(result['gathered']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..44b134cf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,132 @@
+---
+- debug:
+ msg: START iosxr_acl_interfaces merged integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- name: Populate the device with ACLs
+ cisco.iosxr.iosxr_config:
+ lines: "ipv4 access-list acl_1\n10 permit ipv4 any any\nipv4 access-list acl_2\n\
+ 10 permit ipv4 any any\nipv6 access-list acl6_1\n10 permit ipv6 any any\n\
+ ipv6 access-list acl6_2\n10 permit ipv6 any any\n"
+
+- block:
+
+ - name: Merge the provided configuration with the existing running configuration
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ direction: in
+
+ - name: acl_2
+ direction: out
+
+ - afi: ipv6
+ acls:
+
+ - name: acl6_1
+ direction: in
+
+ - name: acl6_2
+ direction: out
+
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ direction: out
+ state: merged
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['before'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts was correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Update acl_interfaces configuration using merged
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces: &id002
+ config:
+
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_2
+ direction: out
+
+ - name: acl_1
+ direction: in
+ state: merged
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['update_before'] | symmetric_difference(result['before'])\
+ \ |length == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['update_commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dicts was correctly generated
+ assert:
+ that:
+ - "{{ merged['update_after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Update acl_interfaces configuration using merged (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces: *id002
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..27a48689
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,78 @@
+---
+- debug:
+ msg: START iosxr_acl_interfaces overridden integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Overridde all interface ACL configuration with provided configuration
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+
+ - afi: ipv6
+ acls:
+
+ - name: acl6_3
+ direction: in
+
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_2
+ direction: in
+
+ - afi: ipv6
+ acls:
+
+ - name: acl6_3
+ direction: out
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Overridde all interface ACL configuration with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..3edc6faf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START iosxr_acl_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse externally provided ACL interfaces config to agnostic model
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['parsed']) |length ==\
+ \ 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..f67d4520
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,46 @@
+---
+- debug:
+ msg: START iosxr_acl_interfaces rendered integration tests on connection={{
+ ansible_connection }}
+
+- name: Render platform specific commands from task input using rendered state
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ direction: in
+
+ - name: acl_2
+ direction: out
+
+ - afi: ipv6
+ acls:
+
+ - name: acl6_1
+ direction: in
+
+ - name: acl6_2
+ direction: out
+
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ direction: out
+ state: rendered
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['rendered']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..4881afc5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,63 @@
+---
+- debug:
+ msg: START iosxr_acl_interfaces replaced integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Replace device configurations of listed interface with provided configurations
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+
+ - afi: ipv6
+ acls:
+
+ - name: acl6_3
+ direction: in
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Replace device configurations of listed interfaces with provided configurarions
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..8ee32f7b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,114 @@
+---
+- debug:
+ msg: START iosxr_acl_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- block:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: Populate the device with ACLs
+ cisco.iosxr.iosxr_config:
+ lines: "ipv4 access-list acl_1\n10 permit ipv4 any any\nipv4 access-list\
+ \ acl_2\n10 permit ipv4 any any\nipv4 access-list acl_3\n10 permit ipv4\
+ \ any any\nipv6 access-list acl6_1\n10 permit ipv6 any any\nipv6 access-list\
+ \ acl6_2\n10 permit ipv6 any any\nipv6 access-list acl6_3\n10 permit ipv6\
+ \ any any\n"
+
+ - name: Apply the provided configuration (base config)
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ direction: in
+
+ - name: acl_2
+ direction: out
+
+ - afi: ipv6
+ acls:
+
+ - name: acl6_1
+ direction: in
+
+ - name: acl6_2
+ direction: out
+
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ direction: out
+ state: merged
+
+ - name: Gather interfaces facts
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - acl_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.iosxr.iosxr_acl_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ direction: in
+
+ - name: acl_2
+ direction: out
+
+ - afi: ipv6
+ acls:
+
+ - name: acl6_1
+ direction: in
+
+ - name: acl6_2
+ direction: out
+
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ direction: out
+ state: overridden
+
+ - name: Assert that changes were applied
+ assert:
+ that: "{{ round_trip['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.iosxr.iosxr_acl_interfaces:
+ config: "{{ ansible_facts['network_resources']['acl_interfaces'] }}"
+ state: overridden
+
+ - name: Assert that config was reverted
+ assert:
+ that: "{{ merged['after'] | symmetric_difference(revert['after']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/vars/main.yaml
new file mode 100644
index 00000000..c96adb12
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acl_interfaces/vars/main.yaml
@@ -0,0 +1,172 @@
+---
+merged:
+ before:
+ - name: MgmtEth0/0/CPU0/0
+ - name: GigabitEthernet0/0/0/0
+ - name: GigabitEthernet0/0/0/1
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - ipv4 access-group acl_1 ingress
+ - ipv4 access-group acl_2 egress
+ - ipv6 access-group acl6_1 ingress
+ - ipv6 access-group acl6_2 egress
+ - interface GigabitEthernet0/0/0/1
+ - ipv4 access-group acl_1 egress
+ update_commands:
+ - interface GigabitEthernet0/0/0/1
+ - ipv4 access-group acl_2 egress
+ - ipv4 access-group acl_1 ingress
+ after:
+ - name: MgmtEth0/0/CPU0/0
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+ - acls:
+ - name: acl_1
+ direction: in
+ - name: acl_2
+ direction: out
+ afi: ipv4
+ - acls:
+ - name: acl6_1
+ direction: in
+ - name: acl6_2
+ direction: out
+ afi: ipv6
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+ - acls:
+ - name: acl_1
+ direction: out
+ afi: ipv4
+ update_before:
+ - name: MgmtEth0/0/CPU0/0
+ - access_groups:
+ - acls:
+ - direction: in
+ name: acl_1
+ - direction: out
+ name: acl_2
+ afi: ipv4
+ - acls:
+ - direction: in
+ name: acl6_1
+ - direction: out
+ name: acl6_2
+ afi: ipv6
+ name: GigabitEthernet0/0/0/0
+ - access_groups:
+ - acls:
+ - direction: out
+ name: acl_1
+ afi: ipv4
+ name: GigabitEthernet0/0/0/1
+ update_after:
+ - name: MgmtEth0/0/CPU0/0
+ - access_groups:
+ - acls:
+ - direction: in
+ name: acl_1
+ - direction: out
+ name: acl_2
+ afi: ipv4
+ - acls:
+ - direction: in
+ name: acl6_1
+ - direction: out
+ name: acl6_2
+ afi: ipv6
+ name: GigabitEthernet0/0/0/0
+ - access_groups:
+ - acls:
+ - direction: in
+ name: acl_1
+ - direction: out
+ name: acl_2
+ afi: ipv4
+ name: GigabitEthernet0/0/0/1
+replaced:
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - no ipv4 access-group acl_1 ingress
+ - no ipv4 access-group acl_2 egress
+ - no ipv6 access-group acl6_2 egress
+ - ipv6 access-group acl6_3 ingress
+ after:
+ - name: MgmtEth0/0/CPU0/0
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+ - afi: ipv6
+ acls:
+ - name: acl6_3
+ direction: in
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+ - acls:
+ - name: acl_1
+ direction: out
+ afi: ipv4
+overridden:
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - no ipv4 access-group acl_1 ingress
+ - no ipv4 access-group acl_2 egress
+ - no ipv6 access-group acl6_2 egress
+ - ipv6 access-group acl6_3 ingress
+ - interface GigabitEthernet0/0/0/1
+ - no ipv4 access-group acl_1 egress
+ - ipv4 access-group acl_2 ingress
+ - ipv6 access-group acl6_3 egress
+ after:
+ - name: MgmtEth0/0/CPU0/0
+ - name: GigabitEthernet0/0/0/0
+ access_groups:
+ - afi: ipv6
+ acls:
+ - name: acl6_3
+ direction: in
+ - name: GigabitEthernet0/0/0/1
+ access_groups:
+ - acls:
+ - name: acl_2
+ direction: in
+ afi: ipv4
+ - acls:
+ - name: acl6_3
+ direction: out
+ afi: ipv6
+deleted:
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - no ipv4 access-group acl_1 ingress
+ - no ipv4 access-group acl_2 egress
+ - no ipv6 access-group acl6_1 ingress
+ - no ipv6 access-group acl6_2 egress
+ - interface GigabitEthernet0/0/0/1
+ - no ipv4 access-group acl_1 egress
+ after:
+ - name: MgmtEth0/0/CPU0/0
+ - name: GigabitEthernet0/0/0/0
+ - name: GigabitEthernet0/0/0/1
+round_trip:
+ after:
+ - name: MgmtEth0/0/CPU0/0
+ - access_groups:
+ - acls:
+ - direction: out
+ name: acl_1
+ afi: ipv4
+ name: GigabitEthernet0/0/0/0
+ - access_groups:
+ - acls:
+ - direction: in
+ name: acl_1
+ - direction: out
+ name: acl_2
+ afi: ipv4
+ - acls:
+ - direction: in
+ name: acl6_1
+ - direction: out
+ name: acl6_2
+ afi: ipv6
+ name: GigabitEthernet0/0/0/1
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..0f840b45
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/_populate_config.yaml
@@ -0,0 +1,9 @@
+---
+- name: Setup
+ cisco.iosxr.iosxr_config:
+ lines: "ipv6 access-list acl6_1\n10 deny tcp 2001:db8:1234::/48 range ftp telnet\
+ \ any syn ttl range 180 250 authen routing log\n20 permit icmpv6 any any router-advertisement\
+ \ precedence network destopts\nipv4 access-list acl_1\n16 remark TEST_ACL_1_REMARK\n\
+ 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst\n23\
+ \ deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12\nipv4\
+ \ access-list acl_2\n10 remark TEST_ACL_2_REMARK"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..42a59d70
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/_remove_config.yaml
@@ -0,0 +1,9 @@
+---
+- name: Remove ACLs
+ vars:
+ lines: "no ipv4 access-list acl_1\nno ipv4 access-list acl_2\nno ipv4 access-list\
+ \ acl_3\nno ipv4 access-list acl_3\nno ipv6 access-list acl6_1\nno ipv6 access-list\
+ \ acl6_2\nno ipv6 access-list acl6_3\n"
+ ignore_errors: true
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/deleted.yaml
new file mode 100644
index 00000000..25bca57b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/deleted.yaml
@@ -0,0 +1,100 @@
+---
+- debug:
+ msg: Start iosxr_lag_interfaces deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Delete a single ACL
+ register: result
+ cisco.iosxr.iosxr_acls: &id002
+ config:
+
+ - afi: ipv6
+ acls:
+
+ - name: acl6_1
+ state: deleted
+
+ - assert:
+ that:
+ - '"no ipv6 access-list acl6_1" in result.commands'
+ - result.commands|length == 1
+
+ - name: Delete a single ACL (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acls: *id002
+
+ - name: Assert that the previous task was idempotent
+ assert: &id003
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: Delete all ACLs under one AFI
+ register: result
+ cisco.iosxr.iosxr_acls: &id004
+ config:
+
+ - afi: ipv4
+ state: deleted
+
+ - assert:
+ that:
+ - '"no ipv4 access-list acl_1" in result.commands'
+ - '"no ipv4 access-list acl_2" in result.commands'
+ - result.commands|length == 2
+
+ - name: Delete all ACLs under one AFI (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acls: *id004
+
+ - name: Assert that the previous task was idempotent
+ assert: *id003
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete all ACLs from the device
+ register: result
+ cisco.iosxr.iosxr_acls: &id005
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Delete all ACLs from the device (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acls: *id005
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..311c5a08
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START iosxr_acls empty_config integration tests on connection={{ ansible_connection
+ }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_acls:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_acls:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_acls:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_acls:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_acls:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/fixtures/parsed.cfg
new file mode 100644
index 00000000..31155e23
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/fixtures/parsed.cfg
@@ -0,0 +1,8 @@
+ipv4 access-list acl_1
+ 10 remark TEST_ACL_2_REMARK
+ipv4 access-list acl_2
+ 11 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 authen routing log
+ 21 permit icmpv6 any any router-advertisement precedence network packet-length eq 576 destopts
+ipv6 access-list acl6_1
+ 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 routing authen log
+ 20 permit icmpv6 any any router-advertisement precedence network packet-length eq 576 destopts
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/gathered.yaml
new file mode 100644
index 00000000..ca4d0ffb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/gathered.yaml
@@ -0,0 +1,23 @@
+---
+- debug:
+ msg: START iosxr_acls gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather ACL interfaces facts using gathered state
+ register: result
+ cisco.iosxr.iosxr_acls:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: "{{ merged['after'] | symmetric_difference(result['gathered']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/merged.yaml
new file mode 100644
index 00000000..cdc39ae0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/merged.yaml
@@ -0,0 +1,186 @@
+---
+- debug:
+ msg: START iosxr_acls merged integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_acls: &id001
+ config:
+
+ - afi: ipv6
+ acls:
+
+ - name: acl6_1
+ aces:
+
+ - sequence: 10
+ grant: deny
+ protocol: tcp
+ source:
+ prefix: 2001:db8:1234::/48
+ port_protocol:
+ range:
+ start: ftp
+ end: telnet
+ destination:
+ any: true
+ protocol_options:
+ tcp:
+ syn: true
+ ttl:
+ range:
+ start: 180
+ end: 250
+ routing: true
+ authen: true
+ log: true
+
+ - sequence: 20
+ grant: permit
+ protocol: icmpv6
+ source:
+ any: true
+ destination:
+ any: true
+ protocol_options:
+ icmpv6:
+ router_advertisement: true
+ precedence: network
+ destopts: true
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ aces:
+
+ - sequence: 16
+ remark: TEST_ACL_1_REMARK
+
+ - sequence: 21
+ grant: permit
+ protocol: tcp
+ source:
+ host: 192.0.2.10
+ port_protocol:
+ range:
+ start: pop3
+ end: 121
+ destination:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.15
+ protocol_options:
+ tcp:
+ rst: true
+
+ - sequence: 23
+ grant: deny
+ protocol: icmp
+ source:
+ any: true
+ destination:
+ prefix: 198.51.100.0/28
+ protocol_options:
+ icmp:
+ reassembly_timeout: true
+ dscp:
+ lt: af12
+
+ - name: acl_2
+ aces:
+
+ - sequence: 10
+ remark: TEST_ACL_2_REMARK
+ state: merged
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['before'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts was correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acls: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Update existing ACEs
+ register: result
+ cisco.iosxr.iosxr_acls: &id002
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ aces:
+
+ - sequence: 21
+ source:
+ prefix: 198.51.100.32/28
+ port_protocol:
+ range:
+ start: pop3
+ end: 121
+ protocol_options:
+ tcp:
+ syn: true
+
+ - sequence: 23
+ protocol_options:
+ icmp:
+ router_advertisement: true
+ dscp:
+ eq: af23
+ state: merged
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - '"ipv4 access-list acl_1" in result.commands'
+ - '"21 permit tcp 198.51.100.32 0.0.0.15 range pop3 121 198.51.100.0 0.0.0.15
+ syn" in result.commands'
+ - '"23 deny icmp any 198.51.100.0 0.0.0.15 router-advertisement dscp eq
+ af23" in result.commands'
+ - result.commands|length == 3
+
+ - name: Update existing ACEs (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acls: *id002
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/overridden.yaml
new file mode 100644
index 00000000..884bb9c3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/overridden.yaml
@@ -0,0 +1,79 @@
+---
+- debug:
+ msg: START iosxr_acls overridden integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Overridde all ACLs configuration with provided configuration
+ register: result
+ cisco.iosxr.iosxr_acls: &id001
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ aces:
+
+ - sequence: 10
+ grant: permit
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: tcp
+
+ - name: acl_2
+ aces:
+
+ - sequence: 20
+ grant: permit
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: igmp
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Overridde all interface LAG interface configuration with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acls: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/parsed.yaml
new file mode 100644
index 00000000..4a046ade
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/parsed.yaml
@@ -0,0 +1,15 @@
+---
+- debug:
+ msg: START iosxr_acls parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse externally provided ACL config to agnostic model
+ register: result
+ cisco.iosxr.iosxr_acls:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - "{{ parsed | symmetric_difference(result['parsed']) |length == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/rendered.yaml
new file mode 100644
index 00000000..976a1627
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/rendered.yaml
@@ -0,0 +1,101 @@
+---
+- debug:
+ msg: START iosxr_acls rendered integration tests on connection={{ ansible_connection
+ }}
+
+- name: Render platform specific commands from task input using rendered state
+ register: result
+ cisco.iosxr.iosxr_acls:
+ config:
+
+ - afi: ipv6
+ acls:
+
+ - name: acl6_1
+ aces:
+
+ - sequence: 10
+ grant: deny
+ protocol: tcp
+ source:
+ prefix: 2001:db8:1234::/48
+ port_protocol:
+ range:
+ start: ftp
+ end: telnet
+ destination:
+ any: true
+ protocol_options:
+ tcp:
+ syn: true
+ ttl:
+ range:
+ start: 180
+ end: 250
+ routing: true
+ authen: true
+ log: true
+
+ - sequence: 20
+ grant: permit
+ protocol: icmpv6
+ source:
+ any: true
+ destination:
+ any: true
+ protocol_options:
+ icmpv6:
+ router_advertisement: true
+ precedence: network
+ destopts: true
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ aces:
+
+ - sequence: 16
+ remark: TEST_ACL_1_REMARK
+
+ - sequence: 21
+ grant: permit
+ protocol: tcp
+ source:
+ host: 192.0.2.10
+ port_protocol:
+ range:
+ start: pop3
+ end: 121
+ destination:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.15
+ protocol_options:
+ tcp:
+ rst: true
+
+ - sequence: 23
+ grant: deny
+ protocol: icmp
+ source:
+ any: true
+ destination:
+ prefix: 198.51.100.0/28
+ protocol_options:
+ icmp:
+ reassembly_timeout: true
+ dscp:
+ lt: af12
+
+ - name: acl_2
+ aces:
+
+ - sequence: 10
+ remark: TEST_ACL_2_REMARK
+ state: rendered
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['rendered']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/replaced.yaml
new file mode 100644
index 00000000..fb6b6230
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/replaced.yaml
@@ -0,0 +1,78 @@
+---
+- debug:
+ msg: START iosxr_acl_interfaces replaced integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replace device configurations of listed ACL with provided configurations
+ register: result
+ cisco.iosxr.iosxr_acls: &id001
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_2
+ aces:
+
+ - sequence: 11
+ grant: permit
+ protocol: igmp
+ source:
+ host: 198.51.100.130
+ destination:
+ any: true
+ ttl:
+ eq: 100
+
+ - sequence: 12
+ grant: deny
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: icmp
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Replace device configurations of listed interfaces with provided configurarions
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_acls: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/rtt.yaml
new file mode 100644
index 00000000..68ead0b1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/tests/cli/rtt.yaml
@@ -0,0 +1,96 @@
+---
+- debug:
+ msg: START iosxr_acls round trip integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.iosxr.iosxr_acls:
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_2
+ aces:
+
+ - sequence: 11
+ grant: permit
+ protocol: igmp
+ source:
+ host: 198.51.100.130
+ destination:
+ any: true
+ ttl:
+ eq: 100
+
+ - sequence: 12
+ grant: deny
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: icmp
+ state: merged
+
+ - name: Gather interfaces facts
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - acls
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.iosxr.iosxr_acls:
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: acl_1
+ aces:
+
+ - sequence: 10
+ grant: permit
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: tcp
+
+ - name: acl_2
+ aces:
+
+ - sequence: 20
+ grant: permit
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: igmp
+ state: overridden
+
+ - name: Assert that changes were applied
+ assert:
+ that: "{{ overridden['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.iosxr.iosxr_acls:
+ config: "{{ ansible_facts['network_resources']['acls'] }}"
+ state: overridden
+
+ - name: Assert that config was reverted
+ assert:
+ that: "{{ base_config['after'] | symmetric_difference(revert['after']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/vars/main.yaml
new file mode 100644
index 00000000..86b2569d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_acls/vars/main.yaml
@@ -0,0 +1,317 @@
+---
+merged:
+ before: []
+ commands:
+ - ipv6 access-list acl6_1
+ - 10 deny tcp 2001:db8:1234::/48 range ftp telnet any syn ttl range 180 250 authen
+ routing log
+ - 20 permit icmpv6 any any router-advertisement precedence network destopts
+ - ipv4 access-list acl_1
+ - 16 remark TEST_ACL_1_REMARK
+ - 21 permit tcp host 192.0.2.10 range pop3 121 198.51.100.0 0.0.0.15 rst
+ - 23 deny icmp any 198.51.100.0 0.0.0.15 reassembly-timeout dscp lt af12
+ - ipv4 access-list acl_2
+ - 10 remark TEST_ACL_2_REMARK
+ after:
+ - acls:
+ - aces:
+ - remark: TEST_ACL_1_REMARK
+ sequence: 16
+ - destination:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.15
+ grant: permit
+ protocol: tcp
+ protocol_options:
+ tcp:
+ rst: true
+ sequence: 21
+ source:
+ host: 192.0.2.10
+ port_protocol:
+ range:
+ end: '121'
+ start: pop3
+ - destination:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.15
+ dscp:
+ lt: af12
+ grant: deny
+ protocol: icmp
+ protocol_options:
+ icmp:
+ reassembly_timeout: true
+ sequence: 23
+ source:
+ any: true
+ name: acl_1
+ - aces:
+ - remark: TEST_ACL_2_REMARK
+ sequence: 10
+ name: acl_2
+ afi: ipv4
+ - acls:
+ - aces:
+ - authen: true
+ destination:
+ any: true
+ grant: deny
+ log: true
+ protocol: tcp
+ protocol_options:
+ tcp:
+ syn: true
+ routing: true
+ sequence: 10
+ source:
+ port_protocol:
+ range:
+ end: telnet
+ start: ftp
+ prefix: 2001:db8:1234::/48
+ ttl:
+ range:
+ end: 250
+ start: 180
+ - destination:
+ any: true
+ destopts: true
+ grant: permit
+ precedence: network
+ protocol: icmpv6
+ protocol_options:
+ icmpv6:
+ router_advertisement: true
+ sequence: 20
+ source:
+ any: true
+ name: acl6_1
+ afi: ipv6
+replaced:
+ commands:
+ - ipv4 access-list acl_2
+ - no 10
+ - 11 permit igmp host 198.51.100.130 any ttl eq 100
+ - 12 deny icmp any any
+ after:
+ - acls:
+ - aces:
+ - remark: TEST_ACL_1_REMARK
+ sequence: 16
+ - destination:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.15
+ grant: permit
+ protocol: tcp
+ protocol_options:
+ tcp:
+ rst: true
+ sequence: 21
+ source:
+ host: 192.0.2.10
+ port_protocol:
+ range:
+ end: '121'
+ start: pop3
+ - destination:
+ address: 198.51.100.0
+ wildcard_bits: 0.0.0.15
+ dscp:
+ lt: af12
+ grant: deny
+ protocol: icmp
+ protocol_options:
+ icmp:
+ reassembly_timeout: true
+ sequence: 23
+ source:
+ any: true
+ name: acl_1
+ - aces:
+ - destination:
+ any: true
+ grant: permit
+ protocol: igmp
+ sequence: 11
+ source:
+ host: 198.51.100.130
+ ttl:
+ eq: 100
+ - destination:
+ any: true
+ grant: deny
+ protocol: icmp
+ sequence: 12
+ source:
+ any: true
+ name: acl_2
+ afi: ipv4
+ - acls:
+ - aces:
+ - authen: true
+ destination:
+ any: true
+ grant: deny
+ log: true
+ protocol: tcp
+ protocol_options:
+ tcp:
+ syn: true
+ routing: true
+ sequence: 10
+ source:
+ port_protocol:
+ range:
+ end: telnet
+ start: ftp
+ prefix: 2001:db8:1234::/48
+ ttl:
+ range:
+ end: 250
+ start: 180
+ - destination:
+ any: true
+ destopts: true
+ grant: permit
+ precedence: network
+ protocol: icmpv6
+ protocol_options:
+ icmpv6:
+ router_advertisement: true
+ sequence: 20
+ source:
+ any: true
+ name: acl6_1
+ afi: ipv6
+overridden:
+ commands:
+ - no ipv6 access-list acl6_1
+ - ipv4 access-list acl_1
+ - no 16
+ - no 21
+ - no 23
+ - 10 permit tcp any any
+ - ipv4 access-list acl_2
+ - no 10
+ - 20 permit igmp any any
+ after:
+ - acls:
+ - aces:
+ - destination:
+ any: true
+ grant: permit
+ protocol: tcp
+ sequence: 10
+ source:
+ any: true
+ name: acl_1
+ - aces:
+ - destination:
+ any: true
+ grant: permit
+ protocol: igmp
+ sequence: 20
+ source:
+ any: true
+ name: acl_2
+ afi: ipv4
+deleted:
+ commands:
+ - no ipv4 access-list acl_1
+ - no ipv4 access-list acl_2
+ - no ipv6 access-list acl6_1
+ after: []
+parsed:
+ - acls:
+ - aces:
+ - remark: TEST_ACL_2_REMARK
+ sequence: 10
+ name: acl_1
+ - aces:
+ - authen: true
+ destination:
+ any: true
+ grant: deny
+ log: true
+ protocol: tcp
+ protocol_options:
+ tcp:
+ syn: true
+ routing: true
+ sequence: 11
+ source:
+ port_protocol:
+ range:
+ end: telnet
+ start: ftp
+ prefix: 2001:db8:1234::/48
+ ttl:
+ range:
+ end: 250
+ start: 180
+ - destination:
+ any: true
+ destopts: true
+ grant: permit
+ packet_length:
+ eq: 576
+ precedence: network
+ protocol: icmpv6
+ protocol_options:
+ icmpv6:
+ router_advertisement: true
+ sequence: 21
+ source:
+ any: true
+ name: acl_2
+ afi: ipv4
+ - acls:
+ - aces:
+ - authen: true
+ destination:
+ any: true
+ grant: deny
+ log: true
+ protocol: tcp
+ protocol_options:
+ tcp:
+ syn: true
+ routing: true
+ sequence: 10
+ source:
+ port_protocol:
+ range:
+ end: telnet
+ start: ftp
+ prefix: 2001:db8:1234::/48
+ ttl:
+ range:
+ end: 250
+ start: 180
+ - destination:
+ any: true
+ destopts: true
+ grant: permit
+ packet_length:
+ eq: 576
+ precedence: network
+ protocol: icmpv6
+ protocol_options:
+ icmpv6:
+ router_advertisement: true
+ sequence: 20
+ source:
+ any: true
+ name: acl6_1
+ afi: ipv6
+round_trip:
+ after:
+ - members:
+ - member: GigabitEthernet0/0/0/8
+ mode: passive
+ - member: GigabitEthernet0/0/0/9
+ mode: active
+ name: Bundle-Ether10
+ - mode: active
+ name: Bundle-Ether11
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/meta/main.yaml
new file mode 100644
index 00000000..be631e5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_iosxr_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tasks/cli.yaml
new file mode 100644
index 00000000..8f7b62f9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tasks/cli.yaml
@@ -0,0 +1,18 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tasks/main.yaml
new file mode 100644
index 00000000..5d082a6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tasks/main.yaml
@@ -0,0 +1,3 @@
+---
+- include: cli.yaml
+- include: netconf.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tasks/netconf.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tasks/netconf.yaml
new file mode 100644
index 00000000..7579953a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tasks/netconf.yaml
@@ -0,0 +1,26 @@
+---
+- name: collect all netconf test cases
+ find:
+ paths: '{{ role_path }}/tests/netconf'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.netconf)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.netconf'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - netconf
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - local
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/cli/basic-login.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/cli/basic-login.yaml
new file mode 100644
index 00000000..82f48d6b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/cli/basic-login.yaml
@@ -0,0 +1,36 @@
+---
+- name: setup - remove login
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ provider: '{{ cli }}'
+ state: absent
+
+- name: Set login
+ register: result
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ text: "@this is my login banner\nthat has a multiline\nstring\n@"
+ provider: '{{ cli }}'
+ state: present
+
+- debug:
+ msg: '{{ result }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'this is my login banner' in result.commands[0]"
+ - "'that has a multiline' in result.commands[0]"
+
+- name: Set login again (idempotent)
+ register: result
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ text: "@this is my login banner\nthat has a multiline\nstring\n@"
+ provider: '{{ cli }}'
+ state: present
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/cli/basic-motd.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/cli/basic-motd.yaml
new file mode 100644
index 00000000..1b442c0d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/cli/basic-motd.yaml
@@ -0,0 +1,36 @@
+---
+- name: setup - remove motd
+ cisco.iosxr.iosxr_banner:
+ banner: motd
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Set motd
+ register: result
+ cisco.iosxr.iosxr_banner:
+ banner: motd
+ text: "@this is my motd banner\nthat has a multiline\nstring\n@"
+ provider: '{{ cli }}'
+ state: present
+
+- debug:
+ msg: '{{ result }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'this is my motd banner' in result.commands[0]"
+ - "'that has a multiline' in result.commands[0]"
+
+- name: Set motd again (idempotent)
+ register: result
+ cisco.iosxr.iosxr_banner:
+ banner: motd
+ text: "@this is my motd banner\nthat has a multiline\nstring\n@"
+ provider: '{{ cli }}'
+ state: present
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/cli/basic-no-login.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/cli/basic-no-login.yaml
new file mode 100644
index 00000000..0274ca26
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/cli/basic-no-login.yaml
@@ -0,0 +1,34 @@
+---
+- name: Setup
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ text: "@Junk login banner\nover multiple lines\n@"
+ provider: '{{ cli }}'
+ state: present
+
+- name: remove login
+ register: result
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ state: absent
+ provider: '{{ cli }}'
+
+- debug:
+ msg: '{{ result }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'no banner login' in result.commands[0]"
+
+- name: remove login (idempotent)
+ register: result
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-login.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-login.yaml
new file mode 100644
index 00000000..057a1ab9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-login.yaml
@@ -0,0 +1,36 @@
+---
+- name: setup - remove login
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ provider: '{{ netconf }}'
+ state: absent
+
+- name: Set login
+ register: result
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ text: "@this is my login banner\nthat has a multiline\nstring\n@"
+ provider: '{{ netconf }}'
+ state: present
+
+- debug:
+ msg: '{{ result }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'this is my login banner' in result.xml"
+ - "'that has a multiline' in result.xml"
+
+- name: Set login again (idempotent)
+ register: result
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ text: "@this is my login banner\nthat has a multiline\nstring\n@"
+ provider: '{{ netconf }}'
+ state: present
+
+- assert:
+ that:
+ - result.changed == false
+ - result.xml | length == 0
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-motd.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-motd.yaml
new file mode 100644
index 00000000..52bd3a76
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-motd.yaml
@@ -0,0 +1,36 @@
+---
+- name: setup - remove motd
+ cisco.iosxr.iosxr_banner:
+ banner: motd
+ state: absent
+ provider: '{{ netconf }}'
+
+- name: Set motd
+ register: result
+ cisco.iosxr.iosxr_banner:
+ banner: motd
+ text: "@this is my motd banner\nthat has a multiline\nstring\n@"
+ provider: '{{ netconf }}'
+ state: present
+
+- debug:
+ msg: '{{ result }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'this is my motd banner' in result.xml"
+ - "'that has a multiline' in result.xml"
+
+- name: Set motd again (idempotent)
+ register: result
+ cisco.iosxr.iosxr_banner:
+ banner: motd
+ text: "@this is my motd banner\nthat has a multiline\nstring\n@"
+ provider: '{{ netconf }}'
+ state: present
+
+- assert:
+ that:
+ - result.changed == false
+ - result.xml | length == 0
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-no-login.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-no-login.yaml
new file mode 100644
index 00000000..72d125d9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_banner/tests/netconf/basic-no-login.yaml
@@ -0,0 +1,34 @@
+---
+- name: Setup
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ text: "@Junk login banner\nover multiple lines\n@"
+ provider: '{{ netconf }}'
+ state: present
+
+- name: remove login
+ register: result
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ state: absent
+ provider: '{{ netconf }}'
+
+- debug:
+ msg: '{{ result }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'xc:operation=\"delete\"' in result.xml"
+
+- name: remove login (idempotent)
+ register: result
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ state: absent
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.xml | length == 0
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/meta/main.yaml
new file mode 100644
index 00000000..be631e5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_iosxr_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/tasks/cli.yaml
new file mode 100644
index 00000000..163934f5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/tasks/cli.yaml
@@ -0,0 +1,16 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/tests/cli/basic.yaml
new file mode 100644
index 00000000..dc2b4c44
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_bgp/tests/cli/basic.yaml
@@ -0,0 +1,256 @@
+---
+- debug: msg="START iosxr cli/iosxr_bgp.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Check IOS-XR version
+ register: facts
+ cisco.iosxr.iosxr_facts:
+ gather_subset: default
+
+- block:
+
+ - name: Clear existing BGP config
+ ignore_errors: true
+ cisco.iosxr.iosxr_bgp:
+ operation: delete
+
+ - name: Configure BGP with AS 64496 and a router-id
+ register: result
+ cisco.iosxr.iosxr_bgp: &id001
+ operation: merge
+ config:
+ bgp_as: 64496
+ router_id: 192.0.2.2
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'router bgp 64496' in result.commands"
+ - "'bgp router-id 192.0.2.2' in result.commands"
+
+ - name: Configure BGP with AS 64496 and a router-id (idempotent)
+ register: result
+ cisco.iosxr.iosxr_bgp: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Configure BGP neighbors
+ register: result
+ cisco.iosxr.iosxr_bgp: &id002
+ operation: merge
+ config:
+ bgp_as: 64496
+ neighbors:
+
+ - neighbor: 192.0.2.10
+ remote_as: 64496
+ description: IBGP_NBR_1
+ advertisement_interval: 120
+ timers:
+ keepalive: 300
+ holdtime: 360
+
+ - neighbor: 192.0.2.15
+ remote_as: 64496
+ description: IBGP_NBR_2
+ tcp_mss: 1500
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'router bgp 64496' in result.commands"
+ - "'neighbor 192.0.2.10' in result.commands"
+ - "'remote-as 64496' in result.commands"
+ - "'description IBGP_NBR_1' in result.commands"
+ - "'timers 300 360' in result.commands"
+ - "'advertisement-interval 120' in result.commands"
+ - "'neighbor 192.0.2.15' in result.commands"
+ - "'remote-as 64496' in result.commands"
+ - "'description IBGP_NBR_2' in result.commands"
+ - "'tcp mss 1500' in result.commands"
+
+ - name: Configure BGP neighbors (idempotent)
+ register: result
+ cisco.iosxr.iosxr_bgp: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Configure BGP neighbors with operation replace
+ register: result
+ cisco.iosxr.iosxr_bgp: &id003
+ operation: replace
+ config:
+ bgp_as: 64496
+ neighbors:
+
+ - neighbor: 192.0.2.15
+ remote_as: 64496
+ description: IBGP_NBR_2
+ tcp_mss: 1500
+
+ - neighbor: 203.0.113.10
+ remote_as: 64511
+ description: EBGP_NBR_1
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'neighbor 203.0.113.10' in result.commands"
+ - "'remote-as 64511' in result.commands"
+ - "'description EBGP_NBR_1' in result.commands"
+ - "'no neighbor 192.0.2.10' in result.commands"
+
+ - name: Configure BGP neighbors with operation replace (idempotent)
+ register: result
+ cisco.iosxr.iosxr_bgp: *id003
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: create route-policy as prerequisite for BGP configuration
+ register: result
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no route-policy RMAP_1
+ - route-policy RMAP_1
+ - exit
+
+ - name: Configure networks under address family
+ register: result
+ cisco.iosxr.iosxr_bgp: &id004
+ operation: merge
+ config:
+ bgp_as: 64496
+ address_family:
+
+ - afi: ipv4
+ networks:
+
+ - prefix: 198.51.100.48
+ masklen: 28
+ route_map: RMAP_1
+
+ - prefix: 192.0.2.64
+ masklen: 27
+
+ - prefix: 203.0.113.160
+ masklen: 27
+
+ - afi: ipv4
+ safi: multicast
+ networks:
+
+ - prefix: 198.51.100.64
+ masklen: 28
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'router bgp 64496' in result.commands"
+ - "'address-family ipv4 unicast' in result.commands"
+ - "'network 198.51.100.48/28 route-policy RMAP_1' in result.commands"
+ - "'network 192.0.2.64/27' in result.commands"
+ - "'network 203.0.113.160/27' in result.commands"
+ - "'address-family ipv4 multicast' in result.commands"
+ - "'network 198.51.100.64/28' in result.commands"
+
+ - name: Configure networks under address family (idempotent)
+ register: result
+ cisco.iosxr.iosxr_bgp: *id004
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Configure networks under address family with operation replace
+ register: result
+ cisco.iosxr.iosxr_bgp: &id005
+ operation: replace
+ config:
+ bgp_as: 64496
+ address_family:
+
+ - afi: ipv4
+ safi: unicast
+ networks:
+
+ - prefix: 198.51.100.80
+ masklen: 28
+
+ - prefix: 192.0.2.64
+ masklen: 27
+
+ - prefix: 203.0.113.192
+ masklen: 27
+
+ - afi: ipv4
+ safi: multicast
+ networks:
+
+ - prefix: 198.51.100.64
+ masklen: 28
+
+ - assert:
+ that:
+ - result.changed == true
+ - '"router bgp 64496" in result.commands'
+ - '"address-family ipv4 unicast" in result.commands'
+ - '"network 198.51.100.80/28" in result.commands'
+ - '"network 203.0.113.192/27" in result.commands'
+ - '"no network 198.51.100.48/28" in result.commands'
+ - '"no network 203.0.113.160/27" in result.commands'
+
+ - name: Configure networks under address family with operation replace (idempotent)
+ register: result
+ cisco.iosxr.iosxr_bgp: *id005
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Override all the exisiting BGP config
+ register: result
+ cisco.iosxr.iosxr_bgp:
+ operation: override
+ config:
+ bgp_as: 64497
+ router_id: 192.0.2.10
+ log_neighbor_changes: true
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'router bgp 64497' in result.commands"
+ - "'bgp router-id 192.0.2.10' in result.commands"
+ - "'bgp log neighbor changes detail' in result.commands"
+
+ - name: Teardown
+ register: result
+ cisco.iosxr.iosxr_bgp: &id006
+ operation: delete
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'no router bgp 64497' in result.commands"
+
+ - name: Teardown again (idempotent)
+ register: result
+ cisco.iosxr.iosxr_bgp: *id006
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: delete route-policy configures as prerequisite for BGP configuration
+ (teardown)
+ cisco.iosxr.iosxr_config:
+ lines: no route-policy RMAP_1
+ when: facts['ansible_facts']['ansible_net_version'].split('[')[0] == '6.1.3'
+
+- debug: msg="END iosxr cli/iosxr_bgp.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/meta/main.yml
new file mode 100644
index 00000000..be631e5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_iosxr_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tasks/cli.yaml
new file mode 100644
index 00000000..163934f5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tasks/cli.yaml
@@ -0,0 +1,16 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/bad_operator.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/bad_operator.yaml
new file mode 100644
index 00000000..8831d890
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/bad_operator.yaml
@@ -0,0 +1,20 @@
+---
+- debug: msg="START cli/bad_operator.yaml on connection={{ ansible_connection }}"
+
+- name: test bad operator
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_command:
+ commands:
+ - show version
+ - show interfaces GigabitEthernet 0/0
+ wait_for:
+
+ - "result[0] contains 'Description: Foo'"
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+
+- debug: msg="END cli/bad_operator.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/cli_command.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/cli_command.yaml
new file mode 100644
index 00000000..496478fb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/cli_command.yaml
@@ -0,0 +1,45 @@
+---
+- debug:
+ msg: START cli/cli_command.yaml on connection={{ ansible_connection }}
+
+- name: get output for single command
+ register: result
+ ansible.netcommon.cli_command:
+ command: show version
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+
+- name: send invalid command
+ register: result
+ ignore_errors: true
+ ansible.netcommon.cli_command:
+ command: show foo
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+
+- name: delete config file on disk to prevent failure of copy task for duplicate
+ ignore_errors: true
+ ansible.netcommon.cli_command:
+ command: delete harddisk:ansible_tmp.txt
+ prompt: Delete harddisk\:/?ansible_tmp\.txt\[confirm\]
+ answer: ''
+
+- name: Run command with prompt
+ register: result
+ ansible.netcommon.cli_command:
+ command: copy running-config harddisk:ansible_tmp.txt
+ prompt: 'Destination file name \(control-c to abort\)\: \[\/ansible_tmp.txt\]\?'
+ answer: ansible_tmp.txt
+
+- assert:
+ that:
+ - result.stdout is defined
+ - "'ansible_tmp' in result.stdout"
+
+- debug: msg="END cli/cli_command.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/contains.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/contains.yaml
new file mode 100644
index 00000000..c36ea300
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/contains.yaml
@@ -0,0 +1,19 @@
+---
+- debug: msg="START cli/contains.yaml on connection={{ ansible_connection }}"
+
+- name: test contains operator
+ register: result
+ cisco.iosxr.iosxr_command:
+ commands:
+ - show version
+ - show interfaces Loopback 888
+ wait_for:
+ - result[0] contains 'Cisco IOS XR Software'
+ - result[1] contains 'Hardware is Loopback interface'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+
+- debug: msg="END cli/contains.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/invalid.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/invalid.yaml
new file mode 100644
index 00000000..585dd24e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/invalid.yaml
@@ -0,0 +1,32 @@
+---
+- debug: msg="START cli/invalid.yaml on connection={{ ansible_connection }}"
+
+- name: run invalid command
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_command:
+ commands:
+ command: show foo
+ prompt: fooprompt
+ answer: "yes"
+
+- assert:
+ that:
+ - result.failed
+
+- name: run commands that include invalid command
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_command:
+ commands:
+ - show version
+
+ - command: show foo
+ prompt: fooprompt
+ answer: "yes"
+
+- assert:
+ that:
+ - result.failed
+
+- debug: msg="END cli/invalid.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/output.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/output.yaml
new file mode 100644
index 00000000..468b556f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/output.yaml
@@ -0,0 +1,28 @@
+---
+- debug: msg="START cli/output.yaml on connection={{ ansible_connection }}"
+
+- name: get output for single command
+ register: result
+ cisco.iosxr.iosxr_command:
+ commands:
+ - show version
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+
+- name: get output for multiple commands
+ register: result
+ cisco.iosxr.iosxr_command:
+ commands:
+ - show version
+ - show interfaces
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+ - result.stdout | length == 2
+
+- debug: msg="END cli/output.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/prompt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/prompt.yaml
new file mode 100644
index 00000000..4a82d0d0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/prompt.yaml
@@ -0,0 +1,28 @@
+---
+- debug:
+ msg: START cli/prompt.yaml on connection={{ ansible_connection }}
+
+- name: delete config file on disk to prevent failure of copy task for duplicate
+ ignore_errors: true
+ cisco.iosxr.iosxr_command:
+ commands:
+
+ - command: delete harddisk:ansible_tmp.txt
+ prompt: Delete harddisk\:/?ansible_tmp\.txt\[confirm\]
+ answer: ''
+
+- name: copy
+ register: result
+ cisco.iosxr.iosxr_command:
+ commands:
+
+ - command: copy running-config harddisk:ansible_tmp.txt
+ prompt: 'Destination file name \(control-c to abort\)\: \[\/ansible_tmp.txt\]\?'
+ answer: ansible_tmp.txt
+
+- assert:
+ that:
+ - result.stdout is defined
+ - "'ansible_tmp' in result.stdout[0]"
+
+- debug: msg="END cli/prompt.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/timeout.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/timeout.yaml
new file mode 100644
index 00000000..374271d3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_command/tests/cli/timeout.yaml
@@ -0,0 +1,18 @@
+---
+- debug: msg="START cli/timeout.yaml on connection={{ ansible_connection }}"
+
+- name: test bad condition
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_command:
+ commands:
+ - show version
+ wait_for:
+ - result[0] contains bad_value_string
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+
+- debug: msg="END cli/timeout.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/fixtures/config_add_interface.txt b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/fixtures/config_add_interface.txt
new file mode 100644
index 00000000..4aca2814
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/fixtures/config_add_interface.txt
@@ -0,0 +1,35 @@
+hostname iosxr01
+line default
+ transport input ssh
+!
+interface Loopback888
+ description test for ansible
+ shutdown
+!
+interface MgmtEth0/0/CPU0/0
+ ipv4 address dhcp
+!
+interface preconfigure GigabitEthernet0/0/0/3
+ description test-interface-3
+ mtu 256
+ speed 100
+ duplex full
+!
+interface GigabitEthernet0/0/0/0
+ shutdown
+!
+interface GigabitEthernet0/0/0/1
+ shutdown
+!
+router static
+ address-family ipv4 unicast
+ 0.0.0.0/0 10.0.2.2
+ !
+!
+netconf-yang agent
+ ssh
+!
+ssh server v2
+ssh server netconf vrf default
+!
+end
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/fixtures/config_del_interface.txt b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/fixtures/config_del_interface.txt
new file mode 100644
index 00000000..a35e4da7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/fixtures/config_del_interface.txt
@@ -0,0 +1,29 @@
+hostname iosxr01
+line default
+ transport input ssh
+!
+interface Loopback888
+ description test for ansible
+ shutdown
+!
+interface MgmtEth0/0/CPU0/0
+ ipv4 address dhcp
+!
+interface GigabitEthernet0/0/0/0
+ shutdown
+!
+interface GigabitEthernet0/0/0/1
+ shutdown
+!
+router static
+ address-family ipv4 unicast
+ 0.0.0.0/0 10.0.2.2
+ !
+!
+netconf-yang agent
+ ssh
+!
+ssh server v2
+ssh server netconf vrf default
+!
+end
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/meta/main.yml
new file mode 100644
index 00000000..be631e5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_iosxr_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/cli.yaml
new file mode 100644
index 00000000..8f7b62f9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/cli.yaml
@@ -0,0 +1,18 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/cli_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/cli_config.yaml
new file mode 100644
index 00000000..6edbb8f3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/cli_config.yaml
@@ -0,0 +1,18 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli_config'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/main.yaml
new file mode 100644
index 00000000..5604e9eb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/main.yaml
@@ -0,0 +1,6 @@
+---
+- include: cli.yaml
+- include: cli_config.yaml
+
+- include: redirection.yaml
+ when: ansible_version.full is version('2.10.0', '>=')
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/redirection.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/redirection.yaml
new file mode 100644
index 00000000..6282ad40
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tasks/redirection.yaml
@@ -0,0 +1,16 @@
+---
+- name: collect all redirection cli test cases
+ find:
+ paths: '{{ role_path }}/tests/redirection'
+ patterns: '{{ testcase }}.yaml'
+ register: shortname_test_cases
+ delegate_to: localhost
+
+- name: set test_items for redirection
+ set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/change_prefix_set.j2 b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/change_prefix_set.j2
new file mode 100644
index 00000000..572d15bf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/change_prefix_set.j2
@@ -0,0 +1,7 @@
+prefix-set ebpg_filter
+ 192.168.0.0/16 ge 15 le 30
+end-set
+
+interface Loopback999
+ description this is a test interface for prefix-set
+
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/config.j2 b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/config.j2
new file mode 100644
index 00000000..06f98488
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/config.j2
@@ -0,0 +1,4 @@
+interface Loopback999
+ description this is a test
+ shutdown
+
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/configuration.j2 b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/configuration.j2
new file mode 100644
index 00000000..73c98879
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/configuration.j2
@@ -0,0 +1,3 @@
+interface Loopback888
+ description test for ansible automation
+ shutdown
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/init_prefix_set.j2 b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/init_prefix_set.j2
new file mode 100644
index 00000000..d1170b02
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/init_prefix_set.j2
@@ -0,0 +1,3 @@
+prefix-set ebpg_filter
+ 192.168.0.0/16 ge 17 le 30
+end-set
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/route_policy.j2 b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/route_policy.j2
new file mode 100644
index 00000000..ecc68e81
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/route_policy.j2
@@ -0,0 +1,121 @@
+router ospf 1
+ area 0
+!
+prefix-set EBGP-PEER-BOGONS
+ 0.0.0.0/0,
+ 0.0.0.0/8 le 32,
+ 10.0.0.0/8 le 32,
+ 127.0.0.0/8 le 32,
+ 169.254.0.0/16 le 32,
+ 172.16.0.0/12 le 32,
+ 192.0.0.0/24 le 32,
+ 192.0.2.0/24 le 32,
+ 192.168.0.0/16 le 32,
+ 198.18.0.0/15 le 32,
+ 224.0.0.0/4 le 32,
+ 240.0.0.0/4 le 32
+end-set
+!
+prefix-set cust-ddos-DDOS
+end-set
+!
+prefix-set cust-no-export
+end-set
+!
+prefix-set acme_DC_Internal
+ 137.1.0.0/16,
+ 137.1.16.0/24,
+ 137.1.18.0/24,
+ 137.1.20.0/24,
+ 137.1.22.0/24,
+ 137.1.23.0/24,
+ 137.1.24.0/24,
+ 137.1.29.0/24,
+ 137.1.30.0/24,
+ 137.1.31.0/24,
+ 137.1.32.0/21,
+ 137.1.40.0/22,
+ 209.1.0.0/16
+end-set
+!
+as-path-set EBGP-PEER-AS16509-403-PERMIT-PATHS
+ ios-regex '^11164_8075_',
+ ios-regex '^11164_16509$',
+ ios-regex '^1116_16509_[0-9]+$',
+ ios-regex '^8075_',
+ ios-regex '^16509$',
+ ios-regex '^16509_[0-9]+$'
+end-set
+!
+community-set cust-announce
+ 1525:65298,
+ 1525:65436,
+ 1525:65438,
+ 1525:65439,
+ 1525:65498,
+ 1525:65511,
+ 1523:65418,
+ 1523:65436,
+ 1523:65438
+end-set
+!
+community-set cust-no-export
+ 1525:65439,
+ 1525:65511,
+ 1525:65535
+end-set
+!
+
+route-policy POLICY2
+end-policy
+!
+route-policy cust2bgp
+ set origin igp
+ set next-hop 137.1.16.12
+end-policy
+!
+rd-set ebpg-1
+end-set
+!
+rd-set EBGP_INCOMING_RD_SET
+ 172.16.0.0/16:*,
+ 172.17.0.0/16:100,
+ 192:*,
+ 192:100
+end-set
+!
+extcommunity-set rt EBGP_INCOMIG_RT_SET
+ 10:615,
+ 10:6150,
+ 15.15.15.15:15
+end-set
+!
+extcommunity-set rt ebpg-1
+end-set
+!
+route-policy static-to-bgp
+ if destination in cust-no-export then
+ apply cust2bgp
+ set community cust-no-export additive
+ elseif destination in cust-announce then
+ apply cust2bgp
+ set community cust-announce additive
+ elseif destination in cust-announce-backup then
+ apply cust2bgp
+ set local-preference 100
+ set weight 0
+ set community cust-announce additive
+ elseif destination in cust-no-export-backup then
+ apply cust2bgp
+ set local-preference 98
+ set weight 0
+ set community cust-no-export additive
+ else
+ drop
+ endif
+end-policy
+!
+class-map match-any data
+ match precedence ipv4 0 1
+ end-class-map
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/route_policy_change.j2 b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/route_policy_change.j2
new file mode 100644
index 00000000..45448bae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/route_policy_change.j2
@@ -0,0 +1,65 @@
+prefix-set EBGP-PEER-BOGONS
+ 192.0.2.0/24 le 32,
+ 192.168.0.0/16 le 32,
+ 198.18.0.0/16 le 32,
+ 224.0.0.0/4 le 32,
+ 240.0.0.0/4 le 32
+end-set
+!
+as-path-set EBGP-PEER-AS16509-403-PERMIT-PATHS
+ ios-regex '^11164_8075_',
+ ios-regex '^1164_16509$',
+ ios-regex '^1116_16409_[0-9]+$',
+ ios-regex '^8075_'
+end-set
+!
+community-set cust-announce
+ 1525:65298,
+ 1525:6546,
+ 1525:6438,
+ 1525:65439,
+ 1525:65498
+end-set
+!
+rd-set EBGP_INCOMING_RD_SET
+ 172.16.0.0/16:*,
+ 172.14.0.0/16:100,
+ 192:*,
+ 192:100
+end-set
+!
+extcommunity-set rt EBGP_INCOMIG_RT_SET
+ 10:615,
+ 10:6120,
+ 15.15.15.15:15
+end-set
+!
+route-policy POLICY2
+end-policy
+!
+route-policy static-to-bgp
+ if destination in cust-no-export then
+ apply cust2bgp
+ set community cust-no-export additive
+ elseif destination in cust-announce then
+ apply cust2bgp
+ set community cust-announce additive
+ elseif destination in cust-announce-backup then
+ apply cust2bgp
+ set local-preference 100
+ set weight 23
+ set community cust-announce additive
+ elseif destination in cust-no-export-backup then
+ apply cust2bgp
+ set local-preference 98
+ set weight 0
+ set community cust-no-export additive
+ else
+ drop
+ endif
+end-policy
+!
+class-map match-any data
+ match precedence ipv4 0 1 2
+ end-class-map
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/route_policy_clean.j2 b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/route_policy_clean.j2
new file mode 100644
index 00000000..08ba7686
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/basic/route_policy_clean.j2
@@ -0,0 +1,32 @@
+no router ospf 1
+!
+no prefix-set EBGP-PEER-BOGONS
+!
+no prefix-set cust-ddos-DDOS
+!
+no prefix-set cust-no-export
+!
+no prefix-set acme_DC_Internal
+!
+no as-path-set EBGP-PEER-AS16509-403-PERMIT-PATHS
+!
+no community-set cust-announce
+!
+no community-set cust-no-export
+!
+no rd-set ebpg-1
+!
+no rd-set EBGP_INCOMING_RD_SET
+!
+no extcommunity-set rt EBGP_INCOMIG_RT_SET
+!
+no extcommunity-set rt ebpg-1
+!
+no route-policy POLICY2
+!
+no route-policy cust2bgp
+!
+no route-policy static-to-bgp
+!
+no class-map match-any data
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/defaults/config.j2 b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/defaults/config.j2
new file mode 100644
index 00000000..1d4d9da8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/templates/defaults/config.j2
@@ -0,0 +1,4 @@
+interface Loopback999
+ description this is a test
+ no shutdown
+
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/backup.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/backup.yaml
new file mode 100644
index 00000000..f1c1a89c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/backup.yaml
@@ -0,0 +1,124 @@
+---
+- debug: msg="START cli/backup.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface Loopback999
+ match: none
+
+- name: collect any backup files
+ find:
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ connection: local
+ register: backup_files
+
+- name: delete backup files
+ file:
+ path: '{{ item.path }}'
+ state: absent
+ with_items: '{{backup_files.files|default([])}}'
+
+- name: configure device with config
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/config.j2
+ backup: true
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is not defined
+
+- name: collect any backup files
+ find:
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ connection: local
+ register: backup_files
+
+- assert:
+ that:
+ - backup_files.files is defined
+
+- name: delete configurable backup file path
+ file:
+ path: '{{ item }}'
+ state: absent
+ with_items:
+ - '{{ role_path }}/backup_test_dir/'
+ - '{{ role_path }}/backup/backup.cfg'
+
+- name: take configuration backup in custom filename and directory path
+ become: true
+ register: result
+ cisco.iosxr.iosxr_config:
+ backup: true
+ backup_options:
+ filename: backup.cfg
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-1 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- name: take configuration backup in custom filename
+ become: true
+ register: result
+ cisco.iosxr.iosxr_config:
+ backup: true
+ backup_options:
+ filename: backup.cfg
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-2 exist
+ find:
+ paths: '{{ role_path }}/backup/backup.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- name: take configuration backup in custom path and default filename
+ become: true
+ register: result
+ cisco.iosxr.iosxr_config:
+ backup: true
+ backup_options:
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-3 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- debug: msg="END cli/backup.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/comment-too-long.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/comment-too-long.yaml
new file mode 100644
index 00000000..39232f8b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/comment-too-long.yaml
@@ -0,0 +1,28 @@
+---
+- debug: msg="START cli/comment-too-long.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface Loopback999
+ match: none
+
+- name: Commit message too long
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ src: basic/config.j2
+ comment: this is a really long message aaaaabbbbbbcdde end-of-message
+
+- assert:
+ that:
+ - result.changed == false
+ - result.updates is not defined
+ - "'comment argument cannot be more than 60 characters' in result.msg"
+
+- debug: msg="END cli/comment-too-long.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/comment.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/comment.yaml
new file mode 100644
index 00000000..a75784f8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/comment.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg="START cli/comment.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface Loopback999
+ match: none
+
+- name: configure device with comment
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/config.j2
+ comment: this is sensible commit message
+ exclusive: true
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is not defined
+
+- name: check device with config
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/config.j2
+ exclusive: true
+
+- assert:
+ that:
+ - result.changed == false
+ - result.updates is not defined
+
+- debug: msg="END cli/comment.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/commit_label.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/commit_label.yaml
new file mode 100644
index 00000000..73f9924e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/commit_label.yaml
@@ -0,0 +1,70 @@
+---
+- debug: msg="START cli/commit_label.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface Loopback999
+ match: none
+
+- name: get a unique and valid label
+ set_fact:
+ label: ansible_{{ 1001 | random | to_uuid | truncate(20, true, '_') }}
+
+- name: configure device with a label and a comment
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/config.j2
+ comment: this is sensible commit message
+ label: '{{ label }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface Loopback999
+ match: none
+
+- name: Try to commit with old label, fail with a msg that label is alreay used
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ src: basic/config.j2
+ label: '{{ label }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'already used' in result.msg"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface Loopback999
+ match: none
+
+- name: Try to commit with invalid chars($) in label
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ src: basic/config.j2
+ label: ansible_iosxr_config_$
+
+- assert:
+ that:
+ - result.changed == false
+ - "'only contain alphabets' in result.msg"
+
+- debug: msg="END cli/commit_label.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/misplaced_sublevel.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/misplaced_sublevel.yaml
new file mode 100644
index 00000000..3776cc52
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/misplaced_sublevel.yaml
@@ -0,0 +1,29 @@
+---
+- debug: msg="START cli/misplaced_sublevel.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ src: basic/init_prefix_set.j2
+
+- name: Change prefix-set and new command after prefix-set
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/change_prefix_set.j2
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Play same config again to verify no diff in prefix-set also works
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/change_prefix_set.j2
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END cli/misplaced_sublevel.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/prefix_set_remark.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/prefix_set_remark.yaml
new file mode 100644
index 00000000..48884a95
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/prefix_set_remark.yaml
@@ -0,0 +1,29 @@
+---
+- debug: msg="START cli/prefix_set_remark.yaml on connection={{ ansible_connection }}"
+
+- name: pre-setup cleanup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no prefix-set test_set
+
+- name: setup
+ register: result
+ cisco.iosxr.iosxr_config:
+ lines:
+ - '#testremark'
+ - 192.168.1.0/20 le 24
+ - end-set
+ parents: prefix-set test_set
+
+- assert:
+ that:
+ - result.changed == true
+ - "'#testremark' in result.commands"
+
+- name: post-setup cleanup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no prefix-set test_set
+
+
+- debug: msg="END cli/prefix_set_remark.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/replace_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/replace_config.yaml
new file mode 100644
index 00000000..4ce326a2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/replace_config.yaml
@@ -0,0 +1,44 @@
+---
+- debug: msg="START cli/replace_config.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no interface GigabitEthernet0/0/0/3
+
+- name: replace config (add preconfigured interface)
+ register: result
+ cisco.iosxr.iosxr_config: &id001
+ src: '{{ role_path }}/fixtures/config_add_interface.txt'
+ replace: config
+
+- assert:
+ that:
+ - '"load harddisk:/ansible_config.txt" in result.commands'
+
+- name: replace config (add preconfigured interface)(idempotence)
+ register: result
+ cisco.iosxr.iosxr_config: *id001
+
+- assert: &id003
+ that:
+ - result.changed == false
+
+- name: replace config (del preconfigured interface)
+ register: result
+ cisco.iosxr.iosxr_config: &id002
+ src: '{{ role_path }}/fixtures/config_del_interface.txt'
+ replace: config
+
+- assert:
+ that:
+ - '"load harddisk:/ansible_config.txt" in result.commands'
+
+- name: replace config (del preconfigured interface)(idempotence)
+ register: result
+ cisco.iosxr.iosxr_config: *id002
+
+- assert: *id003
+
+- debug: msg="END cli/replace_config.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/route_policy.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/route_policy.yaml
new file mode 100644
index 00000000..a3cb79aa
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/route_policy.yaml
@@ -0,0 +1,53 @@
+---
+- debug: msg="START cli/route_policy.yaml on connection={{ ansible_connection }}"
+
+- name: Cleanup
+ cisco.iosxr.iosxr_config:
+ src: basic/route_policy_clean.j2
+
+- name: config setup route-policy/prefix-set/as-path-set/community-set
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/route_policy.j2
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Configure same route-policy/prefix-set ... verify change=0
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/route_policy.j2
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Do a change in multi-sublevel route-policy/prefix-set/community-set
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/route_policy_change.j2
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Configure same route-policy/prefix-set ... verify change=0
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/route_policy_change.j2
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Cleanup
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/route_policy_clean.j2
+
+- assert:
+ that:
+ - result.changed == true
+
+- debug: msg="END cli/route_policy.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/src_basic.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/src_basic.yaml
new file mode 100644
index 00000000..34a6a430
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/src_basic.yaml
@@ -0,0 +1,33 @@
+---
+- debug: msg="START cli/src_basic.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface Loopback999
+ match: none
+
+- name: configure device with config
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/config.j2
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is not defined
+
+- name: check device with config
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/config.j2
+
+- assert:
+ that:
+ - result.changed == false
+ - result.updates is not defined
+
+- debug: msg="END cli/src_basic.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/src_invalid.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/src_invalid.yaml
new file mode 100644
index 00000000..688f5e13
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/src_invalid.yaml
@@ -0,0 +1,16 @@
+---
+- debug: msg="START cli/src_invalid.yaml on connection={{ ansible_connection }}"
+
+- name: configure with invalid src
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ src: basic/foobar.j2
+
+- assert:
+ that:
+ - result.changed == false
+ - result.failed == true
+ - result.msg == 'path specified in src not found'
+
+- debug: msg="END cli/src_invalid.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/src_match_none.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/src_match_none.yaml
new file mode 100644
index 00000000..298136ad
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/src_match_none.yaml
@@ -0,0 +1,35 @@
+---
+- debug: msg="START cli/src_match_none.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface Loopback999
+ match: none
+
+- name: configure device with config
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/config.j2
+ match: none
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is not defined
+
+- name: check device with config
+ register: result
+ cisco.iosxr.iosxr_config:
+ src: basic/config.j2
+
+- assert:
+ that:
+ - result.changed == false
+ - result.updates is not defined
+
+- debug: msg="END cli/src_match_none.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel.yaml
new file mode 100644
index 00000000..f01a525b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel.yaml
@@ -0,0 +1,43 @@
+---
+- debug: msg="START cli/sublevel.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no ipv4 access-list test
+ match: none
+
+- name: configure sub level command
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 any any log
+ parents:
+ - ipv4 access-list test
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ipv4 access-list test' in result.commands"
+ - "'10 permit ipv4 any any log' in result.commands"
+
+- name: configure sub level command idempotent check
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 any any log
+ parents:
+ - ipv4 access-list test
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no ipv4 access-list test
+ match: none
+
+- debug: msg="END cli/sublevel.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_block.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_block.yaml
new file mode 100644
index 00000000..1c0a84e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_block.yaml
@@ -0,0 +1,60 @@
+---
+- debug: msg="START cli/sublevel_block.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 host 192.0.2.1 any log
+ - 20 permit ipv4 host 192.0.2.2 any log
+ - 30 permit ipv4 host 192.0.2.3 any log
+ parents:
+ - ipv4 access-list test
+ before:
+ - no ipv4 access-list test
+ match: none
+
+- name: configure sub level command using block resplace
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 host 192.0.2.1 any log
+ - 20 permit ipv4 host 192.0.2.2 any log
+ - 30 permit ipv4 host 192.0.2.3 any log
+ - 40 permit ipv4 host 192.0.2.4 any log
+ parents:
+ - ipv4 access-list test
+ replace: block
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ipv4 access-list test' in result.commands"
+ - "'10 permit ipv4 host 192.0.2.1 any log' in result.commands"
+ - "'20 permit ipv4 host 192.0.2.2 any log' in result.commands"
+ - "'30 permit ipv4 host 192.0.2.3 any log' in result.commands"
+ - "'40 permit ipv4 host 192.0.2.4 any log' in result.commands"
+
+- name: check sub level command using block replace
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 host 192.0.2.1 any log
+ - 20 permit ipv4 host 192.0.2.2 any log
+ - 30 permit ipv4 host 192.0.2.3 any log
+ - 40 permit ipv4 host 192.0.2.4 any log
+ parents:
+ - ipv4 access-list test
+ replace: block
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no ipv4 access-list test
+ match: none
+
+- debug: msg="END cli/sublevel_block.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_exact.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_exact.yaml
new file mode 100644
index 00000000..29648c9a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_exact.yaml
@@ -0,0 +1,64 @@
+---
+- debug: msg="START cli/sublevel_exact.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 host 192.0.2.1 any log
+ - 20 permit ipv4 host 192.0.2.2 any log
+ - 30 permit ipv4 host 192.0.2.3 any log
+ - 40 permit ipv4 host 192.0.2.4 any log
+ - 50 permit ipv4 host 192.0.2.5 any log
+ parents:
+ - ipv4 access-list test
+ before:
+ - no ipv4 access-list test
+ match: none
+
+- name: configure sub level command using exact match
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 host 192.0.2.1 any log
+ - 20 permit ipv4 host 192.0.2.2 any log
+ - 30 permit ipv4 host 192.0.2.3 any log
+ - 40 permit ipv4 host 192.0.2.4 any log
+ parents:
+ - ipv4 access-list test
+ match: exact
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ipv4 access-list test' in result.commands"
+ - "'10 permit ipv4 host 192.0.2.1 any log' in result.commands"
+ - "'20 permit ipv4 host 192.0.2.2 any log' in result.commands"
+ - "'30 permit ipv4 host 192.0.2.3 any log' in result.commands"
+ - "'40 permit ipv4 host 192.0.2.4 any log' in result.commands"
+ - "'50 permit ipv4 host 192.0.2.5 any log' not in result.commands"
+
+- name: check sub level command using exact match
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 host 192.0.2.1 any log
+ - 20 permit ipv4 host 192.0.2.2 any log
+ - 30 permit ipv4 host 192.0.2.3 any log
+ - 40 permit ipv4 host 192.0.2.4 any log
+ - 50 permit ipv4 host 192.0.2.5 any log
+ parents:
+ - ipv4 access-list test
+ match: exact
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no ipv4 access-list test
+ match: none
+
+- debug: msg="END cli/sublevel_exact.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_strict.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_strict.yaml
new file mode 100644
index 00000000..0ed1155e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_strict.yaml
@@ -0,0 +1,66 @@
+---
+- debug: msg="START cli/sublevel_strict.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 host 192.0.2.1 any log
+ - 20 permit ipv4 host 192.0.2.3 any log
+ - 30 permit ipv4 host 192.0.2.2 any log
+ - 40 permit ipv4 host 192.0.2.4 any log
+ - 50 permit ipv4 host 192.0.2.5 any log
+ parents:
+ - ipv4 access-list test
+ before:
+ - no ipv4 access-list test
+ match: none
+
+- name: configure sub level command using strict match
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 host 192.0.2.1 any log
+ - 20 permit ipv4 host 192.0.2.2 any log
+ - 30 permit ipv4 host 192.0.2.3 any log
+ - 40 permit ipv4 host 192.0.2.4 any log
+ parents:
+ - ipv4 access-list test
+ before:
+ - no ipv4 access-list test
+ match: strict
+ replace: block
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ipv4 access-list test' in result.commands"
+ - "'10 permit ipv4 host 192.0.2.1 any log' in result.commands"
+ - "'20 permit ipv4 host 192.0.2.2 any log' in result.commands"
+ - "'30 permit ipv4 host 192.0.2.3 any log' in result.commands"
+ - "'40 permit ipv4 host 192.0.2.4 any log' in result.commands"
+ - "'50 permit ipv4 host 192.0.2.5 any log' not in result.commands"
+
+- name: check sub level command using strict match
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 host 192.0.2.1 any log
+ - 20 permit ipv4 host 192.0.2.2 any log
+ - 30 permit ipv4 host 192.0.2.3 any log
+ - 40 permit ipv4 host 192.0.2.4 any log
+ parents:
+ - ipv4 access-list test
+ match: strict
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no ipv4 access-list test
+ match: none
+
+- debug: msg="END cli/sublevel_strict.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_strict_mul_parents.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_strict_mul_parents.yaml
new file mode 100644
index 00000000..e7dc8a4d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/sublevel_strict_mul_parents.yaml
@@ -0,0 +1,75 @@
+---
+- debug: msg="START cli/sublevel_strict_mul_parents.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ lines:
+ - class-map match-any c1
+ - match precedence 7
+ - policy-map p1
+ - class c1
+ - set precedence 2
+ before:
+ - no policy-map p1
+ - no class-map match-any c1
+ match: none
+
+- name: configure sub level command using strict match
+ register: result
+ cisco.iosxr.iosxr_config:
+ lines:
+ - set precedence 5
+ - police rate percent 10
+ parents:
+ - policy-map p1
+ - class c1
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+ - "'set precedence 5' in result.commands"
+ - "'police rate percent 10' in result.commands"
+
+- name: change sub level command order and config with strict match
+ register: result
+ cisco.iosxr.iosxr_config:
+ lines:
+ - police rate percent 10
+ - set precedence 5
+ parents:
+ - policy-map p1
+ - class c1
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+ - "'set precedence 5' in result.commands"
+ - "'police rate percent 10' in result.commands"
+
+- name: Config sub level command with strict match (Idempotency)
+ register: result
+ cisco.iosxr.iosxr_config:
+ lines:
+ - set precedence 5
+ - police rate percent 10
+ parents:
+ - policy-map p1
+ - class c1
+ match: strict
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no policy-map p1
+ - no class-map match-any c1
+ match: none
+
+- debug: msg="END cli/sublevel_strict_mul_parents.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel.yaml
new file mode 100644
index 00000000..eb7d8185
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel.yaml
@@ -0,0 +1,37 @@
+---
+- debug: msg="START cli/toplevel.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - hostname {{ inventory_hostname_short }}
+ match: none
+
+- name: configure top level command
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - hostname foo
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.commands"
+
+- name: configure top level command idempotent check
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - hostname foo
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ commands:
+ - hostname {{ inventory_hostname_short }}
+ match: none
+
+- debug: msg="END cli/toplevel.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel_after.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel_after.yaml
new file mode 100644
index 00000000..73a2a17b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel_after.yaml
@@ -0,0 +1,45 @@
+---
+- debug: msg="START cli/toplevel_after.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no cdp
+ - hostname {{ inventory_hostname_short }}
+ match: none
+
+- name: configure top level command with before
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - hostname foo
+ after:
+ - cdp
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.commands"
+ - "'cdp' in result.commands"
+
+- name: configure top level command with before idempotent check
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - hostname foo
+ after:
+ - no cdp
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no cdp
+ - hostname {{ inventory_hostname_short }}
+ match: none
+
+- debug: msg="END cli/toplevel_after.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel_before.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel_before.yaml
new file mode 100644
index 00000000..70ac2462
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel_before.yaml
@@ -0,0 +1,45 @@
+---
+- debug: msg="START cli/toplevel_before.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no cdp
+ - hostname {{ inventory_hostname_short }}
+ match: none
+
+- name: configure top level command with before
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - hostname foo
+ before:
+ - cdp
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.commands"
+ - "'cdp' in result.commands"
+
+- name: configure top level command with before idempotent check
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - hostname foo
+ before:
+ - cdp
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ commands:
+ - no cdp
+ - hostname {{ inventory_hostname_short }}
+ match: none
+
+- debug: msg="END cli/toplevel_before.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel_nonidempotent.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel_nonidempotent.yaml
new file mode 100644
index 00000000..a6c2a1ff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli/toplevel_nonidempotent.yaml
@@ -0,0 +1,44 @@
+---
+- debug: msg="START cli/toplevel_nonidempotent.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - hostname {{ inventory_hostname_short }}
+ match: none
+
+- name: configure top level command
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - banner motd "hello world"
+ - hostname foo
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.commands"
+ - "'banner motd \"hello world\"' in result.commands"
+
+- name: configure top level command idempotent check
+ register: result
+ cisco.iosxr.iosxr_config:
+ commands:
+ - banner motd "hello world"
+ - hostname foo
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ commands:
+ - hostname {{ inventory_hostname_short }}
+ match: none
+
+- debug: msg="END cli/toplevel_nonidempotent.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli_config/cli_backup.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli_config/cli_backup.yaml
new file mode 100644
index 00000000..3880a040
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli_config/cli_backup.yaml
@@ -0,0 +1,114 @@
+---
+- debug: msg="END cli_config/backup.yaml on connection={{ ansible_connection }}"
+
+- name: delete configurable backup file path
+ file:
+ path: '{{ item }}'
+ state: absent
+ with_items:
+ - '{{ role_path }}/backup_test_dir/'
+ - '{{ role_path }}/backup/backup.cfg'
+
+- name: collect any backup files
+ find:
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_files
+ connection: local
+
+- name: delete backup files
+ file:
+ path: '{{ item.path }}'
+ state: absent
+ with_items: '{{backup_files.files|default([])}}'
+
+- name: take config backup
+ become: true
+ register: result
+ ansible.netcommon.cli_config:
+ backup: true
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: collect any backup files
+ find:
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_files
+ connection: local
+
+- assert:
+ that:
+ - backup_files.files is defined
+
+- name: take configuration backup in custom filename and directory path
+ become: true
+ register: result
+ ansible.netcommon.cli_config:
+ backup: true
+ backup_options:
+ filename: backup.cfg
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-1 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- name: take configuration backup in custom filename
+ become: true
+ register: result
+ ansible.netcommon.cli_config:
+ backup: true
+ backup_options:
+ filename: backup.cfg
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-2 exist
+ find:
+ paths: '{{ role_path }}/backup/backup.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- name: take configuration backup in custom path and default filename
+ become: true
+ register: result
+ ansible.netcommon.cli_config:
+ backup: true
+ backup_options:
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-3 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- debug: msg="END cli_config/backup.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli_config/cli_basic.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli_config/cli_basic.yaml
new file mode 100644
index 00000000..21c0db45
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/cli_config/cli_basic.yaml
@@ -0,0 +1,32 @@
+---
+- debug: msg="START cli_config/cli_basic.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ become: true
+ ansible.netcommon.cli_config: &id002
+ config: "interface Loopback999\n no description\n no shutdown\n"
+
+- name: configure device with config
+ register: result
+ become: true
+ ansible.netcommon.cli_config: &id001
+ config: "{{ lookup('template', 'basic/config.j2') }}"
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Idempotence
+ register: result
+ ansible.netcommon.cli_config: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ ansible.netcommon.cli_config: *id002
+
+- debug: msg="END cli_config/cli_basic.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/redirection/shortname.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/redirection/shortname.yaml
new file mode 100644
index 00000000..d1c67fe2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_config/tests/redirection/shortname.yaml
@@ -0,0 +1,37 @@
+---
+- debug: msg="START redirection/shortname.yaml on connection={{ ansible_connection }}"
+
+- name: Use src with module alias
+ register: result
+ cisco.iosxr.config:
+ src: basic/configuration.j2
+
+- assert:
+ that:
+ # make sure that the template content was read and not the path
+ - result.changed == true
+ - '"description test for ansible automation" in result.diff["prepared"]'
+
+- name: use module alias to take configuration backup
+ register: result
+ cisco.iosxr.config:
+ backup: true
+ backup_options:
+ filename: backup_with_alias.cfg
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-4 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup_with_alias.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- debug: msg="END redirection/shortname.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/meta/main.yml
new file mode 100644
index 00000000..be631e5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_iosxr_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tasks/cli.yaml
new file mode 100644
index 00000000..163934f5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tasks/cli.yaml
@@ -0,0 +1,16 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/all_facts.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/all_facts.yaml
new file mode 100644
index 00000000..d41e7ae2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/all_facts.yaml
@@ -0,0 +1,21 @@
+---
+- debug: msg="START cli/all_facts.yaml on connection={{ ansible_connection }}"
+
+- name: test getting all facts
+ register: result
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - all
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'config' in result.ansible_facts.ansible_net_gather_subset"
+ - "'hardware' in result.ansible_facts.ansible_net_gather_subset"
+ - "'default' in result.ansible_facts.ansible_net_gather_subset"
+ - "'interfaces' in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_model == 'IOS XRv'
+ - result.ansible_facts.ansible_net_filesystems is defined
+
+- debug: msg="END cli/all_facts.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/default_facts.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/default_facts.yaml
new file mode 100644
index 00000000..7f472779
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/default_facts.yaml
@@ -0,0 +1,21 @@
+---
+- debug: msg="START cli/default_facts.yaml on connection={{ ansible_connection }}"
+
+- name: test getting default facts
+ register: result
+ cisco.iosxr.iosxr_facts:
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'hardware' in result.ansible_facts.ansible_net_gather_subset"
+ - "'default' in result.ansible_facts.ansible_net_gather_subset"
+ - "'interfaces' in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - "'config' not in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - result.ansible_facts.ansible_net_interfaces | length > 1
+ - result.ansible_facts.ansible_net_config is not defined
+
+- debug: msg="END cli/default.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/invalid_subset.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/invalid_subset.yaml
new file mode 100644
index 00000000..9deb3b13
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/invalid_subset.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg="START cli/invalid_subset.yaml on connection={{ ansible_connection
+ }}"
+
+- name: test invalid subset (foobar)
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - foobar
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.failed == true
+ - result.msg == 'Subset must be one of [config, default, hardware, interfaces],
+ got foobar'
+
+- name: test subset specified multiple times
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!hardware'
+ - hardware
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.failed == true
+ - result.msg == 'Bad subset'
+ ignore_errors: true
+
+- debug: msg="END cli/invalid_subset.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/not_hardware.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/not_hardware.yaml
new file mode 100644
index 00000000..2f8e9679
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_facts/tests/cli/not_hardware.yaml
@@ -0,0 +1,23 @@
+---
+- debug: msg="START cli/not_hardware_facts.yaml on connection={{ ansible_connection
+ }}"
+
+- name: test not hardware
+ register: result
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!hardware'
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'config' in result.ansible_facts.ansible_net_gather_subset"
+ - "'default' in result.ansible_facts.ansible_net_gather_subset"
+ - "'interfaces' in result.ansible_facts.ansible_net_gather_subset"
+ - "'hardware' not in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_interfaces | length > 1
+ - result.ansible_facts.ansible_net_filesystems is not defined
+
+- debug: msg="END cli/not_hardware_facts.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/meta/main.yaml
new file mode 100644
index 00000000..be631e5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_iosxr_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tasks/cli.yaml
new file mode 100644
index 00000000..8f7b62f9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tasks/cli.yaml
@@ -0,0 +1,18 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tasks/main.yaml
new file mode 100644
index 00000000..5d082a6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tasks/main.yaml
@@ -0,0 +1,3 @@
+---
+- include: cli.yaml
+- include: netconf.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tasks/netconf.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tasks/netconf.yaml
new file mode 100644
index 00000000..e4754dcb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tasks/netconf.yaml
@@ -0,0 +1,26 @@
+---
+- name: collect all netconf test cases
+ find:
+ paths: '{{ role_path }}/tests/netconf'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.netconf)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.netconf'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - netconf
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - local
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/cli/basic.yaml
new file mode 100644
index 00000000..c075035c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/cli/basic.yaml
@@ -0,0 +1,296 @@
+---
+- debug: msg="START iosxr_interface cli/basic.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Setup interface
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Confgure interface
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ description: test-interface-initial
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface GigabitEthernet0/0/0/2 description test-interface-initial" in
+ result.commands'
+
+- name: Confgure interface (idempotent)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ description: test-interface-initial
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Confgure interface parameters
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ description: test-interface
+ speed: 100
+ duplex: half
+ mtu: 512
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface GigabitEthernet0/0/0/2 description test-interface" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 speed 100" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 duplex half" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 mtu 512" in result.commands'
+
+- name: Change interface parameters
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ description: test-interface-1
+ speed: 10
+ duplex: full
+ mtu: 256
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface GigabitEthernet0/0/0/2 description test-interface-1" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 speed 10" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 duplex full" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 mtu 256" in result.commands'
+
+- name: Change interface parameters (idempotent)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ description: test-interface-1
+ speed: 10
+ duplex: full
+ mtu: 256
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Disable interface
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ enabled: false
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface GigabitEthernet0/0/0/2 shutdown" in result.commands'
+
+- name: Enable interface
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/2
+ enabled: true
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no interface GigabitEthernet0/0/0/2 shutdown" in result.commands'
+
+- name: Confgure second interface (setup)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/3
+ description: test-interface-initial
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface GigabitEthernet0/0/0/3 description test-interface-initial" in
+ result.commands'
+
+- name: Delete interface aggregate (setup)
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/3
+
+ - name: GigabitEthernet0/0/0/2
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Add interface aggregate
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/3
+ mtu: 256
+ description: test-interface-1
+
+ - name: GigabitEthernet0/0/0/2
+ mtu: 516
+ description: test-interface-2
+ speed: 100
+ duplex: full
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface GigabitEthernet0/0/0/3 speed 100" in result.commands'
+ - '"interface GigabitEthernet0/0/0/3 description test-interface-1" in result.commands'
+ - '"interface GigabitEthernet0/0/0/3 duplex full" in result.commands'
+ - '"interface GigabitEthernet0/0/0/3 mtu 256" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 speed 100" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 description test-interface-2" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 duplex full" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 mtu 516" in result.commands'
+
+- name: Add interface aggregate (idempotent)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/3
+ mtu: 256
+ description: test-interface-1
+
+ - name: GigabitEthernet0/0/0/2
+ mtu: 516
+ description: test-interface-2
+ speed: 100
+ duplex: full
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Disable interface aggregate
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/3
+
+ - name: GigabitEthernet0/0/0/2
+ enabled: false
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface GigabitEthernet0/0/0/3 shutdown" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 shutdown" in result.commands'
+
+- name: Enable interface aggregate
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/3
+
+ - name: GigabitEthernet0/0/0/2
+ enabled: true
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no interface GigabitEthernet0/0/0/3 shutdown" in result.commands'
+ - '"no interface GigabitEthernet0/0/0/2 shutdown" in result.commands'
+
+- name: interface aggregate (setup)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/4
+
+ - name: GigabitEthernet0/0/0/5
+ description: test-interface-initial
+ provider: '{{ cli }}'
+
+- name: Create interface aggregate
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/4
+ description: test_interface_1
+
+ - name: GigabitEthernet0/0/0/5
+ description: test_interface_2
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface GigabitEthernet0/0/0/4 description test_interface_1" in result.commands'
+ - '"interface GigabitEthernet0/0/0/5 description test_interface_2" in result.commands'
+
+- name: Delete interface aggregate
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/2
+
+ - name: GigabitEthernet0/0/0/3
+
+ - name: GigabitEthernet0/0/0/4
+
+ - name: GigabitEthernet0/0/0/5
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no interface GigabitEthernet0/0/0/4" in result.commands'
+ - '"no interface GigabitEthernet0/0/0/5" in result.commands'
+
+- name: Delete interface aggregate (idempotent)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/2
+
+ - name: GigabitEthernet0/0/0/3
+
+ - name: GigabitEthernet0/0/0/4
+
+ - name: GigabitEthernet0/0/0/5
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END iosxr_interface cli/basic.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/cli/intent.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/cli/intent.yaml
new file mode 100644
index 00000000..0ec81ba1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/cli/intent.yaml
@@ -0,0 +1,80 @@
+---
+- debug: msg="START iosxr_interface cli/intent.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Setup (interface is up)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ description: test_interface_1
+ enabled: true
+ state: present
+ provider: '{{ cli }}'
+
+- name: Check intent arguments
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ state: up
+ delay: 20
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed == false
+
+- name: Check intent arguments (failed condition)
+ ignore_errors: true
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ state: down
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed == true
+ - "'state eq(down)' in result.failed_conditions"
+
+- name: Config + intent
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ enabled: false
+ state: down
+ delay: 20
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed == false
+
+- name: Config + intent (fail)
+ ignore_errors: true
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ enabled: false
+ state: up
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed == true
+ - "'state eq(up)' in result.failed_conditions"
+
+- name: Aggregate config + intent (pass)
+ ignore_errors: true
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/1
+ enabled: true
+ state: up
+ delay: 20
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.failed == false
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/cli/net_interface.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/cli/net_interface.yaml
new file mode 100644
index 00000000..7ac652cb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/cli/net_interface.yaml
@@ -0,0 +1,53 @@
+---
+- debug: msg="START iosxr cli/net_interface.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Setup interface
+ register: result
+ ansible.netcommon.net_interface:
+ name: GigabitEthernet0/0/0/2
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Confgure interface using platform agnostic module
+ register: result
+ ansible.netcommon.net_interface:
+ name: GigabitEthernet0/0/0/2
+ description: test-interface-initial
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface GigabitEthernet0/0/0/2 description test-interface-initial" in
+ result.commands'
+
+- name: Confgure interface parameters using platform agnostic module
+ register: result
+ ansible.netcommon.net_interface:
+ name: GigabitEthernet0/0/0/2
+ description: test-interface
+ speed: 100
+ duplex: half
+ mtu: 512
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface GigabitEthernet0/0/0/2 description test-interface" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 speed 100" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 duplex half" in result.commands'
+ - '"interface GigabitEthernet0/0/0/2 mtu 512" in result.commands'
+
+- name: Teardown interface
+ register: result
+ ansible.netcommon.net_interface:
+ name: GigabitEthernet0/0/0/2
+ state: absent
+ provider: '{{ cli }}'
+
+- debug: msg="END iosxr cli/net_interface.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/netconf/basic.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/netconf/basic.yaml
new file mode 100644
index 00000000..4731525d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/netconf/basic.yaml
@@ -0,0 +1,308 @@
+---
+- debug: msg="START iosxr_interface netconf/basic.yaml"
+
+- name: Setup interface
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/0
+
+ - name: GigabitEthernet0/0/0/1
+ state: absent
+ provider: '{{ netconf }}'
+
+- name: Confgure interface
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ description: test-interface-initial
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"GigabitEthernet0/0/0/1" in result.xml[0]'
+
+- name: Confgure interface (idempotent)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ description: test-interface-initial
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Confgure interface parameters
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ description: test-interface
+ speed: 100
+ duplex: half
+ mtu: 512
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"GigabitEthernet0/0/0/1" in result.xml[0]'
+ - '"test-interface" in result.xml[0]'
+ - '"100" in result.xml[0]'
+ - '"512" in result.xml[0]'
+
+- name: Change interface parameters
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ description: test-interface-1
+ speed: 10
+ duplex: full
+ mtu: 256
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"GigabitEthernet0/0/0/1" in result.xml[0]'
+ - '"test-interface-1" in result.xml[0]'
+ - '"10" in result.xml[0]'
+ - '"256" in result.xml[0]'
+
+- name: Change interface parameters (idempotent)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ description: test-interface-1
+ speed: 10
+ duplex: full
+ mtu: 256
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Disable interface
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ enabled: false
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Enable interface
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ enabled: true
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Confgure second interface (setup)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/0
+ description: test-interface-initial
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"GigabitEthernet0/0/0/0" in result.xml[0]'
+
+- name: Delete interface aggregate (setup)
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/0
+
+ - name: GigabitEthernet0/0/0/1
+ state: absent
+ provider: '{{ netconf }}'
+
+- name: Add interface aggregate
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/0
+ mtu: 256
+ description: test-interface-1
+
+ - name: GigabitEthernet0/0/0/1
+ mtu: 516
+ description: test-interface-2
+ speed: 100
+ duplex: full
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"GigabitEthernet0/0/0/1" in result.xml[0]'
+ - '"GigabitEthernet0/0/0/0" in result.xml[0]'
+
+- name: Add interface aggregate (idempotent)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/0
+ mtu: 256
+ description: test-interface-1
+
+ - name: GigabitEthernet0/0/0/1
+ mtu: 516
+ description: test-interface-2
+ speed: 100
+ duplex: full
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Disable interface aggregate
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/0
+
+ - name: GigabitEthernet0/0/0/1
+ enabled: false
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Disable interface aggregate (idempotent)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/0
+
+ - name: GigabitEthernet0/0/0/1
+ enabled: false
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Enable interface aggregate
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/0
+
+ - name: GigabitEthernet0/0/0/1
+ enabled: true
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Enable interface aggregate
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/0
+
+ - name: GigabitEthernet0/0/0/1
+ enabled: true
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: interface aggregate (setup)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/0
+
+ - name: GigabitEthernet0/0/0/1
+ description: test-interface-initial
+ provider: '{{ netconf }}'
+
+- name: Create interface aggregate
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/0
+ description: test_interface_1
+
+ - name: GigabitEthernet0/0/0/1
+ description: test_interface_2
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"GigabitEthernet0/0/0/0" in result.xml[0]'
+ - '"GigabitEthernet0/0/0/1" in result.xml[0]'
+ - '"test_interface_1" in result.xml[0]'
+ - '"test_interface_2" in result.xml[0]'
+
+- name: Delete interface aggregate
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/0
+
+ - name: GigabitEthernet0/0/0/1
+ state: absent
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Delete interface aggregate (idempotent)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/0
+
+ - name: GigabitEthernet0/0/0/1
+ state: absent
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END iosxr_interface netconf/basic.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/netconf/intent.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/netconf/intent.yaml
new file mode 100644
index 00000000..0a269cd1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/netconf/intent.yaml
@@ -0,0 +1,79 @@
+---
+- debug: msg="START iosxr_interface netconf/intent.yaml"
+
+- name: Setup (interface is up)
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ description: test_interface_1
+ enabled: true
+ state: present
+ provider: '{{ netconf }}'
+
+- name: Check intent arguments
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ state: up
+ delay: 10
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.failed == false
+
+- name: Check intent arguments (failed condition)
+ ignore_errors: true
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ state: down
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.failed == true
+ - "'state eq(down)' in result.failed_conditions"
+
+- name: Config + intent
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ enabled: false
+ state: down
+ delay: 10
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.failed == false
+
+- name: Config + intent (fail)
+ ignore_errors: true
+ register: result
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ enabled: false
+ state: up
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.failed == true
+ - "'state eq(up)' in result.failed_conditions"
+
+- name: Aggregate config + intent (pass)
+ ignore_errors: true
+ register: result
+ cisco.iosxr.iosxr_interface:
+ aggregate:
+
+ - name: GigabitEthernet0/0/0/1
+ enabled: true
+ state: up
+ delay: 10
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.failed == false
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/netconf/net_interface.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/netconf/net_interface.yaml
new file mode 100644
index 00000000..9257dac3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interface/tests/netconf/net_interface.yaml
@@ -0,0 +1,45 @@
+---
+- debug: msg="START iosxr netconf/net_interface.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Setup interface
+ register: result
+ ansible.netcommon.net_interface:
+ name: GigabitEthernet0/0/0/1
+ state: absent
+ provider: '{{ netconf }}'
+
+- name: Confgure interface using platform agnostic module
+ register: result
+ ansible.netcommon.net_interface:
+ name: GigabitEthernet0/0/0/1
+ description: test-interface-initial
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"GigabitEthernet0/0/0/1" in result.xml[0]'
+
+- name: Confgure interface parameters using platform agnostic module
+ register: result
+ ansible.netcommon.net_interface:
+ name: GigabitEthernet0/0/0/1
+ description: test-interface
+ speed: 100
+ duplex: half
+ mtu: 512
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"GigabitEthernet0/0/0/1" in result.xml[0]'
+ - '"test-interface" in result.xml[0]'
+ - '"100" in result.xml[0]'
+ - '"512" in result.xml[0]'
+
+- debug: msg="END iosxr netconf/net_interface.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..ae8935a1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,8 @@
+---
+- name: Populate Config
+ vars:
+ lines: "interface GigabitEthernet 0/0/0/0\ndescription this is interface0\n\
+ mtu 65\nspeed 10\nno shutdown\ninterface GigabitEthernet 0/0/0/1\ndescription\
+ \ this is interface1\nmtu 65\nspeed 10\nno shutdown\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..08046d69
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,18 @@
+---
+- name: Remove Config
+ vars:
+ lines: "interface loopback888\nno description\nno shutdown\ninterface loopback999\n\
+ no description\nno shutdown\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
+
+- name: Remove interfaces from config before actual testing
+ loop:
+ - GigabitEthernet 0/0/0/0
+ - GigabitEthernet 0/0/0/1
+ - GigabitEthernet 0/0/0/2
+ - GigabitEthernet 0/0/0/3
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no interface {{ item }}
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..94c2607e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,45 @@
+---
+- debug:
+ msg: Start Deleted integration state for iosxr_interfaces ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete attributes of all configured interfaces
+ register: result
+ cisco.iosxr.iosxr_interfaces: &id001
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Delete attributes of all configured interfaces (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..9eeffb56
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START iosxr_interfaces empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/fixtures/parsed.cfg
new file mode 100644
index 00000000..08619b40
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/fixtures/parsed.cfg
@@ -0,0 +1,19 @@
+interface Loopback888
+ description test for ansible
+ shutdown
+!
+interface MgmtEth0/0/CPU0/0
+ ipv4 address 10.8.38.70 255.255.255.0
+!
+interface GigabitEthernet0/0/0/0
+ description Configured and Merged by Ansible-Network
+ mtu 110
+ ipv4 address 172.31.1.1 255.255.255.0
+ duplex half
+!
+interface GigabitEthernet0/0/0/3
+ shutdown
+!
+interface GigabitEthernet0/0/0/4
+ shutdown
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..607041bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,42 @@
+---
+- debug:
+ msg: START iosxr_interfaces gathered integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.iosxr.iosxr_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ description: This interface is Configured and Merged by Ansible-Network
+ mtu: 110
+ enabled: true
+ duplex: half
+
+ - name: GigabitEthernet0/0/0/1
+ description: Configured and Merged by Ansible-Network
+ mtu: 2800
+ enabled: false
+ speed: 100
+ duplex: full
+ state: merged
+
+ - name: Gather interfaces facts using gathered state
+ register: result
+ cisco.iosxr.iosxr_interfaces:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: "{{ gathered['after'] | symmetric_difference(result['gathered']) |length\
+ \ == 0 }}"
+
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..10aa7090
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,59 @@
+---
+- debug:
+ msg: START Merged iosxr_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.iosxr.iosxr_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ description: Configured and Merged by Ansible-Network
+ mtu: 110
+ enabled: true
+ duplex: half
+
+ - name: GigabitEthernet0/0/0/1
+ description: Configured and Merged by Ansible-Network
+ mtu: 2800
+ enabled: false
+ speed: 100
+ duplex: full
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..8c44ce17
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,54 @@
+---
+- debug:
+ msg: START Overridden iosxr_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device configuration of all interfaces with provided configuration
+ register: result
+ cisco.iosxr.iosxr_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/1
+ description: Configured and Overridden by Ansible-Network
+ enabled: false
+ duplex: full
+ mtu: 2000
+ speed: 100
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ overridden['before'] | symmetric_difference(result['before']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Override device configuration of all interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..cffa8232
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START iosxr_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse externally provided interfaces config to agnostic model
+ register: result
+ cisco.iosxr.iosxr_interfaces:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - "{{ parsed['after'] | symmetric_difference(result['parsed']) |length ==\
+ \ 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..8a076f9b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,29 @@
+---
+- debug:
+ msg: START iosxr_interfaces rendered integration tests on connection={{
+ ansible_connection }}
+
+- name: Render platform specific commands from task input using rendered state
+ register: result
+ cisco.iosxr.iosxr_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ description: Configured and Merged by Ansible-Network
+ mtu: 110
+ enabled: true
+ duplex: half
+
+ - name: GigabitEthernet0/0/0/1
+ description: Configured and Merged by Ansible-Network
+ mtu: 2800
+ enabled: false
+ speed: 100
+ duplex: full
+ state: rendered
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ rendered['commands'] | symmetric_difference(result['rendered']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..ff0f9753
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,55 @@
+---
+- debug:
+ msg: START Replaced iosxr_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ register: result
+ cisco.iosxr.iosxr_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ description: Configured and Replaced by Ansible-Network
+ mtu: 110
+
+ - name: GigabitEthernet0/0/0/1
+ description: Configured and Replaced by Ansible-Network
+ speed: 100
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/vars/main.yaml
new file mode 100644
index 00000000..5f1088d6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_interfaces/vars/main.yaml
@@ -0,0 +1,196 @@
+---
+merged:
+ before:
+ - enabled: true
+ name: Loopback888
+ - enabled: true
+ name: Loopback999
+ - description: this is interface0
+ enabled: true
+ mtu: 65
+ name: GigabitEthernet0/0/0/0
+ speed: 10
+ - description: this is interface1
+ enabled: true
+ mtu: 65
+ name: GigabitEthernet0/0/0/1
+ speed: 10
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - description Configured and Merged by Ansible-Network
+ - mtu 110
+ - duplex half
+ - interface GigabitEthernet0/0/0/1
+ - description Configured and Merged by Ansible-Network
+ - mtu 2800
+ - speed 100
+ - duplex full
+ - shutdown
+ after:
+ - enabled: true
+ name: Loopback888
+ - enabled: true
+ name: Loopback999
+ - description: Configured and Merged by Ansible-Network
+ duplex: half
+ enabled: true
+ mtu: 110
+ name: GigabitEthernet0/0/0/0
+ speed: 10
+ - description: Configured and Merged by Ansible-Network
+ duplex: full
+ enabled: false
+ mtu: 2800
+ name: GigabitEthernet0/0/0/1
+ speed: 100
+parsed:
+ after:
+ - description: test for ansible
+ enabled: false
+ name: Loopback888
+ - description: Configured and Merged by Ansible-Network
+ duplex: half
+ enabled: true
+ mtu: 110
+ name: GigabitEthernet0/0/0/0
+ - enabled: false
+ name: GigabitEthernet0/0/0/3
+ - enabled: false
+ name: GigabitEthernet0/0/0/4
+replaced:
+ before:
+ - enabled: true
+ name: Loopback888
+ - enabled: true
+ name: Loopback999
+ - description: this is interface0
+ enabled: true
+ mtu: 65
+ name: GigabitEthernet0/0/0/0
+ speed: 10
+ - description: this is interface1
+ enabled: true
+ mtu: 65
+ name: GigabitEthernet0/0/0/1
+ speed: 10
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - no speed
+ - description Configured and Replaced by Ansible-Network
+ - mtu 110
+ - interface GigabitEthernet0/0/0/1
+ - no mtu
+ - description Configured and Replaced by Ansible-Network
+ - speed 100
+ after:
+ - enabled: true
+ name: Loopback888
+ - enabled: true
+ name: Loopback999
+ - description: Configured and Replaced by Ansible-Network
+ enabled: true
+ mtu: 110
+ name: GigabitEthernet0/0/0/0
+ - description: Configured and Replaced by Ansible-Network
+ enabled: true
+ name: GigabitEthernet0/0/0/1
+ speed: 100
+rendered:
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - description Configured and Merged by Ansible-Network
+ - mtu 110
+ - duplex half
+ - no shutdown
+ - interface GigabitEthernet0/0/0/1
+ - description Configured and Merged by Ansible-Network
+ - mtu 2800
+ - speed 100
+ - duplex full
+ - shutdown
+overridden:
+ before:
+ - enabled: true
+ name: Loopback888
+ - enabled: true
+ name: Loopback999
+ - description: this is interface0
+ enabled: true
+ mtu: 65
+ name: GigabitEthernet0/0/0/0
+ speed: 10
+ - description: this is interface1
+ enabled: true
+ mtu: 65
+ name: GigabitEthernet0/0/0/1
+ speed: 10
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - no description
+ - no speed
+ - no mtu
+ - interface GigabitEthernet0/0/0/1
+ - description Configured and Overridden by Ansible-Network
+ - mtu 2000
+ - duplex full
+ - speed 100
+ - shutdown
+ after:
+ - enabled: true
+ name: Loopback888
+ - enabled: true
+ name: Loopback999
+ - description: Configured and Overridden by Ansible-Network
+ duplex: full
+ enabled: false
+ mtu: 2000
+ name: GigabitEthernet0/0/0/1
+ speed: 100
+gathered:
+ after:
+ - enabled: true
+ name: Loopback888
+ - enabled: true
+ name: Loopback999
+ - description: This interface is Configured and Merged by Ansible-Network
+ duplex: half
+ enabled: true
+ mtu: 110
+ name: GigabitEthernet0/0/0/0
+ speed: 10
+ - description: Configured and Merged by Ansible-Network
+ duplex: full
+ enabled: false
+ mtu: 2800
+ name: GigabitEthernet0/0/0/1
+ speed: 100
+deleted:
+ before:
+ - enabled: true
+ name: Loopback888
+ - enabled: true
+ name: Loopback999
+ - description: this is interface0
+ enabled: true
+ mtu: 65
+ name: GigabitEthernet0/0/0/0
+ speed: 10
+ - description: this is interface1
+ enabled: true
+ mtu: 65
+ name: GigabitEthernet0/0/0/1
+ speed: 10
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - no description
+ - no speed
+ - no mtu
+ - interface GigabitEthernet0/0/0/1
+ - no description
+ - no speed
+ - no mtu
+ after:
+ - enabled: true
+ name: Loopback888
+ - enabled: true
+ name: Loopback999
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..0d451071
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,9 @@
+---
+- name: Populate Config
+ vars:
+ lines: "interface GigabitEthernet 0/0/0/1\ndot1q native vlan 10\nl2transport\
+ \ l2protocol cdp forward\nl2transport propagate remote-status\ninterface GigabitEthernet\
+ \ 0/0/0/4\ndot1q native vlan 20\nl2transport l2protocol vtp tunnel\ninterface\
+ \ GigabitEthernet 0/0/0/3.900\ndot1q vlan 40 60\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..ac4b7a65
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,8 @@
+---
+- name: Remove Config
+ vars:
+ lines: "interface GigabitEthernet 0/0/0/1\nno dot1q native vlan\nno l2transport\n\
+ no interface GigabitEthernet 0/0/0/2\nno interface GigabitEthernet 0/0/0/3\n\
+ no interface GigabitEthernet 0/0/0/3.900\nno interface GigabitEthernet 0/0/0/4\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..41d20e08
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,45 @@
+---
+- debug:
+ msg: Start Deleted integration state for ios_l2_interfaces ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete L2 interfaces attributes of all configured interfaces
+ register: result
+ cisco.iosxr.iosxr_l2_interfaces: &id001
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Delete L2 interfaces attributes of all configured interfaces (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_l2_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..23ce54bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START iosxr_l2_interfaces empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_l2_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/fixtures/parsed.cfg
new file mode 100644
index 00000000..129742c7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/fixtures/parsed.cfg
@@ -0,0 +1,31 @@
+interface Loopback888
+ description test for ansible
+ shutdown
+!
+interface MgmtEth0/0/CPU0/0
+ ipv4 address 10.8.38.70 255.255.255.0
+!
+interface GigabitEthernet0/0/0/0
+ description Configured and Merged by Ansible-Network
+ mtu 110
+ ipv4 address 172.31.1.1 255.255.255.0
+ duplex half
+!
+interface GigabitEthernet0/0/0/1
+ dot1q native vlan 10
+ l2transport
+ l2protocol cdp forward
+ l2protocol pvst tunnel
+ propagate remote-status
+ !
+!
+interface GigabitEthernet0/0/0/3
+ shutdown
+!
+interface GigabitEthernet0/0/0/3.900
+ encapsulation dot1q 20 second-dot1q 40
+!
+interface GigabitEthernet0/0/0/4
+ shutdown
+ dot1q native vlan 40
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..974ca3d2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,45 @@
+---
+- debug:
+ msg: START iosxr_l2_interfaces gathered integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the existing running configuration
+ register: result
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/1
+ native_vlan: 10
+ l2transport: true
+ l2protocol:
+
+ - pvst: tunnel
+
+ - cdp: forward
+ propagate: true
+
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - 40
+
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ state: merged
+
+ - name: Gather l2 interfaces facts using gathered state
+ register: result
+ cisco.iosxr.iosxr_l2_interfaces:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: "{{ merged['after'] | symmetric_difference(result['gathered']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..89765611
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START Merged ios_l2_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge provided L2 configuration with device configuration
+ register: result
+ cisco.iosxr.iosxr_l2_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/1
+ native_vlan: 10
+ l2transport: true
+ l2protocol:
+
+ - pvst: tunnel
+
+ - cdp: forward
+ propagate: true
+
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - 40
+
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge provided L2 configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_l2_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..46529a50
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,59 @@
+---
+- debug:
+ msg: START Overridden ios_l2_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device L2 configuration of all interfaces with provided configuration
+ register: result
+ cisco.iosxr.iosxr_l2_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ l2transport: true
+ l2protocol:
+
+ - stp: forward
+
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - 40
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ overridden['before'] | symmetric_difference(result['before']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Override device L2 configuration of all interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_l2_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..3c66ac27
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START iosxr_l2_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse externally provided L2 interfaces config to agnostic model
+ register: result
+ cisco.iosxr.iosxr_l2_interfaces:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - "{{ parsed['after'] | symmetric_difference(result['parsed']) |length ==\
+ \ 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..57f0cb61
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,34 @@
+---
+- debug:
+ msg: START iosxr_l2_interfaces rendered integration tests on connection={{
+ ansible_connection }}
+
+- name: Render platform specific commands from task input using rendered state
+ register: result
+ cisco.iosxr.iosxr_l2_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/1
+ native_vlan: 10
+ l2transport: true
+ l2protocol:
+
+ - pvst: tunnel
+
+ - cdp: forward
+ propagate: true
+
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - 40
+
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+ state: rendered
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['rendered']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..fcc40107
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,55 @@
+---
+- debug:
+ msg: START Replaced ios_l2_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device L2 configuration of listed interfaces with provided
+ configuration
+ register: result
+ cisco.iosxr.iosxr_l2_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/1
+ native_vlan: 40
+ l2transport: true
+ l2protocol:
+
+ - vtp: tunnel
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Replaces device L2 configuration of listed interfaces with provided
+ configuration (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_l2_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/vars/main.yaml
new file mode 100644
index 00000000..481495f3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l2_interfaces/vars/main.yaml
@@ -0,0 +1,147 @@
+---
+merged:
+ before: []
+ commands:
+ - interface GigabitEthernet0/0/0/1
+ - dot1q native vlan 10
+ - l2transport l2protocol pvst tunnel
+ - l2transport l2protocol cdp forward
+ - l2transport propagate remote-status
+ - interface GigabitEthernet0/0/0/3.900
+ - dot1q vlan 20 40
+ - interface GigabitEthernet0/0/0/4
+ - dot1q native vlan 40
+ after:
+ - l2protocol:
+ - cdp: forward
+ - pvst: tunnel
+ l2transport: true
+ name: GigabitEthernet0/0/0/1
+ native_vlan: 10
+ propagate: true
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - 40
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+replaced:
+ before:
+ - l2protocol:
+ - cdp: forward
+ l2transport: true
+ name: GigabitEthernet0/0/0/1
+ native_vlan: 10
+ propagate: true
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 40
+ - 60
+ - l2protocol:
+ - vtp: tunnel
+ l2transport: true
+ name: GigabitEthernet0/0/0/4
+ native_vlan: 20
+ commands:
+ - interface GigabitEthernet0/0/0/1
+ - no l2transport
+ - dot1q native vlan 40
+ - l2transport l2protocol vtp tunnel
+ after:
+ - l2protocol:
+ - vtp: tunnel
+ l2transport: true
+ name: GigabitEthernet0/0/0/1
+ native_vlan: 40
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 40
+ - 60
+ - l2protocol:
+ - vtp: tunnel
+ l2transport: true
+ name: GigabitEthernet0/0/0/4
+ native_vlan: 20
+overridden:
+ before:
+ - l2protocol:
+ - cdp: forward
+ l2transport: true
+ name: GigabitEthernet0/0/0/1
+ native_vlan: 10
+ propagate: true
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 40
+ - 60
+ - l2protocol:
+ - vtp: tunnel
+ l2transport: true
+ name: GigabitEthernet0/0/0/4
+ native_vlan: 20
+ commands:
+ - interface GigabitEthernet0/0/0/1
+ - no dot1q native vlan
+ - no l2transport
+ - interface GigabitEthernet0/0/0/3.900
+ - dot1q vlan 20 40
+ - interface GigabitEthernet0/0/0/4
+ - no l2transport
+ - dot1q native vlan 40
+ - l2transport l2protocol stp forward
+ after:
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - 40
+ - l2protocol:
+ - stp: forward
+ l2transport: true
+ name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+parsed:
+ after:
+ - name: GigabitEthernet0/0/0/0
+ - l2protocol:
+ - cdp: forward
+ - pvst: tunnel
+ native_vlan: 10
+ l2transport: true
+ name: GigabitEthernet0/0/0/1
+ propagate: true
+ - name: GigabitEthernet0/0/0/3
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 20
+ - 40
+ - name: GigabitEthernet0/0/0/4
+ native_vlan: 40
+deleted:
+ before:
+ - l2protocol:
+ - cdp: forward
+ l2transport: true
+ name: GigabitEthernet0/0/0/1
+ native_vlan: 10
+ propagate: true
+ - name: GigabitEthernet0/0/0/3.900
+ q_vlan:
+ - 40
+ - 60
+ - l2protocol:
+ - vtp: tunnel
+ l2transport: true
+ name: GigabitEthernet0/0/0/4
+ native_vlan: 20
+ commands:
+ - interface GigabitEthernet0/0/0/1
+ - no dot1q native vlan
+ - no l2transport
+ - interface GigabitEthernet0/0/0/3.900
+ - no encapsulation dot1q
+ - interface GigabitEthernet0/0/0/4
+ - no dot1q native vlan
+ - no l2transport
+ after:
+ - name: GigabitEthernet0/0/0/4
+ - name: GigabitEthernet0/0/0/3.900
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/meta/main.yaml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/meta/main.yaml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..1dad55ad
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,8 @@
+---
+- name: Populate Config
+ vars:
+ lines: "interface GigabitEthernet 0/0/0/0\nipv4 address 198.51.100.1 255.255.255.0\n\
+ ipv6 address 2001:db8::/32\ninterface GigabitEthernet 0/0/0/1\nipv4 address\
+ \ 192.0.2.1 255.255.255.0\nipv4 address 192.0.2.2 255.255.255.0 secondary\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..d99f4db7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,7 @@
+---
+- name: Remove Config
+ vars:
+ lines: "interface GigabitEthernet 0/0/0/0\nno ipv4 address\nno ipv6 address\n\
+ interface GigabitEthernet 0/0/0/1\nno ipv4 address\nno ipv6 address\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..777596cd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,50 @@
+---
+- debug:
+ msg: Start Deleted integration state for iosxr_l3_interfaces ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete attributes of all configured interfaces
+ register: result
+ cisco.iosxr.iosxr_l3_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+
+ - name: GigabitEthernet0/0/0/1
+ state: deleted
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ deleted['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Delete attributes of all configured interfaces (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_l3_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..1ae1f2d8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START iosxr_l3_interfaces empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_l3_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/fixtures/parsed.cfg
new file mode 100644
index 00000000..d4fac24a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/fixtures/parsed.cfg
@@ -0,0 +1,31 @@
+interface Loopback888
+ description test for ansible
+ shutdown
+!
+interface MgmtEth0/0/CPU0/0
+ ipv4 address 10.8.38.70 255.255.255.0
+!
+interface GigabitEthernet0/0/0/0
+ description Configured and Merged by Ansible-Network
+ mtu 66
+ ipv4 address 192.0.2.1 255.255.255.0
+ ipv4 address 192.0.2.2 255.255.255.0 secondary
+ ipv6 address 2001:db8:0:3::/64
+ duplex half
+!
+interface GigabitEthernet0/0/0/1
+ description Configured and Merged by Ansible-Network
+ mtu 66
+ speed 100
+ duplex full
+ dot1q native vlan 10
+ l2transport
+ l2protocol cdp forward
+ l2protocol pvst tunnel
+ propagate remote-status
+ !
+!
+interface GigabitEthernet0/0/0/3
+ ipv4 address 192.0.22.1 255.255.255.0
+ ipv4 address 192.0.23.1 255.255.255.0
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..11284fb5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,43 @@
+---
+- debug:
+ msg: START iosxr_l3_interfaces gathered integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the existing running configuration
+ register: result
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ ipv4:
+
+ - address: 198.51.100.1/24
+
+ - name: GigabitEthernet0/0/0/1
+ ipv6:
+
+ - address: 2001:db8:0:3::/64
+ ipv4:
+
+ - address: 192.0.2.1/24
+
+ - address: 192.0.2.2/24
+ secondary: true
+ state: merged
+
+ - name: Gather L3 interfaces facts using gathered state
+ register: result
+ cisco.iosxr.iosxr_l3_interfaces:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: "{{ merged['after'] | symmetric_difference(result['gathered']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..593acf32
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START Merged iosxr_l3_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge provided configuration with device configuration
+ register: result
+ cisco.iosxr.iosxr_l3_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ ipv4:
+
+ - address: 198.51.100.1/24
+
+ - name: GigabitEthernet0/0/0/1
+ ipv6:
+
+ - address: 2001:db8:0:3::/64
+ ipv4:
+
+ - address: 192.0.2.1/24
+
+ - address: 192.0.2.2/24
+ secondary: true
+ state: merged
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |\
+ \ length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge provided configuration with device configuration (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_l3_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..38dd93e3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,55 @@
+---
+- debug:
+ msg: START Overridden iosxr_l3_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Override device configuration of all interfaces with provided configuration
+ register: result
+ cisco.iosxr.iosxr_l3_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/1
+ ipv4:
+
+ - address: 198.51.102.1/24
+ ipv6:
+
+ - address: 2001:db8:1::/64
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ overridden['before'] | symmetric_difference(result['before']) |\
+ \ length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Override device configuration of all interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_l3_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..9a4776b6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START iosxr_l3_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse externally provided L3 interfaces config to agnostic model
+ register: result
+ cisco.iosxr.iosxr_l3_interfaces:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - "{{ parsed['after'] | symmetric_difference(result['parsed']) |length ==\
+ \ 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..03a330f5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,32 @@
+---
+- debug:
+ msg: START iosxr_l3_interfaces rendered integration tests on connection={{
+ ansible_connection }}
+
+- name: Render platform specific commands from task input using rendered state
+ register: result
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ ipv4:
+
+ - address: 198.51.100.1/24
+
+ - name: GigabitEthernet0/0/0/1
+ ipv6:
+
+ - address: 2001:db8:0:3::/64
+ ipv4:
+
+ - address: 192.0.2.1/24
+
+ - address: 192.0.2.2/24
+ secondary: true
+ state: rendered
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ rendered['commands'] | symmetric_difference(result['rendered']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..f14e68a0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,55 @@
+---
+- debug:
+ msg: START Replaced iosxr_l3_interfaces state for integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ register: result
+ cisco.iosxr.iosxr_l3_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ ipv4:
+
+ - address: 203.0.113.27/24
+
+ - address: 203.0.114.1/24
+ secondary: true
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ | length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_l3_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..eea8ba23
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,47 @@
+---
+- debug:
+ msg: START iosxr_l3_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Round Trip test by applying the provided configuration (base config)
+ register: base_config
+ cisco.iosxr.iosxr_l3_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ ipv4:
+
+ - address: 198.51.100.1/24
+
+ - name: GigabitEthernet0/0/0/1
+ ipv6:
+
+ - address: 2001:db8:0:3::/64
+ ipv4:
+
+ - address: 192.0.2.1/24
+
+ - secondary: true
+ address: 192.0.2.2/24
+ state: merged
+
+ - name: Gather interfaces facts
+ register: l3facts_config
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - default
+ gather_network_resources:
+ - l3_interfaces
+
+ - name: Apply config from l3_interfaces facts generated (IDEMPOTENT)
+ cisco.iosxr.iosxr_l3_interfaces:
+ config: "{{ l3facts_config['ansible_facts']['ansible_network_resources']['l3_interfaces']\
+ \ }}"
+ state: merged
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/vars/main.yaml
new file mode 100644
index 00000000..c144276d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_l3_interfaces/vars/main.yaml
@@ -0,0 +1,133 @@
+---
+merged:
+ before:
+ - name: Loopback888
+ - name: Loopback999
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - ipv4 address 198.51.100.1 255.255.255.0
+ - interface GigabitEthernet0/0/0/1
+ - ipv4 address 192.0.2.2 255.255.255.0 secondary
+ - ipv4 address 192.0.2.1 255.255.255.0
+ - ipv6 address 2001:db8:0:3::/64
+ after:
+ - name: Loopback888
+ - name: Loopback999
+ - ipv4:
+ - address: 198.51.100.1 255.255.255.0
+ name: GigabitEthernet0/0/0/0
+ - ipv4:
+ - address: 192.0.2.1 255.255.255.0
+ - address: 192.0.2.2 255.255.255.0
+ secondary: true
+ ipv6:
+ - address: 2001:db8:0:3::/64
+ name: GigabitEthernet0/0/0/1
+replaced:
+ before:
+ - name: Loopback888
+ - name: Loopback999
+ - ipv4:
+ - address: 198.51.100.1 255.255.255.0
+ ipv6:
+ - address: 2001:db8::/32
+ name: GigabitEthernet0/0/0/0
+ - ipv4:
+ - address: 192.0.2.1 255.255.255.0
+ - address: 192.0.2.2 255.255.255.0
+ secondary: true
+ name: GigabitEthernet0/0/0/1
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - no ipv6 address
+ - ipv4 address 203.0.113.27 255.255.255.0
+ - ipv4 address 203.0.114.1 255.255.255.0 secondary
+ after:
+ - name: Loopback888
+ - name: Loopback999
+ - ipv4:
+ - address: 203.0.113.27 255.255.255.0
+ - address: 203.0.114.1 255.255.255.0
+ secondary: true
+ name: GigabitEthernet0/0/0/0
+ - ipv4:
+ - address: 192.0.2.1 255.255.255.0
+ - address: 192.0.2.2 255.255.255.0
+ secondary: true
+ name: GigabitEthernet0/0/0/1
+overridden:
+ before:
+ - name: Loopback888
+ - name: Loopback999
+ - ipv4:
+ - address: 198.51.100.1 255.255.255.0
+ ipv6:
+ - address: 2001:db8::/32
+ name: GigabitEthernet0/0/0/0
+ - ipv4:
+ - address: 192.0.2.1 255.255.255.0
+ - address: 192.0.2.2 255.255.255.0
+ secondary: true
+ name: GigabitEthernet0/0/0/1
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - no ipv4 address
+ - no ipv6 address
+ - interface GigabitEthernet0/0/0/1
+ - no ipv4 address
+ - ipv4 address 198.51.102.1 255.255.255.0
+ - ipv6 address 2001:db8:1::/64
+ after:
+ - name: Loopback888
+ - name: Loopback999
+ - ipv4:
+ - address: 198.51.102.1 255.255.255.0
+ ipv6:
+ - address: 2001:db8:1::/64
+ name: GigabitEthernet0/0/0/1
+rendered:
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - ipv4 address 198.51.100.1 255.255.255.0
+ - interface GigabitEthernet0/0/0/1
+ - ipv4 address 192.0.2.2 255.255.255.0 secondary
+ - ipv4 address 192.0.2.1 255.255.255.0
+ - ipv6 address 2001:db8:0:3::/64
+parsed:
+ after:
+ - name: Loopback888
+ - ipv6:
+ - address: 2001:db8:0:3::/64
+ ipv4:
+ - address: 192.0.2.1 255.255.255.0
+ - address: 192.0.2.2 255.255.255.0
+ secondary: true
+ name: GigabitEthernet0/0/0/0
+ - name: GigabitEthernet0/0/0/1
+ - ipv4:
+ - address: 192.0.22.1 255.255.255.0
+ - address: 192.0.23.1 255.255.255.0
+ name: GigabitEthernet0/0/0/3
+deleted:
+ before:
+ - name: Loopback888
+ - name: Loopback999
+ - ipv4:
+ - address: 198.51.100.1 255.255.255.0
+ ipv6:
+ - address: 2001:db8::/32
+ name: GigabitEthernet0/0/0/0
+ - ipv4:
+ - address: 192.0.2.1 255.255.255.0
+ - address: 192.0.2.2 255.255.255.0
+ secondary: true
+ name: GigabitEthernet0/0/0/1
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - no ipv4 address
+ - no ipv6 address
+ - interface GigabitEthernet0/0/0/1
+ - no ipv4 address
+ after:
+ - name: Loopback888
+ - name: Loopback999
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/_populate.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/_populate.yaml
new file mode 100644
index 00000000..f93c2307
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/_populate.yaml
@@ -0,0 +1,6 @@
+---
+- name: Setup
+ vars:
+ lines: "lacp system priority 12\nlacp system mac 00c1.4c00.bd16\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..a8234e82
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/_remove_config.yaml
@@ -0,0 +1,6 @@
+---
+- name: Remove Config
+ vars:
+ lines: "no lacp system priority\nno lacp system mac\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/deleted.yaml
new file mode 100644
index 00000000..f8824124
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/deleted.yaml
@@ -0,0 +1,48 @@
+---
+- debug:
+ msg: Start iosxr_lacp deleted integration tests ansible_connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Delete LACP attributes
+ register: result
+ cisco.iosxr.iosxr_lacp: &id001
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ populate == result['before'] }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] == result['after'] }}"
+
+ - name: Delete attributes of given interfaces (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lacp: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] == result['before'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..66504e22
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/empty_config.yaml
@@ -0,0 +1,49 @@
+---
+- debug:
+ msg: START iosxr_lacp empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lacp:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lacp:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lacp:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lacp:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/fixtures/parsed.cfg
new file mode 100644
index 00000000..5b16c0e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/fixtures/parsed.cfg
@@ -0,0 +1,2 @@
+lacp system mac 00c1.4c00.bd15
+lacp system priority 11
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/gathered.yaml
new file mode 100644
index 00000000..2d952cf2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/gathered.yaml
@@ -0,0 +1,30 @@
+---
+- debug:
+ msg: START iosxr_lacp gathered integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the existing running configuration
+ register: result
+ cisco.iosxr.iosxr_lacp:
+ config:
+ system:
+ priority: 11
+ mac:
+ address: 00c1.4c00.bd15
+ state: merged
+
+ - name: Gather LACP facts using gathered state
+ register: result
+ cisco.iosxr.iosxr_lacp:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: "{{ merged['after'] == result['gathered'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/merged.yaml
new file mode 100644
index 00000000..33859d9f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/merged.yaml
@@ -0,0 +1,51 @@
+---
+- debug:
+ msg: START iosxr_lacp merged integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_lacp: &id001
+ config:
+ system:
+ priority: 11
+ mac:
+ address: 00c1.4c00.bd15
+ state: merged
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['before'] == result['before'] }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts was correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] == result['after'] }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lacp: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] == result['before']}}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/parsed.yaml
new file mode 100644
index 00000000..5e530a2e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/parsed.yaml
@@ -0,0 +1,15 @@
+---
+- debug:
+ msg: START iosxr_lacp parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse externally provided LACP config to agnostic model
+ register: result
+ cisco.iosxr.iosxr_lacp:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - "{{ parsed['after'] == result['parsed'] }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/rendered.yaml
new file mode 100644
index 00000000..ce760898
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/rendered.yaml
@@ -0,0 +1,20 @@
+---
+- debug:
+ msg: START iosxr_lacp rendered integration tests on connection={{
+ ansible_connection }}
+
+- name: Render platform specific commands from task input using rendered state
+ register: result
+ cisco.iosxr.iosxr_lacp:
+ config:
+ system:
+ priority: 11
+ mac:
+ address: 00c1.4c00.bd15
+ state: rendered
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ rendered['commands'] | symmetric_difference(result['rendered']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/replaced.yaml
new file mode 100644
index 00000000..6076b5cd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/replaced.yaml
@@ -0,0 +1,52 @@
+---
+- debug:
+ msg: START iosxr_lacp replaced integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Replace LACP configuration with provided configurations
+ register: result
+ cisco.iosxr.iosxr_lacp: &id001
+ config:
+ system:
+ priority: 11
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ populate == result['before'] }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] == result['after'] }}"
+
+ - name: Replace device configurations of listed interfaces with provided configurarions
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lacp: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] == result['before'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/rtt.yaml
new file mode 100644
index 00000000..88e1de92
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/tests/cli/rtt.yaml
@@ -0,0 +1,53 @@
+---
+- debug:
+ msg: START isoxr_lacp round trip integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.iosxr.iosxr_lacp:
+ config:
+ system:
+ priority: 15
+ mac:
+ address: 00c1.4c00.bd16
+ state: merged
+
+ - name: Gather interfaces facts
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - lacp
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.iosxr.iosxr_lacp:
+ config:
+ system:
+ priority: 10
+ mac:
+ address: 00c1.4c00.bd10
+ state: merged
+
+ - name: Assert that changes were applied
+ assert:
+ that: "{{ round_trip['after'] == result['after'] }}"
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.iosxr.iosxr_lacp:
+ config: "{{ ansible_facts['network_resources']['lacp'] }}"
+ state: replaced
+
+ - name: Assert that config was reverted
+ assert:
+ that: "{{ base_config['after'] == revert['after'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/vars/main.yaml
new file mode 100644
index 00000000..dc7a5246
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp/vars/main.yaml
@@ -0,0 +1,44 @@
+---
+merged:
+ before: {}
+ commands:
+ - lacp system priority 11
+ - lacp system mac 00c1.4c00.bd15
+ after:
+ system:
+ priority: 11
+ mac:
+ address: 00c1.4c00.bd15
+populate:
+ system:
+ priority: 12
+ mac:
+ address: 00c1.4c00.bd16
+replaced:
+ commands:
+ - no lacp system mac
+ - lacp system priority 11
+ after:
+ system:
+ priority: 11
+rendered:
+ commands:
+ - lacp system priority 11
+ - lacp system mac 00c1.4c00.bd15
+parsed:
+ after:
+ system:
+ priority: 11
+ mac:
+ address: 00c1.4c00.bd15
+deleted:
+ commands:
+ - no lacp system priority
+ - no lacp system mac
+ after: {}
+round_trip:
+ after:
+ system:
+ priority: 10
+ mac:
+ address: 00c1.4c00.bd10
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/_populate.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/_populate.yaml
new file mode 100644
index 00000000..86d3e64e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/_populate.yaml
@@ -0,0 +1,26 @@
+---
+- name: Setup Bundle-Ether10
+ cisco.iosxr.iosxr_config:
+ lines:
+ - lacp churn logging actor
+ - lacp switchover suppress-flaps 500
+ - lacp collector-max-delay 100
+ parents: interface Bundle-Ether10
+
+- name: Setup Bundle-Ether11
+ cisco.iosxr.iosxr_config:
+ lines:
+ - lacp system mac 00c2.4c00.bd15
+ parents: interface Bundle-Ether11
+
+- name: Setup GigE0
+ cisco.iosxr.iosxr_config:
+ lines:
+ - lacp period 100
+ parents: interface GigabitEthernet0/0/0/0
+
+- name: Setup GigE1
+ cisco.iosxr.iosxr_config:
+ lines:
+ - lacp period 200
+ parents: interface GigabitEthernet0/0/0/1
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..8d3c4fcb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,28 @@
+---
+- name: Remove Bundles
+ vars:
+ lines: "no interface Bundle-Ether10\nno interface Bundle-Ether11\nno interface\
+ \ Bundle-Ether12\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
+
+- name: Remove LACP interface config
+ loop:
+ - 0/0/0/0
+ - 0/0/0/1
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no lacp period
+ - shutdown
+ parents: interface GigabitEthernet{{ item }}
+
+- name: Remove unwanted interfaces from config
+ loop:
+ - 0/0/0/2
+ - 0/0/0/3
+ - 0/0/0/4
+ - 0/0/0/5
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no interface GigabitEthernet{{ item }}
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..cb3daa43
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,51 @@
+---
+- debug:
+ msg: Start iosxr_lacp_interfaces deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Delete LACP attributes of all interfaces
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces: &id001
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Delete LACP attributes of all interfaces (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..166f5943
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START iosxr_lacp_interfaces empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lacp_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/fixtures/parsed.cfg
new file mode 100644
index 00000000..0595831e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/fixtures/parsed.cfg
@@ -0,0 +1,14 @@
+interface Bundle-Ether10
+ lacp churn logging actor
+ lacp switchover suppress-flaps 500
+ lacp collector-max-delay 100
+!
+interface Bundle-Ether11
+ lacp system mac 00c2.4c00.bd15
+!
+interface MgmtEth0/0/CPU0/0
+ ipv4 address 192.0.2.11 255.255.255.0
+!
+interface GigabitEthernet0/0/0/1
+ lacp period 200
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..adc671e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,39 @@
+---
+- debug:
+ msg: START iosxr_lacp_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+
+ - name: Bundle-Ether10
+ churn_logging: actor
+ collector_max_delay: 100
+ switchover_suppress_flaps: 500
+
+ - name: Bundle-Ether11
+ system:
+ mac: 00c2.4c00.bd15
+
+ - name: GigabitEthernet0/0/0/1
+ period: 100
+ state: merged
+
+ - name: Gather interfaces facts using gathered state
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: "{{ merged['after'] | symmetric_difference(result['gathered']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..5642722c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,63 @@
+---
+- debug:
+ msg: START iosxr_lacp_interfaces merged integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces: &id001
+ config:
+
+ - name: Bundle-Ether10
+ churn_logging: actor
+ collector_max_delay: 100
+ switchover_suppress_flaps: 500
+
+ - name: Bundle-Ether11
+ system:
+ mac: 00c2.4c00.bd15
+
+ - name: GigabitEthernet0/0/0/1
+ period: 100
+ state: merged
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['before'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts was correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..b83726ed
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,61 @@
+---
+- debug:
+ msg: START iosxr_lacp_interfaces overridden integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Overridde all interface LACP configuration with provided configuration
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces: &id001
+ config:
+
+ - name: Bundle-Ether12
+ churn_logging: both
+ collector_max_delay: 100
+ switchover_suppress_flaps: 500
+
+ - name: GigabitEthernet0/0/0/1
+ period: 300
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Overridde all interface LACP configuration with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..10f6c447
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,15 @@
+---
+- debug:
+ msg: START iosxr_lacp_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse externally provided LACP config to agnostic model
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - "{{ parsed['after'] == result['parsed'] }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..7f259f30
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,27 @@
+---
+- debug:
+ msg: START iosxr_lacp_interfaces rendered integration tests on connection={{
+ ansible_connection }}
+
+- name: Render platform specific commands from task input using rendered state
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+ - name: Bundle-Ether10
+ churn_logging: actor
+ collector_max_delay: 100
+ switchover_suppress_flaps: 500
+
+ - name: Bundle-Ether11
+ system:
+ mac: 00c2.4c00.bd15
+
+ - name: GigabitEthernet0/0/0/1
+ period: 200
+ state: rendered
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ rendered['commands'] | symmetric_difference(result['rendered']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..d0f25d10
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,59 @@
+---
+- debug:
+ msg: START iosxr_lacp_interfaces replaced integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Replace device configurations of listed interfaces with provided configurations
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces: &id001
+ config:
+
+ - name: Bundle-Ether10
+ churn_logging: partner
+
+ - name: GigabitEthernet0/0/0/1
+ period: 300
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Replace device configurations of listed interfaces with provided configurarions
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..41315301
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,66 @@
+---
+- debug:
+ msg: START isoxr_lacp_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- block:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+
+ - name: Bundle-Ether10
+ churn_logging: actor
+ collector_max_delay: 200
+
+ - name: Bundle-Ether11
+ period: 100
+
+ - name: GigabitEthernet0/0/0/0
+ period: 200
+ state: merged
+
+ - name: Gather interfaces facts
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - lacp_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config:
+
+ - name: Bundle-Ether10
+ churn_logging: partner
+
+ - name: Bundle-Ether11
+ period: 200
+
+ - name: GigabitEthernet0/0/0/0
+ period: 300
+ state: overridden
+
+ - name: Assert that changes were applied
+ assert:
+ that: "{{ round_trip['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.iosxr.iosxr_lacp_interfaces:
+ config: "{{ ansible_facts['network_resources']['lacp_interfaces'] }}"
+ state: overridden
+
+ - name: Assert that config was reverted
+ assert:
+ that: "{{ base_config['after'] | symmetric_difference(revert['after']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/vars/main.yaml
new file mode 100644
index 00000000..1f1f5cf9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lacp_interfaces/vars/main.yaml
@@ -0,0 +1,130 @@
+---
+merged:
+ before:
+ - name: GigabitEthernet0/0/0/0
+ - name: GigabitEthernet0/0/0/1
+ commands:
+ - interface Bundle-Ether10
+ - lacp churn logging actor
+ - lacp switchover suppress-flaps 500
+ - lacp collector-max-delay 100
+ - interface Bundle-Ether11
+ - lacp system mac 00c2.4c00.bd15
+ - interface GigabitEthernet0/0/0/1
+ - lacp period 100
+ after:
+ - name: Bundle-Ether10
+ churn_logging: actor
+ switchover_suppress_flaps: 500
+ collector_max_delay: 100
+ - name: Bundle-Ether11
+ system:
+ mac: 00c2.4c00.bd15
+ - name: GigabitEthernet0/0/0/0
+ - name: GigabitEthernet0/0/0/1
+ period: 100
+populate:
+ - name: Bundle-Ether10
+ churn_logging: actor
+ switchover_suppress_flaps: 500
+ collector_max_delay: 100
+ - name: Bundle-Ether11
+ system:
+ mac: 00c2.4c00.bd15
+ - name: GigabitEthernet0/0/0/0
+ period: 100
+ - name: GigabitEthernet0/0/0/1
+ period: 200
+replaced:
+ commands:
+ - interface Bundle-Ether10
+ - no lacp switchover suppress-flaps 500
+ - no lacp collector-max-delay 100
+ - lacp churn logging partner
+ - interface GigabitEthernet0/0/0/1
+ - lacp period 300
+ after:
+ - name: Bundle-Ether10
+ churn_logging: partner
+ - name: Bundle-Ether11
+ system:
+ mac: 00c2.4c00.bd15
+ - name: GigabitEthernet0/0/0/0
+ period: 100
+ - name: GigabitEthernet0/0/0/1
+ period: 300
+overridden:
+ commands:
+ - interface Bundle-Ether10
+ - no lacp switchover suppress-flaps 500
+ - no lacp collector-max-delay 100
+ - no lacp churn logging actor
+ - interface Bundle-Ether11
+ - no lacp system mac 00c2.4c00.bd15
+ - interface GigabitEthernet0/0/0/0
+ - no lacp period 100
+ - interface Bundle-Ether12
+ - lacp churn logging both
+ - lacp collector-max-delay 100
+ - lacp switchover suppress-flaps 500
+ - interface GigabitEthernet0/0/0/1
+ - lacp period 300
+ after:
+ - name: Bundle-Ether10
+ - name: Bundle-Ether11
+ - name: Bundle-Ether12
+ churn_logging: both
+ collector_max_delay: 100
+ switchover_suppress_flaps: 500
+ - name: GigabitEthernet0/0/0/0
+ - name: GigabitEthernet0/0/0/1
+ period: 300
+deleted:
+ commands:
+ - interface Bundle-Ether10
+ - no lacp switchover suppress-flaps 500
+ - no lacp collector-max-delay 100
+ - no lacp churn logging actor
+ - interface Bundle-Ether11
+ - no lacp system mac 00c2.4c00.bd15
+ - interface GigabitEthernet0/0/0/0
+ - no lacp period 100
+ - interface GigabitEthernet0/0/0/1
+ - no lacp period 200
+ after:
+ - name: Bundle-Ether10
+ - name: Bundle-Ether11
+ - name: GigabitEthernet0/0/0/0
+ - name: GigabitEthernet0/0/0/1
+round_trip:
+ after:
+ - name: Bundle-Ether10
+ churn_logging: partner
+ - name: Bundle-Ether11
+ period: 200
+ - name: GigabitEthernet0/0/0/0
+ period: 300
+ - name: GigabitEthernet0/0/0/1
+parsed:
+ after:
+ - name: Bundle-Ether10
+ churn_logging: actor
+ collector_max_delay: 100
+ switchover_suppress_flaps: 500
+
+ - name: Bundle-Ether11
+ system:
+ mac: 00c2.4c00.bd15
+
+ - name: GigabitEthernet0/0/0/1
+ period: 200
+rendered:
+ commands:
+ - "interface Bundle-Ether10"
+ - "lacp churn logging actor"
+ - "lacp switchover suppress-flaps 500"
+ - "lacp collector-max-delay 100"
+ - "interface Bundle-Ether11"
+ - "lacp system mac 00c2.4c00.bd15"
+ - "interface GigabitEthernet0/0/0/1"
+ - "lacp period 200"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..37982f9a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,29 @@
+---
+- name: Setup
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+
+ - name: Bundle-Ether10
+ mode: active
+ members:
+
+ - member: GigabitEthernet0/0/0/0
+ mode: inherit
+
+ - member: GigabitEthernet0/0/0/1
+ mode: passive
+ load_balancing_hash: src-ip
+ links:
+ max_active: 10
+ min_active: 2
+
+ - name: Bundle-Ether11
+ load_balancing_hash: dst-ip
+ members:
+
+ - member: GigabitEthernet0/0/0/8
+ mode: passive
+
+ - member: GigabitEthernet0/0/0/9
+ mode: passive
+ state: merged
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..e9566f34
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,32 @@
+---
+- name: Remove Bundles
+ vars:
+ lines: "no interface Bundle-Ether10\nno interface Bundle-Ether11\nno interface\
+ \ Bundle-Ether12\n"
+ ignore_errors: true
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
+
+- name: Remove LAG interface config
+ loop:
+ - 0/0/0/0
+ - 0/0/0/1
+ - 0/0/0/2
+ - 0/0/0/8
+ - 0/0/0/9
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no bundle id
+ - shutdown
+ parents: interface GigabitEthernet{{ item }}
+
+- name: Remove unwanted interfaces from config
+ loop:
+ - 0/0/0/2
+ - 0/0/0/8
+ - 0/0/0/9
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no interface GigabitEthernet{{ item }}
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..6aed8ce5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,52 @@
+---
+- debug:
+ msg: Start iosxr_lag_interfaces deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete LAG interfaces configuration
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces: &id001
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Delete LACP attributes of all interfaces (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..5992de5b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START iosxr_lag_interfaces empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lag_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/fixtures/parsed.cfg
new file mode 100644
index 00000000..a67b7f9a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/fixtures/parsed.cfg
@@ -0,0 +1,33 @@
+interface Bundle-Ether10
+ lacp mode active
+ bundle load-balancing hash src-ip
+ bundle maximum-active links 5
+ bundle minimum-active links 2
+!
+interface Bundle-Ether12
+ bundle load-balancing hash dst-ip
+!
+interface Loopback888
+ description test for ansible
+ shutdown
+!
+interface MgmtEth0/0/CPU0/0
+ ipv4 address 192.0.2.11 255.255.255.0
+!
+interface GigabitEthernet0/0/0/1
+ description 'GigabitEthernet - 1"
+ bundle id 10 mode inherit
+!
+interface GigabitEthernet0/0/0/2
+ description "GigabitEthernet - 2"
+ bundle id 12 mode passive
+!
+interface GigabitEthernet0/0/0/3
+ description "GigabitEthernet - 3"
+ bundle id 10 mode inherit
+!
+interface GigabitEthernet0/0/0/4
+ description "GigabitEthernet - 4"
+ bundle id 12 mode passive
+!
+
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..50c13507
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,49 @@
+---
+- debug:
+ msg: START iosxr_lag_interfaces gathered integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Gather the provided configuration with the existing running configuration
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ - name: Bundle-Ether10
+ mode: active
+ members:
+
+ - member: GigabitEthernet0/0/0/0
+ mode: inherit
+
+ - member: GigabitEthernet0/0/0/1
+ mode: passive
+ load_balancing_hash: src-ip
+ links:
+ max_active: 10
+ min_active: 2
+
+ - name: Bundle-Ether11
+ load_balancing_hash: dst-ip
+ members:
+
+ - member: GigabitEthernet0/0/0/8
+ mode: passive
+
+ - member: GigabitEthernet0/0/0/9
+ mode: passive
+ state: merged
+
+ - name: Gather LACP facts using gathered state
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: "{{ merged['after'] == result['gathered'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..73aee044
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,75 @@
+---
+- debug:
+ msg: START iosxr_lag_interfaces merged integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces: &id001
+ config:
+
+ - name: Bundle-Ether10
+ mode: active
+ members:
+
+ - member: GigabitEthernet0/0/0/0
+ mode: inherit
+
+ - member: GigabitEthernet0/0/0/1
+ mode: passive
+ load_balancing_hash: src-ip
+ links:
+ max_active: 10
+ min_active: 2
+
+ - name: Bundle-Ether11
+ load_balancing_hash: dst-ip
+ members:
+
+ - member: GigabitEthernet0/0/0/8
+ mode: passive
+
+ - member: GigabitEthernet0/0/0/9
+ mode: passive
+ state: merged
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['before'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts was correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..0c6ac8c3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,68 @@
+---
+- debug:
+ msg: START iosxr_lag_interfaces overridden integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Overridde all LAG interface configuration with provided configuration
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces: &id001
+ config:
+
+ - name: Bundle-Ether11
+ mode: active
+ members:
+
+ - member: GigabitEthernet0/0/0/0
+ mode: active
+
+ - member: GigabitEthernet0/0/0/1
+ mode: active
+ load_balancing_hash: src-ip
+ links:
+ max_active: 10
+ min_active: 5
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Overridde all interface LAG interface configuration with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..310c4d79
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,15 @@
+---
+- debug:
+ msg: START iosxr_lag_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse externally provided lag interfaces config to agnostic model
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - "{{ parsed['after'] == result['parsed'] }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..cec9e7db
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,34 @@
+---
+- debug:
+ msg: START iosxr_lag_interfaces rendered integration tests on connection={{
+ ansible_connection }}
+
+- name: Render platform specific commands from task input using rendered state
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+ - name: Bundle-Ether10
+ members:
+ - member: GigabitEthernet0/0/0/1
+ mode: inherit
+ - member: GigabitEthernet0/0/0/3
+ mode: inherit
+ mode: active
+ links:
+ max_active: 5
+ min_active: 2
+ load_balancing_hash: src-ip
+
+ - name: Bundle-Ether12
+ members:
+ - member: GigabitEthernet0/0/0/2
+ mode: passive
+ - member: GigabitEthernet0/0/0/4
+ mode: passive
+ load_balancing_hash: dst-ip
+ state: rendered
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - rendered['commands'].sort() == result['rendered'].sort()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..2f8ad1e7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,65 @@
+---
+- debug:
+ msg: START iosxr_lag_interfaces replaced integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replace device configurations of listed interfaces with provided configurations
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces: &id001
+ config:
+
+ - name: Bundle-Ether10
+ mode: passive
+ members:
+
+ - member: GigabitEthernet0/0/0/0
+ mode: passive
+ load_balancing_hash: dst-ip
+
+ - name: Bundle-Ether12
+ mode: active
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Replace device configurations of listed interfaces with provided configurarions
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..0be9e147
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,71 @@
+---
+- debug:
+ msg: START isoxr_lag_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- block:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+
+ - name: Bundle-Ether10
+ members:
+
+ - member: GigabitEthernet0/0/0/1
+ mode: passive
+ links:
+ max_active: 10
+ min_active: 2
+
+ - name: Bundle-Ether11
+ mode: passive
+ state: merged
+
+ - name: Gather interfaces facts
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - lag_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.iosxr.iosxr_lag_interfaces:
+ config:
+
+ - name: Bundle-Ether10
+ members:
+
+ - member: GigabitEthernet0/0/0/9
+ mode: active
+
+ - member: GigabitEthernet0/0/0/8
+ mode: passive
+
+ - name: Bundle-Ether11
+ mode: active
+ state: overridden
+
+ - name: Assert that changes were applied
+ assert:
+ that: "{{ round_trip['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.iosxr.iosxr_lag_interfaces:
+ config: "{{ ansible_facts['network_resources']['lag_interfaces'] }}"
+ state: overridden
+
+ - name: Assert that config was reverted
+ assert:
+ that: "{{ base_config['after'] | symmetric_difference(revert['after']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/vars/main.yaml
new file mode 100644
index 00000000..5f4c7722
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lag_interfaces/vars/main.yaml
@@ -0,0 +1,181 @@
+---
+merged:
+ before: []
+ commands:
+ - interface Bundle-Ether10
+ - bundle load-balancing hash src-ip
+ - bundle minimum-active links 2
+ - bundle maximum-active links 10
+ - lacp mode active
+ - interface GigabitEthernet0/0/0/1
+ - bundle id 10 mode passive
+ - interface GigabitEthernet0/0/0/0
+ - bundle id 10 mode inherit
+ - interface Bundle-Ether11
+ - bundle load-balancing hash dst-ip
+ - interface GigabitEthernet0/0/0/8
+ - bundle id 11 mode passive
+ - interface GigabitEthernet0/0/0/9
+ - bundle id 11 mode passive
+ after:
+ - name: Bundle-Ether10
+ links:
+ max_active: 10
+ min_active: 2
+ load_balancing_hash: src-ip
+ members:
+ - member: GigabitEthernet0/0/0/0
+ mode: inherit
+ - member: GigabitEthernet0/0/0/1
+ mode: passive
+ mode: active
+ - name: Bundle-Ether11
+ load_balancing_hash: dst-ip
+ members:
+ - member: GigabitEthernet0/0/0/8
+ mode: passive
+ - member: GigabitEthernet0/0/0/9
+ mode: passive
+replaced:
+ commands:
+ - interface Bundle-Ether10
+ - no bundle maximum-active links 10
+ - no bundle minimum-active links 2
+ - bundle load-balancing hash dst-ip
+ - lacp mode passive
+ - interface GigabitEthernet0/0/0/1
+ - no bundle id
+ - interface GigabitEthernet0/0/0/0
+ - bundle id 10 mode passive
+ - interface Bundle-Ether12
+ - lacp mode active
+ after:
+ - load_balancing_hash: dst-ip
+ members:
+ - member: GigabitEthernet0/0/0/0
+ mode: passive
+ mode: passive
+ name: Bundle-Ether10
+ - load_balancing_hash: dst-ip
+ members:
+ - member: GigabitEthernet0/0/0/8
+ mode: passive
+ - member: GigabitEthernet0/0/0/9
+ mode: passive
+ name: Bundle-Ether11
+ - mode: active
+ name: Bundle-Ether12
+overridden:
+ commands:
+ - interface Bundle-Ether10
+ - no bundle maximum-active links 10
+ - no bundle minimum-active links 2
+ - no bundle load-balancing hash src-ip
+ - no lacp mode active
+ - interface GigabitEthernet0/0/0/0
+ - no bundle id
+ - interface GigabitEthernet0/0/0/1
+ - no bundle id
+ - interface Bundle-Ether11
+ - bundle load-balancing hash src-ip
+ - bundle minimum-active links 5
+ - bundle maximum-active links 10
+ - lacp mode active
+ - interface GigabitEthernet0/0/0/8
+ - no bundle id
+ - interface GigabitEthernet0/0/0/9
+ - no bundle id
+ - interface GigabitEthernet0/0/0/0
+ - bundle id 11 mode active
+ - interface GigabitEthernet0/0/0/1
+ - bundle id 11 mode active
+ after:
+ - name: Bundle-Ether10
+ - links:
+ max_active: 10
+ min_active: 5
+ load_balancing_hash: src-ip
+ members:
+ - member: GigabitEthernet0/0/0/0
+ mode: active
+ - member: GigabitEthernet0/0/0/1
+ mode: active
+ mode: active
+ name: Bundle-Ether11
+deleted:
+ commands:
+ - interface Bundle-Ether10
+ - no bundle maximum-active links 10
+ - no bundle minimum-active links 2
+ - no bundle load-balancing hash src-ip
+ - no lacp mode active
+ - interface GigabitEthernet0/0/0/0
+ - no bundle id
+ - interface GigabitEthernet0/0/0/1
+ - no bundle id
+ - interface Bundle-Ether11
+ - no bundle load-balancing hash dst-ip
+ - interface GigabitEthernet0/0/0/8
+ - no bundle id
+ - interface GigabitEthernet0/0/0/9
+ - no bundle id
+ after:
+ - name: Bundle-Ether10
+ - name: Bundle-Ether11
+round_trip:
+ after:
+ - members:
+ - member: GigabitEthernet0/0/0/8
+ mode: passive
+ - member: GigabitEthernet0/0/0/9
+ mode: active
+ name: Bundle-Ether10
+ - mode: active
+ name: Bundle-Ether11
+rendered:
+ commands:
+ - "interface Bundle-Ether10"
+ - "lacp mode active"
+ - "bundle load-balancing hash src-ip"
+ - "bundle maximum-active links 5"
+ - "bundle minimum-active links 2"
+ - "interface Bundle-Ether12"
+ - "bundle load-balancing hash dst-ip"
+ - "interface Loopback888"
+ - "description test for ansible"
+ - "shutdown"
+ - "interface MgmtEth0/0/CPU0/0"
+ - "ipv4 address 192.0.2.11 255.255.255.0"
+ - "interface GigabitEthernet0/0/0/1"
+ - "description 'GigabitEthernet - 1'"
+ - "bundle id 10 mode inherit"
+ - "interface GigabitEthernet0/0/0/2"
+ - "description 'GigabitEthernet - 2'"
+ - "bundle id 12 mode passive"
+ - "interface GigabitEthernet0/0/0/3"
+ - "description 'GigabitEthernet - 3'"
+ - "bundle id 10 mode inherit"
+ - "interface GigabitEthernet0/0/0/4"
+ - "description 'GigabitEthernet - 4'"
+ - "bundle id 12 mode passive"
+parsed:
+ after:
+ - name: Bundle-Ether10
+ members:
+ - member: GigabitEthernet0/0/0/1
+ mode: inherit
+ - member: GigabitEthernet0/0/0/3
+ mode: inherit
+ mode: active
+ links:
+ max_active: 5
+ min_active: 2
+ load_balancing_hash: src-ip
+
+ - name: Bundle-Ether12
+ members:
+ - member: GigabitEthernet0/0/0/2
+ mode: passive
+ - member: GigabitEthernet0/0/0/4
+ mode: passive
+ load_balancing_hash: dst-ip
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/_populate.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/_populate.yaml
new file mode 100644
index 00000000..3f44e711
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/_populate.yaml
@@ -0,0 +1,8 @@
+---
+- name: Setup
+ vars:
+ lines: "lldp reinit 2\nlldp holdtime 100\nlldp timer 3000\nlldp subinterfaces\
+ \ enable\nlldp tlv-select system-description disable\nlldp tlv-select management-address\
+ \ disable\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..34140d91
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/_remove_config.yaml
@@ -0,0 +1,6 @@
+---
+- name: Remove Config
+ vars:
+ lines: "no lldp\n"
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/deleted.yaml
new file mode 100644
index 00000000..5a53c74b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/deleted.yaml
@@ -0,0 +1,48 @@
+---
+- debug:
+ msg: Start iosxr_lldp_global deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Delete global LLDP attributes
+ register: result
+ cisco.iosxr.iosxr_lldp_global: &id001
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] == result['before'] }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] == result['after'] }}"
+
+ - name: Delete attributes of given interfaces (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lldp_global: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] == result['before'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..8043e582
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/empty_config.yaml
@@ -0,0 +1,49 @@
+---
+- debug:
+ msg: START iosxr_lldp_global empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lldp_global:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/fixtures/parsed.cfg
new file mode 100644
index 00000000..9e05883e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/fixtures/parsed.cfg
@@ -0,0 +1,11 @@
+lldp
+ timer 3000
+ reinit 2
+ subinterfaces enable
+ holdtime 100
+ tlv-select
+ management-address disable
+ system-description disable
+ !
+!
+
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/gathered.yaml
new file mode 100644
index 00000000..5c02e7e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/gathered.yaml
@@ -0,0 +1,34 @@
+---
+- debug:
+ msg: START iosxr_lldp_global gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ holdtime: 100
+ reinit: 2
+ timer: 3000
+ subinterfaces: true
+ tlv_select:
+ management_address: false
+ system_description: false
+ state: merged
+
+ - name: Gather interfaces facts using gathered state
+ register: result
+ cisco.iosxr.iosxr_lldp_global:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: merged['after'] == result['gathered']
+
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/merged.yaml
new file mode 100644
index 00000000..37effc81
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/merged.yaml
@@ -0,0 +1,54 @@
+---
+- debug:
+ msg: START iosxr_lldp_global merged integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_lldp_global: &id001
+ config:
+ holdtime: 100
+ reinit: 2
+ timer: 3000
+ subinterfaces: true
+ tlv_select:
+ management_address: false
+ system_description: false
+ state: merged
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['before'] == result['before'] }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts was correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] == result['after'] }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lldp_global: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] == result['before']}}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/parsed.yaml
new file mode 100644
index 00000000..c2e76075
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/parsed.yaml
@@ -0,0 +1,15 @@
+---
+- debug:
+ msg: START iosxr_lldp_global parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse externally provided LACP config to agnostic model
+ register: result
+ cisco.iosxr.iosxr_lldp_global:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - "{{ parsed['after'] == result['parsed'] }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/rendered.yaml
new file mode 100644
index 00000000..0eff0cdc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/rendered.yaml
@@ -0,0 +1,23 @@
+---
+- debug:
+ msg: START iosxr_lldp_global rendered integration tests on connection={{ ansible_connection
+ }}
+
+- name: Render platform specific commands from task input using rendered stateion
+ register: result
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ holdtime: 100
+ reinit: 2
+ timer: 3000
+ subinterfaces: true
+ tlv_select:
+ management_address: false
+ system_description: false
+ state: rendered
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ rendered['commands'] | symmetric_difference(result['rendered']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/replaced.yaml
new file mode 100644
index 00000000..8ef44209
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/replaced.yaml
@@ -0,0 +1,55 @@
+---
+- debug:
+ msg: START iosxr_lldp_global replaced integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Replace global LLDP configuration with provided configurations
+ register: result
+ cisco.iosxr.iosxr_lldp_global: &id001
+ config:
+ holdtime: 100
+ tlv_select:
+ port_description: false
+ system_description: false
+ management_address: false
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] == result['before'] }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] == result['after'] }}"
+
+ - name: Replace device global LLDP configurations with provided configurarions
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lldp_global: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] == result['before'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/rtt.yaml
new file mode 100644
index 00000000..e8e99f54
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/tests/cli/rtt.yaml
@@ -0,0 +1,51 @@
+---
+- debug:
+ msg: START isoxr_lldp_global round trip integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ holdtime: 200
+ timer: 500
+ state: merged
+
+ - name: Gather interfaces facts
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - lldp_global
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.iosxr.iosxr_lldp_global:
+ config:
+ holdtime: 200
+ reinit: 4
+ subinterfaces: true
+ timer: 3000
+ state: merged
+
+ - name: Assert that changes were applied
+ assert:
+ that: "{{ round_trip['after'] == result['after'] }}"
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.iosxr.iosxr_lldp_global:
+ config: "{{ ansible_facts['network_resources']['lldp_global'] }}"
+ state: replaced
+
+ - name: Assert that config was reverted
+ assert:
+ that: "{{ base_config['after'] == revert['after'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/vars/main.yaml
new file mode 100644
index 00000000..8d6f0928
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_global/vars/main.yaml
@@ -0,0 +1,63 @@
+---
+merged:
+ before: {}
+ commands:
+ - lldp reinit 2
+ - lldp holdtime 100
+ - lldp timer 3000
+ - lldp subinterfaces enable
+ - lldp tlv-select system-description disable
+ - lldp tlv-select management-address disable
+ after:
+ holdtime: 100
+ reinit: 2
+ subinterfaces: true
+ timer: 3000
+ tlv_select:
+ management_address: false
+ system_description: false
+replaced:
+ commands:
+ - no lldp reinit 2
+ - no lldp subinterfaces enable
+ - no lldp timer 3000
+ - lldp tlv-select port-description disable
+ after:
+ holdtime: 100
+ tlv_select:
+ management_address: false
+ port_description: false
+ system_description: false
+deleted:
+ commands:
+ - no lldp holdtime 100
+ - no lldp reinit 2
+ - no lldp subinterfaces enable
+ - no lldp timer 3000
+ - no lldp tlv-select management-address disable
+ - no lldp tlv-select system-description disable
+ after: {}
+round_trip:
+ after:
+ holdtime: 200
+ reinit: 4
+ subinterfaces: true
+ timer: 3000
+
+parsed:
+ after:
+ holdtime: 100
+ reinit: 2
+ timer: 3000
+ subinterfaces: true
+ tlv_select:
+ management_address: false
+ system_description: false
+rendered:
+ commands:
+ - "lldp subinterfaces enable"
+ - "lldp holdtime 100"
+ - "lldp reinit 2"
+ - "lldp tlv-select system-description disable"
+ - "lldp tlv-select management-address disable"
+ - "lldp timer 3000"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/_populate.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/_populate.yaml
new file mode 100644
index 00000000..e499c1bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/_populate.yaml
@@ -0,0 +1,12 @@
+---
+- name: Setup GigE1
+ cisco.iosxr.iosxr_config:
+ lines:
+ - lldp receive disable
+ parents: interface GigabitEthernet0/0/0/1
+
+- name: Setup GigE0
+ cisco.iosxr.iosxr_config:
+ lines:
+ - lldp transmit disable
+ parents: interface GigabitEthernet0/0/0/0
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..004cdb88
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,22 @@
+---
+- name: Remove LLDP interface config
+ loop:
+ - 0/0/0/0
+ - 0/0/0/1
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no lldp
+ - shutdown
+ parents: interface GigabitEthernet{{ item }}
+
+- name: Remove unwanted interfaces from config
+ loop:
+ - 0/0/0/2
+ - 0/0/0/3
+ - 0/0/0/4
+ - 0/0/0/5
+ ignore_errors: true
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no interface GigabitEthernet{{ item }}
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..933e188a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,51 @@
+---
+- debug:
+ msg: Start iosxr_lldp_interfaces deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Delete LLDP attributes of all interfaces
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces: &id001
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Delete LACP attributes of all interfaces (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..e7fb55b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START iosxr_lldp_interfaces empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_lldp_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/fixtures/parsed.cfg
new file mode 100644
index 00000000..8fbe03d5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/fixtures/parsed.cfg
@@ -0,0 +1,16 @@
+interface TenGigE0/0/0/0
+ ipv4 address 192.0.2.11 255.255.255.192
+!
+interface preconfigure GigabitEthernet0/0/0/1
+ lldp
+ receive disable
+ destination mac-address
+ ieee-nearest-bridge
+ !
+ !
+!
+interface preconfigure GigabitEthernet0/0/0/2
+ lldp
+ transmit disable
+ destination mac-address
+ ieee-nearest-non-tmpr-bridge
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..da2c148e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,33 @@
+---
+- debug:
+ msg: START iosxr_lldp_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ transmit: false
+
+ - name: GigabitEthernet0/0/0/1
+ receive: false
+ state: merged
+
+ - name: Gather interfaces facts using gathered state
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: "{{ merged['after'] | symmetric_difference(result['gathered']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..28713969
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,57 @@
+---
+- debug:
+ msg: START iosxr_lldp_interfaces merged integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ transmit: false
+
+ - name: GigabitEthernet0/0/0/1
+ receive: false
+ state: merged
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['before'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts was correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..8cfb3a5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,56 @@
+---
+- debug:
+ msg: START iosxr_lldp_interfaces overridden integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Overridde all interface LLDP configuration with provided configuration
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ transmit: false
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Overridde all interface LACP configuration with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..277a2778
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START iosxr_lldp_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- name: Parse externally provided Lldp interfaces config to agnostic model
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ parsed['config'] | symmetric_difference(result['parsed']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..c8a2c7de
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,27 @@
+---
+- debug:
+ msg: START iosxr_lldp_interfaces rendered integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ destination:
+ mac_address: ieee-nearest-non-tmpr-bridge
+ transmit: false
+
+ - name: GigabitEthernet0/0/0/2
+ destination:
+ mac_address: ieee-nearest-bridge
+ receive: false
+ state: rendered
+
+ - name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ rendered['commands'] | symmetric_difference(result['rendered']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..005d14d9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,56 @@
+---
+- debug:
+ msg: START iosxr_lldp_interfaces replaced integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate.yaml
+
+- block:
+
+ - name: Replace device configurations of listed interfaces with provided configurations
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces: &id001
+ config:
+
+ - name: GigabitEthernet0/0/0/1
+ transmit: false
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Replace device configurations of listed interfaces with provided configurarions
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..10a31cc4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,56 @@
+---
+- debug:
+ msg: START iosxr_lldp_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- block:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ transmit: false
+ state: merged
+
+ - name: Gather interfaces facts
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - lldp_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config:
+
+ - name: GigabitEthernet0/0/0/0
+ receive: false
+
+ - name: GigabitEthernet0/0/0/1
+ transmit: false
+ state: overridden
+
+ - name: Assert that changes were applied
+ assert:
+ that: "{{ round_trip['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.iosxr.iosxr_lldp_interfaces:
+ config: "{{ ansible_facts['network_resources']['lldp_interfaces'] }}"
+ state: overridden
+
+ - name: Assert that config was reverted
+ assert:
+ that: "{{ base_config['after'] | symmetric_difference(revert['after']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/vars/main.yaml
new file mode 100644
index 00000000..403548b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_lldp_interfaces/vars/main.yaml
@@ -0,0 +1,73 @@
+---
+merged:
+ before:
+ - name: GigabitEthernet0/0/0/0
+ - name: GigabitEthernet0/0/0/1
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - lldp transmit disable
+ - interface GigabitEthernet0/0/0/1
+ - lldp receive disable
+ after:
+ - name: GigabitEthernet0/0/0/0
+ transmit: false
+ - name: GigabitEthernet0/0/0/1
+ receive: false
+populate:
+ - name: GigabitEthernet0/0/0/0
+ transmit: false
+ - name: GigabitEthernet0/0/0/1
+ receive: false
+replaced:
+ commands:
+ - interface GigabitEthernet0/0/0/1
+ - no lldp receive disable
+ - lldp transmit disable
+ after:
+ - name: GigabitEthernet0/0/0/0
+ transmit: false
+ - name: GigabitEthernet0/0/0/1
+ transmit: false
+overridden:
+ commands:
+ - interface GigabitEthernet0/0/0/1
+ - no lldp receive disable
+ after:
+ - name: GigabitEthernet0/0/0/0
+ transmit: false
+ - name: GigabitEthernet0/0/0/1
+deleted:
+ commands:
+ - interface GigabitEthernet0/0/0/0
+ - no lldp transmit disable
+ - interface GigabitEthernet0/0/0/1
+ - no lldp receive disable
+ after:
+ - name: GigabitEthernet0/0/0/0
+ - name: GigabitEthernet0/0/0/1
+round_trip:
+ after:
+ - name: GigabitEthernet0/0/0/0
+ receive: false
+ - name: GigabitEthernet0/0/0/1
+ transmit: false
+parsed:
+ config:
+ - name: TenGigE0/0/0/0
+ - name: GigabitEthernet0/0/0/2
+ destination:
+ mac_address: ieee-nearest-non-tmpr-bridge
+ transmit: false
+
+ - name: GigabitEthernet0/0/0/1
+ destination:
+ mac_address: ieee-nearest-bridge
+ receive: false
+rendered:
+ commands:
+ - "interface GigabitEthernet0/0/0/2"
+ - "lldp destination mac-address ieee-nearest-non-tmpr-bridge"
+ - "lldp transmit disable"
+ - "interface GigabitEthernet0/0/0/1"
+ - "lldp receive disable"
+ - "lldp destination mac-address ieee-nearest-bridge"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/meta/main.yaml
new file mode 100644
index 00000000..be631e5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_iosxr_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tasks/cli.yaml
new file mode 100644
index 00000000..3358b7af
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tasks/cli.yaml
@@ -0,0 +1,21 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - network_cli
+
+- name: reset connection
+ meta: reset_connection
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tasks/main.yaml
new file mode 100644
index 00000000..5d082a6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tasks/main.yaml
@@ -0,0 +1,3 @@
+---
+- include: cli.yaml
+- include: netconf.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tasks/netconf.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tasks/netconf.yaml
new file mode 100644
index 00000000..cdbe47e3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tasks/netconf.yaml
@@ -0,0 +1,29 @@
+---
+- name: collect all netconf test cases
+ find:
+ paths: '{{ role_path }}/tests/netconf'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.netconf)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.netconf'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - netconf
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - local
+
+- name: reset connection
+ meta: reset_connection
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tests/cli/basic.yaml
new file mode 100644
index 00000000..2467557e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tests/cli/basic.yaml
@@ -0,0 +1,161 @@
+---
+- name: remove host logging
+ cisco.iosxr.iosxr_logging:
+ dest: host
+ name: 172.16.0.1
+ state: absent
+ provider: '{{ cli }}'
+
+- name: remove console logging
+ register: result
+ cisco.iosxr.iosxr_logging:
+ dest: console
+ state: absent
+ provider: '{{ cli }}'
+
+- name: remove buffered logging
+ register: result
+ cisco.iosxr.iosxr_logging:
+ dest: buffered
+ size: 2097155
+ state: absent
+ provider: '{{ cli }}'
+
+- name: set up syslog host logging
+ register: result
+ cisco.iosxr.iosxr_logging: &id001
+ dest: host
+ name: 172.16.0.1
+ level: errors
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging 172.16.0.1 vrf default severity error" in result.commands'
+
+- name: set up syslog host logging (idempotent)
+ register: result
+ cisco.iosxr.iosxr_logging: *id001
+
+- assert: &id003
+ that:
+ - result.changed == false
+
+- name: delete/disable syslog host logging
+ register: result
+ cisco.iosxr.iosxr_logging: &id002
+ dest: host
+ name: 172.16.0.1
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no logging 172.16.0.1 vrf default" in result.commands'
+
+- name: delete/disable syslog host logging (idempotent)
+ register: result
+ cisco.iosxr.iosxr_logging: *id002
+
+- assert: *id003
+
+- name: add console logging with level warning
+ register: result
+ cisco.iosxr.iosxr_logging: &id004
+ dest: console
+ level: warning
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging console warning" in result.commands'
+
+- name: console logging with level warning (idempotent)
+ register: result
+ cisco.iosxr.iosxr_logging: *id004
+
+- assert: *id003
+
+- name: remove console logging with level warning
+ register: result
+ cisco.iosxr.iosxr_logging:
+ dest: console
+ level: warning
+ state: absent
+ provider: '{{ cli }}'
+
+- assert: &id006
+ that:
+ - result.changed == true
+
+- name: configure buffered logging size
+ register: result
+ cisco.iosxr.iosxr_logging: &id005
+ dest: buffered
+ size: 4800000
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging buffered 4800000" in result.commands'
+
+- name: configure buffered logging size (idempotence)
+ register: result
+ cisco.iosxr.iosxr_logging: *id005
+
+- assert: *id003
+
+- name: remove buffered logging size
+ register: result
+ cisco.iosxr.iosxr_logging:
+ dest: buffered
+ size: 4800000
+ state: absent
+ provider: '{{ cli }}'
+
+- assert: *id006
+
+- name: change logging parameters using aggregate
+ register: result
+ cisco.iosxr.iosxr_logging:
+ aggregate:
+
+ - dest: console
+ level: notifications
+
+ - dest: buffered
+ size: 4700000
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging buffered 4700000" in result.commands'
+ - '"logging console notifications" in result.commands'
+
+- name: remove logging parameters using aggregate
+ register: result
+ cisco.iosxr.iosxr_logging:
+ aggregate:
+
+ - dest: console
+ level: notifications
+
+ - dest: buffered
+ size: 4700000
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no logging console" in result.commands'
+ - '"no logging buffered" in result.commands'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tests/cli/net_logging.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tests/cli/net_logging.yaml
new file mode 100644
index 00000000..94d057b4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tests/cli/net_logging.yaml
@@ -0,0 +1,33 @@
+---
+- debug: msg="START iosxr cli/net_logging.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Remove host logging - setup
+ ansible.netcommon.net_logging:
+ dest: host
+ name: 172.16.0.1
+ state: absent
+ provider: '{{ cli }}'
+
+- name: Set up host logging using platform agnostic module
+ register: result
+ ansible.netcommon.net_logging:
+ dest: host
+ name: 172.16.0.1
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging 172.16.0.1 vrf default severity debugging" in result.commands'
+
+- name: Remove host logging - teardown
+ ansible.netcommon.net_logging:
+ dest: host
+ name: 172.16.0.1
+ state: absent
+ provider: '{{ cli }}'
+
+- debug: msg="END iosxr cli/net_logging.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tests/netconf/basic.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tests/netconf/basic.yaml
new file mode 100644
index 00000000..57bc6de9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_logging/tests/netconf/basic.yaml
@@ -0,0 +1,227 @@
+---
+- name: remove host logging
+ cisco.iosxr.iosxr_logging:
+ dest: host
+ name: 172.16.0.1
+ state: absent
+ provider: '{{ netconf }}'
+
+- name: remove console logging
+ register: result
+ cisco.iosxr.iosxr_logging:
+ dest: console
+ level: warning
+ state: absent
+ provider: '{{ netconf }}'
+
+- name: remove buffered logging
+ register: result
+ cisco.iosxr.iosxr_logging:
+ dest: buffered
+ size: 2097155
+ state: absent
+ provider: '{{ netconf }}'
+
+- name: set up syslog host logging
+ register: result
+ cisco.iosxr.iosxr_logging: &id001
+ dest: host
+ name: 172.16.0.1
+ level: errors
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"172.16.0.1" in result.xml[0]'
+
+- name: set up syslog host logging (idempotent)
+ register: result
+ cisco.iosxr.iosxr_logging: *id001
+
+- assert: &id003
+ that:
+ - result.changed == false
+
+- name: delete/disable syslog host logging
+ register: result
+ cisco.iosxr.iosxr_logging: &id002
+ dest: host
+ name: 172.16.0.1
+ state: absent
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"172.16.0.1" in result.xml[0]'
+ - '"delete" in result.xml[0]'
+
+- name: delete/disable syslog host logging (idempotent)
+ register: result
+ cisco.iosxr.iosxr_logging: *id002
+
+- assert: *id003
+
+- name: add console logging with level warning
+ register: result
+ cisco.iosxr.iosxr_logging: &id004
+ dest: console
+ level: warning
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"console" in result.xml[0]'
+ - '"warning" in result.xml[0]'
+
+- name: console logging with level warning (idempotent)
+ register: result
+ cisco.iosxr.iosxr_logging: *id004
+
+- assert: *id003
+
+- name: remove console logging with level warning
+ register: result
+ cisco.iosxr.iosxr_logging:
+ dest: console
+ level: warning
+ state: absent
+ provider: '{{ netconf }}'
+
+- assert: &id006
+ that:
+ - result.changed == true
+
+- name: configure buffered logging size
+ register: result
+ cisco.iosxr.iosxr_logging: &id005
+ dest: buffered
+ size: 4800000
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"buffered" in result.xml[0]'
+ - '"4800000" in result.xml[0]'
+
+- name: configure buffered logging size (idempotence)
+ register: result
+ cisco.iosxr.iosxr_logging: *id005
+
+- assert: *id003
+
+- name: remove buffered logging size
+ register: result
+ cisco.iosxr.iosxr_logging:
+ dest: buffered
+ size: 4800000
+ state: absent
+ provider: '{{ netconf }}'
+
+- assert: *id006
+
+- name: change logging parameters using aggregate
+ register: result
+ cisco.iosxr.iosxr_logging:
+ aggregate:
+
+ - dest: console
+ level: notifications
+
+ - dest: buffered
+ size: 4700000
+
+ - dest: monitor
+ level: alerts
+
+ - dest: host
+ name: 10.10.10.1
+ level: errors
+
+ - dest: host
+ name: 10.10.10.2
+
+ - dest: file
+ name: file1
+ size: 2048
+ level: critical
+
+ - dest: file
+ name: file2
+ size: 2048
+
+ - facility: local3
+
+ - hostnameprefix: host3
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"file1" in result.xml[0]'
+ - '"file2" in result.xml[0]'
+ - '"10.10.10.1" in result.xml[1]'
+ - '"10.10.10.2" in result.xml[1]'
+ - '"notice" in result.xml[2]'
+ - '"alert" in result.xml[3]'
+ - '"4700000" in result.xml[4]'
+ - '"debug" in result.xml[5]'
+ - '"local3" in result.xml[6]'
+ - '"host3" in result.xml[7]'
+
+- name: remove logging parameters using aggregate
+ register: result
+ cisco.iosxr.iosxr_logging:
+ aggregate:
+
+ - dest: console
+ level: notifications
+
+ - dest: buffered
+ size: 4700000
+
+ - dest: monitor
+ level: alerts
+
+ - dest: host
+ name: 10.10.10.1
+ level: errors
+
+ - dest: host
+ name: 10.10.10.2
+
+ - dest: file
+ name: file1
+ size: 2048
+ level: critical
+
+ - dest: file
+ name: file2
+ size: 2048
+
+ - facility: local3
+
+ - hostnameprefix: host3
+ state: absent
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"file1" in result.xml[0]'
+ - '"file2" in result.xml[0]'
+ - '"10.10.10.1" in result.xml[1]'
+ - '"10.10.10.2" in result.xml[1]'
+ - '"notice" in result.xml[2]'
+ - '"alert" in result.xml[3]'
+ - '"4700000" in result.xml[4]'
+ - '"debug" in result.xml[5]'
+ - '"local3" in result.xml[6]'
+ - '"host3" in result.xml[7]'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/meta/main.yaml
new file mode 100644
index 00000000..be631e5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_iosxr_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/tasks/cli.yaml
new file mode 100644
index 00000000..163934f5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/tasks/cli.yaml
@@ -0,0 +1,16 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/tests/cli/basic.yaml
new file mode 100644
index 00000000..1cf4a019
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_netconf/tests/cli/basic.yaml
@@ -0,0 +1,72 @@
+---
+- debug: msg="START iosxr_netconf cli/basic.yaml on connection={{ ansible_connection
+ }}"
+
+- name: Disable NetConf service
+ cisco.iosxr.iosxr_netconf: &id003
+ state: absent
+
+- block:
+
+ - name: Enable Netconf service
+ register: result
+ cisco.iosxr.iosxr_netconf:
+ netconf_port: 830
+ netconf_vrf: default
+ state: present
+
+ - assert: &id001
+ that:
+ - result.changed == true
+
+ - name: Check idempotence of Enable Netconf service
+ register: result
+ cisco.iosxr.iosxr_netconf:
+ netconf_port: 830
+ netconf_vrf: default
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == false
+
+ - name: Change Netconf port
+ register: result
+ cisco.iosxr.iosxr_netconf:
+ netconf_port: 9000
+ state: present
+
+ - assert: *id001
+
+ - name: Check idempotent of change Netconf port
+ register: result
+ cisco.iosxr.iosxr_netconf:
+ netconf_port: 9000
+ state: present
+
+ - assert: *id002
+
+ - name: Add Netconf vrf
+ register: result
+ cisco.iosxr.iosxr_netconf:
+ netconf_port: 9000
+ netconf_vrf: new_default
+ state: present
+
+ - assert: *id001
+
+ - name: Check idempotent of add Netconf vrf
+ register: result
+ cisco.iosxr.iosxr_netconf:
+ netconf_port: 9000
+ netconf_vrf: new_default
+ state: present
+
+ - assert: *id002
+ always:
+
+ - name: Disable Netconf service
+ cisco.iosxr.iosxr_netconf: *id003
+
+- debug: msg="END iosxr_netconf cli/basic.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/fixtures/parsed.cfg
new file mode 100644
index 00000000..b2677113
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/fixtures/parsed.cfg
@@ -0,0 +1,51 @@
+router ospf LAB3
+ area 0.0.0.3
+ interface GigabitEthernet0/0/0/0
+ cost 20
+ authentication message-digest keychain cisco
+ !
+ !
+!
+router ospfv3 10
+ area 11
+ cost 11
+ default-cost 5
+ !
+ area 22
+ default-cost 6
+ !
+!
+router ospfv3 26
+ authentication disable
+!
+router ospfv3 27
+ area 10
+ hello-interval 2
+ !
+!
+router ospfv3 30
+ cost 2
+ priority 1
+ mtu-ignore
+ packet-size 577
+ dead-interval 2
+ retransmit-interval 2
+ demand-circuit
+ hello-interval 1
+ transmit-delay 2
+ router-id 2.2.2.2
+ default-metric 10
+ area 11
+ default-cost 5
+ !
+ area 22
+ default-cost 6
+ !
+!
+router ospfv3 LAB3
+ area 0.0.0.2
+ interface GigabitEthernet0/0/0/0
+ cost 30
+ !
+ !
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..ec4c4b37
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/_populate_config.yaml
@@ -0,0 +1,23 @@
+---
+- name: Setup (Populate OSPF interfaces config)
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.3
+ cost: 20
+ authentication:
+ message_digest:
+ keychain: cisco
+ - afi: ipv6
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.2
+ cost: 30
+ state: merged
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..2ddf6416
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/_remove_config.yaml
@@ -0,0 +1,12 @@
+---
+- name: Remove OSPFv3 Routes
+ vars:
+ lines: "no router ospf LAB3 \n
+ no router ospfv3 LAB3 \n
+ no router ospfv3 LAB \n
+ no router ospf LAB \n
+ no router ospf LAB1 \n
+ no router ospfv3 LAB1 "
+ ignore_errors: true
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/deleted.yaml
new file mode 100644
index 00000000..20a56fcd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/deleted.yaml
@@ -0,0 +1,86 @@
+---
+- debug:
+ msg: Start iosxr_ospf_interfaces deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete single ospf interface
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces: &id001
+ config:
+ - name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Delete a single ospf process (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces: *id001
+
+ - assert: &id003
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete all ospf processes
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces: &id005
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Delete all ospf processes (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces: *id005
+
+ - name: Assert that the previous task was idempotent
+ assert: *id003
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] == result['before'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..fff02bf2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START iosxr_ospf_interfaces empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Parsed with empty running_config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospf_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/gathered.yaml
new file mode 100644
index 00000000..158c7e9a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/gathered.yaml
@@ -0,0 +1,25 @@
+---
+- debug:
+ msg: START iosxr_ospf_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather OSPF interfaces facts from the device using iosxr_ospf_interfaces
+ module
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces:
+ state: gathered
+
+ - assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['gathered']) | length\
+ \ == 0 }}"
+ - "result.changed == false"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/merged.yaml
new file mode 100644
index 00000000..e380f704
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/merged.yaml
@@ -0,0 +1,121 @@
+---
+- debug:
+ msg: START iosxr_ospf interfaces merged integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces: &id001
+ config:
+ - name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.3
+ cost: 20
+ authentication:
+ message_digest:
+ keychain: cisco
+ - afi: ipv6
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.2
+ cost: 30
+ state: merged
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['before'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts was correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Update existing configuration using merged
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces: &id002
+ config:
+ - name: GigabitEthernet0/0/0/1
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.1
+ cost: 10
+ authentication:
+ message_digest:
+ keychain: lab1
+ - afi: ipv6
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.4
+ cost: 40
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) | length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['update_commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['update_after'] | symmetric_difference(result['after']) | length\
+ \ == 0 }}"
+
+ - name: Update existing ospf interfaces configuration using merged (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces: *id002
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/overridden.yaml
new file mode 100644
index 00000000..8fa3878c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/overridden.yaml
@@ -0,0 +1,65 @@
+---
+- debug:
+ msg: START iosxr_ospf_interfaces overridden integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Overridde all ospf_interfaces configuration with provided configuration
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces: &id001
+ config:
+ - name: GigabitEthernet0/0/0/1
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB1"
+ area:
+ area_id: 0.0.0.3
+ cost: 10
+ authentication:
+ message_digest:
+ keychain: iosxr
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after'])\
+ \ |length == 0 }}"
+
+ - name: Overridde all ospf_interfaces configuration with given configuration (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['before'])\
+ \ |length == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/parsed.yaml
new file mode 100644
index 00000000..5943066b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/parsed.yaml
@@ -0,0 +1,19 @@
+---
+- debug:
+ msg: START iosxr_ospf_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+
+ - name: Use parsed state to convert externally supplied device specific ospf_interfaces
+ commands to structured format
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces:
+ running_config: "{{ lookup('file', '../../fixtures/parsed.cfg') }}"
+ state: parsed
+
+ - assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['parsed']) | length\
+ \ == 0 }}"
+ - "result.changed == false"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/rendered.yaml
new file mode 100644
index 00000000..db25ec00
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/rendered.yaml
@@ -0,0 +1,51 @@
+---
+- debug:
+ msg: START iosxr_ospf_interfaces rendered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.3
+ cost: 20
+ authentication:
+ message_digest:
+ keychain: cisco
+ - afi: ipv6
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.2
+ cost: 30
+ state: rendered
+
+ - assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+ - "result.changed == false"
+
+ - name: Gather Ospf interfaces facts from the device and assert that its empty
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the
+ device
+ assert:
+ that: "{{ result['gathered'] == [] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/replaced.yaml
new file mode 100644
index 00000000..1527126b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/replaced.yaml
@@ -0,0 +1,72 @@
+---
+- debug:
+ msg: START iosxr_ospf_interfaces replaced integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replace device configurations of ospf_interfaces with provided configurations
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces: &id001
+ config:
+ - name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.3
+ cost: 30
+ authentication:
+ message_digest:
+ keychain: ciscoiosxr
+ - afi: ipv6
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.2
+ cost: 30
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after'])\
+ \ |length == 0 }}"
+
+ - name: Replace device configurations of listed vrfs/global entry with provided
+ configuration (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['before'])\
+ \ |length == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/rtt.yaml
new file mode 100644
index 00000000..64f73189
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/tests/cli/rtt.yaml
@@ -0,0 +1,79 @@
+---
+- debug:
+ msg: START iosxr_ospf_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- block:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.3
+ cost: 20
+ authentication:
+ message_digest:
+ keychain: cisco
+ - afi: ipv6
+ processes:
+ - process_id: "LAB3"
+ area:
+ area_id: 0.0.0.2
+ cost: 30
+ state: merged
+
+ - name: Gather ospf_interfaces facts
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - ospf_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config:
+ - name: GigabitEthernet0/0/0/1
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB1"
+ area:
+ area_id: 0.0.0.3
+ cost: 10
+ authentication:
+ message_digest:
+ keychain: iosxr
+ state: overridden
+
+ - name: Assert that changes were applied
+ assert:
+ that:
+ - "{{ round_trip['after'] | symmetric_difference(result['after'])\
+ \ |length == 0 }}"
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.iosxr.iosxr_ospf_interfaces:
+ config: "{{ ansible_facts['network_resources']['ospf_interfaces'] }}"
+ state: overridden
+
+ - name: Assert that config was reverted
+ assert:
+ that:
+ - "{{ base_config['after'] | symmetric_difference(revert['after'])\
+ \ |length == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/vars/main.yaml
new file mode 100644
index 00000000..95f5e7bf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospf_interfaces/vars/main.yaml
@@ -0,0 +1,138 @@
+---
+merged:
+ before: []
+ commands:
+ - router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 cost 20
+ - router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest
+ - router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest keychain cisco
+ - router ospfv3 LAB3 area 0.0.0.2 interface GigabitEthernet 0/0/0/0 cost 30
+
+ update_commands:
+ - router ospf LAB3 area 0.0.0.1 interface GigabitEthernet 0/0/0/1 cost 10
+ - router ospf LAB3 area 0.0.0.1 interface GigabitEthernet 0/0/0/1 authentication message-digest
+ - router ospf LAB3 area 0.0.0.1 interface GigabitEthernet 0/0/0/1 authentication message-digest keychain lab1
+ - router ospfv3 LAB3 area 0.0.0.4 interface GigabitEthernet 0/0/0/1 cost 40
+ after:
+ - address_family:
+ - afi: ipv4
+ authentication:
+ message_digest:
+ keychain: cisco
+ cost: 20
+ processes:
+ - area:
+ area_id: 0.0.0.3
+ process_id: "LAB3"
+ - afi: ipv6
+ cost: 30
+ processes:
+ - area:
+ area_id: 0.0.0.2
+ process_id: "LAB3"
+ name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+
+ update_after:
+ - address_family:
+ - afi: ipv4
+ authentication:
+ message_digest:
+ keychain: lab1
+ cost: 10
+ processes:
+ - area:
+ area_id: 0.0.0.1
+ process_id: "LAB3"
+ - afi: ipv6
+ cost: 40
+ processes:
+ - area:
+ area_id: 0.0.0.4
+ process_id: "LAB3"
+ name: GigabitEthernet0/0/0/1
+ type: gigabitethernet
+ - address_family:
+ - afi: ipv4
+ authentication:
+ message_digest:
+ keychain: cisco
+ cost: 20
+ processes:
+ - area:
+ area_id: 0.0.0.3
+ process_id: "LAB3"
+ - afi: ipv6
+ cost: 30
+ processes:
+ - area:
+ area_id: 0.0.0.2
+ process_id: "LAB3"
+ name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+replaced:
+ commands:
+ - router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 cost 30
+ - router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest
+ - router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest keychain ciscoiosxr
+
+ after:
+ - address_family:
+ - afi: ipv4
+ authentication:
+ message_digest:
+ keychain: ciscoiosxr
+ cost: 30
+ processes:
+ - area:
+ area_id: 0.0.0.3
+ process_id: "LAB3"
+ - afi: ipv6
+ cost: 30
+ processes:
+ - area:
+ area_id: 0.0.0.2
+ process_id: "LAB3"
+ name: GigabitEthernet0/0/0/0
+ type: gigabitethernet
+
+overridden:
+ commands:
+ - no router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0
+ - no router ospfv3 LAB3 area 0.0.0.2 interface GigabitEthernet 0/0/0/0
+ - router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 cost 10
+ - router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 authentication message-digest
+ - router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 authentication message-digest keychain iosxr
+
+ after:
+ - address_family:
+ - afi: ipv4
+ authentication:
+ message_digest:
+ keychain: iosxr
+ cost: 10
+ processes:
+ - area:
+ area_id: 0.0.0.3
+ process_id: "LAB1"
+ name: GigabitEthernet0/0/0/1
+ type: gigabitethernet
+deleted:
+ commands:
+ - no router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0
+ - no router ospfv3 LAB3 area 0.0.0.2 interface GigabitEthernet 0/0/0/0
+
+ after: []
+round_trip:
+ after:
+ - name: GigabitEthernet0/0/0/1
+ type: gigabitethernet
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "LAB1"
+ area:
+ area_id: 0.0.0.3
+ cost: 10
+ authentication:
+ message_digest:
+ keychain: iosxr
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/fixtures/parsed.cfg
new file mode 100644
index 00000000..f3861f84
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/fixtures/parsed.cfg
@@ -0,0 +1,42 @@
+Thu Jun 4 12:15:08.448 UTC
+router ospf 10
+ area 11
+ cost 11
+ default-cost 5
+ !
+ area 22
+ default-cost 6
+ !
+!
+router ospf 26
+ authentication message-digest keychain ansible1101pass
+ adjacency stagger 10 20
+!
+router ospf 27
+ area 10
+ hello-interval 2
+ !
+!
+router ospf 30
+ router-id 2.2.2.2
+ summary-in enable
+ external-out disable
+ cost 2
+ packet-size 577
+ passive disable
+ priority 1
+ mtu-ignore enable
+ flood-reduction disable
+ dead-interval 2
+ retransmit-interval 2
+ demand-circuit enable
+ hello-interval 1
+ transmit-delay 2
+ default-metric 10
+ area 11
+ default-cost 5
+ !
+ area 22
+ default-cost 6
+ !
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..c7821e00
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/_populate_config.yaml
@@ -0,0 +1,47 @@
+---
+- name: Setup (Populate OSPFv2 routes)
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ - process_id: 10
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ packet_size: 577
+ priority: 1
+ router_id: '2.2.2.2'
+ demand_circuit: enable
+ passive: disable
+ summary_in: enable
+ flood_reduction: disable
+ mtu_ignore: enable
+ external_out: disable
+ state: merged
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..80a2048c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/_remove_config.yaml
@@ -0,0 +1,11 @@
+---
+- name: Remove OSPFv2 Routes
+ vars:
+ lines: "no router ospf 26\n
+ no router ospf 27\n
+ no router ospf 30\n
+ no router ospf 10\n
+ "
+ ignore_errors: true
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/deleted.yaml
new file mode 100644
index 00000000..6f69ec1d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/deleted.yaml
@@ -0,0 +1,84 @@
+---
+- debug:
+ msg: Start iosxr_ospfv2 deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete single ospf process network
+ register: result
+ cisco.iosxr.iosxr_ospfv2: &id001
+ config:
+ processes:
+ - process_id: 10
+ - process_id: 26
+ - process_id: 27
+ - process_id: 30
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] == result['before'] }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] == result['after'] }}"
+
+ - name: Delete a single ospf process (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospfv2: *id001
+
+ - assert: &id003
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete all ospf processes
+ register: result
+ cisco.iosxr.iosxr_ospfv2: &id005
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] == result['before'] }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] == result['after'] }}"
+
+ - name: Delete all ospf processes (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospfv2: *id005
+
+ - name: Assert that the previous task was idempotent
+ assert: *id003
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] == result['before'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..10b22621
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START iosxr_ospfv2 empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Parsed with empty running_config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospfv2:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/gathered.yaml
new file mode 100644
index 00000000..b09e2e3a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/gathered.yaml
@@ -0,0 +1,22 @@
+---
+- debug:
+ msg: START iosxr_ospfv2 gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather static routes facts from the device using iosxr_ospfv2
+ module
+ register: result
+ cisco.iosxr.iosxr_ospfv2:
+ state: gathered
+
+ - assert:
+ that: "{{ replaced['before'] == result['gathered'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/merged.yaml
new file mode 100644
index 00000000..3d5fdfda
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/merged.yaml
@@ -0,0 +1,132 @@
+---
+- debug:
+ msg: START iosxr_ospfv2 merged integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_ospfv2: &id001
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ - process_id: 10
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ packet_size: 577
+ priority: 1
+ router_id: '2.2.2.2'
+ demand_circuit: enable
+ passive: disable
+ summary_in: enable
+ flood_reduction: disable
+ mtu_ignore: enable
+ external_out: disable
+ state: merged
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['before'] == result['before'] }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts was correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] == result['after'] }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospfv2: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] == result['before'] }}"
+
+ - name: Update existing configuration using merged
+ register: result
+ cisco.iosxr.iosxr_ospfv2: &id002
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - area_id: 30
+ dead_interval: 4
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 11
+ max_adjacency: 21
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['after'] == result['before'] }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['update_commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dicts were correctly generated
+ assert:
+ that: "{{ merged['update_after'] == result['after'] }}"
+
+ - name: Update existing ospfv2 configuration using merged (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospfv2: *id002
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/overridden.yaml
new file mode 100644
index 00000000..dcff31e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/overridden.yaml
@@ -0,0 +1,65 @@
+---
+- debug:
+ msg: START iosxr_ospfv2 overridden integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Overridde all ospfv2 configuration with provided configuration
+ register: result
+ cisco.iosxr.iosxr_ospfv2: &id001
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] == result['before'] }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] == result['after'] }}"
+
+ - name: Overridde all ospfv2 configuration with given configuration (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospfv2: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] == result['before'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/parsed.yaml
new file mode 100644
index 00000000..19efa25f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/parsed.yaml
@@ -0,0 +1,16 @@
+---
+- debug:
+ msg: START iosxr_ospfv2 parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+
+ - name: Use parsed state to convert externally supplied device specific ospfv2
+ routes commands to structured format
+ register: result
+ cisco.iosxr.iosxr_ospfv2:
+ running_config: "{{ lookup('file', '../../fixtures/parsed.cfg') }}"
+ state: parsed
+
+ - assert:
+ that: "{{ merged['after'] == result['parsed'] }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/rendered.yaml
new file mode 100644
index 00000000..96ee3c24
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/rendered.yaml
@@ -0,0 +1,72 @@
+---
+- debug:
+ msg: START iosxr_ospfv2 rendered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ - process_id: 10
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ packet_size: 577
+ priority: 1
+ router_id: '2.2.2.2'
+ demand_circuit: enable
+ passive: disable
+ summary_in: enable
+ flood_reduction: disable
+ mtu_ignore: enable
+ external_out: disable
+ state: rendered
+
+ - assert:
+ that: "{{ merged['commands'] | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather static routes facts from the device and assert that its empty
+ register: result
+ cisco.iosxr.iosxr_ospfv2:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the
+ device
+ assert:
+ that: "{{ result['gathered'] == {} }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/replaced.yaml
new file mode 100644
index 00000000..d62e34c8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/replaced.yaml
@@ -0,0 +1,66 @@
+---
+- debug:
+ msg: START iosxr_ospfv2 replaced integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replace device configurations of ospfv2 routes with provided configurations
+ register: result
+ cisco.iosxr.iosxr_ospfv2: &id001
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] == result['before'] }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] == result['after'] }}"
+
+ - name: Replace device configurations of listed vrfs/global entry with provided
+ configuration (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospfv2: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] == result['before'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/rtt.yaml
new file mode 100644
index 00000000..a5828181
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/tests/cli/rtt.yaml
@@ -0,0 +1,101 @@
+---
+- debug:
+ msg: START iosxr_ospfv2 round trip integration tests on connection={{
+ ansible_connection }}
+
+- block:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ - process_id: 10
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ packet_size: 577
+ priority: 1
+ router_id: '2.2.2.2'
+ demand_circuit: enable
+ passive: disable
+ summary_in: enable
+ flood_reduction: disable
+ mtu_ignore: enable
+ external_out: disable
+ state: merged
+
+ - name: Gather ospfv2 facts
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - ospfv2
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.iosxr.iosxr_ospfv2:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ - process_id: 26
+ adjacency_stagger:
+ min_adjacency: 10
+ max_adjacency: 20
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ state: overridden
+
+ - name: Assert that changes were applied
+ assert:
+ that: "{{ round_trip['after'] == result['after'] }}"
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.iosxr.iosxr_ospfv2:
+ config: "{{ ansible_facts['network_resources']['ospfv2'] }}"
+ state: overridden
+
+ - name: Assert that config was reverted
+ assert:
+ that: "{{ base_config['after'] == revert['after'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/vars/main.yaml
new file mode 100644
index 00000000..497a8c99
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv2/vars/main.yaml
@@ -0,0 +1,316 @@
+---
+merged:
+ before: {}
+ commands:
+ - router ospf 10
+ - area 11 default-cost 5
+ - area 11 cost 11
+ - area 22 default-cost 6
+ - router ospf 27
+ - area 10 hello-interval 2
+ - router ospf 26
+ - adjacency stagger 10 20
+ - authentication message-digest keychain ansible1101pass
+ - router ospf 30
+ - cost 2
+ - passive disable
+ - priority 1
+ - flood-reduction disable
+ - default-metric 10
+ - router-id 2.2.2.2
+ - demand-circuit enable
+ - packet-size 577
+ - transmit-delay 2
+ - summary-in enable
+ - external-out disable
+ - dead-interval 2
+ - hello-interval 1
+ - retransmit-interval 2
+ - mtu-ignore enable
+ - area 11 default-cost 5
+ - area 22 default-cost 6
+ update_commands:
+ - router ospf 26
+ - adjacency stagger 11 21
+ - router ospf 27
+ - area 30 dead-interval 4
+ after:
+ processes:
+ - areas:
+ - area_id: "11"
+ cost: 11
+ default_cost: 5
+ - area_id: "22"
+ default_cost: 6
+ process_id: "10"
+
+ - adjacency_stagger:
+ max_adjacency: 20
+ min_adjacency: 10
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ process_id: "26"
+ - areas:
+ - area_id: "10"
+ hello_interval: 2
+ process_id: "27"
+ - areas:
+ - area_id: "11"
+ default_cost: 5
+ - area_id: "22"
+ default_cost: 6
+ cost: 2
+ dead_interval: 2
+ default_metric: 10
+ demand_circuit: "enable"
+ external_out: "disable"
+ flood_reduction: "disable"
+ hello_interval: 1
+ mtu_ignore: "enable"
+ packet_size: 577
+ passive: "disable"
+ priority: 1
+ process_id: "30"
+ retransmit_interval: 2
+ router_id: "2.2.2.2"
+ summary_in: "enable"
+ transmit_delay: 2
+
+ update_after:
+ processes:
+ - areas:
+ - area_id: "11"
+ cost: 11
+ default_cost: 5
+ - area_id: "22"
+ default_cost: 6
+ process_id: '10'
+ - adjacency_stagger:
+ max_adjacency: 21
+ min_adjacency: 11
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ process_id: '26'
+ - areas:
+ - area_id: '10'
+ hello_interval: 2
+ - area_id: '30'
+ dead_interval: 4
+ process_id: '27'
+ - areas:
+ - area_id: '11'
+ default_cost: 5
+ - area_id: '22'
+ default_cost: 6
+
+ cost: 2
+ dead_interval: 2
+ default_metric: 10
+ demand_circuit: 'enable'
+ external_out: 'disable'
+ flood_reduction: 'disable'
+ hello_interval: 1
+ mtu_ignore: 'enable'
+ packet_size: 577
+ passive: 'disable'
+ priority: 1
+ process_id: '30'
+ retransmit_interval: 2
+ router_id: '2.2.2.2'
+ summary_in: 'enable'
+ transmit_delay: 2
+replaced:
+ before:
+ processes:
+ - areas:
+ - area_id: '11'
+ cost: 11
+ default_cost: 5
+ - area_id: '22'
+ default_cost: 6
+ process_id: '10'
+ - adjacency_stagger:
+ max_adjacency: 20
+ min_adjacency: 10
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ process_id: '26'
+ - areas:
+ - area_id: '10'
+ hello_interval: 2
+ process_id: '27'
+ - areas:
+ - area_id: '11'
+ default_cost: 5
+ - area_id: '22'
+ default_cost: 6
+ cost: 2
+ dead_interval: 2
+ default_metric: 10
+ demand_circuit: 'enable'
+ external_out: 'disable'
+ flood_reduction: 'disable'
+ hello_interval: 1
+ mtu_ignore: 'enable'
+ packet_size: 577
+ passive: 'disable'
+ priority: 1
+ process_id: '30'
+ retransmit_interval: 2
+ router_id: '2.2.2.2'
+ summary_in: 'enable'
+ transmit_delay: 2
+
+ commands:
+ - router ospf 27
+ - area 20 default-cost 2
+ - area 20 cost 2
+
+ after:
+ processes:
+ - areas:
+ - area_id: '11'
+ cost: 11
+ default_cost: 5
+ - area_id: '22'
+ default_cost: 6
+ process_id: '10'
+ - adjacency_stagger:
+ max_adjacency: 20
+ min_adjacency: 10
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ process_id: '26'
+ - areas:
+ - area_id: '10'
+ hello_interval: 2
+ - area_id: '20'
+ cost: 2
+ default_cost: 2
+ process_id: '27'
+ - areas:
+ - area_id: '11'
+ default_cost: 5
+ - area_id: '22'
+ default_cost: 6
+ cost: 2
+ dead_interval: 2
+ default_metric: 10
+ demand_circuit: 'enable'
+ external_out: 'disable'
+ flood_reduction: 'disable'
+ hello_interval: 1
+ mtu_ignore: 'enable'
+ packet_size: 577
+ passive: 'disable'
+ priority: 1
+ process_id: '30'
+ retransmit_interval: 2
+ router_id: '2.2.2.2'
+ summary_in: 'enable'
+ transmit_delay: 2
+
+overridden:
+ commands:
+ - router ospf 10
+ - no area 11 default-cost 5
+ - no area 11 cost 11
+ - no area 22 default-cost 6
+ - router ospf 30
+ - no cost 2
+ - no passive disable
+ - no priority 1
+ - no flood-reduction disable
+ - no default-metric 10
+ - no router-id 2.2.2.2
+ - no demand-circuit enable
+ - no packet-size 577
+ - no transmit-delay 2
+ - no summary-in enable
+ - no external-out disable
+ - no dead-interval 2
+ - no hello-interval 1
+ - no retransmit-interval 2
+ - no mtu-ignore enable
+ - no area 11 default-cost 5
+ - no area 22 default-cost 6
+ - router ospf 27
+ - area 20 default-cost 2
+ - area 20 cost 2
+ after:
+ processes:
+ - process_id: '10'
+ - adjacency_stagger:
+ max_adjacency: 20
+ min_adjacency: 10
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ process_id: '26'
+ - areas:
+ - area_id: '10'
+ hello_interval: 2
+ - area_id: '20'
+ cost: 2
+ default_cost: 2
+ process_id: '27'
+ - process_id: '30'
+deleted:
+ commands:
+ - router ospf 10
+ - no area 11 default-cost 5
+ - no area 11 cost 11
+ - no area 22 default-cost 6
+ - router ospf 26
+ - no adjacency stagger 10 20
+ - no authentication message-digest keychain ansible1101pass
+ - router ospf 27
+ - no area 10 hello-interval 2
+ - router ospf 30
+ - no cost 2
+ - no passive disable
+ - no priority 1
+ - no flood-reduction disable
+ - no default-metric 10
+ - no router-id 2.2.2.2
+ - no demand-circuit enable
+ - no packet-size 577
+ - no transmit-delay 2
+ - no summary-in enable
+ - no external-out disable
+ - no dead-interval 2
+ - no hello-interval 1
+ - no retransmit-interval 2
+ - no mtu-ignore enable
+ - no area 11 default-cost 5
+ - no area 22 default-cost 6
+
+ after:
+ processes:
+ - process_id: '10'
+ - process_id: '26'
+ - process_id: '27'
+ - process_id: '30'
+round_trip:
+ after:
+ processes:
+ - process_id: '10'
+ - adjacency_stagger:
+ max_adjacency: 20
+ min_adjacency: 10
+ authentication:
+ message_digest:
+ keychain: 'ansible1101pass'
+ process_id: '26'
+ - areas:
+ - area_id: '10'
+ hello_interval: 2
+ - area_id: '20'
+ cost: 2
+ default_cost: 2
+ process_id: '27'
+ - process_id: '30'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/fixtures/parsed.cfg
new file mode 100644
index 00000000..f0e69c9e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/fixtures/parsed.cfg
@@ -0,0 +1,36 @@
+router ospfv3 10
+ area 11
+ cost 11
+ default-cost 5
+ !
+ area 22
+ default-cost 6
+ !
+!
+router ospfv3 26
+ authentication disable
+!
+router ospfv3 27
+ area 10
+ hello-interval 2
+ !
+!
+router ospfv3 30
+ router-id 2.2.2.2
+ cost 2
+ packet-size 577
+ priority 1
+ mtu-ignore
+ dead-interval 2
+ retransmit-interval 2
+ demand-circuit
+ hello-interval 1
+ transmit-delay 2
+ default-metric 10
+ area 11
+ default-cost 5
+ !
+ area 22
+ default-cost 6
+ !
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..a795e39b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/_populate_config.yaml
@@ -0,0 +1,39 @@
+---
+- name: Setup (Populate OSPFv3 routes)
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ - process_id: 10
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ packet_size: 577
+ priority: 1
+ router_id: '2.2.2.2'
+ demand_circuit: true
+ mtu_ignore: true
+ state: merged
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..d0632854
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/_remove_config.yaml
@@ -0,0 +1,11 @@
+---
+- name: Remove OSPFv3 Routes
+ vars:
+ lines: "no router ospfv3 26\n
+ no router ospfv3 27\n
+ no router ospfv3 30\n
+ no router ospfv3 10\n
+ "
+ ignore_errors: true
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/deleted.yaml
new file mode 100644
index 00000000..903fe46e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/deleted.yaml
@@ -0,0 +1,84 @@
+---
+- debug:
+ msg: Start iosxr_ospfv3 deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Delete single ospf process network
+ register: result
+ cisco.iosxr.iosxr_ospfv3: &id001
+ config:
+ processes:
+ - process_id: 10
+ - process_id: 26
+ - process_id: 27
+ - process_id: 30
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] == result['before'] }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] == result['after'] }}"
+
+ - name: Delete a single ospf process (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospfv3: *id001
+
+ - assert: &id003
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete all ospf processes
+ register: result
+ cisco.iosxr.iosxr_ospfv3: &id005
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] == result['before'] }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] == result['after'] }}"
+
+ - name: Delete all ospf processes (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospfv3: *id005
+
+ - name: Assert that the previous task was idempotent
+ assert: *id003
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] == result['before'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..6c70f61f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/empty_config.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START iosxr_ospfv3 empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Parsed with empty running_config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospfv3:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/gathered.yaml
new file mode 100644
index 00000000..c9f82171
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/gathered.yaml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START iosxr_ospfv3 gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather Ospfv3 facts from the device using iosxr_ospfv3
+ module
+ register: result
+ cisco.iosxr.iosxr_ospfv3:
+ state: gathered
+
+ - assert:
+ that:
+ - "{{ replaced['before'] == result['gathered'] }}"
+ - "result.changed == false"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/merged.yaml
new file mode 100644
index 00000000..a9e3667f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/merged.yaml
@@ -0,0 +1,120 @@
+---
+- debug:
+ msg: START iosxr_ospfv3 merged integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_ospfv3: &id001
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ - process_id: 10
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ packet_size: 577
+ priority: 1
+ router_id: '2.2.2.2'
+ demand_circuit: true
+ mtu_ignore: true
+ state: merged
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['before'] == result['before'] }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts was correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] == result['after'] }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospfv3: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] == result['before'] }}"
+
+ - name: Update existing configuration using merged
+ register: result
+ cisco.iosxr.iosxr_ospfv3: &id002
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - area_id: 30
+ dead_interval: 4
+ - process_id: 26
+ authentication:
+ disable: true
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['after'] == result['before'] }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['update_commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dicts were correctly generated
+ assert:
+ that: "{{ merged['update_after'] == result['after'] }}"
+
+ - name: Update existing ospfv3 configuration using merged (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospfv3: *id002
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/overridden.yaml
new file mode 100644
index 00000000..29b01e0f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/overridden.yaml
@@ -0,0 +1,61 @@
+---
+- debug:
+ msg: START iosxr_ospfv3 overridden integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Overridde all ospfv3 configuration with provided configuration
+ register: result
+ cisco.iosxr.iosxr_ospfv3: &id001
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] == result['before'] }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] == result['after'] }}"
+
+ - name: Overridde all ospfv3 configuration with given configuration (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospfv3: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] == result['before'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/parsed.yaml
new file mode 100644
index 00000000..b1b17304
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/parsed.yaml
@@ -0,0 +1,18 @@
+---
+- debug:
+ msg: START iosxr_ospfv3 parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+
+ - name: Use parsed state to convert externally supplied device specific ospfv3
+ routes commands to structured format
+ register: result
+ cisco.iosxr.iosxr_ospfv3:
+ running_config: "{{ lookup('file', '../../fixtures/parsed.cfg') }}"
+ state: parsed
+
+ - assert:
+ that:
+ - "{{ merged['after'] == result['parsed'] }}"
+ - "result.changed == false"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/rendered.yaml
new file mode 100644
index 00000000..369ff70b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/rendered.yaml
@@ -0,0 +1,68 @@
+---
+- debug:
+ msg: START iosxr_ospfv3 rendered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ - process_id: 10
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ packet_size: 577
+ priority: 1
+ router_id: '2.2.2.2'
+ demand_circuit: true
+ passive: false
+ flood_reduction: false
+ mtu_ignore: true
+ state: rendered
+
+ - assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+ - "result.changed == false"
+
+ - name: Gather Ospfv3 facts from the device and assert that its empty
+ register: result
+ cisco.iosxr.iosxr_ospfv3:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the
+ device
+ assert:
+ that: "{{ result['gathered'] == {} }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/replaced.yaml
new file mode 100644
index 00000000..efc8a099
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/replaced.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START iosxr_ospfv3 replaced integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replace device configurations of ospfv3 routes with provided configurations
+ register: result
+ cisco.iosxr.iosxr_ospfv3: &id001
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] == result['before'] }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] == result['after'] }}"
+
+ - name: Replace device configurations of listed vrfs/global entry with provided
+ configuration (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_ospfv3: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] == result['before'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/rtt.yaml
new file mode 100644
index 00000000..a507d61a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/tests/cli/rtt.yaml
@@ -0,0 +1,91 @@
+---
+- debug:
+ msg: START iosxr_ospfv3 round trip integration tests on connection={{
+ ansible_connection }}
+
+- block:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ - process_id: 10
+ areas:
+ - area_id: 11
+ default_cost: 5
+ cost: 11
+ - area_id: 22
+ default_cost: 6
+ - process_id: 30
+ areas:
+ - area_id: 11
+ default_cost: 5
+ - area_id: 22
+ default_cost: 6
+
+ cost: 2
+ default_metric: 10
+ transmit_delay: 2
+ hello_interval: 1
+ dead_interval: 2
+ retransmit_interval: 2
+ packet_size: 577
+ priority: 1
+ router_id: '2.2.2.2'
+ demand_circuit: true
+ passive: false
+ flood_reduction: false
+ mtu_ignore: true
+ state: merged
+
+ - name: Gather ospfv3 facts
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - ospfv3
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.iosxr.iosxr_ospfv3:
+ config:
+ processes:
+ - process_id: 27
+ areas:
+ - area_id: 10
+ hello_interval: 2
+ - area_id: 20
+ cost: 2
+ default_cost: 2
+ - process_id: 26
+ authentication:
+ disable: true
+ state: overridden
+
+ - name: Assert that changes were applied
+ assert:
+ that: "{{ round_trip['after'] == result['after'] }}"
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.iosxr.iosxr_ospfv3:
+ config: "{{ ansible_facts['network_resources']['ospfv3'] }}"
+ state: overridden
+
+ - name: Assert that config was reverted
+ assert:
+ that: "{{ base_config['after'] == revert['after'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/vars/main.yaml
new file mode 100644
index 00000000..06aa7812
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_ospfv3/vars/main.yaml
@@ -0,0 +1,260 @@
+---
+merged:
+ before: {}
+ commands:
+ - router ospfv3 10
+ - area 11 default-cost 5
+ - area 11 cost 11
+ - area 22 default-cost 6
+ - router ospfv3 27
+ - area 10 hello-interval 2
+ - router ospfv3 26
+ - authentication disable
+ - router ospfv3 30
+ - cost 2
+ - priority 1
+ - default-metric 10
+ - router-id 2.2.2.2
+ - demand-circuit
+ - packet-size 577
+ - transmit-delay 2
+ - dead-interval 2
+ - hello-interval 1
+ - retransmit-interval 2
+ - mtu-ignore
+ - area 11 default-cost 5
+ - area 22 default-cost 6
+ update_commands:
+ - router ospfv3 27
+ - area 30 dead-interval 4
+ after:
+ processes:
+ - areas:
+ - area_id: "11"
+ cost: 11
+ default_cost: 5
+ - area_id: "22"
+ default_cost: 6
+ process_id: "10"
+
+ - authentication:
+ disable: true
+ process_id: "26"
+ - areas:
+ - area_id: "10"
+ hello_interval: 2
+ process_id: "27"
+ - areas:
+ - area_id: "11"
+ default_cost: 5
+ - area_id: "22"
+ default_cost: 6
+ cost: 2
+ dead_interval: 2
+ default_metric: 10
+ demand_circuit: true
+ hello_interval: 1
+ mtu_ignore: true
+ packet_size: 577
+ priority: 1
+ process_id: "30"
+ retransmit_interval: 2
+ router_id: "2.2.2.2"
+ transmit_delay: 2
+
+ update_after:
+ processes:
+ - areas:
+ - area_id: "11"
+ cost: 11
+ default_cost: 5
+ - area_id: "22"
+ default_cost: 6
+ process_id: '10'
+ - authentication:
+ disable: true
+ process_id: '26'
+ - areas:
+ - area_id: '10'
+ hello_interval: 2
+ - area_id: '30'
+ dead_interval: 4
+ process_id: '27'
+ - areas:
+ - area_id: '11'
+ default_cost: 5
+ - area_id: '22'
+ default_cost: 6
+
+ cost: 2
+ dead_interval: 2
+ default_metric: 10
+ demand_circuit: true
+ hello_interval: 1
+ mtu_ignore: true
+ packet_size: 577
+ priority: 1
+ process_id: '30'
+ retransmit_interval: 2
+ router_id: '2.2.2.2'
+ transmit_delay: 2
+replaced:
+ before:
+ processes:
+ - areas:
+ - area_id: '11'
+ cost: 11
+ default_cost: 5
+ - area_id: '22'
+ default_cost: 6
+ process_id: '10'
+ - authentication:
+ disable: true
+ process_id: '26'
+ - areas:
+ - area_id: '10'
+ hello_interval: 2
+ process_id: '27'
+ - areas:
+ - area_id: '11'
+ default_cost: 5
+ - area_id: '22'
+ default_cost: 6
+ cost: 2
+ dead_interval: 2
+ default_metric: 10
+ demand_circuit: true
+ hello_interval: 1
+ mtu_ignore: true
+ packet_size: 577
+ priority: 1
+ process_id: '30'
+ retransmit_interval: 2
+ router_id: '2.2.2.2'
+ transmit_delay: 2
+
+ commands:
+ - router ospfv3 27
+ - area 20 default-cost 2
+ - area 20 cost 2
+
+ after:
+ processes:
+ - areas:
+ - area_id: '11'
+ cost: 11
+ default_cost: 5
+ - area_id: '22'
+ default_cost: 6
+ process_id: '10'
+ - authentication:
+ disable: true
+ process_id: '26'
+ - areas:
+ - area_id: '10'
+ hello_interval: 2
+ - area_id: '20'
+ cost: 2
+ default_cost: 2
+ process_id: '27'
+ - areas:
+ - area_id: '11'
+ default_cost: 5
+ - area_id: '22'
+ default_cost: 6
+ cost: 2
+ dead_interval: 2
+ default_metric: 10
+ demand_circuit: true
+ hello_interval: 1
+ mtu_ignore: true
+ packet_size: 577
+ priority: 1
+ process_id: '30'
+ retransmit_interval: 2
+ router_id: '2.2.2.2'
+ transmit_delay: 2
+
+overridden:
+ commands:
+ - router ospfv3 10
+ - no area 11 default-cost 5
+ - no area 11 cost 11
+ - no area 22 default-cost 6
+ - router ospfv3 30
+ - no cost 2
+ - no priority 1
+ - no default-metric 10
+ - no router-id 2.2.2.2
+ - no demand-circuit
+ - no packet-size 577
+ - no transmit-delay 2
+ - no dead-interval 2
+ - no hello-interval 1
+ - no retransmit-interval 2
+ - no mtu-ignore
+ - no area 11 default-cost 5
+ - no area 22 default-cost 6
+ - router ospfv3 27
+ - area 20 default-cost 2
+ - area 20 cost 2
+ after:
+ processes:
+ - process_id: '10'
+ - authentication:
+ disable: true
+ process_id: '26'
+ - areas:
+ - area_id: '10'
+ hello_interval: 2
+ - area_id: '20'
+ cost: 2
+ default_cost: 2
+ process_id: '27'
+ - process_id: '30'
+deleted:
+ commands:
+ - router ospfv3 10
+ - no area 11 default-cost 5
+ - no area 11 cost 11
+ - no area 22 default-cost 6
+ - router ospfv3 26
+ - no authentication disable
+ - router ospfv3 27
+ - no area 10 hello-interval 2
+ - router ospfv3 30
+ - no cost 2
+ - no priority 1
+ - no default-metric 10
+ - no router-id 2.2.2.2
+ - no demand-circuit
+ - no packet-size 577
+ - no transmit-delay 2
+ - no dead-interval 2
+ - no hello-interval 1
+ - no retransmit-interval 2
+ - no mtu-ignore
+ - no area 11 default-cost 5
+ - no area 22 default-cost 6
+
+ after:
+ processes:
+ - process_id: '10'
+ - process_id: '26'
+ - process_id: '27'
+ - process_id: '30'
+round_trip:
+ after:
+ processes:
+ - process_id: '10'
+ - authentication:
+ disable: true
+ process_id: '26'
+ - areas:
+ - area_id: '10'
+ hello_interval: 2
+ - area_id: '20'
+ cost: 2
+ default_cost: 2
+ process_id: '27'
+ - process_id: '30'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/defaults/main.yaml
new file mode 100644
index 00000000..9ef5ba51
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: "*"
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/meta/main.yaml
new file mode 100644
index 00000000..be631e5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_iosxr_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tasks/cli.yaml
new file mode 100644
index 00000000..e9103656
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tasks/cli.yaml
@@ -0,0 +1,26 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: "{{ role_path }}/tests/cli"
+ patterns: "{{ testcase }}.yaml"
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=network_cli)
+ include: "{{ test_case_to_run }} ansible_connection=network_cli"
+ with_items: "{{ test_items }}"
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - network_cli
+
+- name: run test case (connection=local)
+ include: "{{ test_case_to_run }} ansible_connection=local"
+ with_items: "{{ test_items }}"
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - local
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tasks/main.yaml
new file mode 100644
index 00000000..5d082a6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tasks/main.yaml
@@ -0,0 +1,3 @@
+---
+- include: cli.yaml
+- include: netconf.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tasks/netconf.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tasks/netconf.yaml
new file mode 100644
index 00000000..18b257a0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tasks/netconf.yaml
@@ -0,0 +1,26 @@
+---
+- name: collect all netconf test cases
+ find:
+ paths: "{{ role_path }}/tests/netconf"
+ patterns: "{{ testcase }}.yaml"
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=netconf)
+ include: "{{ test_case_to_run }} ansible_connection=netconf"
+ with_items: "{{ test_items }}"
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - netconf
+
+- name: run test case (connection=local)
+ include: "{{ test_case_to_run }} ansible_connection=local"
+ with_items: "{{ test_items }}"
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - local
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/cli/common_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/cli/common_config.yaml
new file mode 100644
index 00000000..9eb7f703
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/cli/common_config.yaml
@@ -0,0 +1,100 @@
+---
+- debug: msg="START cli/common_config.yaml on connection={{ ansible_connection }}"
+
+# Sublevel / Block
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 host 192.0.2.1 any log
+ - 20 permit ipv4 host 192.0.2.2 any log
+ - 30 permit ipv4 host 192.0.2.3 any log
+ parents: ['ipv4 access-list test']
+ before: ['no ipv4 access-list test']
+ match: none
+
+- name: configure sub level command using block resplace
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 host 192.0.2.1 any log
+ - 20 permit ipv4 host 192.0.2.2 any log
+ - 30 permit ipv4 host 192.0.2.3 any log
+ - 40 permit ipv4 host 192.0.2.4 any log
+ parents: ['ipv4 access-list test']
+ replace: block
+ register: result
+
+- assert:
+ that:
+ - "result.changed == true"
+ - "'ipv4 access-list test' in result.commands"
+ - "'10 permit ipv4 host 192.0.2.1 any log' in result.commands"
+ - "'20 permit ipv4 host 192.0.2.2 any log' in result.commands"
+ - "'30 permit ipv4 host 192.0.2.3 any log' in result.commands"
+ - "'40 permit ipv4 host 192.0.2.4 any log' in result.commands"
+
+- name: check sub level command using block replace
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 10 permit ipv4 host 192.0.2.1 any log
+ - 20 permit ipv4 host 192.0.2.2 any log
+ - 30 permit ipv4 host 192.0.2.3 any log
+ - 40 permit ipv4 host 192.0.2.4 any log
+ parents: ['ipv4 access-list test']
+ replace: block
+ register: result
+
+- assert:
+ that:
+ - "result.changed == false"
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ commands: ['no ipv4 access-list test']
+ match: none
+
+# diff exact, strict, line
+- name: setup
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 'hostname {{ inventory_hostname_short }}'
+ register: result
+
+- name: set hostname
+ cisco.iosxr.iosxr_config:
+ commands:
+ - hostname testhost
+ match: strict
+ register: result
+
+- cisco.iosxr.iosxr_command:
+ commands:
+ - show configuration running-config hostname
+ register: configured_hostname
+
+- assert:
+ that:
+ - "'testhost' in configured_hostname.stdout[0]"
+
+- name: set hostname
+ cisco.iosxr.iosxr_config:
+ commands:
+ - hostname testhost2
+ match: exact
+ register: result
+
+- cisco.iosxr.iosxr_command:
+ commands:
+ - show configuration running-config hostname
+ register: configured_hostname
+
+- assert:
+ that:
+ - "'testhost2' in configured_hostname.stdout[0]"
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ commands:
+ - 'hostname {{ inventory_hostname_short }}'
+ register: result
+
+- debug: msg="END cli/common_config.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/cli/common_utils.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/cli/common_utils.yaml
new file mode 100644
index 00000000..e04d1a75
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/cli/common_utils.yaml
@@ -0,0 +1,37 @@
+---
+- debug: msg="START iosxr cli/common_utils.yaml on connection={{ ansible_connection }}"
+
+# Functions used by iosxr: conditional, remove_default_spec
+
+# hit conditional() and remove_default_spec()
+- name: Check intent arguments
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ state: up
+ tx_rate: ge(0)
+ rx_rate: ge(0)
+ provider: "{{ cli }}"
+ register: result
+
+- assert:
+ that:
+ - "result.failed == false"
+
+- name: Check intent arguments (failed condition)
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ state: down
+ tx_rate: gt(0)
+ rx_rate: lt(0)
+ provider: "{{ cli }}"
+ ignore_errors: true
+ register: result
+
+- assert:
+ that:
+ - "result.failed == true"
+ - "'state eq(down)' in result.failed_conditions"
+ - "'tx_rate gt(0)' in result.failed_conditions"
+ - "'rx_rate lt(0)' in result.failed_conditions"
+
+- debug: msg="END iosxr cli/common_utils.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/netconf/common_netconf.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/netconf/common_netconf.yaml
new file mode 100644
index 00000000..79eaeea1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/netconf/common_netconf.yaml
@@ -0,0 +1,53 @@
+---
+- debug: msg="START iosxr netconf/common_netconf.yaml on connection={{ ansible_connection }}"
+
+# hit general code
+- name: setup - remove login
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ provider: "{{ netconf }}"
+ state: absent
+
+- name: Set login
+ cisco.iosxr.iosxr_banner:
+ banner: login
+ text: |
+ this is my login banner
+ that has a multiline
+ string
+ provider: "{{ netconf }}"
+ state: present
+ register: result
+
+- debug:
+ msg: "{{ result }}"
+
+- assert:
+ that:
+ - "result.changed == true"
+ - "'this is my login banner' in result.xml"
+ - "'that has a multiline' in result.xml"
+
+# hit etree_findall()
+- name: remove host logging
+ cisco.iosxr.iosxr_logging:
+ dest: host
+ name: 172.16.0.1
+ state: absent
+ provider: "{{ netconf }}"
+
+- name: set up syslog host logging
+ cisco.iosxr.iosxr_logging: &addhostlog
+ dest: host
+ name: 172.16.0.1
+ level: errors
+ state: present
+ provider: "{{ netconf }}"
+ register: result
+
+- assert:
+ that:
+ - 'result.changed == true'
+ - '"172.16.0.1" in result.xml[0]'
+
+- debug: msg="END iosxr netconf/common_netconf.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/netconf/misc_tests.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/netconf/misc_tests.yaml
new file mode 100644
index 00000000..5a21fa0a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_smoke/tests/netconf/misc_tests.yaml
@@ -0,0 +1,40 @@
+---
+- debug: msg="START iosxr netconf/misc_tests.yaml on connection={{ ansible_connection }}"
+
+
+# hit module_utils.network.iosxr -> get_oper()
+- name: Setup (interface is up)
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ description: test_interface_1
+ enabled: true
+ state: present
+ provider: "{{ netconf }}"
+ register: result
+
+- name: Check intent arguments
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ state: up
+ delay: 10
+ provider: "{{ netconf }}"
+ register: result
+
+- assert:
+ that:
+ - "result.failed == false"
+
+- name: Check intent arguments (failed condition)
+ cisco.iosxr.iosxr_interface:
+ name: GigabitEthernet0/0/0/1
+ state: down
+ provider: "{{ netconf }}"
+ ignore_errors: true
+ register: result
+
+- assert:
+ that:
+ - "result.failed == true"
+ - "'state eq(down)' in result.failed_conditions"
+
+- debug: msg="END iosxr netconf/misc_tests.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/defaults/main.yaml
new file mode 100644
index 00000000..852a6bee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '[^_].*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/fixtures/parsed.cfg
new file mode 100644
index 00000000..35948336
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/fixtures/parsed.cfg
@@ -0,0 +1,18 @@
+Fri Nov 29 21:10:41.896 UTC
+router static
+ address-family ipv4 unicast
+ 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+ 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ 192.0.2.32/28 192.0.2.11 100
+ !
+ address-family ipv6 unicast
+ 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+ !
+ vrf DEV_SITE
+ address-family ipv4 unicast
+ 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+ 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+ !
+ !
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tasks/cli.yaml
new file mode 100644
index 00000000..f622cf94
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tasks/cli.yaml
@@ -0,0 +1,20 @@
+---
+- name: Collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: true
+ register: test_cases
+ delegate_to: localhost
+
+- name: Set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+ delegate_to: localhost
+
+- name: Run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }}'
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tasks/main.yaml
new file mode 100644
index 00000000..b957d2f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tasks/main.yaml
@@ -0,0 +1,4 @@
+---
+- include: cli.yaml
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/_populate_config.yaml
new file mode 100644
index 00000000..1ca3ca3e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/_populate_config.yaml
@@ -0,0 +1,69 @@
+---
+- name: Setup
+ cisco.iosxr.iosxr_static_routes:
+ config:
+
+ - address_families:
+
+ - afi: ipv4
+ safi: unicast
+ routes:
+
+ - dest: 192.0.2.16/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.10
+ interface: FastEthernet0/0/0/1
+ description: LAB
+ metric: 120
+ tag: 10
+
+ - interface: FastEthernet0/0/0/5
+ track: ip_sla_1
+
+ - dest: 192.0.2.32/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.11
+ admin_distance: 100
+
+ - afi: ipv6
+ safi: unicast
+ routes:
+
+ - dest: 2001:db8:1000::/36
+ next_hops:
+
+ - interface: FastEthernet0/0/0/7
+ description: DC
+
+ - interface: FastEthernet0/0/0/8
+ forward_router_address: 2001:db8:2000:2::1
+
+ - vrf: DEV_SITE
+ address_families:
+
+ - afi: ipv4
+ safi: unicast
+ routes:
+
+ - dest: 192.0.2.48/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.12
+ description: DEV
+ dest_vrf: test_1
+
+ - forward_router_address: 192.0.3.24
+ interface: GigabitEthernet0/0/0/1
+ vrflabel: 2302
+
+ - dest: 192.0.2.80/28
+ next_hops:
+
+ - interface: FastEthernet0/0/0/2
+ forward_router_address: 192.0.2.14
+ dest_vrf: test_1
+ track: ip_sla_2
+ vrflabel: 124
+ state: merged
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/_remove_config.yaml
new file mode 100644
index 00000000..f4e62ebe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/_remove_config.yaml
@@ -0,0 +1,7 @@
+---
+- name: Remove Static Routes
+ vars:
+ lines: "no router static\n"
+ ignore_errors: true
+ ansible.netcommon.cli_config:
+ config: '{{ lines }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/deleted.yaml
new file mode 100644
index 00000000..803906c9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/deleted.yaml
@@ -0,0 +1,79 @@
+---
+- debug:
+ msg: Start iosxr_static_routes deleted integration tests ansible_connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Delete all destination network entries under a single AFI
+ register: result
+ cisco.iosxr.iosxr_static_routes: &id004
+ config:
+
+ - vrf: DEV_SITE
+ address_families:
+
+ - afi: ipv4
+ safi: unicast
+ state: deleted
+
+ - assert:
+ that:
+ - '"router static" in result.commands'
+ - '"vrf DEV_SITE" in result.commands'
+ - '"no address-family ipv4 unicast" in result.commands'
+ - result.commands|length == 3
+
+ - name: Delete all destination network entries under a single AFI (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_static_routes: *id004
+
+ - name: Assert that the previous task was idempotent
+ assert: &id003
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete static routes configuration
+ register: result
+ cisco.iosxr.iosxr_static_routes: &id005
+ state: deleted
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that the after dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Delete all static routes (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_static_routes: *id005
+
+ - name: Assert that the previous task was idempotent
+ assert: *id003
+
+ - name: Assert that the before dicts were correctly generated
+ assert:
+ that:
+ - "{{ deleted['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/empty_config.yaml
new file mode 100644
index 00000000..c555e8fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/empty_config.yaml
@@ -0,0 +1,49 @@
+---
+- debug:
+ msg: START iosxr_static_routes empty_config integration tests on connection={{
+ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_static_routes:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Parsed with empty running_config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.iosxr.iosxr_static_routes:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state
+ parsed'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/gathered.yaml
new file mode 100644
index 00000000..56211b19
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/gathered.yaml
@@ -0,0 +1,23 @@
+---
+- debug:
+ msg: START iosxr_static_routes gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather static routes facts from the device using iosxr_static_routes
+ module
+ register: result
+ cisco.iosxr.iosxr_static_routes:
+ state: gathered
+
+ - assert:
+ that: "{{ replaced['before'] | symmetric_difference(result['gathered'])\
+ \ |length == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/merged.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/merged.yaml
new file mode 100644
index 00000000..d5e305a2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/merged.yaml
@@ -0,0 +1,167 @@
+---
+- debug:
+ msg: START iosxr_static_routes merged integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ register: result
+ cisco.iosxr.iosxr_static_routes: &id001
+ config:
+
+ - address_families:
+
+ - afi: ipv4
+ safi: unicast
+ routes:
+
+ - dest: 192.0.2.16/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.10
+ interface: FastEthernet0/0/0/1
+ description: LAB
+ metric: 120
+ tag: 10
+
+ - interface: FastEthernet0/0/0/5
+ track: ip_sla_1
+
+ - dest: 192.0.2.32/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.11
+ admin_distance: 100
+
+ - afi: ipv6
+ safi: unicast
+ routes:
+
+ - dest: 2001:db8:1000::/36
+ next_hops:
+
+ - interface: FastEthernet0/0/0/7
+ description: DC
+
+ - interface: FastEthernet0/0/0/8
+ forward_router_address: 2001:db8:2000:2::1
+
+ - vrf: DEV_SITE
+ address_families:
+
+ - afi: ipv4
+ safi: unicast
+ routes:
+
+ - dest: 192.0.2.48/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.12
+ description: DEV
+ dest_vrf: test_1
+
+ - dest: 192.0.2.80/28
+ next_hops:
+
+ - interface: FastEthernet0/0/0/2
+ forward_router_address: 192.0.2.14
+ dest_vrf: test_1
+ track: ip_sla_2
+ vrflabel: 124
+ state: merged
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['before'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - set_fact:
+ diff: "{{ merged['after'] | symmetric_difference(result['after']) }}"
+
+ - name: Assert that after dicts was correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_static_routes: *id001
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Update existing configuration using merged
+ register: result
+ cisco.iosxr.iosxr_static_routes: &id002
+ config:
+
+ - vrf: DEV_SITE
+ address_families:
+
+ - afi: ipv4
+ safi: unicast
+ routes:
+
+ - dest: 192.0.2.48/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.12
+ vrflabel: 2301
+ dest_vrf: test_1
+
+ - dest: 192.0.2.80/28
+ next_hops:
+
+ - interface: FastEthernet0/0/0/2
+ forward_router_address: 192.0.2.14
+ dest_vrf: test_1
+ description: rt_test_1
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ merged['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['update_commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dicts were correctly generated
+ assert:
+ that: "{{ merged['update_after'] | symmetric_difference(result['after'])\
+ \ |length == 0 }}"
+
+ - name: Update existing static_routes configuration using merged (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_static_routes: *id002
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/overridden.yaml
new file mode 100644
index 00000000..d9276037
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/overridden.yaml
@@ -0,0 +1,79 @@
+---
+- debug:
+ msg: START iosxr_static_routes overridden integration tests on connection={{
+ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Overridde all static routes configuration with provided configuration
+ register: result
+ cisco.iosxr.iosxr_static_routes: &id001
+ config:
+
+ - vrf: DEV_NEW
+ address_families:
+
+ - afi: ipv4
+ safi: unicast
+ routes:
+
+ - dest: 192.0.2.48/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.15
+ interface: FastEthernet0/0/0/3
+ description: DEV1
+
+ - afi: ipv6
+ safi: unicast
+ routes:
+
+ - dest: 2001:db8:3000::/36
+ next_hops:
+
+ - interface: FastEthernet0/0/0/4
+ forward_router_address: 2001:db8:2000:2::2
+ description: PROD1
+ track: ip_sla_1
+ state: overridden
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Overridde all static routes configuration with given configuration (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_static_routes: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/parsed.yaml
new file mode 100644
index 00000000..0a4bc5c6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/parsed.yaml
@@ -0,0 +1,17 @@
+---
+- debug:
+ msg: START iosxr_static_routes parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+
+ - name: Use parsed state to convert externally supplied device specific static
+ routes commands to structured format
+ register: result
+ cisco.iosxr.iosxr_static_routes:
+ running_config: "{{ lookup('file', '../../fixtures/parsed.cfg') }}"
+ state: parsed
+
+ - assert:
+ that: "{{ merged['after'] | symmetric_difference(result['parsed']) |length==0\
+ \ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/rendered.yaml
new file mode 100644
index 00000000..164165f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/rendered.yaml
@@ -0,0 +1,91 @@
+---
+- debug:
+ msg: START iosxr_static_routes rendered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.iosxr.iosxr_static_routes:
+ config:
+
+ - vrf: DEV_SITE
+ address_families:
+
+ - afi: ipv4
+ safi: unicast
+ routes:
+
+ - dest: 192.0.2.48/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.12
+ description: DEV
+ dest_vrf: test_1
+
+ - dest: 192.0.2.80/28
+ next_hops:
+
+ - interface: FastEthernet0/0/0/2
+ forward_router_address: 192.0.2.14
+ dest_vrf: test_1
+ track: ip_sla_2
+ vrflabel: 124
+
+ - address_families:
+
+ - afi: ipv4
+ safi: unicast
+ routes:
+
+ - dest: 192.0.2.16/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.10
+ interface: FastEthernet0/0/0/1
+ description: LAB
+ metric: 120
+ tag: 10
+
+ - interface: FastEthernet0/0/0/5
+ track: ip_sla_1
+
+ - dest: 192.0.2.32/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.11
+ admin_distance: 100
+
+ - afi: ipv6
+ safi: unicast
+ routes:
+
+ - dest: 2001:db8:1000::/36
+ next_hops:
+
+ - interface: FastEthernet0/0/0/7
+ description: DC
+
+ - interface: FastEthernet0/0/0/8
+ forward_router_address: 2001:db8:2000:2::1
+ state: rendered
+
+ - assert:
+ that: "{{ merged['commands'] | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather static routes facts from the device and assert that its empty
+ register: result
+ cisco.iosxr.iosxr_static_routes:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the
+ device
+ assert:
+ that: "{{ result['gathered'] == [] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/replaced.yaml
new file mode 100644
index 00000000..beef4034
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/replaced.yaml
@@ -0,0 +1,69 @@
+---
+- debug:
+ msg: START iosxr_static_routes replaced integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Replace device configurations of static routes with provided configurations
+ register: result
+ cisco.iosxr.iosxr_static_routes: &id001
+ config:
+
+ - vrf: DEV_SITE
+ address_families:
+
+ - afi: ipv4
+ safi: unicast
+ routes:
+
+ - dest: 192.0.2.48/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.15
+ interface: FastEthernet0/0/0/3
+ description: DEV_NEW
+ dest_vrf: dev_test_2
+ state: replaced
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ replaced['before'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Replace device configurations of listed vrfs/global entry with provided
+ configuration (IDEMPOTENT)
+ register: result
+ cisco.iosxr.iosxr_static_routes: *id001
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after'] | symmetric_difference(result['before']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/rtt.yaml
new file mode 100644
index 00000000..c1ddfe58
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/tests/cli/rtt.yaml
@@ -0,0 +1,89 @@
+---
+- debug:
+ msg: START iosxr_static_routes round trip integration tests on connection={{
+ ansible_connection }}
+
+- block:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: Apply the provided configuration (base config)
+ register: base_config
+ cisco.iosxr.iosxr_static_routes:
+ config:
+
+ - address_families:
+
+ - afi: ipv4
+ safi: unicast
+ routes:
+
+ - dest: 192.0.2.48/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.15
+ admin_distance: 105
+ track: ip_sla_2
+
+ - vrf: DEV_SITE
+ address_families:
+
+ - afi: ipv6
+ safi: unicast
+ routes:
+
+ - dest: 2001:db8:3000::/36
+ next_hops:
+
+ - forward_router_address: 2001:db8:2000:2::2
+ interface: FastEthernet0/0/0/11
+ description: PROD1
+ state: merged
+
+ - name: Gather interfaces facts
+ cisco.iosxr.iosxr_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - static_routes
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.iosxr.iosxr_static_routes:
+ config:
+
+ - vrf: TEST_SITE
+ address_families:
+
+ - afi: ipv4
+ safi: unicast
+ routes:
+
+ - dest: 192.0.2.80/28
+ next_hops:
+
+ - forward_router_address: 192.0.2.12
+ interface: FastEthernet0/0/0/3
+ description: DEV_MOVED
+ dest_vrf: dev_moved
+ state: overridden
+
+ - name: Assert that changes were applied
+ assert:
+ that: "{{ round_trip['after'] | symmetric_difference(result['after']) |length\
+ \ == 0 }}"
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.iosxr.iosxr_static_routes:
+ config: "{{ ansible_facts['network_resources']['static_routes'] }}"
+ state: overridden
+
+ - name: Assert that config was reverted
+ assert:
+ that: "{{ base_config['after'] | symmetric_difference(revert['after']) |length\
+ \ == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/vars/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/vars/main.yaml
new file mode 100644
index 00000000..b12c6698
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_static_routes/vars/main.yaml
@@ -0,0 +1,264 @@
+---
+merged:
+ before: []
+ commands:
+ - router static
+ - address-family ipv4 unicast
+ - 192.0.2.16/28 192.0.2.10 FastEthernet0/0/0/1 description LAB metric 120 tag
+ 10
+ - 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ - 192.0.2.32/28 192.0.2.11 100
+ - address-family ipv6 unicast
+ - 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ - 2001:db8:1000::/36 2001:db8:2000:2::1 FastEthernet0/0/0/8
+ - vrf DEV_SITE
+ - address-family ipv4 unicast
+ - 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+ - 192.0.2.80/28 vrf test_1 192.0.2.14 FastEthernet0/0/0/2 track ip_sla_2 vrflabel
+ 124
+ update_commands:
+ - router static
+ - vrf DEV_SITE
+ - address-family ipv4 unicast
+ - 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV vrflabel 2301
+ - 192.0.2.80/28 vrf test_1 192.0.2.14 FastEthernet0/0/0/2 description rt_test_1
+ track ip_sla_2 vrflabel 124
+ after:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - description: LAB
+ forward_router_address: 192.0.2.10
+ interface: FastEthernet0/0/0/1
+ metric: 120
+ tag: 10
+ - interface: FastEthernet0/0/0/5
+ track: ip_sla_1
+ - dest: 192.0.2.32/28
+ next_hops:
+ - admin_distance: 100
+ forward_router_address: 192.0.2.11
+ safi: unicast
+ - afi: ipv6
+ routes:
+ - dest: 2001:db8:1000::/36
+ next_hops:
+ - description: DC
+ interface: FastEthernet0/0/0/7
+ - forward_router_address: 2001:db8:2000:2::1
+ interface: FastEthernet0/0/0/8
+ safi: unicast
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - description: DEV
+ dest_vrf: test_1
+ forward_router_address: 192.0.2.12
+ - dest: 192.0.2.80/28
+ next_hops:
+ - dest_vrf: test_1
+ forward_router_address: 192.0.2.14
+ interface: FastEthernet0/0/0/2
+ track: ip_sla_2
+ vrflabel: 124
+ safi: unicast
+ vrf: DEV_SITE
+ update_after:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - description: LAB
+ forward_router_address: 192.0.2.10
+ interface: FastEthernet0/0/0/1
+ metric: 120
+ tag: 10
+ - interface: FastEthernet0/0/0/5
+ track: ip_sla_1
+ - dest: 192.0.2.32/28
+ next_hops:
+ - admin_distance: 100
+ forward_router_address: 192.0.2.11
+ safi: unicast
+ - afi: ipv6
+ routes:
+ - dest: 2001:db8:1000::/36
+ next_hops:
+ - description: DC
+ interface: FastEthernet0/0/0/7
+ - forward_router_address: 2001:db8:2000:2::1
+ interface: FastEthernet0/0/0/8
+ safi: unicast
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - description: DEV
+ dest_vrf: test_1
+ forward_router_address: 192.0.2.12
+ vrflabel: 2301
+ - dest: 192.0.2.80/28
+ next_hops:
+ - dest_vrf: test_1
+ forward_router_address: 192.0.2.14
+ interface: FastEthernet0/0/0/2
+ track: ip_sla_2
+ vrflabel: 124
+ description: rt_test_1
+ safi: unicast
+ vrf: DEV_SITE
+replaced:
+ before:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - description: LAB
+ forward_router_address: 192.0.2.10
+ interface: FastEthernet0/0/0/1
+ metric: 120
+ tag: 10
+ - interface: FastEthernet0/0/0/5
+ track: ip_sla_1
+ - dest: 192.0.2.32/28
+ next_hops:
+ - admin_distance: 100
+ forward_router_address: 192.0.2.11
+ safi: unicast
+ - afi: ipv6
+ routes:
+ - dest: 2001:db8:1000::/36
+ next_hops:
+ - description: DC
+ interface: FastEthernet0/0/0/7
+ - forward_router_address: 2001:db8:2000:2::1
+ interface: FastEthernet0/0/0/8
+ safi: unicast
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - description: DEV
+ dest_vrf: test_1
+ forward_router_address: 192.0.2.12
+ - forward_router_address: 192.0.3.24
+ interface: GigabitEthernet0/0/0/1
+ vrflabel: 2302
+ - dest: 192.0.2.80/28
+ next_hops:
+ - dest_vrf: test_1
+ forward_router_address: 192.0.2.14
+ interface: FastEthernet0/0/0/2
+ track: ip_sla_2
+ vrflabel: 124
+ safi: unicast
+ vrf: DEV_SITE
+ commands:
+ - router static
+ - vrf DEV_SITE
+ - address-family ipv4 unicast
+ - no 192.0.2.48/28 192.0.3.24 GigabitEthernet0/0/0/1
+ - no 192.0.2.48/28 vrf test_1 192.0.2.12
+ - 192.0.2.48/28 vrf dev_test_2 192.0.2.15 FastEthernet0/0/0/3 description DEV_NEW
+ after:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - description: LAB
+ forward_router_address: 192.0.2.10
+ interface: FastEthernet0/0/0/1
+ metric: 120
+ tag: 10
+ - interface: FastEthernet0/0/0/5
+ track: ip_sla_1
+ - dest: 192.0.2.32/28
+ next_hops:
+ - admin_distance: 100
+ forward_router_address: 192.0.2.11
+ safi: unicast
+ - afi: ipv6
+ routes:
+ - dest: 2001:db8:1000::/36
+ next_hops:
+ - description: DC
+ interface: FastEthernet0/0/0/7
+ - forward_router_address: 2001:db8:2000:2::1
+ interface: FastEthernet0/0/0/8
+ safi: unicast
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.15
+ interface: FastEthernet0/0/0/3
+ description: DEV_NEW
+ dest_vrf: dev_test_2
+ - dest: 192.0.2.80/28
+ next_hops:
+ - dest_vrf: test_1
+ forward_router_address: 192.0.2.14
+ interface: FastEthernet0/0/0/2
+ track: ip_sla_2
+ vrflabel: 124
+ safi: unicast
+ vrf: DEV_SITE
+overridden:
+ commands:
+ - router static
+ - no vrf DEV_SITE
+ - no address-family ipv4 unicast
+ - no address-family ipv6 unicast
+ - vrf DEV_NEW
+ - address-family ipv4 unicast
+ - 192.0.2.48/28 192.0.2.15 FastEthernet0/0/0/3 description DEV1
+ - address-family ipv6 unicast
+ - 2001:db8:3000::/36 2001:db8:2000:2::2 FastEthernet0/0/0/4 description PROD1
+ track ip_sla_1
+ after:
+ - vrf: DEV_NEW
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.15
+ interface: FastEthernet0/0/0/3
+ description: DEV1
+ - afi: ipv6
+ safi: unicast
+ routes:
+ - dest: 2001:db8:3000::/36
+ next_hops:
+ - interface: FastEthernet0/0/0/4
+ forward_router_address: 2001:db8:2000:2::2
+ description: PROD1
+ track: ip_sla_1
+deleted:
+ commands:
+ - no router static
+ after: []
+round_trip:
+ after:
+ - vrf: TEST_SITE
+ address_families:
+ - afi: ipv4
+ safi: unicast
+ routes:
+ - dest: 192.0.2.80/28
+ next_hops:
+ - forward_router_address: 192.0.2.12
+ interface: FastEthernet0/0/0/3
+ description: DEV_MOVED
+ dest_vrf: dev_moved
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/meta/main.yml
new file mode 100644
index 00000000..be631e5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_iosxr_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tasks/cli.yaml
new file mode 100644
index 00000000..9d1857ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tasks/cli.yaml
@@ -0,0 +1,29 @@
+---
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - network_cli
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - local
+
+- name: reset connection
+ meta: reset_connection
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tasks/main.yaml
new file mode 100644
index 00000000..5d082a6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tasks/main.yaml
@@ -0,0 +1,3 @@
+---
+- include: cli.yaml
+- include: netconf.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tasks/netconf.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tasks/netconf.yaml
new file mode 100644
index 00000000..e984861a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tasks/netconf.yaml
@@ -0,0 +1,29 @@
+---
+- name: collect all netconf test cases
+ find:
+ paths: '{{ role_path }}/tests/netconf'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.netconf)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - netconf
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - local
+
+- name: reset connection
+ meta: reset_connection
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/net_system.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/net_system.yaml
new file mode 100644
index 00000000..83ca4801
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/net_system.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg="START iosxr cli/net_system.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no domain list ansible.com
+ - no domain list redhat.com
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure domain_search using platform agnostic module
+ register: result
+ ansible.netcommon.net_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'domain list ansible.com' in result.commands"
+ - "'domain list redhat.com' in result.commands"
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no domain list ansible.com
+ - no domain list redhat.com
+ match: none
+ provider: '{{ cli }}'
+
+- debug: msg="END iosxr cli/net_system.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_domain_list.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_domain_list.yaml
new file mode 100644
index 00000000..7e4f8fe3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_domain_list.yaml
@@ -0,0 +1,123 @@
+---
+- debug: msg="START cli/set_domain_search.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no domain list ansible.com
+ - no domain list redhat.com
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure domain_search
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'domain list ansible.com' in result.commands"
+ - "'domain list redhat.com' in result.commands"
+
+- name: verify domain_search
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove one entry
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'no domain list redhat.com' in result.commands"
+
+- name: verify remove one entry
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: add one entry
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'domain list redhat.com' in result.commands"
+
+- name: verify add one entry
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: add and remove one entry
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ - eng.ansible.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'no domain list redhat.com' in result.commands"
+ - "'domain list eng.ansible.com' in result.commands"
+ - result.commands|length == 2
+
+- name: verify add and remove one entry
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ - eng.ansible.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no domain list ansible.com
+ - no domain list eng.ansible.com
+ match: none
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/set_domain_search.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_domain_name.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_domain_name.yaml
new file mode 100644
index 00000000..b6e080fa
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_domain_name.yaml
@@ -0,0 +1,37 @@
+---
+- debug: msg="START cli/set_domain_name.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ lines: no domain name
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure domain_name
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_name: eng.ansible.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify domain_name
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_name: eng.ansible.com
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ lines: no domain name
+ match: none
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/set_domain_name.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_hostname.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_hostname.yaml
new file mode 100644
index 00000000..a23c09d5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_hostname.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg="START cli/set_hostname.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ lines: hostname switch
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure hostname
+ register: result
+ cisco.iosxr.iosxr_system:
+ hostname: foo
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify hostname
+ register: result
+ cisco.iosxr.iosxr_system:
+ hostname: foo
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ lines: hostname {{ inventory_hostname }}
+ match: none
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/set_hostname.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_lookup_source.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_lookup_source.yaml
new file mode 100644
index 00000000..8fdf2824
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_lookup_source.yaml
@@ -0,0 +1,40 @@
+---
+- debug: msg="START cli/set_lookup_source.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ lines: no domain lookup source-interface Loopback10
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure lookup_source
+ register: result
+ cisco.iosxr.iosxr_system:
+ lookup_source: Loopback10
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'domain lookup source-interface Loopback10' in result.commands"
+
+- name: verify lookup_source
+ register: result
+ cisco.iosxr.iosxr_system:
+ lookup_source: Loopback10
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no domain lookup source-interface Loopback10
+ match: none
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/set_lookup_source.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_name_servers.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_name_servers.yaml
new file mode 100644
index 00000000..20fd8120
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/cli/set_name_servers.yaml
@@ -0,0 +1,66 @@
+---
+- debug: msg="START cli/set_name_servers.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no ip name-server 192.0.2.1
+ - no ip name-server 192.0.2.2
+ - no ip name-server 192.0.2.3
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure name_servers
+ register: result
+ cisco.iosxr.iosxr_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'domain name-server 192.0.2.1' in result.commands"
+ - "'domain name-server 192.0.2.2' in result.commands"
+ - "'domain name-server 192.0.2.3' in result.commands"
+
+- name: verify name_servers
+ register: result
+ cisco.iosxr.iosxr_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove one
+ register: result
+ cisco.iosxr.iosxr_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands|length == 1
+ - "'no domain name-server 192.0.2.3' in result.commands"
+
+- name: setup
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no ip name-server 192.0.2.1
+ - no ip name-server 192.0.2.2
+ match: none
+ provider: '{{ cli }}'
+
+- debug: msg="END cli/set_name_servers.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_domain_list.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_domain_list.yaml
new file mode 100644
index 00000000..d7e1a7b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_domain_list.yaml
@@ -0,0 +1,179 @@
+---
+- debug:
+ msg: START netconf/set_domain_search.yaml on connection={{ ansible_connection
+ }}
+
+- name: setup
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no domain list ansible.com
+ - no domain list redhat.com
+ - no domain list eng.ansible.com
+ - no domain vrf ansiblevrf list redhat.com
+ - no domain vrf ansiblevrf list ansible.com
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure domain_search
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ansible.com' in result.xml[0]"
+ - "'redhat.com' in result.xml[0]"
+
+- name: configure domain_search with vrf
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: &id001
+ vrf: ansiblevrf
+ domain_search:
+ - redhat.com
+ - ansible.com
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ansiblevrf' in result.xml[0]"
+ - "'ansible.com' in result.xml[0]"
+ - "'redhat.com' in result.xml[0]"
+
+- name: verify domain_search with vrf
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: delete domain_search with vrf
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: &id002
+ vrf: ansiblevrf
+ domain_search:
+ - redhat.com
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ansiblevrf' in result.xml[0]"
+ - "'ansible.com' in result.xml[0]"
+
+- name: verify delete domain_search with vrf
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: *id002
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove one entry
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'redhat.com' in result.xml[0]"
+
+- name: verify remove one entry
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: add one entry
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'redhat.com' in result.xml[0]"
+
+- name: verify add one entry
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: add and remove one entry
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ - eng.ansible.com
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'redhat.com' in result.xml[1]"
+ - "'eng.ansible.com' in result.xml[0]"
+ - result.xml|length == 2
+
+- name: verify add and remove one entry
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system:
+ domain_search:
+ - ansible.com
+ - eng.ansible.com
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no domain list ansible.com
+ - no domain list redhat.com
+ - no domain list eng.ansible.com
+ - no domain vrf ansiblevrf list redhat.com
+ - no domain vrf ansiblevrf list ansible.com
+ - no domain vrf ansiblevrf list eng.ansible.com
+ match: none
+ provider: '{{ cli }}'
+
+- debug:
+ msg: END netconf/set_domain_search.yaml on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_domain_name.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_domain_name.yaml
new file mode 100644
index 00000000..98508c4e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_domain_name.yaml
@@ -0,0 +1,78 @@
+---
+- debug:
+ msg: START netconf/set_domain_name.yaml on connection={{ ansible_connection
+ }}
+
+- name: setup
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no domain name
+ - no domain vrf ansiblevrf name
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure domain_name
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: &id001
+ domain_name: eng.ansible.com
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify domain_name
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: configure domain_name
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: &id002
+ domain_name: eng.ansible.com
+ provider: '{{ netconf }}'
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify domain_name
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: *id002
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: configure domain_name with vrf
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: &id003
+ domain_name: eng.ansible.com
+ vrf: ansiblevrf
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify domain_name with vrf
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: *id003
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug:
+ msg: END netconf/set_domain_name.yaml on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_hostname.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_hostname.yaml
new file mode 100644
index 00000000..0a4b76a2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_hostname.yaml
@@ -0,0 +1,45 @@
+---
+- debug:
+ msg: START netconf/set_hostname.yaml on connection={{ ansible_connection }}
+
+- block:
+
+ - name: setup
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_config:
+ lines: hostname switch
+ match: none
+ provider: '{{ cli }}'
+
+ - name: configure hostname
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system:
+ hostname: foo
+ provider: '{{ netconf }}'
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: verify hostname
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system:
+ hostname: foo
+ provider: '{{ netconf }}'
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - name: teardown
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_config:
+ lines: hostname {{ inventory_hostname }}
+ match: none
+ provider: '{{ cli }}'
+
+- debug:
+ msg: END netconf/set_hostname.yaml on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_lookup_source.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_lookup_source.yaml
new file mode 100644
index 00000000..2045a8dc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_lookup_source.yaml
@@ -0,0 +1,162 @@
+---
+- debug:
+ msg: START netconf/set_lookup_source.yaml on connection={{ ansible_connection
+ }}
+
+- name: setup
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no domain lookup source-interface Loopback10
+ - no domain vrf ansiblevrf lookup source-interface Loopback10
+ - no domain lookup disable
+ - no domain vrf ansiblevrf lookup disable
+ match: none
+ provider: '{{ cli }}'
+
+- name: configure lookup_source
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: &id001
+ lookup_source: Loopback10
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'Loopback10' in result.xml[0]"
+
+- name: verify lookup_source
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: disable lookup
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: &id002
+ lookup_enabled: false
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'lookup' in result.xml[0]"
+
+- name: verify disable lookup
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: *id002
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: delete lookup_source
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: &id003
+ lookup_source: Loopback10
+ provider: '{{ netconf }}'
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+ - "'Loopback10' in result.xml[0]"
+
+- name: verify lookup_source
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: *id003
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: configure lookup_source with vrf
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: &id004
+ lookup_source: Loopback10
+ vrf: ansiblevrf
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'Loopback10' in result.xml[0]"
+ - "'ansiblevrf' in result.xml[0]"
+
+- name: verify lookup_source
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: *id004
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: disable lookup
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: &id005
+ lookup_enabled: false
+ vrf: ansiblevrf
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - "'lookup' in result.xml[0]"
+ - "'ansiblevrf' in result.xml[0]"
+
+- name: verify disable lookup
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: *id005
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: delete lookup_source
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: &id006
+ lookup_source: Loopback10
+ vrf: ansiblevrf
+ provider: '{{ netconf }}'
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+ - "'Loopback10' in result.xml[0]"
+ - "'ansiblevrf' in result.xml[0]"
+
+- name: verify lookup_source
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: *id006
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no domain lookup disable
+ - no domain vrf ansiblevrf lookup disable
+ match: none
+ provider: '{{ cli }}'
+
+- debug:
+ msg: END netconf/set_lookup_source.yaml on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_name_servers.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_name_servers.yaml
new file mode 100644
index 00000000..c7a788a0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_system/tests/netconf/set_name_servers.yaml
@@ -0,0 +1,138 @@
+---
+- debug:
+ msg: START netconf/set_name_servers.yaml on connection={{ ansible_connection
+ }}
+
+- name: setup
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no domain name-server 192.0.2.1
+ - no domain name-server 192.0.2.2
+ - no domain name-server 192.0.2.3
+ match: none
+ provider: '{{ cli }}'
+
+- name: setup
+ connection: ansible.netcommon.netconf
+ ignore_errors: true
+ register: result
+ cisco.iosxr.iosxr_system:
+ vrf: ansible
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+ provider: '{{ netconf }}'
+ state: absent
+
+- name: configure name_servers
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.xml|length == 1
+ - "'192.0.2.1' in result.xml[0]"
+ - "'192.0.2.2' in result.xml[0]"
+ - "'192.0.2.3' in result.xml[0]"
+
+- name: verify name_servers
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: add name servers with vrf
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: &id001
+ vrf: ansible
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.xml|length == 1
+ - "'ansible' in result.xml[0]"
+ - "'192.0.2.1' in result.xml[0]"
+ - "'192.0.2.2' in result.xml[0]"
+ - "'192.0.2.3' in result.xml[0]"
+
+- name: verify change to vrf
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove one
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.xml|length == 1
+ - "'192.0.2.3' in result.xml[0]"
+
+- name: remove one with vrf
+ connection: ansible.netcommon.netconf
+ ignore_errors: true
+ register: result
+ cisco.iosxr.iosxr_system:
+ vrf: ansible
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ provider: '{{ netconf }}'
+
+- name: teardown
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no domain name-server 192.0.2.1
+ - no domain name-server 192.0.2.2
+ match: none
+ provider: '{{ cli }}'
+
+- name: teardown
+ connection: ansible.netcommon.netconf
+ ignore_errors: true
+ register: result
+ cisco.iosxr.iosxr_system:
+ vrf: ansible
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ provider: '{{ netconf }}'
+ state: absent
+
+- debug:
+ msg: END netconf/set_name_servers.yaml on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/files/private b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/files/private
new file mode 100644
index 00000000..bf2425bb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/files/private
@@ -0,0 +1,30 @@
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,A823A6B5ED873917
+
+mLZ1xM1+xwutkRy+K/c9QsstDPQ9F6UWtDpoYyIgs7n9VgMjhIMbWQC9CkTvnFJM
+ey+iwGdQZZOThwxalm+k3pMibwRjhnF+PNFhiVkzWH8/K8QvXRQiW/vYmE/QB9pY
+T0IWbMcC7/ktEfQn+6GLXoe/L7yH+aNv/2Flsa2jN2cfSXpzbneUA06/LVVOw6E+
+C74NKRWUmMPA39Zd4WOeBoWUdS5Kgwl57SOtrKs1LIGh33+TPu+Go8gJ7h/t/kaN
+kverVSz+0eeX+exKumejfo1UfosplRhcjRG8YgiQ8l7SN3NBF/gXiiSrH3fLwmRJ
+hbokJ8TmCozrYBs1MNe3LoU2iuIqVnJ5Sd6DJELs6vCuFz+v6J/s80NaaYMlBCbB
+1lahelYqoyLb4uiDd4zQSpaxzO+Cx/d50Wpee8mFxbAL/YxacOzD3b/VCBgB+AZN
+TTHr1ayd+ITd8gewXAyERKWyrDcC2beJI0fOil23PYowWvEncS6I1f4hKQY28sRf
+vHSbwQdltky/xiib2/feQTaMSQFvsY67uTHipMwl5wJNOKcbeqDVMWPYST3XUsBg
+LRlbT+VTUEehbOJAJ6Hh7Yv4nqu7fEh95HUQK7Ed56rMLKpmdorYO49JtewkEUsj
+LJn7tcxMUuOcWKHMPu6vB/63f6Ulthqp1SEG8aNBaZMuPyLWAPAJc2okOmkiSbvO
+0Hxe6BtAGn2fUo2jK6E3tD/dsIR2qqMlL09FkACGT8D5Lfh5d3z+lo9DxpXl281R
+ablehPyHgHcIC6cD2/7FwwjzUuyj/kYcETnMs51agcWFAXTom/ehqD+IQ8jZ73zT
+5O4FFgslnNmB/vddh9PeYpjDYdR4y5xMrlMxJ+qcZuQOq7dfaiodq8oj+XPmwgxA
+audX/sHMutOpmOagrsQfaQXaPqRXdQTnuwHacQfwq+tBBhrft5gwt1HE7Ir2ulwD
+Q19kefchkJu/0c1cAGg1VHtQic0a6tX6PrwqZOMDfpSywcImMCF4KHgD2EC5/8h6
+tq0PqPLNcwiM2NhpypCuYmkYZ0gnJ/xAwtM85Ck9nmPFptLSd0b7YB7dtGsFYY5A
+rhIcq5lZhy06/RRAPluIkniscA50iEO/EXKwzYzovBJh6jQz7oYsbEUW5kwg0gm/
+YPSa6lqv2kTpXS+UiGyeNWdUkr5DpdwKe4lrAsN94HE9/SoLgFvz0X5/WyTssSzo
+IO3WfLfBc7SOkZK1ibcleIqilzd+LSoIqqGrft2yonXgJD3p9xO+Hlldczx2kHmu
+z4lZBq53AkVAQ4os5L7ZRnmxoqKn2XAQRwVH3M9ZFYFEqEyDmZhlFdJSGEnKws81
+Ej48t6KWwqml02cx675bSYI22tL3+RL7AGmlC0/Xh8wIVesgulsYmnhW4BtpBYf2
+fwv5esJJMjkh2LvLNG3edYChugudeZXtcBJdNr0GYRbBAhvO25bRcr6z8nYDusKX
+e/+30vATOcBO/zaOYIwDGT5ZwMQAV1aQl8HyeyYESNjb0fBXQ3OYObOrTTs8MLyC
+I4b6wr1vlbN+lMOm+RIXCDgmC3COdlgCHyo3qiIu2YNYQVoNF4NN4A==
+-----END RSA PRIVATE KEY-----
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/files/public.pub b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/files/public.pub
new file mode 100644
index 00000000..db1847f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/files/public.pub
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkvLTTJdwZ0lg1cUCn13Hi3+ho2+G6/96XuAP7jA7Ghz9NPbC/eqXnjvb27BA8CxtFXYuXR5eZWSq2UN5zFcfrFb57XFxdAg2q21hGEX+FGiTUuRZh8+ByVEh0LUetFTwsEZ1iGv6GZiLBt7IJvClXbyNTJEt3DZncHfGwudyGFviV4dGrzusDAGAcoHqvD/5uXYl4PjMH9oSfraO3sG4Q7soQwxNeiM8qOLf3c1SabHBAtSewwnA0E/jhzpOLD2QUncU5s+Oa9PvEXXhGv5eZo9lp71brsgyWj32m2UuXx/n+EZg78GVJT5mFO7LG239n3gTnwkMVdr6zVBFNX5Mvw== rsa-key-20171025
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/files/public2.pub b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/files/public2.pub
new file mode 100644
index 00000000..2fc64568
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/files/public2.pub
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAhTxbibM8hKZn7xDURs15L3gkcsnpDoZ+tNm5zpP9dcboASnIyJzfC7J/RdRCQsO/pDmUY4y/tsTx18uenyfazxtNkyCHdANlp8XVF1fGNv5GM+QbsDqxe54sdG9csASX0/Ljvl538IbcLFVH0zxyKspbDOgkAkUSuKIAH5x+/GhkAoGQO2tOhYjqofNtUxLSvfRsf4Gm1M0WgdWmz3MW4NOdZhsL4S+STgRPU1jy1dKGj7BKY9cpnCWBFHa2wSaOXJEBZEKNaFVxlBBrFs5brjRQA0mVPmE+pz+/+IJeSNEEma9cXur0ONeb6OoXvkManxKfkaswT2ybOChAzJR8dQ== T-MOBILE \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/meta/main.yaml
new file mode 100644
index 00000000..be631e5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_iosxr_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tasks/cli.yaml
new file mode 100644
index 00000000..36229e75
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tasks/cli.yaml
@@ -0,0 +1,29 @@
+---
+- name: collect all common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ register: common_test_cases
+ delegate_to: localhost
+
+- name: collect all cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- set_fact:
+ test_cases:
+ files: '{{ common_test_cases.files }} + {{ test_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tasks/main.yaml
new file mode 100644
index 00000000..5d082a6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tasks/main.yaml
@@ -0,0 +1,3 @@
+---
+- include: cli.yaml
+- include: netconf.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tasks/netconf.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tasks/netconf.yaml
new file mode 100644
index 00000000..49c17aff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tasks/netconf.yaml
@@ -0,0 +1,37 @@
+---
+- name: collect all common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ register: common_test_cases
+ delegate_to: localhost
+
+- name: collect all netconf test cases
+ find:
+ paths: '{{ role_path }}/tests/netconf'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- set_fact:
+ test_cases:
+ files: '{{ common_test_cases.files }} + {{ test_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.netconf)
+ include: '{{ test_case_to_run }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - netconf
+
+- name: run test case (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local'
+ with_first_found: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags:
+ - local
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tests/cli/basic.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tests/cli/basic.yaml
new file mode 100644
index 00000000..e13fc7dc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tests/cli/basic.yaml
@@ -0,0 +1,182 @@
+---
+- name: Remove users prior to tests
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no username ansibletest1
+ - no username ansibletest2
+ - no username ansibletest3
+ provider: '{{ cli }}'
+
+- name: Create user (SetUp)
+ register: result
+ cisco.iosxr.iosxr_user:
+ name: ansibletest1
+ configured_password: test
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"username" in result.commands[0]'
+ - '"secret" in result.commands[1]'
+
+- name: Create user with update_password always (not idempotent)
+ register: result
+ cisco.iosxr.iosxr_user:
+ name: ansibletest1
+ configured_password: test
+ update_password: always
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"username" in result.commands[0]'
+ - '"secret" in result.commands[0]'
+
+- name: Create user again with update_password on_create (idempotent)
+ register: result
+ cisco.iosxr.iosxr_user:
+ name: ansibletest1
+ configured_password: test
+ update_password: on_create
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
+
+- name: Modify user group
+ register: result
+ cisco.iosxr.iosxr_user:
+ name: ansibletest1
+ configured_password: test
+ update_password: on_create
+ group: sysadmin
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"username" in result.commands[0]'
+ - '"group" in result.commands[0]'
+
+- name: Modify user group again (idempotent)
+ register: result
+ cisco.iosxr.iosxr_user:
+ name: ansibletest1
+ configured_password: test
+ update_password: on_create
+ group: sysadmin
+ state: present
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
+
+- name: Collection of users (SetUp)
+ register: result
+ cisco.iosxr.iosxr_user:
+ aggregate:
+
+ - name: ansibletest2
+
+ - name: ansibletest3
+ configured_password: test
+ state: present
+ group: sysadmin
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"username" in result.commands[0]'
+ - '"secret" in result.commands[1]'
+ - '"group sysadmin" in result.commands[2]'
+ - '"username" in result.commands[3]'
+ - '"secret" in result.commands[4]'
+ - '"group sysadmin" in result.commands[5]'
+
+- name: Add collection of users again with update_password always (not idempotent)
+ register: result
+ cisco.iosxr.iosxr_user:
+ aggregate:
+
+ - name: ansibletest2
+
+ - name: ansibletest3
+ configured_password: test
+ state: present
+ group: sysadmin
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"username" in result.commands[0]'
+ - '"secret" in result.commands[0]'
+ - '"username" in result.commands[1]'
+ - '"secret" in result.commands[1]'
+
+- name: Add collection of users again with update_password on_create (idempotent)
+ register: result
+ cisco.iosxr.iosxr_user:
+ aggregate:
+
+ - name: ansibletest2
+
+ - name: ansibletest3
+ configured_password: test
+ update_password: on_create
+ state: present
+ group: sysadmin
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
+
+- name: Delete collection of users
+ register: result
+ cisco.iosxr.iosxr_user:
+ aggregate:
+
+ - name: ansibletest1
+
+ - name: ansibletest2
+
+ - name: ansibletest3
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands == ["no username ansibletest1", "no username ansibletest2",
+ "no username ansibletest3"]
+
+- name: Delete collection of users again (idempotent)
+ register: result
+ cisco.iosxr.iosxr_user:
+ aggregate:
+
+ - name: ansibletest1
+
+ - name: ansibletest2
+
+ - name: ansibletest3
+ state: absent
+ provider: '{{ cli }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tests/common/auth.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tests/common/auth.yaml
new file mode 100644
index 00000000..adfb7c9a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tests/common/auth.yaml
@@ -0,0 +1,121 @@
+---
+- block:
+
+ - name: Create user with password
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_user:
+ name: auth_user
+ state: present
+ configured_password: pass123
+ provider: '{{ cli }}'
+
+ - name: test login
+ expect:
+ command: ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port|default(22)
+ }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version
+ responses:
+ (?i)password: pass123
+ connection: ansible.netcommon.network_cli
+
+ - name: test login with invalid password (should fail)
+ expect:
+ command: ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port|default(22)
+ }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version
+ responses:
+ (?i)password: badpass
+ ignore_errors: true
+ connection: ansible.netcommon.network_cli
+ register: results
+
+ - name: check that attempt failed
+ assert:
+ that:
+ - results.failed
+
+ - name: create user with private key (contents input)
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_user:
+ name: auth_user
+ state: present
+ public_key_contents: "{{ lookup('file', \"{{ role_path }}/files/public.pub\"\
+ ) }}"
+ provider: '{{ cli }}'
+
+ - name: test login with private key
+ expect:
+ command: ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port|default(22)
+ }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ role_path
+ }}/files/private show version
+ responses:
+ (?i)password: pass123
+ connection: ansible.netcommon.network_cli
+
+ - name: remove user and key
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_user:
+ name: auth_user
+ provider: '{{ cli }}'
+ state: absent
+
+ - name: test login with private key (should fail, no user)
+ expect:
+ command: ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port|default(22)
+ }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ role_path
+ }}/files/private show version
+ responses:
+ (?i)password: pass123
+ ignore_errors: true
+ connection: ansible.netcommon.network_cli
+ register: results
+
+ - name: create user with private key (path input)
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_user:
+ name: auth_user
+ state: present
+ public_key: '{{ role_path }}/files/public.pub'
+ provider: '{{ cli }}'
+
+ - name: test login with private key
+ expect:
+ command: ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port|default(22)
+ }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ role_path
+ }}/files/private show version
+ responses:
+ (?i)password: pass123
+ ignore_errors: true
+ connection: ansible.netcommon.network_cli
+
+ - name: change private key for user
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_user:
+ name: auth_user
+ state: present
+ public_key_contents: "{{ lookup('file', \"{{ role_path }}/files/public2.pub\"\
+ ) }}"
+ provider: '{{ cli }}'
+
+ - name: test login with invalid private key (should fail)
+ expect:
+ command: ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port|default(22)
+ }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ role_path
+ }}/files/private show version
+ responses:
+ (?i)password: pass123
+ ignore_errors: true
+ connection: ansible.netcommon.network_cli
+ register: results
+
+ - name: check that attempt failed
+ assert:
+ that:
+ - results.failed
+ always:
+
+ - name: delete user
+ connection: ansible.netcommon.network_cli
+ register: result
+ cisco.iosxr.iosxr_user:
+ name: auth_user
+ state: absent
+ provider: '{{ cli }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tests/netconf/basic.yaml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tests/netconf/basic.yaml
new file mode 100644
index 00000000..1d4e83d9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/iosxr_user/tests/netconf/basic.yaml
@@ -0,0 +1,193 @@
+---
+- name: Remove users prior to tests
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_config:
+ lines:
+ - no username ansible1
+ - no username ansible2
+ - no username ansible3
+ provider: '{{ cli }}'
+
+- name: Create user (SetUp)
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_user:
+ name: ansible1
+ configured_password: password
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"ansible1" in result.xml[0]'
+ - '"secret" in result.xml[0]'
+
+- name: Create user with update_password always (not idempotent)
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_user:
+ name: ansible1
+ configured_password: password
+ update_password: always
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"ansible1" in result.xml[0]'
+ - '"secret" in result.xml[0]'
+
+- name: Create user again with update_password on_create (idempotent)
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_user:
+ name: ansible1
+ configured_password: password
+ update_password: on_create
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.xml | length == 0
+
+- name: Modify user group
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_user:
+ name: ansible1
+ configured_password: password
+ update_password: on_create
+ group: sysadmin
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"ansible1" in result.xml[0]'
+ - '"sysadmin" in result.xml[0]'
+
+- name: Modify user group again (idempotent)
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_user:
+ name: ansible1
+ configured_password: password
+ update_password: on_create
+ group: sysadmin
+ state: present
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.xml | length == 0
+
+- name: Collection of users (SetUp)
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_user:
+ aggregate:
+
+ - name: ansible2
+
+ - name: ansible3
+ configured_password: password
+ state: present
+ group: sysadmin
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"ansible2" in result.xml[0]'
+ - '"secret" in result.xml[0]'
+ - '"sysadmin" in result.xml[1]'
+ - '"ansible2" in result.xml[0]'
+ - '"secret" in result.xml[0]'
+ - '"sysadmin" in result.xml[1]'
+
+- name: Add collection of users again with update_password always (not idempotent)
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_user:
+ aggregate:
+
+ - name: ansible2
+
+ - name: ansible3
+ configured_password: password
+ state: present
+ group: sysadmin
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"ansible2" in result.xml[0]'
+ - '"ansible3" in result.xml[0]'
+ - '"secret" in result.xml[0]'
+
+- name: Add collection of users again with update_password on_create (idempotent)
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_user:
+ aggregate:
+
+ - name: ansible2
+
+ - name: ansible3
+ configured_password: password
+ update_password: on_create
+ state: present
+ group: sysadmin
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.xml | length == 0
+
+- name: Delete collection of users
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_user:
+ aggregate:
+
+ - name: ansible1
+
+ - name: ansible2
+
+ - name: ansible3
+ state: absent
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"ansible1" in result.xml[0]'
+ - '"ansible2" in result.xml[0]'
+ - '"ansible3" in result.xml[0]'
+
+- name: Delete collection of users again (idempotent)
+ connection: ansible.netcommon.netconf
+ register: result
+ cisco.iosxr.iosxr_user:
+ aggregate:
+
+ - name: ansible1
+
+ - name: ansible2
+
+ - name: ansible3
+ state: absent
+ provider: '{{ netconf }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - result.xml | length == 0
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/prepare_iosxr_tests/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/prepare_iosxr_tests/tasks/main.yml
new file mode 100644
index 00000000..8799387c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/prepare_iosxr_tests/tasks/main.yml
@@ -0,0 +1,16 @@
+---
+- name: Ensure we have loopback 888 for testing
+ connection: ansible.netcommon.network_cli
+ cisco.iosxr.iosxr_config:
+ src: config.j2
+
+- name: Enable Netconf service
+ connection: ansible.netcommon.network_cli
+ tags: netconf
+ cisco.iosxr.iosxr_netconf:
+ netconf_port: 830
+ netconf_vrf: default
+ state: present
+
+- set_fact:
+ shorter_hostname: '{{ inventory_hostname_short| truncate(10, True, "") }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/prepare_iosxr_tests/templates/config.j2 b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/prepare_iosxr_tests/templates/config.j2
new file mode 100644
index 00000000..c8eb3457
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/integration/targets/prepare_iosxr_tests/templates/config.j2
@@ -0,0 +1,4 @@
+interface Loopback888
+ description test for ansible
+ shutdown
+
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/sanity/ignore-2.10.txt b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/sanity/ignore-2.10.txt
new file mode 100644
index 00000000..195b00f6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/sanity/ignore-2.10.txt
@@ -0,0 +1 @@
+plugins/action/iosxr.py action-plugin-docs # base class for deprecated network platform modules using `connection: local
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/sanity/ignore-2.9.txt b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/sanity/ignore-2.9.txt
new file mode 100644
index 00000000..89a6aac5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/sanity/ignore-2.9.txt
@@ -0,0 +1,3 @@
+plugins/action/iosxr.py action-plugin-docs # base class for deprecated network platform modules using `connection: local
+plugins/modules/iosxr_interface.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/iosxr_interface.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/sanity/requirements.txt b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/sanity/requirements.txt
new file mode 100644
index 00000000..3e3a9669
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/sanity/requirements.txt
@@ -0,0 +1,4 @@
+packaging # needed for update-bundled and changelog
+sphinx ; python_version >= '3.5' # docs build requires python 3+
+sphinx-notfound-page ; python_version >= '3.5' # docs build requires python 3+
+straight.plugin ; python_version >= '3.5' # needed for hacking/build-ansible.py which will host changelog generation and requires python 3+
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/builtins.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/builtins.py
new file mode 100644
index 00000000..bfc8adfb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/builtins.py
@@ -0,0 +1,34 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+#
+# Compat for python2.7
+#
+
+# One unittest needs to import builtins via __import__() so we need to have
+# the string that represents it
+try:
+ import __builtin__
+except ImportError:
+ BUILTINS = "builtins"
+else:
+ BUILTINS = "__builtin__"
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/mock.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/mock.py
new file mode 100644
index 00000000..8d265c65
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/mock.py
@@ -0,0 +1,126 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+Compat module for Python3.x's unittest.mock module
+"""
+import sys
+import _io
+
+# Python 2.7
+
+# Note: Could use the pypi mock library on python3.x as well as python2.x. It
+# is the same as the python3 stdlib mock library
+
+try:
+ # Allow wildcard import because we really do want to import all of mock's
+ # symbols into this compat shim
+ # pylint: disable=wildcard-import,unused-wildcard-import
+ from unittest.mock import *
+except ImportError:
+ # Python 2
+ # pylint: disable=wildcard-import,unused-wildcard-import
+ try:
+ from mock import *
+ except ImportError:
+ print("You need the mock library installed on python2.x to run tests")
+
+
+# Prior to 3.4.4, mock_open cannot handle binary read_data
+if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
+ file_spec = None
+
+ def _iterate_read_data(read_data):
+ # Helper for mock_open:
+ # Retrieve lines from read_data via a generator so that separate calls to
+ # readline, read, and readlines are properly interleaved
+ sep = b"\n" if isinstance(read_data, bytes) else "\n"
+ data_as_list = [l + sep for l in read_data.split(sep)]
+
+ if data_as_list[-1] == sep:
+ # If the last line ended in a newline, the list comprehension will have an
+ # extra entry that's just a newline. Remove this.
+ data_as_list = data_as_list[:-1]
+ else:
+ # If there wasn't an extra newline by itself, then the file being
+ # emulated doesn't have a newline to end the last line remove the
+ # newline that our naive format() added
+ data_as_list[-1] = data_as_list[-1][:-1]
+
+ for line in data_as_list:
+ yield line
+
+ def mock_open(mock=None, read_data=""):
+ """
+ A helper function to create a mock to replace the use of `open`. It works
+ for `open` called directly or used as a context manager.
+
+ The `mock` argument is the mock object to configure. If `None` (the
+ default) then a `MagicMock` will be created for you, with the API limited
+ to methods or attributes available on standard file handles.
+
+ `read_data` is a string for the `read` methoddline`, and `readlines` of the
+ file handle to return. This is an empty string by default.
+ """
+
+ def _readlines_side_effect(*args, **kwargs):
+ if handle.readlines.return_value is not None:
+ return handle.readlines.return_value
+ return list(_data)
+
+ def _read_side_effect(*args, **kwargs):
+ if handle.read.return_value is not None:
+ return handle.read.return_value
+ return type(read_data)().join(_data)
+
+ def _readline_side_effect():
+ if handle.readline.return_value is not None:
+ while True:
+ yield handle.readline.return_value
+ for line in _data:
+ yield line
+
+ global file_spec
+ if file_spec is None:
+ file_spec = list(
+ set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO)))
+ )
+
+ if mock is None:
+ mock = MagicMock(name="open", spec=open)
+
+ handle = MagicMock(spec=file_spec)
+ handle.__enter__.return_value = handle
+
+ _data = _iterate_read_data(read_data)
+
+ handle.write.return_value = None
+ handle.read.return_value = None
+ handle.readline.return_value = None
+ handle.readlines.return_value = None
+
+ handle.read.side_effect = _read_side_effect
+ handle.readline.side_effect = _readline_side_effect()
+ handle.readlines.side_effect = _readlines_side_effect
+
+ mock.return_value = handle
+ return mock
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/unittest.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/unittest.py
new file mode 100644
index 00000000..df3379b8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/compat/unittest.py
@@ -0,0 +1,39 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+Compat module for Python2.7's unittest module
+"""
+
+import sys
+
+# Allow wildcard import because we really do want to import all of
+# unittests's symbols into this compat shim
+# pylint: disable=wildcard-import,unused-wildcard-import
+if sys.version_info < (2, 7):
+ try:
+ # Need unittest2 on python2.6
+ from unittest2 import *
+ except ImportError:
+ print("You need unittest2 installed on python2.6.x to run tests")
+else:
+ from unittest import *
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/loader.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/loader.py
new file mode 100644
index 00000000..c21188ee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/loader.py
@@ -0,0 +1,116 @@
+# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import os
+
+from ansible.errors import AnsibleParserError
+from ansible.parsing.dataloader import DataLoader
+from ansible.module_utils._text import to_bytes, to_text
+
+
+class DictDataLoader(DataLoader):
+ def __init__(self, file_mapping=None):
+ file_mapping = {} if file_mapping is None else file_mapping
+ assert type(file_mapping) == dict
+
+ super(DictDataLoader, self).__init__()
+
+ self._file_mapping = file_mapping
+ self._build_known_directories()
+ self._vault_secrets = None
+
+ def load_from_file(self, path, cache=True, unsafe=False):
+ path = to_text(path)
+ if path in self._file_mapping:
+ return self.load(self._file_mapping[path], path)
+ return None
+
+ # TODO: the real _get_file_contents returns a bytestring, so we actually convert the
+ # unicode/text it's created with to utf-8
+ def _get_file_contents(self, path):
+ path = to_text(path)
+ if path in self._file_mapping:
+ return (to_bytes(self._file_mapping[path]), False)
+ else:
+ raise AnsibleParserError("file not found: %s" % path)
+
+ def path_exists(self, path):
+ path = to_text(path)
+ return path in self._file_mapping or path in self._known_directories
+
+ def is_file(self, path):
+ path = to_text(path)
+ return path in self._file_mapping
+
+ def is_directory(self, path):
+ path = to_text(path)
+ return path in self._known_directories
+
+ def list_directory(self, path):
+ ret = []
+ path = to_text(path)
+ for x in list(self._file_mapping.keys()) + self._known_directories:
+ if x.startswith(path):
+ if os.path.dirname(x) == path:
+ ret.append(os.path.basename(x))
+ return ret
+
+ def is_executable(self, path):
+ # FIXME: figure out a way to make paths return true for this
+ return False
+
+ def _add_known_directory(self, directory):
+ if directory not in self._known_directories:
+ self._known_directories.append(directory)
+
+ def _build_known_directories(self):
+ self._known_directories = []
+ for path in self._file_mapping:
+ dirname = os.path.dirname(path)
+ while dirname not in ("/", ""):
+ self._add_known_directory(dirname)
+ dirname = os.path.dirname(dirname)
+
+ def push(self, path, content):
+ rebuild_dirs = False
+ if path not in self._file_mapping:
+ rebuild_dirs = True
+
+ self._file_mapping[path] = content
+
+ if rebuild_dirs:
+ self._build_known_directories()
+
+ def pop(self, path):
+ if path in self._file_mapping:
+ del self._file_mapping[path]
+ self._build_known_directories()
+
+ def clear(self):
+ self._file_mapping = dict()
+ self._known_directories = []
+
+ def get_basedir(self):
+ return os.getcwd()
+
+ def set_vault_secrets(self, vault_secrets):
+ self._vault_secrets = vault_secrets
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/path.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/path.py
new file mode 100644
index 00000000..8e9e368b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/path.py
@@ -0,0 +1,10 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import MagicMock
+from ansible.utils.path import unfrackpath
+
+
+mock_unfrackpath_noop = MagicMock(
+ spec_set=unfrackpath, side_effect=lambda x, *args, **kwargs: x
+)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/procenv.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/procenv.py
new file mode 100644
index 00000000..3c38a990
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/procenv.py
@@ -0,0 +1,94 @@
+# (c) 2016, Matt Davis <mdavis@ansible.com>
+# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import sys
+import json
+
+from contextlib import contextmanager
+from io import BytesIO, StringIO
+from ansible_collections.cisco.iosxr.tests.unit.compat import unittest
+from ansible.module_utils.six import PY3
+from ansible.module_utils._text import to_bytes
+
+
+@contextmanager
+def swap_stdin_and_argv(stdin_data="", argv_data=tuple()):
+ """
+ context manager that temporarily masks the test runner's values for stdin and argv
+ """
+ real_stdin = sys.stdin
+ real_argv = sys.argv
+
+ if PY3:
+ fake_stream = StringIO(stdin_data)
+ fake_stream.buffer = BytesIO(to_bytes(stdin_data))
+ else:
+ fake_stream = BytesIO(to_bytes(stdin_data))
+
+ try:
+ sys.stdin = fake_stream
+ sys.argv = argv_data
+
+ yield
+ finally:
+ sys.stdin = real_stdin
+ sys.argv = real_argv
+
+
+@contextmanager
+def swap_stdout():
+ """
+ context manager that temporarily replaces stdout for tests that need to verify output
+ """
+ old_stdout = sys.stdout
+
+ if PY3:
+ fake_stream = StringIO()
+ else:
+ fake_stream = BytesIO()
+
+ try:
+ sys.stdout = fake_stream
+
+ yield fake_stream
+ finally:
+ sys.stdout = old_stdout
+
+
+class ModuleTestCase(unittest.TestCase):
+ def setUp(self, module_args=None):
+ if module_args is None:
+ module_args = {
+ "_ansible_remote_tmp": "/tmp",
+ "_ansible_keep_remote_files": False,
+ }
+
+ args = json.dumps(dict(ANSIBLE_MODULE_ARGS=module_args))
+
+ # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
+ self.stdin_swap = swap_stdin_and_argv(stdin_data=args)
+ self.stdin_swap.__enter__()
+
+ def tearDown(self):
+ # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
+ self.stdin_swap.__exit__(None, None, None)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/vault_helper.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/vault_helper.py
new file mode 100644
index 00000000..b34ae134
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/vault_helper.py
@@ -0,0 +1,42 @@
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible.module_utils._text import to_bytes
+
+from ansible.parsing.vault import VaultSecret
+
+
+class TextVaultSecret(VaultSecret):
+ """A secret piece of text. ie, a password. Tracks text encoding.
+
+ The text encoding of the text may not be the default text encoding so
+ we keep track of the encoding so we encode it to the same bytes."""
+
+ def __init__(self, text, encoding=None, errors=None, _bytes=None):
+ super(TextVaultSecret, self).__init__()
+ self.text = text
+ self.encoding = encoding or "utf-8"
+ self._bytes = _bytes
+ self.errors = errors or "strict"
+
+ @property
+ def bytes(self):
+ """The text encoded with encoding, unless we specifically set _bytes."""
+ return self._bytes or to_bytes(
+ self.text, encoding=self.encoding, errors=self.errors
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/yaml_helper.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/yaml_helper.py
new file mode 100644
index 00000000..5df30aae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/mock/yaml_helper.py
@@ -0,0 +1,167 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import io
+import yaml
+
+from ansible.module_utils.six import PY3
+from ansible.parsing.yaml.loader import AnsibleLoader
+from ansible.parsing.yaml.dumper import AnsibleDumper
+
+
+class YamlTestUtils(object):
+ """Mixin class to combine with a unittest.TestCase subclass."""
+
+ def _loader(self, stream):
+ """Vault related tests will want to override this.
+
+ Vault cases should setup a AnsibleLoader that has the vault password."""
+ return AnsibleLoader(stream)
+
+ def _dump_stream(self, obj, stream, dumper=None):
+ """Dump to a py2-unicode or py3-string stream."""
+ if PY3:
+ return yaml.dump(obj, stream, Dumper=dumper)
+ else:
+ return yaml.dump(obj, stream, Dumper=dumper, encoding=None)
+
+ def _dump_string(self, obj, dumper=None):
+ """Dump to a py2-unicode or py3-string"""
+ if PY3:
+ return yaml.dump(obj, Dumper=dumper)
+ else:
+ return yaml.dump(obj, Dumper=dumper, encoding=None)
+
+ def _dump_load_cycle(self, obj):
+ # Each pass though a dump or load revs the 'generation'
+ # obj to yaml string
+ string_from_object_dump = self._dump_string(obj, dumper=AnsibleDumper)
+
+ # wrap a stream/file like StringIO around that yaml
+ stream_from_object_dump = io.StringIO(string_from_object_dump)
+ loader = self._loader(stream_from_object_dump)
+ # load the yaml stream to create a new instance of the object (gen 2)
+ obj_2 = loader.get_data()
+
+ # dump the gen 2 objects directory to strings
+ string_from_object_dump_2 = self._dump_string(
+ obj_2, dumper=AnsibleDumper
+ )
+
+ # The gen 1 and gen 2 yaml strings
+ self.assertEqual(string_from_object_dump, string_from_object_dump_2)
+ # the gen 1 (orig) and gen 2 py object
+ self.assertEqual(obj, obj_2)
+
+ # again! gen 3... load strings into py objects
+ stream_3 = io.StringIO(string_from_object_dump_2)
+ loader_3 = self._loader(stream_3)
+ obj_3 = loader_3.get_data()
+
+ string_from_object_dump_3 = self._dump_string(
+ obj_3, dumper=AnsibleDumper
+ )
+
+ self.assertEqual(obj, obj_3)
+ # should be transitive, but...
+ self.assertEqual(obj_2, obj_3)
+ self.assertEqual(string_from_object_dump, string_from_object_dump_3)
+
+ def _old_dump_load_cycle(self, obj):
+ """Dump the passed in object to yaml, load it back up, dump again, compare."""
+ stream = io.StringIO()
+
+ yaml_string = self._dump_string(obj, dumper=AnsibleDumper)
+ self._dump_stream(obj, stream, dumper=AnsibleDumper)
+
+ yaml_string_from_stream = stream.getvalue()
+
+ # reset stream
+ stream.seek(0)
+
+ loader = self._loader(stream)
+ # loader = AnsibleLoader(stream, vault_password=self.vault_password)
+ obj_from_stream = loader.get_data()
+
+ stream_from_string = io.StringIO(yaml_string)
+ loader2 = self._loader(stream_from_string)
+ # loader2 = AnsibleLoader(stream_from_string, vault_password=self.vault_password)
+ obj_from_string = loader2.get_data()
+
+ stream_obj_from_stream = io.StringIO()
+ stream_obj_from_string = io.StringIO()
+
+ if PY3:
+ yaml.dump(
+ obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper
+ )
+ yaml.dump(
+ obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper
+ )
+ else:
+ yaml.dump(
+ obj_from_stream,
+ stream_obj_from_stream,
+ Dumper=AnsibleDumper,
+ encoding=None,
+ )
+ yaml.dump(
+ obj_from_stream,
+ stream_obj_from_string,
+ Dumper=AnsibleDumper,
+ encoding=None,
+ )
+
+ yaml_string_stream_obj_from_stream = stream_obj_from_stream.getvalue()
+ yaml_string_stream_obj_from_string = stream_obj_from_string.getvalue()
+
+ stream_obj_from_stream.seek(0)
+ stream_obj_from_string.seek(0)
+
+ if PY3:
+ yaml_string_obj_from_stream = yaml.dump(
+ obj_from_stream, Dumper=AnsibleDumper
+ )
+ yaml_string_obj_from_string = yaml.dump(
+ obj_from_string, Dumper=AnsibleDumper
+ )
+ else:
+ yaml_string_obj_from_stream = yaml.dump(
+ obj_from_stream, Dumper=AnsibleDumper, encoding=None
+ )
+ yaml_string_obj_from_string = yaml.dump(
+ obj_from_string, Dumper=AnsibleDumper, encoding=None
+ )
+
+ assert yaml_string == yaml_string_obj_from_stream
+ assert (
+ yaml_string
+ == yaml_string_obj_from_stream
+ == yaml_string_obj_from_string
+ )
+ assert (
+ yaml_string
+ == yaml_string_obj_from_stream
+ == yaml_string_obj_from_string
+ == yaml_string_stream_obj_from_stream
+ == yaml_string_stream_obj_from_string
+ )
+ assert obj == obj_from_stream
+ assert obj == obj_from_string
+ assert obj == yaml_string_obj_from_stream
+ assert obj == yaml_string_obj_from_string
+ assert (
+ obj
+ == obj_from_stream
+ == obj_from_string
+ == yaml_string_obj_from_stream
+ == yaml_string_obj_from_string
+ )
+ return {
+ "obj": obj,
+ "yaml_string": yaml_string,
+ "yaml_string_from_stream": yaml_string_from_stream,
+ "obj_from_stream": obj_from_stream,
+ "obj_from_string": obj_from_string,
+ "yaml_string_obj_from_string": yaml_string_obj_from_string,
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/conftest.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/conftest.py
new file mode 100644
index 00000000..e19a1e04
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/conftest.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2017 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+
+import pytest
+
+from ansible.module_utils.six import string_types
+from ansible.module_utils._text import to_bytes
+from ansible.module_utils.common._collections_compat import MutableMapping
+
+
+@pytest.fixture
+def patch_ansible_module(request, mocker):
+ if isinstance(request.param, string_types):
+ args = request.param
+ elif isinstance(request.param, MutableMapping):
+ if "ANSIBLE_MODULE_ARGS" not in request.param:
+ request.param = {"ANSIBLE_MODULE_ARGS": request.param}
+ if "_ansible_remote_tmp" not in request.param["ANSIBLE_MODULE_ARGS"]:
+ request.param["ANSIBLE_MODULE_ARGS"][
+ "_ansible_remote_tmp"
+ ] = "/tmp"
+ if (
+ "_ansible_keep_remote_files"
+ not in request.param["ANSIBLE_MODULE_ARGS"]
+ ):
+ request.param["ANSIBLE_MODULE_ARGS"][
+ "_ansible_keep_remote_files"
+ ] = False
+ args = json.dumps(request.param)
+ else:
+ raise Exception(
+ "Malformed data to the patch_ansible_module pytest fixture"
+ )
+
+ mocker.patch("ansible.module_utils.basic._ANSIBLE_ARGS", to_bytes(args))
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/__init__.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/dir_7all b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/dir_7all
new file mode 100644
index 00000000..b992498c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/dir_7all
@@ -0,0 +1,6 @@
+Directory of disk0:
+file1
+file2
+
+Directory of flash0:
+file3
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_acls_config.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_acls_config.cfg
new file mode 100644
index 00000000..d9c32dd6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_acls_config.cfg
@@ -0,0 +1,5 @@
+ipv4 access-list acl_2
+ 10 deny ipv4 any any
+ 20 permit tcp host 192.168.1.100 any
+ipv6 access-list acl6_1
+ 10 deny icmpv6 any any
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_config_config.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_config_config.cfg
new file mode 100644
index 00000000..afad9d08
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_config_config.cfg
@@ -0,0 +1,12 @@
+!
+hostname router
+!
+interface GigabitEthernet0/0
+ ip address 1.2.3.4 255.255.255.0
+ description test string
+!
+interface GigabitEthernet0/1
+ ip address 6.7.8.9 255.255.255.0
+ description test string
+ shutdown
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_config_src.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_config_src.cfg
new file mode 100644
index 00000000..b3d8961a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_config_src.cfg
@@ -0,0 +1,11 @@
+!
+hostname foo
+!
+interface GigabitEthernet0/0
+ no ip address
+!
+interface GigabitEthernet0/1
+ ip address 6.7.8.9 255.255.255.0
+ description test string
+ shutdown
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_ospf_interfaces.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_ospf_interfaces.cfg
new file mode 100644
index 00000000..3f982bc1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_ospf_interfaces.cfg
@@ -0,0 +1,9 @@
+router ospf LAB3
+ area 0.0.0.3
+ interface GigabitEthernet0/0/0/0
+ cost 20
+ authentication message-digest keychain cisco
+ !
+ !
+!
+
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_ospfv2.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_ospfv2.cfg
new file mode 100644
index 00000000..8645482e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_ospfv2.cfg
@@ -0,0 +1,8 @@
+Sun Jun 14 12:10:47.455 UTC
+router ospf 30
+ cost 2
+ default-metric 10
+ area 11
+ default-cost 5
+ !
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_ospfv3.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_ospfv3.cfg
new file mode 100644
index 00000000..b52c0ee0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_ospfv3.cfg
@@ -0,0 +1,8 @@
+Sun Jun 14 12:10:47.455 UTC
+router ospfv3 30
+ cost 2
+ default-metric 10
+ area 11
+ default-cost 5
+ !
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_static_routes_config.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_static_routes_config.cfg
new file mode 100644
index 00000000..36c9eb23
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_static_routes_config.cfg
@@ -0,0 +1,18 @@
+Fri Nov 29 21:10:41.896 UTC
+router static
+ address-family ipv4 unicast
+ 192.0.2.16/28 FastEthernet0/0/0/1 192.0.2.10 tag 10 description LAB metric 120
+ 192.0.2.16/28 FastEthernet0/0/0/5 track ip_sla_1
+ 192.0.2.32/28 192.0.2.11 100
+ !
+ address-family ipv6 unicast
+ 2001:db8:1000::/36 FastEthernet0/0/0/7 description DC
+ 2001:db8:1000::/36 FastEthernet0/0/0/8 2001:db8:2000:2::1
+ !
+ vrf DEV_SITE
+ address-family ipv4 unicast
+ 192.0.2.48/28 vrf test_1 192.0.2.12 description DEV
+ 192.0.2.80/28 vrf test_1 FastEthernet0/0/0/2 192.0.2.14 vrflabel 124 track ip_sla_2
+ !
+ !
+! \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_system_config.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_system_config.cfg
new file mode 100644
index 00000000..fc6fd2b7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_system_config.cfg
@@ -0,0 +1,8 @@
+hostname iosxr01
+domain name eng.ansible.com
+domain lookup disable
+domain lookup source-interface MgmtEth0/0/CPU0/0
+domain list redhat.com
+domain list cisco.com
+domain name-server 8.8.8.8
+domain name-server 8.8.4.4
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_user_config.cfg b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_user_config.cfg
new file mode 100644
index 00000000..0f0ab168
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/iosxr_user_config.cfg
@@ -0,0 +1,8 @@
+username admin
+ secret 5 $1$mdQIUxjg$3t3lzBpfKfITKvFm1uEIY.
+ group sysadmin
+!
+username ansible
+ secret 5 $1$3yWSXiIi$VdzV59ChiurrNdGxlDeAW/
+ group sysadmin
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_interfaces b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_interfaces
new file mode 100644
index 00000000..d68907c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_interfaces
@@ -0,0 +1,41 @@
+Loopback0 is up, line protocol is up
+ Interface state transitions: 1
+ Hardware is Loopback interface(s)
+ Description: Loopback
+ Internet address is 192.168.0.3/32
+ MTU 1500 bytes, BW 0 Kbit
+ reliability Unknown, txload Unknown, rxload Unknown
+ Encapsulation Loopback, loopback not set,
+ Last link flapped 12w1d
+ Last input Unknown, output Unknown
+ Last clearing of "show interface" counters Unknown
+ Input/output data rate is disabled.
+
+GigabitEthernet0/0/0/0 is up, line protocol is up
+ Interface state transitions: 1
+ Hardware is GigabitEthernet, address is fa16.3e6c.20bd (bia fa16.3e6c.20bd)
+ Description: to nxos01
+ Internet address is 10.0.0.5/30
+ MTU 1514 bytes, BW 1000000 Kbit (Max: 1000000 Kbit)
+ reliability 255/255, txload 0/255, rxload 0/255
+ Encapsulation ARPA,
+ Full-duplex, 1000Mb/s, unknown, link type is force-up
+ output flow control is off, input flow control is off
+ Carrier delay (up) is 10 msec
+ loopback not set,
+ Last link flapped 12w1d
+ ARP type ARPA, ARP timeout 04:00:00
+ Last input 00:00:44, output 00:12:45
+ Last clearing of "show interface" counters never
+ 5 minute input rate 0 bits/sec, 0 packets/sec
+ 5 minute output rate 0 bits/sec, 0 packets/sec
+ 150700 packets input, 36897055 bytes, 0 total input drops
+ 0 drops for unrecognized upper-level protocol
+ Received 1 broadcast packets, 150445 multicast packets
+ 0 runts, 0 giants, 0 throttles, 0 parity
+ 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
+ 11691 packets output, 2904632 bytes, 0 total output drops
+ Output 1 broadcast packets, 11436 multicast packets
+ 0 output errors, 0 underruns, 0 applique, 0 resets
+ 0 output buffer failures, 0 output buffers swapped out
+ 1 carrier transitions
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_ipv6_interface b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_ipv6_interface
new file mode 100644
index 00000000..971d1f65
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_ipv6_interface
@@ -0,0 +1,5 @@
+Loopback0 is Up, ipv6 protocol is Up, Vrfid is default (0x60000000)
+ IPv6 is disabled, link-local address unassigned
+ No global unicast address is configured
+GigabitEthernet0/0/0/0 is Up, ipv6 protocol is Up, Vrfid is default (0x60000000)
+ IPv6 is disabled, link-local address unassigned
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_lldp b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_lldp
new file mode 100644
index 00000000..60ab287f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_lldp
@@ -0,0 +1 @@
+% LLDP is not enabled
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_lldp_neighbors_detail b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_lldp_neighbors_detail
new file mode 100644
index 00000000..60ab287f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_lldp_neighbors_detail
@@ -0,0 +1 @@
+% LLDP is not enabled
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_memory_summary b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_memory_summary
new file mode 100644
index 00000000..b26abeae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_memory_summary
@@ -0,0 +1,5 @@
+Physical Memory: 3095M total (1499M available)
+ Application Memory : 2893M (1499M available)
+ Image: 73M (bootram: 73M)
+ Reserved: 128M, IOMem: 0, flashfsys: 0
+ Total shared window: 23M
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_running-config b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_running-config
new file mode 100644
index 00000000..085baef4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_running-config
@@ -0,0 +1,43 @@
+hostname iosxr01
+service timestamps log datetime msec
+service timestamps debug datetime msec
+telnet vrf default ipv4 server max-servers 10
+telnet vrf Mgmt-intf ipv4 server max-servers 10
+domain name eng.ansible.com
+domain lookup disable
+vrf Mgmt-intf
+ address-family ipv4 unicast
+ !
+ address-family ipv6 unicast
+ !
+!
+line template vty
+ timestamp
+ exec-timeout 720 0
+!
+line console
+ exec-timeout 0 0
+!
+line default
+ exec-timeout 720 0
+!
+vty-pool default 0 50
+control-plane
+ management-plane
+ inband
+ interface all
+ allow all
+ !
+ !
+ !
+!
+interface Loopback0
+ description Loopback
+ ipv4 address 192.168.0.1 255.255.255.255
+!
+interface GigabitEthernet0/0/0/0
+ description to nxos01
+ cdp
+ ipv4 address 10.0.0.1 255.255.255.252
+!
+end
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_version b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_version
new file mode 100644
index 00000000..faecfffd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_version
@@ -0,0 +1,84 @@
+Cisco IOS XR Software, Version 6.0.0[Default]
+Copyright (c) 2015 by Cisco Systems, Inc.
+
+ROM: GRUB, Version 1.99(0), DEV RELEASE
+
+iosxr01 uptime is 11 weeks, 2 days, 5 hours, 48 minutes
+System image file is "bootflash:disk0/xrvr-os-mbi-6.0.0/mbixrvr-rp.vm"
+
+cisco IOS XRv Series (Pentium Celeron Stepping 3) processor with 3169911K bytes of memory.
+Pentium Celeron Stepping 3 processor at 3836MHz, Revision 2.174
+IOS XRv Chassis
+
+1 Management Ethernet
+6 GigabitEthernet
+97070k bytes of non-volatile configuration memory.
+866M bytes of hard disk.
+2321392k bytes of disk0: (Sector size 512 bytes).
+
+Configuration register on node 0/0/CPU0 is 0x2102
+Boot device on node 0/0/CPU0 is disk0:
+Package active on node 0/0/CPU0:
+iosxr-infra, V 6.0.0[Default], Cisco Systems, at disk0:iosxr-infra-6.0.0
+ Built on Thu Dec 24 08:53:49 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+iosxr-fwding, V 6.0.0[Default], Cisco Systems, at disk0:iosxr-fwding-6.0.0
+ Built on Thu Dec 24 08:53:49 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+iosxr-routing, V 6.0.0[Default], Cisco Systems, at disk0:iosxr-routing-6.0.0
+ Built on Thu Dec 24 08:53:49 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+iosxr-ce, V 6.0.0[Default], Cisco Systems, at disk0:iosxr-ce-6.0.0
+ Built on Thu Dec 24 08:53:49 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+xrvr-os-mbi, V 6.0.0[Default], Cisco Systems, at disk0:xrvr-os-mbi-6.0.0
+ Built on Thu Dec 24 08:54:41 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+xrvr-base, V 6.0.0[Default], Cisco Systems, at disk0:xrvr-base-6.0.0
+ Built on Thu Dec 24 08:53:49 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+xrvr-fwding, V 6.0.0[Default], Cisco Systems, at disk0:xrvr-fwding-6.0.0
+ Built on Thu Dec 24 08:53:49 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+xrvr-mgbl-x, V 6.0.0[Default], Cisco Systems, at disk0:xrvr-mgbl-x-6.0.0
+ Built on Thu Dec 24 08:53:57 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+iosxr-mpls, V 6.0.0[Default], Cisco Systems, at disk0:iosxr-mpls-6.0.0
+ Built on Thu Dec 24 08:53:49 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+iosxr-mgbl, V 6.0.0[Default], Cisco Systems, at disk0:iosxr-mgbl-6.0.0
+ Built on Thu Dec 24 08:53:49 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+iosxr-mcast, V 6.0.0[Default], Cisco Systems, at disk0:iosxr-mcast-6.0.0
+ Built on Thu Dec 24 08:53:49 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+xrvr-mcast-supp, V 6.0.0[Default], Cisco Systems, at disk0:xrvr-mcast-supp-6.0.0
+ Built on Thu Dec 24 08:53:49 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+iosxr-bng, V 6.0.0[Default], Cisco Systems, at disk0:iosxr-bng-6.0.0
+ Built on Thu Dec 24 08:53:47 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+xrvr-bng-supp, V 6.0.0[Default], Cisco Systems, at disk0:xrvr-bng-supp-6.0.0
+ Built on Thu Dec 24 08:53:47 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+iosxr-security, V 6.0.0[Default], Cisco Systems, at disk0:iosxr-security-6.0.0
+ Built on Thu Dec 24 08:53:41 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
+
+xrvr-fullk9-x, V 6.0.0[Default], Cisco Systems, at disk0:xrvr-fullk9-x-6.0.0
+ Built on Thu Dec 24 08:55:12 UTC 2015
+ By iox-lnx-010 in /auto/srcarchive16/production/6.0.0/xrvr/workspace for pie
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_version___utility_head_-n_20 b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_version___utility_head_-n_20
new file mode 100644
index 00000000..7f82039f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_version___utility_head_-n_20
@@ -0,0 +1,18 @@
+Cisco IOS XR Software, Version 6.0.0[Default]
+Copyright (c) 2015 by Cisco Systems, Inc.
+
+ROM: GRUB, Version 1.99(0), DEV RELEASE
+
+iosxr01 uptime is 11 weeks, 6 days, 2 hours, 2 minutes
+System image file is "bootflash:disk0/xrvr-os-mbi-6.0.0/mbixrvr-rp.vm"
+
+cisco IOS XRv Series (Pentium Celeron Stepping 3) processor with 3169911K bytes
+of memory.
+Pentium Celeron Stepping 3 processor at 3836MHz, Revision 2.174
+IOS XRv Chassis
+
+1 Management Ethernet
+6 GigabitEthernet
+97070k bytes of non-volatile configuration memory.
+866M bytes of hard disk.
+2321392k bytes of disk0: (Sector size 512 bytes).
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_version_brief b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_version_brief
new file mode 100644
index 00000000..7f82039f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/fixtures/show_version_brief
@@ -0,0 +1,18 @@
+Cisco IOS XR Software, Version 6.0.0[Default]
+Copyright (c) 2015 by Cisco Systems, Inc.
+
+ROM: GRUB, Version 1.99(0), DEV RELEASE
+
+iosxr01 uptime is 11 weeks, 6 days, 2 hours, 2 minutes
+System image file is "bootflash:disk0/xrvr-os-mbi-6.0.0/mbixrvr-rp.vm"
+
+cisco IOS XRv Series (Pentium Celeron Stepping 3) processor with 3169911K bytes
+of memory.
+Pentium Celeron Stepping 3 processor at 3836MHz, Revision 2.174
+IOS XRv Chassis
+
+1 Management Ethernet
+6 GigabitEthernet
+97070k bytes of non-volatile configuration memory.
+866M bytes of hard disk.
+2321392k bytes of disk0: (Sector size 512 bytes).
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/iosxr_module.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/iosxr_module.py
new file mode 100644
index 00000000..728c071c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/iosxr_module.py
@@ -0,0 +1,105 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import os
+import json
+
+from ansible_collections.cisco.iosxr.tests.unit.modules.utils import (
+ AnsibleExitJson,
+ AnsibleFailJson,
+ ModuleTestCase,
+)
+
+
+fixture_path = os.path.join(os.path.dirname(__file__), "fixtures")
+fixture_data = {}
+
+
+def load_fixture(name):
+ path = os.path.join(fixture_path, name)
+
+ if path in fixture_data:
+ return fixture_data[path]
+
+ with open(path) as f:
+ data = f.read()
+
+ try:
+ data = json.loads(data)
+ except Exception:
+ pass
+
+ fixture_data[path] = data
+ return data
+
+
+class TestIosxrModule(ModuleTestCase):
+ def execute_module(
+ self,
+ failed=False,
+ changed=False,
+ commands=None,
+ sort=True,
+ defaults=False,
+ ):
+
+ self.load_fixtures(commands)
+
+ if failed:
+ result = self.failed()
+ self.assertTrue(result["failed"], result)
+ else:
+ result = self.changed(changed)
+ self.assertEqual(result["changed"], changed, result)
+
+ if commands is not None:
+ if sort:
+ self.assertEqual(
+ sorted(commands),
+ sorted(result["commands"]),
+ result["commands"],
+ )
+ else:
+ self.assertEqual(
+ commands, result["commands"], result["commands"]
+ )
+
+ return result
+
+ def failed(self):
+ with self.assertRaises(AnsibleFailJson) as exc:
+ self.module.main()
+
+ result = exc.exception.args[0]
+ self.assertTrue(result["failed"], result)
+ return result
+
+ def changed(self, changed=False):
+ with self.assertRaises(AnsibleExitJson) as exc:
+ self.module.main()
+
+ result = exc.exception.args[0]
+ self.assertEqual(result["changed"], changed, result)
+ return result
+
+ def load_fixtures(self, commands=None):
+ pass
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_acls.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_acls.py
new file mode 100644
index 00000000..ab265fbf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_acls.py
@@ -0,0 +1,361 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import patch
+from ansible_collections.cisco.iosxr.plugins.modules import iosxr_acls
+from ansible_collections.cisco.iosxr.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .iosxr_module import TestIosxrModule, load_fixture
+
+
+class TestIosxrAclsModule(TestIosxrModule):
+ module = iosxr_acls
+
+ def setUp(self):
+ super(TestIosxrAclsModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.acls.acls.AclsFacts.get_device_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosxrAclsModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def _prepare(self):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("iosxr_acls_config.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_iosxr_acls_merged(self):
+ self._prepare()
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="acl_1",
+ aces=[
+ dict(
+ sequence="10",
+ grant="permit",
+ protocol="ospf",
+ source=dict(prefix="192.168.1.0/24"),
+ destination=dict(any="true"),
+ log="true",
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="merged",
+ )
+ )
+ commands = [
+ "ipv4 access-list acl_1",
+ "10 permit ospf 192.168.1.0 0.0.0.255 any log",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_acls_merged_idempotent(self):
+ self._prepare()
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="acl_2",
+ aces=[
+ dict(
+ sequence="10",
+ grant="deny",
+ protocol="ipv4",
+ destination=dict(any="true"),
+ source=dict(any="true"),
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_acls_replaced(self):
+ self._prepare()
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="acl_2",
+ aces=[
+ dict(
+ sequence="30",
+ grant="permit",
+ protocol="ospf",
+ source=dict(prefix="10.0.0.0/8"),
+ destination=dict(any="true"),
+ log="true",
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="replaced",
+ )
+ )
+ commands = [
+ "ipv4 access-list acl_2",
+ "no 10",
+ "no 20",
+ "30 permit ospf 10.0.0.0 0.255.255.255 any log",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_acls_replaced_idempotent(self):
+ self._prepare()
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="acl_2",
+ aces=[
+ dict(
+ sequence="10",
+ grant="deny",
+ protocol="ipv4",
+ destination=dict(any="true"),
+ source=dict(any="true"),
+ ),
+ dict(
+ sequence="20",
+ grant="permit",
+ protocol="tcp",
+ destination=dict(any="true"),
+ source=dict(host="192.168.1.100"),
+ ),
+ ],
+ )
+ ],
+ )
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_acls_overridden(self):
+ self._prepare()
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="acl_2",
+ aces=[
+ dict(
+ sequence="40",
+ grant="permit",
+ protocol="ospf",
+ source=dict(any="true"),
+ destination=dict(any="true"),
+ log="true",
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="overridden",
+ )
+ )
+ commands = [
+ "no ipv6 access-list acl6_1",
+ "ipv4 access-list acl_2",
+ "no 10",
+ "no 20",
+ "40 permit ospf any any log",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_acls_overridden_idempotent(self):
+ self._prepare()
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="acl_2",
+ aces=[
+ dict(
+ sequence="10",
+ grant="deny",
+ protocol="ipv4",
+ destination=dict(any="true"),
+ source=dict(any="true"),
+ ),
+ dict(
+ sequence="20",
+ grant="permit",
+ protocol="tcp",
+ destination=dict(any="true"),
+ source=dict(host="192.168.1.100"),
+ ),
+ ],
+ )
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(
+ name="acl6_1",
+ aces=[
+ dict(
+ sequence="10",
+ grant="deny",
+ protocol="icmpv6",
+ destination=dict(any="true"),
+ source=dict(any="true"),
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_acls_deletedacls(self):
+ self._prepare()
+ set_module_args(
+ dict(
+ config=[dict(afi="ipv6", acls=[dict(name="acl6_1")])],
+ state="deleted",
+ )
+ )
+ commands = ["no ipv6 access-list acl6_1"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_acls_deletedafis(self):
+ self._prepare()
+ set_module_args(dict(config=[dict(afi="ipv4")], state="deleted"))
+ commands = ["no ipv4 access-list acl_2"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_acls_rendered(self):
+ self._prepare()
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="acl_2",
+ aces=[
+ dict(
+ grant="permit",
+ source=dict(any="true"),
+ destination=dict(any="true"),
+ protocol="igmp",
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="rendered",
+ )
+ )
+ commands = ["ipv4 access-list acl_2", "permit igmp any any"]
+ result = self.execute_module(changed=False)
+ self.assertEqual(
+ sorted(result["rendered"]), sorted(commands), result["rendered"]
+ )
+
+ def test_iosxr_acls_overridden_on_empty_config(self):
+ self.execute_show_command.return_value = ""
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="acl_1",
+ aces=[
+ dict(
+ sequence="10",
+ grant="deny",
+ source=dict(any=True),
+ destination=dict(any=True),
+ protocol="ip",
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="overridden",
+ )
+ )
+ cmds = ["ipv4 access-list acl_1", "10 deny ip any any"]
+ self.execute_module(changed=True, commands=cmds)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_command.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_command.py
new file mode 100644
index 00000000..8b149c5c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_command.py
@@ -0,0 +1,128 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import patch
+from ansible_collections.cisco.iosxr.plugins.modules import iosxr_command
+from ansible_collections.cisco.iosxr.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .iosxr_module import TestIosxrModule, load_fixture
+
+
+class TestIosxrCommandModule(TestIosxrModule):
+
+ module = iosxr_command
+
+ def setUp(self):
+ super(TestIosxrCommandModule, self).setUp()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.iosxr.plugins.modules.iosxr_command.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ def tearDown(self):
+ super(TestIosxrCommandModule, self).tearDown()
+
+ self.mock_run_commands.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+
+ for item in commands:
+ try:
+ command = item["command"]
+ except Exception:
+ command = item
+ filename = str(command).replace(" ", "_")
+ output.append(load_fixture(filename))
+ return output
+
+ self.run_commands.side_effect = load_from_file
+
+ def test_iosxr_command_simple(self):
+ set_module_args(dict(commands=["show version"]))
+ result = self.execute_module()
+ self.assertEqual(len(result["stdout"]), 1)
+ self.assertTrue(
+ result["stdout"][0].startswith("Cisco IOS XR Software")
+ )
+
+ def test_iosxr_command_multiple(self):
+ set_module_args(dict(commands=["show version", "show version"]))
+ result = self.execute_module()
+ self.assertEqual(len(result["stdout"]), 2)
+ self.assertTrue(
+ result["stdout"][0].startswith("Cisco IOS XR Software")
+ )
+
+ def test_iosxr_command_wait_for(self):
+ wait_for = 'result[0] contains "Cisco IOS"'
+ set_module_args(dict(commands=["show version"], wait_for=wait_for))
+ self.execute_module()
+
+ def test_iosxr_command_wait_for_fails(self):
+ wait_for = 'result[0] contains "test string"'
+ set_module_args(dict(commands=["show version"], wait_for=wait_for))
+ self.execute_module(failed=True)
+ self.assertEqual(self.run_commands.call_count, 10)
+
+ def test_iosxr_command_retries(self):
+ wait_for = 'result[0] contains "test string"'
+ set_module_args(
+ dict(commands=["show version"], wait_for=wait_for, retries=2)
+ )
+ self.execute_module(failed=True)
+ self.assertEqual(self.run_commands.call_count, 2)
+
+ def test_iosxr_command_match_any(self):
+ wait_for = [
+ 'result[0] contains "Cisco IOS"',
+ 'result[0] contains "test string"',
+ ]
+ set_module_args(
+ dict(commands=["show version"], wait_for=wait_for, match="any")
+ )
+ self.execute_module()
+
+ def test_iosxr_command_match_all(self):
+ wait_for = [
+ 'result[0] contains "Cisco IOS"',
+ 'result[0] contains "XR Software"',
+ ]
+ set_module_args(
+ dict(commands=["show version"], wait_for=wait_for, match="all")
+ )
+ self.execute_module()
+
+ def test_iosxr_command_match_all_failure(self):
+ wait_for = [
+ 'result[0] contains "Cisco IOS"',
+ 'result[0] contains "test string"',
+ ]
+ commands = ["show version", "show version"]
+ set_module_args(
+ dict(commands=commands, wait_for=wait_for, match="all")
+ )
+ self.execute_module(failed=True)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_config.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_config.py
new file mode 100644
index 00000000..ee7499b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_config.py
@@ -0,0 +1,308 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import (
+ patch,
+ MagicMock,
+)
+from ansible_collections.cisco.iosxr.plugins.modules import iosxr_config
+from ansible_collections.cisco.iosxr.plugins.cliconf.iosxr import Cliconf
+from ansible_collections.cisco.iosxr.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .iosxr_module import TestIosxrModule, load_fixture
+
+
+class TestIosxrConfigModule(TestIosxrModule):
+
+ module = iosxr_config
+
+ def setUp(self):
+ super(TestIosxrConfigModule, self).setUp()
+
+ self.patcher_get_config = patch(
+ "ansible_collections.cisco.iosxr.plugins.modules.iosxr_config.get_config"
+ )
+ self.mock_get_config = self.patcher_get_config.start()
+
+ self.patcher_exec_command = patch(
+ "ansible_collections.cisco.iosxr.plugins.modules.iosxr_config.load_config"
+ )
+ self.mock_exec_command = self.patcher_exec_command.start()
+
+ self.mock_get_connection = patch(
+ "ansible_collections.cisco.iosxr.plugins.modules.iosxr_config.get_connection"
+ )
+ self.get_connection = self.mock_get_connection.start()
+
+ self.conn = self.get_connection()
+ self.conn.edit_config = MagicMock()
+
+ self.cliconf_obj = Cliconf(MagicMock())
+ self.running_config = load_fixture("iosxr_config_config.cfg")
+
+ def tearDown(self):
+ super(TestIosxrConfigModule, self).tearDown()
+
+ self.patcher_get_config.stop()
+ self.patcher_exec_command.stop()
+ self.mock_get_connection.stop()
+
+ def load_fixtures(self, commands=None):
+ config_file = "iosxr_config_config.cfg"
+ self.mock_get_config.return_value = load_fixture(config_file)
+ self.mock_exec_command.return_value = "dummy diff"
+
+ def test_iosxr_config_unchanged(self):
+ src = load_fixture("iosxr_config_config.cfg")
+ set_module_args(dict(src=src))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(src, src)
+ )
+ self.execute_module()
+
+ def test_iosxr_config_src(self):
+ src = load_fixture("iosxr_config_src.cfg")
+ set_module_args(dict(src=src))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(src, self.running_config)
+ )
+ commands = [
+ "hostname foo",
+ "interface GigabitEthernet0/0",
+ "no ip address",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_config_backup(self):
+ set_module_args(dict(backup=True))
+ result = self.execute_module()
+ self.assertIn("__backup__", result)
+
+ def test_iosxr_config_lines_wo_parents(self):
+ lines = ["hostname foo"]
+ set_module_args(dict(lines=lines))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ commands = ["hostname foo"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_config_lines_w_parents(self):
+ lines = ["shutdown"]
+ parents = ["interface GigabitEthernet0/0"]
+ set_module_args(dict(lines=lines, parents=parents))
+ module = MagicMock()
+ module.params = {"lines": lines, "parents": parents, "src": None}
+ candidate_config = iosxr_config.get_candidate(module)
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ candidate_config, self.running_config
+ )
+ )
+ commands = ["interface GigabitEthernet0/0", "shutdown"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_config_before(self):
+ lines = ["hostname foo"]
+ set_module_args(dict(lines=lines, before=["test1", "test2"]))
+ commands = ["test1", "test2", "hostname foo"]
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_iosxr_config_after(self):
+ lines = ["hostname foo"]
+ set_module_args(dict(lines=lines, after=["test1", "test2"]))
+ commands = ["hostname foo", "test1", "test2"]
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_iosxr_config_before_after_no_change(self):
+ lines = ["hostname router"]
+ set_module_args(
+ dict(
+ lines=lines,
+ before=["test1", "test2"],
+ after=["test3", "test4"],
+ )
+ )
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ self.execute_module()
+
+ def test_iosxr_config_config(self):
+ config = "hostname localhost"
+ lines = ["hostname router"]
+ set_module_args(dict(lines=["hostname router"], config=config))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff("\n".join(lines), config)
+ )
+ commands = ["hostname router"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_config_replace_block(self):
+ lines = ["description test string", "test string"]
+ parents = ["interface GigabitEthernet0/0"]
+ set_module_args(dict(lines=lines, replace="block", parents=parents))
+ commands = parents + lines
+
+ module = MagicMock()
+ module.params = {"lines": lines, "parents": parents, "src": None}
+ candidate_config = iosxr_config.get_candidate(module)
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ candidate_config,
+ self.running_config,
+ diff_replace="block",
+ path=parents,
+ )
+ )
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_config_force(self):
+ lines = ["hostname router"]
+ set_module_args(dict(lines=lines, force=True))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config, diff_match="none"
+ )
+ )
+ self.execute_module(changed=True, commands=lines)
+
+ def test_iosxr_config_admin(self):
+ lines = ["username admin", "group root-system", "secret P@ssw0rd"]
+ set_module_args(dict(lines=lines, admin=True))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ self.execute_module(changed=True, commands=lines)
+
+ def test_iosxr_config_match_none(self):
+ lines = ["ip address 1.2.3.4 255.255.255.0", "description test string"]
+ parents = ["interface GigabitEthernet0/0"]
+ set_module_args(dict(lines=lines, parents=parents, match="none"))
+ commands = parents + lines
+ module = MagicMock()
+ module.params = {"lines": lines, "parents": parents, "src": None}
+ candidate_config = iosxr_config.get_candidate(module)
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ candidate_config,
+ self.running_config,
+ diff_match="none",
+ path=parents,
+ )
+ )
+
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_iosxr_config_match_strict(self):
+ lines = [
+ "ip address 1.2.3.4 255.255.255.0",
+ "description test string",
+ "shutdown",
+ ]
+ parents = ["interface GigabitEthernet0/0"]
+ set_module_args(dict(lines=lines, parents=parents, match="strict"))
+ commands = parents + ["shutdown"]
+ module = MagicMock()
+ module.params = {"lines": lines, "parents": parents, "src": None}
+ candidate_config = iosxr_config.get_candidate(module)
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ candidate_config,
+ self.running_config,
+ diff_match="strict",
+ path=parents,
+ )
+ )
+
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_iosxr_config_match_exact(self):
+ lines = [
+ "ip address 1.2.3.4 255.255.255.0",
+ "description test string",
+ "shutdown",
+ ]
+ parents = ["interface GigabitEthernet0/0"]
+ set_module_args(dict(lines=lines, parents=parents, match="exact"))
+ commands = parents + lines
+ module = MagicMock()
+ module.params = {"lines": lines, "parents": parents, "src": None}
+ candidate_config = iosxr_config.get_candidate(module)
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ candidate_config,
+ self.running_config,
+ diff_match="exact",
+ path=parents,
+ )
+ )
+
+ self.execute_module(changed=True, commands=commands, sort=False)
+
+ def test_iosxr_config_src_and_lines_fails(self):
+ args = dict(src="foo", lines="foo")
+ set_module_args(args)
+ self.execute_module(failed=True)
+
+ def test_iosxr_config_src_and_parents_fails(self):
+ args = dict(src="foo", parents="foo")
+ set_module_args(args)
+ self.execute_module(failed=True)
+
+ def test_iosxr_config_match_exact_requires_lines(self):
+ args = dict(match="exact")
+ set_module_args(args)
+ self.execute_module(failed=True)
+
+ def test_iosxr_config_match_strict_requires_lines(self):
+ args = dict(match="strict")
+ set_module_args(args)
+ self.execute_module(failed=True)
+
+ def test_iosxr_config_replace_block_requires_lines(self):
+ args = dict(replace="block")
+ set_module_args(args)
+ self.execute_module(failed=True)
+
+ def test_iosxr_config_replace_config_requires_src(self):
+ args = dict(replace="config")
+ set_module_args(args)
+ self.execute_module(failed=True)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_facts.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_facts.py
new file mode 100644
index 00000000..95951850
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_facts.py
@@ -0,0 +1,117 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import patch
+from ansible_collections.cisco.iosxr.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .iosxr_module import TestIosxrModule, load_fixture
+from ansible_collections.cisco.iosxr.plugins.modules import iosxr_facts
+
+
+class TestIosxrFacts(TestIosxrModule):
+
+ module = iosxr_facts
+
+ def setUp(self):
+ super(TestIosxrFacts, self).setUp()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.legacy.base.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_get_resource_connection = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection = (
+ self.mock_get_resource_connection.start()
+ )
+
+ self.mock_get_capabilities = patch(
+ "ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.legacy.base.get_capabilities"
+ )
+ self.get_capabilities = self.mock_get_capabilities.start()
+ self.get_capabilities.return_value = {
+ "device_info": {
+ "network_os": "iosxr",
+ "network_os_hostname": "iosxr01",
+ "network_os_image": "bootflash:disk0/xrvr-os-mbi-6.1.3/mbixrvr-rp.vm",
+ "network_os_version": "6.1.3[Default]",
+ },
+ "network_api": "cliconf",
+ }
+
+ def tearDown(self):
+ super(TestIosxrFacts, self).tearDown()
+
+ self.mock_run_commands.stop()
+ self.mock_get_capabilities.stop()
+ self.mock_get_resource_connection.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+
+ for item in commands:
+ try:
+ obj = json.loads(item)
+ command = obj["command"]
+ except ValueError:
+ command = item
+ filename = str(command).replace(" ", "_")
+ filename = filename.replace("/", "7")
+ filename = filename.replace("|", "_")
+ output.append(load_fixture(filename))
+ return output
+
+ self.run_commands.side_effect = load_from_file
+
+ def test_iosxr_facts_gather_subset_default(self):
+ set_module_args(dict())
+ result = self.execute_module()
+ ansible_facts = result["ansible_facts"]
+ self.assertIn("hardware", ansible_facts["ansible_net_gather_subset"])
+ self.assertIn("default", ansible_facts["ansible_net_gather_subset"])
+ self.assertIn("interfaces", ansible_facts["ansible_net_gather_subset"])
+ self.assertEqual("iosxr01", ansible_facts["ansible_net_hostname"])
+ self.assertEqual(
+ ["disk0:", "flash0:"], ansible_facts["ansible_net_filesystems"]
+ )
+ self.assertIn(
+ "GigabitEthernet0/0/0/0",
+ ansible_facts["ansible_net_interfaces"].keys(),
+ )
+ self.assertEqual("3095", ansible_facts["ansible_net_memtotal_mb"])
+ self.assertEqual("1499", ansible_facts["ansible_net_memfree_mb"])
+
+ def test_iosxr_facts_gather_subset_config(self):
+ set_module_args({"gather_subset": "config"})
+ result = self.execute_module()
+ ansible_facts = result["ansible_facts"]
+ self.assertIn("default", ansible_facts["ansible_net_gather_subset"])
+ self.assertIn("config", ansible_facts["ansible_net_gather_subset"])
+ self.assertEqual("iosxr01", ansible_facts["ansible_net_hostname"])
+ self.assertIn("ansible_net_config", ansible_facts)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_netconf.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_netconf.py
new file mode 100644
index 00000000..3e8a3473
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_netconf.py
@@ -0,0 +1,114 @@
+# (c) 2017 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import patch
+from ansible_collections.cisco.iosxr.plugins.modules import iosxr_netconf
+from ansible_collections.cisco.iosxr.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .iosxr_module import TestIosxrModule
+
+
+class TestIosxrNetconfModule(TestIosxrModule):
+
+ module = iosxr_netconf
+
+ def setUp(self):
+ super(TestIosxrNetconfModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.iosxr.plugins.modules.iosxr_netconf.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.iosxr.plugins.modules.iosxr_netconf.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestIosxrNetconfModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+
+ def test_iosxr_disable_netconf_service(self):
+ self.get_config.return_value = """
+ netconf-yang agent
+ ssh
+ !
+ ssh server netconf vrf default
+ """
+ self.load_config.return_value = "dummy diff"
+ set_module_args(
+ dict(netconf_port=830, netconf_vrf="default", state="absent")
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "no netconf-yang agent ssh",
+ "no ssh server netconf port 830",
+ "no ssh server netconf vrf default",
+ ],
+ )
+
+ def test_iosxr_enable_netconf_service(self):
+ self.get_config.return_value = ""
+ self.load_config.return_value = "dummy diff"
+ set_module_args(
+ dict(netconf_port=830, netconf_vrf="default", state="present")
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "netconf-yang agent ssh",
+ "ssh server netconf port 830",
+ "ssh server netconf vrf default",
+ ],
+ )
+
+ def test_iosxr_change_netconf_port(self):
+ self.get_config.return_value = """
+ netconf-yang agent
+ ssh
+ !
+ ssh server netconf vrf default
+ """
+ self.load_config.return_value = "dummy diff"
+ set_module_args(dict(netconf_port=9000, state="present"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["ssh server netconf port 9000"])
+
+ def test_iosxr_change_netconf_vrf(self):
+ self.get_config.return_value = """
+ netconf-yang agent
+ ssh
+ !
+ ssh server netconf vrf default
+ """
+ self.load_config.return_value = "dummy diff"
+ set_module_args(dict(netconf_vrf="new_default", state="present"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"], ["ssh server netconf vrf new_default"]
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_ospf_interfaces.py
new file mode 100644
index 00000000..e5cc74ae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_ospf_interfaces.py
@@ -0,0 +1,358 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import patch
+from ansible_collections.cisco.iosxr.plugins.modules import (
+ iosxr_ospf_interfaces,
+)
+from ansible_collections.cisco.iosxr.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .iosxr_module import TestIosxrModule, load_fixture
+
+
+class TestIosxrOspf_InterfacesModule(TestIosxrModule):
+ module = iosxr_ospf_interfaces
+
+ def setUp(self):
+ super(TestIosxrOspf_InterfacesModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.ospf_interfaces.ospf_interfaces."
+ "Ospf_interfacesFacts.get_ospf_interfaces"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosxrOspf_InterfacesModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("iosxr_ospf_interfaces.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_iosxr_ospf_interfaces_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/0/0/1",
+ type="gigabitethernet",
+ address_family=[
+ dict(
+ afi="ipv4",
+ processes=[
+ dict(
+ process_id="LAB1",
+ area=dict(area_id="0.0.0.3"),
+ )
+ ],
+ cost=10,
+ authentication=dict(
+ message_digest=dict(keychain="iosxr")
+ ),
+ )
+ ],
+ )
+ ],
+ state="merged",
+ )
+ )
+ commands = [
+ "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 cost 10",
+ "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 authentication message-digest",
+ "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 authentication message-digest keychain iosxr",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_iosxr_ospf_interfaces_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/0/0/0",
+ type="gigabitethernet",
+ address_family=[
+ dict(
+ afi="ipv4",
+ processes=[
+ dict(
+ process_id="LAB3",
+ area=dict(area_id="0.0.0.3"),
+ )
+ ],
+ cost=20,
+ authentication=dict(
+ message_digest=dict(keychain="cisco")
+ ),
+ )
+ ],
+ )
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_ospf_interfaces_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/0/0/0",
+ type="gigabitethernet",
+ address_family=[
+ dict(
+ afi="ipv4",
+ processes=[
+ dict(
+ process_id="LAB3",
+ area=dict(area_id="0.0.0.3"),
+ )
+ ],
+ cost=40,
+ authentication=dict(
+ message_digest=dict(keychain="ciscoiosxr")
+ ),
+ )
+ ],
+ )
+ ],
+ state="replaced",
+ )
+ )
+ commands = [
+ "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 cost 40",
+ "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest",
+ "router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0 authentication message-digest keychain ciscoiosxr",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_iosxr_ospf_interfaces_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/0/0/0",
+ type="gigabitethernet",
+ address_family=[
+ dict(
+ afi="ipv4",
+ processes=[
+ dict(
+ process_id="LAB3",
+ area=dict(area_id="0.0.0.3"),
+ )
+ ],
+ cost=20,
+ authentication=dict(
+ message_digest=dict(keychain="cisco")
+ ),
+ )
+ ],
+ )
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_ospf_interfaces_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/0/0/4",
+ type="gigabitethernet",
+ address_family=[
+ dict(
+ afi="ipv4",
+ processes=[
+ dict(
+ process_id="LAB4",
+ area=dict(area_id="0.0.0.4"),
+ )
+ ],
+ cost=40,
+ authentication=dict(
+ message_digest=dict(keychain="iosxr")
+ ),
+ )
+ ],
+ )
+ ],
+ state="overridden",
+ )
+ )
+
+ commands = [
+ "no router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0",
+ "router ospf LAB4 area 0.0.0.4 interface GigabitEthernet 0/0/0/4 cost 40",
+ "router ospf LAB4 area 0.0.0.4 interface GigabitEthernet 0/0/0/4 authentication message-digest",
+ "router ospf LAB4 area 0.0.0.4 interface GigabitEthernet 0/0/0/4 authentication message-digest keychain iosxr",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_iosxr_ospf_interfaces_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/0/0/0",
+ type="gigabitethernet",
+ address_family=[
+ dict(
+ afi="ipv4",
+ processes=[
+ dict(
+ process_id="LAB3",
+ area=dict(area_id="0.0.0.3"),
+ )
+ ],
+ cost=20,
+ authentication=dict(
+ message_digest=dict(keychain="cisco")
+ ),
+ )
+ ],
+ )
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_ospf_interfaces_deleted(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(name="GigabitEthernet0/0/0/0", type="gigabitethernet")
+ ],
+ state="deleted",
+ )
+ )
+ commands = [
+ "no router ospf LAB3 area 0.0.0.3 interface GigabitEthernet 0/0/0/0"
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_iosxr_ospf_interfaces_deleted_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(name="GigabitEthernet0/0/0/1", type="gigabitethernet")
+ ],
+ state="deleted",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_ospf_interfaces_parsed(self):
+ set_module_args(
+ dict(
+ running_config="router ospf LAB3\n area 0.0.0.3\n interface GigabitEthernet0/0/0/0\n cost 20\n !\n !\n!",
+ state="parsed",
+ )
+ )
+ result = self.execute_module(changed=False)
+ parsed_list = [
+ dict(
+ name="GigabitEthernet0/0/0/0",
+ type="gigabitethernet",
+ address_family=[
+ dict(
+ afi="ipv4",
+ processes=[
+ dict(
+ process_id="LAB3", area=dict(area_id="0.0.0.3")
+ )
+ ],
+ cost=20,
+ )
+ ],
+ )
+ ]
+ self.assertEqual(parsed_list, result["parsed"])
+
+ def test_iosxr_ospf_interfaces_rendered(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="GigabitEthernet0/0/0/1",
+ type="gigabitethernet",
+ address_family=[
+ dict(
+ afi="ipv4",
+ processes=[
+ dict(
+ process_id="LAB1",
+ area=dict(area_id="0.0.0.3"),
+ )
+ ],
+ cost=10,
+ authentication=dict(
+ message_digest=dict(keychain="iosxr")
+ ),
+ )
+ ],
+ )
+ ],
+ state="rendered",
+ )
+ )
+ commands = [
+ "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 cost 10",
+ "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 authentication message-digest",
+ "router ospf LAB1 area 0.0.0.3 interface GigabitEthernet 0/0/0/1 authentication message-digest keychain iosxr",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(sorted(result["rendered"]), sorted(commands))
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_ospfv2.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_ospfv2.py
new file mode 100644
index 00000000..876cd3e2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_ospfv2.py
@@ -0,0 +1,275 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import patch
+from ansible_collections.cisco.iosxr.plugins.modules import iosxr_ospfv2
+from ansible_collections.cisco.iosxr.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .iosxr_module import TestIosxrModule, load_fixture
+
+
+class TestIosxrOspfV2Module(TestIosxrModule):
+ module = iosxr_ospfv2
+
+ def setUp(self):
+ super(TestIosxrOspfV2Module, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.ospfv2.ospfv2."
+ "Ospfv2Facts.get_ospfv2_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosxrOspfV2Module, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("iosxr_ospfv2.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_iosxr_ospfv2_merged(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="300",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ ),
+ state="merged",
+ )
+ )
+ commands = [
+ "router ospf 300",
+ "cost 2",
+ "default-metric 10",
+ "area 11 default-cost 5",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_iosxr_ospfv2_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="30",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ ),
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_ospfv2_replaced(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="30",
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ ),
+ dict(
+ process_id="40",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ ),
+ ]
+ ),
+ state="replaced",
+ )
+ )
+ commands = [
+ "router ospf 30",
+ "no default-metric 10",
+ "router ospf 40",
+ "cost 2",
+ "default-metric 10",
+ "area 11 default-cost 5",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_iosxr_ospfv2_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="30",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ ),
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_ospfv2_overridden(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="40",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ ),
+ state="overridden",
+ )
+ )
+
+ commands = [
+ "router ospf 30",
+ "no cost 2",
+ "no default-metric 10",
+ "no area 11 default-cost 5",
+ "router ospf 40",
+ "cost 2",
+ "default-metric 10",
+ "area 11 default-cost 5",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_iosxr_ospfv2_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="30",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ ),
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_ospfv2_deleted(self):
+ set_module_args(
+ dict(
+ config=dict(processes=[dict(process_id="30", cost=2)]),
+ state="deleted",
+ )
+ )
+ commands = [
+ "router ospf 30",
+ "no cost 2",
+ "no default-metric 10",
+ "no area 11 default-cost 5",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_iosxr_ospfv2_parsed(self):
+ set_module_args(
+ dict(
+ running_config="router ospf 50\n cost 2\n area 11\n default-cost 5\n !\n!",
+ state="parsed",
+ )
+ )
+ result = self.execute_module(changed=False)
+ parsed_list = {
+ "processes": [
+ dict(
+ process_id="50",
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ }
+ self.assertEqual(parsed_list, result["parsed"])
+
+ def test_iosxr_ospfv2_rendered(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="60",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ ),
+ state="rendered",
+ )
+ )
+ commands = [
+ "area 11 default-cost 5",
+ "cost 2",
+ "default-metric 10",
+ "router ospf 60",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(sorted(result["rendered"]), commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_ospfv3.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_ospfv3.py
new file mode 100644
index 00000000..229fe68a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_ospfv3.py
@@ -0,0 +1,275 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import patch
+from ansible_collections.cisco.iosxr.plugins.modules import iosxr_ospfv3
+from ansible_collections.cisco.iosxr.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .iosxr_module import TestIosxrModule, load_fixture
+
+
+class TestIosxrOspfV3Module(TestIosxrModule):
+ module = iosxr_ospfv3
+
+ def setUp(self):
+ super(TestIosxrOspfV3Module, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module."
+ "get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.providers.providers.CliProvider.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.ospfv3.ospfv3."
+ "Ospfv3Facts.get_ospfv3_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosxrOspfV3Module, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("iosxr_ospfv3.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_iosxr_ospfv3_merged(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="300",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ ),
+ state="merged",
+ )
+ )
+ commands = [
+ "router ospfv3 300",
+ "cost 2",
+ "default-metric 10",
+ "area 11 default-cost 5",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_iosxr_ospfv3_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="30",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ ),
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_ospfv3_replaced(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="30",
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ ),
+ dict(
+ process_id="40",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ ),
+ ]
+ ),
+ state="replaced",
+ )
+ )
+ commands = [
+ "router ospfv3 30",
+ "no default-metric 10",
+ "router ospfv3 40",
+ "cost 2",
+ "default-metric 10",
+ "area 11 default-cost 5",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_iosxr_ospfv3_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="30",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ ),
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_ospfv3_overridden(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="40",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ ),
+ state="overridden",
+ )
+ )
+
+ commands = [
+ "router ospfv3 30",
+ "no cost 2",
+ "no default-metric 10",
+ "no area 11 default-cost 5",
+ "router ospfv3 40",
+ "cost 2",
+ "default-metric 10",
+ "area 11 default-cost 5",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_iosxr_ospfv3_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="30",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ ),
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_ospfv3_deleted(self):
+ set_module_args(
+ dict(
+ config=dict(processes=[dict(process_id="30", cost=2)]),
+ state="deleted",
+ )
+ )
+ commands = [
+ "router ospfv3 30",
+ "no cost 2",
+ "no default-metric 10",
+ "no area 11 default-cost 5",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_iosxr_ospfv3_parsed(self):
+ set_module_args(
+ dict(
+ running_config="router ospfv3 50\n cost 2\n area 11\n default-cost 5\n !\n!",
+ state="parsed",
+ )
+ )
+ result = self.execute_module(changed=False)
+ parsed_list = {
+ "processes": [
+ dict(
+ process_id="50",
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ }
+ self.assertEqual(parsed_list, result["parsed"])
+
+ def test_iosxr_ospfv3_rendered(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="60",
+ default_metric=10,
+ cost=2,
+ areas=[dict(area_id="11", default_cost=5)],
+ )
+ ]
+ ),
+ state="rendered",
+ )
+ )
+ commands = [
+ "area 11 default-cost 5",
+ "cost 2",
+ "default-metric 10",
+ "router ospfv3 60",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(sorted(result["rendered"]), commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_static_routes.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_static_routes.py
new file mode 100644
index 00000000..448078be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_static_routes.py
@@ -0,0 +1,338 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import patch
+from ansible_collections.cisco.iosxr.plugins.modules import iosxr_static_routes
+from ansible_collections.cisco.iosxr.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .iosxr_module import TestIosxrModule, load_fixture
+
+
+class TestIosxrStaticRoutesModule(TestIosxrModule):
+ module = iosxr_static_routes
+
+ def setUp(self):
+ super(TestIosxrStaticRoutesModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.iosxr.plugins.module_utils.network.iosxr.facts.static_routes.static_routes.Static_routesFacts.get_device_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestIosxrStaticRoutesModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None):
+ def load_from_file(*args, **kwargs):
+ return load_fixture("iosxr_static_routes_config.cfg")
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_iosxr_static_routes_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="dev_site",
+ address_families=[
+ dict(
+ afi="ipv6",
+ safi="unicast",
+ routes=[
+ dict(
+ dest="1200:10::/64",
+ next_hops=[
+ dict(
+ interface="GigabitEthernet0/0/0/1",
+ admin_distance=55,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="merged",
+ )
+ )
+ commands = [
+ "router static",
+ "vrf dev_site",
+ "address-family ipv6 unicast",
+ "1200:10::/64 GigabitEthernet0/0/0/1 55",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_static_routes_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="DEV_SITE",
+ address_families=[
+ dict(
+ afi="ipv4",
+ safi="unicast",
+ routes=[
+ dict(
+ dest="192.0.2.48/28",
+ next_hops=[
+ dict(
+ interface="192.0.2.12",
+ description="DEV",
+ dest_vrf="test_1",
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_static_routes_default(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ safi="unicast",
+ routes=[
+ dict(
+ dest="192.168.1.0/24",
+ next_hops=[
+ dict(
+ interface="GigabitEthernet0/0/0/2",
+ track="ip_sla_2",
+ vrflabel=1200,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ )
+ ]
+ )
+ )
+ commands = [
+ "router static",
+ "address-family ipv4 unicast",
+ "192.168.1.0/24 GigabitEthernet0/0/0/2 track ip_sla_2 vrflabel 1200",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_static_routes_default_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ safi="unicast",
+ routes=[
+ dict(
+ dest="192.0.2.32/28",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.11",
+ admin_distance=100,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ )
+ ]
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_static_routes_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ safi="unicast",
+ routes=[
+ dict(
+ dest="192.0.2.16/28",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.11",
+ admin_distance=100,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ )
+ ],
+ state="replaced",
+ )
+ )
+ commands = [
+ "router static",
+ "address-family ipv4 unicast",
+ "no 192.0.2.16/28 192.0.2.10 FastEthernet0/0/0/1",
+ "no 192.0.2.16/28 FastEthernet0/0/0/5",
+ "192.0.2.16/28 192.0.2.11 100",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_static_routes_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ safi="unicast",
+ routes=[
+ dict(
+ dest="192.0.2.16/28",
+ next_hops=[
+ dict(
+ interface="FastEthernet0/0/0/5",
+ track="ip_sla_1",
+ ),
+ dict(
+ interface="FastEthernet0/0/0/1",
+ forward_router_address="192.0.2.10",
+ tag=10,
+ description="LAB",
+ metric=120,
+ ),
+ ],
+ )
+ ],
+ )
+ ]
+ )
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_iosxr_static_routes_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="DEV_SITE_NEW",
+ address_families=[
+ dict(
+ afi="ipv4",
+ safi="unicast",
+ routes=[
+ dict(
+ dest="192.0.4.16/28",
+ next_hops=[
+ dict(
+ interface="FastEthernet0/0/0/5",
+ track="ip_sla_1",
+ ),
+ dict(
+ interface="FastEthernet0/0/0/1",
+ forward_router_address="192.0.2.10",
+ tag=10,
+ description="LAB",
+ metric=120,
+ ),
+ ],
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="overridden",
+ )
+ )
+ commands = [
+ "router static",
+ "no address-family ipv4 unicast",
+ "no address-family ipv6 unicast",
+ "no vrf DEV_SITE",
+ "vrf DEV_SITE_NEW",
+ "address-family ipv4 unicast",
+ "192.0.4.16/28 192.0.2.10 FastEthernet0/0/0/1 description LAB metric 120 tag 10",
+ "192.0.4.16/28 FastEthernet0/0/0/5 track ip_sla_1",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_static_routes_deleted_afi(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(address_families=[dict(afi="ipv4", safi="unicast")])
+ ],
+ state="deleted",
+ )
+ )
+
+ commands = ["router static", "no address-family ipv4 unicast"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_static_routes_deleted_vrf(self):
+ set_module_args(dict(config=[dict(vrf="DEV_SITE")], state="deleted"))
+
+ commands = ["router static", "no vrf DEV_SITE"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_static_routes_deleted_all(self):
+ set_module_args(dict(state="deleted"))
+
+ commands = ["no router static"]
+ self.execute_module(changed=True, commands=commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_system.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_system.py
new file mode 100644
index 00000000..60bdee83
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_system.py
@@ -0,0 +1,123 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import patch
+from ansible_collections.cisco.iosxr.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .iosxr_module import TestIosxrModule, load_fixture
+from ansible_collections.cisco.iosxr.plugins.modules import iosxr_system
+
+
+class TestIosxrSystemModule(TestIosxrModule):
+
+ module = iosxr_system
+
+ def setUp(self):
+ super(TestIosxrSystemModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.iosxr.plugins.modules.iosxr_system.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.iosxr.plugins.modules.iosxr_system.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_is_cliconf = patch(
+ "ansible_collections.cisco.iosxr.plugins.modules.iosxr_system.is_cliconf"
+ )
+ self.is_cliconf = self.mock_is_cliconf.start()
+
+ def tearDown(self):
+ super(TestIosxrSystemModule, self).tearDown()
+
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None):
+ self.get_config.return_value = load_fixture("iosxr_system_config.cfg")
+ self.load_config.return_value = dict(diff=None, session="session")
+ self.is_cliconf.return_value = True
+
+ def test_iosxr_system_hostname_changed(self):
+ set_module_args(dict(hostname="foo"))
+ commands = ["hostname foo", "no domain lookup disable"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_system_domain_name(self):
+ set_module_args(dict(domain_name="test.com"))
+ commands = ["domain name test.com", "no domain lookup disable"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_system_domain_search(self):
+ set_module_args(dict(domain_search=["ansible.com", "redhat.com"]))
+ commands = [
+ "domain list ansible.com",
+ "no domain list cisco.com",
+ "no domain lookup disable",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_system_lookup_source(self):
+ set_module_args(dict(lookup_source="Ethernet1"))
+ commands = [
+ "domain lookup source-interface Ethernet1",
+ "no domain lookup disable",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_system_lookup_enabled(self):
+ set_module_args(dict(lookup_enabled=True))
+ commands = ["no domain lookup disable"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_system_name_servers(self):
+ name_servers = ["8.8.8.8", "8.8.4.4", "1.1.1.1"]
+ set_module_args(dict(name_servers=name_servers))
+ self.execute_module(changed=True)
+
+ def test_iosxr_system_state_absent(self):
+ set_module_args(dict(state="absent"))
+ commands = [
+ "no hostname",
+ "no domain name",
+ "no domain lookup disable",
+ "no domain lookup source-interface MgmtEth0/0/CPU0/0",
+ "no domain list redhat.com",
+ "no domain list cisco.com",
+ "no domain name-server 8.8.8.8",
+ "no domain name-server 8.8.4.4",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_iosxr_system_no_change(self):
+ set_module_args(
+ dict(
+ hostname="iosxr01",
+ domain_name="eng.ansible.com",
+ lookup_enabled=False,
+ )
+ )
+ self.execute_module()
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_user.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_user.py
new file mode 100644
index 00000000..1f546c9d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/network/iosxr/test_iosxr_user.py
@@ -0,0 +1,129 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import patch
+from ansible_collections.cisco.iosxr.plugins.modules import iosxr_user
+from ansible_collections.cisco.iosxr.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .iosxr_module import TestIosxrModule, load_fixture
+
+
+class TestIosxrUserModule(TestIosxrModule):
+
+ module = iosxr_user
+
+ def setUp(self):
+ super(TestIosxrUserModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.iosxr.plugins.modules.iosxr_user.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.iosxr.plugins.modules.iosxr_user.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_is_cliconf = patch(
+ "ansible_collections.cisco.iosxr.plugins.modules.iosxr_user.is_cliconf"
+ )
+ self.is_cliconf = self.mock_is_cliconf.start()
+
+ def tearDown(self):
+ super(TestIosxrUserModule, self).tearDown()
+
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_is_cliconf.stop()
+
+ def load_fixtures(self, commands=None, transport="cli"):
+ self.get_config.return_value = load_fixture("iosxr_user_config.cfg")
+ self.load_config.return_value = dict(diff=None, session="session")
+ self.is_cliconf.return_value = True
+
+ def test_iosxr_user_delete(self):
+ set_module_args(dict(name="ansible", state="absent"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["no username ansible"])
+
+ def test_iosxr_user_password(self):
+ set_module_args(dict(name="ansible", configured_password="test"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["username ansible secret test"])
+
+ def test_iosxr_user_purge(self):
+ set_module_args(dict(purge=True))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["no username ansible"])
+
+ def test_iosxr_user_group(self):
+ set_module_args(dict(name="ansible", group="sysadmin"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"], ["username ansible group sysadmin"]
+ )
+
+ def test_iosxr_user_update_password_changed(self):
+ set_module_args(
+ dict(
+ name="test",
+ configured_password="test",
+ update_password="on_create",
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"], ["username test", "username test secret test"]
+ )
+
+ def test_iosxr_user_update_password_on_create_ok(self):
+ set_module_args(
+ dict(
+ name="ansible",
+ configured_password="test",
+ update_password="on_create",
+ )
+ )
+ self.execute_module()
+
+ def test_iosxr_user_update_password_always(self):
+ set_module_args(
+ dict(
+ name="ansible",
+ configured_password="test",
+ update_password="always",
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["username ansible secret test"])
+
+ def test_iosxr_user_admin_mode(self):
+ set_module_args(
+ dict(name="ansible-2", configured_password="test-2", admin=True)
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["username ansible-2", "username ansible-2 secret test-2"],
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/utils.py b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/utils.py
new file mode 100644
index 00000000..f6edc4b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/modules/utils.py
@@ -0,0 +1,51 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import json
+
+from ansible_collections.cisco.iosxr.tests.unit.compat import unittest
+from ansible_collections.cisco.iosxr.tests.unit.compat.mock import patch
+from ansible.module_utils import basic
+from ansible.module_utils._text import to_bytes
+
+
+def set_module_args(args):
+ if "_ansible_remote_tmp" not in args:
+ args["_ansible_remote_tmp"] = "/tmp"
+ if "_ansible_keep_remote_files" not in args:
+ args["_ansible_keep_remote_files"] = False
+
+ args = json.dumps({"ANSIBLE_MODULE_ARGS": args})
+ basic._ANSIBLE_ARGS = to_bytes(args)
+
+
+class AnsibleExitJson(Exception):
+ pass
+
+
+class AnsibleFailJson(Exception):
+ pass
+
+
+def exit_json(*args, **kwargs):
+ if "changed" not in kwargs:
+ kwargs["changed"] = False
+ raise AnsibleExitJson(kwargs)
+
+
+def fail_json(*args, **kwargs):
+ kwargs["failed"] = True
+ raise AnsibleFailJson(kwargs)
+
+
+class ModuleTestCase(unittest.TestCase):
+ def setUp(self):
+ self.mock_module = patch.multiple(
+ basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json
+ )
+ self.mock_module.start()
+ self.mock_sleep = patch("time.sleep")
+ self.mock_sleep.start()
+ set_module_args({})
+ self.addCleanup(self.mock_module.stop)
+ self.addCleanup(self.mock_sleep.stop)
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/requirements.txt b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/requirements.txt
new file mode 100644
index 00000000..a9772bea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tests/unit/requirements.txt
@@ -0,0 +1,42 @@
+boto3
+placebo
+pycrypto
+passlib
+pypsrp
+python-memcached
+pytz
+pyvmomi
+redis
+requests
+setuptools > 0.6 # pytest-xdist installed via requirements does not work with very old setuptools (sanity_ok)
+unittest2 ; python_version < '2.7'
+importlib ; python_version < '2.7'
+netaddr
+ipaddress
+netapp-lib
+solidfire-sdk-python
+
+# requirements for F5 specific modules
+f5-sdk ; python_version >= '2.7'
+f5-icontrol-rest ; python_version >= '2.7'
+deepdiff
+
+# requirement for Fortinet specific modules
+pyFMG
+
+# requirement for aci_rest module
+xmljson
+
+# requirement for winrm connection plugin tests
+pexpect
+
+# requirement for the linode module
+linode-python # APIv3
+linode_api4 ; python_version > '2.6' # APIv4
+
+# requirement for the gitlab module
+python-gitlab
+httmock
+
+# requirment for kubevirt modules
+openshift ; python_version >= '2.7'
diff --git a/collections-debian-merged/ansible_collections/cisco/iosxr/tox.ini b/collections-debian-merged/ansible_collections/cisco/iosxr/tox.ini
new file mode 100644
index 00000000..3da0118f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/iosxr/tox.ini
@@ -0,0 +1,32 @@
+[tox]
+minversion = 1.4.2
+envlist = linters
+skipsdist = True
+
+[testenv]
+deps = -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+
+[testenv:black]
+install_command = pip install {opts} {packages}
+commands =
+ black -v -l79 {toxinidir}
+
+[testenv:linters]
+install_command = pip install {opts} {packages}
+commands =
+ black -v -l79 --diff --check {toxinidir}
+ flake8 {posargs}
+ yamllint -s .
+
+[testenv:venv]
+commands = {posargs}
+
+[flake8]
+# E123, E125 skipped as they are invalid PEP-8.
+
+show-source = True
+ignore = E123,E125,E402,W503
+max-line-length = 160
+builtins = _
+exclude = .git,.tox,tests/unit/compat/
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/CHANGELOG.md b/collections-debian-merged/ansible_collections/cisco/meraki/CHANGELOG.md
new file mode 100644
index 00000000..87be8681
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/CHANGELOG.md
@@ -0,0 +1,101 @@
+# Changelog
+
+## v1.3.1
+
+### Bugfixes
+* meraki_device - Rewrite module to be more reliable when hostname is specified
+* meraki_admin - Fix crash when specifying networks parameter
+
+## v1.2.1
+
+### Bugfixes
+* meraki_site_to_site_vpn - Enable idempotency and changed statuses
+
+## v1.2.0
+
+### New Modules
+* meraki_ms_link_aggregation
+
+## v1.1.0
+
+### New Modules
+* meraki_management_interface
+* meraki_mx_uplink
+* meraki_site_to_site_vpn
+
+### New Modules
+* meraki_management_interface
+
+### Features
+* meraki_vlan - Add full DHCP server configuration support
+
+## Bugfixes
+* meraki_mx_l3_firewall - Fix idempotency when 'any' is passed as a parameter
+
+## v1.0.3
+
+### Miscellaneous
+* Remove accidentally added meraki_site_to_site_vpn module which shouldn't have been published
+
+## v1.0.2
+
+### Bugfixes
+* meraki_static_route - Fix idempotency bugs triggered with certain parameters
+* meraki_mx_l3_firewall - Remove unnecessary org lookup which may crash
+
+## v1.0.1
+
+### Bugfixes
+* meraki_mx_l3_firewall - Fix condition where firewall rules wouldn't update
+
+## v1.0.0
+
+### Enhancements
+* meraki_organzation - A confirmation is needed to delete an organization since it can be a catastrophic change
+* meraki_network - Add support for check mode
+* meraki_mr_l3_firewall - Add check mode
+* meraki_mx_l3_firewall - Add check mode
+* meraki_ssid - Add support for check mode
+* meraki_switchport - Add check mode
+* Add template for inventory.networking
+
+### New Modules
+* meraki_intrusion_prevention
+
+## v0.1.1
+
+### Bugfixes
+** Fix some sanity errors
+
+## v0.1.0
+
+### Enhancements
+* diff generation now uses a centralized method instead of per module code
+
+### Bugfixes
+* diff now returns as snakecase instead of camelcase
+* Modules which don't support check mode will now error if check mode is requested
+
+
+## v0.0.1
+
+### New Modules
+* meraki_switch_storm_control
+
+### Documentation
+* Improve type documentation for module parameters
+* Improve HTTP error reporting for 400 errors
+
+### Bugfixes
+* meraki_ssid - Properly formats the walled garden payload to Meraki
+* Fix most linting errors (issue #13)
+* Restructure tests directory
+* Fix comparison check to not crash when comparing a dict to a non-dict (issue #6)
+* Enable integration tests within collection
+* Fix linting errors
+* Fix crash when unbinding a template in check mode with net_id (issue #19)
+* meraki_firewalled_services recognizes net_id
+* Content filtering integration test deletes network after completion
+
+## v0.0.0
+* Initial commit of collection into Ansible Galaxy
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/FILES.json b/collections-debian-merged/ansible_collections/cisco/meraki/FILES.json
new file mode 100644
index 00000000..7fe16085
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/FILES.json
@@ -0,0 +1,1594 @@
+{
+ "files": [
+ {
+ "name": ".",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "CHANGELOG.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c83c95fb547a78342f87bac741a721df22149a61856afcdded44d90054fdaec1",
+ "format": 1
+ },
+ {
+ "name": "plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/meraki.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ebda9dda820d58025091f55f0b3bd99c824b6a0b18cf5374dbae8420e007227b",
+ "format": 1
+ },
+ {
+ "name": "plugins/action",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/inventory",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/meraki",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/meraki/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/meraki/meraki.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "905531f7d6139bb858aa2bca096dd469e274a7635416bc8dbfc9dbd57063699d",
+ "format": 1
+ },
+ {
+ "name": "plugins/filter",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_organization.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5f907f7bd6c204c0b14d1db52ed9b0f95b09e670d3ea7743f63537ef53810464",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_ms_l3_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bd59734f9d396f039f29596887969bfac7ae3dd299d483c70c70a4d22b36c52f",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mr_settings.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cd379307311c8e6f95476bd2ed51129a1a9cbce9f1b9d1d1b1e1623daf4bb244",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_config_template.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "08ad9de33ead9e13e3ed3d88544ba05ddfd95ae6c61325d06bc4e97651ef99b5",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_device.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8efc38d649629e8c5c32787237d3e94d6fac00889dbf3cfe0112920f8a9b7a4f",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_ms_ospf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "def1149cc70ceb281e3ed3dc2ed41ca6cd1e71a0d4ec97b8e5d17773e163a73a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_network.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cd61c9c511dd88eb90dc8a223a1dc81a1f4f620443cd106e3223b192d9c0a992",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_content_filtering.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7f69e043fec7f62efa5b3c7c47003c6c958fefcec67e3849fd3df66861ed5193",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_site_to_site_vpn.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9b23b84064ebe3f7920c67db264514a9f1f68cd145ebabd5ddbcacb76c84da02",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_ms_switchport.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "af59fa3575c0e71e7849821baffe9513836401046ec32a8cc5bcca633408f2e7",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mr_l3_firewall.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d9cb2ad75cf6686a7bd28f0ee500c8367c20f5f04e8c7830523cc3cbecb0bf90",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_switchport.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "af59fa3575c0e71e7849821baffe9513836401046ec32a8cc5bcca633408f2e7",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_ms_storm_control.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a46f5a974df824bb1f719940c0528ede43ccecaba64fbf50bdb3375413850d57",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_site_to_site_firewall.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3e6642b28ed148788356bf28a7d1d2a4b63fa13bfb37a6877c7376b5bb2c7e3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_site_to_site_vpn.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9b23b84064ebe3f7920c67db264514a9f1f68cd145ebabd5ddbcacb76c84da02",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_l3_firewall.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "488f84bfd1aa9e7e20c196ccf54328fe07c4870692b8af66217bebfe78caa57d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_content_filtering.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7f69e043fec7f62efa5b3c7c47003c6c958fefcec67e3849fd3df66861ed5193",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_uplink_bandwidth.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1e29a7945e7b10813907279a8dbd3339f7587e0832f98020f24be9ab72942f3c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_vlan.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5fd455b481345d9f72d54413b359e930bf503dcfc79c9786a7412be3d1068880",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_nat.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6c5169c46925e2b277c46180f28196b0f9c2b69336af33b85ac925c3b5b4f97d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mr_ssid.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "59e7e02a397282220190241c018c22be5b128950c4c3ba9ac4985160db3f3636",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_intrusion_prevention.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "27df2cb35b32c28ea4210d6538ce21959df46edb23f0f74eefdd2ff83bae9201",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_static_route.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "592d352c99d01cf25c8f99888186476c7a12002fc573d07011daee7b976a5645",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mr_rf_profile.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ae1fa0cc6f98d3075bcebd68f3a64145b77eecb6c7cefb4b44ea9165b4b4cf1e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_switch_storm_control.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a46f5a974df824bb1f719940c0528ede43ccecaba64fbf50bdb3375413850d57",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_switch_stack.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4b69c1ff83701c17956c9e4bd7587df0efb58e6709294a1c2ad11775eadd6599",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_malware.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fbe45461689899351b41f387d612000f0ebe03e9666537a1abcc16d2831a9351",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_vlan.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5fd455b481345d9f72d54413b359e930bf503dcfc79c9786a7412be3d1068880",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_firewalled_services.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0613cf3fc9bdd2e51cde3b9b32cbf94a6c764d27610ae0a1b208384dcdf7ebd7",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_webhook.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ba4c8a9de8457e845400412755e8911045369daa7abdaf4d1cb3d4583d78f03e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_admin.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "99c71762a628869683d836a105a341fe005e7e53ebfad49d4f839e50e3d20f0f",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_l2_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dcb05aa9c1bd4a4abf88fdfa9192f16bed91cc63aa8eb2d7e6fee96bf01b7cc1",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_nat.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6c5169c46925e2b277c46180f28196b0f9c2b69336af33b85ac925c3b5b4f97d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_intrusion_prevention.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "27df2cb35b32c28ea4210d6538ce21959df46edb23f0f74eefdd2ff83bae9201",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_management_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b9ac21a825768548919f086c14f49e4073199f9f3f1c971370cac6007c345961",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_alert.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e2e47b4839ce1c567c86a94ebc68d50b2e0e27805a10d7c08f3c86babdfdd784",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_ssid.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "59e7e02a397282220190241c018c22be5b128950c4c3ba9ac4985160db3f3636",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_ms_access_list.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a8de5fc940e2c036bbffbc5f5fb818066ae1ed7cc3b9c6d5f720d861dfd7a863",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_ms_link_aggregation.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ae9bd2aecf70cb11de9153bbd7b861b2dfefe3d2d598f326bc10517d9b5db622",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_switch_access_list.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a8de5fc940e2c036bbffbc5f5fb818066ae1ed7cc3b9c6d5f720d861dfd7a863",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_ms_stack.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4b69c1ff83701c17956c9e4bd7587df0efb58e6709294a1c2ad11775eadd6599",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_l7_firewall.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189278d6458dd473653ec7a5b213e4ab26ea607f40445e87291fb17e65b2c076",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_malware.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fbe45461689899351b41f387d612000f0ebe03e9666537a1abcc16d2831a9351",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_uplink.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1e29a7945e7b10813907279a8dbd3339f7587e0832f98020f24be9ab72942f3c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_syslog.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "db74a7554b581166b2820a415444643c69a729ec8bf8223d17640d0f086f6f8c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_mx_static_route.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "592d352c99d01cf25c8f99888186476c7a12002fc573d07011daee7b976a5645",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/meraki_snmp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "70937b2aa262d6a16dce79265106dff2316135c3b034b7c030796267e3c6466f",
+ "format": 1
+ },
+ {
+ "name": "tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_l7_firewall",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_l7_firewall/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_l7_firewall/tasks/tests.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0bd45ebf7ef1554f5d8d42a6f93b1471813480ea4a806b61c582327cd719dacb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_l7_firewall/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "617754c4028cc50da675746f5b74f3f2282a7136d8b3808da969391cb9bbce7d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_l7_firewall/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a2f0223f94e7b3ac8a2fc3e175f868505568612d55d9b3b30631ab93fa118bd3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_network/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_network/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e077a449cf928a4baf84344e39d4e71540186f245849a75e6551791526dd6d96",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_network/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_ssid",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_auth_user",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_nat",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_nat/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_nat/tasks/tests.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "efa894c594a21000062c96fc37d06a7f545ade22c3f3068f28d2ebb477765890",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_nat/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7d721fb7675ced2f9f23e2b731c75c625e3d550de22eed6a6e188fb8bcc20591",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_nat/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_malware",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_malware/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_malware/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ea3aa66ab9f472e5a48fc0285d52cd41baa5daa9c8b2559996b3ae10020860c2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_malware/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_syslog",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_syslog/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_syslog/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "396d3b72bd49936caeff21f9f5863943365b4cf422db0ac73db7b565e517bfbb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_syslog/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_uplink",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_uplink/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_uplink/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9d4abc0313199c76186bb2b4494019521d34531934cf2400edcb1511a703ddb1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_uplink/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_site_to_site_vpn",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_site_to_site_vpn/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_site_to_site_vpn/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ca03fd940cd053bb8b79f6d2c9677448d3aa55ac99b74063606d4a396e5815c2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_site_to_site_vpn/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_static_route",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_admin",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_admin/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_admin/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2acb8ab430d12a826537a3e3f8acbd1d1d60b16f73a0136de2939d6ccd956684",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_admin/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_webhook",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_webhook/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_webhook/tasks/tests.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dd291984ad73a82bbef5e1cb490e75a109992535e6618349002ac83009453f7e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_webhook/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "53fa9852c9f50ce3ef61cdbfbd87831e062cfd27869b6607c27c7a41225148a7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_webhook/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_snmp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_snmp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_snmp/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1868354c9d8bf9432572c0042c3772c3a2a0564e597a0b1baba53985cf3b47b8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_snmp/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_ospf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_ospf/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_ospf/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "264ac4e354d4f5f7c45a652937ea1fea7111c406c851573f2b24ce1edffb0be0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_alert",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_alert/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_alert/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aec1451cd54fc2d2ff8f5f37ef4d583c76dafd7df45bdb06398350c80df32091",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_alert/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_config_template",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_config_template/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_config_template/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f7778b3c15b3b552efbabd5e1d762541ce7e2a4171e9d5562b093c181517e344",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_config_template/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_rf_profile",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_rf_profile/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_rf_profile/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1fe0fde3236e8e0fe832eb3ff51e4cfc9b3a7da727def5b1b0e48cd0d09f7aac",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_rf_profile/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_settings",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_settings/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_settings/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "534c208490c7f02c8d3bd63e240cef528bb606285542825ec298daddcdfb96f4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_settings/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_organization",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_organization/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_organization/tasks/tests.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c066b25f1d46b51fa6f74fac91376b4d9911bc71a7e85cfddfd61b8d9f3abba3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_organization/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "197afdd10ec2d16f63702c979136a54bca85025209ffdcd516db712ffbe89cde",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_organization/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switchport",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switchport/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switchport/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a42ba87d0fb00912ebe929ab1c003dca4fb8f679356795a6bc33b25703e6d0c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switchport/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_static_route",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_static_route/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_static_route/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f5c658d00c7ac906a17f450a9417aa0ff575af1c211a6b36ee3f128b16a13177",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_static_route/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_storm_control",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_storm_control/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_storm_control/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "66e4a90781fc59e9db5d6003754cb727f843f87fc17b0e4d60f5d3766d14a155",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_storm_control/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_management_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_management_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_management_interface/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f227a0e44f07b10893e4b7476ba8f02e830103c546e3a10c052faea44132dc11",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_management_interface/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_firewalled_services",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_firewalled_services/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_firewalled_services/tasks/tests.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9f03a8444ca9c18df03441f4e043a0b4fefe7a144695cba1615b76506f3bbf4d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_firewalled_services/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1e83581a07172337934cc5c220a258defe30f04086b0c9e6f96f4ec6015fbcce",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_firewalled_services/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_site_to_site_firewall",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_site_to_site_firewall/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_site_to_site_firewall/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d1c0d85ff24d1b9836e7f6075a1a582e7e343c6108e805a8ca6c6618a791cce9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_site_to_site_firewall/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_l3_firewall",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_l3_firewall/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_l3_firewall/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "88e8cdc137a58234a4ae6687871a67f2fbcfb5035db5b005026775af89418210",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mr_l3_firewall/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_access_list",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_access_list/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_access_list/tasks/tests.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5da21e4a9a67b88be6d4f6f0def23e3506c53ee69d44d96138624b703b026645",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_access_list/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "53fa9852c9f50ce3ef61cdbfbd87831e062cfd27869b6607c27c7a41225148a7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_access_list/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ssid",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ssid/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ssid/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5eb485ea77acb835322cb954909342675e5878316e4781b84fff0c0b2408cc5b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ssid/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_device",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_device/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_device/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b031201c016a6706efdadbb335dc8a3206de12e19cf8fd13a3019c555136347a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_device/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "60945d49535300be8e42108658dba31fcd5d665fc40d6f186798e7e0682320ae",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_intrusion_prevention",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_intrusion_prevention/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_intrusion_prevention/tasks/tests.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6d4b7af6eed8d499a60504e8fa4bccbc1ca43a246d6a57317cdcc630fc15a7c5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_intrusion_prevention/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "53fa9852c9f50ce3ef61cdbfbd87831e062cfd27869b6607c27c7a41225148a7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_intrusion_prevention/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_l3_firewall",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_l3_firewall/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_l3_firewall/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ca7817bbb168bcaac393b58d656fe042a8b8d7cac03406308c17886fe602b4e5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_l3_firewall/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_stack",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_stack/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_stack/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cb6fc23b6d89d0a10d49c6cc00c7594884cb4b0cfe100312058156dedd4d9d96",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_switch_stack/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_l2_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_l2_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_mx_l2_interface/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "df7c05d463fd653894e69eb0a96898c53b13f0b5978705750b172210e7b98918",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_l3_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_l3_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_l3_interface/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2168b11d79e603877d3a009c00407323dca32b886ba11fa5b8650d14815c5a5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_content_filtering",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_content_filtering/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_content_filtering/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7d5668f94f2c547c1069abcb680c90d8b738db067a5359611f34d01608de1444",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_content_filtering/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_link_aggregation",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_link_aggregation/meraki_network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_link_aggregation/meraki_network/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_link_aggregation/meraki_network/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "54d47981fa1b84efbdf3aab9b2dc728b66c7534ecf913b16b63953ae4621c96f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_link_aggregation/meraki_network/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_link_aggregation/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_link_aggregation/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1637bcfe452de66b0d7f54e541fcd5a8e12c116bf13dabcfae23baf2c116a01f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_ms_link_aggregation/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_vlan",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_vlan/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_vlan/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "48618057e0b60e10fbabea94ed357002f581400bf2fd9e4423a8290f3b21dcc8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/meraki_vlan/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f13674351f8231c9e60fc923652b1ce94b62357ee00fedaf23ad3af677aff656",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/target-prefixes.network",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b8a734712fe5c9c772fd93a16a62bc6239cc4ed638239fedf060285a4aa6a59c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/inventory.networking.template",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9d54a2c3f4b1395efbc502ccedb40991e10a5f1498e31a1204daf4d90db63169",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/inventory.networking",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2b8976aa168b476b987037a55d7c28ed40c0896c2cc640ad9cbe8c0d2248f913",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.11.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b6aae5e472e01a9829db003c84a4f5ecd68431996f6a0743640e7fa8b8753ea5",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.10.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bbb19107052bb4115830018b69467adc94fdc34e21bb44aa25e6a75647df4687",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.9.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "014a8541fd8acfd7617be7ec00780bd196fb955936f8ffb5077edc7582fdc61e",
+ "format": 1
+ },
+ {
+ "name": "changelogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs/config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8d2d74737a0995d2004ac140be5c94cc8e120c98b32bf00744c7d5508419d2e9",
+ "format": 1
+ },
+ {
+ "name": "changelogs/.plugin-cache.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9e1f01774da475c03b643a81b0fb1c288776329729609b768259dcd0d2f741a6",
+ "format": 1
+ },
+ {
+ "name": "changelogs/CHANGELOG.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f42d5eca0a08b0d1cea0432954f5bb1e30b54f0d2ab6c5ee2f524bb12e492197",
+ "format": 1
+ },
+ {
+ "name": "changelogs/changelog.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4394bcef845d9c0b5d31c0de9abb3bd0c1f6e850723ab72afc671f62ea291d88",
+ "format": 1
+ },
+ {
+ "name": "README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "237d6096aa38511049994468eb8b4001b0f9d3aec0a862dcb361d1a18bdc97f7",
+ "format": 1
+ },
+ {
+ "name": "bugfix",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ }
+ ],
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/MANIFEST.json b/collections-debian-merged/ansible_collections/cisco/meraki/MANIFEST.json
new file mode 100644
index 00000000..6760b338
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/MANIFEST.json
@@ -0,0 +1,36 @@
+{
+ "collection_info": {
+ "namespace": "cisco",
+ "name": "meraki",
+ "version": "2.2.0",
+ "authors": [
+ "Kevin Breit"
+ ],
+ "readme": "README.md",
+ "tags": [
+ "networking",
+ "wireless",
+ "firewall",
+ "switching",
+ "cisco"
+ ],
+ "description": "An Ansible collection for managing the Cisco Meraki Dashboard",
+ "license": [
+ "GPL-3.0-only"
+ ],
+ "license_file": null,
+ "dependencies": {},
+ "repository": "https://github.com/CiscoDevNet/ansible-meraki",
+ "documentation": "",
+ "homepage": "",
+ "issues": "https://github.com/CiscoDevNet/ansible-meraki/issues"
+ },
+ "file_manifest_file": {
+ "name": "FILES.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "21c75b35ac7d0c6dd953a97de11aa76cebcf0a7e09e6985a1ad20568db0f0b0b",
+ "format": 1
+ },
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/README.md b/collections-debian-merged/ansible_collections/cisco/meraki/README.md
new file mode 100644
index 00000000..fdfb88ee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/README.md
@@ -0,0 +1,180 @@
+# cisco.meraki Ansible Collection
+
+Ansible collection for managing and automating Cisco Meraki network environments.
+
+See the CHANGELOG.md file for details of updates in each release.
+
+## Requirements
+
+* Ansible v2.9 or newer is required for collection support
+
+## What is Cisco Meraki?
+
+Cisco Meraki is an easy-to-use, cloud-based, network infrastructure platform for enterprise environments. While most network hardware uses command-line interfaces (CLIs) for configuration, Meraki uses an easy-to-use Dashboard hosted in the Meraki cloud. No on-premises management hardware or software is required - only the network infrastructure to run your business.
+
+### MS Switches
+
+Meraki MS switches come in multiple flavors and form factors. Meraki switches support 10/100/1000/10000 ports, as well as Cisco's mGig technology for 2.5/5/10Gbps copper connectivity. 8, 24, and 48 port flavors are available with PoE (802.3af/802.3at/UPoE) available on many models.
+
+### MX Firewalls
+
+Meraki's MX firewalls support full layer 3-7 deep packet inspection. MX firewalls are compatible with a variety of VPN technologies including IPSec, SSL VPN, and Meraki's easy-to-use AutoVPN.
+
+### MR Wireless Access Points
+
+MR access points are enterprise-class, high-performance access points for the enterprise. MR access points have MIMO technology and integrated beamforming built-in for high performance applications. BLE allows for advanced location applications to be developed with no on-premises analytics platforms.
+
+## Using the Meraki modules
+
+Meraki modules provide a user-friendly interface to manage your Meraki environment using Ansible. For example, details about SNMP settings for a particular organization can be discovered using the module `meraki_snmp <meraki_snmp_module>`.
+
+```
+ - name: Query SNMP settings
+ meraki_snmp:
+ api_key: abc123
+ org_name: AcmeCorp
+ state: query
+ delegate_to: localhost
+```
+
+Information about a particular object can be queried. For example, the `meraki_admin <meraki_admin_module>` module supports
+
+```
+ - name: Gather information about Jane Doe
+ meraki_admin:
+ api_key: abc123
+ org_name: AcmeCorp
+ state: query
+ email: janedoe@email.com
+ delegate_to: localhost
+```
+
+## Common Parameters
+
+All Ansible Meraki modules support the following parameters which affect communication with the Meraki Dashboard API. Most of these should only be used by Meraki developers and not the general public.
+
+* host
+ * Hostname or IP of Meraki Dashboard.
+
+* use_https
+ * Specifies whether communication should be over HTTPS. (Defaults to `yes`)
+
+* use_proxy
+ * Whether to use a proxy for any communication.
+
+* validate_certs
+ * Determine whether certificates should be validated or trusted. (Defaults to `yes`)
+
+These are the common parameters which are used for most every module.
+
+* org_name
+ * Name of organization to perform actions in.
+
+* org_id
+ * ID of organization to perform actions in.
+
+* net_name
+ * Name of network to perform actions in.
+
+* net_id
+ * ID of network to perform actions in.
+
+* state
+ * General specification of what action to take. `query` does lookups. `present` creates or edits. `absent` deletes.
+
+**Note:** Use the `org_id` and `net_id` parameters when possible. `org_name` and `net_name` require additional behind-the-scenes API calls to learn the ID values. `org_id` and `net_id` will perform faster.
+
+## Meraki Authentication
+
+All API access with the Meraki Dashboard requires an API key. An API key can be generated from the organization's settings page. Each play in a playbook requires the `api_key` parameter to be specified.
+
+The "Vault" feature of Ansible allows you to keep sensitive data such as passwords or keys in encrypted files, rather than as plain text in your playbooks or roles. These vault files can then be distributed or placed in source control. See [Using Vaults in playbooks](https://docs.ansible.com/ansible/latest/user_guide/playbooks_vault.html) for more information.
+
+Meraki's API returns a 404 error if the API key is not correct. It does not provide any specific error saying the key is incorrect. If you receive a 404 error, check the API key first.
+
+## Returned Data Structures
+
+Meraki and its related Ansible modules return most information in the form of a list. For example, this is returned information by `meraki_admin` querying administrators. It returns a list even though there's only one.
+
+```
+ [
+ {
+ "orgAccess": "full",
+ "name": "John Doe",
+ "tags": [],
+ "networks": [],
+ "email": "john@doe.com",
+ "id": "12345677890"
+ }
+ ]
+```
+
+## Handling Returned Data
+
+Since Meraki's response data uses lists instead of properly keyed dictionaries for responses, certain strategies should be used when querying data for particular information. For many situations, use the `selectattr()` Jinja2 function.
+
+## Merging Existing and New Data
+
+Ansible's Meraki modules do not allow for manipulating data. For example, you may need to insert a rule in the middle of a firewall ruleset. Ansible and the Meraki modules lack a way to directly merge to manipulate data. However, a playlist can use a few tasks to split the list where you need to insert a rule and then merge them together again with the new rule added. The steps involved are as follows:
+
+1. Create blank "front" and "back" lists.
+```
+ vars:
+ - front_rules: []
+ - back_rules: []
+```
+2. Get existing firewall rules from Meraki and create a new variable.
+```
+ - name: Get firewall rules
+ meraki_mx_l3_firewall:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ delegate_to: localhost
+ register: rules
+ - set_fact:
+ original_ruleset: '{{rules.data}}'
+```
+3. Write the new rule. The new rule needs to be in a list so it can be merged with other lists in an upcoming step. The blank `-` puts the rule in a list so it can be merged.
+```
+ - set_fact:
+ new_rule:
+ -
+ - comment: Block traffic to server
+ src_cidr: 192.0.1.0/24
+ src_port: any
+ dst_cidr: 192.0.1.2/32
+ dst_port: any
+ protocol: any
+ policy: deny
+```
+4. Split the rules into two lists. This assumes the existing ruleset is 2 rules long.
+```
+ - set_fact:
+ front_rules: '{{front_rules + [ original_ruleset[:1] ]}}'
+ - set_fact:
+ back_rules: '{{back_rules + [ original_ruleset[1:] ]}}'
+```
+5. Merge rules with the new rule in the middle.
+```
+ - set_fact:
+ new_ruleset: '{{front_rules + new_rule + back_rules}}'
+```
+6. Upload new ruleset to Meraki.
+```
+ - name: Set two firewall rules
+ meraki_mx_l3_firewall:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ rules: '{{ new_ruleset }}'
+ delegate_to: localhost
+```
+
+## Error Handling
+
+Ansible's Meraki modules will often fail if improper or incompatible parameters are specified. However, there will likely be scenarios where the module accepts the information but the Meraki API rejects the data. If this happens, the error will be returned in the `body` field for HTTP status of 400 return code.
+
+Meraki's API returns a 404 error if the API key is not correct. It does not provide any specific error saying the key is incorrect. If you receive a 404 error, check the API key first. 404 errors can also occur if improper object IDs (ex. `org_id`) are specified.
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/changelogs/.plugin-cache.yaml b/collections-debian-merged/ansible_collections/cisco/meraki/changelogs/.plugin-cache.yaml
new file mode 100644
index 00000000..dd6fad55
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/changelogs/.plugin-cache.yaml
@@ -0,0 +1,185 @@
+plugins:
+ become: {}
+ cache: {}
+ callback: {}
+ cliconf: {}
+ connection: {}
+ httpapi: {}
+ inventory: {}
+ lookup: {}
+ module:
+ meraki_admin:
+ description: Manage administrators in the Meraki cloud
+ name: meraki_admin
+ namespace: ''
+ version_added: 1.0.0
+ meraki_alert:
+ description: Manage alerts in the Meraki cloud
+ name: meraki_alert
+ namespace: ''
+ version_added: 2.1.0
+ meraki_config_template:
+ description: Manage configuration templates in the Meraki cloud
+ name: meraki_config_template
+ namespace: ''
+ version_added: 1.0.0
+ meraki_device:
+ description: Manage devices in the Meraki cloud
+ name: meraki_device
+ namespace: ''
+ version_added: null
+ meraki_firewalled_services:
+ description: Edit firewall policies for administrative network services
+ name: meraki_firewalled_services
+ namespace: ''
+ version_added: null
+ meraki_management_interface:
+ description: Configure Meraki management interfaces
+ name: meraki_management_interface
+ namespace: ''
+ version_added: 1.1.0
+ meraki_mr_l3_firewall:
+ description: Manage MR access point layer 3 firewalls in the Meraki cloud
+ name: meraki_mr_l3_firewall
+ namespace: ''
+ version_added: null
+ meraki_mr_rf_profile:
+ description: Manage RF profiles for Meraki wireless networks
+ name: meraki_mr_rf_profile
+ namespace: ''
+ version_added: null
+ meraki_mr_settings:
+ description: Manage general settings for Meraki wireless networks
+ name: meraki_mr_settings
+ namespace: ''
+ version_added: null
+ meraki_mr_ssid:
+ description: Manage wireless SSIDs in the Meraki cloud
+ name: meraki_mr_ssid
+ namespace: ''
+ version_added: null
+ meraki_ms_access_list:
+ description: Manage access lists for Meraki switches in the Meraki cloud
+ name: meraki_ms_access_list
+ namespace: ''
+ version_added: 0.1.0
+ meraki_ms_l3_interface:
+ description: Manage routed interfaces on MS switches
+ name: meraki_ms_l3_interface
+ namespace: ''
+ version_added: null
+ meraki_ms_link_aggregation:
+ description: Manage link aggregations on MS switches
+ name: meraki_ms_link_aggregation
+ namespace: ''
+ version_added: 1.2.0
+ meraki_ms_ospf:
+ description: Manage OSPF configuration on MS switches
+ name: meraki_ms_ospf
+ namespace: ''
+ version_added: null
+ meraki_ms_stack:
+ description: Modify switch stacking configuration in Meraki.
+ name: meraki_ms_stack
+ namespace: ''
+ version_added: 1.3.0
+ meraki_ms_storm_control:
+ description: Manage storm control configuration on a switch in the Meraki cloud
+ name: meraki_ms_storm_control
+ namespace: ''
+ version_added: 0.0.1
+ meraki_ms_switchport:
+ description: Manage switchports on a switch in the Meraki cloud
+ name: meraki_ms_switchport
+ namespace: ''
+ version_added: null
+ meraki_mx_content_filtering:
+ description: Edit Meraki MX content filtering policies
+ name: meraki_mx_content_filtering
+ namespace: ''
+ version_added: null
+ meraki_mx_intrusion_prevention:
+ description: Manage intrustion prevention in the Meraki cloud
+ name: meraki_mx_intrusion_prevention
+ namespace: ''
+ version_added: null
+ meraki_mx_l2_interface:
+ description: Configure MX layer 2 interfaces
+ name: meraki_mx_l2_interface
+ namespace: ''
+ version_added: 2.1.0
+ meraki_mx_l3_firewall:
+ description: Manage MX appliance layer 3 firewalls in the Meraki cloud
+ name: meraki_mx_l3_firewall
+ namespace: ''
+ version_added: null
+ meraki_mx_l7_firewall:
+ description: Manage MX appliance layer 7 firewalls in the Meraki cloud
+ name: meraki_mx_l7_firewall
+ namespace: ''
+ version_added: null
+ meraki_mx_malware:
+ description: Manage Malware Protection in the Meraki cloud
+ name: meraki_mx_malware
+ namespace: ''
+ version_added: null
+ meraki_mx_nat:
+ description: Manage NAT rules in Meraki cloud
+ name: meraki_mx_nat
+ namespace: ''
+ version_added: null
+ meraki_mx_site_to_site_firewall:
+ description: Manage MX appliance firewall rules for site-to-site VPNs
+ name: meraki_mx_site_to_site_firewall
+ namespace: ''
+ version_added: 1.0.0
+ meraki_mx_site_to_site_vpn:
+ description: Manage AutoVPN connections in Meraki
+ name: meraki_mx_site_to_site_vpn
+ namespace: ''
+ version_added: 1.1.0
+ meraki_mx_static_route:
+ description: Manage static routes in the Meraki cloud
+ name: meraki_mx_static_route
+ namespace: ''
+ version_added: null
+ meraki_mx_uplink_bandwidth:
+ description: Manage uplinks on Meraki MX appliances
+ name: meraki_mx_uplink_bandwidth
+ namespace: ''
+ version_added: 1.1.0
+ meraki_mx_vlan:
+ description: Manage VLANs in the Meraki cloud
+ name: meraki_mx_vlan
+ namespace: ''
+ version_added: null
+ meraki_network:
+ description: Manage networks in the Meraki cloud
+ name: meraki_network
+ namespace: ''
+ version_added: null
+ meraki_organization:
+ description: Manage organizations in the Meraki cloud
+ name: meraki_organization
+ namespace: ''
+ version_added: null
+ meraki_snmp:
+ description: Manage organizations in the Meraki cloud
+ name: meraki_snmp
+ namespace: ''
+ version_added: null
+ meraki_syslog:
+ description: Manage syslog server settings in the Meraki cloud.
+ name: meraki_syslog
+ namespace: ''
+ version_added: null
+ meraki_webhook:
+ description: Manage webhooks configured in the Meraki cloud
+ name: meraki_webhook
+ namespace: ''
+ version_added: null
+ netconf: {}
+ shell: {}
+ strategy: {}
+ vars: {}
+version: 2.2.0
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/changelogs/CHANGELOG.rst b/collections-debian-merged/ansible_collections/cisco/meraki/changelogs/CHANGELOG.rst
new file mode 100644
index 00000000..57e43bcb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/changelogs/CHANGELOG.rst
@@ -0,0 +1,116 @@
+==========================
+Cisco.Meraki Release Notes
+==========================
+
+.. contents:: Topics
+
+
+v2.2.0
+======
+
+Minor Changes
+-------------
+
+- meraki_network - Update documentation to show querying of local or remote settings.
+- meraki_ssid - Add Cisco ISE as a splash page option.
+
+Bugfixes
+--------
+
+- meraki_network - Fix bug where local or remote settings always show changed.
+
+v2.1.3
+======
+
+Bugfixes
+--------
+
+- meraki_device - Support pagination. This allows for more than 1,000 devices to be listed at a time.
+- meraki_network - Support pagination. This allows for more than 1,000 networks to be listed at a time.
+
+v2.1.2
+======
+
+Bugfixes
+--------
+
+- Remove test output as it made the collection, and Ansible, huge.
+
+v2.1.1
+======
+
+Bugfixes
+--------
+
+- meraki_management_interface - Fix crash when modifying a non-MX management interface.
+
+v2.1.0
+======
+
+New Modules
+-----------
+
+- meraki_alert - Manage alerts in the Meraki cloud
+- meraki_mx_l2_interface - Configure MX layer 2 interfaces
+
+v2.0.0
+======
+
+Major Changes
+-------------
+
+- Rewrite requests method for version 1.0 API and improved readability
+- meraki_mr_rf_profile - Configure wireless RF profiles.
+- meraki_mr_settings - Configure network settings for wireless.
+- meraki_ms_l3_interface - New module
+- meraki_ms_ospf - Configure OSPF.
+
+Minor Changes
+-------------
+
+- meraki - Add optional debugging for is_update_required() method.
+- meraki_admin - Update endpoints for API v1
+- meraki_alert - Manage network wide alert settings.
+- meraki_device - Added query parameter
+- meraki_intrusion_prevention - Change documentation to show proper way to clear rules
+- meraki_malware - Update documentation to show how to allow multiple URLs at once.
+- meraki_mx_l2_interface - Configure physical interfaces on MX appliances.
+- meraki_mx_uplink - Renamed to meraki_mx_uplink_bandwidth
+- meraki_ssid - Add `WPA3 Only` and `WPA3 Transition Mode`
+- meraki_switchport - Add support for `access_policy_type` parameter
+
+Breaking Changes / Porting Guide
+--------------------------------
+
+- meraki_device - Changed tags from string to list
+- meraki_device - Removed serial_lldp_cdp parameter
+- meraki_device - Removed serial_uplink parameter
+- meraki_intrusion_prevention - Rename whitedlisted_rules to allowed_rules
+- meraki_mx_l3_firewall - Rule responses are now in a `rules` list
+- meraki_mx_l7_firewall - Rename blacklisted_countries to blocked_countries
+- meraki_mx_l7_firewall - Rename whitelisted_countries to allowed_countries
+- meraki_network - Local and remote status page settings cannot be set during network creation
+- meraki_network - `disableRemoteStatusPage` response is now `remote_status_page_enabled`
+- meraki_network - `disable_my_meraki_com` response is now `local_status_page_enabled`
+- meraki_network - `disable_my_meraki` has been deprecated
+- meraki_network - `enable_my_meraki` is now called `local_status_page_enabled`
+- meraki_network - `enable_remote_status_page` is now called `remote_status_page_enabled`
+- meraki_network - `enabled` response for VLAN status is now `vlans_enabled`
+- meraki_network - `tags` and `type` now return a list
+- meraki_snmp - peer_ips is now a list
+- meraki_switchport - `access_policy_number` is now an int and not a string
+- meraki_switchport - `tags` is now a list and not a string
+- meraki_webhook - Querying test status now uses state of query.
+
+Security Fixes
+--------------
+
+- meraki_webhook - diff output may show data for values set to not display
+
+Bugfixes
+--------
+
+- Remove unnecessary files from the collection package, significantly reduces package size
+- meraki_admin - Fix error when adding network privileges to admin using network name
+- meraki_switch_stack - Fix situation where module may crash due to switch being in or not in a stack already
+- meraki_webhook - Proper response is shown when creating webhook test
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/changelogs/changelog.yaml b/collections-debian-merged/ansible_collections/cisco/meraki/changelogs/changelog.yaml
new file mode 100644
index 00000000..5d955614
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/changelogs/changelog.yaml
@@ -0,0 +1,138 @@
+ancestor: null
+releases:
+ 2.0.0:
+ changes:
+ breaking_changes:
+ - meraki_device - Changed tags from string to list
+ - meraki_device - Removed serial_lldp_cdp parameter
+ - meraki_device - Removed serial_uplink parameter
+ - meraki_intrusion_prevention - Rename whitedlisted_rules to allowed_rules
+ - meraki_mx_l3_firewall - Rule responses are now in a `rules` list
+ - meraki_mx_l7_firewall - Rename blacklisted_countries to blocked_countries
+ - meraki_mx_l7_firewall - Rename whitelisted_countries to allowed_countries
+ - meraki_network - Local and remote status page settings cannot be set during
+ network creation
+ - meraki_network - `disableRemoteStatusPage` response is now `remote_status_page_enabled`
+ - meraki_network - `disable_my_meraki_com` response is now `local_status_page_enabled`
+ - meraki_network - `disable_my_meraki` has been deprecated
+ - meraki_network - `enable_my_meraki` is now called `local_status_page_enabled`
+ - meraki_network - `enable_remote_status_page` is now called `remote_status_page_enabled`
+ - meraki_network - `enabled` response for VLAN status is now `vlans_enabled`
+ - meraki_network - `tags` and `type` now return a list
+ - meraki_snmp - peer_ips is now a list
+ - meraki_switchport - `access_policy_number` is now an int and not a string
+ - meraki_switchport - `tags` is now a list and not a string
+ - meraki_webhook - Querying test status now uses state of query.
+ bugfixes:
+ - Remove unnecessary files from the collection package, significantly reduces
+ package size
+ - meraki_admin - Fix error when adding network privileges to admin using network
+ name
+ - meraki_switch_stack - Fix situation where module may crash due to switch being
+ in or not in a stack already
+ - meraki_webhook - Proper response is shown when creating webhook test
+ major_changes:
+ - Rewrite requests method for version 1.0 API and improved readability
+ - meraki_mr_rf_profile - Configure wireless RF profiles.
+ - meraki_mr_settings - Configure network settings for wireless.
+ - meraki_ms_l3_interface - New module
+ - meraki_ms_ospf - Configure OSPF.
+ minor_changes:
+ - meraki - Add optional debugging for is_update_required() method.
+ - meraki_admin - Update endpoints for API v1
+ - meraki_alert - Manage network wide alert settings.
+ - meraki_device - Added query parameter
+ - meraki_intrusion_prevention - Change documentation to show proper way to clear
+ rules
+ - meraki_malware - Update documentation to show how to allow multiple URLs at
+ once.
+ - meraki_mx_l2_interface - Configure physical interfaces on MX appliances.
+ - meraki_mx_uplink - Renamed to meraki_mx_uplink_bandwidth
+ - meraki_ssid - Add `WPA3 Only` and `WPA3 Transition Mode`
+ - meraki_switchport - Add support for `access_policy_type` parameter
+ security_fixes:
+ - meraki_webhook - diff output may show data for values set to not display
+ fragments:
+ - add-build-ignore.yml
+ - diff_secret_fix.yml
+ - is_update_debug.yml
+ - malware_docs.yml
+ - malware_mx_l2_interface.yml
+ - meraki_admin.yml
+ - meraki_alert.yml
+ - meraki_content_filtering.yml
+ - meraki_device.yml
+ - meraki_firewalled_services.yml
+ - meraki_intrusion_prevention.yml
+ - meraki_malware.yml
+ - meraki_management_interface.yml
+ - meraki_mr_l3_firewall.yml
+ - meraki_mr_rf_profile.yml
+ - meraki_mr_settings.yml
+ - meraki_ms_l3_interface.yml
+ - meraki_ms_ospf.yml
+ - meraki_mx_l3_firewall.yml
+ - meraki_mx_l7_firewall.yml
+ - meraki_mx_uplink.yml
+ - meraki_nat.yml
+ - meraki_network_update.yml
+ - meraki_site_to_site_vpn.yml
+ - meraki_snmp.yml
+ - meraki_ssid.yml
+ - meraki_static_route.yml
+ - meraki_switch_stack.yml
+ - meraki_switch_storm_control.yml
+ - meraki_switchport.yml
+ - meraki_syslog.yml
+ - meraki_vlan.yml
+ - meraki_webhook.yml
+ - requests-rewrite.yml
+ - ssid-tags-fix.yml
+ - ssid_wpa3.yml
+ release_date: '2020-08-27'
+ 2.1.0:
+ modules:
+ - description: Manage alerts in the Meraki cloud
+ name: meraki_alert
+ namespace: ''
+ - description: Configure MX layer 2 interfaces
+ name: meraki_mx_l2_interface
+ namespace: ''
+ release_date: '2020-10-16'
+ 2.1.1:
+ changes:
+ bugfixes:
+ - meraki_management_interface - Fix crash when modifying a non-MX management
+ interface.
+ fragments:
+ - management_ms_fix.yml
+ release_date: '2020-11-02'
+ 2.1.2:
+ changes:
+ bugfixes:
+ - Remove test output as it made the collection, and Ansible, huge.
+ fragments:
+ - size_fix.yml
+ release_date: '2020-11-04'
+ 2.1.3:
+ changes:
+ bugfixes:
+ - meraki_device - Support pagination. This allows for more than 1,000 devices
+ to be listed at a time.
+ - meraki_network - Support pagination. This allows for more than 1,000 networks
+ to be listed at a time.
+ fragments:
+ - pagination.yml
+ release_date: '2020-12-16'
+ 2.2.0:
+ changes:
+ bugfixes:
+ - meraki_network - Fix bug where local or remote settings always show changed.
+ minor_changes:
+ - meraki_network - Update documentation to show querying of local or remote
+ settings.
+ - meraki_ssid - Add Cisco ISE as a splash page option.
+ fragments:
+ - network_settings_changed.yml
+ - ssid_ise.yml
+ release_date: '2021-02-01'
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/changelogs/config.yaml b/collections-debian-merged/ansible_collections/cisco/meraki/changelogs/config.yaml
new file mode 100644
index 00000000..99379224
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/changelogs/config.yaml
@@ -0,0 +1,29 @@
+changelog_filename_template: CHANGELOG.rst
+changelog_filename_version_depth: 0
+changes_file: changelog.yaml
+changes_format: combined
+keep_fragments: false
+mention_ancestor: true
+new_plugins_after_name: removed_features
+notesdir: fragments
+prelude_section_name: release_summary
+prelude_section_title: Release Summary
+sections:
+- - major_changes
+ - Major Changes
+- - minor_changes
+ - Minor Changes
+- - breaking_changes
+ - Breaking Changes / Porting Guide
+- - deprecated_features
+ - Deprecated Features
+- - removed_features
+ - Removed Features (previously deprecated)
+- - security_fixes
+ - Security Fixes
+- - bugfixes
+ - Bugfixes
+- - known_issues
+ - Known Issues
+title: Cisco.Meraki
+trivial_section_name: trivial
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/doc_fragments/__init__.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/doc_fragments/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/doc_fragments/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/doc_fragments/meraki.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/doc_fragments/meraki.py
new file mode 100644
index 00000000..d6d456f1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/doc_fragments/meraki.py
@@ -0,0 +1,84 @@
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+
+class ModuleDocFragment(object):
+ # Standard files for documentation fragment
+ DOCUMENTATION = r'''
+notes:
+- More information about the Meraki API can be found at U(https://dashboard.meraki.com/api_docs).
+- Some of the options are likely only used for developers within Meraki.
+- As of Ansible 2.9, Meraki modules output keys as snake case. To use camel case, set the C(ANSIBLE_MERAKI_FORMAT) environment variable to C(camelcase).
+- Ansible's Meraki modules will stop supporting camel case output in Ansible 2.13. Please update your playbooks.
+- Check Mode downloads the current configuration from the dashboard, then compares changes against this download. Check Mode will report changed if
+ there are differences in the configurations, but does not submit changes to the API for validation of change.
+options:
+ auth_key:
+ description:
+ - Authentication key provided by the dashboard. Required if environmental variable C(MERAKI_KEY) is not set.
+ type: str
+ required: yes
+ host:
+ description:
+ - Hostname for Meraki dashboard.
+ - Can be used to access regional Meraki environments, such as China.
+ type: str
+ default: api.meraki.com
+ use_proxy:
+ description:
+ - If C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+ type: bool
+ default: False
+ use_https:
+ description:
+ - If C(no), it will use HTTP. Otherwise it will use HTTPS.
+ - Only useful for internal Meraki developers.
+ type: bool
+ default: yes
+ output_format:
+ description:
+ - Instructs module whether response keys should be snake case (ex. C(net_id)) or camel case (ex. C(netId)).
+ type: str
+ choices: [snakecase, camelcase]
+ default: snakecase
+ output_level:
+ description:
+ - Set amount of debug output during module execution.
+ type: str
+ choices: [ debug, normal ]
+ default: normal
+ timeout:
+ description:
+ - Time to timeout for HTTP requests.
+ type: int
+ default: 30
+ validate_certs:
+ description:
+ - Whether to validate HTTP certificates.
+ type: bool
+ default: yes
+ org_name:
+ description:
+ - Name of organization.
+ type: str
+ aliases: [ organization ]
+ org_id:
+ description:
+ - ID of organization.
+ type: str
+ rate_limit_retry_time:
+ description:
+ - Number of seconds to retry if rate limiter is triggered.
+ type: int
+ default: 165
+ internal_error_retry_time:
+ description:
+ - Number of seconds to retry if server returns an internal server error.
+ type: int
+ default: 60
+'''
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/__init__.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/meraki.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/meraki.py
new file mode 100644
index 00000000..53b14caf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/meraki.py
@@ -0,0 +1,517 @@
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+import time
+import re
+from ansible.module_utils.basic import json, env_fallback
+from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict, snake_dict_to_camel_dict, recursive_diff
+from ansible.module_utils.urls import fetch_url
+from ansible.module_utils.six.moves.urllib.parse import urlencode
+from ansible.module_utils._text import to_native
+
+
+RATE_LIMIT_RETRY_MULTIPLIER = 3
+INTERNAL_ERROR_RETRY_MULTIPLIER = 3
+
+
+def meraki_argument_spec():
+ return dict(auth_key=dict(type='str', no_log=True, fallback=(env_fallback, ['MERAKI_KEY']), required=True),
+ host=dict(type='str', default='api.meraki.com'),
+ use_proxy=dict(type='bool', default=False),
+ use_https=dict(type='bool', default=True),
+ validate_certs=dict(type='bool', default=True),
+ output_format=dict(type='str', choices=['camelcase', 'snakecase'], default='snakecase', fallback=(env_fallback, ['ANSIBLE_MERAKI_FORMAT'])),
+ output_level=dict(type='str', default='normal', choices=['normal', 'debug']),
+ timeout=dict(type='int', default=30),
+ org_name=dict(type='str', aliases=['organization']),
+ org_id=dict(type='str'),
+ rate_limit_retry_time=dict(type='int', default=165),
+ internal_error_retry_time=dict(type='int', default=60)
+ )
+
+
+class RateLimitException(Exception):
+ def __init__(self, *args, **kwargs):
+ Exception.__init__(self, *args, **kwargs)
+
+
+class InternalErrorException(Exception):
+ def __init__(self, *args, **kwargs):
+ Exception.__init__(self, *args, **kwargs)
+
+
+class HTTPError(Exception):
+ def __init__(self, *args, **kwargs):
+ Exception.__init__(self, *args, **kwargs)
+
+
+class MerakiModule(object):
+
+ def __init__(self, module, function=None):
+ self.module = module
+ self.params = module.params
+ self.result = dict(changed=False)
+ self.headers = dict()
+ self.function = function
+ self.orgs = None
+ self.nets = None
+ self.org_id = None
+ self.net_id = None
+ self.check_mode = module.check_mode
+ self.key_map = {}
+ self.request_attempts = 0
+
+ # normal output
+ self.existing = None
+
+ # info output
+ self.config = dict()
+ self.original = None
+ self.proposed = dict()
+ self.merged = None
+ self.ignored_keys = ['id', 'organizationId']
+
+ # debug output
+ self.filter_string = ''
+ self.method = None
+ self.path = None
+ self.response = None
+ self.status = None
+ self.url = None
+ self.body = None
+
+ # rate limiting statistics
+ self.retry = 0
+ self.retry_time = 0
+
+ # If URLs need to be modified or added for specific purposes, use .update() on the url_catalog dictionary
+ self.get_urls = {'organizations': '/organizations',
+ 'network': '/organizations/{org_id}/networks',
+ 'admins': '/organizations/{org_id}/admins',
+ 'configTemplates': '/organizations/{org_id}/configTemplates',
+ 'samlymbols': '/organizations/{org_id}/samlRoles',
+ 'ssids': '/networks/{net_id}/ssids',
+ 'groupPolicies': '/networks/{net_id}/groupPolicies',
+ 'staticRoutes': '/networks/{net_id}/staticRoutes',
+ 'vlans': '/networks/{net_id}/vlans',
+ 'devices': '/networks/{net_id}/devices',
+ }
+
+ # Used to retrieve only one item
+ self.get_one_urls = {'organizations': '/organizations/{org_id}',
+ 'network': '/networks/{net_id}',
+ }
+
+ # Module should add URLs which are required by the module
+ self.url_catalog = {'get_all': self.get_urls,
+ 'get_one': self.get_one_urls,
+ 'create': None,
+ 'update': None,
+ 'delete': None,
+ 'misc': None,
+ }
+
+ if self.module._debug or self.params['output_level'] == 'debug':
+ self.module.warn('Enable debug output because ANSIBLE_DEBUG was set or output_level is set to debug.')
+
+ # TODO: This should be removed as org_name isn't always required
+ self.module.required_if = [('state', 'present', ['org_name']),
+ ('state', 'absent', ['org_name']),
+ ]
+ # self.module.mutually_exclusive = [('org_id', 'org_name'),
+ # ]
+ self.modifiable_methods = ['POST', 'PUT', 'DELETE']
+
+ self.headers = {'Content-Type': 'application/json',
+ 'Authorization': 'Bearer {key}'.format(key=module.params['auth_key']),
+ }
+
+ def define_protocol(self):
+ """Set protocol based on use_https parameters."""
+ if self.params['use_https'] is True:
+ self.params['protocol'] = 'https'
+ else:
+ self.params['protocol'] = 'http'
+
+ def sanitize_keys(self, data):
+ if isinstance(data, dict):
+ items = {}
+ for k, v in data.items():
+ try:
+ new = {self.key_map[k]: data[k]}
+ items[self.key_map[k]] = self.sanitize_keys(data[k])
+ except KeyError:
+ snake_k = re.sub('([a-z0-9])([A-Z])', r'\1_\2', k).lower()
+ # new = {snake_k: data[k]}
+ items[snake_k] = self.sanitize_keys(data[k])
+ return items
+ elif isinstance(data, list):
+ items = []
+ for i in data:
+ items.append(self.sanitize_keys(i))
+ return items
+ elif isinstance(data, int) or isinstance(data, str) or isinstance(data, float):
+ return data
+
+ def is_update_required(self, original, proposed, optional_ignore=None, debug=False):
+ ''' Compare two data-structures '''
+ self.ignored_keys.append('net_id')
+ if optional_ignore is not None:
+ # self.fail_json(msg="Keys", ignored_keys=self.ignored_keys, optional=optional_ignore)
+ self.ignored_keys = self.ignored_keys + optional_ignore
+
+ if isinstance(original, list):
+ if len(original) != len(proposed):
+ if debug is True:
+ self.fail_json(msg="Length of lists don't match")
+ return True
+ for a, b in zip(original, proposed):
+ if self.is_update_required(a, b, debug=debug):
+ if debug is True:
+ self.fail_json(msg="List doesn't match", a=a, b=b)
+ return True
+ elif isinstance(original, dict):
+ try:
+ for k, v in proposed.items():
+ if k not in self.ignored_keys:
+ if k in original:
+ if self.is_update_required(original[k], proposed[k], debug=debug):
+ return True
+ else:
+ if debug is True:
+ self.fail_json(msg="Key not in original", k=k)
+ return True
+ except AttributeError:
+ return True
+ else:
+ if original != proposed:
+ if debug is True:
+ self.fail_json(msg="Fallback", original=original, proposed=proposed)
+ return True
+ return False
+
+ def generate_diff(self, before, after):
+ """Creates a diff based on two objects. Applies to the object and returns nothing.
+ """
+ try:
+ diff = recursive_diff(before, after)
+ self.result['diff'] = {'before': diff[0],
+ 'after': diff[1]}
+ except AttributeError: # Normally for passing a list instead of a dict
+ diff = recursive_diff({'data': before},
+ {'data': after})
+ self.result['diff'] = {'before': diff[0]['data'],
+ 'after': diff[1]['data']}
+
+ def get_orgs(self):
+ """Downloads all organizations for a user."""
+ response = self.request('/organizations', method='GET')
+ if self.status != 200:
+ self.fail_json(msg='Organization lookup failed')
+ self.orgs = response
+ return self.orgs
+
+ def is_org_valid(self, data, org_name=None, org_id=None):
+ """Checks whether a specific org exists and is duplicated.
+
+ If 0, doesn't exist. 1, exists and not duplicated. >1 duplicated.
+ """
+ org_count = 0
+ if org_name is not None:
+ for o in data:
+ if o['name'] == org_name:
+ org_count += 1
+ if org_id is not None:
+ for o in data:
+ if o['id'] == org_id:
+ org_count += 1
+ return org_count
+
+ def get_org_id(self, org_name):
+ """Returns an organization id based on organization name, only if unique.
+
+ If org_id is specified as parameter, return that instead of a lookup.
+ """
+ orgs = self.get_orgs()
+ # self.fail_json(msg='ogs', orgs=orgs)
+ if self.params['org_id'] is not None:
+ if self.is_org_valid(orgs, org_id=self.params['org_id']) is True:
+ return self.params['org_id']
+ org_count = self.is_org_valid(orgs, org_name=org_name)
+ if org_count == 0:
+ self.fail_json(msg='There are no organizations with the name {org_name}'.format(org_name=org_name))
+ if org_count > 1:
+ self.fail_json(msg='There are multiple organizations with the name {org_name}'.format(org_name=org_name))
+ elif org_count == 1:
+ for i in orgs:
+ if org_name == i['name']:
+ # self.fail_json(msg=i['id'])
+ return str(i['id'])
+
+ def get_nets(self, org_name=None, org_id=None):
+ """Downloads all networks in an organization."""
+ if org_name:
+ org_id = self.get_org_id(org_name)
+ path = self.construct_path('get_all', org_id=org_id, function='network', params={'perPage': '1000'})
+ r = self.request(path, method='GET', pagination_items=1000)
+ if self.status != 200:
+ self.fail_json(msg='Network lookup failed')
+ self.nets = r
+ templates = self.get_config_templates(org_id)
+ for t in templates:
+ self.nets.append(t)
+ return self.nets
+
+ def get_net(self, org_name, net_name=None, org_id=None, data=None, net_id=None):
+ ''' Return network information '''
+ if not data:
+ if not org_id:
+ org_id = self.get_org_id(org_name)
+ data = self.get_nets(org_id=org_id)
+ for n in data:
+ if net_id:
+ if n['id'] == net_id:
+ return n
+ elif net_name:
+ if n['name'] == net_name:
+ return n
+ return False
+
+ def get_net_id(self, org_name=None, net_name=None, data=None):
+ """Return network id from lookup or existing data."""
+ if data is None:
+ self.fail_json(msg='Must implement lookup')
+ for n in data:
+ if n['name'] == net_name:
+ return n['id']
+ self.fail_json(msg='No network found with the name {0}'.format(net_name))
+
+ def get_config_templates(self, org_id):
+ path = self.construct_path('get_all', function='configTemplates', org_id=org_id)
+ response = self.request(path, 'GET')
+ if self.status != 200:
+ self.fail_json(msg='Unable to get configuration templates')
+ return response
+
+ def get_template_id(self, name, data):
+ for template in data:
+ if name == template['name']:
+ return template['id']
+ self.fail_json(msg='No configuration template named {0} found'.format(name))
+
+ def convert_camel_to_snake(self, data):
+ """
+ Converts a dictionary or list to snake case from camel case
+ :type data: dict or list
+ :return: Converted data structure, if list or dict
+ """
+
+ if isinstance(data, dict):
+ return camel_dict_to_snake_dict(data, ignore_list=('tags', 'tag'))
+ elif isinstance(data, list):
+ return [camel_dict_to_snake_dict(item, ignore_list=('tags', 'tag')) for item in data]
+ else:
+ return data
+
+ def convert_snake_to_camel(self, data):
+ """
+ Converts a dictionary or list to camel case from snake case
+ :type data: dict or list
+ :return: Converted data structure, if list or dict
+ """
+
+ if isinstance(data, dict):
+ return snake_dict_to_camel_dict(data)
+ elif isinstance(data, list):
+ return [snake_dict_to_camel_dict(item) for item in data]
+ else:
+ return data
+
+ def construct_params_list(self, keys, aliases=None):
+ qs = {}
+ for key in keys:
+ if key in aliases:
+ qs[aliases[key]] = self.module.params[key]
+ else:
+ qs[key] = self.module.params[key]
+ return qs
+
+ def encode_url_params(self, params):
+ """Encodes key value pairs for URL"""
+ return "?{0}".format(urlencode(params))
+
+ def construct_path(self,
+ action,
+ function=None,
+ org_id=None,
+ net_id=None,
+ org_name=None,
+ custom=None,
+ params=None):
+ """Build a path from the URL catalog.
+ Uses function property from class for catalog lookup.
+ """
+ built_path = None
+ if function is None:
+ built_path = self.url_catalog[action][self.function]
+ else:
+ built_path = self.url_catalog[action][function]
+ if org_name:
+ org_id = self.get_org_id(org_name)
+ if custom:
+ built_path = built_path.format(org_id=org_id, net_id=net_id, **custom)
+ else:
+ built_path = built_path.format(org_id=org_id, net_id=net_id)
+ if params:
+ built_path += self.encode_url_params(params)
+ return built_path
+
+ def _set_url(self, path, method, params):
+ self.path = path
+ self.define_protocol()
+
+ if method is not None:
+ self.method = method
+
+ self.url = '{protocol}://{host}/api/v1/{path}'.format(path=self.path.lstrip('/'), **self.params)
+
+ @staticmethod
+ def _parse_pagination_header(link):
+ rels = {'first': None,
+ 'next': None,
+ 'prev': None,
+ 'last': None
+ }
+ for rel in link.split(','):
+ kv = rel.split('rel=')
+ rels[kv[1]] = kv[0].split('<')[1].split('>')[0].strip() # This should return just the URL for <url>
+ return rels
+
+ def _execute_request(self, path, method=None, payload=None, params=None):
+ """ Execute query """
+ try:
+ resp, info = fetch_url(self.module, self.url,
+ headers=self.headers,
+ data=payload,
+ method=self.method,
+ timeout=self.params['timeout'],
+ use_proxy=self.params['use_proxy'],
+ )
+ self.status = info['status']
+
+ if self.status == 429:
+ self.retry += 1
+ if self.retry <= 10:
+ # retry-after isn't returned for over 10 concurrent connections per IP
+ try:
+ self.module.warn("Rate limiter hit, retry {0}...pausing for {1} seconds".format(self.retry, info['Retry-After']))
+ time.sleep(info['Retry-After'])
+ except KeyError:
+ self.module.warn("Rate limiter hit, retry {0}...pausing for 5 seconds".format(self.retry))
+ time.sleep(5)
+ return self._execute_request(path, method=method, payload=payload, params=params)
+ else:
+ self.fail_json(msg="Rate limit retries failed for {url}".format(url=self.url))
+ elif self.status == 500:
+ self.retry += 1
+ self.module.warn("Internal server error 500, retry {0}".format(self.retry))
+ if self.retry <= 10:
+ self.retry_time += self.retry * INTERNAL_ERROR_RETRY_MULTIPLIER
+ time.sleep(self.retry_time)
+ return self._execute_request(path, method=method, payload=payload, params=params)
+ else:
+ # raise RateLimitException(e)
+ self.fail_json(msg="Rate limit retries failed for {url}".format(url=self.url))
+ elif self.status == 502:
+ self.module.warn("Internal server error 502, retry {0}".format(self.retry))
+ elif self.status == 400:
+ raise HTTPError("")
+ elif self.status >= 400:
+ self.fail_json(msg=self.status, url=self.url)
+ raise HTTPError("")
+ except HTTPError:
+ try:
+ self.fail_json(msg="HTTP error {0} - {1} - {2}".format(self.status, self.url, json.loads(info['body'])['errors'][0]))
+ except json.decoder.JSONDecodeError:
+ self.fail_json(msg="HTTP error {0} - {1}".format(self.status, self.url))
+ self.retry = 0 # Needs to reset in case of future retries
+ return resp, info
+
+ def request(self, path, method=None, payload=None, params=None, pagination_items=None):
+ """ Submit HTTP request to Meraki API """
+ self._set_url(path, method, params)
+
+ try:
+ # Gather the body (resp) and header (info)
+ resp, info = self._execute_request(path, method=method, payload=payload, params=params)
+ except HTTPError:
+ self.fail_json(msg="HTTP request to {url} failed with error code {code}".format(url=self.url, code=self.status))
+ self.response = info['msg']
+ self.status = info['status']
+ # This needs to be refactored as it's not very clean
+ # Looping process for pagination
+ if pagination_items is not None:
+ data = None
+ if 'body' in info:
+ self.body = info['body']
+ data = json.loads(to_native(resp.read()))
+ header_link = self._parse_pagination_header(info['link'])
+ while header_link['next'] is not None:
+ self.url = header_link['next']
+ try:
+ # Gather the body (resp) and header (info)
+ resp, info = self._execute_request(header_link['next'], method=method, payload=payload, params=params)
+ except HTTPError:
+ self.fail_json(msg="HTTP request to {url} failed with error code {code}".format(url=self.url, code=self.status))
+ header_link = self._parse_pagination_header(info['link'])
+ data.extend(json.loads(to_native(resp.read())))
+ return data
+ else: # Non-pagination
+ if 'body' in info:
+ self.body = info['body']
+ try:
+ return json.loads(to_native(resp.read()))
+ except json.decoder.JSONDecodeError:
+ return {}
+
+ def exit_json(self, **kwargs):
+ """Custom written method to exit from module."""
+ self.result['response'] = self.response
+ self.result['status'] = self.status
+ if self.retry > 0:
+ self.module.warn("Rate limiter triggered - retry count {0}".format(self.retry))
+ # Return the gory details when we need it
+ if self.params['output_level'] == 'debug':
+ self.result['method'] = self.method
+ self.result['url'] = self.url
+ self.result.update(**kwargs)
+ if self.params['output_format'] == 'camelcase':
+ self.module.deprecate("Update your playbooks to support snake_case format instead of camelCase format.",
+ date="2022-06-01",
+ collection_name="cisco.meraki")
+ else:
+ if 'data' in self.result:
+ try:
+ self.result['data'] = self.convert_camel_to_snake(self.result['data'])
+ self.result['diff'] = self.convert_camel_to_snake(self.result['diff'])
+ except (KeyError, AttributeError):
+ pass
+ self.module.exit_json(**self.result)
+
+ def fail_json(self, msg, **kwargs):
+ """Custom written method to return info on failure."""
+ self.result['response'] = self.response
+ self.result['status'] = self.status
+
+ if self.params['output_level'] == 'debug':
+ if self.url is not None:
+ self.result['method'] = self.method
+ self.result['url'] = self.url
+
+ self.result.update(**kwargs)
+ self.module.fail_json(msg=msg, **self.result)
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_admin.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_admin.py
new file mode 100644
index 00000000..e554bb00
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_admin.py
@@ -0,0 +1,504 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_admin
+short_description: Manage administrators in the Meraki cloud
+version_added: '1.0.0'
+description:
+- Allows for creation, management, and visibility into administrators within Meraki.
+options:
+ name:
+ description:
+ - Name of the dashboard administrator.
+ - Required when creating a new administrator.
+ type: str
+ email:
+ description:
+ - Email address for the dashboard administrator.
+ - Email cannot be updated.
+ - Required when creating or editing an administrator.
+ type: str
+ org_access:
+ description:
+ - Privileges assigned to the administrator in the organization.
+ aliases: [ orgAccess ]
+ choices: [ full, none, read-only ]
+ type: str
+ tags:
+ description:
+ - Tags the administrator has privileges on.
+ - When creating a new administrator, C(org_name), C(network), or C(tags) must be specified.
+ - If C(none) is specified, C(network) or C(tags) must be specified.
+ type: list
+ elements: dict
+ suboptions:
+ tag:
+ description:
+ - Object tag which privileges should be assigned.
+ type: str
+ access:
+ description:
+ - The privilege of the dashboard administrator for the tag.
+ type: str
+ networks:
+ description:
+ - List of networks the administrator has privileges on.
+ - When creating a new administrator, C(org_name), C(network), or C(tags) must be specified.
+ type: list
+ elements: dict
+ suboptions:
+ id:
+ description:
+ - Network ID for which administrator should have privileges assigned.
+ type: str
+ network:
+ description:
+ - Network name for which administrator should have privileges assigned.
+ type: str
+ access:
+ description:
+ - The privilege of the dashboard administrator on the network.
+ - Valid options are C(full), C(read-only), or C(none).
+ type: str
+ state:
+ description:
+ - Create or modify, or delete an organization
+ - If C(state) is C(absent), name takes priority over email if both are specified.
+ choices: [ absent, present, query ]
+ required: true
+ type: str
+ org_name:
+ description:
+ - Name of organization.
+ - Used when C(name) should refer to another object.
+ - When creating a new administrator, C(org_name), C(network), or C(tags) must be specified.
+ aliases: ['organization']
+ type: str
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query information about all administrators associated to the organization
+ meraki_admin:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: query
+ delegate_to: localhost
+
+- name: Query information about a single administrator by name
+ meraki_admin:
+ auth_key: abc12345
+ org_id: 12345
+ state: query
+ name: Jane Doe
+
+- name: Query information about a single administrator by email
+ meraki_admin:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: query
+ email: jane@doe.com
+
+- name: Create new administrator with organization access
+ meraki_admin:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: present
+ name: Jane Doe
+ org_access: read-only
+ email: jane@doe.com
+
+- name: Create new administrator with organization access
+ meraki_admin:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: present
+ name: Jane Doe
+ org_access: read-only
+ email: jane@doe.com
+
+- name: Create a new administrator with organization access
+ meraki_admin:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: present
+ name: Jane Doe
+ org_access: read-only
+ email: jane@doe.com
+
+- name: Revoke access to an organization for an administrator
+ meraki_admin:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: absent
+ email: jane@doe.com
+
+- name: Create a new administrator with full access to two tags
+ meraki_admin:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: present
+ name: Jane Doe
+ orgAccess: read-only
+ email: jane@doe.com
+ tags:
+ - tag: tenant
+ access: full
+ - tag: corporate
+ access: read-only
+
+- name: Create a new administrator with full access to a network
+ meraki_admin:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: present
+ name: Jane Doe
+ orgAccess: read-only
+ email: jane@doe.com
+ networks:
+ - id: N_12345
+ access: full
+'''
+
+RETURN = r'''
+data:
+ description: List of administrators.
+ returned: success
+ type: complex
+ contains:
+ email:
+ description: Email address of administrator.
+ returned: success
+ type: str
+ sample: your@email.com
+ id:
+ description: Unique identification number of administrator.
+ returned: success
+ type: str
+ sample: 1234567890
+ name:
+ description: Given name of administrator.
+ returned: success
+ type: str
+ sample: John Doe
+ account_status:
+ description: Status of account.
+ returned: success
+ type: str
+ sample: ok
+ two_factor_auth_enabled:
+ description: Enabled state of two-factor authentication for administrator.
+ returned: success
+ type: bool
+ sample: false
+ has_api_key:
+ description: Defines whether administrator has an API assigned to their account.
+ returned: success
+ type: bool
+ sample: false
+ last_active:
+ description: Date and time of time the administrator was active within Dashboard.
+ returned: success
+ type: str
+ sample: 2019-01-28 14:58:56 -0800
+ networks:
+ description: List of networks administrator has access on.
+ returned: success
+ type: complex
+ contains:
+ id:
+ description: The network ID.
+ returned: when network permissions are set
+ type: str
+ sample: N_0123456789
+ access:
+ description: Access level of administrator. Options are 'full', 'read-only', or 'none'.
+ returned: when network permissions are set
+ type: str
+ sample: read-only
+ tags:
+ description: Tags the administrator has access on.
+ returned: success
+ type: complex
+ contains:
+ tag:
+ description: Tag name.
+ returned: when tag permissions are set
+ type: str
+ sample: production
+ access:
+ description: Access level of administrator. Options are 'full', 'read-only', or 'none'.
+ returned: when tag permissions are set
+ type: str
+ sample: full
+ org_access:
+ description: The privilege of the dashboard administrator on the organization. Options are 'full', 'read-only', or 'none'.
+ returned: success
+ type: str
+ sample: full
+
+'''
+
+import os
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def get_admins(meraki, org_id):
+ admins = meraki.request(
+ meraki.construct_path(
+ 'query',
+ function='admin',
+ org_id=org_id
+ ),
+ method='GET'
+ )
+ if meraki.status == 200:
+ return admins
+
+
+def get_admin_id(meraki, data, name=None, email=None):
+ admin_id = None
+ for a in data:
+ if meraki.params['name'] is not None:
+ if meraki.params['name'] == a['name']:
+ if admin_id is not None:
+ meraki.fail_json(msg='There are multiple administrators with the same name')
+ else:
+ admin_id = a['id']
+ elif meraki.params['email']:
+ if meraki.params['email'] == a['email']:
+ return a['id']
+ if admin_id is None:
+ meraki.fail_json(msg='No admin_id found')
+ return admin_id
+
+
+def get_admin(meraki, data, id):
+ for a in data:
+ if a['id'] == id:
+ return a
+ meraki.fail_json(msg='No admin found by specified name or email')
+
+
+def find_admin(meraki, data, email):
+ for a in data:
+ if a['email'] == email:
+ return a
+ return None
+
+
+def delete_admin(meraki, org_id, admin_id):
+ path = meraki.construct_path('revoke', 'admin', org_id=org_id) + admin_id
+ r = meraki.request(path,
+ method='DELETE'
+ )
+ if meraki.status == 204:
+ return r
+
+
+def network_factory(meraki, networks, nets):
+ networks_new = []
+ for n in networks:
+ if 'network' in n and n['network'] is not None:
+ networks_new.append({'id': meraki.get_net_id(org_name=meraki.params['org_name'],
+ net_name=n['network'],
+ data=nets),
+ 'access': n['access']
+ })
+ elif 'id' in n:
+ networks_new.append({'id': n['id'],
+ 'access': n['access']
+ })
+
+ return networks_new
+
+
+def create_admin(meraki, org_id, name, email):
+ payload = dict()
+ payload['name'] = name
+ payload['email'] = email
+
+ is_admin_existing = find_admin(meraki, get_admins(meraki, org_id), email)
+
+ if meraki.params['org_access'] is not None:
+ payload['orgAccess'] = meraki.params['org_access']
+ if meraki.params['tags'] is not None:
+ payload['tags'] = meraki.params['tags']
+ if meraki.params['networks'] is not None:
+ nets = meraki.get_nets(org_id=org_id)
+ networks = network_factory(meraki, meraki.params['networks'], nets)
+ payload['networks'] = networks
+ if is_admin_existing is None: # Create new admin
+ if meraki.module.check_mode is True:
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('create', function='admin', org_id=org_id)
+ r = meraki.request(path,
+ method='POST',
+ payload=json.dumps(payload)
+ )
+ if meraki.status == 201:
+ meraki.result['changed'] = True
+ return r
+ elif is_admin_existing is not None: # Update existing admin
+ if not meraki.params['tags']:
+ payload['tags'] = []
+ if not meraki.params['networks']:
+ payload['networks'] = []
+ if meraki.is_update_required(is_admin_existing, payload) is True:
+ if meraki.module.check_mode is True:
+ meraki.generate_diff(is_admin_existing, payload)
+ is_admin_existing.update(payload)
+ meraki.result['changed'] = True
+ meraki.result['data'] = payload
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', function='admin', org_id=org_id) + is_admin_existing['id']
+ r = meraki.request(path,
+ method='PUT',
+ payload=json.dumps(payload)
+ )
+ if meraki.status == 200:
+ meraki.result['changed'] = True
+ return r
+ else:
+ meraki.result['data'] = is_admin_existing
+ if meraki.module.check_mode is True:
+ meraki.result['data'] = payload
+ meraki.exit_json(**meraki.result)
+ return -1
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ network_arg_spec = dict(id=dict(type='str'),
+ network=dict(type='str'),
+ access=dict(type='str'),
+ )
+
+ tag_arg_spec = dict(tag=dict(type='str'),
+ access=dict(type='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query', 'absent'], required=True),
+ name=dict(type='str'),
+ email=dict(type='str'),
+ org_access=dict(type='str', aliases=['orgAccess'], choices=['full', 'read-only', 'none']),
+ tags=dict(type='list', elements='dict', options=tag_arg_spec),
+ networks=dict(type='list', elements='dict', options=network_arg_spec),
+ org_name=dict(type='str', aliases=['organization']),
+ org_id=dict(type='str'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='admin')
+
+ meraki.function = 'admin'
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'admin': '/organizations/{org_id}/admins',
+ }
+ create_urls = {'admin': '/organizations/{org_id}/admins',
+ }
+ update_urls = {'admin': '/organizations/{org_id}/admins/',
+ }
+ revoke_urls = {'admin': '/organizations/{org_id}/admins/',
+ }
+
+ meraki.url_catalog['query'] = query_urls
+ meraki.url_catalog['create'] = create_urls
+ meraki.url_catalog['update'] = update_urls
+ meraki.url_catalog['revoke'] = revoke_urls
+
+ try:
+ meraki.params['auth_key'] = os.environ['MERAKI_KEY']
+ except KeyError:
+ pass
+
+ # if the user is working with this module in only check mode we do not
+ # want to make any changes to the environment, just return the current
+ # state with no modifications
+
+ # execute checks for argument completeness
+ if meraki.params['state'] == 'query':
+ meraki.mututally_exclusive = ['name', 'email']
+ if not meraki.params['org_name'] and not meraki.params['org_id']:
+ meraki.fail_json(msg='org_name or org_id required')
+ meraki.required_if = [(['state'], ['absent'], ['email']),
+ ]
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ if not meraki.params['org_id']:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ if meraki.params['state'] == 'query':
+ admins = get_admins(meraki, org_id)
+ if not meraki.params['name'] and not meraki.params['email']: # Return all admins for org
+ meraki.result['data'] = admins
+ if meraki.params['name'] is not None: # Return a single admin for org
+ admin_id = get_admin_id(meraki, admins, name=meraki.params['name'])
+ meraki.result['data'] = admin_id
+ admin = get_admin(meraki, admins, admin_id)
+ meraki.result['data'] = admin
+ elif meraki.params['email'] is not None:
+ admin_id = get_admin_id(meraki, admins, email=meraki.params['email'])
+ meraki.result['data'] = admin_id
+ admin = get_admin(meraki, admins, admin_id)
+ meraki.result['data'] = admin
+ elif meraki.params['state'] == 'present':
+ r = create_admin(meraki,
+ org_id,
+ meraki.params['name'],
+ meraki.params['email'],
+ )
+ if r != -1:
+ meraki.result['data'] = r
+ elif meraki.params['state'] == 'absent':
+ if meraki.module.check_mode is True:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ admin_id = get_admin_id(meraki,
+ get_admins(meraki, org_id),
+ email=meraki.params['email']
+ )
+ r = delete_admin(meraki, org_id, admin_id)
+
+ if r != -1:
+ meraki.result['data'] = r
+ meraki.result['changed'] = True
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_alert.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_alert.py
new file mode 100644
index 00000000..481d8652
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_alert.py
@@ -0,0 +1,337 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, 2019 Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_alert
+version_added: "2.1.0"
+short_description: Manage alerts in the Meraki cloud
+description:
+- Allows for creation, management, and visibility into alert settings within Meraki.
+options:
+ state:
+ description:
+ - Create or modify an alert.
+ choices: [ present, query ]
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ aliases: [ name, network ]
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ default_destinations:
+ description:
+ - Properties for destinations when alert specific destinations aren't specified.
+ type: dict
+ suboptions:
+ all_admins:
+ description:
+ - If true, all network admins will receive emails.
+ type: bool
+ snmp:
+ description:
+ - If true, then an SNMP trap will be sent if there is an SNMP trap server configured for this network.
+ type: bool
+ emails:
+ description:
+ - A list of emails that will recieve the alert(s).
+ type: list
+ elements: str
+ http_server_ids:
+ description:
+ - A list of HTTP server IDs to send a Webhook to.
+ type: list
+ elements: str
+ alerts:
+ description:
+ - Alert-specific configuration for each type.
+ type: list
+ elements: dict
+ suboptions:
+ alert_type:
+ description:
+ - The type of alert.
+ type: str
+ enabled:
+ description:
+ - A boolean depicting if the alert is turned on or off.
+ type: bool
+ filters:
+ description:
+ - A hash of specific configuration data for the alert. Only filters specific to the alert will be updated.
+ - No validation checks occur against C(filters).
+ type: raw
+ alert_destinations:
+ description:
+ - A hash of destinations for this specific alert.
+ type: dict
+ suboptions:
+ all_admins:
+ description:
+ - If true, all network admins will receive emails.
+ type: bool
+ snmp:
+ description:
+ - If true, then an SNMP trap will be sent if there is an SNMP trap server configured for this network.
+ type: bool
+ emails:
+ description:
+ - A list of emails that will recieve the alert(s).
+ type: list
+ elements: str
+ http_server_ids:
+ description:
+ - A list of HTTP server IDs to send a Webhook to.
+ type: list
+ elements: str
+
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Update settings
+ meraki_alert:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ default_destinations:
+ emails:
+ - 'youremail@yourcorp'
+ - 'youremail2@yourcorp'
+ all_admins: yes
+ snmp: no
+ alerts:
+ - type: "gatewayDown"
+ enabled: yes
+ filters:
+ timeout: 60
+ alert_destinations:
+ emails:
+ - 'youremail@yourcorp'
+ - 'youremail2@yourcorp'
+ all_admins: yes
+ snmp: no
+ - type: "usageAlert"
+ enabled: yes
+ filters:
+ period: 1200
+ threshold: 104857600
+ alert_destinations:
+ emails:
+ - 'youremail@yourcorp'
+ - 'youremail2@yourcorp'
+ all_admins: yes
+ snmp: no
+
+- name: Query all settings
+ meraki_alert:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about the created or manipulated object.
+ returned: info
+ type: complex
+ contains:
+ default_destinations:
+ description: Properties for destinations when alert specific destinations aren't specified.
+ returned: success
+ type: complex
+ contains:
+ all_admins:
+ description: If true, all network admins will receive emails.
+ type: bool
+ sample: true
+ returned: success
+ snmp:
+ description: If true, then an SNMP trap will be sent if there is an SNMP trap server configured for this network.
+ type: bool
+ sample: true
+ returned: success
+ emails:
+ description: A list of emails that will recieve the alert(s).
+ type: list
+ returned: success
+ http_server_ids:
+ description: A list of HTTP server IDs to send a Webhook to.
+ type: list
+ returned: success
+ alerts:
+ description: Alert-specific configuration for each type.
+ type: complex
+ contains:
+ type:
+ description: The type of alert.
+ type: str
+ returned: success
+ enabled:
+ description: A boolean depicting if the alert is turned on or off.
+ type: bool
+ returned: success
+ filters:
+ description:
+ - A hash of specific configuration data for the alert. Only filters specific to the alert will be updated.
+ - No validation checks occur against C(filters).
+ type: complex
+ returned: success
+ alert_destinations:
+ description: A hash of destinations for this specific alert.
+ type: complex
+ contains:
+ all_admins:
+ description: If true, all network admins will receive emails.
+ type: bool
+ returned: success
+ snmp:
+ description: If true, then an SNMP trap will be sent if there is an SNMP trap server configured for this network.
+ type: bool
+ returned: success
+ emails:
+ description: A list of emails that will recieve the alert(s).
+ type: list
+ returned: success
+ http_server_ids:
+ description: A list of HTTP server IDs to send a Webhook to.
+ type: list
+ returned: success
+'''
+
+import copy
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def construct_payload(meraki, original):
+ payload = copy.deepcopy(original)
+ if meraki.params['default_destinations'] is not None:
+ payload['defaultDestinations'].update(meraki.params['default_destinations'])
+ payload['defaultDestinations']['allAdmins'] = meraki.params['default_destinations']['all_admins']
+ del payload['defaultDestinations']['all_admins']
+ del payload['defaultDestinations']['http_server_ids']
+ if meraki.params['alerts'] is not None:
+ for alert in meraki.params['alerts']:
+ alert.update(meraki.convert_snake_to_camel(alert))
+ del alert['alert_destinations']
+ for alert_want in meraki.params['alerts']:
+ for alert_have in payload['alerts']:
+ if alert_want['alert_type'] == alert_have['type']:
+ alert_have.update(alert_want)
+ del alert_have['alert_type']
+ del alert_have['alertType']
+ return payload
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ destinations_arg_spec = dict(all_admins=dict(type='bool'),
+ snmp=dict(type='bool'),
+ emails=dict(type='list', elements='str'),
+ http_server_ids=dict(type='list', elements='str', default=[]),
+ )
+
+ alerts_arg_spec = dict(alert_type=dict(type='str'),
+ enabled=dict(type='bool'),
+ alert_destinations=dict(type='dict', default=None, options=destinations_arg_spec),
+ filters=dict(type='raw', default={}),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(
+ net_id=dict(type='str'),
+ net_name=dict(type='str', aliases=['name', 'network']),
+ state=dict(type='str', choices=['present', 'query'], default='present'),
+ default_destinations=dict(type='dict', default=None, options=destinations_arg_spec),
+ alerts=dict(type='list', elements='dict', options=alerts_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ meraki = MerakiModule(module, function='alert')
+ module.params['follow_redirects'] = 'all'
+
+ query_urls = {'alert': '/networks/{net_id}/alerts/settings'}
+ update_urls = {'alert': '/networks/{net_id}/alerts/settings'}
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['update'] = update_urls
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ payload = construct_payload(meraki, original)
+ # meraki.fail_json(msg="Compare", original=original, payload=payload)
+ # meraki.fail_json(msg=payload)
+ if meraki.is_update_required(original, payload):
+ if meraki.check_mode is True:
+ meraki.generate_diff(original, payload)
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.generate_diff(original, payload)
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ else:
+ meraki.result['data'] = original
+ meraki.exit_json(**meraki.result)
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_config_template.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_config_template.py
new file mode 100644
index 00000000..8438d41b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_config_template.py
@@ -0,0 +1,331 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_config_template
+short_description: Manage configuration templates in the Meraki cloud
+version_added: "1.0.0"
+description:
+- Allows for querying, deleting, binding, and unbinding of configuration templates.
+notes:
+- Module is not idempotent as the Meraki API is limited in what information it provides about configuration templates.
+- Meraki's API does not support creating new configuration templates.
+- To use the configuration template, simply pass its ID via C(net_id) parameters in Meraki modules.
+options:
+ state:
+ description:
+ - Specifies whether configuration template information should be queried, modified, or deleted.
+ choices: ['absent', 'query', 'present']
+ default: query
+ type: str
+ org_name:
+ description:
+ - Name of organization containing the configuration template.
+ type: str
+ org_id:
+ description:
+ - ID of organization associated to a configuration template.
+ type: str
+ config_template:
+ description:
+ - Name of the configuration template within an organization to manipulate.
+ aliases: ['name']
+ type: str
+ net_name:
+ description:
+ - Name of the network to bind or unbind configuration template to.
+ type: str
+ net_id:
+ description:
+ - ID of the network to bind or unbind configuration template to.
+ type: str
+ auto_bind:
+ description:
+ - Optional boolean indicating whether the network's switches should automatically bind to profiles of the same model.
+ - This option only affects switch networks and switch templates.
+ - Auto-bind is not valid unless the switch template has at least one profile and has at most one profile per switch model.
+ type: bool
+
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query configuration templates
+ meraki_config_template:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: query
+ delegate_to: localhost
+
+- name: Bind a template from a network
+ meraki_config_template:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ config_template: DevConfigTemplate
+ delegate_to: localhost
+
+- name: Unbind a template from a network
+ meraki_config_template:
+ auth_key: abc123
+ state: absent
+ org_name: YourOrg
+ net_name: YourNet
+ config_template: DevConfigTemplate
+ delegate_to: localhost
+
+- name: Delete a configuration template
+ meraki_config_template:
+ auth_key: abc123
+ state: absent
+ org_name: YourOrg
+ config_template: DevConfigTemplate
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about queried object.
+ returned: success
+ type: complex
+ contains:
+ id:
+ description: Unique identification number of organization.
+ returned: success
+ type: int
+ sample: L_2930418
+ name:
+ description: Name of configuration template.
+ returned: success
+ type: str
+ sample: YourTemplate
+ product_types:
+ description: List of products which can exist in the network.
+ returned: success
+ type: list
+ sample: [ "appliance", "switch" ]
+ time_zone:
+ description: Timezone applied to each associated network.
+ returned: success
+ type: str
+ sample: "America/Chicago"
+
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def get_config_templates(meraki, org_id):
+ path = meraki.construct_path('get_all', org_id=org_id)
+ response = meraki.request(path, 'GET')
+ if meraki.status != 200:
+ meraki.fail_json(msg='Unable to get configuration templates')
+ return response
+
+
+def get_template_id(meraki, name, data):
+ for template in data:
+ if name == template['name']:
+ return template['id']
+ meraki.fail_json(msg='No configuration template named {0} found'.format(name))
+
+
+def is_template_valid(meraki, nets, template_id):
+ for net in nets:
+ if net['id'] == template_id:
+ return True
+ return False
+
+
+def is_network_bound(meraki, nets, net_id, template_id):
+ for net in nets:
+ if net['id'] == net_id:
+ try:
+ if net['configTemplateId'] == template_id:
+ return True
+ except KeyError:
+ pass
+ return False
+
+
+def delete_template(meraki, org_id, name, data):
+ template_id = get_template_id(meraki, name, data)
+ path = meraki.construct_path('delete', org_id=org_id)
+ path = path + '/' + template_id
+ response = meraki.request(path, 'DELETE')
+ if meraki.status != 204:
+ meraki.fail_json(msg='Unable to remove configuration template')
+ return response
+
+
+def bind(meraki, net_id, template_id):
+ path = meraki.construct_path('bind', net_id=net_id)
+ payload = {'configTemplateId': template_id}
+ if meraki.params['auto_bind']:
+ payload['autoBind'] = meraki.params['auto_bind']
+ r = meraki.request(path, method='POST', payload=json.dumps(payload))
+ return r
+
+
+def unbind(meraki, net_id):
+ path = meraki.construct_path('unbind', net_id=net_id)
+ meraki.result['changed'] = True
+ return meraki.request(path, method='POST')
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'query', 'present'], default='query'),
+ config_template=dict(type='str', aliases=['name']),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ # config_template_id=dict(type='str', aliases=['id']),
+ auto_bind=dict(type='bool'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='config_template')
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'config_template': '/organizations/{org_id}/configTemplates'}
+ delete_urls = {'config_template': '/organizations/{org_id}/configTemplates'}
+ bind_urls = {'config_template': '/networks/{net_id}/bind'}
+ unbind_urls = {'config_template': '/networks/{net_id}/unbind'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['delete'] = delete_urls
+ meraki.url_catalog['bind'] = bind_urls
+ meraki.url_catalog['unbind'] = unbind_urls
+
+ # if the user is working with this module in only check mode we do not
+ # want to make any changes to the environment, just return the current
+ # state with no modifications
+
+ # execute checks for argument completeness
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ if meraki.params['org_name']:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ nets = None
+ if net_id is None:
+ if meraki.params['net_name'] is not None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+ else:
+ nets = meraki.get_nets(org_id=org_id)
+
+ if meraki.params['state'] == 'query':
+ meraki.result['data'] = get_config_templates(meraki, org_id)
+ elif meraki.params['state'] == 'present':
+ template_id = get_template_id(meraki,
+ meraki.params['config_template'],
+ get_config_templates(meraki, org_id))
+ if nets is None:
+ nets = meraki.get_nets(org_id=org_id)
+ if is_network_bound(meraki, nets, net_id, template_id) is False: # Bind template
+ if meraki.check_mode is True:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ template_bind = bind(meraki,
+ net_id,
+ template_id)
+ if meraki.status != 200:
+ meraki.fail_json(msg='Unable to bind configuration template to network')
+ meraki.result['changed'] = True
+ meraki.result['data'] = template_bind
+ else: # Network is already bound, being explicit
+ if meraki.check_mode is True: # Include to be explicit
+ meraki.result['data'] = {}
+ meraki.result['changed'] = False
+ meraki.exit_json(**meraki.result)
+ meraki.result['data'] = {}
+ meraki.result['changed'] = False
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'absent':
+ template_id = get_template_id(meraki,
+ meraki.params['config_template'],
+ get_config_templates(meraki, org_id))
+ if not meraki.params['net_name'] and not meraki.params['net_id']: # Delete template
+ if is_template_valid(meraki, nets, template_id) is True:
+ if meraki.check_mode is True:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ meraki.result['data'] = delete_template(meraki,
+ org_id,
+ meraki.params['config_template'],
+ get_config_templates(meraki, org_id))
+ if meraki.status == 204:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ else:
+ meraki.fail_json(msg="No template named {0} found.".format(meraki.params['config_template']))
+ else: # Unbind template
+ if nets is None:
+ nets = meraki.get_nets(org_id=org_id)
+ if meraki.check_mode is True:
+ meraki.result['data'] = {}
+ if is_template_valid(meraki, nets, template_id) is True:
+ meraki.result['changed'] = True
+ else:
+ meraki.result['changed'] = False
+ meraki.exit_json(**meraki.result)
+ template_id = get_template_id(meraki,
+ meraki.params['config_template'],
+ get_config_templates(meraki, org_id))
+ if is_network_bound(meraki, nets, net_id, template_id) is True:
+ if meraki.check_mode is True:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ config_unbind = unbind(meraki,
+ net_id)
+ if meraki.status != 200:
+ meraki.fail_json(msg='Unable to unbind configuration template from network')
+ meraki.result['changed'] = True
+ meraki.result['data'] = config_unbind
+ else: # No network is bound, nothing to do
+ if meraki.check_mode is True: # Include to be explicit
+ meraki.result['data'] = {}
+ meraki.result['changed'] = False
+ meraki.exit_json(**meraki.result)
+ meraki.result['data'] = {}
+ meraki.result['changed'] = False
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_content_filtering.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_content_filtering.py
new file mode 100644
index 00000000..5bc6b934
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_content_filtering.py
@@ -0,0 +1,282 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_content_filtering
+short_description: Edit Meraki MX content filtering policies
+description:
+- Allows for setting policy on content filtering.
+options:
+ auth_key:
+ description:
+ - Authentication key provided by the dashboard. Required if environmental variable MERAKI_KEY is not set.
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ aliases: [ network ]
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ state:
+ description:
+ - States that a policy should be created or modified.
+ choices: [present, query]
+ default: present
+ type: str
+ allowed_urls:
+ description:
+ - List of URL patterns which should be allowed.
+ type: list
+ elements: str
+ blocked_urls:
+ description:
+ - List of URL patterns which should be blocked.
+ type: list
+ elements: str
+ blocked_categories:
+ description:
+ - List of content categories which should be blocked.
+ - Use the C(meraki_content_filtering_facts) module for a full list of categories.
+ type: list
+ elements: str
+ category_list_size:
+ description:
+ - Determines whether a network filters fo rall URLs in a category or only the list of top blocked sites.
+ choices: [ top sites, full list ]
+ type: str
+ subset:
+ description:
+ - Display only certain facts.
+ choices: [categories, policy]
+ type: str
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+ - name: Set single allowed URL pattern
+ meraki_content_filtering:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourMXNet
+ allowed_urls:
+ - "http://www.ansible.com/*"
+
+ - name: Set blocked URL category
+ meraki_content_filtering:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourMXNet
+ state: present
+ category_list_size: full list
+ blocked_categories:
+ - "Adult and Pornography"
+
+ - name: Remove match patterns and categories
+ meraki_content_filtering:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourMXNet
+ state: present
+ category_list_size: full list
+ allowed_urls: []
+ blocked_urls: []
+'''
+
+RETURN = r'''
+data:
+ description: Information about the created or manipulated object.
+ returned: info
+ type: complex
+ contains:
+ categories:
+ description: List of available content filtering categories.
+ returned: query for categories
+ type: complex
+ contains:
+ id:
+ description: Unique ID of content filtering category.
+ returned: query for categories
+ type: str
+ sample: "meraki:contentFiltering/category/1"
+ name:
+ description: Name of content filtering category.
+ returned: query for categories
+ type: str
+ sample: "Real Estate"
+ allowed_url_patterns:
+ description: Explicitly permitted URL patterns
+ returned: query for policy
+ type: list
+ sample: ["http://www.ansible.com"]
+ blocked_url_patterns:
+ description: Explicitly denied URL patterns
+ returned: query for policy
+ type: list
+ sample: ["http://www.ansible.net"]
+ blocked_url_categories:
+ description: List of blocked URL categories
+ returned: query for policy
+ type: complex
+ contains:
+ id:
+ description: Unique ID of category to filter
+ returned: query for policy
+ type: list
+ sample: ["meraki:contentFiltering/category/1"]
+ name:
+ description: Name of category to filter
+ returned: query for policy
+ type: list
+ sample: ["Real Estate"]
+ url_cateogory_list_size:
+ description: Size of categories to cache on MX appliance
+ returned: query for policy
+ type: str
+ sample: "topSites"
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def get_category_dict(meraki, full_list, category):
+ for i in full_list['categories']:
+ if i['name'] == category:
+ return i['id']
+ meraki.fail_json(msg="{0} is not a valid content filtering category".format(category))
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(
+ net_id=dict(type='str'),
+ net_name=dict(type='str', aliases=['network']),
+ state=dict(type='str', default='present', choices=['present', 'query']),
+ allowed_urls=dict(type='list', elements='str'),
+ blocked_urls=dict(type='list', elements='str'),
+ blocked_categories=dict(type='list', elements='str'),
+ category_list_size=dict(type='str', choices=['top sites', 'full list']),
+ subset=dict(type='str', choices=['categories', 'policy']),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ meraki = MerakiModule(module, function='content_filtering')
+ module.params['follow_redirects'] = 'all'
+
+ category_urls = {'content_filtering': '/networks/{net_id}/appliance/contentFiltering/categories'}
+ policy_urls = {'content_filtering': '/networks/{net_id}/appliance/contentFiltering'}
+
+ meraki.url_catalog['categories'] = category_urls
+ meraki.url_catalog['policy'] = policy_urls
+
+ if meraki.params['net_name'] and meraki.params['net_id']:
+ meraki.fail_json(msg='net_name and net_id are mutually exclusive')
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = None
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ if meraki.params['subset']:
+ if meraki.params['subset'] == 'categories':
+ path = meraki.construct_path('categories', net_id=net_id)
+ elif meraki.params['subset'] == 'policy':
+ path = meraki.construct_path('policy', net_id=net_id)
+ meraki.result['data'] = meraki.request(path, method='GET')
+ else:
+ response_data = {'categories': None,
+ 'policy': None,
+ }
+ path = meraki.construct_path('categories', net_id=net_id)
+ response_data['categories'] = meraki.request(path, method='GET')
+ path = meraki.construct_path('policy', net_id=net_id)
+ response_data['policy'] = meraki.request(path, method='GET')
+ meraki.result['data'] = response_data
+ if module.params['state'] == 'present':
+ payload = dict()
+ if meraki.params['allowed_urls']:
+ payload['allowedUrlPatterns'] = meraki.params['allowed_urls']
+ if meraki.params['blocked_urls']:
+ payload['blockedUrlPatterns'] = meraki.params['blocked_urls']
+ if meraki.params['blocked_categories']:
+ if len(meraki.params['blocked_categories']) == 0: # Corner case for resetting
+ payload['blockedUrlCategories'] = []
+ else:
+ category_path = meraki.construct_path('categories', net_id=net_id)
+ categories = meraki.request(category_path, method='GET')
+ payload['blockedUrlCategories'] = []
+ for category in meraki.params['blocked_categories']:
+ payload['blockedUrlCategories'].append(get_category_dict(meraki,
+ categories,
+ category))
+ if meraki.params['category_list_size']:
+ if meraki.params['category_list_size'].lower() == 'top sites':
+ payload['urlCategoryListSize'] = "topSites"
+ elif meraki.params['category_list_size'].lower() == 'full list':
+ payload['urlCategoryListSize'] = "fullList"
+ path = meraki.construct_path('policy', net_id=net_id)
+ current = meraki.request(path, method='GET')
+ proposed = current.copy()
+ proposed.update(payload)
+ if meraki.is_update_required(current, payload) is True:
+ if module.check_mode:
+ meraki.generate_diff(current, payload)
+ current.update(payload)
+ meraki.result['changed'] = True
+ meraki.result['data'] = current
+ meraki.exit_json(**meraki.result)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.generate_diff(current, response)
+ else:
+ meraki.result['data'] = current
+ if module.check_mode:
+ meraki.result['data'] = current
+ meraki.exit_json(**meraki.result)
+ meraki.result['data'] = current
+ meraki.exit_json(**meraki.result)
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_device.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_device.py
new file mode 100644
index 00000000..ddbd0301
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_device.py
@@ -0,0 +1,432 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_device
+short_description: Manage devices in the Meraki cloud
+description:
+- Visibility into devices associated to a Meraki environment.
+notes:
+- This module does not support claiming of devices or licenses into a Meraki organization.
+- More information about the Meraki API can be found at U(https://dashboard.meraki.com/api_docs).
+- Some of the options are likely only used for developers within Meraki.
+options:
+ state:
+ description:
+ - Query an organization.
+ choices: [absent, present, query]
+ default: query
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ aliases: [network]
+ type: str
+ net_id:
+ description:
+ - ID of a network.
+ type: str
+ serial:
+ description:
+ - Serial number of a device to query.
+ type: str
+ hostname:
+ description:
+ - Hostname of network device to search for.
+ aliases: [name]
+ type: str
+ model:
+ description:
+ - Model of network device to search for.
+ type: str
+ tags:
+ description:
+ - Space delimited list of tags to assign to device.
+ type: list
+ elements: str
+ lat:
+ description:
+ - Latitude of device's geographic location.
+ - Use negative number for southern hemisphere.
+ aliases: [latitude]
+ type: float
+ lng:
+ description:
+ - Longitude of device's geographic location.
+ - Use negative number for western hemisphere.
+ aliases: [longitude]
+ type: float
+ address:
+ description:
+ - Postal address of device's location.
+ type: str
+ move_map_marker:
+ description:
+ - Whether or not to set the latitude and longitude of a device based on the new address.
+ - Only applies when C(lat) and C(lng) are not specified.
+ type: bool
+ lldp_cdp_timespan:
+ description:
+ - Timespan, in seconds, used to query LLDP and CDP information.
+ - Must be less than 1 month.
+ type: int
+ note:
+ description:
+ - Informational notes about a device.
+ - Limited to 255 characters.
+ type: str
+ query:
+ description:
+ - Specifies what information should be queried.
+ type: str
+ choices: [lldp_cdp, uplink]
+
+
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query all devices in an organization.
+ meraki_device:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: query
+ delegate_to: localhost
+
+- name: Query all devices in a network.
+ meraki_device:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ delegate_to: localhost
+
+- name: Query a device by serial number.
+ meraki_device:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ serial: ABC-123
+ state: query
+ delegate_to: localhost
+
+- name: Lookup uplink information about a device.
+ meraki_device:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ serial_uplink: ABC-123
+ state: query
+ delegate_to: localhost
+
+- name: Lookup LLDP and CDP information about devices connected to specified device.
+ meraki_device:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ serial_lldp_cdp: ABC-123
+ state: query
+ delegate_to: localhost
+
+- name: Lookup a device by hostname.
+ meraki_device:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ hostname: main-switch
+ state: query
+ delegate_to: localhost
+
+- name: Query all devices of a specific model.
+ meraki_device:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ model: MR26
+ state: query
+ delegate_to: localhost
+
+- name: Update information about a device.
+ meraki_device:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ serial: '{{serial}}'
+ name: mr26
+ address: 1060 W. Addison St., Chicago, IL
+ lat: 41.948038
+ lng: -87.65568
+ tags: recently-added
+ delegate_to: localhost
+
+- name: Claim a device into a network.
+ meraki_device:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ serial: ABC-123
+ state: present
+ delegate_to: localhost
+
+- name: Remove a device from a network.
+ meraki_device:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ serial: ABC-123
+ state: absent
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+response:
+ description: Data returned from Meraki dashboard.
+ type: dict
+ returned: info
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def is_device_valid(meraki, serial, data):
+ """ Parse a list of devices for a serial and return True if it's in the list """
+ for device in data:
+ if device['serial'] == serial:
+ return True
+ return False
+
+
+def get_org_devices(meraki, org_id):
+ """ Get all devices in an organization """
+ path = meraki.construct_path('get_all_org', org_id=org_id)
+ response = meraki.request(path, method='GET')
+ if meraki.status != 200:
+ meraki.fail_json(msg='Failed to query all devices belonging to the organization')
+ return response
+
+
+def get_net_devices(meraki, net_id):
+ """ Get all devices in a network """
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ if meraki.status != 200:
+ meraki.fail_json(msg='Failed to query all devices belonging to the network')
+ return response
+
+
+def construct_payload(params):
+ """ Create payload based on inputs """
+ payload = {}
+ if params['hostname'] is not None:
+ payload['name'] = params['hostname']
+ if params['tags'] is not None:
+ payload['tags'] = params['tags']
+ if params['lat'] is not None:
+ payload['lat'] = params['lat']
+ if params['lng'] is not None:
+ payload['lng'] = params['lng']
+ if params['address'] is not None:
+ payload['address'] = params['address']
+ if params['move_map_marker'] is not None:
+ payload['moveMapMarker'] = params['move_map_marker']
+ if params['note'] is not None:
+ payload['notes'] = params['note']
+ return payload
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='query'),
+ net_name=dict(type='str', aliases=['network']),
+ net_id=dict(type='str'),
+ serial=dict(type='str'),
+ lldp_cdp_timespan=dict(type='int'),
+ hostname=dict(type='str', aliases=['name']),
+ model=dict(type='str'),
+ tags=dict(type='list', elements='str', default=None),
+ lat=dict(type='float', aliases=['latitude'], default=None),
+ lng=dict(type='float', aliases=['longitude'], default=None),
+ address=dict(type='str', default=None),
+ move_map_marker=dict(type='bool', default=None),
+ note=dict(type='str', default=None),
+ query=dict(type='str', default=None, choices=['lldp_cdp', 'uplink'])
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=False,
+ )
+ meraki = MerakiModule(module, function='device')
+
+ if meraki.params['query'] is not None \
+ and meraki.params['query'] == 'lldp_cdp' \
+ and not meraki.params['lldp_cdp_timespan']:
+ meraki.fail_json(msg='lldp_cdp_timespan is required when querying LLDP and CDP information')
+ if meraki.params['net_name'] and meraki.params['net_id']:
+ meraki.fail_json(msg='net_name and net_id are mutually exclusive')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'device': '/networks/{net_id}/devices'}
+ query_org_urls = {'device': '/organizations/{org_id}/devices'}
+ query_device_urls = {'device': '/networks/{net_id}/devices/{serial}'}
+ query_device_uplink_urls = {'device': '/networks/{net_id}/devices/{serial}/uplink'}
+ query_device_lldp_urls = {'device': '/networks/{net_id}/devices/{serial}/lldp_cdp'}
+ claim_device_urls = {'device': '/networks/{net_id}/devices/claim'}
+ bind_org_urls = {'device': '/organizations/{org_id}/claim'}
+ update_device_urls = {'device': '/networks/{net_id}/devices/'}
+ delete_device_urls = {'device': '/networks/{net_id}/devices/{serial}/remove'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_all_org'] = query_org_urls
+ meraki.url_catalog['get_device'] = query_device_urls
+ meraki.url_catalog['get_device_uplink'] = query_device_urls
+ meraki.url_catalog['get_device_lldp'] = query_device_lldp_urls
+ meraki.url_catalog['create'] = claim_device_urls
+ meraki.url_catalog['bind_org'] = bind_org_urls
+ meraki.url_catalog['update'] = update_device_urls
+ meraki.url_catalog['delete'] = delete_device_urls
+
+ payload = None
+
+ # execute checks for argument completeness
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = None
+ if meraki.params['net_id'] or meraki.params['net_name']:
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ if meraki.params['net_name'] or meraki.params['net_id']:
+ device = []
+ if meraki.params['serial']:
+ path = meraki.construct_path('get_device', net_id=net_id, custom={'serial': meraki.params['serial']})
+ request = meraki.request(path, method='GET')
+ device.append(request)
+ meraki.result['data'] = device
+ if meraki.params['query'] == 'uplink':
+ path = meraki.construct_path('get_device_uplink', net_id=net_id, custom={'serial': meraki.params['serial']})
+ meraki.result['data'] = (meraki.request(path, method='GET'))
+ elif meraki.params['query'] == 'lldp_cdp':
+ if meraki.params['lldp_cdp_timespan'] > 2592000:
+ meraki.fail_json(msg='LLDP/CDP timespan must be less than a month (2592000 seconds)')
+ path = meraki.construct_path('get_device_lldp', net_id=net_id, custom={'serial': meraki.params['serial']})
+ path = path + '?timespan=' + str(meraki.params['lldp_cdp_timespan'])
+ device.append(meraki.request(path, method='GET'))
+ meraki.result['data'] = device
+ elif meraki.params['hostname']:
+ path = meraki.construct_path('get_all', net_id=net_id)
+ devices = meraki.request(path, method='GET')
+ for unit in devices:
+ try:
+ if unit['name'] == meraki.params['hostname']:
+ device.append(unit)
+ meraki.result['data'] = device
+ except KeyError:
+ pass
+ elif meraki.params['model']:
+ path = meraki.construct_path('get_all', net_id=net_id)
+ devices = meraki.request(path, method='GET')
+ device_match = []
+ for device in devices:
+ if device['model'] == meraki.params['model']:
+ device_match.append(device)
+ meraki.result['data'] = device_match
+ else:
+ path = meraki.construct_path('get_all', net_id=net_id)
+ request = meraki.request(path, method='GET')
+ meraki.result['data'] = request
+ else:
+ path = meraki.construct_path('get_all_org', org_id=org_id, params={'perPage': '1000'})
+ devices = meraki.request(path, method='GET', pagination_items=1000)
+ if meraki.params['serial']:
+ for device in devices:
+ if device['serial'] == meraki.params['serial']:
+ meraki.result['data'] = device
+ else:
+ meraki.result['data'] = devices
+ elif meraki.params['state'] == 'present':
+ device = []
+ if net_id is None: # Claim a device to an organization
+ device_list = get_org_devices(meraki, org_id)
+ if is_device_valid(meraki, meraki.params['serial'], device_list) is False:
+ payload = {'serial': meraki.params['serial']}
+ path = meraki.construct_path('bind_org', org_id=org_id)
+ created_device = []
+ created_device.append(meraki.request(path, method='POST', payload=json.dumps(payload)))
+ meraki.result['data'] = created_device
+ meraki.result['changed'] = True
+ else: # A device is assumed to be in an organization
+ device_list = get_net_devices(meraki, net_id)
+ if is_device_valid(meraki, meraki.params['serial'], device_list) is True: # Device is in network, update
+ query_path = meraki.construct_path('get_all', net_id=net_id)
+ if is_device_valid(meraki, meraki.params['serial'], device_list):
+ payload = construct_payload(meraki.params)
+ query_path = meraki.construct_path('get_device', net_id=net_id, custom={'serial': meraki.params['serial']})
+ device_data = meraki.request(query_path, method='GET')
+ ignore_keys = ['lanIp', 'serial', 'mac', 'model', 'networkId', 'moveMapMarker', 'wan1Ip', 'wan2Ip']
+ if meraki.is_update_required(device_data, payload, optional_ignore=ignore_keys):
+ path = meraki.construct_path('update', net_id=net_id) + meraki.params['serial']
+ updated_device = []
+ updated_device.append(meraki.request(path, method='PUT', payload=json.dumps(payload)))
+ meraki.result['data'] = updated_device
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = device_data
+ else: # Claim device into network
+ query_path = meraki.construct_path('get_all', net_id=net_id)
+ device_list = meraki.request(query_path, method='GET')
+ if is_device_valid(meraki, meraki.params['serial'], device_list) is False:
+ if net_id:
+ payload = {'serials': [meraki.params['serial']]}
+ path = meraki.construct_path('create', net_id=net_id)
+ created_device = []
+ created_device.append(meraki.request(path, method='POST', payload=json.dumps(payload)))
+ meraki.result['data'] = created_device
+ meraki.result['changed'] = True
+ elif meraki.params['state'] == 'absent':
+ device = []
+ query_path = meraki.construct_path('get_all', net_id=net_id)
+ device_list = meraki.request(query_path, method='GET')
+ if is_device_valid(meraki, meraki.params['serial'], device_list) is True:
+ path = meraki.construct_path('delete', net_id=net_id, custom={'serial': meraki.params['serial']})
+ request = meraki.request(path, method='POST')
+ meraki.result['changed'] = True
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_firewalled_services.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_firewalled_services.py
new file mode 100644
index 00000000..ec78c068
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_firewalled_services.py
@@ -0,0 +1,233 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_firewalled_services
+short_description: Edit firewall policies for administrative network services
+description:
+- Allows for setting policy firewalled services for Meraki network devices.
+
+options:
+ auth_key:
+ description:
+ - Authentication key provided by the dashboard. Required if environmental variable MERAKI_KEY is not set.
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ aliases: [ network ]
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ org_name:
+ description:
+ - Name of organization associated to a network.
+ type: str
+ org_id:
+ description:
+ - ID of organization associated to a network.
+ type: str
+ state:
+ description:
+ - States that a policy should be created or modified.
+ choices: [present, query]
+ default: present
+ type: str
+ service:
+ description:
+ - Network service to query or modify.
+ choices: [ICMP, SNMP, web]
+ type: str
+ access:
+ description:
+ - Network service to query or modify.
+ choices: [blocked, restricted, unrestricted]
+ type: str
+ allowed_ips:
+ description:
+ - List of IP addresses allowed to access a service.
+ - Only used when C(access) is set to restricted.
+ type: list
+ elements: str
+
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Set icmp service to blocked
+ meraki_firewalled_services:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ service: ICMP
+ access: blocked
+ delegate_to: localhost
+
+- name: Set icmp service to restricted
+ meraki_firewalled_services:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ service: web
+ access: restricted
+ allowed_ips:
+ - 192.0.1.1
+ - 192.0.1.2
+ delegate_to: localhost
+
+- name: Query appliance services
+ meraki_firewalled_services:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ delegate_to: localhost
+
+- name: Query services
+ meraki_firewalled_services:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ service: ICMP
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: List of network services.
+ returned: info
+ type: complex
+ contains:
+ access:
+ description: Access assigned to a service type.
+ returned: success
+ type: str
+ sample: unrestricted
+ service:
+ description: Service to apply policy to.
+ returned: success
+ type: str
+ sample: ICMP
+ allowed_ips:
+ description: List of IP addresses to have access to service.
+ returned: success
+ type: str
+ sample: 192.0.1.0
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(
+ net_id=dict(type='str'),
+ net_name=dict(type='str', aliases=['network']),
+ state=dict(type='str', default='present', choices=['query', 'present']),
+ service=dict(type='str', default=None, choices=['ICMP', 'SNMP', 'web']),
+ access=dict(type='str', choices=['blocked', 'restricted', 'unrestricted']),
+ allowed_ips=dict(type='list', elements='str'),
+ )
+
+ mutually_exclusive = [('net_name', 'net_id')]
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ mutually_exclusive=mutually_exclusive
+ )
+
+ meraki = MerakiModule(module, function='firewalled_services')
+ module.params['follow_redirects'] = 'all'
+
+ net_services_urls = {'firewalled_services': '/networks/{net_id}/appliance/firewall/firewalledServices'}
+ services_urls = {'firewalled_services': '/networks/{net_id}/appliance/firewall/firewalledServices/{service}'}
+
+ meraki.url_catalog['network_services'] = net_services_urls
+ meraki.url_catalog['service'] = services_urls
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'present':
+ if meraki.params['access'] != 'restricted' and meraki.params['allowed_ips'] is not None:
+ meraki.fail_json(msg="allowed_ips is only allowed when access is restricted.")
+ payload = {'access': meraki.params['access']}
+ if meraki.params['access'] == 'restricted':
+ payload['allowedIps'] = meraki.params['allowed_ips']
+
+ if meraki.params['state'] == 'query':
+ if meraki.params['service'] is None:
+ path = meraki.construct_path('network_services', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ meraki.exit_json(**meraki.result)
+ else:
+ path = meraki.construct_path('service', net_id=net_id, custom={'service': meraki.params['service']})
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('service', net_id=net_id, custom={'service': meraki.params['service']})
+ original = meraki.request(path, method='GET')
+ if meraki.is_update_required(original, payload, optional_ignore=['service']):
+ if meraki.check_mode is True:
+ diff_payload = {'service': meraki.params['service']} # Need to add service as it's not in payload
+ diff_payload.update(payload)
+ meraki.generate_diff(original, diff_payload)
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('service', net_id=net_id, custom={'service': meraki.params['service']})
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.generate_diff(original, response)
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_intrusion_prevention.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_intrusion_prevention.py
new file mode 100644
index 00000000..c5d0213c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_intrusion_prevention.py
@@ -0,0 +1,366 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019 Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_intrusion_prevention
+short_description: Manage intrustion prevention in the Meraki cloud
+description:
+- Allows for management of intrusion prevention rules networks within Meraki MX networks.
+
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: [ absent, present, query ]
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ aliases: [ name, network ]
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ mode:
+ description:
+ - Operational mode of Intrusion Prevention system.
+ choices: [ detection, disabled, prevention ]
+ type: str
+ ids_rulesets:
+ description:
+ - Ruleset complexity setting.
+ choices: [ connectivity, balanced, security ]
+ type: str
+ allowed_rules:
+ description:
+ - List of IDs related to rules which are allowed for the organization.
+ type: list
+ elements: dict
+ suboptions:
+ rule_id:
+ description:
+ - ID of rule as defined by Snort.
+ type: str
+ message:
+ description:
+ - Description of rule.
+ - This is overwritten by the API.
+ type: str
+ protected_networks:
+ description:
+ - Set included/excluded networks for Intrusion Prevention.
+ type: dict
+ suboptions:
+ use_default:
+ description:
+ - Whether to use special IPv4 addresses per RFC 5735.
+ type: bool
+ included_cidr:
+ description:
+ - List of network IP ranges to include in scanning.
+ type: list
+ elements: str
+ excluded_cidr:
+ description:
+ - List of network IP ranges to exclude from scanning.
+ type: list
+ elements: str
+
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Set whitelist for organization
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ allowed_rules:
+ - rule_id: "meraki:intrusion/snort/GID/01/SID/5805"
+ message: Test rule
+ delegate_to: localhost
+
+- name: Query IPS info for organization
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ delegate_to: localhost
+ register: query_org
+
+- name: Set full ruleset with check mode
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - IPS'
+ mode: prevention
+ ids_rulesets: security
+ protected_networks:
+ use_default: true
+ included_cidr:
+ - 192.0.1.0/24
+ excluded_cidr:
+ - 10.0.1.0/24
+ delegate_to: localhost
+
+- name: Clear rules from organization
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ allowed_rules: []
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about the Threat Protection settings.
+ returned: success
+ type: complex
+ contains:
+ whitelistedRules:
+ description: List of whitelisted IPS rules.
+ returned: success, when organization is queried or modified
+ type: complex
+ contains:
+ ruleId:
+ description: A rule identifier for an IPS rule.
+ returned: success, when organization is queried or modified
+ type: str
+ sample: "meraki:intrusion/snort/GID/01/SID/5805"
+ message:
+ description: Description of rule.
+ returned: success, when organization is queried or modified
+ type: str
+ sample: "MALWARE-OTHER Trackware myway speedbar runtime detection - switch engines"
+ mode:
+ description: Enabled setting of intrusion prevention.
+ returned: success, when network is queried or modified
+ type: str
+ sample: enabled
+ idsRulesets:
+ description: Setting of selected ruleset.
+ returned: success, when network is queried or modified
+ type: str
+ sample: balanced
+ protectedNetworks:
+ description: Networks protected by IPS.
+ returned: success, when network is queried or modified
+ type: complex
+ contains:
+ useDefault:
+ description: Whether to use special IPv4 addresses.
+ returned: success, when network is queried or modified
+ type: bool
+ sample: true
+ includedCidr:
+ description: List of CIDR notiation networks to protect.
+ returned: success, when network is queried or modified
+ type: str
+ sample: 192.0.1.0/24
+ excludedCidr:
+ description: List of CIDR notiation networks to exclude from protection.
+ returned: success, when network is queried or modified
+ type: str
+ sample: 192.0.1.0/24
+
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+param_map = {'allowed_rules': 'allowedrules',
+ 'rule_id': 'ruleId',
+ 'message': 'message',
+ 'mode': 'mode',
+ 'protected_networks': 'protectedNetworks',
+ 'use_default': 'useDefault',
+ 'included_cidr': 'includedCidr',
+ }
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ allowedrules_arg_spec = dict(rule_id=dict(type='str'),
+ message=dict(type='str'),
+ )
+
+ protected_nets_arg_spec = dict(use_default=dict(type='bool'),
+ included_cidr=dict(type='list', elements='str'),
+ excluded_cidr=dict(type='list', elements='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(
+ net_id=dict(type='str'),
+ net_name=dict(type='str', aliases=['name', 'network']),
+ state=dict(type='str', choices=['absent', 'present', 'query'], default='present'),
+ allowed_rules=dict(type='list', default=None, elements='dict', options=allowedrules_arg_spec),
+ mode=dict(type='str', choices=['detection', 'disabled', 'prevention']),
+ ids_rulesets=dict(type='str', choices=['connectivity', 'balanced', 'security']),
+ protected_networks=dict(type='dict', default=None, options=protected_nets_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ meraki = MerakiModule(module, function='intrusion_prevention')
+ module.params['follow_redirects'] = 'all'
+ payload = None
+
+ query_org_urls = {'intrusion_prevention': '/organizations/{org_id}/appliance/security/intrusion'}
+ query_net_urls = {'intrusion_prevention': '/networks/{net_id}/appliance/security/intrusion'}
+ set_org_urls = {'intrusion_prevention': '/organizations/{org_id}/appliance/security/intrusion'}
+ set_net_urls = {'intrusion_prevention': '/networks/{net_id}/appliance/security/intrusion'}
+ meraki.url_catalog['query_org'] = query_org_urls
+ meraki.url_catalog['query_net'] = query_net_urls
+ meraki.url_catalog['set_org'] = set_org_urls
+ meraki.url_catalog['set_net'] = set_net_urls
+
+ if not meraki.params['org_name'] and not meraki.params['org_id']:
+ meraki.fail_json(msg='org_name or org_id parameters are required')
+ if meraki.params['net_name'] and meraki.params['net_id']:
+ meraki.fail_json(msg='net_name and net_id are mutually exclusive')
+ if meraki.params['net_name'] is None and meraki.params['net_id'] is None: # Organization param check
+ if meraki.params['state'] == 'present':
+ if meraki.params['allowed_rules'] is None:
+ meraki.fail_json(msg='allowed_rules is required when state is present and no network is specified.')
+ if meraki.params['net_name'] or meraki.params['net_id']: # Network param check
+ if meraki.params['state'] == 'present':
+ if meraki.params['protected_networks'] is not None:
+ if meraki.params['protected_networks']['use_default'] is False and meraki.params['protected_networks']['included_cidr'] is None:
+ meraki.fail_json(msg="included_cidr is required when use_default is False.")
+ if meraki.params['protected_networks']['use_default'] is False and meraki.params['protected_networks']['excluded_cidr'] is None:
+ meraki.fail_json(msg="excluded_cidr is required when use_default is False.")
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None and meraki.params['net_name']:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ # Assemble payload
+ if meraki.params['state'] == 'present':
+ if net_id is None: # Create payload for organization
+ rules = []
+ for rule in meraki.params['allowed_rules']:
+ rules.append({'ruleId': rule['rule_id'],
+ 'message': rule['message'],
+ })
+ payload = {'allowedRules': rules}
+ else: # Create payload for network
+ payload = dict()
+ if meraki.params['mode']:
+ payload['mode'] = meraki.params['mode']
+ if meraki.params['ids_rulesets']:
+ payload['idsRulesets'] = meraki.params['ids_rulesets']
+ if meraki.params['protected_networks']:
+ payload['protectedNetworks'] = {}
+ if meraki.params['protected_networks']['use_default']:
+ payload['protectedNetworks'].update({'useDefault': meraki.params['protected_networks']['use_default']})
+ if meraki.params['protected_networks']['included_cidr']:
+ payload['protectedNetworks'].update({'includedCidr': meraki.params['protected_networks']['included_cidr']})
+ if meraki.params['protected_networks']['excluded_cidr']:
+ payload['protectedNetworks'].update({'excludedCidr': meraki.params['protected_networks']['excluded_cidr']})
+ elif meraki.params['state'] == 'absent':
+ if net_id is None: # Create payload for organization
+ payload = {'allowedRules': []}
+
+ if meraki.params['state'] == 'query':
+ if net_id is None: # Query settings for organization
+ path = meraki.construct_path('query_org', org_id=org_id)
+ data = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = data
+ else: # Query settings for network
+ path = meraki.construct_path('query_net', net_id=net_id)
+ data = meraki.request(path, method='GET')
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('query_org', org_id=org_id)
+ original = meraki.request(path, method='GET')
+ if net_id is None: # Set configuration for organization
+ if meraki.is_update_required(original, payload, optional_ignore=['message']):
+ if meraki.module.check_mode is True:
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('set_org', org_id=org_id)
+ data = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = data
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ meraki.result['changed'] = False
+ else: # Set configuration for network
+ path = meraki.construct_path('query_net', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ if meraki.is_update_required(original, payload):
+ if meraki.module.check_mode is True:
+ payload.update(original)
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('set_net', net_id=net_id)
+ data = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = data
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ meraki.result['changed'] = False
+ elif meraki.params['state'] == 'absent':
+ if net_id is None:
+ path = meraki.construct_path('query_org', org_id=org_id)
+ original = meraki.request(path, method='GET')
+ if meraki.is_update_required(original, payload):
+ if meraki.module.check_mode is True:
+ payload.update(original)
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('set_org', org_id=org_id)
+ data = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = data
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ meraki.result['changed'] = False
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_malware.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_malware.py
new file mode 100644
index 00000000..1cbf7e68
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_malware.py
@@ -0,0 +1,264 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_malware
+short_description: Manage Malware Protection in the Meraki cloud
+description:
+- Fully configure malware protection in a Meraki environment.
+notes:
+- Some of the options are likely only used for developers within Meraki.
+options:
+ state:
+ description:
+ - Specifies whether object should be queried, created/modified, or removed.
+ choices: [absent, present, query]
+ default: query
+ type: str
+ net_name:
+ description:
+ - Name of network which configuration is applied to.
+ aliases: [network]
+ type: str
+ net_id:
+ description:
+ - ID of network which configuration is applied to.
+ type: str
+ allowed_urls:
+ description:
+ - List of URLs to whitelist.
+ type: list
+ elements: dict
+ suboptions:
+ url:
+ description:
+ - URL string to allow.
+ type: str
+ comment:
+ description:
+ - Human readable information about URL.
+ type: str
+ allowed_files:
+ description:
+ - List of files to whitelist.
+ type: list
+ elements: dict
+ suboptions:
+ sha256:
+ description:
+ - 256-bit hash of file.
+ type: str
+ aliases: [ hash ]
+ comment:
+ description:
+ - Human readable information about file.
+ type: str
+ mode:
+ description:
+ - Enabled or disabled state of malware protection.
+ choices: [disabled, enabled]
+ type: str
+
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+ - name: Enable malware protection
+ meraki_malware:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ mode: enabled
+ delegate_to: localhost
+
+ - name: Set whitelisted url
+ meraki_malware:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ mode: enabled
+ allowed_urls:
+ - url: www.ansible.com
+ comment: Ansible
+ - url: www.google.com
+ comment: Google
+ delegate_to: localhost
+
+ - name: Set whitelisted file
+ meraki_malware:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ mode: enabled
+ allowed_files:
+ - sha256: e82c5f7d75004727e1f3b94426b9a11c8bc4c312a9170ac9a73abace40aef503
+ comment: random zip
+ delegate_to: localhost
+
+ - name: Get malware settings
+ meraki_malware:
+ auth_key: abc123
+ state: query
+ org_name: YourNet
+ net_name: YourOrg
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: List of administrators.
+ returned: success
+ type: complex
+ contains:
+ mode:
+ description: Mode to enable or disable malware scanning.
+ returned: success
+ type: str
+ sample: enabled
+ allowed_files:
+ description: List of files which are whitelisted.
+ returned: success
+ type: complex
+ contains:
+ sha256:
+ description: sha256 hash of whitelisted file.
+ returned: success
+ type: str
+ sample: e82c5f7d75004727e1f3b94426b9a11c8bc4c312a9170ac9a73abace40aef503
+ comment:
+ description: Comment about the whitelisted entity
+ returned: success
+ type: str
+ sample: TPS report
+ allowed_urls:
+ description: List of URLs which are whitelisted.
+ returned: success
+ type: complex
+ contains:
+ url:
+ description: URL of whitelisted site.
+ returned: success
+ type: str
+ sample: site.com
+ comment:
+ description: Comment about the whitelisted entity
+ returned: success
+ type: str
+ sample: Corporate HQ
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ urls_arg_spec = dict(url=dict(type='str'),
+ comment=dict(type='str'),
+ )
+
+ files_arg_spec = dict(sha256=dict(type='str', aliases=['hash']),
+ comment=dict(type='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='query'),
+ net_name=dict(type='str', aliases=['network']),
+ net_id=dict(type='str'),
+ mode=dict(type='str', choices=['enabled', 'disabled']),
+ allowed_urls=dict(type='list', default=None, elements='dict', options=urls_arg_spec),
+ allowed_files=dict(type='list', default=None, elements='dict', options=files_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='malware')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_url = {'malware': '/networks/{net_id}/appliance/security/malware'}
+ update_url = {'malware': '/networks/{net_id}/appliance/security/malware'}
+
+ meraki.url_catalog['get_one'].update(query_url)
+ meraki.url_catalog['update'] = update_url
+
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ # Check for argument completeness
+ if meraki.params['state'] == 'present':
+ if meraki.params['allowed_files'] is not None or meraki.params['allowed_urls'] is not None:
+ if meraki.params['mode'] is None:
+ meraki.fail_json(msg="mode must be set when allowed_files or allowed_urls is set.")
+
+ # Assemble payload
+ if meraki.params['state'] == 'present':
+ payload = dict()
+ if meraki.params['mode'] is not None:
+ payload['mode'] = meraki.params['mode']
+ if meraki.params['allowed_urls'] is not None:
+ payload['allowedUrls'] = meraki.params['allowed_urls']
+ if meraki.params['allowed_files'] is not None:
+ payload['allowedFiles'] = meraki.params['allowed_files']
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_one', net_id=net_id)
+ data = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = data
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_one', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ if meraki.is_update_required(original, payload):
+ if meraki.module.check_mode is True:
+ meraki.generate_diff(original, payload)
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id)
+ data = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.generate_diff(original, data)
+ meraki.result['data'] = data
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_management_interface.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_management_interface.py
new file mode 100644
index 00000000..c0297861
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_management_interface.py
@@ -0,0 +1,384 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_management_interface
+short_description: Configure Meraki management interfaces
+version_added: "1.1.0"
+description:
+- Allows for configuration of management interfaces on Meraki MX, MS, and MR devices.
+notes:
+- C(WAN2) parameter is only valid for MX appliances.
+- C(wan_enabled) should not be provided for non-MX devies.
+options:
+ state:
+ description:
+ - Specifies whether configuration template information should be queried, modified, or deleted.
+ choices: ['absent', 'query', 'present']
+ default: query
+ type: str
+ org_name:
+ description:
+ - Name of organization containing the configuration template.
+ type: str
+ org_id:
+ description:
+ - ID of organization associated to a configuration template.
+ type: str
+ net_name:
+ description:
+ - Name of the network to bind or unbind configuration template to.
+ type: str
+ net_id:
+ description:
+ - ID of the network to bind or unbind configuration template to.
+ type: str
+ serial:
+ description:
+ - serial number of the device to configure.
+ type: str
+ required: true
+ wan1:
+ description:
+ - Management interface details for management interface.
+ aliases: [mgmt1]
+ type: dict
+ suboptions:
+ wan_enabled:
+ description:
+ - States whether the management interface is enabled.
+ - Only valid for MX devices.
+ type: str
+ choices: [disabled, enabled, not configured]
+ using_static_ip:
+ description:
+ - Configures the interface to use static IP or DHCP.
+ type: bool
+ static_ip:
+ description:
+ - IP address assigned to Management interface.
+ - Valid only if C(using_static_ip) is C(True).
+ type: str
+ static_gateway_ip:
+ description:
+ - IP address for default gateway.
+ - Valid only if C(using_static_ip) is C(True).
+ type: str
+ static_subnet_mask:
+ description:
+ - Netmask for static IP address.
+ - Valid only if C(using_static_ip) is C(True).
+ type: str
+ static_dns:
+ description:
+ - DNS servers to use.
+ - Allows for a maximum of 2 addresses.
+ type: list
+ elements: str
+ vlan:
+ description:
+ - VLAN number to use for the management network.
+ type: int
+ wan2:
+ description:
+ - Management interface details for management interface.
+ type: dict
+ aliases: [mgmt2]
+ suboptions:
+ wan_enabled:
+ description:
+ - States whether the management interface is enabled.
+ - Only valid for MX devices.
+ type: str
+ choices: [disabled, enabled, not configured]
+ using_static_ip:
+ description:
+ - Configures the interface to use static IP or DHCP.
+ type: bool
+ static_ip:
+ description:
+ - IP address assigned to Management interface.
+ - Valid only if C(using_static_ip) is C(True).
+ type: str
+ static_gateway_ip:
+ description:
+ - IP address for default gateway.
+ - Valid only if C(using_static_ip) is C(True).
+ type: str
+ static_subnet_mask:
+ description:
+ - Netmask for static IP address.
+ - Valid only if C(using_static_ip) is C(True).
+ type: str
+ static_dns:
+ description:
+ - DNS servers to use.
+ - Allows for a maximum of 2 addresses.
+ type: list
+ elements: str
+ vlan:
+ description:
+ - VLAN number to use for the management network.
+ type: int
+
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Set WAN2 as static IP
+ meraki_management_interface:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_id: YourNetId
+ serial: AAAA-BBBB-CCCC
+ wan2:
+ wan_enabled: enabled
+ using_static_ip: yes
+ static_ip: 192.168.16.195
+ static_gateway_ip: 192.168.16.1
+ static_subnet_mask: 255.255.255.0
+ static_dns:
+ - 1.1.1.1
+ vlan: 1
+ delegate_to: localhost
+
+- name: Query management information
+ meraki_management_interface:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_id: YourNetId
+ serial: AAAA-BBBB-CCCC
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about queried object.
+ returned: success
+ type: complex
+ contains:
+ wan1:
+ description: Management configuration for WAN1 interface
+ returned: success
+ type: complex
+ contains:
+ wan_enabled:
+ description: Enabled state of interface
+ returned: success
+ type: str
+ sample: enabled
+ using_static_ip:
+ description: Boolean value of whether static IP assignment is used on interface
+ returned: success
+ type: bool
+ sample: True
+ static_ip:
+ description: Assigned static IP
+ returned: only if static IP assignment is used
+ type: str
+ sample: 192.0.1.2
+ static_gateway_ip:
+ description: Assigned static gateway IP
+ returned: only if static IP assignment is used
+ type: str
+ sample: 192.0.1.1
+ static_subnet_mask:
+ description: Assigned netmask for static IP
+ returned: only if static IP assignment is used
+ type: str
+ sample: 255.255.255.0
+ static_dns:
+ description: List of DNS IP addresses
+ returned: only if static IP assignment is used
+ type: list
+ sample: ["1.1.1.1"]
+ vlan:
+ description: VLAN tag id of management VLAN
+ returned: success
+ type: int
+ sample: 2
+ wan2:
+ description: Management configuration for WAN1 interface
+ returned: success
+ type: complex
+ contains:
+ wan_enabled:
+ description: Enabled state of interface
+ returned: success
+ type: str
+ sample: enabled
+ using_static_ip:
+ description: Boolean value of whether static IP assignment is used on interface
+ returned: success
+ type: bool
+ sample: True
+ static_ip:
+ description: Assigned static IP
+ returned: only if static IP assignment is used
+ type: str
+ sample: 192.0.1.2
+ static_gateway_ip:
+ description: Assigned static gateway IP
+ returned: only if static IP assignment is used
+ type: str
+ sample: 192.0.1.1
+ static_subnet_mask:
+ description: Assigned netmask for static IP
+ returned: only if static IP assignment is used
+ type: str
+ sample: 255.255.255.0
+ static_dns:
+ description: List of DNS IP addresses
+ returned: only if static IP assignment is used
+ type: list
+ sample: ["1.1.1.1"]
+ vlan:
+ description: VLAN tag id of management VLAN
+ returned: success
+ type: int
+ sample: 2
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import recursive_diff
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ int_arg_spec = dict(wan_enabled=dict(type='str', choices=['enabled', 'disabled', 'not configured']),
+ using_static_ip=dict(type='bool'),
+ static_ip=dict(type='str'),
+ static_gateway_ip=dict(type='str'),
+ static_subnet_mask=dict(type='str'),
+ static_dns=dict(type='list', elements='str'),
+ vlan=dict(type='int'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'query', 'present'], default='query'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ serial=dict(type='str', required=True),
+ wan1=dict(type='dict', default=None, options=int_arg_spec, aliases=['mgmt1']),
+ wan2=dict(type='dict', default=None, options=int_arg_spec, aliases=['mgmt2']),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='management_interface')
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'management_interface': '/devices/{serial}/managementInterface'}
+
+ meraki.url_catalog['get_one'].update(query_urls)
+
+ if meraki.params['net_id'] and meraki.params['net_name']:
+ meraki.fail_json('net_id and net_name are mutually exclusive.')
+ if meraki.params['state'] == 'present':
+ interfaces = ('wan1', 'wan2')
+ for interface in interfaces:
+ if meraki.params[interface] is not None:
+ if meraki.params[interface]['using_static_ip'] is True:
+ if len(meraki.params[interface]['static_dns']) > 2:
+ meraki.fail_json("Maximum number of static DNS addresses is 2.")
+
+ payload = dict()
+
+ if meraki.params['state'] == 'present':
+ interfaces = ('wan1', 'wan2')
+ for interface in interfaces:
+ if meraki.params[interface] is not None:
+ wan_int = dict()
+ if meraki.params[interface]['wan_enabled'] is not None:
+ wan_int['wanEnabled'] = meraki.params[interface]['wan_enabled']
+ if meraki.params[interface]['using_static_ip'] is not None:
+ wan_int['usingStaticIp'] = meraki.params[interface]['using_static_ip']
+ if meraki.params[interface]['vlan'] is not None:
+ wan_int['vlan'] = meraki.params[interface]['vlan']
+ if meraki.params[interface]['using_static_ip'] is True:
+ wan_int['staticIp'] = meraki.params[interface]['static_ip']
+ wan_int['staticGatewayIp'] = meraki.params[interface]['static_gateway_ip']
+ wan_int['staticSubnetMask'] = meraki.params[interface]['static_subnet_mask']
+ wan_int['staticDns'] = meraki.params[interface]['static_dns']
+ payload[interface] = wan_int
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ if meraki.params['org_name']:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'serial': meraki.params['serial']})
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_one', custom={'serial': meraki.params['serial']})
+ original = meraki.request(path, method='GET')
+ update_required = False
+ if 'wan1' in original:
+ if 'wanEnabled' in original['wan1']:
+ update_required = meraki.is_update_required(original, payload)
+ else:
+ update_required = meraki.is_update_required(original, payload, optional_ignore=['wanEnabled'])
+ if 'wan2' in original and update_required is False:
+ if 'wanEnabled' in original['wan2']:
+ update_required = meraki.is_update_required(original, payload)
+ else:
+ update_required = meraki.is_update_required(original, payload, optional_ignore=['wanEnabled'])
+ if update_required is True:
+ if meraki.check_mode is True:
+ diff = recursive_diff(original, payload)
+ original.update(payload)
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1]}
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ diff = recursive_diff(original, response)
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1]}
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_l3_firewall.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_l3_firewall.py
new file mode 100644
index 00000000..274dbb15
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_l3_firewall.py
@@ -0,0 +1,288 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mr_l3_firewall
+short_description: Manage MR access point layer 3 firewalls in the Meraki cloud
+description:
+- Allows for creation, management, and visibility into layer 3 firewalls implemented on Meraki MR access points.
+- Module is not idempotent as of current release.
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ type: str
+ choices: [ present, query ]
+ default: present
+ net_name:
+ description:
+ - Name of network containing access points.
+ type: str
+ net_id:
+ description:
+ - ID of network containing access points.
+ type: str
+ number:
+ description:
+ - Number of SSID to apply firewall rule to.
+ type: str
+ aliases: [ ssid_number ]
+ ssid_name:
+ description:
+ - Name of SSID to apply firewall rule to.
+ type: str
+ aliases: [ ssid ]
+ allow_lan_access:
+ description:
+ - Sets whether devices can talk to other devices on the same LAN.
+ type: bool
+ default: yes
+ rules:
+ description:
+ - List of firewall rules.
+ type: list
+ elements: dict
+ suboptions:
+ policy:
+ description:
+ - Specifies the action that should be taken when rule is hit.
+ type: str
+ choices: [ allow, deny ]
+ protocol:
+ description:
+ - Specifies protocol to match against.
+ type: str
+ choices: [ any, icmp, tcp, udp ]
+ dest_port:
+ description:
+ - Comma-seperated list of destination ports to match.
+ type: str
+ dest_cidr:
+ description:
+ - Comma-separated list of CIDR notation networks to match.
+ type: str
+ comment:
+ description:
+ - Optional comment describing the firewall rule.
+ type: str
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Create single firewall rule
+ meraki_mr_l3_firewall:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_id: 12345
+ number: 1
+ rules:
+ - comment: Integration test rule
+ policy: allow
+ protocol: tcp
+ dest_port: 80
+ dest_cidr: 192.0.2.0/24
+ allow_lan_access: no
+ delegate_to: localhost
+
+- name: Enable local LAN access
+ meraki_mr_l3_firewall:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_id: 123
+ number: 1
+ rules:
+ allow_lan_access: yes
+ delegate_to: localhost
+
+- name: Query firewall rules
+ meraki_mr_l3_firewall:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ number: 1
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def assemble_payload(meraki):
+ params_map = {'policy': 'policy',
+ 'protocol': 'protocol',
+ 'dest_port': 'destPort',
+ 'dest_cidr': 'destCidr',
+ 'comment': 'comment',
+ }
+ rules = []
+ for rule in meraki.params['rules']:
+ proposed_rule = dict()
+ for k, v in rule.items():
+ proposed_rule[params_map[k]] = v
+ rules.append(proposed_rule)
+ payload = {'rules': rules}
+ return payload
+
+
+def get_rules(meraki, net_id, number):
+ path = meraki.construct_path('get_all', net_id=net_id, custom={'number': number})
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ return response
+
+
+def get_ssid_number(name, data):
+ for ssid in data:
+ if name == ssid['name']:
+ return ssid['number']
+ return False
+
+
+def get_ssids(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ return meraki.request(path, method='GET')
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ fw_rules = dict(policy=dict(type='str', choices=['allow', 'deny']),
+ protocol=dict(type='str', choices=['tcp', 'udp', 'icmp', 'any']),
+ dest_port=dict(type='str'),
+ dest_cidr=dict(type='str'),
+ comment=dict(type='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='present'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ number=dict(type='str', aliases=['ssid_number']),
+ ssid_name=dict(type='str', aliases=['ssid']),
+ rules=dict(type='list', default=None, elements='dict', options=fw_rules),
+ allow_lan_access=dict(type='bool', default=True),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='mr_l3_firewall')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'mr_l3_firewall': '/networks/{net_id}/wireless/ssids/{number}/firewall/l3FirewallRules'}
+ update_urls = {'mr_l3_firewall': '/networks/{net_id}/wireless/ssids/{number}/firewall/l3FirewallRules'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['update'] = update_urls
+
+ payload = None
+
+ # execute checks for argument completeness
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ orgs = None
+ if org_id is None:
+ orgs = meraki.get_orgs()
+ for org in orgs:
+ if org['name'] == meraki.params['org_name']:
+ org_id = org['id']
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ if orgs is None:
+ orgs = meraki.get_orgs()
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'],
+ data=meraki.get_nets(org_id=org_id))
+ number = meraki.params['number']
+ if meraki.params['ssid_name']:
+ number = get_ssid_number(meraki.params['ssid_name'], get_ssids(meraki, net_id))
+
+ if meraki.params['state'] == 'query':
+ meraki.result['data'] = get_rules(meraki, net_id, number)
+ elif meraki.params['state'] == 'present':
+ rules = get_rules(meraki, net_id, number)
+ path = meraki.construct_path('get_all', net_id=net_id, custom={'number': number})
+ if meraki.params['rules']:
+ payload = assemble_payload(meraki)
+ else:
+ payload = dict()
+ update = False
+ try:
+ if len(rules) != len(payload['rules']): # Quick and simple check to avoid more processing
+ update = True
+ if update is False:
+ for r in range(len(rules) - 2):
+ if meraki.is_update_required(rules[r], payload[r]) is True:
+ update = True
+ except KeyError:
+ pass
+ # meraki.fail_json(msg=rules)
+ if rules['rules'][len(rules['rules']) - 2] != meraki.params['allow_lan_access']:
+ update = True
+ if update is True:
+ payload['allowLanAccess'] = meraki.params['allow_lan_access']
+ if meraki.check_mode is True:
+ # This code is disgusting, rework it at some point
+ if 'rules' in payload:
+ cleansed_payload = payload['rules']
+ cleansed_payload.append(rules['rules'][len(rules['rules']) - 1])
+ cleansed_payload.append(rules['rules'][len(rules['rules']) - 2])
+ if meraki.params['allow_lan_access'] is None:
+ cleansed_payload[len(cleansed_payload) - 2]['policy'] = rules['rules'][len(rules['rules']) - 2]['policy']
+ else:
+ if meraki.params['allow_lan_access'] is True:
+ cleansed_payload[len(cleansed_payload) - 2]['policy'] = 'allow'
+ else:
+ cleansed_payload[len(cleansed_payload) - 2]['policy'] = 'deny'
+ else:
+ if meraki.params['allow_lan_access'] is True:
+ rules['rules'][len(rules['rules']) - 2]['policy'] = 'allow'
+ else:
+ rules['rules'][len(rules['rules']) - 2]['policy'] = 'deny'
+ cleansed_payload = rules
+ meraki.result['data'] = cleansed_payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = rules
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_rf_profile.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_rf_profile.py
new file mode 100644
index 00000000..3a31e825
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_rf_profile.py
@@ -0,0 +1,663 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mr_rf_profile
+short_description: Manage RF profiles for Meraki wireless networks
+description:
+- Allows for configuration of radio frequency (RF) profiles in Meraki MR wireless networks.
+options:
+ state:
+ description:
+ - Query, edit, or delete wireless RF profile settings.
+ type: str
+ choices: [ present, query, absent]
+ default: present
+ net_name:
+ description:
+ - Name of network.
+ type: str
+ net_id:
+ description:
+ - ID of network.
+ type: str
+ profile_id:
+ description:
+ - Unique identifier of existing RF profile.
+ type: str
+ aliases: [ id ]
+ band_selection_type:
+ description:
+ - Sets whether band selection is assigned per access point or SSID.
+ - This param is required on creation.
+ choices: [ ssid, ap ]
+ type: str
+ min_bitrate_type:
+ description:
+ - Type of minimum bitrate.
+ choices: [ band, ssid ]
+ type: str
+ name:
+ description:
+ - The unique name of the new profile.
+ - This param is required on creation.
+ type: str
+ client_balancing_enabled:
+ description:
+ - Steers client to best available access point.
+ type: bool
+ ap_band_settings:
+ description:
+ - Settings that will be enabled if selectionType is set to 'ap'.
+ type: dict
+ suboptions:
+ mode:
+ description:
+ - Sets which RF band the AP will support.
+ choices: [ 2.4ghz, 5ghz, dual ]
+ aliases: [ band_operation_mode ]
+ type: str
+ band_steering_enabled:
+ description:
+ - Steers client to most open band.
+ type: bool
+ five_ghz_settings:
+ description:
+ - Settings related to 5Ghz band.
+ type: dict
+ suboptions:
+ max_power:
+ description:
+ - Sets max power (dBm) of 5Ghz band.
+ - Can be integer between 8 and 30.
+ type: int
+ min_power:
+ description:
+ - Sets minmimum power (dBm) of 5Ghz band.
+ - Can be integer between 8 and 30.
+ type: int
+ min_bitrate:
+ description:
+ - Sets minimum bitrate (Mbps) of 5Ghz band.
+ choices: [ 6, 9, 12, 18, 24, 36, 48, 54 ]
+ type: int
+ rxsop:
+ description:
+ - The RX-SOP level controls the sensitivity of the radio.
+ - It is strongly recommended to use RX-SOP only after consulting a wireless expert.
+ - RX-SOP can be configured in the range of -65 to -95 (dBm).
+ type: int
+ channel_width:
+ description:
+ - Sets channel width (MHz) for 5Ghz band.
+ choices: [ auto, 20, 40, 80 ]
+ type: str
+ valid_auto_channels:
+ description:
+ - Sets valid auto channels for 5Ghz band.
+ type: list
+ elements: int
+ choices: [36,
+ 40,
+ 44,
+ 48,
+ 52,
+ 56,
+ 60,
+ 64,
+ 100,
+ 104,
+ 108,
+ 112,
+ 116,
+ 120,
+ 124,
+ 128,
+ 132,
+ 136,
+ 140,
+ 144,
+ 149,
+ 153,
+ 157,
+ 161,
+ 165]
+ two_four_ghz_settings:
+ description:
+ - Settings related to 2.4Ghz band
+ type: dict
+ suboptions:
+ max_power:
+ description:
+ - Sets max power (dBm) of 2.4Ghz band.
+ - Can be integer between 5 and 30.
+ type: int
+ min_power:
+ description:
+ - Sets minmimum power (dBm) of 2.4Ghz band.
+ - Can be integer between 5 and 30.
+ type: int
+ min_bitrate:
+ description:
+ - Sets minimum bitrate (Mbps) of 2.4Ghz band.
+ choices: [ 1, 2, 5.5, 6, 9, 11, 12, 18, 24, 36, 48, 54 ]
+ type: float
+ rxsop:
+ description:
+ - The RX-SOP level controls the sensitivity of the radio.
+ - It is strongly recommended to use RX-SOP only after consulting a wireless expert.
+ - RX-SOP can be configured in the range of -65 to -95 (dBm).
+ type: int
+ ax_enabled:
+ description:
+ - Determines whether ax radio on 2.4Ghz band is on or off.
+ type: bool
+ valid_auto_channels:
+ description:
+ - Sets valid auto channels for 2.4Ghz band.
+ choices: [ 1, 6, 11 ]
+ type: list
+ elements: int
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Create RF profile in check mode
+ meraki_mr_rf_profile:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ name: Test Profile
+ band_selection_type: ap
+ client_balancing_enabled: True
+ ap_band_settings:
+ mode: dual
+ band_steering_enabled: true
+ five_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -65
+ channel_width: 20
+ valid_auto_channels:
+ - 36
+ - 40
+ - 44
+ two_four_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -65
+ ax_enabled: false
+ valid_auto_channels:
+ - 1
+ delegate_to: localhost
+
+- name: Query all RF profiles
+ meraki_mr_rf_profile:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ delegate_to: localhost
+
+- name: Query one RF profile by ID
+ meraki_mr_rf_profile:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ profile_id: '{{ profile_id }}'
+ delegate_to: localhost
+
+- name: Update profile
+ meraki_mr_rf_profile:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ profile_id: 12345
+ band_selection_type: ap
+ client_balancing_enabled: True
+ ap_band_settings:
+ mode: dual
+ band_steering_enabled: true
+ five_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -65
+ channel_width: 20
+ valid_auto_channels:
+ - 36
+ - 44
+ two_four_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -75
+ ax_enabled: false
+ valid_auto_channels:
+ - 1
+ delegate_to: localhost
+
+- name: Delete RF profile
+ meraki_mr_rf_profile:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: absent
+ profile_id: 12345
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: List of wireless RF profile settings.
+ returned: success
+ type: complex
+ contains:
+ id:
+ description:
+ - Unique identifier of existing RF profile.
+ type: str
+ returned: success
+ sample: 12345
+ band_selection_type:
+ description:
+ - Sets whether band selection is assigned per access point or SSID.
+ - This param is required on creation.
+ type: str
+ returned: success
+ sample: ap
+ min_bitrate_type:
+ description:
+ - Type of minimum bitrate.
+ type: str
+ returned: success
+ sample: ssid
+ name:
+ description:
+ - The unique name of the new profile.
+ - This param is required on creation.
+ type: str
+ returned: success
+ sample: Guest RF profile
+ client_balancing_enabled:
+ description:
+ - Steers client to best available access point.
+ type: bool
+ returned: success
+ sample: true
+ ap_band_settings:
+ description:
+ - Settings that will be enabled if selectionType is set to 'ap'.
+ type: complex
+ returned: success
+ contains:
+ mode:
+ description:
+ - Sets which RF band the AP will support.
+ type: str
+ returned: success
+ sample: dual
+ band_steering_enabled:
+ description:
+ - Steers client to most open band.
+ type: bool
+ returned: success
+ sample: true
+ five_ghz_settings:
+ description:
+ - Settings related to 5Ghz band.
+ type: complex
+ returned: success
+ contains:
+ max_power:
+ description:
+ - Sets max power (dBm) of 5Ghz band.
+ - Can be integer between 8 and 30.
+ type: int
+ returned: success
+ sample: 12
+ min_power:
+ description:
+ - Sets minmimum power (dBm) of 5Ghz band.
+ - Can be integer between 8 and 30.
+ type: int
+ returned: success
+ sample: 12
+ min_bitrate:
+ description:
+ - Sets minimum bitrate (Mbps) of 5Ghz band.
+ type: int
+ returned: success
+ sample: 6
+ rxsop:
+ description:
+ - The RX-SOP level controls the sensitivity of the radio.
+ type: int
+ returned: success
+ sample: -70
+ channel_width:
+ description:
+ - Sets channel width (MHz) for 5Ghz band.
+ type: str
+ returned: success
+ sample: auto
+ valid_auto_channels:
+ description:
+ - Sets valid auto channels for 5Ghz band.
+ type: list
+ returned: success
+ two_four_ghz_settings:
+ description:
+ - Settings related to 2.4Ghz band
+ type: complex
+ returned: success
+ contains:
+ max_power:
+ description:
+ - Sets max power (dBm) of 2.4Ghz band.
+ type: int
+ returned: success
+ sample: 12
+ min_power:
+ description:
+ - Sets minmimum power (dBm) of 2.4Ghz band.
+ type: int
+ returned: success
+ sample: 12
+ min_bitrate:
+ description:
+ - Sets minimum bitrate (Mbps) of 2.4Ghz band.
+ type: float
+ returned: success
+ sample: 5.5
+ rxsop:
+ description:
+ - The RX-SOP level controls the sensitivity of the radio.
+ type: int
+ returned: success
+ sample: -70
+ ax_enabled:
+ description:
+ - Determines whether ax radio on 2.4Ghz band is on or off.
+ type: bool
+ returned: success
+ sample: true
+ valid_auto_channels:
+ description:
+ - Sets valid auto channels for 2.4Ghz band.
+ type: list
+ returned: success
+ sample: 6
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import snake_dict_to_camel_dict
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+from re import sub
+
+
+def get_profile(meraki, profiles, name):
+ for profile in profiles:
+ if profile['name'] == name:
+ return profile
+ return None
+
+
+def construct_payload(meraki):
+ payload = {}
+ if meraki.params['name'] is not None:
+ payload['name'] = meraki.params['name']
+ if meraki.params['band_selection_type'] is not None:
+ payload['bandSelectionType'] = meraki.params['band_selection_type']
+ if meraki.params['min_bitrate_type'] is not None:
+ payload['minBitrateType'] = meraki.params['min_bitrate_type']
+ if meraki.params['client_balancing_enabled'] is not None:
+ payload['clientBalancingEnabled'] = meraki.params['client_balancing_enabled']
+ if meraki.params['ap_band_settings'] is not None:
+ payload['apBandSettings'] = {}
+ if meraki.params['ap_band_settings']['mode'] is not None:
+ payload['apBandSettings']['bandOperationMode'] = meraki.params['ap_band_settings']['mode']
+ if meraki.params['ap_band_settings']['band_steering_enabled'] is not None:
+ payload['apBandSettings']['bandSteeringEnabled'] = meraki.params['ap_band_settings']['band_steering_enabled']
+ if meraki.params['five_ghz_settings'] is not None:
+ payload['fiveGhzSettings'] = {}
+ if meraki.params['five_ghz_settings']['max_power'] is not None:
+ payload['fiveGhzSettings']['maxPower'] = meraki.params['five_ghz_settings']['max_power']
+ if meraki.params['five_ghz_settings']['min_bitrate'] is not None:
+ payload['fiveGhzSettings']['minBitrate'] = meraki.params['five_ghz_settings']['min_bitrate']
+ if meraki.params['five_ghz_settings']['min_power'] is not None:
+ payload['fiveGhzSettings']['minPower'] = meraki.params['five_ghz_settings']['min_power']
+ if meraki.params['five_ghz_settings']['rxsop'] is not None:
+ payload['fiveGhzSettings']['rxsop'] = meraki.params['five_ghz_settings']['rxsop']
+ if meraki.params['five_ghz_settings']['channel_width'] is not None:
+ payload['fiveGhzSettings']['channelWidth'] = meraki.params['five_ghz_settings']['channel_width']
+ if meraki.params['five_ghz_settings']['valid_auto_channels'] is not None:
+ payload['fiveGhzSettings']['validAutoChannels'] = meraki.params['five_ghz_settings']['valid_auto_channels']
+ if meraki.params['two_four_ghz_settings'] is not None:
+ payload['twoFourGhzSettings'] = {}
+ if meraki.params['two_four_ghz_settings']['max_power'] is not None:
+ payload['twoFourGhzSettings']['maxPower'] = meraki.params['two_four_ghz_settings']['max_power']
+ if meraki.params['two_four_ghz_settings']['min_bitrate'] is not None:
+ payload['twoFourGhzSettings']['minBitrate'] = meraki.params['two_four_ghz_settings']['min_bitrate']
+ if meraki.params['two_four_ghz_settings']['min_power'] is not None:
+ payload['twoFourGhzSettings']['minPower'] = meraki.params['two_four_ghz_settings']['min_power']
+ if meraki.params['two_four_ghz_settings']['rxsop'] is not None:
+ payload['twoFourGhzSettings']['rxsop'] = meraki.params['two_four_ghz_settings']['rxsop']
+ if meraki.params['two_four_ghz_settings']['ax_enabled'] is not None:
+ payload['twoFourGhzSettings']['axEnabled'] = meraki.params['two_four_ghz_settings']['ax_enabled']
+ if meraki.params['two_four_ghz_settings']['valid_auto_channels'] is not None:
+ payload['twoFourGhzSettings']['validAutoChannels'] = meraki.params['two_four_ghz_settings']['valid_auto_channels']
+ return payload
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ band_arg_spec = dict(mode=dict(type='str', aliases=['band_operation_mode'], choices=['2.4ghz', '5ghz', 'dual']),
+ band_steering_enabled=dict(type='bool'),
+ )
+
+ five_arg_spec = dict(max_power=dict(type='int'),
+ min_bitrate=dict(type='int', choices=[6, 9, 12, 18, 24, 36, 48, 54]),
+ min_power=dict(type='int'),
+ rxsop=dict(type='int'),
+ channel_width=dict(type='str', choices=['auto', '20', '40', '80']),
+ valid_auto_channels=dict(type='list', elements='int', choices=[36,
+ 40,
+ 44,
+ 48,
+ 52,
+ 56,
+ 60,
+ 64,
+ 100,
+ 104,
+ 108,
+ 112,
+ 116,
+ 120,
+ 124,
+ 128,
+ 132,
+ 136,
+ 140,
+ 144,
+ 149,
+ 153,
+ 157,
+ 161,
+ 165]),
+ )
+
+ two_arg_spec = dict(max_power=dict(type='int'),
+ min_bitrate=dict(type='float', choices=[1,
+ 2,
+ 5.5,
+ 6,
+ 9,
+ 11,
+ 12,
+ 18,
+ 24,
+ 36,
+ 48,
+ 54]),
+ min_power=dict(type='int'),
+ rxsop=dict(type='int'),
+ ax_enabled=dict(type='bool'),
+ valid_auto_channels=dict(type='list', elements='int', choices=[1, 6, 11]),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query', 'absent'], default='present'),
+ org_name=dict(type='str', aliases=['organization']),
+ org_id=dict(type='str'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ profile_id=dict(type='str', aliases=['id']),
+ band_selection_type=dict(type='str', choices=['ssid', 'ap']),
+ min_bitrate_type=dict(type='str', choices=['band', 'ssid']),
+ name=dict(type='str'),
+ client_balancing_enabled=dict(type='bool'),
+ ap_band_settings=dict(type='dict', options=band_arg_spec),
+ five_ghz_settings=dict(type='dict', options=five_arg_spec),
+ two_four_ghz_settings=dict(type='dict', options=two_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='mr_rf_profile')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_all_urls = {'mr_rf_profile': '/networks/{net_id}/wireless/rfProfiles'}
+ query_urls = {'mr_rf_profile': '/networks/{net_id}/wireless/rfProfiles/{profile_id}'}
+ create_urls = {'mr_rf_profile': '/networks/{net_id}/wireless/rfProfiles'}
+ update_urls = {'mr_rf_profile': '/networks/{net_id}/wireless/rfProfiles/{profile_id}'}
+ delete_urls = {'mr_rf_profile': '/networks/{net_id}/wireless/rfProfiles/{profile_id}'}
+
+ meraki.url_catalog['get_all'].update(query_all_urls)
+ meraki.url_catalog['get_one'].update(query_urls)
+ meraki.url_catalog['create'] = create_urls
+ meraki.url_catalog['update'] = update_urls
+ meraki.url_catalog['delete'] = delete_urls
+
+ if meraki.params['five_ghz_settings'] is not None:
+ if meraki.params['five_ghz_settings']['max_power'] is not None:
+ if meraki.params['five_ghz_settings']['max_power'] < 8 or meraki.params['five_ghz_settings']['max_power'] > 30:
+ meraki.fail_json(msg="5ghz max power must be between 8 and 30.")
+ if meraki.params['five_ghz_settings']['min_power'] is not None:
+ if meraki.params['five_ghz_settings']['min_power'] < 8 or meraki.params['five_ghz_settings']['min_power'] > 30:
+ meraki.fail_json(msg="5ghz min power must be between 8 and 30.")
+ if meraki.params['five_ghz_settings']['rxsop'] is not None:
+ if meraki.params['five_ghz_settings']['rxsop'] < -95 or meraki.params['five_ghz_settings']['rxsop'] > -65:
+ meraki.fail_json(msg="5ghz min power must be between 8 and 30.")
+ if meraki.params['two_four_ghz_settings'] is not None:
+ if meraki.params['two_four_ghz_settings']['max_power'] is not None:
+ if meraki.params['two_four_ghz_settings']['max_power'] < 5 or meraki.params['two_four_ghz_settings']['max_power'] > 30:
+ meraki.fail_json(msg="5ghz max power must be between 5 and 30.")
+ if meraki.params['two_four_ghz_settings']['min_power'] is not None:
+ if meraki.params['two_four_ghz_settings']['min_power'] < 5 or meraki.params['two_four_ghz_settings']['min_power'] > 30:
+ meraki.fail_json(msg="5ghz min power must be between 5 and 30.")
+ if meraki.params['two_four_ghz_settings']['rxsop'] is not None:
+ if meraki.params['two_four_ghz_settings']['rxsop'] < -95 or meraki.params['two_four_ghz_settings']['rxsop'] > -65:
+ meraki.fail_json(msg="5ghz min power must be between 8 and 30.")
+
+ org_id = meraki.params['org_id']
+ net_id = meraki.params['net_id']
+ profile_id = meraki.params['profile_id']
+ profile = None
+ profiles = None
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
+ if profile_id is None:
+ path = meraki.construct_path('get_all', net_id=net_id)
+ profiles = meraki.request(path, method='GET')
+ profile = get_profile(meraki, profiles, meraki.params['name'])
+
+ if meraki.params['state'] == 'query':
+ if profile_id is not None:
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'profile_id': profile_id})
+ result = meraki.request(path, method='GET')
+ meraki.result['data'] = result
+ meraki.exit_json(**meraki.result)
+ if profiles is None:
+ path = meraki.construct_path('get_all', net_id=net_id)
+ profiles = meraki.request(path, method='GET')
+ meraki.result['data'] = profiles
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'present':
+ payload = construct_payload(meraki)
+ if profile_id is None: # Create a new RF profile
+ if meraki.check_mode is True:
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('create', net_id=net_id)
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ else:
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'profile_id': profile_id})
+ original = meraki.request(path, method='GET')
+ if meraki.is_update_required(original, payload) is True:
+ if meraki.check_mode is True:
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id, custom={'profile_id': profile_id})
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ else:
+ meraki.result['data'] = original
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'absent':
+ if meraki.check_mode is True:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('delete', net_id=net_id, custom={'profile_id': profile_id})
+ response = meraki.request(path, method='DELETE')
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_settings.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_settings.py
new file mode 100644
index 00000000..0d0c8897
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_settings.py
@@ -0,0 +1,222 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mr_settings
+short_description: Manage general settings for Meraki wireless networks
+description:
+- Allows for configuration of general settings in Meraki MR wireless networks.
+options:
+ state:
+ description:
+ - Query or edit wireless settings.
+ type: str
+ choices: [ present, query]
+ default: present
+ net_name:
+ description:
+ - Name of network.
+ type: str
+ net_id:
+ description:
+ - ID of network.
+ type: str
+ upgrade_strategy:
+ description:
+ - The upgrade strategy to apply to the network.
+ - Requires firmware version MR 26.8 or higher.
+ choices: [ minimize_upgrade_time, minimize_client_downtime ]
+ type: str
+ ipv6_bridge_enabled:
+ description:
+ - Toggle for enabling or disabling IPv6 bridging in a network.
+ - If enabled, SSIDs must also be configured to use bridge mode.
+ type: bool
+ led_lights_on:
+ description:
+ - Toggle for enabling or disabling LED lights on all APs in the network.
+ type: bool
+ location_analytics_enabled:
+ description:
+ - Toggle for enabling or disabling location analytics for your network.
+ type: bool
+ meshing_enabled:
+ description: Toggle for enabling or disabling meshing in a network.
+ type: bool
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query all settings
+ meraki_mr_settings:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ delegate_to: localhost
+- name: Configure settings
+ meraki_mr_settings:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ upgrade_strategy: minimize_upgrade_time
+ ipv6_bridge_enabled: false
+ led_lights_on: true
+ location_analytics_enabled: true
+ meshing_enabled: true
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: List of wireless settings.
+ returned: success
+ type: complex
+ contains:
+ upgrade_strategy:
+ description:
+ - The upgrade strategy to apply to the network.
+ - Requires firmware version MR 26.8 or higher.
+ type: str
+ returned: success
+ sample: minimize_upgrade_time
+ ipv6_bridge_enabled:
+ description:
+ - Toggle for enabling or disabling IPv6 bridging in a network.
+ - If enabled, SSIDs must also be configured to use bridge mode.
+ type: bool
+ returned: success
+ sample: True
+ led_lights_on:
+ description:
+ - Toggle for enabling or disabling LED lights on all APs in the network.
+ type: bool
+ returned: success
+ sample: True
+ location_analytics_enabled:
+ description:
+ - Toggle for enabling or disabling location analytics for your network.
+ type: bool
+ returned: success
+ sample: True
+ meshing_enabled:
+ description: Toggle for enabling or disabling meshing in a network.
+ type: bool
+ returned: success
+ sample: True
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import snake_dict_to_camel_dict
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+from re import sub
+
+
+def convert_to_camel_case(string):
+ string = sub(r"(_|-)+", " ", string).title().replace(" ", "")
+ return string[0].lower() + string[1:]
+
+
+def construct_payload(meraki):
+ payload = {}
+ if meraki.params['upgrade_strategy'] is not None:
+ payload['upgradeStrategy'] = convert_to_camel_case(meraki.params['upgrade_strategy'])
+ if meraki.params['ipv6_bridge_enabled'] is not None:
+ payload['ipv6BridgeEnabled'] = meraki.params['ipv6_bridge_enabled']
+ if meraki.params['led_lights_on'] is not None:
+ payload['ledLightsOn'] = meraki.params['led_lights_on']
+ if meraki.params['location_analytics_enabled'] is not None:
+ payload['locationAnalyticsEnabled'] = meraki.params['location_analytics_enabled']
+ if meraki.params['meshing_enabled'] is not None:
+ payload['meshingEnabled'] = meraki.params['meshing_enabled']
+ return payload
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='present'),
+ org_name=dict(type='str', aliases=['organization']),
+ org_id=dict(type='str'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ upgrade_strategy=dict(type='str', choices=['minimize_upgrade_time',
+ 'minimize_client_downtime']),
+ ipv6_bridge_enabled=dict(type='bool'),
+ led_lights_on=dict(type='bool'),
+ location_analytics_enabled=dict(type='bool'),
+ meshing_enabled=dict(type='bool'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='mr_settings')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'mr_settings': '/networks/{net_id}/wireless/settings'}
+ update_urls = {'mr_settings': '/networks/{net_id}/wireless/settings'}
+
+ meraki.url_catalog['get_one'].update(query_urls)
+ meraki.url_catalog['update'] = update_urls
+
+ org_id = meraki.params['org_id']
+ net_id = meraki.params['net_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_one', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_one', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ payload = construct_payload(meraki)
+ if meraki.is_update_required(original, payload) is True:
+ if meraki.check_mode is True:
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ else:
+ meraki.result['data'] = original
+ meraki.exit_json(**meraki.result)
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_ssid.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_ssid.py
new file mode 100644
index 00000000..c9101290
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mr_ssid.py
@@ -0,0 +1,614 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mr_ssid
+short_description: Manage wireless SSIDs in the Meraki cloud
+description:
+- Allows for management of SSIDs in a Meraki wireless environment.
+notes:
+- Deleting an SSID does not delete RADIUS servers.
+options:
+ state:
+ description:
+ - Specifies whether SNMP information should be queried or modified.
+ type: str
+ choices: [ absent, query, present ]
+ default: present
+ number:
+ description:
+ - SSID number within network.
+ type: int
+ aliases: [ssid_number]
+ name:
+ description:
+ - Name of SSID.
+ type: str
+ net_name:
+ description:
+ - Name of network.
+ type: str
+ net_id:
+ description:
+ - ID of network.
+ type: str
+ enabled:
+ description:
+ - Enable or disable SSID network.
+ type: bool
+ auth_mode:
+ description:
+ - Set authentication mode of network.
+ type: str
+ choices: [open, psk, open-with-radius, 8021x-meraki, 8021x-radius]
+ encryption_mode:
+ description:
+ - Set encryption mode of network.
+ type: str
+ choices: [wpa, eap, wpa-eap]
+ psk:
+ description:
+ - Password for wireless network.
+ - Requires auth_mode to be set to psk.
+ type: str
+ wpa_encryption_mode:
+ description:
+ - Encryption mode within WPA specification.
+ type: str
+ choices: [WPA1 and WPA2, WPA2 only, WPA3 Transition Mode, WPA3 only]
+ splash_page:
+ description:
+ - Set to enable splash page and specify type of splash.
+ type: str
+ choices: ['None',
+ 'Click-through splash page',
+ 'Billing',
+ 'Password-protected with Meraki RADIUS',
+ 'Password-protected with custom RADIUS',
+ 'Password-protected with Active Directory',
+ 'Password-protected with LDAP',
+ 'SMS authentication',
+ 'Systems Manager Sentry',
+ 'Facebook Wi-Fi',
+ 'Google OAuth',
+ 'Sponsored guest',
+ 'Cisco ISE']
+ radius_servers:
+ description:
+ - List of RADIUS servers.
+ type: list
+ elements: dict
+ suboptions:
+ host:
+ description:
+ - IP address or hostname of RADIUS server.
+ type: str
+ required: true
+ port:
+ description:
+ - Port number RADIUS server is listening to.
+ type: int
+ secret:
+ description:
+ - RADIUS password.
+ - Setting password is not idempotent.
+ type: str
+ radius_coa_enabled:
+ description:
+ - Enable or disable RADIUS CoA (Change of Authorization) on SSID.
+ type: bool
+ radius_failover_policy:
+ description:
+ - Set client access policy in case RADIUS servers aren't available.
+ type: str
+ choices: [Deny access, Allow access]
+ radius_load_balancing_policy:
+ description:
+ - Set load balancing policy when multiple RADIUS servers are specified.
+ type: str
+ choices: [Strict priority order, Round robin]
+ radius_accounting_enabled:
+ description:
+ - Enable or disable RADIUS accounting.
+ type: bool
+ radius_accounting_servers:
+ description:
+ - List of RADIUS servers for RADIUS accounting.
+ type: list
+ elements: dict
+ suboptions:
+ host:
+ description:
+ - IP address or hostname of RADIUS server.
+ type: str
+ required: true
+ port:
+ description:
+ - Port number RADIUS server is listening to.
+ type: int
+ secret:
+ description:
+ - RADIUS password.
+ - Setting password is not idempotent.
+ type: str
+ ip_assignment_mode:
+ description:
+ - Method of which SSID uses to assign IP addresses.
+ type: str
+ choices: ['NAT mode',
+ 'Bridge mode',
+ 'Layer 3 roaming',
+ 'Layer 3 roaming with a concentrator',
+ 'VPN']
+ use_vlan_tagging:
+ description:
+ - Set whether to use VLAN tagging.
+ - Requires C(default_vlan_id) to be set.
+ type: bool
+ default_vlan_id:
+ description:
+ - Default VLAN ID.
+ - Requires C(ip_assignment_mode) to be C(Bridge mode) or C(Layer 3 roaming).
+ type: int
+ vlan_id:
+ description:
+ - ID number of VLAN on SSID.
+ - Requires C(ip_assignment_mode) to be C(ayer 3 roaming with a concentrator) or C(VPN).
+ type: int
+ ap_tags_vlan_ids:
+ description:
+ - List of VLAN tags.
+ - Requires C(ip_assignment_mode) to be C(Bridge mode) or C(Layer 3 roaming).
+ - Requires C(use_vlan_tagging) to be C(True).
+ type: list
+ elements: dict
+ suboptions:
+ tags:
+ description:
+ - List of AP tags.
+ type: list
+ elements: str
+ vlan_id:
+ description:
+ - Numerical identifier that is assigned to the VLAN.
+ type: int
+ walled_garden_enabled:
+ description:
+ - Enable or disable walled garden functionality.
+ type: bool
+ walled_garden_ranges:
+ description:
+ - List of walled garden ranges.
+ type: list
+ elements: str
+ min_bitrate:
+ description:
+ - Minimum bitrate (Mbps) allowed on SSID.
+ type: float
+ choices: [1, 2, 5.5, 6, 9, 11, 12, 18, 24, 36, 48, 54]
+ band_selection:
+ description:
+ - Set band selection mode.
+ type: str
+ choices: ['Dual band operation', '5 GHz band only', 'Dual band operation with Band Steering']
+ per_client_bandwidth_limit_up:
+ description:
+ - Maximum bandwidth in Mbps devices on SSID can upload.
+ type: int
+ per_client_bandwidth_limit_down:
+ description:
+ - Maximum bandwidth in Mbps devices on SSID can download.
+ type: int
+ concentrator_network_id:
+ description:
+ - The concentrator to use for 'Layer 3 roaming with a concentrator' or 'VPN'.
+ type: str
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Enable and name SSID
+ meraki_ssid:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: WiFi
+ name: GuestSSID
+ enabled: true
+ delegate_to: localhost
+
+- name: Set PSK with invalid encryption mode
+ meraki_ssid:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: WiFi
+ name: GuestSSID
+ auth_mode: psk
+ psk: abc1234
+ encryption_mode: eap
+ ignore_errors: yes
+ delegate_to: localhost
+
+- name: Configure RADIUS servers
+ meraki_ssid:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: WiFi
+ name: GuestSSID
+ auth_mode: open-with-radius
+ radius_servers:
+ - host: 192.0.1.200
+ port: 1234
+ secret: abc98765
+ delegate_to: localhost
+
+- name: Enable click-through splash page
+ meraki_ssid:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: WiFi
+ name: GuestSSID
+ splash_page: Click-through splash page
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: List of wireless SSIDs.
+ returned: success
+ type: complex
+ contains:
+ number:
+ description: Zero-based index number for SSIDs.
+ returned: success
+ type: int
+ sample: 0
+ name:
+ description:
+ - Name of wireless SSID.
+ - This value is what is broadcasted.
+ returned: success
+ type: str
+ sample: CorpWireless
+ enabled:
+ description: Enabled state of wireless network.
+ returned: success
+ type: bool
+ sample: true
+ splash_page:
+ description: Splash page to show when user authenticates.
+ returned: success
+ type: str
+ sample: Click-through splash page
+ ssid_admin_accessible:
+ description: Whether SSID is administratively accessible.
+ returned: success
+ type: bool
+ sample: true
+ auth_mode:
+ description: Authentication method.
+ returned: success
+ type: str
+ sample: psk
+ psk:
+ description: Secret wireless password.
+ returned: success
+ type: str
+ sample: SecretWiFiPass
+ encryption_mode:
+ description: Wireless traffic encryption method.
+ returned: success
+ type: str
+ sample: wpa
+ wpa_encryption_mode:
+ description: Enabled WPA versions.
+ returned: success
+ type: str
+ sample: WPA2 only
+ ip_assignment_mode:
+ description: Wireless client IP assignment method.
+ returned: success
+ type: str
+ sample: NAT mode
+ min_bitrate:
+ description: Minimum bitrate a wireless client can connect at.
+ returned: success
+ type: int
+ sample: 11
+ band_selection:
+ description: Wireless RF frequency wireless network will be broadcast on.
+ returned: success
+ type: str
+ sample: 5 GHz band only
+ per_client_bandwidth_limit_up:
+ description: Maximum upload bandwidth a client can use.
+ returned: success
+ type: int
+ sample: 1000
+ per_client_bandwidth_limit_down:
+ description: Maximum download bandwidth a client can use.
+ returned: success
+ type: int
+ sample: 0
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def get_available_number(data):
+ for item in data:
+ if 'Unconfigured SSID' in item['name']:
+ return item['number']
+ return False
+
+
+def get_ssid_number(name, data):
+ for ssid in data:
+ if name == ssid['name']:
+ return ssid['number']
+ return False
+
+
+def get_ssids(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ return meraki.request(path, method='GET')
+
+
+def construct_payload(meraki):
+ param_map = {'name': 'name',
+ 'enabled': 'enabled',
+ 'authMode': 'auth_mode',
+ 'encryptionMode': 'encryption_mode',
+ 'psk': 'psk',
+ 'wpaEncryptionMode': 'wpa_encryption_mode',
+ 'splashPage': 'splash_page',
+ 'radiusServers': 'radius_servers',
+ 'radiusCoaEnabled': 'radius_coa_enabled',
+ 'radiusFailoverPolicy': 'radius_failover_policy',
+ 'radiusLoadBalancingPolicy': 'radius_load_balancing_policy',
+ 'radiusAccountingEnabled': 'radius_accounting_enabled',
+ 'radiusAccountingServers': 'radius_accounting_servers',
+ 'ipAssignmentMode': 'ip_assignment_mode',
+ 'useVlanTagging': 'use_vlan_tagging',
+ 'concentratorNetworkId': 'concentrator_network_id',
+ 'vlanId': 'vlan_id',
+ 'defaultVlanId': 'default_vlan_id',
+ 'apTagsAndVlanIds': 'ap_tags_vlan_ids',
+ 'walledGardenEnabled': 'walled_garden_enabled',
+ 'walledGardenRanges': 'walled_garden_ranges',
+ 'minBitrate': 'min_bitrate',
+ 'bandSelection': 'band_selection',
+ 'perClientBandwidthLimitUp': 'per_client_bandwidth_limit_up',
+ 'perClientBandwidthLimitDown': 'per_client_bandwidth_limit_down',
+ }
+
+ payload = dict()
+ for k, v in param_map.items():
+ if meraki.params[v] is not None:
+ payload[k] = meraki.params[v]
+
+ if meraki.params['ap_tags_vlan_ids'] is not None:
+ for i in payload['apTagsAndVlanIds']:
+ try:
+ i['vlanId'] = i['vlan_id']
+ del i['vlan_id']
+ except KeyError:
+ pass
+
+ return payload
+
+
+def per_line_to_str(data):
+ return data.replace('\n', ' ')
+
+
+def main():
+ default_payload = {'name': 'Unconfigured SSID',
+ 'auth_mode': 'open',
+ 'splashPage': 'None',
+ 'perClientBandwidthLimitUp': 0,
+ 'perClientBandwidthLimitDown': 0,
+ 'ipAssignmentMode': 'NAT mode',
+ 'enabled': False,
+ 'bandSelection': 'Dual band operation',
+ 'minBitrate': 11,
+ }
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+ radius_arg_spec = dict(host=dict(type='str', required=True),
+ port=dict(type='int'),
+ secret=dict(type='str', no_log=True),
+ )
+ vlan_arg_spec = dict(tags=dict(type='list', elements='str'),
+ vlan_id=dict(type='int'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='present'),
+ number=dict(type='int', aliases=['ssid_number']),
+ name=dict(type='str'),
+ org_name=dict(type='str', aliases=['organization']),
+ org_id=dict(type='str'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ enabled=dict(type='bool'),
+ auth_mode=dict(type='str', choices=['open', 'psk', 'open-with-radius', '8021x-meraki', '8021x-radius']),
+ encryption_mode=dict(type='str', choices=['wpa', 'eap', 'wpa-eap']),
+ psk=dict(type='str', no_log=True),
+ wpa_encryption_mode=dict(type='str', choices=['WPA1 and WPA2',
+ 'WPA2 only',
+ 'WPA3 Transition Mode',
+ 'WPA3 only']),
+ splash_page=dict(type='str', choices=['None',
+ 'Click-through splash page',
+ 'Billing',
+ 'Password-protected with Meraki RADIUS',
+ 'Password-protected with custom RADIUS',
+ 'Password-protected with Active Directory',
+ 'Password-protected with LDAP',
+ 'SMS authentication',
+ 'Systems Manager Sentry',
+ 'Facebook Wi-Fi',
+ 'Google OAuth',
+ 'Sponsored guest',
+ 'Cisco ISE',
+ ]),
+ radius_servers=dict(type='list', default=None, elements='dict', options=radius_arg_spec),
+ radius_coa_enabled=dict(type='bool'),
+ radius_failover_policy=dict(type='str', choices=['Deny access', 'Allow access']),
+ radius_load_balancing_policy=dict(type='str', choices=['Strict priority order', 'Round robin']),
+ radius_accounting_enabled=dict(type='bool'),
+ radius_accounting_servers=dict(type='list', elements='dict', options=radius_arg_spec),
+ ip_assignment_mode=dict(type='str', choices=['NAT mode',
+ 'Bridge mode',
+ 'Layer 3 roaming',
+ 'Layer 3 roaming with a concentrator',
+ 'VPN']),
+ use_vlan_tagging=dict(type='bool'),
+ concentrator_network_id=dict(type='str'),
+ vlan_id=dict(type='int'),
+ default_vlan_id=dict(type='int'),
+ ap_tags_vlan_ids=dict(type='list', default=None, elements='dict', options=vlan_arg_spec),
+ walled_garden_enabled=dict(type='bool'),
+ walled_garden_ranges=dict(type='list', elements='str'),
+ min_bitrate=dict(type='float', choices=[1, 2, 5.5, 6, 9, 11, 12, 18, 24, 36, 48, 54]),
+ band_selection=dict(type='str', choices=['Dual band operation',
+ '5 GHz band only',
+ 'Dual band operation with Band Steering']),
+ per_client_bandwidth_limit_up=dict(type='int'),
+ per_client_bandwidth_limit_down=dict(type='int'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='ssid')
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'ssid': '/networks/{net_id}/wireless/ssids'}
+ query_url = {'ssid': '/networks/{net_id}/wireless/ssids/{number}'}
+ update_url = {'ssid': '/networks/{net_id}/wireless/ssids/'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_one'].update(query_url)
+ meraki.url_catalog['update'] = update_url
+
+ payload = None
+
+ # execute checks for argument completeness
+ if meraki.params['psk']:
+ if meraki.params['auth_mode'] != 'psk':
+ meraki.fail_json(msg='PSK is only allowed when auth_mode is set to psk')
+ if meraki.params['encryption_mode'] != 'wpa':
+ meraki.fail_json(msg='PSK requires encryption_mode be set to wpa')
+ if meraki.params['radius_servers']:
+ if meraki.params['auth_mode'] not in ('open-with-radius', '8021x-radius'):
+ meraki.fail_json(msg='radius_servers requires auth_mode to be open-with-radius or 8021x-radius')
+ if meraki.params['radius_accounting_enabled'] is True:
+ if meraki.params['auth_mode'] not in ('open-with-radius', '8021x-radius'):
+ meraki.fails_json(msg='radius_accounting_enabled is only allowed when auth_mode is open-with-radius or 8021x-radius')
+ if meraki.params['radius_accounting_servers'] is True:
+ if meraki.params['auth_mode'] not in ('open-with-radius', '8021x-radius') or meraki.params['radius_accounting_enabled'] is False:
+ meraki.fail_json(msg='radius_accounting_servers is only allowed when auth_mode is open_with_radius or 8021x-radius and \
+ radius_accounting_enabled is true')
+ if meraki.params['use_vlan_tagging'] is True:
+ if meraki.params['default_vlan_id'] is None:
+ meraki.fail_json(msg="default_vlan_id is required when use_vlan_tagging is True")
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ net_id = meraki.params['net_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ if meraki.params['name']:
+ ssid_id = get_ssid_number(meraki.params['name'], get_ssids(meraki, net_id))
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'number': ssid_id})
+ meraki.result['data'] = meraki.request(path, method='GET')
+ elif meraki.params['number'] is not None:
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'number': meraki.params['number']})
+ meraki.result['data'] = meraki.request(path, method='GET')
+ else:
+ meraki.result['data'] = get_ssids(meraki, net_id)
+ elif meraki.params['state'] == 'present':
+ payload = construct_payload(meraki)
+ ssids = get_ssids(meraki, net_id)
+ number = meraki.params['number']
+ if number is None:
+ number = get_ssid_number(meraki.params['name'], ssids)
+ original = ssids[number]
+ if meraki.is_update_required(original, payload, optional_ignore=['secret']):
+ ssid_id = meraki.params['number']
+ if ssid_id is None: # Name should be used to lookup number
+ ssid_id = get_ssid_number(meraki.params['name'], ssids)
+ if ssid_id is False:
+ ssid_id = get_available_number(ssids)
+ if ssid_id is False:
+ meraki.fail_json(msg='No unconfigured SSIDs are available. Specify a number.')
+ if meraki.check_mode is True:
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id) + str(ssid_id)
+ result = meraki.request(path, 'PUT', payload=json.dumps(payload))
+ meraki.result['data'] = result
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ elif meraki.params['state'] == 'absent':
+ ssids = get_ssids(meraki, net_id)
+ ssid_id = meraki.params['number']
+ if ssid_id is None: # Name should be used to lookup number
+ ssid_id = get_ssid_number(meraki.params['name'], ssids)
+ if ssid_id is False:
+ ssid_id = get_available_number(ssids)
+ if ssid_id is False:
+ meraki.fail_json(msg='No SSID found by specified name and no number was referenced.')
+ if meraki.check_mode is True:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id) + str(ssid_id)
+ payload = default_payload
+ payload['name'] = payload['name'] + ' ' + str(ssid_id + 1)
+ result = meraki.request(path, 'PUT', payload=json.dumps(payload))
+ meraki.result['data'] = result
+ meraki.result['changed'] = True
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_access_list.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_access_list.py
new file mode 100644
index 00000000..bd5e9205
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_access_list.py
@@ -0,0 +1,319 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_ms_access_list
+short_description: Manage access lists for Meraki switches in the Meraki cloud
+version_added: "0.1.0"
+description:
+- Configure and query information about access lists on Meraki switches within the Meraki cloud.
+notes:
+- Some of the options are likely only used for developers within Meraki.
+options:
+ state:
+ description:
+ - Specifies whether object should be queried, created/modified, or removed.
+ choices: [absent, present, query]
+ default: query
+ type: str
+ net_name:
+ description:
+ - Name of network which configuration is applied to.
+ aliases: [network]
+ type: str
+ net_id:
+ description:
+ - ID of network which configuration is applied to.
+ type: str
+ rules:
+ description:
+ - List of access control rules.
+ type: list
+ elements: dict
+ suboptions:
+ comment:
+ description:
+ - Description of the rule.
+ type: str
+ policy:
+ description:
+ - Action to take on matching traffic.
+ choices: [allow, deny]
+ type: str
+ ip_version:
+ description:
+ - Type of IP packets to match.
+ choices: [any, ipv4, ipv6]
+ type: str
+ protocol:
+ description:
+ - Type of protocol to match.
+ choices: [any, tcp, udp]
+ type: str
+ src_cidr:
+ description:
+ - CIDR notation of source IP address to match.
+ type: str
+ src_port:
+ description:
+ - Port number of source port to match.
+ - May be a port number or 'any'.
+ type: str
+ dst_cidr:
+ description:
+ - CIDR notation of source IP address to match.
+ type: str
+ dst_port:
+ description:
+ - Port number of destination port to match.
+ - May be a port number or 'any'.
+ type: str
+ vlan:
+ description:
+ - Incoming traffic VLAN.
+ - May be any port between 1-4095 or 'any'.
+ type: str
+author:
+ Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Set access list
+ meraki_switch_access_list:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ rules:
+ - comment: Fake rule
+ policy: allow
+ ip_version: ipv4
+ protocol: udp
+ src_cidr: 192.0.1.0/24
+ src_port: "4242"
+ dst_cidr: 1.2.3.4/32
+ dst_port: "80"
+ vlan: "100"
+ delegate_to: localhost
+
+- name: Query access lists
+ meraki_switch_access_list:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: List of administrators.
+ returned: success
+ type: complex
+ contains:
+ rules:
+ description:
+ - List of access control rules.
+ type: list
+ contains:
+ comment:
+ description:
+ - Description of the rule.
+ type: str
+ sample: User rule
+ returned: success
+ policy:
+ description:
+ - Action to take on matching traffic.
+ type: str
+ sample: allow
+ returned: success
+ ip_version:
+ description:
+ - Type of IP packets to match.
+ type: str
+ sample: ipv4
+ returned: success
+ protocol:
+ description:
+ - Type of protocol to match.
+ type: str
+ sample: udp
+ returned: success
+ src_cidr:
+ description:
+ - CIDR notation of source IP address to match.
+ type: str
+ sample: 192.0.1.0/24
+ returned: success
+ src_port:
+ description:
+ - Port number of source port to match.
+ type: str
+ sample: 1234
+ returned: success
+ dst_cidr:
+ description:
+ - CIDR notation of source IP address to match.
+ type: str
+ sample: 1.2.3.4/32
+ returned: success
+ dst_port:
+ description:
+ - Port number of destination port to match.
+ type: str
+ sample: 80
+ returned: success
+ vlan:
+ description:
+ - Incoming traffic VLAN.
+ type: str
+ sample: 100
+ returned: success
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import recursive_diff
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+from copy import deepcopy
+
+
+def construct_payload(params):
+ payload = {'rules': []}
+ for rule in params['rules']:
+ new_rule = dict()
+ if 'comment' in rule:
+ new_rule['comment'] = rule['comment']
+ if 'policy' in rule:
+ new_rule['policy'] = rule['policy']
+ if 'ip_version' in rule:
+ new_rule['ipVersion'] = rule['ip_version']
+ if 'protocol' in rule:
+ new_rule['protocol'] = rule['protocol']
+ if 'src_cidr' in rule:
+ new_rule['srcCidr'] = rule['src_cidr']
+ if 'src_port' in rule:
+ try: # Need to convert to int for comparison later
+ new_rule['srcPort'] = int(rule['src_port'])
+ except ValueError:
+ pass
+ if 'dst_cidr' in rule:
+ new_rule['dstCidr'] = rule['dst_cidr']
+ if 'dst_port' in rule:
+ try: # Need to convert to int for comparison later
+ new_rule['dstPort'] = int(rule['dst_port'])
+ except ValueError:
+ pass
+ if 'vlan' in rule:
+ try: # Need to convert to int for comparison later
+ new_rule['vlan'] = int(rule['vlan'])
+ except ValueError:
+ pass
+ payload['rules'].append(new_rule)
+ return payload
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ rules_arg_spec = dict(comment=dict(type='str'),
+ policy=dict(type='str', choices=['allow', 'deny']),
+ ip_version=dict(type='str', choices=['ipv4', 'ipv6', 'any']),
+ protocol=dict(type='str', choices=['tcp', 'udp', 'any']),
+ src_cidr=dict(type='str'),
+ src_port=dict(type='str'),
+ dst_cidr=dict(type='str'),
+ dst_port=dict(type='str'),
+ vlan=dict(type='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='query'),
+ net_name=dict(type='str', aliases=['network']),
+ net_id=dict(type='str'),
+ rules=dict(type='list', elements='dict', options=rules_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='switch_access_list')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_url = {'switch_access_list': '/networks/{net_id}/switch/accessControlLists'}
+ update_url = {'switch_access_list': '/networks/{net_id}/switch/accessControlLists'}
+
+ meraki.url_catalog['get_all'].update(query_url)
+ meraki.url_catalog['update'] = update_url
+
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ result = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = result
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ payload = construct_payload(meraki.params)
+ comparable = deepcopy(original)
+ if len(comparable['rules']) > 1:
+ del comparable['rules'][len(comparable['rules']) - 1] # Delete the default rule for comparison
+ else:
+ del comparable['rules'][0]
+ if meraki.is_update_required(comparable, payload):
+ if meraki.check_mode is True:
+ default_rule = original['rules'][len(original['rules']) - 1]
+ payload['rules'].append(default_rule)
+ new_rules = {'rules': payload['rules']}
+ meraki.result['data'] = new_rules
+ meraki.result['changed'] = True
+ diff = recursive_diff(original, new_rules)
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1]}
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ diff = recursive_diff(original, payload)
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1]}
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_l3_interface.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_l3_interface.py
new file mode 100644
index 00000000..716ec8d9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_l3_interface.py
@@ -0,0 +1,373 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_ms_l3_interface
+short_description: Manage routed interfaces on MS switches
+description:
+- Allows for creation, management, and visibility into routed interfaces on Meraki MS switches.
+notes:
+- Once a layer 3 interface is created, the API does not allow updating the interface and specifying C(default_gateway).
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ type: str
+ choices: [ present, query, absent ]
+ default: present
+ serial:
+ description:
+ - Serial number of MS switch hosting the layer 3 interface.
+ type: str
+ vlan_id:
+ description:
+ - The VLAN this routed interface is on.
+ - VLAN must be between 1 and 4094.
+ type: int
+ default_gateway:
+ description:
+ - The next hop for any traffic that isn't going to a directly connected subnet or over a static route.
+ - This IP address must exist in a subnet with a routed interface.
+ type: str
+ interface_ip:
+ description:
+ - The IP address this switch will use for layer 3 routing on this VLAN or subnet.
+ - This cannot be the same as the switch's management IP.
+ type: str
+ interface_id:
+ description:
+ - Uniqiue identification number for layer 3 interface.
+ type: str
+ multicast_routing:
+ description:
+ - Enable multicast support if multicast routing between VLANs is required.
+ type: str
+ choices: [disabled, enabled, IGMP snooping querier]
+ name:
+ description:
+ - A friendly name or description for the interface or VLAN.
+ type: str
+ subnet:
+ description:
+ - The network that this routed interface is on, in CIDR notation.
+ type: str
+ ospf_settings:
+ description:
+ - The OSPF routing settings of the interface.
+ type: dict
+ suboptions:
+ cost:
+ description:
+ - The path cost for this interface.
+ type: int
+ area:
+ description:
+ - The OSPF area to which this interface should belong.
+ - Can be either 'disabled' or the identifier of an existing OSPF area.
+ type: str
+ is_passive_enabled:
+ description:
+ - When enabled, OSPF will not run on the interface, but the subnet will still be advertised.
+ type: bool
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query all l3 interfaces
+ meraki_ms_l3_interface:
+ auth_key: abc123
+ state: query
+ serial: aaa-bbb-ccc
+
+- name: Query one l3 interface
+ meraki_ms_l3_interface:
+ auth_key: abc123
+ state: query
+ serial: aaa-bbb-ccc
+ name: Test L3 interface
+
+- name: Create l3 interface
+ meraki_ms_l3_interface:
+ auth_key: abc123
+ state: present
+ serial: aaa-bbb-ccc
+ name: "Test L3 interface 2"
+ subnet: "192.168.3.0/24"
+ interface_ip: "192.168.3.2"
+ multicast_routing: disabled
+ vlan_id: 11
+ ospf_settings:
+ area: 0
+ cost: 1
+ is_passive_enabled: true
+
+- name: Update l3 interface
+ meraki_ms_l3_interface:
+ auth_key: abc123
+ state: present
+ serial: aaa-bbb-ccc
+ name: "Test L3 interface 2"
+ subnet: "192.168.3.0/24"
+ interface_ip: "192.168.3.2"
+ multicast_routing: disabled
+ vlan_id: 11
+ ospf_settings:
+ area: 0
+ cost: 2
+ is_passive_enabled: true
+
+- name: Delete l3 interface
+ meraki_ms_l3_interface:
+ auth_key: abc123
+ state: absent
+ serial: aaa-bbb-ccc
+ interface_id: abc123344566
+'''
+
+RETURN = r'''
+data:
+ description: Information about the layer 3 interfaces.
+ returned: success
+ type: complex
+ contains:
+ vlan_id:
+ description: The VLAN this routed interface is on.
+ returned: success
+ type: int
+ sample: 10
+ default_gateway:
+ description: The next hop for any traffic that isn't going to a directly connected subnet or over a static route.
+ returned: success
+ type: str
+ sample: 192.168.2.1
+ interface_ip:
+ description: The IP address this switch will use for layer 3 routing on this VLAN or subnet.
+ returned: success
+ type: str
+ sample: 192.168.2.2
+ interface_id:
+ description: Uniqiue identification number for layer 3 interface.
+ returned: success
+ type: str
+ sample: 62487444811111120
+ multicast_routing:
+ description: Enable multicast support if multicast routing between VLANs is required.
+ returned: success
+ type: str
+ sample: disabled
+ name:
+ description: A friendly name or description for the interface or VLAN.
+ returned: success
+ type: str
+ sample: L3 interface
+ subnet:
+ description: The network that this routed interface is on, in CIDR notation.
+ returned: success
+ type: str
+ sample: 192.168.2.0/24
+ ospf_settings:
+ description: The OSPF routing settings of the interface.
+ returned: success
+ type: complex
+ contains:
+ cost:
+ description: The path cost for this interface.
+ returned: success
+ type: int
+ sample: 1
+ area:
+ description: The OSPF area to which this interface should belong.
+ returned: success
+ type: str
+ sample: 0
+ is_passive_enabled:
+ description: When enabled, OSPF will not run on the interface, but the subnet will still be advertised.
+ returned: success
+ type: bool
+ sample: true
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def construct_payload(meraki):
+ payload = {}
+ if meraki.params['name'] is not None:
+ payload['name'] = meraki.params['name']
+ if meraki.params['subnet'] is not None:
+ payload['subnet'] = meraki.params['subnet']
+ if meraki.params['interface_ip'] is not None:
+ payload['interfaceIp'] = meraki.params['interface_ip']
+ if meraki.params['multicast_routing'] is not None:
+ payload['multicastRouting'] = meraki.params['multicast_routing']
+ if meraki.params['vlan_id'] is not None:
+ payload['vlanId'] = meraki.params['vlan_id']
+ if meraki.params['default_gateway'] is not None:
+ payload['defaultGateway'] = meraki.params['default_gateway']
+ if meraki.params['ospf_settings'] is not None:
+ payload['ospfSettings'] = {}
+ if meraki.params['ospf_settings']['area'] is not None:
+ payload['ospfSettings']['area'] = meraki.params['ospf_settings']['area']
+ if meraki.params['ospf_settings']['cost'] is not None:
+ payload['ospfSettings']['cost'] = meraki.params['ospf_settings']['cost']
+ if meraki.params['ospf_settings']['is_passive_enabled'] is not None:
+ payload['ospfSettings']['isPassiveEnabled'] = meraki.params['ospf_settings']['is_passive_enabled']
+ return payload
+
+
+def get_interface_id(meraki, data, name):
+ # meraki.fail_json(msg=data)
+ for interface in data:
+ if interface['name'] == name:
+ return interface['interfaceId']
+ return None
+
+
+def get_interface(interfaces, interface_id):
+ for interface in interfaces:
+ if interface['interfaceId'] == interface_id:
+ return interface
+ return None
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ ospf_arg_spec = dict(area=dict(type='str'),
+ cost=dict(type='int'),
+ is_passive_enabled=dict(type='bool'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query', 'absent'], default='present'),
+ serial=dict(type='str'),
+ name=dict(type='str'),
+ subnet=dict(type='str'),
+ interface_id=dict(type='str'),
+ interface_ip=dict(type='str'),
+ multicast_routing=dict(type='str', choices=['disabled', 'enabled', 'IGMP snooping querier']),
+ vlan_id=dict(type='int'),
+ default_gateway=dict(type='str'),
+ ospf_settings=dict(type='dict', default=None, options=ospf_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='ms_l3_interfaces')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'ms_l3_interfaces': '/devices/{serial}/switch/routing/interfaces'}
+ query_one_urls = {'ms_l3_interfaces': '/devices/{serial}/switch/routing/interfaces'}
+ create_urls = {'ms_l3_interfaces': '/devices/{serial}/switch/routing/interfaces'}
+ update_urls = {'ms_l3_interfaces': '/devices/{serial}/switch/routing/interfaces/{interface_id}'}
+ delete_urls = {'ms_l3_interfaces': '/devices/{serial}/switch/routing/interfaces/{interface_id}'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_one'].update(query_one_urls)
+ meraki.url_catalog['create'] = create_urls
+ meraki.url_catalog['update'] = update_urls
+ meraki.url_catalog['delete'] = delete_urls
+
+ payload = None
+
+ if meraki.params['vlan_id'] is not None:
+ if meraki.params['vlan_id'] < 1 or meraki.params['vlan_id'] > 4094:
+ meraki.fail_json(msg='vlan_id must be between 1 and 4094')
+
+ interface_id = meraki.params['interface_id']
+ interfaces = None
+ if interface_id is None:
+ if meraki.params['name'] is not None:
+ path = meraki.construct_path('get_all', custom={'serial': meraki.params['serial']})
+ interfaces = meraki.request(path, method='GET')
+ interface_id = get_interface_id(meraki, interfaces, meraki.params['name'])
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+
+ if meraki.params['state'] == 'query':
+ if interface_id is not None: # Query one interface
+ path = meraki.construct_path('get_one', custom={'serial': meraki.params['serial'],
+ 'interface_id': interface_id})
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ meraki.exit_json(**meraki.result)
+ else: # Query all interfaces
+ path = meraki.construct_path('get_all', custom={'serial': meraki.params['serial']})
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'present':
+ if interface_id is None: # Create a new interface
+ payload = construct_payload(meraki)
+ if meraki.check_mode is True:
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('create', custom={'serial': meraki.params['serial']})
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ else:
+ if interfaces is None:
+ path = meraki.construct_path('get_all', custom={'serial': meraki.params['serial']})
+ interfaces = meraki.request(path, method='GET')
+ payload = construct_payload(meraki)
+ interface = get_interface(interfaces, interface_id)
+ if meraki.is_update_required(interface, payload):
+ if meraki.check_mode is True:
+ interface.update(payload)
+ meraki.result['data'] = interface
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', custom={'serial': meraki.params['serial'],
+ 'interface_id': interface_id})
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ else:
+ meraki.result['data'] = interface
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'absent':
+ if meraki.check_mode is True:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('delete', custom={'serial': meraki.params['serial'],
+ 'interface_id': meraki.params['interface_id']})
+ response = meraki.request(path, method='DELETE')
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_link_aggregation.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_link_aggregation.py
new file mode 100644
index 00000000..a38eda7d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_link_aggregation.py
@@ -0,0 +1,258 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_ms_link_aggregation
+short_description: Manage link aggregations on MS switches
+version_added: "1.2.0"
+description:
+- Allows for management of MS switch link aggregations in a Meraki environment.
+notes:
+- Switch profile ports are not supported in this module.
+options:
+ state:
+ description:
+ - Specifies whether SNMP information should be queried or modified.
+ type: str
+ choices: [ absent, query, present ]
+ default: present
+ net_name:
+ description:
+ - Name of network.
+ type: str
+ net_id:
+ description:
+ - ID of network.
+ type: str
+ lag_id:
+ description:
+ - ID of lag to query or modify.
+ type: str
+ switch_ports:
+ description:
+ - List of switchports to include in link aggregation.
+ type: list
+ elements: dict
+ suboptions:
+ serial:
+ description:
+ - Serial number of switch to own link aggregation.
+ type: str
+ port_id:
+ description:
+ - Port number which should be included in link aggregation.
+ type: str
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Create LAG
+ meraki_ms_link_aggregation:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ switch_ports:
+ - serial: '{{serial_switch}}'
+ port_id: "1"
+ - serial: '{{serial_switch}}'
+ port_id: "2"
+ delegate_to: localhost
+
+- name: Update LAG
+ meraki_ms_link_aggregation:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ lag_id: '{{lag_id}}'
+ switch_ports:
+ - serial: '{{serial_switch}}'
+ port_id: "1"
+ - serial: '{{serial_switch}}'
+ port_id: "2"
+ - serial: '{{serial_switch}}'
+ port_id: "3"
+ - serial: '{{serial_switch}}'
+ port_id: "4"
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: List of aggregated links.
+ returned: success
+ type: complex
+ contains:
+ id:
+ description:
+ - ID of link aggregation.
+ returned: success
+ type: str
+ sample: "MTK3M4A2ZDdfM3=="
+ switch_ports:
+ description:
+ - List of switch ports to be included in link aggregation.
+ returned: success
+ type: complex
+ contains:
+ port_id:
+ description:
+ - Port number.
+ type: str
+ returned: success
+ sample: "1"
+ serial:
+ description:
+ - Serial number of switch on which port resides.
+ type: str
+ returned: success
+ sample: "ABCD-1234-WXYZ"
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def get_lags(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ return meraki.request(path, method='GET')
+
+
+def is_lag_valid(lags, lag_id):
+ for lag in lags:
+ if lag['id'] == lag_id:
+ return lag
+ return False
+
+
+def construct_payload(meraki):
+ payload = dict()
+ if meraki.params['switch_ports'] is not None:
+ payload['switchPorts'] = []
+ for port in meraki.params['switch_ports']:
+ port_config = {'serial': port['serial'],
+ 'portId': port['port_id'],
+ }
+ payload['switchPorts'].append(port_config)
+ # if meraki.params['switch_profile_ports'] is not None:
+ # payload['switchProfilePorts'] = []
+ # for port in meraki.params['switch_profile_ports']:
+ # port_config = {'profile': port['profile'],
+ # 'portId': port['port_id'],
+ # }
+ # payload['switchProfilePorts'].append(port_config)
+ return payload
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ switch_ports_args = dict(serial=dict(type='str'),
+ port_id=dict(type='str'),
+ )
+
+ # switch_profile_ports_args = dict(profile=dict(type='str'),
+ # port_id=dict(type='str'),
+ # )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='present'),
+ org_name=dict(type='str', aliases=['organization']),
+ org_id=dict(type='str'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ lag_id=dict(type='str'),
+ switch_ports=dict(type='list', default=None, elements='dict', options=switch_ports_args),
+ # switch_profile_ports=dict(type='list', default=None, elements='dict', options=switch_profile_ports_args),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='ms_link_aggregation')
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'ms_link_aggregation': '/networks/{net_id}/switch/linkAggregations'}
+ create_url = {'ms_link_aggregation': '/networks/{net_id}/switch/linkAggregations'}
+ update_url = {'ms_link_aggregation': '/networks/{net_id}/switch/linkAggregations/{lag_id}'}
+ delete_url = {'ms_link_aggregation': '/networks/{net_id}/switch/linkAggregations/{lag_id}'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['create'] = create_url
+ meraki.url_catalog['update'] = update_url
+ meraki.url_catalog['delete'] = delete_url
+
+ payload = None
+
+ # execute checks for argument completeness
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'present':
+ if meraki.params['lag_id'] is not None: # Need to update
+ lag = is_lag_valid(get_lags(meraki, net_id), meraki.params['lag_id'])
+ if lag is not False: # Lag ID is valid
+ payload = construct_payload(meraki)
+ if meraki.is_update_required(lag, payload) is True:
+ path = meraki.construct_path('update', net_id=net_id, custom={'lag_id': meraki.params['lag_id']})
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['changed'] = True
+ meraki.result['data'] = response
+ else:
+ meraki.result['data'] = lag
+ else:
+ meraki.fail_json("Provided lag_id is not valid.")
+ else:
+ path = meraki.construct_path('create', net_id=net_id)
+ payload = construct_payload(meraki)
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ meraki.result['changed'] = True
+ meraki.result['data'] = response
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'absent':
+ path = meraki.construct_path('delete', net_id=net_id, custom={'lag_id': meraki.params['lag_id']})
+ response = meraki.request(path, method='DELETE')
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_ospf.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_ospf.py
new file mode 100644
index 00000000..f071b3f8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_ospf.py
@@ -0,0 +1,322 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_ms_ospf
+short_description: Manage OSPF configuration on MS switches
+description:
+- Configure OSPF for compatible Meraki MS switches.
+options:
+ state:
+ description:
+ - Read or edit OSPF settings.
+ type: str
+ choices: [ present, query ]
+ default: present
+ net_name:
+ description:
+ - Name of network containing OSPF configuration.
+ type: str
+ aliases: [ name, network ]
+ net_id:
+ description:
+ - ID of network containing OSPF configuration.
+ type: str
+ enabled:
+ description:
+ - Enable or disable OSPF on the network.
+ type: bool
+ hello_timer:
+ description:
+ - Time interval, in seconds, at which hello packets will be sent to OSPF neighbors to maintain connectivity.
+ - Value must be between 1 and 255.
+ - Default is 10 seconds.
+ type: int
+ dead_timer:
+ description:
+ - Time interval to determine when the peer will be declared inactive.
+ - Value must be between 1 and 65535.
+ type: int
+ md5_authentication_enabled:
+ description:
+ - Whether to enable or disable MD5 authentication.
+ type: bool
+ md5_authentication_key:
+ description:
+ - MD5 authentication credentials.
+ type: dict
+ suboptions:
+ id:
+ description:
+ - MD5 authentication key index.
+ - Must be between 1 and 255.
+ type: str
+ passphrase:
+ description:
+ - Plain text authentication passphrase
+ type: str
+ areas:
+ description:
+ - List of areas in OSPF network.
+ type: list
+ elements: dict
+ suboptions:
+ area_id:
+ description:
+ - OSPF area ID
+ type: int
+ aliases: [ id ]
+ area_name:
+ description:
+ - Descriptive name of OSPF area.
+ type: str
+ aliases: [ name ]
+ area_type:
+ description:
+ - OSPF area type.
+ choices: [normal, stub, nssa]
+ type: str
+ aliases: [ type ]
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+ - name: Query OSPF settings
+ meraki_ms_ospf:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ delegate_to: localhost
+
+ - name: Enable OSPF with check mode
+ meraki_ms_ospf:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ enabled: true
+ hello_timer: 20
+ dead_timer: 60
+ areas:
+ - area_id: 0
+ area_name: Backbone
+ area_type: normal
+ - area_id: 1
+ area_name: Office
+ area_type: nssa
+ md5_authentication_enabled: false
+'''
+
+RETURN = r'''
+data:
+ description: Information about queried object.
+ returned: success
+ type: complex
+ contains:
+ enabled:
+ description:
+ - Enable or disable OSPF on the network.
+ type: bool
+ hello_timer_in_seconds:
+ description:
+ - Time interval, in seconds, at which hello packets will be sent to OSPF neighbors to maintain connectivity.
+ type: int
+ dead_timer_in_seconds:
+ description:
+ - Time interval to determine when the peer will be declared inactive.
+ type: int
+ areas:
+ description:
+ - List of areas in OSPF network.
+ type: complex
+ contains:
+ area_id:
+ description:
+ - OSPF area ID
+ type: int
+ area_name:
+ description:
+ - Descriptive name of OSPF area.
+ type: str
+ area_type:
+ description:
+ - OSPF area type.
+ type: str
+ md5_authentication_enabled:
+ description:
+ - Whether to enable or disable MD5 authentication.
+ type: bool
+ md5_authentication_key:
+ description:
+ - MD5 authentication credentials.
+ type: complex
+ contains:
+ id:
+ description:
+ - MD5 key index.
+ type: int
+ passphrase:
+ description:
+ - Passphrase for MD5 key.
+ type: str
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def construct_payload(meraki):
+ payload_key_mapping = {'enabled': 'enabled',
+ 'hello_timer': 'helloTimerInSeconds',
+ 'dead_timer': 'deadTimerInSeconds',
+ 'areas': 'areas',
+ 'area_id': 'areaId',
+ 'area_name': 'areaName',
+ 'area_type': 'areaType',
+ 'md5_authentication_enabled': 'md5AuthenticationEnabled',
+ 'md5_authentication_key': 'md5AuthenticationKey',
+ 'id': 'id',
+ 'passphrase': 'passphrase',
+ }
+ payload = {}
+
+ # This may need to be reworked to avoid overwiting
+ for snake, camel in payload_key_mapping.items():
+ try:
+ if meraki.params[snake] is not None:
+ payload[camel] = meraki.params[snake]
+ if snake == 'areas':
+ if meraki.params['areas'] is not None and len(meraki.params['areas']) > 0:
+ payload['areas'] = []
+ for area in meraki.params['areas']:
+ area_settings = {'areaName': area['area_name'],
+ 'areaId': area['area_id'],
+ 'areaType': area['area_type'],
+ }
+ payload['areas'].append(area_settings)
+ elif snake == 'md5_authentication_key':
+ if meraki.params['md5_authentication_key'] is not None:
+ md5_settings = {'id': meraki.params['md5_authentication_key']['id'],
+ 'passphrase': meraki.params['md5_authentication_key']['passphrase'],
+ }
+ except KeyError:
+ pass
+
+ return payload
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ areas_arg_spec = dict(area_id=dict(type='int', aliases=['id']),
+ area_name=dict(type='str', aliases=['name']),
+ area_type=dict(type='str', aliases=['type'], choices=['normal', 'stub', 'nssa']),
+ )
+
+ md5_auth_arg_spec = dict(id=dict(type='str'),
+ passphrase=dict(type='str', no_log=True),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='present'),
+ net_id=dict(type='str'),
+ net_name=dict(type='str', aliases=['name', 'network']),
+ enabled=dict(type='bool'),
+ hello_timer=dict(type='int'),
+ dead_timer=dict(type='int'),
+ areas=dict(type='list', default=None, elements='dict', options=areas_arg_spec),
+ md5_authentication_enabled=dict(type='bool'),
+ md5_authentication_key=dict(type='dict', default=None, options=md5_auth_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='ms_ospf')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'ms_ospf': '/networks/{net_id}/switch/routing/ospf'}
+ update_urls = {'ms_ospf': '/networks/{net_id}/switch/routing/ospf'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['update'] = update_urls
+
+ payload = None
+
+ # execute checks for argument completeness
+
+ if meraki.params['dead_timer'] is not None:
+ if meraki.params['dead_timer'] < 1 or meraki.params['dead_timer'] > 65535:
+ meraki.fail_json(msg='dead_timer must be between 1 and 65535')
+ if meraki.params['hello_timer'] is not None:
+ if meraki.params['hello_timer'] < 1 or meraki.params['hello_timer'] > 255:
+ meraki.fail_json(msg='hello_timer must be between 1 and 65535')
+ if meraki.params['md5_authentication_enabled'] is False:
+ if meraki.params['md5_authentication_key'] is not None:
+ meraki.fail_json(msg='md5_authentication_key must not be configured when md5_authentication_enabled is false')
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None and meraki.params['net_name']:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'present':
+ original = meraki.request(meraki.construct_path('get_all', net_id=net_id), method='GET')
+ payload = construct_payload(meraki)
+ if meraki.is_update_required(original, payload) is True:
+ if meraki.check_mode is True:
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if 'md5_authentication_key' in response:
+ response['md5_authentication_key']['passphrase'] = 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ else:
+ if 'md5_authentication_key' in original:
+ original['md5_authentication_key']['passphrase'] = 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
+ meraki.result['data'] = original
+ meraki.exit_json(**meraki.result)
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_stack.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_stack.py
new file mode 100644
index 00000000..fb0729a1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_stack.py
@@ -0,0 +1,277 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_ms_stack
+short_description: Modify switch stacking configuration in Meraki.
+version_added: "1.3.0"
+description:
+- Allows for modification of Meraki MS switch stacks.
+notes:
+- Not all actions are idempotent. Specifically, creating a new stack will error if any switch is already in a stack.
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: ['present', 'query', 'absent']
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of network which MX firewall is in.
+ type: str
+ net_id:
+ description:
+ - ID of network which MX firewall is in.
+ type: str
+ stack_id:
+ description:
+ - ID of stack which is to be modified or deleted.
+ type: str
+ serials:
+ description:
+ - List of switch serial numbers which should be included or removed from a stack.
+ type: list
+ elements: str
+ name:
+ description:
+ - Name of stack.
+ type: str
+
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Create new stack
+ meraki_switch_stack:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ name: Test stack
+ serials:
+ - "ABCD-1231-4579"
+ - "ASDF-4321-0987"
+
+- name: Add switch to stack
+ meraki_switch_stack:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ stack_id: ABC12340987
+ serials:
+ - "ABCD-1231-4579"
+
+- name: Remove switch from stack
+ meraki_switch_stack:
+ auth_key: abc123
+ state: absent
+ org_name: YourOrg
+ net_name: YourNet
+ stack_id: ABC12340987
+ serials:
+ - "ABCD-1231-4579"
+
+- name: Query one stack
+ meraki_switch_stack:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ stack_id: ABC12340987
+'''
+
+RETURN = r'''
+data:
+ description: VPN settings.
+ returned: success
+ type: complex
+ contains:
+ id:
+ description: ID of switch stack.
+ returned: always
+ type: str
+ sample: 7636
+ name:
+ description: Descriptive name of switch stack.
+ returned: always
+ type: str
+ sample: MyStack
+ serials:
+ description: List of serial numbers in switch stack.
+ returned: always
+ type: list
+ sample:
+ - "QBZY-XWVU-TSRQ"
+ - "QBAB-CDEF-GHIJ"
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+from copy import deepcopy
+
+
+def get_stacks(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ return meraki.request(path, method='GET')
+
+
+def get_stack(stack_id, stacks):
+ for stack in stacks:
+ if stack_id == stack['id']:
+ return stack
+ return None
+
+
+def get_stack_id(meraki, net_id):
+ stacks = get_stacks(meraki, net_id)
+ for stack in stacks:
+ if stack['name'] == meraki.params['name']:
+ return stack['id']
+
+
+def does_stack_exist(meraki, stacks):
+ for stack in stacks:
+ have = set(meraki.params['serials'])
+ want = set(stack['serials'])
+ if have == want:
+ return stack
+ return False
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query', 'absent'], default='present'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ stack_id=dict(type='str'),
+ serials=dict(type='list', elements='str', default=None),
+ name=dict(type='str'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='switch_stack')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'switch_stack': '/networks/{net_id}/switch/stacks'}
+ query_url = {'switch_stack': '/networks/{net_id}/switch/stacks/{stack_id}'}
+ add_urls = {'switch_stack': '/networks/{net_id}/switch/stacks/{stack_id}/add'}
+ remove_urls = {'switch_stack': '/networks/{net_id}/switch/stacks/{stack_id}/remove'}
+ create_urls = {'switch_stack': '/networks/{net_id}/switch/stacks'}
+ delete_urls = {'switch_stack': '/networks/{net_id}/switch/stacks/{stack_id}'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_one'].update(query_url)
+ meraki.url_catalog['add'] = add_urls
+ meraki.url_catalog['remove'] = remove_urls
+ meraki.url_catalog['create'] = create_urls
+ meraki.url_catalog['delete'] = delete_urls
+
+ payload = None
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ orgs = meraki.get_orgs()
+ for org in orgs:
+ if org['name'] == meraki.params['org_name']:
+ org_id = org['id']
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'],
+ data=meraki.get_nets(org_id=org_id))
+
+ # assign and lookup stack_id
+ stack_id = meraki.params['stack_id']
+ if stack_id is None and meraki.params['name'] is not None:
+ stack_id = get_stack_id(meraki, net_id)
+ path = meraki.construct_path('get_all', net_id=net_id)
+ stacks = meraki.request(path, method='GET')
+
+ if meraki.params['state'] == 'query':
+ if stack_id is None:
+ meraki.result['data'] = stacks
+ else:
+ meraki.result['data'] = get_stack(stack_id, stacks)
+ elif meraki.params['state'] == 'present':
+ if meraki.params['stack_id'] is None:
+ payload = {'serials': meraki.params['serials'],
+ 'name': meraki.params['name'],
+ }
+ path = meraki.construct_path('create', net_id=net_id)
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ if meraki.status == 201:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ payload = {'serial': meraki.params['serials'][0]}
+ original = get_stack(stack_id, stacks)
+ comparable = deepcopy(original)
+ comparable.update(payload)
+ if meraki.params['serials'][0] not in comparable['serials']:
+ comparable['serials'].append(meraki.params['serials'][0])
+ # meraki.fail_json(msg=comparable)
+ if meraki.is_update_required(original, comparable, optional_ignore=['serial']):
+ path = meraki.construct_path('add', net_id=net_id, custom={'stack_id': stack_id})
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ elif meraki.params['state'] == 'absent':
+ if meraki.params['serials'] is None:
+ path = meraki.construct_path('delete', net_id=net_id, custom={'stack_id': stack_id})
+ response = meraki.request(path, method='DELETE')
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ else:
+ payload = {'serial': meraki.params['serials'][0]}
+ original = get_stack(stack_id, stacks)
+ comparable = deepcopy(original)
+ comparable.update(payload)
+ if meraki.params['serials'][0] in comparable['serials']:
+ comparable['serials'].remove(meraki.params['serials'][0])
+ if meraki.is_update_required(original, comparable, optional_ignore=['serial']):
+ path = meraki.construct_path('remove', net_id=net_id, custom={'stack_id': stack_id})
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_storm_control.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_storm_control.py
new file mode 100644
index 00000000..2048ad5e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_storm_control.py
@@ -0,0 +1,201 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_ms_storm_control
+short_description: Manage storm control configuration on a switch in the Meraki cloud
+version_added: "0.0.1"
+description:
+- Allows for management of storm control settings for Meraki MS switches.
+options:
+ state:
+ description:
+ - Specifies whether storm control configuration should be queried or modified.
+ choices: [query, present]
+ default: query
+ type: str
+ net_name:
+ description:
+ - Name of network.
+ type: str
+ net_id:
+ description:
+ - ID of network.
+ type: str
+ broadcast_threshold:
+ description:
+ - Percentage (1 to 99) of total available port bandwidth for broadcast traffic type.
+ - Default value 100 percent rate is to clear the configuration.
+ type: int
+ multicast_threshold:
+ description:
+ - Percentage (1 to 99) of total available port bandwidth for multicast traffic type.
+ - Default value 100 percent rate is to clear the configuration.
+ type: int
+ unknown_unicast_threshold:
+ description:
+ - Percentage (1 to 99) of total available port bandwidth for unknown unicast traffic type.
+ - Default value 100 percent rate is to clear the configuration.
+ type: int
+
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Set broadcast settings
+ meraki_switch_storm_control:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ broadcast_threshold: 75
+ multicast_threshold: 70
+ unknown_unicast_threshold: 65
+ delegate_to: localhost
+
+- name: Query storm control settings
+ meraki_switch_storm_control:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information queried or updated storm control configuration.
+ returned: success
+ type: complex
+ contains:
+ broadcast_threshold:
+ description:
+ - Percentage (1 to 99) of total available port bandwidth for broadcast traffic type.
+ - Default value 100 percent rate is to clear the configuration.
+ returned: success
+ type: int
+ sample: 42
+ multicast_threshold:
+ description:
+ - Percentage (1 to 99) of total available port bandwidth for multicast traffic type.
+ - Default value 100 percent rate is to clear the configuration.
+ returned: success
+ type: int
+ sample: 42
+ unknown_unicast_threshold:
+ description:
+ - Percentage (1 to 99) of total available port bandwidth for unknown unicast traffic type.
+ - Default value 100 percent rate is to clear the configuration.
+ returned: success
+ type: int
+ sample: 42
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import recursive_diff
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def construct_payload(params):
+ payload = dict()
+ if 'broadcast_threshold' in params:
+ payload['broadcastThreshold'] = params['broadcast_threshold']
+ if 'multicast_threshold' in params:
+ payload['multicastThreshold'] = params['multicast_threshold']
+ if 'unknown_unicast_threshold' in params:
+ payload['unknownUnicastThreshold'] = params['unknown_unicast_threshold']
+ return payload
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='query'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ broadcast_threshold=dict(type='int'),
+ multicast_threshold=dict(type='int'),
+ unknown_unicast_threshold=dict(type='int'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='switch_storm_control')
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'switch_storm_control': '/networks/{net_id}/switch/stormControl'}
+ update_url = {'switch_storm_control': '/networks/{net_id}/switch/stormControl'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['update'] = update_url
+
+ payload = None
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ # execute checks for argument completeness
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ payload = construct_payload(meraki.params)
+ if meraki.is_update_required(original, payload) is True:
+ diff = recursive_diff(original, payload)
+ if meraki.check_mode is True:
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1]}
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1]}
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_switchport.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_switchport.py
new file mode 100644
index 00000000..f119c71a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ms_switchport.py
@@ -0,0 +1,424 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_ms_switchport
+short_description: Manage switchports on a switch in the Meraki cloud
+description:
+- Allows for management of switchports settings for Meraki MS switches.
+options:
+ state:
+ description:
+ - Specifies whether a switchport should be queried or modified.
+ choices: [query, present]
+ default: query
+ type: str
+ access_policy_type:
+ description:
+ - Type of access policy to apply to port.
+ type: str
+ choices: [Open, Custom access policy, MAC whitelist, Sticky MAC whitelist]
+ access_policy_number:
+ description:
+ - Number of the access policy to apply.
+ - Only applicable to access port types.
+ type: int
+ allowed_vlans:
+ description:
+ - List of VLAN numbers to be allowed on switchport.
+ default: all
+ type: list
+ elements: str
+ enabled:
+ description:
+ - Whether a switchport should be enabled or disabled.
+ type: bool
+ default: yes
+ isolation_enabled:
+ description:
+ - Isolation status of switchport.
+ default: no
+ type: bool
+ link_negotiation:
+ description:
+ - Link speed for the switchport.
+ default: Auto negotiate
+ choices: [Auto negotiate, 100Megabit (auto), 100 Megabit full duplex (forced)]
+ type: str
+ name:
+ description:
+ - Switchport description.
+ aliases: [description]
+ type: str
+ number:
+ description:
+ - Port number.
+ type: str
+ poe_enabled:
+ description:
+ - Enable or disable Power Over Ethernet on a port.
+ type: bool
+ default: true
+ rstp_enabled:
+ description:
+ - Enable or disable Rapid Spanning Tree Protocol on a port.
+ type: bool
+ default: true
+ serial:
+ description:
+ - Serial nubmer of the switch.
+ type: str
+ required: true
+ stp_guard:
+ description:
+ - Set state of STP guard.
+ choices: [disabled, root guard, bpdu guard, loop guard]
+ default: disabled
+ type: str
+ tags:
+ description:
+ - List of tags to assign to a port.
+ type: list
+ elements: str
+ type:
+ description:
+ - Set port type.
+ choices: [access, trunk]
+ default: access
+ type: str
+ vlan:
+ description:
+ - VLAN number assigned to port.
+ - If a port is of type trunk, the specified VLAN is the native VLAN.
+ type: int
+ voice_vlan:
+ description:
+ - VLAN number assigned to a port for voice traffic.
+ - Only applicable to access port type.
+ type: int
+
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query information about all switchports on a switch
+ meraki_switchport:
+ auth_key: abc12345
+ state: query
+ serial: ABC-123
+ delegate_to: localhost
+
+- name: Query information about all switchports on a switch
+ meraki_switchport:
+ auth_key: abc12345
+ state: query
+ serial: ABC-123
+ number: 2
+ delegate_to: localhost
+
+- name: Name switchport
+ meraki_switchport:
+ auth_key: abc12345
+ state: present
+ serial: ABC-123
+ number: 7
+ name: Test Port
+ delegate_to: localhost
+
+- name: Configure access port with voice VLAN
+ meraki_switchport:
+ auth_key: abc12345
+ state: present
+ serial: ABC-123
+ number: 7
+ enabled: true
+ name: Test Port
+ tags: desktop
+ type: access
+ vlan: 10
+ voice_vlan: 11
+ delegate_to: localhost
+
+- name: Check access port for idempotency
+ meraki_switchport:
+ auth_key: abc12345
+ state: present
+ serial: ABC-123
+ number: 7
+ enabled: true
+ name: Test Port
+ tags: desktop
+ type: access
+ vlan: 10
+ voice_vlan: 11
+ delegate_to: localhost
+
+- name: Configure trunk port with specific VLANs
+ meraki_switchport:
+ auth_key: abc12345
+ state: present
+ serial: ABC-123
+ number: 7
+ enabled: true
+ name: Server port
+ tags: server
+ type: trunk
+ allowed_vlans:
+ - 10
+ - 15
+ - 20
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information queried or updated switchports.
+ returned: success
+ type: complex
+ contains:
+ number:
+ description: Number of port.
+ returned: success
+ type: int
+ sample: 1
+ name:
+ description: Human friendly description of port.
+ returned: success
+ type: str
+ sample: "Jim Phone Port"
+ tags:
+ description: List of tags assigned to port.
+ returned: success
+ type: list
+ sample: ['phone', 'marketing']
+ enabled:
+ description: Enabled state of port.
+ returned: success
+ type: bool
+ sample: true
+ poe_enabled:
+ description: Power Over Ethernet enabled state of port.
+ returned: success
+ type: bool
+ sample: true
+ type:
+ description: Type of switchport.
+ returned: success
+ type: str
+ sample: trunk
+ vlan:
+ description: VLAN assigned to port.
+ returned: success
+ type: int
+ sample: 10
+ voice_vlan:
+ description: VLAN assigned to port with voice VLAN enabled devices.
+ returned: success
+ type: int
+ sample: 20
+ isolation_enabled:
+ description: Port isolation status of port.
+ returned: success
+ type: bool
+ sample: true
+ rstp_enabled:
+ description: Enabled or disabled state of Rapid Spanning Tree Protocol (RSTP)
+ returned: success
+ type: bool
+ sample: true
+ stp_guard:
+ description: State of STP guard
+ returned: success
+ type: str
+ sample: "Root Guard"
+ access_policy_number:
+ description: Number of assigned access policy. Only applicable to access ports.
+ returned: success
+ type: int
+ sample: 1234
+ link_negotiation:
+ description: Link speed for the port.
+ returned: success
+ type: str
+ sample: "Auto negotiate"
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+param_map = {'access_policy_number': 'accessPolicyNumber',
+ 'access_policy_type': 'accessPolicyType',
+ 'allowed_vlans': 'allowedVlans',
+ 'enabled': 'enabled',
+ 'isolation_enabled': 'isolationEnabled',
+ 'link_negotiation': 'linkNegotiation',
+ 'name': 'name',
+ 'number': 'number',
+ 'poe_enabled': 'poeEnabled',
+ 'rstp_enabled': 'rstpEnabled',
+ 'stp_guard': 'stpGuard',
+ 'tags': 'tags',
+ 'type': 'type',
+ 'vlan': 'vlan',
+ 'voice_vlan': 'voiceVlan',
+ }
+
+
+def sort_vlans(meraki, vlans):
+ converted = set()
+ for vlan in vlans:
+ converted.add(int(vlan))
+ vlans_sorted = sorted(converted)
+ vlans_str = []
+ for vlan in vlans_sorted:
+ vlans_str.append(str(vlan))
+ return ','.join(vlans_str)
+
+
+def assemble_payload(meraki):
+ payload = dict()
+ # if meraki.params['enabled'] is not None:
+ # payload['enabled'] = meraki.params['enabled']
+
+ for k, v in meraki.params.items():
+ try:
+ if meraki.params[k] is not None:
+ if k == 'access_policy_number':
+ if meraki.params['access_policy_type'] is not None:
+ payload[param_map[k]] = v
+ else:
+ payload[param_map[k]] = v
+ except KeyError:
+ pass
+ return payload
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='query'),
+ serial=dict(type='str', required=True),
+ number=dict(type='str'),
+ name=dict(type='str', aliases=['description']),
+ tags=dict(type='list', elements='str'),
+ enabled=dict(type='bool', default=True),
+ type=dict(type='str', choices=['access', 'trunk'], default='access'),
+ vlan=dict(type='int'),
+ voice_vlan=dict(type='int'),
+ allowed_vlans=dict(type='list', elements='str', default='all'),
+ poe_enabled=dict(type='bool', default=True),
+ isolation_enabled=dict(type='bool', default=False),
+ rstp_enabled=dict(type='bool', default=True),
+ stp_guard=dict(type='str', choices=['disabled', 'root guard', 'bpdu guard', 'loop guard'], default='disabled'),
+ access_policy_type=dict(type='str', choices=['Open', 'Custom access policy', 'MAC whitelist', 'Sticky MAC whitelist']),
+ access_policy_number=dict(type='int'),
+ link_negotiation=dict(type='str',
+ choices=['Auto negotiate', '100Megabit (auto)', '100 Megabit full duplex (forced)'],
+ default='Auto negotiate'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='switchport')
+ meraki.params['follow_redirects'] = 'all'
+
+ if meraki.params['type'] == 'trunk':
+ if not meraki.params['allowed_vlans']:
+ meraki.params['allowed_vlans'] = ['all'] # Backdoor way to set default without conflicting on access
+
+ query_urls = {'switchport': '/devices/{serial}/switch/ports'}
+ query_url = {'switchport': '/devices/{serial}/switch/ports/{number}'}
+ update_url = {'switchport': '/devices/{serial}/switch/ports/{number}'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_one'].update(query_url)
+ meraki.url_catalog['update'] = update_url
+
+ # execute checks for argument completeness
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ if meraki.params['state'] == 'query':
+ if meraki.params['number']:
+ path = meraki.construct_path('get_one', custom={'serial': meraki.params['serial'],
+ 'number': meraki.params['number'],
+ })
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ else:
+ path = meraki.construct_path('get_all', custom={'serial': meraki.params['serial']})
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ elif meraki.params['state'] == 'present':
+ payload = assemble_payload(meraki)
+ # meraki.fail_json(msg='payload', payload=payload)
+ allowed = set() # Use a set to remove duplicate items
+ if meraki.params['allowed_vlans'][0] == 'all':
+ allowed.add('all')
+ else:
+ for vlan in meraki.params['allowed_vlans']:
+ allowed.add(str(vlan))
+ if meraki.params['vlan'] is not None:
+ allowed.add(str(meraki.params['vlan']))
+ if len(allowed) > 1: # Convert from list to comma separated
+ payload['allowedVlans'] = sort_vlans(meraki, allowed)
+ else:
+ payload['allowedVlans'] = next(iter(allowed))
+
+ # Exceptions need to be made for idempotency check based on how Meraki returns
+ if meraki.params['type'] == 'access':
+ if not meraki.params['vlan']: # VLAN needs to be specified in access ports, but can't default to it
+ payload['vlan'] = 1
+
+ proposed = payload.copy()
+ query_path = meraki.construct_path('get_one', custom={'serial': meraki.params['serial'],
+ 'number': meraki.params['number'],
+ })
+ original = meraki.request(query_path, method='GET')
+ if meraki.params['type'] == 'trunk':
+ proposed['voiceVlan'] = original['voiceVlan'] # API shouldn't include voice VLAN on a trunk port
+ # meraki.fail_json(msg='Compare', original=original, payload=payload)
+ if meraki.is_update_required(original, proposed, optional_ignore=['number']):
+ if meraki.check_mode is True:
+ original.update(proposed)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', custom={'serial': meraki.params['serial'],
+ 'number': meraki.params['number'],
+ })
+ # meraki.fail_json(msg=payload)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_content_filtering.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_content_filtering.py
new file mode 100644
index 00000000..5bc6b934
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_content_filtering.py
@@ -0,0 +1,282 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_content_filtering
+short_description: Edit Meraki MX content filtering policies
+description:
+- Allows for setting policy on content filtering.
+options:
+ auth_key:
+ description:
+ - Authentication key provided by the dashboard. Required if environmental variable MERAKI_KEY is not set.
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ aliases: [ network ]
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ state:
+ description:
+ - States that a policy should be created or modified.
+ choices: [present, query]
+ default: present
+ type: str
+ allowed_urls:
+ description:
+ - List of URL patterns which should be allowed.
+ type: list
+ elements: str
+ blocked_urls:
+ description:
+ - List of URL patterns which should be blocked.
+ type: list
+ elements: str
+ blocked_categories:
+ description:
+ - List of content categories which should be blocked.
+ - Use the C(meraki_content_filtering_facts) module for a full list of categories.
+ type: list
+ elements: str
+ category_list_size:
+ description:
+ - Determines whether a network filters fo rall URLs in a category or only the list of top blocked sites.
+ choices: [ top sites, full list ]
+ type: str
+ subset:
+ description:
+ - Display only certain facts.
+ choices: [categories, policy]
+ type: str
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+ - name: Set single allowed URL pattern
+ meraki_content_filtering:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourMXNet
+ allowed_urls:
+ - "http://www.ansible.com/*"
+
+ - name: Set blocked URL category
+ meraki_content_filtering:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourMXNet
+ state: present
+ category_list_size: full list
+ blocked_categories:
+ - "Adult and Pornography"
+
+ - name: Remove match patterns and categories
+ meraki_content_filtering:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourMXNet
+ state: present
+ category_list_size: full list
+ allowed_urls: []
+ blocked_urls: []
+'''
+
+RETURN = r'''
+data:
+ description: Information about the created or manipulated object.
+ returned: info
+ type: complex
+ contains:
+ categories:
+ description: List of available content filtering categories.
+ returned: query for categories
+ type: complex
+ contains:
+ id:
+ description: Unique ID of content filtering category.
+ returned: query for categories
+ type: str
+ sample: "meraki:contentFiltering/category/1"
+ name:
+ description: Name of content filtering category.
+ returned: query for categories
+ type: str
+ sample: "Real Estate"
+ allowed_url_patterns:
+ description: Explicitly permitted URL patterns
+ returned: query for policy
+ type: list
+ sample: ["http://www.ansible.com"]
+ blocked_url_patterns:
+ description: Explicitly denied URL patterns
+ returned: query for policy
+ type: list
+ sample: ["http://www.ansible.net"]
+ blocked_url_categories:
+ description: List of blocked URL categories
+ returned: query for policy
+ type: complex
+ contains:
+ id:
+ description: Unique ID of category to filter
+ returned: query for policy
+ type: list
+ sample: ["meraki:contentFiltering/category/1"]
+ name:
+ description: Name of category to filter
+ returned: query for policy
+ type: list
+ sample: ["Real Estate"]
+ url_cateogory_list_size:
+ description: Size of categories to cache on MX appliance
+ returned: query for policy
+ type: str
+ sample: "topSites"
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def get_category_dict(meraki, full_list, category):
+ for i in full_list['categories']:
+ if i['name'] == category:
+ return i['id']
+ meraki.fail_json(msg="{0} is not a valid content filtering category".format(category))
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(
+ net_id=dict(type='str'),
+ net_name=dict(type='str', aliases=['network']),
+ state=dict(type='str', default='present', choices=['present', 'query']),
+ allowed_urls=dict(type='list', elements='str'),
+ blocked_urls=dict(type='list', elements='str'),
+ blocked_categories=dict(type='list', elements='str'),
+ category_list_size=dict(type='str', choices=['top sites', 'full list']),
+ subset=dict(type='str', choices=['categories', 'policy']),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ meraki = MerakiModule(module, function='content_filtering')
+ module.params['follow_redirects'] = 'all'
+
+ category_urls = {'content_filtering': '/networks/{net_id}/appliance/contentFiltering/categories'}
+ policy_urls = {'content_filtering': '/networks/{net_id}/appliance/contentFiltering'}
+
+ meraki.url_catalog['categories'] = category_urls
+ meraki.url_catalog['policy'] = policy_urls
+
+ if meraki.params['net_name'] and meraki.params['net_id']:
+ meraki.fail_json(msg='net_name and net_id are mutually exclusive')
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = None
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ if meraki.params['subset']:
+ if meraki.params['subset'] == 'categories':
+ path = meraki.construct_path('categories', net_id=net_id)
+ elif meraki.params['subset'] == 'policy':
+ path = meraki.construct_path('policy', net_id=net_id)
+ meraki.result['data'] = meraki.request(path, method='GET')
+ else:
+ response_data = {'categories': None,
+ 'policy': None,
+ }
+ path = meraki.construct_path('categories', net_id=net_id)
+ response_data['categories'] = meraki.request(path, method='GET')
+ path = meraki.construct_path('policy', net_id=net_id)
+ response_data['policy'] = meraki.request(path, method='GET')
+ meraki.result['data'] = response_data
+ if module.params['state'] == 'present':
+ payload = dict()
+ if meraki.params['allowed_urls']:
+ payload['allowedUrlPatterns'] = meraki.params['allowed_urls']
+ if meraki.params['blocked_urls']:
+ payload['blockedUrlPatterns'] = meraki.params['blocked_urls']
+ if meraki.params['blocked_categories']:
+ if len(meraki.params['blocked_categories']) == 0: # Corner case for resetting
+ payload['blockedUrlCategories'] = []
+ else:
+ category_path = meraki.construct_path('categories', net_id=net_id)
+ categories = meraki.request(category_path, method='GET')
+ payload['blockedUrlCategories'] = []
+ for category in meraki.params['blocked_categories']:
+ payload['blockedUrlCategories'].append(get_category_dict(meraki,
+ categories,
+ category))
+ if meraki.params['category_list_size']:
+ if meraki.params['category_list_size'].lower() == 'top sites':
+ payload['urlCategoryListSize'] = "topSites"
+ elif meraki.params['category_list_size'].lower() == 'full list':
+ payload['urlCategoryListSize'] = "fullList"
+ path = meraki.construct_path('policy', net_id=net_id)
+ current = meraki.request(path, method='GET')
+ proposed = current.copy()
+ proposed.update(payload)
+ if meraki.is_update_required(current, payload) is True:
+ if module.check_mode:
+ meraki.generate_diff(current, payload)
+ current.update(payload)
+ meraki.result['changed'] = True
+ meraki.result['data'] = current
+ meraki.exit_json(**meraki.result)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.generate_diff(current, response)
+ else:
+ meraki.result['data'] = current
+ if module.check_mode:
+ meraki.result['data'] = current
+ meraki.exit_json(**meraki.result)
+ meraki.result['data'] = current
+ meraki.exit_json(**meraki.result)
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_intrusion_prevention.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_intrusion_prevention.py
new file mode 100644
index 00000000..c5d0213c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_intrusion_prevention.py
@@ -0,0 +1,366 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019 Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_intrusion_prevention
+short_description: Manage intrustion prevention in the Meraki cloud
+description:
+- Allows for management of intrusion prevention rules networks within Meraki MX networks.
+
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: [ absent, present, query ]
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ aliases: [ name, network ]
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ mode:
+ description:
+ - Operational mode of Intrusion Prevention system.
+ choices: [ detection, disabled, prevention ]
+ type: str
+ ids_rulesets:
+ description:
+ - Ruleset complexity setting.
+ choices: [ connectivity, balanced, security ]
+ type: str
+ allowed_rules:
+ description:
+ - List of IDs related to rules which are allowed for the organization.
+ type: list
+ elements: dict
+ suboptions:
+ rule_id:
+ description:
+ - ID of rule as defined by Snort.
+ type: str
+ message:
+ description:
+ - Description of rule.
+ - This is overwritten by the API.
+ type: str
+ protected_networks:
+ description:
+ - Set included/excluded networks for Intrusion Prevention.
+ type: dict
+ suboptions:
+ use_default:
+ description:
+ - Whether to use special IPv4 addresses per RFC 5735.
+ type: bool
+ included_cidr:
+ description:
+ - List of network IP ranges to include in scanning.
+ type: list
+ elements: str
+ excluded_cidr:
+ description:
+ - List of network IP ranges to exclude from scanning.
+ type: list
+ elements: str
+
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Set whitelist for organization
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ allowed_rules:
+ - rule_id: "meraki:intrusion/snort/GID/01/SID/5805"
+ message: Test rule
+ delegate_to: localhost
+
+- name: Query IPS info for organization
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ delegate_to: localhost
+ register: query_org
+
+- name: Set full ruleset with check mode
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - IPS'
+ mode: prevention
+ ids_rulesets: security
+ protected_networks:
+ use_default: true
+ included_cidr:
+ - 192.0.1.0/24
+ excluded_cidr:
+ - 10.0.1.0/24
+ delegate_to: localhost
+
+- name: Clear rules from organization
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ allowed_rules: []
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about the Threat Protection settings.
+ returned: success
+ type: complex
+ contains:
+ whitelistedRules:
+ description: List of whitelisted IPS rules.
+ returned: success, when organization is queried or modified
+ type: complex
+ contains:
+ ruleId:
+ description: A rule identifier for an IPS rule.
+ returned: success, when organization is queried or modified
+ type: str
+ sample: "meraki:intrusion/snort/GID/01/SID/5805"
+ message:
+ description: Description of rule.
+ returned: success, when organization is queried or modified
+ type: str
+ sample: "MALWARE-OTHER Trackware myway speedbar runtime detection - switch engines"
+ mode:
+ description: Enabled setting of intrusion prevention.
+ returned: success, when network is queried or modified
+ type: str
+ sample: enabled
+ idsRulesets:
+ description: Setting of selected ruleset.
+ returned: success, when network is queried or modified
+ type: str
+ sample: balanced
+ protectedNetworks:
+ description: Networks protected by IPS.
+ returned: success, when network is queried or modified
+ type: complex
+ contains:
+ useDefault:
+ description: Whether to use special IPv4 addresses.
+ returned: success, when network is queried or modified
+ type: bool
+ sample: true
+ includedCidr:
+ description: List of CIDR notiation networks to protect.
+ returned: success, when network is queried or modified
+ type: str
+ sample: 192.0.1.0/24
+ excludedCidr:
+ description: List of CIDR notiation networks to exclude from protection.
+ returned: success, when network is queried or modified
+ type: str
+ sample: 192.0.1.0/24
+
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+param_map = {'allowed_rules': 'allowedrules',
+ 'rule_id': 'ruleId',
+ 'message': 'message',
+ 'mode': 'mode',
+ 'protected_networks': 'protectedNetworks',
+ 'use_default': 'useDefault',
+ 'included_cidr': 'includedCidr',
+ }
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ allowedrules_arg_spec = dict(rule_id=dict(type='str'),
+ message=dict(type='str'),
+ )
+
+ protected_nets_arg_spec = dict(use_default=dict(type='bool'),
+ included_cidr=dict(type='list', elements='str'),
+ excluded_cidr=dict(type='list', elements='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(
+ net_id=dict(type='str'),
+ net_name=dict(type='str', aliases=['name', 'network']),
+ state=dict(type='str', choices=['absent', 'present', 'query'], default='present'),
+ allowed_rules=dict(type='list', default=None, elements='dict', options=allowedrules_arg_spec),
+ mode=dict(type='str', choices=['detection', 'disabled', 'prevention']),
+ ids_rulesets=dict(type='str', choices=['connectivity', 'balanced', 'security']),
+ protected_networks=dict(type='dict', default=None, options=protected_nets_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ meraki = MerakiModule(module, function='intrusion_prevention')
+ module.params['follow_redirects'] = 'all'
+ payload = None
+
+ query_org_urls = {'intrusion_prevention': '/organizations/{org_id}/appliance/security/intrusion'}
+ query_net_urls = {'intrusion_prevention': '/networks/{net_id}/appliance/security/intrusion'}
+ set_org_urls = {'intrusion_prevention': '/organizations/{org_id}/appliance/security/intrusion'}
+ set_net_urls = {'intrusion_prevention': '/networks/{net_id}/appliance/security/intrusion'}
+ meraki.url_catalog['query_org'] = query_org_urls
+ meraki.url_catalog['query_net'] = query_net_urls
+ meraki.url_catalog['set_org'] = set_org_urls
+ meraki.url_catalog['set_net'] = set_net_urls
+
+ if not meraki.params['org_name'] and not meraki.params['org_id']:
+ meraki.fail_json(msg='org_name or org_id parameters are required')
+ if meraki.params['net_name'] and meraki.params['net_id']:
+ meraki.fail_json(msg='net_name and net_id are mutually exclusive')
+ if meraki.params['net_name'] is None and meraki.params['net_id'] is None: # Organization param check
+ if meraki.params['state'] == 'present':
+ if meraki.params['allowed_rules'] is None:
+ meraki.fail_json(msg='allowed_rules is required when state is present and no network is specified.')
+ if meraki.params['net_name'] or meraki.params['net_id']: # Network param check
+ if meraki.params['state'] == 'present':
+ if meraki.params['protected_networks'] is not None:
+ if meraki.params['protected_networks']['use_default'] is False and meraki.params['protected_networks']['included_cidr'] is None:
+ meraki.fail_json(msg="included_cidr is required when use_default is False.")
+ if meraki.params['protected_networks']['use_default'] is False and meraki.params['protected_networks']['excluded_cidr'] is None:
+ meraki.fail_json(msg="excluded_cidr is required when use_default is False.")
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None and meraki.params['net_name']:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ # Assemble payload
+ if meraki.params['state'] == 'present':
+ if net_id is None: # Create payload for organization
+ rules = []
+ for rule in meraki.params['allowed_rules']:
+ rules.append({'ruleId': rule['rule_id'],
+ 'message': rule['message'],
+ })
+ payload = {'allowedRules': rules}
+ else: # Create payload for network
+ payload = dict()
+ if meraki.params['mode']:
+ payload['mode'] = meraki.params['mode']
+ if meraki.params['ids_rulesets']:
+ payload['idsRulesets'] = meraki.params['ids_rulesets']
+ if meraki.params['protected_networks']:
+ payload['protectedNetworks'] = {}
+ if meraki.params['protected_networks']['use_default']:
+ payload['protectedNetworks'].update({'useDefault': meraki.params['protected_networks']['use_default']})
+ if meraki.params['protected_networks']['included_cidr']:
+ payload['protectedNetworks'].update({'includedCidr': meraki.params['protected_networks']['included_cidr']})
+ if meraki.params['protected_networks']['excluded_cidr']:
+ payload['protectedNetworks'].update({'excludedCidr': meraki.params['protected_networks']['excluded_cidr']})
+ elif meraki.params['state'] == 'absent':
+ if net_id is None: # Create payload for organization
+ payload = {'allowedRules': []}
+
+ if meraki.params['state'] == 'query':
+ if net_id is None: # Query settings for organization
+ path = meraki.construct_path('query_org', org_id=org_id)
+ data = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = data
+ else: # Query settings for network
+ path = meraki.construct_path('query_net', net_id=net_id)
+ data = meraki.request(path, method='GET')
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('query_org', org_id=org_id)
+ original = meraki.request(path, method='GET')
+ if net_id is None: # Set configuration for organization
+ if meraki.is_update_required(original, payload, optional_ignore=['message']):
+ if meraki.module.check_mode is True:
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('set_org', org_id=org_id)
+ data = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = data
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ meraki.result['changed'] = False
+ else: # Set configuration for network
+ path = meraki.construct_path('query_net', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ if meraki.is_update_required(original, payload):
+ if meraki.module.check_mode is True:
+ payload.update(original)
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('set_net', net_id=net_id)
+ data = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = data
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ meraki.result['changed'] = False
+ elif meraki.params['state'] == 'absent':
+ if net_id is None:
+ path = meraki.construct_path('query_org', org_id=org_id)
+ original = meraki.request(path, method='GET')
+ if meraki.is_update_required(original, payload):
+ if meraki.module.check_mode is True:
+ payload.update(original)
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('set_org', org_id=org_id)
+ data = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = data
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ meraki.result['changed'] = False
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_l2_interface.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_l2_interface.py
new file mode 100644
index 00000000..65944b87
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_l2_interface.py
@@ -0,0 +1,273 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_l2_interface
+short_description: Configure MX layer 2 interfaces
+version_added: "2.1.0"
+description:
+- Allows for management and visibility of Merkai MX layer 2 ports.
+
+options:
+ state:
+ description:
+ - Modify or query an port.
+ choices: [present, query]
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ aliases: [name, network]
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ org_id:
+ description:
+ - ID of organization associated to a network.
+ type: str
+ number:
+ description:
+ - ID number of MX port.
+ aliases: [port, port_id]
+ type: int
+ vlan:
+ description:
+ - Native VLAN when the port is in Trunk mode.
+ - Access VLAN when the port is in Access mode.
+ type: int
+ access_policy:
+ description:
+ - The name of the policy. Only applicable to access ports.
+ choices: [open, 8021x-radius, mac-radius, hybris-radius]
+ type: str
+ allowed_vlans:
+ description:
+ - Comma-delimited list of the VLAN ID's allowed on the port, or 'all' to permit all VLAN's on the port.
+ type: str
+ port_type:
+ description:
+ - Type of port.
+ choices: [access, trunk]
+ type: str
+ drop_untagged_traffic:
+ description:
+ - Trunk port can Drop all Untagged traffic. When true, no VLAN is required.
+ - Access ports cannot have dropUntaggedTraffic set to true.
+ type: bool
+ enabled:
+ description:
+ - Enabled state of port.
+ type: bool
+
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query layer 2 interface settings
+ meraki_mx_l2_interface:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ delegate_to: localhost
+
+- name: Query a single layer 2 interface settings
+ meraki_mx_l2_interface:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ number: 2
+ delegate_to: localhost
+
+- name: Update interface configuration
+ meraki_mx_l2_interface:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ number: 2
+ port_type: access
+ vlan: 10
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about the created or manipulated object.
+ returned: success
+ type: complex
+ contains:
+ number:
+ description:
+ - ID number of MX port.
+ type: int
+ returned: success
+ sample: 4
+ vlan:
+ description:
+ - Native VLAN when the port is in Trunk mode.
+ - Access VLAN when the port is in Access mode.
+ type: int
+ returned: success
+ sample: 1
+ access_policy:
+ description:
+ - The name of the policy. Only applicable to access ports.
+ type: str
+ returned: success
+ sample: guestUsers
+ allowed_vlans:
+ description:
+ - Comma-delimited list of the VLAN ID's allowed on the port, or 'all' to permit all VLAN's on the port.
+ type: str
+ returned: success
+ sample: 1,5,10
+ type:
+ description:
+ - Type of port.
+ type: str
+ returned: success
+ sample: access
+ drop_untagged_traffic:
+ description:
+ - Trunk port can Drop all Untagged traffic. When true, no VLAN is required.
+ - Access ports cannot have dropUntaggedTraffic set to true.
+ type: bool
+ returned: success
+ sample: true
+ enabled:
+ description:
+ - Enabled state of port.
+ type: bool
+ returned: success
+ sample: true
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import recursive_diff
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def construct_payload(meraki):
+ payload = {}
+ if meraki.params['vlan'] is not None:
+ payload['vlan'] = meraki.params['vlan']
+ if meraki.params['access_policy'] is not None:
+ payload['accessPolicy'] = meraki.params['access_policy']
+ if meraki.params['allowed_vlans'] is not None:
+ payload['allowedVlans'] = meraki.params['allowed_vlans']
+ if meraki.params['port_type'] is not None:
+ payload['type'] = meraki.params['port_type']
+ if meraki.params['drop_untagged_traffic'] is not None:
+ payload['dropUntaggedTraffic'] = meraki.params['drop_untagged_traffic']
+ if meraki.params['enabled'] is not None:
+ payload['enabled'] = meraki.params['enabled']
+ return payload
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(
+ net_id=dict(type='str'),
+ net_name=dict(type='str', aliases=['name', 'network']),
+ state=dict(type='str', choices=['present', 'query'], default='present'),
+ number=dict(type='int', aliases=['port', 'port_id']),
+ vlan=dict(type='int'),
+ access_policy=dict(type='str', choices=['open', '8021x-radius', 'mac-radius', 'hybris-radius']),
+ allowed_vlans=dict(type='str'),
+ port_type=dict(type='str', choices=['access', 'trunk']),
+ drop_untagged_traffic=dict(type='bool'),
+ enabled=dict(type='bool'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ meraki = MerakiModule(module, function='mx_l2_interface')
+ module.params['follow_redirects'] = 'all'
+
+ get_all_urls = {'mx_l2_interface': '/networks/{net_id}/appliance/ports'}
+ get_one_urls = {'mx_l2_interface': '/networks/{net_id}/appliance/ports/{port_id}'}
+ update_urls = {'mx_l2_interface': '/networks/{net_id}/appliance/ports/{port_id}'}
+ meraki.url_catalog['query_all'] = get_all_urls
+ meraki.url_catalog['query_one'] = get_one_urls
+ meraki.url_catalog['update'] = update_urls
+
+ if meraki.params['net_name'] and meraki.params['net_id']:
+ meraki.fail_json(msg='net_name and net_id are mutually exclusive.')
+ if meraki.params['port_type'] == 'access':
+ if meraki.params['allowed_vlans'] is not None:
+ meraki.meraki.fail_json(msg='allowed_vlans is mutually exclusive with port type trunk.')
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ if meraki.params['number'] is not None:
+ path = meraki.construct_path('query_one', net_id=net_id, custom={'port_id': meraki.params['number']})
+ else:
+ path = meraki.construct_path('query_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('query_one', net_id=net_id, custom={'port_id': meraki.params['number']})
+ original = meraki.request(path, method='GET')
+ payload = construct_payload(meraki)
+ if meraki.is_update_required(original, payload):
+ meraki.generate_diff(original, payload)
+ if meraki.check_mode is True:
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id, custom={'port_id': meraki.params['number']})
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ else:
+ meraki.result['data'] = original
+ meraki.exit_json(**meraki.result)
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_l3_firewall.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_l3_firewall.py
new file mode 100644
index 00000000..b9b1e9b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_l3_firewall.py
@@ -0,0 +1,365 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_l3_firewall
+short_description: Manage MX appliance layer 3 firewalls in the Meraki cloud
+description:
+- Allows for creation, management, and visibility into layer 3 firewalls implemented on Meraki MX firewalls.
+notes:
+- Module assumes a complete list of firewall rules are passed as a parameter.
+- If there is interest in this module allowing manipulation of a single firewall rule, please submit an issue against this module.
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: ['present', 'query']
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of network which MX firewall is in.
+ type: str
+ net_id:
+ description:
+ - ID of network which MX firewall is in.
+ type: str
+ rules:
+ description:
+ - List of firewall rules.
+ type: list
+ elements: dict
+ suboptions:
+ policy:
+ description:
+ - Policy to apply if rule is hit.
+ choices: [allow, deny]
+ type: str
+ protocol:
+ description:
+ - Protocol to match against.
+ choices: [any, icmp, tcp, udp]
+ type: str
+ dest_port:
+ description:
+ - Comma separated list of destination port numbers to match against.
+ - C(Any) must be capitalized.
+ type: str
+ dest_cidr:
+ description:
+ - Comma separated list of CIDR notation destination networks.
+ - C(Any) must be capitalized.
+ type: str
+ src_port:
+ description:
+ - Comma separated list of source port numbers to match against.
+ - C(Any) must be capitalized.
+ type: str
+ src_cidr:
+ description:
+ - Comma separated list of CIDR notation source networks.
+ - C(Any) must be capitalized.
+ type: str
+ comment:
+ description:
+ - Optional comment to describe the firewall rule.
+ type: str
+ syslog_enabled:
+ description:
+ - Whether to log hints against the firewall rule.
+ - Only applicable if a syslog server is specified against the network.
+ type: bool
+ default: False
+ syslog_default_rule:
+ description:
+ - Whether to log hits against the default firewall rule.
+ - Only applicable if a syslog server is specified against the network.
+ - This is not shown in response from Meraki. Instead, refer to the C(syslog_enabled) value in the default rule.
+ type: bool
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query firewall rules
+ meraki_mx_l3_firewall:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ delegate_to: localhost
+
+- name: Set two firewall rules
+ meraki_mx_l3_firewall:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ rules:
+ - comment: Block traffic to server
+ src_cidr: 192.0.1.0/24
+ src_port: any
+ dest_cidr: 192.0.2.2/32
+ dest_port: any
+ protocol: any
+ policy: deny
+ - comment: Allow traffic to group of servers
+ src_cidr: 192.0.1.0/24
+ src_port: any
+ dest_cidr: 192.0.2.0/24
+ dest_port: any
+ protocol: any
+ policy: permit
+ delegate_to: localhost
+
+- name: Set one firewall rule and enable logging of the default rule
+ meraki_mx_l3_firewall:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ rules:
+ - comment: Block traffic to server
+ src_cidr: 192.0.1.0/24
+ src_port: any
+ dest_cidr: 192.0.2.2/32
+ dest_port: any
+ protocol: any
+ policy: deny
+ syslog_default_rule: yes
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Firewall rules associated to network.
+ returned: success
+ type: complex
+ contains:
+ rules:
+ description: List of firewall rules.
+ returned: success
+ type: complex
+ contains:
+ comment:
+ description: Comment to describe the firewall rule.
+ returned: always
+ type: str
+ sample: Block traffic to server
+ src_cidr:
+ description: Comma separated list of CIDR notation source networks.
+ returned: always
+ type: str
+ sample: 192.0.1.1/32,192.0.1.2/32
+ src_port:
+ description: Comma separated list of source ports.
+ returned: always
+ type: str
+ sample: 80,443
+ dest_cidr:
+ description: Comma separated list of CIDR notation destination networks.
+ returned: always
+ type: str
+ sample: 192.0.1.1/32,192.0.1.2/32
+ dest_port:
+ description: Comma separated list of destination ports.
+ returned: always
+ type: str
+ sample: 80,443
+ protocol:
+ description: Network protocol for which to match against.
+ returned: always
+ type: str
+ sample: tcp
+ policy:
+ description: Action to take when rule is matched.
+ returned: always
+ type: str
+ syslog_enabled:
+ description: Whether to log to syslog when rule is matched.
+ returned: always
+ type: bool
+ sample: true
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def assemble_payload(meraki):
+ params_map = {'policy': 'policy',
+ 'protocol': 'protocol',
+ 'dest_port': 'destPort',
+ 'dest_cidr': 'destCidr',
+ 'src_port': 'srcPort',
+ 'src_cidr': 'srcCidr',
+ 'syslog_enabled': 'syslogEnabled',
+ 'comment': 'comment',
+ }
+ rules = []
+ for rule in meraki.params['rules']:
+ proposed_rule = dict()
+ for k, v in rule.items():
+ proposed_rule[params_map[k]] = v
+ rules.append(proposed_rule)
+ payload = {'rules': rules}
+ return payload
+
+
+def get_rules(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ return response
+
+
+def normalize_case(rule):
+ any = ['any', 'Any', 'ANY']
+ if 'srcPort' in rule:
+ if rule['srcPort'] in any:
+ rule['srcPort'] = 'Any'
+ if 'srcCidr' in rule:
+ if rule['srcCidr'] in any:
+ rule['srcCidr'] = 'Any'
+ if 'destPort' in rule:
+ if rule['destPort'] in any:
+ rule['destPort'] = 'Any'
+ if 'destCidr' in rule:
+ if rule['destCidr'] in any:
+ rule['destCidr'] = 'Any'
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ fw_rules = dict(policy=dict(type='str', choices=['allow', 'deny']),
+ protocol=dict(type='str', choices=['tcp', 'udp', 'icmp', 'any']),
+ dest_port=dict(type='str'),
+ dest_cidr=dict(type='str'),
+ src_port=dict(type='str'),
+ src_cidr=dict(type='str'),
+ comment=dict(type='str'),
+ syslog_enabled=dict(type='bool', default=False),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='present'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ rules=dict(type='list', default=None, elements='dict', options=fw_rules),
+ syslog_default_rule=dict(type='bool'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='mx_l3_firewall')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'mx_l3_firewall': '/networks/{net_id}/appliance/firewall/l3FirewallRules/'}
+ update_urls = {'mx_l3_firewall': '/networks/{net_id}/appliance/firewall/l3FirewallRules/'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['update'] = update_urls
+
+ payload = None
+
+ # execute checks for argument completeness
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ orgs = meraki.get_orgs()
+ for org in orgs:
+ if org['name'] == meraki.params['org_name']:
+ org_id = org['id']
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'],
+ data=meraki.get_nets(org_id=org_id))
+
+ if meraki.params['state'] == 'query':
+ meraki.result['data'] = get_rules(meraki, net_id)
+ elif meraki.params['state'] == 'present':
+ rules = get_rules(meraki, net_id)
+ path = meraki.construct_path('get_all', net_id=net_id)
+ if meraki.params['rules'] is not None:
+ payload = assemble_payload(meraki)
+ else:
+ payload = dict()
+ update = False
+ if meraki.params['syslog_default_rule'] is not None:
+ payload['syslogDefaultRule'] = meraki.params['syslog_default_rule']
+ try:
+ if meraki.params['rules'] is not None:
+ if len(rules['rules']) - 1 != len(payload['rules']): # Quick and simple check to avoid more processing
+ update = True
+ if meraki.params['syslog_default_rule'] is not None:
+ if rules['rules'][len(rules['rules']) - 1]['syslogEnabled'] != meraki.params['syslog_default_rule']:
+ update = True
+ if update is False:
+ default_rule = rules['rules'][len(rules['rules']) - 1].copy()
+ del rules['rules'][len(rules['rules']) - 1] # Remove default rule for comparison
+ if len(rules['rules']) - 1 == 0: # There is only a single rule
+ normalize_case(rules['rules'][0])
+ normalize_case(payload['rules'][0])
+ if meraki.is_update_required(rules['rules'][0], payload['rules'][0]) is True:
+ update = True
+ else:
+ for r in range(len(rules['rules']) - 1):
+ normalize_case(rules[r])
+ normalize_case(payload['rules'][r])
+ if meraki.is_update_required(rules[r], payload['rules'][r]) is True:
+ update = True
+ rules['rules'].append(default_rule)
+ except KeyError:
+ pass
+ if update is True:
+ if meraki.check_mode is True:
+ if meraki.params['rules'] is not None:
+ data = payload['rules']
+ data.append(rules['rules'][len(rules['rules']) - 1]) # Append the default rule
+ if meraki.params['syslog_default_rule'] is not None:
+ data[len(payload) - 1]['syslog_enabled'] = meraki.params['syslog_default_rule']
+ else:
+ if meraki.params['syslog_default_rule'] is not None:
+ data = rules
+ data['rules'][len(data['rules']) - 1]['syslogEnabled'] = meraki.params['syslog_default_rule']
+ meraki.result['data'] = data
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = rules
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_l7_firewall.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_l7_firewall.py
new file mode 100644
index 00000000..31c9af1c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_l7_firewall.py
@@ -0,0 +1,479 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_l7_firewall
+short_description: Manage MX appliance layer 7 firewalls in the Meraki cloud
+description:
+- Allows for creation, management, and visibility into layer 7 firewalls implemented on Meraki MX firewalls.
+notes:
+- Module assumes a complete list of firewall rules are passed as a parameter.
+- If there is interest in this module allowing manipulation of a single firewall rule, please submit an issue against this module.
+options:
+ state:
+ description:
+ - Query or modify a firewall rule.
+ choices: ['present', 'query']
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of network which MX firewall is in.
+ type: str
+ net_id:
+ description:
+ - ID of network which MX firewall is in.
+ type: str
+ rules:
+ description:
+ - List of layer 7 firewall rules.
+ type: list
+ elements: dict
+ suboptions:
+ policy:
+ description:
+ - Policy to apply if rule is hit.
+ choices: [deny]
+ default: deny
+ type: str
+ type:
+ description:
+ - Type of policy to apply.
+ choices: [application,
+ application_category,
+ blocked_countries,
+ host,
+ ip_range,
+ port,
+ allowed_countries]
+ type: str
+ application:
+ description:
+ - Application to filter.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - Name of application to filter as defined by Meraki.
+ type: str
+ id:
+ description:
+ - URI of application as defined by Meraki.
+ type: str
+ host:
+ description:
+ - FQDN of host to filter.
+ type: str
+ ip_range:
+ description:
+ - CIDR notation range of IP addresses to apply rule to.
+ - Port can be appended to range with a C(":").
+ type: str
+ port:
+ description:
+ - TCP or UDP based port to filter.
+ type: str
+ countries:
+ description:
+ - List of countries to whitelist or blacklist.
+ - The countries follow the two-letter ISO 3166-1 alpha-2 format.
+ type: list
+ elements: str
+ categories:
+ description:
+ - When C(True), specifies that applications and application categories should be queried instead of firewall rules.
+ type: bool
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query firewall rules
+ meraki_mx_l7_firewall:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ delegate_to: localhost
+
+- name: Query applications and application categories
+ meraki_mx_l7_firewall:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ categories: yes
+ state: query
+ delegate_to: localhost
+
+- name: Set firewall rules
+ meraki_mx_l7_firewall:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ rules:
+ - type: allowed_countries
+ countries:
+ - US
+ - FR
+ - type: blocked_countries
+ countries:
+ - CN
+ - policy: deny
+ type: port
+ port: 8080
+ - type: port
+ port: 1234
+ - type: host
+ host: asdf.com
+ - type: application
+ application:
+ id: meraki:layer7/application/205
+ - type: application_category
+ application:
+ id: meraki:layer7/category/24
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Firewall rules associated to network.
+ returned: success
+ type: complex
+ contains:
+ rules:
+ description: Ordered list of firewall rules.
+ returned: success, when not querying applications
+ type: list
+ contains:
+ policy:
+ description: Action to apply when rule is hit.
+ returned: success
+ type: str
+ sample: deny
+ type:
+ description: Type of rule category.
+ returned: success
+ type: str
+ sample: applications
+ applications:
+ description: List of applications within a category.
+ type: list
+ contains:
+ id:
+ description: URI of application.
+ returned: success
+ type: str
+ sample: Gmail
+ name:
+ description: Descriptive name of application.
+ returned: success
+ type: str
+ sample: meraki:layer7/application/4
+ applicationCategory:
+ description: List of application categories within a category.
+ type: list
+ contains:
+ id:
+ description: URI of application.
+ returned: success
+ type: str
+ sample: Gmail
+ name:
+ description: Descriptive name of application.
+ returned: success
+ type: str
+ sample: meraki:layer7/application/4
+ port:
+ description: Port number in rule.
+ returned: success
+ type: str
+ sample: 23
+ ipRange:
+ description: Range of IP addresses in rule.
+ returned: success
+ type: str
+ sample: 1.1.1.0/23
+ allowedCountries:
+ description: Countries to be allowed.
+ returned: success
+ type: str
+ sample: CA
+ blockedCountries:
+ description: Countries to be blacklisted.
+ returned: success
+ type: str
+ sample: RU
+ application_categories:
+ description: List of application categories and applications.
+ type: list
+ returned: success, when querying applications
+ contains:
+ applications:
+ description: List of applications within a category.
+ type: list
+ contains:
+ id:
+ description: URI of application.
+ returned: success
+ type: str
+ sample: Gmail
+ name:
+ description: Descriptive name of application.
+ returned: success
+ type: str
+ sample: meraki:layer7/application/4
+ id:
+ description: URI of application category.
+ returned: success
+ type: str
+ sample: Email
+ name:
+ description: Descriptive name of application category.
+ returned: success
+ type: str
+ sample: layer7/category/1
+'''
+
+import copy
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def get_applications(meraki, net_id):
+ path = meraki.construct_path('get_categories', net_id=net_id)
+ return meraki.request(path, method='GET')
+
+
+def lookup_application(meraki, net_id, application):
+ response = get_applications(meraki, net_id)
+ for category in response['applicationCategories']:
+ if category['name'].lower() == application.lower():
+ return category['id']
+ for app in category['applications']:
+ if app['name'].lower() == application.lower():
+ return app['id']
+ meraki.fail_json(msg="No application or category named {0} found".format(application))
+
+
+def assemble_payload(meraki, net_id, rule):
+ if rule['type'] == 'application':
+ new_rule = {'policy': rule['policy'],
+ 'type': 'application',
+ }
+ if rule['application']['id']:
+ new_rule['value'] = {'id': rule['application']['id']}
+ elif rule['application']['name']:
+ new_rule['value'] = {'id': lookup_application(meraki, net_id, rule['application']['name'])}
+ elif rule['type'] == 'application_category':
+ new_rule = {'policy': rule['policy'],
+ 'type': 'applicationCategory',
+ }
+ if rule['application']['id']:
+ new_rule['value'] = {'id': rule['application']['id']}
+ elif rule['application']['name']:
+ new_rule['value'] = {'id': lookup_application(meraki, net_id, rule['application']['name'])}
+ elif rule['type'] == 'ip_range':
+ new_rule = {'policy': rule['policy'],
+ 'type': 'ipRange',
+ 'value': rule['ip_range']}
+ elif rule['type'] == 'host':
+ new_rule = {'policy': rule['policy'],
+ 'type': rule['type'],
+ 'value': rule['host']}
+ elif rule['type'] == 'port':
+ new_rule = {'policy': rule['policy'],
+ 'type': rule['type'],
+ 'value': rule['port']}
+ elif rule['type'] == 'blocked_countries':
+ new_rule = {'policy': rule['policy'],
+ 'type': 'blockedCountries',
+ 'value': rule['countries']
+ }
+ elif rule['type'] == 'allowed_countries':
+ new_rule = {'policy': rule['policy'],
+ 'type': 'allowedCountries',
+ 'value': rule['countries']
+ }
+ return new_rule
+
+
+def restructure_response(rules):
+ for rule in rules['rules']:
+ type = rule['type']
+ rule[type] = copy.deepcopy(rule['value'])
+ del rule['value']
+ return rules
+
+
+def get_rules(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ return response
+
+
+def rename_id_to_appid(rules):
+ for rule in rules['rules']:
+ if rule['type'] == 'application' or rule['type'] == 'applicationCategory':
+ rule['value']['appId'] = rule['value'].pop('id')
+ return rules
+
+
+def rename_appid_to_id(rules):
+ for rule in rules['rules']:
+ if rule['type'] == 'application' or rule['type'] == 'applicationCategory':
+ rule['value']['id'] = rule['value'].pop('appId')
+ return rules
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ application_arg_spec = dict(id=dict(type='str'),
+ name=dict(type='str'),
+ )
+
+ rule_arg_spec = dict(policy=dict(type='str', choices=['deny'], default='deny'),
+ type=dict(type='str', choices=['application',
+ 'application_category',
+ 'blocked_countries',
+ 'host',
+ 'ip_range',
+ 'port',
+ 'allowed_countries']),
+ ip_range=dict(type='str'),
+ application=dict(type='dict', default=None, options=application_arg_spec),
+ host=dict(type='str'),
+ port=dict(type='str'),
+ countries=dict(type='list', elements='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='present'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ rules=dict(type='list', default=None, elements='dict', options=rule_arg_spec),
+ categories=dict(type='bool'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='mx_l7_firewall')
+
+ # check for argument completeness
+ if meraki.params['rules']:
+ for rule in meraki.params['rules']:
+ if rule['type'] == 'application' and rule['application'] is None:
+ meraki.fail_json(msg="application argument is required when type is application.")
+ elif rule['type'] == 'application_category' and rule['application'] is None:
+ meraki.fail_json(msg="application argument is required when type is application_category.")
+ elif rule['type'] == 'blocked_countries' and rule['countries'] is None:
+ meraki.fail_json(msg="countries argument is required when type is blocked_countries.")
+ elif rule['type'] == 'host' and rule['host'] is None:
+ meraki.fail_json(msg="host argument is required when type is host.")
+ elif rule['type'] == 'port' and rule['port'] is None:
+ meraki.fail_json(msg="port argument is required when type is port.")
+ elif rule['type'] == 'allowed_countries' and rule['countries'] is None:
+ meraki.fail_json(msg="countries argument is required when type is allowed_countries.")
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'mx_l7_firewall': '/networks/{net_id}/appliance/firewall/l7FirewallRules/'}
+ query_category_urls = {'mx_l7_firewall': '/networks/{net_id}/appliance/firewall/l7FirewallRules/applicationCategories'}
+ update_urls = {'mx_l7_firewall': '/networks/{net_id}/appliance/firewall/l7FirewallRules/'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_categories'] = (query_category_urls)
+ meraki.url_catalog['update'] = update_urls
+
+ payload = None
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ orgs = None
+ if org_id is None:
+ orgs = meraki.get_orgs()
+ for org in orgs:
+ if org['name'] == meraki.params['org_name']:
+ org_id = org['id']
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ if orgs is None:
+ orgs = meraki.get_orgs()
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'],
+ data=meraki.get_nets(org_id=org_id))
+
+ if meraki.params['state'] == 'query':
+ if meraki.params['categories'] is True: # Output only applications
+ meraki.result['data'] = get_applications(meraki, net_id)
+ else:
+ meraki.result['data'] = restructure_response(get_rules(meraki, net_id))
+ elif meraki.params['state'] == 'present':
+ rules = get_rules(meraki, net_id)
+ path = meraki.construct_path('get_all', net_id=net_id)
+ if meraki.params['rules']:
+ payload = {'rules': []}
+ for rule in meraki.params['rules']:
+ payload['rules'].append(assemble_payload(meraki, net_id, rule))
+ else:
+ payload = dict()
+
+ '''
+ The rename_* functions are needed because the key is id and
+ is_update_required() by default ignores id.
+ '''
+ rules = rename_id_to_appid(rules)
+ payload = rename_id_to_appid(payload)
+ if meraki.is_update_required(rules, payload):
+ rules = rename_appid_to_id(rules)
+ payload = rename_appid_to_id(payload)
+ if meraki.module.check_mode is True:
+ response = restructure_response(payload)
+ meraki.generate_diff(restructure_response(rules), response)
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ response = restructure_response(response)
+ if meraki.status == 200:
+ meraki.generate_diff(restructure_response(rules), response)
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ rules = rename_appid_to_id(rules)
+ payload = rename_appid_to_id(payload)
+ if meraki.module.check_mode is True:
+ meraki.result['data'] = rules
+ meraki.result['changed'] = False
+ meraki.exit_json(**meraki.result)
+ meraki.result['data'] = payload
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_malware.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_malware.py
new file mode 100644
index 00000000..1cbf7e68
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_malware.py
@@ -0,0 +1,264 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_malware
+short_description: Manage Malware Protection in the Meraki cloud
+description:
+- Fully configure malware protection in a Meraki environment.
+notes:
+- Some of the options are likely only used for developers within Meraki.
+options:
+ state:
+ description:
+ - Specifies whether object should be queried, created/modified, or removed.
+ choices: [absent, present, query]
+ default: query
+ type: str
+ net_name:
+ description:
+ - Name of network which configuration is applied to.
+ aliases: [network]
+ type: str
+ net_id:
+ description:
+ - ID of network which configuration is applied to.
+ type: str
+ allowed_urls:
+ description:
+ - List of URLs to whitelist.
+ type: list
+ elements: dict
+ suboptions:
+ url:
+ description:
+ - URL string to allow.
+ type: str
+ comment:
+ description:
+ - Human readable information about URL.
+ type: str
+ allowed_files:
+ description:
+ - List of files to whitelist.
+ type: list
+ elements: dict
+ suboptions:
+ sha256:
+ description:
+ - 256-bit hash of file.
+ type: str
+ aliases: [ hash ]
+ comment:
+ description:
+ - Human readable information about file.
+ type: str
+ mode:
+ description:
+ - Enabled or disabled state of malware protection.
+ choices: [disabled, enabled]
+ type: str
+
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+ - name: Enable malware protection
+ meraki_malware:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ mode: enabled
+ delegate_to: localhost
+
+ - name: Set whitelisted url
+ meraki_malware:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ mode: enabled
+ allowed_urls:
+ - url: www.ansible.com
+ comment: Ansible
+ - url: www.google.com
+ comment: Google
+ delegate_to: localhost
+
+ - name: Set whitelisted file
+ meraki_malware:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ mode: enabled
+ allowed_files:
+ - sha256: e82c5f7d75004727e1f3b94426b9a11c8bc4c312a9170ac9a73abace40aef503
+ comment: random zip
+ delegate_to: localhost
+
+ - name: Get malware settings
+ meraki_malware:
+ auth_key: abc123
+ state: query
+ org_name: YourNet
+ net_name: YourOrg
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: List of administrators.
+ returned: success
+ type: complex
+ contains:
+ mode:
+ description: Mode to enable or disable malware scanning.
+ returned: success
+ type: str
+ sample: enabled
+ allowed_files:
+ description: List of files which are whitelisted.
+ returned: success
+ type: complex
+ contains:
+ sha256:
+ description: sha256 hash of whitelisted file.
+ returned: success
+ type: str
+ sample: e82c5f7d75004727e1f3b94426b9a11c8bc4c312a9170ac9a73abace40aef503
+ comment:
+ description: Comment about the whitelisted entity
+ returned: success
+ type: str
+ sample: TPS report
+ allowed_urls:
+ description: List of URLs which are whitelisted.
+ returned: success
+ type: complex
+ contains:
+ url:
+ description: URL of whitelisted site.
+ returned: success
+ type: str
+ sample: site.com
+ comment:
+ description: Comment about the whitelisted entity
+ returned: success
+ type: str
+ sample: Corporate HQ
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ urls_arg_spec = dict(url=dict(type='str'),
+ comment=dict(type='str'),
+ )
+
+ files_arg_spec = dict(sha256=dict(type='str', aliases=['hash']),
+ comment=dict(type='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='query'),
+ net_name=dict(type='str', aliases=['network']),
+ net_id=dict(type='str'),
+ mode=dict(type='str', choices=['enabled', 'disabled']),
+ allowed_urls=dict(type='list', default=None, elements='dict', options=urls_arg_spec),
+ allowed_files=dict(type='list', default=None, elements='dict', options=files_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='malware')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_url = {'malware': '/networks/{net_id}/appliance/security/malware'}
+ update_url = {'malware': '/networks/{net_id}/appliance/security/malware'}
+
+ meraki.url_catalog['get_one'].update(query_url)
+ meraki.url_catalog['update'] = update_url
+
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ # Check for argument completeness
+ if meraki.params['state'] == 'present':
+ if meraki.params['allowed_files'] is not None or meraki.params['allowed_urls'] is not None:
+ if meraki.params['mode'] is None:
+ meraki.fail_json(msg="mode must be set when allowed_files or allowed_urls is set.")
+
+ # Assemble payload
+ if meraki.params['state'] == 'present':
+ payload = dict()
+ if meraki.params['mode'] is not None:
+ payload['mode'] = meraki.params['mode']
+ if meraki.params['allowed_urls'] is not None:
+ payload['allowedUrls'] = meraki.params['allowed_urls']
+ if meraki.params['allowed_files'] is not None:
+ payload['allowedFiles'] = meraki.params['allowed_files']
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_one', net_id=net_id)
+ data = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = data
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_one', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ if meraki.is_update_required(original, payload):
+ if meraki.module.check_mode is True:
+ meraki.generate_diff(original, payload)
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id)
+ data = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.generate_diff(original, data)
+ meraki.result['data'] = data
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_nat.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_nat.py
new file mode 100644
index 00000000..0844d4c1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_nat.py
@@ -0,0 +1,679 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_nat
+short_description: Manage NAT rules in Meraki cloud
+description:
+- Allows for creation, management, and visibility of NAT rules (1:1, 1:many, port forwarding) within Meraki.
+
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: [present, query]
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ aliases: [name, network]
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ org_id:
+ description:
+ - ID of organization associated to a network.
+ type: str
+ subset:
+ description:
+ - Specifies which NAT components to query.
+ choices: ['1:1', '1:many', all, port_forwarding]
+ default: all
+ type: list
+ elements: str
+ one_to_one:
+ description:
+ - List of 1:1 NAT rules.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - A descriptive name for the rule.
+ type: str
+ public_ip:
+ description:
+ - The IP address that will be used to access the internal resource from the WAN.
+ type: str
+ lan_ip:
+ description:
+ - The IP address of the server or device that hosts the internal resource that you wish to make available on the WAN.
+ type: str
+ uplink:
+ description:
+ - The physical WAN interface on which the traffic will arrive.
+ choices: [both, internet1, internet2]
+ type: str
+ allowed_inbound:
+ description:
+ - The ports this mapping will provide access on, and the remote IPs that will be allowed access to the resource.
+ type: list
+ elements: dict
+ suboptions:
+ protocol:
+ description:
+ - Protocol to apply NAT rule to.
+ choices: [any, icmp-ping, tcp, udp]
+ type: str
+ default: any
+ destination_ports:
+ description:
+ - List of ports or port ranges that will be forwarded to the host on the LAN.
+ type: list
+ elements: str
+ allowed_ips:
+ description:
+ - ranges of WAN IP addresses that are allowed to make inbound connections on the specified ports or port ranges, or 'any'.
+ type: list
+ elements: str
+ one_to_many:
+ description:
+ - List of 1:many NAT rules.
+ type: list
+ elements: dict
+ suboptions:
+ public_ip:
+ description:
+ - The IP address that will be used to access the internal resource from the WAN.
+ type: str
+ uplink:
+ description:
+ - The physical WAN interface on which the traffic will arrive.
+ choices: [both, internet1, internet2]
+ type: str
+ port_rules:
+ description:
+ - List of associated port rules.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - A description of the rule.
+ type: str
+ protocol:
+ description:
+ - Protocol to apply NAT rule to.
+ choices: [tcp, udp]
+ type: str
+ public_port:
+ description:
+ - Destination port of the traffic that is arriving on the WAN.
+ type: str
+ local_ip:
+ description:
+ - Local IP address to which traffic will be forwarded.
+ type: str
+ local_port:
+ description:
+ - Destination port of the forwarded traffic that will be sent from the MX to the specified host on the LAN.
+ - If you simply wish to forward the traffic without translating the port, this should be the same as the Public port.
+ type: str
+ allowed_ips:
+ description:
+ - Remote IP addresses or ranges that are permitted to access the internal resource via this port forwarding rule, or 'any'.
+ type: list
+ elements: str
+ port_forwarding:
+ description:
+ - List of port forwarding rules.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - A descriptive name for the rule.
+ type: str
+ lan_ip:
+ description:
+ - The IP address of the server or device that hosts the internal resource that you wish to make available on the WAN.
+ type: str
+ uplink:
+ description:
+ - The physical WAN interface on which the traffic will arrive.
+ choices: [both, internet1, internet2]
+ type: str
+ public_port:
+ description:
+ - A port or port ranges that will be forwarded to the host on the LAN.
+ type: int
+ local_port:
+ description:
+ - A port or port ranges that will receive the forwarded traffic from the WAN.
+ type: int
+ allowed_ips:
+ description:
+ - List of ranges of WAN IP addresses that are allowed to make inbound connections on the specified ports or port ranges (or any).
+ type: list
+ elements: str
+ protocol:
+ description:
+ - Protocol to forward traffic for.
+ choices: [tcp, udp]
+ type: str
+
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query all NAT rules
+ meraki_nat:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ subset: all
+ delegate_to: localhost
+
+- name: Query 1:1 NAT rules
+ meraki_nat:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ subset: '1:1'
+ delegate_to: localhost
+
+- name: Create 1:1 rule
+ meraki_nat:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ one_to_one:
+ - name: Service behind NAT
+ public_ip: 1.2.1.2
+ lan_ip: 192.168.128.1
+ uplink: internet1
+ allowed_inbound:
+ - protocol: tcp
+ destination_ports:
+ - 80
+ allowed_ips:
+ - 10.10.10.10
+ delegate_to: localhost
+
+- name: Create 1:many rule
+ meraki_nat:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ one_to_many:
+ - public_ip: 1.1.1.1
+ uplink: internet1
+ port_rules:
+ - name: Test rule
+ protocol: tcp
+ public_port: 10
+ local_ip: 192.168.128.1
+ local_port: 11
+ allowed_ips:
+ - any
+ delegate_to: localhost
+
+- name: Create port forwarding rule
+ meraki_nat:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ port_forwarding:
+ - name: Test map
+ lan_ip: 192.168.128.1
+ uplink: both
+ protocol: tcp
+ allowed_ips:
+ - 1.1.1.1
+ public_port: 10
+ local_port: 11
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about the created or manipulated object.
+ returned: success
+ type: complex
+ contains:
+ one_to_one:
+ description: Information about 1:1 NAT object.
+ returned: success, when 1:1 NAT object is in task
+ type: complex
+ contains:
+ rules:
+ description: List of 1:1 NAT rules.
+ returned: success, when 1:1 NAT object is in task
+ type: complex
+ contains:
+ name:
+ description: Name of NAT object.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: Web server behind NAT
+ lanIp:
+ description: Local IP address to be mapped.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: 192.168.128.22
+ publicIp:
+ description: Public IP address to be mapped.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: 148.2.5.100
+ uplink:
+ description: Internet port where rule is applied.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: internet1
+ allowedInbound:
+ description: List of inbound forwarding rules.
+ returned: success, when 1:1 NAT object is in task
+ type: complex
+ contains:
+ protocol:
+ description: Protocol to apply NAT rule to.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: tcp
+ destinationPorts:
+ description: Ports to apply NAT rule to.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: 80
+ allowedIps:
+ description: List of IP addresses to be forwarded.
+ returned: success, when 1:1 NAT object is in task
+ type: list
+ example: 10.80.100.0/24
+ one_to_many:
+ description: Information about 1:many NAT object.
+ returned: success, when 1:many NAT object is in task
+ type: complex
+ contains:
+ rules:
+ description: List of 1:many NAT rules.
+ returned: success, when 1:many NAT object is in task
+ type: complex
+ contains:
+ publicIp:
+ description: Public IP address to be mapped.
+ returned: success, when 1:many NAT object is in task
+ type: str
+ example: 148.2.5.100
+ uplink:
+ description: Internet port where rule is applied.
+ returned: success, when 1:many NAT object is in task
+ type: str
+ example: internet1
+ portRules:
+ description: List of NAT port rules.
+ returned: success, when 1:many NAT object is in task
+ type: complex
+ contains:
+ name:
+ description: Name of NAT object.
+ returned: success, when 1:many NAT object is in task
+ type: str
+ example: Web server behind NAT
+ protocol:
+ description: Protocol to apply NAT rule to.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: tcp
+ publicPort:
+ description: Destination port of the traffic that is arriving on WAN.
+ returned: success, when 1:1 NAT object is in task
+ type: int
+ example: 9443
+ localIp:
+ description: Local IP address traffic will be forwarded.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: 192.0.2.10
+ localPort:
+ description: Destination port to be forwarded to.
+ returned: success, when 1:1 NAT object is in task
+ type: int
+ example: 443
+ allowedIps:
+ description: List of IP addresses to be forwarded.
+ returned: success, when 1:1 NAT object is in task
+ type: list
+ example: 10.80.100.0/24
+ port_forwarding:
+ description: Information about port forwarding rules.
+ returned: success, when port forwarding is in task
+ type: complex
+ contains:
+ rules:
+ description: List of port forwarding rules.
+ returned: success, when port forwarding is in task
+ type: complex
+ contains:
+ lanIp:
+ description: Local IP address to be mapped.
+ returned: success, when port forwarding is in task
+ type: str
+ example: 192.168.128.22
+ allowedIps:
+ description: List of IP addresses to be forwarded.
+ returned: success, when port forwarding is in task
+ type: list
+ example: 10.80.100.0/24
+ name:
+ description: Name of NAT object.
+ returned: success, when port forwarding is in task
+ type: str
+ example: Web server behind NAT
+ protocol:
+ description: Protocol to apply NAT rule to.
+ returned: success, when port forwarding is in task
+ type: str
+ example: tcp
+ publicPort:
+ description: Destination port of the traffic that is arriving on WAN.
+ returned: success, when port forwarding is in task
+ type: int
+ example: 9443
+ localPort:
+ description: Destination port to be forwarded to.
+ returned: success, when port forwarding is in task
+ type: int
+ example: 443
+ uplink:
+ description: Internet port where rule is applied.
+ returned: success, when port forwarding is in task
+ type: str
+ example: internet1
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import recursive_diff
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+key_map = {'name': 'name',
+ 'public_ip': 'publicIp',
+ 'lan_ip': 'lanIp',
+ 'uplink': 'uplink',
+ 'allowed_inbound': 'allowedInbound',
+ 'protocol': 'protocol',
+ 'destination_ports': 'destinationPorts',
+ 'allowed_ips': 'allowedIps',
+ 'port_rules': 'portRules',
+ 'public_port': 'publicPort',
+ 'local_ip': 'localIp',
+ 'local_port': 'localPort',
+ }
+
+
+def construct_payload(params):
+ if isinstance(params, list):
+ items = []
+ for item in params:
+ items.append(construct_payload(item))
+ return items
+ elif isinstance(params, dict):
+ info = {}
+ for param in params:
+ info[key_map[param]] = construct_payload(params[param])
+ return info
+ elif isinstance(params, str) or isinstance(params, int):
+ return params
+
+
+def list_int_to_str(data):
+ return [str(item) for item in data]
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ one_to_one_allowed_inbound_spec = dict(protocol=dict(type='str', choices=['tcp', 'udp', 'icmp-ping', 'any'], default='any'),
+ destination_ports=dict(type='list', elements='str'),
+ allowed_ips=dict(type='list', elements='str'),
+ )
+
+ one_to_many_port_inbound_spec = dict(protocol=dict(type='str', choices=['tcp', 'udp']),
+ name=dict(type='str'),
+ local_ip=dict(type='str'),
+ local_port=dict(type='str'),
+ allowed_ips=dict(type='list', elements='str'),
+ public_port=dict(type='str'),
+ )
+
+ one_to_one_spec = dict(name=dict(type='str'),
+ public_ip=dict(type='str'),
+ lan_ip=dict(type='str'),
+ uplink=dict(type='str', choices=['internet1', 'internet2', 'both']),
+ allowed_inbound=dict(type='list', elements='dict', options=one_to_one_allowed_inbound_spec),
+ )
+
+ one_to_many_spec = dict(public_ip=dict(type='str'),
+ uplink=dict(type='str', choices=['internet1', 'internet2', 'both']),
+ port_rules=dict(type='list', elements='dict', options=one_to_many_port_inbound_spec),
+ )
+
+ port_forwarding_spec = dict(name=dict(type='str'),
+ lan_ip=dict(type='str'),
+ uplink=dict(type='str', choices=['internet1', 'internet2', 'both']),
+ protocol=dict(type='str', choices=['tcp', 'udp']),
+ public_port=dict(type='int'),
+ local_port=dict(type='int'),
+ allowed_ips=dict(type='list', elements='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(
+ net_id=dict(type='str'),
+ net_name=dict(type='str', aliases=['name', 'network']),
+ state=dict(type='str', choices=['present', 'query'], default='present'),
+ subset=dict(type='list', elements='str', choices=['1:1', '1:many', 'all', 'port_forwarding'], default='all'),
+ one_to_one=dict(type='list', elements='dict', options=one_to_one_spec),
+ one_to_many=dict(type='list', elements='dict', options=one_to_many_spec),
+ port_forwarding=dict(type='list', elements='dict', options=port_forwarding_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ meraki = MerakiModule(module, function='nat')
+ module.params['follow_redirects'] = 'all'
+
+ one_to_one_payload = None
+ one_to_many_payload = None
+ port_forwarding_payload = None
+ if meraki.params['state'] == 'present':
+ if meraki.params['one_to_one'] is not None:
+ rules = []
+ for i in meraki.params['one_to_one']:
+ data = {'name': i['name'],
+ 'publicIp': i['public_ip'],
+ 'uplink': i['uplink'],
+ 'lanIp': i['lan_ip'],
+ 'allowedInbound': construct_payload(i['allowed_inbound'])
+ }
+ for inbound in data['allowedInbound']:
+ inbound['destinationPorts'] = list_int_to_str(inbound['destinationPorts'])
+ rules.append(data)
+ one_to_one_payload = {'rules': rules}
+ if meraki.params['one_to_many'] is not None:
+ rules = []
+ for i in meraki.params['one_to_many']:
+ data = {'publicIp': i['public_ip'],
+ 'uplink': i['uplink'],
+ }
+ port_rules = []
+ for port_rule in i['port_rules']:
+ rule = {'name': port_rule['name'],
+ 'protocol': port_rule['protocol'],
+ 'publicPort': str(port_rule['public_port']),
+ 'localIp': port_rule['local_ip'],
+ 'localPort': str(port_rule['local_port']),
+ 'allowedIps': port_rule['allowed_ips'],
+ }
+ port_rules.append(rule)
+ data['portRules'] = port_rules
+ rules.append(data)
+ one_to_many_payload = {'rules': rules}
+ if meraki.params['port_forwarding'] is not None:
+ port_forwarding_payload = {'rules': construct_payload(meraki.params['port_forwarding'])}
+ for rule in port_forwarding_payload['rules']:
+ rule['localPort'] = str(rule['localPort'])
+ rule['publicPort'] = str(rule['publicPort'])
+
+ onetomany_urls = {'nat': '/networks/{net_id}/appliance/firewall/oneToManyNatRules'}
+ onetoone_urls = {'nat': '/networks/{net_id}/appliance/firewall/oneToOneNatRules'}
+ port_forwarding_urls = {'nat': '/networks/{net_id}/appliance/firewall/portForwardingRules'}
+ meraki.url_catalog['1:many'] = onetomany_urls
+ meraki.url_catalog['1:1'] = onetoone_urls
+ meraki.url_catalog['port_forwarding'] = port_forwarding_urls
+
+ if meraki.params['net_name'] and meraki.params['net_id']:
+ meraki.fail_json(msg='net_name and net_id are mutually exclusive')
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ if meraki.params['subset'][0] == 'all':
+ path = meraki.construct_path('1:many', net_id=net_id)
+ data = {'1:many': meraki.request(path, method='GET')}
+ path = meraki.construct_path('1:1', net_id=net_id)
+ data['1:1'] = meraki.request(path, method='GET')
+ path = meraki.construct_path('port_forwarding', net_id=net_id)
+ data['port_forwarding'] = meraki.request(path, method='GET')
+ meraki.result['data'] = data
+ else:
+ for subset in meraki.params['subset']:
+ path = meraki.construct_path(subset, net_id=net_id)
+ data = {subset: meraki.request(path, method='GET')}
+ try:
+ meraki.result['data'][subset] = data
+ except KeyError:
+ meraki.result['data'] = {subset: data}
+ elif meraki.params['state'] == 'present':
+ meraki.result['data'] = dict()
+ if one_to_one_payload is not None:
+ path = meraki.construct_path('1:1', net_id=net_id)
+ current = meraki.request(path, method='GET')
+ if meraki.is_update_required(current, one_to_one_payload):
+ if meraki.module.check_mode is True:
+ diff = recursive_diff(current, one_to_one_payload)
+ current.update(one_to_one_payload)
+ if 'diff' not in meraki.result:
+ meraki.result['diff'] = {'before': {}, 'after': {}}
+ meraki.result['diff']['before'].update({'one_to_one': diff[0]})
+ meraki.result['diff']['after'].update({'one_to_one': diff[1]})
+ meraki.result['data'] = {'one_to_one': current}
+ meraki.result['changed'] = True
+ else:
+ r = meraki.request(path, method='PUT', payload=json.dumps(one_to_one_payload))
+ if meraki.status == 200:
+ diff = recursive_diff(current, one_to_one_payload)
+ if 'diff' not in meraki.result:
+ meraki.result['diff'] = {'before': {}, 'after': {}}
+ meraki.result['diff']['before'].update({'one_to_one': diff[0]})
+ meraki.result['diff']['after'].update({'one_to_one': diff[1]})
+ meraki.result['data'] = {'one_to_one': r}
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data']['one_to_one'] = current
+ if one_to_many_payload is not None:
+ path = meraki.construct_path('1:many', net_id=net_id)
+ current = meraki.request(path, method='GET')
+ if meraki.is_update_required(current, one_to_many_payload):
+ if meraki.module.check_mode is True:
+ diff = recursive_diff(current, one_to_many_payload)
+ current.update(one_to_many_payload)
+ if 'diff' not in meraki.result:
+ meraki.result['diff'] = {'before': {}, 'after': {}}
+ meraki.result['diff']['before'].update({'one_to_many': diff[0]})
+ meraki.result['diff']['after'].update({'one_to_many': diff[1]})
+ meraki.result['data']['one_to_many'] = current
+ meraki.result['changed'] = True
+ else:
+ r = meraki.request(path, method='PUT', payload=json.dumps(one_to_many_payload))
+ if meraki.status == 200:
+ diff = recursive_diff(current, one_to_many_payload)
+ if 'diff' not in meraki.result:
+ meraki.result['diff'] = {'before': {}, 'after': {}}
+ meraki.result['diff']['before'].update({'one_to_many': diff[0]})
+ meraki.result['diff']['after'].update({'one_to_many': diff[1]})
+ meraki.result['data'].update({'one_to_many': r})
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data']['one_to_many'] = current
+ if port_forwarding_payload is not None:
+ path = meraki.construct_path('port_forwarding', net_id=net_id)
+ current = meraki.request(path, method='GET')
+ if meraki.is_update_required(current, port_forwarding_payload):
+ if meraki.module.check_mode is True:
+ diff = recursive_diff(current, port_forwarding_payload)
+ current.update(port_forwarding_payload)
+ if 'diff' not in meraki.result:
+ meraki.result['diff'] = {'before': {}, 'after': {}}
+ meraki.result['diff']['before'].update({'port_forwarding': diff[0]})
+ meraki.result['diff']['after'].update({'port_forwarding': diff[1]})
+ meraki.result['data']['port_forwarding'] = current
+ meraki.result['changed'] = True
+ else:
+ r = meraki.request(path, method='PUT', payload=json.dumps(port_forwarding_payload))
+ if meraki.status == 200:
+ if 'diff' not in meraki.result:
+ meraki.result['diff'] = {'before': {}, 'after': {}}
+ diff = recursive_diff(current, port_forwarding_payload)
+ meraki.result['diff']['before'].update({'port_forwarding': diff[0]})
+ meraki.result['diff']['after'].update({'port_forwarding': diff[1]})
+ meraki.result['data'].update({'port_forwarding': r})
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data']['port_forwarding'] = current
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_site_to_site_firewall.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_site_to_site_firewall.py
new file mode 100644
index 00000000..f81ac3a3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_site_to_site_firewall.py
@@ -0,0 +1,330 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_site_to_site_firewall
+short_description: Manage MX appliance firewall rules for site-to-site VPNs
+version_added: "1.0.0"
+description:
+- Allows for creation, management, and visibility into firewall rules for site-to-site VPNs implemented on Meraki MX firewalls.
+notes:
+- Module assumes a complete list of firewall rules are passed as a parameter.
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: ['present', 'query']
+ default: present
+ type: str
+ rules:
+ description:
+ - List of firewall rules.
+ type: list
+ elements: dict
+ suboptions:
+ policy:
+ description:
+ - Policy to apply if rule is hit.
+ choices: [allow, deny]
+ type: str
+ protocol:
+ description:
+ - Protocol to match against.
+ choices: [any, icmp, tcp, udp]
+ type: str
+ dest_port:
+ description:
+ - Comma separated list of destination port numbers to match against.
+ - C(Any) must be capitalized.
+ type: str
+ dest_cidr:
+ description:
+ - Comma separated list of CIDR notation destination networks.
+ - C(Any) must be capitalized.
+ type: str
+ src_port:
+ description:
+ - Comma separated list of source port numbers to match against.
+ - C(Any) must be capitalized.
+ type: str
+ src_cidr:
+ description:
+ - Comma separated list of CIDR notation source networks.
+ - C(Any) must be capitalized.
+ type: str
+ comment:
+ description:
+ - Optional comment to describe the firewall rule.
+ type: str
+ syslog_enabled:
+ description:
+ - Whether to log hints against the firewall rule.
+ - Only applicable if a syslog server is specified against the network.
+ type: bool
+ default: False
+ syslog_default_rule:
+ description:
+ - Whether to log hits against the default firewall rule.
+ - Only applicable if a syslog server is specified against the network.
+ - This is not shown in response from Meraki. Instead, refer to the C(syslog_enabled) value in the default rule.
+ type: bool
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query firewall rules
+ meraki_mx_site_to_site_firewall:
+ auth_key: abc123
+ org_name: YourOrg
+ state: query
+ delegate_to: localhost
+
+- name: Set two firewall rules
+ meraki_mx_site_to_site_firewall:
+ auth_key: abc123
+ org_name: YourOrg
+ state: present
+ rules:
+ - comment: Block traffic to server
+ src_cidr: 192.0.1.0/24
+ src_port: any
+ dest_cidr: 192.0.2.2/32
+ dest_port: any
+ protocol: any
+ policy: deny
+ - comment: Allow traffic to group of servers
+ src_cidr: 192.0.1.0/24
+ src_port: any
+ dest_cidr: 192.0.2.0/24
+ dest_port: any
+ protocol: any
+ policy: permit
+ delegate_to: localhost
+
+- name: Set one firewall rule and enable logging of the default rule
+ meraki_mx_site_to_site_firewall:
+ auth_key: abc123
+ org_name: YourOrg
+ state: present
+ rules:
+ - comment: Block traffic to server
+ src_cidr: 192.0.1.0/24
+ src_port: any
+ dest_cidr: 192.0.2.2/32
+ dest_port: any
+ protocol: any
+ policy: deny
+ syslog_default_rule: yes
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Firewall rules associated to network.
+ returned: success
+ type: complex
+ contains:
+ rules:
+ description: List of firewall rules associated to network.
+ returned: success
+ type: complex
+ contains:
+ comment:
+ description: Comment to describe the firewall rule.
+ returned: always
+ type: str
+ sample: Block traffic to server
+ src_cidr:
+ description: Comma separated list of CIDR notation source networks.
+ returned: always
+ type: str
+ sample: 192.0.1.1/32,192.0.1.2/32
+ src_port:
+ description: Comma separated list of source ports.
+ returned: always
+ type: str
+ sample: 80,443
+ dest_cidr:
+ description: Comma separated list of CIDR notation destination networks.
+ returned: always
+ type: str
+ sample: 192.0.1.1/32,192.0.1.2/32
+ dest_port:
+ description: Comma separated list of destination ports.
+ returned: always
+ type: str
+ sample: 80,443
+ protocol:
+ description: Network protocol for which to match against.
+ returned: always
+ type: str
+ sample: tcp
+ policy:
+ description: Action to take when rule is matched.
+ returned: always
+ type: str
+ syslog_enabled:
+ description: Whether to log to syslog when rule is matched.
+ returned: always
+ type: bool
+ sample: true
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def assemble_payload(meraki):
+ params_map = {'policy': 'policy',
+ 'protocol': 'protocol',
+ 'dest_port': 'destPort',
+ 'dest_cidr': 'destCidr',
+ 'src_port': 'srcPort',
+ 'src_cidr': 'srcCidr',
+ 'syslog_enabled': 'syslogEnabled',
+ 'comment': 'comment',
+ }
+ rules = []
+ for rule in meraki.params['rules']:
+ proposed_rule = dict()
+ for k, v in rule.items():
+ proposed_rule[params_map[k]] = v
+ rules.append(proposed_rule)
+ payload = {'rules': rules}
+ return payload
+
+
+def get_rules(meraki, org_id):
+ path = meraki.construct_path('get_all', org_id=org_id)
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ return response
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ fw_rules = dict(policy=dict(type='str', choices=['allow', 'deny']),
+ protocol=dict(type='str', choices=['tcp', 'udp', 'icmp', 'any']),
+ dest_port=dict(type='str'),
+ dest_cidr=dict(type='str'),
+ src_port=dict(type='str'),
+ src_cidr=dict(type='str'),
+ comment=dict(type='str'),
+ syslog_enabled=dict(type='bool', default=False),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='present'),
+ rules=dict(type='list', default=None, elements='dict', options=fw_rules),
+ syslog_default_rule=dict(type='bool'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='mx_site_to_site_firewall')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'mx_site_to_site_firewall': '/organizations/{org_id}/appliance/vpn/vpnFirewallRules/'}
+ update_urls = {'mx_site_to_site_firewall': '/organizations/{org_id}/appliance/vpn/vpnFirewallRules/'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['update'] = update_urls
+
+ payload = None
+
+ # execute checks for argument completeness
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ orgs = None
+ if org_id is None:
+ orgs = meraki.get_orgs()
+ for org in orgs:
+ if org['name'] == meraki.params['org_name']:
+ org_id = org['id']
+
+ if meraki.params['state'] == 'query':
+ meraki.result['data'] = get_rules(meraki, org_id)
+ elif meraki.params['state'] == 'present':
+ rules = get_rules(meraki, org_id)
+ path = meraki.construct_path('get_all', org_id=org_id)
+ if meraki.params['rules'] is not None:
+ payload = assemble_payload(meraki)
+ else:
+ payload = dict()
+ update = False
+ if meraki.params['syslog_default_rule'] is not None:
+ payload['syslogDefaultRule'] = meraki.params['syslog_default_rule']
+ try:
+ if meraki.params['rules'] is not None:
+ if len(rules['rules']) - 1 != len(payload['rules']): # Quick and simple check to avoid more processing
+ update = True
+ if meraki.params['syslog_default_rule'] is not None:
+ if rules['rules'][len(rules['rules']) - 1]['syslogEnabled'] != meraki.params['syslog_default_rule']:
+ update = True
+ if update is False:
+ default_rule = rules['rules'][len(rules['rules']) - 1].copy()
+ # meraki.fail_json(msg=update)
+ del rules['rules'][len(rules['rules']) - 1] # Remove default rule for comparison
+ if len(rules['rules']) - 1 == 0:
+ if meraki.is_update_required(rules['rules'][0], payload['rules'][0]) is True:
+ update = True
+ else:
+ for r in range(len(rules) - 1):
+ if meraki.is_update_required(rules['rules'][r], payload['rules'][r]) is True:
+ update = True
+ rules['rules'].append(default_rule)
+ except KeyError:
+ pass
+ if update is True:
+ if meraki.check_mode is True:
+ if meraki.params['rules'] is not None:
+ data = payload
+ data['rules'].append(rules['rules'][len(rules['rules']) - 1]) # Append the default rule
+ if meraki.params['syslog_default_rule'] is not None:
+ data['rules'][len(payload['rules']) - 1]['syslog_enabled'] = meraki.params['syslog_default_rule']
+ else:
+ if meraki.params['syslog_default_rule'] is not None:
+ data = rules
+ data['rules'][len(data['rules']) - 1]['syslogEnabled'] = meraki.params['syslog_default_rule']
+ meraki.result['data'] = data
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = rules
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_site_to_site_vpn.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_site_to_site_vpn.py
new file mode 100644
index 00000000..57a7211d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_site_to_site_vpn.py
@@ -0,0 +1,250 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_site_to_site_vpn
+short_description: Manage AutoVPN connections in Meraki
+version_added: "1.1.0"
+description:
+- Allows for creation, management, and visibility into AutoVPNs implemented on Meraki MX firewalls.
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: ['present', 'query']
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of network which MX firewall is in.
+ type: str
+ net_id:
+ description:
+ - ID of network which MX firewall is in.
+ type: str
+ mode:
+ description:
+ - Set VPN mode for network
+ choices: ['none', 'hub', 'spoke']
+ type: str
+ hubs:
+ description:
+ - List of hubs to assign to a spoke.
+ type: list
+ elements: dict
+ suboptions:
+ hub_id:
+ description:
+ - Network ID of hub
+ type: str
+ use_default_route:
+ description:
+ - Indicates whether deafult troute traffic should be sent to this hub.
+ - Only valid in spoke mode.
+ type: bool
+ subnets:
+ description:
+ - List of subnets to advertise over VPN.
+ type: list
+ elements: dict
+ suboptions:
+ local_subnet:
+ description:
+ - CIDR formatted subnet.
+ type: str
+ use_vpn:
+ description:
+ - Whether to advertise over VPN.
+ type: bool
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Set hub mode
+ meraki_site_to_site_vpn:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: hub_network
+ mode: hub
+ delegate_to: localhost
+ register: set_hub
+
+- name: Set spoke mode
+ meraki_site_to_site_vpn:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: spoke_network
+ mode: spoke
+ hubs:
+ - hub_id: N_1234
+ use_default_route: false
+ delegate_to: localhost
+ register: set_spoke
+
+- name: Query rules for hub
+ meraki_site_to_site_vpn:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: hub_network
+ delegate_to: localhost
+ register: query_all_hub
+'''
+
+RETURN = r'''
+data:
+ description: VPN settings.
+ returned: success
+ type: complex
+ contains:
+ mode:
+ description: Mode assigned to network.
+ returned: always
+ type: str
+ sample: spoke
+ hubs:
+ description: Hub networks to associate to.
+ returned: always
+ type: complex
+ contains:
+ hub_id:
+ description: ID of hub network.
+ returned: always
+ type: complex
+ sample: N_12345
+ use_default_route:
+ description: Whether to send all default route traffic over VPN.
+ returned: always
+ type: bool
+ sample: true
+ subnets:
+ description: List of subnets to advertise over VPN.
+ returned: always
+ type: complex
+ contains:
+ local_subnet:
+ description: CIDR formatted subnet.
+ returned: always
+ type: str
+ sample: 192.168.1.0/24
+ use_vpn:
+ description: Whether subnet should use the VPN.
+ returned: always
+ type: bool
+ sample: true
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+from copy import deepcopy
+
+
+def assemble_payload(meraki):
+ payload = {'mode': meraki.params['mode']}
+ if meraki.params['hubs'] is not None:
+ payload['hubs'] = meraki.params['hubs']
+ for hub in payload['hubs']:
+ hub['hubId'] = hub.pop('hub_id')
+ hub['useDefaultRoute'] = hub.pop('use_default_route')
+ if meraki.params['subnets'] is not None:
+ payload['subnets'] = meraki.params['subnets']
+ for subnet in payload['subnets']:
+ subnet['localSubnet'] = subnet.pop('local_subnet')
+ subnet['useVpn'] = subnet.pop('use_vpn')
+ return payload
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ hubs_args = dict(hub_id=dict(type='str'),
+ use_default_route=dict(type='bool'),
+ )
+ subnets_args = dict(local_subnet=dict(type='str'),
+ use_vpn=dict(type='bool'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='present'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ hubs=dict(type='list', default=None, elements='dict', options=hubs_args),
+ subnets=dict(type='list', default=None, elements='dict', options=subnets_args),
+ mode=dict(type='str', choices=['none', 'hub', 'spoke']),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='site_to_site_vpn')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'site_to_site_vpn': '/networks/{net_id}/appliance/vpn/siteToSiteVpn/'}
+ update_urls = {'site_to_site_vpn': '/networks/{net_id}/appliance/vpn/siteToSiteVpn/'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['update'] = update_urls
+
+ payload = None
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ orgs = meraki.get_orgs()
+ for org in orgs:
+ if org['name'] == meraki.params['org_name']:
+ org_id = org['id']
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'],
+ data=meraki.get_nets(org_id=org_id))
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ payload = assemble_payload(meraki)
+ comparable = deepcopy(original)
+ comparable.update(payload)
+ if meraki.is_update_required(original, payload):
+ path = meraki.construct_path('update', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['changed'] = True
+ meraki.result['data'] = response
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_static_route.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_static_route.py
new file mode 100644
index 00000000..927d4230
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_static_route.py
@@ -0,0 +1,392 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, 2019 Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_static_route
+short_description: Manage static routes in the Meraki cloud
+description:
+- Allows for creation, management, and visibility into static routes within Meraki.
+
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: [ absent, query, present ]
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ name:
+ description:
+ - Descriptive name of the static route.
+ type: str
+ subnet:
+ description:
+ - CIDR notation based subnet for static route.
+ type: str
+ gateway_ip:
+ description:
+ - IP address of the gateway for the subnet.
+ type: str
+ route_id:
+ description:
+ - Unique ID of static route.
+ type: str
+ fixed_ip_assignments:
+ description:
+ - List of fixed MAC to IP bindings for DHCP.
+ type: list
+ elements: dict
+ suboptions:
+ mac:
+ description:
+ - MAC address of endpoint.
+ type: str
+ ip:
+ description:
+ - IP address of endpoint.
+ type: str
+ name:
+ description:
+ - Hostname of endpoint.
+ type: str
+ reserved_ip_ranges:
+ description:
+ - List of IP ranges reserved for static IP assignments.
+ type: list
+ elements: dict
+ suboptions:
+ start:
+ description:
+ - First IP address of reserved range.
+ type: str
+ end:
+ description:
+ - Last IP address of reserved range.
+ type: str
+ comment:
+ description:
+ - Human readable description of reservation range.
+ type: str
+ enabled:
+ description:
+ - Indicates whether static route is enabled within a network.
+ type: bool
+
+
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Create static_route
+ meraki_static_route:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ name: Test Route
+ subnet: 192.0.1.0/24
+ gateway_ip: 192.168.128.1
+ delegate_to: localhost
+
+- name: Update static route with fixed IP assignment
+ meraki_static_route:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ route_id: d6fa4821-1234-4dfa-af6b-ae8b16c20c39
+ fixed_ip_assignments:
+ - mac: aa:bb:cc:dd:ee:ff
+ ip: 192.0.1.11
+ comment: Server
+ delegate_to: localhost
+
+- name: Query static routes
+ meraki_static_route:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ delegate_to: localhost
+
+- name: Delete static routes
+ meraki_static_route:
+ auth_key: abc123
+ state: absent
+ org_name: YourOrg
+ net_name: YourNet
+ route_id: '{{item}}'
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about the created or manipulated object.
+ returned: info
+ type: complex
+ contains:
+ id:
+ description: Unique identification string assigned to each static route.
+ returned: success
+ type: str
+ sample: d6fa4821-1234-4dfa-af6b-ae8b16c20c39
+ net_id:
+ description: Identification string of network.
+ returned: query or update
+ type: str
+ sample: N_12345
+ name:
+ description: Name of static route.
+ returned: success
+ type: str
+ sample: Data Center static route
+ subnet:
+ description: CIDR notation subnet for static route.
+ returned: success
+ type: str
+ sample: 192.0.1.0/24
+ gatewayIp:
+ description: Next hop IP address.
+ returned: success
+ type: str
+ sample: 192.1.1.1
+ enabled:
+ description: Enabled state of static route.
+ returned: query or update
+ type: bool
+ sample: True
+ reservedIpRanges:
+ description: List of IP address ranges which are reserved for static assignment.
+ returned: query or update
+ type: complex
+ contains:
+ start:
+ description: First address in reservation range, inclusive.
+ returned: query or update
+ type: str
+ sample: 192.0.1.2
+ end:
+ description: Last address in reservation range, inclusive.
+ returned: query or update
+ type: str
+ sample: 192.0.1.10
+ comment:
+ description: Human readable description of range.
+ returned: query or update
+ type: str
+ sample: Server range
+ fixedIpAssignments:
+ description: List of static MAC to IP address bindings.
+ returned: query or update
+ type: complex
+ contains:
+ mac:
+ description: Key is MAC address of endpoint.
+ returned: query or update
+ type: complex
+ contains:
+ ip:
+ description: IP address to be bound to the endpoint.
+ returned: query or update
+ type: str
+ sample: 192.0.1.11
+ name:
+ description: Hostname given to the endpoint.
+ returned: query or update
+ type: str
+ sample: JimLaptop
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def fixed_ip_factory(meraki, data):
+ fixed_ips = dict()
+ for item in data:
+ fixed_ips[item['mac']] = {'ip': item['ip'], 'name': item['name']}
+ return fixed_ips
+
+
+def get_static_routes(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ r = meraki.request(path, method='GET')
+ return r
+
+
+def get_static_route(meraki, net_id, route_id):
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'route_id': route_id})
+ r = meraki.request(path, method='GET')
+ return r
+
+
+def does_route_exist(name, routes):
+ for route in routes:
+ if name == route['name']:
+ return route
+ return None
+
+
+def update_dict(original, proposed):
+ for k, v in proposed.items():
+ if v is not None:
+ original[k] = v
+ return original
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ fixed_ip_arg_spec = dict(mac=dict(type='str'),
+ ip=dict(type='str'),
+ name=dict(type='str'),
+ )
+
+ reserved_ip_arg_spec = dict(start=dict(type='str'),
+ end=dict(type='str'),
+ comment=dict(type='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(
+ net_id=dict(type='str'),
+ net_name=dict(type='str'),
+ name=dict(type='str'),
+ subnet=dict(type='str'),
+ gateway_ip=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ fixed_ip_assignments=dict(type='list', elements='dict', options=fixed_ip_arg_spec),
+ reserved_ip_ranges=dict(type='list', elements='dict', options=reserved_ip_arg_spec),
+ route_id=dict(type='str'),
+ enabled=dict(type='bool'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ meraki = MerakiModule(module, function='static_route')
+ module.params['follow_redirects'] = 'all'
+ payload = None
+
+ query_urls = {'static_route': '/networks/{net_id}/appliance/staticRoutes'}
+ query_one_urls = {'static_route': '/networks/{net_id}/appliance/staticRoutes/{route_id}'}
+ create_urls = {'static_route': '/networks/{net_id}/appliance/staticRoutes/'}
+ update_urls = {'static_route': '/networks/{net_id}/appliance/staticRoutes/{route_id}'}
+ delete_urls = {'static_route': '/networks/{net_id}/appliance/staticRoutes/{route_id}'}
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_one'].update(query_one_urls)
+ meraki.url_catalog['create'] = create_urls
+ meraki.url_catalog['update'] = update_urls
+ meraki.url_catalog['delete'] = delete_urls
+
+ if not meraki.params['org_name'] and not meraki.params['org_id']:
+ meraki.fail_json(msg="Parameters 'org_name' or 'org_id' parameters are required")
+ if not meraki.params['net_name'] and not meraki.params['net_id']:
+ meraki.fail_json(msg="Parameters 'net_name' or 'net_id' parameters are required")
+ if meraki.params['net_name'] and meraki.params['net_id']:
+ meraki.fail_json(msg="'net_name' and 'net_id' are mutually exclusive")
+
+ # Construct payload
+ if meraki.params['state'] == 'present':
+ payload = dict()
+ if meraki.params['net_name']:
+ payload['name'] = meraki.params['net_name']
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ if meraki.params['route_id'] is not None:
+ meraki.result['data'] = get_static_route(meraki, net_id, meraki.params['route_id'])
+ else:
+ meraki.result['data'] = get_static_routes(meraki, net_id)
+ elif meraki.params['state'] == 'present':
+ payload = {'name': meraki.params['name'],
+ 'subnet': meraki.params['subnet'],
+ 'gatewayIp': meraki.params['gateway_ip'],
+ }
+ if meraki.params['fixed_ip_assignments'] is not None:
+ payload['fixedIpAssignments'] = fixed_ip_factory(meraki,
+ meraki.params['fixed_ip_assignments'])
+ if meraki.params['reserved_ip_ranges'] is not None:
+ payload['reservedIpRanges'] = meraki.params['reserved_ip_ranges']
+ if meraki.params['enabled'] is not None:
+ payload['enabled'] = meraki.params['enabled']
+
+ route_id = meraki.params['route_id']
+ if meraki.params['name'] is not None and route_id is None:
+ route_status = does_route_exist(meraki.params['name'], get_static_routes(meraki, net_id))
+ if route_status is not None: # Route exists, assign route_id
+ route_id = route_status['id']
+
+ if route_id is not None:
+ existing_route = get_static_route(meraki, net_id, route_id)
+ original = existing_route.copy()
+ payload = update_dict(existing_route, payload)
+ if module.check_mode:
+ meraki.result['data'] = payload
+ meraki.exit_json(**meraki.result)
+ if meraki.is_update_required(original, payload, optional_ignore=['id']):
+ path = meraki.construct_path('update', net_id=net_id, custom={'route_id': route_id})
+ meraki.result['data'] = meraki.request(path, method="PUT", payload=json.dumps(payload))
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ else:
+ if module.check_mode:
+ meraki.result['data'] = payload
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('create', net_id=net_id)
+ meraki.result['data'] = meraki.request(path, method="POST", payload=json.dumps(payload))
+ meraki.result['changed'] = True
+ elif meraki.params['state'] == 'absent':
+ if module.check_mode:
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('delete', net_id=net_id, custom={'route_id': meraki.params['route_id']})
+ meraki.result['data'] = meraki.request(path, method='DELETE')
+ meraki.result['changed'] = True
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_uplink.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_uplink.py
new file mode 100644
index 00000000..fd66fc9b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_uplink.py
@@ -0,0 +1,325 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_uplink_bandwidth
+short_description: Manage uplinks on Meraki MX appliances
+version_added: "1.1.0"
+description:
+- Configure and query information about uplinks on Meraki MX appliances.
+notes:
+- Some of the options are likely only used for developers within Meraki.
+- Module was formerly named M(meraki_mx_uplink).
+options:
+ state:
+ description:
+ - Specifies whether object should be queried, created/modified, or removed.
+ choices: [absent, present, query]
+ default: query
+ type: str
+ org_name:
+ description:
+ - Name of organization associated to a network.
+ type: str
+ org_id:
+ description:
+ - ID of organization associated to a network.
+ type: str
+ net_name:
+ description:
+ - Name of network which VLAN is in or should be in.
+ aliases: [network]
+ type: str
+ net_id:
+ description:
+ - ID of network which VLAN is in or should be in.
+ type: str
+ wan1:
+ description:
+ - Configuration of WAN1 uplink
+ type: dict
+ suboptions:
+ bandwidth_limits:
+ description:
+ - Structure for configuring bandwidth limits
+ type: dict
+ suboptions:
+ limit_up:
+ description:
+ - Maximum upload speed for interface
+ type: int
+ limit_down:
+ description:
+ - Maximum download speed for interface
+ type: int
+ wan2:
+ description:
+ - Configuration of WAN2 uplink
+ type: dict
+ suboptions:
+ bandwidth_limits:
+ description:
+ - Structure for configuring bandwidth limits
+ type: dict
+ suboptions:
+ limit_up:
+ description:
+ - Maximum upload speed for interface
+ type: int
+ limit_down:
+ description:
+ - Maximum download speed for interface
+ type: int
+ cellular:
+ description:
+ - Configuration of cellular uplink
+ type: dict
+ suboptions:
+ bandwidth_limits:
+ description:
+ - Structure for configuring bandwidth limits
+ type: dict
+ suboptions:
+ limit_up:
+ description:
+ - Maximum upload speed for interface
+ type: int
+ limit_down:
+ description:
+ - Maximum download speed for interface
+ type: int
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Set MX uplink settings
+ meraki_mx_uplink_bandwidth:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Uplink'
+ wan1:
+ bandwidth_limits:
+ limit_down: 1000000
+ limit_up: 1000
+ cellular:
+ bandwidth_limits:
+ limit_down: 0
+ limit_up: 0
+ delegate_to: localhost
+
+- name: Query MX uplink settings
+ meraki_mx_uplink_bandwidth:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Uplink'
+ delegate_to: localhost
+
+'''
+
+RETURN = r'''
+
+data:
+ description: Information about the organization which was created or modified
+ returned: success
+ type: complex
+ contains:
+ wan1:
+ description: WAN1 interface
+ returned: success
+ type: complex
+ contains:
+ bandwidth_limits:
+ description: Structure for uplink bandwidth limits
+ returned: success
+ type: complex
+ contains:
+ limit_up:
+ description: Upload bandwidth limit
+ returned: success
+ type: int
+ limit_down:
+ description: Download bandwidth limit
+ returned: success
+ type: int
+ wan2:
+ description: WAN2 interface
+ returned: success
+ type: complex
+ contains:
+ bandwidth_limits:
+ description: Structure for uplink bandwidth limits
+ returned: success
+ type: complex
+ contains:
+ limit_up:
+ description: Upload bandwidth limit
+ returned: success
+ type: int
+ limit_down:
+ description: Download bandwidth limit
+ returned: success
+ type: int
+ cellular:
+ description: cellular interface
+ returned: success
+ type: complex
+ contains:
+ bandwidth_limits:
+ description: Structure for uplink bandwidth limits
+ returned: success
+ type: complex
+ contains:
+ limit_up:
+ description: Upload bandwidth limit
+ returned: success
+ type: int
+ limit_down:
+ description: Download bandwidth limit
+ returned: success
+ type: int
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import recursive_diff
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+INT_NAMES = ('wan1', 'wan2', 'cellular')
+
+
+def clean_custom_format(data):
+ for interface in data:
+ if data[interface]['bandwidth_limits']['limit_up'] is None:
+ data[interface]['bandwidth_limits']['limit_up'] = 0
+ if data[interface]['bandwidth_limits']['limit_down'] is None:
+ data[interface]['bandwidth_limits']['limit_down'] = 0
+ return data
+
+
+def meraki_struct_to_custom_format(data):
+ new_struct = {}
+ for interface in INT_NAMES:
+ if interface in data['bandwidthLimits']:
+ new_struct[interface] = {'bandwidth_limits': {'limit_up': data['bandwidthLimits'][interface]['limitUp'],
+ 'limit_down': data['bandwidthLimits'][interface]['limitDown'],
+ }
+ }
+ # return snake_dict_to_camel_dict(new_struct)
+ return new_struct
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ bandwidth_arg_spec = dict(limit_up=dict(type='int'),
+ limit_down=dict(type='int'),
+ )
+
+ interface_arg_spec = dict(bandwidth_limits=dict(type='dict', default=None, options=bandwidth_arg_spec),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='query'),
+ net_name=dict(type='str', aliases=['network']),
+ net_id=dict(type='str'),
+ wan1=dict(type='dict', default=None, options=interface_arg_spec),
+ wan2=dict(type='dict', default=None, options=interface_arg_spec),
+ cellular=dict(type='dict', default=None, options=interface_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='mx_uplink')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'mx_uplink': '/networks/{net_id}/appliance/trafficShaping/uplinkBandwidth'}
+ update_bw_url = {'mx_uplink': '/networks/{net_id}/appliance/trafficShaping/uplinkBandwidth'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['update_bw'] = update_bw_url
+
+ payload = dict()
+
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ data = clean_custom_format(meraki_struct_to_custom_format(response))
+ meraki.result['data'] = data
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ payload = {'bandwidthLimits': {}}
+ for interface in INT_NAMES:
+ if meraki.params[interface] is not None:
+ if meraki.params[interface]['bandwidth_limits'] is not None:
+ payload['bandwidthLimits'][interface] = None
+ payload['bandwidthLimits'][interface] = {'limitUp': meraki.params[interface]['bandwidth_limits']['limit_up'],
+ 'limitDown': meraki.params[interface]['bandwidth_limits']['limit_down'],
+ }
+ if payload['bandwidthLimits'][interface]['limitUp'] == 0:
+ payload['bandwidthLimits'][interface]['limitUp'] = None
+ if payload['bandwidthLimits'][interface]['limitDown'] == 0:
+ payload['bandwidthLimits'][interface]['limitDown'] = None
+ if meraki.is_update_required(original, payload):
+ if meraki.module.check_mode is True:
+ diff = recursive_diff(clean_custom_format(meraki_struct_to_custom_format(original)),
+ clean_custom_format(meraki_struct_to_custom_format(payload)))
+ original.update(payload)
+ meraki.result['data'] = clean_custom_format(meraki_struct_to_custom_format(original))
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1],
+ }
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update_bw', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ formatted_original = clean_custom_format(meraki_struct_to_custom_format(original))
+ formatted_response = clean_custom_format(meraki_struct_to_custom_format(response))
+ diff = recursive_diff(formatted_original, formatted_response)
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1],
+ }
+ meraki.result['data'] = formatted_response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = clean_custom_format(meraki_struct_to_custom_format(original))
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_uplink_bandwidth.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_uplink_bandwidth.py
new file mode 100644
index 00000000..fd66fc9b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_uplink_bandwidth.py
@@ -0,0 +1,325 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_uplink_bandwidth
+short_description: Manage uplinks on Meraki MX appliances
+version_added: "1.1.0"
+description:
+- Configure and query information about uplinks on Meraki MX appliances.
+notes:
+- Some of the options are likely only used for developers within Meraki.
+- Module was formerly named M(meraki_mx_uplink).
+options:
+ state:
+ description:
+ - Specifies whether object should be queried, created/modified, or removed.
+ choices: [absent, present, query]
+ default: query
+ type: str
+ org_name:
+ description:
+ - Name of organization associated to a network.
+ type: str
+ org_id:
+ description:
+ - ID of organization associated to a network.
+ type: str
+ net_name:
+ description:
+ - Name of network which VLAN is in or should be in.
+ aliases: [network]
+ type: str
+ net_id:
+ description:
+ - ID of network which VLAN is in or should be in.
+ type: str
+ wan1:
+ description:
+ - Configuration of WAN1 uplink
+ type: dict
+ suboptions:
+ bandwidth_limits:
+ description:
+ - Structure for configuring bandwidth limits
+ type: dict
+ suboptions:
+ limit_up:
+ description:
+ - Maximum upload speed for interface
+ type: int
+ limit_down:
+ description:
+ - Maximum download speed for interface
+ type: int
+ wan2:
+ description:
+ - Configuration of WAN2 uplink
+ type: dict
+ suboptions:
+ bandwidth_limits:
+ description:
+ - Structure for configuring bandwidth limits
+ type: dict
+ suboptions:
+ limit_up:
+ description:
+ - Maximum upload speed for interface
+ type: int
+ limit_down:
+ description:
+ - Maximum download speed for interface
+ type: int
+ cellular:
+ description:
+ - Configuration of cellular uplink
+ type: dict
+ suboptions:
+ bandwidth_limits:
+ description:
+ - Structure for configuring bandwidth limits
+ type: dict
+ suboptions:
+ limit_up:
+ description:
+ - Maximum upload speed for interface
+ type: int
+ limit_down:
+ description:
+ - Maximum download speed for interface
+ type: int
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Set MX uplink settings
+ meraki_mx_uplink_bandwidth:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Uplink'
+ wan1:
+ bandwidth_limits:
+ limit_down: 1000000
+ limit_up: 1000
+ cellular:
+ bandwidth_limits:
+ limit_down: 0
+ limit_up: 0
+ delegate_to: localhost
+
+- name: Query MX uplink settings
+ meraki_mx_uplink_bandwidth:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Uplink'
+ delegate_to: localhost
+
+'''
+
+RETURN = r'''
+
+data:
+ description: Information about the organization which was created or modified
+ returned: success
+ type: complex
+ contains:
+ wan1:
+ description: WAN1 interface
+ returned: success
+ type: complex
+ contains:
+ bandwidth_limits:
+ description: Structure for uplink bandwidth limits
+ returned: success
+ type: complex
+ contains:
+ limit_up:
+ description: Upload bandwidth limit
+ returned: success
+ type: int
+ limit_down:
+ description: Download bandwidth limit
+ returned: success
+ type: int
+ wan2:
+ description: WAN2 interface
+ returned: success
+ type: complex
+ contains:
+ bandwidth_limits:
+ description: Structure for uplink bandwidth limits
+ returned: success
+ type: complex
+ contains:
+ limit_up:
+ description: Upload bandwidth limit
+ returned: success
+ type: int
+ limit_down:
+ description: Download bandwidth limit
+ returned: success
+ type: int
+ cellular:
+ description: cellular interface
+ returned: success
+ type: complex
+ contains:
+ bandwidth_limits:
+ description: Structure for uplink bandwidth limits
+ returned: success
+ type: complex
+ contains:
+ limit_up:
+ description: Upload bandwidth limit
+ returned: success
+ type: int
+ limit_down:
+ description: Download bandwidth limit
+ returned: success
+ type: int
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import recursive_diff
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+INT_NAMES = ('wan1', 'wan2', 'cellular')
+
+
+def clean_custom_format(data):
+ for interface in data:
+ if data[interface]['bandwidth_limits']['limit_up'] is None:
+ data[interface]['bandwidth_limits']['limit_up'] = 0
+ if data[interface]['bandwidth_limits']['limit_down'] is None:
+ data[interface]['bandwidth_limits']['limit_down'] = 0
+ return data
+
+
+def meraki_struct_to_custom_format(data):
+ new_struct = {}
+ for interface in INT_NAMES:
+ if interface in data['bandwidthLimits']:
+ new_struct[interface] = {'bandwidth_limits': {'limit_up': data['bandwidthLimits'][interface]['limitUp'],
+ 'limit_down': data['bandwidthLimits'][interface]['limitDown'],
+ }
+ }
+ # return snake_dict_to_camel_dict(new_struct)
+ return new_struct
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ bandwidth_arg_spec = dict(limit_up=dict(type='int'),
+ limit_down=dict(type='int'),
+ )
+
+ interface_arg_spec = dict(bandwidth_limits=dict(type='dict', default=None, options=bandwidth_arg_spec),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='query'),
+ net_name=dict(type='str', aliases=['network']),
+ net_id=dict(type='str'),
+ wan1=dict(type='dict', default=None, options=interface_arg_spec),
+ wan2=dict(type='dict', default=None, options=interface_arg_spec),
+ cellular=dict(type='dict', default=None, options=interface_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='mx_uplink')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'mx_uplink': '/networks/{net_id}/appliance/trafficShaping/uplinkBandwidth'}
+ update_bw_url = {'mx_uplink': '/networks/{net_id}/appliance/trafficShaping/uplinkBandwidth'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['update_bw'] = update_bw_url
+
+ payload = dict()
+
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ data = clean_custom_format(meraki_struct_to_custom_format(response))
+ meraki.result['data'] = data
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ payload = {'bandwidthLimits': {}}
+ for interface in INT_NAMES:
+ if meraki.params[interface] is not None:
+ if meraki.params[interface]['bandwidth_limits'] is not None:
+ payload['bandwidthLimits'][interface] = None
+ payload['bandwidthLimits'][interface] = {'limitUp': meraki.params[interface]['bandwidth_limits']['limit_up'],
+ 'limitDown': meraki.params[interface]['bandwidth_limits']['limit_down'],
+ }
+ if payload['bandwidthLimits'][interface]['limitUp'] == 0:
+ payload['bandwidthLimits'][interface]['limitUp'] = None
+ if payload['bandwidthLimits'][interface]['limitDown'] == 0:
+ payload['bandwidthLimits'][interface]['limitDown'] = None
+ if meraki.is_update_required(original, payload):
+ if meraki.module.check_mode is True:
+ diff = recursive_diff(clean_custom_format(meraki_struct_to_custom_format(original)),
+ clean_custom_format(meraki_struct_to_custom_format(payload)))
+ original.update(payload)
+ meraki.result['data'] = clean_custom_format(meraki_struct_to_custom_format(original))
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1],
+ }
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update_bw', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ formatted_original = clean_custom_format(meraki_struct_to_custom_format(original))
+ formatted_response = clean_custom_format(meraki_struct_to_custom_format(response))
+ diff = recursive_diff(formatted_original, formatted_response)
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1],
+ }
+ meraki.result['data'] = formatted_response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = clean_custom_format(meraki_struct_to_custom_format(original))
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_vlan.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_vlan.py
new file mode 100644
index 00000000..92a608fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_mx_vlan.py
@@ -0,0 +1,583 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_vlan
+short_description: Manage VLANs in the Meraki cloud
+description:
+- Create, edit, query, or delete VLANs in a Meraki environment.
+notes:
+- Meraki's API will return an error if VLANs aren't enabled on a network. VLANs are returned properly if VLANs are enabled on a network.
+- Some of the options are likely only used for developers within Meraki.
+- Meraki's API defaults to networks having VLAN support disabled and there is no way to enable VLANs support in the API. VLAN support must be enabled manually.
+options:
+ state:
+ description:
+ - Specifies whether object should be queried, created/modified, or removed.
+ choices: [absent, present, query]
+ default: query
+ type: str
+ net_name:
+ description:
+ - Name of network which VLAN is in or should be in.
+ aliases: [network]
+ type: str
+ net_id:
+ description:
+ - ID of network which VLAN is in or should be in.
+ type: str
+ vlan_id:
+ description:
+ - ID number of VLAN.
+ - ID should be between 1-4096.
+ type: int
+ name:
+ description:
+ - Name of VLAN.
+ aliases: [vlan_name]
+ type: str
+ subnet:
+ description:
+ - CIDR notation of network subnet.
+ type: str
+ appliance_ip:
+ description:
+ - IP address of appliance.
+ - Address must be within subnet specified in C(subnet) parameter.
+ type: str
+ dns_nameservers:
+ description:
+ - Semi-colon delimited list of DNS IP addresses.
+ - Specify one of the following options for preprogrammed DNS entries opendns, google_dns, upstream_dns
+ type: str
+ reserved_ip_range:
+ description:
+ - IP address ranges which should be reserve and not distributed via DHCP.
+ type: list
+ elements: dict
+ suboptions:
+ start:
+ description: First IP address of reserved IP address range, inclusive.
+ type: str
+ end:
+ description: Last IP address of reserved IP address range, inclusive.
+ type: str
+ comment:
+ description: Description of IP addresses reservation
+ type: str
+ vpn_nat_subnet:
+ description:
+ - The translated VPN subnet if VPN and VPN subnet translation are enabled on the VLAN.
+ type: str
+ fixed_ip_assignments:
+ description:
+ - Static IP address assignments to be distributed via DHCP by MAC address.
+ type: list
+ elements: dict
+ suboptions:
+ mac:
+ description: MAC address for fixed IP assignment binding.
+ type: str
+ ip:
+ description: IP address for fixed IP assignment binding.
+ type: str
+ name:
+ description: Descriptive name of IP assignment binding.
+ type: str
+ dhcp_handling:
+ description:
+ - How to handle DHCP packets on network.
+ type: str
+ choices: ['Run a DHCP server',
+ 'Relay DHCP to another server',
+ 'Do not respond to DHCP requests',
+ 'none',
+ 'server',
+ 'relay']
+ dhcp_relay_server_ips:
+ description:
+ - IP addresses to forward DHCP packets to.
+ type: list
+ elements: str
+ dhcp_lease_time:
+ description:
+ - DHCP lease timer setting
+ type: str
+ choices: ['30 minutes',
+ '1 hour',
+ '4 hours',
+ '12 hours',
+ '1 day',
+ '1 week']
+ dhcp_boot_options_enabled:
+ description:
+ - Enable DHCP boot options
+ type: bool
+ dhcp_boot_next_server:
+ description:
+ - DHCP boot option to direct boot clients to the server to load boot file from.
+ type: str
+ dhcp_boot_filename:
+ description:
+ - Filename to boot from for DHCP boot
+ type: str
+ dhcp_options:
+ description:
+ - List of DHCP option values
+ type: list
+ elements: dict
+ suboptions:
+ code:
+ description:
+ - DHCP option number.
+ type: int
+ type:
+ description:
+ - Type of value for DHCP option.
+ type: str
+ choices: ['text', 'ip', 'hex', 'integer']
+ value:
+ description:
+ - Value for DHCP option.
+ type: str
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query all VLANs in a network.
+ meraki_vlan:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ delegate_to: localhost
+
+- name: Query information about a single VLAN by ID.
+ meraki_vlan:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ vlan_id: 2
+ state: query
+ delegate_to: localhost
+
+- name: Create a VLAN.
+ meraki_vlan:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.0.1.0/24
+ appliance_ip: 192.0.1.1
+ delegate_to: localhost
+
+- name: Update a VLAN.
+ meraki_vlan:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.0.1.0/24
+ appliance_ip: 192.168.250.2
+ fixed_ip_assignments:
+ - mac: "13:37:de:ad:be:ef"
+ ip: 192.168.250.10
+ name: fixed_ip
+ reserved_ip_range:
+ - start: 192.168.250.10
+ end: 192.168.250.20
+ comment: reserved_range
+ dns_nameservers: opendns
+ delegate_to: localhost
+
+- name: Enable DHCP on VLAN with options
+ meraki_vlan:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ dhcp_handling: server
+ dhcp_lease_time: 1 hour
+ dhcp_boot_options_enabled: false
+ dhcp_options:
+ - code: 5
+ type: ip
+ value: 192.0.1.1
+ delegate_to: localhost
+
+- name: Delete a VLAN.
+ meraki_vlan:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ state: absent
+ vlan_id: 2
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+
+response:
+ description: Information about the organization which was created or modified
+ returned: success
+ type: complex
+ contains:
+ appliance_ip:
+ description: IP address of Meraki appliance in the VLAN
+ returned: success
+ type: str
+ sample: 192.0.1.1
+ dnsnamservers:
+ description: IP address or Meraki defined DNS servers which VLAN should use by default
+ returned: success
+ type: str
+ sample: upstream_dns
+ fixed_ip_assignments:
+ description: List of MAC addresses which have IP addresses assigned.
+ returned: success
+ type: complex
+ contains:
+ macaddress:
+ description: MAC address which has IP address assigned to it. Key value is the actual MAC address.
+ returned: success
+ type: complex
+ contains:
+ ip:
+ description: IP address which is assigned to the MAC address.
+ returned: success
+ type: str
+ sample: 192.0.1.4
+ name:
+ description: Descriptive name for binding.
+ returned: success
+ type: str
+ sample: fixed_ip
+ reserved_ip_ranges:
+ description: List of IP address ranges which are reserved for static assignment.
+ returned: success
+ type: complex
+ contains:
+ comment:
+ description: Description for IP address reservation.
+ returned: success
+ type: str
+ sample: reserved_range
+ end:
+ description: Last IP address in reservation range.
+ returned: success
+ type: str
+ sample: 192.0.1.10
+ start:
+ description: First IP address in reservation range.
+ returned: success
+ type: str
+ sample: 192.0.1.5
+ id:
+ description: VLAN ID number.
+ returned: success
+ type: int
+ sample: 2
+ name:
+ description: Descriptive name of VLAN.
+ returned: success
+ type: str
+ sample: TestVLAN
+ networkId:
+ description: ID number of Meraki network which VLAN is associated to.
+ returned: success
+ type: str
+ sample: N_12345
+ subnet:
+ description: CIDR notation IP subnet of VLAN.
+ returned: success
+ type: str
+ sample: "192.0.1.0/24"
+ dhcp_handling:
+ description: Status of DHCP server on VLAN.
+ returned: success
+ type: str
+ sample: Run a DHCP server
+ dhcp_lease_time:
+ description: DHCP lease time when server is active.
+ returned: success
+ type: str
+ sample: 1 day
+ dhcp_boot_options_enabled:
+ description: Whether DHCP boot options are enabled.
+ returned: success
+ type: bool
+ sample: no
+ dhcp_boot_next_server:
+ description: DHCP boot option to direct boot clients to the server to load the boot file from.
+ returned: success
+ type: str
+ sample: 192.0.1.2
+ dhcp_boot_filename:
+ description: Filename for boot file.
+ returned: success
+ type: str
+ sample: boot.txt
+ dhcp_options:
+ description: DHCP options.
+ returned: success
+ type: complex
+ contains:
+ code:
+ description:
+ - Code for DHCP option.
+ - Integer between 2 and 254.
+ returned: success
+ type: int
+ sample: 43
+ type:
+ description:
+ - Type for DHCP option.
+ - Choices are C(text), C(ip), C(hex), C(integer).
+ returned: success
+ type: str
+ sample: text
+ value:
+ description: Value for the DHCP option.
+ returned: success
+ type: str
+ sample: 192.0.1.2
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+import json
+
+
+def fixed_ip_factory(meraki, data):
+ fixed_ips = dict()
+ for item in data:
+ fixed_ips[item['mac']] = {'ip': item['ip'], 'name': item['name']}
+ return fixed_ips
+
+
+def get_vlans(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ return meraki.request(path, method='GET')
+
+
+# TODO: Allow method to return actual item if True to reduce number of calls needed
+def is_vlan_valid(meraki, net_id, vlan_id):
+ vlans = get_vlans(meraki, net_id)
+ for vlan in vlans:
+ if vlan_id == vlan['id']:
+ return True
+ return False
+
+
+def construct_payload(meraki):
+ payload = {'id': meraki.params['vlan_id'],
+ 'name': meraki.params['name'],
+ 'subnet': meraki.params['subnet'],
+ 'applianceIp': meraki.params['appliance_ip'],
+ }
+ if meraki.params['dns_nameservers']:
+ if meraki.params['dns_nameservers'] not in ('opendns', 'google_dns', 'upstream_dns'):
+ payload['dnsNameservers'] = format_dns(meraki.params['dns_nameservers'])
+ else:
+ payload['dnsNameservers'] = meraki.params['dns_nameservers']
+ if meraki.params['fixed_ip_assignments']:
+ payload['fixedIpAssignments'] = fixed_ip_factory(meraki, meraki.params['fixed_ip_assignments'])
+ if meraki.params['reserved_ip_range']:
+ payload['reservedIpRanges'] = meraki.params['reserved_ip_range']
+ if meraki.params['vpn_nat_subnet']:
+ payload['vpnNatSubnet'] = meraki.params['vpn_nat_subnet']
+ if meraki.params['dhcp_handling']:
+ payload['dhcpHandling'] = normalize_dhcp_handling(meraki.params['dhcp_handling'])
+ if meraki.params['dhcp_relay_server_ips']:
+ payload['dhcpRelayServerIps'] = meraki.params['dhcp_relay_server_ips']
+ if meraki.params['dhcp_lease_time']:
+ payload['dhcpLeaseTime'] = meraki.params['dhcp_lease_time']
+ if meraki.params['dhcp_boot_next_server']:
+ payload['dhcpBootNextServer'] = meraki.params['dhcp_boot_next_server']
+ if meraki.params['dhcp_boot_filename']:
+ payload['dhcpBootFilename'] = meraki.params['dhcp_boot_filename']
+ if meraki.params['dhcp_options']:
+ payload['dhcpOptions'] = meraki.params['dhcp_options']
+ # if meraki.params['dhcp_handling']:
+ # meraki.fail_json(payload)
+
+ return payload
+
+
+def format_dns(nameservers):
+ return nameservers.replace(';', '\n')
+
+
+def normalize_dhcp_handling(parameter):
+ if parameter == 'none':
+ return 'Do not respond to DHCP requests'
+ elif parameter == 'server':
+ return 'Run a DHCP server'
+ elif parameter == 'relay':
+ return 'Relay DHCP to another server'
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ fixed_ip_arg_spec = dict(mac=dict(type='str'),
+ ip=dict(type='str'),
+ name=dict(type='str'),
+ )
+
+ reserved_ip_arg_spec = dict(start=dict(type='str'),
+ end=dict(type='str'),
+ comment=dict(type='str'),
+ )
+
+ dhcp_options_arg_spec = dict(code=dict(type='int'),
+ type=dict(type='str', choices=['text', 'ip', 'hex', 'integer']),
+ value=dict(type='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='query'),
+ net_name=dict(type='str', aliases=['network']),
+ net_id=dict(type='str'),
+ vlan_id=dict(type='int'),
+ name=dict(type='str', aliases=['vlan_name']),
+ subnet=dict(type='str'),
+ appliance_ip=dict(type='str'),
+ fixed_ip_assignments=dict(type='list', default=None, elements='dict', options=fixed_ip_arg_spec),
+ reserved_ip_range=dict(type='list', default=None, elements='dict', options=reserved_ip_arg_spec),
+ vpn_nat_subnet=dict(type='str'),
+ dns_nameservers=dict(type='str'),
+ dhcp_handling=dict(type='str', choices=['Run a DHCP server',
+ 'Relay DHCP to another server',
+ 'Do not respond to DHCP requests',
+ 'none',
+ 'server',
+ 'relay'],
+ ),
+ dhcp_relay_server_ips=dict(type='list', default=None, elements='str'),
+ dhcp_lease_time=dict(type='str', choices=['30 minutes',
+ '1 hour',
+ '4 hours',
+ '12 hours',
+ '1 day',
+ '1 week']),
+ dhcp_boot_options_enabled=dict(type='bool'),
+ dhcp_boot_next_server=dict(type='str'),
+ dhcp_boot_filename=dict(type='str'),
+ dhcp_options=dict(type='list', default=None, elements='dict', options=dhcp_options_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='vlan')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'vlan': '/networks/{net_id}/appliance/vlans'}
+ query_url = {'vlan': '/networks/{net_id}/appliance/vlans/{vlan_id}'}
+ create_url = {'vlan': '/networks/{net_id}/appliance/vlans'}
+ update_url = {'vlan': '/networks/{net_id}/appliance/vlans/'}
+ delete_url = {'vlan': '/networks/{net_id}/appliance/vlans/'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_one'].update(query_url)
+ meraki.url_catalog['create'] = create_url
+ meraki.url_catalog['update'] = update_url
+ meraki.url_catalog['delete'] = delete_url
+
+ payload = None
+
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ if not meraki.params['vlan_id']:
+ meraki.result['data'] = get_vlans(meraki, net_id)
+ else:
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'vlan_id': meraki.params['vlan_id']})
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ elif meraki.params['state'] == 'present':
+ payload = construct_payload(meraki)
+ if is_vlan_valid(meraki, net_id, meraki.params['vlan_id']) is False: # Create new VLAN
+ if meraki.module.check_mode is True:
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('create', net_id=net_id)
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ meraki.result['changed'] = True
+ meraki.result['data'] = response
+ else: # Update existing VLAN
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'vlan_id': meraki.params['vlan_id']})
+ original = meraki.request(path, method='GET')
+ ignored = ['networkId']
+ if meraki.is_update_required(original, payload, optional_ignore=ignored):
+ meraki.generate_diff(original, payload)
+ if meraki.module.check_mode is True:
+ original.update(payload)
+ meraki.result['changed'] = True
+ meraki.result['data'] = original
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id) + str(meraki.params['vlan_id'])
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['changed'] = True
+ meraki.result['data'] = response
+ meraki.generate_diff(original, response)
+ else:
+ if meraki.module.check_mode is True:
+ meraki.result['data'] = original
+ meraki.exit_json(**meraki.result)
+ meraki.result['data'] = original
+ elif meraki.params['state'] == 'absent':
+ if is_vlan_valid(meraki, net_id, meraki.params['vlan_id']):
+ if meraki.module.check_mode is True:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('delete', net_id=net_id) + str(meraki.params['vlan_id'])
+ response = meraki.request(path, 'DELETE')
+ meraki.result['changed'] = True
+ meraki.result['data'] = response
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_nat.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_nat.py
new file mode 100644
index 00000000..0844d4c1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_nat.py
@@ -0,0 +1,679 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_nat
+short_description: Manage NAT rules in Meraki cloud
+description:
+- Allows for creation, management, and visibility of NAT rules (1:1, 1:many, port forwarding) within Meraki.
+
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: [present, query]
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ aliases: [name, network]
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ org_id:
+ description:
+ - ID of organization associated to a network.
+ type: str
+ subset:
+ description:
+ - Specifies which NAT components to query.
+ choices: ['1:1', '1:many', all, port_forwarding]
+ default: all
+ type: list
+ elements: str
+ one_to_one:
+ description:
+ - List of 1:1 NAT rules.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - A descriptive name for the rule.
+ type: str
+ public_ip:
+ description:
+ - The IP address that will be used to access the internal resource from the WAN.
+ type: str
+ lan_ip:
+ description:
+ - The IP address of the server or device that hosts the internal resource that you wish to make available on the WAN.
+ type: str
+ uplink:
+ description:
+ - The physical WAN interface on which the traffic will arrive.
+ choices: [both, internet1, internet2]
+ type: str
+ allowed_inbound:
+ description:
+ - The ports this mapping will provide access on, and the remote IPs that will be allowed access to the resource.
+ type: list
+ elements: dict
+ suboptions:
+ protocol:
+ description:
+ - Protocol to apply NAT rule to.
+ choices: [any, icmp-ping, tcp, udp]
+ type: str
+ default: any
+ destination_ports:
+ description:
+ - List of ports or port ranges that will be forwarded to the host on the LAN.
+ type: list
+ elements: str
+ allowed_ips:
+ description:
+ - ranges of WAN IP addresses that are allowed to make inbound connections on the specified ports or port ranges, or 'any'.
+ type: list
+ elements: str
+ one_to_many:
+ description:
+ - List of 1:many NAT rules.
+ type: list
+ elements: dict
+ suboptions:
+ public_ip:
+ description:
+ - The IP address that will be used to access the internal resource from the WAN.
+ type: str
+ uplink:
+ description:
+ - The physical WAN interface on which the traffic will arrive.
+ choices: [both, internet1, internet2]
+ type: str
+ port_rules:
+ description:
+ - List of associated port rules.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - A description of the rule.
+ type: str
+ protocol:
+ description:
+ - Protocol to apply NAT rule to.
+ choices: [tcp, udp]
+ type: str
+ public_port:
+ description:
+ - Destination port of the traffic that is arriving on the WAN.
+ type: str
+ local_ip:
+ description:
+ - Local IP address to which traffic will be forwarded.
+ type: str
+ local_port:
+ description:
+ - Destination port of the forwarded traffic that will be sent from the MX to the specified host on the LAN.
+ - If you simply wish to forward the traffic without translating the port, this should be the same as the Public port.
+ type: str
+ allowed_ips:
+ description:
+ - Remote IP addresses or ranges that are permitted to access the internal resource via this port forwarding rule, or 'any'.
+ type: list
+ elements: str
+ port_forwarding:
+ description:
+ - List of port forwarding rules.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - A descriptive name for the rule.
+ type: str
+ lan_ip:
+ description:
+ - The IP address of the server or device that hosts the internal resource that you wish to make available on the WAN.
+ type: str
+ uplink:
+ description:
+ - The physical WAN interface on which the traffic will arrive.
+ choices: [both, internet1, internet2]
+ type: str
+ public_port:
+ description:
+ - A port or port ranges that will be forwarded to the host on the LAN.
+ type: int
+ local_port:
+ description:
+ - A port or port ranges that will receive the forwarded traffic from the WAN.
+ type: int
+ allowed_ips:
+ description:
+ - List of ranges of WAN IP addresses that are allowed to make inbound connections on the specified ports or port ranges (or any).
+ type: list
+ elements: str
+ protocol:
+ description:
+ - Protocol to forward traffic for.
+ choices: [tcp, udp]
+ type: str
+
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query all NAT rules
+ meraki_nat:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ subset: all
+ delegate_to: localhost
+
+- name: Query 1:1 NAT rules
+ meraki_nat:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ subset: '1:1'
+ delegate_to: localhost
+
+- name: Create 1:1 rule
+ meraki_nat:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ one_to_one:
+ - name: Service behind NAT
+ public_ip: 1.2.1.2
+ lan_ip: 192.168.128.1
+ uplink: internet1
+ allowed_inbound:
+ - protocol: tcp
+ destination_ports:
+ - 80
+ allowed_ips:
+ - 10.10.10.10
+ delegate_to: localhost
+
+- name: Create 1:many rule
+ meraki_nat:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ one_to_many:
+ - public_ip: 1.1.1.1
+ uplink: internet1
+ port_rules:
+ - name: Test rule
+ protocol: tcp
+ public_port: 10
+ local_ip: 192.168.128.1
+ local_port: 11
+ allowed_ips:
+ - any
+ delegate_to: localhost
+
+- name: Create port forwarding rule
+ meraki_nat:
+ auth_key: abc123
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ port_forwarding:
+ - name: Test map
+ lan_ip: 192.168.128.1
+ uplink: both
+ protocol: tcp
+ allowed_ips:
+ - 1.1.1.1
+ public_port: 10
+ local_port: 11
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about the created or manipulated object.
+ returned: success
+ type: complex
+ contains:
+ one_to_one:
+ description: Information about 1:1 NAT object.
+ returned: success, when 1:1 NAT object is in task
+ type: complex
+ contains:
+ rules:
+ description: List of 1:1 NAT rules.
+ returned: success, when 1:1 NAT object is in task
+ type: complex
+ contains:
+ name:
+ description: Name of NAT object.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: Web server behind NAT
+ lanIp:
+ description: Local IP address to be mapped.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: 192.168.128.22
+ publicIp:
+ description: Public IP address to be mapped.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: 148.2.5.100
+ uplink:
+ description: Internet port where rule is applied.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: internet1
+ allowedInbound:
+ description: List of inbound forwarding rules.
+ returned: success, when 1:1 NAT object is in task
+ type: complex
+ contains:
+ protocol:
+ description: Protocol to apply NAT rule to.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: tcp
+ destinationPorts:
+ description: Ports to apply NAT rule to.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: 80
+ allowedIps:
+ description: List of IP addresses to be forwarded.
+ returned: success, when 1:1 NAT object is in task
+ type: list
+ example: 10.80.100.0/24
+ one_to_many:
+ description: Information about 1:many NAT object.
+ returned: success, when 1:many NAT object is in task
+ type: complex
+ contains:
+ rules:
+ description: List of 1:many NAT rules.
+ returned: success, when 1:many NAT object is in task
+ type: complex
+ contains:
+ publicIp:
+ description: Public IP address to be mapped.
+ returned: success, when 1:many NAT object is in task
+ type: str
+ example: 148.2.5.100
+ uplink:
+ description: Internet port where rule is applied.
+ returned: success, when 1:many NAT object is in task
+ type: str
+ example: internet1
+ portRules:
+ description: List of NAT port rules.
+ returned: success, when 1:many NAT object is in task
+ type: complex
+ contains:
+ name:
+ description: Name of NAT object.
+ returned: success, when 1:many NAT object is in task
+ type: str
+ example: Web server behind NAT
+ protocol:
+ description: Protocol to apply NAT rule to.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: tcp
+ publicPort:
+ description: Destination port of the traffic that is arriving on WAN.
+ returned: success, when 1:1 NAT object is in task
+ type: int
+ example: 9443
+ localIp:
+ description: Local IP address traffic will be forwarded.
+ returned: success, when 1:1 NAT object is in task
+ type: str
+ example: 192.0.2.10
+ localPort:
+ description: Destination port to be forwarded to.
+ returned: success, when 1:1 NAT object is in task
+ type: int
+ example: 443
+ allowedIps:
+ description: List of IP addresses to be forwarded.
+ returned: success, when 1:1 NAT object is in task
+ type: list
+ example: 10.80.100.0/24
+ port_forwarding:
+ description: Information about port forwarding rules.
+ returned: success, when port forwarding is in task
+ type: complex
+ contains:
+ rules:
+ description: List of port forwarding rules.
+ returned: success, when port forwarding is in task
+ type: complex
+ contains:
+ lanIp:
+ description: Local IP address to be mapped.
+ returned: success, when port forwarding is in task
+ type: str
+ example: 192.168.128.22
+ allowedIps:
+ description: List of IP addresses to be forwarded.
+ returned: success, when port forwarding is in task
+ type: list
+ example: 10.80.100.0/24
+ name:
+ description: Name of NAT object.
+ returned: success, when port forwarding is in task
+ type: str
+ example: Web server behind NAT
+ protocol:
+ description: Protocol to apply NAT rule to.
+ returned: success, when port forwarding is in task
+ type: str
+ example: tcp
+ publicPort:
+ description: Destination port of the traffic that is arriving on WAN.
+ returned: success, when port forwarding is in task
+ type: int
+ example: 9443
+ localPort:
+ description: Destination port to be forwarded to.
+ returned: success, when port forwarding is in task
+ type: int
+ example: 443
+ uplink:
+ description: Internet port where rule is applied.
+ returned: success, when port forwarding is in task
+ type: str
+ example: internet1
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import recursive_diff
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+key_map = {'name': 'name',
+ 'public_ip': 'publicIp',
+ 'lan_ip': 'lanIp',
+ 'uplink': 'uplink',
+ 'allowed_inbound': 'allowedInbound',
+ 'protocol': 'protocol',
+ 'destination_ports': 'destinationPorts',
+ 'allowed_ips': 'allowedIps',
+ 'port_rules': 'portRules',
+ 'public_port': 'publicPort',
+ 'local_ip': 'localIp',
+ 'local_port': 'localPort',
+ }
+
+
+def construct_payload(params):
+ if isinstance(params, list):
+ items = []
+ for item in params:
+ items.append(construct_payload(item))
+ return items
+ elif isinstance(params, dict):
+ info = {}
+ for param in params:
+ info[key_map[param]] = construct_payload(params[param])
+ return info
+ elif isinstance(params, str) or isinstance(params, int):
+ return params
+
+
+def list_int_to_str(data):
+ return [str(item) for item in data]
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ one_to_one_allowed_inbound_spec = dict(protocol=dict(type='str', choices=['tcp', 'udp', 'icmp-ping', 'any'], default='any'),
+ destination_ports=dict(type='list', elements='str'),
+ allowed_ips=dict(type='list', elements='str'),
+ )
+
+ one_to_many_port_inbound_spec = dict(protocol=dict(type='str', choices=['tcp', 'udp']),
+ name=dict(type='str'),
+ local_ip=dict(type='str'),
+ local_port=dict(type='str'),
+ allowed_ips=dict(type='list', elements='str'),
+ public_port=dict(type='str'),
+ )
+
+ one_to_one_spec = dict(name=dict(type='str'),
+ public_ip=dict(type='str'),
+ lan_ip=dict(type='str'),
+ uplink=dict(type='str', choices=['internet1', 'internet2', 'both']),
+ allowed_inbound=dict(type='list', elements='dict', options=one_to_one_allowed_inbound_spec),
+ )
+
+ one_to_many_spec = dict(public_ip=dict(type='str'),
+ uplink=dict(type='str', choices=['internet1', 'internet2', 'both']),
+ port_rules=dict(type='list', elements='dict', options=one_to_many_port_inbound_spec),
+ )
+
+ port_forwarding_spec = dict(name=dict(type='str'),
+ lan_ip=dict(type='str'),
+ uplink=dict(type='str', choices=['internet1', 'internet2', 'both']),
+ protocol=dict(type='str', choices=['tcp', 'udp']),
+ public_port=dict(type='int'),
+ local_port=dict(type='int'),
+ allowed_ips=dict(type='list', elements='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(
+ net_id=dict(type='str'),
+ net_name=dict(type='str', aliases=['name', 'network']),
+ state=dict(type='str', choices=['present', 'query'], default='present'),
+ subset=dict(type='list', elements='str', choices=['1:1', '1:many', 'all', 'port_forwarding'], default='all'),
+ one_to_one=dict(type='list', elements='dict', options=one_to_one_spec),
+ one_to_many=dict(type='list', elements='dict', options=one_to_many_spec),
+ port_forwarding=dict(type='list', elements='dict', options=port_forwarding_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ meraki = MerakiModule(module, function='nat')
+ module.params['follow_redirects'] = 'all'
+
+ one_to_one_payload = None
+ one_to_many_payload = None
+ port_forwarding_payload = None
+ if meraki.params['state'] == 'present':
+ if meraki.params['one_to_one'] is not None:
+ rules = []
+ for i in meraki.params['one_to_one']:
+ data = {'name': i['name'],
+ 'publicIp': i['public_ip'],
+ 'uplink': i['uplink'],
+ 'lanIp': i['lan_ip'],
+ 'allowedInbound': construct_payload(i['allowed_inbound'])
+ }
+ for inbound in data['allowedInbound']:
+ inbound['destinationPorts'] = list_int_to_str(inbound['destinationPorts'])
+ rules.append(data)
+ one_to_one_payload = {'rules': rules}
+ if meraki.params['one_to_many'] is not None:
+ rules = []
+ for i in meraki.params['one_to_many']:
+ data = {'publicIp': i['public_ip'],
+ 'uplink': i['uplink'],
+ }
+ port_rules = []
+ for port_rule in i['port_rules']:
+ rule = {'name': port_rule['name'],
+ 'protocol': port_rule['protocol'],
+ 'publicPort': str(port_rule['public_port']),
+ 'localIp': port_rule['local_ip'],
+ 'localPort': str(port_rule['local_port']),
+ 'allowedIps': port_rule['allowed_ips'],
+ }
+ port_rules.append(rule)
+ data['portRules'] = port_rules
+ rules.append(data)
+ one_to_many_payload = {'rules': rules}
+ if meraki.params['port_forwarding'] is not None:
+ port_forwarding_payload = {'rules': construct_payload(meraki.params['port_forwarding'])}
+ for rule in port_forwarding_payload['rules']:
+ rule['localPort'] = str(rule['localPort'])
+ rule['publicPort'] = str(rule['publicPort'])
+
+ onetomany_urls = {'nat': '/networks/{net_id}/appliance/firewall/oneToManyNatRules'}
+ onetoone_urls = {'nat': '/networks/{net_id}/appliance/firewall/oneToOneNatRules'}
+ port_forwarding_urls = {'nat': '/networks/{net_id}/appliance/firewall/portForwardingRules'}
+ meraki.url_catalog['1:many'] = onetomany_urls
+ meraki.url_catalog['1:1'] = onetoone_urls
+ meraki.url_catalog['port_forwarding'] = port_forwarding_urls
+
+ if meraki.params['net_name'] and meraki.params['net_id']:
+ meraki.fail_json(msg='net_name and net_id are mutually exclusive')
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ if meraki.params['subset'][0] == 'all':
+ path = meraki.construct_path('1:many', net_id=net_id)
+ data = {'1:many': meraki.request(path, method='GET')}
+ path = meraki.construct_path('1:1', net_id=net_id)
+ data['1:1'] = meraki.request(path, method='GET')
+ path = meraki.construct_path('port_forwarding', net_id=net_id)
+ data['port_forwarding'] = meraki.request(path, method='GET')
+ meraki.result['data'] = data
+ else:
+ for subset in meraki.params['subset']:
+ path = meraki.construct_path(subset, net_id=net_id)
+ data = {subset: meraki.request(path, method='GET')}
+ try:
+ meraki.result['data'][subset] = data
+ except KeyError:
+ meraki.result['data'] = {subset: data}
+ elif meraki.params['state'] == 'present':
+ meraki.result['data'] = dict()
+ if one_to_one_payload is not None:
+ path = meraki.construct_path('1:1', net_id=net_id)
+ current = meraki.request(path, method='GET')
+ if meraki.is_update_required(current, one_to_one_payload):
+ if meraki.module.check_mode is True:
+ diff = recursive_diff(current, one_to_one_payload)
+ current.update(one_to_one_payload)
+ if 'diff' not in meraki.result:
+ meraki.result['diff'] = {'before': {}, 'after': {}}
+ meraki.result['diff']['before'].update({'one_to_one': diff[0]})
+ meraki.result['diff']['after'].update({'one_to_one': diff[1]})
+ meraki.result['data'] = {'one_to_one': current}
+ meraki.result['changed'] = True
+ else:
+ r = meraki.request(path, method='PUT', payload=json.dumps(one_to_one_payload))
+ if meraki.status == 200:
+ diff = recursive_diff(current, one_to_one_payload)
+ if 'diff' not in meraki.result:
+ meraki.result['diff'] = {'before': {}, 'after': {}}
+ meraki.result['diff']['before'].update({'one_to_one': diff[0]})
+ meraki.result['diff']['after'].update({'one_to_one': diff[1]})
+ meraki.result['data'] = {'one_to_one': r}
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data']['one_to_one'] = current
+ if one_to_many_payload is not None:
+ path = meraki.construct_path('1:many', net_id=net_id)
+ current = meraki.request(path, method='GET')
+ if meraki.is_update_required(current, one_to_many_payload):
+ if meraki.module.check_mode is True:
+ diff = recursive_diff(current, one_to_many_payload)
+ current.update(one_to_many_payload)
+ if 'diff' not in meraki.result:
+ meraki.result['diff'] = {'before': {}, 'after': {}}
+ meraki.result['diff']['before'].update({'one_to_many': diff[0]})
+ meraki.result['diff']['after'].update({'one_to_many': diff[1]})
+ meraki.result['data']['one_to_many'] = current
+ meraki.result['changed'] = True
+ else:
+ r = meraki.request(path, method='PUT', payload=json.dumps(one_to_many_payload))
+ if meraki.status == 200:
+ diff = recursive_diff(current, one_to_many_payload)
+ if 'diff' not in meraki.result:
+ meraki.result['diff'] = {'before': {}, 'after': {}}
+ meraki.result['diff']['before'].update({'one_to_many': diff[0]})
+ meraki.result['diff']['after'].update({'one_to_many': diff[1]})
+ meraki.result['data'].update({'one_to_many': r})
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data']['one_to_many'] = current
+ if port_forwarding_payload is not None:
+ path = meraki.construct_path('port_forwarding', net_id=net_id)
+ current = meraki.request(path, method='GET')
+ if meraki.is_update_required(current, port_forwarding_payload):
+ if meraki.module.check_mode is True:
+ diff = recursive_diff(current, port_forwarding_payload)
+ current.update(port_forwarding_payload)
+ if 'diff' not in meraki.result:
+ meraki.result['diff'] = {'before': {}, 'after': {}}
+ meraki.result['diff']['before'].update({'port_forwarding': diff[0]})
+ meraki.result['diff']['after'].update({'port_forwarding': diff[1]})
+ meraki.result['data']['port_forwarding'] = current
+ meraki.result['changed'] = True
+ else:
+ r = meraki.request(path, method='PUT', payload=json.dumps(port_forwarding_payload))
+ if meraki.status == 200:
+ if 'diff' not in meraki.result:
+ meraki.result['diff'] = {'before': {}, 'after': {}}
+ diff = recursive_diff(current, port_forwarding_payload)
+ meraki.result['diff']['before'].update({'port_forwarding': diff[0]})
+ meraki.result['diff']['after'].update({'port_forwarding': diff[1]})
+ meraki.result['data'].update({'port_forwarding': r})
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data']['port_forwarding'] = current
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_network.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_network.py
new file mode 100644
index 00000000..af583f0a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_network.py
@@ -0,0 +1,412 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, 2019 Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_network
+short_description: Manage networks in the Meraki cloud
+description:
+- Allows for creation, management, and visibility into networks within Meraki.
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: [ absent, present, query ]
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ aliases: [ name, network ]
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ type:
+ description:
+ - Type of network device network manages.
+ - Required when creating a network.
+ - As of Ansible 2.8, C(combined) type is no longer accepted.
+ - As of Ansible 2.8, changes to this parameter are no longer idempotent.
+ choices: [ appliance, switch, wireless ]
+ aliases: [ net_type ]
+ type: list
+ elements: str
+ tags:
+ type: list
+ elements: str
+ description:
+ - List of tags to assign to network.
+ - C(tags) name conflicts with the tags parameter in Ansible. Indentation problems may cause unexpected behaviors.
+ - Ansible 2.8 converts this to a list from a comma separated list.
+ timezone:
+ description:
+ - Timezone associated to network.
+ - See U(https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for a list of valid timezones.
+ type: str
+ enable_vlans:
+ description:
+ - Boolean value specifying whether VLANs should be supported on a network.
+ - Requires C(net_name) or C(net_id) to be specified.
+ type: bool
+ local_status_page_enabled:
+ description: >
+ - Enables the local device status pages (U[my.meraki.com](my.meraki.com), U[ap.meraki.com](ap.meraki.com), U[switch.meraki.com](switch.meraki.com),
+ U[wired.meraki.com](wired.meraki.com)).
+ - Only can be specified on its own or with C(remote_status_page_enabled).
+ type: bool
+ remote_status_page_enabled:
+ description:
+ - Enables access to the device status page (U(http://device LAN IP)).
+ - Can only be set if C(local_status_page_enabled:) is set to C(yes).
+ - Only can be specified on its own or with C(local_status_page_enabled).
+ type: bool
+
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- delegate_to: localhost
+ block:
+ - name: List all networks associated to the YourOrg organization
+ meraki_network:
+ auth_key: abc12345
+ state: query
+ org_name: YourOrg
+ - name: Query network named MyNet in the YourOrg organization
+ meraki_network:
+ auth_key: abc12345
+ state: query
+ org_name: YourOrg
+ net_name: MyNet
+ - name: Create network named MyNet in the YourOrg organization
+ meraki_network:
+ auth_key: abc12345
+ state: present
+ org_name: YourOrg
+ net_name: MyNet
+ type: switch
+ timezone: America/Chicago
+ tags: production, chicago
+ - name: Create combined network named MyNet in the YourOrg organization
+ meraki_network:
+ auth_key: abc12345
+ state: present
+ org_name: YourOrg
+ net_name: MyNet
+ type:
+ - switch
+ - appliance
+ timezone: America/Chicago
+ tags: production, chicago
+ - name: Enable VLANs on a network
+ meraki_network:
+ auth_key: abc12345
+ state: query
+ org_name: YourOrg
+ net_name: MyNet
+ enable_vlans: yes
+ - name: Modify local status page enabled state
+ meraki_network:
+ auth_key: abc12345
+ state: query
+ org_name: YourOrg
+ net_name: MyNet
+ local_status_page_enabled: yes
+'''
+
+RETURN = r'''
+data:
+ description: Information about the created or manipulated object.
+ returned: info
+ type: complex
+ contains:
+ id:
+ description: Identification string of network.
+ returned: success
+ type: str
+ sample: N_12345
+ name:
+ description: Written name of network.
+ returned: success
+ type: str
+ sample: YourNet
+ organization_id:
+ description: Organization ID which owns the network.
+ returned: success
+ type: str
+ sample: 0987654321
+ tags:
+ description: Space delimited tags assigned to network.
+ returned: success
+ type: list
+ sample: ['production']
+ time_zone:
+ description: Timezone where network resides.
+ returned: success
+ type: str
+ sample: America/Chicago
+ type:
+ description: Functional type of network.
+ returned: success
+ type: list
+ sample: ['switch']
+ local_status_page_enabled:
+ description: States whether U(my.meraki.com) and other device portals should be enabled.
+ returned: success
+ type: bool
+ sample: true
+ remote_status_page_enabled:
+ description: Enables access to the device status page.
+ returned: success
+ type: bool
+ sample: true
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def is_net_valid(data, net_name=None, net_id=None):
+ if net_name is None and net_id is None:
+ return False
+ for n in data:
+ if net_name:
+ if n['name'] == net_name:
+ return True
+ elif net_id:
+ if n['id'] == net_id:
+ return True
+ return False
+
+
+def get_network_settings(meraki, net_id):
+ path = meraki.construct_path('get_settings', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ return response
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(
+ net_id=dict(type='str'),
+ type=dict(type='list', elements='str', choices=['wireless', 'switch', 'appliance'], aliases=['net_type']),
+ tags=dict(type='list', elements='str'),
+ timezone=dict(type='str'),
+ net_name=dict(type='str', aliases=['name', 'network']),
+ state=dict(type='str', choices=['present', 'query', 'absent'], default='present'),
+ enable_vlans=dict(type='bool'),
+ local_status_page_enabled=dict(type='bool'),
+ remote_status_page_enabled=dict(type='bool'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ meraki = MerakiModule(module, function='network')
+ module.params['follow_redirects'] = 'all'
+ payload = None
+
+ create_urls = {'network': '/organizations/{org_id}/networks'}
+ update_urls = {'network': '/networks/{net_id}'}
+ delete_urls = {'network': '/networks/{net_id}'}
+ update_settings_urls = {'network': '/networks/{net_id}/settings'}
+ get_settings_urls = {'network': '/networks/{net_id}/settings'}
+ enable_vlans_urls = {'network': '/networks/{net_id}/appliance/vlans/settings'}
+ get_vlan_status_urls = {'network': '/networks/{net_id}/appliance/vlans/settings'}
+ meraki.url_catalog['create'] = create_urls
+ meraki.url_catalog['update'] = update_urls
+ meraki.url_catalog['update_settings'] = update_settings_urls
+ meraki.url_catalog['get_settings'] = get_settings_urls
+ meraki.url_catalog['delete'] = delete_urls
+ meraki.url_catalog['enable_vlans'] = enable_vlans_urls
+ meraki.url_catalog['status_vlans'] = get_vlan_status_urls
+
+ if not meraki.params['org_name'] and not meraki.params['org_id']:
+ meraki.fail_json(msg='org_name or org_id parameters are required')
+ if meraki.params['state'] != 'query':
+ if not meraki.params['net_name'] and not meraki.params['net_id']:
+ meraki.fail_json(msg='net_name or net_id is required for present or absent states')
+ if meraki.params['net_name'] and meraki.params['net_id']:
+ meraki.fail_json(msg='net_name and net_id are mutually exclusive')
+ if not meraki.params['net_name'] and not meraki.params['net_id']:
+ if meraki.params['enable_vlans']:
+ meraki.fail_json(msg="The parameter 'enable_vlans' requires 'net_name' or 'net_id' to be specified")
+ if meraki.params['local_status_page_enabled'] is True and meraki.params['remote_status_page_enabled'] is False:
+ meraki.fail_json(msg='local_status_page_enabled must be true when setting remote_status_page_enabled')
+
+ # Construct payload
+ if meraki.params['state'] == 'present':
+ payload = dict()
+ if meraki.params['net_name']:
+ payload['name'] = meraki.params['net_name']
+ if meraki.params['type']:
+ payload['productTypes'] = meraki.params['type']
+ if meraki.params['tags']:
+ payload['tags'] = meraki.params['tags']
+ if meraki.params['timezone']:
+ payload['timeZone'] = meraki.params['timezone']
+ if meraki.params['local_status_page_enabled'] is not None:
+ payload['localStatusPageEnabled'] = meraki.params['local_status_page_enabled']
+ if meraki.params['remote_status_page_enabled'] is not None:
+ payload['remoteStatusPageEnabled'] = meraki.params['remote_status_page_enabled']
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.params['net_id']
+ net_exists = False
+ if net_id is not None:
+ if is_net_valid(nets, net_id=net_id) is False:
+ meraki.fail_json(msg="Network specified by net_id does not exist.")
+ net_exists = True
+ elif meraki.params['net_name']:
+ if is_net_valid(nets, net_name=meraki.params['net_name']) is True:
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+ net_exists = True
+
+ if meraki.params['state'] == 'query':
+ if not meraki.params['net_name'] and not meraki.params['net_id']:
+ meraki.result['data'] = nets
+ elif meraki.params['net_name'] or meraki.params['net_id'] is not None:
+ if meraki.params['local_status_page_enabled'] is not None or \
+ meraki.params['remote_status_page_enabled'] is not None:
+ meraki.result['data'] = get_network_settings(meraki, net_id)
+ meraki.exit_json(**meraki.result)
+ else:
+ meraki.result['data'] = meraki.get_net(meraki.params['org_name'],
+ meraki.params['net_name'],
+ data=nets
+ )
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'present':
+ if net_exists is False: # Network needs to be created
+ if 'type' not in meraki.params or meraki.params['type'] is None:
+ meraki.fail_json(msg="type parameter is required when creating a network.")
+ if meraki.check_mode is True:
+ data = payload
+ data['id'] = 'N_12345'
+ data['organization_id'] = org_id
+ meraki.result['data'] = data
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('create',
+ org_id=org_id
+ )
+ r = meraki.request(path,
+ method='POST',
+ payload=json.dumps(payload)
+ )
+ if meraki.status == 201:
+ meraki.result['data'] = r
+ meraki.result['changed'] = True
+ else: # Network exists, make changes
+ if meraki.params['enable_vlans'] is not None: # Modify VLANs configuration
+ status_path = meraki.construct_path('status_vlans', net_id=net_id)
+ status = meraki.request(status_path, method='GET')
+ payload = {'vlansEnabled': meraki.params['enable_vlans']}
+ if meraki.is_update_required(status, payload):
+ if meraki.check_mode is True:
+ data = {'vlansEnabled': meraki.params['enable_vlans'],
+ 'network_id': net_id,
+ }
+ meraki.result['data'] = data
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('enable_vlans', net_id=net_id)
+ r = meraki.request(path,
+ method='PUT',
+ payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = r
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ else:
+ meraki.result['data'] = status
+ meraki.exit_json(**meraki.result)
+ elif (meraki.params['local_status_page_enabled'] is not None or
+ meraki.params['remote_status_page_enabled'] is not None):
+ path = meraki.construct_path('get_settings', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ payload = {}
+ if meraki.params['local_status_page_enabled'] is not None:
+ payload['localStatusPageEnabled'] = meraki.params['local_status_page_enabled']
+ if meraki.params['remote_status_page_enabled'] is not None:
+ payload['remoteStatusPageEnabled'] = meraki.params['remote_status_page_enabled']
+ if meraki.is_update_required(original, payload):
+ if meraki.check_mode is True:
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update_settings', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ else:
+ meraki.result['data'] = original
+ meraki.exit_json(**meraki.result)
+ net = meraki.get_net(meraki.params['org_name'], net_id=net_id, data=nets)
+ if meraki.is_update_required(net, payload):
+ if meraki.check_mode is True:
+ data = net
+ net.update(payload)
+ meraki.result['data'] = net
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id)
+ r = meraki.request(path,
+ method='PUT',
+ payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = r
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = net
+ elif meraki.params['state'] == 'absent':
+ if is_net_valid(nets, net_id=net_id) is True:
+ if meraki.check_mode is True:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('delete', net_id=net_id)
+ r = meraki.request(path, method='DELETE')
+ if meraki.status == 204:
+ meraki.result['changed'] = True
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_organization.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_organization.py
new file mode 100644
index 00000000..45148e89
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_organization.py
@@ -0,0 +1,242 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_organization
+short_description: Manage organizations in the Meraki cloud
+description:
+- Allows for creation, management, and visibility into organizations within Meraki.
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ - C(org_id) must be specified if multiple organizations of the same name exist.
+ - C(absent) WILL DELETE YOUR ENTIRE ORGANIZATION, AND ALL ASSOCIATED OBJECTS, WITHOUT CONFIRMATION. USE WITH CAUTION.
+ choices: ['absent', 'present', 'query']
+ default: present
+ type: str
+ clone:
+ description:
+ - Organization to clone to a new organization.
+ type: str
+ org_name:
+ description:
+ - Name of organization.
+ - If C(clone) is specified, C(org_name) is the name of the new organization.
+ aliases: [ name, organization ]
+ type: str
+ org_id:
+ description:
+ - ID of organization.
+ aliases: [ id ]
+ type: str
+ delete_confirm:
+ description:
+ - ID of organization required for confirmation before deletion.
+ type: str
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Create a new organization named YourOrg
+ meraki_organization:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: present
+ delegate_to: localhost
+
+- name: Delete an organization named YourOrg
+ meraki_organization:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: absent
+ delegate_to: localhost
+
+- name: Query information about all organizations associated to the user
+ meraki_organization:
+ auth_key: abc12345
+ state: query
+ delegate_to: localhost
+
+- name: Query information about a single organization named YourOrg
+ meraki_organization:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: query
+ delegate_to: localhost
+
+- name: Rename an organization to RenamedOrg
+ meraki_organization:
+ auth_key: abc12345
+ org_id: 987654321
+ org_name: RenamedOrg
+ state: present
+ delegate_to: localhost
+
+- name: Clone an organization named Org to a new one called ClonedOrg
+ meraki_organization:
+ auth_key: abc12345
+ clone: Org
+ org_name: ClonedOrg
+ state: present
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about the organization which was created or modified
+ returned: success
+ type: complex
+ contains:
+ id:
+ description: Unique identification number of organization
+ returned: success
+ type: int
+ sample: 2930418
+ name:
+ description: Name of organization
+ returned: success
+ type: str
+ sample: YourOrg
+
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def get_org(meraki, org_id, data):
+ # meraki.fail_json(msg=str(org_id), data=data, oid0=data[0]['id'], oid1=data[1]['id'])
+ for o in data:
+ # meraki.fail_json(msg='o', data=o['id'], type=str(type(o['id'])))
+ if o['id'] == org_id:
+ return o
+ return -1
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(clone=dict(type='str'),
+ state=dict(type='str', choices=['absent', 'present', 'query'], default='present'),
+ org_name=dict(type='str', aliases=['name', 'organization']),
+ org_id=dict(type='str', aliases=['id']),
+ delete_confirm=dict(type='str'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='organizations')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ create_urls = {'organizations': '/organizations'}
+ update_urls = {'organizations': '/organizations/{org_id}'}
+ delete_urls = {'organizations': '/organizations/{org_id}'}
+ clone_urls = {'organizations': '/organizations/{org_id}/clone'}
+
+ meraki.url_catalog['create'] = create_urls
+ meraki.url_catalog['update'] = update_urls
+ meraki.url_catalog['clone'] = clone_urls
+ meraki.url_catalog['delete'] = delete_urls
+
+ payload = None
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ orgs = meraki.get_orgs()
+ if meraki.params['state'] == 'query':
+ if meraki.params['org_name']: # Query by organization name
+ module.warn('All matching organizations will be returned, even if there are duplicate named organizations')
+ for o in orgs:
+ if o['name'] == meraki.params['org_name']:
+ meraki.result['data'] = o
+ elif meraki.params['org_id']:
+ for o in orgs:
+ if o['id'] == meraki.params['org_id']:
+ meraki.result['data'] = o
+ else: # Query all organizations, no matter what
+ meraki.result['data'] = orgs
+ elif meraki.params['state'] == 'present':
+ if meraki.params['clone']: # Cloning
+ payload = {'name': meraki.params['org_name']}
+ response = meraki.request(meraki.construct_path('clone',
+ org_name=meraki.params['clone']
+ ),
+ payload=json.dumps(payload),
+ method='POST')
+ if meraki.status != 201:
+ meraki.fail_json(msg='Organization clone failed')
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ elif not meraki.params['org_id'] and meraki.params['org_name']: # Create new organization
+ payload = {'name': meraki.params['org_name']}
+ response = meraki.request(meraki.construct_path('create'),
+ method='POST',
+ payload=json.dumps(payload))
+ if meraki.status == 201:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ elif meraki.params['org_id'] and meraki.params['org_name']: # Update an existing organization
+ payload = {'name': meraki.params['org_name'],
+ 'id': meraki.params['org_id'],
+ }
+ original = get_org(meraki, meraki.params['org_id'], orgs)
+ if meraki.is_update_required(original, payload, optional_ignore=['url']):
+ response = meraki.request(meraki.construct_path('update',
+ org_id=meraki.params['org_id']
+ ),
+ method='PUT',
+ payload=json.dumps(payload))
+ if meraki.status != 200:
+ meraki.fail_json(msg='Organization update failed')
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ elif meraki.params['state'] == 'absent':
+ if meraki.params['org_name'] is not None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ elif meraki.params['org_id'] is not None:
+ org_id = meraki.params['org_id']
+ if meraki.params['delete_confirm'] != org_id:
+ meraki.fail_json(msg="delete_confirm must match the network ID of the network to be deleted.")
+ if meraki.check_mode is True:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('delete', org_id=org_id)
+ response = meraki.request(path, method='DELETE')
+ if meraki.status == 204:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_site_to_site_vpn.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_site_to_site_vpn.py
new file mode 100644
index 00000000..57a7211d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_site_to_site_vpn.py
@@ -0,0 +1,250 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_site_to_site_vpn
+short_description: Manage AutoVPN connections in Meraki
+version_added: "1.1.0"
+description:
+- Allows for creation, management, and visibility into AutoVPNs implemented on Meraki MX firewalls.
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: ['present', 'query']
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of network which MX firewall is in.
+ type: str
+ net_id:
+ description:
+ - ID of network which MX firewall is in.
+ type: str
+ mode:
+ description:
+ - Set VPN mode for network
+ choices: ['none', 'hub', 'spoke']
+ type: str
+ hubs:
+ description:
+ - List of hubs to assign to a spoke.
+ type: list
+ elements: dict
+ suboptions:
+ hub_id:
+ description:
+ - Network ID of hub
+ type: str
+ use_default_route:
+ description:
+ - Indicates whether deafult troute traffic should be sent to this hub.
+ - Only valid in spoke mode.
+ type: bool
+ subnets:
+ description:
+ - List of subnets to advertise over VPN.
+ type: list
+ elements: dict
+ suboptions:
+ local_subnet:
+ description:
+ - CIDR formatted subnet.
+ type: str
+ use_vpn:
+ description:
+ - Whether to advertise over VPN.
+ type: bool
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Set hub mode
+ meraki_site_to_site_vpn:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: hub_network
+ mode: hub
+ delegate_to: localhost
+ register: set_hub
+
+- name: Set spoke mode
+ meraki_site_to_site_vpn:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: spoke_network
+ mode: spoke
+ hubs:
+ - hub_id: N_1234
+ use_default_route: false
+ delegate_to: localhost
+ register: set_spoke
+
+- name: Query rules for hub
+ meraki_site_to_site_vpn:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: hub_network
+ delegate_to: localhost
+ register: query_all_hub
+'''
+
+RETURN = r'''
+data:
+ description: VPN settings.
+ returned: success
+ type: complex
+ contains:
+ mode:
+ description: Mode assigned to network.
+ returned: always
+ type: str
+ sample: spoke
+ hubs:
+ description: Hub networks to associate to.
+ returned: always
+ type: complex
+ contains:
+ hub_id:
+ description: ID of hub network.
+ returned: always
+ type: complex
+ sample: N_12345
+ use_default_route:
+ description: Whether to send all default route traffic over VPN.
+ returned: always
+ type: bool
+ sample: true
+ subnets:
+ description: List of subnets to advertise over VPN.
+ returned: always
+ type: complex
+ contains:
+ local_subnet:
+ description: CIDR formatted subnet.
+ returned: always
+ type: str
+ sample: 192.168.1.0/24
+ use_vpn:
+ description: Whether subnet should use the VPN.
+ returned: always
+ type: bool
+ sample: true
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+from copy import deepcopy
+
+
+def assemble_payload(meraki):
+ payload = {'mode': meraki.params['mode']}
+ if meraki.params['hubs'] is not None:
+ payload['hubs'] = meraki.params['hubs']
+ for hub in payload['hubs']:
+ hub['hubId'] = hub.pop('hub_id')
+ hub['useDefaultRoute'] = hub.pop('use_default_route')
+ if meraki.params['subnets'] is not None:
+ payload['subnets'] = meraki.params['subnets']
+ for subnet in payload['subnets']:
+ subnet['localSubnet'] = subnet.pop('local_subnet')
+ subnet['useVpn'] = subnet.pop('use_vpn')
+ return payload
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ hubs_args = dict(hub_id=dict(type='str'),
+ use_default_route=dict(type='bool'),
+ )
+ subnets_args = dict(local_subnet=dict(type='str'),
+ use_vpn=dict(type='bool'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='present'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ hubs=dict(type='list', default=None, elements='dict', options=hubs_args),
+ subnets=dict(type='list', default=None, elements='dict', options=subnets_args),
+ mode=dict(type='str', choices=['none', 'hub', 'spoke']),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='site_to_site_vpn')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'site_to_site_vpn': '/networks/{net_id}/appliance/vpn/siteToSiteVpn/'}
+ update_urls = {'site_to_site_vpn': '/networks/{net_id}/appliance/vpn/siteToSiteVpn/'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['update'] = update_urls
+
+ payload = None
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ orgs = meraki.get_orgs()
+ for org in orgs:
+ if org['name'] == meraki.params['org_name']:
+ org_id = org['id']
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'],
+ data=meraki.get_nets(org_id=org_id))
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ payload = assemble_payload(meraki)
+ comparable = deepcopy(original)
+ comparable.update(payload)
+ if meraki.is_update_required(original, payload):
+ path = meraki.construct_path('update', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['changed'] = True
+ meraki.result['data'] = response
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_snmp.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_snmp.py
new file mode 100644
index 00000000..0240a168
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_snmp.py
@@ -0,0 +1,387 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_snmp
+short_description: Manage organizations in the Meraki cloud
+description:
+- Allows for management of SNMP settings for Meraki.
+options:
+ state:
+ description:
+ - Specifies whether SNMP information should be queried or modified.
+ choices: ['query', 'present']
+ default: present
+ type: str
+ v2c_enabled:
+ description:
+ - Specifies whether SNMPv2c is enabled.
+ type: bool
+ v3_enabled:
+ description:
+ - Specifies whether SNMPv3 is enabled.
+ type: bool
+ v3_auth_mode:
+ description:
+ - Sets authentication mode for SNMPv3.
+ choices: ['MD5', 'SHA']
+ type: str
+ v3_auth_pass:
+ description:
+ - Authentication password for SNMPv3.
+ - Must be at least 8 characters long.
+ type: str
+ v3_priv_mode:
+ description:
+ - Specifies privacy mode for SNMPv3.
+ choices: ['DES', 'AES128']
+ type: str
+ v3_priv_pass:
+ description:
+ - Privacy password for SNMPv3.
+ - Must be at least 8 characters long.
+ type: str
+ peer_ips:
+ description:
+ - List of IP addresses which can perform SNMP queries.
+ type: list
+ elements: str
+ net_name:
+ description:
+ - Name of network.
+ type: str
+ net_id:
+ description:
+ - ID of network.
+ type: str
+ access:
+ description:
+ - Type of SNMP access.
+ choices: [community, none, users]
+ type: str
+ community_string:
+ description:
+ - SNMP community string.
+ - Only relevant if C(access) is set to C(community).
+ type: str
+ users:
+ description:
+ - Information about users with access to SNMP.
+ - Only relevant if C(access) is set to C(users).
+ type: list
+ elements: dict
+ suboptions:
+ username:
+ description: Username of user with access.
+ type: str
+ passphrase:
+ description: Passphrase for user SNMP access.
+ type: str
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query SNMP values
+ meraki_snmp:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: query
+ delegate_to: localhost
+
+- name: Enable SNMPv2
+ meraki_snmp:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: present
+ v2c_enabled: yes
+ delegate_to: localhost
+
+- name: Disable SNMPv2
+ meraki_snmp:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: present
+ v2c_enabled: no
+ delegate_to: localhost
+
+- name: Enable SNMPv3
+ meraki_snmp:
+ auth_key: abc12345
+ org_name: YourOrg
+ state: present
+ v3_enabled: true
+ v3_auth_mode: SHA
+ v3_auth_pass: ansiblepass
+ v3_priv_mode: AES128
+ v3_priv_pass: ansiblepass
+ peer_ips: 192.0.1.1;192.0.1.2
+ delegate_to: localhost
+
+- name: Set network access type to community string
+ meraki_snmp:
+ auth_key: abc1235
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ access: community
+ community_string: abc123
+ delegate_to: localhost
+
+- name: Set network access type to username
+ meraki_snmp:
+ auth_key: abc1235
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ access: users
+ users:
+ - username: ansibleuser
+ passphrase: ansiblepass
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about SNMP settings.
+ type: complex
+ returned: always
+ contains:
+ hostname:
+ description: Hostname of SNMP server.
+ returned: success and no network specified.
+ type: str
+ sample: n1.meraki.com
+ peer_ips:
+ description: Semi-colon delimited list of IPs which can poll SNMP information.
+ returned: success and no network specified.
+ type: str
+ sample: 192.0.1.1
+ port:
+ description: Port number of SNMP.
+ returned: success and no network specified.
+ type: str
+ sample: 16100
+ v2c_enabled:
+ description: Shows enabled state of SNMPv2c
+ returned: success and no network specified.
+ type: bool
+ sample: true
+ v3_enabled:
+ description: Shows enabled state of SNMPv3
+ returned: success and no network specified.
+ type: bool
+ sample: true
+ v3_auth_mode:
+ description: The SNMP version 3 authentication mode either MD5 or SHA.
+ returned: success and no network specified.
+ type: str
+ sample: SHA
+ v3_priv_mode:
+ description: The SNMP version 3 privacy mode DES or AES128.
+ returned: success and no network specified.
+ type: str
+ sample: AES128
+ v2_community_string:
+ description: Automatically generated community string for SNMPv2c.
+ returned: When SNMPv2c is enabled and no network specified.
+ type: str
+ sample: o/8zd-JaSb
+ v3_user:
+ description: Automatically generated username for SNMPv3.
+ returned: When SNMPv3c is enabled and no network specified.
+ type: str
+ sample: o/8zd-JaSb
+ access:
+ description: Type of SNMP access.
+ type: str
+ returned: success, when network specified
+ community_string:
+ description: SNMP community string. Only relevant if C(access) is set to C(community).
+ type: str
+ returned: success, when network specified
+ users:
+ description: Information about users with access to SNMP. Only relevant if C(access) is set to C(users).
+ type: complex
+ contains:
+ username:
+ description: Username of user with access.
+ type: str
+ returned: success, when network specified
+ passphrase:
+ description: Passphrase for user SNMP access.
+ type: str
+ returned: success, when network specified
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import snake_dict_to_camel_dict
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def get_snmp(meraki, org_id):
+ path = meraki.construct_path('get_all', org_id=org_id)
+ r = meraki.request(path,
+ method='GET',
+ )
+ if meraki.status == 200:
+ return r
+
+
+def set_snmp(meraki, org_id):
+ payload = dict()
+ if meraki.params['v2c_enabled'] is not None:
+ payload = {'v2cEnabled': meraki.params['v2c_enabled'],
+ }
+ if meraki.params['v3_enabled'] is True:
+ if len(meraki.params['v3_auth_pass']) < 8 or len(meraki.params['v3_priv_pass']) < 8:
+ meraki.fail_json(msg='v3_auth_pass and v3_priv_pass must both be at least 8 characters long.')
+ if meraki.params['v3_auth_mode'] is None or \
+ meraki.params['v3_auth_pass'] is None or \
+ meraki.params['v3_priv_mode'] is None or \
+ meraki.params['v3_priv_pass'] is None:
+ meraki.fail_json(msg='v3_auth_mode, v3_auth_pass, v3_priv_mode, and v3_auth_pass are required')
+ payload = {'v3Enabled': meraki.params['v3_enabled'],
+ 'v3AuthMode': meraki.params['v3_auth_mode'].upper(),
+ 'v3AuthPass': meraki.params['v3_auth_pass'],
+ 'v3PrivMode': meraki.params['v3_priv_mode'].upper(),
+ 'v3PrivPass': meraki.params['v3_priv_pass'],
+ }
+ if meraki.params['peer_ips'] is not None:
+ payload['peerIps'] = meraki.params['peer_ips']
+ elif meraki.params['v3_enabled'] is False:
+ payload = {'v3Enabled': False}
+ full_compare = snake_dict_to_camel_dict(payload)
+ path = meraki.construct_path('create', org_id=org_id)
+ snmp = get_snmp(meraki, org_id)
+ ignored_parameters = ['v3AuthPass', 'v3PrivPass', 'hostname', 'port', 'v2CommunityString', 'v3User']
+ if meraki.is_update_required(snmp, full_compare, optional_ignore=ignored_parameters):
+ if meraki.module.check_mode is True:
+ meraki.generate_diff(snmp, full_compare)
+ snmp.update(payload)
+ meraki.result['data'] = snmp
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ r = meraki.request(path,
+ method='PUT',
+ payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.generate_diff(snmp, r)
+ meraki.result['changed'] = True
+ return r
+ else:
+ return snmp
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+ user_arg_spec = dict(username=dict(type='str'),
+ passphrase=dict(type='str', no_log=True),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='present'),
+ v2c_enabled=dict(type='bool'),
+ v3_enabled=dict(type='bool'),
+ v3_auth_mode=dict(type='str', choices=['SHA', 'MD5']),
+ v3_auth_pass=dict(type='str', no_log=True),
+ v3_priv_mode=dict(type='str', choices=['DES', 'AES128']),
+ v3_priv_pass=dict(type='str', no_log=True),
+ peer_ips=dict(type='list', default=None, elements='str'),
+ access=dict(type='str', choices=['none', 'community', 'users']),
+ community_string=dict(type='str', no_log=True),
+ users=dict(type='list', default=None, elements='dict', options=user_arg_spec),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='snmp')
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'snmp': '/organizations/{org_id}/snmp'}
+ query_net_urls = {'snmp': '/networks/{net_id}/snmp'}
+ update_urls = {'snmp': '/organizations/{org_id}/snmp'}
+ update_net_urls = {'snmp': '/networks/{net_id}/snmp'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['query_net_all'] = query_net_urls
+ meraki.url_catalog['create'] = update_urls
+ meraki.url_catalog['create_net'] = update_net_urls
+
+ payload = None
+
+ if not meraki.params['org_name'] and not meraki.params['org_id']:
+ meraki.fail_json(msg='org_name or org_id is required')
+
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None and meraki.params['net_name']:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'present':
+ if net_id is not None:
+ payload = {'access': meraki.params['access']}
+ if meraki.params['community_string'] is not None:
+ payload['communityString'] = meraki.params['community_string']
+ elif meraki.params['users'] is not None:
+ payload['users'] = meraki.params['users']
+
+ if meraki.params['state'] == 'query':
+ if net_id is None:
+ meraki.result['data'] = get_snmp(meraki, org_id)
+ else:
+ path = meraki.construct_path('query_net_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ elif meraki.params['state'] == 'present':
+ if net_id is None:
+ meraki.result['data'] = set_snmp(meraki, org_id)
+ else:
+ path = meraki.construct_path('query_net_all', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ if meraki.is_update_required(original, payload):
+ path = meraki.construct_path('create_net', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ if response['access'] == 'none':
+ meraki.result['data'] = {}
+ else:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ssid.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ssid.py
new file mode 100644
index 00000000..c9101290
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_ssid.py
@@ -0,0 +1,614 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mr_ssid
+short_description: Manage wireless SSIDs in the Meraki cloud
+description:
+- Allows for management of SSIDs in a Meraki wireless environment.
+notes:
+- Deleting an SSID does not delete RADIUS servers.
+options:
+ state:
+ description:
+ - Specifies whether SNMP information should be queried or modified.
+ type: str
+ choices: [ absent, query, present ]
+ default: present
+ number:
+ description:
+ - SSID number within network.
+ type: int
+ aliases: [ssid_number]
+ name:
+ description:
+ - Name of SSID.
+ type: str
+ net_name:
+ description:
+ - Name of network.
+ type: str
+ net_id:
+ description:
+ - ID of network.
+ type: str
+ enabled:
+ description:
+ - Enable or disable SSID network.
+ type: bool
+ auth_mode:
+ description:
+ - Set authentication mode of network.
+ type: str
+ choices: [open, psk, open-with-radius, 8021x-meraki, 8021x-radius]
+ encryption_mode:
+ description:
+ - Set encryption mode of network.
+ type: str
+ choices: [wpa, eap, wpa-eap]
+ psk:
+ description:
+ - Password for wireless network.
+ - Requires auth_mode to be set to psk.
+ type: str
+ wpa_encryption_mode:
+ description:
+ - Encryption mode within WPA specification.
+ type: str
+ choices: [WPA1 and WPA2, WPA2 only, WPA3 Transition Mode, WPA3 only]
+ splash_page:
+ description:
+ - Set to enable splash page and specify type of splash.
+ type: str
+ choices: ['None',
+ 'Click-through splash page',
+ 'Billing',
+ 'Password-protected with Meraki RADIUS',
+ 'Password-protected with custom RADIUS',
+ 'Password-protected with Active Directory',
+ 'Password-protected with LDAP',
+ 'SMS authentication',
+ 'Systems Manager Sentry',
+ 'Facebook Wi-Fi',
+ 'Google OAuth',
+ 'Sponsored guest',
+ 'Cisco ISE']
+ radius_servers:
+ description:
+ - List of RADIUS servers.
+ type: list
+ elements: dict
+ suboptions:
+ host:
+ description:
+ - IP address or hostname of RADIUS server.
+ type: str
+ required: true
+ port:
+ description:
+ - Port number RADIUS server is listening to.
+ type: int
+ secret:
+ description:
+ - RADIUS password.
+ - Setting password is not idempotent.
+ type: str
+ radius_coa_enabled:
+ description:
+ - Enable or disable RADIUS CoA (Change of Authorization) on SSID.
+ type: bool
+ radius_failover_policy:
+ description:
+ - Set client access policy in case RADIUS servers aren't available.
+ type: str
+ choices: [Deny access, Allow access]
+ radius_load_balancing_policy:
+ description:
+ - Set load balancing policy when multiple RADIUS servers are specified.
+ type: str
+ choices: [Strict priority order, Round robin]
+ radius_accounting_enabled:
+ description:
+ - Enable or disable RADIUS accounting.
+ type: bool
+ radius_accounting_servers:
+ description:
+ - List of RADIUS servers for RADIUS accounting.
+ type: list
+ elements: dict
+ suboptions:
+ host:
+ description:
+ - IP address or hostname of RADIUS server.
+ type: str
+ required: true
+ port:
+ description:
+ - Port number RADIUS server is listening to.
+ type: int
+ secret:
+ description:
+ - RADIUS password.
+ - Setting password is not idempotent.
+ type: str
+ ip_assignment_mode:
+ description:
+ - Method of which SSID uses to assign IP addresses.
+ type: str
+ choices: ['NAT mode',
+ 'Bridge mode',
+ 'Layer 3 roaming',
+ 'Layer 3 roaming with a concentrator',
+ 'VPN']
+ use_vlan_tagging:
+ description:
+ - Set whether to use VLAN tagging.
+ - Requires C(default_vlan_id) to be set.
+ type: bool
+ default_vlan_id:
+ description:
+ - Default VLAN ID.
+ - Requires C(ip_assignment_mode) to be C(Bridge mode) or C(Layer 3 roaming).
+ type: int
+ vlan_id:
+ description:
+ - ID number of VLAN on SSID.
+ - Requires C(ip_assignment_mode) to be C(ayer 3 roaming with a concentrator) or C(VPN).
+ type: int
+ ap_tags_vlan_ids:
+ description:
+ - List of VLAN tags.
+ - Requires C(ip_assignment_mode) to be C(Bridge mode) or C(Layer 3 roaming).
+ - Requires C(use_vlan_tagging) to be C(True).
+ type: list
+ elements: dict
+ suboptions:
+ tags:
+ description:
+ - List of AP tags.
+ type: list
+ elements: str
+ vlan_id:
+ description:
+ - Numerical identifier that is assigned to the VLAN.
+ type: int
+ walled_garden_enabled:
+ description:
+ - Enable or disable walled garden functionality.
+ type: bool
+ walled_garden_ranges:
+ description:
+ - List of walled garden ranges.
+ type: list
+ elements: str
+ min_bitrate:
+ description:
+ - Minimum bitrate (Mbps) allowed on SSID.
+ type: float
+ choices: [1, 2, 5.5, 6, 9, 11, 12, 18, 24, 36, 48, 54]
+ band_selection:
+ description:
+ - Set band selection mode.
+ type: str
+ choices: ['Dual band operation', '5 GHz band only', 'Dual band operation with Band Steering']
+ per_client_bandwidth_limit_up:
+ description:
+ - Maximum bandwidth in Mbps devices on SSID can upload.
+ type: int
+ per_client_bandwidth_limit_down:
+ description:
+ - Maximum bandwidth in Mbps devices on SSID can download.
+ type: int
+ concentrator_network_id:
+ description:
+ - The concentrator to use for 'Layer 3 roaming with a concentrator' or 'VPN'.
+ type: str
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Enable and name SSID
+ meraki_ssid:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: WiFi
+ name: GuestSSID
+ enabled: true
+ delegate_to: localhost
+
+- name: Set PSK with invalid encryption mode
+ meraki_ssid:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: WiFi
+ name: GuestSSID
+ auth_mode: psk
+ psk: abc1234
+ encryption_mode: eap
+ ignore_errors: yes
+ delegate_to: localhost
+
+- name: Configure RADIUS servers
+ meraki_ssid:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: WiFi
+ name: GuestSSID
+ auth_mode: open-with-radius
+ radius_servers:
+ - host: 192.0.1.200
+ port: 1234
+ secret: abc98765
+ delegate_to: localhost
+
+- name: Enable click-through splash page
+ meraki_ssid:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: WiFi
+ name: GuestSSID
+ splash_page: Click-through splash page
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: List of wireless SSIDs.
+ returned: success
+ type: complex
+ contains:
+ number:
+ description: Zero-based index number for SSIDs.
+ returned: success
+ type: int
+ sample: 0
+ name:
+ description:
+ - Name of wireless SSID.
+ - This value is what is broadcasted.
+ returned: success
+ type: str
+ sample: CorpWireless
+ enabled:
+ description: Enabled state of wireless network.
+ returned: success
+ type: bool
+ sample: true
+ splash_page:
+ description: Splash page to show when user authenticates.
+ returned: success
+ type: str
+ sample: Click-through splash page
+ ssid_admin_accessible:
+ description: Whether SSID is administratively accessible.
+ returned: success
+ type: bool
+ sample: true
+ auth_mode:
+ description: Authentication method.
+ returned: success
+ type: str
+ sample: psk
+ psk:
+ description: Secret wireless password.
+ returned: success
+ type: str
+ sample: SecretWiFiPass
+ encryption_mode:
+ description: Wireless traffic encryption method.
+ returned: success
+ type: str
+ sample: wpa
+ wpa_encryption_mode:
+ description: Enabled WPA versions.
+ returned: success
+ type: str
+ sample: WPA2 only
+ ip_assignment_mode:
+ description: Wireless client IP assignment method.
+ returned: success
+ type: str
+ sample: NAT mode
+ min_bitrate:
+ description: Minimum bitrate a wireless client can connect at.
+ returned: success
+ type: int
+ sample: 11
+ band_selection:
+ description: Wireless RF frequency wireless network will be broadcast on.
+ returned: success
+ type: str
+ sample: 5 GHz band only
+ per_client_bandwidth_limit_up:
+ description: Maximum upload bandwidth a client can use.
+ returned: success
+ type: int
+ sample: 1000
+ per_client_bandwidth_limit_down:
+ description: Maximum download bandwidth a client can use.
+ returned: success
+ type: int
+ sample: 0
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def get_available_number(data):
+ for item in data:
+ if 'Unconfigured SSID' in item['name']:
+ return item['number']
+ return False
+
+
+def get_ssid_number(name, data):
+ for ssid in data:
+ if name == ssid['name']:
+ return ssid['number']
+ return False
+
+
+def get_ssids(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ return meraki.request(path, method='GET')
+
+
+def construct_payload(meraki):
+ param_map = {'name': 'name',
+ 'enabled': 'enabled',
+ 'authMode': 'auth_mode',
+ 'encryptionMode': 'encryption_mode',
+ 'psk': 'psk',
+ 'wpaEncryptionMode': 'wpa_encryption_mode',
+ 'splashPage': 'splash_page',
+ 'radiusServers': 'radius_servers',
+ 'radiusCoaEnabled': 'radius_coa_enabled',
+ 'radiusFailoverPolicy': 'radius_failover_policy',
+ 'radiusLoadBalancingPolicy': 'radius_load_balancing_policy',
+ 'radiusAccountingEnabled': 'radius_accounting_enabled',
+ 'radiusAccountingServers': 'radius_accounting_servers',
+ 'ipAssignmentMode': 'ip_assignment_mode',
+ 'useVlanTagging': 'use_vlan_tagging',
+ 'concentratorNetworkId': 'concentrator_network_id',
+ 'vlanId': 'vlan_id',
+ 'defaultVlanId': 'default_vlan_id',
+ 'apTagsAndVlanIds': 'ap_tags_vlan_ids',
+ 'walledGardenEnabled': 'walled_garden_enabled',
+ 'walledGardenRanges': 'walled_garden_ranges',
+ 'minBitrate': 'min_bitrate',
+ 'bandSelection': 'band_selection',
+ 'perClientBandwidthLimitUp': 'per_client_bandwidth_limit_up',
+ 'perClientBandwidthLimitDown': 'per_client_bandwidth_limit_down',
+ }
+
+ payload = dict()
+ for k, v in param_map.items():
+ if meraki.params[v] is not None:
+ payload[k] = meraki.params[v]
+
+ if meraki.params['ap_tags_vlan_ids'] is not None:
+ for i in payload['apTagsAndVlanIds']:
+ try:
+ i['vlanId'] = i['vlan_id']
+ del i['vlan_id']
+ except KeyError:
+ pass
+
+ return payload
+
+
+def per_line_to_str(data):
+ return data.replace('\n', ' ')
+
+
+def main():
+ default_payload = {'name': 'Unconfigured SSID',
+ 'auth_mode': 'open',
+ 'splashPage': 'None',
+ 'perClientBandwidthLimitUp': 0,
+ 'perClientBandwidthLimitDown': 0,
+ 'ipAssignmentMode': 'NAT mode',
+ 'enabled': False,
+ 'bandSelection': 'Dual band operation',
+ 'minBitrate': 11,
+ }
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+ radius_arg_spec = dict(host=dict(type='str', required=True),
+ port=dict(type='int'),
+ secret=dict(type='str', no_log=True),
+ )
+ vlan_arg_spec = dict(tags=dict(type='list', elements='str'),
+ vlan_id=dict(type='int'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='present'),
+ number=dict(type='int', aliases=['ssid_number']),
+ name=dict(type='str'),
+ org_name=dict(type='str', aliases=['organization']),
+ org_id=dict(type='str'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ enabled=dict(type='bool'),
+ auth_mode=dict(type='str', choices=['open', 'psk', 'open-with-radius', '8021x-meraki', '8021x-radius']),
+ encryption_mode=dict(type='str', choices=['wpa', 'eap', 'wpa-eap']),
+ psk=dict(type='str', no_log=True),
+ wpa_encryption_mode=dict(type='str', choices=['WPA1 and WPA2',
+ 'WPA2 only',
+ 'WPA3 Transition Mode',
+ 'WPA3 only']),
+ splash_page=dict(type='str', choices=['None',
+ 'Click-through splash page',
+ 'Billing',
+ 'Password-protected with Meraki RADIUS',
+ 'Password-protected with custom RADIUS',
+ 'Password-protected with Active Directory',
+ 'Password-protected with LDAP',
+ 'SMS authentication',
+ 'Systems Manager Sentry',
+ 'Facebook Wi-Fi',
+ 'Google OAuth',
+ 'Sponsored guest',
+ 'Cisco ISE',
+ ]),
+ radius_servers=dict(type='list', default=None, elements='dict', options=radius_arg_spec),
+ radius_coa_enabled=dict(type='bool'),
+ radius_failover_policy=dict(type='str', choices=['Deny access', 'Allow access']),
+ radius_load_balancing_policy=dict(type='str', choices=['Strict priority order', 'Round robin']),
+ radius_accounting_enabled=dict(type='bool'),
+ radius_accounting_servers=dict(type='list', elements='dict', options=radius_arg_spec),
+ ip_assignment_mode=dict(type='str', choices=['NAT mode',
+ 'Bridge mode',
+ 'Layer 3 roaming',
+ 'Layer 3 roaming with a concentrator',
+ 'VPN']),
+ use_vlan_tagging=dict(type='bool'),
+ concentrator_network_id=dict(type='str'),
+ vlan_id=dict(type='int'),
+ default_vlan_id=dict(type='int'),
+ ap_tags_vlan_ids=dict(type='list', default=None, elements='dict', options=vlan_arg_spec),
+ walled_garden_enabled=dict(type='bool'),
+ walled_garden_ranges=dict(type='list', elements='str'),
+ min_bitrate=dict(type='float', choices=[1, 2, 5.5, 6, 9, 11, 12, 18, 24, 36, 48, 54]),
+ band_selection=dict(type='str', choices=['Dual band operation',
+ '5 GHz band only',
+ 'Dual band operation with Band Steering']),
+ per_client_bandwidth_limit_up=dict(type='int'),
+ per_client_bandwidth_limit_down=dict(type='int'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='ssid')
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'ssid': '/networks/{net_id}/wireless/ssids'}
+ query_url = {'ssid': '/networks/{net_id}/wireless/ssids/{number}'}
+ update_url = {'ssid': '/networks/{net_id}/wireless/ssids/'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_one'].update(query_url)
+ meraki.url_catalog['update'] = update_url
+
+ payload = None
+
+ # execute checks for argument completeness
+ if meraki.params['psk']:
+ if meraki.params['auth_mode'] != 'psk':
+ meraki.fail_json(msg='PSK is only allowed when auth_mode is set to psk')
+ if meraki.params['encryption_mode'] != 'wpa':
+ meraki.fail_json(msg='PSK requires encryption_mode be set to wpa')
+ if meraki.params['radius_servers']:
+ if meraki.params['auth_mode'] not in ('open-with-radius', '8021x-radius'):
+ meraki.fail_json(msg='radius_servers requires auth_mode to be open-with-radius or 8021x-radius')
+ if meraki.params['radius_accounting_enabled'] is True:
+ if meraki.params['auth_mode'] not in ('open-with-radius', '8021x-radius'):
+ meraki.fails_json(msg='radius_accounting_enabled is only allowed when auth_mode is open-with-radius or 8021x-radius')
+ if meraki.params['radius_accounting_servers'] is True:
+ if meraki.params['auth_mode'] not in ('open-with-radius', '8021x-radius') or meraki.params['radius_accounting_enabled'] is False:
+ meraki.fail_json(msg='radius_accounting_servers is only allowed when auth_mode is open_with_radius or 8021x-radius and \
+ radius_accounting_enabled is true')
+ if meraki.params['use_vlan_tagging'] is True:
+ if meraki.params['default_vlan_id'] is None:
+ meraki.fail_json(msg="default_vlan_id is required when use_vlan_tagging is True")
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ net_id = meraki.params['net_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(org_id, meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ if meraki.params['name']:
+ ssid_id = get_ssid_number(meraki.params['name'], get_ssids(meraki, net_id))
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'number': ssid_id})
+ meraki.result['data'] = meraki.request(path, method='GET')
+ elif meraki.params['number'] is not None:
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'number': meraki.params['number']})
+ meraki.result['data'] = meraki.request(path, method='GET')
+ else:
+ meraki.result['data'] = get_ssids(meraki, net_id)
+ elif meraki.params['state'] == 'present':
+ payload = construct_payload(meraki)
+ ssids = get_ssids(meraki, net_id)
+ number = meraki.params['number']
+ if number is None:
+ number = get_ssid_number(meraki.params['name'], ssids)
+ original = ssids[number]
+ if meraki.is_update_required(original, payload, optional_ignore=['secret']):
+ ssid_id = meraki.params['number']
+ if ssid_id is None: # Name should be used to lookup number
+ ssid_id = get_ssid_number(meraki.params['name'], ssids)
+ if ssid_id is False:
+ ssid_id = get_available_number(ssids)
+ if ssid_id is False:
+ meraki.fail_json(msg='No unconfigured SSIDs are available. Specify a number.')
+ if meraki.check_mode is True:
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id) + str(ssid_id)
+ result = meraki.request(path, 'PUT', payload=json.dumps(payload))
+ meraki.result['data'] = result
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ elif meraki.params['state'] == 'absent':
+ ssids = get_ssids(meraki, net_id)
+ ssid_id = meraki.params['number']
+ if ssid_id is None: # Name should be used to lookup number
+ ssid_id = get_ssid_number(meraki.params['name'], ssids)
+ if ssid_id is False:
+ ssid_id = get_available_number(ssids)
+ if ssid_id is False:
+ meraki.fail_json(msg='No SSID found by specified name and no number was referenced.')
+ if meraki.check_mode is True:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id) + str(ssid_id)
+ payload = default_payload
+ payload['name'] = payload['name'] + ' ' + str(ssid_id + 1)
+ result = meraki.request(path, 'PUT', payload=json.dumps(payload))
+ meraki.result['data'] = result
+ meraki.result['changed'] = True
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_static_route.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_static_route.py
new file mode 100644
index 00000000..927d4230
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_static_route.py
@@ -0,0 +1,392 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, 2019 Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_static_route
+short_description: Manage static routes in the Meraki cloud
+description:
+- Allows for creation, management, and visibility into static routes within Meraki.
+
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: [ absent, query, present ]
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ name:
+ description:
+ - Descriptive name of the static route.
+ type: str
+ subnet:
+ description:
+ - CIDR notation based subnet for static route.
+ type: str
+ gateway_ip:
+ description:
+ - IP address of the gateway for the subnet.
+ type: str
+ route_id:
+ description:
+ - Unique ID of static route.
+ type: str
+ fixed_ip_assignments:
+ description:
+ - List of fixed MAC to IP bindings for DHCP.
+ type: list
+ elements: dict
+ suboptions:
+ mac:
+ description:
+ - MAC address of endpoint.
+ type: str
+ ip:
+ description:
+ - IP address of endpoint.
+ type: str
+ name:
+ description:
+ - Hostname of endpoint.
+ type: str
+ reserved_ip_ranges:
+ description:
+ - List of IP ranges reserved for static IP assignments.
+ type: list
+ elements: dict
+ suboptions:
+ start:
+ description:
+ - First IP address of reserved range.
+ type: str
+ end:
+ description:
+ - Last IP address of reserved range.
+ type: str
+ comment:
+ description:
+ - Human readable description of reservation range.
+ type: str
+ enabled:
+ description:
+ - Indicates whether static route is enabled within a network.
+ type: bool
+
+
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Create static_route
+ meraki_static_route:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ name: Test Route
+ subnet: 192.0.1.0/24
+ gateway_ip: 192.168.128.1
+ delegate_to: localhost
+
+- name: Update static route with fixed IP assignment
+ meraki_static_route:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ route_id: d6fa4821-1234-4dfa-af6b-ae8b16c20c39
+ fixed_ip_assignments:
+ - mac: aa:bb:cc:dd:ee:ff
+ ip: 192.0.1.11
+ comment: Server
+ delegate_to: localhost
+
+- name: Query static routes
+ meraki_static_route:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ delegate_to: localhost
+
+- name: Delete static routes
+ meraki_static_route:
+ auth_key: abc123
+ state: absent
+ org_name: YourOrg
+ net_name: YourNet
+ route_id: '{{item}}'
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about the created or manipulated object.
+ returned: info
+ type: complex
+ contains:
+ id:
+ description: Unique identification string assigned to each static route.
+ returned: success
+ type: str
+ sample: d6fa4821-1234-4dfa-af6b-ae8b16c20c39
+ net_id:
+ description: Identification string of network.
+ returned: query or update
+ type: str
+ sample: N_12345
+ name:
+ description: Name of static route.
+ returned: success
+ type: str
+ sample: Data Center static route
+ subnet:
+ description: CIDR notation subnet for static route.
+ returned: success
+ type: str
+ sample: 192.0.1.0/24
+ gatewayIp:
+ description: Next hop IP address.
+ returned: success
+ type: str
+ sample: 192.1.1.1
+ enabled:
+ description: Enabled state of static route.
+ returned: query or update
+ type: bool
+ sample: True
+ reservedIpRanges:
+ description: List of IP address ranges which are reserved for static assignment.
+ returned: query or update
+ type: complex
+ contains:
+ start:
+ description: First address in reservation range, inclusive.
+ returned: query or update
+ type: str
+ sample: 192.0.1.2
+ end:
+ description: Last address in reservation range, inclusive.
+ returned: query or update
+ type: str
+ sample: 192.0.1.10
+ comment:
+ description: Human readable description of range.
+ returned: query or update
+ type: str
+ sample: Server range
+ fixedIpAssignments:
+ description: List of static MAC to IP address bindings.
+ returned: query or update
+ type: complex
+ contains:
+ mac:
+ description: Key is MAC address of endpoint.
+ returned: query or update
+ type: complex
+ contains:
+ ip:
+ description: IP address to be bound to the endpoint.
+ returned: query or update
+ type: str
+ sample: 192.0.1.11
+ name:
+ description: Hostname given to the endpoint.
+ returned: query or update
+ type: str
+ sample: JimLaptop
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def fixed_ip_factory(meraki, data):
+ fixed_ips = dict()
+ for item in data:
+ fixed_ips[item['mac']] = {'ip': item['ip'], 'name': item['name']}
+ return fixed_ips
+
+
+def get_static_routes(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ r = meraki.request(path, method='GET')
+ return r
+
+
+def get_static_route(meraki, net_id, route_id):
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'route_id': route_id})
+ r = meraki.request(path, method='GET')
+ return r
+
+
+def does_route_exist(name, routes):
+ for route in routes:
+ if name == route['name']:
+ return route
+ return None
+
+
+def update_dict(original, proposed):
+ for k, v in proposed.items():
+ if v is not None:
+ original[k] = v
+ return original
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ fixed_ip_arg_spec = dict(mac=dict(type='str'),
+ ip=dict(type='str'),
+ name=dict(type='str'),
+ )
+
+ reserved_ip_arg_spec = dict(start=dict(type='str'),
+ end=dict(type='str'),
+ comment=dict(type='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(
+ net_id=dict(type='str'),
+ net_name=dict(type='str'),
+ name=dict(type='str'),
+ subnet=dict(type='str'),
+ gateway_ip=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ fixed_ip_assignments=dict(type='list', elements='dict', options=fixed_ip_arg_spec),
+ reserved_ip_ranges=dict(type='list', elements='dict', options=reserved_ip_arg_spec),
+ route_id=dict(type='str'),
+ enabled=dict(type='bool'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ meraki = MerakiModule(module, function='static_route')
+ module.params['follow_redirects'] = 'all'
+ payload = None
+
+ query_urls = {'static_route': '/networks/{net_id}/appliance/staticRoutes'}
+ query_one_urls = {'static_route': '/networks/{net_id}/appliance/staticRoutes/{route_id}'}
+ create_urls = {'static_route': '/networks/{net_id}/appliance/staticRoutes/'}
+ update_urls = {'static_route': '/networks/{net_id}/appliance/staticRoutes/{route_id}'}
+ delete_urls = {'static_route': '/networks/{net_id}/appliance/staticRoutes/{route_id}'}
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_one'].update(query_one_urls)
+ meraki.url_catalog['create'] = create_urls
+ meraki.url_catalog['update'] = update_urls
+ meraki.url_catalog['delete'] = delete_urls
+
+ if not meraki.params['org_name'] and not meraki.params['org_id']:
+ meraki.fail_json(msg="Parameters 'org_name' or 'org_id' parameters are required")
+ if not meraki.params['net_name'] and not meraki.params['net_id']:
+ meraki.fail_json(msg="Parameters 'net_name' or 'net_id' parameters are required")
+ if meraki.params['net_name'] and meraki.params['net_id']:
+ meraki.fail_json(msg="'net_name' and 'net_id' are mutually exclusive")
+
+ # Construct payload
+ if meraki.params['state'] == 'present':
+ payload = dict()
+ if meraki.params['net_name']:
+ payload['name'] = meraki.params['net_name']
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ if meraki.params['route_id'] is not None:
+ meraki.result['data'] = get_static_route(meraki, net_id, meraki.params['route_id'])
+ else:
+ meraki.result['data'] = get_static_routes(meraki, net_id)
+ elif meraki.params['state'] == 'present':
+ payload = {'name': meraki.params['name'],
+ 'subnet': meraki.params['subnet'],
+ 'gatewayIp': meraki.params['gateway_ip'],
+ }
+ if meraki.params['fixed_ip_assignments'] is not None:
+ payload['fixedIpAssignments'] = fixed_ip_factory(meraki,
+ meraki.params['fixed_ip_assignments'])
+ if meraki.params['reserved_ip_ranges'] is not None:
+ payload['reservedIpRanges'] = meraki.params['reserved_ip_ranges']
+ if meraki.params['enabled'] is not None:
+ payload['enabled'] = meraki.params['enabled']
+
+ route_id = meraki.params['route_id']
+ if meraki.params['name'] is not None and route_id is None:
+ route_status = does_route_exist(meraki.params['name'], get_static_routes(meraki, net_id))
+ if route_status is not None: # Route exists, assign route_id
+ route_id = route_status['id']
+
+ if route_id is not None:
+ existing_route = get_static_route(meraki, net_id, route_id)
+ original = existing_route.copy()
+ payload = update_dict(existing_route, payload)
+ if module.check_mode:
+ meraki.result['data'] = payload
+ meraki.exit_json(**meraki.result)
+ if meraki.is_update_required(original, payload, optional_ignore=['id']):
+ path = meraki.construct_path('update', net_id=net_id, custom={'route_id': route_id})
+ meraki.result['data'] = meraki.request(path, method="PUT", payload=json.dumps(payload))
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ else:
+ if module.check_mode:
+ meraki.result['data'] = payload
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('create', net_id=net_id)
+ meraki.result['data'] = meraki.request(path, method="POST", payload=json.dumps(payload))
+ meraki.result['changed'] = True
+ elif meraki.params['state'] == 'absent':
+ if module.check_mode:
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('delete', net_id=net_id, custom={'route_id': meraki.params['route_id']})
+ meraki.result['data'] = meraki.request(path, method='DELETE')
+ meraki.result['changed'] = True
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switch_access_list.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switch_access_list.py
new file mode 100644
index 00000000..bd5e9205
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switch_access_list.py
@@ -0,0 +1,319 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_ms_access_list
+short_description: Manage access lists for Meraki switches in the Meraki cloud
+version_added: "0.1.0"
+description:
+- Configure and query information about access lists on Meraki switches within the Meraki cloud.
+notes:
+- Some of the options are likely only used for developers within Meraki.
+options:
+ state:
+ description:
+ - Specifies whether object should be queried, created/modified, or removed.
+ choices: [absent, present, query]
+ default: query
+ type: str
+ net_name:
+ description:
+ - Name of network which configuration is applied to.
+ aliases: [network]
+ type: str
+ net_id:
+ description:
+ - ID of network which configuration is applied to.
+ type: str
+ rules:
+ description:
+ - List of access control rules.
+ type: list
+ elements: dict
+ suboptions:
+ comment:
+ description:
+ - Description of the rule.
+ type: str
+ policy:
+ description:
+ - Action to take on matching traffic.
+ choices: [allow, deny]
+ type: str
+ ip_version:
+ description:
+ - Type of IP packets to match.
+ choices: [any, ipv4, ipv6]
+ type: str
+ protocol:
+ description:
+ - Type of protocol to match.
+ choices: [any, tcp, udp]
+ type: str
+ src_cidr:
+ description:
+ - CIDR notation of source IP address to match.
+ type: str
+ src_port:
+ description:
+ - Port number of source port to match.
+ - May be a port number or 'any'.
+ type: str
+ dst_cidr:
+ description:
+ - CIDR notation of source IP address to match.
+ type: str
+ dst_port:
+ description:
+ - Port number of destination port to match.
+ - May be a port number or 'any'.
+ type: str
+ vlan:
+ description:
+ - Incoming traffic VLAN.
+ - May be any port between 1-4095 or 'any'.
+ type: str
+author:
+ Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Set access list
+ meraki_switch_access_list:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ rules:
+ - comment: Fake rule
+ policy: allow
+ ip_version: ipv4
+ protocol: udp
+ src_cidr: 192.0.1.0/24
+ src_port: "4242"
+ dst_cidr: 1.2.3.4/32
+ dst_port: "80"
+ vlan: "100"
+ delegate_to: localhost
+
+- name: Query access lists
+ meraki_switch_access_list:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: List of administrators.
+ returned: success
+ type: complex
+ contains:
+ rules:
+ description:
+ - List of access control rules.
+ type: list
+ contains:
+ comment:
+ description:
+ - Description of the rule.
+ type: str
+ sample: User rule
+ returned: success
+ policy:
+ description:
+ - Action to take on matching traffic.
+ type: str
+ sample: allow
+ returned: success
+ ip_version:
+ description:
+ - Type of IP packets to match.
+ type: str
+ sample: ipv4
+ returned: success
+ protocol:
+ description:
+ - Type of protocol to match.
+ type: str
+ sample: udp
+ returned: success
+ src_cidr:
+ description:
+ - CIDR notation of source IP address to match.
+ type: str
+ sample: 192.0.1.0/24
+ returned: success
+ src_port:
+ description:
+ - Port number of source port to match.
+ type: str
+ sample: 1234
+ returned: success
+ dst_cidr:
+ description:
+ - CIDR notation of source IP address to match.
+ type: str
+ sample: 1.2.3.4/32
+ returned: success
+ dst_port:
+ description:
+ - Port number of destination port to match.
+ type: str
+ sample: 80
+ returned: success
+ vlan:
+ description:
+ - Incoming traffic VLAN.
+ type: str
+ sample: 100
+ returned: success
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import recursive_diff
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+from copy import deepcopy
+
+
+def construct_payload(params):
+ payload = {'rules': []}
+ for rule in params['rules']:
+ new_rule = dict()
+ if 'comment' in rule:
+ new_rule['comment'] = rule['comment']
+ if 'policy' in rule:
+ new_rule['policy'] = rule['policy']
+ if 'ip_version' in rule:
+ new_rule['ipVersion'] = rule['ip_version']
+ if 'protocol' in rule:
+ new_rule['protocol'] = rule['protocol']
+ if 'src_cidr' in rule:
+ new_rule['srcCidr'] = rule['src_cidr']
+ if 'src_port' in rule:
+ try: # Need to convert to int for comparison later
+ new_rule['srcPort'] = int(rule['src_port'])
+ except ValueError:
+ pass
+ if 'dst_cidr' in rule:
+ new_rule['dstCidr'] = rule['dst_cidr']
+ if 'dst_port' in rule:
+ try: # Need to convert to int for comparison later
+ new_rule['dstPort'] = int(rule['dst_port'])
+ except ValueError:
+ pass
+ if 'vlan' in rule:
+ try: # Need to convert to int for comparison later
+ new_rule['vlan'] = int(rule['vlan'])
+ except ValueError:
+ pass
+ payload['rules'].append(new_rule)
+ return payload
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ rules_arg_spec = dict(comment=dict(type='str'),
+ policy=dict(type='str', choices=['allow', 'deny']),
+ ip_version=dict(type='str', choices=['ipv4', 'ipv6', 'any']),
+ protocol=dict(type='str', choices=['tcp', 'udp', 'any']),
+ src_cidr=dict(type='str'),
+ src_port=dict(type='str'),
+ dst_cidr=dict(type='str'),
+ dst_port=dict(type='str'),
+ vlan=dict(type='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='query'),
+ net_name=dict(type='str', aliases=['network']),
+ net_id=dict(type='str'),
+ rules=dict(type='list', elements='dict', options=rules_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='switch_access_list')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_url = {'switch_access_list': '/networks/{net_id}/switch/accessControlLists'}
+ update_url = {'switch_access_list': '/networks/{net_id}/switch/accessControlLists'}
+
+ meraki.url_catalog['get_all'].update(query_url)
+ meraki.url_catalog['update'] = update_url
+
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ result = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = result
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ payload = construct_payload(meraki.params)
+ comparable = deepcopy(original)
+ if len(comparable['rules']) > 1:
+ del comparable['rules'][len(comparable['rules']) - 1] # Delete the default rule for comparison
+ else:
+ del comparable['rules'][0]
+ if meraki.is_update_required(comparable, payload):
+ if meraki.check_mode is True:
+ default_rule = original['rules'][len(original['rules']) - 1]
+ payload['rules'].append(default_rule)
+ new_rules = {'rules': payload['rules']}
+ meraki.result['data'] = new_rules
+ meraki.result['changed'] = True
+ diff = recursive_diff(original, new_rules)
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1]}
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ diff = recursive_diff(original, payload)
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1]}
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switch_stack.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switch_stack.py
new file mode 100644
index 00000000..fb0729a1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switch_stack.py
@@ -0,0 +1,277 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_ms_stack
+short_description: Modify switch stacking configuration in Meraki.
+version_added: "1.3.0"
+description:
+- Allows for modification of Meraki MS switch stacks.
+notes:
+- Not all actions are idempotent. Specifically, creating a new stack will error if any switch is already in a stack.
+options:
+ state:
+ description:
+ - Create or modify an organization.
+ choices: ['present', 'query', 'absent']
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of network which MX firewall is in.
+ type: str
+ net_id:
+ description:
+ - ID of network which MX firewall is in.
+ type: str
+ stack_id:
+ description:
+ - ID of stack which is to be modified or deleted.
+ type: str
+ serials:
+ description:
+ - List of switch serial numbers which should be included or removed from a stack.
+ type: list
+ elements: str
+ name:
+ description:
+ - Name of stack.
+ type: str
+
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Create new stack
+ meraki_switch_stack:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ name: Test stack
+ serials:
+ - "ABCD-1231-4579"
+ - "ASDF-4321-0987"
+
+- name: Add switch to stack
+ meraki_switch_stack:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ stack_id: ABC12340987
+ serials:
+ - "ABCD-1231-4579"
+
+- name: Remove switch from stack
+ meraki_switch_stack:
+ auth_key: abc123
+ state: absent
+ org_name: YourOrg
+ net_name: YourNet
+ stack_id: ABC12340987
+ serials:
+ - "ABCD-1231-4579"
+
+- name: Query one stack
+ meraki_switch_stack:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ stack_id: ABC12340987
+'''
+
+RETURN = r'''
+data:
+ description: VPN settings.
+ returned: success
+ type: complex
+ contains:
+ id:
+ description: ID of switch stack.
+ returned: always
+ type: str
+ sample: 7636
+ name:
+ description: Descriptive name of switch stack.
+ returned: always
+ type: str
+ sample: MyStack
+ serials:
+ description: List of serial numbers in switch stack.
+ returned: always
+ type: list
+ sample:
+ - "QBZY-XWVU-TSRQ"
+ - "QBAB-CDEF-GHIJ"
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+from copy import deepcopy
+
+
+def get_stacks(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ return meraki.request(path, method='GET')
+
+
+def get_stack(stack_id, stacks):
+ for stack in stacks:
+ if stack_id == stack['id']:
+ return stack
+ return None
+
+
+def get_stack_id(meraki, net_id):
+ stacks = get_stacks(meraki, net_id)
+ for stack in stacks:
+ if stack['name'] == meraki.params['name']:
+ return stack['id']
+
+
+def does_stack_exist(meraki, stacks):
+ for stack in stacks:
+ have = set(meraki.params['serials'])
+ want = set(stack['serials'])
+ if have == want:
+ return stack
+ return False
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query', 'absent'], default='present'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ stack_id=dict(type='str'),
+ serials=dict(type='list', elements='str', default=None),
+ name=dict(type='str'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='switch_stack')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'switch_stack': '/networks/{net_id}/switch/stacks'}
+ query_url = {'switch_stack': '/networks/{net_id}/switch/stacks/{stack_id}'}
+ add_urls = {'switch_stack': '/networks/{net_id}/switch/stacks/{stack_id}/add'}
+ remove_urls = {'switch_stack': '/networks/{net_id}/switch/stacks/{stack_id}/remove'}
+ create_urls = {'switch_stack': '/networks/{net_id}/switch/stacks'}
+ delete_urls = {'switch_stack': '/networks/{net_id}/switch/stacks/{stack_id}'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_one'].update(query_url)
+ meraki.url_catalog['add'] = add_urls
+ meraki.url_catalog['remove'] = remove_urls
+ meraki.url_catalog['create'] = create_urls
+ meraki.url_catalog['delete'] = delete_urls
+
+ payload = None
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ orgs = meraki.get_orgs()
+ for org in orgs:
+ if org['name'] == meraki.params['org_name']:
+ org_id = org['id']
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'],
+ data=meraki.get_nets(org_id=org_id))
+
+ # assign and lookup stack_id
+ stack_id = meraki.params['stack_id']
+ if stack_id is None and meraki.params['name'] is not None:
+ stack_id = get_stack_id(meraki, net_id)
+ path = meraki.construct_path('get_all', net_id=net_id)
+ stacks = meraki.request(path, method='GET')
+
+ if meraki.params['state'] == 'query':
+ if stack_id is None:
+ meraki.result['data'] = stacks
+ else:
+ meraki.result['data'] = get_stack(stack_id, stacks)
+ elif meraki.params['state'] == 'present':
+ if meraki.params['stack_id'] is None:
+ payload = {'serials': meraki.params['serials'],
+ 'name': meraki.params['name'],
+ }
+ path = meraki.construct_path('create', net_id=net_id)
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ if meraki.status == 201:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ payload = {'serial': meraki.params['serials'][0]}
+ original = get_stack(stack_id, stacks)
+ comparable = deepcopy(original)
+ comparable.update(payload)
+ if meraki.params['serials'][0] not in comparable['serials']:
+ comparable['serials'].append(meraki.params['serials'][0])
+ # meraki.fail_json(msg=comparable)
+ if meraki.is_update_required(original, comparable, optional_ignore=['serial']):
+ path = meraki.construct_path('add', net_id=net_id, custom={'stack_id': stack_id})
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ elif meraki.params['state'] == 'absent':
+ if meraki.params['serials'] is None:
+ path = meraki.construct_path('delete', net_id=net_id, custom={'stack_id': stack_id})
+ response = meraki.request(path, method='DELETE')
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ else:
+ payload = {'serial': meraki.params['serials'][0]}
+ original = get_stack(stack_id, stacks)
+ comparable = deepcopy(original)
+ comparable.update(payload)
+ if meraki.params['serials'][0] in comparable['serials']:
+ comparable['serials'].remove(meraki.params['serials'][0])
+ if meraki.is_update_required(original, comparable, optional_ignore=['serial']):
+ path = meraki.construct_path('remove', net_id=net_id, custom={'stack_id': stack_id})
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switch_storm_control.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switch_storm_control.py
new file mode 100644
index 00000000..2048ad5e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switch_storm_control.py
@@ -0,0 +1,201 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_ms_storm_control
+short_description: Manage storm control configuration on a switch in the Meraki cloud
+version_added: "0.0.1"
+description:
+- Allows for management of storm control settings for Meraki MS switches.
+options:
+ state:
+ description:
+ - Specifies whether storm control configuration should be queried or modified.
+ choices: [query, present]
+ default: query
+ type: str
+ net_name:
+ description:
+ - Name of network.
+ type: str
+ net_id:
+ description:
+ - ID of network.
+ type: str
+ broadcast_threshold:
+ description:
+ - Percentage (1 to 99) of total available port bandwidth for broadcast traffic type.
+ - Default value 100 percent rate is to clear the configuration.
+ type: int
+ multicast_threshold:
+ description:
+ - Percentage (1 to 99) of total available port bandwidth for multicast traffic type.
+ - Default value 100 percent rate is to clear the configuration.
+ type: int
+ unknown_unicast_threshold:
+ description:
+ - Percentage (1 to 99) of total available port bandwidth for unknown unicast traffic type.
+ - Default value 100 percent rate is to clear the configuration.
+ type: int
+
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Set broadcast settings
+ meraki_switch_storm_control:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ broadcast_threshold: 75
+ multicast_threshold: 70
+ unknown_unicast_threshold: 65
+ delegate_to: localhost
+
+- name: Query storm control settings
+ meraki_switch_storm_control:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information queried or updated storm control configuration.
+ returned: success
+ type: complex
+ contains:
+ broadcast_threshold:
+ description:
+ - Percentage (1 to 99) of total available port bandwidth for broadcast traffic type.
+ - Default value 100 percent rate is to clear the configuration.
+ returned: success
+ type: int
+ sample: 42
+ multicast_threshold:
+ description:
+ - Percentage (1 to 99) of total available port bandwidth for multicast traffic type.
+ - Default value 100 percent rate is to clear the configuration.
+ returned: success
+ type: int
+ sample: 42
+ unknown_unicast_threshold:
+ description:
+ - Percentage (1 to 99) of total available port bandwidth for unknown unicast traffic type.
+ - Default value 100 percent rate is to clear the configuration.
+ returned: success
+ type: int
+ sample: 42
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible.module_utils.common.dict_transformations import recursive_diff
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def construct_payload(params):
+ payload = dict()
+ if 'broadcast_threshold' in params:
+ payload['broadcastThreshold'] = params['broadcast_threshold']
+ if 'multicast_threshold' in params:
+ payload['multicastThreshold'] = params['multicast_threshold']
+ if 'unknown_unicast_threshold' in params:
+ payload['unknownUnicastThreshold'] = params['unknown_unicast_threshold']
+ return payload
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='query'),
+ net_name=dict(type='str'),
+ net_id=dict(type='str'),
+ broadcast_threshold=dict(type='int'),
+ multicast_threshold=dict(type='int'),
+ unknown_unicast_threshold=dict(type='int'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='switch_storm_control')
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'switch_storm_control': '/networks/{net_id}/switch/stormControl'}
+ update_url = {'switch_storm_control': '/networks/{net_id}/switch/stormControl'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['update'] = update_url
+
+ payload = None
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ # execute checks for argument completeness
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ elif meraki.params['state'] == 'present':
+ path = meraki.construct_path('get_all', net_id=net_id)
+ original = meraki.request(path, method='GET')
+ payload = construct_payload(meraki.params)
+ if meraki.is_update_required(original, payload) is True:
+ diff = recursive_diff(original, payload)
+ if meraki.check_mode is True:
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1]}
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.result['diff'] = {'before': diff[0],
+ 'after': diff[1]}
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switchport.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switchport.py
new file mode 100644
index 00000000..f119c71a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_switchport.py
@@ -0,0 +1,424 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_ms_switchport
+short_description: Manage switchports on a switch in the Meraki cloud
+description:
+- Allows for management of switchports settings for Meraki MS switches.
+options:
+ state:
+ description:
+ - Specifies whether a switchport should be queried or modified.
+ choices: [query, present]
+ default: query
+ type: str
+ access_policy_type:
+ description:
+ - Type of access policy to apply to port.
+ type: str
+ choices: [Open, Custom access policy, MAC whitelist, Sticky MAC whitelist]
+ access_policy_number:
+ description:
+ - Number of the access policy to apply.
+ - Only applicable to access port types.
+ type: int
+ allowed_vlans:
+ description:
+ - List of VLAN numbers to be allowed on switchport.
+ default: all
+ type: list
+ elements: str
+ enabled:
+ description:
+ - Whether a switchport should be enabled or disabled.
+ type: bool
+ default: yes
+ isolation_enabled:
+ description:
+ - Isolation status of switchport.
+ default: no
+ type: bool
+ link_negotiation:
+ description:
+ - Link speed for the switchport.
+ default: Auto negotiate
+ choices: [Auto negotiate, 100Megabit (auto), 100 Megabit full duplex (forced)]
+ type: str
+ name:
+ description:
+ - Switchport description.
+ aliases: [description]
+ type: str
+ number:
+ description:
+ - Port number.
+ type: str
+ poe_enabled:
+ description:
+ - Enable or disable Power Over Ethernet on a port.
+ type: bool
+ default: true
+ rstp_enabled:
+ description:
+ - Enable or disable Rapid Spanning Tree Protocol on a port.
+ type: bool
+ default: true
+ serial:
+ description:
+ - Serial nubmer of the switch.
+ type: str
+ required: true
+ stp_guard:
+ description:
+ - Set state of STP guard.
+ choices: [disabled, root guard, bpdu guard, loop guard]
+ default: disabled
+ type: str
+ tags:
+ description:
+ - List of tags to assign to a port.
+ type: list
+ elements: str
+ type:
+ description:
+ - Set port type.
+ choices: [access, trunk]
+ default: access
+ type: str
+ vlan:
+ description:
+ - VLAN number assigned to port.
+ - If a port is of type trunk, the specified VLAN is the native VLAN.
+ type: int
+ voice_vlan:
+ description:
+ - VLAN number assigned to a port for voice traffic.
+ - Only applicable to access port type.
+ type: int
+
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query information about all switchports on a switch
+ meraki_switchport:
+ auth_key: abc12345
+ state: query
+ serial: ABC-123
+ delegate_to: localhost
+
+- name: Query information about all switchports on a switch
+ meraki_switchport:
+ auth_key: abc12345
+ state: query
+ serial: ABC-123
+ number: 2
+ delegate_to: localhost
+
+- name: Name switchport
+ meraki_switchport:
+ auth_key: abc12345
+ state: present
+ serial: ABC-123
+ number: 7
+ name: Test Port
+ delegate_to: localhost
+
+- name: Configure access port with voice VLAN
+ meraki_switchport:
+ auth_key: abc12345
+ state: present
+ serial: ABC-123
+ number: 7
+ enabled: true
+ name: Test Port
+ tags: desktop
+ type: access
+ vlan: 10
+ voice_vlan: 11
+ delegate_to: localhost
+
+- name: Check access port for idempotency
+ meraki_switchport:
+ auth_key: abc12345
+ state: present
+ serial: ABC-123
+ number: 7
+ enabled: true
+ name: Test Port
+ tags: desktop
+ type: access
+ vlan: 10
+ voice_vlan: 11
+ delegate_to: localhost
+
+- name: Configure trunk port with specific VLANs
+ meraki_switchport:
+ auth_key: abc12345
+ state: present
+ serial: ABC-123
+ number: 7
+ enabled: true
+ name: Server port
+ tags: server
+ type: trunk
+ allowed_vlans:
+ - 10
+ - 15
+ - 20
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information queried or updated switchports.
+ returned: success
+ type: complex
+ contains:
+ number:
+ description: Number of port.
+ returned: success
+ type: int
+ sample: 1
+ name:
+ description: Human friendly description of port.
+ returned: success
+ type: str
+ sample: "Jim Phone Port"
+ tags:
+ description: List of tags assigned to port.
+ returned: success
+ type: list
+ sample: ['phone', 'marketing']
+ enabled:
+ description: Enabled state of port.
+ returned: success
+ type: bool
+ sample: true
+ poe_enabled:
+ description: Power Over Ethernet enabled state of port.
+ returned: success
+ type: bool
+ sample: true
+ type:
+ description: Type of switchport.
+ returned: success
+ type: str
+ sample: trunk
+ vlan:
+ description: VLAN assigned to port.
+ returned: success
+ type: int
+ sample: 10
+ voice_vlan:
+ description: VLAN assigned to port with voice VLAN enabled devices.
+ returned: success
+ type: int
+ sample: 20
+ isolation_enabled:
+ description: Port isolation status of port.
+ returned: success
+ type: bool
+ sample: true
+ rstp_enabled:
+ description: Enabled or disabled state of Rapid Spanning Tree Protocol (RSTP)
+ returned: success
+ type: bool
+ sample: true
+ stp_guard:
+ description: State of STP guard
+ returned: success
+ type: str
+ sample: "Root Guard"
+ access_policy_number:
+ description: Number of assigned access policy. Only applicable to access ports.
+ returned: success
+ type: int
+ sample: 1234
+ link_negotiation:
+ description: Link speed for the port.
+ returned: success
+ type: str
+ sample: "Auto negotiate"
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+param_map = {'access_policy_number': 'accessPolicyNumber',
+ 'access_policy_type': 'accessPolicyType',
+ 'allowed_vlans': 'allowedVlans',
+ 'enabled': 'enabled',
+ 'isolation_enabled': 'isolationEnabled',
+ 'link_negotiation': 'linkNegotiation',
+ 'name': 'name',
+ 'number': 'number',
+ 'poe_enabled': 'poeEnabled',
+ 'rstp_enabled': 'rstpEnabled',
+ 'stp_guard': 'stpGuard',
+ 'tags': 'tags',
+ 'type': 'type',
+ 'vlan': 'vlan',
+ 'voice_vlan': 'voiceVlan',
+ }
+
+
+def sort_vlans(meraki, vlans):
+ converted = set()
+ for vlan in vlans:
+ converted.add(int(vlan))
+ vlans_sorted = sorted(converted)
+ vlans_str = []
+ for vlan in vlans_sorted:
+ vlans_str.append(str(vlan))
+ return ','.join(vlans_str)
+
+
+def assemble_payload(meraki):
+ payload = dict()
+ # if meraki.params['enabled'] is not None:
+ # payload['enabled'] = meraki.params['enabled']
+
+ for k, v in meraki.params.items():
+ try:
+ if meraki.params[k] is not None:
+ if k == 'access_policy_number':
+ if meraki.params['access_policy_type'] is not None:
+ payload[param_map[k]] = v
+ else:
+ payload[param_map[k]] = v
+ except KeyError:
+ pass
+ return payload
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['present', 'query'], default='query'),
+ serial=dict(type='str', required=True),
+ number=dict(type='str'),
+ name=dict(type='str', aliases=['description']),
+ tags=dict(type='list', elements='str'),
+ enabled=dict(type='bool', default=True),
+ type=dict(type='str', choices=['access', 'trunk'], default='access'),
+ vlan=dict(type='int'),
+ voice_vlan=dict(type='int'),
+ allowed_vlans=dict(type='list', elements='str', default='all'),
+ poe_enabled=dict(type='bool', default=True),
+ isolation_enabled=dict(type='bool', default=False),
+ rstp_enabled=dict(type='bool', default=True),
+ stp_guard=dict(type='str', choices=['disabled', 'root guard', 'bpdu guard', 'loop guard'], default='disabled'),
+ access_policy_type=dict(type='str', choices=['Open', 'Custom access policy', 'MAC whitelist', 'Sticky MAC whitelist']),
+ access_policy_number=dict(type='int'),
+ link_negotiation=dict(type='str',
+ choices=['Auto negotiate', '100Megabit (auto)', '100 Megabit full duplex (forced)'],
+ default='Auto negotiate'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='switchport')
+ meraki.params['follow_redirects'] = 'all'
+
+ if meraki.params['type'] == 'trunk':
+ if not meraki.params['allowed_vlans']:
+ meraki.params['allowed_vlans'] = ['all'] # Backdoor way to set default without conflicting on access
+
+ query_urls = {'switchport': '/devices/{serial}/switch/ports'}
+ query_url = {'switchport': '/devices/{serial}/switch/ports/{number}'}
+ update_url = {'switchport': '/devices/{serial}/switch/ports/{number}'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_one'].update(query_url)
+ meraki.url_catalog['update'] = update_url
+
+ # execute checks for argument completeness
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+ if meraki.params['state'] == 'query':
+ if meraki.params['number']:
+ path = meraki.construct_path('get_one', custom={'serial': meraki.params['serial'],
+ 'number': meraki.params['number'],
+ })
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ else:
+ path = meraki.construct_path('get_all', custom={'serial': meraki.params['serial']})
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ elif meraki.params['state'] == 'present':
+ payload = assemble_payload(meraki)
+ # meraki.fail_json(msg='payload', payload=payload)
+ allowed = set() # Use a set to remove duplicate items
+ if meraki.params['allowed_vlans'][0] == 'all':
+ allowed.add('all')
+ else:
+ for vlan in meraki.params['allowed_vlans']:
+ allowed.add(str(vlan))
+ if meraki.params['vlan'] is not None:
+ allowed.add(str(meraki.params['vlan']))
+ if len(allowed) > 1: # Convert from list to comma separated
+ payload['allowedVlans'] = sort_vlans(meraki, allowed)
+ else:
+ payload['allowedVlans'] = next(iter(allowed))
+
+ # Exceptions need to be made for idempotency check based on how Meraki returns
+ if meraki.params['type'] == 'access':
+ if not meraki.params['vlan']: # VLAN needs to be specified in access ports, but can't default to it
+ payload['vlan'] = 1
+
+ proposed = payload.copy()
+ query_path = meraki.construct_path('get_one', custom={'serial': meraki.params['serial'],
+ 'number': meraki.params['number'],
+ })
+ original = meraki.request(query_path, method='GET')
+ if meraki.params['type'] == 'trunk':
+ proposed['voiceVlan'] = original['voiceVlan'] # API shouldn't include voice VLAN on a trunk port
+ # meraki.fail_json(msg='Compare', original=original, payload=payload)
+ if meraki.is_update_required(original, proposed, optional_ignore=['number']):
+ if meraki.check_mode is True:
+ original.update(proposed)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', custom={'serial': meraki.params['serial'],
+ 'number': meraki.params['number'],
+ })
+ # meraki.fail_json(msg=payload)
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_syslog.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_syslog.py
new file mode 100644
index 00000000..7304199e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_syslog.py
@@ -0,0 +1,260 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_syslog
+short_description: Manage syslog server settings in the Meraki cloud.
+description:
+- Allows for creation and management of Syslog servers within Meraki.
+notes:
+- Changes to existing syslog servers replaces existing configuration. If you need to add to an
+ existing configuration set state to query to gather the existing configuration and then modify or add.
+options:
+ auth_key:
+ description:
+ - Authentication key provided by the dashboard. Required if environmental variable MERAKI_KEY is not set.
+ type: str
+ state:
+ description:
+ - Query or edit syslog servers
+ - To delete a syslog server, do not include server in list of servers
+ choices: [present, query]
+ default: present
+ type: str
+ net_name:
+ description:
+ - Name of a network.
+ aliases: [name, network]
+ type: str
+ net_id:
+ description:
+ - ID number of a network.
+ type: str
+ servers:
+ description:
+ - List of syslog server settings
+ type: list
+ elements: dict
+ suboptions:
+ host:
+ description:
+ - IP address or hostname of Syslog server.
+ type: str
+ port:
+ description:
+ - Port number Syslog server is listening on.
+ default: "514"
+ type: int
+ roles:
+ description:
+ - List of applicable Syslog server roles.
+ choices: ['Wireless Event log',
+ 'Appliance event log',
+ 'Switch event log',
+ 'Air Marshal events',
+ 'Flows',
+ 'URLs',
+ 'IDS alerts',
+ 'Security events']
+ type: list
+ elements: str
+
+author:
+ - Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query syslog configurations on network named MyNet in the YourOrg organization
+ meraki_syslog:
+ auth_key: abc12345
+ status: query
+ org_name: YourOrg
+ net_name: MyNet
+ delegate_to: localhost
+
+- name: Add single syslog server with Appliance event log role
+ meraki_syslog:
+ auth_key: abc12345
+ status: query
+ org_name: YourOrg
+ net_name: MyNet
+ servers:
+ - host: 192.0.1.2
+ port: 514
+ roles:
+ - Appliance event log
+ delegate_to: localhost
+
+- name: Add multiple syslog servers
+ meraki_syslog:
+ auth_key: abc12345
+ status: query
+ org_name: YourOrg
+ net_name: MyNet
+ servers:
+ - host: 192.0.1.2
+ port: 514
+ roles:
+ - Appliance event log
+ - host: 192.0.1.3
+ port: 514
+ roles:
+ - Appliance event log
+ - Flows
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: Information about the created or manipulated object.
+ returned: info
+ type: complex
+ contains:
+ servers:
+ description: List of syslog servers.
+ returned: info
+ type: complex
+ contains:
+ host:
+ description: Hostname or IP address of syslog server.
+ returned: success
+ type: str
+ sample: 192.0.1.1
+ port:
+ description: Port number for syslog communication.
+ returned: success
+ type: str
+ sample: 443
+ roles:
+ description: List of roles assigned to syslog server.
+ returned: success
+ type: list
+ sample: "Wireless event log, URLs"
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def main():
+
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ server_arg_spec = dict(host=dict(type='str'),
+ port=dict(type='int', default="514"),
+ roles=dict(type='list', elements='str', choices=['Wireless Event log',
+ 'Appliance event log',
+ 'Switch event log',
+ 'Air Marshal events',
+ 'Flows',
+ 'URLs',
+ 'IDS alerts',
+ 'Security events',
+ ]),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(net_id=dict(type='str'),
+ servers=dict(type='list', elements='dict', options=server_arg_spec),
+ state=dict(type='str', choices=['present', 'query'], default='present'),
+ net_name=dict(type='str', aliases=['name', 'network']),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ meraki = MerakiModule(module, function='syslog')
+ module.params['follow_redirects'] = 'all'
+ payload = None
+
+ syslog_urls = {'syslog': '/networks/{net_id}/syslogServers'}
+ meraki.url_catalog['query_update'] = syslog_urls
+
+ if not meraki.params['org_name'] and not meraki.params['org_id']:
+ meraki.fail_json(msg='org_name or org_id parameters are required')
+ if meraki.params['state'] != 'query':
+ if not meraki.params['net_name'] and not meraki.params['net_id']:
+ meraki.fail_json(msg='net_name or net_id is required for present or absent states')
+ if meraki.params['net_name'] and meraki.params['net_id']:
+ meraki.fail_json(msg='net_name and net_id are mutually exclusive')
+
+ # if the user is working with this module in only check mode we do not
+ # want to make any changes to the environment, just return the current
+ # state with no modifications
+
+ # manipulate or modify the state as needed (this is going to be the
+ # part where your module will do what it needs to do)
+
+ org_id = meraki.params['org_id']
+ if not org_id:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ path = meraki.construct_path('query_update', net_id=net_id)
+ r = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = r
+ elif meraki.params['state'] == 'present':
+ # Construct payload
+ payload = dict()
+ payload['servers'] = meraki.params['servers']
+
+ # Convert port numbers to string for idempotency checks
+ for server in payload['servers']:
+ if server['port']:
+ server['port'] = str(server['port'])
+ path = meraki.construct_path('query_update', net_id=net_id)
+ r = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ original = r
+
+ if meraki.is_update_required(original, payload):
+ if meraki.module.check_mode is True:
+ meraki.generate_diff(original, payload)
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('query_update', net_id=net_id)
+ r = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.generate_diff(original, r)
+ meraki.result['data'] = r
+ meraki.result['changed'] = True
+ else:
+ if meraki.module.check_mode is True:
+ meraki.result['data'] = original
+ meraki.exit_json(**meraki.result)
+ meraki.result['data'] = original
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_vlan.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_vlan.py
new file mode 100644
index 00000000..92a608fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_vlan.py
@@ -0,0 +1,583 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_mx_vlan
+short_description: Manage VLANs in the Meraki cloud
+description:
+- Create, edit, query, or delete VLANs in a Meraki environment.
+notes:
+- Meraki's API will return an error if VLANs aren't enabled on a network. VLANs are returned properly if VLANs are enabled on a network.
+- Some of the options are likely only used for developers within Meraki.
+- Meraki's API defaults to networks having VLAN support disabled and there is no way to enable VLANs support in the API. VLAN support must be enabled manually.
+options:
+ state:
+ description:
+ - Specifies whether object should be queried, created/modified, or removed.
+ choices: [absent, present, query]
+ default: query
+ type: str
+ net_name:
+ description:
+ - Name of network which VLAN is in or should be in.
+ aliases: [network]
+ type: str
+ net_id:
+ description:
+ - ID of network which VLAN is in or should be in.
+ type: str
+ vlan_id:
+ description:
+ - ID number of VLAN.
+ - ID should be between 1-4096.
+ type: int
+ name:
+ description:
+ - Name of VLAN.
+ aliases: [vlan_name]
+ type: str
+ subnet:
+ description:
+ - CIDR notation of network subnet.
+ type: str
+ appliance_ip:
+ description:
+ - IP address of appliance.
+ - Address must be within subnet specified in C(subnet) parameter.
+ type: str
+ dns_nameservers:
+ description:
+ - Semi-colon delimited list of DNS IP addresses.
+ - Specify one of the following options for preprogrammed DNS entries opendns, google_dns, upstream_dns
+ type: str
+ reserved_ip_range:
+ description:
+ - IP address ranges which should be reserve and not distributed via DHCP.
+ type: list
+ elements: dict
+ suboptions:
+ start:
+ description: First IP address of reserved IP address range, inclusive.
+ type: str
+ end:
+ description: Last IP address of reserved IP address range, inclusive.
+ type: str
+ comment:
+ description: Description of IP addresses reservation
+ type: str
+ vpn_nat_subnet:
+ description:
+ - The translated VPN subnet if VPN and VPN subnet translation are enabled on the VLAN.
+ type: str
+ fixed_ip_assignments:
+ description:
+ - Static IP address assignments to be distributed via DHCP by MAC address.
+ type: list
+ elements: dict
+ suboptions:
+ mac:
+ description: MAC address for fixed IP assignment binding.
+ type: str
+ ip:
+ description: IP address for fixed IP assignment binding.
+ type: str
+ name:
+ description: Descriptive name of IP assignment binding.
+ type: str
+ dhcp_handling:
+ description:
+ - How to handle DHCP packets on network.
+ type: str
+ choices: ['Run a DHCP server',
+ 'Relay DHCP to another server',
+ 'Do not respond to DHCP requests',
+ 'none',
+ 'server',
+ 'relay']
+ dhcp_relay_server_ips:
+ description:
+ - IP addresses to forward DHCP packets to.
+ type: list
+ elements: str
+ dhcp_lease_time:
+ description:
+ - DHCP lease timer setting
+ type: str
+ choices: ['30 minutes',
+ '1 hour',
+ '4 hours',
+ '12 hours',
+ '1 day',
+ '1 week']
+ dhcp_boot_options_enabled:
+ description:
+ - Enable DHCP boot options
+ type: bool
+ dhcp_boot_next_server:
+ description:
+ - DHCP boot option to direct boot clients to the server to load boot file from.
+ type: str
+ dhcp_boot_filename:
+ description:
+ - Filename to boot from for DHCP boot
+ type: str
+ dhcp_options:
+ description:
+ - List of DHCP option values
+ type: list
+ elements: dict
+ suboptions:
+ code:
+ description:
+ - DHCP option number.
+ type: int
+ type:
+ description:
+ - Type of value for DHCP option.
+ type: str
+ choices: ['text', 'ip', 'hex', 'integer']
+ value:
+ description:
+ - Value for DHCP option.
+ type: str
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Query all VLANs in a network.
+ meraki_vlan:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ state: query
+ delegate_to: localhost
+
+- name: Query information about a single VLAN by ID.
+ meraki_vlan:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ vlan_id: 2
+ state: query
+ delegate_to: localhost
+
+- name: Create a VLAN.
+ meraki_vlan:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.0.1.0/24
+ appliance_ip: 192.0.1.1
+ delegate_to: localhost
+
+- name: Update a VLAN.
+ meraki_vlan:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ state: present
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.0.1.0/24
+ appliance_ip: 192.168.250.2
+ fixed_ip_assignments:
+ - mac: "13:37:de:ad:be:ef"
+ ip: 192.168.250.10
+ name: fixed_ip
+ reserved_ip_range:
+ - start: 192.168.250.10
+ end: 192.168.250.20
+ comment: reserved_range
+ dns_nameservers: opendns
+ delegate_to: localhost
+
+- name: Enable DHCP on VLAN with options
+ meraki_vlan:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ dhcp_handling: server
+ dhcp_lease_time: 1 hour
+ dhcp_boot_options_enabled: false
+ dhcp_options:
+ - code: 5
+ type: ip
+ value: 192.0.1.1
+ delegate_to: localhost
+
+- name: Delete a VLAN.
+ meraki_vlan:
+ auth_key: abc12345
+ org_name: YourOrg
+ net_name: YourNet
+ state: absent
+ vlan_id: 2
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+
+response:
+ description: Information about the organization which was created or modified
+ returned: success
+ type: complex
+ contains:
+ appliance_ip:
+ description: IP address of Meraki appliance in the VLAN
+ returned: success
+ type: str
+ sample: 192.0.1.1
+ dnsnamservers:
+ description: IP address or Meraki defined DNS servers which VLAN should use by default
+ returned: success
+ type: str
+ sample: upstream_dns
+ fixed_ip_assignments:
+ description: List of MAC addresses which have IP addresses assigned.
+ returned: success
+ type: complex
+ contains:
+ macaddress:
+ description: MAC address which has IP address assigned to it. Key value is the actual MAC address.
+ returned: success
+ type: complex
+ contains:
+ ip:
+ description: IP address which is assigned to the MAC address.
+ returned: success
+ type: str
+ sample: 192.0.1.4
+ name:
+ description: Descriptive name for binding.
+ returned: success
+ type: str
+ sample: fixed_ip
+ reserved_ip_ranges:
+ description: List of IP address ranges which are reserved for static assignment.
+ returned: success
+ type: complex
+ contains:
+ comment:
+ description: Description for IP address reservation.
+ returned: success
+ type: str
+ sample: reserved_range
+ end:
+ description: Last IP address in reservation range.
+ returned: success
+ type: str
+ sample: 192.0.1.10
+ start:
+ description: First IP address in reservation range.
+ returned: success
+ type: str
+ sample: 192.0.1.5
+ id:
+ description: VLAN ID number.
+ returned: success
+ type: int
+ sample: 2
+ name:
+ description: Descriptive name of VLAN.
+ returned: success
+ type: str
+ sample: TestVLAN
+ networkId:
+ description: ID number of Meraki network which VLAN is associated to.
+ returned: success
+ type: str
+ sample: N_12345
+ subnet:
+ description: CIDR notation IP subnet of VLAN.
+ returned: success
+ type: str
+ sample: "192.0.1.0/24"
+ dhcp_handling:
+ description: Status of DHCP server on VLAN.
+ returned: success
+ type: str
+ sample: Run a DHCP server
+ dhcp_lease_time:
+ description: DHCP lease time when server is active.
+ returned: success
+ type: str
+ sample: 1 day
+ dhcp_boot_options_enabled:
+ description: Whether DHCP boot options are enabled.
+ returned: success
+ type: bool
+ sample: no
+ dhcp_boot_next_server:
+ description: DHCP boot option to direct boot clients to the server to load the boot file from.
+ returned: success
+ type: str
+ sample: 192.0.1.2
+ dhcp_boot_filename:
+ description: Filename for boot file.
+ returned: success
+ type: str
+ sample: boot.txt
+ dhcp_options:
+ description: DHCP options.
+ returned: success
+ type: complex
+ contains:
+ code:
+ description:
+ - Code for DHCP option.
+ - Integer between 2 and 254.
+ returned: success
+ type: int
+ sample: 43
+ type:
+ description:
+ - Type for DHCP option.
+ - Choices are C(text), C(ip), C(hex), C(integer).
+ returned: success
+ type: str
+ sample: text
+ value:
+ description: Value for the DHCP option.
+ returned: success
+ type: str
+ sample: 192.0.1.2
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+import json
+
+
+def fixed_ip_factory(meraki, data):
+ fixed_ips = dict()
+ for item in data:
+ fixed_ips[item['mac']] = {'ip': item['ip'], 'name': item['name']}
+ return fixed_ips
+
+
+def get_vlans(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ return meraki.request(path, method='GET')
+
+
+# TODO: Allow method to return actual item if True to reduce number of calls needed
+def is_vlan_valid(meraki, net_id, vlan_id):
+ vlans = get_vlans(meraki, net_id)
+ for vlan in vlans:
+ if vlan_id == vlan['id']:
+ return True
+ return False
+
+
+def construct_payload(meraki):
+ payload = {'id': meraki.params['vlan_id'],
+ 'name': meraki.params['name'],
+ 'subnet': meraki.params['subnet'],
+ 'applianceIp': meraki.params['appliance_ip'],
+ }
+ if meraki.params['dns_nameservers']:
+ if meraki.params['dns_nameservers'] not in ('opendns', 'google_dns', 'upstream_dns'):
+ payload['dnsNameservers'] = format_dns(meraki.params['dns_nameservers'])
+ else:
+ payload['dnsNameservers'] = meraki.params['dns_nameservers']
+ if meraki.params['fixed_ip_assignments']:
+ payload['fixedIpAssignments'] = fixed_ip_factory(meraki, meraki.params['fixed_ip_assignments'])
+ if meraki.params['reserved_ip_range']:
+ payload['reservedIpRanges'] = meraki.params['reserved_ip_range']
+ if meraki.params['vpn_nat_subnet']:
+ payload['vpnNatSubnet'] = meraki.params['vpn_nat_subnet']
+ if meraki.params['dhcp_handling']:
+ payload['dhcpHandling'] = normalize_dhcp_handling(meraki.params['dhcp_handling'])
+ if meraki.params['dhcp_relay_server_ips']:
+ payload['dhcpRelayServerIps'] = meraki.params['dhcp_relay_server_ips']
+ if meraki.params['dhcp_lease_time']:
+ payload['dhcpLeaseTime'] = meraki.params['dhcp_lease_time']
+ if meraki.params['dhcp_boot_next_server']:
+ payload['dhcpBootNextServer'] = meraki.params['dhcp_boot_next_server']
+ if meraki.params['dhcp_boot_filename']:
+ payload['dhcpBootFilename'] = meraki.params['dhcp_boot_filename']
+ if meraki.params['dhcp_options']:
+ payload['dhcpOptions'] = meraki.params['dhcp_options']
+ # if meraki.params['dhcp_handling']:
+ # meraki.fail_json(payload)
+
+ return payload
+
+
+def format_dns(nameservers):
+ return nameservers.replace(';', '\n')
+
+
+def normalize_dhcp_handling(parameter):
+ if parameter == 'none':
+ return 'Do not respond to DHCP requests'
+ elif parameter == 'server':
+ return 'Run a DHCP server'
+ elif parameter == 'relay':
+ return 'Relay DHCP to another server'
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ fixed_ip_arg_spec = dict(mac=dict(type='str'),
+ ip=dict(type='str'),
+ name=dict(type='str'),
+ )
+
+ reserved_ip_arg_spec = dict(start=dict(type='str'),
+ end=dict(type='str'),
+ comment=dict(type='str'),
+ )
+
+ dhcp_options_arg_spec = dict(code=dict(type='int'),
+ type=dict(type='str', choices=['text', 'ip', 'hex', 'integer']),
+ value=dict(type='str'),
+ )
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='query'),
+ net_name=dict(type='str', aliases=['network']),
+ net_id=dict(type='str'),
+ vlan_id=dict(type='int'),
+ name=dict(type='str', aliases=['vlan_name']),
+ subnet=dict(type='str'),
+ appliance_ip=dict(type='str'),
+ fixed_ip_assignments=dict(type='list', default=None, elements='dict', options=fixed_ip_arg_spec),
+ reserved_ip_range=dict(type='list', default=None, elements='dict', options=reserved_ip_arg_spec),
+ vpn_nat_subnet=dict(type='str'),
+ dns_nameservers=dict(type='str'),
+ dhcp_handling=dict(type='str', choices=['Run a DHCP server',
+ 'Relay DHCP to another server',
+ 'Do not respond to DHCP requests',
+ 'none',
+ 'server',
+ 'relay'],
+ ),
+ dhcp_relay_server_ips=dict(type='list', default=None, elements='str'),
+ dhcp_lease_time=dict(type='str', choices=['30 minutes',
+ '1 hour',
+ '4 hours',
+ '12 hours',
+ '1 day',
+ '1 week']),
+ dhcp_boot_options_enabled=dict(type='bool'),
+ dhcp_boot_next_server=dict(type='str'),
+ dhcp_boot_filename=dict(type='str'),
+ dhcp_options=dict(type='list', default=None, elements='dict', options=dhcp_options_arg_spec),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='vlan')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_urls = {'vlan': '/networks/{net_id}/appliance/vlans'}
+ query_url = {'vlan': '/networks/{net_id}/appliance/vlans/{vlan_id}'}
+ create_url = {'vlan': '/networks/{net_id}/appliance/vlans'}
+ update_url = {'vlan': '/networks/{net_id}/appliance/vlans/'}
+ delete_url = {'vlan': '/networks/{net_id}/appliance/vlans/'}
+
+ meraki.url_catalog['get_all'].update(query_urls)
+ meraki.url_catalog['get_one'].update(query_url)
+ meraki.url_catalog['create'] = create_url
+ meraki.url_catalog['update'] = update_url
+ meraki.url_catalog['delete'] = delete_url
+
+ payload = None
+
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+
+ if meraki.params['state'] == 'query':
+ if not meraki.params['vlan_id']:
+ meraki.result['data'] = get_vlans(meraki, net_id)
+ else:
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'vlan_id': meraki.params['vlan_id']})
+ response = meraki.request(path, method='GET')
+ meraki.result['data'] = response
+ elif meraki.params['state'] == 'present':
+ payload = construct_payload(meraki)
+ if is_vlan_valid(meraki, net_id, meraki.params['vlan_id']) is False: # Create new VLAN
+ if meraki.module.check_mode is True:
+ meraki.result['data'] = payload
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('create', net_id=net_id)
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ meraki.result['changed'] = True
+ meraki.result['data'] = response
+ else: # Update existing VLAN
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'vlan_id': meraki.params['vlan_id']})
+ original = meraki.request(path, method='GET')
+ ignored = ['networkId']
+ if meraki.is_update_required(original, payload, optional_ignore=ignored):
+ meraki.generate_diff(original, payload)
+ if meraki.module.check_mode is True:
+ original.update(payload)
+ meraki.result['changed'] = True
+ meraki.result['data'] = original
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id) + str(meraki.params['vlan_id'])
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ meraki.result['changed'] = True
+ meraki.result['data'] = response
+ meraki.generate_diff(original, response)
+ else:
+ if meraki.module.check_mode is True:
+ meraki.result['data'] = original
+ meraki.exit_json(**meraki.result)
+ meraki.result['data'] = original
+ elif meraki.params['state'] == 'absent':
+ if is_vlan_valid(meraki, net_id, meraki.params['vlan_id']):
+ if meraki.module.check_mode is True:
+ meraki.result['data'] = {}
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('delete', net_id=net_id) + str(meraki.params['vlan_id'])
+ response = meraki.request(path, 'DELETE')
+ meraki.result['changed'] = True
+ meraki.result['data'] = response
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_webhook.py b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_webhook.py
new file mode 100644
index 00000000..ec5574ad
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/plugins/modules/meraki_webhook.py
@@ -0,0 +1,347 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ 'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'
+}
+
+DOCUMENTATION = r'''
+---
+module: meraki_webhook
+short_description: Manage webhooks configured in the Meraki cloud
+description:
+- Configure and query information about webhooks within the Meraki cloud.
+notes:
+- Some of the options are likely only used for developers within Meraki.
+options:
+ state:
+ description:
+ - Specifies whether object should be queried, created/modified, or removed.
+ choices: [absent, present, query]
+ default: query
+ type: str
+ net_name:
+ description:
+ - Name of network which configuration is applied to.
+ aliases: [network]
+ type: str
+ net_id:
+ description:
+ - ID of network which configuration is applied to.
+ type: str
+ name:
+ description:
+ - Name of webhook.
+ type: str
+ shared_secret:
+ description:
+ - Secret password to use when accessing webhook.
+ type: str
+ url:
+ description:
+ - URL to access when calling webhook.
+ type: str
+ webhook_id:
+ description:
+ - Unique ID of webhook.
+ type: str
+ test:
+ description:
+ - Indicates whether to test or query status.
+ type: str
+ choices: [test]
+ test_id:
+ description:
+ - ID of webhook test query.
+ type: str
+author:
+- Kevin Breit (@kbreit)
+extends_documentation_fragment: cisco.meraki.meraki
+'''
+
+EXAMPLES = r'''
+- name: Create webhook
+ meraki_webhook:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ name: Test_Hook
+ url: https://webhook.url/
+ shared_secret: shhhdonttellanyone
+ delegate_to: localhost
+
+- name: Query one webhook
+ meraki_webhook:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ name: Test_Hook
+ delegate_to: localhost
+
+- name: Query all webhooks
+ meraki_webhook:
+ auth_key: abc123
+ state: query
+ org_name: YourOrg
+ net_name: YourNet
+ delegate_to: localhost
+
+- name: Delete webhook
+ meraki_webhook:
+ auth_key: abc123
+ state: absent
+ org_name: YourOrg
+ net_name: YourNet
+ name: Test_Hook
+ delegate_to: localhost
+
+- name: Test webhook
+ meraki_webhook:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ test: test
+ url: https://webhook.url/abc123
+ delegate_to: localhost
+
+- name: Get webhook status
+ meraki_webhook:
+ auth_key: abc123
+ state: present
+ org_name: YourOrg
+ net_name: YourNet
+ test: status
+ test_id: abc123531234
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+data:
+ description: List of administrators.
+ returned: success
+ type: complex
+ contains:
+ id:
+ description: Unique ID of webhook.
+ returned: success
+ type: str
+ sample: aHR0cHM6Ly93ZWJob22LnvpdGUvOGViNWI3NmYtYjE2Ny00Y2I4LTlmYzQtND32Mj3F5NzIaMjQ0
+ name:
+ description: Descriptive name of webhook.
+ returned: success
+ type: str
+ sample: Test_Hook
+ networkId:
+ description: ID of network containing webhook object.
+ returned: success
+ type: str
+ sample: N_12345
+ shared_secret:
+ description: Password for webhook.
+ returned: success
+ type: str
+ sample: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
+ url:
+ description: URL of webhook endpoint.
+ returned: success
+ type: str
+ sample: https://webhook.url/abc123
+ status:
+ description: Status of webhook test.
+ returned: success, when testing webhook
+ type: str
+ sample: enqueued
+'''
+
+from ansible.module_utils.basic import AnsibleModule, json
+from ansible_collections.cisco.meraki.plugins.module_utils.network.meraki.meraki import MerakiModule, meraki_argument_spec
+
+
+def get_webhook_id(name, webhooks):
+ for webhook in webhooks:
+ if name == webhook['name']:
+ return webhook['id']
+ return None
+
+
+def get_all_webhooks(meraki, net_id):
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ return response
+
+
+def sanitize_no_log_values(meraki):
+ try:
+ meraki.result['diff']['before']['shared_secret'] = 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
+ except KeyError:
+ pass
+ try:
+ meraki.result['data'][0]['shared_secret'] = 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
+ except KeyError:
+ pass
+ try:
+ meraki.result['data']['shared_secret'] = 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
+ except (KeyError, TypeError) as e:
+ pass
+
+
+def main():
+ # define the available arguments/parameters that a user can pass to
+ # the module
+
+ argument_spec = meraki_argument_spec()
+ argument_spec.update(state=dict(type='str', choices=['absent', 'present', 'query'], default='query'),
+ net_name=dict(type='str', aliases=['network']),
+ net_id=dict(type='str'),
+ name=dict(type='str'),
+ url=dict(type='str'),
+ shared_secret=dict(type='str', no_log=True),
+ webhook_id=dict(type='str'),
+ test=dict(type='str', choices=['test']),
+ test_id=dict(type='str'),
+ )
+
+ # the AnsibleModule object will be our abstraction working with Ansible
+ # this includes instantiation, a couple of common attr would be the
+ # args/params passed to the execution, as well as if the module
+ # supports check mode
+ module = AnsibleModule(argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+ meraki = MerakiModule(module, function='webhooks')
+
+ meraki.params['follow_redirects'] = 'all'
+
+ query_url = {'webhooks': '/networks/{net_id}/webhooks/httpServers'}
+ query_one_url = {'webhooks': '/networks/{net_id}/webhooks/httpServers/{hookid}'}
+ create_url = {'webhooks': '/networks/{net_id}/webhooks/httpServers'}
+ update_url = {'webhooks': '/networks/{net_id}/webhooks/httpServers/{hookid}'}
+ delete_url = {'webhooks': '/networks/{net_id}/webhooks/httpServers/{hookid}'}
+ test_url = {'webhooks': '/networks/{net_id}/webhooks/webhookTests'}
+ test_status_url = {'webhooks': '/networks/{net_id}/webhooks/webhookTests/{testid}'}
+
+ meraki.url_catalog['get_all'].update(query_url)
+ meraki.url_catalog['get_one'].update(query_one_url)
+ meraki.url_catalog['create'] = create_url
+ meraki.url_catalog['update'] = update_url
+ meraki.url_catalog['delete'] = delete_url
+ meraki.url_catalog['test'] = test_url
+ meraki.url_catalog['test_status'] = test_status_url
+
+ org_id = meraki.params['org_id']
+ if org_id is None:
+ org_id = meraki.get_org_id(meraki.params['org_name'])
+ net_id = meraki.params['net_id']
+ if net_id is None:
+ nets = meraki.get_nets(org_id=org_id)
+ net_id = meraki.get_net_id(net_name=meraki.params['net_name'], data=nets)
+ webhook_id = meraki.params['webhook_id']
+ webhooks = None
+ if webhook_id is None and meraki.params['name']:
+ webhooks = get_all_webhooks(meraki, net_id)
+ webhook_id = get_webhook_id(meraki.params['name'], webhooks)
+
+ if meraki.params['state'] == 'present' and meraki.params['test'] is None:
+ payload = {'name': meraki.params['name'],
+ 'url': meraki.params['url'],
+ 'sharedSecret': meraki.params['shared_secret']}
+
+ if meraki.params['state'] == 'query':
+ if webhook_id is not None: # Query a single webhook
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'hookid': webhook_id})
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ sanitize_no_log_values(meraki)
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['test_id'] is not None:
+ path = meraki.construct_path('test_status', net_id=net_id, custom={'testid': meraki.params['test_id']})
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ sanitize_no_log_values(meraki)
+ meraki.exit_json(**meraki.result)
+ else:
+ path = meraki.construct_path('get_all', net_id=net_id)
+ response = meraki.request(path, method='GET')
+ if meraki.status == 200:
+ meraki.result['data'] = response
+ # meraki.fail_json(msg=meraki.result)
+ sanitize_no_log_values(meraki)
+ meraki.exit_json(**meraki.result)
+ elif meraki.params['state'] == 'present':
+ if meraki.params['test'] == 'test':
+ payload = {'url': meraki.params['url']}
+ path = meraki.construct_path('test', net_id=net_id)
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ if meraki.status == 201:
+ meraki.result['data'] = response
+ meraki.exit_json(**meraki.result)
+ if webhook_id is None: # New webhook needs to be created
+ if meraki.check_mode is True:
+ meraki.result['data'] = payload
+ meraki.result['data']['networkId'] = net_id
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('create', net_id=net_id)
+ response = meraki.request(path, method='POST', payload=json.dumps(payload))
+ if meraki.status == 201:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else: # Need to update
+ path = meraki.construct_path('get_one', net_id=net_id, custom={'hookid': webhook_id})
+ original = meraki.request(path, method='GET')
+ if meraki.is_update_required(original, payload):
+ if meraki.check_mode is True:
+ meraki.generate_diff(original, payload)
+ sanitize_no_log_values(meraki)
+ original.update(payload)
+ meraki.result['data'] = original
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('update', net_id=net_id, custom={'hookid': webhook_id})
+ response = meraki.request(path, method='PUT', payload=json.dumps(payload))
+ if meraki.status == 200:
+ meraki.generate_diff(original, response)
+ sanitize_no_log_values(meraki)
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+ else:
+ meraki.result['data'] = original
+ elif meraki.params['state'] == 'absent':
+ if webhook_id is None: # Make sure it is downloaded
+ if webhooks is None:
+ webhooks = get_all_webhooks(meraki, net_id)
+ webhook_id = get_webhook_id(meraki.params['name'], webhooks)
+ if webhook_id is None:
+ meraki.fail_json(msg="There is no webhook with the name {0}".format(meraki.params['name']))
+ if webhook_id: # Test to see if it exists
+ if meraki.module.check_mode is True:
+ meraki.result['data'] = None
+ meraki.result['changed'] = True
+ meraki.exit_json(**meraki.result)
+ path = meraki.construct_path('delete', net_id=net_id, custom={'hookid': webhook_id})
+ response = meraki.request(path, method='DELETE')
+ if meraki.status == 204:
+ meraki.result['data'] = response
+ meraki.result['changed'] = True
+
+ # in the event of a successful module execution, you will want to
+ # simple AnsibleModule.exit_json(), passing the key/value results
+ meraki.exit_json(**meraki.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/inventory.networking b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/inventory.networking
new file mode 100644
index 00000000..ab895895
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/inventory.networking
@@ -0,0 +1,42 @@
+# This is the configuration template for ansible-test network-integration tests.
+#
+# You do not need this template if you are:
+#
+# 1) Running integration tests without using ansible-test.
+# 2) Using the `--platform` option to provision temporary network instances on EC2.
+#
+# If you do not want to use the automatically provisioned temporary network instances,
+# fill in the @VAR placeholders below and save this file without the .template extension.
+#
+# NOTE: Automatic provisioning of network instances on EC2 requires an ansible-core-ci API key.
+
+[meraki]
+localhost ansible_connection="local"
+
+[meraki:vars]
+auth_key=b4aa1133085792857ae08a22ed01bc99b7e9c97d
+test_org_id=133277
+test_org_name=kbreit@insight.com
+test_net_name=Home - Appliance
+test_net_id=N_624874448297678702
+test_switch_net_name=Home - Switch
+test_wireless_net_name=Home - Wireless
+test_appliance_net_name=Home - Appliance
+test_template_name=AnsibleTemplate
+test_template_id=L_624874448297661409
+email_prefix=meraki
+email_domain=kevinbreit.net
+serial=Q2BN-MCH8-VEL5
+serial_switch=Q2HP-2C6E-GTLD
+serial_wireless=Q2KD-83UG-JL8X
+serial_switch_l3=QBSB-VLNE-E299
+serial_appliance=Q2BN-MCH8-VEL5
+# serial=QBSC-HJSL-A64F
+# serial=Q2HD-DPPR-QTAE
+# serial=Q2HP-2C6E-GTLD
+
+###
+# Example
+#
+# [vyos]
+# vyos01.example.net ansible_connection=local ansible_network_os="vyos" ansible_user=admin ansible_ssh_pass=mypassword
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/inventory.networking.template b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/inventory.networking.template
new file mode 100644
index 00000000..3057b7f2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/inventory.networking.template
@@ -0,0 +1,37 @@
+# This is the configuration template for ansible-test network-integration tests.
+#
+# You do not need this template if you are:
+#
+# 1) Running integration tests without using ansible-test.
+# 2) Using the `--platform` option to provision temporary network instances on EC2.
+#
+# If you do not want to use the automatically provisioned temporary network instances,
+# fill in the @VAR placeholders below and save this file without the .template extension.
+#
+# NOTE: Automatic provisioning of network instances on EC2 requires an ansible-core-ci API key.
+
+[meraki]
+localhost ansible_connection="local"
+
+[meraki:vars]
+auth_key=abc1234567890
+test_org_id=12345
+test_org_name=YourOrg
+test_net_name=YourNet
+test_net_id=54321
+test_switch_net_name=Switch Net
+test_wireless_net_name=Wireless Net
+test_template_name=YourTemplate
+test_template_id=L_12345
+email_prefix=YourEmail
+email_domain=YourDomain
+serial=YourSerial
+serial_switch=YourSwitchSerial
+serial_switch_l3=YourL3SwitchSerial
+
+
+###
+# Example
+#
+# [vyos]
+# vyos01.example.net ansible_connection=local ansible_network_os="vyos" ansible_user=admin ansible_ssh_pass=mypassword
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/target-prefixes.network b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/target-prefixes.network
new file mode 100644
index 00000000..2516cd48
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/target-prefixes.network
@@ -0,0 +1 @@
+meraki
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_admin/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_admin/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_admin/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_admin/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_admin/tasks/main.yml
new file mode 100644
index 00000000..336f9e4f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_admin/tasks/main.yml
@@ -0,0 +1,404 @@
+# Test code for the Meraki Admin module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create new administrator in check mode
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: Jane Doe
+ email: '{{email_prefix}}+janedoe@{{email_domain}}'
+ org_access: read-only
+ delegate_to: localhost
+ check_mode: yes
+ register: create_org_check
+
+ - name: Create new admin check mode assertion
+ assert:
+ that:
+ - create_org_check is changed
+ - 'create_org_check.data.name == "Jane Doe"'
+
+ - name: Create new administrator
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: Jane Doe
+ email: '{{email_prefix}}+janedoe@{{email_domain}}'
+ org_access: read-only
+ delegate_to: localhost
+ register: create_orgaccess
+
+ - name: Create new admin assertion
+ assert:
+ that:
+ - create_orgaccess.changed == true
+ - 'create_orgaccess.data.name == "Jane Doe"'
+
+ - name: Delete recently created administrator with check mode
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ email: '{{email_prefix}}+janedoe@{{email_domain}}'
+ delegate_to: localhost
+ register: delete_one_check
+ check_mode: yes
+
+ - assert:
+ that:
+ - delete_one_check is changed
+
+ - name: Delete recently created administrator
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ email: '{{email_prefix}}+janedoe@{{email_domain}}'
+ delegate_to: localhost
+ register: delete_one
+
+ - name: Create new administrator with org_id
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ name: Jane Doe
+ email: '{{email_prefix}}+janedoe@{{email_domain}}'
+ orgAccess: read-only
+ delegate_to: localhost
+ register: create_orgaccess_id
+
+ - name: Create new admin assertion
+ assert:
+ that:
+ - create_orgaccess_id.changed == true
+ - 'create_orgaccess_id.data.name == "Jane Doe"'
+
+ - name: Create administrator with tags with check mode
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: John Doe
+ email: '{{email_prefix}}+johndoe@{{email_domain}}'
+ orgAccess: none
+ tags:
+ - tag: production
+ access: read-only
+ - tag: beta
+ access: full
+ delegate_to: localhost
+ register: create_tags_check
+ check_mode: yes
+
+ - assert:
+ that:
+ - create_tags_check is changed
+ - create_tags_check.data.name == "John Doe"
+ - create_tags_check.data.tags | length == 2
+
+ - name: Create administrator with tags
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: John Doe
+ email: '{{email_prefix}}+johndoe@{{email_domain}}'
+ orgAccess: none
+ tags:
+ - tag: production
+ access: read-only
+ - tag: beta
+ access: full
+ delegate_to: localhost
+ register: create_tags
+
+ - assert:
+ that:
+ - create_tags.changed == true
+ - create_tags.data.name == "John Doe"
+ - create_tags.data.tags | length == 2
+
+ - name: Create administrator with invalid tags
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: Jake Doe
+ email: '{{email_prefix}}+jakedoe@{{email_domain}}'
+ orgAccess: none
+ tags:
+ - tag: production
+ access: read-only
+ - tag: alpha
+ access: invalid
+ delegate_to: localhost
+ register: create_tags_invalid
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - '"400" in create_tags_invalid.msg'
+ - '"must be one of" in create_tags_invalid.msg'
+
+ - name: Create administrator with invalid tag permission
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: Jake Doe
+ email: '{{email_prefix}}+jakedoe@{{email_domain}}'
+ orgAccess: none
+ tags:
+ - tag: production
+ access: read-only
+ - tag: beta
+ access: invalid
+ delegate_to: localhost
+ register: create_tags_invalid_permission
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - '"400" in create_tags_invalid_permission.msg'
+ - '"must be one of" in create_tags_invalid_permission.msg'
+
+ - name: Make sure TestNet and TestNet2 are created
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{item}}'
+ type: switch
+ register: new_networks
+ loop:
+ - TestNet
+ - TestNet2
+
+ - set_fact:
+ testnet_id: new_networks.results[0].data.id
+ testnet2_id: new_networks.results[1].data.id
+
+ - name: Create administrator with networks with check mode
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: Jim Doe
+ email: '{{email_prefix}}+jimdoe@{{email_domain}}'
+ orgAccess: none
+ networks:
+ - network: TestNet
+ access: read-only
+ - id: testnet2_id
+ access: full
+ delegate_to: localhost
+ register: create_network_check
+ check_mode: yes
+
+ - assert:
+ that:
+ - create_network_check is changed
+ - create_network_check.data.name == "Jim Doe"
+ - create_network_check.data.networks | length == 2
+
+ - name: Create administrator with networks
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: Jim Doe
+ email: '{{email_prefix}}+jimdoe@{{email_domain}}'
+ orgAccess: none
+ networks:
+ - network: TestNet
+ access: read-only
+ - network: TestNet2
+ access: full
+ delegate_to: localhost
+ register: create_network
+
+ - assert:
+ that:
+ - create_network.changed == true
+ - create_network.data.name == "Jim Doe"
+ - create_network.data.networks | length == 2
+
+ - name: Update administrator with check mode
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: Jim Doe
+ email: '{{email_prefix}}+jimdoe@{{email_domain}}'
+ orgAccess: none
+ networks:
+ - network: TestNet
+ access: full
+ delegate_to: localhost
+ register: update_network_check
+ check_mode: yes
+
+ - debug:
+ var: update_network_check
+
+ - assert:
+ that:
+ - update_network_check is changed
+ - update_network_check.data.networks.0.access == "full"
+ - update_network_check.data.networks | length == 1
+
+ - name: Update administrator
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: Jim Doe
+ email: '{{email_prefix}}+jimdoe@{{email_domain}}'
+ orgAccess: none
+ networks:
+ - network: TestNet
+ access: full
+ delegate_to: localhost
+ register: update_network
+
+ - assert:
+ that:
+ - update_network.changed == true
+ - update_network.data.networks.0.access == "full"
+ - update_network.data.networks | length == 1
+
+ - name: Update administrator for idempotency check with check mode
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: Jim Doe
+ email: '{{email_prefix}}+jimdoe@{{email_domain}}'
+ orgAccess: none
+ networks:
+ - network: TestNet
+ access: full
+ delegate_to: localhost
+ register: update_network_idempotent_check
+ check_mode: yes
+
+ - debug:
+ var: update_network_idempotent_check
+
+ - assert:
+ that:
+ - update_network_idempotent_check is not changed
+
+ - name: Update administrator for idempotency
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: Jim Doe
+ email: '{{email_prefix}}+jimdoe@{{email_domain}}'
+ orgAccess: none
+ networks:
+ - network: TestNet
+ access: full
+ delegate_to: localhost
+ register: update_network_idempotent
+
+ - assert:
+ that:
+ - update_network_idempotent.changed == false
+ - update_network_idempotent.data is defined
+
+ - name: Create administrator with invalid network
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ name: John Doe
+ email: '{{email_prefix}}+John@{{email_domain}}'
+ orgAccess: none
+ networks:
+ - network: TestNetFake
+ access: read-only
+ delegate_to: localhost
+ register: create_network_invalid
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - '"No network found with the name" in create_network_invalid.msg'
+ # - '"400" in create_network_invalid.msg'
+
+ - name: Query all administrators
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ delegate_to: localhost
+ register: query_all
+
+ - debug:
+ var: query_all
+
+ - assert:
+ that:
+ - query_all.data | length == 4
+ - query_all.changed == False
+
+ - name: Query admin by name
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ name: Jane Doe
+ delegate_to: localhost
+ register: query_name
+
+ - name: Query admin by email
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ email: '{{email_prefix}}+janedoe@{{email_domain}}'
+ delegate_to: localhost
+ register: query_email
+
+ - assert:
+ that:
+ - query_name.data.name == "Jane Doe"
+ - 'query_email.data.email == "{{email_prefix}}+janedoe@{{email_domain}}"'
+
+ always:
+ #############################################################################
+ # Tear down starts here
+ #############################################################################
+ - name: Delete administrators
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ email: '{{item}}'
+ delegate_to: localhost
+ register: delete_all
+ ignore_errors: yes
+ loop:
+ - '{{email_prefix}}+janedoe@{{email_domain}}'
+ - '{{email_prefix}}+johndoe@{{email_domain}}'
+ - '{{email_prefix}}+jimdoe@{{email_domain}}'
+
+ - name: Query all administrators
+ meraki_admin:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ delegate_to: localhost
+ register: query_all_deleted
+
+ - assert:
+ that:
+ - query_all_deleted.data | length == 1 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_alert/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_alert/aliases
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_alert/aliases
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_alert/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_alert/tasks/main.yml
new file mode 100644
index 00000000..baf2a081
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_alert/tasks/main.yml
@@ -0,0 +1,174 @@
+# Test code for the Meraki modules
+# Copyright: (c) 2020, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create network with type wireless
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ type: wireless
+ timezone: America/Chicago
+ delegate_to: localhost
+
+ - name: Update settings with check mode
+ meraki_alert:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: present
+ default_destinations:
+ emails:
+ - '{{ email_prefix }}@{{ email_domain }}'
+ - '{{ email_prefix }}2@{{ email_domain }}'
+ all_admins: no
+ snmp: no
+ alerts:
+ - alert_type: "gatewayDown"
+ enabled: yes
+ filters:
+ timeout: 60
+ alert_destinations:
+ emails:
+ - '{{ email_prefix }}@{{ email_domain }}'
+ - '{{ email_prefix }}2@{{ email_domain }}'
+ all_admins: no
+ snmp: no
+ - alert_type: "usageAlert"
+ enabled: yes
+ filters:
+ period: 1200
+ threshold: 104857600
+ alert_destinations:
+ emails:
+ - '{{ email_prefix }}@{{ email_domain }}'
+ - '{{ email_prefix }}2@{{ email_domain }}'
+ all_admins: yes
+ snmp: no
+ delegate_to: localhost
+ register: update_check
+ check_mode: yes
+
+ - assert:
+ that:
+ - update_check.data is defined
+ - update_check.diff is defined
+ - update_check is changed
+
+ - name: Update settings
+ meraki_alert:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: present
+ default_destinations:
+ emails:
+ - '{{ email_prefix }}@{{ email_domain }}'
+ - '{{ email_prefix }}2@{{ email_domain }}'
+ all_admins: no
+ snmp: no
+ alerts:
+ - alert_type: "gatewayDown"
+ enabled: yes
+ filters:
+ timeout: 60
+ alert_destinations:
+ emails:
+ - '{{ email_prefix }}@{{ email_domain }}'
+ - '{{ email_prefix }}2@{{ email_domain }}'
+ all_admins: no
+ snmp: no
+ - alert_type: "usageAlert"
+ enabled: yes
+ filters:
+ period: 1200
+ threshold: 104857600
+ alert_destinations:
+ emails:
+ - '{{ email_prefix }}@{{ email_domain }}'
+ - '{{ email_prefix }}2@{{ email_domain }}'
+ all_admins: yes
+ snmp: no
+ delegate_to: localhost
+ register: update
+
+ - assert:
+ that:
+ - update.data is defined
+ - update.diff is defined
+ - update is changed
+
+ - name: Update settings idempotent
+ meraki_alert:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: present
+ default_destinations:
+ emails:
+ - '{{ email_prefix }}@{{ email_domain }}'
+ - '{{ email_prefix }}2@{{ email_domain }}'
+ all_admins: no
+ snmp: no
+ alerts:
+ - alert_type: "gatewayDown"
+ enabled: yes
+ filters:
+ timeout: 60
+ alert_destinations:
+ emails:
+ - '{{ email_prefix }}@{{ email_domain }}'
+ - '{{ email_prefix }}2@{{ email_domain }}'
+ all_admins: no
+ snmp: no
+ - alert_type: "usageAlert"
+ enabled: yes
+ filters:
+ period: 1200
+ threshold: 104857600
+ alert_destinations:
+ emails:
+ - '{{ email_prefix }}@{{ email_domain }}'
+ - '{{ email_prefix }}2@{{ email_domain }}'
+ all_admins: yes
+ snmp: no
+ delegate_to: localhost
+ register: update_idempotent
+
+ - assert:
+ that:
+ - update_idempotent.data is defined
+ - update_idempotent is not changed
+
+ - name: Query all settings
+ meraki_alert:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: query
+ delegate_to: localhost
+ register: query_all
+
+ - debug:
+ var: query_all
+
+ - assert:
+ that:
+ - query_all.data is defined
+
+
+#############################################################################
+# Tear down starts here
+#############################################################################
+
+ always:
+ - name: Delete network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_config_template/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_config_template/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_config_template/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_config_template/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_config_template/tasks/main.yml
new file mode 100644
index 00000000..7bfc5e0b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_config_template/tasks/main.yml
@@ -0,0 +1,196 @@
+# Test code for the Meraki Organization module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Query all configuration templates
+ meraki_config_template:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ register: get_all
+
+ - name: Delete non-existant configuration template
+ meraki_config_template:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ config_template: FakeConfigTemplate
+ register: deleted
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - '"No configuration template named" in deleted.msg'
+
+ - name: Create a network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: '{{ test_net_name }}'
+ type: appliance
+ delegate_to: localhost
+ register: net_info
+
+ - set_fact:
+ net_id: '{{net_info.data.id}}'
+
+ - name: Bind a template to a network with check mode
+ meraki_config_template:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: '{{ test_net_name }}'
+ config_template: '{{test_template_name}}'
+ check_mode: yes
+ register: bind_check
+
+ - name: Bind a template to a network
+ meraki_config_template:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: '{{ test_net_name }}'
+ config_template: '{{test_template_name}}'
+ register: bind
+
+ - assert:
+ that:
+ bind.changed == True
+
+ - assert:
+ that:
+ bind_check is changed
+
+ - name: Bind a template to a network when it's already bound
+ meraki_config_template:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: '{{ test_net_name }}'
+ config_template: '{{test_template_name}}'
+ register: bind_invalid
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - bind_invalid.changed == False
+
+ - name: Unbind a template from a network
+ meraki_config_template:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{ test_org_name }}'
+ net_name: '{{ test_net_name }}'
+ config_template: '{{test_template_name}}'
+ register: unbind
+
+ - assert:
+ that:
+ unbind.changed == True
+
+ - name: Unbind a template from a network when it's not bound
+ meraki_config_template:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{ test_org_name }}'
+ net_name: '{{ test_net_name }}'
+ config_template: '{{test_template_name}}'
+ register: unbind_invalid
+
+ - assert:
+ that:
+ unbind_invalid.changed == False
+
+ - name: Bind a template to a network via id
+ meraki_config_template:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_id: '{{net_id}}'
+ config_template: '{{test_template_name}}'
+ register: bind_id
+
+ - assert:
+ that:
+ bind_id.changed == True
+
+ - name: Bind a template to a network via id for idempotency
+ meraki_config_template:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_id: '{{net_id}}'
+ config_template: '{{test_template_name}}'
+ register: bind_id_idempotent
+
+ - assert:
+ that:
+ - bind_id_idempotent.changed == False
+ - bind_id_idempotent.data is defined
+
+ - name: Unbind a template from a network via id with check mode
+ meraki_config_template:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_id: '{{net_id}}'
+ config_template: '{{test_template_name}}'
+ check_mode: yes
+ register: unbind_id_check
+
+ - assert:
+ that:
+ unbind_id_check is changed
+
+ - name: Unbind a template from a network via id
+ meraki_config_template:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_id: '{{net_id}}'
+ config_template: '{{test_template_name}}'
+ register: unbind_id
+
+ - assert:
+ that:
+ unbind_id.changed == True
+
+ # This is disabled by default since they can't be created via API
+ # - name: Delete sacrificial template with check mode
+ # meraki_config_template:
+ # auth_key: '{{auth_key}}'
+ # state: absent
+ # org_name: '{{test_org_name}}'
+ # config_template: sacrificial_template
+ # check_mode: yes
+ # register: delete_template_check
+
+ # This is disabled by default since they can't be created via API
+ # - name: Delete sacrificial template
+ # meraki_config_template:
+ # auth_key: '{{auth_key}}'
+ # state: absent
+ # org_name: '{{test_org_name}}'
+ # config_template: sacrificial_template
+ # output_level: debug
+ # register: delete_template
+
+ # - debug:
+ # var: delete_template
+
+ always:
+ - name: Delete network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{ test_org_name }}'
+ net_name: '{{ test_net_name }}'
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_content_filtering/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_content_filtering/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_content_filtering/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_content_filtering/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_content_filtering/tasks/main.yml
new file mode 100644
index 00000000..a3a5210f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_content_filtering/tasks/main.yml
@@ -0,0 +1,254 @@
+# Test code for the Meraki Content Filteringmodule
+# Copyright: (c) 2019, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ type: appliance
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_appliance
+
+ - name: Test net_name and id exclusivity
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ net_id: 12345
+ state: present
+ allowed_urls:
+ - "http://www.ansible.com/*"
+ register: net_exclusive
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - 'net_exclusive.msg == "net_name and net_id are mutually exclusive"'
+
+ - name: Set single allowed URL pattern with check mode
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ allowed_urls:
+ - "http://www.ansible.com/*"
+ register: single_allowed_check
+ check_mode: yes
+
+ - assert:
+ that:
+ - single_allowed_check.data.allowed_url_patterns | length == 1
+ - single_allowed_check is changed
+
+ - name: Set single allowed URL pattern
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ allowed_urls:
+ - "http://www.ansible.com/*"
+ register: single_allowed
+
+ - assert:
+ that:
+ - single_allowed.data.allowed_url_patterns | length == 1
+
+ - name: Set single allowed URL pattern for idempotency with check mode
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ allowed_urls:
+ - "http://www.ansible.com/*"
+ register: single_allowed_idempotent_check
+ check_mode: yes
+
+ - debug:
+ var: single_allowed_idempotent_check
+
+ - assert:
+ that:
+ - single_allowed_idempotent_check is not changed
+ - single_allowed.data.allowed_url_patterns | length == 1
+
+ - name: Set single allowed URL pattern for idempotency
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ allowed_urls:
+ - "http://www.ansible.com/*"
+ register: single_allowed_idempotent
+
+ - debug:
+ var: single_allowed_idempotent
+
+ - assert:
+ that:
+ - single_allowed_idempotent.changed == False
+ - single_allowed_idempotent.data is defined
+
+ - name: Set single blocked URL pattern
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ blocked_urls:
+ - "http://www.ansible.com/*"
+ register: single_blocked
+
+ - debug:
+ var: single_blocked
+
+ - assert:
+ that:
+ - single_blocked.data.blocked_url_patterns | length == 1
+
+ - name: Set two allowed URL pattern
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ allowed_urls:
+ - "http://www.ansible.com/*"
+ - "http://www.redhat.com"
+ register: two_allowed
+
+ - debug:
+ var: two_allowed
+
+ - assert:
+ that:
+ - two_allowed.changed == True
+ - two_allowed.data.allowed_url_patterns | length == 2
+
+ - name: Set blocked URL category
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ category_list_size: full list
+ blocked_categories:
+ - "Adult and Pornography"
+ register: blocked_category
+
+ - debug:
+ var: blocked_category
+
+ - assert:
+ that:
+ - blocked_category.changed == True
+ - blocked_category.data.blocked_url_categories | length == 1
+ - blocked_category.data.url_category_list_size == "fullList"
+
+ - name: Set blocked URL category with top sites
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ category_list_size: top sites
+ blocked_categories:
+ - "Adult and Pornography"
+ register: blocked_category
+
+ - debug:
+ var: blocked_category
+
+ - assert:
+ that:
+ - blocked_category.changed == True
+ - blocked_category.data.blocked_url_categories | length == 1
+ - blocked_category.data.url_category_list_size == "topSites"
+
+ - name: Query all content filtering information
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: query
+ delegate_to: localhost
+ register: query_all
+
+ - debug:
+ var: query_all
+
+ - name: Query all content filtering assertion
+ assert:
+ that:
+ - query_all.data.categories is defined
+ - query_all.data.policy is defined
+
+ - name: Query categories
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: query
+ subset: categories
+ delegate_to: localhost
+ register: query_categories
+
+ - debug:
+ var: query_categories
+
+ - name: Query categories assertion
+ assert:
+ that:
+ - query_categories.data is defined
+
+ - name: Query content filtering policies
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ subset: policy
+ state: query
+ delegate_to: localhost
+ register: query_policy
+
+ - debug:
+ var: query_policy
+
+ - name: Query contnet filtering policy assertion
+ assert:
+ that:
+ - query_policy.data is defined
+
+ always:
+ - name: Reset policies
+ meraki_content_filtering:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ category_list_size: full list
+ allowed_urls:
+ -
+ blocked_urls:
+ -
+
+ - name: Delete network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_device/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_device/aliases
new file mode 100644
index 00000000..89aea537
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_device/aliases
@@ -0,0 +1 @@
+unsupported \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_device/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_device/tasks/main.yml
new file mode 100644
index 00000000..4b999c41
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_device/tasks/main.yml
@@ -0,0 +1,246 @@
+---
+- block:
+ # This is commented out because a device cannot be unclaimed via API
+ # - name: Claim a device into an organization
+ # meraki_device:
+ # auth_key: '{{auth_key}}'
+ # org_name: '{{test_org_name}}'
+ # serial: '{{serial}}'
+ # state: present
+ # delegate_to: localhost
+ # register: claim_device_org
+
+ # - assert:
+ # that:
+ # - claim_device_org.changed == true
+
+ - name: Create network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ type: appliance
+ state: present
+ register: net_info
+
+ - set_fact:
+ net_id: '{{net_info.data.id}}'
+
+ - name: Query status of all devices in an organization
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ state: query
+ delegate_to: localhost
+ register: query_device_org
+
+ - debug:
+ msg: '{{query_device_org}}'
+
+ - name: Claim a device into a network
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ serial: '{{serial}}'
+ state: present
+ delegate_to: localhost
+ register: claim_device
+
+ - debug:
+ msg: '{{claim_device}}'
+
+ - assert:
+ that:
+ - claim_device.changed == true
+
+ - name: Query all devices in one network by network ID
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_id: '{{net_id}}'
+ state: query
+ delegate_to: localhost
+ register: query_one_net_id
+
+ - debug:
+ msg: '{{query_one_net_id}}'
+
+ - name: Query all devices in one network
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: query
+ delegate_to: localhost
+ register: query_one_net
+
+ - debug:
+ msg: '{{query_one_net}}'
+
+ - name: Query device by serial
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ serial: '{{serial}}'
+ state: query
+ delegate_to: localhost
+ register: query_serial_no_net
+
+ - debug:
+ msg: '{{query_serial_no_net}}'
+
+ - name: Query device by serial
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ serial: '{{serial}}'
+ state: query
+ delegate_to: localhost
+ register: query_serial
+
+ - debug:
+ msg: '{{query_serial}}'
+
+ - assert:
+ that:
+ - query_serial.changed == False
+
+ - name: Query uplink information for a device
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ serial: '{{serial}}'
+ state: query
+ query: uplink
+ delegate_to: localhost
+ register: query_serial_uplink
+
+ - debug:
+ msg: '{{query_serial_uplink}}'
+
+ - name: Query LLDP/CDP information about a device
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ serial: '{{serial}}'
+ lldp_cdp_timespan: 6000
+ state: query
+ query: lldp_cdp
+ delegate_to: localhost
+ register: query_serial_lldp_cdp
+
+ - debug:
+ msg: '{{query_serial_lldp_cdp}}'
+
+ - name: Query a device by hostname
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ hostname: test-hostname
+ state: query
+ delegate_to: localhost
+ register: query_hostname
+
+ - debug:
+ msg: '{{query_hostname}}'
+
+ - name: Query a device by model
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ model: MR26
+ state: query
+ delegate_to: localhost
+ register: query_model
+
+ - debug:
+ msg: '{{query_model}}'
+
+ - name: Change device name for future test
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ serial: '{{serial}}'
+ hostname: mx60-temporary
+ address: 1060 W. Addison St., Chicago, IL
+ lat: 41.948038
+ lng: -87.65568
+ tags: recently-added
+ state: present
+ move_map_marker: True
+ note: Test device notes
+ delegate_to: localhost
+ register: update_device
+
+ - name: Update a device
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ serial: '{{serial}}'
+ hostname: mx60
+ address: 1060 W. Addison St., Chicago, IL
+ lat: 41.948038
+ lng: -87.65568
+ tags: recently-added
+ state: present
+ move_map_marker: True
+ note: Test device notes
+ delegate_to: localhost
+ register: update_device
+
+ - assert:
+ that:
+ - update_device.changed == true
+ - update_device.data.0.notes == "Test device notes"
+ - '"1060 W. Addison St., Chicago, IL" in update_device.data.0.address'
+
+ - name: Update a device with idempotency
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ serial: '{{serial}}'
+ name: mx60
+ address: 1060 W. Addison St., Chicago, IL
+ lat: 41.948038
+ lng: -87.65568
+ tags: recently-added
+ state: present
+ move_map_marker: True
+ note: Test device notes
+ delegate_to: localhost
+ register: update_device_idempotent
+
+ - debug:
+ msg: '{{update_device_idempotent}}'
+
+ - assert:
+ that:
+ - update_device_idempotent.changed == False
+ - update_device_idempotent.data is defined
+
+ always:
+ - name: Remove a device from a network
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ serial: '{{serial}}'
+ state: absent
+ delegate_to: localhost
+ register: delete_device
+
+ - debug:
+ msg: '{{delete_device}}'
+
+ - assert:
+ that:
+ - delete_device.changed == true \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_firewalled_services/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_firewalled_services/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_firewalled_services/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_firewalled_services/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_firewalled_services/tasks/main.yml
new file mode 100644
index 00000000..60aa04a9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_firewalled_services/tasks/main.yml
@@ -0,0 +1,7 @@
+# Test code for the Meraki Firewalled Services module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- name: Run test cases
+ include: tests.yml ansible_connection=local
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_firewalled_services/tasks/tests.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_firewalled_services/tasks/tests.yml
new file mode 100644
index 00000000..29a41f5f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_firewalled_services/tasks/tests.yml
@@ -0,0 +1,212 @@
+# Test code for the Meraki modules
+# Copyright: (c) 2019, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ type: appliance
+ register: create
+
+ - set_fact:
+ net_id: '{{create.data.id}}'
+
+ - name: Set icmp service to blocked with check mode
+ meraki_firewalled_services:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ service: ICMP
+ access: blocked
+ register: icmp_blocked_check
+ check_mode: yes
+
+ - debug:
+ var: icmp_blocked_check
+
+ - assert:
+ that:
+ - icmp_blocked_check.data is defined
+ - icmp_blocked_check is changed
+
+ - name: Set icmp service to blocked
+ meraki_firewalled_services:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ service: ICMP
+ access: blocked
+ register: icmp_blocked
+
+ - debug:
+ var: icmp_blocked
+
+ - assert:
+ that:
+ - icmp_blocked.data is defined
+ - icmp_blocked is changed
+
+ - name: Set icmp service to blocked with idempotency
+ meraki_firewalled_services:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ service: ICMP
+ access: blocked
+ register: icmp_blocked_idempotent
+
+ - debug:
+ var: icmp_blocked_idempotent
+
+ - assert:
+ that:
+ - icmp_blocked_idempotent.data is defined
+ - icmp_blocked_idempotent is not changed
+
+ - name: Set icmp service to restricted with check mode
+ meraki_firewalled_services:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ service: web
+ access: restricted
+ allowed_ips:
+ - 192.0.1.1
+ - 192.0.1.2
+ check_mode: yes
+ register: web_restricted_check
+
+ - debug:
+ var: web_restricted_check
+
+ - assert:
+ that:
+ - web_restricted_check.data is defined
+ - web_restricted_check is changed
+
+ - name: Set icmp service to restricted
+ meraki_firewalled_services:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ service: web
+ access: restricted
+ allowed_ips:
+ - 192.0.1.1
+ - 192.0.1.2
+ register: web_restricted
+
+ - debug:
+ var: web_restricted
+
+ - assert:
+ that:
+ - web_restricted.data is defined
+ - web_restricted is changed
+
+ - name: Set icmp service to restricted with idempotency
+ meraki_firewalled_services:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ service: web
+ access: restricted
+ allowed_ips:
+ - 192.0.1.1
+ - 192.0.1.2
+ register: web_restricted_idempotent
+
+ - debug:
+ var: web_restricted_idempotent
+
+ - assert:
+ that:
+ - web_restricted_idempotent.data is defined
+ - web_restricted_idempotent is not changed
+
+ - name: Test error for access restricted and allowed_ips
+ meraki_firewalled_services:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ service: web
+ access: unrestricted
+ allowed_ips:
+ - 192.0.1.1
+ - 192.0.1.2
+ register: access_error
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - 'access_error.msg == "allowed_ips is only allowed when access is restricted."'
+
+ - name: Query appliance services with net_id
+ meraki_firewalled_services:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_id: '{{net_id}}'
+ register: query_appliance_id
+
+ - debug:
+ var: query_appliance_id
+
+ - assert:
+ that:
+ - query_appliance_id.data is defined
+
+
+ - name: Query appliance services
+ meraki_firewalled_services:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ register: query_appliance
+
+ - debug:
+ var: query_appliance
+
+ - assert:
+ that:
+ - query_appliance.data is defined
+
+ - name: Query services
+ meraki_firewalled_services:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ service: ICMP
+ register: query_service
+
+ - debug:
+ var: query_service
+
+ - assert:
+ that:
+ - query_service.data is defined
+
+#############################################################################
+# Tear down starts here
+#############################################################################
+ always:
+ - name: Delete all networks
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_intrusion_prevention/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_intrusion_prevention/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_intrusion_prevention/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_intrusion_prevention/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_intrusion_prevention/tasks/main.yml
new file mode 100644
index 00000000..f671fc92
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_intrusion_prevention/tasks/main.yml
@@ -0,0 +1,7 @@
+# Test code for the Meraki Webhooks module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- name: Run test cases
+ include: tests.yml ansible_connection=local
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_intrusion_prevention/tasks/tests.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_intrusion_prevention/tasks/tests.yml
new file mode 100644
index 00000000..3ac1933e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_intrusion_prevention/tasks/tests.yml
@@ -0,0 +1,312 @@
+# Test code for the Meraki IPS module
+# Copyright: (c) 2019, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - IPS'
+ type: appliance
+ register: net
+
+ - debug:
+ var: net
+
+ - name: Set allowed rules for organization in check mode
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ allowed_rules:
+ - rule_id: "meraki:intrusion/snort/GID/01/SID/5805"
+ message: Test rule
+ check_mode: yes
+ register: create_org_check
+
+ - assert:
+ that:
+ - create_org_check is changed
+ - create_org_check.data is defined
+
+ - name: Set allowed rules for organization
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ allowed_rules:
+ - rule_id: "meraki:intrusion/snort/GID/01/SID/5805"
+ message: Test rule
+ register: create_org
+
+ - assert:
+ that:
+ - create_org is changed
+ - create_org.data is defined
+ - create_org.data.allowed_rules | length == 1
+
+ - name: Set allowed rules for organization with idempotency
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ allowed_rules:
+ - rule_id: "meraki:intrusion/snort/GID/01/SID/5805"
+ message: Test rule
+ register: create_org_idempotent
+
+ - assert:
+ that:
+ - create_org_idempotent is not changed
+ - create_org_idempotent.data is defined
+
+ - name: Query IPS info for organization
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ register: query_org
+
+ - assert:
+ that:
+ - query_org.data.allowed_rules is defined
+
+ - name: Set mode to prevention with check mode
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - IPS'
+ mode: prevention
+ check_mode: yes
+ register: mode_check
+
+ - assert:
+ that:
+ - mode_check is changed
+ - mode_check.data is defined
+
+ - name: Set mode to prevention
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - IPS'
+ mode: prevention
+ register: mode
+
+ - debug:
+ var: mode
+
+ - assert:
+ that:
+ - mode is changed
+ - mode.data.mode is defined
+
+ - name: Set mode to prevention with idempotency
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - IPS'
+ mode: prevention
+ register: mode_idempotent
+
+ - debug:
+ var: mode_idempotent
+
+ - assert:
+ that:
+ - mode_idempotent is not changed
+ - mode_idempotent.data.mode is defined
+
+ - name: Set full ruleset with check mode
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - IPS'
+ mode: prevention
+ ids_rulesets: security
+ protected_networks:
+ use_default: true
+ included_cidr:
+ - 192.0.1.0/24
+ excluded_cidr:
+ - 10.0.1.0/24
+ check_mode: yes
+ register: full_check
+
+ - debug:
+ var: full_check
+
+ - assert:
+ that:
+ - full_check is changed
+ - full_check.data.mode is defined
+
+ # Meraki says protectedNetworks isn't supported on layer 3 firewalls
+ # Passthrough mode cannot be set via API
+ # - name: Set full ruleset
+ # meraki_intrusion_prevention:
+ # auth_key: '{{auth_key}}'
+ # state: present
+ # org_name: '{{test_org_name}}'
+ # net_name: '{{test_net_name}} - IPS'
+ # mode: detection
+ # ids_rulesets: security
+ # protected_networks:
+ # use_default: true
+ # included_cidr:
+ # - 192.0.1.0/24
+ # excluded_cidr:
+ # - 10.0.1.0/24
+ # delegate_to: localhost
+ # register: full
+
+ # - debug:
+ # var: full
+
+ # - assert:
+ # that:
+ # - full is changed
+ # - full.data.mode is defined
+
+ # Meraki says protectedNetworks isn't supported on layer 3 firewalls
+ # Passthrough mode cannot be set via API
+ # - name: Set full ruleset with idempotency
+ # meraki_intrusion_prevention:
+ # auth_key: '{{auth_key}}'
+ # state: present
+ # org_name: '{{test_org_name}}'
+ # net_name: '{{test_net_name}} - IPS'
+ # mode: prevention
+ # ids_rulesets: security
+ # protected_networks:
+ # use_default: true
+ # included_cidr:
+ # - 192.0.1.0/24
+ # excluded_cidr:
+ # - 10.0.1.0/24
+ # delegate_to: localhost
+ # register: full_idempotent
+
+ # - debug:
+ # var: full_idempotent
+
+ # - assert:
+ # that:
+ # - full_idempotent is not changed
+ # - full_idempotent.data.mode is defined
+
+ - name: Query IPS info for network
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - IPS'
+ register: query_net
+
+ - assert:
+ that:
+ - query_net is defined
+
+ - name: Test use_default error with included_cidr
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - IPS'
+ mode: prevention
+ ids_rulesets: security
+ protected_networks:
+ use_default: false
+ excluded_cidr:
+ - 10.0.1.0/24
+ check_mode: yes
+ register: included_missing
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - 'included_missing.msg == "included_cidr is required when use_default is False."'
+
+ - name: Test use_default error with included_cidr
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - IPS'
+ mode: prevention
+ ids_rulesets: security
+ protected_networks:
+ use_default: false
+ included_cidr:
+ - 10.0.1.0/24
+ check_mode: yes
+ register: excluded_missing
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - 'excluded_missing.msg == "excluded_cidr is required when use_default is False."'
+
+ # #############################################################################
+ # # Tear down starts here
+ # #############################################################################
+ always:
+ - name: Delete network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - IPS'
+ register: delete_net
+
+ - name: Clear rules from organization with check mode
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ allowed_rules: []
+ check_mode: yes
+ register: cleared
+
+ - assert:
+ that:
+ - cleared is changed
+ - cleared.data is defined
+
+ - name: Clear rules from organization
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ allowed_rules: []
+ - name: Clear rules from organization with idempotency
+ meraki_intrusion_prevention:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ allowed_rules: []
+ register: del_idempotent
+
+ - assert:
+ that:
+ - del_idempotent is not changed
+ - del_idempotent.data is defined
+
+ - name: Delete test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - IPS'
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_malware/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_malware/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_malware/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_malware/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_malware/tasks/main.yml
new file mode 100644
index 00000000..bab98cd0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_malware/tasks/main.yml
@@ -0,0 +1,253 @@
+# Test code for the Meraki VLAN module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Malware'
+ type: appliance
+ delegate_to: localhost
+ register: net
+
+ - set_fact:
+ net_id: '{{net.data.id}}'
+
+ - name: Enable malware protection with check mode
+ meraki_malware:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Malware'
+ mode: enabled
+ delegate_to: localhost
+ check_mode: yes
+ register: get_malware_check
+
+ - assert:
+ that:
+ - get_malware_check is changed
+ - get_malware_check.data is defined
+
+ - name: Enable malware protection
+ meraki_malware:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Malware'
+ mode: enabled
+ delegate_to: localhost
+ register: get_malware
+
+ - debug:
+ var: get_malware
+
+ - assert:
+ that:
+ - get_malware is changed
+ - get_malware.data.mode is defined
+
+ - name: Enable malware protection with idempotency
+ meraki_malware:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Malware'
+ mode: enabled
+ delegate_to: localhost
+ register: get_malware_idempotent
+
+ - debug:
+ var: get_malware_idempotent
+
+ - assert:
+ that:
+ - get_malware_idempotent is not changed
+ - get_malware_idempotent.data is defined
+
+ - name: Test error when mode is not set
+ meraki_malware:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Malware'
+ allowed_files:
+ - sha256: e82c5f7d75004727e1f3b94426b9a11c8bc4c312a9170ac9a73abace40aef503
+ comment: random zip
+ delegate_to: localhost
+ register: test_mode_err
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - test_mode_err.msg == "mode must be set when allowed_files or allowed_urls is set."
+
+ - name: Set whitelisted file with check mode
+ meraki_malware:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Malware'
+ mode: enabled
+ allowed_files:
+ - sha256: e82c5f7d75004727e1f3b94426b9a11c8bc4c312a9170ac9a73abace40aef503
+ comment: random zip
+ delegate_to: localhost
+ check_mode: yes
+ register: set_file_check
+
+ - debug:
+ var:
+ set_file_check
+
+ - assert:
+ that:
+ - set_file_check is changed
+ - set_file_check.data is defined
+
+ - name: Set whitelisted file
+ meraki_malware:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_id: '{{net_id}}'
+ mode: enabled
+ allowed_files:
+ - sha256: e82c5f7d75004727e1f3b94426b9a11c8bc4c312a9170ac9a73abace40aef503
+ comment: random zip
+ delegate_to: localhost
+ register: set_file
+
+ - debug:
+ var: set_file
+
+ - assert:
+ that:
+ - set_file is changed
+ - set_file.data.mode is defined
+
+ - name: Set whitelisted file with idempotency
+ meraki_malware:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Malware'
+ mode: enabled
+ allowed_files:
+ - sha256: e82c5f7d75004727e1f3b94426b9a11c8bc4c312a9170ac9a73abace40aef503
+ comment: random zip
+ delegate_to: localhost
+ register: set_file_idempotent
+
+ - debug:
+ var: set_file_idempotent
+
+ - assert:
+ that:
+ - set_file_idempotent is not changed
+ - set_file_idempotent.data is defined
+
+ - name: Set whitelisted url with check mode
+ meraki_malware:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Malware'
+ mode: enabled
+ allowed_urls:
+ - url: www.ansible.com
+ comment: Ansible
+ - url: www.google.com
+ comment: Google
+ delegate_to: localhost
+ check_mode: yes
+ register: set_url_check
+
+ - debug:
+ var:
+ set_url_check
+
+ - assert:
+ that:
+ - set_url_check is changed
+ - set_url_check.data is defined
+
+ - name: Set whitelisted url
+ meraki_malware:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Malware'
+ mode: enabled
+ allowed_urls:
+ - url: www.ansible.com
+ comment: Ansible
+ - url: www.google.com
+ comment: Google
+ delegate_to: localhost
+ register: set_url
+
+ - debug:
+ var: set_url
+
+ - assert:
+ that:
+ - set_url is changed
+ - set_url.data.mode is defined
+
+ - name: Set whitelisted url with idempotency
+ meraki_malware:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Malware'
+ mode: enabled
+ allowed_urls:
+ - url: www.ansible.com
+ comment: Ansible
+ - url: www.google.com
+ comment: Google
+ delegate_to: localhost
+ register: set_url_idempotent
+
+ - debug:
+ var: set_url_idempotent
+
+ - assert:
+ that:
+ - set_url_idempotent is not changed
+ - set_url_idempotent.data is defined
+
+ - name: Get malware settings
+ meraki_malware:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Malware'
+ delegate_to: localhost
+ register: get_malware
+
+ - assert:
+ that:
+ - get_malware.data is defined
+
+ #############################################################################
+ # Tear down starts here
+ #############################################################################
+ always:
+ - name: Delete test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Malware'
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_management_interface/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_management_interface/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_management_interface/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_management_interface/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_management_interface/tasks/main.yml
new file mode 100644
index 00000000..28337707
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_management_interface/tasks/main.yml
@@ -0,0 +1,273 @@
+# Test code for the Meraki Management Interface module
+# Copyright: (c) 2019, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - set_fact:
+ net_name: TestNet - Appliance
+
+ - name: 'Create test network {{net_name}}'
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ net_name: '{{net_name}}'
+ type: appliance
+ delegate_to: localhost
+ register: net
+
+ - set_fact:
+ net_id: '{{net.data.id}}'
+
+ - name: Test providing wan_enabled to an MS network
+ meraki_management_interface:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ net_id: '{{test_switch_net_name}}'
+ serial: '{{serial_switch}}'
+ wan1:
+ wan_enabled: enabled
+ using_static_ip: false
+ delegate_to: localhost
+ register: ms_not_configured
+
+ - debug:
+ var: ms_not_configured
+
+ - assert:
+ that:
+ - ms_not_configured.data is defined
+
+ - name: Set management interface on switch
+ meraki_management_interface:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ net_id: '{{test_switch_net_name}}'
+ serial: '{{serial_switch}}'
+ wan1:
+ using_static_ip: no
+ vlan: 3
+ delegate_to: localhost
+ register: set_switch_mgmt
+
+ - debug:
+ var: set_switch_mgmt
+
+ - assert:
+ that:
+ - set_switch_mgmt.data is defined
+
+ - name: Query non-MX network
+ meraki_management_interface:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_id: '{{test_org_id}}'
+ net_id: '{{test_switch_net_name}}'
+ serial: '{{serial_switch}}'
+ delegate_to: localhost
+ register: non_mx_network
+
+ - debug:
+ var: non_mx_network
+
+ - assert:
+ that:
+ - non_mx_network.data is defined
+
+ - name: Reset management interface on switch
+ meraki_management_interface:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ net_id: '{{test_switch_net_name}}'
+ serial: '{{serial_switch}}'
+ wan1:
+ using_static_ip: no
+ vlan: 1
+ delegate_to: localhost
+ register: reset_switch_mgmt
+
+ - debug:
+ var: reset_switch_mgmt
+
+ - assert:
+ that:
+ - reset_switch_mgmt.data is defined
+
+ - name: Set WAN1 as DHCP in check mode
+ meraki_management_interface:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ net_id: '{{net_id}}'
+ serial: '{{serial}}'
+ wan1:
+ wan_enabled: enabled
+ using_static_ip: no
+ vlan: 1
+ delegate_to: localhost
+ register: set_wan1_check
+ check_mode: yes
+
+ - debug:
+ var: set_wan1_check
+
+ - assert:
+ that:
+ - set_wan1_check is changed
+ - set_wan1_check.data is defined
+
+ - name: Set WAN1 as DHCP
+ meraki_management_interface:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ net_id: '{{net_id}}'
+ serial: '{{serial}}'
+ wan1:
+ wan_enabled: enabled
+ using_static_ip: no
+ vlan: 1
+ delegate_to: localhost
+ register: set_wan1
+
+ - debug:
+ var: set_wan1
+
+ - assert:
+ that:
+ - set_wan1 is changed
+ - set_wan1.data is defined
+
+ - name: Set WAN1 as DHCP with idempotency
+ meraki_management_interface:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ net_id: '{{net_id}}'
+ serial: '{{serial}}'
+ wan1:
+ wan_enabled: enabled
+ using_static_ip: no
+ vlan: 1
+ delegate_to: localhost
+ register: set_wan1_idempotent
+
+ - debug:
+ var: set_wan1_idempotent
+
+ - assert:
+ that:
+ - set_wan1_idempotent is not changed
+ - set_wan1_idempotent.data is defined
+
+ - name: Set WAN2 as static IP
+ meraki_management_interface:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_id: '{{net_id}}'
+ serial: '{{serial}}'
+ wan2:
+ wan_enabled: enabled
+ using_static_ip: yes
+ static_ip: 192.168.16.195
+ static_gateway_ip: 192.168.16.1
+ static_subnet_mask: 255.255.255.0
+ static_dns:
+ - 1.1.1.1
+ vlan: 1
+ delegate_to: localhost
+ register: set_wan2
+
+ - debug:
+ var: set_wan2
+
+ - assert:
+ that:
+ - set_wan2 is changed
+ - set_wan2.data is defined
+
+ - name: Test too many DNS servers
+ meraki_management_interface:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ net_id: '{{net_id}}'
+ serial: '{{serial}}'
+ wan1:
+ wan_enabled: enabled
+ using_static_ip: yes
+ static_ip: 192.0.1.2
+ static_gateway_ip: 192.0.1.1
+ static_subnet_mask: 255.255.255.0
+ static_dns:
+ - 1.1.1.1
+ - 8.8.8.8
+ - 4.4.4.4
+ vlan: 1
+ delegate_to: localhost
+ register: too_many_dns
+ ignore_errors: yes
+
+ - debug:
+ var: too_many_dns
+
+ - assert:
+ that:
+ - 'too_many_dns.msg == "Maximum number of static DNS addresses is 2."'
+
+ - name: Query management information
+ meraki_management_interface:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_id: '{{net_id}}'
+ serial: '{{serial}}'
+ delegate_to: localhost
+ register: query_mx
+
+ - debug:
+ var: query_mx
+
+ - assert:
+ that:
+ - query_mx.data is defined
+
+ always:
+ ############################################################################
+ # Tear down starts here
+ ############################################################################
+ - name: Reset settings for all interfaces
+ meraki_management_interface:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_id: '{{test_org_id}}'
+ net_id: '{{net_id}}'
+ serial: '{{serial}}'
+ wan1:
+ wan_enabled: disabled
+ using_static_ip: no
+ wan2:
+ wan_enabled: enabled
+ using_static_ip: no
+ delegate_to: localhost
+ ignore_errors: yes
+
+ # Network deletion is commented out since this requires a device in a network
+ # - name: Delete network
+ # meraki_network:
+ # auth_key: '{{auth_key}}'
+ # state: absent
+ # org_name: '{{test_org_name}}'
+ # net_name: '{{net_name}}'
+ # delegate_to: localhost
+ # register: delete_network
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_l3_firewall/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_l3_firewall/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_l3_firewall/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_l3_firewall/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_l3_firewall/tasks/main.yml
new file mode 100644
index 00000000..a267e15f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_l3_firewall/tasks/main.yml
@@ -0,0 +1,171 @@
+# Test code for the Meraki modules
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create wireless network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetWireless
+ type: wireless
+ delegate_to: localhost
+ register: new_net
+
+ - set_fact:
+ net: '{{new_net.data.id}}'
+
+ - name: Create single firewall rule with check mode
+ meraki_mr_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_id: '{{net}}'
+ number: 1
+ rules:
+ - comment: Integration test rule
+ policy: allow
+ protocol: tcp
+ dest_port: 80
+ dest_cidr: 192.0.2.0/24
+ allow_lan_access: no
+ delegate_to: localhost
+ check_mode: yes
+ register: create_one_check
+
+ - debug:
+ msg: '{{create_one_check}}'
+
+ - assert:
+ that:
+ - create_one_check.data.0.comment == 'Integration test rule'
+ - create_one_check.data.1.policy == 'deny'
+ - create_one_check.data is defined
+ - create_one_check is changed
+
+ - name: Create single firewall rule
+ meraki_mr_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_id: '{{net}}'
+ number: 1
+ rules:
+ - comment: Integration test rule
+ policy: allow
+ protocol: tcp
+ dest_port: 80
+ dest_cidr: 192.0.2.0/24
+ allow_lan_access: no
+ delegate_to: localhost
+ register: create_one
+
+ - debug:
+ msg: '{{create_one}}'
+
+ - assert:
+ that:
+ - create_one.data.rules.0.comment == 'Integration test rule'
+ - create_one.data.rules.1.policy == 'deny'
+ - create_one.data is defined
+
+ - name: Enable local LAN access with check mode
+ meraki_mr_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_id: '{{net}}'
+ number: 1
+ allow_lan_access: yes
+ delegate_to: localhost
+ check_mode: yes
+ register: enable_lan_check
+
+ - debug:
+ var: enable_lan_check
+
+ - assert:
+ that:
+ - enable_lan_check.data.rules.1.policy == 'allow'
+ - enable_lan_check is changed
+
+ - name: Enable local LAN access
+ meraki_mr_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_id: '{{net}}'
+ number: 1
+ allow_lan_access: yes
+ delegate_to: localhost
+ register: enable_lan
+
+ - assert:
+ that:
+ - enable_lan.data.rules.1.policy == 'allow'
+
+ - name: Update rules without specifying LAN access with check mode
+ meraki_mr_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_id: '{{net}}'
+ number: 1
+ rules:
+ - comment: Integration test rule
+ policy: allow
+ protocol: tcp
+ dest_port: 8080
+ dest_cidr: 192.0.2.0/24
+ delegate_to: localhost
+ register: update_one_check
+
+ - debug:
+ msg: '{{update_one_check}}'
+
+ - assert:
+ that:
+ - update_one_check.data.rules.0.comment == 'Integration test rule'
+ - update_one_check.data is defined
+
+ - name: Query firewall rules
+ meraki_mr_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_id: '{{net}}'
+ number: 1
+ delegate_to: localhost
+ register: query
+
+ - debug:
+ msg: '{{query}}'
+
+ - assert:
+ that:
+ - query.data.rules.1.comment == 'Wireless clients accessing LAN'
+ - query.data.rules.2.comment == 'Default rule'
+ - query.changed == False
+
+############################################################################
+# Tear down starts here
+############################################################################
+ always:
+ - name: Delete wireless SSID
+ meraki_ssid:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_id: '{{net}}'
+ number: 1
+ delegate_to: localhost
+
+ - name: Delete wireless network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_id: '{{net}}'
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_rf_profile/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_rf_profile/aliases
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_rf_profile/aliases
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_rf_profile/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_rf_profile/tasks/main.yml
new file mode 100644
index 00000000..3c78022b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_rf_profile/tasks/main.yml
@@ -0,0 +1,271 @@
+# Test code for the Meraki modules
+# Copyright: (c) 2020, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create network with type wireless
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ type: wireless
+ timezone: America/Chicago
+ delegate_to: localhost
+
+ - name: Create RF profile in check mode
+ meraki_mr_rf_profile:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: present
+ name: Test Profile
+ band_selection_type: ap
+ client_balancing_enabled: True
+ ap_band_settings:
+ mode: dual
+ band_steering_enabled: true
+ five_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -65
+ channel_width: 20
+ valid_auto_channels:
+ - 36
+ - 40
+ - 44
+ two_four_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -65
+ ax_enabled: false
+ valid_auto_channels:
+ - 1
+ delegate_to: localhost
+ register: create_check
+ check_mode: true
+
+ - assert:
+ that:
+ - create_check.data is defined
+ - create_check is changed
+
+ - name: Create RF profile
+ meraki_mr_rf_profile:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: present
+ name: Test Profile
+ band_selection_type: ap
+ client_balancing_enabled: True
+ ap_band_settings:
+ mode: dual
+ band_steering_enabled: true
+ five_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -65
+ channel_width: 20
+ valid_auto_channels:
+ - 36
+ - 40
+ - 44
+ two_four_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -65
+ ax_enabled: false
+ valid_auto_channels:
+ - 1
+ delegate_to: localhost
+ register: create
+
+ - set_fact:
+ profile_id: '{{ create.data.id }}'
+
+ - name: Query all RF profiles
+ meraki_mr_rf_profile:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: query
+ delegate_to: localhost
+ register: query_one
+
+ - assert:
+ that:
+ - query_one.data is defined
+
+ - name: Update profile with check mode
+ meraki_mr_rf_profile:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: present
+ profile_id: '{{ profile_id }}'
+ band_selection_type: ap
+ client_balancing_enabled: True
+ ap_band_settings:
+ mode: dual
+ band_steering_enabled: true
+ five_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -65
+ channel_width: 20
+ valid_auto_channels:
+ - 36
+ - 44
+ two_four_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -75
+ ax_enabled: false
+ valid_auto_channels:
+ - 1
+ delegate_to: localhost
+ register: update_check
+ check_mode: true
+
+ - assert:
+ that:
+ - update_check.data is defined
+ - update_check is changed
+
+ - name: Update profile
+ meraki_mr_rf_profile:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: present
+ profile_id: '{{ profile_id }}'
+ band_selection_type: ap
+ client_balancing_enabled: True
+ ap_band_settings:
+ mode: dual
+ band_steering_enabled: true
+ five_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -65
+ channel_width: 20
+ valid_auto_channels:
+ - 36
+ - 44
+ two_four_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -75
+ ax_enabled: false
+ valid_auto_channels:
+ - 1
+ delegate_to: localhost
+ register: update
+
+ - assert:
+ that:
+ - update.data is defined
+ - update is changed
+
+ - name: Update profile with idempotency
+ meraki_mr_rf_profile:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: present
+ profile_id: '{{ profile_id }}'
+ band_selection_type: ap
+ client_balancing_enabled: True
+ ap_band_settings:
+ mode: dual
+ band_steering_enabled: true
+ five_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -65
+ channel_width: 20
+ valid_auto_channels:
+ - 36
+ - 44
+ two_four_ghz_settings:
+ max_power: 10
+ min_bitrate: 12
+ min_power: 8
+ rxsop: -75
+ ax_enabled: false
+ valid_auto_channels:
+ - 1
+ delegate_to: localhost
+ register: update_idempotent
+
+ - assert:
+ that:
+ - update_idempotent.data is defined
+ - update_idempotent is not changed
+
+ - name: Query one RF profile by ID
+ meraki_mr_rf_profile:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: query
+ profile_id: '{{ profile_id }}'
+ delegate_to: localhost
+ register: query_one_id
+
+ - assert:
+ that:
+ - query_one_id.data is defined
+
+ - name: Query one RF profile by name
+ meraki_mr_rf_profile:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: query
+ name: Test Profile
+ delegate_to: localhost
+ register: query_one_name
+
+ - assert:
+ that:
+ - query_one_name.data is defined
+
+ - name: Delete RF profile
+ meraki_mr_rf_profile:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: absent
+ profile_id: '{{ profile_id }}'
+ delegate_to: localhost
+ register: delete
+
+ - assert:
+ that:
+ - delete.data is defined
+ - delete is changed
+
+#############################################################################
+# Tear down starts here
+#############################################################################
+
+ always:
+ - name: Delete network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_settings/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_settings/aliases
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_settings/aliases
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_settings/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_settings/tasks/main.yml
new file mode 100644
index 00000000..c2cfed8d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mr_settings/tasks/main.yml
@@ -0,0 +1,102 @@
+# Test code for the Meraki modules
+# Copyright: (c) 2020, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create network with type wireless
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ type: wireless
+ timezone: America/Chicago
+ delegate_to: localhost
+
+ - name: Query all settings
+ meraki_mr_settings:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: query
+ delegate_to: localhost
+ register: query_all
+
+ - debug:
+ var: query_all
+
+ - assert:
+ that:
+ - query_all.data is defined
+
+ - name: Configure settings with check mode
+ meraki_mr_settings:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: present
+ upgrade_strategy: minimize_upgrade_time
+ ipv6_bridge_enabled: false
+ led_lights_on: true
+ location_analytics_enabled: true
+ meshing_enabled: true
+ delegate_to: localhost
+ register: settings_check
+ check_mode: true
+
+ - assert:
+ that:
+ - settings_check.data is defined
+ - settings_check is changed
+
+ - name: Configure settings
+ meraki_mr_settings:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: present
+ upgrade_strategy: minimize_upgrade_time
+ ipv6_bridge_enabled: false
+ led_lights_on: true
+ location_analytics_enabled: true
+ meshing_enabled: true
+ delegate_to: localhost
+ register: settings
+
+ - assert:
+ that:
+ - settings.data is defined
+ - settings is changed
+
+ - name: Configure settings with idempotency
+ meraki_mr_settings:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ state: present
+ upgrade_strategy: minimize_upgrade_time
+ ipv6_bridge_enabled: false
+ led_lights_on: true
+ location_analytics_enabled: true
+ meshing_enabled: true
+ delegate_to: localhost
+ register: settings_idempotent
+
+ - assert:
+ that:
+ - settings_idempotent.data is defined
+ - settings_idempotent is not changed
+
+#############################################################################
+# Tear down starts here
+#############################################################################
+
+ always:
+ - name: Delete network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_l3_interface/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_l3_interface/tasks/main.yml
new file mode 100644
index 00000000..b32135cd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_l3_interface/tasks/main.yml
@@ -0,0 +1,236 @@
+# Test code for the Meraki modules
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create network with type switch
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ type: switch
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_switch
+
+ - name: Claim a device into a network
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ serial: '{{ serial_switch_l3 }}'
+ state: present
+ delegate_to: localhost
+
+ - name: Query all l3 interfaces
+ meraki_ms_l3_interface:
+ auth_key: '{{ auth_key }}'
+ state: query
+ serial: '{{ serial_switch_l3 }}'
+ delegate_to: localhost
+ register: query_all
+
+ - set_fact:
+ interface_id_1: '{{query_all.data.1.interface_id}}'
+ ignore_errors: true
+
+ - assert:
+ that:
+ - query_all.data is defined
+ - query_all.data | length > 0
+
+ - name: Query one l3 interface
+ meraki_ms_l3_interface:
+ auth_key: '{{ auth_key }}'
+ state: query
+ serial: '{{ serial_switch_l3 }}'
+ name: Test L3 interface
+ delegate_to: localhost
+ register: query_one
+
+ - assert:
+ that:
+ - query_one.data is defined
+
+ - name: Create l3 interface in check mode
+ meraki_ms_l3_interface:
+ auth_key: '{{ auth_key }}'
+ state: present
+ serial: '{{ serial_switch_l3 }}'
+ name: "Test L3 interface 2"
+ subnet: "192.168.3.0/24"
+ interface_ip: "192.168.3.2"
+ multicast_routing: disabled
+ vlan_id: 11
+ # default_gateway: "192.168.2.1"
+ ospf_settings:
+ area: 0
+ cost: 1
+ is_passive_enabled: true
+ delegate_to: localhost
+ check_mode: true
+ register: create_check
+
+ - assert:
+ that:
+ - create_check.data is defined
+ - create_check is changed
+
+ - name: Create l3 interface
+ meraki_ms_l3_interface:
+ auth_key: '{{ auth_key }}'
+ state: present
+ serial: '{{ serial_switch_l3 }}'
+ name: "Test L3 interface 2"
+ subnet: "192.168.3.0/24"
+ interface_ip: "192.168.3.2"
+ multicast_routing: disabled
+ vlan_id: 11
+ # default_gateway: "192.168.2.1"
+ ospf_settings:
+ area: 0
+ cost: 1
+ is_passive_enabled: true
+ delegate_to: localhost
+ register: create
+
+ - set_fact:
+ interface_id_1: '{{create.data.interface_id}}'
+
+ - assert:
+ that:
+ - create.data is defined
+ - create is changed
+
+ - name: Update l3 interface with check mode
+ meraki_ms_l3_interface:
+ auth_key: '{{ auth_key }}'
+ state: present
+ serial: '{{ serial_switch_l3 }}'
+ name: "Test L3 interface 2"
+ subnet: "192.168.3.0/24"
+ interface_ip: "192.168.3.2"
+ multicast_routing: disabled
+ vlan_id: 11
+ ospf_settings:
+ area: 0
+ cost: 2
+ is_passive_enabled: false
+ delegate_to: localhost
+ register: update_check
+ check_mode: true
+
+ - assert:
+ that:
+ - update_check.data is defined
+ - update_check is changed
+
+ - name: Update l3 interface
+ meraki_ms_l3_interface:
+ auth_key: '{{ auth_key }}'
+ state: present
+ serial: '{{ serial_switch_l3 }}'
+ name: "Test L3 interface 2"
+ subnet: "192.168.3.0/24"
+ interface_ip: "192.168.3.2"
+ multicast_routing: disabled
+ vlan_id: 11
+ ospf_settings:
+ area: 0
+ cost: 2
+ is_passive_enabled: false
+ delegate_to: localhost
+ register: update
+
+ - assert:
+ that:
+ - update.data is defined
+ - update is changed
+
+ - name: Update l3 interface idempotent
+ meraki_ms_l3_interface:
+ auth_key: '{{ auth_key }}'
+ state: present
+ serial: '{{ serial_switch_l3 }}'
+ name: "Test L3 interface 2"
+ subnet: "192.168.3.0/24"
+ interface_ip: "192.168.3.2"
+ multicast_routing: disabled
+ vlan_id: 11
+ ospf_settings:
+ area: 0
+ cost: 2
+ is_passive_enabled: false
+ delegate_to: localhost
+ register: update_idempotent
+
+ - assert:
+ that:
+ update_idempotent is not changed
+
+ - name: Update l3 interface idempotent with check mode
+ meraki_ms_l3_interface:
+ auth_key: '{{ auth_key }}'
+ state: present
+ serial: '{{ serial_switch_l3 }}'
+ name: "Test L3 interface 2"
+ subnet: "192.168.3.0/24"
+ interface_ip: "192.168.3.2"
+ multicast_routing: disabled
+ vlan_id: 11
+ ospf_settings:
+ area: 0
+ cost: 2
+ is_passive_enabled: false
+ delegate_to: localhost
+ register: update_idempotent_check
+ check_mode: true
+
+ - assert:
+ that:
+ update_idempotent_check is not changed
+
+
+#############################################################################
+# Tear down starts here
+#############################################################################
+
+ always:
+ - name: Delete l3 interface with check mode
+ meraki_ms_l3_interface:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ serial: '{{ serial_switch_l3 }}'
+ interface_id: '{{ item }}'
+ delegate_to: localhost
+ check_mode: true
+ register: delete_check
+ loop:
+ - '{{interface_id_1}}'
+
+ - assert:
+ that:
+ - delete_check is changed
+
+ - name: Delete l3 interface
+ meraki_ms_l3_interface:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ serial: '{{ serial_switch_l3 }}'
+ interface_id: '{{ interface_id_1 }}'
+ delegate_to: localhost
+ register: delete
+
+ - assert:
+ that:
+ - delete is changed
+
+ # - name: Delete network
+ # meraki_network:
+ # auth_key: '{{ auth_key }}'
+ # state: absent
+ # org_name: '{{test_org_name}}'
+ # net_name: IntTestNetworkSwitch
+ # delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/meraki_network/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/meraki_network/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/meraki_network/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/meraki_network/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/meraki_network/tasks/main.yml
new file mode 100644
index 00000000..37264abb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/meraki_network/tasks/main.yml
@@ -0,0 +1,473 @@
+# Test code for the Meraki modules
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create network without type
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_no_type
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - create_net_no_type.msg == 'type parameter is required when creating a network.'
+
+ - name: Create network without organization
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ net_name: IntTestNetwork
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_no_org
+ ignore_errors: yes
+
+ - name: Create network with type switch with check mode
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ type: switch
+ timezone: America/Chicago
+ delegate_to: localhost
+ check_mode: yes
+ register: create_net_switch_check
+
+ - debug:
+ var: create_net_switch_check
+
+ - debug:
+ var: create_net_switch_check.data.organization_id
+
+ - assert:
+ that:
+ - create_net_switch_check is changed
+ - create_net_switch_check.data is defined
+ - create_net_switch_check.data.organization_id == "{{test_org_id |string}}"
+
+ - name: Create network with type switch
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ type: switch
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_switch
+
+ - name: Create network with type switch by org ID
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_id: '{{test_org_id}}'
+ net_name: IntTestNetworkSwitchOrgID
+ type: switch
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_switch_org_id
+
+ - name: Create network with type appliance and no timezone
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ type: appliance
+ delegate_to: localhost
+ register: create_net_appliance_no_tz
+
+ - name: Enable VLAN support on appliance network with check mode
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ enable_vlans: yes
+ delegate_to: localhost
+ check_mode: yes
+ register: enable_vlan_check
+
+ - assert:
+ that:
+ - enable_vlan_check.data.enabled == True
+ - enable_vlan_check is changed
+
+ - name: Enable VLAN support on appliance network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ enable_vlans: yes
+ delegate_to: localhost
+ register: enable_vlan
+
+ - assert:
+ that:
+ - enable_vlan.data.enabled == True
+
+ - name: Enable VLAN support on appliance network with idempotency
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ enable_vlans: yes
+ delegate_to: localhost
+ register: enable_vlan_idempotent
+
+ - debug:
+ var: enable_vlan_idempotent
+
+ - assert:
+ that:
+ - enable_vlan_idempotent is not changed
+ - enable_vlan_idempotent.data is defined
+
+ - name: Disable VLAN support on appliance network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ enable_vlans: no
+ delegate_to: localhost
+ register: disable_vlan
+
+ - assert:
+ that:
+ - disable_vlan.data.enabled == False
+
+ - name: Disable VLAN support on appliance network with idempotency
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ enable_vlans: no
+ delegate_to: localhost
+ register: disable_vlan_idempotent
+
+ - assert:
+ that:
+ - disable_vlan_idempotent is not changed
+ - disable_vlan_idempotent.data is defined
+
+ - name: Create network with type wireless and disable my.meraki.com
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ type: wireless
+ timezone: America/Chicago
+ disable_my_meraki: yes
+ delegate_to: localhost
+ register: create_net_wireless
+
+ - name: Create network with type wireless, disable my.meraki.com, and check for idempotency
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ type: wireless
+ timezone: America/Chicago
+ disable_my_meraki: yes
+ delegate_to: localhost
+ register: create_net_wireless_idempotent
+
+ - assert:
+ that:
+ - create_net_wireless_idempotent.data is defined
+
+ - name: Create network with type combined and disable my.meraki.com
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkCombined
+ type:
+ - appliance
+ - switch
+ timezone: America/Chicago
+ enable_my_meraki: no
+ delegate_to: localhost
+ register: create_net_combined
+
+ - name: Reenable my.meraki.com with check mode
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkCombined
+ enable_my_meraki: yes
+ delegate_to: localhost
+ register: enable_meraki_com_check
+ check_mode: yes
+
+ - assert:
+ that:
+ - enable_meraki_com_check is changed
+ - enable_meraki_com_check.data is defined
+
+ - name: Reenable my.meraki.com
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkCombined
+ enable_my_meraki: yes
+ delegate_to: localhost
+ register: enable_meraki_com
+
+ - name: Disable my.meraki.com for next test
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkCombined
+ enable_my_meraki: no
+ delegate_to: localhost
+
+ - name: Enable remote status page
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkCombined
+ enable_remote_status_page: yes
+ delegate_to: localhost
+ register: disable_remote_status
+
+ - debug:
+ msg: '{{disable_remote_status}}'
+
+ - assert:
+ that:
+ - disable_remote_status.data.disable_remote_status_page == False
+
+ - name: Disable remote status page
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkCombined
+ enable_remote_status_page: no
+ delegate_to: localhost
+ register: enable_remote_status
+
+ - debug:
+ msg: '{{enable_remote_status}}'
+
+ - assert:
+ that:
+ - enable_remote_status.data.disable_remote_status_page == True
+
+ - name: Test status pages are mutually exclusive when on
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkCombined
+ enable_my_meraki: yes
+ enable_remote_status_page: no
+ delegate_to: localhost
+ register: status_exclusivity
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - '"must be true when setting" in status_exclusivity.msg'
+
+ - name: Create network with one tag
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkTag
+ type: switch
+ timezone: America/Chicago
+ tags: first_tag
+ delegate_to: localhost
+ register: create_net_tag
+
+ - name: Create network with two tags
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkTags
+ type: switch
+ timezone: America/Chicago
+ tags:
+ - first_tag
+ - second_tag
+ delegate_to: localhost
+ register: create_net_tags
+
+ - set_fact:
+ tag_net_id: '{{create_net_tags.data.id}}'
+
+ - name: Modify network by net_id
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_id: '{{tag_net_id}}'
+ type: switch
+ timezone: America/Chicago
+ tags:
+ - first_tag
+ - second_tag
+ - third_tag
+ delegate_to: localhost
+ register: create_net_modified
+
+ - name: Modify network with idempotency
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkTags
+ type: switch
+ timezone: America/Chicago
+ tags:
+ - first_tag
+ - second_tag
+ - third_tag
+ delegate_to: localhost
+ register: create_net_modified_idempotent
+
+ - assert:
+ that:
+ - create_net_modified_idempotent.data is defined
+
+ - name: Present assertions
+ assert:
+ that:
+ - create_net_combined.data.type == 'combined'
+ - create_net_combined.data.disable_my_meraki_com == True
+ - enable_meraki_com.data.disable_my_meraki_com == False
+ - '"org_name or org_id parameters are required" in create_net_no_org.msg'
+ - '"IntTestNetworkAppliance" in create_net_appliance_no_tz.data.name'
+ - create_net_appliance_no_tz.changed == True
+ - '"IntTestNetworkSwitch" in create_net_switch.data.name'
+ - '"IntTestNetworkSwitchOrgID" in create_net_switch_org_id.data.name'
+ - '"IntTestNetworkWireless" in create_net_wireless.data.name'
+ - create_net_wireless.data.disable_my_meraki_com == True
+ - create_net_wireless_idempotent.changed == False
+ - create_net_wireless_idempotent.data is defined
+ - '"first_tag" in create_net_tag.data.tags'
+ - '"second_tag" in create_net_tags.data.tags'
+ - '"third_tag" in create_net_modified.data.tags'
+ - create_net_modified.changed == True
+ - create_net_modified_idempotent.changed == False
+ - create_net_modified_idempotent.data is defined
+
+ - name: Query all networks
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ delegate_to: localhost
+ register: net_query_all
+
+ - name: Query a configuration template
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_template_name}}'
+ delegate_to: localhost
+ register: query_config_template
+
+ - name: Query one network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ delegate_to: localhost
+ register: net_query_one
+
+ - name: Query assertions
+ assert:
+ that:
+ - 'net_query_one.data.name == "IntTestNetworkSwitch"'
+ - 'query_config_template.data.name == "{{ test_template_name }}"'
+
+#############################################################################
+# Tear down starts here
+#############################################################################
+ always:
+ - name: Delete network without org
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ net_name: IntTestNetworkSwitch
+ delegate_to: localhost
+ register: delete_all_no_org
+ ignore_errors: yes
+
+ - name: Delete network by org ID and check mode
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_id: '{{test_org_id}}'
+ net_name: IntTestNetworkSwitchOrgID
+ delegate_to: localhost
+ check_mode: yes
+ register: delete_net_org_id_check
+
+ - assert:
+ that:
+ - delete_net_org_id_check is changed
+ - delete_net_org_id_check.data is defined
+
+ - name: Delete network by org ID
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_id: '{{test_org_id}}'
+ net_name: IntTestNetworkSwitchOrgID
+ delegate_to: localhost
+ register: delete_net_org_id
+
+ - name: Query after delete with org ID
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ delegate_to: localhost
+ register: query_deleted_org_id
+
+ - name: Delete all networks
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{ item }}'
+ delegate_to: localhost
+ register: delete_all
+ ignore_errors: yes
+ loop:
+ - IntTestNetworkSwitch
+ - IntTestNetworkWireless
+ - IntTestNetworkAppliance
+ - IntTestNetworkCombined
+ - IntTestNetworkTag
+ - IntTestNetworkTags
+
+ - assert:
+ that:
+ - 'delete_all_no_org.msg == "org_name or org_id parameters are required"'
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/tasks/main.yml
new file mode 100644
index 00000000..e7e3b96b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_link_aggregation/tasks/main.yml
@@ -0,0 +1,124 @@
+# Test code for the Meraki MS Link Aggregation module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ type: switch
+ register: test_net
+
+ - name: Add device to network
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ serial: '{{serial_switch}}'
+ delegate_to: localhost
+
+ - name: Create LAG
+ meraki_ms_link_aggregation:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ switch_ports:
+ - serial: '{{serial_switch}}'
+ port_id: "1"
+ - serial: '{{serial_switch}}'
+ port_id: "2"
+ delegate_to: localhost
+ register: create_ports
+
+ - debug:
+ var: create_ports
+
+ - set_fact:
+ lag_id: '{{create_ports.data.id}}'
+
+ - name: Update LAG
+ meraki_ms_link_aggregation:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ lag_id: '{{lag_id}}'
+ switch_ports:
+ - serial: '{{serial_switch}}'
+ port_id: "1"
+ - serial: '{{serial_switch}}'
+ port_id: "2"
+ - serial: '{{serial_switch}}'
+ port_id: "3"
+ - serial: '{{serial_switch}}'
+ port_id: "4"
+ delegate_to: localhost
+ register: update_ports
+
+ - assert:
+ that:
+ - update_ports is changed
+
+ - name: Update LAG with idempotency
+ meraki_ms_link_aggregation:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ lag_id: '{{lag_id}}'
+ switch_ports:
+ - serial: '{{serial_switch}}'
+ port_id: "1"
+ - serial: '{{serial_switch}}'
+ port_id: "2"
+ - serial: '{{serial_switch}}'
+ port_id: "3"
+ - serial: '{{serial_switch}}'
+ port_id: "4"
+ delegate_to: localhost
+ register: update_ports_idempotent
+
+ - assert:
+ that:
+ - update_ports_idempotent is not changed
+
+ - name: Query all LAGs
+ meraki_ms_link_aggregation:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ delegate_to: localhost
+ register: query_all
+
+ - debug:
+ var: query_all
+
+ always:
+ - name: Delete LAG
+ meraki_ms_link_aggregation:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ lag_id: '{{lag_id}}'
+ delegate_to: localhost
+
+ # - name: Delete test network
+ # meraki_network:
+ # auth_key: '{{auth_key}}'
+ # state: absent
+ # org_name: '{{test_org_name}}'
+ # net_name: '{{test_switch_net_name}}'
+ # register: delete_net
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_ospf/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_ospf/tasks/main.yml
new file mode 100644
index 00000000..c941f85c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ms_ospf/tasks/main.yml
@@ -0,0 +1,136 @@
+# Test code for the Meraki modules
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create network with type switch
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ type: switch
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_switch
+
+ - name: Claim a device into a network
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ serial: '{{serial_switch_l3}}'
+ state: present
+ delegate_to: localhost
+
+ - name: Query OSPF settings
+ meraki_ms_ospf:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ state: query
+ delegate_to: localhost
+ register: query_all
+
+
+ - assert:
+ that:
+ - query_all.data is defined
+
+ - name: Enable OSPF with check mode
+ meraki_ms_ospf:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ state: present
+ enabled: true
+ hello_timer: 20
+ dead_timer: 60
+ areas:
+ - area_id: 0
+ area_name: Backbone
+ area_type: normal
+ - area_id: 1
+ area_name: Office
+ area_type: nssa
+ md5_authentication_enabled: true
+ md5_authentication_key:
+ id: 1
+ passphrase: 'secretpass'
+ check_mode: true
+ register: enable_check_mode
+
+ - assert:
+ that:
+ - enable_check_mode.data is defined
+
+ - name: Enable OSPF
+ meraki_ms_ospf:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ state: present
+ enabled: true
+ hello_timer: 20
+ dead_timer: 60
+ areas:
+ - area_id: 0
+ area_name: Backbone
+ area_type: normal
+ - area_id: 1
+ area_name: Office
+ area_type: nssa
+ md5_authentication_enabled: true
+ md5_authentication_key:
+ id: 1
+ passphrase: 'secretpass'
+ register: enable
+
+ - assert:
+ that:
+ - enable.data is defined
+
+ - name: Enable OSPF with idempotency
+ meraki_ms_ospf:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ state: present
+ enabled: true
+ hello_timer: 20
+ dead_timer: 60
+ areas:
+ - area_id: 0
+ area_name: Backbone
+ area_type: normal
+ - area_id: 1
+ area_name: Office
+ area_type: nssa
+ md5_authentication_enabled: true
+ md5_authentication_key:
+ id: 1
+ passphrase: 'secretpass'
+ delegate_to: localhost
+ register: enable_ospf_idempotent
+
+ - debug:
+ var: enable_ospf_idempotent
+
+ - assert:
+ that:
+ - enable_ospf_idempotent is not changed
+ - enable_ospf_idempotent.data is defined
+
+#############################################################################
+# Tear down starts here
+#############################################################################
+
+ # always:
+ # - name: Delete network
+ # meraki_network:
+ # auth_key: '{{ auth_key }}'
+ # state: absent
+ # org_name: '{{test_org_name}}'
+ # net_name: IntTestNetworkSwitch
+ # delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l2_interface/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l2_interface/tasks/main.yml
new file mode 100644
index 00000000..3a142b2a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l2_interface/tasks/main.yml
@@ -0,0 +1,155 @@
+# Test code for the Meraki modules
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create network with type appliance
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_appliance_net_name}}'
+ type: appliance
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net
+
+ - name: Claim a device into a network
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_appliance_net_name}}'
+ serial: '{{serial_appliance}}'
+ state: present
+ delegate_to: localhost
+
+ - name: Enable VLAN support on appliance network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: '{{test_appliance_net_name}}'
+ enable_vlans: yes
+ delegate_to: localhost
+
+ - name: Create a VLAN
+ meraki_vlan:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{ test_org_name }}'
+ net_name: '{{test_appliance_net_name}}'
+ state: present
+ vlan_id: 10
+ name: TestVLAN
+ subnet: 192.0.10.0/24
+ appliance_ip: 192.0.10.1
+ delegate_to: localhost
+
+ - name: Query layer 2 interface settings
+ meraki_mx_l2_interface:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_appliance_net_name}}'
+ state: query
+ delegate_to: localhost
+ register: query_all
+
+ - assert:
+ that:
+ - query_all.data is defined
+
+ - name: Query a single layer 2 interface settings
+ meraki_mx_l2_interface:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_appliance_net_name}}'
+ state: query
+ number: 2
+ delegate_to: localhost
+ register: query_one
+
+ - assert:
+ that:
+ - query_one.data is defined
+
+ - name: Update interface configuration with check mode
+ meraki_mx_l2_interface:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_appliance_net_name}}'
+ state: present
+ number: 2
+ port_type: access
+ vlan: 10
+ delegate_to: localhost
+ register: update_check
+ check_mode: yes
+
+ - debug:
+ var: update_check
+
+ - assert:
+ that:
+ - update_check.data is defined
+ - update_check.data.vlan == 10
+ - update_check is changed
+
+ - name: Update interface configuration
+ meraki_mx_l2_interface:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_appliance_net_name}}'
+ state: present
+ number: 2
+ port_type: access
+ vlan: 10
+ delegate_to: localhost
+ register: update
+
+ - assert:
+ that:
+ - update.diff is defined
+ - update.data is defined
+ - update.data.vlan == 10
+ - update is changed
+
+ - name: Update interface configuration with idempotency
+ meraki_mx_l2_interface:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_appliance_net_name}}'
+ state: present
+ number: 2
+ port_type: access
+ vlan: 10
+ delegate_to: localhost
+ register: update_idempotent
+
+ - assert:
+ that:
+ - update_idempotent.data is defined
+ - update_idempotent.data.vlan == 10
+ - update_idempotent is not changed
+
+
+#############################################################################
+# Tear down starts here
+#############################################################################
+
+ always:
+ - name: Remove device from network
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_appliance_net_name}}'
+ serial: '{{serial_appliance}}'
+ state: absent
+ delegate_to: localhost
+
+ - name: Delete network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_appliance_net_name}}'
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l3_firewall/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l3_firewall/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l3_firewall/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l3_firewall/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l3_firewall/tasks/main.yml
new file mode 100644
index 00000000..2e4ddc62
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l3_firewall/tasks/main.yml
@@ -0,0 +1,351 @@
+# Test code for the Meraki Organization module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ type: appliance
+ delegate_to: localhost
+
+ - name: Query firewall rules
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: query
+ delegate_to: localhost
+ register: query
+
+ - assert:
+ that:
+ - query.data|length == 1
+
+ - name: Set one firewall rule with check mode
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32
+ protocol: tcp
+ policy: deny
+ delegate_to: localhost
+ check_mode: yes
+ register: create_one_check
+
+ - debug:
+ var: create_one_check
+
+ - assert:
+ that:
+ - create_one_check.data|length == 2
+ - create_one_check.data.0.dest_cidr == '192.0.1.1/32'
+ - create_one_check.data.0.protocol == 'tcp'
+ - create_one_check.data.0.policy == 'deny'
+ - create_one_check is changed
+ - create_one_check.data is defined
+
+ - name: Set one firewall rule
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_id: '{{test_org_id}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32
+ protocol: tcp
+ policy: deny
+ delegate_to: localhost
+ register: create_one
+
+ - debug:
+ var: create_one
+
+ - assert:
+ that:
+ - create_one.data.rules|length == 2
+ - create_one.data.rules.0.dest_cidr == '192.0.1.1/32'
+ - create_one.data.rules.0.protocol == 'tcp'
+ - create_one.data.rules.0.policy == 'deny'
+ - create_one.changed == True
+ - create_one.data is defined
+
+ - name: Check for idempotency
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32
+ protocol: tcp
+ policy: deny
+ delegate_to: localhost
+ register: create_one_idempotent
+
+ - debug:
+ msg: '{{create_one_idempotent}}'
+
+ - assert:
+ that:
+ - create_one_idempotent.changed == False
+ - create_one_idempotent.data is defined
+
+ - name: Update one existing rule
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - comment: Deny all documentation addresses
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32,192.0.1.2/32
+ protocol: tcp
+ policy: deny
+ delegate_to: localhost
+ register: update_one
+
+ - debug:
+ msg: '{{update_one}}'
+
+ - assert:
+ that:
+ - update_one.changed == True
+ - update_one.data is defined
+
+ - name: Create syslog in network
+ meraki_syslog:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ servers:
+ - host: 192.0.2.10
+ port: 514
+ roles:
+ - Appliance event log
+ - Flows
+ delegate_to: localhost
+
+ - name: Enable syslog for default rule with check mode
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32
+ protocol: tcp
+ policy: deny
+ syslog_default_rule: yes
+ delegate_to: localhost
+ check_mode: yes
+ register: default_syslog_check
+
+ - debug:
+ msg: '{{default_syslog_check}}'
+
+ - assert:
+ that:
+ - default_syslog_check.data is defined
+ - default_syslog_check.data.1.syslog_enabled == True
+
+
+ - name: Enable syslog for default rule
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32
+ protocol: tcp
+ policy: deny
+ syslog_default_rule: yes
+ delegate_to: localhost
+ register: default_syslog
+
+ - debug:
+ msg: '{{default_syslog}}'
+
+ - assert:
+ that:
+ - default_syslog.data is defined
+
+ - name: Set protocol to any for idempotency check
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: any
+ src_cidr: any
+ dest_port: any
+ dest_cidr: 192.0.1.1/32
+ protocol: any
+ policy: deny
+ delegate_to: localhost
+
+ - name: Check for protocol any idempotency
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: any
+ src_cidr: any
+ dest_port: any
+ dest_cidr: 192.0.1.1/32
+ protocol: any
+ policy: deny
+ delegate_to: localhost
+ register: any_idempotency
+
+ - assert:
+ that:
+ - any_idempotency is not changed
+
+ - name: Query firewall rules
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: query
+ delegate_to: localhost
+ register: query
+
+ - assert:
+ that:
+ - query.data.rules.1.syslog_enabled == True
+ - default_syslog.changed == True
+
+ - name: Disable syslog for default rule
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32
+ protocol: tcp
+ policy: deny
+ syslog_default_rule: no
+ delegate_to: localhost
+ register: disable_syslog
+
+ - debug:
+ msg: '{{disable_syslog}}'
+
+ - assert:
+ that:
+ - disable_syslog.data is defined
+
+ - name: Query firewall rules
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: query
+ delegate_to: localhost
+ register: query
+
+ - debug:
+ msg: '{{query}}'
+
+ - name: Enable syslog for default rule with no rules and with check mode
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ syslog_default_rule: yes
+ delegate_to: localhost
+ check_mode: yes
+ register: enable_syslog_only_check
+
+ - debug:
+ msg: '{{enable_syslog_only_check}}'
+
+ - assert:
+ that:
+ - enable_syslog_only_check.data.rules.1.syslog_enabled == True
+ - enable_syslog_only_check is changed
+
+ - name: Query firewall rules
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: query
+ delegate_to: localhost
+ register: query
+
+ - debug:
+ msg: '{{query.data.rules.1}}'
+
+ - assert:
+ that:
+ - query.data.rules.1.syslog_enabled == False
+ - disable_syslog.changed == True
+
+ always:
+ - name: Delete all firewall rules
+ meraki_mx_l3_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules: []
+ delegate_to: localhost
+ register: delete_all
+
+ - name: Delete network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l7_firewall/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l7_firewall/aliases
new file mode 100644
index 00000000..06fe32bc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l7_firewall/aliases
@@ -0,0 +1,2 @@
+unsupported
+
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l7_firewall/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l7_firewall/tasks/main.yml
new file mode 100644
index 00000000..bb4c6fc5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l7_firewall/tasks/main.yml
@@ -0,0 +1,7 @@
+# Test code for the Meraki Organization module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- name: Run test cases
+ include: tests.yml ansible_connection=local \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l7_firewall/tasks/tests.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l7_firewall/tasks/tests.yml
new file mode 100644
index 00000000..1b0e8dde
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_l7_firewall/tasks/tests.yml
@@ -0,0 +1,494 @@
+# Test code for the Meraki Organization module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ type: appliance
+
+ - name: Query firewall rules
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: query
+ register: query
+
+ - debug:
+ var: query
+
+ - assert:
+ that:
+ - query.data is defined
+
+ - name: Query firewall application categories
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: query
+ categories: yes
+ register: query_categories
+
+ - assert:
+ that:
+ - query_categories.data is defined
+
+ - name: Create firewall rule for IP range in check mode
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: ip_range
+ ip_range: 10.11.12.0/24
+ register: create_ip_range_check
+ check_mode: yes
+
+ - debug:
+ var: create_ip_range_check
+
+ - assert:
+ that:
+ - create_ip_range_check is changed
+
+ - name: Create firewall rule for IP range
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: ip_range
+ ip_range: 10.11.12.0/24
+ register: create_ip_range
+
+ - debug:
+ var: create_ip_range
+
+ - assert:
+ that:
+ - create_ip_range is changed
+ - create_ip_range.data.rules | length == 1
+
+ - name: Create firewall rule for IP range with idempotency with check mode
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: ip_range
+ ip_range: 10.11.12.0/24
+ register: create_ip_range_idempotent_check
+ check_mode: yes
+
+ - assert:
+ that:
+ - create_ip_range_idempotent_check is not changed
+
+ - name: Create firewall rule for IP range with idempotency
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: ip_range
+ ip_range: 10.11.12.0/24
+ register: create_ip_range_idempotent
+
+ - assert:
+ that:
+ - create_ip_range_idempotent is not changed
+
+ - name: Create firewall rule for IP and port
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: ip_range
+ ip_range: 10.11.12.1:23
+ register: create_ip_range_port
+
+ - debug:
+ var: create_ip_range_port
+
+ - assert:
+ that:
+ - create_ip_range_port is changed
+
+ - name: Create firewall rule for IP range
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: ip_range
+ ip_range: 10.11.12.0/24
+ register: create_ip_range
+
+ - debug:
+ var: create_ip_range
+
+ - assert:
+ that:
+ - create_ip_range is changed
+ - create_ip_range.data.rules | length == 1
+
+ - name: Create firewall rule for IP range with idempotency with check mode
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: ip_range
+ ip_range: 10.11.12.0/24
+ register: create_ip_range_idempotent_check
+ check_mode: yes
+
+ - assert:
+ that:
+ - create_ip_range_idempotent_check is not changed
+
+ - name: Create firewall rule for IP range with idempotency
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: ip_range
+ ip_range: 10.11.12.0/24
+ register: create_ip_range_idempotent
+
+ - assert:
+ that:
+ - create_ip_range_idempotent is not changed
+
+ - name: Create firewall rule for application
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: application
+ application:
+ name: facebook
+ register: application_rule
+
+ - assert:
+ that:
+ - application_rule is changed
+ - application_rule.data.rules is defined
+
+ - name: Create firewall rule for application via ID
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: application
+ application:
+ id: meraki:layer7/application/205
+ register: application_rule_id
+
+ - assert:
+ that:
+ - application_rule_id is changed
+
+ - name: Create firewall rule for invalid application
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: application
+ application:
+ name: ansible
+ register: application_rule_invalid
+ ignore_errors: yes
+
+ - name: Create firewall rule for application category
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: application_category
+ application:
+ name: Advertising
+ register: application_category_rule
+
+ - debug:
+ var: application_category_rule
+
+ - assert:
+ that:
+ - application_category_rule is changed
+
+ - name: Create firewall rule for application category with ID and conflict
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: application_category
+ application:
+ id: meraki:layer7/category/27
+ register: application_category_rule_id_conflict
+
+ - assert:
+ that:
+ - application_category_rule_id_conflict is not changed
+
+ - name: Create firewall rule for application category with ID
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: application_category
+ application:
+ id: meraki:layer7/category/24
+ register: application_category_rule_id
+
+ - assert:
+ that:
+ - application_category_rule_id is changed
+
+ - name: Create firewall rule for host
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: host
+ host: asdf.com
+ register: host_rule
+
+ - assert:
+ that:
+ - host_rule is changed
+
+ - name: Create firewall rule for port
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: port
+ port: 1234
+ register: port_rule
+
+ - assert:
+ that:
+ - port_rule is changed
+
+ - name: Create firewall rule for denied countries
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: blocked_countries
+ countries:
+ - CA
+ - AX
+ register: blocked_countries
+
+ - assert:
+ that:
+ - blocked_countries is changed
+
+ - name: Create firewall rule for allowed countries
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: blocked_countries
+ countries:
+ - US
+ - FR
+ register: allowed_countries
+
+ - assert:
+ that:
+ - allowed_countries is changed
+
+ - name: Create firewall rule for allowed countries with idempotency
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: blocked_countries
+ countries:
+ - US
+ - FR
+ register: allowed_countries_idempotent
+
+ - assert:
+ that:
+ - allowed_countries_idempotent is not changed
+
+ - name: Create multiple firewall rules
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: application_category
+ application:
+ id: meraki:layer7/category/27
+ - type: blocked_countries
+ countries:
+ - CN
+ - policy: deny
+ type: port
+ port: 8080
+ register: multiple_rules
+
+ - debug:
+ var: multiple_rules
+
+ - assert:
+ that:
+ - multiple_rules.data.rules | length == 3
+ - multiple_rules is changed
+
+ #########################################
+ ## Tests for argument completeness ##
+ #########################################
+
+ - name: Test blocked_countries incomplete arguments
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: blocked_countries
+ register: error_allowed
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - 'error_allowed.msg == "countries argument is required when type is blocked_countries."'
+
+ - name: Test blocked_countries incomplete arguments
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: blocked_countries
+ register: error_denied
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - 'error_denied.msg == "countries argument is required when type is blocked_countries."'
+
+ - name: Test application_category incomplete arguments
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: application_category
+ register: error_app_cat
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - 'error_app_cat.msg == "application argument is required when type is application_category."'
+
+ - name: Test application incomplete arguments
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: application
+ register: error_app_cat
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - 'error_app_cat.msg == "application argument is required when type is application."'
+
+ - name: Test host incomplete arguments
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: host
+ register: error_app_cat
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - 'error_app_cat.msg == "host argument is required when type is host."'
+
+ - name: Test port incomplete arguments
+ meraki_mx_l7_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ rules:
+ - type: port
+ register: error_app_cat
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - 'error_app_cat.msg == "port argument is required when type is port."'
+
+ #################
+ ## Cleanup ##
+ #################
+
+ # always:
+ # - name: Delete network
+ # meraki_network:
+ # auth_key: '{{ auth_key }}'
+ # org_name: '{{test_org_name}}'
+ # net_name: TestNetAppliance
+ # state: absent
+ # delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_site_to_site_firewall/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_site_to_site_firewall/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_site_to_site_firewall/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_site_to_site_firewall/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_site_to_site_firewall/tasks/main.yml
new file mode 100644
index 00000000..df0b9164
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_site_to_site_firewall/tasks/main.yml
@@ -0,0 +1,306 @@
+# Test code for the Meraki Organization module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ type: appliance
+ delegate_to: localhost
+
+ - name: Query firewall rules
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: query
+ delegate_to: localhost
+ register: query
+
+ - debug:
+ var: query
+
+ # - assert:
+ # that:
+ # - query.data|length == 1
+
+ - name: Set one firewall rule with check mode
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32
+ protocol: tcp
+ policy: deny
+ delegate_to: localhost
+ check_mode: yes
+ register: create_one_check
+
+ - debug:
+ var: create_one_check
+
+ - assert:
+ that:
+ - create_one_check.data.rules|length == 2
+ - create_one_check.data.rules.0.dest_cidr == '192.0.1.1/32'
+ - create_one_check.data.rules.0.protocol == 'tcp'
+ - create_one_check.data.rules.0.policy == 'deny'
+ - create_one_check is changed
+ - create_one_check.data is defined
+
+ - name: Set one firewall rule
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32
+ protocol: tcp
+ policy: deny
+ delegate_to: localhost
+ register: create_one
+
+ - debug:
+ var: create_one
+
+ - assert:
+ that:
+ - create_one.data.rules|length == 2
+ - create_one.data.rules.0.dest_cidr == '192.0.1.1/32'
+ - create_one.data.rules.0.protocol == 'tcp'
+ - create_one.data.rules.0.policy == 'deny'
+ - create_one.changed == True
+ - create_one.data is defined
+
+ - name: Check for idempotency
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32
+ protocol: tcp
+ policy: deny
+ delegate_to: localhost
+ register: create_one_idempotent
+
+ - debug:
+ msg: '{{create_one_idempotent}}'
+
+ - assert:
+ that:
+ - create_one_idempotent.changed == False
+ - create_one_idempotent.data is defined
+
+ - name: Update one existing rule
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: present
+ rules:
+ - comment: Deny all documentation addresses
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32,192.0.1.2/32
+ protocol: tcp
+ policy: deny
+ delegate_to: localhost
+ register: update_one
+
+ - debug:
+ msg: '{{update_one}}'
+
+ - assert:
+ that:
+ - update_one.changed == True
+ - update_one.data is defined
+
+ - name: Create syslog in network
+ meraki_syslog:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: present
+ servers:
+ - host: 192.0.2.10
+ port: 514
+ roles:
+ - Appliance event log
+ - Flows
+ delegate_to: localhost
+
+ - name: Enable syslog for default rule with check mode
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32
+ protocol: tcp
+ policy: deny
+ syslog_default_rule: yes
+ delegate_to: localhost
+ check_mode: yes
+ register: default_syslog_check
+
+ - debug:
+ msg: '{{default_syslog_check}}'
+
+ - assert:
+ that:
+ - default_syslog_check.data is defined
+ - default_syslog_check.data.rules.1.syslog_enabled == True
+
+ - name: Enable syslog for default rule
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32
+ protocol: tcp
+ policy: deny
+ syslog_default_rule: yes
+ delegate_to: localhost
+ register: default_syslog
+
+ - debug:
+ msg: '{{default_syslog}}'
+
+ - assert:
+ that:
+ - default_syslog.data is defined
+
+ - name: Query firewall rules
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: query
+ delegate_to: localhost
+ register: query
+
+ - debug:
+ msg: '{{query.data.rules.1}}'
+
+ - assert:
+ that:
+ - query.data.rules.1.syslog_enabled == True
+ - default_syslog.changed == True
+
+ - name: Disable syslog for default rule
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: present
+ rules:
+ - comment: Deny to documentation address
+ src_port: Any
+ src_cidr: Any
+ dest_port: 80,443
+ dest_cidr: 192.0.1.1/32
+ protocol: tcp
+ policy: deny
+ syslog_default_rule: no
+ delegate_to: localhost
+ register: disable_syslog
+
+ - debug:
+ msg: '{{disable_syslog}}'
+
+ - assert:
+ that:
+ - disable_syslog.data is defined
+
+ - name: Query firewall rules
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: query
+ delegate_to: localhost
+ register: query
+
+ - debug:
+ msg: '{{query}}'
+
+ - name: Enable syslog for default rule with no rules and with check mode
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: present
+ syslog_default_rule: yes
+ delegate_to: localhost
+ check_mode: yes
+ register: enable_syslog_only_check
+
+ - debug:
+ msg: '{{enable_syslog_only_check}}'
+
+ - assert:
+ that:
+ - enable_syslog_only_check.data.rules.1.syslog_enabled == True
+ - enable_syslog_only_check is changed
+
+ - name: Query firewall rules
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: query
+ delegate_to: localhost
+ register: query
+
+ - debug:
+ msg: '{{query.data.rules.1}}'
+
+ - assert:
+ that:
+ - query.data.rules.1.syslog_enabled == False
+ - disable_syslog.changed == True
+
+ always:
+ - name: Delete all firewall rules
+ meraki_mx_site_to_site_firewall:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ state: present
+ rules: []
+ delegate_to: localhost
+ register: delete_all
+
+ - name: Delete network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: TestNetAppliance
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_uplink/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_uplink/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_uplink/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_uplink/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_uplink/tasks/main.yml
new file mode 100644
index 00000000..1e055256
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_mx_uplink/tasks/main.yml
@@ -0,0 +1,125 @@
+# Test code for the Meraki MX Uplink module
+# Copyright: (c) 2019, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Uplink'
+ type: appliance
+ delegate_to: localhost
+
+ - name: Set MX uplink settings with check mode
+ meraki_mx_uplink:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Uplink'
+ wan1:
+ bandwidth_limits:
+ limit_down: 1000000
+ limit_up: 100
+ cellular:
+ bandwidth_limits:
+ limit_down: 0
+ limit_up: 0
+ delegate_to: localhost
+ register: set_bw_check
+ check_mode: yes
+
+ - debug:
+ var: set_bw_check
+
+ - assert:
+ that:
+ - set_bw_check is changed
+ - set_bw_check.data is defined
+ - set_bw_check.diff is defined
+
+ - name: Set MX uplink settings
+ meraki_mx_uplink_bandwidth:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Uplink'
+ wan1:
+ bandwidth_limits:
+ limit_down: 1000000
+ limit_up: 1000
+ cellular:
+ bandwidth_limits:
+ limit_down: 0
+ limit_up: 0
+ delegate_to: localhost
+ register: set_bw
+
+ - debug:
+ var: set_bw
+
+ - assert:
+ that:
+ - set_bw is changed
+ - set_bw.data is defined
+
+ - name: Set MX uplink settings with idempotency
+ meraki_mx_uplink_bandwidth:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Uplink'
+ wan1:
+ bandwidth_limits:
+ limit_down: 1000000
+ limit_up: 1000
+ cellular:
+ bandwidth_limits:
+ limit_down: 0
+ limit_up: 0
+ delegate_to: localhost
+ register: set_bw_idempotent
+
+ - debug:
+ var: set_bw_idempotent
+
+ - assert:
+ that:
+ - set_bw_idempotent is not changed
+ - set_bw_idempotent.data is defined
+
+ - name: Query MX uplink settings
+ meraki_mx_uplink:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Uplink'
+ delegate_to: localhost
+ register: query_all
+
+ - debug:
+ var: query_all
+
+ - assert:
+ that:
+ - query_all.data is defined
+
+ always:
+ #############################################################################
+ # Tear down starts here
+ #############################################################################
+
+ - name: Delete test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}} - Uplink'
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_nat/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_nat/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_nat/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_nat/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_nat/tasks/main.yml
new file mode 100644
index 00000000..721a9300
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_nat/tasks/main.yml
@@ -0,0 +1,7 @@
+# Test code for the Meraki Organization module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- name: Run test cases
+ include: tests.yml ansible_connection=local
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_nat/tasks/tests.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_nat/tasks/tests.yml
new file mode 100644
index 00000000..11193d13
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_nat/tasks/tests.yml
@@ -0,0 +1,363 @@
+# Test code for the Meraki NAT module
+# Copyright: (c) 2019, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ type: appliance
+
+ - name: Create 1:1 rule with check mode
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ one_to_one:
+ - name: Service behind NAT
+ public_ip: 1.2.1.2
+ lan_ip: 192.168.128.1
+ uplink: internet1
+ allowed_inbound:
+ - protocol: tcp
+ destination_ports:
+ - 80
+ allowed_ips:
+ - 10.10.10.10
+ register: create_one_one_check
+ check_mode: yes
+
+ - debug:
+ var: create_one_one_check
+
+ - assert:
+ that:
+ - create_one_one_check is changed
+
+ - name: Create 1:1 rule
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ one_to_one:
+ - name: Service behind NAT
+ public_ip: 1.2.1.2
+ lan_ip: 192.168.128.1
+ uplink: internet1
+ allowed_inbound:
+ - protocol: tcp
+ destination_ports:
+ - 80
+ allowed_ips:
+ - 10.10.10.10
+ register: create_one_one
+
+ - debug:
+ var: create_one_one
+
+ - assert:
+ that:
+ - create_one_one is changed
+
+ - name: Create 1:1 rule with idempotency
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ one_to_one:
+ - name: Service behind NAT
+ public_ip: 1.2.1.2
+ lan_ip: 192.168.128.1
+ uplink: internet1
+ allowed_inbound:
+ - protocol: tcp
+ destination_ports:
+ - 80
+ allowed_ips:
+ - 10.10.10.10
+ register: create_one_one_idempotent
+
+ - debug:
+ var: create_one_one_idempotent
+
+ - assert:
+ that:
+ - create_one_one_idempotent is not changed
+
+ - name: Create 1:many rule with check mode
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ one_to_many:
+ - public_ip: 1.1.1.1
+ uplink: internet1
+ port_rules:
+ - name: Test rule
+ protocol: tcp
+ public_port: 10
+ local_ip: 192.168.128.1
+ local_port: 11
+ allowed_ips:
+ - any
+ register: create_one_many_check
+ check_mode: yes
+
+ - debug:
+ var: create_one_many_check
+
+ - assert:
+ that:
+ - create_one_many_check is changed
+
+ - name: Create 1:many rule
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ one_to_many:
+ - public_ip: 1.1.1.1
+ uplink: internet1
+ port_rules:
+ - name: Test rule
+ protocol: tcp
+ public_port: 10
+ local_ip: 192.168.128.1
+ local_port: 11
+ allowed_ips:
+ - any
+ register: create_one_many
+
+ - debug:
+ var: create_one_many
+
+ - assert:
+ that:
+ - create_one_many is changed
+
+ - name: Create 1:many rule with idempotency
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ one_to_many:
+ - public_ip: 1.1.1.1
+ uplink: internet1
+ port_rules:
+ - name: Test rule
+ protocol: tcp
+ public_port: 10
+ local_ip: 192.168.128.1
+ local_port: 11
+ allowed_ips:
+ - any
+ register: create_one_many_idempotent
+
+ - debug:
+ var: create_one_many_idempotent
+
+ - assert:
+ that:
+ - create_one_many_idempotent is not changed
+
+ - name: Create port forwarding rule with check mode
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ port_forwarding:
+ - name: Test map
+ lan_ip: 192.168.128.1
+ uplink: both
+ protocol: tcp
+ allowed_ips:
+ - 1.1.1.1
+ public_port: 10
+ local_port: 11
+ register: create_pf_check
+ check_mode: yes
+
+ - debug:
+ var: create_pf_check
+
+ - assert:
+ that:
+ - create_pf_check is changed
+
+ - name: Create port forwarding rule
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ port_forwarding:
+ - name: Test map
+ lan_ip: 192.168.128.1
+ uplink: both
+ protocol: tcp
+ allowed_ips:
+ - 1.1.1.1
+ public_port: 10
+ local_port: 11
+ register: create_pf
+
+ - debug:
+ var: create_pf
+
+ - assert:
+ that:
+ - create_pf is changed
+
+ - name: Create port forwarding rule with idempotency
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ port_forwarding:
+ - name: Test map
+ lan_ip: 192.168.128.1
+ uplink: both
+ protocol: tcp
+ allowed_ips:
+ - 1.1.1.1
+ public_port: 10
+ local_port: 11
+ register: create_pf_idempotent
+
+ - debug:
+ var: create_pf_idempotent
+
+ - assert:
+ that:
+ - create_pf_idempotent is not changed
+ - create_pf_idempotent.data.port_forwarding is defined
+
+ - name: Create multiple rules
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ port_forwarding:
+ - name: Test map
+ lan_ip: 192.168.128.1
+ uplink: both
+ protocol: tcp
+ allowed_ips:
+ - 1.1.1.2
+ public_port: 10
+ local_port: 11
+ one_to_many:
+ - public_ip: 1.1.1.3
+ uplink: internet1
+ port_rules:
+ - name: Test rule
+ protocol: tcp
+ public_port: 10
+ local_ip: 192.168.128.1
+ local_port: 11
+ allowed_ips:
+ - any
+ register: create_multiple
+
+ - debug:
+ var: create_multiple
+
+ - assert:
+ that:
+ - create_multiple is changed
+ - create_multiple.data.one_to_many is defined
+ - create_multiple.data.port_forwarding is defined
+
+ - assert:
+ that:
+ - create_multiple is changed
+ - create_multiple.data.one_to_many is defined
+ - create_multiple.data.port_forwarding is defined
+ - create_multiple.diff.before.one_to_many is defined
+ - create_multiple.diff.before.port_forwarding is defined
+ - create_multiple.diff.after.one_to_many is defined
+ - create_multiple.diff.after.port_forwarding is defined
+
+ - name: Query all NAT rules
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: query
+ subset: all
+ register: query_all
+
+ - debug:
+ var: query_all
+
+ - name: Query 1:1 NAT rules
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: query
+ subset: '1:1'
+ register: query_1to1
+
+ - debug:
+ var: query_1to1
+
+ - name: Query 1:many NAT rules
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: query
+ subset: '1:many'
+ register: query_1tomany
+
+ - debug:
+ var: query_1tomany
+
+ - name: Query port forwarding rules
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: query
+ subset: port_forwarding
+ register: query_pf
+
+ - debug:
+ var: query_pf
+
+ - name: Query multiple rules
+ meraki_nat:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: query
+ subset:
+ - '1:1'
+ - '1:many'
+ register: query_multiple
+
+ - debug:
+ var: query_multiple
+
+ always:
+ - name: Delete test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: absent
+ \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_network/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_network/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_network/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_network/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_network/tasks/main.yml
new file mode 100644
index 00000000..61bcb313
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_network/tasks/main.yml
@@ -0,0 +1,453 @@
+# Test code for the Meraki modules
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create network without type
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_no_type
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - create_net_no_type.msg == 'type parameter is required when creating a network.'
+
+ - name: Create network without organization
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ net_name: IntTestNetwork
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_no_org
+ ignore_errors: yes
+
+ - name: Create network with type switch with check mode
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ type: switch
+ timezone: America/Chicago
+ delegate_to: localhost
+ check_mode: yes
+ register: create_net_switch_check
+
+ - assert:
+ that:
+ - create_net_switch_check is changed
+ - create_net_switch_check.data is defined
+ - create_net_switch_check.data.organization_id == "{{test_org_id |string}}"
+
+ - name: Create network with type switch
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ type: switch
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_switch
+
+ - name: Create network with type switch by org ID
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_id: '{{test_org_id}}'
+ net_name: IntTestNetworkSwitchOrgID
+ type: switch
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_switch_org_id
+
+ - name: Create network with type appliance and no timezone
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkAppliance
+ type: appliance
+ delegate_to: localhost
+ register: create_net_appliance_no_tz
+
+ - name: Enable VLAN support on appliance network with check mode
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ enable_vlans: yes
+ delegate_to: localhost
+ check_mode: yes
+ register: enable_vlan_check
+
+ - assert:
+ that:
+ - enable_vlan_check.data.vlans_enabled == True
+ - enable_vlan_check is changed
+
+ - name: Enable VLAN support on appliance network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ enable_vlans: yes
+ delegate_to: localhost
+ register: enable_vlan
+
+ - assert:
+ that:
+ - enable_vlan.data.vlans_enabled == True
+
+ - name: Enable VLAN support on appliance network with idempotency
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ enable_vlans: yes
+ delegate_to: localhost
+ register: enable_vlan_idempotent
+
+ - assert:
+ that:
+ - enable_vlan_idempotent is not changed
+ - enable_vlan_idempotent.data is defined
+
+ - name: Disable VLAN support on appliance network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ enable_vlans: no
+ delegate_to: localhost
+ register: disable_vlan
+
+ - assert:
+ that:
+ - disable_vlan.data.vlans_enabled == False
+
+ - name: Disable VLAN support on appliance network with idempotency
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ enable_vlans: no
+ delegate_to: localhost
+ register: disable_vlan_idempotent
+
+ - assert:
+ that:
+ - disable_vlan_idempotent is not changed
+ - disable_vlan_idempotent.data is defined
+
+ - name: Change local page settings with check mode
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ local_status_page_enabled: False
+ delegate_to: localhost
+ check_mode: True
+ register: disable_local_page_check
+
+ - assert:
+ that:
+ - disable_local_page_check is changed
+
+ - name: Change local page settings
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ local_status_page_enabled: False
+ delegate_to: localhost
+ register: disable_local_page
+
+ - assert:
+ that:
+ - disable_local_page is changed
+ - disable_local_page.data is defined
+
+ - name: Change local page settings with idempotency
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkAppliance
+ local_status_page_enabled: False
+ delegate_to: localhost
+ register: disable_local_page_idempotent
+
+ - assert:
+ that:
+ - disable_local_page_idempotent is not changed
+ - disable_local_page_idempotent.data is defined
+
+ - name: Create network with type wireless
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ type: wireless
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_wireless
+
+ - assert:
+ that:
+ - '"IntTestNetworkWireless" in create_net_wireless.data.name'
+
+ - name: Create network with type wireless and check for idempotency
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkWireless
+ type: wireless
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_wireless_idempotent
+
+ - assert:
+ that:
+ - create_net_wireless_idempotent.changed == False
+ - create_net_wireless_idempotent.data is defined
+
+ - name: Create network with type combined
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{ test_org_name }}'
+ net_name: IntTestNetworkCombined
+ type:
+ - appliance
+ - switch
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_combined
+
+ - assert:
+ that:
+ - create_net_combined.data.product_types | length > 1
+
+ - name: Test status pages are mutually exclusive when on
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkCombined
+ local_status_page_enabled: yes
+ remote_status_page_enabled: no
+ delegate_to: localhost
+ register: status_exclusivity
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - '"must be true when setting" in status_exclusivity.msg'
+
+ - name: Create network with one tag
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkTag
+ type: switch
+ timezone: America/Chicago
+ tags: first_tag
+ delegate_to: localhost
+ register: create_net_tag
+
+ - name: Create network with two tags
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkTags
+ type: switch
+ timezone: America/Chicago
+ tags:
+ - first_tag
+ - second_tag
+ delegate_to: localhost
+ register: create_net_tags
+
+ - set_fact:
+ tag_net_id: '{{create_net_tags.data.id}}'
+
+ - name: Modify network by net_id
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_id: '{{tag_net_id}}'
+ type: switch
+ timezone: America/Chicago
+ tags:
+ - first_tag
+ - second_tag
+ - third_tag
+ delegate_to: localhost
+ register: create_net_modified
+
+ - name: Modify network with idempotency
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkTags
+ type: switch
+ timezone: America/Chicago
+ tags:
+ - first_tag
+ - second_tag
+ - third_tag
+ delegate_to: localhost
+ register: create_net_modified_idempotent
+
+ - assert:
+ that:
+ - create_net_modified_idempotent.data is defined
+
+ - name: Present assertions
+ assert:
+ that:
+ - '"org_name or org_id parameters are required" in create_net_no_org.msg'
+ - '"IntTestNetworkAppliance" in create_net_appliance_no_tz.data.name'
+ - create_net_appliance_no_tz.changed == True
+ - '"IntTestNetworkSwitch" in create_net_switch.data.name'
+ - '"IntTestNetworkSwitchOrgID" in create_net_switch_org_id.data.name'
+ - '"first_tag" in create_net_tag.data.tags'
+ - '"second_tag" in create_net_tags.data.tags'
+ - '"third_tag" in create_net_modified.data.tags'
+ - create_net_modified.changed == True
+ - create_net_modified_idempotent.changed == False
+ - create_net_modified_idempotent.data is defined
+
+ - name: Query network settings
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_template_name}}'
+ local_status_page_enabled: yes
+ delegate_to: localhost
+ register: query_settings
+
+ - assert:
+ that:
+ - query_settings.data is defined
+
+ - name: Query all networks
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ delegate_to: localhost
+ register: net_query_all
+
+ - name: Query a configuration template
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_template_name}}'
+ delegate_to: localhost
+ register: query_config_template
+
+ - name: Query one network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetworkSwitch
+ delegate_to: localhost
+ register: net_query_one
+
+ - name: Query assertions
+ assert:
+ that:
+ - 'net_query_one.data.name == "IntTestNetworkSwitch"'
+ - 'query_config_template.data.name == "{{ test_template_name }}"'
+
+#############################################################################
+# Tear down starts here
+#############################################################################
+ always:
+ - name: Delete network without org
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ net_name: IntTestNetworkSwitch
+ delegate_to: localhost
+ register: delete_all_no_org
+ ignore_errors: yes
+
+ - name: Delete network by org ID and check mode
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_id: '{{test_org_id}}'
+ net_name: IntTestNetworkSwitchOrgID
+ delegate_to: localhost
+ check_mode: yes
+ register: delete_net_org_id_check
+
+ - assert:
+ that:
+ - delete_net_org_id_check is changed
+ - delete_net_org_id_check.data is defined
+
+ - name: Delete network by org ID
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_id: '{{test_org_id}}'
+ net_name: IntTestNetworkSwitchOrgID
+ delegate_to: localhost
+ register: delete_net_org_id
+
+ - name: Query after delete with org ID
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ delegate_to: localhost
+ register: query_deleted_org_id
+
+ - name: Delete all networks
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{ item }}'
+ delegate_to: localhost
+ register: delete_all
+ ignore_errors: yes
+ loop:
+ - IntTestNetworkSwitch
+ - IntTestNetworkWireless
+ - IntTestNetworkAppliance
+ - IntTestNetworkCombined
+ - IntTestNetworkTag
+ - IntTestNetworkTags
+
+ - assert:
+ that:
+ - 'delete_all_no_org.msg == "org_name or org_id parameters are required"'
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_organization/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_organization/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_organization/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_organization/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_organization/tasks/main.yml
new file mode 100644
index 00000000..e7ad65b8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_organization/tasks/main.yml
@@ -0,0 +1,8 @@
+# Test code for the Meraki Organization module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- name: Run test cases
+ include: tests.yml ansible_connection=local
+ \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_organization/tasks/tests.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_organization/tasks/tests.yml
new file mode 100644
index 00000000..28ebce01
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_organization/tasks/tests.yml
@@ -0,0 +1,149 @@
+# Test code for the Meraki Organization module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create a new organization named IntTestOrg
+ meraki_organization:
+ auth_key: '{{ auth_key }}'
+ org_name: IntTestOrg
+ state: present
+ output_level: debug
+ register: new_org
+
+ - debug:
+ msg: '{{new_org}}'
+
+ - name: Clone IntTestOrg
+ meraki_organization:
+ auth_key: '{{ auth_key }}'
+ clone: IntTestOrg
+ org_name: IntTestOrgCloned
+ state: present
+ register: cloned_org
+
+ - debug:
+ msg: '{{cloned_org}}'
+
+ - set_fact:
+ cloned_net_id: '{{cloned_org.data.id}}'
+
+ - name: Rename IntTestOrg
+ meraki_organization:
+ auth_key: '{{ auth_key }}'
+ org_name: IntTestOrgRenamed
+ org_id: '{{ new_org.data.id }}'
+ state: present
+ register: modify_org
+
+ - debug:
+ msg: '{{ modify_org }}'
+
+ - set_fact:
+ renamed_org_id: '{{modify_org.data.id}}'
+
+ - name: Rename IntTestOrg idempotent
+ meraki_organization:
+ auth_key: '{{ auth_key }}'
+ org_name: IntTestOrgRenamed
+ org_id: '{{ new_org.data.id }}'
+ state: present
+ register: modify_org_idempotent
+
+ - name: Present assertions
+ assert:
+ that:
+ - '"https" in new_org.url'
+ - new_org.changed == True
+ - new_org.data.id is defined
+ - cloned_org.changed == True
+ - cloned_org.data.id is defined
+ - modify_org.changed == True
+ - 'modify_org.data.name == "IntTestOrgRenamed"'
+ - modify_org_idempotent.changed == False
+ - modify_org_idempotent.data is defined
+
+ - name: List all organizations
+ meraki_organization:
+ auth_key: '{{ auth_key }}'
+ state: query
+ register: query_all
+
+ - name: Query information about a single organization named IntTestOrg
+ meraki_organization:
+ auth_key: '{{ auth_key }}'
+ org_name: IntTestOrgRenamed
+ state: query
+ register: query_org
+
+ - name: Query information about IntTestOrg by organization ID
+ meraki_organization:
+ auth_key: '{{ auth_key }}'
+ org_id: '{{ query_org.data.id }}'
+ state: query
+ register: query_org_id
+
+ - name: Query assertions
+ assert:
+ that:
+ - query_org.data.id is defined
+ - query_all.changed == False
+ - query_all.data | length >= 1
+ - 'query_org.data.name == "IntTestOrgRenamed"'
+ - 'query_org_id.data.id == query_org.data.id'
+
+ - name: Delete without confirmation code
+ meraki_organization:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: IntTestOrgCloned
+ register: delete_no_confirm
+ ignore_errors: yes
+
+ - assert:
+ that:
+ 'delete_no_confirm.msg == "delete_confirm must match the network ID of the network to be deleted."'
+
+ always:
+ # - name: Pause playbook for more reliable deletion
+ # pause:
+ # minutes: 1
+
+ - name: Delete cloned organizations with check mode
+ meraki_organization:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: IntTestOrgCloned
+ delete_confirm: '{{cloned_net_id}}'
+ register: deleted_org_check
+ check_mode: yes
+
+ - assert:
+ that:
+ - deleted_org_check is changed
+
+ - name: Delete cloned organizations
+ meraki_organization:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: IntTestOrgCloned
+ delete_confirm: '{{cloned_net_id}}'
+ register: deleted_org
+
+ - name: Delete renamed organization by id
+ meraki_organization:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_id: '{{renamed_org_id}}'
+ delete_confirm: '{{renamed_org_id}}'
+ register: deleted_org_id
+
+ - assert:
+ that:
+ - deleted_org_id is changed
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_site_to_site_vpn/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_site_to_site_vpn/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_site_to_site_vpn/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_site_to_site_vpn/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_site_to_site_vpn/tasks/main.yml
new file mode 100644
index 00000000..d15a1b96
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_site_to_site_vpn/tasks/main.yml
@@ -0,0 +1,140 @@
+# Test code for the Meraki Admin module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+
+ - name: Create hub network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}_hub'
+ type: appliance
+ delegate_to: localhost
+ register: net_hub
+
+ - name: Create spoke network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}_spoke'
+ type: appliance
+ delegate_to: localhost
+ register: net_spoke
+
+ - set_fact:
+ net_spoke_id: '{{net_spoke.data.id}}'
+ net_hub_id: '{{net_hub.data.id}}'
+
+ - name: Set hub mode
+ meraki_site_to_site_vpn:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}_hub'
+ mode: hub
+ subnets:
+ - local_subnet: '192.168.128.0/24'
+ use_vpn: no
+ delegate_to: localhost
+ register: set_hub
+
+ - assert:
+ that:
+ - set_hub is changed
+ - set_hub.data is defined
+
+ - name: Set hub mode with idempotency
+ meraki_site_to_site_vpn:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}_hub'
+ mode: hub
+ delegate_to: localhost
+ register: set_hub_idempotent
+
+ - assert:
+ that:
+ - set_hub_idempotent is not changed
+ - set_hub_idempotent.data is defined
+
+ - name: Enable subnet on hub network
+ meraki_site_to_site_vpn:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}_hub'
+ mode: hub
+ subnets:
+ - local_subnet: '192.168.128.0/24'
+ use_vpn: yes
+ delegate_to: localhost
+ register: enable_hub_subnet
+
+ - assert:
+ that:
+ - enable_hub_subnet is changed
+ - enable_hub_subnet.data is defined
+
+ - name: Set spoke mode
+ meraki_site_to_site_vpn:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}_spoke'
+ mode: spoke
+ hubs:
+ - hub_id: '{{net_hub_id}}'
+ use_default_route: false
+ delegate_to: localhost
+ register: set_spoke
+
+ - debug:
+ var: set_spoke
+
+ - name: Set spoke configuration
+ meraki_site_to_site_vpn:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}_spoke'
+ mode: spoke
+ hubs:
+ - hub_id: '{{net_hub_id}}'
+ use_default_route: false
+ subnets:
+ - local_subnet: '192.168.169.0/24'
+ use_vpn: true
+ delegate_to: localhost
+ register: set_spoke
+
+ - debug:
+ var: set_spoke
+
+ - name: Query rules for hub
+ meraki_site_to_site_vpn:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}_hub'
+ delegate_to: localhost
+ register: query_all_hub
+
+ - debug:
+ var: query_all_hub
+
+ - name: Query rules for spoke
+ meraki_site_to_site_vpn:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}_spoke'
+ delegate_to: localhost
+ register: query_all_spoke
+
+ - debug:
+ var: query_all_spoke
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_snmp/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_snmp/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_snmp/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_snmp/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_snmp/tasks/main.yml
new file mode 100644
index 00000000..ed0868a4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_snmp/tasks/main.yml
@@ -0,0 +1,290 @@
+# Test code for the Meraki Organization module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create SNMP network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ type: appliance
+ delegate_to: localhost
+ register: new_net
+
+ - set_fact:
+ net_id: new_net.data.id
+
+ - name: Query all SNMP settings
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ state: query
+ delegate_to: localhost
+ register: snmp_query
+
+ - debug:
+ msg: '{{snmp_query}}'
+
+ - name: Enable SNMPv2c
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ state: present
+ v2c_enabled: true
+ delegate_to: localhost
+ register: snmp_v2_enable
+
+ - debug:
+ msg: '{{snmp_v2_enable}}'
+
+ - assert:
+ that:
+ - snmp_v2_enable.data.v2_community_string is defined
+ - snmp_v2_enable.data.v2c_enabled == true
+
+ - name: Disable SNMPv2c
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ state: present
+ v2c_enabled: False
+ delegate_to: localhost
+ register: snmp_v2_disable
+
+ - assert:
+ that:
+ - snmp_v2_disable.data.v2_community_string is not defined
+ - snmp_v2_disable.data.v2c_enabled == False
+
+ - name: Enable SNMPv2c with org_id
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_id: '{{test_org_id}}'
+ state: present
+ v2c_enabled: true
+ delegate_to: localhost
+ register: snmp_v2_enable_id
+
+ - debug:
+ msg: '{{snmp_v2_enable_id}}'
+
+ - assert:
+ that:
+ - snmp_v2_enable_id.data.v2_community_string is defined
+ - snmp_v2_enable_id.data.v2c_enabled == true
+
+ - name: Disable SNMPv2c with org_id
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_id: '{{test_org_id}}'
+ state: present
+ v2c_enabled: False
+ delegate_to: localhost
+ register: snmp_v2_disable_id
+
+ - assert:
+ that:
+ - snmp_v2_disable_id.data.v2_community_string is not defined
+ - snmp_v2_disable_id.data.v2c_enabled == False
+
+ - name: Enable SNMPv3 with check mode
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ state: present
+ v3_enabled: true
+ v3_auth_mode: SHA
+ v3_auth_pass: ansiblepass
+ v3_priv_mode: AES128
+ v3_priv_pass: ansiblepass
+ delegate_to: localhost
+ check_mode: yes
+ register: snmp_v3_enable_check
+
+ - assert:
+ that:
+ - snmp_v3_enable_check.data.v3_enabled == True
+ - snmp_v3_enable_check.changed == True
+
+ - name: Enable SNMPv3
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ state: present
+ v3_enabled: true
+ v3_auth_mode: SHA
+ v3_auth_pass: ansiblepass
+ v3_priv_mode: AES128
+ v3_priv_pass: ansiblepass
+ delegate_to: localhost
+ register: snmp_v3_enable
+
+ - assert:
+ that:
+ - snmp_v3_enable.data.v3_enabled == True
+ - snmp_v3_enable.changed == True
+
+ - name: Check for idempotency
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ state: present
+ v3_enabled: true
+ v3_auth_mode: SHA
+ v3_auth_pass: ansiblepass
+ v3_priv_mode: AES128
+ v3_priv_pass: ansiblepass
+ delegate_to: localhost
+ register: snmp_idempotent
+
+ - debug:
+ msg: '{{snmp_idempotent}}'
+
+ - assert:
+ that:
+ - snmp_idempotent.changed == False
+ - snmp_idempotent.data is defined
+
+ - name: Add peer IPs
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ state: present
+ v3_enabled: true
+ v3_auth_mode: SHA
+ v3_auth_pass: ansiblepass
+ v3_priv_mode: AES128
+ v3_priv_pass: ansiblepass
+ peer_ips:
+ - 1.1.1.1
+ - 2.2.2.2
+ delegate_to: localhost
+ register: peers
+
+ - debug:
+ msg: '{{peers}}'
+
+ - assert:
+ that:
+ - peers.data.peer_ips is defined
+
+ - name: Set short password
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ state: present
+ v3_enabled: true
+ v3_auth_mode: SHA
+ v3_auth_pass: ansible
+ v3_priv_mode: AES128
+ v3_priv_pass: ansible
+ delegate_to: localhost
+ register: short_password
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - '"at least 8" in short_password.msg'
+
+ - name: Set network access type to community string
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ access: community
+ community_string: abc123
+ delegate_to: localhost
+ register: set_net_community
+
+ - debug:
+ var: set_net_community
+
+ - assert:
+ that:
+ - set_net_community is changed
+ - set_net_community.data is defined
+
+ - name: Set network access type to username
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ access: users
+ users:
+ - username: ansibleuser
+ passphrase: ansiblepass
+ delegate_to: localhost
+ register: set_net_user
+
+ - debug:
+ var: set_net_user
+
+ - assert:
+ that:
+ - set_net_user is changed
+ - set_net_user.data is defined
+
+ - name: Set network access type to none
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ access: none
+ delegate_to: localhost
+ register: set_net_none
+
+ - debug:
+ var: set_net_none
+
+ - assert:
+ that:
+ - set_net_none is changed
+ - set_net_none.data is defined
+
+ - name: Query network SNMP settings
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: query
+ delegate_to: localhost
+ register: get_net
+
+ - debug:
+ var: get_net
+
+ - assert:
+ that:
+ - get_net.data is defined
+
+ always:
+ - name: Disable SNMPv3
+ meraki_snmp:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ state: present
+ v3_enabled: no
+ v3_auth_mode: SHA
+ v3_auth_pass: ansiblepass
+ v3_priv_mode: AES128
+ v3_priv_pass: ansiblepass
+ delegate_to: localhost
+
+ - name: Delete SNMP network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ssid/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ssid/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ssid/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ssid/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ssid/tasks/main.yml
new file mode 100644
index 00000000..638bdf12
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_ssid/tasks/main.yml
@@ -0,0 +1,551 @@
+# Test code for the Meraki SSID module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+
+ - set_fact:
+ wpa_enabled: false
+
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ type: wireless
+ register: test_net
+
+ - debug:
+ msg: '{{test_net}}'
+
+ - name: Add access points to network
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ serial: '{{serial_wireless}}'
+ delegate_to: localhost
+
+ - name: Query all SSIDs
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ delegate_to: localhost
+ register: query_all
+
+ - name: Enable and name SSID with check mode
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ enabled: true
+ delegate_to: localhost
+ register: enable_name_ssid_check
+ check_mode: yes
+
+ - assert:
+ that:
+ - enable_name_ssid_check is changed
+ - enable_name_ssid_check.data is defined
+
+ - name: Enable and name SSID
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ enabled: true
+ delegate_to: localhost
+ register: enable_name_ssid
+
+ - debug:
+ msg: '{{ enable_name_ssid }}'
+
+ - assert:
+ that:
+ - query_all.data | length == 15
+ - query_all.data.0.name == 'TestNetSSID WiFi'
+ - enable_name_ssid.data.name == 'AnsibleSSID'
+
+ - name: Check for idempotency
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ enabled: true
+ delegate_to: localhost
+ register: enable_name_ssid_idempotent
+
+ - debug:
+ msg: '{{ enable_name_ssid_idempotent }}'
+
+ - assert:
+ that:
+ - enable_name_ssid_idempotent.changed == False
+ - enable_name_ssid_idempotent.data is defined
+
+ - name: Query one SSIDs
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ delegate_to: localhost
+ register: query_one
+
+ - debug:
+ msg: '{{query_one}}'
+
+ - assert:
+ that:
+ - query_one.data.name == 'AnsibleSSID'
+
+ - name: Query one SSID with number
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ number: 1
+ delegate_to: localhost
+ register: query_one_number
+
+ - debug:
+ msg: '{{query_one_number}}'
+
+ - assert:
+ that:
+ - query_one_number.data.name == 'AnsibleSSID'
+
+ - name: Disable SSID without specifying number
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ enabled: false
+ delegate_to: localhost
+ register: disable_ssid
+
+ - debug:
+ msg: '{{ disable_ssid.data.enabled }}'
+
+ - assert:
+ that:
+ - disable_ssid.data.enabled == False
+
+ - name: Enable SSID with number
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ number: 1
+ enabled: true
+ delegate_to: localhost
+ register: enable_ssid_number
+
+ - debug:
+ msg: '{{ enable_ssid_number.data.enabled }}'
+
+ - assert:
+ that:
+ - enable_ssid_number.data.enabled == True
+
+ - name: Set VLAN arg spec
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ number: 1
+ use_vlan_tagging: yes
+ ip_assignment_mode: Bridge mode
+ default_vlan_id: 1
+ ap_tags_vlan_ids:
+ - tags: wifi
+ vlan_id: 2
+ delegate_to: localhost
+ register: set_vlan_arg
+
+ - debug:
+ var: set_vlan_arg
+
+ - assert:
+ that: set_vlan_arg is changed
+
+ - name: Set VLAN arg spec
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ number: 1
+ use_vlan_tagging: yes
+ ip_assignment_mode: Bridge mode
+ default_vlan_id: 1
+ ap_tags_vlan_ids:
+ - tags: wifi
+ vlan_id: 2
+ delegate_to: localhost
+ register: set_vlan_arg_idempotent
+
+ - debug:
+ var: set_vlan_arg_idempotent
+
+ - assert:
+ that: set_vlan_arg_idempotent is not changed
+
+
+ - name: Set PSK
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ auth_mode: psk
+ psk: abc1234567890
+ encryption_mode: wpa
+ delegate_to: localhost
+ register: psk
+
+ - debug:
+ msg: '{{ psk }}'
+
+ - assert:
+ that:
+ - psk.data.auth_mode == 'psk'
+ - psk.data.encryption_mode == 'wpa'
+ - psk.data.wpa_encryption_mode == 'WPA2 only'
+
+ - name: Set PSK with idempotency
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ auth_mode: psk
+ psk: abc1234567890
+ encryption_mode: wpa
+ delegate_to: localhost
+ register: psk_idempotent
+
+ - debug:
+ msg: '{{ psk_idempotent }}'
+
+ - assert:
+ that:
+ - psk_idempotent is not changed
+
+ #
+ # Check WPA3 Transition Mode
+ #
+ - name: Set WPA3 Transition Mode
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ auth_mode: psk
+ psk: abc1234567890
+ encryption_mode: wpa
+ wpa_encryption_mode: WPA3 Transition Mode
+ delegate_to: localhost
+ register: psk_wpa3_transition_mode
+ when: wpa_enabled == true
+
+ - debug:
+ msg: '{{ psk_wpa3_transition_mode }}'
+ when: wpa_enabled == True
+
+ - assert:
+ that:
+ - psk_wpa3_transition_mode.data.auth_mode == 'psk'
+ - psk_wpa3_transition_mode.data.encryption_mode == 'wpa'
+ - psk_wpa3_transition_mode.data.wpa_encryption_mode == 'WPA3 Transition Mode'
+ when: wpa_enabled == True
+
+ - name: Set WPA3 Transition Mode with Idempotency
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ auth_mode: psk
+ psk: abc1234567890
+ encryption_mode: wpa
+ wpa_encryption_mode: WPA3 Transition Mode
+ delegate_to: localhost
+ register: psk_wpa3_transition_mode_idempotent
+ when: wpa_enabled == True
+
+ - debug:
+ msg: '{{ psk_wpa3_transition_mode_idempotent }}'
+ when: wpa_enabled == True
+
+ - assert:
+ that:
+ - psk_wpa3_transition_mode_idempotent is not changed
+ when: wpa_enabled == True
+
+ - name: Enable click-through splash page
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ splash_page: Click-through splash page
+ delegate_to: localhost
+ register: splash_click
+
+ - debug:
+ msg: '{{ splash_click }}'
+
+ - assert:
+ that:
+ - splash_click.data.splash_page == 'Click-through splash page'
+
+ - name: Set walled garden
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ walled_garden_enabled: yes
+ walled_garden_ranges:
+ - 192.168.0.0/24
+ - '*.ansible.com'
+ delegate_to: localhost
+ register: walled_garden
+
+ - debug:
+ msg: '{{ walled_garden }}'
+
+ - assert:
+ that:
+ - 'walled_garden.data.walled_garden_enabled == True'
+ - walled_garden is changed
+
+ - name: Set walled garden with idempotency
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ walled_garden_enabled: yes
+ walled_garden_ranges:
+ - 192.168.0.0/24
+ - '*.ansible.com'
+ delegate_to: localhost
+ register: walled_garden_idempotent
+
+ - debug:
+ msg: '{{ walled_garden_idempotent }}'
+
+ - assert:
+ that:
+ - walled_garden_idempotent.data is defined
+ - walled_garden_idempotent is not changed
+
+ - name: Configure RADIUS servers
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ auth_mode: open-with-radius
+ radius_servers:
+ - host: 192.0.1.200
+ port: 1234
+ secret: abc98765
+ delegate_to: localhost
+ register: set_radius_server
+
+ - debug:
+ msg: '{{ set_radius_server }}'
+
+ - assert:
+ that:
+ - set_radius_server.data.radius_servers.0.host == '192.0.1.200'
+
+ - name: Configure RADIUS servers with idempotency
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ auth_mode: open-with-radius
+ radius_servers:
+ - host: 192.0.1.200
+ port: 1234
+ secret: abc98765
+ delegate_to: localhost
+ register: set_radius_server_idempotent
+
+ - debug:
+ var: set_radius_server_idempotent
+
+ - assert:
+ that:
+ - set_radius_server_idempotent is not changed
+
+ #################
+ # Error testing #
+ #################
+ - name: Set PSK with wrong mode
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ auth_mode: open
+ psk: abc1234
+ delegate_to: localhost
+ register: psk_invalid
+ ignore_errors: yes
+
+ - debug:
+ msg: '{{ psk_invalid }}'
+
+ - assert:
+ that:
+ - psk_invalid.msg == 'PSK is only allowed when auth_mode is set to psk'
+
+ - name: Set PSK with invalid encryption mode
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ auth_mode: psk
+ psk: abc1234
+ encryption_mode: eap
+ delegate_to: localhost
+ register: psk_invalid_mode
+ ignore_errors: yes
+
+ - debug:
+ msg: '{{ psk_invalid_mode }}'
+
+ - assert:
+ that:
+ - psk_invalid_mode.msg == 'PSK requires encryption_mode be set to wpa'
+
+ - name: Error for PSK and RADIUS servers
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ auth_mode: psk
+ radius_servers:
+ - host: 192.0.1.200
+ port: 1234
+ secret: abc98765
+ delegate_to: localhost
+ register: err_radius_server_psk
+ ignore_errors: yes
+
+ - debug:
+ var: err_radius_server_psk
+
+ - assert:
+ that:
+ - 'err_radius_server_psk.msg == "radius_servers requires auth_mode to be open-with-radius or 8021x-radius"'
+
+ - name: Set VLAN arg without default VLAN error
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ number: 1
+ use_vlan_tagging: yes
+ ip_assignment_mode: Bridge mode
+ ap_tags_vlan_ids:
+ - tags: wifi
+ vlan_id: 2
+ delegate_to: localhost
+ register: set_vlan_arg_err
+ ignore_errors: yes
+
+ - debug:
+ var: set_vlan_arg_err
+
+ - assert:
+ that:
+ - 'set_vlan_arg_err.msg == "default_vlan_id is required when use_vlan_tagging is True"'
+
+ always:
+ - name: Delete SSID with check mode
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ delegate_to: localhost
+ register: delete_ssid_check
+ check_mode: yes
+
+ - assert:
+ that:
+ - delete_ssid_check is changed
+ - delete_ssid_check.data is defined
+
+ - name: Delete SSID
+ meraki_ssid:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ name: AnsibleSSID
+ delegate_to: localhost
+ register: delete_ssid
+
+ - debug:
+ msg: '{{ delete_ssid }}'
+
+ - assert:
+ that:
+ - delete_ssid.data.name == 'Unconfigured SSID 2'
+
+ - name: Delete test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: TestNetSSID
+ register: delete_net
+
+ - debug:
+ msg: '{{delete_net}}'
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_static_route/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_static_route/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_static_route/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_static_route/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_static_route/tasks/main.yml
new file mode 100644
index 00000000..6313c23c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_static_route/tasks/main.yml
@@ -0,0 +1,187 @@
+# Test code for the Meraki modules
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create appliance network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ timezone: America/Chicago
+ type: appliance
+ delegate_to: localhost
+ register: net
+
+ - set_fact:
+ net_id: '{{net.data.id}}'
+
+ - name: Initialize static route id list
+ set_fact:
+ route_ids: []
+
+ - name: Create static_route
+ meraki_static_route:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ name: Test Route
+ subnet: 192.0.1.0/24
+ gateway_ip: 192.168.128.1
+ delegate_to: localhost
+ register: create_route
+
+ - set_fact:
+ route_ids: "{{ route_ids + [create_route.data.id] }}"
+
+ - name: Create static_route with idempotency
+ meraki_static_route:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ name: Test Route
+ subnet: 192.0.1.0/24
+ gateway_ip: 192.168.128.1
+ delegate_to: localhost
+ register: create_route_idempotent
+
+ - assert:
+ that:
+ - create_route_idempotent is not changed
+
+ - name: Create second static_route
+ meraki_static_route:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ name: Test Route 2
+ subnet: 192.0.2.0/24
+ gateway_ip: 192.168.128.1
+ delegate_to: localhost
+ register: second_create
+
+ - set_fact:
+ route_ids: "{{ route_ids + [second_create.data.id] }}"
+
+ - assert:
+ that:
+ - create_route.changed == True
+ - create_route.data.id is defined
+
+ - name: Update static route
+ meraki_static_route:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ route_id: '{{create_route.data.id}}'
+ subnet: 192.0.3.0/24
+ enabled: yes
+ delegate_to: localhost
+ register: update
+
+ - assert:
+ that:
+ - update is changed
+ - update.data.subnet == "192.0.3.0/24"
+
+ - name: Query static routes
+ meraki_static_route:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ delegate_to: localhost
+ register: query_all
+
+ - debug:
+ var: query_all
+
+ - assert:
+ that:
+ - query_all.data | length >= 2
+
+ - name: Update static route with idempotency
+ meraki_static_route:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ route_id: '{{create_route.data.id}}'
+ name: Test Route
+ gateway_ip: 192.168.128.1
+ subnet: 192.0.3.0/24
+ enabled: yes
+ delegate_to: localhost
+ register: update_idempotent
+
+ - assert:
+ that:
+ - update_idempotent.changed == False
+ - update_idempotent.data is defined
+
+ - name: Update static route with fixed IP assignment and reservation
+ meraki_static_route:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ route_id: '{{create_route.data.id}}'
+ fixed_ip_assignments:
+ - mac: aa:bb:cc:dd:ee:ff
+ ip: 192.0.3.11
+ name: WebServer
+ reserved_ip_ranges:
+ - start: 192.168.3.2
+ end: 192.168.3.10
+ comment: Printers
+ delegate_to: localhost
+ register: fixed_ip
+
+ - debug:
+ var: fixed_ip
+
+ - assert:
+ that:
+ - fixed_ip.data.fixed_ip_assignments | length == 1
+ - fixed_ip.data.reserved_ip_ranges | length == 1
+
+
+ - name: Query single static route
+ meraki_static_route:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ route_id: '{{create_route.data.id}}'
+ delegate_to: localhost
+ register: query_one
+
+ - assert:
+ that:
+ - query_one.data.name == "Test Route"
+
+ - name: Delete static routes
+ meraki_static_route:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ route_id: '{{item}}'
+ delegate_to: localhost
+ loop: '{{route_ids}}'
+ register: delete_all
+
+ always:
+ - name: Delete appliance network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: IntTestNetwork
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_access_list/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_access_list/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_access_list/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_access_list/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_access_list/tasks/main.yml
new file mode 100644
index 00000000..f671fc92
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_access_list/tasks/main.yml
@@ -0,0 +1,7 @@
+# Test code for the Meraki Webhooks module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- name: Run test cases
+ include: tests.yml ansible_connection=local
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_access_list/tasks/tests.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_access_list/tasks/tests.yml
new file mode 100644
index 00000000..cb0ac0be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_access_list/tasks/tests.yml
@@ -0,0 +1,123 @@
+# Test code for the Meraki Webhook module
+# Copyright: (c) 2019, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ type: switch
+
+ - name: Set access list in check mode
+ meraki_switch_access_list:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ rules:
+ - comment: Fake rule
+ policy: allow
+ ip_version: ipv4
+ protocol: udp
+ src_cidr: 192.0.1.0/24
+ src_port: "4242"
+ dst_cidr: 1.2.3.4/32
+ dst_port: "80"
+ vlan: "100"
+ register: create_check
+ check_mode: yes
+
+ - assert:
+ that:
+ - create_check is changed
+ - create_check.data is defined
+
+ - debug:
+ var: create_check
+
+ - name: Set access list
+ meraki_switch_access_list:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ rules:
+ - comment: Fake rule
+ policy: allow
+ ip_version: ipv4
+ protocol: udp
+ src_cidr: 192.0.1.0/24
+ src_port: "4242"
+ dst_cidr: 1.2.3.4/32
+ dst_port: "80"
+ vlan: "100"
+ register: create
+
+ - assert:
+ that:
+ - create is changed
+ - create.data is defined
+
+ - debug:
+ var: create
+
+ - name: Set access list with idempotency
+ meraki_switch_access_list:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ rules:
+ - comment: Fake rule
+ policy: allow
+ ip_version: ipv4
+ protocol: udp
+ src_cidr: 192.0.1.0/24
+ src_port: 4242
+ dst_cidr: 1.2.3.4/32
+ dst_port: 80
+ vlan: 100
+ register: create_idempotent
+
+ - debug:
+ var: create_idempotent
+
+ - assert:
+ that:
+ - create_idempotent is not changed
+ - create_idempotent.data is defined
+
+ - name: Query access lists
+ meraki_switch_access_list:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ register: query
+
+ - debug:
+ var: query
+
+ - assert:
+ that:
+ - query.data is defined
+
+ #############################################################################
+ # Tear down starts here
+ #############################################################################
+ always:
+ - name: Delete test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_stack/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_stack/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_stack/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_stack/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_stack/tasks/main.yml
new file mode 100644
index 00000000..853cbbe7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_stack/tasks/main.yml
@@ -0,0 +1,198 @@
+# Test code for the Meraki Switch Stack module
+# Copyright: (c) 2020, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create network with type switch
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ type: switch
+ timezone: America/Chicago
+ delegate_to: localhost
+ register: create_net_switch
+
+ - set_fact:
+ net_id: '{{create_net_switch.data.id}}'
+
+ - name: Claim devices into network
+ meraki_device:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_id: '{{net_id}}'
+ serial: '{{item}}'
+ state: present
+ delegate_to: localhost
+ register: claim_device
+ loop:
+ - "QBSB-BPR6-PRER"
+ - "QBSB-VLNE-E299"
+ - "QBSB-D75G-PXCG"
+
+ - name: Create new stack
+ meraki_switch_stack:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ name: Test stack
+ serials:
+ - "QBSB-BPR6-PRER"
+ - "QBSB-VLNE-E299"
+ register: create
+
+ - debug:
+ var: create
+
+ - set_fact:
+ stack_id: '{{create.data.id}}'
+
+ - assert:
+ that:
+ - create.data is defined
+ - create is changed
+
+ - name: Add switch to stack
+ meraki_switch_stack:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ stack_id: '{{stack_id}}'
+ serials:
+ - "QBSB-D75G-PXCG"
+ register: add_stack
+
+ - assert:
+ that:
+ - add_stack.data is defined
+ - add_stack.data.serials | length == 3
+ - add_stack is changed
+
+ - name: Add switch to stack idempotent
+ meraki_switch_stack:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ stack_id: '{{stack_id}}'
+ serials:
+ - "QBSB-D75G-PXCG"
+ register: add_stack_idempotent
+
+ - assert:
+ that:
+ - add_stack_idempotent.data is defined
+ - add_stack_idempotent.data.serials | length == 3
+ - add_stack_idempotent is not changed
+
+ - name: Remove switch from stack
+ meraki_switch_stack:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ stack_id: '{{stack_id}}'
+ serials:
+ - "QBSB-D75G-PXCG"
+ register: remove_from_stack
+
+ - debug:
+ var: remove_from_stack
+
+ - assert:
+ that:
+ - remove_from_stack.data is defined
+ - remove_from_stack.data.serials | length == 2
+ - remove_from_stack is changed
+
+ - name: Remove switch from stack idempotent
+ meraki_switch_stack:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ stack_id: '{{stack_id}}'
+ serials:
+ - "QBSB-D75G-PXCG"
+ register: remove_from_stack_idempotent
+
+ - debug:
+ var: remove_from_stack_idempotent
+
+ - assert:
+ that:
+ - remove_from_stack_idempotent.data is defined
+ - remove_from_stack_idempotent.data.serials | length == 2
+ - remove_from_stack_idempotent is not changed
+
+ - name: Query all stacks in the network
+ meraki_switch_stack:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ register: query_all
+
+ - debug:
+ var: query_all
+
+ - assert:
+ that:
+ - query_all.data is defined
+ - query_all is not changed
+
+ - name: Query one stack
+ meraki_switch_stack:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ stack_id: '{{stack_id}}'
+ register: query_one
+
+ - debug:
+ var: query_one
+
+ - assert:
+ that:
+ - query_one.data is defined
+ - query_one is not changed
+
+ - name: Query one stack using name
+ meraki_switch_stack:
+ auth_key: '{{ auth_key }}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ name: Test stack
+ register: query_one_name
+
+ - debug:
+ var: query_one_name
+
+ - assert:
+ that:
+ - query_one_name.data is defined
+ - query_one_name is not changed
+
+ always:
+ - name: Delete stack
+ meraki_switch_stack:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ stack_id: '{{stack_id}}'
+ register: delete
+
+ - name: Delete network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_switch_net_name}}'
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_storm_control/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_storm_control/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_storm_control/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_storm_control/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_storm_control/tasks/main.yml
new file mode 100644
index 00000000..e4f9fc10
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switch_storm_control/tasks/main.yml
@@ -0,0 +1,107 @@
+# Test code for the Meraki modules
+# Copyright: (c) 2019, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Create switch network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: Home - Switch
+ timezone: America/Chicago
+ type: switch
+ delegate_to: localhost
+ register: net
+
+ - set_fact:
+ net_id: '{{net.data.id}}'
+
+ - name: Add device to network
+ meraki_device:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: Home - Switch
+ serial: '{{serial_switch_l3}}'
+ delegate_to: localhost
+
+ - name: Reset data
+ meraki_switch_storm_control:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: Home - Switch
+ broadcast_threshold: 100
+ multicast_threshold: 100
+ unknown_unicast_threshold: 100
+ delegate_to: localhost
+
+ - name: Set broadcast settings
+ meraki_switch_storm_control:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: Home - Switch
+ broadcast_threshold: 75
+ multicast_threshold: 70
+ unknown_unicast_threshold: 65
+ delegate_to: localhost
+ register: set_all
+
+ - assert:
+ that:
+ - set_all is changed
+ - set_all.data is defined
+ - set_all.diff is defined
+ - set_all.diff.before is defined
+ - set_all.diff.after is defined
+ - '{{set_all.data.broadcast_threshold}} == 75'
+ - '{{set_all.data.multicast_threshold}} == 70'
+ - '{{set_all.data.unknown_unicast_threshold}} == 65'
+
+ - name: Set broadcast settings with idempotency
+ meraki_switch_storm_control:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: Home - Switch
+ broadcast_threshold: 75
+ multicast_threshold: 70
+ unknown_unicast_threshold: 65
+ delegate_to: localhost
+ register: set_all_idempotent
+
+ - assert:
+ that:
+ - set_all_idempotent is not changed
+ - set_all_idempotent.data is defined
+ - '{{set_all_idempotent.data.broadcast_threshold}} == 75'
+ - '{{set_all_idempotent.data.multicast_threshold}} == 70'
+ - '{{set_all_idempotent.data.unknown_unicast_threshold}} == 65'
+
+ - name: Query storm control settings
+ meraki_switch_storm_control:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: Home - Switch
+ delegate_to: localhost
+ register: query_all
+
+ - debug:
+ var: query_all
+
+ - assert:
+ that:
+ - query_all.data is defined
+
+ # always:
+ # - name: Delete switch network
+ # meraki_network:
+ # auth_key: '{{ auth_key }}'
+ # state: absent
+ # org_name: '{{test_org_name}}'
+ # net_name: Home - Switch
+ # delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switchport/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switchport/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switchport/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switchport/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switchport/tasks/main.yml
new file mode 100644
index 00000000..06f0dcfe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_switchport/tasks/main.yml
@@ -0,0 +1,354 @@
+# Test code for the Meraki Organization module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+- name: Query all switchports
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: query
+ serial: '{{ serial_switch }}'
+ delegate_to: localhost
+ register: query_all
+
+- debug:
+ msg: '{{query_all}}'
+
+- name: Query one switchport
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: query
+ serial: '{{ serial_switch }}'
+ number: 1
+ delegate_to: localhost
+ register: query_one
+
+- debug:
+ msg: '{{query_one}}'
+
+- name: Enable switchport with check mode
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ enabled: true
+ delegate_to: localhost
+ check_mode: yes
+ register: update_port_true_check
+
+- debug:
+ msg: '{{update_port_true_check}}'
+
+- assert:
+ that:
+ - update_port_true_check is changed
+ - update_port_true_check.data is defined
+
+- name: Enable switchport
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ enabled: true
+ delegate_to: localhost
+ register: update_port_true
+
+- debug:
+ msg: '{{update_port_true}}'
+
+- assert:
+ that:
+ - update_port_true.data.enabled == True
+
+- name: Disable switchport
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ enabled: false
+ delegate_to: localhost
+ register: update_port_false
+
+- debug:
+ msg: '{{update_port_false}}'
+
+- assert:
+ that:
+ - update_port_false.data.enabled == False
+
+
+- name: Name switchport
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ name: Test Port
+ delegate_to: localhost
+ register: update_port_name
+
+- debug:
+ msg: '{{update_port_name}}'
+
+- assert:
+ that:
+ - update_port_name.data.name == 'Test Port'
+
+- name: Configure access port with check mode
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ enabled: true
+ name: Test Port
+ tags: desktop
+ type: access
+ vlan: 10
+ delegate_to: localhost
+ check_mode: yes
+ register: update_access_port_changed
+
+- debug:
+ msg: '{{update_access_port_changed}}'
+
+- assert:
+ that:
+ - update_access_port_changed is changed
+ - update_access_port_changed.data is defined
+
+- name: Configure access port
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ enabled: true
+ name: Test Port
+ tags: desktop
+ type: access
+ vlan: 10
+ delegate_to: localhost
+ register: update_access_port
+
+- debug:
+ msg: '{{update_access_port}}'
+
+- assert:
+ that:
+ - update_access_port.data.vlan == 10
+
+- name: Configure port as trunk
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 8
+ enabled: true
+ name: Test Port
+ type: trunk
+ vlan: 10
+ allowed_vlans: 10, 100, 200
+ delegate_to: localhost
+
+- name: Convert trunk port to access
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 8
+ enabled: true
+ name: Test Port
+ type: access
+ vlan: 10
+ delegate_to: localhost
+
+- name: Test converted port for idempotency
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 8
+ enabled: true
+ name: Test Port
+ type: access
+ vlan: 10
+ delegate_to: localhost
+ register: convert_idempotent
+
+- assert:
+ that:
+ - convert_idempotent.changed == False
+
+- name: Change voice VLAN for next task
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ enabled: true
+ name: Test Port
+ tags: desktop
+ type: access
+ vlan: 10
+ voice_vlan: 12
+ delegate_to: localhost
+ register: update_port_vvlan
+
+- name: Configure access port with voice VLAN
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ enabled: true
+ name: Test Port
+ tags: desktop
+ type: access
+ vlan: 10
+ voice_vlan: 11
+ delegate_to: localhost
+ register: update_port_vvlan
+
+- debug:
+ msg: '{{update_port_vvlan}}'
+
+- assert:
+ that:
+ - update_port_vvlan.data.voice_vlan == 11
+ - update_port_vvlan.changed == True
+
+- name: Check access port for idempotenty
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ enabled: true
+ name: Test Port
+ tags: desktop
+ type: access
+ vlan: 10
+ voice_vlan: 11
+ delegate_to: localhost
+ register: update_port_access_idempotent
+
+- debug:
+ msg: '{{update_port_access_idempotent}}'
+
+- assert:
+ that:
+ - update_port_access_idempotent.changed == False
+ - update_port_access_idempotent.data is defined
+
+- name: Configure trunk port
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ enabled: true
+ name: Server port
+ tags: server
+ type: trunk
+ allowed_vlans: all
+ vlan: 8
+ delegate_to: localhost
+ register: update_trunk
+
+- debug:
+ msg: '{{update_trunk}}'
+
+- assert:
+ that:
+ - update_trunk.data.tags.0 == 'server'
+ - update_trunk.data.type == 'trunk'
+ - update_trunk.data.allowed_vlans == 'all'
+
+- name: Configure trunk port with specific VLANs
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ enabled: true
+ name: Server port
+ tags: server
+ type: trunk
+ vlan: 8
+ allowed_vlans:
+ - 10
+ - 15
+ - 20
+ delegate_to: localhost
+ register: update_trunk
+
+- debug:
+ msg: '{{update_trunk}}'
+
+- assert:
+ that:
+ - update_trunk.data.tags.0 == 'server'
+ - update_trunk.data.type == 'trunk'
+ - update_trunk.data.allowed_vlans == '8,10,15,20'
+
+- name: Configure trunk port with specific VLANs and native VLAN
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ enabled: true
+ name: Server port
+ tags: server
+ type: trunk
+ vlan: 2
+ allowed_vlans:
+ - 10
+ - 15
+ - 20
+ delegate_to: localhost
+ register: update_trunk
+
+- debug:
+ msg: '{{update_trunk}}'
+
+- assert:
+ that:
+ - update_trunk.data.tags.0 == 'server'
+ - update_trunk.data.type == 'trunk'
+ - update_trunk.data.allowed_vlans == '2,10,15,20'
+
+- name: Check for idempotency on trunk port
+ meraki_switchport:
+ auth_key: '{{auth_key}}'
+ state: present
+ serial: '{{ serial_switch }}'
+ number: 7
+ enabled: true
+ name: Server port
+ tags: server
+ type: trunk
+ vlan: 2
+ allowed_vlans:
+ - 10
+ - 15
+ - 20
+ delegate_to: localhost
+ register: update_trunk_idempotent
+
+- debug:
+ msg: '{{update_trunk_idempotent}}'
+
+- assert:
+ that:
+ - update_trunk_idempotent.changed == False
+ - update_trunk_idempotent.data is defined
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_syslog/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_syslog/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_syslog/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_syslog/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_syslog/tasks/main.yml
new file mode 100644
index 00000000..397d1d72
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_syslog/tasks/main.yml
@@ -0,0 +1,153 @@
+# Test code for the Meraki Organization module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - set_fact:
+ syslog_test_net_name: 'syslog_{{test_net_name}}'
+
+ - name: Create network with type appliance and no timezone
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ type: appliance
+ delegate_to: localhost
+ register: new_net
+
+ - set_fact:
+ net_id: '{{new_net.data.id}}'
+
+ - name: Query syslog settings
+ meraki_syslog:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: query
+ delegate_to: localhost
+ register: query_all
+
+ - name: Set syslog server
+ meraki_syslog:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ servers:
+ - host: 192.0.1.2
+ port: 514
+ roles:
+ - Appliance event log
+ delegate_to: localhost
+ register: create_server
+
+ - assert:
+ that:
+ - create_server['data']['servers'][0]['host'] == "192.0.1.2"
+
+ - name: Set syslog server with idempotency
+ meraki_syslog:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ servers:
+ - host: 192.0.1.2
+ port: 514
+ roles:
+ - Appliance event log
+ delegate_to: localhost
+ register: create_server_idempotency
+
+ - assert:
+ that:
+ - create_server_idempotency.changed == False
+ - create_server_idempotency.data is defined
+
+ - name: Set multiple syslog servers
+ meraki_syslog:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_id: '{{net_id}}'
+ state: present
+ servers:
+ - host: 192.0.1.3
+ port: 514
+ roles:
+ - Appliance event log
+ - host: 192.0.1.4
+ port: 514
+ roles:
+ - Appliance event log
+ - Flows
+ - host: 192.0.1.5
+ port: 514
+ roles:
+ - Flows
+ delegate_to: localhost
+ register: create_multiple_servers
+
+ - assert:
+ that:
+ - create_multiple_servers['data']['servers'][0]['host'] == "192.0.1.3"
+ - create_multiple_servers['data']['servers'][1]['host'] == "192.0.1.4"
+ - create_multiple_servers['data']['servers'][2]['host'] == "192.0.1.5"
+ - create_multiple_servers['data']['servers'] | length == 3
+
+ - name: Create syslog server with bad name
+ meraki_syslog:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ servers:
+ - host: 192.0.1.6
+ port: 514
+ roles:
+ - Invalid role
+ delegate_to: localhost
+ register: invalid_role
+ ignore_errors: yes
+
+ - assert:
+ that:
+ - '"Invalid role found in servers" in invalid_role.msg'
+
+ - name: Add role to existing syslog server # Adding doesn't work, just creation
+ meraki_syslog:
+ auth_key: '{{auth_key}}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: present
+ servers:
+ - host: 192.0.1.2
+ port: 514
+ roles:
+ - Flows
+ delegate_to: localhost
+ register: add_role
+
+ - debug:
+ msg: '{{add_role.data}}'
+
+ - assert:
+ that:
+ - add_role.data.servers.0.roles.0 == 'Flows'
+
+ always:
+ - name: Delete syslog test network
+ meraki_network:
+ auth_key: '{{ auth_key }}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ delegate_to: localhost
+ register: delete_all
+ ignore_errors: yes
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_vlan/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_vlan/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_vlan/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_vlan/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_vlan/tasks/main.yml
new file mode 100644
index 00000000..568ee680
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_vlan/tasks/main.yml
@@ -0,0 +1,471 @@
+# Test code for the Meraki VLAN module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ type: appliance
+ delegate_to: localhost
+
+ - name: Enable VLANs on network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ enable_vlans: yes
+ delegate_to: localhost
+
+ - name: Create VLAN in check mode
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.1
+ delegate_to: localhost
+ register: create_vlan_check
+ check_mode: yes
+
+ - debug:
+ var: create_vlan_check
+
+ - assert:
+ that:
+ - create_vlan_check is changed
+
+ - name: Create VLAN
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.1
+ delegate_to: localhost
+ register: create_vlan
+ environment:
+ ANSIBLE_MERAKI_FORMAT: camelcase
+
+ - debug:
+ msg: '{{create_vlan}}'
+
+ - assert:
+ that:
+ - create_vlan.data.id == 2
+ - create_vlan.changed == True
+ - create_vlan.data.networkId is defined
+
+ - name: Update VLAN with check mode
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ fixed_ip_assignments:
+ - mac: "13:37:de:ad:be:ef"
+ ip: 192.168.250.10
+ name: fixed_ip
+ reserved_ip_range:
+ - start: 192.168.250.10
+ end: 192.168.250.20
+ comment: reserved_range
+ dns_nameservers: opendns
+ delegate_to: localhost
+ register: update_vlan_check
+ check_mode: yes
+
+ - debug:
+ var: update_vlan_check
+
+ - assert:
+ that:
+ - update_vlan_check is changed
+
+ - name: Update VLAN
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ fixed_ip_assignments:
+ - mac: "13:37:de:ad:be:ef"
+ ip: 192.168.250.10
+ name: fixed_ip
+ reserved_ip_range:
+ - start: 192.168.250.10
+ end: 192.168.250.20
+ comment: reserved_range
+ dns_nameservers: opendns
+ delegate_to: localhost
+ register: update_vlan
+
+ - debug:
+ msg: '{{update_vlan}}'
+
+ - assert:
+ that:
+ - update_vlan.data.appliance_ip == '192.168.250.2'
+ - update_vlan.changed == True
+
+ - name: Update VLAN with idempotency and check mode
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ fixed_ip_assignments:
+ - mac: "13:37:de:ad:be:ef"
+ ip: 192.168.250.10
+ name: fixed_ip
+ reserved_ip_range:
+ - start: 192.168.250.10
+ end: 192.168.250.20
+ comment: reserved_range
+ dns_nameservers: opendns
+ delegate_to: localhost
+ register: update_vlan_idempotent_check
+ check_mode: yes
+
+ - debug:
+ var: update_vlan_idempotent_check
+
+ - assert:
+ that:
+ - update_vlan_idempotent_check is not changed
+
+ - name: Update VLAN with idempotency
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ fixed_ip_assignments:
+ - mac: "13:37:de:ad:be:ef"
+ ip: 192.168.250.10
+ name: fixed_ip
+ reserved_ip_range:
+ - start: 192.168.250.10
+ end: 192.168.250.20
+ comment: reserved_range
+ dns_nameservers: opendns
+ delegate_to: localhost
+ register: update_vlan_idempotent
+
+ - debug:
+ msg: '{{update_vlan_idempotent}}'
+
+ - assert:
+ that:
+ - update_vlan_idempotent.changed == False
+ - update_vlan_idempotent.data is defined
+
+ - name: Add IP assignments and reserved IP ranges
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ fixed_ip_assignments:
+ - mac: "13:37:de:ad:be:ef"
+ ip: 192.168.250.10
+ name: fixed_ip
+ - mac: "12:34:56:78:90:12"
+ ip: 192.168.250.11
+ name: another_fixed_ip
+ reserved_ip_range:
+ - start: 192.168.250.10
+ end: 192.168.250.20
+ comment: reserved_range
+ - start: 192.168.250.100
+ end: 192.168.250.120
+ comment: reserved_range_high
+ dns_nameservers: opendns
+ delegate_to: localhost
+ register: update_vlan_add_ip
+
+ - debug:
+ msg: '{{update_vlan_add_ip}}'
+
+ - assert:
+ that:
+ - update_vlan_add_ip.changed == True
+ - update_vlan_add_ip.data.fixed_ip_assignments | length == 2
+ - update_vlan_add_ip.data.reserved_ip_ranges | length == 2
+
+ - name: Remove IP assignments and reserved IP ranges
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ fixed_ip_assignments:
+ - mac: "13:37:de:ad:be:ef"
+ ip: 192.168.250.10
+ name: fixed_ip
+ reserved_ip_range:
+ - start: 192.168.250.10
+ end: 192.168.250.20
+ comment: reserved_range
+ dns_nameservers: opendns
+ delegate_to: localhost
+ register: update_vlan_remove_ip
+
+ - debug:
+ msg: '{{update_vlan_remove_ip}}'
+
+ - assert:
+ that:
+ - update_vlan_remove_ip.changed == True
+ - update_vlan_remove_ip.data.fixed_ip_assignments | length == 1
+ - update_vlan_remove_ip.data.reserved_ip_ranges | length == 1
+
+ - name: Update VLAN with idempotency
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ fixed_ip_assignments:
+ - mac: "13:37:de:ad:be:ef"
+ ip: 192.168.250.10
+ name: fixed_ip
+ reserved_ip_range:
+ - start: 192.168.250.10
+ end: 192.168.250.20
+ comment: reserved_range
+ dns_nameservers: opendns
+ delegate_to: localhost
+ register: update_vlan_idempotent
+
+ - debug:
+ msg: '{{update_vlan_idempotent}}'
+
+ - assert:
+ that:
+ - update_vlan_idempotent.changed == False
+ - update_vlan_idempotent.data is defined
+
+ - name: Update VLAN with list of DNS entries
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ fixed_ip_assignments:
+ - mac: "13:37:de:ad:be:ef"
+ ip: 192.168.250.10
+ name: fixed_ip
+ reserved_ip_range:
+ - start: 192.168.250.10
+ end: 192.168.250.20
+ comment: reserved_range
+ dns_nameservers: 1.1.1.1;8.8.8.8
+ delegate_to: localhost
+ register: update_vlan_dns_list
+
+ - debug:
+ msg: '{{update_vlan_dns_list}}'
+
+ - assert:
+ that:
+ - '"1.1.1.1" in update_vlan_dns_list.data.dns_nameservers'
+ - update_vlan_dns_list.changed == True
+
+ - name: Enable DHCP Relay on VLAN
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ dhcp_handling: relay
+ dhcp_relay_server_ips:
+ - 192.168.100.1
+ delegate_to: localhost
+ register: enable_relay
+
+ - debug:
+ var: enable_relay
+
+ - assert:
+ that:
+ - enable_relay is changed
+ - enable_relay.data.dhcp_handling == 'Relay DHCP to another server'
+ - enable_relay.data.dhcp_relay_server_ips[0] == '192.168.100.1'
+
+ - name: Enable DHCP on VLAN
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ dhcp_handling: server
+ delegate_to: localhost
+ register: enable_dhcp
+
+ - debug:
+ var: enable_dhcp
+
+ - assert:
+ that:
+ - enable_dhcp is changed
+ - enable_dhcp.data.dhcp_handling == 'Run a DHCP server'
+
+ - name: Enable DHCP on VLAN with options
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ name: TestVLAN
+ subnet: 192.168.250.0/24
+ appliance_ip: 192.168.250.2
+ dhcp_handling: server
+ dhcp_lease_time: 1 hour
+ dhcp_boot_options_enabled: false
+ dhcp_options:
+ - code: 5
+ type: ip
+ value: 192.0.1.1
+ delegate_to: localhost
+ register: enable_dhcp_options
+
+ - assert:
+ that:
+ - enable_dhcp_options is changed
+ - enable_dhcp_options.data.dhcp_handling == 'Run a DHCP server'
+ - enable_dhcp_options.data.dhcp_options.0.code == '5'
+
+ - name: Query all VLANs in network
+ meraki_vlan:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ state: query
+ delegate_to: localhost
+ register: query_vlans
+
+ - debug:
+ msg: '{{query_vlans}}'
+
+ - assert:
+ that:
+ - query_vlans.data | length >= 2
+ - query_vlans.data.1.id == 2
+ - query_vlans.changed == False
+
+ - name: Query single VLAN
+ meraki_vlan:
+ auth_key: '{{ auth_key }}'
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ state: query
+ output_level: debug
+ delegate_to: localhost
+ register: query_vlan
+
+ - debug:
+ msg: '{{query_vlan}}'
+
+ - assert:
+ that:
+ - query_vlan.data.id == 2
+ - query_vlan.changed == False
+
+ always:
+ #############################################################################
+ # Tear down starts here
+ #############################################################################
+ - name: Delete VLAN with check mode
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ delegate_to: localhost
+ register: delete_vlan_check
+ check_mode: yes
+
+ - assert:
+ that:
+ delete_vlan_check is changed
+
+ - name: Delete VLAN
+ meraki_vlan:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ vlan_id: 2
+ delegate_to: localhost
+ register: delete_vlan
+
+ - debug:
+ msg: '{{delete_vlan}}'
+
+ - name: Delete test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_webhook/aliases b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_webhook/aliases
new file mode 100644
index 00000000..ad7ccf7a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_webhook/aliases
@@ -0,0 +1 @@
+unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_webhook/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_webhook/tasks/main.yml
new file mode 100644
index 00000000..f671fc92
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_webhook/tasks/main.yml
@@ -0,0 +1,7 @@
+# Test code for the Meraki Webhooks module
+# Copyright: (c) 2018, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- name: Run test cases
+ include: tests.yml ansible_connection=local
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_webhook/tasks/tests.yml b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_webhook/tasks/tests.yml
new file mode 100644
index 00000000..0791feaf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/integration/targets/meraki_webhook/tasks/tests.yml
@@ -0,0 +1,274 @@
+# Test code for the Meraki Webhook module
+# Copyright: (c) 2019, Kevin Breit (@kbreit)
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+---
+- block:
+ - name: Test an API key is provided
+ fail:
+ msg: Please define an API key
+ when: auth_key is not defined
+
+ - name: Create test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ type: appliance
+
+ - name: Create webhook with check mode
+ meraki_webhook:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ name: Test_Hook
+ url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
+ shared_secret: shhhdonttellanyone
+ check_mode: yes
+ register: create_one_check
+
+ - debug:
+ var: create_one_check
+
+ - assert:
+ that:
+ - create_one_check is changed
+ - create_one_check.data is defined
+
+ - name: Create webhook
+ meraki_webhook:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ name: Test_Hook
+ url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
+ shared_secret: shhhdonttellanyone
+ register: create_one
+
+ - debug:
+ var: create_one
+
+ - assert:
+ that:
+ - create_one is changed
+ - create_one.data is defined
+
+ - set_fact:
+ webhook_id: '{{create_one.data.id}}'
+
+ # - name: Query one webhook
+ # meraki_webhook:
+ # auth_key: '{{auth_key}}'
+ # state: query
+ # org_name: '{{test_org_name}}'
+ # net_name: '{{test_net_name}}'
+ # name: Test_Hook
+ # register: query_one
+
+ # - debug:
+ # var: query_one
+
+ # - assert:
+ # that:
+ # - query_one.data is defined
+
+ # - name: Query one webhook with id
+ # meraki_webhook:
+ # auth_key: '{{auth_key}}'
+ # state: query
+ # org_name: '{{test_org_name}}'
+ # net_name: '{{test_net_name}}'
+ # webhook_id: '{{webhook_id}}'
+ # register: query_one_id
+
+ # - debug:
+ # var: query_one_id
+
+ # - assert:
+ # that:
+ # - query_one_id.data is defined
+
+ # - name: Update webhook with check mode
+ # meraki_webhook:
+ # auth_key: '{{auth_key}}'
+ # state: present
+ # org_name: '{{test_org_name}}'
+ # net_name: '{{test_net_name}}'
+ # name: Test_Hook
+ # url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
+ # shared_secret: shhhdonttellanyonehere
+ # check_mode: yes
+ # register: update_check
+
+ # - assert:
+ # that:
+ # - update_check is changed
+ # - update_check.data is defined
+
+ - name: Update webhook
+ meraki_webhook:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ name: Test_Hook
+ url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
+ shared_secret: shhhdonttellanyonehere
+ register: update
+
+ - debug:
+ var: update
+
+ - assert:
+ that:
+ - update is changed
+ - update.data is defined
+ - update.diff.before.shared_secret == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
+
+ - name: Update webhook with idempotency
+ meraki_webhook:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ name: Test_Hook
+ url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
+ shared_secret: shhhdonttellanyonehere
+ register: update_idempotent
+
+ - debug:
+ var: update_idempotent
+
+ - assert:
+ that:
+ - update_idempotent is not changed
+ - update_idempotent.data is defined
+
+ - name: Update webhook with id
+ meraki_webhook:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ webhook_id: '{{webhook_id}}'
+ name: Test_Hook
+ url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
+ shared_secret: shhhdonttellanyonehereid
+ register: update_id
+
+ - debug:
+ var: update_id
+
+ - assert:
+ that:
+ - update_id is changed
+ - update_id.data is defined
+
+ - name: Create test webhook
+ meraki_webhook:
+ auth_key: '{{auth_key}}'
+ state: present
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ name: Test_Hook
+ test: test
+ url: https://webhook.site/8eb5b76f-b167-4cb8-9fc4-42621b724244
+ register: webhook_test
+
+ - set_fact:
+ test_id: '{{webhook_test.data.id}}'
+
+ - debug:
+ var: test_id
+
+ - name: Get webhook status
+ meraki_webhook:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ test_id: '{{test_id}}'
+ register: webhook_test_status
+
+ - debug:
+ var: webhook_test_status
+
+ - assert:
+ that:
+ - webhook_test_status.data is defined
+
+ - name: Query all webhooks
+ meraki_webhook:
+ auth_key: '{{auth_key}}'
+ state: query
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ register: query_all
+
+ - debug:
+ var: query_all
+
+ - name: Delete webhook invalid webhook
+ meraki_webhook:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ name: Test_Hook_Invalid
+ check_mode: yes
+ register: delete_invalid
+ ignore_errors: yes
+
+ - debug:
+ var: delete_invalid
+
+ - assert:
+ that:
+ - 'delete_invalid.msg == "There is no webhook with the name Test_Hook_Invalid"'
+
+ - name: Delete webhook in check mode
+ meraki_webhook:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ name: Test_Hook
+ check_mode: yes
+ register: delete_check
+
+ - debug:
+ var: delete_check
+
+ - assert:
+ that:
+ - delete_check is changed
+
+ - name: Delete webhook
+ meraki_webhook:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
+ name: Test_Hook
+ register: delete
+
+ - debug:
+ var: delete
+
+ - assert:
+ that:
+ - delete is changed
+
+ #############################################################################
+ # Tear down starts here
+ #############################################################################
+ always:
+ - name: Delete test network
+ meraki_network:
+ auth_key: '{{auth_key}}'
+ state: absent
+ org_name: '{{test_org_name}}'
+ net_name: '{{test_net_name}}'
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/sanity/ignore-2.10.txt b/collections-debian-merged/ansible_collections/cisco/meraki/tests/sanity/ignore-2.10.txt
new file mode 100644
index 00000000..e15daac0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/sanity/ignore-2.10.txt
@@ -0,0 +1,2 @@
+plugins/modules/meraki_mx_intrusion_prevention.py validate-modules:invalid-argument-name
+plugins/modules/meraki_mx_intrusion_prevention.py validate-modules:nonexistent-parameter-documented \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/sanity/ignore-2.11.txt b/collections-debian-merged/ansible_collections/cisco/meraki/tests/sanity/ignore-2.11.txt
new file mode 100644
index 00000000..f6906e11
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/sanity/ignore-2.11.txt
@@ -0,0 +1,2 @@
+plugins/modules/meraki_mx_intrusion_prevention.py validate-modules:invalid-argument-name
+plugins/modules/meraki_mx_intrusion_prevention.py validate-modules:nonexistent-parameter-documented
diff --git a/collections-debian-merged/ansible_collections/cisco/meraki/tests/sanity/ignore-2.9.txt b/collections-debian-merged/ansible_collections/cisco/meraki/tests/sanity/ignore-2.9.txt
new file mode 100644
index 00000000..00914499
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/meraki/tests/sanity/ignore-2.9.txt
@@ -0,0 +1,2 @@
+plugins/modules/meraki_intrusion_prevention.py invalid-argument-name # ignore missing argument
+plugins/modules/meraki_intrusion_prevention.py nonexistent-parameter-documented # ignore missing argument
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/.github/workflows/ansible-test.yml b/collections-debian-merged/ansible_collections/cisco/mso/.github/workflows/ansible-test.yml
new file mode 100644
index 00000000..16165e32
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/.github/workflows/ansible-test.yml
@@ -0,0 +1,216 @@
+name: CI
+on:
+ push:
+ branches: master
+ pull_request:
+ schedule:
+ # * is a special character in YAML so you have to quote this string
+ - cron: '0 7 * * *'
+jobs:
+ build:
+ name: Build collection
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ ansible: [2.9.12, 2.10.0]
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v2
+
+ - name: Set up Python 3.7
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+
+ - name: Install ansible-base (v${{ matrix.ansible }})
+ run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check
+
+ - name: Build a collection tarball
+ run: ansible-galaxy collection build --output-path "${GITHUB_WORKSPACE}/.cache/collection-tarballs"
+
+ - name: Store migrated collection artifacts
+ uses: actions/upload-artifact@v1
+ with:
+ name: collection
+ path: .cache/collection-tarballs
+
+ importer:
+ name: Galaxy-importer check
+ needs:
+ - build
+ runs-on: ubuntu-latest
+ steps:
+ - name: Set up Python 3.7
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+
+ - name: Install ansible-base (v2.9.12)
+ run: pip install https://github.com/ansible/ansible/archive/v2.9.12.tar.gz --disable-pip-version-check
+
+ - name: Download migrated collection artifacts
+ uses: actions/download-artifact@v1
+ with:
+ name: collection
+ path: .cache/collection-tarballs
+
+ - name: Install the collection tarball
+ run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
+
+ - name: Install galaxy-importer
+ run: pip install galaxy-importer
+
+ - name: Create galaxy-importer directory
+ run: sudo mkdir -p /etc/galaxy-importer
+
+ - name: Create galaxy-importer.cfg
+ run: sudo cp /home/runner/.ansible/collections/ansible_collections/cisco/mso/.github/workflows/galaxy-importer.cfg /etc/galaxy-importer/galaxy-importer.cfg
+
+ - name: Run galaxy-importer check
+ run: python -m galaxy_importer.main .cache/collection-tarballs/cisco-*.tar.gz | tee .cache/collection-tarballs/log.txt && sudo cp ./importer_result.json .cache/collection-tarballs/importer_result.json
+
+ - name: Check warnings and errors
+ run: if grep -E 'WARNING|ERROR' .cache/collection-tarballs/log.txt; then exit 1; else exit 0; fi
+
+ - name: Store galaxy_importer check log file
+ uses: actions/upload-artifact@v1
+ with:
+ name: galaxy-importer-log
+ path: .cache/collection-tarballs/importer_result.json
+
+
+ sanity:
+ name: Sanity in ubuntu-latest
+ needs:
+ - build
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ ansible: [2.9.12, 2.10.0]
+ steps:
+ - name: Set up Python 3.7
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+
+ - name: Install ansible-base (v${{ matrix.ansible }})
+ run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check
+
+ - name: Install coverage (v4.5.4)
+ run: pip install coverage==4.5.4
+
+ - name: Download migrated collection artifacts
+ uses: actions/download-artifact@v1
+ with:
+ name: collection
+ path: .cache/collection-tarballs
+
+ - name: Install the collection tarball
+ run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
+
+ - name: Run sanity tests
+ run: ansible-test sanity --docker -v --color --truncate 0 --coverage
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/mso
+
+ - name: Generate coverage report
+ run: ansible-test coverage xml -v --requirements --group-by command --group-by version
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/mso
+
+ - name: Push coverate report to codecov.io
+ run: bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F integration
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/mso
+
+ units:
+ name: Units in ubuntu-latest
+ needs:
+ - build
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ ansible: [2.9.12, 2.10.0]
+ steps:
+ - name: Set up Python 3.7
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+
+ - name: Install ansible-base (v${{ matrix.ansible }})
+ run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check
+
+ - name: Install coverage (v4.5.4)
+ run: pip install coverage==4.5.4
+
+ - name: Download migrated collection artifacts
+ uses: actions/download-artifact@v1
+ with:
+ name: collection
+ path: .cache/collection-tarballs
+
+ - name: Install the collection tarball
+ run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
+
+ #- name: Run unit tests
+ # run: ansible-test units --docker -v --color --truncate 0 --python 3.7 --coverage
+ # working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/mso
+
+ #- name: Generate coverage report.
+ # run: ansible-test coverage xml -v --requirements --group-by command --group-by version
+ # working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/mso
+
+ #- uses: codecov/codecov-action@v1
+ # with:
+ # fail_ci_if_error: false
+ # file: /home/runner/.ansible/collections/ansible_collections/cisco/mso/tests/output/reports/coverage.xml
+
+ integration:
+ name: Integration in ubuntu-latest
+ needs:
+ - build
+ runs-on: ubuntu-latest
+ steps:
+ - name: Set up Python 3.7
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+
+ - name: Install ansible-base (v2.9.12)
+ run: pip install https://github.com/ansible/ansible/archive/v2.9.12.tar.gz --disable-pip-version-check
+
+ - name: Install coverage (v4.5.4)
+ run: pip install coverage==4.5.4
+
+ - name: Download migrated collection artifacts
+ uses: actions/download-artifact@v1
+ with:
+ name: collection
+ path: .cache/collection-tarballs
+
+ - name: Install the collection tarball
+ run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
+
+ - name: Requesting integration mutex
+ uses: nev7n/wait_for_response@v1
+ with:
+ url: ${{ format('https://8v7s765ibh.execute-api.us-west-1.amazonaws.com/v1/ansible-mso?repo={0}', github.repository) }}
+ responseCode: 200
+ timeout: 2000000
+ interval: 5000
+
+ - name: Run integration tests on Python 3.7
+ run: ansible-test network-integration --docker -v --color --retry-on-error --python 3.7 --truncate 0 --continue-on-error --coverage
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/mso
+
+ - name: Releasing integration mutex
+ uses: nev7n/wait_for_response@v1
+ if: always()
+ with:
+ url: ${{ format('https://8v7s765ibh.execute-api.us-west-1.amazonaws.com/v1/ansible-mso/release?repo={0}', github.repository) }}
+ responseCode: 200
+
+ - name: Generate coverage report
+ run: ansible-test coverage xml -v --requirements --group-by command --group-by version
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/mso
+
+ - name: Push coverate report to codecov.io
+ run: bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F integration
+ working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/mso
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/.github/workflows/galaxy-importer.cfg b/collections-debian-merged/ansible_collections/cisco/mso/.github/workflows/galaxy-importer.cfg
new file mode 100644
index 00000000..631359cf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/.github/workflows/galaxy-importer.cfg
@@ -0,0 +1,9 @@
+[galaxy-importer]
+LOG_LEVEL_MAIN = INFO
+RUN_FLAKE8 = True
+RUN_ANSIBLE_DOC = True
+RUN_ANSIBLE_LINT = True
+RUN_ANSIBLE_TEST = False
+ANSIBLE_TEST_LOCAL_IMAGE = False
+LOCAL_IMAGE_DOCKER = False
+INFRA_OSD = False \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/.gitignore b/collections-debian-merged/ansible_collections/cisco/mso/.gitignore
new file mode 100644
index 00000000..9da35106
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/.gitignore
@@ -0,0 +1,393 @@
+
+# Created by https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
+# Edit at https://www.gitignore.io/?templates=git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
+
+### dotenv ###
+.env
+
+### Emacs ###
+# -*- mode: gitignore; -*-
+*~
+\#*\#
+/.emacs.desktop
+/.emacs.desktop.lock
+*.elc
+auto-save-list
+tramp
+.\#*
+
+# Org-mode
+.org-id-locations
+*_archive
+
+# flymake-mode
+*_flymake.*
+
+# eshell files
+/eshell/history
+/eshell/lastdir
+
+# elpa packages
+/elpa/
+
+# reftex files
+*.rel
+
+# AUCTeX auto folder
+/auto/
+
+# cask packages
+.cask/
+dist/
+
+# Flycheck
+flycheck_*.el
+
+# server auth directory
+/server/
+
+# projectiles files
+.projectile
+
+# directory configuration
+.dir-locals.el
+
+# network security
+/network-security.data
+
+
+### Git ###
+# Created by git for backups. To disable backups in Git:
+# $ git config --global mergetool.keepBackup false
+*.orig
+
+# Created by git when using merge tools for conflicts
+*.BACKUP.*
+*.BASE.*
+*.LOCAL.*
+*.REMOTE.*
+*_BACKUP_*.txt
+*_BASE_*.txt
+*_LOCAL_*.txt
+*_REMOTE_*.txt
+
+#!! ERROR: jupyternotebook is undefined. Use list command to see defined gitignore types !!#
+
+### Linux ###
+
+# temporary files which can be created if a process still has a handle open of a deleted file
+.fuse_hidden*
+
+# KDE directory preferences
+.directory
+
+# Linux trash folder which might appear on any partition or disk
+.Trash-*
+
+# .nfs files are created when an open file is removed but is still being accessed
+.nfs*
+
+### PyCharm+all ###
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+# *.iml
+# *.ipr
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
+
+### PyCharm+all Patch ###
+# Ignores the whole .idea folder and all .iml files
+# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
+
+.idea/
+
+# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
+
+*.iml
+modules.xml
+.idea/misc.xml
+*.ipr
+
+# Sonarlint plugin
+.idea/sonarlint
+
+### pydev ###
+.pydevproject
+
+### Python ###
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+pip-wheel-metadata/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# pyenv
+.python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# Mr Developer
+.mr.developer.cfg
+.project
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+### Vim ###
+# Swap
+[._]*.s[a-v][a-z]
+[._]*.sw[a-p]
+[._]s[a-rt-v][a-z]
+[._]ss[a-gi-z]
+[._]sw[a-p]
+
+# Session
+Session.vim
+Sessionx.vim
+
+# Temporary
+.netrwhist
+# Auto-generated tag files
+tags
+# Persistent undo
+[._]*.un~
+
+### WebStorm ###
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+
+# Generated files
+
+# Sensitive or high-churn files
+
+# Gradle
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+# *.iml
+# *.ipr
+
+# CMake
+
+# Mongo Explorer plugin
+
+# File-based project format
+
+# IntelliJ
+
+# mpeltonen/sbt-idea plugin
+
+# JIRA plugin
+
+# Cursive Clojure plugin
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+
+# Editor-based Rest Client
+
+# Android studio 3.1+ serialized cache file
+
+### WebStorm Patch ###
+# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
+
+# *.iml
+# modules.xml
+# .idea/misc.xml
+# *.ipr
+
+# Sonarlint plugin
+.idea/**/sonarlint/
+
+# SonarQube Plugin
+.idea/**/sonarIssues.xml
+
+# Markdown Navigator plugin
+.idea/**/markdown-navigator.xml
+.idea/**/markdown-navigator/
+
+### Windows ###
+# Windows thumbnail cache files
+Thumbs.db
+Thumbs.db:encryptable
+ehthumbs.db
+ehthumbs_vista.db
+
+# Dump file
+*.stackdump
+
+# Folder config file
+[Dd]esktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+# End of https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
+
+# vsCode
+.vscode
+
+# Ansible Collection tarball
+cisco-mso-*.tar.gz
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/.python-version b/collections-debian-merged/ansible_collections/cisco/mso/.python-version
new file mode 100644
index 00000000..40c341bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/.python-version
@@ -0,0 +1 @@
+3.6.0
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/.vscode/launch.json b/collections-debian-merged/ansible_collections/cisco/mso/.vscode/launch.json
new file mode 100644
index 00000000..7a9dfa04
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/.vscode/launch.json
@@ -0,0 +1,15 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "pwa-chrome",
+ "request": "launch",
+ "name": "Launch Chrome against localhost",
+ "url": "http://localhost:8080",
+ "webRoot": "${workspaceFolder}"
+ }
+ ]
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/.vscode/settings.json b/collections-debian-merged/ansible_collections/cisco/mso/.vscode/settings.json
new file mode 100644
index 00000000..988937c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "python.pythonPath": "/usr/local/bin/python3"
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/CHANGELOG.rst b/collections-debian-merged/ansible_collections/cisco/mso/CHANGELOG.rst
new file mode 100644
index 00000000..5981cc81
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/CHANGELOG.rst
@@ -0,0 +1,263 @@
+==========================================
+Cisco MSO Ansible Collection Release Notes
+==========================================
+
+.. contents:: Topics
+
+This changelog describes changes after version 0.0.4.
+
+v1.1.0
+======
+
+Release Summary
+---------------
+
+Release v1.1.0 of the ``cisco.mso`` collection on 2021-01-20.
+This changelog describes all changes made to the modules and plugins included in this collection since v1.0.1.
+
+
+Minor Changes
+-------------
+
+- Add DHCP Policy Operations
+- Add SVI MAC Addreess option in mso_schema_site_bd
+- Add additional test file to add tenant from templated payload file
+- Add attribute virtual_ip to mso_schema_site_bd_subnet
+- Add capability for restore and download backup
+- Add capability to upload backup
+- Add check for undeploy under MSO version
+- Add error handeling test file
+- Add error message to display when yaml has failed to load
+- Add galaxy-importer check
+- Add galaxy-importer config
+- Add mso_dhcp_option_policy and mso_dhcp_option_policy_option and test files
+- Add new module mso_rest and test case files to support GET api method
+- Add new options to template bd and updated test file
+- Add notes to use region_cidr module to create region
+- Add task to undeploy the template from the site
+- Add tasks in test file to remove templates for mso_schema_template_migrate
+- Add test case for schema removing
+- Add test cases to verify GET, PUT, POST and DELETE API methods for sites in mso_rest.py
+- Add test file for mso_schema
+- Add test file for mso_schema_template_anp
+- Add test file for region module
+- Add test files yaml_inline and yaml_string to support YAML
+- Add userAssociations to tenants to resolve CI issues
+- Addition of cloud setting for ext epg
+- Changes made to payload of mso_schema_template_external_epg
+- Changes to options in template bd
+- Check warning
+- Documentation Corrected
+- Force arp flood to be true when l2unkwunicast is flood
+- Make changes to display correct status code
+- Modify mso library and updated test file
+- Modify mso_rest test files to make PATCH available, and test other methods against schemas
+- Move options for subnet from mso to the template_bd_subnet module
+- Python lint corrected
+- Redirect log to both stdout and log.txt file & Check warnings and errors
+- Remove creation example in document of mso_schema_site_vrf_region
+- Remove present state from mso_schema module
+- Removed unused variable in mso_schema_site_vrf_region_hub_network
+- Test DHCP Policy Provider added
+- Test file for mso_dhcp_relay_policy added
+- Test file for template_bd_subnet and new option foe module
+
+Bugfixes
+--------
+
+- Fix anp idempotency issue
+- Fix crash issue when using irrelevant site-template
+- Fix default value for mso_schema state parameter
+- Fix examples for mso_schema
+- Fix galaxy-importer check warnings
+- Fix issue on mso_schema_site_vrf_region_cidr_subnet to allow an AWS subnet to be used for a TGW Attachment (Hub Network)
+- Fix module name in example of mso_schema_site_vrf_region
+- Fix mso_backup upload issue
+- Fix sanity test error mso_schema_site_bd
+- Fix some coding standard and improvements to contributed mso_dhcp_relay modules and test files
+- Fix space in asssertion
+- Fix space in site_anp_epg_domain
+- Fix space in test file
+- Remove space from template name in all modules
+- Remove space in template name
+
+v1.0.1
+======
+
+Release Summary
+---------------
+
+Release v1.0.1 of the ``cisco.mso`` collection on 2020-10-30.
+This changelog describes all changes made to the modules and plugins included in this collection since v1.0.0.
+
+
+Minor Changes
+-------------
+
+- Add delete capability to mso_schema_site
+- Add env_fallback for mso_argument_spec params
+- Add non existing template deletion test
+- Add test file for mso_schema_template
+- Add test file for site_bd_subnet
+- Bump module to v1.0.1
+- Extent mso_tenant test case coverage
+
+Bugfixes
+--------
+
+- Fix default value for l2Stretch in mso_schema_template_bd module
+- Fix deletion of schema when wrong template is provided in single template schema
+- Fix examples in documentation for mso_schema_template_l3out and mso_user
+- Fix naming issue in deploy module
+- Remove author emails due to length restriction
+- Remove dead code branch in mso_schema_template
+
+v1.0.0
+======
+
+Release Summary
+---------------
+
+This is the first official release of the ``cisco.mso`` collection on 2020-08-18.
+This changelog describes all changes made to the modules and plugins included in this collection since Ansible 2.9.0.
+
+
+Minor Changes
+-------------
+
+- Add changelog
+- Fix M() and module to use FQCN
+- Update Ansible version in CI and add 2.10.0 to sanity in CI.
+- Update Readme with supported versions
+
+Bugfixes
+--------
+
+- Fix sanity issues to support 2.10.0
+
+v0.0.8
+======
+
+Release Summary
+---------------
+
+New release v0.0.8
+
+Minor Changes
+-------------
+
+- Add Login Domain support to mso_site
+- Add aliases file for contract_filter module
+- Add contract information in current and previous part
+- Add new module and test file to query MSO version
+- New backup module and test file (https://github.com/CiscoDevNet/ansible-mso/pull/80)
+- Renaming mso_schema_template_externalepg module to mso_schema_template_external_epg while keeping both working.
+- Update cidr module, udpate attributes in hub network module and its test file
+- Use a function to reuuse duplicate part
+
+Bugfixes
+--------
+
+- Add login_domain to existing test.
+- Add missing tests for VRF settings and changing those settings.
+- Add test for specifying read-only roles and increase overall test coverage of mso_user (https://github.com/CiscoDevNet/ansible-mso/pull/77)
+- Add test to mso_schema_template_vrf, mso_schema_template_external_epg and mso_schema_template_anp_epg to check for API error when pushing changes to object with existing contract.
+- Cleanup unused imports, unused variables and branches and change a variable from ambiguous name to reduce warnings at Ansible Galaxy import
+- Fix API error when pushing EPG with existing contracts
+- Fix role tests to work with pre/post 2.2.4 and re-enable them
+- Fix site issue if no site present and fix test issues with MSO v3.0
+- Fixing External EPG renaming for 2.9 and later
+- Fixing L3MCast test to pass on 2.2.4
+- Fixing wrong removal of schemas
+- Test hub network module after creating region manually
+- Updating Azure site IP in inventory and add second MSO version to inventory
+
+v0.0.7
+======
+
+Release Summary
+---------------
+
+New release v0.0.7
+
+Minor Changes
+-------------
+
+- Add l3out, preferred_group and test file for mso_schema_template_externalepg
+- Add mso_schema_template_vrf_contract module and test file
+- Add new attribute choice "policy_compression" to mso_Schema_template_contract_filter
+- Add new functionality - Direct Port Channel (dpc), micro-seg-vlan and default values
+- Add new module for anp-epg-selector in site level
+- Add new module mso_schema_template_anp_epg_selector and its test file
+- Add new module mso_schema_vrf_contract
+- Add new module mso_tenant_site to support cloud and non-cloud sites association with a tenant and test file (https://github.com/CiscoDevNet/ansible-mso/pull/62)
+- Add new mso_site_external_epg_selector module and test file
+- Add site external epg and contract filter test
+- Add support for VGW attribute in mso_schema_site_vrf_region_cidr_subnet
+- Add support to set account as inactive using account_status attribute in mso_user
+- Add test for mso_schema_site_vrf_region_cidr module
+- Add test for mso_schema_site_vrf_region_cidr_subnet module
+- Add vzAny attribute in mso_schema_template_vrf
+- Automatically add ANP and EPG at site level and new test file for mso_schema_site_anp_epg_staticport (https://github.com/CiscoDevNet/ansible-mso/pull/55)
+- Modified External EPG module and addition of new Selector module
+
+Bugfixes
+--------
+
+- Fix mso_schema_site_vrf_region_cidr to automatically create VRF and Region if not present at site level
+- Fix query condition when VRF or Region do not exist at site level
+- Remove unused regions attribute from mso_schema_template_vrf
+
+v0.0.6
+======
+
+Release Summary
+---------------
+
+New release v0.0.6
+
+Minor Changes
+-------------
+
+- ACI/MSO - Use get() dict lookups (https://github.com/ansible/ansible/pull/63074)
+- Add EPG and ANP at site level when needed
+- Add github action CI pipeline with test coverage
+- Add login domain support for authentication in all modules
+- Add support for DHCP querier to all subnet objects. Add partial test in mso_schema_template_bd integration test.
+- Add support for clean output if needed for debuging
+- Add test file for mso_schema_template_anp_epg
+- Added DHCP relay options and scope options to MSO schema template bd
+- Added ability to bind epg to static fex port
+- Added module to manage contracts for external EPG in Cisco MSO (https://github.com/ansible/ansible/pull/63550)
+- Added module to manage template external epg subnet for Cisco MSO (https://github.com/ansible/ansible/pull/63542)
+- Disabling tests for the role modules as API is not supported after 2.2.3i until further notice
+- Increased test coverage for existing module integration tests.
+- Modified fail messages for site and updated documentation
+- Moving test to Ansible v2.9.9 and increasing timelimit for mutex to 30+ min
+- Update authors.
+- Update mso_schema_site_anp.py (https://github.com/ansible/ansible/pull/67099)
+- Updated Test File Covering all conditions
+- mso_schema_site_anp_epg_staticport - Add VPC support (https://github.com/ansible/ansible/pull/62803)
+
+Bugfixes
+--------
+
+- Add aliases for backward support of permissions in role module.
+- Add integration test for mso_schema_template_db and fix un-needed push to API found by integration test.
+- Consistent object output on domain_associations
+- Fix EPG / External EPG Contract issue and create test for mso_schema_template_anp_epg_contract and mso_schema_template_external_epg_contract
+- Fix contract filter issue and add contract-filter test file
+- Fix duplicate user, add admin user to associated user list and update tenant test file
+- Fix intersite_multicast_source attribute issue in mso_schema_template_anp_epg and add the proxy_arp argument.
+- Fix mso_schema_template_anp_epg idempotancy for both EPG and EPG with contracts
+- Remove label with test domain before create it
+- Send context instead of vrf when vrf parameter is used
+- Update mso_schema_template_bd.py example for BD in another schema
+
+v0.0.5
+======
+
+Release Summary
+---------------
+
+New release v0.0.5
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/FILES.json b/collections-debian-merged/ansible_collections/cisco/mso/FILES.json
new file mode 100644
index 00000000..9e8f08df
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/FILES.json
@@ -0,0 +1,1818 @@
+{
+ "files": [
+ {
+ "name": ".",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "codecov.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e55a41874408d15b899f7df85fa9f4c6c3c476cf4a9e919b9a396c3f1aa1a1f0",
+ "format": 1
+ },
+ {
+ "name": "LICENSE",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1c38eb11b6b8cd591aed90793ca80bd3c499393f207b96640ddfa571f61f7b4f",
+ "format": 1
+ },
+ {
+ "name": "plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/modules.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c9bdb9272c7d674da1a8f83bfd5229d4814d2bfd72937d00215470b46aa0c0d8",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/mso.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58c0e72b4b0b739230d56046109b806c2adcbe1c1e65c731c9f7f3e142b35c12",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_contract_filter.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "abb1fe3a4648aecac7248abc627e198abc98fe04f7fc2a5d3f8c50cfff34aabd",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_anp_epg_staticport.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a471f926c41721d6ebb376779adc98000be8ace30f68076aea05ded5f74e292a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_anp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a7f158b17cda7542b480d2a1db22d882b8f5702571fd1be1262e8e3537cf5c20",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_dhcp_option_policy_option.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "59dbdebb1af250bdbf47831441faf6a8c702d4b9d302772fc28c88b6961d0c78",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_vrf_region_hub_network.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fc6e2f6d3413264f473756fea7cbd29fee5443dcd871ecf2ac01810b7ffebb5d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_external_epg_selector.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1ab4a7671bf0a7d071db7de003f14670dbfbe9909d991ba4742d2429d4071d37",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_anp_epg.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "771801244904bb8cd38f88c61ff580af8327c03d26b2ed19154baff739307453",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_bd_subnet.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "00396c383da7cb96daf7662a951e01e7046d92fa087ce88765a699eefc6d41b8",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_anp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cd0895dc40ce85c4d3799e03db32b0e489e4c99d5112fb4b9b8687f216b15e9d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_bd_subnet.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d8d2a8cb6a110d3c5160638bc27cd409611a5fe928c2901b6ad97366307e585e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_deploy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e715c4d210787cc859335e841d2bc6f17a62f0405468689567c9f14f9218fa3c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_tenant.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5cfcab4b87d0d74ea4c6753c93df039f06912482e8a878d637831ff3d9936005",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_vrf_region_cidr_subnet.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2d139d9cc2b714d5d3a37ab2d63cdb3d1ed98720ce50ba8bbb1f228787731add",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_vrf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e72a5f3cb6c25325eb1856a8b91aef725ab653abae749e1c8799075944348b27",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_anp_epg_staticleaf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2af89c469a2ccdfb7bbac70510b0a054e809a5286b78a22621794f316743cd4",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_external_epg_contract.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "167cd6ba76b9781e2dbaa5d39af08d8805a61b4274241f1914f7471a825b2ee2",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_external_epg.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "540303678415605ac4f23551c8512478e7d2c7dcc066d08c685a207ed38655e4",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_vrf_region_cidr.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "400f90764082bcf18c7ca613e8c3a8a0025039536266e726f64e3035c7a4efa6",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_anp_epg.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8103f521617a8a43f80fcf69921b76eb4f6e1b8bea575b0151e82da6b44eef37",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_anp_epg_contract.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fa5f73b80d499e386d7e353d983831dc36cecd1959dea8381a73f20d98891896",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_dhcp_relay_policy_provider.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8f4f54b34ffd05a558a06832d05f60591f1a4d700a26715ebe64a5e39e392583",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_tenant_site.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fae53fbb6c20b9585c7626f8491d8742526f4089510e71bdb0a0cccf44968198",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_backup.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "689a9f048018c896592e16d7e998cac0954807b5f547b8722c53701e5665e9c3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_site.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5cf15ce9bcf517d820852ed47c2e8119e5a7f90a12d1f3f779aaeb7fdf5e59ed",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_anp_epg_selector.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "09b7884ca381132504650773a09112ece3a22abc07a4a6df860853ca51a7422d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_vrf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4aed9bec4e8e994d4eed4ba00ff17d93fd559d8b2d12019bd4f369442e5ec7eb",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a8bc48b779a68d8e2a2388f54fbfc18dbee8b98eb205ff895a0f18e0591c7482",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_bd_l3out.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1197bb89c4fc3b7939e537faf810775fa73e6d03c3a28e92d4f39601a00e7748",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_anp_epg_domain.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "80275ca7986ff83d4bfc543219bf8cd43a0d03d192e961a6060ec285f479c4b6",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_role.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "adddfabdc9c111f6fe4ace549b632033861f16cb27f0a7fd8da831edf83ac7c1",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_externalepg.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "540303678415605ac4f23551c8512478e7d2c7dcc066d08c685a207ed38655e4",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_external_epg_subnet.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d20d75a8e106fae376ab425ccf77ab528933997ecc189932a53bddd9dbfe1ea2",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_filter_entry.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c5a653d73adb0c1dde50f07443f7d42f66d705d6c6889a7383fec174cfc2fd33",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_bd.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "389a7e612598203d8d2a77cf4a8cb45b431c3a88aa5a83c9de46737236e59f4b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_anp_epg_subnet.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c23913555cbad93fb706c7922ce8c33ab0adee2afc683649f2d1669360d9c8bb",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_rest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e2732290d96519eba0dff3054d2732960116ff1a1ac448ec6ca9fc75ab5382ed",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_vrf_contract.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "69e2ce77e81a41cf0ff7430104b7169f4493f52dcd521b866d17dcc02e5825db",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_label.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4a6a66707900cdd0e251b576232e2f5037ccc4d010a497697943a52c60900368",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site_vrf_region.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "40fd18083d1c8d3414d4343932d3ad7d604dc3f7f623793ed8390878ced10699",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_external_epg_selector.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fc8fdde7bc37626adc7d33130a50aa27d839bad092c712d29a427fe4cf954fbd",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_migrate.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb32edc876de806c254581a5c2109e9ff9d51c367de10e2c8f71166fbb407667",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_version.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "efd9c46d036f626cf8ea0b512f9e431d19cfb635702367283bb6eccc7cb9f75b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_l3out.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7dcf4d21e763975aae9d30c5d246d773a6ad89fe56b33cd3aed8f7001adccfab",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_dhcp_relay_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0fe6aaf90481f3e58ce8d8a704f2423cf9f93c44ee7b7b2d43714915662a292b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_anp_epg_subnet.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5c5dd42baf4df1ca3519c629d210a717ac86a05833285744445b854f05c6f0b3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_dhcp_option_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3ad2d4b91e14ff12e734bc7d70e33e87b89dc7abb4e42545538f0a3459d0e222",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_anp_epg_selector.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "20a19966ed9e8ff9879f327767e7567262f09d86684bd7dd03b2d8936875a4ea",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_user.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "840a8200388623e4ab70358205945355d5fd242c370929158b2a689b9e711a32",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template_bd.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e4123b686517681e0e2784c46f6c95abd3cd0341731a0f917566bcec044b78e2",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_site.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "69e0ac1adefcd37ff6a51ae8d0b59af4f9c768ac6c1a149d76168d5811954568",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/mso_schema_template.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb69162c4558466a7e1b49bc8d30c554c58989f064ad31f4de38b2f506f9de98",
+ "format": 1
+ },
+ {
+ "name": "tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_relay_policy",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_relay_policy/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_relay_policy/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "78a754bee3a864e80e598727bce869ecd3d6ffb676650b54c255462c430ee4b9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_relay_policy/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_deploy",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_deploy/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_deploy/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "05b9c28ef714e958e1715d0521968545de8536bba5a0d16943047feb11cd06f3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_deploy/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_cidr_subnet",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_cidr_subnet/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_cidr_subnet/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2130e64acb090d7387cc2bc7f4fa7ccf31566c1b5608fd0620d56bf2547a55c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_cidr_subnet/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2ba1a5dcb11aa29ef94539ee048a34ba238b2e71a0eb492d368b025e4cbc69f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_rest",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_rest/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_rest/tasks/json_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0bf0d1ad63cbaf219a1a1ad09eb6f3cf30d705fd90b2ee982df07aa2a5a187fb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_rest/tasks/tenant.json.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6636b61fb38e341e4520e1f158bbce619e6b70e6e6d4bd243177ec86069f50dd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_rest/tasks/json_inline.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "200b1ccceb65da2574e272bfd85d2c86647fe6b66009b6212cd3fc52f9b20fb4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_rest/tasks/json_string.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6651fd6245387072f029420d8645435eff75d476ebb5371d76097537ddbe4671",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_rest/tasks/yaml_inline.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "281aa3b5bd0c064a63ca042823c3f3d7ccef8a27c87da29d41a48c18cbd6ae8d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_rest/tasks/yaml_string.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "411ff084b29637a3a9d78588a09c9632924ce6a37191420d1167538f478706bd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_rest/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "52f1fb7f60fafa3735b17352ca4e1da195810b0edf3f2680738092e4d52fb1b1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_rest/tasks/error_handling.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ff08e84d3317f2e588f5d13551d799c9b45e6b81da361dc68ed45d66405ec57f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_rest/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0a19356b0780059327d159709f90f1cbd4ddac0ff930130a18b3e6ae6a6fb373",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6028beaf3fe209ed5c0c65679826e31df8b761983e19a077a83047f46caf3fa3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_migrate",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_migrate/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_migrate/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4cfa881a158049b6d65cfe2e0a6dd773e188f119f131f590c8c588748bea53a2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_migrate/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bd112b03d6ffaa18c6e685a26b86ce0404cd41cb14bfc0d5b16de8f589dc72a5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_anp_epg_selector",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_anp_epg_selector/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_anp_epg_selector/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55679adb6d3d85776a7f81f16c5a1fa8b023f8c32d7caf88306bcf3b59f27c54",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_anp_epg_selector/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_external_epg_selector",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_external_epg_selector/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_external_epg_selector/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9651b31903da9a54df64d768d5e4b4eafc8727e056cd9a83000fc6f9867d5024",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_external_epg_selector/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_external_epg_contract",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_external_epg_contract/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_external_epg_contract/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "07f7f9e17af1f1b5141bf5993a91ef3c6f3d787f5d675c5d24681df97d266eb2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_external_epg_contract/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7ca7b7487fe50f86042ccf6a27c79d15eb163ec300a4f671e0e209edc195e8cc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_contract_filter",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_contract_filter/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_contract_filter/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fea8388f21eede81f1a49c00b28b5832e63f12679a43a354739f074a230976d3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_contract_filter/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_option_policy_option",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_option_policy_option/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_option_policy_option/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "134b2828319ac23ba07f2cbb5ebf7e14b90e2ce27220946e10d10be2bdc2f568",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_option_policy_option/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_external_epg_selector",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_external_epg_selector/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_external_epg_selector/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8bb806b0368181568d47c3f8dee9a21a3ffe854945247c52cf5f79b233229725",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_external_epg_selector/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_bd",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_bd/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_bd/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1982511fe47280a53549a359cc6c1aa634075c5bad774b45a600a7d762e9cedd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_bd/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_bd",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_bd/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_bd/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c5a94734c4582dd8472cd53d40bf061b88605bf76bdba1eb6f3ca2d29eb91e9c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_bd/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_external_epg",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_external_epg/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_external_epg/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7e07b532c4fd924a5d4a80601fbcdcbff008abc5d3d7c8f950029227029eaca7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_external_epg/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_site",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_site/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_site/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec5fae6fa73a04337b077fbdcdbbb86b744fdf92a69d7f4c0b29f06b67c278db",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_site/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_backup",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_backup/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_backup/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4469358f942d49c19a8849f7dedfff99d5a17666e68d120c18bb287de453efbc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_backup/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_vrf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_vrf/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_vrf/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ba14a53fd7361119fb1886aaf0e9e06f86b52dfc2064460bb2cf7177bae9101e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_vrf/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_relay_policy_provider",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_relay_policy_provider/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_relay_policy_provider/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a8aeebaaa60a2f53998d8d28aacbb90a55b2ca572ad110eaead7ca5d1740c3bf",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_relay_policy_provider/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_version",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_version/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_version/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d6fff962ad77cb90dab75bcebcbac0a0293e59118f7e32d6fa83a6180c14b31a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_version/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_option_policy",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_option_policy/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_option_policy/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e2cd43585c4e107d1066c8ff1938cdca340b948ccaa0c41dbdcc0625b44724c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_dhcp_option_policy/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_hub_network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_hub_network/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_hub_network/tasks/hub_network.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b388af40377112285ac20eb6d5015512099d750c26d35ab2e57d4a0d6104eced",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_hub_network/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7fb4429f19308f52858a44b0a61dea7d564f02793a0cebc307dad6982453937b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_hub_network/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_anp_epg_staticport",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_anp_epg_staticport/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_anp_epg_staticport/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "552753b3d01ca5316d647786f3b90c1350651cf925a267dff089a8ab412e5393",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_anp_epg_staticport/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_cidr",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_cidr/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_cidr/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "955cb7d76c5295b4d74daeea37e05c0ac8ea3aaf5ecacdd22d1d9d95bd79beec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_vrf_region_cidr/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_bd_subnet",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_bd_subnet/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_bd_subnet/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a33e2cde6ec11bdd5c7f8f292ba527f4f8029cfeddeb5c34068092ac582cad98",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_bd_subnet/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_tenant_site",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_tenant_site/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_tenant_site/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a2641573ea2508ec597523e18b1321a24518af39024c24a5614a429379eb9812",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_tenant_site/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_bd_subnet",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_bd_subnet/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_bd_subnet/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3f326f11f1eca9ce1735bf8821c2906edc5a469532d96002336709419422c8fb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_bd_subnet/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_tenant",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_tenant/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_tenant/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a17e05edfd0098661ba0c041ca5497fa0f2710d4a7f252d3b11377400ac31159",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_tenant/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_user",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_user/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_user/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "12ac3ecda40bbfab24b4a64b944dd589bde1ddd40e8e4c85396174889e514591",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_user/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_label",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_label/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_label/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57a585ed8445afaf0906c9aa32fe35cc9723c4fd21a2be0a038a8fa81c68a124",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_label/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp_epg_contract",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp_epg_contract/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp_epg_contract/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e41ebe5cdc53a56f00920edb4f88347b4de0cfbcd1faaf22df4c68812d7dded0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp_epg_contract/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp_epg_selector",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp_epg_selector/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp_epg_selector/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cfad5f81b9dca819597e7e5f0d8845097737c0f5a71791057c3fe3087543ee62",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp_epg_selector/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp_epg",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp_epg/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp_epg/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0168534fdb5e93b59efb004d6d7c0764d9f0296fe0b66748c3e4911a077ebca9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_anp_epg/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_anp_epg_domain",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_anp_epg_domain/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_anp_epg_domain/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b1a0ae36471c56fdfdbedae2c6b109bd1989e6582fa63c4eb119bc54acfe7c2e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_site_anp_epg_domain/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_vrf_contract",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_vrf_contract/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_vrf_contract/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "997da0d1772a55f61b8bbd0fd9a42e87da326c9f434f7d6ded6a6dcd6cfab61f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_schema_template_vrf_contract/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_role",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_role/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_role/tasks/role-ro.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "093e4197d6c56ce5dba6e62bd24c8a0c09e4d9d1c83d8179fe944d37d7427856",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_role/tasks/role-rw.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0de76ea9425e30addcecd3fba6dfb6ecf1f1df01ec03cba865a25e53f55cb417",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_role/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "846df05740a948dbb1273cd49a0942b39e2e9ec82d389a5d4fdda6f5e3453c72",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/mso_role/aliases",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e674607496d01ce032bfdbcc3e77ecdcde02f3e9d57080a95682a0cdff6809a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/network-integration.requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "26d3ea388bb679036608d912734c5369bb63f362795a62fd5c9e0469c9abaeb8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/target-prefixes.network",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f73c1c8e2facc4b6f4cacc8ec891c55c2f7363bb9f84ebd007e7c947d63381f3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/inventory.networking",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "07f9032e455f7acffdfddeaaf0ed0651e206e8484eb64f5451eb5a038f059c39",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "99b118eeccecd08f68761335ef6a9ea2ace42095d52512c6e575a1d017362a2d",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.10.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3c4527c02ae6954941b8029046aa2e763fa917958a3f36b43633492820aa391a",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.9.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/.gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b5726d3ec9335a09c124469eca039523847a6b0f08a083efaefd002b83326600",
+ "format": 1
+ },
+ {
+ "name": "meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "meta/runtime.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a8ad79595c324d0703296622061158eff30262f70611afd13a8fc2d74cbc5f9",
+ "format": 1
+ },
+ {
+ "name": "changelogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs/config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "43206e71b00b28f61464ff729ee7c096a6babe481924585846dc0ad75f4e5ae0",
+ "format": 1
+ },
+ {
+ "name": "changelogs/.gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "919ef00776e7d2ff349950ac4b806132aa9faf006e214d5285de54533e443b33",
+ "format": 1
+ },
+ {
+ "name": "changelogs/.plugin-cache.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4cd7e1932b681e080274baeab2256310024e0454eea250770bf8edb7ed6b1e53",
+ "format": 1
+ },
+ {
+ "name": "changelogs/changelog.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e12f6483d6dea033a4f88809b4134a4bded3a3feca1f37305300db8a1ce298b5",
+ "format": 1
+ },
+ {
+ "name": "README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b91c603bfd02d4b7a8bdcc221c505f29630ee01b0c90915816da9dc5bb9bfe02",
+ "format": 1
+ },
+ {
+ "name": ".gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "38a4680952a5eb9707587cdcc2ea73c8d4de6ed3cf1f054fc08b4f00dc858b02",
+ "format": 1
+ },
+ {
+ "name": ".github",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": ".github/workflows",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": ".github/workflows/galaxy-importer.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "edc6f2746e7b8c7b94dea479036ba246953cf69234974b89c069c10d614dcaad",
+ "format": 1
+ },
+ {
+ "name": ".github/workflows/ansible-test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f5aab3b3602fd76b38870d9fc4d633747864f8bf7af652c27c0c335ad3027c4f",
+ "format": 1
+ },
+ {
+ "name": ".python-version",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "138203e3f604a08fad0c4d0a297efe2c486219820dcdd053e72b7d843504c7a1",
+ "format": 1
+ },
+ {
+ "name": "CHANGELOG.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5e60a425bc09734693118989796ae18b7e3029c1bc9264470ec18b46e84d1ff3",
+ "format": 1
+ },
+ {
+ "name": ".vscode",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": ".vscode/settings.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "72493737313af87c8524bc614f45f9c0dec4dc228298f5eaacc5c94d859f7e38",
+ "format": 1
+ },
+ {
+ "name": ".vscode/launch.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4b64ba8662f63133c18148530f9f7302e5689ca78e13bd3fbe3150930898b2dd",
+ "format": 1
+ }
+ ],
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/LICENSE b/collections-debian-merged/ansible_collections/cisco/mso/LICENSE
new file mode 100644
index 00000000..e09a4143
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/LICENSE
@@ -0,0 +1,678 @@
+Copyright (c) 2019, Cisco Systems
+All rights reserved.
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/MANIFEST.json b/collections-debian-merged/ansible_collections/cisco/mso/MANIFEST.json
new file mode 100644
index 00000000..26fdf65d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/MANIFEST.json
@@ -0,0 +1,41 @@
+{
+ "collection_info": {
+ "namespace": "cisco",
+ "name": "mso",
+ "version": "1.1.0",
+ "authors": [
+ "Dag Wieers (@dagwieers)",
+ "Nirav Katarmal (@nkatarmal-crest)",
+ "Lionel Hercot (@lhercot)",
+ "Cindy Zhao (@cizhao)",
+ "Shreyas Srish (@shrsr)"
+ ],
+ "readme": "README.md",
+ "tags": [
+ "cisco",
+ "aci",
+ "cloud",
+ "collection",
+ "networking",
+ "sdn",
+ "mso",
+ "multisite"
+ ],
+ "description": "An Ansible collection for managing Cisco ACI Multi-Site",
+ "license": [],
+ "license_file": "LICENSE",
+ "dependencies": {},
+ "repository": "https://github.com/CiscoDevNet/ansible-mso",
+ "documentation": "https://docs.ansible.com/ansible/latest/scenario_guides/guide_aci.html",
+ "homepage": "https://cisco.com/go/aci",
+ "issues": "https://github.com/CiscoDevNet/ansible-mso/issues"
+ },
+ "file_manifest_file": {
+ "name": "FILES.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e838509d1a20973a7a049abc8fa5dac529ed2115a81c1dff31d4578af6d74633",
+ "format": 1
+ },
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/README.md b/collections-debian-merged/ansible_collections/cisco/mso/README.md
new file mode 100644
index 00000000..52238108
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/README.md
@@ -0,0 +1,93 @@
+# ansible-mso
+
+The `ansible-mso` project provides an Ansible collection for managing and automating your Cisco ACI Multi-Site environment.
+It consists of a set of modules and roles for performing tasks related to ACI Multi-Site.
+
+This collection has been tested and supports MSO 2.1+.
+Modules supporting new features introduced in MSO API in specific MSO versions might not be supported in earlier MSO releases.
+
+*Note: This collection is not compatible with versions of Ansible before v2.8.*
+
+## Requirements
+- Ansible v2.9 or newer
+
+## Install
+Ansible must be installed
+```
+sudo pip install ansible
+```
+
+Install the collection
+```
+ansible-galaxy collection install cisco.mso
+```
+
+## Use
+Once the collection is installed, you can use it in a playbook by specifying the full namespace path to the module, plugin and/or role.
+```yaml
+- hosts: mso
+ gather_facts: no
+
+ tasks:
+ - name: Add a new site EPG
+ cisco.mso.mso_schema_site_anp_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ state: present
+ delegate_to: localhost
+```
+
+## Update
+Getting the latest/nightly collection build
+
+### First Approach
+Clone the ansible-mso repository.
+```
+git clone https://github.com/CiscoDevNet/ansible-mso.git
+```
+
+Go to the ansible-mso directory
+```
+cd ansible-mso
+```
+
+Pull the latest master on your mso
+```
+git pull origin master
+```
+
+Build and Install a collection from source
+```
+ansible-galaxy collection build --force
+ansible-galaxy collection install cisco-mso-* --force
+```
+
+### Second Approach
+Go to: https://github.com/CiscoDevNet/ansible-mso/actions
+
+Select the latest CI build
+
+Under Artifacts download collection and unzip it using Terminal or Console.
+
+*Note: The collection file is a zip file containing a tar.gz file. We recommend using CLI because some GUI-based unarchiver might unarchive both nested archives in one go.*
+
+Install the unarchived tar.gz file
+```
+ansible-galaxy collection install cisco-mso-1.0.0.tar.gz —-force
+```
+
+### See Also:
+
+* [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.
+
+## Contributing to this collection
+
+Ongoing development efforts and contributions to this collection are tracked as issues in this repository.
+
+We welcome community contributions to this collection. If you find problems, need an enhancement or need a new module, please open an issue or create a PR against the [Cisco MSO collection repository](https://github.com/CiscoDevNet/ansible-mso/issues).
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/changelogs/.gitignore b/collections-debian-merged/ansible_collections/cisco/mso/changelogs/.gitignore
new file mode 100644
index 00000000..6be6b533
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/changelogs/.gitignore
@@ -0,0 +1 @@
+/.plugin-cache.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/changelogs/.plugin-cache.yaml b/collections-debian-merged/ansible_collections/cisco/mso/changelogs/.plugin-cache.yaml
new file mode 100644
index 00000000..072081e7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/changelogs/.plugin-cache.yaml
@@ -0,0 +1,266 @@
+plugins:
+ become: {}
+ cache: {}
+ callback: {}
+ cliconf: {}
+ connection: {}
+ httpapi: {}
+ inventory: {}
+ lookup: {}
+ module:
+ mso_backup:
+ description: Manages backups
+ name: mso_backup
+ namespace: ''
+ version_added: null
+ mso_dhcp_option_policy:
+ description: Manage DHCP Option policies.
+ name: mso_dhcp_option_policy
+ namespace: ''
+ version_added: null
+ mso_dhcp_option_policy_option:
+ description: Manage DHCP options in a DHCP Option policy.
+ name: mso_dhcp_option_policy_option
+ namespace: ''
+ version_added: null
+ mso_dhcp_relay_policy:
+ description: Manage DHCP Relay policies.
+ name: mso_dhcp_relay_policy
+ namespace: ''
+ version_added: null
+ mso_dhcp_relay_policy_provider:
+ description: Manage DHCP providers in a DHCP Relay policy.
+ name: mso_dhcp_relay_policy_provider
+ namespace: ''
+ version_added: null
+ mso_label:
+ description: Manage labels
+ name: mso_label
+ namespace: ''
+ version_added: null
+ mso_rest:
+ description: Direct access to the Cisco MSO REST API
+ name: mso_rest
+ namespace: ''
+ version_added: null
+ mso_role:
+ description: Manage roles
+ name: mso_role
+ namespace: ''
+ version_added: null
+ mso_schema:
+ description: Manage schemas
+ name: mso_schema
+ namespace: ''
+ version_added: null
+ mso_schema_site:
+ description: Manage sites in schemas
+ name: mso_schema_site
+ namespace: ''
+ version_added: null
+ mso_schema_site_anp:
+ description: Manage site-local Application Network Profiles (ANPs) in schema
+ template
+ name: mso_schema_site_anp
+ namespace: ''
+ version_added: null
+ mso_schema_site_anp_epg:
+ description: Manage site-local Endpoint Groups (EPGs) in schema template
+ name: mso_schema_site_anp_epg
+ namespace: ''
+ version_added: null
+ mso_schema_site_anp_epg_domain:
+ description: Manage site-local EPG domains in schema template
+ name: mso_schema_site_anp_epg_domain
+ namespace: ''
+ version_added: null
+ mso_schema_site_anp_epg_selector:
+ description: Manage site-local EPG selector in schema templates
+ name: mso_schema_site_anp_epg_selector
+ namespace: ''
+ version_added: null
+ mso_schema_site_anp_epg_staticleaf:
+ description: Manage site-local EPG static leafs in schema template
+ name: mso_schema_site_anp_epg_staticleaf
+ namespace: ''
+ version_added: null
+ mso_schema_site_anp_epg_staticport:
+ description: Manage site-local EPG static ports in schema template
+ name: mso_schema_site_anp_epg_staticport
+ namespace: ''
+ version_added: null
+ mso_schema_site_anp_epg_subnet:
+ description: Manage site-local EPG subnets in schema template
+ name: mso_schema_site_anp_epg_subnet
+ namespace: ''
+ version_added: null
+ mso_schema_site_bd:
+ description: Manage site-local Bridge Domains (BDs) in schema template
+ name: mso_schema_site_bd
+ namespace: ''
+ version_added: null
+ mso_schema_site_bd_l3out:
+ description: Manage site-local BD l3out's in schema template
+ name: mso_schema_site_bd_l3out
+ namespace: ''
+ version_added: null
+ mso_schema_site_bd_subnet:
+ description: Manage site-local BD subnets in schema template
+ name: mso_schema_site_bd_subnet
+ namespace: ''
+ version_added: null
+ mso_schema_site_external_epg_selector:
+ description: Manage External EPG selector in schema of cloud sites
+ name: mso_schema_site_external_epg_selector
+ namespace: ''
+ version_added: null
+ mso_schema_site_vrf:
+ description: Manage site-local VRFs in schema template
+ name: mso_schema_site_vrf
+ namespace: ''
+ version_added: null
+ mso_schema_site_vrf_region:
+ description: Manage site-local VRF regions in schema template
+ name: mso_schema_site_vrf_region
+ namespace: ''
+ version_added: null
+ mso_schema_site_vrf_region_cidr:
+ description: Manage site-local VRF region CIDRs in schema template
+ name: mso_schema_site_vrf_region_cidr
+ namespace: ''
+ version_added: null
+ mso_schema_site_vrf_region_cidr_subnet:
+ description: Manage site-local VRF regions in schema template
+ name: mso_schema_site_vrf_region_cidr_subnet
+ namespace: ''
+ version_added: null
+ mso_schema_site_vrf_region_hub_network:
+ description: Manage site-local VRF region hub network in schema template
+ name: mso_schema_site_vrf_region_hub_network
+ namespace: ''
+ version_added: null
+ mso_schema_template:
+ description: Manage templates in schemas
+ name: mso_schema_template
+ namespace: ''
+ version_added: null
+ mso_schema_template_anp:
+ description: Manage Application Network Profiles (ANPs) in schema templates
+ name: mso_schema_template_anp
+ namespace: ''
+ version_added: null
+ mso_schema_template_anp_epg:
+ description: Manage Endpoint Groups (EPGs) in schema templates
+ name: mso_schema_template_anp_epg
+ namespace: ''
+ version_added: null
+ mso_schema_template_anp_epg_contract:
+ description: Manage EPG contracts in schema templates
+ name: mso_schema_template_anp_epg_contract
+ namespace: ''
+ version_added: null
+ mso_schema_template_anp_epg_selector:
+ description: Manage EPG selector in schema templates
+ name: mso_schema_template_anp_epg_selector
+ namespace: ''
+ version_added: null
+ mso_schema_template_anp_epg_subnet:
+ description: Manage EPG subnets in schema templates
+ name: mso_schema_template_anp_epg_subnet
+ namespace: ''
+ version_added: null
+ mso_schema_template_bd:
+ description: Manage Bridge Domains (BDs) in schema templates
+ name: mso_schema_template_bd
+ namespace: ''
+ version_added: null
+ mso_schema_template_bd_subnet:
+ description: Manage BD subnets in schema templates
+ name: mso_schema_template_bd_subnet
+ namespace: ''
+ version_added: null
+ mso_schema_template_contract_filter:
+ description: Manage contract filters in schema templates
+ name: mso_schema_template_contract_filter
+ namespace: ''
+ version_added: null
+ mso_schema_template_deploy:
+ description: Deploy schema templates to sites
+ name: mso_schema_template_deploy
+ namespace: ''
+ version_added: null
+ mso_schema_template_external_epg:
+ description: Manage external EPGs in schema templates
+ name: mso_schema_template_external_epg
+ namespace: ''
+ version_added: null
+ mso_schema_template_external_epg_contract:
+ description: Manage Extrnal EPG contracts in schema templates
+ name: mso_schema_template_external_epg_contract
+ namespace: ''
+ version_added: 0.0.8
+ mso_schema_template_external_epg_selector:
+ description: Manage External EPG selector in schema templates
+ name: mso_schema_template_external_epg_selector
+ namespace: ''
+ version_added: null
+ mso_schema_template_external_epg_subnet:
+ description: Manage External EPG subnets in schema templates
+ name: mso_schema_template_external_epg_subnet
+ namespace: ''
+ version_added: 0.0.8
+ mso_schema_template_filter_entry:
+ description: Manage filter entries in schema templates
+ name: mso_schema_template_filter_entry
+ namespace: ''
+ version_added: null
+ mso_schema_template_l3out:
+ description: Manage l3outs in schema templates
+ name: mso_schema_template_l3out
+ namespace: ''
+ version_added: null
+ mso_schema_template_migrate:
+ description: Migrate Bridge Domains (BDs) and EPGs between templates
+ name: mso_schema_template_migrate
+ namespace: ''
+ version_added: null
+ mso_schema_template_vrf:
+ description: Manage VRFs in schema templates
+ name: mso_schema_template_vrf
+ namespace: ''
+ version_added: null
+ mso_schema_template_vrf_contract:
+ description: Manage vrf contracts in schema templates
+ name: mso_schema_template_vrf_contract
+ namespace: ''
+ version_added: 0.0.8
+ mso_site:
+ description: Manage sites
+ name: mso_site
+ namespace: ''
+ version_added: null
+ mso_tenant:
+ description: Manage tenants
+ name: mso_tenant
+ namespace: ''
+ version_added: null
+ mso_tenant_site:
+ description: Manage tenants with cloud sites.
+ name: mso_tenant_site
+ namespace: ''
+ version_added: null
+ mso_user:
+ description: Manage users
+ name: mso_user
+ namespace: ''
+ version_added: null
+ mso_version:
+ description: Get version of MSO
+ name: mso_version
+ namespace: ''
+ version_added: null
+ netconf: {}
+ shell: {}
+ strategy: {}
+ vars: {}
+version: 1.1.0
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/changelogs/changelog.yaml b/collections-debian-merged/ansible_collections/cisco/mso/changelogs/changelog.yaml
new file mode 100644
index 00000000..d9c41ab0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/changelogs/changelog.yaml
@@ -0,0 +1,224 @@
+ancestor: 0.0.4
+releases:
+ 0.0.5:
+ changes:
+ release_summary: New release v0.0.5
+ release_date: '2020-04-07'
+ 0.0.6:
+ changes:
+ bugfixes:
+ - Add aliases for backward support of permissions in role module.
+ - Add integration test for mso_schema_template_db and fix un-needed push to
+ API found by integration test.
+ - Consistent object output on domain_associations
+ - Fix EPG / External EPG Contract issue and create test for mso_schema_template_anp_epg_contract
+ and mso_schema_template_external_epg_contract
+ - Fix contract filter issue and add contract-filter test file
+ - Fix duplicate user, add admin user to associated user list and update tenant
+ test file
+ - Fix intersite_multicast_source attribute issue in mso_schema_template_anp_epg
+ and add the proxy_arp argument.
+ - Fix mso_schema_template_anp_epg idempotancy for both EPG and EPG with contracts
+ - Remove label with test domain before create it
+ - Send context instead of vrf when vrf parameter is used
+ - Update mso_schema_template_bd.py example for BD in another schema
+ minor_changes:
+ - ACI/MSO - Use get() dict lookups (https://github.com/ansible/ansible/pull/63074)
+ - Add EPG and ANP at site level when needed
+ - Add github action CI pipeline with test coverage
+ - Add login domain support for authentication in all modules
+ - Add support for DHCP querier to all subnet objects. Add partial test in mso_schema_template_bd
+ integration test.
+ - Add support for clean output if needed for debuging
+ - Add test file for mso_schema_template_anp_epg
+ - Added DHCP relay options and scope options to MSO schema template bd
+ - Added ability to bind epg to static fex port
+ - Added module to manage contracts for external EPG in Cisco MSO (https://github.com/ansible/ansible/pull/63550)
+ - Added module to manage template external epg subnet for Cisco MSO (https://github.com/ansible/ansible/pull/63542)
+ - Disabling tests for the role modules as API is not supported after 2.2.3i
+ until further notice
+ - Increased test coverage for existing module integration tests.
+ - Modified fail messages for site and updated documentation
+ - Moving test to Ansible v2.9.9 and increasing timelimit for mutex to 30+ min
+ - Update authors.
+ - Update mso_schema_site_anp.py (https://github.com/ansible/ansible/pull/67099)
+ - Updated Test File Covering all conditions
+ - mso_schema_site_anp_epg_staticport - Add VPC support (https://github.com/ansible/ansible/pull/62803)
+ release_summary: New release v0.0.6
+ release_date: '2020-06-13'
+ 0.0.7:
+ changes:
+ bugfixes:
+ - Fix mso_schema_site_vrf_region_cidr to automatically create VRF and Region
+ if not present at site level
+ - Fix query condition when VRF or Region do not exist at site level
+ - Remove unused regions attribute from mso_schema_template_vrf
+ minor_changes:
+ - Add l3out, preferred_group and test file for mso_schema_template_externalepg
+ - Add mso_schema_template_vrf_contract module and test file
+ - Add new attribute choice "policy_compression" to mso_Schema_template_contract_filter
+ - Add new functionality - Direct Port Channel (dpc), micro-seg-vlan and default
+ values
+ - Add new module for anp-epg-selector in site level
+ - Add new module mso_schema_template_anp_epg_selector and its test file
+ - Add new module mso_schema_vrf_contract
+ - Add new module mso_tenant_site to support cloud and non-cloud sites association
+ with a tenant and test file (https://github.com/CiscoDevNet/ansible-mso/pull/62)
+ - Add new mso_site_external_epg_selector module and test file
+ - Add site external epg and contract filter test
+ - Add support for VGW attribute in mso_schema_site_vrf_region_cidr_subnet
+ - Add support to set account as inactive using account_status attribute in mso_user
+ - Add test for mso_schema_site_vrf_region_cidr module
+ - Add test for mso_schema_site_vrf_region_cidr_subnet module
+ - Add vzAny attribute in mso_schema_template_vrf
+ - Automatically add ANP and EPG at site level and new test file for mso_schema_site_anp_epg_staticport
+ (https://github.com/CiscoDevNet/ansible-mso/pull/55)
+ - Modified External EPG module and addition of new Selector module
+ release_summary: New release v0.0.7
+ release_date: '2020-07-08'
+ 0.0.8:
+ changes:
+ bugfixes:
+ - Add login_domain to existing test.
+ - Add missing tests for VRF settings and changing those settings.
+ - Add test for specifying read-only roles and increase overall test coverage
+ of mso_user (https://github.com/CiscoDevNet/ansible-mso/pull/77)
+ - Add test to mso_schema_template_vrf, mso_schema_template_external_epg and
+ mso_schema_template_anp_epg to check for API error when pushing changes to
+ object with existing contract.
+ - Cleanup unused imports, unused variables and branches and change a variable
+ from ambiguous name to reduce warnings at Ansible Galaxy import
+ - Fix API error when pushing EPG with existing contracts
+ - Fix role tests to work with pre/post 2.2.4 and re-enable them
+ - Fix site issue if no site present and fix test issues with MSO v3.0
+ - Fixing External EPG renaming for 2.9 and later
+ - Fixing L3MCast test to pass on 2.2.4
+ - Fixing wrong removal of schemas
+ - Test hub network module after creating region manually
+ - Updating Azure site IP in inventory and add second MSO version to inventory
+ minor_changes:
+ - Add Login Domain support to mso_site
+ - Add aliases file for contract_filter module
+ - Add contract information in current and previous part
+ - Add new module and test file to query MSO version
+ - New backup module and test file (https://github.com/CiscoDevNet/ansible-mso/pull/80)
+ - Renaming mso_schema_template_externalepg module to mso_schema_template_external_epg
+ while keeping both working.
+ - Update cidr module, udpate attributes in hub network module and its test file
+ - Use a function to reuuse duplicate part
+ release_summary: New release v0.0.8
+ release_date: '2020-07-21'
+ 1.0.0:
+ changes:
+ bugfixes:
+ - Fix sanity issues to support 2.10.0
+ minor_changes:
+ - Add changelog
+ - Fix M() and module to use FQCN
+ - Update Ansible version in CI and add 2.10.0 to sanity in CI.
+ - Update Readme with supported versions
+ release_summary: 'This is the first official release of the ``cisco.mso`` collection
+ on 2020-08-18.
+
+ This changelog describes all changes made to the modules and plugins included
+ in this collection since Ansible 2.9.0.
+
+ '
+ release_date: '2020-08-18'
+ 1.0.1:
+ changes:
+ bugfixes:
+ - Fix default value for l2Stretch in mso_schema_template_bd module
+ - Fix deletion of schema when wrong template is provided in single template
+ schema
+ - Fix examples in documentation for mso_schema_template_l3out and mso_user
+ - Fix naming issue in deploy module
+ - Remove author emails due to length restriction
+ - Remove dead code branch in mso_schema_template
+ minor_changes:
+ - Add delete capability to mso_schema_site
+ - Add env_fallback for mso_argument_spec params
+ - Add non existing template deletion test
+ - Add test file for mso_schema_template
+ - Add test file for site_bd_subnet
+ - Bump module to v1.0.1
+ - Extent mso_tenant test case coverage
+ release_summary: 'Release v1.0.1 of the ``cisco.mso`` collection on 2020-10-30.
+
+ This changelog describes all changes made to the modules and plugins included
+ in this collection since v1.0.0.
+
+ '
+ release_date: '2020-10-30'
+ 1.1.0:
+ changes:
+ bugfixes:
+ - Fix anp idempotency issue
+ - Fix crash issue when using irrelevant site-template
+ - Fix default value for mso_schema state parameter
+ - Fix examples for mso_schema
+ - Fix galaxy-importer check warnings
+ - Fix issue on mso_schema_site_vrf_region_cidr_subnet to allow an AWS subnet
+ to be used for a TGW Attachment (Hub Network)
+ - Fix module name in example of mso_schema_site_vrf_region
+ - Fix mso_backup upload issue
+ - Fix sanity test error mso_schema_site_bd
+ - Fix some coding standard and improvements to contributed mso_dhcp_relay modules
+ and test files
+ - Fix space in asssertion
+ - Fix space in site_anp_epg_domain
+ - Fix space in test file
+ - Remove space from template name in all modules
+ - Remove space in template name
+ minor_changes:
+ - Add DHCP Policy Operations
+ - Add SVI MAC Addreess option in mso_schema_site_bd
+ - Add additional test file to add tenant from templated payload file
+ - Add attribute virtual_ip to mso_schema_site_bd_subnet
+ - Add capability for restore and download backup
+ - Add capability to upload backup
+ - Add check for undeploy under MSO version
+ - Add error handeling test file
+ - Add error message to display when yaml has failed to load
+ - Add galaxy-importer check
+ - Add galaxy-importer config
+ - Add mso_dhcp_option_policy and mso_dhcp_option_policy_option and test files
+ - Add new module mso_rest and test case files to support GET api method
+ - Add new options to template bd and updated test file
+ - Add notes to use region_cidr module to create region
+ - Add task to undeploy the template from the site
+ - Add tasks in test file to remove templates for mso_schema_template_migrate
+ - Add test case for schema removing
+ - Add test cases to verify GET, PUT, POST and DELETE API methods for sites in
+ mso_rest.py
+ - Add test file for mso_schema
+ - Add test file for mso_schema_template_anp
+ - Add test file for region module
+ - Add test files yaml_inline and yaml_string to support YAML
+ - Add userAssociations to tenants to resolve CI issues
+ - Addition of cloud setting for ext epg
+ - Changes made to payload of mso_schema_template_external_epg
+ - Changes to options in template bd
+ - Check warning
+ - Documentation Corrected
+ - Force arp flood to be true when l2unkwunicast is flood
+ - Make changes to display correct status code
+ - Modify mso library and updated test file
+ - Modify mso_rest test files to make PATCH available, and test other methods
+ against schemas
+ - Move options for subnet from mso to the template_bd_subnet module
+ - Python lint corrected
+ - Redirect log to both stdout and log.txt file & Check warnings and errors
+ - Remove creation example in document of mso_schema_site_vrf_region
+ - Remove present state from mso_schema module
+ - Removed unused variable in mso_schema_site_vrf_region_hub_network
+ - Test DHCP Policy Provider added
+ - Test file for mso_dhcp_relay_policy added
+ - Test file for template_bd_subnet and new option foe module
+ release_summary: 'Release v1.1.0 of the ``cisco.mso`` collection on 2021-01-20.
+
+ This changelog describes all changes made to the modules and plugins included
+ in this collection since v1.0.1.
+
+ '
+ release_date: '2021-01-20'
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/changelogs/config.yaml b/collections-debian-merged/ansible_collections/cisco/mso/changelogs/config.yaml
new file mode 100644
index 00000000..d6a4c94a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/changelogs/config.yaml
@@ -0,0 +1,31 @@
+changelog_filename_template: ../CHANGELOG.rst
+changelog_filename_version_depth: 0
+changes_file: changelog.yaml
+changes_format: combined
+ignore_other_fragment_extensions: true
+keep_fragments: false
+mention_ancestor: true
+new_plugins_after_name: removed_features
+notesdir: fragments
+prelude_section_name: release_summary
+prelude_section_title: Release Summary
+sections:
+- - major_changes
+ - Major Changes
+- - minor_changes
+ - Minor Changes
+- - breaking_changes
+ - Breaking Changes / Porting Guide
+- - deprecated_features
+ - Deprecated Features
+- - removed_features
+ - Removed Features (previously deprecated)
+- - security_fixes
+ - Security Fixes
+- - bugfixes
+ - Bugfixes
+- - known_issues
+ - Known Issues
+title: Cisco MSO Ansible Collection
+trivial_section_name: trivial
+use_fqcn: true
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/codecov.yml b/collections-debian-merged/ansible_collections/cisco/mso/codecov.yml
new file mode 100644
index 00000000..f0f6358e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/codecov.yml
@@ -0,0 +1,4 @@
+coverage:
+ precision: 2
+ round: down
+ range: "70...100"
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/meta/runtime.yml b/collections-debian-merged/ansible_collections/cisco/mso/meta/runtime.yml
new file mode 100644
index 00000000..c3f6d266
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/meta/runtime.yml
@@ -0,0 +1,6 @@
+---
+requires_ansible: '>=2.9.10'
+plugin_routing:
+ modules:
+ mso_schema_template_externalepg:
+ redirect: cisco.mso.mso_schema_template_external_epg \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/doc_fragments/modules.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/doc_fragments/modules.py
new file mode 100644
index 00000000..b4d9924d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/doc_fragments/modules.py
@@ -0,0 +1,85 @@
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+
+class ModuleDocFragment(object):
+ # Standard files documentation fragment
+ DOCUMENTATION = r'''
+options:
+ host:
+ description:
+ - IP Address or hostname of the ACI Multi Site Orchestrator host.
+ - If the value is not specified in the task, the value of environment variable C(MSO_HOST) will be used instead.
+ type: str
+ required: yes
+ aliases: [ hostname ]
+ port:
+ description:
+ - Port number to be used for the REST connection.
+ - The default value depends on parameter `use_ssl`.
+ - If the value is not specified in the task, the value of environment variable C(MSO_PORT) will be used instead.
+ type: int
+ username:
+ description:
+ - The username to use for authentication.
+ - If the value is not specified in the task, the value of environment variables C(MSO_USERNAME) or C(ANSIBLE_NET_USERNAME) will be used instead.
+ type: str
+ default: admin
+ password:
+ description:
+ - The password to use for authentication.
+ - If the value is not specified in the task, the value of environment variables C(MSO_PASSWORD) or C(ANSIBLE_NET_PASSWORD) will be used instead.
+ type: str
+ required: yes
+ output_level:
+ description:
+ - Influence the output of this ACI module.
+ - C(normal) means the standard output, incl. C(current) dict
+ - C(info) adds informational output, incl. C(previous), C(proposed) and C(sent) dicts
+ - C(debug) adds debugging output, incl. C(filter_string), C(method), C(response), C(status) and C(url) information
+ - If the value is not specified in the task, the value of environment variable C(MSO_OUTPUT_LEVEL) will be used instead.
+ type: str
+ choices: [ debug, info, normal ]
+ default: normal
+ timeout:
+ description:
+ - The socket level timeout in seconds.
+ - If the value is not specified in the task, the value of environment variable C(MSO_TIMEOUT) will be used instead.
+ type: int
+ default: 30
+ use_proxy:
+ description:
+ - If C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
+ - If the value is not specified in the task, the value of environment variable C(MSO_USE_PROXY) will be used instead.
+ type: bool
+ default: yes
+ use_ssl:
+ description:
+ - If C(no), an HTTP connection will be used instead of the default HTTPS connection.
+ - If the value is not specified in the task, the value of environment variable C(MSO_USE_SSL) will be used instead.
+ type: bool
+ default: yes
+ validate_certs:
+ description:
+ - If C(no), SSL certificates will not be validated.
+ - This should only set to C(no) when used on personally controlled sites using self-signed certificates.
+ - If the value is not specified in the task, the value of environment variable C(MSO_VALIDATE_CERTS) will be used instead.
+ type: bool
+ default: yes
+ login_domain:
+ description:
+ - The login domain name to use for authentication.
+ - The default value is Local.
+ - If the value is not specified in the task, the value of environment variable C(MSO_LOGIN_DOMAIN) will be used instead.
+ type: str
+requirements:
+- Multi Site Orchestrator v2.1 or newer
+notes:
+- Please read the :ref:`aci_guide` for more detailed information on how to manage your ACI infrastructure using Ansible.
+- This module was written to support ACI Multi Site Orchestrator v2.1 or newer. Some or all functionality may not work on earlier versions.
+'''
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/module_utils/mso.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/module_utils/mso.py
new file mode 100644
index 00000000..91485df0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/module_utils/mso.py
@@ -0,0 +1,949 @@
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+from copy import deepcopy
+import re
+import os
+import datetime
+import shutil
+import tempfile
+from ansible.module_utils.basic import json
+from ansible.module_utils.basic import env_fallback
+from ansible.module_utils.six import PY3
+from ansible.module_utils.six.moves import filterfalse
+from ansible.module_utils.six.moves.urllib.parse import urlencode, urljoin
+from ansible.module_utils.urls import fetch_url
+from ansible.module_utils._text import to_native
+try:
+ from requests_toolbelt.multipart.encoder import MultipartEncoder
+ HAS_MULTIPART_ENCODER = True
+except ImportError:
+ HAS_MULTIPART_ENCODER = False
+
+
+if PY3:
+ def cmp(a, b):
+ return (a > b) - (a < b)
+
+
+def issubset(subset, superset):
+ ''' Recurse through nested dictionary and compare entries '''
+
+ # Both objects are the same object
+ if subset is superset:
+ return True
+
+ # Both objects are identical
+ if subset == superset:
+ return True
+
+ # Both objects have a different type
+ if type(subset) != type(superset):
+ return False
+
+ for key, value in subset.items():
+ # Ignore empty values
+ if value is None:
+ return True
+
+ # Item from subset is missing from superset
+ if key not in superset:
+ return False
+
+ # Item has different types in subset and superset
+ if type(superset.get(key)) != type(value):
+ return False
+
+ # Compare if item values are subset
+ if isinstance(value, dict):
+ if not issubset(superset.get(key), value):
+ return False
+ elif isinstance(value, list):
+ try:
+ # NOTE: Fails for lists of dicts
+ if not set(value) <= set(superset.get(key)):
+ return False
+ except TypeError:
+ # Fall back to exact comparison for lists of dicts
+ diff = list(filterfalse(lambda i: i in value, superset.get(key))) + list(filterfalse(lambda j: j in superset.get(key), value))
+ if diff:
+ return False
+ elif isinstance(value, set):
+ if not value <= superset.get(key):
+ return False
+ else:
+ if not value == superset.get(key):
+ return False
+
+ return True
+
+
+def update_qs(params):
+ ''' Append key-value pairs to self.filter_string '''
+ accepted_params = dict((k, v) for (k, v) in params.items() if v is not None)
+ return '?' + urlencode(accepted_params)
+
+
+def mso_argument_spec():
+ return dict(
+ host=dict(type='str', required=True, aliases=['hostname'], fallback=(env_fallback, ['MSO_HOST'])),
+ port=dict(type='int', required=False, fallback=(env_fallback, ['MSO_PORT'])),
+ username=dict(type='str', default='admin', fallback=(env_fallback, ['MSO_USERNAME', 'ANSIBLE_NET_USERNAME'])),
+ password=dict(type='str', required=True, no_log=True, fallback=(env_fallback, ['MSO_PASSWORD', 'ANSIBLE_NET_PASSWORD'])),
+ output_level=dict(type='str', default='normal', choices=['debug', 'info', 'normal'], fallback=(env_fallback, ['MSO_OUTPUT_LEVEL'])),
+ timeout=dict(type='int', default=30, fallback=(env_fallback, ['MSO_TIMEOUT'])),
+ use_proxy=dict(type='bool', default=True, fallback=(env_fallback, ['MSO_USE_PROXY'])),
+ use_ssl=dict(type='bool', default=True, fallback=(env_fallback, ['MSO_USE_SSL'])),
+ validate_certs=dict(type='bool', default=True, fallback=(env_fallback, ['MSO_VALIDATE_CERTS'])),
+ login_domain=dict(type='str', fallback=(env_fallback, ['MSO_LOGIN_DOMAIN'])),
+ )
+
+
+def mso_reference_spec():
+ return dict(
+ name=dict(type='str', required=True),
+ schema=dict(type='str'),
+ template=dict(type='str'),
+ )
+
+
+def mso_subnet_spec():
+ return dict(
+ subnet=dict(type='str', required=True, aliases=['ip']),
+ description=dict(type='str'),
+ scope=dict(type='str', default='private', choices=['private', 'public']),
+ shared=dict(type='bool', default=False),
+ no_default_gateway=dict(type='bool', default=False),
+ querier=dict(type='bool', default=False),
+ )
+
+
+def mso_dhcp_spec():
+ return dict(
+ dhcp_option_policy=dict(type='dict', option=mso_dhcp_option_spec()),
+ name=dict(type='str', required=True),
+ version=dict(type='int', required=True),
+ )
+
+
+def mso_dhcp_option_spec():
+ return dict(
+ name=dict(type='str', required=True),
+ version=dict(type='int', required=True),
+ )
+
+
+def mso_contractref_spec():
+ return dict(
+ name=dict(type='str', required=True),
+ schema=dict(type='str'),
+ template=dict(type='str'),
+ type=dict(type='str', required=True, choices=['consumer', 'provider']),
+ )
+
+
+def mso_expression_spec():
+ return dict(
+ type=dict(type='str', required=True, aliases=['tag']),
+ operator=dict(type='str', choices=['not_in', 'in', 'equals', 'not_equals', 'has_key', 'does_not_have_key'], required=True),
+ value=dict(type='str'),
+ )
+
+
+def mso_expression_spec_ext_epg():
+ return dict(
+ type=dict(type='str', choices=['ip_address'], required=True),
+ operator=dict(type='str', choices=['equals'], required=True),
+ value=dict(type='str', required=True),
+ )
+
+
+def mso_hub_network_spec():
+ return dict(
+ name=dict(type='str', required=True),
+ tenant=dict(type='str', required=True),
+ )
+
+
+def mso_object_migrate_spec():
+ return dict(
+ epg=dict(type='str', required=True),
+ anp=dict(type='str', required=True),
+ )
+
+
+# Copied from ansible's module uri.py (url): https://github.com/ansible/ansible/blob/cdf62edc65f564fff6b7e575e084026fa7faa409/lib/ansible/modules/uri.py
+def write_file(module, url, dest, content, resp):
+ # create a tempfile with some test content
+ fd, tmpsrc = tempfile.mkstemp(dir=module.tmpdir)
+ f = open(tmpsrc, 'wb')
+ try:
+ f.write(content)
+ except Exception as e:
+ os.remove(tmpsrc)
+ module.fail_json(msg="Failed to create temporary content file: {0}".format(to_native(e)))
+ f.close()
+
+ checksum_src = None
+ checksum_dest = None
+
+ # raise an error if there is no tmpsrc file
+ if not os.path.exists(tmpsrc):
+ os.remove(tmpsrc)
+ module.fail_json(msg="Source '{0}' does not exist".format(tmpsrc))
+ if not os.access(tmpsrc, os.R_OK):
+ os.remove(tmpsrc)
+ module.fail_json(msg="Source '{0}' is not readable".format(tmpsrc))
+ checksum_src = module.sha1(tmpsrc)
+
+ # check if there is no dest file
+ if os.path.exists(dest):
+ # raise an error if copy has no permission on dest
+ if not os.access(dest, os.W_OK):
+ os.remove(tmpsrc)
+ module.fail_json(msg="Destination '{0}' not writable".format(dest))
+ if not os.access(dest, os.R_OK):
+ os.remove(tmpsrc)
+ module.fail_json(msg="Destination '{0}' not readable".format(dest))
+ checksum_dest = module.sha1(dest)
+ else:
+ if not os.access(os.path.dirname(dest), os.W_OK):
+ os.remove(tmpsrc)
+ module.fail_json(msg="Destination dir '{0}' not writable".format(os.path.dirname(dest)))
+
+ if checksum_src != checksum_dest:
+ try:
+ shutil.copyfile(tmpsrc, dest)
+ except Exception as e:
+ os.remove(tmpsrc)
+ module.fail_json(msg="failed to copy {0} to {1}: {2}".format(tmpsrc, dest, to_native(e)))
+
+ os.remove(tmpsrc)
+
+
+class MSOModule(object):
+
+ def __init__(self, module):
+ self.module = module
+ self.params = module.params
+ self.result = dict(changed=False)
+ self.headers = {'Content-Type': 'text/json'}
+
+ # normal output
+ self.existing = dict()
+
+ # mso_rest output
+ self.jsondata = None
+ self.error = dict(code=None, message=None, info=None)
+
+ # info output
+ self.previous = dict()
+ self.proposed = dict()
+ self.sent = dict()
+ self.stdout = None
+
+ # debug output
+ self.has_modified = False
+ self.filter_string = ''
+ self.method = None
+ self.path = None
+ self.response = None
+ self.status = None
+ self.url = None
+
+ # Ensure protocol is set
+ self.params['protocol'] = 'https' if self.params.get('use_ssl', True) else 'http'
+
+ # Set base_uri
+ if self.params.get('port') is not None:
+ self.baseuri = '{protocol}://{host}:{port}/api/v1/'.format(**self.params)
+ else:
+ self.baseuri = '{protocol}://{host}/api/v1/'.format(**self.params)
+
+ if self.module._debug:
+ self.module.warn('Enable debug output because ANSIBLE_DEBUG was set.')
+ self.params['output_level'] = 'debug'
+
+ if self.params.get('password'):
+ # Perform password-based authentication, log on using password
+ self.login()
+ else:
+ self.module.fail_json(msg="Parameter 'password' is required for authentication")
+
+ def get_login_domain_id(self, domain):
+ ''' Get a domain and return its id '''
+ if domain is None:
+ return domain
+ d = self.get_obj('auth/login-domains', key='domains', name=domain)
+ if not d:
+ self.module.fail_json(msg="Login domain '%s' is not a valid domain name." % domain)
+ if 'id' not in d:
+ self.module.fail_json(msg="Login domain lookup failed for domain '%s': %s" % (domain, d))
+ return d['id']
+
+ def login(self):
+ ''' Log in to MSO '''
+
+ # Perform login request
+ if (self.params.get('login_domain') is not None) and (self.params.get('login_domain') != 'Local'):
+ domain_id = self.get_login_domain_id(self.params.get('login_domain'))
+ payload = {'username': self.params.get('username'), 'password': self.params.get('password'), 'domainId': domain_id}
+ else:
+ payload = {'username': self.params.get('username'), 'password': self.params.get('password')}
+ self.url = urljoin(self.baseuri, 'auth/login')
+ resp, auth = fetch_url(self.module,
+ self.url,
+ data=json.dumps(payload),
+ method='POST',
+ headers=self.headers,
+ timeout=self.params.get('timeout'),
+ use_proxy=self.params.get('use_proxy'))
+
+ # Handle MSO response
+ if auth.get('status') != 201:
+ self.response = auth.get('msg')
+ self.status = auth.get('status')
+ self.fail_json(msg='Authentication failed: {msg}'.format(**auth))
+
+ payload = json.loads(resp.read())
+
+ self.headers['Authorization'] = 'Bearer {token}'.format(**payload)
+
+ def response_json(self, rawoutput):
+ ''' Handle MSO JSON response output '''
+ try:
+ self.jsondata = json.loads(rawoutput)
+ except Exception as e:
+ # Expose RAW output for troubleshooting
+ self.error = dict(code=-1, message="Unable to parse output as JSON, see 'raw' output. %s" % e)
+ self.result['raw'] = rawoutput
+ return
+
+ # Handle possible MSO error information
+ if self.status not in [200, 201, 202, 204]:
+ self.error = self.jsondata
+
+ def request_download(self, path, destination=None):
+ self.url = urljoin(self.baseuri, path)
+ redirected = False
+ redir_info = {}
+ redirect = {}
+
+ src = self.params.get('src')
+ if src:
+ try:
+ self.headers.update({
+ 'Content-Length': os.stat(src).st_size
+ })
+ data = open(src, 'rb')
+ except OSError:
+ self.module.fail_json(msg='Unable to open source file %s' % src, elapsed=0)
+ else:
+ pass
+
+ data = None
+
+ kwargs = {}
+ if destination is not None:
+ if os.path.isdir(destination):
+ # first check if we are redirected to a file download
+ check, redir_info = fetch_url(self.module, self.url,
+ headers=self.headers,
+ method='GET',
+ timeout=self.params.get('timeout'))
+ # if we are redirected, update the url with the location header,
+ # and update dest with the new url filename
+ if redir_info['status'] in (301, 302, 303, 307):
+ self.url = redir_info.get('location')
+ redirected = True
+ destination = os.path.join(destination, check.headers.get("Content-Disposition").split("filename=")[1])
+ # if destination file already exist, only download if file newer
+ if os.path.exists(destination):
+ kwargs['last_mod_time'] = datetime.datetime.utcfromtimestamp(os.path.getmtime(destination))
+
+ resp, info = fetch_url(self.module, self.url, data=data, headers=self.headers,
+ method='GET', timeout=self.params.get('timeout'), unix_socket=self.params.get('unix_socket'), **kwargs)
+
+ try:
+ content = resp.read()
+ except AttributeError:
+ # there was no content, but the error read() may have been stored in the info as 'body'
+ content = info.pop('body', '')
+
+ if src:
+ # Try to close the open file handle
+ try:
+ data.close()
+ except Exception:
+ pass
+
+ redirect['redirected'] = redirected or info.get('url') != self.url
+ redirect.update(redir_info)
+ redirect.update(info)
+
+ write_file(self.module, self.url, destination, content, redirect)
+
+ return redirect, destination
+
+ def request_upload(self, path, fields=None):
+ ''' Generic HTTP MultiPart POST method for MSO uploads. '''
+ self.path = path
+ self.url = urljoin(self.baseuri, path)
+
+ if not HAS_MULTIPART_ENCODER:
+ self.fail_json(msg='requests-toolbelt is required for the upload state of this module')
+
+ mp_encoder = MultipartEncoder(fields=fields)
+ self.headers['Content-Type'] = mp_encoder.content_type
+ self.headers['Accept-Encoding'] = "gzip, deflate, br"
+
+ resp, info = fetch_url(self.module,
+ self.url,
+ headers=self.headers,
+ data=mp_encoder,
+ method='POST',
+ timeout=self.params.get('timeout'),
+ use_proxy=self.params.get('use_proxy'))
+
+ self.response = info.get('msg')
+ self.status = info.get('status')
+
+ # Get change status from HTTP headers
+ if 'modified' in info:
+ self.has_modified = True
+ if info.get('modified') == 'false':
+ self.result['changed'] = False
+ elif info.get('modified') == 'true':
+ self.result['changed'] = True
+
+ # 200: OK, 201: Created, 202: Accepted, 204: No Content
+ if self.status in (200, 201, 202, 204):
+ output = resp.read()
+ if output:
+ return json.loads(output)
+
+ # 400: Bad Request, 401: Unauthorized, 403: Forbidden,
+ # 405: Method Not Allowed, 406: Not Acceptable
+ # 500: Internal Server Error, 501: Not Implemented
+ elif self.status >= 400:
+ try:
+ payload = json.loads(resp.read())
+ except (ValueError, AttributeError):
+ try:
+ payload = json.loads(info.get('body'))
+ except Exception:
+ self.fail_json(msg='MSO Error:', info=info)
+ if 'code' in payload:
+ self.fail_json(msg='MSO Error {code}: {message}'.format(**payload), info=info, payload=payload)
+ else:
+ self.fail_json(msg='MSO Error:'.format(**payload), info=info, payload=payload)
+
+ return {}
+
+ def request(self, path, method=None, data=None, qs=None):
+ ''' Generic HTTP method for MSO requests. '''
+ self.path = path
+
+ if method is not None:
+ self.method = method
+
+ # If we PATCH with empty operations, return
+ if method == 'PATCH' and not data:
+ return {}
+
+ self.url = urljoin(self.baseuri, path)
+
+ if qs is not None:
+ self.url = self.url + update_qs(qs)
+
+ resp, info = fetch_url(self.module,
+ self.url,
+ headers=self.headers,
+ data=json.dumps(data),
+ method=self.method,
+ timeout=self.params.get('timeout'),
+ use_proxy=self.params.get('use_proxy'))
+
+ self.response = info.get('msg')
+ self.status = info.get('status')
+
+ # self.result['info'] = info
+
+ # Get change status from HTTP headers
+ if 'modified' in info:
+ self.has_modified = True
+ if info.get('modified') == 'false':
+ self.result['changed'] = False
+ elif info.get('modified') == 'true':
+ self.result['changed'] = True
+
+ # 200: OK, 201: Created, 202: Accepted, 204: No Content
+ if self.status in (200, 201, 202, 204):
+ output = resp.read()
+ if output:
+ return json.loads(output)
+
+ # 404: Not Found
+ elif self.method == 'DELETE' and self.status == 404:
+ return {}
+
+ # 400: Bad Request, 401: Unauthorized, 403: Forbidden,
+ # 405: Method Not Allowed, 406: Not Acceptable
+ # 500: Internal Server Error, 501: Not Implemented
+ elif self.status >= 400:
+ try:
+ output = resp.read()
+ payload = json.loads(output)
+ except (ValueError, AttributeError):
+ try:
+ payload = json.loads(info.get('body'))
+ except Exception:
+ self.fail_json(msg='MSO Error:', data=data, info=info)
+ if 'code' in payload:
+ self.fail_json(msg='MSO Error {code}: {message}'.format(**payload), data=data, info=info, payload=payload)
+ else:
+ self.fail_json(msg='MSO Error:'.format(**payload), data=data, info=info, payload=payload)
+
+ return {}
+
+ def query_objs(self, path, key=None, **kwargs):
+ ''' Query the MSO REST API for objects in a path '''
+ found = []
+ objs = self.request(path, method='GET')
+
+ if objs == {}:
+ return found
+
+ if key is None:
+ key = path
+
+ if key not in objs:
+ self.fail_json(msg="Key '%s' missing from data", data=objs)
+
+ for obj in objs.get(key):
+ for kw_key, kw_value in kwargs.items():
+ if kw_value is None:
+ continue
+ if obj.get(kw_key) != kw_value:
+ break
+ else:
+ found.append(obj)
+ return found
+
+ def query_obj(self, path, **kwargs):
+ ''' Query the MSO REST API for the whole object at a path '''
+ obj = self.request(path, method='GET')
+ if obj == {}:
+ return {}
+ for kw_key, kw_value in kwargs.items():
+ if kw_value is None:
+ continue
+ if obj.get(kw_key) != kw_value:
+ return {}
+ return obj
+
+ def get_obj(self, path, **kwargs):
+ ''' Get a specific object from a set of MSO REST objects '''
+ objs = self.query_objs(path, **kwargs)
+ if len(objs) == 0:
+ return {}
+ if len(objs) > 1:
+ self.fail_json(msg='More than one object matches unique filter: {0}'.format(kwargs))
+ return objs[0]
+
+ def lookup_schema(self, schema):
+ ''' Look up schema and return its id '''
+ if schema is None:
+ return schema
+
+ s = self.get_obj('schemas', displayName=schema)
+ if not s:
+ self.module.fail_json(msg="Schema '%s' is not a valid schema name." % schema)
+ if 'id' not in s:
+ self.module.fail_json(msg="Schema lookup failed for schema '%s': %s" % (schema, s))
+ return s.get('id')
+
+ def lookup_domain(self, domain):
+ ''' Look up a domain and return its id '''
+ if domain is None:
+ return domain
+
+ d = self.get_obj('auth/domains', key='domains', name=domain)
+ if not d:
+ self.module.fail_json(msg="Domain '%s' is not a valid domain name." % domain)
+ if 'id' not in d:
+ self.module.fail_json(msg="Domain lookup failed for domain '%s': %s" % (domain, d))
+ return d.get('id')
+
+ def lookup_roles(self, roles):
+ ''' Look up roles and return their ids '''
+ if roles is None:
+ return roles
+
+ ids = []
+ for role in roles:
+ name = role
+ access_type = "readWrite"
+ if 'name' in role:
+ name = role.get('name')
+ if role.get('access_type') == 'read':
+ access_type = 'readOnly'
+ r = self.get_obj('roles', name=name)
+ if not r:
+ self.module.fail_json(msg="Role '%s' is not a valid role name." % name)
+ if 'id' not in r:
+ self.module.fail_json(msg="Role lookup failed for role '%s': %s" % (name, r))
+ ids.append(dict(roleId=r.get('id'), accessType=access_type))
+ return ids
+
+ def lookup_site(self, site):
+ ''' Look up a site and return its id '''
+ if site is None:
+ return site
+
+ s = self.get_obj('sites', name=site)
+ if not s:
+ self.module.fail_json(msg="Site '%s' is not a valid site name." % site)
+ if 'id' not in s:
+ self.module.fail_json(msg="Site lookup failed for site '%s': %s" % (site, s))
+ return s.get('id')
+
+ def lookup_sites(self, sites):
+ ''' Look up sites and return their ids '''
+ if sites is None:
+ return sites
+
+ ids = []
+ for site in sites:
+ s = self.get_obj('sites', name=site)
+ if not s:
+ self.module.fail_json(msg="Site '%s' is not a valid site name." % site)
+ if 'id' not in s:
+ self.module.fail_json(msg="Site lookup failed for site '%s': %s" % (site, s))
+ ids.append(dict(siteId=s.get('id'), securityDomains=[]))
+ return ids
+
+ def lookup_tenant(self, tenant):
+ ''' Look up a tenant and return its id '''
+ if tenant is None:
+ return tenant
+
+ t = self.get_obj('tenants', key='tenants', name=tenant)
+ if not t:
+ self.module.fail_json(msg="Tenant '%s' is not valid tenant name." % tenant)
+ if 'id' not in t:
+ self.module.fail_json(msg="Tenant lookup failed for tenant '%s': %s" % (tenant, t))
+ return t.get('id')
+
+ def lookup_remote_location(self, remote_location):
+ ''' Look up a remote location and return its path and id '''
+ if remote_location is None:
+ return None
+
+ remote = self.get_obj('platform/remote-locations', key='remoteLocations', name=remote_location)
+ if 'id' not in remote:
+ self.module.fail_json(msg="No remote location found for remote '%s'" % (remote_location))
+ remote_info = dict(id=remote.get('id'), path=remote.get('credential')['remotePath'])
+ return remote_info
+
+ def lookup_users(self, users):
+ ''' Look up users and return their ids '''
+ # Ensure tenant has at least admin user
+ if users is None:
+ return [dict(userId="0000ffff0000000000000020")]
+
+ ids = []
+ for user in users:
+ u = self.get_obj('users', username=user)
+ if not u:
+ self.module.fail_json(msg="User '%s' is not a valid user name." % user)
+ if 'id' not in u:
+ self.module.fail_json(msg="User lookup failed for user '%s': %s" % (user, u))
+ id = dict(userId=u.get('id'))
+ if id in ids:
+ self.module.fail_json(msg="User '%s' is duplicate." % user)
+ ids.append(id)
+
+ if 'admin' not in users:
+ ids.append(dict(userId="0000ffff0000000000000020"))
+ return ids
+
+ def create_label(self, label, label_type):
+ ''' Create a new label '''
+ return self.request('labels', method='POST', data=dict(displayName=label, type=label_type))
+
+ def lookup_labels(self, labels, label_type):
+ ''' Look up labels and return their ids (create if necessary) '''
+ if labels is None:
+ return None
+
+ ids = []
+ for label in labels:
+ label_obj = self.get_obj('labels', displayName=label)
+ if not label_obj:
+ label_obj = self.create_label(label, label_type)
+ if 'id' not in label_obj:
+ self.module.fail_json(msg="Label lookup failed for label '%s': %s" % (label, label_obj))
+ ids.append(label_obj.get('id'))
+ return ids
+
+ def anp_ref(self, **data):
+ ''' Create anpRef string '''
+ return '/schemas/{schema_id}/templates/{template}/anps/{anp}'.format(**data)
+
+ def epg_ref(self, **data):
+ ''' Create epgRef string '''
+ return '/schemas/{schema_id}/templates/{template}/anps/{anp}/epgs/{epg}'.format(**data)
+
+ def bd_ref(self, **data):
+ ''' Create bdRef string '''
+ return '/schemas/{schema_id}/templates/{template}/bds/{bd}'.format(**data)
+
+ def contract_ref(self, **data):
+ ''' Create contractRef string '''
+ # Support the contract argspec
+ if 'name' in data:
+ data['contract'] = data.get('name')
+ return '/schemas/{schema_id}/templates/{template}/contracts/{contract}'.format(**data)
+
+ def filter_ref(self, **data):
+ ''' Create a filterRef string '''
+ return '/schemas/{schema_id}/templates/{template}/filters/{filter}'.format(**data)
+
+ def vrf_ref(self, **data):
+ ''' Create vrfRef string '''
+ return '/schemas/{schema_id}/templates/{template}/vrfs/{vrf}'.format(**data)
+
+ def ext_epg_ref(self, **data):
+ ''' Create extEpgRef string '''
+ return '/schemas/{schema_id}/templates/{template}/externalEpgs/{external_epg}'.format(**data)
+
+ def vrf_dict_from_ref(self, data):
+ vrf_ref_regex = re.compile(r'\/schemas\/(.*)\/templates\/(.*)\/vrfs\/(.*)')
+ vrf_dict = vrf_ref_regex.search(data)
+ return {
+ 'vrfName': vrf_dict.group(3),
+ 'schemaId': vrf_dict.group(1),
+ 'templateName': vrf_dict.group(2),
+ }
+
+ def dict_from_ref(self, data):
+ if data and data != '':
+ ref_regex = re.compile(r'\/schemas\/(.*)\/templates\/(.*)\/(.*)\/(.*)')
+ dic = ref_regex.search(data)
+ if dic is not None:
+ schema_id = dic.group(1)
+ template_name = dic.group(2)
+ category = dic.group(3)
+ name = dic.group(4)
+ uri_map = {
+ 'vrfs': ['vrfName', 'schemaId', 'templateName'],
+ 'bds': ['bdName', 'schemaId', 'templateName'],
+ 'filters': ['filterName', 'schemaId', 'templateName'],
+ 'contracts': ['contractName', 'schemaId', 'templateName'],
+ 'l3outs': ['l3outName', 'schemaId', 'templateName'],
+ 'anps': ['anpName', 'schemaId', 'templateName'],
+ }
+ result = {
+ uri_map[category][0]: name,
+ uri_map[category][1]: schema_id,
+ uri_map[category][2]: template_name,
+ }
+ return result
+ else:
+ self.module.fail_json(msg="There was no group in search: {data}".format(data=data))
+
+ def make_reference(self, data, reftype, schema_id, template):
+ ''' Create a reference from a dictionary '''
+ # Removes entry from payload
+ if data is None:
+ return None
+
+ if data.get('schema') is not None:
+ schema_obj = self.get_obj('schemas', displayName=data.get('schema'))
+ if not schema_obj:
+ self.fail_json(msg="Referenced schema '{schema}' in {reftype}ref does not exist".format(reftype=reftype, **data))
+ schema_id = schema_obj.get('id')
+
+ if data.get('template') is not None:
+ template = data.get('template')
+
+ refname = '%sName' % reftype
+
+ return {
+ refname: data.get('name'),
+ 'schemaId': schema_id,
+ 'templateName': template,
+ }
+
+ def make_subnets(self, data):
+ ''' Create a subnets list from input '''
+ if data is None:
+ return None
+
+ subnets = []
+ for subnet in data:
+ if 'subnet' in subnet:
+ subnet['ip'] = subnet.get('subnet')
+ if subnet.get('description') is None:
+ subnet['description'] = subnet.get('subnet')
+ subnets.append(dict(
+ ip=subnet.get('ip'),
+ description=str(subnet.get('description')),
+ scope=subnet.get('scope'),
+ shared=subnet.get('shared'),
+ noDefaultGateway=subnet.get('no_default_gateway'),
+ querier=subnet.get('querier'),
+ ))
+
+ return subnets
+
+ def make_dhcp_label(self, data):
+ ''' Create a DHCP policy from input '''
+ if data is None:
+ return None
+ if 'version' in data:
+ data['version'] = int(data.get('version'))
+ if data and 'dhcp_option_policy' in data:
+ dhcp_option_policy = data.get('dhcp_option_policy')
+ if dhcp_option_policy is not None and 'version' in dhcp_option_policy:
+ dhcp_option_policy['version'] = int(dhcp_option_policy.get('version'))
+ data['dhcpOptionLabel'] = dhcp_option_policy
+ del data['dhcp_option_policy']
+ return data
+
+ def sanitize(self, updates, collate=False, required=None, unwanted=None):
+ ''' Clean up unset keys from a request payload '''
+ if required is None:
+ required = []
+ if unwanted is None:
+ unwanted = []
+ self.proposed = deepcopy(self.existing)
+ self.sent = deepcopy(self.existing)
+
+ for key in self.existing:
+ # Remove References
+ if key.endswith('Ref'):
+ del(self.proposed[key])
+ del(self.sent[key])
+ continue
+
+ # Removed unwanted keys
+ elif key in unwanted:
+ del(self.proposed[key])
+ del(self.sent[key])
+ continue
+
+ # Clean up self.sent
+ for key in updates:
+ # Always retain 'id'
+ if key in required:
+ if key in self.existing or updates.get(key) is not None:
+ self.sent[key] = updates.get(key)
+ continue
+
+ # Remove unspecified values
+ elif not collate and updates.get(key) is None:
+ if key in self.existing:
+ del(self.sent[key])
+ continue
+
+ # Remove identical values
+ elif not collate and updates.get(key) == self.existing.get(key):
+ del(self.sent[key])
+ continue
+
+ # Add everything else
+ if updates.get(key) is not None:
+ self.sent[key] = updates.get(key)
+
+ # Update self.proposed
+ self.proposed.update(self.sent)
+
+ def exit_json(self, **kwargs):
+ ''' Custom written method to exit from module. '''
+
+ if self.params.get('state') in ('absent', 'present', 'upload', 'restore', 'download', 'move'):
+ if self.params.get('output_level') in ('debug', 'info'):
+ self.result['previous'] = self.previous
+ # FIXME: Modified header only works for PATCH
+ if not self.has_modified and self.previous != self.existing:
+ self.result['changed'] = True
+ if self.stdout:
+ self.result['stdout'] = self.stdout
+
+ # Return the gory details when we need it
+ if self.params.get('output_level') == 'debug':
+ self.result['method'] = self.method
+ self.result['response'] = self.response
+ self.result['status'] = self.status
+ self.result['url'] = self.url
+
+ if self.params.get('state') in ('absent', 'present'):
+ self.result['sent'] = self.sent
+ self.result['proposed'] = self.proposed
+
+ self.result['current'] = self.existing
+
+ if self.module._diff and self.result.get('changed') is True:
+ self.result['diff'] = dict(
+ before=self.previous,
+ after=self.existing,
+ )
+
+ self.result.update(**kwargs)
+ self.module.exit_json(**self.result)
+
+ def fail_json(self, msg, **kwargs):
+ ''' Custom written method to return info on failure. '''
+
+ if self.params.get('state') in ('absent', 'present'):
+ if self.params.get('output_level') in ('debug', 'info'):
+ self.result['previous'] = self.previous
+ # FIXME: Modified header only works for PATCH
+ if not self.has_modified and self.previous != self.existing:
+ self.result['changed'] = True
+ if self.stdout:
+ self.result['stdout'] = self.stdout
+
+ # Return the gory details when we need it
+ if self.params.get('output_level') == 'debug':
+ if self.url is not None:
+ self.result['method'] = self.method
+ self.result['response'] = self.response
+ self.result['status'] = self.status
+ self.result['url'] = self.url
+
+ if self.params.get('state') in ('absent', 'present'):
+ self.result['sent'] = self.sent
+ self.result['proposed'] = self.proposed
+
+ self.result['current'] = self.existing
+
+ self.result.update(**kwargs)
+ self.module.fail_json(msg=msg, **self.result)
+
+ def check_changed(self):
+ ''' Check if changed by comparing new values from existing'''
+ existing = self.existing
+ if 'password' in existing:
+ existing['password'] = self.sent.get('password')
+ return not issubset(self.sent, existing)
+
+ def update_filter_obj(self, contract_obj, filter_obj, filter_type, contract_display_name=None, updateFilterRef=True):
+ ''' update filter with more information '''
+ if updateFilterRef:
+ filter_obj['filterRef'] = self.dict_from_ref(filter_obj.get('filterRef'))
+ if contract_display_name:
+ filter_obj['displayName'] = contract_display_name
+ else:
+ filter_obj['displayName'] = contract_obj.get('displayName')
+ filter_obj['filterType'] = filter_type
+ filter_obj['contractScope'] = contract_obj.get('scope')
+ filter_obj['contractFilterType'] = contract_obj.get('filterType')
+ return filter_obj
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_backup.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_backup.py
new file mode 100644
index 00000000..8879b253
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_backup.py
@@ -0,0 +1,311 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_backup
+short_description: Manages backups
+description:
+- Manage backups on Cisco ACI Multi-Site.
+author:
+- Shreyas Srish (@shrsr)
+options:
+ location_type:
+ description:
+ - The type of location for the backup to be stored
+ type: str
+ choices: [ local, remote]
+ default: local
+ backup:
+ description:
+ - The name given to the backup
+ type: str
+ aliases: [ name ]
+ remote_location:
+ description:
+ - The remote location's name for the backup to be stored
+ type: str
+ remote_path:
+ description:
+ - This path is relative to the remote location.
+ - A '/' is automatically added between the remote location folder and this path.
+ - This folder structure should already exist on the remote location.
+ type: str
+ description:
+ description:
+ - Brief information about the backup.
+ type: str
+ destination:
+ description:
+ - Location where to download the backup to
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ - Use C(upload) for uploading backup.
+ - Use C(restore) for restoring backup.
+ - Use C(download) for downloading backup.
+ - Use C(move) for moving backup from local to remote location.
+ type: str
+ choices: [ absent, present, query, upload, restore, download, move ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Create a new local backup
+ cisco.mso.mso_backup:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ backup: Backup
+ description: via Ansible
+ location_type: local
+ state: present
+ delegate_to: localhost
+
+- name: Create a new remote backup
+ cisco.mso.mso_backup:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ backup: Backup
+ description: via Ansible
+ location_type: remote
+ remote_location: ansible_test
+ state: present
+ delegate_to: localhost
+
+- name: Move backup to remote location
+ cisco.mso.mso_backup:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ backup: Backup0
+ remote_location: ansible_test
+ remote_path: test
+ state: move
+ delegate_to: localhost
+
+- name: Download a backup
+ cisco.mso.mso_backup:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ backup: Backup
+ destination: ./
+ state: download
+ delegate_to: localhost
+
+- name: Upload a backup
+ cisco.mso.mso_backup:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ backup: ./Backup
+ state: upload
+ delegate_to: localhost
+
+- name: Restore a backup
+ cisco.mso.mso_backup:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ backup: Backup
+ state: restore
+ delegate_to: localhost
+
+- name: Remove a Backup
+ cisco.mso.mso_backup:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ backup: Backup
+ state: absent
+ delegate_to: localhost
+
+- name: Query a backup
+ cisco.mso.mso_backup:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ backup: Backup
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query a backup with its complete name
+ cisco.mso.mso_backup:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ backup: Backup_20200721220043
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all backups
+ cisco.mso.mso_backup:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+import os
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ location_type=dict(type='str', default='local', choices=['local', 'remote']),
+ description=dict(type='str'),
+ backup=dict(type='str', aliases=['name']),
+ remote_location=dict(type='str'),
+ remote_path=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query', 'upload', 'restore', 'download', 'move']),
+ destination=dict(type='str')
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['location_type', 'remote', ['remote_location']],
+ ['state', 'absent', ['backup']],
+ ['state', 'present', ['backup']],
+ ['state', 'upload', ['backup']],
+ ['state', 'restore', ['backup']],
+ ['state', 'download', ['backup', 'destination']],
+ ['state', 'move', ['backup', 'remote_location', 'remote_path']]
+ ]
+ )
+
+ description = module.params.get('description')
+ location_type = module.params.get('location_type')
+ state = module.params.get('state')
+ backup = module.params.get('backup')
+ remote_location = module.params.get('remote_location')
+ remote_path = module.params.get('remote_path')
+ destination = module.params.get('destination')
+
+ mso = MSOModule(module)
+
+ backup_names = []
+ mso.existing = mso.query_objs('backups/backupRecords', key='backupRecords')
+ if backup:
+ if mso.existing:
+ data = mso.existing
+ mso.existing = []
+ for backup_info in data:
+ if backup == backup_info.get('name').split('_')[0] or backup == backup_info.get('name'):
+ mso.existing.append(backup_info)
+ backup_names.append(backup_info.get('name'))
+
+ if state == 'query':
+ mso.exit_json()
+
+ elif state == 'absent':
+ mso.previous = mso.existing
+ if len(mso.existing) > 1:
+ mso.module.fail_json(msg="Multiple backups with same name found. Existing backups with similar names: {0}".format(', '.join(backup_names)))
+ elif len(mso.existing) == 1:
+ if module.check_mode:
+ mso.existing = {}
+ else:
+ mso.existing = mso.request('backups/backupRecords/{id}'.format(id=mso.existing[0].get('id')), method='DELETE')
+ mso.exit_json()
+
+ elif state == 'present':
+ mso.previous = mso.existing
+
+ payload = dict(
+ name=backup,
+ description=description,
+ locationType=location_type
+ )
+
+ if location_type == 'remote':
+ remote_location_info = mso.lookup_remote_location(remote_location)
+ payload.update(remoteLocationId=remote_location_info.get('id'))
+ if remote_path:
+ remote_path = '{0}/{1}'.format(remote_location_info.get('path'), remote_path)
+ payload.update(remotePath=remote_path)
+
+ mso.proposed = payload
+
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request('backups', method='POST', data=payload)
+ mso.exit_json()
+
+ elif state == 'upload':
+ mso.previous = mso.existing
+
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ try:
+ payload = dict(name=(os.path.basename(backup), open(backup, 'rb'), 'application/x-gzip'))
+ mso.existing = mso.request_upload('backups/upload', fields=payload)
+ except Exception:
+ mso.module.fail_json(msg="Backup file '{0}' not found!".format(', '.join(backup.split('/')[-1:])))
+ mso.exit_json()
+
+ if len(mso.existing) == 0:
+ mso.module.fail_json(msg="Backup '{0}' does not exist".format(backup))
+ elif len(mso.existing) > 1:
+ mso.module.fail_json(msg="Multiple backups with same name found. Existing backups with similar names: {0}".format(', '.join(backup_names)))
+
+ elif state == 'restore':
+ mso.previous = mso.existing
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request('backups/{id}/restore'.format(id=mso.existing[0].get('id')), method='PUT')
+
+ elif state == 'download':
+ mso.previous = mso.existing
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request_download('backups/{id}/download'.format(id=mso.existing[0].get('id')), destination=destination)
+
+ elif state == 'move':
+ mso.previous = mso.existing
+ remote_location_info = mso.lookup_remote_location(remote_location)
+ remote_path = '{0}/{1}'.format(remote_location_info.get('path'), remote_path)
+ payload = dict(
+ remoteLocationId=remote_location_info.get('id'),
+ remotePath=remote_path,
+ backupRecordId=mso.existing[0].get('id')
+ )
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request('backups/remote-location', method='POST', data=payload)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_option_policy.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_option_policy.py
new file mode 100644
index 00000000..843317ec
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_option_policy.py
@@ -0,0 +1,167 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2020, Jorge Gomez (@jgomezve) <jgomezve@cisco.com> (based on mso_dhcp_relay_policy module)
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ "metadata_version": "1.1",
+ "status": ["preview"],
+ "supported_by": "community",
+}
+
+DOCUMENTATION = r"""
+---
+module: mso_dhcp_option_policy
+short_description: Manage DHCP Option policies.
+description:
+- Manage DHCP Option policies on Cisco Multi-Site Orchestrator.
+author:
+- Lionel Hercot (@lhercot)
+options:
+ dhcp_option_policy:
+ description:
+ - Name of the DHCP Option Policy
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - Description of the DHCP Option Policy
+ type: str
+ tenant:
+ description:
+ - Tenant where the DHCP Option Policy is located.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+"""
+
+EXAMPLES = r"""
+- name: Add a new DHCP Option Policy
+ cisco.mso.mso_dhcp_option_policy:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_option_policy: my_test_dhcp_policy
+ description: "My Test DHCP Policy"
+ tenant: ansible_test
+ state: present
+ delegate_to: localhost
+
+- name: Remove DHCP Option Policy
+ cisco.mso.mso_dhcp_option_policy:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_option_policy: my_test_dhcp_policy
+ state: absent
+ delegate_to: localhost
+
+- name: Query a DHCP Option Policy
+ cisco.mso.mso_dhcp_option_policy:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_option_policy: my_test_dhcp_policy
+ state: query
+ delegate_to: localhost
+
+- name: Query all DHCP Option Policies
+ cisco.mso.mso_dhcp_option_policy:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+"""
+
+RETURN = r"""
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ dhcp_option_policy=dict(type="str", aliases=['name']),
+ description=dict(type="str"),
+ tenant=dict(type="str"),
+ state=dict(type="str", default="present", choices=["absent", "present", "query"]),
+ )
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['dhcp_option_policy']],
+ ['state', 'present', ['dhcp_option_policy', 'tenant']],
+ ],
+ )
+
+ dhcp_option_policy = module.params.get("dhcp_option_policy")
+ description = module.params.get("description")
+ tenant = module.params.get("tenant")
+ state = module.params.get("state")
+
+ mso = MSOModule(module)
+
+ path = "policies/dhcp/option"
+
+ # Query for existing object(s)
+ if dhcp_option_policy:
+ mso.existing = mso.get_obj(path, name=dhcp_option_policy, key="DhcpRelayPolicies")
+ if mso.existing:
+ policy_id = mso.existing.get("id")
+ # If we found an existing object, continue with it
+ path = '{0}/{1}'.format(path, policy_id)
+ else:
+ mso.existing = mso.query_objs(path, key="DhcpRelayPolicies")
+
+ mso.previous = mso.existing
+
+ if state == "absent":
+ if mso.existing:
+ if module.check_mode:
+ mso.existing = {}
+ else:
+ mso.existing = mso.request(path, method="DELETE", data=mso.sent)
+
+ elif state == "present":
+ tenant_id = mso.lookup_tenant(tenant)
+ payload = dict(
+ name=dhcp_option_policy,
+ desc=description,
+ policyType="dhcp",
+ policySubtype="option",
+ tenantId=tenant_id,
+ )
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ if mso.check_changed():
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method="PUT", data=mso.sent)
+ else:
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method="POST", data=mso.sent)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_option_policy_option.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_option_policy_option.py
new file mode 100644
index 00000000..91cf3ad8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_option_policy_option.py
@@ -0,0 +1,193 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2020, Jorge Gomez (@jgomezve) <jgomezve@cisco.com> (based on mso_dhcp_relay_policy module)
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ "metadata_version": "1.1",
+ "status": ["preview"],
+ "supported_by": "community",
+}
+
+DOCUMENTATION = r"""
+---
+module: mso_dhcp_option_policy_option
+short_description: Manage DHCP options in a DHCP Option policy.
+description:
+- Manage DHCP options in a DHCP Option policy on Cisco Multi-Site Orchestrator.
+author:
+- Lionel Hercot (@lhercot)
+options:
+ dhcp_option_policy:
+ description:
+ - Name of the DHCP Option Policy
+ type: str
+ required: yes
+ aliases: [ name ]
+ name:
+ description:
+ - Name of the option in the DHCP Option Policy
+ type: str
+ aliases: [ option ]
+ id:
+ description:
+ - Id of the option in the DHCP Option Policy
+ type: int
+ data:
+ description:
+ - Data of the DHCP option in the DHCP Option Policy
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+"""
+
+EXAMPLES = r"""
+- name: Add a new option to a DHCP Option Policy
+ cisco.mso.mso_dhcp_option_policy_option:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_option_policy: my_test_dhcp_policy
+ name: ansible_test
+ id: 1
+ data: Data stored in the option
+ state: present
+ delegate_to: localhost
+
+- name: Remove a option to a DHCP Option Policy
+ cisco.mso.mso_dhcp_option_policy_option:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_option_policy: my_test_dhcp_policy
+ name: ansible_test
+ state: absent
+ delegate_to: localhost
+
+- name: Query a option to a DHCP Option Policy
+ cisco.mso.mso_dhcp_option_policy_option:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_option_policy: my_test_dhcp_policy
+ name: ansible_test
+ state: query
+ delegate_to: localhost
+
+- name: Query all option of a DHCP Option Policy
+ cisco.mso.mso_dhcp_option_policy_option:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_option_policy: my_test_dhcp_policy
+ state: query
+ delegate_to: localhost
+"""
+
+RETURN = r"""
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import (
+ MSOModule,
+ mso_argument_spec,
+)
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ dhcp_option_policy=dict(type="str", required=True),
+ name=dict(type="str", aliases=['option']),
+ id=dict(type="int"),
+ data=dict(type="str"),
+ state=dict(type="str", default="present", choices=["absent", "present", "query"]),
+ )
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ["state", "present", ["name", "id", "data"]],
+ ["state", "absent", ["name"]],
+ ],
+ )
+
+ dhcp_option_policy = module.params.get("dhcp_option_policy")
+ option_id = module.params.get("id")
+ name = module.params.get("name")
+ data = module.params.get("data")
+ state = module.params.get("state")
+
+ mso = MSOModule(module)
+
+ path = "policies/dhcp/option"
+
+ option_index = None
+ previous_option = {}
+
+ # Query for existing object(s)
+ dhcp_option_obj = mso.get_obj(path, name=dhcp_option_policy, key="DhcpRelayPolicies")
+ if 'id' not in dhcp_option_obj:
+ mso.fail_json(msg="DHCP Option Policy '{0}' is not a valid DHCP Option Policy name.".format(dhcp_option_policy))
+ policy_id = dhcp_option_obj.get("id")
+ options = []
+ if "dhcpOption" in dhcp_option_obj:
+ options = dhcp_option_obj.get('dhcpOption')
+ for index, opt in enumerate(options):
+ if opt.get('name') == name:
+ previous_option = opt
+ option_index = index
+
+ # If we found an existing object, continue with it
+ path = '{0}/{1}'.format(path, policy_id)
+
+ if state == "query":
+ mso.existing = options
+ if name is not None:
+ mso.existing = previous_option
+ mso.exit_json()
+
+ mso.previous = previous_option
+ if state == "absent":
+ option = {}
+ if previous_option and option_index is not None:
+ options.pop(option_index)
+
+ elif state == "present":
+ option = dict(
+ id=str(option_id),
+ name=name,
+ data=data,
+ )
+ if option_index is not None:
+ options[option_index] = option
+ else:
+ options.append(option)
+
+ if module.check_mode:
+ mso.existing = option
+ else:
+ mso.existing = dhcp_option_obj
+ dhcp_option_obj["dhcpOption"] = options
+ mso.sanitize(dhcp_option_obj, collate=True)
+ new_dhcp_option_obj = mso.request(path, method="PUT", data=mso.sent)
+ mso.existing = {}
+ for index, opt in enumerate(new_dhcp_option_obj.get('dhcpOption')):
+ if opt.get('name') == name:
+ mso.existing = opt
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_relay_policy.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_relay_policy.py
new file mode 100644
index 00000000..d62aa304
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_relay_policy.py
@@ -0,0 +1,166 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Jorge Gomez Velasquez <jgomezve@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ "metadata_version": "1.1",
+ "status": ["preview"],
+ "supported_by": "community",
+}
+
+DOCUMENTATION = r"""
+---
+module: mso_dhcp_relay_policy
+short_description: Manage DHCP Relay policies.
+description:
+- Manage DHCP Relay policies on Cisco Multi-Site Orchestrator.
+author:
+- Jorge Gomez (@jorgegome2307)
+options:
+ dhcp_relay_policy:
+ description:
+ - Name of the DHCP Relay Policy
+ type: str
+ aliases: [ name ]
+ description:
+ description:
+ - Description of the DHCP Relay Policy
+ type: str
+ tenant:
+ description:
+ - Tenant where the DHCP Relay Policy is located.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+"""
+
+EXAMPLES = r"""
+- name: Add a new DHCP Relay Policy
+ cisco.mso.mso_dhcp_relay_policy:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_relay_policy: my_test_dhcp_policy
+ description: "My Test DHCP Policy"
+ tenant: ansible_test
+ state: present
+ delegate_to: localhost
+
+- name: Remove DHCP Relay Policy
+ cisco.mso.mso_dhcp_relay_policy:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_relay_policy: my_test_dhcp_policy
+ state: absent
+ delegate_to: localhost
+
+- name: Query a DHCP Relay Policy
+ cisco.mso.mso_dhcp_relay_policy:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_relay_policy: my_test_dhcp_policy
+ state: query
+ delegate_to: localhost
+
+- name: Query all DHCP Relay Policies
+ cisco.mso.mso_dhcp_relay_policy:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+"""
+
+RETURN = r"""
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ dhcp_relay_policy=dict(type="str", aliases=['name']),
+ description=dict(type="str"),
+ tenant=dict(type="str"),
+ state=dict(type="str", default="present", choices=["absent", "present", "query"]),
+ )
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['dhcp_relay_policy']],
+ ['state', 'present', ['dhcp_relay_policy', 'tenant']],
+ ],
+ )
+
+ dhcp_relay_policy = module.params.get("dhcp_relay_policy")
+ description = module.params.get("description")
+ tenant = module.params.get("tenant")
+ state = module.params.get("state")
+
+ mso = MSOModule(module)
+
+ path = "policies/dhcp/relay"
+
+ # Query for existing object(s)
+ if dhcp_relay_policy:
+ mso.existing = mso.get_obj(path, name=dhcp_relay_policy, key="DhcpRelayPolicies")
+ if mso.existing:
+ policy_id = mso.existing.get("id")
+ # If we found an existing object, continue with it
+ path = '{0}/{1}'.format(path, policy_id)
+ else:
+ mso.existing = mso.query_objs(path, key="DhcpRelayPolicies")
+
+ mso.previous = mso.existing
+
+ if state == "absent":
+ if mso.existing:
+ if module.check_mode:
+ mso.existing = {}
+ else:
+ mso.existing = mso.request(path, method="DELETE", data=mso.sent)
+
+ elif state == "present":
+ tenant_id = mso.lookup_tenant(tenant)
+ payload = dict(
+ name=dhcp_relay_policy,
+ desc=description,
+ policyType="dhcp",
+ policySubtype="relay",
+ tenantId=tenant_id,
+ )
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ if mso.check_changed():
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method="PUT", data=mso.sent)
+ else:
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method="POST", data=mso.sent)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_relay_policy_provider.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_relay_policy_provider.py
new file mode 100644
index 00000000..8454a50b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_dhcp_relay_policy_provider.py
@@ -0,0 +1,254 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Jorge Gomez Velasquez <jgomezve@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+ANSIBLE_METADATA = {
+ "metadata_version": "1.1",
+ "status": ["preview"],
+ "supported_by": "community",
+}
+
+DOCUMENTATION = r"""
+---
+module: mso_dhcp_relay_policy_provider
+short_description: Manage DHCP providers in a DHCP Relay policy.
+description:
+- Manage DHCP providers in a DHCP Relay policy on Cisco Multi-Site Orchestrator.
+author:
+- Jorge Gomez (@jorgegome2307)
+options:
+ dhcp_relay_policy:
+ description:
+ - Name of the DHCP Relay Policy
+ type: str
+ required: yes
+ aliases: [ name ]
+ ip:
+ description:
+ - IP address of the DHCP Server
+ type: str
+ tenant:
+ description:
+ - Tenant where the DHCP provider is located.
+ type: str
+ schema:
+ description:
+ - Schema where the DHCP provider is configured
+ type: str
+ template:
+ description:
+ - template where the DHCP provider is configured
+ type: str
+ application_profile:
+ description:
+ - Application Profile where the DHCP provider is configured
+ type: str
+ aliases: [ anp ]
+ endpoint_group:
+ description:
+ - EPG where the DHCP provider is configured
+ type: str
+ aliases: [ epg ]
+ external_endpoint_group:
+ description:
+ - External EPG where the DHCP provider is configured
+ type: str
+ aliases: [ ext_epg, external_epg ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+"""
+
+EXAMPLES = r"""
+- name: Add a new provider to a DHCP Relay Policy
+ cisco.mso.mso_dhcp_relay_policy_provider:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_relay_policy: my_test_dhcp_policy
+ tenant: ansible_test
+ schema: ansible_test
+ template: Template 1
+ application_profile: ansible_test
+ endpoint_group: ansible_test
+ state: present
+ delegate_to: localhost
+
+- name: Remove a provider to a DHCP Relay Policy
+ cisco.mso.mso_dhcp_relay_policy_provider:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_relay_policy: my_test_dhcp_policy
+ tenant: ansible_test
+ schema: ansible_test
+ template: Template 1
+ application_profile: ansible_test
+ endpoint_group: ansible_test
+ state: absent
+ delegate_to: localhost
+
+- name: Query a provider to a DHCP Relay Policy
+ cisco.mso.mso_dhcp_relay_policy_provider:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_relay_policy: my_test_dhcp_policy
+ tenant: ansible_test
+ schema: ansible_test
+ template: Template 1
+ application_profile: ansible_test
+ endpoint_group: ansible_test
+ state: query
+ delegate_to: localhost
+
+- name: Query all provider of a DHCP Relay Policy
+ cisco.mso.mso_dhcp_relay_policy_provider:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ dhcp_relay_policy: my_test_dhcp_policy
+ state: query
+ delegate_to: localhost
+"""
+
+RETURN = r"""
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import (
+ MSOModule,
+ mso_argument_spec,
+)
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ dhcp_relay_policy=dict(type="str", required=True, aliases=['name']),
+ ip=dict(type="str"),
+ tenant=dict(type="str"),
+ schema=dict(type="str"),
+ template=dict(type="str"),
+ application_profile=dict(type="str", aliases=['anp']),
+ endpoint_group=dict(type="str", aliases=['epg']),
+ external_endpoint_group=dict(type="str", aliases=['ext_epg', 'external_epg']),
+ state=dict(type="str", default="present", choices=["absent", "present", "query"]),
+ )
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ["state", "present", ["ip", "tenant", "schema", "template"]],
+ ["state", "absent", ["tenant", "schema", "template"]],
+ ],
+ )
+
+ dhcp_relay_policy = module.params.get("dhcp_relay_policy")
+ ip = module.params.get("ip")
+ tenant = module.params.get("tenant")
+ schema = module.params.get("schema")
+ template = module.params.get("template")
+ if template is not None:
+ template = template.replace(' ', '')
+ application_profile = module.params.get("application_profile")
+ endpoint_group = module.params.get("endpoint_group")
+ external_endpoint_group = module.params.get("external_endpoint_group")
+ state = module.params.get("state")
+
+ mso = MSOModule(module)
+
+ path = "policies/dhcp/relay"
+
+ tenant_id = mso.lookup_tenant(tenant)
+ schema_id = mso.lookup_schema(schema)
+
+ provider = dict(
+ addr=ip,
+ externalEpgRef='',
+ epgRef='',
+ l3Ref='',
+ tenantId=tenant_id,
+ )
+ provider_index = None
+ previous_provider = {}
+
+ if application_profile is not None and endpoint_group is not None:
+ provider['epgRef'] = '/schemas/{schemaId}/templates/{templateName}/anps/{app}/epgs/{epg}'.format(
+ schemaId=schema_id, templateName=template, app=application_profile, epg=endpoint_group,
+ )
+ elif external_endpoint_group is not None:
+ provider['externalEpgRef'] = '/schemas/{schemaId}/templates/{templateName}/externalEpgs/{ext_epg}'.format(
+ schemaId=schema_id, templateName=template, ext_epg=external_endpoint_group
+ )
+
+ # Query for existing object(s)
+ dhcp_relay_obj = mso.get_obj(path, name=dhcp_relay_policy, key="DhcpRelayPolicies")
+ if 'id' not in dhcp_relay_obj:
+ mso.fail_json(msg="DHCP Relay Policy '{0}' is not a valid DHCP Relay Policy name.".format(dhcp_relay_policy))
+ policy_id = dhcp_relay_obj.get("id")
+ providers = []
+ if "provider" in dhcp_relay_obj:
+ providers = dhcp_relay_obj.get('provider')
+ for index, prov in enumerate(providers):
+ if (
+ (provider.get('epgRef') != '' and prov.get('epgRef') == provider.get('epgRef'))
+ or (provider.get('externalEpgRef') != '' and prov.get('externalEpgRef') == provider.get('externalEpgRef'))
+ ):
+ previous_provider = prov
+ provider_index = index
+
+ # If we found an existing object, continue with it
+ path = '{0}/{1}'.format(path, policy_id)
+
+ if state == "query":
+ mso.existing = providers
+ if endpoint_group is not None or external_endpoint_group is not None:
+ mso.existing = previous_provider
+ mso.exit_json()
+
+ if endpoint_group is None and external_endpoint_group is None:
+ mso.fail_json(msg="Missing either endpoint_group or external_endpoint_group required attribute.")
+
+ mso.previous = previous_provider
+ if state == "absent":
+ provider = {}
+ if previous_provider:
+ if provider_index is not None:
+ providers.pop(provider_index)
+
+ elif state == "present":
+ if provider_index is not None:
+ providers[provider_index] = provider
+ else:
+ providers.append(provider)
+
+ if module.check_mode:
+ mso.existing = provider
+ else:
+ mso.existing = dhcp_relay_obj
+ dhcp_relay_obj["provider"] = providers
+ mso.sanitize(dhcp_relay_obj, collate=True)
+ new_dhcp_relay_obj = mso.request(path, method="PUT", data=mso.sent)
+ mso.existing = {}
+ for index, prov in enumerate(new_dhcp_relay_obj.get('provider')):
+ if (
+ (provider.get('epgRef') != '' and prov.get('epgRef') == provider.get('epgRef'))
+ or (provider.get('externalEpgRef') != '' and prov.get('externalEpgRef') == provider.get('externalEpgRef'))
+ ):
+ mso.existing = prov
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_label.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_label.py
new file mode 100644
index 00000000..f2e1fd6d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_label.py
@@ -0,0 +1,165 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_label
+short_description: Manage labels
+description:
+- Manage labels on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ label:
+ description:
+ - The name of the label.
+ type: str
+ aliases: [ name ]
+ type:
+ description:
+ - The type of the label.
+ type: str
+ choices: [ site ]
+ default: site
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new label
+ cisco.mso.mso_label:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ label: Belgium
+ type: site
+ state: present
+ delegate_to: localhost
+
+- name: Remove a label
+ cisco.mso.mso_label:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ label: Belgium
+ state: absent
+ delegate_to: localhost
+
+- name: Query a label
+ cisco.mso.mso_label:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ label: Belgium
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all labels
+ cisco.mso.mso_label:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ label=dict(type='str', aliases=['name']),
+ type=dict(type='str', default='site', choices=['site']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['label']],
+ ['state', 'present', ['label']],
+ ],
+ )
+
+ label = module.params.get('label')
+ label_type = module.params.get('type')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ label_id = None
+ path = 'labels'
+
+ # Query for existing object(s)
+ if label:
+ mso.existing = mso.get_obj(path, displayName=label)
+ if mso.existing:
+ label_id = mso.existing.get('id')
+ # If we found an existing object, continue with it
+ path = 'labels/{id}'.format(id=label_id)
+ else:
+ mso.existing = mso.query_objs(path)
+
+ if state == 'query':
+ pass
+
+ elif state == 'absent':
+ mso.previous = mso.existing
+ if mso.existing:
+ if module.check_mode:
+ mso.existing = {}
+ else:
+ mso.existing = mso.request(path, method='DELETE')
+
+ elif state == 'present':
+ mso.previous = mso.existing
+
+ payload = dict(
+ id=label_id,
+ displayName=label,
+ type=label_type,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ if mso.check_changed():
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method='PUT', data=mso.sent)
+ else:
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method='POST', data=mso.sent)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_rest.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_rest.py
new file mode 100644
index 00000000..51c183c3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_rest.py
@@ -0,0 +1,215 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Anvitha Jain (@anvitha-jain) <anvjain@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_rest
+short_description: Direct access to the Cisco MSO REST API
+description:
+- Enables the management of the Cisco MSO fabric through direct access to the Cisco MSO REST API.
+- This module is not idempotent and does not report changes.
+options:
+ method:
+ description:
+ - The HTTP method of the request.
+ - Using C(delete) is typically used for deleting objects.
+ - Using C(get) is typically used for querying objects.
+ - Using C(post) is typically used for modifying objects.
+ - Using C(put) is typically used for modifying existing objects.
+ - Using C(patch) is typically also used for modifying existing objects.
+ type: str
+ choices: [ delete, get, post, put, patch ]
+ default: get
+ aliases: [ action ]
+ path:
+ description:
+ - URI being used to execute API calls.
+ type: str
+ required: yes
+ aliases: [ uri ]
+ content:
+ description:
+ - Sets the payload of the API request directly.
+ - This may be convenient to template simple requests.
+ - For anything complex use the C(template) lookup plugin (see examples).
+ type: raw
+ aliases: [ payload ]
+extends_documentation_fragment:
+- cisco.mso.modules
+
+notes:
+- Most payloads are known not to be idempotent, so be careful when constructing payloads.
+seealso:
+- module: cisco.mso.mso_tenant
+author:
+- Anvitha Jain (@anvitha-jain)
+'''
+
+EXAMPLES = r'''
+- name: Add schema (JSON)
+ cisco.mso.mso_rest:
+ host: mso
+ username: admin
+ password: SomeSecretPassword
+ path: /mso/api/v1/schemas
+ method: post
+ content:
+ {
+ "displayName": "{{ mso_schema | default('ansible_test') }}",
+ "templates": [{
+ "name": "Template_1",
+ "tenantId": "{{ add_tenant.jsondata.id }}",
+ "displayName": "Template_1",
+ "templateSubType": [],
+ "templateType": "stretched-template",
+ "anps": [],
+ "contracts": [],
+ "vrfs": [],
+ "bds": [],
+ "filters": [],
+ "externalEpgs": [],
+ "serviceGraphs": [],
+ "intersiteL3outs": []
+ }],
+ "sites": [],
+ "_updateVersion": 0
+ }
+ delegate_to: localhost
+
+- name: Query schema
+ cisco.mso.mso_rest:
+ host: mso
+ username: admin
+ password: SomeSecretPassword
+ path: /mso/api/v1/schemas
+ method: get
+ delegate_to: localhost
+
+- name: Patch schema (YAML)
+ cisco.mso.mso_rest:
+ host: mso
+ username: admin
+ password: SomeSecretPassword
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: patch
+ content:
+ - op: add
+ path: /templates/Template_1/anps/-
+ value:
+ name: AP2
+ displayName: AP2
+ epgs: []
+ _updateVersion: 0
+ delegate_to: localhost
+
+- name: Add a tenant from a templated payload file from templates
+ cisco.mso.mso_rest:
+ host: mso
+ username: admin
+ password: SomeSecretPassword
+ method: post
+ path: /api/v1/tenants
+ content: "{{ lookup('template', 'mso/tenant.json.j2') }}"
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+'''
+
+import json
+
+# Optional, only used for YAML validation
+try:
+ import yaml
+ HAS_YAML = True
+except Exception:
+ HAS_YAML = False
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+from ansible.module_utils.urls import fetch_url
+from ansible.module_utils._text import to_text
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ path=dict(type='str', required=True, aliases=['uri']),
+ method=dict(type='str', default='get', choices=['delete', 'get', 'post', 'put', 'patch'], aliases=['action']),
+ content=dict(type='raw', aliases=['payload']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ )
+
+ content = module.params.get('content')
+ path = module.params.get('path')
+
+ mso = MSOModule(module)
+ mso.result['status'] = -1 # Ensure we always return a status
+
+ # Validate content/payload
+ if content and (isinstance(content, dict) or isinstance(content, list)):
+ # Validate inline YAML/JSON
+ content = json.dumps(content)
+ elif content and isinstance(content, str) and HAS_YAML:
+ try:
+ # Validate YAML/JSON string
+ content = json.dumps(yaml.safe_load(content))
+ except Exception as e:
+ module.fail_json(msg='Failed to parse provided JSON/YAML payload: %s' % to_text(e), exception=to_text(e), payload=content)
+
+ # Perform actual request using auth cookie (Same as mso.request())
+ if 'port' in mso.params and mso.params.get('port') is not None:
+ mso.url = '%(protocol)s://%(host)s:%(port)s/' % mso.params + path.lstrip('/')
+ else:
+ mso.url = '%(protocol)s://%(host)s/' % mso.params + path.lstrip('/')
+
+ mso.method = mso.params.get('method').upper()
+
+ # Perform request
+ resp, info = fetch_url(module, mso.url,
+ data=content,
+ headers=mso.headers,
+ method=mso.method,
+ timeout=mso.params.get('timeout'),
+ use_proxy=mso.params.get('use_proxy'))
+
+ mso.response = info.get('msg')
+ mso.status = info.get('status', -1)
+ mso.result['status'] = info.get('status', -1)
+
+ # Report failure
+ if info.get('status') not in [200, 201, 202, 204]:
+ try:
+ # MSO error
+ mso.response_json(info['body'])
+ mso.fail_json(msg='MSO Error %(code)s: %(message)s - %(info)s' % mso.error)
+ except KeyError:
+ # Connection error
+ mso.fail_json(msg='Connection failed for %(url)s. %(msg)s' % info)
+
+ mso.response_json(resp.read())
+
+ if mso.method != 'GET':
+ mso.result['changed'] = True
+
+ mso.result['jsondata'] = mso.jsondata
+
+ # Report success
+ mso.exit_json(**mso.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_role.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_role.py
new file mode 100644
index 00000000..69ad4fe7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_role.py
@@ -0,0 +1,277 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_role
+short_description: Manage roles
+description:
+- Manage roles on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ role:
+ description:
+ - The name of the role.
+ type: str
+ aliases: [ name ]
+ display_name:
+ description:
+ - The name of the role to be displayed in the web UI.
+ type: str
+ description:
+ description:
+ - The description of the role.
+ type: str
+ read_permissions:
+ description:
+ - A list of read permissions tied to this role.
+ type: list
+ elements: str
+ choices:
+ - backup-db
+ - manage-audit-records
+ - manage-labels
+ - manage-roles
+ - manage-schemas
+ - manage-sites
+ - manage-tenants
+ - manage-tenant-schemas
+ - manage-users
+ - platform-logs
+ - view-all-audit-records
+ - view-labels
+ - view-roles
+ - view-schemas
+ - view-sites
+ - view-tenants
+ - view-tenant-schemas
+ - view-users
+ write_permissions:
+ description:
+ - A list of write permissions tied to this role.
+ type: list
+ elements: str
+ aliases: [ permissions ]
+ choices:
+ - backup-db
+ - manage-audit-records
+ - manage-labels
+ - manage-roles
+ - manage-schemas
+ - manage-sites
+ - manage-tenants
+ - manage-tenant-schemas
+ - manage-users
+ - platform-logs
+ - view-all-audit-records
+ - view-labels
+ - view-roles
+ - view-schemas
+ - view-sites
+ - view-tenants
+ - view-tenant-schemas
+ - view-users
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new role
+ cisco.mso.mso_role:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ role: readOnly
+ display_name: Read Only
+ description: Read-only access for troubleshooting
+ read_permissions:
+ - view-roles
+ - view-schemas
+ - view-sites
+ - view-tenants
+ - view-tenant-schemas
+ - view-users
+ write_permissions:
+ - manage-roles
+ - manage-schemas
+ - manage-sites
+ - manage-tenants
+ - manage-tenant-schemas
+ - manage-users
+ state: present
+ delegate_to: localhost
+
+- name: Remove a role
+ cisco.mso.mso_role:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ role: readOnly
+ state: absent
+ delegate_to: localhost
+
+- name: Query a role
+ cisco.mso.mso_role:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ role: readOnly
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all roles
+ cisco.mso.mso_role:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ role=dict(type='str', aliases=['name']),
+ display_name=dict(type='str'),
+ description=dict(type='str'),
+ read_permissions=dict(type='list', elements='str', choices=[
+ 'backup-db',
+ 'manage-audit-records',
+ 'manage-labels',
+ 'manage-roles',
+ 'manage-schemas',
+ 'manage-sites',
+ 'manage-tenants',
+ 'manage-tenant-schemas',
+ 'manage-users',
+ 'platform-logs',
+ 'view-all-audit-records',
+ 'view-labels',
+ 'view-roles',
+ 'view-schemas',
+ 'view-sites',
+ 'view-tenants',
+ 'view-tenant-schemas',
+ 'view-users',
+ ]),
+ write_permissions=dict(type='list', elements='str', aliases=['permissions'], choices=[
+ 'backup-db',
+ 'manage-audit-records',
+ 'manage-labels',
+ 'manage-roles',
+ 'manage-schemas',
+ 'manage-sites',
+ 'manage-tenants',
+ 'manage-tenant-schemas',
+ 'manage-users',
+ 'platform-logs',
+ 'view-all-audit-records',
+ 'view-labels',
+ 'view-roles',
+ 'view-schemas',
+ 'view-sites',
+ 'view-tenants',
+ 'view-tenant-schemas',
+ 'view-users',
+ ]),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['role']],
+ ['state', 'present', ['role']],
+ ],
+ )
+
+ role = module.params.get('role')
+ description = module.params.get('description')
+ read_permissions = module.params.get('read_permissions')
+ write_permissions = module.params.get('write_permissions')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ role_id = None
+ path = 'roles'
+
+ # Query for existing object(s)
+ if role:
+ mso.existing = mso.get_obj(path, name=role)
+ if mso.existing:
+ role_id = mso.existing.get('id')
+ # If we found an existing object, continue with it
+ path = 'roles/{id}'.format(id=role_id)
+ else:
+ mso.existing = mso.query_objs(path)
+
+ if state == 'query':
+ pass
+
+ elif state == 'absent':
+ mso.previous = mso.existing
+ if mso.existing:
+ if module.check_mode:
+ mso.existing = {}
+ else:
+ mso.existing = mso.request(path, method='DELETE')
+
+ elif state == 'present':
+ mso.previous = mso.existing
+
+ payload = dict(
+ id=role_id,
+ name=role,
+ displayName=role,
+ description=description,
+ readPermissions=read_permissions,
+ writePermissions=write_permissions,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ if mso.check_changed():
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method='PUT', data=mso.sent)
+ else:
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method='POST', data=mso.sent)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema.py
new file mode 100644
index 00000000..5cf03aab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema.py
@@ -0,0 +1,133 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema
+short_description: Manage schemas
+description:
+- Manage schemas on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ aliases: [ name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, query ]
+ default: query
+notes:
+- Due to restrictions of the MSO REST API this module cannot create empty schemas (i.e. schemas without templates).
+ Use the M(cisco.mso.mso_schema_template) to automatically create schemas with templates.
+seealso:
+- module: cisco.mso.mso_schema_site
+- module: cisco.mso.mso_schema_template
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Remove schemas
+ cisco.mso.mso_schema:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a schema
+ cisco.mso.mso_schema:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all schemas
+ cisco.mso.mso_schema:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', aliases=['name']),
+ # messages=dict(type='dict'),
+ # associations=dict(type='list'),
+ # health_faults=dict(type='list'),
+ # references=dict(type='dict'),
+ # policy_states=dict(type='list'),
+ state=dict(type='str', default='query', choices=['absent', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['schema']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ schema_id = None
+ path = 'schemas'
+
+ # Query for existing object(s)
+ if schema:
+ mso.existing = mso.get_obj(path, displayName=schema)
+ if mso.existing:
+ schema_id = mso.existing.get('id')
+ path = 'schemas/{id}'.format(id=schema_id)
+ else:
+ mso.existing = mso.query_objs(path)
+
+ if state == 'query':
+ pass
+
+ elif state == 'absent':
+ mso.previous = mso.existing
+ if mso.existing:
+ if module.check_mode:
+ mso.existing = {}
+ else:
+ mso.existing = mso.request(path, method='DELETE')
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site.py
new file mode 100644
index 00000000..5879c168
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site.py
@@ -0,0 +1,200 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site
+short_description: Manage sites in schemas
+description:
+- Manage sites on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+- Shreyas Srish (@shrsr)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site to manage.
+ type: str
+ template:
+ description:
+ - The name of the template.
+ type: str
+ aliases: [ name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_template
+- module: cisco.mso.mso_site
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new site to a schema
+ cisco.mso.mso_schema_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ site: Site1
+ template: Template 1
+ state: present
+ delegate_to: localhost
+
+- name: Remove a site from a schema
+ cisco.mso.mso_schema_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ site: Site1
+ template: Template 1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a schema site
+ cisco.mso.mso_schema_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ site: Site1
+ template: Template 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all schema sites
+ cisco.mso.mso_schema_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', aliases=['name']),
+ template=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['site', 'template']],
+ ['state', 'present', ['site', 'template']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template')
+ if template is not None:
+ template = template.replace(' ', '')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ # Schema exists
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ mso.existing = {}
+ if 'sites' in schema_obj:
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ if template:
+ if (site_id, template) in sites:
+ site_idx = sites.index((site_id, template))
+ site_path = '/sites/{0}'.format(site_idx)
+ mso.existing = schema_obj.get('sites')[site_idx]
+ else:
+ mso.existing = schema_obj.get('sites')
+
+ if state == 'query':
+ if not mso.existing:
+ if template:
+ mso.fail_json(msg="Template '{0}' not found".format(template))
+ else:
+ mso.existing = []
+ mso.exit_json()
+
+ sites_path = '/sites'
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ # Remove existing site
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=site_path))
+
+ elif state == 'present':
+ if not mso.existing:
+ # Add new site
+ payload = dict(
+ siteId=site_id,
+ templateName=template,
+ anps=[],
+ bds=[],
+ contracts=[],
+ externalEpgs=[],
+ intersiteL3outs=[],
+ serviceGraphs=[],
+ vrfs=[],
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ ops.append(dict(op='add', path=sites_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp.py
new file mode 100644
index 00000000..2752e3d2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp.py
@@ -0,0 +1,214 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_anp
+short_description: Manage site-local Application Network Profiles (ANPs) in schema template
+description:
+- Manage site-local ANPs in schema template on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the ANP to manage.
+ type: str
+ aliases: [ name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_site
+- module: cisco.mso.mso_schema_site_anp_epg
+- module: cisco.mso.mso_schema_template_anp
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new site ANP
+ cisco.mso.mso_schema_site_anp:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ state: present
+ delegate_to: localhost
+
+- name: Remove a site ANP
+ cisco.mso.mso_schema_site_anp:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific site ANP
+ cisco.mso.mso_schema_site_anp:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all site ANPs
+ cisco.mso.mso_schema_site_anp:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ anp=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['anp']],
+ ['state', 'present', ['anp']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site/template '{0}-{1}' does not exist. Existing sites/templates: {2}".format(site, template, ', '.join(sites)))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ # Get ANP
+ anp_ref = mso.anp_ref(schema_id=schema_id, template=template, anp=anp)
+ anps = [a.get('anpRef') for a in schema_obj.get('sites')[site_idx]['anps']]
+
+ if anp is not None and anp_ref in anps:
+ anp_idx = anps.index(anp_ref)
+ anp_path = '/sites/{0}/anps/{1}'.format(site_template, anp)
+ mso.existing = schema_obj.get('sites')[site_idx]['anps'][anp_idx]
+
+ if state == 'query':
+ if anp is None:
+ mso.existing = schema_obj.get('sites')[site_idx]['anps']
+ elif not mso.existing:
+ mso.fail_json(msg="ANP '{anp}' not found".format(anp=anp))
+ mso.exit_json()
+
+ anps_path = '/sites/{0}/anps'.format(site_template)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=anp_path))
+
+ elif state == 'present':
+
+ payload = dict(
+ anpRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ anpName=anp,
+ ),
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if not mso.existing:
+ ops.append(dict(op='add', path=anps_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg.py
new file mode 100644
index 00000000..b7fe7fbc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg.py
@@ -0,0 +1,230 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_anp_epg
+short_description: Manage site-local Endpoint Groups (EPGs) in schema template
+description:
+- Manage site-local EPGs in schema template on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the ANP.
+ type: str
+ required: yes
+ epg:
+ description:
+ - The name of the EPG to manage.
+ type: str
+ aliases: [ name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_site_anp
+- module: cisco.mso.mso_schema_site_anp_epg_subnet
+- module: cisco.mso.mso_schema_template_anp_epg
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new site EPG
+ cisco.mso.mso_schema_site_anp_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ state: present
+ delegate_to: localhost
+
+- name: Remove a site EPG
+ cisco.mso.mso_schema_site_anp_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific site EPGs
+ cisco.mso.mso_schema_site_anp_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all site EPGs
+ cisco.mso.mso_schema_site_anp_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ anp=dict(type='str', required=True),
+ epg=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['epg']],
+ ['state', 'present', ['epg']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ epg = module.params.get('epg')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get site
+ site_id = mso.lookup_site(site)
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site/template '{0}-{1}' does not exist. Existing sites/templates: {2}".format(site, template, ', '.join(sites)))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ # Get ANP
+ anp_ref = mso.anp_ref(schema_id=schema_id, template=template, anp=anp)
+ anps = [a.get('anpRef') for a in schema_obj.get('sites')[site_idx]['anps']]
+ if anp_ref not in anps:
+ mso.fail_json(msg="Provided anp '{0}' does not exist. Existing anps: {1}".format(anp, ', '.join(anps)))
+ anp_idx = anps.index(anp_ref)
+
+ # Get EPG
+ epg_ref = mso.epg_ref(schema_id=schema_id, template=template, anp=anp, epg=epg)
+ epgs = [e.get('epgRef') for e in schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs']]
+ if epg is not None and epg_ref in epgs:
+ epg_idx = epgs.index(epg_ref)
+ epg_path = '/sites/{0}/anps/{1}/epgs/{2}'.format(site_template, anp, epg)
+ mso.existing = schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs'][epg_idx]
+
+ if state == 'query':
+ if epg is None:
+ mso.existing = schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs']
+ elif not mso.existing:
+ mso.fail_json(msg="EPG '{epg}' not found".format(epg=epg))
+ mso.exit_json()
+
+ epgs_path = '/sites/{0}/anps/{1}/epgs'.format(site_template, anp)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=epg_path))
+
+ elif state == 'present':
+
+ payload = dict(
+ epgRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ anpName=anp,
+ epgName=epg,
+ ),
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if not mso.existing:
+ ops.append(dict(op='add', path=epgs_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_domain.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_domain.py
new file mode 100644
index 00000000..52d913ae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_domain.py
@@ -0,0 +1,474 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Nirav Katarmal (@nkatarmal-crest) <nirav.katarmal@crestdatasys.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_anp_epg_domain
+short_description: Manage site-local EPG domains in schema template
+description:
+- Manage site-local EPG domains in schema template on Cisco ACI Multi-Site.
+author:
+- Nirav Katarmal (@nkatarmal-crest)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the ANP.
+ type: str
+ required: yes
+ epg:
+ description:
+ - The name of the EPG.
+ type: str
+ required: yes
+ domain_association_type:
+ description:
+ - The type of domain to associate.
+ type: str
+ choices: [ vmmDomain, l3ExtDomain, l2ExtDomain, physicalDomain, fibreChannelDomain ]
+ domain_profile:
+ description:
+ - The domain profile name.
+ type: str
+ deployment_immediacy:
+ description:
+ - The deployment immediacy of the domain.
+ - C(immediate) means B(Deploy immediate).
+ - C(lazy) means B(deploy on demand).
+ type: str
+ choices: [ immediate, lazy ]
+ resolution_immediacy:
+ description:
+ - Determines when the policies should be resolved and available.
+ - Defaults to C(lazy) when unset during creation.
+ type: str
+ choices: [ immediate, lazy, pre-provision ]
+ micro_seg_vlan_type:
+ description:
+ - Virtual LAN type for microsegmentation. This attribute can only be used with vmmDomain domain association.
+ - vlan is currently the only accepted value.
+ type: str
+ micro_seg_vlan:
+ description:
+ - Virtual LAN for microsegmentation. This attribute can only be used with vmmDomain domain association.
+ type: int
+ port_encap_vlan_type:
+ description:
+ - Virtual LAN type for port encap. This attribute can only be used with vmmDomain domain association.
+ - vlan is currently the only accepted value.
+ type: str
+ port_encap_vlan:
+ description:
+ - Virtual LAN type for port encap. This attribute can only be used with vmmDomain domain association.
+ type: int
+ vlan_encap_mode:
+ description:
+ - Which VLAN enacap mode to use. This attribute can only be used with vmmDomain domain association.
+ type: str
+ choices: [ static, dynamic ]
+ allow_micro_segmentation:
+ description:
+ - Specifies microsegmentation is enabled or not. This attribute can only be used with vmmDomain domain association.
+ type: bool
+ switch_type:
+ description:
+ - Which switch type to use with this domain association. This attribute can only be used with vmmDomain domain association.
+ type: str
+ switching_mode:
+ description:
+ - Which switching mode to use with this domain association. This attribute can only be used with vmmDomain domain association.
+ type: str
+ enhanced_lagpolicy_name:
+ description:
+ - EPG enhanced lagpolicy name. This attribute can only be used with vmmDomain domain association.
+ type: str
+ enhanced_lagpolicy_dn:
+ description:
+ - Distinguished name of EPG lagpolicy. This attribute can only be used with vmmDomain domain association.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index.
+ This can cause silent corruption on concurrent access when changing/removing on object as
+ the wrong object may be referenced. This module is affected by this deficiency.
+seealso:
+- module: cisco.mso.mso_schema_site_anp_epg
+- module: cisco.mso.mso_schema_template_anp_epg
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new domain to a site EPG
+ cisco.mso.mso_schema_site_anp_epg_domain:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: present
+ delegate_to: localhost
+
+- name: Remove a domain from a site EPG
+ cisco.mso.mso_schema_site_anp_epg_domain:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: absent
+ delegate_to: localhost
+
+- name: Query a domain associated with a specific site EPG
+ cisco.mso.mso_schema_site_anp_epg_domain:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all domains associated with a site EPG
+ cisco.mso.mso_schema_site_anp_epg_domain:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ anp=dict(type='str', required=True),
+ epg=dict(type='str', required=True),
+ domain_association_type=dict(type='str', choices=['vmmDomain', 'l3ExtDomain', 'l2ExtDomain', 'physicalDomain', 'fibreChannelDomain']),
+ domain_profile=dict(type='str'),
+ deployment_immediacy=dict(type='str', choices=['immediate', 'lazy']),
+ resolution_immediacy=dict(type='str', choices=['immediate', 'lazy', 'pre-provision']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ micro_seg_vlan_type=dict(type='str'),
+ micro_seg_vlan=dict(type='int'),
+ port_encap_vlan_type=dict(type='str'),
+ port_encap_vlan=dict(type='int'),
+ vlan_encap_mode=dict(type='str', choices=['static', 'dynamic']),
+ allow_micro_segmentation=dict(type='bool'),
+ switch_type=dict(type='str'),
+ switching_mode=dict(type='str'),
+ enhanced_lagpolicy_name=dict(type='str'),
+ enhanced_lagpolicy_dn=dict(type='str'),
+
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['domain_association_type', 'domain_profile', 'deployment_immediacy', 'resolution_immediacy']],
+ ['state', 'present', ['domain_association_type', 'domain_profile', 'deployment_immediacy', 'resolution_immediacy']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ epg = module.params.get('epg')
+ domain_association_type = module.params.get('domain_association_type')
+ domain_profile = module.params.get('domain_profile')
+ deployment_immediacy = module.params.get('deployment_immediacy')
+ resolution_immediacy = module.params.get('resolution_immediacy')
+ state = module.params.get('state')
+ micro_seg_vlan_type = module.params.get('micro_seg_vlan_type')
+ micro_seg_vlan = module.params.get('micro_seg_vlan')
+ port_encap_vlan_type = module.params.get('port_encap_vlan_type')
+ port_encap_vlan = module.params.get('port_encap_vlan')
+ vlan_encap_mode = module.params.get('vlan_encap_mode')
+ allow_micro_segmentation = module.params.get('allow_micro_segmentation')
+ switch_type = module.params.get('switch_type')
+ switching_mode = module.params.get('switching_mode')
+ enhanced_lagpolicy_name = module.params.get('enhanced_lagpolicy_name')
+ enhanced_lagpolicy_dn = module.params.get('enhanced_lagpolicy_dn')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ sites_list = [s.get('siteId') + '/' + s.get('templateName') for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site/siteId/template '{0}/{1}/{2}' does not exist. "
+ "Existing siteIds/templates: {3}".format(site, site_id, template, ', '.join(sites_list)))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ payload = dict()
+ ops = []
+ op_path = ''
+
+ # Get ANP
+ anp_ref = mso.anp_ref(schema_id=schema_id, template=template, anp=anp)
+ anps = [a.get('anpRef') for a in schema_obj['sites'][site_idx]['anps']]
+ anps_in_temp = [a.get('name') for a in schema_obj['templates'][template_idx]['anps']]
+ if anp not in anps_in_temp:
+ mso.fail_json(msg="Provided anp '{0}' does not exist. Existing anps: {1}".format(anp, ', '.join(anps)))
+ else:
+ # Update anp index at template level
+ template_anp_idx = anps_in_temp.index(anp)
+
+ # If anp not at site level but exists at template level
+ if anp_ref not in anps:
+ op_path = '/sites/{0}/anps/-'.format(site_template)
+ payload.update(
+ anpRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ anpName=anp,
+ ),
+ )
+
+ else:
+ # Update anp index at site level
+ anp_idx = anps.index(anp_ref)
+
+ # Get EPG
+ epg_ref = mso.epg_ref(schema_id=schema_id, template=template, anp=anp, epg=epg)
+
+ # If anp exists at site level
+ if 'anpRef' not in payload:
+ epgs = [e.get('epgRef') for e in schema_obj['sites'][site_idx]['anps'][anp_idx]['epgs']]
+
+ # If anp already at site level AND if epg not at site level (or) anp not at site level?
+ if ('anpRef' not in payload and epg_ref not in epgs) or 'anpRef' in payload:
+ epgs_in_temp = [e.get('name') for e in schema_obj['templates'][template_idx]['anps'][template_anp_idx]['epgs']]
+
+ # If EPG not at template level - Fail
+ if epg not in epgs_in_temp:
+ mso.fail_json(msg="Provided EPG '{0}' does not exist. Existing EPGs: {1} epgref {2}".format(epg, ', '.join(epgs_in_temp), epg_ref))
+
+ # EPG at template level but not at site level. Create payload at site level for EPG
+ else:
+
+ new_epg = dict(
+ epgRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ anpName=anp,
+ epgName=epg,
+ )
+ )
+
+ # If anp not in payload then, anp already exists at site level. New payload will only have new EPG payload
+ if 'anpRef' not in payload:
+ op_path = '/sites/{0}/anps/{1}/epgs/-'.format(site_template, anp)
+ payload = new_epg
+ else:
+ # If anp in payload, anp exists at site level. Update payload with EPG payload
+ payload['epgs'] = [new_epg]
+
+ # Update index of EPG at site level
+ else:
+ epg_idx = epgs.index(epg_ref)
+
+ if domain_association_type == 'vmmDomain':
+ domain_dn = 'uni/vmmp-VMware/dom-{0}'.format(domain_profile)
+ elif domain_association_type == 'l3ExtDomain':
+ domain_dn = 'uni/l3dom-{0}'.format(domain_profile)
+ elif domain_association_type == 'l2ExtDomain':
+ domain_dn = 'uni/l2dom-{0}'.format(domain_profile)
+ elif domain_association_type == 'physicalDomain':
+ domain_dn = 'uni/phys-{0}'.format(domain_profile)
+ elif domain_association_type == 'fibreChannelDomain':
+ domain_dn = 'uni/fc-{0}'.format(domain_profile)
+ else:
+ domain_dn = ''
+
+ # Get Domains
+ # If anp at site level and epg is at site level
+ if 'anpRef' not in payload and 'epgRef' not in payload:
+ domains = [dom.get('dn') for dom in schema_obj['sites'][site_idx]['anps'][anp_idx]['epgs'][epg_idx]['domainAssociations']]
+ if domain_dn in domains:
+ domain_idx = domains.index(domain_dn)
+ domain_path = '/sites/{0}/anps/{1}/epgs/{2}/domainAssociations/{3}'.format(site_template, anp, epg, domain_idx)
+ mso.existing = schema_obj['sites'][site_idx]['anps'][anp_idx]['epgs'][epg_idx]['domainAssociations'][domain_idx]
+
+ if state == 'query':
+ if domain_association_type is None or domain_profile is None:
+ mso.existing = schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs'][epg_idx]['domainAssociations']
+ elif not mso.existing:
+ mso.fail_json(msg="Domain association '{domain_association_type}/{domain_profile}' not found".format(
+ domain_association_type=domain_association_type,
+ domain_profile=domain_profile))
+ mso.exit_json()
+
+ domains_path = '/sites/{0}/anps/{1}/epgs/{2}/domainAssociations'.format(site_template, anp, epg)
+ ops = []
+ new_domain = dict(
+ dn=domain_dn,
+ domainType=domain_association_type,
+ deploymentImmediacy=deployment_immediacy,
+ resolutionImmediacy=resolution_immediacy,
+ )
+
+ if domain_association_type == 'vmmDomain':
+ vmmDomainProperties = {}
+ if micro_seg_vlan_type and micro_seg_vlan:
+ microSegVlan = dict(vlanType=micro_seg_vlan_type, vlan=micro_seg_vlan)
+ vmmDomainProperties['microSegVlan'] = microSegVlan
+ elif not micro_seg_vlan_type and micro_seg_vlan:
+ mso.fail_json(msg="micro_seg_vlan_type is required when micro_seg_vlan is provided.")
+ elif micro_seg_vlan_type and not micro_seg_vlan:
+ mso.fail_json(msg="micro_seg_vlan is required when micro_seg_vlan_type is provided.")
+
+ if port_encap_vlan_type and port_encap_vlan:
+ portEncapVlan = dict(vlanType=port_encap_vlan_type, vlan=port_encap_vlan)
+ vmmDomainProperties['portEncapVlan'] = portEncapVlan
+ elif not port_encap_vlan_type and port_encap_vlan:
+ mso.fail_json(msg="port_encap_vlan_type is required when port_encap_vlan is provided.")
+ elif port_encap_vlan_type and not port_encap_vlan:
+ mso.fail_json(msg="port_encap_vlan is required when port_encap_vlan_type is provided.")
+
+ if vlan_encap_mode:
+ vmmDomainProperties['vlanEncapMode'] = vlan_encap_mode
+
+ if allow_micro_segmentation:
+ vmmDomainProperties['allowMicroSegmentation'] = allow_micro_segmentation
+ if switch_type:
+ vmmDomainProperties['switchType'] = switch_type
+ if switching_mode:
+ vmmDomainProperties['switchingMode'] = switching_mode
+
+ if enhanced_lagpolicy_name and enhanced_lagpolicy_dn:
+ enhancedLagPol = dict(name=enhanced_lagpolicy_name, dn=enhanced_lagpolicy_dn)
+ epgLagPol = dict(enhancedLagPol=enhancedLagPol)
+ vmmDomainProperties['epgLagPol'] = epgLagPol
+ elif not enhanced_lagpolicy_name and enhanced_lagpolicy_dn:
+ mso.fail_json(msg="enhanced_lagpolicy_name is required when enhanced_lagpolicy_dn is provided.")
+ elif enhanced_lagpolicy_name and not enhanced_lagpolicy_dn:
+ mso.fail_json(msg="enhanced_lagpolicy_dn is required when enhanced_lagpolicy_name is provided.")
+
+ if vmmDomainProperties:
+ new_domain['vmmDomainProperties'] = vmmDomainProperties
+
+ # If payload is empty, anp and EPG already exist at site level
+ if not payload:
+ op_path = domains_path + '/-'
+ payload = new_domain
+
+ # If payload exists
+ else:
+ # If anp already exists at site level...(AND payload != epg as well?)
+ if 'anpRef' not in payload:
+ payload['domainAssociations'] = [new_domain]
+ else:
+ payload['epgs'][0]['domainAssociations'] = [new_domain]
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=domain_path))
+ elif state == 'present':
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=domain_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=op_path, value=mso.sent))
+
+ mso.existing = new_domain
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_selector.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_selector.py
new file mode 100644
index 00000000..4791c448
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_selector.py
@@ -0,0 +1,398 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_anp_epg_selector
+short_description: Manage site-local EPG selector in schema templates
+description:
+- Manage EPG selector in schema template on Cisco ACI Multi-Site.
+author:
+- Cindy Zhao (@cizhao)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the ANP.
+ type: str
+ required: yes
+ epg:
+ description:
+ - The name of the EPG to manage.
+ type: str
+ required: yes
+ selector:
+ description:
+ - The name of the selector.
+ type: str
+ expressions:
+ description:
+ - Expressions associated to this selector.
+ type: list
+ elements: dict
+ suboptions:
+ type:
+ description:
+ - The type of the expression.
+ - The type is custom or is one of region, zone and ip_address
+ - The type can be zone only when the site is AWS.
+ required: true
+ type: str
+ aliases: [ tag ]
+ operator:
+ description:
+ - The operator associated to the expression.
+ - Operator has_key or does_not_have_key is only available for custom type / tag
+ required: true
+ type: str
+ choices: [ not_in, in, equals, not_equals, has_key, does_not_have_key ]
+ value:
+ description:
+ - The value associated to the expression.
+ - If the operator is in or not_in, the value should be a comma separated string.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_site_anp_epg
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a selector to a site EPG
+ cisco.mso.mso_schema_site_anp_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ site: Site 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ selector: selector_1
+ expressions:
+ - type: expression_1
+ operator: in
+ value: test
+ state: present
+ delegate_to: localhost
+
+- name: Remove a Selector from a site EPG
+ cisco.mso.mso_schema_site_anp_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ site: Site 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ selector: selector_1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific Selector
+ cisco.mso.mso_schema_site_anp_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ site: Site 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ selector: selector_1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all Selectors
+ cisco.mso.mso_schema_site_anp_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ site: Site 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_expression_spec
+
+EXPRESSION_KEYS = {
+ 'ip_address': 'ipAddress',
+ 'region': 'region',
+ 'zone': 'zone',
+}
+
+EXPRESSION_OPERATORS = {
+ 'not_in': 'notIn',
+ 'not_equals': 'notEquals',
+ 'has_key': 'keyExist',
+ 'does_not_have_key': 'keyNotExist',
+ 'in': 'in',
+ 'equals': 'equals',
+}
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ anp=dict(type='str', required=True),
+ epg=dict(type='str', required=True),
+ selector=dict(type='str'),
+ expressions=dict(type='list', elements='dict', options=mso_expression_spec()),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['selector']],
+ ['state', 'present', ['selector']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ epg = module.params.get('epg')
+ selector = module.params.get('selector')
+ expressions = module.params.get('expressions')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get cloud type
+ site_type = mso.get_obj('sites', name=site).get("cloudProviders")[0]
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site-template association '{0}-{1}' does not exist.".format(site, template))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ payload = dict()
+ ops = []
+ op_path = ''
+
+ # Get ANP
+ anp_ref = mso.anp_ref(schema_id=schema_id, template=template, anp=anp)
+ anps = [a.get('anpRef') for a in schema_obj['sites'][site_idx]['anps']]
+ anps_in_temp = [a.get('name') for a in schema_obj['templates'][template_idx]['anps']]
+ if anp not in anps_in_temp:
+ mso.fail_json(msg="Provided anp '{0}' does not exist. Existing anps: {1}".format(anp, ', '.join(anps_in_temp)))
+ else:
+ # Get anp index at template level
+ template_anp_idx = anps_in_temp.index(anp)
+
+ # If anp not at site level but exists at template level
+ if anp_ref not in anps:
+ op_path = '/sites/{0}/anps/-'.format(site_template)
+ payload.update(
+ anpRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ anpName=anp,
+ ),
+ )
+
+ else:
+ # Get anp index at site level
+ anp_idx = anps.index(anp_ref)
+
+ # Get EPG
+ epg_ref = mso.epg_ref(schema_id=schema_id, template=template, anp=anp, epg=epg)
+
+ # If anp exists at site level
+ if 'anpRef' not in payload:
+ epgs = [e.get('epgRef') for e in schema_obj['sites'][site_idx]['anps'][anp_idx]['epgs']]
+
+ # If anp already at site level AND if epg not at site level (or) anp not at site level?
+ if ('anpRef' not in payload and epg_ref not in epgs) or 'anpRef' in payload:
+ epgs_in_temp = [e.get('name') for e in schema_obj['templates'][template_idx]['anps'][template_anp_idx]['epgs']]
+
+ # If EPG not at template level - Fail
+ if epg not in epgs_in_temp:
+ mso.fail_json(msg="Provided EPG '{0}' does not exist. Existing EPGs: {1}".format(epg, ', '.join(epgs_in_temp)))
+
+ # EPG at template level but not at site level. Create payload at site level for EPG
+ else:
+
+ new_epg = dict(
+ epgRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ anpName=anp,
+ epgName=epg,
+ )
+ )
+
+ # If anp not in payload then, anp already exists at site level. New payload will only have new EPG payload
+ if 'anpRef' not in payload:
+ op_path = '/sites/{0}/anps/{1}/epgs/-'.format(site_template, anp)
+ payload = new_epg
+ else:
+ # If anp in payload, anp exists at site level. Update payload with EPG payload
+ payload['epgs'] = [new_epg]
+
+ # Get index of EPG at site level
+ else:
+ epg_idx = epgs.index(epg_ref)
+
+ # Get selectors
+ # If anp at site level and epg is at site level
+ if 'anpRef' not in payload and 'epgRef' not in payload:
+ if selector and " " in selector:
+ mso.fail_json(msg="There should not be any space in selector name.")
+ selectors = [s.get('name') for s in schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs'][epg_idx]['selectors']]
+ if selector in selectors:
+ selector_idx = selectors.index(selector)
+ selector_path = '/sites/{0}/anps/{1}/epgs/{2}/selectors/{3}'.format(site_template, anp, epg, selector_idx)
+ mso.existing = schema_obj['sites'][site_idx]['anps'][anp_idx]['epgs'][epg_idx]['selectors'][selector_idx]
+
+ if state == 'query':
+ if 'anpRef' in payload:
+ mso.fail_json(msg="Anp '{anp}' does not exist in site level.".format(anp=anp))
+ if 'epgRef' in payload:
+ mso.fail_json(msg="Epg '{epg}' does not exist in site level.".format(epg=epg))
+ if selector is None:
+ mso.existing = schema_obj['sites'][site_idx]['anps'][anp_idx]['epgs'][epg_idx]['selectors']
+ elif not mso.existing:
+ mso.fail_json(msg="Selector '{selector}' not found".format(selector=selector))
+ mso.exit_json()
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=selector_path))
+ elif state == 'present':
+ # Get expressions
+ all_expressions = []
+ if expressions:
+ for expression in expressions:
+ type = expression.get('type')
+ operator = expression.get('operator')
+ value = expression.get('value')
+ if " " in type:
+ mso.fail_json(msg="There should not be any space in 'type' attribute of expression '{0}'".format(type))
+ if operator in ["has_key", "does_not_have_key"] and value:
+ mso.fail_json(
+ msg="Attribute 'value' is not supported for operator '{0}' in expression '{1}'".format(operator, type))
+ if operator in ["not_in", "in", "equals", "not_equals"] and not value:
+ mso.fail_json(
+ msg="Attribute 'value' needed for operator '{0}' in expression '{1}'".format(operator, type))
+ if type in ["region", "zone", "ip_address"]:
+ if type == "zone" and site_type != "aws":
+ mso.fail_json(msg="Type 'zone' is only supported for aws")
+ if operator in ["has_key", "does_not_have_key"]:
+ mso.fail_json(msg="Operator '{0}' is not supported when expression type is '{1}'".format(operator, type))
+ type = EXPRESSION_KEYS.get(type)
+ else:
+ type = 'Custom:' + type
+ all_expressions.append(dict(
+ key=type,
+ operator=EXPRESSION_OPERATORS.get(operator),
+ value=value,
+ ))
+ new_selector = dict(
+ name=selector,
+ expressions=all_expressions,
+ )
+
+ selectors_path = '/sites/{0}/anps/{1}/epgs/{2}/selectors/-'.format(site_template, anp, epg)
+
+ # if payload is empty, anp and epg already exist at site level
+ if not payload:
+ op_path = selectors_path
+ payload = new_selector
+ # if payload exist
+ else:
+ # if anp already exists at site level
+ if 'anpRef' not in payload:
+ payload['selectors'] = [new_selector]
+ else:
+ payload['epgs'][0]['selectors'] = [new_selector]
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=selector_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=op_path, value=mso.sent))
+
+ mso.existing = new_selector
+
+ if not module.check_mode and mso.existing != mso.previous:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_staticleaf.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_staticleaf.py
new file mode 100644
index 00000000..224af40d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_staticleaf.py
@@ -0,0 +1,264 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_anp_epg_staticleaf
+short_description: Manage site-local EPG static leafs in schema template
+description:
+- Manage site-local EPG static leafs in schema template on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the ANP.
+ type: str
+ required: yes
+ epg:
+ description:
+ - The name of the EPG.
+ type: str
+ required: yes
+ pod:
+ description:
+ - The pod of the static leaf.
+ type: str
+ leaf:
+ description:
+ - The path of the static leaf.
+ type: str
+ aliases: [ name ]
+ vlan:
+ description:
+ - The VLAN id of the static leaf.
+ type: int
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index.
+ This can cause silent corruption on concurrent access when changing/removing on object as
+ the wrong object may be referenced. This module is affected by this deficiency.
+seealso:
+- module: cisco.mso.mso_schema_site_anp_epg
+- module: cisco.mso.mso_schema_template_anp_epg
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new static leaf to a site EPG
+ cisco.mso.mso_schema_site_anp_epg_staticleaf:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ leaf: Leaf1
+ vlan: 123
+ state: present
+ delegate_to: localhost
+
+- name: Remove a static leaf from a site EPG
+ cisco.mso.mso_schema_site_anp_epg_staticleaf:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ leaf: Leaf1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific site EPG static leaf
+ cisco.mso.mso_schema_site_anp_epg_staticleaf:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ leaf: Leaf1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all site EPG static leafs
+ cisco.mso.mso_schema_site_anp_epg_staticleaf:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ anp=dict(type='str', required=True),
+ epg=dict(type='str', required=True),
+ pod=dict(type='str'), # This parameter is not required for querying all objects
+ leaf=dict(type='str', aliases=['name']),
+ vlan=dict(type='int'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['pod', 'leaf', 'vlan']],
+ ['state', 'present', ['pod', 'leaf', 'vlan']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ epg = module.params.get('epg')
+ pod = module.params.get('pod')
+ leaf = module.params.get('leaf')
+ vlan = module.params.get('vlan')
+ state = module.params.get('state')
+
+ leafpath = 'topology/{0}/node-{1}'.format(pod, leaf)
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site/template '{0}-{1}' does not exist. Existing sites/templates: {2}".format(site, template, ', '.join(sites)))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ # Get ANP
+ anp_ref = mso.anp_ref(schema_id=schema_id, template=template, anp=anp)
+ anps = [a.get('anpRef') for a in schema_obj.get('sites')[site_idx]['anps']]
+ if anp_ref not in anps:
+ mso.fail_json(msg="Provided anp '{0}' does not exist. Existing anps: {1}".format(anp, ', '.join(anps)))
+ anp_idx = anps.index(anp_ref)
+
+ # Get EPG
+ epg_ref = mso.epg_ref(schema_id=schema_id, template=template, anp=anp, epg=epg)
+ epgs = [e.get('epgRef') for e in schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs']]
+ if epg_ref not in epgs:
+ mso.fail_json(msg="Provided epg '{0}' does not exist. Existing epgs: {1}".format(epg, ', '.join(epgs)))
+ epg_idx = epgs.index(epg_ref)
+
+ # Get Leaf
+ leafs = [(leaf.get('path'), leaf.get('portEncapVlan')) for leaf in schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs'][epg_idx]['staticLeafs']]
+ if (leafpath, vlan) in leafs:
+ leaf_idx = leafs.index((leafpath, vlan))
+ # FIXME: Changes based on index are DANGEROUS
+ leaf_path = '/sites/{0}/anps/{1}/epgs/{2}/staticLeafs/{3}'.format(site_template, anp, epg, leaf_idx)
+ mso.existing = schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs'][epg_idx]['staticLeafs'][leaf_idx]
+
+ if state == 'query':
+ if leaf is None or vlan is None:
+ mso.existing = schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs'][epg_idx]['staticLeafs']
+ elif not mso.existing:
+ mso.fail_json(msg="Static leaf '{leaf}/{vlan}' not found".format(leaf=leaf, vlan=vlan))
+ mso.exit_json()
+
+ leafs_path = '/sites/{0}/anps/{1}/epgs/{2}/staticLeafs'.format(site_template, anp, epg)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=leaf_path))
+
+ elif state == 'present':
+ payload = dict(
+ path=leafpath,
+ portEncapVlan=vlan,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=leaf_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=leafs_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_staticport.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_staticport.py
new file mode 100644
index 00000000..89485df8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_staticport.py
@@ -0,0 +1,448 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_anp_epg_staticport
+short_description: Manage site-local EPG static ports in schema template
+description:
+- Manage site-local EPG static ports in schema template on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the ANP.
+ type: str
+ required: yes
+ epg:
+ description:
+ - The name of the EPG.
+ type: str
+ required: yes
+ type:
+ description:
+ - The path type of the static port
+ - vpc is used for a Virtual Port Channel
+ - dpc is used for a Direct Port Channel
+ - port is used for a single interface
+ type: str
+ choices: [ port, vpc, dpc ]
+ default: port
+ pod:
+ description:
+ - The pod of the static port.
+ type: str
+ leaf:
+ description:
+ - The leaf of the static port.
+ type: str
+ fex:
+ description:
+ - The fex id of the static port.
+ type: str
+ path:
+ description:
+ - The path of the static port.
+ type: str
+ vlan:
+ description:
+ - The port encap VLAN id of the static port.
+ type: int
+ deployment_immediacy:
+ description:
+ - The deployment immediacy of the static port.
+ - C(immediate) means B(Deploy immediate).
+ - C(lazy) means B(deploy on demand).
+ type: str
+ choices: [ immediate, lazy ]
+ default: lazy
+ mode:
+ description:
+ - The mode of the static port.
+ - C(native) means B(Access (802.1p)).
+ - C(regular) means B(Trunk).
+ - C(untagged) means B(Access (untagged)).
+ type: str
+ choices: [ native, regular, untagged ]
+ default: untagged
+ primary_micro_segment_vlan:
+ description:
+ - Primary micro-seg VLAN of static port.
+ type: int
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index.
+ This can cause silent corruption on concurrent access when changing/removing an object as
+ the wrong object may be referenced. This module is affected by this deficiency.
+seealso:
+- module: cisco.mso.mso_schema_site_anp_epg
+- module: cisco.mso.mso_schema_template_anp_epg
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new static port to a site EPG
+ cisco.mso.mso_schema_site_anp_epg_staticport:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ type: port
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ deployment_immediacy: immediate
+ state: present
+ delegate_to: localhost
+
+- name: Add a new static fex port to a site EPG
+ mso_schema_site_anp_epg_staticport:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ type: port
+ pod: pod-1
+ leaf: 101
+ fex: 151
+ path: eth1/1
+ vlan: 126
+ deployment_immediacy: lazy
+ state: present
+ delegate_to: localhost
+
+- name: Add a new static VPC to a site EPG
+ mso_schema_site_anp_epg_staticport:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101-102
+ path: ansible_polgrp
+ vlan: 127
+ type: vpc
+ mode: untagged
+ deployment_immediacy: lazy
+ state: present
+ delegate_to: localhost
+
+- name: Remove a static port from a site EPG
+ cisco.mso.mso_schema_site_anp_epg_staticport:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ type: port
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific site EPG static port
+ cisco.mso.mso_schema_site_anp_epg_staticport:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ type: port
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all site EPG static ports
+ cisco.mso.mso_schema_site_anp_epg_staticport:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ anp=dict(type='str', required=True),
+ epg=dict(type='str', required=True),
+ type=dict(type='str', default='port', choices=['port', 'vpc', 'dpc']),
+ pod=dict(type='str'), # This parameter is not required for querying all objects
+ leaf=dict(type='str'), # This parameter is not required for querying all objects
+ fex=dict(type='str'), # This parameter is not required for querying all objects
+ path=dict(type='str'), # This parameter is not required for querying all objects
+ vlan=dict(type='int'), # This parameter is not required for querying all objects
+ primary_micro_segment_vlan=dict(type='int'), # This parameter is not required for querying all objects
+ deployment_immediacy=dict(type='str', default='lazy', choices=['immediate', 'lazy']),
+ mode=dict(type='str', default='untagged', choices=['native', 'regular', 'untagged']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['type', 'pod', 'leaf', 'path', 'vlan']],
+ ['state', 'present', ['type', 'pod', 'leaf', 'path', 'vlan']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ epg = module.params.get('epg')
+ path_type = module.params.get('type')
+ pod = module.params.get('pod')
+ leaf = module.params.get('leaf')
+ fex = module.params.get('fex')
+ path = module.params.get('path')
+ vlan = module.params.get('vlan')
+ primary_micro_segment_vlan = module.params.get('primary_micro_segment_vlan')
+ deployment_immediacy = module.params.get('deployment_immediacy')
+ mode = module.params.get('mode')
+ state = module.params.get('state')
+
+ if path_type == 'port' and fex is not None:
+ # Select port path for fex if fex param is used
+ portpath = 'topology/{0}/paths-{1}/extpaths-{2}/pathep-[{3}]'.format(pod, leaf, fex, path)
+ elif path_type == 'vpc':
+ portpath = 'topology/{0}/protpaths-{1}/pathep-[{2}]'.format(pod, leaf, path)
+ else:
+ portpath = 'topology/{0}/paths-{1}/pathep-[{2}]'.format(pod, leaf, path)
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ sites_list = [s.get('siteId') + '/' + s.get('templateName') for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site/siteId/template '{0}/{1}/{2}' does not exist. "
+ "Existing siteIds/templates: {3}".format(site, site_id, template, ', '.join(sites_list)))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ payload = dict()
+ ops = []
+ op_path = ''
+
+ # Get ANP
+ anp_ref = mso.anp_ref(schema_id=schema_id, template=template, anp=anp)
+ anps = [a.get('anpRef') for a in schema_obj['sites'][site_idx]['anps']]
+ anps_in_temp = [a.get('name') for a in schema_obj['templates'][template_idx]['anps']]
+ if anp not in anps_in_temp:
+ mso.fail_json(msg="Provided anp '{0}' does not exist. Existing anps: {1}".format(anp, ', '.join(anps)))
+ else:
+ # Update anp index at template level
+ template_anp_idx = anps_in_temp.index(anp)
+
+ # If anp not at site level but exists at template level
+ if anp_ref not in anps:
+ op_path = '/sites/{0}/anps/-'.format(site_template)
+ payload.update(
+ anpRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ anpName=anp,
+ ),
+ )
+
+ else:
+ # Update anp index at site level
+ anp_idx = anps.index(anp_ref)
+
+ # Get EPG
+ epg_ref = mso.epg_ref(schema_id=schema_id, template=template, anp=anp, epg=epg)
+
+ # If anp exists at site level
+ if 'anpRef' not in payload:
+ epgs = [e.get('epgRef') for e in schema_obj['sites'][site_idx]['anps'][anp_idx]['epgs']]
+
+ # If anp already at site level AND if epg not at site level (or) anp not at site level
+ if ('anpRef' not in payload and epg_ref not in epgs) or 'anpRef' in payload:
+ epgs_in_temp = [e.get('name') for e in schema_obj['templates'][template_idx]['anps'][template_anp_idx]['epgs']]
+
+ # If EPG not at template level - Fail
+ if epg not in epgs_in_temp:
+ mso.fail_json(msg="Provided EPG '{0}' does not exist. Existing EPGs: {1} epgref {2}".format(epg, ', '.join(epgs_in_temp), epg_ref))
+
+ # EPG at template level but not at site level. Create payload at site level for EPG
+ else:
+
+ new_epg = dict(
+ epgRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ anpName=anp,
+ epgName=epg,
+ )
+ )
+
+ # If anp not in payload then, anp already exists at site level. New payload will only have new EPG payload
+ if 'anpRef' not in payload:
+ op_path = '/sites/{0}/anps/{1}/epgs/-'.format(site_template, anp)
+ payload = new_epg
+ else:
+ # If anp in payload, anp exists at site level. Update payload with EPG payload
+ payload['epgs'] = [new_epg]
+
+ # Update index of EPG at site level
+ else:
+ epg_idx = epgs.index(epg_ref)
+
+ # Get Leaf
+ # If anp at site level and epg is at site level
+ if 'anpRef' not in payload and 'epgRef' not in payload:
+ portpaths = [p.get('path') for p in schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs'][epg_idx]['staticPorts']]
+ if portpath in portpaths:
+ portpath_idx = portpaths.index(portpath)
+ port_path = '/sites/{0}/anps/{1}/epgs/{2}/staticPorts/{3}'.format(site_template, anp, epg, portpath_idx)
+ mso.existing = schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs'][epg_idx]['staticPorts'][portpath_idx]
+
+ if state == 'query':
+ if leaf is None or vlan is None:
+ mso.existing = schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs'][epg_idx]['staticPorts']
+ elif not mso.existing:
+ mso.fail_json(msg="Static port '{portpath}' not found".format(portpath=portpath))
+ mso.exit_json()
+
+ ports_path = '/sites/{0}/anps/{1}/epgs/{2}/staticPorts'.format(site_template, anp, epg)
+ ops = []
+ new_leaf = dict(
+ deploymentImmediacy=deployment_immediacy,
+ mode=mode,
+ path=portpath,
+ portEncapVlan=vlan,
+ type=path_type,
+ microSegVlan=primary_micro_segment_vlan,
+ )
+
+ # If payload is empty, anp and EPG already exist at site level
+ if not payload:
+ op_path = ports_path + '/-'
+ payload = new_leaf
+
+ # If payload exists
+ else:
+ # If anp already exists at site level
+ if 'anpRef' not in payload:
+ payload['staticPorts'] = [new_leaf]
+ else:
+ payload['epgs'][0]['staticPorts'] = [new_leaf]
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=port_path))
+
+ elif state == 'present':
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=port_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=op_path, value=mso.sent))
+
+ mso.existing = new_leaf
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_subnet.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_subnet.py
new file mode 100644
index 00000000..efc97c1e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_anp_epg_subnet.py
@@ -0,0 +1,293 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_anp_epg_subnet
+short_description: Manage site-local EPG subnets in schema template
+description:
+- Manage site-local EPG subnets in schema template on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the ANP.
+ type: str
+ required: yes
+ epg:
+ description:
+ - The name of the EPG.
+ type: str
+ required: yes
+ subnet:
+ description:
+ - The IP range in CIDR notation.
+ type: str
+ required: true
+ aliases: [ ip ]
+ description:
+ description:
+ - The description of this subnet.
+ type: str
+ scope:
+ description:
+ - The scope of the subnet.
+ type: str
+ default: private
+ choices: [ private, public ]
+ shared:
+ description:
+ - Whether this subnet is shared between VRFs.
+ type: bool
+ no_default_gateway:
+ description:
+ - Whether this subnet has a default gateway.
+ type: bool
+ querier:
+ description:
+ - Whether this subnet is an IGMP querier.
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index.
+ This can cause silent corruption on concurrent access when changing/removing on object as
+ the wrong object may be referenced. This module is affected by this deficiency.
+seealso:
+- module: cisco.mso.mso_schema_site_anp_epg
+- module: cisco.mso.mso_schema_template_anp_epg_subnet
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new subnet to a site EPG
+ cisco.mso.mso_schema_site_anp_epg_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ subnet: 10.0.0.0/24
+ state: present
+ delegate_to: localhost
+
+- name: Remove a subnet from a site EPG
+ cisco.mso.mso_schema_site_anp_epg_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ subnet: 10.0.0.0/24
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific site EPG subnet
+ cisco.mso.mso_schema_site_anp_epg_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ epg: EPG1
+ subnet: 10.0.0.0/24
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all site EPG subnets
+ cisco.mso.mso_schema_site_anp_epg_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ anp: ANP1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_subnet_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ anp=dict(type='str', required=True),
+ epg=dict(type='str', required=True),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+ argument_spec.update(mso_subnet_spec())
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['subnet']],
+ ['state', 'present', ['subnet']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ epg = module.params.get('epg')
+ subnet = module.params.get('subnet')
+ description = module.params.get('description')
+ scope = module.params.get('scope')
+ shared = module.params.get('shared')
+ no_default_gateway = module.params.get('no_default_gateway')
+ querier = module.params.get('querier')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site/template '{0}-{1}' does not exist. Existing sites/templates: {2}".format(site, template, ', '.join(sites)))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ # Get ANP
+ anp_ref = mso.anp_ref(schema_id=schema_id, template=template, anp=anp)
+ anps = [a.get('anpRef') for a in schema_obj.get('sites')[site_idx]['anps']]
+ if anp_ref not in anps:
+ mso.fail_json(msg="Provided anp '{0}' does not exist. Existing anps: {1}".format(anp, ', '.join(anps)))
+ anp_idx = anps.index(anp_ref)
+
+ # Get EPG
+ epg_ref = mso.epg_ref(schema_id=schema_id, template=template, anp=anp, epg=epg)
+ epgs = [e.get('epgRef') for e in schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs']]
+ if epg_ref not in epgs:
+ mso.fail_json(msg="Provided epg '{0}' does not exist. Existing epgs: {1}".format(epg, ', '.join(epgs)))
+ epg_idx = epgs.index(epg_ref)
+
+ # Get Subnet
+ subnets = [s.get('ip') for s in schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs'][epg_idx]['subnets']]
+ if subnet in subnets:
+ subnet_idx = subnets.index(subnet)
+ # FIXME: Changes based on index are DANGEROUS
+ subnet_path = '/sites/{0}/anps/{1}/epgs/{2}/subnets/{3}'.format(site_template, anp, epg, subnet_idx)
+ mso.existing = schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs'][epg_idx]['subnets'][subnet_idx]
+
+ if state == 'query':
+ if subnet is None:
+ mso.existing = schema_obj.get('sites')[site_idx]['anps'][anp_idx]['epgs'][epg_idx]['subnets']
+ elif not mso.existing:
+ mso.fail_json(msg="Subnet '{subnet}' not found".format(subnet=subnet))
+ mso.exit_json()
+
+ subnets_path = '/sites/{0}/anps/{1}/epgs/{2}/subnets'.format(site_template, anp, epg)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=subnet_path))
+
+ elif state == 'present':
+ if not mso.existing:
+ if description is None:
+ description = subnet
+ if scope is None:
+ scope = 'private'
+ if shared is None:
+ shared = False
+ if no_default_gateway is None:
+ no_default_gateway = False
+ if querier is None:
+ querier = False
+
+ payload = dict(
+ ip=subnet,
+ description=description,
+ scope=scope,
+ shared=shared,
+ noDefaultGateway=no_default_gateway,
+ querier=querier,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=subnet_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=subnets_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_bd.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_bd.py
new file mode 100644
index 00000000..538e268b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_bd.py
@@ -0,0 +1,242 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_bd
+short_description: Manage site-local Bridge Domains (BDs) in schema template
+description:
+- Manage site-local BDs in schema template on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ bd:
+ description:
+ - The name of the BD to manage.
+ type: str
+ aliases: [ name ]
+ host_route:
+ description:
+ - Whether host-based routing is enabled.
+ type: bool
+ svi_mac:
+ description:
+ - SVI MAC Address
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_site
+- module: cisco.mso.mso_schema_site_bd_l3out
+- module: cisco.mso.mso_schema_site_bd_subnet
+- module: cisco.mso.mso_schema_template_bd
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new site BD
+ cisco.mso.mso_schema_site_bd:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ bd: BD1
+ state: present
+ delegate_to: localhost
+
+- name: Remove a site BD
+ cisco.mso.mso_schema_site_bd:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ bd: BD1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific site BD
+ cisco.mso.mso_schema_site_bd:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ bd: BD1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all site BDs
+ cisco.mso.mso_schema_site_bd:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ bd=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ host_route=dict(type='bool'),
+ svi_mac=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['bd']],
+ ['state', 'present', ['bd']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ bd = module.params.get('bd')
+ host_route = module.params.get('host_route')
+ svi_mac = module.params.get('svi_mac')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site-template association '{0}-{1}' does not exist.".format(site, template))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ # Get BD
+ bd_ref = mso.bd_ref(schema_id=schema_id, template=template, bd=bd)
+ bds = [v.get('bdRef') for v in schema_obj.get('sites')[site_idx]['bds']]
+ if bd is not None and bd_ref in bds:
+ bd_idx = bds.index(bd_ref)
+ bd_path = '/sites/{0}/bds/{1}'.format(site_template, bd)
+ mso.existing = schema_obj.get('sites')[site_idx]['bds'][bd_idx]
+ mso.existing['bdRef'] = mso.dict_from_ref(mso.existing.get('bdRef'))
+
+ if state == 'query':
+ if bd is None:
+ mso.existing = schema_obj.get('sites')[site_idx]['bds']
+ for bd in mso.existing:
+ bd['bdRef'] = mso.dict_from_ref(bd.get('bdRef'))
+ elif not mso.existing:
+ mso.fail_json(msg="BD '{bd}' not found".format(bd=bd))
+ mso.exit_json()
+
+ bds_path = '/sites/{0}/bds'.format(site_template)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=bd_path))
+
+ elif state == 'present':
+ if not mso.existing:
+ if host_route is None:
+ host_route = False
+
+ payload = dict(
+ bdRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ bdName=bd,
+ ),
+ hostBasedRouting=host_route,
+ )
+ if svi_mac is not None:
+ payload.update(mac=svi_mac)
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=bd_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=bds_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode and mso.existing != mso.previous:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_bd_l3out.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_bd_l3out.py
new file mode 100644
index 00000000..2a85860f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_bd_l3out.py
@@ -0,0 +1,224 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_bd_l3out
+short_description: Manage site-local BD l3out's in schema template
+description:
+- Manage site-local BDs l3out's in schema template on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ bd:
+ description:
+ - The name of the BD.
+ type: str
+ required: yes
+ aliases: [ name ]
+ l3out:
+ description:
+ - The name of the l3out.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index.
+ This can cause silent corruption on concurrent access when changing/removing on object as
+ the wrong object may be referenced. This module is affected by this deficiency.
+seealso:
+- module: cisco.mso.mso_schema_site_bd
+- module: cisco.mso.mso_schema_template_bd
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new site BD l3out
+ cisco.mso.mso_schema_site_bd_l3out:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ bd: BD1
+ l3out: L3out1
+ state: present
+ delegate_to: localhost
+
+- name: Remove a site BD l3out
+ cisco.mso.mso_schema_site_bd_l3out:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ bd: BD1
+ l3out: L3out1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific site BD l3out
+ cisco.mso.mso_schema_site_bd_l3out:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ bd: BD1
+ l3out: L3out1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all site BD l3outs
+ cisco.mso.mso_schema_site_bd_l3out:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ bd: BD1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ bd=dict(type='str', required=True),
+ l3out=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['l3out']],
+ ['state', 'present', ['l3out']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ bd = module.params.get('bd')
+ l3out = module.params.get('l3out')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site/template '{0}-{1}' does not exist. Existing sites/templates: {2}".format(site, template, ', '.join(sites)))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ # Get BD
+ bd_ref = mso.bd_ref(schema_id=schema_id, template=template, bd=bd)
+ bds = [v.get('bdRef') for v in schema_obj.get('sites')[site_idx]['bds']]
+ if bd_ref not in bds:
+ mso.fail_json(msg="Provided BD '{0}' does not exist. Existing BDs: {1}".format(bd, ', '.join(bds)))
+ bd_idx = bds.index(bd_ref)
+
+ # Get L3out
+ l3outs = schema_obj.get('sites')[site_idx]['bds'][bd_idx]['l3Outs']
+ if l3out is not None and l3out in l3outs:
+ l3out_idx = l3outs.index(l3out)
+ # FIXME: Changes based on index are DANGEROUS
+ l3out_path = '/sites/{0}/bds/{1}/l3Outs/{2}'.format(site_template, bd, l3out_idx)
+ mso.existing = schema_obj.get('sites')[site_idx]['bds'][bd_idx]['l3Outs'][l3out_idx]
+
+ if state == 'query':
+ if l3out is None:
+ mso.existing = schema_obj.get('sites')[site_idx]['bds'][bd_idx]['l3Outs']
+ elif not mso.existing:
+ mso.fail_json(msg="L3out '{l3out}' not found".format(l3out=l3out))
+ mso.exit_json()
+
+ l3outs_path = '/sites/{0}/bds/{1}/l3Outs'.format(site_template, bd)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=l3out_path))
+
+ elif state == 'present':
+ mso.sent = l3out
+ if not mso.existing:
+ ops.append(dict(op='add', path=l3outs_path + '/-', value=l3out))
+
+ mso.existing = mso.sent
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_bd_subnet.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_bd_subnet.py
new file mode 100644
index 00000000..002c6d41
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_bd_subnet.py
@@ -0,0 +1,301 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_bd_subnet
+short_description: Manage site-local BD subnets in schema template
+description:
+- Manage site-local BD subnets in schema template on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ bd:
+ description:
+ - The name of the BD.
+ type: str
+ required: true
+ aliases: [ name ]
+ subnet:
+ description:
+ - The IP range in CIDR notation.
+ type: str
+ aliases: [ ip ]
+ description:
+ description:
+ - The description of this subnet.
+ type: str
+ scope:
+ description:
+ - The scope of the subnet.
+ type: str
+ default: private
+ choices: [ private, public ]
+ shared:
+ description:
+ - Whether this subnet is shared between VRFs.
+ type: bool
+ no_default_gateway:
+ description:
+ - Whether this subnet has a default gateway.
+ type: bool
+ querier:
+ description:
+ - Whether this subnet is an IGMP querier.
+ type: bool
+ is_virtual_ip:
+ description:
+ - Treat as Virtual IP Address
+ type: bool
+ default: false
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index.
+ This can cause silent corruption on concurrent access when changing/removing on object as
+ the wrong object may be referenced. This module is affected by this deficiency.
+seealso:
+- module: cisco.mso.mso_schema_site_bd
+- module: cisco.mso.mso_schema_template_bd
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new site BD subnet
+ cisco.mso.mso_schema_site_bd_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ bd: BD1
+ subnet: 11.11.11.0/24
+ state: present
+ delegate_to: localhost
+
+- name: Remove a site BD subnet
+ cisco.mso.mso_schema_site_bd_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ bd: BD1
+ subnet: 11.11.11.0/24
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific site BD subnet
+ cisco.mso.mso_schema_site_bd_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ bd: BD1
+ subnet: 11.11.11.0/24
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all site BD subnets
+ cisco.mso.mso_schema_site_bd_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ bd: BD1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_subnet_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(mso_subnet_spec())
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ bd=dict(type='str', aliases=['name'], required=True),
+ subnet=dict(type='str', aliases=['ip']),
+ description=dict(type='str'),
+ scope=dict(type='str', default='private', choices=['private', 'public']),
+ shared=dict(type='bool', default=False),
+ no_default_gateway=dict(type='bool', default=False),
+ querier=dict(type='bool', default=False),
+ is_virtual_ip=dict(type='bool', default=False),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['subnet']],
+ ['state', 'present', ['subnet']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ bd = module.params.get('bd')
+ subnet = module.params.get('subnet')
+ description = module.params.get('description')
+ scope = module.params.get('scope')
+ shared = module.params.get('shared')
+ no_default_gateway = module.params.get('no_default_gateway')
+ querier = module.params.get('querier')
+ is_virtual_ip = module.params.get('is_virtual_ip')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get template BDs
+ template_bds = [b.get('name') for b in schema_obj.get('templates')[template_idx]['bds']]
+
+ # Get template BD
+ if bd not in template_bds:
+ mso.fail_json(msg="Provided BD '{0}' does not exist. Existing template BDs: {1}".format(bd, ', '.join(template_bds)))
+ template_bd_idx = template_bds.index(bd)
+ template_bd = schema_obj.get('templates')[template_idx]['bds'][template_bd_idx]
+ if template_bd.get('l2Stretch') is True and state == 'present':
+ mso.fail_json(
+ msg="The l2Stretch of template bd should be false in order to create a site bd subnet. Set l2Stretch as false using mso_schema_template_bd"
+ )
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site/template '{0}-{1}' does not exist.".format(site, template))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ # Get BD
+ bd_ref = mso.bd_ref(schema_id=schema_id, template=template, bd=bd)
+ bds = [v.get('bdRef') for v in schema_obj.get('sites')[site_idx]['bds']]
+ if bd_ref not in bds:
+ mso.fail_json(msg="Provided BD '{0}' does not exist. Existing site BDs: {1}".format(bd, ', '.join(bds)))
+ bd_idx = bds.index(bd_ref)
+
+ # Get Subnet
+ subnets = [s.get('ip') for s in schema_obj.get('sites')[site_idx]['bds'][bd_idx]['subnets']]
+ if subnet in subnets:
+ subnet_idx = subnets.index(subnet)
+ # FIXME: Changes based on index are DANGEROUS
+ subnet_path = '/sites/{0}/bds/{1}/subnets/{2}'.format(site_template, bd, subnet_idx)
+ mso.existing = schema_obj.get('sites')[site_idx]['bds'][bd_idx]['subnets'][subnet_idx]
+
+ if state == 'query':
+ if subnet is None:
+ mso.existing = schema_obj.get('sites')[site_idx]['bds'][bd_idx]['subnets']
+ elif not mso.existing:
+ mso.fail_json(msg="Subnet IP '{subnet}' not found".format(subnet=subnet))
+ mso.exit_json()
+
+ subnets_path = '/sites/{0}/bds/{1}/subnets'.format(site_template, bd)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=subnet_path))
+
+ elif state == 'present':
+ if not mso.existing:
+ if description is None:
+ description = subnet
+
+ payload = dict(
+ ip=subnet,
+ description=description,
+ scope=scope,
+ shared=shared,
+ noDefaultGateway=no_default_gateway,
+ virtual=is_virtual_ip,
+ querier=querier,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=subnet_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=subnets_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_external_epg_selector.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_external_epg_selector.py
new file mode 100644
index 00000000..ad83c069
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_external_epg_selector.py
@@ -0,0 +1,295 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_external_epg_selector
+short_description: Manage External EPG selector in schema of cloud sites
+description:
+- Manage External EPG selector in schema of cloud sites on Cisco ACI Multi-Site.
+author:
+- Shreyas Srish (@shrsr)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template to change.
+ type: str
+ required: yes
+ external_epg:
+ description:
+ - The name of the External EPG to be managed.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the cloud site.
+ type: str
+ required: yes
+ selector:
+ description:
+ - The name of the selector.
+ type: str
+ expressions:
+ description:
+ - Expressions associated to this selector.
+ type: list
+ elements: dict
+ suboptions:
+ type:
+ description:
+ - The name of the expression which in this case is always IP address.
+ required: true
+ type: str
+ choices: [ ip_address ]
+ operator:
+ description:
+ - The operator associated with the expression which in this case is always equals.
+ required: true
+ type: str
+ choices: [ equals ]
+ value:
+ description:
+ - The value of the IP Address / Subnet associated with the expression.
+ required: true
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_template_external_epg
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a selector to an External EPG
+ cisco.mso.mso_schema_site_external_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: ansible_test
+ template: Template1
+ site: azure_ansible_test
+ external_epg: ext1
+ selector: test
+ expressions:
+ - type: ip_address
+ operator: equals
+ value: 10.0.0.0
+ state: present
+ delegate_to: localhost
+
+- name: Remove a Selector
+ cisco.mso.mso_schema_site_external_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: ansible_test
+ template: Template1
+ site: azure_ansible_test
+ external_epg: ext1
+ selector: test
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific Selector
+ cisco.mso.mso_schema_site_external_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: ansible_test
+ template: Template1
+ site: azure_ansible_test
+ external_epg: ext1
+ selector: selector_1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all Selectors
+ cisco.mso.mso_schema_site_external_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: ansible_test
+ template: Template1
+ site: azure_ansible_test
+ external_epg: ext1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_expression_spec_ext_epg
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ external_epg=dict(type='str', required=True),
+ selector=dict(type='str'),
+ expressions=dict(type='list', elements='dict', options=mso_expression_spec_ext_epg()),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ site = module.params.get('site')
+ external_epg = module.params.get('external_epg')
+ selector = module.params.get('selector')
+ expressions = module.params.get('expressions')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{template}' does not exist. Existing templates: {templates}".format(template=template,
+ templates=', '.join(templates)))
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ sites_list = [s.get('siteId') + '/' + s.get('templateName') for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site/siteId/template '{0}/{1}/{2}' does not exist. "
+ "Existing siteIds/templates: {3}".format(site, site_id, template, ', '.join(sites_list)))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ payload = dict()
+ op_path = ''
+
+ # Get External EPG
+ ext_epg_ref = mso.ext_epg_ref(schema_id=schema_id, template=template, external_epg=external_epg)
+ external_epgs = [e.get('externalEpgRef') for e in schema_obj.get('sites')[site_idx]['externalEpgs']]
+
+ if ext_epg_ref not in external_epgs:
+ op_path = '/sites/{0}/externalEpgs/-'.format(site_template)
+ payload = dict(
+ externalEpgRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ externalEpgName=external_epg,
+ ),
+ l3outDn='',
+ )
+
+ else:
+ external_epg_idx = external_epgs.index(ext_epg_ref)
+
+ # Get Selector
+ selectors = [s.get('name') for s in schema_obj['sites'][site_idx]['externalEpgs'][external_epg_idx]['subnets']]
+ if selector in selectors:
+ selector_idx = selectors.index(selector)
+ selector_path = '/sites/{0}/externalEpgs/{1}/subnets/{2}'.format(site_template, external_epg, selector_idx)
+ mso.existing = schema_obj['sites'][site_idx]['externalEpgs'][external_epg_idx]['subnets'][selector_idx]
+
+ selectors_path = '/sites/{0}/externalEpgs/{1}/subnets/-'.format(site_template, external_epg)
+ ops = []
+
+ if state == 'query':
+ if selector is None:
+ mso.existing = schema_obj['sites'][site_idx]['externalEpgs'][external_epg_idx]['subnets']
+ elif not mso.existing:
+ mso.fail_json(msg="Selector '{selector}' not found".format(selector=selector))
+ mso.exit_json()
+
+ mso.previous = mso.existing
+
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=selector_path))
+
+ elif state == 'present':
+ # Get expressions
+ types = dict(ip_address='ipAddress')
+ all_expressions = []
+ if expressions:
+ for expression in expressions:
+ type_val = expression.get('type')
+ operator = expression.get('operator')
+ value = expression.get('value')
+ all_expressions.append(dict(
+ key=types.get(type_val),
+ operator=operator,
+ value=value,
+ ))
+ else:
+ mso.fail_json(msg="Missing expressions in selector")
+
+ subnets = dict(
+ name=selector,
+ ip=all_expressions[0]['value']
+ )
+
+ if not external_epgs:
+ payload['subnets'] = [subnets]
+ else:
+ payload = subnets
+ op_path = selectors_path
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=selector_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=op_path, value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode and mso.proposed != mso.previous:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf.py
new file mode 100644
index 00000000..8846bc4c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf.py
@@ -0,0 +1,213 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_vrf
+short_description: Manage site-local VRFs in schema template
+description:
+- Manage site-local VRFs in schema template on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ vrf:
+ description:
+ - The name of the VRF to manage.
+ type: str
+ aliases: [ name ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_site
+- module: cisco.mso.mso_schema_template_vrf
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new site VRF
+ cisco.mso.mso_schema_site_vrf:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ state: present
+ delegate_to: localhost
+
+- name: Remove a site VRF
+ cisco.mso.mso_schema_site_vrf:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific site VRF
+ cisco.mso.mso_schema_site_vrf:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all site VRFs
+ cisco.mso.mso_schema_site_vrf:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ vrf=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['vrf']],
+ ['state', 'present', ['vrf']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ vrf = module.params.get('vrf')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site/template '{0}-{1}' does not exist. Existing sites/templates: {2}".format(site, template, ', '.join(sites)))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ # Get VRF
+ vrf_ref = mso.vrf_ref(schema_id=schema_id, template=template, vrf=vrf)
+ vrfs = [v.get('vrfRef') for v in schema_obj.get('sites')[site_idx]['vrfs']]
+ if vrf is not None and vrf_ref in vrfs:
+ vrf_idx = vrfs.index(vrf_ref)
+ vrf_path = '/sites/{0}/vrfs/{1}'.format(site_template, vrf)
+ mso.existing = schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]
+
+ if state == 'query':
+ if vrf is None:
+ mso.existing = schema_obj.get('sites')[site_idx]['vrfs']
+ elif not mso.existing:
+ mso.fail_json(msg="VRF '{vrf}' not found".format(vrf=vrf))
+ mso.exit_json()
+
+ vrfs_path = '/sites/{0}/vrfs'.format(site_template)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=vrf_path))
+
+ elif state == 'present':
+ payload = dict(
+ vrfRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ vrfName=vrf,
+ ),
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=vrf_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=vrfs_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region.py
new file mode 100644
index 00000000..dc68a836
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region.py
@@ -0,0 +1,239 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_vrf_region
+short_description: Manage site-local VRF regions in schema template
+description:
+- Manage site-local VRF regions in schema template on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ vrf:
+ description:
+ - The name of the VRF.
+ type: str
+ required: yes
+ region:
+ description:
+ - The name of the region to manage.
+ type: str
+ aliases: [ name ]
+ vpn_gateway_router:
+ description:
+ - Whether VPN Gateway Router is enabled or not.
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- Due to restrictions of the MSO REST API, this module cannot create empty region (i.e. regions without cidrs)
+ Use the M(cisco.mso.mso_schema_site_vrf_region_cidr) to automatically create regions with cidrs.
+seealso:
+- module: cisco.mso.mso_schema_site_vrf
+- module: cisco.mso.mso_schema_template_vrf
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Remove VPN Gateway Router at site VRF Region
+ cisco.mso.mso_schema_site_vrf_region:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ vpn_gateway_router: false
+ state: present
+ delegate_to: localhost
+
+- name: Remove a site VRF region
+ cisco.mso.mso_schema_site_vrf_region:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific site VRF region
+ cisco.mso.mso_schema_site_vrf_region:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all site VRF regions
+ cisco.mso.mso_schema_site_vrf_region:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ vrf=dict(type='str', required=True),
+ region=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ vpn_gateway_router=dict(type='bool'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['region']],
+ ['state', 'present', ['region']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ vrf = module.params.get('vrf')
+ region = module.params.get('region')
+ vpn_gateway_router = module.params.get('vpn_gateway_router')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site-template association '{0}-{1}' does not exist.".format(site, template))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ # Get VRF
+ vrf_ref = mso.vrf_ref(schema_id=schema_id, template=template, vrf=vrf)
+ vrfs = [v.get('vrfRef') for v in schema_obj.get('sites')[site_idx]['vrfs']]
+ vrfs_name = [mso.dict_from_ref(v).get('vrfName') for v in vrfs]
+ if vrf_ref not in vrfs:
+ mso.fail_json(msg="Provided vrf '{0}' does not exist. Existing vrfs: {1}".format(vrf, ', '.join(vrfs_name)))
+ vrf_idx = vrfs.index(vrf_ref)
+
+ # Get Region
+ regions = [r.get('name') for r in schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions']]
+ if region is not None and region in regions:
+ region_idx = regions.index(region)
+ region_path = '/sites/{0}/vrfs/{1}/regions/{2}'.format(site_template, vrf, region)
+ mso.existing = schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions'][region_idx]
+
+ if state == 'query':
+ if region is None:
+ mso.existing = schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions']
+ elif not mso.existing:
+ mso.fail_json(msg="Region '{region}' not found".format(region=region))
+ mso.exit_json()
+
+ regions_path = '/sites/{0}/vrfs/{1}/regions'.format(site_template, vrf)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=region_path))
+
+ elif state == 'present':
+
+ payload = dict(
+ name=region,
+ isVpnGatewayRouter=vpn_gateway_router,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=region_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=regions_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region_cidr.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region_cidr.py
new file mode 100644
index 00000000..324209a9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region_cidr.py
@@ -0,0 +1,317 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_vrf_region_cidr
+short_description: Manage site-local VRF region CIDRs in schema template
+description:
+- Manage site-local VRF region CIDRs in schema template on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+- Lionel Hercot (@lhercot)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ vrf:
+ description:
+ - The name of the VRF.
+ type: str
+ required: yes
+ region:
+ description:
+ - The name of the region.
+ type: str
+ required: yes
+ cidr:
+ description:
+ - The name of the region CIDR to manage.
+ type: str
+ aliases: [ ip ]
+ primary:
+ description:
+ - Whether this is the primary CIDR.
+ type: bool
+ default: true
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index.
+ This can cause silent corruption on concurrent access when changing/removing on object as
+ the wrong object may be referenced. This module is affected by this deficiency.
+seealso:
+- module: cisco.mso.mso_schema_site_vrf_region
+- module: cisco.mso.mso_schema_site_vrf_region_cidr_subnet
+- module: cisco.mso.mso_schema_template_vrf
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new site VRF region CIDR
+ cisco.mso.mso_schema_site_vrf_region_cidr:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ cidr: 14.14.14.1/24
+ state: present
+ delegate_to: localhost
+
+- name: Remove a site VRF region CIDR
+ cisco.mso.mso_schema_site_vrf_region_cidr:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ cidr: 14.14.14.1/24
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific site VRF region CIDR
+ cisco.mso.mso_schema_site_vrf_region_cidr:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ cidr: 14.14.14.1/24
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all site VRF region CIDR
+ cisco.mso.mso_schema_site_vrf_region_cidr:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ vrf=dict(type='str', required=True),
+ region=dict(type='str', required=True),
+ cidr=dict(type='str', aliases=['ip']), # This parameter is not required for querying all objects
+ primary=dict(type='bool', default=True),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['cidr']],
+ ['state', 'present', ['cidr']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ vrf = module.params.get('vrf')
+ region = module.params.get('region')
+ cidr = module.params.get('cidr')
+ primary = module.params.get('primary')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ payload = dict()
+ op_path = ''
+ new_cidr = dict(
+ ip=cidr,
+ primary=primary,
+ )
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ all_sites = schema_obj.get('sites')
+ sites = []
+ if all_sites is not None:
+ sites = [(s.get('siteId'), s.get('templateName')) for s in all_sites]
+
+ # Get VRF
+ vrf_ref = mso.vrf_ref(schema_id=schema_id, template=template, vrf=vrf)
+ template_vrfs = [a.get('name') for a in schema_obj['templates'][template_idx]['vrfs']]
+ if vrf not in template_vrfs:
+ mso.fail_json(msg="Provided vrf '{0}' does not exist. Existing vrfs: {1}".format(vrf, ', '.join(template_vrfs)))
+
+ # if site-template does not exist, create it
+ if (site_id, template) not in sites:
+ op_path = '/sites/-'
+ payload.update(
+ siteId=site_id,
+ templateName=template,
+ vrfs=[dict(
+ vrfRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ vrfName=vrf,
+ ),
+ regions=[dict(
+ name=region,
+ cidrs=[new_cidr]
+ )]
+ )]
+ )
+
+ else:
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ # If vrf not at site level but exists at template level
+ vrfs = [v.get('vrfRef') for v in schema_obj.get('sites')[site_idx]['vrfs']]
+ if vrf_ref not in vrfs:
+ op_path = '/sites/{0}/vrfs/-'.format(site_template)
+ payload.update(
+ vrfRef=dict(
+ schemaId=schema_id,
+ templateName=template,
+ vrfName=vrf,
+ ),
+ regions=[dict(
+ name=region,
+ cidrs=[new_cidr]
+ )]
+ )
+ else:
+ # Update vrf index at site level
+ vrf_idx = vrfs.index(vrf_ref)
+
+ # Get Region
+ regions = [r.get('name') for r in schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions']]
+ if region not in regions:
+ op_path = '/sites/{0}/vrfs/{1}/regions/-'.format(site_template, vrf)
+ payload.update(
+ name=region,
+ cidrs=[new_cidr]
+ )
+ else:
+ region_idx = regions.index(region)
+
+ # Get CIDR
+ cidrs = [c.get('ip') for c in schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions'][region_idx]['cidrs']]
+ if cidr is not None:
+ if cidr in cidrs:
+ cidr_idx = cidrs.index(cidr)
+ # FIXME: Changes based on index are DANGEROUS
+ cidr_path = '/sites/{0}/vrfs/{1}/regions/{2}/cidrs/{3}'.format(site_template, vrf, region, cidr_idx)
+ mso.existing = schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions'][region_idx]['cidrs'][cidr_idx]
+ op_path = '/sites/{0}/vrfs/{1}/regions/{2}/cidrs/-'.format(site_template, vrf, region)
+ payload = new_cidr
+
+ if state == 'query':
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site-template association '{0}-{1}' does not exist.".format(site, template))
+ elif vrf_ref not in vrfs:
+ mso.fail_json(msg="Provided vrf '{0}' does not exist at site level.".format(vrf))
+ elif not regions or region not in regions:
+ mso.fail_json(msg="Provided region '{0}' does not exist. Existing regions: {1}".format(region, ', '.join(regions)))
+ elif cidr is None and not payload:
+ mso.existing = schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions'][region_idx]['cidrs']
+ elif not mso.existing:
+ mso.fail_json(msg="CIDR IP '{cidr}' not found".format(cidr=cidr))
+ mso.exit_json()
+
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=cidr_path))
+
+ elif state == 'present':
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=cidr_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=op_path, value=mso.sent))
+
+ mso.existing = new_cidr
+
+ if not module.check_mode and mso.previous != mso.existing:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region_cidr_subnet.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region_cidr_subnet.py
new file mode 100644
index 00000000..cd019d53
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region_cidr_subnet.py
@@ -0,0 +1,302 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_vrf_region_cidr_subnet
+short_description: Manage site-local VRF regions in schema template
+description:
+- Manage site-local VRF regions in schema template on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+- Lionel Hercot (@lhercot)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ vrf:
+ description:
+ - The name of the VRF.
+ type: str
+ required: yes
+ region:
+ description:
+ - The name of the region.
+ type: str
+ required: yes
+ cidr:
+ description:
+ - The IP range of for the region CIDR.
+ type: str
+ required: yes
+ subnet:
+ description:
+ - The IP subnet of this region CIDR.
+ type: str
+ aliases: [ ip ]
+ zone:
+ description:
+ - The name of the zone for the region CIDR subnet.
+ - This argument is required for AWS sites.
+ type: str
+ aliases: [ name ]
+ vgw:
+ description:
+ - Whether this subnet is used for the Azure Gateway in Azure.
+ - Whether this subnet is used for the Transit Gateway Attachment in AWS.
+ type: bool
+ aliases: [ hub_network ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index.
+ This can cause silent corruption on concurrent access when changing/removing on object as
+ the wrong object may be referenced. This module is affected by this deficiency.
+seealso:
+- module: cisco.mso.mso_schema_site_vrf_region_cidr
+- module: cisco.mso.mso_schema_template_vrf
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new site VRF region CIDR subnet
+ cisco.mso.mso_schema_site_vrf_region_cidr_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ cidr: 14.14.14.1/24
+ subnet: 14.14.14.2/24
+ zone: us-west-1a
+ state: present
+ delegate_to: localhost
+
+- name: Remove a site VRF region CIDR subnet
+ cisco.mso.mso_schema_site_vrf_region_cidr_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ cidr: 14.14.14.1/24
+ subnet: 14.14.14.2/24
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific site VRF region CIDR subnet
+ cisco.mso.mso_schema_site_vrf_region_cidr_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ cidr: 14.14.14.1/24
+ subnet: 14.14.14.2/24
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all site VRF region CIDR subnet
+ cisco.mso.mso_schema_site_vrf_region_cidr_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ cidr: 14.14.14.1/24
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ vrf=dict(type='str', required=True),
+ region=dict(type='str', required=True),
+ cidr=dict(type='str', required=True),
+ subnet=dict(type='str', aliases=['ip']), # This parameter is not required for querying all objects
+ zone=dict(type='str', aliases=['name']),
+ vgw=dict(type='bool', aliases=['hub_network']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['subnet']],
+ ['state', 'present', ['subnet']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ vrf = module.params.get('vrf')
+ region = module.params.get('region')
+ cidr = module.params.get('cidr')
+ subnet = module.params.get('subnet')
+ zone = module.params.get('zone')
+ vgw = module.params.get('vgw')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ sites_list = [s.get('siteId') + '/' + s.get('templateName') for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site/siteId/template '{0}/{1}/{2}' does not exist. "
+ "Existing siteIds/templates: {3}".format(site, site_id, template, ', '.join(sites_list)))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ # Get VRF
+ vrf_ref = mso.vrf_ref(schema_id=schema_id, template=template, vrf=vrf)
+ vrfs = [v.get('vrfRef') for v in schema_obj.get('sites')[site_idx]['vrfs']]
+
+ # If vrf not at site level but exists at template level
+ if vrf_ref not in vrfs:
+ mso.fail_json(msg="Provided vrf '{0}' does not exist at site level."
+ " Use mso_schema_site_vrf_region_cidr to create it.".format(vrf))
+ vrf_idx = vrfs.index(vrf_ref)
+
+ # Get Region
+ regions = [r.get('name') for r in schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions']]
+ if region not in regions:
+ mso.fail_json(msg="Provided region '{0}' does not exist. Existing regions: {1}."
+ " Use mso_schema_site_vrf_region_cidr to create it.".format(region, ', '.join(regions)))
+ region_idx = regions.index(region)
+
+ # Get CIDR
+ cidrs = [c.get('ip') for c in schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions'][region_idx]['cidrs']]
+ if cidr not in cidrs:
+ mso.fail_json(msg="Provided CIDR IP '{0}' does not exist. Existing CIDR IPs: {1}."
+ " Use mso_schema_site_vrf_region_cidr to create it.".format(cidr, ', '.join(cidrs)))
+ cidr_idx = cidrs.index(cidr)
+
+ # Get Subnet
+ subnets = [s.get('ip') for s in schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions'][region_idx]['cidrs'][cidr_idx]['subnets']]
+ if subnet is not None and subnet in subnets:
+ subnet_idx = subnets.index(subnet)
+ # FIXME: Changes based on index are DANGEROUS
+ subnet_path = '/sites/{0}/vrfs/{1}/regions/{2}/cidrs/{3}/subnets/{4}'.format(site_template, vrf, region, cidr_idx, subnet_idx)
+ mso.existing = schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions'][region_idx]['cidrs'][cidr_idx]['subnets'][subnet_idx]
+
+ if state == 'query':
+ if subnet is None:
+ mso.existing = schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions'][region_idx]['cidrs'][cidr_idx]['subnets']
+ elif not mso.existing:
+ mso.fail_json(msg="Subnet IP '{subnet}' not found".format(subnet=subnet))
+ mso.exit_json()
+
+ subnets_path = '/sites/{0}/vrfs/{1}/regions/{2}/cidrs/{3}/subnets'.format(site_template, vrf, region, cidr_idx)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=subnet_path))
+
+ elif state == 'present':
+ payload = dict(
+ ip=subnet,
+ zone=""
+ )
+
+ if zone is not None:
+ payload['zone'] = zone
+ if vgw is True:
+ payload['usage'] = 'gateway'
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=subnet_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=subnets_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region_hub_network.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region_hub_network.py
new file mode 100644
index 00000000..5e5fcc92
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_site_vrf_region_hub_network.py
@@ -0,0 +1,251 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_site_vrf_region_hub_network
+short_description: Manage site-local VRF region hub network in schema template
+description:
+- Manage site-local VRF region hub network in schema template on Cisco ACI Multi-Site.
+- The 'Hub Network' feature was introduced in Multi-Site Orchestrator (MSO) version 3.0(1) for AWS and version 3.0(2) for Azure.
+author:
+- Cindy Zhao (@cizhao)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ vrf:
+ description:
+ - The name of the VRF.
+ type: str
+ required: yes
+ region:
+ description:
+ - The name of the region.
+ type: str
+ required: yes
+ hub_network:
+ description:
+ - The hub network to be managed.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the hub network.
+ - The hub-default is the default created hub network.
+ type: str
+ required: yes
+ tenant:
+ description:
+ - The tenant name of the hub network.
+ type: str
+ required: yes
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- The ACI MultiSite PATCH API has a deficiency requiring some objects to be referenced by index.
+ This can cause silent corruption on concurrent access when changing/removing on object as
+ the wrong object may be referenced. This module is affected by this deficiency.
+seealso:
+- module: cisco.mso.mso_schema_site_vrf_region
+- module: cisco.mso.mso_schema_template_vrf
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new site VRF region hub network
+ cisco.mso.mso_schema_site_vrf_region_hub_network:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ hub_network:
+ name: hub-default
+ tenant: infra
+ state: present
+ delegate_to: localhost
+
+- name: Remove a site VRF region hub network
+ cisco.mso.mso_schema_site_vrf_region_hub_network:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ state: absent
+ delegate_to: localhost
+
+- name: Query site VRF region hub network
+ cisco.mso.mso_schema_site_vrf_region_hub_network:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema1
+ site: Site1
+ template: Template1
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_hub_network_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ site=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ vrf=dict(type='str', required=True),
+ region=dict(type='str', required=True),
+ hub_network=dict(type='dict', options=mso_hub_network_spec()),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['hub_network']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ site = module.params.get('site')
+ template = module.params.get('template').replace(' ', '')
+ vrf = module.params.get('vrf')
+ region = module.params.get('region')
+ hub_network = module.params.get('hub_network')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+ schema_id = schema_obj.get('id')
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+
+ # Get site
+ site_id = mso.lookup_site(site)
+
+ # Get site_idx
+ if 'sites' not in schema_obj:
+ mso.fail_json(msg="No site associated with template '{0}'. Associate the site with the template using mso_schema_site.".format(template))
+ sites = [(s.get('siteId'), s.get('templateName')) for s in schema_obj.get('sites')]
+ if (site_id, template) not in sites:
+ mso.fail_json(msg="Provided site-template association '{0}-{1}' does not exist.".format(site, template))
+
+ # Schema-access uses indexes
+ site_idx = sites.index((site_id, template))
+ # Path-based access uses site_id-template
+ site_template = '{0}-{1}'.format(site_id, template)
+
+ # Get VRF
+ vrf_ref = mso.vrf_ref(schema_id=schema_id, template=template, vrf=vrf)
+ vrfs = [v.get('vrfRef') for v in schema_obj.get('sites')[site_idx]['vrfs']]
+ vrfs_name = [mso.dict_from_ref(v).get('vrfName') for v in vrfs]
+ if vrf_ref not in vrfs:
+ mso.fail_json(msg="Provided vrf '{0}' does not exist. Existing vrfs: {1}".format(vrf, ', '.join(vrfs_name)))
+ vrf_idx = vrfs.index(vrf_ref)
+
+ # Get Region
+ regions = [r.get('name') for r in schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions']]
+ if region not in regions:
+ mso.fail_json(msg="Provided region '{0}' does not exist. Existing regions: {1}".format(region, ', '.join(regions)))
+ region_idx = regions.index(region)
+ # Get Region object
+ region_obj = schema_obj.get('sites')[site_idx]['vrfs'][vrf_idx]['regions'][region_idx]
+ region_path = '/sites/{0}/vrfs/{1}/regions/{2}'.format(site_template, vrf, region)
+
+ # Get hub network
+ existing_hub_network = region_obj.get('cloudRsCtxProfileToGatewayRouterP')
+ if existing_hub_network is not None:
+ mso.existing = existing_hub_network
+
+ if state == 'query':
+ if not mso.existing:
+ mso.fail_json(msg="Hub network not found")
+ mso.exit_json()
+
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=region_path + '/cloudRsCtxProfileToGatewayRouterP'))
+ ops.append(dict(op='replace', path=region_path + '/isTGWAttachment', value=False))
+
+ elif state == 'present':
+ new_hub_network = dict(
+ name=hub_network.get('name'),
+ tenantName=hub_network.get('tenant'),
+ )
+ payload = region_obj
+ payload.update(
+ cloudRsCtxProfileToGatewayRouterP=new_hub_network,
+ isTGWAttachment=True,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ ops.append(dict(op='replace', path=region_path, value=mso.sent))
+
+ mso.existing = new_hub_network
+
+ if not module.check_mode and mso.previous != mso.existing:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template.py
new file mode 100644
index 00000000..62169443
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template.py
@@ -0,0 +1,244 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template
+short_description: Manage templates in schemas
+description:
+- Manage templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ tenant:
+ description:
+ - The tenant used for this template.
+ type: str
+ required: yes
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ aliases: [ name ]
+ display_name:
+ description:
+ - The name as displayed on the MSO web interface.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- Due to restrictions of the MSO REST API this module creates schemas when needed, and removes them when the last template has been removed.
+seealso:
+- module: cisco.mso.mso_schema
+- module: cisco.mso.mso_schema_site
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new template to a schema
+ cisco.mso.mso_schema_template:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: Tenant 1
+ schema: Schema 1
+ template: Template 1
+ state: present
+ delegate_to: localhost
+
+- name: Remove a template from a schema
+ cisco.mso.mso_schema_template:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: Tenant 1
+ schema: Schema 1
+ template: Template 1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a template
+ cisco.mso.mso_schema_template:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: Tenant 1
+ schema: Schema 1
+ template: Template 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all templates
+ cisco.mso.mso_schema_template:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: Tenant 1
+ schema: Schema 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', required=True),
+ schema=dict(type='str', required=True),
+ template=dict(type='str', aliases=['name']),
+ display_name=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['template']],
+ ['state', 'present', ['template']],
+ ],
+ )
+
+ tenant = module.params.get('tenant')
+ schema = module.params.get('schema')
+ template = module.params.get('template')
+ if template is not None:
+ template = template.replace(' ', '')
+ display_name = module.params.get('display_name')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+
+ mso.existing = {}
+ if schema_obj:
+ # Schema exists
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template:
+ if template in templates:
+ template_idx = templates.index(template)
+ mso.existing = schema_obj.get('templates')[template_idx]
+ else:
+ mso.existing = schema_obj.get('templates')
+ else:
+ schema_path = 'schemas'
+
+ if state == 'query':
+ if not mso.existing:
+ if template:
+ mso.fail_json(msg="Template '{0}' not found".format(template))
+ else:
+ mso.existing = []
+ mso.exit_json()
+
+ template_path = '/templates/{0}'.format(template)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ mso.proposed = mso.sent = {}
+ if not schema_obj:
+ # There was no schema to begin with
+ pass
+ elif len(templates) == 1 and mso.existing:
+ # There is only one tenant, remove schema
+ mso.existing = {}
+ if not module.check_mode:
+ mso.request(schema_path, method='DELETE')
+ elif mso.existing:
+ # Remove existing template
+ mso.existing = {}
+ ops.append(dict(op='remove', path=template_path))
+
+ elif state == 'present':
+ tenant_id = mso.lookup_tenant(tenant)
+
+ if display_name is None:
+ display_name = mso.existing.get('displayName', template)
+
+ if not schema_obj:
+ # Schema does not exist, so we have to create it
+ payload = dict(
+ displayName=schema,
+ templates=[dict(
+ name=template,
+ displayName=display_name,
+ tenantId=tenant_id,
+ )],
+ sites=[],
+ )
+
+ mso.existing = payload.get('templates')[0]
+
+ if not module.check_mode:
+ mso.request(schema_path, method='POST', data=payload)
+
+ elif mso.existing:
+ # Template exists, so we have to update it
+ payload = dict(
+ name=template,
+ displayName=display_name,
+ tenantId=tenant_id,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ ops.append(dict(op='replace', path=template_path + '/displayName', value=display_name))
+ ops.append(dict(op='replace', path=template_path + '/tenantId', value=tenant_id))
+
+ mso.existing = mso.proposed
+ else:
+ # Template does not exist, so we have to add it
+ payload = dict(
+ name=template,
+ displayName=display_name,
+ tenantId=tenant_id,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ ops.append(dict(op='add', path='/templates/-', value=payload))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp.py
new file mode 100644
index 00000000..f2679ce6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp.py
@@ -0,0 +1,207 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_anp
+short_description: Manage Application Network Profiles (ANPs) in schema templates
+description:
+- Manage ANPs in schema templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the ANP to manage.
+ type: str
+ aliases: [ name ]
+ display_name:
+ description:
+ - The name as displayed on the MSO web interface.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_template
+- module: cisco.mso.mso_schema_template_anp_epg
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new ANP
+ cisco.mso.mso_schema_template_anp:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ state: present
+ delegate_to: localhost
+
+- name: Remove an ANP
+ cisco.mso.mso_schema_template_anp:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific ANPs
+ cisco.mso.mso_schema_template_anp:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all ANPs
+ cisco.mso.mso_schema_template_anp:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ anp=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ display_name=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['anp']],
+ ['state', 'present', ['anp']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ display_name = module.params.get('display_name')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get ANP
+ anps = [a.get('name') for a in schema_obj.get('templates')[template_idx]['anps']]
+
+ if anp is not None and anp in anps:
+ anp_idx = anps.index(anp)
+ mso.existing = schema_obj.get('templates')[template_idx]['anps'][anp_idx]
+
+ if state == 'query':
+ if anp is None:
+ mso.existing = schema_obj.get('templates')[template_idx]['anps']
+ elif not mso.existing:
+ mso.fail_json(msg="ANP '{anp}' not found".format(anp=anp))
+ mso.exit_json()
+
+ anps_path = '/templates/{0}/anps'.format(template)
+ anp_path = '/templates/{0}/anps/{1}'.format(template, anp)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=anp_path))
+
+ elif state == 'present':
+
+ if display_name is None and not mso.existing:
+ display_name = anp
+
+ epgs = []
+ if mso.existing:
+ epgs = None
+
+ payload = dict(
+ name=anp,
+ displayName=display_name,
+ epgs=epgs,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ if display_name is not None:
+ ops.append(dict(op='replace', path=anp_path + '/displayName', value=display_name))
+ else:
+ ops.append(dict(op='add', path=anps_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if 'anpRef' in mso.previous:
+ del mso.previous['anpRef']
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg.py
new file mode 100644
index 00000000..6883e4dd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg.py
@@ -0,0 +1,403 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_anp_epg
+short_description: Manage Endpoint Groups (EPGs) in schema templates
+description:
+- Manage EPGs in schema templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the ANP.
+ type: str
+ required: yes
+ epg:
+ description:
+ - The name of the EPG to manage.
+ type: str
+ aliases: [ name ]
+ display_name:
+ description:
+ - The name as displayed on the MSO web interface.
+ type: str
+# contracts:
+# description:
+# - A list of contracts associated to this ANP.
+# type: list
+ bd:
+ description:
+ - The BD associated to this ANP.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the BD to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced BD.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced BD.
+ type: str
+ vrf:
+ description:
+ - The VRF associated to this ANP.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the VRF to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced VRF.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced VRF.
+ type: str
+ subnets:
+ description:
+ - The subnets associated to this ANP.
+ type: list
+ elements: dict
+ suboptions:
+ subnet:
+ description:
+ - The IP range in CIDR notation.
+ type: str
+ required: true
+ aliases: [ ip ]
+ description:
+ description:
+ - The description of this subnet.
+ type: str
+ scope:
+ description:
+ - The scope of the subnet.
+ type: str
+ default: private
+ choices: [ private, public ]
+ shared:
+ description:
+ - Whether this subnet is shared between VRFs.
+ type: bool
+ no_default_gateway:
+ description:
+ - Whether this subnet has a default gateway.
+ type: bool
+ querier:
+ description:
+ - Whether this subnet is an IGMP querier.
+ type: bool
+ useg_epg:
+ description:
+ - Whether this is a USEG EPG.
+ type: bool
+# useg_epg_attributes:
+# description:
+# - A dictionary consisting of USEG attributes.
+# type: dict
+ intra_epg_isolation:
+ description:
+ - Whether intra EPG isolation is enforced.
+ - When not specified, this parameter defaults to C(unenforced).
+ type: str
+ choices: [ enforced, unenforced ]
+ intersite_multicast_source:
+ description:
+ - Whether intersite multicast source is enabled.
+ - When not specified, this parameter defaults to C(no).
+ type: bool
+ proxy_arp:
+ description:
+ - Whether proxy arp is enabled.
+ - When not specified, this parameter defaults to C(no).
+ type: bool
+ preferred_group:
+ description:
+ - Whether this EPG is added to preferred group or not.
+ - When not specified, this parameter defaults to C(no).
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_template_anp
+- module: cisco.mso.mso_schema_template_anp_epg_subnet
+- module: cisco.mso.mso_schema_template_bd
+- module: cisco.mso.mso_schema_template_contract_filter
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new EPG
+ cisco.mso.mso_schema_template_anp_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ bd:
+ name: bd1
+ vrf:
+ name: vrf1
+ state: present
+ delegate_to: localhost
+
+- name: Add a new EPG with preferred group.
+ cisco.mso.mso_schema_template_anp_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ state: present
+ preferred_group: yes
+ delegate_to: localhost
+
+- name: Remove an EPG
+ cisco.mso.mso_schema_template_anp_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ bd:
+ name: bd1
+ vrf:
+ name: vrf1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific EPG
+ cisco.mso.mso_schema_template_anp_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ bd:
+ name: bd1
+ vrf:
+ name: vrf1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all EPGs
+ cisco.mso.mso_schema_template_anp_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ bd:
+ name: bd1
+ vrf:
+ name: vrf1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_reference_spec, mso_subnet_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ anp=dict(type='str', required=True),
+ epg=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ bd=dict(type='dict', options=mso_reference_spec()),
+ vrf=dict(type='dict', options=mso_reference_spec()),
+ display_name=dict(type='str'),
+ useg_epg=dict(type='bool'),
+ intra_epg_isolation=dict(type='str', choices=['enforced', 'unenforced']),
+ intersite_multicast_source=dict(type='bool'),
+ proxy_arp=dict(type='bool'),
+ subnets=dict(type='list', elements='dict', options=mso_subnet_spec()),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ preferred_group=dict(type='bool'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['epg']],
+ ['state', 'present', ['epg']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ epg = module.params.get('epg')
+ display_name = module.params.get('display_name')
+ bd = module.params.get('bd')
+ if bd is not None and bd.get('template') is not None:
+ bd['template'] = bd.get('template').replace(' ', '')
+ vrf = module.params.get('vrf')
+ if vrf is not None and vrf.get('template') is not None:
+ vrf['template'] = vrf.get('template').replace(' ', '')
+ useg_epg = module.params.get('useg_epg')
+ intra_epg_isolation = module.params.get('intra_epg_isolation')
+ intersite_multicast_source = module.params.get('intersite_multicast_source')
+ proxy_arp = module.params.get('proxy_arp')
+ subnets = module.params.get('subnets')
+ state = module.params.get('state')
+ preferred_group = module.params.get('preferred_group')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if schema_obj:
+ schema_id = schema_obj.get('id')
+ else:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get ANP
+ anps = [a.get('name') for a in schema_obj.get('templates')[template_idx]['anps']]
+ if anp not in anps:
+ mso.fail_json(msg="Provided anp '{0}' does not exist. Existing anps: {1}".format(anp, ', '.join(anps)))
+ anp_idx = anps.index(anp)
+
+ # Get EPG
+ epgs = [e.get('name') for e in schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs']]
+ if epg is not None and epg in epgs:
+ epg_idx = epgs.index(epg)
+ mso.existing = schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs'][epg_idx]
+
+ if state == 'query':
+ if epg is None:
+ mso.existing = schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs']
+ elif not mso.existing:
+ mso.fail_json(msg="EPG '{epg}' not found".format(epg=epg))
+
+ if 'bdRef' in mso.existing:
+ mso.existing['bdRef'] = mso.dict_from_ref(mso.existing['bdRef'])
+ if 'vrfRef' in mso.existing:
+ mso.existing['vrfRef'] = mso.dict_from_ref(mso.existing['vrfRef'])
+ mso.exit_json()
+
+ epgs_path = '/templates/{0}/anps/{1}/epgs'.format(template, anp)
+ epg_path = '/templates/{0}/anps/{1}/epgs/{2}'.format(template, anp, epg)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=epg_path))
+
+ elif state == 'present':
+ bd_ref = mso.make_reference(bd, 'bd', schema_id, template)
+ vrf_ref = mso.make_reference(vrf, 'vrf', schema_id, template)
+ mso.stdout = str(subnets)
+ subnets = mso.make_subnets(subnets)
+
+ if display_name is None and not mso.existing:
+ display_name = epg
+
+ payload = dict(
+ name=epg,
+ displayName=display_name,
+ uSegEpg=useg_epg,
+ intraEpg=intra_epg_isolation,
+ mCastSource=intersite_multicast_source,
+ proxyArp=proxy_arp,
+ # FIXME: Missing functionality
+ # uSegAttrs=[],
+ subnets=subnets,
+ bdRef=bd_ref,
+ preferredGroup=preferred_group,
+ vrfRef=vrf_ref,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ # Clean contractRef to fix api issue
+ for contract in mso.sent.get('contractRelationships'):
+ contract['contractRef'] = mso.dict_from_ref(contract.get('contractRef'))
+ ops.append(dict(op='replace', path=epg_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=epgs_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if 'epgRef' in mso.previous:
+ del mso.previous['epgRef']
+ if 'bdRef' in mso.previous and mso.previous['bdRef'] != '':
+ mso.previous['bdRef'] = mso.dict_from_ref(mso.previous['bdRef'])
+ if 'vrfRef' in mso.previous and mso.previous['bdRef'] != '':
+ mso.previous['vrfRef'] = mso.dict_from_ref(mso.previous['vrfRef'])
+
+ if not module.check_mode and mso.proposed != mso.previous:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg_contract.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg_contract.py
new file mode 100644
index 00000000..cdf9692f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg_contract.py
@@ -0,0 +1,266 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_anp_epg_contract
+short_description: Manage EPG contracts in schema templates
+description:
+- Manage EPG contracts in schema templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template to change.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the ANP.
+ type: str
+ required: yes
+ epg:
+ description:
+ - The name of the EPG to manage.
+ type: str
+ required: yes
+ contract:
+ description:
+ - A contract associated to this EPG.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the Contract to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced BD.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced BD.
+ type: str
+ type:
+ description:
+ - The type of contract.
+ type: str
+ required: true
+ choices: [ consumer, provider ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_template_anp_epg
+- module: cisco.mso.mso_schema_template_contract_filter
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a contract to an EPG
+ cisco.mso.mso_schema_template_anp_epg_contract:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ contract:
+ name: Contract 1
+ type: consumer
+ state: present
+ delegate_to: localhost
+
+- name: Remove a Contract
+ cisco.mso.mso_schema_template_anp_epg_contract:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ contract:
+ name: Contract 1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific Contract
+ cisco.mso.mso_schema_template_anp_epg_contract:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ contract:
+ name: Contract 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all Contracts
+ cisco.mso.mso_schema_template_anp_epg_contract:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_contractref_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ anp=dict(type='str', required=True),
+ epg=dict(type='str', required=True),
+ contract=dict(type='dict', options=mso_contractref_spec()),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['contract']],
+ ['state', 'present', ['contract']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ epg = module.params.get('epg')
+ contract = module.params.get('contract')
+ if contract is not None and contract.get('template') is not None:
+ contract['template'] = contract.get('template').replace(' ', '')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ if contract:
+ if contract.get('schema') is None:
+ contract['schema'] = schema
+ contract['schema_id'] = mso.lookup_schema(contract.get('schema'))
+ if contract.get('template') is None:
+ contract['template'] = template
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get ANP
+ anps = [a.get('name') for a in schema_obj.get('templates')[template_idx]['anps']]
+ if anp not in anps:
+ mso.fail_json(msg="Provided anp '{0}' does not exist. Existing anps: {1}".format(anp, ', '.join(anps)))
+ anp_idx = anps.index(anp)
+
+ # Get EPG
+ epgs = [e.get('name') for e in schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs']]
+ if epg not in epgs:
+ mso.fail_json(msg="Provided epg '{epg}' does not exist. Existing epgs: {epgs}".format(epg=epg, epgs=', '.join(epgs)))
+ epg_idx = epgs.index(epg)
+
+ # Get Contract
+ if contract:
+ contracts = [(c.get('contractRef'),
+ c.get('relationshipType')) for c in schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs'][epg_idx]['contractRelationships']]
+ contract_ref = mso.contract_ref(**contract)
+ if (contract_ref, contract.get('type')) in contracts:
+ contract_idx = contracts.index((contract_ref, contract.get('type')))
+ contract_path = '/templates/{0}/anps/{1}/epgs/{2}/contractRelationships/{3}'.format(template, anp, epg, contract_idx)
+ mso.existing = schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs'][epg_idx]['contractRelationships'][contract_idx]
+
+ if state == 'query':
+ if not contract:
+ mso.existing = schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs'][epg_idx]['contractRelationships']
+ elif not mso.existing:
+ mso.fail_json(msg="Contract '{0}' not found".format(contract_ref))
+
+ if 'contractRef' in mso.existing:
+ mso.existing['contractRef'] = mso.dict_from_ref(mso.existing.get('contractRef'))
+ mso.exit_json()
+
+ contracts_path = '/templates/{0}/anps/{1}/epgs/{2}/contractRelationships'.format(template, anp, epg)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=contract_path))
+
+ elif state == 'present':
+ payload = dict(
+ relationshipType=contract.get('type'),
+ contractRef=dict(
+ contractName=contract.get('name'),
+ templateName=contract.get('template'),
+ schemaId=contract.get('schema_id'),
+ ),
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=contract_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=contracts_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if 'contractRef' in mso.previous:
+ mso.previous['contractRef'] = mso.dict_from_ref(mso.previous.get('contractRef'))
+ if not module.check_mode and mso.proposed != mso.previous:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg_selector.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg_selector.py
new file mode 100644
index 00000000..d77c197d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg_selector.py
@@ -0,0 +1,281 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_anp_epg_selector
+short_description: Manage EPG selector in schema templates
+description:
+- Manage EPG selector in schema templates on Cisco ACI Multi-Site.
+author:
+- Cindy Zhao (@cizhao)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template to change.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the ANP.
+ type: str
+ required: yes
+ epg:
+ description:
+ - The name of the EPG to manage.
+ type: str
+ required: yes
+ selector:
+ description:
+ - The name of the selector.
+ type: str
+ expressions:
+ description:
+ - Expressions associated to this selector.
+ type: list
+ elements: dict
+ suboptions:
+ type:
+ description:
+ - The name of the expression.
+ required: true
+ type: str
+ aliases: [ tag ]
+ operator:
+ description:
+ - The operator associated to the expression.
+ required: true
+ type: str
+ choices: [ not_in, in, equals, not_equals, has_key, does_not_have_key ]
+ value:
+ description:
+ - The value associated to the expression.
+ - If the operator is in or not_in, the value should be a comma separated str.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_template_anp_epg
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a selector to an EPG
+ cisco.mso.mso_schema_template_anp_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ selector: selector_1
+ expressions:
+ - type: expression_1
+ operator: in
+ value: test
+ state: present
+ delegate_to: localhost
+
+- name: Remove a Selector
+ cisco.mso.mso_schema_template_anp_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ selector: selector_1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific Selector
+ cisco.mso.mso_schema_template_anp_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ selector: selector_1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all Selectors
+ cisco.mso.mso_schema_template_anp_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_expression_spec
+
+EXPRESSION_KEYS = {
+ 'not_in': 'notIn',
+ 'not_equals': 'notEquals',
+ 'has_key': 'keyExist',
+ 'does_not_have_key': 'keyNotExist',
+ 'in': 'in',
+ 'equals': 'equals',
+}
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ anp=dict(type='str', required=True),
+ epg=dict(type='str', required=True),
+ selector=dict(type='str'),
+ expressions=dict(type='list', elements='dict', options=mso_expression_spec()),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['selector']],
+ ['state', 'present', ['selector']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ epg = module.params.get('epg')
+ selector = module.params.get('selector')
+ expressions = module.params.get('expressions')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{template}' does not exist. Existing templates: {templates}".format(template=template,
+ templates=', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get ANP
+ anps = [a.get('name') for a in schema_obj.get('templates')[template_idx]['anps']]
+ if anp not in anps:
+ mso.fail_json(msg="Provided anp '{anp}' does not exist. Existing anps: {anps}".format(anp=anp, anps=', '.join(anps)))
+ anp_idx = anps.index(anp)
+
+ # Get EPG
+ epgs = [e.get('name') for e in schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs']]
+ if epg not in epgs:
+ mso.fail_json(msg="Provided epg '{epg}' does not exist. Existing epgs: {epgs}".format(epg=epg, epgs=', '.join(epgs)))
+ epg_idx = epgs.index(epg)
+
+ # Get Selector
+ if selector and " " in selector:
+ mso.fail_json(msg="There should not be any space in selector name.")
+ selectors = [s.get('name') for s in schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs'][epg_idx]['selectors']]
+ if selector in selectors:
+ selector_idx = selectors.index(selector)
+ selector_path = '/templates/{0}/anps/{1}/epgs/{2}/selectors/{3}'.format(template, anp, epg, selector_idx)
+ mso.existing = schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs'][epg_idx]['selectors'][selector_idx]
+
+ if state == 'query':
+ if selector is None:
+ mso.existing = schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs'][epg_idx]['selectors']
+ elif not mso.existing:
+ mso.fail_json(msg="Selector '{selector}' not found".format(selector=selector))
+ mso.exit_json()
+
+ selectors_path = '/templates/{0}/anps/{1}/epgs/{2}/selectors/-'.format(template, anp, epg)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=selector_path))
+
+ elif state == 'present':
+ # Get expressions
+ all_expressions = []
+ if expressions:
+ for expression in expressions:
+ tag = expression.get('type')
+ operator = expression.get('operator')
+ value = expression.get('value')
+ if " " in tag:
+ mso.fail_json(msg="There should not be any space in 'type' attribute of expression '{0}'".format(tag))
+ if operator in ["has_key", "does_not_have_key"] and value:
+ mso.fail_json(
+ msg="Attribute 'value' is not supported for operator '{0}' in expression '{1}'".format(operator, tag))
+ if operator in ["not_in", "in", "equals", "not_equals"] and not value:
+ mso.fail_json(
+ msg="Attribute 'value' needed for operator '{0}' in expression '{1}'".format(operator, tag))
+ all_expressions.append(dict(
+ key='Custom:' + tag,
+ operator=EXPRESSION_KEYS.get(operator),
+ value=value,
+ ))
+
+ payload = dict(
+ name=selector,
+ expressions=all_expressions,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=selector_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=selectors_path, value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode and mso.existing != mso.previous:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg_subnet.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg_subnet.py
new file mode 100644
index 00000000..109827ea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_anp_epg_subnet.py
@@ -0,0 +1,266 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_anp_epg_subnet
+short_description: Manage EPG subnets in schema templates
+description:
+- Manage EPG subnets in schema templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template to change.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the ANP.
+ type: str
+ required: yes
+ epg:
+ description:
+ - The name of the EPG to manage.
+ type: str
+ required: yes
+ subnet:
+ description:
+ - The IP range in CIDR notation.
+ type: str
+ required: true
+ aliases: [ ip ]
+ description:
+ description:
+ - The description of this subnet.
+ type: str
+ scope:
+ description:
+ - The scope of the subnet.
+ type: str
+ default: private
+ choices: [ private, public ]
+ shared:
+ description:
+ - Whether this subnet is shared between VRFs.
+ type: bool
+ no_default_gateway:
+ description:
+ - Whether this subnet has a default gateway.
+ type: bool
+ querier:
+ description:
+ - Whether this subnet is an IGMP querier.
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- Due to restrictions of the MSO REST API concurrent modifications to EPG subnets can be dangerous and corrupt data.
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new subnet to an EPG
+ cisco.mso.mso_schema_template_anp_epg_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ subnet: 10.0.0.0/24
+ state: present
+ delegate_to: localhost
+
+- name: Remove a subnet from an EPG
+ cisco.mso.mso_schema_template_anp_epg_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ subnet: 10.0.0.0/24
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific EPG subnet
+ cisco.mso.mso_schema_template_anp_epg_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ epg: EPG 1
+ subnet: 10.0.0.0/24
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all EPGs subnets
+ cisco.mso.mso_schema_template_anp_epg_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ anp: ANP 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_subnet_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ anp=dict(type='str', required=True),
+ epg=dict(type='str', required=True),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+ argument_spec.update(mso_subnet_spec())
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['subnet']],
+ ['state', 'present', ['subnet']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ epg = module.params.get('epg')
+ subnet = module.params.get('subnet')
+ description = module.params.get('description')
+ scope = module.params.get('scope')
+ shared = module.params.get('shared')
+ no_default_gateway = module.params.get('no_default_gateway')
+ querier = module.params.get('querier')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{template}' does not exist. Existing templates: {templates}".format(template=template,
+ templates=', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get ANP
+ anps = [a.get('name') for a in schema_obj.get('templates')[template_idx]['anps']]
+ if anp not in anps:
+ mso.fail_json(msg="Provided anp '{anp}' does not exist. Existing anps: {anps}".format(anp=anp, anps=', '.join(anps)))
+ anp_idx = anps.index(anp)
+
+ # Get EPG
+ epgs = [e.get('name') for e in schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs']]
+ if epg not in epgs:
+ mso.fail_json(msg="Provided epg '{epg}' does not exist. Existing epgs: {epgs}".format(epg=epg, epgs=', '.join(epgs)))
+ epg_idx = epgs.index(epg)
+
+ # Get Subnet
+ subnets = [s.get('ip') for s in schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs'][epg_idx]['subnets']]
+ if subnet in subnets:
+ subnet_idx = subnets.index(subnet)
+ # FIXME: Changes based on index are DANGEROUS
+ subnet_path = '/templates/{0}/anps/{1}/epgs/{2}/subnets/{3}'.format(template, anp, epg, subnet_idx)
+ mso.existing = schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs'][epg_idx]['subnets'][subnet_idx]
+
+ if state == 'query':
+ if subnet is None:
+ mso.existing = schema_obj.get('templates')[template_idx]['anps'][anp_idx]['epgs'][epg_idx]['subnets']
+ elif not mso.existing:
+ mso.fail_json(msg="Subnet '{subnet}' not found".format(subnet=subnet))
+ mso.exit_json()
+
+ subnets_path = '/templates/{0}/anps/{1}/epgs/{2}/subnets'.format(template, anp, epg)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.existing = {}
+ ops.append(dict(op='remove', path=subnet_path))
+
+ elif state == 'present':
+ if not mso.existing:
+ if description is None:
+ description = subnet
+ if scope is None:
+ scope = 'private'
+ if shared is None:
+ shared = False
+ if no_default_gateway is None:
+ no_default_gateway = False
+ if querier is None:
+ querier = False
+
+ payload = dict(
+ ip=subnet,
+ description=description,
+ scope=scope,
+ shared=shared,
+ noDefaultGateway=no_default_gateway,
+ querier=querier,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=subnet_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=subnets_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_bd.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_bd.py
new file mode 100644
index 00000000..0e7d0ff0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_bd.py
@@ -0,0 +1,444 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_bd
+short_description: Manage Bridge Domains (BDs) in schema templates
+description:
+- Manage BDs in schema templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+- Shreyas Srish (@shrsr)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ - Display Name of template for operations can only be used in some versions of mso.
+ - Use the name of template instead of Display Name to avoid discrepency.
+ type: str
+ required: yes
+ bd:
+ description:
+ - The name of the BD to manage.
+ type: str
+ aliases: [ name ]
+ display_name:
+ description:
+ - The name as displayed on the MSO web interface.
+ type: str
+ vrf:
+ description:
+ - The VRF associated to this BD. This is required only when creating a new BD.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the VRF to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced VRF.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced VRF.
+ - If this parameter is unspecified, it defaults to the current template.
+ type: str
+ dhcp_policy:
+ description:
+ - The DHCP Policy
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the DHCP Relay Policy
+ type: str
+ required: yes
+ version:
+ description:
+ - The version of DHCP Relay Policy
+ type: int
+ required: yes
+ dhcp_option_policy:
+ description:
+ - The DHCP Option Policy
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the DHCP Option Policy
+ type: str
+ version:
+ description:
+ - The version of the DHCP Option Policy
+ type: int
+ subnets:
+ description:
+ - The subnets associated to this BD.
+ type: list
+ elements: dict
+ suboptions:
+ subnet:
+ description:
+ - The IP range in CIDR notation.
+ type: str
+ required: true
+ aliases: [ ip ]
+ description:
+ description:
+ - The description of this subnet.
+ type: str
+ scope:
+ description:
+ - The scope of the subnet.
+ type: str
+ default: private
+ choices: [ private, public ]
+ shared:
+ description:
+ - Whether this subnet is shared between VRFs.
+ type: bool
+ no_default_gateway:
+ description:
+ - Whether this subnet has a default gateway.
+ type: bool
+ querier:
+ description:
+ - Whether this subnet is an IGMP querier.
+ type: bool
+ intersite_bum_traffic:
+ description:
+ - Whether to allow intersite BUM traffic.
+ type: bool
+ optimize_wan_bandwidth:
+ description:
+ - Whether to optimize WAN bandwidth.
+ type: bool
+ layer2_stretch:
+ description:
+ - Whether to enable L2 stretch.
+ type: bool
+ default: true
+ layer2_unknown_unicast:
+ description:
+ - Layer2 unknown unicast.
+ type: str
+ choices: [ flood, proxy ]
+ layer3_multicast:
+ description:
+ - Whether to enable L3 multicast.
+ type: bool
+ unknown_multicast_flooding:
+ description:
+ - Unknown Multicast Flooding can either be Flood or Optimized Flooding
+ type: str
+ choices: [ flood, optimized_flooding ]
+ multi_destination_flooding:
+ description:
+ - Multi-Destination Flooding can either be Flood in BD or just Drop
+ type: str
+ choices: [ flood_in_bd, drop ]
+ ipv6_unknown_multicast_flooding:
+ description:
+ - IPv6 Unknown Multicast Flooding can either be Flood or Optimized Flooding
+ type: str
+ choices: [ flood, optimized_flooding ]
+ arp_flooding:
+ description:
+ - ARP Flooding
+ type: bool
+ virtual_mac_address:
+ description:
+ - Virtual MAC Address
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new BD
+ cisco.mso.mso_schema_template_bd:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ bd: BD 1
+ vrf:
+ name: VRF1
+ state: present
+ delegate_to: localhost
+
+- name: Add a new BD from another Schema
+ mso_schema_template_bd:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ bd: BD 1
+ vrf:
+ name: VRF1
+ schema: Schema Origin
+ template: Template Origin
+ state: present
+ delegate_to: localhost
+
+- name: Add bd with options available on version 3.1
+ mso_schema_template_bd:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ bd: BD 1
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: false
+ layer2_stretch: true
+ layer2_unknown_unicast: flood
+ layer3_multicast: false
+ unknown_multicast_flooding: flood
+ multi_destination_flooding: drop
+ ipv6_unknown_multicast_flooding: flood
+ arp_flooding: false
+ virtual_mac_address: 00:00:5E:00:01:3C
+ subnets:
+ - subnet: 10.0.0.128/24
+ - subnet: 10.0.1.254/24
+ description: 1234567890
+ - ip: 192.168.0.254/24
+ description: "My description for a subnet"
+ scope: private
+ shared: false
+ no_default_gateway: true
+ vrf:
+ name: vrf1
+ schema: Test
+ template: Template1
+ dhcp_policy:
+ name: ansible_test
+ version: 1
+ dhcp_option_policy:
+ name: ansible_test_option
+ version: 1
+
+- name: Remove an BD
+ cisco.mso.mso_schema_template_bd:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ bd: BD1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific BDs
+ cisco.mso.mso_schema_template_bd:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ bd: BD1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all BDs
+ cisco.mso.mso_schema_template_bd:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_reference_spec, mso_subnet_spec, mso_dhcp_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ bd=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ display_name=dict(type='str'),
+ intersite_bum_traffic=dict(type='bool'),
+ optimize_wan_bandwidth=dict(type='bool'),
+ layer2_stretch=dict(type='bool', default='true'),
+ layer2_unknown_unicast=dict(type='str', choices=['flood', 'proxy']),
+ layer3_multicast=dict(type='bool'),
+ vrf=dict(type='dict', options=mso_reference_spec()),
+ dhcp_policy=dict(type='dict', options=mso_dhcp_spec()),
+ subnets=dict(type='list', elements='dict', options=mso_subnet_spec()),
+ unknown_multicast_flooding=dict(type='str', choices=['optimized_flooding', 'flood']),
+ multi_destination_flooding=dict(type='str', choices=['flood_in_bd', 'drop']),
+ ipv6_unknown_multicast_flooding=dict(type='str', choices=['optimized_flooding', 'flood']),
+ arp_flooding=dict(type='bool'),
+ virtual_mac_address=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['bd']],
+ ['state', 'present', ['bd', 'vrf']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ bd = module.params.get('bd')
+ display_name = module.params.get('display_name')
+ intersite_bum_traffic = module.params.get('intersite_bum_traffic')
+ optimize_wan_bandwidth = module.params.get('optimize_wan_bandwidth')
+ layer2_stretch = module.params.get('layer2_stretch')
+ layer2_unknown_unicast = module.params.get('layer2_unknown_unicast')
+ layer3_multicast = module.params.get('layer3_multicast')
+ vrf = module.params.get('vrf')
+ if vrf is not None and vrf.get('template') is not None:
+ vrf['template'] = vrf.get('template').replace(' ', '')
+ dhcp_policy = module.params.get('dhcp_policy')
+ subnets = module.params.get('subnets')
+ unknown_multicast_flooding = module.params.get('unknown_multicast_flooding')
+ multi_destination_flooding = module.params.get('multi_destination_flooding')
+ ipv6_unknown_multicast_flooding = module.params.get('ipv6_unknown_multicast_flooding')
+ arp_flooding = module.params.get('arp_flooding')
+ virtual_mac_address = module.params.get('virtual_mac_address')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Map choices
+ if unknown_multicast_flooding == 'optimized_flooding':
+ unknown_multicast_flooding = 'opt-flood'
+ if ipv6_unknown_multicast_flooding == 'optimized_flooding':
+ ipv6_unknown_multicast_flooding = 'opt-flood'
+ if multi_destination_flooding == 'flood_in_bd':
+ multi_destination_flooding = 'bd-flood'
+
+ if layer2_unknown_unicast == 'flood':
+ arp_flooding = True
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if schema_obj:
+ schema_id = schema_obj.get('id')
+ else:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get BDs
+ bds = [b.get('name') for b in schema_obj.get('templates')[template_idx]['bds']]
+
+ if bd is not None and bd in bds:
+ bd_idx = bds.index(bd)
+ mso.existing = schema_obj.get('templates')[template_idx]['bds'][bd_idx]
+
+ if state == 'query':
+ if bd is None:
+ mso.existing = schema_obj.get('templates')[template_idx]['bds']
+ elif not mso.existing:
+ mso.fail_json(msg="BD '{bd}' not found".format(bd=bd))
+ mso.exit_json()
+
+ bds_path = '/templates/{0}/bds'.format(template)
+ bd_path = '/templates/{0}/bds/{1}'.format(template, bd)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=bd_path))
+
+ elif state == 'present':
+ vrf_ref = mso.make_reference(vrf, 'vrf', schema_id, template)
+ subnets = mso.make_subnets(subnets)
+ dhcp_label = mso.make_dhcp_label(dhcp_policy)
+
+ if display_name is None and not mso.existing:
+ display_name = bd
+ if subnets is None and not mso.existing:
+ subnets = []
+
+ payload = dict(
+ name=bd,
+ displayName=display_name,
+ intersiteBumTrafficAllow=intersite_bum_traffic,
+ optimizeWanBandwidth=optimize_wan_bandwidth,
+ l2UnknownUnicast=layer2_unknown_unicast,
+ l2Stretch=layer2_stretch,
+ l3MCast=layer3_multicast,
+ subnets=subnets,
+ vrfRef=vrf_ref,
+ dhcpLabel=dhcp_label,
+ unkMcastAct=unknown_multicast_flooding,
+ multiDstPktAct=multi_destination_flooding,
+ v6unkMcastAct=ipv6_unknown_multicast_flooding,
+ vmac=virtual_mac_address,
+ arpFlood=arp_flooding,
+ )
+
+ mso.sanitize(payload, collate=True, required=['dhcpLabel'])
+ if mso.existing:
+ ops.append(dict(op='replace', path=bd_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=bds_path + '/-', value=mso.sent))
+ mso.existing = mso.proposed
+
+ if 'bdRef' in mso.previous:
+ del mso.previous['bdRef']
+ if 'vrfRef' in mso.previous:
+ mso.previous['vrfRef'] = mso.vrf_dict_from_ref(mso.previous.get('vrfRef'))
+
+ if not module.check_mode and mso.proposed != mso.previous:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_bd_subnet.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_bd_subnet.py
new file mode 100644
index 00000000..fd95c311
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_bd_subnet.py
@@ -0,0 +1,253 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_bd_subnet
+short_description: Manage BD subnets in schema templates
+description:
+- Manage BD subnets in schema templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template to change.
+ type: str
+ required: yes
+ bd:
+ description:
+ - The name of the BD to manage.
+ type: str
+ required: yes
+ subnet:
+ description:
+ - The IP range in CIDR notation.
+ type: str
+ aliases: [ ip ]
+ description:
+ description:
+ - The description of this subnet.
+ type: str
+ is_virtual_ip:
+ description:
+ - Treat as Virtual IP Address
+ type: bool
+ default: false
+ scope:
+ description:
+ - The scope of the subnet.
+ type: str
+ default: private
+ choices: [ private, public ]
+ shared:
+ description:
+ - Whether this subnet is shared between VRFs.
+ type: bool
+ no_default_gateway:
+ description:
+ - Whether this subnet has a default gateway.
+ type: bool
+ querier:
+ description:
+ - Whether this subnet is an IGMP querier.
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- Due to restrictions of the MSO REST API concurrent modifications to BD subnets can be dangerous and corrupt data.
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new subnet to a BD
+ cisco.mso.mso_schema_template_bd_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ bd: BD 1
+ subnet: 10.0.0.0/24
+ state: present
+ delegate_to: localhost
+
+- name: Remove a subset from a BD
+ cisco.mso.mso_schema_template_bd_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ bd: BD 1
+ subnet: 10.0.0.0/24
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific BD subnet
+ cisco.mso.mso_schema_template_bd_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ bd: BD 1
+ subnet: 10.0.0.0/24
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all BD subnets
+ cisco.mso.mso_schema_template_bd_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ bd: BD 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ bd=dict(type='str', required=True),
+ subnet=dict(type='str', aliases=['ip']),
+ description=dict(type='str'),
+ is_virtual_ip=dict(type='bool', default=False),
+ scope=dict(type='str', default='private', choices=['private', 'public']),
+ shared=dict(type='bool', default=False),
+ no_default_gateway=dict(type='bool', default=False),
+ querier=dict(type='bool', default=False),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['subnet']],
+ ['state', 'present', ['subnet']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ bd = module.params.get('bd')
+ subnet = module.params.get('subnet')
+ description = module.params.get('description')
+ is_virtual_ip = module.params.get('is_virtual_ip')
+ scope = module.params.get('scope')
+ shared = module.params.get('shared')
+ no_default_gateway = module.params.get('no_default_gateway')
+ querier = module.params.get('querier')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get BD
+ bds = [b.get('name') for b in schema_obj.get('templates')[template_idx]['bds']]
+ if bd not in bds:
+ mso.fail_json(msg="Provided BD '{0}' does not exist. Existing BDs: {1}".format(bd, ', '.join(bds)))
+ bd_idx = bds.index(bd)
+
+ # Get Subnet
+ subnets = [s.get('ip') for s in schema_obj.get('templates')[template_idx]['bds'][bd_idx]['subnets']]
+ if subnet in subnets:
+ subnet_idx = subnets.index(subnet)
+ # FIXME: Changes based on index are DANGEROUS
+ subnet_path = '/templates/{0}/bds/{1}/subnets/{2}'.format(template, bd, subnet_idx)
+ mso.existing = schema_obj.get('templates')[template_idx]['bds'][bd_idx]['subnets'][subnet_idx]
+
+ if state == 'query':
+ if subnet is None:
+ mso.existing = schema_obj.get('templates')[template_idx]['bds'][bd_idx]['subnets']
+ elif not mso.existing:
+ mso.fail_json(msg="Subnet IP '{subnet}' not found".format(subnet=subnet))
+ mso.exit_json()
+
+ subnets_path = '/templates/{0}/bds/{1}/subnets'.format(template, bd)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=subnet_path))
+
+ elif state == 'present':
+ if not mso.existing:
+ if description is None:
+ description = subnet
+
+ payload = dict(
+ ip=subnet,
+ description=description,
+ virtual=is_virtual_ip,
+ scope=scope,
+ shared=shared,
+ noDefaultGateway=no_default_gateway,
+ querier=querier,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=subnet_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=subnets_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_contract_filter.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_contract_filter.py
new file mode 100644
index 00000000..ab5d0466
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_contract_filter.py
@@ -0,0 +1,352 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_contract_filter
+short_description: Manage contract filters in schema templates
+description:
+- Manage contract filters in schema templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ contract:
+ description:
+ - The name of the contract to manage.
+ type: str
+ required: yes
+ contract_display_name:
+ description:
+ - The name as displayed on the MSO web interface.
+ - This defaults to the contract name when unset on creation.
+ type: str
+ contract_filter_type:
+ description:
+ - The type of filters defined in this contract.
+ - This defaults to C(both-way) when unset on creation.
+ default: both-way
+ type: str
+ choices: [ both-way, one-way ]
+ contract_scope:
+ description:
+ - The scope of the contract.
+ - This defaults to C(vrf) when unset on creation.
+ type: str
+ choices: [ application-profile, global, tenant, vrf ]
+ filter:
+ description:
+ - The filter to associate with this contract.
+ type: str
+ aliases: [ name ]
+ filter_template:
+ description:
+ - The template name in which the filter is located.
+ type: str
+ filter_schema:
+ description:
+ - The schema name in which the filter is located.
+ type: str
+ filter_type:
+ description:
+ - The type of filter to manage.
+ type: str
+ choices: [ both-way, consumer-to-provider, provider-to-consumer ]
+ default: both-way
+ aliases: [ type ]
+ filter_directives:
+ description:
+ - A list of filter directives.
+ type: list
+ elements: str
+ choices: [ log, none, policy_compression ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_template_filter_entry
+notes:
+- Due to restrictions of the MSO REST API this module creates contracts when needed, and removes them when the last filter has been removed.
+- Due to restrictions of the MSO REST API concurrent modifications to contract filters can be dangerous and corrupt data.
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new contract filter
+ cisco.mso.mso_schema_template_contract_filter:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ contract: Contract 1
+ contract_scope: global
+ filter: Filter 1
+ state: present
+ delegate_to: localhost
+
+- name: Remove a contract filter
+ cisco.mso.mso_schema_template_contract_filter:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ contract: Contract 1
+ filter: Filter 1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific contract filter
+ cisco.mso.mso_schema_template_contract_filter:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ contract: Contract 1
+ filter: Filter 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all contract filters
+ cisco.mso.mso_schema_template_contract_filter:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ contract: Contract 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+FILTER_KEYS = {
+ 'both-way': 'filterRelationships',
+ 'consumer-to-provider': 'filterRelationshipsConsumerToProvider',
+ 'provider-to-consumer': 'filterRelationshipsProviderToConsumer',
+}
+
+
+def main():
+
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ contract=dict(type='str', required=True),
+ contract_display_name=dict(type='str'),
+ contract_scope=dict(type='str', choices=['application-profile', 'global', 'tenant', 'vrf']),
+ contract_filter_type=dict(type='str', default='both-way', choices=['both-way', 'one-way']),
+ filter=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ filter_directives=dict(type='list', elements='str', choices=['log', 'none', 'policy_compression']),
+ filter_template=dict(type='str'),
+ filter_schema=dict(type='str'),
+ filter_type=dict(type='str', default='both-way', choices=list(FILTER_KEYS), aliases=['type']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['filter']],
+ ['state', 'present', ['filter']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ contract = module.params.get('contract')
+ contract_display_name = module.params.get('contract_display_name')
+ contract_filter_type = module.params.get('contract_filter_type')
+ contract_scope = module.params.get('contract_scope')
+ filter_name = module.params.get('filter')
+ filter_directives = module.params.get('filter_directives')
+ filter_template = module.params.get('filter_template')
+ if filter_template is not None:
+ filter_template = filter_template.replace(' ', '')
+ filter_schema = module.params.get('filter_schema')
+ filter_type = module.params.get('filter_type')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ contract_ftype = 'bothWay' if contract_filter_type == 'both-way' else 'oneWay'
+
+ if contract_filter_type == 'both-way' and filter_type != 'both-way':
+ mso.fail_json(msg="You are adding 'one-way' filters to a 'both-way' contract")
+ elif contract_filter_type != 'both-way' and filter_type == 'both-way':
+ mso.fail_json(msg="You are adding 'both-way' filters to a 'one-way' contract")
+ if filter_template is None:
+ filter_template = template
+
+ if filter_schema is None:
+ filter_schema = schema
+
+ filter_key = FILTER_KEYS.get(filter_type)
+
+ # Get schema object
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ filter_schema_id = mso.lookup_schema(filter_schema)
+ # Get contracts
+
+ mso.existing = {}
+ contract_idx = None
+ filter_idx = None
+ contracts = [c.get('name') for c in schema_obj.get('templates')[template_idx]['contracts']]
+
+ if contract in contracts:
+ contract_idx = contracts.index(contract)
+ contract_obj = schema_obj.get('templates')[template_idx]['contracts'][contract_idx]
+
+ filters = [f.get('filterRef') for f in schema_obj.get('templates')[template_idx]['contracts'][contract_idx][filter_key]]
+ filter_ref = mso.filter_ref(schema_id=filter_schema_id, template=filter_template, filter=filter_name)
+ if filter_ref in filters:
+ filter_idx = filters.index(filter_ref)
+ filter_path = '/templates/{0}/contracts/{1}/{2}/{3}'.format(template, contract, filter_key, filter_name)
+ filter = contract_obj.get(filter_key)[filter_idx]
+ mso.existing = mso.update_filter_obj(contract_obj, filter, filter_type)
+
+ if state == 'query':
+ if contract_idx is None:
+ mso.fail_json(msg="Provided contract '{0}' does not exist. Existing contracts: {1}".format(contract, ', '.join(contracts)))
+
+ if filter_name is None:
+ mso.existing = contract_obj.get(filter_key)
+ for filter in mso.existing:
+ filter = mso.update_filter_obj(contract_obj, filter, filter_type)
+
+ elif not mso.existing:
+ mso.fail_json(msg="FilterRef '{filter_ref}' not found".format(filter_ref=filter_ref))
+ mso.exit_json()
+
+ ops = []
+ contract_path = '/templates/{0}/contracts/{1}'.format(template, contract)
+ filters_path = '/templates/{0}/contracts/{1}/{2}'.format(template, contract, filter_key)
+ mso.previous = mso.existing
+
+ if state == 'absent':
+ mso.proposed = mso.sent = {}
+
+ if contract_idx is None:
+ # There was no contract to begin with
+ pass
+ elif filter_idx is None:
+ # There was no filter to begin with
+ pass
+ elif len(filters) == 1:
+ # There is only one filter, remove contract
+ mso.existing = {}
+ ops.append(dict(op='remove', path=contract_path))
+ else:
+ # Remove filter
+ mso.existing = {}
+ ops.append(dict(op='remove', path=filter_path))
+
+ elif state == 'present':
+ if filter_directives is None:
+ filter_directives = ['none']
+
+ if 'policy_compression' in filter_directives:
+ filter_directives.remove('policy_compression')
+ filter_directives.append('no_stats')
+
+ payload = dict(
+ filterRef=dict(
+ filterName=filter_name,
+ templateName=filter_template,
+ schemaId=filter_schema_id,
+ ),
+ directives=filter_directives,
+ )
+
+ mso.sanitize(payload, collate=True, unwanted=['filterType', 'contractScope', 'contractFilterType'])
+ mso.existing = mso.sent
+ if contract_scope is None or contract_scope == 'vrf':
+ contract_scope = 'context'
+ if contract_idx is None:
+ # Contract does not exist, so we have to create it
+ if contract_display_name is None:
+ contract_display_name = contract
+ payload = {
+ 'name': contract,
+ 'displayName': contract_display_name,
+ 'filterType': contract_ftype,
+ 'scope': contract_scope,
+ }
+ ops.append(dict(op='add', path='/templates/{0}/contracts/-'.format(template), value=payload))
+
+ else:
+ # Contract exists, but may require an update
+ if contract_display_name is not None:
+ ops.append(dict(op='replace', path=contract_path + '/displayName', value=contract_display_name))
+ ops.append(dict(op='replace', path=contract_path + '/filterType', value=contract_ftype))
+ ops.append(dict(op='replace', path=contract_path + '/scope', value=contract_scope))
+
+ if contract_display_name:
+ mso.existing['displayName'] = contract_display_name
+ else:
+ mso.existing['displayName'] = contract_obj.get('displayName')
+ mso.existing['filterType'] = filter_type
+ mso.existing['contractScope'] = contract_scope
+ mso.existing['contractFilterType'] = contract_ftype
+
+ if filter_idx is None:
+ # Filter does not exist, so we have to add it
+ ops.append(dict(op='add', path=filters_path + '/-', value=mso.sent))
+
+ else:
+ # Filter exists, we have to update it
+ ops.append(dict(op='replace', path=filter_path, value=mso.sent))
+
+ if not module.check_mode and mso.existing != mso.previous:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_deploy.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_deploy.py
new file mode 100644
index 00000000..a05c618f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_deploy.py
@@ -0,0 +1,143 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_deploy
+short_description: Deploy schema templates to sites
+description:
+- Deploy schema templates to sites.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ aliases: [ name ]
+ site:
+ description:
+ - The name of the site B(to undeploy).
+ type: str
+ state:
+ description:
+ - Use C(deploy) to deploy schema template.
+ - Use C(status) to get deployment status.
+ - Use C(undeploy) to deploy schema template from a site.
+ type: str
+ choices: [ deploy, status, undeploy ]
+ default: deploy
+seealso:
+- module: cisco.mso.mso_schema_site
+- module: cisco.mso.mso_schema_template
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Deploy a schema template
+ cisco.mso.mso_schema_template_deploy:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ state: deploy
+ delegate_to: localhost
+
+- name: Undeploy a schema template
+ cisco.mso.mso_schema_template_deploy:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ site: Site 1
+ state: undeploy
+ delegate_to: localhost
+
+- name: Get deployment status
+ cisco.mso.mso_schema:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ state: status
+ delegate_to: localhost
+ register: status_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True, aliases=['name']),
+ site=dict(type='str'),
+ state=dict(type='str', default='deploy', choices=['deploy', 'status', 'undeploy']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'undeploy', ['site']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ site = module.params.get('site')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema
+ schema_id = mso.lookup_schema(schema)
+
+ payload = dict(
+ schemaId=schema_id,
+ templateName=template,
+ )
+
+ qs = None
+ if state == 'deploy':
+ path = 'execute/schema/{0}/template/{1}'.format(schema_id, template)
+ elif state == 'status':
+ path = 'status/schema/{0}/template/{1}'.format(schema_id, template)
+ elif state == 'undeploy':
+ path = 'execute/schema/{0}/template/{1}'.format(schema_id, template)
+ site_id = mso.lookup_site(site)
+ qs = dict(undeploy=site_id)
+
+ if not module.check_mode:
+ status = mso.request(path, method='GET', data=payload, qs=qs)
+ mso.exit_json(**status)
+ else:
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg.py
new file mode 100644
index 00000000..1831cb85
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg.py
@@ -0,0 +1,332 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_external_epg
+short_description: Manage external EPGs in schema templates
+description:
+- Manage external EPGs in schema templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ external_epg:
+ description:
+ - The name of the external EPG to manage.
+ type: str
+ aliases: [ name, externalepg ]
+ type:
+ description:
+ - The type of external epg.
+ - anp needs to be associated with external epg when the type is cloud.
+ - l3out can be associated with external epg when the type is on-premise.
+ type: str
+ choices: [ on-premise, cloud ]
+ default: on-premise
+ display_name:
+ description:
+ - The name as displayed on the MSO web interface.
+ type: str
+ vrf:
+ description:
+ - The VRF associated with the external epg.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the VRF to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced VRF.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced VRF.
+ - If this parameter is unspecified, it defaults to the current template.
+ type: str
+ l3out:
+ description:
+ - The L3Out associated with the external epg.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the L3Out to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced L3Out.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced L3Out.
+ - If this parameter is unspecified, it defaults to the current template.
+ type: str
+ anp:
+ description:
+ - The anp associated with the external epg.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the anp to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced anp.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced anp.
+ - If this parameter is unspecified, it defaults to the current template.
+ type: str
+ preferred_group:
+ description:
+ - Preferred Group is enabled for this External EPG or not.
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new external EPG
+ cisco.mso.mso_schema_template_external_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: External EPG 1
+ vrf:
+ name: VRF
+ schema: Schema 1
+ template: Template 1
+ state: present
+ delegate_to: localhost
+
+- name: Add a new external EPG with external epg in cloud
+ cisco.mso.mso_schema_template_external_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: External EPG 1
+ type: cloud
+ vrf:
+ name: VRF
+ schema: Schema 1
+ template: Template 1
+ anp:
+ name: ANP1
+ schema: Schema 1
+ template: Template 1
+ state: present
+ delegate_to: localhost
+
+- name: Remove an external EPG
+ cisco.mso.mso_schema_template_external_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: external EPG1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific external EPGs
+ cisco.mso.mso_schema_template_external_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: external EPG1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all external EPGs
+ cisco.mso.mso_schema_template_external_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_reference_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ external_epg=dict(type='str', aliases=['name', 'externalepg']), # This parameter is not required for querying all objects
+ display_name=dict(type='str'),
+ vrf=dict(type='dict', options=mso_reference_spec()),
+ l3out=dict(type='dict', options=mso_reference_spec()),
+ anp=dict(type='dict', options=mso_reference_spec()),
+ preferred_group=dict(type='bool'),
+ type=dict(type='str', default='on-premise', choices=['on-premise', 'cloud']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['external_epg']],
+ ['state', 'present', ['external_epg', 'vrf']],
+ ['type', 'cloud', ['anp']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ external_epg = module.params.get('external_epg')
+ display_name = module.params.get('display_name')
+ vrf = module.params.get('vrf')
+ if vrf is not None and vrf.get('template') is not None:
+ vrf['template'] = vrf.get('template').replace(' ', '')
+ l3out = module.params.get('l3out')
+ if l3out is not None and l3out.get('template') is not None:
+ l3out['template'] = l3out.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ if anp is not None and anp.get('template') is not None:
+ anp['template'] = anp.get('template').replace(' ', '')
+ preferred_group = module.params.get('preferred_group')
+ type_ext_epg = module.params.get('type')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if schema_obj:
+ schema_id = schema_obj.get('id')
+ else:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get external EPGs
+ external_epgs = [e.get('name') for e in schema_obj.get('templates')[template_idx]['externalEpgs']]
+
+ if external_epg is not None and external_epg in external_epgs:
+ external_epg_idx = external_epgs.index(external_epg)
+ mso.existing = schema_obj.get('templates')[template_idx]['externalEpgs'][external_epg_idx]
+ if 'externalEpgRef' in mso.existing:
+ del mso.existing['externalEpgRef']
+ if 'vrfRef' in mso.existing:
+ mso.existing['vrfRef'] = mso.dict_from_ref(mso.existing.get('vrfRef'))
+ if 'l3outRef' in mso.existing:
+ mso.existing['l3outRef'] = mso.dict_from_ref(mso.existing.get('l3outRef'))
+ if 'anpRef' in mso.existing:
+ mso.existing['anpRef'] = mso.dict_from_ref(mso.existing.get('anpRef'))
+
+ if state == 'query':
+ if external_epg is None:
+ mso.existing = schema_obj.get('templates')[template_idx]['externalEpgs']
+ elif not mso.existing:
+ mso.fail_json(msg="External EPG '{external_epg}' not found".format(external_epg=external_epg))
+ mso.exit_json()
+
+ eepgs_path = '/templates/{0}/externalEpgs'.format(template)
+ eepg_path = '/templates/{0}/externalEpgs/{1}'.format(template, external_epg)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=eepg_path))
+
+ elif state == 'present':
+ vrf_ref = mso.make_reference(vrf, 'vrf', schema_id, template)
+ l3out_ref = mso.make_reference(l3out, 'l3out', schema_id, template)
+ anp_ref = mso.make_reference(anp, 'anp', schema_id, template)
+ if display_name is None and not mso.existing:
+ display_name = external_epg
+
+ payload = dict(
+ name=external_epg,
+ displayName=display_name,
+ vrfRef=vrf_ref,
+ preferredGroup=preferred_group,
+ )
+
+ if type_ext_epg == 'cloud':
+ payload['extEpgType'] = 'cloud'
+ payload['anpRef'] = anp_ref
+ else:
+ payload['l3outRef'] = l3out_ref
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ # clean contractRef to fix api issue
+ for contract in mso.sent.get('contractRelationships'):
+ contract['contractRef'] = mso.dict_from_ref(contract.get('contractRef'))
+ ops.append(dict(op='replace', path=eepg_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=eepgs_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg_contract.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg_contract.py
new file mode 100644
index 00000000..9db905bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg_contract.py
@@ -0,0 +1,250 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_external_epg_contract
+short_description: Manage Extrnal EPG contracts in schema templates
+description:
+- Manage External EPG contracts in schema templates on Cisco ACI Multi-Site.
+author:
+- Devarshi Shah (@devarshishah3)
+version_added: '0.0.8'
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template to change.
+ type: str
+ required: yes
+ external_epg:
+ description:
+ - The name of the EPG to manage.
+ type: str
+ required: yes
+ contract:
+ description:
+ - A contract associated to this EPG.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the Contract to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced BD.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced BD.
+ type: str
+ type:
+ description:
+ - The type of contract.
+ type: str
+ required: true
+ choices: [ consumer, provider ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_template_external_epg
+- module: cisco.mso.mso_schema_template_contract_filter
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a contract to an EPG
+ cisco.mso.mso_schema_template_external_epg_contract:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ epg: EPG 1
+ contract:
+ name: Contract 1
+ type: consumer
+ state: present
+ delegate_to: localhost
+
+- name: Remove a Contract
+ cisco.mso.mso_schema_template_external_epg_contract:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ epg: EPG 1
+ contract:
+ name: Contract 1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific Contract
+ cisco.mso.mso_schema_template_external_epg_contract:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ epg: EPG 1
+ contract:
+ name: Contract 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all Contracts
+ cisco.mso.mso_schema_template_external_epg_contract:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_contractref_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ external_epg=dict(type='str', required=True),
+ contract=dict(type='dict', options=mso_contractref_spec()),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['contract']],
+ ['state', 'present', ['contract']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ external_epg = module.params.get('external_epg')
+ contract = module.params.get('contract')
+ if contract is not None and contract.get('template') is not None:
+ contract['template'] = contract.get('template').replace(' ', '')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ if contract:
+ if contract.get('schema') is None:
+ contract['schema'] = schema
+ contract['schema_id'] = mso.lookup_schema(contract.get('schema'))
+ if contract.get('template') is None:
+ contract['template'] = template
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get EPG
+ epgs = [e.get('name') for e in schema_obj.get('templates')[template_idx]['externalEpgs']]
+ if external_epg not in epgs:
+ mso.fail_json(msg="Provided epg '{epg}' does not exist. Existing epgs: {epgs}".format(epg=external_epg, epgs=', '.join(epgs)))
+ epg_idx = epgs.index(external_epg)
+
+ # Get Contract
+ if contract:
+ contracts = [(c.get('contractRef'),
+ c.get('relationshipType')) for c in schema_obj.get('templates')[template_idx]['externalEpgs'][epg_idx]['contractRelationships']]
+ contract_ref = mso.contract_ref(**contract)
+ if (contract_ref, contract.get('type')) in contracts:
+ contract_idx = contracts.index((contract_ref, contract.get('type')))
+ contract_path = '/templates/{0}/externalEpgs/{1}/contractRelationships/{2}'.format(template, external_epg, contract_idx)
+ mso.existing = schema_obj.get('templates')[template_idx]['externalEpgs'][epg_idx]['contractRelationships'][contract_idx]
+
+ if state == 'query':
+ if not contract:
+ mso.existing = schema_obj.get('templates')[template_idx]['externalEpgs'][epg_idx]['contractRelationships']
+ elif not mso.existing:
+ mso.fail_json(msg="Contract '{0}' not found".format(contract_ref))
+
+ if 'contractRef' in mso.existing:
+ mso.existing['contractRef'] = mso.dict_from_ref(mso.existing.get('contractRef'))
+ mso.exit_json()
+
+ contracts_path = '/templates/{0}/externalEpgs/{1}/contractRelationships'.format(template, external_epg)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=contract_path))
+
+ elif state == 'present':
+ payload = dict(
+ relationshipType=contract.get('type'),
+ contractRef=dict(
+ contractName=contract.get('name'),
+ templateName=contract.get('template'),
+ schemaId=contract.get('schema_id'),
+ ),
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=contract_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=contracts_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if 'contractRef' in mso.previous:
+ mso.previous['contractRef'] = mso.dict_from_ref(mso.previous.get('contractRef'))
+
+ if not module.check_mode and mso.proposed != mso.previous:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg_selector.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg_selector.py
new file mode 100644
index 00000000..0ed2cc3d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg_selector.py
@@ -0,0 +1,249 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_external_epg_selector
+short_description: Manage External EPG selector in schema templates
+description:
+- Manage External EPG selector in schema templates on Cisco ACI Multi-Site.
+author:
+- Shreyas Srish (@shrsr)
+- Cindy Zhao (@cizhao)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template to change.
+ type: str
+ required: yes
+ external_epg:
+ description:
+ - The name of the External EPG to be managed.
+ type: str
+ required: yes
+ selector:
+ description:
+ - The name of the selector.
+ type: str
+ expressions:
+ description:
+ - Expressions associated to this selector.
+ type: list
+ elements: dict
+ suboptions:
+ type:
+ description:
+ - The name of the expression which in this case is always IP address.
+ required: true
+ type: str
+ choices: [ ip_address ]
+ operator:
+ description:
+ - The operator associated with the expression which in this case is always equals.
+ required: true
+ type: str
+ choices: [ equals ]
+ value:
+ description:
+ - The value of the IP Address / Subnet associated with the expression.
+ required: true
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_template_external_epg
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a selector to an External EPG
+ cisco.mso.mso_schema_template_external_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: extEPG 1
+ selector: selector_1
+ expressions:
+ - type: ip_address
+ operator: equals
+ value: 10.0.0.0
+ state: present
+ delegate_to: localhost
+
+- name: Remove a Selector
+ cisco.mso.mso_schema_template_external_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: extEPG 1
+ selector: selector_1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific Selector
+ cisco.mso.mso_schema_template_external_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: extEPG 1
+ selector: selector_1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all Selectors
+ cisco.mso.mso_schema_template_external_epg_selector:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: extEPG 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_expression_spec_ext_epg
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ external_epg=dict(type='str', required=True),
+ selector=dict(type='str'),
+ expressions=dict(type='list', elements='dict', options=mso_expression_spec_ext_epg()),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['selector']],
+ ['state', 'present', ['selector']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ external_epg = module.params.get('external_epg')
+ selector = module.params.get('selector')
+ expressions = module.params.get('expressions')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{template}' does not exist. Existing templates: {templates}".format(template=template,
+ templates=', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get External EPG
+ external_epgs = [e.get('name') for e in schema_obj.get('templates')[template_idx]['externalEpgs']]
+ if external_epg not in external_epgs:
+ mso.fail_json(msg="Provided external epg '{external_epg}' does not exist. Existing epgs: {external_epgs}"
+ .format(external_epg=external_epg, external_epgs=', '.join(external_epgs)))
+ external_epg_idx = external_epgs.index(external_epg)
+
+ # Get Selector
+ selectors = [s.get('name') for s in schema_obj.get('templates')[template_idx]['externalEpgs'][external_epg_idx]['selectors']]
+ if selector in selectors:
+ selector_idx = selectors.index(selector)
+ selector_path = '/templates/{0}/externalEpgs/{1}/selectors/{2}'.format(template, external_epg, selector_idx)
+ mso.existing = schema_obj.get('templates')[template_idx]['externalEpgs'][external_epg_idx]['selectors'][selector_idx]
+
+ if state == 'query':
+ if selector is None:
+ mso.existing = schema_obj.get('templates')[template_idx]['externalEpgs'][external_epg_idx]['selectors']
+ elif not mso.existing:
+ mso.fail_json(msg="Selector '{selector}' not found".format(selector=selector))
+ mso.exit_json()
+
+ selectors_path = '/templates/{0}/externalEpgs/{1}/selectors/-'.format(template, external_epg)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=selector_path))
+
+ elif state == 'present':
+ # Get expressions
+ types = dict(ip_address='ipAddress')
+ all_expressions = []
+ if expressions:
+ for expression in expressions:
+ type_val = expression.get('type')
+ operator = expression.get('operator')
+ value = expression.get('value')
+ all_expressions.append(dict(
+ key=types.get(type_val),
+ operator=operator,
+ value=value,
+ ))
+
+ payload = dict(
+ name=selector,
+ expressions=all_expressions,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=selector_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=selectors_path, value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode and mso.existing != mso.previous:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg_subnet.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg_subnet.py
new file mode 100644
index 00000000..17829011
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_external_epg_subnet.py
@@ -0,0 +1,220 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_external_epg_subnet
+short_description: Manage External EPG subnets in schema templates
+description:
+- Manage External EPG subnets in schema templates on Cisco ACI Multi-Site.
+author:
+- Devarshi Shah (@devarshishah3)
+version_added: '0.0.8'
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template to change.
+ type: str
+ required: yes
+ external_epg:
+ description:
+ - The name of the External EPG to manage.
+ type: str
+ required: yes
+ subnet:
+ description:
+ - The IP range in CIDR notation.
+ type: str
+ required: true
+ scope:
+ description:
+ - The scope of the subnet.
+ type: list
+ elements: str
+ aggregate:
+ description:
+ - The aggregate option for the subnet.
+ type: list
+ elements: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- Due to restrictions of the MSO REST API concurrent modifications to EPG subnets can be dangerous and corrupt data.
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new subnet to an External EPG
+ cisco.mso.mso_schema_template_external_epg_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: EPG 1
+ subnet: 10.0.0.0/24
+ state: present
+ delegate_to: localhost
+
+- name: Remove a subnet from an External EPG
+ cisco.mso.mso_schema_template_external_epg_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: EPG 1
+ subnet: 10.0.0.0/24
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific External EPG subnet
+ cisco.mso.mso_schema_template_external_epg_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: EPG 1
+ subnet: 10.0.0.0/24
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all External EPGs subnets
+ cisco.mso.mso_schema_template_external_epg_subnet:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ external_epg=dict(type='str', required=True),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ subnet=dict(type='str', required=True),
+ scope=dict(type='list', elements='str', default=[]),
+ aggregate=dict(type='list', elements='str', default=[]),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['subnet']],
+ ['state', 'present', ['subnet']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ external_epg = module.params.get('external_epg')
+ subnet = module.params.get('subnet')
+ scope = module.params.get('scope')
+ aggregate = module.params.get('aggregate')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{template}' does not exist. Existing templates: {templates}".format(template=template,
+ templates=', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get EPG
+ external_epgs = [e.get('name') for e in schema_obj.get('templates')[template_idx]['externalEpgs']]
+ if external_epg not in external_epgs:
+ mso.fail_json(msg="Provided External EPG '{epg}' does not exist. Existing epgs: {epgs}".format(epg=external_epg, epgs=', '.join(external_epgs)))
+ epg_idx = external_epgs.index(external_epg)
+
+ # Get Subnet
+ subnets = [s.get('ip') for s in schema_obj.get('templates')[template_idx]['externalEpgs'][epg_idx]['subnets']]
+ if subnet in subnets:
+ subnet_idx = subnets.index(subnet)
+ # FIXME: Changes based on index are DANGEROUS
+ subnet_path = '/templates/{0}/externalEpgs/{1}/subnets/{2}'.format(template, external_epg, subnet_idx)
+ mso.existing = schema_obj.get('templates')[template_idx]['externalEpgs'][epg_idx]['subnets'][subnet_idx]
+
+ if state == 'query':
+ if subnet is None:
+ mso.existing = schema_obj.get('templates')[template_idx]['externalEpgs'][epg_idx]['subnets']
+ elif not mso.existing:
+ mso.fail_json(msg="Subnet '{subnet}' not found".format(subnet=subnet))
+ mso.exit_json()
+
+ subnets_path = '/templates/{0}/externalEpgs/{1}/subnets'.format(template, external_epg)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.existing = {}
+ ops.append(dict(op='remove', path=subnet_path))
+
+ elif state == 'present':
+ payload = dict(
+ ip=subnet,
+ scope=scope,
+ aggregate=aggregate,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=subnet_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=subnets_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_externalepg.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_externalepg.py
new file mode 100644
index 00000000..1831cb85
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_externalepg.py
@@ -0,0 +1,332 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_external_epg
+short_description: Manage external EPGs in schema templates
+description:
+- Manage external EPGs in schema templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ external_epg:
+ description:
+ - The name of the external EPG to manage.
+ type: str
+ aliases: [ name, externalepg ]
+ type:
+ description:
+ - The type of external epg.
+ - anp needs to be associated with external epg when the type is cloud.
+ - l3out can be associated with external epg when the type is on-premise.
+ type: str
+ choices: [ on-premise, cloud ]
+ default: on-premise
+ display_name:
+ description:
+ - The name as displayed on the MSO web interface.
+ type: str
+ vrf:
+ description:
+ - The VRF associated with the external epg.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the VRF to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced VRF.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced VRF.
+ - If this parameter is unspecified, it defaults to the current template.
+ type: str
+ l3out:
+ description:
+ - The L3Out associated with the external epg.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the L3Out to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced L3Out.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced L3Out.
+ - If this parameter is unspecified, it defaults to the current template.
+ type: str
+ anp:
+ description:
+ - The anp associated with the external epg.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the anp to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced anp.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced anp.
+ - If this parameter is unspecified, it defaults to the current template.
+ type: str
+ preferred_group:
+ description:
+ - Preferred Group is enabled for this External EPG or not.
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new external EPG
+ cisco.mso.mso_schema_template_external_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: External EPG 1
+ vrf:
+ name: VRF
+ schema: Schema 1
+ template: Template 1
+ state: present
+ delegate_to: localhost
+
+- name: Add a new external EPG with external epg in cloud
+ cisco.mso.mso_schema_template_external_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: External EPG 1
+ type: cloud
+ vrf:
+ name: VRF
+ schema: Schema 1
+ template: Template 1
+ anp:
+ name: ANP1
+ schema: Schema 1
+ template: Template 1
+ state: present
+ delegate_to: localhost
+
+- name: Remove an external EPG
+ cisco.mso.mso_schema_template_external_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: external EPG1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific external EPGs
+ cisco.mso.mso_schema_template_external_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ external_epg: external EPG1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all external EPGs
+ cisco.mso.mso_schema_template_external_epg:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_reference_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ external_epg=dict(type='str', aliases=['name', 'externalepg']), # This parameter is not required for querying all objects
+ display_name=dict(type='str'),
+ vrf=dict(type='dict', options=mso_reference_spec()),
+ l3out=dict(type='dict', options=mso_reference_spec()),
+ anp=dict(type='dict', options=mso_reference_spec()),
+ preferred_group=dict(type='bool'),
+ type=dict(type='str', default='on-premise', choices=['on-premise', 'cloud']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['external_epg']],
+ ['state', 'present', ['external_epg', 'vrf']],
+ ['type', 'cloud', ['anp']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ external_epg = module.params.get('external_epg')
+ display_name = module.params.get('display_name')
+ vrf = module.params.get('vrf')
+ if vrf is not None and vrf.get('template') is not None:
+ vrf['template'] = vrf.get('template').replace(' ', '')
+ l3out = module.params.get('l3out')
+ if l3out is not None and l3out.get('template') is not None:
+ l3out['template'] = l3out.get('template').replace(' ', '')
+ anp = module.params.get('anp')
+ if anp is not None and anp.get('template') is not None:
+ anp['template'] = anp.get('template').replace(' ', '')
+ preferred_group = module.params.get('preferred_group')
+ type_ext_epg = module.params.get('type')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if schema_obj:
+ schema_id = schema_obj.get('id')
+ else:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get external EPGs
+ external_epgs = [e.get('name') for e in schema_obj.get('templates')[template_idx]['externalEpgs']]
+
+ if external_epg is not None and external_epg in external_epgs:
+ external_epg_idx = external_epgs.index(external_epg)
+ mso.existing = schema_obj.get('templates')[template_idx]['externalEpgs'][external_epg_idx]
+ if 'externalEpgRef' in mso.existing:
+ del mso.existing['externalEpgRef']
+ if 'vrfRef' in mso.existing:
+ mso.existing['vrfRef'] = mso.dict_from_ref(mso.existing.get('vrfRef'))
+ if 'l3outRef' in mso.existing:
+ mso.existing['l3outRef'] = mso.dict_from_ref(mso.existing.get('l3outRef'))
+ if 'anpRef' in mso.existing:
+ mso.existing['anpRef'] = mso.dict_from_ref(mso.existing.get('anpRef'))
+
+ if state == 'query':
+ if external_epg is None:
+ mso.existing = schema_obj.get('templates')[template_idx]['externalEpgs']
+ elif not mso.existing:
+ mso.fail_json(msg="External EPG '{external_epg}' not found".format(external_epg=external_epg))
+ mso.exit_json()
+
+ eepgs_path = '/templates/{0}/externalEpgs'.format(template)
+ eepg_path = '/templates/{0}/externalEpgs/{1}'.format(template, external_epg)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=eepg_path))
+
+ elif state == 'present':
+ vrf_ref = mso.make_reference(vrf, 'vrf', schema_id, template)
+ l3out_ref = mso.make_reference(l3out, 'l3out', schema_id, template)
+ anp_ref = mso.make_reference(anp, 'anp', schema_id, template)
+ if display_name is None and not mso.existing:
+ display_name = external_epg
+
+ payload = dict(
+ name=external_epg,
+ displayName=display_name,
+ vrfRef=vrf_ref,
+ preferredGroup=preferred_group,
+ )
+
+ if type_ext_epg == 'cloud':
+ payload['extEpgType'] = 'cloud'
+ payload['anpRef'] = anp_ref
+ else:
+ payload['l3outRef'] = l3out_ref
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ # clean contractRef to fix api issue
+ for contract in mso.sent.get('contractRelationships'):
+ contract['contractRef'] = mso.dict_from_ref(contract.get('contractRef'))
+ ops.append(dict(op='replace', path=eepg_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=eepgs_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_filter_entry.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_filter_entry.py
new file mode 100644
index 00000000..3a85ce09
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_filter_entry.py
@@ -0,0 +1,363 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_filter_entry
+short_description: Manage filter entries in schema templates
+description:
+- Manage filter entries in schema templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ filter:
+ description:
+ - The name of the filter to manage.
+ type: str
+ required: yes
+ filter_display_name:
+ description:
+ - The name as displayed on the MSO web interface.
+ type: str
+ entry:
+ description:
+ - The filter entry name to manage.
+ type: str
+ aliases: [ name ]
+ display_name:
+ description:
+ - The name as displayed on the MSO web interface.
+ type: str
+ aliases: [ entry_display_name ]
+ description:
+ description:
+ - The description of this filer entry.
+ type: str
+ aliases: [ entry_description ]
+ ethertype:
+ description:
+ - The ethernet type to use for this filter entry.
+ type: str
+ choices: [ arp, fcoe, ip, ipv4, ipv6, mac-security, mpls-unicast, trill, unspecified ]
+ ip_protocol:
+ description:
+ - The IP protocol to use for this filter entry.
+ type: str
+ choices: [ eigrp, egp, icmp, icmpv6, igmp, igp, l2tp, ospfigp, pim, tcp, udp, unspecified ]
+ tcp_session_rules:
+ description:
+ - A list of TCP session rules.
+ type: list
+ elements: str
+ choices: [ acknowledgement, established, finish, synchronize, reset, unspecified ]
+ source_from:
+ description:
+ - The source port range from.
+ type: str
+ source_to:
+ description:
+ - The source port range to.
+ type: str
+ destination_from:
+ description:
+ - The destination port range from.
+ type: str
+ destination_to:
+ description:
+ - The destination port range to.
+ type: str
+ arp_flag:
+ description:
+ - The ARP flag to use for this filter entry.
+ type: str
+ choices: [ reply, request, unspecified ]
+ stateful:
+ description:
+ - Whether this filter entry is stateful.
+ type: bool
+ default: no
+ fragments_only:
+ description:
+ - Whether this filter entry only matches fragments.
+ type: bool
+ default: no
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_template_contract_filter
+notes:
+- Due to restrictions of the MSO REST API this module creates filters when needed, and removes them when the last entry has been removed.
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new filter entry
+ cisco.mso.mso_schema_template_filter_entry:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ filter: Filter 1
+ state: present
+ delegate_to: localhost
+
+- name: Remove a filter entry
+ cisco.mso.mso_schema_template_filter_entry:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ filter: Filter 1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific filter entry
+ cisco.mso.mso_schema_template_filter_entry:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ filter: Filter 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all filter entries
+ cisco.mso.mso_schema_template_filter_entry:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ filter=dict(type='str', required=True),
+ filter_display_name=dict(type='str'),
+ entry=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ description=dict(type='str', aliases=['entry_description']),
+ display_name=dict(type='str', aliases=['entry_display_name']),
+ ethertype=dict(type='str', choices=['arp', 'fcoe', 'ip', 'ipv4', 'ipv6', 'mac-security', 'mpls-unicast', 'trill', 'unspecified']),
+ ip_protocol=dict(type='str', choices=['eigrp', 'egp', 'icmp', 'icmpv6', 'igmp', 'igp', 'l2tp', 'ospfigp', 'pim', 'tcp', 'udp', 'unspecified']),
+ tcp_session_rules=dict(type='list', elements='str', choices=['acknowledgement', 'established', 'finish', 'synchronize', 'reset', 'unspecified']),
+ source_from=dict(type='str'),
+ source_to=dict(type='str'),
+ destination_from=dict(type='str'),
+ destination_to=dict(type='str'),
+ arp_flag=dict(type='str', choices=['reply', 'request', 'unspecified']),
+ stateful=dict(type='bool'),
+ fragments_only=dict(type='bool'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['entry']],
+ ['state', 'present', ['entry']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ filter_name = module.params.get('filter')
+ filter_display_name = module.params.get('filter_display_name')
+ entry = module.params.get('entry')
+ display_name = module.params.get('display_name')
+ description = module.params.get('description')
+ ethertype = module.params.get('ethertype')
+ ip_protocol = module.params.get('ip_protocol')
+ tcp_session_rules = module.params.get('tcp_session_rules')
+ source_from = module.params.get('source_from')
+ source_to = module.params.get('source_to')
+ destination_from = module.params.get('destination_from')
+ destination_to = module.params.get('destination_to')
+ arp_flag = module.params.get('arp_flag')
+ stateful = module.params.get('stateful')
+ fragments_only = module.params.get('fragments_only')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{template}' does not exist. Existing templates: {templates}".format(template=template,
+ templates=', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get filters
+ mso.existing = {}
+ filter_idx = None
+ entry_idx = None
+ filters = [f.get('name') for f in schema_obj.get('templates')[template_idx]['filters']]
+ if filter_name in filters:
+ filter_idx = filters.index(filter_name)
+
+ entries = [f.get('name') for f in schema_obj.get('templates')[template_idx]['filters'][filter_idx]['entries']]
+ if entry in entries:
+ entry_idx = entries.index(entry)
+ mso.existing = schema_obj.get('templates')[template_idx]['filters'][filter_idx]['entries'][entry_idx]
+
+ if state == 'query':
+ if entry is None:
+ if filter_idx is None:
+ mso.fail_json(msg="Filter '{filter}' not found".format(filter=filter_name))
+ mso.existing = schema_obj.get('templates')[template_idx]['filters'][filter_idx]['entries']
+ elif not mso.existing:
+ mso.fail_json(msg="Entry '{entry}' not found".format(entry=entry))
+ mso.exit_json()
+
+ filters_path = '/templates/{0}/filters'.format(template)
+ filter_path = '/templates/{0}/filters/{1}'.format(template, filter_name)
+ entries_path = '/templates/{0}/filters/{1}/entries'.format(template, filter_name)
+ entry_path = '/templates/{0}/filters/{1}/entries/{2}'.format(template, filter_name, entry)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ mso.proposed = mso.sent = {}
+
+ if filter_idx is None:
+ # There was no filter to begin with
+ pass
+ elif entry_idx is None:
+ # There was no entry to begin with
+ pass
+ elif len(entries) == 1:
+ # There is only one entry, remove filter
+ mso.existing = {}
+ ops.append(dict(op='remove', path=filter_path))
+
+ else:
+ mso.existing = {}
+ ops.append(dict(op='remove', path=entry_path))
+
+ elif state == 'present':
+
+ if not mso.existing:
+ if display_name is None:
+ display_name = entry
+ if description is None:
+ description = ''
+ if ethertype is None:
+ ethertype = 'unspecified'
+ if ip_protocol is None:
+ ip_protocol = 'unspecified'
+ if tcp_session_rules is None:
+ tcp_session_rules = ['unspecified']
+ if source_from is None:
+ source_from = 'unspecified'
+ if source_to is None:
+ source_to = 'unspecified'
+ if destination_from is None:
+ destination_from = 'unspecified'
+ if destination_to is None:
+ destination_to = 'unspecified'
+ if arp_flag is None:
+ arp_flag = 'unspecified'
+ if stateful is None:
+ stateful = False
+ if fragments_only is None:
+ fragments_only = False
+
+ payload = dict(
+ name=entry,
+ displayName=display_name,
+ description=description,
+ etherType=ethertype,
+ ipProtocol=ip_protocol,
+ tcpSessionRules=tcp_session_rules,
+ sourceFrom=source_from,
+ sourceTo=source_to,
+ destinationFrom=destination_from,
+ destinationTo=destination_to,
+ arpFlag=arp_flag,
+ stateful=stateful,
+ matchOnlyFragments=fragments_only,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if filter_idx is None:
+ # Filter does not exist, so we have to create it
+ if filter_display_name is None:
+ filter_display_name = filter_name
+
+ payload = dict(
+ name=filter_name,
+ displayName=filter_display_name,
+ entries=[mso.sent],
+ )
+
+ ops.append(dict(op='add', path=filters_path + '/-', value=payload))
+
+ elif entry_idx is None:
+ # Entry does not exist, so we have to add it
+ ops.append(dict(op='add', path=entries_path + '/-', value=mso.sent))
+
+ else:
+ # Entry exists, we have to update it
+ for (key, value) in mso.sent.items():
+ ops.append(dict(op='replace', path=entry_path + '/' + key, value=value))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_l3out.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_l3out.py
new file mode 100644
index 00000000..5aa4e557
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_l3out.py
@@ -0,0 +1,231 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_l3out
+short_description: Manage l3outs in schema templates
+description:
+- Manage l3outs in schema templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ l3out:
+ description:
+ - The name of the l3out to manage.
+ type: str
+ aliases: [ name ]
+ display_name:
+ description:
+ - The name as displayed on the MSO web interface.
+ type: str
+ vrf:
+ description:
+ - The VRF associated to this L3out.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the VRF to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced VRF.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced VRF.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new L3out
+ cisco.mso.mso_schema_template_l3out:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ validate_certs: false
+ schema: Schema 1
+ template: Template 1
+ l3out: L3out 1
+ vrf:
+ name: vrfName
+ schema: vrfSchema
+ template: vrfTemplate
+ state: present
+ delegate_to: localhost
+
+- name: Remove an L3out
+ cisco.mso.mso_schema_template_l3out:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ l3out: L3out 1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific L3outs
+ cisco.mso.mso_schema_template_l3out:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ validate_certs: false
+ schema: Schema 1
+ template: Template 1
+ l3out: L3out 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all L3outs
+ cisco.mso.mso_schema_template_l3out:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ validate_certs: false
+ schema: Schema 1
+ template: Template 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_reference_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ l3out=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ display_name=dict(type='str'),
+ vrf=dict(type='dict', options=mso_reference_spec()),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['l3out']],
+ ['state', 'present', ['l3out', 'vrf']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ l3out = module.params.get('l3out')
+ display_name = module.params.get('display_name')
+ vrf = module.params.get('vrf')
+ if vrf is not None and vrf.get('template') is not None:
+ vrf['template'] = vrf.get('template').replace(' ', '')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if schema_obj:
+ schema_id = schema_obj.get('id')
+ else:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get L3out
+ l3outs = [l3.get('name') for l3 in schema_obj.get('templates')[template_idx]['intersiteL3outs']]
+
+ if l3out is not None and l3out in l3outs:
+ l3out_idx = l3outs.index(l3out)
+ mso.existing = schema_obj.get('templates')[template_idx]['intersiteL3outs'][l3out_idx]
+
+ if state == 'query':
+ if l3out is None:
+ mso.existing = schema_obj.get('templates')[template_idx]['intersiteL3outs']
+ elif not mso.existing:
+ mso.fail_json(msg="L3out '{l3out}' not found".format(l3out=l3out))
+ mso.exit_json()
+
+ l3outs_path = '/templates/{0}/intersiteL3outs'.format(template)
+ l3out_path = '/templates/{0}/intersiteL3outs/{1}'.format(template, l3out)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=l3out_path))
+
+ elif state == 'present':
+ vrf_ref = mso.make_reference(vrf, 'vrf', schema_id, template)
+
+ if display_name is None and not mso.existing:
+ display_name = l3out
+
+ payload = dict(
+ name=l3out,
+ displayName=display_name,
+ vrfRef=vrf_ref,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=l3out_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=l3outs_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_migrate.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_migrate.py
new file mode 100644
index 00000000..c31fbecf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_migrate.py
@@ -0,0 +1,246 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Anvitha Jain (@anvitha-jain) <anvjain@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_migrate
+short_description: Migrate Bridge Domains (BDs) and EPGs between templates
+description:
+- Migrate BDs and EPGs between templates of same and different schemas.
+author:
+- Anvitha Jain (@anvitha-jain)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ bds:
+ description:
+ - The name of the BDs to migrate.
+ type: list
+ elements: str
+ epgs:
+ description:
+ - The name of the EPGs and the ANP it is in to migrate.
+ type: list
+ elements: dict
+ suboptions:
+ epg:
+ description:
+ - The name of the EPG to migrate.
+ type: str
+ required: yes
+ anp:
+ description:
+ - The name of the anp to migrate.
+ type: str
+ required: yes
+ target_schema:
+ description:
+ - The name of the target_schema.
+ type: str
+ required: yes
+ target_template:
+ description:
+ - The name of the target_template.
+ type: str
+ required: yes
+ state:
+ description:
+ - Use C(present) for adding.
+ type: str
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Migration of objects between templates of same schema
+ mso_schema_template_migrate:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ target_schema: Schema 1
+ target_template: Template 2
+ bds:
+ - BD
+ epgs:
+ - epg: EPG1
+ anp: ANP
+ state: present
+ delegate_to: localhost
+
+- name: Migration of objects between templates of different schema
+ mso_schema_template_migrate:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ target_schema: Schema 2
+ target_template: Template 2
+ bds:
+ - BD
+ epgs:
+ - epg: EPG1
+ anp: ANP
+ state: present
+ delegate_to: localhost
+
+- name: Migration of BD object between templates of same schema
+ mso_schema_template_migrate:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ target_schema: Schema 1
+ target_template: Template 2
+ bds:
+ - BD
+ - BD1
+ state: present
+ delegate_to: localhost
+
+- name: Migration of BD object between templates of different schema
+ mso_schema_template_migrate:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ target_schema: Schema 2
+ target_template: Template 2
+ bds:
+ - BD
+ - BD1
+ state: present
+ delegate_to: localhost
+
+- name: Migration of EPG objects between templates of same schema
+ mso_schema_template_migrate:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ target_schema: Schema 2
+ target_template: Template 2
+ epgs:
+ - epg: EPG1
+ anp: ANP
+ - epg: EPG2
+ anp: ANP2
+ state: present
+ delegate_to: localhost
+
+- name: Migration of EPG objects between templates of different schema
+ mso_schema_template_migrate:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ target_schema: Schema 2
+ target_template: Template 2
+ epgs:
+ - epg: EPG1
+ anp: ANP
+ - epg: EPG2
+ anp: ANP2
+ state: present
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_object_migrate_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ bds=dict(type='list', elements='str'),
+ epgs=dict(type='list', elements='dict', options=mso_object_migrate_spec()),
+ target_schema=dict(type='str', required=True),
+ target_template=dict(type='str', required=True),
+ state=dict(type='str', default='present'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ target_schema = module.params.get('target_schema')
+ target_template = module.params.get('target_template').replace(' ', '')
+ bds = module.params.get('bds')
+ epgs = module.params.get('epgs')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ schema_id = mso.get_obj('schemas', displayName=schema).get('id')
+
+ target_schema_id = mso.get_obj('schemas', displayName=target_schema).get('id')
+
+ if state == 'present':
+ if schema_id is not None:
+ bds_payload = []
+ if bds is not None:
+ for bd in bds:
+ bds_payload.append(dict(name=bd))
+
+ anp_dict = {}
+ if epgs is not None:
+ for epg in epgs:
+ if epg.get('anp') in anp_dict:
+ anp_dict[epg.get('anp')].append(dict(name=epg.get('epg')))
+ else:
+ anp_dict[epg.get('anp')] = [dict(name=epg.get('epg'))]
+
+ anps_payload = []
+ for anp, epgs_payload in anp_dict.items():
+ anps_payload.append(dict(name=anp, epgs=epgs_payload))
+
+ payload = dict(
+ targetSchemaId=target_schema_id,
+ targetTemplateName=target_template,
+ bds=bds_payload,
+ anps=anps_payload,
+ )
+
+ template = template.replace(' ', '%20')
+
+ target_template = target_template.replace(' ', '%20') # removes API error for extra space
+
+ mso.existing = mso.request(path='/api/v1/migrate/schema/{0}/template/{1}'.format(schema_id, template), method='POST', data=payload)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_vrf.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_vrf.py
new file mode 100644
index 00000000..65a918e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_vrf.py
@@ -0,0 +1,214 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_vrf
+short_description: Manage VRFs in schema templates
+description:
+- Manage VRFs in schema templates on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template.
+ type: str
+ required: yes
+ vrf:
+ description:
+ - The name of the VRF to manage.
+ type: str
+ aliases: [ name ]
+ display_name:
+ description:
+ - The name as displayed on the MSO web interface.
+ type: str
+ layer3_multicast:
+ description:
+ - Whether to enable L3 multicast.
+ type: bool
+ vzany:
+ description:
+ - Whether to enable vzAny.
+ type: bool
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new VRF
+ cisco.mso.mso_schema_template_vrf:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ vrf: VRF 1
+ state: present
+ delegate_to: localhost
+
+- name: Remove an VRF
+ cisco.mso.mso_schema_template_vrf:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ vrf: VRF1
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific VRFs
+ cisco.mso.mso_schema_template_vrf:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ vrf: VRF1
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all VRFs
+ cisco.mso.mso_schema_template_vrf:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ vrf=dict(type='str', aliases=['name']), # This parameter is not required for querying all objects
+ display_name=dict(type='str'),
+ layer3_multicast=dict(type='bool'),
+ vzany=dict(type='bool'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['vrf']],
+ ['state', 'present', ['vrf']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ vrf = module.params.get('vrf')
+ display_name = module.params.get('display_name')
+ layer3_multicast = module.params.get('layer3_multicast')
+ vzany = module.params.get('vzany')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get ANP
+ vrfs = [v.get('name') for v in schema_obj.get('templates')[template_idx]['vrfs']]
+
+ if vrf is not None and vrf in vrfs:
+ vrf_idx = vrfs.index(vrf)
+ mso.existing = schema_obj.get('templates')[template_idx]['vrfs'][vrf_idx]
+
+ if state == 'query':
+ if vrf is None:
+ mso.existing = schema_obj.get('templates')[template_idx]['vrfs']
+ elif not mso.existing:
+ mso.fail_json(msg="VRF '{vrf}' not found".format(vrf=vrf))
+ mso.exit_json()
+
+ vrfs_path = '/templates/{0}/vrfs'.format(template)
+ vrf_path = '/templates/{0}/vrfs/{1}'.format(template, vrf)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=vrf_path))
+
+ elif state == 'present':
+ if display_name is None and not mso.existing:
+ display_name = vrf
+
+ payload = dict(
+ name=vrf,
+ displayName=display_name,
+ l3MCast=layer3_multicast,
+ vzAnyEnabled=vzany
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ # clean contractRef to fix api issue
+ for contract in mso.sent.get('vzAnyConsumerContracts'):
+ contract['contractRef'] = mso.dict_from_ref(contract.get('contractRef'))
+ for contract in mso.sent.get('vzAnyProviderContracts'):
+ contract['contractRef'] = mso.dict_from_ref(contract.get('contractRef'))
+ ops.append(dict(op='replace', path=vrf_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=vrfs_path + '/-', value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_vrf_contract.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_vrf_contract.py
new file mode 100644
index 00000000..22f96f0d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_vrf_contract.py
@@ -0,0 +1,264 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_schema_template_vrf_contract
+short_description: Manage vrf contracts in schema templates
+description:
+- Manage vrf contracts in schema templates on Cisco ACI Multi-Site.
+author:
+- Cindy Zhao (@cizhao)
+version_added: '0.0.8'
+options:
+ schema:
+ description:
+ - The name of the schema.
+ type: str
+ required: yes
+ template:
+ description:
+ - The name of the template to change.
+ type: str
+ required: yes
+ vrf:
+ description:
+ - The name of the VRF.
+ type: str
+ required: yes
+ contract:
+ description:
+ - A contract associated to this VRF.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The name of the Contract to associate with.
+ required: true
+ type: str
+ schema:
+ description:
+ - The schema that defines the referenced contract.
+ - If this parameter is unspecified, it defaults to the current schema.
+ type: str
+ template:
+ description:
+ - The template that defines the referenced contract.
+ type: str
+ type:
+ description:
+ - The type of contract.
+ type: str
+ required: true
+ choices: [ consumer, provider ]
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+seealso:
+- module: cisco.mso.mso_schema_template_vrf
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a contract to a VRF
+ cisco.mso.mso_schema_template_vrf_contract:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ vrf: VRF 1
+ contract:
+ name: Contract 1
+ type: consumer
+ state: present
+ delegate_to: localhost
+
+- name: Remove a Contract
+ cisco.mso.mso_schema_template_vrf_contract:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ vrf: VRF 1
+ contract:
+ name: Contract 1
+ type: consumer
+ state: absent
+ delegate_to: localhost
+
+- name: Query a specific Contract
+ cisco.mso.mso_schema_template_vrf_contract:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ vrf: VRF 1
+ contract:
+ name: Contract 1
+ type: consumer
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all Contracts
+ cisco.mso.mso_schema_template_vrf_contract:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ schema: Schema 1
+ template: Template 1
+ vrf: VRF 1
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, mso_contractref_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ schema=dict(type='str', required=True),
+ template=dict(type='str', required=True),
+ vrf=dict(type='str', required=True),
+ contract=dict(type='dict', options=mso_contractref_spec()),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['contract']],
+ ['state', 'present', ['contract']],
+ ],
+ )
+
+ schema = module.params.get('schema')
+ template = module.params.get('template').replace(' ', '')
+ vrf = module.params.get('vrf')
+ contract = module.params.get('contract')
+ if contract is not None and contract.get('template') is not None:
+ contract['template'] = contract.get('template').replace(' ', '')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+ if contract:
+ if contract.get('schema') is None:
+ contract['schema'] = schema
+ contract['schema_id'] = mso.lookup_schema(contract.get('schema'))
+ if contract.get('template') is None:
+ contract['template'] = template
+
+ # Get schema_id
+ schema_obj = mso.get_obj('schemas', displayName=schema)
+ if not schema_obj:
+ mso.fail_json(msg="Provided schema '{0}' does not exist".format(schema))
+
+ schema_path = 'schemas/{id}'.format(**schema_obj)
+
+ # Get template
+ templates = [t.get('name') for t in schema_obj.get('templates')]
+ if template not in templates:
+ mso.fail_json(msg="Provided template '{0}' does not exist. Existing templates: {1}".format(template, ', '.join(templates)))
+ template_idx = templates.index(template)
+
+ # Get VRF
+ vrfs = [e.get('name') for e in schema_obj.get('templates')[template_idx]['vrfs']]
+ if vrf not in vrfs:
+ mso.fail_json(msg="Provided vrf '{vrf}' does not exist. Existing vrfs: {vrfs}".format(vrf=vrf, vrfs=', '.join(vrfs)))
+ vrf_idx = vrfs.index(vrf)
+ vrf_obj = schema_obj.get('templates')[template_idx]['vrfs'][vrf_idx]
+
+ if not vrf_obj.get('vzAnyEnabled'):
+ mso.fail_json(msg="vzAny attribute on vrf '{0}' is disabled.".format(vrf))
+
+ # Get Contract
+ if contract:
+ provider_contracts = [c.get('contractRef') for c in schema_obj.get('templates')[template_idx]['vrfs'][vrf_idx]['vzAnyProviderContracts']]
+ consumer_contracts = [c.get('contractRef') for c in schema_obj.get('templates')[template_idx]['vrfs'][vrf_idx]['vzAnyConsumerContracts']]
+ contract_ref = mso.contract_ref(**contract)
+ if contract_ref in provider_contracts and contract.get('type') == 'provider':
+ contract_idx = provider_contracts.index(contract_ref)
+ contract_path = '/templates/{0}/vrfs/{1}/vzAnyProviderContracts/{2}'.format(template, vrf, contract_idx)
+ mso.existing = schema_obj.get('templates')[template_idx]['vrfs'][vrf_idx]['vzAnyProviderContracts'][contract_idx]
+ if contract_ref in consumer_contracts and contract.get('type') == 'consumer':
+ contract_idx = consumer_contracts.index(contract_ref)
+ contract_path = '/templates/{0}/vrfs/{1}/vzAnyConsumerContracts/{2}'.format(template, vrf, contract_idx)
+ mso.existing = schema_obj.get('templates')[template_idx]['vrfs'][vrf_idx]['vzAnyConsumerContracts'][contract_idx]
+ if mso.existing.get('contractRef'):
+ mso.existing['contractRef'] = mso.dict_from_ref(mso.existing.get('contractRef'))
+ mso.existing['relationshipType'] = contract.get('type')
+
+ if state == 'query':
+ if not contract:
+ provider_contracts = [dict(contractRef=mso.dict_from_ref(c.get('contractRef')),
+ relationshipType='provider') for c in schema_obj.get('templates')[template_idx]['vrfs'][vrf_idx]['vzAnyProviderContracts']]
+ consumer_contracts = [dict(contractRef=mso.dict_from_ref(c.get('contractRef')),
+ relationshipType='consumer') for c in schema_obj.get('templates')[template_idx]['vrfs'][vrf_idx]['vzAnyConsumerContracts']]
+ mso.existing = provider_contracts + consumer_contracts
+ elif not mso.existing:
+ mso.fail_json(msg="Contract '{0}' not found".format(contract.get('name')))
+
+ mso.exit_json()
+
+ if contract.get('type') == 'provider':
+ contracts_path = '/templates/{0}/vrfs/{1}/vzAnyProviderContracts/-'.format(template, vrf)
+ if contract.get('type') == 'consumer':
+ contracts_path = '/templates/{0}/vrfs/{1}/vzAnyConsumerContracts/-'.format(template, vrf)
+ ops = []
+
+ mso.previous = mso.existing
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=contract_path))
+
+ elif state == 'present':
+ payload = dict(
+ contractRef=dict(
+ contractName=contract.get('name'),
+ templateName=contract.get('template'),
+ schemaId=contract.get('schema_id'),
+ ),
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=contract_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=contracts_path, value=mso.sent))
+
+ mso.existing = mso.proposed
+ mso.existing['relationshipType'] = contract.get('type')
+
+ if not module.check_mode and mso.proposed != mso.previous:
+ mso.request(schema_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_site.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_site.py
new file mode 100644
index 00000000..2b6cf82f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_site.py
@@ -0,0 +1,252 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_site
+short_description: Manage sites
+description:
+- Manage sites on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ apic_password:
+ description:
+ - The password for the APICs.
+ type: str
+ apic_site_id:
+ description:
+ - The site ID of the APICs.
+ type: str
+ apic_username:
+ description:
+ - The username for the APICs.
+ type: str
+ default: admin
+ apic_login_domain:
+ description:
+ - The AAA login domain for the username for the APICs.
+ type: str
+ site:
+ description:
+ - The name of the site.
+ type: str
+ aliases: [ name ]
+ labels:
+ description:
+ - The labels for this site.
+ - Labels that do not already exist will be automatically created.
+ type: list
+ elements: str
+ location:
+ description:
+ - Location of the site.
+ type: dict
+ suboptions:
+ latitude:
+ description:
+ - The latitude of the location of the site.
+ type: float
+ longitude:
+ description:
+ - The longitude of the location of the site.
+ type: float
+ urls:
+ description:
+ - A list of URLs to reference the APICs.
+ type: list
+ elements: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new site
+ cisco.mso.mso_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ site: north_europe
+ description: North European Datacenter
+ apic_username: mso_admin
+ apic_password: AnotherSecretPassword
+ apic_site_id: 12
+ urls:
+ - 10.2.3.4
+ - 10.2.4.5
+ - 10.3.5.6
+ labels:
+ - NEDC
+ - Europe
+ - Diegem
+ location:
+ latitude: 50.887318
+ longitude: 4.447084
+ state: present
+ delegate_to: localhost
+
+- name: Remove a site
+ cisco.mso.mso_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ site: north_europe
+ state: absent
+ delegate_to: localhost
+
+- name: Query a site
+ cisco.mso.mso_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ site: north_europe
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all sites
+ cisco.mso.mso_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ location_arg_spec = dict(
+ latitude=dict(type='float'),
+ longitude=dict(type='float'),
+ )
+
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ apic_password=dict(type='str', no_log=True),
+ apic_site_id=dict(type='str'),
+ apic_username=dict(type='str', default='admin'),
+ apic_login_domain=dict(type='str'),
+ labels=dict(type='list', elements='str'),
+ location=dict(type='dict', options=location_arg_spec),
+ site=dict(type='str', aliases=['name']),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ urls=dict(type='list', elements='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['site']],
+ ['state', 'present', ['apic_site_id', 'site']],
+ ],
+ )
+
+ apic_username = module.params.get('apic_username')
+ apic_password = module.params.get('apic_password')
+ apic_site_id = module.params.get('apic_site_id')
+ site = module.params.get('site')
+ location = module.params.get('location')
+ if location is not None:
+ latitude = module.params.get('location')['latitude']
+ longitude = module.params.get('location')['longitude']
+ state = module.params.get('state')
+ urls = module.params.get('urls')
+ apic_login_domain = module.params.get('apic_login_domain')
+
+ mso = MSOModule(module)
+
+ site_id = None
+ path = 'sites'
+
+ # Convert labels
+ labels = mso.lookup_labels(module.params.get('labels'), 'site')
+
+ # Query for mso.existing object(s)
+ if site:
+ mso.existing = mso.get_obj(path, name=site)
+ if mso.existing:
+ site_id = mso.existing.get('id')
+ # If we found an existing object, continue with it
+ path = 'sites/{id}'.format(id=site_id)
+ else:
+ mso.existing = mso.query_objs(path)
+
+ if state == 'query':
+ pass
+
+ elif state == 'absent':
+ mso.previous = mso.existing
+ if mso.existing:
+ if module.check_mode:
+ mso.existing = {}
+ else:
+ mso.existing = mso.request(path, method='DELETE', qs=dict(force='true'))
+
+ elif state == 'present':
+ mso.previous = mso.existing
+
+ payload = dict(
+ apicSiteId=apic_site_id,
+ id=site_id,
+ name=site,
+ urls=urls,
+ labels=labels,
+ username=apic_username,
+ password=apic_password,
+ )
+
+ if location is not None:
+ payload['location'] = dict(
+ lat=latitude,
+ long=longitude,
+ )
+
+ if apic_login_domain is not None and apic_login_domain not in ['', 'local', 'Local']:
+ payload['username'] = 'apic#{0}\\{1}'.format(apic_login_domain, apic_username)
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ if mso.check_changed():
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method='PUT', data=mso.sent)
+ else:
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method='POST', data=mso.sent)
+
+ if 'password' in mso.existing:
+ mso.existing['password'] = '******'
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_tenant.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_tenant.py
new file mode 100644
index 00000000..68f54290
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_tenant.py
@@ -0,0 +1,197 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_tenant
+short_description: Manage tenants
+description:
+- Manage tenants on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ aliases: [ name ]
+ display_name:
+ description:
+ - The name of the tenant to be displayed in the web UI.
+ type: str
+ description:
+ description:
+ - The description for this tenant.
+ type: str
+ users:
+ description:
+ - A list of associated users for this tenant.
+ - Using this property will replace any existing associated users.
+ - Admin user is always added to the associated user list irrespective of this parameter being used.
+ type: list
+ elements: str
+ sites:
+ description:
+ - A list of associated sites for this tenant.
+ - Using this property will replace any existing associated sites.
+ type: list
+ elements: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Add a new tenant
+ cisco.mso.mso_tenant:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: north_europe
+ display_name: North European Datacenter
+ description: This tenant manages the NEDC environment.
+ state: present
+ delegate_to: localhost
+
+- name: Remove a tenant
+ cisco.mso.mso_tenant:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: north_europe
+ state: absent
+ delegate_to: localhost
+
+- name: Query a tenant
+ cisco.mso.mso_tenant:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: north_europe
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all tenants
+ cisco.mso.mso_tenant:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ description=dict(type='str'),
+ display_name=dict(type='str'),
+ tenant=dict(type='str', aliases=['name']),
+ users=dict(type='list', elements='str'),
+ sites=dict(type='list', elements='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['tenant']],
+ ['state', 'present', ['tenant']],
+ ],
+ )
+
+ description = module.params.get('description')
+ display_name = module.params.get('display_name')
+ tenant = module.params.get('tenant')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ # Convert sites and users
+ sites = mso.lookup_sites(module.params.get('sites'))
+ users = mso.lookup_users(module.params.get('users'))
+
+ tenant_id = None
+ path = 'tenants'
+
+ # Query for existing object(s)
+ if tenant:
+ mso.existing = mso.get_obj(path, name=tenant)
+ if mso.existing:
+ tenant_id = mso.existing.get('id')
+ # If we found an existing object, continue with it
+ path = 'tenants/{id}'.format(id=tenant_id)
+ else:
+ mso.existing = mso.query_objs(path)
+
+ if state == 'query':
+ pass
+
+ elif state == 'absent':
+ mso.previous = mso.existing
+ if mso.existing:
+ if module.check_mode:
+ mso.existing = {}
+ else:
+ mso.existing = mso.request(path, method='DELETE')
+
+ elif state == 'present':
+ mso.previous = mso.existing
+
+ payload = dict(
+ description=description,
+ id=tenant_id,
+ name=tenant,
+ displayName=display_name,
+ siteAssociations=sites,
+ userAssociations=users,
+ )
+
+ mso.sanitize(payload, collate=True)
+
+ # Ensure displayName is not undefined
+ if mso.sent.get('displayName') is None:
+ mso.sent['displayName'] = tenant
+
+ if mso.existing:
+ if mso.check_changed():
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method='PUT', data=mso.sent)
+ else:
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method='POST', data=mso.sent)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_tenant_site.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_tenant_site.py
new file mode 100644
index 00000000..bb65b3fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_tenant_site.py
@@ -0,0 +1,391 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_tenant_site
+short_description: Manage tenants with cloud sites.
+description:
+- Manage tenants with cloud sites on Cisco ACI Multi-Site.
+author:
+- Shreyas Srish (@shrsr)
+options:
+ tenant:
+ description:
+ - The name of the tenant.
+ type: str
+ required: yes
+ site:
+ description:
+ - The name of the site.
+ - This can either be cloud site or non-cloud site.
+ type: str
+ aliases: [ name ]
+ cloud_account:
+ description:
+ - Required for cloud site.
+ - Account id of AWS in the form '000000000000'.
+ - Account id of Azure in the form 'uni/tn-(tenant_name)/act-[(subscription_id)]-azure_vendor-azure'.
+ - Example values inside account id of Azure '(tenant_name)=tenant_test and (subscription_id)=10'.
+ type: str
+ security_domains:
+ description:
+ - List of security domains for cloud sites.
+ type: list
+ elements: str
+ default: []
+ aws_account_org:
+ description:
+ - AWS account for organization.
+ default: false
+ type: bool
+ aws_trusted:
+ description:
+ - AWS account's access in trusted mode. Credentials are required, when set to false.
+ type: bool
+ aws_access_key:
+ description:
+ - AWS account's access key id. This is required when aws_trusted is set to false.
+ type: str
+ azure_access_type:
+ description:
+ - Managed mode for Azure.
+ - Unmanaged mode for Azure.
+ - Shared mode if the attribute is not specified.
+ choices: [ managed, unmanaged, shared ]
+ default: shared
+ type: str
+ azure_active_directory_id:
+ description:
+ - Azure account's active directory id.
+ - This attribute is required when azure_access_type is in unmanaged mode.
+ type: str
+ azure_active_directory_name:
+ description:
+ - Azure account's active directory name. Example being 'CiscoINSBUAd' as active directory name.
+ - This attribute is required when azure_access_type is in unmanaged mode.
+ type: str
+ azure_subscription_id:
+ description:
+ - Azure account's subscription id.
+ - This attribute is required when azure_access_type is either in managed mode or unmanaged mode.
+ type: str
+ azure_application_id:
+ description:
+ - Azure account's application id.
+ - This attribute is required when azure_access_type is either in managed mode or unmanaged mode.
+ type: str
+ azure_credential_name:
+ description:
+ - Azure account's credential name.
+ - This attribute is required when azure_access_type is in unmanaged mode.
+ type: str
+ secret_key:
+ description:
+ - secret key of AWS for untrusted account. Required when aws_trusted is set to false.
+ - secret key of Azure account for unmanaged identity. Required in unmanaged mode of Azure account.
+ type: str
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Associate a non-cloud site with a tenant
+ cisco.mso.mso_tenant_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenant_name
+ site: site_name
+ state: present
+ delegate_to: localhost
+
+- name: Associate AWS site with a tenant, with aws_trusted set to true
+ cisco.mso.mso_tenant_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenant_name
+ site: site_name
+ cloud_account: '000000000000'
+ aws_trusted: true
+ state: present
+ delegate_to: localhost
+
+- name: Associate AWS site with a tenant, with aws_trusted set to false
+ cisco.mso.mso_tenant_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenant_name
+ site: AWS
+ cloud_account: '000000000000'
+ aws_trusted: false
+ aws_access_key: '1'
+ secret_key: '0'
+ aws_account_org: false
+ state: present
+ delegate_to: localhost
+
+- name: Associate Azure site in managed mode
+ mso.cisco.mso_tenant_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenant_name
+ site: site_name
+ cloud_account: uni/tn-ansible_test/act-[9]-azure_vendor-azure
+ azure_access_type: managed
+ azure_subscription_id: '9'
+ azure_application_id: '100'
+ state: present
+ delegate_to: localhost
+
+- name: Associate Azure site in unmanaged mode
+ mso.cisco.mso_tenant_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenant_name
+ site: site_name
+ cloud_account: uni/tn-ansible_test/act-[9]-azure_vendor-azure
+ azure_access_type: unmanaged
+ azure_subscription_id: '9'
+ azure_application_id: '100'
+ azure_credential_name: cApicApp
+ secret_key: iins
+ azure_active_directory_id: '32'
+ azure_active_directory_name: CiscoINSBUAd
+ state: present
+ delegate_to: localhost
+
+- name: Dissociate a site
+ cisco.mso.mso_tenant_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenant_name
+ site: site_name
+ state: absent
+ delegate_to: localhost
+
+- name: Query a site
+ cisco.mso.mso_tenant_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenant_name
+ site: site_name
+ state: query
+ delegate_to: localhost
+
+- name: Query all sites of a tenant
+ cisco.mso.mso_tenant_site:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ tenant: tenant_name
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ tenant=dict(type='str', aliases=['name'], required=True),
+ site=dict(type='str', aliases=['name']),
+ cloud_account=dict(type='str'),
+ security_domains=dict(type='list', elements='str', default=[]),
+ aws_trusted=dict(type='bool'),
+ azure_access_type=dict(type='str', default='shared', choices=['managed', 'unmanaged', 'shared']),
+ azure_active_directory_id=dict(type='str'),
+ aws_access_key=dict(type='str'),
+ aws_account_org=dict(type='bool', default='false'),
+ azure_active_directory_name=dict(type='str'),
+ azure_subscription_id=dict(type='str'),
+ azure_application_id=dict(type='str'),
+ azure_credential_name=dict(type='str'),
+ secret_key=dict(type='str'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['tenant', 'site']],
+ ['state', 'present', ['tenant', 'site']],
+ ],
+ )
+
+ state = module.params.get('state')
+ security_domains = module.params.get('security_domains')
+ cloud_account = module.params.get('cloud_account')
+ azure_access_type = module.params.get('azure_access_type')
+ azure_credential_name = module.params.get('azure_credential_name')
+ azure_application_id = module.params.get('azure_application_id')
+ azure_active_directory_id = module.params.get('azure_active_directory_id')
+ azure_active_directory_name = module.params.get('azure_active_directory_name')
+ azure_subscription_id = module.params.get('azure_subscription_id')
+ secret_key = module.params.get('secret_key')
+ aws_account_org = module.params.get('aws_account_org')
+ aws_access_key = module.params.get('aws_access_key')
+ aws_trusted = module.params.get('aws_trusted')
+
+ mso = MSOModule(module)
+
+ # Get tenant_id and site_id
+ tenant_id = mso.lookup_tenant(module.params.get('tenant'))
+ site_id = mso.lookup_site(module.params.get('site'))
+ tenants = [(t.get('id')) for t in mso.query_objs('tenants')]
+ tenant_idx = tenants.index((tenant_id))
+
+ # set tenent and port paths
+ tenant_path = 'tenants/{0}'.format(tenant_id)
+ ops = []
+ ports_path = '/siteAssociations/-'
+ port_path = '/siteAssociations/{0}'.format(site_id)
+
+ payload = dict(
+ siteId=site_id,
+ securityDomains=security_domains,
+ cloudAccount=cloud_account,
+ )
+
+ if cloud_account:
+ if 'azure' in cloud_account:
+ azure_account = dict(
+ accessType=azure_access_type,
+ securityDomains=security_domains,
+ vendor='azure',
+ )
+
+ payload['azureAccount'] = [azure_account]
+
+ cloudSubscription = dict(
+ cloudSubscriptionId=azure_subscription_id,
+ cloudApplicationId=azure_application_id,
+ )
+
+ payload['azureAccount'][0]['cloudSubscription'] = cloudSubscription
+
+ if azure_access_type == 'shared':
+ payload['azureAccount'] = []
+
+ if azure_access_type == 'managed':
+ if not azure_subscription_id:
+ mso.fail_json(msg="azure_susbscription_id is required when in managed mode.")
+ if not azure_application_id:
+ mso.fail_json(msg="azure_application_id is required when in managed mode.")
+ payload['azureAccount'][0]['cloudApplication'] = []
+ payload['azureAccount'][0]['cloudActiveDirectory'] = []
+
+ if azure_access_type == 'unmanaged':
+ if not azure_subscription_id:
+ mso.fail_json(msg="azure_subscription_id is required when in unmanaged mode.")
+ if not azure_application_id:
+ mso.fail_json(msg="azure_application_id is required when in unmanaged mode.")
+ if not secret_key:
+ mso.fail_json(msg="secret_key is required when in unmanaged mode.")
+ if not azure_active_directory_id:
+ mso.fail_json(msg="azure_active_directory_id is required when in unmanaged mode.")
+ if not azure_active_directory_name:
+ mso.fail_json(msg="azure_active_directory_name is required when in unmanaged mode.")
+ if not azure_credential_name:
+ mso.fail_json(msg="azure_credential_name is required when in unmanaged mode.")
+ azure_account.update(
+ accessType='credentials',
+ )
+ cloudApplication = dict(
+ cloudApplicationId=azure_application_id,
+ cloudCredentialName=azure_credential_name,
+ secretKey=secret_key,
+ cloudActiveDirectoryId=azure_active_directory_id
+ )
+ cloudActiveDirectory = dict(
+ cloudActiveDirectoryId=azure_active_directory_id,
+ cloudActiveDirectoryName=azure_active_directory_name
+ )
+ payload['azureAccount'][0]['cloudApplication'] = [cloudApplication]
+ payload['azureAccount'][0]['cloudActiveDirectory'] = [cloudActiveDirectory]
+
+ else:
+ aws_account = dict(
+ accountId=cloud_account,
+ isTrusted=aws_trusted,
+ accessKeyId=aws_access_key,
+ secretKey=secret_key,
+ isAccountInOrg=aws_account_org,
+ )
+
+ if not aws_trusted:
+ if not aws_access_key:
+ mso.fail_json(msg="aws_access_key is a required field in untrusted mode.")
+ if not secret_key:
+ mso.fail_json(msg="secret_key is a required field in untrusted mode.")
+ payload['awsAccount'] = [aws_account]
+
+ sites = [(s.get('siteId')) for s in mso.query_objs('tenants')[tenant_idx]['siteAssociations']]
+
+ if site_id in sites:
+ site_idx = sites.index((site_id))
+ mso.existing = mso.query_objs('tenants')[tenant_idx]['siteAssociations'][site_idx]
+
+ if state == 'query':
+ if len(sites) == 0:
+ mso.fail_json(msg="No site associated with tenant Id {0}".format(tenant_id))
+ elif site_id not in sites and site_id is not None:
+ mso.fail_json(msg="Site Id {0} not associated with tenant Id {1}".format(site_id, tenant_id))
+ elif site_id is None:
+ mso.existing = mso.query_objs('tenants')[tenant_idx]['siteAssociations']
+ mso.exit_json()
+
+ mso.previous = mso.existing
+
+ if state == 'absent':
+ if mso.existing:
+ mso.sent = mso.existing = {}
+ ops.append(dict(op='remove', path=port_path))
+ if state == 'present':
+ mso.sanitize(payload, collate=True)
+
+ if mso.existing:
+ ops.append(dict(op='replace', path=port_path, value=mso.sent))
+ else:
+ ops.append(dict(op='add', path=ports_path, value=mso.sent))
+
+ mso.existing = mso.proposed
+
+ if not module.check_mode and mso.proposed != mso.previous:
+ mso.request(tenant_path, method='PATCH', data=ops)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_user.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_user.py
new file mode 100644
index 00000000..560063f8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_user.py
@@ -0,0 +1,277 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_user
+short_description: Manage users
+description:
+- Manage users on Cisco ACI Multi-Site.
+author:
+- Dag Wieers (@dagwieers)
+options:
+ user:
+ description:
+ - The name of the user.
+ type: str
+ aliases: [ name ]
+ user_password:
+ description:
+ - The password of the user.
+ type: str
+ first_name:
+ description:
+ - The first name of the user.
+ - This parameter is required when creating new users.
+ type: str
+ last_name:
+ description:
+ - The last name of the user.
+ - This parameter is required when creating new users.
+ type: str
+ email:
+ description:
+ - The email address of the user.
+ - This parameter is required when creating new users.
+ type: str
+ phone:
+ description:
+ - The phone number of the user.
+ - This parameter is required when creating new users.
+ type: str
+ account_status:
+ description:
+ - The status of the user account.
+ type: str
+ choices: [ active, inactive ]
+ domain:
+ description:
+ - The domain this user belongs to.
+ - When creating new users, this defaults to C(Local).
+ type: str
+ roles:
+ description:
+ - The roles for this user and their access types (read or write).
+ - Access type defaults to C(write).
+ type: list
+ state:
+ description:
+ - Use C(present) or C(absent) for adding or removing.
+ - Use C(query) for listing an object or multiple objects.
+ type: str
+ choices: [ absent, present, query ]
+ default: present
+notes:
+- A default installation of ACI Multi-Site ships with admin password 'we1come!' which requires a password change on first login.
+ See the examples of how to change the 'admin' password using Ansible.
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Update initial admin password
+ cisco.mso.mso_user:
+ host: mso_host
+ username: admin
+ password: initialPassword
+ validate_certs: false
+ user: admin
+ user_password: newPassword
+ state: present
+ delegate_to: localhost
+
+- name: Add a new user
+ cisco.mso.mso_user:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ validate_certs: false
+ user: dag
+ user_password: userPassword
+ first_name: Dag
+ last_name: Wieers
+ email: dag@wieers.com
+ phone: +32 478 436 299
+ roles:
+ - name: siteManager
+ access_type: write
+ - name: schemaManager
+ access_type: read
+ state: present
+ delegate_to: localhost
+
+- name: Add a new user
+ cisco.mso.mso_user:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ validate_certs: false
+ user: dag
+ first_name: Dag
+ last_name: Wieers
+ email: dag@wieers.com
+ phone: +32 478 436 299
+ roles:
+ - powerUser
+ delegate_to: localhost
+
+- name: Remove a user
+ cisco.mso.mso_user:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ validate_certs: false
+ user: dag
+ state: absent
+ delegate_to: localhost
+
+- name: Query a user
+ cisco.mso.mso_user:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ validate_certs: false
+ user: dag
+ state: query
+ delegate_to: localhost
+ register: query_result
+
+- name: Query all users
+ cisco.mso.mso_user:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ validate_certs: false
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r''' # '''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec, issubset
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ user=dict(type='str', aliases=['name']),
+ user_password=dict(type='str', no_log=True),
+ first_name=dict(type='str'),
+ last_name=dict(type='str'),
+ email=dict(type='str'),
+ phone=dict(type='str'),
+ # TODO: What possible options do we have ?
+ account_status=dict(type='str', choices=['active', 'inactive']),
+ domain=dict(type='str'),
+ roles=dict(type='list'),
+ state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'absent', ['user']],
+ ['state', 'present', ['user']],
+ ],
+ )
+
+ user_name = module.params.get('user')
+ user_password = module.params.get('user_password')
+ first_name = module.params.get('first_name')
+ last_name = module.params.get('last_name')
+ email = module.params.get('email')
+ phone = module.params.get('phone')
+ account_status = module.params.get('account_status')
+ state = module.params.get('state')
+
+ mso = MSOModule(module)
+
+ roles = mso.lookup_roles(module.params.get('roles'))
+ domain = mso.lookup_domain(module.params.get('domain'))
+
+ user_id = None
+ path = 'users'
+
+ # Query for existing object(s)
+ if user_name:
+ mso.existing = mso.get_obj(path, username=user_name)
+ if mso.existing:
+ user_id = mso.existing.get('id')
+ # If we found an existing object, continue with it
+ path = 'users/{id}'.format(id=user_id)
+ else:
+ mso.existing = mso.query_objs(path)
+
+ if state == 'query':
+ pass
+
+ elif state == 'absent':
+ mso.previous = mso.existing
+ if mso.existing:
+ if module.check_mode:
+ mso.existing = {}
+ else:
+ mso.existing = mso.request(path, method='DELETE')
+
+ elif state == 'present':
+ mso.previous = mso.existing
+
+ payload = dict(
+ id=user_id,
+ username=user_name,
+ firstName=first_name,
+ lastName=last_name,
+ emailAddress=email,
+ phoneNumber=phone,
+ accountStatus=account_status,
+ domainId=domain,
+ roles=roles,
+ # active=True,
+ # remote=True,
+ )
+
+ if user_password is not None:
+ payload.update(password=user_password)
+
+ mso.sanitize(payload, collate=True)
+
+ if mso.sent.get('accountStatus') is None:
+ mso.sent['accountStatus'] = 'active'
+
+ if mso.existing:
+ if not issubset(mso.sent, mso.existing):
+ # NOTE: Since MSO always returns '******' as password, we need to assume a change
+ if 'password' in mso.proposed:
+ mso.module.warn("A password change is assumed, as the MSO REST API does not return passwords we do not know.")
+ mso.result['changed'] = True
+
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method='PUT', data=mso.sent)
+
+ else:
+ if user_password is None:
+ mso.fail_json("The user {0} does not exist. The 'user_password' attribute is required to create a new user.".format(user_name))
+ if module.check_mode:
+ mso.existing = mso.proposed
+ else:
+ mso.existing = mso.request(path, method='POST', data=mso.sent)
+
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_version.py b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_version.py
new file mode 100644
index 00000000..33259826
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/plugins/modules/mso_version.py
@@ -0,0 +1,71 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: mso_version
+short_description: Get version of MSO
+description:
+- Retrieve the code version of Cisco Multi-Site Orchestrator.
+author:
+- Lionel Hercot (@lhercot)
+options:
+ state:
+ description:
+ - Use C(query) for retrieving the version object.
+ type: str
+ choices: [ query ]
+ default: query
+extends_documentation_fragment: cisco.mso.modules
+'''
+
+EXAMPLES = r'''
+- name: Get MSO version
+ cisco.mso.mso_version:
+ host: mso_host
+ username: admin
+ password: SomeSecretPassword
+ state: query
+ delegate_to: localhost
+ register: query_result
+'''
+
+RETURN = r'''
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.mso.plugins.module_utils.mso import MSOModule, mso_argument_spec
+
+
+def main():
+ argument_spec = mso_argument_spec()
+ argument_spec.update(
+ state=dict(type='str', default='query', choices=['query'])
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True
+ )
+
+ mso = MSOModule(module)
+
+ path = 'platform/version'
+
+ # Query for mso.existing object
+ mso.existing = mso.query_obj(path)
+ mso.exit_json()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/.gitignore b/collections-debian-merged/ansible_collections/cisco/mso/tests/.gitignore
new file mode 100644
index 00000000..ea1472ec
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/.gitignore
@@ -0,0 +1 @@
+output/
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/inventory.networking b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/inventory.networking
new file mode 100644
index 00000000..4ed384db
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/inventory.networking
@@ -0,0 +1,20 @@
+[mso]
+lh-dmz1-pod1-mso-v223 ansible_host=173.36.219.11 ansible_connection=local mso_hostname=173.36.219.11 mso_username=ansible_github_ci mso_password="sJ94G92#8dq2hx*K4qh"
+lh-dmz1-pod1-mso-v224 ansible_host=173.36.219.29 ansible_connection=local mso_hostname=173.36.219.29 mso_username=ansible_github_ci mso_password="sJ94G92#8dq2hx*K4qh"
+lh-dmz1-pod1-mso-v302 ansible_host=173.36.219.30 ansible_connection=local mso_hostname=173.36.219.30 mso_username=ansible_github_ci mso_password="sJ94G92#8dq2hx*K4qh"
+
+[mso:vars]
+apic_hostname=173.36.219.25
+apic_username=ansible_github_ci
+apic_password="sJ94G92#8dq2hx*K4qh"
+apic_site_id=101
+aws_apic_hostname=54.176.140.90
+aws_apic_username=ansible_github_ci
+aws_apic_password="sJ94G92#8dq2hx*K4qh"
+aws_site_id=20
+azure_apic_hostname=104.42.26.226
+azure_apic_username=ansible_github_ci
+azure_apic_password="sJ94G92#8dq2hx*K4qh"
+azure_site_id=10
+ansible_connection=local
+ansible_python_interpreter=/usr/bin/python3.7 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/network-integration.requirements.txt b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/network-integration.requirements.txt
new file mode 100644
index 00000000..1ecd96b2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/network-integration.requirements.txt
@@ -0,0 +1 @@
+requests-toolbelt \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/target-prefixes.network b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/target-prefixes.network
new file mode 100644
index 00000000..4cb8de95
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/target-prefixes.network
@@ -0,0 +1 @@
+mso \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_backup/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_backup/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_backup/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_backup/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_backup/tasks/main.yml
new file mode 100644
index 00000000..f6542cd6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_backup/tasks/main.yml
@@ -0,0 +1,466 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+- name: Clear tenant
+ mso_tenant:
+ <<: *mso_info
+ tenant: Tenant1
+ display_name: Test_Tenant
+ state: absent
+
+- name: Query all backups
+ mso_backup:
+ <<: *mso_info
+ state: query
+ register: query_ansibleBackup_for_delete
+
+- name: Remove backups starting with name ansibleBackup
+ mso_backup:
+ <<: *mso_info
+ backup: '{{ item.name }}'
+ state: absent
+ loop: '{{ query_ansibleBackup_for_delete.current | selectattr("name", "match", "^ansibleBackup.*") | list }}'
+
+# Create Backups
+- name: Create ansibleBackup1 in check mode
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup1
+ description: via Ansible
+ location_type: local
+ state: present
+ register: cm_add_ansibleBackup1
+ check_mode: yes
+
+- name: Verify cm_add_ansibleBackup1
+ assert:
+ that:
+ - cm_add_ansibleBackup1 is changed
+
+- name: Create ansibleBackup1 in normal mode
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup1
+ description: via Ansible
+ location_type: local
+ state: present
+ register: nm_add_ansibleBackup1
+
+- name: Verify nm_add_ansibleBackup1
+ assert:
+ that:
+ - nm_add_ansibleBackup1.current.backupEntry.metadata.name is match("ansibleBackup1_[0-9a-zA-Z]*")
+
+- name: Create ansibleBackup2 in normal mode
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup2
+ description: via Ansible
+ location_type: local
+ state: present
+ register: nm_add_ansibleBackup2
+
+- name: Verify nm_add_ansibleBackup2
+ assert:
+ that:
+ - nm_add_ansibleBackup2.current.backupEntry.metadata.name is match ("ansibleBackup2_[0-9a-zA-Z]*")
+
+- name: Create ansibleBackup3 in normal mode
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup3
+ description: via Ansible
+ location_type: local
+ state: present
+ register: nm_add_ansibleBackup3
+
+- name: Verify nm_add_ansibleBackup3
+ assert:
+ that:
+ - nm_add_ansibleBackup3.current.backupEntry.metadata.name is match ("ansibleBackup3_[0-9a-zA-Z]*")
+
+- name: Create ansibleBackup3 in normal mode again
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup3
+ description: via Ansible
+ location_type: local
+ state: present
+ register: nm_add_ansibleBackup3_again
+
+- name: Verify nm_add_ansibleBackup3_again
+ assert:
+ that:
+ - nm_add_ansibleBackup3_again.current.backupEntry.metadata.name is match ("ansibleBackup3_[0-9a-zA-Z]*")
+
+- name: Create ansibleBackupRemote1 in normal mode
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackupRemote1
+ description: Remote via Ansible
+ location_type: remote
+ remote_location: ansible_test
+ state: present
+ register: nm_add_ansibleBackupRemote1
+
+- name: Verify nm_add_ansibleBackupRemote1
+ assert:
+ that:
+ - nm_add_ansibleBackupRemote1.current.backupEntry.metadata.name is match ("ansibleBackupRemote1_[0-9a-zA-Z]*")
+
+- name: Verify nm_add_ansibleBackupRemote1
+ assert:
+ that:
+ - nm_add_ansibleBackupRemote1.current.backupEntry.metadata.name is match ("ansibleBackupRemote1_[0-9a-zA-Z]*")
+
+- name: Create ansibleBackupRemote2 in normal mode in a known path
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackupRemote2
+ description: Remote via Ansible
+ location_type: remote
+ remote_location: ansible_test
+ remote_path: test
+ state: present
+ register: nm_add_ansibleBackupRemote2_known_path
+
+- name: Verify nm_add_ansibleBackupRemote2_known_path
+ assert:
+ that:
+ - nm_add_ansibleBackupRemote2_known_path.current.backupEntry.metadata.name is match ("ansibleBackupRemote2_[0-9a-zA-Z]*")
+
+- name: Create ansibleBackupMove in normal mode
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackupMove
+ description: Local to Remote via Ansible
+ location_type: local
+ state: present
+
+# Move Backup test
+- name: Move backup from local to remote location in check mode
+ mso_backup:
+ <<: *mso_info
+ remote_location: ansible_test
+ remote_path: test
+ backup: ansibleBackupMove
+ description: Local to Remote via Ansible
+ state: move
+ check_mode: yes
+ register: move_backup_cm
+
+- name: Move backup from local to remote location in normal mode
+ mso_backup:
+ <<: *mso_info
+ remote_location: ansible_test
+ remote_path: test
+ backup: ansibleBackupMove
+ description: Local to Remote via Ansible
+ state: move
+ register: move_backup_nm
+
+- name: Move a non existent backup from local location to remote
+ mso_backup:
+ <<: *mso_info
+ backup: non_existent_backup
+ remote_location: ansible_test
+ remote_path: test
+ state: move
+ register: move_non_existent_backup
+ ignore_errors: yes
+
+- name: Move a ansibleBackup3 from local location to remote
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup3
+ remote_location: ansible_test
+ remote_path: test
+ state: move
+ register: move_ansibleBackup3
+ ignore_errors: yes
+
+- name: Verify move function of backup
+ assert:
+ that:
+ - move_backup_cm is changed
+ - move_backup_nm is changed
+ - move_non_existent_backup.msg is match ("Backup 'non_existent_backup' does not exist")
+ - move_ansibleBackup3.msg is match ("Multiple backups with same name found. Existing backups with similar names{{':'}} ansibleBackup3_[0-9]*, ansibleBackup3_[0-9]*")
+
+# Download Backup
+- name: Download backup in check mode
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup2
+ destination: ./
+ state: download
+ register: download_ansibleBackup2_cm
+ check_mode: yes
+
+- name: Download backup
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup2
+ destination: ./
+ state: download
+ register: download_ansibleBackup2
+
+- name: Download non existent backup
+ mso_backup:
+ <<: *mso_info
+ backup: non_existent_backup
+ destination: ./
+ state: download
+ ignore_errors: yes
+ register: download_non_existent_backup
+
+- name: Download backup ansibleBackup3
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup3
+ destination: ./
+ state: download
+ ignore_errors: yes
+ register: download_ansibleBackup3
+
+- name: Verify download of backup
+ assert:
+ that:
+ - download_ansibleBackup2_cm is changed
+ - download_ansibleBackup2 is changed
+ - download_non_existent_backup.msg is match ("Backup 'non_existent_backup' does not exist")
+ - download_ansibleBackup3.msg is match ("Multiple backups with same name found. Existing backups with similar names{{':'}} ansibleBackup3_[0-9]*, ansibleBackup3_[0-9]*")
+
+- name: Remove backup ansibleBackup2 for testing purpose
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup2
+ state: absent
+
+# Find Backup
+- name: Find backup
+ find:
+ paths: ./
+ patterns: "*.tar.gz"
+ register: backup_match
+
+# Upload Backup
+- name: Upload a backup from local location in check mode
+ mso_backup:
+ <<: *mso_info
+ backup: "{{ backup_match.files[0].path }}"
+ state: upload
+ register: upload_backup_cm
+ check_mode: yes
+
+- name: Upload a backup from local location
+ mso_backup:
+ <<: *mso_info
+ backup: "{{ backup_match.files[0].path }}"
+ state: upload
+ register: upload_backup
+
+- name: Upload a non existent backup from local location
+ mso_backup:
+ <<: *mso_info
+ backup: non_existent_backup
+ state: upload
+ register: upload_non_existent_backup
+ ignore_errors: yes
+
+- name: Verify upload of backup
+ assert:
+ that:
+ - upload_backup is changed
+ - upload_backup_cm is changed
+ - upload_non_existent_backup.msg is match ("Backup file 'non_existent_backup' not found!")
+
+# Restore Backup
+- name: Restore non existent backup
+ mso_backup:
+ <<: *mso_info
+ backup: non_existent_backup
+ state: restore
+ ignore_errors: yes
+ when: version.current.version is version('2.2.4e', '!=')
+ register: restore_non_existent_backup
+
+- name: Restore backup ansibleBackup3
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup3
+ state: restore
+ ignore_errors: yes
+ when: version.current.version is version('2.2.4e', '!=')
+ register: restore_ansibleBackup3
+
+- name: Verify restore of backup
+ assert:
+ that:
+ - restore_non_existent_backup.msg is match ("Backup 'non_existent_backup' does not exist")
+ - restore_ansibleBackup3.msg is match ("Multiple backups with same name found. Existing backups with similar names{{':'}} ansibleBackup3_[0-9]*, ansibleBackup3_[0-9]*")
+ when: version.current.version is version('2.2.4e', '!=')
+
+- name: Add a new tenant
+ mso_tenant:
+ <<: *mso_info
+ tenant: Tenant1
+ display_name: Test_Tenant
+ state: present
+ when: version.current.version is version('2.2.4e', '!=')
+
+- name: Restore backup in check mode
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup1
+ state: restore
+ check_mode: yes
+ when: version.current.version is version('2.2.4e', '!=')
+ register: restore_cm
+
+- name: Verify retore in check mode
+ assert:
+ that:
+ - restore_cm is changed
+ when: version.current.version is version('2.2.4e', '!=')
+
+- name: Restore backup
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup1
+ state: restore
+ when: version.current.version is version('2.2.4e', '!=')
+
+- name: Pause for 6 minutes after restore
+ pause:
+ minutes: 6
+
+- name: Query Tenant1
+ mso_tenant:
+ <<: *mso_info
+ tenant: Tenant1
+ state: query
+ when: version.current.version is version('2.2.4e', '!=')
+ register: query_non_existent_tenant
+
+- name: Verify non existent Tenant
+ assert:
+ that:
+ - query_non_existent_tenant is not changed
+ - query_non_existent_tenant.current == {}
+ when: version.current.version is version('2.2.4e', '!=')
+
+# Query a Backup
+- name: Query ansibleBackup3
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup3
+ state: query
+ register: query_ansibleBackup3
+
+- name: Verify query_ansibleBackup3
+ assert:
+ that:
+ - query_ansibleBackup3 is not changed
+ - query_ansibleBackup3.current | length == 2
+
+# Query All
+- name: Query All
+ mso_backup:
+ <<: *mso_info
+ state: query
+ register: query_all_backups
+
+- name: Verify query_all_backups
+ assert:
+ that:
+ - query_all_backups is not changed
+ - query_all_backups.current | selectattr("name", "match", "^ansibleBackup.*") | list | length == 7
+
+# Remove Backup
+- name: Remove ansibleBackup1 in check mode
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup1
+ state: absent
+ check_mode: yes
+ register: cm_remove_ansibleBackup1
+
+- name: Verify cm_remove_ansibleBackup1
+ assert:
+ that:
+ - cm_remove_ansibleBackup1 is changed
+
+- name: Remove ansibleBackup1 in normal mode
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup1
+ state: absent
+ register: nm_remove_ansibleBackup1
+
+- name: Verify nm_remove_ansibleBackup1
+ assert:
+ that:
+ - nm_remove_ansibleBackup1 is changed
+
+- name: Remove ansibleBackup1 in normal mode again
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup1
+ state: absent
+ register: nm_remove_ansibleBackup1_2
+
+- name: Verify nm_remove_ansibleBackup1_2
+ assert:
+ that:
+ - nm_remove_ansibleBackup1_2 is not changed
+
+- name: Remove ansibleBackup3 in normal mode
+ mso_backup:
+ <<: *mso_info
+ backup: ansibleBackup3
+ state: absent
+ ignore_errors: yes
+ register: nm_remove_ansibleBackup3
+
+- name: Verify nm_remove_ansibleBackup3
+ assert:
+ that:
+ - nm_remove_ansibleBackup3.msg is match ("Multiple backups with same name found. Existing backups with similar names{{':'}} ansibleBackup3_[0-9]*, ansibleBackup3_[0-9]*")
+
+- name: Query non_existent_backup
+ mso_backup:
+ <<: *mso_info
+ backup: nonExistentBackup
+ state: query
+ register: query_non_existent_backup
+
+- name: Verify query_non_existent_backup
+ assert:
+ that:
+ - query_non_existent_backup is not changed \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy/tasks/main.yaml
new file mode 100644
index 00000000..b9871436
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy/tasks/main.yaml
@@ -0,0 +1,227 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2020, Jorge Gomez (@jgomezve) <jgomezve@cisco.com> (based on mso_dhcp_relay_policy test case)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+#CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ state: present
+ register: ansible_tenant
+
+- name: Remove DHCP Option Policies
+ mso_dhcp_option_policy:
+ <<: *mso_info
+ dhcp_option_policy: '{{ item }}'
+ state: absent
+ loop:
+ - ansible_dhcp_option_1
+ - ansible_dhcp_option_2
+
+# ADD DHCP Policy
+- name: Add a new DHCP Option Policy 1 (check mode)
+ mso_dhcp_option_policy: &create_dhcp
+ <<: *mso_info
+ dhcp_option_policy: ansible_dhcp_option_1
+ description: "My Test DHCP Policy 1"
+ tenant: ansible_test
+ state: present
+ check_mode: yes
+ register: dhcp_pol1_cm
+
+- name: Add a new DHCP Option Policy 1 (normal mode)
+ mso_dhcp_option_policy:
+ <<: *create_dhcp
+ register: dhcp_pol1_nm
+
+- name: Verify dhcp_pol1_cm and dhcp_pol1_nm
+ assert:
+ that:
+ - dhcp_pol1_cm is changed
+ - dhcp_pol1_nm is changed
+ - dhcp_pol1_cm.current.name == dhcp_pol1_nm.current.name == 'ansible_dhcp_option_1'
+ - dhcp_pol1_cm.current.desc == dhcp_pol1_nm.current.desc == 'My Test DHCP Policy 1'
+ - dhcp_pol1_cm.current.policySubtype == dhcp_pol1_nm.current.policySubtype == 'option'
+ - dhcp_pol1_cm.current.policyType == dhcp_pol1_nm.current.policyType == 'dhcp'
+ - dhcp_pol1_cm.current.tenantId == dhcp_pol1_nm.current.tenantId == ansible_tenant.current.id
+
+- name: Add a new DHCP Option Policy 1 again (check mode)
+ mso_dhcp_option_policy:
+ <<: *create_dhcp
+ check_mode: yes
+ register: dhcp_pol1_again_cm
+
+- name: Add a new DHCP Option Policy 1 again (normal mode)
+ mso_dhcp_option_policy:
+ <<: *create_dhcp
+ register: dhcp_pol1_again_nm
+
+- name: Verify dhcp_pol1_again_cm and dhcp_pol1_again_nm
+ assert:
+ that:
+ - dhcp_pol1_again_cm is not changed
+ - dhcp_pol1_again_nm is not changed
+ - dhcp_pol1_again_cm.current.name == dhcp_pol1_again_nm.current.name == 'ansible_dhcp_option_1'
+ - dhcp_pol1_again_cm.current.desc == dhcp_pol1_again_nm.current.desc == 'My Test DHCP Policy 1'
+ - dhcp_pol1_again_cm.current.policySubtype == dhcp_pol1_again_nm.current.policySubtype == 'option'
+ - dhcp_pol1_again_cm.current.policyType == dhcp_pol1_again_nm.current.policyType == 'dhcp'
+ - dhcp_pol1_again_cm.current.tenantId == dhcp_pol1_again_nm.current.tenantId == ansible_tenant.current.id
+
+- name: Add a new DHCP Option Policy 2 (normal mode)
+ mso_dhcp_option_policy:
+ <<: *create_dhcp
+ dhcp_option_policy: ansible_dhcp_option_2
+
+- name: Change DHCP Option Policy 1 description (check mode)
+ mso_dhcp_option_policy:
+ <<: *create_dhcp
+ description: "My Changed Test DHCP Policy 1"
+ check_mode: yes
+ register: change_dhcp_pol1_cm
+
+- name: Change DHCP Option Policy 1 description (normal mode)
+ mso_dhcp_option_policy:
+ <<: *create_dhcp
+ description: "My Changed Test DHCP Policy 1"
+ register: change_dhcp_pol1_nm
+
+- name: Verify change_dhcp_pol1_cm and change_dhcp_pol1_nm
+ assert:
+ that:
+ - change_dhcp_pol1_cm is changed
+ - change_dhcp_pol1_nm is changed
+ - change_dhcp_pol1_cm.current.name == change_dhcp_pol1_nm.current.name == 'ansible_dhcp_option_1'
+ - change_dhcp_pol1_cm.current.desc == change_dhcp_pol1_nm.current.desc == 'My Changed Test DHCP Policy 1'
+ - change_dhcp_pol1_cm.current.policySubtype == change_dhcp_pol1_nm.current.policySubtype == 'option'
+ - change_dhcp_pol1_cm.current.policyType == change_dhcp_pol1_nm.current.policyType == 'dhcp'
+ - change_dhcp_pol1_cm.current.tenantId == change_dhcp_pol1_nm.current.tenantId == ansible_tenant.current.id
+
+# QUERY A DHCP OPTION POLICY
+- name: Query DHCP Option Policy 1 (check mode)
+ mso_dhcp_option_policy: &query_dhcp
+ <<: *mso_info
+ dhcp_option_policy: ansible_dhcp_option_1
+ state: query
+ check_mode: yes
+ register: dhcp_pol1_query_cm
+
+- name: Query DHCP Option Policy 1 (normal mode)
+ mso_dhcp_option_policy:
+ <<: *query_dhcp
+ register: dhcp_pol1_query_nm
+
+- name: Verify dhcp_pol1_query
+ assert:
+ that:
+ - dhcp_pol1_query_cm is not changed
+ - dhcp_pol1_query_nm is not changed
+ - dhcp_pol1_query_cm.current.name == dhcp_pol1_query_nm.current.name == 'ansible_dhcp_option_1'
+ - dhcp_pol1_query_cm.current.desc == dhcp_pol1_query_nm.current.desc == 'My Changed Test DHCP Policy 1'
+ - dhcp_pol1_query_cm.current.policySubtype == dhcp_pol1_query_nm.current.policySubtype == 'option'
+ - dhcp_pol1_query_cm.current.policyType == dhcp_pol1_query_nm.current.policyType == 'dhcp'
+
+# QUERY A NON-EXISTING DHCP OPTION POLICY
+- name: Query non-existing DHCP Option Policy (normal mode)
+ mso_dhcp_option_policy:
+ <<: *mso_info
+ dhcp_option_policy: non_existing
+ state: query
+ register: quey_non_dhcp_pol
+
+- name: Verify quey_non_dhcp_pol
+ assert:
+ that:
+ - quey_non_dhcp_pol is not changed
+
+# QUERY ALL DHCP OPTION POLICIES
+- name: Query all DHCP Option Policies (normal mode)
+ mso_dhcp_option_policy:
+ <<: *mso_info
+ state: query
+ register: dhcp_policies_query
+
+- name: Verify dhcp_policies_query
+ assert:
+ that:
+ - dhcp_policies_query is not changed
+ - dhcp_policies_query.current | length == 2
+
+# REMOVE DHCP POLICY
+- name: Remove DHCP Option Policy 1 (check mode)
+ mso_dhcp_option_policy: &remove_dhcp
+ <<: *mso_info
+ dhcp_option_policy: ansible_dhcp_option_1
+ state: absent
+ check_mode: yes
+ register: dhcp_pol1_removed_cm
+
+- name: Remove DHCP Option Policy 1 (normal mode)
+ mso_dhcp_option_policy:
+ <<: *remove_dhcp
+ register: dhcp_pol1_removed_nm
+
+- name: Verify dhcp_policies_removed
+ assert:
+ that:
+ - dhcp_pol1_removed_cm is changed
+ - dhcp_pol1_removed_nm is changed
+ - dhcp_pol1_removed_cm.current == dhcp_pol1_removed_nm.current == {}
+
+# REMOVE DHCP POLICY AGAIN
+- name: Remove DHCP Option Policy 1 again (check mode)
+ mso_dhcp_option_policy:
+ <<: *remove_dhcp
+ check_mode: yes
+ register: dhcp_pol1_removed_again_cm
+
+- name: Remove DHCP Option Policy 1 again (normal mode)
+ mso_dhcp_option_policy:
+ <<: *remove_dhcp
+ register: dhcp_pol1_removed_again_nm
+
+- name: Verify dhcp_pol1_removed_again
+ assert:
+ that:
+ - dhcp_pol1_removed_again_cm is not changed
+ - dhcp_pol1_removed_again_nm is not changed
+ - dhcp_pol1_removed_again_cm.current == dhcp_pol1_removed_again_nm.current == {}
+ - dhcp_pol1_removed_again_cm.previous == dhcp_pol1_removed_again_nm.previous == {}
+
+
+# USE A NON-EXISTING TENANT
+- name: Non Existing Tenant for DHCP Option Policy 3 (normal mode)
+ mso_dhcp_option_policy:
+ <<: *mso_info
+ dhcp_option_policy: ansible_dhcp_option_3
+ description: "My Test DHCP Policy 3"
+ tenant: non_existing
+ state: present
+ ignore_errors: yes
+ register: nm_non_existing_tenant
+
+- name: Verify nm_non_existing_tenant
+ assert:
+ that:
+ - nm_non_existing_tenant is not changed
+ - nm_non_existing_tenant.msg == "Tenant 'non_existing' is not valid tenant name." \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy_option/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy_option/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy_option/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy_option/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy_option/tasks/main.yaml
new file mode 100644
index 00000000..509f7fa6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_option_policy_option/tasks/main.yaml
@@ -0,0 +1,393 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2020, Jorge Gomez (@jgomezve) <jgomezve@cisco.com> (based on mso_dhcp_relay_policy test case)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+#CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove options from DHCP Option Policy
+ mso_dhcp_option_policy_option:
+ <<: *mso_info
+ dhcp_option_policy: ansible_dhcp_option_1
+ name: "{{ item }}"
+ state: absent
+ loop:
+ - ansible_test
+ - ansible_test_2
+ ignore_errors: yes
+
+- name: Stop consuming DHCP Policy
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: CLIENT_BD
+ vrf:
+ name: VRF_1
+ state: present
+ ignore_errors: yes
+
+- name: Remove DHCP Relay Policy 1
+ mso_dhcp_relay_policy:
+ <<: *mso_info
+ dhcp_relay_policy: '{{ item }}'
+ state: absent
+ loop:
+ - ansible_dhcp_relay_1
+ - ansible_dhcp_relay_2
+
+- name: Remove DHCP Option Policies
+ mso_dhcp_option_policy:
+ <<: *mso_info
+ dhcp_option_policy: '{{ item }}'
+ state: absent
+ ignore_errors: yes
+ loop:
+ - ansible_dhcp_option_1
+ - ansible_dhcp_option_2
+
+- name: Undeploy sites in schema 1 template 1
+ mso_schema_template_deploy:
+ <<: *mso_info
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ item }}'
+ state: undeploy
+ ignore_errors: yes
+ loop:
+ - '{{ mso_site | default("ansible_test") }}'
+ - '{{ mso_site | default("ansible_test") }}_2'
+ - 'aws_{{ mso_site | default("ansible_test") }}'
+ - 'azure_{{ mso_site | default("ansible_test") }}'
+
+- name: Undeploy sites in schema 1 template 2
+ mso_schema_template_deploy:
+ <<: *mso_info
+ template: Template 2
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ item }}'
+ state: undeploy
+ ignore_errors: yes
+ loop:
+ - '{{ mso_site | default("ansible_test") }}'
+ - '{{ mso_site | default("ansible_test") }}_2'
+ - 'aws_{{ mso_site | default("ansible_test") }}'
+ - 'azure_{{ mso_site | default("ansible_test") }}'
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ state: present
+ register: tenant_ansible
+
+- name: Ensure schema 1 with Template 1 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+
+- name: Add a new VRF
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF_1
+ state: present
+
+- name: Add BD
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: CLIENT_BD
+ vrf:
+ name: VRF_1
+ state: present
+
+# ADD DHCP RELAY AND OPTION POLICY
+- name: Add a new DHCP Option Policy 1 (Normal mode)
+ mso_dhcp_option_policy:
+ <<: *mso_info
+ dhcp_option_policy: ansible_dhcp_option_1
+ description: "My Test DHCP Policy 1"
+ tenant: ansible_test
+ state: present
+
+- name: Add a new DHCP Relay Policy 1 (Normal mode)
+ mso_dhcp_relay_policy:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ description: "My Test DHCP Policy 1"
+ tenant: ansible_test
+ state: present
+
+# ADD OPTION TO DHCP OPTION POLICY
+- name: Add Option to DHCP Option Policy (check mode)
+ mso_dhcp_option_policy_option: &create_option
+ <<: *mso_info
+ dhcp_option_policy: ansible_dhcp_option_1
+ name: ansible_test
+ id: 1
+ data: DHCP Data
+ state: present
+ check_mode: yes
+ register: dhcp_pol1_opt1_cm
+
+- name: Add Option to DHCP Option Policy (normal mode)
+ mso_dhcp_option_policy_option:
+ <<: *create_option
+ register: dhcp_pol1_opt1_nm
+
+- name: Verify dhcp_pol1_opt1
+ assert:
+ that:
+ - dhcp_pol1_opt1_cm is changed
+ - dhcp_pol1_opt1_nm is changed
+ - dhcp_pol1_opt1_cm.current.name == dhcp_pol1_opt1_nm.current.name == 'ansible_test'
+ - dhcp_pol1_opt1_cm.current.id == dhcp_pol1_opt1_nm.current.id == '1'
+ - dhcp_pol1_opt1_cm.current.data == dhcp_pol1_opt1_nm.current.data == 'DHCP Data'
+
+- name: Add Option to DHCP Option Policy again (check mode)
+ mso_dhcp_option_policy_option:
+ <<: *create_option
+ check_mode: yes
+ register: dhcp_pol1_opt1_again_cm
+
+- name: Add Option to DHCP Option Policy again (normal mode)
+ mso_dhcp_option_policy_option:
+ <<: *create_option
+ register: dhcp_pol1_opt1_again_nm
+
+- name: Verify dhcp_pol1_opt1_again
+ assert:
+ that:
+ - dhcp_pol1_opt1_again_cm is not changed
+ - dhcp_pol1_opt1_again_nm is not changed
+ - dhcp_pol1_opt1_again_cm.current.name == dhcp_pol1_opt1_again_nm.current.name == 'ansible_test'
+ - dhcp_pol1_opt1_again_cm.current.id == dhcp_pol1_opt1_again_nm.current.id == '1'
+ - dhcp_pol1_opt1_again_cm.current.data == dhcp_pol1_opt1_again_nm.current.data == 'DHCP Data'
+
+- name: Change Option IP to DHCP Option Policy (check mode)
+ mso_dhcp_option_policy_option:
+ <<: *create_option
+ data: Changed DHCP Data
+ check_mode: yes
+ register: dhcp_pol1_opt1_change_cm
+
+- name: Change Option IP to DHCP Option Policy (normal mode)
+ mso_dhcp_option_policy_option:
+ <<: *create_option
+ data: Changed DHCP Data
+ register: dhcp_pol1_opt1_change_nm
+
+- name: Verify dhcp_pol1_opt1_change
+ assert:
+ that:
+ - dhcp_pol1_opt1_change_cm is changed
+ - dhcp_pol1_opt1_change_nm is changed
+ - dhcp_pol1_opt1_change_cm.current.name == dhcp_pol1_opt1_change_nm.current.name == 'ansible_test'
+ - dhcp_pol1_opt1_change_cm.current.id == dhcp_pol1_opt1_change_nm.current.id == '1'
+ - dhcp_pol1_opt1_change_cm.current.data == dhcp_pol1_opt1_change_nm.current.data == 'Changed DHCP Data'
+
+- name: Add 2nd Option to DHCP Option Policy (check mode)
+ mso_dhcp_option_policy_option:
+ <<: *create_option
+ name: ansible_test_2
+ check_mode: yes
+ register: dhcp_pol1_opt2_cm
+
+- name: Add 2nd Option to DHCP Option Policy (normal mode)
+ mso_dhcp_option_policy_option:
+ <<: *create_option
+ name: ansible_test_2
+ register: dhcp_pol1_opt2_nm
+
+- name: Verify dhcp_pol1_opt2
+ assert:
+ that:
+ - dhcp_pol1_opt2_cm is changed
+ - dhcp_pol1_opt2_nm is changed
+ - dhcp_pol1_opt2_cm.current.name == dhcp_pol1_opt2_nm.current.name == 'ansible_test_2'
+ - dhcp_pol1_opt2_cm.current.id == dhcp_pol1_opt2_nm.current.id == '1'
+ - dhcp_pol1_opt2_cm.current.data == dhcp_pol1_opt2_nm.current.data == 'DHCP Data'
+
+# QUERY OPTION FROM DHCP OPTION POLICY
+- name: Query Option from DHCP Option Policy (check mode)
+ mso_dhcp_option_policy_option: &query_option
+ <<: *mso_info
+ dhcp_option_policy: ansible_dhcp_option_1
+ name: ansible_test
+ state: query
+ register: dhcp_pol1_opt1_query_cm
+
+- name: Query Option from DHCP Option Policy (normal mode)
+ mso_dhcp_option_policy_option:
+ <<: *query_option
+ register: dhcp_pol1_opt1_query_nm
+
+- name: Query non_existing Option from DHCP Option Policy
+ mso_dhcp_option_policy_option:
+ <<: *query_option
+ name: non_existing
+ state: query
+ register: dhcp_pol1_opt1_query_non_existing
+
+- name: Query all Options from a DHCP Option Policy
+ mso_dhcp_option_policy_option:
+ <<: *mso_info
+ dhcp_option_policy: ansible_dhcp_option_1
+ state: query
+ register: dhcp_pol1_query_all
+
+- name: Verify all query variables
+ assert:
+ that:
+ - dhcp_pol1_opt1_query_cm is not changed
+ - dhcp_pol1_opt1_query_nm is not changed
+ - dhcp_pol1_opt1_query_non_existing is not changed
+ - dhcp_pol1_query_all is not changed
+ - dhcp_pol1_opt1_query_cm.current.name == dhcp_pol1_opt1_query_nm.current.name == 'ansible_test'
+ - dhcp_pol1_opt1_query_cm.current.id == dhcp_pol1_opt1_query_nm.current.id == '1'
+ - dhcp_pol1_opt1_query_cm.current.data == dhcp_pol1_opt1_query_nm.current.data == 'Changed DHCP Data'
+ - dhcp_pol1_opt1_query_non_existing.current == {}
+ - dhcp_pol1_query_all.current | length == 2
+
+# REMOVE OPTION FROM DHCP OPTION POLICY
+- name: Remove Option from DHCP Option Policy (check mode)
+ mso_dhcp_option_policy_option: &delete_option
+ <<: *mso_info
+ dhcp_option_policy: ansible_dhcp_option_1
+ name: ansible_test
+ state: absent
+ check_mode: yes
+ register: dhcp_pol1_opt1_del_cm
+
+- name: Remove Option from DHCP Option Policy (normal mode)
+ mso_dhcp_option_policy_option:
+ <<: *delete_option
+ register: dhcp_pol1_opt1_del_nm
+
+- name: Verify dhcp_pol1_opt1_del
+ assert:
+ that:
+ - dhcp_pol1_opt1_del_cm is changed
+ - dhcp_pol1_opt1_del_nm is changed
+ - dhcp_pol1_opt1_del_cm.current == dhcp_pol1_opt1_del_nm.current == {}
+
+- name: Remove Option from DHCP Option Policy again (check mode)
+ mso_dhcp_option_policy_option:
+ <<: *delete_option
+ check_mode: yes
+ register: dhcp_pol1_opt1_del_again_cm
+
+- name: Remove Option from DHCP Option Policy again (normal mode)
+ mso_dhcp_option_policy_option:
+ <<: *delete_option
+ register: dhcp_pol1_opt1_del_again_nm
+
+- name: Verify dhcp_pol1_opt1_again_del
+ assert:
+ that:
+ - dhcp_pol1_opt1_del_again_cm is not changed
+ - dhcp_pol1_opt1_del_again_nm is not changed
+ - dhcp_pol1_opt1_del_again_cm.current == dhcp_pol1_opt1_del_again_nm.current == {}
+
+- name: Remove Non-Existing Option
+ mso_dhcp_option_policy_option:
+ <<: *delete_option
+ name: non_existing
+ register: dhcp_pol1_opt1_del_nm_non_existing
+
+- name: Verify dhcp_pol1_opt1_del_nm_non_existing
+ assert:
+ that:
+ - dhcp_pol1_opt1_del_nm_non_existing is not changed
+ - dhcp_pol1_opt1_del_nm_non_existing.current == {}
+
+# CONSUME DHCP POLICIES
+- name: Get DHCP Relay Policy version
+ mso_dhcp_relay_policy:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ state: query
+ register: dhcp_relay_policy_version
+
+- name: Get DHCP Option Policy version
+ mso_dhcp_option_policy:
+ <<: *mso_info
+ dhcp_option_policy: ansible_dhcp_option_1
+ state: query
+ register: dhcp_option_policy_version
+
+- name: Consume DHCP Policy
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: CLIENT_BD
+ vrf:
+ name: VRF_1
+ dhcp_policy:
+ name: "{{ dhcp_relay_policy_version.current.name }}"
+ version: "{{ dhcp_relay_policy_version.current.version | int }}"
+ dhcp_option_policy:
+ name: "{{ dhcp_option_policy_version.current.name }}"
+ version: "{{ dhcp_option_policy_version.current.version | int }}"
+ state: present
+ register: bd_dhcp_policy
+
+- name: Stop consuming DHCP Policy
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: CLIENT_BD
+ vrf:
+ name: VRF_1
+ state: present
+ register: bd_dhcp_policy
+
+# QUERY OPTION FROM non_existing DHCP OPTION POLICY
+- name: Query Option from DHCP Option Policy (check mode)
+ mso_dhcp_option_policy_option:
+ <<: *mso_info
+ dhcp_option_policy: non_existing
+ state: query
+ ignore_errors: yes
+ register: dhcp_non_existing
+
+- name: Verify dhcp_non_existing
+ assert:
+ that:
+ - dhcp_non_existing is not changed
+ - dhcp_non_existing.msg == "DHCP Option Policy 'non_existing' is not a valid DHCP Option Policy name." \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy/tasks/main.yaml
new file mode 100644
index 00000000..90f49f74
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy/tasks/main.yaml
@@ -0,0 +1,226 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Jorge Gomez (@jgomezve) <jgomezve@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+#CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ state: present
+ register: ansible_tenant
+
+- name: Remove DHCP Relay Policy 1
+ mso_dhcp_relay_policy:
+ <<: *mso_info
+ dhcp_relay_policy: '{{ item }}'
+ state: absent
+ loop:
+ - ansible_dhcp_relay_1
+ - ansible_dhcp_relay_2
+
+# ADD DHCP Policy
+- name: Add a new DHCP Relay Policy 1 (check mode)
+ mso_dhcp_relay_policy: &create_dhcp
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ description: "My Test DHCP Policy 1"
+ tenant: ansible_test
+ state: present
+ check_mode: yes
+ register: dhcp_pol1_cm
+
+- name: Add a new DHCP Relay Policy 1 (normal mode)
+ mso_dhcp_relay_policy:
+ <<: *create_dhcp
+ register: dhcp_pol1_nm
+
+- name: Verify dhcp_pol1_cm and dhcp_pol1_nm
+ assert:
+ that:
+ - dhcp_pol1_cm is changed
+ - dhcp_pol1_nm is changed
+ - dhcp_pol1_cm.current.name == dhcp_pol1_nm.current.name == 'ansible_dhcp_relay_1'
+ - dhcp_pol1_cm.current.desc == dhcp_pol1_nm.current.desc == 'My Test DHCP Policy 1'
+ - dhcp_pol1_cm.current.policySubtype == dhcp_pol1_nm.current.policySubtype == 'relay'
+ - dhcp_pol1_cm.current.policyType == dhcp_pol1_nm.current.policyType == 'dhcp'
+ - dhcp_pol1_cm.current.tenantId == dhcp_pol1_nm.current.tenantId == ansible_tenant.current.id
+
+- name: Add a new DHCP Relay Policy 1 again (check mode)
+ mso_dhcp_relay_policy:
+ <<: *create_dhcp
+ check_mode: yes
+ register: dhcp_pol1_again_cm
+
+- name: Add a new DHCP Relay Policy 1 again (normal mode)
+ mso_dhcp_relay_policy:
+ <<: *create_dhcp
+ register: dhcp_pol1_again_nm
+
+- name: Verify dhcp_pol1_again_cm and dhcp_pol1_again_nm
+ assert:
+ that:
+ - dhcp_pol1_again_cm is not changed
+ - dhcp_pol1_again_nm is not changed
+ - dhcp_pol1_again_cm.current.name == dhcp_pol1_again_nm.current.name == 'ansible_dhcp_relay_1'
+ - dhcp_pol1_again_cm.current.desc == dhcp_pol1_again_nm.current.desc == 'My Test DHCP Policy 1'
+ - dhcp_pol1_again_cm.current.policySubtype == dhcp_pol1_again_nm.current.policySubtype == 'relay'
+ - dhcp_pol1_again_cm.current.policyType == dhcp_pol1_again_nm.current.policyType == 'dhcp'
+ - dhcp_pol1_again_cm.current.tenantId == dhcp_pol1_again_nm.current.tenantId == ansible_tenant.current.id
+
+- name: Add a new DHCP Relay Policy 2 (normal mode)
+ mso_dhcp_relay_policy:
+ <<: *create_dhcp
+ dhcp_relay_policy: ansible_dhcp_relay_2
+
+- name: Change DHCP Relay Policy 1 description (check mode)
+ mso_dhcp_relay_policy:
+ <<: *create_dhcp
+ description: "My Changed Test DHCP Policy 1"
+ check_mode: yes
+ register: change_dhcp_pol1_cm
+
+- name: Change DHCP Relay Policy 1 description (normal mode)
+ mso_dhcp_relay_policy:
+ <<: *create_dhcp
+ description: "My Changed Test DHCP Policy 1"
+ register: change_dhcp_pol1_nm
+
+- name: Verify change_dhcp_pol1_cm and change_dhcp_pol1_nm
+ assert:
+ that:
+ - change_dhcp_pol1_cm is changed
+ - change_dhcp_pol1_nm is changed
+ - change_dhcp_pol1_cm.current.name == change_dhcp_pol1_nm.current.name == 'ansible_dhcp_relay_1'
+ - change_dhcp_pol1_cm.current.desc == change_dhcp_pol1_nm.current.desc == 'My Changed Test DHCP Policy 1'
+ - change_dhcp_pol1_cm.current.policySubtype == change_dhcp_pol1_nm.current.policySubtype == 'relay'
+ - change_dhcp_pol1_cm.current.policyType == change_dhcp_pol1_nm.current.policyType == 'dhcp'
+ - change_dhcp_pol1_cm.current.tenantId == change_dhcp_pol1_nm.current.tenantId == ansible_tenant.current.id
+
+# QUERY A DHCP RELAY POLICY
+- name: Query DHCP Relay Policy 1 (check mode)
+ mso_dhcp_relay_policy: &query_dhcp
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ state: query
+ check_mode: yes
+ register: dhcp_pol1_query_cm
+
+- name: Query DHCP Relay Policy 1 (normal mode)
+ mso_dhcp_relay_policy:
+ <<: *query_dhcp
+ register: dhcp_pol1_query_nm
+
+- name: Verify dhcp_pol1_query
+ assert:
+ that:
+ - dhcp_pol1_query_cm is not changed
+ - dhcp_pol1_query_nm is not changed
+ - dhcp_pol1_query_cm.current.name == dhcp_pol1_query_nm.current.name == 'ansible_dhcp_relay_1'
+ - dhcp_pol1_query_cm.current.desc == dhcp_pol1_query_nm.current.desc == 'My Changed Test DHCP Policy 1'
+ - dhcp_pol1_query_cm.current.policySubtype == dhcp_pol1_query_nm.current.policySubtype == 'relay'
+ - dhcp_pol1_query_cm.current.policyType == dhcp_pol1_query_nm.current.policyType == 'dhcp'
+
+# QUERY A NON-EXISTING DHCP RELAY POLICY
+- name: Query non-existing DHCP Relay Policy (normal mode)
+ mso_dhcp_relay_policy:
+ <<: *mso_info
+ dhcp_relay_policy: non_existing
+ state: query
+ register: quey_non_dhcp_pol
+
+- name: Verify quey_non_dhcp_pol
+ assert:
+ that:
+ - quey_non_dhcp_pol is not changed
+
+# QUERY ALL DHCP RELAY POLICIES
+- name: Query all DHCP Relay Policies (normal mode)
+ mso_dhcp_relay_policy:
+ <<: *mso_info
+ state: query
+ register: dhcp_policies_query
+
+- name: Verify dhcp_policies_query
+ assert:
+ that:
+ - dhcp_policies_query is not changed
+ - dhcp_policies_query.current | length == 2
+
+# REMOVE DHCP POLICY
+- name: Remove DHCP Relay Policy 1 (check mode)
+ mso_dhcp_relay_policy: &remove_dhcp
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ state: absent
+ check_mode: yes
+ register: dhcp_pol1_removed_cm
+
+- name: Remove DHCP Relay Policy 1 (normal mode)
+ mso_dhcp_relay_policy:
+ <<: *remove_dhcp
+ register: dhcp_pol1_removed_nm
+
+- name: Verify dhcp_policies_removed
+ assert:
+ that:
+ - dhcp_pol1_removed_cm is changed
+ - dhcp_pol1_removed_nm is changed
+ - dhcp_pol1_removed_cm.current == dhcp_pol1_removed_nm.current == {}
+
+# REMOVE DHCP POLICY AGAIN
+- name: Remove DHCP Relay Policy 1 again (check mode)
+ mso_dhcp_relay_policy:
+ <<: *remove_dhcp
+ check_mode: yes
+ register: dhcp_pol1_removed_again_cm
+
+- name: Remove DHCP Relay Policy 1 again (normal mode)
+ mso_dhcp_relay_policy:
+ <<: *remove_dhcp
+ register: dhcp_pol1_removed_again_nm
+
+- name: Verify dhcp_pol1_removed_again
+ assert:
+ that:
+ - dhcp_pol1_removed_again_cm is not changed
+ - dhcp_pol1_removed_again_nm is not changed
+ - dhcp_pol1_removed_again_cm.current == dhcp_pol1_removed_again_nm.current == {}
+ - dhcp_pol1_removed_again_cm.previous == dhcp_pol1_removed_again_nm.previous == {}
+
+
+# USE A NON-EXISTING TENANT
+- name: Non Existing Tenant for DHCP Relay Policy 3 (normal mode)
+ mso_dhcp_relay_policy:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_3
+ description: "My Test DHCP Policy 3"
+ tenant: non_existing
+ state: present
+ ignore_errors: yes
+ register: nm_non_existing_tenant
+
+- name: Verify nm_non_existing_tenant
+ assert:
+ that:
+ - nm_non_existing_tenant is not changed
+ - nm_non_existing_tenant.msg == "Tenant 'non_existing' is not valid tenant name." \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy_provider/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy_provider/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy_provider/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy_provider/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy_provider/tasks/main.yaml
new file mode 100644
index 00000000..a6751b50
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_dhcp_relay_policy_provider/tasks/main.yaml
@@ -0,0 +1,604 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Jorge Gomez (@jgomezve) <cizhao@jgomezve.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+#CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove EXT_EPGs Providers from DHCP Relay Policy
+ mso_dhcp_relay_policy_provider:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ tenant: ansible_test
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_endpoint_group: "{{ item }}"
+ state: absent
+ ignore_errors: yes
+ loop:
+ - EXT_EPG_1
+ - EXT_EPG_2
+
+- name: Remove EXT_EPGs Providers from DHCP Relay Policy
+ mso_dhcp_relay_policy_provider:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ tenant: ansible_test
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ endpoint_group: "{{ item }}"
+ application_profile: "ANP_1"
+ state: absent
+ ignore_errors: yes
+ loop:
+ - EPG_1
+ - EPG_2
+
+- name: Stop consuming DHCP Policy
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: CLIENT_BD
+ vrf:
+ name: VRF_1
+ state: present
+ ignore_errors: yes
+
+- name: Remove DHCP Relay Policies
+ mso_dhcp_relay_policy:
+ <<: *mso_info
+ dhcp_relay_policy: '{{ item }}'
+ state: absent
+ ignore_errors: yes
+ loop:
+ - ansible_dhcp_relay_1
+ - ansible_dhcp_relay_2
+
+- name: Undeploy sites in schema 1 template 1
+ mso_schema_template_deploy:
+ <<: *mso_info
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ item }}'
+ state: undeploy
+ ignore_errors: yes
+ loop:
+ - '{{ mso_site | default("ansible_test") }}'
+ - '{{ mso_site | default("ansible_test") }}_2'
+ - 'aws_{{ mso_site | default("ansible_test") }}'
+ - 'azure_{{ mso_site | default("ansible_test") }}'
+
+- name: Undeploy sites in schema 1 template 2
+ mso_schema_template_deploy:
+ <<: *mso_info
+ template: Template 2
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ item }}'
+ state: undeploy
+ ignore_errors: yes
+ loop:
+ - '{{ mso_site | default("ansible_test") }}'
+ - '{{ mso_site | default("ansible_test") }}_2'
+ - 'aws_{{ mso_site | default("ansible_test") }}'
+ - 'azure_{{ mso_site | default("ansible_test") }}'
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ state: present
+ register: tenant_ansible
+
+- name: Ensure schema 1 with Template 1 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+
+# CREATE EPG PROVIDER
+- name: Add a new VRF
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF_1
+ state: present
+
+- name: Add a new BD
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: BD_1
+ vrf:
+ name: VRF_1
+ state: present
+
+- name: Add 2nd BD
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: CLIENT_BD
+ vrf:
+ name: VRF_1
+ state: present
+
+- name: Add a new ANP
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP_1
+ state: present
+
+- name: Add a new EPG
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP_1
+ epg: EPG_1
+ bd:
+ name: BD_1
+ vrf:
+ name: VRF_1
+ state: present
+
+- name: Add 2nd EPG
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP_1
+ epg: EPG_2
+ bd:
+ name: BD_1
+ vrf:
+ name: VRF_1
+ state: present
+
+- name: Add a new L3out
+ mso_schema_template_l3out:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out: L3OUT_1
+ vrf:
+ name: VRF_1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+
+- name: Add a new external EPG
+ cisco.mso.mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: EXT_EPG_1
+ vrf:
+ name: VRF_1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out:
+ name: L3OUT_1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+
+- name: Add 2nd external EPG
+ cisco.mso.mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: EXT_EPG_2
+ vrf:
+ name: VRF_1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out:
+ name: L3OUT_1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+
+# ADD DHCP RELAY POLICY
+- name: Add a new DHCP Relay Policy 1 (Normal mode)
+ mso_dhcp_relay_policy:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ description: "My Test DHCP Policy 1"
+ tenant: ansible_test
+ state: present
+
+# ADD PROVIDER TO DHCP RELAY POLICY
+- name: Add Provider to DHCP Relay Policy (check mode)
+ mso_dhcp_relay_policy_provider: &create_provider
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ ip: "1.1.1.1"
+ tenant: ansible_test
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ application_profile: ANP_1
+ endpoint_group: EPG_1
+ state: present
+ check_mode: yes
+ register: dhcp_pol1_prov1_cm
+
+- name: Add Provider to DHCP Relay Policy (normal mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *create_provider
+ register: dhcp_pol1_prov1_nm
+
+- name: Verify dhcp_pol1_prov1
+ assert:
+ that:
+ - dhcp_pol1_prov1_cm is changed
+ - dhcp_pol1_prov1_nm is changed
+ - dhcp_pol1_prov1_cm.current.addr == dhcp_pol1_prov1_nm.current.addr == '1.1.1.1'
+ - "'EPG_1' in dhcp_pol1_prov1_cm.current.epgRef"
+ - "'EPG_1' in dhcp_pol1_prov1_nm.current.epgRef"
+ - "'ANP_1' in dhcp_pol1_prov1_cm.current.epgRef"
+ - "'ANP_1' in dhcp_pol1_prov1_nm.current.epgRef"
+ - "'Template1' in dhcp_pol1_prov1_cm.current.epgRef"
+ - "'Template1' in dhcp_pol1_prov1_nm.current.epgRef"
+ - dhcp_pol1_prov1_cm.current.tenantId == tenant_ansible.current.id
+ - dhcp_pol1_prov1_nm.current.tenantId == tenant_ansible.current.id
+
+- name: Add Provider to DHCP Relay Policy again (check mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *create_provider
+ check_mode: yes
+ register: dhcp_pol1_prov1_again_cm
+
+- name: Add Provider to DHCP Relay Policy again (normal mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *create_provider
+ register: dhcp_pol1_prov1_again_nm
+
+- name: Verify dhcp_pol1_prov1_again
+ assert:
+ that:
+ - dhcp_pol1_prov1_again_cm is not changed
+ - dhcp_pol1_prov1_again_nm is not changed
+ - dhcp_pol1_prov1_again_cm.current.addr == dhcp_pol1_prov1_again_nm.current.addr == '1.1.1.1'
+ - "'EPG_1' in dhcp_pol1_prov1_again_cm.current.epgRef"
+ - "'EPG_1' in dhcp_pol1_prov1_again_nm.current.epgRef"
+ - "'ANP_1' in dhcp_pol1_prov1_again_cm.current.epgRef"
+ - "'ANP_1' in dhcp_pol1_prov1_again_nm.current.epgRef"
+ - "'Template1' in dhcp_pol1_prov1_again_cm.current.epgRef"
+ - "'Template1' in dhcp_pol1_prov1_again_nm.current.epgRef"
+ - dhcp_pol1_prov1_again_cm.current.tenantId == tenant_ansible.current.id
+ - dhcp_pol1_prov1_again_nm.current.tenantId == tenant_ansible.current.id
+
+- name: Change Provider IP to DHCP Relay Policy (check mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *create_provider
+ ip: "2.2.2.2"
+ check_mode: yes
+ register: dhcp_pol1_prov1_change_cm
+
+- name: Change Provider IP to DHCP Relay Policy (normal mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *create_provider
+ ip: "2.2.2.2"
+ register: dhcp_pol1_prov1_change_nm
+
+- name: Verify dhcp_pol1_prov1_change
+ assert:
+ that:
+ - dhcp_pol1_prov1_change_cm is changed
+ - dhcp_pol1_prov1_change_nm is changed
+ - dhcp_pol1_prov1_change_cm.current.addr == dhcp_pol1_prov1_change_nm.current.addr == '2.2.2.2'
+ - "'EPG_1' in dhcp_pol1_prov1_change_cm.current.epgRef"
+ - "'EPG_1' in dhcp_pol1_prov1_change_nm.current.epgRef"
+ - "'ANP_1' in dhcp_pol1_prov1_change_cm.current.epgRef"
+ - "'ANP_1' in dhcp_pol1_prov1_change_nm.current.epgRef"
+ - "'Template1' in dhcp_pol1_prov1_change_cm.current.epgRef"
+ - "'Template1' in dhcp_pol1_prov1_change_nm.current.epgRef"
+ - dhcp_pol1_prov1_change_cm.current.tenantId == tenant_ansible.current.id
+ - dhcp_pol1_prov1_change_nm.current.tenantId == tenant_ansible.current.id
+
+- name: Add 2nd Provider (EPG_2) to DHCP Relay Policy (check mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *create_provider
+ ip: "2.2.2.2"
+ endpoint_group: EPG_2
+ check_mode: yes
+ register: dhcp_pol1_prov2_cm
+
+- name: Add 2nd Provider (EPG_2) to DHCP Relay Policy (normal mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *create_provider
+ ip: "2.2.2.2"
+ endpoint_group: EPG_2
+ register: dhcp_pol1_prov2_nm
+
+- name: Add 3rd Provider (EXT_EPG_1) to DHCP Relay Policy (check mode)
+ mso_dhcp_relay_policy_provider: &create_provider_external_epg
+ <<: *create_provider
+ ip: "2.2.2.2"
+ external_endpoint_group: EXT_EPG_1
+ application_profile: null
+ endpoint_group: null
+ check_mode: yes
+ register: dhcp_pol1_prov3_cm
+
+- name: Add 3rd Provider (EXT_EPG_1) to DHCP Relay Policy (normal mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *create_provider_external_epg
+ external_endpoint_group: EXT_EPG_1
+ register: dhcp_pol1_prov3_nm
+
+- name: Add 4th Provider (EXT_EPG_2) to DHCP Relay Policy (check mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *create_provider_external_epg
+ external_endpoint_group: EXT_EPG_2
+ check_mode: yes
+ register: dhcp_pol1_prov4_cm
+
+- name: Add 4th Provider (EXT_EPG_2) to DHCP Relay Policy (normal mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *create_provider_external_epg
+ external_endpoint_group: EXT_EPG_2
+ register: dhcp_pol1_prov4_nm
+
+- name: Verify dhcp_pol1_prov2, dhcp_pol1_prov3 and dhcp_pol1_prov4
+ assert:
+ that:
+ - dhcp_pol1_prov2_cm is changed
+ - dhcp_pol1_prov2_nm is changed
+ - dhcp_pol1_prov3_cm is changed
+ - dhcp_pol1_prov3_nm is changed
+ - dhcp_pol1_prov4_cm is changed
+ - dhcp_pol1_prov4_nm is changed
+ - dhcp_pol1_prov2_cm.current.addr == dhcp_pol1_prov2_nm.current.addr == '2.2.2.2'
+ - dhcp_pol1_prov3_cm.current.addr == dhcp_pol1_prov3_nm.current.addr == '2.2.2.2'
+ - dhcp_pol1_prov4_cm.current.addr == dhcp_pol1_prov4_nm.current.addr == '2.2.2.2'
+ - "'EPG_2' in dhcp_pol1_prov2_cm.current.epgRef"
+ - "'EPG_2' in dhcp_pol1_prov2_nm.current.epgRef"
+ - "'ANP_1' in dhcp_pol1_prov2_cm.current.epgRef"
+ - "'ANP_1' in dhcp_pol1_prov2_nm.current.epgRef"
+ - "'Template1' in dhcp_pol1_prov2_cm.current.epgRef"
+ - "'Template1' in dhcp_pol1_prov2_nm.current.epgRef"
+ - "'EXT_EPG_1' in dhcp_pol1_prov3_cm.current.externalEpgRef"
+ - "'EXT_EPG_1' in dhcp_pol1_prov3_nm.current.externalEpgRef"
+ - "'EXT_EPG_2' in dhcp_pol1_prov4_cm.current.externalEpgRef"
+ - "'EXT_EPG_2' in dhcp_pol1_prov4_nm.current.externalEpgRef"
+ - dhcp_pol1_prov3_cm.current.tenantId == tenant_ansible.current.id
+ - dhcp_pol1_prov3_nm.current.tenantId == tenant_ansible.current.id
+ - dhcp_pol1_prov4_cm.current.tenantId == tenant_ansible.current.id
+ - dhcp_pol1_prov4_nm.current.tenantId == tenant_ansible.current.id
+
+# ADD DHCP RELAY PROVIDER WITH WRONG Attributes
+- name: Add Provider to DHCP Relay Policy - wrong tenant (Normal mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ ip: "2.2.2.2"
+ tenant: ansible_test_wrong
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ application_profile: ANP_1
+ endpoint_group: EPG_1
+ state: present
+ ignore_errors: yes
+ register: dhcp_pol1_prov2_nm_ten_wrong
+
+- name: Add Provider to DHCP Relay Policy - wrong Schema (Normal mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ ip: "2.2.2.2"
+ tenant: ansible_test
+ schema: schema_wrong
+ template: Template 1
+ application_profile: ANP_1
+ endpoint_group: EPG_1
+ state: present
+ ignore_errors: yes
+ register: dhcp_pol1_prov2_nm_sch_wrong
+
+- name: Verify dhcp_pol1_prov2_nm_ten_wrong, dhcp_pol1_prov2_nm_sch_wrong & dhcp_pol1_prov2_nm_tmp_wrong
+ assert:
+ that:
+ - dhcp_pol1_prov2_nm_ten_wrong is not changed
+ - dhcp_pol1_prov2_nm_ten_wrong.msg == "Tenant 'ansible_test_wrong' is not valid tenant name."
+ - dhcp_pol1_prov2_nm_sch_wrong is not changed
+ - dhcp_pol1_prov2_nm_sch_wrong.msg == "Schema 'schema_wrong' is not a valid schema name."
+ # MSO API allows to create provider in non-existing/wrong templates/epgs/ext_epgs
+
+# QUERY PROVIDER FROM DHCP RELAY POLICY
+- name: Query Provider from DHCP Relay Policy (check mode)
+ mso_dhcp_relay_policy_provider: &query_provider
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ tenant: ansible_test
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ application_profile: ANP_1
+ endpoint_group: EPG_1
+ state: query
+ register: dhcp_pol1_prov1_query_cm
+
+- name: Query Provider from DHCP Relay Policy (normal mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *query_provider
+ register: dhcp_pol1_prov1_query_nm
+
+- name: Query non_existing Provider from DHCP Relay Policy
+ mso_dhcp_relay_policy_provider:
+ <<: *query_provider
+ endpoint_group: non_existing
+ state: query
+ register: dhcp_pol1_prov1_query_non_existing
+
+- name: Query all Providers from a DHCP Relay Policy
+ mso_dhcp_relay_policy_provider:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ state: query
+ register: dhcp_pol1_query_all
+
+- name: Verify all query variables
+ assert:
+ that:
+ - dhcp_pol1_prov1_query_cm is not changed
+ - dhcp_pol1_prov1_query_nm is not changed
+ - dhcp_pol1_prov1_query_non_existing is not changed
+ - dhcp_pol1_query_all is not changed
+ - dhcp_pol1_prov1_query_cm.current.addr == dhcp_pol1_prov1_query_nm.current.addr == '2.2.2.2'
+ - "'EPG_1' in dhcp_pol1_prov1_query_cm.current.epgRef"
+ - "'EPG_1' in dhcp_pol1_prov1_query_nm.current.epgRef"
+ - "'ANP_1' in dhcp_pol1_prov1_query_cm.current.epgRef"
+ - "'ANP_1' in dhcp_pol1_prov1_query_nm.current.epgRef"
+ - "'Template1' in dhcp_pol1_prov1_query_cm.current.epgRef"
+ - "'Template1' in dhcp_pol1_prov1_query_nm.current.epgRef"
+ - dhcp_pol1_prov1_query_non_existing.current == {}
+ - dhcp_pol1_query_all.current | length == 4
+
+# REMOVE PROVIDER FROM DHCP RELAY POLICY
+- name: Remove Provider (EXT_EPG) from DHCP Relay Policy (check mode)
+ mso_dhcp_relay_policy_provider: &delete_provider
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ tenant: ansible_test
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_endpoint_group: EXT_EPG_1
+ state: absent
+ check_mode: yes
+ register: dhcp_pol1_prov1_del_cm
+
+- name: Remove Provider (EXT_EPG) from DHCP Relay Policy (normal mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *delete_provider
+ register: dhcp_pol1_prov1_del_nm
+
+- name: Verify dhcp_pol1_prov1_del
+ assert:
+ that:
+ - dhcp_pol1_prov1_del_cm is changed
+ - dhcp_pol1_prov1_del_nm is changed
+ - dhcp_pol1_prov1_del_cm.current == dhcp_pol1_prov1_del_nm.current == {}
+
+- name: Remove Provider (EXT_EPG) from DHCP Relay Policy again (check mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *delete_provider
+ check_mode: yes
+ register: dhcp_pol1_prov1_del_again_cm
+
+- name: Remove Provider (EXT_EPG) from DHCP Relay Policy again (normal mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *delete_provider
+ register: dhcp_pol1_prov1_del_again_nm
+
+- name: Verify dhcp_pol1_prov1_again_del
+ assert:
+ that:
+ - dhcp_pol1_prov1_del_again_cm is not changed
+ - dhcp_pol1_prov1_del_again_nm is not changed
+ - dhcp_pol1_prov1_del_again_cm.current == dhcp_pol1_prov1_del_again_nm.current == {}
+
+- name: Remove Non-Existing Provider (EXT_EPG)
+ mso_dhcp_relay_policy_provider:
+ <<: *delete_provider
+ external_endpoint_group: non_existing
+ register: dhcp_pol1_prov1_del_nm_non_existing
+
+- name: Remove Provider without epg or ext_epg
+ mso_dhcp_relay_policy_provider:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ tenant: ansible_test
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: absent
+ ignore_errors: yes
+ register: dhcp_pol1_prov1_del_none
+
+- name: Verify dhcp_pol1_prov1_del_nm_non_existing
+ assert:
+ that:
+ - dhcp_pol1_prov1_del_nm_non_existing is not changed
+ - dhcp_pol1_prov1_del_none is not changed
+ - dhcp_pol1_prov1_del_nm_non_existing.current == {}
+ - dhcp_pol1_prov1_del_none.msg == 'Missing either endpoint_group or external_endpoint_group required attribute.'
+
+# CONSUME DHCP POLICIES
+- name: Get DHCP Relay Policy version
+ mso_dhcp_relay_policy:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ state: query
+ register: dhcp_relay_policy_version
+
+- name: Consume DHCP Policy
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: CLIENT_BD
+ vrf:
+ name: VRF_1
+ dhcp_policy:
+ name: "{{ dhcp_relay_policy_version.current.name }}"
+ version: "{{ dhcp_relay_policy_version.current.version | int }}"
+ state: present
+ register: bd_dhcp_policy
+
+- name: Stop consuming DHCP Policy
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: CLIENT_BD
+ vrf:
+ name: VRF_1
+ state: present
+ register: bd_dhcp_policy
+
+# QUERY PROVIDER FROM non_existing DHCP RELAY POLICY
+- name: Query Provider from DHCP Relay Policy (check mode)
+ mso_dhcp_relay_policy_provider:
+ <<: *mso_info
+ dhcp_relay_policy: non_existing
+ state: query
+ ignore_errors: yes
+ register: dhcp_non_existing
+
+- name: Verify dhcp_non_existing
+ assert:
+ that:
+ - dhcp_non_existing is not changed
+ - dhcp_non_existing.msg == "DHCP Relay Policy 'non_existing' is not a valid DHCP Relay Policy name." \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_label/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_label/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_label/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_label/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_label/tasks/main.yml
new file mode 100644
index 00000000..6b28de16
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_label/tasks/main.yml
@@ -0,0 +1,339 @@
+# Test code for the MSO modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Remove label ansible_test
+ mso_label: &label_absent
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ label: ansible_test
+ state: absent
+
+- name: Remove label ansible_test2
+ mso_label:
+ <<: *label_absent
+ label: ansible_test2
+ register: cm_remove_label
+
+- name: Remove label ansible_test3
+ mso_label: &domain_label_absent
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ state: absent
+ label: ansible_test3
+ login_domain: Local
+ register: nm_remove_label3
+
+- name: Remove label ansible_test4
+ mso_label:
+ <<: *domain_label_absent
+ label: ansible_test4
+ login_domain: '{{ mso_login_domain | default("test") }}'
+
+# ADD LABEL
+- name: Add label (check_mode)
+ mso_label: &label_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ label: ansible_test
+ state: present
+ check_mode: yes
+ register: cm_add_label
+
+- name: Verify cm_add_label
+ assert:
+ that:
+ - cm_add_label is changed
+ - cm_add_label.previous == {}
+ - cm_add_label.current.displayName == 'ansible_test'
+ - cm_add_label.current.id is not defined
+ - cm_add_label.current.type == 'site'
+
+- name: Add label (normal mode)
+ mso_label: *label_present
+ register: nm_add_label
+
+- name: Verify nm_add_label
+ assert:
+ that:
+ - nm_add_label is changed
+ - nm_add_label.previous == {}
+ - nm_add_label.current.displayName == 'ansible_test'
+ - nm_add_label.current.id is defined
+ - nm_add_label.current.type == 'site'
+
+- name: Add label again (check_mode)
+ mso_label: *label_present
+ check_mode: yes
+ register: cm_add_label_again
+
+- name: Verify cm_add_label_again
+ assert:
+ that:
+ - cm_add_label_again is not changed
+ - cm_add_label_again.previous.displayName == 'ansible_test'
+ - cm_add_label_again.previous.type == 'site'
+ - cm_add_label_again.current.displayName == 'ansible_test'
+ - cm_add_label_again.current.id == nm_add_label.current.id
+ - cm_add_label_again.current.type == 'site'
+
+- name: Add label again (normal mode)
+ mso_label: *label_present
+ register: nm_add_label_again
+
+- name: Verify nm_add_label_again
+ assert:
+ that:
+ - nm_add_label_again is not changed
+ - nm_add_label_again.previous.displayName == 'ansible_test'
+ - nm_add_label_again.previous.type == 'site'
+ - nm_add_label_again.current.displayName == 'ansible_test'
+ - nm_add_label_again.current.id == nm_add_label.current.id
+ - nm_add_label_again.current.type == 'site'
+
+
+# CHANGE LABEL
+# - name: Change label (check_mode)
+# mso_label:
+# <<: *label_present
+# label_id: '{{ nm_add_label.current.id }}'
+# label: ansible_test2
+# check_mode: yes
+# register: cm_change_label
+
+# - name: Verify cm_change_label
+# assert:
+# that:
+# - cm_change_label is changed
+# - cm_change_label.current.displayName == 'ansible_test2'
+# - cm_change_label.current.id == nm_add_label.current.id
+# - cm_change_label.current.type == 'site'
+
+# - name: Change label (normal mode)
+# mso_label:
+# <<: *label_present
+# label_id: '{{ nm_add_label.current.id }}'
+# label: ansible_test2
+# output_level: debug
+# register: nm_change_label
+
+# - name: Verify nm_change_label
+# assert:
+# that:
+# - nm_change_label is changed
+# - cm_change_label.current.displayName == 'ansible_test2'
+# - nm_change_label.current.id == nm_add_label.current.id
+# - nm_change_label.current.type == 'site'
+
+# - name: Change label again (check_mode)
+# mso_label:
+# <<: *label_present
+# label_id: '{{ nm_add_label.current.id }}'
+# label: ansible_test2
+# check_mode: yes
+# register: cm_change_label_again
+
+# - name: Verify cm_change_label_again
+# assert:
+# that:
+# - cm_change_label_again is not changed
+# - cm_change_label_again.current.displayName == 'ansible_test2'
+# - cm_change_label_again.current.id == nm_add_label.current.id
+# - cm_change_label_again.current.type == 'site'
+
+# - name: Change label again (normal mode)
+# mso_label:
+# <<: *label_present
+# label_id: '{{ nm_add_label.current.id }}'
+# label: ansible_test2
+# register: nm_change_label_again
+
+# - name: Verify nm_change_label_again
+# assert:
+# that:
+# - nm_change_label_again is not changed
+# - nm_change_label_again.current.displayName == 'ansible_test2'
+# - nm_change_label_again.current.id == nm_add_label.current.id
+# - nm_change_label_again.current.type == 'site'
+
+
+# QUERY ALL LABELS
+- name: Query all labels (check_mode)
+ mso_label: &label_query
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_labels
+
+- name: Query all labels (normal mode)
+ mso_label: *label_query
+ register: nm_query_all_labels
+
+- name: Verify query_all_labels
+ assert:
+ that:
+ - cm_query_all_labels is not changed
+ - nm_query_all_labels is not changed
+ # NOTE: Order of labels is not stable between calls
+ # FIXME:
+ #- cm_query_all_labels == nm_query_all_labels
+
+
+# QUERY A LABEL
+- name: Query our label
+ mso_label:
+ <<: *label_query
+ label: ansible_test
+ check_mode: yes
+ register: cm_query_label
+
+- name: Query our label
+ mso_label:
+ <<: *label_query
+ label: ansible_test
+ register: nm_query_label
+
+- name: Verify query_label
+ assert:
+ that:
+ - cm_query_label is not changed
+ - cm_query_label.current.displayName == 'ansible_test'
+ - cm_query_label.current.id == nm_add_label.current.id
+ - cm_query_label.current.type == 'site'
+ - nm_query_label is not changed
+ - nm_query_label.current.displayName == 'ansible_test'
+ - nm_query_label.current.id == nm_add_label.current.id
+ - nm_query_label.current.type == 'site'
+ - cm_query_label == nm_query_label
+
+
+# REMOVE LABEL
+- name: Remove label (check_mode)
+ mso_label: *label_absent
+ check_mode: yes
+ register: cm_remove_label
+
+- name: Verify cm_remove_label
+ assert:
+ that:
+ - cm_remove_label is changed
+ - cm_remove_label.current == {}
+
+- name: Remove label (normal mode)
+ mso_label: *label_absent
+ register: nm_remove_label
+
+- name: Verify nm_remove_label
+ assert:
+ that:
+ - nm_remove_label is changed
+ - nm_remove_label.current == {}
+
+- name: Remove label again (check_mode)
+ mso_label: *label_absent
+ check_mode: yes
+ register: cm_remove_label_again
+
+- name: Verify cm_remove_label_again
+ assert:
+ that:
+ - cm_remove_label_again is not changed
+ - cm_remove_label_again.current == {}
+
+- name: Remove label again (normal mode)
+ mso_label: *label_absent
+ register: nm_remove_label_again
+
+- name: Verify nm_remove_label_again
+ assert:
+ that:
+ - nm_remove_label_again is not changed
+ - nm_remove_label_again.current == {}
+
+
+# QUERY NON-EXISTING LABEL
+- name: Query non-existing label (check_mode)
+ mso_label:
+ <<: *label_query
+ label: ansible_test
+ check_mode: yes
+ register: cm_query_non_label
+
+- name: Query non-existing label (normal mode)
+ mso_label:
+ <<: *label_query
+ label: ansible_test
+ register: nm_query_non_label
+
+# TODO: Implement more tests
+- name: Verify query_non_label
+ assert:
+ that:
+ - cm_query_non_label is not changed
+ - nm_query_non_label is not changed
+ - cm_query_non_label == nm_query_non_label
+
+# add label with login domain
+- name: Add label local domain(normal mode)
+ mso_label: &domain_label_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ state: present
+ label: ansible_test3
+ login_domain: Local
+ register: label_local_domain
+
+- name: Verify label_local_domain
+ assert:
+ that:
+ - label_local_domain is changed
+ - label_local_domain.current.displayName == 'ansible_test3'
+ - label_local_domain.current.type == 'site'
+
+- name: Add label test domain(normal mode)
+ mso_label:
+ <<: *domain_label_present
+ label: ansible_test4
+ login_domain: '{{ mso_login_domain | default("test") }}'
+ register: label_test_domain
+
+- name: Verify label_test_domain
+ assert:
+ that:
+ - label_test_domain is changed
+ - label_test_domain.current.displayName == 'ansible_test4'
+ - label_test_domain.current.type == 'site' \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/error_handling.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/error_handling.yml
new file mode 100644
index 00000000..8ae27ce6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/error_handling.yml
@@ -0,0 +1,145 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Anvitha Jain (@anvitha-jain) <anvjain@cisco.com>
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# SET VARs
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+# PROVOKE ERRORS
+- name: Error when required parameter is missing
+ cisco.mso.mso_rest:
+ <<: *mso_info
+ output_level: debug
+ method: post
+ content:
+ displayName: mso_tenant
+ name: mso_tenant
+ description: MSO tenant
+ siteAssociations: []
+ userAssociations: []
+ _updateVersion: 0
+ ignore_errors: yes
+ register: error_on_missing_required_param
+
+- name: Verify error_on_missing_required_param
+ assert:
+ that:
+ - error_on_missing_required_param is failed
+ - 'error_on_missing_required_param.msg == "missing required arguments: path"'
+
+- name: Error on name resolution
+ cisco.mso.mso_rest:
+ host: foo.bar.cisco.com
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ path: /mso/api/v1/tenants
+ method: post
+ content:
+ fvFoobar:
+ displayName: mso_tenant
+ name: mso_tenant
+ description: This is description
+ siteAssociations: []
+ userAssociations: []
+ _updateVersion: 0
+ ignore_errors: yes
+ register: error_on_name_resolution
+
+- name: Verify error_on_name_resolution
+ assert:
+ that:
+ - error_on_name_resolution is failed
+ - error_on_name_resolution.msg.startswith("Authentication failed{{':'}} Request failed:")
+
+- name: Error on invalid path
+ mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/tenant
+ method: post
+ content:
+ displayName: mso_tenant
+ name: mso_tenant
+ description: MSO tenant
+ siteAssociations: []
+ userAssociations: []
+ _updateVersion: 0
+ ignore_errors: yes
+ register: error_on_invalid_path
+
+- name: Verify error_on_invalid_path
+ assert:
+ that:
+ - error_on_invalid_path is failed
+ - error_on_invalid_path.status == 404
+ when: version.current.version is version('3.0.0a', '<')
+
+- name: Verify error_on_invalid_path
+ assert:
+ that:
+ - error_on_invalid_path is failed
+ - error_on_invalid_path.status == 405
+ when: version.current.version is version('3.0.0a', '>=')
+
+- name: Error when attributes are missing
+ cisco.mso.mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/tenants
+ method: post
+ content:
+ children:
+ ignore_errors: yes
+ register: error_on_missing_attributes
+
+- name: Verify error_on_missing_attributes
+ assert:
+ that:
+ - error_on_missing_attributes is failed
+ - error_on_missing_attributes.status == 400
+
+- name: Error when input does not validate
+ cisco.mso.mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/tenants
+ method: post
+ content:
+ displayName: 0
+ name: 0
+ descr: This is an [invalid] description
+ siteAssociations: []
+ userAssociations: []
+ _updateVersion: 0
+ ignore_errors: yes
+ register: error_on_input_validation
+
+- name: Verify error_on_input_validation
+ assert:
+ that:
+ - error_on_input_validation is failed
+ - error_on_input_validation.status == 400
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/json_inline.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/json_inline.yml
new file mode 100644
index 00000000..7079687c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/json_inline.yml
@@ -0,0 +1,269 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Anvitha Jain (@anvitha-jain) <anvjain@cisco.com>
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove EXT_EPGs Providers from DHCP Relay Policy
+ mso_dhcp_relay_policy_provider:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ tenant: ansible_test
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_endpoint_group: "{{ item }}"
+ state: absent
+ ignore_errors: yes
+ loop:
+ - EXT_EPG_1
+ - EXT_EPG_2
+
+- name: Remove EXT_EPGs Providers from DHCP Relay Policy
+ mso_dhcp_relay_policy_provider:
+ <<: *mso_info
+ dhcp_relay_policy: ansible_dhcp_relay_1
+ tenant: ansible_test
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ endpoint_group: "{{ item }}"
+ application_profile: "ANP_1"
+ state: absent
+ ignore_errors: yes
+ loop:
+ - EPG_1
+ - EPG_2
+
+- name: Stop consuming DHCP Policy
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: CLIENT_BD
+ vrf:
+ name: VRF_1
+ state: present
+ ignore_errors: yes
+
+- name: Remove DHCP Relay Policies
+ mso_dhcp_relay_policy:
+ <<: *mso_info
+ dhcp_relay_policy: '{{ item }}'
+ state: absent
+ loop:
+ - ansible_dhcp_relay_1
+ - ansible_dhcp_relay_2
+
+- name: Remove schemas
+ cisco.mso.mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Remove tenant ansible_test
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ state: absent
+
+# QUERY SCHEMAS
+- name: Query schema
+ mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/schemas
+ method: get
+ delegate_to: localhost
+ register: query_all_schema
+
+- name: Verify query_all_schema in json_inline
+ assert:
+ that:
+ - query_all_schema is not changed
+
+# QUERY A USER
+- name: Query our user
+ mso_user:
+ <<: *mso_info
+ state: query
+ user: ansible_github_ci
+ check_mode: yes
+ register: query_user_id
+
+- name: Verify query_user_id
+ assert:
+ that:
+ - query_user_id is not changed
+ - query_user_id.current.username == 'ansible_github_ci'
+
+# ADD tenant
+- name: Add tenant
+ mso_rest:
+ <<: *mso_info
+ path: /api/v1/tenants
+ method: post
+ content:
+ {
+ "displayName": "ansible_test",
+ "name": "ansible_test",
+ "description": "",
+ "siteAssociations": [],
+ "userAssociations": [{
+ "userId": "{{ query_user_id.current.id }}"
+ }],
+ "_updateVersion": 0,
+ }
+ delegate_to: localhost
+ register: add_tenant
+
+- name: Verify add_tenant in json_inline
+ assert:
+ that:
+ - add_tenant is changed
+ - add_tenant.jsondata.displayName == 'ansible_test'
+
+# ADD schema
+- name: Add schema
+ mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/schemas
+ method: post
+ content:
+ {
+ "displayName": "{{ mso_schema | default('ansible_test') }}",
+ "templates": [{
+ "name": "Template_1",
+ "tenantId": "{{ add_tenant.jsondata.id }}",
+ "displayName": "Template_1",
+ "templateSubType": [],
+ "templateType": "stretched-template",
+ "anps": [],
+ "contracts": [],
+ "vrfs": [],
+ "bds": [],
+ "filters": [],
+ "externalEpgs": [],
+ "serviceGraphs": [],
+ "intersiteL3outs": []
+ }],
+ "sites": [],
+ "_updateVersion": 0
+ }
+ delegate_to: localhost
+ register: add_schema
+
+- name: Verify add_schema in json_inline
+ assert:
+ that:
+ - add_schema is changed
+ - add_schema.jsondata.displayName == 'ansible_test'
+
+# PUT schema
+- name: Put schema
+ mso_rest:
+ <<: *mso_info
+ port: 443
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: put
+ content:
+ {
+ "displayName": "ansible_test_2",
+ "templates": [{
+ "name": "Template_1",
+ "tenantId": "{{ add_tenant.jsondata.id }}",
+ "displayName": "Template_1",
+ "templateSubType": [],
+ "templateType": "stretched-template",
+ "anps": [],
+ "contracts": [],
+ "vrfs": [],
+ "bds": [],
+ "filters": [],
+ "externalEpgs": [],
+ "serviceGraphs": [],
+ "intersiteL3outs": []
+ }],
+ "sites": [],
+ "_updateVersion": 0
+ }
+ delegate_to: localhost
+ register: put_schema
+
+- name: Verify put_schema in json_inline
+ assert:
+ that:
+ - put_schema is changed
+ - put_schema.jsondata.displayName == 'ansible_test_2'
+
+# PATCH schema
+- name: Patch schema
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: patch
+ content:
+ [
+ {
+ "op": "add",
+ "path": "/templates/Template_1/anps/-",
+ "value": { "name": "AP2", "displayName": "AP2", "epgs": [] },
+ "_updateVersion": 0
+ }
+ ]
+ delegate_to: localhost
+ register: patch_schema
+
+- name: Verify patch_schema in json_inline
+ assert:
+ that:
+ - patch_schema is changed
+ - patch_schema.jsondata.templates[0].anps[0].displayName == 'AP2'
+
+# DELETE the schema
+- name: Delete the schema
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: delete
+ delegate_to: localhost
+ register: delete_schema
+
+- name: Verify delete_schema in json_inline
+ assert:
+ that:
+ - delete_schema is changed
+ - delete_schema.jsondata == None
+
+# DELETE TENANT
+- name: Delete the tenant
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/tenants/{{ add_tenant.jsondata.id }}"
+ method: delete
+ delegate_to: localhost
+ register: delete_tenant
+
+- name: Verify delete_tenant in json_inline
+ assert:
+ that:
+ - delete_tenant is changed
+ - delete_tenant.jsondata == None \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/json_string.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/json_string.yml
new file mode 100644
index 00000000..86c3ea97
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/json_string.yml
@@ -0,0 +1,213 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Anvitha Jain (@anvitha-jain) <anvjain@cisco.com>
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove schemas
+ cisco.mso.mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Remove tenant ansible_test
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ state: absent
+
+# QUERY SCHEMAS
+- name: Query schema
+ mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/schemas
+ method: get
+ register: query_all_schema
+
+- name: Verify query_all_schema
+ assert:
+ that:
+ - query_all_schema is not changed
+
+# QUERY A USER
+- name: Query our user
+ mso_user:
+ <<: *mso_info
+ state: query
+ user: ansible_github_ci
+ check_mode: yes
+ register: query_user_id
+
+- name: Verify query_user_id
+ assert:
+ that:
+ - query_user_id is not changed
+ - query_user_id.current.username == 'ansible_github_ci'
+
+# ADD tenant
+- name: Add tenant
+ mso_rest:
+ <<: *mso_info
+ path: /api/v1/tenants
+ method: post
+ content:
+ {
+ "displayName": "ansible_test",
+ "name": "ansible_test",
+ "description": "",
+ "siteAssociations": [],
+ "userAssociations": [{
+ "userId": "{{ query_user_id.current.id }}"
+ }],
+ "_updateVersion": 0,
+ }
+ delegate_to: localhost
+ register: add_tenant
+
+- name: Verify add_tenant in json_string
+ assert:
+ that:
+ - add_tenant is changed
+ - add_tenant.jsondata.displayName == 'ansible_test'
+
+# ADD schema
+- name: Add schema
+ mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/schemas
+ method: post
+ content: |
+ {
+ "displayName": "{{ mso_schema | default('ansible_test') }}",
+ "templates": [{
+ "name": "Template_1",
+ "tenantId": "{{ add_tenant.jsondata.id }}",
+ "displayName": "Template_1",
+ "templateSubType": [],
+ "templateType": "stretched-template",
+ "anps": [],
+ "contracts": [],
+ "vrfs": [],
+ "bds": [],
+ "filters": [],
+ "externalEpgs": [],
+ "serviceGraphs": [],
+ "intersiteL3outs": []
+ }],
+ "sites": [],
+ "_updateVersion": 0
+ }
+ register: add_schema
+
+- name: Verify add_schema in json_string
+ assert:
+ that:
+ - add_schema is changed
+ - add_schema.jsondata.displayName == 'ansible_test'
+
+# PUT schema
+- name: Put schema
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: put
+ content: |
+ {
+ "displayName": "ansible_test_2",
+ "templates": [{
+ "name": "Template_1",
+ "tenantId": "{{ add_tenant.jsondata.id }}",
+ "displayName": "Template_1",
+ "templateSubType": [],
+ "templateType": "stretched-template",
+ "anps": [],
+ "contracts": [],
+ "vrfs": [],
+ "bds": [],
+ "filters": [],
+ "externalEpgs": [],
+ "serviceGraphs": [],
+ "intersiteL3outs": []
+ }],
+ "sites": [],
+ "_updateVersion": 0
+ }
+ register: put_schema
+
+- name: Verify put_schema in json_string
+ assert:
+ that:
+ - put_schema is changed
+ - put_schema.jsondata.displayName == 'ansible_test_2'
+
+# PATCH schema
+- name: Patch schema
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: patch
+ content: |
+ [
+ {
+ "op": "add",
+ "path": "/templates/Template_1/anps/-",
+ "value": { "name": "AP2", "displayName": "AP2", "epgs": [] },
+ "_updateVersion": 0
+ }
+ ]
+ register: patch_schema
+
+- name: Verify patch_schema in json_string
+ assert:
+ that:
+ - patch_schema is changed
+ - patch_schema.jsondata.templates[0].anps[0].displayName == 'AP2'
+
+# DELETE the schema
+- name: Delete the schema
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: delete
+ register: delete_schema
+
+- name: Verify delete_schema in json_string
+ assert:
+ that:
+ - delete_schema is changed
+ - delete_schema.jsondata == None
+
+# DELETE TENANT
+- name: Delete the tenant
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/tenants/{{ add_tenant.jsondata.id }}"
+ method: delete
+ register: delete_tenant
+
+- name: Verify delete_tenant in json_string
+ assert:
+ that:
+ - delete_tenant is changed
+ - delete_tenant.jsondata == None \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/json_template.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/json_template.yml
new file mode 100644
index 00000000..830b49cb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/json_template.yml
@@ -0,0 +1,67 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Anvitha Jain (@anvitha-jain) <anvjain@cisco.com>
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove schemas
+ cisco.mso.mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_1'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Remove tenant ansible_test
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ state: absent
+
+# QUERY A USER
+- name: Query our user
+ mso_user:
+ <<: *mso_info
+ state: query
+ user: ansible_github_ci
+ check_mode: yes
+ register: query_user_id
+
+- name: Verify query_user_id
+ assert:
+ that:
+ - query_user_id is not changed
+ - query_user_id.current.username == 'ansible_github_ci'
+
+- name: Add a tenant from a templated payload file from templates
+ mso_rest:
+ <<: *mso_info
+ path: /api/v1/tenants
+ method: post
+ content: "{{ lookup('template', 'tenant.json.j2') }}"
+ register: add_tenant
+
+- name: Verify add_tenant in json_string
+ assert:
+ that:
+ - add_tenant is changed
+ - add_tenant.jsondata.displayName == 'ansible_test' \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/main.yml
new file mode 100644
index 00000000..22851bf7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/main.yml
@@ -0,0 +1,28 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Anvitha Jain (@anvitha-jain) <anvjain@cisco.com>
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+- include_tasks: json_inline.yml
+ tags: json_inline
+
+- include_tasks: json_string.yml
+ tags: json_string
+
+- include_tasks: json_template.yml
+ tags: json_template
+
+- include_tasks: yaml_inline.yml
+ tags: yaml_inline
+
+- include_tasks: yaml_string.yml
+ tags: yaml_string
+
+- include_tasks: error_handling.yml
+ tags: error_handling
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/tenant.json.j2 b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/tenant.json.j2
new file mode 100644
index 00000000..2d91ee76
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/tenant.json.j2
@@ -0,0 +1,10 @@
+{
+ "displayName": "ansible_test",
+ "name": "ansible_test",
+ "description": "",
+ "siteAssociations": [],
+ "userAssociations": [{
+ "userId": "{{ query_user_id.current.id }}"
+ }],
+ "_updateVersion": 0,
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/yaml_inline.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/yaml_inline.yml
new file mode 100644
index 00000000..da2246fd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/yaml_inline.yml
@@ -0,0 +1,209 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Anvitha Jain (@anvitha-jain) <anvjain@cisco.com>
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove schemas
+ cisco.mso.mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Remove tenant ansible_test
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ state: absent
+
+# QUERY SCHEMAS
+- name: Query schema
+ mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/schemas
+ method: get
+ delegate_to: localhost
+ register: query_all_schema
+
+- name: Verify query_all_schema
+ assert:
+ that:
+ - query_all_schema is not changed
+
+# QUERY A USER
+- name: Query our user
+ mso_user:
+ <<: *mso_info
+ state: query
+ user: ansible_github_ci
+ check_mode: yes
+ register: query_user_id
+
+- name: Verify query_user_id
+ assert:
+ that:
+ - query_user_id is not changed
+ - query_user_id.current.username == 'ansible_github_ci'
+
+# ADD tenant
+- name: Add tenant
+ mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/tenants
+ method: post
+ content:
+ displayName: ansible_test
+ name: ansible_test
+ description: MSO tenant
+ siteAssociations: []
+ userAssociations:
+ - userId: '{{ query_user_id.current.id }}'
+ _updateVersion: 0
+ delegate_to: localhost
+ register: add_tenant
+
+- name: Verify add_tenant in yaml_inline
+ assert:
+ that:
+ - add_tenant is changed
+ - add_tenant.jsondata.displayName == 'ansible_test'
+
+# ADD schema
+- name: Add schema
+ mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/schemas
+ method: post
+ content:
+ displayName: '{{ mso_schema | default("ansible_test") }}'
+ templates:
+ - name: Template_1
+ tenantId: '{{ add_tenant.jsondata.id }}'
+ displayName: Template_1
+ templateSubType: []
+ templateType: stretched-template
+ anps: []
+ contracts: []
+ vrfs: []
+ bds: []
+ filters: []
+ externalEpgs: []
+ serviceGraphs: []
+ intersiteL3outs: []
+ sites: []
+ _updateVersion: 0
+ delegate_to: localhost
+ register: add_schema
+
+- name: Verify add_schema in yaml_inline
+ assert:
+ that:
+ - add_schema is changed
+ - add_schema.jsondata.displayName == 'ansible_test'
+
+# PUT schema
+- name: Put schema
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: put
+ content:
+ displayName: ansible_test_2
+ templates:
+ - name: Template_1
+ tenantId: '{{ add_tenant.jsondata.id }}'
+ displayName: Template_1
+ templateSubType: []
+ templateType: stretched-template
+ anps: []
+ contracts: []
+ vrfs: []
+ bds: []
+ filters: []
+ externalEpgs: []
+ serviceGraphs: []
+ intersiteL3outs: []
+ sites: []
+ _updateVersion: 0
+ delegate_to: localhost
+ register: put_schema
+
+- name: Verify put_schema in yaml_inline
+ assert:
+ that:
+ - put_schema is changed
+ - put_schema.jsondata.displayName == 'ansible_test_2'
+
+# PATCH schema
+- name: Patch schema
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: patch
+ content:
+ - op: add
+ path: /templates/Template_1/anps/-
+ value:
+ name: AP2
+ displayName: AP2
+ epgs: []
+ _updateVersion: 0
+ delegate_to: localhost
+ register: patch_schema
+
+- name: Verify patch_schema in yaml_inline
+ assert:
+ that:
+ - patch_schema is changed
+ - patch_schema.jsondata.templates[0].anps[0].displayName == 'AP2'
+
+# DELETE the schema
+- name: Delete the schema
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: delete
+ delegate_to: localhost
+ register: delete_schema
+
+- name: Verify delete_schema in yaml_inline
+ assert:
+ that:
+ - delete_schema is changed
+ - delete_schema.jsondata == None
+
+# DELETE TENANT
+- name: Delete the tenant
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/tenants/{{ add_tenant.jsondata.id }}"
+ method: delete
+ delegate_to: localhost
+ register: delete_tenant
+
+- name: Verify delete_tenant in yaml_inline
+ assert:
+ that:
+ - delete_tenant is changed
+ - delete_tenant.jsondata == None \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/yaml_string.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/yaml_string.yml
new file mode 100644
index 00000000..1224206c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_rest/tasks/yaml_string.yml
@@ -0,0 +1,209 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Anvitha Jain (@anvitha-jain) <anvjain@cisco.com>
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove schemas
+ cisco.mso.mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Remove tenant ansible_test
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ state: absent
+
+# QUERY SCHEMAS
+- name: Query schema
+ mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/schemas
+ method: get
+ delegate_to: localhost
+ register: query_all_schema
+
+- name: Verify query_all_schema
+ assert:
+ that:
+ - query_all_schema is not changed
+
+# QUERY A USER
+- name: Query our user
+ mso_user:
+ <<: *mso_info
+ state: query
+ user: ansible_github_ci
+ check_mode: yes
+ register: query_user_id
+
+- name: Verify query_user_id
+ assert:
+ that:
+ - query_user_id is not changed
+ - query_user_id.current.username == 'ansible_github_ci'
+
+# ADD tenant
+- name: Add tenant
+ mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/tenants
+ method: post
+ content:
+ displayName: ansible_test
+ name: ansible_test
+ description: MSO tenant
+ siteAssociations: []
+ userAssociations:
+ - userId: '{{ query_user_id.current.id }}'
+ _updateVersion: 0
+ delegate_to: localhost
+ register: add_tenant
+
+- name: Verify add_tenant in yaml_string
+ assert:
+ that:
+ - add_tenant is changed
+ - add_tenant.jsondata.displayName == 'ansible_test'
+
+# ADD schema
+- name: Add schema
+ mso_rest:
+ <<: *mso_info
+ path: /mso/api/v1/schemas
+ method: post
+ content:
+ displayName: '{{ mso_schema | default("ansible_test") }}'
+ templates:
+ - name: Template_1
+ tenantId: '{{ add_tenant.jsondata.id }}'
+ displayName: Template_1
+ templateSubType: []
+ templateType: stretched-template
+ anps: []
+ contracts: []
+ vrfs: []
+ bds: []
+ filters: []
+ externalEpgs: []
+ serviceGraphs: []
+ intersiteL3outs: []
+ sites: []
+ _updateVersion: 0
+ delegate_to: localhost
+ register: add_schema
+
+- name: Verify add_schema in yaml_string
+ assert:
+ that:
+ - add_schema is changed
+ - add_schema.jsondata.displayName == 'ansible_test'
+
+# PUT schema
+- name: Put schema
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: put
+ content:
+ displayName: ansible_test_2
+ templates:
+ - name: Template_1
+ tenantId: '{{ add_tenant.jsondata.id }}'
+ displayName: Template_1
+ templateSubType: []
+ templateType: stretched-template
+ anps: []
+ contracts: []
+ vrfs: []
+ bds: []
+ filters: []
+ externalEpgs: []
+ serviceGraphs: []
+ intersiteL3outs: []
+ sites: []
+ _updateVersion: 0
+ delegate_to: localhost
+ register: put_schema
+
+- name: Verify put_schema in yaml_string
+ assert:
+ that:
+ - put_schema is changed
+ - put_schema.jsondata.displayName == 'ansible_test_2'
+
+# PATCH schema
+- name: Patch schema
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: patch
+ content:
+ - op: add
+ path: /templates/Template_1/anps/-
+ value:
+ name: AP2
+ displayName: AP2
+ epgs: []
+ _updateVersion: 0
+ delegate_to: localhost
+ register: patch_schema
+
+- name: Verify patch_schema in yaml_string
+ assert:
+ that:
+ - patch_schema is changed
+ - patch_schema.jsondata.templates[0].anps[0].displayName == 'AP2'
+
+# DELETE the schema
+- name: Delete the schema
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/schemas/{{ add_schema.jsondata.id }}"
+ method: delete
+ delegate_to: localhost
+ register: delete_schema
+
+- name: Verify delete_schema in yaml_string
+ assert:
+ that:
+ - delete_schema is changed
+ - delete_schema.jsondata == None
+
+# DELETE TENANT
+- name: Delete the tenant
+ mso_rest:
+ <<: *mso_info
+ path: "/mso/api/v1/tenants/{{ add_tenant.jsondata.id }}"
+ method: delete
+ delegate_to: localhost
+ register: delete_tenant
+
+- name: Verify delete_tenant in yaml_string
+ assert:
+ that:
+ - delete_tenant is changed
+ - delete_tenant.jsondata == None \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/tasks/main.yml
new file mode 100644
index 00000000..cf2397da
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/tasks/main.yml
@@ -0,0 +1,43 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+- name: Set version vars
+ set_fact:
+ mso_rw: true
+ when:
+ - version.current.version[0] | int <= 2
+ - version.current.version[:5] != '2.2.4'
+
+- name: Import tasks if RW of role in this MSO version
+ import_tasks: role-rw.yml
+ when: mso_rw is defined
+
+- name: Import tasks if RO of role in this MSO version
+ import_tasks: role-ro.yml
+ when: mso_rw is not defined \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/tasks/role-ro.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/tasks/role-ro.yml
new file mode 100644
index 00000000..e9a36a48
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/tasks/role-ro.yml
@@ -0,0 +1,88 @@
+# Test code for the MSO modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+
+# QUERY ALL ROLES
+- name: Query all roles (check_mode)
+ mso_role: &role_query
+ <<: *mso_info
+ state: query
+ check_mode: yes
+ register: cm_query_all_roles
+
+- name: Query all roles (normal mode)
+ mso_role: *role_query
+ register: nm_query_all_roles
+
+- name: Verify query_all_roles
+ assert:
+ that:
+ - cm_query_all_roles is not changed
+ - nm_query_all_roles is not changed
+ # NOTE: Order of roles is not stable between calls
+ #- cm_query_all_roles == nm_query_all_roles
+
+
+# QUERY A ROLE
+- name: Query our role
+ mso_role:
+ <<: *role_query
+ role: powerUser
+ check_mode: yes
+ register: cm_query_role
+
+- name: Query our role
+ mso_role:
+ <<: *role_query
+ role: powerUser
+ register: nm_query_role
+
+- name: Verify query_role
+ assert:
+ that:
+ - cm_query_role is not changed
+ - cm_query_role.current.description == 'Elevates this user to \"admin\"'
+ - cm_query_role.current.displayName == 'Power User'
+ - nm_query_role is not changed
+ - nm_query_role.current.description == 'Elevates this user to \"admin\"'
+ - nm_query_role.current.displayName == 'Power User'
+ - cm_query_role == nm_query_role
+
+
+# QUERY NON-EXISTING ROLE
+- name: Query non-existing role (check_mode)
+ mso_role:
+ <<: *role_query
+ role: non-existing-role
+ check_mode: yes
+ register: cm_query_non_role
+
+- name: Query non-existing role (normal mode)
+ mso_role:
+ <<: *role_query
+ role: non-existing-role
+ register: nm_query_non_role
+
+# TODO: Implement more tests
+- name: Verify query_non_role
+ assert:
+ that:
+ - cm_query_non_role is not changed
+ - nm_query_non_role is not changed
+ - cm_query_non_role == nm_query_non_role
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/tasks/role-rw.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/tasks/role-rw.yml
new file mode 100644
index 00000000..44a9ba51
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_role/tasks/role-rw.yml
@@ -0,0 +1,275 @@
+# Test code for the MSO modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove role ansible_test
+ mso_role: &role_absent
+ <<: *mso_info
+ role: ansible_test
+ state: absent
+
+- name: Remove role ansible_test2
+ mso_role:
+ <<: *role_absent
+ role: ansible_test2
+ register: cm_remove_role
+
+
+# ADD ROLE
+- name: Add role (check_mode)
+ mso_role: &role_present
+ <<: *mso_info
+ role: ansible_test
+ description: Ansible test role
+ read_permissions: view-sites
+ write_permissions: manage-sites
+ state: present
+ check_mode: yes
+ register: cm_add_role
+
+- name: Verify cm_add_role
+ assert:
+ that:
+ - cm_add_role is changed
+ - cm_add_role.previous == {}
+ - cm_add_role.current.description == 'Ansible test role'
+ - cm_add_role.current.displayName == 'ansible_test'
+ - cm_add_role.current.id is not defined
+
+- name: Add role (normal mode)
+ mso_role: *role_present
+ register: nm_add_role
+
+- name: Verify nm_add_role
+ assert:
+ that:
+ - nm_add_role is changed
+ - nm_add_role.previous == {}
+ - nm_add_role.current.description == 'Ansible test role'
+ - nm_add_role.current.displayName == 'ansible_test'
+ - nm_add_role.current.id is defined
+
+- name: Add role again (check_mode)
+ mso_role: *role_present
+ check_mode: yes
+ register: cm_add_role_again
+
+- name: Verify cm_add_role_again
+ assert:
+ that:
+ - cm_add_role_again is not changed
+ - cm_add_role_again.previous.description == 'Ansible test role'
+ - cm_add_role_again.previous.displayName == 'ansible_test'
+ - cm_add_role_again.current.description == 'Ansible test role'
+ - cm_add_role_again.current.displayName == 'ansible_test'
+ - cm_add_role_again.current.id == nm_add_role.current.id
+
+- name: Add role again (normal mode)
+ mso_role: *role_present
+ register: nm_add_role_again
+
+- name: Verify nm_add_role_again
+ assert:
+ that:
+ - nm_add_role_again is not changed
+ - nm_add_role_again.previous.description == 'Ansible test role'
+ - nm_add_role_again.previous.displayName == 'ansible_test'
+ - nm_add_role_again.current.description == 'Ansible test role'
+ - nm_add_role_again.current.displayName == 'ansible_test'
+ - nm_add_role_again.current.id == nm_add_role.current.id
+
+
+# CHANGE ROLE
+- name: Change role (check_mode)
+ mso_role:
+ <<: *role_present
+ role: ansible_test
+ description: Ansible test role 2
+ check_mode: yes
+ register: cm_change_role
+
+- name: Verify cm_change_role
+ assert:
+ that:
+ - cm_change_role is changed
+ - cm_change_role.current.description == 'Ansible test role 2'
+ - cm_change_role.current.displayName == 'ansible_test'
+ - cm_change_role.current.id == nm_add_role.current.id
+
+- name: Change role (normal mode)
+ mso_role:
+ <<: *role_present
+ role: ansible_test
+ description: Ansible test role 2
+ output_level: debug
+ register: nm_change_role
+
+- name: Verify nm_change_role
+ assert:
+ that:
+ - nm_change_role is changed
+ - nm_change_role.current.description == 'Ansible test role 2'
+ #- nm_change_role.current.displayName == 'ansible_test2'
+ - nm_change_role.current.id == nm_add_role.current.id
+
+- name: Change role again (check_mode)
+ mso_role:
+ <<: *role_present
+ role: ansible_test
+ description: Ansible test role 2
+ check_mode: yes
+ register: cm_change_role_again
+
+- name: Verify cm_change_role_again
+ assert:
+ that:
+ - cm_change_role_again is not changed
+ - cm_change_role_again.current.description == 'Ansible test role 2'
+ - cm_change_role_again.current.displayName == 'ansible_test'
+ - cm_change_role_again.current.id == nm_add_role.current.id
+
+- name: Change role again (normal mode)
+ mso_role:
+ <<: *role_present
+ role: ansible_test
+ description: Ansible test role 2
+ register: nm_change_role_again
+
+- name: Verify nm_change_role_again
+ assert:
+ that:
+ - nm_change_role_again is not changed
+ - nm_change_role_again.current.description == 'Ansible test role 2'
+ - nm_change_role_again.current.displayName == 'ansible_test'
+ - nm_change_role_again.current.id == nm_add_role.current.id
+
+
+# QUERY ALL ROLES
+- name: Query all roles (check_mode)
+ mso_role: &role_query
+ <<: *mso_info
+ state: query
+ check_mode: yes
+ register: cm_query_all_roles
+
+- name: Query all roles (normal mode)
+ mso_role: *role_query
+ register: nm_query_all_roles
+
+- name: Verify query_all_roles
+ assert:
+ that:
+ - cm_query_all_roles is not changed
+ - nm_query_all_roles is not changed
+ # NOTE: Order of roles is not stable between calls
+ #- cm_query_all_roles == nm_query_all_roles
+
+
+# QUERY A ROLE
+- name: Query our role
+ mso_role:
+ <<: *role_query
+ role: ansible_test
+ check_mode: yes
+ register: cm_query_role
+
+- name: Query our role
+ mso_role:
+ <<: *role_query
+ role: ansible_test
+ register: nm_query_role
+
+- name: Verify query_role
+ assert:
+ that:
+ - cm_query_role is not changed
+ - cm_query_role.current.description == 'Ansible test role 2'
+ - cm_query_role.current.displayName == 'ansible_test'
+ - cm_query_role.current.id == nm_add_role.current.id
+ - nm_query_role is not changed
+ - nm_query_role.current.description == 'Ansible test role 2'
+ - nm_query_role.current.displayName == 'ansible_test'
+ - nm_query_role.current.id == nm_add_role.current.id
+ - cm_query_role == nm_query_role
+
+
+# REMOVE ROLE
+- name: Remove role (check_mode)
+ mso_role: *role_absent
+ check_mode: yes
+ register: cm_remove_role
+
+- name: Verify cm_remove_role
+ assert:
+ that:
+ - cm_remove_role is changed
+ - cm_remove_role.current == {}
+
+- name: Remove role (normal mode)
+ mso_role: *role_absent
+ register: nm_remove_role
+
+- name: Verify nm_remove_role
+ assert:
+ that:
+ - nm_remove_role is changed
+ - nm_remove_role.current == {}
+
+- name: Remove role again (check_mode)
+ mso_role: *role_absent
+ check_mode: yes
+ register: cm_remove_role_again
+
+- name: Verify cm_remove_role_again
+ assert:
+ that:
+ - cm_remove_role_again is not changed
+ - cm_remove_role_again.current == {}
+
+- name: Remove role again (normal mode)
+ mso_role: *role_absent
+ register: nm_remove_role_again
+
+- name: Verify nm_remove_role_again
+ assert:
+ that:
+ - nm_remove_role_again is not changed
+ - nm_remove_role_again.current == {}
+
+
+# QUERY NON-EXISTING ROLE
+- name: Query non-existing role (check_mode)
+ mso_role:
+ <<: *role_query
+ role: non-existing-role
+ check_mode: yes
+ register: cm_query_non_role
+
+- name: Query non-existing role (normal mode)
+ mso_role:
+ <<: *role_query
+ role: non-existing-role
+ register: nm_query_non_role
+
+# TODO: Implement more tests
+- name: Verify query_non_role
+ assert:
+ that:
+ - cm_query_non_role is not changed
+ - nm_query_non_role is not changed
+ - cm_query_non_role == nm_query_non_role
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema/tasks/main.yml
new file mode 100644
index 00000000..dc0613fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema/tasks/main.yml
@@ -0,0 +1,117 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove schemas
+ cisco.mso.mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exists
+ cisco.mso.mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ state: present
+
+- name: Create schema 1 with Template 1, and Template 2, Template 3 exist
+ cisco.mso.mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{item.template}}'
+ state: present
+ loop:
+ - { template: Template 1}
+ - { template: Template 2}
+ - { template: Template 3}
+
+- name: Create schema 2 with Template 4
+ cisco.mso.mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 4
+ state: present
+
+- name: Query for all schemas
+ cisco.mso.mso_schema:
+ <<: *mso_info
+ state: query
+ register: query_all
+
+- name: Query a schema
+ cisco.mso.mso_schema:
+ <<: *mso_info
+ schema: ansible_test
+ state: query
+ register: query_one
+
+- name: Verify query_all and query_one
+ assert:
+ that:
+ - query_all is not changed
+ - query_one is not changed
+ - query_all.current | length >= 2
+ - query_one.current.displayName == "ansible_test"
+
+- name: Remove schema (check_mode)
+ cisco.mso.mso_schema:
+ <<: *mso_info
+ schema: ansible_test
+ state: absent
+ check_mode: yes
+ register: cm_rm_schema
+
+- name: Remove schema (normal_mode)
+ cisco.mso.mso_schema:
+ <<: *mso_info
+ schema: ansible_test
+ state: absent
+ register: nm_rm_schema
+
+- name: Verify rm_schema
+ assert:
+ that:
+ - cm_rm_schema is changed
+ - cm_rm_schema.previous.displayName == "ansible_test"
+ - cm_rm_schema.current == {}
+ - nm_rm_schema is changed
+ - nm_rm_schema.current == {}
+ - nm_rm_schema.previous.displayName == "ansible_test"
+
+- name: Query non_existing schema
+ cisco.mso.mso_schema:
+ <<: *mso_info
+ schema: non_existing
+ state: query
+ register: query_non_existing
+
+- name: Verify query_non_existing
+ assert:
+ that:
+ - query_non_existing is not changed
+ - query_non_existing.current == {}
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site/tasks/main.yml
new file mode 100644
index 00000000..e9784ca9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site/tasks/main.yml
@@ -0,0 +1,253 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(101) }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+ ignore_errors: yes
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exists
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ sites:
+ - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 and Template 2 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{item.template}}'
+ state: present
+ loop:
+ - { template: Template 1}
+ - { template: Template 2}
+
+- name: Add a new site to a schema with Template 1 in check mode
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ check_mode: yes
+ register: add_site_cm
+
+- name: Verify add_site_cm
+ assert:
+ that:
+ - add_site_cm.current.siteId is match ("[0-9a-zA-Z]*")
+ - add_site_cm.current.templateName == "Template1"
+
+- name: Add a new site to a schema with Template 1 in normal mode
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: add_site_nm
+
+- name: Verify add_site_nm
+ assert:
+ that:
+ - add_site_nm.current.siteId is match ("[0-9a-zA-Z]*")
+ - add_site_nm.current.templateName == "Template1"
+
+- name: Add a new site to a schema in normal mode again
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: add_site_nm_again
+
+- name: Verify add_site_nm_again
+ assert:
+ that:
+ - add_site_nm_again is not changed
+ - add_site_nm_again.current.siteId is match ("[0-9a-zA-Z]*")
+
+- name: Add a new site to a schema with Template 2 in normal mode
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ state: present
+ register: add_site_temp2_nm
+
+- name: Verify add_site_temp2_nm
+ assert:
+ that:
+ - add_site_temp2_nm.current.siteId is match ("[0-9a-zA-Z]*")
+ - add_site_temp2_nm.current.templateName == "Template2"
+
+- name: Query a schema site
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: query
+ register: query_site
+
+- name: Query all schema sites
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ state: query
+ register: query_all_sites
+
+- name: Verify query_site and query_all_sites
+ assert:
+ that:
+ - query_site is not changed
+ - query_all_sites is not changed
+ - query_all_sites.current | length == 2
+
+- name: Remove a site from a schema with Template1
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: absent
+ register: rm_site_temp1
+
+- name: Remove a site from a schema with Template2
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ state: absent
+ register: rm_site_temp2
+
+- name: Verify rm_site_temp1 and rm_site_temp2
+ assert:
+ that:
+ - rm_site_temp1 is changed
+ - rm_site_temp1.current == {}
+ - rm_site_temp2 is changed
+ - rm_site_temp2.current == {}
+
+- name: Remove a site from a schema with Template2 again
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ state: absent
+ register: rm_site_again
+
+- name: Verify rm_site_again
+ assert:
+ that:
+ - rm_site_again is not changed
+
+# USE NON-EXISTING STATE
+- name: non_existing_state state
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: non_existing_state
+ ignore_errors: yes
+ register: non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - non_existing_state is not changed
+ - non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non_existing_state"
+
+# USE A NON_EXISTING_SCHEMA
+- name: non_existing_schema
+ mso_schema_site:
+ <<: *mso_info
+ schema: non_existing_schema
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: query
+ ignore_errors: yes
+ register: non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - non_existing_schema is not changed
+ - non_existing_schema.msg == "Provided schema 'non_existing_schema' does not exist"
+
+# USE A NON_EXISTING_TEMPLATE
+- name: non_existing_template
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: non_existing_template
+ state: query
+ ignore_errors: yes
+ register: non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - non_existing_template is not changed
+ - non_existing_template.msg == "Template 'non_existing_template' not found"
+
+- name: Template attribute absent in task
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: query
+ ignore_errors: yes
+ register: absent_template
+
+- name: Verify absent_template
+ assert:
+ that:
+ - absent_template is not changed
+ - absent_template.current == [] \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_domain/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_domain/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_domain/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_domain/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_domain/tasks/main.yml
new file mode 100644
index 00000000..ac0c9494
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_domain/tasks/main.yml
@@ -0,0 +1,989 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove Schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(101) }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ sites:
+ - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 and 2 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{ item }}'
+ state: present
+ loop:
+ - Template 1
+ - Template 2
+
+- name: Ensure schema 2 with Template 3 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Add a new site to a schema
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: present
+
+- name: Ensure VRF1 exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF1
+ state: present
+
+- name: Add BD1
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: BD1
+ vrf:
+ name: VRF1
+ state: present
+
+- name: Ensure Template 1 with AP1 exists
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ state: present
+
+- name: Ensure Template 1 and AP1 with EPG1 exists
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ bd:
+ name: BD1
+ vrf:
+ name: VRF1
+ state: present
+
+- name: Ensure Template 1 and AP1 with EPG3 exists
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG3
+ bd:
+ name: BD1
+ vrf:
+ name: VRF1
+ state: present
+
+- name: Ensure Template 1 with AP2 exists
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ state: present
+
+- name: Ensure Template 1 and AP2 with EPG2 exists
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG2
+ bd:
+ name: BD1
+ vrf:
+ name: VRF1
+ state: present
+
+- name: Ensure Template 1 and AP2 with EPG4 exists
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG4
+ bd:
+ name: BD1
+ vrf:
+ name: VRF1
+ state: present
+
+# ADD DOMAINS
+- name: Add domain 1 to site EPG1 with AP1 (check mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: VMware-VMM
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: present
+ check_mode: yes
+ register: cm_add_dom1e1
+
+- name: Verify cm_add_dom1e1
+ assert:
+ that:
+ - cm_add_dom1e1 is changed
+ - cm_add_dom1e1.previous == {}
+ - cm_add_dom1e1.current.deploymentImmediacy == 'lazy'
+ - cm_add_dom1e1.current.domainType == 'vmmDomain'
+ - cm_add_dom1e1.current.dn == 'uni/vmmp-VMware/dom-VMware-VMM'
+ - cm_add_dom1e1.current.resolutionImmediacy == 'pre-provision'
+
+- name: Add domain 1 to site EPG1 with AP1 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: present
+ register: nm_add_dom1e1
+
+- name: Verify nm_add_dom1e1
+ assert:
+ that:
+ - nm_add_dom1e1 is changed
+ - nm_add_dom1e1.previous == {}
+ - nm_add_dom1e1.current.deploymentImmediacy == 'lazy'
+ - nm_add_dom1e1.current.domainType == 'vmmDomain'
+ - nm_add_dom1e1.current.dn == 'uni/vmmp-VMware/dom-VMware-VMM'
+ - nm_add_dom1e1.current.resolutionImmediacy == 'pre-provision'
+
+- name: Add domain 2 to site EPG1 with AP1 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ domain_association_type: physicalDomain
+ domain_profile: phys
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: present
+ register: nm_add_dom2e1
+
+- name: Verify nm_add_dom2e1
+ assert:
+ that:
+ - nm_add_dom2e1 is changed
+ - nm_add_dom2e1.previous == {}
+ - nm_add_dom2e1.current.deploymentImmediacy == 'lazy'
+ - nm_add_dom2e1.current.domainType == 'physicalDomain'
+ - nm_add_dom2e1.current.dn == 'uni/phys-phys'
+ - nm_add_dom2e1.current.resolutionImmediacy == 'pre-provision'
+
+- name: Add domain 3 to site EPG1 with AP1 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ domain_association_type: physicalDomain
+ domain_profile: phys
+ deployment_immediacy: lazy
+ resolution_immediacy: lazy
+ state: present
+ register: nm_add_dom3e1
+
+- name: Verify nm_add_dom3e1
+ assert:
+ that:
+ - nm_add_dom3e1 is changed
+ - nm_add_dom3e1.previous != {}
+ - nm_add_dom3e1.current.deploymentImmediacy == 'lazy'
+ - nm_add_dom3e1.current.domainType == 'physicalDomain'
+ - nm_add_dom3e1.current.dn == 'uni/phys-phys'
+ - nm_add_dom3e1.current.resolutionImmediacy == 'lazy'
+
+- name: Add domain1 to site EPG3 with AP1 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG3
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: lazy
+ state: present
+ register: nm_add_dom1e3
+
+- name: Verify nm_add_dom1e2
+ assert:
+ that:
+ - nm_add_dom1e3 is changed
+ - nm_add_dom1e3.previous == {}
+ - nm_add_dom1e3.current.deploymentImmediacy == 'lazy'
+ - nm_add_dom1e3.current.domainType == 'vmmDomain'
+ - nm_add_dom1e3.current.dn == 'uni/vmmp-VMware/dom-VMware-VMM'
+ - nm_add_dom1e3.current.resolutionImmediacy == 'lazy'
+
+- name: Add domain 2 to EPG2 (check mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG2
+ domain_association_type: physicalDomain
+ domain_profile: phys
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: present
+ check_mode: yes
+ register: cm_add_dom2e2
+
+- name: Verify cm_add_dom2e2
+ assert:
+ that:
+ - cm_add_dom2e2 is changed
+ - cm_add_dom2e2.previous == {}
+ - cm_add_dom2e2.current.deploymentImmediacy == 'lazy'
+ - cm_add_dom2e2.current.domainType == 'physicalDomain'
+ - cm_add_dom2e2.current.dn == 'uni/phys-phys'
+ - cm_add_dom2e2.current.resolutionImmediacy == 'pre-provision'
+
+# QUERY DOMAINS
+- name: Query domains of site EPG1 with AP1 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ state: query
+ register: nm_query_domse1
+
+- name: Verify nm_query_domse1
+ assert:
+ that:
+ - nm_query_domse1 is not changed
+
+# QUERY A DOMAIN
+- name: Query domain3 of site EPG1 with AP1 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ domain_association_type: physicalDomain
+ domain_profile: phys
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: query
+ register: nm_query_dom3e1
+
+- name: Verify nm_query_dom3e1
+ assert:
+ that:
+ - nm_query_dom3e1 is not changed
+
+# QUERY REMOVED DOMAIN
+- name: Add domain 2 to site EPG2 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG2
+ domain_association_type: physicalDomain
+ domain_profile: phys
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: present
+ register: nm_add_dom2e2
+
+- name: Verify nm_add_dom2e2
+ assert:
+ that:
+ - nm_add_dom2e2 is changed
+ - nm_add_dom2e2.previous == {}
+ - nm_add_dom2e2.current.deploymentImmediacy == 'lazy'
+ - nm_add_dom2e2.current.domainType == 'physicalDomain'
+ - nm_add_dom2e2.current.dn == 'uni/phys-phys'
+ - nm_add_dom2e2.current.resolutionImmediacy == 'pre-provision'
+
+- name: Remove domain2 from EPG2 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG2
+ domain_association_type: physicalDomain
+ domain_profile: phys
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: absent
+ register: nm_remove_dom2e2
+
+- name: Verify nm_remove_dom2e2
+ assert:
+ that:
+ - nm_remove_dom2e2 is changed
+
+- name: Query removed domain2 from EPG2 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG2
+ domain_association_type: physicalDomain
+ domain_profile: phys
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: query
+ ignore_errors: yes
+ register: nm_non_existent_dom2e2
+
+- name: Verify non_existing_domain
+ assert:
+ that:
+ - nm_non_existent_dom2e2 is not changed
+ - nm_non_existent_dom2e2.msg == "Domain association 'physicalDomain/phys' not found"
+
+- name: Remove domain2 from EPG2 again(normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG2
+ domain_association_type: physicalDomain
+ domain_profile: phys
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: absent
+ ignore_errors: yes
+ register: nm_remove_again_dom2e2
+
+- name: Verify nm_remove_again_dom2e2
+ assert:
+ that:
+ - nm_remove_again_dom2e2 is not changed
+
+# ADD EXISTING DOMAIN
+- name: Add domain 1 to site EPG1 again (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: present
+ register: nm_add_dom1e1_2
+
+- name: Verify nm_add_dom1e1_2
+ assert:
+ that:
+ - nm_add_dom1e1_2 is not changed
+
+# ADD DOMAIN WITH NO STATE
+- name: Add domain 1 to site EPG1 again with no state (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ ignore_errors: yes
+ register: nm_add_stateless_dom1e1_2
+
+- name: Verify nm_add_stateless_dom1e1_2
+ assert:
+ that:
+ - nm_add_stateless_dom1e1_2 is not changed
+
+# ADD OTHER DOMAIN OPTIONS
+- name: Add domain l3ExtDomain to site EPG1 with AP1 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ domain_association_type: l3ExtDomain
+ domain_profile: 'ansible_l3domain'
+ deployment_immediacy: lazy
+ resolution_immediacy: lazy
+ state: present
+ register: nm_add_doml3
+
+- name: Verify nm_add_doml3
+ assert:
+ that:
+ - nm_add_doml3 is changed
+ - nm_add_doml3.previous == {}
+ - nm_add_doml3.current.deploymentImmediacy == 'lazy'
+ - nm_add_doml3.current.domainType == 'l3ExtDomain'
+ - nm_add_doml3.current.dn =='uni/l3dom-ansible_l3domain'
+ - nm_add_doml3.current.resolutionImmediacy == 'lazy'
+
+- name: Add domain l2ExtDomain to site EPG1 with AP1 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ domain_association_type: l2ExtDomain
+ domain_profile: 'ansible_l2domain'
+ deployment_immediacy: lazy
+ resolution_immediacy: lazy
+ state: present
+ ignore_errors: yes
+ register: nm_add_doml2
+
+- name: Verify nm_add_doml2
+ assert:
+ that:
+ - nm_add_doml2 is changed
+ - nm_add_doml2.previous == {}
+ - nm_add_doml2.current.deploymentImmediacy == 'lazy'
+ - nm_add_doml2.current.domainType == 'l2ExtDomain'
+ - nm_add_doml2.current.dn =='uni/l2dom-ansible_l2domain'
+ - nm_add_doml2.current.resolutionImmediacy == 'lazy'
+
+- name: Add domain fibreChannel to site EPG1 with AP1 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ domain_association_type: fibreChannelDomain
+ domain_profile: 'ansible_fibreChanneldomain'
+ deployment_immediacy: lazy
+ resolution_immediacy: lazy
+ state: present
+ register: nm_add_domfc
+
+- name: Verify nm_add_domfc
+ assert:
+ that:
+ - nm_add_domfc is changed
+ - nm_add_domfc.previous == {}
+ - nm_add_domfc.current.domainType == 'fibreChannelDomain'
+ - nm_add_domfc.current.dn =='uni/fc-ansible_fibreChanneldomain'
+ - nm_add_domfc.current.resolutionImmediacy == 'lazy'
+ - nm_add_domfc.current.deploymentImmediacy == 'lazy'
+
+# USE OTHER ATTRIBUTES OF VMM DOMAIN
+- name: Add domain vmm to site EPG2 with AP1 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG2
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: lazy
+ micro_seg_vlan_type: 'vlan'
+ micro_seg_vlan: 100
+ port_encap_vlan_type: 'vlan'
+ port_encap_vlan: 100
+ vlan_encap_mode: static
+ allow_micro_segmentation: yes
+ switch_type: 'default'
+ switching_mode: native
+ enhanced_lagpolicy_name: 'ansible_check'
+ enhanced_lagpolicy_dn: 'ansible_check'
+ state: present
+ ignore_errors: yes
+ register: nm_add_domvmprop
+
+- name: Verify nm_add_domvmprop
+ assert:
+ that:
+ - nm_add_domvmprop is changed
+ - nm_add_domvmprop.previous == {}
+
+- name: Add domain vmm to site EPG4 with AP2 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG4
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: lazy
+ micro_seg_vlan: 100
+ port_encap_vlan_type: 'vlan'
+ port_encap_vlan: 100
+ vlan_encap_mode: static
+ allow_micro_segmentation: yes
+ switch_type: 'default'
+ switching_mode: native
+ enhanced_lagpolicy_name: 'ansible_check'
+ enhanced_lagpolicy_dn: 'ansible_check'
+ state: present
+ ignore_errors: yes
+ register: nm_add_domvmprop1
+
+- name: Verify nm_add_domvmprop1
+ assert:
+ that:
+ - nm_add_domvmprop1 is not changed
+ - nm_add_domvmprop1.previous == {}
+ - nm_add_domvmprop1.msg == "micro_seg_vlan_type is required when micro_seg_vlan is provided."
+
+- name: Add domain vmm to site EPG4 with AP2 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG4
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: lazy
+ micro_seg_vlan_type: 'vlan'
+ port_encap_vlan_type: 'vlan'
+ port_encap_vlan: 100
+ vlan_encap_mode: static
+ allow_micro_segmentation: yes
+ switch_type: 'default'
+ switching_mode: native
+ enhanced_lagpolicy_name: 'ansible_check'
+ enhanced_lagpolicy_dn: 'ansible_check'
+ state: present
+ ignore_errors: yes
+ register: nm_add_domvmprop2
+
+- name: Verify nm_add_domvmprop2
+ assert:
+ that:
+ - nm_add_domvmprop2 is not changed
+ - nm_add_domvmprop2.msg == "micro_seg_vlan is required when micro_seg_vlan_type is provided."
+
+- name: Add domain vmm to site EPG4 with AP2 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG4
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: lazy
+ micro_seg_vlan_type: 'vlan'
+ micro_seg_vlan: 100
+ port_encap_vlan: 100
+ vlan_encap_mode: static
+ allow_micro_segmentation: yes
+ switch_type: 'default'
+ switching_mode: native
+ enhanced_lagpolicy_name: 'ansible_check'
+ enhanced_lagpolicy_dn: ''
+ state: present
+ ignore_errors: yes
+ register: nm_add_domvmprop3
+
+- name: Verify nm_add_domvmprop3
+ assert:
+ that:
+ - nm_add_domvmprop3 is not changed
+ - nm_add_domvmprop3.msg == "port_encap_vlan_type is required when port_encap_vlan is provided."
+
+- name: Add domain vmm to site EPG4 with AP2 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG4
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: lazy
+ micro_seg_vlan_type: 'vlan'
+ micro_seg_vlan: 100
+ port_encap_vlan_type: 'vlan'
+ vlan_encap_mode: static
+ allow_micro_segmentation: yes
+ switch_type: 'default'
+ switching_mode: native
+ enhanced_lagpolicy_name: 'ansible_check'
+ enhanced_lagpolicy_dn: 'ansible_check'
+ state: present
+ ignore_errors: yes
+ register: nm_add_domvmprop4
+
+- name: Verify nm_add_domvmprop4
+ assert:
+ that:
+ - nm_add_domvmprop4 is not changed
+ - nm_add_domvmprop4.msg == "port_encap_vlan is required when port_encap_vlan_type is provided."
+
+- name: Add domain vmm to site EPG4 with AP2 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG4
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: lazy
+ micro_seg_vlan_type: 'vlan'
+ micro_seg_vlan: 100
+ port_encap_vlan_type: 'vlan'
+ port_encap_vlan: 100
+ vlan_encap_mode: static
+ allow_micro_segmentation: yes
+ switch_type: 'default'
+ switching_mode: native
+ enhanced_lagpolicy_dn: 'ansible_check'
+ state: present
+ ignore_errors: yes
+ register: nm_add_domvmprop5
+
+- name: Verify nm_add_domvmprop5
+ assert:
+ that:
+ - nm_add_domvmprop5 is not changed
+ - nm_add_domvmprop5.msg == "enhanced_lagpolicy_name is required when enhanced_lagpolicy_dn is provided."
+
+- name: Add domain vmm to site EPG4 with AP2 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG4
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: lazy
+ micro_seg_vlan_type: 'vlan'
+ micro_seg_vlan: 100
+ port_encap_vlan_type: 'vlan'
+ port_encap_vlan: 100
+ vlan_encap_mode: static
+ allow_micro_segmentation: yes
+ switch_type: 'default'
+ switching_mode: native
+ enhanced_lagpolicy_name: 'ansible_check'
+ state: present
+ ignore_errors: yes
+ register: nm_add_domvmprop6
+
+- name: Verify nm_add_domvmprop6
+ assert:
+ that:
+ - nm_add_domvmprop6 is not changed
+ - nm_add_domvmprop6.msg == "enhanced_lagpolicy_dn is required when enhanced_lagpolicy_name is provided."
+
+# USE NON-EXISTING EPG and ANP AT TEMPLATE LEVEL
+- name: Add domain 1 to non-existent site EPG5 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP5
+ epg: EPG5
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: present
+ ignore_errors: yes
+ register: nm_add_dom1e5
+
+- name: Verify nm_add_dom1e5
+ assert:
+ that:
+ - nm_add_dom1e5 is not changed
+
+# USE NON-EXISTING EPG AT TEMPLATE LEVEL
+- name: Add domain 1 to non-existent site EPG5 (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG6
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ state: present
+ ignore_errors: yes
+ register: nm_add_dom1e6
+
+- name: Verify nm_add_dom1e6
+ assert:
+ that:
+ - nm_add_dom1e6 is not changed
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for domain (check_mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: non_existing_schema
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema for domain (normal_mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: non_existing_schema
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non_existing_schema' does not exist"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for domain (check_mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: non_existing_template
+ anp: AP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template for domain (normal_mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: non_existing_template
+ anp: AP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non_existing_template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+# USE A NON-EXISTING SITE
+- name: Non-existing site for domain (check_mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ anp: AP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_site
+
+- name: Non-existing site for domain (normal_mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ anp: AP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ ignore_errors: yes
+ register: nm_non_existing_site
+
+- name: Verify non_existing_site
+ assert:
+ that:
+ - cm_non_existing_site is not changed
+ - nm_non_existing_site is not changed
+ - cm_non_existing_site == nm_non_existing_site
+ - cm_non_existing_site.msg is match("Provided site/siteId/template 'ansible_test/[0-9a-zA-Z]*/Template2' does not exist. Existing siteIds/templates{{':'}} [0-9a-zA-Z]*/Template1")
+ - nm_non_existing_site.msg is match("Provided site/siteId/template 'ansible_test/[0-9a-zA-Z]*/Template2' does not exist. Existing siteIds/templates{{':'}} [0-9a-zA-Z]*/Template1")
+
+# USE A TEMPLATE WITHOUT ANY SITE
+- name: Add site EPG domain association to Schema 2 Template 3 without any site associated (check mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ anp: AP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ ignore_errors: yes
+ check_mode: yes
+ register: cm_no_site_associated
+
+- name: Add site EPG domain association to Template 3 without any site associated (normal mode)
+ mso_schema_site_anp_epg_domain:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ anp: AP1
+ epg: EPG1
+ domain_association_type: vmmDomain
+ domain_profile: 'VMware-VMM'
+ deployment_immediacy: lazy
+ resolution_immediacy: pre-provision
+ ignore_errors: yes
+ register: nm_no_site_associated
+
+- name: Verify cm_no_site_associated and nm_no_site_associated
+ assert:
+ that:
+ - cm_no_site_associated is not changed
+ - nm_no_site_associated is not changed
+ - cm_no_site_associated.msg == nm_no_site_associated.msg == "No site associated with template 'Template3'. Associate the site with the template using mso_schema_site." \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_selector/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_selector/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_selector/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_selector/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_selector/tasks/main.yml
new file mode 100644
index 00000000..a89bf355
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_selector/tasks/main.yml
@@ -0,0 +1,1089 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure azure site exists
+ mso_site:
+ <<: *mso_info
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ azure_apic_username }}'
+ apic_password: '{{ azure_apic_password }}'
+ apic_site_id: '{{ azure_site_id }}'
+ urls:
+ - https://{{ azure_apic_hostname }}
+ state: present
+
+- name: Ensure aws site exists
+ mso_site:
+ <<: *mso_info
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ aws_apic_username }}'
+ apic_password: '{{ aws_apic_password }}'
+ apic_site_id: '{{ aws_site_id }}'
+ urls:
+ - https://{{ aws_apic_hostname }}
+ state: present
+
+- name: Ensure tenant ansible_test exists
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ # sites:
+ # - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Associate aws site with ansible_test in normal mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ cloud_account: "000000000000"
+ aws_trusted: false
+ aws_access_key: "1"
+ secret_key: "0"
+ state: present
+ register: aaws_nm
+
+- name: Associate azure site with access_type not present, with ansible_test in normal mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ cloud_account: uni/tn-ansible_test/act-[100]-vendor-azure
+ state: present
+ register: aazure_shared_nm
+
+- name: Ensure schema 1 with Template 1, and Template 2, Template 3 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{item.template}}'
+ state: present
+ loop:
+ - { template: Template 1}
+ - { template: Template 2}
+ - { template: Template 3}
+
+- name: Ensure schema 2 with Template 3 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Add aws site to a schema
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: '{{item.template}}'
+ state: present
+ loop:
+ - { template: Template 1}
+ - { template: Template 2}
+ when: version.current.version[0] | int < 3
+
+- name: Add azure site to a schema
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ template: '{{item.template}}'
+ state: present
+ loop:
+ - { template: Template 1}
+ - { template: Template 2}
+ when: version.current.version[0] | int < 3
+
+- name: Ensure VRF1 exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF1
+ state: present
+
+- name: Ensure ANP exist
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ item.schema }}'
+ template: '{{ item.template }}'
+ anp: ANP
+ state: present
+ loop:
+ - { schema: '{{ mso_schema | default("ansible_test") }}', template: 'Template 1' }
+ - { schema: '{{ mso_schema | default("ansible_test") }}', template: 'Template 2' }
+
+- name: Add a new CIDR in VRF1 at site level
+ mso_schema_site_vrf_region_cidr: &mso_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: '{{ item }}'
+ vrf: VRF1
+ region: us-west-1
+ cidr: 10.0.0.0/16
+ primary: true
+ state: present
+ loop:
+ - 'aws_{{ mso_site | default("ansible_test") }}'
+ - 'azure_{{ mso_site | default("ansible_test") }}'
+
+# ADD EPGs
+- name: Ensure EPGs exist
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ item.schema }}'
+ template: '{{ item.template }}'
+ anp: ANP
+ epg: '{{ item.epg }}'
+ vrf:
+ name: VRF1
+ schema: ansible_test
+ template: Template 1
+ state: present
+ loop:
+ - { schema: '{{ mso_schema | default("ansible_test") }}', template: 'Template 1', epg: 'ansible_test_1' }
+ - { schema: '{{ mso_schema | default("ansible_test") }}', template: 'Template 1', epg: 'ansible_test_2' }
+
+- name: Add Selector to EPG (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: present
+ register: nm_add_selector_1
+
+- name: Verify nm_add_selector_1
+ assert:
+ that:
+ - nm_add_selector_1 is changed
+ - nm_add_selector_1.previous == {}
+ - nm_add_selector_1.current.name == "selector_1"
+ - nm_add_selector_1.current.expressions == []
+
+- name: Add Selector 2 to EPG (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_2
+ expressions:
+ - type: expression_2_template
+ operator: in
+ value: test
+ state: present
+ register: nm_add_selector_2
+
+- name: Verify nm_add_selector_2
+ assert:
+ that:
+ - nm_add_selector_2 is changed
+ - nm_add_selector_2.previous == {}
+ - nm_add_selector_2.current.name == "selector_2"
+ - nm_add_selector_2.current.expressions[0].key == "Custom:expression_2_template"
+ - nm_add_selector_2.current.expressions[0].operator == "in"
+ - nm_add_selector_2.current.expressions[0].value == "test"
+
+# ADD SELECTORS to site EPG
+- name: Add selector site_selector_1 to site EPG ansible_test_1 with ANP (check_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: present
+ check_mode: yes
+ register: cm_add_site_selector_1
+
+- name: Verify cm_add_site_selector_1
+ assert:
+ that:
+ - cm_add_site_selector_1 is changed
+ - cm_add_site_selector_1.previous == {}
+ - cm_add_site_selector_1.current.name == "site_selector_1"
+ - cm_add_site_selector_1.current.expressions == []
+
+- name: Add selector site_selector_1 to site EPG ansible_test_1 with ANP (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: present
+ register: nm_add_site_selector_1
+
+- name: Verify nm_add_site_selector_1
+ assert:
+ that:
+ - nm_add_site_selector_1 is changed
+ - nm_add_site_selector_1.previous == {}
+ - nm_add_site_selector_1.current.name == "site_selector_1"
+ - nm_add_site_selector_1.current.expressions == []
+
+# Add selector 1 again
+- name: Add selector site_selector_1 to site EPG ansible_test_1 with ANP again (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: present
+ register: nm_add_site_selector_1_again
+
+- name: Verify nm_add_site_selector_1_again
+ assert:
+ that:
+ - nm_add_site_selector_1_again is not changed
+ - nm_add_site_selector_1_again.current.name == "site_selector_1" == nm_add_site_selector_1_again.previous.name
+ - nm_add_site_selector_1_again.current.expressions == [] == nm_add_site_selector_1_again.previous.expressions
+
+- name: Add Selector 1 to site EPG with space in selector name (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector 1
+ state: present
+ ignore_errors: yes
+ register: nm_add_selector1_with_space_in_name
+
+- name: Verify nm_add_selector1_with_space_in_name
+ assert:
+ that:
+ - nm_add_selector1_with_space_in_name is not changed
+ - nm_add_selector1_with_space_in_name.msg == "There should not be any space in selector name."
+
+- name: Add Selector 2 to site EPG with space in expression type (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_2
+ expressions:
+ - type: expression 2
+ operator: in
+ value: test
+ state: present
+ ignore_errors: yes
+ register: nm_add_selector2_with_space_in_expression_type
+
+- name: Verify nm_add_selector2_with_space_in_expression_type
+ assert:
+ that:
+ - nm_add_selector2_with_space_in_expression_type is not changed
+ - nm_add_selector2_with_space_in_expression_type.msg == "There should not be any space in 'type' attribute of expression 'expression 2'"
+
+- name: Add Selector 2 to site EPG (check_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_2
+ expressions:
+ - type: expression_2
+ operator: in
+ value: test
+ state: present
+ check_mode: yes
+ register: cm_add_site_selector_2
+
+- name: Verify cm_add_selector_2
+ assert:
+ that:
+ - cm_add_site_selector_2 is changed
+ - cm_add_site_selector_2.previous == {}
+ - cm_add_site_selector_2.current.name == "site_selector_2"
+ - cm_add_site_selector_2.current.expressions[0].key == "Custom:expression_2"
+ - cm_add_site_selector_2.current.expressions[0].operator == "in"
+ - cm_add_site_selector_2.current.expressions[0].value == "test"
+
+- name: Add Selector_2 to site EPG (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_2
+ expressions:
+ - type: expression_2
+ operator: in
+ value: test
+ state: present
+ register: nm_add_site_selector_2
+
+- name: Verify nm_add_site_selector_2
+ assert:
+ that:
+ - nm_add_site_selector_2 is changed
+ - nm_add_site_selector_2.previous == {}
+ - nm_add_site_selector_2.current.name == "site_selector_2"
+ - nm_add_site_selector_2.current.expressions[0].key == "Custom:expression_2"
+ - nm_add_site_selector_2.current.expressions[0].operator == "in"
+ - nm_add_site_selector_2.current.expressions[0].value == "test"
+
+- name: Change Selector 2 - keyExist(normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_2
+ expressions:
+ - type: expression_5
+ operator: has_key
+ value: test
+ state: present
+ ignore_errors: yes
+ register: nm_change_site_selector_2_key_exist
+
+- name: Verify nm_change_site_selector_2_key_exist
+ assert:
+ that:
+ - nm_change_site_selector_2_key_exist is not changed
+ - nm_change_site_selector_2_key_exist.msg == "Attribute 'value' is not supported for operator 'has_key' in expression 'expression_5'"
+
+- name: Change Selector 2 - keyNotExist (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_2
+ expressions:
+ - type: expression_6
+ operator: does_not_have_key
+ value: test
+ state: present
+ ignore_errors: yes
+ register: nm_change_site_selector_2_key_not_exist
+
+- name: Verify nm_change_site_selector_2_key_not_exist
+ assert:
+ that:
+ - nm_change_site_selector_2_key_not_exist is not changed
+ - nm_change_site_selector_2_key_not_exist.msg == "Attribute 'value' is not supported for operator 'does_not_have_key' in expression 'expression_6'"
+
+- name: Change Selector 2 - equals (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_2
+ expressions:
+ - type: expression_6
+ operator: equals
+ state: present
+ ignore_errors: yes
+ register: nm_change_site_selector_2_equals
+
+- name: Verify nm_change_site_selector_2_equals
+ assert:
+ that:
+ - nm_change_site_selector_2_equals is not changed
+ - nm_change_site_selector_2_equals.msg == "Attribute 'value' needed for operator 'equals' in expression 'expression_6'"
+
+# Remove site ANP
+- name: Remove site ANP (normal_mode)
+ mso_schema_site_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ state: absent
+
+- name: Query site ANP
+ mso_schema_site_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ state: query
+ ignore_errors: yes
+ register: query_site_ANP
+
+- name: Verify query_site_ANP
+ assert:
+ that:
+ - query_site_ANP.msg == "ANP 'ANP' not found"
+
+# Query without site ANP
+- name: Query site_selectors without site ANP
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ state: query
+ ignore_errors: yes
+ register: query_without_site_ANP
+
+- name: Verify query_without_site_ANP
+ assert:
+ that:
+ - query_without_site_ANP is not changed
+ - query_without_site_ANP.msg == "Anp 'ANP' does not exist in site level."
+
+# - name: Add selector without ANP exist in site level
+- name: Add site selector 3 without site ANP exist (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_3
+ expressions:
+ - type: expression_3
+ operator: in
+ value: test
+ state: present
+ register: nm_add_site_selector_3_without_anp
+
+- name: Verify nm_add_site_selector_3_without_anp
+ assert:
+ that:
+ - nm_add_site_selector_3_without_anp is changed
+ - nm_add_site_selector_3_without_anp.previous == {}
+ - nm_add_site_selector_3_without_anp.current.name == "site_selector_3"
+ - nm_add_site_selector_3_without_anp.current.expressions[0].key == "Custom:expression_3"
+ - nm_add_site_selector_3_without_anp.current.expressions[0].operator == "in"
+ - nm_add_site_selector_3_without_anp.current.expressions[0].value == "test"
+
+# Remove site level EPG
+- name: Remove site EPG
+ mso_schema_site_anp_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ state: absent
+
+# Query without site level EPG
+- name: Query site_selectors without site EPG
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ state: query
+ ignore_errors: yes
+ register: query_without_site_EPG
+
+- name: Verify query_without_site_EPG
+ assert:
+ that:
+ - query_without_site_EPG is not changed
+ - query_without_site_EPG.msg == "Epg 'ansible_test_1' does not exist in site level."
+
+- name: Add site selector 1 without site EPG exist (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: present
+ register: nm_add_site_selector_1_without_epg
+
+- name: Verify nm_add_site_selector_1_without_epg
+ assert:
+ that:
+ - nm_add_site_selector_1_without_epg is changed
+ - nm_add_site_selector_1_without_epg.previous == {}
+ - nm_add_site_selector_1_without_epg.current.name == "site_selector_1"
+ - nm_add_site_selector_1_without_epg.current.expressions == []
+
+- name: Add site_selector_1 site_selector_2 site_selector_3 again
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: '{{ item.selector }}'
+ expressions:
+ - type: '{{ item.type }}'
+ operator: in
+ value: test
+ state: present
+ loop:
+ - {selector: 'site_selector_1', type: 'expression_1'}
+ - {selector: 'site_selector_2', type: 'expression_2'}
+ - {selector: 'site_selector_3', type: 'expression_3'}
+ register: nm_add_site_selectors_again
+
+- name: Verify nm_add_site_selectors_again
+ assert:
+ that:
+ - nm_add_site_selectors_again is changed
+
+# Query all selectors
+- name: Query selectors to site EPG
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ state: query
+ register: query_all_site_selectors
+
+- name: Verify query_all_site_selectors
+ assert:
+ that:
+ - query_all_site_selectors is not changed
+ - query_all_site_selectors.current | length == 3
+ - query_all_site_selectors.current[0].name == "site_selector_1"
+ - query_all_site_selectors.current[0].expressions[0].key == "Custom:expression_1"
+ - query_all_site_selectors.current[0].expressions[0].operator == "in"
+ - query_all_site_selectors.current[0].expressions[0].value == "test"
+ - query_all_site_selectors.current[1].name == "site_selector_2"
+ - query_all_site_selectors.current[1].expressions[0].key == "Custom:expression_2"
+ - query_all_site_selectors.current[1].expressions[0].operator == "in"
+ - query_all_site_selectors.current[1].expressions[0].value == "test"
+ - query_all_site_selectors.current[2].name == "site_selector_3"
+ - query_all_site_selectors.current[2].expressions[0].key == "Custom:expression_3"
+ - query_all_site_selectors.current[2].expressions[0].operator == "in"
+ - query_all_site_selectors.current[2].expressions[0].value == "test"
+
+# Query sepecific seletor to site EPG
+- name: Query selector to site EPG
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: query
+ register: query_site_selector_1
+
+- name: Verify query_site_selector_1
+ assert:
+ that:
+ - query_site_selector_1 is not changed
+ - query_site_selector_1.current.name == "site_selector_1"
+ - query_site_selector_1.current.expressions[0].key == "Custom:expression_1"
+ - query_site_selector_1.current.expressions[0].operator == "in"
+ - query_site_selector_1.current.expressions[0].value == "test"
+
+- name: Remove site selector 3 (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_3
+ state: absent
+ register: nm_remove_site_selector_3
+
+- name: Verify nm_remove_site_selector_3
+ assert:
+ that:
+ - nm_remove_site_selector_3 is changed
+ - nm_remove_site_selector_3.current == {}
+
+- name: Remove site selector 3 again (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_3
+ state: absent
+ register: nm_remove_site_selector_3_again
+
+- name: Verify nm_remove_site_selector_3_again
+ assert:
+ that:
+ - nm_remove_site_selector_3_again is not changed
+ - nm_remove_site_selector_3_again.current == {}
+
+# QUERY NON-EXISTING Selector to EPG
+- name: Query non-existing selector (check_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: non_existing_selector
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_selector
+
+- name: Query non-existing selector (normal mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: non_existing_selector
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_selector
+
+- name: Verify cm_query_non_selector and nm_query_non_selector
+ assert:
+ that:
+ - cm_query_non_selector is not changed
+ - nm_query_non_selector is not changed
+ - cm_query_non_selector == nm_query_non_selector
+ - cm_query_non_selector.msg == "Selector 'non_existing_selector' not found"
+ - nm_query_non_selector.msg == "Selector 'non_existing_selector' not found"
+
+# QUERY NON-EXISTING EPG
+- name: Query non-existing EPG (check_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: non_existing_epg
+ selector: site_selector_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_epg
+
+- name: Query non-existing EPG (normal mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: non_existing_epg
+ selector: site_selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_epg
+
+- name: Verify query_non_epg
+ assert:
+ that:
+ - cm_query_non_epg is not changed
+ - nm_query_non_epg is not changed
+ - cm_query_non_epg == nm_query_non_epg
+ - cm_query_non_epg.msg == nm_query_non_epg.msg == "Provided EPG 'non_existing_epg' does not exist. Existing EPGs{{':'}} ansible_test_1, ansible_test_2"
+
+# QUERY NON-EXISTING ANP
+- name: Query non-existing ANP (check_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: non_existing_anp
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_anp
+
+- name: Query non-existing ANP (normal mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: non_existing_anp
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_anp
+
+- name: Verify query_non_anp
+ assert:
+ that:
+ - cm_query_non_anp is not changed
+ - nm_query_non_anp is not changed
+ - cm_query_non_anp == nm_query_non_anp
+ - cm_query_non_anp.msg == nm_query_non_anp.msg == "Provided anp 'non_existing_anp' does not exist. Existing anps{{':'}} ANP"
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state (check_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: non-existing-state
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: Non-existing state (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state == nm_non_existing_state
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non-existing-state"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template (check_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: non-existing-template
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: non-existing-template
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1, Template2, Template3"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema (check_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: non-existing-schema
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: non-existing-schema
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non-existing-schema' does not exist"
+
+# USE A NON-EXISTING SITE
+- name: Non-existing site (check_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: non-existing-site
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_site
+
+- name: Non-existing site (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: non-existing-site
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_site
+
+- name: Verify non_existing_site
+ assert:
+ that:
+ - cm_non_existing_site is not changed
+ - nm_non_existing_site is not changed
+ - cm_non_existing_site == nm_non_existing_site
+ - cm_non_existing_site.msg == nm_non_existing_site.msg == "Site 'non-existing-site' is not a valid site name."
+
+# USE A NON-EXISTING SITE-TEMPLATE
+- name: Non-existing site-template (check_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_site_template
+
+- name: Non-existing site-template (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_site_template
+
+- name: Verify non_existing_site_template
+ assert:
+ that:
+ - cm_non_existing_site_template is not changed
+ - nm_non_existing_site_template is not changed
+ - cm_non_existing_site_template == nm_non_existing_site_template
+ - cm_non_existing_site_template.msg == nm_non_existing_site_template.msg == "Provided site-template association 'aws_{{ mso_site | default("ansible_test") }}-Template3' does not exist."
+
+- name: Add Selector_4 to site EPG (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_4
+ expressions:
+ - type: ip_address
+ operator: has_key
+ state: present
+ ignore_errors: yes
+ register: nm_add_site_selector_4
+
+- name: Verify nm_add_site_selector_4
+ assert:
+ that:
+ - nm_add_site_selector_4 is not changed
+ - nm_add_site_selector_4.msg == "Operator 'has_key' is not supported when expression type is 'ip_address'"
+
+- name: Add Selector_4 to site EPG again (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_4
+ expressions:
+ - type: ip_address
+ operator: in
+ value: test
+ state: present
+ register: nm_add_site_selector_4_again
+
+- name: Verify nm_add_site_selector_4
+ assert:
+ that:
+ - nm_add_site_selector_4_again is changed
+ - nm_add_site_selector_4_again.current.name == "site_selector_4"
+
+- name: Add azure site_selector_1 to site EPG (normal_mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ expressions:
+ - type: zone
+ operator: in
+ value: test
+ state: present
+ ignore_errors: yes
+ register: nm_add_azure_site_selector_1
+
+- name: Verify nm_add_azure_site_selector_1
+ assert:
+ that:
+ - nm_add_azure_site_selector_1 is not changed
+ - nm_add_azure_site_selector_1.msg == "Type 'zone' is only supported for aws"
+
+# USE A TEMPLATE WITHOUT ANY SITE
+- name: Add site EPG selector to Schema 2 Template 3 without any site associated (check mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ expressions:
+ - type: zone
+ operator: in
+ value: test
+ state: present
+ ignore_errors: yes
+ check_mode: yes
+ register: cm_no_site_associated
+
+- name: Add site EPG selector to Template 3 without any site associated (normal mode)
+ mso_schema_site_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ anp: ANP
+ epg: ansible_test_1
+ selector: site_selector_1
+ expressions:
+ - type: zone
+ operator: in
+ value: test
+ state: present
+ ignore_errors: yes
+ register: nm_no_site_associated
+
+- name: Verify cm_no_site_associated and nm_no_site_associated
+ assert:
+ that:
+ - cm_no_site_associated is not changed
+ - nm_no_site_associated is not changed
+ - cm_no_site_associated.msg == nm_no_site_associated.msg == "No site associated with template 'Template3'. Associate the site with the template using mso_schema_site." \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_staticport/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_staticport/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_staticport/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_staticport/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_staticport/tasks/main.yml
new file mode 100644
index 00000000..998b3b7f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_anp_epg_staticport/tasks/main.yml
@@ -0,0 +1,859 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove Schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(101) }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ sites:
+ - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 and 2 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{ item }}'
+ state: present
+ loop:
+ - Template 1
+ - Template 2
+
+- name: Ensure schema 2 with Template 3 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Add a new site to a schema
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: present
+
+- name: Ensure VRF1 exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF1
+ state: present
+
+- name: Add BD1
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: BD1
+ vrf:
+ name: VRF1
+ state: present
+
+- name: Ensure Template 1 with AP1 exists
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ state: present
+
+- name: Ensure Template 1 and AP1 with EPG1 exists
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ bd:
+ name: BD1
+ vrf:
+ name: VRF1
+ state: present
+
+- name: Ensure Template 1 and AP1 with EPG3 exists
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG3
+ bd:
+ name: BD1
+ vrf:
+ name: VRF1
+ state: present
+
+- name: Ensure Template 1 with AP2 exists
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ state: present
+
+- name: Ensure Template 1 and AP2 with EPG2 exists
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG2
+ bd:
+ name: BD1
+ vrf:
+ name: VRF1
+ state: present
+
+- name: Ensure Template 1 and AP2 with EPG4 exists
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG4
+ bd:
+ name: BD1
+ vrf:
+ name: VRF1
+ state: present
+
+- name: Ensure Template 1 and AP2 with EPG6 exists
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG6
+ bd:
+ name: BD1
+ vrf:
+ name: VRF1
+ state: present
+
+# ADD STATIC PORTS
+- name: Add static port 1 to site EPG1 of AP1 (check mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ mode: 'native'
+ type: port
+ deployment_immediacy: immediate
+ state: present
+ check_mode: yes
+ register: cm_add_stat1e1
+
+- name: Verify cm_add_stat1e1
+ assert:
+ that:
+ - cm_add_stat1e1 is changed
+ - cm_add_stat1e1.previous == {}
+ - cm_add_stat1e1.current.deploymentImmediacy == 'immediate'
+ - cm_add_stat1e1.current.portEncapVlan == 126
+ - cm_add_stat1e1.current.path == 'topology/pod-1/paths-101/pathep-[eth1/1]'
+ - cm_add_stat1e1.current.mode == 'native'
+ - cm_add_stat1e1.current.type == 'port'
+
+- name: Add static port 1 to site EPG1 of AP1 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ mode: 'native'
+ deployment_immediacy: immediate
+ state: present
+ register: nm_add_stat1e1
+
+- name: Verify nm_add_stat1e1
+ assert:
+ that:
+ - nm_add_stat1e1 is changed
+ - nm_add_stat1e1.previous == {}
+ - nm_add_stat1e1.current.deploymentImmediacy == 'immediate'
+ - nm_add_stat1e1.current.portEncapVlan == 126
+ - nm_add_stat1e1.current.path == 'topology/pod-1/paths-101/pathep-[eth1/1]'
+ - nm_add_stat1e1.current.mode == 'native'
+ - nm_add_stat1e1.current.type == 'port'
+
+- name: Add static port 2 to site EPG1 of AP1 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ pod: pod-2
+ leaf: 102
+ path: eth1/2
+ vlan: 100
+ mode: 'regular'
+ type: port
+ primary_micro_segment_vlan: 199
+ deployment_immediacy: immediate
+ state: present
+ register: nm_add_stat2e1
+
+- name: Verify nm_add_stat2e1
+ assert:
+ that:
+ - nm_add_stat2e1 is changed
+ - nm_add_stat2e1.previous == {}
+ - nm_add_stat2e1.current.deploymentImmediacy == 'immediate'
+ - nm_add_stat2e1.current.portEncapVlan == 100
+ - nm_add_stat2e1.current.path == 'topology/pod-2/paths-102/pathep-[eth1/2]'
+ - nm_add_stat2e1.current.mode == 'regular'
+ - nm_add_stat2e1.current.type == 'port'
+
+
+- name: Add static port 3 (vpc) to site EPG1 of AP1 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ pod: pod-3
+ leaf: 103-104
+ path: ansible_polgrp
+ vlan: 101
+ type: vpc
+ mode: untagged
+ deployment_immediacy: lazy
+ state: present
+ register: nm_add_stat3e1
+
+- name: Verify nm_add_stat3e1
+ assert:
+ that:
+ - nm_add_stat3e1 is changed
+ - nm_add_stat3e1.previous == {}
+ - nm_add_stat3e1.current.deploymentImmediacy == 'lazy'
+ - nm_add_stat3e1.current.portEncapVlan == 101
+ - nm_add_stat3e1.current.path == 'topology/pod-3/protpaths-103-104/pathep-[ansible_polgrp]'
+ - nm_add_stat3e1.current.mode == 'untagged'
+ - nm_add_stat3e1.current.type == 'vpc'
+
+- name: Add static port 1 to site EPG3 of AP1 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG3
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ mode: 'native'
+ type: port
+ deployment_immediacy: immediate
+ state: present
+ register: nm_add_stat1e3
+
+- name: Verify nm_add_stat1e3
+ assert:
+ that:
+ - nm_add_stat1e3 is changed
+ - nm_add_stat1e3.previous == {}
+ - nm_add_stat1e3.current.deploymentImmediacy == 'immediate'
+ - nm_add_stat1e3.current.portEncapVlan == 126
+ - nm_add_stat1e3.current.path == 'topology/pod-1/paths-101/pathep-[eth1/1]'
+ - nm_add_stat1e3.current.mode == 'native'
+ - nm_add_stat1e3.current.type == 'port'
+
+- name: Add static port 2 (dpc) to EPG6 of AP2 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG6
+ pod: pod-2
+ leaf: 102
+ path: eth1/2
+ vlan: 100
+ deployment_immediacy: lazy
+ mode: regular
+ type: dpc
+ primary_micro_segment_vlan: 199
+ state: present
+ register: nm_add_stat2e6
+
+- name: Verify nm_add_stat2e6
+ assert:
+ that:
+ - nm_add_stat2e6 is changed
+ - nm_add_stat2e6.previous == {}
+ - nm_add_stat2e6.current.deploymentImmediacy == 'lazy'
+ - nm_add_stat2e6.current.portEncapVlan == 100
+ - nm_add_stat2e6.current.microSegVlan == 199
+ - nm_add_stat2e6.current.path == 'topology/pod-2/paths-102/pathep-[eth1/2]'
+ - nm_add_stat2e6.current.mode == 'regular'
+ - nm_add_stat2e6.current.type == 'dpc'
+
+# QUERY STATIC PORTS
+- name: Query STATIC PORTS of site EPG1 with AP1 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ state: query
+ register: nm_query_statse1
+
+- name: Verify nm_query_statse1
+ assert:
+ that:
+ - nm_query_statse1 is not changed
+
+# QUERY A STATIC PORT
+- name: Query static port 3 (vpc) of site EPG1 with AP1 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ pod: pod-3
+ leaf: 103-104
+ path: ansible_polgrp
+ vlan: 101
+ mode: untagged
+ type: vpc
+ deployment_immediacy: immediate
+ state: query
+ register: nm_query_stat3e1
+
+- name: Verify nm_query_stat3e1
+ assert:
+ that:
+ - nm_query_stat3e1 is not changed
+
+# QUERY REMOVED STATIC PORT
+- name: Add static port 2 to site EPG2 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG2
+ pod: pod-2
+ leaf: 102
+ path: eth1/2
+ vlan: 100
+ mode: regular
+ type: port
+ deployment_immediacy: immediate
+ state: present
+ register: nm_add_stat2e2
+
+- name: Verify nm_add_stat2e2
+ assert:
+ that:
+ - nm_add_stat2e2 is changed
+ - nm_add_stat2e2.previous == {}
+ - nm_add_stat2e2.current.deploymentImmediacy == 'immediate'
+ - nm_add_stat2e2.current.portEncapVlan == 100
+ - nm_add_stat2e2.current.path == 'topology/pod-2/paths-102/pathep-[eth1/2]'
+ - nm_add_stat2e2.current.mode == 'regular'
+ - nm_add_stat2e2.current.type == 'port'
+
+- name: Remove static port 2 from EPG2 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG2
+ pod: pod-2
+ leaf: 102
+ path: eth1/2
+ vlan: 100
+ mode: regular
+ type: port
+ deployment_immediacy: immediate
+ state: absent
+ register: nm_remove_stat2e2
+
+- name: Verify nm_remove_stat2e2
+ assert:
+ that:
+ - nm_remove_stat2e2 is changed
+
+- name: Query removed static port 2 from EPG2 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG2
+ pod: pod-2
+ leaf: 102
+ path: eth1/2
+ vlan: 100
+ mode: regular
+ type: port
+ deployment_immediacy: immediate
+ state: query
+ ignore_errors: yes
+ register: nm_non_existent_dom2e2
+
+- name: Verify non_existing_domain
+ assert:
+ that:
+ - nm_non_existent_dom2e2 is not changed
+ - nm_non_existent_dom2e2.msg == "Static port 'topology/pod-2/paths-102/pathep-[eth1/2]' not found"
+
+- name: Remove static port 2 from EPG2 again(normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG2
+ pod: pod-2
+ leaf: 101
+ path: eth1/2
+ vlan: 100
+ mode: regular
+ type: port
+ deployment_immediacy: immediate
+ state: absent
+ ignore_errors: yes
+ register: nm_remove_again_stat2e2
+
+- name: Verify nm_remove_again_stat2e2
+ assert:
+ that:
+ - nm_remove_again_stat2e2 is not changed
+
+# ADD EXISTING STATIC PORT
+- name: Add static port 1 to site EPG1 again (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ mode: 'native'
+ type: port
+ deployment_immediacy: immediate
+ state: present
+ register: nm_add_stat1e1_2
+
+- name: Verify nm_add_stat1e1_2
+ assert:
+ that:
+ - nm_add_stat1e1_2 is not changed
+
+# ADD STATIC PORT WITH NO STATE
+- name: Add static port 1 to site EPG1 again with no state (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ mode: native
+ type: port
+ deployment_immediacy: immediate
+ ignore_errors: yes
+ register: nm_add_stateless_stat1e1_2
+
+- name: Verify nm_add_stateless_stat1e1_2
+ assert:
+ that:
+ - nm_add_stateless_stat1e1_2 is not changed
+
+# ADD STATIC FEX PORT
+- name: Add static fex port to site EPG1 with AP1 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ pod: pod-4
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ fex: 151
+ type: port
+ mode: native
+ deployment_immediacy: lazy
+ state: present
+ register: nm_add_statfex
+
+- name: Verify nm_add_statfex
+ assert:
+ that:
+ - nm_add_statfex is changed
+ - nm_add_statfex.previous == {}
+ - nm_add_statfex.current.deploymentImmediacy == 'lazy'
+ - nm_add_statfex.current.portEncapVlan == 126
+ - nm_add_statfex.current.path == 'topology/pod-4/paths-101/extpaths-151/pathep-[eth1/1]'
+ - nm_add_statfex.current.mode == 'native'
+ - nm_add_statfex.current.type == 'port'
+
+# VERIFY NON EXISTENT DEPLOYMENT IMMEDIACY
+- name: Add static port 1 to site EPG4 with AP2 with no deployment immediacy (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG4
+ pod: pod-4
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ type: port
+ mode: native
+ state: present
+ register: nm_add_stat_di
+
+- name: Verify nm_add_stat_di
+ assert:
+ that:
+ - nm_add_stat_di.current.deploymentImmediacy == 'lazy'
+
+# VERIFY NON EXISTENT MODE
+- name: Add static port 1 to site EPG4 with AP2 with no mode (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP2
+ epg: EPG4
+ pod: pod-4
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ type: port
+ deployment_immediacy: lazy
+ state: present
+ register: nm_add_stat_mode
+
+- name: Verify nm_add_stat_mode
+ assert:
+ that:
+ - nm_add_stat_mode.current.mode == 'untagged'
+
+# USE NON-EXISTING EPG and ANP AT TEMPLATE LEVEL
+- name: Add static port 1 to non-existent site EPG5 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP5
+ epg: EPG5
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ mode: native
+ type: port
+ deployment_immediacy: immediate
+ state: present
+ ignore_errors: yes
+ register: nm_add_stat1e5
+
+- name: Verify nm_add_stat1e5
+ assert:
+ that:
+ - nm_add_stat1e5 is not changed
+
+# USE NON-EXISTING EPG AT TEMPLATE LEVEL
+- name: Add static port 1 to non-existent site EPG5 (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG6
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ mode: native
+ deployment_immediacy: immediate
+ state: present
+ ignore_errors: yes
+ register: nm_add_stat1e6
+
+- name: Verify nm_add_stat1e6
+ assert:
+ that:
+ - nm_add_stat1e6 is not changed
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for static port (check_mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: non_existing_schema
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ mode: native
+ type: port
+ deployment_immediacy: immediate
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema for static port (normal_mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: non_existing_schema
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ type: port
+ mode: native
+ deployment_immediacy: immediate
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non_existing_schema' does not exist"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for static port (check_mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: non_existing_template
+ anp: AP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ type: port
+ mode: native
+ deployment_immediacy: immediate
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template for static port (normal_mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: non_existing_template
+ anp: AP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ type: port
+ mode: native
+ deployment_immediacy: immediate
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non_existing_template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+# USE A NON-EXISTING SITE
+- name: Non-existing site for static port (check_mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ anp: AP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ type: port
+ mode: native
+ deployment_immediacy: immediate
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_site
+
+- name: Non-existing site for static port (normal_mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ anp: AP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ type: port
+ mode: native
+ deployment_immediacy: immediate
+ ignore_errors: yes
+ register: nm_non_existing_site
+
+- name: Verify non_existing_site
+ assert:
+ that:
+ - cm_non_existing_site is not changed
+ - nm_non_existing_site is not changed
+ - cm_non_existing_site == nm_non_existing_site
+ - cm_non_existing_site.msg is match("Provided site/siteId/template 'ansible_test/[0-9a-zA-Z]*/Template2' does not exist. Existing siteIds/templates{{':'}} [0-9a-zA-Z]*/Template1")
+ - nm_non_existing_site.msg is match("Provided site/siteId/template 'ansible_test/[0-9a-zA-Z]*/Template2' does not exist. Existing siteIds/templates{{':'}} [0-9a-zA-Z]*/Template1")
+
+# USE A TEMPLATE WITHOUT ANY SITE
+- name: Add site EPG static port association to Schema 2 Template 3 without any site associated (check mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ anp: AP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ type: port
+ mode: native
+ deployment_immediacy: immediate
+ ignore_errors: yes
+ check_mode: yes
+ register: cm_no_site_associated
+
+- name: Add site EPG static port association to Template 3 without any site associated (normal mode)
+ mso_schema_site_anp_epg_staticport:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ anp: AP1
+ epg: EPG1
+ pod: pod-1
+ leaf: 101
+ path: eth1/1
+ vlan: 126
+ type: port
+ mode: native
+ deployment_immediacy: immediate
+ ignore_errors: yes
+ register: nm_no_site_associated
+
+- name: Verify cm_no_site_associated and nm_no_site_associated
+ assert:
+ that:
+ - cm_no_site_associated is not changed
+ - nm_no_site_associated is not changed
+ - cm_no_site_associated.msg == nm_no_site_associated.msg == "No site associated with template 'Template3'. Associate the site with the template using mso_schema_site." \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd/tasks/main.yml
new file mode 100644
index 00000000..7fc18575
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd/tasks/main.yml
@@ -0,0 +1,704 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(101) }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+ ignore_errors: yes
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exists
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ sites:
+ - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1, and Template 2, Template 3 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{item.template}}'
+ state: present
+ loop:
+ - { template: Template 1}
+ - { template: Template 2}
+ - { template: Template 3}
+
+- name: Ensure schema 2 with Template 3 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Add physical site to a schema
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: '{{item.template}}'
+ state: present
+ loop:
+ - { template: Template 1}
+ - { template: Template 2}
+
+- name: Ensure VRF1 exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF1
+ layer3_multicast: true
+ state: present
+
+- name: Ensure ansible_test_1 BD does not exist
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ vrf:
+ name: VRF1
+ state: absent
+
+- name: Add template BD
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ vrf:
+ name: VRF1
+ state: present
+ register: nm_add_bd
+
+- name: Verify nm_add_bd
+ assert:
+ that:
+ - nm_add_bd is changed
+ - nm_add_bd.previous == {}
+ - nm_add_bd.current.name == "ansible_test_1"
+ - nm_add_bd.current.vrfRef.templateName == "Template1"
+ - nm_add_bd.current.vrfRef.vrfName == "VRF1"
+
+- name: Add template BD 2
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ bd: ansible_test_2
+ vrf:
+ name: VRF1
+ template: Template 1
+ state: present
+ register: nm_add_bd_2
+
+- name: Verify nm_add_bd_2
+ assert:
+ that:
+ - nm_add_bd_2 is changed
+ - nm_add_bd_2.previous == {}
+ - nm_add_bd_2.current.name == "ansible_test_2"
+ - nm_add_bd_2.current.vrfRef.templateName == "Template1"
+ - nm_add_bd_2.current.vrfRef.vrfName == "VRF1"
+
+- name: Add template BD 3
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_3
+ vrf:
+ name: VRF1
+ template: Template 1
+ state: present
+ register: nm_add_bd_3
+
+- name: Verify nm_add_bd_3
+ assert:
+ that:
+ - nm_add_bd_3 is changed
+ - nm_add_bd_3.previous == {}
+ - nm_add_bd_3.current.name == "ansible_test_3"
+ - nm_add_bd_3.current.vrfRef.templateName == "Template1"
+ - nm_add_bd_3.current.vrfRef.vrfName == "VRF1"
+
+- name: Add template BD 4
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_4
+ vrf:
+ name: VRF1
+ template: Template 1
+ state: present
+ register: nm_add_bd_4
+
+- name: Verify nm_add_bd_4
+ assert:
+ that:
+ - nm_add_bd_4 is changed
+ - nm_add_bd_4.previous == {}
+ - nm_add_bd_4.current.name == "ansible_test_4"
+ - nm_add_bd_4.current.vrfRef.templateName == "Template1"
+ - nm_add_bd_4.current.vrfRef.vrfName == "VRF1"
+
+- name: Add site BD (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ state: present
+ check_mode: yes
+ register: cm_add_site_bd
+
+- name: Verify cm_add_site_bd
+ assert:
+ that:
+ - cm_add_site_bd is changed
+ - cm_add_site_bd.previous == {}
+ - cm_add_site_bd.current.bdRef.bdName == "ansible_test_1"
+ - cm_add_site_bd.current.bdRef.templateName == "Template1"
+ - cm_add_site_bd.current.hostBasedRouting == false
+
+- name: Add site BD (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ state: present
+ register: nm_add_site_bd
+
+- name: Verify nm_add_site_bd
+ assert:
+ that:
+ - nm_add_site_bd is changed
+ - nm_add_site_bd.previous == {}
+ - nm_add_site_bd.current.bdRef.bdName == "ansible_test_1"
+ - nm_add_site_bd.current.bdRef.templateName == "Template1"
+ - nm_add_site_bd.current.hostBasedRouting == false
+ - cm_add_site_bd.current.bdRef.schemaId == nm_add_site_bd.current.bdRef.schemaId
+
+- name: Add site BD again (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ state: present
+ check_mode: yes
+ register: cm_add_site_bd_again
+
+- name: Add site BD again (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ state: present
+ register: nm_add_site_bd_again
+
+- name: Verify cm_add_site_bd_again and nm_add_site_bd_again
+ assert:
+ that:
+ - cm_add_site_bd_again is not changed
+ - nm_add_site_bd_again is not changed
+ - cm_add_site_bd_again.previous.bdRef.bdName == nm_add_site_bd_again.previous.bdRef.bdName == cm_add_site_bd_again.current.bdRef.bdName == nm_add_site_bd_again.current.bdRef.bdName == "ansible_test_1"
+
+- name: Change site BD (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ host_route: true
+ state: present
+ check_mode: yes
+ register: cm_change_site_bd
+
+- name: Change site BD (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ host_route: true
+ state: present
+ register: nm_change_site_bd
+
+- name: Verify cm_change_site_bd and nm_change_site_bd
+ assert:
+ that:
+ - cm_change_site_bd is changed
+ - nm_change_site_bd is changed
+ - cm_change_site_bd.previous.bdRef == cm_change_site_bd.current.bdRef
+ - nm_change_site_bd.previous.bdRef == nm_change_site_bd.current.bdRef
+ - cm_change_site_bd.previous.hostBasedRouting == false
+ - cm_change_site_bd.current.hostBasedRouting == true
+ - nm_change_site_bd.previous.hostBasedRouting == false
+ - nm_change_site_bd.current.hostBasedRouting == true
+
+- name: Add site BD with host_route (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ bd: ansible_test_2
+ host_route: true
+ state: present
+ check_mode: yes
+ register: cm_add_site_bd_with_host_route
+
+- name: Add site BD with host_route (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ bd: ansible_test_2
+ host_route: true
+ state: present
+ register: nm_add_site_bd_with_host_route
+
+- name: Verify cm_add_site_bd_with_host_route and nm_add_site_bd_with_host_route
+ assert:
+ that:
+ - cm_add_site_bd_with_host_route is changed
+ - nm_add_site_bd_with_host_route is changed
+ - cm_add_site_bd_with_host_route.previous == {}
+ - nm_add_site_bd_with_host_route.previous == {}
+ - cm_add_site_bd_with_host_route.current.hostBasedRouting == true
+ - nm_add_site_bd_with_host_route.current.hostBasedRouting == true
+
+- name: Add site BD 3 (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_3
+ host_route: true
+ state: present
+ register: nm_add_site_bd_3
+
+- name: Verify nm_add_site_bd_3
+ assert:
+ that:
+ - nm_add_site_bd_3 is changed
+ - nm_add_site_bd_3.previous == {}
+ - nm_add_site_bd_3.current.hostBasedRouting == true
+ - nm_add_site_bd_3.current.bdRef.bdName == "ansible_test_3"
+ - nm_add_site_bd_3.current.bdRef.templateName == "Template1"
+
+- name: Add site BD 4 (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_4
+ svi_mac: 00:22:23:F1:21:F9
+ state: present
+ register: nm_add_site_bd_4
+
+- name: Verify nm_add_site_bd_4
+ assert:
+ that:
+ - nm_add_site_bd_4 is changed
+ - nm_add_site_bd_4.previous == {}
+ - nm_add_site_bd_4.current.mac == "00:22:23:F1:21:F9"
+ - nm_add_site_bd_4.current.bdRef.bdName == "ansible_test_4"
+ - nm_add_site_bd_4.current.bdRef.templateName == "Template1"
+
+- name: Query a specific BD (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ bd: ansible_test_2
+ state: query
+ check_mode: yes
+ register: cm_query_bd_2
+
+- name: Query a specific BD (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ bd: ansible_test_2
+ state: query
+ register: nm_query_bd_2
+
+- name: Verify cm_query_bd_2 and nm_query_bd_2
+ assert:
+ that:
+ - cm_query_bd_2 is not changed
+ - nm_query_bd_2 is not changed
+ - cm_query_bd_2.current.bdRef.bdName == "ansible_test_2" == nm_query_bd_2.current.bdRef.bdName
+ - cm_query_bd_2.current.bdRef.schemaId == nm_query_bd_2.current.bdRef.schemaId
+ - cm_query_bd_2.current.bdRef.templateName == nm_query_bd_2.current.bdRef.templateName == "Template2"
+ - cm_query_bd_2.current.hostBasedRouting == nm_query_bd_2.current.hostBasedRouting == true
+
+- name: Query all BDs (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: query
+ check_mode: yes
+ register: cm_query_all_bd
+
+- name: Query all BDs (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: query
+ register: nm_query_all_bd
+
+- name: Verify cm_query_all_bd and cm_query_all_bd
+ assert:
+ that:
+ - cm_query_all_bd is not changed
+ - nm_query_all_bd is not changed
+ - cm_query_all_bd.current[0].bdRef.bdName == nm_query_all_bd.current[0].bdRef.bdName == "ansible_test_1"
+ - cm_query_all_bd.current[0].bdRef.schemaId == nm_query_all_bd.current[0].bdRef.schemaId
+ - cm_query_all_bd.current[0].bdRef.templateName == nm_query_all_bd.current[0].bdRef.templateName == "Template1"
+ - cm_query_all_bd.current[1].bdRef.bdName == nm_query_all_bd.current[1].bdRef.bdName == "ansible_test_3"
+ - cm_query_all_bd.current[1].bdRef.schemaId == nm_query_all_bd.current[1].bdRef.schemaId
+ - cm_query_all_bd.current[1].bdRef.templateName == nm_query_all_bd.current[1].bdRef.templateName == "Template1"
+
+- name: Remove BD 2 (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ bd: ansible_test_2
+ state: absent
+ check_mode: yes
+ register: cm_remove_site_bd_2
+
+- name: Remove BD 2 (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ bd: ansible_test_2
+ state: absent
+ register: nm_remove_site_bd_2
+
+- name: Verify cm_remove_site_bd_2 and nm_remove_site_bd_2
+ assert:
+ that:
+ - cm_remove_site_bd_2 is changed
+ - nm_remove_site_bd_2 is changed
+ - cm_remove_site_bd_2.previous.bdRef.bdName == nm_remove_site_bd_2.previous.bdRef.bdName == "ansible_test_2"
+ - cm_remove_site_bd_2.previous.bdRef.schemaId == nm_remove_site_bd_2.previous.bdRef.schemaId
+ - cm_remove_site_bd_2.previous.bdRef.templateName == nm_remove_site_bd_2.previous.bdRef.templateName == "Template2"
+ - cm_remove_site_bd_2.current == nm_remove_site_bd_2.current == {}
+
+- name: Remove BD 2 again(normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ bd: ansible_test_2
+ state: absent
+ register: nm_remove_site_bd_2_again
+
+- name: Verify nm_remove_site_bd_2_again
+ assert:
+ that:
+ - nm_remove_site_bd_2_again is not changed
+ - nm_remove_site_bd_2_again.previous == nm_remove_site_bd_2_again.current == {}
+
+- name: Query site without BD (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ state: query
+ register: nm_query_without_bd
+
+- name: Verify nm_query_without_bd
+ assert:
+ that:
+ - nm_query_without_bd is not changed
+ - nm_query_without_bd.current == []
+
+# QUERY NON-EXISTING BD
+- name: Query non-existing BD (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: non_existing_bd
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_bd
+
+- name: Query non-existing BD (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: non_existing_bd
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_bd
+
+- name: Verify cm_query_non_bd and nm_query_non_bd
+ assert:
+ that:
+ - cm_query_non_bd is not changed
+ - nm_query_non_bd is not changed
+ - cm_query_non_bd.msg == nm_query_non_bd.msg == "BD 'non_existing_bd' not found"
+
+# USE NON-EXISTING STATE
+- name: non_existing_state state (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ state: non_existing_state
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: non_existing_state state (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ state: non_existing_state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify cm_non_existing_state and nm_non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non_existing_state"
+
+# USE A NON_EXISTING_TEMPLATE
+- name: non_existing_template (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: non_existing_template
+ bd: ansible_test_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: non_existing_template (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: non_existing_template
+ bd: ansible_test_1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify cm_non_existing_template and nm_non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non_existing_template' does not exist. Existing templates{{':'}} Template1, Template2, Template3"
+
+# USE A NON_EXISTING_SCHEMA
+- name: non_existing_schema (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: non_existing_schema
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: non_existing_schema (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: non_existing_schema
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify cm_non_existing_schema and nm_non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non_existing_schema' does not exist"
+
+# USE A NON_EXISTING_SITE
+- name: non_existing_site (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: non_existing_site
+ template: Template 1
+ bd: ansible_test_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_site
+
+- name: non_existing_site (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: non_existing_site
+ template: Template 1
+ bd: ansible_test_1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_site
+
+- name: Verify cm_non_existing_site and nm_non_existing_site
+ assert:
+ that:
+ - cm_non_existing_site is not changed
+ - nm_non_existing_site is not changed
+ - cm_non_existing_site.msg == nm_non_existing_site.msg == "Site 'non_existing_site' is not a valid site name."
+
+# USE A NON_EXISTING_SITE_TEMPLATE
+- name: non_existing_site_template (check_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ bd: ansible_test_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_site_template
+
+- name: non_existing_site_template (normal_mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ bd: ansible_test_1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_site_template
+
+- name: Verify cm_non_existing_site_template and nm_non_existing_site_template
+ assert:
+ that:
+ - cm_non_existing_site_template is not changed
+ - nm_non_existing_site_template is not changed
+ - cm_non_existing_site_template.msg == nm_non_existing_site_template.msg == "Provided site-template association 'ansible_test-Template3' does not exist."
+
+# USE A TEMPLATE WITHOUT ANY SITE
+- name: Add site BD to Schema 2 Template 3 without any site associated (check mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ bd: ansible_test_1
+ state: present
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_no_site_associated
+
+- name: Add site BD to Template 3 without any site associated (normal mode)
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ bd: ansible_test_1
+ state: present
+ ignore_errors: yes
+ register: nm_no_site_associated
+
+- name: Verify cm_no_site_associated and nm_no_site_associated
+ assert:
+ that:
+ - cm_no_site_associated is not changed
+ - nm_no_site_associated is not changed
+ - cm_no_site_associated.msg == nm_no_site_associated.msg == "No site associated with template 'Template3'. Associate the site with the template using mso_schema_site." \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd_subnet/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd_subnet/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd_subnet/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd_subnet/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd_subnet/tasks/main.yml
new file mode 100644
index 00000000..fdac1c19
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_bd_subnet/tasks/main.yml
@@ -0,0 +1,592 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(101) }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+
+- name: Ensure tenant ansible_test exists
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ sites:
+ - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template1, Template2, Template4 and Template5
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{ item }}'
+ state: present
+ loop:
+ - Template1
+ - Template2
+ - Template4
+ - Template5
+
+- name: Ensure schema 2 with Template3 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template3
+ state: present
+
+- name: Add physical site to templates
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: '{{ item }}'
+ state: present
+ loop:
+ - Template1
+ - Template2
+ - Template5
+
+- name: Ensure VRF1 exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ vrf: VRF1
+ layer3_multicast: true
+ state: present
+
+- name: Add template BD to Template3
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template3
+ bd: ansible_test_3
+ vrf:
+ name: VRF1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ state: present
+ register: nm_add_bd_template_3
+
+- name: Add template BD to Template2
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template2
+ bd: ansible_test_2
+ vrf:
+ name: VRF1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ state: present
+ register: nm_add_bd_template_2
+
+- name: Add template BD to Template4
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template4
+ bd: ansible_test_4
+ vrf:
+ name: VRF1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ state: present
+ register: nm_add_bd_template_4
+
+- name: Add template BD to Template1 without disabling layer2_stretch
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ vrf:
+ name: VRF1
+ state: present
+ register: nm_add_bd
+
+- name: Add site BD
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ state: present
+ register: nm_add_site_bd
+
+- name: Add site BD subnet with layer2_stretch enabled
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ subnet: 10.1.0.1/16
+ state: present
+ ignore_errors: yes
+ register: add_site_bd_subnet_with_l2Stretch_enabled
+
+- name: Verify add_site_bd_subnet_with_l2Stretch_enabled
+ assert:
+ that:
+ - add_site_bd_subnet_with_l2Stretch_enabled.msg == "The l2Stretch of template bd should be false in order to create a site bd subnet. Set l2Stretch as false using mso_schema_template_bd"
+
+- name: Disable layer2_stretch in template BD
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ layer2_stretch: false
+ vrf:
+ name: VRF1
+ state: present
+ register: nm_add_bd
+
+- name: Add site BD subnet with layer2_stretch disabled (check_mode)
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ subnet: 10.1.0.1/16
+ state: present
+ check_mode: yes
+ register: cm_add_site_bd_subnet
+
+- name: Verify cm_add_site_bd_subnet
+ assert:
+ that:
+ - cm_add_site_bd_subnet is changed
+ - cm_add_site_bd_subnet.previous == {}
+ - cm_add_site_bd_subnet.current.ip == "10.1.0.1/16"
+ - cm_add_site_bd_subnet.current.scope == "private"
+ - cm_add_site_bd_subnet.current.description == "10.1.0.1/16"
+ - cm_add_site_bd_subnet.current.shared == False
+ - cm_add_site_bd_subnet.current.noDefaultGateway == False
+ - cm_add_site_bd_subnet.current.querier == False
+
+- name: Add site BD subnet with layer2_stretch disabled (normal_mode)
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ subnet: 10.1.0.1/16
+ state: present
+ register: nm_add_site_bd_subnet
+
+- name: Verify nm_add_site_bd_subnet
+ assert:
+ that:
+ - nm_add_site_bd_subnet is changed
+ - nm_add_site_bd_subnet.previous == {}
+ - nm_add_site_bd_subnet.current.ip == "10.1.0.1/16"
+ - nm_add_site_bd_subnet.current.scope == "private"
+ - nm_add_site_bd_subnet.current.description == "10.1.0.1/16"
+ - nm_add_site_bd_subnet.current.shared == False
+ - nm_add_site_bd_subnet.current.noDefaultGateway == False
+ - nm_add_site_bd_subnet.current.querier == False
+
+- name: Add site BD subnet again
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ subnet: 10.1.0.1/16
+ state: present
+ register: nm_add_site_bd_subnet_again
+
+- name: Verify nm_add_site_bd_subnet_again
+ assert:
+ that:
+ - nm_add_site_bd_subnet_again is not changed
+
+- name: Add another site BD subnet
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ subnet: 10.10.10.1/16
+ description: another subnet
+ scope: public
+ shared: true
+ no_default_gateway: true
+ querier: true
+ state: present
+ register: nm_add_another_site_bd_subnet
+
+- name: Verify nm_add_another_site_bd_subnet
+ assert:
+ that:
+ - nm_add_another_site_bd_subnet is changed
+ - nm_add_another_site_bd_subnet.previous == {}
+ - nm_add_another_site_bd_subnet.current.description == "another subnet"
+ - nm_add_another_site_bd_subnet.current.scope == "public"
+ - nm_add_another_site_bd_subnet.current.shared == true
+ - nm_add_another_site_bd_subnet.current.noDefaultGateway == true
+ - nm_add_another_site_bd_subnet.current.querier == true
+
+- name: Add BD ansible_test_5 to Schema1, template5
+ mso_schema_template_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template5
+ bd: ansible_test_5
+ layer2_stretch: false
+ vrf:
+ name: VRF1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ state: present
+
+- name: Add site BD5
+ mso_schema_site_bd:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template5
+ bd: ansible_test_5
+ state: present
+
+- name: Add site BD5 subnet with layer2_stretch disabled (normal_mode)
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template5
+ bd: ansible_test_5
+ subnet: 10.1.0.5/16
+ is_virtual_ip: true
+ scope: public
+ shared: true
+ no_default_gateway: true
+ querier: true
+ state: present
+ register: nm_add_site_bd_subnet5
+
+- name: Verify nm_add_site_bd_subnet5 for a version that's not 3.1
+ assert:
+ that:
+ - nm_add_site_bd_subnet5 is changed
+ - nm_add_site_bd_subnet5.previous == {}
+ - nm_add_site_bd_subnet5.current.ip == "10.1.0.5/16"
+ - nm_add_site_bd_subnet5.current.scope == "public"
+ - nm_add_site_bd_subnet5.current.description == "10.1.0.5/16"
+ - nm_add_site_bd_subnet5.current.shared == True
+ - nm_add_site_bd_subnet5.current.noDefaultGateway == True
+ - nm_add_site_bd_subnet5.current.querier == True
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify nm_add_site_bd_subnet5 for a version that's 3.1
+ assert:
+ that:
+ - nm_add_site_bd_subnet5 is changed
+ - nm_add_site_bd_subnet5.previous == {}
+ - nm_add_site_bd_subnet5.current.ip == "10.1.0.5/16"
+ - nm_add_site_bd_subnet5.current.scope == "public"
+ - nm_add_site_bd_subnet5.current.description == "10.1.0.5/16"
+ - nm_add_site_bd_subnet5.current.shared == True
+ - nm_add_site_bd_subnet5.current.noDefaultGateway == True
+ - nm_add_site_bd_subnet5.current.querier == True
+ - nm_add_site_bd_subnet5.current.virtual == True
+ when: version.current.version is version('3.1.1g', '==')
+
+- name: Query all subnets
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ state: query
+ register: query_all
+
+- name: Verify query_all
+ assert:
+ that:
+ - query_all is not changed
+ - query_all.current | length == 2
+ - query_all.current.0.ip == "10.1.0.1/16"
+ - query_all.current.1.ip == "10.10.10.1/16"
+
+- name: Query a specific site BD subnet
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ subnet: 10.1.0.1/16
+ state: query
+ register: query_subnet
+
+- name: Verify query_subnet
+ assert:
+ that:
+ - query_subnet is not changed
+ - query_subnet.current.ip == "10.1.0.1/16"
+
+- name: Query a specific site BD5 subnet
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template5
+ bd: ansible_test_5
+ subnet: 10.1.0.5/16
+ state: query
+ register: query_subnet5
+
+- name: Verify query_subnet5 for no 3.1 version
+ assert:
+ that:
+ - query_subnet5 is not changed
+ - query_subnet5.current.ip == "10.1.0.5/16"
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify query_subnet5 for 3.1 version
+ assert:
+ that:
+ - query_subnet5 is not changed
+ - query_subnet5.current.ip == "10.1.0.5/16"
+ - query_subnet5.current.virtual == true
+ when: version.current.version is version('3.1.1g', '==')
+
+- name: Remove a site BD subnet
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ subnet: 10.1.0.1/16
+ state: absent
+ register: rm_subnet
+
+- name: Verify rm_subnet
+ assert:
+ that:
+ - rm_subnet is changed
+ - rm_subnet.current == {}
+ - rm_subnet.previous.ip == "10.1.0.1/16"
+
+- name: Remove the site BD subnet again
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ subnet: 10.1.0.1/16
+ state: absent
+ register: rm_subnet_again
+
+- name: Verify rm_subnet_again
+ assert:
+ that:
+ - rm_subnet_again is not changed
+ - rm_subnet_again.previous == rm_subnet_again.current == {}
+
+- name: Remove a site BD 5 subnet
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template5
+ bd: ansible_test_5
+ subnet: 10.1.0.5/16
+ state: absent
+ register: rm_subnet5
+
+- name: Verify rm_subnet5
+ assert:
+ that:
+ - rm_subnet5 is changed
+ - rm_subnet5.current == {}
+ - rm_subnet5.previous.ip == "10.1.0.5/16"
+
+# Use non_existing_schema
+- name: Query subnet by non_existing_schema
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: non_existing_schema
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ subnet: 10.1.0.1/16
+ state: query
+ ignore_errors: yes
+ register: non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - non_existing_schema.msg == "Provided schema 'non_existing_schema' does not exist"
+
+# Use non_existing_template
+- name: Query subnet by non_existing_template
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: non_existing_template
+ bd: ansible_test_1
+ subnet: 10.1.0.1/16
+ state: query
+ ignore_errors: yes
+ register: non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - non_existing_template.msg == "Provided template 'non_existing_template' does not exist. Existing templates{{':'}} Template1, Template2, Template4, Template5"
+
+# Use non_existing_template_bd
+- name: Query subnet by non_existing_template_bd
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: non_existing_template_bd
+ subnet: 10.1.0.1/16
+ state: query
+ ignore_errors: yes
+ register: non_existing_template_bd
+
+- name: Verify non_existing_template_bd
+ assert:
+ that:
+ - non_existing_template_bd.msg == "Provided BD 'non_existing_template_bd' does not exist. Existing template BDs{{':'}} ansible_test_1"
+
+# Use template without site associated
+- name: Query with no site associated to template
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template3
+ bd: ansible_test_3
+ subnet: 10.1.0.1/16
+ state: query
+ ignore_errors: yes
+ register: template_without_sites
+
+- name: Verify template_without_sites
+ assert:
+ that:
+ - template_without_sites.msg == "No site associated with template 'Template3'. Associate the site with the template using mso_schema_site."
+
+# Use non_existing_subnet
+- name: Query with non_existing_site
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ subnet: non_existing_subnet
+ state: query
+ ignore_errors: yes
+ register: non_existing_subnet
+
+- name: Verify non_existing_subnet
+ assert:
+ that:
+ - non_existing_subnet.msg == "Subnet IP 'non_existing_subnet' not found"
+
+# Use non_existing_site_template_association
+- name: Query with non_existing_site_template_association
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template4
+ bd: ansible_test_4
+ subnet: 10.1.0.1/16
+ state: query
+ ignore_errors: yes
+ register: non_existing_site_template_association
+
+- name: Verify non_existing_site_template_association
+ assert:
+ that:
+ - non_existing_site_template_association.msg == "Provided site/template 'ansible_test-Template4' does not exist."
+
+# Use BD at template level but not at site level
+- name: Query with non_existing_site_bd
+ mso_schema_site_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template2
+ bd: ansible_test_2
+ subnet: 10.1.0.1/16
+ state: query
+ ignore_errors: yes
+ register: non_existing_site_bd
+
+- name: Verify non_existing_site_bd
+ assert:
+ that:
+ - non_existing_site_bd.msg == "Provided BD 'ansible_test_2' does not exist. Existing site BDs{{':'}} "
+
+- name: Remove schemas for next ci test case
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}' \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_external_epg_selector/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_external_epg_selector/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_external_epg_selector/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_external_epg_selector/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_external_epg_selector/tasks/main.yml
new file mode 100644
index 00000000..84d9a6dd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_external_epg_selector/tasks/main.yml
@@ -0,0 +1,523 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+- name: Ensure azure site exists
+ mso_site:
+ <<: *mso_info
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ azure_apic_username }}'
+ apic_password: '{{ azure_apic_password }}'
+ apic_site_id: '{{ azure_site_id }}'
+ urls:
+ - https://{{ azure_apic_hostname }}
+ state: present
+
+- name: Ensure aws site exists
+ mso_site:
+ <<: *mso_info
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ aws_apic_username }}'
+ apic_password: '{{ aws_apic_password }}'
+ apic_site_id: '{{ aws_site_id }}'
+ urls:
+ - https://{{ aws_apic_hostname }}
+ state: present
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ sites:
+ - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Associate aws site with ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ cloud_account: "000000000000"
+ aws_trusted: false
+ aws_access_key: "1"
+ secret_key: "0"
+ state: present
+
+- name: Associate azure site with ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ cloud_account: uni/tn-ansible_test/act-[100]-vendor-azure
+ state: present
+
+- name: Ensure schema 1 with Template 1 and 2 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{ item }}'
+ state: present
+ loop:
+ - Template 1
+ - Template 2
+
+- name: Ensure schema 2 with Template 3 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Ensure VRF1 exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF1
+ state: present
+
+- name: Ensure Template 1 with AP1 exists
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: AP1
+ state: present
+
+- name: Ensure L3Out Exists
+ mso_schema_template_l3out:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf:
+ name: VRF1
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ l3out: L3out1
+ state: present
+
+- name: Ensure External EPG1 exists
+ mso_schema_template_externalepg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ externalepg: extEPG1
+ vrf:
+ name: VRF1
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ l3out:
+ name: L3out1
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ anp:
+ name: AP1
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ state: present
+
+- name: Ensure External EPG2 exists
+ mso_schema_template_externalepg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ externalepg: extEPG2
+ vrf:
+ name: VRF1
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ l3out:
+ name: L3out1
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ anp:
+ name: AP1
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ state: present
+
+- name: Add Azure site to a schema
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ when: version.current.version[0] | int < 3
+
+- name: Add AWS site to a schema
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ when: version.current.version[0] | int < 3
+
+- name: Add a new CIDR in VRF1 at site level
+ mso_schema_site_vrf_region_cidr: &mso_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: '{{ item }}'
+ vrf: VRF1
+ region: us-west-1
+ cidr: 10.0.0.0/16
+ primary: true
+ state: present
+ loop:
+ - 'aws_{{ mso_site | default("ansible_test") }}'
+ - 'azure_{{ mso_site | default("ansible_test") }}'
+
+# ADD SELECTORS
+- name: Add a selector to Azure in check mode
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ external_epg: extEPG1
+ selector: e1
+ expressions:
+ - type: ip_address
+ operator: equals
+ value: 10.0.0.0
+ state: present
+ check_mode: yes
+ register: cm_azure_e1
+
+- name: Verify cm_azure_e1
+ assert:
+ that:
+ - cm_azure_e1 is changed
+ - cm_azure_e1.previous == {}
+ - cm_azure_e1.current.subnets[0].ip == '10.0.0.0'
+ - cm_azure_e1.current.subnets[0].name == 'e1'
+
+- name: Add a selector to Azure in normal mode
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ external_epg: extEPG1
+ selector: e1
+ expressions:
+ - type: ip_address
+ operator: equals
+ value: 10.0.0.0
+ state: present
+ register: nm_azure_e1
+
+- name: Verify nm_azure_e1
+ assert:
+ that:
+ - nm_azure_e1 is changed
+ - nm_azure_e1.previous == {}
+ - nm_azure_e1.current.subnets[0].ip == '10.0.0.0'
+ - nm_azure_e1.current.subnets[0].name == 'e1'
+
+- name: Add a selector to AWS in normal mode
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ external_epg: extEPG2
+ selector: e2
+ expressions:
+ - type: ip_address
+ operator: equals
+ value: 10.1.1.1
+ state: present
+ register: nm_aws_e2
+
+- name: Verify nm_aws_e2
+ assert:
+ that:
+ - nm_aws_e2 is changed
+ - nm_aws_e2.previous == {}
+ - nm_aws_e2.current.subnets[0].ip == '10.1.1.1'
+ - nm_aws_e2.current.subnets[0].name == 'e2'
+
+- name: Add a selector to AWS in normal mode again
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ external_epg: extEPG2
+ selector: e2
+ expressions:
+ - type: ip_address
+ operator: equals
+ value: 10.1.1.1
+ state: present
+ register: nm_aws_e1_again
+
+- name: Verify nm_aws_e1_again
+ assert:
+ that:
+ - nm_aws_e1_again is not changed
+
+- name: Add a selector to AWS in normal mode again with no expressions
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ external_epg: extEPG2
+ selector: e2
+ state: present
+ ignore_errors: yes
+ register: nm_aws_e1_again_noexp
+
+- name: Verify nm_aws_e1_again_noexp
+ assert:
+ that:
+ - nm_aws_e1_again_noexp is not changed
+ - nm_aws_e1_again_noexp.msg == "Missing expressions in selector"
+
+# QUERY A SELECTOR
+- name: Query a selector of Azure
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ external_epg: extEPG1
+ selector: e1
+ state: query
+ register: query_azure_e1
+
+- name: Verify query_azure_e1
+ assert:
+ that:
+ - query_azure_e1 is not changed
+
+# QUERY ALL
+- name: Query all selectors of Azure
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ external_epg: extEPG1
+ state: query
+ register: query_all
+
+- name: Verify query_all
+ assert:
+ that:
+ - query_all is not changed
+
+# REMOVE A SELECTOR
+- name: Remove a selector of Azure
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ external_epg: extEPG1
+ selector: e1
+ state: absent
+ register: remove_azure_e1
+
+- name: Verify remove_azure_e1
+ assert:
+ that:
+ - remove_azure_e1 is changed
+
+- name: Remove a selector of Azure again
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ external_epg: extEPG1
+ selector: e1
+ state: absent
+ ignore_errors: yes
+ register: remove_azure_e1_again
+
+- name: Verify remove_azure_e1_again
+ assert:
+ that:
+ - remove_azure_e1_again is not changed
+
+# QUERY REMOVED SELECTOR
+- name: Query a removed selector of Azure
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ external_epg: extEPG1
+ selector: e1
+ state: query
+ ignore_errors: yes
+ register: query_removed_azure_e1
+
+- name: Verify query_removed_azure_e1
+ assert:
+ that:
+ - query_removed_azure_e1 is not changed
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for selector (check_mode)
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: non_existing_schema
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG2
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema for selector (normal_mode)
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: non_existing_schema
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG2
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non_existing_schema' does not exist"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for selector (check_mode)
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: non_existing_template
+ external_epg: extEPG2
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template for selector (normal_mode)
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ template: non_existing_template
+ external_epg: extEPG2
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non_existing_template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+# USE A NON-EXISTING SITE
+- name: Non-existing site for static port (check_mode)
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ external_epg: extEPG3
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_site
+
+- name: Non-existing site for static port (normal_mode)
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ external_epg: extEPG3
+ ignore_errors: yes
+ register: nm_non_existing_site
+
+- name: Verify non_existing_site
+ assert:
+ that:
+ - cm_non_existing_site is not changed
+ - nm_non_existing_site is not changed
+ - cm_non_existing_site == nm_non_existing_site
+ - cm_non_existing_site.msg is match("Provided site/siteId/template 'azure_ansible_test/[0-9a-zA-Z]*/Template2' does not exist. Existing siteIds/templates{{':'}} [0-9a-zA-Z]*/Template1")
+ - nm_non_existing_site.msg is match("Provided site/siteId/template 'azure_ansible_test/[0-9a-zA-Z]*/Template2' does not exist. Existing siteIds/templates{{':'}} [0-9a-zA-Z]*/Template1")
+
+# USE A TEMPLATE WITHOUT ANY SITE
+- name: Add site external EPG selector to Schema 2 Template 3 without any site associated (check mode)
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ external_epg: extEPG3
+ ignore_errors: yes
+ check_mode: yes
+ register: cm_no_site_associated
+
+- name: Add site external EPG selector to Template 3 without any site associated (normal mode)
+ mso_schema_site_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ template: Template 3
+ external_epg: extEPG3
+ ignore_errors: yes
+ register: nm_no_site_associated
+
+- name: Verify cm_no_site_associated and nm_no_site_associated
+ assert:
+ that:
+ - cm_no_site_associated is not changed
+ - nm_no_site_associated is not changed
+ - cm_no_site_associated.msg == nm_no_site_associated.msg == "No site associated with template 'Template3'. Associate the site with the template using mso_schema_site." \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region/tasks/main.yml
new file mode 100644
index 00000000..68507069
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region/tasks/main.yml
@@ -0,0 +1,433 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ sites: "['aws_{{ mso_site | default(\"ansible_test\") }}',
+ 'azure_{{ mso_site | default(\"ansible_test\") }}',
+ '{{ mso_site | default(\"ansible_test\") }}']"
+
+- name: Ensure aws site exists
+ mso_site:
+ <<: *mso_info
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ aws_apic_username }}'
+ apic_password: '{{ aws_apic_password }}'
+ apic_site_id: '{{ aws_site_id | default(102) }}'
+ urls:
+ - https://{{ aws_apic_hostname }}
+ state: present
+
+- name: Ensure azure site exists
+ mso_site:
+ <<: *mso_info
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ azure_apic_username }}'
+ apic_password: '{{ azure_apic_password }}'
+ apic_site_id: '{{ azure_site_id | default(103) }}'
+ urls:
+ - https://{{ azure_apic_hostname }}
+ state: present
+
+- name: Remove Schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ state: present
+
+- name: Ensure AWS site is present under tenant ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ cloud_account: '000000000000'
+ aws_access_key: 1
+ secret_key: 0
+ state: present
+
+- name: Ensure Azure site is present under tenant ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ state: present
+
+- name: Ensure schema 1 with Template 1 and 2 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{ item }}'
+ state: present
+ loop:
+ - Template 1
+ - Template 2
+
+- name: Ensure schema 2 with Template 3 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Ensure VRF1 exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF1
+ state: present
+
+- name: Add region and cidr in VRF1 at AWS site level
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ cidr: 10.0.0.0/16
+ primary: true
+ state: present
+ register: aws_add_region_cidr
+
+- name: Add region and cidr in VRF1 at Azure site level
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ cidr: 10.0.0.0/16
+ primary: true
+ state: present
+ register: azure_add_region_cidr
+
+- name: Add another region and cidr in VRF1 at AWS site level
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-east-1
+ cidr: 10.10.0.0/16
+ primary: true
+ state: present
+ register: aws_add_another_region_cidr
+
+- name: Add another region and cidr in VRF1 at Azure site level
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-east-1
+ cidr: 10.10.0.0/16
+ primary: true
+ state: present
+ register: azure_add_another_region_cidr
+
+- name: Query all aws regions
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ state: query
+ register: aws_query_all
+
+- name: Query all azure regions
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ state: query
+ register: azure_query_all
+
+- name: Query specific aws region
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ register: aws_query_region
+
+- name: Query specific azure region
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ register: azure_query_region
+
+- name: Verify query
+ assert:
+ that:
+ - aws_query_all is not changed
+ - azure_query_all is not changed
+ - aws_query_region is not changed
+ - azure_query_region is not changed
+ - aws_query_all.current | length == 2
+ - azure_query_all.current | length == 2
+ - aws_query_region.current.name == "us-west-1"
+ - aws_query_region.current.cidrs.0.ip == "10.0.0.0/16"
+ - aws_query_region.current.cidrs.0.primary == true
+ - aws_query_region.current.cidrs.0.subnets == []
+ - azure_query_region.current.name == "us-west-1"
+ - azure_query_region.current.cidrs.0.ip == "10.0.0.0/16"
+ - azure_query_region.current.cidrs.0.primary == true
+ - azure_query_region.current.cidrs.0.subnets == []
+
+- name: Remove aws VRF region (check mode)
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: absent
+ check_mode: yes
+ register: cm_rm_aws_region
+
+- name: Remove aws VRF region (normal mode)
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: absent
+ register: nm_rm_aws_region
+
+- name: Remove azure VRF region (check mode)
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: absent
+ check_mode: yes
+ register: cm_rm_azure_region
+
+- name: Remove azure VRF region (normal mode)
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: absent
+ register: nm_rm_azure_region
+
+- name: Verify deletion
+ assert:
+ that:
+ - cm_rm_aws_region is changed
+ - nm_rm_aws_region is changed
+ - cm_rm_azure_region is changed
+ - nm_rm_azure_region is changed
+ - cm_rm_aws_region == nm_rm_aws_region
+ - cm_rm_azure_region == nm_rm_azure_region
+ - cm_rm_aws_region.current == nm_rm_aws_region.current == {}
+ - cm_rm_azure_region.current == nm_rm_azure_region.current == {}
+ - cm_rm_aws_region.previous.name == nm_rm_aws_region.previous.name == "us-west-1"
+ - cm_rm_azure_region.previous.name == nm_rm_azure_region.previous.name == "us-west-1"
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+- name: Remove VPN Gateway Router at Region for AWS (check mode)
+ cisco.mso.mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-east-1
+ vpn_gateway_router: false
+ state: present
+ check_mode: yes
+ when: version.current.version is version('3.0.0a', '>=')
+ register: cm_rm_vpn_gateway_router_aws
+
+- name: Remove VPN Gateway Router at Region for AWS (normal mode)
+ cisco.mso.mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-east-1
+ vpn_gateway_router: false
+ state: present
+ when: version.current.version is version('3.0.0a', '>=')
+ register: nm_rm_vpn_gateway_router_aws
+
+- name: Remove VPN Gateway Router at Region for Azure (check mode)
+ cisco.mso.mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-east-1
+ vpn_gateway_router: false
+ state: present
+ check_mode: yes
+ when: version.current.version is version('3.0.0a', '>=')
+ register: cm_rm_vpn_gateway_router_azure
+
+- name: Remove VPN Gateway Router at Region for Azure (normal mode)
+ cisco.mso.mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-east-1
+ vpn_gateway_router: false
+ state: present
+ when: version.current.version is version('3.0.0a', '>=')
+ register: nm_rm_vpn_gateway_router_azure
+
+- name: Verify removing VPN Gateway Router
+ assert:
+ that:
+ - cm_rm_vpn_gateway_router_aws is changed
+ - nm_rm_vpn_gateway_router_aws is changed
+ - cm_rm_vpn_gateway_router_azure is changed
+ - nm_rm_vpn_gateway_router_azure is changed
+ - cm_rm_vpn_gateway_router_aws.previous.isVpnGatewayRouter == nm_rm_vpn_gateway_router_aws.previous.isVpnGatewayRouter == true
+ - cm_rm_vpn_gateway_router_azure.previous.isVpnGatewayRouter == nm_rm_vpn_gateway_router_azure.previous.isVpnGatewayRouter == true
+ - cm_rm_vpn_gateway_router_aws.current.isVpnGatewayRouter == nm_rm_vpn_gateway_router_aws.current.isVpnGatewayRouter == false
+ - cm_rm_vpn_gateway_router_azure.current.isVpnGatewayRouter == nm_rm_vpn_gateway_router_azure.current.isVpnGatewayRouter == false
+ when: version.current.version is version('3.0.0a', '>=')
+
+- name: Use non_existing schema
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: non_existing
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ register: non_existing_schema
+ ignore_errors: yes
+
+- name: Use non_existing site
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: non_existing
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ register: non_existing_site
+ ignore_errors: yes
+
+- name: Use non_existing site/template association
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ register: non_existing_site_template
+ ignore_errors: yes
+
+- name: Use non_existing VRF
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: non_existing
+ region: us-west-1
+ state: query
+ register: non_existing_vrf
+ ignore_errors: yes
+
+- name: Use non_existing region
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: non_existing
+ state: query
+ register: non_existing_region
+ ignore_errors: yes
+
+- name: Verify non_existing
+ assert:
+ that:
+ - non_existing_schema.msg == "Provided schema 'non_existing' does not exist"
+ - non_existing_site.msg == "Site 'non_existing' is not a valid site name."
+ - non_existing_site_template.msg == "Provided site-template association 'aws_ansible_test-Template2' does not exist."
+ - non_existing_vrf.msg == "Provided vrf 'non_existing' does not exist. Existing vrfs{{':'}} VRF1"
+ - non_existing_region.msg == "Region 'non_existing' not found"
+
+- name: Delete non_existing region
+ mso_schema_site_vrf_region:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: non_existing
+ state: absent
+ register: rm_non_existing_region
+
+- name: Verify rm_non_existing_region
+ assert:
+ that:
+ - rm_non_existing_region is not changed
+ - rm_non_existing_region.previous == rm_non_existing_region.current == {}
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr/tasks/main.yml
new file mode 100644
index 00000000..e6497bd8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr/tasks/main.yml
@@ -0,0 +1,710 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com> (based on mso_schema_anp_epg_domain)
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ sites: "['aws_{{ mso_site | default(\"ansible_test\") }}',
+ 'azure_{{ mso_site | default(\"ansible_test\") }}',
+ '{{ mso_site | default(\"ansible_test\") }}']"
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(101) }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ aws_apic_username }}'
+ apic_password: '{{ aws_apic_password }}'
+ apic_site_id: '{{ aws_site_id | default(102) }}'
+ urls:
+ - https://{{ aws_apic_hostname }}
+ state: present
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ azure_apic_username }}'
+ apic_password: '{{ azure_apic_password }}'
+ apic_site_id: '{{ azure_site_id | default(103) }}'
+ urls:
+ - https://{{ azure_apic_hostname }}
+ state: present
+
+- name: Remove Schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ sites:
+ - '{{ mso_site | default("ansible_test") }}'
+ users:
+ - '{{ mso_username }}'
+ state: present
+
+- name: Ensure AWS site is present under tenant ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ cloud_account: '000000000000'
+ aws_access_key: 1
+ secret_key: 0
+ state: present
+
+- name: Ensure Azure site is present under tenant ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ state: present
+
+- name: Ensure schema 1 with Template 1 and 2 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{ item }}'
+ state: present
+ loop:
+ - Template 1
+ - Template 2
+
+- name: Ensure schema 2 with Template 3 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Add physical site to Template 1
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: present
+
+- name: Ensure VRF1 exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ item.schema }}'
+ template: '{{ item.template }}'
+ vrf: VRF1
+ state: present
+ loop:
+ - { schema: '{{ mso_schema | default("ansible_test") }}', template: 'Template 1' }
+ - { schema: '{{ mso_schema | default("ansible_test") }}', template: 'Template 2' }
+ - { schema: '{{ mso_schema | default("ansible_test") }}_2', template: 'Template 3' }
+
+- name: Ensure VRF2 exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF2
+ state: present
+ when: version.current.version[0] | int < 3
+
+- name: Ensure VRF1 exists at Site level for the physical site
+ mso_schema_site_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: '{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ state: present
+
+# ADD SUBNET
+- name: Add a new CIDR in VRF1 at AWS site level (check mode)
+ mso_schema_site_vrf_region_cidr: &mso_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ cidr: 10.0.0.0/16
+ primary: true
+ state: present
+ check_mode: yes
+ register: cm_add_cidr
+
+- name: Verify cm_add_cidr
+ assert:
+ that:
+ - cm_add_cidr is changed
+ - cm_add_cidr.previous == {}
+ - cm_add_cidr.current.ip == '10.0.0.0/16'
+ - cm_add_cidr.current.primary == true
+
+- name: Add a new CIDR in VRF1 at AWS site level (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present
+ register: nm_add_cidr
+
+- name: Verify nm_add_cidr
+ assert:
+ that:
+ - nm_add_cidr is changed
+ - nm_add_cidr.previous == {}
+ - nm_add_cidr.current.ip == '10.0.0.0/16'
+ - nm_add_cidr.current.primary == true
+
+- name: Add same CIDR in VRF1 at AWS site level (check mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present
+ register: cm_add_cidr_again
+
+- name: Verify cm_add_cidr_again
+ assert:
+ that:
+ - cm_add_cidr_again is not changed
+ - cm_add_cidr_again.current.ip == cm_add_cidr_again.previous.ip == '10.0.0.0/16'
+ - cm_add_cidr_again.current.primary == cm_add_cidr_again.previous.primary == true
+
+- name: Add same CIDR in VRF1 at AWS site level (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present
+ register: nm_add_cidr_again
+
+- name: Verify nm_add_cidr_again
+ assert:
+ that:
+ - nm_add_cidr_again is not changed
+ - nm_add_cidr_again.current.ip == nm_add_cidr_again.previous.ip == '10.0.0.0/16'
+ - nm_add_cidr_again.current.primary == nm_add_cidr_again.previous.primary == true
+
+- name: Add a CIDR in VRF1 at Azure site level (check mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ region: westus
+ cidr: 10.1.0.0/16
+ primary: true
+ check_mode: yes
+ register: cm_add_cidr_2
+
+- name: Verify cm_add_cidr_2
+ assert:
+ that:
+ - cm_add_cidr_2 is changed
+ - cm_add_cidr_2.previous == {}
+ - cm_add_cidr_2.current.ip == '10.1.0.0/16'
+ - cm_add_cidr_2.current.primary == true
+
+- name: Add a CIDR in VRF1 at Azure site level (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ region: westus
+ cidr: 10.1.0.0/16
+ primary: true
+ register: nm_add_cidr_2
+
+- name: Verify nm_add_cidr_2
+ assert:
+ that:
+ - nm_add_cidr_2 is changed
+ - nm_add_cidr_2.previous == {}
+ - nm_add_cidr_2.current.ip == '10.1.0.0/16'
+ - nm_add_cidr_2.current.primary == true
+
+- name: Add a second CIDR in VRF1 at AWS site level (check mode)
+ mso_schema_site_vrf_region_cidr: &mso_present_2
+ <<: *mso_present
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ region: us-west-1
+ cidr: 10.2.0.0/16
+ primary: false
+ check_mode: yes
+ register: cm_add_cidr_3
+
+- name: Verify cm_add_cidr_3
+ assert:
+ that:
+ - cm_add_cidr_3 is changed
+ - cm_add_cidr_3.previous == {}
+ - cm_add_cidr_3.current.ip == '10.2.0.0/16'
+ - cm_add_cidr_3.current.primary == false
+
+- name: Add a second CIDR in VRF1 at AWS site level (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present_2
+ register: nm_add_cidr_3
+
+- name: Verify nm_add_cidr_3
+ assert:
+ that:
+ - nm_add_cidr_3 is changed
+ - nm_add_cidr_3.previous == {}
+ - nm_add_cidr_3.current.ip == '10.2.0.0/16'
+ - nm_add_cidr_3.current.primary == false
+
+- name: Add a second CIDR in VRF1 at Azure site level (check mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ region: westus
+ cidr: 10.3.0.0/16
+ primary: false
+ check_mode: yes
+ register: cm_add_cidr_4
+
+- name: Verify cm_add_cidr_4
+ assert:
+ that:
+ - cm_add_cidr_4 is changed
+ - cm_add_cidr_4.previous == {}
+ - cm_add_cidr_4.current.ip == '10.3.0.0/16'
+ - cm_add_cidr_4.current.primary == false
+
+- name: Add a second CIDR in VRF1 at Azure site level (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ region: westus
+ cidr: 10.3.0.0/16
+ primary: false
+ register: nm_add_cidr_4
+
+- name: Verify nm_add_cidr_4
+ assert:
+ that:
+ - nm_add_cidr_4 is changed
+ - nm_add_cidr_4.previous == {}
+ - nm_add_cidr_4.current.ip == '10.3.0.0/16'
+ - nm_add_cidr_4.current.primary == false
+
+# QUERY CIDR
+- name: Query CIDR in VRF1 at AWS site level (check mode)
+ mso_schema_site_vrf_region_cidr: &mso_query
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ cidr: 10.0.0.0/16
+ state: query
+ check_mode: yes
+ register: cm_query_cidr
+
+- name: Verify cm_query_cidr
+ assert:
+ that:
+ - cm_query_cidr is not changed
+ - cm_query_cidr.current.ip == '10.0.0.0/16'
+ - cm_query_cidr.current.primary == true
+
+- name: Query CIDR in VRF1 at AWS site level (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ register: nm_query_cidr
+
+- name: Query CIDR in VRF1 at Azure site level (check mode)
+ mso_schema_site_vrf_region_cidr: &mso_query_2
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: westus
+ cidr: 10.1.0.0/16
+ state: query
+ check_mode: yes
+ register: cm_query_cidr_2
+
+- name: Verify cm_query_cidr_2
+ assert:
+ that:
+ - cm_query_cidr_2 is not changed
+ - cm_query_cidr_2.current.ip == '10.1.0.0/16'
+ - cm_query_cidr_2.current.primary == true
+
+- name: Query CIDR in VRF1 at Azure site level (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query_2
+ register: nm_query_cidr_2
+
+- name: Verify nm_query_cidr_2
+ assert:
+ that:
+ - nm_query_cidr_2 is not changed
+ - nm_query_cidr_2.current.ip == '10.1.0.0/16'
+ - nm_query_cidr_2.current.primary == true
+
+# QUERY ALL CIDR
+- name: Query all CIDR in VRF1 at AWS site level (check mode)
+ mso_schema_site_vrf_region_cidr: &mso_query_all
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ check_mode: yes
+ register: cm_query_cidr_all_aws
+
+- name: Query CIDR in VRF1 at Azure site level (check mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query_all
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ region: westus
+ state: query
+ check_mode: yes
+ register: cm_query_cidr_all_azure
+
+- name: Verify cm_query_cidr_all_aws and cm_query_cidr_all_azure
+ assert:
+ that:
+ - cm_query_cidr_all_aws is not changed
+ - cm_query_cidr_all_aws.current[0].ip == '10.0.0.0/16'
+ - cm_query_cidr_all_aws.current[0].primary == true
+ - cm_query_cidr_all_aws.current[1].ip == '10.2.0.0/16'
+ - cm_query_cidr_all_aws.current[1].primary == false
+ - cm_query_cidr_all_azure is not changed
+ - cm_query_cidr_all_azure.current[0].ip == '10.1.0.0/16'
+ - cm_query_cidr_all_azure.current[0].primary == true
+ - cm_query_cidr_all_azure.current[1].ip == '10.3.0.0/16'
+ - cm_query_cidr_all_azure.current[1].primary == false
+
+- name: Query CIDR in VRF1 at AWS site level (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query_all
+ register: nm_query_cidr_all_aws
+
+- name: Query CIDR in VRF1 at Azure site level (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query_all
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ region: westus
+ register: nm_query_cidr_all_azure
+
+- name: Verify nm_query_cidr_all_aws and nm_query_cidr_all_azure
+ assert:
+ that:
+ - nm_query_cidr_all_aws is not changed
+ - nm_query_cidr_all_aws.current[0].ip == '10.0.0.0/16'
+ - nm_query_cidr_all_aws.current[0].primary == true
+ - nm_query_cidr_all_aws.current[1].ip == '10.2.0.0/16'
+ - nm_query_cidr_all_aws.current[1].primary == false
+ - nm_query_cidr_all_azure is not changed
+ - nm_query_cidr_all_azure.current[0].ip == '10.1.0.0/16'
+ - nm_query_cidr_all_azure.current[0].primary == true
+ - nm_query_cidr_all_azure.current[1].ip == '10.3.0.0/16'
+ - nm_query_cidr_all_azure.current[1].primary == false
+
+- name: Query CIDR in VRF2 (not present a Site level) for AWS Site (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query_all
+ vrf: VRF2
+ ignore_errors: yes
+ register: nm_query_cidr_all_aws_2
+
+- name: Query CIDR in VRF1 (with VRF present a Site level) for Physical Site (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query_all
+ site: '{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ ignore_errors: yes
+ register: nm_query_cidr_all_aws_3
+
+- name: Verify nm_query_cidr_all_aws_2 and nm_query_cidr_all_aws_3
+ assert:
+ that:
+ - nm_query_cidr_all_aws_2.msg == "Provided vrf 'VRF2' does not exist at site level."
+ - nm_query_cidr_all_aws_3.msg == "Provided region 'us-west-1' does not exist. Existing regions{{':'}} "
+ when: version.current.version[0] | int < 3
+
+# REMOVE CIDR
+- name: Remove CIDR (check_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present_2
+ state: absent
+ check_mode: yes
+ register: cm_remove_cidr
+
+- name: Verify cm_remove_cidr
+ assert:
+ that:
+ - cm_remove_cidr is changed
+ - cm_remove_cidr.current == {}
+
+- name: Remove CIDR (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present_2
+ state: absent
+ register: nm_remove_cidr
+
+- name: Verify nm_remove_cidr
+ assert:
+ that:
+ - nm_remove_cidr is changed
+ - nm_remove_cidr.current == {}
+
+- name: Remove CIDR again (check_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present_2
+ state: absent
+ check_mode: yes
+ register: cm_remove_cidr_again
+
+- name: Verify cm_remove_cidr_again
+ assert:
+ that:
+ - cm_remove_cidr_again is not changed
+ - cm_remove_cidr_again.current == {}
+
+- name: Remove CIDR again (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present_2
+ state: absent
+ register: nm_remove_cidr_again
+
+- name: Verify nm_remove_cidr_again
+ assert:
+ that:
+ - nm_remove_cidr_again is not changed
+ - nm_remove_cidr_again.current == {}
+
+# QUERY NON-EXISTING CIDR
+- name: Query non-existing CIDR (check_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ cidr: non_existing_cidr
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_cidr
+
+- name: Query non-existing CIDR (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ cidr: non_existing_cidr
+ ignore_errors: yes
+ register: nm_query_non_cidr
+
+- name: Verify query_non_cidr
+ assert:
+ that:
+ - cm_query_non_cidr is not changed
+ - nm_query_non_cidr is not changed
+ - cm_query_non_cidr == nm_query_non_cidr
+ - cm_query_non_cidr.msg == nm_query_non_cidr.msg == "CIDR IP 'non_existing_cidr' not found"
+
+# QUERY NON-EXISTING region
+- name: Query non-existing region (check_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ region: non_existing_region
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_region
+
+- name: Query non-existing region (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ region: non_existing_region
+ ignore_errors: yes
+ register: nm_query_non_region
+
+- name: Verify query_non_region
+ assert:
+ that:
+ - cm_query_non_region is not changed
+ - nm_query_non_region is not changed
+ - cm_query_non_region == nm_query_non_region
+ - cm_query_non_region.msg == nm_query_non_region.msg == "Provided region 'non_existing_region' does not exist. Existing regions{{':'}} us-west-1"
+
+# QUERY NON-EXISTING VRF
+- name: Query non-existing VRF (check_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ vrf: non_existing_vrf
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_vrf
+
+- name: Query non-existing VRF (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ vrf: non_existing_vrf
+ ignore_errors: yes
+ register: nm_query_non_vrf
+
+- name: Verify query_non_vrf
+ assert:
+ that:
+ - cm_query_non_vrf is not changed
+ - nm_query_non_vrf is not changed
+ - cm_query_non_vrf == nm_query_non_vrf
+
+- name: Verify query_non_vrf (version < 3.0)
+ assert:
+ that:
+ - cm_query_non_vrf.msg == nm_query_non_vrf.msg == "Provided vrf 'non_existing_vrf' does not exist. Existing vrfs{{':'}} VRF1, VRF2"
+ when: version.current.version[0] | int < 3
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state for site cidr (check_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ state: non-existing-state
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: Non-existing state for site cidr (normal_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state == nm_non_existing_state
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non-existing-state"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for site cidr (check_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ schema: non-existing-schema
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema for site cidr (normal_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ schema: non-existing-schema
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non-existing-schema' does not exist"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for site cidr (check_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ template: non-existing-template
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template for site cidr (normal_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ template: non-existing-template
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+# USE A NON-ASSOCIATED TEMPLATE
+- name: Non-associated template for site cidr (check_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ template: Template 2
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_associated_template
+
+- name: Non-associated template for site cidr (normal_mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_query
+ template: Template 2
+ ignore_errors: yes
+ register: nm_non_associated_template
+
+- name: Verify non_associated_template
+ assert:
+ that:
+ - cm_non_associated_template is not changed
+ - nm_non_associated_template is not changed
+ - cm_non_associated_template == nm_non_associated_template
+ - cm_non_associated_template.msg == "Provided site-template association 'aws_{{ mso_site | default("ansible_test") }}-Template2' does not exist."
+ - nm_non_associated_template.msg == "Provided site-template association 'aws_{{ mso_site | default("ansible_test") }}-Template2' does not exist."
+
+# USE A TEMPLATE WITHOUT ANY SITE
+- name: Add site VRF region cidr to Schema 2 Template 3 without any site associated (check mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ check_mode: yes
+ register: cm_no_site_associated
+
+- name: Add site VRF region cidr to Template 3 without any site associated (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ register: nm_no_site_associated
+
+- name: Verify cm_no_site_associated and nm_no_site_associated
+ assert:
+ that:
+ - cm_no_site_associated is changed
+ - nm_no_site_associated is changed \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr_subnet/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr_subnet/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr_subnet/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr_subnet/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr_subnet/tasks/main.yml
new file mode 100644
index 00000000..1673a6a2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_cidr_subnet/tasks/main.yml
@@ -0,0 +1,676 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com> (based on mso_schema_anp_epg_domain)
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ sites: "[ { 'site': 'aws_{{ mso_site | default(\"ansible_test\") }}', 'region': 'us-west-1', 'cidr': '10.0.0.0/16'},
+ { 'site': 'azure_{{ mso_site | default(\"ansible_test\") }}', 'region': 'westus', 'cidr': '10.1.0.0/16'}]"
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ aws_apic_username }}'
+ apic_password: '{{ aws_apic_password }}'
+ apic_site_id: '{{ aws_site_id | default(102) }}'
+ urls:
+ - https://{{ aws_apic_hostname }}
+ state: present
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ azure_apic_username }}'
+ apic_password: '{{ azure_apic_password }}'
+ apic_site_id: '{{ azure_site_id | default(103) }}'
+ urls:
+ - https://{{ azure_apic_hostname }}
+ state: present
+
+- name: Remove Schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ state: present
+
+- name: Ensure AWS site is present under tenant ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ cloud_account: '000000000000'
+ aws_access_key: 1
+ secret_key: 0
+ state: present
+
+- name: Ensure Azure site is present under tenant ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ state: present
+
+- name: Ensure schema 1 with Template 1 and 2 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{ item }}'
+ state: present
+ loop:
+ - Template 1
+ - Template 2
+
+- name: Ensure schema 2 with Template 3 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Add a new sites to a Template 1
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ item.site }}'
+ template: Template 1
+ state: present
+ loop: '{{ sites }}'
+ when: version.current.version[0] | int < 3
+
+- name: Ensure VRF1 exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF1
+ state: present
+
+- name: Ensure region for VRF1 at site level exists
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: '{{ item.site }}'
+ vrf: VRF1
+ region: '{{ item.region }}'
+ cidr: '{{ item.cidr }}'
+ state: present
+ loop: '{{ sites }}'
+
+# ADD SUBNET
+- name: Add a new subnet to AWS CIDR in VRF1 at site level (check mode)
+ mso_schema_site_vrf_region_cidr_subnet: &mso_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ cidr: 10.0.0.0/16
+ subnet: 10.0.0.0/24
+ zone: us-west-1a
+ state: present
+ check_mode: yes
+ register: cm_add_subnet
+
+- name: Verify cm_add_subnet
+ assert:
+ that:
+ - cm_add_subnet is changed
+ - cm_add_subnet.previous == {}
+ - cm_add_subnet.current.ip == '10.0.0.0/24'
+ - cm_add_subnet.current.zone == 'us-west-1a'
+
+- name: Add a new subnet to AWS CIDR in VRF1 at site level (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_present
+ register: nm_add_subnet
+
+- name: Verify nm_add_subnet
+ assert:
+ that:
+ - nm_add_subnet is changed
+ - nm_add_subnet.previous == {}
+ - nm_add_subnet.current.ip == '10.0.0.0/24'
+ - nm_add_subnet.current.zone == 'us-west-1a'
+
+- name: Add same subnet again to AWS CIDR in VRF1 at site level (check mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_present
+ register: cm_add_subnet_again
+
+- name: Verify cm_add_subnet_again
+ assert:
+ that:
+ - cm_add_subnet_again is not changed
+ - cm_add_subnet_again.current.ip == cm_add_subnet_again.previous.ip == '10.0.0.0/24'
+ - cm_add_subnet_again.current.zone == cm_add_subnet_again.previous.zone == 'us-west-1a'
+
+- name: Add same subnet again to AWS CIDR in VRF1 at site level (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_present
+ register: nm_add_subnet_again
+
+- name: Verify nm_add_subnet_again
+ assert:
+ that:
+ - nm_add_subnet_again is not changed
+ - nm_add_subnet_again.current.ip == nm_add_subnet_again.previous.ip == '10.0.0.0/24'
+ - nm_add_subnet_again.current.zone == nm_add_subnet_again.previous.zone == 'us-west-1a'
+
+- name: Add a new subnet to Azure CIDR in VRF1 at site level (check mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_present
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ region: westus
+ cidr: 10.1.0.0/16
+ subnet: 10.1.0.0/24
+ zone: null
+ check_mode: yes
+ register: cm_add_subnet_2
+
+- name: Verify cm_add_subnet_2
+ assert:
+ that:
+ - cm_add_subnet_2 is changed
+ - cm_add_subnet_2.previous == {}
+ - cm_add_subnet_2.current.ip == '10.1.0.0/24'
+ - cm_add_subnet_2.current.zone == ''
+
+- name: Add a new subnet to Azure CIDR in VRF1 at site level (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_present
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ region: westus
+ cidr: 10.1.0.0/16
+ subnet: 10.1.0.0/24
+ zone: null
+ register: nm_add_subnet_2
+
+- name: Verify nm_add_subnet_2
+ assert:
+ that:
+ - nm_add_subnet_2 is changed
+ - nm_add_subnet_2.previous == {}
+ - nm_add_subnet_2.current.ip == '10.1.0.0/24'
+ - nm_add_subnet_2.current.zone == ''
+
+- name: Add a second subnet to Azure CIDR in VRF1 at site level for VGW (check mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_present
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ region: westus
+ cidr: 10.1.0.0/16
+ subnet: 10.1.1.0/24
+ zone: null
+ vgw: true
+ check_mode: yes
+ register: cm_add_subnet_3
+
+- name: Verify cm_add_subnet_3
+ assert:
+ that:
+ - cm_add_subnet_3 is changed
+ - cm_add_subnet_3.previous == {}
+ - cm_add_subnet_3.current.ip == '10.1.1.0/24'
+ - cm_add_subnet_3.current.zone == ''
+ - cm_add_subnet_3.current.usage == 'gateway'
+
+- name: Add a second subnet to Azure CIDR in VRF1 at site level for VGW (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_present
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ region: westus
+ cidr: 10.1.0.0/16
+ subnet: 10.1.1.0/24
+ zone: null
+ vgw: true
+ register: nm_add_subnet_3
+
+- name: Verify nm_add_subnet_3
+ assert:
+ that:
+ - nm_add_subnet_3 is changed
+ - nm_add_subnet_3.previous == {}
+ - nm_add_subnet_3.current.ip == '10.1.1.0/24'
+ - nm_add_subnet_3.current.zone == ''
+ - nm_add_subnet_3.current.usage == 'gateway'
+
+# QUERY SUBNETS
+- name: Query subnet to AWS CIDR in VRF1 at site level (check mode)
+ mso_schema_site_vrf_region_cidr_subnet: &mso_query
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ cidr: 10.0.0.0/16
+ subnet: 10.0.0.0/24
+ state: query
+ check_mode: yes
+ register: cm_query_subnet
+
+- name: Verify cm_query_subnet
+ assert:
+ that:
+ - cm_query_subnet is not changed
+ - cm_query_subnet.current.ip == '10.0.0.0/24'
+ - cm_query_subnet.current.zone == 'us-west-1a'
+
+- name: Query subnet to AWS CIDR in VRF1 at site level (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ register: nm_query_subnet
+
+- name: Verify nm_query_subnet
+ assert:
+ that:
+ - nm_query_subnet is not changed
+
+# QUERY ALL SUBNETS
+- name: Query all subnets to AWS CIDR in VRF1 at site level (check mode)
+ mso_schema_site_vrf_region_cidr_subnet: &mso_query_all
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ cidr: 10.0.0.0/16
+ state: query
+ check_mode: yes
+ register: cm_query_subnet_all_aws
+
+- name: Query all subnets to Azure CIDR in VRF1 at site level (check mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query_all
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ region: westus
+ cidr: 10.1.0.0/16
+ state: query
+ check_mode: yes
+ register: cm_query_subnet_all_azure
+
+- name: Verify cm_query_subnet_all_aws and cm_query_subnet_all_azure
+ assert:
+ that:
+ - cm_query_subnet_all_aws is not changed
+ - cm_query_subnet_all_aws.current[0].ip == '10.0.0.0/24'
+ - cm_query_subnet_all_aws.current[0].zone == 'us-west-1a'
+ - cm_query_subnet_all_azure is not changed
+ - cm_query_subnet_all_azure.current[0].ip == '10.1.0.0/24'
+ - cm_query_subnet_all_azure.current[0].zone == ''
+ - cm_query_subnet_all_azure.current[1].ip == '10.1.1.0/24'
+ - cm_query_subnet_all_azure.current[1].zone == ''
+
+- name: Query subnet to AWS CIDR in VRF1 at site level (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query_all
+ register: nm_query_subnet_all_aws
+
+- name: Query subnet to AWS CIDR in VRF1 at site level (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query_all
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ region: westus
+ cidr: 10.1.0.0/16
+ state: query
+ register: nm_query_subnet_all_azure
+
+- name: Verify nm_query_subnet_all_aws and nm_query_subnet_all_azure
+ assert:
+ that:
+ - nm_query_subnet_all_aws is not changed
+ - nm_query_subnet_all_aws.current[0].ip == '10.0.0.0/24'
+ - nm_query_subnet_all_aws.current[0].zone == 'us-west-1a'
+ - nm_query_subnet_all_azure is not changed
+ - nm_query_subnet_all_azure.current[0].ip == '10.1.0.0/24'
+ - nm_query_subnet_all_azure.current[0].zone == ''
+ - nm_query_subnet_all_azure.current[1].ip == '10.1.1.0/24'
+ - nm_query_subnet_all_azure.current[1].zone == ''
+
+# REMOVE SUBNETS
+- name: Remove Subnet from CIDR (check_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_present
+ state: absent
+ check_mode: yes
+ register: cm_remove_subnet
+
+- name: Verify cm_remove_subnet
+ assert:
+ that:
+ - cm_remove_subnet is changed
+ - cm_remove_subnet.current == {}
+
+- name: Remove Subnet from CIDR (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_present
+ state: absent
+ register: nm_remove_subnet
+
+- name: Verify nm_remove_subnet
+ assert:
+ that:
+ - nm_remove_subnet is changed
+ - nm_remove_subnet.current == {}
+
+- name: Remove Subnet from CIDR again (check_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_present
+ state: absent
+ check_mode: yes
+ register: cm_remove_subnet_again
+
+- name: Verify cm_remove_subnet_again
+ assert:
+ that:
+ - cm_remove_subnet_again is not changed
+ - cm_remove_subnet_again.current == {}
+
+- name: Remove Subnet from CIDR again (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_present
+ state: absent
+ register: nm_remove_subnet_again
+
+- name: Verify nm_remove_subnet_again
+ assert:
+ that:
+ - nm_remove_subnet_again is not changed
+ - nm_remove_subnet_again.current == {}
+
+# QUERY NON-EXISTING subnet in CIDR
+- name: Query non-existing subnet (check_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ subnet: non_existing_subnet
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_subnet
+
+- name: Query non-existing subnet (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ subnet: non_existing_subnet
+ ignore_errors: yes
+ register: nm_query_non_subnet
+
+- name: Verify query_non_subnet
+ assert:
+ that:
+ - cm_query_non_subnet is not changed
+ - nm_query_non_subnet is not changed
+ - cm_query_non_subnet == nm_query_non_subnet
+ - cm_query_non_subnet.msg is match("Subnet IP 'non_existing_subnet' not found")
+ - nm_query_non_subnet.msg is match("Subnet IP 'non_existing_subnet' not found")
+
+# QUERY NON-EXISTING CIDR
+- name: Query non-existing CIDR (check_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ cidr: non_existing_cidr
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_cidr
+
+- name: Query non-existing CIDR (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ cidr: non_existing_cidr
+ ignore_errors: yes
+ register: nm_query_non_cidr
+
+- name: Verify query_non_cidr
+ assert:
+ that:
+ - cm_query_non_cidr is not changed
+ - nm_query_non_cidr is not changed
+ - cm_query_non_cidr == nm_query_non_cidr
+ - cm_query_non_cidr.msg == nm_query_non_cidr.msg == "Provided CIDR IP 'non_existing_cidr' does not exist. Existing CIDR IPs{{':'}} 10.0.0.0/16. Use mso_schema_site_vrf_region_cidr to create it."
+
+# QUERY NON-EXISTING region
+- name: Query non-existing region (check_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ region: non_existing_region
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_region
+
+- name: Query non-existing region (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ region: non_existing_region
+ ignore_errors: yes
+ register: nm_query_non_region
+
+- name: Verify query_non_region
+ assert:
+ that:
+ - cm_query_non_region is not changed
+ - nm_query_non_region is not changed
+ - cm_query_non_region == nm_query_non_region
+ - cm_query_non_region.msg == nm_query_non_region.msg == "Provided region 'non_existing_region' does not exist. Existing regions{{':'}} us-west-1. Use mso_schema_site_vrf_region_cidr to create it."
+
+# QUERY NON-EXISTING VRF
+- name: Query non-existing VRF (check_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ vrf: non_existing_vrf
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_vrf
+
+- name: Query non-existing VRF (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ vrf: non_existing_vrf
+ ignore_errors: yes
+ register: nm_query_non_vrf
+
+- name: Verify query_non_vrf
+ assert:
+ that:
+ - cm_query_non_vrf is not changed
+ - nm_query_non_vrf is not changed
+ - cm_query_non_vrf == nm_query_non_vrf
+ - cm_query_non_vrf.msg == nm_query_non_vrf.msg == "Provided vrf 'non_existing_vrf' does not exist at site level. Use mso_schema_site_vrf_region_cidr to create it."
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state for site cidr subnet (check_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ state: non-existing-state
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: Non-existing state for site cidr subnet (normal_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state == nm_non_existing_state
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non-existing-state"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for site cidr subnet (check_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ schema: non-existing-schema
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema for site cidr subnet (normal_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ schema: non-existing-schema
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non-existing-schema' does not exist"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for site cidr subnet (check_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ template: non-existing-template
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template for site cidr subnet (normal_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ template: non-existing-template
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+# USE A NON-ASSOCIATED TEMPLATE
+- name: Non-associated template for site cidr subnet (check_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ template: Template 2
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_associated_template
+
+- name: Non-associated template for site cidr subnet (normal_mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ template: Template 2
+ ignore_errors: yes
+ register: nm_non_associated_template
+
+- name: Verify non_associated_template
+ assert:
+ that:
+ - cm_non_associated_template is not changed
+ - nm_non_associated_template is not changed
+ - cm_non_associated_template == nm_non_associated_template
+ - cm_non_associated_template.msg is match("Provided site/siteId/template 'aws_ansible_test/[0-9a-zA-Z]*/Template2' does not exist. Existing siteIds/templates{{':'}} [0-9a-zA-Z]*/Template1")
+ - nm_non_associated_template.msg is match("Provided site/siteId/template 'aws_ansible_test/[0-9a-zA-Z]*/Template2' does not exist. Existing siteIds/templates{{':'}} [0-9a-zA-Z]*/Template1")
+
+# USE A TEMPLATE WITHOUT ANY SITE
+- name: Add site cidr subnet to Schema 2 Template 3 without any site associated (check mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_no_site_associated
+
+- name: Add site cidr subnet to Template 3 without any site associated (normal mode)
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_query
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ ignore_errors: yes
+ register: nm_no_site_associated
+
+- name: Verify cm_no_site_associated and nm_no_site_associated
+ assert:
+ that:
+ - cm_no_site_associated is not changed
+ - nm_no_site_associated is not changed
+ - cm_no_site_associated.msg == nm_no_site_associated.msg == "No site associated with template 'Template3'. Associate the site with the template using mso_schema_site."
+
+# Checking if issue when adding subnet to Hub Network (#126)
+- name: Add hub network in VRF1 region us-west-1 at AWS site level
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ hub_network:
+ name: hub-test
+ tenant: infra
+ state: present
+
+- name: Add a new subnet to AWS CIDR in VRF1 at site level
+ mso_schema_site_vrf_region_cidr_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ cidr: 10.0.0.0/16
+ subnet: 10.0.0.0/24
+ zone: us-west-1a
+ hub_network: true
+ state: present
+ register: nm_add_subnet_hub_network
+
+- name: Verify nm_add_subnet_hub_network
+ assert:
+ that:
+ - nm_add_subnet_hub_network is changed
+ - nm_add_subnet_hub_network.current.usage == 'gateway' \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_hub_network/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_hub_network/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_hub_network/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_hub_network/tasks/hub_network.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_hub_network/tasks/hub_network.yml
new file mode 100644
index 00000000..ecf934c4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_hub_network/tasks/hub_network.yml
@@ -0,0 +1,708 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ sites: "['aws_{{ mso_site | default(\"ansible_test\") }}',
+ 'azure_{{ mso_site | default(\"ansible_test\") }}',
+ '{{ mso_site | default(\"ansible_test\") }}']"
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ aws_apic_username }}'
+ apic_password: '{{ aws_apic_password }}'
+ apic_site_id: '{{ aws_site_id | default(102) }}'
+ urls:
+ - https://{{ aws_apic_hostname }}
+ state: present
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ azure_apic_username }}'
+ apic_password: '{{ azure_apic_password }}'
+ apic_site_id: '{{ azure_site_id | default(103) }}'
+ urls:
+ - https://{{ azure_apic_hostname }}
+ state: present
+
+- name: Remove Schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ # sites:
+ # - '{{ mso_site | default("ansible_test") }}'
+ users:
+ - '{{ mso_username }}'
+ state: present
+
+- name: Ensure AWS site is present under tenant ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ cloud_account: '000000000000'
+ aws_access_key: 1
+ secret_key: 0
+ state: present
+
+- name: Ensure Azure site is present under tenant ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ state: present
+
+- name: Ensure schema 1 with Template 1 and 2 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{ item }}'
+ state: present
+ loop:
+ - Template 1
+ - Template 2
+
+- name: Ensure schema 2 with Template 3 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Ensure VRF1 exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF1
+ state: present
+
+- name: Add a new CIDR in VRF1 at AWS site level (check mode)
+ mso_schema_site_vrf_region_cidr: &mso_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ cidr: 10.0.0.0/16
+ primary: true
+ state: present
+ check_mode: yes
+ register: cm_add_cidr
+
+- name: Verify cm_add_cidr
+ assert:
+ that:
+ - cm_add_cidr is changed
+ - cm_add_cidr.previous == {}
+ - cm_add_cidr.current.ip == '10.0.0.0/16'
+ - cm_add_cidr.current.primary == true
+
+- name: Add a new CIDR in VRF1 at AWS site level (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *mso_present
+ register: nm_add_cidr
+
+- name: Verify nm_add_cidr
+ assert:
+ that:
+ - nm_add_cidr is changed
+ - nm_add_cidr.previous == {}
+ - nm_add_cidr.current.ip == '10.0.0.0/16'
+ - nm_add_cidr.current.primary == true
+
+# ADD Hub Network
+- name: Add hub network in VRF1 region us-west-1 at AWS site level (check mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ hub_network:
+ name: hub-test
+ tenant: infra
+ state: present
+ check_mode: yes
+ register: cm_add_hub_network
+
+- name: Add hub network in VRF1 region us-west-1 at AWS site level (normal mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ hub_network:
+ name: hub-test
+ tenant: infra
+ state: present
+ register: nm_add_hub_network
+
+- name: Verify cm_add_hub_network and nm_add_hub_network
+ assert:
+ that:
+ - cm_add_hub_network is changed
+ - nm_add_hub_network is changed
+ - cm_add_hub_network.previous == {}
+ - nm_add_hub_network.previous == {}
+ - cm_add_hub_network.current.name == "hub-test"
+ - cm_add_hub_network.current.tenantName == "infra"
+ - nm_add_hub_network.current.name == "hub-test"
+ - nm_add_hub_network.current.tenantName == "infra"
+
+# Add hub network again
+- name: Add hub network again in VRF1 region us-west-1 at AWS site level (normal mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ hub_network:
+ name: hub-test
+ tenant: infra
+ state: present
+ register: nm_add_hub_network_again
+
+- name: Verify nm_add_hub_network_again
+ assert:
+ that:
+ - nm_add_hub_network_again is not changed
+ - nm_add_hub_network_again.previous.name == nm_add_hub_network_again.current.name == "hub-test"
+ - nm_add_hub_network_again.previous.tenantName == nm_add_hub_network_again.current.tenantName == "infra"
+
+# Update hub network
+- name: Update hub network in VRF1 region us-west-1 at AWS site level (check_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ hub_network:
+ name: hub-default
+ tenant: infra
+ state: present
+ check_mode: yes
+ register: cm_update_hub_network
+
+- name: Update hub network in VRF1 region us-west-1 at AWS site level (normal_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ hub_network:
+ name: hub-default
+ tenant: infra
+ state: present
+ register: nm_update_hub_network
+
+- name: Verify cm_update_hub_network and nm_update_hub_network
+ assert:
+ that:
+ - cm_update_hub_network is changed
+ - nm_update_hub_network is changed
+ - cm_update_hub_network.previous.name == "hub-test"
+ - cm_update_hub_network.previous.tenantName == "infra"
+ - cm_update_hub_network.current.name == "hub-default"
+ - cm_update_hub_network.current.tenantName == "infra"
+ - nm_update_hub_network.previous.name == "hub-test"
+ - nm_update_hub_network.previous.tenantName == "infra"
+ - nm_update_hub_network.current.name == "hub-default"
+ - nm_update_hub_network.current.tenantName == "infra"
+
+# Query Hub Network
+- name: Query hub network in VRF1 region us-west-1 at AWS site level
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ check_mode: yes
+ register: cm_query_hub_network
+
+- name: Verify cm_query_hub_network
+ assert:
+ that:
+ - cm_query_hub_network is not changed
+ - cm_query_hub_network.current.name == "hub-default"
+ - cm_query_hub_network.current.tenantName == "infra"
+
+# Remove Hub Network
+- name: Remove hub network in VRF1 region us-west-1 at AWS site level (check_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: absent
+ check_mode: yes
+ register: cm_remove_hub_network
+
+- name: Remove hub network in VRF1 region us-west-1 at AWS site level (normal mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: absent
+ register: nm_remove_hub_network
+
+- name: Verify cm_remove_hub_network and nm_remove_hub_network
+ assert:
+ that:
+ - cm_remove_hub_network is changed
+ - cm_remove_hub_network.current == {}
+ - cm_remove_hub_network.previous.name == "hub-default"
+ - cm_remove_hub_network.previous.tenantName == "infra"
+ - nm_remove_hub_network is changed
+ - nm_remove_hub_network.current == {}
+ - nm_remove_hub_network.previous.name == "hub-default"
+ - nm_remove_hub_network.previous.tenantName == "infra"
+
+# Remove Hub Network again
+- name: Remove again hub network in VRF1 region us-west-1 at AWS site level (check_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: absent
+ check_mode: yes
+ register: cm_remove_hub_network_again
+
+- name: Remove again hub network in VRF1 region us-west-1 at AWS site level (normal_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: absent
+ register: nm_remove_hub_network_again
+
+- name: Verify cm_remove_hub_network_again and nm_remove_hub_network_again
+ assert:
+ that:
+ - cm_remove_hub_network_again is not changed
+ - nm_remove_hub_network_again is not changed
+ - cm_remove_hub_network_again.previous == cm_remove_hub_network_again.current == {}
+ - nm_remove_hub_network_again.previous == nm_remove_hub_network_again.current == {}
+
+# query when hub network does not exist
+- name: Query non_existing_hub_network
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ ignore_errors: yes
+ register: query_non_existing_hub_network
+
+- name: Verify query_non_existing_hub_network
+ assert:
+ that:
+ - query_non_existing_hub_network.msg == "Hub network not found"
+
+# Re-Add hub network
+- name: Re-Add hub network in VRF1 region us-west-1 at AWS site level (normal mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ hub_network:
+ name: hub-test
+ tenant: infra
+ state: present
+ register: re_add_hub_network
+
+- name: Verify re_add_hub_network
+ assert:
+ that:
+ - re_add_hub_network is changed
+ - re_add_hub_network.previous == {}
+ - re_add_hub_network.current.name == "hub-test"
+ - re_add_hub_network.current.tenantName == "infra"
+
+# QUERY NON-EXISTING region
+- name: Query non-existing region (check_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: non_existing_region
+ state: query
+ ignore_errors: yes
+ check_mode: yes
+ register: cm_query_non_region
+
+- name: Query non-existing region (normal mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: non_existing_region
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_region
+
+- name: Verify query_non_region
+ assert:
+ that:
+ - cm_query_non_region is not changed
+ - nm_query_non_region is not changed
+ - cm_query_non_region == nm_query_non_region
+ - cm_query_non_region.msg == nm_query_non_region.msg == "Provided region 'non_existing_region' does not exist. Existing regions{{':'}} us-west-1"
+
+# QUERY NON-EXISTING VRF
+- name: Query non-existing VRF (check_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: non_existing_vrf
+ region: us-west-1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_vrf
+
+- name: Query non-existing VRF (normal mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: non_existing_vrf
+ region: us-west-1
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_vrf
+
+- name: Verify query_non_vrf
+ assert:
+ that:
+ - cm_query_non_vrf is not changed
+ - nm_query_non_vrf is not changed
+ - cm_query_non_vrf == nm_query_non_vrf
+ - cm_query_non_vrf.msg == nm_query_non_vrf.msg == "Provided vrf 'non_existing_vrf' does not exist. Existing vrfs{{':'}} VRF1"
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state for site hub network (check_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: non-existing-state
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: Non-existing state for hub network (normal_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state == nm_non_existing_state
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non-existing-state"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for site hub network (check_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: non-existing-schema
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema for site hub network (normal_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: non-existing-schema
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non-existing-schema' does not exist"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for site hub network (check_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non-existing-template
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template for site hub network (normal_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non-existing-template
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+# USE A NON_EXISTING_SITE_TEMPLATE
+- name: non_existing_site_template (check_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_site_template
+
+- name: non_existing_site_template (normal_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_site_template
+
+- name: Verify cm_non_existing_site_template and nm_non_existing_site_template
+ assert:
+ that:
+ - cm_non_existing_site_template is not changed
+ - nm_non_existing_site_template is not changed
+ - cm_non_existing_site_template.msg == nm_non_existing_site_template.msg == "Provided site-template association 'aws_ansible_test-Template2' does not exist."
+
+# USE A NON_EXISTING_SITE
+- name: non_existing_site (check_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: non_existing_site
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_site
+
+- name: non_existing_site (normal_mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: non_existing_site
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_site
+
+- name: Verify cm_non_existing_site and nm_non_existing_site
+ assert:
+ that:
+ - cm_non_existing_site is not changed
+ - nm_non_existing_site is not changed
+ - cm_non_existing_site.msg == nm_non_existing_site.msg == "Site 'non_existing_site' is not a valid site name."
+
+# use mso_schema_site_vrf_region_cidr_subnet module to update region
+- name: Add a new CIDR in VRF1 at AWS site level (check mode)
+ mso_schema_site_vrf_region_cidr: &cidr_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ cidr: 10.1.0.0/16
+ primary: false
+ state: present
+ check_mode: yes
+ register: cm_add_cidr
+
+- name: Verify cm_add_cidr
+ assert:
+ that:
+ - cm_add_cidr is changed
+ - cm_add_cidr.previous == {}
+ - cm_add_cidr.current.ip == '10.1.0.0/16'
+ - cm_add_cidr.current.primary == false
+
+- name: Add a new CIDR in VRF1 at AWS site level (normal mode)
+ mso_schema_site_vrf_region_cidr:
+ <<: *cidr_present
+ register: nm_add_cidr
+
+- name: Verify nm_add_cidr
+ assert:
+ that:
+ - nm_add_cidr is changed
+ - nm_add_cidr.previous == {}
+ - nm_add_cidr.current.ip == '10.1.0.0/16'
+ - nm_add_cidr.current.primary == false
+
+# query hub network after using mso_schema_site_vrf_region_cidr_subnet module to update region
+- name: Query hub_network after region updated
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ state: query
+ register: query_after_region_update
+
+- name: Verify query_after_region_update
+ assert:
+ that:
+ - query_after_region_update is not changed
+ - query_after_region_update.current.name == "hub-test"
+ - query_after_region_update.current.tenantName == "infra"
+
+# USE A TEMPLATE WITHOUT ANY SITE
+- name: Add site VRF region hub network to Schema 2 Template 3 without any site associated (check mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ hub_network:
+ name: hub-test
+ tenant: infra
+ state: present
+ ignore_errors: yes
+ check_mode: yes
+ register: cm_no_site_associated
+
+- name: Add site VRF region hub network to Template 3 without any site associated (normal mode)
+ mso_schema_site_vrf_region_hub_network:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ vrf: VRF1
+ region: us-west-1
+ hub_network:
+ name: hub-test
+ tenant: infra
+ state: present
+ ignore_errors: yes
+ register: nm_no_site_associated
+
+- name: Verify cm_no_site_associated and nm_no_site_associated
+ assert:
+ that:
+ - cm_no_site_associated is not changed
+ - nm_no_site_associated is not changed
+ - cm_no_site_associated.msg == nm_no_site_associated.msg == "No site associated with template 'Template3'. Associate the site with the template using mso_schema_site." \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_hub_network/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_hub_network/tasks/main.yml
new file mode 100644
index 00000000..371643d8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_site_vrf_region_hub_network/tasks/main.yml
@@ -0,0 +1,32 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+- name: Import hub_network tasks if MSO version is higher than 3.0
+ import_tasks: hub_network.yml
+ when: version.current.version[0] | int >= 3 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template/tasks/main.yml
new file mode 100644
index 00000000..e8f6fecd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template/tasks/main.yml
@@ -0,0 +1,280 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Ensure site exists
+ mso_site:
+ <<: *mso_info
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(101) }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+ ignore_errors: yes
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exists
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ sites:
+ - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 exists in check mode
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+ check_mode: yes
+ register: add_template1_schema1_cm
+
+- name: Ensure schema 1 with Template 1 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+ register: add_template1_schema1
+
+- name: Ensure schema 1 with Template 2 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 2
+ state: present
+ register: add_template2_schema1
+
+- name: Ensure schema 2 with Template 3 exists
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+ register: add_template3_schema2
+
+- name: Ensure schema 2 with Template 3 exists again
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+ register: add_template3_schema2_again
+
+- name: Update display name of Template 3 in schema 2
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ display_name: Temp 3
+ state: present
+ register: update_template3_schema2
+
+- name: Verify add
+ assert:
+ that:
+ - add_template1_schema1_cm is changed
+ - add_template1_schema1_cm.current.name == 'Template1'
+ - add_template1_schema1 is changed
+ - add_template1_schema1.current.name == 'Template1'
+ - add_template2_schema1 is changed
+ - add_template2_schema1.current.name == 'Template2'
+ - add_template3_schema2 is changed
+ - add_template3_schema2.current.name == 'Template3'
+ - update_template3_schema2 is changed
+ - add_template3_schema2_again is not changed
+ - update_template3_schema2.current.displayName == 'Temp 3'
+
+- name: Query Template 1 in Schema 1
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: query
+ register: query_template1_schema1
+
+- name: Query all Templates in Schema 1
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ state: query
+ register: query_all_templates_schema1
+
+- name: Verify query
+ assert:
+ that:
+ - query_template1_schema1 is not changed
+ - query_template1_schema1.current.name == 'Template1'
+ - query_all_templates_schema1 is not changed
+ - query_all_templates_schema1.current | length == 2
+
+- name: Remove Template 1 of Schema 1
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: absent
+ ignore_errors: yes
+ register: remove_template1_schema1
+
+- name: Remove Template 2 of Schema 1
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 2
+ state: absent
+ register: remove_template2_schema1
+
+
+- name: Remove non_existing_template
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: non_existing_template
+ state: absent
+ ignore_errors: yes
+ register: remove_template_non_existing_template
+
+- name: Remove Template 3 in schema 2 in check mode
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: absent
+ check_mode: yes
+ register: remove_template3_schema2_cm
+
+- name: Remove Template 3 in schema 2 in normal mode
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: absent
+ register: remove_template3_schema2_nm
+
+- name: Remove Template 3 in schema 2 again
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: absent
+ register: remove_template3_schema2_nm_again
+
+- name: non_existing_schema
+ mso_schema_template:
+ <<: *mso_info
+ schema: non_schema
+ tenant: ansible_test
+ template: Template 4
+ state: absent
+ ignore_errors: yes
+ register: remove_template_non_existing_schema
+
+- name: Verify remove
+ assert:
+ that:
+ - remove_template1_schema1.current == {}
+ - remove_template1_schema1.previous.name == 'Template1'
+ - remove_template2_schema1.current == {}
+ - remove_template2_schema1.previous.name == 'Template2'
+ - remove_template3_schema2_cm.current == {}
+ - remove_template3_schema2_cm.previous.name == 'Template3'
+ - remove_template3_schema2_nm.current == {}
+ - remove_template3_schema2_nm.previous.name == 'Template3'
+ - remove_template3_schema2_nm_again is not changed
+ - remove_template_non_existing_schema is not changed
+ - remove_template_non_existing_template is not changed
+
+# USE NON-EXISTING STATE
+- name: non_existing_state state
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 2
+ state: non_existing_state
+ ignore_errors: yes
+ register: non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - non_existing_state is not changed
+ - non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non_existing_state"
+
+# USE A NON_EXISTING_TEMPLATE
+- name: non_existing_template
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: non_existing_template
+ state: query
+ ignore_errors: yes
+ register: non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - non_existing_template is not changed
+ - non_existing_template.msg == "Template 'non_existing_template' not found"
+
+- name: Template attribute absent in task
+ mso_schema_template:
+ <<: *mso_info
+ schema: non_schema
+ tenant: ansible_test
+ state: query
+ ignore_errors: yes
+ register: absent_template
+
+- name: Verify absent_template
+ assert:
+ that:
+ - absent_template is not changed
+ - absent_template.current == [] \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp/tasks/main.yml
new file mode 100644
index 00000000..075f0f6c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp/tasks/main.yml
@@ -0,0 +1,265 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(false) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+
+- name: Ensure schema 1 with Template 2 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 2
+ state: present
+
+- name: Ensure schema 2 with Template 3 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Ensure ANP exist (check_mode)
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ state: present
+ check_mode: yes
+ register: cm_create_anp
+
+- name: Ensure ANP exist (normal_mode)
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ state: present
+ register: nm_create_anp
+
+- name: Create ANP again (normal_mode)
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ state: present
+ register: nm_create_anp_again
+
+- name: Verify cm_create_anp, nm_create_anp and nm_create_anp_again
+ assert:
+ that:
+ - cm_create_anp is changed
+ - nm_create_anp is changed
+ - nm_create_anp_again is not changed
+ - cm_create_anp.previous == {}
+ - cm_create_anp.current.displayName == "ANP"
+ - cm_create_anp.current.name == "ANP"
+ - cm_create_anp.current.epgs == []
+ - nm_create_anp.previous == {}
+ - nm_create_anp.current.displayName == "ANP"
+ - nm_create_anp.current.name == "ANP"
+ - nm_create_anp.current.epgs == []
+ - nm_create_anp_again.previous == nm_create_anp_again.current
+ - nm_create_anp_again.current.displayName == "ANP"
+ - nm_create_anp_again.current.name == "ANP"
+ - nm_create_anp_again.current.epgs == []
+
+- name: Create another anp (normal_mode)
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP_2
+ display_name: another anp
+ state: present
+ register: nm_create_another_anp
+
+- name: Verify nm_create_another_anp
+ assert:
+ that:
+ - nm_create_another_anp is changed
+ - nm_create_another_anp.previous == {}
+ - nm_create_another_anp.current.displayName == "another anp"
+ - nm_create_another_anp.current.name == "ANP_2"
+ - nm_create_another_anp.current.epgs == []
+
+- name: Change anp (normal_mode)
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ display_name: displayName for ANP
+ state: present
+ register: nm_change_anp
+
+- name: Verify nm_change_anp
+ assert:
+ that:
+ - nm_change_anp is changed
+ - nm_change_anp.previous.name == nm_change_anp.current.name == "ANP"
+ - nm_change_anp.previous.displayName == "ANP"
+ - nm_change_anp.current.displayName == "displayName for ANP"
+ - nm_change_anp.previous.epgs == nm_change_anp.current.epgs == []
+
+- name: Query anp
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ state: query
+ register: query_anp
+
+- name: Verify query_anp
+ assert:
+ that:
+ - query_anp is not changed
+ - query_anp.current.name == "ANP"
+ - query_anp.current.epgs == []
+ - query_anp.current.displayName == "displayName for ANP"
+
+- name: Query all
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: query
+ register: query_all
+
+- name: Verify query_all
+ assert:
+ that:
+ - query_all is not changed
+ - query_all.current | length == 2
+
+- name: Query non_existing anp
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: non_existing_anp
+ state: query
+ ignore_errors: yes
+ register: query_non_existing_anp
+
+- name: Verify query_non_existing_anp
+ assert:
+ that:
+ - query_non_existing_anp.msg == "ANP 'non_existing_anp' not found"
+
+- name: Use non_existing schema
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: non_existing_schema
+ template: Template 1
+ anp: ANP
+ state: query
+ ignore_errors: yes
+ register: query_non_existing_schema
+
+- name: Use non_existing template
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non_existing_template
+ anp: ANP
+ state: query
+ ignore_errors: yes
+ register: query_non_existing_template
+
+- name: Verify query_non_existing_schema and query_non_existing_template
+ assert:
+ that:
+ - query_non_existing_schema.msg == "Provided schema 'non_existing_schema' does not exist"
+ - query_non_existing_template.msg == "Provided template 'non_existing_template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+- name: Remove anp (check_mode)
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ state: absent
+ check_mode: yes
+ register: cm_rm_anp
+
+- name: Remove anp (normal_mode)
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ state: absent
+ register: nm_rm_anp
+
+- name: Verify cm_rm_anp and nm_rm_anp
+ assert:
+ that:
+ - cm_rm_anp is changed
+ - nm_rm_anp is changed
+ - nm_rm_anp.previous == cm_rm_anp.previous
+ - nm_rm_anp.current == cm_rm_anp.current == {}
+ - nm_rm_anp.previous.name == cm_rm_anp.previous.name == "ANP"
+ - nm_rm_anp.previous.displayName == cm_rm_anp.previous.displayName == "displayName for ANP"
+ - nm_rm_anp.previous.epgs == cm_rm_anp.previous.epgs == []
+
+- name: Remove anp again
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ state: absent
+ register: nm_rm_anp_again
+
+- name: Verify nm_rm_anp_again
+ assert:
+ that:
+ - nm_rm_anp_again is not changed
+ - nm_rm_anp_again.previous == nm_rm_anp_again.current == {}
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg/tasks/main.yml
new file mode 100644
index 00000000..d64ca266
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg/tasks/main.yml
@@ -0,0 +1,1192 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+# - name: Ensure site exist
+# mso_site: &site_present
+# host: '{{ mso_hostname }}'
+# username: '{{ mso_username }}'
+# password: '{{ mso_password }}'
+# validate_certs: '{{ mso_validate_certs | default(false) }}'
+# use_ssl: '{{ mso_use_ssl | default(true) }}'
+# use_proxy: '{{ mso_use_proxy | default(true) }}'
+# output_level: '{{ mso_output_level | default("info") }}'
+# site: '{{ mso_site | default("ansible_test") }}'
+# apic_username: '{{ apic_username }}'
+# apic_password: '{{ apic_password }}'
+# apic_site_id: '{{ apic_site_id | default(101) }}'
+# urls:
+# - https://{{ apic_hostname }}
+# state: present
+
+- name: Remove schemas
+ mso_schema:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant: &tenant_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ # sites:
+ # - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 exist
+ mso_schema_template: &schema_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+
+- name: Ensure schema 1 with Template 2 exist
+ mso_schema_template:
+ <<: *schema_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 2
+ state: present
+
+- name: Ensure schema 2 with Template 3 exist
+ mso_schema_template:
+ <<: *schema_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Ensure VRF exist
+ mso_schema_template_vrf: &vrf_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ layer3_multicast: true
+ state: present
+
+- name: Ensure VRF2 exist
+ mso_schema_template_vrf:
+ <<: *vrf_present
+ vrf: VRF2
+ state: present
+
+- name: Ensure VRF3 exist
+ mso_schema_template_vrf:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ vrf: VRF3
+ state: present
+
+- name: Ensure VRF4 exist
+ mso_schema_template_vrf:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ vrf: VRF4
+ state: present
+
+- name: Ensure ANP exist
+ mso_schema_template_anp:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ state: present
+
+- name: Ensure ANP2 exist
+ mso_schema_template_anp:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ anp: ANP2
+ state: present
+
+- name: Ensure ANP3 exist
+ mso_schema_template_anp:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ anp: ANP3
+ state: present
+
+- name: Ensure Filter 1 exist
+ mso_schema_template_filter_entry:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ filter: Filter1
+ entry: Filter1-Entry
+ state: present
+
+- name: Ensure Contract1 exist
+ mso_schema_template_contract_filter: &contract_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract1
+ filter: Filter1
+ filter_schema: '{{ mso_schema | default("ansible_test") }}'
+ filter_template: Template 1
+ state: present
+
+- name: Ensure Contract2 exist
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ template: Template 2
+ contract: Contract2
+ state: present
+
+- name: Ensure ansible_test_1 BD exist
+ mso_schema_template_bd:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_1
+ vrf:
+ name: VRF
+ layer3_multicast: true
+ state: present
+
+- name: Ensure ansible_test_2 BD exist
+ mso_schema_template_bd:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd: ansible_test_2
+ vrf:
+ name: VRF2
+ template: Template 1
+ layer3_multicast: true
+ state: present
+
+- name: Ensure ansible_test_3 BD exist
+ mso_schema_template_bd:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ bd: ansible_test_3
+ vrf:
+ name: VRF3
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ layer3_multicast: true
+ state: present
+
+- name: Ensure ansible_test_4 BD exist
+ mso_schema_template_bd:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ bd: ansible_test_4
+ vrf:
+ name: VRF4
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ layer3_multicast: true
+ state: present
+
+# ADD EPG
+- name: Add EPG (check_mode)
+ mso_schema_template_anp_epg: &epg_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ bd:
+ name: ansible_test_1
+ vrf:
+ name: VRF
+ state: present
+ check_mode: yes
+ register: cm_add_epg
+
+- name: Verify cm_add_epg
+ assert:
+ that:
+ - cm_add_epg is changed
+ - cm_add_epg.previous == {}
+ - cm_add_epg.current.name == "ansible_test_1"
+ - cm_add_epg.current.vrfRef.templateName == "Template1"
+ - cm_add_epg.current.vrfRef.vrfName == "VRF"
+ - cm_add_epg.current.bdRef.templateName == "Template1"
+ - cm_add_epg.current.bdRef.bdName == "ansible_test_1"
+
+- name: Add EPG (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ register: nm_add_epg
+
+- name: Verify nm_add_epg
+ assert:
+ that:
+ - nm_add_epg is changed
+ - nm_add_epg.previous == {}
+ - nm_add_epg.current.name == "ansible_test_1"
+ - nm_add_epg.current.vrfRef.templateName == "Template1"
+ - nm_add_epg.current.vrfRef.vrfName == "VRF"
+ - nm_add_epg.current.bdRef.templateName == "Template1"
+ - nm_add_epg.current.bdRef.bdName == "ansible_test_1"
+ - cm_add_epg.current.vrfRef.schemaId == nm_add_epg.current.vrfRef.schemaId
+ - cm_add_epg.current.bdRef.schemaId == nm_add_epg.current.bdRef.schemaId
+
+- name: Add EPG again (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ check_mode: yes
+ register: cm_add_epg_again
+
+- name: Verify cm_add_epg_again
+ assert:
+ that:
+ - cm_add_epg_again is not changed
+ - cm_add_epg_again.current.name == cm_add_epg_again.previous.name == "ansible_test_1"
+ - cm_add_epg_again.current.vrfRef.templateName == cm_add_epg_again.previous.vrfRef.templateName == "Template1"
+ - cm_add_epg_again.current.vrfRef.vrfName == cm_add_epg_again.previous.vrfRef.vrfName == "VRF"
+ - cm_add_epg_again.current.bdRef.templateName == cm_add_epg_again.previous.bdRef.templateName == "Template1"
+ - cm_add_epg_again.current.bdRef.bdName == cm_add_epg_again.previous.bdRef.bdName == "ansible_test_1"
+ - cm_add_epg_again.previous.vrfRef.schemaId == cm_add_epg_again.current.vrfRef.schemaId
+ - cm_add_epg_again.previous.bdRef.schemaId == cm_add_epg_again.current.bdRef.schemaId
+
+
+- name: Add EPG again (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ register: nm_add_epg_again
+
+- name: Verify nm_add_epg_again
+ assert:
+ that:
+ - nm_add_epg_again is not changed
+ - nm_add_epg_again.current.name == nm_add_epg_again.previous.name == "ansible_test_1"
+ - nm_add_epg_again.current.vrfRef.templateName == nm_add_epg_again.previous.vrfRef.templateName == "Template1"
+ - nm_add_epg_again.current.vrfRef.vrfName == nm_add_epg_again.previous.vrfRef.vrfName == "VRF"
+ - nm_add_epg_again.current.bdRef.templateName == nm_add_epg_again.previous.bdRef.templateName == "Template1"
+ - nm_add_epg_again.current.bdRef.bdName == nm_add_epg_again.previous.bdRef.bdName == "ansible_test_1"
+ - nm_add_epg_again.previous.vrfRef.schemaId == nm_add_epg_again.current.vrfRef.schemaId
+ - nm_add_epg_again.previous.bdRef.schemaId == nm_add_epg_again.current.bdRef.schemaId
+
+- name: Add EPG 2 (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ epg: ansible_test_2
+
+- name: Add EPG 3 (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ anp: ANP2
+ epg: ansible_test_3
+ bd:
+ name: ansible_test_1
+ template: Template 1
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ useg_epg: true
+ intra_epg_isolation: enforced
+ intersite_multicast_source: true
+ proxy_arp: true
+ preferred_group: true
+ subnets:
+ - subnet: 10.0.0.128/24
+ - subnet: 10.0.1.254/24
+ description: 1234567890
+ - subnet: 172.16.0.1/24
+ description: "My description for a subnet"
+ scope: public
+ shared: true
+ no_default_gateway: false
+ querier: true
+ - ip: 192.168.0.254/24
+ description: "My description for a subnet"
+ scope: private
+ shared: false
+ no_default_gateway: true
+ register: nm_add_epg_3
+
+- name: Add EPG 4 (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ anp: ANP3
+ epg: ansible_test_4
+ bd:
+ name: ansible_test_1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ register: nm_add_epg_4
+
+- name: Verify nm_add_epg_3 and nm_add_epg_4
+ assert:
+ that:
+ - nm_add_epg_3 is changed
+ - nm_add_epg_4 is changed
+ - nm_add_epg_3.current.name == "ansible_test_3"
+ - nm_add_epg_4.current.name == "ansible_test_4"
+ - nm_add_epg_3.current.vrfRef.templateName == nm_add_epg_4.current.vrfRef.templateName == "Template1"
+ - nm_add_epg_3.current.vrfRef.vrfName == nm_add_epg_4.current.vrfRef.vrfName == "VRF"
+ - nm_add_epg_3.current.vrfRef.schemaId == nm_add_epg.current.bdRef.schemaId
+ - nm_add_epg_3.current.bdRef.templateName == nm_add_epg_4.current.bdRef.templateName == "Template1"
+ - nm_add_epg_3.current.bdRef.bdName == nm_add_epg_4.current.bdRef.bdName == "ansible_test_1"
+ - nm_add_epg_3.current.bdRef.schemaId == nm_add_epg.current.bdRef.schemaId
+ - nm_add_epg_3.current.uSegEpg == true
+ - nm_add_epg_3.current.intraEpg == 'enforced'
+ - nm_add_epg_3.current.mCastSource == true
+ - nm_add_epg_3.current.proxyArp == true
+ - nm_add_epg_3.current.preferredGroup == true
+ - nm_add_epg_3.current.subnets[0].description == "10.0.0.128/24"
+ - nm_add_epg_3.current.subnets[0].ip == "10.0.0.128/24"
+ - nm_add_epg_3.current.subnets[0].noDefaultGateway == false
+ - nm_add_epg_3.current.subnets[0].scope == "private"
+ - nm_add_epg_3.current.subnets[0].shared == false
+ - nm_add_epg_3.current.subnets[0].querier == false
+ - nm_add_epg_3.current.subnets[1].description == "1234567890"
+ - nm_add_epg_3.current.subnets[1].ip == "10.0.1.254/24"
+ - nm_add_epg_3.current.subnets[1].noDefaultGateway == false
+ - nm_add_epg_3.current.subnets[1].scope == "private"
+ - nm_add_epg_3.current.subnets[1].shared == false
+ - nm_add_epg_3.current.subnets[1].querier == false
+ - nm_add_epg_3.current.subnets[2].description == "My description for a subnet"
+ - nm_add_epg_3.current.subnets[2].ip == "172.16.0.1/24"
+ - nm_add_epg_3.current.subnets[2].noDefaultGateway == false
+ - nm_add_epg_3.current.subnets[2].scope == "public"
+ - nm_add_epg_3.current.subnets[2].shared == true
+ - nm_add_epg_3.current.subnets[2].querier == true
+ - nm_add_epg_3.current.subnets[3].description == "My description for a subnet"
+ - nm_add_epg_3.current.subnets[3].ip == "192.168.0.254/24"
+ - nm_add_epg_3.current.subnets[3].noDefaultGateway == true
+ - nm_add_epg_3.current.subnets[3].scope == "private"
+ - nm_add_epg_3.current.subnets[3].shared == false
+ - nm_add_epg_3.current.subnets[3].querier == false
+
+# CHANGE EPG
+- name: Change EPG (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ vrf:
+ name: VRF2
+ bd:
+ name: ansible_test_2
+ check_mode: yes
+ register: cm_change_epg
+
+- name: Verify cm_change_epg
+ assert:
+ that:
+ - cm_change_epg is changed
+ - cm_change_epg.current.name == 'ansible_test_1'
+ - cm_change_epg.current.vrfRef.vrfName == 'VRF2'
+ - cm_change_epg.current.bdRef.templateName == cm_change_epg.current.vrfRef.templateName == "Template1"
+ - cm_change_epg.current.vrfRef.schemaId == cm_change_epg.previous.vrfRef.schemaId
+ - cm_change_epg.current.bdRef.bdName == 'ansible_test_2'
+ - cm_change_epg.current.bdRef.schemaId == cm_change_epg.previous.bdRef.schemaId
+
+- name: Change EPG (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ vrf:
+ name: VRF2
+ bd:
+ name: ansible_test_2
+ output_level: debug
+ register: nm_change_epg
+
+- name: Verify nm_change_epg
+ assert:
+ that:
+ - nm_change_epg is changed
+ - nm_change_epg.current.name == 'ansible_test_1'
+ - nm_change_epg.current.vrfRef.vrfName == 'VRF2'
+ - nm_change_epg.current.bdRef.templateName == nm_change_epg.current.vrfRef.templateName == "Template1"
+ - nm_change_epg.current.vrfRef.schemaId == nm_change_epg.previous.vrfRef.schemaId
+ - nm_change_epg.current.bdRef.bdName == 'ansible_test_2'
+ - nm_change_epg.current.bdRef.schemaId == nm_change_epg.previous.bdRef.schemaId
+
+- name: Change EPG again (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ vrf:
+ name: VRF2
+ bd:
+ name: ansible_test_2
+ check_mode: yes
+ register: cm_change_epg_again
+
+- name: Verify cm_change_epg_again
+ assert:
+ that:
+ - cm_change_epg_again is not changed
+ - cm_change_epg_again.current.name == 'ansible_test_1'
+ - cm_change_epg_again.current.vrfRef.vrfName == 'VRF2'
+ - cm_change_epg_again.current.vrfRef.templateName == cm_change_epg_again.current.bdRef.templateName == "Template1"
+ - cm_change_epg_again.current.vrfRef.schemaId == cm_change_epg_again.previous.vrfRef.schemaId
+ - cm_change_epg_again.current.bdRef.bdName == 'ansible_test_2'
+ - cm_change_epg_again.current.bdRef.schemaId == cm_change_epg_again.previous.bdRef.schemaId
+
+- name: Change EPG again (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ vrf:
+ name: VRF2
+ bd:
+ name: ansible_test_2
+ register: nm_change_epg_again
+
+- name: Verify nm_change_epg_again
+ assert:
+ that:
+ - nm_change_epg_again is not changed
+ - nm_change_epg_again.current.name == 'ansible_test_1'
+ - nm_change_epg_again.current.vrfRef.vrfName == 'VRF2'
+ - nm_change_epg_again.current.vrfRef.templateName == nm_change_epg_again.current.bdRef.templateName == "Template1"
+ - nm_change_epg_again.current.vrfRef.schemaId == nm_change_epg_again.previous.vrfRef.schemaId
+ - nm_change_epg_again.current.bdRef.bdName == 'ansible_test_2'
+ - nm_change_epg_again.current.bdRef.schemaId == nm_change_epg_again.previous.bdRef.schemaId
+
+- name: Change EPG to VRF3 (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ vrf:
+ name: VRF3
+ template: Template 2
+ bd:
+ name: ansible_test_3
+ template: Template 2
+ register: nm_change_epg_vrf3
+
+- name: Change EPG 4 to VRF (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ anp: ANP3
+ epg: ansible_test_4
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ bd:
+ name: ansible_test_1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ register: nm_change_epg_vrf4
+
+- name: Verify nm_change_epg_vrf3 and nm_change_epg_vrf4
+ assert:
+ that:
+ - nm_change_epg_vrf3 is changed
+ - nm_change_epg_vrf3.current.name == 'ansible_test_1'
+ - nm_change_epg_vrf4.current.name == 'ansible_test_4'
+ - nm_change_epg_vrf3.current.vrfRef.vrfName == 'VRF3'
+ - nm_change_epg_vrf3.current.bdRef.bdName == 'ansible_test_3'
+ - nm_change_epg_vrf3.current.vrfRef.templateName == nm_change_epg_vrf3.current.bdRef.templateName == "Template2"
+ - nm_change_epg_vrf4.current.vrfRef.vrfName == 'VRF'
+ - nm_change_epg_vrf4.current.bdRef.bdName == 'ansible_test_1'
+ - nm_change_epg_vrf4.current.vrfRef.templateName == nm_change_epg_vrf4.current.bdRef.templateName == "Template1"
+
+- name: Change EPG 1 settings(normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ useg_epg: true
+ intra_epg_isolation: enforced
+ intersite_multicast_source: true
+ proxy_arp: true
+ preferred_group: true
+ subnets:
+ - subnet: 10.1.0.128/24
+ - subnet: 10.1.1.254/24
+ description: 1234567890
+ - subnet: 172.17.0.1/24
+ description: "My description for a subnet"
+ scope: public
+ shared: true
+ no_default_gateway: false
+ querier: true
+ - ip: 192.168.1.254/24
+ description: "My description for a subnet"
+ scope: private
+ shared: false
+ no_default_gateway: true
+ register: nm_change_epg_1_settings
+
+- name: Change EPG 1 subnets (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ useg_epg: true
+ intra_epg_isolation: enforced
+ intersite_multicast_source: true
+ proxy_arp: true
+ preferred_group: true
+ subnets:
+ - subnet: 10.1.0.127/24
+ - subnet: 172.17.0.1/24
+ description: "New description for a subnet"
+ scope: private
+ shared: false
+ no_default_gateway: false
+ querier: false
+ - ip: 192.168.1.254/24
+ description: "My description for a subnet"
+ scope: private
+ shared: false
+ no_default_gateway: false
+ querier: true
+ register: nm_change_epg_1_subnets
+
+- name: Verify nm_change_epg_1_subnets
+ assert:
+ that:
+ - nm_change_epg_1_settings is changed
+ - nm_change_epg_1_settings.current.name == "ansible_test_1"
+ - nm_change_epg_1_settings.current.vrfRef.templateName == nm_change_epg_1_settings.current.bdRef.templateName == "Template1"
+ - nm_change_epg_1_settings.current.vrfRef.vrfName == "VRF"
+ - nm_change_epg_1_settings.current.bdRef.bdName == "ansible_test_1"
+ - nm_change_epg_1_settings.current.uSegEpg == true
+ - nm_change_epg_1_settings.current.intraEpg == 'enforced'
+ - nm_change_epg_1_settings.current.mCastSource == true
+ - nm_change_epg_1_settings.current.proxyArp == true
+ - nm_change_epg_1_settings.current.preferredGroup == true
+ - nm_change_epg_1_settings.current.subnets[0].description == "10.1.0.128/24"
+ - nm_change_epg_1_settings.current.subnets[0].ip == "10.1.0.128/24"
+ - nm_change_epg_1_settings.current.subnets[0].noDefaultGateway == false
+ - nm_change_epg_1_settings.current.subnets[0].scope == "private"
+ - nm_change_epg_1_settings.current.subnets[0].shared == false
+ - nm_change_epg_1_settings.current.subnets[0].querier == false
+ - nm_change_epg_1_settings.current.subnets[1].description == "1234567890"
+ - nm_change_epg_1_settings.current.subnets[1].ip == "10.1.1.254/24"
+ - nm_change_epg_1_settings.current.subnets[1].noDefaultGateway == false
+ - nm_change_epg_1_settings.current.subnets[1].scope == "private"
+ - nm_change_epg_1_settings.current.subnets[1].shared == false
+ - nm_change_epg_1_settings.current.subnets[1].querier == false
+ - nm_change_epg_1_settings.current.subnets[2].description == "My description for a subnet"
+ - nm_change_epg_1_settings.current.subnets[2].ip == "172.17.0.1/24"
+ - nm_change_epg_1_settings.current.subnets[2].noDefaultGateway == false
+ - nm_change_epg_1_settings.current.subnets[2].scope == "public"
+ - nm_change_epg_1_settings.current.subnets[2].shared == true
+ - nm_change_epg_1_settings.current.subnets[2].querier == true
+ - nm_change_epg_1_settings.current.subnets[3].description == "My description for a subnet"
+ - nm_change_epg_1_settings.current.subnets[3].ip == "192.168.1.254/24"
+ - nm_change_epg_1_settings.current.subnets[3].noDefaultGateway == true
+ - nm_change_epg_1_settings.current.subnets[3].scope == "private"
+ - nm_change_epg_1_settings.current.subnets[3].shared == false
+ - nm_change_epg_1_settings.current.subnets[3].querier == false
+ - nm_change_epg_1_subnets is changed
+ - nm_change_epg_1_subnets.current.subnets | length == 3
+ - nm_change_epg_1_subnets.current.name == "ansible_test_1"
+ - nm_change_epg_1_subnets.current.vrfRef.templateName == nm_change_epg_1_subnets.current.bdRef.templateName == "Template1"
+ - nm_change_epg_1_subnets.current.vrfRef.vrfName == "VRF"
+ - nm_change_epg_1_subnets.current.bdRef.bdName == "ansible_test_1"
+ - nm_change_epg_1_subnets.current.uSegEpg == true
+ - nm_change_epg_1_subnets.current.intraEpg == 'enforced'
+ - nm_change_epg_1_subnets.current.mCastSource == true
+ - nm_change_epg_1_subnets.current.proxyArp == true
+ - nm_change_epg_1_subnets.current.preferredGroup == true
+ - nm_change_epg_1_subnets.current.subnets[0].description == "10.1.0.127/24"
+ - nm_change_epg_1_subnets.current.subnets[0].ip == "10.1.0.127/24"
+ - nm_change_epg_1_subnets.current.subnets[0].noDefaultGateway == false
+ - nm_change_epg_1_subnets.current.subnets[0].scope == "private"
+ - nm_change_epg_1_subnets.current.subnets[0].shared == false
+ - nm_change_epg_1_subnets.current.subnets[0].querier == false
+ - nm_change_epg_1_subnets.current.subnets[1].description == "New description for a subnet"
+ - nm_change_epg_1_subnets.current.subnets[1].ip == "172.17.0.1/24"
+ - nm_change_epg_1_subnets.current.subnets[1].noDefaultGateway == false
+ - nm_change_epg_1_subnets.current.subnets[1].scope == "private"
+ - nm_change_epg_1_subnets.current.subnets[1].shared == false
+ - nm_change_epg_1_subnets.current.subnets[1].querier == false
+ - nm_change_epg_1_subnets.current.subnets[2].description == "My description for a subnet"
+ - nm_change_epg_1_subnets.current.subnets[2].ip == "192.168.1.254/24"
+ - nm_change_epg_1_subnets.current.subnets[2].noDefaultGateway == false
+ - nm_change_epg_1_subnets.current.subnets[2].scope == "private"
+ - nm_change_epg_1_subnets.current.subnets[2].shared == false
+ - nm_change_epg_1_subnets.current.subnets[2].querier == true
+
+
+# # QUERY ALL EPGs
+- name: Query all EPGs in an ANP (check_mode)
+ mso_schema_template_anp_epg: &epg_query
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ state: query
+ check_mode: yes
+ register: cm_query_all_epgs
+
+- name: Query all EPGs (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ register: nm_query_all_epgs
+
+- name: Verify query_all_epgs
+ assert:
+ that:
+ - cm_query_all_epgs is not changed
+ - nm_query_all_epgs is not changed
+ - cm_query_all_epgs.current | length == nm_query_all_epgs.current | length == 2
+
+
+# QUERY AN EPG
+- name: Query EPG 1 (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ epg: ansible_test_1
+ check_mode: yes
+ register: cm_query_epg_1
+
+- name: Query EPG 1 (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ epg: ansible_test_1
+ register: nm_query_epg_1
+
+- name: Query EPG 3 (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ template: Template 2
+ anp: ANP2
+ epg: ansible_test_3
+ register: nm_query_epg_3
+
+- name: Query EPG 4 (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ anp: ANP3
+ epg: ansible_test_4
+ register: nm_query_epg_4
+
+- name: Verify query_epg_x
+ assert:
+ that:
+ - cm_query_epg_1 is not changed
+ - nm_query_epg_1 is not changed
+ - nm_query_epg_3 is not changed
+ - nm_query_epg_4 is not changed
+ - nm_query_epg_1.current.subnets | length == 3
+ - nm_query_epg_1.current.name == "ansible_test_1"
+ - nm_query_epg_1.current.vrfRef.templateName == nm_query_epg_1.current.bdRef.templateName == "Template1"
+ - nm_query_epg_1.current.vrfRef.vrfName == "VRF"
+ - nm_query_epg_1.current.bdRef.bdName == "ansible_test_1"
+ - nm_query_epg_1.current.uSegEpg == true
+ - nm_query_epg_1.current.intraEpg == 'enforced'
+ - nm_query_epg_1.current.mCastSource == true
+ - nm_query_epg_1.current.proxyArp == true
+ - nm_query_epg_1.current.preferredGroup == true
+ - nm_query_epg_1.current.subnets[0].description == "10.1.0.127/24"
+ - nm_query_epg_1.current.subnets[0].ip == "10.1.0.127/24"
+ - nm_query_epg_1.current.subnets[0].noDefaultGateway == false
+ - nm_query_epg_1.current.subnets[0].scope == "private"
+ - nm_query_epg_1.current.subnets[0].shared == false
+ - nm_query_epg_1.current.subnets[0].querier == false
+ - nm_query_epg_1.current.subnets[1].description == "New description for a subnet"
+ - nm_query_epg_1.current.subnets[1].ip == "172.17.0.1/24"
+ - nm_query_epg_1.current.subnets[1].noDefaultGateway == false
+ - nm_query_epg_1.current.subnets[1].scope == "private"
+ - nm_query_epg_1.current.subnets[1].shared == false
+ - nm_query_epg_1.current.subnets[1].querier == false
+ - nm_query_epg_1.current.subnets[2].description == "My description for a subnet"
+ - nm_query_epg_1.current.subnets[2].ip == "192.168.1.254/24"
+ - nm_query_epg_1.current.subnets[2].noDefaultGateway == false
+ - nm_query_epg_1.current.subnets[2].scope == "private"
+ - nm_query_epg_1.current.subnets[2].shared == false
+ - nm_query_epg_1.current.subnets[2].querier == true
+ - nm_query_epg_3.current.name == "ansible_test_3"
+ - nm_query_epg_4.current.name == "ansible_test_4"
+ - nm_query_epg_3.current.vrfRef.templateName == nm_query_epg_4.current.vrfRef.templateName == "Template1"
+ - nm_query_epg_3.current.vrfRef.vrfName == nm_query_epg_4.current.vrfRef.vrfName == "VRF"
+ - nm_query_epg_3.current.bdRef.templateName == nm_query_epg_4.current.bdRef.templateName == "Template1"
+ - nm_query_epg_3.current.bdRef.bdName == nm_query_epg_4.current.bdRef.bdName == "ansible_test_1"
+ - nm_query_epg_3.current.uSegEpg == true
+ - nm_query_epg_3.current.intraEpg == 'enforced'
+ - nm_query_epg_3.current.mCastSource == true
+ - nm_query_epg_3.current.proxyArp == true
+ - nm_query_epg_3.current.preferredGroup == true
+ - nm_query_epg_3.current.subnets[0].description == "10.0.0.128/24"
+ - nm_query_epg_3.current.subnets[0].ip == "10.0.0.128/24"
+ - nm_query_epg_3.current.subnets[0].noDefaultGateway == false
+ - nm_query_epg_3.current.subnets[0].scope == "private"
+ - nm_query_epg_3.current.subnets[0].shared == false
+ - nm_query_epg_3.current.subnets[0].querier == false
+ - nm_query_epg_3.current.subnets[1].description == "1234567890"
+ - nm_query_epg_3.current.subnets[1].ip == "10.0.1.254/24"
+ - nm_query_epg_3.current.subnets[1].noDefaultGateway == false
+ - nm_query_epg_3.current.subnets[1].scope == "private"
+ - nm_query_epg_3.current.subnets[1].shared == false
+ - nm_query_epg_3.current.subnets[1].querier == false
+ - nm_query_epg_3.current.subnets[2].description == "My description for a subnet"
+ - nm_query_epg_3.current.subnets[2].ip == "172.16.0.1/24"
+ - nm_query_epg_3.current.subnets[2].noDefaultGateway == false
+ - nm_query_epg_3.current.subnets[2].scope == "public"
+ - nm_query_epg_3.current.subnets[2].shared == true
+ - nm_query_epg_3.current.subnets[2].querier == true
+ - nm_query_epg_3.current.subnets[3].description == "My description for a subnet"
+ - nm_query_epg_3.current.subnets[3].ip == "192.168.0.254/24"
+ - nm_query_epg_3.current.subnets[3].noDefaultGateway == true
+ - nm_query_epg_3.current.subnets[3].scope == "private"
+ - nm_query_epg_3.current.subnets[3].shared == false
+ - nm_query_epg_3.current.subnets[3].querier == false
+
+
+# REMOVE EPG
+- name: Remove EPG (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ state: absent
+ check_mode: yes
+ register: cm_remove_epg
+
+- name: Verify cm_remove_epg
+ assert:
+ that:
+ - cm_remove_epg is changed
+ - cm_remove_epg.current == {}
+
+- name: Remove EPG (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ state: absent
+ register: nm_remove_epg
+
+- name: Verify nm_remove_epg
+ assert:
+ that:
+ - nm_remove_epg is changed
+ - nm_remove_epg.current == {}
+
+- name: Remove EPG again (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ state: absent
+ check_mode: yes
+ register: cm_remove_epg_again
+
+- name: Verify cm_remove_epg_again
+ assert:
+ that:
+ - cm_remove_epg_again is not changed
+ - cm_remove_epg_again.current == {}
+
+- name: Remove EPG again (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ state: absent
+ register: nm_remove_epg_again
+
+- name: Verify nm_remove_epg_again
+ assert:
+ that:
+ - nm_remove_epg_again is not changed
+ - nm_remove_epg_again.current == {}
+
+
+# QUERY NON-EXISTING EPG
+- name: Query non-existing EPG (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ epg: non_existing_epg
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_epg
+
+- name: Query non-existing EPG (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ epg: non_existing_epg
+ ignore_errors: yes
+ register: nm_query_non_epg
+
+- name: Verify query_non_epg
+ assert:
+ that:
+ - cm_query_non_epg is not changed
+ - nm_query_non_epg is not changed
+ - cm_query_non_epg == nm_query_non_epg
+ - cm_query_non_epg.msg == nm_query_non_epg.msg == "EPG 'non_existing_epg' not found"
+
+# QUERY NON-EXISTING ANP
+- name: Query non-existing ANP (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ anp: non_existing_anp
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_anp
+
+- name: Query non-existing ANP (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ anp: non_existing_anp
+ ignore_errors: yes
+ register: nm_query_non_anp
+
+- name: Verify query_non_anp
+ assert:
+ that:
+ - cm_query_non_anp is not changed
+ - nm_query_non_anp is not changed
+ - cm_query_non_anp == nm_query_non_anp
+ - cm_query_non_anp.msg == nm_query_non_anp.msg == "Provided anp 'non_existing_anp' does not exist. Existing anps{{':'}} ANP"
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state for EPG (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ epg: ansible_test_2
+ state: non-existing-state
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: Non-existing state for EPG (normal_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ epg: ansible_test_2
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state == nm_non_existing_state
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non-existing-state"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for EPG (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ schema: non-existing-schema
+ epg: ansible_test_2
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema for EPG (normal_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ schema: non-existing-schema
+ epg: ansible_test_2
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non-existing-schema' does not exist"
+
+- name: Non-existing BD schema for EPG (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ epg: ansible_test_2
+ bd:
+ name: ansible_test_1
+ schema: non-existing-schema
+ template: Template 1
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_bd_schema
+
+- name: Non-existing BD schema for EPG (normal_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ epg: ansible_test_2
+ bd:
+ name: ansible_test_1
+ schema: non-existing-schema
+ template: Template 1
+ ignore_errors: yes
+ register: nm_non_existing_bd_schema
+
+- name: Verify non_existing_bd_schema
+ assert:
+ that:
+ - cm_non_existing_bd_schema is not changed
+ - nm_non_existing_bd_schema is not changed
+ - cm_non_existing_bd_schema == nm_non_existing_bd_schema
+ - cm_non_existing_bd_schema.msg == nm_non_existing_bd_schema.msg == "Referenced schema 'non-existing-schema' in bdref does not exist"
+
+- name: Non-existing VRF schema for EPG (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ epg: ansible_test_2
+ vrf:
+ name: VRF
+ schema: non-existing-schema
+ template: Template 1
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_vrf_schema
+
+- name: Non-existing VRF schema for EPG (normal_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ epg: ansible_test_2
+ vrf:
+ name: VRF
+ schema: non-existing-schema
+ template: Template 1
+ ignore_errors: yes
+ register: nm_non_existing_vrf_schema
+
+- name: Verify non_existing_vrf_schema
+ assert:
+ that:
+ - cm_non_existing_vrf_schema is not changed
+ - nm_non_existing_vrf_schema is not changed
+ - cm_non_existing_vrf_schema == nm_non_existing_vrf_schema
+ - cm_non_existing_vrf_schema.msg == nm_non_existing_vrf_schema.msg == "Referenced schema 'non-existing-schema' in vrfref does not exist"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for EPG (check_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ template: non-existing-template
+ epg: ansible_test_2
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template for EPG (normal_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ template: non-existing-template
+ epg: ansible_test_2
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+# Checking if contract are removed after re-applying an EPG. (#13 | #62137)
+- name: Add Contracts to EPG 2
+ mso_schema_template_anp_epg_contract:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_2
+ contract:
+ name: '{{ item.name }}'
+ template: '{{ item.template }}'
+ type: '{{ item.type }}'
+ state: present
+ loop:
+ - { name: Contract1, template: Template 1, type: consumer }
+ - { name: Contract1, template: Template 1, type: provider }
+ - { name: Contract2, template: Template 2, type: consumer }
+ - { name: Contract2, template: Template 2, type: provider }
+
+- name: Query EPG 2
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ epg: ansible_test_2
+ register: nm_query_contract_epg
+
+- name: Verify that 4 contracts are in EPG 2 using nm_query_contract_epg
+ assert:
+ that:
+ - nm_query_contract_epg.current.contractRelationships | length == 4
+
+
+- name: Add EPG 2 again (normal_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ epg: ansible_test_2
+ register: nm_add_epg_2_again
+
+- name: Verify that EPG 2 didn't change
+ assert:
+ that:
+ - nm_add_epg_2_again is not changed
+
+- name: Query EPG 2
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ epg: ansible_test_2
+ register: nm_query_contract_epg
+
+- name: Verify that 4 contracts are in EPG 2 using nm_query_contract_epg
+ assert:
+ that:
+ - nm_query_contract_epg.current.contractRelationships | length == 4
+
+# Checking if issue when querying EPG and VRF is not defined (#66)
+- name: Add new test EPG 3 (normal mode)
+ mso_schema_template_anp_epg: &epg_present_2
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_3
+ bd:
+ name: ansible_test_1
+ register: nm_add_epg_3
+
+- name: Verify nm_add_epg_3
+ assert:
+ that:
+ - nm_add_epg_3 is changed
+ - nm_add_epg_3.current.name == 'ansible_test_3'
+ - "'vrfRef' not in nm_add_epg_3.current"
+
+- name: Query test EPG 3
+ mso_schema_template_anp_epg:
+ <<: *epg_present_2
+ register: nm_query_epg_3
+
+- name: Verify nm_query_epg_3
+ assert:
+ that:
+ - nm_query_epg_3 is not changed
+ - nm_query_epg_3.current.name == 'ansible_test_3'
+ - "'vrfRef' not in nm_query_epg_3.current"
+
+# Checking if modifying an EPG with existing contracts throw an MSO error. (#82)
+- name: Change EPG 2 to add VRF (normal_mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ epg: ansible_test_2
+ vrf:
+ name: VRF2
+ bd:
+ name: ansible_test_2
+ register: nm_change_epg_2_vrf
+
+- name: Verify that EPG 2 did change
+ assert:
+ that:
+ - nm_change_epg_2_vrf is changed
+ - nm_change_epg_2_vrf.current.vrfRef.templateName == "Template1"
+ - nm_change_epg_2_vrf.current.vrfRef.vrfName == "VRF2"
+ - nm_change_epg_2_vrf.current.bdRef.bdName == "ansible_test_2"
+
+- name: Query EPG 2
+ mso_schema_template_anp_epg:
+ <<: *epg_query
+ epg: ansible_test_2
+ register: nm_query_contract_epg_2
+
+- name: Verify that 4 contracts are in EPG 2 using nm_query_contract_epg_2
+ assert:
+ that:
+ - nm_query_contract_epg_2.current.contractRelationships | length == 4 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_contract/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_contract/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_contract/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_contract/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_contract/tasks/main.yml
new file mode 100644
index 00000000..24bdead0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_contract/tasks/main.yml
@@ -0,0 +1,651 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+# - name: Ensure site exist
+# mso_site: &site_present
+# host: '{{ mso_hostname }}'
+# username: '{{ mso_username }}'
+# password: '{{ mso_password }}'
+# validate_certs: '{{ mso_validate_certs | default(false) }}'
+# use_ssl: '{{ mso_use_ssl | default(true) }}'
+# use_proxy: '{{ mso_use_proxy | default(true) }}'
+# output_level: '{{ mso_output_level | default("info") }}'
+# site: '{{ mso_site | default("ansible_test") }}'
+# apic_username: '{{ apic_username }}'
+# apic_password: '{{ apic_password }}'
+# apic_site_id: '{{ apic_site_id | default(101) }}'
+# urls:
+# - https://{{ apic_hostname }}
+# state: present
+
+- name: Remove schemas
+ mso_schema:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant: &tenant_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ # sites:
+ # - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 exist
+ mso_schema_template: &schema_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+
+- name: Ensure schema 1 with Template 2 exist
+ mso_schema_template:
+ <<: *schema_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 2
+ state: present
+
+- name: Ensure schema 2 with Template 3 exist
+ mso_schema_template:
+ <<: *schema_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Ensure ANP exist
+ mso_schema_template_anp:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ item.schema }}'
+ template: '{{ item.template }}'
+ anp: ANP
+ state: present
+ loop:
+ - { schema: '{{ mso_schema | default("ansible_test") }}', template: 'Template 1' }
+ - { schema: '{{ mso_schema | default("ansible_test") }}_2', template: 'Template 3' }
+
+- name: Ensure Filter 1 exist
+ mso_schema_template_filter_entry:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ filter: Filter1
+ entry: Filter1-Entry
+ state: present
+
+- name: Ensure Contract1 exist
+ mso_schema_template_contract_filter: &contract_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract1
+ filter: Filter1
+ filter_schema: '{{ mso_schema | default("ansible_test") }}'
+ filter_template: Template 1
+ state: present
+
+- name: Ensure Contract2 exist
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ template: Template 2
+ contract: Contract2
+ state: present
+
+- name: Ensure EPGs exist
+ mso_schema_template_anp_epg:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ item.schema }}'
+ template: '{{ item.template }}'
+ anp: ANP
+ epg: '{{ item.epg }}'
+ state: present
+ loop:
+ - { schema: '{{ mso_schema | default("ansible_test") }}', template: 'Template 1', epg: 'ansible_test_1' }
+ - { schema: '{{ mso_schema | default("ansible_test") }}_2', template: 'Template 3', epg: 'ansible_test_3' }
+
+# ADD Contract to EPG
+- name: Add Contract1 to EPG (check_mode)
+ mso_schema_template_anp_epg_contract: &contract_epg_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ contract:
+ name: Contract1
+ type: consumer
+ state: present
+ check_mode: yes
+ register: cm_add_contract_rel
+
+- name: Verify cm_add_contract_rel
+ assert:
+ that:
+ - cm_add_contract_rel is changed
+ - cm_add_contract_rel.previous == {}
+ - cm_add_contract_rel.current.contractRef.templateName == "Template1"
+ - cm_add_contract_rel.current.contractRef.contractName == "Contract1"
+ - cm_add_contract_rel.current.relationshipType == "consumer"
+
+- name: Add Contract to EPG (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_present
+ register: nm_add_contract_rel
+
+- name: Verify nm_add_contract_rel
+ assert:
+ that:
+ - nm_add_contract_rel is changed
+ - nm_add_contract_rel.previous == {}
+ - nm_add_contract_rel.current.contractRef.templateName == "Template1"
+ - nm_add_contract_rel.current.contractRef.contractName == "Contract1"
+ - nm_add_contract_rel.current.relationshipType == "consumer"
+ - cm_add_contract_rel.current.contractRef.schemaId == nm_add_contract_rel.current.contractRef.schemaId
+
+- name: Add Contract to EPG again (check_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_present
+ check_mode: yes
+ register: cm_add_contract_rel_again
+
+- name: Verify cm_add_contract_rel_again
+ assert:
+ that:
+ - cm_add_contract_rel_again is not changed
+ - cm_add_contract_rel_again.previous.contractRef.templateName == "Template1"
+ - cm_add_contract_rel_again.current.contractRef.templateName == "Template1"
+ - cm_add_contract_rel_again.previous.contractRef.contractName == "Contract1"
+ - cm_add_contract_rel_again.current.contractRef.contractName == "Contract1"
+ - cm_add_contract_rel_again.previous.relationshipType == "consumer"
+ - cm_add_contract_rel_again.current.relationshipType == "consumer"
+ - cm_add_contract_rel_again.previous.contractRef.schemaId == cm_add_contract_rel_again.current.contractRef.schemaId
+
+
+- name: Add Contract to EPG again (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_present
+ register: nm_add_contract_rel_again
+
+- name: Verify nm_add_contract_rel_again
+ assert:
+ that:
+ - nm_add_contract_rel_again is not changed
+ - nm_add_contract_rel_again.previous.contractRef.templateName == "Template1"
+ - nm_add_contract_rel_again.current.contractRef.templateName == "Template1"
+ - nm_add_contract_rel_again.previous.contractRef.contractName == "Contract1"
+ - nm_add_contract_rel_again.current.contractRef.contractName == "Contract1"
+ - nm_add_contract_rel_again.previous.relationshipType == "consumer"
+ - nm_add_contract_rel_again.current.relationshipType == "consumer"
+ - nm_add_contract_rel_again.previous.contractRef.schemaId == nm_add_contract_rel_again.current.contractRef.schemaId
+
+- name: Add Contract1 to EPG - provider (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_present
+ contract:
+ name: Contract1
+ type: provider
+ register: nm_add_contract1_rel_provider
+
+- name: Add Contract2 to EPG - consumer (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_present
+ contract:
+ name: Contract2
+ template: Template 2
+ type: consumer
+ register: nm_add_contract2_rel_consumer
+
+- name: Add Contract1 to EPG 3 - provider (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ anp: ANP
+ epg: ansible_test_3
+ contract:
+ name: Contract1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ type: provider
+ register: nm_add_contract3_rel_provider
+
+- name: Verify nm_add_contract1_rel_provider, nm_add_contract2_rel_consumer and nm_add_contract3_rel_provider
+ assert:
+ that:
+ - nm_add_contract1_rel_provider is changed
+ - nm_add_contract2_rel_consumer is changed
+ - nm_add_contract3_rel_provider is changed
+ - nm_add_contract1_rel_provider.current.contractRef.contractName == nm_add_contract3_rel_provider.current.contractRef.contractName == "Contract1"
+ - nm_add_contract2_rel_consumer.current.contractRef.contractName == "Contract2"
+ - nm_add_contract1_rel_provider.current.contractRef.templateName == nm_add_contract3_rel_provider.current.contractRef.templateName == "Template1"
+ - nm_add_contract2_rel_consumer.current.contractRef.templateName == "Template2"
+ - nm_add_contract1_rel_provider.current.contractRef.schemaId == nm_add_contract2_rel_consumer.current.contractRef.schemaId == nm_add_contract3_rel_provider.current.contractRef.schemaId
+ - nm_add_contract2_rel_consumer.current.relationshipType == "consumer"
+ - nm_add_contract1_rel_provider.current.relationshipType == nm_add_contract3_rel_provider.current.relationshipType == "provider"
+
+# # QUERY ALL Contract to EPG
+- name: Query all contract relationship for EPG (check_mode)
+ mso_schema_template_anp_epg_contract: &contract_epg_query
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ state: query
+ check_mode: yes
+ register: cm_query_all_contract_rels
+
+- name: Query all contract relationship for EPG (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ register: nm_query_all_contract_rels
+
+- name: Verify query_all_contract_rels
+ assert:
+ that:
+ - cm_query_all_contract_rels is not changed
+ - nm_query_all_contract_rels is not changed
+ - cm_query_all_contract_rels.current | length == nm_query_all_contract_rels.current | length == 3
+
+
+# QUERY A Contract to EPG
+- name: Query Contract1 relationship for EPG - consumer (check_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ contract:
+ name: Contract1
+ type: consumer
+ check_mode: yes
+ register: cm_query_contract1_consumer_rel
+
+- name: Query Contract1 relationship for EPG - consumer (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ contract:
+ name: Contract1
+ type: consumer
+ register: nm_query_contract1_consumer_rel
+
+- name: Query Contract1 relationship for EPG - provider (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ contract:
+ name: Contract1
+ type: provider
+ register: nm_query_contract1_provider_rel
+
+- name: Query Contract1 relationship for EPG - consumer (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ contract:
+ name: Contract2
+ template: Template 2
+ type: consumer
+ register: nm_query_contract2_consumer_rel
+
+- name: Query Contract1 relationship for EPG - provider (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ anp: ANP
+ epg: ansible_test_3
+ contract:
+ name: Contract1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ type: provider
+ register: nm_query_contract3_provider_rel
+
+- name: Verify query_contractX_YYYYY_rel
+ assert:
+ that:
+ - cm_query_contract1_consumer_rel is not changed
+ - nm_query_contract1_consumer_rel is not changed
+ - nm_query_contract1_provider_rel is not changed
+ - nm_query_contract2_consumer_rel is not changed
+ - nm_query_contract3_provider_rel is not changed
+ - cm_query_contract1_consumer_rel == nm_query_contract1_consumer_rel
+ - cm_query_contract1_consumer_rel.current.contractRef.contractName == nm_query_contract1_consumer_rel.current.contractRef.contractName == nm_query_contract1_provider_rel.current.contractRef.contractName == nm_query_contract3_provider_rel.current.contractRef.contractName == "Contract1"
+ - nm_query_contract2_consumer_rel.current.contractRef.contractName == "Contract2"
+ - cm_query_contract1_consumer_rel.current.contractRef.templateName == nm_query_contract1_consumer_rel.current.contractRef.templateName == nm_query_contract1_provider_rel.current.contractRef.templateName == nm_query_contract3_provider_rel.current.contractRef.templateName == "Template1"
+ - nm_query_contract2_consumer_rel.current.contractRef.templateName == "Template2"
+ - cm_query_contract1_consumer_rel.current.contractRef.schemaId == nm_query_contract1_consumer_rel.current.contractRef.schemaId == nm_query_contract1_provider_rel.current.contractRef.schemaId == nm_query_contract2_consumer_rel.current.contractRef.schemaId == nm_query_contract3_provider_rel.current.contractRef.schemaId
+ - cm_query_contract1_consumer_rel.current.relationshipType == nm_query_contract1_consumer_rel.current.relationshipType == nm_query_contract2_consumer_rel.current.relationshipType == "consumer"
+ - nm_query_contract1_provider_rel.current.relationshipType == nm_query_contract3_provider_rel.current.relationshipType == "provider"
+
+
+# REMOVE Contract to EPG
+- name: Remove Contract to EPG (check_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_present
+ state: absent
+ check_mode: yes
+ register: cm_remove_contract_rel
+
+- name: Verify cm_remove_contract_rel
+ assert:
+ that:
+ - cm_remove_contract_rel is changed
+ - cm_remove_contract_rel.current == {}
+
+- name: Remove Contract to EPG (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_present
+ state: absent
+ register: nm_remove_contract_rel
+
+- name: Verify nm_remove_contract_rel
+ assert:
+ that:
+ - nm_remove_contract_rel is changed
+ - nm_remove_contract_rel.current == {}
+
+- name: Remove Contract to EPG again (check_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_present
+ state: absent
+ check_mode: yes
+ register: cm_remove_contract_rel_again
+
+- name: Verify cm_remove_contract_rel_again
+ assert:
+ that:
+ - cm_remove_contract_rel_again is not changed
+ - cm_remove_contract_rel_again.current == {}
+
+- name: Remove Contract to EPG again (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_present
+ state: absent
+ register: nm_remove_contract_rel_again
+
+- name: Verify nm_remove_contract_rel_again
+ assert:
+ that:
+ - nm_remove_contract_rel_again is not changed
+ - nm_remove_contract_rel_again.current == {}
+
+
+# QUERY NON-EXISTING Contract to EPG
+- name: Query non-existing contract (check_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ contract:
+ name: non_existing_contract
+ type: provider
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_contract
+
+- name: Query non-existing contract (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ contract:
+ name: non_existing_contract
+ type: provider
+ ignore_errors: yes
+ register: nm_query_non_contract
+
+- name: Verify query_non_contract
+ assert:
+ that:
+ - cm_query_non_contract is not changed
+ - nm_query_non_contract is not changed
+ - cm_query_non_contract == nm_query_non_contract
+ - cm_query_non_contract.msg is match("Contract '/schemas/[0-9a-zA-Z]*/templates/Template1/contracts/non_existing_contract' not found")
+ - nm_query_non_contract.msg is match("Contract '/schemas/[0-9a-zA-Z]*/templates/Template1/contracts/non_existing_contract' not found")
+
+# QUERY NON-EXISTING EPG
+- name: Query non-existing EPG (check_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ epg: non_existing_epg
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_epg
+
+- name: Query non-existing EPG (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ epg: non_existing_epg
+ ignore_errors: yes
+ register: nm_query_non_epg
+
+- name: Verify query_non_epg
+ assert:
+ that:
+ - cm_query_non_epg is not changed
+ - nm_query_non_epg is not changed
+ - cm_query_non_epg == nm_query_non_epg
+ - cm_query_non_epg.msg == nm_query_non_epg.msg == "Provided epg 'non_existing_epg' does not exist. Existing epgs{{':'}} ansible_test_1"
+
+# QUERY NON-EXISTING ANP
+- name: Query non-existing ANP (check_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ anp: non_existing_anp
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_anp
+
+- name: Query non-existing ANP (normal mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ anp: non_existing_anp
+ ignore_errors: yes
+ register: nm_query_non_anp
+
+- name: Verify query_non_anp
+ assert:
+ that:
+ - cm_query_non_anp is not changed
+ - nm_query_non_anp is not changed
+ - cm_query_non_anp == nm_query_non_anp
+ - cm_query_non_anp.msg == nm_query_non_anp.msg == "Provided anp 'non_existing_anp' does not exist. Existing anps{{':'}} ANP"
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state for contract relationship (check_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ state: non-existing-state
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: Non-existing state for contract relationship (normal_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state == nm_non_existing_state
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non-existing-state"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for contract relationship (check_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ schema: non-existing-schema
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema for contract relationship (normal_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ schema: non-existing-schema
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non-existing-schema' does not exist"
+
+- name: Non-existing contract schema for contract relationship (check_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ contract:
+ name: Contract1
+ schema: non-existing-schema
+ template: Template 1
+ type: provider
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_contract_schema
+
+- name: Non-existing contract schema for contract relationship (normal_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ contract:
+ name: Contract1
+ schema: non-existing-schema
+ template: Template 1
+ type: provider
+ ignore_errors: yes
+ register: nm_non_existing_contract_schema
+
+- name: Verify non_existing_contract_schema
+ assert:
+ that:
+ - cm_non_existing_contract_schema is not changed
+ - nm_non_existing_contract_schema is not changed
+ - cm_non_existing_contract_schema == nm_non_existing_contract_schema
+ - cm_non_existing_contract_schema.msg == nm_non_existing_contract_schema.msg == "Schema 'non-existing-schema' is not a valid schema name."
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for contract relationship (check_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ template: non-existing-template
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template for contract relationship (normal_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ template: non-existing-template
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+- name: Non-existing contract template for contract relationship (check_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ contract:
+ name: Contract1
+ template: non-existing-template
+ type: provider
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_contract_template
+
+- name: Non-existing contract template for contract relationship (normal_mode)
+ mso_schema_template_anp_epg_contract:
+ <<: *contract_epg_query
+ contract:
+ name: Contract1
+ template: non-existing-template
+ type: provider
+ ignore_errors: yes
+ register: nm_non_existing_contract_template
+
+- name: Verify non_existing_contract_template
+ assert:
+ that:
+ - cm_non_existing_contract_template is not changed
+ - nm_non_existing_contract_template is not changed
+ - cm_non_existing_contract_template == nm_non_existing_contract_template
+ - cm_non_existing_contract_template.msg is match("Contract '/schemas/[0-9a-zA-Z]*/templates/non-existing-template/contracts/Contract1' not found")
+ - nm_non_existing_contract_template.msg is match("Contract '/schemas/[0-9a-zA-Z]*/templates/non-existing-template/contracts/Contract1' not found") \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_selector/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_selector/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_selector/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_selector/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_selector/tasks/main.yml
new file mode 100644
index 00000000..586f7c9d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_anp_epg_selector/tasks/main.yml
@@ -0,0 +1,789 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+
+# - name: Ensure site exist
+# mso_site: &site_present
+# host: '{{ mso_hostname }}'
+# username: '{{ mso_username }}'
+# password: '{{ mso_password }}'
+# validate_certs: '{{ mso_validate_certs | default(false) }}'
+# use_ssl: '{{ mso_use_ssl | default(true) }}'
+# use_proxy: '{{ mso_use_proxy | default(true) }}'
+# output_level: '{{ mso_output_level | default("info") }}'
+# site: '{{ mso_site | default("ansible_test") }}'
+# apic_username: '{{ apic_username }}'
+# apic_password: '{{ apic_password }}'
+# apic_site_id: '{{ apic_site_id | default(101) }}'
+# urls:
+# - https://{{ apic_hostname }}
+# state: present
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ # sites:
+ # - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+
+- name: Ensure schema 1 with Template 2 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 2
+ state: present
+
+- name: Ensure schema 2 with Template 3 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Ensure ANP exist
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ item.schema }}'
+ template: '{{ item.template }}'
+ anp: ANP
+ state: present
+ loop:
+ - { schema: '{{ mso_schema | default("ansible_test") }}', template: 'Template 1' }
+ - { schema: '{{ mso_schema | default("ansible_test") }}_2', template: 'Template 3' }
+
+# ADD EPGs
+- name: Ensure EPGs exist
+ mso_schema_template_anp_epg:
+ <<: *mso_info
+ schema: '{{ item.schema }}'
+ template: '{{ item.template }}'
+ anp: ANP
+ epg: '{{ item.epg }}'
+ state: present
+ loop:
+ - { schema: '{{ mso_schema | default("ansible_test") }}', template: 'Template 1', epg: 'ansible_test_1' }
+ - { schema: '{{ mso_schema | default("ansible_test") }}_2', template: 'Template 3', epg: 'ansible_test_3' }
+
+# ADD Selector to EPG
+- name: Add Selector to EPG (check_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: present
+ check_mode: yes
+ register: cm_add_selector_1
+
+- name: Verify cm_add_selector_1
+ assert:
+ that:
+ - cm_add_selector_1 is changed
+ - cm_add_selector_1.previous == {}
+ - cm_add_selector_1.current.name == "selector_1"
+ - cm_add_selector_1.current.expressions == []
+
+- name: Add Selector 1 to EPG with space in selector name (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector 1
+ state: present
+ ignore_errors: yes
+ register: nm_add_selector1_with_space_in_name
+
+- name: Verify nm_add_selector1_with_space_in_name
+ assert:
+ that:
+ - nm_add_selector1_with_space_in_name is not changed
+ - nm_add_selector1_with_space_in_name.msg == "There should not be any space in selector name."
+
+- name: Add Selector to EPG (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: present
+ register: nm_add_selector_1
+
+- name: Verify nm_add_selector_1
+ assert:
+ that:
+ - nm_add_selector_1 is changed
+ - nm_add_selector_1.previous == {}
+ - nm_add_selector_1.current.name == "selector_1"
+ - nm_add_selector_1.current.expressions == []
+
+- name: Add Selector to EPG again (check_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: present
+ check_mode: yes
+ register: cm_add_selector_1_again
+
+- name: Verify cm_add_selector_1_again
+ assert:
+ that:
+ - cm_add_selector_1_again is not changed
+ - cm_add_selector_1_again.previous.name == "selector_1"
+ - cm_add_selector_1_again.previous.expressions == []
+ - cm_add_selector_1_again.current.name == "selector_1"
+ - cm_add_selector_1_again.current.expressions == []
+
+- name: Add Selector to EPG again (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: present
+ register: nm_add_selector_1_again
+
+- name: Verify nm_add_selector_1_again
+ assert:
+ that:
+ - nm_add_selector_1_again is not changed
+ - nm_add_selector_1_again.previous.name == "selector_1"
+ - nm_add_selector_1_again.previous.expressions == []
+ - nm_add_selector_1_again.current.name == "selector_1"
+ - nm_add_selector_1_again.current.expressions == []
+
+- name: Add Selector 2 to EPG (check_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_2
+ expressions:
+ - type: expression_1
+ operator: in
+ value: test
+ state: present
+ check_mode: yes
+ register: cm_add_selector_2
+
+- name: Verify cm_add_selector_2
+ assert:
+ that:
+ - cm_add_selector_2 is changed
+ - cm_add_selector_2.previous == {}
+ - cm_add_selector_2.current.name == "selector_2"
+ - cm_add_selector_2.current.expressions[0].key == "Custom:expression_1"
+ - cm_add_selector_2.current.expressions[0].operator == "in"
+ - cm_add_selector_2.current.expressions[0].value == "test"
+
+- name: Add Selector 2 to EPG (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_2
+ expressions:
+ - type: expression_1
+ operator: in
+ value: test
+ state: present
+ register: nm_add_selector_2
+
+- name: Verify nm_add_selector_2
+ assert:
+ that:
+ - nm_add_selector_2 is changed
+ - nm_add_selector_2.previous == {}
+ - nm_add_selector_2.current.name == "selector_2"
+ - nm_add_selector_2.current.expressions[0].key == "Custom:expression_1"
+ - nm_add_selector_2.current.expressions[0].operator == "in"
+ - nm_add_selector_2.current.expressions[0].value == "test"
+
+- name: Add Selector 2 to EPG with space in expression type (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_2
+ expressions:
+ - type: expression 1
+ operator: in
+ value: test
+ state: present
+ ignore_errors: yes
+ register: nm_add_selector2_with_space_in_expression_type
+
+- name: Verify nm_add_selector2_with_space_in_expression_type
+ assert:
+ that:
+ - nm_add_selector2_with_space_in_expression_type is not changed
+ - nm_add_selector2_with_space_in_expression_type.msg == "There should not be any space in 'type' attribute of expression 'expression 1'"
+
+- name: Change Selector 2 - keyExist(normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_2
+ expressions:
+ - type: expression_5
+ operator: has_key
+ value: test
+ state: present
+ ignore_errors: yes
+ register: nm_change_selector_2_key_exist
+
+- name: Verify nm_change_selector_2_key_exist
+ assert:
+ that:
+ - nm_change_selector_2_key_exist is not changed
+ - nm_change_selector_2_key_exist.msg == "Attribute 'value' is not supported for operator 'has_key' in expression 'expression_5'"
+
+- name: Change Selector 2 - keyNotExist (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_2
+ expressions:
+ - type: expression_6
+ operator: does_not_have_key
+ value: test
+ state: present
+ ignore_errors: yes
+ register: nm_change_selector_2_key_not_exist
+
+- name: Verify nm_change_selector_2_key_not_exist
+ assert:
+ that:
+ - nm_change_selector_2_key_not_exist is not changed
+ - nm_change_selector_2_key_not_exist.msg == "Attribute 'value' is not supported for operator 'does_not_have_key' in expression 'expression_6'"
+
+- name: Change Selector 2 - equals (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_2
+ expressions:
+ - type: expression_6
+ operator: equals
+ state: present
+ ignore_errors: yes
+ register: nm_change_selector_2_equals
+
+- name: Verify nm_change_selector_2_equals
+ assert:
+ that:
+ - nm_change_selector_2_equals is not changed
+ - nm_change_selector_2_equals.msg == "Attribute 'value' needed for operator 'equals' in expression 'expression_6'"
+
+- name: Change Selector 2 expressions (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_2
+ expressions:
+ - type: expression_1
+ operator: in
+ value: test
+ - type: expression_2
+ operator: not_in
+ value: test
+ - type: expression_3
+ operator: equals
+ value: test
+ - type: expression_4
+ operator: not_equals
+ value: test
+ - type: expression_5
+ operator: has_key
+ value:
+ - type: expression_6
+ operator: does_not_have_key
+ state: present
+ register: nm_change_selector_2
+
+- name: Verify nm_change_selector_2
+ assert:
+ that:
+ - nm_change_selector_2 is changed
+ - nm_change_selector_2.current.name == "selector_2"
+ - nm_change_selector_2.current.expressions | length == 6
+
+- name: Change Selector 2 expressions again (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_2
+ expressions:
+ - type: expression_1
+ operator: in
+ value: test
+ - type: expression_2
+ operator: not_in
+ value: test
+ - type: expression_3
+ operator: equals
+ value: test
+ - type: expression_4
+ operator: not_equals
+ value: test
+ - type: expression_5
+ operator: has_key
+ value:
+ - type: expression_6
+ operator: does_not_have_key
+ state: present
+ register: nm_change_selector_2_again
+
+- name: Verify nm_change_selector_2_again
+ assert:
+ that:
+ - nm_change_selector_2_again is not changed
+ - nm_change_selector_2_again.current.name == "selector_2"
+ - nm_change_selector_2_again.current.expressions | length == 6
+
+- name: Query all selectors (check_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ state: query
+ check_mode: yes
+ register: cm_query_all_selectors
+
+- name: Verify cm_query_all_selectors
+ assert:
+ that:
+ - cm_query_all_selectors is not changed
+ - cm_query_all_selectors.current | length == 2
+ - cm_query_all_selectors.current[0].name == "selector_1"
+ - cm_query_all_selectors.current[1].name == "selector_2"
+ - cm_query_all_selectors.current[0].expressions == []
+ - cm_query_all_selectors.current[1].expressions | length == 6
+
+- name: Query all selectors (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ state: query
+ register: nm_query_all_selectors
+
+- name: Verify nm_query_all_selectors
+ assert:
+ that:
+ - nm_query_all_selectors is not changed
+ - nm_query_all_selectors.current | length == 2
+ - nm_query_all_selectors.current[0].name == "selector_1"
+ - nm_query_all_selectors.current[1].name == "selector_2"
+ - nm_query_all_selectors.current[0].expressions == []
+ - nm_query_all_selectors.current[1].expressions | length == 6
+
+- name: Query specific selector (check_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: query
+ check_mode: yes
+ register: cm_query_selector1
+
+- name: Verify cm_query_selector1
+ assert:
+ that:
+ - cm_query_selector1 is not changed
+ - cm_query_selector1.current.name == "selector_1"
+ - cm_query_selector1.current.expressions == []
+
+- name: Query specific selector (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: query
+ register: nm_query_selector1
+
+- name: Verify nm_query_selector1
+ assert:
+ that:
+ - nm_query_selector1 is not changed
+ - nm_query_selector1.current.name == "selector_1"
+ - nm_query_selector1.current.expressions == []
+
+- name: Query specific selector2 (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_2
+ state: query
+ register: nm_query_selector2
+
+- name: Verify nm_query_selector2
+ assert:
+ that:
+ - nm_query_selector2 is not changed
+ - nm_query_selector2.current.name == "selector_2"
+ - nm_query_selector2.current.expressions | length == 6
+ - nm_query_selector2.current.expressions[0].key == "Custom:expression_1"
+ - nm_query_selector2.current.expressions[0].operator == "in"
+ - nm_query_selector2.current.expressions[0].value == "test"
+ - nm_query_selector2.current.expressions[1].key == "Custom:expression_2"
+ - nm_query_selector2.current.expressions[1].operator == "notIn"
+ - nm_query_selector2.current.expressions[1].value == "test"
+ - nm_query_selector2.current.expressions[2].key == "Custom:expression_3"
+ - nm_query_selector2.current.expressions[2].operator == "equals"
+ - nm_query_selector2.current.expressions[2].value == "test"
+ - nm_query_selector2.current.expressions[3].key == "Custom:expression_4"
+ - nm_query_selector2.current.expressions[3].operator == "notEquals"
+ - nm_query_selector2.current.expressions[3].value == "test"
+ - nm_query_selector2.current.expressions[4].key == "Custom:expression_5"
+ - nm_query_selector2.current.expressions[4].operator == "keyExist"
+ - nm_query_selector2.current.expressions[4].value == ""
+ - nm_query_selector2.current.expressions[5].key == "Custom:expression_6"
+ - nm_query_selector2.current.expressions[5].operator == "keyNotExist"
+ - nm_query_selector2.current.expressions[5].value == ""
+
+# - name: Remove selector 1 (check_mode)
+# mso_schema_template_anp_epg_selector:
+# <<: *mso_info
+# schema: '{{ mso_schema | default("ansible_test") }}'
+# template: Template 1
+# anp: ANP
+# epg: ansible_test_1
+# selector: selector 1
+# state: absent
+# check_mode: yes
+# register: cm_remove_selector_1
+
+# - name: Verify cm_remove_selector_1
+# assert:
+# that:
+# - cm_remove_selector_1 is changed
+# - cm_remove_selector_1.current == {}
+
+# - name: Remove selector 1 (normal_mode)
+# mso_schema_template_anp_epg_selector:
+# <<: *mso_info
+# schema: '{{ mso_schema | default("ansible_test") }}'
+# template: Template 1
+# anp: ANP
+# epg: ansible_test_1
+# selector: selector 1
+# state: absent
+# register: nm_remove_selector_1
+
+# - name: Verify nm_remove_selector_1
+# assert:
+# that:
+# - nm_remove_selector_1 is changed
+# - nm_remove_selector_1.current == {}
+
+- name: Remove selector 2 (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_2
+ state: absent
+ register: nm_remove_selector_2
+
+- name: Verify nm_remove_selector_2
+ assert:
+ that:
+ - nm_remove_selector_2 is changed
+ - nm_remove_selector_2.current == {}
+
+# QUERY NON-EXISTING Selector to EPG
+- name: Query non-existing selector (check_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: non_existing_selector
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_selector
+
+- name: Query non-existing selector (normal mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: non_existing_selector
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_selector
+
+- name: Verify cm_query_non_selector and nm_query_non_selector
+ assert:
+ that:
+ - cm_query_non_selector is not changed
+ - nm_query_non_selector is not changed
+ - cm_query_non_selector == nm_query_non_selector
+ - cm_query_non_selector.msg == "Selector 'non_existing_selector' not found"
+ - nm_query_non_selector.msg == "Selector 'non_existing_selector' not found"
+
+# QUERY NON-EXISTING EPG
+- name: Query non-existing EPG (check_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: non_existing_epg
+ selector: selector_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_epg
+
+- name: Query non-existing EPG (normal mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: non_existing_epg
+ selector: selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_epg
+
+- name: Verify query_non_epg
+ assert:
+ that:
+ - cm_query_non_epg is not changed
+ - nm_query_non_epg is not changed
+ - cm_query_non_epg == nm_query_non_epg
+ - cm_query_non_epg.msg == nm_query_non_epg.msg == "Provided epg 'non_existing_epg' does not exist. Existing epgs{{':'}} ansible_test_1"
+
+# QUERY NON-EXISTING ANP
+- name: Query non-existing ANP (check_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: non_existing_anp
+ epg: ansible_test_1
+ selector: selector_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_anp
+
+- name: Query non-existing ANP (normal mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: non_existing_anp
+ epg: ansible_test_1
+ selector: selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_anp
+
+- name: Verify query_non_anp
+ assert:
+ that:
+ - cm_query_non_anp is not changed
+ - nm_query_non_anp is not changed
+ - cm_query_non_anp == nm_query_non_anp
+ - cm_query_non_anp.msg == nm_query_non_anp.msg == "Provided anp 'non_existing_anp' does not exist. Existing anps{{':'}} ANP"
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state (check_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: non-existing-state
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: Non-existing state (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state == nm_non_existing_state
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non-existing-state"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template (check_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non-existing-template
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non-existing-template
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema (check_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: non-existing-schema
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema (normal_mode)
+ mso_schema_template_anp_epg_selector:
+ <<: *mso_info
+ schema: non-existing-schema
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ selector: selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non-existing-schema' does not exist" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd/tasks/main.yml
new file mode 100644
index 00000000..9b3a2e31
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd/tasks/main.yml
@@ -0,0 +1,1171 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+- name: Set version vars
+ set_fact:
+ mso_l3mcast: false
+ when: version.current.version[:5] == '2.2.4'
+
+- name: Ensure site exist
+ mso_site: &site_present
+ <<: *mso_info
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(101) }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant: &tenant_present
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ sites:
+ - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with exist
+ mso_schema_template: &schema_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template1
+ state: present
+
+- name: Ensure schema 1 with Template2 exists
+ mso_schema_template:
+ <<: *schema_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template2
+
+- name: Ensure schema 2 with Template3 exists
+ mso_schema_template:
+ <<: *schema_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template3
+
+- name: Ensure schema 2 with Template5 exists
+ mso_schema_template:
+ <<: *schema_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template5
+
+- name: Ensure VRF exist
+ mso_schema_template_vrf: &vrf_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ vrf: VRF
+ layer3_multicast: true
+ state: present
+
+- name: Ensure VRF2 exist
+ mso_schema_template_vrf:
+ <<: *vrf_present
+ vrf: VRF2
+
+- name: Ensure VRF3 exist
+ mso_schema_template_vrf:
+ <<: *vrf_present
+ template: Template2
+ vrf: VRF3
+
+- name: Ensure VRF4 exist
+ mso_schema_template_vrf:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template3
+ vrf: VRF4
+
+- name: Ensure VRF5 exists
+ mso_schema_template_vrf:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ vrf: VRF5
+
+- name: Ensure ansible_test_1 BD does not exist
+ mso_schema_template_bd:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ vrf:
+ name: VRF
+ state: absent
+
+- name: Ensure ansible_test_2 BD does not exist
+ mso_schema_template_bd:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template2
+ bd: ansible_test_2
+ vrf:
+ name: VRF
+ state: absent
+
+- name: Ensure ansible_test_3 BD does not exist
+ mso_schema_template_bd:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template3
+ bd: ansible_test_3
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ state: absent
+
+- name: Ensure ansible_test_4 BD does not exist
+ mso_schema_template_bd:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_4
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ state: absent
+
+# ADD BD
+- name: Add bd (check_mode)
+ mso_schema_template_bd: &bd_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ vrf:
+ name: VRF
+ state: present
+ check_mode: yes
+ register: cm_add_bd
+
+- name: Verify cm_add_bd
+ assert:
+ that:
+ - cm_add_bd is changed
+ - cm_add_bd.previous == {}
+ - cm_add_bd.current.name == "ansible_test_1"
+ - cm_add_bd.current.vrfRef.templateName == "Template1"
+ - cm_add_bd.current.vrfRef.vrfName == "VRF"
+
+- name: Add bd (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ register: nm_add_bd
+
+- name: Verify nm_add_bd
+ assert:
+ that:
+ - nm_add_bd is changed
+ - nm_add_bd.previous == {}
+ - nm_add_bd.current.name == "ansible_test_1"
+ - nm_add_bd.current.vrfRef.templateName == "Template1"
+ - nm_add_bd.current.vrfRef.vrfName == "VRF"
+ - cm_add_bd.current.vrfRef.schemaId == nm_add_bd.current.vrfRef.schemaId
+
+- name: Add bd again (check_mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ check_mode: yes
+ register: cm_add_bd_again
+
+- name: Verify cm_add_bd_again
+ assert:
+ that:
+ - cm_add_bd_again is not changed
+ - cm_add_bd_again.previous.name == "ansible_test_1"
+ - cm_add_bd_again.current.name == "ansible_test_1"
+ - cm_add_bd_again.previous.vrfRef.templateName == "Template1"
+ - cm_add_bd_again.current.vrfRef.templateName == "Template1"
+ - cm_add_bd_again.previous.vrfRef.vrfName == "VRF"
+ - cm_add_bd_again.current.vrfRef.vrfName == "VRF"
+ - cm_add_bd_again.previous.vrfRef.schemaId == cm_add_bd_again.current.vrfRef.schemaId
+
+
+- name: Add bd again (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ register: nm_add_bd_again
+
+- name: Verify nm_add_bd_again
+ assert:
+ that:
+ - nm_add_bd_again is not changed
+ - nm_add_bd_again.previous.name == "ansible_test_1"
+ - nm_add_bd_again.current.name == "ansible_test_1"
+ - nm_add_bd_again.previous.vrfRef.templateName == "Template1"
+ - nm_add_bd_again.current.vrfRef.templateName == "Template1"
+ - nm_add_bd_again.previous.vrfRef.vrfName == "VRF"
+ - nm_add_bd_again.current.vrfRef.vrfName == "VRF"
+ - nm_add_bd_again.previous.vrfRef.schemaId == nm_add_bd_again.current.vrfRef.schemaId
+
+- name: Add bd 2 (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template2
+ bd: ansible_test_2
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: flood
+ layer3_multicast: true
+ subnets:
+ - subnet: 10.0.0.128/24
+ - subnet: 10.0.1.254/24
+ description: 1234567890
+ - subnet: 172.16.0.1/24
+ description: "My description for a subnet"
+ scope: public
+ shared: true
+ no_default_gateway: false
+ querier: true
+ - ip: 192.168.0.254/24
+ description: "My description for a subnet"
+ scope: private
+ shared: false
+ no_default_gateway: true
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ dhcp_policy:
+ name: ansible_test
+ version: 1
+ dhcp_option_policy:
+ name: ansible_test_option
+ version: 1
+ register: nm_add_bd_2
+
+- name: Add bd 3 (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template3
+ bd: ansible_test_3
+ vrf:
+ name: VRF4
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template3
+ register: nm_add_bd_3
+
+- name: Add bd 4 (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_4
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ register: nm_add_bd_4
+
+- name: Verify nm_add_bd_2 and nm_add_bd_3
+ assert:
+ that:
+ - nm_add_bd_2 is changed
+ - nm_add_bd_3 is changed
+ - nm_add_bd_2.current.name == "ansible_test_2"
+ - nm_add_bd_3.current.name == "ansible_test_3"
+ - nm_add_bd_2.current.vrfRef.templateName == "Template1"
+ - nm_add_bd_3.current.vrfRef.templateName == "Template3"
+ - nm_add_bd_2.current.vrfRef.vrfName == "VRF"
+ - nm_add_bd_3.current.vrfRef.vrfName == "VRF4"
+ - nm_add_bd_2.current.vrfRef.schemaId == nm_add_bd.current.vrfRef.schemaId
+ - nm_add_bd_2.current.intersiteBumTrafficAllow == true
+ - nm_add_bd_2.current.optimizeWanBandwidth == true
+ - nm_add_bd_2.current.l2Stretch == true
+ - nm_add_bd_2.current.l2UnknownUnicast == "flood"
+ - nm_add_bd_2.current.l3MCast == true
+ - nm_add_bd_2.current.subnets[0].description == "10.0.0.128/24"
+ - nm_add_bd_2.current.subnets[0].ip == "10.0.0.128/24"
+ - nm_add_bd_2.current.subnets[0].noDefaultGateway == false
+ - nm_add_bd_2.current.subnets[0].scope == "private"
+ - nm_add_bd_2.current.subnets[0].shared == false
+ - nm_add_bd_2.current.subnets[0].querier == false
+ - nm_add_bd_2.current.subnets[1].description == "1234567890"
+ - nm_add_bd_2.current.subnets[1].ip == "10.0.1.254/24"
+ - nm_add_bd_2.current.subnets[1].noDefaultGateway == false
+ - nm_add_bd_2.current.subnets[1].scope == "private"
+ - nm_add_bd_2.current.subnets[1].shared == false
+ - nm_add_bd_2.current.subnets[1].querier == false
+ - nm_add_bd_2.current.subnets[2].description == "My description for a subnet"
+ - nm_add_bd_2.current.subnets[2].ip == "172.16.0.1/24"
+ - nm_add_bd_2.current.subnets[2].noDefaultGateway == false
+ - nm_add_bd_2.current.subnets[2].scope == "public"
+ - nm_add_bd_2.current.subnets[2].shared == true
+ - nm_add_bd_2.current.subnets[2].querier == true
+ - nm_add_bd_2.current.subnets[3].description == "My description for a subnet"
+ - nm_add_bd_2.current.subnets[3].ip == "192.168.0.254/24"
+ - nm_add_bd_2.current.subnets[3].noDefaultGateway == true
+ - nm_add_bd_2.current.subnets[3].scope == "private"
+ - nm_add_bd_2.current.subnets[3].shared == false
+ - nm_add_bd_2.current.subnets[3].querier == false
+
+- name: Add bd 5 (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ bd: ansible_test_5
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: flood
+ layer3_multicast: false
+ unknown_multicast_flooding: flood
+ multi_destination_flooding: drop
+ ipv6_unknown_multicast_flooding: flood
+ arp_flooding: true
+ virtual_mac_address: 00:00:5E:00:01:3C
+ vrf:
+ name: VRF5
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ dhcp_policy:
+ name: ansible_test
+ version: 1
+ dhcp_option_policy:
+ name: ansible_test_option
+ version: 1
+ register: nm_add_bd_5
+
+- name: Verify nm_add_bd_5 for a version that's not 3.1
+ assert:
+ that:
+ - nm_add_bd_5 is changed
+ - nm_add_bd_5.current.name == "ansible_test_5"
+ - nm_add_bd_5.current.vrfRef.templateName == "Template5"
+ - nm_add_bd_5.current.vrfRef.vrfName == "VRF5"
+ - nm_add_bd_5.current.intersiteBumTrafficAllow == true
+ - nm_add_bd_5.current.optimizeWanBandwidth == true
+ - nm_add_bd_5.current.l2Stretch == true
+ - nm_add_bd_5.current.l2UnknownUnicast == "flood"
+ - nm_add_bd_5.current.l3MCast == false
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify nm_add_bd_5 for a version that's 3.1
+ assert:
+ that:
+ - nm_add_bd_5 is changed
+ - nm_add_bd_5.current.name == "ansible_test_5"
+ - nm_add_bd_5.current.vrfRef.templateName == "Template5"
+ - nm_add_bd_5.current.vrfRef.vrfName == "VRF5"
+ - nm_add_bd_5.current.intersiteBumTrafficAllow == true
+ - nm_add_bd_5.current.optimizeWanBandwidth == true
+ - nm_add_bd_5.current.l2Stretch == true
+ - nm_add_bd_5.current.l2UnknownUnicast == "flood"
+ - nm_add_bd_5.current.l3MCast == false
+ - nm_add_bd_5.current.unkMcastAct == "flood"
+ - nm_add_bd_5.current.v6unkMcastAct == "flood"
+ - nm_add_bd_5.current.vmac == "00:00:5E:00:01:3C"
+ - nm_add_bd_5.current.multiDstPktAct == "drop"
+ - nm_add_bd_5.current.arpFlood == true
+ when: version.current.version is version('3.1.1g', '==')
+
+- name: Add bd 5 again (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ bd: ansible_test_5
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: flood
+ layer3_multicast: false
+ unknown_multicast_flooding: flood
+ multi_destination_flooding: drop
+ ipv6_unknown_multicast_flooding: flood
+ arp_flooding: true
+ virtual_mac_address: 00:00:5E:00:01:3C
+ vrf:
+ name: VRF5
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ dhcp_policy:
+ name: ansible_test
+ version: 1
+ dhcp_option_policy:
+ name: ansible_test_option
+ version: 1
+ register: nm_add_again_bd_5
+
+- name: Verify nm_add_again_bd_5 for a version that's not 3.1
+ assert:
+ that:
+ - nm_add_again_bd_5 is not changed
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify nm_add_again_bd_5 for a version that's 3.1
+ assert:
+ that:
+ - nm_add_again_bd_5 is not changed
+ when: version.current.version is version('3.1.1g', '==')
+
+- name: Add bd 5 with different values for new options (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ bd: ansible_test_5
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: flood
+ layer3_multicast: false
+ unknown_multicast_flooding: optimized_flooding
+ multi_destination_flooding: flood_in_bd
+ ipv6_unknown_multicast_flooding: optimized_flooding
+ arp_flooding: true
+ virtual_mac_address: 00:00:5E:00:02:3C
+ vrf:
+ name: VRF5
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ dhcp_policy:
+ name: ansible_test
+ version: 1
+ dhcp_option_policy:
+ name: ansible_test_option
+ version: 1
+ register: nm_bd_5_options
+
+- name: Verify nm_bd_5_options for a version that's not 3.1
+ assert:
+ that:
+ - nm_bd_5_options is not changed
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify nm_bd_5_options for a version that's 3.1
+ assert:
+ that:
+ - nm_bd_5_options is changed
+ - nm_bd_5_options.current.unkMcastAct == "opt-flood"
+ - nm_bd_5_options.current.v6unkMcastAct == "opt-flood"
+ - nm_bd_5_options.current.multiDstPktAct == "bd-flood"
+ - nm_bd_5_options.current.vmac == "00:00:5E:00:02:3C"
+ when: version.current.version is version('3.1.1g', '==')
+
+- name: Change bd 5_1 (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ bd: ansible_test_5
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: proxy
+ layer3_multicast: false
+ unknown_multicast_flooding: flood
+ multi_destination_flooding: drop
+ ipv6_unknown_multicast_flooding: flood
+ arp_flooding: true
+ virtual_mac_address: 00:00:5E:00:01:3C
+ vrf:
+ name: VRF5
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ dhcp_policy:
+ name: ansible_test
+ version: 1
+ dhcp_option_policy:
+ name: ansible_test_option
+ version: 1
+ register: nm_change_bd_5_1
+
+- name: Verify nm_change_bd_5_1 for a version that's not 3.1
+ assert:
+ that:
+ - nm_change_bd_5_1 is changed
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify nm_change_bd_5_1 for a version that's 3.1
+ assert:
+ that:
+ - nm_change_bd_5_1 is changed
+ - nm_change_bd_5_1.current.arpFlood == true
+ when: version.current.version is version('3.1.1g', '==')
+
+- name: Change bd 5_2 (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ bd: ansible_test_5
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: flood
+ layer3_multicast: false
+ unknown_multicast_flooding: flood
+ multi_destination_flooding: drop
+ ipv6_unknown_multicast_flooding: flood
+ arp_flooding: false
+ virtual_mac_address: 00:00:5E:00:01:3C
+ vrf:
+ name: VRF5
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ dhcp_policy:
+ name: ansible_test
+ version: 1
+ dhcp_option_policy:
+ name: ansible_test_option
+ version: 1
+ ignore_errors: yes
+ register: nm_change_bd_5_2
+
+- name: Verify nm_change_bd_5_2 for a version that's not 3.1
+ assert:
+ that:
+ - nm_change_bd_5_2 is changed
+ - nm_change_bd_5_2.current.l2UnknownUnicast == "flood"
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify nm_change_bd_5_2 for a version that's 3.1
+ assert:
+ that:
+ - nm_change_bd_5_2 is changed
+ - nm_change_bd_5_2.current.arpFlood == true
+ when: version.current.version is version('3.1.1g', '==')
+
+- name: Change bd 5_3 (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ bd: ansible_test_5
+ intersite_bum_traffic: false
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: flood
+ layer3_multicast: false
+ unknown_multicast_flooding: flood
+ multi_destination_flooding: drop
+ ipv6_unknown_multicast_flooding: flood
+ arp_flooding: false
+ virtual_mac_address: 00:00:5E:00:01:3C
+ vrf:
+ name: VRF5
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ dhcp_policy:
+ name: ansible_test
+ version: 1
+ dhcp_option_policy:
+ name: ansible_test_option
+ version: 1
+ ignore_errors: yes
+ register: nm_change_bd_5_3
+
+- name: Verify nm_change_bd_5_3 for a version that's not 3.1
+ assert:
+ that:
+ - nm_change_bd_5_3 is changed
+ - nm_change_bd_5_3.msg is match ("MSO Error 143{{':'}} Invalid Field{{':'}} BD 'ansible_test_5' l2UnknownUnicast cannot be flood when intersiteBumTrafficAllow is off")
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify nm_change_bd_5_3 for a version that's 3.1
+ assert:
+ that:
+ - nm_change_bd_5_3 is changed
+ - nm_change_bd_5_3.msg is match ("MSO Error 400{{':'}} Bad Request{{':'}} Patch Failed, Received{{':'}} BD 'ansible_test_5' l2UnknownUnicast cannot be flood when intersiteBumTrafficAllow is off exception while trying to update schema")
+ when: version.current.version is version('3.1.1g', '==')
+
+- name: Change bd 5 for query (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ bd: ansible_test_5
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: flood
+ layer3_multicast: false
+ unknown_multicast_flooding: flood
+ multi_destination_flooding: drop
+ ipv6_unknown_multicast_flooding: flood
+ arp_flooding: true
+ virtual_mac_address: 00:00:5E:00:01:3C
+ vrf:
+ name: VRF5
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ dhcp_policy:
+ name: ansible_test
+ version: 1
+ dhcp_option_policy:
+ name: ansible_test_option
+ version: 1
+
+# CHANGE BD
+- name: Change bd (check_mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ vrf:
+ name: VRF2
+ check_mode: yes
+ register: cm_change_bd
+
+- name: Verify cm_change_bd
+ assert:
+ that:
+ - cm_change_bd is changed
+ - cm_change_bd.current.name == 'ansible_test_1'
+ - cm_change_bd.current.vrfRef.vrfName == 'VRF2'
+ - cm_change_bd.current.vrfRef.templateName == "Template1"
+ - cm_change_bd.current.vrfRef.schemaId == cm_change_bd.previous.vrfRef.schemaId
+
+- name: Change bd (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ vrf:
+ name: VRF2
+ output_level: debug
+ register: nm_change_bd
+
+- name: Verify nm_change_bd
+ assert:
+ that:
+ - nm_change_bd is changed
+ - nm_change_bd.current.name == 'ansible_test_1'
+ - nm_change_bd.current.vrfRef.vrfName == 'VRF2'
+ - nm_change_bd.current.vrfRef.templateName == "Template1"
+ - nm_change_bd.current.vrfRef.schemaId == nm_change_bd.previous.vrfRef.schemaId
+
+- name: Change bd again (check_mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ vrf:
+ name: VRF2
+ check_mode: yes
+ register: cm_change_bd_again
+
+- name: Verify cm_change_bd_again
+ assert:
+ that:
+ - cm_change_bd_again is not changed
+ - cm_change_bd_again.current.name == 'ansible_test_1'
+ - cm_change_bd_again.current.vrfRef.vrfName == 'VRF2'
+ - cm_change_bd_again.current.vrfRef.templateName == "Template1"
+ - cm_change_bd_again.current.vrfRef.schemaId == cm_change_bd_again.previous.vrfRef.schemaId
+
+- name: Change bd again (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ vrf:
+ name: VRF2
+ register: nm_change_bd_again
+
+- name: Verify nm_change_bd_again
+ assert:
+ that:
+ - nm_change_bd_again is not changed
+ - nm_change_bd_again.current.name == 'ansible_test_1'
+ - nm_change_bd_again.current.vrfRef.vrfName == 'VRF2'
+ - nm_change_bd_again.current.vrfRef.templateName == "Template1"
+ - nm_change_bd_again.current.vrfRef.schemaId == nm_change_bd_again.previous.vrfRef.schemaId
+
+- name: Change bd to VRF3 (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ vrf:
+ name: VRF3
+ template: Template2
+ register: nm_change_bd_vrf3
+
+- name: Change bd to VRF4 (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ vrf:
+ name: VRF4
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template3
+ register: nm_change_bd_vrf4
+
+- name: Verify nm_change_bd_vrf3 and nm_change_bd_vrf4
+ assert:
+ that:
+ - nm_change_bd_vrf3 is changed
+ - nm_change_bd_vrf3.current.name == nm_change_bd_vrf4.current.name == 'ansible_test_1'
+ - nm_change_bd_vrf3.current.vrfRef.vrfName == 'VRF3'
+ - nm_change_bd_vrf3.current.vrfRef.templateName == "Template2"
+ - nm_change_bd_vrf4.current.vrfRef.vrfName == 'VRF4'
+ - nm_change_bd_vrf4.current.vrfRef.templateName == "Template3"
+
+- name: Change bd 1 settings(normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: flood
+ layer3_multicast: '{{ mso_l3mcast | default(true) }}'
+ subnets:
+ - subnet: 10.1.0.128/24
+ - subnet: 10.1.1.254/24
+ description: 1234567890
+ - subnet: 172.17.0.1/24
+ description: "My description for a subnet"
+ scope: public
+ shared: true
+ no_default_gateway: false
+ querier: true
+ - ip: 192.168.1.254/24
+ description: "My description for a subnet"
+ scope: private
+ shared: false
+ no_default_gateway: true
+ vrf:
+ name: VRF3
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template2
+ register: nm_change_bd_1_settings
+
+- name: Change bd 1 subnets (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: flood
+ layer3_multicast: '{{ mso_l3mcast | default(true) }}'
+ subnets:
+ - subnet: 10.1.0.127/24
+ - subnet: 172.17.0.1/24
+ description: "New description for a subnet"
+ scope: private
+ shared: false
+ no_default_gateway: false
+ querier: false
+ - ip: 192.168.1.254/24
+ description: "My description for a subnet"
+ scope: private
+ shared: false
+ no_default_gateway: false
+ querier: true
+ vrf:
+ name: VRF3
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template2
+ register: nm_change_bd_1_subnets
+
+- name: Verify nm_change_bd_1_subnets
+ assert:
+ that:
+ - nm_change_bd_1_settings is changed
+ - nm_change_bd_1_settings.current.name == "ansible_test_1"
+ - nm_change_bd_1_settings.current.vrfRef.templateName == "Template2"
+ - nm_change_bd_1_settings.current.vrfRef.vrfName == "VRF3"
+ - nm_change_bd_1_settings.current.intersiteBumTrafficAllow == true
+ - nm_change_bd_1_settings.current.optimizeWanBandwidth == true
+ - nm_change_bd_1_settings.current.l2Stretch == true
+ - nm_change_bd_1_settings.current.l2UnknownUnicast == "flood"
+ - nm_change_bd_1_settings.current.subnets[0].description == "10.1.0.128/24"
+ - nm_change_bd_1_settings.current.subnets[0].ip == "10.1.0.128/24"
+ - nm_change_bd_1_settings.current.subnets[0].noDefaultGateway == false
+ - nm_change_bd_1_settings.current.subnets[0].scope == "private"
+ - nm_change_bd_1_settings.current.subnets[0].shared == false
+ - nm_change_bd_1_settings.current.subnets[0].querier == false
+ - nm_change_bd_1_settings.current.subnets[1].description == "1234567890"
+ - nm_change_bd_1_settings.current.subnets[1].ip == "10.1.1.254/24"
+ - nm_change_bd_1_settings.current.subnets[1].noDefaultGateway == false
+ - nm_change_bd_1_settings.current.subnets[1].scope == "private"
+ - nm_change_bd_1_settings.current.subnets[1].shared == false
+ - nm_change_bd_1_settings.current.subnets[1].querier == false
+ - nm_change_bd_1_settings.current.subnets[2].description == "My description for a subnet"
+ - nm_change_bd_1_settings.current.subnets[2].ip == "172.17.0.1/24"
+ - nm_change_bd_1_settings.current.subnets[2].noDefaultGateway == false
+ - nm_change_bd_1_settings.current.subnets[2].scope == "public"
+ - nm_change_bd_1_settings.current.subnets[2].shared == true
+ - nm_change_bd_1_settings.current.subnets[2].querier == true
+ - nm_change_bd_1_settings.current.subnets[3].description == "My description for a subnet"
+ - nm_change_bd_1_settings.current.subnets[3].ip == "192.168.1.254/24"
+ - nm_change_bd_1_settings.current.subnets[3].noDefaultGateway == true
+ - nm_change_bd_1_settings.current.subnets[3].scope == "private"
+ - nm_change_bd_1_settings.current.subnets[3].shared == false
+ - nm_change_bd_1_settings.current.subnets[3].querier == false
+ - nm_change_bd_1_settings is changed
+ - nm_change_bd_1_subnets.current.subnets | length == 3
+ - nm_change_bd_1_subnets.current.name == "ansible_test_1"
+ - nm_change_bd_1_subnets.current.vrfRef.templateName == "Template2"
+ - nm_change_bd_1_subnets.current.vrfRef.vrfName == "VRF3"
+ - nm_change_bd_1_subnets.current.intersiteBumTrafficAllow == true
+ - nm_change_bd_1_subnets.current.optimizeWanBandwidth == true
+ - nm_change_bd_1_subnets.current.l2Stretch == true
+ - nm_change_bd_1_subnets.current.l2UnknownUnicast == "flood"
+ - nm_change_bd_1_subnets.current.subnets[0].description == "10.1.0.127/24"
+ - nm_change_bd_1_subnets.current.subnets[0].ip == "10.1.0.127/24"
+ - nm_change_bd_1_subnets.current.subnets[0].noDefaultGateway == false
+ - nm_change_bd_1_subnets.current.subnets[0].scope == "private"
+ - nm_change_bd_1_subnets.current.subnets[0].shared == false
+ - nm_change_bd_1_subnets.current.subnets[0].querier == false
+ - nm_change_bd_1_subnets.current.subnets[1].description == "New description for a subnet"
+ - nm_change_bd_1_subnets.current.subnets[1].ip == "172.17.0.1/24"
+ - nm_change_bd_1_subnets.current.subnets[1].noDefaultGateway == false
+ - nm_change_bd_1_subnets.current.subnets[1].scope == "private"
+ - nm_change_bd_1_subnets.current.subnets[1].shared == false
+ - nm_change_bd_1_subnets.current.subnets[1].querier == false
+ - nm_change_bd_1_subnets.current.subnets[2].description == "My description for a subnet"
+ - nm_change_bd_1_subnets.current.subnets[2].ip == "192.168.1.254/24"
+ - nm_change_bd_1_subnets.current.subnets[2].noDefaultGateway == false
+ - nm_change_bd_1_subnets.current.subnets[2].scope == "private"
+ - nm_change_bd_1_subnets.current.subnets[2].shared == false
+ - nm_change_bd_1_subnets.current.subnets[2].querier == true
+
+- name: Verify l3MCast nm_change_bd_1_subnets (version == 2.2.4)
+ assert:
+ that:
+ - nm_change_bd_1_settings.current.l3MCast == false
+ - nm_change_bd_1_subnets.current.l3MCast == false
+ when: version.current.version[:5] == '2.2.4'
+
+- name: Verify l3MCast nm_change_bd_1_subnets (version != 2.2.4)
+ assert:
+ that:
+ - nm_change_bd_1_settings.current.l3MCast == true
+ - nm_change_bd_1_subnets.current.l3MCast == true
+ when: version.current.version[:5] != '2.2.4'
+
+# FIXME: Add missing DHCP Policy changes and checks (missing DHCP Policy module to make sure it is there.)
+
+# QUERY ALL BD
+- name: Query all bd (check_mode)
+ mso_schema_template_bd: &bd_query
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ state: query
+ check_mode: yes
+ register: cm_query_all_bds
+
+- name: Query all bd (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_query
+ register: nm_query_all_bds
+
+- name: Verify query_all_bds
+ assert:
+ that:
+ - cm_query_all_bds is not changed
+ - nm_query_all_bds is not changed
+ - cm_query_all_bds.current | length == cm_query_all_bds.current | length == 2
+
+
+# QUERY A BD
+- name: Query bd 1
+ mso_schema_template_bd:
+ <<: *bd_query
+ bd: ansible_test_1
+ check_mode: yes
+ register: cm_query_bd
+
+- name: Query bd 1
+ mso_schema_template_bd:
+ <<: *bd_query
+ bd: ansible_test_1
+ register: nm_query_bd
+
+- name: Query bd 2
+ mso_schema_template_bd:
+ <<: *bd_query
+ template: Template2
+ bd: ansible_test_2
+ register: nm_query_bd_2
+
+- name: Query bd 3
+ mso_schema_template_bd:
+ <<: *bd_query
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template3
+ bd: ansible_test_3
+ register: nm_query_bd_3
+
+- name: Query bd 5
+ mso_schema_template_bd:
+ <<: *bd_query
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ bd: ansible_test_5
+ register: nm_query_bd_5
+
+- name: Verify query_bd
+ assert:
+ that:
+ - cm_query_bd is not changed
+ - nm_query_bd is not changed
+ - cm_query_bd.current.name == nm_query_bd.current.name == "ansible_test_1"
+ - cm_query_bd == nm_query_bd
+ - nm_query_bd_2.current.name == "ansible_test_2"
+ - nm_query_bd_3.current.name == "ansible_test_3"
+ - nm_query_bd_2.current.intersiteBumTrafficAllow == true
+ - nm_query_bd_2.current.optimizeWanBandwidth == true
+ - nm_query_bd_2.current.l2Stretch == true
+ - nm_query_bd_2.current.l2UnknownUnicast == "flood"
+ - nm_query_bd_2.current.l3MCast == true
+ - nm_query_bd_2.current.subnets[0].description == "10.0.0.128/24"
+ - nm_query_bd_2.current.subnets[0].ip == "10.0.0.128/24"
+ - nm_query_bd_2.current.subnets[0].noDefaultGateway == false
+ - nm_query_bd_2.current.subnets[0].scope == "private"
+ - nm_query_bd_2.current.subnets[0].shared == false
+ - nm_query_bd_2.current.subnets[1].description == "1234567890"
+ - nm_query_bd_2.current.subnets[1].ip == "10.0.1.254/24"
+ - nm_query_bd_2.current.subnets[1].noDefaultGateway == false
+ - nm_query_bd_2.current.subnets[1].scope == "private"
+ - nm_query_bd_2.current.subnets[1].shared == false
+ - nm_query_bd_2.current.subnets[2].description == "My description for a subnet"
+ - nm_query_bd_2.current.subnets[2].ip == "172.16.0.1/24"
+ - nm_query_bd_2.current.subnets[2].noDefaultGateway == false
+ - nm_query_bd_2.current.subnets[2].scope == "public"
+ - nm_query_bd_2.current.subnets[2].shared == true
+ - nm_query_bd_2.current.subnets[3].description == "My description for a subnet"
+ - nm_query_bd_2.current.subnets[3].ip == "192.168.0.254/24"
+ - nm_query_bd_2.current.subnets[3].noDefaultGateway == true
+ - nm_query_bd_2.current.subnets[3].scope == "private"
+ - nm_query_bd_2.current.subnets[3].shared == false
+
+- name: Verify nm_query_bd_5 for a version that's not 3.1
+ assert:
+ that:
+ - nm_query_bd_5 is not changed
+ - nm_query_bd_5.current.name == "ansible_test_5"
+ - nm_query_bd_5.current.intersiteBumTrafficAllow == true
+ - nm_query_bd_5.current.optimizeWanBandwidth == true
+ - nm_query_bd_5.current.l2Stretch == true
+ - nm_query_bd_5.current.l2UnknownUnicast == "flood"
+ - nm_query_bd_5.current.l3MCast == false
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify nm_query_bd_5 for a version that's 3.1
+ assert:
+ that:
+ - nm_query_bd_5 is not changed
+ - nm_query_bd_5.current.name == "ansible_test_5"
+ - nm_query_bd_5.current.intersiteBumTrafficAllow == true
+ - nm_query_bd_5.current.optimizeWanBandwidth == true
+ - nm_query_bd_5.current.l2Stretch == true
+ - nm_query_bd_5.current.l2UnknownUnicast == "flood"
+ - nm_query_bd_5.current.l3MCast == false
+ - nm_query_bd_5.current.unkMcastAct == "flood"
+ - nm_query_bd_5.current.v6unkMcastAct == "flood"
+ - nm_query_bd_5.current.vmac == "00:00:5E:00:01:3C"
+ - nm_query_bd_5.current.multiDstPktAct == "drop"
+ - nm_query_bd_5.current.arpFlood == true
+ when: version.current.version is version('3.1.1g', '==')
+
+# REMOVE BD
+- name: Remove bd (check_mode)
+ mso_schema_template_bd: &bd_absent
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ state: absent
+ check_mode: yes
+ register: cm_remove_bd
+
+- name: Verify cm_remove_bd
+ assert:
+ that:
+ - cm_remove_bd is changed
+ - cm_remove_bd.current == {}
+
+- name: Remove bd (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_absent
+ register: nm_remove_bd
+
+- name: Verify nm_remove_bd
+ assert:
+ that:
+ - nm_remove_bd is changed
+ - nm_remove_bd.current == {}
+
+- name: Remove bd again (check_mode)
+ mso_schema_template_bd:
+ <<: *bd_absent
+ check_mode: yes
+ register: cm_remove_bd_again
+
+- name: Verify cm_remove_bd_again
+ assert:
+ that:
+ - cm_remove_bd_again is not changed
+ - cm_remove_bd_again.current == {}
+
+- name: Remove bd again (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_absent
+ register: nm_remove_bd_again
+
+- name: Verify nm_remove_bd_again
+ assert:
+ that:
+ - nm_remove_bd_again is not changed
+ - nm_remove_bd_again.current == {}
+
+- name: Remove bd 5 (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_absent
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template5
+ bd: ansible_test_5
+ register: nm_remove_bd_5
+
+- name: Verify nm_remove_bd_5
+ assert:
+ that:
+ - nm_remove_bd_5 is changed
+ - nm_remove_bd_5.current == {}
+
+# QUERY NON-EXISTING BD
+- name: Query non-existing bd (check_mode)
+ mso_schema_template_bd:
+ <<: *bd_query
+ bd: ansible_test_1
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_bd
+
+- name: Query non-existing bd (normal mode)
+ mso_schema_template_bd:
+ <<: *bd_query
+ bd: ansible_test_1
+ ignore_errors: yes
+ register: nm_query_non_bd
+
+- name: Verify query_non_bd
+ assert:
+ that:
+ - cm_query_non_bd is not changed
+ - nm_query_non_bd is not changed
+ - cm_query_non_bd == nm_query_non_bd
+ - cm_query_non_bd.msg == nm_query_non_bd.msg == "BD 'ansible_test_1' not found"
+
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state for bd (check_mode)
+ mso_schema_template_bd:
+ <<: *bd_query
+ state: non-existing-state
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: Non-existing state for bd (normal_mode)
+ mso_schema_template_bd:
+ <<: *bd_query
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state == nm_non_existing_state
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non-existing-state"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for bd (check_mode)
+ mso_schema_template_bd:
+ <<: *bd_query
+ schema: non-existing-schema
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema for bd (normal_mode)
+ mso_schema_template_bd:
+ <<: *bd_query
+ schema: non-existing-schema
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non-existing-schema' does not exist"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for bd (check_mode)
+ mso_schema_template_bd:
+ <<: *bd_query
+ template: non-existing-template
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template for bd (normal_mode)
+ mso_schema_template_bd:
+ <<: *bd_query
+ template: non-existing-template
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1, Template2"
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd_subnet/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd_subnet/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd_subnet/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd_subnet/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd_subnet/tasks/main.yml
new file mode 100644
index 00000000..c85f9bbc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_bd_subnet/tasks/main.yml
@@ -0,0 +1,507 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+- name: Set version vars
+ set_fact:
+ mso_l3mcast: false
+ when: version.current.version[:5] == '2.2.4'
+
+- name: Ensure site exist
+ mso_site: &site_present
+ <<: *mso_info
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(101) }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant: &tenant_present
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ sites:
+ - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template1 exist
+ mso_schema_template: &schema_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template1
+ state: present
+
+- name: Ensure schema 2 with Template2 exists
+ mso_schema_template:
+ <<: *schema_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template2
+ state: present
+
+- name: Ensure VRF exists
+ mso_schema_template_vrf: &vrf_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ vrf: VRF
+ layer3_multicast: true
+ state: present
+
+- name: Ensure VRF2 exists
+ mso_schema_template_vrf:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template2
+ vrf: VRF2
+
+# ADD BD
+- name: Add bd
+ mso_schema_template_bd: &bd_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: proxy
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ dhcp_policy:
+ name: ansible_test
+ version: 1
+ dhcp_option_policy:
+ name: ansible_test_option
+ version: 1
+ state: present
+
+- name: Add bd 2
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template2
+ bd: ansible_test_2
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: proxy
+ vrf:
+ name: VRF2
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template2
+ dhcp_policy:
+ name: ansible_test
+ version: 1
+ dhcp_option_policy:
+ name: ansible_test_option
+ version: 1
+
+- name: Add bd
+ mso_schema_template_bd:
+ <<: *bd_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_3
+ intersite_bum_traffic: true
+ optimize_wan_bandwidth: true
+ layer2_stretch: true
+ layer2_unknown_unicast: proxy
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ dhcp_policy:
+ name: ansible_test
+ version: 1
+ dhcp_option_policy:
+ name: ansible_test_option
+ version: 1
+ state: present
+
+# Add subnet
+- name: Add subnet in check mode
+ mso_schema_template_bd_subnet: &subnet_present
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ subnet: 172.16.0.1/24
+ description: "My description for a subnet"
+ scope: public
+ shared: true
+ no_default_gateway: false
+ querier: true
+ state: present
+ register: cm_add_subnet
+ check_mode: yes
+
+- name: Add subnet (normal mode)
+ mso_schema_template_bd_subnet:
+ <<: *subnet_present
+ register: nm_add_subnet
+
+- name: Add subnet again (normal mode)
+ mso_schema_template_bd_subnet:
+ <<: *subnet_present
+ register: nm_add_subnet_again
+
+- name: Add subnet for query all (normal mode)
+ mso_schema_template_bd_subnet:
+ <<: *subnet_present
+ subnet: 2.16.0.1/24
+
+- name: Verify cm_add_subnet and nm_add_subnet
+ assert:
+ that:
+ - cm_add_subnet is changed
+ - nm_add_subnet is changed
+ - nm_add_subnet_again is not changed
+ - cm_add_subnet.current.description == "My description for a subnet"
+ - cm_add_subnet.current.ip == "172.16.0.1/24"
+ - cm_add_subnet.current.noDefaultGateway == false
+ - cm_add_subnet.current.scope == "public"
+ - cm_add_subnet.current.shared == true
+ - cm_add_subnet.current.querier == true
+ - nm_add_subnet.current.description == "My description for a subnet"
+ - nm_add_subnet.current.ip == "172.16.0.1/24"
+ - nm_add_subnet.current.noDefaultGateway == false
+ - nm_add_subnet.current.scope == "public"
+ - nm_add_subnet.current.shared == true
+ - nm_add_subnet.current.querier == true
+
+- name: Add subnet 2 (normal mode)
+ mso_schema_template_bd_subnet:
+ <<: *subnet_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template2
+ bd: ansible_test_2
+ subnet: 10.1.1.1/24
+ description: "My description for a subnet with virtual ip"
+ scope: public
+ shared: true
+ no_default_gateway: false
+ querier: true
+ is_virtual_ip: true
+ register: nm_add_subnet_2
+
+- name: Verify nm_bd_2 for a version that's not 3.1
+ assert:
+ that:
+ - nm_add_subnet_2.current.ip == "10.1.1.1/24"
+ - nm_add_subnet_2.current.noDefaultGateway == false
+ - nm_add_subnet_2.current.scope == "public"
+ - nm_add_subnet_2.current.shared == true
+ - nm_add_subnet_2.current.querier == true
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify nm_bd_2 for a version that's 3.1
+ assert:
+ that:
+ - nm_add_subnet_2.current.ip == "10.1.1.1/24"
+ - nm_add_subnet_2.current.noDefaultGateway == false
+ - nm_add_subnet_2.current.scope == "public"
+ - nm_add_subnet_2.current.shared == true
+ - nm_add_subnet_2.current.querier == true
+ - nm_add_subnet_2.current.virtual == true
+ when: version.current.version is version('3.1.1g', '==')
+
+# CHANGE Subnet
+- name: Change subnet 2 (normal mode)
+ mso_schema_template_bd_subnet:
+ <<: *subnet_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template2
+ bd: ansible_test_2
+ subnet: 10.1.1.1/24
+ description: "My description for a subnet with virtual ip"
+ scope: public
+ shared: true
+ no_default_gateway: false
+ querier: true
+ is_virtual_ip: false
+ register: nm_change_subnet2
+
+- name: Verify nm_change_subnet2 for a version that's not 3.1
+ assert:
+ that:
+ - nm_change_subnet2 is not changed
+ - nm_change_subnet2.current.ip == "10.1.1.1/24"
+ - nm_change_subnet2.current.noDefaultGateway == false
+ - nm_change_subnet2.current.scope == "public"
+ - nm_change_subnet2.current.shared == true
+ - nm_change_subnet2.current.querier == true
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify nm_change_subnet2 for a version that's 3.1
+ assert:
+ that:
+ - nm_change_subnet2 is changed
+ - nm_change_subnet2.current.ip == "10.1.1.1/24"
+ - nm_change_subnet2.current.noDefaultGateway == false
+ - nm_change_subnet2.current.scope == "public"
+ - nm_change_subnet2.current.shared == true
+ - nm_change_subnet2.current.querier == true
+ - nm_change_subnet2.current.virtual == false
+ when: version.current.version is version('3.1.1g', '==')
+
+- name: Change subnet2 again (normal mode)
+ mso_schema_template_bd_subnet:
+ <<: *subnet_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template2
+ bd: ansible_test_2
+ subnet: 10.1.1.1/24
+ description: "My description for a subnet with virtual ip"
+ scope: public
+ shared: true
+ no_default_gateway: false
+ querier: true
+ is_virtual_ip: false
+ register: nm_change_subnet2_again
+
+- name: Verify nm_change_subnet2_again for a version that's not 3.1
+ assert:
+ that:
+ - nm_change_subnet2_again is not changed
+ - nm_change_subnet2_again.current.ip == "10.1.1.1/24"
+ - nm_change_subnet2_again.current.noDefaultGateway == false
+ - nm_change_subnet2_again.current.scope == "public"
+ - nm_change_subnet2_again.current.shared == true
+ - nm_change_subnet2_again.current.querier == true
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify cm_change_subnet2 for a version that's 3.1
+ assert:
+ that:
+ - nm_change_subnet2_again is not changed
+ - nm_change_subnet2_again.current.ip == "10.1.1.1/24"
+ - nm_change_subnet2_again.current.noDefaultGateway == false
+ - nm_change_subnet2_again.current.scope == "public"
+ - nm_change_subnet2_again.current.shared == true
+ - nm_change_subnet2_again.current.querier == true
+ - nm_change_subnet2_again.current.virtual == false
+ when: version.current.version is version('3.1.1g', '==')
+
+# QUERY ALL Subnets
+- name: Query all subnet (check_mode)
+ mso_schema_template_bd_subnet: &subnet_query
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ state: query
+ check_mode: yes
+ register: cm_query_all_subnet
+
+- name: Query all subnet (normal mode)
+ mso_schema_template_bd_subnet:
+ <<: *subnet_query
+ register: nm_query_all_subnet
+
+- name: Verify query_all_subnet
+ assert:
+ that:
+ - cm_query_all_subnet is not changed
+ - nm_query_all_subnet is not changed
+ - cm_query_all_subnet.current | length == nm_query_all_subnet.current | length == 2
+
+# QUERY A subnet
+- name: Query subnet2
+ mso_schema_template_bd_subnet:
+ <<: *subnet_query
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template2
+ bd: ansible_test_2
+ subnet: 10.1.1.1/24
+ register: nm_query_subnet2
+
+- name: Verify nm_query_subnet2 for a version that's not 3.1
+ assert:
+ that:
+ - nm_query_subnet2 is not changed
+ - nm_query_subnet2.current.ip == "10.1.1.1/24"
+ - nm_query_subnet2.current.noDefaultGateway == false
+ - nm_query_subnet2.current.scope == "public"
+ - nm_query_subnet2.current.shared == true
+ - nm_query_subnet2.current.querier == true
+ when: version.current.version is version('3.1.1g', '!=')
+
+- name: Verify nm_query_subnet2 for a version that's 3.1
+ assert:
+ that:
+ - nm_query_subnet2 is not changed
+ - nm_query_subnet2.current.ip == "10.1.1.1/24"
+ - nm_query_subnet2.current.noDefaultGateway == false
+ - nm_query_subnet2.current.scope == "public"
+ - nm_query_subnet2.current.shared == true
+ - nm_query_subnet2.current.querier == true
+ - nm_query_subnet2.current.virtual == false
+ when: version.current.version is version('3.1.1g', '==')
+
+# REMOVE Subnet
+- name: Remove subnet
+ mso_schema_template_bd_subnet: &subnet_absent
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_1
+ subnet: 172.16.0.1/24
+ state: absent
+ register: nm_remove_subnet
+
+- name: Verify nm_remove_subnet
+ assert:
+ that:
+ - nm_remove_subnet is changed
+ - nm_remove_subnet.current == {}
+
+- name: Remove subnet again (check_mode)
+ mso_schema_template_bd_subnet:
+ <<: *subnet_absent
+ register: nm_remove_subnet_again
+
+- name: Verify nm_remove_subnet_again
+ assert:
+ that:
+ - nm_remove_subnet_again is not changed
+ - nm_remove_subnet_again.current == {}
+
+# QUERY NON-EXISTING Subnet
+- name: Query non-existing subnet
+ mso_schema_template_bd_subnet:
+ <<: *subnet_query
+ bd: ansible_test_1
+ subnet: 172.16.0.3/24
+ ignore_errors: yes
+ register: nm_query_non_subnet
+
+- name: Verify nm_query_non_subnet
+ assert:
+ that:
+ - nm_query_non_subnet is not changed
+ - nm_query_non_subnet.msg is match ("Subnet IP '172.16.0.3/24' not found")
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state for subnet
+ mso_schema_template_bd_subnet:
+ <<: *subnet_query
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - nm_non_existing_state is not changed
+ - nm_non_existing_state.msg is match ("value of state must be one of{{':'}} absent, present, query, got{{':'}} non-existing-state")
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for subnet
+ mso_schema_template_bd_subnet:
+ <<: *subnet_query
+ schema: non-existing-schema
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - nm_non_existing_schema is not changed
+ - nm_non_existing_schema.msg is match ("Provided schema 'non-existing-schema' does not exist")
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for subnet
+ mso_schema_template_bd_subnet:
+ <<: *subnet_query
+ template: non-existing-template
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - nm_non_existing_template is not changed
+ - nm_non_existing_template.msg is match ("Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1")
+
+# USE NON-EXISTING OPTIONS
+- name: Add subnet with no description
+ mso_schema_template_bd_subnet:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template1
+ bd: ansible_test_3
+ subnet: 172.16.0.5/24
+ state: present
+ register: nm_add_subnet_no_desc
+
+- name: Verify nm_add_subnet_no_desc
+ assert:
+ that:
+ - nm_add_subnet_no_desc.current.description == "172.16.0.5/24"
+
+# USE A NON-EXISTING BD
+- name: Non-existing bd for subnet
+ mso_schema_template_bd_subnet:
+ <<: *subnet_query
+ bd: non-existing-bd
+ ignore_errors: yes
+ register: nm_non_existing_bd
+
+- name: Verify non_existing_bd
+ assert:
+ that:
+ - nm_non_existing_bd is not changed
+ - nm_non_existing_bd.msg is match ("Provided BD 'non-existing-bd' does not exist. Existing BDs{{':'}} ansible_test_1")
+
+- name: Remove schemas for next ci test
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}' \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_contract_filter/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_contract_filter/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_contract_filter/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_contract_filter/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_contract_filter/tasks/main.yml
new file mode 100644
index 00000000..abfd6715
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_contract_filter/tasks/main.yml
@@ -0,0 +1,1043 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+# - name: Ensure site exist
+# mso_site: &site_present
+# host: '{{ mso_hostname }}'
+# username: '{{ mso_username }}'
+# password: '{{ mso_password }}'
+# validate_certs: '{{ mso_validate_certs | default(false) }}'
+# use_ssl: '{{ mso_use_ssl | default(true) }}'
+# use_proxy: '{{ mso_use_proxy | default(true) }}'
+# output_level: '{{ mso_output_level | default("info") }}'
+# site: '{{ mso_site | default("ansible_test") }}'
+# apic_username: '{{ apic_username }}'
+# apic_password: '{{ apic_password }}'
+# apic_site_id: '{{ apic_site_id | default(101) }}'
+# urls:
+# - https://{{ apic_hostname }}
+# state: present
+
+- name: Remove schema 2
+ mso_schema:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ validate_certs: false
+ state: absent
+
+- name: Remove schema 1
+ mso_schema:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ validate_certs: false
+ state: absent
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant: &tenant_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ # sites:
+ # - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 exist
+ mso_schema_template: &schema_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+
+- name: Ensure schema 1 with Template 2 exist
+ mso_schema_template:
+ <<: *schema_present
+ template: Template 2
+ state: present
+
+
+- name: Ensure schema 2 with Template 3 exist
+ mso_schema_template:
+ <<: *schema_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+
+- name: Ensure Filter 1 exist
+ cisco.mso.mso_schema_template_filter_entry: &filter_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ filter: Filter 1
+ #add filter entry
+ entry: Filter 1 entry
+ state: present
+
+- name: Ensure Filter 2 exist
+ mso_schema_template_filter_entry:
+ <<: *filter_present
+ template: Template 2
+ filter: Filter 2
+ entry: Filter 2 entry
+ state: present
+
+- name: Ensure Filter 3 exist
+ mso_schema_template_filter_entry:
+ <<: *filter_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ filter: Filter 3
+ entry: Filter 3 entry
+ state: present
+
+- name: Ensure Filter 4 exist
+ mso_schema_template_filter_entry:
+ <<: *filter_present
+ filter: Filter 4
+ entry: Filter 4 entry
+ state: present
+
+- name: Ensure Filter 5 exist
+ mso_schema_template_filter_entry:
+ <<: *filter_present
+ filter: Filter 5
+ entry: Filter 5 entry
+ state: present
+
+- name: Ensure Filter 6 exist
+ mso_schema_template_filter_entry:
+ <<: *filter_present
+ filter: Filter 6
+ entry: Filter 6 entry
+ state: present
+
+- name: Ensure Contract_1 contract does not exist
+ mso_schema_template_contract_filter: &contract_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 1
+ filter: Filter 1
+ filter_schema: '{{ mso_schema | default("ansible_test") }}'
+ filter_template: Template 1
+ state: absent
+
+- name: Ensure Contract_2 contract does not exist
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ template: Template 2
+ contract: Contract 2
+ state: absent
+
+- name: Ensure Contract_3 contract does not exist
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ contract: Contract 3
+ state: absent
+
+- name: Ensure Contract_4 contract does not exist
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 4
+ state: absent
+
+- name: Ensure Contract_5 contract does not exist
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 5
+ state: absent
+
+- name: Ensure Contract_6 contract does not exist
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 6
+ state: absent
+
+# ADD CONTRACT
+- name: Add contract (check_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ #contract_scope: global
+ #contract_filter_type: both-way
+ filter: Filter 1
+ state: present
+ check_mode: yes
+ register: cm_add_contract
+
+- name: Verify cm_add_contract
+ assert:
+ that:
+ - cm_add_contract is changed
+ - cm_add_contract.previous == {}
+ - cm_add_contract.current.filterRef.filterName == "Filter 1"
+ - cm_add_contract.current.filterRef.templateName == "Template1"
+
+- name: Add contract (normal mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ #contract_scope: global
+ #contract_filter_type: both-way
+ filter: Filter 1
+ state: present
+ register: nm_add_contract
+
+- name: Verify nm_add_contract
+ assert:
+ that:
+ - nm_add_contract is changed
+ - nm_add_contract.previous == {}
+ - nm_add_contract.current.filterRef.filterName == "Filter 1"
+ - nm_add_contract.current.filterRef.templateName == "Template1"
+ - cm_add_contract.current.filterRef.schemaId == nm_add_contract.current.filterRef.schemaId
+
+- name: Add contract again (check_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ #contract_scope: global
+ filter: Filter 1
+ state: present
+ check_mode: yes
+ register: cm_add_contract_again
+
+- name: Verify cm_add_contract_again
+ assert:
+ that:
+ - cm_add_contract_again is not changed
+ - cm_add_contract_again.current.filterRef.filterName == "Filter 1"
+ - cm_add_contract_again.current.filterRef.templateName == "Template1"
+ - cm_add_contract_again.previous.filterRef.filterName == "Filter 1"
+ - cm_add_contract_again.previous.filterRef.templateName == "Template1"
+ - cm_add_contract_again.previous.filterRef.schemaId == cm_add_contract_again.current.filterRef.schemaId
+
+- name: Add contract again (normal mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ #contract_scope: global
+ filter: Filter 1
+ state: present
+ register: nm_add_contract_again
+
+- name: Verify nm_add_contract_again
+ assert:
+ that:
+ - nm_add_contract_again is not changed
+ - nm_add_contract_again.current.filterRef.filterName == "Filter 1"
+ - nm_add_contract_again.current.filterRef.templateName == "Template1"
+ - nm_add_contract_again.current.filterRef.templateName == "Template1"
+ - nm_add_contract_again.previous.filterRef.filterName == "Filter 1"
+ - nm_add_contract_again.previous.filterRef.templateName == "Template1"
+ - nm_add_contract_again.previous.filterRef.schemaId == nm_add_contract_again.current.filterRef.schemaId
+
+- name: Add contract 2 (check_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ template: Template 2
+ contract: Contract 2
+ filter: Filter 1
+ filter_template: Template 1
+ state: present
+ check_mode: yes
+ register: cm_add_contract_2
+
+- name: Verify cm_add_contract_2
+ assert:
+ that:
+ - cm_add_contract_2 is changed
+ - cm_add_contract_2.current.filterRef.filterName == "Filter 1"
+ - cm_add_contract_2.current.filterRef.templateName == "Template1"
+
+- name: Add contract 2 (nomal mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ template: Template 2
+ contract: Contract 2
+ filter: Filter 1
+ filter_template: Template 1
+ state: present
+ register: nm_add_contract_2
+
+- name: Verify nm_add_contract_2
+ assert:
+ that:
+ - nm_add_contract_2 is changed
+ - nm_add_contract_2.current.filterRef.filterName == "Filter 1"
+ - nm_add_contract_2.current.filterRef.templateName == "Template1"
+ - cm_add_contract_2.current.filterRef.schemaId == nm_add_contract_2.current.filterRef.schemaId
+
+- name: Add contract 3 (nomal mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ contract: Contract 3
+ filter: Filter 1
+ filter_template: Template 1
+ filter_schema: '{{ mso_schema | default("ansible_test") }}'
+ state: present
+ register: nm_add_contract_3
+
+- name: Verify nm_add_contract_3
+ assert:
+ that:
+ - nm_add_contract_3 is changed
+ - nm_add_contract_3.current.filterRef.filterName == "Filter 1"
+ - nm_add_contract_3.current.filterRef.templateName == "Template1"
+
+- name: Add contract 4 (nomal mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 4
+ filter: Filter 1
+ contract_display_name: display name name for contract 4
+ state: present
+ register: nm_add_contract_4
+
+- name: Verify nm_add_contract_4
+ assert:
+ that:
+ - nm_add_contract_4 is changed
+ - nm_add_contract_4.current.filterRef.filterName == "Filter 1"
+ - nm_add_contract_4.current.filterRef.templateName == "Template1"
+ - nm_add_contract_3.current.filterRef.schemaId == nm_add_contract_4.current.filterRef.schemaId == nm_add_contract_2.current.filterRef.schemaId == nm_add_contract.current.filterRef.schemaId
+
+# create CONTRACT FILTER with diff options
+- name: Add Contract filter to both-way(check_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ contract_filter_type: both-way
+ filter: Filter 4
+ filter_type: both-way
+ state: present
+ check_mode: yes
+ register: cm_add_contract_filter_both_way
+
+- name: Add Contract filter to both-way(normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ contract_filter_type: both-way
+ filter: Filter 4
+ filter_type: both-way
+ state: present
+ register: nm_add_contract_filter_both_way
+
+- name: Verify cm_change_contract_filter_both_way
+ assert:
+ that:
+ - cm_add_contract_filter_both_way is changed
+ - nm_add_contract_filter_both_way is changed
+ - cm_add_contract_filter_both_way.previous == {}
+ - nm_add_contract_filter_both_way.previous == {}
+ - cm_add_contract_filter_both_way.current.filterRef.filterName == "Filter 4"
+ - cm_add_contract_filter_both_way.current.filterRef.templateName == "Template1"
+ - nm_add_contract_filter_both_way.current.filterRef.filterName == "Filter 4"
+ - nm_add_contract_filter_both_way.current.filterRef.templateName == "Template1"
+ - cm_add_contract_filter_both_way.current.filterRef.schemaId == nm_add_contract_filter_both_way.current.filterRef.schemaId
+ - cm_add_contract_filter_both_way.current.contractFilterType == "bothWay"
+ - cm_add_contract_filter_both_way.current.contractScope == "context"
+ - cm_add_contract_filter_both_way.current.displayName == "Contract 1"
+ - cm_add_contract_filter_both_way.current.filterType == "both-way"
+
+- name: Change Contract type both_way Filter type consumer-to-provider(normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ contract_filter_type: both-way
+ filter: Filter 4
+ filter_type: consumer-to-provider
+ state: present
+ ignore_errors: yes
+ register: nm_both_way_and_consumer_to_provider
+
+- name: Verify nm_both_way_and_consumer_to_provider
+ assert:
+ that:
+ - nm_both_way_and_consumer_to_provider is not changed
+ - nm_both_way_and_consumer_to_provider.msg == "You are adding 'one-way' filters to a 'both-way' contract"
+
+- name: Change Contract type both_way Filter type provider-to-consumer(normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ contract_filter_type: both-way
+ filter: Filter 4
+ filter_type: provider-to-consumer
+ state: present
+ ignore_errors: yes
+ register: nm_both_way_and_provider_to_consumer
+
+- name: Verify nm_both_way_and_provider_to_consumer
+ assert:
+ that:
+ - nm_both_way_and_provider_to_consumer is not changed
+ - nm_both_way_and_provider_to_consumer.msg == "You are adding 'one-way' filters to a 'both-way' contract"
+
+- name: Change Contract type one_way Filter type both way(normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ contract_filter_type: one-way
+ filter: Filter 4
+ filter_type: both-way
+ state: present
+ ignore_errors: yes
+ register: nm_one_way_and_both_way
+
+- name: Verify nm_one_way_and_both_way
+ assert:
+ that:
+ - nm_one_way_and_both_way is not changed
+ - nm_one_way_and_both_way.msg == "You are adding 'both-way' filters to a 'one-way' contract"
+
+- name: Change Contract type one_way Filter type consumer-to-provider(normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 5
+ contract_filter_type: one-way
+ filter: Filter 5
+ filter_type: consumer-to-provider
+ state: present
+ register: nm_one_way_and_consumer_to_provider
+
+- name: Verify nm_one_way_and_consumer_to_provider
+ assert:
+ that:
+ - nm_one_way_and_consumer_to_provider is changed
+ - nm_one_way_and_consumer_to_provider.previous == {}
+ - nm_one_way_and_consumer_to_provider.current.contractFilterType == "oneWay"
+ - nm_one_way_and_consumer_to_provider.current.contractScope == "context"
+ - nm_one_way_and_consumer_to_provider.current.displayName == "Contract 5"
+ - nm_one_way_and_consumer_to_provider.current.filterType == "consumer-to-provider"
+
+- name: Change Contract type one_way Filter type provider-to-consumer(normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 6
+ contract_filter_type: one-way
+ filter: Filter 6
+ filter_type: provider-to-consumer
+ state: present
+ register: nm_one_way_and_provider_to_consumer
+
+- name: Verify nm create contract filter with different type
+ assert:
+ that:
+ - nm_one_way_and_provider_to_consumer is changed
+ - nm_one_way_and_provider_to_consumer.current.contractFilterType == "oneWay"
+ - nm_one_way_and_provider_to_consumer.current.contractScope == "context"
+ - nm_one_way_and_provider_to_consumer.current.displayName == "Contract 6"
+ - nm_one_way_and_provider_to_consumer.current.filterType == "provider-to-consumer"
+
+# change contract display name
+- name: change contract display name
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 4
+ filter: Filter 1
+ contract_display_name: new display name for contract 4
+ state: present
+ register: nm_change_display_name
+
+- name: Verify nm_change_display_name
+ assert:
+ that:
+ - nm_change_display_name is changed
+ - nm_change_display_name.current.displayName == "new display name for contract 4"
+ - nm_change_display_name.previous.displayName == "display name name for contract 4"
+
+# change contract filter_directives to log
+- name: change contract filter_directives to log(check_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 4
+ filter: Filter 1
+ filter_directives: log
+ state: present
+ check_mode: yes
+ register: cm_change_filter_directives_log
+
+- name: change contract filter_directives to log(normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 4
+ filter: Filter 1
+ filter_directives: log
+ state: present
+ register: nm_change_filter_directives_log
+
+- name: Verify change_contract_filter_directives to log
+ assert:
+ that:
+ - cm_change_filter_directives_log is changed
+ - nm_change_filter_directives_log is changed
+ - cm_change_filter_directives_log.previous.directives[0] == "none"
+ - nm_change_filter_directives_log.previous.directives[0] == "none"
+ - cm_change_filter_directives_log.current.directives[0] == "log"
+ - nm_change_filter_directives_log.current.directives[0] == "log"
+
+- name: change contract filter_directives to log and none(normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 4
+ filter: Filter 1
+ filter_directives: ['log', 'none']
+ state: present
+ register: nm_change_filter_directives_log_and_none
+
+- name: Verify nm_change_filter_directives_log_and_none
+ assert:
+ that:
+ - nm_change_filter_directives_log_and_none is changed
+ - nm_change_filter_directives_log_and_none.previous.directives[0] == "log"
+ - nm_change_filter_directives_log_and_none.current.directives == ['log', 'none']
+
+# change contract filter_directives to policy_compression
+- name: change contract filter_directives to policy_compression (check_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 4
+ filter: Filter 1
+ filter_directives: policy_compression
+ state: present
+ check_mode: yes
+ register: cm_change_filter_directives_pc
+
+- name: change contract filter_directives to policy_compression (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 4
+ filter: Filter 1
+ filter_directives: policy_compression
+ state: present
+ register: nm_change_filter_directives_pc
+
+- name: Verify change_contract_filter_directives to pc
+ assert:
+ that:
+ - cm_change_filter_directives_pc is changed
+ - nm_change_filter_directives_pc is changed
+ - cm_change_filter_directives_pc.previous.directives == ['log', 'none']
+ - nm_change_filter_directives_pc.previous.directives == ['log', 'none']
+ - cm_change_filter_directives_pc.current.directives[0] == "no_stats"
+ - nm_change_filter_directives_pc.current.directives[0] == "no_stats"
+
+- name: change contract filter_directives to log, none, policy compression (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 4
+ filter: Filter 1
+ filter_directives: ['log', 'none', 'policy_compression']
+ state: present
+ register: nm_change_filter_directives_log_and_none_pc
+
+- name: Verify nm_change_filter_directives_log_and_none_pc
+ assert:
+ that:
+ - nm_change_filter_directives_log_and_none_pc is changed
+ - nm_change_filter_directives_log_and_none_pc.previous.directives[0] == "no_stats"
+ - nm_change_filter_directives_log_and_none_pc.current.directives == ["log", "none", "no_stats"]
+
+- name: Change contract 1 scope to global (normal mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ contract_scope: global
+ state: present
+ register: nm_change_contract_scope_global
+
+- name: Verify nm_change_contract_scope_global
+ assert:
+ that:
+ - nm_change_contract_scope_global is changed
+ - nm_change_contract_scope_global.current.contractScope == "global"
+ - nm_change_contract_scope_global.previous.contractScope == "context"
+
+- name: Change contract 1 scope to tenant(normal mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ contract_scope: tenant
+ state: present
+ register: nm_change_contract_scope_tenant
+
+- name: Verify nm_change_contract_scope_tenant
+ assert:
+ that:
+ - nm_change_contract_scope_tenant is changed
+ - nm_change_contract_scope_tenant.previous.contractScope == "global"
+ - nm_change_contract_scope_tenant.current.contractScope == "tenant"
+
+- name: Change contract 1 scope application_profile(normal mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ contract_scope: application-profile
+ state: present
+ register: nm_change_contract_scope_application_profile
+
+- name: Verify nm_change_contract_scope_application_profile
+ assert:
+ that:
+ - nm_change_contract_scope_application_profile is changed
+ - nm_change_contract_scope_application_profile.previous.contractScope == "tenant"
+ - nm_change_contract_scope_application_profile.current.contractScope == "application-profile"
+
+- name: Change contract 1 scope to vrf(normal mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ contract_scope: vrf
+ state: present
+ register: nm_change_contract_scope_vrf
+
+- name: Verify nm_change_contract_scope_vrf
+ assert:
+ that:
+ - nm_change_contract_scope_vrf is changed
+ - nm_change_contract_scope_vrf.current.contractScope == "context"
+ - nm_change_contract_scope_vrf.previous.contractScope == "application-profile"
+
+- name: Change contract 1 scope to default(normal mode)
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ contract: Contract 1
+ state: present
+ register: nm_change_contract_scope_default
+
+- name: Verify nm_change_contract_scope_default
+ assert:
+ that:
+ - nm_change_contract_scope_default is not changed
+ - nm_change_contract_scope_default.current.contractScope == "context"
+ - nm_change_contract_scope_default.previous.contractScope == "context"
+
+# QUERY ALL CONTRACT
+- name: Query contract 1 filters (check_mode)
+ mso_schema_template_contract_filter: &Contract_query
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 1
+ state: query
+ check_mode: yes
+ register: cm_contract1_query_result
+
+- name: Query contract 1 filters (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ register: nm_contract1_query_result
+
+- name: Verify query_contract_1
+ assert:
+ that:
+ - cm_contract1_query_result is not changed
+ - nm_contract1_query_result is not changed
+ - cm_contract1_query_result.current | length == nm_contract1_query_result.current | length == 2
+
+- name: Query contract 2 filters (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ contract: Contract 2
+ state: query
+ register: nm_contract2_query_result
+
+- name: Query contract 3 filters (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ contract: Contract 3
+ register: nm_contract3_query_result
+
+- name: Query contract 4 filters (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 4
+ register: nm_contract4_query_result
+
+- name: Query contract 5 filters (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 5
+ contract_filter_type: one-way
+ filter_type: consumer-to-provider
+ register: nm_contract5_query_result
+
+- name: Query contract 6 filters (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 6
+ contract_filter_type: one-way
+ filter_type: provider-to-consumer
+ register: nm_contract6_query_result
+
+- name: Verify query_contract
+ assert:
+ that:
+ - nm_contract2_query_result is not changed
+ - nm_contract3_query_result is not changed
+ - nm_contract4_query_result is not changed
+ - nm_contract2_query_result.current | length == nm_contract3_query_result.current | length == nm_contract4_query_result.current | length == 1
+ - nm_contract5_query_result is not changed
+ - nm_contract6_query_result is not changed
+ - nm_contract5_query_result.current | length == 1
+ - nm_contract6_query_result.current | length == 1
+
+# QUERY A SPECIFIC CONTRACT FILTER
+- name: Query contract 1 filter 1 (check_mode)
+ mso_schema_template_contract_filter: &Contract_filter_query
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 1
+ filter: Filter 1
+ state: query
+ check_mode: yes
+ register: cm_contract1_filter1_query_result
+
+- name: Query contract 1 filter 4 (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_filter_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 1
+ filter: Filter 4
+ state: query
+ register: nm_contract1_filter4_query_result
+
+- name: Query contract 2 filter 1 (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_filter_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ contract: Contract 2
+ filter_template: Template 1
+ filter: Filter 1
+ state: query
+ register: nm_contract2_filter1_query_result
+
+- name: Query contract 3 filter 1 (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_filter_query
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ contract: Contract 3
+ filter: Filter 1
+ filter_template: Template 1
+ filter_schema: '{{ mso_schema | default("ansible_test") }}'
+ state: query
+ register: nm_contract3_filter1_query_result
+
+- name: Query contract 4 filter 1 (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_filter_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 4
+ filter: Filter 1
+ state: query
+ register: nm_contract4_filter1_query_result
+
+- name: Query contract 5 filter 5 (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_filter_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 5
+ filter: Filter 5
+ contract_filter_type: one-way
+ filter_type: consumer-to-provider
+ state: query
+ register: nm_contract5_filter5_query_result
+
+- name: Query contract 6 filter 6 (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_filter_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 6
+ filter: Filter 6
+ contract_filter_type: one-way
+ filter_type: provider-to-consumer
+ state: query
+ register: nm_contract6_filter6_query_result
+
+- name: Verify contract1_filter1_query_result
+ assert:
+ that:
+ - cm_contract1_filter1_query_result is not changed
+# #- contract1_filter1_query_result.current.filterRef.
+ - nm_contract1_filter4_query_result is not changed
+ - nm_contract2_filter1_query_result is not changed
+ - nm_contract3_filter1_query_result is not changed
+ - nm_contract4_filter1_query_result is not changed
+ - nm_contract5_filter5_query_result is not changed
+ - nm_contract6_filter6_query_result is not changed
+
+# REMOVE CONTRACT Filter
+- name: Remove contract1 filter1 (check_mode)
+ mso_schema_template_contract_filter: &contract1_filter1_absent
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 1
+ filter: Filter 1
+ state: absent
+ check_mode: yes
+ register: cm_remove_contract1_filter1
+
+- name: Verify cm_remove_contract1_filter1
+ assert:
+ that:
+ - cm_remove_contract1_filter1 is changed
+ - cm_remove_contract1_filter1.current == {}
+ - cm_remove_contract1_filter1.previous.filterRef.filterName == "Filter 1"
+ - cm_remove_contract1_filter1.previous.filterRef.templateName == "Template1"
+- name: Remove contract1 filter1 (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract1_filter1_absent
+ register: nm_remove_contract1_filter1
+
+- name: Verify nm_remove_contract1_filter1
+ assert:
+ that:
+ - nm_remove_contract1_filter1 is changed
+ - nm_remove_contract1_filter1.current == {}
+ - nm_remove_contract1_filter1.previous.filterRef.filterName == "Filter 1"
+ - nm_remove_contract1_filter1.previous.filterRef.templateName == "Template1"
+
+- name: Remove contract1 filter1 again (check_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract1_filter1_absent
+ check_mode: yes
+ register: cm_remove_contract1_filter1_again
+
+- name: Verify cm_remove_contract1_filter1_again
+ assert:
+ that:
+ - cm_remove_contract1_filter1_again is not changed
+ - cm_remove_contract1_filter1_again.current == {}
+ - cm_remove_contract1_filter1_again.previous == {}
+
+- name: Remove contract1 filter1 again (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract1_filter1_absent
+ register: nm_remove_contract1_filter1_again
+
+- name: Verify nm_remove_contract1_filter1_again
+ assert:
+ that:
+ - nm_remove_contract1_filter1_again is not changed
+ - nm_remove_contract1_filter1_again.current == {}
+ - nm_remove_contract1_filter1_again.previous == {}
+
+- name: Remove contract1 filter4 (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract1_filter1_absent
+ filter: Filter 4
+ register: nm_remove_contract1_filter4
+
+- name: Verify nm_remove_contract1_filter4
+ assert:
+ that:
+ - nm_remove_contract1_filter4 is changed
+ - nm_remove_contract1_filter4.current == {}
+ - nm_remove_contract1_filter4.previous.filterRef.filterName == "Filter 4"
+ - nm_remove_contract1_filter4.previous.filterRef.templateName == "Template1"
+
+- name: Remove contract1 filter4 again (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *contract1_filter1_absent
+ filter: Filter 4
+ register: nm_remove_contract1_filter4_again
+
+- name: Verify nm_remove_contract1_filter4_again
+ assert:
+ that:
+ - nm_remove_contract1_filter4_again is not changed
+ - nm_remove_contract1_filter4_again.previous == nm_remove_contract1_filter4_again.current == {}
+
+# QUERY NON-EXISTING FILTER
+- name: Query non-existing filter (check_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 4
+ filter: non-existing-filter
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_filter
+
+- name: Query non-existing filter (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract 4
+ filter: non-existing-filter
+ ignore_errors: yes
+ register: nm_query_non_filter
+
+- name: Verify query_non_filter
+ assert:
+ that:
+ - cm_query_non_filter is not changed
+ - nm_query_non_filter is not changed
+
+# # QUERY NON-EXISTING CONTRACT
+- name: Query non-existing contract (check_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: non-existing-contract
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_contract
+
+- name: Query non-existing contract (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: non-existing-contract
+ ignore_errors: yes
+ register: nm_query_non_contract
+
+- name: Verify query_non_contract
+ assert:
+ that:
+ - cm_query_non_contract is not changed
+ - nm_query_non_contract is not changed
+ - nm_query_non_contract == cm_query_non_contract
+ - cm_query_non_contract.msg == nm_query_non_contract.msg == "Provided contract 'non-existing-contract' does not exist. Existing contracts{{':'}} Contract 4, Contract 5, Contract 6"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for contrct (check_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ template: Template 1
+ schema: non-existing-schema
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_schema
+
+- name: Non-existing schema for contrct (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ template: Template 1
+ schema: non-existing-schema
+ ignore_errors: yes
+ register: nm_query_non_schema
+
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_query_non_schema is not changed
+ - nm_query_non_schema is not changed
+ - cm_query_non_schema == nm_query_non_schema
+ - cm_query_non_schema.msg == nm_query_non_schema.msg == "Provided schema 'non-existing-schema' does not exist"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for contract (check_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non-existing-template
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_template
+
+- name: Non-existing template for contract (normal_mode)
+ mso_schema_template_contract_filter:
+ <<: *Contract_query
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non-existing-template
+ ignore_errors: yes
+ register: nm_query_non_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_query_non_template is not changed
+ - nm_query_non_template is not changed
+ - cm_query_non_template == nm_query_non_template
+ - cm_query_non_template.msg == nm_query_non_template.msg == "Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1, Template2" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_deploy/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_deploy/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_deploy/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_deploy/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_deploy/tasks/main.yml
new file mode 100644
index 00000000..494564b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_deploy/tasks/main.yml
@@ -0,0 +1,199 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+- name: Ensure site exist
+ mso_site: &site_present
+ <<: *mso_info
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(101) }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+
+- name: Undeploy template
+ mso_schema_template_deploy:
+ <<: *mso_info
+ schema: ansible_test
+ template: "{{ item }}"
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: undeploy
+ ignore_errors: yes
+ loop:
+ - Template 1
+ - Template 2
+ - Template 3
+ - Template 4
+ - Template_5
+ - Template 5
+ - Template5
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exists
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ sites:
+ - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1, and Template 2, Template 3 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: '{{ item }}'
+ state: present
+ loop:
+ - Template 1
+ - Template 2
+ - Template 3
+ - Template 4
+ - Template_5
+
+- name: Add physical site to a schema
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: '{{ item }}'
+ state: present
+ loop:
+ - Template 1
+ - Template 2
+ - Template 3
+ - Template 4
+ - Template_5
+
+- name: Deploy templates (check_mode)
+ mso_schema_template_deploy: &schema_deploy
+ <<: *mso_info
+ schema: ansible_test
+ template: "{{ item }}"
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: deploy
+ check_mode: yes
+ register: cm_deploy_template
+ loop:
+ - Template 1
+ - Template 2
+ - Template 3
+ - Template 4
+ - Template_5
+
+- name: Verify cm_deploy_template
+ assert:
+ that:
+ - item is not changed
+ loop: "{{ cm_deploy_template.results }}"
+
+- name: Deploy templates (normal_mode)
+ mso_schema_template_deploy:
+ <<: *schema_deploy
+ schema: ansible_test
+ template: "{{ item }}"
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: deploy
+ register: nm_deploy_template
+ loop:
+ - Template 1
+ - Template 2
+ - Template 3
+ - Template 4
+ - Template_5
+
+- name: Verify nm_deploy_template
+ assert:
+ that:
+ - item is not changed
+ - item.msg == "Successfully deployed"
+ loop: "{{ nm_deploy_template.results }}"
+
+- name: Get deployment status
+ mso_schema_template_deploy:
+ <<: *schema_deploy
+ schema: ansible_test
+ template: "{{ item }}"
+ state: status
+ register: query_deploy_status
+ loop:
+ - Template 1
+ - Template 2
+ - Template 3
+ - Template 4
+ - Template_5
+
+- name: Verify query_deploy_status
+ assert:
+ that:
+ - item is not changed
+ - item.status.0.status.siteStatus == "Succeeded"
+ loop: "{{ query_deploy_status.results }}"
+
+- name: Undeploy templates
+ mso_schema_template_deploy:
+ <<: *schema_deploy
+ schema: ansible_test
+ template: '{{ item }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: undeploy
+ register: undeploy_template
+ loop:
+ - Template 1
+ - Template 2
+ - Template 3
+ - Template 4
+ - Template_5
+
+- name: Verify undeploy_template
+ assert:
+ that:
+ - item is not changed
+ - item.msg == "Successfully Un-deployed"
+ loop: "{{ undeploy_template.results }}"
+ when: version.current.version is version('3.1', '>=')
+
+- name: Verify undeploy_template
+ assert:
+ that:
+ - item is not changed
+ - item.msg == "Successfully deployed"
+ loop: "{{ undeploy_template.results }}"
+ when: version.current.version is version('3.1', '<') \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg/tasks/main.yml
new file mode 100644
index 00000000..d614ce97
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg/tasks/main.yml
@@ -0,0 +1,1110 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+# - name: Ensure site exist
+# mso_site: &site_present
+# host: '{{ mso_hostname }}'
+# username: '{{ mso_username }}'
+# password: '{{ mso_password }}'
+# validate_certs: '{{ mso_validate_certs | default(false) }}'
+# use_ssl: '{{ mso_use_ssl | default(true) }}'
+# use_proxy: '{{ mso_use_proxy | default(true) }}'
+# output_level: '{{ mso_output_level | default("info") }}'
+# site: '{{ mso_site | default("ansible_test") }}'
+# apic_username: '{{ apic_username }}'
+# apic_password: '{{ apic_password }}'
+# apic_site_id: '{{ apic_site_id | default(101) }}'
+# urls:
+# - https://{{ apic_hostname }}
+# state: present
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ # sites:
+ # - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+
+- name: Ensure schema 1 with Template 2 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 2
+ state: present
+
+- name: Ensure schema 2 with Template 3 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Ensure VRF exist
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ #layer3_multicast: true
+ state: present
+
+- name: Ensure VRF2 exist
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF2
+ state: present
+
+- name: Ensure VRF3 exist
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ vrf: VRF3
+ state: present
+
+- name: Ensure VRF4 exist
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ vrf: VRF4
+ state: present
+
+- name: Ensure L3out exist
+ mso_schema_template_l3out:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out: L3out
+ vrf:
+ name: VRF
+ state: present
+
+- name: Ensure L3out2 exist
+ mso_schema_template_l3out:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out: L3out2
+ vrf:
+ name: VRF2
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+
+- name: Ensure L3out3 exist
+ mso_schema_template_l3out:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out: L3out3
+ vrf:
+ name: VRF3
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ state: present
+
+- name: Ensure L3out4 exist
+ mso_schema_template_l3out:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ l3out: L3out4
+ vrf:
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ name: VRF
+ state: present
+
+- name: Ensure ANP exists
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP1
+ state: present
+
+- name: Ensure ANP2 exist
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP2
+ state: present
+
+- name: Ensure ANP3 exist
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP3
+ state: present
+
+- name: Ensure ANP4 exist
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ anp: ANP4
+ state: present
+
+- name: Ensure ansible_test_1 external EPG does not exist
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ state: absent
+
+- name: Ensure ansible_test_2 external EPG does not exist
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_2
+ state: absent
+
+- name: Ensure ansible_test_3 external EPG does not exist
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ external_epg: ansible_test_3
+ state: absent
+
+- name: Ensure ansible_test_4 external EPG does not exist
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_4
+ state: absent
+
+- name: Ensure ansible_test_6 external EPG does not exist
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_6
+ state: absent
+
+- name: Ensure ansible_test_7 external EPG does not exist
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_7
+ state: absent
+
+# ADD external EPG
+- name: Add external EPG (check_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF
+ state: present
+ check_mode: yes
+ register: cm_add_epg
+
+- name: Verify cm_add_epg
+ assert:
+ that:
+ - cm_add_epg is changed
+ - cm_add_epg.previous == {}
+ - cm_add_epg.current.name == "ansible_test_1"
+ - cm_add_epg.current.vrfRef.templateName == "Template1"
+ - cm_add_epg.current.vrfRef.vrfName == "VRF"
+
+- name: Add external EPG (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF
+ state: present
+ register: nm_add_epg
+
+- name: Verify nm_add_epg
+ assert:
+ that:
+ - nm_add_epg is changed
+ - nm_add_epg.previous == {}
+ - nm_add_epg.current.name == "ansible_test_1"
+ - nm_add_epg.current.vrfRef.templateName == "Template1"
+ - nm_add_epg.current.vrfRef.vrfName == "VRF"
+ - cm_add_epg.current.vrfRef.schemaId == nm_add_epg.current.vrfRef.schemaId
+
+- name: Add external EPG again (check_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ check_mode: yes
+ register: cm_add_epg_again
+
+- name: Verify cm_add_epg_again
+ assert:
+ that:
+ - cm_add_epg_again is not changed
+ - cm_add_epg_again.previous.name == "ansible_test_1"
+ - cm_add_epg_again.current.name == "ansible_test_1"
+ - cm_add_epg_again.previous.vrfRef.templateName == "Template1"
+ - cm_add_epg_again.current.vrfRef.templateName == "Template1"
+ - cm_add_epg_again.previous.vrfRef.vrfName == "VRF"
+ - cm_add_epg_again.current.vrfRef.vrfName == "VRF"
+ - cm_add_epg_again.previous.vrfRef.schemaId == cm_add_epg_again.current.vrfRef.schemaId
+
+
+- name: Add epg again (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_epg_again
+
+- name: Verify nm_add_epg_again
+ assert:
+ that:
+ - nm_add_epg_again is not changed
+ - nm_add_epg_again.previous.name == "ansible_test_1"
+ - nm_add_epg_again.current.name == "ansible_test_1"
+ - nm_add_epg_again.previous.vrfRef.templateName == "Template1"
+ - nm_add_epg_again.current.vrfRef.templateName == "Template1"
+ - nm_add_epg_again.previous.vrfRef.vrfName == "VRF"
+ - nm_add_epg_again.current.vrfRef.vrfName == "VRF"
+ - nm_add_epg_again.previous.vrfRef.schemaId == nm_add_epg_again.current.vrfRef.schemaId
+
+- name: Add external EPG (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ state: present
+ ignore_errors: yes
+ register: ok
+
+- name: Add external EPG 2 (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_2
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out:
+ name: L3out
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_epg_2
+
+- name: Add external EPG 3 (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ external_epg: ansible_test_3
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out:
+ name: L3out
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_epg_3
+
+- name: Add external EPG 4 (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_4
+ vrf:
+ name: VRF
+ state: present
+ register: nm_add_epg_4
+
+- name: Verify nm_add_epg_2 and nm_add_epg_3
+ assert:
+ that:
+ - nm_add_epg_2 is changed
+ - nm_add_epg_3 is changed
+ - nm_add_epg_2.current.name == "ansible_test_2"
+ - nm_add_epg_3.current.name == "ansible_test_3"
+ - nm_add_epg_2.current.vrfRef.templateName == nm_add_epg_3.current.vrfRef.templateName == "Template1"
+ - nm_add_epg_2.current.vrfRef.vrfName == nm_add_epg_3.current.vrfRef.vrfName == "VRF"
+ - nm_add_epg_2.current.vrfRef.schemaId == nm_add_epg_3.current.vrfRef.schemaId == nm_add_epg.current.vrfRef.schemaId
+
+- name: Add external EPG 5 (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_5
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp:
+ name: ANP1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_epg_5
+
+- name: Verify nm_add_epg_5
+ assert:
+ that:
+ - nm_add_epg_5 is changed
+ - nm_add_epg_5.current.name == "ansible_test_5"
+
+- name: Add external EPG 5 again with L3Out (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_5
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out:
+ name: L3out
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp:
+ name: ANP1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_epg_5_again
+
+- name: Verify nm_add_epg_5_again
+ assert:
+ that:
+ - nm_add_epg_5_again is changed
+ - nm_add_epg_5_again.current.name == "ansible_test_5"
+
+- name: Add external EPG 6 with external epg type cloud (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_6
+ type: cloud
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp:
+ name: ANP1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_epg_6
+
+- name: Verify nm_add_epg_6
+ assert:
+ that:
+ - nm_add_epg_6 is changed
+ - nm_add_epg_6.current.name == "ansible_test_6"
+ - nm_add_epg_6.current.vrfRef.templateName == "Template1"
+ - nm_add_epg_6.current.vrfRef.vrfName == "VRF"
+ - nm_add_epg_6.current.anpRef.anpName == "ANP1"
+
+- name: Add external EPG 6 with external epg type cloud again(normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_6
+ type: cloud
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp:
+ name: ANP1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_epg_6_again
+
+- name: Verify nm_add_epg_6_again
+ assert:
+ that:
+ - nm_add_epg_6_again is not changed
+ - nm_add_epg_6_again.current.name == "ansible_test_6"
+
+- name: Add external EPG 6 with external epg type cloud with modification(normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_6
+ type: cloud
+ vrf:
+ name: VRF2
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp:
+ name: ANP1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_epg_6_again_2
+
+- name: Verify nm_add_epg_6_again
+ assert:
+ that:
+ - nm_add_epg_6_again_2 is changed
+ - nm_add_epg_6_again_2.current.name == "ansible_test_6"
+ - nm_add_epg_6_again_2.current.vrfRef.vrfName == "VRF2"
+ - nm_add_epg_6_again_2.current.anpRef.anpName == "ANP1"
+
+- name: Add external EPG 7 with external epg type on-premise explicitly mentioned again(normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_7
+ type: on-premise
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out:
+ name: L3out
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_epg_7
+
+- name: Verify nm_add_epg_7
+ assert:
+ that:
+ - nm_add_epg_7 is changed
+ - nm_add_epg_7.current.name == "ansible_test_7"
+ - nm_add_epg_7.current.vrfRef.templateName == "Template1"
+ - nm_add_epg_7.current.vrfRef.vrfName == "VRF"
+
+- name: Add external EPG 7 with external epg type not mentioned again(normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_7
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out:
+ name: L3out
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_epg_7_again
+
+- name: Verify nm_add_epg_7_again
+ assert:
+ that:
+ - nm_add_epg_7_again is not changed
+ - nm_add_epg_7_again.current.name == "ansible_test_7"
+
+# CHANGE external EPG
+- name: Change epg (check_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF3
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ state: present
+ check_mode: yes
+ register: cm_change_epg
+
+- name: Verify cm_change_epg
+ assert:
+ that:
+ - cm_change_epg is changed
+ - cm_change_epg.current.name == 'ansible_test_1'
+ - cm_change_epg.current.vrfRef.vrfName == 'VRF3'
+ - cm_change_epg.current.vrfRef.templateName == "Template2"
+ - cm_change_epg.current.vrfRef.schemaId == cm_change_epg.previous.vrfRef.schemaId
+
+- name: Change epg (normal_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF3
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ state: present
+ register: nm_change_epg
+
+- name: Verify nm_change_epg
+ assert:
+ that:
+ - nm_change_epg is changed
+ - nm_change_epg.current.name == 'ansible_test_1'
+ - nm_change_epg.current.vrfRef.vrfName == 'VRF3'
+ - nm_change_epg.current.vrfRef.templateName == "Template2"
+ - nm_change_epg.current.vrfRef.schemaId == nm_change_epg.previous.vrfRef.schemaId
+
+- name: Change epg again (check_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF3
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ state: present
+ check_mode: yes
+ register: cm_change_epg_again
+
+- name: Verify cm_change_epg_again
+ assert:
+ that:
+ - cm_change_epg_again is not changed
+ - cm_change_epg_again.current.name == 'ansible_test_1'
+ - cm_change_epg_again.current.vrfRef.vrfName == 'VRF3'
+ - cm_change_epg_again.current.vrfRef.templateName == "Template2"
+ - cm_change_epg_again.current.vrfRef.schemaId == cm_change_epg_again.previous.vrfRef.schemaId
+
+- name: Change epg again (normal_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF3
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ state: present
+ register: nm_change_epg_again
+
+- name: Verify nm_change_epg_again
+ assert:
+ that:
+ - nm_change_epg_again is not changed
+ - nm_change_epg_again.current.name == 'ansible_test_1'
+ - nm_change_epg_again.current.vrfRef.vrfName == 'VRF3'
+ - nm_change_epg_again.current.vrfRef.templateName == "Template2"
+ - nm_change_epg_again.current.vrfRef.schemaId == nm_change_epg_again.previous.vrfRef.schemaId
+
+- name: Change epg to VRF4 (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF4
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ state: present
+ register: nm_change_epg_vrf4
+
+- name: Change epg to VRF2 (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF2
+ state: present
+ register: nm_change_epg_vrf2
+
+- name: Verify nm_change_epg_vrf4 and nm_change_epg_vrf2
+ assert:
+ that:
+ - nm_change_epg_vrf4 is changed
+ - nm_change_epg_vrf4.current.name == nm_change_epg_vrf2.current.name == 'ansible_test_1'
+ - nm_change_epg_vrf4.current.vrfRef.vrfName == 'VRF4'
+ - nm_change_epg_vrf4.current.vrfRef.templateName == "Template3"
+ - nm_change_epg_vrf2 is changed
+ - nm_change_epg_vrf2.current.vrfRef.vrfName == 'VRF2'
+ - nm_change_epg_vrf2.current.vrfRef.templateName == "Template1"
+ - nm_change_epg_vrf4.current.vrfRef.schemaId != nm_change_epg_vrf2.current.vrfRef.schemaId
+
+- name: Change epg 1 l3out(normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF
+ l3out:
+ name: L3out4
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ state: present
+ register: nm_change_epg_1_l3out
+
+- name: Change epg 1 settings(normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF
+ l3out:
+ name: L3out
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_change_epg_1_settings
+
+- name: Verify nm_change_epg_1_settings and nm_change_epg_1_l3out
+ assert:
+ that:
+ - nm_change_epg_1_settings is changed
+ - nm_change_epg_1_settings.previous.vrfRef.vrfName == 'VRF'
+ - nm_change_epg_1_settings.previous.vrfRef.templateName == 'Template1'
+ - nm_change_epg_1_settings.current.vrfRef.vrfName == 'VRF'
+ - nm_change_epg_1_settings.current.vrfRef.templateName == 'Template1'
+ - nm_change_epg_1_settings.current.l3outRef.l3outName == 'L3out'
+ - nm_change_epg_1_settings.current.l3outRef.templateName == 'Template1'
+ - nm_change_epg_1_settings.previous.l3outRef.schemaId != nm_change_epg_1_settings.current.l3outRef.schemaId
+ - nm_change_epg_1_l3out is changed
+ - nm_change_epg_1_l3out.previous.vrfRef.vrfName == 'VRF2'
+ - nm_change_epg_1_l3out.previous.vrfRef.templateName == 'Template1'
+ - nm_change_epg_1_l3out.current.vrfRef.vrfName == 'VRF'
+ - nm_change_epg_1_l3out.current.vrfRef.templateName == 'Template1'
+ - nm_change_epg_1_l3out.current.l3outRef.l3outName == 'L3out4'
+ - nm_change_epg_1_l3out.current.l3outRef.templateName == 'Template3'
+
+- name: Change epg 4 preferredGroup(normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_4
+ vrf:
+ name: VRF
+ preferred_group: true
+ state: present
+ register: nm_change_epg_4_preferred_group
+
+- name: Change epg 4 preferredGroup again(normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_4
+ vrf:
+ name: VRF
+ preferred_group: false
+ state: present
+ register: nm_change_epg_4_preferred_group_again
+
+- name: Verify nm_change_epg_4_preferred_group and nm_change_epg_4_preferred_group_again
+ assert:
+ that:
+ - nm_change_epg_4_preferred_group is changed
+ - nm_change_epg_4_preferred_group_again is changed
+ - nm_change_epg_4_preferred_group.current.preferredGroup == true
+ - nm_change_epg_4_preferred_group_again.current.preferredGroup == false
+
+# QUERY ALL EPG
+- name: Query all EPG (check_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: query
+ check_mode: yes
+ register: cm_query_all_epgs
+
+- name: Query all EPG (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: query
+ register: nm_query_all_epgs
+
+- name: Verify query_all_epgs
+ assert:
+ that:
+ - cm_query_all_epgs is not changed
+ - nm_query_all_epgs is not changed
+ - cm_query_all_epgs.current | length == nm_query_all_epgs.current | length == 2
+
+# QUERY AN EPG
+- name: Query epg 1(check_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ state: query
+ check_mode: yes
+ register: cm_query_epg_1
+
+- name: Query epg 1(normal_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ state: query
+ register: nm_query_epg_1
+
+- name: Verify cm_query_epg_1 and nm_query_epg_1
+ assert:
+ that:
+ - cm_query_epg_1 is not changed
+ - nm_query_epg_1 is not changed
+ - cm_query_epg_1.current.l3outRef.l3outName == 'L3out' == nm_query_epg_1.current.l3outRef.l3outName
+ - cm_query_epg_1.current.l3outRef.templateName == nm_query_epg_1.current.l3outRef.templateName == 'Template1'
+ - cm_query_epg_1.current.l3outRef.schemaId == nm_query_epg_1.current.l3outRef.schemaId
+ - cm_query_epg_1.current.vrfRef.vrfName == nm_query_epg_1.current.vrfRef.vrfName == 'VRF'
+ - cm_query_epg_1.current.vrfRef.templateName == nm_query_epg_1.current.vrfRef.templateName == 'Template1'
+ - cm_query_epg_1.current.vrfRef.schemaId == nm_query_epg_1.current.vrfRef.schemaId
+ - nm_query_epg_1.current.l3outRef.schemaId == nm_query_epg_1.current.vrfRef.schemaId
+
+- name: Query epg 5(normal_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_5
+ state: query
+ register: nm_query_epg_5
+
+- name: Verify nm_query_epg_5
+ assert:
+ that:
+ - nm_query_epg_5.current.l3outRef.l3outName == 'L3out'
+
+- name: Query epg 6(normal_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ external_epg: ansible_test_6
+ state: query
+ register: nm_query_epg_6
+
+- name: Verify nm_query_epg_5
+ assert:
+ that:
+ - nm_add_epg_6.current.anpRef.anpName == "ANP1"
+
+# REMOVE EPG
+- name: Remove EPG 4 (check_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_4
+ state: absent
+ check_mode: yes
+ register: cm_remove_epg_4
+
+- name: Verify cm_remove_epg_4
+ assert:
+ that:
+ - cm_remove_epg_4 is changed
+ - cm_remove_epg_4.current == {}
+
+- name: Remove EPG 4 (normal_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_4
+ state: absent
+ register: nm_remove_epg_4
+
+- name: Verify nm_remove_epg_4
+ assert:
+ that:
+ - nm_remove_epg_4 is changed
+ - nm_remove_epg_4.current == {}
+
+- name: Remove EPG 4 again (normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_4
+ state: absent
+ register: nm_remove_epg_4_again
+
+- name: Verify nm_remove_epg_4_again
+ assert:
+ that:
+ - nm_remove_epg_4_again is not changed
+ - nm_remove_epg_4_again.previous == nm_remove_epg_4_again.current == {}
+
+# QUERY NON-EXISTING EPG
+- name: Query non-existing EPG (check_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: non-existing-epg
+ state: query
+ ignore_errors: yes
+ check_mode: yes
+ register: cm_query_non_existing_epg
+
+- name: Query non-existing EPG (normal_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: non-existing-epg
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_existing_epg
+
+- name: Verify cm_query_non_existing_epg and nm_query_non_existing_epg
+ assert:
+ that:
+ - cm_query_non_existing_epg is not changed
+ - nm_query_non_existing_epg is not changed
+ - cm_query_non_existing_epg == nm_query_non_existing_epg
+ - cm_query_non_existing_epg.msg == nm_query_non_existing_epg.msg == "External EPG 'non-existing-epg' not found"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for epg (check_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: non-existing-schema
+ template: Template 1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema for epg (normal_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: non-existing-schema
+ template: Template 1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non-existing-schema' does not exist"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for epg (check_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non-existing-template
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template for epg (normal_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non-existing-template
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+# Checking if contract are removed after re-applying an EPG. (#13 | #62137)
+- name: Add Contracts to EPG 1
+ mso_schema_template_external_epg_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ contract:
+ name: '{{ item.name }}'
+ template: '{{ item.template }}'
+ type: '{{ item.type }}'
+ state: present
+ loop:
+ - { name: Contract1, template: Template 1, type: consumer }
+ - { name: Contract1, template: Template 1, type: provider }
+ - { name: Contract2, template: Template 2, type: consumer }
+ - { name: Contract2, template: Template 2, type: provider }
+
+- name: Query contract EPG 1(normal mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ state: query
+ register: nm_query_epg1_contract
+
+- name: Verify nm_query_epg1_contract
+ assert:
+ that:
+ - nm_query_epg1_contract.current.contractRelationships | length == 4
+
+- name: Add EPG 1 again (normal_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF
+ l3out:
+ name: L3out
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_epg_1_again
+
+- name: Verify that EPG 1 didn't change
+ assert:
+ that:
+ - nm_add_epg_1_again is not changed
+
+- name: Query contract EPG 1 again
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ state: query
+ register: nm_query_epg1_contract_again
+
+- name: Verify that 4 contracts are in EPG 1 using nm_query_epg1_contract_again
+ assert:
+ that:
+ - nm_query_epg1_contract_again.current.contractRelationships | length == 4
+
+# Checking if modifying an external EPG with existing contracts throw an MSO error. (#82)
+- name: Change external EPG 1 VRF (normal_mode)
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ vrf:
+ name: VRF2
+ l3out:
+ name: L3out2
+ state: present
+ register: nm_change_ext_epg_1_vrf
+
+- name: Verify that external EPG 1 did change
+ assert:
+ that:
+ - nm_change_ext_epg_1_vrf is changed
+ - nm_change_ext_epg_1_vrf.current.vrfRef.templateName == "Template1"
+ - nm_change_ext_epg_1_vrf.current.vrfRef.vrfName == "VRF2"
+ - nm_change_ext_epg_1_vrf.current.l3outRef.l3outName == "L3out2"
+
+- name: Query EPG 1
+ mso_schema_template_external_epg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ state: query
+ register: nm_query_contract_ext_epg_1
+
+- name: Verify that 4 contracts are in external EPG 1 using nm_query_contract_ext_epg_1
+ assert:
+ that:
+ - nm_query_contract_ext_epg_1.current.contractRelationships | length == 4 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_contract/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_contract/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_contract/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_contract/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_contract/tasks/main.yml
new file mode 100644
index 00000000..a5101186
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_contract/tasks/main.yml
@@ -0,0 +1,627 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+# - name: Ensure site exist
+# mso_site: &site_present
+# host: '{{ mso_hostname }}'
+# username: '{{ mso_username }}'
+# password: '{{ mso_password }}'
+# validate_certs: '{{ mso_validate_certs | default(false) }}'
+# use_ssl: '{{ mso_use_ssl | default(true) }}'
+# use_proxy: '{{ mso_use_proxy | default(true) }}'
+# output_level: '{{ mso_output_level | default("info") }}'
+# site: '{{ mso_site | default("ansible_test") }}'
+# apic_username: '{{ apic_username }}'
+# apic_password: '{{ apic_password }}'
+# apic_site_id: '{{ apic_site_id | default(101) }}'
+# urls:
+# - https://{{ apic_hostname }}
+# state: present
+
+- name: Remove schemas
+ mso_schema:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant: &tenant_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ # sites:
+ # - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 exist
+ mso_schema_template: &schema_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+
+- name: Ensure schema 1 with Template 2 exist
+ mso_schema_template:
+ <<: *schema_present
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 2
+ state: present
+
+- name: Ensure schema 2 with Template 3 exist
+ mso_schema_template:
+ <<: *schema_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Ensure VRF exist
+ mso_schema_template_vrf:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ state: present
+
+- name: Ensure Filter 1 exist
+ mso_schema_template_filter_entry:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ filter: Filter1
+ entry: Filter1-Entry
+ state: present
+
+- name: Ensure Contract1 exist
+ mso_schema_template_contract_filter: &contract_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract1
+ filter: Filter1
+ filter_schema: '{{ mso_schema | default("ansible_test") }}'
+ filter_template: Template 1
+ state: present
+
+- name: Ensure Contract2 exist
+ mso_schema_template_contract_filter:
+ <<: *contract_present
+ template: Template 2
+ contract: Contract2
+ state: present
+
+- name: Ensure external EPGs exist
+ mso_schema_template_externalepg:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ state: present
+ schema: '{{ item.schema }}'
+ template: '{{ item.template }}'
+ externalepg: '{{ item.externalepg }}'
+ vrf:
+ name: VRF
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ loop:
+ - { schema: '{{ mso_schema | default("ansible_test") }}', template: 'Template 1', externalepg: 'ansible_test_1' }
+ - { schema: '{{ mso_schema | default("ansible_test") }}_2', template: 'Template 3', externalepg: 'ansible_test_3' }
+
+# ADD Contract to External EPG
+- name: Add Contract1 to External EPG (check_mode)
+ mso_schema_template_external_epg_contract: &contract_ext_epg_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ contract:
+ name: Contract1
+ type: consumer
+ state: present
+ check_mode: yes
+ register: cm_add_contract_rel
+
+- name: Verify cm_add_contract_rel
+ assert:
+ that:
+ - cm_add_contract_rel is changed
+ - cm_add_contract_rel.previous == {}
+ - cm_add_contract_rel.current.contractRef.templateName == "Template1"
+ - cm_add_contract_rel.current.contractRef.contractName == "Contract1"
+ - cm_add_contract_rel.current.relationshipType == "consumer"
+
+- name: Add Contract to External EPG (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_present
+ register: nm_add_contract_rel
+
+- name: Verify nm_add_contract_rel
+ assert:
+ that:
+ - nm_add_contract_rel is changed
+ - nm_add_contract_rel.previous == {}
+ - nm_add_contract_rel.current.contractRef.templateName == "Template1"
+ - nm_add_contract_rel.current.contractRef.contractName == "Contract1"
+ - nm_add_contract_rel.current.relationshipType == "consumer"
+ - cm_add_contract_rel.current.contractRef.schemaId == nm_add_contract_rel.current.contractRef.schemaId
+
+- name: Add Contract to External EPG again (check_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_present
+ check_mode: yes
+ register: cm_add_contract_rel_again
+
+- name: Verify cm_add_contract_rel_again
+ assert:
+ that:
+ - cm_add_contract_rel_again is not changed
+ - cm_add_contract_rel_again.previous.contractRef.templateName == "Template1"
+ - cm_add_contract_rel_again.current.contractRef.templateName == "Template1"
+ - cm_add_contract_rel_again.previous.contractRef.contractName == "Contract1"
+ - cm_add_contract_rel_again.current.contractRef.contractName == "Contract1"
+ - cm_add_contract_rel_again.previous.relationshipType == "consumer"
+ - cm_add_contract_rel_again.current.relationshipType == "consumer"
+ - cm_add_contract_rel_again.previous.contractRef.schemaId == cm_add_contract_rel_again.current.contractRef.schemaId
+
+
+- name: Add Contract to External EPG again (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_present
+ register: nm_add_contract_rel_again
+
+- name: Verify nm_add_contract_rel_again
+ assert:
+ that:
+ - nm_add_contract_rel_again is not changed
+ - nm_add_contract_rel_again.previous.contractRef.templateName == "Template1"
+ - nm_add_contract_rel_again.current.contractRef.templateName == "Template1"
+ - nm_add_contract_rel_again.previous.contractRef.contractName == "Contract1"
+ - nm_add_contract_rel_again.current.contractRef.contractName == "Contract1"
+ - nm_add_contract_rel_again.previous.relationshipType == "consumer"
+ - nm_add_contract_rel_again.current.relationshipType == "consumer"
+ - nm_add_contract_rel_again.previous.contractRef.schemaId == nm_add_contract_rel_again.current.contractRef.schemaId
+
+- name: Add Contract1 to External EPG - provider (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_present
+ contract:
+ name: Contract1
+ type: provider
+ register: nm_add_contract1_rel_provider
+
+- name: Add Contract2 to External EPG - consumer (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_present
+ contract:
+ name: Contract2
+ template: Template 2
+ type: consumer
+ register: nm_add_contract2_rel_consumer
+
+- name: Add Contract1 to External EPG 3 - provider (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: 'Template 3'
+ external_epg: ansible_test_3
+ contract:
+ name: Contract1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ type: provider
+ register: nm_add_contract3_rel_provider
+
+- name: Verify nm_add_contract1_rel_provider, nm_add_contract2_rel_consumer and nm_add_contract3_rel_provider
+ assert:
+ that:
+ - nm_add_contract1_rel_provider is changed
+ - nm_add_contract2_rel_consumer is changed
+ - nm_add_contract3_rel_provider is changed
+ - nm_add_contract1_rel_provider.current.contractRef.contractName == "Contract1"
+ - nm_add_contract2_rel_consumer.current.contractRef.contractName == "Contract2"
+ - nm_add_contract3_rel_provider.current.contractRef.contractName == "Contract1"
+ - nm_add_contract1_rel_provider.current.contractRef.templateName == "Template1"
+ - nm_add_contract2_rel_consumer.current.contractRef.templateName == "Template2"
+ - nm_add_contract3_rel_provider.current.contractRef.templateName == "Template1"
+ - nm_add_contract1_rel_provider.current.contractRef.schemaId == nm_add_contract2_rel_consumer.current.contractRef.schemaId == nm_add_contract3_rel_provider.current.contractRef.schemaId
+ - nm_add_contract2_rel_consumer.current.relationshipType == "consumer"
+ - nm_add_contract1_rel_provider.current.relationshipType == nm_add_contract3_rel_provider.current.relationshipType == "provider"
+
+# # QUERY ALL Contract to External EPG
+- name: Query all contract relationship for External EPG (check_mode)
+ mso_schema_template_external_epg_contract: &contract_ext_epg_query
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: ansible_test_1
+ state: query
+ check_mode: yes
+ register: cm_query_all_contract_rels
+
+- name: Query all contract relationship for External EPG (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ register: nm_query_all_contract_rels
+
+- name: Verify query_all_contract_rels
+ assert:
+ that:
+ - cm_query_all_contract_rels is not changed
+ - nm_query_all_contract_rels is not changed
+ - cm_query_all_contract_rels.current | length == nm_query_all_contract_rels.current | length == 3
+
+
+# QUERY A Contract to External EPG
+- name: Query Contract1 relationship for External EPG - consumer (check_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ contract:
+ name: Contract1
+ type: consumer
+ check_mode: yes
+ register: cm_query_contract1_consumer_rel
+
+- name: Query Contract1 relationship for External EPG - consumer (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ contract:
+ name: Contract1
+ type: consumer
+ register: nm_query_contract1_consumer_rel
+
+- name: Query Contract1 relationship for External EPG - provider (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ contract:
+ name: Contract1
+ type: provider
+ register: nm_query_contract1_provider_rel
+
+- name: Query Contract1 relationship for External EPG - consumer (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ contract:
+ name: Contract2
+ template: Template 2
+ type: consumer
+ register: nm_query_contract2_consumer_rel
+
+- name: Query Contract1 relationship for External EPG - provider (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ external_epg: ansible_test_3
+ contract:
+ name: Contract1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ type: provider
+ register: nm_query_contract3_provider_rel
+
+- name: Verify query_contractX_YYYYY_rel
+ assert:
+ that:
+ - cm_query_contract1_consumer_rel is not changed
+ - nm_query_contract1_consumer_rel is not changed
+ - nm_query_contract1_provider_rel is not changed
+ - nm_query_contract2_consumer_rel is not changed
+ - nm_query_contract3_provider_rel is not changed
+ - cm_query_contract1_consumer_rel == nm_query_contract1_consumer_rel
+ - cm_query_contract1_consumer_rel.current.contractRef.contractName == nm_query_contract1_consumer_rel.current.contractRef.contractName == nm_query_contract1_provider_rel.current.contractRef.contractName == "Contract1"
+ - nm_query_contract2_consumer_rel.current.contractRef.contractName == "Contract2"
+ - nm_query_contract3_provider_rel.current.contractRef.contractName == "Contract1"
+ - cm_query_contract1_consumer_rel.current.contractRef.templateName == nm_query_contract1_consumer_rel.current.contractRef.templateName == nm_query_contract1_provider_rel.current.contractRef.templateName == "Template1"
+ - nm_query_contract2_consumer_rel.current.contractRef.templateName == "Template2"
+ - nm_query_contract3_provider_rel.current.contractRef.templateName == "Template1"
+ - cm_query_contract1_consumer_rel.current.contractRef.schemaId == nm_query_contract1_consumer_rel.current.contractRef.schemaId == nm_query_contract1_provider_rel.current.contractRef.schemaId == nm_query_contract2_consumer_rel.current.contractRef.schemaId == nm_query_contract3_provider_rel.current.contractRef.schemaId
+ - cm_query_contract1_consumer_rel.current.relationshipType == nm_query_contract1_consumer_rel.current.relationshipType == nm_query_contract2_consumer_rel.current.relationshipType == "consumer"
+ - nm_query_contract1_provider_rel.current.relationshipType == nm_query_contract3_provider_rel.current.relationshipType == "provider"
+
+
+# REMOVE Contract to External EPG
+- name: Remove Contract to External EPG (check_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_present
+ state: absent
+ check_mode: yes
+ register: cm_remove_contract_rel
+
+- name: Verify cm_remove_contract_rel
+ assert:
+ that:
+ - cm_remove_contract_rel is changed
+ - cm_remove_contract_rel.current == {}
+
+- name: Remove Contract to External EPG (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_present
+ state: absent
+ register: nm_remove_contract_rel
+
+- name: Verify nm_remove_contract_rel
+ assert:
+ that:
+ - nm_remove_contract_rel is changed
+ - nm_remove_contract_rel.current == {}
+
+- name: Remove Contract to External EPG again (check_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_present
+ state: absent
+ check_mode: yes
+ register: cm_remove_contract_rel_again
+
+- name: Verify cm_remove_contract_rel_again
+ assert:
+ that:
+ - cm_remove_contract_rel_again is not changed
+ - cm_remove_contract_rel_again.current == {}
+
+- name: Remove Contract to External EPG again (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_present
+ state: absent
+ register: nm_remove_contract_rel_again
+
+- name: Verify nm_remove_contract_rel_again
+ assert:
+ that:
+ - nm_remove_contract_rel_again is not changed
+ - nm_remove_contract_rel_again.current == {}
+
+
+# QUERY NON-EXISTING Contract to External EPG
+- name: Query non-existing contract (check_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ contract:
+ name: non_existing_contract
+ type: provider
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_contract
+
+- name: Query non-existing contract (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ contract:
+ name: non_existing_contract
+ type: provider
+ ignore_errors: yes
+ register: nm_query_non_contract
+
+- name: Verify query_non_contract
+ assert:
+ that:
+ - cm_query_non_contract is not changed
+ - nm_query_non_contract is not changed
+ - cm_query_non_contract == nm_query_non_contract
+ - cm_query_non_contract.msg is match("Contract '/schemas/[0-9a-zA-Z]*/templates/Template1/contracts/non_existing_contract' not found")
+ - nm_query_non_contract.msg is match("Contract '/schemas/[0-9a-zA-Z]*/templates/Template1/contracts/non_existing_contract' not found")
+
+# QUERY NON-EXISTING ExtEPG
+- name: Query non-existing ExtEPG (check_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ external_epg: non_existing_ext_epg
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_ext_epg
+
+- name: Query non-existing ExtEPG (normal mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ external_epg: non_existing_ext_epg
+ ignore_errors: yes
+ register: nm_query_non_ext_epg
+
+- name: Verify query_non_ext_epg
+ assert:
+ that:
+ - cm_query_non_ext_epg is not changed
+ - nm_query_non_ext_epg is not changed
+ - cm_query_non_ext_epg == nm_query_non_ext_epg
+ - cm_query_non_ext_epg.msg == nm_query_non_ext_epg.msg == "Provided epg 'non_existing_ext_epg' does not exist. Existing epgs{{':'}} ansible_test_1"
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state for contract relationship (check_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ state: non-existing-state
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: Non-existing state for contract relationship (normal_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state == nm_non_existing_state
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non-existing-state"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for contract relationship (check_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ schema: non-existing-schema
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema for contract relationship (normal_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ schema: non-existing-schema
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non-existing-schema' does not exist"
+
+- name: Non-existing contract schema for contract relationship (check_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ contract:
+ name: Contract1
+ schema: non-existing-schema
+ template: Template 1
+ type: provider
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_contract_schema
+
+- name: Non-existing contract schema for contract relationship (normal_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ contract:
+ name: Contract1
+ schema: non-existing-schema
+ template: Template 1
+ type: provider
+ ignore_errors: yes
+ register: nm_non_existing_contract_schema
+
+- name: Verify non_existing_contract_schema
+ assert:
+ that:
+ - cm_non_existing_contract_schema is not changed
+ - nm_non_existing_contract_schema is not changed
+ - cm_non_existing_contract_schema == nm_non_existing_contract_schema
+ - cm_non_existing_contract_schema.msg == nm_non_existing_contract_schema.msg == "Schema 'non-existing-schema' is not a valid schema name."
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for contract relationship (check_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ template: non-existing-template
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template for contract relationship (normal_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ template: non-existing-template
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+- name: Non-existing contract template for contract relationship (check_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ contract:
+ name: Contract1
+ template: non-existing-template
+ type: provider
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_contract_template
+
+- name: Non-existing contract template for contract relationship (normal_mode)
+ mso_schema_template_external_epg_contract:
+ <<: *contract_ext_epg_query
+ contract:
+ name: Contract1
+ template: non-existing-template
+ type: provider
+ ignore_errors: yes
+ register: nm_non_existing_contract_template
+
+- name: Verify non_existing_contract_template
+ assert:
+ that:
+ - cm_non_existing_contract_template is not changed
+ - nm_non_existing_contract_template is not changed
+ - cm_non_existing_contract_template == nm_non_existing_contract_template
+ - cm_non_existing_contract_template.msg is match("Contract '/schemas/[0-9a-zA-Z]*/templates/non-existing-template/contracts/Contract1' not found")
+ - nm_non_existing_contract_template.msg is match("Contract '/schemas/[0-9a-zA-Z]*/templates/non-existing-template/contracts/Contract1' not found") \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_selector/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_selector/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_selector/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_selector/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_selector/tasks/main.yml
new file mode 100644
index 00000000..c0e7b500
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_external_epg_selector/tasks/main.yml
@@ -0,0 +1,454 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ # sites:
+ # - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+
+- name: Ensure schema 1 with Template 2 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 2
+ state: present
+
+- name: Ensure schema 2 with Template 3 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Ensure VRF exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ state: present
+
+- name: Ensure VRF2 exists
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF2
+ state: present
+
+- name: Ensure ANP1 exists
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP
+ state: present
+
+- name: Ensure ANP2 exists
+ mso_schema_template_anp:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ anp: ANP2
+ state: present
+
+- name: Ensure L3out exist
+ mso_schema_template_l3out:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out: L3out
+ vrf:
+ name: VRF
+ state: present
+
+- name: Ensure L3out2 exist
+ mso_schema_template_l3out:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ l3out: L3out2
+ vrf:
+ name: VRF2
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+
+# ADD External EPGs
+- name: Ensure External EPG1 exists
+ mso_schema_template_externalepg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ externalepg: extEPG1
+ vrf:
+ name: VRF
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ l3out:
+ name: L3out
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ anp:
+ name: ANP
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ state: present
+
+- name: Ensure External EPG2 exists
+ mso_schema_template_externalepg:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ externalepg: extEPG2
+ vrf:
+ name: VRF2
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ l3out:
+ name: L3out2
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ anp:
+ name: ANP2
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ state: present
+
+# ADD Selector to EPG
+- name: Add Selector to extEPG1 (check_mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_1
+ state: present
+ check_mode: yes
+ register: cm_add_selector_1
+
+- name: Verify cm_add_selector_1
+ assert:
+ that:
+ - cm_add_selector_1 is changed
+ - cm_add_selector_1.previous == {}
+ - cm_add_selector_1.current.name == "selector_1"
+ - cm_add_selector_1.current.expressions == []
+
+- name: Add Selector 1 to extEPG1 (normal_mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_1
+ state: present
+ ignore_errors: yes
+ register: nm_add_selector_1
+
+- name: Verify nm_add_selector_1
+ assert:
+ that:
+ - nm_add_selector_1 is changed
+ - nm_add_selector_1.previous == {}
+ - nm_add_selector_1.current.name == "selector_1"
+ - nm_add_selector_1.current.expressions == []
+
+- name: Add Selector 1 to extEPG1 again(normal_mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_1
+ state: present
+ ignore_errors: yes
+ register: nm_add_selector_1_again
+
+- name: Verify nm_add_selector_1_again
+ assert:
+ that:
+ - nm_add_selector_1_again is not changed
+
+- name: Add Selector to extEPG1 again (normal_mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_1
+ state: present
+ register: nm_add_selector_1_again
+
+- name: Verify nm_add_selector_1_again
+ assert:
+ that:
+ - nm_add_selector_1_again is not changed
+
+- name: Add Selector 2 to extEPG1 (normal_mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_2
+ expressions:
+ - type: ip_address
+ operator: equals
+ value: 10.0.0.0
+ state: present
+ register: nm_add_selector_2
+
+- name: Verify nm_add_selector_2
+ assert:
+ that:
+ - nm_add_selector_2 is changed
+ - nm_add_selector_2.previous == {}
+ - nm_add_selector_2.current.name == "selector_2"
+ - nm_add_selector_2.current.expressions[0].key == "ipAddress"
+ - nm_add_selector_2.current.expressions[0].operator == "equals"
+ - nm_add_selector_2.current.expressions[0].value == "10.0.0.0"
+
+- name: Add Selector 3 to extEPG1 (normal_mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_3
+ expressions:
+ - type: ip_address
+ operator: equals
+ value: 10.1.1.1
+ state: present
+ register: nm_add_selector_3
+
+- name: Verify nm_add_selector_3
+ assert:
+ that:
+ - nm_add_selector_3 is changed
+ - nm_add_selector_3.previous == {}
+ - nm_add_selector_3.current.name == "selector_3"
+ - nm_add_selector_3.current.expressions[0].value == "10.1.1.1"
+
+- name: Remove slector_1
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_1
+ state: absent
+ register: nm_remove_selector_1
+
+- name: Verify nm_remove_selector_1
+ assert:
+ that:
+ - nm_remove_selector_1 is changed
+
+# QUERY selectors
+- name: Query all selectors of extEPG1
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG1
+ state: query
+ register: nm_query_all
+
+- name: Verify nm_query_all
+ assert:
+ that:
+ - nm_query_all is not changed
+
+- name: Query a selector of extEPG1
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_2
+ state: query
+ register: nm_query_selector_2
+
+- name: Verify nm_query_selector_2
+ assert:
+ that:
+ - nm_query_selector_2 is not changed
+ - nm_query_selector_2.current.expressions[0].value == "10.0.0.0"
+
+- name: Query a removed selector_1 of extEPG1
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_query_removed
+
+- name: Verify nm_query_removed
+ assert:
+ that:
+ - nm_query_removed.msg == "Selector 'selector_1' not found"
+
+# QUERY NON-EXISTING External EPG
+- name: Query non-existing EPG (normal mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: non_extEPG1
+ selector: selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_epg
+
+- name: Verify query_non_epg
+ assert:
+ that:
+ - nm_query_non_epg is not changed
+ - nm_query_non_epg.msg == "Provided external epg 'non_extEPG1' does not exist. Existing epgs{{':'}} extEPG1, extEPG2"
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state (check_mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_1
+ state: non-existing-state
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: Non-existing state (normal_mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_1
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state == nm_non_existing_state
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non-existing-state"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template (check_mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non-existing-template
+ external_epg: extEPG1
+ selector: selector_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template (normal_mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non-existing-template
+ external_epg: extEPG1
+ selector: selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non-existing-template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema (check_mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: non-existing-schema
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_1
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema (normal_mode)
+ mso_schema_template_external_epg_selector:
+ <<: *mso_info
+ schema: non-existing-schema
+ template: Template 1
+ external_epg: extEPG1
+ selector: selector_1
+ state: query
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non-existing-schema' does not exist" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_migrate/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_migrate/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_migrate/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_migrate/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_migrate/tasks/main.yml
new file mode 100644
index 00000000..d723fbdc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_migrate/tasks/main.yml
@@ -0,0 +1,334 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Anvitha Jain (@anvitha-jain) <anvjain@cisco.com>
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Query MSO version
+ mso_version:
+ <<: *mso_info
+ state: query
+ register: version
+
+# CLEAN ENVIRONMENT
+- name: Ensure site exist
+ mso_site: &site_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(102) }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+
+- name: Undeploy a schema 2 template 2
+ mso_schema_template_deploy:
+ <<: *mso_info
+ template: Template 2
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: undeploy
+ ignore_errors: yes
+ register: undeploy_template2
+
+- name: Undeploy a schema 1 template 1
+ mso_schema_template_deploy:
+ <<: *mso_info
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: undeploy
+ ignore_errors: yes
+ register: undeploy_template1
+
+- name: Remove a site from a schema 1 with Template 1
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: absent
+ register: rm_site_temp1
+
+- name: Remove a site from a schema 2 with Template 2
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ state: absent
+ register: rm_site_temp2
+
+- name: Remove schemas
+ mso_schema:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant: &tenant_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ sites:
+ - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schemas with Template 1 exist
+ mso_schema_template: &schema_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ item }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}'
+ - '{{ mso_schema | default("ansible_test") }}_2'
+
+- name: Ensure schema 2 with Template 2 exist
+ mso_schema_template:
+ <<: *schema_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 2
+ state: present
+ register: schema2_template2
+
+- name: Add a new site to a schema 1 with Template 1 in normal mode
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: add_site_nm1
+
+- name: Add a new site to a schema 2 with Template 2 in normal mode
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ state: present
+ register: add_site_nm2
+
+- name: Ensure VRF exist
+ mso_schema_template_vrf: &vrf_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ layer3_multicast: true
+ state: present
+
+- name: Ensure ANP exist
+ mso_schema_template_anp:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 1
+ anp: ANP
+ state: present
+
+- name: Ensure ANP2 exist
+ mso_schema_template_anp:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 1
+ anp: ANP2
+ state: present
+
+- name: Ensure ansible_test_1 BD exist
+ mso_schema_template_bd:
+ <<: *vrf_present
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 1
+ bd: '{{ item }}'
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ when: version.current.version is version('2.2.4e', '!=')
+ loop:
+ - '{{ BD_1 | default("ansible_test") }}_1'
+ - '{{ BD_2 | default("ansible_test") }}_2'
+
+- name: Ensure EPG exist
+ mso_schema_template_anp_epg: &epg_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 1
+ anp: ANP
+ epg: ansible_test_1
+ bd:
+ name: ansible_test_1
+ vrf:
+ name: VRF
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: cm_add_epg
+
+- name: Add EPG 2 (normal mode)
+ mso_schema_template_anp_epg:
+ <<: *epg_present
+ anp: ANP2
+ epg: '{{ item }}'
+ loop:
+ - '{{ EPG_2 | default("ansible_test") }}_2'
+ - '{{ EPG_3 | default("ansible_test") }}_3'
+ - '{{ EPG_4 | default("ansible_test") }}_4'
+
+- name: Migration of objects between templates
+ mso_schema_template_migrate:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 1
+ target_schema: '{{ mso_schema | default("ansible_test") }}'
+ target_template: Template 1
+ bds:
+ - ansible_test_1
+ epgs:
+ - epg: ansible_test_1
+ anp: ANP
+ - epg: ansible_test_2
+ anp: ANP2
+ state: present
+ when: version.current.version is version('2.2.4e', '!=')
+ register: object_migrate
+
+- name: Migration of BD objects between templates
+ mso_schema_template_migrate:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 1
+ target_schema: '{{ mso_schema | default("ansible_test") }}_2'
+ target_template: Template 2
+ bds:
+ - ansible_test_2
+ state: present
+ when: version.current.version is version('2.2.4e', '!=')
+ register: bd_migrate
+
+- name: Migration of EPG objects between templates
+ mso_schema_template_migrate:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 1
+ target_schema: '{{ mso_schema | default("ansible_test") }}_2'
+ target_template: Template 2
+ epgs:
+ - epg: ansible_test_3
+ anp: ANP2
+ - epg: ansible_test_4
+ anp: ANP2
+ state: present
+ when: version.current.version is version('2.2.4e', '!=')
+ register: epg_migrate
+
+- name: Undeploy a schema 2 template 2
+ mso_schema_template_deploy:
+ <<: *mso_info
+ template: Template 2
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: undeploy
+ ignore_errors: yes
+ register: undeploy_template2
+
+- name: Undeploy a schema 1 template 1
+ mso_schema_template_deploy:
+ <<: *mso_info
+ template: Template 1
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: undeploy
+ ignore_errors: yes
+ register: undeploy_template1
+
+- name: Remove a site from a schema 1 with Template 1
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 1
+ state: absent
+ register: rm_site_temp1
+
+- name: Remove a site from a schema 2 with Template 2
+ mso_schema_site:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ site: '{{ mso_site | default("ansible_test") }}'
+ template: Template 2
+ state: absent
+ register: rm_site_temp2 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf/tasks/main.yml
new file mode 100644
index 00000000..b77d1fad
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf/tasks/main.yml
@@ -0,0 +1,518 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+# - name: Ensure site exist
+# mso_site: &site_present
+# host: '{{ mso_hostname }}'
+# username: '{{ mso_username }}'
+# password: '{{ mso_password }}'
+# validate_certs: '{{ mso_validate_certs | default(false) }}'
+# use_ssl: '{{ mso_use_ssl | default(true) }}'
+# use_proxy: '{{ mso_use_proxy | default(true) }}'
+# output_level: '{{ mso_output_level | default("info") }}'
+# site: '{{ mso_site | default("ansible_test") }}'
+# apic_username: '{{ apic_username }}'
+# apic_password: '{{ apic_password }}'
+# apic_site_id: '{{ apic_site_id | default(101) }}'
+# urls:
+# - https://{{ apic_hostname }}
+# state: present
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ # sites:
+ # - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+
+- name: Ensure schema 1 with Template 2 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 2
+ state: present
+
+- name: Ensure schema 2 with Template 3 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Ensure Filter 1 exist
+ mso_schema_template_filter_entry:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ filter: Filter1
+ entry: Filter1-Entry
+ state: present
+
+- name: Ensure Contract1 exist
+ mso_schema_template_contract_filter:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract1
+ filter: Filter1
+ filter_schema: '{{ mso_schema | default("ansible_test") }}'
+ filter_template: Template 1
+ state: present
+
+# ADD VRF1
+- name: Add a new VRF1 (check mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF1
+ state: present
+ check_mode: yes
+ register: vrf1_cm
+
+- name: Verify vrf1_cm
+ assert:
+ that:
+ - vrf1_cm is changed
+ - vrf1_cm.current.name == 'VRF1'
+ - vrf1_cm.current.displayName == 'VRF1'
+
+- name: Add VRF1 (normal mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF1
+ state: present
+ register: vrf1_nm
+
+- name: Verify vrf1_nm
+ assert:
+ that:
+ - vrf1_nm is changed
+ - vrf1_nm.current.name == 'VRF1'
+ - vrf1_nm.current.displayName == 'VRF1'
+
+- name: Add VRF2 (normal mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ vrf: VRF2
+ layer3_multicast: true
+ vzany: true
+ state: present
+ register: vrf2_nm
+
+- name: Verify vrf2_nm
+ assert:
+ that:
+ - vrf2_nm is changed
+ - vrf2_nm.current.name == 'VRF2'
+ - vrf2_nm.current.displayName == 'VRF2'
+ - vrf2_nm.current.vzAnyEnabled == True
+ - vrf2_nm.current.l3MCast == True
+
+- name: Add VRF3 (normal mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ vrf: VRF3
+ state: present
+ register: vrf3_nm
+
+- name: Verify vrf3_nm
+ assert:
+ that:
+ - vrf3_nm is changed
+ - vrf3_nm.current.name == 'VRF3'
+ - vrf3_nm.current.displayName == 'VRF3'
+
+# ADD EXISTING VRF
+- name: Add VRF2 again (normal mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ vrf: VRF2
+ layer3_multicast: true
+ vzany: true
+ state: present
+ register: vrf2_nm_again
+
+- name: Verify vrf2_nm_again
+ assert:
+ that:
+ - vrf2_nm_again is not changed
+
+# ADD VRF4 WITH NO STATE
+- name: Add VRF4 (normal mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ vrf: VRF4
+ ignore_errors: yes
+ register: vrf4_nm_stateless
+
+- name: Verify vrf4_nm_stateless
+ assert:
+ that:
+ - vrf4_nm_stateless is changed
+
+# CHANGE VRF SETTINGS
+- name: Change VRF1 settings (check mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF1
+ layer3_multicast: true
+ vzany: true
+ state: present
+ check_mode: yes
+ register: vrf1_change_cm
+
+- name: Change VRF1 settings (normal mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF1
+ layer3_multicast: true
+ vzany: true
+ state: present
+ register: vrf1_change_nm
+
+- name: Change VRF2 settings (check mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ vrf: VRF2
+ layer3_multicast: false
+ vzany: false
+ state: present
+ check_mode: yes
+ register: vrf2_change_cm
+
+- name: Change VRF2 settings (normal mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ vrf: VRF2
+ layer3_multicast: false
+ vzany: false
+ state: present
+ register: vrf2_change_nm
+
+- name: Verify vrf2_nm
+ assert:
+ that:
+ - vrf1_change_cm is changed
+ - vrf1_change_nm is changed
+ - vrf2_change_cm is changed
+ - vrf2_change_nm is changed
+ - vrf1_change_cm.current.name == vrf1_change_nm.current.name == 'VRF1'
+ - vrf2_change_cm.current.name == vrf2_change_nm.current.name == 'VRF2'
+ - vrf1_change_cm.current.vzAnyEnabled == vrf1_change_nm.current.vzAnyEnabled == True
+ - vrf1_change_cm.current.vzAnyEnabled == vrf1_change_nm.current.l3MCast == True
+ - vrf2_change_cm.current.vzAnyEnabled == vrf2_change_nm.current.vzAnyEnabled == False
+ - vrf2_change_cm.current.vzAnyEnabled == vrf2_change_nm.current.l3MCast == False
+
+# QUERY A VRF
+- name: Query VRF2 (normal mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ vrf: VRF2
+ state: query
+ register: vrf2_query
+
+- name: Verify vrf2_query
+ assert:
+ that:
+ - vrf2_query is not changed
+
+# QUERY ALL VRFs
+- name: Query all (normal mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: query
+ register: vrfs_query
+
+- name: Verify vrfs_query
+ assert:
+ that:
+ - vrfs_query is not changed
+
+# REMOVE A VRF
+- name: Remove VRF3 (normal mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ vrf: VRF3
+ state: absent
+ register: vrf3_remove
+
+- name: Verify vrf3_remove
+ assert:
+ that:
+ - vrf3_remove is changed
+ - vrf3_remove.previous.name == 'VRF3'
+ - vrf3_remove.previous.displayName == 'VRF3'
+
+# REMOVE A VRF
+- name: Remove VRF3 again (normal mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ vrf: VRF3
+ state: absent
+ register: vrf3_remove_again
+
+- name: Verify vrf3_remove_again
+ assert:
+ that:
+ - vrf3_remove_again is not changed
+
+# QUERY REMOVED VRF
+- name: Query VRF3 (normal mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ vrf: VRF3
+ state: query
+ ignore_errors: yes
+ register: vrf3_query_removed
+
+- name: Verify vrf3_query_removed
+ assert:
+ that:
+ - vrf3_query_removed.msg == "VRF 'VRF3' not found"
+
+# Enable vzAny on VRF
+- name: Ensure VRF exist
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ vzany: true
+ state: present
+
+- name: Add Contract1 to VRF with type consumer (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: consumer
+ state: present
+ register: nm_add_contract1_consumer
+
+- name: Verify nm_add_contract1_consumer
+ assert:
+ that:
+ - nm_add_contract1_consumer is changed
+ - nm_add_contract1_consumer.previous == {}
+ - nm_add_contract1_consumer.current.contractRef.templateName == "Template1"
+ - nm_add_contract1_consumer.current.contractRef.contractName == "Contract1"
+ - nm_add_contract1_consumer.current.relationshipType == "consumer"
+
+- name: Add Contract1 to VRF with type provider (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: provider
+ state: present
+ register: nm_add_contract1_provider
+
+- name: Verify nm_add_contract1_provider
+ assert:
+ that:
+ - nm_add_contract1_provider is changed
+ - nm_add_contract1_provider.previous == {}
+ - nm_add_contract1_provider.current.contractRef.templateName == "Template1"
+ - nm_add_contract1_provider.current.contractRef.contractName == "Contract1"
+ - nm_add_contract1_provider.current.relationshipType == "provider"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for VRF (check_mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: non_existing_schema
+ template: Template 1
+ vrf: VRF5
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_schema
+
+- name: Non-existing schema for VRF (normal_mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: non_existing_schema
+ template: Template 1
+ vrf: VRF5
+ ignore_errors: yes
+ register: nm_non_existing_schema
+
+- name: Verify nm_non_existing_schema
+ assert:
+ that:
+ - cm_non_existing_schema is not changed
+ - nm_non_existing_schema is not changed
+ - cm_non_existing_schema == nm_non_existing_schema
+ - cm_non_existing_schema.msg == nm_non_existing_schema.msg == "Provided schema 'non_existing_schema' does not exist"
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing template for vrf (check_mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non_existing_template
+ vrf: VRF5
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_template
+
+- name: Non-existing template for vrf (normal_mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non_existing_template
+ vrf: VRF5
+ ignore_errors: yes
+ register: nm_non_existing_template
+
+- name: Verify non_existing_template
+ assert:
+ that:
+ - cm_non_existing_template is not changed
+ - nm_non_existing_template is not changed
+ - cm_non_existing_template == nm_non_existing_template
+ - cm_non_existing_template.msg == nm_non_existing_template.msg == "Provided template 'non_existing_template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+# Checking if contract are removed after re-applying an VRF.
+- name: Add VRF again (normal_mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ vzany: true
+ state: present
+ register: nm_add_VRF_again
+
+- name: Verify that VRF didn't changed
+ assert:
+ that:
+ - nm_add_VRF_again is not changed
+
+- name: Verify contract VRF again
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ state: query
+ register: nm_query_vrf_contract_again
+
+- name: Verify 2 contracts are in VRF
+ assert:
+ that:
+ - nm_query_vrf_contract_again is not changed
+ - nm_query_vrf_contract_again.current | length == 2
+
+# Checking if modifying VRF with existing contracts throw an MSO error. (#82)
+- name: Change VRF (normal_mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ vzany: true
+ layer3_multicast: true
+ state: present
+ register: nm_change_vrf
+
+- name: Verify that VRF did change
+ assert:
+ that:
+ - nm_change_vrf is changed
+ - nm_change_vrf.current.name == "VRF"
+ - nm_change_vrf.current.l3MCast == True
+
+- name: Verify contract VRF again
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ state: query
+ register: nm_query_change_vrf_contract_again
+
+- name: Verify 2 contracts are in VRF
+ assert:
+ that:
+ - nm_query_change_vrf_contract_again is not changed
+ - nm_query_change_vrf_contract_again.current | length == 2 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf_contract/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf_contract/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf_contract/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf_contract/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf_contract/tasks/main.yml
new file mode 100644
index 00000000..a1fa2c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_schema_template_vrf_contract/tasks/main.yml
@@ -0,0 +1,859 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+#
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+# - name: Ensure site exist
+# mso_site: &site_present
+# host: '{{ mso_hostname }}'
+# username: '{{ mso_username }}'
+# password: '{{ mso_password }}'
+# validate_certs: '{{ mso_validate_certs | default(false) }}'
+# use_ssl: '{{ mso_use_ssl | default(true) }}'
+# use_proxy: '{{ mso_use_proxy | default(true) }}'
+# output_level: '{{ mso_output_level | default("info") }}'
+# site: '{{ mso_site | default("ansible_test") }}'
+# apic_username: '{{ apic_username }}'
+# apic_password: '{{ apic_password }}'
+# apic_site_id: '{{ apic_site_id | default(101) }}'
+# urls:
+# - https://{{ apic_hostname }}
+# state: present
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Ensure tenant ansible_test exist
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ # sites:
+ # - '{{ mso_site | default("ansible_test") }}'
+ state: present
+
+- name: Ensure schema 1 with Template 1 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 1
+ state: present
+
+- name: Ensure schema 1 with Template 2 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ tenant: ansible_test
+ template: Template 2
+ state: present
+
+- name: Ensure schema 2 with Template 3 exist
+ mso_schema_template:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ tenant: ansible_test
+ template: Template 3
+ state: present
+
+- name: Ensure VRF exist
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ state: present
+
+- name: Ensure VRF2 exist
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF2
+ vzany: true
+ state: present
+
+- name: Ensure VRF3 exist
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ vrf: VRF3
+ vzany: true
+ state: present
+
+- name: Ensure VRF4 exist
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ vrf: VRF4
+ vzany: true
+ state: present
+
+- name: Ensure Filter 1 exist
+ mso_schema_template_filter_entry:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ filter: Filter1
+ entry: Filter1-Entry
+ state: present
+
+- name: Ensure Contract1 exist
+ mso_schema_template_contract_filter:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract1
+ filter: Filter1
+ filter_schema: '{{ mso_schema | default("ansible_test") }}'
+ filter_template: Template 1
+ state: present
+
+- name: Ensure Contract4 exist
+ mso_schema_template_contract_filter:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract4
+ filter: Filter1
+ filter_schema: '{{ mso_schema | default("ansible_test") }}'
+ filter_template: Template 1
+ state: present
+
+- name: Ensure Contract2 exist
+ mso_schema_template_contract_filter:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract2
+ filter: Filter1
+ filter_schema: '{{ mso_schema | default("ansible_test") }}'
+ filter_template: Template 1
+ state: present
+
+- name: Ensure Contract3 exist
+ mso_schema_template_contract_filter:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ contract: Contract3
+ filter: Filter1
+ filter_schema: '{{ mso_schema | default("ansible_test") }}'
+ filter_template: Template 1
+ state: present
+
+# ADD Contract to VRF
+- name: Add Contract1 to VRF with vzany disabled
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: consumer
+ state: present
+ ignore_errors: yes
+ register: add_contract1_vrf_vzany_disabled
+
+- name: Verify add_contract1_vrf_vzany_disabled
+ assert:
+ that:
+ - add_contract1_vrf_vzany_disabled.msg == "vzAny attribute on vrf 'VRF' is disabled."
+
+# Enable vzAny on VRF
+- name: Ensure VRF exist
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ vzany: true
+ state: present
+
+- name: Add Contract1 to VRF with type consumer (check_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: consumer
+ state: present
+ check_mode: yes
+ register: cm_add_contract1_consumer
+
+- name: Verify cm_add_contract1_consumer
+ assert:
+ that:
+ - cm_add_contract1_consumer is changed
+ - cm_add_contract1_consumer.previous == {}
+ - cm_add_contract1_consumer.current.contractRef.templateName == "Template1"
+ - cm_add_contract1_consumer.current.contractRef.contractName == "Contract1"
+ - cm_add_contract1_consumer.current.relationshipType == "consumer"
+
+- name: Add Contract1 to VRF with type consumer (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: consumer
+ state: present
+ register: nm_add_contract1_consumer
+
+- name: Verify nm_add_contract1_consumer
+ assert:
+ that:
+ - nm_add_contract1_consumer is changed
+ - nm_add_contract1_consumer.previous == {}
+ - nm_add_contract1_consumer.current.contractRef.templateName == "Template1"
+ - nm_add_contract1_consumer.current.contractRef.contractName == "Contract1"
+ - nm_add_contract1_consumer.current.relationshipType == "consumer"
+ - cm_add_contract1_consumer.current.contractRef.schemaId == nm_add_contract1_consumer.current.contractRef.schemaId
+
+- name: Add Contract1 to VRF with type provider (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: provider
+ state: present
+ register: nm_add_contract1_provider
+
+- name: Verify nm_add_contract1_provider
+ assert:
+ that:
+ - nm_add_contract1_provider is changed
+ - nm_add_contract1_provider.previous == {}
+ - nm_add_contract1_provider.current.contractRef.templateName == "Template1"
+ - nm_add_contract1_provider.current.contractRef.contractName == "Contract1"
+ - nm_add_contract1_provider.current.relationshipType == "provider"
+
+- name: Add Contract1 to VRF with type consumer again(normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: consumer
+ state: present
+ register: nm_add_contract1_consumer_again
+
+- name: Verify nm_add_contract1_consumer_again
+ assert:
+ that:
+ - nm_add_contract1_consumer_again is not changed
+ - nm_add_contract1_consumer_again.current.contractRef.templateName == "Template1" == nm_add_contract1_consumer_again.previous.contractRef.templateName
+ - nm_add_contract1_consumer_again.current.contractRef.contractName == "Contract1" == nm_add_contract1_consumer_again.previous.contractRef.contractName
+ - nm_add_contract1_consumer_again.current.relationshipType == "consumer" == nm_add_contract1_consumer_again.previous.relationshipType
+
+- name: Add Contract1 to VRF with type provider again(normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: provider
+ state: present
+ register: nm_add_contract1_provider_again
+
+- name: Verify nm_add_contract1_provider_again
+ assert:
+ that:
+ - nm_add_contract1_provider_again is not changed
+ - nm_add_contract1_provider_again.current.contractRef.templateName == "Template1" == nm_add_contract1_provider_again.previous.contractRef.templateName
+ - nm_add_contract1_provider_again.current.contractRef.contractName == "Contract1" == nm_add_contract1_provider_again.previous.contractRef.contractName
+ - nm_add_contract1_provider_again.current.relationshipType == "provider" == nm_add_contract1_provider_again.previous.relationshipType
+
+- name: Add Contract4 to VRF2 with type consumer (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF2
+ contract:
+ name: Contract4
+ type: consumer
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_vrf2_consumer
+
+- name: Add Contract4 to VRF2 with type provider (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF2
+ contract:
+ name: Contract4
+ type: provider
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_vrf2_provider
+
+- name: nm_add_vrf2_consumer and nm_add_vrf2_provider
+ assert:
+ that:
+ - nm_add_vrf2_consumer is changed
+ - nm_add_vrf2_provider is changed
+ - nm_add_vrf2_consumer.previous == {} == nm_add_vrf2_provider.previous
+ - nm_add_vrf2_consumer.current.contractRef.templateName == "Template1" == nm_add_vrf2_provider.current.contractRef.templateName
+ - nm_add_vrf2_consumer.current.contractRef.contractName == "Contract4" == nm_add_vrf2_provider.current.contractRef.contractName
+ - nm_add_vrf2_consumer.current.relationshipType == "consumer"
+ - nm_add_vrf2_provider.current.relationshipType == "provider"
+
+- name: Add Contract3 to VRF3 with type consumer (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ vrf: VRF3
+ contract:
+ name: Contract3
+ type: consumer
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_vrf3_consumer
+
+- name: Add Contract3 to VRF3 with type provider (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 2
+ vrf: VRF3
+ contract:
+ name: Contract3
+ type: provider
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_vrf3_provider
+
+- name: nm_add_vrf3_consumer and nm_add_vrf3_provider
+ assert:
+ that:
+ - nm_add_vrf3_consumer is changed
+ - nm_add_vrf3_provider is changed
+ - nm_add_vrf3_consumer.previous == {} == nm_add_vrf3_provider.previous
+ - nm_add_vrf3_consumer.current.contractRef.templateName == "Template1" == nm_add_vrf3_provider.current.contractRef.templateName
+ - nm_add_vrf3_consumer.current.contractRef.contractName == "Contract3" == nm_add_vrf3_provider.current.contractRef.contractName
+ - nm_add_vrf3_consumer.current.relationshipType == "consumer"
+ - nm_add_vrf3_provider.current.relationshipType == "provider"
+
+- name: Add Contract2 to VRF4 with type consumer (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ vrf: VRF4
+ contract:
+ name: Contract2
+ type: consumer
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_vrf4_consumer
+
+- name: Add Contract2 to VRF4 with type provider (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}_2'
+ template: Template 3
+ vrf: VRF4
+ contract:
+ name: Contract2
+ type: provider
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ state: present
+ register: nm_add_vrf4_provider
+
+- name: nm_add_vrf4_consumer and nm_add_vrf4_provider
+ assert:
+ that:
+ - nm_add_vrf4_consumer is changed
+ - nm_add_vrf4_provider is changed
+ - nm_add_vrf4_consumer.previous == {} == nm_add_vrf4_provider.previous
+ - nm_add_vrf4_consumer.current.contractRef.templateName == "Template1" == nm_add_vrf4_provider.current.contractRef.templateName
+ - nm_add_vrf4_consumer.current.contractRef.contractName == "Contract2" == nm_add_vrf4_provider.current.contractRef.contractName
+ - nm_add_vrf4_consumer.current.relationshipType == "consumer"
+ - nm_add_vrf4_provider.current.relationshipType == "provider"
+
+# REMOVE A Contract to VRF
+- name: Remove contract4 to VRF2 - provider (check_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF2
+ contract:
+ name: Contract4
+ type: provider
+ state: absent
+ check_mode: yes
+ register: cm_remove_contract4_vrf2_provider
+
+- name: Remove contract4 to VRF2 - provider (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF2
+ contract:
+ name: Contract4
+ type: provider
+ state: absent
+ register: nm_remove_contract4_vrf2_provider
+
+- name: Remove contract4 to VRF2 - consumer (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF2
+ contract:
+ name: Contract4
+ type: consumer
+ state: absent
+ register: nm_remove_contract4_vrf2_consumer
+
+- name: Verify cm_remove_contract4_vrf2_provider and cm_remove_contract4_vrf2_provider and nm_remove_contract4_vrf2_consumer
+ assert:
+ that:
+ - cm_remove_contract4_vrf2_provider is changed
+ - nm_remove_contract4_vrf2_provider is changed
+ - cm_remove_contract4_vrf2_provider.current == {}
+ - nm_remove_contract4_vrf2_provider.current == {}
+ - nm_remove_contract4_vrf2_consumer.current == {}
+ - cm_remove_contract4_vrf2_provider.previous.contractRef.contractName == nm_remove_contract4_vrf2_provider.previous.contractRef.contractName == nm_remove_contract4_vrf2_consumer.previous.contractRef.contractName == "Contract4"
+ - cm_remove_contract4_vrf2_provider.previous.contractRef.templateName == nm_remove_contract4_vrf2_provider.previous.contractRef.templateName == nm_remove_contract4_vrf2_consumer.previous.contractRef.templateName == "Template1"
+ - cm_remove_contract4_vrf2_provider.previous.contractRef.schemaId == nm_remove_contract4_vrf2_provider.previous.contractRef.schemaId == nm_remove_contract4_vrf2_consumer.previous.contractRef.schemaId
+ - cm_remove_contract4_vrf2_provider.previous.relationshipType == "provider"
+ - nm_remove_contract4_vrf2_provider.previous.relationshipType == "provider"
+ - nm_remove_contract4_vrf2_consumer is changed
+ - nm_remove_contract4_vrf2_consumer.previous.relationshipType == "consumer"
+
+- name: Remove contract4 to VRF2 - provider again (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF2
+ contract:
+ name: Contract4
+ type: provider
+ state: absent
+ register: nm_remove_contract4_vrf2_provider_again
+
+- name: Verify nm_remove_contract4_vrf2_provider_again
+ assert:
+ that:
+ - nm_remove_contract4_vrf2_provider_again is not changed
+ - nm_remove_contract4_vrf2_provider_again.previous == {}
+ - nm_remove_contract4_vrf2_provider_again.current == {}
+
+# QUERY A Contract to VRF
+- name: Query Contract1 relationship for VRF - consumer (check_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: consumer
+ state: query
+ check_mode: yes
+ register: cm_query_VRF_contract1_consumer
+
+- name: Query Contract1 relationship for VRF - consumer (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: consumer
+ state: query
+ check_mode: yes
+ register: nm_query_VRF_contract1_consumer
+
+- name: Verify cm_query_VRF_contract1_consumer and nm_query_VRF_contract1_consumer
+ assert:
+ that:
+ - cm_query_VRF_contract1_consumer is not changed
+ - nm_query_VRF_contract1_consumer is not changed
+ - cm_query_VRF_contract1_consumer.current.relationshipType == nm_query_VRF_contract1_consumer.current.relationshipType == "consumer"
+ - cm_query_VRF_contract1_consumer.current.contractRef.contractName == nm_query_VRF_contract1_consumer.current.contractRef.contractName == "Contract1"
+ - cm_query_VRF_contract1_consumer.current.contractRef.schemaId == nm_query_VRF_contract1_consumer.current.contractRef.schemaId
+ - cm_query_VRF_contract1_consumer.current.contractRef.templateName == nm_query_VRF_contract1_consumer.current.contractRef.templateName == "Template1"
+
+- name: Query Contract1 relationship for VRF - provider (check_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: provider
+ state: query
+ check_mode: yes
+ register: cm_query_VRF_contract1_provider
+
+- name: Query Contract1 relationship for VRF - provider (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: provider
+ state: query
+ check_mode: yes
+ register: nm_query_VRF_contract1_provider
+
+- name: Verify cm_query_VRF_contract1_provider and nm_query_VRF_contract1_provider
+ assert:
+ that:
+ - cm_query_VRF_contract1_provider is not changed
+ - nm_query_VRF_contract1_provider is not changed
+ - cm_query_VRF_contract1_provider.current.relationshipType == nm_query_VRF_contract1_provider.current.relationshipType == "provider"
+ - cm_query_VRF_contract1_provider.current.contractRef.contractName == nm_query_VRF_contract1_provider.current.contractRef.contractName == "Contract1"
+ - cm_query_VRF_contract1_provider.current.contractRef.schemaId == nm_query_VRF_contract1_provider.current.contractRef.schemaId
+ - cm_query_VRF_contract1_provider.current.contractRef.templateName == nm_query_VRF_contract1_provider.current.contractRef.templateName == "Template1"
+
+# QUERY ALL Contract to VRF
+- name: Query all contracts relationship for VRF (check_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ state: query
+ check_mode: yes
+ register: cm_query_all_contract_vrf
+
+- name: Query all contracts relationship for VRF (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ state: query
+ register: nm_query_all_contract_vrf
+
+- name: Verify cm_query_all_contract_vrf and nm_query_all_contract_vrf
+ assert:
+ that:
+ - nm_query_all_contract_vrf is not changed
+ - cm_query_all_contract_vrf is not changed
+ - cm_query_all_contract_vrf.current | length == nm_query_all_contract_vrf.current | length == 2
+
+# QUERY ALL Contracts to VRF2
+- name: Query all contracts relationship for VRF2 (check_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF2
+ state: query
+ check_mode: yes
+ register: cm_query_all_contract_vrf2
+
+- name: Query all contracts relationship for VRF2 (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF2
+ state: query
+ register: nm_query_all_contract_vrf2
+
+- name: Verify cm_query_all_contract_vrf2 and nm_query_all_contract_vrf2
+ assert:
+ that:
+ - nm_query_all_contract_vrf2 is not changed
+ - cm_query_all_contract_vrf2 is not changed
+ - cm_query_all_contract_vrf2.current == nm_query_all_contract_vrf2.current == []
+
+# QUERY NON-EXISTING Contract to VRF
+- name: Query non-existing contract (check_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: non_existing_contract
+ type: provider
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_existing_contract
+
+- name: Query non-existing contract (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: non_existing_contract
+ type: provider
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_existing_contract
+
+- name: Verify cm_query_non_existing_contract and nm_query_non_existing_contract
+ assert:
+ that:
+ - cm_query_non_existing_contract is not changed
+ - nm_query_non_existing_contract is not changed
+ - cm_query_non_existing_contract == nm_query_non_existing_contract
+ - cm_query_non_existing_contract.msg == "Contract 'non_existing_contract' not found"
+ - nm_query_non_existing_contract.msg == "Contract 'non_existing_contract' not found"
+
+# QUERY NON-EXISTING VRF
+- name: Query non-existing VRF (check_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: non_existing_vrf
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_existing_vrf
+
+- name: Query non-existing VRF (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: non_existing_vrf
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_existing_vrf
+
+- name: Verify cm_query_non_existing_vrf and nm_query_non_existing_vrf
+ assert:
+ that:
+ - cm_query_non_existing_vrf is not changed
+ - nm_query_non_existing_vrf is not changed
+ - cm_query_non_existing_vrf == nm_query_non_existing_vrf
+ - cm_query_non_existing_vrf.msg == "Provided vrf 'non_existing_vrf' does not exist. Existing vrfs{{':'}} VRF, VRF2"
+ - nm_query_non_existing_vrf.msg == "Provided vrf 'non_existing_vrf' does not exist. Existing vrfs{{':'}} VRF, VRF2"
+
+# USE A NON-EXISTING SCHEMA
+- name: Non-existing schema for contract relationship (check_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: non_existing_schema
+ template: Template 1
+ vrf: VRF
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_existing_schema
+
+- name: Non-existing schema for contract relationship (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: non_existing_schema
+ template: Template 1
+ vrf: VRF
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_existing_schema
+
+- name: Verify cm_query_non_existing_schema and nm_query_non_existing_schema
+ assert:
+ that:
+ - cm_query_non_existing_schema is not changed
+ - nm_query_non_existing_schema is not changed
+ - cm_query_non_existing_schema.msg == "Provided schema 'non_existing_schema' does not exist"
+ - nm_query_non_existing_schema.msg == "Provided schema 'non_existing_schema' does not exist"
+
+- name: Non-existing contract schema for contract relationship (check_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: provider
+ schema: non_existing_schema
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_existing_contract_schema
+
+- name: Non-existing schema for contract relationship (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: provider
+ schema: non_existing_schema
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_existing_contract_schema
+
+- name: Verify cm_query_non_existing_contract_schema and nm_query_non_existing_contract_schema
+ assert:
+ that:
+ - cm_query_non_existing_contract_schema is not changed
+ - nm_query_non_existing_contract_schema is not changed
+ - cm_query_non_existing_contract_schema.msg == "Schema 'non_existing_schema' is not a valid schema name."
+ - nm_query_non_existing_contract_schema.msg == "Schema 'non_existing_schema' is not a valid schema name."
+
+# USE A NON-EXISTING TEMPLATE
+- name: Non-existing templateName for contract relationship (check_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non_existing_template
+ vrf: VRF
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_existing_template
+
+- name: Non-existing templateName for contract relationship (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non_existing_template
+ vrf: VRF
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_existing_template
+
+- name: Verify cm_query_non_existing_template and nm_query_non_existing_template
+ assert:
+ that:
+ - cm_query_non_existing_template is not changed
+ - nm_query_non_existing_template is not changed
+ - cm_query_non_existing_template.msg == "Provided template 'non_existing_template' does not exist. Existing templates{{':'}} Template1, Template2"
+ - nm_query_non_existing_template.msg == "Provided template 'non_existing_template' does not exist. Existing templates{{':'}} Template1, Template2"
+
+- name: Non-existing contract templateName for contract relationship (check_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: provider
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non_existing_template
+ state: query
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_query_non_existing_contract_template
+
+- name: Non-existing contract templateName for contract relationship (normal_mode)
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ contract:
+ name: Contract1
+ type: provider
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: non_existing_template
+ state: query
+ ignore_errors: yes
+ register: nm_query_non_existing_contract_template
+
+- name: Verify cm_query_non_existing_contract_template and nm_query_non_existing_contract_template
+ assert:
+ that:
+ - cm_query_non_existing_contract_template is not changed
+ - nm_query_non_existing_contract_template is not changed
+ - cm_query_non_existing_contract_template.msg == "Contract 'Contract1' not found"
+ - nm_query_non_existing_contract_template.msg == "Contract 'Contract1' not found"
+
+# Checking if contract are removed after re-applying an VRF.
+- name: Add VRF again (normal_mode)
+ mso_schema_template_vrf:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ vzany: true
+ state: present
+ register: nm_add_VRF_again
+
+- name: Verify that VRF didn't changed
+ assert:
+ that:
+ - nm_add_VRF_again is not changed
+
+- name: Verify contract VRF again
+ mso_schema_template_vrf_contract:
+ <<: *mso_info
+ schema: '{{ mso_schema | default("ansible_test") }}'
+ template: Template 1
+ vrf: VRF
+ state: query
+ register: nm_query_vrf_contract_again
+
+- name: Verify 2 contracts are in VRF
+ assert:
+ that:
+ - nm_query_vrf_contract_again is not changed
+ - nm_query_vrf_contract_again.current | length == 2 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_site/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_site/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_site/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_site/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_site/tasks/main.yml
new file mode 100644
index 00000000..d3ed3981
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_site/tasks/main.yml
@@ -0,0 +1,449 @@
+# Test code for the MSO modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Undeploy a schema 1 template 1
+ mso_schema_template_deploy: &schema_undeploy
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: ansible_test
+ template: Template 1
+ site: '{{ item }}'
+ state: undeploy
+ ignore_errors: yes
+ loop:
+ - '{{ mso_site | default("ansible_test") }}'
+ - '{{ mso_site | default("ansible_test") }}_2'
+
+- name: Undeploy a schema 1 template 2
+ mso_schema_template_deploy:
+ <<: *schema_undeploy
+ template: Template 2
+ site: '{{ item }}'
+ state: undeploy
+ ignore_errors: yes
+ loop:
+ - '{{ mso_site | default("ansible_test") }}'
+ - '{{ mso_site | default("ansible_test") }}_2'
+
+- name: Undeploy a schema 2 template 3
+ mso_schema_template_deploy:
+ <<: *schema_undeploy
+ schema: ansible_test_2
+ template: Template 3
+ site: '{{ item }}'
+ state: undeploy
+ ignore_errors: yes
+ loop:
+ - '{{ mso_site | default("ansible_test") }}'
+ - '{{ mso_site | default("ansible_test") }}_2'
+
+- name: Remove schemas
+ mso_schema:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Remove tenant ansible_test
+ mso_tenant: &tenant_absent
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ tenant: ansible_test
+ state: absent
+
+- name: Remove tenant ansible_test2
+ mso_tenant:
+ <<: *tenant_absent
+ tenant: ansible_test2
+ register: cm_remove_tenant
+
+- name: Remove site
+ mso_site: &site_absent
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: absent
+
+- name: Remove site 2
+ mso_site:
+ <<: *site_absent
+ site: '{{ mso_site | default("ansible_test") }}_2'
+ register: cm_remove_site
+
+
+# ADD SITE
+- name: Add site (check_mode)
+ mso_site: &site_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(101) }}'
+ urls:
+ - https://{{ apic_hostname }}
+ location:
+ latitude: 50.887318
+ longitude: 4.447084
+ labels:
+ - Diegem
+ - EMEA
+ - POD51
+ state: present
+ check_mode: yes
+ register: cm_add_site
+
+- name: Verify cm_add_site
+ assert:
+ that:
+ - cm_add_site is changed
+ - cm_add_site.previous == {}
+ - cm_add_site.current.id is not defined
+ - cm_add_site.current.name == mso_site|default("ansible_test")
+
+- name: Add site (normal mode)
+ mso_site: *site_present
+ register: nm_add_site
+
+- name: Verify nm_add_site
+ assert:
+ that:
+ - nm_add_site is changed
+ - nm_add_site.previous == {}
+ - nm_add_site.current.id is defined
+ - nm_add_site.current.name == mso_site|default("ansible_test")
+
+- name: Add site again (check_mode)
+ mso_site: *site_present
+ check_mode: yes
+ register: cm_add_site_again
+
+- name: Verify cm_add_site_again
+ assert:
+ that:
+ - cm_add_site_again is not changed
+ - cm_add_site_again.previous.name == mso_site|default("ansible_test")
+ - cm_add_site_again.current.id == nm_add_site.current.id
+ - cm_add_site_again.current.name == mso_site|default("ansible_test")
+
+- name: Add site again (normal mode)
+ mso_site: *site_present
+ register: nm_add_site_again
+
+- name: Verify nm_add_site_again
+ assert:
+ that:
+ - nm_add_site_again is not changed
+ - nm_add_site_again.previous.name == mso_site|default("ansible_test")
+ - nm_add_site_again.current.id == nm_add_site.current.id
+ - nm_add_site_again.current.name == mso_site|default("ansible_test")
+
+
+# CHANGE SITE
+- name: Change site (check_mode)
+ mso_site:
+ <<: *site_present
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_login_domain: '{{ apic_login_domain | default("test") }}'
+ location:
+ latitude: 51.887318
+ longitude: 5.447084
+ labels:
+ - Charleroi
+ - EMEA
+ check_mode: yes
+ register: cm_change_site
+
+- name: Verify cm_change_site
+ assert:
+ that:
+ - cm_change_site is changed
+ - cm_change_site.current.id == nm_add_site.current.id
+ - cm_change_site.current.name == '{{ mso_site | default("ansible_test") }}'
+ - cm_change_site.current.location.lat == 51.887318
+ - cm_change_site.current.location.long == 5.447084
+ - cm_change_site.current.labels[0] != nm_add_site.current.labels[0]
+ - cm_change_site.current.labels[1] == nm_add_site.current.labels[1]
+
+- name: Change site (normal mode)
+ mso_site:
+ <<: *site_present
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_login_domain: '{{ apic_login_domain | default("test") }}'
+ location:
+ latitude: 51.887318
+ longitude: 5.447084
+ labels:
+ - Charleroi
+ - EMEA
+ output_level: debug
+ register: nm_change_site
+
+- name: Verify nm_change_site
+ assert:
+ that:
+ - nm_change_site is changed
+ - nm_change_site.current.id == nm_add_site.current.id
+ - nm_change_site.current.name == '{{ mso_site | default("ansible_test") }}'
+ - nm_change_site.current.location.lat == 51.887318
+ - nm_change_site.current.location.long == 5.447084
+ - nm_change_site.current.labels[0] != nm_add_site.current.labels[0]
+ - nm_change_site.current.labels[1] == nm_add_site.current.labels[1]
+
+- name: Change site again (check_mode)
+ mso_site:
+ <<: *site_present
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_login_domain: '{{ apic_login_domain | default("test") }}'
+ location:
+ latitude: 51.887318
+ longitude: 5.447084
+ labels:
+ - Charleroi
+ - EMEA
+ check_mode: yes
+ register: cm_change_site_again
+
+- name: Verify cm_change_site_again
+ assert:
+ that:
+ - cm_change_site_again is not changed
+ - cm_change_site_again.current.id == nm_add_site.current.id
+ - cm_change_site_again.current.name == '{{ mso_site | default("ansible_test") }}'
+ - cm_change_site_again.current.location.lat == 51.887318
+ - cm_change_site_again.current.location.long == 5.447084
+ - cm_change_site_again.current.labels[0] == nm_change_site.current.labels[0]
+ - cm_change_site_again.current.labels[1] == nm_change_site.current.labels[1]
+
+- name: Change site again (normal mode)
+ mso_site:
+ <<: *site_present
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_login_domain: '{{ apic_login_domain | default("test") }}'
+ location:
+ latitude: 51.887318
+ longitude: 5.447084
+ labels:
+ - Charleroi
+ - EMEA
+ output_level: debug
+ register: nm_change_site_again
+
+- name: Verify nm_change_site_again
+ assert:
+ that:
+ - nm_change_site_again is not changed
+ - nm_change_site_again.current.id == nm_add_site.current.id
+ - nm_change_site_again.current.name == '{{ mso_site | default("ansible_test") }}'
+ - nm_change_site_again.current.location.lat == 51.887318
+ - nm_change_site_again.current.location.long == 5.447084
+ - nm_change_site_again.current.labels[0] == nm_change_site.current.labels[0]
+ - nm_change_site_again.current.labels[1] == nm_change_site.current.labels[1]
+
+# QUERY ALL SITES
+- name: Query all sites (check_mode)
+ mso_site: &site_query
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_sites
+
+- name: Query all sites (normal mode)
+ mso_site: *site_query
+ register: nm_query_all_sites
+
+- name: Verify query_all_sites
+ assert:
+ that:
+ - cm_query_all_sites is not changed
+ - nm_query_all_sites is not changed
+ # NOTE: Order of sites is not stable between calls
+ #- cm_query_all_sites == nm_query_all_sites
+
+
+# QUERY A SITE
+- name: Query our site
+ mso_site:
+ <<: *site_query
+ site: '{{ mso_site | default("ansible_test") }}'
+ check_mode: yes
+ register: cm_query_site
+
+- name: Query our site
+ mso_site:
+ <<: *site_query
+ site: '{{ mso_site | default("ansible_test") }}'
+ register: nm_query_site
+
+- name: Verify query_site
+ assert:
+ that:
+ - cm_query_site is not changed
+ - cm_query_site.current.id == nm_add_site.current.id
+ - cm_query_site.current.name == '{{ mso_site | default("ansible_test") }}'
+ - nm_query_site is not changed
+ - nm_query_site.current.id == nm_add_site.current.id
+ - nm_query_site.current.name == '{{ mso_site | default("ansible_test") }}'
+ - cm_query_site == nm_query_site
+
+
+# REMOVE SITE
+- name: Remove site (check_mode)
+ mso_site: *site_absent
+ check_mode: yes
+ register: cm_remove_site
+
+- name: Verify cm_remove_site
+ assert:
+ that:
+ - cm_remove_site is changed
+ - cm_remove_site.current == {}
+
+- name: Remove site (normal mode)
+ mso_site: *site_absent
+ register: nm_remove_site
+
+- name: Verify nm_remove_site
+ assert:
+ that:
+ - nm_remove_site is changed
+ - nm_remove_site.current == {}
+
+- name: Remove site again (check_mode)
+ mso_site: *site_absent
+ check_mode: yes
+ register: cm_remove_site_again
+
+- name: Verify cm_remove_site_again
+ assert:
+ that:
+ - cm_remove_site_again is not changed
+ - cm_remove_site_again.current == {}
+
+- name: Remove site again (normal mode)
+ mso_site: *site_absent
+ register: nm_remove_site_again
+
+- name: Verify nm_remove_site_again
+ assert:
+ that:
+ - nm_remove_site_again is not changed
+ - nm_remove_site_again.current == {}
+
+
+# QUERY NON-EXISTING SITE
+- name: Query non-existing site (check_mode)
+ mso_site:
+ <<: *site_query
+ site: '{{ mso_site | default("ansible_test") }}'
+ check_mode: yes
+ register: cm_query_non_site
+
+- name: Query non-existing site (normal mode)
+ mso_site:
+ <<: *site_query
+ site: '{{ mso_site | default("ansible_test") }}'
+ register: nm_query_non_site
+
+# TODO: Implement more tests
+- name: Verify query_non_site
+ assert:
+ that:
+ - cm_query_non_site is not changed
+ - nm_query_non_site is not changed
+ - cm_query_non_site == nm_query_non_site
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state for site (check_mode)
+ mso_site:
+ <<: *site_query
+ state: non-existing-state
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: Non-existing state for bd (normal_mode)
+ mso_site:
+ <<: *site_query
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state == nm_non_existing_state
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} absent, present, query, got{{':'}} non-existing-state"
+
+# ADD SITE
+- name: Add site (normal_mode)
+ mso_site:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id | default(101) }}'
+ apic_login_domain: '{{ apic_login_domain | default("test") }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+ register: nm_add_site_no_location
+
+- name: Verify cm_add_site
+ assert:
+ that:
+ - nm_add_site_no_location is changed
+ - nm_add_site_no_location.previous == {}
+ - nm_add_site_no_location.current.id is defined
+ - nm_add_site_no_location.current.name == mso_site|default("ansible_test") \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant/tasks/main.yml
new file mode 100644
index 00000000..44b996f6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant/tasks/main.yml
@@ -0,0 +1,541 @@
+# Test code for the MSO modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+# Copyright: (c) 2020, Cindy Zhao (@cizhao) <cizhao@cisco.com>
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ apic_hostname_2: 173.36.219.123
+ apic_username_2: admin
+ apic_password_2: ins3965!
+ apic_site_id_2: 102
+
+- name: Ensure sites exists
+ mso_site:
+ <<: *mso_info
+ site: '{{ item.site }}'
+ apic_username: '{{ item.username }}'
+ apic_password: '{{ item.password }}'
+ apic_site_id: '{{ item.id }}'
+ urls:
+ - https://{{ item.urls }}
+ state: present
+ loop:
+ - { site: '{{ mso_site | default("ansible_test") }}', username: '{{ apic_username }}', password: '{{ apic_password }}', id: '{{ apic_site_id | default(101) }}', urls: '{{ apic_hostname }}' }
+ - { site: '{{ mso_site | default("ansible_test") }}_2', username: '{{ apic_username_2 }}', password: '{{ apic_password_2 }}', id: '{{ apic_site_id_2 | default(101) }}', urls: '{{ apic_hostname_2 }}' }
+
+- name: Undeploy a schema 1 template 1
+ mso_schema_template_deploy: &schema_undeploy
+ <<: *mso_info
+ schema: ansible_test
+ template: Template 1
+ site: '{{ item }}'
+ state: undeploy
+ ignore_errors: yes
+ loop:
+ - '{{ mso_site | default("ansible_test") }}'
+ - '{{ mso_site | default("ansible_test") }}_2'
+
+- name: Undeploy a schema 1 template 2
+ mso_schema_template_deploy:
+ <<: *schema_undeploy
+ template: Template 2
+ site: '{{ item }}'
+ state: undeploy
+ ignore_errors: yes
+ loop:
+ - '{{ mso_site | default("ansible_test") }}'
+ - '{{ mso_site | default("ansible_test") }}_2'
+
+- name: Undeploy a schema 2 template 3
+ mso_schema_template_deploy:
+ <<: *schema_undeploy
+ schema: ansible_test_2
+ template: Template 3
+ site: '{{ item }}'
+ state: undeploy
+ ignore_errors: yes
+ loop:
+ - '{{ mso_site | default("ansible_test") }}'
+ - '{{ mso_site | default("ansible_test") }}_2'
+
+- name: Remove schemas
+ mso_schema:
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Remove tenant ansible_test
+ mso_tenant: &tenant_absent
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ tenant: ansible_test
+ state: absent
+
+- name: Remove tenant ansible_test2
+ mso_tenant:
+ <<: *tenant_absent
+ tenant: ansible_test2
+ register: cm_remove_tenant2
+
+- name: Remove tenant ansible_test3
+ mso_tenant:
+ <<: *tenant_absent
+ tenant: ansible_test3
+ register: cm_remove_tenant3
+
+# ADD TENANT
+- name: Add tenant (check_mode)
+ mso_tenant: &tenant_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ tenant: ansible_test
+ display_name: Ansible test title
+ description: Ansible test tenant
+ state: present
+ check_mode: yes
+ register: cm_add_tenant
+
+- name: Verify cm_add_tenant
+ assert:
+ that:
+ - cm_add_tenant is changed
+ - cm_add_tenant.previous == {}
+ - cm_add_tenant.current.id is not defined
+ - cm_add_tenant.current.name == 'ansible_test'
+ - cm_add_tenant.current.description == 'Ansible test tenant'
+ - cm_add_tenant.current.userAssociations | length == 1
+
+- name: Add tenant (normal mode)
+ mso_tenant: *tenant_present
+ register: nm_add_tenant
+
+- name: Verify nm_add_tenant
+ assert:
+ that:
+ - nm_add_tenant is changed
+ - nm_add_tenant.previous == {}
+ - nm_add_tenant.current.id is defined
+ - nm_add_tenant.current.name == 'ansible_test'
+ - nm_add_tenant.current.description == 'Ansible test tenant'
+ - nm_add_tenant.current.userAssociations | length == 1
+
+- name: Add tenant again (check_mode)
+ mso_tenant: *tenant_present
+ check_mode: yes
+ register: cm_add_tenant_again
+
+- name: Verify cm_add_tenant_again
+ assert:
+ that:
+ - cm_add_tenant_again is not changed
+ - cm_add_tenant_again.previous.name == 'ansible_test'
+ - cm_add_tenant_again.previous.description == 'Ansible test tenant'
+ - cm_add_tenant_again.current.id == nm_add_tenant.current.id
+ - cm_add_tenant_again.current.name == 'ansible_test'
+ - cm_add_tenant_again.current.description == 'Ansible test tenant'
+ - cm_add_tenant_again.current.userAssociations == cm_add_tenant_again.previous.userAssociations
+
+- name: Add tenant again (normal mode)
+ mso_tenant: *tenant_present
+ register: nm_add_tenant_again
+
+- name: Verify nm_add_tenant_again
+ assert:
+ that:
+ - nm_add_tenant_again is not changed
+ - nm_add_tenant_again.previous.name == 'ansible_test'
+ - nm_add_tenant_again.previous.description == 'Ansible test tenant'
+ - nm_add_tenant_again.current.id == nm_add_tenant.current.id
+ - nm_add_tenant_again.current.name == 'ansible_test'
+ - nm_add_tenant_again.current.description == 'Ansible test tenant'
+ - nm_add_tenant_again.current.userAssociations == nm_add_tenant_again.previous.userAssociations
+
+# ADD TENANT WITH USERS
+- name: Add tenant 2 (normal mode)
+ mso_tenant:
+ <<: *tenant_present
+ tenant: ansible_test2
+ users:
+ - '{{ mso_username }}'
+ display_name: null
+ state: present
+ register: nm_add_tenant2
+
+- name: Verify nm_add_tenant2
+ assert:
+ that:
+ - nm_add_tenant2 is changed
+
+- name: Verify nm_add_tenant2 (when mso_username != admin)
+ assert:
+ that:
+ - nm_add_tenant2.current.userAssociations | length == 2
+ when: mso_username != 'admin'
+
+- name: Verify nm_add_tenant2 (when mso_username == admin)
+ assert:
+ that:
+ - nm_add_tenant2.current.userAssociations | length == 1
+ when: mso_username == 'admin'
+
+- name: Add tenant 2 again (normal mode)
+ mso_tenant:
+ <<: *tenant_present
+ tenant: ansible_test2
+ users:
+ - '{{ mso_username }}'
+ display_name: null
+ state: present
+ register: nm_add_tenant2_again
+
+- name: Verify nm_add_tenant2_again
+ assert:
+ that:
+ - nm_add_tenant2_again is not changed
+
+- name: Verify nm_add_tenant2_again (when mso_username != admin)
+ assert:
+ that:
+ - nm_add_tenant2_again.current.userAssociations | length == 2
+ when: mso_username != 'admin'
+
+- name: Verify nm_add_tenant2_again (when mso_username == admin)
+ assert:
+ that:
+ - nm_add_tenant2_again.current.userAssociations | length == 1
+ when: mso_username == 'admin'
+
+- name: Add tenant 3 with duplicate admin user (normal mode)
+ mso_tenant:
+ <<: *tenant_present
+ tenant: ansible_test3
+ users:
+ - admin
+ - admin
+ display_name: null
+ state: present
+ ignore_errors: yes
+ register: nm_add_tenant3_with_duplicate_admin
+
+- name: Verify nm_add_tenant3_with_duplicate_admin
+ assert:
+ that:
+ - nm_add_tenant3_with_duplicate_admin is not changed
+ - nm_add_tenant3_with_duplicate_admin.msg == "User 'admin' is duplicate."
+
+- name: Add tenant 3 with invalid user (normal mode)
+ mso_tenant:
+ <<: *tenant_present
+ tenant: ansible_test3
+ users:
+ - invalid user
+ display_name: null
+ state: present
+ ignore_errors: yes
+ register: nm_add_tenant3_with_invalid_user
+
+- name: nm_add_tenant3_with_invalid_user
+ assert:
+ that:
+ - nm_add_tenant3_with_invalid_user is not changed
+ - nm_add_tenant3_with_invalid_user.msg == "User 'invalid user' is not a valid user name."
+
+- name: Add tenant 3 (normal mode)
+ mso_tenant:
+ <<: *tenant_present
+ tenant: ansible_test3
+ users:
+ - '{{ mso_username }}'
+ display_name: null
+ state: present
+ register: nm_add_tenant3
+
+- name: Verify nm_add_tenant3
+ assert:
+ that:
+ - nm_add_tenant3 is changed
+
+- name: Verify nm_add_tenant3 (when mso_username != admin)
+ assert:
+ that:
+ - nm_add_tenant3.current.userAssociations | length == 2
+ when: mso_username != 'admin'
+
+- name: Verify nm_add_tenant3 (when mso_username == admin)
+ assert:
+ that:
+ - nm_add_tenant3.current.userAssociations | length == 1
+ when: mso_username == 'admin'
+
+# CHANGE TENANT
+- name: Change tenant (check_mode)
+ mso_tenant:
+ <<: *tenant_present
+ tenant: ansible_test
+ description: Ansible test tenant 2
+ check_mode: yes
+ register: cm_change_tenant
+
+- name: Verify cm_change_tenant
+ assert:
+ that:
+ - cm_change_tenant is changed
+ - cm_change_tenant.current.id == nm_add_tenant.current.id
+ - cm_change_tenant.current.name == 'ansible_test'
+ - cm_change_tenant.current.description == 'Ansible test tenant 2'
+
+- name: Change tenant (normal mode)
+ mso_tenant:
+ <<: *tenant_present
+ tenant: ansible_test
+ description: Ansible test tenant 2
+ output_level: debug
+ register: nm_change_tenant
+
+- name: Verify nm_change_tenant
+ assert:
+ that:
+ - nm_change_tenant is changed
+ - nm_change_tenant.current.id == nm_add_tenant.current.id
+ - nm_change_tenant.current.name == 'ansible_test'
+ - nm_change_tenant.current.description == 'Ansible test tenant 2'
+
+- name: Change tenant again (check_mode)
+ mso_tenant:
+ <<: *tenant_present
+ tenant: ansible_test
+ description: Ansible test tenant 2
+ check_mode: yes
+ register: cm_change_tenant_again
+
+- name: Verify cm_change_tenant_again
+ assert:
+ that:
+ - cm_change_tenant_again is not changed
+ - cm_change_tenant_again.current.id == nm_add_tenant.current.id
+ - cm_change_tenant_again.current.name == 'ansible_test'
+ - cm_change_tenant_again.current.description == 'Ansible test tenant 2'
+
+- name: Change tenant again (normal mode)
+ mso_tenant:
+ <<: *tenant_present
+ tenant: ansible_test
+ description: Ansible test tenant 2
+ register: nm_change_tenant_again
+
+- name: Verify nm_change_tenant_again
+ assert:
+ that:
+ - nm_change_tenant_again is not changed
+ - nm_change_tenant_again.current.id == nm_add_tenant.current.id
+ - nm_change_tenant_again.current.name == 'ansible_test'
+ - nm_change_tenant_again.current.description == 'Ansible test tenant 2'
+
+
+# QUERY ALL TENANTS
+- name: Query all tenants (check_mode)
+ mso_tenant: &tenant_query
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_tenants
+
+- name: Query all tenants (normal mode)
+ mso_tenant: *tenant_query
+ register: nm_query_all_tenants
+
+- name: Verify query_all_tenants
+ assert:
+ that:
+ - cm_query_all_tenants is not changed
+ - nm_query_all_tenants is not changed
+ # NOTE: Order of tenants is not stable between calls
+ #- cm_query_all_tenants == nm_query_all_tenants
+
+
+# QUERY A TENANT
+- name: Query our tenant
+ mso_tenant:
+ <<: *tenant_query
+ tenant: ansible_test
+ check_mode: yes
+ register: cm_query_tenant
+
+- name: Query our tenant
+ mso_tenant:
+ <<: *tenant_query
+ tenant: ansible_test
+ register: nm_query_tenant
+
+- name: Verify query_tenant
+ assert:
+ that:
+ - cm_query_tenant is not changed
+ - cm_query_tenant.current.id == nm_add_tenant.current.id
+ - cm_query_tenant.current.name == 'ansible_test'
+ - cm_query_tenant.current.description == 'Ansible test tenant 2'
+ - nm_query_tenant is not changed
+ - nm_query_tenant.current.id == nm_add_tenant.current.id
+ - nm_query_tenant.current.name == 'ansible_test'
+ - nm_query_tenant.current.description == 'Ansible test tenant 2'
+ - cm_query_tenant == nm_query_tenant
+
+
+# REMOVE TENANT
+- name: Remove tenant (check_mode)
+ mso_tenant: *tenant_absent
+ check_mode: yes
+ register: cm_remove_tenant
+
+- name: Verify cm_remove_tenant
+ assert:
+ that:
+ - cm_remove_tenant is changed
+ - cm_remove_tenant.current == {}
+
+- name: Remove tenant (normal mode)
+ mso_tenant: *tenant_absent
+ register: nm_remove_tenant
+
+- name: Verify nm_remove_tenant
+ assert:
+ that:
+ - nm_remove_tenant is changed
+ - nm_remove_tenant.current == {}
+
+- name: Remove tenant again (check_mode)
+ mso_tenant: *tenant_absent
+ check_mode: yes
+ register: cm_remove_tenant_again
+
+- name: Verify cm_remove_tenant_again
+ assert:
+ that:
+ - cm_remove_tenant_again is not changed
+ - cm_remove_tenant_again.current == {}
+
+- name: Remove tenant again (normal mode)
+ mso_tenant: *tenant_absent
+ register: nm_remove_tenant_again
+
+- name: Verify nm_remove_tenant_again
+ assert:
+ that:
+ - nm_remove_tenant_again is not changed
+ - nm_remove_tenant_again.current == {}
+
+
+# QUERY NON-EXISTING TENANT
+- name: Query non-existing tenant (check_mode)
+ mso_tenant:
+ <<: *tenant_query
+ tenant: ansible_test
+ check_mode: yes
+ register: cm_query_non_tenant
+
+- name: Query non-existing tenant (normal mode)
+ mso_tenant:
+ <<: *tenant_query
+ tenant: ansible_test
+ register: nm_query_non_tenant
+
+# TODO: Implement more tests
+- name: Verify query_non_tenant
+ assert:
+ that:
+ - cm_query_non_tenant is not changed
+ - nm_query_non_tenant is not changed
+ - cm_query_non_tenant == nm_query_non_tenant
+
+- name: Add common tenant
+ mso_tenant:
+ <<: *tenant_present
+ tenant: common
+ display_name: common
+ sites: [ansible_test, ansible_test_2]
+ register: nm_add_common_tenant
+
+- name: Verify nm_add_common_tenant
+ assert:
+ that:
+ - nm_add_common_tenant is changed
+ - nm_add_common_tenant.current.name == "common"
+
+- name: Add tenant with site
+ mso_tenant:
+ <<: *tenant_present
+ tenant: tenant_with_site
+ display_name: tenant_with_site
+ sites: ansible_test
+ register: nm_add_tenant_with_site
+
+- name: Verify nm_add_tenant_with_site
+ assert:
+ that:
+ - nm_add_tenant_with_site is changed
+ - nm_add_tenant_with_site.current.name == "tenant_with_site"
+
+- name: Remove common tenant
+ mso_tenant:
+ <<: *tenant_absent
+ tenant: common
+ ignore_errors: yes
+ register: rm_common
+
+- name: Verify rm_common
+ assert:
+ that:
+ - rm_common.msg == "MSO Error 400{{':'}} Bad Request{{':'}} Common Tenant cannot be deleted."
+
+- name: Remove tenant_with_site
+ mso_tenant:
+ <<: *tenant_absent
+ tenant: tenant_with_site
+ register: rm_tenant_with_site
+
+- name: Verify rm_tenant_with_site
+ assert:
+ that:
+ - rm_tenant_with_site is changed
+ - rm_tenant_with_site.current == {} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant_site/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant_site/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant_site/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant_site/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant_site/tasks/main.yml
new file mode 100644
index 00000000..f39db0b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_tenant_site/tasks/main.yml
@@ -0,0 +1,661 @@
+# Test code for the MSO modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> (based on mso_site test case)
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+# Copyright: (c) 2020, Shreyas Srish (@shrsr) <ssrish@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+- name: Remove schemas
+ mso_schema:
+ <<: *mso_info
+ schema: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_schema | default("ansible_test") }}_2'
+ - '{{ mso_schema | default("ansible_test") }}'
+
+- name: Dissociate clouds that are associated with ansible_tenant
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: '{{ item }}'
+ state: absent
+ loop:
+ - '{{ mso_site | default("ansible_test") }}'
+ - 'aws_{{ mso_site | default("ansible_test") }}'
+ - 'azure_{{ mso_site | default("ansible_test") }}'
+ ignore_errors: yes
+
+- name: Remove tenant ansible_test
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ state: absent
+
+- name: Ensure non-cloud site exists
+ mso_site:
+ <<: *mso_info
+ site: '{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ apic_username }}'
+ apic_password: '{{ apic_password }}'
+ apic_site_id: '{{ apic_site_id }}'
+ urls:
+ - https://{{ apic_hostname }}
+ state: present
+
+- name: Ensure azure site exists
+ mso_site:
+ <<: *mso_info
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ azure_apic_username }}'
+ apic_password: '{{ azure_apic_password }}'
+ apic_site_id: '{{ azure_site_id }}'
+ urls:
+ - https://{{ azure_apic_hostname }}
+ state: present
+
+- name: Ensure aws site exists
+ mso_site:
+ <<: *mso_info
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ apic_username: '{{ aws_apic_username }}'
+ apic_password: '{{ aws_apic_password }}'
+ apic_site_id: '{{ aws_site_id }}'
+ urls:
+ - https://{{ aws_apic_hostname }}
+ state: present
+
+- name: Ensure tenant ansible_test exists
+ mso_tenant:
+ <<: *mso_info
+ tenant: ansible_test
+ users:
+ - '{{ mso_username }}'
+ state: present
+
+- name: Associate non-cloud site with ansible_test in check mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: present
+ check_mode: yes
+ register: ncs_cm
+
+- name: Verify ncs_cm
+ assert:
+ that:
+ - ncs_cm is changed
+
+- name: Associate non-cloud site with ansible_test in normal mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: present
+ register: ncs_nm
+
+- name: Verify ncs_nm
+ assert:
+ that:
+ - ncs_nm is changed
+
+- name: Associate non-cloud site with ansible_test again in normal mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: present
+ register: ncs_nm_again
+
+- name: Verify ncs_nm_again
+ assert:
+ that:
+ - ncs_nm_again is not changed
+
+- name: Associate aws site with ansible_test in check mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ cloud_account: "000000000000"
+ aws_trusted: false
+ aws_access_key: "1"
+ secret_key: "0"
+ state: present
+ check_mode: yes
+ register: aaws_cm
+
+- name: Verify aaws_cm
+ assert:
+ that:
+ - aaws_cm is changed
+ - aaws_cm.current.awsAccount != 'null'
+ - aaws_cm.current.awsAccount[0].accessKeyId == '1'
+ - aaws_cm.current.awsAccount[0].secretKey == '0'
+ - aaws_cm.current.awsAccount[0].accountId == '000000000000'
+
+- name: Associate aws site with ansible_test in normal mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ cloud_account: "000000000000"
+ aws_trusted: false
+ aws_access_key: "1"
+ secret_key: "0"
+ state: present
+ register: aaws_nm
+
+- name: Verify aaws_nm
+ assert:
+ that:
+ - aaws_nm is changed
+ - aaws_nm.current.awsAccount != 'null'
+ - aaws_nm.current.awsAccount[0].accessKeyId == '1'
+ - aaws_nm.current.awsAccount[0].secretKey == '0'
+ - aaws_nm.current.awsAccount[0].accountId == '000000000000'
+
+- name: Associate aws site with ansible_test again in normal mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ cloud_account: "000000000000"
+ aws_trusted: false
+ aws_access_key: "1"
+ secret_key: "0"
+ state: present
+ register: aaws_nm_again
+
+- name: Verify aaws_nm_again
+ assert:
+ that:
+ - aaws_nm_again is not changed
+
+- name: Associate aws site with ansible_test in normal mode when aws_trusted is false and aws_access_key is missing
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ cloud_account: "000000000000"
+ aws_trusted: false
+ secret_key: "0"
+ state: present
+ ignore_errors: yes
+ register: aaws_nm_ak
+
+- name: Verify aaws_nm_ak
+ assert:
+ that:
+ - aaws_nm_ak.msg is match ("aws_access_key is a required field in untrusted mode.")
+
+- name: Associate aws site with ansible_test in normal mode when aws_trusted is false and secret_key is missing
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ cloud_account: "000000000000"
+ aws_trusted: false
+ aws_access_key: "1"
+ state: present
+ ignore_errors: yes
+ register: aaws_nm_sk
+
+- name: Verify aaws_nm_sk
+ assert:
+ that:
+ - aaws_nm_sk.msg is match ("secret_key is a required field in untrusted mode.")
+
+- name: Associate aws site with ansible_test, with organization mode true
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ aws_account_org: true
+ cloud_account: "000000000000"
+ secret_key: "0"
+ aws_access_key: "1"
+ state: present
+ ignore_errors: yes
+ register: aaws_nm_om
+
+- name: Verify aaws_nm_om
+ assert:
+ that:
+ - aaws_nm_om.current.awsAccount[0].isAccountInOrg == true
+
+- name: Associate azure site with access_type not present, with ansible_test in normal mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ cloud_account: uni/tn-ansible_test/act-[100]-vendor-azure
+ state: present
+ register: aazure_shared_nm
+
+- name: Verify aazure_shared_nm
+ assert:
+ that:
+ - aazure_shared_nm is changed
+
+- name: Associate azure site in shared mode with ansible_test in normal mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ cloud_account: uni/tn-ansible_test/act-[100]-vendor-azure
+ azure_access_type: shared
+ state: present
+ register: aazure_shared_nm
+
+- name: Verify aazure_shared_nm
+ assert:
+ that:
+ - aazure_shared_nm is not changed
+
+- name: Associate azure site with managed mode, with ansible_test in normal mode having no application_id
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ azure_subscription_id: "9"
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ azure_access_type: managed
+ state: present
+ ignore_errors: yes
+ register: aazure_managed_nm_app
+
+- name: Verify aazure_managed_nm_app
+ assert:
+ that:
+ - aazure_managed_nm_app.msg is match ("azure_application_id is required when in managed mode.")
+
+- name: Associate azure site with managed mode, with ansible_test in normal mode having no subscription_id
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ azure_application_id: "100"
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ azure_access_type: managed
+ state: present
+ ignore_errors: yes
+ register: aazure_managed_nm_si
+
+- name: Verify aazure_managed_nm_si
+ assert:
+ that:
+ - aazure_managed_nm_si.msg is match ("azure_susbscription_id is required when in managed mode.")
+
+- name: Associate azure site with managed mode, with ansible_test in normal mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ azure_subscription_id: "9"
+ azure_application_id: "100"
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ azure_access_type: managed
+ state: present
+ ignore_errors: yes
+ register: aazure_managed_nm
+
+- name: Verify aazure_managed_nm
+ assert:
+ that:
+ - aazure_managed_nm is changed
+ - aazure_managed_nm.current.azureAccount != 'null'
+ - aazure_managed_nm.current.azureAccount[0].cloudSubscription.cloudApplicationId == '100'
+ - aazure_managed_nm.current.azureAccount[0].cloudSubscription.cloudSubscriptionId == '9'
+ - aazure_managed_nm.current.azureAccount[0].cloudApplication == []
+ - aazure_managed_nm.current.azureAccount[0].cloudActiveDirectory == []
+
+- name: Associate azure site with credentials mode, with ansible_test in normal mode having no azure_subscription_id
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ azure_application_id: "100"
+ azure_credential_name: cApicApp
+ secret_key: iins
+ azure_active_directory_id: "32"
+ azure_active_directory_name: CiscoINSBUAd
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ azure_access_type: unmanaged
+ state: present
+ ignore_errors: yes
+ register: aazure_credentials_nm_si
+
+- name: Verify aazure_credentials_nm_si
+ assert:
+ that:
+ - aazure_credentials_nm_si.msg is match ("azure_subscription_id is required when in unmanaged mode.")
+
+- name: Associate azure site with credentials mode, with ansible_test in normal mode having no azure_application_id
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ azure_subscription_id: "9"
+ azure_credential_name: cApicApp
+ secret_key: iins
+ azure_active_directory_id: "32"
+ azure_active_directory_name: CiscoINSBUAd
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ azure_access_type: unmanaged
+ state: present
+ ignore_errors: yes
+ register: aazure_credentials_nm_app
+
+- name: Verify aazure_credentials_nm_app
+ assert:
+ that:
+ - aazure_credentials_nm_app.msg is match ("azure_application_id is required when in unmanaged mode.")
+
+- name: Associate azure site with credentials mode, with ansible_test in normal mode having no secret_key
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ azure_subscription_id: "9"
+ azure_credential_name: cApicApp
+ azure_active_directory_id: "32"
+ azure_active_directory_name: CiscoINSBUAd
+ azure_application_id: "100"
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ azure_access_type: unmanaged
+ state: present
+ ignore_errors: yes
+ register: aazure_credentials_nm_secret
+
+- name: Verify aazure_credentials_nm_secret
+ assert:
+ that:
+ - aazure_credentials_nm_secret.msg is match ("secret_key is required when in unmanaged mode.")
+
+- name: Associate azure site with credentials mode, with ansible_test in normal mode having no azure_active_directory_id
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ azure_subscription_id: "9"
+ azure_credential_name: cApicApp
+ azure_active_directory_name: CiscoINSBUAd
+ azure_application_id: "100"
+ secret_key: iins
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ azure_access_type: unmanaged
+ state: present
+ ignore_errors: yes
+ register: aazure_credentials_nm_ad
+
+- name: Verify aazure_credentials_nm_ad
+ assert:
+ that:
+ - aazure_credentials_nm_ad.msg is match ("azure_active_directory_id is required when in unmanaged mode.")
+
+- name: Associate azure site with credentials mode, with ansible_test in normal mode having no azure_active_directory_name
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ azure_subscription_id: "9"
+ azure_credential_name: cApicApp
+ secret_key: iins
+ azure_active_directory_id: "32"
+ azure_application_id: "100"
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ azure_access_type: unmanaged
+ state: present
+ ignore_errors: yes
+ register: aazure_credentials_nm_adn
+
+- name: Verify aazure_credentials_nm_adn
+ assert:
+ that:
+ - aazure_credentials_nm_adn.msg is match ("azure_active_directory_name is required when in unmanaged mode.")
+
+- name: Associate azure site with credentials mode, with ansible_test in normal mode having no azure_credential_name
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ azure_subscription_id: "9"
+ secret_key: iins
+ azure_active_directory_name: CiscoINSBUAd
+ azure_active_directory_id: "32"
+ azure_application_id: "100"
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ azure_access_type: unmanaged
+ state: present
+ ignore_errors: yes
+ register: aazure_credentials_nm_cdn
+
+- name: Verify aazure_credentials_nm_cdn
+ assert:
+ that:
+ - aazure_credentials_nm_cdn.msg is match ("azure_credential_name is required when in unmanaged mode.")
+
+- name: Associate azure site with credentials mode, with ansible_test in normal mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ azure_subscription_id: "9"
+ azure_application_id: "100"
+ azure_credential_name: cApicApp
+ secret_key: iins
+ azure_active_directory_id: "32"
+ azure_active_directory_name: CiscoINSBUAd
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ azure_access_type: unmanaged
+ state: present
+ register: aazure_credentials_nm
+
+- name: Verify aazure_credentials_nm
+ assert:
+ that:
+ - aazure_credentials_nm is changed
+ - aazure_credentials_nm.current.azureAccount[0].cloudSubscription.cloudApplicationId == '100'
+ - aazure_credentials_nm.current.azureAccount[0].cloudSubscription.cloudSubscriptionId == '9'
+ - aazure_credentials_nm.current.azureAccount[0].cloudActiveDirectory[0].cloudActiveDirectoryId == '32'
+ - aazure_credentials_nm.current.azureAccount[0].cloudActiveDirectory[0].cloudActiveDirectoryName == 'CiscoINSBUAd'
+ - aazure_credentials_nm.current.azureAccount[0].cloudApplication[0].cloudApplicationId == '100'
+ - aazure_credentials_nm.current.azureAccount[0].cloudApplication[0].cloudActiveDirectoryId == '32'
+ - aazure_credentials_nm.current.azureAccount[0].cloudApplication[0].cloudCredentialName == 'cApicApp'
+ - aazure_credentials_nm.current.azureAccount[0].cloudApplication[0].secretKey == 'iins'
+
+- name: Associate azure site with credentials mode, with ansible_test again in normal mode
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ azure_subscription_id: "9"
+ azure_application_id: "100"
+ azure_credential_name: cApicApp
+ secret_key: iins
+ azure_active_directory_id: "32"
+ azure_active_directory_name: CiscoINSBUAd
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ azure_access_type: unmanaged
+ state: present
+ register: aazure_credentials_nm_again
+
+- name: Verify aazure_credentials_nm_again
+ assert:
+ that:
+ - aazure_credentials_nm_again is not changed
+
+- name: Query associated non-cloud site of a tenant
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: query
+ register: anc_query
+
+- name: Verify anc_query
+ assert:
+ that:
+ - anc_query is not changed
+
+- name: Query associated azure site of a tenant
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ azure_subscription_id: "9"
+ azure_application_id: "100"
+ azure_credential_name: cApicApp
+ secret_key: iins
+ azure_active_directory_id: "32"
+ azure_active_directory_name: CiscoINSBUAd
+ cloud_account: uni/tn-ansible_test/act-[9]-vendor-azure
+ azure_access_type: unmanaged
+ state: query
+ register: aazure_query
+
+- name: Verify aazure_query
+ assert:
+ that:
+ - aazure_query is not changed
+
+- name: Query associated aws site of a tenant
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ state: query
+ register: aaws_query
+
+- name: Verify aaws_query
+ assert:
+ that:
+ - aaws_query is not changed
+
+- name: Query all associated sites of a tenant
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ state: query
+ register: all_sites_query
+
+- name: Verify all_sites_query
+ assert:
+ that:
+ - all_sites_query is not changed
+
+- name: Dissociate non-cloud site with ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: absent
+ register: dnc
+
+- name: Verify dnc
+ assert:
+ that:
+ - dnc is changed
+
+- name: Query dissociated non-cloud site of a tenant
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: '{{ mso_site | default("ansible_test") }}'
+ state: query
+ ignore_errors: yes
+ register: dnc_query
+
+- name: Verify dnc_query
+ assert:
+ that:
+ - dnc_query.msg is match ("Site Id [0-9a-zA-Z]* not associated with tenant Id [0-9a-zA-Z]*")
+
+- name: Dissociate azure site with ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ state: absent
+ register: dazure
+
+- name: Verify dazure
+ assert:
+ that:
+ - dazure is changed
+
+- name: Query dissociated azure site of a tenant
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'azure_{{ mso_site | default("ansible_test") }}'
+ state: query
+ ignore_errors: yes
+ register: dazure_query
+
+- name: Verify dnc_query
+ assert:
+ that:
+ - dazure_query.msg is match ("Site Id [0-9a-zA-Z]* not associated with tenant Id [0-9a-zA-Z]*")
+
+- name: Dissociate aws site with ansible_test
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ state: absent
+ register: daaws
+
+- name: Verify daaws
+ assert:
+ that:
+ - daaws is changed
+
+- name: Query dissociated aws site of a tenant
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ site: 'aws_{{ mso_site | default("ansible_test") }}'
+ state: query
+ ignore_errors: yes
+ register: daaws_query
+
+- name: Verify daaws_query
+ assert:
+ that:
+ - daaws_query.msg is match ("No site associated with tenant Id [0-9a-zA-Z]*")
+
+- name: Query all
+ mso_tenant_site:
+ <<: *mso_info
+ tenant: ansible_test
+ state: query
+ ignore_errors: yes
+ register: query_all
+
+- name: Verify query_all
+ assert:
+ that:
+ - query_all.msg is match ("No site associated with tenant Id [0-9a-zA-Z]*") \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_user/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_user/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_user/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_user/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_user/tasks/main.yml
new file mode 100644
index 00000000..8bead661
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_user/tasks/main.yml
@@ -0,0 +1,522 @@
+# Test code for the MSO modules
+# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+
+# CLEAN ENVIRONMENT
+- name: Remove user ansible_test
+ mso_user: &user_absent
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ user: '{{ item }}'
+ state: absent
+ loop:
+ - ansible_test
+ - ansible_test2
+ - ansible_test_read
+ - ansible_test_read_2
+
+# ADD USER
+- name: Add user (check_mode)
+ mso_user: &user_present
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ user: ansible_test
+ user_password: 'S0m3!1n1t14l!p455w0rd'
+ # NOTE: First name, last name, phone and email are mandatory on creation
+ first_name: Ansible
+ last_name: Test
+ email: mso@cisco.com
+ phone: +32 478 436 299
+ account_status: active
+ roles:
+ - name: powerUser
+ access_type: write
+ domain: Local
+ state: present
+ check_mode: yes
+ register: cm_add_user
+
+- name: Verify cm_add_user
+ assert:
+ that:
+ - cm_add_user is changed
+ - cm_add_user.previous == {}
+ - cm_add_user.current.id is not defined
+ - cm_add_user.current.username == 'ansible_test'
+ - cm_add_user.current.lastName == 'Test'
+ - cm_add_user.current.firstName == 'Ansible'
+ - cm_add_user.current.emailAddress == 'mso@cisco.com'
+ - cm_add_user.current.phoneNumber == '+32 478 436 299'
+ - cm_add_user.current.accountStatus == 'active'
+ - cm_add_user.current.roles[0].accessType == 'readWrite'
+
+- name: Add user (normal mode)
+ mso_user: *user_present
+ register: nm_add_user
+
+- name: Verify nm_add_user
+ assert:
+ that:
+ - nm_add_user is changed
+ - nm_add_user.previous == {}
+ - nm_add_user.current.id is defined
+ - nm_add_user.current.username == 'ansible_test'
+ - nm_add_user.current.lastName == 'Test'
+ - nm_add_user.current.firstName == 'Ansible'
+ - nm_add_user.current.emailAddress == 'mso@cisco.com'
+ - nm_add_user.current.phoneNumber == '+32 478 436 299'
+ - nm_add_user.current.accountStatus == 'active'
+ - nm_add_user.current.roles[0].accessType == 'readWrite'
+
+- name: Add user again (check_mode)
+ mso_user:
+ <<: *user_present
+ # NOTE: We need to modify the password for a new user
+ user_password: 'S0m3!n3w!p455w0rd'
+ check_mode: yes
+ register: cm_add_user_again
+
+- name: Verify cm_add_user_again
+ assert:
+ that:
+ - cm_add_user_again is changed
+ - cm_add_user_again.previous.username == 'ansible_test'
+ - cm_add_user_again.current.id == nm_add_user.current.id
+ - cm_add_user_again.current.username == 'ansible_test'
+
+- name: Add user again (normal mode)
+ mso_user:
+ <<: *user_present
+ # NOTE: We need to modify the password for a new user
+ user_password: 'S0m3!n3w!p455w0rd'
+ register: nm_add_user_again
+
+- name: Verify nm_add_user_again
+ assert:
+ that:
+ - nm_add_user_again is changed
+ - nm_add_user_again.previous.username == 'ansible_test'
+ - nm_add_user_again.current.id == nm_add_user.current.id
+ - nm_add_user_again.current.username == 'ansible_test'
+
+- name: Add user with read only role (check_mode)
+ mso_user: &user_present2
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ user: ansible_test_read
+ user_password: '#123455#123455Aa'
+ # NOTE: First name, last name, phone and email are mandatory on creation
+ first_name: Ansible2
+ last_name: Test2
+ email: mso3@cisco.com
+ phone: +32 478 436 299
+ account_status: active
+ roles:
+ - name: powerUser
+ access_type: read
+ domain: Local
+ state: present
+ check_mode: yes
+ register: cm_add_user2
+
+- name: Verify cm_add_user2
+ assert:
+ that:
+ - cm_add_user2 is changed
+ - cm_add_user2.previous == {}
+ - cm_add_user2.current.id is not defined
+ - cm_add_user2.current.username == 'ansible_test_read'
+ - cm_add_user2.current.lastName == 'Test2'
+ - cm_add_user2.current.firstName == 'Ansible2'
+ - cm_add_user2.current.emailAddress == 'mso3@cisco.com'
+ - cm_add_user2.current.phoneNumber == '+32 478 436 299'
+ - cm_add_user2.current.accountStatus == 'active'
+ - cm_add_user2.current.roles[0].accessType == 'readOnly'
+
+- name: Add user with read only role (normal mode)
+ mso_user: *user_present2
+ register: nm_add_user2
+
+- name: Verify nm_add_user2
+ assert:
+ that:
+ - nm_add_user2 is changed
+ - nm_add_user2.current.id is defined
+ - nm_add_user2.current.username == 'ansible_test_read'
+ - nm_add_user2.current.lastName == 'Test2'
+ - nm_add_user2.current.firstName == 'Ansible2'
+ - nm_add_user2.current.emailAddress == 'mso3@cisco.com'
+ - nm_add_user2.current.phoneNumber == '+32 478 436 299'
+ - nm_add_user2.current.accountStatus == 'active'
+ - nm_add_user2.current.roles[0].accessType == 'readOnly'
+
+- name: Add user with read only role again (check mode)
+ mso_user:
+ <<: *user_present2
+ user_password: '#123455#123455Aa'
+ check_mode: yes
+ register: cm_add_user2_again
+
+- name: Add user with read only role again (normal mode)
+ mso_user: *user_present2
+ register: nm_add_user2
+
+- name: Add user3 with read only role and no password (check_mode)
+ mso_user: &user_present3
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ user: ansible_test_read_2
+ # NOTE: First name, last name, phone and email are mandatory on creation
+ first_name: Ansible3
+ #user_password: '#123455#123455Aa'
+ last_name: Test3
+ email: mso4@cisco.com
+ phone: +32 478 436 299
+ account_status: active
+ roles:
+ - name: powerUser
+ access_type: read
+ domain: Local
+ state: present
+ ignore_errors: yes
+ register: nm_add_user3
+
+- name: Verify nm_add_user2
+ assert:
+ that:
+ - nm_add_user3.msg == "The user ansible_test_read_2 does not exist. The 'user_password' attribute is required to create a new user."
+
+- name: Add user3 with read only role and with password (normal mode)
+ mso_user:
+ <<: *user_present3
+ user_password: '#123455#123455Aa'
+ register: nm_add_user3_again
+
+- name: Verify nm_add_user3_again
+ assert:
+ that:
+ - nm_add_user3_again is changed
+ - nm_add_user3_again.current.id is defined
+ - nm_add_user3_again.current.username == 'ansible_test_read_2'
+ - nm_add_user3_again.current.lastName == 'Test3'
+ - nm_add_user3_again.current.firstName == 'Ansible3'
+ - nm_add_user3_again.current.emailAddress == 'mso4@cisco.com'
+ - nm_add_user3_again.current.phoneNumber == '+32 478 436 299'
+ - nm_add_user3_again.current.accountStatus == 'active'
+ - nm_add_user3_again.current.roles[0].accessType == 'readOnly'
+
+# CHANGE USER
+- name: Change user (check_mode)
+ mso_user: &user_change
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ user: ansible_test
+ roles:
+ - name: powerUser
+ access_type: write
+ domain: Local
+ state: present
+ # FIXME: Add support for name change
+ email: mso2@cisco.com
+ phone: +32 478 436 300
+ check_mode: yes
+ register: cm_change_user
+
+- name: Verify cm_change_user
+ assert:
+ that:
+ - cm_change_user is changed
+ - cm_change_user.current.id == nm_add_user.current.id
+ - cm_change_user.current.username == 'ansible_test'
+ - cm_change_user.current.emailAddress == 'mso2@cisco.com'
+ - cm_change_user.current.phoneNumber == '+32 478 436 300'
+
+- name: Change user (normal mode)
+ mso_user:
+ <<: *user_change
+ output_level: debug
+ register: nm_change_user
+
+- name: Verify nm_change_user
+ assert:
+ that:
+ - nm_change_user is changed
+ - nm_change_user.current.id == nm_add_user.current.id
+ - nm_change_user.current.username == 'ansible_test'
+ - nm_change_user.current.emailAddress == 'mso2@cisco.com'
+ - nm_change_user.current.phoneNumber == '+32 478 436 300'
+
+- name: Change user again (check_mode)
+ mso_user:
+ <<: *user_change
+ check_mode: yes
+ register: cm_change_user_again
+
+- name: Verify cm_change_user_again
+ assert:
+ that:
+ - cm_change_user_again is not changed
+ - cm_change_user_again.current.id == nm_add_user.current.id
+ - cm_change_user_again.current.username == 'ansible_test'
+ - cm_change_user_again.current.emailAddress == 'mso2@cisco.com'
+ - cm_change_user_again.current.phoneNumber == '+32 478 436 300'
+
+- name: Change user again (normal mode)
+ mso_user:
+ <<: *user_change
+ register: nm_change_user_again
+
+- name: Verify nm_change_user_again
+ assert:
+ that:
+ - nm_change_user_again is not changed
+ - nm_change_user_again.current.id == nm_add_user.current.id
+ - nm_change_user_again.current.username == 'ansible_test'
+ - nm_change_user_again.current.emailAddress == 'mso2@cisco.com'
+ - nm_change_user_again.current.phoneNumber == '+32 478 436 300'
+
+- name: Add second user
+ mso_user:
+ <<: *user_change
+ user: ansible_test2
+ user_password: 'S0m3!1n1t14l!p455w0rd'
+ first_name: Ansible
+ last_name: Test
+ roles:
+ - powerUser
+ state: present
+ register: nm_add_user_2
+
+- name: Change user 2 again (normal mode)
+ mso_user:
+ <<: *user_change
+ user: ansible_test2
+ user_password: null
+ first_name: Ansible
+ last_name: Test
+ register: nm_change_user_2_again
+
+- name: Verify nm_change_user_2_again
+ assert:
+ that:
+ - nm_change_user_2_again is not changed
+ - nm_change_user_2_again.current.id == nm_add_user_2.current.id
+ - nm_change_user_2_again.current.username == 'ansible_test2'
+
+# TODO: Add query with user ansible_test2 to try if user can login.
+
+# QUERY ALL USERS
+- name: Query all users (check_mode)
+ mso_user: &user_query
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+ state: query
+ check_mode: yes
+ register: cm_query_all_users
+
+- name: Query all users (normal mode)
+ mso_user: *user_query
+ register: nm_query_all_users
+
+- name: Verify query_all_users
+ assert:
+ that:
+ - cm_query_all_users is not changed
+ - nm_query_all_users is not changed
+ # NOTE: Order of users is not stable between calls
+ #- cm_query_all_users == nm_query_all_users
+
+
+# QUERY A USER
+- name: Query our user
+ mso_user:
+ <<: *user_query
+ user: ansible_test
+ check_mode: yes
+ register: cm_query_user
+
+- name: Query our user
+ mso_user:
+ <<: *user_query
+ user: ansible_test
+ register: nm_query_user
+
+- name: Verify query_user
+ assert:
+ that:
+ - cm_query_user is not changed
+ - cm_query_user.current.id == nm_add_user.current.id
+ - cm_query_user.current.username == 'ansible_test'
+ - nm_query_user is not changed
+ - nm_query_user.current.id == nm_add_user.current.id
+ - nm_query_user.current.username == 'ansible_test'
+ - cm_query_user == nm_query_user
+
+- name: Query our read-only user
+ mso_user:
+ <<: *user_query
+ user: ansible_test_read
+ register: nm_query_user2
+
+- name: Verify query_user2
+ assert:
+ that:
+ - nm_query_user2 is not changed
+ - nm_query_user2.current.roles[0].accessType == 'readOnly'
+
+# REMOVE USER
+- name: Remove user (check_mode)
+ mso_user:
+ <<: *user_absent
+ user: ansible_test
+ state: absent
+ check_mode: yes
+ register: cm_remove_user
+
+- name: Verify cm_remove_user
+ assert:
+ that:
+ - cm_remove_user is changed
+ - cm_remove_user.current == {}
+
+- name: Remove user (normal mode)
+ mso_user:
+ <<: *user_absent
+ user: ansible_test
+ state: absent
+ register: nm_remove_user
+
+- name: Verify nm_remove_user
+ assert:
+ that:
+ - nm_remove_user is changed
+ - nm_remove_user.current == {}
+
+- name: Remove user again (check_mode)
+ mso_user:
+ <<: *user_absent
+ user: ansible_test
+ state: absent
+ check_mode: yes
+ register: cm_remove_user_again
+
+- name: Verify cm_remove_user_again
+ assert:
+ that:
+ - cm_remove_user_again is not changed
+ - cm_remove_user_again.current == {}
+
+- name: Remove user again (normal mode)
+ mso_user:
+ <<: *user_absent
+ user: ansible_test
+ state: absent
+ register: nm_remove_user_again
+
+- name: Verify nm_remove_user_again
+ assert:
+ that:
+ - nm_remove_user_again is not changed
+ - nm_remove_user_again.current == {}
+
+# QUERY NON-EXISTING USER
+- name: Query non-existing user (check_mode)
+ mso_user:
+ <<: *user_query
+ user: ansible_test
+ check_mode: yes
+ register: cm_query_non_user
+
+- name: Query non-existing user (normal mode)
+ mso_user:
+ <<: *user_query
+ user: ansible_test
+ register: nm_query_non_user
+
+# TODO: Implement more tests
+- name: Verify query_non_user
+ assert:
+ that:
+ - cm_query_non_user is not changed
+ - nm_query_non_user is not changed
+ - cm_query_non_user == nm_query_non_user
+
+- name: inactive user (check_mode)
+ mso_user:
+ <<: *user_present
+ account_status: inactive
+ check_mode: yes
+ register: cm_inactive_user
+
+- name: inactive user (normal_mode)
+ mso_user:
+ <<: *user_present
+ account_status: inactive
+ register: nm_inactive_user
+
+- name: Verify cm_inactive_user and nm_inactive_user
+ assert:
+ that:
+ - cm_inactive_user is changed
+ - nm_inactive_user is changed
+ - cm_inactive_user.current.accountStatus == "inactive"
+ - nm_inactive_user.current.accountStatus == "inactive"
+
+
+- name: active user (check_mode)
+ mso_user:
+ <<: *user_present
+ account_status: active
+ check_mode: yes
+ register: cm_active_user
+
+- name: active user (normal_mode)
+ mso_user:
+ <<: *user_present
+ account_status: active
+ register: nm_active_user
+
+- name: Verify cm_active_user and nm_active_user
+ assert:
+ that:
+ - cm_active_user is changed
+ - nm_active_user is changed
+ - cm_active_user.previous.accountStatus == nm_active_user.previous.accountStatus == "inactive"
+ - cm_active_user.current.accountStatus == nm_active_user.current.accountStatus == "active" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_version/aliases b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_version/aliases
new file mode 100644
index 00000000..5042c9c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_version/aliases
@@ -0,0 +1,2 @@
+# No ACI MultiSite infrastructure, so not enabled
+# unsupported
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_version/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_version/tasks/main.yml
new file mode 100644
index 00000000..5276c75e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/integration/targets/mso_version/tasks/main.yml
@@ -0,0 +1,77 @@
+# Test code for the MSO modules
+# Copyright: (c) 2020, Lionel Hercot (@lhercot) <lhercot@cisco.com>
+
+# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+- name: Test that we have an ACI MultiSite host, username and password
+ fail:
+ msg: 'Please define the following variables: mso_hostname, mso_username and mso_password.'
+ when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
+
+# CLEAN ENVIRONMENT
+- name: Set vars
+ set_fact:
+ mso_info: &mso_info
+ host: '{{ mso_hostname }}'
+ username: '{{ mso_username }}'
+ password: '{{ mso_password }}'
+ validate_certs: '{{ mso_validate_certs | default(false) }}'
+ use_ssl: '{{ mso_use_ssl | default(true) }}'
+ use_proxy: '{{ mso_use_proxy | default(true) }}'
+ output_level: '{{ mso_output_level | default("info") }}'
+
+# QUERY VERSION
+- name: Query MSO version
+ mso_version: &mso_query
+ <<: *mso_info
+ state: query
+ check_mode: yes
+ register: cm_query_version
+
+- name: Verify cm_query_version
+ assert:
+ that:
+ - cm_query_version is not changed
+ - cm_query_version.current.id is defined
+ - cm_query_version.current.version is defined
+ - cm_query_version.current.timestamp is defined
+
+- name: Query MSO version (normal mode)
+ mso_version:
+ <<: *mso_query
+ register: nm_query_version
+
+- name: Verify nm_query_version
+ assert:
+ that:
+ - nm_query_version is not changed
+ - nm_query_version.current.id is defined
+ - nm_query_version.current.version is defined
+ - nm_query_version.current.timestamp is defined
+ - nm_query_version.current.id == cm_query_version.current.id
+ - nm_query_version.current.version == cm_query_version.current.version
+ - nm_query_version.current.timestamp == cm_query_version.current.timestamp
+
+# USE A NON-EXISTING STATE
+- name: Non-existing state for version (check_mode)
+ mso_version:
+ <<: *mso_query
+ state: non-existing-state
+ check_mode: yes
+ ignore_errors: yes
+ register: cm_non_existing_state
+
+- name: Non-existing state for version (normal_mode)
+ mso_version:
+ <<: *mso_query
+ state: non-existing-state
+ ignore_errors: yes
+ register: nm_non_existing_state
+
+- name: Verify non_existing_state
+ assert:
+ that:
+ - cm_non_existing_state is not changed
+ - nm_non_existing_state is not changed
+ - cm_non_existing_state == nm_non_existing_state
+ - cm_non_existing_state.msg == nm_non_existing_state.msg == "value of state must be one of{{':'}} query, got{{':'}} non-existing-state" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/sanity/ignore-2.10.txt b/collections-debian-merged/ansible_collections/cisco/mso/tests/sanity/ignore-2.10.txt
new file mode 100644
index 00000000..1326ec6a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/sanity/ignore-2.10.txt
@@ -0,0 +1,2 @@
+plugins/modules/mso_schema_template_bd.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/mso_user.py validate-modules:parameter-list-no-elements \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/sanity/ignore-2.9.txt b/collections-debian-merged/ansible_collections/cisco/mso/tests/sanity/ignore-2.9.txt
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/sanity/ignore-2.9.txt
diff --git a/collections-debian-merged/ansible_collections/cisco/mso/tests/sanity/requirements.txt b/collections-debian-merged/ansible_collections/cisco/mso/tests/sanity/requirements.txt
new file mode 100644
index 00000000..66ac0c81
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/mso/tests/sanity/requirements.txt
@@ -0,0 +1,5 @@
+packaging # needed for update-bundled and changelog
+sphinx ; python_version >= '3.5' # docs build requires python 3+
+sphinx-notfound-page ; python_version >= '3.5' # docs build requires python 3+
+straight.plugin ; python_version >= '3.5' # needed for hacking/build-ansible.py which will host changelog generation and requires python 3+
+requests-toolbelt \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/.github/workflows/ansible-test.yml b/collections-debian-merged/ansible_collections/cisco/nso/.github/workflows/ansible-test.yml
new file mode 100644
index 00000000..8255db11
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/.github/workflows/ansible-test.yml
@@ -0,0 +1,112 @@
+# README FIRST
+# 1. replace "NAMESPACE" and "COLLECTION_NAME" with the correct name in the env section (e.g. with 'community' and 'mycollection')
+# 2. If you don't have unit tests remove that section
+# 3. If your collection depends on other collections ensure they are installed, see "Install collection dependencies"
+# If you need help please ask in #ansible-devel on Freenode IRC
+
+name: CI
+on:
+ # Run CI against all pushes (direct commits, also merged PRs), Pull Requests
+ push:
+ pull_request:
+ # Run CI once per day (at 06:00 UTC)
+ # This ensures that even if there haven't been commits that we are still testing against latest version of ansible-test for each ansible-base version
+ schedule:
+ - cron: '0 6 * * *'
+env:
+ NAMESPACE: cisco
+ COLLECTION_NAME: nso
+
+jobs:
+
+###
+# Sanity tests (REQUIRED)
+#
+# https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html
+
+ sanity:
+ name: Sanity (Ⓐ${{ matrix.ansible }})
+ strategy:
+ matrix:
+ ansible:
+ # It's important that Sanity is tested against all stable-X.Y branches
+ # Testing against `devel` may fail as new tests are added.
+ # - stable-2.9 # Only if your collection supports Ansible 2.9
+ - stable-2.10
+ - devel
+ runs-on: ubuntu-latest
+ steps:
+
+ # ansible-test requires the collection to be in a directory in the form
+ # .../ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/
+
+ - name: Check out code
+ uses: actions/checkout@v2
+ with:
+ path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
+
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ # it is just required to run that once as "ansible-test sanity" in the docker image
+ # will run on all python versions it supports.
+ python-version: 3.8
+
+ # Install the head of the given branch (devel, stable-2.10)
+ - name: Install ansible-base (${{ matrix.ansible }})
+ run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
+
+ # run ansible-test sanity inside of Docker.
+ # The docker container has all the pinned dependencies that are required
+ # and all python versions ansible supports.
+ - name: Run sanity tests
+ run: ansible-test sanity --docker -v --color
+ working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
+
+###
+# Unit tests (OPTIONAL)
+#
+# https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html
+
+ units:
+ runs-on: ubuntu-latest
+ name: Units (Ⓐ${{ matrix.ansible }})
+ strategy:
+ # As soon as the first unit test fails, cancel the others to free up the CI queue
+ fail-fast: true
+ matrix:
+ ansible:
+ # - stable-2.9 # Only if your collection supports Ansible 2.9
+ - stable-2.10
+ - devel
+
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v2
+ with:
+ path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
+
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ # it is just required to run that once as "ansible-test units" in the docker image
+ # will run on all python versions it supports.
+ python-version: 3.8
+
+ - name: Install ansible-base (${{ matrix.ansible }})
+ run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
+
+ # Run the unit tests
+ - name: Run unit test
+ run: ansible-test units -v --color --docker --coverage
+ working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
+
+ # ansible-test support producing code coverage date
+ - name: Generate coverage report
+ run: ansible-test coverage xml -v --requirements --group-by command --group-by version
+ working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
+
+ # See the reports at https://codecov.io/gh/GITHUBORG/REPONAME
+ - uses: codecov/codecov-action@v1
+ with:
+ fail_ci_if_error: false
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/.gitignore b/collections-debian-merged/ansible_collections/cisco/nso/.gitignore
new file mode 100644
index 00000000..c722adee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/.gitignore
@@ -0,0 +1,393 @@
+# Created by https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
+# Edit at https://www.gitignore.io/?templates=git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
+
+### dotenv ###
+.env
+
+### Emacs ###
+# -*- mode: gitignore; -*-
+*~
+\#*\#
+/.emacs.desktop
+/.emacs.desktop.lock
+*.elc
+auto-save-list
+tramp
+.\#*
+
+# Org-mode
+.org-id-locations
+*_archive
+
+# flymake-mode
+*_flymake.*
+
+# eshell files
+/eshell/history
+/eshell/lastdir
+
+# elpa packages
+/elpa/
+
+# reftex files
+*.rel
+
+# AUCTeX auto folder
+/auto/
+
+# cask packages
+.cask/
+dist/
+
+# Flycheck
+flycheck_*.el
+
+# server auth directory
+/server/
+
+# projectiles files
+.projectile
+
+# directory configuration
+.dir-locals.el
+
+# network security
+/network-security.data
+
+
+### Git ###
+# Created by git for backups. To disable backups in Git:
+# $ git config --global mergetool.keepBackup false
+*.orig
+
+# Created by git when using merge tools for conflicts
+*.BACKUP.*
+*.BASE.*
+*.LOCAL.*
+*.REMOTE.*
+*_BACKUP_*.txt
+*_BASE_*.txt
+*_LOCAL_*.txt
+*_REMOTE_*.txt
+
+#!! ERROR: jupyternotebook is undefined. Use list command to see defined gitignore types !!#
+
+### Linux ###
+
+# temporary files which can be created if a process still has a handle open of a deleted file
+.fuse_hidden*
+
+# KDE directory preferences
+.directory
+
+# Linux trash folder which might appear on any partition or disk
+.Trash-*
+
+# .nfs files are created when an open file is removed but is still being accessed
+.nfs*
+
+### PyCharm+all ###
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+# *.iml
+# *.ipr
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
+
+### PyCharm+all Patch ###
+# Ignores the whole .idea folder and all .iml files
+# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
+
+.idea/
+
+# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
+
+*.iml
+modules.xml
+.idea/misc.xml
+*.ipr
+
+# Sonarlint plugin
+.idea/sonarlint
+
+### pydev ###
+.pydevproject
+
+### Python ###
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+pip-wheel-metadata/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# pyenv
+.python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# Mr Developer
+.mr.developer.cfg
+.project
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+### Vim ###
+# Swap
+[._]*.s[a-v][a-z]
+[._]*.sw[a-p]
+[._]s[a-rt-v][a-z]
+[._]ss[a-gi-z]
+[._]sw[a-p]
+
+# Session
+Session.vim
+Sessionx.vim
+
+# Temporary
+.netrwhist
+# Auto-generated tag files
+tags
+# Persistent undo
+[._]*.un~
+
+### WebStorm ###
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+
+# Generated files
+
+# Sensitive or high-churn files
+
+# Gradle
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+# *.iml
+# *.ipr
+
+# CMake
+
+# Mongo Explorer plugin
+
+# File-based project format
+
+# IntelliJ
+
+# mpeltonen/sbt-idea plugin
+
+# JIRA plugin
+
+# Cursive Clojure plugin
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+
+# Editor-based Rest Client
+
+# Android studio 3.1+ serialized cache file
+
+### WebStorm Patch ###
+# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
+
+# *.iml
+# modules.xml
+# .idea/misc.xml
+# *.ipr
+
+# Sonarlint plugin
+.idea/**/sonarlint/
+
+# SonarQube Plugin
+.idea/**/sonarIssues.xml
+
+# Markdown Navigator plugin
+.idea/**/markdown-navigator.xml
+.idea/**/markdown-navigator/
+
+### Windows ###
+# Windows thumbnail cache files
+Thumbs.db
+Thumbs.db:encryptable
+ehthumbs.db
+ehthumbs_vista.db
+
+# Dump file
+*.stackdump
+
+# Folder config file
+[Dd]esktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+# End of https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
+
+# vsCode
+.vscode
+.DS_Store
+
+# Ansible Collection tarball
+cisco-nso-*.tar.gz \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/CHANGELOG.rst b/collections-debian-merged/ansible_collections/cisco/nso/CHANGELOG.rst
new file mode 100644
index 00000000..0d10e4b7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/CHANGELOG.rst
@@ -0,0 +1,50 @@
+==========================================
+Cisco NSO Ansible Collection Release Notes
+==========================================
+
+.. contents:: Topics
+
+
+v1.0.3
+======
+
+Minor Changes
+-------------
+
+- nso_action can now handle YANG model choices as input parameters (https://github.com/CiscoDevNet/ansible-nso/issues/1)
+- nso_config now supports setting commit flags such as "no-networking", "commit-queue", etc. (https://github.com/CiscoDevNet/ansible-nso/issues/2)
+- nso_config will now return a commit_results dictionary containing the results such as commit-queue-id, rollback-id, etc. (https://github.com/CiscoDevNet/ansible-nso/issues/3)
+
+v1.0.2
+======
+
+Minor Changes
+-------------
+
+- add GitHub Action to the repo for automated sanity and unit tests
+- minor fixes to prepare for inclusion in Ansible 2.10
+
+v1.0.1
+======
+
+Minor Changes
+-------------
+
+- Added See Also section to docs providing links to additional resources
+- Added example for nso_action
+- Corrected import paths in the test modules
+- Defined data types for arguments in the docs where necessary to pass sanity tests
+- Existing nso_config L3VPN example replaced with new examples due to existing example reliance on non-default l3vpn module
+- Modified nso_verify module example
+- Updated documentation with a See Also section providing links to NSO resources
+- Updated examples for nso_show
+- Updated examples in the documentation to align with the NSO DevNet Sandbox
+- Verified all sanity and unit tests passing
+
+v1.0.0
+======
+
+Release Summary
+---------------
+
+This is the first release of the ``cisco.nso`` collection. The modules in this collection were migrated from Ansible Core with no changes to their functionality.
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/FILES.json b/collections-debian-merged/ansible_collections/cisco/nso/FILES.json
new file mode 100644
index 00000000..c7d60a17
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/FILES.json
@@ -0,0 +1,523 @@
+{
+ "files": [
+ {
+ "name": ".",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "LICENSE",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dce9a395bf65bac82e4e448b24ca4c13e86b8f9dff39a03049fe1e5f5b574c22",
+ "format": 1
+ },
+ {
+ "name": "plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/nso.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "df22adca57a8c101f9255f537909838a8d84820cb36d7fff3d09ad9775f88946",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/nso.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a25b074c7934dbbc0ea1a47b84f2937755f3ccd448c049f5ae0f77b6488ddf53",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nso_show.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "71072f473133f8261276135a652644872f6c416f38921531c5a65cf84c79c16e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nso_config.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4df96d22a15b85deaad242b80a9aad4e80a289a6eeb22d7887a07904af484dee",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nso_action.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ca08efa94eef66c5c1d5df1ffba39c83561b657618910c55be495d8432f1cda6",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nso_query.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7774ae70a38c74ec878fd0b284e2a715e76de3746033847c8a6faba2595f9371",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nso_verify.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1bdceaf7822a2bf604f8287cdfa4ade779229cd5159f56cebda093eab9cda563",
+ "format": 1
+ },
+ {
+ "name": "tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/unittest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5401a046e5ce71fa19b6d905abd0f9bdf816c0c635f7bdda6730b3ef06e67096",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/builtins.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0ca4cac919e166b25e601e11acb01f6957dddd574ff0a62569cb994a5ecb63e1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/mock.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0af958450cf6de3fbafe94b1111eae8ba5a8dbe1d785ffbb9df81f26e4946d99",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bae23898d2424f99afdc207e2598c8cb827f78f86cd1880c5e92947a2750d988",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/module_utils/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/module_utils/test_nso.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "383a733090b39ab8c0b7cc46f64ab6fe865018df305540f3992293835c0367b2",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/test_nso_verify.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e97c594a759aff1205fbfc87d109a4f37dec3aaa51503872de829ccf5a5635ca",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/test_nso_query.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "827dee13d856bde3c86eb3b3a9da75a205f3afed17b782c3ea219167c34322f6",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/test_nso_show.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "281c2c0e4bb08d87e5f521283dc379a6454513ae37b85e9dc483ff561f352927",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/utils.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "35890547afa3a972e402125de7907ea28abb33292c9d7779572d928ebc60c59f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/test_nso_action.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7e4e509ab2d752482f372b33ef7ed99206fd25a456e666e6343ef683188ae112",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures/l3vpn_schema.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5a0473c510e3d73aa1467c1d28198dbb8d2c48bccc558a1edecc76218f079079",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures/l3vpn_l3vpn_schema.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dd1ae17c0b0682219f96d49f9b88ffba14e3f1a3f3928fe2518ce1197b9544ee",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures/device_schema.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4ad85113c8433a2f2a9207ff7d2a134f3624447fb3fadc21c6b79eb793765b9a",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures/devices_schema.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "72539687ca9a0f968d824fe28d28416f787a890891df16318f6ae6cb2bd4b3ba",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures/verify_violation_data.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8cefaf448b7fb40fb7a78a3174d280032c673fc5b1c5c6f729bd530f1b48d422",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures/description_schema.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55ffec757d26f7baa8b57ce93dab987272980b8599b226ad93eee66f3412b450",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures/config_config.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "56bb3c57d697f91814f6a90fcbe2795d45f63613b3093f2cca8b9d787ebf83fa",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures/config_config_changes.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5881dee7526fb9927f1b6def739e799c5ce4735a286e0b7ac11df2433589b24a",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures/l3vpn_l3vpn_endpoint_schema.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f5464972c79daf6e0e22a89857d9f45004693edf82c2fa92cf2221a467ed09fe",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures/sync_from_schema.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "17a4b7aadbddb5ef37f62aa656ac8cfb7b5f978a2e8759a9f6cb6b67aba5872d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures/complex_schema.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4b8fe24cb6342fb46cfeea09926551e042e1a542a69c4650d18733eff081f901",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/fixtures/config_empty_data.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/nso_module.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2920ea20515d52ce4a7fc91b23f588f58c24e0b08508113310f455da666aa6ba",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/plugins/modules/test_nso_config.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b0a5b4b9d7e1aca690fc8519bfbbd96e4e9c0e940b815486fb62d50e2b2e8305",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/vault_helper.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4535613601c419f7d20f0c21e638dabccf69b4a7fac99d5f6f9b81d1519dafd6",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/procenv.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a5af19933bcb8c65b14b15cdb4aff08716cca45858e0490a1b5b5d620657800e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/loader.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c45064a0beb765cd0b6cfbb74ca0cd491ceed2f4c2d22808f60a57071d9712cc",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/yaml_helper.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "88718a93edc6059b93ff526fb9b432cabf84628e0341a0469e82f288a6581c1f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/path.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4bb0e6a3ec2c478a7346a6881035639ebb34ff20773b38c3895035b9e4da8ece",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "meta/runtime.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "48a2f61c72296aaa190a3ad670b0a5759bd047262b59b3d870e986b05878d87d",
+ "format": 1
+ },
+ {
+ "name": "changelogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/1.0.1.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a19a220214a31193a57e3195a2a75cfc1b56289cd0d5cada01e89ea3a8c04733",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/1.0.2.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9983675bd9d59c7722e059693b87021eeb9d848b23d8e5db5ed1fbb49a130fb6",
+ "format": 1
+ },
+ {
+ "name": "changelogs/fragments/1.0.3.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2ca03a5409fe673ee0674c828d6a59d9d921f9f4b331cdf943fb576b0f5f3822",
+ "format": 1
+ },
+ {
+ "name": "changelogs/config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d411816c900e67b2fad4120350937246e6166abfc0a97515c178fdde1d5327ad",
+ "format": 1
+ },
+ {
+ "name": "changelogs/.plugin-cache.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7e194e3cf5ab6ccbbc29aad6ac51401fd361570bcde340d91fd6043a5d5468bb",
+ "format": 1
+ },
+ {
+ "name": "changelogs/changelog.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5f70979cc77d4ba707de93c6a8250f7ecf6e4e2d3b44d3bc4313784549ae616e",
+ "format": 1
+ },
+ {
+ "name": "README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b74df289cf74ad96043f54179de6f6ba3a9a8462f22f2261ec75723c4a0671ef",
+ "format": 1
+ },
+ {
+ "name": ".gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "543c30cef64b6492ff37d3c4abf43d047f514290e73fc52f3997ac2b7aa5c303",
+ "format": 1
+ },
+ {
+ "name": ".github",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": ".github/workflows",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": ".github/workflows/ansible-test.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "822b4486d3f33c523fddac34e291889fc4f3d5dc279141dda8604055aadedfb4",
+ "format": 1
+ },
+ {
+ "name": "CHANGELOG.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "293f3c6f10efb31e19e9950724834ed40aaccd0781c852ab08188303879cc07e",
+ "format": 1
+ }
+ ],
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/LICENSE b/collections-debian-merged/ansible_collections/cisco/nso/LICENSE
new file mode 100644
index 00000000..4044ead0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/LICENSE
@@ -0,0 +1,678 @@
+
+Copyright (c) 2019, Cisco Systems
+All rights reserved.
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>. \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/MANIFEST.json b/collections-debian-merged/ansible_collections/cisco/nso/MANIFEST.json
new file mode 100644
index 00000000..3bf11c0c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/MANIFEST.json
@@ -0,0 +1,34 @@
+{
+ "collection_info": {
+ "namespace": "cisco",
+ "name": "nso",
+ "version": "1.0.3",
+ "authors": [
+ "Claes N\u00e4st\u00e9n (@cnasten)"
+ ],
+ "readme": "README.md",
+ "tags": [
+ "cisco",
+ "nso",
+ "cloud",
+ "collection",
+ "networking"
+ ],
+ "description": "Ansible Modules for Cisco NSO",
+ "license": [],
+ "license_file": "LICENSE",
+ "dependencies": {},
+ "repository": "https://github.com/CiscoDevNet/ansible-nso",
+ "documentation": "https://developer.cisco.com/docs/nso/",
+ "homepage": "https://github.com/CiscoDevNet/ansible-nso",
+ "issues": "https://github.com/CiscoDevNet/ansible-nso/issues"
+ },
+ "file_manifest_file": {
+ "name": "FILES.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f4077d527f0e02f81aef7fe7ef40648421ff5abd8208c4f9028597fa0e22af67",
+ "format": 1
+ },
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/README.md b/collections-debian-merged/ansible_collections/cisco/nso/README.md
new file mode 100644
index 00000000..ee1f27e4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/README.md
@@ -0,0 +1,83 @@
+# ansible-nso
+
+The ansible-nso project provides an Ansible collection for managing and automating your Cisco NSO environment. It consists of a set of modules and roles for performing tasks in NSO.
+
+This collection has been tested and supports version 5.3+ of NSO.
+
+*Note: This collection is not compatible with versions of Ansible before v2.9.
+
+## Requirements
+Ansible v2.9 or newer
+
+## Install
+Ansible must be installed
+```
+sudo pip install ansible
+```
+
+Install the collection
+```
+ansible-galaxy collection install cisco.nso
+```
+## Use
+Once the collection is installed, you can use it in a playbook by specifying the full namespace path to the module, plugin and/or role.
+
+```yaml
+- hosts: nso
+ gather_facts: no
+
+ tasks:
+ - name: CREATE DEVICE IN NSO
+ cisco.nso.nso_config:
+ url: https://10.10.20.49/jsonrpc
+ username: developer
+ password: C1sco12345
+ data:
+ tailf-ncs:devices:
+ device:
+ - address: 10.10.20.175
+ description: CONFIGURED BY ANSIBLE!
+ name: dist-rtr01
+ authgroup: "labadmin"
+ device-type:
+ cli:
+ ned-id: "cisco-ios-cli-6.44"
+ port: "22"
+ state:
+ admin-state: "unlocked"
+```
+
+## Update
+Getting the latest/nightly collection build
+
+### First Approach
+Clone the ansible-nso repository.
+```
+git clone https://github.com/CiscoDevNet/ansible-nso.git
+```
+
+Go to the ansible-nso directory
+```
+cd ansible-nso
+```
+
+Pull the latest master on your NSO
+```
+git pull origin master
+```
+
+Build and Install a collection from source
+```
+ansible-galaxy collection build --force
+ansible-galaxy collection install cisco-nso-* --force
+```
+
+### See Also:
+
+* [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.
+
+## Contributing to this collection
+
+Ongoing development efforts and contributions to this collection are tracked as issues in this repository.
+
+We welcome community contributions to this collection. If you find problems, need an enhancement or need a new module, please open an issue or create a PR against the [Cisco NSO collection repository](https://github.com/CiscoDevNet/ansible-nso/issues). \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/changelogs/.plugin-cache.yaml b/collections-debian-merged/ansible_collections/cisco/nso/changelogs/.plugin-cache.yaml
new file mode 100644
index 00000000..5958d025
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/changelogs/.plugin-cache.yaml
@@ -0,0 +1,40 @@
+plugins:
+ become: {}
+ cache: {}
+ callback: {}
+ cliconf: {}
+ connection: {}
+ httpapi: {}
+ inventory: {}
+ lookup: {}
+ module:
+ nso_action:
+ description: Executes Cisco NSO actions and verifies output.
+ name: nso_action
+ namespace: ''
+ version_added: null
+ nso_config:
+ description: Manage Cisco NSO configuration and service synchronization.
+ name: nso_config
+ namespace: ''
+ version_added: null
+ nso_query:
+ description: Query data from Cisco NSO.
+ name: nso_query
+ namespace: ''
+ version_added: null
+ nso_show:
+ description: Displays data from Cisco NSO.
+ name: nso_show
+ namespace: ''
+ version_added: null
+ nso_verify:
+ description: Verifies Cisco NSO configuration.
+ name: nso_verify
+ namespace: ''
+ version_added: null
+ netconf: {}
+ shell: {}
+ strategy: {}
+ vars: {}
+version: 1.0.3
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/changelogs/changelog.yaml b/collections-debian-merged/ansible_collections/cisco/nso/changelogs/changelog.yaml
new file mode 100644
index 00000000..d697e650
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/changelogs/changelog.yaml
@@ -0,0 +1,47 @@
+ancestor: null
+releases:
+ 1.0.0:
+ changes:
+ release_summary: This is the first release of the ``cisco.nso`` collection.
+ The modules in this collection were migrated from Ansible Core with no changes
+ to their functionality.
+ fragments:
+ - 1.0.0.yml
+ release_date: '2020-10-26'
+ 1.0.1:
+ changes:
+ minor_changes:
+ - Added See Also section to docs providing links to additional resources
+ - Added example for nso_action
+ - Corrected import paths in the test modules
+ - Defined data types for arguments in the docs where necessary to pass sanity
+ tests
+ - Existing nso_config L3VPN example replaced with new examples due to existing
+ example reliance on non-default l3vpn module
+ - Modified nso_verify module example
+ - Updated documentation with a See Also section providing links to NSO resources
+ - Updated examples for nso_show
+ - Updated examples in the documentation to align with the NSO DevNet Sandbox
+ - Verified all sanity and unit tests passing
+ fragments:
+ - 1.0.1.yml
+ release_date: '2020-10-30'
+ 1.0.2:
+ changes:
+ minor_changes:
+ - add GitHub Action to the repo for automated sanity and unit tests
+ - minor fixes to prepare for inclusion in Ansible 2.10
+ fragments:
+ - 1.0.2.yml
+ release_date: '2020-12-02'
+ 1.0.3:
+ changes:
+ minor_changes:
+ - nso_action can now handle YANG model choices as input parameters (https://github.com/CiscoDevNet/ansible-nso/issues/1)
+ - nso_config now supports setting commit flags such as "no-networking", "commit-queue",
+ etc. (https://github.com/CiscoDevNet/ansible-nso/issues/2)
+ - nso_config will now return a commit_results dictionary containing the results
+ such as commit-queue-id, rollback-id, etc. (https://github.com/CiscoDevNet/ansible-nso/issues/3)
+ fragments:
+ - 1.0.3.yml
+ release_date: '2021-01-27'
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/changelogs/config.yaml b/collections-debian-merged/ansible_collections/cisco/nso/changelogs/config.yaml
new file mode 100644
index 00000000..8a960c1f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/changelogs/config.yaml
@@ -0,0 +1,32 @@
+changelog_filename_template: ../CHANGELOG.rst
+changelog_filename_version_depth: 0
+changes_file: changelog.yaml
+changes_format: combined
+ignore_other_fragment_extensions: true
+keep_fragments: true
+mention_ancestor: true
+new_plugins_after_name: removed_features
+notesdir: fragments
+prelude_section_name: release_summary
+prelude_section_title: Release Summary
+sanitize_changelog: true
+sections:
+- - major_changes
+ - Major Changes
+- - minor_changes
+ - Minor Changes
+- - breaking_changes
+ - Breaking Changes / Porting Guide
+- - deprecated_features
+ - Deprecated Features
+- - removed_features
+ - Removed Features (previously deprecated)
+- - security_fixes
+ - Security Fixes
+- - bugfixes
+ - Bugfixes
+- - known_issues
+ - Known Issues
+title: Cisco NSO Ansible Collection
+trivial_section_name: trivial
+use_fqcn: true
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/changelogs/fragments/1.0.1.yml b/collections-debian-merged/ansible_collections/cisco/nso/changelogs/fragments/1.0.1.yml
new file mode 100644
index 00000000..7b1bb95d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/changelogs/fragments/1.0.1.yml
@@ -0,0 +1,11 @@
+minor_changes:
+ - Updated examples in the documentation to align with the NSO DevNet Sandbox
+ - Added See Also section to docs providing links to additional resources
+ - Modified nso_verify module example
+ - Existing nso_config L3VPN example replaced with new examples due to existing example reliance on non-default l3vpn module
+ - Updated examples for nso_show
+ - Added example for nso_action
+ - Updated documentation with a See Also section providing links to NSO resources
+ - Corrected import paths in the test modules
+ - Defined data types for arguments in the docs where necessary to pass sanity tests
+ - Verified all sanity and unit tests passing \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/changelogs/fragments/1.0.2.yml b/collections-debian-merged/ansible_collections/cisco/nso/changelogs/fragments/1.0.2.yml
new file mode 100644
index 00000000..f1b8ea9a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/changelogs/fragments/1.0.2.yml
@@ -0,0 +1,3 @@
+minor_changes:
+ - minor fixes to prepare for inclusion in Ansible 2.10
+ - add GitHub Action to the repo for automated sanity and unit tests \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/changelogs/fragments/1.0.3.yml b/collections-debian-merged/ansible_collections/cisco/nso/changelogs/fragments/1.0.3.yml
new file mode 100644
index 00000000..3865305b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/changelogs/fragments/1.0.3.yml
@@ -0,0 +1,5 @@
+minor_changes:
+ - nso_action can now handle YANG model choices as input parameters (https://github.com/CiscoDevNet/ansible-nso/issues/1)
+ - nso_config now supports setting commit flags such as "no-networking", "commit-queue", etc. (https://github.com/CiscoDevNet/ansible-nso/issues/2)
+ - nso_config will now return a commit_results dictionary containing the results such as commit-queue-id, rollback-id, etc. (https://github.com/CiscoDevNet/ansible-nso/issues/3)
+ \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/meta/runtime.yml b/collections-debian-merged/ansible_collections/cisco/nso/meta/runtime.yml
new file mode 100644
index 00000000..1f18fd72
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/meta/runtime.yml
@@ -0,0 +1,2 @@
+---
+requires_ansible: '>=2.9.10' \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/plugins/doc_fragments/nso.py b/collections-debian-merged/ansible_collections/cisco/nso/plugins/doc_fragments/nso.py
new file mode 100644
index 00000000..11d458db
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/plugins/doc_fragments/nso.py
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Cisco and/or its affiliates.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+
+class ModuleDocFragment(object):
+
+ DOCUMENTATION = r'''
+options:
+ url:
+ description: NSO JSON-RPC URL, http://localhost:8080/jsonrpc
+ type: str
+ required: true
+ username:
+ description: NSO username
+ type: str
+ required: true
+ password:
+ description: NSO password
+ type: str
+ required: true
+ timeout:
+ description: JSON-RPC request timeout in seconds
+ type: int
+ default: 300
+ validate_certs:
+ description: When set to true, validates the SSL certificate of NSO when
+ using SSL
+ type: bool
+ required: false
+ default: false
+seealso:
+ - name: Cisco DevNet NSO Sandbox
+ description: Provides a reservable pod with NSO, virtual network topology simulated with Cisco CML and a Linux host running Ansible
+ link: https://blogs.cisco.com/developer/nso-learning-lab-and-sandbox
+ - name: NSO Developer Resources on DevNet
+ description: Documentation for getting started using NSO
+ link: https://developer.cisco.com/docs/nso/
+ - name: NSO Developer Hub
+ description: Collaboration community portal for NSO developers
+ link: https://community.cisco.com/t5/nso-developer-hub/ct-p/5672j-dev-nso
+ - name: NSO Developer Github
+ description: Code for NSO on Github
+ link: https://github.com/NSO-developer/
+'''
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/plugins/module_utils/__init__.py b/collections-debian-merged/ansible_collections/cisco/nso/plugins/module_utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/plugins/module_utils/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/plugins/module_utils/nso.py b/collections-debian-merged/ansible_collections/cisco/nso/plugins/module_utils/nso.py
new file mode 100644
index 00000000..5e469cdd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/plugins/module_utils/nso.py
@@ -0,0 +1,833 @@
+# -*- coding: utf-8 -*-
+
+# Copyright: (c) 2017, Cisco and/or its affiliates.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+from ansible.module_utils.basic import env_fallback
+from ansible.module_utils.urls import open_url
+from ansible.module_utils._text import to_text
+
+import json
+import re
+import socket
+
+try:
+ unicode
+ HAVE_UNICODE = True
+except NameError:
+ unicode = str
+ HAVE_UNICODE = False
+
+
+nso_argument_spec = dict(
+ url=dict(type='str', required=True),
+ username=dict(type='str', required=True, fallback=(env_fallback, ['ANSIBLE_NET_USERNAME'])),
+ password=dict(type='str', required=True, no_log=True, fallback=(env_fallback, ['ANSIBLE_NET_PASSWORD'])),
+ timeout=dict(type='int', default=300),
+ validate_certs=dict(type='bool', default=False)
+)
+
+
+class State(object):
+ SET = 'set'
+ PRESENT = 'present'
+ ABSENT = 'absent'
+ CHECK_SYNC = 'check-sync'
+ DEEP_CHECK_SYNC = 'deep-check-sync'
+ IN_SYNC = 'in-sync'
+ DEEP_IN_SYNC = 'deep-in-sync'
+
+ SYNC_STATES = ('check-sync', 'deep-check-sync', 'in-sync', 'deep-in-sync')
+
+
+class ModuleFailException(Exception):
+ def __init__(self, message):
+ super(ModuleFailException, self).__init__(message)
+ self.message = message
+
+
+class NsoException(Exception):
+ def __init__(self, message, error):
+ super(NsoException, self).__init__(message)
+ self.message = message
+ self.error = error
+
+
+class JsonRpc(object):
+ def __init__(self, url, timeout, validate_certs):
+ self._url = url
+ self._timeout = timeout
+ self._validate_certs = validate_certs
+ self._id = 0
+ self._trans = {}
+ self._headers = {'Content-Type': 'application/json'}
+ self._conn = None
+ self._system_settings = {}
+
+ def login(self, user, passwd):
+ payload = {
+ 'method': 'login',
+ 'params': {'user': user, 'passwd': passwd}
+ }
+ resp, resp_json = self._call(payload)
+ self._headers['Cookie'] = resp.headers['set-cookie']
+
+ def logout(self):
+ payload = {'method': 'logout', 'params': {}}
+ self._call(payload)
+
+ def get_system_setting(self, setting):
+ if setting not in self._system_settings:
+ payload = {'method': 'get_system_setting', 'params': {'operation': setting}}
+ resp, resp_json = self._call(payload)
+ self._system_settings[setting] = resp_json['result']
+ return self._system_settings[setting]
+
+ def new_trans(self, **kwargs):
+ payload = {'method': 'new_trans', 'params': kwargs}
+ resp, resp_json = self._call(payload)
+ return resp_json['result']['th']
+
+ def get_trans(self, mode):
+ if mode not in self._trans:
+ th = self.new_trans(mode=mode)
+ self._trans[mode] = th
+ return self._trans[mode]
+
+ def delete_trans(self, th):
+ payload = {'method': 'delete_trans', 'params': {'th': th}}
+ resp, resp_json = self._call(payload)
+ self._maybe_delete_trans(th)
+
+ def validate_trans(self, th):
+ payload = {'method': 'validate_trans', 'params': {'th': th}}
+ resp, resp_json = self._write_call(payload)
+ return resp_json['result']
+
+ def get_trans_changes(self, th):
+ payload = {'method': 'get_trans_changes', 'params': {'th': th}}
+ resp, resp_json = self._write_call(payload)
+ return resp_json['result']['changes']
+
+ def validate_commit(self, th, flags=None):
+ if flags:
+ payload = {'method': 'validate_commit', 'params': {'th': th, 'flags': flags}}
+ else:
+ payload = {'method': 'validate_commit', 'params': {'th': th}}
+ resp, resp_json = self._write_call(payload)
+ return resp_json['result'].get('warnings', [])
+
+ def commit(self, th, flags=None):
+ if flags:
+ payload = {'method': 'commit', 'params': {'th': th, 'flags': flags}}
+ else:
+ payload = {'method': 'commit', 'params': {'th': th}}
+ resp, resp_json = self._write_call(payload)
+ if len(resp_json['result']) == 0:
+ self._maybe_delete_trans(th)
+ return resp_json['result']
+
+ def get_schema(self, **kwargs):
+ payload = {'method': 'get_schema', 'params': kwargs}
+ resp, resp_json = self._maybe_write_call(payload)
+ return resp_json['result']
+
+ def get_module_prefix_map(self, path=None):
+ if path is None:
+ payload = {'method': 'get_module_prefix_map', 'params': {}}
+ resp, resp_json = self._call(payload)
+ else:
+ payload = {'method': 'get_module_prefix_map', 'params': {'path': path}}
+ resp, resp_json = self._maybe_write_call(payload)
+ return resp_json['result']
+
+ def get_value(self, path):
+ payload = {
+ 'method': 'get_value',
+ 'params': {'path': path}
+ }
+ resp, resp_json = self._read_call(payload)
+ return resp_json['result']
+
+ def exists(self, path):
+ payload = {'method': 'exists', 'params': {'path': path}}
+ try:
+ resp, resp_json = self._read_call(payload)
+ return resp_json['result']['exists']
+ except NsoException as ex:
+ # calling exists on a sub-list when the parent list does
+ # not exists will cause data.not_found errors on recent
+ # NSO
+ if 'type' in ex.error and ex.error['type'] == 'data.not_found':
+ return False
+ raise
+
+ def create(self, th, path):
+ payload = {'method': 'create', 'params': {'th': th, 'path': path}}
+ self._write_call(payload)
+
+ def delete(self, th, path):
+ payload = {'method': 'delete', 'params': {'th': th, 'path': path}}
+ self._write_call(payload)
+
+ def set_value(self, th, path, value):
+ payload = {
+ 'method': 'set_value',
+ 'params': {'th': th, 'path': path, 'value': value}
+ }
+ resp, resp_json = self._write_call(payload)
+ return resp_json['result']
+
+ def show_config(self, path, operational=False):
+ payload = {
+ 'method': 'show_config',
+ 'params': {
+ 'path': path,
+ 'result_as': 'json',
+ 'with_oper': operational}
+ }
+ resp, resp_json = self._read_call(payload)
+ return resp_json['result']
+
+ def query(self, xpath, fields):
+ payload = {
+ 'method': 'query',
+ 'params': {
+ 'xpath_expr': xpath,
+ 'selection': fields
+ }
+ }
+ resp, resp_json = self._read_call(payload)
+ return resp_json['result']['results']
+
+ def run_action(self, th, path, params=None):
+ if params is None:
+ params = {}
+
+ if is_version(self, [(4, 5), (4, 4, 3)]):
+ result_format = 'json'
+ else:
+ result_format = 'normal'
+
+ payload = {
+ 'method': 'run_action',
+ 'params': {
+ 'format': result_format,
+ 'path': path,
+ 'params': params
+ }
+ }
+
+ if th is None:
+ resp, resp_json = self._read_call(payload)
+ else:
+ payload['params']['th'] = th
+ resp, resp_json = self._call(payload)
+
+ if result_format == 'normal':
+ # this only works for one-level results, list entries,
+ # containers etc will have / in their name.
+ result = {}
+ for info in resp_json['result']:
+ result[info['name']] = info['value']
+ else:
+ result = resp_json['result']
+
+ return result
+
+ def _call(self, payload):
+ self._id += 1
+ if 'id' not in payload:
+ payload['id'] = self._id
+
+ if 'jsonrpc' not in payload:
+ payload['jsonrpc'] = '2.0'
+
+ data = json.dumps(payload)
+ try:
+ resp = open_url(
+ self._url, timeout=self._timeout,
+ method='POST', data=data, headers=self._headers,
+ validate_certs=self._validate_certs)
+ if resp.code != 200:
+ raise NsoException(
+ 'NSO returned HTTP code {0}, expected 200'.format(resp.status), {})
+ except socket.timeout:
+ raise NsoException('request timed out against NSO at {0}'.format(self._url), {})
+
+ resp_body = resp.read()
+ resp_json = json.loads(resp_body)
+
+ if 'error' in resp_json:
+ self._handle_call_error(payload, resp_json)
+ return resp, resp_json
+
+ def _handle_call_error(self, payload, resp_json):
+ method = payload['method']
+
+ error = resp_json['error']
+ error_type = error['type'][len('rpc.method.'):]
+ if error_type in ('unexpected_params',
+ 'unknown_params_value',
+ 'invalid_params',
+ 'invalid_params_type',
+ 'data_not_found'):
+ key = error['data']['param']
+ error_type_s = error_type.replace('_', ' ')
+ if key == 'path':
+ msg = 'NSO {0} {1}. path = {2}'.format(
+ method, error_type_s, payload['params']['path'])
+ else:
+ path = payload['params'].get('path', 'unknown')
+ msg = 'NSO {0} {1}. path = {2}. {3} = {4}'.format(
+ method, error_type_s, path, key, payload['params'][key])
+ else:
+ msg = 'NSO {0} returned JSON-RPC error: {1}'.format(method, error)
+
+ raise NsoException(msg, error)
+
+ def _read_call(self, payload):
+ if 'th' not in payload['params']:
+ payload['params']['th'] = self.get_trans(mode='read')
+ return self._call(payload)
+
+ def _write_call(self, payload):
+ if 'th' not in payload['params']:
+ payload['params']['th'] = self.get_trans(mode='read_write')
+ return self._call(payload)
+
+ def _maybe_write_call(self, payload):
+ if 'read_write' in self._trans:
+ return self._write_call(payload)
+ else:
+ return self._read_call(payload)
+
+ def _maybe_delete_trans(self, th):
+ for mode in ('read', 'read_write'):
+ if th == self._trans.get(mode, None):
+ del self._trans[mode]
+
+
+class ValueBuilder(object):
+ PATH_RE = re.compile('{[^}]*}')
+ PATH_RE_50 = re.compile('{[^}]*}$')
+
+ class Value(object):
+ __slots__ = ['path', 'tag_path', 'state', 'value', 'deps']
+
+ def __init__(self, path, state, value, deps):
+ self.path = path
+ self.tag_path = ValueBuilder.PATH_RE.sub('', path)
+ self.state = state
+ self.value = value
+ self.deps = deps
+
+ # nodes can depend on themselves
+ if self.tag_path in self.deps:
+ self.deps.remove(self.tag_path)
+
+ def __lt__(self, rhs):
+ l_len = len(self.path.split('/'))
+ r_len = len(rhs.path.split('/'))
+ if l_len == r_len:
+ return self.path.__lt__(rhs.path)
+ return l_len < r_len
+
+ def __str__(self):
+ return 'Value<path={0}, state={1}, value={2}>'.format(
+ self.path, self.state, self.value)
+
+ class ValueIterator(object):
+ def __init__(self, client, values, delayed_values):
+ self._client = client
+ self._values = values
+ self._delayed_values = delayed_values
+ self._pos = 0
+
+ def __iter__(self):
+ return self
+
+ def __next__(self):
+ return self.next()
+
+ def next(self):
+ if self._pos >= len(self._values):
+ if len(self._delayed_values) == 0:
+ raise StopIteration()
+
+ builder = ValueBuilder(self._client, delay=False)
+ for (parent, maybe_qname, value) in self._delayed_values:
+ builder.build(parent, maybe_qname, value)
+ del self._delayed_values[:]
+ self._values.extend(builder.values)
+
+ return self.next()
+
+ value = self._values[self._pos]
+ self._pos += 1
+ return value
+
+ def __init__(self, client, mode='config', delay=None):
+ self._client = client
+ self._mode = mode
+ self._schema_cache = {}
+ self._module_prefix_map_cache = {}
+ self._values = []
+ self._values_dirty = False
+ self._delay = delay is None and mode == 'config' and is_version(self._client, [(5, 0)])
+ self._delayed_values = []
+
+ def build(self, parent, maybe_qname, value, schema=None):
+ qname, name = self.get_prefix_name(parent, maybe_qname)
+ if name is None:
+ path = parent
+ else:
+ path = '{0}/{1}'.format(parent, qname)
+
+ if schema is None:
+ schema = self._get_schema(path)
+
+ if self._delay and schema.get('is_mount_point', False):
+ # delay conversion of mounted values, required to get
+ # shema information on 5.0 and later.
+ self._delayed_values.append((parent, maybe_qname, value))
+ elif self._is_leaf_list(schema) and is_version(self._client, [(4, 5)]):
+ self._build_leaf_list(path, schema, value)
+ elif self._is_leaf(schema):
+ deps = schema.get('deps', [])
+ if self._is_empty_leaf(schema):
+ exists = self._client.exists(path)
+ if exists and value != [None]:
+ self._add_value(path, State.ABSENT, None, deps)
+ elif not exists and value == [None]:
+ self._add_value(path, State.PRESENT, None, deps)
+ else:
+ if maybe_qname is None:
+ value_type = self.get_type(path)
+ else:
+ value_type = self._get_child_type(parent, qname)
+
+ if 'identityref' in value_type:
+ if isinstance(value, list):
+ value = [ll_v for ll_v, t_ll_v
+ in [self.get_prefix_name(parent, v) for v in value]]
+ else:
+ value, t_value = self.get_prefix_name(parent, value)
+ self._add_value(path, State.SET, value, deps)
+ elif isinstance(value, dict):
+ self._build_dict(path, schema, value)
+ elif isinstance(value, list):
+ self._build_list(path, schema, value)
+ else:
+ raise ModuleFailException(
+ 'unsupported schema {0} at {1}'.format(
+ schema['kind'], path))
+
+ @property
+ def values(self):
+ if self._values_dirty:
+ self._values = ValueBuilder.sort_values(self._values)
+ self._values_dirty = False
+
+ return ValueBuilder.ValueIterator(self._client, self._values, self._delayed_values)
+
+ @staticmethod
+ def sort_values(values):
+ class N(object):
+ def __init__(self, v):
+ self.tmp_mark = False
+ self.mark = False
+ self.v = v
+
+ sorted_values = []
+ nodes = [N(v) for v in sorted(values)]
+
+ def get_node(tag_path):
+ return next((m for m in nodes
+ if m.v.tag_path == tag_path), None)
+
+ def is_cycle(n, dep, visited):
+ visited.add(n.v.tag_path)
+ if dep in visited:
+ return True
+
+ dep_n = get_node(dep)
+ if dep_n is not None:
+ for sub_dep in dep_n.v.deps:
+ if is_cycle(dep_n, sub_dep, visited):
+ return True
+
+ return False
+
+ # check for dependency cycles, remove if detected. sort will
+ # not be 100% but allows for a best-effort to work around
+ # issue in NSO.
+ for n in nodes:
+ for dep in n.v.deps:
+ if is_cycle(n, dep, set()):
+ n.v.deps.remove(dep)
+
+ def visit(n):
+ if n.tmp_mark:
+ return False
+ if not n.mark:
+ n.tmp_mark = True
+ for m in nodes:
+ if m.v.tag_path in n.v.deps:
+ if not visit(m):
+ return False
+
+ n.tmp_mark = False
+ n.mark = True
+
+ sorted_values.insert(0, n.v)
+
+ return True
+
+ n = next((n for n in nodes if not n.mark), None)
+ while n is not None:
+ visit(n)
+ n = next((n for n in nodes if not n.mark), None)
+
+ return sorted_values[::-1]
+
+ def _build_dict(self, path, schema, value):
+ keys = schema.get('key', [])
+ for dict_key, dict_value in value.items():
+ qname, name = self.get_prefix_name(path, dict_key)
+ if dict_key in ('__state', ) or name in keys:
+ continue
+
+ child_schema = self._find_child(path, schema, qname)
+ self.build(path, dict_key, dict_value, child_schema)
+
+ def _build_leaf_list(self, path, schema, value):
+ deps = schema.get('deps', [])
+ entry_type = self.get_type(path, schema)
+
+ if self._mode == 'verify':
+ for entry in value:
+ if 'identityref' in entry_type:
+ entry, t_entry = self.get_prefix_name(path, entry)
+ entry_path = '{0}{{{1}}}'.format(path, entry)
+ if not self._client.exists(entry_path):
+ self._add_value(entry_path, State.ABSENT, None, deps)
+ else:
+ # remove leaf list if treated as a list and then re-create the
+ # expected list entries.
+ self._add_value(path, State.ABSENT, None, deps)
+
+ for entry in value:
+ if 'identityref' in entry_type:
+ entry, t_entry = self.get_prefix_name(path, entry)
+ entry_path = '{0}{{{1}}}'.format(path, entry)
+ self._add_value(entry_path, State.PRESENT, None, deps)
+
+ def _build_list(self, path, schema, value):
+ deps = schema.get('deps', [])
+ for entry in value:
+ entry_key = self._build_key(path, entry, schema['key'])
+ entry_path = '{0}{{{1}}}'.format(path, entry_key)
+ entry_state = entry.get('__state', 'present')
+ entry_exists = self._client.exists(entry_path)
+
+ if entry_state == 'absent':
+ if entry_exists:
+ self._add_value(entry_path, State.ABSENT, None, deps)
+ else:
+ if not entry_exists:
+ self._add_value(entry_path, State.PRESENT, None, deps)
+ if entry_state in State.SYNC_STATES:
+ self._add_value(entry_path, entry_state, None, deps)
+
+ self.build(entry_path, None, entry)
+
+ def _build_key(self, path, entry, schema_keys):
+ key_parts = []
+ for key in schema_keys:
+ value = entry.get(key, None)
+ if value is None:
+ raise ModuleFailException(
+ 'required leaf {0} in {1} not set in data'.format(
+ key, path))
+
+ value_type = self._get_child_type(path, key)
+ if 'identityref' in value_type:
+ value, t_value = self.get_prefix_name(path, value)
+ key_parts.append(self._quote_key(value))
+ return ' '.join(key_parts)
+
+ def _quote_key(self, key):
+ if isinstance(key, bool):
+ return key and 'true' or 'false'
+
+ q_key = []
+ for c in str(key):
+ if c in ('{', '}', "'", '\\'):
+ q_key.append('\\')
+ q_key.append(c)
+ q_key = ''.join(q_key)
+ if ' ' in q_key:
+ return '"{0}"'.format(q_key)
+ return q_key
+
+ def _find_child(self, path, schema, qname):
+ if 'children' not in schema:
+ schema = self._get_schema(path)
+
+ # look for the qualified name if : is in the name
+ child_schema = self._get_child(schema, qname)
+ if child_schema is not None:
+ return child_schema
+
+ # no child was found, look for a choice with a child matching
+ for child_schema in schema['children']:
+ if child_schema['kind'] != 'choice':
+ continue
+ choice_child_schema = self._get_choice_child(child_schema, qname)
+ if choice_child_schema is not None:
+ return choice_child_schema
+
+ raise ModuleFailException(
+ 'no child in {0} with name {1}. children {2}'.format(
+ path, qname, ','.join((c.get('qname', c.get('name', None)) for c in schema['children']))))
+
+ def _add_value(self, path, state, value, deps):
+ self._values.append(ValueBuilder.Value(path, state, value, deps))
+ self._values_dirty = True
+
+ def get_prefix_name(self, path, qname):
+ if not isinstance(qname, (str, unicode)):
+ return qname, None
+ if ':' not in qname:
+ return qname, qname
+
+ module_prefix_map = self._get_module_prefix_map(path)
+ module, name = qname.split(':', 1)
+ if module not in module_prefix_map:
+ raise ModuleFailException(
+ 'no module mapping for module {0}. loaded modules {1}'.format(
+ module, ','.join(sorted(module_prefix_map.keys()))))
+
+ return '{0}:{1}'.format(module_prefix_map[module], name), name
+
+ def _get_schema(self, path):
+ return self._ensure_schema_cached(path)['data']
+
+ def _get_child_type(self, parent_path, key):
+ all_schema = self._ensure_schema_cached(parent_path)
+ parent_schema = all_schema['data']
+ meta = all_schema['meta']
+ schema = self._find_child(parent_path, parent_schema, key)
+ return self.get_type(parent_path, schema, meta)
+
+ def get_type(self, path, schema=None, meta=None):
+ if schema is None or meta is None:
+ all_schema = self._ensure_schema_cached(path)
+ schema = all_schema['data']
+ meta = all_schema['meta']
+
+ if self._is_leaf(schema):
+ def get_type(meta, curr_type):
+ if curr_type.get('primitive', False):
+ return [curr_type['name']]
+ if 'namespace' in curr_type:
+ curr_type_key = '{0}:{1}'.format(
+ curr_type['namespace'], curr_type['name'])
+ type_info = meta['types'][curr_type_key][-1]
+ return get_type(meta, type_info)
+ if 'leaf_type' in curr_type:
+ return get_type(meta, curr_type['leaf_type'][-1])
+ if 'union' in curr_type:
+ union_types = []
+ for union_type in curr_type['union']:
+ union_types.extend(get_type(meta, union_type[-1]))
+ return union_types
+ return [curr_type.get('name', 'unknown')]
+
+ return get_type(meta, schema['type'])
+ return None
+
+ def _ensure_schema_cached(self, path):
+ if not self._delay and is_version(self._client, [(5, 0)]):
+ # newer versions of NSO support multiple different schemas
+ # for different devices, thus the device is required to
+ # look up the schema. Remove the key entry to get schema
+ # logic working ok.
+ path = ValueBuilder.PATH_RE_50.sub('', path)
+ else:
+ path = ValueBuilder.PATH_RE.sub('', path)
+
+ if path not in self._schema_cache:
+ schema = self._client.get_schema(path=path, levels=1)
+ self._schema_cache[path] = schema
+ return self._schema_cache[path]
+
+ def _get_module_prefix_map(self, path):
+ # newer versions of NSO support multiple mappings from module
+ # to prefix depending on which device is used.
+ if path != '' and is_version(self._client, [(5, 0)]):
+ if path not in self._module_prefix_map_cache:
+ self._module_prefix_map_cache[path] = self._client.get_module_prefix_map(path)
+ return self._module_prefix_map_cache[path]
+
+ if '' not in self._module_prefix_map_cache:
+ self._module_prefix_map_cache[''] = self._client.get_module_prefix_map()
+ return self._module_prefix_map_cache['']
+
+ def _get_child(self, schema, qname):
+ # no child specified, return parent
+ if qname is None:
+ return schema
+
+ name_key = ':' in qname and 'qname' or 'name'
+ return next((c for c in schema['children']
+ if c.get(name_key, None) == qname), None)
+
+ def _get_choice_child(self, schema, qname):
+ name_key = ':' in qname and 'qname' or 'name'
+ for child_case in schema['cases']:
+ # look for direct child
+ choice_child_schema = next(
+ (c for c in child_case['children']
+ if c.get(name_key, None) == qname), None)
+ if choice_child_schema is not None:
+ return choice_child_schema
+
+ # look for nested choice
+ for child_schema in child_case['children']:
+ if child_schema['kind'] != 'choice':
+ continue
+ choice_child_schema = self._get_choice_child(child_schema, qname)
+ if choice_child_schema is not None:
+ return choice_child_schema
+ return None
+
+ def _is_leaf_list(self, schema):
+ return schema.get('kind', None) == 'leaf-list'
+
+ def _is_leaf(self, schema):
+ # still checking for leaf-list here to be compatible with pre
+ # 4.5 versions of NSO.
+ return schema.get('kind', None) in ('key', 'leaf', 'leaf-list')
+
+ def _is_empty_leaf(self, schema):
+ return (schema.get('kind', None) == 'leaf' and
+ schema['type'].get('primitive', False) and
+ schema['type'].get('name', '') == 'empty')
+
+
+def connect(params):
+ client = JsonRpc(params['url'],
+ params['timeout'],
+ params['validate_certs'])
+ client.login(params['username'], params['password'])
+ return client
+
+
+def verify_version(client, required_versions):
+ version_str = client.get_system_setting('version')
+ client._version = version_str
+ if not verify_version_str(version_str, required_versions):
+ supported_versions = ', '.join(
+ ['.'.join([str(p) for p in required_version])
+ for required_version in required_versions])
+ raise ModuleFailException(
+ 'unsupported NSO version {0}. {1} or later supported'.format(
+ version_str, supported_versions))
+
+
+def is_version(client, required_versions):
+ version_str = client.get_system_setting('version')
+ return verify_version_str(version_str, required_versions)
+
+
+def verify_version_str(version_str, required_versions):
+ version_str = re.sub('_.*', '', version_str)
+
+ version = [int(p) for p in version_str.split('.')]
+ if len(version) < 2:
+ raise ModuleFailException(
+ 'unsupported NSO version format {0}'.format(version_str))
+
+ def check_version(required_version, version):
+ for pos in range(len(required_version)):
+ if pos >= len(version):
+ return False
+ if version[pos] > required_version[pos]:
+ return True
+ if version[pos] < required_version[pos]:
+ return False
+ return True
+
+ for required_version in required_versions:
+ if check_version(required_version, version):
+ return True
+ return False
+
+
+def normalize_value(expected_value, value, key):
+ if value is None:
+ return None
+ if (isinstance(expected_value, bool) and
+ isinstance(value, (str, unicode))):
+ return value == 'true'
+ if isinstance(expected_value, int):
+ try:
+ return int(value)
+ except TypeError:
+ raise ModuleFailException(
+ 'returned value {0} for {1} is not a valid integer'.format(
+ key, value))
+ if isinstance(expected_value, float):
+ try:
+ return float(value)
+ except TypeError:
+ raise ModuleFailException(
+ 'returned value {0} for {1} is not a valid float'.format(
+ key, value))
+ if isinstance(expected_value, (list, tuple)):
+ if not isinstance(value, (list, tuple)):
+ raise ModuleFailException(
+ 'returned value {0} for {1} is not a list'.format(value, key))
+ if len(expected_value) != len(value):
+ raise ModuleFailException(
+ 'list length mismatch for {0}'.format(key))
+
+ normalized_value = []
+ for i in range(len(expected_value)):
+ normalized_value.append(
+ normalize_value(expected_value[i], value[i], '{0}[{1}]'.format(key, i)))
+ return normalized_value
+
+ if isinstance(expected_value, dict):
+ if not isinstance(value, dict):
+ raise ModuleFailException(
+ 'returned value {0} for {1} is not a dict'.format(value, key))
+ if len(expected_value) != len(value):
+ raise ModuleFailException(
+ 'dict length mismatch for {0}'.format(key))
+
+ normalized_value = {}
+ for k in expected_value.keys():
+ n_k = normalize_value(k, k, '{0}[{1}]'.format(key, k))
+ if n_k not in value:
+ raise ModuleFailException('missing {0} in value'.format(n_k))
+ normalized_value[n_k] = normalize_value(expected_value[k], value[k], '{0}[{1}]'.format(key, k))
+ return normalized_value
+
+ if HAVE_UNICODE:
+ if isinstance(expected_value, unicode) and isinstance(value, str):
+ return value.decode('utf-8')
+ if isinstance(expected_value, str) and isinstance(value, unicode):
+ return value.encode('utf-8')
+ else:
+ if hasattr(expected_value, 'encode') and hasattr(value, 'decode'):
+ return value.decode('utf-8')
+ if hasattr(expected_value, 'decode') and hasattr(value, 'encode'):
+ return value.encode('utf-8')
+
+ return value
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_action.py b/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_action.py
new file mode 100644
index 00000000..b5db2084
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_action.py
@@ -0,0 +1,211 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+DOCUMENTATION = '''
+---
+module: nso_action
+extends_documentation_fragment:
+- cisco.nso.nso
+
+short_description: Executes Cisco NSO actions and verifies output.
+description:
+ - This module provides support for executing Cisco NSO actions and then
+ verifying that the output is as expected.
+requirements:
+ - Cisco NSO version 3.4 or higher.
+author: "Claes Nästén (@cnasten)"
+options:
+ path:
+ description: Path to NSO action.
+ required: true
+ type: str
+ input:
+ description: >
+ NSO action parameters.
+ type: dict
+ output_required:
+ description: >
+ Required output parameters.
+ type: dict
+ output_invalid:
+ description: >
+ List of result parameter names that will cause the task to fail if they
+ are present.
+ type: dict
+ validate_strict:
+ description: >
+ If set to true, the task will fail if any output parameters not in
+ output_required is present in the output.
+ type: bool
+ default: False
+'''
+
+EXAMPLES = '''
+- name: Sync NSO device
+ cisco.nso.nso_action:
+ url: https://10.10.20.49/jsonrpc
+ username: developer
+ password: C1sco12345
+ path: /ncs:devices/device{dist-rtr01}/sync-from
+ input: {}
+
+- name: Check device sync
+ cisco.nso.nso_action:
+ url: https://10.10.20.49/jsonrpc
+ username: developer
+ password: C1sco12345
+ path: /ncs:devices/check-sync
+ input: {}
+
+- name: Load Native Config
+ cisco.nso.nso_action:
+ url: "https://10.10.20.49/jsonrpc"
+ username: developer
+ password: C1sco12345
+ path: /ncs:devices/ncs:device{dist-rtr01}/load-native-config
+ input: { file: "/home/developer/test.cfg" , verbose: true, mode: "merge"}
+ register: result
+'''
+
+RETURN = '''
+output:
+ description: Action output
+ returned: success
+ type: dict
+ sample:
+ result: true
+'''
+
+from ansible_collections.cisco.nso.plugins.module_utils.nso import connect, verify_version, nso_argument_spec
+from ansible_collections.cisco.nso.plugins.module_utils.nso import normalize_value
+from ansible_collections.cisco.nso.plugins.module_utils.nso import ModuleFailException, NsoException
+from ansible.module_utils.basic import AnsibleModule
+
+
+class NsoAction(object):
+
+ REQUIRED_VERSIONS = [
+ (3, 4)
+ ]
+
+ def __init__(self, check_mode, client,
+ path, input,
+ output_required, output_invalid, validate_strict):
+ self._check_mode = check_mode
+ self._client = client
+ self._path = path
+ self._input = input
+ self._output_required = output_required
+ self._output_invalid = output_invalid
+ self._validate_strict = validate_strict
+
+ def main(self):
+ schema = self._client.get_schema(path=self._path)
+ if schema['data']['kind'] != 'action':
+ raise ModuleFailException('{0} is not an action'.format(self._path))
+ input_schema = []
+ for c in schema['data']['children']:
+ if c.get('is_action_input', False):
+ if c['kind'] == 'choice':
+ for case in c['cases']:
+ input_schema.append(case)
+ else:
+ input_schema.append(c)
+
+ for key, value in self._input.items():
+ child = next((c for c in input_schema if c['name'] == key), None)
+ if child is None:
+ raise ModuleFailException("unsupported input parameter '{0}'".format(key))
+
+ # implement type validation in the future
+
+ if self._check_mode:
+ return {}
+ else:
+ return self._run_and_verify()
+
+ def _run_and_verify(self):
+ output = self._client.run_action(None, self._path, self._input)
+ for key, value in self._output_required.items():
+ if key not in output:
+ raise ModuleFailException('{0} not in result'.format(key))
+
+ n_value = normalize_value(value, output[key], key)
+ if value != n_value:
+ msg = '{0} value mismatch. expected {1} got {2}'.format(
+ key, value, n_value)
+ raise ModuleFailException(msg)
+
+ for key in self._output_invalid.keys():
+ if key in output:
+ raise ModuleFailException('{0} not allowed in result'.format(key))
+
+ if self._validate_strict:
+ for name in output.keys():
+ if name not in self._output_required:
+ raise ModuleFailException('{0} not allowed in result'.format(name))
+
+ return output
+
+
+def main():
+ argument_spec = dict(
+ path=dict(required=True),
+ input=dict(required=False, type='dict', default={}),
+ output_required=dict(required=False, type='dict', default={}),
+ output_invalid=dict(required=False, type='dict', default={}),
+ validate_strict=dict(required=False, type='bool', default=False)
+ )
+ argument_spec.update(nso_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True
+ )
+ p = module.params
+
+ client = connect(p)
+ nso_action = NsoAction(
+ module.check_mode, client,
+ p['path'],
+ p['input'],
+ p['output_required'],
+ p['output_invalid'],
+ p['validate_strict'])
+ try:
+ verify_version(client, NsoAction.REQUIRED_VERSIONS)
+
+ output = nso_action.main()
+ client.logout()
+ module.exit_json(changed=True, output=output)
+ except NsoException as ex:
+ client.logout()
+ module.fail_json(msg=ex.message)
+ except ModuleFailException as ex:
+ client.logout()
+ module.fail_json(msg=ex.message)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_config.py b/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_config.py
new file mode 100644
index 00000000..01ee40ec
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_config.py
@@ -0,0 +1,338 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+DOCUMENTATION = '''
+---
+module: nso_config
+extends_documentation_fragment:
+- cisco.nso.nso
+
+short_description: Manage Cisco NSO configuration and service synchronization.
+description:
+ - This module provides support for managing configuration in Cisco NSO and
+ can also ensure services are in sync.
+requirements:
+ - Cisco NSO version 3.4.12 or higher, 4.2.7 or higher,
+ 4.3.8 or higher, 4.4.3 or higher, 4.5 or higher.
+author: "Claes Nästén (@cnasten)"
+options:
+ data:
+ description: >
+ NSO data in format as | display json converted to YAML. List entries can
+ be annotated with a __state entry. Set to in-sync/deep-in-sync for
+ services to verify service is in sync with the network. Set to absent in
+ list entries to ensure they are deleted if they exist in NSO.
+ required: true
+ type: dict
+ commit_flags:
+ description: >
+ A list containing commit flags. See the API documentation for
+ supported commit flags.
+ https://developer.cisco.com/docs/nso/guides/#!life-cycle-operations-how-to-manipulate-existing-services-and-devices/commit-flags-and-device-service-actions
+ type: list
+ elements: str
+'''
+
+EXAMPLES = '''
+- name: CREATE DEVICE IN NSO
+ cisco.nso.nso_config:
+ url: https://10.10.20.49/jsonrpc
+ username: developer
+ password: C1sco12345
+ data:
+ tailf-ncs:devices:
+ device:
+ - address: 10.10.20.175
+ description: CONFIGURED BY ANSIBLE!
+ name: dist-rtr01
+ authgroup: "labadmin"
+ device-type:
+ cli:
+ ned-id: "cisco-ios-cli-6.44"
+ port: "22"
+ state:
+ admin-state: "unlocked"
+
+- name: ADD NEW LOOPBACK
+ cisco.nso.nso_config:
+ url: https://10.10.20.49/jsonrpc
+ username: developer
+ password: C1sco12345
+ data:
+ tailf-ncs:devices:
+ device:
+ - name: dist-rtr01
+ config:
+ tailf-ned-cisco-ios:interface:
+ Loopback:
+ - name: "1"
+ description: Created by Ansible!
+
+- name: CONFIGURE IP ADDRESS ON LOOPBACK
+ cisco.nso.nso_config:
+ url: https://10.10.20.49/jsonrpc
+ username: developer
+ password: C1sco12345
+ data:
+ tailf-ncs:devices:
+ device:
+ - name: dist-rtr01
+ config:
+ tailf-ned-cisco-ios:interface:
+ Loopback:
+ - name: "1"
+ description: Created by Ansible!
+ ip:
+ address:
+ primary:
+ address: 10.10.10.10
+ mask: 255.255.255.255
+
+- name: CONFIGURE NTP SERVER ON DEVICE
+ cisco.nso.nso_config:
+ url: https://10.10.20.49/jsonrpc
+ username: developer
+ password: C1sco12345
+ data:
+ tailf-ncs:devices:
+ device:
+ - name: dist-rtr01
+ config:
+ tailf-ned-cisco-ios:ntp:
+ server:
+ peer-list:
+ - name: 2.2.2.2
+'''
+
+RETURN = '''
+changes:
+ description: List of changes
+ returned: always
+ type: complex
+ sample:
+ - path: "/ncs:devices/device{dist-rtr01}/config/ios:interface/Loopback{1}/ip/address/primary/address"
+ from: null
+ to: "10.10.10.10"
+ type: set
+ contains:
+ path:
+ description: Path to value changed
+ returned: always
+ type: str
+ from:
+ description: Previous value if any, else null
+ returned: When previous value is present on value change
+ type: str
+diffs:
+ description: List of sync changes
+ returned: always
+ type: complex
+ contains:
+ path:
+ description: keypath to service changed
+ returned: always
+ type: str
+ diff:
+ description: configuration difference triggered the re-deploy
+ returned: always
+ type: str
+commit_result:
+ description: Return values from commit operation
+ returned: always
+ type: complex
+ contains:
+ commit_queue:
+ description: Commit queue ID and status, if any
+ returned: When commit-queue is set in commit_flags
+ type: dict
+ sample:
+ - {
+ "commit_queue": {
+ "id": 1611776004976,
+ "status": "async"
+ }
+ }
+
+'''
+
+from ansible_collections.cisco.nso.plugins.module_utils.nso import connect, verify_version, nso_argument_spec
+from ansible_collections.cisco.nso.plugins.module_utils.nso import State, ValueBuilder
+from ansible_collections.cisco.nso.plugins.module_utils.nso import ModuleFailException, NsoException
+from ansible.module_utils.basic import AnsibleModule
+
+
+class NsoConfig(object):
+ REQUIRED_VERSIONS = [
+ (4, 5),
+ (4, 4, 3),
+ (4, 3, 8),
+ (4, 2, 7),
+ (3, 4, 12)
+ ]
+
+ def __init__(self, check_mode, client, data, commit_flags):
+ self._check_mode = check_mode
+ self._client = client
+ self._data = data
+ self._commit_flags = commit_flags
+
+ self._changes = []
+ self._diffs = []
+ self._commit_result = []
+
+ def main(self):
+ # build list of values from configured data
+ value_builder = ValueBuilder(self._client)
+ for key, value in self._data.items():
+ value_builder.build('', key, value)
+
+ self._data_write(value_builder.values)
+
+ # check sync AFTER configuration is written
+ sync_values = self._sync_check(value_builder.values)
+ self._sync_ensure(sync_values)
+
+ return self._changes, self._diffs, self._commit_result
+
+ def _data_write(self, values):
+ th = self._client.get_trans(mode='read_write')
+
+ for value in values:
+ if value.state == State.SET:
+ self._client.set_value(th, value.path, value.value)
+ elif value.state == State.PRESENT:
+ self._client.create(th, value.path)
+ elif value.state == State.ABSENT:
+ self._client.delete(th, value.path)
+
+ changes = self._client.get_trans_changes(th)
+ for change in changes:
+ if change['op'] == 'value_set':
+ self._changes.append({
+ 'path': change['path'],
+ 'from': change['old'] or None,
+ 'to': change['value'],
+ 'type': 'set'
+ })
+ elif change['op'] in ('created', 'deleted'):
+ self._changes.append({
+ 'path': change['path'],
+ 'type': change['op'][:-1]
+ })
+
+ if len(changes) > 0:
+ # Fix for validate_commit method not working with commit flags prior to 5.4.
+ # If version < 5.4 then don't send the flags to validate_commit
+ version = float(self._client._version[0:self._client._version.find('.') + 2:])
+ if version >= 5.4:
+ warnings = self._client.validate_commit(th, self._commit_flags)
+ else:
+ warnings = self._client.validate_commit(th)
+ if len(warnings) > 0:
+ raise NsoException(
+ 'failed to validate transaction with warnings: {0}'.format(
+ ', '.join((str(warning) for warning in warnings))), {})
+ if self._check_mode or len(changes) == 0:
+ self._client.delete_trans(th)
+ else:
+ if self._commit_flags:
+ result = self._client.commit(th, self._commit_flags)
+ self._commit_result.append(result)
+ else:
+ result = self._client.commit(th)
+ self._commit_result.append(result)
+
+ def _sync_check(self, values):
+ sync_values = []
+
+ for value in values:
+ if value.state in (State.CHECK_SYNC, State.IN_SYNC):
+ action = 'check-sync'
+ elif value.state in (State.DEEP_CHECK_SYNC, State.DEEP_IN_SYNC):
+ action = 'deep-check-sync'
+ else:
+ action = None
+
+ if action is not None:
+ action_path = '{0}/{1}'.format(value.path, action)
+ action_params = {'outformat': 'cli'}
+ resp = self._client.run_action(None, action_path, action_params)
+ if len(resp) > 0:
+ sync_values.append(
+ ValueBuilder.Value(value.path, value.state, resp[0]['value']))
+
+ return sync_values
+
+ def _sync_ensure(self, sync_values):
+ for value in sync_values:
+ if value.state in (State.CHECK_SYNC, State.DEEP_CHECK_SYNC):
+ raise NsoException(
+ '{0} out of sync, diff {1}'.format(value.path, value.value), {})
+
+ action_path = '{0}/{1}'.format(value.path, 're-deploy')
+ if not self._check_mode:
+ result = self._client.run_action(None, action_path)
+ if not result:
+ raise NsoException(
+ 'failed to re-deploy {0}'.format(value.path), {})
+
+ self._changes.append({'path': value.path, 'type': 're-deploy'})
+ self._diffs.append({'path': value.path, 'diff': value.value})
+
+
+def main():
+ argument_spec = dict(
+ data=dict(required=True, type='dict'),
+ commit_flags=dict(required=False, type='list', elements='str')
+ )
+
+ argument_spec.update(nso_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True
+ )
+ p = module.params
+ client = connect(p)
+ nso_config = NsoConfig(module.check_mode, client, p['data'], p['commit_flags'])
+ try:
+ verify_version(client, NsoConfig.REQUIRED_VERSIONS)
+
+ changes, diffs, commit_result = nso_config.main()
+ client.logout()
+
+ changed = len(changes) > 0
+ module.exit_json(
+ changed=changed, changes=changes, diffs=diffs, commit_result=commit_result)
+
+ except NsoException as ex:
+ client.logout()
+ module.fail_json(msg=ex.message)
+ except ModuleFailException as ex:
+ client.logout()
+ module.fail_json(msg=ex.message)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_query.py b/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_query.py
new file mode 100644
index 00000000..5f2d26f5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_query.py
@@ -0,0 +1,129 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+DOCUMENTATION = '''
+---
+module: nso_query
+extends_documentation_fragment:
+- cisco.nso.nso
+
+short_description: Query data from Cisco NSO.
+description:
+ - This module provides support for querying data from Cisco NSO using XPath.
+requirements:
+ - Cisco NSO version 3.4 or higher.
+author: "Claes Nästén (@cnasten)"
+options:
+ xpath:
+ description: XPath selection relative to the root.
+ required: true
+ type: str
+ fields:
+ description: >
+ List of fields to select from matching nodes.
+ required: true
+ type: list
+ elements: str
+'''
+
+EXAMPLES = '''
+- name: QUERY DEVICES DISPLAYING NAME AND DESCRIPTION
+ cisco.nso.nso_query:
+ url: https://10.10.20.49/jsonrpc
+ username: developer
+ password: C1sco12345
+ xpath: /ncs:devices/device
+ fields:
+ - name
+ - description
+ register: nso_query_result
+
+- name: DISPLAY NSO_QUERY RESULT
+ debug:
+ var: nso_query_result
+'''
+
+RETURN = '''
+output:
+ description: Value of matching nodes
+ returned: success
+ type: list
+'''
+
+from ansible_collections.cisco.nso.plugins.module_utils.nso import connect, verify_version, nso_argument_spec
+from ansible_collections.cisco.nso.plugins.module_utils.nso import ModuleFailException, NsoException
+from ansible.module_utils.basic import AnsibleModule
+
+
+class NsoQuery(object):
+ REQUIRED_VERSIONS = [
+ (3, 4)
+ ]
+
+ def __init__(self, check_mode, client, xpath, fields):
+ self._check_mode = check_mode
+ self._client = client
+ self._xpath = xpath
+ self._fields = fields
+
+ def main(self):
+ if self._check_mode:
+ return []
+ else:
+ return self._client.query(self._xpath, self._fields)
+
+
+def main():
+ argument_spec = dict(
+ xpath=dict(required=True, type='str'),
+ fields=dict(required=True, type='list', elements='str')
+ )
+ argument_spec.update(nso_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True
+ )
+ p = module.params
+
+ client = connect(p)
+ nso_query = NsoQuery(
+ module.check_mode, client,
+ p['xpath'], p['fields'])
+ try:
+ verify_version(client, NsoQuery.REQUIRED_VERSIONS)
+
+ output = nso_query.main()
+ client.logout()
+ module.exit_json(changed=False, output=output)
+ except NsoException as ex:
+ client.logout()
+ module.fail_json(msg=ex.message)
+ except ModuleFailException as ex:
+ client.logout()
+ module.fail_json(msg=ex.message)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_show.py b/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_show.py
new file mode 100644
index 00000000..e9d8963d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_show.py
@@ -0,0 +1,145 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+DOCUMENTATION = '''
+---
+module: nso_show
+extends_documentation_fragment:
+- cisco.nso.nso
+
+short_description: Displays data from Cisco NSO.
+description:
+ - This module provides support for displaying data from Cisco NSO.
+requirements:
+ - Cisco NSO version 3.4.12 or higher, 4.1.9 or higher, 4.2.6 or higher,
+ 4.3.7 or higher, 4.4.5 or higher, 4.5 or higher.
+author: "Claes Nästén (@cnasten)"
+options:
+ path:
+ description: Path to NSO data.
+ required: true
+ type: str
+ operational:
+ description: >
+ Controls whether or not operational data is included in the result.
+ type: bool
+ default: false
+'''
+
+EXAMPLES = '''
+- name: DISPLAY DEVICE INCLUDING OPERATIONAL DATA
+ cisco.nso.nso_show:
+ url: https://10.10.20.49/jsonrpc
+ username: developer
+ password: C1sco12345
+ path: /ncs:devices/device{dist-rtr01}
+ operational: true
+ register: result
+
+- name: Display the result
+ debug:
+ var: result
+
+- name: DISPLAY INTERFACES
+ cisco.nso.nso_show:
+ url: "https://10.10.20.49/jsonrpc"
+ username: developer
+ password: C1sco12345
+ path: /ncs:devices/device{dist-rtr01}/config/interface
+ operational: true
+ register: result
+
+- name: Display the result
+ debug:
+ var: result
+'''
+
+RETURN = '''
+output:
+ description: Configuration
+ returned: success
+ type: dict
+'''
+
+from ansible_collections.cisco.nso.plugins.module_utils.nso import connect, verify_version, nso_argument_spec
+from ansible_collections.cisco.nso.plugins.module_utils.nso import ModuleFailException, NsoException
+from ansible.module_utils.basic import AnsibleModule
+
+
+class NsoShow(object):
+ REQUIRED_VERSIONS = [
+ (4, 5),
+ (4, 4, 5),
+ (4, 3, 7),
+ (4, 2, 6),
+ (4, 1, 9),
+ (3, 4, 12)
+ ]
+
+ def __init__(self, check_mode, client, path, operational):
+ self._check_mode = check_mode
+ self._client = client
+ self._path = path
+ self._operational = operational
+
+ def main(self):
+ if self._check_mode:
+ return {}
+ else:
+ return self._client.show_config(self._path, self._operational)
+
+
+def main():
+ argument_spec = dict(
+ path=dict(required=True, type='str'),
+ operational=dict(required=False, type='bool', default=False)
+ )
+ argument_spec.update(nso_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True
+ )
+ p = module.params
+
+ client = connect(p)
+ nso_show = NsoShow(
+ module.check_mode, client,
+ p['path'], p['operational'])
+ try:
+ verify_version(client, NsoShow.REQUIRED_VERSIONS)
+
+ output = nso_show.main()
+ client.logout()
+ module.exit_json(changed=False, output=output)
+ except NsoException as ex:
+ client.logout()
+ module.fail_json(msg=ex.message)
+ except ModuleFailException as ex:
+ client.logout()
+ module.fail_json(msg=ex.message)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_verify.py b/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_verify.py
new file mode 100644
index 00000000..03759706
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/plugins/modules/nso_verify.py
@@ -0,0 +1,201 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+DOCUMENTATION = '''
+---
+module: nso_verify
+extends_documentation_fragment:
+- cisco.nso.nso
+
+short_description: Verifies Cisco NSO configuration.
+description:
+ - This module provides support for verifying Cisco NSO configuration is in
+ compliance with specified values.
+requirements:
+ - Cisco NSO version 3.4.12 or higher, 4.2.7 or higher,
+ 4.3.8 or higher, 4.4.3 or higher, 4.5 or higher.
+author: "Claes Nästén (@cnasten)"
+options:
+ data:
+ description: >
+ NSO data in format as C(| display json) converted to YAML. List entries can
+ be annotated with a C(__state) entry. Set to in-sync/deep-in-sync for
+ services to verify service is in sync with the network. Set to absent in
+ list entries to ensure they are deleted if they exist in NSO.
+ required: true
+ type: dict
+'''
+
+EXAMPLES = '''
+- name: VERIFY INTERFACE IS ADMINISTRATIVELY UP
+ cisco.nso.nso_verify:
+ url: http://localhost:8080/jsonrpc
+ username: username
+ password: password
+ data:
+ tailf-ncs:devices:
+ device:
+ - name: dist-sw01
+ config:
+ interface:
+ Ethernet:
+ - name: "1/1"
+ shutdown: false
+'''
+
+RETURN = '''
+violations:
+ description: List of value violations
+ returned: failed
+ type: complex
+ sample:
+ - path: /ncs:devices/device{dist-sw01}/config/interface/Ethernet{1/1}/shutdown
+ expected-value: false
+ value: true
+ contains:
+ path:
+ description: Path to the value in violation
+ returned: always
+ type: str
+ expected-value:
+ description: Expected value of path
+ returned: always
+ type: str
+ value:
+ description: Current value of path
+ returned: always
+ type: str
+'''
+
+from ansible_collections.cisco.nso.plugins.module_utils.nso import connect, verify_version, nso_argument_spec
+from ansible_collections.cisco.nso.plugins.module_utils.nso import normalize_value
+from ansible_collections.cisco.nso.plugins.module_utils.nso import State, ValueBuilder
+from ansible_collections.cisco.nso.plugins.module_utils.nso import ModuleFailException, NsoException
+from ansible.module_utils.basic import AnsibleModule
+
+
+class NsoVerify(object):
+ REQUIRED_VERSIONS = [
+ (4, 5),
+ (4, 4, 3),
+ (4, 3, 8),
+ (4, 2, 7),
+ (3, 4, 12)
+ ]
+
+ def __init__(self, client, data):
+ self._client = client
+ self._data = data
+
+ def main(self):
+ violations = []
+
+ # build list of values from configured data
+ value_builder = ValueBuilder(self._client, 'verify')
+ for key, value in self._data.items():
+ value_builder.build('', key, value)
+
+ for expected_value in value_builder.values:
+ if expected_value.state == State.PRESENT:
+ violations.append({
+ 'path': expected_value.path,
+ 'expected-value': 'present',
+ 'value': 'absent'
+ })
+ elif expected_value.state == State.ABSENT:
+ violations.append({
+ 'path': expected_value.path,
+ 'expected-value': 'absent',
+ 'value': 'present'
+ })
+ elif expected_value.state == State.SET:
+ try:
+ value = self._client.get_value(expected_value.path)['value']
+ except NsoException as ex:
+ if ex.error.get('type', '') == 'data.not_found':
+ value = None
+ else:
+ raise
+
+ # handle different types properly
+ n_value = normalize_value(
+ expected_value.value, value, expected_value.path)
+ if n_value != expected_value.value:
+ # if the value comparison fails, try mapping identityref
+ value_type = value_builder.get_type(expected_value.path)
+ if value_type is not None and 'identityref' in value_type:
+ n_value, t_value = self.get_prefix_name(value)
+
+ if expected_value.value != n_value:
+ violations.append({
+ 'path': expected_value.path,
+ 'expected-value': expected_value.value,
+ 'value': n_value
+ })
+ else:
+ raise ModuleFailException(
+ 'value state {0} not supported at {1}'.format(
+ expected_value.state, expected_value.path))
+
+ return violations
+
+
+def main():
+ argument_spec = dict(
+ data=dict(required=True, type='dict')
+ )
+ argument_spec.update(nso_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True
+ )
+ p = module.params
+
+ client = connect(p)
+ nso_verify = NsoVerify(client, p['data'])
+ try:
+ verify_version(client, NsoVerify.REQUIRED_VERSIONS)
+
+ violations = nso_verify.main()
+ client.logout()
+
+ num_violations = len(violations)
+ if num_violations > 0:
+ msg = '{0} value{1} differ'.format(
+ num_violations, num_violations > 1 and 's' or '')
+ module.fail_json(msg=msg, violations=violations)
+ else:
+ module.exit_json(changed=False)
+
+ except NsoException as ex:
+ client.logout()
+ module.fail_json(msg=ex.message)
+ except ModuleFailException as ex:
+ client.logout()
+ module.fail_json(msg=ex.message)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/__init__.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/__init__.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/builtins.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/builtins.py
new file mode 100644
index 00000000..f60ee678
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/builtins.py
@@ -0,0 +1,33 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+#
+# Compat for python2.7
+#
+
+# One unittest needs to import builtins via __import__() so we need to have
+# the string that represents it
+try:
+ import __builtin__
+except ImportError:
+ BUILTINS = 'builtins'
+else:
+ BUILTINS = '__builtin__'
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/mock.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/mock.py
new file mode 100644
index 00000000..0972cd2e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/mock.py
@@ -0,0 +1,122 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+'''
+Compat module for Python3.x's unittest.mock module
+'''
+import sys
+
+# Python 2.7
+
+# Note: Could use the pypi mock library on python3.x as well as python2.x. It
+# is the same as the python3 stdlib mock library
+
+try:
+ # Allow wildcard import because we really do want to import all of mock's
+ # symbols into this compat shim
+ # pylint: disable=wildcard-import,unused-wildcard-import
+ from unittest.mock import *
+except ImportError:
+ # Python 2
+ # pylint: disable=wildcard-import,unused-wildcard-import
+ try:
+ from mock import *
+ except ImportError:
+ print('You need the mock library installed on python2.x to run tests')
+
+
+# Prior to 3.4.4, mock_open cannot handle binary read_data
+if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
+ file_spec = None
+
+ def _iterate_read_data(read_data):
+ # Helper for mock_open:
+ # Retrieve lines from read_data via a generator so that separate calls to
+ # readline, read, and readlines are properly interleaved
+ sep = b'\n' if isinstance(read_data, bytes) else '\n'
+ data_as_list = [l + sep for l in read_data.split(sep)]
+
+ if data_as_list[-1] == sep:
+ # If the last line ended in a newline, the list comprehension will have an
+ # extra entry that's just a newline. Remove this.
+ data_as_list = data_as_list[:-1]
+ else:
+ # If there wasn't an extra newline by itself, then the file being
+ # emulated doesn't have a newline to end the last line remove the
+ # newline that our naive format() added
+ data_as_list[-1] = data_as_list[-1][:-1]
+
+ for line in data_as_list:
+ yield line
+
+ def mock_open(mock=None, read_data=''):
+ """
+ A helper function to create a mock to replace the use of `open`. It works
+ for `open` called directly or used as a context manager.
+
+ The `mock` argument is the mock object to configure. If `None` (the
+ default) then a `MagicMock` will be created for you, with the API limited
+ to methods or attributes available on standard file handles.
+
+ `read_data` is a string for the `read` methoddline`, and `readlines` of the
+ file handle to return. This is an empty string by default.
+ """
+ def _readlines_side_effect(*args, **kwargs):
+ if handle.readlines.return_value is not None:
+ return handle.readlines.return_value
+ return list(_data)
+
+ def _read_side_effect(*args, **kwargs):
+ if handle.read.return_value is not None:
+ return handle.read.return_value
+ return type(read_data)().join(_data)
+
+ def _readline_side_effect():
+ if handle.readline.return_value is not None:
+ while True:
+ yield handle.readline.return_value
+ for line in _data:
+ yield line
+
+ global file_spec
+ if file_spec is None:
+ import _io
+ file_spec = list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO))))
+
+ if mock is None:
+ mock = MagicMock(name='open', spec=open)
+
+ handle = MagicMock(spec=file_spec)
+ handle.__enter__.return_value = handle
+
+ _data = _iterate_read_data(read_data)
+
+ handle.write.return_value = None
+ handle.read.return_value = None
+ handle.readline.return_value = None
+ handle.readlines.return_value = None
+
+ handle.read.side_effect = _read_side_effect
+ handle.readline.side_effect = _readline_side_effect()
+ handle.readlines.side_effect = _readlines_side_effect
+
+ mock.return_value = handle
+ return mock
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/unittest.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/unittest.py
new file mode 100644
index 00000000..98f08ad6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/compat/unittest.py
@@ -0,0 +1,38 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+'''
+Compat module for Python2.7's unittest module
+'''
+
+import sys
+
+# Allow wildcard import because we really do want to import all of
+# unittests's symbols into this compat shim
+# pylint: disable=wildcard-import,unused-wildcard-import
+if sys.version_info < (2, 7):
+ try:
+ # Need unittest2 on python2.6
+ from unittest2 import *
+ except ImportError:
+ print('You need unittest2 installed on python2.6.x to run tests')
+else:
+ from unittest import *
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/__init__.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/loader.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/loader.py
new file mode 100644
index 00000000..0ee47fbb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/loader.py
@@ -0,0 +1,116 @@
+# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import os
+
+from ansible.errors import AnsibleParserError
+from ansible.parsing.dataloader import DataLoader
+from ansible.module_utils._text import to_bytes, to_text
+
+
+class DictDataLoader(DataLoader):
+
+ def __init__(self, file_mapping=None):
+ file_mapping = {} if file_mapping is None else file_mapping
+ assert type(file_mapping) == dict
+
+ super(DictDataLoader, self).__init__()
+
+ self._file_mapping = file_mapping
+ self._build_known_directories()
+ self._vault_secrets = None
+
+ def load_from_file(self, path, cache=True, unsafe=False):
+ path = to_text(path)
+ if path in self._file_mapping:
+ return self.load(self._file_mapping[path], path)
+ return None
+
+ # TODO: the real _get_file_contents returns a bytestring, so we actually convert the
+ # unicode/text it's created with to utf-8
+ def _get_file_contents(self, path):
+ path = to_text(path)
+ if path in self._file_mapping:
+ return (to_bytes(self._file_mapping[path]), False)
+ else:
+ raise AnsibleParserError("file not found: %s" % path)
+
+ def path_exists(self, path):
+ path = to_text(path)
+ return path in self._file_mapping or path in self._known_directories
+
+ def is_file(self, path):
+ path = to_text(path)
+ return path in self._file_mapping
+
+ def is_directory(self, path):
+ path = to_text(path)
+ return path in self._known_directories
+
+ def list_directory(self, path):
+ ret = []
+ path = to_text(path)
+ for x in (list(self._file_mapping.keys()) + self._known_directories):
+ if x.startswith(path):
+ if os.path.dirname(x) == path:
+ ret.append(os.path.basename(x))
+ return ret
+
+ def is_executable(self, path):
+ # FIXME: figure out a way to make paths return true for this
+ return False
+
+ def _add_known_directory(self, directory):
+ if directory not in self._known_directories:
+ self._known_directories.append(directory)
+
+ def _build_known_directories(self):
+ self._known_directories = []
+ for path in self._file_mapping:
+ dirname = os.path.dirname(path)
+ while dirname not in ('/', ''):
+ self._add_known_directory(dirname)
+ dirname = os.path.dirname(dirname)
+
+ def push(self, path, content):
+ rebuild_dirs = False
+ if path not in self._file_mapping:
+ rebuild_dirs = True
+
+ self._file_mapping[path] = content
+
+ if rebuild_dirs:
+ self._build_known_directories()
+
+ def pop(self, path):
+ if path in self._file_mapping:
+ del self._file_mapping[path]
+ self._build_known_directories()
+
+ def clear(self):
+ self._file_mapping = dict()
+ self._known_directories = []
+
+ def get_basedir(self):
+ return os.getcwd()
+
+ def set_vault_secrets(self, vault_secrets):
+ self._vault_secrets = vault_secrets
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/path.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/path.py
new file mode 100644
index 00000000..08b10e45
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/path.py
@@ -0,0 +1,8 @@
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+from ansible_collections.cisco.nso.tests.unit.compat.mock import MagicMock
+from ansible.utils.path import unfrackpath
+
+
+mock_unfrackpath_noop = MagicMock(spec_set=unfrackpath, side_effect=lambda x, *args, **kwargs: x)
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/procenv.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/procenv.py
new file mode 100644
index 00000000..bdd78c7f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/procenv.py
@@ -0,0 +1,90 @@
+# (c) 2016, Matt Davis <mdavis@ansible.com>
+# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import sys
+import json
+
+from contextlib import contextmanager
+from io import BytesIO, StringIO
+from ansible_collections.cisco.nso.tests.unit.compat import unittest
+from ansible.module_utils.six import PY3
+from ansible.module_utils._text import to_bytes
+
+
+@contextmanager
+def swap_stdin_and_argv(stdin_data='', argv_data=tuple()):
+ """
+ context manager that temporarily masks the test runner's values for stdin and argv
+ """
+ real_stdin = sys.stdin
+ real_argv = sys.argv
+
+ if PY3:
+ fake_stream = StringIO(stdin_data)
+ fake_stream.buffer = BytesIO(to_bytes(stdin_data))
+ else:
+ fake_stream = BytesIO(to_bytes(stdin_data))
+
+ try:
+ sys.stdin = fake_stream
+ sys.argv = argv_data
+
+ yield
+ finally:
+ sys.stdin = real_stdin
+ sys.argv = real_argv
+
+
+@contextmanager
+def swap_stdout():
+ """
+ context manager that temporarily replaces stdout for tests that need to verify output
+ """
+ old_stdout = sys.stdout
+
+ if PY3:
+ fake_stream = StringIO()
+ else:
+ fake_stream = BytesIO()
+
+ try:
+ sys.stdout = fake_stream
+
+ yield fake_stream
+ finally:
+ sys.stdout = old_stdout
+
+
+class ModuleTestCase(unittest.TestCase):
+ def setUp(self, module_args=None):
+ if module_args is None:
+ module_args = {'_ansible_remote_tmp': '/tmp', '_ansible_keep_remote_files': False}
+
+ args = json.dumps(dict(ANSIBLE_MODULE_ARGS=module_args))
+
+ # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
+ self.stdin_swap = swap_stdin_and_argv(stdin_data=args)
+ self.stdin_swap.__enter__()
+
+ def tearDown(self):
+ # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
+ self.stdin_swap.__exit__(None, None, None)
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/vault_helper.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/vault_helper.py
new file mode 100644
index 00000000..dcce9c78
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/vault_helper.py
@@ -0,0 +1,39 @@
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+from ansible.module_utils._text import to_bytes
+
+from ansible.parsing.vault import VaultSecret
+
+
+class TextVaultSecret(VaultSecret):
+ '''A secret piece of text. ie, a password. Tracks text encoding.
+
+ The text encoding of the text may not be the default text encoding so
+ we keep track of the encoding so we encode it to the same bytes.'''
+
+ def __init__(self, text, encoding=None, errors=None, _bytes=None):
+ super(TextVaultSecret, self).__init__()
+ self.text = text
+ self.encoding = encoding or 'utf-8'
+ self._bytes = _bytes
+ self.errors = errors or 'strict'
+
+ @property
+ def bytes(self):
+ '''The text encoded with encoding, unless we specifically set _bytes.'''
+ return self._bytes or to_bytes(self.text, encoding=self.encoding, errors=self.errors)
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/yaml_helper.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/yaml_helper.py
new file mode 100644
index 00000000..bf0aa8d8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/mock/yaml_helper.py
@@ -0,0 +1,124 @@
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+import io
+import yaml
+
+from ansible.module_utils.six import PY3
+from ansible.parsing.yaml.loader import AnsibleLoader
+from ansible.parsing.yaml.dumper import AnsibleDumper
+
+
+class YamlTestUtils(object):
+ """Mixin class to combine with a unittest.TestCase subclass."""
+ def _loader(self, stream):
+ """Vault related tests will want to override this.
+
+ Vault cases should setup a AnsibleLoader that has the vault password."""
+ return AnsibleLoader(stream)
+
+ def _dump_stream(self, obj, stream, dumper=None):
+ """Dump to a py2-unicode or py3-string stream."""
+ if PY3:
+ return yaml.dump(obj, stream, Dumper=dumper)
+ else:
+ return yaml.dump(obj, stream, Dumper=dumper, encoding=None)
+
+ def _dump_string(self, obj, dumper=None):
+ """Dump to a py2-unicode or py3-string"""
+ if PY3:
+ return yaml.dump(obj, Dumper=dumper)
+ else:
+ return yaml.dump(obj, Dumper=dumper, encoding=None)
+
+ def _dump_load_cycle(self, obj):
+ # Each pass though a dump or load revs the 'generation'
+ # obj to yaml string
+ string_from_object_dump = self._dump_string(obj, dumper=AnsibleDumper)
+
+ # wrap a stream/file like StringIO around that yaml
+ stream_from_object_dump = io.StringIO(string_from_object_dump)
+ loader = self._loader(stream_from_object_dump)
+ # load the yaml stream to create a new instance of the object (gen 2)
+ obj_2 = loader.get_data()
+
+ # dump the gen 2 objects directory to strings
+ string_from_object_dump_2 = self._dump_string(obj_2,
+ dumper=AnsibleDumper)
+
+ # The gen 1 and gen 2 yaml strings
+ self.assertEqual(string_from_object_dump, string_from_object_dump_2)
+ # the gen 1 (orig) and gen 2 py object
+ self.assertEqual(obj, obj_2)
+
+ # again! gen 3... load strings into py objects
+ stream_3 = io.StringIO(string_from_object_dump_2)
+ loader_3 = self._loader(stream_3)
+ obj_3 = loader_3.get_data()
+
+ string_from_object_dump_3 = self._dump_string(obj_3, dumper=AnsibleDumper)
+
+ self.assertEqual(obj, obj_3)
+ # should be transitive, but...
+ self.assertEqual(obj_2, obj_3)
+ self.assertEqual(string_from_object_dump, string_from_object_dump_3)
+
+ def _old_dump_load_cycle(self, obj):
+ '''Dump the passed in object to yaml, load it back up, dump again, compare.'''
+ stream = io.StringIO()
+
+ yaml_string = self._dump_string(obj, dumper=AnsibleDumper)
+ self._dump_stream(obj, stream, dumper=AnsibleDumper)
+
+ yaml_string_from_stream = stream.getvalue()
+
+ # reset stream
+ stream.seek(0)
+
+ loader = self._loader(stream)
+ # loader = AnsibleLoader(stream, vault_password=self.vault_password)
+ obj_from_stream = loader.get_data()
+
+ stream_from_string = io.StringIO(yaml_string)
+ loader2 = self._loader(stream_from_string)
+ # loader2 = AnsibleLoader(stream_from_string, vault_password=self.vault_password)
+ obj_from_string = loader2.get_data()
+
+ stream_obj_from_stream = io.StringIO()
+ stream_obj_from_string = io.StringIO()
+
+ if PY3:
+ yaml.dump(obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper)
+ yaml.dump(obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper)
+ else:
+ yaml.dump(obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper, encoding=None)
+ yaml.dump(obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper, encoding=None)
+
+ yaml_string_stream_obj_from_stream = stream_obj_from_stream.getvalue()
+ yaml_string_stream_obj_from_string = stream_obj_from_string.getvalue()
+
+ stream_obj_from_stream.seek(0)
+ stream_obj_from_string.seek(0)
+
+ if PY3:
+ yaml_string_obj_from_stream = yaml.dump(obj_from_stream, Dumper=AnsibleDumper)
+ yaml_string_obj_from_string = yaml.dump(obj_from_string, Dumper=AnsibleDumper)
+ else:
+ yaml_string_obj_from_stream = yaml.dump(obj_from_stream, Dumper=AnsibleDumper, encoding=None)
+ yaml_string_obj_from_string = yaml.dump(obj_from_string, Dumper=AnsibleDumper, encoding=None)
+
+ assert yaml_string == yaml_string_obj_from_stream
+ assert yaml_string == yaml_string_obj_from_stream == yaml_string_obj_from_string
+ assert (yaml_string == yaml_string_obj_from_stream == yaml_string_obj_from_string == yaml_string_stream_obj_from_stream ==
+ yaml_string_stream_obj_from_string)
+ assert obj == obj_from_stream
+ assert obj == obj_from_string
+ assert obj == yaml_string_obj_from_stream
+ assert obj == yaml_string_obj_from_string
+ assert obj == obj_from_stream == obj_from_string == yaml_string_obj_from_stream == yaml_string_obj_from_string
+ return {'obj': obj,
+ 'yaml_string': yaml_string,
+ 'yaml_string_from_stream': yaml_string_from_stream,
+ 'obj_from_stream': obj_from_stream,
+ 'obj_from_string': obj_from_string,
+ 'yaml_string_obj_from_string': yaml_string_obj_from_string}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/module_utils/__init__.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/module_utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/module_utils/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/module_utils/test_nso.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/module_utils/test_nso.py
new file mode 100644
index 00000000..ee113aeb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/module_utils/test_nso.py
@@ -0,0 +1,660 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+import json
+
+from ansible_collections.cisco.nso.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nso.tests.unit.compat import unittest
+from ansible_collections.cisco.nso.plugins.module_utils import nso
+
+
+MODULE_PREFIX_MAP = '''
+{
+ "ansible-nso": "an",
+ "test": "test",
+ "tailf-ncs": "ncs"
+}
+'''
+
+
+SCHEMA_DATA = {
+ '/an:id-name-leaf': '''
+{
+ "meta": {
+ "prefix": "an",
+ "namespace": "http://github.com/ansible/nso",
+ "types": {
+ "http://github.com/ansible/nso:id-name-t": [
+ {
+ "name": "http://github.com/ansible/nso:id-name-t",
+ "enumeration": [
+ {
+ "label": "id-one"
+ },
+ {
+ "label": "id-two"
+ }
+ ]
+ },
+ {
+ "name": "identityref"
+ }
+ ]
+ },
+ "keypath": "/an:id-name-leaf"
+ },
+ "data": {
+ "kind": "leaf",
+ "type": {
+ "namespace": "http://github.com/ansible/nso",
+ "name": "id-name-t"
+ },
+ "name": "id-name-leaf",
+ "qname": "an:id-name-leaf"
+ }
+}''',
+ '/an:id-name-values': '''
+{
+ "meta": {
+ "prefix": "an",
+ "namespace": "http://github.com/ansible/nso",
+ "types": {},
+ "keypath": "/an:id-name-values"
+ },
+ "data": {
+ "kind": "container",
+ "name": "id-name-values",
+ "qname": "an:id-name-values",
+ "children": [
+ {
+ "kind": "list",
+ "name": "id-name-value",
+ "qname": "an:id-name-value",
+ "key": [
+ "name"
+ ]
+ }
+ ]
+ }
+}
+''',
+ '/an:id-name-values/id-name-value': '''
+{
+ "meta": {
+ "prefix": "an",
+ "namespace": "http://github.com/ansible/nso",
+ "types": {
+ "http://github.com/ansible/nso:id-name-t": [
+ {
+ "name": "http://github.com/ansible/nso:id-name-t",
+ "enumeration": [
+ {
+ "label": "id-one"
+ },
+ {
+ "label": "id-two"
+ }
+ ]
+ },
+ {
+ "name": "identityref"
+ }
+ ]
+ },
+ "keypath": "/an:id-name-values/id-name-value"
+ },
+ "data": {
+ "kind": "list",
+ "name": "id-name-value",
+ "qname": "an:id-name-value",
+ "key": [
+ "name"
+ ],
+ "children": [
+ {
+ "kind": "key",
+ "name": "name",
+ "qname": "an:name",
+ "type": {
+ "namespace": "http://github.com/ansible/nso",
+ "name": "id-name-t"
+ }
+ },
+ {
+ "kind": "leaf",
+ "type": {
+ "primitive": true,
+ "name": "string"
+ },
+ "name": "value",
+ "qname": "an:value"
+ }
+ ]
+ }
+}
+''',
+ '/test:test': '''
+{
+ "meta": {
+ "types": {
+ "http://example.com/test:t15": [
+ {
+ "leaf_type":[
+ {
+ "name":"string"
+ }
+ ],
+ "list_type":[
+ {
+ "name":"http://example.com/test:t15",
+ "leaf-list":true
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "data": {
+ "kind": "list",
+ "name":"test",
+ "qname":"test:test",
+ "key":["name"],
+ "children": [
+ {
+ "kind": "key",
+ "name": "name",
+ "qname": "test:name",
+ "type": {"name":"string","primitive":true}
+ },
+ {
+ "kind": "choice",
+ "name": "test-choice",
+ "qname": "test:test-choice",
+ "cases": [
+ {
+ "kind": "case",
+ "name": "direct-child-case",
+ "qname":"test:direct-child-case",
+ "children":[
+ {
+ "kind": "leaf",
+ "name": "direct-child",
+ "qname": "test:direct-child",
+ "type": {"name":"string","primitive":true}
+ }
+ ]
+ },
+ {
+ "kind":"case","name":"nested-child-case","qname":"test:nested-child-case",
+ "children": [
+ {
+ "kind": "choice",
+ "name": "nested-choice",
+ "qname": "test:nested-choice",
+ "cases": [
+ {
+ "kind":"case","name":"nested-child","qname":"test:nested-child",
+ "children": [
+ {
+ "kind": "leaf",
+ "name":"nested-child",
+ "qname":"test:nested-child",
+ "type":{"name":"string","primitive":true}}
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "kind":"leaf-list",
+ "name":"device-list",
+ "qname":"test:device-list",
+ "type": {
+ "namespace":"http://example.com/test",
+ "name":"t15"
+ }
+ }
+ ]
+ }
+}
+''',
+ '/test:test/device-list': '''
+{
+ "meta": {
+ "types": {
+ "http://example.com/test:t15": [
+ {
+ "leaf_type":[
+ {
+ "name":"string"
+ }
+ ],
+ "list_type":[
+ {
+ "name":"http://example.com/test:t15",
+ "leaf-list":true
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "data": {
+ "kind":"leaf-list",
+ "name":"device-list",
+ "qname":"test:device-list",
+ "type": {
+ "namespace":"http://example.com/test",
+ "name":"t15"
+ }
+ }
+}
+''',
+ '/test:deps': '''
+{
+ "meta": {
+ },
+ "data": {
+ "kind":"container",
+ "name":"deps",
+ "qname":"test:deps",
+ "children": [
+ {
+ "kind": "leaf",
+ "type": {
+ "primitive": true,
+ "name": "string"
+ },
+ "name": "a",
+ "qname": "test:a",
+ "deps": ["/test:deps/c"]
+ },
+ {
+ "kind": "leaf",
+ "type": {
+ "primitive": true,
+ "name": "string"
+ },
+ "name": "b",
+ "qname": "test:b",
+ "deps": ["/test:deps/a"]
+ },
+ {
+ "kind": "leaf",
+ "type": {
+ "primitive": true,
+ "name": "string"
+ },
+ "name": "c",
+ "qname": "test:c"
+ }
+ ]
+ }
+}
+'''
+}
+
+
+class MockResponse(object):
+ def __init__(self, method, params, code, body, headers=None):
+ if headers is None:
+ headers = {}
+
+ self.method = method
+ self.params = params
+
+ self.code = code
+ self.body = body
+ self.headers = dict(headers)
+
+ def read(self):
+ return self.body
+
+
+def mock_call(calls, url, timeout, validate_certs, data=None, headers=None, method=None):
+ result = calls[0]
+ del calls[0]
+
+ request = json.loads(data)
+ if result.method != request['method']:
+ raise ValueError('expected method {0}({1}), got {2}({3})'.format(
+ result.method, result.params,
+ request['method'], request['params']))
+
+ for key, value in result.params.items():
+ if key not in request['params']:
+ raise ValueError('{0} not in parameters'.format(key))
+ if value != request['params'][key]:
+ raise ValueError('expected {0} to be {1}, got {2}'.format(
+ key, value, request['params'][key]))
+
+ return result
+
+
+def get_schema_response(path):
+ return MockResponse(
+ 'get_schema', {'path': path}, 200, '{{"result": {0}}}'.format(
+ SCHEMA_DATA[path]))
+
+
+class TestJsonRpc(unittest.TestCase):
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_exists(self, open_url_mock):
+ calls = [
+ MockResponse('new_trans', {}, 200, '{"result": {"th": 1}}'),
+ MockResponse('exists', {'path': '/exists'}, 200, '{"result": {"exists": true}}'),
+ MockResponse('exists', {'path': '/not-exists'}, 200, '{"result": {"exists": false}}')
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: mock_call(calls, *args, **kwargs)
+ client = nso.JsonRpc('http://localhost:8080/jsonrpc', 10, False)
+ self.assertEqual(True, client.exists('/exists'))
+ self.assertEqual(False, client.exists('/not-exists'))
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_exists_data_not_found(self, open_url_mock):
+ calls = [
+ MockResponse('new_trans', {}, 200, '{"result": {"th": 1}}'),
+ MockResponse('exists', {'path': '/list{missing-parent}/list{child}'}, 200, '{"error":{"type":"data.not_found"}}')
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: mock_call(calls, *args, **kwargs)
+ client = nso.JsonRpc('http://localhost:8080/jsonrpc', 10, False)
+ self.assertEqual(False, client.exists('/list{missing-parent}/list{child}'))
+
+ self.assertEqual(0, len(calls))
+
+
+class TestValueBuilder(unittest.TestCase):
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_identityref_leaf(self, open_url_mock):
+ calls = [
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5"}'),
+ MockResponse('new_trans', {}, 200, '{"result": {"th": 1}}'),
+ get_schema_response('/an:id-name-leaf'),
+ MockResponse('get_module_prefix_map', {}, 200, '{{"result": {0}}}'.format(MODULE_PREFIX_MAP))
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: mock_call(calls, *args, **kwargs)
+
+ parent = "/an:id-name-leaf"
+ schema_data = json.loads(
+ SCHEMA_DATA['/an:id-name-leaf'])
+ schema = schema_data['data']
+
+ vb = nso.ValueBuilder(nso.JsonRpc('http://localhost:8080/jsonrpc', 10, False))
+ vb.build(parent, None, 'ansible-nso:id-two', schema)
+ values = list(vb.values)
+ self.assertEqual(1, len(values))
+ value = values[0]
+ self.assertEqual(parent, value.path)
+ self.assertEqual('set', value.state)
+ self.assertEqual('an:id-two', value.value)
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_identityref_key(self, open_url_mock):
+ calls = [
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5"}'),
+ MockResponse('new_trans', {}, 200, '{"result": {"th": 1}}'),
+ get_schema_response('/an:id-name-values/id-name-value'),
+ MockResponse('get_module_prefix_map', {}, 200, '{{"result": {0}}}'.format(MODULE_PREFIX_MAP)),
+ MockResponse('exists', {'path': '/an:id-name-values/id-name-value{an:id-one}'}, 200, '{"result": {"exists": true}}')
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: mock_call(calls, *args, **kwargs)
+
+ parent = "/an:id-name-values"
+ schema_data = json.loads(
+ SCHEMA_DATA['/an:id-name-values/id-name-value'])
+ schema = schema_data['data']
+
+ vb = nso.ValueBuilder(nso.JsonRpc('http://localhost:8080/jsonrpc', 10, False))
+ vb.build(parent, 'id-name-value', [{'name': 'ansible-nso:id-one', 'value': '1'}], schema)
+ values = list(vb.values)
+ self.assertEqual(1, len(values))
+ value = values[0]
+ self.assertEqual('{0}/id-name-value{{an:id-one}}/value'.format(parent), value.path)
+ self.assertEqual('set', value.state)
+ self.assertEqual('1', value.value)
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nested_choice(self, open_url_mock):
+ calls = [
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5"}'),
+ MockResponse('new_trans', {}, 200, '{"result": {"th": 1}}'),
+ get_schema_response('/test:test'),
+ MockResponse('exists', {'path': '/test:test{direct}'}, 200, '{"result": {"exists": true}}'),
+ MockResponse('exists', {'path': '/test:test{nested}'}, 200, '{"result": {"exists": true}}')
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: mock_call(calls, *args, **kwargs)
+
+ parent = "/test:test"
+ schema_data = json.loads(
+ SCHEMA_DATA['/test:test'])
+ schema = schema_data['data']
+
+ vb = nso.ValueBuilder(nso.JsonRpc('http://localhost:8080/jsonrpc', 10, False))
+ vb.build(parent, None, [{'name': 'direct', 'direct-child': 'direct-value'},
+ {'name': 'nested', 'nested-child': 'nested-value'}], schema)
+ values = list(vb.values)
+ self.assertEqual(2, len(values))
+ value = values[0]
+ self.assertEqual('{0}{{direct}}/direct-child'.format(parent), value.path)
+ self.assertEqual('set', value.state)
+ self.assertEqual('direct-value', value.value)
+
+ value = values[1]
+ self.assertEqual('{0}{{nested}}/nested-child'.format(parent), value.path)
+ self.assertEqual('set', value.state)
+ self.assertEqual('nested-value', value.value)
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_leaf_list_type(self, open_url_mock):
+ calls = [
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.4"}'),
+ MockResponse('new_trans', {}, 200, '{"result": {"th": 1}}'),
+ get_schema_response('/test:test')
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: mock_call(calls, *args, **kwargs)
+
+ parent = "/test:test"
+ schema_data = json.loads(
+ SCHEMA_DATA['/test:test'])
+ schema = schema_data['data']
+
+ vb = nso.ValueBuilder(nso.JsonRpc('http://localhost:8080/jsonrpc', 10, False))
+ vb.build(parent, None, {'device-list': ['one', 'two']}, schema)
+ values = list(vb.values)
+ self.assertEqual(1, len(values))
+ value = values[0]
+ self.assertEqual('{0}/device-list'.format(parent), value.path)
+ self.assertEqual(['one', 'two'], value.value)
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_leaf_list_type_45(self, open_url_mock):
+ calls = [
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5"}'),
+ MockResponse('new_trans', {}, 200, '{"result": {"th": 1}}'),
+ get_schema_response('/test:test/device-list')
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: mock_call(calls, *args, **kwargs)
+
+ parent = "/test:test"
+ schema_data = json.loads(
+ SCHEMA_DATA['/test:test'])
+ schema = schema_data['data']
+
+ vb = nso.ValueBuilder(nso.JsonRpc('http://localhost:8080/jsonrpc', 10, False))
+ vb.build(parent, None, {'device-list': ['one', 'two']}, schema)
+ values = list(vb.values)
+ self.assertEqual(3, len(values))
+ value = values[0]
+ self.assertEqual('{0}/device-list'.format(parent), value.path)
+ self.assertEqual(nso.State.ABSENT, value.state)
+ value = values[1]
+ self.assertEqual('{0}/device-list{{one}}'.format(parent), value.path)
+ self.assertEqual(nso.State.PRESENT, value.state)
+ value = values[2]
+ self.assertEqual('{0}/device-list{{two}}'.format(parent), value.path)
+ self.assertEqual(nso.State.PRESENT, value.state)
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_sort_by_deps(self, open_url_mock):
+ calls = [
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5"}'),
+ MockResponse('new_trans', {}, 200, '{"result": {"th": 1}}'),
+ get_schema_response('/test:deps')
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: mock_call(calls, *args, **kwargs)
+
+ parent = "/test:deps"
+ schema_data = json.loads(
+ SCHEMA_DATA['/test:deps'])
+ schema = schema_data['data']
+
+ values = {
+ 'a': '1',
+ 'b': '2',
+ 'c': '3',
+ }
+
+ vb = nso.ValueBuilder(nso.JsonRpc('http://localhost:8080/jsonrpc', 10, False))
+ vb.build(parent, None, values, schema)
+ values = list(vb.values)
+ self.assertEqual(3, len(values))
+ value = values[0]
+ self.assertEqual('{0}/c'.format(parent), value.path)
+ self.assertEqual('3', value.value)
+ value = values[1]
+ self.assertEqual('{0}/a'.format(parent), value.path)
+ self.assertEqual('1', value.value)
+ value = values[2]
+ self.assertEqual('{0}/b'.format(parent), value.path)
+ self.assertEqual('2', value.value)
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_sort_by_deps_not_included(self, open_url_mock):
+ calls = [
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5"}'),
+ MockResponse('new_trans', {}, 200, '{"result": {"th": 1}}'),
+ get_schema_response('/test:deps')
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: mock_call(calls, *args, **kwargs)
+
+ parent = "/test:deps"
+ schema_data = json.loads(
+ SCHEMA_DATA['/test:deps'])
+ schema = schema_data['data']
+
+ values = {
+ 'a': '1',
+ 'b': '2'
+ }
+
+ vb = nso.ValueBuilder(nso.JsonRpc('http://localhost:8080/jsonrpc', 10, False))
+ vb.build(parent, None, values, schema)
+ values = list(vb.values)
+ self.assertEqual(2, len(values))
+ value = values[0]
+ self.assertEqual('{0}/a'.format(parent), value.path)
+ self.assertEqual('1', value.value)
+ value = values[1]
+ self.assertEqual('{0}/b'.format(parent), value.path)
+ self.assertEqual('2', value.value)
+
+ self.assertEqual(0, len(calls))
+
+
+class TestVerifyVersion(unittest.TestCase):
+ def test_valid_versions(self):
+ self.assertTrue(nso.verify_version_str('5.0', [(4, 6), (4, 5, 1)]))
+ self.assertTrue(nso.verify_version_str('5.1.1', [(4, 6), (4, 5, 1)]))
+ self.assertTrue(nso.verify_version_str('5.1.1.2', [(4, 6), (4, 5, 1)]))
+ self.assertTrue(nso.verify_version_str('4.6', [(4, 6), (4, 5, 1)]))
+ self.assertTrue(nso.verify_version_str('4.6.2', [(4, 6), (4, 5, 1)]))
+ self.assertTrue(nso.verify_version_str('4.6.2.1', [(4, 6), (4, 5, 1)]))
+ self.assertTrue(nso.verify_version_str('4.5.1', [(4, 6), (4, 5, 1)]))
+ self.assertTrue(nso.verify_version_str('4.5.2', [(4, 6), (4, 5, 1)]))
+ self.assertTrue(nso.verify_version_str('4.5.1.2', [(4, 6), (4, 5, 1)]))
+
+ def test_invalid_versions(self):
+ self.assertFalse(nso.verify_version_str('4.4', [(4, 6), (4, 5, 1)]))
+ self.assertFalse(nso.verify_version_str('4.4.1', [(4, 6), (4, 5, 1)]))
+ self.assertFalse(nso.verify_version_str('4.4.1.2', [(4, 6), (4, 5, 1)]))
+ self.assertFalse(nso.verify_version_str('4.5.0', [(4, 6), (4, 5, 1)]))
+
+
+class TestValueSort(unittest.TestCase):
+ def test_sort_parent_depend(self):
+ values = [
+ nso.ValueBuilder.Value('/test/list{entry}', '/test/list', 'CREATE', ['']),
+ nso.ValueBuilder.Value('/test/list{entry}/description', '/test/list/description', 'TEST', ['']),
+ nso.ValueBuilder.Value('/test/entry', '/test/entry', 'VALUE', ['/test/list', '/test/list/name'])
+ ]
+
+ result = [v.path for v in nso.ValueBuilder.sort_values(values)]
+
+ self.assertEqual(['/test/list{entry}', '/test/entry', '/test/list{entry}/description'], result)
+
+ def test_sort_break_direct_cycle(self):
+ values = [
+ nso.ValueBuilder.Value('/test/a', '/test/a', 'VALUE', ['/test/c']),
+ nso.ValueBuilder.Value('/test/b', '/test/b', 'VALUE', ['/test/a']),
+ nso.ValueBuilder.Value('/test/c', '/test/c', 'VALUE', ['/test/a'])
+ ]
+
+ result = [v.path for v in nso.ValueBuilder.sort_values(values)]
+
+ self.assertEqual(['/test/a', '/test/b', '/test/c'], result)
+
+ def test_sort_break_indirect_cycle(self):
+ values = [
+ nso.ValueBuilder.Value('/test/c', '/test/c', 'VALUE', ['/test/a']),
+ nso.ValueBuilder.Value('/test/a', '/test/a', 'VALUE', ['/test/b']),
+ nso.ValueBuilder.Value('/test/b', '/test/b', 'VALUE', ['/test/c'])
+ ]
+
+ result = [v.path for v in nso.ValueBuilder.sort_values(values)]
+
+ self.assertEqual(['/test/a', '/test/c', '/test/b'], result)
+
+ def test_sort_depend_on_self(self):
+ values = [
+ nso.ValueBuilder.Value('/test/a', '/test/a', 'VALUE', ['/test/a']),
+ nso.ValueBuilder.Value('/test/b', '/test/b', 'VALUE', [])
+ ]
+
+ result = [v.path for v in nso.ValueBuilder.sort_values(values)]
+
+ self.assertEqual(['/test/a', '/test/b'], result)
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/complex_schema.json b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/complex_schema.json
new file mode 100644
index 00000000..49a11765
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/complex_schema.json
@@ -0,0 +1,212 @@
+{
+ "meta": {
+ "prefix": "ansible",
+ "namespace": "http://example.com/ansible",
+ "types": {
+ },
+ "keypath": "/ansible:action/complex"
+ },
+ "data": {
+ "kind": "action",
+ "mandatory": true,
+ "name": "complex",
+ "qname": "ansible:complex",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": true,
+ "update": false,
+ "delete": false
+ },
+ "children": [
+ {
+ "kind": "leaf",
+ "is_action_input": true,
+ "name": "number",
+ "qname": "ansible:number",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": true,
+ "delete": false
+ },
+ "type": {
+ "primitive": true,
+ "name": "uint8"
+ }
+ },
+ {
+ "kind": "container",
+ "is_action_input": true,
+ "mandatory": true,
+ "name": "ansible",
+ "qname": "ansible:ansible",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": true,
+ "delete": false
+ },
+ "children": [
+ {
+ "kind": "choice",
+ "cases": [
+ {
+ "kind": "case",
+ "name": "version",
+ "children": [
+ {
+ "kind": "leaf",
+ "is_action_input": true,
+ "name": "version",
+ "qname": "ansible:version",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": true,
+ "delete": false
+ },
+ "type": {
+ "primitive": true,
+ "name": "string"
+ }
+ }
+ ]
+ },
+ {
+ "kind": "case",
+ "name": "release",
+ "children": [
+ {
+ "kind": "container",
+ "is_action_input": true,
+ "mandatory": true,
+ "name": "release",
+ "qname": "ansible:release",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": true,
+ "delete": false
+ },
+ "children": [
+ {
+ "kind": "leaf",
+ "is_action_input": true,
+ "name": "major",
+ "qname": "ansible:major",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": true,
+ "delete": false
+ },
+ "type": {
+ "primitive": true,
+ "name": "uint8"
+ }
+ },
+ {
+ "kind": "leaf",
+ "is_action_input": true,
+ "name": "minor",
+ "qname": "ansible:minor",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": true,
+ "delete": false
+ },
+ "type": {
+ "primitive": true,
+ "name": "uint8"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "name": "version-releae-choice"
+ }
+ ]
+ },
+ {
+ "kind": "choice",
+ "cases": [
+ {
+ "kind": "case",
+ "name": "version",
+ "children": [
+ {
+ "kind": "list",
+ "min_elements": 0,
+ "name": "version",
+ "max_elements": "unbounded",
+ "qname": "ansible:version",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": false,
+ "delete": false
+ },
+ "mandatory": true,
+ "children": [
+ {
+ "kind": "leaf",
+ "name": "name",
+ "qname": "ansible:name",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": false,
+ "delete": false
+ },
+ "type": {
+ "primitive": true,
+ "name": "string"
+ },
+ "is_action_output": true
+ }
+ ],
+ "is_action_output": true
+ }
+ ]
+ },
+ {
+ "kind": "case",
+ "name": "release",
+ "children": [
+ {
+ "kind": "leaf",
+ "name": "release",
+ "qname": "ansible:release",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": false,
+ "delete": false
+ },
+ "type": {
+ "primitive": true,
+ "name": "string"
+ },
+ "is_action_output": true
+ }
+ ]
+ }
+ ],
+ "name": "version-release-choice"
+ }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/config_config.json b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/config_config.json
new file mode 100644
index 00000000..b7318586
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/config_config.json
@@ -0,0 +1,20 @@
+{
+ "l3vpn:vpn": {
+ "l3vpn": [
+ {
+ "name": "company",
+ "route-distinguisher": 999,
+ "endpoint": [
+ {
+ "id": "branch-office1",
+ "ce-device": "ce6",
+ "ce-interface": "GigabitEthernet0/12",
+ "ip-network": "10.10.1.0/24",
+ "bandwidth": 12000000,
+ "as-number": 65101
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/config_config_changes.json b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/config_config_changes.json
new file mode 100644
index 00000000..3ef234b7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/config_config_changes.json
@@ -0,0 +1,46 @@
+{
+ "changes": [
+ {
+ "path": "/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/ce-device",
+ "old": "",
+ "value": "ce6",
+ "op": "value_set"
+ },
+ {
+ "path": "/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/ip-network",
+ "old": "",
+ "value": "10.10.1.0/24",
+ "op": "value_set"
+ },
+ {
+ "path": "/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/as-number",
+ "old": "",
+ "value": "65101",
+ "op": "value_set"
+ },
+ {
+ "path": "/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/ce-interface",
+ "old": "",
+ "value": "GigabitEthernet0/12",
+ "op": "value_set"
+ },
+ {
+ "path": "/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/bandwidth",
+ "old": "",
+ "value": "12000000",
+ "op": "value_set"
+ },
+ {
+ "path": "/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}",
+ "old": "",
+ "value": "",
+ "op": "created"
+ },
+ {
+ "path": "/l3vpn:vpn/l3vpn{company}",
+ "old": "",
+ "value": "",
+ "op": "modified"
+ }
+ ]
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/config_empty_data.json b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/config_empty_data.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/config_empty_data.json
@@ -0,0 +1 @@
+{}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/description_schema.json b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/description_schema.json
new file mode 100644
index 00000000..2680a484
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/description_schema.json
@@ -0,0 +1,28 @@
+{
+ "meta": {
+ "prefix": "ncs",
+ "namespace": "http://tail-f.com/ns/ncs",
+ "types": {
+ },
+ "keypath": "/ncs:devices/device{ce0}/description"
+ },
+ "data": {
+ "info": {
+ "string": "Free form textual description"
+ },
+ "kind": "leaf",
+ "name": "description",
+ "qname": "ncs:description",
+ "access": {
+ "read": true,
+ "create": true,
+ "execute": false,
+ "update": true,
+ "delete": true
+ },
+ "type": {
+ "primitive": true,
+ "name": "string"
+ }
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/device_schema.json b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/device_schema.json
new file mode 100644
index 00000000..d3bd2ac3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/device_schema.json
@@ -0,0 +1 @@
+{"meta": {"prefix": "ncs", "namespace": "http://tail-f.com/ns/ncs", "types": {"http://tail-f.com/ns/ncs:t85": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t85"}], "leaf_type": [{"name": "string"}]}], "urn:ietf:params:xml:ns:yang:ietf-inet-types:port-number": [{"range": {"value": [["0", "65535"]]}, "name": "urn:ietf:params:xml:ns:yang:ietf-inet-types:port-number"}, {"name": "uint16"}], "http://tail-f.com/ns/ncs:t83": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t83"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:node-name": [{"name": "http://tail-f.com/ns/ncs:node-name"}, {"max-length": {"value": 253}, "min-length": {"value": 1}, "name": "urn:ietf:params:xml:ns:yang:ietf-inet-types:domain-name", "pattern": {"value": "((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\."}}, {"name": "string"}], "http://tail-f.com/ns/ncs:t29": [{"range": {"value": [["1", "4294967"]]}, "name": "http://tail-f.com/ns/ncs:t29"}, {"name": "uint32"}], "http://tail-f.com/ns/ncs:t101": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t101"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t43": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t43"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t27": [{"range": {"value": [["1", "4294967"]]}, "name": "http://tail-f.com/ns/ncs:t27"}, {"name": "uint32"}], "http://tail-f.com/ns/ncs:t40": [{"name": "http://tail-f.com/ns/ncs:t40", "enumeration": [{"label": "reject"}, {"label": "accept"}]}, {"name": "string"}], "http://tail-f.com/ns/ncs:t47": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t47"}], "leaf_type": [{"name": "string"}]}], "urn:ietf:params:xml:ns:yang:ietf-inet-types:host": [{"union": [[{"name": "urn:ietf:params:xml:ns:yang:ietf-inet-types:ip-address"}, {"name": "ip-address"}], [{"max-length": {"value": 253}, "min-length": {"value": 1}, "name": "urn:ietf:params:xml:ns:yang:ietf-inet-types:domain-name", "pattern": {"value": "((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\."}}, {"name": "string"}]]}], "http://tail-f.com/ns/ncs:t45": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t45"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t49": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t49"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:trace-flag": [{"name": "http://tail-f.com/ns/ncs:trace-flag", "enumeration": [{"info": "Trace is disabled", "label": "false"}, {"info": "Raw, unformatted data", "label": "raw"}, {"info": "Pretty-printed data", "label": "pretty"}]}, {"name": "string"}], "http://tail-f.com/ns/ncs:t28": [{"range": {"value": [["1", "4294967"]]}, "name": "http://tail-f.com/ns/ncs:t28"}, {"name": "uint32"}]}, "keypath": "/ncs:devices/device"}, "data": {"info": {"string": "The list of managed devices"}, "kind": "list", "leafref_groups": [["remote-node"], ["authgroup"], ["device-profile"]], "mandatory": true, "name": "device", "max_elements": "unbounded", "contains_when_statement": true, "qname": "ncs:device", "children": [{"info": {"string": "A string uniquely identifying the managed device"}, "kind": "key", "mandatory": true, "name": "name", "qname": "ncs:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"info": {"string": "IP address or host name for the management interface"}, "kind": "leaf", "name": "address", "qname": "ncs:address", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "name": "host"}}, {"info": {"string": "Port for the management interface"}, "kind": "leaf", "name": "port", "qname": "ncs:port", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "name": "port-number"}}, {"info": {"string": "Name of remote node which connects to device"}, "kind": "leaf", "name": "remote-node", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "node-name"}, "qname": "ncs:remote-node", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/ncs:cluster/remote-node/name", "is_leafref": true}, {"info": {"string": "SSH connection configuration"}, "kind": "container", "mandatory": true, "name": "ssh", "qname": "ncs:ssh", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Free form textual description"}, "kind": "leaf", "name": "description", "qname": "ncs:description", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"primitive": true, "name": "string"}}, {"info": {"string": "Physical location of devices in the group"}, "kind": "container", "mandatory": true, "name": "location", "qname": "ncs:location", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Authentication credentials for the device"}, "kind": "leaf", "name": "authgroup", "type": {"primitive": true, "name": "string"}, "qname": "ncs:authgroup", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/ncs:devices/authgroups/group/name", "is_leafref": true}, {"info": {"string": "Management protocol for the device"}, "kind": "container", "mandatory": true, "name": "device-type", "qname": "ncs:device-type", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"kind": "leaf", "name": "device-profile", "type": {"primitive": true, "name": "string"}, "qname": "ncs:device-profile", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/ncs:devices/profiles/profile/name", "is_leafref": true}, {"info": {"string": "Timeout in seconds for new connections"}, "kind": "leaf", "name": "connect-timeout", "qname": "ncs:connect-timeout", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "units": "seconds", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t27"}}, {"info": {"string": "Timeout in seconds used when reading data"}, "kind": "leaf", "name": "read-timeout", "qname": "ncs:read-timeout", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "units": "seconds", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t28"}}, {"info": {"string": "Timeout in seconds used when writing data"}, "kind": "leaf", "name": "write-timeout", "qname": "ncs:write-timeout", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "units": "seconds", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t29"}}, {"info": {"string": "Controls SSH keep alive settings"}, "kind": "container", "mandatory": true, "name": "ssh-keep-alive", "qname": "ncs:ssh-keep-alive", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Trace the southbound communication to devices"}, "kind": "leaf", "name": "trace", "qname": "ncs:trace", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "trace-flag"}}, {"info": {"string": "Control which device capabilities NCS uses"}, "kind": "container", "mandatory": true, "name": "ned-settings", "qname": "ncs:ned-settings", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Control settings for the commit-queue"}, "kind": "container", "mandatory": true, "name": "commit-queue", "qname": "ncs:commit-queue", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Control how sessions to related devices can be pooled."}, "kind": "container", "mandatory": true, "name": "session-pool", "qname": "ncs:session-pool", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Control settings for no-overwrite sync check"}, "kind": "container", "mandatory": true, "name": "no-overwrite", "qname": "ncs:no-overwrite", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Specifies the behaviour of a commit operation involving a\ndevice that is out of sync with NCS. Value accept assumes that\nthe device's sync state is unknown and it is cleared on commit.\nThe default behaviour is to reject such commits."}, "kind": "leaf", "name": "out-of-sync-commit-behaviour", "qname": "ncs:out-of-sync-commit-behaviour", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t40"}}, {"default": "use-lsa", "kind": "choice", "cases": [{"kind": "case", "name": "use-lsa", "children": [{"info": {"string": "Handle the LSA nodes as such. This is the default"}, "kind": "leaf", "name": "use-lsa", "qname": "ncs:use-lsa", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"primitive": true, "name": "empty"}}]}, {"kind": "case", "name": "no-lsa", "children": [{"info": {"string": "Do not handle any of the LSA nodes as such. These nodes\nwill be handled as any other device. This has the same\nresult as adding the commit flag 'no-lsa' to every commit."}, "kind": "leaf", "name": "no-lsa", "qname": "ncs:no-lsa", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"primitive": true, "name": "empty"}}]}], "name": "choice-lsa"}, {"info": {"string": "Show all active settings for the device"}, "kind": "container", "mandatory": true, "name": "active-settings", "qname": "ncs:active-settings", "is_config_false_callpoint": true, "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "Additional protocols for the live-tree (read-only)"}, "kind": "list", "leafref_groups": [["authgroup"]], "min_elements": 0, "name": "live-status-protocol", "max_elements": "unbounded", "qname": "ncs:live-status-protocol", "children": [{"kind": "key", "mandatory": true, "name": "name", "qname": "ncs:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"info": {"string": "IP Address for the management interface"}, "kind": "leaf", "name": "address", "qname": "ncs:address", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "name": "host"}}, {"info": {"string": "Port for the management interface"}, "kind": "leaf", "name": "port", "qname": "ncs:port", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "name": "port-number"}}, {"info": {"string": "SSH host key configuration"}, "kind": "container", "name": "ssh", "presence": true, "qname": "ncs:ssh", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}}, {"info": {"string": "Authentication credentials for the device"}, "kind": "leaf", "name": "authgroup", "type": {"primitive": true, "name": "string"}, "qname": "ncs:authgroup", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/ncs:devices/authgroups/group/name", "is_leafref": true}, {"info": {"string": "Management protocol for the device"}, "kind": "container", "mandatory": true, "name": "device-type", "qname": "ncs:device-type", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Operational State for the live protocol"}, "kind": "container", "mandatory": true, "name": "state", "qname": "ncs:state", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "List of capabillities supported by the device"}, "kind": "list", "min_elements": 0, "name": "capability", "max_elements": "unbounded", "qname": "ncs:capability", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "key": ["uri"], "mandatory": true, "config": false, "children": [{"info": {"string": "Capability URI"}, "kind": "key", "mandatory": true, "name": "uri", "type": {"primitive": true, "name": "string"}, "qname": "ncs:uri", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "Capability revision"}, "kind": "leaf", "name": "revision", "type": {"primitive": true, "name": "string"}, "qname": "ncs:revision", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "Capability module"}, "kind": "leaf", "name": "module", "type": {"primitive": true, "name": "string"}, "qname": "ncs:module", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "Capability features"}, "kind": "leaf-list", "name": "feature", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t83"}, "qname": "ncs:feature", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "Capability deviations"}, "kind": "leaf-list", "name": "deviation", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t85"}, "qname": "ncs:deviation", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}]}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["name"], "mandatory": true, "leafrefGroups": [["authgroup"]]}, {"info": {"string": "Show states for the device"}, "kind": "container", "mandatory": true, "name": "state", "qname": "ncs:state", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "How the device was added to NCS"}, "kind": "container", "mandatory": true, "name": "source", "qname": "ncs:source", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "A list of capabilities supported by the device"}, "kind": "list", "min_elements": 0, "name": "capability", "max_elements": "unbounded", "qname": "ncs:capability", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "key": ["uri"], "mandatory": true, "config": false, "children": [{"kind": "key", "mandatory": true, "name": "uri", "type": {"primitive": true, "name": "string"}, "qname": "ncs:uri", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"kind": "leaf", "name": "revision", "config": false, "qname": "ncs:revision", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf", "name": "module", "config": false, "qname": "ncs:module", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf-list", "name": "feature", "config": false, "qname": "ncs:feature", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t43"}}, {"kind": "leaf-list", "name": "deviation", "config": false, "qname": "ncs:deviation", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t45"}}, {"info": {"string": "This action removes a capability from the list of capabilities.\nIf leaf module is set then corresponding module is attempted to\nbe removed from the list of modules for this device. This action\nis only intended to be used for pre-provisioning: it is not\npossible to override capabilities and modules provided by the\nNED implementation using this action."}, "kind": "action", "mandatory": true, "name": "remove", "qname": "ncs:remove", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}]}, {"info": {"string": "This is a list of the YANG modules supported by the device.\n\nThis list is populated the first time NCS connects to the\ndevice."}, "kind": "list", "min_elements": 0, "name": "module", "max_elements": "unbounded", "qname": "ncs:module", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "key": ["name"], "mandatory": true, "config": false, "children": [{"kind": "key", "mandatory": true, "name": "name", "type": {"primitive": true, "name": "string"}, "qname": "ncs:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"kind": "leaf", "name": "revision", "config": false, "qname": "ncs:revision", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf-list", "name": "feature", "config": false, "qname": "ncs:feature", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t47"}}, {"kind": "leaf-list", "name": "deviation", "config": false, "qname": "ncs:deviation", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t49"}}]}, {"info": {"string": "Contains vendor-specific information for\nidentifying the system platform.\n\nNEDs MAY augment this container with more device-specific\nnodes."}, "kind": "container", "mandatory": true, "name": "platform", "qname": "ncs:platform", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "NCS copy of the device configuration"}, "kind": "container", "mandatory": true, "name": "config", "qname": "ncs:config", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Status data fetched from the device"}, "kind": "container", "mandatory": true, "name": "live-status", "qname": "ncs:live-status", "is_config_false_callpoint": true, "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "RPCs from the device"}, "kind": "container", "mandatory": true, "name": "rpc", "qname": "ncs:rpc", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "NETCONF notifications from the device"}, "kind": "container", "mandatory": true, "name": "netconf-notifications", "qname": "ncs:netconf-notifications", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Show services that use this device"}, "kind": "leaf-list", "name": "service-list", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t101"}, "qname": "ncs:service-list", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "Notification address if different from device address"}, "kind": "leaf", "name": "snmp-notification-address", "qname": "ncs:snmp-notification-address", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "name": "host"}}, {"info": {"string": "Device specific information"}, "kind": "container", "name": "platform", "presence": true, "when_targets": ["/ncs:devices/device/device-type/cli/ned-id"], "qname": "alu-meta:platform", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}}, {"info": {"string": "A summary of all active alarms per device."}, "kind": "container", "mandatory": true, "name": "alarm-summary", "qname": "al:alarm-summary", "is_config_false_callpoint": true, "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "Note: this action overwrites existing list of capabilities.\n\nThis action copies the list of capabilities and the list of modules\nfrom another device or profile. When used on a device, this action\nis only intended to be used for pre-provisioning: it is not possible\nto override capabilities and modules provided by the\nNED implementation using this action."}, "kind": "action", "mandatory": true, "name": "copy-capabilities", "qname": "ncs:copy-capabilities", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Note: this action overwrites existing list of capabilities.\n\nThis action populates the list of capabilities based on the\nconfigured ned-id for this device, if possible. NCS will look up\nthe package corresponding to the ned-id and add all the modules\nfrom this packages to the list of this device's capabilities and\nlist of modules. It is the responsibility of the caller to verify\nthat the automatically populated list of capabilities matches actual\ndevice's capabilities. The list of capabilities can then be\nfine-tuned using add-capability and capability/remove actions.\nCurrently this approach will only work for CLI and generic devices.\nThis action is only intended to be used for pre-provisioning:\nit is not possible to override capabilities and modules provided\nby the NED implementation using this action."}, "kind": "action", "mandatory": true, "name": "find-capabilities", "qname": "ncs:find-capabilities", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "This action adds a capability to the list of capabilities.\nIf uri is specified, then it is parsed as YANG capability string\nand module, revision, feature and deviation parameters are derived\nfrom the string. If module is specified, then the namespace is\nlooked up in the list of loaded namespaces and capability string\nconstructed automatically. If the module is specified and the\nattempt to look it up failed, then the action does nothing.\nIf module is specified or can be derived from capability string,\nthen the module is also added/replaced in the list of modules. This\naction is only intended to be used for pre-provisioning: it is not\npossible to override capabilities and modules provided by the NED\nimplementation using this action."}, "kind": "action", "mandatory": true, "name": "add-capability", "qname": "ncs:add-capability", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Take a named template and copy it here"}, "kind": "action", "mandatory": true, "name": "apply-template", "leafrefGroups": [["template-name"]], "qname": "ncs:apply-template", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "leafref_groups": [["template-name"]]}, {"info": {"string": "Instantiate the config for the device from existing device"}, "kind": "action", "mandatory": true, "name": "instantiate-from-other-device", "leafrefGroups": [["device-name"]], "qname": "ncs:instantiate-from-other-device", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "leafref_groups": [["device-name"]]}, {"info": {"string": "Compare the actual device config with the NCS copy"}, "kind": "action", "mandatory": true, "name": "compare-config", "qname": "ncs:compare-config", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Synchronize the config by pulling from the device"}, "kind": "action", "mandatory": true, "name": "sync-from", "qname": "ncs:sync-from", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Synchronize the config by pushing to the device"}, "kind": "action", "mandatory": true, "name": "sync-to", "qname": "ncs:sync-to", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Check if the NCS config is in sync with the device"}, "kind": "action", "mandatory": true, "name": "check-sync", "qname": "ncs:check-sync", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Check if NCS and the device have compatible YANG modules"}, "kind": "action", "mandatory": true, "name": "check-yang-modules", "qname": "ncs:check-yang-modules", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Connect to the device"}, "kind": "action", "mandatory": true, "name": "connect", "qname": "ncs:connect", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Close all sessions to the device"}, "kind": "action", "mandatory": true, "name": "disconnect", "qname": "ncs:disconnect", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "ICMP ping the device"}, "kind": "action", "mandatory": true, "name": "ping", "qname": "ncs:ping", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Delete the config in NCS without deleting it in the device"}, "kind": "action", "mandatory": true, "name": "delete-config", "qname": "ncs:delete-config", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Secure copy file to the device"}, "kind": "action", "mandatory": true, "name": "scp-to", "qname": "ncs:scp-to", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Secure copy file to the device"}, "kind": "action", "mandatory": true, "name": "scp-from", "qname": "ncs:scp-from", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["name"], "min_elements": 0, "leafrefGroups": [["remote-node"], ["authgroup"], ["device-profile"]]}}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/devices_schema.json b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/devices_schema.json
new file mode 100644
index 00000000..541ba010
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/devices_schema.json
@@ -0,0 +1 @@
+{"meta": {"prefix": "ncs", "namespace": "http://tail-f.com/ns/ncs", "types": {"http://tail-f.com/ns/ncs:t68": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t68"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t85": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t85"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t83": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t83"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t60": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t60"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t101": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t101"}], "leaf_type": [{"name": "string"}]}], "urn:ietf:params:xml:ns:yang:ietf-inet-types:host": [{"union": [[{"name": "urn:ietf:params:xml:ns:yang:ietf-inet-types:ip-address"}, {"name": "ip-address"}], [{"max-length": {"value": 253}, "min-length": {"value": 1}, "name": "urn:ietf:params:xml:ns:yang:ietf-inet-types:domain-name", "pattern": {"value": "((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\."}}, {"name": "string"}]]}], "http://tail-f.com/ns/ncs:trace-flag": [{"name": "http://tail-f.com/ns/ncs:trace-flag", "enumeration": [{"info": "Trace is disabled", "label": "false"}, {"info": "Raw, unformatted data", "label": "raw"}, {"info": "Pretty-printed data", "label": "pretty"}]}, {"name": "string"}], "http://tail-f.com/ns/ncs:t43": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t43"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t27": [{"range": {"value": [["1", "4294967"]]}, "name": "http://tail-f.com/ns/ncs:t27"}, {"name": "uint32"}], "http://tail-f.com/ns/ncs:t40": [{"name": "http://tail-f.com/ns/ncs:t40", "enumeration": [{"label": "reject"}, {"label": "accept"}]}, {"name": "string"}], "http://tail-f.com/ns/ncs:t47": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t47"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t45": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t45"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t49": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t49"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t29": [{"range": {"value": [["1", "4294967"]]}, "name": "http://tail-f.com/ns/ncs:t29"}, {"name": "uint32"}], "http://tail-f.com/ns/ncs:t28": [{"range": {"value": [["1", "4294967"]]}, "name": "http://tail-f.com/ns/ncs:t28"}, {"name": "uint32"}], "http://tail-f.com/ns/ncs:node-name": [{"name": "http://tail-f.com/ns/ncs:node-name"}, {"max-length": {"value": 253}, "min-length": {"value": 1}, "name": "urn:ietf:params:xml:ns:yang:ietf-inet-types:domain-name", "pattern": {"value": "((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\."}}, {"name": "string"}], "http://tail-f.com/ns/ncs:t74": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t74"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t72": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t72"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t70": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t70"}], "leaf_type": [{"name": "string"}]}], "urn:ietf:params:xml:ns:yang:ietf-inet-types:port-number": [{"range": {"value": [["0", "65535"]]}, "name": "urn:ietf:params:xml:ns:yang:ietf-inet-types:port-number"}, {"name": "uint16"}], "http://tail-f.com/ns/ncs:t56": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t56"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:t58": [{"list_type": [{"leaf-list": true, "name": "http://tail-f.com/ns/ncs:t58"}], "leaf_type": [{"name": "string"}]}]}, "keypath": "/ncs:devices"}, "data": {"info": {"string": "The managed devices and device communication settings"}, "kind": "container", "mandatory": true, "name": "devices", "contains_when_statement": true, "qname": "ncs:devices", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "children": [{"info": {"string": "Global settings for all managed devices."}, "kind": "container", "mandatory": true, "name": "global-settings", "qname": "ncs:global-settings", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Device profile parameters"}, "kind": "container", "mandatory": true, "name": "profiles", "qname": "ncs:profiles", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Authentication for managed devices"}, "kind": "container", "mandatory": true, "name": "authgroups", "qname": "ncs:authgroups", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Named configuration templates for devices"}, "kind": "list", "min_elements": 0, "name": "template", "max_elements": "unbounded", "qname": "ncs:template", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["name"], "mandatory": true, "children": [{"info": {"string": "The name of a specific template configuration."}, "kind": "key", "mandatory": true, "name": "name", "qname": "ncs:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"info": {"string": "This container is augmented with data models from the devices."}, "kind": "container", "mandatory": true, "name": "config", "qname": "ncs:config", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}]}, {"info": {"string": "Groups of devices"}, "kind": "list", "leafref_groups": [["device-name"], ["device-group"], ["member"]], "min_elements": 0, "name": "device-group", "max_elements": "unbounded", "qname": "ncs:device-group", "children": [{"kind": "key", "mandatory": true, "name": "name", "qname": "ncs:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"info": {"string": "Physical location of devices in the group"}, "kind": "container", "mandatory": true, "name": "location", "qname": "ncs:location", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Device within group"}, "kind": "leaf-list", "name": "device-name", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t56"}, "qname": "ncs:device-name", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/ncs:devices/device/name", "is_leafref": true}, {"info": {"string": "Group within group"}, "kind": "leaf-list", "name": "device-group", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t58"}, "qname": "ncs:device-group", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/ncs:devices/device-group/name", "is_leafref": true}, {"info": {"string": "Flattened list of all members"}, "kind": "leaf-list", "name": "member", "is_leafref": true, "qname": "ncs:member", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "leafref_target": "/ncs:devices/device/name", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t60"}, "config": false}, {"info": {"string": "RPCs from the device's"}, "kind": "container", "mandatory": true, "name": "rpc", "qname": "ncs:rpc", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "A summary of all active alarms per device group."}, "kind": "container", "mandatory": true, "name": "alarm-summary", "qname": "al:alarm-summary", "is_config_false_callpoint": true, "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "Set up sessions to all unlocked devices"}, "kind": "action", "mandatory": true, "name": "connect", "qname": "ncs:connect", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Synchronize the config by pushing to the devices"}, "kind": "action", "mandatory": true, "name": "sync-to", "qname": "ncs:sync-to", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Synchronize the config by pulling from the devices"}, "kind": "action", "mandatory": true, "name": "sync-from", "qname": "ncs:sync-from", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Check if the NCS config is in sync with the device"}, "kind": "action", "mandatory": true, "name": "check-sync", "qname": "ncs:check-sync", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Check if NCS and the devices have compatible YANG modules"}, "kind": "action", "mandatory": true, "name": "check-yang-modules", "qname": "ncs:check-yang-modules", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Retrieve SSH host keys from all devices"}, "kind": "action", "mandatory": true, "name": "fetch-ssh-host-keys", "qname": "ncs:fetch-ssh-host-keys", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Take a named template and copy it here"}, "kind": "action", "mandatory": true, "name": "apply-template", "leafrefGroups": [["template-name"]], "qname": "ncs:apply-template", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "leafref_groups": [["template-name"]]}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["name"], "mandatory": true, "leafrefGroups": [["device-name"], ["device-group"], ["member"]]}, {"info": {"string": "A list of named groups of MIBs"}, "kind": "list", "leafref_groups": [["mib-group"]], "min_elements": 0, "name": "mib-group", "max_elements": "unbounded", "qname": "ncs:mib-group", "children": [{"info": {"string": "An arbitrary name of the MIB group."}, "kind": "key", "mandatory": true, "name": "name", "qname": "ncs:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"info": {"string": "MIB module names or name prefixes"}, "kind": "leaf-list", "name": "mib-module", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t68"}, "qname": "ncs:mib-module", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/ncs:devices/device-module/mib-module", "is_leafref": true}, {"info": {"string": "A list of MIB groups contained in this MIB group"}, "kind": "leaf-list", "name": "mib-group", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t70"}, "qname": "ncs:mib-group", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/ncs:devices/mib-group/name", "is_leafref": true}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["name"], "mandatory": true, "leafrefGroups": [["mib-group"]]}, {"info": {"string": "List the devices and supported modules"}, "kind": "list", "min_elements": 0, "name": "device-module", "max_elements": "unbounded", "qname": "ncs:device-module", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "key": ["name"], "mandatory": true, "config": false, "children": [{"info": {"string": "The module name"}, "kind": "key", "mandatory": true, "name": "name", "type": {"primitive": true, "name": "string"}, "qname": "ncs:name", "is_config_false_callpoint": true, "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "The module revision"}, "kind": "leaf-list", "name": "revision", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t72"}, "qname": "ncs:revision", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "The XML namespace uri for the module"}, "kind": "leaf", "name": "uri", "type": {"primitive": true, "name": "string"}, "qname": "ncs:uri", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "The names of the devices that support this module"}, "kind": "leaf-list", "name": "devices", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t74"}, "qname": "ncs:devices", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}]}, {"info": {"string": "The list of managed devices"}, "kind": "list", "leafref_groups": [["remote-node"], ["authgroup"], ["device-profile"]], "min_elements": 0, "name": "device", "max_elements": "unbounded", "qname": "ncs:device", "children": [{"info": {"string": "A string uniquely identifying the managed device"}, "kind": "key", "mandatory": true, "name": "name", "qname": "ncs:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"info": {"string": "IP address or host name for the management interface"}, "kind": "leaf", "name": "address", "qname": "ncs:address", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "name": "host"}}, {"info": {"string": "Port for the management interface"}, "kind": "leaf", "name": "port", "qname": "ncs:port", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "name": "port-number"}}, {"info": {"string": "Name of remote node which connects to device"}, "kind": "leaf", "name": "remote-node", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "node-name"}, "qname": "ncs:remote-node", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/ncs:cluster/remote-node/name", "is_leafref": true}, {"info": {"string": "SSH connection configuration"}, "kind": "container", "mandatory": true, "name": "ssh", "qname": "ncs:ssh", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Free form textual description"}, "kind": "leaf", "name": "description", "qname": "ncs:description", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"primitive": true, "name": "string"}}, {"info": {"string": "Physical location of devices in the group"}, "kind": "container", "mandatory": true, "name": "location", "qname": "ncs:location", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Authentication credentials for the device"}, "kind": "leaf", "name": "authgroup", "type": {"primitive": true, "name": "string"}, "qname": "ncs:authgroup", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/ncs:devices/authgroups/group/name", "is_leafref": true}, {"info": {"string": "Management protocol for the device"}, "kind": "container", "mandatory": true, "name": "device-type", "qname": "ncs:device-type", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"kind": "leaf", "name": "device-profile", "type": {"primitive": true, "name": "string"}, "qname": "ncs:device-profile", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/ncs:devices/profiles/profile/name", "is_leafref": true}, {"info": {"string": "Timeout in seconds for new connections"}, "kind": "leaf", "name": "connect-timeout", "qname": "ncs:connect-timeout", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "units": "seconds", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t27"}}, {"info": {"string": "Timeout in seconds used when reading data"}, "kind": "leaf", "name": "read-timeout", "qname": "ncs:read-timeout", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "units": "seconds", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t28"}}, {"info": {"string": "Timeout in seconds used when writing data"}, "kind": "leaf", "name": "write-timeout", "qname": "ncs:write-timeout", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "units": "seconds", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t29"}}, {"info": {"string": "Controls SSH keep alive settings"}, "kind": "container", "mandatory": true, "name": "ssh-keep-alive", "qname": "ncs:ssh-keep-alive", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Trace the southbound communication to devices"}, "kind": "leaf", "name": "trace", "qname": "ncs:trace", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "trace-flag"}}, {"info": {"string": "Control which device capabilities NCS uses"}, "kind": "container", "mandatory": true, "name": "ned-settings", "qname": "ncs:ned-settings", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Control settings for the commit-queue"}, "kind": "container", "mandatory": true, "name": "commit-queue", "qname": "ncs:commit-queue", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Control how sessions to related devices can be pooled."}, "kind": "container", "mandatory": true, "name": "session-pool", "qname": "ncs:session-pool", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Control settings for no-overwrite sync check"}, "kind": "container", "mandatory": true, "name": "no-overwrite", "qname": "ncs:no-overwrite", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Specifies the behaviour of a commit operation involving a\ndevice that is out of sync with NCS. Value accept assumes that\nthe device's sync state is unknown and it is cleared on commit.\nThe default behaviour is to reject such commits."}, "kind": "leaf", "name": "out-of-sync-commit-behaviour", "qname": "ncs:out-of-sync-commit-behaviour", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t40"}}, {"default": "use-lsa", "kind": "choice", "cases": [{"kind": "case", "name": "use-lsa", "children": [{"info": {"string": "Handle the LSA nodes as such. This is the default"}, "kind": "leaf", "name": "use-lsa", "qname": "ncs:use-lsa", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"primitive": true, "name": "empty"}}]}, {"kind": "case", "name": "no-lsa", "children": [{"info": {"string": "Do not handle any of the LSA nodes as such. These nodes\nwill be handled as any other device. This has the same\nresult as adding the commit flag 'no-lsa' to every commit."}, "kind": "leaf", "name": "no-lsa", "qname": "ncs:no-lsa", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"primitive": true, "name": "empty"}}]}], "name": "choice-lsa"}, {"info": {"string": "Show all active settings for the device"}, "kind": "container", "mandatory": true, "name": "active-settings", "qname": "ncs:active-settings", "is_config_false_callpoint": true, "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "Additional protocols for the live-tree (read-only)"}, "kind": "list", "leafref_groups": [["authgroup"]], "min_elements": 0, "name": "live-status-protocol", "max_elements": "unbounded", "qname": "ncs:live-status-protocol", "children": [{"kind": "key", "mandatory": true, "name": "name", "qname": "ncs:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"info": {"string": "IP Address for the management interface"}, "kind": "leaf", "name": "address", "qname": "ncs:address", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "name": "host"}}, {"info": {"string": "Port for the management interface"}, "kind": "leaf", "name": "port", "qname": "ncs:port", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "name": "port-number"}}, {"info": {"string": "SSH host key configuration"}, "kind": "container", "name": "ssh", "presence": true, "qname": "ncs:ssh", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}}, {"info": {"string": "Authentication credentials for the device"}, "kind": "leaf", "name": "authgroup", "type": {"primitive": true, "name": "string"}, "qname": "ncs:authgroup", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/ncs:devices/authgroups/group/name", "is_leafref": true}, {"info": {"string": "Management protocol for the device"}, "kind": "container", "mandatory": true, "name": "device-type", "qname": "ncs:device-type", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Operational State for the live protocol"}, "kind": "container", "mandatory": true, "name": "state", "qname": "ncs:state", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "List of capabillities supported by the device"}, "kind": "list", "min_elements": 0, "name": "capability", "max_elements": "unbounded", "qname": "ncs:capability", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "key": ["uri"], "mandatory": true, "config": false, "children": [{"info": {"string": "Capability URI"}, "kind": "key", "mandatory": true, "name": "uri", "type": {"primitive": true, "name": "string"}, "qname": "ncs:uri", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "Capability revision"}, "kind": "leaf", "name": "revision", "type": {"primitive": true, "name": "string"}, "qname": "ncs:revision", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "Capability module"}, "kind": "leaf", "name": "module", "type": {"primitive": true, "name": "string"}, "qname": "ncs:module", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "Capability features"}, "kind": "leaf-list", "name": "feature", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t83"}, "qname": "ncs:feature", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "Capability deviations"}, "kind": "leaf-list", "name": "deviation", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t85"}, "qname": "ncs:deviation", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}]}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["name"], "mandatory": true, "leafrefGroups": [["authgroup"]]}, {"info": {"string": "Show states for the device"}, "kind": "container", "mandatory": true, "name": "state", "qname": "ncs:state", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "How the device was added to NCS"}, "kind": "container", "mandatory": true, "name": "source", "qname": "ncs:source", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "A list of capabilities supported by the device"}, "kind": "list", "min_elements": 0, "name": "capability", "max_elements": "unbounded", "qname": "ncs:capability", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "key": ["uri"], "mandatory": true, "config": false, "children": [{"kind": "key", "mandatory": true, "name": "uri", "type": {"primitive": true, "name": "string"}, "qname": "ncs:uri", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"kind": "leaf", "name": "revision", "config": false, "qname": "ncs:revision", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf", "name": "module", "config": false, "qname": "ncs:module", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf-list", "name": "feature", "config": false, "qname": "ncs:feature", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t43"}}, {"kind": "leaf-list", "name": "deviation", "config": false, "qname": "ncs:deviation", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t45"}}, {"info": {"string": "This action removes a capability from the list of capabilities.\nIf leaf module is set then corresponding module is attempted to\nbe removed from the list of modules for this device. This action\nis only intended to be used for pre-provisioning: it is not\npossible to override capabilities and modules provided by the\nNED implementation using this action."}, "kind": "action", "mandatory": true, "name": "remove", "qname": "ncs:remove", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}]}, {"info": {"string": "This is a list of the YANG modules supported by the device.\n\nThis list is populated the first time NCS connects to the\ndevice."}, "kind": "list", "min_elements": 0, "name": "module", "max_elements": "unbounded", "qname": "ncs:module", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "key": ["name"], "mandatory": true, "config": false, "children": [{"kind": "key", "mandatory": true, "name": "name", "type": {"primitive": true, "name": "string"}, "qname": "ncs:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"kind": "leaf", "name": "revision", "config": false, "qname": "ncs:revision", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf-list", "name": "feature", "config": false, "qname": "ncs:feature", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t47"}}, {"kind": "leaf-list", "name": "deviation", "config": false, "qname": "ncs:deviation", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t49"}}]}, {"info": {"string": "Contains vendor-specific information for\nidentifying the system platform.\n\nNEDs MAY augment this container with more device-specific\nnodes."}, "kind": "container", "mandatory": true, "name": "platform", "qname": "ncs:platform", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "NCS copy of the device configuration"}, "kind": "container", "mandatory": true, "name": "config", "qname": "ncs:config", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Status data fetched from the device"}, "kind": "container", "mandatory": true, "name": "live-status", "qname": "ncs:live-status", "is_config_false_callpoint": true, "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "RPCs from the device"}, "kind": "container", "mandatory": true, "name": "rpc", "qname": "ncs:rpc", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "NETCONF notifications from the device"}, "kind": "container", "mandatory": true, "name": "netconf-notifications", "qname": "ncs:netconf-notifications", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}}, {"info": {"string": "Show services that use this device"}, "kind": "leaf-list", "name": "service-list", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "t101"}, "qname": "ncs:service-list", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "Notification address if different from device address"}, "kind": "leaf", "name": "snmp-notification-address", "qname": "ncs:snmp-notification-address", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "name": "host"}}, {"info": {"string": "Device specific information"}, "kind": "container", "name": "platform", "presence": true, "when_targets": ["/ncs:devices/device/device-type/cli/ned-id"], "qname": "alu-meta:platform", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}}, {"info": {"string": "A summary of all active alarms per device."}, "kind": "container", "mandatory": true, "name": "alarm-summary", "qname": "al:alarm-summary", "is_config_false_callpoint": true, "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "Note: this action overwrites existing list of capabilities.\n\nThis action copies the list of capabilities and the list of modules\nfrom another device or profile. When used on a device, this action\nis only intended to be used for pre-provisioning: it is not possible\nto override capabilities and modules provided by the\nNED implementation using this action."}, "kind": "action", "mandatory": true, "name": "copy-capabilities", "qname": "ncs:copy-capabilities", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Note: this action overwrites existing list of capabilities.\n\nThis action populates the list of capabilities based on the\nconfigured ned-id for this device, if possible. NCS will look up\nthe package corresponding to the ned-id and add all the modules\nfrom this packages to the list of this device's capabilities and\nlist of modules. It is the responsibility of the caller to verify\nthat the automatically populated list of capabilities matches actual\ndevice's capabilities. The list of capabilities can then be\nfine-tuned using add-capability and capability/remove actions.\nCurrently this approach will only work for CLI and generic devices.\nThis action is only intended to be used for pre-provisioning:\nit is not possible to override capabilities and modules provided\nby the NED implementation using this action."}, "kind": "action", "mandatory": true, "name": "find-capabilities", "qname": "ncs:find-capabilities", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "This action adds a capability to the list of capabilities.\nIf uri is specified, then it is parsed as YANG capability string\nand module, revision, feature and deviation parameters are derived\nfrom the string. If module is specified, then the namespace is\nlooked up in the list of loaded namespaces and capability string\nconstructed automatically. If the module is specified and the\nattempt to look it up failed, then the action does nothing.\nIf module is specified or can be derived from capability string,\nthen the module is also added/replaced in the list of modules. This\naction is only intended to be used for pre-provisioning: it is not\npossible to override capabilities and modules provided by the NED\nimplementation using this action."}, "kind": "action", "mandatory": true, "name": "add-capability", "qname": "ncs:add-capability", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Take a named template and copy it here"}, "kind": "action", "mandatory": true, "name": "apply-template", "leafrefGroups": [["template-name"]], "qname": "ncs:apply-template", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "leafref_groups": [["template-name"]]}, {"info": {"string": "Instantiate the config for the device from existing device"}, "kind": "action", "mandatory": true, "name": "instantiate-from-other-device", "leafrefGroups": [["device-name"]], "qname": "ncs:instantiate-from-other-device", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "leafref_groups": [["device-name"]]}, {"info": {"string": "Compare the actual device config with the NCS copy"}, "kind": "action", "mandatory": true, "name": "compare-config", "qname": "ncs:compare-config", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Synchronize the config by pulling from the device"}, "kind": "action", "mandatory": true, "name": "sync-from", "qname": "ncs:sync-from", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Synchronize the config by pushing to the device"}, "kind": "action", "mandatory": true, "name": "sync-to", "qname": "ncs:sync-to", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Check if the NCS config is in sync with the device"}, "kind": "action", "mandatory": true, "name": "check-sync", "qname": "ncs:check-sync", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Check if NCS and the device have compatible YANG modules"}, "kind": "action", "mandatory": true, "name": "check-yang-modules", "qname": "ncs:check-yang-modules", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Connect to the device"}, "kind": "action", "mandatory": true, "name": "connect", "qname": "ncs:connect", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Close all sessions to the device"}, "kind": "action", "mandatory": true, "name": "disconnect", "qname": "ncs:disconnect", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "ICMP ping the device"}, "kind": "action", "mandatory": true, "name": "ping", "qname": "ncs:ping", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Delete the config in NCS without deleting it in the device"}, "kind": "action", "mandatory": true, "name": "delete-config", "qname": "ncs:delete-config", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Secure copy file to the device"}, "kind": "action", "mandatory": true, "name": "scp-to", "qname": "ncs:scp-to", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Secure copy file to the device"}, "kind": "action", "mandatory": true, "name": "scp-from", "qname": "ncs:scp-from", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["name"], "mandatory": true, "leafrefGroups": [["remote-node"], ["authgroup"], ["device-profile"]]}, {"info": {"string": "List of queued and completed commits"}, "kind": "container", "mandatory": true, "name": "commit-queue", "qname": "ncs:commit-queue", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "List of pooled NED sessions"}, "kind": "container", "mandatory": true, "name": "session-pool", "qname": "ncs:session-pool", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"info": {"string": "Set up sessions to all unlocked devices"}, "kind": "action", "mandatory": true, "name": "connect", "leafrefGroups": [["device"]], "qname": "ncs:connect", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "leafref_groups": [["device"]]}, {"info": {"string": "Synchronize the config by pushing to the devices"}, "kind": "action", "mandatory": true, "name": "sync-to", "leafrefGroups": [["device"]], "qname": "ncs:sync-to", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "leafref_groups": [["device"]]}, {"info": {"string": "Synchronize the config by pulling from the devices"}, "kind": "action", "mandatory": true, "name": "sync-from", "leafrefGroups": [["device"]], "qname": "ncs:sync-from", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "leafref_groups": [["device"]]}, {"info": {"string": "Close all sessions to all devices"}, "kind": "action", "mandatory": true, "name": "disconnect", "qname": "ncs:disconnect", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Check if the NCS config is in sync with the device"}, "kind": "action", "mandatory": true, "name": "check-sync", "leafrefGroups": [["device"]], "qname": "ncs:check-sync", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "leafref_groups": [["device"]]}, {"info": {"string": "Check if NCS and the devices have compatible YANG modules"}, "kind": "action", "mandatory": true, "name": "check-yang-modules", "leafrefGroups": [["device"]], "qname": "ncs:check-yang-modules", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "leafref_groups": [["device"]]}, {"info": {"string": "Retrieve SSH host keys from all devices"}, "kind": "action", "mandatory": true, "name": "fetch-ssh-host-keys", "leafrefGroups": [["device"]], "qname": "ncs:fetch-ssh-host-keys", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "leafref_groups": [["device"]]}, {"info": {"string": "Clear all trace files"}, "kind": "action", "mandatory": true, "name": "clear-trace", "qname": "ncs:clear-trace", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Synchronize parts of the devices' configuration by pulling from\nthe network."}, "kind": "action", "mandatory": true, "name": "partial-sync-from", "qname": "ncs:partial-sync-from", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}]}}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/l3vpn_l3vpn_endpoint_schema.json b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/l3vpn_l3vpn_endpoint_schema.json
new file mode 100644
index 00000000..0330aeb9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/l3vpn_l3vpn_endpoint_schema.json
@@ -0,0 +1 @@
+{"meta": {"prefix": "l3vpn", "namespace": "http://com/example/l3vpn", "types": {}, "keypath": "/l3vpn:vpn/l3vpn/endpoint"}, "data": {"kind": "list", "leafref_groups": [["ce-device"]], "min_elements": 0, "name": "endpoint", "max_elements": "unbounded", "qname": "l3vpn:endpoint", "children": [{"info": {"string": "Endpoint identifier"}, "kind": "key", "mandatory": true, "name": "id", "qname": "l3vpn:id", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf", "mandatory": true, "name": "ce-device", "type": {"primitive": true, "name": "string"}, "qname": "l3vpn:ce-device", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "leafref_target": "/ncs:devices/device/name", "is_leafref": true}, {"kind": "leaf", "mandatory": true, "name": "ce-interface", "qname": "l3vpn:ce-interface", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf", "mandatory": true, "name": "ip-network", "qname": "l3vpn:ip-network", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "ip-prefix"}}, {"info": {"string": "Bandwidth in bps"}, "kind": "leaf", "mandatory": true, "name": "bandwidth", "qname": "l3vpn:bandwidth", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "uint32"}}, {"info": {"string": "CE Router as-number"}, "kind": "leaf", "name": "as-number", "qname": "l3vpn:as-number", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"primitive": true, "name": "uint32"}}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["id"], "mandatory": true, "leafrefGroups": [["ce-device"]]}}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/l3vpn_l3vpn_schema.json b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/l3vpn_l3vpn_schema.json
new file mode 100644
index 00000000..2737e7a5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/l3vpn_l3vpn_schema.json
@@ -0,0 +1 @@
+{"meta": {"prefix": "l3vpn", "namespace": "http://com/example/l3vpn", "types": {"http://com/example/l3vpn:t19": [{"list_type": [{"leaf-list": true, "name": "http://com/example/l3vpn:t19"}], "leaf_type": [{"name": "instance-identifier"}]}], "urn:ietf:params:xml:ns:yang:ietf-inet-types:port-number": [{"range": {"value": [["0", "65535"]]}, "name": "urn:ietf:params:xml:ns:yang:ietf-inet-types:port-number"}, {"name": "uint16"}], "http://tail-f.com/ns/ncs:outformat-deep-check-sync": [{"name": "http://tail-f.com/ns/ncs:outformat-deep-check-sync", "enumeration": [{"info": "The CLI config that would have to be applied\nto the device(s) in order for the service to\nbecome in sync with the network.", "label": "cli"}, {"info": "The XML (NETCONF format) that would have to be\napplied to the device(s) in order for the service to\nbecome in sync with the network.", "label": "xml"}, {"info": "Returns if the service is in sync or not.", "label": "boolean"}]}, {"name": "string"}], "http://com/example/l3vpn:t21": [{"list_type": [{"leaf-list": true, "name": "http://com/example/l3vpn:t21"}], "leaf_type": [{"name": "string"}]}], "http://com/example/l3vpn:t15": [{"list_type": [{"leaf-list": true, "name": "http://com/example/l3vpn:t15"}], "leaf_type": [{"name": "string"}]}], "http://com/example/l3vpn:protocol-type": [{"name": "http://com/example/l3vpn:protocol-type", "enumeration": [{"label": "icmp"}, {"label": "igmp"}, {"label": "ipip"}, {"label": "tcp"}, {"label": "egp"}, {"label": "udp"}, {"label": "rsvp"}, {"label": "gre"}, {"label": "esp"}, {"label": "ah"}, {"label": "icmp6"}, {"label": "ospf"}, {"label": "pim"}, {"label": "sctp"}]}, {"name": "string"}], "http://com/example/l3vpn:t17": [{"list_type": [{"leaf-list": true, "name": "http://com/example/l3vpn:t17"}], "leaf_type": [{"name": "instance-identifier"}]}], "http://com/example/l3vpn:t23": [{"list_type": [{"leaf-list": true, "name": "http://com/example/l3vpn:t23"}], "leaf_type": [{"name": "string"}]}], "http://com/example/l3vpn:t11": [{"list_type": [{"leaf-list": true, "name": "http://com/example/l3vpn:t11"}], "leaf_type": [{"name": "instance-identifier"}]}], "http://com/example/l3vpn:t13": [{"list_type": [{"leaf-list": true, "name": "http://com/example/l3vpn:t13"}], "leaf_type": [{"name": "instance-identifier"}]}], "http://com/example/l3vpn:t24": [{"name": "http://com/example/l3vpn:t24", "enumeration": [{"label": "waiting"}, {"label": "executing"}, {"label": "blocking"}, {"label": "blocked"}, {"label": "failed"}, {"label": "admin-cleared"}, {"label": "commit-queue-failed"}]}, {"name": "string"}], "http://tail-f.com/ns/ncs:log-entry-t": [{"info": "This leaf identifies the specific log entry.", "name": "http://tail-f.com/ns/ncs:log-entry-t", "enumeration": [{"label": "device-modified"}, {"label": "service-modified"}]}, {"name": "identityref"}], "http://com/example/l3vpn:t7": [{"name": "http://com/example/l3vpn:t7", "enumeration": [{"label": "async"}, {"label": "timeout"}, {"label": "deleted"}]}, {"name": "string"}], "http://com/example/l3vpn:qos-match-type": [{"union": [[{"name": "ipv4-address-and-prefix-length"}], [{"name": "http://com/example/l3vpn:t2", "enumeration": [{"label": "any"}]}, {"name": "string"}]]}], "http://com/example/l3vpn:t9": [{"list_type": [{"leaf-list": true, "name": "http://com/example/l3vpn:t9"}], "leaf_type": [{"name": "string"}]}], "http://tail-f.com/ns/ncs:outformat4": [{"name": "http://tail-f.com/ns/ncs:outformat4", "enumeration": [{"info": "NCS CLI curly bracket format.", "label": "cli"}, {"info": "NETCONF XML edit-config format, i.e., the edit-config that\nwould be applied locally (at NCS) to get a config\nthat is equal to that of the managed device.", "label": "xml"}, {"info": "The actual data in native format that would be sent to\nthe device", "label": "native"}, {"label": "boolean"}]}, {"name": "string"}], "http://tail-f.com/ns/ncs:log-entry-level-t": [{"info": "Levels used for identifying the severity of an event.\nLevels are organized from least specific to most where\n'all' is least specific and 'error' is most specific.", "name": "http://tail-f.com/ns/ncs:log-entry-level-t", "enumeration": [{"label": "all"}, {"label": "trace"}, {"label": "debug"}, {"label": "info"}, {"label": "warn"}, {"label": "error"}]}, {"name": "string"}], "http://tail-f.com/ns/ncs:outformat2": [{"name": "http://tail-f.com/ns/ncs:outformat2", "enumeration": [{"info": "NCS CLI curly bracket format.", "label": "cli"}, {"info": "NETCONF XML edit-config format, i.e., the edit-config that\nwould be applied locally (at NCS) to get a config\nthat is equal to that of the managed device.", "label": "xml"}]}, {"name": "string"}]}, "keypath": "/l3vpn:vpn/l3vpn"}, "data": {"kind": "list", "leafref_groups": [["used-by-customer-service"]], "min_elements": 0, "name": "l3vpn", "max_elements": "unbounded", "qname": "l3vpn:l3vpn", "children": [{"info": {"string": "Unique service id"}, "kind": "key", "mandatory": true, "name": "name", "qname": "l3vpn:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"info": {"string": "Devices and other services this service modified directly or\nindirectly."}, "kind": "container", "mandatory": true, "name": "modified", "leafrefGroups": [["devices"]], "qname": "l3vpn:modified", "is_config_false_callpoint": true, "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "leafref_groups": [["devices"]], "config": false, "children": [{"info": {"string": "Devices this service modified directly or indirectly"}, "kind": "leaf-list", "name": "devices", "is_leafref": true, "qname": "l3vpn:devices", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "leafref_target": "/ncs:devices/device/name", "type": {"namespace": "http://com/example/l3vpn", "name": "t9"}, "config": false}, {"info": {"string": "Services this service modified directly or indirectly"}, "kind": "leaf-list", "name": "services", "type": {"namespace": "http://com/example/l3vpn", "name": "t11"}, "qname": "l3vpn:services", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "Services residing on remote LSA nodes this service\nhas modified directly or indirectly."}, "kind": "leaf-list", "name": "lsa-services", "type": {"namespace": "http://com/example/l3vpn", "name": "t13"}, "qname": "l3vpn:lsa-services", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}]}, {"info": {"string": "Devices and other services this service has explicitly\nmodified."}, "kind": "container", "mandatory": true, "name": "directly-modified", "leafrefGroups": [["devices"]], "qname": "l3vpn:directly-modified", "is_config_false_callpoint": true, "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "leafref_groups": [["devices"]], "config": false, "children": [{"info": {"string": "Devices this service has explicitly modified."}, "kind": "leaf-list", "name": "devices", "is_leafref": true, "qname": "l3vpn:devices", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "leafref_target": "/ncs:devices/device/name", "type": {"namespace": "http://com/example/l3vpn", "name": "t15"}, "config": false}, {"info": {"string": "Services this service has explicitly modified."}, "kind": "leaf-list", "name": "services", "type": {"namespace": "http://com/example/l3vpn", "name": "t17"}, "qname": "l3vpn:services", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "Services residing on remote LSA nodes this service\nhas explicitly modified."}, "kind": "leaf-list", "name": "lsa-services", "type": {"namespace": "http://com/example/l3vpn", "name": "t19"}, "qname": "l3vpn:lsa-services", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}]}, {"info": {"string": "A list of devices this service instance has manipulated"}, "kind": "leaf-list", "name": "device-list", "type": {"namespace": "http://com/example/l3vpn", "name": "t21"}, "qname": "l3vpn:device-list", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "Customer facing services using this service"}, "kind": "leaf-list", "name": "used-by-customer-service", "is_leafref": true, "qname": "l3vpn:used-by-customer-service", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "leafref_target": "/ncs:services/customer-service/object-id", "type": {"namespace": "http://com/example/l3vpn", "name": "t23"}, "config": false}, {"kind": "container", "mandatory": true, "name": "commit-queue", "qname": "l3vpn:commit-queue", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false, "children": [{"kind": "list", "min_elements": 0, "name": "queue-item", "max_elements": "unbounded", "qname": "l3vpn:queue-item", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "key": ["id"], "mandatory": true, "config": false, "children": [{"kind": "key", "mandatory": true, "name": "id", "type": {"primitive": true, "name": "uint64"}, "qname": "l3vpn:id", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"kind": "leaf", "name": "status", "type": {"namespace": "http://com/example/l3vpn", "name": "t24"}, "qname": "l3vpn:status", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"kind": "list", "leafref_groups": [["name"]], "min_elements": 0, "name": "failed-device", "max_elements": "unbounded", "qname": "l3vpn:failed-device", "children": [{"kind": "key", "mandatory": true, "name": "name", "is_leafref": true, "qname": "l3vpn:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "leafref_target": "/ncs:devices/device/name", "type": {"primitive": true, "name": "string"}, "config": false}, {"kind": "leaf", "name": "time", "config": false, "qname": "l3vpn:time", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"primitive": true, "name": "date-and-time"}}, {"kind": "leaf", "name": "config-data", "is_cli_preformatted": true, "type": {"primitive": true, "name": "string"}, "qname": "l3vpn:config-data", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"kind": "leaf", "name": "error", "config": false, "qname": "l3vpn:error", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"primitive": true, "name": "string"}}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "key": ["name"], "mandatory": true, "config": false, "leafrefGroups": [["name"]]}, {"access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "kind": "action", "mandatory": true, "name": "admin-clear", "qname": "l3vpn:admin-clear"}, {"access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "kind": "action", "mandatory": true, "name": "delete", "qname": "l3vpn:delete"}]}, {"access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "kind": "action", "mandatory": true, "name": "clear", "qname": "l3vpn:clear"}]}, {"kind": "container", "mandatory": true, "name": "log", "qname": "l3vpn:log", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false, "children": [{"kind": "list", "min_elements": 0, "name": "log-entry", "max_elements": "unbounded", "qname": "l3vpn:log-entry", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "key": ["when"], "mandatory": true, "config": false, "children": [{"kind": "key", "mandatory": true, "name": "when", "type": {"primitive": true, "name": "date-and-time"}, "qname": "l3vpn:when", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"kind": "leaf", "mandatory": true, "name": "type", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "log-entry-t"}, "qname": "l3vpn:type", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"kind": "leaf", "mandatory": true, "name": "level", "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "log-entry-level-t"}, "qname": "l3vpn:level", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"kind": "leaf", "name": "message", "config": false, "qname": "l3vpn:message", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "type": {"primitive": true, "name": "string"}}]}, {"info": {"string": "Remove log entries"}, "kind": "action", "mandatory": true, "name": "purge", "qname": "l3vpn:purge", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}]}, {"kind": "leaf", "mandatory": true, "name": "route-distinguisher", "qname": "l3vpn:route-distinguisher", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "uint32"}}, {"kind": "list", "leafref_groups": [["ce-device"]], "min_elements": 0, "name": "endpoint", "max_elements": "unbounded", "qname": "l3vpn:endpoint", "children": [{"info": {"string": "Endpoint identifier"}, "kind": "key", "mandatory": true, "name": "id", "qname": "l3vpn:id", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf", "mandatory": true, "name": "ce-device", "type": {"primitive": true, "name": "string"}, "qname": "l3vpn:ce-device", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "leafref_target": "/ncs:devices/device/name", "is_leafref": true}, {"kind": "leaf", "mandatory": true, "name": "ce-interface", "qname": "l3vpn:ce-interface", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf", "mandatory": true, "name": "ip-network", "qname": "l3vpn:ip-network", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "ip-prefix"}}, {"info": {"string": "Bandwidth in bps"}, "kind": "leaf", "mandatory": true, "name": "bandwidth", "qname": "l3vpn:bandwidth", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "uint32"}}, {"info": {"string": "CE Router as-number"}, "kind": "leaf", "name": "as-number", "qname": "l3vpn:as-number", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"primitive": true, "name": "uint32"}}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["id"], "mandatory": true, "leafrefGroups": [["ce-device"]]}, {"kind": "container", "mandatory": true, "name": "qos", "leafrefGroups": [["qos-policy"]], "qname": "l3vpn:qos", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "leafref_groups": [["qos-policy"]], "children": [{"kind": "leaf", "name": "qos-policy", "type": {"primitive": true, "name": "string"}, "qname": "l3vpn:qos-policy", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "leafref_target": "/l3vpn:qos/qos-policy/name", "is_leafref": true}, {"kind": "list", "leafref_groups": [["qos-class"]], "min_elements": 0, "name": "custom-qos-match", "max_elements": "unbounded", "qname": "l3vpn:custom-qos-match", "children": [{"kind": "key", "mandatory": true, "name": "name", "qname": "l3vpn:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf", "mandatory": true, "name": "qos-class", "type": {"primitive": true, "name": "string"}, "qname": "l3vpn:qos-class", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "leafref_target": "/l3vpn:qos/qos-class/name", "is_leafref": true}, {"access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "kind": "leaf", "type": {"namespace": "http://com/example/l3vpn", "name": "qos-match-type"}, "name": "source-ip", "qname": "l3vpn:source-ip"}, {"access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "kind": "leaf", "type": {"namespace": "http://com/example/l3vpn", "name": "qos-match-type"}, "name": "destination-ip", "qname": "l3vpn:destination-ip"}, {"info": {"string": "Destination IP port"}, "kind": "leaf", "name": "port-start", "qname": "l3vpn:port-start", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "name": "port-number"}}, {"info": {"string": "Destination IP port"}, "kind": "leaf", "name": "port-end", "qname": "l3vpn:port-end", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types", "name": "port-number"}}, {"info": {"string": "Source IP protocol"}, "kind": "leaf", "name": "protocol", "qname": "l3vpn:protocol", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"namespace": "http://com/example/l3vpn", "name": "protocol-type"}}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["name"], "mandatory": true, "leafrefGroups": [["qos-class"]]}]}, {"info": {"string": "Check if device config is according to the service"}, "kind": "action", "mandatory": true, "name": "check-sync", "qname": "l3vpn:check-sync", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "children": [{"kind": "leaf", "is_action_input": true, "name": "outformat", "default": "boolean", "qname": "l3vpn:outformat", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "outformat4"}}, {"default": "deep", "kind": "choice", "cases": [{"kind": "case", "name": "deep", "children": [{"kind": "leaf", "is_action_input": true, "name": "deep", "qname": "l3vpn:deep", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}, {"kind": "case", "name": "shallow", "children": [{"kind": "leaf", "is_action_input": true, "name": "shallow", "qname": "l3vpn:shallow", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}], "name": "depth"}, {"info": {"string": "Return list only contains negatives"}, "kind": "leaf", "is_action_input": true, "name": "suppress-positive-result", "qname": "l3vpn:suppress-positive-result", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}, {"kind": "choice", "cases": [{"kind": "case", "name": "use-lsa", "children": [{"kind": "leaf", "is_action_input": true, "name": "use-lsa", "qname": "l3vpn:use-lsa", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}, {"kind": "case", "name": "no-lsa", "children": [{"kind": "leaf", "is_action_input": true, "name": "no-lsa", "qname": "l3vpn:no-lsa", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}], "name": "choice-lsa"}, {"kind": "choice", "cases": [{"kind": "case", "name": "in-sync", "children": [{"kind": "leaf", "name": "in-sync", "qname": "l3vpn:in-sync", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "type": {"primitive": true, "name": "boolean"}, "is_action_output": true}]}, {"kind": "case", "name": "case-xml", "children": [{"kind": "container", "mandatory": true, "name": "result-xml", "qname": "l3vpn:result-xml", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}, {"kind": "case", "name": "case-cli", "children": [{"kind": "container", "mandatory": true, "name": "cli", "qname": "l3vpn:cli", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}, {"kind": "case", "name": "case-native", "children": [{"kind": "container", "mandatory": true, "name": "native", "qname": "l3vpn:native", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}], "name": "outformat"}]}, {"info": {"string": "Check if device config is according to the service"}, "kind": "action", "mandatory": true, "name": "deep-check-sync", "qname": "l3vpn:deep-check-sync", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "children": [{"kind": "leaf", "is_action_input": true, "name": "outformat", "default": "boolean", "qname": "l3vpn:outformat", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "outformat-deep-check-sync"}}, {"info": {"string": "Return list only contains negatives"}, "kind": "leaf", "is_action_input": true, "name": "suppress-positive-result", "qname": "l3vpn:suppress-positive-result", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}, {"kind": "choice", "cases": [{"kind": "case", "name": "use-lsa", "children": [{"kind": "leaf", "is_action_input": true, "name": "use-lsa", "qname": "l3vpn:use-lsa", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}, {"kind": "case", "name": "no-lsa", "children": [{"kind": "leaf", "is_action_input": true, "name": "no-lsa", "qname": "l3vpn:no-lsa", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}], "name": "choice-lsa"}, {"kind": "choice", "cases": [{"kind": "case", "name": "case-xml", "children": [{"kind": "container", "mandatory": true, "name": "result-xml", "qname": "l3vpn:result-xml", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}, {"kind": "case", "name": "case-cli", "children": [{"kind": "container", "mandatory": true, "name": "cli", "qname": "l3vpn:cli", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}, {"kind": "case", "name": "case-sync", "children": [{"kind": "container", "mandatory": true, "name": "sync-result", "qname": "l3vpn:sync-result", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}], "name": "outformat"}]}, {"info": {"string": "Run/Dryrun the service logic again"}, "kind": "action", "mandatory": true, "name": "re-deploy", "qname": "l3vpn:re-deploy", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "children": [{"kind": "container", "is_action_input": true, "name": "dry-run", "presence": true, "qname": "l3vpn:dry-run", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}}, {"kind": "leaf", "is_action_input": true, "name": "no-revision-drop", "qname": "l3vpn:no-revision-drop", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}, {"kind": "leaf", "is_action_input": true, "name": "no-networking", "qname": "l3vpn:no-networking", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}, {"kind": "choice", "cases": [{"kind": "case", "name": "no-overwrite", "children": [{"kind": "leaf", "is_action_input": true, "name": "no-overwrite", "qname": "l3vpn:no-overwrite", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}, {"kind": "case", "name": "no-out-of-sync-check", "children": [{"kind": "leaf", "is_action_input": true, "name": "no-out-of-sync-check", "qname": "l3vpn:no-out-of-sync-check", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}], "name": "choice-sync-check"}, {"kind": "container", "is_action_input": true, "name": "commit-queue", "presence": true, "qname": "l3vpn:commit-queue", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}}, {"kind": "choice", "cases": [{"kind": "case", "name": "use-lsa", "children": [{"kind": "leaf", "is_action_input": true, "name": "use-lsa", "qname": "l3vpn:use-lsa", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}, {"kind": "case", "name": "no-lsa", "children": [{"kind": "leaf", "is_action_input": true, "name": "no-lsa", "qname": "l3vpn:no-lsa", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}], "name": "choice-lsa"}, {"default": "deep", "kind": "choice", "cases": [{"kind": "case", "name": "deep", "children": [{"kind": "leaf", "is_action_input": true, "name": "deep", "qname": "l3vpn:deep", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}, {"kind": "case", "name": "shallow", "children": [{"kind": "leaf", "is_action_input": true, "name": "shallow", "qname": "l3vpn:shallow", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}], "name": "depth"}, {"kind": "container", "is_action_input": true, "name": "reconcile", "presence": true, "qname": "l3vpn:reconcile", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}}, {"kind": "choice", "cases": [{"kind": "case", "name": "case-xml", "children": [{"kind": "container", "mandatory": true, "name": "result-xml", "qname": "l3vpn:result-xml", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}, {"kind": "case", "name": "case-cli", "children": [{"kind": "container", "mandatory": true, "name": "cli", "qname": "l3vpn:cli", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}, {"kind": "case", "name": "case-native", "children": [{"kind": "container", "mandatory": true, "name": "native", "qname": "l3vpn:native", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}], "name": "outformat"}, {"kind": "container", "mandatory": true, "name": "commit-queue", "qname": "l3vpn:commit-queue", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}, {"kind": "leaf", "name": "id", "type": {"primitive": true, "name": "uint64"}, "qname": "l3vpn:id", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "leafref_target": "/ncs:devices/commit-queue/queue-item/id", "is_leafref": true, "is_action_output": true}, {"kind": "leaf", "name": "tag", "qname": "l3vpn:tag", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "type": {"primitive": true, "name": "string"}, "is_action_output": true}, {"kind": "leaf", "name": "status", "qname": "l3vpn:status", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "type": {"namespace": "http://com/example/l3vpn", "name": "t7"}, "is_action_output": true}]}, {"info": {"string": "Reactive redeploy of service logic"}, "kind": "action", "mandatory": true, "name": "reactive-re-deploy", "qname": "l3vpn:reactive-re-deploy", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "children": [{"kind": "leaf", "name": "id", "type": {"primitive": true, "name": "uint64"}, "qname": "l3vpn:id", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "leafref_target": "/ncs:devices/commit-queue/queue-item/id", "is_leafref": true, "is_action_output": true}, {"kind": "leaf", "name": "tag", "qname": "l3vpn:tag", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "type": {"primitive": true, "name": "string"}, "is_action_output": true}, {"kind": "leaf", "name": "status", "qname": "l3vpn:status", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "type": {"namespace": "http://com/example/l3vpn", "name": "t7"}, "is_action_output": true}]}, {"info": {"string": "Touch a service"}, "kind": "action", "mandatory": true, "name": "touch", "qname": "l3vpn:touch", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "children": []}, {"info": {"string": "Get the data this service created"}, "kind": "action", "mandatory": true, "name": "get-modifications", "qname": "l3vpn:get-modifications", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "children": [{"kind": "leaf", "is_action_input": true, "name": "outformat", "qname": "l3vpn:outformat", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"namespace": "http://tail-f.com/ns/ncs", "name": "outformat2"}}, {"kind": "leaf", "is_action_input": true, "name": "reverse", "qname": "l3vpn:reverse", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}, {"default": "deep", "kind": "choice", "cases": [{"kind": "case", "name": "deep", "children": [{"kind": "leaf", "is_action_input": true, "name": "deep", "qname": "l3vpn:deep", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}, {"kind": "case", "name": "shallow", "children": [{"kind": "leaf", "is_action_input": true, "name": "shallow", "qname": "l3vpn:shallow", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}], "name": "depth"}, {"kind": "choice", "cases": [{"kind": "case", "name": "use-lsa", "children": [{"kind": "leaf", "is_action_input": true, "name": "use-lsa", "qname": "l3vpn:use-lsa", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}, {"kind": "case", "name": "no-lsa", "children": [{"kind": "leaf", "is_action_input": true, "name": "no-lsa", "qname": "l3vpn:no-lsa", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}], "name": "choice-lsa"}, {"kind": "choice", "cases": [{"kind": "case", "name": "case-xml", "children": [{"kind": "container", "mandatory": true, "name": "result-xml", "qname": "l3vpn:result-xml", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}, {"kind": "case", "name": "case-cli", "children": [{"kind": "container", "mandatory": true, "name": "cli", "qname": "l3vpn:cli", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}], "name": "outformat"}]}, {"info": {"string": "Undo the effects of this service"}, "kind": "action", "mandatory": true, "name": "un-deploy", "qname": "l3vpn:un-deploy", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}, "children": [{"kind": "container", "is_action_input": true, "name": "dry-run", "presence": true, "qname": "l3vpn:dry-run", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}}, {"kind": "leaf", "is_action_input": true, "name": "no-revision-drop", "qname": "l3vpn:no-revision-drop", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}, {"kind": "leaf", "is_action_input": true, "name": "no-networking", "qname": "l3vpn:no-networking", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}, {"kind": "choice", "cases": [{"kind": "case", "name": "no-overwrite", "children": [{"kind": "leaf", "is_action_input": true, "name": "no-overwrite", "qname": "l3vpn:no-overwrite", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}, {"kind": "case", "name": "no-out-of-sync-check", "children": [{"kind": "leaf", "is_action_input": true, "name": "no-out-of-sync-check", "qname": "l3vpn:no-out-of-sync-check", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}], "name": "choice-sync-check"}, {"kind": "container", "is_action_input": true, "name": "commit-queue", "presence": true, "qname": "l3vpn:commit-queue", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}}, {"kind": "choice", "cases": [{"kind": "case", "name": "use-lsa", "children": [{"kind": "leaf", "is_action_input": true, "name": "use-lsa", "qname": "l3vpn:use-lsa", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}, {"kind": "case", "name": "no-lsa", "children": [{"kind": "leaf", "is_action_input": true, "name": "no-lsa", "qname": "l3vpn:no-lsa", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}]}], "name": "choice-lsa"}, {"kind": "leaf", "is_action_input": true, "name": "ignore-refcount", "qname": "l3vpn:ignore-refcount", "access": {"read": false, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "empty"}}, {"kind": "choice", "cases": [{"kind": "case", "name": "case-xml", "children": [{"kind": "container", "mandatory": true, "name": "result-xml", "qname": "l3vpn:result-xml", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}, {"kind": "case", "name": "case-cli", "children": [{"kind": "container", "mandatory": true, "name": "cli", "qname": "l3vpn:cli", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}, {"kind": "case", "name": "case-native", "children": [{"kind": "container", "mandatory": true, "name": "native", "qname": "l3vpn:native", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}]}], "name": "outformat"}, {"kind": "container", "mandatory": true, "name": "commit-queue", "qname": "l3vpn:commit-queue", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "is_action_output": true}, {"kind": "leaf", "name": "id", "type": {"primitive": true, "name": "uint64"}, "qname": "l3vpn:id", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "leafref_target": "/ncs:devices/commit-queue/queue-item/id", "is_leafref": true, "is_action_output": true}, {"kind": "leaf", "name": "tag", "qname": "l3vpn:tag", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "type": {"primitive": true, "name": "string"}, "is_action_output": true}, {"kind": "leaf", "name": "status", "qname": "l3vpn:status", "access": {"read": false, "create": false, "execute": false, "update": false, "delete": false}, "type": {"namespace": "http://com/example/l3vpn", "name": "t7"}, "is_action_output": true}]}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["name"], "mandatory": true, "leafrefGroups": [["used-by-customer-service"]]}}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/l3vpn_schema.json b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/l3vpn_schema.json
new file mode 100644
index 00000000..0e7e3703
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/l3vpn_schema.json
@@ -0,0 +1 @@
+{"meta": {"prefix": "l3vpn", "namespace": "http://com/example/l3vpn", "types": {"http://com/example/l3vpn:t21": [{"list_type": [{"leaf-list": true, "name": "http://com/example/l3vpn:t21"}], "leaf_type": [{"name": "string"}]}], "http://com/example/l3vpn:t23": [{"list_type": [{"leaf-list": true, "name": "http://com/example/l3vpn:t23"}], "leaf_type": [{"name": "string"}]}]}, "keypath": "/l3vpn:vpn"}, "data": {"kind": "container", "mandatory": true, "name": "vpn", "qname": "l3vpn:vpn", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "children": [{"kind": "list", "leafref_groups": [["used-by-customer-service"]], "min_elements": 0, "name": "l3vpn", "max_elements": "unbounded", "qname": "l3vpn:l3vpn", "children": [{"info": {"string": "Unique service id"}, "kind": "key", "mandatory": true, "name": "name", "qname": "l3vpn:name", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"info": {"string": "Devices and other services this service modified directly or\nindirectly."}, "kind": "container", "mandatory": true, "name": "modified", "leafrefGroups": [["devices"]], "qname": "l3vpn:modified", "is_config_false_callpoint": true, "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "leafref_groups": [["devices"]], "config": false}, {"info": {"string": "Devices and other services this service has explicitly\nmodified."}, "kind": "container", "mandatory": true, "name": "directly-modified", "leafrefGroups": [["devices"]], "qname": "l3vpn:directly-modified", "is_config_false_callpoint": true, "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "leafref_groups": [["devices"]], "config": false}, {"info": {"string": "A list of devices this service instance has manipulated"}, "kind": "leaf-list", "name": "device-list", "type": {"namespace": "http://com/example/l3vpn", "name": "t21"}, "qname": "l3vpn:device-list", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "config": false}, {"info": {"string": "Customer facing services using this service"}, "kind": "leaf-list", "name": "used-by-customer-service", "is_leafref": true, "qname": "l3vpn:used-by-customer-service", "is_config_false_callpoint": true, "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "readonly": true, "leafref_target": "/ncs:services/customer-service/object-id", "type": {"namespace": "http://com/example/l3vpn", "name": "t23"}, "config": false}, {"kind": "container", "mandatory": true, "name": "commit-queue", "qname": "l3vpn:commit-queue", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"kind": "container", "mandatory": true, "name": "log", "qname": "l3vpn:log", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "readonly": true, "config": false}, {"kind": "leaf", "mandatory": true, "name": "route-distinguisher", "qname": "l3vpn:route-distinguisher", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "uint32"}}, {"kind": "list", "leafref_groups": [["ce-device"]], "min_elements": 0, "name": "endpoint", "max_elements": "unbounded", "qname": "l3vpn:endpoint", "children": [{"info": {"string": "Endpoint identifier"}, "kind": "key", "mandatory": true, "name": "id", "qname": "l3vpn:id", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf", "mandatory": true, "name": "ce-device", "type": {"primitive": true, "name": "string"}, "qname": "l3vpn:ce-device", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "leafref_target": "/ncs:devices/device/name", "is_leafref": true}, {"kind": "leaf", "mandatory": true, "name": "ce-interface", "qname": "l3vpn:ce-interface", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "string"}}, {"kind": "leaf", "mandatory": true, "name": "ip-network", "qname": "l3vpn:ip-network", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "ip-prefix"}}, {"info": {"string": "Bandwidth in bps"}, "kind": "leaf", "mandatory": true, "name": "bandwidth", "qname": "l3vpn:bandwidth", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "type": {"primitive": true, "name": "uint32"}}, {"info": {"string": "CE Router as-number"}, "kind": "leaf", "name": "as-number", "qname": "l3vpn:as-number", "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "type": {"primitive": true, "name": "uint32"}}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["id"], "mandatory": true, "leafrefGroups": [["ce-device"]]}, {"kind": "container", "mandatory": true, "name": "qos", "leafrefGroups": [["qos-policy"]], "qname": "l3vpn:qos", "access": {"read": true, "create": false, "execute": false, "update": true, "delete": false}, "leafref_groups": [["qos-policy"]]}, {"info": {"string": "Check if device config is according to the service"}, "kind": "action", "mandatory": true, "name": "check-sync", "qname": "l3vpn:check-sync", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Check if device config is according to the service"}, "kind": "action", "mandatory": true, "name": "deep-check-sync", "qname": "l3vpn:deep-check-sync", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Run/Dryrun the service logic again"}, "kind": "action", "mandatory": true, "name": "re-deploy", "qname": "l3vpn:re-deploy", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Reactive redeploy of service logic"}, "kind": "action", "mandatory": true, "name": "reactive-re-deploy", "qname": "l3vpn:reactive-re-deploy", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Touch a service"}, "kind": "action", "mandatory": true, "name": "touch", "qname": "l3vpn:touch", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Get the data this service created"}, "kind": "action", "mandatory": true, "name": "get-modifications", "qname": "l3vpn:get-modifications", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}, {"info": {"string": "Undo the effects of this service"}, "kind": "action", "mandatory": true, "name": "un-deploy", "qname": "l3vpn:un-deploy", "access": {"read": false, "create": false, "execute": true, "update": false, "delete": false}}], "access": {"read": true, "create": true, "execute": false, "update": true, "delete": true}, "key": ["name"], "mandatory": true, "leafrefGroups": [["used-by-customer-service"]]}]}}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/sync_from_schema.json b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/sync_from_schema.json
new file mode 100644
index 00000000..dc2206d4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/sync_from_schema.json
@@ -0,0 +1,178 @@
+{
+ "meta": {
+ "prefix": "ncs",
+ "namespace": "http://tail-f.com/ns/ncs",
+ "types": {
+ "http://tail-f.com/ns/ncs:outformat2": [
+ {
+ "name": "http://tail-f.com/ns/ncs:outformat2",
+ "enumeration": [
+ {
+ "info": "NCS CLI curly bracket format.",
+ "label": "cli"
+ },
+ {
+ "info": "NETCONF XML edit-config format, i.e., the edit-config that\nwould be applied locally (at NCS) to get a config\nthat is equal to that of the managed device.",
+ "label": "xml"
+ }
+ ]
+ },
+ {
+ "name": "string"
+ }
+ ]
+ },
+ "keypath": "/ncs:devices/device{ce0}/sync-from"
+ },
+ "data": {
+ "info": {
+ "string": "Synchronize the config by pulling from the device"
+ },
+ "kind": "action",
+ "mandatory": true,
+ "name": "sync-from",
+ "qname": "ncs:sync-from",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": true,
+ "update": false,
+ "delete": false
+ },
+ "children": [
+ {
+ "kind": "container",
+ "is_action_input": true,
+ "name": "dry-run",
+ "presence": true,
+ "qname": "ncs:dry-run",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": true,
+ "delete": false
+ },
+ "children": [
+ {
+ "info": {
+ "string": "Report what would be done towards CDB, without\nactually doing anything."
+ },
+ "kind": "leaf",
+ "is_action_input": true,
+ "name": "outformat",
+ "qname": "ncs:outformat",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": true,
+ "delete": false
+ },
+ "type": {
+ "namespace": "http://tail-f.com/ns/ncs",
+ "name": "outformat2"
+ }
+ }
+ ]
+ },
+ {
+ "kind": "choice",
+ "cases": [
+ {
+ "kind": "case",
+ "name": "result",
+ "children": [
+ {
+ "kind": "leaf",
+ "name": "result",
+ "qname": "ncs:result",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": false,
+ "delete": false
+ },
+ "type": {
+ "primitive": true,
+ "name": "boolean"
+ },
+ "is_action_output": true
+ }
+ ]
+ },
+ {
+ "kind": "case",
+ "name": "result-xml",
+ "children": [
+ {
+ "kind": "leaf",
+ "name": "result-xml",
+ "is_cli_preformatted": true,
+ "qname": "ncs:result-xml",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": false,
+ "delete": false
+ },
+ "type": {
+ "primitive": true,
+ "name": "string"
+ },
+ "is_action_output": true
+ }
+ ]
+ },
+ {
+ "kind": "case",
+ "name": "cli",
+ "children": [
+ {
+ "kind": "leaf",
+ "name": "cli",
+ "is_cli_preformatted": true,
+ "qname": "ncs:cli",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": false,
+ "delete": false
+ },
+ "type": {
+ "primitive": true,
+ "name": "string"
+ },
+ "is_action_output": true
+ }
+ ]
+ }
+ ],
+ "name": "outformat"
+ },
+ {
+ "info": {
+ "string": "If present, contains additional information about the result."
+ },
+ "kind": "leaf",
+ "name": "info",
+ "qname": "ncs:info",
+ "access": {
+ "read": false,
+ "create": false,
+ "execute": false,
+ "update": false,
+ "delete": false
+ },
+ "type": {
+ "primitive": true,
+ "name": "string"
+ },
+ "is_action_output": true
+ }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/verify_violation_data.json b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/verify_violation_data.json
new file mode 100644
index 00000000..05742c11
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/fixtures/verify_violation_data.json
@@ -0,0 +1,10 @@
+{
+ "tailf-ncs:devices": {
+ "device": [
+ {
+ "name": "ce0",
+ "description": "Example Device"
+ }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/nso_module.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/nso_module.py
new file mode 100644
index 00000000..87bcb27b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/nso_module.py
@@ -0,0 +1,132 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+import os
+import json
+
+from ansible_collections.cisco.nso.tests.unit.compat import unittest
+from ansible_collections.cisco.nso.tests.unit.compat.mock import patch
+from ansible.module_utils import basic
+
+
+fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
+fixture_data = {}
+
+
+def load_fixture(name):
+ path = os.path.join(fixture_path, name)
+ if path not in fixture_data:
+ with open(path) as f:
+ data = json.load(f)
+ fixture_data[path] = data
+ return fixture_data[path]
+
+
+class MockResponse(object):
+ def __init__(self, method, params, code, body, headers=None):
+ if headers is None:
+ headers = {}
+
+ self.method = method
+ self.params = params
+
+ self.code = code
+ self.body = body
+ self.headers = dict(headers)
+
+ def read(self):
+ return self.body
+
+
+def mock_call(calls, url, timeout, validate_certs, data=None, headers=None, method=None):
+ if len(calls) == 0:
+ raise ValueError('no call mock for method {0}({1})'.format(
+ url, data))
+
+ result = calls[0]
+ del calls[0]
+
+ request = json.loads(data)
+ if result.method != request['method']:
+ raise ValueError('expected method {0}({1}), got {2}({3})'.format(
+ result.method, result.params,
+ request['method'], request['params']))
+
+ for key, value in result.params.items():
+ if key not in request['params']:
+ raise ValueError('{0} not in parameters'.format(key))
+ if value != request['params'][key]:
+ raise ValueError('expected {0} to be {1}, got {2}'.format(
+ key, value, request['params'][key]))
+
+ return result
+
+
+class AnsibleExitJson(Exception):
+ pass
+
+
+class AnsibleFailJson(Exception):
+ pass
+
+
+class TestNsoModule(unittest.TestCase):
+
+ def execute_module(self, failed=False, changed=False, **kwargs):
+ if failed:
+ result = self.failed()
+ self.assertTrue(result['failed'], result)
+ else:
+ result = self.changed(changed)
+ self.assertEqual(result['changed'], changed, result)
+
+ for key, value in kwargs.items():
+ if key not in result:
+ self.fail("{0} not in result {1}".format(key, result))
+ self.assertEqual(value, result[key])
+
+ return result
+
+ def failed(self):
+ def fail_json(*args, **kwargs):
+ kwargs['failed'] = True
+ raise AnsibleFailJson(kwargs)
+
+ with patch.object(basic.AnsibleModule, 'fail_json', fail_json):
+ with self.assertRaises(AnsibleFailJson) as exc:
+ self.module.main()
+
+ result = exc.exception.args[0]
+ self.assertTrue(result['failed'], result)
+ return result
+
+ def changed(self, changed=False):
+ def exit_json(*args, **kwargs):
+ if 'changed' not in kwargs:
+ kwargs['changed'] = False
+ raise AnsibleExitJson(kwargs)
+
+ with patch.object(basic.AnsibleModule, 'exit_json', exit_json):
+ with self.assertRaises(AnsibleExitJson) as exc:
+ self.module.main()
+
+ result = exc.exception.args[0]
+ self.assertEqual(result['changed'], changed, result)
+ return result
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_action.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_action.py
new file mode 100644
index 00000000..be93f3b8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_action.py
@@ -0,0 +1,167 @@
+#
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+import json
+
+from ansible_collections.cisco.nso.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nso.plugins.modules import nso_action
+from . import nso_module
+from .nso_module import MockResponse
+
+from ansible_collections.cisco.nso.tests.unit.plugins.modules.utils import set_module_args
+
+
+class TestNsoAction(nso_module.TestNsoModule):
+ module = nso_action
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_action_missing(self, open_url_mock):
+ action_input = {}
+ path = '/ncs:devices/device{ce0}/missing'
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5.0"}'),
+ MockResponse('new_trans', {'mode': 'read'}, 200, '{"result": {"th": 1}}'),
+ MockResponse('get_schema', {'path': path}, 200, '{"error": {"data": {"param": "path"}, "type": "rpc.method.invalid_params"}}'),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc',
+ 'path': path,
+ 'input': action_input,
+ 'validate_certs': False
+ })
+ self.execute_module(failed=True, msg='NSO get_schema invalid params. path = /ncs:devices/device{ce0}/missing')
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_action_not_action(self, open_url_mock):
+ action_input = {}
+ path = '/ncs:devices/device{ce0}/description'
+ schema = nso_module.load_fixture('description_schema.json')
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5.0"}'),
+ MockResponse('new_trans', {'mode': 'read'}, 200, '{"result": {"th": 1}}'),
+ MockResponse('get_schema', {'path': path}, 200, '{"result": %s}' % (json.dumps(schema, ))),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc',
+ 'path': path,
+ 'input': action_input,
+ 'validate_certs': False
+ })
+ self.execute_module(failed=True, msg='/ncs:devices/device{ce0}/description is not an action')
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_action_ok(self, open_url_mock):
+ action_input = {}
+ path = '/ncs:devices/device{ce0}/sync-from'
+ output = {"result": True}
+ schema = nso_module.load_fixture('sync_from_schema.json')
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5.0"}'),
+ MockResponse('new_trans', {'mode': 'read'}, 200, '{"result": {"th": 1}}'),
+ MockResponse('get_schema', {'path': path}, 200, '{"result": %s}' % (json.dumps(schema, ))),
+ MockResponse('run_action', {'path': path, 'params': action_input}, 200, '{"result": {"result": true}}'),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc',
+ 'path': path,
+ 'input': action_input,
+ 'validate_certs': False
+ })
+ self.execute_module(changed=True, output=output)
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_action_validate_ok(self, open_url_mock):
+ action_input = {}
+ path = '/test:action'
+ output = {'version': [{'name': 'v1'}, {'name': 'v2'}]}
+ schema = nso_module.load_fixture('complex_schema.json')
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5.0"}'),
+ MockResponse('new_trans', {'mode': 'read'}, 200, '{"result": {"th": 1}}'),
+ MockResponse('get_schema', {'path': path}, 200, '{"result": %s}' % (json.dumps(schema, ))),
+ MockResponse('run_action', {'path': path, 'params': action_input}, 200,
+ '{"result": {"version": [{"name": "v1"}, {"name": "v2"}]}}'),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc',
+ 'path': path,
+ 'input': action_input,
+ 'output_required': output,
+ 'validate_certs': False
+ })
+ self.execute_module(changed=True, output=output)
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_action_validate_failed(self, open_url_mock):
+ action_input = {}
+ path = '/test:action'
+ output_mismatch = {'version': [{'name': 'v1'}, {'name': 'v3'}]}
+ schema = nso_module.load_fixture('complex_schema.json')
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5.0"}'),
+ MockResponse('new_trans', {'mode': 'read'}, 200, '{"result": {"th": 1}}'),
+ MockResponse('get_schema', {'path': path}, 200, '{"result": %s}' % (json.dumps(schema, ))),
+ MockResponse('run_action', {'path': path, 'params': action_input}, 200,
+ '{"result": {"version": [{"name": "v1"}, {"name": "v2"}]}}'),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc',
+ 'path': path,
+ 'input': action_input,
+ 'output_required': output_mismatch,
+ 'validate_certs': False
+ })
+ self.execute_module(failed=True, msg="version value mismatch. expected [{'name': 'v1'}, {'name': 'v3'}] got [{'name': 'v1'}, {'name': 'v2'}]")
+
+ self.assertEqual(0, len(calls))
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_config.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_config.py
new file mode 100644
index 00000000..25087e8e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_config.py
@@ -0,0 +1,138 @@
+#
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+import json
+
+from ansible_collections.cisco.nso.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nso.plugins.modules import nso_config
+from ansible_collections.cisco.nso.tests.unit.plugins.modules.utils import set_module_args
+from . import nso_module
+from .nso_module import MockResponse
+
+
+class TestNsoConfig(nso_module.TestNsoModule):
+ module = nso_config
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_config_invalid_version_short(self, open_url_mock):
+ self._test_invalid_version(open_url_mock, '3.3')
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_config_invalid_version_long(self, open_url_mock):
+ self._test_invalid_version(open_url_mock, '3.3.2')
+
+ def _test_invalid_version(self, open_url_mock, version):
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "%s"}' % (version, )),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ data = nso_module.load_fixture('config_config.json')
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc', 'data': data,
+ 'validate_certs': False
+ })
+ self.execute_module(failed=True)
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_config_valid_version_short(self, open_url_mock):
+ self._test_valid_version(open_url_mock, '4.5')
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_config_valid_version_long(self, open_url_mock):
+ self._test_valid_version(open_url_mock, '4.4.3')
+
+ def _test_valid_version(self, open_url_mock, version):
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "%s"}' % (version, )),
+ MockResponse('new_trans', {}, 200, '{"result": {"th": 1}}'),
+ MockResponse('get_trans_changes', {}, 200, '{"result": {"changes": []}}'),
+ MockResponse('delete_trans', {}, 200, '{"result": {}}'),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ data = nso_module.load_fixture('config_empty_data.json')
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc', 'data': data,
+ 'validate_certs': False
+ })
+ self.execute_module(changed=False, changes=[], diffs=[])
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_config_changed(self, open_url_mock):
+ vpn_schema = nso_module.load_fixture('l3vpn_schema.json')
+ l3vpn_schema = nso_module.load_fixture('l3vpn_l3vpn_schema.json')
+ endpoint_schema = nso_module.load_fixture('l3vpn_l3vpn_endpoint_schema.json')
+ changes = nso_module.load_fixture('config_config_changes.json')
+
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5.1"}'),
+ MockResponse('get_module_prefix_map', {}, 200, '{"result": {"l3vpn": "l3vpn"}}'),
+ MockResponse('new_trans', {'mode': 'read'}, 200, '{"result": {"th": 1}}'),
+ MockResponse('get_schema', {'path': '/l3vpn:vpn'}, 200, '{"result": %s}' % (json.dumps(vpn_schema, ))),
+ MockResponse('get_schema', {'path': '/l3vpn:vpn/l3vpn'}, 200, '{"result": %s}' % (json.dumps(l3vpn_schema, ))),
+ MockResponse('exists', {'path': '/l3vpn:vpn/l3vpn{company}'}, 200, '{"result": {"exists": true}}'),
+ MockResponse('get_schema', {'path': '/l3vpn:vpn/l3vpn/endpoint'}, 200, '{"result": %s}' % (json.dumps(endpoint_schema, ))),
+ MockResponse('exists', {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}'}, 200, '{"result": {"exists": false}}'),
+ MockResponse('new_trans', {'mode': 'read_write'}, 200, '{"result": {"th": 2}}'),
+ MockResponse('create', {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}'}, 200, '{"result": {}}'),
+ MockResponse('set_value', {'path': '/l3vpn:vpn/l3vpn{company}/route-distinguisher', 'value': 999}, 200, '{"result": {}}'),
+ MockResponse('set_value', {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/as-number', 'value': 65101}, 200, '{"result": {}}'),
+ MockResponse('set_value', {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/bandwidth', 'value': 12000000}, 200, '{"result": {}}'),
+ MockResponse('set_value', {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/ce-device', 'value': 'ce6'}, 200, '{"result": {}}'),
+ MockResponse('set_value', {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/ce-interface',
+ 'value': 'GigabitEthernet0/12'}, 200, '{"result": {}}'),
+ MockResponse('set_value', {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/ip-network',
+ 'value': '10.10.1.0/24'}, 200, '{"result": {}}'),
+ MockResponse('get_trans_changes', {}, 200, '{"result": %s}' % (json.dumps(changes), )),
+ MockResponse('validate_commit', {}, 200, '{"result": {}}'),
+ MockResponse('commit', {}, 200, '{"result": {}}'),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ data = nso_module.load_fixture('config_config.json')
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc', 'data': data,
+ 'validate_certs': False
+ })
+ self.execute_module(changed=True, changes=[
+ {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/ce-device', 'type': 'set', 'from': None, 'to': 'ce6'},
+ {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/ip-network', 'type': 'set', 'from': None, 'to': '10.10.1.0/24'},
+ {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/as-number', 'type': 'set', 'from': None, 'to': '65101'},
+ {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/ce-interface', 'type': 'set', 'from': None, 'to': 'GigabitEthernet0/12'},
+ {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}/bandwidth', 'type': 'set', 'from': None, 'to': '12000000'},
+ {'path': '/l3vpn:vpn/l3vpn{company}/endpoint{branch-office1}', 'type': 'create'},
+ ], diffs=[])
+
+ self.assertEqual(0, len(calls))
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_query.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_query.py
new file mode 100644
index 00000000..204478fb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_query.py
@@ -0,0 +1,57 @@
+#
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+from ansible_collections.cisco.nso.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nso.plugins.modules import nso_query
+from . import nso_module
+from .nso_module import MockResponse
+
+from ansible_collections.cisco.nso.tests.unit.plugins.modules.utils import set_module_args
+
+
+class TestNsoQuery(nso_module.TestNsoModule):
+ module = nso_query
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_query(self, open_url_mock):
+ xpath = '/packages/package'
+ fields = ['name', 'package-version']
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5"}'),
+ MockResponse('new_trans', {'mode': 'read'}, 200, '{"result": {"th": 1}}'),
+ MockResponse('query',
+ {'xpath_expr': xpath, 'selection': fields}, 200,
+ '{"result": {"results": [["test", "1.0"]]}}'),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc',
+ 'xpath': xpath,
+ 'fields': fields,
+ 'validate_certs': False
+ })
+ self.execute_module(changed=False, output=[["test", "1.0"]])
+
+ self.assertEqual(0, len(calls))
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_show.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_show.py
new file mode 100644
index 00000000..2b4e28f5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_show.py
@@ -0,0 +1,98 @@
+#
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+from ansible_collections.cisco.nso.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nso.plugins.modules import nso_show
+from . import nso_module
+from .nso_module import MockResponse
+
+from ansible_collections.cisco.nso.tests.unit.plugins.modules.utils import set_module_args
+
+
+class TestNsoShow(nso_module.TestNsoModule):
+ module = nso_show
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_show_missing(self, open_url_mock):
+ path = '/ncs:devices/device{ce0}/missing'
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5"}'),
+ MockResponse('new_trans', {'mode': 'read'}, 200, '{"result": {"th": 1}}'),
+ MockResponse('show_config',
+ {'path': path, 'result_as': 'json'}, 200,
+ '{"error": {"data": {"param": "path"}, "type": "rpc.method.invalid_params"}}'),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc',
+ 'path': path
+ })
+ self.execute_module(failed=True, msg='NSO show_config invalid params. path = /ncs:devices/device{ce0}/missing')
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_show_config(self, open_url_mock):
+ path = '/ncs:devices/device{ce0}'
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5"}'),
+ MockResponse('new_trans', {'mode': 'read'}, 200, '{"result": {"th": 1}}'),
+ MockResponse('show_config', {'path': path, 'result_as': 'json'}, 200, '{"result": {"data": {}}}'),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc',
+ 'path': path,
+ 'operational': False
+ })
+ self.execute_module(changed=False, output={"data": {}})
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_show_config_and_oper(self, open_url_mock):
+ path = '/ncs:devices/device{ce0}/sync-from'
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5"}'),
+ MockResponse('new_trans', {'mode': 'read'}, 200, '{"result": {"th": 1}}'),
+ MockResponse('show_config', {'path': path, 'result_as': 'json'}, 200, '{"result": {"data": {}}}'),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc',
+ 'path': path,
+ 'operational': True,
+ 'validate_certs': False
+ })
+ self.execute_module(changed=False, output={"data": {}})
+
+ self.assertEqual(0, len(calls))
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_verify.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_verify.py
new file mode 100644
index 00000000..1e485d75
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/test_nso_verify.py
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+import json
+
+from ansible_collections.cisco.nso.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nso.plugins.modules import nso_verify
+from . import nso_module
+from .nso_module import MockResponse
+
+from ansible_collections.cisco.nso.tests.unit.plugins.modules.utils import set_module_args
+
+
+class TestNsoVerify(nso_module.TestNsoModule):
+ module = nso_verify
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_verify_empty_data(self, open_url_mock):
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.4.3"}'),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ data = {}
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc', 'data': data
+ })
+ self.execute_module(changed=False)
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_verify_violation(self, open_url_mock):
+ devices_schema = nso_module.load_fixture('devices_schema.json')
+ device_schema = nso_module.load_fixture('device_schema.json')
+ description_schema = nso_module.load_fixture('description_schema.json')
+
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5.0"}'),
+ MockResponse('get_module_prefix_map', {}, 200, '{"result": {"tailf-ncs": "ncs"}}'),
+ MockResponse('new_trans', {'mode': 'read'}, 200, '{"result": {"th": 1}}'),
+ MockResponse('get_schema', {'path': '/ncs:devices'}, 200, '{"result": %s}' % (json.dumps(devices_schema, ))),
+ MockResponse('get_schema', {'path': '/ncs:devices/device'}, 200, '{"result": %s}' % (json.dumps(device_schema, ))),
+ MockResponse('exists', {'path': '/ncs:devices/device{ce0}'}, 200, '{"result": {"exists": true}}'),
+ MockResponse('get_value', {'path': '/ncs:devices/device{ce0}/description'}, 200, '{"result": {"value": "In Violation"}}'),
+ MockResponse('get_schema', {'path': '/ncs:devices/device/description'}, 200, '{"result": %s}' % (json.dumps(description_schema, ))),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ data = nso_module.load_fixture('verify_violation_data.json')
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc', 'data': data
+ })
+ self.execute_module(failed=True, violations=[
+ {'path': '/ncs:devices/device{ce0}/description', 'expected-value': 'Example Device', 'value': 'In Violation'},
+ ])
+
+ self.assertEqual(0, len(calls))
+
+ @patch('ansible_collections.cisco.nso.plugins.module_utils.nso.open_url')
+ def test_nso_verify_ok(self, open_url_mock):
+ devices_schema = nso_module.load_fixture('devices_schema.json')
+ device_schema = nso_module.load_fixture('device_schema.json')
+
+ calls = [
+ MockResponse('login', {}, 200, '{}', {'set-cookie': 'id'}),
+ MockResponse('get_system_setting', {'operation': 'version'}, 200, '{"result": "4.5.0"}'),
+ MockResponse('get_module_prefix_map', {}, 200, '{"result": {"tailf-ncs": "ncs"}}'),
+ MockResponse('new_trans', {'mode': 'read'}, 200, '{"result": {"th": 1}}'),
+ MockResponse('get_schema', {'path': '/ncs:devices'}, 200, '{"result": %s}' % (json.dumps(devices_schema, ))),
+ MockResponse('get_schema', {'path': '/ncs:devices/device'}, 200, '{"result": %s}' % (json.dumps(device_schema, ))),
+ MockResponse('exists', {'path': '/ncs:devices/device{ce0}'}, 200, '{"result": {"exists": true}}'),
+ MockResponse('get_value', {'path': '/ncs:devices/device{ce0}/description'}, 200, '{"result": {"value": "Example Device"}}'),
+ MockResponse('logout', {}, 200, '{"result": {}}'),
+ ]
+ open_url_mock.side_effect = lambda *args, **kwargs: nso_module.mock_call(calls, *args, **kwargs)
+
+ data = nso_module.load_fixture('verify_violation_data.json')
+ set_module_args({
+ 'username': 'user', 'password': 'password',
+ 'url': 'http://localhost:8080/jsonrpc', 'data': data,
+ 'validate_certs': False
+ })
+ self.execute_module(changed=False)
+
+ self.assertEqual(0, len(calls))
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/utils.py b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/utils.py
new file mode 100644
index 00000000..b14efe26
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/plugins/modules/utils.py
@@ -0,0 +1,50 @@
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+import json
+
+from ansible_collections.cisco.nso.tests.unit.compat import unittest
+from ansible_collections.cisco.nso.tests.unit.compat.mock import patch
+from ansible.module_utils import basic
+from ansible.module_utils._text import to_bytes
+
+
+def set_module_args(args):
+ if '_ansible_remote_tmp' not in args:
+ args['_ansible_remote_tmp'] = '/tmp'
+ if '_ansible_keep_remote_files' not in args:
+ args['_ansible_keep_remote_files'] = False
+
+ args = json.dumps({'ANSIBLE_MODULE_ARGS': args})
+ basic._ANSIBLE_ARGS = to_bytes(args)
+
+
+class AnsibleExitJson(Exception):
+ pass
+
+
+class AnsibleFailJson(Exception):
+ pass
+
+
+def exit_json(*args, **kwargs):
+ if 'changed' not in kwargs:
+ kwargs['changed'] = False
+ raise AnsibleExitJson(kwargs)
+
+
+def fail_json(*args, **kwargs):
+ kwargs['failed'] = True
+ raise AnsibleFailJson(kwargs)
+
+
+class ModuleTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_module = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json)
+ self.mock_module.start()
+ self.mock_sleep = patch('time.sleep')
+ self.mock_sleep.start()
+ set_module_args({})
+ self.addCleanup(self.mock_module.stop)
+ self.addCleanup(self.mock_sleep.stop)
diff --git a/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/requirements.txt b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/requirements.txt
new file mode 100644
index 00000000..46fbfa46
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nso/tests/unit/requirements.txt
@@ -0,0 +1 @@
+unittest2 ; python_version < '2.7'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/.gitignore b/collections-debian-merged/ansible_collections/cisco/nxos/.gitignore
new file mode 100644
index 00000000..37bfb543
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/.gitignore
@@ -0,0 +1,108 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# pyenv
+.python-version
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+
+# ide
+*.code-workspace
+.vscode/
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/.pre-commit-config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/.pre-commit-config.yaml
new file mode 100644
index 00000000..4ff769f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/.pre-commit-config.yaml
@@ -0,0 +1,21 @@
+---
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v3.1.0
+ hooks:
+ - id: check-merge-conflict
+ - id: check-symlinks
+ - id: debug-statements
+ - id: end-of-file-fixer
+ - id: no-commit-to-branch
+ args: [--branch, main]
+ - id: trailing-whitespace
+ - repo: https://github.com/psf/black
+ rev: 19.3b0
+ hooks:
+ - id: black
+ args: [-l, "79"]
+ - repo: https://github.com/ansible-network/collection_prep
+ rev: master
+ hooks:
+ - id: update-docs
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/FILES.json b/collections-debian-merged/ansible_collections/cisco/nxos/FILES.json
new file mode 100644
index 00000000..81e89acf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/FILES.json
@@ -0,0 +1,15244 @@
+{
+ "files": [
+ {
+ "name": ".",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tox.ini",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3657204d8989588ff66aaea8ea60820048963b185dd20406c6ac8b86c59ed5c",
+ "format": 1
+ },
+ {
+ "name": "plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/inventory",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/inventory/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/filter",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/filter/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/nxos.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e7ca9dd75d21bf040070da2ea5b306e682b6ac146f293bf553a716352ee1fdd1",
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/nxos.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7dae1232e5092a957f5720a5223952cf9b32b8a485c0a3922b5e6ce52d6eb224",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/interfaces/interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cc177b51c537bd10eeb1fc7c7c9f51955e41e715682fd79716f361785630f790",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/legacy",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/legacy/base.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "977a6440fb49e930efda1cc5743a8d545328794bf69c162369edcc81b547dde0",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/legacy/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lag_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lag_interfaces/lag_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "15d045a61371856388e0a70722d71fc641b1265f6ed0f0e1455c12dc72ad962b",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lag_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c38ace1225c3a6343b8b1ca9ce785cce8fca565c7cb00aedf6781f9c377aa3c1",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/ospf_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/ospf_interfaces/ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2704ddf4b48d8959cc21866e95fa7247b8ebe4925b73b630f26012ffcdc18e92",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/ospf_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lacp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lacp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lacp_interfaces/lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "185aa29fb3446e714498ca14d5e47db36162d4ba1ea4598e2d2dc62db2763a4a",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/hsrp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/hsrp_interfaces/hsrp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "28f522115e221fbdeb231b085ffca48efb72b0c602dbfb4f5145229782853028",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/hsrp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lldp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lldp_global/lldp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "125c05100fa28c5940d71631a1f1b87e784556a60ac51cc33d373c155d550572",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lldp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/l2_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/l2_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/l2_interfaces/l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "80dfa9eb2491032fef610c35857cb32a4f317c36f26433d5ff1170f8ed3deb03",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/bfd_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/bfd_interfaces/bfd_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "24a1bfa05715952e13608cbdc317c254c011625a241fce6bf4523dceee65526e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/bfd_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/static_routes/static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e6adbf0232b2820a224b2ba44c97603bd095ff9951075aabf54e50f9dd0f0164",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/static_routes/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/acls/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fcecc2918e08c336307ac1278a8079b514428d1b2ca7d49c127a2bd95e5efc11",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/acls/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lldp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lldp_interfaces/lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f24dca56b47c8cb25467aac8a554db1c201977299591b8aa260212cda3469826",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lldp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/bgp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/bgp_global/bgp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f9c4f05126c79f4ab4b54fdf876c1a5abf20255e57f6c880f029a42ed79e910c",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/bgp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lacp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lacp/lacp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8548fffbe6123bbc4c0ef8e786f41110959eb133ef85baa2f4c1a6aaf4ad9837",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/lacp/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/ospfv2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/ospfv2/ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d8b47d549019ce630fbefc3c684b4771399e19561c3e2c0658aaf1360742d1a8",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/ospfv2/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/vlans",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/vlans/vlans.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7c5646cafdb19060cb40df9701d47fff87713ff6d07165ca655b9e9df8b36a58",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/vlans/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/acl_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/acl_interfaces/acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0f0096f36a24209380a0177c09d66d95d6807e946af5c01cda1414f444472b84",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/l3_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/l3_interfaces/l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "de78e5a0c84292ac3198c11ca00d24137d6106cd457f2d7a1ef4e35b89924d01",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/l3_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/ospfv3",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/ospfv3/ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4567a654e3a4d79aa9d0d4f9c1b3fb7a88ee3e87b58ece7f510c95c3701c298c",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/ospfv3/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/telemetry",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/telemetry/telemetry.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b4592397205f7363f224fd2a0372555790bd5cd51717539eb64943c97b4b3c2b",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/facts/telemetry/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/interfaces/interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ea311b9c66639168400b63fcafb790ca736f91b5950b1f6e3b3a9c03bc6e747f",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lag_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ffa93ed80f4f67c5514501dddc831143a9c0a75c595138926edffd2eddf7170e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lag_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/ospf_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/ospf_interfaces/ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2848f506da0d5423efb114e59d5611c054665376ad02e903398471296b43f029",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/ospf_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lacp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lacp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lacp_interfaces/lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2d3335ab79692ea1d7365d2c55ecaf37907c500cb8b4ba16758a1cda9ad2b2ea",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/hsrp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/hsrp_interfaces/hsrp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6d27a45987318a4a74c9b6553e9aae114bfb3e850738eaefe6c8757511983832",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/hsrp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lldp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lldp_global/lldp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9b64a0b5fd0fb23b41c542a2d32b265fa4db6028e1582d68bacc2325c499d23b",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lldp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/l2_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/l2_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/l2_interfaces/l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8d237c9991cd88a5f042080508726eb7c2ff258e81348a247fc3d5c53bd52743",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/bfd_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/bfd_interfaces/bfd_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2b34d3a15ca8419eb364c560fadfb0a5636f783a9a6a1321ed7588219cad5be",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/bfd_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/static_routes/static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8956944b722706f138003ae7278a7de6905d97099fb56e8c6e7e8f82febcbd9",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/static_routes/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/acls/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2212e6b5647833521e2adffc521283a252e6c23a989fda72dba5568bb152432a",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/acls/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lldp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lldp_interfaces/lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bc714299884155858f0de642ba578117d1672b64ea96d53b908478cab121d047",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lldp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/bgp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/bgp_global/bgp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7e3d0400a504466a8159527f91fa60edbcb22d484aa9ab39a9ec90ed5aa36349",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/bgp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lacp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lacp/lacp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b5d175fc1ea408eea4f2b9acd28daca31a77c1573c350980f6ced7b65b2c5795",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/lacp/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/ospfv2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/ospfv2/ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "60fae18306722d9e17595325b136fe91f03c5b25abf8ebe5de89ec572a483d3b",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/ospfv2/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/vlans",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/vlans/vlans.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "59cd248ed5907cc438507cf8b249ba042a3ca97f4d5d86a123993a9370708e49",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/vlans/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/acl_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/acl_interfaces/acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a8770244731cba1abe60cfecf273804273c8a9a7c5862f8bbd7b9b5fb77e9880",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/l3_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/l3_interfaces/l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1451e82b19748b1aa6286e328b895f391f296cbd9396dbdfcde5ad505871c661",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/l3_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/ospfv3",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/ospfv3/ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb640891bc39e2475879ed916b8632196dee352cd92729cf8a1370ddba8e1fd2",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/ospfv3/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/telemetry",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/telemetry/telemetry.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dd98125236fa8242aa7027f988335938239012898619e2d4c692a10fb0c2f713",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/config/telemetry/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/rm_templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/rm_templates/ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "72981391359be297438fab53e13fbf32898186b1e19c1f9c040b6b06a91ae7be",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/rm_templates/ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aaaeb302c5edd8d06329dca0759aa0050190e333009e50e8e38a34f89b0a55fb",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/rm_templates/bgp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5def8d72c7b7cc0ab188fa5de449e4d299215c352de9526bb926a5ed867425a8",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/rm_templates/ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "84fbb8d7a7efcaebfe45d4ef4b4c6f2957e64b95ae1d071653d3dd15e7773143",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/rm_templates/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/interfaces/interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bf923784eccef48b2d2ca6041f13dcb9a2e8c6f79a9927102a4b613301c9fba0",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lag_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lag_interfaces/lag_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4b06d0631188daeb4c102ca9b790c8ab898f0f38a0075e1e2e54c808b8f0acfd",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lag_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/facts",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/facts/facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "27d54a0d5e17c737a84a01a577fb76bd42f12962ea29eb01d7ece93c0ca7afe3",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/facts/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/ospf_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/ospf_interfaces/ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c64c39527db33199c06d1d0e99592cc2baf7c7451f97483b6531c70ea9cedea3",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/ospf_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lacp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lacp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lacp_interfaces/lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d362100023340da8779e4b01e347659d46944942aa956a07f1ada732b290a704",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/hsrp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/hsrp_interfaces/hsrp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c3996eb8f0c9919c2d8cfe386979f2611fe69c9498ff30778191c77797a482f4",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/hsrp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lldp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lldp_global/lldp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7cd2abb2f49ab36121dca0e4d1c2109970e304550f7785f15c3c0e4b1cf998c2",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lldp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/l2_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/l2_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/l2_interfaces/l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bbecd9ecc850f0895fd370acccd1455b51d10b5d688587517f7f2fa850c4664e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/bfd_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/bfd_interfaces/bfd_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8fd0f3f66752dfb83eff2c6e945455fda66ff1da1feaf0cc1b0a725061dee264",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/bfd_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/static_routes/static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a203109610a957447d9d672097742ce3ae3aa7e592a1b9f9e15ff4cf04016df9",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/static_routes/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/acls/acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d842a518affc54f310121f40f0ba89773082bd198fe704b8a4b84b37a31c17f0",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/acls/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lldp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lldp_interfaces/lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3484050ea237247732f9d707f67a8b8ecda0be4be0226c90a0eadeb3c5670b56",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lldp_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/bgp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/bgp_global/bgp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ea0596b230cf41f7bca62cdcffbf2ba6036e52c6cf5de7555751d549c1548ee9",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/bgp_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lacp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lacp/lacp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e6b071a84e700fc47bd9e16e99cbf1bfbf5eb7235071749e715aff11b8daba52",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/lacp/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/ospfv2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/ospfv2/ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a5330946ed4c3425cbbc7c07eb3e5d80c06655cbe49456a17e41476336a99f51",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/ospfv2/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/vlans",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/vlans/vlans.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "21bb7a0eb9c8ca46584964facd6efc1be50ea12601ea00ebe4b15a7627d2904a",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/vlans/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/acl_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/acl_interfaces/acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "56c4b84e7e21a7a38084921fd0ec38b6d2d43ba5bd2a67bb790be4952c7d19d1",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/l3_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/l3_interfaces/l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c5d9a989757652d02341fe7a0f2003cfecd2fbe18558ad892a8b61c654fc3f52",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/l3_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/ospfv3",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/ospfv3/ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5c4a71325d8c766e47cde6f272c81fe126c7601ae81ab95d2b6d4a837a4d2e4b",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/ospfv3/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/telemetry",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/telemetry/telemetry.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b10ed162445d467b123f7e92adfcbcb932fb1e0b36fd4705e6a3763e77a233c0",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/argspec/telemetry/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/utils/utils.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3239e6e467c12829cfb1d1fa980ddfcab7a4ac3077eda47d23d76ea1610e280e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/utils/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/utils/telemetry",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/utils/telemetry/telemetry.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7f0c175b11c0268b9f6c18a4b61950967a258c198c8b4a636ceb68acf03c7ecd",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/utils/telemetry/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/cmdref",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/cmdref/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/cmdref/telemetry",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/cmdref/telemetry/telemetry.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c1e506f11872fd7d5be612cc2a081fb11a2855f755b2f7080eeb265e3eaaea2e",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/nxos/cmdref/telemetry/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/network/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/terminal",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/terminal/nxos.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "726cf1938c92d19dbb3fddab4518a3ed5b35b3453e3c492f163f68ede889edc9",
+ "format": 1
+ },
+ {
+ "name": "plugins/terminal/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/httpapi",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/httpapi/nxos.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b9fad4129f6f9c21763b686664ecb3d6f9bcc679134d0dac47c2e8bf2aec5839",
+ "format": 1
+ },
+ {
+ "name": "plugins/httpapi/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_snmp_host.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a6d32d457fe4abe9d315c22f454f8a86f8dcdc4b760e12f1cf4c5f899fc485ee",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_feature.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "36d67b92b0599482ae7ba45918df210f0472cd44107c9164f89675f4fca82014",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_config.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "407ee97120552ce31737335b2739c9e8c9bbbc557e2c3a5aff5c614e381c2836",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vrrp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fdc8582484fc68db240abc10f51a00c09d6ff115c551371ab1a08477a6b82c4b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_file_copy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b6f71c10798468de746930f4bfad9ac2b551d89463dbc4bc029e229e02f44f10",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bd1c8dbc4404d07d16d3a2746d61b644d259c338fa808c45d42724ec920016d6",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/storage",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/storage/nxos_devicealias.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3380a2d5be590e051149ffbb3dd055017f3c2662bbae5ef6813a651984b3cd4e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/storage/nxos_vsan.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bf471a22ff45309d8ede86eec93d3ce33de50c21500cf65d8a72b4f488a485e3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/storage/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/storage/nxos_zone_zoneset.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b804da40c969c3b0846763bc841f903e82e0df80c5112cafd20a9de4d8508745",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "257be968e59a46b0aa73b5b6d9e0bd8e4ace6ef1b09a5f90dc6be582fd036f89",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_devicealias.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3380a2d5be590e051149ffbb3dd055017f3c2662bbae5ef6813a651984b3cd4e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_bgp_af.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7a020171a7644d06144bea46f3b5bee8edc9008b3072a565b22cbd213da843c9",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_nxapi.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "94cac0f1275b7dd6cfee9f62d0ca192b2af78cfc169400d235bd88abac716810",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_pim_rp_address.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9fa0b52adf5c14baa6ba6f4740ced9c1fcb059e70169f14dba3f87db42e910a7",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_reboot.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0b4373dd7311603a0be8f5a5030c9523e5aeb498f321e5c528a72df7d3676899",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_aaa_server_host.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bba468383931b22ee502d25890085600289b1901e49126021528aa6370bf999a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_rpm.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "46f29f34b52e6066e1a28f71477f7ba0a237a1502c550aaceace1fc9070e8ad0",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_aaa_server.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57e28dc0f2bb88d4061f9dd9d0d451fc47751f149f06130ead1e30611bced799",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_udld.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "95a97096371a5f8dd62c2c20da3eebd7d59cb6c88b4f11d1fceb3b05e3ecc200",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b15ecbbed67cbb6398bd74e7ebed5dfaa3b80fef655c122fdcd0ddfa426e56ae",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_static_route.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "56e0414dbcaa314deeb56b427ba5ce8b505c51651e891b0b0292412073c945c0",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_snapshot.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "51a8d0d9293d8e91b2d6b25186a871d5aa4b0c99202f949f5d3d826b90b7ec11",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_user.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "322a8f4bc581cfb481bc96799ca608c864fb86b5bd613113dd219e0fdb0840b9",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_ntp_options.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "66267ca557d7a6dfd771d9eda169ead6540066a919cb3e66414bb6aafe55ba18",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vlans.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "64e735057bc6f048d30aec3d441156b9d3cf728107d1d4d4106ee26b817cfc08",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_gir_profile_management.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "82540ac730ab81c8c27f5383e8b8f6f903c471d6386d05a403662bdb0cfd7c57",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_pim.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "173313c7ba31275de65bdc10e1a9593c0d9c92c0c2bb5cdfc7e131a2430ec84e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_smu.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cf708033b1f144f67b6e871d36d9b266b1d22682aa4c952bac3056de8e691d72",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_gir.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57427a6dd3a90b954b56b5fd0f907fab277d4e6e599d7b80b262f2f1e42274a3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_acl.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4b2b978b9157660d9c30fb4d5f57ad0fbad79cdd8208026d17fae8e57a4f46bf",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_install_os.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bfca715c00f4f40d6e4473691ba6c3f6598807caed98a4447e8d888f95e73d0f",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_snmp_contact.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "734893f07acbbfc0933c27258b4ed180d859d1626668f813d1f12d5a95ab4775",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_banner.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "621cb9a780c668367b89df3d8e08eb9d745706dcb9a166ea9f190d706eb8ca87",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_command.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1721ca1bd987fa620715f93fca2d852603fadd13ebfb7b33f54340a84b6e6e35",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vpc.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7209e596daa7c95acf5489738be78dacc94bbfa63b9064894157a2530ee1050f",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_snmp_traps.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3b2f60a05da6315e71302a65ab736599ef730ccdad29a750f4af27ccfab18fd7",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "452ea709ecf983c340594655fafe73acb7e0999d4d9ad90d6c53ebf1ecc294e1",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_lldp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6afef077735f8bcd0544c81c7a6de71a719cb4d1013ddda75dcad648e843bf93",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb95809e64c3aeedb4781b12f1f027c35fa861fe300965c258bb0561037255bc",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vrf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "72f0710a91ab560bfeb16f1951f87c23d9189f924696e256c25578d55f801aba",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_interface_ospf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fe66710a8c2d5b1470f16136305d55519d8ae4c7b8f5e0087e7edbe80264e4a4",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_hsrp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "24fb5e46a7da3d1fc7daf97ffb2eef49ef2bd82ebf2acf6128e0b8529d1b3d1f",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vsan.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bf471a22ff45309d8ede86eec93d3ce33de50c21500cf65d8a72b4f488a485e3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_overlay_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "baf5e670ce40a05d7adf6d8cefe5402bd006dbc544f50d10a9acca1b4f9ed309",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_l2_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5a54544de550975c121496e2fc4984677b57daaa7bbcf10f46a4c386b5de77ef",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_telemetry.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4ca2fff58c66a356d5aecd5d9b39cd63add0435773a94640e167d8fa12315121",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bbb52367a19679185df7ed0b5d321f65262f7b3905c257c9760fe20ec4a08843",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_facts.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "040c6c510040ccda592c836eb05d8072b83b3f3ec2c5a767c60655b7ca74c0df",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vpc_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "92078ca4ff6ba28728f3857d76fca2dd83473694ee120a9bbe8583941eabd831",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_rollback.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c15f11d0c553b2cd5e68654ffc452af0ba4efd813d43fdae7592439e24d32478",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vtp_version.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58600a004d00d44709c2862e039d1251a69b9aaf99a972a6e2ea239ee5abd7d4",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_snmp_user.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2471a31f2b5ff47ce7052d2c630bc8a9b73df14c996f496c3b8e3e717a5b3bea",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_igmp_snooping.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1809951aa4bcbae0c0d5edc459d111e7d68fbd13ee2c870ff0070b508467ce34",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_bgp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d6a223c6ec0a63f2a3445a2825fd0e408324f5bb32209930c69a0c8df0da83e2",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vrf_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5c6a03391dba3010882c64c6f927d2fc5269c4a76f18a954e65b8cfaa4a1c780",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1bfce945ad73d247b5eb28fa999605192c7cf55e1602c921612d484c260a0ff8",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_bfd_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1b6d66cbc0e9275271e8dfdf0158a1e500cf4c74ec8222982e6ad1a9d4b3c88c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_bgp_neighbor.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a7f9d4cceed7cc392327039d3e188dec5cf82dbd5fe27d04540b796be5e62675",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_ping.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "db4e75de2d3c28c582445f075cf93af4d5aae99d445b3fb1c2ef04be8b86116d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_ospf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aba17b172f12a727d525c6ddce3f75561713384f73dc5da40d5704ba935051ac",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vxlan_vtep_vni.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b58a01c074c5681ba8c64ac3597fe1c48a39b631b9ccb1ad8cb06df56de497c1",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_system.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b69b0ae39d00440c01ccd31d6dcaed99c06e2712392ed31b1637b886e4e605c4",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_logging.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "550d17ee4a25e295ee9f48ea4d3393fa140cd8a87d29350bd09f75c5621bd1a2",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vtp_password.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0e2b6de53327b1829ad3f1532e25ac5ad75b93ab4acaddc3bc58de2737e40ad2",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_ospf_vrf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d7340747017958bc5eb83dc0eb0d800188a89801aa7c810aac9c9df957f9ee99",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_evpn_vni.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "30979bc1297c59a5863f8f67856bbfd3d013e1f86f1087bc2524e18f0152de66",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_snmp_location.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dbc279a74c8cc580e629e7b504d214c8dd78788137bfa97461b58d61e8959b81",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_udld_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5d3833dbca29851609d836e7d695e9aac153c0829933917c8e02690fff1c9faf",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_ntp_auth.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "60ed7ebc7d601a34aca7ac3028df6326effb15151cbf1da170c53ab2b898990d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_bgp_neighbor_af.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "294167403a078c5399a1bad121803838cc39a5dd325ff417448081f8cf654096",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_lldp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5a897ea23b0a0158a720a5b28b82a34bb3a89fd7aa93af2063f80ea72d6848f6",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vxlan_vtep.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "02088848fee2ea04fdfc843b79627cb485a916173653056c0e630a26a3d0f386",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_l3_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "04a051e703649dd9dabd3bfd293b3446310121e255efcd5cfd01cd4044b92f38",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b986fd234acb80bea62baf1747b59c0b83a2d82ebc737a687df2dcbee1d99e02",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_lacp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "47d511e5d2c2f07f1d962552a432528a57a6889bb1cb02a22be089c6b6fb3463",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_snmp_community.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a2325a5691092a8f5ba0356865edaacf505ff296fb26777a7e442bc6b777f0fb",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_bgp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb862438c7a4d10e2465f0f9be133a9a000071d3a68e724b19dbac9054abfeec",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_igmp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f5a68e9d3c5d0ac08ddbdb516b35c3579ed58d2a4bd725e1572ff6dd4838d35d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vlan.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ef894acec3c3593f83b616d2422c488f524fcd0ecf4a35b7fc4c46a13ebe75aa",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "518127feda5f239e8997224d05e4c7ba23747db84fa6ab1bbcb8f142e3e59b9b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_l2_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e5b703c7b83bbc1f28b9d35c51e0fa8694f3b783ce7ad0a1b25c6f7fcf5a6318",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_evpn_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6819dbe227a74901a3ae19052a9dd453b2245cbbb8ae39dc89cacd2dc6f1a8d2",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_ntp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2489dd8218531f7c327c5ce8624352e0feeba3359d65ad909d5f592ce2d73b15",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_bfd_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "503b2984e03740a8c2bd3b8c2f1c4e1f95c95564cb32296b6e0adfa2dd908c1b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_zone_zoneset.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b804da40c969c3b0846763bc841f903e82e0df80c5112cafd20a9de4d8508745",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_pim_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fc260278a43d9ab521c8a3749dd3942ac70c5e845ebc0a521543687a9801c170",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_linkagg.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b64e84979cd2a5f36c5b12c0db0a68bef5edc77bae12cb206449c0986e3d71a8",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1802a77ead3977f56a16086f7004f45f414d0731e4c22e70a77c91cd211b4f8f",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vtp_domain.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3f32e5ea672f814974b9712fad33cf1507e50f749927cea4439ec9af4512203b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_vrf_af.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0685fb456e98612d03cc30b94d8dc37b986e655b4d02f0dce76ff0a4de1d50d8",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_hsrp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8b24030ba0c3b4f6742c9d8f5eaa0b5cda01041db9c2280c20529268d7b216c4",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_lag_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d8fc7749aacd4ea8f6f075cc25bb59c91c523242d019e7dd3d047b9a12bc658a",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_acl_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0696edf15c350778896e7671aa5edf775ec152cf9312752a954306ccc9dcb4c3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "981987f554f80215e0c0c709e1bf2afb024fe892aed30024e07840616ffb72eb",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/nxos_igmp_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126a92c51722c21c158eb814e4e19c5fff44defeef29f8567b8b657287e0d3a5",
+ "format": 1
+ },
+ {
+ "name": "plugins/action",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/action/nxos_file_copy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a9cdf8da10bac4637e036bcc4ec85219288c5938637e48e1fde63332c095177b",
+ "format": 1
+ },
+ {
+ "name": "plugins/action/nxos.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a05ff953d8eb7f79e062d3f3b3743aad7231e7980635a029b67894ba675aa469",
+ "format": 1
+ },
+ {
+ "name": "plugins/action/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "plugins/cliconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/cliconf/nxos.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d6d5397cd9161a1644a28659c8e9b18721944292c8209ef2fa093a4ba0994e69",
+ "format": 1
+ },
+ {
+ "name": "plugins/cliconf/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": ".gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d82889c42613036469c8a3dc0257d4a66b24b27fec733972ae55e4f057123526",
+ "format": 1
+ },
+ {
+ "name": "tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/.gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7ca11f94c2250ee6433e3f2f0ef15099f7ad16d773636aec921408f5348ab1d6",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.10.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "935199601f3c767ca623e1a8c6f73032f3cfee0536e4aed1cf5842b157956671",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/ignore-2.9.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "82ef1693e37c9e02729724c9d6529ea9db73d15f60d5d547b7a18f08e0141ef7",
+ "format": 1
+ },
+ {
+ "name": "tests/sanity/requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8a4ac4bfdef88e75d6e748e35a42fb4915947dfa2b7dd788626fd829600e014",
+ "format": 1
+ },
+ {
+ "name": "tests/unit",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/path.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2a8573a9f320125d028d95cbf582eb7f8d7417cf2d1e71ec8482e6da8354a594",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/yaml_helper.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "94e2f3c867d2582c9f7a0e99e544718e355025c4a51c9925e70158fa89b3609e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/procenv.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b3e6f9bf2a98e4cba1ff1ef8f6573a0fa0b08298658a87bbc9101c45f8874045",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/vault_helper.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "feae23166b6eb502f7d9b77c314970516c9a99aaad7de01295b4dfdad53c5c09",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/mock/loader.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0cfbf4c710a5d5725f84d5f34ab76ec1a0e853397cd945c90fd97769f89dddc5",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/mock.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "42dde10d64500a031d58e747e8af2e12994940f31f8dd56dbd3ee644c187255e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/unittest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3ed698b1faec43d87a2c1ebcb15a2aae48b09ff355bb9a598e5f5a1c928dbb30",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/compat/builtins.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ba13a350ade8ef804336f888d5883b8e54f8bddfb9d0fadc10277a8ca6540f4e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "49ba996dc4735c3463e9af561344346dfae14bcc1a68096ce78364b377f0df1f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/utils.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1827c6149851c9cf46509d2c708ceefd14d5fb078fd9b617f3ad2cf69aa109b6",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vlan",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vlan/config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4cd4cba4fba8bd0ceca02c0cea325b38c65d82a1b01633f59776902dfc00010c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vlan/agg_show_vlan_brief.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a6ad270b50167f7b13c3e7f40f83ebc812ceb7ef7d3455c0ce7b404ede9d6238",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vlan/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vlan/show_vlan_brief.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ee4b8f8f87ace677e2e24306674b258a3df53b8f706e6762be43599c54280611",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_interface/show_run_interface_loopback0",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface_Ethernet2_1",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "de922c7abca31dbb4d597cc485a02b9affe0c85fbaf1d268b15d38d8fe6ba069",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_interface/show_run_interface_Ethernet2_1",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6fda3eb0c249234e367f3e6d981a9957902f3443ff892ee35c3fbb87f8b2760b",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_interface/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface_loopback0",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3342f19b0b7dc6f7e9786c299fdb6c3080cc0b86684990159f8eb13bbfa7900a",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_feature",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_feature/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_feature/show_feature.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7f98b0d0795bcad69e76bf98b5e204ed8d1fa40a24a53a6dfdde75a651bb7e19",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/_nxos_ip_interface.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4d095a69fca2f249aff0bca2225b96908723147017d4ad406307510c6136e5bc",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_bgp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_bgp/config_32_bits_as.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "deed874c21f6472915657eed44c550ff438995b132d365fedb8b94deb510c856",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_bgp/config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f971230c61be923533c3ea1eb63e9938cdf701f3884d511105d551d7ee531554",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_bgp/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_config/config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "03abdcaedc2f739a12fd1c31f37164f02ed471aff024ad8e654a0d7ec3e611e6",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_config/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_config/candidate.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3352c8002ead9454c96fa97e82bc2bf245ac57a69edbf8a934bed4ef809de3de",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vrf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_run_all",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2a24625313932312f1d5e1c1d2c3935f99e5ab28880315c7dd39698df72daf8",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c3a969f827cbacf630aee5ef779f5698d91c4ed24e585132e9110e44e8485835",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default_interface",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management_interface",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc_interface",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vrf/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_static_route.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8787db2297394f70dfa9ea3550d604fcaef84c40d973c498b147d346422b8585",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_nxapi",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n7k",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n7k/show_run_all",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "99e549b9d66b07532fd7631185cbd3cb4e56aec1f228c38b8f1774c03a5421c7",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n7k/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n3k",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n3k/show_run_all",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "db42fd8881e10bf436a6712d228152f2ca6e627e0aa07531751009df2153fc3d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n3k/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_nxapi/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_command",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_command/show_version.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f99a8fbd2b7a7dac3d75081be1e2f2e5e2cf744db94cde017ca4c5a05028cae9",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_command/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_acl_interfaces/nxos_acl_interfaces.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "24483732c8c2cdd3405f5b570c8a0fec1c3227e03968c4963d3a2cf8c7336d1e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_acl_interfaces/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_evpn_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/configured.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "651066df5b4652b7a0cdd7cbff3a187ff28fa3fd7563d7d55e25ea610e4b93eb",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/unconfigured.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "84f47e5f6bde50931928544ec35970db216f2bffd80cff2d7b7350903d86a5c1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_pim",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_pim/config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0c10e6761048c3f05f7143dc844703c76c41ed38e9f0175479874c183cef2ac",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_pim/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_system",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_system/vrf_only",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_system/vrf_only/config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b06aaf337fbe4c17a6347f76bf36cb281f97251e24a228838be117f19bfa9a49",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_system/config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fcfb01e133f7a115f2203a1fda89205d218b7c3d76ab8c3b2f8e000f5e702fdf",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/show_vpc_brief",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1901ac7c063992cfcebb4ba110637bc241aa0fb122959d9af40be8957b47bf54",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/show_port-channel_summary",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bc24581fc9c635989ae2926270c03c4c85c642b768f6685cff7cfdcd924e70f6",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9676910539593a9a50989e688d7848de6074092a58e720ebbb437fa02859bd5f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_pim_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "25600ba56e8e7066889af660ff87eb22aec3ce587ad60c1a7eca25c627064a5c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/show_interface_eth2_1",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "de922c7abca31dbb4d597cc485a02b9affe0c85fbaf1d268b15d38d8fe6ba069",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/show_ip_pim_interface_eth2_1",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "88ad9b709dae48e373fcf04c158d6714de1f94e808fa033204d3b7b4e48bf8bb",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/sh_run_interface_eth2_1_all",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_switchport",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_interface_ethernet_switchport",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "20b1d033b1ec9af9a4ba281a5e1dd7fda2d9e23dad0ffe3c770fcbd33466ef26",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_interface_ethernet",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "92809410ccc4e02930faa0c788013226b538bf1f4210100bf0df2b2d36762a08",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_switchport/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_vlan",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b0f840e54d18c67e347003e11c25c0dc6edab3b98b3e4df5f91f7502f46a56f4",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vlans",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_vlan_no_facts",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_running-config",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6b793f9fc0770084b8babcdd914c4c42b2d1d3256be53d0cba3a78c19a616dec",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_running-config_no_facts",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "783b64a65f752ecfbf2ab084cb164df5d5a818d3dc9980856037a47853bcbfd8",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vlans/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_vlan",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6ac358cca25afd3bbc1aa11515f5e31ea9d548abdbcdf0563949e446d76f0c3c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_overlay_global_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aeb566110f15e114259185610a7e1a17ba8a4a8380f590120292eceab885bccd",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_interface_ospf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_interface_ospf/config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5251c622e0f68d8c94e0215bd6a9f8c5d7ab755fc8879ceff8a9cac9b09caf9c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_interface_ospf/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_pim_rp_address",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_pim_rp_address/config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "358b10ada00b4a323c671eaa193bc4c62bfa6e6600042382003a8efe5708bddf",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_pim_rp_address/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_devicealias",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdadatabse.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4239e6e180de4f4538908b889e123464400c941ac8b44650d26d19decc3e5359",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatus_mansi.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f55f8331ca8b77275d908fcfc308ccd34218c8d35d119cb1769cd792852c4407",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatus.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e73b339bd92467c7036db9b8a553148a902b37fd77bf450860b119c2b893d07c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_devicealias/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatuslock.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4f257c23d09e901d5d1e288ac44018a22f98e22f6268d014740cb29e8cd21f85",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_bfd_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/N7K.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "406c13868678145de8fa80ab6540d805084b62c191a928a466fd44e6e59ccd78",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/N9K.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9089fae22c9d5b25f815c43f8de1b95041c2fd012d721e29e009e47f64fa66ff",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_acl_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_acl_interface/show_running-config_aclmgr.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "606d5b49ef095558924b32c6faa4e06f128f4655dddd57595e945cd33a4dbe72",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_acl_interface/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep/config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cea4ee76cbd062bd53302a5c1f37bc78584c8677950c99eb145c106a8852b278",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_telemetry",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_telemetry/N9K_SGs.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "af042e9ae8d0a2e6b6ddc28f13ce438e7b49050385ca546bdb5f1a1b51c1da1e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_telemetry/N9K.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8d4c2bff81ce036402bf1bfc5a01191ead2507ea6deb7e7d4930ceb35965b1e5",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_telemetry/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_l3_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "96a17611067db53f8bdee41ec48055b8ec808b2968d4f3dd784dfae1d6d85d4e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_multiple_ipv6",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "93f0654869c15b0670ae97f78615662b35f5f3aefccfb3c1e2e463ae3759a6d0",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_ipv4_ipv6",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9b65b76df737c6da986a8850a5874d6f6733c26b8209c778d7d861ce0b5cb894",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/cliconf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/cliconf/nxos",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/cliconf/nxos/show_version",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "12c7c1c28fcd05fced589995a39f0a1389d970f6199fadcbf95543da330feb22",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/cliconf/nxos/show_inventory",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cb14576378ab0f2fd25d13dd4c4dbc31c3940d65ecb5f2fa29b39eba7e04d7ee",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/cliconf/mds",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/cliconf/mds/show_version",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1373917db03d1655a86c29d177f939fdb5810cbe0aa0d285383bd01a9efb8bca",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/cliconf/mds/show_inventory",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3f4622f85efa127fb99feec0f7913a4f91599637232f3771fc2926f47edfd30e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_0.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c1087f213695b914b160ad0b301bc2227a80347116b6ad69ab95fcdaad42df1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_4.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b6b5d82cb1c7c14a84e6f6fa2a170b71e7677b14f9a140ec3afea66614b3a25d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zone_status_vsan.out",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "12120ed58ab5573f67d10f2d100f49ab5843d3c345052245b760b3f2261cf013",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zoneset_active_vsan.out",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a5dd33486ec1c22c00612c5f689b19224c9d0b4bac8d71dcf7b4df0af45f2ea6",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_2.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5604f94b96e688d26c3c5e9994d4fa596696271f4c611f1fb02d9aa811003ce5",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zoneset_vsan.out",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5c13b23c5c61282cf507c732fb6422ec648c22ad0871e61c87ba4ef2afc39c88",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_3.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fea0ee96001834c2bbfdf2283ddcbbaccd73eea57e1fd44861902ce0af2f171c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_1.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5e563a4ed12472625dcfb5d72f72bf9655ef73e13263781fe7a839abe5d5f112",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_2.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "08f7f3dc2d44ed61e7002bc417cea69f8407d7f4b0a62634c1f449f5338f7384",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_1.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4c1a3edebb99205f6ccae4f60cb8ded2917952354ca70cde27abad106be7c9ef",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_0.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ebf357900c35d6e6a43f6f0615598c9d075887254680ad9bc42e99d1f26c3dc4",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_1.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b26ad26717862c6df5d8dbf0aba10a433083e11edb7af65c4596ce257d36a76a",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zone_vsan.out",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ee8465615d4db4f9ddaca651e9b564aee407634303fd9cc581f24c88c15938f9",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_2.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6e109ddbe7ad8d251edbe3ebe5bf960c055ac9a1d3d5bc3865596bf0d65d83a5",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonesetactive_0.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4ecf309eee892d6de881eaae0bbbff8a416bc27be2329d1598dbe25ded070229",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_0.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8d54e9d41580b5969fbcaecb84e1300c6ed29a5f18e14fafe66c264816acffb2",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_acl",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_acl/show_ip_access-list.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "92aa13724d1144e0fef0eb9cb646026ad3ce23bac3f409568bff5f790cf0c290",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_acl/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc/show_vpc",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4876569ce50a9bb5a00412d9e0e3bd17aed2d739613b28796c3224ae5397b705",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc/show_vrf_all",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a690233a51aeef35190bd4fd440a65fd819bc0153ea20b1b362c25392329e04c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_inventory",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3d501010723eb3675a96a954862a0210ac023095947f8e09ea951e15faa96545",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_hardware",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cf21f74cb2df54e19dae270c2b973eea492c3d9925ad7a1b8b59ff9f0e575287",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vpc",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d5e079e4fa7499d1ee8e1f0ef98ba4908b5abe9bb146f2d07909c5e139940ff7",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vrf_all",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f9b34cc87b238b789fa2c54dd008597f37aa0a859cf06c25e5ce60aefdd0ed12",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_vpc_config",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f68fa10ece2a3162e69d8bc6ae207437f76b07a956782d6637214ae088346557",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_evpn_vni_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f12c0f2a38e284dde284dd4042cda86d71671289619456a3438a58f88ab929e7",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vsan",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vsan/shvsan.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6cc392164fbb3fd4f08fbdd53606ae51081e4d3532301f25fa74c7219f9b9e26",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vsan/shvsanmem.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a3aa606fa2138674f3e5da5dff953a177d80adeedd184be62b316572b3b6734",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vsan/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vrf_af",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vrf_af/config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7e951961d52cff08ca4b84f59de8972aabac69cf66ddc61c7b6b00bede109272",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/fixtures/nxos_vrf_af/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_ospfv3.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9f5cb6a51bdeb6744877104e9357a496c75e0da98b2f069a4ab0eebee052c156",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_ospf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0510ad13e4174aebab7e574074ce0f86bf477786cf4fe5ff97e49f0bda68a48d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e2fd5dc3c6407a9ee9dc942571d2d223f81b9e72c90bd9cdfebfe1c3b8dd85c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_vpc.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8f21cb51ef57e2fcec9f6a94b9c8223dead6557d1152d32fc64b8b5882f62075",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9c6c6bf32bb8ebab883bcf378ef365e073bda0a00db0043bb82950ab580979f4",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/storage",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/storage/test_nxos_devicealias.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b01ee837dd25f322405469da4f6463a2af6b4249b7b0127430a61d8a4d5909fe",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/storage/test_nxos_vsan.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "940b6cd1421d33f3a29a693fe8da1ab2519a5c186b80e673c08bf5ee71f4bbdd",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/storage/test_nxos_zone_zoneset.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9587eac4c906edd4e9ae5eef7b8c11cf69b7eec91577bad40c73a6b5bccf2ac3",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/storage/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_system.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4e6755ee599983239e613c516a59d1755afffb968e50f21bfd6084df89fec86d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_nxapi.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "862a4762aa3b47bcd44ef008d8c5decdb2f37b61ec5951bdcdc429451bf2c672",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_interface_ospf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90ea82aa31fe879441c37003752cbfedb8fa8d12d8057efc905c6a9240455b7a",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_bgp_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da82eaaa2fac08f769e6ce57884a4b8df873217c549ce6f8b33e5dc0ced2981e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_bfd_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "618a7aa82787ce30d932571e1ddb8dbcfcd729cd66d333b2f064df58cc066e52",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_overlay_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d388489ce77e9630601e727e3b37956dc58b523ca294e4191e8e34fc2ad9dc1c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_acl_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a111a432fe8b4d731c0ab78ce920bd05a6db7de68effc9f932dab973953c05c6",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_bgp_neighbor.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e68d42b76eaf307d9b7a6280ac4aef3eb06e1d528958eed4ee3cee50334d1759",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_telemetry.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7d95247c3c3b5e8e07b516f225b2525911f3f989126e174930b89f3c9c1de59d",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_vrf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "913ae5d5f9bd0381d888e53d77a39ebf79fd26e80e41e2331d63099f515da0b2",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_evpn_vni.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8d8a5567290a5b121bfd8fd5b1f542108dd8919b3d077332c10f23cf9a796ead",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_acls.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5a2b334924e2db6f14143d0bb8a8422f1c4d5b342bb8d70cc356f6e1979e3c87",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_feature.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4492abdf84b6cae215836403a40e718001392a3316a955a27f1968ca224ac1ec",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_vxlan_vtep_vni.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "81739344da6fb7cf180d5d5e4f95e407066e35fed5e33b64f42770deca83d242",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/nxos_module.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5b5bf02ed72513431db0782c0ecf59ca084b2ec8a5e3dee7a7e48af1b0ed478b",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_acl.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e8d47e9ca43d13746857b342e8c61e58c9f3aa77d3ee0c02a430e00b3e93b412",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_ospf_vrf.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8e215300b89f27ab275c8c0e2dcea171dd0495e7cc84a1c64755286af68e410e",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_hsrp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "691d4d7ced819ef9129d5cd93aea28b24560d6a6a81329758aa1257e21d0e0c4",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_bfd_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d6ff224c66e47d02d2589c0374f67599baccc956df58474b60c80eb445dce0c1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_static_routes.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "32027088712f64a4ad7792891ec7c2c52a22c691866d86ff8a44e0cde3128592",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_user.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "15369502e991565062b76f22d4fecf41c08e511c093955f24d475f909e2bba62",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_static_route.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d907481cd97bf4f02ba0620ff21aef21f9850e91ccc353d54608296e866932b3",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_acl_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "95c2f7e4ffd42c65e27c2941dec5c937f6b6ab3a31a3bdd73cf8988dbf9ea1f4",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_vxlan_vtep.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a503694efd8be3e49051dfbc5021c5f860e930f75ff87a81da34acaa3af574e4",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_hsrp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "59270a09f4944fbead1225ed398a8f48f0335b3d724467986a64321524b65faf",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_vpc_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6af25b14ede676e3940115a43fa27ac988cef56292455da0cd7e2c94c4b2b898",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_l3_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aeb9d7a6ea59a3f4b4e2e8e8796c95f3576937d3a2d29516db667014bce01d17",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_ospf_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "486756bb16e87d9990d39e5d217351972874153a6d5447623a6934df7e022164",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_bgp.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "32c662c6c75f93b03815272470fae47e94a525e05e0619fa9c7bf382c0adfc4f",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_ospfv2.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "43f138de8fcba4f1815be7d0942edaa714797b2d831365cb69419f27935cfac0",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_pim_rp_address.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8389e2cc64e7886bb8930f26c4ff710f538017e9e57c95e2b571494dbd058f58",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aa0d4eda727da62c2340974c74d7bb34ca1bbff362eb88cae77467ab8b4d780c",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_bgp_neighbor_af.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6b943e8ff4ef6f21e39150537bc53cf7ee8a27bc95aeb2bea07e4f806086fae0",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_pim.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8bd81d76569a640b8ac891b0ea58033cf61d7ab0cdb73ce7ade39cc9b082f5e9",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_evpn_global.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "74eb27e9ea958cc877fed0314b02603cff44de4bc5b482112caae1f6fac93e05",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_bgp_af.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a9c81396ca6384cfd85bee758db4e9503a3a60749b23af8aae531f6af5ff2a84",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_pim_interface.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b107adc8057fcd46ce022efbe70ca086c136d69826b0260db5c4c85be8fc9dc8",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_config.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c109e69fcc61a7b75e1fe876a50376ad3c420856bab535c2521a65c4d8d1ceb2",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_banner.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "49b965a0606252a493e825e1d70b5aa5bb6f1ebf47da5b32a7a4abe6f02ad731",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_lacp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "56a2141dbcb4b7dfa6c4b3bc67a039705010ed4ba4dab38b0bda551d1551d4cf",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_command.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7bb6427016010c41e12cf6977e982a5bcfa8eebcb4cd453220c441b4a4ef0458",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_vrf_af.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9e567b8037aab2354f12328b7b9e5815599b56f3c59676ae2034d51bba041c90",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_l3_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "138c4e62814551dfe67d4edb11228584f7c56f1cf3912ca00841e00539534bd0",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_vlans.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "61d6192fee653ccf616e67d5bbcf56871fd78f16e843f8187010320f149a9989",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_vlan.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306b1c98145010826e9ee8963c4f4f90a70dbe1bb9ef6d2ab16b80721e59bcfc",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/nxos/test_nxos_lldp_interfaces.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e9fd17f55fe560def405f22ce248cfb533d3a0f7a0b7d460016adc27f1ec4def",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/network/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/modules/conftest.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2af4846e50d461a131ad3edfb609fbb39a9eb1796048c62e4ead8234bcf5c6a1",
+ "format": 1
+ },
+ {
+ "name": "tests/unit/__init__.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/integration",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/network-integration.requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "234d0353684f5a41c84eabb03e13539abf602dc0de061a90e129618976b3c106",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/tests/common/agg.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7e8df81307448aa768afddc504bff229fc97d2dbf1c83d2b378ad5aacf8e7da7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "707ef55ad4a12259ca6eb996935b9762a9167390b7f5d23823f3922fd4e6246c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/tests/common/interface.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "750abfabe3188e25255656514824cc89bb6c1735453d0ac85d9964b6a4f08dd4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlan/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cd7d88e0eb1bf100a2ec1ee05027b44a56b87fb0faa239feb85918ab455617de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/tests/common/set_state_absent.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3bec1f274bf977863ef07f71fd0e8e9388803bbb8f7328b64c9bdc3ae098cfb0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/tests/common/set_state_present.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57a9bbdfabd408720bed97a5a74dcfc45c4a63795721cf1fc37a66de21240ce5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/tests/common/intent.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "44d54d6c2fe64386c216d624666c7c7ad569eeb2eddafd33f8d7221b9a886ea8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/tests/common/sub_int.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cf19c146d6914736514f936c8415f7c464612566fbf711a66e455023ef4fcbd5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_route",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_route/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_route/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_route/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_route/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_route/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_route/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "98c2462fc70b1e381dc642c67363d6f328fbea921b50ae7ce4d99834db502e2d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_route/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_route/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_route/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0d731b45253aa621f36529767bf39ba769eadbf3351e27f98853503715445ab9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_route/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_route/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_auth",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_auth/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_auth/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_auth/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_auth/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_auth/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_auth/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_auth/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_auth/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_auth/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e6dcf064ab88bc0355e763ed959171405e63179c07431de53a4683b9176c3c32",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_auth/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_auth/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature/tests/common/invalid.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ca547fbd411cd97005f20a43cf0042fe23292e9058cab882e7884a9fd09ec970",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature/tests/common/configure.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "01b0c0531374171f79d2b4a1ef35910925c811ee4bbf055ef98796a1809b1526",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_feature/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_linkagg",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_linkagg/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_linkagg/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_linkagg/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_linkagg/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_linkagg/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_linkagg/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_linkagg/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_linkagg/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_linkagg/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7ad287768ad59bf2a55ee8d1a82e02c5254571e5701e6e5ba79e6722d3ade59b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_linkagg/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_linkagg/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "43f6254e971f9ee3cff60b9171464a9ef6c4e63afeb545d89bfa75bb32658919",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks/network_cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a44eb179fcf3ce067265da237abc3a69094bd62e4f7b8a38c205752403bd00d4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks/httpapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0d7c6a1272a0930b0a57e020842ebd573ef3f21b21634f1eb44fcb13651fd039",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks/upgrade",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5b3d9f6d8aab0a93173f7960308089e82af295c5edbcbe032db00814ac6b9dad",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks/upgrade/delete_files.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f10ba55cf860ad64e10e118186a0b4b4e0d0add9b242c3b97ba8ebc070c1c44d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks/upgrade/main_os_install.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ed8fd95a9fb25a1da8990cf9c51e29f709a67ac00a614170ddfbd07cac703a5c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6d56f3a8a02939adb9107fb8490898670d77125846b402c352398bf2bb62eb68",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks/upgrade/install_system.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9b94e0913011bca6d8c0a3baeeca70e734e5df0cb580bdb8da8c6e74bdda8328",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d680b2f6b01175e06d89eca2630093bf602e75049e83b14993144a096126de91",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks/upgrade/install_os.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "481d8fbd1f7ec9ece769048bb009b4399119d1c0ed3a5fe3a1c275d117960369",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bd8ce7f1243778dc744715dc325997749f508ac546c9d8c80f2802a973ad4052",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6856545faa6714e09a5c413977e4b2bd1189f6be73087ae16d8e2e5b9fb080ff",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n35_greensboro.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c9f1ca73bd86c11ad681573cd4d3f7a60bb9012b29727c0edd63deae523f38ef",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n7k_helsinki.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f7b0719bc1b240e8d973dfb14dd288448092cf88e43b29decd2b9ee5a907c326",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_greensboro.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aa27159a0371f0539093305f555dee56a044121a99e6a94421059f9a41a1d250",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n5k_733_N11.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3dd059dce4c4a9912f94185c047ca1328ef997925ab81f43b97fb79849747a5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n5k_730_N11.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6c45cb2c4ae0d30fbbff02c44ce16827651b39c6c329d95c5d71be4167755463",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u63a.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "be53adf9b486671413706d21e5d79cafa7228d630e30e005e5877950ad1c9a80",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u61a.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "af9193148cb82fdb9e3e5172e67a75be0f5ee419bd53e4a77c612b756f32b5b5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n7k_atherton.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "78187979923132b6a9565337a4ad0a17e1263a729f236522260b3334e2a75fb0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2028ddd233316583d9caf8562e751e0f265b54b2568f0fd734cd730a126a5a37",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a73dbfef837c2598c87ca774161303b30b75a60d6d1f61d24ccc0a329a3bc6a4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n35_62a88.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6a9efe72f8e7e795e46758e2ff83e948fc4931f268131121e1d1522322110639",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro_force.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b26a1ab61b0f68aeba06d732cf15b48541e2edb2abd59398d10e8ba8f40fde90",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_hamilton.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "648a5055c8d4ab194decef6d286db4bc90ddf54c4580793516fc72f2c703fbd5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u62a.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bc25eac5ceb2dc3a2c5f0991321cfddc9ebc2815bc5d19661f2e1f220ef2acf3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_install_os/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "efb275d54a7c21fd007e1d1c8b10b65d148a9121af425a4e7fbd60abacd23fc8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2dd17f5bb9a67da15462bdc91432e4bb6e0653aa8d0c2b44a5527a96cefad1be",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d0153bb3064f3867c1225af3a2136fbb79c3214f104bd8a72baa19270067b5a3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a36e6b5f5bbda74a74e542770a415070514edccd183ec924e71e993a12093551",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e4eabc79afeb7394f266a23ad43ea2436a503762c3c010fb3794229287b517ab",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tests/common/_populate_config.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a2922322bec4d0bef5d18a1dac19db5a9dfde736d2e9730bf910e6d0bb40468",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tests/common/merged.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a3857c6b2c6c6caf0752861d0c99a1d1c13b58c680e1b0ee4d104b17fbd3bd3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tests/common/deleted.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7730e9a5e02d79af67fffcc8d6080303610a86474741235ffbf9c292867af135",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tests/common/_remove_config.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "41da97afa1f73c9baf24ba1357dc42ce3ccb98067e21039ef96ac747cca82964",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tests/common/rendered.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ed05cd81e80f012a17d1aa721dfe898a25471ab194e0327b9d707e966ff6aec4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tests/common/replaced.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddb0baefa3b7548649460c90209b1f78b49eb6d8fb423532e86b06dd9396b271",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tests/common/parsed.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e0665caac2b0a370581209b9f5fdf269895096a47d78c3dd950c01b359b6004a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/tests/common/gathered.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cf2c391596843a282d86e6f7811e928eeefa90c584f5fd46d02f06f736b2bfaf",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_global/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "98c2462fc70b1e381dc642c67363d6f328fbea921b50ae7ce4d99834db502e2d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/tests/common/hels.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a3a86b6aa8fb18cf2a691368fb6c57c1325a9085ff8d6d4c6bf2080e5f368529",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "831d2ffb39e3d7f5f9c68c6b08c6cc25eb1a5d3ed6aad18525b277f2f1a10cf9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/tests/common/param.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9f4fb4e9ee10b2d1b39a1cf960bb1c711da0e2bf4246689a3c4430988b7b5c85",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/tests/common/dis_policy.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0f86d0a8282c78105567c8700bf89a6361ecffb3d0a114931f5c63d1f69477c6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/tests/common/supp_fib.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "958bc5381f21642ae9e8911ea3e3d5cced30ffd36853c1c57518257b4a5bafc7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/tests/common/isolate.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "036253379e53c72eff484ccf2f980ed6289b1d03550ccc6a9fe0ddaf7dfbc220",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_reboot",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_reboot/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_reboot/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_reboot/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3e9684d0d87b8e06df943893dd3e4e6f6b6db15b0215414d77b3f9b5deffc14f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_reboot/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bbc196210e497bbd6717a3ba22e0b0c3c5ecf32ddb060cb7dc570d6e1a5e1e40",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_reboot/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_reboot/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_reboot/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_reboot/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_reboot/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da4c0b3b38ce7251b985e1128e5859096a9b963efdd6005324aba7d9fb4a0c23",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_reboot/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_reboot/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e1ace220a0db906c28de90f2aa0f827bfe1713d8654591a627434f0356bcc1f4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tasks/redirection.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7503f7c9f1756901e21cb39314a797b73217348e39e0911b5583f9cadea1ec71",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tasks/cli_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "85cf134edf2a993adbf49b5058b0f58ef2469b24252aec88e7769bf50e014357",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/redirection",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/redirection/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/redirection/cli/shortname.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fa2f499eab58c6a104d410defcfb788fb313cd79032275820b3dd4c9858a643d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/nxapi",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/nxapi/toplevel_after.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cb6451ea29ee7a7aef3640fd510472cf94aad904ec709c7c9a7f8668b2e224c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/nxapi/multilevel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9764f0f69d61e1e5bab15da2c4777fdd54882c943f9c3dc1b28672272ebbb064",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/nxapi/toplevel_before.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dc4d27301f486813a3dadc210bef95dd92b15d85ce1eabac8d4257a874eead04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/nxapi/sublevel_strict.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "18bc2deaee3d7b3e613c85aa56205c54e17b7b24632282ab457cac744003996d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/nxapi/sublevel_exact.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e4036f66d40e4605f99b9a3fc4cefadb3818072d739f8852f677f9b86aab9351",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/nxapi/sublevel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "69731695b02dc60538bfd42c8f2b14d47654ca8b5ca71733ea27c0112e22f0c2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/common/backup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "78766c6d3a699b655e983e97bea594d85154a1b5ebda3ce4df9dcbf03f8a0878",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "43df275778f0538e08523dc101baf4b952bc09ab3db7b304d817969e55e3dcad",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/common/sublevel_block.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c26e1cbd5fd25874869f326966be4dbbfe989c3a11473f32535aa2179235b23b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/common/src_match_none.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "00a1406ab0b06f40fd088dfec9dc4dc034932d2350e88c33afb61100f0b997fd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/common/src_invalid.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "78e844843120d0aab69a8626303559dfc8e7ffe5b9d164c8a8f164da8cb4ab5d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/common/toplevel_nonidempotent.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0ea008a2051991d9e73c36018341be85291d05cbcbdcb0b357c5a275cb632add",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/common/defaults.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "546d3f8b614a90ab123f67cdc0a6e04aef214f3f9ab55f07e13f681cd5a80391",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/common/save.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "62803a1362591a4de0f5a1ed0d4e4fe7f3c0b489e372ed4f51044bd3e8694da6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/common/toplevel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "958f4b03b0e2c0fcb4eb0a0fdda05a18e680aec52158b4ec913c031f4f5a5fbd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/common/src_basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "12a536d267a902af625ff95b26b868103803895bb7b2ea82a29b23a874252905",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli/toplevel_after.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d9582680e51a891ffce2f1051bb176e28af3a47861b854ea202ae106b3b86a08",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli/multilevel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1cb2733b1263e29fd79f02a03ac3f02c54ca33b2a3200f1337d1a889ec8bedce",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli/diff.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "612a23f00e6cf419a26dd43102fc65b425693785d63d5d2c4ba7800d18bc8a77",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli/toplevel_before.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0a146180bb1d0b2842f19fd09ade7bfdbca7148803dd882664de59018a57db7e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli/sublevel_strict.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f51b2599f7088e629987222db75592985b8b2a09deadc83aa617017b26f340e1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli/sublevel_exact.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4eae6e2e00a98bc5507960e352fdba62b25f95ac760e25373f8b52fa0dfa3895",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli/sublevel.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cfbde7802b71068a8ae2cee23f80f0505472e1c9dd900fb76aa71d5b868ed26a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli_config",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli_config/cli_strict_match.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "161f87d0dcc43aed8afc6144e3481e18f660d117065d9480a9d55d56d2946a2f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli_config/cli_backup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8e3dc4e968e2149e65f78bf511fd56927fb8a0deb33233b24f6205f38bd5d3d8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli_config/cli_basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1b3ab306801d31fb2da765150c680d7e8948a35e20a6ff8c07c94b3b6a7804a1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli_config/cli_block_replace.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8ef6011273c805ccd898782ca5f25cc57c6d734c13b5bf6fa9712a6151a96616",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/tests/cli_config/cli_exact_match.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dd7a76d8c130842211023ca590c94ec93b291dcf534f6e7f090c951930e0cec8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/basic",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/basic/configblock.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f8cfadc33b5527be5bd82a279cbcc769a882135ce815cb6d42177cb51d325e4e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/basic/setupexact.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b358f8f54eb293ce2eac2ead8f8bc2e3aae7383c2981c9c192530d6bcbff3d6f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/basic/configstrict1.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da30d9c2fbe9c9473f957d26568b2cb42baa620e261efbce7d604535ec532cf5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/basic/base_running_config",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "85528fb2bdea51956f0b6d9a7cb07c7bc75e498553f9b5301b904db35ed0f929",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/basic/config.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7a0ddafcd335eb7333321be6c6132400dd5e1ff65941156a384c9b9c3185260b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/basic/configexact2.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b5884db197b0f69276768f1f6e5e8b4214ead32869dab90d76fae353425a4b28",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/basic/configexact1.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f8cfadc33b5527be5bd82a279cbcc769a882135ce815cb6d42177cb51d325e4e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/basic/setupstrict.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b358f8f54eb293ce2eac2ead8f8bc2e3aae7383c2981c9c192530d6bcbff3d6f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/basic/intended_running_config",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b478553dd335d5085c847219eae58a8daac0902372a5e8fbbd133da3850332b2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/config.js",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0dc8a8955cfb2278cc0eb80121e95a99cdc15ef192fb007a0c6c453a837090ea",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/defaults/config.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6de5e1481b607749a549682563f0a16ff4d157637e41184e52143febd462b38c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_config/templates/defaults/test.j2",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4660295b358cae7f791439bc9d8e9a8bb70badfdc095e4ac65e827ffbadf2f58",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_vrf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_vrf/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_vrf/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_vrf/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_vrf/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_vrf/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_vrf/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_vrf/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_vrf/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_vrf/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7e6d7ca0b33d423a6e1a8c3ffee88d74dc8ff5cffd71945764f02eec8d074ba5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_vrf/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_vrf/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_contact",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_contact/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_contact/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_contact/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_contact/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_contact/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_contact/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_contact/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_contact/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_contact/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "61d6efacaccdddd606e36178b4ab10c10fff6ed3c7f71114366fcac758f3b688",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_contact/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_contact/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "98c2462fc70b1e381dc642c67363d6f328fbea921b50ae7ce4d99834db502e2d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bac6465dc36967167b05ee69572e3c7375914b98b8470b33ef9f014cdc26e085",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor/tests/common/multisite.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5ab3b1466a0d7f9f996bc1e1b19c3d278988f72f09f58a49f7d4dd9b8a188e63",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_snooping",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_snooping/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_snooping/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_snooping/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_snooping/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_snooping/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_snooping/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_snooping/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_snooping/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_snooping/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "03db47e855bf0513dc79330e36ea4c511d0c64fe7fefe72883977dbb12be8530",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_snooping/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_snooping/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "304a23e22863572ee37bdb90e2fc91c341b80f93706a25ae5540d4bb11c17fb1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf/tests/common/intent.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e19853c1c346492d81b7a47d8021b155884b65c29badd268215e57158b2a5a2f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir_profile_management",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir_profile_management/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir_profile_management/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir_profile_management/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir_profile_management/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir_profile_management/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir_profile_management/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir_profile_management/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir_profile_management/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir_profile_management/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "29e034cc9d5a073509d64110009287ead1672de3b0cd54e527f70a1f3759f5d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir_profile_management/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir_profile_management/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "47d829f3958de9499d2910cd10a29aa3023531300b6e24f923e17866715a57fc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e915dc46b980cda82a3196a6b484701eaacd6edd416b1552a252030387dcb27b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a36e6b5f5bbda74a74e542770a415070514edccd183ec924e71e993a12093551",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7939a9887cb3ee5175bb02cb77f0cc9f7e4679783cd601f3af7d35be882db0ed",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tests/common/merged.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eeedfdc9e84c49dc5f9e9ffe99932b17f675cbacd2ae1aee4245a3232383e45f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tests/common/overridden.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e44030f8389978d3c59f658e9d0f81334f37ea056de9f34e391176d268c46f77",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tests/common/deleted.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9662e965b7a8cd2d9c1d34d626de9cc98d461126748dcb09cfd96ea64189db93",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tests/common/remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5eec9f97347de055b6827c222d68696f08a6f3a175642e40e6243f18cfea5e8a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tests/common/populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ea179f0b4974165f1ad36daff838b34a663eb136543c6a908df7b8fe73027eaa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tests/common/rtt.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2d46630fa3127a4bd39dfd449fbe569609d825fa48c24f9a112ea963728f878a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tests/common/rendered.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "77e939de87559df332ac4520bd8c7ba06c99b2430aaf708c901fac5e4b1ac05a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tests/common/replaced.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8d5769e76123e9766f57ab4f1abf1fe72283195c35303c7ebac3a3364b95452e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tests/common/parsed.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "91dba21c883b900ab47608be557f7e935e04fc9f70f41dc01bc42a7280812c9d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/tests/common/gathered.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fdef9ff470ef544e28aa16a2688a66dc0d1ac11b67321ee5ac393e991ac50744",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acls/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58eb62f1f74a13baed8def132bd35676141321ab9c2e78bacebe08795d32523d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "62065316c1339ab3416efa35f30f161900a0a9d0451c239963d2162b3b2d1e41",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "83abdb954ce72a8ac9712b59d5d60f3ec0ef8236e558f943a8cf84342eb92d2b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "861098a89fed7d6e5d239e730feabc38aa5fa401abd581d96baa612105d5ee45",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8b11a1ee0f13208e2f2c349799cfa03afb8dc9baa237656d4df26d60666439c9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8163cc66d36b14e593c3e9bec7993035501cd6e32cf8b351a1e1b91bdfad0d29",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "802c7f0aa9e14d8527f5987d67ab613066327f0471caffe09eb04673ca82d2ce",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0f1a91ee5bda989ad9cff5cb2ef4e9c87ff6fea510ef9708a51044202e1c0316",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b2a760d52f67bad2419e0abeca2f2684f2006af2c664a0b9803647a6f750b9fe",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "af1cac39631db06b0341bc5eb002e3e916d112ad46e9c2dcca833a366f265bdb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9f5ae029cd9a5d3a47b8eb078ed4384acac391ffb79ffd0209de0243d6ba1ab1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "518be9c7b98b661ef2263a55c2dd7a2716387137c6ca7bb600d5a15bcdae26f8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5cce514cc872f04cb05f5c09ba91123673dc83d76a6a2a6aca5ba056546736ba",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3cbda8fac0c124cdd1bc1485a44e19a4f6a54ffb89d2f6f244427b792dcfec7a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c991a5b0decf2fd00a16a8c8ef6edf6e9385f767b80a8bdab3a750b551081f28",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv3/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "373ed33a485521ce5da1e2863aeda20b2d5870864c11952c12e3978a7e795611",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/n7k",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http_ports.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da82772835a12331a0eb98e87b5d444a3cbfae14cfb6c15e4fd49319e108e985",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4d7b2cb33edb48f36be65e01bcf680cacec09984a77ea5dfe4023e8f92b4d684",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6d2aa8b81786de223e43a453f766b6644fff40dd897bd3cc037fea78887fedad",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_http.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b7c94e9a7cc01bffddf63bb777cbc341816151099abc50215563c1a63842264e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/default",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http_ports.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9e9f6389a97b9adc36769ba9ccaa2cbf66366905802108d514c10088008a8fbb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "796018f73f0f7d609363c4a80166649b6f9abd0b048299af261f19601155d09c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c36d974923777db78802fe543681aa30afd25db4a945ec29b998b457bbfd8414",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_http.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "84e150e637aa6dd8677e598ed2e709ed393800c232cdb9f83a105a7a2180a1b4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/n5k",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http_ports.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "56f551d0eaf875ce6ec8ed313814a83ab5f317465fd40a8063eeecdc39265443",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f92ffe0a939809885372c7fae0c14ffee0692d3f3323229b4c3ed7b9896c0a3b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9e727a73631fc2530402be6ff78b73e770e6e56d2c50ced8ab6820a8ec5208cd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_http.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f20e5cadd156abc5b188c22ccb4f9317255fb3343d1c72ef0b55ae442ee40dac",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tests/nxapi",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tests/nxapi/badtransport.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b6e5a8b1f3c030cee271d3ebed5f34f2bb8886a8163425a873ede057a662740c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tests/cli/disable.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eed486fb740bcff102d2cf98d8200f651e02c0e37fdcb057f89acd8efbbe3930",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tests/cli/nxapi_ssl.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6704f18c49d0ba048ce5a2ee55ca4928ae6d56d77e71d656f2d1ae1f4d6add6d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tests/cli/configure.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90c572f89fcd77e1d86390d8589d6cf4a3a300d21ba95bcf084bdf93fdca1341",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/tests/cli/enable.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a23fbdf86d62c900b616212bcf651b66862d4e3d5d8086a5d4c824fc665a6a0c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_nxapi/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/nxapi",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/nxapi/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9b0ed6d814f937658ba82fd41c27a32bdfb4d1092fdb2408c4c64589dddb1475",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/nxapi/contains.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3cf6f45585548a0bee77576a862dc0fb30309a7c29e83ee0f8fc70ed50ba7194",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/common/notequal.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "79e5d6d4f147d8526d5821581f72ef5d47974f5b0f2030f7854920e142181a40",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/common/invalid.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7eefd1a513d70da51afc4b7375287da51c417379a5960e7f9597e06ec384b373",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/common/timeout.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "524a9e0de275d39300c9dc2d40d0c6a5fc3ce34bba0435d9597db5fda594c3d9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/common/not_comparison_operator.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "64f8c4253499f7aae4016f2061e529203612aebca4f67e3b33239d6c4c2188e3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/common/greaterthan.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "64b61ed0ed927122ce0272e519a4045c7c6d72b78894362fa50ea5fd00185bde",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/common/equal.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "14986b048e029cb925badb7c68215f343bb553f52ce4fd179816731f0a56373f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/common/lessthan.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "824e4dd1e5e90a5f4f8d6569b3f2a756c8bd2480fb383389dd0ef6b221f26940",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/common/output.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "457395b24e649deffcdfe3e5d661870faae040de8f2178f9374a1c465f618e62",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/common/lessthanorequal.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a83210c63d78e18d5681b99f63d937880ffa63acac463546054d04d8afbb3ad7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/common/bad_operator.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e60c7eaa49f4869f74daf45d6a496291c6365e07b3fe9070044a4977f87d8768",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/common/greaterthanorequal.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "dd67fd29316f581bc0c87577f1e37db746fdd9671dcc49f5758510073359f953",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/cli/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f040f000baad29d1da88a86774710b8f1bdb869fbc3a1bf1981ca8a850d48934",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/cli/cli_command.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e8af0e20c139badbde6e86c101bbd61c775e3adaa22e584c993e0351c0c3a727",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/tests/cli/contains.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cfcd32c26eedc9811de6baa93da38b5568f823283b96a4b9b32c596d3e101827",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_command/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4085ac3511507d3a289e89e88b6f8a67ee74f8bbf66bc4c2d693e7487757d877",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/tests/common/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a5a1e4f29566e594eca3382c88afcbfb0d65822eaaaf26493ed481189a7a807",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/tests/common/net_user.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8714efb16c872714b6d25f661c0e374cc7f50e0956279a01233112df62ce88f1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/tests/common/auth.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fd8c60c56eba9809160473dda9f1385e2361001905ad16e69f098166b739221a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_user/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrrp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrrp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrrp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrrp/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrrp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrrp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrrp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrrp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrrp/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrrp/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "efa00b08216a281a34f569309c7ae04747c3de4f15664a10eeee546f4697cb95",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrrp/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrrp/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_user",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_user/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_user/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_user/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_user/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_user/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_user/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_user/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_user/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_user/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4d20e4dcece5c50ff688f4576e53355cab0ec0bc867a881247f2ef601ef522a7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_user/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_user/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/tests/common/default_facts.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "537282abcc3a983586a4d5acded6a1a37d14057f818f652659cd7de018208b12",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "009215a866eae9dbc2df7c16fe8cb0ed660f8d7b82631666b6a0f11d7088f28d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/tests/common/not_hardware.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "69b284b70d6fd413b2ae830a4a0a64f45f01e13c1171450f3e55bce221dab440",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/tests/common/invalid_subset.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "21fafb05911ba64ee69092f6862421b7c33949e1fa0f2fc8784fec275a240434",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/tests/common/all_facts.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cc5799df80d50dc7b183fcd72773dbeadc8f3addecfb5ab881b346483283c4af",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_facts/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "adc028ec6b9c495dd240a8b693733d738f84e950f4c601ab6b0c40d871589456",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "572611280cd281efce4b8b92f9c0c20e8ffda8ddbf5c5c4da9c0dfd5bb2a3149",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6a97fa118eda919bd0c4d9b45fbacbb04ef221e6d264073eda5612e7b57228c9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common/populate_acl.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "19147177daa92ba568c5e0029ddcc7534f2e3fbfbea0afcc7f89a287e6c43995",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common/merged.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a47a2d6c573654c2deeb7c65feb3b1a1dca66648a411518219620455b6e0ff9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common/overridden.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c43a3aea22508f2b4cbf0c73aeaa206e2bb208f5ac48c1200c57c222d7f7f68e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common/deleted.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c6b350eede177d8b80ec0bbd3eba038e445e040ae39bac79424bfa3ecb7e92ae",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common/remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d212643da307764899d6207afb0fad7e7fe25fe54a9e6f276c742a8eb1df6ca6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common/populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ff18091eda8eab8839ce8b146409c956a16da2af0d78204879e2a0d844835c46",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common/rtt.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ed462472ec31ef149cf8ed4c81ee1f72f40716c6b0c329f849e79ef772987041",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common/rendered.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "38d63226a392a129d331377dc225a75bfa7f05eae370f3d6d61d220588b2e9b5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common/replaced.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bf40389e98cf5696d0a5c5c78b371f1b31db36821bdad34989dbcd36810a7ccc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common/parsed.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6ba796bb5ae8917a9819ede81a454dd9d983819eb3476166d8d243960bf2aafa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common/gathered.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d9b508b5297788d943e82e90ab1201fdc3afe36a24bf7398d808198b44828c84",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/tests/common/empty_config.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a1490f66d148a6f2eaac3412e1c665225c6c98e8aca0154f72d48fbdb36ec239",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interfaces/templates/populate_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3b339858a62e87d8b87a9f59eba8121b0928e7bf655f6a0c8f91c8b0516dca5b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "433875bc04d16e368a0b80f634520323a0edc59f75b6f1b82c7434ac3c107a65",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_global/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_global/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_global/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_global/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_global/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_global/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_global/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_global/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_global/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f61d9852e6d160fcbb5edc3fa51a582ad883db7375db3c05041c0c3cb47dc02d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_global/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_global/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "05e1f339e413857f85f10141aa371c95b4ee9d94bd2ccaf0dcf73ea0c9f2eafd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58eb62f1f74a13baed8def132bd35676141321ab9c2e78bacebe08795d32523d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "62065316c1339ab3416efa35f30f161900a0a9d0451c239963d2162b3b2d1e41",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f40d8c98b469b6d0740c6214f156bd8e6d8f6a1d88651579fbd1ca60f19cc057",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "43242bcf5dc424c9cbab297a8f0dbc4265eb6282ce062f9c81ac1d75220371fd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "738bcee26228eb111e2c66737a653d01127e48a1e286871c74ad35d159b20e14",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "64a5aaa695aea8bcaca388a0acf17234070412d5ff321551475dbf41544df345",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5f87b7975a9917e20ce0cdf104a1128700185f725a777ff0a23758c012597ade",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "312a0aa4009cf5f33a71c65da0f40e8c794cf1ea9bd8419c5c8bbd3b0700f96c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fef32bb74536c7c2ff77c5e1592a59e06093973565655f421a5528830d5698af",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2ea2b1cb8010db1897279303eb700cb4f2a4bf2604e5f73125ea484f162df9f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "93ebd9dcdb03cd69eed43b1fdf3af64cd7ef4afe8d90f479bf7158c3da675d11",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9de513f69bef45bda9face3249906afb627e11055d75fcf01b84a71dbe585801",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ad49263e5a317bfa3c45420a4ad5f16e4ccfe2f3a8a9712e9fcdaa3060e87488",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8e1063bad75108140766de4f98e3a1156d5309b2c6c141d8ce4db482980c49d8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4eb9a54854a9ee894385e0f3936cd29504af79b33e3e43c267f163ed8a3a58d4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/tests/common/multisite.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "66c7b5be62ef98474de721b0d02e0e3c1e2170db8bd7523b78050187602cac6c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interfaces/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58eb62f1f74a13baed8def132bd35676141321ab9c2e78bacebe08795d32523d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "62065316c1339ab3416efa35f30f161900a0a9d0451c239963d2162b3b2d1e41",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "118daebcc306b57912888b4132d1231f3e963c6bc3e55ed1ea996365d17394a5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e6bd7b40103ebc9115a513f3d81ba7e4b8574e14f4fec35c509b9d268e419454",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests/common/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "504055a5e91665195a287fa662bd4eeb820a0d815b8f313cb33257dfbb955931",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4c2043056f7491214e3cf3419e3448b91dbf67ec1dbe75cb1da9d7c44a83b98c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "73671ff54c9c31e488a84493dea6f387f69d68c37df84dab9ceafe57c6df8086",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bfe6911731fd41d3210aeb03fb56d243bfac52358cc0e06efac945b23415a1f8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f7ecfbb20e87d2bd0ed99938a8e531ce1582b7401e58c694bd028476f402206a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cc5f238d709651326bf419d8f7eb1a6c981a34bffbc5eb1f3d582bcf2f2f6ac6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a9fa160d2c1419ec7c924e34835cd9a073e331f65018afac3a630bcdb260608",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c3db1aeb5027ae772003eeafd848979b1df30e1199909a70115138d9b8af2e82",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests/common/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "11a78612eeeabe7bcf609e4c6aa3e8bdc2afa5d76b16bf71c71cb84d26ecdd9b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f112271d3ef89562a08c80a355e10f6ea12077e381bf260412d911624d4d1bfd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/tests/common/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2347fc0a8e302c0d3e56859b5fc40e1048b35c5efa02e1508e5dc8d5109a8d0f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interfaces/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/nxapi",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/nxapi/set_domain_list.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4d308849c39aa433d93f1b309105068f6c0c389ee17fb05c14f22f2b4a92d1a5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/nxapi/net_system.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f941c0c1c8d6aaebc4c9c0db7eb357362afbaf0d827a7ecfa01c49fad9fb2362",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/nxapi/set_name_servers.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f51280c5550129aeb4d7f36d6e7879fd216fd78635e696aaed62845c927ebfb6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/nxapi/set_domain_name.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a53c1b01f43f5f9e6838aebbff7c72de24710f68aa57db6a5be527cd27948d8b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "489cf69deeb3ea03f24bdc3341cb1c8179c81e2197427bec582f817c652837a9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/common/set_hostname.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "acf5085fb708c504d136bb0521dd90bb5c4be6ec7e83e9125e941d28b9beb199",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/cli/set_domain_list.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bfaaa34ad4eca7957435013598cf72084aaa5e6d8c126b1ac792a245451fcd45",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/cli/net_system.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ad71192133889d8941c73834ada736e49f55cb51344749ef112f1d7b1d810b92",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/cli/set_name_servers.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4ef1db41a08b5ae3ba036d284892ff548848b4412617b8d77567b4b6bec2dcb3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/tests/cli/set_domain_name.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "45dbd8e98c38dcea1731493ae58f1eb5afc5957114cea8fa08baf521365e067d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_system/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld_interface/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld_interface/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld_interface/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6298f5e68b9306317082190f235aa575f5269663ab41d5483458bcfee828a1d4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_udld_interface/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc_interface/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc_interface/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc_interface/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d2fcb9c32d7c514e08d02ff511c67c4224c5770ddca684eae4ff9bb5572354a6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc_interface/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0eb1ad89a9131e3966277c1abe9b4061876689d5299be5c5fa4f9f6bdbae281e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni/tests/common/multisite.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d3f8e376f6d08006f77307b8b23138cbddcc0669ff40b881590209cb10d0cdfc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep_vni/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_options",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_options/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_options/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_options/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_options/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_options/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_options/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_options/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_options/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_options/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5749bb44727d28a9cfb22f3fbbfa07f5c6dd12168595565f5a8b125a774647f4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_options/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ntp_options/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_interface/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_interface/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_interface/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d7f762bdbd97e330d48a5fedff903c03a7c607d3d07bf8e12d2f1d07a4dc97c0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_interface/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2bff2a18c137e32383e37b2b85a6d4800764831269fe78de5fe393d799bc8d23",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "415154a2ef9936f47fb59544d6ef8b6e6e8fa20d2f0bfd0643ef5590fcb425a9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "43a97d2b65848edbaaa5e221246266b7d4fe12a27a444c841679e1cdcd8d93c1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/fixtures/data.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ef43c9adc8aeec6910b4373ba0d9fbf28048ed53ec631ab9fd6fa8ad00a8a3a0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/tests/nxapi",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/tests/nxapi/badtransport.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ced8b1b02b188db01966fb3b7859ff7df9c913bffea20468381de27f6515a35f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/tests/cli/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "214d03514a8b2263ac312a0ac7cece349dbdef5e7b8bb1a6679e764a1fbb0351",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/tests/cli/input_validation.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9823b75d4c84f3298cd440effba30aa66cb83f462dad43a36b1031df6c3e5c39",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/tests/cli/negative.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e004e9e343ba80e93ec21b64b4d12378f3835e4f4e91bef1fa50d29dc40d0cdd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_file_copy/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rpm",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rpm/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rpm/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rpm/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rpm/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rpm/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rpm/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rpm/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rpm/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rpm/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3d2e833de2b229ce59b3e1b69f34b19ac1912ffedb1c77a167d1871f3643550f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rpm/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rpm/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58eb62f1f74a13baed8def132bd35676141321ab9c2e78bacebe08795d32523d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8755e078fc0f45d349ea94c16a2805497636958a1ee5878e2e75530c5f651712",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fe32768117d09361b752167a7a98a8d35be9a2ac3eafbc096762180df2372e1a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests/common/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "931c829ea8e7e7b53e41a010169ad18213ab26c5ffc7015e6ee4d4ced711e58c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "214982100cf145ec9a2dae0d4e1ea8a24f2ccaffa43c523bde73bc0f3bda7ecb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "48338b2c66266b678f581b6c3cf543dd7dd993334233c4c30159437e780ceb40",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "07e40a19386d106d9f3aaf7e11516b330eb9366f52d5196c02eb4ce97103dd2d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "92d4293c71878ff084d4e218c29873799f587f69403612293b94564fd3ea2b2c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "984b8cccbb74d8ada33935ad944cc540a083b71361f543b823cd365e26c150d4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c40119a254f3a1314f7b3bd8cd8366106f133396a0d9d5c13bd5a7354800822b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7b2b2a69e925f7cc6c782c050e4d956a2f80239cd268d04096d8af1a20743207",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests/common/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fa83156610ceadf80240db5af2a9b93c998615804144e64d22be8220a1b5d96f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bbe359ba24f3867b0b4d490a8d17019bb6e2ed8e05b9c80b0031a2981047277f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/tests/common/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b22bdb29cd93b281322449aa945b0e8a270d76fd13f295f88baa4b1af317cc60",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vlans/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ec4fa30fc4a7b9e002d1c7b3932286ace72ba36e4f532e2cc79f49d07e0794c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_version",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_version/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_version/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_version/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_version/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_version/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_version/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_version/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_version/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_version/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e97ab76c21b2524dc4cf12bd4ea4e93c1e52b4d1285698a7a30af15de3d74877",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_version/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_version/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5495873c3c3c49d12637f911af2b9b986cc442247efdb28f0937ccdd51ca4bfd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "62065316c1339ab3416efa35f30f161900a0a9d0451c239963d2162b3b2d1e41",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e39db3113ec9d1a18ecc9670e11829928e9b1e542c9c226fa1eaaf2b22f0c6f9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tests/common/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e67589c3b2f131f5c49805260b88201063f30b157fa778b2f8a4aacfbcc5ac02",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2c75ca2ad92bb5fefd00f4763486406f750c34ea0740052fb04d468866360a58",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3550e4c9585940a20be8a529bb472a69f8eb945eed0a77c121fa73c3d0e37ed1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e276c43f44dd58717513d26fb6224396a9a0612796ecc4c5d2c2a1f4fc58f4f8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cdbc58f79c94e23c371ae30de9f1400a26b0b02128ed906702b2e41eae540e12",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "44844e4c82ae77e5e25cc891fb299b1559e16eff535873bc5a507d88e7f0ae21",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "13f3da384288fcb3fd991aa2eff6861f656c0fd84c07268da7e4a2afb7b97273",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cc746c31908c52ca6f3c552924ed25af885551239094564638c29d4ab9d83c18",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tests/common/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3d31c94be20410354fe978f5e5f3210180570a3d6bce1449796ecc1d008090da",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "49e26aa9b2e15bdfb22a664bb580cbc18b112551bd9971bd4b8d2c67b3a0eaa3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_interfaces/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58eb62f1f74a13baed8def132bd35676141321ab9c2e78bacebe08795d32523d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "62065316c1339ab3416efa35f30f161900a0a9d0451c239963d2162b3b2d1e41",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0959d2d1e63a624ae37aa49e4da696342711d247cc1883691c06a94b47de0fd1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "02419b06bc70f30356bebe5a7f2f9aee217e51da0dda5abaa73b2d8ba4ffc814",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests/common/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "13914f3d976e926a8b012c8ca9c8f8dc20fd530239607f0ae187eb891b9fadc6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5c058fb73f156daec1f492d4a02390f1b20c20df24942227839ffa9a9c3f6b0d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4494e5a19760b9ecf4e55fc2d1a184affa93b7c8c8cf2c0757a96f7fbe81b5af",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e7bf4b43ca609d283c69c35f598e51c157e2ea1026ebb99e9bf4a40e862ef4d4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fc7af2d92df2785b20443f99d97462ec273b243f297f9cf7527ea5683dfe36de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "981adc50b1e7d328d8bfa6cca9eda5158bf2937b662f68a2f56788f5d2839f49",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9dfbc17009aa801e2ce7909ba90c5d3f54f058d9020c782c0312d39dc12152a4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "622cad83f89ffd85a9c22df51d3ec4887069fbf4ef6ad389b071a4b67458e2c0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests/common/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "571b183456bd95b17a74a92a00d6afd75941722e182c7fd898cf22d8e2a9fe0f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c683c300b226d0dcf38af0f2fb55b961e50981e029a6f84f8e2e35b864f4653e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/tests/common/rtt.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3dafb7f48a22e58601524f565728c1552d77a424bb8550db5821ba835d3d699a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interfaces/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e915dc46b980cda82a3196a6b484701eaacd6edd416b1552a252030387dcb27b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a36e6b5f5bbda74a74e542770a415070514edccd183ec924e71e993a12093551",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0959d2d1e63a624ae37aa49e4da696342711d247cc1883691c06a94b47de0fd1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "823ad4608bc4788ff160348fe4e6be75f267c9f2a55bf2043875eb2d76084f39",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tests/common/merged.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "15850330809693946dc8860395afb184df8e54a33b31d22f7643f2db08ae4153",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tests/common/overridden.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "996f3cff683aecfcf53a98558fb7546d2af53e1fc8a82b5bd8a65a962a7285da",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tests/common/deleted.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d01475cb6afe068d54b0f8dff0c8780ab17ea10512fe0eded7599fadaa4982e7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tests/common/remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "303bc0ba56d6f13d152987aaf4b6953d88e4461e8958c7db467d52d247a63dce",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tests/common/rtt.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da4cc4b73fff0726ba768b2720135dd8608d19a7e9343a929c4d613b7a05edb7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tests/common/rendered.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8f4f6d304336ded4c137131da0c7a5757bf751e5b906dece814d9cb7d7da8473",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tests/common/replaced.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0d621c66716f0c9a73982c41651f9e5ca36943da94dd2ffbf268e0eb6bf134d0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tests/common/parsed.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb55bb586541838d262ff1f0b76672371e3d10bd8faa70edd24017b965c3d485",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/tests/common/gathered.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e9f9bd13003c7ece5676869dbddd7ca40bbac3c6f70bf061e51b63c501c7ceba",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp_interfaces/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_interface/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_interface/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_interface/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "477126f0326ab9e6eb8d24edb4b7ce9b6839fe2d9f0a4dd174432bd1eb693cb1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_igmp_interface/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "816960d170d2007db75c5f102a0c6b902b7a1f13c8dbae64ff3eef6f534aad12",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3d338c1dafe7ac7345f4873b4cad9582b6fe2ed57741173534c27b20c102de3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da2d3c6a94dedf46eac0de1796c7f1d5986cf601301bf74bfbc07ecc725d4acb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "665288590cd4226da42511817f09ccdfc92df36c9621583cd2c82919af295c5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/tests/common/common_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "24856a2b59cbd60a52395079480adfd6d743aeaebf8925babe4abbe983b463f3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/tests/common/misc_tests.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "768466c2af62583155d9c6cc748cdfee3e74cbf6eb762cfd78620ea452f83ad2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/tests/common/common_utils.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "29fe147eaf3150bd0b296e9841b44d4e1430fb42edefe1b23869a3a998b7eb6d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/tests/cli/misc_tests.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1287bbc7858072d49553e5ee51b5987205bd02bbc0bc46eb8b91242c75f66d86",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_smoke/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5c4f2f496fd21184c60c4f446df594b5bd5fe15fb5316120ec0f37adbc2578ef",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/tasks/platform",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/tasks/platform/n7k",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/tasks/platform/n7k/setup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "758a1db808e54b9cc68e10f0dc15b164baa8b51aafa6b9ec9dd28fb6c7656fb3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/tasks/platform/n7k/cleanup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "572b6ae95bc409ff17d23e74b93167263cc803e52e5ea0d23c1e0cb93c3ea255",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c7e0974a1570ff7124047f5feb2e03b53f08e226c60f3a2e44abdac72eb49585",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_overlay_global/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rollback",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rollback/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rollback/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rollback/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rollback/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rollback/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rollback/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rollback/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rollback/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rollback/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6511d33a074690c715c8e24b36755f15bc4d002e1c17c71f99321ac2a4c05c7d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rollback/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_rollback/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ee52797ff8b5825dac2cc885a5e23c5fe8d167a7fb5d5f90afb6545f281dfd0f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/tests/common/purge.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "66511fa22e63dc704eceb2ea1a9227c56d8b54e53b46f3a4eb06133afca5254c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/tests/common/basic.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1195987bac1460b6079cf9351c2cca7cf10ad454329564d0ed7ad7dfb902936c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/tests/common/net_logging.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f9a396f387812492a3435cad83964bbb2acd67f2dc6a9b8b7c593a09792a7ae4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_logging/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_password",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_password/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_password/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_password/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_password/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_password/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_password/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_password/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_password/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_password/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "96ef5ee1eade8b1559c19d46c735544d897ec77488cf5dfac3f603f321640a95",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_password/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_password/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface_ospf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface_ospf/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface_ospf/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface_ospf/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface_ospf/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface_ospf/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface_ospf/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface_ospf/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface_ospf/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface_ospf/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "03a7b7b0fab6f1ee4bc2c331cb6809392b7ac78396cfad2b8d2cb36551f173f1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface_ospf/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_interface_ospf/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58eb62f1f74a13baed8def132bd35676141321ab9c2e78bacebe08795d32523d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "415154a2ef9936f47fb59544d6ef8b6e6e8fa20d2f0bfd0643ef5590fcb425a9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0959d2d1e63a624ae37aa49e4da696342711d247cc1883691c06a94b47de0fd1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e5c77855a424301d8fb2293bb1f2c9315e52c1f0957f662073420773dcd835f0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tests/common/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a945f32142bde2f57222243442c3ee1e0d714ea2ddff0517dd5adfdd514ed401",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9b8335b5f370611e94746fc1b1abb73b73140da70ab05bc43e7c11ca74f3961d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "663bbf2d37b212c99251b381ab6e9f9c18b36d64967b15bc728b9563d0a473ab",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "acc4147b980614a0f68e42a963461efb62a43ba6c453f668984755e7fc7b491d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "25070a7cd20c7b2a7d0d0ca3050f492d340a44630627cac59eac5d8e28c04d5c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6c11e50372fb4ffa474f25dc279f9f6abcf92ac84f94f331e54eea10af7556fb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f900efabd6e4f58851b6bc5f83e69fbf6432f8067fd17458d30651e5cecd0a67",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "77ba55aecf8a0847e4ad84a2fd9999ecea0a5c69461e0305dd0e6c323bd87d3d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tests/common/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4b708f27b4d90d29a864c216b202a4c913cd1358d287444faf971be8abfc8e8d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c82049d3f6ce4ec3d44d04770d4cada1a0d9ebff0aa050b69e93e7a2d4a712ed",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lag_interfaces/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58eb62f1f74a13baed8def132bd35676141321ab9c2e78bacebe08795d32523d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "62065316c1339ab3416efa35f30f161900a0a9d0451c239963d2162b3b2d1e41",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c20db4ae119778afa8a39b9a4fff5bc78c43ac6929de48b42746b9d8835ec831",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b70c1645ff79d82d3c7dd9be5ef57e61423a2b3013078e6de7a8cf4715c96de7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c64e3cd5f5a6972e0d6e43dd6f94e00a6688cab1b65492da4dea43624cde526b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b9d4c293ea9be09062f65bf5a818b6d1d4ececbbbb96863fb9be7d7b4b34170d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aa8b405524e0b0b013d3d485db61a01bd113429d3a6ab88ff9a5ac831c83ba3b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb99f2e41d6e1854e2fb7515d86e12cc196267572df04ece580a1b4e3a5b25eb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "71b613ae2bd9e8eeff08c8ecfcffc55b709f45459a5fdba15afa4da99120dfbb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "54499e3674c14b010c1ba32e1fdde06fa205081c4d5e40abdc8a7ae16ac4d7ee",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/deleted_af.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "94b9a0c4174573834ebe66a9c5aa90bdd00fbf97612f2c12a22ef651837a8e4b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aadcda70bf60adfcb1adf8973455031b31290c4891b5d7936d10d16e1f39c4b2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "55861d84a13db4c5fedc564b4ca082a9538bcadc802701daafde0721988b0546",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fe7be0ff4f64ae4c2fde3d3038b2ba52d320221a4b14dbc27a28e303c212b1a5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c061ef95b45dd5468ef4ae3f7e8e106b245c1af541fa62318cf3f2cbd002eaf3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/purged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7396eaa81ee431d22df03fbb88aebe0e617da4011ba253699cef7e9c3340a0e9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/tests/common/replaced_af.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "38478d4e942cdeda4536a2823b3c1426bdbd5adbc85f746bc4da0ca61c067ad5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_global/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "935f8c36a464a7fc1a8b85b80e45de97d9c74a43d39b1be28b39490cf98650b7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af/tests/common/multisite.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3622e4c0ca58b71e4f609f77ca9eb75d02436a0dbd3bbc8bc3ceb00c3aa2d5ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_neighbor_af/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58eb62f1f74a13baed8def132bd35676141321ab9c2e78bacebe08795d32523d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "62065316c1339ab3416efa35f30f161900a0a9d0451c239963d2162b3b2d1e41",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0959d2d1e63a624ae37aa49e4da696342711d247cc1883691c06a94b47de0fd1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "48bb885852dbc0567a4b55c2ed2d013b82cf030ed5da72cadcc429d9791d7d98",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1068bd0101af21a0c5919af891954baeb64f8e9c15ce2000bd595c4e1bdb10df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2d08bf205b05a3fa33bf7f7312d830e5649524c69095e72ec723edeb7c24aed",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "be4768ac76072de82b9b62c926c5029e1a4692bc254a98204d7b934988495f72",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3d0d2c0f14e0166028e145e6708d0d2385320cbb8b163a4ba849285d43d4b075",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7b4c722273eb0c5b17c6199419850aeec72aa8842ebf9752df472c65358aa0e0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6537de02dc2aa5d0d0e15aa9af994371ebb5b2b1d8ce95f1d58d27956ec868f4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "394a8fa5c7b6686d00db1e3cfbda3b99bac6f081f5d8ddead254aadb16fc130f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tests/common/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d0f3024c5508bf66167cd40f8e888602d944f34d98e126b1207fe0ad98787f24",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6f75bea19bed5ade06755ac4cb050971c0acab05e17fefcc12fa32a9ca6a85eb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_rp_address",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_rp_address/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_rp_address/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_rp_address/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_rp_address/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_rp_address/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_rp_address/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_rp_address/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_rp_address/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_rp_address/tests/common/configure.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c4aec47ad268e47f77eacfa60a8c5631433a1965891ec4420f2ca9052670a6e2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_rp_address/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_pim_rp_address/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_traps",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_traps/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_traps/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_traps/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_traps/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_traps/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_traps/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_traps/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_traps/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_traps/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "75de8512353bc1b6e30d1e9990748e8aa43d4947eb607257be15565e6ae1e5fc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_traps/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_traps/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5495873c3c3c49d12637f911af2b9b986cc442247efdb28f0937ccdd51ca4bfd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "62065316c1339ab3416efa35f30f161900a0a9d0451c239963d2162b3b2d1e41",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fd7c54f1024b3dd303106f8aa91a3b4a7cc3ebd0e4e2bd82b618baa5809a3830",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tests/common/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c434f29170fd86cd13c1317a700c6ee330606ccce720dcc06d9bc561db37e4c1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d6fc432f51be7924c046a143a2b40f4a7849fb05689620352aefaffa2e727187",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b6c71ed163db6cd5f8986fe2cb323312801b4837ac770178d135d80f9d2f0e76",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7b1f22afa10893e688abf6f293ee21d7c1d842cc22dcdcc1a9270f5a6842fe5a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bb801d88f3ff822a6b991c70a1def9f09dc959771721cda64cb80608296dbc3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e80c2aaa12932f14e24d066db9251949ec5947f338798cd0c1e5710ca25e870e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "11717c939bf44828e88281e73bcf328dd449e919455970a58ee8e4fb6c2f92d4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9001b9bf27bcc0a91bc2bcb3db862d0d509490e08f5cbb37f8024e3f531fb704",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tests/common/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0231447f0dbb3cbd99bcd2434cf925e7b47e130bbceddd72caebbf94465bc2b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "376eace2b83751a4af22bb1b81ca44caf06e0248d54178dd5846bd2dc082975b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp_interfaces/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server/tests/common/tacacs.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a7d7bc68b73bcd0e38b9854790d836466fc2f7f7b01d8f6b389c685c2797f16",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server/tests/common/radius.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "75664a0cd1d2c4fd3a224433c945ce2536e87ac548c1f6dcd558ef7ef951911c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58eb62f1f74a13baed8def132bd35676141321ab9c2e78bacebe08795d32523d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "415154a2ef9936f47fb59544d6ef8b6e6e8fa20d2f0bfd0643ef5590fcb425a9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0959d2d1e63a624ae37aa49e4da696342711d247cc1883691c06a94b47de0fd1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4ff1783f82563a6c14293e0c0e77331c291adc98f1b32ed2101c93f97a6ff993",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tests/common/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "546783ee328305a1d25b609baf698a17d4216375822f05dbdd4e26c772e2fa93",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c72a6a20b5f1f9862b20da01e465b878a6ee30026552e1f20228cc7dbfc86ded",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "de7275ade4ca34153528d80de0739c76376635563e227ee2f6741376c014c384",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "57a34d74121d9e8f4313df46ef3763a66d8418769c71265d642312b7bf6c1c92",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c299ee367f663c29faeced69817f7d979f4f5867b37fe2ec3fee11cb0d6f8382",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8589426bb34df90d16b1178c1541541046114f6375c33b472228fe5a9d7290aa",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a2be5f36d35465ad362b492591f202f6e6dd07a33e032115a428c85ce4c6f5d2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9f5367a939db5f6302905f71a16e1b8145c270b573a1f57e585f1c3079214863",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tests/common/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "49360048ebf145c4ba906bb5a71eb9b4b9c88bd4f7a0ebd4df0669ae17e0c5f1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "89cb80b41dffb5b3632dfb19574e36b03313324859e69743aa7e9957edbe76d7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lacp_interfaces/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_devicealias",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_devicealias/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_devicealias/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_devicealias/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e6bceb59e0ca5c61505cf242f54f76e57093a670a2d91de88579a69d3af7e60c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_devicealias/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_devicealias/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_devicealias/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_devicealias/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_devicealias/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "235cdc1feba90793e22aa2151e96f94ded9bfda265b0f92a5b4e613e1efa985f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_devicealias/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_devicealias/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "37bb266ed396b0deedfadc54a835f15862266232e9148bbebf537367a72fbba7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "98c2462fc70b1e381dc642c67363d6f328fbea921b50ae7ce4d99834db502e2d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e7e58d923c516965ba91007e329d12c740570d0a527c2f4b8da31c60a4762efb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af/tests/common/multisite.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5f7d6ab2375cc5aceb4d98ecf2677a93cf14c88aec7fe680ff0c1b665fa63c77",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bgp_af/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_global",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_global/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_global/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_global/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_global/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_global/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_global/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_global/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_global/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_global/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a64cdc487c303db6ca15068fae8a0f1303e739903c53f62cf4d208fbed7c6820",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_global/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_bfd_global/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "20f59d65f363d4c379cd2c51dcb40f993e78c195f6f6a108101a835228b3c5d9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_hsrp/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f4efd3466634137f01a7b06dbb47ad4cb69e2eed6df6c2e3b6ccb5a8abf39797",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58eb62f1f74a13baed8def132bd35676141321ab9c2e78bacebe08795d32523d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "62065316c1339ab3416efa35f30f161900a0a9d0451c239963d2162b3b2d1e41",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2c54151fdb4ac522d3d61a0163ab0352efd067c656601888ea1ee7b6808be82",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "46e57df09d074500a41f8257b648ea4f94a356ca598be55850d7cf088a3609f4",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests/common/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests/common/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4c466d2e90eb2497cd8fd4f02e070c742a61f839c333a62303e1723c1d3f66c5",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests/common/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f7241e91b63816298ae5262f7e3b9dbb682381f51927590dcf97e1e725453646",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "65223dbb6d068a911ae831982a19e0b8c38168a1339a74e237ecae6165e7dcca",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bbfc4971a58dc25aca7c2fa854f3cd7276a4b316ee71bf018aae90d15f264cdc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "47054cc3071b5bc8ff7d74099954ff698d579763aff56c7273419037084772c8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "24d98d5ac1db431364338be04332a1c9e35c760ca565e51c8ddd0378875a8f29",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e68f575aa38a23920edb9d472c1893164a7f34673405c0415bb3b808ae9c0f2e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f1f1af3c76860c10fef17e96046338f7e56fce582eaff7859feb8b617adee19c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "96312fdf9edd21ec6385df8cc5d9fd3340eb55ae3d6311e441d1c01fac63125e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f1b39f98a1d553f0413b64ab6250274da400a6241be86d9e6647d8d0f550b342",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospfv2/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_banner",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_banner/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_banner/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_banner/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_banner/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "59d618c603ae794e3b2555044e00a2f5d08f23a620fedf43e516c2c81e64b951",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_banner/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_banner/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "126c357f960d8408c7d5e4c3bdc05e2e5e898330e173a4f56f72240f10aae4bb",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_banner/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_banner/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_banner/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d303180003e449e35b98c228f21faf24afd112cf4b23b64d7c0f26c060dfc773",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_banner/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_banner/meta/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_domain",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_domain/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_domain/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_domain/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_domain/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_domain/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_domain/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_domain/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_domain/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4fc154c6e192340c7c8fde5f378e35f2715bec51b4b96a2fc760cf4b2426a795",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_domain/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vtp_domain/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interface/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interface/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interface/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "60268e31b9bdc122132df2d84e14bf372032393e51a564fcfafe6b500c1f9964",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl_interface/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_location",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_location/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_location/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_location/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_location/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_location/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_location/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_location/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_location/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_location/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1d1c9e8cd338fe29f3b793d42514fedb5be104255b4b97039e3ada0640c281f7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_location/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_location/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface/tests/common/agg.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ac4bc419faf2c3b5a6dbc2203caab4dec38797cfc7aaf6e10827a8428217c347",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e60e8c37893803319fffb76f7f65087371dd08878e218648ec3463e225611033",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l2_interface/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/tasks/platform",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b3d70579bb8d6dc475f49a395110ac41cd3459f47369325d02655e44bc3085c3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "572b6ae95bc409ff17d23e74b93167263cc803e52e5ea0d23c1e0cb93c3ea255",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7ac7324045a89a2484fd521c367ed7fa6a83a821a04fe490c842f300c3282395",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/tests/common/multisite.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2c604cb3a7885ef406b5e0cad4c22e1f78737ca70a263203b144dad6dddc672b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vxlan_vtep/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f7e12eeb7992e43e3478bdbe7998bebfd1765eb966293ae8cd0a9b433f0c9af6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ac196e55bc80cba08a1cadef71a151160e493ce9cb00cb3ae12e88cf83664c47",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7d754db246e92eda93bade9b741e09afdc7c5ba2754a4ea5d874f92a479b65d0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "14c246d4baec930ad3e9d8a38db16c6dd1abc414ba16fb969043af9c1ffcdfde",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tests/common/merged.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2764d0686b6d045c5de66dc3214bb542d022bf0e7fd906298f08c252b1051e0c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tests/common/overridden.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c73048d855cbb3aae315d0f6ae7314b020ecbaea5d15e600bd62f65d7704edce",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tests/common/deleted.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "de4551a69555a489408abeaaef92b874844850f80ecfdf5745e0396df8d800b3",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "99dac7db446b681d2fa8718453fd8564c4f66277c81ddff1585ea3373200a44c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tests/common/rtt.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2c4a3c38cc68f8de74ad85bb155d4fd3426e55c4a5b71b317d02bcf8510f071b",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tests/common/rendered.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "04d951b55ad79acb7b615a9c1e5a2e76379a14bfab30c3297ad6290cc5126f22",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tests/common/replaced.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "92fb7f63a6a328fa28d035080ded792ed4ceeda49a7bc99577231a2236272b58",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tests/common/parsed.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5aec19be4bba22c66f66e41d2d12c6ac01048ec41c4d215a30b0af7f7e2b4566",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tests/common/gathered.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4782c50e81bcba1d4de70affb6f028f34e4147ee6198e1866fae864815249ddd",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ddbe91d5578423ebc8ba2b7928a19a878e84f41d4fe69e17bfe72abd29bcb9c0",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_static_routes/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5c4f2f496fd21184c60c4f446df594b5bd5fe15fb5316120ec0f37adbc2578ef",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2bff2a18c137e32383e37b2b85a6d4800764831269fe78de5fe393d799bc8d23",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "415154a2ef9936f47fb59544d6ef8b6e6e8fa20d2f0bfd0643ef5590fcb425a9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ca3faabae4048c5d46bf7f76fa795858d259d28a59555bec6633f1bae13840ac",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "20bf2d47ee7b7682f9017dac437453ad3c99bdf7451032aebb9062688e2889b2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f165ae2217731b40d4eb6cc3e28718dfb3bbb6937babb77b5f35d32daf72e96a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c2eddb9df0529aed9322743cb23c57abae502f468a4336177393ab34f4935fb9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_telemetry/templates/populate_config.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4f59d6d91f07f67ba4ca62d70c341ad88a4680f2ff9d039bc5be646b86652823",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/tests/nxapi",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/tests/nxapi/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "322a5d8ff2febd906db189ea15bd4d8afa2c8222c4c325cc41d5a21df06b289e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/tests/cli/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "13b4e4e833d900d1cdfc7358bcb3ce84da94bdc3d1f0e605423e3a6aff54463e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_l3_interface/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snapshot",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snapshot/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snapshot/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snapshot/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snapshot/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snapshot/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snapshot/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snapshot/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snapshot/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snapshot/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d44afe445f7128183f09c4314e7239665cb91fb15176322b802082b5c00df4d7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snapshot/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snapshot/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "276d928d25e3df0ed90b60ef9a48043cb741df458f4d837f4a6a9ed0c4787380",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_gir/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_interface",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_interface/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_interface/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_interface/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_interface/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_interface/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_interface/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_interface/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_interface/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90757dde2e169666e4a992f8207e81eec41fa1a3bffbbc59cf58bd7406392f0f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_interface/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_interface/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/tests/nxapi",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/tests/nxapi/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b7d4c320237b2180ba55585ba455b52d060785f3cf7d2b1fea66880ccac842e6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/tests/cli",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/tests/cli/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e21e0f5eb7c4a1d0ff0118b58e0ffc01d664d7efd7181b946bd09f4ec7ff58d1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_lldp/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e6bceb59e0ca5c61505cf242f54f76e57093a670a2d91de88579a69d3af7e60c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6e212a83f10532fcd0d0bc9dd90d37a853885aa22935dd0040b5be18c6897d48",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "459c9db08704b40e2036e72d2ba1a85bac3130f62f9d86b76a3f03dd78903b67",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_zone_zoneset/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "37bb266ed396b0deedfadc54a835f15862266232e9148bbebf537367a72fbba7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_nxos_tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_nxos_tests/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/prepare_nxos_tests/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9232fe344e5b0f862d7239c717f91df5de503d113b2b4be1d7a3565339d014bc",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "78725c535a9c7c04030a2037cd8d6be91d0078240fda3f2bf3e2eaf16d9905ac",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_acl/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "58eb62f1f74a13baed8def132bd35676141321ab9c2e78bacebe08795d32523d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "62065316c1339ab3416efa35f30f161900a0a9d0451c239963d2162b3b2d1e41",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bd5c8540d76635ebb8740643c1750239f2119f13aceab45a85874bbc87a73ec1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "189122ee0b76fc791179536b2e500f440703f118dc30fff81bd2e38737b2f26c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5477d406ccd46cc332476f7a55f67e63bee5c5625907a54d0e0d5d83430627f8",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/fixtures",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/fixtures/parsed.cfg",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "336d9be1aac7f64f7cc82330ca1f37fab84e0c2364b53940105f5f620b96cad6",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/overridden.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a6cbd28c849ff816cca49fe67720b8791e9124a25b015c3dc27888a43d03d18",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/replaced.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "68fcec132c7dd08225e1ec41a1dbfb266a8019756c621e696621a54b72bfb43d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/_remove_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3240e9603740fb36655253227e84dc27544befc8efcbbd822bd1252113a4a787",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/_setup.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b29023f2236fd9f05815edd608324d92e13e6e228bca417f0421b879281ed48a",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/deleted.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4235a8bcb13431259c38b23538afca479b7adb9c81226193fb19288d363d3b88",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/parsed.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ced6a52cb7468785c72f059db87cb13881f4cb957075bfac43da62b0cc6b667d",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/gathered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "38a0d31a15d070d88dbc6aa9ce2a7209a9b72ef2e802206f9d15752430a7c330",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/rendered.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bad798cb36843946507cfee54f2b68e7a86dacf37e90f4e8527913655e3438a2",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/_populate_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aed8f904f4208f6b2198ed4739a1a3cece4bdd95aee8d75d0059d4eba41d4042",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/empty_config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f505e297983932c7f96c1a22581ca35f96a88d1d32f81a29b1697c4605617026",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/tests/common/merged.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1b92a0fe1c884390b3053dc50bbf11e571b4184ed297fa20ad50a65e196fc857",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_ospf_interfaces/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_community",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_community/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_community/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_community/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_community/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_community/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_community/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_community/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_community/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_community/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "547ce752ed6b0a94eeec78aea96d7322884321c622de5e0a5903d250709e4622",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_community/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_community/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_vni",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_vni/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_vni/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_vni/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_vni/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_vni/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_vni/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_vni/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_vni/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_vni/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "046516c46450fe04c67a52804a9ff9b57b613ec95e366d8a896727785e6abec9",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_vni/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_evpn_vni/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ba01df9869d6f924d5193f8cc3a7abee978d675c5d3e71b2e3ac792002a6da58",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vpc/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_inform.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "77155d53ff0858cf372770665f2a240a8fd73e8a771834d6d81824de75ed65ee",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_trap.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6af12340ba16eb0c1245f0f6991372888f17691587e2f20795bcbd593e3869c1",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v2_inform.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3e1e883414b96f37169fac465cb8432fe25818d88fdb489ad2b453449e899784",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v1_trap.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "41eca26612b70f47ec22d689ab08c2996f9e6c44c297e1aeccd032702d436fb7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_snmp_host/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e6bceb59e0ca5c61505cf242f54f76e57093a670a2d91de88579a69d3af7e60c",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan/vars",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan/vars/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6e212a83f10532fcd0d0bc9dd90d37a853885aa22935dd0040b5be18c6897d48",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8bac35dbd9fc74dde4b8ce23394f0264f6931e0bcb432f80083942704f10238f",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vsan/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "37bb266ed396b0deedfadc54a835f15862266232e9148bbebf537367a72fbba7",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_af",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_af/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_af/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_af/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_af/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1462f2318e8838b725f768611186647b04da7dc2db4a88d69c8f5dcc7f0937df",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_af/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_af/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_af/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_af/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_af/tests/common/sanity.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "29e6f35f4bcc9a750d1e50116be9cb060861fa832e55ce00ce8de5c2417527cf",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_af/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_vrf_af/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host/tasks/cli.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6730ee9589def97082d15b1424719659ce34980524fd79081ebb4e4cb7805e04",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host/tasks/nxapi.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7634817ecb02947ff1aa66b9308a9c10256a288d6862bcb726e20926939e1d42",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host/tasks/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c0541dd367225c538f040167b125d04dca76273f0c53042823d60dec68a9a8ec",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host/defaults/main.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c8e82c716422654d049fd043bbf84d624ed532f96741e032f52f14c19e970d3e",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host/tests",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host/tests/common",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9e89e75b0c32af2f2f7a8f9ae8ef88d2afaf167d454fcb1d9e08111ac5f6ad41",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4982c5caed91f58b1e5658d51eb7f66b3ef8bd5cb8531f171dee93ecabf61cdf",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host/meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "tests/integration/targets/nxos_aaa_server_host/meta/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "306ef26bd70b58285bef6b50a83c64b26b9077181c6823ef20ac63252373d5de",
+ "format": 1
+ },
+ {
+ "name": "tests/integration/target-prefixes.network",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6b20244911fa2f808e597950834fbb8092921b97c87496c35755a956faaab50f",
+ "format": 1
+ },
+ {
+ "name": "requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "70053744bf8f5b698f82ad59a6daec106188d9b63c6d1246f860f21ab8cb6ac5",
+ "format": 1
+ },
+ {
+ "name": "bindep.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "80645079eb025b3a905b4775ac545d080a3d7d35d537c31e04f7197c94315ab5",
+ "format": 1
+ },
+ {
+ "name": "docs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_snmp_user_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2750d30dc1e0d7b86b7aad5841288cb8cc40b70f99262ddeae5b2dc494ab6ef2",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_zone_zoneset_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "de4a6bbe2e0985637e7048b17382d4c94674bd8f2b9ccfc506dbb5211765bc27",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_l3_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "93c1cbd53cc7a012683716382c70a8e3ebb2ddb297e2f37cf97a67cb492f1a87",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_facts_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "47cdc98129d0530dc1277823435a976b455898dc1e8994abe326d17c49f989f6",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_cliconf.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ee4d1884481a2213f66c229375103127f3698407b6d653b1455549fd37dee0de",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_bgp_neighbor_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3a4acaaed26598c9dc1de74c4dcdd8faf8c7ada736e635e95589fa80e81b6e91",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_logging_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d3c09b89eb6f8b5358a49a36822eddee0b96320d6e7cbc1b237d541128723903",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_command_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0318ce8e42cb03acba6a44f4bb99246ae772852ed585154e2e7bc5ce1332f081",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_bfd_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "159478638e300cb8f7803a9ea86fa64a90078c6acd7a75ecaf7f8359b955c84a",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_l2_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90effaf856b4df9e700fdc51171a24850da6488f359ef7981c323a8a4125eda3",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "49a94d780b98961da33db4d3f79530043aad624c1df5865e72e5c9afcee0df26",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d585fac8ba3aad9149816b736f5217f5f316a77002694e4fd975cf063196b666",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_acl_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "21d7c578a290a8873512004d60d26498cc7b2524be0740f449b332bd5a70871d",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_bgp_af_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2a01d25edac5b93a6b438694667f658ece9b4042b68de779cee6758ef2c56928",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_lacp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d89a3ef5f1a949512193d58fd5e39bf70f38433a7cea51b1e6ba36fd0ea6ca24",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_igmp_snooping_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "63bae70ffb866bce60d973fee29defce9798e5c2cdf863d1417f29ed9c282191",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_ospf_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9e236bb5396bbfbd4ff7c7b9281e9c2c7edf492f987cf4ca4692c20490904fb5",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_config_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7064e5c28feabc75f935a37a489468cb0f268b70eb0a602f261451c2300613d2",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_lldp_global_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1abdc1d00d4653bdc9b9d9377d27831a78c468556f95cfe0db50ea8f2dc84d36",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_rpm_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "044429a23ce412be97db598b01538e24a986ac5f84a22a5bb7ae7f1fea963c8d",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_l3_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3b177e1340448bf65b009c315a810616084b40826db091d9cc7041b07647296a",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_bgp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "437d2bcbcd9c71253de21841fecbbf791e276115f6f87d6a919c4830b42fde96",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_l2_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c063baaf7b1e776d02154c00a2d06d6f20095bcec099b9413f88088e523e1904",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_ntp_options_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ea402be44ed256047962e61f337df229b4c8e596a65f24bce9060d24a6869461",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vtp_password_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "10d2727c8412a6947ba5bc2750da94612d6495c377d5d76fb31e852b5036ff09",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_linkagg_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9d358c37dee2fafe8e07abaa42ab54938fa6fb1e2b1b7697b90b62edf8dbda06",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vrf_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a105a083464a8734cef8b10fde91f9bd42c6c28c5f16d7a8d1f8542d97e7efe2",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vtp_version_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3b7ee70c4d17a000dcd54900ea1fa21560727a3cf6b91f746d313223f048e82b",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_evpn_vni_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fc46c7b2249f07bdab2794d7794288748a8dacdbab59d56dd12134a3bbbf3d66",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_snmp_contact_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9223b7c81ba05125275cf9ed992fa4cf5b55aeef1afbf45afbf9713f09858a4f",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_lldp_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e9adb5b97bb4839417799bab7f6b15df3d5b0b60b566ec5c71db71423f268094",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_bfd_global_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "727d5851bf0e0d6d308930a05ddbde6fb293fe3ac624df3eb94c6e1a813fab9b",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_nxapi_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d75ea167db35a4a61f42af2422bff71ad7a11191adcc0c79f0ad1b52623b30fe",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_ping_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bf53f0026a4f9f6f93a5c72bbb931d0486b2faecfa919cfb47318dc7cdcc744f",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_gir_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2cb05d1f66f878da1439e0348356d69586d24f4f4024e4c9c80bc22daf4568d",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vpc_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4477045779492e8d3b68da0c4a6d56d0d46a535178b244791f32642b1f9215c5",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_gir_profile_management_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d428b41657847d9f5bf2b88aa2dbd67f3afa73039a00e40caa3907ad05d090cc",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_acl_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9033b8a227a66085d622ed7d05904aa6ac4c027f01f8c3e972238c3d77f9bd80",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_hsrp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4d11beab59b2b4e747c293ab76e87367e6f59709496428b401a82079919cea86",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_interface_ospf_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "80ddb663dc3dbbcefb9d1c63f9cb58e484f076846578839b78c0c48f16def6c9",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vlan_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "90fed8382dd9dbc10a73c86a21a36f48d52f027603d31c3cd4e0cf9121129bd4",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vlans_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "81dde803f7ecbfbbb84b59b745c4f15bcc92f78908adb7fd5c5fddfc046982b3",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_smu_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2d1221ab6ec6cc297f1a35e9bb0bd16f54122e6fe82e350f847d3faa2bc16c88",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_udld_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b673d2ac12e941eb409aad70bcbc7e4d54b510dbc26847ae0d1f8e5f05537186",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_ntp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "463f983982777e95a7555896251c083d8316ee6b789869db4f35f084d501f767",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_snmp_host_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0dace694270ec54720f99fca002cf5901c4a96e100faf4212b3f1ca9ece3051d",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_snmp_community_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c703973d8aac688ea5dc4093d6553504b018859c2764a81d3f75189173b5c13b",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_install_os_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c1879aff36faafdad68bac647ffb2bf73ea5d2795fd50a0a299274ee05276295",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_pim_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "71bd173d5077b51850992732a9da483f922d2c71084dbda061502d4e36494180",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_aaa_server_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e22518f87ceb44d3196352cb6a22f95aacc00e80b6555ed777d9f20e76b66eeb",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_ospf_vrf_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e9b777893691522c8e0e18f0179fdb6b14148edaf5fd32a5ce7bc976c227ce47",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_lag_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "00d2516e68bdf58a3da5e800eac55de0244bdad1027246194787add7c663b707",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_system_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "364c81d6adc0678a8d6dc6861591eec257c077482b18ecebb136bac57824d1d1",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_aaa_server_host_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "09656a393002e4043ce9f716578405de068cb7d9110561e0147d5d29876672c5",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_bgp_neighbor_af_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "37d43644a8f0d7e276bff0d9b7f1c2fae2224402582c846512406d1689db120a",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_acls_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1778e2ab5028be7996b22085033baf1b8a08d593c913c138fcae42fa706b3696",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_hsrp_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6a368625f3d765264c9755a62330832786ba9312681a3e040c19e9a618461352",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vxlan_vtep_vni_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ac4ad6f21cd7d047a74f3a56edeab68c856484cf76dae0341118f98be7598dc1",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_acl_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c875f695e34c466622e1cb3df52eb8ec6c8557cc5f6968560142ec7540302f83",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vrf_af_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "63594514de7b1163cbf03abb3720c8bd878c4958c56580ab3be76f5acca80b94",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_snmp_traps_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "21509330d8b42f2b9db1a2593ebff5c3f546c39ce34ba561592aa66b770eda6f",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_devicealias_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b489fa696669353aa72a6da03fc9995e88249c201f04b04c9734ed6399e87a34",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_pim_rp_address_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "034463f95105f6ff1fff14dc110fc406c3ac31687d73913113b3a33cce64e76a",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_static_route_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b68e909daff45fb89b113f89e03fbbca5ba8bcf8c2f24ed60ef2767236f08ffd",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_snapshot_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d935e6087b9783f77b89edc6e14f38bdfae9786925e4e0b34ec5730a1e49b0cc",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_file_copy_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "982469ad3f9e7a4e506e205158cd595fed52451b04802749dfda96b56e6c338b",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_reboot_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4173cea32f08491ad0b92abcad71efeb26e541b5b4f8afddb3dfdb1fa8b91b1f",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_rollback_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "553846d61250712d2e0cf56df0ea690be09358739bd222c896a1ed466bae6ef3",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_lldp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb32e0bf75ff6bfdca2ecf95823018e05ee3936a6b20eda32d85a1f5a44cd2f9",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_telemetry_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c869edad07972c9fe2be1afd123a2056356c4188159cde254b7559cd4c301ef2",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_pim_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "294a201a9e459e6487e5dd2bd9a1cf1327f307709e912d5b9317d0ca75dbc313",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_static_routes_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aef4c616f2d5bf52b3f45bc2ccec0d1ae896a8a2816edede8c3a1ccf8c32ff58",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_lacp_interfaces_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "320739c6715b6f8e8ba3a91dfd70e58c8493a3d6020c432210f58bc48741af09",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_igmp_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "31ec59f5bd20c7197785db9addb91a31649fa983f44dc9b963f4106b79d5293d",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vsan_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "359740199327bc19f9c542c4aaa0c364099fb905d6a65fcb02e650b88c841ee7",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_ospf_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ba29348c574433e69f9d66bdc9be4c0dbd30e03f0eeb7bd9063fffed1ae2ba82",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vrrp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "720f4546eff10cc803c752ae87e2de1de1db31aac1eea62e477f870ac5c4b229",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_ospfv2_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "188eb0cdacc2d4c5f876e0006eca93777a8d01265c3dd7daf6181cd98bfdfed3",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_feature_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2e9fcb9a07068537f7a2ca62a6dec24070c41a4078dc5a35106e3298ab1fd2e2",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vxlan_vtep_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "51db1e5d2ce2fcfb3f1f582e46d4998221902e1aba8da97766c79350a4c0bf9c",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vtp_domain_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eee575ebeb416e812b8e09318ca053ba2e44e66748087b87a9d2b131d47fbff4",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_ntp_auth_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f3c43410432cccdaf4674242e78453beec7fee43961c9d10bd20d26711b51277",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_igmp_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b4238689ccadf8e9095fc17090d7614390cb0f0191aa701fb8ae0f7bf5ceaebe",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_user_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "531a43cf9135319851f2bc470bbb44116f2b605dcb29a3bffa54c990b4a5dcc0",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_httpapi.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "75d17fdc74db57a5df6a56beb6a0cf6a2aef7ac109e4a457e1d8c2294583d3bb",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_overlay_global_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eb0c8c4f9b6f52364755e9a6f1f7ba96911882317941b86f4ebfbd2a3179af73",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_evpn_global_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e3312acea60eafaa3be4db57ff5ea9a782813dee5ec0e5aa5d0da2c507a87db5",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_banner_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a628ea0a5c9bf9b7e9685f03ebd479575d15862887f9c3c5c114a93640b09f8",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vrf_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "81b388984dcecf9e08477eef5e5f4477b8531acf6ee23464e26b93b2b95f42f2",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_bgp_global_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "5213ba9da30a19e573d272a655b2353e16e2977ee7cbeedf5fb229ed1963517d",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_udld_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a88627fc94640a7f8b507231d5352b99281974539041910a5957dd7b9f0c3abe",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_vpc_interface_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1f47ceac9a2515a52ad5da14dc42777325e362274c7c715d6e6767feafaff5b2",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_snmp_location_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "91dbef5dfbb5450adfed52274f2de2597fdd47d59175950cc94fe4cae9d01c8c",
+ "format": 1
+ },
+ {
+ "name": "docs/cisco.nxos.nxos_ospfv3_module.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "acb4ca5b6d3dd239264026cd6304b5fae733f04b4e4596898622da6a77ed7009",
+ "format": 1
+ },
+ {
+ "name": "README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6e88bd6957bb834246061f625699179e2e6c17a8a000e7bb38472d01d1fcbdab",
+ "format": 1
+ },
+ {
+ "name": "changelogs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "changelogs/CHANGELOG.rst",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b27f0965aeacbec6a29458a4388e7ffc1a9139ab6bd1062f92e50e5f31b19e4e",
+ "format": 1
+ },
+ {
+ "name": "changelogs/changelog.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "991ff70ef9bdc99f95f81cc105a8e77e5a31f483966d77f6c18ca8069812f0c1",
+ "format": 1
+ },
+ {
+ "name": "changelogs/config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "35e16cb0cef6cd78082fb011892714197344b4407b742104b065efe6f669f2c1",
+ "format": 1
+ },
+ {
+ "name": "LICENSE",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
+ "format": 1
+ },
+ {
+ "name": "meta",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "meta/runtime.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0df347e631fc902c0608323ab75000c9536b2ce92e1574eda7b187da4fdd3f1f",
+ "format": 1
+ },
+ {
+ "name": "test-requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2bf5dba4c2c0732ba3edd555f460f967699e574a3cf11f5b4dcc92ae890a0a02",
+ "format": 1
+ },
+ {
+ "name": ".pre-commit-config.yaml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a571fb93e577613f6f7bb86402f5caefeed26d2399211cfad69aa2354427fedd",
+ "format": 1
+ }
+ ],
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/LICENSE b/collections-debian-merged/ansible_collections/cisco/nxos/LICENSE
new file mode 100644
index 00000000..f288702d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/MANIFEST.json b/collections-debian-merged/ansible_collections/cisco/nxos/MANIFEST.json
new file mode 100644
index 00000000..bf162ff3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/MANIFEST.json
@@ -0,0 +1,36 @@
+{
+ "collection_info": {
+ "namespace": "cisco",
+ "name": "nxos",
+ "version": "1.4.0",
+ "authors": [
+ "Ansible Network Community (ansible-network)"
+ ],
+ "readme": "README.md",
+ "tags": [
+ "cisco",
+ "nxos",
+ "networking",
+ "nxapi",
+ "netconf"
+ ],
+ "description": "Ansible Network Collection for Cisco NXOS devices.",
+ "license": [],
+ "license_file": "LICENSE",
+ "dependencies": {
+ "ansible.netcommon": "*"
+ },
+ "repository": "https://github.com/ansible-collections/nxos",
+ "documentation": null,
+ "homepage": null,
+ "issues": null
+ },
+ "file_manifest_file": {
+ "name": "FILES.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c2d6ef8c90b251b7728d54b245e18eb60dff74376e9938a63717a0c61da83d58",
+ "format": 1
+ },
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/README.md b/collections-debian-merged/ansible_collections/cisco/nxos/README.md
new file mode 100644
index 00000000..84f38bb3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/README.md
@@ -0,0 +1,220 @@
+
+
+# Cisco NX-OS Collection
+[![CI](https://zuul-ci.org/gated.svg)](https://dashboard.zuul.ansible.com/t/ansible/project/github.com/ansible-collections/cisco.nxos) <!--[![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/vyos)](https://codecov.io/gh/ansible-collections/cisco.nxos)-->
+
+The Ansible Cisco NX-OS collection includes a variety of Ansible content to help automate the management of Cisco NX-OS network appliances.
+
+The Cisco NX-OS connection plugins combined with Cisco NX-OS resource modules aligns the Cisco NX-OS experience with the other core networking platforms supported by Ansible.
+
+This collection has been tested against Cisco NX-OS 7.0(3)I5(1) on Nexus Switches and NX-OS 8.4(1) on MDS Switches.
+
+<!--start requires_ansible-->
+## Ansible version compatibility
+
+This collection has been tested against following Ansible versions: **>=2.9.10,<2.11**.
+
+Plugins and modules within a collection may be tested with only specific Ansible versions.
+A collection may contain metadata that identifies these versions.
+PEP440 is the schema used to describe the versions of Ansible.
+<!--end requires_ansible-->
+
+### Supported connections
+The Cisco NX-OS collection supports ``network_cli`` and ``httpapi`` connections.
+
+## Included content
+<!--start collection content-->
+### Cliconf plugins
+Name | Description
+--- | ---
+[cisco.nxos.nxos](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_cliconf.rst)|Use NX-OS cliconf to run commands on Cisco NX-OS platform
+
+### Httpapi plugins
+Name | Description
+--- | ---
+[cisco.nxos.nxos](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_httpapi.rst)|Use NX-API to run commands on Cisco NX-OS platform
+
+### Modules
+Name | Description
+--- | ---
+[cisco.nxos.nxos_aaa_server](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_aaa_server_module.rst)|Manages AAA server global configuration.
+[cisco.nxos.nxos_aaa_server_host](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_aaa_server_host_module.rst)|Manages AAA server host-specific configuration.
+[cisco.nxos.nxos_acl](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_acl_module.rst)|(deprecated, removed after 2022-06-01) Manages access list entries for ACLs.
+[cisco.nxos.nxos_acl_interface](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_acl_interface_module.rst)|(deprecated, removed after 2022-06-01) Manages applying ACLs to interfaces.
+[cisco.nxos.nxos_acl_interfaces](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_acl_interfaces_module.rst)|ACL interfaces resource module
+[cisco.nxos.nxos_acls](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_acls_module.rst)|ACLs resource module
+[cisco.nxos.nxos_banner](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_banner_module.rst)|Manage multiline banners on Cisco NXOS devices
+[cisco.nxos.nxos_bfd_global](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_bfd_global_module.rst)|Bidirectional Forwarding Detection (BFD) global-level configuration
+[cisco.nxos.nxos_bfd_interfaces](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_bfd_interfaces_module.rst)|BFD interfaces resource module
+[cisco.nxos.nxos_bgp](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_bgp_module.rst)|(deprecated, removed after 2023-01-27) Manages BGP configuration.
+[cisco.nxos.nxos_bgp_af](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_bgp_af_module.rst)|Manages BGP Address-family configuration.
+[cisco.nxos.nxos_bgp_global](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_bgp_global_module.rst)|BGP Global resource module.
+[cisco.nxos.nxos_bgp_neighbor](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_bgp_neighbor_module.rst)|(deprecated, removed after 2023-01-27) Manages BGP neighbors configurations.
+[cisco.nxos.nxos_bgp_neighbor_af](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_bgp_neighbor_af_module.rst)|Manages BGP address-family's neighbors configuration.
+[cisco.nxos.nxos_command](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_command_module.rst)|Run arbitrary command on Cisco NXOS devices
+[cisco.nxos.nxos_config](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_config_module.rst)|Manage Cisco NXOS configuration sections
+[cisco.nxos.nxos_devicealias](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_devicealias_module.rst)|Configuration of device alias for Cisco NXOS MDS Switches.
+[cisco.nxos.nxos_evpn_global](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_evpn_global_module.rst)|Handles the EVPN control plane for VXLAN.
+[cisco.nxos.nxos_evpn_vni](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_evpn_vni_module.rst)|Manages Cisco EVPN VXLAN Network Identifier (VNI).
+[cisco.nxos.nxos_facts](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_facts_module.rst)|Gets facts about NX-OS switches
+[cisco.nxos.nxos_feature](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_feature_module.rst)|Manage features in NX-OS switches.
+[cisco.nxos.nxos_file_copy](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_file_copy_module.rst)|Copy a file to a remote NXOS device.
+[cisco.nxos.nxos_gir](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_gir_module.rst)|Trigger a graceful removal or insertion (GIR) of the switch.
+[cisco.nxos.nxos_gir_profile_management](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_gir_profile_management_module.rst)|Create a maintenance-mode or normal-mode profile for GIR.
+[cisco.nxos.nxos_hsrp](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_hsrp_module.rst)|Manages HSRP configuration on NX-OS switches.
+[cisco.nxos.nxos_hsrp_interfaces](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_hsrp_interfaces_module.rst)|HSRP interfaces resource module
+[cisco.nxos.nxos_igmp](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_igmp_module.rst)|Manages IGMP global configuration.
+[cisco.nxos.nxos_igmp_interface](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_igmp_interface_module.rst)|Manages IGMP interface configuration.
+[cisco.nxos.nxos_igmp_snooping](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_igmp_snooping_module.rst)|Manages IGMP snooping global configuration.
+[cisco.nxos.nxos_install_os](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_install_os_module.rst)|Set boot options like boot, kickstart image and issu.
+[cisco.nxos.nxos_interface](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_interface_module.rst)|(deprecated, removed after 2022-06-01) Manages physical attributes of interfaces.
+[cisco.nxos.nxos_interface_ospf](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_interface_ospf_module.rst)|(deprecated, removed after 2022-10-26) Manages configuration of an OSPF interface instance.
+[cisco.nxos.nxos_interfaces](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_interfaces_module.rst)|Interfaces resource module
+[cisco.nxos.nxos_l2_interface](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_l2_interface_module.rst)|(deprecated, removed after 2022-06-01) Manage Layer-2 interface on Cisco NXOS devices.
+[cisco.nxos.nxos_l2_interfaces](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_l2_interfaces_module.rst)|L2 interfaces resource module
+[cisco.nxos.nxos_l3_interface](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_l3_interface_module.rst)|(deprecated, removed after 2022-06-01) Manage L3 interfaces on Cisco NXOS network devices
+[cisco.nxos.nxos_l3_interfaces](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_l3_interfaces_module.rst)|L3 interfaces resource module
+[cisco.nxos.nxos_lacp](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_lacp_module.rst)|LACP resource module
+[cisco.nxos.nxos_lacp_interfaces](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_lacp_interfaces_module.rst)|LACP interfaces resource module
+[cisco.nxos.nxos_lag_interfaces](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_lag_interfaces_module.rst)|LAG interfaces resource module
+[cisco.nxos.nxos_linkagg](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_linkagg_module.rst)|(deprecated, removed after 2022-06-01) Manage link aggregation groups on Cisco NXOS devices.
+[cisco.nxos.nxos_lldp](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_lldp_module.rst)|(deprecated, removed after 2022-06-01) Manage LLDP configuration on Cisco NXOS network devices.
+[cisco.nxos.nxos_lldp_global](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_lldp_global_module.rst)|LLDP resource module
+[cisco.nxos.nxos_lldp_interfaces](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_lldp_interfaces_module.rst)|LLDP interfaces resource module
+[cisco.nxos.nxos_logging](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_logging_module.rst)|Manage logging on network devices
+[cisco.nxos.nxos_ntp](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_ntp_module.rst)|Manages core NTP configuration.
+[cisco.nxos.nxos_ntp_auth](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_ntp_auth_module.rst)|Manages NTP authentication.
+[cisco.nxos.nxos_ntp_options](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_ntp_options_module.rst)|Manages NTP options.
+[cisco.nxos.nxos_nxapi](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_nxapi_module.rst)|Manage NXAPI configuration on an NXOS device.
+[cisco.nxos.nxos_ospf](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_ospf_module.rst)|(deprecated, removed after 2022-06-01) Manages configuration of an ospf instance.
+[cisco.nxos.nxos_ospf_interfaces](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_ospf_interfaces_module.rst)|OSPF Interfaces Resource Module.
+[cisco.nxos.nxos_ospf_vrf](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_ospf_vrf_module.rst)|(deprecated, removed after 2022-10-01)Manages a VRF for an OSPF router.
+[cisco.nxos.nxos_ospfv2](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_ospfv2_module.rst)|OSPFv2 resource module
+[cisco.nxos.nxos_ospfv3](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_ospfv3_module.rst)|OSPFv3 resource module
+[cisco.nxos.nxos_overlay_global](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_overlay_global_module.rst)|Configures anycast gateway MAC of the switch.
+[cisco.nxos.nxos_pim](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_pim_module.rst)|Manages configuration of a PIM instance.
+[cisco.nxos.nxos_pim_interface](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_pim_interface_module.rst)|Manages PIM interface configuration.
+[cisco.nxos.nxos_pim_rp_address](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_pim_rp_address_module.rst)|Manages configuration of an PIM static RP address instance.
+[cisco.nxos.nxos_ping](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_ping_module.rst)|Tests reachability using ping from Nexus switch.
+[cisco.nxos.nxos_reboot](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_reboot_module.rst)|Reboot a network device.
+[cisco.nxos.nxos_rollback](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_rollback_module.rst)|Set a checkpoint or rollback to a checkpoint.
+[cisco.nxos.nxos_rpm](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_rpm_module.rst)|Install patch or feature rpms on Cisco NX-OS devices.
+[cisco.nxos.nxos_smu](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_smu_module.rst)|(deprecated, removed after 2022-10-01) Perform SMUs on Cisco NX-OS devices.
+[cisco.nxos.nxos_snapshot](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_snapshot_module.rst)|Manage snapshots of the running states of selected features.
+[cisco.nxos.nxos_snmp_community](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_snmp_community_module.rst)|Manages SNMP community configs.
+[cisco.nxos.nxos_snmp_contact](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_snmp_contact_module.rst)|Manages SNMP contact info.
+[cisco.nxos.nxos_snmp_host](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_snmp_host_module.rst)|Manages SNMP host configuration.
+[cisco.nxos.nxos_snmp_location](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_snmp_location_module.rst)|Manages SNMP location information.
+[cisco.nxos.nxos_snmp_traps](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_snmp_traps_module.rst)|Manages SNMP traps.
+[cisco.nxos.nxos_snmp_user](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_snmp_user_module.rst)|Manages SNMP users for monitoring.
+[cisco.nxos.nxos_static_route](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_static_route_module.rst)|(deprecated, removed after 2022-06-01) Manages static route configuration
+[cisco.nxos.nxos_static_routes](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_static_routes_module.rst)|Static routes resource module
+[cisco.nxos.nxos_system](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_system_module.rst)|Manage the system attributes on Cisco NXOS devices
+[cisco.nxos.nxos_telemetry](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_telemetry_module.rst)|TELEMETRY resource module
+[cisco.nxos.nxos_udld](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_udld_module.rst)|Manages UDLD global configuration params.
+[cisco.nxos.nxos_udld_interface](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_udld_interface_module.rst)|Manages UDLD interface configuration params.
+[cisco.nxos.nxos_user](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_user_module.rst)|Manage the collection of local users on Nexus devices
+[cisco.nxos.nxos_vlan](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vlan_module.rst)|(deprecated, removed after 2022-06-01) Manages VLAN resources and attributes.
+[cisco.nxos.nxos_vlans](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vlans_module.rst)|VLANs resource module
+[cisco.nxos.nxos_vpc](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vpc_module.rst)|Manages global VPC configuration
+[cisco.nxos.nxos_vpc_interface](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vpc_interface_module.rst)|Manages interface VPC configuration
+[cisco.nxos.nxos_vrf](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vrf_module.rst)|Manages global VRF configuration.
+[cisco.nxos.nxos_vrf_af](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vrf_af_module.rst)|Manages VRF AF.
+[cisco.nxos.nxos_vrf_interface](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vrf_interface_module.rst)|Manages interface specific VRF configuration.
+[cisco.nxos.nxos_vrrp](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vrrp_module.rst)|Manages VRRP configuration on NX-OS switches.
+[cisco.nxos.nxos_vsan](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vsan_module.rst)|Configuration of vsan for Cisco NXOS MDS Switches.
+[cisco.nxos.nxos_vtp_domain](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vtp_domain_module.rst)|Manages VTP domain configuration.
+[cisco.nxos.nxos_vtp_password](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vtp_password_module.rst)|Manages VTP password configuration.
+[cisco.nxos.nxos_vtp_version](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vtp_version_module.rst)|Manages VTP version configuration.
+[cisco.nxos.nxos_vxlan_vtep](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vxlan_vtep_module.rst)|Manages VXLAN Network Virtualization Endpoint (NVE).
+[cisco.nxos.nxos_vxlan_vtep_vni](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_vxlan_vtep_vni_module.rst)|Creates a Virtual Network Identifier member (VNI)
+[cisco.nxos.nxos_zone_zoneset](https://github.com/ansible-collections/nxos/blob/main/docs/cisco.nxos.nxos_zone_zoneset_module.rst)|Configuration of zone/zoneset for Cisco NXOS MDS Switches.
+
+<!--end collection content-->
+
+Click the ``Content`` button to see the list of content included in this collection.
+
+## Installing this collection
+
+You can install the Cisco NX-OS collection with the Ansible Galaxy CLI:
+
+ ansible-galaxy collection install cisco.nxos
+
+You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format:
+
+```yaml
+---
+collections:
+ - name: cisco.nxos
+```
+## Using this collection
+
+
+This collection includes [network resource modules](https://docs.ansible.com/ansible/latest/network/user_guide/network_resource_modules.html).
+
+### Using modules from the Cisco NX-OS collection in your playbooks
+
+You can call modules by their Fully Qualified Collection Namespace (FQCN), such as `cisco.nxos.nxos_l2_interfaces`.
+The following example task replaces configuration changes in the existing configuration on a Cisco NX-OS network device, using the FQCN:
+
+```yaml
+---
+ - name: Replace device configuration of specified L2 interfaces with provided configuration.
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: Ethernet1/1
+ trunk:
+ native_vlan: 20
+ trunk_vlans: 5-10, 15
+ state: replaced
+
+```
+
+**NOTE**: For Ansible 2.9, you may not see deprecation warnings when you run your playbooks with this collection. Use this documentation to track when a module is deprecated.
+
+
+### See Also:
+
+* [Cisco NX-OS Platform Options](https://docs.ansible.com/ansible/latest/network/user_guide/platform_nxos.html)
+* [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.
+
+## Contributing to this collection
+
+Ongoing development efforts and contributions to this collection are solely focused on enhancements to current resource modules, additional resource modules and enhancements to connection plugins.
+
+We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the [Cisco NX-OS collection repository](https://github.com/ansible-collections/cisco.nxos). See [Contributing to Ansible-maintained collections](https://docs.ansible.com/ansible/devel/community/contributing_maintained_collections.html#contributing-maintained-collections) for complete details.
+
+You can also join us on:
+
+- Freenode IRC - ``#ansible-network`` Freenode channel
+- Slack - https://ansiblenetwork.slack.com
+
+See the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) for details on contributing to Ansible.
+
+### Code of Conduct
+This collection follows the Ansible project's
+[Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html).
+Please read and familiarize yourself with this document.
+
+
+## Release notes
+
+Release notes are available [here](https://github.com/ansible-collections/cisco.nxos/blob/main/changelogs/CHANGELOG.rst).
+
+## Roadmap
+
+<!-- Optional. Include the roadmap for this collection, and the proposed release/versioning strategy so users can anticipate the upgrade/update cycle. -->
+
+## More information
+
+- [Ansible network resources](https://docs.ansible.com/ansible/latest/network/getting_started/network_resources.html)
+- [Ansible Collection overview](https://github.com/ansible-collections/overview)
+- [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html)
+- [Ansible Developer guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html)
+- [Ansible Community code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html)
+
+## Licensing
+
+GNU General Public License v3.0 or later.
+
+See [LICENSE](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text.
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/bindep.txt b/collections-debian-merged/ansible_collections/cisco/nxos/bindep.txt
new file mode 100644
index 00000000..ba9c980f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/bindep.txt
@@ -0,0 +1,6 @@
+# This is a cross-platform list tracking distribution packages needed by tests;
+# see https://docs.openstack.org/infra/bindep/ for additional information.
+
+gcc-c++ [doc test platform:rpm]
+python3-devel [test platform:rpm]
+python3 [test platform:rpm]
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/changelogs/CHANGELOG.rst b/collections-debian-merged/ansible_collections/cisco/nxos/changelogs/CHANGELOG.rst
new file mode 100644
index 00000000..5bfaf6be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/changelogs/CHANGELOG.rst
@@ -0,0 +1,269 @@
+===================================
+Cisco Nxos Collection Release Notes
+===================================
+
+.. contents:: Topics
+
+
+v1.4.0
+======
+
+Minor Changes
+-------------
+
+- Add `echo_request` option for ICMP.
+- Add nxos_bgp_global resource module.
+
+Deprecated Features
+-------------------
+
+- Deprecated `nxos_bgp` and `nxos_bgp_neighbor` modules in favor of `nxos_bgp_global` resource module.
+
+Security Fixes
+--------------
+
+- Enable no_log for sensitive parameters in argspec.
+
+Bugfixes
+--------
+
+- 'config replace' is actually supported for devices other than N9K and hence we should not fail, and instead let the device handle it (https://github.com/ansible-collections/cisco.nxos/issues/215).
+- Add support for interfaces in mode 'fabricpath' to l2_interfaces (https://github.com/ansible-collections/cisco.nxos/issues/220).
+- Allow enabling `fabric forwarding` feature through nxos_feature (https://github.com/ansible-collections/cisco.nxos/issues/213).
+- Allow tag updates with state replaced (https://github.com/ansible-collections/cisco.nxos/issues/197).
+- Fixes traceback while parsing power supply info in nxos_facts for newer NX-OS releases (https://github.com/ansible-collections/cisco.nxos/issues/192).
+- Handle domain-name properly with vrf contexts (https://github.com/ansible-collections/cisco.nxos/issues/234).
+- Parse interface contexts properly (https://github.com/ansible-collections/cisco.nxos/issues/195).
+- Properly handle partial matches in community string (https://github.com/ansible-collections/cisco.nxos/issues/203).
+- Update argspecs with default value for parameters.
+- Update docs to clarify the idemptonecy releated caveat and add it in the output warnings (https://github.com/ansible-collections/ansible.netcommon/pull/189)
+
+Documentation Changes
+---------------------
+
+- Fix error in ``host_reachability`` parameter's example where a default value is used, which the ``host_reachability`` parameter does not support. Improve descriptions of some parameters to be more explicit. Correct spelling and grammar where errors were noticed.
+
+New Modules
+-----------
+
+- nxos_bgp_global - BGP Global resource module.
+
+v1.3.1
+======
+
+Bugfixes
+--------
+
+- Add version key to galaxy.yaml to work around ansible-galaxy bug
+- Allow nxos_user to run with MDS (https://github.com/ansible-collections/cisco.nxos/issues/163).
+- Fix for nxos_lag_interfaces issue (https://github.com/ansible-collections/cisco.nxos/pull/194).
+- Make sure that the OSPF modules work properly when process_id is a string (https://github.com/ansible-collections/cisco.nxos/issues/198).
+
+v1.3.0
+======
+
+Minor Changes
+-------------
+
+- Add nxos_ospf_interfaces resource module.
+
+Deprecated Features
+-------------------
+
+- Deprecated `nxos_interface_ospf` in favor of `nxos_ospf_interfaces` Resource Module.
+
+Bugfixes
+--------
+
+- Allow `fex-fabric` option for mode key (https://github.com/ansible-collections/cisco.nxos/issues/166).
+- Fixes for nxos rpm issue (https://github.com/ansible-collections/cisco.nxos/pull/173).
+- Update regex to accept the platform "N77" as supporting fabricpath.
+- Vlan config diff was not removing default values
+
+New Modules
+-----------
+
+- nxos_ospf_interfaces - OSPF Interfaces Resource Module.
+
+v1.2.0
+======
+
+Minor Changes
+-------------
+
+- Add nxos_ospfv3 module.
+- Allow other transfer protocols than scp to pull files from a NXOS device in nxos_file_copy module. sftp, http, https, tftp and ftp can be choosen as a transfer protocol, when the file_pull parameter is true..
+
+Deprecated Features
+-------------------
+
+- Deprecated `nxos_smu` in favour of `nxos_rpm` module.
+- The `nxos_ospf_vrf` module is deprecated by `nxos_ospfv2` and `nxos_ospfv3` Resource Modules.
+
+Bugfixes
+--------
+
+- Correctly parse facts for lacp interfaces mode information (https://github.com/ansible-collections/cisco.nxos/pull/164).
+- Fix for nxos smu issue (https://github.com/ansible-collections/cisco.nxos/pull/160).
+- Fix regex for parsing configuration in nxos_lag_interfaces.
+- Fix regexes in nxos_acl_interfaces facts and some code cleanup (https://github.com/ansible-collections/cisco.nxos/issues/149).
+- Fix rendering of `log-adjacency-changes` commands.
+- Preserve whitespaces in banner text (https://github.com/ansible-collections/cisco.nxos/pull/146).
+
+New Modules
+-----------
+
+- nxos_ospfv3 - OSPFv3 resource module
+
+v1.1.0
+======
+
+Minor Changes
+-------------
+
+- Add N9K multisite support(https://github.com/ansible-collections/cisco.nxos/pull/142)
+
+Bugfixes
+--------
+
+- Allow facts round trip to work on nxos_vlans (https://github.com/ansible-collections/cisco.nxos/pull/141).
+
+v1.0.2
+======
+
+Release Summary
+---------------
+
+Rereleased 1.0.1 with updated changelog.
+
+v1.0.1
+======
+
+Minor Changes
+-------------
+
+- documentation - Use FQCN when refering to modules (https://github.com/ansible-collections/cisco.nxos/pull/116)
+
+Bugfixes
+--------
+
+- Element type of `commands` key should be `raw` since it accepts both strings and dicts (https://github.com/ansible-collections/cisco.nxos/pull/126).
+- Fix nxos_interfaces states replaced and overridden (https://github.com/ansible-collections/cisco.nxos/pull/102).
+- Fixed force option in lag_interfaces.py (https://github.com/ansible-collections/cisco.nxos/pull/111).
+- Make `src`, `backup` and `backup_options` in nxos_config work when module alias is used (https://github.com/ansible-collections/cisco.nxos/pull/121).
+- Makes sure that docstring and argspec are in sync and removes sanity ignores (https://github.com/ansible-collections/cisco.nxos/pull/112).
+- Update docs after sanity fixes to modules.
+- nxos_user - do not fail when a custom role is used (https://github.com/ansible-collections/cisco.nxos/pull/130)
+
+v1.0.0
+======
+
+New Plugins
+-----------
+
+Cliconf
+~~~~~~~
+
+- nxos - Use NX-OS cliconf to run commands on Cisco NX-OS platform
+
+Httpapi
+~~~~~~~
+
+- nxos - Use NX-API to run commands on Cisco NX-OS platform
+
+New Modules
+-----------
+
+- nxos_aaa_server - Manages AAA server global configuration.
+- nxos_aaa_server_host - Manages AAA server host-specific configuration.
+- nxos_acl - (deprecated, removed after 2022-06-01) Manages access list entries for ACLs.
+- nxos_acl_interface - (deprecated, removed after 2022-06-01) Manages applying ACLs to interfaces.
+- nxos_acl_interfaces - ACL interfaces resource module
+- nxos_acls - ACLs resource module
+- nxos_banner - Manage multiline banners on Cisco NXOS devices
+- nxos_bfd_global - Bidirectional Forwarding Detection (BFD) global-level configuration
+- nxos_bfd_interfaces - BFD interfaces resource module
+- nxos_bgp - Manages BGP configuration.
+- nxos_bgp_af - Manages BGP Address-family configuration.
+- nxos_bgp_neighbor - Manages BGP neighbors configurations.
+- nxos_bgp_neighbor_af - Manages BGP address-family's neighbors configuration.
+- nxos_command - Run arbitrary command on Cisco NXOS devices
+- nxos_config - Manage Cisco NXOS configuration sections
+- nxos_evpn_global - Handles the EVPN control plane for VXLAN.
+- nxos_evpn_vni - Manages Cisco EVPN VXLAN Network Identifier (VNI).
+- nxos_facts - Gets facts about NX-OS switches
+- nxos_feature - Manage features in NX-OS switches.
+- nxos_file_copy - Copy a file to a remote NXOS device.
+- nxos_gir - Trigger a graceful removal or insertion (GIR) of the switch.
+- nxos_gir_profile_management - Create a maintenance-mode or normal-mode profile for GIR.
+- nxos_hsrp - Manages HSRP configuration on NX-OS switches.
+- nxos_hsrp_interfaces - HSRP interfaces resource module
+- nxos_igmp - Manages IGMP global configuration.
+- nxos_igmp_interface - Manages IGMP interface configuration.
+- nxos_igmp_snooping - Manages IGMP snooping global configuration.
+- nxos_install_os - Set boot options like boot, kickstart image and issu.
+- nxos_interface - (deprecated, removed after 2022-06-01) Manages physical attributes of interfaces.
+- nxos_interface_ospf - Manages configuration of an OSPF interface instance.
+- nxos_interfaces - Interfaces resource module
+- nxos_l2_interface - (deprecated, removed after 2022-06-01) Manage Layer-2 interface on Cisco NXOS devices.
+- nxos_l2_interfaces - L2 interfaces resource module
+- nxos_l3_interface - (deprecated, removed after 2022-06-01) Manage L3 interfaces on Cisco NXOS network devices
+- nxos_l3_interfaces - L3 interfaces resource module
+- nxos_lacp - LACP resource module
+- nxos_lacp_interfaces - LACP interfaces resource module
+- nxos_lag_interfaces - LAG interfaces resource module
+- nxos_linkagg - (deprecated, removed after 2022-06-01) Manage link aggregation groups on Cisco NXOS devices.
+- nxos_lldp - (deprecated, removed after 2022-06-01) Manage LLDP configuration on Cisco NXOS network devices.
+- nxos_lldp_global - LLDP resource module
+- nxos_lldp_interfaces - LLDP interfaces resource module
+- nxos_logging - Manage logging on network devices
+- nxos_ntp - Manages core NTP configuration.
+- nxos_ntp_auth - Manages NTP authentication.
+- nxos_ntp_options - Manages NTP options.
+- nxos_nxapi - Manage NXAPI configuration on an NXOS device.
+- nxos_ospf - (deprecated, removed after 2022-06-01) Manages configuration of an ospf instance.
+- nxos_ospf_vrf - Manages a VRF for an OSPF router.
+- nxos_ospfv2 - OSPFv2 resource module
+- nxos_overlay_global - Configures anycast gateway MAC of the switch.
+- nxos_pim - Manages configuration of a PIM instance.
+- nxos_pim_interface - Manages PIM interface configuration.
+- nxos_pim_rp_address - Manages configuration of an PIM static RP address instance.
+- nxos_ping - Tests reachability using ping from Nexus switch.
+- nxos_reboot - Reboot a network device.
+- nxos_rollback - Set a checkpoint or rollback to a checkpoint.
+- nxos_rpm - Install patch or feature rpms on Cisco NX-OS devices.
+- nxos_smu - Perform SMUs on Cisco NX-OS devices.
+- nxos_snapshot - Manage snapshots of the running states of selected features.
+- nxos_snmp_community - Manages SNMP community configs.
+- nxos_snmp_contact - Manages SNMP contact info.
+- nxos_snmp_host - Manages SNMP host configuration.
+- nxos_snmp_location - Manages SNMP location information.
+- nxos_snmp_traps - Manages SNMP traps.
+- nxos_snmp_user - Manages SNMP users for monitoring.
+- nxos_static_route - (deprecated, removed after 2022-06-01) Manages static route configuration
+- nxos_static_routes - Static routes resource module
+- nxos_system - Manage the system attributes on Cisco NXOS devices
+- nxos_telemetry - TELEMETRY resource module
+- nxos_udld - Manages UDLD global configuration params.
+- nxos_udld_interface - Manages UDLD interface configuration params.
+- nxos_user - Manage the collection of local users on Nexus devices
+- nxos_vlan - (deprecated, removed after 2022-06-01) Manages VLAN resources and attributes.
+- nxos_vlans - VLANs resource module
+- nxos_vpc - Manages global VPC configuration
+- nxos_vpc_interface - Manages interface VPC configuration
+- nxos_vrf - Manages global VRF configuration.
+- nxos_vrf_af - Manages VRF AF.
+- nxos_vrf_interface - Manages interface specific VRF configuration.
+- nxos_vrrp - Manages VRRP configuration on NX-OS switches.
+- nxos_vtp_domain - Manages VTP domain configuration.
+- nxos_vtp_password - Manages VTP password configuration.
+- nxos_vtp_version - Manages VTP version configuration.
+- nxos_vxlan_vtep - Manages VXLAN Network Virtualization Endpoint (NVE).
+- nxos_vxlan_vtep_vni - Creates a Virtual Network Identifier member (VNI)
+
+Storage
+~~~~~~~
+
+- nxos_devicealias - Configuration of device alias.
+- nxos_vsan - Configuration of vsan.
+- nxos_zone_zoneset - Configuration of zone/zoneset.
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/changelogs/changelog.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/changelogs/changelog.yaml
new file mode 100644
index 00000000..9d5905f2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/changelogs/changelog.yaml
@@ -0,0 +1,449 @@
+ancestor: null
+releases:
+ 1.0.0:
+ modules:
+ - description: Manages AAA server global configuration.
+ name: nxos_aaa_server
+ namespace: ''
+ - description: Manages AAA server host-specific configuration.
+ name: nxos_aaa_server_host
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manages access list entries
+ for ACLs.
+ name: nxos_acl
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manages applying ACLs to
+ interfaces.
+ name: nxos_acl_interface
+ namespace: ''
+ - description: ACL interfaces resource module
+ name: nxos_acl_interfaces
+ namespace: ''
+ - description: ACLs resource module
+ name: nxos_acls
+ namespace: ''
+ - description: Manage multiline banners on Cisco NXOS devices
+ name: nxos_banner
+ namespace: ''
+ - description: Bidirectional Forwarding Detection (BFD) global-level configuration
+ name: nxos_bfd_global
+ namespace: ''
+ - description: BFD interfaces resource module
+ name: nxos_bfd_interfaces
+ namespace: ''
+ - description: Manages BGP configuration.
+ name: nxos_bgp
+ namespace: ''
+ - description: Manages BGP Address-family configuration.
+ name: nxos_bgp_af
+ namespace: ''
+ - description: Manages BGP neighbors configurations.
+ name: nxos_bgp_neighbor
+ namespace: ''
+ - description: Manages BGP address-family's neighbors configuration.
+ name: nxos_bgp_neighbor_af
+ namespace: ''
+ - description: Run arbitrary command on Cisco NXOS devices
+ name: nxos_command
+ namespace: ''
+ - description: Manage Cisco NXOS configuration sections
+ name: nxos_config
+ namespace: ''
+ - description: Configuration of device alias.
+ name: nxos_devicealias
+ namespace: storage
+ - description: Handles the EVPN control plane for VXLAN.
+ name: nxos_evpn_global
+ namespace: ''
+ - description: Manages Cisco EVPN VXLAN Network Identifier (VNI).
+ name: nxos_evpn_vni
+ namespace: ''
+ - description: Gets facts about NX-OS switches
+ name: nxos_facts
+ namespace: ''
+ - description: Manage features in NX-OS switches.
+ name: nxos_feature
+ namespace: ''
+ - description: Copy a file to a remote NXOS device.
+ name: nxos_file_copy
+ namespace: ''
+ - description: Trigger a graceful removal or insertion (GIR) of the switch.
+ name: nxos_gir
+ namespace: ''
+ - description: Create a maintenance-mode or normal-mode profile for GIR.
+ name: nxos_gir_profile_management
+ namespace: ''
+ - description: Manages HSRP configuration on NX-OS switches.
+ name: nxos_hsrp
+ namespace: ''
+ - description: HSRP interfaces resource module
+ name: nxos_hsrp_interfaces
+ namespace: ''
+ - description: Manages IGMP global configuration.
+ name: nxos_igmp
+ namespace: ''
+ - description: Manages IGMP interface configuration.
+ name: nxos_igmp_interface
+ namespace: ''
+ - description: Manages IGMP snooping global configuration.
+ name: nxos_igmp_snooping
+ namespace: ''
+ - description: Set boot options like boot, kickstart image and issu.
+ name: nxos_install_os
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manages physical attributes
+ of interfaces.
+ name: nxos_interface
+ namespace: ''
+ - description: Manages configuration of an OSPF interface instance.
+ name: nxos_interface_ospf
+ namespace: ''
+ - description: Interfaces resource module
+ name: nxos_interfaces
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manage Layer-2 interface
+ on Cisco NXOS devices.
+ name: nxos_l2_interface
+ namespace: ''
+ - description: L2 interfaces resource module
+ name: nxos_l2_interfaces
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manage L3 interfaces on
+ Cisco NXOS network devices
+ name: nxos_l3_interface
+ namespace: ''
+ - description: L3 interfaces resource module
+ name: nxos_l3_interfaces
+ namespace: ''
+ - description: LACP resource module
+ name: nxos_lacp
+ namespace: ''
+ - description: LACP interfaces resource module
+ name: nxos_lacp_interfaces
+ namespace: ''
+ - description: LAG interfaces resource module
+ name: nxos_lag_interfaces
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manage link aggregation
+ groups on Cisco NXOS devices.
+ name: nxos_linkagg
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manage LLDP configuration
+ on Cisco NXOS network devices.
+ name: nxos_lldp
+ namespace: ''
+ - description: LLDP resource module
+ name: nxos_lldp_global
+ namespace: ''
+ - description: LLDP interfaces resource module
+ name: nxos_lldp_interfaces
+ namespace: ''
+ - description: Manage logging on network devices
+ name: nxos_logging
+ namespace: ''
+ - description: Manages core NTP configuration.
+ name: nxos_ntp
+ namespace: ''
+ - description: Manages NTP authentication.
+ name: nxos_ntp_auth
+ namespace: ''
+ - description: Manages NTP options.
+ name: nxos_ntp_options
+ namespace: ''
+ - description: Manage NXAPI configuration on an NXOS device.
+ name: nxos_nxapi
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manages configuration of
+ an ospf instance.
+ name: nxos_ospf
+ namespace: ''
+ - description: Manages a VRF for an OSPF router.
+ name: nxos_ospf_vrf
+ namespace: ''
+ - description: OSPFv2 resource module
+ name: nxos_ospfv2
+ namespace: ''
+ - description: Configures anycast gateway MAC of the switch.
+ name: nxos_overlay_global
+ namespace: ''
+ - description: Manages configuration of a PIM instance.
+ name: nxos_pim
+ namespace: ''
+ - description: Manages PIM interface configuration.
+ name: nxos_pim_interface
+ namespace: ''
+ - description: Manages configuration of an PIM static RP address instance.
+ name: nxos_pim_rp_address
+ namespace: ''
+ - description: Tests reachability using ping from Nexus switch.
+ name: nxos_ping
+ namespace: ''
+ - description: Reboot a network device.
+ name: nxos_reboot
+ namespace: ''
+ - description: Set a checkpoint or rollback to a checkpoint.
+ name: nxos_rollback
+ namespace: ''
+ - description: Install patch or feature rpms on Cisco NX-OS devices.
+ name: nxos_rpm
+ namespace: ''
+ - description: Perform SMUs on Cisco NX-OS devices.
+ name: nxos_smu
+ namespace: ''
+ - description: Manage snapshots of the running states of selected features.
+ name: nxos_snapshot
+ namespace: ''
+ - description: Manages SNMP community configs.
+ name: nxos_snmp_community
+ namespace: ''
+ - description: Manages SNMP contact info.
+ name: nxos_snmp_contact
+ namespace: ''
+ - description: Manages SNMP host configuration.
+ name: nxos_snmp_host
+ namespace: ''
+ - description: Manages SNMP location information.
+ name: nxos_snmp_location
+ namespace: ''
+ - description: Manages SNMP traps.
+ name: nxos_snmp_traps
+ namespace: ''
+ - description: Manages SNMP users for monitoring.
+ name: nxos_snmp_user
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manages static route configuration
+ name: nxos_static_route
+ namespace: ''
+ - description: Static routes resource module
+ name: nxos_static_routes
+ namespace: ''
+ - description: Manage the system attributes on Cisco NXOS devices
+ name: nxos_system
+ namespace: ''
+ - description: TELEMETRY resource module
+ name: nxos_telemetry
+ namespace: ''
+ - description: Manages UDLD global configuration params.
+ name: nxos_udld
+ namespace: ''
+ - description: Manages UDLD interface configuration params.
+ name: nxos_udld_interface
+ namespace: ''
+ - description: Manage the collection of local users on Nexus devices
+ name: nxos_user
+ namespace: ''
+ - description: (deprecated, removed after 2022-06-01) Manages VLAN resources and
+ attributes.
+ name: nxos_vlan
+ namespace: ''
+ - description: VLANs resource module
+ name: nxos_vlans
+ namespace: ''
+ - description: Manages global VPC configuration
+ name: nxos_vpc
+ namespace: ''
+ - description: Manages interface VPC configuration
+ name: nxos_vpc_interface
+ namespace: ''
+ - description: Manages global VRF configuration.
+ name: nxos_vrf
+ namespace: ''
+ - description: Manages VRF AF.
+ name: nxos_vrf_af
+ namespace: ''
+ - description: Manages interface specific VRF configuration.
+ name: nxos_vrf_interface
+ namespace: ''
+ - description: Manages VRRP configuration on NX-OS switches.
+ name: nxos_vrrp
+ namespace: ''
+ - description: Configuration of vsan.
+ name: nxos_vsan
+ namespace: storage
+ - description: Manages VTP domain configuration.
+ name: nxos_vtp_domain
+ namespace: ''
+ - description: Manages VTP password configuration.
+ name: nxos_vtp_password
+ namespace: ''
+ - description: Manages VTP version configuration.
+ name: nxos_vtp_version
+ namespace: ''
+ - description: Manages VXLAN Network Virtualization Endpoint (NVE).
+ name: nxos_vxlan_vtep
+ namespace: ''
+ - description: Creates a Virtual Network Identifier member (VNI)
+ name: nxos_vxlan_vtep_vni
+ namespace: ''
+ - description: Configuration of zone/zoneset.
+ name: nxos_zone_zoneset
+ namespace: storage
+ plugins:
+ cliconf:
+ - description: Use NX-OS cliconf to run commands on Cisco NX-OS platform
+ name: nxos
+ namespace: null
+ httpapi:
+ - description: Use NX-API to run commands on Cisco NX-OS platform
+ name: nxos
+ namespace: null
+ release_date: '2020-06-23'
+ 1.0.1:
+ changes:
+ bugfixes:
+ - Element type of `commands` key should be `raw` since it accepts both strings
+ and dicts (https://github.com/ansible-collections/cisco.nxos/pull/126).
+ - Fix nxos_interfaces states replaced and overridden (https://github.com/ansible-collections/cisco.nxos/pull/102).
+ - Fixed force option in lag_interfaces.py (https://github.com/ansible-collections/cisco.nxos/pull/111).
+ - Make `src`, `backup` and `backup_options` in nxos_config work when module
+ alias is used (https://github.com/ansible-collections/cisco.nxos/pull/121).
+ - Makes sure that docstring and argspec are in sync and removes sanity ignores
+ (https://github.com/ansible-collections/cisco.nxos/pull/112).
+ - Update docs after sanity fixes to modules.
+ - nxos_user - do not fail when a custom role is used (https://github.com/ansible-collections/cisco.nxos/pull/130)
+ minor_changes:
+ - documentation - Use FQCN when refering to modules (https://github.com/ansible-collections/cisco.nxos/pull/116)
+ fragments:
+ - 102-fix-nxos_interfaces-states.yaml
+ - 111_update_lag_interfaces.yaml
+ - 116-add-FQCN-for-documentation
+ - fix_command_key.yaml
+ - fix_nxos_user_role.yaml
+ - fix_src_backup_with_module_alias.yaml
+ - remove_ignores.yaml
+ - update_docs.yaml
+ release_date: '2020-08-03'
+ 1.0.2:
+ changes:
+ release_summary: Rereleased 1.0.1 with updated changelog.
+ fragments:
+ - 1.0.2.yaml
+ release_date: '2020-08-07'
+ 1.1.0:
+ changes:
+ bugfixes:
+ - Allow facts round trip to work on nxos_vlans (https://github.com/ansible-collections/cisco.nxos/pull/141).
+ minor_changes:
+ - Add N9K multisite support(https://github.com/ansible-collections/cisco.nxos/pull/142)
+ fragments:
+ - 141_fix_nxos_vlans.yaml
+ - 142-N9K-multisite.yaml
+ release_date: '2020-08-28'
+ 1.2.0:
+ changes:
+ bugfixes:
+ - Correctly parse facts for lacp interfaces mode information (https://github.com/ansible-collections/cisco.nxos/pull/164).
+ - Fix for nxos smu issue (https://github.com/ansible-collections/cisco.nxos/pull/160).
+ - Fix regex for parsing configuration in nxos_lag_interfaces.
+ - Fix regexes in nxos_acl_interfaces facts and some code cleanup (https://github.com/ansible-collections/cisco.nxos/issues/149).
+ - Fix rendering of `log-adjacency-changes` commands.
+ - Preserve whitespaces in banner text (https://github.com/ansible-collections/cisco.nxos/pull/146).
+ deprecated_features:
+ - Deprecated `nxos_smu` in favour of `nxos_rpm` module.
+ - The `nxos_ospf_vrf` module is deprecated by `nxos_ospfv2` and `nxos_ospfv3`
+ Resource Modules.
+ minor_changes:
+ - Add nxos_ospfv3 module.
+ - Allow other transfer protocols than scp to pull files from a NXOS device in
+ nxos_file_copy module. sftp, http, https, tftp and ftp can be choosen as a
+ transfer protocol, when the file_pull parameter is true..
+ fragments:
+ - 161-transfer_protocol_file_copy.yaml
+ - add_nxos_ospfv3.yaml
+ - fix_lacp_interfaces_mode_facts_parsing.yaml
+ - fix_nxos_acl_interfaces.yaml
+ - fix_nxos_banner_with_spaces.yaml
+ - fix_nxos_lag_interfaces.yaml
+ - fix_nxos_ospfv2.yaml
+ - fix_nxos_smu.yaml
+ modules:
+ - description: OSPFv3 resource module
+ name: nxos_ospfv3
+ namespace: ''
+ release_date: '2020-10-01'
+ 1.3.0:
+ changes:
+ bugfixes:
+ - Allow `fex-fabric` option for mode key (https://github.com/ansible-collections/cisco.nxos/issues/166).
+ - Fixes for nxos rpm issue (https://github.com/ansible-collections/cisco.nxos/pull/173).
+ - Update regex to accept the platform "N77" as supporting fabricpath.
+ - Vlan config diff was not removing default values
+ deprecated_features:
+ - Deprecated `nxos_interface_ospf` in favor of `nxos_ospf_interfaces` Resource
+ Module.
+ minor_changes:
+ - Add nxos_ospf_interfaces resource module.
+ fragments:
+ - add_fex_fabric_l2_inteerfaces.yaml
+ - add_nxos_ospf_interfaces.yaml
+ - fix_nxos_rpm.yaml
+ - fix_vlan_diff.yaml
+ - vlans-fabricpath-mode-regex.yaml
+ modules:
+ - description: OSPF Interfaces Resource Module.
+ name: nxos_ospf_interfaces
+ namespace: ''
+ release_date: '2020-10-29'
+ 1.3.1:
+ changes:
+ bugfixes:
+ - Add version key to galaxy.yaml to work around ansible-galaxy bug
+ - Allow nxos_user to run with MDS (https://github.com/ansible-collections/cisco.nxos/issues/163).
+ - Fix for nxos_lag_interfaces issue (https://github.com/ansible-collections/cisco.nxos/pull/194).
+ - Make sure that the OSPF modules work properly when process_id is a string
+ (https://github.com/ansible-collections/cisco.nxos/issues/198).
+ fragments:
+ - fix_nxos_lag_interfaces_1.yaml
+ - fix_ospf_process_id.yaml
+ - galaxy-version.yaml
+ - support_nxos_user_mds.yaml
+ release_date: '2020-11-26'
+ 1.4.0:
+ changes:
+ bugfixes:
+ - config replace is actually supported for devices other than N9K and hence
+ we should not fail, and instead let the device handle it (https://github.com/ansible-collections/cisco.nxos/issues/215).
+ - Add support for interfaces in mode 'fabricpath' to l2_interfaces (https://github.com/ansible-collections/cisco.nxos/issues/220).
+ - Allow enabling `fabric forwarding` feature through nxos_feature (https://github.com/ansible-collections/cisco.nxos/issues/213).
+ - Allow tag updates with state replaced (https://github.com/ansible-collections/cisco.nxos/issues/197).
+ - Fixes traceback while parsing power supply info in nxos_facts for newer NX-OS
+ releases (https://github.com/ansible-collections/cisco.nxos/issues/192).
+ - Handle domain-name properly with vrf contexts (https://github.com/ansible-collections/cisco.nxos/issues/234).
+ - Parse interface contexts properly (https://github.com/ansible-collections/cisco.nxos/issues/195).
+ - Properly handle partial matches in community string (https://github.com/ansible-collections/cisco.nxos/issues/203).
+ - Update argspecs with default value for parameters.
+ - Update docs to clarify the idemptonecy releated caveat and add it in the output
+ warnings (https://github.com/ansible-collections/ansible.netcommon/pull/189)
+ deprecated_features:
+ - Deprecated `nxos_bgp` and `nxos_bgp_neighbor` modules in favor of `nxos_bgp_global` resource module.
+ doc_changes:
+ - Fix error in ``host_reachability`` parameter's example where a default value
+ is used, which the ``host_reachability`` parameter does not support. Improve
+ descriptions of some parameters to be more explicit. Correct spelling and
+ grammar where errors were noticed.
+ minor_changes:
+ - Add `echo_request` option for ICMP.
+ - Add nxos_bgp_global resource module.
+ security_fixes:
+ - Enable no_log for sensitive parameters in argspec.
+ fragments:
+ - 204-improve-nxos-vxlan-vtep-module-docs.yaml
+ - add_default_options.yaml
+ - add_nxos_bgp_global.yaml
+ - fix_interface_context.yaml
+ - fix_l2_interfaces_mode_fabricpath.yaml
+ - fix_nxos_facts.yaml
+ - fix_nxos_l3_interfaces_tag.yaml
+ - fix_nxos_system_vrf_domain.yaml
+ - mask_sensitive_values.yaml
+ - nxos_acls.yaml
+ - nxos_config_diff_doc_update.yaml
+ - nxos_config_replace.yaml
+ - nxos_feature.yaml
+ - nxos_snmp_community.yaml
+ - depr_bgp.yaml
+ modules:
+ - description: BGP Global resource module.
+ name: nxos_bgp_global
+ namespace: ''
+ release_date: '2021-01-29'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/changelogs/config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/changelogs/config.yaml
new file mode 100644
index 00000000..ee71a10c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/changelogs/config.yaml
@@ -0,0 +1,32 @@
+changelog_filename_template: CHANGELOG.rst
+changelog_filename_version_depth: 0
+changes_file: changelog.yaml
+changes_format: combined
+keep_fragments: false
+mention_ancestor: true
+new_plugins_after_name: removed_features
+notesdir: fragments
+prelude_section_name: release_summary
+prelude_section_title: Release Summary
+flatmap: true
+sections:
+- - major_changes
+ - Major Changes
+- - minor_changes
+ - Minor Changes
+- - breaking_changes
+ - Breaking Changes / Porting Guide
+- - deprecated_features
+ - Deprecated Features
+- - removed_features
+ - Removed Features (previously deprecated)
+- - security_fixes
+ - Security Fixes
+- - bugfixes
+ - Bugfixes
+- - known_issues
+ - Known Issues
+- - doc_changes
+ - Documentation Changes
+title: Cisco Nxos Collection
+trivial_section_name: trivial
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_aaa_server_host_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_aaa_server_host_module.rst
new file mode 100644
index 00000000..a4690809
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_aaa_server_host_module.rst
@@ -0,0 +1,576 @@
+.. _cisco.nxos.nxos_aaa_server_host_module:
+
+
+*******************************
+cisco.nxos.nxos_aaa_server_host
+*******************************
+
+**Manages AAA server host-specific configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages AAA server host-specific configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acct_port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Alternate UDP port for RADIUS accounting or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Address or name of the radius or tacacs host.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Alternate UDP port for RADIUS authentication or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encrypt_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>0</li>
+ <li>7</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of encryption applied to the entered key. O for clear text, 7 for encrypted. Type-6 encryption is not supported.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Timeout period for specified host, in seconds or keyword &#x27;default. Range is 1-60.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Shared secret for the specified host or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>server_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>radius</li>
+ <li>tacacs</li>
+ </ul>
+ </td>
+ <td>
+ <div>The server type is either radius or tacacs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tacacs_port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Alternate TCP port TACACS Server or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - Changes to the host key (shared secret) are not idempotent for type 0.
+ - If ``state=absent`` removes the whole host configuration.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Radius Server Host Basic settings
+ - name: Radius Server Host Basic settings
+ cisco.nxos.nxos_aaa_server_host:
+ state: present
+ server_type: radius
+ address: 1.2.3.4
+ acct_port: 2084
+ host_timeout: 10
+
+ # Radius Server Host Key Configuration
+ - name: Radius Server Host Key Configuration
+ cisco.nxos.nxos_aaa_server_host:
+ state: present
+ server_type: radius
+ address: 1.2.3.4
+ key: hello
+ encrypt_type: 7
+
+ # TACACS Server Host Configuration
+ - name: Tacacs Server Host Configuration
+ cisco.nxos.nxos_aaa_server_host:
+ state: present
+ server_type: tacacs
+ tacacs_port: 89
+ host_timeout: 10
+ address: 5.6.7.8
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>changed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>check to see if a change was made on the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>end_state</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of configuration after module execution</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;address&#x27;: &#x27;1.2.3.4&#x27;, &#x27;auth_port&#x27;: &#x27;2084&#x27;, &#x27;host_timeout&#x27;: &#x27;10&#x27;, &#x27;server_type&#x27;: &#x27;radius&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>existing</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of existing configuration</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>proposed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of parameters passed into module</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;address&#x27;: &#x27;1.2.3.4&#x27;, &#x27;auth_port&#x27;: &#x27;2084&#x27;, &#x27;host_timeout&#x27;: &#x27;10&#x27;, &#x27;server_type&#x27;: &#x27;radius&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;radius-server host 1.2.3.4 auth-port 2084 timeout 10&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_aaa_server_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_aaa_server_module.rst
new file mode 100644
index 00000000..e74945df
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_aaa_server_module.rst
@@ -0,0 +1,481 @@
+.. _cisco.nxos.nxos_aaa_server_module:
+
+
+**************************
+cisco.nxos.nxos_aaa_server
+**************************
+
+**Manages AAA server global configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages AAA server global configuration
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>deadtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Duration for which a non-reachable AAA server is skipped, in minutes or keyword &#x27;default. Range is 1-1440. Device default is 0.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>directed_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enabled</li>
+ <li>disabled</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables direct authentication requests to AAA server or keyword &#x27;default&#x27; Device default is disabled.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encrypt_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>0</li>
+ <li>7</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of encryption applied to the entered global key. O clear text, 7 encrypted. Type-6 encryption is not supported.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>global_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Global AAA shared secret or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>server_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Global AAA server timeout period, in seconds or keyword &#x27;default. Range is 1-60. Device default is 5.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>server_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>radius</li>
+ <li>tacacs</li>
+ </ul>
+ </td>
+ <td>
+ <div>The server type is either radius or tacacs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - The server_type parameter is always required.
+ - If encrypt_type is not supplied, the global AAA server key will be stored as encrypted (type 7).
+ - Changes to the global AAA server key with encrypt_type=0 are not idempotent.
+ - state=default will set the supplied parameters to their default values. The parameters that you want to default must also be set to default. If global_key=default, the global key will be removed.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Radius Server Basic settings
+ - name: Radius Server Basic settings
+ cisco.nxos.nxos_aaa_server:
+ server_type: radius
+ server_timeout: 9
+ deadtime: 20
+ directed_request: enabled
+
+ # Tacacs Server Basic settings
+ - name: Tacacs Server Basic settings
+ cisco.nxos.nxos_aaa_server:
+ server_type: tacacs
+ server_timeout: 8
+ deadtime: 19
+ directed_request: disabled
+
+ # Setting Global Key
+ - name: AAA Server Global Key
+ cisco.nxos.nxos_aaa_server:
+ server_type: radius
+ global_key: test_key
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;radius-server deadtime 22&#x27;, &#x27;radius-server timeout 11&#x27;, &#x27;radius-server directed-request&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acl_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acl_interface_module.rst
new file mode 100644
index 00000000..248e4582
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acl_interface_module.rst
@@ -0,0 +1,438 @@
+.. _cisco.nxos.nxos_acl_interface_module:
+
+
+*****************************
+cisco.nxos.nxos_acl_interface
+*****************************
+
+**(deprecated, removed after 2022-06-01) Manages applying ACLs to interfaces.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Updated modules released with more functionality
+:Alternative: nxos_acl_interfaces
+
+
+
+Synopsis
+--------
+- Manages applying ACLs to interfaces.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ingress</li>
+ <li>egress</li>
+ </ul>
+ </td>
+ <td>
+ <div>Direction ACL to be applied in on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of interface, e.g. <em>Ethernet1/1</em>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Case sensitive name of the access list (ACL).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify desired state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: apply egress acl to ethernet1/41
+ cisco.nxos.nxos_acl_interface:
+ name: ANSIBLE
+ interface: ethernet1/41
+ direction: egress
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>acl_applied_to</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>list of interfaces the ACL is applied to</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[{&#x27;acl_type&#x27;: &#x27;Router ACL&#x27;, &#x27;direction&#x27;: &#x27;egress&#x27;, &#x27;interface&#x27;: &#x27;Ethernet1/41&#x27;, &#x27;name&#x27;: &#x27;ANSIBLE&#x27;}]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface ethernet1/41&#x27;, &#x27;ip access-group ANSIBLE out&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acl_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acl_interfaces_module.rst
new file mode 100644
index 00000000..ed470b01
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acl_interfaces_module.rst
@@ -0,0 +1,609 @@
+.. _cisco.nxos.nxos_acl_interfaces_module:
+
+
+******************************
+cisco.nxos.nxos_acl_interfaces
+******************************
+
+**ACL interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Add and remove Access Control Lists on interfaces in NX-OS platform
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="4">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of interfaces to be configured with ACLs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>access_groups</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of address family indicators with ACLs to be configured on the interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of Access Control Lists for the interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>Direction to be applied for the ACL</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the ACL to be added/removed</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use ACL as port policy.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Address Family Indicator of the ACLs to be configured</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the interface</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section &#x27;^interface&#x27;</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>overridden</li>
+ <li>rendered</li>
+ <li>replaced</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NX-OS 7.3.(0)D1(1) on VIRL
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # ------------
+ #
+
+ - name: Merge ACL interfaces configuration
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ - name: Ethernet1/2
+ access_groups:
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ direction: in
+
+ - name: Eth1/5
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: PortACL
+ direction: in
+ port: true
+
+ - name: ACL1v4
+ direction: out
+
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ direction: in
+ state: merged
+
+ # After state:
+ # ------------
+ # interface Ethernet1/2
+ # ipv6 traffic-filter ACL1v6 in
+ # interface Ethernet1/5
+ # ip port access-group PortACL in
+ # ip access-group ACL1v4 out
+ # ipv6 traffic-filter ACL1v6 in
+
+ # Using replaced
+
+ # Before state:
+ # ------------
+ # interface Ethernet1/2
+ # ipv6 traffic-filter ACL1v6 in
+ # interface Ethernet1/5
+ # ip port access-group PortACL in
+ # ip access-group ACL1v4 out
+ # ipv6 traffic-filter ACL1v6 in
+
+ - name: Replace interface configuration with given configuration
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ - name: Eth1/5
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: NewACLv4
+ direction: out
+
+ - name: Ethernet1/3
+ access_groups:
+ - afi: ipv6
+ acls:
+ - name: NewACLv6
+ direction: in
+ port: true
+ state: replaced
+
+ # After state:
+ # ------------
+ # interface Ethernet1/2
+ # ipv6 traffic-filter ACL1v6 in
+ # interface Ethernet1/3
+ # ipv6 port traffic-filter NewACLv6 in
+ # interface Ethernet1/5
+ # ip access-group NewACLv4 out
+
+ # Using overridden
+
+ # Before state:
+ # ------------
+ # interface Ethernet1/2
+ # ipv6 traffic-filter ACL1v6 in
+ # interface Ethernet1/5
+ # ip port access-group PortACL in
+ # ip access-group ACL1v4 out
+ # ipv6 traffic-filter ACL1v6 in
+
+ - name: Override interface configuration with given configuration
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ - name: Ethernet1/3
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: ACL1v4
+ direction: out
+
+ - name: PortACL
+ port: true
+ direction: in
+ - afi: ipv6
+ acls:
+ - name: NewACLv6
+ direction: in
+ port: true
+ state: overridden
+
+ # After state:
+ # ------------
+ # interface Ethernet1/3
+ # ip access-group ACL1v4 out
+ # ip port access-group PortACL in
+ # ipv6 port traffic-filter NewACLv6 in
+
+ # Using deleted to remove ACL config from specified interfaces
+
+ # Before state:
+ # -------------
+ # interface Ethernet1/1
+ # ip access-group ACL2v4 in
+ # interface Ethernet1/2
+ # ipv6 traffic-filter ACL1v6 in
+ # interface Ethernet1/5
+ # ip port access-group PortACL in
+ # ip access-group ACL1v4 out
+ # ipv6 traffic-filter ACL1v6 in
+
+ - name: Delete ACL configuration on interfaces
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ - name: Ethernet1/5
+ - name: Ethernet1/2
+ state: deleted
+
+ # After state:
+ # -------------
+ # interface Ethernet1/1
+ # ip access-group ACL2v4 in
+ # interface Ethernet1/2
+ # interface Ethernet1/5
+
+ # Using deleted to remove ACL config from all interfaces
+
+ # Before state:
+ # -------------
+ # interface Ethernet1/1
+ # ip access-group ACL2v4 in
+ # interface Ethernet1/2
+ # ipv6 traffic-filter ACL1v6 in
+ # interface Ethernet1/5
+ # ip port access-group PortACL in
+ # ip access-group ACL1v4 out
+ # ipv6 traffic-filter ACL1v6 in
+
+ - name: Delete ACL configuration from all interfaces
+ cisco.nxos.nxos_acl_interfaces:
+ state: deleted
+
+ # After state:
+ # -------------
+ # interface Ethernet1/1
+ # interface Ethernet1/2
+ # interface Ethernet1/5
+
+ # Using parsed
+
+ - name: Parse given configuration into structured format
+ cisco.nxos.nxos_acl_interfaces:
+ running_config: |
+ interface Ethernet1/2
+ ipv6 traffic-filter ACL1v6 in
+ interface Ethernet1/5
+ ipv6 traffic-filter ACL1v6 in
+ ip access-group ACL1v4 out
+ ip port access-group PortACL in
+ state: parsed
+
+ # returns
+ # parsed:
+ # - name: Ethernet1/2
+ # access_groups:
+ # - afi: ipv6
+ # acls:
+ # - name: ACL1v6
+ # direction: in
+ # - name: Ethernet1/5
+ # access_groups:
+ # - afi: ipv4
+ # acls:
+ # - name: PortACL
+ # direction: in
+ # port: True
+ # - name: ACL1v4
+ # direction: out
+ # - afi: ipv6
+ # acls:
+ # - name: ACL1v6
+ # direction: in
+
+
+ # Using gathered:
+
+ # Before state:
+ # ------------
+ # interface Ethernet1/2
+ # ipv6 traffic-filter ACL1v6 in
+ # interface Ethernet1/5
+ # ipv6 traffic-filter ACL1v6 in
+ # ip access-group ACL1v4 out
+ # ip port access-group PortACL in
+
+ - name: Gather existing configuration from device
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ state: gathered
+
+ # returns
+ # gathered:
+ # - name: Ethernet1/2
+ # access_groups:
+ # - afi: ipv6
+ # acls:
+ # - name: ACL1v6
+ # direction: in
+ # - name: Ethernet1/5
+ # access_groups:
+ # - afi: ipv4
+ # acls:
+ # - name: PortACL
+ # direction: in
+ # port: True
+ # - name: ACL1v4
+ # direction: out
+ # - afi: ipv6
+ # acls:
+ # - name: ACL1v6
+ # direction: in
+
+
+ # Using rendered
+
+ - name: Render required configuration to be pushed to the device
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ - name: Ethernet1/2
+ access_groups:
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ direction: in
+
+ - name: Ethernet1/5
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: PortACL
+ direction: in
+ port: true
+ - name: ACL1v4
+ direction: out
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ direction: in
+ state: rendered
+
+ # returns
+ # rendered:
+ # interface Ethernet1/2
+ # ipv6 traffic-filter ACL1v6 in
+ # interface Ethernet1/5
+ # ipv6 traffic-filter ACL1v6 in
+ # ip access-group ACL1v4 out
+ # ip port access-group PortACL in
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/2&#x27;, &#x27;ipv6 traffic-filter ACL1v6 out&#x27;, &#x27;ip port access-group PortACL in&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Adharsh Srivats Rangarajan (@adharshsrivatsr)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acl_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acl_module.rst
new file mode 100644
index 00000000..bd1c4b63
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acl_module.rst
@@ -0,0 +1,835 @@
+.. _cisco.nxos.nxos_acl_module:
+
+
+*******************
+cisco.nxos.nxos_acl
+*******************
+
+**(deprecated, removed after 2022-06-01) Manages access list entries for ACLs.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Updated modules released with more functionality
+:Alternative: nxos_acls
+
+
+
+Synopsis
+--------
+- Manages access list entries for ACLs.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ack</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the ACK bit.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>action</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>permit</li>
+ <li>deny</li>
+ <li>remark</li>
+ </ul>
+ </td>
+ <td>
+ <div>Action of the ACE.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination ip and mask using IP/MASK notation and supports the keyword &#x27;any&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest_port1</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Port/protocol and also first (lower) port when using range operand.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest_port2</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Second (end) port when using range operand.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest_port_op</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>any</li>
+ <li>eq</li>
+ <li>gt</li>
+ <li>lt</li>
+ <li>neq</li>
+ <li>range</li>
+ </ul>
+ </td>
+ <td>
+ <div>Destination port operands such as eq, neq, gt, lt, range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dscp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>af11</li>
+ <li>af12</li>
+ <li>af13</li>
+ <li>af21</li>
+ <li>af22</li>
+ <li>af23</li>
+ <li>af31</li>
+ <li>af32</li>
+ <li>af33</li>
+ <li>af41</li>
+ <li>af42</li>
+ <li>af43</li>
+ <li>cs1</li>
+ <li>cs2</li>
+ <li>cs3</li>
+ <li>cs4</li>
+ <li>cs5</li>
+ <li>cs6</li>
+ <li>cs7</li>
+ <li>default</li>
+ <li>ef</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with given dscp value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>established</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match established connections.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fin</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the FIN bit.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fragments</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Check non-initial fragments.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log matches against this entry.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Case sensitive name of the access list (ACL).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>precedence</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>critical</li>
+ <li>flash</li>
+ <li>flash-override</li>
+ <li>immediate</li>
+ <li>internet</li>
+ <li>network</li>
+ <li>priority</li>
+ <li>routine</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match packets with given precedence.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>proto</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Port number or protocol (as supported by the switch).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>psh</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the PSH bit.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remark</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>If action is set to remark, this is the description.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rst</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the RST bit.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>seq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sequence number of the entry (ACE).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>src</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source ip and mask using IP/MASK notation and supports keyword &#x27;any&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>src_port1</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Port/protocol and also first (lower) port when using range operand.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>src_port2</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Second (end) port when using range operand.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>src_port_op</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>any</li>
+ <li>eq</li>
+ <li>gt</li>
+ <li>lt</li>
+ <li>neq</li>
+ <li>range</li>
+ </ul>
+ </td>
+ <td>
+ <div>Source port operands such as eq, neq, gt, lt, range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ <li>delete_acl</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify desired state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>syn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the SYN bit.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time_range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of time-range to apply.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>urg</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the URG bit.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - ``state=absent`` removes the ACE if it exists.
+ - ``state=delete_acl`` deletes the ACL if it exists.
+ - For idempotency, use port numbers for the src/dest port params like *src_port1* and names for the well defined protocols for the *proto* param.
+ - Although this module is idempotent in that if the ace as presented in the task is identical to the one on the switch, no changes will be made. If there is any difference, what is in Ansible will be pushed (configured options will be overridden). This is to improve security, but at the same time remember an ACE is removed, then re-added, so if there is a change, the new ACE will be exactly what parameters you are sending to the module.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # configure ACL ANSIBLE
+ - cisco.nxos.nxos_acl:
+ name: ANSIBLE
+ seq: 10
+ action: permit
+ proto: tcp
+ src: 192.0.2.1/24
+ dest: any
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ip access-list ANSIBLE&#x27;, &#x27;10 permit tcp 192.0.2.1/24 any&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acls_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acls_module.rst
new file mode 100644
index 00000000..d08a06fc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_acls_module.rst
@@ -0,0 +1,2789 @@
+.. _cisco.nxos.nxos_acls_module:
+
+
+********************
+cisco.nxos.nxos_acls
+********************
+
+**ACLs resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manage named IP ACLs on the Cisco NX-OS platform
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="7">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of ACL options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of the ACLs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The entries within the ACL.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>destination</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the packet destination.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination network address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Any destination address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Host IP address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the destination port or protocol (only for TCP and UDP).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a greater port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a lower port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets not on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets in the range of port numbers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the end of the port range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the start of the port range.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination network prefix. Only for prefixes of value less than 31 for ipv4 and 127 for ipv6. Prefixes of 32 (ipv4) and 128 (ipv6) should be given in the &#x27;host&#x27; key.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wildcard_bits</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination wildcard bits.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dscp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match packets with given DSCP value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fragments</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Check non-initial fragments.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>grant</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>permit</li>
+ <li>deny</li>
+ </ul>
+ </td>
+ <td>
+ <div>Action to be applied on the rule.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log matches against this entry.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>precedence</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match packets with given precedence value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol_options</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>All possible suboptions for the protocol chosen.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>icmp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ICMP protocol options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>administratively_prohibited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administratively prohibited</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>alternate_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Alternate address</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>conversion_error</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Datagram conversion</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dod_host_prohibited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host prohibited</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dod_net_prohibited</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Net prohibited</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo (ping)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo reply</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Echo request (ping)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>general_parameter_problem</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Parameter problem</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_isolated</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host isolated</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_precedence_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host unreachable for precedence</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_tos_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host redirect for TOS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_tos_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host unreachable for TOS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_unknown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host unknown</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Information replies</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>information_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Information requests</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mask_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mask replies</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mask_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mask requests</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_code</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ICMP message code</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ICMP message type</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mobile_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mobile host redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>net_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Network redirect</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>net_tos_redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Net redirect for TOS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>net_tos_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Network unreachable for TOS</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>net_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Net unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network_unknown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Network unknown</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_room_for_option</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Parameter required but no room</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>option_missing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Parameter required but not present</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>packet_too_big</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Fragmentation needed and DF set</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parameter_problem</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All parameter problems</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Port unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>precedence_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Precedence cutoff</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol_unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Protocol unreachable</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reassembly_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Reassembly timeout</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redirect</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All redirects</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_advertisement</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router discovery advertisements</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_solicitation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router discovery solicitations</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_quench</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Source quenches</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_route_failed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Source route failed</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>time_exceeded</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All time exceeded.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timestamp_reply</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Timestamp replies</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timestamp_request</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Timestamp requests</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>traceroute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Traceroute</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl_exceeded</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>TTL exceeded</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unreachable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All unreachables</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>igmp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IGMP protocol options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dvmrp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Distance Vector Multicast Routing Protocol</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_query</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host Query</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_report</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Host Report</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tcp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>TCP flags.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ack</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the ACK bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>established</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match established connections</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fin</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the FIN bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>psh</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the PSH bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rst</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the RST bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>syn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the SYN bit</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>urg</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Match on the URG bit</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remark</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Access list entry comment.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sequence</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sequence number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the packet source.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source network address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>any</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Any source address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Host IP address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the destination port or protocol (only for TCP and UDP).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>eq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a greater port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets with a lower port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neq</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets not on a given port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Match only packets in the range of port numbers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the end of the port range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the start of the port range.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source network prefix. Only for prefixes of mask value less than 31 for ipv4 and 127 for ipv6. Prefixes of mask 32 (ipv4) and 128 (ipv6) should be given in the &#x27;host&#x27; key.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wildcard_bits</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source wildcard bits.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the ACL.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>The Address Family Indicator (AFI) for the ACL.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section &#x27;ip(v6</b>* access-list).</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>overridden</li>
+ <li>rendered</li>
+ <li>replaced</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NX-OS 7.3.(0)D1(1) on VIRL
+ - As NX-OS allows configuring a rule again with different sequence numbers, the user is expected to provide sequence numbers for the access control entries to preserve idempotency. If no sequence number is given, the rule will be added as a new rule by the device.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+
+ - name: Merge new ACLs configuration
+ cisco.nxos.nxos_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: ACL1v4
+ aces:
+ - grant: deny
+ destination:
+ address: 192.0.2.64
+ wildcard_bits: 0.0.0.255
+ source:
+ any: true
+ port_protocol:
+ lt: 55
+ protocol: tcp
+ protocol_options:
+ tcp:
+ ack: true
+ fin: true
+ sequence: 50
+
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ aces:
+ - grant: permit
+ sequence: 10
+ source:
+ any: true
+ destination:
+ prefix: 2001:db8:12::/32
+ protocol: sctp
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # ip access-list ACL1v4
+ # 50 deny tcp any lt 55 192.0.2.64 0.0.0.255 ack fin
+ # ipv6 access-list ACL1v6
+ # 10 permit sctp any any
+
+ # Using replaced
+
+ # Before state:
+ # ----------------
+ #
+ # ip access-list ACL1v4
+ # 10 permit ip any any
+ # 20 deny udp any any
+ # ip access-list ACL2v4
+ # 10 permit ahp 192.0.2.0 0.0.0.255 any
+ # ip access-list ACL1v6
+ # 10 permit sctp any any
+ # 20 remark IPv6 ACL
+ # ip access-list ACL2v6
+ # 10 deny ipv6 any 2001:db8:3000::/36
+ # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+ - name: Replace existing ACL configuration with provided configuration
+ cisco.nxos.nxos_acls:
+ config:
+ - afi: ipv4
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ aces:
+ - sequence: 20
+ grant: permit
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: pip
+
+ - remark: Replaced ACE
+
+ - name: ACL2v6
+ state: replaced
+
+ # After state:
+ # ---------------
+ #
+ # ipv6 access-list ACL1v6
+ # 20 permit pip any any
+ # 30 remark Replaced ACE
+ # ipv6 access-list ACL2v6
+
+ # Using overridden
+
+ # Before state:
+ # ----------------
+ #
+ # ip access-list ACL1v4
+ # 10 permit ip any any
+ # 20 deny udp any any
+ # ip access-list ACL2v4
+ # 10 permit ahp 192.0.2.0 0.0.0.255 any
+ # ip access-list ACL1v6
+ # 10 permit sctp any any
+ # 20 remark IPv6 ACL
+ # ip access-list ACL2v6
+ # 10 deny ipv6 any 2001:db8:3000::/36
+ # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+ - name: Override existing configuration with provided configuration
+ cisco.nxos.nxos_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: NewACL
+ aces:
+ - grant: deny
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.255.255
+ destination:
+ any: true
+ protocol: eigrp
+ - remark: Example for overridden state
+ state: overridden
+
+ # After state:
+ # ------------
+ #
+ # ip access-list NewACL
+ # 10 deny eigrp 192.0.2.0 0.0.255.255 any
+ # 20 remark Example for overridden state
+
+ # Using deleted:
+ #
+ # Before state:
+ # -------------
+ #
+ # ip access-list ACL1v4
+ # 10 permit ip any any
+ # 20 deny udp any any
+ # ip access-list ACL2v4
+ # 10 permit ahp 192.0.2.0 0.0.0.255 any
+ # ip access-list ACL1v6
+ # 10 permit sctp any any
+ # 20 remark IPv6 ACL
+ # ip access-list ACL2v6
+ # 10 deny ipv6 any 2001:db8:3000::/36
+ # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+ - name: Delete all ACLs
+ cisco.nxos.nxos_acls:
+ config:
+ state: deleted
+
+ # After state:
+ # -----------
+ #
+
+
+ # Before state:
+ # -------------
+ #
+ # ip access-list ACL1v4
+ # 10 permit ip any any
+ # 20 deny udp any any
+ # ip access-list ACL2v4
+ # 10 permit ahp 192.0.2.0 0.0.0.255 any
+ # ip access-list ACL1v6
+ # 10 permit sctp any any
+ # 20 remark IPv6 ACL
+ # ip access-list ACL2v6
+ # 10 deny ipv6 any 2001:db8:3000::/36
+ # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+ - name: Delete all ACLs in given AFI
+ cisco.nxos.nxos_acls:
+ config:
+ - afi: ipv4
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+ # ip access-list ACL1v6
+ # 10 permit sctp any any
+ # 20 remark IPv6 ACL
+ # ip access-list ACL2v6
+ # 10 deny ipv6 any 2001:db8:3000::/36
+ # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+
+
+ # Before state:
+ # -------------
+ #
+ # ip access-list ACL1v4
+ # 10 permit ip any any
+ # 20 deny udp any any
+ # ip access-list ACL2v4
+ # 10 permit ahp 192.0.2.0 0.0.0.255 any
+ # ipv6 access-list ACL1v6
+ # 10 permit sctp any any
+ # 20 remark IPv6 ACL
+ # ipv6 access-list ACL2v6
+ # 10 deny ipv6 any 2001:db8:3000::/36
+ # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+ - name: Delete specific ACLs
+ cisco.nxos.nxos_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: ACL1v4
+ - name: ACL2v4
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ state: deleted
+
+ # After state:
+ # ------------
+ # ipv6 access-list ACL2v6
+ # 10 deny ipv6 any 2001:db8:3000::/36
+ # 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+ # Using parsed
+
+ - name: Parse given config to structured data
+ cisco.nxos.nxos_acls:
+ running_config: |
+ ip access-list ACL1v4
+ 50 deny tcp any lt 55 192.0.2.64 0.0.0.255 ack fin
+ ipv6 access-list ACL1v6
+ 10 permit sctp any any
+ state: parsed
+
+ # returns:
+ # parsed:
+ # - afi: ipv4
+ # acls:
+ # - name: ACL1v4
+ # aces:
+ # - grant: deny
+ # destination:
+ # address: 192.0.2.64
+ # wildcard_bits: 0.0.0.255
+ # source:
+ # any: true
+ # port_protocol:
+ # lt: 55
+ # protocol: tcp
+ # protocol_options:
+ # tcp:
+ # ack: true
+ # fin: true
+ # sequence: 50
+ #
+ # - afi: ipv6
+ # acls:
+ # - name: ACL1v6
+ # aces:
+ # - grant: permit
+ # sequence: 10
+ # source:
+ # any: true
+ # destination:
+ # prefix: 2001:db8:12::/32
+ # protocol: sctp
+
+
+ # Using gathered:
+
+ # Before state:
+ # ------------
+ #
+ # ip access-list ACL1v4
+ # 50 deny tcp any lt 55 192.0.2.64 0.0.0.255 ack fin
+ # ipv6 access-list ACL1v6
+ # 10 permit sctp any any
+
+ - name: Gather existing configuration
+ cisco.nxos.nxos_acls:
+ state: gathered
+
+ # returns:
+ # gathered:
+ # - afi: ipv4
+ # acls:
+ # - name: ACL1v4
+ # aces:
+ # - grant: deny
+ # destination:
+ # address: 192.0.2.64
+ # wildcard_bits: 0.0.0.255
+ # source:
+ # any: true
+ # port_protocol:
+ # lt: 55
+ # protocol: tcp
+ # protocol_options:
+ # tcp:
+ # ack: true
+ # fin: true
+ # sequence: 50
+
+ # - afi: ipv6
+ # acls:
+ # - name: ACL1v6
+ # aces:
+ # - grant: permit
+ # sequence: 10
+ # source:
+ # any: true
+ # destination:
+ # prefix: 2001:db8:12::/32
+ # protocol: sctp
+
+
+ # Using rendered
+
+ - name: Render required configuration to be pushed to the device
+ cisco.nxos.nxos_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: ACL1v4
+ aces:
+ - grant: deny
+ destination:
+ address: 192.0.2.64
+ wildcard_bits: 0.0.0.255
+ source:
+ any: true
+ port_protocol:
+ lt: 55
+ protocol: tcp
+ protocol_options:
+ tcp:
+ ack: true
+ fin: true
+ sequence: 50
+
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ aces:
+ - grant: permit
+ sequence: 10
+ source:
+ any: true
+ destination:
+ prefix: 2001:db8:12::/32
+ protocol: sctp
+ state: rendered
+
+ # returns:
+ # rendered:
+ # ip access-list ACL1v4
+ # 50 deny tcp any lt 55 192.0.2.64 0.0.0.255 ack fin
+ # ipv6 access-list ACL1v6
+ # 10 permit sctp any any
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ip access-list ACL1v4&#x27;, &#x27;10 permit ip any any precedence critical log&#x27;, &#x27;20 deny tcp any lt smtp host 192.0.2.64 ack fin&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Adharsh Srivats Rangarajan (@adharshsrivatsr)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_banner_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_banner_module.rst
new file mode 100644
index 00000000..76383b9d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_banner_module.rst
@@ -0,0 +1,404 @@
+.. _cisco.nxos.nxos_banner_module:
+
+
+**********************
+cisco.nxos.nxos_banner
+**********************
+
+**Manage multiline banners on Cisco NXOS devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This will configure both exec and motd banners on remote devices running Cisco NXOS. It allows playbooks to add or remove banner text from the active running configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>banner</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>exec</li>
+ <li>motd</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies which banner that should be configured on the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies whether or not the configuration is present in the current devices active running configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>text</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The banner text that should be present in the remote device running configuration. This argument accepts a multiline string, with no empty lines. Requires <em>state=present</em>.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Since responses from the device are always read with surrounding whitespaces stripped, tasks that configure banners with preceeding or trailing whitespaces will not be idempotent.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure the exec banner
+ cisco.nxos.nxos_banner:
+ banner: exec
+ text: |
+ this is my exec banner
+ that contains a multiline
+ string
+ state: present
+ - name: remove the motd banner
+ cisco.nxos.nxos_banner:
+ banner: motd
+ state: absent
+ - name: Configure banner from file
+ cisco.nxos.nxos_banner:
+ banner: motd
+ text: "{{ lookup('file', './config_partial/raw_banner.cfg') }}"
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;banner exec&#x27;, &#x27;this is my exec banner&#x27;, &#x27;that contains a multiline&#x27;, &#x27;string&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bfd_global_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bfd_global_module.rst
new file mode 100644
index 00000000..606bf4e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bfd_global_module.rst
@@ -0,0 +1,559 @@
+.. _cisco.nxos.nxos_bfd_global_module:
+
+
+**************************
+cisco.nxos.nxos_bfd_global
+**************************
+
+**Bidirectional Forwarding Detection (BFD) global-level configuration**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages Bidirectional Forwarding Detection (BFD) global-level configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Loopback interface used for echo frames.</div>
+ <div>Valid values are loopback interface name or &#x27;deleted&#x27;.</div>
+ <div>Not supported on N5K/N6K</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo_rx_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD Echo receive interval in milliseconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fabricpath_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD fabricpath interval timer values.</div>
+ <div>Value must be a dict defining values for keys (tx, min_rx, and multiplier).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fabricpath_slow_timer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD fabricpath slow rate timer in milliseconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fabricpath_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD fabricpath control vlan.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD interval timer values.</div>
+ <div>Value must be a dict defining values for keys (tx, min_rx, and multiplier)</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv4_echo_rx_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD IPv4 session echo receive interval in milliseconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv4_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD IPv4 interval timer values.</div>
+ <div>Value must be a dict defining values for keys (tx, min_rx, and multiplier).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv4_slow_timer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD IPv4 slow rate timer in milliseconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6_echo_rx_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD IPv6 session echo receive interval in milliseconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD IPv6 interval timer values.</div>
+ <div>Value must be a dict defining values for keys (tx, min_rx, and multiplier).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6_slow_timer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD IPv6 slow rate timer in milliseconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>slow_timer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD slow rate timer in milliseconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>startup_timer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BFD delayed startup timer in seconds.</div>
+ <div>Not supported on N5K/N6K/N7K</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 9.2(2)
+ - BFD global will automatically enable 'feature bfd' if it is disabled.
+ - BFD global does not have a 'state' parameter. All of the BFD commands are unique and are defined if 'feature bfd' is enabled.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_bfd_global:
+ echo_interface: Ethernet1/2
+ echo_rx_interval: 50
+ interval:
+ tx: 50
+ min_rx: 50
+ multiplier: 4
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>cmds</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;bfd echo-interface loopback1&#x27;, &#x27;bfd slow-timer 2000&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Chris Van Heuveln (@chrisvanheuveln)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bfd_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bfd_interfaces_module.rst
new file mode 100644
index 00000000..f9095be5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bfd_interfaces_module.rst
@@ -0,0 +1,393 @@
+.. _cisco.nxos.nxos_bfd_interfaces_module:
+
+
+******************************
+cisco.nxos.nxos_bfd_interfaces
+******************************
+
+**BFD interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages attributes of Bidirectional Forwarding Detection (BFD) on the interface.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The provided configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable Bidirectional Forwarding Detection (BFD) on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>echo</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable BFD Echo functionality on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The name of the interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section &#x27;^interface|^feature bfd&#x27;</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NX-OS 7.0(3)I5(1).
+ - Feature bfd should be enabled for this module.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using deleted
+
+ - name: Configure interfaces
+ cisco.nxos.nxos_bfd_interfaces:
+ state: deleted
+
+
+ # Using merged
+
+ - name: Configure interfaces
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ - name: Ethernet1/1
+ bfd: enable
+ echo: enable
+ - name: Ethernet1/2
+ bfd: disable
+ echo: disable
+ state: merged
+
+
+ # Using overridden
+
+ - name: Configure interfaces
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ - name: Ethernet1/1
+ bfd: enable
+ echo: enable
+ - name: Ethernet1/2
+ bfd: disable
+ echo: disable
+ state: overridden
+
+
+ # Using replaced
+
+ - name: Configure interfaces
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ - name: Ethernet1/1
+ bfd: enable
+ echo: enable
+ - name: Ethernet1/2
+ bfd: disable
+ echo: disable
+ state: replaced
+
+ # Using rendered
+
+ - name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ - name: Ethernet1/800
+ bfd: enable
+ echo: enable
+ - name: Ethernet1/801
+ bfd: disable
+ echo: disable
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # rendered:
+ # - "interface Ethernet1/800"
+ # - "bfd"
+ # - "bfd echo"
+ # - "interface Ethernet1/801"
+ # - "no bfd"
+ # - "no bfd echo"
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+
+ # feature bfd
+ # interface Ethernet1/800
+ # no switchport
+ # no bfd
+ # no bfd echo
+ # interface Ethernet1/801
+ # no switchport
+ # no bfd
+ # interface Ethernet1/802
+ # no switchport
+ # no bfd echo
+ # interface mgmt0
+ # ip address dhcp
+ # vrf member management
+
+ - name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_bfd_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+
+ # parsed:
+ # - bfd: disable
+ # echo: disable
+ # name: Ethernet1/800
+ # - bfd: disable
+ # echo: enable
+ # name: Ethernet1/801
+ # - bfd: enable
+ # echo: disable
+ # name: Ethernet1/802
+ # - bfd: enable
+ # echo: enable
+ # name: mgmt0
+
+ # Using gathered
+
+ # Existing device config state
+ # -------------------------------
+
+ # feature bfd
+ # interface Ethernet1/1
+ # no switchport
+ # no bfd
+ # interface Ethernet1/2
+ # no switchport
+ # no bfd echo
+ # interface mgmt0
+ # ip address dhcp
+ # vrf member management
+
+ - name: Gather bfd_interfaces facts from the device using nxos_bfd_interfaces
+ cisco.nxos.nxos_bfd_interfaces:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+ # gathered:
+ # - name: Ethernet1/1
+ # bfd: disable
+ # echo: enable
+ # - name: Ethernet1/3
+ # echo: disable
+ # bfd: enable
+ # - name: mgmt0
+ # bfd: enable
+ # echo: enable
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/1&#x27;, &#x27;no bfd&#x27;, &#x27;no bfd echo&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Chris Van Heuveln (@chrisvanheuveln)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_af_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_af_module.rst
new file mode 100644
index 00000000..473ab54f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_af_module.rst
@@ -0,0 +1,899 @@
+.. _cisco.nxos.nxos_bgp_af_module:
+
+
+**********************
+cisco.nxos.nxos_bgp_af
+**********************
+
+**Manages BGP Address-family configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages BGP Address-family configurations on NX-OS switches.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>additional_paths_install</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Install a backup path into the forwarding table and provide prefix independent convergence (PIC) in case of a PE-CE link failure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>additional_paths_receive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables the receive capability of additional paths for all of the neighbors under this address family for which the capability has not been disabled.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>additional_paths_selection</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the capability of selecting additional paths for a prefix. Valid values are a string defining the name of the route-map.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>additional_paths_send</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables the send capability of additional paths for all of the neighbors under this address family for which the capability has not been disabled.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertise_l2vpn_evpn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise evpn routes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ <li>vpnv4</li>
+ <li>vpnv6</li>
+ <li>l2vpn</li>
+ </ul>
+ </td>
+ <td>
+ <div>Address Family Identifier.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>asn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP autonomous system number. Valid values are String, Integer in ASPLAIN or ASDOT notation.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>client_to_client</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure client-to-client route reflection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dampen_igp_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify dampen value for IGP metric-related changes, in seconds. Valid values are integer and keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dampening_half_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify decay half-life in minutes for route-flap dampening. Valid values are integer and keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dampening_max_suppress_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify max suppress time for route-flap dampening stable route. Valid values are integer and keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dampening_reuse_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify route reuse time for route-flap dampening. Valid values are integer and keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dampening_routemap</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify route-map for route-flap dampening. Valid values are a string defining the name of the route-map.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dampening_state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable route-flap dampening.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dampening_suppress_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify route suppress time for route-flap dampening. Valid values are integer and keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Default information originate.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets default metrics for routes redistributed into BGP. Valid values are Integer or keyword &#x27;default&#x27;</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance_ebgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the administrative distance for eBGP routes. Valid values are Integer or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance_ibgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the administrative distance for iBGP routes. Valid values are Integer or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance_local</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the administrative distance for local BGP routes. Valid values are Integer or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inject_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=list</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>An array of route-map names which will specify prefixes to inject. Each array entry must first specify the inject-map name, secondly an exist-map name, and optionally the copy-attributes keyword which indicates that attributes should be copied from the aggregate. For example [[&#x27;lax_inject_map&#x27;, &#x27;lax_exist_map&#x27;], [&#x27;nyc_inject_map&#x27;, &#x27;nyc_exist_map&#x27;, &#x27;copy-attributes&#x27;], [&#x27;fsd_inject_map&#x27;, &#x27;fsd_exist_map&#x27;]].</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum_paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the maximum number of equal-cost paths for load sharing. Valid value is an integer in the range 1-64.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum_paths_ibgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the maximum number of ibgp equal-cost paths for load sharing. Valid value is an integer in the range 1-64.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>networks</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=list</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Networks to configure. Valid value is a list of network prefixes to advertise. The list must be in the form of an array. Each entry in the array must include a prefix address and an optional route-map. For example [[&#x27;10.0.0.0/16&#x27;, &#x27;routemap_LA&#x27;], [&#x27;192.168.1.1&#x27;, &#x27;Chicago&#x27;], [&#x27;192.168.2.0/24&#x27;], [&#x27;192.168.3.0/24&#x27;, &#x27;routemap_NYC&#x27;]].</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hop_route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure a route-map for valid nexthops. Valid values are a string defining the name of the route-map.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redistribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=list</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of redistribute directives. Multiple redistribute entries are allowed. The list must be in the form of a nested array. the first entry of each array defines the source-protocol to redistribute from; the second entry defines a route-map name. A route-map is highly advised but may be optional on some platforms, in which case it may be omitted from the array list. For example [[&#x27;direct&#x27;, &#x27;rm_direct&#x27;], [&#x27;lisp&#x27;, &#x27;rm_lisp&#x27;]].</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retain_route_target</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ <div style="font-style: italic; font-size: small; color: darkgreen">added in 1.1.0</div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Retains all of the routes or the routes which are part of configured route-map. Valid values are route-map names or keyword <code>all</code> or keyword <code>default</code>. <code>all</code> retains all the routes regardless of Target-VPN community. <code>default</code> will disable the retain route target option. If you are using route-map name please ensure that the name is not same as <code>all</code> and <code>default</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>safi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>unicast</li>
+ <li>multicast</li>
+ <li>evpn</li>
+ </ul>
+ </td>
+ <td>
+ <div>Sub Address Family Identifier.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines whether the config should be present or not on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_inactive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertises only active routes to peers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>table_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply table-map to filter routes downloaded into URIB. Valid values are a string.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>table_map_filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Filters routes rejected by the route-map and does not download them to the RIB.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"default"</div>
+ </td>
+ <td>
+ <div>Name of the VRF. The name &#x27;default&#x27; is a valid VRF representing the global bgp.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - ``state=absent`` removes the whole BGP ASN configuration
+ - Default, where supported, restores params default value.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # configure a simple address-family
+ - cisco.nxos.nxos_bgp_af:
+ asn: 65535
+ vrf: TESTING
+ afi: ipv4
+ safi: unicast
+ advertise_l2vpn_evpn: true
+ state: present
+ retain_route_target: all
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router bgp 65535&#x27;, &#x27;vrf TESTING&#x27;, &#x27;address-family ipv4 unicast&#x27;, &#x27;advertise l2vpn evpn&#x27;, &#x27;retain route-target all&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_global_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_global_module.rst
new file mode 100644
index 00000000..de51f7ac
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_global_module.rst
@@ -0,0 +1,5376 @@
+.. _cisco.nxos.nxos_bgp_global_module:
+
+
+**************************
+cisco.nxos.nxos_bgp_global
+**************************
+
+**BGP Global resource module.**
+
+
+Version added: 1.4.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages global BGP configuration on devices running Cisco NX-OS.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="6">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of BGP process configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>affinity_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure an affinity group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Affinity Group ID.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>as_number</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Autonomous System Number of the router.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Define the default bestpath selection algorithm.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always_compare_med</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Compare MED on paths from different AS.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>as_path</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>AS-Path.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Ignore AS-Path during bestpath selection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multipath_relax</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Relax AS-Path restriction when choosing multipaths.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>compare_neighborid</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>When more paths are available than max path config, use neighborid as tie-breaker.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>compare_routerid</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Compare router-id for identical EBGP paths.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost_community_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Ignore cost communities in bestpath selection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>igp_metric_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Ignore IGP metric for next-hop during bestpath selection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>med</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MED</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>confed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Compare MED only from paths originated from within a confederation.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>missing_as_worst</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Treat missing MED as highest MED.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>non_deterministic</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Not always pick the best-MED path among paths from same AS.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cluster_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure Route Reflector Cluster-ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>confederation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>AS confederation parameters.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>identifier</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set routing domain confederation AS.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Peer ASs in BGP confederation.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable_policy_batching</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Disable batching evaluation of outbound policy for a peer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv4 address-family settings.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of prefix-list to apply.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 address-family settings.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of prefix-list to apply.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nexthop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Batching based on nexthop.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set policy batching.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dynamic_med_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the interval for dampening of med changes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enforce_first_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enforce neighbor AS is the first AS in AS-PATH attribute (EBGP).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enhanced_error</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable BGP Enhanced error handling.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fabric_soo</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Fabric site of origin.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_external_fallover</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Immediately reset the session if the link to a directly connected BGP peer goes down.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flush_routes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Flush routes in RIB upon controlled restart.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure Graceful Restart functionality.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>helper</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure Graceful Restart Helper mode functionality.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>restart_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum time for restart advertised to peers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable graceful-restart.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stalepath_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum time to keep a restarting peer&#x27;s stale routes.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Graceful-shutdown for BGP protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>activate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Send graceful-shutdown community on all routes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route-map to modify attributes for outbound.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Activiate graceful-shutdown.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aware</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Lower preference of routes carrying graceful-shutdown community.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>isolate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Isolate this router from BGP perspective.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>include_local</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Withdraw both local and remote BGP routes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Withdraw remote BGP routes to isolate this router.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_neighbor_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log a message for neighbor up/down event.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maxas_limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Allow AS-PATH attribute from EBGP neighbor imposing a limit on number of ASes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_down</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Handle BGP neighbor down event, due to various reasons.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fib_accelerate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Accelerate the hardware updates for IP/IPv6 adjacencies for neighbor.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbors</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure BGP neighbors.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bmp_activate_server</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify server ID for activating BMP monitoring for the peer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Capability.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_4_byte_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress 4-byte AS Capability.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor specific descripion.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable_connected_check</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable check for directly connected peer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dont_capability_negotiate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Don&#x27;t negotiate capability with this neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dscp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set dscp value for tcp transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dynamic_capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Dynamic Capability</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ebgp_multihop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify multihop TTL for remote peer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Graceful-shutdown for this neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>activate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Send graceful-shutdown community.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route-map to modify attributes for outbound.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set activate.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inherit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Inherit a template.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Peer template to inherit.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_session</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Peer-session template to inherit.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the local-as number for the eBGP neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_neighbor_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log message for neighbor up/down event.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable logging of neighbor up/down event.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set log-neighbor-changes.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>low_memory</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Behaviour in low memory situations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>exempt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not shutdown this peer when under memory pressure.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP address/Prefix of the neighbor or interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_affinity_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure an affinity group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Affinity Group ID.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure a password for neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encryption</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>0 specifies an UNENCRYPTED neighbor password.</div>
+ <div>3 specifies an 3DES ENCRYPTED neighbor password will follow.</div>
+ <div>7 specifies a Cisco type 7 ENCRYPTED neighbor password will follow.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication password.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>path_attribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP path attribute optional filtering.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>action</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>discard</li>
+ <li>treat-as-withdraw</li>
+ </ul>
+ </td>
+ <td>
+ <div>Action.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Path attribute range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Path attribute range end value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Path attribute range start value.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Path attribute type</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>fabric-border-leaf</li>
+ <li>fabric-external</li>
+ </ul>
+ </td>
+ <td>
+ <div>Neighbor facing</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remote_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Autonomous System Number of the neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remove_private_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Remove private AS number from outbound updates.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>replace_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Replace.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Remove private AS.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administratively shutdown this neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure keepalive and hold timers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Holdtime (seconds).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keepalive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Keepalive interval (seconds).</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP transport connection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>connection_mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify type of connection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Allow passive connection setup only.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl_security</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable TTL Security Mechanism.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hops</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify hop count for remote peer.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify source of BGP session and updates.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nexthop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Nexthop resolution options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_default_resolution</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Prohibit use of default route for nexthop address resolution.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Secondary Route Distinguisher for vxlan multisite border gateway.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dual</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Generate Secondary RD for all VRFs and L2VNIs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify 2 byte value for ID.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reconnect_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure connection reconnect interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the IP address to use as router-id.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administratively shutdown BGP protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_fib_pending</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise only routes that are programmed in hardware to peers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure bgp related timers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath_limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure timeout for first bestpath after restart.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure update-delay-always option.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Bestpath timeout (seconds).</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure different bgp keepalive and holdtimes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Holdtime (seconds).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keepalive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Keepalive interval (seconds).</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_peer_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Prefix Peer timeout (seconds).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_peer_wait</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure wait timer for a prefix peer.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrfs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Virtual Router Context configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>allocate_index</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure allocate-index.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Define the default bestpath selection algorithm.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always_compare_med</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Compare MED on paths from different AS.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>as_path</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>AS-Path.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Ignore AS-Path during bestpath selection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multipath_relax</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Relax AS-Path restriction when choosing multipaths.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>compare_neighborid</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>When more paths are available than max path config, use neighborid as tie-breaker.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>compare_routerid</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Compare router-id for identical EBGP paths.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost_community_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Ignore cost communities in bestpath selection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>igp_metric_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Ignore IGP metric for next-hop during bestpath selection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>med</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MED</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>confed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Compare MED only from paths originated from within a confederation.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>missing_as_worst</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Treat missing MED as highest MED.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>non_deterministic</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Not always pick the best-MED path among paths from same AS.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cluster_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure Route Reflector Cluster-ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>confederation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>AS confederation parameters.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>identifier</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set routing domain confederation AS.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Peer ASs in BGP confederation.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure Graceful Restart functionality.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>helper</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure Graceful Restart Helper mode functionality.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>restart_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum time for restart advertised to peers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable graceful-restart.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stalepath_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum time to keep a restarting peer&#x27;s stale routes.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the local-as for this vrf.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_neighbor_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log a message for neighbor up/down event.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maxas_limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Allow AS-PATH attribute from EBGP neighbor imposing a limit on number of ASes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_down</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Handle BGP neighbor down event, due to various reasons.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fib_accelerate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Accelerate the hardware updates for IP/IPv6 adjacencies for neighbor.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbors</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure BGP neighbors.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bmp_activate_server</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify server ID for activating BMP monitoring for the peer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Capability.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_4_byte_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress 4-byte AS Capability.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor specific descripion.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable_connected_check</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable check for directly connected peer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dont_capability_negotiate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Don&#x27;t negotiate capability with this neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dscp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set dscp value for tcp transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dynamic_capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Dynamic Capability</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ebgp_multihop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify multihop TTL for remote peer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Graceful-shutdown for this neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>activate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Send graceful-shutdown community.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Apply route-map to modify attributes for outbound.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set activate.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inherit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Inherit a template.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Peer template to inherit.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_session</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Peer-session template to inherit.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the local-as number for the eBGP neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_neighbor_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log message for neighbor up/down event.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable logging of neighbor up/down event.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set log-neighbor-changes.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>low_memory</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Behaviour in low memory situations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>exempt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not shutdown this peer when under memory pressure.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP address/Prefix of the neighbor or interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_affinity_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure an affinity group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Affinity Group ID.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure a password for neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encryption</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>0 specifies an UNENCRYPTED neighbor password.</div>
+ <div>3 specifies an 3DES ENCRYPTED neighbor password will follow.</div>
+ <div>7 specifies a Cisco type 7 ENCRYPTED neighbor password will follow.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication password.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>path_attribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP path attribute optional filtering.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>action</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>discard</li>
+ <li>treat-as-withdraw</li>
+ </ul>
+ </td>
+ <td>
+ <div>Action.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Path attribute range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>end</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Path attribute range end value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Path attribute range start value.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Path attribute type</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>fabric-border-leaf</li>
+ <li>fabric-external</li>
+ </ul>
+ </td>
+ <td>
+ <div>Neighbor facing</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remote_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Autonomous System Number of the neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remove_private_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Remove private AS number from outbound updates.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>all</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>All.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>replace_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Replace.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Remove private AS.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administratively shutdown this neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure keepalive and hold timers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Holdtime (seconds).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keepalive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Keepalive interval (seconds).</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP transport connection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>connection_mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify type of connection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Allow passive connection setup only.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ttl_security</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable TTL Security Mechanism.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hops</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify hop count for remote peer.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify source of BGP session and updates.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reconnect_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure connection reconnect interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the IP address to use as router-id.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure bgp related timers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath_limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure timeout for first bestpath after restart.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure update-delay-always option.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Bestpath timeout (seconds).</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure different bgp keepalive and holdtimes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Holdtime (seconds).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>keepalive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Keepalive interval (seconds).</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_peer_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Prefix Peer timeout (seconds).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_peer_wait</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure wait timer for a prefix peer.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VRF name.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section &#x27;^router bgp&#x27;</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>deleted</li>
+ <li>purged</li>
+ <li>parsed</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in.</div>
+ <div>State <em>purged</em> removes all the BGP configurations from the target device. Use caution with this state.</div>
+ <div>State <em>deleted</em> only removes BGP attributes that this modules manages and does not negate the BGP process completely. Thereby, preserving address-family related configurations under BGP context.</div>
+ <div>Running states <em>deleted</em> and <em>replaced</em> will result in an error if there are address-family configuration lines present under a neighbor, or a vrf context that is to be removed. Please use the <span class='module'>cisco.nxos.nxos_bgp_af</span> or <span class='module'>cisco.nxos.nxos_bgp_neighbor_af</span> modules for prior cleanup.</div>
+ <div>Refer to examples for more details.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NX-OS 9.3.6.
+ - This module works with connection ``network_cli`` and ``httpapi``.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ # Nexus9000v# show running-config | section "^router bgp"
+ # Nexus9000v#
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65563
+ router_id: 192.168.1.1
+ bestpath:
+ as_path:
+ multipath_relax: True
+ compare_neighborid: True
+ cost_community_ignore: True
+ confederation:
+ identifier: 42
+ peers:
+ - 65020
+ - 65030
+ - 65040
+ log_neighbor_changes: True
+ maxas_limit: 20
+ neighbors:
+ - neighbor_address: 192.168.1.100
+ neighbor_affinity_group:
+ group_id: 160
+ bmp_activate_server: 1
+ remote_as: 65563
+ description: NBR-1
+ low_memory:
+ exempt: True
+ - neighbor_address: 192.168.1.101
+ remote_as: 65563
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ neighbor_down:
+ fib_accelerate: True
+ vrfs:
+ - vrf: site-1
+ allocate_index: 5000
+ local_as: 200
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 198.51.100.1
+ description: site-1-nbr-1
+ password:
+ encryption: 3
+ key: 13D4D3549493D2877B1DC116EE27A6BE
+ remote_as: 65562
+ - neighbor_address: 198.51.100.2
+ remote_as: 65562
+ description: site-1-nbr-2
+ - vrf: site-2
+ local_as: 300
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 203.0.113.2
+ description: site-2-nbr-1
+ password:
+ encryption: 3
+ key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+ remote_as: 65568
+ neighbor_down:
+ fib_accelerate: True
+
+ # Task output
+ # -------------
+ # before: {}
+ #
+ # commands:
+ # - router bgp 65563
+ # - bestpath as-path multipath-relax
+ # - bestpath compare-neighborid
+ # - bestpath cost-community ignore
+ # - confederation identifier 42
+ # - log-neighbor-changes
+ # - maxas-limit 20
+ # - neighbor-down fib-accelerate
+ # - router-id 192.168.1.1
+ # - confederation peers 65020 65030 65040
+ # - neighbor 192.168.1.100
+ # - remote-as 65563
+ # - affinity-group 160
+ # - bmp-activate-server 1
+ # - description NBR-1
+ # - low-memory exempt
+ # - neighbor 192.168.1.101
+ # - remote-as 65563
+ # - password 7 12090404011C03162E
+ # - vrf site-1
+ # - allocate-index 5000
+ # - local-as 200
+ # - log-neighbor-changes
+ # - neighbor 198.51.100.1
+ # - remote-as 65562
+ # - description site-1-nbr-1
+ # - password 3 13D4D3549493D2877B1DC116EE27A6BE
+ # - neighbor 198.51.100.2
+ # - remote-as 65562
+ # - description site-1-nbr-2
+ # - vrf site-2
+ # - local-as 300
+ # - log-neighbor-changes
+ # - neighbor-down fib-accelerate
+ # - neighbor 203.0.113.2
+ # - remote-as 65568
+ # - description site-2-nbr-1
+ # - password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+ #
+ # after:
+ # as_number: '65563'
+ # bestpath:
+ # as_path:
+ # multipath_relax: true
+ # compare_neighborid: true
+ # cost_community_ignore: true
+ # confederation:
+ # identifier: '42'
+ # peers:
+ # - '65020'
+ # - '65030'
+ # - '65040'
+ # log_neighbor_changes: true
+ # maxas_limit: 20
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - bmp_activate_server: 1
+ # description: NBR-1
+ # low_memory:
+ # exempt: true
+ # neighbor_address: 192.168.1.100
+ # neighbor_affinity_group:
+ # group_id: 160
+ # remote_as: '65563'
+ # - neighbor_address: 192.168.1.101
+ # password:
+ # encryption: 7
+ # key: 12090404011C03162E
+ # remote_as: '65563'
+ # router_id: 192.168.1.1
+ # vrfs:
+ # - allocate_index: 5000
+ # local_as: '200'
+ # log_neighbor_changes: true
+ # neighbors:
+ # - description: site-1-nbr-1
+ # neighbor_address: 198.51.100.1
+ # password:
+ # encryption: 3
+ # key: 13D4D3549493D2877B1DC116EE27A6BE
+ # remote_as: '65562'
+ # - description: site-1-nbr-2
+ # neighbor_address: 198.51.100.2
+ # remote_as: '65562'
+ # vrf: site-1
+ # - local_as: '300'
+ # log_neighbor_changes: true
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - description: site-2-nbr-1
+ # neighbor_address: 203.0.113.2
+ # password:
+ # encryption: 3
+ # key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+ # remote_as: '65568'
+ # vrf: site-2
+
+
+ # After state:
+ # -------------
+ # Nexus9000v# show running-config | section "^router bgp"
+ # router bgp 65563
+ # router-id 192.168.1.1
+ # confederation identifier 42
+ # confederation peers 65020 65030 65040
+ # bestpath as-path multipath-relax
+ # bestpath cost-community ignore
+ # bestpath compare-neighborid
+ # neighbor-down fib-accelerate
+ # maxas-limit 20
+ # log-neighbor-changes
+ # neighbor 192.168.1.100
+ # low-memory exempt
+ # bmp-activate-server 1
+ # remote-as 65563
+ # description NBR-1
+ # affinity-group 160
+ # neighbor 192.168.1.101
+ # remote-as 65563
+ # password 7 12090404011C03162E
+ # vrf site-1
+ # local-as 200
+ # log-neighbor-changes
+ # allocate-index 5000
+ # neighbor 198.51.100.1
+ # remote-as 65562
+ # description site-1-nbr-1
+ # password 3 13D4D3549493D2877B1DC116EE27A6BE
+ # neighbor 198.51.100.2
+ # remote-as 65562
+ # description site-1-nbr-2
+ # vrf site-2
+ # local-as 300
+ # neighbor-down fib-accelerate
+ # log-neighbor-changes
+ # neighbor 203.0.113.2
+ # remote-as 65568
+ # description site-2-nbr-1
+ # password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ # Nexus9000v# show running-config | section "^router bgp"
+ # router bgp 65563
+ # router-id 192.168.1.1
+ # confederation identifier 42
+ # confederation peers 65020 65030 65040
+ # bestpath as-path multipath-relax
+ # bestpath cost-community ignore
+ # bestpath compare-neighborid
+ # neighbor-down fib-accelerate
+ # maxas-limit 20
+ # log-neighbor-changes
+ # neighbor 192.168.1.100
+ # low-memory exempt
+ # bmp-activate-server 1
+ # remote-as 65563
+ # description NBR-1
+ # affinity-group 160
+ # neighbor 192.168.1.101
+ # remote-as 65563
+ # password 7 12090404011C03162E
+ # vrf site-1
+ # local-as 200
+ # log-neighbor-changes
+ # allocate-index 5000
+ # neighbor 198.51.100.1
+ # remote-as 65562
+ # description site-1-nbr-1
+ # password 3 13D4D3549493D2877B1DC116EE27A6BE
+ # neighbor 198.51.100.2
+ # remote-as 65562
+ # description site-1-nbr-2
+ # vrf site-2
+ # local-as 300
+ # neighbor-down fib-accelerate
+ # log-neighbor-changes
+ # neighbor 203.0.113.2
+ # remote-as 65568
+ # description site-2-nbr-1
+ # password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+ - name: Replace BGP configuration with provided configuration
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65563
+ router_id: 192.168.1.1
+ bestpath:
+ compare_neighborid: True
+ cost_community_ignore: True
+ confederation:
+ identifier: 42
+ peers:
+ - 65020
+ - 65030
+ - 65050
+ maxas_limit: 40
+ neighbors:
+ - neighbor_address: 192.168.1.100
+ neighbor_affinity_group:
+ group_id: 160
+ bmp_activate_server: 1
+ remote_as: 65563
+ description: NBR-1
+ low_memory:
+ exempt: True
+ neighbor_down:
+ fib_accelerate: True
+ vrfs:
+ - vrf: site-2
+ local_as: 300
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 203.0.113.2
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ neighbor_down:
+ fib_accelerate: True
+ state: replaced
+
+ # Task output
+ # -------------
+ # before:
+ # as_number: '65563'
+ # bestpath:
+ # as_path:
+ # multipath_relax: true
+ # compare_neighborid: true
+ # cost_community_ignore: true
+ # confederation:
+ # identifier: '42'
+ # peers:
+ # - '65020'
+ # - '65030'
+ # - '65040'
+ # log_neighbor_changes: true
+ # maxas_limit: 20
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - bmp_activate_server: 1
+ # description: NBR-1
+ # low_memory:
+ # exempt: true
+ # neighbor_address: 192.168.1.100
+ # neighbor_affinity_group:
+ # group_id: 160
+ # remote_as: '65563'
+ # - neighbor_address: 192.168.1.101
+ # password:
+ # encryption: 7
+ # key: 12090404011C03162E
+ # remote_as: '65563'
+ # router_id: 192.168.1.1
+ # vrfs:
+ # - allocate_index: 5000
+ # local_as: '200'
+ # log_neighbor_changes: true
+ # neighbors:
+ # - description: site-1-nbr-1
+ # neighbor_address: 198.51.100.1
+ # password:
+ # encryption: 3
+ # key: 13D4D3549493D2877B1DC116EE27A6BE
+ # remote_as: '65562'
+ # - description: site-1-nbr-2
+ # neighbor_address: 198.51.100.2
+ # remote_as: '65562'
+ # vrf: site-1
+ # - local_as: '300'
+ # log_neighbor_changes: true
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - description: site-2-nbr-1
+ # neighbor_address: 203.0.113.2
+ # password:
+ # encryption: 3
+ # key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+ # remote_as: '65568'
+ # vrf: site-2
+ #
+ # commands:
+ # - router bgp 65563
+ # - no bestpath as-path multipath-relax
+ # - no log-neighbor-changes
+ # - maxas-limit 40
+ # - no confederation peers 65020 65030 65040
+ # - confederation peers 65020 65030 65050
+ # - no neighbor 192.168.1.101
+ # - vrf site-2
+ # - neighbor 203.0.113.2
+ # - no remote-as 65568
+ # - no description site-2-nbr-1
+ # - password 7 12090404011C03162E
+ # - no vrf site-1
+
+ # after:
+ # as_number: '65563'
+ # bestpath:
+ # compare_neighborid: true
+ # cost_community_ignore: true
+ # confederation:
+ # identifier: '42'
+ # peers:
+ # - '65020'
+ # - '65030'
+ # - '65050'
+ # maxas_limit: 40
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - bmp_activate_server: 1
+ # description: NBR-1
+ # low_memory:
+ # exempt: true
+ # neighbor_address: 192.168.1.100
+ # neighbor_affinity_group:
+ # group_id: 160
+ # remote_as: '65563'
+ # router_id: 192.168.1.1
+ # vrfs:
+ # - local_as: '300'
+ # log_neighbor_changes: true
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - neighbor_address: 203.0.113.2
+ # password:
+ # encryption: 7
+ # key: 12090404011C03162E
+ # vrf: site-2
+ #
+ # After state:
+ # -------------
+ # Nexus9000v# show running-config | section "^router bgp"
+ # router bgp 65563
+ # router-id 192.168.1.1
+ # confederation identifier 42
+ # confederation peers 65020 65030 65050
+ # bestpath cost-community ignore
+ # bestpath compare-neighborid
+ # neighbor-down fib-accelerate
+ # maxas-limit 40
+ # neighbor 192.168.1.100
+ # low-memory exempt
+ # bmp-activate-server 1
+ # remote-as 65563
+ # description NBR-1
+ # affinity-group 160
+ # vrf site-2
+ # local-as 300
+ # neighbor-down fib-accelerate
+ # log-neighbor-changes
+ # neighbor 203.0.113.2
+ # password 7 12090404011C03162E
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ # Nexus9000v# show running-config | section "^router bgp"
+ # router bgp 65563
+ # router-id 192.168.1.1
+ # confederation identifier 42
+ # confederation peers 65020 65030 65040
+ # bestpath as-path multipath-relax
+ # bestpath cost-community ignore
+ # bestpath compare-neighborid
+ # neighbor-down fib-accelerate
+ # maxas-limit 20
+ # log-neighbor-changes
+ # address-family ipv4 unicast
+ # default-metric 400
+ # suppress-inactive
+ # default-information originate
+ # address-family ipv6 multicast
+ # wait-igp-convergence
+ # redistribute eigrp eigrp-1 route-map site-1-rmap
+ # neighbor 192.168.1.100
+ # low-memory exempt
+ # bmp-activate-server 1
+ # remote-as 65563
+ # description NBR-1
+ # affinity-group 160
+ # neighbor 192.168.1.101
+ # remote-as 65563
+ # password 7 12090404011C03162E
+ # vrf site-1
+ # local-as 200
+ # log-neighbor-changes
+ # allocate-index 5000
+ # address-family ipv4 multicast
+ # maximum-paths 40
+ # dampen-igp-metric 1200
+ # neighbor 198.51.100.1
+ # remote-as 65562
+ # description site-1-nbr-1
+ # password 3 13D4D3549493D2877B1DC116EE27A6BE
+ # neighbor 198.51.100.2
+ # remote-as 65562
+ # description site-1-nbr-2
+ # vrf site-2
+ # local-as 300
+ # neighbor-down fib-accelerate
+ # log-neighbor-changes
+ # neighbor 203.0.113.2
+ # remote-as 65568
+ # description site-1-nbr-1
+ # password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+ - name: Delete BGP configurations handled by this module
+ cisco.nxos.nxos_bgp_global:
+ state: deleted
+
+ # Task output
+ # -------------
+
+ # before:
+ # as_number: '65563'
+ # bestpath:
+ # as_path:
+ # multipath_relax: true
+ # compare_neighborid: true
+ # cost_community_ignore: true
+ # confederation:
+ # identifier: '42'
+ # peers:
+ # - '65020'
+ # - '65030'
+ # - '65040'
+ # log_neighbor_changes: true
+ # maxas_limit: 20
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - bmp_activate_server: 1
+ # description: NBR-1
+ # low_memory:
+ # exempt: true
+ # neighbor_address: 192.168.1.100
+ # neighbor_affinity_group:
+ # group_id: 160
+ # remote_as: '65563'
+ # - neighbor_address: 192.168.1.101
+ # password:
+ # encryption: 7
+ # key: 12090404011C03162E
+ # remote_as: '65563'
+ # router_id: 192.168.1.1
+ # vrfs:
+ # - allocate_index: 5000
+ # local_as: '200'
+ # log_neighbor_changes: true
+ # neighbors:
+ # - description: site-1-nbr-1
+ # neighbor_address: 198.51.100.1
+ # password:
+ # encryption: 3
+ # key: 13D4D3549493D2877B1DC116EE27A6BE
+ # remote_as: '65562'
+ # - description: site-1-nbr-2
+ # neighbor_address: 198.51.100.2
+ # remote_as: '65562'
+ # vrf: site-1
+ # - local_as: '300'
+ # log_neighbor_changes: true
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - description: site-1-nbr-1
+ # neighbor_address: 203.0.113.2
+ # password:
+ # encryption: 3
+ # key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+ # remote_as: '65568'
+ # vrf: site-2
+ #
+ # commands:
+ # - router bgp 65563
+ # - no bestpath as-path multipath-relax
+ # - no bestpath compare-neighborid
+ # - no bestpath cost-community ignore
+ # - no confederation identifier 42
+ # - no log-neighbor-changes
+ # - no maxas-limit 20
+ # - no neighbor-down fib-accelerate
+ # - no router-id 192.168.1.1
+ # - no confederation peers 65020 65030 65040
+ # - no neighbor 192.168.1.100
+ # - no neighbor 192.168.1.101
+ # - no vrf site-1
+ # - no vrf site-2
+ #
+ # after:
+ # as_number: '65563'
+ #
+ # After state:
+ # -------------
+ # Nexus9000v# show running-config | section "^router bgp"
+ # router bgp 65563
+ # address-family ipv4 unicast
+ # default-metric 400
+ # suppress-inactive
+ # default-information originate
+ # address-family ipv6 multicast
+ # wait-igp-convergence
+ # redistribute eigrp eigrp-1 route-map site-1-rmap
+ #
+
+ # Using purged
+
+ # Before state:
+ # -------------
+ # Nexus9000v# show running-config | section "^router bgp"
+ # router bgp 65563
+ # router-id 192.168.1.1
+ # confederation identifier 42
+ # confederation peers 65020 65030 65040
+ # bestpath as-path multipath-relax
+ # bestpath cost-community ignore
+ # bestpath compare-neighborid
+ # neighbor-down fib-accelerate
+ # maxas-limit 20
+ # log-neighbor-changes
+ # address-family ipv4 unicast
+ # default-metric 400
+ # suppress-inactive
+ # default-information originate
+ # address-family ipv6 multicast
+ # wait-igp-convergence
+ # redistribute eigrp eigrp-1 route-map site-1-rmap
+ # neighbor 192.168.1.100
+ # low-memory exempt
+ # bmp-activate-server 1
+ # remote-as 65563
+ # description NBR-1
+ # affinity-group 160
+ # neighbor 192.168.1.101
+ # remote-as 65563
+ # password 7 12090404011C03162E
+ # vrf site-1
+ # local-as 200
+ # log-neighbor-changes
+ # allocate-index 5000
+ # address-family ipv4 multicast
+ # maximum-paths 40
+ # dampen-igp-metric 1200
+ # neighbor 198.51.100.1
+ # remote-as 65562
+ # description site-1-nbr-1
+ # password 3 13D4D3549493D2877B1DC116EE27A6BE
+ # neighbor 198.51.100.2
+ # remote-as 65562
+ # description site-1-nbr-2
+ # vrf site-2
+ # local-as 300
+ # neighbor-down fib-accelerate
+ # log-neighbor-changes
+ # neighbor 203.0.113.2
+ # remote-as 65568
+ # description site-1-nbr-1
+ # password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+ - name: Purge all BGP configurations from the device
+ cisco.nxos.nxos_bgp_global:
+ state: purged
+
+ # Task output
+ # -------------
+
+ # before:
+ # as_number: '65563'
+ # bestpath:
+ # as_path:
+ # multipath_relax: true
+ # compare_neighborid: true
+ # cost_community_ignore: true
+ # confederation:
+ # identifier: '42'
+ # peers:
+ # - '65020'
+ # - '65030'
+ # - '65040'
+ # log_neighbor_changes: true
+ # maxas_limit: 20
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - bmp_activate_server: 1
+ # description: NBR-1
+ # low_memory:
+ # exempt: true
+ # neighbor_address: 192.168.1.100
+ # neighbor_affinity_group:
+ # group_id: 160
+ # remote_as: '65563'
+ # - neighbor_address: 192.168.1.101
+ # password:
+ # encryption: 7
+ # key: 12090404011C03162E
+ # remote_as: '65563'
+ # router_id: 192.168.1.1
+ # vrfs:
+ # - allocate_index: 5000
+ # local_as: '200'
+ # log_neighbor_changes: true
+ # neighbors:
+ # - description: site-1-nbr-1
+ # neighbor_address: 198.51.100.1
+ # password:
+ # encryption: 3
+ # key: 13D4D3549493D2877B1DC116EE27A6BE
+ # remote_as: '65562'
+ # - description: site-1-nbr-2
+ # neighbor_address: 198.51.100.2
+ # remote_as: '65562'
+ # vrf: site-1
+ # - local_as: '300'
+ # log_neighbor_changes: true
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - description: site-1-nbr-1
+ # neighbor_address: 203.0.113.2
+ # password:
+ # encryption: 3
+ # key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+ # remote_as: '65568'
+ # vrf: site-2
+ #
+ # commands:
+ # - no router bgp 65563
+ #
+ # after: {}
+ #
+ # After state:
+ # -------------
+ # Nexus9000v# show running-config | section "^router bgp"
+ # Nexus9000v#
+
+ # Using rendered
+
+ - name: Render platform specific configuration lines (without connecting to the device)
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65563
+ router_id: 192.168.1.1
+ bestpath:
+ as_path:
+ multipath_relax: True
+ compare_neighborid: True
+ cost_community_ignore: True
+ confederation:
+ identifier: 42
+ peers:
+ - 65020
+ - 65030
+ - 65040
+ log_neighbor_changes: True
+ maxas_limit: 20
+ neighbors:
+ - neighbor_address: 192.168.1.100
+ neighbor_affinity_group:
+ group_id: 160
+ bmp_activate_server: 1
+ remote_as: 65563
+ description: NBR-1
+ low_memory:
+ exempt: True
+ - neighbor_address: 192.168.1.101
+ remote_as: 65563
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ neighbor_down:
+ fib_accelerate: True
+ vrfs:
+ - vrf: site-1
+ allocate_index: 5000
+ local_as: 200
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 198.51.100.1
+ description: site-1-nbr-1
+ password:
+ encryption: 3
+ key: 13D4D3549493D2877B1DC116EE27A6BE
+ remote_as: 65562
+ - neighbor_address: 198.51.100.2
+ remote_as: 65562
+ description: site-1-nbr-2
+ - vrf: site-2
+ local_as: 300
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 203.0.113.2
+ description: site-1-nbr-1
+ password:
+ encryption: 3
+ key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+ remote_as: 65568
+ neighbor_down:
+ fib_accelerate: True
+
+ # Task Output (redacted)
+ # -----------------------
+ # rendered:
+ # - router bgp 65563
+ # - bestpath as-path multipath-relax
+ # - bestpath compare-neighborid
+ # - bestpath cost-community ignore
+ # - confederation identifier 42
+ # - log-neighbor-changes
+ # - maxas-limit 20
+ # - neighbor-down fib-accelerate
+ # - router-id 192.168.1.1
+ # - confederation peers 65020 65030 65040
+ # - neighbor 192.168.1.100
+ # - remote-as 65563
+ # - affinity-group 160
+ # - bmp-activate-server 1
+ # - description NBR-1
+ # - low-memory exempt
+ # - neighbor 192.168.1.101
+ # - remote-as 65563
+ # - password 7 12090404011C03162E
+ # - vrf site-1
+ # - allocate-index 5000
+ # - local-as 200
+ # - log-neighbor-changes
+ # - neighbor 198.51.100.1
+ # - remote-as 65562
+ # - description site-1-nbr-1
+ # - password 3 13D4D3549493D2877B1DC116EE27A6BE
+ # - neighbor 198.51.100.2
+ # - remote-as 65562
+ # - description site-1-nbr-2
+ # - vrf site-2
+ # - local-as 300
+ # - log-neighbor-changes
+ # - neighbor-down fib-accelerate
+ # - neighbor 203.0.113.2
+ # - remote-as 65568
+ # - description site-1-nbr-1
+ # - password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # router bgp 65563
+ # router-id 192.168.1.1
+ # confederation identifier 42
+ # confederation peers 65020 65030 65040
+ # bestpath as-path multipath-relax
+ # bestpath cost-community ignore
+ # bestpath compare-neighborid
+ # neighbor-down fib-accelerate
+ # maxas-limit 20
+ # log-neighbor-changes
+ # neighbor 192.168.1.100
+ # low-memory exempt
+ # bmp-activate-server 1
+ # remote-as 65563
+ # description NBR-1
+ # affinity-group 160
+ # neighbor 192.168.1.101
+ # remote-as 65563
+ # password 7 12090404011C03162E
+ # vrf site-1
+ # local-as 200
+ # log-neighbor-changes
+ # allocate-index 5000
+ # neighbor 198.51.100.1
+ # remote-as 65562
+ # description site-1-nbr-1
+ # password 3 13D4D3549493D2877B1DC116EE27A6BE
+ # neighbor 198.51.100.2
+ # remote-as 65562
+ # description site-1-nbr-2
+ # vrf site-2
+ # local-as 300
+ # neighbor-down fib-accelerate
+ # log-neighbor-changes
+ # neighbor 203.0.113.2
+ # remote-as 65568
+ # description site-1-nbr-1
+ # password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+ - name: Parse externally provided BGP config
+ cisco.nxos.nxos_bgp_global:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+ # parsed:
+ # as_number: '65563'
+ # bestpath:
+ # as_path:
+ # multipath_relax: true
+ # compare_neighborid: true
+ # cost_community_ignore: true
+ # confederation:
+ # identifier: '42'
+ # peers:
+ # - '65020'
+ # - '65030'
+ # - '65040'
+ # log_neighbor_changes: true
+ # maxas_limit: 20
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - bmp_activate_server: 1
+ # description: NBR-1
+ # low_memory:
+ # exempt: true
+ # neighbor_address: 192.168.1.100
+ # neighbor_affinity_group:
+ # group_id: 160
+ # remote_as: '65563'
+ # - neighbor_address: 192.168.1.101
+ # password:
+ # encryption: 7
+ # key: 12090404011C03162E
+ # remote_as: '65563'
+ # router_id: 192.168.1.1
+ # vrfs:
+ # - allocate_index: 5000
+ # local_as: '200'
+ # log_neighbor_changes: true
+ # neighbors:
+ # - description: site-1-nbr-1
+ # neighbor_address: 198.51.100.1
+ # password:
+ # encryption: 3
+ # key: 13D4D3549493D2877B1DC116EE27A6BE
+ # remote_as: '65562'
+ # - description: site-1-nbr-2
+ # neighbor_address: 198.51.100.2
+ # remote_as: '65562'
+ # vrf: site-1
+ # - local_as: '300'
+ # log_neighbor_changes: true
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - description: site-1-nbr-1
+ # neighbor_address: 203.0.113.2
+ # password:
+ # encryption: 3
+ # key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+ # remote_as: '65568'
+ # vrf: site-2
+
+ # Using gathered
+
+ # existing config
+ #
+ # Nexus9000v# show running-config | section "^router bgp"
+ # router bgp 65563
+ # router-id 192.168.1.1
+ # confederation identifier 42
+ # confederation peers 65020 65030 65050
+ # bestpath cost-community ignore
+ # bestpath compare-neighborid
+ # neighbor-down fib-accelerate
+ # maxas-limit 40
+ # neighbor 192.168.1.100
+ # low-memory exempt
+ # bmp-activate-server 1
+ # remote-as 65563
+ # description NBR-1
+ # affinity-group 160
+ # vrf site-1
+ # vrf site-2
+ # local-as 300
+ # neighbor-down fib-accelerate
+ # log-neighbor-changes
+ # neighbor 203.0.113.2
+ # password 7 12090404011C03162E
+
+ - name: Gather BGP facts using gathered
+ cisco.nxos.nxos_bgp_global:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+ # gathered:
+ # as_number: '65563'
+ # bestpath:
+ # compare_neighborid: true
+ # cost_community_ignore: true
+ # confederation:
+ # identifier: '42'
+ # peers:
+ # - '65020'
+ # - '65030'
+ # - '65050'
+ # maxas_limit: 40
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - bmp_activate_server: 1
+ # description: NBR-1
+ # low_memory:
+ # exempt: true
+ # neighbor_address: 192.168.1.100
+ # neighbor_affinity_group:
+ # group_id: 160
+ # remote_as: '65563'
+ # router_id: 192.168.1.1
+ # vrfs:
+ # - vrf: site-1
+ # - local_as: '300'
+ # log_neighbor_changes: true
+ # neighbor_down:
+ # fib_accelerate: true
+ # neighbors:
+ # - neighbor_address: 203.0.113.2
+ # password:
+ # encryption: 7
+ # key: 12090404011C03162E
+ # vrf: site-2
+
+ # Remove a neighbor having AF configurations with state replaced (will fail)
+
+ # Before state:
+ # -------------
+ # Nexus9000v# show running-config | section "^router bgp"
+ # router bgp 65536
+ # log-neighbor-changes
+ # maxas-limit 20
+ # router-id 198.51.100.2
+ # neighbor 203.0.113.2
+ # address-family ipv4 unicast
+ # next-hop-self
+ # remote-as 65538
+ # affinity-group 160
+ # description NBR-1
+ # low-memory exempt
+ # neighbor 192.0.2.1
+ # remote-as 65537
+ # password 7 12090404011C03162E
+
+ - name: Remove a neighbor having AF configurations (should fail)
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65536
+ router_id: 198.51.100.2
+ maxas_limit: 20
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 192.0.2.1
+ remote_as: 65537
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ state: replaced
+
+ # Task output (redacted)
+ # -----------------------
+ # fatal: [Nexus9000v]: FAILED! => changed=false
+ # msg: Neighbor 203.0.113.2 has address-family configurations.
+ # Please use the nxos_bgp_neighbor_af module to remove those first.
+
+ # Remove a VRF having AF configurations with state replaced (will fail)
+
+ # Before state:
+ # -------------
+ # Nexus9000v# show running-config | section "^router bgp"
+ # router bgp 65536
+ # log-neighbor-changes
+ # maxas-limit 20
+ # router-id 198.51.100.2
+ # neighbor 192.0.2.1
+ # remote-as 65537
+ # password 7 12090404011C03162E
+ # vrf site-1
+ # address-family ipv4 unicast
+ # default-information originate
+ # neighbor 203.0.113.2
+ # remote-as 65538
+ # affinity-group 160
+ # description NBR-1
+ # low-memory exempt
+ # vrf site-2
+ # neighbor-down fib-accelerate
+
+ - name: Remove a VRF having AF configurations (should fail)
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65536
+ router_id: 198.51.100.2
+ maxas_limit: 20
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 192.0.2.1
+ remote_as: 65537
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ vrfs:
+ - vrf: site-2
+ neighbor_down:
+ fib_accelerate: True
+ state: replaced
+
+ # Task output (redacted)
+ # -----------------------
+ # fatal: [Nexus9000v]: FAILED! => changed=false
+ # msg: VRF site-1 has address-family configurations.
+ # Please use the nxos_bgp_af module to remove those first.
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router bgp 65563&#x27;, &#x27;maxas-limit 20&#x27;, &#x27;router-id 192.168.1.1&#x27;, &#x27;confederation peers 65020 65030 65040&#x27;, &#x27;neighbor 192.168.1.100&#x27;, &#x27;remote-as 65563&#x27;, &#x27;affinity-group 160&#x27;, &#x27;bmp-activate-server 1&#x27;, &#x27;description NBR-1&#x27;, &#x27;low-memory exempt&#x27;, &#x27;vrf site-1&#x27;, &#x27;log-neighbor-changes&#x27;, &#x27;neighbor 198.51.100.1&#x27;, &#x27;remote-as 65562&#x27;, &#x27;description site-1-nbr-1&#x27;, &#x27;password 3 13D4D3549493D2877B1DC116EE27A6BE&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@NilashishC)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_module.rst
new file mode 100644
index 00000000..8d4da320
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_module.rst
@@ -0,0 +1,1073 @@
+.. _cisco.nxos.nxos_bgp_module:
+
+
+*******************
+cisco.nxos.nxos_bgp
+*******************
+
+**(deprecated, removed after 2023-01-27) Manages BGP configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2023-01-27
+:Why: Updated module released with more functionality.
+:Alternative: nxos_bgp_global
+
+
+
+Synopsis
+--------
+- Manages BGP configurations on NX-OS switches.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>asn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP autonomous system number. Valid values are String, Integer in ASPLAIN or ASDOT notation.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath_always_compare_med</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable MED comparison on paths from different autonomous systems.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath_aspath_multipath_relax</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable load sharing across the providers with different (but equal-length) AS paths.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath_compare_neighborid</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable neighborid. Use this when more paths available than max path config.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath_compare_routerid</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable comparison of router IDs for identical eBGP paths.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath_cost_community_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable Ignores the cost community for BGP best-path calculations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath_med_confed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable enforcement of bestpath to do a MED comparison only between paths originated within a confederation.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath_med_missing_as_worst</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable assigns the value of infinity to received routes that do not carry the MED attribute, making these routes the least desirable.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bestpath_med_non_deterministic</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable deterministic selection of the best MED pat from among the paths from the same autonomous system.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cluster_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route Reflector Cluster-ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>confederation_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Routing domain confederation AS.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>confederation_peers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>AS confederation parameters.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable_policy_batching</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable the batching evaluation of prefix advertisement to all peers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable_policy_batching_ipv4_prefix_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable/Disable the batching evaluation of prefix advertisements to all peers with prefix list.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable_policy_batching_ipv6_prefix_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable/Disable the batching evaluation of prefix advertisements to all peers with prefix list.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enforce_first_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable enforces the neighbor autonomous system to be the first AS number listed in the AS path attribute for eBGP. On NX-OS, this property is only supported in the global BGP context.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>event_history_cli</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>size_small</li>
+ <li>size_medium</li>
+ <li>size_large</li>
+ <li>size_disable</li>
+ <li>default</li>
+ <li>true</li>
+ <li>false</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable cli event history buffer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>event_history_detail</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>size_small</li>
+ <li>size_medium</li>
+ <li>size_large</li>
+ <li>size_disable</li>
+ <li>default</li>
+ <li>true</li>
+ <li>false</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable detail event history buffer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>event_history_events</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>size_small</li>
+ <li>size_medium</li>
+ <li>size_large</li>
+ <li>size_disable</li>
+ <li>default</li>
+ <li>true</li>
+ <li>false</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable event history buffer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>event_history_periodic</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>size_small</li>
+ <li>size_medium</li>
+ <li>size_large</li>
+ <li>size_disable</li>
+ <li>default</li>
+ <li>true</li>
+ <li>false</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable periodic event history buffer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fast_external_fallover</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable immediately reset the session if the link to a directly connected BGP peer goes down. Only supported in the global BGP context.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flush_routes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable flush routes in RIB upon controlled restart. On NX-OS, this property is only supported in the global BGP context.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable graceful restart.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart_helper</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable graceful restart helper mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart_timers_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set maximum time for a restart sent to the BGP peer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart_timers_stalepath_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set maximum time that BGP keeps the stale routes from the restarting BGP peer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>isolate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable isolate this router from BGP perspective.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Local AS number to be used within a VRF instance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_neighbor_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable message logging for neighbor up/down event.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maxas_limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Maximum number of AS numbers allowed in the AS-path attribute. Valid values are between 1 and 512.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_down_fib_accelerate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable handle BGP neighbor down event, due to various reasons.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reconnect_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The BGP reconnection interval for dropped sessions. Valid values are between 1 and 60.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router Identifier (ID) of the BGP router VRF instance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administratively shutdown the BGP protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines whether the config should be present or not on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_fib_pending</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable advertise only routes programmed in hardware to peers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timer_bestpath_limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify timeout for the first best path after a restart, in seconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timer_bgp_hold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set BGP hold timer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timer_bgp_keepalive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set BGP keepalive timer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"default"</div>
+ </td>
+ <td>
+ <div>Name of the VRF. The name &#x27;default&#x27; is a valid VRF representing the global BGP.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - ``state=absent`` removes the whole BGP ASN configuration when ``vrf=default`` or the whole VRF instance within the BGP process when using a different VRF.
+ - Default when supported restores params default value.
+ - Configuring global params is only permitted if ``vrf=default``.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Configure a simple ASN
+ cisco.nxos.nxos_bgp:
+ asn: 65535
+ vrf: test
+ router_id: 192.0.2.1
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router bgp 65535&#x27;, &#x27;vrf test&#x27;, &#x27;router-id 192.0.2.1&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_neighbor_af_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_neighbor_af_module.rst
new file mode 100644
index 00000000..a8fb43c1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_neighbor_af_module.rst
@@ -0,0 +1,971 @@
+.. _cisco.nxos.nxos_bgp_neighbor_af_module:
+
+
+*******************************
+cisco.nxos.nxos_bgp_neighbor_af
+*******************************
+
+**Manages BGP address-family's neighbors configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages BGP address-family's neighbors configurations on NX-OS switches.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>additional_paths_receive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ <li>inherit</li>
+ </ul>
+ </td>
+ <td>
+ <div>Valid values are enable for basic command enablement; disable for disabling the command at the neighbor af level (it adds the disable keyword to the basic command); and inherit to remove the command at this level (the command value is inherited from a higher BGP layer).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>additional_paths_send</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ <li>inherit</li>
+ </ul>
+ </td>
+ <td>
+ <div>Valid values are enable for basic command enablement; disable for disabling the command at the neighbor af level (it adds the disable keyword to the basic command); and inherit to remove the command at this level (the command value is inherited from a higher BGP layer).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertise_map_exist</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Conditional route advertisement. This property requires two route maps, an advertise-map and an exist-map. Valid values are an array specifying both the advertise-map name and the exist-map name, or simply &#x27;default&#x27; e.g. [&#x27;my_advertise_map&#x27;, &#x27;my_exist_map&#x27;]. This command is mutually exclusive with the advertise_map_non_exist property.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>advertise_map_non_exist</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Conditional route advertisement. This property requires two route maps, an advertise-map and an exist-map. Valid values are an array specifying both the advertise-map name and the non-exist-map name, or simply &#x27;default&#x27; e.g. [&#x27;my_advertise_map&#x27;, &#x27;my_non_exist_map&#x27;]. This command is mutually exclusive with the advertise_map_exist property.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ <li>vpnv4</li>
+ <li>vpnv6</li>
+ <li>l2vpn</li>
+ </ul>
+ </td>
+ <td>
+ <div>Address Family Identifier.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>allowas_in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Activate allowas-in property</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>allowas_in_max</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Max-occurrences value for allowas_in. Valid values are an integer value or &#x27;default&#x27;. This is mutually exclusive with allowas_in.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>as_override</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Activate the as-override feature.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>asn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP autonomous system number. Valid values are String, Integer in ASPLAIN or ASDOT notation.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Activate the default-originate feature.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_originate_route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route-map for the default_originate property. Valid values are a string defining a route-map name, or &#x27;default&#x27;. This is mutually exclusive with default_originate.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>disable_peer_as_check</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Disable checking of peer AS-number while advertising</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter_list_in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Valid values are a string defining a filter-list name, or &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter_list_out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Valid values are a string defining a filter-list name, or &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_prefix_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Optional restart interval. Valid values are an integer. Requires max_prefix_limit. May not be combined with max_prefix_warning.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_prefix_limit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>maximum-prefix limit value. Valid values are an integer value or &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_prefix_threshold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Optional threshold percentage at which to generate a warning. Valid values are an integer value. Requires max_prefix_limit.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_prefix_warning</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Optional warning-only keyword. Requires max_prefix_limit. May not be combined with max_prefix_interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor Identifier. Valid values are string. Neighbors may use IPv4 or IPv6 notation, with or without prefix length.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hop_self</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Activate the next-hop-self feature.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hop_third_party</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Activate the next-hop-third-party feature.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_list_in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Valid values are a string defining a prefix-list name, or &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_list_out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Valid values are a string defining a prefix-list name, or &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rewrite_evpn_rt_asn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ <div style="font-style: italic; font-size: small; color: darkgreen">added in 1.1.0</div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Auto generate route targets for EBGP neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map_in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Valid values are a string defining a route-map name, or &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map_out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Valid values are a string defining a route-map name, or &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_reflector_client</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Router reflector client.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>safi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>unicast</li>
+ <li>multicast</li>
+ <li>evpn</li>
+ </ul>
+ </td>
+ <td>
+ <div>Sub Address Family Identifier.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>send_community</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>none</li>
+ <li>both</li>
+ <li>extended</li>
+ <li>standard</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>send-community attribute.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>soft_reconfiguration_in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>always</li>
+ <li>inherit</li>
+ </ul>
+ </td>
+ <td>
+ <div>Valid values are &#x27;enable&#x27; for basic command enablement; &#x27;always&#x27; to add the always keyword to the basic command; and &#x27;inherit&#x27; to remove the command at this level (the command value is inherited from a higher BGP layer).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>soo</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Site-of-origin. Valid values are a string defining a VPN extcommunity or &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines whether the config should be present or not on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_inactive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>suppress-inactive feature.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unsuppress_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>unsuppress-map. Valid values are a string defining a route-map name or &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"default"</div>
+ </td>
+ <td>
+ <div>Name of the VRF. The name &#x27;default&#x27; is a valid VRF representing the global bgp.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>weight</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Weight value. Valid values are an integer value or &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - ``state=absent`` removes the whole BGP address-family's neighbor configuration.
+ - Default, when supported, removes properties
+ - In order to default maximum-prefix configuration, only ``max_prefix_limit=default`` is needed.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure RR client
+ cisco.nxos.nxos_bgp_neighbor_af:
+ asn: 65535
+ neighbor: 192.0.2.3
+ afi: ipv4
+ safi: unicast
+ route_reflector_client: true
+ state: present
+ rewrite_evpn_rt_asn: true
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router bgp 65535&#x27;, &#x27;neighbor 192.0.2.3&#x27;, &#x27;address-family ipv4 unicast&#x27;, &#x27;route-reflector-client&#x27;, &#x27;rewrite-evpn-rt-asn&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_neighbor_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_neighbor_module.rst
new file mode 100644
index 00000000..dea87a23
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_bgp_neighbor_module.rst
@@ -0,0 +1,794 @@
+.. _cisco.nxos.nxos_bgp_neighbor_module:
+
+
+****************************
+cisco.nxos.nxos_bgp_neighbor
+****************************
+
+**(deprecated, removed after 2023-01-27) Manages BGP neighbors configurations.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2023-01-27
+:Why: Updated module released with more functionality.
+:Alternative: nxos_bgp_global
+
+
+
+Synopsis
+--------
+- Manages BGP neighbors configurations on NX-OS switches.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>asn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>BGP autonomous system number. Valid values are string, Integer in ASPLAIN or ASDOT notation.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables/Disables BFD for a given neighbor.</div>
+ <div>Dependency: &#x27;&#x27;feature bfd&#x27;&#x27;</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>capability_negotiation</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure whether or not to negotiate capability with this neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>connected_check</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure whether or not to check for directly connected peer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Description of the neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dynamic_capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure whether or not to enable dynamic capability.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ebgp_multihop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify multihop TTL for a remote peer. Valid values are integers between 2 and 255, or keyword &#x27;default&#x27; to disable this property.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the local-as number for the eBGP neighbor. Valid values are String or Integer in ASPLAIN or ASDOT notation, or &#x27;default&#x27;, which means not to configure it.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_neighbor_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ <li>inherit</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify whether or not to enable log messages for neighbor up/down event.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>low_memory_exempt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify whether or not to shut down this neighbor under memory pressure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum_peers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Maximum number of peers for this neighbor prefix Valid values are between 1 and 1000, or &#x27;default&#x27;, which does not impose the limit. Note that this parameter is accepted only on neighbors with address/prefix.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Neighbor Identifier. Valid values are string. Neighbors may use IPv4 or IPv6 notation, with or without prefix length.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ <div style="font-style: italic; font-size: small; color: darkgreen">added in 1.1.0</div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>fabric_border_leaf</li>
+ <li>fabric_external</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the peer type for BGP session.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pwd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the password for neighbor. Valid value is string.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pwd_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>3des</li>
+ <li>cisco_type_7</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the encryption type the password will use. Valid values are &#x27;3des&#x27; or &#x27;cisco_type_7&#x27; encryption or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remote_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify Autonomous System Number of the neighbor. Valid values are String or Integer in ASPLAIN or ASDOT notation, or &#x27;default&#x27;, which means not to configure it.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remove_private_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ <li>all</li>
+ <li>replace-as</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify the config to remove private AS number from outbound updates. Valid values are &#x27;enable&#x27; to enable this config, &#x27;disable&#x27; to disable this config, &#x27;all&#x27; to remove all private AS number, or &#x27;replace-as&#x27;, to replace the private AS number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure to administratively shutdown this neighbor.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines whether the config should be present or not on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_4_byte_as</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure to suppress 4-byte AS Capability.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers_holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify holdtime timer value. Valid values are integers between 0 and 3600 in terms of seconds, or &#x27;default&#x27;, which is 180.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers_keepalive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify keepalive timer value. Valid values are integers between 0 and 3600 in terms of seconds, or &#x27;default&#x27;, which is 60.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport_passive_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify whether or not to only allow passive connection setup. Valid values are &#x27;true&#x27;, &#x27;false&#x27;, and &#x27;default&#x27;, which defaults to &#x27;false&#x27;. This property can only be configured when the neighbor is in &#x27;ip&#x27; address format without prefix length.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify source interface of BGP session and updates.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"default"</div>
+ </td>
+ <td>
+ <div>Name of the VRF. The name &#x27;default&#x27; is a valid VRF representing the global bgp.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - ``state=absent`` removes the whole BGP neighbor configuration.
+ - Default, where supported, restores params default value.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # create a new neighbor
+ - cisco.nxos.nxos_bgp_neighbor:
+ asn: 65535
+ neighbor: 192.0.2.3
+ local_as: 20
+ remote_as: 30
+ bfd: enable
+ description: just a description
+ update_source: Ethernet1/3
+ state: present
+ peer_type: fabric_external
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router bgp 65535&#x27;, &#x27;neighbor 192.0.2.3&#x27;, &#x27;remote-as 30&#x27;, &#x27;update-source Ethernet1/3&#x27;, &#x27;description just a description&#x27;, &#x27;local-as 20&#x27;, &#x27;peer-type fabric-external&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_cliconf.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_cliconf.rst
new file mode 100644
index 00000000..b232f639
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_cliconf.rst
@@ -0,0 +1,43 @@
+.. _cisco.nxos.nxos_cliconf:
+
+
+***************
+cisco.nxos.nxos
+***************
+
+**Use NX-OS cliconf to run commands on Cisco NX-OS platform**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This nxos plugin provides low level abstraction apis for sending and receiving CLI commands from Cisco NX-OS network devices.
+
+
+
+
+
+
+
+
+
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Ansible Networking Team
+
+
+.. hint::
+ Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_command_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_command_module.rst
new file mode 100644
index 00000000..a34abf02
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_command_module.rst
@@ -0,0 +1,490 @@
+.. _cisco.nxos.nxos_command_module:
+
+
+***********************
+cisco.nxos.nxos_command
+***********************
+
+**Run arbitrary command on Cisco NXOS devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Sends an arbitrary command to an NXOS node and returns the results read from the device. This module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The commands to send to the remote NXOS device. The resulting output from the command is returned. If the <em>wait_for</em> argument is provided, the module is not returned until the condition is satisfied or the number of retires as expired.</div>
+ <div>The <em>commands</em> argument also accepts an alternative form that allows for complex values that specify the command to run and the output format to return. This can be done on a command by command basis. The complex argument supports the keywords <code>command</code> and <code>output</code> where <code>command</code> is the command to run and <code>output</code> is one of &#x27;text&#x27; or &#x27;json&#x27;.</div>
+ <div>If a command sent to the device requires answering a prompt, it is possible to pass a dict containing command, answer and prompt. Common answers are &#x27;y&#x27; or &quot;\r&quot; (carriage return, must be double quotes). See examples.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">1</div>
+ </td>
+ <td>
+ <div>Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditional, the interval indicates how to long to wait before trying the command again.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>any</li>
+ <li><div style="color: blue"><b>all</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>The <em>match</em> argument is used in conjunction with the <em>wait_for</em> argument to specify the match policy. Valid values are <code>all</code> or <code>any</code>. If the value is set to <code>all</code> then all conditionals in the <em>wait_for</em> must be satisfied. If the value is set to <code>any</code> then only one of the values must be satisfied.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retries</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">10</div>
+ </td>
+ <td>
+ <div>Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the <em>wait_for</em> conditionals.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies what to evaluate from the output of the command and what conditionals to apply. This argument will cause the task to wait for a particular conditional to be true before moving forward. If the conditional is not true by the configured retries, the task fails. See examples.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: waitfor</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: run show version on remote devices
+ cisco.nxos.nxos_command:
+ commands: show version
+
+ - name: run show version and check to see if output contains Cisco
+ cisco.nxos.nxos_command:
+ commands: show version
+ wait_for: result[0] contains Cisco
+
+ - name: run multiple commands on remote nodes
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interfaces
+
+ - name: run multiple commands and evaluate the output
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interfaces
+ wait_for:
+ - result[0] contains Cisco
+ - result[1] contains loopback0
+
+ - name: run commands and specify the output format
+ cisco.nxos.nxos_command:
+ commands:
+ - command: show version
+ output: json
+
+ - name: run commands that require answering a prompt
+ cisco.nxos.nxos_command:
+ commands:
+ - configure terminal
+ - command: no feature npv
+ prompt: Do you want to continue
+ answer: y
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>failed_conditions</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>failed</td>
+ <td>
+ <div>The list of conditionals that have failed</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;...&#x27;, &#x27;...&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>stdout</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always apart from low level errors (such as action plugin)</td>
+ <td>
+ <div>The set of responses from the commands</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;...&#x27;, &#x27;...&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>stdout_lines</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always apart from low level errors (such as action plugin)</td>
+ <td>
+ <div>The value of stdout split into a list</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[[&#x27;...&#x27;, &#x27;...&#x27;], [&#x27;...&#x27;], [&#x27;...&#x27;]]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_config_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_config_module.rst
new file mode 100644
index 00000000..8ecba27c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_config_module.rst
@@ -0,0 +1,799 @@
+.. _cisco.nxos.nxos_config_module:
+
+
+**********************
+cisco.nxos.nxos_config
+**********************
+
+**Manage Cisco NXOS configuration sections**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Cisco NXOS configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with NXOS configuration sections in a deterministic way. This module works with either CLI or NXAPI transports.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands to append to the end of the command stack if a change needs to be made. Just like with <em>before</em> this allows the playbook designer to append a set of commands to be executed after the command set.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>backup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>This argument will cause the module to create a full backup of the current <code>running-config</code> from the remote device before any changes are made. If the <code>backup_options</code> value is not given, the backup file is written to the <code>backup</code> folder in the playbook root directory or role root directory, if playbook is part of an ansible role. If the directory does not exist, it is created.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>backup_options</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This is a dict object containing configurable options related to backup file path. The value of this option is read only when <code>backup</code> is set to <em>True</em>, if <code>backup</code> is set to <em>false</em> this option will be silently ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dir_path</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option provides the path ending with directory name in which the backup configuration file will be stored. If the directory does not exist it will be created and the filename is either the value of <code>filename</code> or default filename as described in <code>filename</code> options description. If the path value is not given in that case a <em>backup</em> directory will be created in the current working directory and backup configuration will be copied in <code>filename</code> within <em>backup</em> directory.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filename</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The filename to be used to store the backup configuration. If the filename is not given it will be generated based on the hostname, current time and date in format defined by &lt;hostname&gt;_config.&lt;current-date&gt;@&lt;current-time&gt;</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands to push on to the command stack if a change needs to be made. This allows the playbook designer the opportunity to perform configuration commands prior to pushing any changes without affecting how the set of commands are matched against the system.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>defaults</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>The <em>defaults</em> argument will influence how the running-config is collected from the device. When the value is set to true, the command used to collect the running-config is append with the all keyword. When the value is set to false, the command is issued without the all keyword</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>diff_against</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>startup</li>
+ <li>intended</li>
+ <li>running</li>
+ </ul>
+ </td>
+ <td>
+ <div>When using the <code>ansible-playbook --diff</code> command line argument the module can generate diffs against different sources.</div>
+ <div>When this option is configure as <em>startup</em>, the module will return the diff of the running-config against the startup-config.</div>
+ <div>When this option is configured as <em>intended</em>, the module will return the diff of the running-config against the configuration provided in the <code>intended_config</code> argument.</div>
+ <div>When this option is configured as <em>running</em>, the module will return the before and after diff of the running-config with respect to any changes made to the device configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>diff_ignore_lines</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Use this argument to specify one or more lines that should be ignored during the diff. This is used for lines in the configuration that are automatically updated by the system. This argument takes a list of regular expressions or exact line matches.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>intended_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <code>intended_config</code> provides the master configuration that the node should conform to and is used to check the final running-config against. This argument will not modify any settings on the remote device and is strictly used to check the compliance of the current device&#x27;s configuration against. When specifying this argument, the task should also modify the <code>diff_against</code> value and set it to <em>intended</em>. The configuration lines for this value should be similar to how it will appear if present in the running-configuration of the device including the indentation to ensure correct diff.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lines</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The ordered set of commands that should be configured in the section. The commands must be the exact same commands as found in the device running-config to ensure idempotency and correct diff. Be sure to note the configuration command syntax as some commands are automatically modified by the device config parser.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: commands</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>match</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>line</b>&nbsp;&larr;</div></li>
+ <li>strict</li>
+ <li>exact</li>
+ <li>none</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module on the way to perform the matching of the set of commands against the current device config. If match is set to <em>line</em>, commands are matched line by line. If match is set to <em>strict</em>, command lines are matched with respect to position. If match is set to <em>exact</em>, command lines must be an equal match. Finally, if match is set to <em>none</em>, the module will not attempt to compare the source configuration with the running configuration on the remote device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>parents</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>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.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>replace</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>line</b>&nbsp;&larr;</div></li>
+ <li>block</li>
+ <li>config</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module on the way to perform the configuration on the device. If the replace argument is set to <em>line</em> then the modified lines are pushed to the device in configuration mode. If the replace argument is set to <em>block</em> then the entire command block is pushed to the device in configuration mode if any line is not correct. replace <em>config</em> will only work for NX-OS versions that support `config replace`.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>replace_src</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <em>replace_src</em> argument provides path to the configuration file to load into the remote system. This argument is used to replace the entire config with a flat-file. This is used with argument <em>replace</em> with value <em>config</em>. This is mutually exclusive with the <em>lines</em> and <em>src</em> arguments. This argument will only work for NX-OS versions that support `config replace`. Use <em>nxos_file_copy</em> module to copy the flat file to remote device and then use the path with this argument. The configuration lines in the file should be similar to how it will appear if present in the running-configuration of the device including the indentation to ensure idempotency and correct diff.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The module, by default, will connect to the remote device and retrieve the current running-config to use as a base for comparing against the contents of source. There are times when it is not desirable to have the task get the current running-config for every task in a playbook. The <em>running_config</em> argument allows the implementer to pass in the configuration to use as the base config for comparison. The configuration lines for this option should be similar to how it will appear if present in the running-configuration of the device including the indentation to ensure idempotency and correct diff.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: config</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>save_when</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>always</li>
+ <li><div style="color: blue"><b>never</b>&nbsp;&larr;</div></li>
+ <li>modified</li>
+ <li>changed</li>
+ </ul>
+ </td>
+ <td>
+ <div>When changes are made to the device running-configuration, the changes are not copied to non-volatile storage by default. Using this argument will change that before. If the argument is set to <em>always</em>, then the running-config will always be copied to the startup-config and the <em>modified</em> flag will always be set to True. If the argument is set to <em>modified</em>, then the running-config will only be copied to the startup-config if it has changed since the last save to startup-config. If the argument is set to <em>never</em>, the running-config will never be copied to the startup-config. If the argument is set to <em>changed</em>, then the running-config will only be copied to the startup-config if the task has made a change. <em>changed</em> was added in Ansible 2.6.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>src</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">path</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <em>src</em> argument provides a path to the configuration file to load into the remote system. The path can either be a full system path to the configuration file if the value starts with / or relative to the root of the implemented role or playbook. This argument is mutually exclusive with the <em>lines</em> and <em>parents</em> arguments. The configuration lines in the source file should be similar to how it will appear if present in the running-configuration of the device including indentation to ensure idempotency and correct diff.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Abbreviated commands are NOT idempotent, see `Network FAQ <../network/user_guide/faq.html#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands>`_.
+ - To ensure idempotency and correct diff the configuration lines in the relevant module options should be similar to how they appear if present in the running configuration on device including the indentation.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure top level configuration and save it
+ cisco.nxos.nxos_config:
+ lines: hostname {{ inventory_hostname }}
+ save_when: modified
+
+ - name: diff the running-config against a provided config
+ cisco.nxos.nxos_config:
+ diff_against: intended
+ intended_config: "{{ lookup('file', 'master.cfg') }}"
+
+ - cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ - 50 permit ip 192.0.2.5/32 any log
+ parents: ip access-list test
+ before: no ip access-list test
+ match: exact
+
+ - cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ before: no ip access-list test
+ replace: block
+
+ - name: replace config with flat file
+ cisco.nxos.nxos_config:
+ replace_src: config.txt
+ replace: config
+
+ - name: for idempotency, use full-form commands
+ cisco.nxos.nxos_config:
+ lines:
+ # - shut
+ - shutdown
+ # parents: int eth1/1
+ parents: interface Ethernet1/1
+
+ - name: configurable backup path
+ cisco.nxos.nxos_config:
+ backup: yes
+ backup_options:
+ filename: backup.cfg
+ dir_path: /home/user
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>backup_path</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes</td>
+ <td>
+ <div>The full path to the backup file</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/playbooks/ansible/backup/nxos_config.2016-07-16@22:28:34</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands that will be pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;hostname foo&#x27;, &#x27;vlan 1&#x27;, &#x27;name default&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>date</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes</td>
+ <td>
+ <div>The date extracted from the backup file name</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">2016-07-16</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>filename</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes and filename is not specified in backup options</td>
+ <td>
+ <div>The name of the backup file</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">nxos_config.2016-07-16@22:28:34</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>shortname</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes and filename is not specified in backup options</td>
+ <td>
+ <div>The full path to the backup file excluding the timestamp</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/playbooks/ansible/backup/nxos_config</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>time</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when backup is yes</td>
+ <td>
+ <div>The time extracted from the backup file name</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">22:28:34</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands that will be pushed to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;hostname foo&#x27;, &#x27;vlan 1&#x27;, &#x27;name default&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_devicealias_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_devicealias_module.rst
new file mode 100644
index 00000000..c84ce27c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_devicealias_module.rst
@@ -0,0 +1,273 @@
+.. _cisco.nxos.nxos_devicealias_module:
+
+
+***************************
+cisco.nxos.nxos_devicealias
+***************************
+
+**Configuration of device alias for Cisco NXOS MDS Switches.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Configuration of device alias for Cisco MDS NXOS.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>da</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of device-alias to be added or removed</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the device-alias to be added or removed</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pwwn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>pwwn to which the name needs to be associated with</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remove</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Removes the device-alias if set to True</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable device-alias distribution</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>basic</li>
+ <li>enhanced</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mode of devices-alias, basic or enhanced</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rename</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of device-alias to be renamed</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>new_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>New name of the device-alias</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>old_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Old name of the device-alias that needs to be renamed</div>
+ </td>
+ </tr>
+
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NX-OS 8.4(1)
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Test that device alias module works
+ cisco.nxos.nxos_devicealias:
+ da:
+ - name: test1_add
+ pwwn: 56:2:22:11:22:88:11:67
+ - name: test2_add
+ pwwn: 65:22:22:11:22:22:11:d
+ - name: dev1
+ remove: true
+ - name: dev2
+ remove: true
+ distribute: true
+ mode: enhanced
+ rename:
+ - new_name: bcd
+ old_name: abc
+ - new_name: bcd1
+ old_name: abc1
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;terminal dont-ask&#x27;, &#x27;device-alias database&#x27;, &#x27;device-alias name somename pwwn 10:00:00:00:89:a1:01:03&#x27;, &#x27;device-alias name somename1 pwwn 10:00:00:00:89:a1:02:03&#x27;, &#x27;device-alias commit&#x27;, &#x27;no terminal dont-ask&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Suhas Bharadwaj (@srbharadwaj) (subharad@cisco.com)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_evpn_global_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_evpn_global_module.rst
new file mode 100644
index 00000000..1f9ae7ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_evpn_global_module.rst
@@ -0,0 +1,355 @@
+.. _cisco.nxos.nxos_evpn_global_module:
+
+
+***************************
+cisco.nxos.nxos_evpn_global
+***************************
+
+**Handles the EVPN control plane for VXLAN.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Handles the EVPN control plane for VXLAN.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nv_overlay_evpn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>EVPN control plane.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - This module is not supported on Nexus 3000 series of switches.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_evpn_global:
+ nv_overlay_evpn: true
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands to be sent to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;nv overlay evpn&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_evpn_vni_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_evpn_vni_module.rst
new file mode 100644
index 00000000..07956118
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_evpn_vni_module.rst
@@ -0,0 +1,445 @@
+.. _cisco.nxos.nxos_evpn_vni_module:
+
+
+************************
+cisco.nxos.nxos_evpn_vni
+************************
+
+**Manages Cisco EVPN VXLAN Network Identifier (VNI).**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages Cisco Ethernet Virtual Private Network (EVPN) VXLAN Network Identifier (VNI) configurations of a Nexus device.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_distinguisher</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The VPN Route Distinguisher (RD). The RD is combined with the IPv4 or IPv6 prefix learned by the PE router to create a globally unique address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_target_both</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enables/Disables route-target settings for both import and export target communities using a single property.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_target_export</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the route-target &#x27;export&#x27; extended communities.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_target_import</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the route-target &#x27;import&#x27; extended communities.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines whether the config should be present or not on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vni</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The EVPN VXLAN Network Identifier.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - default, where supported, restores params default value.
+ - RD override is not permitted. You should set it to the default values first and then reconfigure it.
+ - ``route_target_both``, ``route_target_import`` and ``route_target_export valid`` values are a list of extended communities, (i.e. ['1.2.3.4:5', '33:55']) or the keywords 'auto' or 'default'.
+ - The ``route_target_both`` property is discouraged due to the inconsistent behavior of the property across Nexus platforms and image versions. For this reason it is recommended to use explicit ``route_target_export`` and ``route_target_import`` properties instead of ``route_target_both``.
+ - RD valid values are a string in one of the route-distinguisher formats, the keyword 'auto', or the keyword 'default'.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: vni configuration
+ cisco.nxos.nxos_evpn_vni:
+ vni: 6000
+ route_distinguisher: 60:10
+ route_target_import:
+ - 5000:10
+ - 4100:100
+ route_target_export: auto
+ route_target_both: default
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;evpn&#x27;, &#x27;vni 6000 l2&#x27;, &#x27;route-target import 5001:10&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_facts_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_facts_module.rst
new file mode 100644
index 00000000..2cbfd732
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_facts_module.rst
@@ -0,0 +1,766 @@
+.. _cisco.nxos.nxos_facts_module:
+
+
+*********************
+cisco.nxos.nxos_facts
+*********************
+
+**Gets facts about NX-OS switches**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Collects facts from Cisco Nexus devices running the NX-OS operating system. Fact collection is supported over both Cli and Nxapi transports. This module prepends all of the base network fact keys with ``ansible_net_<fact>``. The facts module will always collect a base set of facts from the device and can enable or disable collection of additional facts.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gather_network_resources</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>When supplied, this argument will restrict the facts collected 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. Values can also be used with an initial <code>!</code> to specify that a specific subset should not be collected. Valid subsets are &#x27;all&#x27;, &#x27;bfd_interfaces&#x27;, &#x27;lag_interfaces&#x27;, &#x27;telemetry&#x27;, &#x27;vlans&#x27;, &#x27;lacp&#x27;, &#x27;lacp_interfaces&#x27;, &#x27;interfaces&#x27;, &#x27;l3_interfaces&#x27;, &#x27;l2_interfaces&#x27;, &#x27;lldp_global&#x27;, &#x27;acls&#x27;, &#x27;acl_interfaces&#x27;, &#x27;ospfv2&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>gather_subset</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"!config"</div>
+ </td>
+ <td>
+ <div>When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, legacy, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial <code>!</code> to specify that a specific subset should not be collected.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Gather all legacy facts
+ cisco.nxos.nxos_facts:
+ gather_subset: all
+ - name: Gather only the config and default facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - config
+ - name: Do not gather hardware facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!hardware'
+ - name: Gather legacy and resource facts
+ cisco.nxos.nxos_facts:
+ gather_subset: all
+ gather_network_resources: all
+ - name: Gather only the interfaces resource facts and no legacy facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - interfaces
+ - name: Gather interfaces resource and minimal legacy facts
+ cisco.nxos.nxos_facts:
+ gather_subset: min
+ gather_network_resources: interfaces
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_all_ipv4_addresses</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when interfaces is configured</td>
+ <td>
+ <div>All IPv4 addresses configured on the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_all_ipv6_addresses</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when interfaces is configured</td>
+ <td>
+ <div>All IPv6 addresses configured on the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_api</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The name of the transport</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_config</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when config is configured</td>
+ <td>
+ <div>The current active config from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_filesystems</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>All file system names available on the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_gather_network_resources</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when the resource is configured</td>
+ <td>
+ <div>The list of fact for network resource subsets collected from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_gather_subset</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of fact subsets collected from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_hostname</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configured hostname of the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_image</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The image file the device is running</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_interfaces</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when interfaces is configured</td>
+ <td>
+ <div>A hash of all interfaces running on the system</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_license_hostid</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The License host id of the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_memfree_mb</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>The available free memory on the remote device in Mb</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_memtotal_mb</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>when hardware is configured</td>
+ <td>
+ <div>The total memory on the remote device in Mb</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_model</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The model name returned from the device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_neighbors</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when interfaces is configured</td>
+ <td>
+ <div>The list of LLDP and CDP neighbors from the device. If both, CDP and LLDP neighbor data is present on one port, CDP is preferred.</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_python_version</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The Python version Ansible controller is using</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_serialnum</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The serial number of the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>ansible_net_version</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The operating system version running on the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>fan_info</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when legacy is configured</td>
+ <td>
+ <div>A hash of facts about fans in the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>hostname</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when legacy is configured</td>
+ <td>
+ <div>The configured hostname of the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>interfaces_list</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when legacy is configured</td>
+ <td>
+ <div>The list of interface names on the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>kickstart</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when legacy is configured</td>
+ <td>
+ <div>The software version used to boot the system</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>module</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when legacy is configured</td>
+ <td>
+ <div>A hash of facts about the modules in a remote device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>platform</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when legacy is configured</td>
+ <td>
+ <div>The hardware platform reported by the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>power_supply_info</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>when legacy is configured</td>
+ <td>
+ <div>A hash of facts about the power supplies in the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>vlan_list</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when legacy is configured</td>
+ <td>
+ <div>The list of VLAN IDs configured on the remote device</div>
+ <br/>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_feature_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_feature_module.rst
new file mode 100644
index 00000000..56976faa
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_feature_module.rst
@@ -0,0 +1,382 @@
+.. _cisco.nxos.nxos_feature_module:
+
+
+***********************
+cisco.nxos.nxos_feature
+***********************
+
+**Manage features in NX-OS switches.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Offers ability to enable and disable features in NX-OS.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>feature</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of feature.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>enabled</b>&nbsp;&larr;</div></li>
+ <li>disabled</li>
+ </ul>
+ </td>
+ <td>
+ <div>Desired state of the feature.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Ensure lacp is enabled
+ cisco.nxos.nxos_feature:
+ feature: lacp
+ state: enabled
+
+ - name: Ensure ospf is disabled
+ cisco.nxos.nxos_feature:
+ feature: ospf
+ state: disabled
+
+ - name: Ensure vpc is enabled
+ cisco.nxos.nxos_feature:
+ feature: vpc
+ state: enabled
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands to be sent to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;nv overlay evpn&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_file_copy_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_file_copy_module.rst
new file mode 100644
index 00000000..174b03cb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_file_copy_module.rst
@@ -0,0 +1,691 @@
+.. _cisco.nxos.nxos_file_copy_module:
+
+
+*************************
+cisco.nxos.nxos_file_copy
+*************************
+
+**Copy a file to a remote NXOS device.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module supports two different workflows for copying a file to flash (or bootflash) on NXOS devices. Files can either be (1) pushed from the Ansible controller to the device or (2) pulled from a remote SCP file server to the device. File copies are initiated from the NXOS device to the remote SCP server. This module only supports the use of connection ``network_cli`` or ``Cli`` transport with connection ``local``.
+
+
+
+Requirements
+------------
+The below requirements are needed on the host that executes this module.
+
+- paramiko (required when file_pull is False)
+- SCPClient (required when file_pull is False)
+- pexpect (required when file_pull is True)
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>connect_ssh_port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">-</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">22</div>
+ </td>
+ <td>
+ <div>SSH server port used for file transfer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>file_pull</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>When (False) file is copied from the Ansible controller to the NXOS device.</div>
+ <div>When (True) file is copied from a remote SCP server to the NXOS device. In this mode, the file copy is initiated from the NXOS device.</div>
+ <div>If the file is already present on the device it will be overwritten and therefore the operation is NOT idempotent.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>file_pull_compact</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>When file_pull is True, this is used to compact nxos image files. This option can only be used with nxos image files.</div>
+ <div>When (file_pull is False), this is not used.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>file_pull_kstack</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>When file_pull is True, this can be used to speed up file copies when the nxos running image supports the use-kstack option.</div>
+ <div>When (file_pull is False), this is not used.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>file_pull_protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>scp</b>&nbsp;&larr;</div></li>
+ <li>sftp</li>
+ <li>ftp</li>
+ <li>http</li>
+ <li>https</li>
+ <li>tftp</li>
+ </ul>
+ </td>
+ <td>
+ <div>When file_pull is True, this can be used to define the transfer protocol for copying file from remote to the NXOS device.</div>
+ <div>When (file_pull is False), this is not used.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>file_pull_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">-</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">300</div>
+ </td>
+ <td>
+ <div>Use this parameter to set timeout in seconds, when transferring large files or when the network is slow.</div>
+ <div>When (file_pull is False), this is not used.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>file_system</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">-</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"bootflash:"</div>
+ </td>
+ <td>
+ <div>The remote file system on the nxos device. If omitted, devices that support a <em>file_system</em> parameter will use their default values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_file</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">-</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>When (file_pull is False) this is the path to the local file on the Ansible controller. The local directory must exist.</div>
+ <div>When (file_pull is True) this is the target file name on the NXOS device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>local_file_directory</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">-</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>When (file_pull is True) file is copied from a remote SCP server to the NXOS device, and written to this directory on the NXOS device. If the directory does not exist, it will be created under the file_system. This is an optional parameter.</div>
+ <div>When (file_pull is False), this is not used.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remote_file</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">-</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>When (file_pull is False) this is the remote file path on the NXOS device. If omitted, the name of the local file will be used. The remote directory must exist.</div>
+ <div>When (file_pull is True) this is the full path to the file on the remote SCP server to be copied to the NXOS device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remote_scp_server</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">-</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The remote scp server address when file_pull is True. This is required if file_pull is True.</div>
+ <div>When (file_pull is False), this is not used.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remote_scp_server_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">-</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The remote scp server password when file_pull is True. This is required if file_pull is True.</div>
+ <div>When (file_pull is False), this is not used.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remote_scp_server_user</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">-</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The remote scp server username when file_pull is True. This is required if file_pull is True.</div>
+ <div>When (file_pull is False), this is not used.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">-</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"management"</div>
+ </td>
+ <td>
+ <div>The VRF used to pull the file. Useful when no vrf management is defined</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOS 7.0(3)I2(5), 7.0(3)I4(6), 7.0(3)I5(3), 7.0(3)I6(1), 7.0(3)I7(3), 6.0(2)A8(8), 7.0(3)F3(4), 7.3(0)D1(1), 8.3(0), 9.2, 9.3
+ - When pushing files (file_pull is False) to the NXOS device, feature scp-server must be enabled.
+ - When pulling files (file_pull is True) to the NXOS device, feature scp-server is not required.
+ - When pulling files (file_pull is True) to the NXOS device, no transfer will take place if the file is already present.
+ - Check mode will tell you if the file would be copied.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # File copy from ansible controller to nxos device
+ - name: copy from server to device
+ cisco.nxos.nxos_file_copy:
+ local_file: ./test_file.txt
+ remote_file: test_file.txt
+
+ # Initiate file copy from the nxos device to transfer file from an SCP server back to the nxos device
+ - name: initiate file copy from device
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ local_file: xyz
+ local_file_directory: dir1/dir2/dir3
+ remote_file: /mydir/abc
+ remote_scp_server: 192.168.0.1
+ remote_scp_server_user: myUser
+ remote_scp_server_password: myPassword
+ vrf: management
+
+ # Initiate file copy from the nxos device to transfer file from a ftp server back to the nxos device.
+ # remote_scp_server_user and remote_scp_server_password are used to login to the FTP server.
+ - name: initiate file copy from device
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ file_pull_protocol: ftp
+ local_file: xyz
+ remote_file: /mydir/abc
+ remote_scp_server: 192.168.0.1
+ remote_scp_server_user: myUser
+ remote_scp_server_password: myPassword
+ vrf: management
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>changed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>success</td>
+ <td>
+ <div>Indicates whether or not the file was copied.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>local_file</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>success</td>
+ <td>
+ <div>The path of the local file.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/path/to/local/file</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>remote_file</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>success</td>
+ <td>
+ <div>The path of the remote file.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/path/to/remote/file</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>remote_scp_server</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>success</td>
+ <td>
+ <div>The name of the scp server when file_pull is True.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">fileserver.example.com</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>transfer_status</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>success</td>
+ <td>
+ <div>Whether a file was transferred to the nxos device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">Sent</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+- Rewritten as a plugin by (@mikewiebe)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_gir_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_gir_module.rst
new file mode 100644
index 00000000..f780b4a0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_gir_module.rst
@@ -0,0 +1,535 @@
+.. _cisco.nxos.nxos_gir_module:
+
+
+*******************
+cisco.nxos.nxos_gir
+*******************
+
+**Trigger a graceful removal or insertion (GIR) of the switch.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Trigger a graceful removal or insertion (GIR) of the switch.
+- GIR processing may take more than 2 minutes. Timeout settings are automatically extended to 200s when user timeout settings are insufficient.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify desired state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_mode_maintenance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>When <code>system_mode_maintenance=true</code> it puts all enabled protocols in maintenance mode (using the isolate command). When <code>system_mode_maintenance=false</code> it puts all enabled protocols in normal mode (using the no isolate command).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_mode_maintenance_dont_generate_profile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>When <code>system_mode_maintenance_dont_generate_profile=true</code> it prevents the dynamic searching of enabled protocols and executes commands configured in a maintenance-mode profile. Use this option if you want the system to use a maintenance-mode profile that you have created. When <code>system_mode_maintenance_dont_generate_profile=false</code> it prevents the dynamic searching of enabled protocols and executes commands configured in a normal-mode profile. Use this option if you want the system to use a normal-mode profile that you have created.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_mode_maintenance_on_reload_reset_reason</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>hw_error</li>
+ <li>svc_failure</li>
+ <li>kern_failure</li>
+ <li>wdog_timeout</li>
+ <li>fatal_error</li>
+ <li>lc_failure</li>
+ <li>match_any</li>
+ <li>manual_reload</li>
+ <li>any_other</li>
+ <li>maintenance</li>
+ </ul>
+ </td>
+ <td>
+ <div>Boots the switch into maintenance mode automatically in the event of a specified system crash. Note that not all reset reasons are applicable for all platforms. Also if reset reason is set to match_any, it is not idempotent as it turns on all reset reasons. If reset reason is match_any and state is absent, it turns off all the reset reasons.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_mode_maintenance_shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Shuts down all protocols, vPC domains, and interfaces except the management interface (using the shutdown command). This option is disruptive while <code>system_mode_maintenance</code> (which uses the isolate command) is not.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_mode_maintenance_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Keeps the switch in maintenance mode for a specified number of minutes. Range is 5-65535.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - ``state`` has effect only in combination with ``system_mode_maintenance_timeout`` or ``system_mode_maintenance_on_reload_reset_reason``.
+ - Using ``system_mode_maintenance`` and ``system_mode_maintenance_dont_generate_profile`` would make the module fail, but the system mode will be triggered anyway.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Trigger system maintenance mode
+ - cisco.nxos.nxos_gir:
+ system_mode_maintenance: true
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+ # Trigger system normal mode
+ - cisco.nxos.nxos_gir:
+ system_mode_maintenance: false
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+ # Configure on-reload reset-reason for maintenance mode
+ - cisco.nxos.nxos_gir:
+ system_mode_maintenance_on_reload_reset_reason: manual_reload
+ state: present
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+ # Add on-reload reset-reason for maintenance mode
+ - cisco.nxos.nxos_gir:
+ system_mode_maintenance_on_reload_reset_reason: hw_error
+ state: present
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+ # Remove on-reload reset-reason for maintenance mode
+ - cisco.nxos.nxos_gir:
+ system_mode_maintenance_on_reload_reset_reason: manual_reload
+ state: absent
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+ # Set timeout for maintenance mode
+ - cisco.nxos.nxos_gir:
+ system_mode_maintenance_timeout: 30
+ state: present
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+ # Remove timeout for maintenance mode
+ - cisco.nxos.nxos_gir:
+ system_mode_maintenance_timeout: 30
+ state: absent
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>changed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>check to see if a change was made on the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>final_system_mode</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>verbose mode</td>
+ <td>
+ <div>describe the last system mode</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">normal</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>verbose mode</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;terminal dont-ask&#x27;, &#x27;system mode maintenance timeout 10&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_gir_profile_management_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_gir_profile_management_module.rst
new file mode 100644
index 00000000..47aa5f69
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_gir_profile_management_module.rst
@@ -0,0 +1,468 @@
+.. _cisco.nxos.nxos_gir_profile_management_module:
+
+
+**************************************
+cisco.nxos.nxos_gir_profile_management
+**************************************
+
+**Create a maintenance-mode or normal-mode profile for GIR.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manage a maintenance-mode or normal-mode profile with configuration commands that can be applied during graceful removal or graceful insertion.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of commands to be included into the profile.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>maintenance</li>
+ <li>normal</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure the profile as Maintenance or Normal mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify desired state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - ``state=absent`` removes the whole profile.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Create a maintenance-mode profile
+ - cisco.nxos.nxos_gir_profile_management:
+ mode: maintenance
+ commands:
+ - router eigrp 11
+ - isolate
+
+ # Remove the maintenance-mode profile
+ - cisco.nxos.nxos_gir_profile_management:
+ mode: maintenance
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>changed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>check to see if a change was made on the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>end_state</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>verbose mode</td>
+ <td>
+ <div>list of profile entries after module execution.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router bgp 65535&#x27;, &#x27;isolate&#x27;, &#x27;router eigrp 10&#x27;, &#x27;isolate&#x27;, &#x27;diagnostic bootup level complete&#x27;, &#x27;router eigrp 11&#x27;, &#x27;isolate&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>existing</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>verbose mode</td>
+ <td>
+ <div>list of existing profile commands.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router bgp 65535&#x27;, &#x27;isolate&#x27;, &#x27;router eigrp 10&#x27;, &#x27;isolate&#x27;, &#x27;diagnostic bootup level complete&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>proposed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>verbose mode</td>
+ <td>
+ <div>list of commands passed into module.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router eigrp 11&#x27;, &#x27;isolate&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;configure maintenance profile maintenance-mode&#x27;, &#x27;router eigrp 11&#x27;, &#x27;isolate&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_hsrp_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_hsrp_interfaces_module.rst
new file mode 100644
index 00000000..176e5a3f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_hsrp_interfaces_module.rst
@@ -0,0 +1,343 @@
+.. _cisco.nxos.nxos_hsrp_interfaces_module:
+
+
+*******************************
+cisco.nxos.nxos_hsrp_interfaces
+*******************************
+
+**HSRP interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages Hot Standby Router Protocol (HSRP) interface attributes.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The provided configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable HSRP Bidirectional Forwarding Detection (BFD) on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The name of the interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section &#x27;^interface&#x27;</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NX-OS 7.0(3)I5(1).
+ - Feature bfd should be enabled for this module.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using deleted
+
+ - name: Configure hsrp attributes on interfaces
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ - name: Ethernet1/1
+ - name: Ethernet1/2
+ operation: deleted
+
+
+ # Using merged
+
+ - name: Configure hsrp attributes on interfaces
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ - name: Ethernet1/1
+ bfd: enable
+ - name: Ethernet1/2
+ bfd: disable
+ operation: merged
+
+
+ # Using overridden
+
+ - name: Configure hsrp attributes on interfaces
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ - name: Ethernet1/1
+ bfd: enable
+ - name: Ethernet1/2
+ bfd: disable
+ operation: overridden
+
+
+ # Using replaced
+
+ - name: Configure hsrp attributes on interfaces
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ - name: Ethernet1/1
+ bfd: enable
+ - name: Ethernet1/2
+ bfd: disable
+ operation: replaced
+
+ # Using rendered
+
+ - name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ - name: Ethernet1/800
+ bfd: enable
+ - name: Ethernet1/801
+ bfd: enable
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # rendered:
+ # - "interface Ethernet1/800"
+ # - "hsrp bfd"
+ # - "interface Ethernet1/801"
+ # - "hsrp bfd"
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # interface Ethernet1/800
+ # no switchport
+ # hsrp bfd
+ # interface Ethernet1/801
+ # no switchport
+ # hsrp bfd
+
+ - name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_hsrp_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+
+ # parsed:
+ # - name: Ethernet1/800
+ # bfd: enable
+ # - name: Ethernet1/801
+ # bfd: enable
+
+ # Using gathered
+
+ # Existing device config state
+ # -------------------------------
+
+ # interface Ethernet1/1
+ # no switchport
+ # hsrp bfd
+ # interface Ethernet1/2
+ # no switchport
+ # hsrp bfd
+ # interface Ethernet1/3
+ # no switchport
+
+ - name: Gather hsrp_interfaces facts from the device using nxos_hsrp_interfaces
+ cisco.nxos.nxos_hsrp_interfaces:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+
+ # gathered:
+ # - name: Ethernet1/1
+ # bfd: enable
+ # - name: Ethernet1/2
+ # bfd: enable
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/1&#x27;, &#x27;hsrp bfd&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Chris Van Heuveln (@chrisvanheuveln)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_hsrp_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_hsrp_module.rst
new file mode 100644
index 00000000..4402f951
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_hsrp_module.rst
@@ -0,0 +1,539 @@
+.. _cisco.nxos.nxos_hsrp_module:
+
+
+********************
+cisco.nxos.nxos_hsrp
+********************
+
+**Manages HSRP configuration on NX-OS switches.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages HSRP configuration on NX-OS switches.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_string</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication string. If this needs to be hidden(for md5 type), the string should be 7 followed by the key string. Otherwise, it can be 0 followed by key string or just key string (for backward compatibility). For text type, this should be just be a key string. if this is &#x27;default&#x27;, authentication is removed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>text</li>
+ <li>md5</li>
+ </ul>
+ </td>
+ <td>
+ <div>Authentication type.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>HSRP group number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of interface that is being managed for HSRP.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>preempt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enabled</li>
+ <li>disabled</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable preempt.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>HSRP priority or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify desired state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>version</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>1</li>
+ <li>2</li>
+ </ul>
+ <b>Default:</b><br/><div style="color: blue">1</div>
+ </td>
+ <td>
+ <div>HSRP version.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>HSRP virtual IP address or keyword &#x27;default&#x27;</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - HSRP feature needs to be enabled first on the system.
+ - SVIs must exist before using this module.
+ - Interface must be a L3 port before using this module.
+ - HSRP cannot be configured on loopback interfaces.
+ - MD5 authentication is only possible with HSRPv2 while it is ignored if HSRPv1 is used instead, while it will not raise any error. Here we allow MD5 authentication only with HSRPv2 in order to enforce better practice.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Ensure HSRP is configured with following params on a SVI
+ cisco.nxos.nxos_hsrp:
+ group: 10
+ vip: 10.1.1.1
+ priority: 150
+ interface: vlan10
+ preempt: enabled
+
+ - name: Ensure HSRP is configured with following params on a SVI with clear text authentication
+ cisco.nxos.nxos_hsrp:
+ group: 10
+ vip: 10.1.1.1
+ priority: 150
+ interface: vlan10
+ preempt: enabled
+ auth_type: text
+ auth_string: CISCO
+
+ - name: Ensure HSRP is configured with md5 authentication and clear authentication
+ string
+ cisco.nxos.nxos_hsrp:
+ group: 10
+ vip: 10.1.1.1
+ priority: 150
+ interface: vlan10
+ preempt: enabled
+ auth_type: md5
+ auth_string: 0 1234
+
+ - name: Ensure HSRP is configured with md5 authentication and hidden authentication
+ string
+ cisco.nxos.nxos_hsrp:
+ group: 10
+ vip: 10.1.1.1
+ priority: 150
+ interface: vlan10
+ preempt: enabled
+ auth_type: md5
+ auth_string: 7 1234
+
+ - name: Remove HSRP config for given interface, group, and VIP
+ cisco.nxos.nxos_hsrp:
+ group: 10
+ interface: vlan10
+ vip: 10.1.1.1
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface vlan10&#x27;, &#x27;hsrp version 2&#x27;, &#x27;hsrp 30&#x27;, &#x27;ip 10.30.1.1&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_httpapi.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_httpapi.rst
new file mode 100644
index 00000000..61549c9f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_httpapi.rst
@@ -0,0 +1,43 @@
+.. _cisco.nxos.nxos_httpapi:
+
+
+***************
+cisco.nxos.nxos
+***************
+
+**Use NX-API to run commands on Cisco NX-OS platform**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This plugin provides low level abstraction APIs for sending and receiving commands using NX-API with devices running Cisco NX-OS.
+
+
+
+
+
+
+
+
+
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Ansible Networking Team
+
+
+.. hint::
+ Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_igmp_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_igmp_interface_module.rst
new file mode 100644
index 00000000..1c51f5e4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_igmp_interface_module.rst
@@ -0,0 +1,693 @@
+.. _cisco.nxos.nxos_igmp_interface_module:
+
+
+******************************
+cisco.nxos.nxos_igmp_interface
+******************************
+
+**Manages IGMP interface configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages IGMP interface configuration settings.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the group membership timeout for IGMPv2. Values can range from 3 to 65,535 seconds or keyword &#x27;default&#x27;. The default is 260 seconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>immediate_leave</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables the device to remove the group entry from the multicast routing table immediately upon receiving a leave message for the group. Use this command to minimize the leave latency of IGMPv2 group memberships on a given IGMP interface because the device does not send group-specific queries. The default is disabled.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The full interface name for IGMP configuration. e.g. <em>Ethernet1/2</em>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>last_member_qrt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the query interval waited after sending membership reports before the software deletes the group state. Values can range from 1 to 25 seconds or keyword &#x27;default&#x27;. The default is 1 second.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>last_member_query_count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the number of times that the software sends an IGMP query in response to a host leave message. Values can range from 1 to 5 or keyword &#x27;default&#x27;. The default is 2.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>oif_ps</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">raw</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure prefixes and sources for static outgoing interface (OIF). This is a list of dict where each dict has source and prefix defined or just prefix if source is not needed. The specified values will be configured on the device and if any previous prefix/sources exist, they will be removed. Keyword &#x27;default&#x27; is also accepted which removes all existing prefix/sources.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>oif_routemap</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure a routemap for static outgoing interface (OIF) or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>querier_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the querier timeout that the software uses when deciding to take over as the querier. Values can range from 1 to 65535 seconds or keyword &#x27;default&#x27;. The default is 255 seconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>query_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the frequency at which the software sends IGMP host query messages. Values can range from 1 to 18000 seconds or keyword &#x27;default&#x27;. The default is 125 seconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>query_mrt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the response time advertised in IGMP queries. Values can range from 1 to 25 seconds or keyword &#x27;default&#x27;. The default is 10 seconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>report_llg</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures report-link-local-groups. Enables sending reports for groups in 224.0.0.0/24. Reports are always sent for nonlink local groups. By default, reports are not sent for link local groups.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Restart IGMP. This is NOT idempotent as this is action only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>robustness</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sets the robustness variable. Values can range from 1 to 7 or keyword &#x27;default&#x27;. The default is 2.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>startup_query_count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Query count used when the IGMP process starts up. The range is from 1 to 10 or keyword &#x27;default&#x27;. The default is 2.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>startup_query_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Query interval used when the IGMP process starts up. The range is from 1 to 18000 or keyword &#x27;default&#x27;. The default is 31.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manages desired state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>version</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>2</li>
+ <li>3</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>IGMP version. It can be 2 or 3 or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - When ``state=default``, supported params will be reset to a default state. These include ``version``, ``startup_query_interval``, ``startup_query_count``, ``robustness``, ``querier_timeout``, ``query_mrt``, ``query_interval``, ``last_member_qrt``, ``last_member_query_count``, ``group_timeout``, ``report_llg``, and ``immediate_leave``.
+ - When ``state=absent``, all configs for ``oif_ps``, and ``oif_routemap`` will be removed.
+ - PIM must be enabled to use this module.
+ - This module is for Layer 3 interfaces.
+ - Route-map check not performed (same as CLI) check when configuring route-map with 'static-oif'
+ - If restart is set to true with other params set, the restart will happen last, i.e. after the configuration takes place. However, 'restart' itself is not idempotent as it is an action and not configuration.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_igmp_interface:
+ interface: ethernet1/32
+ startup_query_interval: 30
+ oif_ps:
+ - {prefix: 238.2.2.6}
+ - {source: 192.168.0.1, prefix: 238.2.2.5}
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>changed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>check to see if a change was made on the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>end_state</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of igmp interface configuration after module execution</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;startup_query_count&#x27;: &#x27;30&#x27;, &#x27;oif_ps&#x27;: [{&#x27;prefix&#x27;: &#x27;238.2.2.6&#x27;}, {&#x27;source&#x27;: &#x27;192.168.0.1&#x27;, &#x27;prefix&#x27;: &#x27;238.2.2.5&#x27;}]}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>existing</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of existing igmp_interface configuration</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;startup_query_count&#x27;: &#x27;2&#x27;, &#x27;oif_ps&#x27;: []}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>proposed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of parameters passed into module</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;startup_query_count&#x27;: &#x27;30&#x27;, &#x27;oif_ps&#x27;: [{&#x27;prefix&#x27;: &#x27;238.2.2.6&#x27;}, {&#x27;source&#x27;: &#x27;192.168.0.1&#x27;, &#x27;prefix&#x27;: &#x27;238.2.2.5&#x27;}]}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/32&#x27;, &#x27;ip igmp startup-query-count 30&#x27;, &#x27;ip igmp static-oif 238.2.2.6&#x27;, &#x27;ip igmp static-oif 238.2.2.5 source 192.168.0.1&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_igmp_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_igmp_module.rst
new file mode 100644
index 00000000..da41da28
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_igmp_module.rst
@@ -0,0 +1,424 @@
+.. _cisco.nxos.nxos_igmp_module:
+
+
+********************
+cisco.nxos.nxos_igmp
+********************
+
+**Manages IGMP global configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages IGMP global configuration configuration settings.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enforce_rtr_alert</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables or disables the enforce router alert option check for IGMPv2 and IGMPv3 packets.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flush_routes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Removes routes when the IGMP process is restarted. By default, routes are not flushed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Restarts the igmp process (using an exec config command).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manages desired state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - When ``state=default``, all supported params will be reset to a default state.
+ - If restart is set to true with other params set, the restart will happen last, i.e. after the configuration takes place.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Default igmp global params (all params except restart)
+ cisco.nxos.nxos_igmp:
+ state: default
+
+ - name: Ensure the following igmp global config exists on the device
+ cisco.nxos.nxos_igmp:
+ flush_routes: true
+ enforce_rtr_alert: true
+
+ - name: Restart the igmp process
+ cisco.nxos.nxos_igmp:
+ restart: true
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ip igmp flush-routes&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_igmp_snooping_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_igmp_snooping_module.rst
new file mode 100644
index 00000000..08d6e321
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_igmp_snooping_module.rst
@@ -0,0 +1,458 @@
+.. _cisco.nxos.nxos_igmp_snooping_module:
+
+
+*****************************
+cisco.nxos.nxos_igmp_snooping
+*****************************
+
+**Manages IGMP snooping global configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages IGMP snooping global configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Group membership timeout value for all VLANs on the device. Accepted values are integer in range 1-10080, <em>never</em> and <em>default</em>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>link_local_grp_supp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Global link-local groups suppression.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>report_supp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Global IGMPv1/IGMPv2 Report Suppression.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>snooping</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables/disables IGMP snooping on the switch.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>v3_report_supp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Global IGMPv3 Report Suppression and Proxy Reporting.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - When ``state=default``, params will be reset to a default state.
+ - ``group_timeout`` also accepts *never* as an input.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # ensure igmp snooping params supported in this module are in there default state
+ - cisco.nxos.nxos_igmp_snooping:
+ state: default
+
+ # ensure following igmp snooping params are in the desired state
+ - cisco.nxos.nxos_igmp_snooping:
+ group_timeout: never
+ snooping: true
+ link_local_grp_supp: false
+ optimize_mcast_flood: false
+ report_supp: true
+ v3_report_supp: true
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ip igmp snooping link-local-groups-suppression&#x27;, &#x27;ip igmp snooping group-timeout 50&#x27;, &#x27;no ip igmp snooping report-suppression&#x27;, &#x27;no ip igmp snooping v3-report-suppression&#x27;, &#x27;no ip igmp snooping&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_install_os_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_install_os_module.rst
new file mode 100644
index 00000000..af745704
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_install_os_module.rst
@@ -0,0 +1,416 @@
+.. _cisco.nxos.nxos_install_os_module:
+
+
+**************************
+cisco.nxos.nxos_install_os
+**************************
+
+**Set boot options like boot, kickstart image and issu.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Install an operating system by setting the boot options like boot image and kickstart image and optionally select to install using ISSU (In Server Software Upgrade).
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>issu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>required</li>
+ <li>desired</li>
+ <li>yes</li>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Upgrade using In Service Software Upgrade (ISSU). (Supported on N5k, N7k, N9k platforms)</div>
+ <div>Selecting &#x27;required&#x27; or &#x27;yes&#x27; means that upgrades will only proceed if the switch is capable of ISSU.</div>
+ <div>Selecting &#x27;desired&#x27; means that upgrades will use ISSU if possible but will fall back to disruptive upgrade if needed.</div>
+ <div>Selecting &#x27;no&#x27; means do not use ISSU. Forced disruptive.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>kickstart_image_file</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the kickstart image file on flash. (Not required on all Nexus platforms)</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_image_file</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the system (or combined) image file on flash.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against the following platforms and images - N9k 7.0(3)I4(6), 7.0(3)I5(3), 7.0(3)I6(1), 7.0(3)I7(1), 7.0(3)F2(2), 7.0(3)F3(2) - N3k 6.0(2)A8(6), 6.0(2)A8(8), 7.0(3)I6(1), 7.0(3)I7(1) - N7k 7.3(0)D1(1), 8.0(1), 8.1(1), 8.2(1)
+ - This module requires both the ANSIBLE_PERSISTENT_CONNECT_TIMEOUT and ANSIBLE_PERSISTENT_COMMAND_TIMEOUT timers to be set to 600 seconds or higher. The module will exit if the timers are not set properly.
+ - When using connection local, ANSIBLE_PERSISTENT_CONNECT_TIMEOUT and ANSIBLE_PERSISTENT_COMMAND_TIMEOUT can only be set using ENV variables or the ansible.cfg file.
+ - Do not include full file paths, just the name of the file(s) stored on the top level flash directory.
+ - This module attempts to install the software immediately, which may trigger a reboot.
+ - In check mode, the module will indicate if an upgrade is needed and whether or not the upgrade is disruptive or non-disruptive(ISSU).
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Install OS on N9k
+ check_mode: no
+ cisco.nxos.nxos_install_os:
+ system_image_file: nxos.7.0.3.I6.1.bin
+ issu: desired
+
+ - name: Wait for device to come back up with new image
+ wait_for:
+ port: 22
+ state: started
+ timeout: 500
+ delay: 60
+ host: '{{ inventory_hostname }}'
+
+ - name: Check installed OS for newly installed version
+ nxos_command:
+ commands: [show version | json]
+ provider: '{{ connection }}'
+ register: output
+ - assert:
+ that:
+ - output['stdout'][0]['kickstart_ver_str'] == '7.0(3)I6(1)'
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>install_state</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Boot and install information.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;install_state&#x27;: [&#x27;Compatibility check is done:&#x27;, &#x27;Module bootable Impact Install-type Reason&#x27;, &#x27;------ -------- -------------- ------------ ------&#x27;, &#x27; 1 yes non-disruptive reset &#x27;, &#x27;Images will be upgraded according to following table:&#x27;, &#x27;Module Image Running-Version(pri:alt) New-Version Upg-Required&#x27;, &#x27;------ ---------- ---------------------------------------- -------------------- ------------&#x27;, &#x27; 1 nxos 7.0(3)I6(1) 7.0(3)I7(1) yes&#x27;, &#x27; 1 bios v4.4.0(07/12/2017) v4.4.0(07/12/2017) no&#x27;]}</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbibo (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_interface_module.rst
new file mode 100644
index 00000000..8c65c261
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_interface_module.rst
@@ -0,0 +1,1042 @@
+.. _cisco.nxos.nxos_interface_module:
+
+
+*************************
+cisco.nxos.nxos_interface
+*************************
+
+**(deprecated, removed after 2022-06-01) Manages physical attributes of interfaces.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Updated modules released with more functionality
+:Alternative: nxos_interfaces
+
+
+
+Synopsis
+--------
+- Manages physical attributes of interfaces of NX-OS switches.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>up</b>&nbsp;&larr;</div></li>
+ <li>down</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administrative state of the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of Interfaces definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>up</li>
+ <li>down</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administrative state of the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state arguments.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface description.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>duplex</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>full</li>
+ <li>half</li>
+ <li>auto</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interface link status. Applicable for ethernet interface only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fabric_forwarding_anycast_gateway</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Associate SVI with anycast gateway under VLAN configuration mode. Applicable for SVI interface only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>loopback</li>
+ <li>portchannel</li>
+ <li>svi</li>
+ <li>nve</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interface type to be unconfigured from the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ip_forward</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable ip forward feature on SVIs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>layer2</li>
+ <li>layer3</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage Layer 2 or Layer 3 state of the interface. This option is supported for ethernet and portchannel interface. Applicable for ethernet and portchannel interface only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MTU for a specific interface. Must be an even number between 576 and 9216. Applicable for ethernet interface only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of interface, i.e. Ethernet1/1, port-channel10.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbors</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Check the operational state of given interface <code>name</code> for LLDP neighbor.</div>
+ <div>The following suboptions are available. This is state check parameter only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LLDP neighbor host for given interface <code>name</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LLDP neighbor port to which given interface <code>name</code> is connected.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rx_rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Receiver rate in bits per second (bps).</div>
+ <div>This is state check parameter only.</div>
+ <div>Supports conditionals, see <a href='../network/user_guide/network_working_with_command_output.html'>Conditionals in Networking Modules</a></div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>speed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface link speed. Applicable for ethernet interface only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify desired state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tx_rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Transmit rate in bits per second (bps).</div>
+ <div>This is state check parameter only.</div>
+ <div>Supports conditionals, see <a href='../network/user_guide/network_working_with_command_output.html'>Conditionals in Networking Modules</a></div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">10</div>
+ </td>
+ <td>
+ <div>Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state arguments.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface description.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>duplex</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>full</li>
+ <li>half</li>
+ <li>auto</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interface link status. Applicable for ethernet interface only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fabric_forwarding_anycast_gateway</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Associate SVI with anycast gateway under VLAN configuration mode. Applicable for SVI interface only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>loopback</li>
+ <li>portchannel</li>
+ <li>svi</li>
+ <li>nve</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interface type to be unconfigured from the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ip_forward</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable ip forward feature on SVIs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>layer2</li>
+ <li>layer3</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage Layer 2 or Layer 3 state of the interface. This option is supported for ethernet and portchannel interface. Applicable for ethernet and portchannel interface only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MTU for a specific interface. Must be an even number between 576 and 9216. Applicable for ethernet interface only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of interface, i.e. Ethernet1/1, port-channel10.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbors</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Check the operational state of given interface <code>name</code> for LLDP neighbor.</div>
+ <div>The following suboptions are available. This is state check parameter only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LLDP neighbor host for given interface <code>name</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LLDP neighbor port to which given interface <code>name</code> is connected.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rx_rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Receiver rate in bits per second (bps).</div>
+ <div>This is state check parameter only.</div>
+ <div>Supports conditionals, see <a href='../network/user_guide/network_working_with_command_output.html'>Conditionals in Networking Modules</a></div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>speed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface link speed. Applicable for ethernet interface only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify desired state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tx_rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Transmit rate in bits per second (bps).</div>
+ <div>This is state check parameter only.</div>
+ <div>Supports conditionals, see <a href='../network/user_guide/network_working_with_command_output.html'>Conditionals in Networking Modules</a></div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - This module is also used to create logical interfaces such as svis and loopbacks.
+ - Be cautious of platform specific idiosyncrasies. For example, when you default a loopback interface, the admin state toggles on certain versions of NX-OS.
+ - The :ref:`cisco.nxos.nxos_overlay_global <cisco.nxos.nxos_overlay_global_module>` ``anycast_gateway_mac`` attribute must be set before setting the ``fabric_forwarding_anycast_gateway`` property.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Ensure an interface is a Layer 3 port and that it has the proper description
+ cisco.nxos.nxos_interface:
+ name: Ethernet1/1
+ description: Configured by Ansible
+ mode: layer3
+
+ - name: Admin down an interface
+ cisco.nxos.nxos_interface:
+ name: Ethernet2/1
+ admin_state: down
+
+ - name: Remove all loopback interfaces
+ cisco.nxos.nxos_interface:
+ name: loopback
+ state: absent
+
+ - name: Remove all logical interfaces
+ cisco.nxos.nxos_interface:
+ interface_type: '{{ item }} '
+ state: absent
+ loop:
+ - loopback
+ - portchannel
+ - svi
+ - nve
+
+ - name: Admin up all loopback interfaces
+ cisco.nxos.nxos_interface:
+ name: loopback 0-1023
+ admin_state: up
+
+ - name: Admin down all loopback interfaces
+ cisco.nxos.nxos_interface:
+ name: loopback 0-1023
+ admin_state: down
+
+ - name: Check neighbors intent arguments
+ cisco.nxos.nxos_interface:
+ name: Ethernet2/3
+ neighbors:
+ - port: Ethernet2/3
+ host: abc.mycompany.com
+
+ - name: Add interface using aggregate
+ cisco.nxos.nxos_interface:
+ aggregate:
+ - {name: Ethernet0/1, mtu: 256, description: test-interface-1}
+ - {name: Ethernet0/2, mtu: 516, description: test-interface-2}
+ duplex: full
+ speed: 100
+ state: present
+
+ - name: Delete interface using aggregate
+ cisco.nxos.nxos_interface:
+ aggregate:
+ - name: Loopback9
+ - name: Loopback10
+ state: absent
+
+ - name: Check intent arguments
+ cisco.nxos.nxos_interface:
+ name: Ethernet0/2
+ state: up
+ tx_rate: ge(0)
+ rx_rate: le(0)
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command list sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet2/3&#x27;, &#x27;mtu 1500&#x27;, &#x27;speed 10&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_interface_ospf_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_interface_ospf_module.rst
new file mode 100644
index 00000000..e16f84c6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_interface_ospf_module.rst
@@ -0,0 +1,622 @@
+.. _cisco.nxos.nxos_interface_ospf_module:
+
+
+******************************
+cisco.nxos.nxos_interface_ospf
+******************************
+
+**(deprecated, removed after 2022-10-26) Manages configuration of an OSPF interface instance.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-10-26
+:Why: Updated modules released with more functionality
+:Alternative: nxos_ospf_interfaces
+
+
+
+Synopsis
+--------
+- Manages configuration of an OSPF interface instance.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Ospf area associated with this cisco_interface_ospf instance. Valid values are a string, formatted as an IP address (i.e. &quot;0.0.0.0&quot;) or as an integer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables bfd at interface level. This overrides the bfd variable set at the ospf router level.</div>
+ <div>Valid values are &#x27;enable&#x27;, &#x27;disable&#x27; or &#x27;default&#x27;.</div>
+ <div>Dependency: &#x27;&#x27;feature bfd&#x27;&#x27;</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The cost associated with this cisco_interface_ospf instance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dead_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time interval an ospf neighbor waits for a hello packet before tearing down adjacencies. Valid values are an integer or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time between sending successive hello packets. Valid values are an integer or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of this cisco_interface resource. Valid value is a string.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables or disables the usage of message digest authentication.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest_algorithm_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>md5</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Algorithm used for authentication among neighboring routers within an area. Valid values are &#x27;md5&#x27; and &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest_encryption_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>cisco_type_7</li>
+ <li>3des</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the scheme used for encrypting message_digest_password. Valid values are &#x27;3des&#x27; or &#x27;cisco_type_7&#x27; encryption or &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest_key_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Md5 authentication key-id associated with the ospf instance. If this is present, message_digest_encryption_type, message_digest_algorithm_type and message_digest_password are mandatory. Valid value is an integer and &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the message_digest password. Valid value is a string.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>point-to-point</li>
+ <li>broadcast</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies interface ospf network type. Valid values are &#x27;point-to-point&#x27; or &#x27;broadcast&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ospf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the ospf instance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable or disable passive-interface state on this interface. true - (enable) Prevent OSPF from establishing an adjacency or sending routing updates on this interface. false - (disable) Override global &#x27;passive-interface default&#x27; for this interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines whether the config should be present or not on the device.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - Default, where supported, restores params default value.
+ - To remove an existing authentication configuration you should use ``message_digest_key_id=default`` plus all other options matching their existing values.
+ - Loopback interfaces only support ospf network type 'point-to-point'.
+ - ``state=absent`` removes the whole OSPF interface configuration.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_interface_ospf:
+ interface: ethernet1/32
+ ospf: 1
+ area: 1
+ bfd: disable
+ cost: default
+
+ - cisco.nxos.nxos_interface_ospf:
+ interface: loopback0
+ ospf: prod
+ area: 0.0.0.0
+ bfd: enable
+ network: point-to-point
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/32&#x27;, &#x27;ip router ospf 1 area 0.0.0.1&#x27;, &#x27;ip ospf bfd disable&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_interfaces_module.rst
new file mode 100644
index 00000000..773a1951
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_interfaces_module.rst
@@ -0,0 +1,576 @@
+.. _cisco.nxos.nxos_interfaces_module:
+
+
+**************************
+cisco.nxos.nxos_interfaces
+**************************
+
+**Interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages the interface attributes of NX-OS interfaces.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of interface options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface description.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>duplex</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>full</li>
+ <li>half</li>
+ <li>auto</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interface link status. Applicable for Ethernet interfaces only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administrative state of the interface. Set the value to <code>true</code> to administratively enable the interface or <code>false</code> to disable it</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>fabric_forwarding_anycast_gateway</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Associate SVI with anycast gateway under VLAN configuration mode. Applicable for SVI interfaces only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ip_forward</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable or disable IP forward feature on SVIs. Set the value to <code>true</code> to enable or <code>false</code> to disable.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>layer2</li>
+ <li>layer3</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage Layer2 or Layer3 state of the interface. Applicable for Ethernet and port channel interfaces only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MTU for a specific interface. Must be an even number between 576 and 9216. Applicable for Ethernet interfaces only.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of interface, e.g. Ethernet1/1, port-channel10.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>speed</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface link speed. Applicable for Ethernet interfaces only.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section ^interface</b></div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion</div>
+ <div>The state <em>rendered</em> considers the system default mode for interfaces to be &quot;Layer 3&quot; and the system default state for interfaces to be shutdown.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOS 7.3.(0)D1(1) on VIRL
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/1
+ # description testing
+ # mtu 1800
+
+ - name: Merge provided configuration with device configuration
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: Ethernet1/1
+ description: Configured by Ansible
+ enabled: true
+ - name: Ethernet1/2
+ description: Configured by Ansible Network
+ enabled: false
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/1
+ # description Configured by Ansible
+ # no shutdown
+ # mtu 1800
+ # interface Ethernet2
+ # description Configured by Ansible Network
+ # shutdown
+
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/1
+ # description Interface 1/1
+ # interface Ethernet1/2
+
+ - name: Replaces device configuration of listed interfaces with provided configuration
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: Ethernet1/1
+ description: Configured by Ansible
+ enabled: true
+ mtu: 2000
+ - name: Ethernet1/2
+ description: Configured by Ansible Network
+ enabled: false
+ mode: layer2
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/1
+ # description Configured by Ansible
+ # no shutdown
+ # mtu 1500
+ # interface Ethernet2/2
+ # description Configured by Ansible Network
+ # shutdown
+ # switchport
+
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/1
+ # description Interface Ethernet1/1
+ # interface Ethernet1/2
+ # interface mgmt0
+ # description Management interface
+ # ip address dhcp
+
+ - name: Override device configuration of all interfaces with provided configuration
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: Ethernet1/1
+ enabled: true
+ - name: Ethernet1/2
+ description: Configured by Ansible Network
+ enabled: false
+ state: overridden
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/1
+ # interface Ethernet1/2
+ # description Configured by Ansible Network
+ # shutdown
+ # interface mgmt0
+ # ip address dhcp
+
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/1
+ # description Interface Ethernet1/1
+ # interface Ethernet1/2
+ # interface mgmt0
+ # description Management interface
+ # ip address dhcp
+
+ - name: Delete or return interface parameters to default settings
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: Ethernet1/1
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/1
+ # interface Ethernet1/2
+ # interface mgmt0
+ # description Management interface
+ # ip address dhcp
+
+ # Using rendered
+
+ - name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: Ethernet1/1
+ description: outbound-intf
+ mode: layer3
+ speed: 100
+ - name: Ethernet1/2
+ mode: layer2
+ enabled: true
+ duplex: full
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # rendered:
+ # - "interface Ethernet1/1"
+ # - "description outbound-intf"
+ # - "speed 100"
+ # - "interface Ethernet1/2"
+ # - "switchport"
+ # - "duplex full"
+ # - "no shutdown"
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # interface Ethernet1/800
+ # description test-1
+ # speed 1000
+ # shutdown
+ # no switchport
+ # duplex half
+ # interface Ethernet1/801
+ # description test-2
+ # switchport
+ # no shutdown
+ # mtu 1800
+
+ - name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+ # parsed:
+ # - description: "test-1"
+ # duplex: "half"
+ # enabled: false
+ # mode: "layer3"
+ # name: "Ethernet1/800"
+ # speed: "1000"
+ #
+ # - description: "test-2"
+ # enabled: true
+ # mode: "layer2"
+ # mtu: "1800"
+ # name: "Ethernet1/801"
+
+ # Using gathered
+
+ # Existing device config state
+ # -----------------------------
+ # interface Ethernet1/1
+ # description outbound-intf
+ # switchport
+ # no shutdown
+ # interface Ethernet1/2
+ # description intf-l3
+ # speed 1000
+ # interface Ethernet1/3
+ # interface Ethernet1/4
+ # interface Ethernet1/5
+
+ - name: Gather interfaces facts from the device using nxos_interfaces
+ cisco.nxos.nxos_interfaces:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+ # - name: Ethernet1/1
+ # description: outbound-intf
+ # mode: layer2
+ # enabled: True
+ # - name: Ethernet1/2
+ # description: intf-l3
+ # speed: "1000"
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/1&#x27;, &#x27;mtu 1800&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l2_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l2_interface_module.rst
new file mode 100644
index 00000000..ad549cf2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l2_interface_module.rst
@@ -0,0 +1,639 @@
+.. _cisco.nxos.nxos_l2_interface_module:
+
+
+****************************
+cisco.nxos.nxos_l2_interface
+****************************
+
+**(deprecated, removed after 2022-06-01) Manage Layer-2 interface on Cisco NXOS devices.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Updated modules released with more functionality
+:Alternative: nxos_l2_interfaces
+
+
+
+Synopsis
+--------
+- This module provides declarative management of Layer-2 interface on Cisco NXOS devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>access_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure given VLAN in access port. If <code>mode=access</code>, used as the access VLAN ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of Layer-2 interface definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>access_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure given VLAN in access port. If <code>mode=access</code>, used as the access VLAN ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>access</li>
+ <li>trunk</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mode in which interface needs to be configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface excluding any logical unit number, i.e. Ethernet1/1.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>native_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Native VLAN to be configured in trunk port. If <code>mode=trunk</code>, used as the trunk native VLAN ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ <li>unconfigured</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the Layer-2 Interface configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trunk_allowed_vlans</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of allowed VLANs in a given trunk port. If <code>mode=trunk</code>, these are the only VLANs that will be configured on the trunk, i.e. &quot;2-10,15&quot;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trunk_vlans</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of VLANs to be configured in trunk port. If <code>mode=trunk</code>, used as the VLAN range to ADD or REMOVE from the trunk.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: trunk_add_vlans</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>access</li>
+ <li>trunk</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mode in which interface needs to be configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface excluding any logical unit number, i.e. Ethernet1/1.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>native_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Native VLAN to be configured in trunk port. If <code>mode=trunk</code>, used as the trunk native VLAN ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ <li>unconfigured</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the Layer-2 Interface configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trunk_allowed_vlans</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of allowed VLANs in a given trunk port. If <code>mode=trunk</code>, these are the only VLANs that will be configured on the trunk, i.e. &quot;2-10,15&quot;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trunk_vlans</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of VLANs to be configured in trunk port. If <code>mode=trunk</code>, used as the VLAN range to ADD or REMOVE from the trunk.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: trunk_add_vlans</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.0(3)I5(1).
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Ensure Eth1/5 is in its default l2 interface state
+ cisco.nxos.nxos_l2_interface:
+ name: Ethernet1/5
+ state: unconfigured
+
+ - name: Ensure Eth1/5 is configured for access vlan 20
+ cisco.nxos.nxos_l2_interface:
+ name: Ethernet1/5
+ mode: access
+ access_vlan: 20
+
+ - name: Ensure Eth1/5 only has vlans 5-10 as trunk vlans
+ cisco.nxos.nxos_l2_interface:
+ name: Ethernet1/5
+ mode: trunk
+ native_vlan: 10
+ trunk_vlans: 5-10
+
+ - name: Ensure eth1/5 is a trunk port and ensure 2-50 are being tagged (doesn't mean
+ others aren't also being tagged)
+ cisco.nxos.nxos_l2_interface:
+ name: Ethernet1/5
+ mode: trunk
+ native_vlan: 10
+ trunk_vlans: 2-50
+
+ - name: Ensure these VLANs are not being tagged on the trunk
+ cisco.nxos.nxos_l2_interface:
+ name: Ethernet1/5
+ mode: trunk
+ trunk_vlans: 51-4094
+ state: absent
+
+ - name: Aggregate Configure interfaces for access_vlan with aggregate
+ cisco.nxos.nxos_l2_interface:
+ aggregate:
+ - {name: Ethernet1/2, access_vlan: 6}
+ - {name: Ethernet1/7, access_vlan: 15}
+ mode: access
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always, except for the platforms that use Netconf transport to manage the device.</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface eth1/5&#x27;, &#x27;switchport access vlan 20&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l2_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l2_interfaces_module.rst
new file mode 100644
index 00000000..81380ced
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l2_interfaces_module.rst
@@ -0,0 +1,537 @@
+.. _cisco.nxos.nxos_l2_interfaces_module:
+
+
+*****************************
+cisco.nxos.nxos_l2_interfaces
+*****************************
+
+**L2 interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages Layer-2 interfaces attributes of NX-OS Interfaces.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of Layer-2 interface options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>access</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Switchport mode access command to configure the interface as a Layer-2 access.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure given VLAN in access port. It&#x27;s used as the access VLAN ID.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>access</li>
+ <li>trunk</li>
+ <li>fex-fabric</li>
+ <li>fabricpath</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mode in which interface needs to be configured.</div>
+ <div>Access mode is not shown in interface facts, so idempotency will not be maintained for switchport mode access and every time the output will come as changed=True.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of interface, i.e. Ethernet1/1.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trunk</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Switchport mode trunk command to configure the interface as a Layer-2 trunk.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>allowed_vlans</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of allowed VLANs in a given trunk port. These are the only VLANs that will be configured on the trunk.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>native_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Native VLAN to be configured in trunk port. It is used as the trunk native VLAN ID.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section ^interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOS 7.3.(0)D1(1) on VIRL
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/1
+ # switchport access vlan 20
+ # interface Ethernet1/2
+ # switchport trunk native vlan 20
+ # interface mgmt0
+ # ip address dhcp
+ # ipv6 address auto-config
+
+ - name: Merge provided configuration with device configuration.
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: Ethernet1/1
+ trunk:
+ native_vlan: 10
+ allowed_vlans: 2,4,15
+ - name: Ethernet1/2
+ access:
+ vlan: 30
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/1
+ # switchport trunk native vlan 10
+ # switchport trunk allowed vlans 2,4,15
+ # interface Ethernet1/2
+ # switchport access vlan 30
+ # interface mgmt0
+ # ip address dhcp
+ # ipv6 address auto-config
+
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/1
+ # switchport access vlan 20
+ # interface Ethernet1/2
+ # switchport trunk native vlan 20
+ # interface mgmt0
+ # ip address dhcp
+ # ipv6 address auto-config
+
+ - name: Replace device configuration of specified L2 interfaces with provided configuration.
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: Ethernet1/1
+ trunk:
+ native_vlan: 20
+ allowed_vlans: 5-10, 15
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/1
+ # switchport trunk native vlan 20
+ # switchport trunk allowed vlan 5-10,15
+ # interface Ethernet1/2
+ # switchport trunk native vlan 20
+ # switchport mode trunk
+ # interface mgmt0
+ # ip address dhcp
+ # ipv6 address auto-config
+
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/1
+ # switchport access vlan 20
+ # interface Ethernet1/2
+ # switchport trunk native vlan 20
+ # interface mgmt0
+ # ip address dhcp
+ # ipv6 address auto-config
+
+ - name: Override device configuration of all L2 interfaces on device with provided
+ configuration.
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: Ethernet1/2
+ access:
+ vlan: 30
+ state: overridden
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/1
+ # interface Ethernet1/2
+ # switchport access vlan 30
+ # interface mgmt0
+ # ip address dhcp
+ # ipv6 address auto-config
+
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/1
+ # switchport access vlan 20
+ # interface Ethernet1/2
+ # switchport trunk native vlan 20
+ # interface mgmt0
+ # ip address dhcp
+ # ipv6 address auto-config
+
+ - name: Delete L2 attributes of given interfaces (Note This won't delete the interface
+ itself).
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: Ethernet1/1
+ - name: Ethernet1/2
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/1
+ # interface Ethernet1/2
+ # interface mgmt0
+ # ip address dhcp
+ # ipv6 address auto-config
+
+ # Using rendered
+
+ - name: Render platform specific configuration lines (without connecting to the device)
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: Ethernet1/1
+ trunk:
+ native_vlan: 10
+ allowed_vlans: 2,4,15
+ - name: Ethernet1/2
+ access:
+ vlan: 30
+ - name: Ethernet1/3
+ trunk:
+ native_vlan: 20
+ allowed_vlans: 5-10, 15
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # rendered:
+ # - "interface Ethernet1/1"
+ # - "switchport trunk allowed vlan 2,4,15"
+ # - "switchport trunk native vlan 10"
+ # - "interface Ethernet1/2"
+ # - "switchport access vlan 30"
+ # - "interface Ethernet1/3"
+ # - "switchport trunk allowed vlan 5,6,7,8,9,10,15"
+ # - "switchport trunk native vlan 20"
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # interface Ethernet1/800
+ # switchport access vlan 18
+ # switchport trunk allowed vlan 210
+ # interface Ethernet1/801
+ # switchport trunk allowed vlan 2,4,15
+
+ - name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_l2_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+ # parsed:
+ # - name: Ethernet1/800
+ # access:
+ # vlan: 18
+ # trunk:
+ # allowed_vlans: "210"
+ # - name: Ethernet1/801
+ # trunk:
+ # allowed_vlans: "2,4,15"
+
+ # Using gathered
+
+ # Existing device config state
+ # -------------------------------
+ # Nexus9kvI5# sh running-config | section ^interface
+ # interface Ethernet1/1
+ # switchport access vlan 6
+ # switchport trunk allowed vlan 200
+ # interface Ethernet1/2
+ # switchport trunk native vlan 10
+
+ - name: Gather l2_interfaces facts from the device using nxos_l2_interfaces
+ cisco.nxos.nxos_l2_interfaces:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+ # gathered:
+ # - name: "Ethernet1/1"
+ # access:
+ # vlan: 6
+ # trunk:
+ # allowed_vlans: "200"
+ #
+ # - name: "Ethernet1/2"
+ # trunk:
+ # native_vlan: 10
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/1&#x27;, &#x27;switchport trunk allowed vlan 2,4,15&#x27;, &#x27;switchport trunk native vlan 10&#x27;, &#x27;interface Ethernet1/2&#x27;, &#x27;switchport access vlan 30&#x27;, &#x27;interface Ethernet1/3&#x27;, &#x27;switchport trunk allowed vlan 5,6,7,8,9,10,15&#x27;, &#x27;switchport trunk native vlan 20&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l3_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l3_interface_module.rst
new file mode 100644
index 00000000..0367172c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l3_interface_module.rst
@@ -0,0 +1,515 @@
+.. _cisco.nxos.nxos_l3_interface_module:
+
+
+****************************
+cisco.nxos.nxos_l3_interface
+****************************
+
+**(deprecated, removed after 2022-06-01) Manage L3 interfaces on Cisco NXOS network devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Updated modules released with more functionality
+:Alternative: nxos_l3_interfaces
+
+
+
+Synopsis
+--------
+- This module provides declarative management of L3 interfaces on Cisco NXOS network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of L3 interfaces definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv4 of the L3 interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 of the L3 interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the L3 interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the L3 interface configuration.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv4 of the L3 interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 of the L3 interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the L3 interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the L3 interface configuration.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.0(3)I5(1).
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Set interface IPv4 address
+ cisco.nxos.nxos_l3_interface:
+ name: Ethernet2/3
+ ipv4: 192.168.0.1/24
+
+ - name: Remove interface IPv4 address
+ cisco.nxos.nxos_l3_interface:
+ name: Ethernet2/3
+ state: absent
+
+ - name: Set IP addresses on aggregate
+ cisco.nxos.nxos_l3_interface:
+ aggregate:
+ - {name: Ethernet2/1, ipv4: 192.168.2.10/24}
+ - {name: Ethernet2/5, ipv4: 192.168.3.10/24, ipv6: fd5d:12c9:2201:1::1/64}
+
+ - name: Remove IP addresses on aggregate
+ cisco.nxos.nxos_l3_interface:
+ aggregate:
+ - {name: Ethernet2/1, ipv4: 192.168.2.10/24}
+ - {name: Ethernet2/5, ipv4: 192.168.3.10/24, ipv6: fd5d:12c9:2201:1::1/64}
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always, except for the platforms that use Netconf transport to manage the device.</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface ethernet2/3&#x27;, &#x27;no switchport&#x27;, &#x27;ip address 192.168.22.1/24&#x27;, &#x27;ipv6 address &quot;fd5d:12c9:2201:1::1/64&quot;&#x27;, &#x27;no ip address 192.168.22.1/24&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l3_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l3_interfaces_module.rst
new file mode 100644
index 00000000..c312b11e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_l3_interfaces_module.rst
@@ -0,0 +1,620 @@
+.. _cisco.nxos.nxos_l3_interfaces_module:
+
+
+*****************************
+cisco.nxos.nxos_l3_interfaces
+*****************************
+
+**L3 interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages Layer-3 interfaces attributes of NX-OS Interfaces.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of Layer-3 interface options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dot1q</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures IEEE 802.1Q VLAN encapsulation on a subinterface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>evpn_multisite_tracking</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ <div style="font-style: italic; font-size: small; color: darkgreen">added in 1.1.0</div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>fabric-tracking</li>
+ <li>dci-tracking</li>
+ </ul>
+ </td>
+ <td>
+ <div>VxLAN evpn multisite Interface tracking. Supported only on selected model.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv4 address and attributes of the L3 interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPV4 address of the L3 interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>secondary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>A boolean attribute to manage addition of secondary IP address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>URIB route tag value for local/direct routes.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ipv6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 address and attributes of the L3 interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPV6 address of the L3 interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>URIB route tag value for local/direct routes.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of L3 interface, i.e. Ethernet1/1.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redirects</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables/disables ip redirects</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unreachables</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables/disables ip redirects</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section &#x27;^interface&#x27;</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion.</div>
+ <div>The state <em>overridden</em> would override the IP address configuration of all interfaces on the device with the provided configuration in the task. Use caution with this state as you may loose access to the device.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOS 7.3.(0)D1(1) on VIRL
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/6
+
+ - name: Merge provided configuration with device configuration.
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: Ethernet1/6
+ ipv4:
+ - address: 192.168.1.1/24
+ tag: 5
+ - address: 10.1.1.1/24
+ secondary: true
+ tag: 10
+ ipv6:
+ - address: fd5d:12c9:2201:2::1/64
+ tag: 6
+ - name: Ethernet1/7.42
+ dot1q: 42
+ redirects: false
+ unreachables: false
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/6
+ # ip address 192.168.22.1/24 tag 5
+ # ip address 10.1.1.1/24 secondary tag 10
+ # interface Ethernet1/6
+ # ipv6 address fd5d:12c9:2201:2::1/64 tag 6
+ # interface Ethernet1/7.42
+ # encapsulation dot1q 42
+ # no ip redirects
+ # no ip unreachables
+
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/6
+ # ip address 192.168.22.1/24
+ # ipv6 address "fd5d:12c9:2201:1::1/64"
+
+ - name: Replace device configuration of specified L3 interfaces with provided configuration.
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: Ethernet1/6
+ ipv4:
+ - address: 192.168.22.3/24
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/6
+ # ip address 192.168.22.3/24
+
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/2
+ # ip address 192.168.22.1/24
+ # interface Ethernet1/6
+ # ipv6 address "fd5d:12c9:2201:1::1/64"
+
+ - name: Override device configuration of all L3 interfaces on device with provided
+ configuration.
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: Ethernet1/2
+ ipv4: 192.168.22.3/4
+ state: overridden
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/2
+ # ipv4 address 192.168.22.3/24
+ # interface Ethernet1/6
+
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/6
+ # ip address 192.168.22.1/24
+ # interface Ethernet1/2
+ # ipv6 address "fd5d:12c9:2201:1::1/64"
+
+ - name: Delete L3 attributes of given interfaces (This won't delete the interface
+ itself).
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: Ethernet1/6
+ - name: Ethernet1/2
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/6
+ # interface Ethernet1/2
+
+ # Using rendered
+
+ - name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: Ethernet1/800
+ ipv4:
+ - address: 192.168.1.100/24
+ tag: 5
+ - address: 10.1.1.1/24
+ secondary: true
+ tag: 10
+ - name: Ethernet1/800
+ ipv6:
+ - address: fd5d:12c9:2201:2::1/64
+ tag: 6
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # rendered:
+ # - "interface Ethernet1/800"
+ # - "ip address 192.168.1.100/24 tag 5"
+ # - "ip address 10.1.1.1/24 secondary tag 10"
+ # - "interface Ethernet1/800"
+ # - "ipv6 address fd5d:12c9:2201:2::1/64 tag 6"
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # interface Ethernet1/800
+ # ip address 192.168.1.100/24 tag 5
+ # ip address 10.1.1.1/24 secondary tag 10
+ # no ip redirects
+ # interface Ethernet1/801
+ # ipv6 address fd5d:12c9:2201:2::1/64 tag 6
+ # ip unreachables
+ # interface mgmt0
+ # ip address dhcp
+ # vrf member management
+
+ - name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_l3_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+
+ # parsed:
+ # - name: Ethernet1/800
+ # ipv4:
+ # - address: 192.168.1.100/24
+ # tag: 5
+ # - address: 10.1.1.1/24
+ # secondary: True
+ # tag: 10
+ # redirects: False
+ # - name: Ethernet1/801
+ # ipv6:
+ # - address: fd5d:12c9:2201:2::1/64
+ # tag: 6
+ # unreachables: True
+
+ # Using gathered
+
+ # Existing device config state
+ # -------------------------------
+ # interface Ethernet1/1
+ # ip address 192.0.2.100/24
+ # interface Ethernet1/2
+ # no ip redirects
+ # ip address 203.0.113.10/24
+ # ip unreachables
+ # ipv6 address 2001:db8::1/32
+
+ - name: Gather l3_interfaces facts from the device using nxos_l3_interfaces
+ cisco.nxos.nxos_l3_interfaces:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+
+ # gathered:
+ # - name: Ethernet1/1
+ # ipv4:
+ # - address: 192.0.2.100/24
+ # - name: Ethernet1/2
+ # ipv4:
+ # - address: 203.0.113.10/24
+ # ipv6:
+ # - address: 2001:db8::1/32
+ # redirects: False
+ # unreachables: True
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/2&#x27;, &#x27;ip address 192.168.0.1/2&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lacp_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lacp_interfaces_module.rst
new file mode 100644
index 00000000..821ce616
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lacp_interfaces_module.rst
@@ -0,0 +1,575 @@
+.. _cisco.nxos.nxos_lacp_interfaces_module:
+
+
+*******************************
+cisco.nxos.nxos_lacp_interfaces
+*******************************
+
+**LACP interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages Link Aggregation Control Protocol (LACP) attributes of NX-OS Interfaces.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of LACP interfaces options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>convergence</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This dict contains configurable options related to convergence. Applicable only for Port-channel.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>port-channel lacp graceful convergence. Disable this only with lacp ports connected to Non-Nexus peer. Disabling this with Nexus peer can lead to port suspension.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vpc</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable lacp convergence for vPC port channels.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>links</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This dict contains configurable options related to max and min port-channel links. Applicable only for Port-channel.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Port-channel max bundle.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Port-channel min links.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>delay</li>
+ </ul>
+ </td>
+ <td>
+ <div>LACP mode. Applicable only for Port-channel.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LACP port priority for the interface. Range 1-65535. Applicable only for Ethernet.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>fast</li>
+ <li>normal</li>
+ </ul>
+ </td>
+ <td>
+ <div>Rate at which PDUs are sent by LACP. Applicable only for Ethernet. At fast rate LACP is transmitted once every 1 second. At normal rate LACP is transmitted every 30 seconds after the link is bundled.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suspend_individual</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>port-channel lacp state. Disabling this will cause lacp to put the port to individual state and not suspend the port in case it does not get LACP BPDU from the peer ports in the port-channel.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section ^interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOS 7.3.(0)D1(1) on VIRL
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+
+ - name: Merge provided configuration with device configuration.
+ cisco.nxos.nxos_lacp_interfaces:
+ config:
+ - name: Ethernet1/3
+ port_priority: 5
+ rate: fast
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/3
+ # lacp port-priority 5
+ # lacp rate fast
+
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/3
+ # lacp port-priority 5
+ # interface port-channel11
+ # lacp mode delay
+
+ - name: Replace device lacp interfaces configuration with the given configuration.
+ cisco.nxos.nxos_lacp_interfaces:
+ config:
+ - name: port-channel11
+ links:
+ min: 4
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/3
+ # lacp port-priority 5
+ # interface port-channel11
+ # lacp min-links 4
+
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/3
+ # lacp port-priority 5
+ # interface port-channel11
+ # lacp mode delay
+
+ - name: Override device configuration of all LACP interfaces attributes of given interfaces
+ on device with provided configuration.
+ cisco.nxos.nxos_lacp_interfaces:
+ config:
+ - name: port-channel11
+ links:
+ min: 4
+ state: overridden
+
+ # After state:
+ # ------------
+ #
+ # interface port-channel11
+ # lacp min-links 4
+
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/3
+ # lacp port-priority 5
+ # interface port-channel11
+ # lacp mode delay
+
+ - name: Delete LACP interfaces configurations.
+ cisco.nxos.nxos_lacp_interfaces:
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+
+ # Using rendered
+
+ - name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_lacp_interfaces:
+ config:
+ - name: Ethernet1/800
+ rate: fast
+ - name: Ethernet1/801
+ rate: fast
+ port_priority: 32
+ - name: port-channel10
+ links:
+ max: 15
+ min: 2
+ convergence:
+ graceful: true
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # rendered:
+ # - "interface Ethernet1/800"
+ # - "lacp rate fast"
+ # - "interface Ethernet1/801"
+ # - "lacp port-priority 32"
+ # - "lacp rate fast"
+ # - "interface port-channel10"
+ # - "lacp min-links 2"
+ # - "lacp max-bundle 15"
+ # - "lacp graceful-convergence"
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+
+ # interface port-channel10
+ # lacp min-links 10
+ # lacp max-bundle 15
+ # interface Ethernet1/800
+ # lacp port-priority 100
+ # lacp rate fast
+
+ - name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_lacp_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+
+ # parsed:
+ # - name: port-channel10
+ # links:
+ # max: 15
+ # min: 10
+ # - name: Ethernet1/800
+ # port_priority: 100
+ # rate: fast
+
+ # Using gathered
+
+ # Existing device config state
+ # -------------------------------
+ # interface Ethernet1/1
+ # lacp port-priority 5
+ # lacp rate fast
+ # interface port-channel10
+ # lacp mode delay
+ # interface port-channel11
+ # lacp max-bundle 10
+ # lacp min-links 5
+
+ - name: Gather lacp_interfaces facts from the device using nxos_lacp_interfaces
+ cisco.nxos.nxos_lacp_interfaces:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+ # gathered:
+ # - name: Ethernet1/1
+ # port_priority: 5
+ # rate: fast
+ # - name: port-channel10
+ # mode: delay
+ # - name: port-channel11
+ # links:
+ # max: 10
+ # min: 5
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface port-channel10&#x27;, &#x27;lacp min-links 5&#x27;, &#x27;lacp mode delay&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lacp_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lacp_module.rst
new file mode 100644
index 00000000..ba731feb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lacp_module.rst
@@ -0,0 +1,399 @@
+.. _cisco.nxos.nxos_lacp_module:
+
+
+********************
+cisco.nxos.nxos_lacp
+********************
+
+**LACP resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages Global Link Aggregation Control Protocol (LACP) on NX-OS devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="4">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LACP global options.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LACP system options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mac</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MAC address to be used for the LACP Protocol exchanges</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MAC-address (FORMAT :xxxx.xxxx.xxxx).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>role</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>primary</li>
+ <li>secondary</li>
+ </ul>
+ </td>
+ <td>
+ <div>The role for the Switch.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The system priority to use in LACP negotiations.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | include lacp</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOS 7.3.(0)D1(1) on VIRL.
+ - Feature lacp should be enabled for this module.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+
+ - name: Merge provided configuration with device configuration.
+ cisco.nxos.nxos_lacp:
+ config:
+ system:
+ priority: 10
+ mac:
+ address: 00c1.4c00.bd15
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # lacp system-priority 10
+ # lacp system-mac 00c1.4c00.bd15
+
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # lacp system-priority 10
+
+ - name: Replace device global lacp configuration with the given configuration.
+ cisco.nxos.nxos_lacp:
+ config:
+ system:
+ mac:
+ address: 00c1.4c00.bd15
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # lacp system-mac 00c1.4c00.bd15
+
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ #
+ # lacp system-priority 10
+
+ - name: Delete global LACP configurations.
+ cisco.nxos.nxos_lacp:
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+
+ # Using rendered
+
+ - name: Render platform specific configuration lines (without connecting to the device)
+ cisco.nxos.nxos_lacp:
+ config:
+ system:
+ priority: 10
+ mac:
+ address: 00c1.4c00.bd15
+ role: secondary
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # rendered:
+ # - "lacp system-priority 10"
+ # - "lacp system-mac 00c1.4c00.bd15 role secondary"
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # lacp system-priority 10
+ # lacp system-mac 00c1.4c00.bd15 role secondary
+
+ - name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_lacp:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+ # parsed:
+ # system:
+ # priority: 10
+ # mac:
+ # address: 00c1.4c00.bd15
+ # role: secondary
+
+ # Using gathered
+
+ # Existing device config state
+ # -------------------------------
+ # Nexus9000v# show running-config | include lacp
+ # lacp system-priority 11
+ # lacp system-mac 00c1.4c00.bd15 role primary
+
+ - name: Gather lacp facts from the device using nxos_lacp
+ cisco.nxos.nxos_lacp:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+ # gathered:
+ # system:
+ # priority: 11
+ # mac:
+ # address: 00c1.4c00.bd15
+ # role: primary
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;lacp system-priority 15&#x27;, &#x27;lacp system-mac 00c1.4c00.bd15 role primary&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lag_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lag_interfaces_module.rst
new file mode 100644
index 00000000..adf7514a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lag_interfaces_module.rst
@@ -0,0 +1,482 @@
+.. _cisco.nxos.nxos_lag_interfaces_module:
+
+
+******************************
+cisco.nxos.nxos_lag_interfaces
+******************************
+
+**LAG interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages attributes of link aggregation groups of NX-OS Interfaces.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of link aggregation group configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>members</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The list of interfaces that are part of the group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>force</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>When true it forces link aggregation group members to match what is declared in the members param. This can be used to remove members.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>member</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The interface name.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>active</li>
+ <li>on</li>
+ <li>passive</li>
+ </ul>
+ </td>
+ <td>
+ <div>Link aggregation group (LAG).</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the link aggregation group (LAG).</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section ^interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOS 7.3.(0)D1(1) on VIRL.
+ - This module works with connection ``network_cli``.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/4
+
+ - name: Merge provided configuration with device configuration.
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ - name: port-channel99
+ members:
+ - member: Ethernet1/4
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/4
+ # channel-group 99
+
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/4
+ # channel-group 99 mode active
+
+ - name: Replace device configuration of specified LAG attributes of given interfaces
+ with provided configuration.
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ - name: port-channel10
+ members:
+ - member: Ethernet1/4
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/4
+ # channel-group 10
+
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/4
+ # channel-group 10
+ # interface Ethernet1/2
+ # channel-group 99 mode passive
+
+ - name: Override device configuration of all LAG attributes of given interfaces on
+ device with provided configuration.
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ - name: port-channel20
+ members:
+ - member: Ethernet1/6
+ force: true
+ state: overridden
+
+ # After state:
+ # ------------
+ # interface Ethernet1/2
+ # interface Ethernet1/4
+ # interface Ethernet1/6
+ # channel-group 20 force
+
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ #
+ # interface Ethernet1/4
+ # channel-group 99 mode active
+
+ - name: Delete LAG attributes of given interface (This won't delete the port-channel
+ itself).
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ - port-channel: port-channel99
+ state: deleted
+
+ - name: Delete LAG attributes of all the interfaces
+ cisco.nxos.nxos_lag_interfaces:
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+ # interface Ethernet1/4
+ # no channel-group 99
+
+ # Using rendered
+
+ - name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ - name: port-channel10
+ members:
+ - member: Ethernet1/800
+ mode: active
+ - member: Ethernet1/801
+ - name: port-channel11
+ members:
+ - member: Ethernet1/802
+ mode: passive
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # rendered:
+ # - "interface Ethernet1/800"
+ # - "channel-group 10 mode active"
+ # - "interface Ethernet1/801"
+ # - "channel-group 10"
+ # - "interface Ethernet1/802"
+ # - "channel-group 11 mode passive"
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+
+ # interface port-channel10
+ # interface port-channel11
+ # interface port-channel12
+ # interface Ethernet1/800
+ # channel-group 10 mode active
+ # interface Ethernet1/801
+ # channel-group 10 mode active
+ # interface Ethernet1/802
+ # channel-group 11 mode passive
+ # interface Ethernet1/803
+ # channel-group 11 mode passive
+
+ - name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_lag_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+
+ # parsed:
+ # - members:
+ # - member: Ethernet1/800
+ # mode: active
+ # - member: Ethernet1/801
+ # mode: active
+ # name: port-channel10
+ #
+ # - members:
+ # - member: Ethernet1/802
+ # mode: passive
+ # - member: Ethernet1/803
+ # mode: passive
+ # name: port-channel11
+ #
+ # - name: port-channel12
+
+ # Using gathered
+
+ # Existing device config state
+ # -------------------------------
+ # interface port-channel10
+ # interface port-channel11
+ # interface Ethernet1/1
+ # channel-group 10 mode active
+ # interface Ethernet1/2
+ # channel-group 11 mode passive
+ #
+
+ - name: Gather lag_interfaces facts from the device using nxos_lag_interfaces
+ cisco.nxos.nxos_lag_interfaces:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+ # gathered:
+ # - name: port-channel10
+ # members:
+ # - member: Ethernet1/1
+ # mode: active
+ # - name: port-channel11
+ # members:
+ # - member: Ethernet1/2
+ # mode: passive
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/800&#x27;, &#x27;channel-group 10 mode active&#x27;, &#x27;interface Ethernet1/801&#x27;, &#x27;channel-group 10&#x27;, &#x27;interface Ethernet1/802&#x27;, &#x27;channel-group 11 mode passive&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
+- Nilashish Chakraborty (@NilashishC)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_linkagg_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_linkagg_module.rst
new file mode 100644
index 00000000..f9a2abe9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_linkagg_module.rst
@@ -0,0 +1,637 @@
+.. _cisco.nxos.nxos_linkagg_module:
+
+
+***********************
+cisco.nxos.nxos_linkagg
+***********************
+
+**(deprecated, removed after 2022-06-01) Manage link aggregation groups on Cisco NXOS devices.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Updated modules released with more functionality.
+:Alternative: nxos_lag_interfaces
+
+
+
+Synopsis
+--------
+- This module provides declarative management of link aggregation groups on Cisco NXOS devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of link aggregation definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>force</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>When true it forces link aggregation group members to match what is declared in the members param. This can be used to remove members.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Channel-group number for the port-channel Link aggregation group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>members</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of interfaces that will be managed in the link aggregation group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_links</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum number of ports required up before bringing up the link aggregation group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>active</li>
+ <li>on</li>
+ <li>passive</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mode for the link aggregation group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the link aggregation group.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>force</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>When true it forces link aggregation group members to match what is declared in the members param. This can be used to remove members.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Channel-group number for the port-channel Link aggregation group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>members</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of interfaces that will be managed in the link aggregation group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_links</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum number of ports required up before bringing up the link aggregation group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>active</li>
+ <li><div style="color: blue"><b>on</b>&nbsp;&larr;</div></li>
+ <li>passive</li>
+ </ul>
+ </td>
+ <td>
+ <div>Mode for the link aggregation group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>purge</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Purge links not defined in the <em>aggregate</em> parameter.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the link aggregation group.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.0(3)I5(1).
+ - ``state=absent`` removes the portchannel config and interface if it already exists. If members to be removed are not explicitly passed, all existing members (if any), are removed.
+ - Members must be a list.
+ - LACP needs to be enabled first if active/passive modes are used.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: create link aggregation group
+ cisco.nxos.nxos_linkagg:
+ group: 99
+ state: present
+
+ - name: delete link aggregation group
+ cisco.nxos.nxos_linkagg:
+ group: 99
+ state: absent
+
+ - name: set link aggregation group to members
+ cisco.nxos.nxos_linkagg:
+ group: 10
+ min_links: 3
+ mode: active
+ members:
+ - Ethernet1/2
+ - Ethernet1/4
+
+ - name: remove link aggregation group from Ethernet1/2
+ cisco.nxos.nxos_linkagg:
+ group: 10
+ min_links: 3
+ mode: active
+ members:
+ - Ethernet1/4
+
+ - name: Create aggregate of linkagg definitions
+ cisco.nxos.nxos_linkagg:
+ aggregate:
+ - {group: 3}
+ - {group: 100, min_links: 3}
+
+ - name: Remove aggregate of linkagg definitions
+ cisco.nxos.nxos_linkagg:
+ aggregate:
+ - {group: 3}
+ - {group: 100, min_links: 3}
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always, except for the platforms that use Netconf transport to manage the device.</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface port-channel 30&#x27;, &#x27;lacp min-links 5&#x27;, &#x27;interface Ethernet2/1&#x27;, &#x27;channel-group 30 mode active&#x27;, &#x27;no interface port-channel 30&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_global_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_global_module.rst
new file mode 100644
index 00000000..a5a40b98
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_global_module.rst
@@ -0,0 +1,660 @@
+.. _cisco.nxos.nxos_lldp_global_module:
+
+
+***************************
+cisco.nxos.nxos_lldp_global
+***************************
+
+**LLDP resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module configures and manages the Link Layer Discovery Protocol(LLDP) attributes on NX-OS platforms.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="4">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of link layer discovery configurations</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>holdtime</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Amount of time the receiving device should hold the information (in seconds)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>0</li>
+ <li>1</li>
+ </ul>
+ </td>
+ <td>
+ <div>This attribute defines if the interface names should be advertised in the long(0) or short(1) form.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reinit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Amount of time to delay the initialization of LLDP on any interface (in seconds)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Frequency at which LLDP updates need to be transmitted (in seconds)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tlv_select</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This attribute can be used to specify the TLVs that need to be sent and received in the LLDP packets. By default, all TLVs are advertised</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dcbxp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Used to specify the Data Center Bridging Exchange Protocol TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>management_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Used to specify the management address in TLV messages</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>v4</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Management address with TLV v4</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>v6</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Management address with TLV v6</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Used to manage port based attributes in TLV messages</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Used to specify the port description TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Used to specify the port VLAN ID TLV</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>power_management</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Used to specify IEEE 802.3 DTE Power via MDI TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Used to manage system based attributes in TLV messages</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>capabilities</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Used to specify the system capabilities TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Used to specify the system description TLV</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Used to specify the system name TLV</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | include lldp</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NxOS 7.3.(0)D1(1) on VIRL
+ - The LLDP feature needs to be enabled before using this module
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+ # Before state:
+ # -------------
+ #
+ # user(config)# show running-config | include lldp
+ # feature lldp
+
+ - name: Merge provided configuration with device configuration
+ cisco.nxos.nxos_lldp_global:
+ config:
+ timer: 35
+ holdtime: 100
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # user(config)# show running-config | include lldp
+ # feature lldp
+ # lldp timer 35
+ # lldp holdtime 100
+
+
+ # Using replaced
+ # Before state:
+ # -------------
+ #
+ # user(config)# show running-config | include lldp
+ # feature lldp
+ # lldp holdtime 100
+ # lldp reinit 5
+ # lldp timer 35
+
+ - name: Replace device configuration of specific LLDP attributes with provided configuration
+ cisco.nxos.nxos_lldp_global:
+ config:
+ timer: 40
+ tlv_select:
+ system:
+ description: true
+ name: false
+ management_address:
+ v4: true
+ state: replaced
+
+ # After state:
+ # ------------
+ #
+ # user(config)# show running-config | include lldp
+ # feature lldp
+ # lldp timer 40
+ # no lldp tlv-select system-name
+
+
+ # Using deleted
+ # Before state:
+ # -------------
+ #
+ # user(config)# show running-config | include lldp
+ # feature lldp
+ # lldp holdtime 5
+ # lldp reinit 3
+
+ - name: Delete LLDP configuration (this will by default remove all lldp configuration)
+ cisco.nxos.nxos_lldp_global:
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+ # user(config)# show running-config | include lldp
+ # feature lldp
+
+ # Using rendered
+
+ - name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_lldp_global:
+ config:
+ holdtime: 130
+ port_id: 1
+ reinit: 5
+ tlv_select:
+ dcbxp: yes
+ power_management: yes
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # rendered:
+ # - "lldp tlv-select dcbxp"
+ # - "lldp tlv-select power-management"
+ # - "lldp portid-subtype 1"
+ # - "lldp reinit 5"
+ # - "lldp holdtime 130"
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # lldp holdtime 131
+ # lldp reinit 7
+ # no lldp tlv-select system-name
+ # no lldp tlv-select system-description
+
+ # Task output (redacted)
+ # -----------------------
+
+ # parsed:
+ # holdtime: 131
+ # reinit: 7
+ # tlv_select:
+ # system:
+ # description: false
+ # name: false
+
+ # Using gathered
+
+ # Existing device config state
+ # -------------------------------
+ # feature lldp
+ # lldp holdtime 129
+ # lldp reinit 5
+ # lldp timer 35
+ # no lldp tlv-select system-name
+
+ # Task output (redacted)
+ # -----------------------
+
+ # gathered:
+ # reinit: 5
+ # timer: 35
+ # tlv_select:
+ # system:
+ # name: False
+ # holdtime: 129
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;lldp holdtime 125&#x27;, &#x27;lldp reinit 4&#x27;, &#x27;no lldp tlv-select system-name&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Adharsh Srivats Rangarajan (@adharshsrivatsr)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_interfaces_module.rst
new file mode 100644
index 00000000..da6cef7b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_interfaces_module.rst
@@ -0,0 +1,406 @@
+.. _cisco.nxos.nxos_lldp_interfaces_module:
+
+
+*******************************
+cisco.nxos.nxos_lldp_interfaces
+*******************************
+
+**LLDP interfaces resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages interfaces' configuration for Link Layer Discovery Protocol (LLDP) on NX-OS platforms.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="3">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of link layer discovery configurations for interfaces.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>receive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Used to enable or disable the reception of LLDP packets on that interface. By default, this is enabled after LLDP is enabled globally.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tlv_set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Used to configure TLV parameters on the interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>management_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Used to mention the IPv4 or IPv6 management address for the interface</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Used to mention the VLAN for the interface</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transmit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Used to enable or disable the transmission of LLDP packets on that interface. By default, this is enabled after LLDP is enabled globally.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section ^interface</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOS 7.3.(0)D1(1) on VIRL
+ - The LLDP feature needs to be enabled before using this module
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+
+ - name: Merge provided configuration with device configuration
+ cisco.nxos.nxos_lldp_interfaces:
+ config:
+ - name: Ethernet1/4
+ receive: false
+ transmit: true
+ tlv_set:
+ management_address: 192.168.122.64
+ vlan: 12
+ state: merged
+
+ # After state:
+ # -------------
+ #
+ # interface Ethernet1/4
+ # no lldp receive
+ # lldp tlv-set management-address 192.168.122.64
+ # lldp tlv-set vlan 12
+
+
+ # Using replaced
+
+ # Before state:
+ # ------------
+ #
+ # interface Ethernet1/4
+ # no lldp receive
+ # lldp tlv-set management-address 192.168.122.64
+ # interface Ethernet1/5
+ # no lldp transmit
+ # lldp tlv-set vlan 10
+
+ - name: Replace LLDP configuration on interfaces with given configuration
+ cisco.nxos.nxos_lldp_interfaces:
+ config:
+ - name: Ethernet1/4
+ transmit: no
+ tlv_set:
+ vlan: 2
+ state: replaced
+
+
+ # After state:
+ # -----------
+ #
+ # interface Ethernet1/4
+ # no lldp transmit
+ # lldp tlv_set vlan 2
+ # interface Ethernet1/5
+ # no lldp transmit
+ # lldp tlv-set vlan 10
+
+
+ # Using overridden
+
+ # Before state:
+ # ------------
+ #
+ # interface Ethernet1/4
+ # no lldp receive
+ # lldp tlv-set management-address 192.168.122.64
+ # interface Ethernet1/5
+ # no lldp transmit
+ # lldp tlv-set vlan 10
+
+ - name: Override LLDP configuration on all interfaces with given configuration
+ cisco.nxos.nxos_lldp_interfaces:
+ config:
+ - name: Ethernet1/7
+ receive: no
+ tlv_set:
+ vlan: 12
+ state: overridden
+
+
+ # After state:
+ # -----------
+ #
+ # interface Ethernet1/7
+ # no lldp receive
+ # lldp tlv_set vlan 12
+
+
+ # Using deleted
+
+ # Before state:
+ # ------------
+ #
+ # interface Ethernet1/4
+ # lldp tlv-set management vlan 24
+ # no lldp transmit
+ # interface mgmt0
+ # no lldp receive
+
+ - name: Delete LLDP interfaces configuration
+ cisco.nxos.nxos_lldp_interfaces:
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/2&#x27;, &#x27;lldp receive&#x27;, &#x27;lldp tlv-set vlan 12&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Adharsh Srivats Rangarajan (@adharshsrivatsr)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_module.rst
new file mode 100644
index 00000000..3902e1c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_module.rst
@@ -0,0 +1,372 @@
+.. _cisco.nxos.nxos_lldp_module:
+
+
+********************
+cisco.nxos.nxos_lldp
+********************
+
+**(deprecated, removed after 2022-06-01) Manage LLDP configuration on Cisco NXOS network devices.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Updated modules released with more functionality
+:Alternative: nxos_lldp_global
+
+
+
+Synopsis
+--------
+- This module provides declarative management of LLDP service on Cisco NXOS network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ <li>enabled</li>
+ <li>disabled</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the LLDP configuration. If value is <em>present</em> lldp will be enabled else if it is <em>absent</em> it will be disabled.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.0(3)I5(1).
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Enable LLDP service
+ cisco.nxos.nxos_lldp:
+ state: present
+
+ - name: Disable LLDP service
+ cisco.nxos.nxos_lldp:
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always, except for the platforms that use Netconf transport to manage the device.</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;feature lldp&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Ganesh Nalawade (@ganeshrn)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_logging_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_logging_module.rst
new file mode 100644
index 00000000..16cf1251
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_logging_module.rst
@@ -0,0 +1,680 @@
+.. _cisco.nxos.nxos_logging_module:
+
+
+***********************
+cisco.nxos.nxos_logging
+***********************
+
+**Manage logging on network devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of logging on Cisco NX-OS devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of logging definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>console</li>
+ <li>logfile</li>
+ <li>module</li>
+ <li>monitor</li>
+ <li>server</li>
+ </ul>
+ </td>
+ <td>
+ <div>Destination of the logs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest_level</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set logging severity levels.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: level</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>event</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>link-enable</li>
+ <li>link-default</li>
+ <li>trunk-enable</li>
+ <li>trunk-default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Link/trunk enable/default interface configuration logging</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>facility</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Facility name for logging.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>facility_level</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set logging severity levels for facility based log messages.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>facility_link_status</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>link-down-notif</li>
+ <li>link-down-error</li>
+ <li>link-up-notif</li>
+ <li>link-up-error</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set logging facility ethpm link status. Not idempotent with version 6.0 images.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>file_size</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set logfile size</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface to be used while configuring source-interface for logging (e.g., &#x27;Ethernet1/2&#x27;, &#x27;mgmt0&#x27;)</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface_message</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>add-interface-description</li>
+ </ul>
+ </td>
+ <td>
+ <div>Add interface description to interface syslogs. Does not work with version 6.0 images using nxapi as a transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>If value of <code>dest</code> is <em>logfile</em> it indicates file-name.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>purge</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Remove any switch logging configuration that does not match what has been configured Not supported for ansible_connection local. All nxos_logging tasks must use the same ansible_connection type.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remote_server</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Hostname or IP Address for remote logging (when dest is &#x27;server&#x27;).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the logging configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timestamp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>microseconds</li>
+ <li>milliseconds</li>
+ <li>seconds</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set logging timestamp format</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VRF to be used while configuring remote logging (when dest is &#x27;server&#x27;).</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure console logging with level
+ cisco.nxos.nxos_logging:
+ dest: console
+ level: 2
+ state: present
+ - name: remove console logging configuration
+ cisco.nxos.nxos_logging:
+ dest: console
+ level: 2
+ state: absent
+ - name: configure file logging with level
+ cisco.nxos.nxos_logging:
+ dest: logfile
+ name: testfile
+ dest_level: 3
+ state: present
+ - name: Configure logging logfile with size
+ cisco.nxos.nxos_logging:
+ dest: logfile
+ name: testfile
+ dest_level: 3
+ file_size: 16384
+ - name: configure facility level logging
+ cisco.nxos.nxos_logging:
+ facility: daemon
+ facility_level: 0
+ state: present
+ - name: remove facility level logging
+ cisco.nxos.nxos_logging:
+ facility: daemon
+ facility_level: 0
+ state: absent
+ - name: Configure Remote Logging
+ cisco.nxos.nxos_logging:
+ dest: server
+ remote_server: test-syslogserver.com
+ facility: auth
+ facility_level: 1
+ use_vrf: management
+ state: present
+ - name: Configure Source Interface for Logging
+ cisco.nxos.nxos_logging:
+ interface: mgmt0
+ state: present
+ - name: Purge nxos_logging configuration not managed by this playbook
+ cisco.nxos.nxos_logging:
+ purge: true
+ - name: Configure logging timestamp
+ cisco.nxos.nxos_logging:
+ timestamp: milliseconds
+ state: present
+ - name: Configure logging facility ethpm link status
+ cisco.nxos.nxos_logging:
+ facility: ethpm
+ facility_link_status: link-up-notif
+ state: present
+ - name: Configure logging message ethernet description
+ cisco.nxos.nxos_logging:
+ interface_message: add-interface-description
+ state: present
+ - name: Configure logging event link enable
+ cisco.nxos.nxos_logging:
+ event: link-enable
+ state: present
+ - name: Configure logging using aggregate
+ cisco.nxos.nxos_logging:
+ aggregate:
+ - {dest: console, dest_level: 2}
+ - {dest: logfile, dest_level: 2, name: testfile}
+ - {facility: daemon, facility_level: 0}
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;logging console 2&#x27;, &#x27;logging logfile testfile 3&#x27;, &#x27;logging level daemon 0&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ntp_auth_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ntp_auth_module.rst
new file mode 100644
index 00000000..e6af899a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ntp_auth_module.rst
@@ -0,0 +1,446 @@
+.. _cisco.nxos.nxos_ntp_auth_module:
+
+
+************************
+cisco.nxos.nxos_ntp_auth
+************************
+
+**Manages NTP authentication.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages NTP authentication.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>text</b>&nbsp;&larr;</div></li>
+ <li>encrypt</li>
+ </ul>
+ </td>
+ <td>
+ <div>Whether the given md5string is in cleartext or has been encrypted. If in cleartext, the device will encrypt it before storing it.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>on</li>
+ <li>off</li>
+ </ul>
+ </td>
+ <td>
+ <div>Turns NTP authentication on or off.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication key identifier (numeric).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>md5string</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>MD5 String.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>trusted_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>false</b>&nbsp;&larr;</div></li>
+ <li>true</li>
+ </ul>
+ </td>
+ <td>
+ <div>Whether the given key is required to be supplied by a time source for the device to synchronize to the time source.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - If ``state=absent``, the module will remove the given key configuration if it exists.
+ - If ``state=absent`` and ``authentication=on``, authentication will be turned off.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Basic NTP authentication configuration
+ - cisco.nxos.nxos_ntp_auth:
+ key_id: 32
+ md5string: hello
+ auth_type: text
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ntp authentication-key 32 md5 helloWorld 0&#x27;, &#x27;ntp trusted-key 32&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ntp_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ntp_module.rst
new file mode 100644
index 00000000..e1712a62
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ntp_module.rst
@@ -0,0 +1,536 @@
+.. _cisco.nxos.nxos_ntp_module:
+
+
+*******************
+cisco.nxos.nxos_ntp
+*******************
+
+**Manages core NTP configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages core NTP configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication key identifier to use with given NTP server or peer or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network address of NTP peer.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefer</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enabled</li>
+ <li>disabled</li>
+ </ul>
+ </td>
+ <td>
+ <div>Makes given NTP server or peer the preferred NTP server or peer for the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>server</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Network address of NTP server.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_addr</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Local source address from which NTP messages are sent or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_int</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Local source interface from which NTP messages are sent. Must be fully qualified interface name or keyword &#x27;default&#x27;</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Makes the device communicate with the given NTP server or peer over a specific VRF or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Set NTP Server with parameters
+ - cisco.nxos.nxos_ntp:
+ server: 1.2.3.4
+ key_id: 32
+ prefer: enabled
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>changed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>check to see if a change was made on the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>end_state</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of ntp info after module execution</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;address&#x27;: &#x27;192.0.2.2&#x27;, &#x27;key_id&#x27;: &#x27;48&#x27;, &#x27;peer_type&#x27;: &#x27;server&#x27;, &#x27;prefer&#x27;: &#x27;enabled&#x27;, &#x27;source&#x27;: &#x27;192.0.2.3&#x27;, &#x27;source_type&#x27;: &#x27;source&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>existing</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of existing ntp server/peer</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;address&#x27;: &#x27;192.0.2.2&#x27;, &#x27;key_id&#x27;: &#x27;32&#x27;, &#x27;peer_type&#x27;: &#x27;server&#x27;, &#x27;prefer&#x27;: &#x27;enabled&#x27;, &#x27;source&#x27;: &#x27;ethernet2/1&#x27;, &#x27;source_type&#x27;: &#x27;source-interface&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>proposed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of parameters passed into module</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;address&#x27;: &#x27;192.0.2.2&#x27;, &#x27;key_id&#x27;: &#x27;48&#x27;, &#x27;peer_type&#x27;: &#x27;server&#x27;, &#x27;prefer&#x27;: &#x27;enabled&#x27;, &#x27;source&#x27;: &#x27;192.0.2.3&#x27;, &#x27;source_type&#x27;: &#x27;source&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ntp server 192.0.2.2 prefer key 48&#x27;, &#x27;no ntp source-interface ethernet2/1&#x27;, &#x27;ntp source 192.0.2.3&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ntp_options_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ntp_options_module.rst
new file mode 100644
index 00000000..6b415519
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ntp_options_module.rst
@@ -0,0 +1,414 @@
+.. _cisco.nxos.nxos_ntp_options_module:
+
+
+***************************
+cisco.nxos.nxos_ntp_options
+***************************
+
+**Manages NTP options.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages NTP options, e.g. authoritative server and logging.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>logging</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Sets whether NTP logging is enabled on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>master</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Sets whether the device is an authoritative NTP server.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stratum</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>If <code>master=true</code>, an optional stratum can be supplied (1-15). The device default is 8.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - When ``state=absent``, master and logging will be set to False and stratum will be removed as well
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Basic NTP options configuration
+ - cisco.nxos.nxos_ntp_options:
+ master: true
+ stratum: 12
+ logging: false
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;no ntp logging&#x27;, &#x27;ntp master 12&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_nxapi_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_nxapi_module.rst
new file mode 100644
index 00000000..43df15f6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_nxapi_module.rst
@@ -0,0 +1,533 @@
+.. _cisco.nxos.nxos_nxapi_module:
+
+
+*********************
+cisco.nxos.nxos_nxapi
+*********************
+
+**Manage NXAPI configuration on an NXOS device.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Configures the NXAPI feature on devices running Cisco NXOS. The NXAPI feature is absent from the configuration by default. Since this module manages the NXAPI feature it only supports the use of the ``Cli`` transport.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>http</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Controls the operating state of the HTTP protocol as one of the underlying transports for NXAPI. By default, NXAPI will enable the HTTP transport when the feature is first configured. To disable the use of the HTTP transport, set the value of this argument to False.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: enable_http</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>http_port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">80</div>
+ </td>
+ <td>
+ <div>Configure the port with which the HTTP server will listen on for requests. By default, NXAPI will bind the HTTP service to the standard HTTP port 80. This argument accepts valid port values in the range of 1 to 65535.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>https</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Controls the operating state of the HTTPS protocol as one of the underlying transports for NXAPI. By default, NXAPI will disable the HTTPS transport when the feature is first configured. To enable the use of the HTTPS transport, set the value of this argument to True.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: enable_https</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>https_port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">443</div>
+ </td>
+ <td>
+ <div>Configure the port with which the HTTPS server will listen on for requests. By default, NXAPI will bind the HTTPS service to the standard HTTPS port 443. This argument accepts valid port values in the range of 1 to 65535.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sandbox</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>The NXAPI feature provides a web base UI for developers for entering commands. This feature is initially disabled when the NXAPI feature is configured for the first time. When the <code>sandbox</code> argument is set to True, the developer sandbox URL will accept requests and when the value is set to False, the sandbox URL is unavailable. This is supported on NX-OS 7K series.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: enable_sandbox</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssl_strong_ciphers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Controls the use of whether strong or weak ciphers are configured. By default, this feature is disabled and weak ciphers are configured. To enable the use of strong ciphers, set the value of this argument to True.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>The <code>state</code> argument controls whether or not the NXAPI feature is configured on the remote device. When the value is <code>present</code> the NXAPI feature configuration is present in the device running-config. When the values is <code>absent</code> the feature configuration is removed from the running-config.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tlsv1_0</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Controls the use of the Transport Layer Security version 1.0 is configured. By default, this feature is enabled. To disable the use of TLSV1.0, set the value of this argument to True.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tlsv1_1</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Controls the use of the Transport Layer Security version 1.1 is configured. By default, this feature is disabled. To enable the use of TLSV1.1, set the value of this argument to True.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tlsv1_2</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Controls the use of the Transport Layer Security version 1.2 is configured. By default, this feature is disabled. To enable the use of TLSV1.2, set the value of this argument to True.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Enable NXAPI access with default configuration
+ cisco.nxos.nxos_nxapi:
+ state: present
+
+ - name: Enable NXAPI with no HTTP, HTTPS at port 9443 and sandbox disabled
+ cisco.nxos.nxos_nxapi:
+ enable_http: false
+ https_port: 9443
+ https: yes
+ enable_sandbox: no
+
+ - name: remove NXAPI configuration
+ cisco.nxos.nxos_nxapi:
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Returns the list of commands that need to be pushed into the remote device to satisfy the arguments</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;no feature nxapi&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospf_interfaces_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospf_interfaces_module.rst
new file mode 100644
index 00000000..87c04095
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospf_interfaces_module.rst
@@ -0,0 +1,1986 @@
+.. _cisco.nxos.nxos_ospf_interfaces_module:
+
+
+*******************************
+cisco.nxos.nxos_ospf_interfaces
+*******************************
+
+**OSPF Interfaces Resource Module.**
+
+
+Version added: 1.3.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages OSPF(v2/v3) configuration of interfaces on devices running Cisco NX-OS.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="5">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of OSPF configuration for interfaces.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_family</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF settings on the interfaces in address-family context.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Address Family Identifier (AFI) for OSPF settings on the interfaces.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication settings on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable authentication on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key_chain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication password key-chain.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use message-digest authentication.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>null_auth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use null(disable) authentication.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure the authentication key for the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encryption</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>0 Specifies an UNENCRYPTED authentication key will follow.</div>
+ <div>3 Specifies an 3DES ENCRYPTED authentication key will follow.</div>
+ <div>7 Specifies a Cisco type 7 ENCRYPTED authentication key will follow.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication key.</div>
+ <div>Valid values are Cisco type 7 ENCRYPTED password, 3DES ENCRYPTED password and UNENCRYPTED (cleartext) password based on the value of encryption key.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cost associated with interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dead_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Dead interval value (in seconds).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Hello interval value (in seconds).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>instance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Instance identifier.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Message digest authentication password (key) settings.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encryption</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>0 Specifies an UNENCRYPTED ospf password (key) will follow.</div>
+ <div>3 Specifies an 3DES ENCRYPTED ospf password (key) will follow.</div>
+ <div>7 Specifies a Cisco type 7 ENCRYPTED the ospf password (key) will follow.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication key.</div>
+ <div>Valid values are Cisco type 7 ENCRYPTED password, 3DES ENCRYPTED password and UNENCRYPTED (cleartext) password based on the value of encryption key.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Key ID.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mtu_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable OSPF MTU mismatch detection.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multi_areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Multi-Areas associated with interface (not tied to OSPF process).</div>
+ <div>Valid values are Area Ids as an integer or IP address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>network</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>broadcast</li>
+ <li>point-to-point</li>
+ </ul>
+ </td>
+ <td>
+ <div>Network type.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress routing updates on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router priority.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>processes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interfaces configuration for an OSPF process.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Area associated with interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Area ID as a decimal or IP address format.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>secondaries</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not include secondary IPv4/IPv6 addresses.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multi_areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Multi-Areas associated with interface.</div>
+ <div>Valid values are Area Ids as an integer or IP address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>process_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF process tag.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>retransmit_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Packet retransmission interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Shutdown OSPF on this interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transmit_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Packet transmission delay.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name/Identifier of the interface.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section &quot;^interface&quot;</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ <li>rendered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ # NXOS# show running-config | section ^interface
+ # interface Ethernet1/1
+ # no switchport
+ # interface Ethernet1/2
+ # no switchport
+ # interface Ethernet1/3
+ # no switchport
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ - name: Ethernet1/1
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.11
+ - afi: ipv6
+ processes:
+ - process_id: "200"
+ area:
+ area_id: 2.2.2.2
+ multi_areas:
+ - 21.0.0.0
+ - process_id: "300"
+ multi_areas:
+ - 50.50.50.50
+ multi_areas:
+ - 16.10.10.10
+ - name: Ethernet1/2
+ address_family:
+ - afi: ipv4
+ authentication:
+ enable: True
+ key_chain: test-1
+ message_digest_key:
+ key_id: 10
+ encryption: 3
+ key: abc01d272be25d29
+ cost: 100
+ - afi: ipv6
+ network: broadcast
+ shutdown: True
+ - name: Ethernet1/3
+ address_family:
+ - afi: ipv4
+ authentication_key:
+ encryption: 7
+ key: 12090404011C03162E
+ state: merged
+
+ # Task output
+ # -------------
+ # "before": [
+ # {
+ # "name": "Ethernet1/1"
+ # },
+ # {
+ # "name": "Ethernet1/2"
+ # },
+ # {
+ # "name": "Ethernet1/3"
+ # },
+ # ]
+ #
+ # "commands": [
+ # "interface Ethernet1/1",
+ # "ip router ospf multi-area 11.11.11.11",
+ # "ip router ospf 100 area 1.1.1.1 secondaries none",
+ # "ipv6 router ospfv3 multi-area 16.10.10.10",
+ # "ipv6 router ospfv3 200 area 2.2.2.2",
+ # "ipv6 router ospfv3 200 multi-area 21.0.0.0",
+ # "ipv6 router ospfv3 300 multi-area 50.50.50.50",
+ # "interface Ethernet1/2",
+ # "ip ospf authentication key-chain test-1",
+ # "ip ospf authentication",
+ # "ip ospf message-digest-key 10 md5 3 abc01d272be25d29",
+ # "ip ospf cost 100",
+ # "ospfv3 network broadcast",
+ # "ospfv3 shutdown",
+ # "interface Ethernet1/3",
+ # "ip ospf authentication-key 7 12090404011C03162E"
+ # ]
+ #
+ # "after": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "multi_areas": [
+ # "11.11.11.11"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "1.1.1.1",
+ # "secondaries": false
+ # },
+ # "process_id": "100"
+ # }
+ # ]
+ # },
+ # {
+ # "afi": "ipv6",
+ # "multi_areas": [
+ # "16.10.10.10"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "2.2.2.2"
+ # },
+ # "multi_areas": [
+ # "21.0.0.0"
+ # ],
+ # "process_id": "200"
+ # },
+ # {
+ # "multi_areas": [
+ # "50.50.50.50"
+ # ],
+ # "process_id": "300"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "Ethernet1/1"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "enable": true,
+ # "key_chain": "test-1"
+ # },
+ # "cost": 100,
+ # "message_digest_key": {
+ # "encryption": 3,
+ # "key": "abc01d272be25d29",
+ # "key_id": 10
+ # }
+ # },
+ # {
+ # "afi": "ipv6",
+ # "network": "broadcast",
+ # "shutdown": true
+ # }
+ # ],
+ # "name": "Ethernet1/2"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication_key": {
+ # "encryption": 7,
+ # "key": "12090404011C03162E"
+ # }
+ # }
+ # ],
+ # "name": "Ethernet1/3"
+ # },
+ # ]
+
+ # After state:
+ # -------------
+ # NXOS# show running-config | section ^interface
+ # interface Ethernet1/1
+ # no switchport
+ # ip router ospf 100 area 1.1.1.1 secondaries none
+ # ip router ospf multi-area 11.11.11.11
+ # ipv6 router ospfv3 200 area 2.2.2.2
+ # ipv6 router ospfv3 multi-area 16.10.10.10
+ # ipv6 router ospfv3 200 multi-area 21.0.0.0
+ # ipv6 router ospfv3 300 multi-area 50.50.50.50
+ # interface Ethernet1/2
+ # no switchport
+ # ip ospf authentication
+ # ip ospf authentication key-chain test-1
+ # ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+ # ip ospf cost 100
+ # ospfv3 network broadcast
+ # ospfv3 shutdown
+ # interface Ethernet1/3
+ # no switchport
+ # ip ospf authentication-key 7 12090404011C03162E
+
+
+ # Using replaced
+
+ # Before state:
+ # ------------
+ # NXOS# show running-config | section ^interface
+ # interface Ethernet1/1
+ # no switchport
+ # ip router ospf 100 area 1.1.1.1 secondaries none
+ # ip router ospf multi-area 11.11.11.11
+ # ipv6 router ospfv3 200 area 2.2.2.2
+ # ipv6 router ospfv3 multi-area 16.10.10.10
+ # ipv6 router ospfv3 200 multi-area 21.0.0.0
+ # ipv6 router ospfv3 300 multi-area 50.50.50.50
+ # interface Ethernet1/2
+ # no switchport
+ # ip ospf authentication
+ # ip ospf authentication key-chain test-1
+ # ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+ # ip ospf cost 100
+ # ospfv3 network broadcast
+ # ospfv3 shutdown
+ # interface Ethernet1/3
+ # no switchport
+ # ip ospf authentication-key 7 12090404011C03162E
+
+ - name: Replace OSPF configurations of listed interfaces with provided configurations
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ - name: Ethernet1/1
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.12
+ - name: Ethernet1/3
+ state: replaced
+
+ # Task output
+ # -------------
+ # "before": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "multi_areas": [
+ # "11.11.11.11"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "1.1.1.1",
+ # "secondaries": false
+ # },
+ # "process_id": "100"
+ # }
+ # ]
+ # },
+ # {
+ # "afi": "ipv6",
+ # "multi_areas": [
+ # "16.10.10.10"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "2.2.2.2"
+ # },
+ # "multi_areas": [
+ # "21.0.0.0"
+ # ],
+ # "process_id": "200"
+ # },
+ # {
+ # "multi_areas": [
+ # "50.50.50.50"
+ # ],
+ # "process_id": "300"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "Ethernet1/1"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "enable": true,
+ # "key_chain": "test-1"
+ # },
+ # "cost": 100,
+ # "message_digest_key": {
+ # "encryption": 3,
+ # "key": "abc01d272be25d29",
+ # "key_id": 10
+ # }
+ # },
+ # {
+ # "afi": "ipv6",
+ # "network": "broadcast",
+ # "shutdown": true
+ # }
+ # ],
+ # "name": "Ethernet1/2"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication_key": {
+ # "encryption": 7,
+ # "key": "12090404011C03162E"
+ # }
+ # }
+ # ],
+ # "name": "Ethernet1/3"
+ # },
+ # ]
+ #
+ # "commands": [
+ # "interface Ethernet1/1",
+ # "ip router ospf multi-area 11.11.11.12",
+ # "no ip router ospf multi-area 11.11.11.11",
+ # "no ipv6 router ospfv3 multi-area 16.10.10.10",
+ # "no ipv6 router ospfv3 200 area 2.2.2.2",
+ # "no ipv6 router ospfv3 200 multi-area 21.0.0.0",
+ # "no ipv6 router ospfv3 300 multi-area 50.50.50.50",
+ # "interface Ethernet1/3",
+ # "no ip ospf authentication-key 7 12090404011C03162E"
+ # ]
+ #
+ # "after": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "multi_areas": [
+ # "11.11.11.12"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "1.1.1.1",
+ # "secondaries": false
+ # },
+ # "process_id": "100"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "Ethernet1/1"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "enable": true,
+ # "key_chain": "test-1"
+ # },
+ # "cost": 100,
+ # "message_digest_key": {
+ # "encryption": 3,
+ # "key": "abc01d272be25d29",
+ # "key_id": 10
+ # }
+ # },
+ # {
+ # "afi": "ipv6",
+ # "network": "broadcast",
+ # "shutdown": true
+ # }
+ # ],
+ # "name": "Ethernet1/2"
+ # },
+ # {
+ # "name": "Ethernet1/3"
+ # },
+ #
+ # After state:
+ # -------------
+ # NXOS# show running-config | section ^interface
+ # interface Ethernet1/1
+ # no switchport
+ # ip router ospf 100 area 1.1.1.1 secondaries none
+ # ip router ospf multi-area 11.11.11.12
+ # interface Ethernet1/2
+ # no switchport
+ # ip ospf authentication
+ # ip ospf authentication key-chain test-1
+ # ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+ # ip ospf cost 100
+ # ospfv3 network broadcast
+ # ospfv3 shutdown
+ # interface Ethernet1/3
+ # no switchport
+
+
+ # Using overridden
+
+ # Before state:
+ # ------------
+ # NXOS# show running-config | section ^interface
+ # interface Ethernet1/1
+ # no switchport
+ # ip router ospf 100 area 1.1.1.1 secondaries none
+ # ip router ospf multi-area 11.11.11.11
+ # ipv6 router ospfv3 200 area 2.2.2.2
+ # ipv6 router ospfv3 multi-area 16.10.10.10
+ # ipv6 router ospfv3 200 multi-area 21.0.0.0
+ # ipv6 router ospfv3 300 multi-area 50.50.50.50
+ # interface Ethernet1/2
+ # no switchport
+ # ip ospf authentication
+ # ip ospf authentication key-chain test-1
+ # ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+ # ip ospf cost 100
+ # ospfv3 network broadcast
+ # ospfv3 shutdown
+ # interface Ethernet1/3
+ # no switchport
+ # ip ospf authentication-key 7 12090404011C03162E
+
+ - name: Overridde all OSPF interfaces configuration with provided configuration
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ - name: Ethernet1/1
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.12
+ state: overridden
+
+ # Task output
+ # -------------
+ # "before": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "multi_areas": [
+ # "11.11.11.11"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "1.1.1.1",
+ # "secondaries": false
+ # },
+ # "process_id": "100"
+ # }
+ # ]
+ # },
+ # {
+ # "afi": "ipv6",
+ # "multi_areas": [
+ # "16.10.10.10"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "2.2.2.2"
+ # },
+ # "multi_areas": [
+ # "21.0.0.0"
+ # ],
+ # "process_id": "200"
+ # },
+ # {
+ # "multi_areas": [
+ # "50.50.50.50"
+ # ],
+ # "process_id": "300"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "Ethernet1/1"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "enable": true,
+ # "key_chain": "test-1"
+ # },
+ # "cost": 100,
+ # "message_digest_key": {
+ # "encryption": 3,
+ # "key": "abc01d272be25d29",
+ # "key_id": 10
+ # }
+ # },
+ # {
+ # "afi": "ipv6",
+ # "network": "broadcast",
+ # "shutdown": true
+ # }
+ # ],
+ # "name": "Ethernet1/2"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication_key": {
+ # "encryption": 7,
+ # "key": "12090404011C03162E"
+ # }
+ # }
+ # ],
+ # "name": "Ethernet1/3"
+ # },
+ # ]
+ #
+ # "commands": [
+ # "interface Ethernet1/2",
+ # "no ip ospf authentication key-chain test-1",
+ # "no ip ospf authentication",
+ # "no ip ospf message-digest-key 10 md5 3 abc01d272be25d29",
+ # "no ip ospf cost 100",
+ # "no ospfv3 network broadcast",
+ # "no ospfv3 shutdown",
+ # "interface Ethernet1/3",
+ # "no ip ospf authentication-key 7 12090404011C03162E",
+ # "interface Ethernet1/1",
+ # "ip router ospf multi-area 11.11.11.12",
+ # "no ip router ospf multi-area 11.11.11.11",
+ # "no ipv6 router ospfv3 multi-area 16.10.10.10",
+ # "no ipv6 router ospfv3 200 area 2.2.2.2",
+ # "no ipv6 router ospfv3 200 multi-area 21.0.0.0",
+ # "no ipv6 router ospfv3 300 multi-area 50.50.50.50"
+ # ]
+ #
+ # "after": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "multi_areas": [
+ # "11.11.11.12"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "1.1.1.1",
+ # "secondaries": false
+ # },
+ # "process_id": "100"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "Ethernet1/1"
+ # },
+ # {
+ # "name": "Ethernet1/2"
+ # },
+ # {
+ # "name": "Ethernet1/3"
+ # },
+ # ]
+
+ # After state:
+ # -------------
+ # NXOS# show running-config | section ^interface
+ # interface Ethernet1/1
+ # no switchport
+ # ip router ospf 100 area 1.1.1.1 secondaries none
+ # ip router ospf multi-area 11.11.11.12
+ # interface Ethernet1/2
+ # no switchport
+ # interface Ethernet1/3
+ # no switchport
+
+ # Using deleted to delete OSPF config of a single interface
+
+ # Before state:
+ # ------------
+ # NXOS# show running-config | section ^interface
+ # interface Ethernet1/1
+ # no switchport
+ # ip router ospf 100 area 1.1.1.1 secondaries none
+ # ip router ospf multi-area 11.11.11.11
+ # ipv6 router ospfv3 200 area 2.2.2.2
+ # ipv6 router ospfv3 multi-area 16.10.10.10
+ # ipv6 router ospfv3 200 multi-area 21.0.0.0
+ # ipv6 router ospfv3 300 multi-area 50.50.50.50
+ # interface Ethernet1/2
+ # no switchport
+ # ip ospf authentication
+ # ip ospf authentication key-chain test-1
+ # ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+ # ip ospf cost 100
+ # ospfv3 network broadcast
+ # ospfv3 shutdown
+ # interface Ethernet1/3
+ # no switchport
+ # ip ospf authentication-key 7 12090404011C03162E
+
+ - name: Delete OSPF config from a single interface
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ - name: Ethernet1/1
+ state: deleted
+
+ # Task output
+ # -------------
+ # "before": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "multi_areas": [
+ # "11.11.11.11"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "1.1.1.1",
+ # "secondaries": false
+ # },
+ # "process_id": "100"
+ # }
+ # ]
+ # },
+ # {
+ # "afi": "ipv6",
+ # "multi_areas": [
+ # "16.10.10.10"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "2.2.2.2"
+ # },
+ # "multi_areas": [
+ # "21.0.0.0"
+ # ],
+ # "process_id": "200"
+ # },
+ # {
+ # "multi_areas": [
+ # "50.50.50.50"
+ # ],
+ # "process_id": "300"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "Ethernet1/1"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "enable": true,
+ # "key_chain": "test-1"
+ # },
+ # "cost": 100,
+ # "message_digest_key": {
+ # "encryption": 3,
+ # "key": "abc01d272be25d29",
+ # "key_id": 10
+ # }
+ # },
+ # {
+ # "afi": "ipv6",
+ # "network": "broadcast",
+ # "shutdown": true
+ # }
+ # ],
+ # "name": "Ethernet1/2"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication_key": {
+ # "encryption": 7,
+ # "key": "12090404011C03162E"
+ # }
+ # }
+ # ],
+ # "name": "Ethernet1/3"
+ # },
+ # ]
+ #
+ # "commands": [
+ # "interface Ethernet1/1",
+ # "no ip router ospf multi-area 11.11.11.11",
+ # "no ip router ospf 100 area 1.1.1.1 secondaries none",
+ # "no ipv6 router ospfv3 multi-area 16.10.10.10",
+ # "no ipv6 router ospfv3 200 area 2.2.2.2",
+ # "no ipv6 router ospfv3 200 multi-area 21.0.0.0",
+ # "no ipv6 router ospfv3 300 multi-area 50.50.50.50"
+ # ]
+ #
+ # "before": [
+ # {
+ # "name": "Ethernet1/1"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "enable": true,
+ # "key_chain": "test-1"
+ # },
+ # "cost": 100,
+ # "message_digest_key": {
+ # "encryption": 3,
+ # "key": "abc01d272be25d29",
+ # "key_id": 10
+ # }
+ # },
+ # {
+ # "afi": "ipv6",
+ # "network": "broadcast",
+ # "shutdown": true
+ # }
+ # ],
+ # "name": "Ethernet1/2"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication_key": {
+ # "encryption": 7,
+ # "key": "12090404011C03162E"
+ # }
+ # }
+ # ],
+ # "name": "Ethernet1/3"
+ # },
+ # ]
+
+ # After state:
+ # ------------
+ # NXOS# show running-config | section ^interface
+ # interface Ethernet1/1
+ # no switchport
+ # interface Ethernet1/2
+ # no switchport
+ # ip ospf authentication
+ # ip ospf authentication key-chain test-1
+ # ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+ # ip ospf cost 100
+ # ospfv3 network broadcast
+ # ospfv3 shutdown
+ # interface Ethernet1/3
+ # no switchport
+ # ip ospf authentication-key 7 12090404011C03162E
+
+ # Using deleted to delete OSPF config from all interfaces
+
+ # Before state:
+ # ------------
+ # NXOS# show running-config | section ^interface
+ # interface Ethernet1/1
+ # no switchport
+ # ip router ospf 100 area 1.1.1.1 secondaries none
+ # ip router ospf multi-area 11.11.11.11
+ # ipv6 router ospfv3 200 area 2.2.2.2
+ # ipv6 router ospfv3 multi-area 16.10.10.10
+ # ipv6 router ospfv3 200 multi-area 21.0.0.0
+ # ipv6 router ospfv3 300 multi-area 50.50.50.50
+ # interface Ethernet1/2
+ # no switchport
+ # ip ospf authentication
+ # ip ospf authentication key-chain test-1
+ # ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+ # ip ospf cost 100
+ # ospfv3 network broadcast
+ # ospfv3 shutdown
+ # interface Ethernet1/3
+ # no switchport
+ # ip ospf authentication-key 7 12090404011C03162E
+
+ - name: Delete OSPF config from all interfaces
+ cisco.nxos.nxos_ospf_interfaces:
+ state: deleted
+
+ # Task output
+ # -------------
+ # "before": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "multi_areas": [
+ # "11.11.11.11"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "1.1.1.1",
+ # "secondaries": false
+ # },
+ # "process_id": "100"
+ # }
+ # ]
+ # },
+ # {
+ # "afi": "ipv6",
+ # "multi_areas": [
+ # "16.10.10.10"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "2.2.2.2"
+ # },
+ # "multi_areas": [
+ # "21.0.0.0"
+ # ],
+ # "process_id": "200"
+ # },
+ # {
+ # "multi_areas": [
+ # "50.50.50.50"
+ # ],
+ # "process_id": "300"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "Ethernet1/1"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "enable": true,
+ # "key_chain": "test-1"
+ # },
+ # "cost": 100,
+ # "message_digest_key": {
+ # "encryption": 3,
+ # "key": "abc01d272be25d29",
+ # "key_id": 10
+ # }
+ # },
+ # {
+ # "afi": "ipv6",
+ # "network": "broadcast",
+ # "shutdown": true
+ # }
+ # ],
+ # "name": "Ethernet1/2"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication_key": {
+ # "encryption": 7,
+ # "key": "12090404011C03162E"
+ # }
+ # }
+ # ],
+ # "name": "Ethernet1/3"
+ # },
+ # ]
+ #
+ # "commands": [
+ # "interface Ethernet1/1",
+ # "no ip router ospf multi-area 11.11.11.11",
+ # "no ip router ospf 100 area 1.1.1.1 secondaries none",
+ # "no ipv6 router ospfv3 multi-area 16.10.10.10",
+ # "no ipv6 router ospfv3 200 area 2.2.2.2",
+ # "no ipv6 router ospfv3 200 multi-area 21.0.0.0",
+ # "no ipv6 router ospfv3 300 multi-area 50.50.50.50",
+ # "interface Ethernet1/2",
+ # "no ip ospf authentication key-chain test-1",
+ # "no ip ospf authentication",
+ # "no ip ospf message-digest-key 10 md5 3 abc01d272be25d29",
+ # "no ip ospf cost 100",
+ # "no ospfv3 network broadcast",
+ # "no ospfv3 shutdown",
+ # "interface Ethernet1/3",
+ # "no ip ospf authentication-key 7 12090404011C03162E"
+ # ]
+ #
+ # "after": [
+ # {
+ # "name": "Ethernet1/1"
+ # },
+ # {
+ # "name": "Ethernet1/2"
+ # },
+ # {
+ # "name": "Ethernet1/3"
+ # },
+ # ]
+
+ # After state:
+ # ------------
+ # NXOS# show running-config | section ^interface
+ # interface Ethernet1/1
+ # no switchport
+ # interface Ethernet1/2
+ # no switchport
+ # interface Ethernet1/3
+ # no switchport
+
+ # Using rendered
+
+ - name: Render platform specific configuration lines with state rendered (without connecting to the device)
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ - name: Ethernet1/1
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.11
+ - afi: ipv6
+ processes:
+ - process_id: "200"
+ area:
+ area_id: 2.2.2.2
+ multi_areas:
+ - 21.0.0.0
+ - process_id: "300"
+ multi_areas:
+ - 50.50.50.50
+ multi_areas:
+ - 16.10.10.10
+ - name: Ethernet1/2
+ address_family:
+ - afi: ipv4
+ authentication:
+ enable: True
+ key_chain: test-1
+ message_digest_key:
+ key_id: 10
+ encryption: 3
+ key: abc01d272be25d29
+ cost: 100
+ - afi: ipv6
+ network: broadcast
+ shutdown: True
+ - name: Ethernet1/3
+ address_family:
+ - afi: ipv4
+ authentication_key:
+ encryption: 7
+ key: 12090404011C03162E
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+ # "rendered": [
+ # "interface Ethernet1/1",
+ # "ip router ospf multi-area 11.11.11.11",
+ # "ip router ospf 100 area 1.1.1.1 secondaries none",
+ # "ipv6 router ospfv3 multi-area 16.10.10.10",
+ # "ipv6 router ospfv3 200 area 2.2.2.2",
+ # "ipv6 router ospfv3 200 multi-area 21.0.0.0",
+ # "ipv6 router ospfv3 300 multi-area 50.50.50.50",
+ # "interface Ethernet1/2",
+ # "ip ospf authentication key-chain test-1",
+ # "ip ospf authentication",
+ # "ip ospf message-digest-key 10 md5 3 abc01d272be25d29",
+ # "ip ospf cost 100",
+ # "ospfv3 network broadcast",
+ # "ospfv3 shutdown",
+ # "interface Ethernet1/3",
+ # "ip ospf authentication-key 7 12090404011C03162E"
+ # ]
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # interface Ethernet1/1
+ # ip router ospf 100 area 1.1.1.1 secondaries none
+ # ip router ospf multi-area 11.11.11.11
+ # ipv6 router ospfv3 200 area 2.2.2.2
+ # ipv6 router ospfv3 200 multi-area 21.0.0.0
+ # ipv6 router ospfv3 300 multi-area 50.50.50.50
+ # ipv6 router ospfv3 multi-area 16.10.10.10
+ # interface Ethernet1/2
+ # ip ospf authentication
+ # ip ospf authentication key-chain test-1
+ # ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+ # ip ospf cost 100
+ # ospfv3 network broadcast
+ # ospfv3 shutdown
+ # interface Ethernet1/3
+ # ip ospf authentication-key 7 12090404011C03162E
+
+ - name: arse externally provided OSPF interfaces config
+ cisco.nxos.nxos_ospf_interfaces:
+ running_config: "{{ lookup('file', 'ospf_interfaces.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+ # "parsed": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "multi_areas": [
+ # "11.11.11.11"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "1.1.1.1",
+ # "secondaries": false
+ # },
+ # "process_id": "100"
+ # }
+ # ]
+ # },
+ # {
+ # "afi": "ipv6",
+ # "multi_areas": [
+ # "16.10.10.10"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "2.2.2.2"
+ # },
+ # "multi_areas": [
+ # "21.0.0.0"
+ # ],
+ # "process_id": "200"
+ # },
+ # {
+ # "multi_areas": [
+ # "50.50.50.50"
+ # ],
+ # "process_id": "300"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "Ethernet1/1"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "enable": true,
+ # "key_chain": "test-1"
+ # },
+ # "cost": 100,
+ # "message_digest_key": {
+ # "encryption": 3,
+ # "key": "abc01d272be25d29",
+ # "key_id": 10
+ # }
+ # },
+ # {
+ # "afi": "ipv6",
+ # "network": "broadcast",
+ # "shutdown": true
+ # }
+ # ],
+ # "name": "Ethernet1/2"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication_key": {
+ # "encryption": 7,
+ # "key": "12090404011C03162E"
+ # }
+ # }
+ # ],
+ # "name": "Ethernet1/3"
+ # },
+ # ]
+
+ # Using gathered
+
+ # On-box config
+
+ # NXOS# show running-config | section ^interface
+ # interface Ethernet1/1
+ # no switchport
+ # ip router ospf 100 area 1.1.1.1 secondaries none
+ # ip router ospf multi-area 11.11.11.12
+ # interface Ethernet1/2
+ # no switchport
+ # ip ospf authentication
+ # ip ospf authentication key-chain test-1
+ # ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+ # ip ospf cost 100
+ # ospfv3 network broadcast
+ # ospfv3 shutdown
+ # interface Ethernet1/3
+ # no switchport
+
+ # Task output (redacted)
+ # -----------------------
+ # "gathered": [
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "multi_areas": [
+ # "11.11.11.12"
+ # ],
+ # "processes": [
+ # {
+ # "area": {
+ # "area_id": "1.1.1.1",
+ # "secondaries": false
+ # },
+ # "process_id": "100"
+ # }
+ # ]
+ # }
+ # ],
+ # "name": "Ethernet1/1"
+ # },
+ # {
+ # "address_family": [
+ # {
+ # "afi": "ipv4",
+ # "authentication": {
+ # "enable": true,
+ # "key_chain": "test-1"
+ # },
+ # "cost": 100,
+ # "message_digest_key": {
+ # "encryption": 3,
+ # "key": "abc01d272be25d29",
+ # "key_id": 10
+ # }
+ # },
+ # {
+ # "afi": "ipv6",
+ # "network": "broadcast",
+ # "shutdown": true
+ # }
+ # ],
+ # "name": "Ethernet1/2"
+ # },
+ # {
+ # "name": "Ethernet1/3"
+ # },
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/1&#x27;, &#x27;ip router ospf multi-area 11.11.11.11&#x27;, &#x27;ip router ospf 100 area 1.1.1.1 secondaries none&#x27;, &#x27;no ipv6 router ospfv3 multi-area 16.10.10.10&#x27;, &#x27;ipv6 router ospfv3 200 area 2.2.2.2&#x27;, &#x27;ipv6 router ospfv3 200 multi-area 21.0.0.0&#x27;, &#x27;ipv6 router ospfv3 300 multi-area 50.50.50.50&#x27;, &#x27;interface Ethernet1/2&#x27;, &#x27;no ip ospf authentication key-chain test-1&#x27;, &#x27;ip ospf authentication&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@NilashishC)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospf_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospf_module.rst
new file mode 100644
index 00000000..c6b1dcc6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospf_module.rst
@@ -0,0 +1,381 @@
+.. _cisco.nxos.nxos_ospf_module:
+
+
+********************
+cisco.nxos.nxos_ospf
+********************
+
+**(deprecated, removed after 2022-06-01) Manages configuration of an ospf instance.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Updated modules released with more functionality.
+:Alternative: nxos_ospfv2 and nxos_ospfv3
+
+
+
+Synopsis
+--------
+- Manages configuration of an ospf instance.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ospf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the ospf instance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines whether the config should be present or not on the device.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_ospf:
+ ospf: 1
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router ospf 1&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospf_vrf_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospf_vrf_module.rst
new file mode 100644
index 00000000..0880dc1a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospf_vrf_module.rst
@@ -0,0 +1,601 @@
+.. _cisco.nxos.nxos_ospf_vrf_module:
+
+
+************************
+cisco.nxos.nxos_ospf_vrf
+************************
+
+**(deprecated, removed after 2022-10-01)Manages a VRF for an OSPF router.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-10-01
+:Why: Updated modules released with more functionality.
+:Alternative: nxos_ospfv2 and nxos_ospfv3
+
+
+
+Synopsis
+--------
+- Manages a VRF for an OSPF router.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the reference bandwidth used to assign OSPF cost. Valid values are an integer, in Mbps, or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables BFD on all OSPF interfaces.</div>
+ <div>Dependency: &#x27;&#x27;feature bfd&#x27;&#x27;</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the default Metric value. Valid values are an integer or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_adjacency</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>log</li>
+ <li>detail</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Controls the level of log messages generated whenever a neighbor changes state. Valid values are &#x27;log&#x27;, &#x27;detail&#x27;, and &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ospf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the OSPF instance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Setting to <code>yes</code> will suppress routing update on interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router Identifier (ID) of the OSPF router VRF instance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of ospf vrf configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timer_throttle_lsa_hold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the hold interval for rate-limiting Link-State Advertisement (LSA) generation. Valid values are an integer, in milliseconds, or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timer_throttle_lsa_max</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the max interval for rate-limiting Link-State Advertisement (LSA) generation. Valid values are an integer, in milliseconds, or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timer_throttle_lsa_start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the start interval for rate-limiting Link-State Advertisement (LSA) generation. Valid values are an integer, in milliseconds, or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timer_throttle_spf_hold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify minimum hold time between Shortest Path First (SPF) calculations. Valid values are an integer, in milliseconds, or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timer_throttle_spf_max</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the maximum wait time between Shortest Path First (SPF) calculations. Valid values are an integer, in milliseconds, or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timer_throttle_spf_start</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify initial Shortest Path First (SPF) schedule delay. Valid values are an integer, in milliseconds, or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"default"</div>
+ </td>
+ <td>
+ <div>Name of the resource instance. Valid value is a string. The name &#x27;default&#x27; is a valid VRF representing the global OSPF.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - Value *default* restores params default value, if any. Otherwise it removes the existing param configuration.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_ospf_vrf:
+ ospf: 1
+ timer_throttle_spf_start: 50
+ timer_throttle_spf_hold: 1000
+ timer_throttle_spf_max: 2000
+ timer_throttle_lsa_start: 60
+ timer_throttle_lsa_hold: 1100
+ timer_throttle_lsa_max: 3000
+ vrf: test
+ bfd: enable
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router ospf 1&#x27;, &#x27;vrf test&#x27;, &#x27;bfd&#x27;, &#x27;timers throttle lsa 60 1100 3000&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospfv2_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospfv2_module.rst
new file mode 100644
index 00000000..a0352861
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospfv2_module.rst
@@ -0,0 +1,5400 @@
+.. _cisco.nxos.nxos_ospfv2_module:
+
+
+**********************
+cisco.nxos.nxos_ospfv2
+**********************
+
+**OSPFv2 resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages OSPFv2 configuration on devices running Cisco NX-OS.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="8">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of OSPF process configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>processes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of OSPF instances&#x27; configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure properties of OSPF Areas.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Area ID as an integer or IP Address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication settings for the Area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use message-digest authentication.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set authentication for the area.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the default cost for default summary LSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter prefixes between OSPF areas.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>The direction to apply the route map.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Route-map name.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>NSSA settings for the area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Originate Type-7 default LSA into NSSA area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_redistribution</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send redistributed LSAs into NSSA area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSAs into NSSA area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure area as NSSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>translate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate LSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type7</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate from Type 7 to Type 5.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always translate LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>never</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Never translate LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>supress_fa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress forwarding address in translated LSAs.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ranges</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure an address range for the area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cost to use for the range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress advertising the specified range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP in Prefix format (x.x.x.x/len)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Settings for configuring the area as a stub.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Prevent ABR from sending summary LSAs into stub area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure the area as a stub.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Calculate OSPF cost according to bandwidth.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reference_bandwidth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Reference bandwidth used to assign OSPF cost.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>Gbps</li>
+ <li>Mbps</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify in which unit the reference bandwidth is specified.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable BFD on all OSPF interfaces.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Control distribution of default routes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distribute a default route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always advertise a default route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Policy to control distribution of default routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable distribution of default route.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify default metric for redistributed routes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure the OSPF administrative distance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flush_routes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Flush routes on a non-graceful controlled restart.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure graceful restart.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>grace_period</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure maximum interval to restart gracefully.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>helper_disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable helper mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable graceful-restart.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>isolate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Isolate this router from OSPF perspective.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_adjacency_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log changes in adjacency state.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>detail</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Notify all state changes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable logging changes in adjacency state.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Feature to limit the number of non-self-originated LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set count on how many times adjacencies can be suppressed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set time during which all adjacencies are suppressed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_non_self_generated_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the maximum number of non self-generated LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reset_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set number of minutes after which ignore-count is reset to zero.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Threshold value (%) at which to generate a warning message.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>warning_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log a warning message when limit is exceeded.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximize the cost metric.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router LSA configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>External LSA configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set max metric value for external LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set external-lsa attribute.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>include_stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise Max metric for Stub links as well.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_startup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Effective only at startup.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set on-startup attribute.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for_bgp_asn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ASN of BGP to wait for.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_period</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Wait period in seconds after startup.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set router-lsa attribute.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Summary LSAs configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Max metric value for summary LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set summary-lsa attribute.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum_paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum paths per destination.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mpls</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF MPLS configuration settings.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>traffic_eng</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF MPLS Traffic Engineering commands.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of Area IDs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Area Id as an integer or ip address.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multicast_intact</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>MPLS TE multicast support.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router ID associated with TE.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name_lookup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Display OSPF router ids as DNS names.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Suppress routing updates on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interfaces passive by default.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>process_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The OSPF process tag.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redistribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redistribute information from another routing protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The identifier for the protocol specified.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>bgp</li>
+ <li>direct</li>
+ <li>eigrp</li>
+ <li>isis</li>
+ <li>lisp</li>
+ <li>ospf</li>
+ <li>rip</li>
+ <li>static</li>
+ </ul>
+ </td>
+ <td>
+ <div>The name of the protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The route map policy to constrain redistribution.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rfc1583compatibility</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure 1583 compatibility for external path preferences.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set OSPF process router-id.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Shutdown the OSPF protocol instance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure route summarization for redistribution.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Supress advertising the specified summary.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP prefix in format x.x.x.x/ml.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A 32-bit tag value.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>table_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Policy for filtering/modifying OSPF routes before sending them to RIB.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Block the OSPF routes from being sent to RIB.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Route Map name.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure timer related constants.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_arrival</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Mimimum interval between arrival of a LSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_group_pacing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LSA group refresh/maxage interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throttle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure throttle related constants.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set rate-limiting for LSA generation.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hold_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The hold interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The max interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The start interval.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set OSPF SPF timers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>initial_spf_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Initial SPF schedule delay in milliseconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_wait_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum wait time between SPF calculations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_hold_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum hold time between SPF calculations.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrfs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure VRF specific OSPF settings.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure properties of OSPF Areas.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Area ID as an integer or IP Address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication settings for the Area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>message_digest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use message-digest authentication.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set authentication for the area.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the default cost for default summary LSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter prefixes between OSPF areas.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>The direction to apply the route map.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Route-map name.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>NSSA settings for the area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Originate Type-7 default LSA into NSSA area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_redistribution</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send redistributed LSAs into NSSA area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSAs into NSSA area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure area as NSSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>translate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate LSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type7</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate from Type 7 to Type 5.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always translate LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>never</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Never translate LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>supress_fa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress forwarding address in translated LSAs.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ranges</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure an address range for the area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cost to use for the range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress advertising the specified range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP in Prefix format (x.x.x.x/len)</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Settings for configuring the area as a stub.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Prevent ABR from sending summary LSAs into stub area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure the area as a stub.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Calculate OSPF cost according to bandwidth.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reference_bandwidth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Reference bandwidth used to assign OSPF cost.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>Gbps</li>
+ <li>Mbps</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify in which unit the reference bandwidth is specified.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable BFD on all OSPF interfaces.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>capability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>OSPF capability settings.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf_lite</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Enable VRF-lite capability settings.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>evpn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Ethernet VPN.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable VRF-lite support.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Control distribution of default routes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distribute a default route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always advertise a default route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Policy to control distribution of default routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable distribution of default route.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify default metric for redistributed routes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure the OSPF administrative distance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>down_bit_ignore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure a PE router to ignore the DN bit for network summary, external and NSSA external LSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure graceful restart.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>grace_period</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure maximum interval to restart gracefully.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>helper_disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable helper mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable graceful-restart.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_adjacency_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log changes in adjacency state.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>detail</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Notify all state changes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable logging changes in adjacency state.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Feature to limit the number of non-self-originated LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set count on how many times adjacencies can be suppressed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set time during which all adjacencies are suppressed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_non_self_generated_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the maximum number of non self-generated LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reset_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set number of minutes after which ignore-count is reset to zero.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Threshold value (%) at which to generate a warning message.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>warning_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log a warning message when limit is exceeded.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximize the cost metric.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router LSA configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>External LSA configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set max metric value for external LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set external-lsa attribute.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>include_stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise Max metric for Stub links as well.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_startup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Effective only at startup.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set on-startup attribute.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for_bgp_asn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ASN of BGP to wait for.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_period</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Wait period in seconds after startup.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set router-lsa attribute.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Summary LSAs configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Max metric value for summary LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set summary-lsa attribute.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum_paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum paths per destination.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name_lookup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Display OSPF router ids as DNS names.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Suppress routing updates on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interfaces passive by default.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redistribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redistribute information from another routing protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The identifier for the protocol specified.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>bgp</li>
+ <li>direct</li>
+ <li>eigrp</li>
+ <li>isis</li>
+ <li>lisp</li>
+ <li>ospf</li>
+ <li>rip</li>
+ <li>static</li>
+ </ul>
+ </td>
+ <td>
+ <div>The name of the protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The route map policy to constrain redistribution.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rfc1583compatibility</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure 1583 compatibility for external path preferences.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set OSPF process router-id.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Shutdown the OSPF protocol instance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure route summarization for redistribution.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Supress advertising the specified summary.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP prefix in format x.x.x.x/ml.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A 32-bit tag value.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>table_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Policy for filtering/modifying OSPF routes before sending them to RIB.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Block the OSPF routes from being sent to RIB.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Route Map name.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure timer related constants.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_arrival</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Mimimum interval between arrival of a LSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_group_pacing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LSA group refresh/maxage interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throttle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure throttle related constants.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set rate-limiting for LSA generation.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hold_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The hold interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The max interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The start interval.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set OSPF SPF timers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>initial_spf_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Initial SPF schedule delay in milliseconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_wait_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum wait time between SPF calculations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_hold_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum hold time between SPF calculations.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name/Identifier of the VRF.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section &quot;^router ospf .*&quot;</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ <li>rendered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NX-OS 7.0(3)I5(1).
+ - This module works with connection ``network_cli`` and ``httpapi``.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ # nxos-9k-rdo# sh running-config | section "^router ospf .*"
+ # nxos-9k-rdo#
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_ospfv2:
+ config:
+ processes:
+ - process_id: 100
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_1
+ direction: in
+ - route_map: rmap_2
+ direction: out
+ ranges:
+ - prefix: 198.51.100.64/27
+ not_advertise: true
+ - prefix: 198.51.100.96/27
+ cost: 120
+ - area_id: 0.0.0.101
+ authentication:
+ message_digest: true
+ redistribute:
+ - protocol: eigrp
+ id: 120
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ redistribute:
+ - protocol: static
+ route_map: zone1-static-connect
+ summary_address:
+ - prefix: 198.51.100.128/27
+ tag: 121
+ - prefix: 198.51.100.160/27
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: true
+ translate:
+ type7:
+ always: true
+ - vrf: zone2
+ auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ state: merged
+
+ # Task output
+ # -------------
+ # before: {}
+ #
+ # commands:
+ # - router ospf 102
+ # - router-id 198.51.100.1
+ # - redistribute eigrp 120 route-map rmap_1
+ # - redistribute direct route-map ospf102-direct-connect
+ # - area 0.0.0.100 filter-list route-map rmap_1 in
+ # - area 0.0.0.100 filter-list route-map rmap_2 out
+ # - area 0.0.0.100 range 198.51.100.64/27 not-advertise
+ # - area 0.0.0.100 range 198.51.100.96/27 cost 120
+ # - area 0.0.0.101 authentication message-digest
+ # - vrf zone1
+ # - router-id 198.51.100.129
+ # - summary-address 198.51.100.128/27 tag 121
+ # - summary-address 198.51.100.160/27
+ # - redistribute static route-map zone1-static-connect
+ # - area 0.0.0.102 nssa no-summary default-information-originate
+ # - area 0.0.0.103 nssa no-summary
+ # - area 0.0.0.103 nssa translate type7 always
+ # - vrf zone2
+ # - auto-cost reference-bandwidth 45 Gbps
+ # - router ospf 100
+ # - router-id 203.0.113.20
+ #
+ # after:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - areas:
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 198.51.100.64/27
+ # - cost: 120
+ # prefix: 198.51.100.96/27
+ # - area_id: 0.0.0.101
+ # authentication:
+ # message_digest: true
+ # process_id: "102"
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # - area_id: 0.0.0.103
+ # nssa:
+ # no_summary: true
+ # translate:
+ # type7:
+ # always: true
+ # redistribute:
+ # - protocol: static
+ # route_map: zone1-static-connect
+ # router_id: 198.51.100.129
+ # vrf: zone1
+ # - auto_cost:
+ # reference_bandwidth: 45
+ # unit: Gbps
+ # vrf: zone2
+ #
+
+ # After state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospf .*"
+ # router ospf 100
+ # router-id 203.0.113.20
+ # router ospf 102
+ # router-id 198.51.100.1
+ # redistribute direct route-map ospf102-direct-connect
+ # redistribute eigrp 120 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_2 out
+ # area 0.0.0.100 filter-list route-map rmap_1 in
+ # area 0.0.0.100 range 198.51.100.64/27 not-advertise
+ # area 0.0.0.100 range 198.51.100.96/27 cost 120
+ # area 0.0.0.101 authentication message-digest
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.0.102 nssa no-summary default-information-originate
+ # area 0.0.0.103 nssa no-summary
+ # area 0.0.0.103 nssa translate type7 always
+ # redistribute static route-map zone1-static-connect
+ # summary-address 198.51.100.128/27 tag 121
+ # summary-address 198.51.100.160/27
+ # vrf zone2
+ # auto-cost reference-bandwidth 45 Gbps
+
+ # Using replaced
+
+ # Before state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospf .*"
+ # router ospf 100
+ # router-id 203.0.113.20
+ # router ospf 102
+ # router-id 198.51.100.1
+ # redistribute direct route-map ospf102-direct-connect
+ # redistribute eigrp 120 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_2 out
+ # area 0.0.0.100 filter-list route-map rmap_1 in
+ # area 0.0.0.100 range 198.51.100.64/27 not-advertise
+ # area 0.0.0.100 range 198.51.100.96/27 cost 120
+ # area 0.0.0.101 authentication message-digest
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.0.102 nssa no-summary default-information-originate
+ # area 0.0.0.103 nssa no-summary
+ # area 0.0.0.103 nssa translate type7 always
+ # redistribute static route-map zone1-static-connect
+ # summary-address 198.51.100.128/27 tag 121
+ # summary-address 198.51.100.160/27
+ # vrf zone2
+ # auto-cost reference-bandwidth 45 Gbps
+
+ - name: Replace device configurations of listed OSPF processes with provided configurations
+ cisco.nxos.nxos_ospfv2:
+ config:
+ processes:
+ - process_id: 102
+ router_id: 198.51.100.1
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_8
+ direction: in
+ ranges:
+ - prefix: 198.51.100.64/27
+ not_advertise: true
+ - area_id: 0.0.0.101
+ stub:
+ no_summary: true
+ redistribute:
+ - protocol: eigrp
+ id: 130
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ redistribute:
+ - protocol: bgp
+ id: 65563
+ route_map: zone1-bgp-connect
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ state: replaced
+
+ # Task output
+ # -------------
+ # before:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - areas:
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 198.51.100.64/27
+ # - cost: 120
+ # prefix: 198.51.100.96/27
+ # - area_id: 0.0.0.101
+ # authentication:
+ # message_digest: true
+ # process_id: "102"
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # - area_id: 0.0.0.103
+ # nssa:
+ # no_summary: true
+ # translate:
+ # type7:
+ # always: true
+ # redistribute:
+ # - protocol: static
+ # route_map: zone1-static-connect
+ # router_id: 198.51.100.129
+ # vrf: zone1
+ # - auto_cost:
+ # reference_bandwidth: 45
+ # unit: Gbps
+ # vrf: zone2
+ #
+ # commands:
+ # - router ospf 102
+ # - redistribute eigrp 130 route-map rmap_1
+ # - no redistribute eigrp 120 route-map rmap_1
+ # - area 0.0.0.100 filter-list route-map rmap_8 in
+ # - no area 0.0.0.100 filter-list route-map rmap_2 out
+ # - no area 0.0.0.100 range 198.51.100.96/27
+ # - no area 0.0.0.101 authentication
+ # - area 0.0.0.101 stub no-summary
+ # - vrf zone1
+ # - no summary-address 198.51.100.128/27 tag 121
+ # - no summary-address 198.51.100.160/27
+ # - redistribute bgp 65563 route-map zone1-bgp-connect
+ # - no redistribute static route-map zone1-static-connect
+ # - no area 0.0.0.103 nssa
+ # - no area 0.0.0.103 nssa translate type7 always
+ # - no vrf zone2
+ #
+ # after:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - areas:
+ # - area_id: 0.0.0.101
+ # stub:
+ # no_summary: true
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: in
+ # route_map: rmap_8
+ # ranges:
+ # - not_advertise: true
+ # prefix: 198.51.100.64/27
+ # process_id: "102"
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "130"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # redistribute:
+ # - id: "65563"
+ # protocol: bgp
+ # route_map: zone1-bgp-connect
+ # router_id: 198.51.100.129
+ # vrf: zone1
+
+ # After state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospf .*"
+ # router ospf 100
+ # router-id 203.0.113.20
+ # router ospf 102
+ # router-id 198.51.100.1
+ # area 0.0.0.101 stub no-summary
+ # redistribute direct route-map ospf102-direct-connect
+ # redistribute eigrp 130 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_8 in
+ # area 0.0.0.100 range 198.51.100.64/27 not-advertise
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.0.102 nssa no-summary default-information-originate
+ # redistribute bgp 65563 route-map zone1-bgp-connect
+
+ # Using overridden
+
+ # Before state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospf .*"
+ # router ospf 100
+ # router-id 203.0.113.20
+ # router ospf 102
+ # router-id 198.51.100.1
+ # redistribute direct route-map ospf102-direct-connect
+ # redistribute eigrp 120 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_2 out
+ # area 0.0.0.100 filter-list route-map rmap_1 in
+ # area 0.0.0.100 range 198.51.100.64/27 not-advertise
+ # area 0.0.0.100 range 198.51.100.96/27 cost 120
+ # area 0.0.0.101 authentication message-digest
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.0.102 nssa no-summary default-information-originate
+ # area 0.0.0.103 nssa no-summary
+ # area 0.0.0.103 nssa translate type7 always
+ # redistribute static route-map zone1-static-connect
+ # summary-address 198.51.100.128/27 tag 121
+ # summary-address 198.51.100.160/27
+ # vrf zone2
+ # auto-cost reference-bandwidth 45 Gbps
+
+ - name: Overridde all OSPF configuration with provided configuration
+ cisco.nxos.nxos_ospfv2:
+ config:
+ processes:
+ - process_id: 104
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ shutdown: true
+ state: overridden
+
+ # Task output
+ # -------------
+ # before:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - areas:
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 198.51.100.64/27
+ # - cost: 120
+ # prefix: 198.51.100.96/27
+ # - area_id: 0.0.0.101
+ # authentication:
+ # message_digest: true
+ # process_id: "102"
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # - area_id: 0.0.0.103
+ # nssa:
+ # no_summary: true
+ # translate:
+ # type7:
+ # always: true
+ # redistribute:
+ # - protocol: static
+ # route_map: zone1-static-connect
+ # router_id: 198.51.100.129
+ # vrf: zone1
+ # - auto_cost:
+ # reference_bandwidth: 45
+ # unit: Gbps
+ # vrf: zone2
+ #
+ # commands:
+ # - no router ospf 100
+ # - router ospf 104
+ # - router-id 203.0.113.20
+ # - router ospf 102
+ # - shutdown
+ # - no redistribute direct route-map ospf102-direct-connect
+ # - no redistribute eigrp 120 route-map rmap_1
+ # - no area 0.0.0.100 filter-list route-map rmap_2 out
+ # - no area 0.0.0.100 filter-list route-map rmap_1 in
+ # - no area 0.0.0.100 range 198.51.100.64/27
+ # - no area 0.0.0.100 range 198.51.100.96/27
+ # - no area 0.0.0.101 authentication
+ # - no vrf zone1
+ # - no vrf zone2
+ #
+ # after:
+ # processes:
+ # - process_id: "102"
+ # router_id: 198.51.100.1
+ # shutdown: true
+ # - process_id: "104"
+ # router_id: 203.0.113.20
+
+ # After state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospf .*"
+ # router ospf 102
+ # router-id 198.51.100.1
+ # shutdown
+ # router ospf 104
+ # router-id 203.0.113.20
+
+ # Using deleted to delete a single OSPF process
+
+ # Before state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospf .*"
+ # router ospf 100
+ # router-id 203.0.113.20
+ # router ospf 102
+ # router-id 198.51.100.1
+ # redistribute direct route-map ospf102-direct-connect
+ # redistribute eigrp 120 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_2 out
+ # area 0.0.0.100 filter-list route-map rmap_1 in
+ # area 0.0.0.100 range 198.51.100.64/27 not-advertise
+ # area 0.0.0.100 range 198.51.100.96/27 cost 120
+ # area 0.0.0.101 authentication message-digest
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.0.102 nssa no-summary default-information-originate
+ # area 0.0.0.103 nssa no-summary
+ # area 0.0.0.103 nssa translate type7 always
+ # redistribute static route-map zone1-static-connect
+ # summary-address 198.51.100.128/27 tag 121
+ # summary-address 198.51.100.160/27
+ # vrf zone2
+ # auto-cost reference-bandwidth 45 Gbps
+
+ - name: Delete a single OSPF process
+ cisco.nxos.nxos_ospfv2:
+ config:
+ processes:
+ - process_id: 102
+ state: deleted
+
+ # Task output
+ # -------------
+ # before:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - areas:
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 198.51.100.64/27
+ # - cost: 120
+ # prefix: 198.51.100.96/27
+ # - area_id: 0.0.0.101
+ # authentication:
+ # message_digest: true
+ # process_id: "102"
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # - area_id: 0.0.0.103
+ # nssa:
+ # no_summary: true
+ # translate:
+ # type7:
+ # always: true
+ # redistribute:
+ # - protocol: static
+ # route_map: zone1-static-connect
+ # router_id: 198.51.100.129
+ # vrf: zone1
+ # - auto_cost:
+ # reference_bandwidth: 45
+ # unit: Gbps
+ # vrf: zone2
+ #
+ # commands:
+ # - no router ospf 102
+ #
+ # after:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+
+ # After state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospf .*"
+ # router ospf 100
+ # router-id 203.0.113.20
+
+ # Using deleted all OSPF processes from the device
+
+ # Before state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospf .*"
+ # router ospf 100
+ # router-id 203.0.113.20
+ # router ospf 102
+ # router-id 198.51.100.1
+ # redistribute direct route-map ospf102-direct-connect
+ # redistribute eigrp 120 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_2 out
+ # area 0.0.0.100 filter-list route-map rmap_1 in
+ # area 0.0.0.100 range 198.51.100.64/27 not-advertise
+ # area 0.0.0.100 range 198.51.100.96/27 cost 120
+ # area 0.0.0.101 authentication message-digest
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.0.102 nssa no-summary default-information-originate
+ # area 0.0.0.103 nssa no-summary
+ # area 0.0.0.103 nssa translate type7 always
+ # redistribute static route-map zone1-static-connect
+ # summary-address 198.51.100.128/27 tag 121
+ # summary-address 198.51.100.160/27
+ # vrf zone2
+ # auto-cost reference-bandwidth 45 Gbps
+
+ - name: Delete all OSPF processes from the device
+ cisco.nxos.nxos_ospfv2:
+ state: deleted
+
+ # Task output
+ # -------------
+ # before:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - areas:
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 198.51.100.64/27
+ # - cost: 120
+ # prefix: 198.51.100.96/27
+ # - area_id: 0.0.0.101
+ # authentication:
+ # message_digest: true
+ # process_id: "102"
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # - area_id: 0.0.0.103
+ # nssa:
+ # no_summary: true
+ # translate:
+ # type7:
+ # always: true
+ # redistribute:
+ # - protocol: static
+ # route_map: zone1-static-connect
+ # router_id: 198.51.100.129
+ # vrf: zone1
+ # - auto_cost:
+ # reference_bandwidth: 45
+ # unit: Gbps
+ # vrf: zone2
+ #
+ # commands:
+ # - no router ospf 100
+ # - no router ospf 102
+ #
+ # after: {}
+
+ # After state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospf .*"
+ # nxos-9k-rdo#
+
+ # Using rendered
+
+ - name: Render platform specific configuration lines (without connecting to the device)
+ cisco.nxos.nxos_ospfv2:
+ config:
+ processes:
+ - process_id: 100
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_1
+ direction: in
+ - route_map: rmap_2
+ direction: out
+ ranges:
+ - prefix: 198.51.100.64/27
+ not_advertise: true
+ - prefix: 198.51.100.96/27
+ cost: 120
+ - area_id: 0.0.0.101
+ authentication:
+ message_digest: true
+ redistribute:
+ - protocol: eigrp
+ id: 120
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ redistribute:
+ - protocol: static
+ route_map: zone1-static-connect
+ summary_address:
+ - prefix: 198.51.100.128/27
+ tag: 121
+ - prefix: 198.51.100.160/27
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: true
+ translate:
+ type7:
+ always: true
+ - vrf: zone2
+ auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+ # rendered:
+ # - router ospf 100
+ # - router-id 203.0.113.20
+ # - router ospf 102
+ # - router-id 198.51.100.1
+ # - redistribute eigrp 120 route-map rmap_1
+ # - redistribute direct route-map ospf102-direct-connect
+ # - area 0.0.0.100 filter-list route-map rmap_1 in
+ # - area 0.0.0.100 filter-list route-map rmap_2 out
+ # - area 0.0.0.100 range 198.51.100.64/27 not-advertise
+ # - area 0.0.0.100 range 198.51.100.96/27 cost 120
+ # - area 0.0.0.101 authentication message-digest
+ # - vrf zone1
+ # - router-id 198.51.100.129
+ # - summary-address 198.51.100.128/27 tag 121
+ # - summary-address 198.51.100.160/27
+ # - redistribute static route-map zone1-static-connect
+ # - area 0.0.0.102 nssa no-summary default-information-originate
+ # - area 0.0.0.103 nssa no-summary
+ # - area 0.0.0.103 nssa translate type7 always
+ # - vrf zone2
+ # - auto-cost reference-bandwidth 45 Gbps
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # router ospf 100
+ # router-id 192.0.100.1
+ # area 0.0.0.101 nssa no-summary no-redistribution
+ # area 0.0.0.102 stub no-summary
+ # redistribute direct route-map ospf-direct-connect
+ # redistribute eigrp 120 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_2 out
+ # area 0.0.0.100 filter-list route-map rmap_1 in
+ # area 0.0.0.100 range 192.0.2.0/24 not-advertise
+ # area 0.0.0.100 range 192.0.3.0/24 cost 120
+ # area 0.0.0.100 authentication message-digest
+ # vrf zone1
+ # router-id 192.0.100.2
+ # area 0.0.100.1 nssa no-summary no-redistribution
+ # redistribute static route-map zone1-direct-connect
+ # summary-address 10.0.0.0/24 tag 120
+ # summary-address 11.0.0.0/24 not-advertise
+ # vrf zone2
+ # auto-cost reference-bandwidth 45 Gbps
+ # down-bit-ignore
+ # capability vrf-lite evpn
+ # shutdown
+ # router ospf 102
+ # router-id 198.54.100.1
+ # shutdown
+ # vrf zone2
+ # summary-address 192.0.8.0/24 tag 120
+ # vrf zone4
+ # shutdown
+
+ - name: Parse externally provided OSPFv2 config
+ cisco.nxos.nxos_ospfv2:
+ running_config: "{{ lookup('file', 'ospfv2.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+ # parsed:
+ # processes:
+ # - process_id: "100"
+ # areas:
+ # - area_id: 0.0.0.101
+ # nssa:
+ # no_redistribution: true
+ # no_summary: true
+ # - area_id: 0.0.0.102
+ # stub:
+ # no_summary: true
+ # - area_id: 0.0.0.100
+ # authentication:
+ # message_digest: true
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 192.0.2.0/24
+ # - cost: 120
+ # prefix: 192.0.3.0/24
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # router_id: 192.0.100.1
+ # vrfs:
+ # - vrf: zone1
+ # areas:
+ # - area_id: 0.0.100.1
+ # nssa:
+ # no_redistribution: true
+ # no_summary: true
+ # redistribute:
+ # - protocol: static
+ # route_map: zone1-direct-connect
+ # router_id: 192.0.100.2
+ # summary_address:
+ # - prefix: 10.0.0.0/24
+ # tag: 120
+ # - not_advertise: true
+ # prefix: 11.0.0.0/24
+ # - vrf: zone2
+ # auto_cost:
+ # reference_bandwidth: 45
+ # unit: Gbps
+ # capability:
+ # vrf_lite:
+ # evpn: true
+ # down_bit_ignore: true
+ # shutdown: true
+ # - process_id: "102"
+ # router_id: 198.54.100.1
+ # shutdown: true
+ # vrfs:
+ # - vrf: zone2
+ # summary_address:
+ # - prefix: 192.0.8.0/24
+ # tag: 120
+ # - vrf: zone4
+ # shutdown: true
+
+ # Using gathered
+
+ - name: Gather OSPFv2 facts using gathered
+ cisco.nxos.nxos_ospfv2:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+ # gathered:
+ # processes:
+ # - process_id: "102"
+ # areas:
+ # - area_id: 0.0.0.101
+ # stub:
+ # no_summary: true
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: in
+ # route_map: rmap_8
+ # ranges:
+ # - not_advertise: true
+ # prefix: 198.51.100.64/27
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "130"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - vrf: zone1
+ # areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # redistribute:
+ # - id: "65563"
+ # protocol: bgp
+ # route_map: zone1-bgp-connect
+ # router_id: 198.51.100.129
+ #
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router ospf 102&#x27;, &#x27;router-id 198.54.100.1&#x27;, &#x27;router ospf 100&#x27;, &#x27;router-id 192.0.100.1&#x27;, &#x27;redistribute eigrp 120 route-map rmap_1&#x27;, &#x27;redistribute direct route-map ospf-direct-connect&#x27;, &#x27;area 0.0.0.100 filter-list route-map rmap_1 in&#x27;, &#x27;area 0.0.0.100 filter-list route-map rmap_2 out&#x27;, &#x27;area 0.0.0.100 range 192.0.2.0/24 not-advertise&#x27;, &#x27;area 0.0.0.100 range 192.0.3.0/24 cost 120&#x27;, &#x27;vrf zone1&#x27;, &#x27;router-id 192.0.100.2&#x27;, &#x27;summary-address 10.0.0.0/24 tag 121&#x27;, &#x27;summary-address 11.0.0.0/24&#x27;, &#x27;redistribute static route-map zone1-direct-connect&#x27;, &#x27;vrf zone2&#x27;, &#x27;auto-cost reference-bandwidth 45 Gbps&#x27;, &#x27;capability vrf-lite evpn&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@NilashishC)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospfv3_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospfv3_module.rst
new file mode 100644
index 00000000..99f0fc04
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ospfv3_module.rst
@@ -0,0 +1,4452 @@
+.. _cisco.nxos.nxos_ospfv3_module:
+
+
+**********************
+cisco.nxos.nxos_ospfv3
+**********************
+
+**OSPFv3 resource module**
+
+
+Version added: 1.2.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module manages OSPFv3 configuration on devices running Cisco NX-OS.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="8">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of OSPFv3 process configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="7">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>processes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of OSPFv3 instances&#x27; configurations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_family</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 unicast address-family OSPFv3 settings.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure OSPFv3 settings under IPv6 address-family.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure properties of OSPF Areas under address-family.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Area ID as an integer or IP Address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the default cost.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Filter prefixes between OSPF areas.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>in</li>
+ <li>out</li>
+ </ul>
+ </td>
+ <td>
+ <div>The direction to apply the route map.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Route-map name.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ranges</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure an address range for the area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Cost to use for the range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress advertising the specified range.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP in Prefix format (x.x.x.x/len)</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Control distribution of default routes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Distribute a default route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always advertise a default route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Policy to control distribution of default routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable distribution of default route.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure the OSPF administrative distance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>maximum_paths</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum paths per destination.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>redistribute</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Redistribute information from another routing protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The identifier for the protocol specified.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>bgp</li>
+ <li>direct</li>
+ <li>eigrp</li>
+ <li>isis</li>
+ <li>lisp</li>
+ <li>ospfv3</li>
+ <li>rip</li>
+ <li>static</li>
+ </ul>
+ </td>
+ <td>
+ <div>The name of the protocol.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The route map policy to constrain redistribution.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>safi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>unicast</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure OSPFv3 settings under IPv6 unicast address-family.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>summary_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure route summarization for redistribution.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>not_advertise</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Supress advertising the specified summary.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IPv6 prefix format &#x27;xxxx:xxxx/ml&#x27;, &#x27;xxxx:xxxx::/ml&#x27; or &#x27;xxxx::xx/128&#x27;</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A 32-bit tag value.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>table_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Policy for filtering/modifying OSPF routes before sending them to RIB.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Block the OSPF routes from being sent to RIB.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Route Map name.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure timer related constants.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throttle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure throttle related constants.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>spf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set OSPF SPF timers.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>initial_spf_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Initial SPF schedule delay in milliseconds.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_wait_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximum wait time between SPF calculations.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>min_hold_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Minimum hold time between SPF calculations.</div>
+ </td>
+ </tr>
+
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure properties of OSPF Areas.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Area ID as an integer or IP Address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>NSSA settings for the area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Originate Type-7 default LSA into NSSA area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_redistribution</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send redistributed LSAs into NSSA area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSAs into NSSA area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Policy to control distribution of default route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure area as NSSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>translate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate LSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type7</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate from Type 7 to Type 5.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always translate LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>never</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Never translate LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>supress_fa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress forwarding address in translated LSAs.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Settings for configuring the area as a stub.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Prevent ABR from sending summary LSAs into stub area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure the area as a stub.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Calculate OSPF cost according to bandwidth.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reference_bandwidth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Reference bandwidth used to assign OSPF cost.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>Gbps</li>
+ <li>Mbps</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify in which unit the reference bandwidth is specified.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>flush_routes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Flush routes on a non-graceful controlled restart.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure graceful restart.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>grace_period</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure maximum interval to restart gracefully.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>helper_disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable helper mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>planned_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable graceful restart only for a planned restart</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable graceful-restart.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>isolate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Isolate this router from OSPF perspective.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_adjacency_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log changes in adjacency state.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>detail</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Notify all state changes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable logging changes in adjacency state.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Feature to limit the number of non-self-originated LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set count on how many times adjacencies can be suppressed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set time during which all adjacencies are suppressed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_non_self_generated_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the maximum number of non self-generated LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reset_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set number of minutes after which ignore-count is reset to zero.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Threshold value (%) at which to generate a warning message.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>warning_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log a warning message when limit is exceeded.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximize the cost metric.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router LSA configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>External LSA configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set max metric value for external LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set external-lsa attribute.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inter_area_prefix_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Inter-area-prefix LSAs configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Max metric value for summary LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set summary-lsa attribute.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_startup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Effective only at startup.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set on-startup attribute.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for_bgp_asn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ASN of BGP to wait for.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_period</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Wait period in seconds after startup.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set router-lsa attribute.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub_prefix_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise Max metric for Stub links as well.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name_lookup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Display OSPF router ids as DNS names.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Suppress routing updates on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interfaces passive by default.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>process_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The OSPF process tag.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set OSPF process router-id.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Shutdown the OSPF protocol instance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure timer related constants.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_arrival</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Mimimum interval between arrival of a LSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_group_pacing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LSA group refresh/maxage interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throttle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure throttle related constants.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set rate-limiting for LSA generation.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hold_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The hold interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The max interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The start interval.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="6">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrfs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure VRF specific OSPF settings.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>areas</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure properties of OSPF Areas.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>area_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Area ID as an integer or IP Address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>nssa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>NSSA settings for the area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_information_originate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Originate Type-7 default LSA into NSSA area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_redistribution</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send redistributed LSAs into NSSA area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Do not send summary LSAs into NSSA area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Policy to control distribution of default route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure area as NSSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>translate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate LSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>type7</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Translate from Type 7 to Type 5.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>always</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Always translate LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>never</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Never translate LSAs</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>supress_fa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress forwarding address in translated LSAs.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Settings for configuring the area as a stub.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>no_summary</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Prevent ABR from sending summary LSAs into stub area.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configure the area as a stub.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_cost</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Calculate OSPF cost according to bandwidth.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reference_bandwidth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Reference bandwidth used to assign OSPF cost.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>unit</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>Gbps</li>
+ <li>Mbps</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify in which unit the reference bandwidth is specified.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>graceful_restart</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure graceful restart.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>grace_period</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure maximum interval to restart gracefully.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>helper_disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable helper mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>planned_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable graceful restart only for a planned restart</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable graceful-restart.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log_adjacency_changes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Log changes in adjacency state.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>detail</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Notify all state changes.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>log</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable logging changes in adjacency state.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Feature to limit the number of non-self-originated LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set count on how many times adjacencies can be suppressed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ignore_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set time during which all adjacencies are suppressed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_non_self_generated_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the maximum number of non self-generated LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reset_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set number of minutes after which ignore-count is reset to zero.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>threshold</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Threshold value (%) at which to generate a warning message.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>warning_only</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Log a warning message when limit is exceeded.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Maximize the cost metric.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Router LSA configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>external_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>External LSA configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set max metric value for external LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set external-lsa attribute.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>inter_area_prefix_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Inter-area-prefix LSAs configuration.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_metric_value</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Max metric value for summary LSAs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set summary-lsa attribute.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>on_startup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Effective only at startup.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set on-startup attribute.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_for_bgp_asn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ASN of BGP to wait for.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>wait_period</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Wait period in seconds after startup.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>set</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set router-lsa attribute.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>stub_prefix_lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Advertise Max metric for Stub links as well.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name_lookup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Display OSPF router ids as DNS names.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>passive_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Suppress routing updates on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Interfaces passive by default.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>router_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set OSPF process router-id.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Shutdown the OSPF protocol instance.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure timer related constants.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_arrival</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Mimimum interval between arrival of a LSA.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa_group_pacing</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>LSA group refresh/maxage interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>throttle</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure throttle related constants.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>lsa</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set rate-limiting for LSA generation.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hold_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The hold interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>max_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The max interval.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>start_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The start interval.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name/Identifier of the VRF.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section &quot;^router ospfv3&quot;</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="8">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>parsed</li>
+ <li>rendered</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NX-OS 7.0(3)I5(1).
+ - This module works with connection ``network_cli`` and ``httpapi``.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ # nxos-9k-rdo# sh running-config | section "^router ospfv3"
+ # nxos-9k-rdo#
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_ospfv3:
+ config:
+ processes:
+ - process_id: 100
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ address_family:
+ afi: ipv6
+ safi: unicast
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_1
+ direction: in
+ - route_map: rmap_2
+ direction: out
+ ranges:
+ - prefix: 2001:db2::/32
+ not_advertise: true
+ - prefix: 2001:db3::/32
+ cost: 120
+ redistribute:
+ - protocol: eigrp
+ id: 120
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: true
+ translate:
+ type7:
+ always: true
+ - vrf: zone2
+ auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ state: merged
+
+ # Task output
+ # -------------
+ # before: {}
+ #
+ # commands:
+ # - router ospf 102
+ # - router-id 198.51.100.1
+ # - address-family ipv6 unicast
+ # - redistribute eigrp 120 route-map rmap_1
+ # - redistribute direct route-map ospf102-direct-connect
+ # - area 0.0.0.100 filter-list route-map rmap_1 in
+ # - area 0.0.0.100 filter-list route-map rmap_2 out
+ # - area 0.0.0.100 range 2001:db2::/32 not-advertise
+ # - area 0.0.0.100 range 2001:db3::/32 cost 120
+ # - vrf zone1
+ # - router-id 198.51.100.129
+ # - area 0.0.0.102 nssa no-summary default-information-originate
+ # - area 0.0.0.103 nssa no-summary
+ # - area 0.0.0.103 nssa translate type7 always
+ # - vrf zone2
+ # - auto-cost reference-bandwidth 45 Gbps
+ # - router ospf 100
+ # - router-id 203.0.113.20
+ #
+ # after:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - address_family:
+ # afi: ipv4
+ # safi: unicast
+ # areas:
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 2001:db2::/32
+ # - cost: 120
+ # prefix: 2001:db3::/32
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # process_id: "102"
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # - area_id: 0.0.0.103
+ # nssa:
+ # no_summary: true
+ # translate:
+ # type7:
+ # always: true
+ # router_id: 198.51.100.129
+ # vrf: zone1
+ # - auto_cost:
+ # reference_bandwidth: 45
+ # unit: Gbps
+ # vrf: zone2
+ #
+
+ # After state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospfv3"
+ # router ospfv3 100
+ # router-id 203.0.113.20
+ # router ospfv3 102
+ # router-id 198.51.100.1
+ # address-family ipv6 unicast
+ # redistribute direct route-map ospf102-direct-connect
+ # redistribute eigrp 120 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_2 out
+ # area 0.0.0.100 filter-list route-map rmap_1 in
+ # area 0.0.0.100 range 2001:db2::/32 not-advertise
+ # area 0.0.0.100 range 2001:db3::/32 cost 120
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.0.102 nssa no-summary default-information-originate
+ # area 0.0.0.103 nssa no-summary
+ # area 0.0.0.103 nssa translate type7 always
+ # vrf zone2
+ # auto-cost reference-bandwidth 45 Gbps
+
+ # Using replaced
+
+ # Before state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospfv3"
+ # router ospfv3 100
+ # router-id 203.0.113.20
+ # router ospfv3 102
+ # router-id 198.51.100.1
+ # address-family upv6 unicast
+ # redistribute direct route-map ospf102-direct-connect
+ # redistribute eigrp 120 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_2 out
+ # area 0.0.0.100 filter-list route-map rmap_1 in
+ # area 0.0.0.100 range 2001:db2::/32 not-advertise
+ # area 0.0.0.100 range 2001:db3::/32 cost 120
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.0.102 nssa no-summary default-information-originate
+ # area 0.0.0.103 nssa no-summary
+ # area 0.0.0.103 nssa translate type7 always
+ # vrf zone2
+ # auto-cost reference-bandwidth 45 Gbps
+
+ - name: Replace device configurations of listed OSPFv3 processes with provided configurations
+ cisco.nxos.nxos_ospfv3:
+ config:
+ processes:
+ - process_id: 102
+ router_id: 198.51.100.1
+ address_family:
+ afi: ipv6
+ safi: unicast
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_8
+ direction: in
+ ranges:
+ - not_advertise: true
+ prefix: 2001:db2::/32
+ redistribute:
+ - protocol: eigrp
+ id: 130
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: True
+ no_summary: True
+ state: replaced
+
+ # Task output
+ # -------------
+ # before:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - address_family:
+ # afi: ipv4
+ # safi: unicast
+ # areas:
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 2001:db2::/32
+ # - cost: 120
+ # prefix: 2001:db3::/32
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # process_id: "102"
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # - area_id: 0.0.0.103
+ # nssa:
+ # no_summary: true
+ # translate:
+ # type7:
+ # always: true
+ # router_id: 198.51.100.129
+ # vrf: zone1
+ # - auto_cost:
+ # reference_bandwidth: 45
+ # unit: Gbps
+ # vrf: zone2
+ #
+ # commands:
+ # - router ospf 102
+ # - address-family ipv6 unicast
+ # - redistribute eigrp 130 route-map rmap_1
+ # - no redistribute eigrp 120 route-map rmap_1
+ # - area 0.0.0.100 filter-list route-map rmap_8 in
+ # - no area 0.0.0.100 filter-list route-map rmap_2 out
+ # - no area 0.0.0.100 range 2001:db3::/32
+ # - vrf zone1
+ # - no area 0.0.0.103 nssa
+ # - no area 0.0.0.103 nssa translate type7 always
+ # - no vrf zone2
+ #
+ # after:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - address_family:
+ # afi: ipv6
+ # safi: unicast
+ # areas:
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: in
+ # route_map: rmap_8
+ # ranges:
+ # - not_advertise: true
+ # prefix: 2001:db2::/32
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "130"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # process_id: "102"
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # router_id: 198.51.100.129
+ # vrf: zone1
+
+ # After state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospfv3"
+ # router ospfv3 100
+ # router-id 203.0.113.20
+ # router ospfv3 102
+ # router-id 198.51.100.1
+ # address-family ipv6 unicast
+ # redistribute direct route-map ospf102-direct-connect
+ # redistribute eigrp 130 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_8 in
+ # area 0.0.0.100 range 198.51.100.64/27 not-advertise
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.0.102 nssa no-summary default-information-originate
+
+ # Using overridden
+
+ # Before state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospfv3"
+ # router ospfv3 100
+ # router-id 203.0.113.20
+ # router ospfv3 102
+ # router-id 198.51.100.1
+ # address-family ipv6 unicast
+ # redistribute direct route-map ospf102-direct-connect
+ # redistribute eigrp 120 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_2 out
+ # area 0.0.0.100 filter-list route-map rmap_1 in
+ # area 0.0.0.100 range 2001:db2::/32 not-advertise
+ # area 0.0.0.100 range 2001:db3::/32 cost 120
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.0.102 nssa no-summary default-information-originate
+ # area 0.0.0.103 nssa no-summary
+ # area 0.0.0.103 nssa translate type7 always
+ # vrf zone2
+ # auto-cost reference-bandwidth 45 Gbps
+
+ - name: Overridde all OSPFv3 configuration with provided configuration
+ cisco.nxos.nxos_ospfv3:
+ config:
+ processes:
+ - process_id: 104
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ shutdown: true
+ state: overridden
+
+ # Task output
+ # -------------
+ # before:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - address_family:
+ # afi: ipv4
+ # safi: unicast
+ # areas:
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 2001:db2::/32
+ # - cost: 120
+ # prefix: 2001:db3::/32
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # process_id: "102"
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # - area_id: 0.0.0.103
+ # nssa:
+ # no_summary: true
+ # translate:
+ # type7:
+ # always: true
+ # router_id: 198.51.100.129
+ # vrf: zone1
+ # - auto_cost:
+ # reference_bandwidth: 45
+ # unit: Gbps
+ # vrf: zone2
+ #
+ # commands:
+ # - no router ospfv3 100
+ # - router ospfv3 104
+ # - router-id 203.0.113.20
+ # - router ospfv3 102
+ # - shutdown
+ # - address-family ipv6 unicast
+ # - no redistribute direct route-map ospf102-direct-connect
+ # - no redistribute eigrp 120 route-map rmap_1
+ # - no area 0.0.0.100 filter-list route-map rmap_2 out
+ # - no area 0.0.0.100 filter-list route-map rmap_1 in
+ # - no area 0.0.0.100 range 2001:db2::/32
+ # - no area 0.0.0.100 range 2001:db3::/32
+ # - no vrf zone1
+ # - no vrf zone2
+ #
+ # after:
+ # processes:
+ # - process_id: "102"
+ # router_id: 198.51.100.1
+ # shutdown: true
+ # address_family:
+ # afi: ipv6
+ # safi: unicast
+ # - process_id: "104"
+ # router_id: 203.0.113.20
+
+ # After state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospfv3"
+ # router ospfv3 102
+ # router-id 198.51.100.1
+ # address-family ipv6 unicast
+ # shutdown
+ # router ospfv3 104
+ # router-id 203.0.113.20
+
+ # Using deleted to delete a single OSPF process
+
+ # Before state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospf .*"
+ # router ospfv3 100
+ # router-id 203.0.113.20
+ # router ospfv3 102
+ # router-id 198.51.100.1
+ # address-family ipv6 unicast
+ # redistribute direct route-map ospf102-direct-connect
+ # redistribute eigrp 120 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_2 out
+ # area 0.0.0.100 filter-list route-map rmap_1 in
+ # area 0.0.0.100 range 2001:db2::/32 not-advertise
+ # area 0.0.0.100 range 2001:db3::/32 cost 120
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.0.102 nssa no-summary default-information-originate
+ # area 0.0.0.103 nssa no-summary
+ # area 0.0.0.103 nssa translate type7 always
+ # vrf zone2
+ # auto-cost reference-bandwidth 45 Gbps
+
+ - name: Delete a single OSPFv3 process
+ cisco.nxos.nxos_ospfv3:
+ config:
+ processes:
+ - process_id: 102
+ state: deleted
+
+ # Task output
+ # -------------
+ # before:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - address_family:
+ # afi: ipv4
+ # safi: unicast
+ # areas:
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 2001:db2::/32
+ # - cost: 120
+ # prefix: 2001:db3::/32
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # process_id: "102"
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # - area_id: 0.0.0.103
+ # nssa:
+ # no_summary: true
+ # translate:
+ # type7:
+ # always: true
+ # router_id: 198.51.100.129
+ # vrf: zone1
+ # - auto_cost:
+ # reference_bandwidth: 45
+ # unit: Gbps
+ # vrf: zone2
+ #
+ # commands:
+ # - no router ospfv3 102
+ #
+ # after:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+
+ # After state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospfv3"
+ # router ospfv3 100
+ # router-id 203.0.113.20
+
+ # Using deleted all OSPFv3 processes from the device
+
+ # Before state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospfv3"
+ # router ospfv3 100
+ # router-id 203.0.113.20
+ # router ospfv3 102
+ # router-id 198.51.100.1
+ # address-family ipv6 unicast
+ # redistribute direct route-map ospf102-direct-connect
+ # redistribute eigrp 120 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_2 out
+ # area 0.0.0.100 filter-list route-map rmap_1 in
+ # area 0.0.0.100 range 2001:db2::/32 not-advertise
+ # area 0.0.0.100 range 2001:db3::/32 cost 120
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.0.102 nssa no-summary default-information-originate
+ # area 0.0.0.103 nssa no-summary
+ # area 0.0.0.103 nssa translate type7 always
+ # vrf zone2
+ # auto-cost reference-bandwidth 45 Gbps
+
+ - name: Delete all OSPFv3 processes from the device
+ cisco.nxos.nxos_ospfv3:
+ state: deleted
+
+ # Task output
+ # -------------
+ # before:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - address_family:
+ # afi: ipv4
+ # safi: unicast
+ # areas:
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 2001:db2::/32
+ # - cost: 120
+ # prefix: 2001:db3::/32
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # process_id: "102"
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # - area_id: 0.0.0.103
+ # nssa:
+ # no_summary: true
+ # translate:
+ # type7:
+ # always: true
+ # router_id: 198.51.100.129
+ # vrf: zone1
+ # - auto_cost:
+ # reference_bandwidth: 45
+ # unit: Gbps
+ # vrf: zone2
+ #
+ # commands:
+ # - no router ospfv3 100
+ # - no router ospfv3 102
+ #
+ # after: {}
+
+ # After state:
+ # ------------
+ # nxos-9k-rdo# sh running-config | section "^router ospfv3"
+ # nxos-9k-rdo#
+
+ # Using rendered
+
+ - name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_ospfv3:
+ config:
+ processes:
+ - process_id: 100
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ address_family:
+ afi: ipv6
+ safi: unicast
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_1
+ direction: in
+ - route_map: rmap_2
+ direction: out
+ ranges:
+ - prefix: 2001:db2::/32
+ not_advertise: true
+ - prefix: 2001:db3::/32
+ cost: 120
+ redistribute:
+ - protocol: eigrp
+ id: 120
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: true
+ translate:
+ type7:
+ always: true
+ - vrf: zone2
+ auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+ # rendered:
+ # - router ospfv3 100
+ # - router-id 203.0.113.20
+ # - router ospfv3 102
+ # - router-id 198.51.100.1
+ # - address-family ipv6 unicast
+ # - redistribute eigrp 120 route-map rmap_1
+ # - redistribute direct route-map ospf102-direct-connect
+ # - area 0.0.0.100 filter-list route-map rmap_1 in
+ # - area 0.0.0.100 filter-list route-map rmap_2 out
+ # - area 0.0.0.100 range 2001:db2::/32 not-advertise
+ # - area 0.0.0.100 range 2001:db3::/32 cost 120
+ # - vrf zone1
+ # - router-id 198.51.100.129
+ # - area 0.0.0.102 nssa no-summary default-information-originate
+ # - area 0.0.0.103 nssa no-summary
+ # - area 0.0.0.103 nssa translate type7 always
+ # - vrf zone2
+ # - auto-cost reference-bandwidth 45 Gbps
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # router ospfv3 100
+ # router-id 192.0.100.1
+ # address-family ipv6 unicast
+ # redistribute direct route-map ospf-direct-connect
+ # redistribute eigrp 120 route-map rmap_1
+ # area 0.0.0.100 filter-list route-map rmap_2 out
+ # area 0.0.0.100 filter-list route-map rmap_1 in
+ # area 0.0.0.100 range 2001:db2::/32 not-advertise
+ # area 0.0.0.100 range 2001:db3::/32 cost 120
+ # vrf zone1
+ # router-id 198.51.100.129
+ # area 0.0.100.1 nssa no-summary no-redistribution
+ # router ospfv3 102
+ # router-id 198.54.100.1
+ # shutdown
+
+ - name: Parse externally provided OSPFv3 config
+ cisco.nxos.nxos_ospfv3:
+ running_config: "{{ lookup('file', 'ospfv2.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+ # parsed:
+ # processes:
+ # - process_id: "100"
+ # address_family:
+ # afi: ipv6
+ # safi: unicast
+ # areas:
+ # - area_id: 0.0.0.101
+ # nssa:
+ # no_redistribution: true
+ # no_summary: true
+ # - area_id: 0.0.0.102
+ # stub:
+ # no_summary: true
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 192.0.2.0/24
+ # - cost: 120
+ # prefix: 192.0.3.0/24
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # router_id: 192.0.100.1
+ # vrfs:
+ # - vrf: zone1
+ # areas:
+ # - area_id: 0.0.100.1
+ # nssa:
+ # no_redistribution: true
+ # no_summary: true
+ # router_id: 192.0.100.2
+ # - process_id: "102"
+ # router_id: 198.54.100.1
+ # shutdown: True
+
+ # Using gathered
+
+ - name: Gather OSPFv3 facts using gathered
+ cisco.nxos.nxos_ospfv3:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+ # gathered:
+ # processes:
+ # - process_id: "100"
+ # router_id: 203.0.113.20
+ # - address_family:
+ # afi: ipv4
+ # safi: unicast
+ # areas:
+ # - area_id: 0.0.0.100
+ # filter_list:
+ # - direction: out
+ # route_map: rmap_2
+ # - direction: in
+ # route_map: rmap_1
+ # ranges:
+ # - not_advertise: true
+ # prefix: 2001:db2::/32
+ # - cost: 120
+ # prefix: 2001:db3::/32
+ # redistribute:
+ # - protocol: direct
+ # route_map: ospf102-direct-connect
+ # - id: "120"
+ # protocol: eigrp
+ # route_map: rmap_1
+ # process_id: "102"
+ # router_id: 198.51.100.1
+ # vrfs:
+ # - areas:
+ # - area_id: 0.0.0.102
+ # nssa:
+ # default_information_originate: true
+ # no_summary: true
+ # - area_id: 0.0.0.103
+ # nssa:
+ # no_summary: true
+ # translate:
+ # type7:
+ # always: true
+ # router_id: 198.51.100.129
+ # vrf: zone1
+ # - auto_cost:
+ # reference_bandwidth: 45
+ # unit: Gbps
+ # vrf: zone2
+ #
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router ospfv3 102&#x27;, &#x27;router-id 198.54.100.1&#x27;, &#x27;router ospfv3 100&#x27;, &#x27;router-id 192.0.100.1&#x27;, &#x27;address-family ipv6 unicast&#x27;, &#x27;redistribute eigrp 120 route-map rmap_1&#x27;, &#x27;redistribute direct route-map ospf-direct-connect&#x27;, &#x27;area 0.0.0.100 filter-list route-map rmap_1 in&#x27;, &#x27;area 0.0.0.100 filter-list route-map rmap_2 out&#x27;, &#x27;area 0.0.0.100 range 2001:db2::/32 not-advertise&#x27;, &#x27;area 0.0.0.100 range 2001:db3::/32 cost 120&#x27;, &#x27;vrf zone1&#x27;, &#x27;router-id 192.0.100.2&#x27;, &#x27;vrf zone2&#x27;, &#x27;auto-cost reference-bandwidth 45 Gbps&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Nilashish Chakraborty (@NilashishC)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_overlay_global_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_overlay_global_module.rst
new file mode 100644
index 00000000..45ab5308
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_overlay_global_module.rst
@@ -0,0 +1,353 @@
+.. _cisco.nxos.nxos_overlay_global_module:
+
+
+******************************
+cisco.nxos.nxos_overlay_global
+******************************
+
+**Configures anycast gateway MAC of the switch.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Configures anycast gateway MAC of the switch.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>anycast_gateway_mac</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Anycast gateway mac of the switch.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - Default restores params default value
+ - Supported MAC address format are "E.E.E", "EE-EE-EE-EE-EE-EE", "EE:EE:EE:EE:EE:EE" and "EEEE.EEEE.EEEE"
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_overlay_global:
+ anycast_gateway_mac: b.b.b
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;fabric forwarding anycast-gateway-mac 000B.000B.000B&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_pim_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_pim_interface_module.rst
new file mode 100644
index 00000000..5f50de3e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_pim_interface_module.rst
@@ -0,0 +1,612 @@
+.. _cisco.nxos.nxos_pim_interface_module:
+
+
+*****************************
+cisco.nxos.nxos_pim_interface
+*****************************
+
+**Manages PIM interface configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages PIM interface configuration settings.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables BFD for PIM at the interface level. This overrides the bfd variable set at the pim global level.</div>
+ <div>Valid values are &#x27;enable&#x27;, &#x27;disable&#x27; or &#x27;default&#x27;.</div>
+ <div>Dependency: &#x27;&#x27;feature bfd&#x27;&#x27;</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>border</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures interface to be a boundary of a PIM domain.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dr_prio</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures priority for PIM DR election on interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello_auth_key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication for hellos on this interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hello_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Hello interval in milliseconds for this interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of the interface such as Ethernet1/33.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>jp_policy_in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Policy for join-prune messages (inbound).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>jp_policy_out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Policy for join-prune messages (outbound).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>jp_type_in</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>prefix</li>
+ <li>routemap</li>
+ </ul>
+ </td>
+ <td>
+ <div>Type of policy mapped to <code>jp_policy_in</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>jp_type_out</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>prefix</li>
+ <li>routemap</li>
+ </ul>
+ </td>
+ <td>
+ <div>Type of policy mapped to <code>jp_policy_out</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_policy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures a neighbor policy for filtering adjacencies.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>neighbor_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>prefix</li>
+ <li>routemap</li>
+ </ul>
+ </td>
+ <td>
+ <div>Type of policy mapped to neighbor_policy.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sparse</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/disable sparse-mode on the interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manages desired state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - When ``state=default``, supported params will be reset to a default state. These include ``dr_prio``, ``hello_auth_key``, ``hello_interval``, ``jp_policy_out``, ``jp_policy_in``, ``jp_type_in``, ``jp_type_out``, ``border``, ``neighbor_policy``, ``neighbor_type``.
+ - The ``hello_auth_key`` param is not idempotent.
+ - ``hello_auth_key`` only supports clear text passwords.
+ - When ``state=absent``, pim interface configuration will be set to defaults and pim-sm will be disabled on the interface.
+ - PIM must be enabled on the device to use this module.
+ - This module is for Layer 3 interfaces.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Ensure PIM is not running on the interface
+ cisco.nxos.nxos_pim_interface:
+ interface: eth1/33
+ state: absent
+
+ - name: Ensure the interface has pim-sm enabled with the appropriate priority and
+ hello interval
+ cisco.nxos.nxos_pim_interface:
+ interface: eth1/33
+ dr_prio: 10
+ hello_interval: 40
+ state: present
+
+ - name: Ensure join-prune policies exist
+ cisco.nxos.nxos_pim_interface:
+ interface: eth1/33
+ jp_policy_in: JPIN
+ jp_policy_out: JPOUT
+ jp_type_in: routemap
+ jp_type_out: routemap
+
+ - name: disable bfd on the interface
+ cisco.nxos.nxos_pim_interface:
+ interface: eth1/33
+ bfd: disable
+
+ - name: Ensure defaults are in place
+ cisco.nxos.nxos_pim_interface:
+ interface: eth1/33
+ state: default
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface eth1/33&#x27;, &#x27;ip pim neighbor-policy test&#x27;, &#x27;ip pim bfd-instance disable&#x27;, &#x27;ip pim neighbor-policy test&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_pim_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_pim_module.rst
new file mode 100644
index 00000000..792bb32b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_pim_module.rst
@@ -0,0 +1,380 @@
+.. _cisco.nxos.nxos_pim_module:
+
+
+*******************
+cisco.nxos.nxos_pim
+*******************
+
+**Manages configuration of a PIM instance.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages configuration of a Protocol Independent Multicast (PIM) instance.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bfd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enable</li>
+ <li>disable</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables BFD on all PIM interfaces.</div>
+ <div>Dependency: &#x27;&#x27;feature bfd&#x27;&#x27;</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssm_range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure group ranges for Source Specific Multicast (SSM). Valid values are multicast addresses or the keyword <code>none</code> or keyword <code>default</code>. <code>none</code> removes all SSM group ranges. <code>default</code> will set ssm_range to the default multicast address. If you set multicast address, please ensure that it is not the same as the <code>default</code>, otherwise use the <code>default</code> option.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Configure ssm_range, enable bfd
+ cisco.nxos.nxos_pim:
+ bfd: enable
+ ssm_range: 224.0.0.0/8
+
+ - name: Set to default
+ cisco.nxos.nxos_pim:
+ ssm_range: default
+
+ - name: Remove all ssm group ranges
+ cisco.nxos.nxos_pim:
+ ssm_range: none
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ip pim bfd&#x27;, &#x27;ip pim ssm range 224.0.0.0/8&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_pim_rp_address_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_pim_rp_address_module.rst
new file mode 100644
index 00000000..ad404f6b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_pim_rp_address_module.rst
@@ -0,0 +1,436 @@
+.. _cisco.nxos.nxos_pim_rp_address_module:
+
+
+******************************
+cisco.nxos.nxos_pim_rp_address
+******************************
+
+**Manages configuration of an PIM static RP address instance.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages configuration of an Protocol Independent Multicast (PIM) static rendezvous point (RP) address instance.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>bidir</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Group range is treated in PIM bidirectional mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Group range for static RP. Valid values are multicast addresses.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Prefix list policy for static RP. Valid values are prefix-list policy names.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_map</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route map policy for static RP. Valid values are route-map policy names.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rp_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures a Protocol Independent Multicast (PIM) static rendezvous point (RP) address. Valid values are unicast addresses.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify desired state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - ``state=absent`` is currently not supported on all platforms.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_pim_rp_address:
+ rp_address: 10.1.1.20
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;router bgp 65535&#x27;, &#x27;vrf test&#x27;, &#x27;router-id 192.0.2.1&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ping_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ping_module.rst
new file mode 100644
index 00000000..8feb3f4b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_ping_module.rst
@@ -0,0 +1,503 @@
+.. _cisco.nxos.nxos_ping_module:
+
+
+********************
+cisco.nxos.nxos_ping
+********************
+
+**Tests reachability using ping from Nexus switch.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Tests reachability using ping from switch to a remote destination.
+- For a general purpose network module, see the :ref:`ansible.netcommon.net_ping <ansible.netcommon.net_ping_module>` module.
+- For Windows targets, use the :ref:`ansible.windows.win_ping <ansible.windows.win_ping_module>` module instead.
+- For targets running Python, use the :ref:`ansible.builtin.ping <ansible.builtin.ping_module>` module instead.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>count</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">5</div>
+ </td>
+ <td>
+ <div>Number of packets to send.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP address or hostname (resolvable by switch) of remote node.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source IP Address or hostname (resolvable by switch)</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>absent</li>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines if the expected result is success or fail.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Outgoing VRF.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For a general purpose network module, see the :ref:`ansible.netcommon.net_ping <ansible.netcommon.net_ping_module>` module.
+ - For Windows targets, use the :ref:`ansible.windows.win_ping <ansible.windows.win_ping_module>` module instead.
+ - For targets running Python, use the :ref:`ansible.builtin.ping <ansible.builtin.ping_module>` module instead.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Test reachability to 8.8.8.8 using mgmt vrf
+ cisco.nxos.nxos_ping:
+ dest: 8.8.8.8
+ vrf: management
+ host: 68.170.147.165
+
+ - name: Test reachability to a few different public IPs using mgmt vrf
+ cisco.nxos.nxos_ping:
+ dest: nxos_ping
+ vrf: management
+ host: 68.170.147.165
+ with_items:
+ - 8.8.8.8
+ - 4.4.4.4
+ - 198.6.1.4
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Show the command sent</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ping 8.8.8.8 count 2 vrf management&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>packet_loss</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Percentage of packets lost</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">0.00%</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>packets_rx</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Packets successfully received</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">2</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>packets_tx</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Packets successfully transmitted</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">2</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>rtt</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Show RTT stats</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;avg&#x27;: 6.264, &#x27;max&#x27;: 6.564, &#x27;min&#x27;: 5.978}</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_reboot_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_reboot_module.rst
new file mode 100644
index 00000000..3a3735d4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_reboot_module.rst
@@ -0,0 +1,356 @@
+.. _cisco.nxos.nxos_reboot_module:
+
+
+**********************
+cisco.nxos.nxos_reboot
+**********************
+
+**Reboot a network device.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Reboot a network device.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>confirm</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Safeguard boolean. Set to true if you&#x27;re sure you want to reboot.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - The module will fail due to timeout issues, but the reboot will be performed anyway.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_reboot:
+ confirm: true
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>rebooted</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>success</td>
+ <td>
+ <div>Whether the device was instructed to reboot.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_rollback_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_rollback_module.rst
new file mode 100644
index 00000000..5e54f1c1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_rollback_module.rst
@@ -0,0 +1,392 @@
+.. _cisco.nxos.nxos_rollback_module:
+
+
+************************
+cisco.nxos.nxos_rollback
+************************
+
+**Set a checkpoint or rollback to a checkpoint.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module offers the ability to set a configuration checkpoint file or rollback to a configuration checkpoint file on Cisco NXOS switches.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>checkpoint_file</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of checkpoint file to create. Mutually exclusive with rollback_to.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rollback_to</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of checkpoint file to rollback to. Mutually exclusive with checkpoint_file.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - Sometimes ``transport=nxapi`` may cause a timeout error.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_rollback:
+ checkpoint_file: backup.cfg
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+ host: '{{ inventory_hostname }}'
+ - cisco.nxos.nxos_rollback:
+ rollback_to: backup.cfg
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+ host: '{{ inventory_hostname }}'
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>filename</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>success</td>
+ <td>
+ <div>The filename of the checkpoint/rollback file.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">backup.cfg</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>status</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>success</td>
+ <td>
+ <div>Which operation took place and whether it was successful.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">rollback executed</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_rpm_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_rpm_module.rst
new file mode 100644
index 00000000..f6d4f5f5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_rpm_module.rst
@@ -0,0 +1,459 @@
+.. _cisco.nxos.nxos_rpm_module:
+
+
+*******************
+cisco.nxos.nxos_rpm
+*******************
+
+**Install patch or feature rpms on Cisco NX-OS devices.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Install software maintenance upgrade (smu) RPMS and 3rd party RPMS on Cisco NX-OS devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of RPM/patch definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>file_system</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The remote file system of the device. If omitted, devices that support a file_system parameter will use their default values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pkg</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the RPM package.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>If the state is present, the rpm will be installed, If the state is absent, it will be removed.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>file_system</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"bootflash"</div>
+ </td>
+ <td>
+ <div>The remote file system of the device. If omitted, devices that support a file_system parameter will use their default values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pkg</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the RPM package.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>If the state is present, the rpm will be installed, If the state is absent, it will be removed.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.0(3)I2(5), 7.0(3)I4(6), 7.0(3)I5(3), 7.0(3)I6(1), 7.0(3)I7(3)
+ - For patches, the minimum platform version needed is 7.0(3)I2(5)
+ - For feature rpms, the minimum platform version needed is 7.0(3)I6(1)
+ - The module manages the entire RPM lifecycle (Add, activate, commit, deactivate, remove)
+ - For reload patches, this module is NOT idempotent until the patch is committed.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_rpm:
+ pkg: nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000.rpm
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;install add bootflash:nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000.rpm forced&#x27;, &#x27;install activate nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000 forced&#x27;, &#x27;install commit nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Sai Chintalapudi (@saichint)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_smu_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_smu_module.rst
new file mode 100644
index 00000000..fe81bdbe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_smu_module.rst
@@ -0,0 +1,380 @@
+.. _cisco.nxos.nxos_smu_module:
+
+
+*******************
+cisco.nxos.nxos_smu
+*******************
+
+**(deprecated, removed after 2022-10-01) Perform SMUs on Cisco NX-OS devices.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-10-01
+:Why: Updated modules released with more functionality.
+:Alternative: nxos_rpm
+
+
+
+Synopsis
+--------
+- Perform software maintenance upgrades (SMUs) on Cisco NX-OS devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>file_system</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"bootflash:"</div>
+ </td>
+ <td>
+ <div>The remote file system of the device. If omitted, devices that support a file_system parameter will use their default values.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pkg</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the remote package.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - The module can only activate and commit a package, not remove or deactivate it.
+ - Use ``transport=nxapi`` to avoid connection timeout
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_smu:
+ pkg: nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;install add bootflash:nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm&#x27;, &#x27;install activate bootflash:nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm force&#x27;, &#x27;install commit bootflash:nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snapshot_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snapshot_module.rst
new file mode 100644
index 00000000..af135d60
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snapshot_module.rst
@@ -0,0 +1,596 @@
+.. _cisco.nxos.nxos_snapshot_module:
+
+
+************************
+cisco.nxos.nxos_snapshot
+************************
+
+**Manage snapshots of the running states of selected features.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Create snapshots of the running states of selected features, add new show commands for snapshot creation, delete and compare existing snapshots.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>action</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>add</li>
+ <li>compare</li>
+ <li>create</li>
+ <li>delete</li>
+ <li>delete_all</li>
+ </ul>
+ </td>
+ <td>
+ <div>Define what snapshot action the module would perform.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>compare_option</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>summary</li>
+ <li>ipv4routes</li>
+ <li>ipv6routes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Snapshot options to be used when <code>action=compare</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>comparison_results_file</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the file where snapshots comparison will be stored when <code>action=compare</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Snapshot description to be used when <code>action=create</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>element_key1</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the tags used to distinguish among row entries, to be used when <code>action=add</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>element_key2</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the tags used to distinguish among row entries, to be used when <code>action=add</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>path</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"./"</div>
+ </td>
+ <td>
+ <div>Specify the path of the file where new created snapshot or snapshots comparison will be stored, to be used when <code>action=create</code> and <code>save_snapshot_locally=true</code> or <code>action=compare</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>row_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the tag of each row entry of the show command&#x27;s XML output, to be used when <code>action=add</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>save_snapshot_locally</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify to locally store a new created snapshot, to be used when <code>action=create</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>section</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Used to name the show command output, to be used when <code>action=add</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>show_command</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify a new show command, to be used when <code>action=add</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>snapshot1</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>First snapshot to be used when <code>action=compare</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>snapshot2</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Second snapshot to be used when <code>action=compare</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>snapshot_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Snapshot name, to be used when <code>action=create</code> or <code>action=delete</code>.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - ``transport=cli`` may cause timeout errors.
+ - The ``element_key1`` and ``element_key2`` parameter specify the tags used to distinguish among row entries. In most cases, only the element_key1 parameter needs to specified to be able to distinguish among row entries.
+ - ``action=compare`` will always store a comparison report on a local file.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Create a snapshot and store it locally
+ - cisco.nxos.nxos_snapshot:
+ action: create
+ snapshot_name: test_snapshot
+ description: Done with Ansible
+ save_snapshot_locally: true
+ path: /home/user/snapshots/
+
+ # Delete a snapshot
+ - cisco.nxos.nxos_snapshot:
+ action: delete
+ snapshot_name: test_snapshot
+
+ # Delete all existing snapshots
+ - cisco.nxos.nxos_snapshot:
+ action: delete_all
+
+ # Add a show command for snapshots creation
+ - cisco.nxos.nxos_snapshot:
+ section: myshow
+ show_command: show ip interface brief
+ row_id: ROW_intf
+ element_key1: intf-name
+
+ # Compare two snapshots
+ - cisco.nxos.nxos_snapshot:
+ action: compare
+ snapshot1: pre_snapshot
+ snapshot2: post_snapshot
+ comparison_results_file: compare_snapshots.txt
+ compare_option: summary
+ path: ../snapshot_reports/
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>verbose mode</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;snapshot create post_snapshot Post-snapshot&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_community_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_community_module.rst
new file mode 100644
index 00000000..f5e89673
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_community_module.rst
@@ -0,0 +1,423 @@
+.. _cisco.nxos.nxos_snmp_community_module:
+
+
+******************************
+cisco.nxos.nxos_snmp_community
+******************************
+
+**Manages SNMP community configs.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages SNMP community configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>access</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ro</li>
+ <li>rw</li>
+ </ul>
+ </td>
+ <td>
+ <div>Access type for community.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>acl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ACL name to filter snmp requests or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>community</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Case-sensitive community string.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Group to which the community belongs.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # ensure snmp community is configured
+ - cisco.nxos.nxos_snmp_community:
+ community: TESTING7
+ group: network-operator
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;snmp-server community TESTING7 group network-operator&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_contact_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_contact_module.rst
new file mode 100644
index 00000000..ccd4c8ee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_contact_module.rst
@@ -0,0 +1,374 @@
+.. _cisco.nxos.nxos_snmp_contact_module:
+
+
+****************************
+cisco.nxos.nxos_snmp_contact
+****************************
+
+**Manages SNMP contact info.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages SNMP contact information.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>contact</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Contact information.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - ``state=absent`` removes the contact configuration if it is configured.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # ensure snmp contact is configured
+ - cisco.nxos.nxos_snmp_contact:
+ contact: Test
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;snmp-server contact New_Test&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_host_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_host_module.rst
new file mode 100644
index 00000000..3141cfa4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_host_module.rst
@@ -0,0 +1,510 @@
+.. _cisco.nxos.nxos_snmp_host_module:
+
+
+*************************
+cisco.nxos.nxos_snmp_host
+*************************
+
+**Manages SNMP host configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages SNMP host configuration parameters.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>community</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Community string or v3 username.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>snmp_host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP address of hostname of target host.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>snmp_type</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>trap</li>
+ <li>inform</li>
+ </ul>
+ </td>
+ <td>
+ <div>type of message to send to host. If this is not specified, trap type is used.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>src_intf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source interface. Must be fully qualified interface name. If state = absent, the interface is removed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource. If state = present, the host is added to the configuration. If only vrf and/or vrf_filter and/or src_intf are given, they will be added to the existing host configuration. If state = absent, the host is removed if community parameter is given. It is possible to remove only vrf and/or src_int and/or vrf_filter by providing only those parameters and no community parameter.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>udp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">162</div>
+ </td>
+ <td>
+ <div>UDP port number (0-65535).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>v3</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>noauth</li>
+ <li>auth</li>
+ <li>priv</li>
+ </ul>
+ </td>
+ <td>
+ <div>Use this when verion is v3. SNMPv3 Security level.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>version</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>v1</li>
+ <li>v2c</li>
+ <li>v3</li>
+ </ul>
+ </td>
+ <td>
+ <div>SNMP version. If this is not specified, v1 is used.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VRF to use to source traffic to source. If state = absent, the vrf is removed.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf_filter</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of VRF to filter. If state = absent, the vrf is removed from the filter.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - ``state=absent`` removes the host configuration if it is configured.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # ensure snmp host is configured
+ - cisco.nxos.nxos_snmp_host:
+ snmp_host: 192.0.2.3
+ community: TESTING
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;snmp-server host 192.0.2.3 filter-vrf another_test_vrf&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_location_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_location_module.rst
new file mode 100644
index 00000000..26a09103
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_location_module.rst
@@ -0,0 +1,378 @@
+.. _cisco.nxos.nxos_snmp_location_module:
+
+
+*****************************
+cisco.nxos.nxos_snmp_location
+*****************************
+
+**Manages SNMP location information.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages SNMP location configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>location</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Location information.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # ensure snmp location is configured
+ - cisco.nxos.nxos_snmp_location:
+ location: Test
+ state: present
+
+ # ensure snmp location is not configured
+ - cisco.nxos.nxos_snmp_location:
+ location: Test
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;snmp-server location New_Test&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_traps_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_traps_module.rst
new file mode 100644
index 00000000..7bc9040d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_traps_module.rst
@@ -0,0 +1,411 @@
+.. _cisco.nxos.nxos_snmp_traps_module:
+
+
+**************************
+cisco.nxos.nxos_snmp_traps
+**************************
+
+**Manages SNMP traps.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages SNMP traps configurations.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>aaa</li>
+ <li>bfd</li>
+ <li>bgp</li>
+ <li>bridge</li>
+ <li>callhome</li>
+ <li>cfs</li>
+ <li>config</li>
+ <li>eigrp</li>
+ <li>entity</li>
+ <li>feature-control</li>
+ <li>generic</li>
+ <li>hsrp</li>
+ <li>license</li>
+ <li>link</li>
+ <li>lldp</li>
+ <li>mmode</li>
+ <li>ospf</li>
+ <li>pim</li>
+ <li>rf</li>
+ <li>rmon</li>
+ <li>snmp</li>
+ <li>storm-control</li>
+ <li>stpx</li>
+ <li>switchfabric</li>
+ <li>syslog</li>
+ <li>sysmgr</li>
+ <li>system</li>
+ <li>upgrade</li>
+ <li>vtp</li>
+ <li>all</li>
+ </ul>
+ </td>
+ <td>
+ <div>Case sensitive group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>enabled</b>&nbsp;&larr;</div></li>
+ <li>disabled</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - This module works at the group level for traps. If you need to only enable/disable 1 specific trap within a group, use the :ref:`cisco.nxos.nxos_command <cisco.nxos.nxos_command_module>` module.
+ - Be aware that you can set a trap only for an enabled feature.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # ensure lldp trap configured
+ - cisco.nxos.nxos_snmp_traps:
+ group: lldp
+ state: enabled
+
+ # ensure lldp trap is not configured
+ - cisco.nxos.nxos_snmp_traps:
+ group: lldp
+ state: disabled
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">snmp-server enable traps lldp ;</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_user_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_user_module.rst
new file mode 100644
index 00000000..0f7e2eb3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_snmp_user_module.rst
@@ -0,0 +1,457 @@
+.. _cisco.nxos.nxos_snmp_user_module:
+
+
+*************************
+cisco.nxos.nxos_snmp_user
+*************************
+
+**Manages SNMP users for monitoring.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages SNMP user configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>md5</li>
+ <li>sha</li>
+ </ul>
+ </td>
+ <td>
+ <div>Authentication parameters for the user.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encrypt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables AES-128 bit encryption when using privacy password.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Group to which the user will belong to. If state = present, and the user is existing, the group is added to the user. If the user is not existing, user entry is created with this group argument. If state = absent, only the group is removed from the user entry. However, to maintain backward compatibility, if the existing user belongs to only one group, and if group argument is same as the existing user&#x27;s group, then the user entry also is deleted.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>privacy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Privacy password for the user. This is not idempotent</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pwd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Authentication password when using md5 or sha. This is not idempotent</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>user</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the user.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - Authentication parameters not idempotent.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_snmp_user:
+ user: ntc
+ group: network-operator
+ authentication: md5
+ pwd: test_password
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;snmp-server user ntc network-operator auth md5 test_password&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_static_route_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_static_route_module.rst
new file mode 100644
index 00000000..8edf03d9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_static_route_module.rst
@@ -0,0 +1,630 @@
+.. _cisco.nxos.nxos_static_route_module:
+
+
+****************************
+cisco.nxos.nxos_static_route
+****************************
+
+**(deprecated, removed after 2022-06-01) Manages static route configuration**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Updated modules released with more functionality
+:Alternative: nxos_static_routes
+
+
+
+Synopsis
+--------
+- Manages static route configuration
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of static route definitions</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Next hop address or interface of static route. If interface, it must be the fully-qualified interface name.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pref</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Preference or administrative difference of route (range 1-255) or keyword &#x27;default&#x27;.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: admin_distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination prefix of static route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the route or keyword &#x27;default&#x27;. Used with the name parameter on the CLI.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route tag value (numeric) or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>track</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Track value (range 1 - 512). Track must already be configured on the device before adding the route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VRF for static route.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hop</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Next hop address or interface of static route. If interface, it must be the fully-qualified interface name.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pref</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Preference or administrative difference of route (range 1-255) or keyword &#x27;default&#x27;.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: admin_distance</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>prefix</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination prefix of static route.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: address</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the route or keyword &#x27;default&#x27;. Used with the name parameter on the CLI.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route tag value (numeric) or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>track</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Track value (range 1 - 512). Track must already be configured on the device before adding the route.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">"default"</div>
+ </td>
+ <td>
+ <div>VRF for static route.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - If no vrf is supplied, vrf is set to default.
+ - If ``state=absent``, the route will be removed, regardless of the non-required parameters.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_static_route:
+ prefix: 192.168.20.64/24
+ next_hop: 192.0.2.3
+ route_name: testing
+ pref: 100
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ip route 192.168.20.0/24 192.0.2.3 name testing 100&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_static_routes_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_static_routes_module.rst
new file mode 100644
index 00000000..e6ed6852
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_static_routes_module.rst
@@ -0,0 +1,722 @@
+.. _cisco.nxos.nxos_static_routes_module:
+
+
+*****************************
+cisco.nxos.nxos_static_routes
+*****************************
+
+**Static routes resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module configures and manages the attributes of static routes on Cisco NX-OS platforms.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="5">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A list of configurations for static routes</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>address_families</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary specifying the address family to which the static route(s) belong.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies the top level address family indicator.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>routes</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary that specifies the static route configurations</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination prefix of static route</div>
+ <div>The address format is &lt;ipv4/v6 address&gt;/&lt;mask&gt;</div>
+ <div>The mask is number in range 0-32 for IPv4 and in range 0-128 for IPv6</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>next_hops</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Details of route to be taken</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_distance</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Preference or administrative distance of route (range 1-255)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>dest_vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VRF of the destination</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>forward_router_address</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>IP address of the next hop router</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Outgoing interface to take. For anything except &#x27;Null0&#x27;, then next hop IP address should also be configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the static route</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>tag</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Route tag value (numeric)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>track</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Track value (range 1 - 512). Track must already be configured on the device before adding the route.</div>
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The VRF to which the static route(s) belong</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the following commands in order <b>show running-config | include &#x27;^ip(v6</b>* route&#x27;) and <b>show running-config | section &#x27;^vrf context&#x27;</b>.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="5">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>deleted</li>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>overridden</li>
+ <li>replaced</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state the configuration should be left in</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NX-OS 7.3.(0)D1(1) on VIRL
+ - When a route is configured for a non-existent VRF, the VRF is created and the route is added to it.
+ - When deleting routes for a VRF, all routes inside the VRF are deleted, but the VRF is not deleted.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using deleted:
+
+ # Before state:
+ # -------------
+ #
+ # ip route 192.0.2.32/28 192.0.2.12 name new_route
+ # ip route 192.0.2.26/24 192.0.2.13 tag 12
+
+ - name: Delete all routes
+ cisco.nxos.nxos_static_routes:
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+
+
+ # Before state:
+ # ------------
+ #
+ # ip route 192.0.2.16/28 192.0.2.24 name new_route
+ # ip route 192.0.2.80/28 192.0.2.26 tag 12
+ # vrf context trial_vrf
+ # ip route 192.0.2.64/28 192.0.2.22 tag 4
+ # ip route 192.0.2.64/28 192.0.2.23 name merged_route 1
+ # ipv6 route 2200:10::/36 2048:ae12::1 vrf dest 5
+
+ - name: Delete routes based on VRF
+ cisco.nxos.nxos_static_routes:
+ config:
+ - vrf: trial_vrf
+ state: deleted
+
+ # After state:
+ # -----------
+ # ip route 192.0.2.16/28 192.0.2.24 name new_route
+ # ip route 192.0.2.80/28 192.0.2.26 tag 12
+ # vrf context trial_vrf
+
+
+ # Before state:
+ # ------------
+ #
+ # ip route 192.0.2.16/28 192.0.2.24 name new_route
+ # ip route 192.0.2.80/28 192.0.2.26 tag 12
+ # vrf context trial_vrf
+ # ip route 192.0.2.64/28 192.0.2.22 tag 4
+ # ip route 192.0.2.64/28 192.0.2.23 name merged_route 1
+ # ipv6 route 2200:10::/36 2048:ae12::1 vrf dest 5
+
+ - name: Delete routes based on AFI in a VRF
+ cisco.nxos.nxos_static_routes:
+ config:
+ - vrf: trial_vrf
+ address_families:
+ - afi: ipv4
+ state: deleted
+
+ # After state:
+ # -----------
+ # ip route 192.0.2.16/28 192.0.2.24 name new_route
+ # ip route 192.0.2.80/28 192.0.2.26 tag 12
+ # vrf context trial_vrf
+ # ipv6 route 2200:10::/36 2048:ae12::1 vrf dest 5
+
+
+ # Before state:
+ # -----------
+ # ip route 192.0.2.16/28 192.0.2.24 name new_route
+ # vrf context trial_vrf
+ # ipv6 route 2200:10::/36 2048:ae12::1 vrf dest 5
+
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ #
+
+ - name: Merge new static route configuration
+ cisco.nxos.nxos_static_routes:
+ config:
+ - vrf: trial_vrf
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.64/24
+ next_hops:
+ - forward_router_address: 192.0.2.22
+ tag: 4
+ admin_distance: 2
+
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/24
+ next_hops:
+ - forward_router_address: 192.0.2.24
+ route_name: new_route
+ - afi: ipv6
+ routes:
+ - dest: 2001:db8::/64
+ next_hops:
+ - interface: eth1/3
+ forward_router_address: 2001:db8::12
+ state: merged
+
+ # After state:
+ # ------------
+ #
+ # ip route 192.0.2.16/24 192.0.2.24 name new_route
+ # ipv6 route 2001:db8::/64 Ethernet1/3 2001:db8::12
+ # vrf context trial_vrf
+ # ip route 192.0.2.0/24 192.0.2.22 tag 4 2
+
+
+ # Using overridden:
+
+ # Before state:
+ # -------------
+ #
+ # ip route 192.0.2.16/28 192.0.2.24 name new_route
+ # ip route 192.0.2.80/28 192.0.2.26 tag 12
+ # vrf context trial_vrf
+ # ip route 192.0.2.64/28 192.0.2.22 tag 4
+ # ip route 192.0.2.64/28 192.0.2.23 name merged_route 1
+
+ - name: Overriden existing static route configuration with new configuration
+ cisco.nxos.nxos_static_routes:
+ config:
+ - vrf: trial_vrf
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - forward_router_address: 192.0.2.23
+ route_name: overridden_route1
+ admin_distance: 3
+
+ - forward_router_address: 192.0.2.45
+ route_name: overridden_route2
+ dest_vrf: destinationVRF
+ interface: Ethernet1/2
+ state: overridden
+
+ # After state:
+ # ------------
+ #
+ # ip route 192.0.2.16/28 192.0.2.23 name replaced_route1 3
+ # ip route 192.0.2.16/28 Ethernet1/2 192.0.2.45 vrf destinationVRF name replaced_route2
+
+
+ # Using replaced:
+
+ # Before state:
+ # ------------
+ # ip route 192.0.2.16/28 192.0.2.24 name new_route
+ # ip route 192.0.2.80/28 192.0.2.26 tag 12
+ # vrf context trial_vrf
+ # ip route 192.0.2.64/28 192.0.2.22 tag 4
+ # ip route 192.0.2.64/28 192.0.2.23 name merged_route 1
+
+ - name: Replaced the existing static configuration of a prefix with new configuration
+ cisco.nxos.nxos_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - forward_router_address: 192.0.2.23
+ route_name: replaced_route1
+ admin_distance: 3
+
+ - forward_router_address: 192.0.2.45
+ route_name: replaced_route2
+ dest_vrf: destinationVRF
+ interface: Ethernet1/2
+ state: replaced
+
+ # After state:
+ # -----------
+ # ip route 192.0.2.16/28 192.0.2.23 name replaced_route1 3
+ # ip route 192.0.2.16/28 Ethernet1/2 192.0.2.45 vrf destinationVRF name replaced_route2
+ # ip route 192.0.2.80/28 192.0.2.26 tag 12
+ # vrf context trial_vrf
+ # ip route 192.0.2.64/28 192.0.2.22 tag 4
+ # ip route 192.0.2.64/28 192.0.2.23 name merged_route 1
+
+
+ # Using gathered:
+
+ # Before state:
+ # -------------
+ # ipv6 route 2001:db8:12::/32 2001:db8::12
+ # vrf context Test
+ # ip route 192.0.2.48/28 192.0.2.13
+ # ip route 192.0.2.48/28 192.0.2.14 5
+
+ - name: Gather the exisitng condiguration
+ cisco.nxos.nxos_static_routes:
+ state: gathered
+
+ # returns:
+ # gathered:
+ # - vrf: Test
+ # address_families:
+ # - afi: ipv4
+ # routes:
+ # - dest: 192.0.2.48/28
+ # next_hops:
+ # - forward_router_address: 192.0.2.13
+ #
+ # - forward_router_address: 192.0.2.14
+ # admin_distance: 5
+ #
+ # - address_families:
+ # - afi: ipv6
+ # routes:
+ # - dest: 2001:db8:12::/32
+ # next_hops:
+ # - forward_router_address: 2001:db8::12
+
+
+ # Using rendered:
+
+ - name: Render required configuration to be pushed to the device
+ cisco.nxos.nxos_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.13
+
+ - afi: ipv6
+ routes:
+ - dest: 2001:db8::/64
+ next_hops:
+ - interface: eth1/3
+ forward_router_address: 2001:db8::12
+ state: rendered
+
+ # returns
+ # rendered:
+ # vrf context default
+ # ip route 192.0.2.48/28 192.0.2.13
+ # ipv6 route 2001:db8::/64 Ethernet1/3 2001:db8::12
+
+
+ # Using parsed
+
+ - name: Parse the config to structured data
+ cisco.nxos.nxos_static_routes:
+ running_config: |
+ ipv6 route 2002:db8:12::/32 2002:db8:12::1
+ vrf context Test
+ ip route 192.0.2.48/28 192.0.2.13
+ ip route 192.0.2.48/28 192.0.2.14 5
+
+ # returns:
+ # parsed:
+ # - vrf: Test
+ # address_families:
+ # - afi: ipv4
+ # routes:
+ # - dest: 192.0.2.48/28
+ # next_hops:
+ # - forward_router_address: 192.0.2.13
+ #
+ # - forward_router_address: 192.0.2.14
+ # admin_distance: 5
+ #
+ # - address_families:
+ # - afi: ipv6
+ # routes:
+ # - dest: 2002:db8:12::/32
+ # next_hops:
+ # - forward_router_address: 2002:db8:12::1
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The resulting configuration model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration prior to the model invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;ip route 192.0.2.48/28 192.0.2.12 Ethernet1/2 name sample_route&#x27;, &#x27;ipv6 route 2001:db8:3000::/36 2001:db8:200:2::2&#x27;, &#x27;vrf context test&#x27;, &#x27;ip route 192.0.2.48/28 192.0.2.121&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Adharsh Srivats Rangarajan (@adharshsrivatsr)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_system_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_system_module.rst
new file mode 100644
index 00000000..867307b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_system_module.rst
@@ -0,0 +1,468 @@
+.. _cisco.nxos.nxos_system_module:
+
+
+**********************
+cisco.nxos.nxos_system
+**********************
+
+**Manage the system attributes on Cisco NXOS devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of node system attributes on Cisco NXOS devices. It provides an option to configure host system parameters or remove those parameters from the device active configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain_lookup</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables or disables the DNS lookup feature in Cisco NXOS. This argument accepts boolean values. When enabled, the system will try to resolve hostnames using DNS and when disabled, hostnames will not be resolved.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain_name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the default domain name suffix to be used when referencing this node by its FQDN. This argument accepts either a list of domain names or a list of dicts that configure the domain name and VRF name or keyword &#x27;default&#x27;. See examples.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain_search</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures a list of domain name suffixes to search when performing DNS name resolution. This argument accepts either a list of domain names or a list of dicts that configure the domain name and VRF name or keyword &#x27;default&#x27;. See examples.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hostname</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configure the device hostname parameter. This option takes an ASCII string value or keyword &#x27;default&#x27;</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name_servers</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of DNS name servers by IP address to use to perform name resolution lookups. This argument accepts either a list of DNS servers or a list of hashes that configure the name server and VRF name or keyword &#x27;default&#x27;. See examples.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>State of the configuration values in the device&#x27;s current active configuration. When set to <em>present</em>, the values should be configured in the device active configuration and when set to <em>absent</em> the values should not be in the device active configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_mtu</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the mtu, must be an integer or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure hostname and domain-name
+ cisco.nxos.nxos_system:
+ hostname: nxos01
+ domain_name: test.example.com
+
+ - name: remove configuration
+ cisco.nxos.nxos_system:
+ state: absent
+
+ - name: configure name servers
+ cisco.nxos.nxos_system:
+ name_servers:
+ - 8.8.8.8
+ - 8.8.4.4
+
+ - name: configure name servers with VRF support
+ cisco.nxos.nxos_system:
+ name_servers:
+ - {server: 8.8.8.8, vrf: mgmt}
+ - {server: 8.8.4.4, vrf: mgmt}
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;hostname nxos01&#x27;, &#x27;ip domain-name test.example.com&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_telemetry_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_telemetry_module.rst
new file mode 100644
index 00000000..030c297e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_telemetry_module.rst
@@ -0,0 +1,753 @@
+.. _cisco.nxos.nxos_telemetry_module:
+
+
+*************************
+cisco.nxos.nxos_telemetry
+*************************
+
+**TELEMETRY resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages Telemetry Monitoring Service (TMS) configuration
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="4">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The provided configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>certificate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Certificate SSL/TLS and hostname values.</div>
+ <div>Value must be a dict defining values for keys (key and hostname).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>hostname</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Certificate hostname</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>key</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Certificate key</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>compression</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>gzip</li>
+ </ul>
+ </td>
+ <td>
+ <div>Destination profile compression method.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>destination_groups</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of telemetry destination groups.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>destination</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Group destination ipv4, port, protocol and encoding values.</div>
+ <div>Value must be a dict defining values for keys (ip, port, protocol, encoding).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>encoding</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>GPB</li>
+ <li>JSON</li>
+ </ul>
+ </td>
+ <td>
+ <div>Destination group encoding.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination group IP address.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination group port number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>protocol</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>HTTP</li>
+ <li>TCP</li>
+ <li>UDP</li>
+ <li>gRPC</li>
+ </ul>
+ </td>
+ <td>
+ <div>Destination group protocol.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination group identifier.</div>
+ <div>Value must be a int representing the destination group identifier.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sensor_groups</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of telemetry sensor groups.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>data_source</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>NX-API</li>
+ <li>DME</li>
+ <li>YANG</li>
+ </ul>
+ </td>
+ <td>
+ <div>Telemetry data source.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sensor group identifier.</div>
+ <div>Value must be a int representing the sensor group identifier.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>path</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Telemetry sensor path.</div>
+ <div>Value must be a dict defining values for keys (name, depth, filter_condition, query_condition).</div>
+ <div>Mandatory Keys (name)</div>
+ <div>Optional Keys (depth, filter_condition, query_condition)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>depth</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sensor group depth.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>filter_condition</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sensor group filter condition.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sensor group path name.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>query_condition</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Sensor group query condition.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination profile source interface.</div>
+ <div>Valid value is a str representing the source interface name.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>subscriptions</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=raw</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of telemetry subscriptions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>destination_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Associated destination group.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Subscription identifier.</div>
+ <div>Value must be a int representing the subscription identifier.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sensor_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Associated sensor group.</div>
+ <div>Value must be a dict defining values for keys (id, sample_interval).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Associated sensor group id.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sample_interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Associated sensor group id sample interval.</div>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination profile vrf.</div>
+ <div>Valid value is a str representing the vrf name.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>deleted</li>
+ </ul>
+ </td>
+ <td>
+ <div>Final configuration state</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Supported on N9k Version 7.0(3)I7(5) and later.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using deleted
+ # This action will delete all telemetry configuration on the device
+
+ - name: Delete Telemetry Configuration
+ cisco.nxos.nxos_telemetry:
+ state: deleted
+
+
+ # Using merged
+ # This action will merge telemetry configuration defined in the playbook with
+ # telemetry configuration that is already on the device.
+
+ - name: Merge Telemetry Configuration
+ cisco.nxos.nxos_telemetry:
+ config:
+ certificate:
+ key: /bootflash/server.key
+ hostname: localhost
+ compression: gzip
+ source_interface: Ethernet1/1
+ vrf: management
+ destination_groups:
+ - id: 2
+ destination:
+ ip: 192.168.0.2
+ port: 50001
+ protocol: gPRC
+ encoding: GPB
+ - id: 55
+ destination:
+ ip: 192.168.0.55
+ port: 60001
+ protocol: gPRC
+ encoding: GPB
+ sensor_groups:
+ - id: 1
+ data_source: NX-API
+ path:
+ name: '"show lldp neighbors detail"'
+ depth: 0
+ - id: 55
+ data_source: DME
+ path:
+ name: sys/ch
+ depth: unbounded
+ filter_condition: ne(eqptFt.operSt,"ok")
+ subscriptions:
+ - id: 5
+ destination_group: 55
+ sensor_group:
+ id: 1
+ sample_interval: 1000
+ - id: 6
+ destination_group: 2
+ sensor_group:
+ id: 55
+ sample_interval: 2000
+ state: merged
+
+
+ # Using replaced
+ # This action will replace telemetry configuration on the device with the
+ # telemetry configuration defined in the playbook.
+
+ - name: Override Telemetry Configuration
+ cisco.nxos.nxos_telemetry:
+ config:
+ certificate:
+ key: /bootflash/server.key
+ hostname: localhost
+ compression: gzip
+ source_interface: Ethernet1/1
+ vrf: management
+ destination_groups:
+ - id: 2
+ destination:
+ ip: 192.168.0.2
+ port: 50001
+ protocol: gPRC
+ encoding: GPB
+ subscriptions:
+ - id: 5
+ destination_group: 55
+ state: replaced
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;command 1&#x27;, &#x27;command 2&#x27;, &#x27;command 3&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Mike Wiebe (@mikewiebe)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_udld_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_udld_interface_module.rst
new file mode 100644
index 00000000..db121f42
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_udld_interface_module.rst
@@ -0,0 +1,483 @@
+.. _cisco.nxos.nxos_udld_interface_module:
+
+
+******************************
+cisco.nxos.nxos_udld_interface
+******************************
+
+**Manages UDLD interface configuration params.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages UDLD interface configuration params.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>FULL name of the interface, i.e. Ethernet1/1-</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enabled</li>
+ <li>disabled</li>
+ <li>aggressive</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manages UDLD mode for an interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - Feature UDLD must be enabled on the device to use this module.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # ensure Ethernet1/1 is configured to be in aggressive mode
+ - cisco.nxos.nxos_udld_interface:
+ interface: Ethernet1/1
+ mode: aggressive
+ state: present
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+ # Remove the aggressive config only if it's currently in aggressive mode and then disable udld (switch default)
+ - cisco.nxos.nxos_udld_interface:
+ interface: Ethernet1/1
+ mode: aggressive
+ state: absent
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+ # ensure Ethernet1/1 has aggressive mode enabled
+ - cisco.nxos.nxos_udld_interface:
+ interface: Ethernet1/1
+ mode: enabled
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>changed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>check to see if a change was made on the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>end_state</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of configuration after module execution</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;mode&#x27;: &#x27;enabled&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>existing</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of existing configuration</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;mode&#x27;: &#x27;aggressive&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>proposed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of parameters passed into module</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;mode&#x27;: &#x27;enabled&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface ethernet1/33&#x27;, &#x27;no udld aggressive ; no udld disable&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_udld_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_udld_module.rst
new file mode 100644
index 00000000..0899efc1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_udld_module.rst
@@ -0,0 +1,489 @@
+.. _cisco.nxos.nxos_udld_module:
+
+
+********************
+cisco.nxos.nxos_udld
+********************
+
+**Manages UDLD global configuration params.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages UDLD global configuration params.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggressive</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enabled</li>
+ <li>disabled</li>
+ </ul>
+ </td>
+ <td>
+ <div>Toggles aggressive mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>msg_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Message time in seconds for UDLD packets or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>reset</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Ability to reset all ports shut down by UDLD. &#x27;state&#x27; parameter cannot be &#x27;absent&#x27; when this is present.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource. When set to &#x27;absent&#x27;, aggressive and msg_time are set to their default values.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - Module will fail if the udld feature has not been previously enabled.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # ensure udld aggressive mode is globally disabled and se global message interval is 20
+ - cisco.nxos.nxos_udld:
+ aggressive: disabled
+ msg_time: 20
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+ # Ensure agg mode is globally enabled and msg time is 15
+ - cisco.nxos.nxos_udld:
+ aggressive: enabled
+ msg_time: 15
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>changed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>check to see if a change was made on the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>end_state</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of udld configuration after module execution</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;aggressive&#x27;: &#x27;enabled&#x27;, &#x27;msg_time&#x27;: &#x27;40&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>existing</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of existing udld configuration</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;aggressive&#x27;: &#x27;disabled&#x27;, &#x27;msg_time&#x27;: &#x27;15&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>proposed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of parameters passed into module</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;aggressive&#x27;: &#x27;enabled&#x27;, &#x27;msg_time&#x27;: &#x27;40&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;udld message-time 40&#x27;, &#x27;udld aggressive&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_user_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_user_module.rst
new file mode 100644
index 00000000..76e3ae14
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_user_module.rst
@@ -0,0 +1,592 @@
+.. _cisco.nxos.nxos_user_module:
+
+
+********************
+cisco.nxos.nxos_user
+********************
+
+**Manage the collection of local users on Nexus devices**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of the local usernames configured on Cisco Nexus devices. It allows playbooks to manage either individual usernames or the collection of usernames in the current running config. It also supports purging usernames from the configuration that are not explicitly defined.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The set of username objects to be configured on the remote Cisco Nexus device. The list entries can either be the username or a hash of username and properties. This argument is mutually exclusive with the <code>name</code> argument.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: users, collection</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>configured_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The password to be configured on the network device. The password needs to be provided in cleartext and it will be encrypted on the device. Please note that this option is not same as <code>provider password</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The username to be configured on the remote Cisco Nexus device. This argument accepts a string value and is mutually exclusive with the <code>aggregate</code> argument.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>roles</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <code>role</code> argument configures the role for the username in the device running configuration. The argument accepts a string value defining the role name. This argument does not check if the role has been configured on the device.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: role</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sshkey</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <code>sshkey</code> argument defines the SSH public key to configure for the username. This argument accepts a valid SSH key value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>The <code>state</code> argument configures the state of the username definition as it relates to the device operational configuration. When set to <em>present</em>, the username(s) should be configured in the device active configuration and when set to <em>absent</em> the username(s) should not be in the device active configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>on_create</li>
+ <li>always</li>
+ </ul>
+ </td>
+ <td>
+ <div>Since passwords are encrypted in the device running config, this argument will instruct the module when to change the password. When set to <code>always</code>, the password will always be updated in the device and when set to <code>on_create</code> the password will be updated only if the username is created.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>configured_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The password to be configured on the network device. The password needs to be provided in cleartext and it will be encrypted on the device. Please note that this option is not same as <code>provider password</code>.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The username to be configured on the remote Cisco Nexus device. This argument accepts a string value and is mutually exclusive with the <code>aggregate</code> argument.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>purge</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>The <code>purge</code> argument instructs the module to consider the resource definition absolute. It will remove any previously configured usernames on the device with the exception of the `admin` user which cannot be deleted per nxos constraints.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>roles</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <code>role</code> argument configures the role for the username in the device running configuration. The argument accepts a string value defining the role name. This argument does not check if the role has been configured on the device.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: role</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>sshkey</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The <code>sshkey</code> argument defines the SSH public key to configure for the username. This argument accepts a valid SSH key value.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>The <code>state</code> argument configures the state of the username definition as it relates to the device operational configuration. When set to <em>present</em>, the username(s) should be configured in the device active configuration and when set to <em>absent</em> the username(s) should not be in the device active configuration</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>update_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>on_create</li>
+ <li><div style="color: blue"><b>always</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Since passwords are encrypted in the device running config, this argument will instruct the module when to change the password. When set to <code>always</code>, the password will always be updated in the device and when set to <code>on_create</code> the password will be updated only if the username is created.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: create a new user
+ cisco.nxos.nxos_user:
+ name: ansible
+ sshkey: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
+ state: present
+
+ - name: remove all users except admin
+ cisco.nxos.nxos_user:
+ purge: yes
+
+ - name: set multiple users role
+ cisco.nxos.nxos_user:
+ aggregate:
+ - name: netop
+ - name: netend
+ role: network-operator
+ state: present
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The list of configuration mode commands to send to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;name ansible&#x27;, &#x27;name ansible password password&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Peter Sprygada (@privateip)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vlan_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vlan_module.rst
new file mode 100644
index 00000000..fa584c60
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vlan_module.rst
@@ -0,0 +1,804 @@
+.. _cisco.nxos.nxos_vlan_module:
+
+
+********************
+cisco.nxos.nxos_vlan
+********************
+
+**(deprecated, removed after 2022-06-01) Manages VLAN resources and attributes.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+DEPRECATED
+----------
+:Removed in collection release after 2022-06-01
+:Why: Updated modules released with more functionality
+:Alternative: nxos_vlans
+
+
+
+Synopsis
+--------
+- Manages VLAN configurations on NX-OS switches.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>up</b>&nbsp;&larr;</div></li>
+ <li>down</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the VLAN administrative state of the VLAN equivalent to shut/no shut in VLAN config mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of VLANs definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>up</li>
+ <li>down</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the VLAN administrative state of the VLAN equivalent to shut/no shut in VLAN config mode.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>associated_interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This is a intent option and checks the operational state of the for given vlan <code>name</code> for associated interfaces. If the value in the <code>associated_interfaces</code> does not match with the operational state of vlan interfaces on device it will result in failure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state arguments.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of interfaces that should be associated to the VLAN or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mapped_vni</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Virtual Network Identifier (VNI) ID that is mapped to the VLAN. Valid values are integer and keyword &#x27;default&#x27;. Range 4096-16773119.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ce</li>
+ <li>fabricpath</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set VLAN mode to classical ethernet or fabricpath. This is a valid option for Nexus 5000 and 7000 series.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of VLAN or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Single VLAN ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan_range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Range of VLANs such as 2-10 or 2,5,10-15, etc.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan_state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>active</li>
+ <li>suspend</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the vlan operational state of the VLAN</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>associated_interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This is a intent option and checks the operational state of the for given vlan <code>name</code> for associated interfaces. If the value in the <code>associated_interfaces</code> does not match with the operational state of vlan interfaces on device it will result in failure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">10</div>
+ </td>
+ <td>
+ <div>Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state arguments.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of interfaces that should be associated to the VLAN or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mapped_vni</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Virtual Network Identifier (VNI) ID that is mapped to the VLAN. Valid values are integer and keyword &#x27;default&#x27;. Range 4096-16773119.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>ce</b>&nbsp;&larr;</div></li>
+ <li>fabricpath</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set VLAN mode to classical ethernet or fabricpath. This is a valid option for Nexus 5000 and 7000 series.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of VLAN or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>purge</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Purge VLANs not defined in the <em>aggregate</em> parameter. This parameter can be used without aggregate as well.</div>
+ <div>Removal of Vlan 1 is not allowed and will be ignored by purge.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Single VLAN ID.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan_range</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Range of VLANs such as 2-10 or 2,5,10-15, etc.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan_state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>active</b>&nbsp;&larr;</div></li>
+ <li>suspend</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the vlan operational state of the VLAN</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Ensure a range of VLANs are not present on the switch
+ cisco.nxos.nxos_vlan:
+ vlan_range: 2-10,20,50,55-60,100-150
+ state: absent
+
+ - name: Ensure VLAN 50 exists with the name WEB and is in the shutdown state
+ cisco.nxos.nxos_vlan:
+ vlan_id: 50
+ admin_state: down
+ name: WEB
+
+ - name: Ensure VLAN is NOT on the device
+ cisco.nxos.nxos_vlan:
+ vlan_id: 50
+ state: absent
+
+ - name: Add interfaces to VLAN and check intent (config + intent)
+ cisco.nxos.nxos_vlan:
+ vlan_id: 100
+ interfaces:
+ - Ethernet2/1
+ - Ethernet2/5
+ associated_interfaces:
+ - Ethernet2/1
+ - Ethernet2/5
+
+ - name: Check interfaces assigned to VLAN
+ cisco.nxos.nxos_vlan:
+ vlan_id: 100
+ associated_interfaces:
+ - Ethernet2/1
+ - Ethernet2/5
+
+ - name: Create aggregate of vlans
+ cisco.nxos.nxos_vlan:
+ aggregate:
+ - {vlan_id: 4000, mode: ce}
+ - {vlan_id: 4001, name: vlan-4001}
+
+ - name: purge vlans - removes all other vlans except the ones mentioned in aggregate)
+ cisco.nxos.nxos_vlan:
+ aggregate:
+ - vlan_id: 1
+ - vlan_id: 4001
+ purge: yes
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>Set of command strings to send to the remote device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;vlan 20&#x27;, &#x27;vlan 55&#x27;, &#x27;vn-segment 5000&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+- This module will be removed in version . *[deprecated]*
+- For more information see `DEPRECATED`_.
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vlans_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vlans_module.rst
new file mode 100644
index 00000000..fc95e86a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vlans_module.rst
@@ -0,0 +1,581 @@
+.. _cisco.nxos.nxos_vlans_module:
+
+
+*********************
+cisco.nxos.nxos_vlans
+*********************
+
+**VLANs resource module**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module creates and manages VLAN configurations on Cisco NX-OS.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>A dictionary of Vlan options</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>enabled</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage administrative state of the vlan.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mapped_vni</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The Virtual Network Identifier (VNI) ID that is mapped to the VLAN.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ce</li>
+ <li>fabricpath</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set vlan mode to classical ethernet or fabricpath. This is a valid option for Nexus 5000, 6000 and 7000 series.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of VLAN.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>active</li>
+ <li>suspend</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage operational state of the vlan.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vlan_id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Vlan ID.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>running_config</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This option is used only with state <em>parsed</em>.</div>
+ <div>The value of this option should be the output received from the NX-OS device by executing the commands <b>show vlans | json-pretty</b> and <b>show running-config | section ^vlan</b> in order and delimited by a line.</div>
+ <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
+ <li>replaced</li>
+ <li>overridden</li>
+ <li>deleted</li>
+ <li>gathered</li>
+ <li>rendered</li>
+ <li>parsed</li>
+ </ul>
+ </td>
+ <td>
+ <div>The state of the configuration after module completion.</div>
+ <div>The state <em>overridden</em> would override the configuration of all the VLANs on the device (including VLAN 1) with the provided configuration in the task. Use caution with this state.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOS 7.3.(0)D1(1) on VIRL
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # Using merged
+
+ # Before state:
+ # -------------
+ # vlan 1
+
+ - name: Merge provided configuration with device configuration.
+ cisco.nxos.nxos_vlans:
+ config:
+ - vlan_id: 5
+ name: test-vlan5
+ - vlan_id: 10
+ enabled: false
+ state: merged
+
+ # After state:
+ # ------------
+ # vlan 5
+ # name test-vlan5
+ # state active
+ # no shutdown
+ # vlan 10
+ # state active
+ # shutdown
+
+
+ # Using replaced
+
+ # Before state:
+ # -------------
+ # vlan 1
+ # vlan 5
+ # name test-vlan5
+ # vlan 10
+ # shutdown
+
+ - name: Replace device configuration of specified vlan with provided configuration.
+ cisco.nxos.nxos_vlans:
+ config:
+ - vlan_id: 5
+ name: test-vlan
+ enabled: false
+ - vlan_id: 10
+ enabled: false
+ state: replaced
+
+ # After state:
+ # ------------
+ # vlan 1
+ # vlan 5
+ # name test-vlan
+ # state active
+ # shutdown
+ # vlan 10
+ # state active
+ # shutdown
+
+
+ # Using overridden
+
+ # Before state:
+ # -------------
+ # vlan 1
+ # vlan 3
+ # name testing
+ # vlan 5
+ # name test-vlan5
+ # shutdown
+ # vlan 10
+ # shutdown
+
+ - name: Override device configuration of all vlans with provided configuration.
+ cisco.nxos.nxos_vlans:
+ config:
+ - vlan_id: 5
+ name: test-vlan
+ - vlan_id: 10
+ state: active
+ state: overridden
+
+ # After state:
+ # ------------
+ # vlan 5
+ # name test-vlan
+ # state active
+ # no shutdown
+ # vlan 10
+ # state active
+ # no shutdown
+
+
+ # Using deleted
+
+ # Before state:
+ # -------------
+ # vlan 1
+ # vlan 5
+ # vlan 10
+
+ - name: Delete vlans.
+ cisco.nxos.nxos_vlans:
+ config:
+ - vlan_id: 5
+ - vlan_id: 10
+ state: deleted
+
+ # After state:
+ # ------------
+ #
+
+ # Using rendered
+
+ - name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_vlans:
+ config:
+ - vlan_id: 5
+ name: vlan5
+ mapped_vni: 100
+
+ - vlan_id: 6
+ name: vlan6
+ state: suspend
+ state: rendered
+
+ # Task Output (redacted)
+ # -----------------------
+
+ # rendered:
+ # - vlan 5
+ # - name vlan5
+ # - vn-segment 100
+ # - vlan 6
+ # - name vlan6
+ # - state suspend
+
+ # Using parsed
+
+ # parsed.cfg
+ # ------------
+ # {
+ # "TABLE_vlanbrief": {
+ # "ROW_vlanbrief": [
+ # {
+ # "vlanshowbr-vlanid": "1",
+ # "vlanshowbr-vlanid-utf": "1",
+ # "vlanshowbr-vlanname": "default",
+ # "vlanshowbr-vlanstate": "active",
+ # "vlanshowbr-shutstate": "noshutdown"
+ # },
+ # {
+ # "vlanshowbr-vlanid": "5",
+ # "vlanshowbr-vlanid-utf": "5",
+ # "vlanshowbr-vlanname": "vlan5",
+ # "vlanshowbr-vlanstate": "suspend",
+ # "vlanshowbr-shutstate": "noshutdown"
+ # },
+ # {
+ # "vlanshowbr-vlanid": "6",
+ # "vlanshowbr-vlanid-utf": "6",
+ # "vlanshowbr-vlanname": "VLAN0006",
+ # "vlanshowbr-vlanstate": "active",
+ # "vlanshowbr-shutstate": "noshutdown"
+ # },
+ # {
+ # "vlanshowbr-vlanid": "7",
+ # "vlanshowbr-vlanid-utf": "7",
+ # "vlanshowbr-vlanname": "vlan7",
+ # "vlanshowbr-vlanstate": "active",
+ # "vlanshowbr-shutstate": "noshutdown"
+ # }
+ # ]
+ # },
+ # "TABLE_mtuinfo": {
+ # "ROW_mtuinfo": [
+ # {
+ # "vlanshowinfo-vlanid": "1",
+ # "vlanshowinfo-media-type": "enet",
+ # "vlanshowinfo-vlanmode": "ce-vlan"
+ # },
+ # {
+ # "vlanshowinfo-vlanid": "5",
+ # "vlanshowinfo-media-type": "enet",
+ # "vlanshowinfo-vlanmode": "ce-vlan"
+ # },
+ # {
+ # "vlanshowinfo-vlanid": "6",
+ # "vlanshowinfo-media-type": "enet",
+ # "vlanshowinfo-vlanmode": "ce-vlan"
+ # },
+ # {
+ # "vlanshowinfo-vlanid": "7",
+ # "vlanshowinfo-media-type": "enet",
+ # "vlanshowinfo-vlanmode": "ce-vlan"
+ # }
+ # ]
+ # }
+ # }
+ #
+ # vlan 1,5-7
+ # vlan 5
+ # state suspend
+ # name vlan5
+ # vlan 7
+ # name vlan7
+ # vn-segment 100
+
+ - name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_vlans:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+ # Task output (redacted)
+ # -----------------------
+
+ # parsed:
+ # - vlan_id: 5
+ # enabled: True
+ # mode: "ce"
+ # name: "vlan5"
+ # state: suspend
+ #
+ # - vlan_id: 6
+ # enabled: True
+ # mode: "ce"
+ # state: active
+ #
+ # - vlan_id: 7
+ # enabled: True
+ # mode: "ce"
+ # name: "vlan7"
+ # state: active
+ # mapped_vni: 100
+
+ # Using gathered
+
+ # Existing device config state
+ # -------------------------------
+ # nxos-9k# show vlan | json
+ # {"TABLE_vlanbrief": {"ROW_vlanbrief": [{"vlanshowbr-vlanid": "1", "vlanshowbr-vlanid-utf": "1", "vlanshowbr-vlanname": "default", "vlanshowbr-vlanstate
+ # ": "active", "vlanshowbr-shutstate": "noshutdown"}, {"vlanshowbr-vlanid": "5", "vlanshowbr-vlanid-utf": "5", "vlanshowbr-vlanname": "vlan5", "vlanshowb
+ # r-vlanstate": "suspend", "vlanshowbr-shutstate": "noshutdown"}, {"vlanshowbr-vlanid": "6", "vlanshowbr-vlanid-utf": "6", "vlanshowbr-vlanname": "VLAN00
+ # 06", "vlanshowbr-vlanstate": "active", "vlanshowbr-shutstate": "noshutdown"}, {"vlanshowbr-vlanid": "7", "vlanshowbr-vlanid-utf": "7", "vlanshowbr-vlan
+ # name": "vlan7", "vlanshowbr-vlanstate": "active", "vlanshowbr-shutstate": "shutdown"}]}, "TABLE_mtuinfo": {"ROW_mtuinfo": [{"vlanshowinfo-vlanid": "1",
+ # "vlanshowinfo-media-type": "enet", "vlanshowinfo-vlanmode": "ce-vlan"}, {"vlanshowinfo-vlanid": "5", "vlanshowinfo-media-type": "enet", "vlanshowinfo-
+ # vlanmode": "ce-vlan"}, {"vlanshowinfo-vlanid": "6", "vlanshowinfo-media-type": "enet", "vlanshowinfo-vlanmode": "ce-vlan"}, {"vlanshowinfo-vlanid": "7"
+ # , "vlanshowinfo-media-type": "enet", "vlanshowinfo-vlanmode": "ce-vlan"}]}}
+ #
+ # nxos-9k# show running-config | section ^vlan
+ # vlan 1,5-7
+ # vlan 5
+ # state suspend
+ # name vlan5
+ # vlan 7
+ # shutdown
+ # name vlan7
+ # vn-segment 190
+
+ - name: Gather vlans facts from the device using nxos_vlans
+ cisco.nxos.nxos_vlans:
+ state: gathered
+
+ # Task output (redacted)
+ # -----------------------
+ # gathered:
+ # - vlan_id: 5
+ # enabled: True
+ # mode: "ce"
+ # name: "vlan5"
+ # state: suspend
+ #
+ # - vlan_id: 6
+ # enabled: True
+ # mode: "ce"
+ # state: active
+ #
+ # - vlan_id: 7
+ # enabled: False
+ # mode: "ce"
+ # name: "vlan7"
+ # state: active
+ # mapped_vni: 190
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>after</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>when changed</td>
+ <td>
+ <div>The configuration as structured data after module completion.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>before</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The configuration as structured data prior to module invocation.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
+ of the parameters above.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>The set of commands pushed to the remote device.</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;vlan 5&#x27;, &#x27;name test-vlan5&#x27;, &#x27;state suspend&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vpc_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vpc_interface_module.rst
new file mode 100644
index 00000000..73048ac4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vpc_interface_module.rst
@@ -0,0 +1,409 @@
+.. _cisco.nxos.nxos_vpc_interface_module:
+
+
+*****************************
+cisco.nxos.nxos_vpc_interface
+*****************************
+
+**Manages interface VPC configuration**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages interface VPC configuration
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_link</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Set to true/false for peer link config on associated portchannel.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>portchannel</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Group number of the portchannel that will be configured.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manages desired state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vpc</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VPC group/id that will be configured on associated portchannel.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - Either vpc or peer_link param is required, but not both.
+ - ``state=absent`` removes whatever VPC config is on a port-channel if one exists.
+ - Re-assigning a vpc or peerlink from one portchannel to another is not supported. The module will force the user to unconfigure an existing vpc/pl before configuring the same value on a new portchannel
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_vpc_interface:
+ portchannel: 10
+ vpc: 100
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface port-channel100&#x27;, &#x27;vpc 10&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vpc_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vpc_module.rst
new file mode 100644
index 00000000..ce788a08
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vpc_module.rst
@@ -0,0 +1,585 @@
+.. _cisco.nxos.nxos_vpc_module:
+
+
+*******************
+cisco.nxos.nxos_vpc
+*******************
+
+**Manages global VPC configuration**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages global VPC configuration
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_recovery</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables/Disables auto recovery on platforms that support disable</div>
+ <div>timers are not modifiable with this attribute</div>
+ <div>mutually exclusive with auto_recovery_reload_delay</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auto_recovery_reload_delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Manages auto-recovery reload-delay timer in seconds</div>
+ <div>mutually exclusive with auto_recovery</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay_restore</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>manages delay restore command and config value in seconds</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay_restore_interface_vlan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>manages delay restore interface-vlan command and config value in seconds</div>
+ <div>not supported on all platforms</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay_restore_orphan_port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>manages delay restore orphan-port command and config value in seconds</div>
+ <div>not supported on all platforms</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VPC domain</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_gw</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables/Disables peer gateway</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pkl_dest</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Destination (remote) IP address used for peer keepalive link</div>
+ <div>pkl_dest is required whenever pkl options are used.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pkl_src</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Source IP address used for peer keepalive link</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pkl_vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VRF used for peer keepalive link</div>
+ <div>The VRF must exist on the device before using pkl_vrf.</div>
+ <div>(Note) &#x27;default&#x27; is an overloaded term: Default vrf context for pkl_vrf is &#x27;management&#x27;; &#x27;pkl_vrf: default&#x27; refers to the literal &#x27;default&#x27; rib.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>role_priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Role priority for device. Remember lower is better.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manages desired state of the resource</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>system_priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>System priority device. Remember they must match between peers.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - The feature vpc must be enabled before this module can be used
+ - If not using management vrf, vrf must be globally on the device before using in the pkl config
+ - Although source IP isn't required on the command line it is required when using this module. The PKL VRF must also be configured prior to using this module.
+ - Both pkl_src and pkl_dest are needed when changing PKL VRF.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: configure a simple asn
+ cisco.nxos.nxos_vpc:
+ domain: 100
+ role_priority: 1000
+ system_priority: 2000
+ pkl_dest: 192.168.100.4
+ pkl_src: 10.1.100.20
+ peer_gw: true
+ auto_recovery: true
+
+ - name: configure
+ cisco.nxos.nxos_vpc:
+ domain: 100
+ role_priority: 32667
+ system_priority: 2000
+ peer_gw: true
+ pkl_src: 10.1.100.2
+ pkl_dest: 192.168.100.4
+ auto_recovery: true
+
+ - name: Configure VPC with delay restore and existing keepalive VRF
+ cisco.nxos.nxos_vpc:
+ domain: 10
+ role_priority: 28672
+ system_priority: 2000
+ delay_restore: 180
+ peer_gw: true
+ pkl_src: 1.1.1.2
+ pkl_dest: 1.1.1.1
+ pkl_vrf: vpckeepalive
+ auto_recovery: true
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;vpc domain 100&#x27;, &#x27;peer-keepalive destination 192.168.100.4 source 10.1.100.20 vrf management&#x27;, &#x27;auto-recovery&#x27;, &#x27;peer-gateway&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrf_af_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrf_af_module.rst
new file mode 100644
index 00000000..81c2911d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrf_af_module.rst
@@ -0,0 +1,538 @@
+.. _cisco.nxos.nxos_vrf_af_module:
+
+
+**********************
+cisco.nxos.nxos_vrf_af
+**********************
+
+**Manages VRF AF.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages VRF AF
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>afi</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>ipv4</li>
+ <li>ipv6</li>
+ </ul>
+ </td>
+ <td>
+ <div>Address-Family Identifier (AFI).</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_target_both_auto_evpn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable the EVPN route-target &#x27;auto&#x27; setting for both import and export target communities.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>route_targets</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the route-targets which should be imported and/or exported under the AF. This argument accepts a list of dicts that specify the route-target, the direction (import|export|both) and state of each route-target. Default direction is <code>direction=both</code>. See examples.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>direction</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>import</li>
+ <li>export</li>
+ <li><div style="color: blue"><b>both</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>Indicates the direction of the route-target (import|export|both)</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Defines the route-target itself</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines whether the route-target with the given direction should be present or not on the device.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines whether the config should be present or not on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the VRF.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - Default, where supported, restores params default value.
+ - In case of ``state=absent`` the address-family configuration will be absent. Therefore the options ``route_target_both_auto_evpn`` and ``route_targets`` are ignored.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_vrf_af:
+ vrf: ntc
+ afi: ipv4
+ route_target_both_auto_evpn: true
+ state: present
+
+ - cisco.nxos.nxos_vrf_af:
+ vrf: ntc
+ afi: ipv4
+ route_targets:
+ - rt: 65000:1000
+ direction: import
+ - rt: 65001:1000
+ direction: import
+
+ - cisco.nxos.nxos_vrf_af:
+ vrf: ntc
+ afi: ipv4
+ route_targets:
+ - rt: 65000:1000
+ direction: import
+ - rt: 65001:1000
+ state: absent
+
+ - cisco.nxos.nxos_vrf_af:
+ vrf: ntc
+ afi: ipv4
+ route_targets:
+ - rt: 65000:1000
+ direction: export
+ - rt: 65001:1000
+ direction: export
+
+ - cisco.nxos.nxos_vrf_af:
+ vrf: ntc
+ afi: ipv4
+ route_targets:
+ - rt: 65000:1000
+ direction: export
+ state: absent
+
+ - cisco.nxos.nxos_vrf_af:
+ vrf: ntc
+ afi: ipv4
+ route_targets:
+ - rt: 65000:1000
+ direction: both
+ state: present
+ - rt: 65001:1000
+ direction: import
+ state: present
+ - rt: 65002:1000
+ direction: both
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;vrf context ntc&#x27;, &#x27;address-family ipv4 unicast&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrf_interface_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrf_interface_module.rst
new file mode 100644
index 00000000..b4656cfb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrf_interface_module.rst
@@ -0,0 +1,399 @@
+.. _cisco.nxos.nxos_vrf_interface_module:
+
+
+*****************************
+cisco.nxos.nxos_vrf_interface
+*****************************
+
+**Manages interface specific VRF configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages interface specific VRF configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of interface to be managed, i.e. Ethernet1/1.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manages desired state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of VRF to be managed.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - VRF needs to be added globally with :ref:`cisco.nxos.nxos_vrf <cisco.nxos.nxos_vrf_module>` before adding a VRF to an interface.
+ - Remove a VRF from an interface will still remove all L3 attributes just as it does from CLI.
+ - VRF is not read from an interface until IP address is configured on that interface.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Ensure vrf ntc exists on Eth1/1
+ cisco.nxos.nxos_vrf_interface:
+ vrf: ntc
+ interface: Ethernet1/1
+ state: present
+
+ - name: Ensure ntc VRF does not exist on Eth1/1
+ cisco.nxos.nxos_vrf_interface:
+ vrf: ntc
+ interface: Ethernet1/1
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface loopback16&#x27;, &#x27;vrf member ntc&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrf_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrf_module.rst
new file mode 100644
index 00000000..33c6f8db
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrf_module.rst
@@ -0,0 +1,727 @@
+.. _cisco.nxos.nxos_vrf_module:
+
+
+*******************
+cisco.nxos.nxos_vrf
+*******************
+
+**Manages global VRF configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- This module provides declarative management of VRFs on CISCO NXOS network devices.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>up</b>&nbsp;&larr;</div></li>
+ <li>down</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administrative state of the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>aggregate</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of VRFs definitions.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>up</li>
+ <li>down</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administrative state of the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>associated_interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This is a intent option and checks the operational state of the for given vrf <code>name</code> for associated interfaces. If the value in the <code>associated_interfaces</code> does not match with the operational state of vrf interfaces on device it will result in failure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state arguments.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Description of the VRF or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of interfaces to check the VRF has been configured correctly or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of VRF to be managed.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: vrf</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VPN Route Distinguisher (RD). Valid values are a string in one of the route-distinguisher formats (ASN2:NN, ASN4:NN, or IPV4:NN); the keyword &#x27;auto&#x27;, or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>present</li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manages desired state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vni</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify virtual network identifier. Valid values are Integer or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>associated_interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>This is a intent option and checks the operational state of the for given vrf <code>name</code> for associated interfaces. If the value in the <code>associated_interfaces</code> does not match with the operational state of vrf interfaces on device it will result in failure.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>delay</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ <b>Default:</b><br/><div style="color: blue">10</div>
+ </td>
+ <td>
+ <div>Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state arguments.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Description of the VRF or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interfaces</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of interfaces to check the VRF has been configured correctly or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of VRF to be managed.</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: vrf</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>purge</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Purge VRFs not defined in the <em>aggregate</em> parameter.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>rd</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VPN Route Distinguisher (RD). Valid values are a string in one of the route-distinguisher formats (ASN2:NN, ASN4:NN, or IPV4:NN); the keyword &#x27;auto&#x27;, or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manages desired state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vni</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify virtual network identifier. Valid values are Integer or keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - Cisco NX-OS creates the default VRF by itself. Therefore, you're not allowed to use default as *vrf* name in this module.
+ - ``vrf`` name must be shorter than 32 chars.
+ - VRF names are not case sensible in NX-OS. Anyway, the name is stored just like it's inserted by the user and it'll not be changed again unless the VRF is removed and re-created. i.e. ``vrf=NTC`` will create a VRF named NTC, but running it again with ``vrf=ntc`` will not cause a configuration change.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Ensure ntc VRF exists on switch
+ cisco.nxos.nxos_vrf:
+ name: ntc
+ description: testing
+ state: present
+
+ - name: Aggregate definition of VRFs
+ cisco.nxos.nxos_vrf:
+ aggregate:
+ - {name: test1, description: Testing, admin_state: down}
+ - {name: test2, interfaces: Ethernet1/2}
+
+ - name: Aggregate definitions of VRFs with Purge
+ cisco.nxos.nxos_vrf:
+ aggregate:
+ - {name: ntc1, description: purge test1}
+ - {name: ntc2, description: purge test2}
+ state: present
+ purge: yes
+
+ - name: Delete VRFs exist on switch
+ cisco.nxos.nxos_vrf:
+ aggregate:
+ - {name: ntc1}
+ - {name: ntc2}
+ state: absent
+
+ - name: Assign interfaces to VRF declaratively
+ cisco.nxos.nxos_vrf:
+ name: test1
+ interfaces:
+ - Ethernet2/3
+ - Ethernet2/5
+
+ - name: Check interfaces assigned to VRF
+ cisco.nxos.nxos_vrf:
+ name: test1
+ associated_interfaces:
+ - Ethernet2/3
+ - Ethernet2/5
+
+ - name: Ensure VRF is tagged with interface Ethernet2/5 only (Removes from Ethernet2/3)
+ cisco.nxos.nxos_vrf:
+ name: test1
+ interfaces:
+ - Ethernet2/5
+
+ - name: Delete VRF
+ cisco.nxos.nxos_vrf:
+ name: ntc
+ state: absent
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;vrf context ntc&#x27;, &#x27;no shutdown&#x27;, &#x27;interface Ethernet1/2&#x27;, &#x27;no switchport&#x27;, &#x27;vrf member test2&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+- Trishna Guha (@trishnaguha)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrrp_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrrp_module.rst
new file mode 100644
index 00000000..0231b295
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vrrp_module.rst
@@ -0,0 +1,510 @@
+.. _cisco.nxos.nxos_vrrp_module:
+
+
+********************
+cisco.nxos.nxos_vrrp
+********************
+
+**Manages VRRP configuration on NX-OS switches.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages VRRP configuration on NX-OS switches.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>admin_state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>shutdown</b>&nbsp;&larr;</div></li>
+ <li>no shutdown</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Used to enable or disable the VRRP process.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authentication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Clear text authentication string or &#x27;default&#x27; keyword</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VRRP group number.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Full name of interface that is being managed for VRRP.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interval</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Time interval between advertisement or &#x27;default&#x27; keyword</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>preempt</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enable/Disable preempt.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>priority</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VRRP priority or &#x27;default&#x27; keyword</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify desired state of the resource.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vip</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VRRP virtual IP address or &#x27;default&#x27; keyword</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - VRRP feature needs to be enabled first on the system.
+ - SVIs must exist before using this module.
+ - Interface must be a L3 port before using this module.
+ - ``state=absent`` removes the VRRP group if it exists on the device.
+ - VRRP cannot be configured on loopback interfaces.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Ensure vrrp group 100 and vip 10.1.100.1 is on vlan10
+ cisco.nxos.nxos_vrrp:
+ interface: vlan10
+ group: 100
+ vip: 10.1.100.1
+
+ - name: Ensure removal of the vrrp group config
+ cisco.nxos.nxos_vrrp:
+ interface: vlan10
+ group: 100
+ vip: 10.1.100.1
+ state: absent
+
+ - name: Re-config with more params
+ cisco.nxos.nxos_vrrp:
+ interface: vlan10
+ group: 100
+ vip: 10.1.100.1
+ preempt: false
+ priority: 130
+ authentication: AUTHKEY
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface vlan10&#x27;, &#x27;vrrp 150&#x27;, &#x27;address 10.1.15.1&#x27;, &#x27;authentication text testing&#x27;, &#x27;no shutdown&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vsan_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vsan_module.rst
new file mode 100644
index 00000000..f84ab0e3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vsan_module.rst
@@ -0,0 +1,225 @@
+.. _cisco.nxos.nxos_vsan_module:
+
+
+********************
+cisco.nxos.nxos_vsan
+********************
+
+**Configuration of vsan for Cisco NXOS MDS Switches.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Configuration of vsan for Cisco MDS NXOS.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vsan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of vsan details to be added or removed</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>id</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Vsan id</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of vsan&#x27;s interfaces to be added</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Name of the vsan</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remove</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Removes the vsan if True</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suspend</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>suspend the vsan if True</div>
+ </td>
+ </tr>
+
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NX-OS 8.4(1)
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Test that vsan module works
+ cisco.nxos.nxos_vsan:
+ vsan:
+ - id: 922
+ interface:
+ - fc1/1
+ - fc1/2
+ - port-channel 1
+ name: vsan-SAN-A
+ remove: false
+ suspend: false
+ - id: 923
+ interface:
+ - fc1/11
+ - fc1/21
+ - port-channel 2
+ name: vsan-SAN-B
+ remove: false
+ suspend: true
+ - id: 1923
+ name: vsan-SAN-Old
+ remove: true
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;terminal dont-ask&#x27;, &#x27;vsan database&#x27;, &#x27;vsan 922 interface fc1/40&#x27;, &#x27;vsan 922 interface port-channel 155&#x27;, &#x27;no terminal dont-ask&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Suhas Bharadwaj (@srbharadwaj) (subharad@cisco.com)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vtp_domain_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vtp_domain_module.rst
new file mode 100644
index 00000000..f8ad85f3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vtp_domain_module.rst
@@ -0,0 +1,428 @@
+.. _cisco.nxos.nxos_vtp_domain_module:
+
+
+**************************
+cisco.nxos.nxos_vtp_domain
+**************************
+
+**Manages VTP domain configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages VTP domain configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>domain</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VTP domain name.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - VTP feature must be active on the device to use this module.
+ - This module is used to manage only VTP domain names.
+ - VTP domain names are case-sensible.
+ - If it's never been configured before, VTP version is set to 1 by default. Otherwise, it leaves the previous configured version untouched. Use :ref:`cisco.nxos.nxos_vtp_version <cisco.nxos.nxos_vtp_version_module>` to change it.
+ - Use this in combination with :ref:`cisco.nxos.nxos_vtp_password <cisco.nxos.nxos_vtp_password_module>` and :ref:`cisco.nxos.nxos_vtp_version <cisco.nxos.nxos_vtp_version_module>` to fully manage VTP operations.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # ENSURE VTP DOMAIN IS CONFIGURED
+ - cisco.nxos.nxos_vtp_domain:
+ domain: ntc
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>changed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>check to see if a change was made on the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>end_state</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of vtp domain after module execution</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;domain&#x27;: &#x27;ntc&#x27;, &#x27;version&#x27;: &#x27;2&#x27;, &#x27;vtp_password&#x27;: &#x27;&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>existing</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of existing vtp domain</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;domain&#x27;: &#x27;testing&#x27;, &#x27;version&#x27;: &#x27;2&#x27;, &#x27;vtp_password&#x27;: &#x27;&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>proposed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of parameters passed into module</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;domain&#x27;: &#x27;ntc&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;vtp domain ntc&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vtp_password_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vtp_password_module.rst
new file mode 100644
index 00000000..60f90d17
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vtp_password_module.rst
@@ -0,0 +1,454 @@
+.. _cisco.nxos.nxos_vtp_password_module:
+
+
+****************************
+cisco.nxos.nxos_vtp_password
+****************************
+
+**Manages VTP password configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages VTP password configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Manage the state of the resource</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vtp_password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>VTP password</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - VTP feature must be active on the device to use this module.
+ - This module is used to manage only VTP passwords.
+ - Use this in combination with :ref:`cisco.nxos.nxos_vtp_domain <cisco.nxos.nxos_vtp_domain_module>` and :ref:`cisco.nxos.nxos_vtp_version <cisco.nxos.nxos_vtp_version_module>` to fully manage VTP operations.
+ - You can set/remove password only if a VTP domain already exist.
+ - If ``state=absent`` and no ``vtp_password`` is provided, it remove the current VTP password.
+ - If ``state=absent`` and ``vtp_password`` is provided, the proposed ``vtp_password`` has to match the existing one in order to remove it.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # ENSURE VTP PASSWORD IS SET
+ - cisco.nxos.nxos_vtp_password:
+ state: present
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+ # ENSURE VTP PASSWORD IS REMOVED
+ - cisco.nxos.nxos_vtp_password:
+ state: absent
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>changed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>check to see if a change was made on the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>end_state</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of vtp after module execution</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;domain&#x27;: &#x27;ntc&#x27;, &#x27;version&#x27;: &#x27;1&#x27;, &#x27;vtp_password&#x27;: &#x27;new_ntc&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>existing</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of existing vtp</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;domain&#x27;: &#x27;ntc&#x27;, &#x27;version&#x27;: &#x27;1&#x27;, &#x27;vtp_password&#x27;: &#x27;ntc&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>proposed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of parameters passed into module</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;vtp_password&#x27;: &#x27;new_ntc&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;vtp password new_ntc&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vtp_version_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vtp_version_module.rst
new file mode 100644
index 00000000..cdd8a6d3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vtp_version_module.rst
@@ -0,0 +1,430 @@
+.. _cisco.nxos.nxos_vtp_version_module:
+
+
+***************************
+cisco.nxos.nxos_vtp_version
+***************************
+
+**Manages VTP version configuration.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages VTP version configuration.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>version</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>1</li>
+ <li>2</li>
+ </ul>
+ </td>
+ <td>
+ <div>VTP version number.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - VTP feature must be active on the device to use this module.
+ - This module is used to manage only VTP version.
+ - Use this in combination with :ref:`cisco.nxos.nxos_vtp_password <cisco.nxos.nxos_vtp_password_module>` and :ref:`cisco.nxos.nxos_vtp_version <cisco.nxos.nxos_vtp_version_module>` to fully manage VTP operations.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ # ENSURE VTP VERSION IS 2
+ - cisco.nxos.nxos_vtp_version:
+ version: 2
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>changed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>check to see if a change was made on the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>end_state</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of vtp after module execution</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;domain&#x27;: &#x27;testing&#x27;, &#x27;version&#x27;: &#x27;2&#x27;, &#x27;vtp_password&#x27;: &#x27;&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>existing</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of existing vtp</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;domain&#x27;: &#x27;testing&#x27;, &#x27;version&#x27;: &#x27;1&#x27;, &#x27;vtp_password&#x27;: &#x27;&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>proposed</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>k/v pairs of parameters passed into module</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;version&#x27;: &#x27;2&#x27;}</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>updates</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>command sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;vtp version 2&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vxlan_vtep_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vxlan_vtep_module.rst
new file mode 100644
index 00000000..cea89d82
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vxlan_vtep_module.rst
@@ -0,0 +1,546 @@
+.. _cisco.nxos.nxos_vxlan_vtep_module:
+
+
+**************************
+cisco.nxos.nxos_vxlan_vtep
+**************************
+
+**Manages VXLAN Network Virtualization Endpoint (NVE).**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Manages VXLAN Network Virtualization Endpoint (NVE) overlay interface that terminates VXLAN tunnels.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>description</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Description of the NVE interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>global_ingress_replication_bgp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures ingress replication protocol as bgp for all VNIs. This is available on Nexus 9000 series switches running NX-OS software release 9.2(x) or higher.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>global_mcast_group_L2</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Global multicast IP prefix for L2 VNIs or the keyword &#x27;default&#x27;. This is available on Nexus 9000 series switches running NX-OS software release 9.2(x) or higher.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>global_mcast_group_L3</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Global multicast IP prefix for L3 VNIs or the keyword &#x27;default&#x27;. This is available on Nexus 9000 series switches running NX-OS software release 9.2(x) or higher.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>global_suppress_arp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables ARP suppression for all VNIs. This is available on NX-OS 9K series running 9.2.x or higher.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host_reachability</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specify mechanism for host reachability advertisement. A Boolean value of &#x27;true&#x27; indicates that BGP will be used for host reachability advertisement. A Boolean value of &#x27;false&#x27; indicates that no protocol is used for host reachability advertisement. Other host reachability advertisement protocols (e.g. OpenFlow, controller, etc.) are not supported.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface name for the VXLAN Network Virtualization Endpoint.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multisite_border_gateway_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ <div style="font-style: italic; font-size: small; color: darkgreen">added in 1.1.0</div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the loopback interface whose IP address should be used for the NVE Multisite Border-gateway Interface. This is available on specific Nexus 9000 series switches running NX-OS 7.0(3)I7(x) or higher. Specify &quot;default&quot; to remove an existing gateway config.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>shutdown</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Administratively shutdown the NVE interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specify the loopback interface whose IP address should be used for the NVE interface.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>source_interface_hold_down_time</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Suppresses advertisement of the NVE loopback address until the overlay has converged.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines whether the config should be present or not on the device.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - The module is used to manage NVE properties, not to create NVE interfaces. Use :ref:`cisco.nxos.nxos_interface <cisco.nxos.nxos_interface_module>` if you wish to do so.
+ - ``state=absent`` removes the interface.
+ - Default, where supported, restores params default value.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_vxlan_vtep:
+ interface: nve1
+ description: default
+ host_reachability: true
+ source_interface: Loopback0
+ source_interface_hold_down_time: 30
+ shutdown: default
+ multisite_border_gateway_interface: Loopback0
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface nve1&#x27;, &#x27;source-interface loopback0&#x27;, &#x27;source-interface hold-down-time 30&#x27;, &#x27;description simple description&#x27;, &#x27;shutdown&#x27;, &#x27;host-reachability protocol bgp&#x27;, &#x27;multisite border-gateway interface loopback0&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vxlan_vtep_vni_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vxlan_vtep_vni_module.rst
new file mode 100644
index 00000000..2e5212a4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_vxlan_vtep_vni_module.rst
@@ -0,0 +1,519 @@
+.. _cisco.nxos.nxos_vxlan_vtep_vni_module:
+
+
+******************************
+cisco.nxos.nxos_vxlan_vtep_vni
+******************************
+
+**Creates a Virtual Network Identifier member (VNI)**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Creates a Virtual Network Identifier member (VNI) for an NVE overlay interface.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="2">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>assoc_vrf</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>This attribute is used to identify and separate processing VNIs that are associated with a VRF and used for routing. The VRF and VNI specified with this command must match the configuration of the VNI under the VRF.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ingress_replication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>bgp</li>
+ <li>static</li>
+ <li>default</li>
+ </ul>
+ </td>
+ <td>
+ <div>Specifies mechanism for host reachability advertisement.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>interface</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Interface name for the VXLAN Network Virtualization Endpoint.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multicast_group</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>The multicast group (range) of the VNI. Valid values are string and keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>multisite_ingress_replication</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ <div style="font-style: italic; font-size: small; color: darkgreen">added in 1.1.0</div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>disable</li>
+ <li>enable</li>
+ <li>optimized</li>
+ </ul>
+ </td>
+ <td>
+ <div>Enables multisite ingress replication.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>peer_list</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Set the ingress-replication static peer list. Valid values are an array, a space-separated string of ip addresses, or the keyword &#x27;default&#x27;.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>provider</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div><b>Deprecated</b></div>
+ <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
+ <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for NX-API.</div>
+ <div>This option will be removed in a release after 2022-06-01.</div>
+ <div>For more information please see the <a href='../network/user_guide/platform_nxos.html'>NXOS Platform Options guide</a>.</div>
+ <div><hr/></div>
+ <div>A dict object containing connection details.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>auth_pass</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use if required to enter privileged mode on the remote device. If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>authorize</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>host</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>password</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either <em>cli</em> or <em>nxapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>port</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the port to use when building the connection to the remote device. This value applies to either <em>cli</em> or <em>nxapi</em>. The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>ssh_keyfile</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the SSH key to use to authenticate the connection to the remote device. This argument is only used for the <em>cli</em> transport. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>timeout</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>transport</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
+ <li>nxapi</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over cli (ssh) or nxapi.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_proxy</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>use_ssl</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=nxapi</code>, otherwise this value is ignored.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>username</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate either the CLI login or the nxapi authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>validate_certs</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If the transport argument is not nxapi, this value is ignored.</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>state</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
+ <li>absent</li>
+ </ul>
+ </td>
+ <td>
+ <div>Determines whether the config should be present or not on the device.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_arp</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Suppress arp under layer 2 VNI.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>suppress_arp_disable</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Overrides the global ARP suppression config. This is available on NX-OS 9K series running 9.2.x or higher.</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vni</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>ID of the Virtual Network Identifier.</div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NXOSv 7.3.(0)D1(1) on VIRL
+ - default, where supported, restores params default value.
+ - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
+ - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
+ - For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_.
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - cisco.nxos.nxos_vxlan_vtep_vni:
+ interface: nve1
+ vni: 6000
+ ingress_replication: default
+ multisite_ingress_replication: enable
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface nve1&#x27;, &#x27;member vni 6000&#x27;, &#x27;multisite ingress-replication&#x27;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Gabriele Gerbino (@GGabriele)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_zone_zoneset_module.rst b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_zone_zoneset_module.rst
new file mode 100644
index 00000000..33f61378
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_zone_zoneset_module.rst
@@ -0,0 +1,537 @@
+.. _cisco.nxos.nxos_zone_zoneset_module:
+
+
+****************************
+cisco.nxos.nxos_zone_zoneset
+****************************
+
+**Configuration of zone/zoneset for Cisco NXOS MDS Switches.**
+
+
+Version added: 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+
+Synopsis
+--------
+- Configuration of zone/zoneset for Cisco MDS NXOS.
+
+
+
+
+Parameters
+----------
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="4">Parameter</th>
+ <th>Choices/<font color="blue">Defaults</font></th>
+ <th width="100%">Comments</th>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>zone_zoneset_details</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of zone/zoneset details to be added or removed</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>default_zone</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>permit</li>
+ <li>deny</li>
+ </ul>
+ </td>
+ <td>
+ <div>default zone behaviour for the vsan</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>mode</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>enhanced</li>
+ <li>basic</li>
+ </ul>
+ </td>
+ <td>
+ <div>mode of the zone for the vsan</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>smart_zoning</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>no</li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Removes the vsan if True</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>vsan</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">integer</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>vsan id</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>zone</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of zone options for that vsan</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>members</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Members of the zone that needs to be removed or added</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>devtype</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>initiator</li>
+ <li>target</li>
+ <li>both</li>
+ </ul>
+ </td>
+ <td>
+ <div>devtype of the zone member used along with Smart zoning config</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>pwwn</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>pwwn member of the zone, use alias &#x27;device_alias&#x27; as option for device_alias member</div>
+ <div style="font-size: small; color: darkgreen"><br/>aliases: device_alias</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remove</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Removes member from the zone if True</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>name of the zone</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remove</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Deletes the zone if True</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td colspan="3">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>zoneset</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>List of zoneset options for the vsan</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>action</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li>activate</li>
+ <li>deactivate</li>
+ </ul>
+ </td>
+ <td>
+ <div>activates/de-activates the zoneset</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>members</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ / <span style="color: purple">elements=dictionary</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>Members of the zoneset that needs to be removed or added</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>name of the zone that needs to be added to the zoneset or removed from the zoneset</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remove</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Removes zone member from the zoneset</div>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>name</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">string</span>
+ / <span style="color: red">required</span>
+ </div>
+ </td>
+ <td>
+ </td>
+ <td>
+ <div>name of the zoneset</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="elbow-placeholder"></td>
+ <td class="elbow-placeholder"></td>
+ <td colspan="2">
+ <div class="ansibleOptionAnchor" id="parameter-"></div>
+ <b>remove</b>
+ <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
+ <div style="font-size: small">
+ <span style="color: purple">boolean</span>
+ </div>
+ </td>
+ <td>
+ <ul style="margin: 0; padding: 0"><b>Choices:</b>
+ <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
+ <li>yes</li>
+ </ul>
+ </td>
+ <td>
+ <div>Removes zoneset if True</div>
+ </td>
+ </tr>
+
+
+ </table>
+ <br/>
+
+
+Notes
+-----
+
+.. note::
+ - Tested against NX-OS 8.4(1)
+
+
+
+Examples
+--------
+
+.. code-block:: yaml
+
+ - name: Test that zone/zoneset module works
+ cisco.nxos.nxos_zone_zoneset:
+ zone_zoneset_details:
+ - mode: enhanced
+ vsan: 22
+ zone:
+ - members:
+ - pwwn: 11:11:11:11:11:11:11:11
+ - device_alias: test123
+ - pwwn: 61:61:62:62:12:12:12:12
+ remove: true
+ name: zoneA
+ - members:
+ - pwwn: 10:11:11:11:11:11:11:11
+ - pwwn: 62:62:62:62:21:21:21:21
+ name: zoneB
+ - name: zoneC
+ remove: true
+ zoneset:
+ - action: activate
+ members:
+ - name: zoneA
+ - name: zoneB
+ - name: zoneC
+ remove: true
+ name: zsetname1
+ - action: deactivate
+ name: zsetTestExtra
+ remove: true
+ - mode: basic
+ smart_zoning: true
+ vsan: 21
+ zone:
+ - members:
+ - devtype: both
+ pwwn: 11:11:11:11:11:11:11:11
+ - pwwn: 62:62:62:62:12:12:12:12
+ - devtype: both
+ pwwn: 92:62:62:62:12:12:1a:1a
+ remove: true
+ name: zone21A
+ - members:
+ - pwwn: 10:11:11:11:11:11:11:11
+ - pwwn: 62:62:62:62:21:21:21:21
+ name: zone21B
+ zoneset:
+ - action: activate
+ members:
+ - name: zone21A
+ - name: zone21B
+ name: zsetname212
+
+
+
+Return Values
+-------------
+Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
+
+.. raw:: html
+
+ <table border=0 cellpadding=0 class="documentation-table">
+ <tr>
+ <th colspan="1">Key</th>
+ <th>Returned</th>
+ <th width="100%">Description</th>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>commands</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>commands sent to the device</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;terminal dont-ask&#x27;, &#x27;zone name zoneA vsan 923&#x27;, &#x27;member pwwn 11:11:11:11:11:11:11:11&#x27;, &#x27;no member device-alias test123&#x27;, &#x27;zone commit vsan 923&#x27;, &#x27;no terminal dont-ask&#x27;]</div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="1">
+ <div class="ansibleOptionAnchor" id="return-"></div>
+ <b>messages</b>
+ <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
+ <div style="font-size: small">
+ <span style="color: purple">list</span>
+ </div>
+ </td>
+ <td>always</td>
+ <td>
+ <div>debug messages</div>
+ <br/>
+ <div style="font-size: smaller"><b>Sample:</b></div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;zone mode is already enhanced ,no change in zone mode configuration for vsan 922&#x27;, &quot;zone member &#x27;11:11:11:11:11:11:11:11&#x27; is already present in zone &#x27;zoneA&#x27; in vsan 922 hence nothing to add&quot;, &quot;zone member &#x27;test123&#x27; is already present in zone &#x27;zoneA&#x27; in vsan 922 hence nothing to add&quot;, &quot;zone member &#x27;61:61:62:62:12:12:12:12&#x27; is not present in zone &#x27;zoneA&#x27; in vsan 922 hence nothing to remove&quot;, &quot;zone member &#x27;10:11:11:11:11:11:11:11&#x27; is already present in zone &#x27;zoneB&#x27; in vsan 922 hence nothing to add&quot;, &quot;zone member &#x27;62:62:62:62:21:21:21:21&#x27; is already present in zone &#x27;zoneB&#x27; in vsan 922 hence nothing to add&quot;, &quot;zone &#x27;zoneC&#x27; is not present in vsan 922 , so nothing to remove&quot;]</div>
+ </td>
+ </tr>
+ </table>
+ <br/><br/>
+
+
+Status
+------
+
+
+Authors
+~~~~~~~
+
+- Suhas Bharadwaj (@srbharadwaj) (subharad@cisco.com)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/meta/runtime.yml b/collections-debian-merged/ansible_collections/cisco/nxos/meta/runtime.yml
new file mode 100644
index 00000000..e6883ea7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/meta/runtime.yml
@@ -0,0 +1,658 @@
+---
+requires_ansible: '>=2.9.10,<2.11'
+plugin_routing:
+ action:
+ nxos_aaa_server:
+ redirect: cisco.nxos.nxos
+ aaa_server:
+ redirect: cisco.nxos.nxos
+ nxos_aaa_server_host:
+ redirect: cisco.nxos.nxos
+ aaa_server_host:
+ redirect: cisco.nxos.nxos
+ nxos_acl:
+ redirect: cisco.nxos.nxos
+ acl:
+ redirect: cisco.nxos.nxos
+ nxos_acl_interface:
+ redirect: cisco.nxos.nxos
+ acl_interface:
+ redirect: cisco.nxos.nxos
+ nxos_acl_interfaces:
+ redirect: cisco.nxos.nxos
+ acl_interfaces:
+ redirect: cisco.nxos.nxos
+ nxos_acls:
+ redirect: cisco.nxos.nxos
+ acls:
+ redirect: cisco.nxos.nxos
+ nxos_banner:
+ redirect: cisco.nxos.nxos
+ banner:
+ redirect: cisco.nxos.nxos
+ nxos_bfd_global:
+ redirect: cisco.nxos.nxos
+ bfd_global:
+ redirect: cisco.nxos.nxos
+ nxos_bfd_interfaces:
+ redirect: cisco.nxos.nxos
+ bfd_interfaces:
+ redirect: cisco.nxos.nxos
+ nxos_bgp:
+ redirect: cisco.nxos.nxos
+ bgp:
+ redirect: cisco.nxos.nxos
+ nxos_bgp_af:
+ redirect: cisco.nxos.nxos
+ bgp_af:
+ redirect: cisco.nxos.nxos
+ nxos_bgp_neighbor:
+ redirect: cisco.nxos.nxos
+ bgp_neighbor:
+ redirect: cisco.nxos.nxos
+ nxos_bgp_neighbor_af:
+ redirect: cisco.nxos.nxos
+ bgp_neighbor_af:
+ redirect: cisco.nxos.nxos
+ nxos_command:
+ redirect: cisco.nxos.nxos
+ command:
+ redirect: cisco.nxos.nxos
+ nxos_config:
+ redirect: cisco.nxos.nxos
+ config:
+ redirect: cisco.nxos.nxos
+ nxos_devicealias:
+ redirect: cisco.nxos.nxos
+ devicealias:
+ redirect: cisco.nxos.nxos
+ nxos_evpn_global:
+ redirect: cisco.nxos.nxos
+ evpn_global:
+ redirect: cisco.nxos.nxos
+ nxos_evpn_vni:
+ redirect: cisco.nxos.nxos
+ evpn_vni:
+ redirect: cisco.nxos.nxos
+ nxos_facts:
+ redirect: cisco.nxos.nxos
+ facts:
+ redirect: cisco.nxos.nxos
+ nxos_feature:
+ redirect: cisco.nxos.nxos
+ feature:
+ redirect: cisco.nxos.nxos
+ nxos_gir:
+ redirect: cisco.nxos.nxos
+ gir:
+ redirect: cisco.nxos.nxos
+ nxos_gir_profile_management:
+ redirect: cisco.nxos.nxos
+ gir_profile_management:
+ redirect: cisco.nxos.nxos
+ nxos_hsrp:
+ redirect: cisco.nxos.nxos
+ hsrp:
+ redirect: cisco.nxos.nxos
+ nxos_hsrp_interfaces:
+ redirect: cisco.nxos.nxos
+ hsrp_interfaces:
+ redirect: cisco.nxos.nxos
+ nxos_igmp:
+ redirect: cisco.nxos.nxos
+ igmp:
+ redirect: cisco.nxos.nxos
+ nxos_igmp_interface:
+ redirect: cisco.nxos.nxos
+ igmp_interface:
+ redirect: cisco.nxos.nxos
+ nxos_igmp_snooping:
+ redirect: cisco.nxos.nxos
+ igmp_snooping:
+ redirect: cisco.nxos.nxos
+ nxos_install_os:
+ redirect: cisco.nxos.nxos
+ install_os:
+ redirect: cisco.nxos.nxos
+ nxos_interface:
+ redirect: cisco.nxos.nxos
+ interface:
+ redirect: cisco.nxos.nxos
+ nxos_interface_ospf:
+ redirect: cisco.nxos.nxos
+ interface_ospf:
+ redirect: cisco.nxos.nxos
+ nxos_interfaces:
+ redirect: cisco.nxos.nxos
+ interfaces:
+ redirect: cisco.nxos.nxos
+ nxos_l2_interface:
+ redirect: cisco.nxos.nxos
+ l2_interface:
+ redirect: cisco.nxos.nxos
+ nxos_l2_interfaces:
+ redirect: cisco.nxos.nxos
+ l2_interfaces:
+ redirect: cisco.nxos.nxos
+ nxos_l3_interface:
+ redirect: cisco.nxos.nxos
+ l3_interface:
+ redirect: cisco.nxos.nxos
+ nxos_l3_interfaces:
+ redirect: cisco.nxos.nxos
+ l3_interfaces:
+ redirect: cisco.nxos.nxos
+ nxos_lacp:
+ redirect: cisco.nxos.nxos
+ lacp:
+ redirect: cisco.nxos.nxos
+ nxos_lacp_interfaces:
+ redirect: cisco.nxos.nxos
+ lacp_interfaces:
+ redirect: cisco.nxos.nxos
+ nxos_lag_interfaces:
+ redirect: cisco.nxos.nxos
+ lag_interfaces:
+ redirect: cisco.nxos.nxos
+ nxos_linkagg:
+ redirect: cisco.nxos.nxos
+ linkagg:
+ redirect: cisco.nxos.nxos
+ nxos_lldp:
+ redirect: cisco.nxos.nxos
+ lldp:
+ redirect: cisco.nxos.nxos
+ nxos_lldp_global:
+ redirect: cisco.nxos.nxos
+ lldp_global:
+ redirect: cisco.nxos.nxos
+ nxos_lldp_interfaces:
+ redirect: cisco.nxos.nxos
+ lldp_interfaces:
+ redirect: cisco.nxos.nxos
+ nxos_logging:
+ redirect: cisco.nxos.nxos
+ logging:
+ redirect: cisco.nxos.nxos
+ nxos_ntp:
+ redirect: cisco.nxos.nxos
+ ntp:
+ redirect: cisco.nxos.nxos
+ nxos_ntp_auth:
+ redirect: cisco.nxos.nxos
+ ntp_auth:
+ redirect: cisco.nxos.nxos
+ nxos_ntp_options:
+ redirect: cisco.nxos.nxos
+ ntp_options:
+ redirect: cisco.nxos.nxos
+ nxos_nxapi:
+ redirect: cisco.nxos.nxos
+ nxapi:
+ redirect: cisco.nxos.nxos
+ nxos_ospf_interfaces:
+ redirect: cisco.nxos.nxos
+ ospf_interfaces:
+ redirect: cisco.nxos.nxos
+ nxos_ospf:
+ redirect: cisco.nxos.nxos
+ ospf:
+ redirect: cisco.nxos.nxos
+ nxos_ospf_vrf:
+ redirect: cisco.nxos.nxos
+ ospf_vrf:
+ redirect: cisco.nxos.nxos
+ nxos_bgp_global:
+ redirect: cisco.nxos.nxos
+ bgp_global:
+ redirect: cisco.nxos.nxos
+ nxos_ospfv2:
+ redirect: cisco.nxos.nxos
+ ospfv2:
+ redirect: cisco.nxos.nxos
+ nxos_ospfv3:
+ redirect: cisco.nxos.nxos
+ ospfv3:
+ redirect: cisco.nxos.nxos
+ nxos_overlay_global:
+ redirect: cisco.nxos.nxos
+ overlay_global:
+ redirect: cisco.nxos.nxos
+ nxos_pim:
+ redirect: cisco.nxos.nxos
+ pim:
+ redirect: cisco.nxos.nxos
+ nxos_pim_interface:
+ redirect: cisco.nxos.nxos
+ pim_interface:
+ redirect: cisco.nxos.nxos
+ nxos_pim_rp_address:
+ redirect: cisco.nxos.nxos
+ pim_rp_address:
+ redirect: cisco.nxos.nxos
+ nxos_ping:
+ redirect: cisco.nxos.nxos
+ ping:
+ redirect: cisco.nxos.nxos
+ nxos_reboot:
+ redirect: cisco.nxos.nxos
+ reboot:
+ redirect: cisco.nxos.nxos
+ nxos_rollback:
+ redirect: cisco.nxos.nxos
+ rollback:
+ redirect: cisco.nxos.nxos
+ nxos_rpm:
+ redirect: cisco.nxos.nxos
+ rpm:
+ redirect: cisco.nxos.nxos
+ nxos_smu:
+ redirect: cisco.nxos.nxos
+ smu:
+ redirect: cisco.nxos.nxos
+ nxos_snapshot:
+ redirect: cisco.nxos.nxos
+ snapshot:
+ redirect: cisco.nxos.nxos
+ nxos_snmp_community:
+ redirect: cisco.nxos.nxos
+ snmp_community:
+ redirect: cisco.nxos.nxos
+ nxos_snmp_contact:
+ redirect: cisco.nxos.nxos
+ snmp_contact:
+ redirect: cisco.nxos.nxos
+ nxos_snmp_host:
+ redirect: cisco.nxos.nxos
+ snmp_host:
+ redirect: cisco.nxos.nxos
+ nxos_snmp_location:
+ redirect: cisco.nxos.nxos
+ snmp_location:
+ redirect: cisco.nxos.nxos
+ nxos_snmp_traps:
+ redirect: cisco.nxos.nxos
+ snmp_traps:
+ redirect: cisco.nxos.nxos
+ nxos_snmp_user:
+ redirect: cisco.nxos.nxos
+ snmp_user:
+ redirect: cisco.nxos.nxos
+ nxos_static_route:
+ redirect: cisco.nxos.nxos
+ static_route:
+ redirect: cisco.nxos.nxos
+ nxos_static_routes:
+ redirect: cisco.nxos.nxos
+ static_routes:
+ redirect: cisco.nxos.nxos
+ nxos_system:
+ redirect: cisco.nxos.nxos
+ system:
+ redirect: cisco.nxos.nxos
+ nxos_telemetry:
+ redirect: cisco.nxos.nxos
+ telemetry:
+ redirect: cisco.nxos.nxos
+ nxos_udld:
+ redirect: cisco.nxos.nxos
+ udld:
+ redirect: cisco.nxos.nxos
+ nxos_udld_interface:
+ redirect: cisco.nxos.nxos
+ udld_interface:
+ redirect: cisco.nxos.nxos
+ nxos_user:
+ redirect: cisco.nxos.nxos
+ user:
+ redirect: cisco.nxos.nxos
+ nxos_vlan:
+ redirect: cisco.nxos.nxos
+ vlan:
+ redirect: cisco.nxos.nxos
+ nxos_vlans:
+ redirect: cisco.nxos.nxos
+ vlans:
+ redirect: cisco.nxos.nxos
+ nxos_vpc:
+ redirect: cisco.nxos.nxos
+ vpc:
+ redirect: cisco.nxos.nxos
+ nxos_vpc_interface:
+ redirect: cisco.nxos.nxos
+ vpc_interface:
+ redirect: cisco.nxos.nxos
+ nxos_vrf:
+ redirect: cisco.nxos.nxos
+ vrf:
+ redirect: cisco.nxos.nxos
+ nxos_vrf_af:
+ redirect: cisco.nxos.nxos
+ vrf_af:
+ redirect: cisco.nxos.nxos
+ nxos_vrf_interface:
+ redirect: cisco.nxos.nxos
+ vrf_interface:
+ redirect: cisco.nxos.nxos
+ nxos_vrrp:
+ redirect: cisco.nxos.nxos
+ vrrp:
+ redirect: cisco.nxos.nxos
+ nxos_vsan:
+ redirect: cisco.nxos.nxos
+ vsan:
+ redirect: cisco.nxos.nxos
+ nxos_vtp_domain:
+ redirect: cisco.nxos.nxos
+ vtp_domain:
+ redirect: cisco.nxos.nxos
+ nxos_vtp_password:
+ redirect: cisco.nxos.nxos
+ vtp_password:
+ redirect: cisco.nxos.nxos
+ nxos_vtp_version:
+ redirect: cisco.nxos.nxos
+ vtp_version:
+ redirect: cisco.nxos.nxos
+ nxos_vxlan_vtep:
+ redirect: cisco.nxos.nxos
+ vxlan_vtep:
+ redirect: cisco.nxos.nxos
+ nxos_vxlan_vtep_vni:
+ redirect: cisco.nxos.nxos
+ vxlan_vtep_vni:
+ redirect: cisco.nxos.nxos
+ nxos_zone_zoneset:
+ redirect: cisco.nxos.nxos
+ zone_zoneset:
+ redirect: cisco.nxos.nxos
+ modules:
+ aaa_server:
+ redirect: cisco.nxos.nxos_aaa_server
+ aaa_server_host:
+ redirect: cisco.nxos.nxos_aaa_server_host
+ acl:
+ redirect: cisco.nxos.nxos_acl
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ nxos_acl:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ acl_interface:
+ redirect: cisco.nxos.nxos_acl_interface
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ nxos_acl_interface:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ acl_interfaces:
+ redirect: cisco.nxos.nxos_acl_interfaces
+ acls:
+ redirect: cisco.nxos.nxos_acls
+ banner:
+ redirect: cisco.nxos.nxos_banner
+ bfd_global:
+ redirect: cisco.nxos.nxos_bfd_global
+ bfd_interfaces:
+ redirect: cisco.nxos.nxos_bfd_interfaces
+ bgp:
+ redirect: cisco.nxos.nxos_bgp
+ deprecation:
+ removal_date: '2023-01-27'
+ warning_text: See the plugin documentation for more details
+ nxos_bgp:
+ deprecation:
+ removal_date: '2023-01-27'
+ warning_text: See the plugin documentation for more details
+ bgp_af:
+ redirect: cisco.nxos.nxos_bgp_af
+ bgp_neighbor:
+ redirect: cisco.nxos.nxos_bgp_neighbor
+ deprecation:
+ removal_date: '2023-01-27'
+ warning_text: See the plugin documentation for more details
+ nxos_bgp_neighbor:
+ deprecation:
+ removal_date: '2023-01-27'
+ warning_text: See the plugin documentation for more details
+ bgp_neighbor_af:
+ redirect: cisco.nxos.nxos_bgp_neighbor_af
+ command:
+ redirect: cisco.nxos.nxos_command
+ config:
+ redirect: cisco.nxos.nxos_config
+ devicealias:
+ redirect: cisco.nxos.nxos_devicealias
+ evpn_global:
+ redirect: cisco.nxos.nxos_evpn_global
+ evpn_vni:
+ redirect: cisco.nxos.nxos_evpn_vni
+ facts:
+ redirect: cisco.nxos.nxos_facts
+ feature:
+ redirect: cisco.nxos.nxos_feature
+ file_copy:
+ redirect: cisco.nxos.nxos_file_copy
+ gir:
+ redirect: cisco.nxos.nxos_gir
+ gir_profile_management:
+ redirect: cisco.nxos.nxos_gir_profile_management
+ hsrp:
+ redirect: cisco.nxos.nxos_hsrp
+ hsrp_interfaces:
+ redirect: cisco.nxos.nxos_hsrp_interfaces
+ igmp:
+ redirect: cisco.nxos.nxos_igmp
+ igmp_interface:
+ redirect: cisco.nxos.nxos_igmp_interface
+ igmp_snooping:
+ redirect: cisco.nxos.nxos_igmp_snooping
+ install_os:
+ redirect: cisco.nxos.nxos_install_os
+ interface:
+ redirect: cisco.nxos.nxos_interface
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ nxos_interface:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ interface_ospf:
+ redirect: cisco.nxos.nxos_interface_ospf
+ deprecation:
+ removal_date: '2022-10-26'
+ warning_text: See the plugin documentation for more details
+ nxos_interface_ospf:
+ deprecation:
+ removal_date: '2022-10-26'
+ warning_text: See the plugin documentation for more details
+ interfaces:
+ redirect: cisco.nxos.nxos_interfaces
+ l2_interface:
+ redirect: cisco.nxos.nxos_l2_interface
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ nxos_l2_interface:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ l2_interfaces:
+ redirect: cisco.nxos.nxos_l2_interfaces
+ l3_interface:
+ redirect: cisco.nxos.nxos_l3_interface
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ nxos_l3_interface:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ l3_interfaces:
+ redirect: cisco.nxos.nxos_l3_interfaces
+ lacp:
+ redirect: cisco.nxos.nxos_lacp
+ lacp_interfaces:
+ redirect: cisco.nxos.nxos_lacp_interfaces
+ lag_interfaces:
+ redirect: cisco.nxos.nxos_lag_interfaces
+ linkagg:
+ redirect: cisco.nxos.nxos_linkagg
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ nxos_linkagg:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ lldp:
+ redirect: cisco.nxos.nxos_lldp
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ nxos_lldp:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ lldp_global:
+ redirect: cisco.nxos.nxos_lldp_global
+ lldp_interfaces:
+ redirect: cisco.nxos.nxos_lldp_interfaces
+ logging:
+ redirect: cisco.nxos.nxos_logging
+ ntp:
+ redirect: cisco.nxos.nxos_ntp
+ ntp_auth:
+ redirect: cisco.nxos.nxos_ntp_auth
+ ntp_options:
+ redirect: cisco.nxos.nxos_ntp_options
+ nxapi:
+ redirect: cisco.nxos.nxos_nxapi
+ ospf_interfaces:
+ redirect: cisco.nxos.nxos_ospf_interfaces
+ ospf:
+ redirect: cisco.nxos.nxos_ospf
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ nxos_ospf:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ ospf_vrf:
+ redirect: cisco.nxos.nxos_ospf_vrf
+ deprecation:
+ removal_date: '2022-10-01'
+ warning_text: See the plugin documentation for more details
+ nxos_ospf_vrf:
+ deprecation:
+ removal_date: '2022-10-01'
+ warning_text: See the plugin documentation for more details
+ bgp_global:
+ redirect: cisco.nxos.nxos_bgp_global
+ ospfv2:
+ redirect: cisco.nxos.nxos_ospfv2
+ ospfv3:
+ redirect: cisco.nxos.nxos_ospfv3
+ overlay_global:
+ redirect: cisco.nxos.nxos_overlay_global
+ pim:
+ redirect: cisco.nxos.nxos_pim
+ pim_interface:
+ redirect: cisco.nxos.nxos_pim_interface
+ pim_rp_address:
+ redirect: cisco.nxos.nxos_pim_rp_address
+ ping:
+ redirect: cisco.nxos.nxos_ping
+ reboot:
+ redirect: cisco.nxos.nxos_reboot
+ rollback:
+ redirect: cisco.nxos.nxos_rollback
+ rpm:
+ redirect: cisco.nxos.nxos_rpm
+ smu:
+ redirect: cisco.nxos.nxos_smu
+ deprecation:
+ removal_date: '2022-10-01'
+ warning_text: See the plugin documentation for more details
+ nxos_smu:
+ deprecation:
+ removal_date: '2022-10-01'
+ warning_text: See the plugin documentation for more details
+ snapshot:
+ redirect: cisco.nxos.nxos_snapshot
+ snmp_community:
+ redirect: cisco.nxos.nxos_snmp_community
+ snmp_contact:
+ redirect: cisco.nxos.nxos_snmp_contact
+ snmp_host:
+ redirect: cisco.nxos.nxos_snmp_host
+ snmp_location:
+ redirect: cisco.nxos.nxos_snmp_location
+ snmp_traps:
+ redirect: cisco.nxos.nxos_snmp_traps
+ snmp_user:
+ redirect: cisco.nxos.nxos_snmp_user
+ static_route:
+ redirect: cisco.nxos.nxos_static_route
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ nxos_static_route:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ static_routes:
+ redirect: cisco.nxos.nxos_static_routes
+ system:
+ redirect: cisco.nxos.nxos_system
+ telemetry:
+ redirect: cisco.nxos.nxos_telemetry
+ udld:
+ redirect: cisco.nxos.nxos_udld
+ udld_interface:
+ redirect: cisco.nxos.nxos_udld_interface
+ user:
+ redirect: cisco.nxos.nxos_user
+ vlan:
+ redirect: cisco.nxos.nxos_vlan
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ nxos_vlan:
+ deprecation:
+ removal_date: '2022-06-01'
+ warning_text: See the plugin documentation for more details
+ vlans:
+ redirect: cisco.nxos.nxos_vlans
+ vpc:
+ redirect: cisco.nxos.nxos_vpc
+ vpc_interface:
+ redirect: cisco.nxos.nxos_vpc_interface
+ vrf:
+ redirect: cisco.nxos.nxos_vrf
+ vrf_af:
+ redirect: cisco.nxos.nxos_vrf_af
+ vrf_interface:
+ redirect: cisco.nxos.nxos_vrf_interface
+ vrrp:
+ redirect: cisco.nxos.nxos_vrrp
+ vsan:
+ redirect: cisco.nxos.nxos_vsan
+ vtp_domain:
+ redirect: cisco.nxos.nxos_vtp_domain
+ vtp_password:
+ redirect: cisco.nxos.nxos_vtp_password
+ vtp_version:
+ redirect: cisco.nxos.nxos_vtp_version
+ vxlan_vtep:
+ redirect: cisco.nxos.nxos_vxlan_vtep
+ vxlan_vtep_vni:
+ redirect: cisco.nxos.nxos_vxlan_vtep_vni
+ zone_zoneset:
+ redirect: cisco.nxos.nxos_zone_zoneset
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/action/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/action/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/action/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/action/nxos.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/action/nxos.py
new file mode 100644
index 00000000..3f5f7176
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/action/nxos.py
@@ -0,0 +1,264 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import copy
+import re
+import sys
+
+from ansible import constants as C
+from ansible_collections.ansible.netcommon.plugins.action.network import (
+ ActionModule as ActionNetworkModule,
+)
+from ansible.module_utils.connection import Connection
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ load_provider,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_provider_spec,
+)
+from ansible.utils.display import Display
+
+display = Display()
+
+
+class ActionModule(ActionNetworkModule):
+ def run(self, tmp=None, task_vars=None):
+ del tmp # tmp no longer has any effect
+
+ module_name = self._task.action.split(".")[-1]
+ self._config_module = (
+ True if module_name in ["nxos_config", "config"] else False
+ )
+ persistent_connection = self._play_context.connection.split(".")[-1]
+ warnings = []
+
+ if (
+ self._play_context.connection in ("httpapi", "local")
+ or self._task.args.get("provider", {}).get("transport") == "nxapi"
+ ) and module_name in ("nxos_file_copy", "nxos_nxapi"):
+ return {
+ "failed": True,
+ "msg": "Transport type 'nxapi' is not valid for '%s' module."
+ % (module_name),
+ }
+
+ if module_name == "nxos_file_copy":
+ self._task.args["host"] = self._play_context.remote_addr
+ self._task.args["password"] = self._play_context.password
+ if self._play_context.connection == "network_cli":
+ self._task.args["username"] = self._play_context.remote_user
+ elif self._play_context.connection == "local":
+ self._task.args[
+ "username"
+ ] = self._play_context.connection_user
+
+ if module_name == "nxos_install_os":
+ connection = self._connection
+ if connection.transport == "local":
+ persistent_command_timeout = C.PERSISTENT_COMMAND_TIMEOUT
+ persistent_connect_timeout = C.PERSISTENT_CONNECT_TIMEOUT
+ else:
+ persistent_command_timeout = connection.get_option(
+ "persistent_command_timeout"
+ )
+ persistent_connect_timeout = connection.get_option(
+ "persistent_connect_timeout"
+ )
+
+ display.vvvv(
+ "PERSISTENT_COMMAND_TIMEOUT is %s"
+ % str(persistent_command_timeout),
+ self._play_context.remote_addr,
+ )
+ display.vvvv(
+ "PERSISTENT_CONNECT_TIMEOUT is %s"
+ % str(persistent_connect_timeout),
+ self._play_context.remote_addr,
+ )
+ if (
+ persistent_command_timeout < 600
+ or persistent_connect_timeout < 600
+ ):
+ msg = (
+ "PERSISTENT_COMMAND_TIMEOUT and PERSISTENT_CONNECT_TIMEOUT"
+ )
+ msg += " must be set to 600 seconds or higher when using nxos_install_os module."
+ msg += " Current persistent_command_timeout setting:" + str(
+ persistent_command_timeout
+ )
+ msg += " Current persistent_connect_timeout setting:" + str(
+ persistent_connect_timeout
+ )
+ return {"failed": True, "msg": msg}
+
+ if persistent_connection in ("network_cli", "httpapi"):
+ provider = self._task.args.get("provider", {})
+ if any(provider.values()):
+ display.warning(
+ "provider is unnecessary when using %s and will be ignored"
+ % self._play_context.connection
+ )
+ del self._task.args["provider"]
+
+ if module_name == "nxos_gir":
+ conn = Connection(self._connection.socket_path)
+ persistent_command_timeout = conn.get_option(
+ "persistent_command_timeout"
+ )
+ gir_timeout = 200
+ if persistent_command_timeout < gir_timeout:
+ conn.set_option("persistent_command_timeout", gir_timeout)
+ msg = (
+ "timeout value extended to %ss for nxos_gir"
+ % gir_timeout
+ )
+ display.warning(msg)
+
+ elif self._play_context.connection == "local":
+ provider = load_provider(nxos_provider_spec, self._task.args)
+ transport = provider["transport"] or "cli"
+
+ display.vvvv(
+ "connection transport is %s" % transport,
+ self._play_context.remote_addr,
+ )
+
+ if transport == "cli":
+ pc = copy.deepcopy(self._play_context)
+ pc.connection = "ansible.netcommon.network_cli"
+ pc.network_os = "cisco.nxos.nxos"
+ pc.remote_addr = (
+ provider["host"] or self._play_context.remote_addr
+ )
+ pc.port = int(
+ provider["port"] or self._play_context.port or 22
+ )
+ pc.remote_user = (
+ provider["username"] or self._play_context.connection_user
+ )
+ pc.password = (
+ provider["password"] or self._play_context.password
+ )
+ pc.private_key_file = (
+ provider["ssh_keyfile"]
+ or self._play_context.private_key_file
+ )
+ pc.become = provider["authorize"] or False
+ if pc.become:
+ pc.become_method = "enable"
+ pc.become_pass = provider["auth_pass"]
+
+ connection = self._shared_loader_obj.connection_loader.get(
+ "ansible.netcommon.persistent",
+ pc,
+ sys.stdin,
+ task_uuid=self._task._uuid,
+ )
+
+ # TODO: Remove below code after ansible minimal is cut out
+ if connection is None:
+ pc.connection = "network_cli"
+ pc.network_os = "nxos"
+ connection = self._shared_loader_obj.connection_loader.get(
+ "persistent", pc, sys.stdin, task_uuid=self._task._uuid
+ )
+
+ display.vvv(
+ "using connection plugin %s (was local)" % pc.connection,
+ pc.remote_addr,
+ )
+
+ command_timeout = (
+ int(provider["timeout"])
+ if provider["timeout"]
+ else connection.get_option("persistent_command_timeout")
+ )
+ connection.set_options(
+ direct={"persistent_command_timeout": command_timeout}
+ )
+
+ socket_path = connection.run()
+ display.vvvv("socket_path: %s" % socket_path, pc.remote_addr)
+ if not socket_path:
+ return {
+ "failed": True,
+ "msg": "unable to open shell. Please see: "
+ + "https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell",
+ }
+
+ task_vars["ansible_socket"] = socket_path
+
+ else:
+ self._task.args[
+ "provider"
+ ] = ActionModule.nxapi_implementation(
+ provider, self._play_context
+ )
+ warnings.append(
+ [
+ "connection local support for this module is deprecated and will be removed in version 2.14,"
+ " use connection either httpapi or ansible.netcommon.httpapi (whichever is applicable)"
+ ]
+ )
+ else:
+ return {
+ "failed": True,
+ "msg": "Connection type %s is not valid for this module"
+ % self._play_context.connection,
+ }
+
+ result = super(ActionModule, self).run(task_vars=task_vars)
+ if warnings:
+ if "warnings" in result:
+ result["warnings"].extend(warnings)
+ else:
+ result["warnings"] = warnings
+ return result
+
+ @staticmethod
+ def nxapi_implementation(provider, play_context):
+ provider["transport"] = "nxapi"
+ if provider.get("host") is None:
+ provider["host"] = play_context.remote_addr
+
+ if provider.get("port") is None:
+ if provider.get("use_ssl"):
+ provider["port"] = 443
+ else:
+ provider["port"] = 80
+
+ if provider.get("timeout") is None:
+ provider["timeout"] = C.PERSISTENT_COMMAND_TIMEOUT
+
+ if provider.get("username") is None:
+ provider["username"] = play_context.connection_user
+
+ if provider.get("password") is None:
+ provider["password"] = play_context.password
+
+ if provider.get("use_ssl") is None:
+ provider["use_ssl"] = False
+
+ if provider.get("validate_certs") is None:
+ provider["validate_certs"] = True
+
+ return provider
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/action/nxos_file_copy.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/action/nxos_file_copy.py
new file mode 100644
index 00000000..1296f0ce
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/action/nxos_file_copy.py
@@ -0,0 +1,632 @@
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import copy
+import hashlib
+import os
+import re
+import time
+
+from ansible.errors import AnsibleError
+from ansible.module_utils._text import to_text, to_bytes, to_native
+from ansible.module_utils.common import validation
+from ansible.module_utils.connection import Connection
+from ansible.plugins.action import ActionBase
+from ansible.utils.display import Display
+from ansible.module_utils.compat.paramiko import paramiko
+from ansible.module_utils import six
+
+try:
+ from scp import SCPClient
+
+ HAS_SCP = True
+except ImportError:
+ HAS_SCP = False
+
+try:
+ import pexpect
+
+ HAS_PEXPECT = True
+except ImportError:
+ HAS_PEXPECT = False
+
+display = Display()
+
+
+class ActionModule(ActionBase):
+ def process_playbook_values(self):
+ """ Get playbook values and perform input validation """
+ argument_spec = dict(
+ vrf=dict(type="str", default="management"),
+ connect_ssh_port=dict(type="int", default=22),
+ file_system=dict(type="str", default="bootflash:"),
+ file_pull=dict(type="bool", default=False),
+ file_pull_timeout=dict(type="int", default=300),
+ file_pull_protocol=dict(
+ type="str",
+ default="scp",
+ choices=["scp", "sftp", "http", "https", "tftp", "ftp"],
+ ),
+ file_pull_compact=dict(type="bool", default=False),
+ file_pull_kstack=dict(type="bool", default=False),
+ local_file=dict(type="path"),
+ local_file_directory=dict(type="path"),
+ remote_file=dict(type="path"),
+ remote_scp_server=dict(type="str"),
+ remote_scp_server_user=dict(type="str"),
+ remote_scp_server_password=dict(no_log=True),
+ )
+
+ playvals = {}
+ # Process key value pairs from playbook task
+ for key in argument_spec.keys():
+ playvals[key] = self._task.args.get(
+ key, argument_spec[key].get("default")
+ )
+ if playvals[key] is None:
+ continue
+
+ option_type = argument_spec[key].get("type", "str")
+ try:
+ if option_type == "str":
+ playvals[key] = validation.check_type_str(playvals[key])
+ elif option_type == "int":
+ playvals[key] = validation.check_type_int(playvals[key])
+ elif option_type == "bool":
+ playvals[key] = validation.check_type_bool(playvals[key])
+ elif option_type == "path":
+ playvals[key] = validation.check_type_path(playvals[key])
+ else:
+ raise AnsibleError(
+ "Unrecognized type <{0}> for playbook parameter <{1}>".format(
+ option_type, key
+ )
+ )
+
+ except (TypeError, ValueError) as e:
+ raise AnsibleError(
+ "argument %s is of type %s and we were unable to convert to %s: %s"
+ % (key, type(playvals[key]), option_type, to_native(e))
+ )
+
+ if "choices" in argument_spec[key] and playvals[
+ key
+ ] not in argument_spec[key].get("choices"):
+ raise AnsibleError(
+ "argument {0} with value {1} is not valid. Allowed values are {2}".format(
+ key,
+ playvals[key],
+ ", ".join(argument_spec[key].get("choices")),
+ )
+ )
+
+ # Validate playbook dependencies
+ if playvals["file_pull"]:
+ if playvals.get("remote_file") is None:
+ raise AnsibleError(
+ "Playbook parameter <remote_file> required when <file_pull> is True"
+ )
+ if playvals.get("remote_scp_server") is None:
+ raise AnsibleError(
+ "Playbook parameter <remote_scp_server> required when <file_pull> is True"
+ )
+
+ if playvals["remote_scp_server"] or playvals["remote_scp_server_user"]:
+
+ if None in (
+ playvals["remote_scp_server"],
+ playvals["remote_scp_server_user"],
+ ):
+ params = "<remote_scp_server>, <remote_scp_server_user>"
+ raise AnsibleError(
+ "Playbook parameters {0} must be set together".format(
+ params
+ )
+ )
+
+ return playvals
+
+ def check_library_dependencies(self, file_pull):
+ if file_pull:
+ if not HAS_PEXPECT:
+ msg = "library pexpect is required when file_pull is True but does not appear to be "
+ msg += "installed. It can be installed using `pip install pexpect`"
+ raise AnsibleError(msg)
+ else:
+ if paramiko is None:
+ msg = "library paramiko is required when file_pull is False but does not appear to be "
+ msg += "installed. It can be installed using `pip install paramiko`"
+ raise AnsibleError(msg)
+
+ if not HAS_SCP:
+ msg = "library scp is required when file_pull is False but does not appear to be "
+ msg += "installed. It can be installed using `pip install scp`"
+ raise AnsibleError(msg)
+
+ def md5sum_check(self, dst, file_system):
+ command = "show file {0}{1} md5sum".format(file_system, dst)
+ remote_filehash = self.conn.exec_command(command)
+ remote_filehash = to_bytes(
+ remote_filehash, errors="surrogate_or_strict"
+ )
+
+ local_file = self.playvals["local_file"]
+ try:
+ with open(local_file, "rb") as f:
+ filecontent = f.read()
+ except (OSError, IOError) as exc:
+ raise AnsibleError(
+ "Error reading the file: {0}".format(to_text(exc))
+ )
+
+ filecontent = to_bytes(filecontent, errors="surrogate_or_strict")
+ local_filehash = hashlib.md5(filecontent).hexdigest()
+
+ decoded_rhash = remote_filehash.decode("UTF-8")
+
+ if local_filehash == decoded_rhash:
+ return True
+ else:
+ return False
+
+ def remote_file_exists(self, remote_file, file_system):
+ command = "dir {0}/{1}".format(file_system, remote_file)
+ body = self.conn.exec_command(command)
+
+ if "No such file" in body:
+ return False
+ else:
+ return self.md5sum_check(remote_file, file_system)
+
+ def verify_remote_file_exists(self, dst, file_system):
+ command = "dir {0}/{1}".format(file_system, dst)
+ body = self.conn.exec_command(command)
+ if "No such file" in body:
+ return 0
+ return body.split()[0].strip()
+
+ def local_file_exists(self, file):
+ return os.path.isfile(file)
+
+ def get_flash_size(self, file_system):
+ command = "dir {0}".format(file_system)
+ body = self.conn.exec_command(command)
+
+ match = re.search(r"(\d+) bytes free", body)
+ if match:
+ bytes_free = match.group(1)
+ return int(bytes_free)
+
+ match = re.search(r"No such file or directory", body)
+ if match:
+ raise AnsibleError(
+ "Invalid nxos filesystem {0}".format(file_system)
+ )
+ else:
+ raise AnsibleError(
+ "Unable to determine size of filesystem {0}".format(
+ file_system
+ )
+ )
+
+ def enough_space(self, file, file_system):
+ flash_size = self.get_flash_size(file_system)
+ file_size = os.path.getsize(file)
+ if file_size > flash_size:
+ return False
+
+ return True
+
+ def transfer_file_to_device(self, remote_file):
+ timeout = self.socket_timeout
+ local_file = self.playvals["local_file"]
+ file_system = self.playvals["file_system"]
+
+ if not self.enough_space(local_file, file_system):
+ raise AnsibleError(
+ "Could not transfer file. Not enough space on device."
+ )
+
+ # frp = full_remote_path, flp = full_local_path
+ frp = "{0}{1}".format(file_system, remote_file)
+ flp = os.path.join(os.path.abspath(local_file))
+ try:
+ self.conn.copy_file(
+ source=flp, destination=frp, proto="scp", timeout=timeout
+ )
+ except Exception as exc:
+ self.results["failed"] = True
+ self.results["msg"] = "Exception received : %s" % exc
+
+ def file_push(self):
+ local_file = self.playvals["local_file"]
+ remote_file = self.playvals["remote_file"] or os.path.basename(
+ local_file
+ )
+ file_system = self.playvals["file_system"]
+
+ if not self.local_file_exists(local_file):
+ raise AnsibleError("Local file {0} not found".format(local_file))
+
+ remote_file = remote_file or os.path.basename(local_file)
+ remote_exists = self.remote_file_exists(remote_file, file_system)
+
+ if not remote_exists:
+ self.results["changed"] = True
+ file_exists = False
+ else:
+ self.results[
+ "transfer_status"
+ ] = "No Transfer: File already copied to remote device."
+ file_exists = True
+
+ if not self.play_context.check_mode and not file_exists:
+ self.transfer_file_to_device(remote_file)
+ self.results[
+ "transfer_status"
+ ] = "Sent: File copied to remote device."
+
+ self.results["local_file"] = local_file
+ if remote_file is None:
+ remote_file = os.path.basename(local_file)
+ self.results["remote_file"] = remote_file
+
+ def copy_file_from_remote(self, local, local_file_directory, file_system):
+ self.results["failed"] = False
+ nxos_hostname = self.play_context.remote_addr
+ nxos_username = self.play_context.remote_user
+ nxos_password = self.play_context.password or ""
+ port = self.playvals["connect_ssh_port"]
+
+ # Build copy command components that will be used to initiate copy from the nxos device.
+ cmdroot = "copy " + self.playvals["file_pull_protocol"] + "://"
+ ruser = self.playvals["remote_scp_server_user"] + "@"
+ rserver = self.playvals["remote_scp_server"]
+ rfile = self.playvals["remote_file"] + " "
+ vrf = " vrf " + self.playvals["vrf"]
+ local_dir_root = "/"
+ if self.playvals["file_pull_compact"]:
+ compact = " compact "
+ else:
+ compact = ""
+ if self.playvals["file_pull_kstack"]:
+ kstack = " use-kstack "
+ else:
+ kstack = ""
+
+ def process_outcomes(session, timeout=None):
+ if timeout is None:
+ timeout = 10
+ outcome = {}
+ outcome["user_response_required"] = False
+ outcome["password_prompt_detected"] = False
+ outcome["existing_file_with_same_name"] = False
+ outcome["final_prompt_detected"] = False
+ outcome["copy_complete"] = False
+ outcome["expect_timeout"] = False
+ outcome["error"] = False
+ outcome["error_data"] = None
+
+ # Possible outcomes key:
+ # 0) - Are you sure you want to continue connecting (yes/no)
+ # 1) - Password: or @servers's password:
+ # 2) - Warning: There is already a file existing with this name. Do you want to overwrite (y/n)?[n]
+ # 3) - Timeout conditions
+ # 4) - No space on nxos device file_system
+ # 5) - Username/Password or file permission issues
+ # 6) - File does not exist on remote scp server
+ # 7) - invalid nxos command
+ # 8) - compact option not supported
+ # 9) - compaction attempt failed
+ # 10) - other failures like attempting to compact non image file
+ # 11) - failure to resolve hostname
+ # 12) - Too many authentication failures
+ # 13) - Copy to / from this server not permitted
+ # 14) - Copy completed without issues
+ # 15) - nxos_router_prompt#
+ # 16) - pexpect timeout
+ possible_outcomes = [
+ r"sure you want to continue connecting \(yes/no\)\? ",
+ "(?i)Password: ",
+ "file existing with this name",
+ "timed out",
+ "(?i)No space.*#",
+ "(?i)Permission denied.*#",
+ "(?i)No such file.*#",
+ ".*Invalid command.*#",
+ "Compaction is not supported on this platform.*#",
+ "Compact of.*failed.*#",
+ "(?i)Failed.*#",
+ "(?i)Could not resolve hostname",
+ "(?i)Too many authentication failures",
+ r"(?i)Copying to\/from this server name is not permitted",
+ "(?i)Copy complete",
+ r"#\s",
+ pexpect.TIMEOUT,
+ ]
+ index = session.expect(possible_outcomes, timeout=timeout)
+ # Each index maps to items in possible_outcomes
+ if index == 0:
+ outcome["user_response_required"] = True
+ return outcome
+ elif index == 1:
+ outcome["password_prompt_detected"] = True
+ return outcome
+ elif index == 2:
+ outcome["existing_file_with_same_name"] = True
+ return outcome
+ elif index in [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]:
+ decoded_before = session.before.decode("UTF-8")
+ decoded_after = session.after.decode("UTF-8")
+ before = decoded_before.strip().replace(" \x08", "")
+ after = decoded_after.strip().replace(" \x08", "")
+ outcome["error"] = True
+ outcome["error_data"] = "COMMAND {0} ERROR {1}".format(
+ before, after
+ )
+ return outcome
+ elif index == 14:
+ outcome["copy_complete"] = True
+ return outcome
+ elif index == 15:
+ outcome["final_prompt_detected"] = True
+ return outcome
+ elif index == 16:
+ # The before property will contain all text up to the expected string pattern.
+ # The after string will contain the text that was matched by the expected pattern.
+ outcome["expect_timeout"] = True
+ outcome[
+ "error_data"
+ ] = "Expect Timeout error occurred: BEFORE {0} AFTER {1}".format(
+ session.before, session.after
+ )
+ return outcome
+ else:
+ outcome["error"] = True
+ outcome[
+ "error_data"
+ ] = "Unrecognized error occurred: BEFORE {0} AFTER {1}".format(
+ session.before, session.after
+ )
+ return outcome
+
+ return outcome
+
+ # Spawn pexpect connection to NX-OS device.
+ nxos_session = pexpect.spawn(
+ "ssh " + nxos_username + "@" + nxos_hostname + " -p" + str(port)
+ )
+ # There might be multiple user_response_required prompts or intermittent timeouts
+ # spawning the expect session so loop up to 24 times during the spawn process.
+ max_attempts = 24
+ for connect_attempt in range(max_attempts):
+ outcome = process_outcomes(nxos_session)
+ if outcome["user_response_required"]:
+ nxos_session.sendline("yes")
+ continue
+ if outcome["password_prompt_detected"]:
+ time.sleep(3)
+ nxos_session.sendline(nxos_password)
+ continue
+ if outcome["final_prompt_detected"]:
+ break
+ if outcome["error"] or outcome["expect_timeout"]:
+ # Error encountered, try to spawn expect session n more times up to max_attempts - 1
+ if connect_attempt < max_attempts:
+ outcome["error"] = False
+ outcome["expect_timeout"] = False
+ nxos_session.close()
+ nxos_session = pexpect.spawn(
+ "ssh "
+ + nxos_username
+ + "@"
+ + nxos_hostname
+ + " -p"
+ + str(port)
+ )
+ continue
+ self.results["failed"] = True
+ outcome["error_data"] = re.sub(
+ nxos_password, "", outcome["error_data"]
+ )
+ self.results["error_data"] = (
+ "Failed to spawn expect session! " + outcome["error_data"]
+ )
+ nxos_session.close()
+ return
+ else:
+ # The before property will contain all text up to the expected string pattern.
+ # The after string will contain the text that was matched by the expected pattern.
+ msg = "After {0} attempts, failed to spawn pexpect session to {1}"
+ msg += "BEFORE: {2}, AFTER: {3}"
+ error_msg = msg.format(
+ connect_attempt,
+ nxos_hostname,
+ nxos_session.before,
+ nxos_session.after,
+ )
+ re.sub(nxos_password, "", error_msg)
+ nxos_session.close()
+ raise AnsibleError(error_msg)
+
+ # Create local file directory under NX-OS filesystem if
+ # local_file_directory playbook parameter is set.
+ if local_file_directory:
+ dir_array = local_file_directory.split("/")
+ for each in dir_array:
+ if each:
+ mkdir_cmd = "mkdir " + local_dir_root + each
+ nxos_session.sendline(mkdir_cmd)
+ outcome = process_outcomes(nxos_session)
+ if outcome["error"] or outcome["expect_timeout"]:
+ self.results["mkdir_cmd"] = mkdir_cmd
+ self.results["failed"] = True
+ outcome["error_data"] = re.sub(
+ nxos_password, "", outcome["error_data"]
+ )
+ self.results["error_data"] = outcome["error_data"]
+ return
+ local_dir_root += each + "/"
+
+ # Initiate file copy
+ copy_cmd = (
+ cmdroot
+ + ruser
+ + rserver
+ + rfile
+ + file_system
+ + local_dir_root
+ + local
+ + compact
+ + vrf
+ + kstack
+ )
+ self.results["copy_cmd"] = copy_cmd
+ nxos_session.sendline(copy_cmd)
+ for copy_attempt in range(6):
+ outcome = process_outcomes(
+ nxos_session, self.playvals["file_pull_timeout"]
+ )
+ if outcome["user_response_required"]:
+ nxos_session.sendline("yes")
+ continue
+ if outcome["password_prompt_detected"]:
+ if self.playvals.get("remote_scp_server_password"):
+ nxos_session.sendline(
+ self.playvals["remote_scp_server_password"]
+ )
+ else:
+ err_msg = "Remote scp server {0} requires a password.".format(
+ rserver
+ )
+ err_msg += " Set the <remote_scp_server_password> playbook parameter or configure nxos device for passwordless scp"
+ raise AnsibleError(err_msg)
+ continue
+ if outcome["existing_file_with_same_name"]:
+ nxos_session.sendline("y")
+ continue
+ if outcome["copy_complete"]:
+ self.results[
+ "transfer_status"
+ ] = "Received: File copied/pulled to nxos device from remote scp server."
+ break
+ if outcome["error"] or outcome["expect_timeout"]:
+ self.results["failed"] = True
+ outcome["error_data"] = re.sub(
+ nxos_password, "", outcome["error_data"]
+ )
+ if self.playvals.get("remote_scp_server_password"):
+ outcome["error_data"] = re.sub(
+ self.playvals["remote_scp_server_password"],
+ "",
+ outcome["error_data"],
+ )
+ self.results["error_data"] = outcome["error_data"]
+ nxos_session.close()
+ return
+ else:
+ # The before property will contain all text up to the expected string pattern.
+ # The after string will contain the text that was matched by the expected pattern.
+ msg = "After {0} attempts, failed to copy file to {1}"
+ msg += "BEFORE: {2}, AFTER: {3}, CMD: {4}"
+ error_msg = msg.format(
+ copy_attempt,
+ nxos_hostname,
+ nxos_session.before,
+ nxos_session.before,
+ copy_cmd,
+ )
+ re.sub(nxos_password, "", error_msg)
+ if self.playvals.get("remote_scp_server_password"):
+ re.sub(
+ self.playvals["remote_scp_server_password"], "", error_msg
+ )
+ nxos_session.close()
+ raise AnsibleError(error_msg)
+
+ nxos_session.close()
+
+ def file_pull(self):
+ local_file = self.playvals["local_file"]
+ remote_file = self.playvals["remote_file"]
+ file_system = self.playvals["file_system"]
+ # Note: This is the local file directory on the remote nxos device.
+ local_file_dir = self.playvals["local_file_directory"]
+
+ local_file = local_file or self.playvals["remote_file"].split("/")[-1]
+
+ if not self.play_context.check_mode:
+ self.copy_file_from_remote(local_file, local_file_dir, file_system)
+
+ if not self.results["failed"]:
+ self.results["changed"] = True
+ self.results["remote_file"] = remote_file
+ if local_file_dir:
+ dir = local_file_dir
+ else:
+ dir = ""
+ self.results["local_file"] = file_system + dir + "/" + local_file
+ self.results["remote_scp_server"] = self.playvals[
+ "remote_scp_server"
+ ]
+
+ # This is the main run method for the action plugin to copy files
+ def run(self, tmp=None, task_vars=None):
+ socket_path = None
+ self.play_context = copy.deepcopy(self._play_context)
+ self.results = super(ActionModule, self).run(task_vars=task_vars)
+
+ if self.play_context.connection.split(".")[-1] != "network_cli":
+ # Plugin is supported only with network_cli
+ self.results["failed"] = True
+ self.results["msg"] = (
+ "Connection type must be fully qualified name for network_cli connection type, got %s"
+ % self.play_context.connection
+ )
+ return self.results
+
+ # Get playbook values
+ self.playvals = self.process_playbook_values()
+
+ file_pull = self.playvals["file_pull"]
+ self.check_library_dependencies(file_pull)
+
+ if socket_path is None:
+ socket_path = self._connection.socket_path
+ self.conn = Connection(socket_path)
+
+ # Call get_capabilities() to start the connection to the device.
+ self.conn.get_capabilities()
+
+ self.socket_timeout = self.conn.get_option(
+ "persistent_command_timeout"
+ )
+
+ # This action plugin support two modes of operation.
+ # - file_pull is False - Push files from the ansible controller to nxos switch.
+ # - file_pull is True - Initiate copy from the device to pull files to the nxos switch.
+ self.results["transfer_status"] = "No Transfer"
+ self.results["file_system"] = self.playvals["file_system"]
+ if file_pull:
+ self.file_pull()
+ else:
+ self.file_push()
+
+ return self.results
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/cliconf/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/cliconf/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/cliconf/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/cliconf/nxos.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/cliconf/nxos.py
new file mode 100644
index 00000000..6b4fb6b4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/cliconf/nxos.py
@@ -0,0 +1,391 @@
+#
+# (c) 2017 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+author: Ansible Networking Team
+cliconf: nxos
+short_description: Use NX-OS cliconf to run commands on Cisco NX-OS platform
+description:
+- This nxos plugin provides low level abstraction apis for sending and receiving CLI
+ commands from Cisco NX-OS network devices.
+version_added: 1.0.0
+"""
+
+import json
+import re
+
+from ansible.errors import AnsibleConnectionFailure
+from ansible.module_utils._text import to_bytes, to_text
+from ansible.module_utils.common._collections_compat import Mapping
+from ansible.module_utils.connection import ConnectionError
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+ dumps,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible.plugins.cliconf import CliconfBase, enable_mode
+
+
+class Cliconf(CliconfBase):
+ def __init__(self, *args, **kwargs):
+ self._module_context = {}
+ self._device_info = {}
+ super(Cliconf, self).__init__(*args, **kwargs)
+
+ def read_module_context(self, module_key):
+ if self._module_context.get(module_key):
+ return self._module_context[module_key]
+
+ return None
+
+ def save_module_context(self, module_key, module_context):
+ self._module_context[module_key] = module_context
+
+ return None
+
+ def get_device_info(self):
+ if not self._device_info:
+ device_info = {}
+
+ device_info["network_os"] = "nxos"
+ reply = self.get("show version")
+ platform_reply = self.get("show inventory")
+
+ match_sys_ver = re.search(
+ r"\s+system:\s+version\s*(\S+)", reply, re.M
+ )
+ if match_sys_ver:
+ device_info["network_os_version"] = match_sys_ver.group(1)
+ else:
+ match_kick_ver = re.search(
+ r"\s+kickstart:\s+version\s*(\S+)", reply, re.M
+ )
+ if match_kick_ver:
+ device_info["network_os_version"] = match_kick_ver.group(1)
+
+ if "network_os_version" not in device_info:
+ match_sys_ver = re.search(
+ r"\s+NXOS:\s+version\s*(\S+)", reply, re.M
+ )
+ if match_sys_ver:
+ device_info["network_os_version"] = match_sys_ver.group(1)
+
+ match_chassis_id = re.search(
+ r"Hardware\n\s+cisco(.+)$", reply, re.M
+ )
+ if match_chassis_id:
+ device_info["network_os_model"] = match_chassis_id.group(
+ 1
+ ).strip()
+
+ match_host_name = re.search(
+ r"\s+Device name:\s*(\S+)", reply, re.M
+ )
+ if match_host_name:
+ device_info["network_os_hostname"] = match_host_name.group(1)
+
+ match_isan_file_name = re.search(
+ r"\s+system image file is:\s*(\S+)", reply, re.M
+ )
+ if match_isan_file_name:
+ device_info["network_os_image"] = match_isan_file_name.group(1)
+ else:
+ match_kick_file_name = re.search(
+ r"\s+kickstart image file is:\s*(\S+)", reply, re.M
+ )
+ if match_kick_file_name:
+ device_info[
+ "network_os_image"
+ ] = match_kick_file_name.group(1)
+
+ if "network_os_image" not in device_info:
+ match_isan_file_name = re.search(
+ r"\s+NXOS image file is:\s*(\S+)", reply, re.M
+ )
+ if match_isan_file_name:
+ device_info[
+ "network_os_image"
+ ] = match_isan_file_name.group(1)
+
+ match_os_platform = re.search(
+ r'NAME: "Chassis",\s*DESCR:.*\n' r"PID:\s*(\S+)",
+ platform_reply,
+ re.M,
+ )
+ if match_os_platform:
+ device_info["network_os_platform"] = match_os_platform.group(1)
+
+ self._device_info = device_info
+
+ return self._device_info
+
+ def get_diff(
+ self,
+ candidate=None,
+ running=None,
+ diff_match="line",
+ diff_ignore_lines=None,
+ path=None,
+ diff_replace="line",
+ ):
+ diff = {}
+ device_operations = self.get_device_operations()
+ option_values = self.get_option_values()
+
+ if candidate is None and device_operations["supports_generate_diff"]:
+ raise ValueError(
+ "candidate configuration is required to generate diff"
+ )
+
+ if diff_match not in option_values["diff_match"]:
+ raise ValueError(
+ "'match' value %s in invalid, valid values are %s"
+ % (diff_match, ", ".join(option_values["diff_match"]))
+ )
+
+ if diff_replace not in option_values["diff_replace"]:
+ raise ValueError(
+ "'replace' value %s in invalid, valid values are %s"
+ % (diff_replace, ", ".join(option_values["diff_replace"]))
+ )
+
+ # prepare candidate configuration
+ candidate_obj = NetworkConfig(indent=2)
+ candidate_obj.load(candidate)
+
+ if running and diff_match != "none" and diff_replace != "config":
+ # running configuration
+ running_obj = NetworkConfig(
+ indent=2, contents=running, ignore_lines=diff_ignore_lines
+ )
+ configdiffobjs = candidate_obj.difference(
+ running_obj, path=path, match=diff_match, replace=diff_replace
+ )
+
+ else:
+ configdiffobjs = candidate_obj.items
+
+ diff["config_diff"] = (
+ dumps(configdiffobjs, "commands") if configdiffobjs else ""
+ )
+ return diff
+
+ def get_config(self, source="running", format="text", flags=None):
+ options_values = self.get_option_values()
+ if format not in options_values["format"]:
+ raise ValueError(
+ "'format' value %s is invalid. Valid values are %s"
+ % (format, ",".join(options_values["format"]))
+ )
+
+ lookup = {"running": "running-config", "startup": "startup-config"}
+ if source not in lookup:
+ raise ValueError(
+ "fetching configuration from %s is not supported" % source
+ )
+
+ cmd = "show {0} ".format(lookup[source])
+ if format and format != "text":
+ cmd += "| %s " % format
+
+ if flags:
+ cmd += " ".join(to_list(flags))
+ cmd = cmd.strip()
+
+ return self.send_command(cmd)
+
+ def edit_config(
+ self, candidate=None, commit=True, replace=None, comment=None
+ ):
+ resp = {}
+ operations = self.get_device_operations()
+ self.check_edit_config_capability(
+ operations, candidate, commit, replace, comment
+ )
+ results = []
+ requests = []
+
+ if replace:
+ device_info = self.get_device_info()
+ # not all NX-OS versions support `config replace`
+ # we let the device throw the invalid command error
+ candidate = "config replace {0}".format(replace)
+
+ if commit:
+ self.send_command("configure terminal")
+
+ for line in to_list(candidate):
+ if not isinstance(line, Mapping):
+ line = {"command": line}
+
+ cmd = line["command"]
+ if cmd != "end":
+ results.append(self.send_command(**line))
+ requests.append(cmd)
+
+ self.send_command("end")
+ else:
+ raise ValueError("check mode is not supported")
+
+ resp["request"] = requests
+ resp["response"] = results
+ return resp
+
+ def get(
+ self,
+ command,
+ prompt=None,
+ answer=None,
+ sendonly=False,
+ output=None,
+ newline=True,
+ check_all=False,
+ ):
+ if output:
+ command = self._get_command_with_output(command, output)
+ return self.send_command(
+ command=command,
+ prompt=prompt,
+ answer=answer,
+ sendonly=sendonly,
+ newline=newline,
+ check_all=check_all,
+ )
+
+ def run_commands(self, commands=None, check_rc=True):
+ if commands is None:
+ raise ValueError("'commands' value is required")
+
+ responses = list()
+ for cmd in to_list(commands):
+ if not isinstance(cmd, Mapping):
+ cmd = {"command": cmd}
+
+ output = cmd.pop("output", None)
+ if output:
+ cmd["command"] = self._get_command_with_output(
+ cmd["command"], output
+ )
+
+ try:
+ out = self.send_command(**cmd)
+ except AnsibleConnectionFailure as e:
+ if check_rc is True:
+ raise
+ out = getattr(e, "err", e)
+
+ if out is not None:
+ try:
+ out = to_text(out, errors="surrogate_or_strict").strip()
+ except UnicodeError:
+ raise ConnectionError(
+ message=u"Failed to decode output from %s: %s"
+ % (cmd, to_text(out))
+ )
+
+ try:
+ out = json.loads(out)
+ except ValueError:
+ pass
+
+ responses.append(out)
+ return responses
+
+ def get_device_operations(self):
+ return {
+ "supports_diff_replace": True,
+ "supports_commit": False,
+ "supports_rollback": False,
+ "supports_defaults": True,
+ "supports_onbox_diff": False,
+ "supports_commit_comment": False,
+ "supports_multiline_delimiter": False,
+ "supports_diff_match": True,
+ "supports_diff_ignore_lines": True,
+ "supports_generate_diff": True,
+ "supports_replace": True,
+ }
+
+ def get_option_values(self):
+ return {
+ "format": ["text", "json"],
+ "diff_match": ["line", "strict", "exact", "none"],
+ "diff_replace": ["line", "block", "config"],
+ "output": ["text", "json"],
+ }
+
+ def get_capabilities(self):
+ result = super(Cliconf, self).get_capabilities()
+ result["rpc"] += ["get_diff", "run_commands"]
+ result["device_operations"] = self.get_device_operations()
+ result.update(self.get_option_values())
+
+ return json.dumps(result)
+
+ def set_cli_prompt_context(self):
+ """
+ Make sure we are in the operational cli context
+ :return: None
+ """
+ if self._connection.connected:
+ out = self._connection.get_prompt()
+ if out is None:
+ raise AnsibleConnectionFailure(
+ message=u"cli prompt is not identified from the last received"
+ u" response window: %s"
+ % self._connection._last_recv_window
+ )
+ # Match prompts ending in )# except those with (maint-mode)#
+ config_prompt = re.compile(r"^.*\((?!maint-mode).*\)#$")
+
+ while config_prompt.match(
+ to_text(out, errors="surrogate_then_replace").strip()
+ ):
+ self._connection.queue_message(
+ "vvvv", "wrong context, sending exit to device"
+ )
+ self._connection.send_command("exit")
+ out = self._connection.get_prompt()
+
+ def _get_command_with_output(self, command, output):
+ options_values = self.get_option_values()
+ if output not in options_values["output"]:
+ raise ValueError(
+ "'output' value %s is invalid. Valid values are %s"
+ % (output, ",".join(options_values["output"]))
+ )
+
+ if output == "json" and not command.endswith("| json"):
+ device_info = self.get_device_info()
+ model = device_info.get("network_os_model", "")
+ platform = device_info.get("network_os_platform", "")
+ if platform.startswith("DS-") and "MDS" in model:
+ cmd = "%s | json native" % command
+ else:
+ cmd = "%s | json" % command
+ elif output == "text" and command.endswith("| json"):
+ cmd = command.rsplit("|", 1)[0]
+ else:
+ cmd = command
+ return cmd
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/doc_fragments/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/doc_fragments/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/doc_fragments/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/doc_fragments/nxos.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/doc_fragments/nxos.py
new file mode 100644
index 00000000..e76dd7ba
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/doc_fragments/nxos.py
@@ -0,0 +1,119 @@
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+class ModuleDocFragment(object):
+
+ # Standard files documentation fragment
+ DOCUMENTATION = r"""options:
+ provider:
+ description:
+ - B(Deprecated)
+ - 'Starting with Ansible 2.5 we recommend using C(connection: network_cli).'
+ - 'Starting with Ansible 2.6 we recommend using C(connection: httpapi) for NX-API.'
+ - This option will be removed in a release after 2022-06-01.
+ - For more information please see the L(NXOS Platform Options guide, ../network/user_guide/platform_nxos.html).
+ - HORIZONTALLINE
+ - A dict object containing connection details.
+ type: dict
+ suboptions:
+ host:
+ description:
+ - Specifies the DNS host name or address for connecting to the remote device
+ over the specified transport. The value of host is used as the destination
+ address for the transport.
+ type: str
+ port:
+ description:
+ - Specifies the port to use when building the connection to the remote device. This
+ value applies to either I(cli) or I(nxapi). The port value will default
+ to the appropriate transport common port if none is provided in the task. (cli=22,
+ http=80, https=443).
+ type: int
+ username:
+ description:
+ - Configures the username to use to authenticate the connection to the remote
+ device. This value is used to authenticate either the CLI login or the
+ nxapi authentication depending on which transport is used. If the value
+ is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME)
+ will be used instead.
+ type: str
+ password:
+ description:
+ - Specifies the password to use to authenticate the connection to the remote
+ device. This is a common argument used for either I(cli) or I(nxapi) transports.
+ If the value is not specified in the task, the value of environment variable
+ C(ANSIBLE_NET_PASSWORD) will be used instead.
+ type: str
+ authorize:
+ description:
+ - Instructs the module to enter privileged mode on the remote device before
+ sending any commands. If not specified, the device will attempt to execute
+ all commands in non-privileged mode. If the value is not specified in the
+ task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be
+ used instead.
+ type: bool
+ default: false
+ auth_pass:
+ description:
+ - Specifies the password to use if required to enter privileged mode on the
+ remote device. If I(authorize) is false, then this argument does nothing.
+ If the value is not specified in the task, the value of environment variable
+ C(ANSIBLE_NET_AUTH_PASS) will be used instead.
+ type: str
+ timeout:
+ description:
+ - Specifies the timeout in seconds for communicating with the network device
+ for either connecting or sending commands. If the timeout is exceeded before
+ the operation is completed, the module will error. NX-API can be slow to
+ return on long-running commands (sh mac, sh bgp, etc).
+ type: int
+ ssh_keyfile:
+ description:
+ - Specifies the SSH key to use to authenticate the connection to the remote
+ device. This argument is only used for the I(cli) transport. If the value
+ is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE)
+ will be used instead.
+ type: str
+ transport:
+ description:
+ - Configures the transport connection to use when connecting to the remote
+ device. The transport argument supports connectivity to the device over
+ cli (ssh) or nxapi.
+ type: str
+ choices:
+ - cli
+ - nxapi
+ default: cli
+ use_ssl:
+ description:
+ - Configures the I(transport) to use SSL if set to C(yes) only when the C(transport=nxapi),
+ otherwise this value is ignored.
+ type: bool
+ default: false
+ validate_certs:
+ description:
+ - If C(no), SSL certificates will not be validated. This should only be used
+ on personally controlled sites using self-signed certificates. If the transport
+ argument is not nxapi, this value is ignored.
+ type: bool
+ default: False
+ use_proxy:
+ description:
+ - If C(no), the environment variables C(http_proxy) and C(https_proxy) will
+ be ignored.
+ type: bool
+ default: true
+notes:
+- For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide
+ <nxos_platform_options>`
+- For more information on using Ansible to manage network devices see the :ref:`Ansible
+ Network Guide <network_guide>`
+- For more information on using Ansible to manage Cisco devices see the `Cisco integration
+ page <https://www.ansible.com/integrations/networks/cisco>`_.
+"""
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/filter/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/filter/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/filter/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/httpapi/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/httpapi/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/httpapi/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/httpapi/nxos.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/httpapi/nxos.py
new file mode 100644
index 00000000..d6d911ba
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/httpapi/nxos.py
@@ -0,0 +1,271 @@
+# (c) 2018 Red Hat Inc.
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+author: Ansible Networking Team
+httpapi: nxos
+short_description: Use NX-API to run commands on Cisco NX-OS platform
+description:
+- This plugin provides low level abstraction APIs for sending and receiving
+ commands using NX-API with devices running Cisco NX-OS.
+version_added: 1.0.0
+"""
+
+import json
+import re
+import collections
+
+from ansible.module_utils._text import to_text
+from ansible.module_utils.connection import ConnectionError
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible.plugins.httpapi import HttpApiBase
+
+
+OPTIONS = {
+ "format": ["text", "json"],
+ "diff_match": ["line", "strict", "exact", "none"],
+ "diff_replace": ["line", "block", "config"],
+ "output": ["text", "json"],
+}
+
+
+class HttpApi(HttpApiBase):
+ def __init__(self, *args, **kwargs):
+ super(HttpApi, self).__init__(*args, **kwargs)
+ self._device_info = None
+ self._module_context = {}
+
+ def read_module_context(self, module_key):
+ if self._module_context.get(module_key):
+ return self._module_context[module_key]
+
+ return None
+
+ def save_module_context(self, module_key, module_context):
+ self._module_context[module_key] = module_context
+
+ return None
+
+ def send_request(self, data, **message_kwargs):
+ output = None
+ queue = list()
+ responses = list()
+
+ for item in to_list(data):
+ cmd_output = message_kwargs.get("output") or "text"
+ if isinstance(item, dict):
+ command = item["command"]
+ if "output" in item:
+ cmd_output = item["output"]
+ else:
+ command = item
+
+ # Emulate '| json' from CLI
+ if command.endswith("| json"):
+ command = command.rsplit("|", 1)[0]
+ cmd_output = "json"
+
+ if output and output != cmd_output:
+ responses.extend(self._run_queue(queue, output))
+ queue = list()
+
+ output = cmd_output
+ queue.append(command)
+
+ if queue:
+ responses.extend(self._run_queue(queue, output))
+
+ if len(responses) == 1:
+ return responses[0]
+ return responses
+
+ def _run_queue(self, queue, output):
+ if self._become:
+ self.connection.queue_message(
+ "warning",
+ "become has no effect over httpapi. Use network_cli if privilege escalation is required",
+ )
+
+ request = request_builder(queue, output)
+ headers = {"Content-Type": "application/json"}
+
+ response, response_data = self.connection.send(
+ "/ins", request, headers=headers, method="POST"
+ )
+
+ try:
+ response_data = json.loads(to_text(response_data.getvalue()))
+ except ValueError:
+ raise ConnectionError(
+ "Response was not valid JSON, got {0}".format(
+ to_text(response_data.getvalue())
+ )
+ )
+
+ results = handle_response(response_data)
+ return results
+
+ def get_device_info(self):
+ if self._device_info:
+ return self._device_info
+
+ device_info = {}
+
+ device_info["network_os"] = "nxos"
+ reply, platform_reply = self.send_request(
+ ["show version", "show inventory"]
+ )
+
+ find_os_version = [
+ r"\s+system:\s+version\s*(\S+)",
+ r"\s+kickstart:\s+version\s*(\S+)",
+ r"\s+NXOS:\s+version\s*(\S+)",
+ ]
+ for regex in find_os_version:
+ match_ver = re.search(regex, reply, re.M)
+ if match_ver:
+ device_info["network_os_version"] = match_ver.group(1)
+ break
+
+ match_chassis_id = re.search(
+ r"Hardware\n\s+cisco\s*(\S+\s+\S+)", reply, re.M
+ )
+ if match_chassis_id:
+ device_info["network_os_model"] = match_chassis_id.group(1)
+
+ match_host_name = re.search(r"\s+Device name:\s*(\S+)", reply, re.M)
+ if match_host_name:
+ device_info["network_os_hostname"] = match_host_name.group(1)
+
+ find_os_image = [
+ r"\s+system image file is:\s*(\S+)",
+ r"\s+kickstart image file is:\s*(\S+)",
+ r"\s+NXOS image file is:\s*(\S+)",
+ ]
+ for regex in find_os_image:
+ match_file_name = re.search(regex, reply, re.M)
+ if match_file_name:
+ device_info["network_os_image"] = match_file_name.group(1)
+ break
+
+ match_os_platform = re.search(
+ r'NAME: (?:"Chassis"| Chassis ),\s*DESCR:.*\nPID:\s*(\S+)',
+ platform_reply,
+ re.M,
+ )
+ if match_os_platform:
+ device_info["network_os_platform"] = match_os_platform.group(1)
+
+ self._device_info = device_info
+ return self._device_info
+
+ def get_device_operations(self):
+ platform = self.get_device_info().get("network_os_platform", "")
+ return {
+ "supports_diff_replace": True,
+ "supports_commit": False,
+ "supports_rollback": False,
+ "supports_defaults": True,
+ "supports_onbox_diff": False,
+ "supports_commit_comment": False,
+ "supports_multiline_delimiter": False,
+ "supports_diff_match": True,
+ "supports_diff_ignore_lines": True,
+ "supports_generate_diff": True,
+ "supports_replace": True if "9K" in platform else False,
+ }
+
+ def get_capabilities(self):
+ result = {}
+ result["rpc"] = []
+ result["device_info"] = self.get_device_info()
+ result["device_operations"] = self.get_device_operations()
+ result.update(OPTIONS)
+ result["network_api"] = "nxapi"
+
+ return json.dumps(result)
+
+ # Shims for resource module support
+ def get(self, command, output=None):
+ # This method is ONLY here to support resource modules. Therefore most
+ # arguments are unsupported and not present.
+
+ return self.send_request(data=command, output=output)
+
+ def edit_config(self, candidate):
+ # This method is ONLY here to support resource modules. Therefore most
+ # arguments are unsupported and not present.
+
+ responses = self.send_request(candidate, output="config")
+ return [resp for resp in to_list(responses) if resp != "{}"]
+
+
+def handle_response(response):
+ results = []
+
+ if response["ins_api"].get("outputs"):
+ for output in to_list(response["ins_api"]["outputs"]["output"]):
+ if output["code"] != "200":
+ # Best effort messages: some API output keys may not exist on some platforms
+ input_data = output.get("input", "")
+ msg = output.get("msg", "")
+ clierror = output.get("clierror", "")
+ raise ConnectionError(
+ "%s: %s: %s" % (input_data, msg, clierror),
+ code=output["code"],
+ )
+ elif "body" in output:
+ result = output["body"]
+ if isinstance(result, dict):
+ result = json.dumps(result)
+
+ results.append(result.strip())
+
+ return results
+
+
+def request_builder(commands, output, version="1.0", chunk="0", sid=None):
+ """Encodes a NXAPI JSON request message
+ """
+ output_to_command_type = {
+ "text": "cli_show_ascii",
+ "json": "cli_show",
+ "bash": "bash",
+ "config": "cli_conf",
+ }
+
+ maybe_output = commands[0].split("|")[-1].strip()
+ if maybe_output in output_to_command_type:
+ command_type = output_to_command_type[maybe_output]
+ commands = [command.split("|")[0].strip() for command in commands]
+ else:
+ try:
+ command_type = output_to_command_type[output]
+ except KeyError:
+ msg = "invalid format, received %s, expected one of %s" % (
+ output,
+ ",".join(output_to_command_type.keys()),
+ )
+ raise ConnectionError(msg)
+
+ if isinstance(commands, (list, set, tuple)):
+ commands = " ;".join(commands)
+
+ # Order should not matter but some versions of NX-OS software fail
+ # to process the payload properly if 'input' gets serialized before
+ # 'type' and the payload of 'input' contains the word 'type'.
+ msg = collections.OrderedDict()
+ msg["version"] = version
+ msg["type"] = command_type
+ msg["chunk"] = chunk
+ msg["sid"] = sid
+ msg["input"] = commands
+ msg["output_format"] = "json"
+
+ return json.dumps(dict(ins_api=msg))
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/inventory/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/inventory/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/inventory/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acl_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acl_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acl_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acl_interfaces/acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acl_interfaces/acl_interfaces.py
new file mode 100644
index 00000000..1d384043
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acl_interfaces/acl_interfaces.py
@@ -0,0 +1,85 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the nxos_acl_interfaces module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Acl_interfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_acl_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "access_groups": {
+ "elements": "dict",
+ "options": {
+ "acls": {
+ "elements": "dict",
+ "options": {
+ "direction": {
+ "choices": ["in", "out"],
+ "required": True,
+ "type": "str",
+ },
+ "name": {"required": True, "type": "str"},
+ "port": {"type": "bool"},
+ },
+ "type": "list",
+ },
+ "afi": {
+ "choices": ["ipv4", "ipv6"],
+ "required": True,
+ "type": "str",
+ },
+ },
+ "type": "list",
+ },
+ "name": {"required": True, "type": "str"},
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "deleted",
+ "gathered",
+ "merged",
+ "overridden",
+ "rendered",
+ "replaced",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acls/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acls/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acls/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acls/acls.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acls/acls.py
new file mode 100644
index 00000000..78afdf0e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/acls/acls.py
@@ -0,0 +1,361 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the nxos_acls module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class AclsArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_acls module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "acls": {
+ "elements": "dict",
+ "options": {
+ "aces": {
+ "elements": "dict",
+ "mutually_exclusive": [["grant", "remark"]],
+ "options": {
+ "destination": {
+ "mutually_exclusive": [
+ ["address", "any", "host", "prefix"],
+ [
+ "wildcard_bits",
+ "any",
+ "host",
+ "prefix",
+ ],
+ ],
+ "options": {
+ "address": {"type": "str"},
+ "any": {"type": "bool"},
+ "host": {"type": "str"},
+ "port_protocol": {
+ "mutually_exclusive": [
+ [
+ "eq",
+ "lt",
+ "neq",
+ "gt",
+ "range",
+ ]
+ ],
+ "options": {
+ "eq": {"type": "str"},
+ "gt": {"type": "str"},
+ "lt": {"type": "str"},
+ "neq": {"type": "str"},
+ "range": {
+ "options": {
+ "end": {"type": "str"},
+ "start": {
+ "type": "str"
+ },
+ },
+ "required_together": [
+ ["start", "end"]
+ ],
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "prefix": {"type": "str"},
+ "wildcard_bits": {"type": "str"},
+ },
+ "required_together": [
+ ["address", "wildcard_bits"]
+ ],
+ "type": "dict",
+ },
+ "dscp": {"type": "str"},
+ "fragments": {"type": "bool"},
+ "grant": {
+ "choices": ["permit", "deny"],
+ "type": "str",
+ },
+ "log": {"type": "bool"},
+ "precedence": {"type": "str"},
+ "protocol": {"type": "str"},
+ "protocol_options": {
+ "mutually_exclusive": [
+ ["icmp", "igmp", "tcp"]
+ ],
+ "options": {
+ "icmp": {
+ "options": {
+ "administratively_prohibited": {
+ "type": "bool"
+ },
+ "alternate_address": {
+ "type": "bool"
+ },
+ "conversion_error": {
+ "type": "bool"
+ },
+ "dod_host_prohibited": {
+ "type": "bool"
+ },
+ "dod_net_prohibited": {
+ "type": "bool"
+ },
+ "echo": {"type": "bool"},
+ "echo_reply": {"type": "bool"},
+ "echo_request": {
+ "type": "bool"
+ },
+ "general_parameter_problem": {
+ "type": "bool"
+ },
+ "host_isolated": {
+ "type": "bool"
+ },
+ "host_precedence_unreachable": {
+ "type": "bool"
+ },
+ "host_redirect": {
+ "type": "bool"
+ },
+ "host_tos_redirect": {
+ "type": "bool"
+ },
+ "host_tos_unreachable": {
+ "type": "bool"
+ },
+ "host_unknown": {
+ "type": "bool"
+ },
+ "host_unreachable": {
+ "type": "bool"
+ },
+ "information_reply": {
+ "type": "bool"
+ },
+ "information_request": {
+ "type": "bool"
+ },
+ "mask_reply": {"type": "bool"},
+ "mask_request": {
+ "type": "bool"
+ },
+ "message_code": {
+ "type": "int"
+ },
+ "message_type": {
+ "type": "int"
+ },
+ "mobile_redirect": {
+ "type": "bool"
+ },
+ "net_redirect": {
+ "type": "bool"
+ },
+ "net_tos_redirect": {
+ "type": "bool"
+ },
+ "net_tos_unreachable": {
+ "type": "bool"
+ },
+ "net_unreachable": {
+ "type": "bool"
+ },
+ "network_unknown": {
+ "type": "bool"
+ },
+ "no_room_for_option": {
+ "type": "bool"
+ },
+ "option_missing": {
+ "type": "bool"
+ },
+ "packet_too_big": {
+ "type": "bool"
+ },
+ "parameter_problem": {
+ "type": "bool"
+ },
+ "port_unreachable": {
+ "type": "bool"
+ },
+ "precedence_unreachable": {
+ "type": "bool"
+ },
+ "protocol_unreachable": {
+ "type": "bool"
+ },
+ "reassembly_timeout": {
+ "type": "bool"
+ },
+ "redirect": {"type": "bool"},
+ "router_advertisement": {
+ "type": "bool"
+ },
+ "router_solicitation": {
+ "type": "bool"
+ },
+ "source_quench": {
+ "type": "bool"
+ },
+ "source_route_failed": {
+ "type": "bool"
+ },
+ "time_exceeded": {
+ "type": "bool"
+ },
+ "timestamp_reply": {
+ "type": "bool"
+ },
+ "timestamp_request": {
+ "type": "bool"
+ },
+ "traceroute": {"type": "bool"},
+ "ttl_exceeded": {
+ "type": "bool"
+ },
+ "unreachable": {
+ "type": "bool"
+ },
+ },
+ "type": "dict",
+ },
+ "igmp": {
+ "mutually_exclusive": [
+ [
+ "dvmrp",
+ "host_query",
+ "host_report",
+ ]
+ ],
+ "options": {
+ "dvmrp": {"type": "bool"},
+ "host_query": {"type": "bool"},
+ "host_report": {
+ "type": "bool"
+ },
+ },
+ "type": "dict",
+ },
+ "tcp": {
+ "options": {
+ "ack": {"type": "bool"},
+ "established": {
+ "type": "bool"
+ },
+ "fin": {"type": "bool"},
+ "psh": {"type": "bool"},
+ "rst": {"type": "bool"},
+ "syn": {"type": "bool"},
+ "urg": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "remark": {"type": "str"},
+ "sequence": {"type": "int"},
+ "source": {
+ "mutually_exclusive": [
+ ["address", "any", "host", "prefix"],
+ [
+ "wildcard_bits",
+ "host",
+ "any",
+ "prefix",
+ ],
+ ],
+ "options": {
+ "address": {"type": "str"},
+ "any": {"type": "bool"},
+ "host": {"type": "str"},
+ "port_protocol": {
+ "mutually_exclusive": [
+ ["eq", "lt", "neq", "range"],
+ ["eq", "gt", "neq", "range"],
+ ],
+ "options": {
+ "eq": {"type": "str"},
+ "gt": {"type": "str"},
+ "lt": {"type": "str"},
+ "neq": {"type": "str"},
+ "range": {
+ "options": {
+ "end": {"type": "str"},
+ "start": {
+ "type": "str"
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "prefix": {"type": "str"},
+ "wildcard_bits": {"type": "str"},
+ },
+ "required_together": [
+ ["address", "wildcard_bits"]
+ ],
+ "type": "dict",
+ },
+ },
+ "type": "list",
+ },
+ "name": {"required": True, "type": "str"},
+ },
+ "type": "list",
+ },
+ "afi": {
+ "choices": ["ipv4", "ipv6"],
+ "required": True,
+ "type": "str",
+ },
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "deleted",
+ "gathered",
+ "merged",
+ "overridden",
+ "rendered",
+ "replaced",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bfd_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bfd_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bfd_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bfd_interfaces/bfd_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bfd_interfaces/bfd_interfaces.py
new file mode 100644
index 00000000..8319b8b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bfd_interfaces/bfd_interfaces.py
@@ -0,0 +1,64 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The arg spec for the nxos_bfd_interfaces module
+"""
+
+
+class Bfd_interfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_bfd_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "bfd": {"choices": ["enable", "disable"], "type": "str"},
+ "echo": {"choices": ["enable", "disable"], "type": "str"},
+ },
+ "type": "list",
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bgp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bgp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bgp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bgp_global/bgp_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bgp_global/bgp_global.py
new file mode 100644
index 00000000..2142aa26
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/bgp_global/bgp_global.py
@@ -0,0 +1,516 @@
+# -*- coding: utf-8 -*-
+# Copyright 2021 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the
+# cli_rm_builder.
+#
+# Manually editing this file is not advised.
+#
+# To update the argspec make the desired changes
+# in the module docstring and re-run
+# cli_rm_builder.
+#
+#############################################
+
+"""
+The arg spec for the nxos_bgp_global module
+"""
+
+
+class Bgp_globalArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_bgp_global module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "type": "dict",
+ "options": {
+ "as_number": {"type": "str"},
+ "affinity_group": {
+ "type": "dict",
+ "options": {"group_id": {"type": "int"}},
+ },
+ "bestpath": {
+ "type": "dict",
+ "options": {
+ "always_compare_med": {"type": "bool"},
+ "as_path": {
+ "type": "dict",
+ "options": {
+ "ignore": {"type": "bool"},
+ "multipath_relax": {"type": "bool"},
+ },
+ },
+ "compare_neighborid": {"type": "bool"},
+ "compare_routerid": {"type": "bool"},
+ "cost_community_ignore": {"type": "bool"},
+ "igp_metric_ignore": {"type": "bool"},
+ "med": {
+ "type": "dict",
+ "options": {
+ "confed": {"type": "bool"},
+ "missing_as_worst": {"type": "bool"},
+ "non_deterministic": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "cluster_id": {"type": "str"},
+ "confederation": {
+ "type": "dict",
+ "options": {
+ "identifier": {"type": "str"},
+ "peers": {"type": "list", "elements": "str"},
+ },
+ },
+ "disable_policy_batching": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "ipv4": {
+ "type": "dict",
+ "options": {"prefix_list": {"type": "str"}},
+ },
+ "ipv6": {
+ "type": "dict",
+ "options": {"prefix_list": {"type": "str"}},
+ },
+ "nexthop": {"type": "bool"},
+ },
+ },
+ "dynamic_med_interval": {"type": "int"},
+ "enforce_first_as": {"type": "bool"},
+ "enhanced_error": {"type": "bool"},
+ "fabric_soo": {"type": "str"},
+ "fast_external_fallover": {"type": "bool"},
+ "flush_routes": {"type": "bool"},
+ "graceful_restart": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "restart_time": {"type": "int"},
+ "stalepath_time": {"type": "int"},
+ "helper": {"type": "bool"},
+ },
+ },
+ "graceful_shutdown": {
+ "type": "dict",
+ "options": {
+ "activate": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "aware": {"type": "bool"},
+ },
+ },
+ "isolate": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "include_local": {"type": "bool"},
+ },
+ },
+ "log_neighbor_changes": {"type": "bool"},
+ "maxas_limit": {"type": "int"},
+ "neighbors": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "neighbor_address": {"type": "str", "required": True},
+ "neighbor_affinity_group": {
+ "type": "dict",
+ "options": {"group_id": {"type": "int"}},
+ },
+ "bmp_activate_server": {"type": "int"},
+ "capability": {
+ "type": "dict",
+ "options": {
+ "suppress_4_byte_as": {"type": "bool"}
+ },
+ },
+ "description": {"type": "str"},
+ "disable_connected_check": {"type": "bool"},
+ "dont_capability_negotiate": {"type": "bool"},
+ "dscp": {"type": "str"},
+ "dynamic_capability": {"type": "bool"},
+ "ebgp_multihop": {"type": "int"},
+ "graceful_shutdown": {
+ "type": "dict",
+ "options": {
+ "activate": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "route_map": {"type": "str"},
+ },
+ }
+ },
+ },
+ "inherit": {
+ "type": "dict",
+ "options": {
+ "peer": {"type": "str"},
+ "peer_session": {"type": "str"},
+ },
+ },
+ "local_as": {"type": "str"},
+ "log_neighbor_changes": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "disable": {"type": "bool"},
+ },
+ },
+ "low_memory": {
+ "type": "dict",
+ "options": {"exempt": {"type": "bool"}},
+ },
+ "password": {
+ "type": "dict",
+ "options": {
+ "encryption": {"type": "int"},
+ "key": {"type": "str"},
+ },
+ },
+ "path_attribute": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "action": {
+ "type": "str",
+ "choices": [
+ "discard",
+ "treat-as-withdraw",
+ ],
+ },
+ "type": {"type": "int"},
+ "range": {
+ "type": "dict",
+ "options": {
+ "start": {"type": "int"},
+ "end": {"type": "int"},
+ },
+ },
+ },
+ },
+ "peer_type": {
+ "type": "str",
+ "choices": [
+ "fabric-border-leaf",
+ "fabric-external",
+ ],
+ },
+ "remote_as": {"type": "str"},
+ "remove_private_as": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "replace_as": {"type": "bool"},
+ "all": {"type": "bool"},
+ },
+ },
+ "shutdown": {"type": "bool"},
+ "timers": {
+ "type": "dict",
+ "options": {
+ "keepalive": {"type": "int"},
+ "holdtime": {"type": "int"},
+ },
+ },
+ "transport": {
+ "type": "dict",
+ "options": {
+ "connection_mode": {
+ "type": "dict",
+ "options": {"passive": {"type": "bool"}},
+ }
+ },
+ },
+ "ttl_security": {
+ "type": "dict",
+ "options": {"hops": {"type": "int"}},
+ },
+ "update_source": {"type": "str"},
+ },
+ },
+ "neighbor_down": {
+ "type": "dict",
+ "options": {"fib_accelerate": {"type": "bool"}},
+ },
+ "nexthop": {
+ "type": "dict",
+ "options": {
+ "suppress_default_resolution": {"type": "bool"}
+ },
+ },
+ "rd": {
+ "type": "dict",
+ "options": {
+ "dual": {"type": "bool"},
+ "id": {"type": "int"},
+ },
+ },
+ "reconnect_interval": {"type": "int"},
+ "router_id": {"type": "str"},
+ "shutdown": {"type": "bool"},
+ "suppress_fib_pending": {"type": "bool"},
+ "timers": {
+ "type": "dict",
+ "options": {
+ "bestpath_limit": {
+ "type": "dict",
+ "options": {
+ "timeout": {"type": "int"},
+ "always": {"type": "bool"},
+ },
+ },
+ "bgp": {
+ "type": "dict",
+ "options": {
+ "keepalive": {"type": "int"},
+ "holdtime": {"type": "int"},
+ },
+ },
+ "prefix_peer_timeout": {"type": "int"},
+ "prefix_peer_wait": {"type": "int"},
+ },
+ },
+ "vrfs": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "vrf": {"type": "str"},
+ "allocate_index": {"type": "int"},
+ "bestpath": {
+ "type": "dict",
+ "options": {
+ "always_compare_med": {"type": "bool"},
+ "as_path": {
+ "type": "dict",
+ "options": {
+ "ignore": {"type": "bool"},
+ "multipath_relax": {"type": "bool"},
+ },
+ },
+ "compare_neighborid": {"type": "bool"},
+ "compare_routerid": {"type": "bool"},
+ "cost_community_ignore": {"type": "bool"},
+ "igp_metric_ignore": {"type": "bool"},
+ "med": {
+ "type": "dict",
+ "options": {
+ "confed": {"type": "bool"},
+ "missing_as_worst": {"type": "bool"},
+ "non_deterministic": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "cluster_id": {"type": "str"},
+ "confederation": {
+ "type": "dict",
+ "options": {
+ "identifier": {"type": "str"},
+ "peers": {"type": "list", "elements": "str"},
+ },
+ },
+ "graceful_restart": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "restart_time": {"type": "int"},
+ "stalepath_time": {"type": "int"},
+ "helper": {"type": "bool"},
+ },
+ },
+ "local_as": {"type": "str"},
+ "log_neighbor_changes": {"type": "bool"},
+ "maxas_limit": {"type": "int"},
+ "neighbors": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "neighbor_address": {
+ "type": "str",
+ "required": True,
+ },
+ "neighbor_affinity_group": {
+ "type": "dict",
+ "options": {"group_id": {"type": "int"}},
+ },
+ "bmp_activate_server": {"type": "int"},
+ "capability": {
+ "type": "dict",
+ "options": {
+ "suppress_4_byte_as": {"type": "bool"}
+ },
+ },
+ "description": {"type": "str"},
+ "disable_connected_check": {"type": "bool"},
+ "dont_capability_negotiate": {"type": "bool"},
+ "dscp": {"type": "str"},
+ "dynamic_capability": {"type": "bool"},
+ "ebgp_multihop": {"type": "int"},
+ "graceful_shutdown": {
+ "type": "dict",
+ "options": {
+ "activate": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "route_map": {"type": "str"},
+ },
+ }
+ },
+ },
+ "inherit": {
+ "type": "dict",
+ "options": {
+ "peer": {"type": "str"},
+ "peer_session": {"type": "str"},
+ },
+ },
+ "local_as": {"type": "str"},
+ "log_neighbor_changes": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "disable": {"type": "bool"},
+ },
+ },
+ "low_memory": {
+ "type": "dict",
+ "options": {"exempt": {"type": "bool"}},
+ },
+ "password": {
+ "type": "dict",
+ "options": {
+ "encryption": {"type": "int"},
+ "key": {"type": "str"},
+ },
+ },
+ "path_attribute": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "action": {
+ "type": "str",
+ "choices": [
+ "discard",
+ "treat-as-withdraw",
+ ],
+ },
+ "type": {"type": "int"},
+ "range": {
+ "type": "dict",
+ "options": {
+ "start": {"type": "int"},
+ "end": {"type": "int"},
+ },
+ },
+ },
+ },
+ "peer_type": {
+ "type": "str",
+ "choices": [
+ "fabric-border-leaf",
+ "fabric-external",
+ ],
+ },
+ "remote_as": {"type": "str"},
+ "remove_private_as": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "replace_as": {"type": "bool"},
+ "all": {"type": "bool"},
+ },
+ },
+ "shutdown": {"type": "bool"},
+ "timers": {
+ "type": "dict",
+ "options": {
+ "keepalive": {"type": "int"},
+ "holdtime": {"type": "int"},
+ },
+ },
+ "transport": {
+ "type": "dict",
+ "options": {
+ "connection_mode": {
+ "type": "dict",
+ "options": {
+ "passive": {"type": "bool"}
+ },
+ }
+ },
+ },
+ "ttl_security": {
+ "type": "dict",
+ "options": {"hops": {"type": "int"}},
+ },
+ "update_source": {"type": "str"},
+ },
+ },
+ "neighbor_down": {
+ "type": "dict",
+ "options": {"fib_accelerate": {"type": "bool"}},
+ },
+ "reconnect_interval": {"type": "int"},
+ "router_id": {"type": "str"},
+ "timers": {
+ "type": "dict",
+ "options": {
+ "bestpath_limit": {
+ "type": "dict",
+ "options": {
+ "timeout": {"type": "int"},
+ "always": {"type": "bool"},
+ },
+ },
+ "bgp": {
+ "type": "dict",
+ "options": {
+ "keepalive": {"type": "int"},
+ "holdtime": {"type": "int"},
+ },
+ },
+ "prefix_peer_timeout": {"type": "int"},
+ "prefix_peer_wait": {"type": "int"},
+ },
+ },
+ },
+ },
+ },
+ },
+ "state": {
+ "type": "str",
+ "choices": [
+ "merged",
+ "replaced",
+ "deleted",
+ "purged",
+ "parsed",
+ "gathered",
+ "rendered",
+ ],
+ "default": "merged",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/facts/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/facts/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/facts/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/facts/facts.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/facts/facts.py
new file mode 100644
index 00000000..cada4b86
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/facts/facts.py
@@ -0,0 +1,26 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+"""
+The arg spec for the nxos facts module.
+"""
+
+
+class FactsArgs(object):
+ """ The arg spec for the nxos facts module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "gather_subset": dict(
+ default=["!config"], type="list", elements="str"
+ ),
+ "gather_network_resources": dict(type="list", elements="str"),
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/hsrp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/hsrp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/hsrp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/hsrp_interfaces/hsrp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/hsrp_interfaces/hsrp_interfaces.py
new file mode 100644
index 00000000..6145dabb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/hsrp_interfaces/hsrp_interfaces.py
@@ -0,0 +1,63 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The arg spec for the nxos_hsrp_interfaces module
+"""
+
+
+class Hsrp_interfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_hsrp_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str"},
+ "bfd": {"choices": ["enable", "disable"], "type": "str"},
+ },
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "rendered",
+ "gathered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/interfaces/interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/interfaces/interfaces.py
new file mode 100644
index 00000000..fd2ae36c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/interfaces/interfaces.py
@@ -0,0 +1,69 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the nxos_interfaces module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class InterfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "elements": "dict",
+ "options": {
+ "description": {"type": "str"},
+ "duplex": {"choices": ["full", "half", "auto"], "type": "str"},
+ "enabled": {"type": "bool"},
+ "fabric_forwarding_anycast_gateway": {"type": "bool"},
+ "ip_forward": {"type": "bool"},
+ "mode": {"choices": ["layer2", "layer3"], "type": "str"},
+ "mtu": {"type": "str"},
+ "name": {"required": True, "type": "str"},
+ "speed": {"type": "str"},
+ },
+ "type": "list",
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l2_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l2_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l2_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l2_interfaces/l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l2_interfaces/l2_interfaces.py
new file mode 100644
index 00000000..0559555c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l2_interfaces/l2_interfaces.py
@@ -0,0 +1,76 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the nxos_l2_interfaces module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class L2_interfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_l2_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "elements": "dict",
+ "options": {
+ "access": {
+ "options": {"vlan": {"type": "int"}},
+ "type": "dict",
+ },
+ "mode": {
+ "type": "str",
+ "choices": ["access", "trunk", "fex-fabric", "fabricpath"],
+ },
+ "name": {"required": True, "type": "str"},
+ "trunk": {
+ "options": {
+ "allowed_vlans": {"type": "str"},
+ "native_vlan": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "list",
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "rendered",
+ "parsed",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l3_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l3_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l3_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l3_interfaces/l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l3_interfaces/l3_interfaces.py
new file mode 100644
index 00000000..299c5133
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/l3_interfaces/l3_interfaces.py
@@ -0,0 +1,85 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the nxos_l3_interfaces module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class L3_interfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_l3_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "elements": "dict",
+ "options": {
+ "dot1q": {"type": "int"},
+ "ipv4": {
+ "elements": "dict",
+ "options": {
+ "address": {"type": "str"},
+ "secondary": {"type": "bool"},
+ "tag": {"type": "int"},
+ },
+ "type": "list",
+ },
+ "ipv6": {
+ "elements": "dict",
+ "options": {
+ "address": {"type": "str"},
+ "tag": {"type": "int"},
+ },
+ "type": "list",
+ },
+ "name": {"required": True, "type": "str"},
+ "redirects": {"type": "bool"},
+ "unreachables": {"type": "bool"},
+ "evpn_multisite_tracking": {
+ "type": "str",
+ "choices": ["fabric-tracking", "dci-tracking"],
+ },
+ },
+ "type": "list",
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp/lacp.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp/lacp.py
new file mode 100644
index 00000000..dd371005
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp/lacp.py
@@ -0,0 +1,74 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the nxos_lacp module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class LacpArgs(object):
+ """The arg spec for the nxos_lacp module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "options": {
+ "system": {
+ "options": {
+ "mac": {
+ "options": {
+ "address": {"type": "str"},
+ "role": {
+ "choices": ["primary", "secondary"],
+ "type": "str",
+ },
+ },
+ "type": "dict",
+ },
+ "priority": {"type": "int"},
+ },
+ "type": "dict",
+ }
+ },
+ "type": "dict",
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp_interfaces/lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp_interfaces/lacp_interfaces.py
new file mode 100644
index 00000000..1e080a98
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lacp_interfaces/lacp_interfaces.py
@@ -0,0 +1,79 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the nxos_lacp_interfaces module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Lacp_interfacesArgs(object):
+ """The arg spec for the nxos_lacp_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "elements": "dict",
+ "options": {
+ "convergence": {
+ "options": {
+ "graceful": {"type": "bool"},
+ "vpc": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "links": {
+ "options": {
+ "max": {"type": "int"},
+ "min": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "mode": {"choices": ["delay"], "type": "str"},
+ "name": {"required": True, "type": "str"},
+ "port_priority": {"type": "int"},
+ "rate": {"choices": ["fast", "normal"], "type": "str"},
+ "suspend_individual": {"type": "bool"},
+ },
+ "type": "list",
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "rendered",
+ "gathered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lag_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lag_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lag_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lag_interfaces/lag_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lag_interfaces/lag_interfaces.py
new file mode 100644
index 00000000..415f41b6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lag_interfaces/lag_interfaces.py
@@ -0,0 +1,73 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the nxos_lag_interfaces module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Lag_interfacesArgs(object):
+ """The arg spec for the nxos_lag_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "elements": "dict",
+ "options": {
+ "members": {
+ "elements": "dict",
+ "options": {
+ "member": {"type": "str"},
+ "mode": {
+ "type": "str",
+ "choices": ["active", "on", "passive"],
+ },
+ "force": {"type": "bool"},
+ },
+ "type": "list",
+ },
+ "name": {"required": True, "type": "str"},
+ },
+ "type": "list",
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "rendered",
+ "parsed",
+ "gathered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_global/lldp_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_global/lldp_global.py
new file mode 100644
index 00000000..92ccc9b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_global/lldp_global.py
@@ -0,0 +1,91 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the nxos_lldp_global module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Lldp_globalArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_lldp_global module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "options": {
+ "holdtime": {"type": "int"},
+ "port_id": {"choices": [0, 1], "type": "int"},
+ "reinit": {"type": "int"},
+ "timer": {"type": "int"},
+ "tlv_select": {
+ "options": {
+ "dcbxp": {"type": "bool"},
+ "management_address": {
+ "options": {
+ "v4": {"type": "bool"},
+ "v6": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "port": {
+ "options": {
+ "description": {"type": "bool"},
+ "vlan": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "power_management": {"type": "bool"},
+ "system": {
+ "options": {
+ "capabilities": {"type": "bool"},
+ "description": {"type": "bool"},
+ "name": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "deleted",
+ "gathered",
+ "parsed",
+ "rendered",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_interfaces/lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_interfaces/lldp_interfaces.py
new file mode 100644
index 00000000..4ea29a71
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/lldp_interfaces/lldp_interfaces.py
@@ -0,0 +1,70 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the nxos_lldp_interfaces module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Lldp_interfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_lldp_interfaces module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "name": {"required": True, "type": "str"},
+ "receive": {"type": "bool"},
+ "tlv_set": {
+ "options": {
+ "management_address": {"type": "str"},
+ "vlan": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "transmit": {"type": "bool"},
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "deleted",
+ "gathered",
+ "merged",
+ "overridden",
+ "rendered",
+ "replaced",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospf_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospf_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospf_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospf_interfaces/ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospf_interfaces/ospf_interfaces.py
new file mode 100644
index 00000000..c23a3238
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospf_interfaces/ospf_interfaces.py
@@ -0,0 +1,130 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the
+# cli_rm_builder.
+#
+# Manually editing this file is not advised.
+#
+# To update the argspec make the desired changes
+# in the module docstring and re-run
+# cli_rm_builder.
+#
+#############################################
+
+"""
+The arg spec for the nxos_ospf_interfaces module
+"""
+
+
+class Ospf_interfacesArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_ospf_interfaces module
+ """
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "name": {"type": "str", "required": True},
+ "address_family": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "afi": {
+ "type": "str",
+ "choices": ["ipv4", "ipv6"],
+ "required": True,
+ },
+ "processes": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "process_id": {
+ "type": "str",
+ "required": True,
+ },
+ "area": {
+ "type": "dict",
+ "options": {
+ "area_id": {
+ "type": "str",
+ "required": True,
+ },
+ "secondaries": {"type": "bool"},
+ },
+ },
+ "multi_areas": {
+ "type": "list",
+ "elements": "str",
+ },
+ },
+ },
+ "multi_areas": {"type": "list", "elements": "str"},
+ "authentication": {
+ "type": "dict",
+ "options": {
+ "key_chain": {"type": "str"},
+ "message_digest": {"type": "bool"},
+ "enable": {"type": "bool"},
+ "null_auth": {"type": "bool"},
+ },
+ },
+ "authentication_key": {
+ "type": "dict",
+ "options": {
+ "encryption": {"type": "int"},
+ "key": {"type": "str", "required": True},
+ },
+ },
+ "message_digest_key": {
+ "type": "dict",
+ "options": {
+ "key_id": {"type": "int", "required": True},
+ "encryption": {"type": "int"},
+ "key": {"type": "str", "required": True},
+ },
+ },
+ "cost": {"type": "int"},
+ "dead_interval": {"type": "int"},
+ "hello_interval": {"type": "int"},
+ "instance": {"type": "int"},
+ "mtu_ignore": {"type": "bool"},
+ "network": {
+ "type": "str",
+ "choices": ["broadcast", "point-to-point"],
+ },
+ "passive_interface": {"type": "bool"},
+ "priority": {"type": "int"},
+ "retransmit_interval": {"type": "int"},
+ "shutdown": {"type": "bool"},
+ "transmit_delay": {"type": "int"},
+ },
+ },
+ },
+ },
+ "state": {
+ "type": "str",
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "parsed",
+ "rendered",
+ ],
+ "default": "merged",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv2/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv2/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv2/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv2/ospfv2.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv2/ospfv2.py
new file mode 100644
index 00000000..09c61fc0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv2/ospfv2.py
@@ -0,0 +1,697 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The arg spec for the nxos_ospfv2 module
+"""
+
+
+class Ospfv2Args(object): # pylint: disable=R0903
+ """The arg spec for the nxos_ospfv2 module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "options": {
+ "processes": {
+ "elements": "dict",
+ "options": {
+ "areas": {
+ "required_one_of": [
+ [
+ "authentication",
+ "default_cost",
+ "filter_list",
+ "nssa",
+ "ranges",
+ "stub",
+ ]
+ ],
+ "elements": "dict",
+ "options": {
+ "area_id": {"type": "str", "required": True},
+ "authentication": {
+ "options": {
+ "set": {"type": "bool"},
+ "message_digest": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "default_cost": {"type": "int"},
+ "filter_list": {
+ "options": {
+ "direction": {
+ "choices": ["in", "out"],
+ "type": "str",
+ "required": True,
+ },
+ "route_map": {
+ "type": "str",
+ "required": True,
+ },
+ },
+ "type": "list",
+ "elements": "dict",
+ },
+ "nssa": {
+ "options": {
+ "default_information_originate": {
+ "type": "bool"
+ },
+ "no_redistribution": {"type": "bool"},
+ "no_summary": {"type": "bool"},
+ "set": {"type": "bool"},
+ "translate": {
+ "options": {
+ "type7": {
+ "mutually_exclusive": [
+ ["always", "never"]
+ ],
+ "options": {
+ "always": {
+ "type": "bool"
+ },
+ "never": {
+ "type": "bool"
+ },
+ "supress_fa": {
+ "type": "bool"
+ },
+ },
+ "type": "dict",
+ }
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "ranges": {
+ "elements": "dict",
+ "options": {
+ "cost": {"type": "int"},
+ "not_advertise": {"type": "bool"},
+ "prefix": {
+ "type": "str",
+ "required": True,
+ },
+ },
+ "type": "list",
+ },
+ "stub": {
+ "options": {
+ "no_summary": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "list",
+ },
+ "auto_cost": {
+ "options": {
+ "reference_bandwidth": {
+ "type": "int",
+ "required": True,
+ },
+ "unit": {
+ "choices": ["Gbps", "Mbps"],
+ "type": "str",
+ "required": True,
+ },
+ },
+ "type": "dict",
+ },
+ "bfd": {"type": "bool"},
+ "default_information": {
+ "options": {
+ "originate": {
+ "options": {
+ "always": {"type": "bool"},
+ "route_map": {"type": "str"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ }
+ },
+ "type": "dict",
+ },
+ "default_metric": {"type": "int"},
+ "distance": {"type": "int"},
+ "flush_routes": {"type": "bool"},
+ "graceful_restart": {
+ "options": {
+ "grace_period": {"type": "int"},
+ "helper_disable": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "isolate": {"type": "bool"},
+ "log_adjacency_changes": {
+ "options": {
+ "detail": {"type": "bool"},
+ "log": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "max_lsa": {
+ "options": {
+ "ignore_count": {"type": "int"},
+ "ignore_time": {"type": "int"},
+ "max_non_self_generated_lsa": {
+ "type": "int",
+ "required": True,
+ },
+ "reset_time": {"type": "int"},
+ "threshold": {"type": "int"},
+ "warning_only": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "max_metric": {
+ "options": {
+ "router_lsa": {
+ "options": {
+ "external_lsa": {
+ "options": {
+ "max_metric_value": {
+ "type": "int"
+ },
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "include_stub": {"type": "bool"},
+ "on_startup": {
+ "options": {
+ "set": {"type": "bool"},
+ "wait_for_bgp_asn": {
+ "type": "int"
+ },
+ "wait_period": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ "set": {"type": "bool"},
+ "summary_lsa": {
+ "options": {
+ "max_metric_value": {
+ "type": "int"
+ },
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ }
+ },
+ "type": "dict",
+ },
+ "maximum_paths": {"type": "int"},
+ "mpls": {
+ "options": {
+ "traffic_eng": {
+ "options": {
+ "areas": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "area_id": {"type": "str"}
+ },
+ },
+ "multicast_intact": {"type": "bool"},
+ "router_id": {"type": "str"},
+ },
+ "type": "dict",
+ }
+ },
+ "type": "dict",
+ },
+ "name_lookup": {"type": "bool"},
+ "passive_interface": {
+ "options": {"default": {"type": "bool"}},
+ "type": "dict",
+ },
+ "process_id": {"required": True, "type": "str"},
+ "redistribute": {
+ "elements": "dict",
+ "options": {
+ "id": {"type": "str"},
+ "protocol": {
+ "choices": [
+ "bgp",
+ "direct",
+ "eigrp",
+ "isis",
+ "lisp",
+ "ospf",
+ "rip",
+ "static",
+ ],
+ "required": True,
+ "type": "str",
+ },
+ "route_map": {"type": "str", "required": True},
+ },
+ "type": "list",
+ },
+ "rfc1583compatibility": {"type": "bool"},
+ "router_id": {"type": "str"},
+ "shutdown": {"type": "bool"},
+ "summary_address": {
+ "elements": "dict",
+ "mutually_exclusive": [["not_advertise", "tag"]],
+ "options": {
+ "not_advertise": {"type": "bool"},
+ "prefix": {"type": "str", "required": True},
+ "tag": {"type": "int"},
+ },
+ "type": "list",
+ },
+ "table_map": {
+ "options": {
+ "filter": {"type": "bool"},
+ "name": {"type": "str", "required": True},
+ },
+ "type": "dict",
+ },
+ "timers": {
+ "options": {
+ "lsa_arrival": {"type": "int"},
+ "lsa_group_pacing": {"type": "int"},
+ "throttle": {
+ "options": {
+ "lsa": {
+ "options": {
+ "hold_interval": {
+ "type": "int"
+ },
+ "max_interval": {
+ "type": "int"
+ },
+ "start_interval": {
+ "type": "int"
+ },
+ },
+ "type": "dict",
+ },
+ "spf": {
+ "options": {
+ "initial_spf_delay": {
+ "type": "int"
+ },
+ "max_wait_time": {
+ "type": "int"
+ },
+ "min_hold_time": {
+ "type": "int"
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "vrfs": {
+ "elements": "dict",
+ "options": {
+ "areas": {
+ "required_one_of": [
+ [
+ "authentication",
+ "default_cost",
+ "filter_list",
+ "nssa",
+ "ranges",
+ "stub",
+ ]
+ ],
+ "elements": "dict",
+ "options": {
+ "area_id": {
+ "type": "str",
+ "required": True,
+ },
+ "authentication": {
+ "options": {
+ "set": {"type": "bool"},
+ "message_digest": {
+ "type": "bool"
+ },
+ },
+ "type": "dict",
+ },
+ "default_cost": {"type": "int"},
+ "filter_list": {
+ "options": {
+ "direction": {
+ "choices": ["in", "out"],
+ "type": "str",
+ "required": True,
+ },
+ "route_map": {
+ "type": "str",
+ "required": True,
+ },
+ },
+ "type": "list",
+ "elements": "dict",
+ },
+ "nssa": {
+ "options": {
+ "default_information_originate": {
+ "type": "bool"
+ },
+ "no_redistribution": {
+ "type": "bool"
+ },
+ "no_summary": {"type": "bool"},
+ "set": {"type": "bool"},
+ "translate": {
+ "options": {
+ "type7": {
+ "mutually_exclusive": [
+ [
+ "always",
+ "never",
+ ]
+ ],
+ "options": {
+ "always": {
+ "type": "bool"
+ },
+ "never": {
+ "type": "bool"
+ },
+ "supress_fa": {
+ "type": "bool"
+ },
+ },
+ "type": "dict",
+ }
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "ranges": {
+ "elements": "dict",
+ "options": {
+ "cost": {"type": "int"},
+ "not_advertise": {
+ "type": "bool"
+ },
+ "prefix": {
+ "type": "str",
+ "required": True,
+ },
+ },
+ "type": "list",
+ },
+ "stub": {
+ "options": {
+ "no_summary": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "list",
+ },
+ "auto_cost": {
+ "options": {
+ "reference_bandwidth": {
+ "type": "int",
+ "required": True,
+ },
+ "unit": {
+ "choices": ["Gbps", "Mbps"],
+ "type": "str",
+ "required": True,
+ },
+ },
+ "type": "dict",
+ },
+ "bfd": {"type": "bool"},
+ "capability": {
+ "type": "dict",
+ "options": {
+ "vrf_lite": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "evpn": {"type": "bool"},
+ },
+ }
+ },
+ },
+ "default_information": {
+ "options": {
+ "originate": {
+ "options": {
+ "always": {"type": "bool"},
+ "route_map": {"type": "str"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ }
+ },
+ "type": "dict",
+ },
+ "default_metric": {"type": "int"},
+ "distance": {"type": "int"},
+ "down_bit_ignore": {"type": "bool"},
+ "graceful_restart": {
+ "options": {
+ "grace_period": {"type": "int"},
+ "helper_disable": {"type": "bool"},
+ "set": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "log_adjacency_changes": {
+ "options": {
+ "detail": {"type": "bool"},
+ "log": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "max_lsa": {
+ "options": {
+ "ignore_count": {"type": "int"},
+ "ignore_time": {"type": "int"},
+ "max_non_self_generated_lsa": {
+ "type": "int",
+ "required": True,
+ },
+ "reset_time": {"type": "int"},
+ "threshold": {"type": "int"},
+ "warning_only": {"type": "bool"},
+ },
+ "type": "dict",
+ },
+ "max_metric": {
+ "options": {
+ "router_lsa": {
+ "options": {
+ "external_lsa": {
+ "options": {
+ "max_metric_value": {
+ "type": "int"
+ },
+ "set": {
+ "type": "bool"
+ },
+ },
+ "type": "dict",
+ },
+ "include_stub": {
+ "type": "bool"
+ },
+ "on_startup": {
+ "options": {
+ "set": {
+ "type": "bool"
+ },
+ "wait_for_bgp_asn": {
+ "type": "int"
+ },
+ "wait_period": {
+ "type": "int"
+ },
+ },
+ "type": "dict",
+ },
+ "set": {"type": "bool"},
+ "summary_lsa": {
+ "options": {
+ "max_metric_value": {
+ "type": "int"
+ },
+ "set": {
+ "type": "bool"
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ }
+ },
+ "type": "dict",
+ },
+ "maximum_paths": {"type": "int"},
+ "name_lookup": {"type": "bool"},
+ "passive_interface": {
+ "options": {"default": {"type": "bool"}},
+ "type": "dict",
+ },
+ "redistribute": {
+ "elements": "dict",
+ "options": {
+ "id": {"type": "str"},
+ "protocol": {
+ "choices": [
+ "bgp",
+ "direct",
+ "eigrp",
+ "isis",
+ "lisp",
+ "ospf",
+ "rip",
+ "static",
+ ],
+ "required": True,
+ "type": "str",
+ },
+ "route_map": {
+ "type": "str",
+ "required": True,
+ },
+ },
+ "type": "list",
+ },
+ "rfc1583compatibility": {"type": "bool"},
+ "router_id": {"type": "str"},
+ "shutdown": {"type": "bool"},
+ "summary_address": {
+ "elements": "dict",
+ "options": {
+ "not_advertise": {"type": "bool"},
+ "prefix": {
+ "type": "str",
+ "required": True,
+ },
+ "tag": {"type": "int"},
+ },
+ "type": "list",
+ },
+ "table_map": {
+ "options": {
+ "filter": {"type": "bool"},
+ "name": {
+ "type": "str",
+ "required": True,
+ },
+ },
+ "type": "dict",
+ },
+ "timers": {
+ "options": {
+ "lsa_arrival": {"type": "int"},
+ "lsa_group_pacing": {"type": "int"},
+ "throttle": {
+ "options": {
+ "lsa": {
+ "options": {
+ "hold_interval": {
+ "type": "int"
+ },
+ "max_interval": {
+ "type": "int"
+ },
+ "start_interval": {
+ "type": "int"
+ },
+ },
+ "type": "dict",
+ },
+ "spf": {
+ "options": {
+ "initial_spf_delay": {
+ "type": "int"
+ },
+ "max_wait_time": {
+ "type": "int"
+ },
+ "min_hold_time": {
+ "type": "int"
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "vrf": {"required": True, "type": "str"},
+ },
+ "type": "list",
+ },
+ },
+ "type": "list",
+ }
+ },
+ "type": "dict",
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv3/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv3/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv3/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv3/ospfv3.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv3/ospfv3.py
new file mode 100644
index 00000000..e4aadfb3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/ospfv3/ospfv3.py
@@ -0,0 +1,551 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the nxos_ospfv3 module
+"""
+
+
+class Ospfv3Args(object): # pylint: disable=R0903
+ """The arg spec for the nxos_ospfv3 module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "type": "dict",
+ "options": {
+ "processes": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "address_family": {
+ "type": "dict",
+ "options": {
+ "afi": {"type": "str", "choices": ["ipv6"]},
+ "safi": {
+ "type": "str",
+ "choices": ["unicast"],
+ },
+ "areas": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "area_id": {
+ "type": "str",
+ "required": True,
+ },
+ "default_cost": {"type": "int"},
+ "filter_list": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "route_map": {
+ "type": "str",
+ "required": True,
+ },
+ "direction": {
+ "type": "str",
+ "choices": ["in", "out"],
+ "required": True,
+ },
+ },
+ },
+ "ranges": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "prefix": {
+ "type": "str",
+ "required": True,
+ },
+ "cost": {"type": "int"},
+ "not_advertise": {
+ "type": "bool"
+ },
+ },
+ },
+ },
+ },
+ "default_information": {
+ "type": "dict",
+ "options": {
+ "originate": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "always": {"type": "bool"},
+ "route_map": {"type": "str"},
+ },
+ }
+ },
+ },
+ "distance": {"type": "int"},
+ "maximum_paths": {"type": "int"},
+ "redistribute": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "protocol": {
+ "type": "str",
+ "choices": [
+ "bgp",
+ "direct",
+ "eigrp",
+ "isis",
+ "lisp",
+ "ospfv3",
+ "rip",
+ "static",
+ ],
+ "required": True,
+ },
+ "id": {"type": "str"},
+ "route_map": {
+ "type": "str",
+ "required": True,
+ },
+ },
+ },
+ "summary_address": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "prefix": {
+ "type": "str",
+ "required": True,
+ },
+ "not_advertise": {"type": "bool"},
+ "tag": {"type": "int"},
+ },
+ },
+ "table_map": {
+ "type": "dict",
+ "options": {
+ "name": {
+ "type": "str",
+ "required": True,
+ },
+ "filter": {"type": "bool"},
+ },
+ },
+ "timers": {
+ "type": "dict",
+ "options": {
+ "throttle": {
+ "type": "dict",
+ "options": {
+ "spf": {
+ "type": "dict",
+ "options": {
+ "initial_spf_delay": {
+ "type": "int"
+ },
+ "min_hold_time": {
+ "type": "int"
+ },
+ "max_wait_time": {
+ "type": "int"
+ },
+ },
+ }
+ },
+ }
+ },
+ },
+ },
+ },
+ "areas": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "area_id": {"type": "str", "required": True},
+ "nssa": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "default_information_originate": {
+ "type": "bool"
+ },
+ "no_redistribution": {"type": "bool"},
+ "no_summary": {"type": "bool"},
+ "route_map": {"type": "str"},
+ "translate": {
+ "type": "dict",
+ "options": {
+ "type7": {
+ "type": "dict",
+ "options": {
+ "always": {
+ "type": "bool"
+ },
+ "never": {
+ "type": "bool"
+ },
+ "supress_fa": {
+ "type": "bool"
+ },
+ },
+ }
+ },
+ },
+ },
+ },
+ "stub": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "no_summary": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "auto_cost": {
+ "type": "dict",
+ "options": {
+ "reference_bandwidth": {
+ "type": "int",
+ "required": True,
+ },
+ "unit": {
+ "type": "str",
+ "required": True,
+ "choices": ["Gbps", "Mbps"],
+ },
+ },
+ },
+ "flush_routes": {"type": "bool"},
+ "graceful_restart": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "grace_period": {"type": "int"},
+ "helper_disable": {"type": "bool"},
+ "planned_only": {"type": "bool"},
+ },
+ },
+ "isolate": {"type": "bool"},
+ "log_adjacency_changes": {
+ "type": "dict",
+ "options": {
+ "log": {"type": "bool"},
+ "detail": {"type": "bool"},
+ },
+ },
+ "max_lsa": {
+ "type": "dict",
+ "options": {
+ "max_non_self_generated_lsa": {
+ "type": "int",
+ "required": True,
+ },
+ "threshold": {"type": "int"},
+ "ignore_count": {"type": "int"},
+ "ignore_time": {"type": "int"},
+ "reset_time": {"type": "int"},
+ "warning_only": {"type": "bool"},
+ },
+ },
+ "max_metric": {
+ "type": "dict",
+ "options": {
+ "router_lsa": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "external_lsa": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "max_metric_value": {
+ "type": "int"
+ },
+ },
+ },
+ "stub_prefix_lsa": {"type": "bool"},
+ "on_startup": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "wait_period": {"type": "int"},
+ "wait_for_bgp_asn": {
+ "type": "int"
+ },
+ },
+ },
+ "inter_area_prefix_lsa": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "max_metric_value": {
+ "type": "int"
+ },
+ },
+ },
+ },
+ }
+ },
+ },
+ "name_lookup": {"type": "bool"},
+ "passive_interface": {
+ "type": "dict",
+ "options": {"default": {"type": "bool"}},
+ },
+ "process_id": {"type": "str", "required": True},
+ "router_id": {"type": "str"},
+ "shutdown": {"type": "bool"},
+ "timers": {
+ "type": "dict",
+ "options": {
+ "lsa_arrival": {"type": "int"},
+ "lsa_group_pacing": {"type": "int"},
+ "throttle": {
+ "type": "dict",
+ "options": {
+ "lsa": {
+ "type": "dict",
+ "options": {
+ "start_interval": {
+ "type": "int"
+ },
+ "hold_interval": {
+ "type": "int"
+ },
+ "max_interval": {
+ "type": "int"
+ },
+ },
+ }
+ },
+ },
+ },
+ },
+ "vrfs": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "areas": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "area_id": {
+ "type": "str",
+ "required": True,
+ },
+ "nssa": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "default_information_originate": {
+ "type": "bool"
+ },
+ "no_redistribution": {
+ "type": "bool"
+ },
+ "no_summary": {"type": "bool"},
+ "route_map": {"type": "str"},
+ "translate": {
+ "type": "dict",
+ "options": {
+ "type7": {
+ "type": "dict",
+ "options": {
+ "always": {
+ "type": "bool"
+ },
+ "never": {
+ "type": "bool"
+ },
+ "supress_fa": {
+ "type": "bool"
+ },
+ },
+ }
+ },
+ },
+ },
+ },
+ "stub": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "no_summary": {"type": "bool"},
+ },
+ },
+ },
+ },
+ "auto_cost": {
+ "type": "dict",
+ "options": {
+ "reference_bandwidth": {
+ "type": "int",
+ "required": True,
+ },
+ "unit": {
+ "type": "str",
+ "required": True,
+ "choices": ["Gbps", "Mbps"],
+ },
+ },
+ },
+ "graceful_restart": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "grace_period": {"type": "int"},
+ "helper_disable": {"type": "bool"},
+ "planned_only": {"type": "bool"},
+ },
+ },
+ "log_adjacency_changes": {
+ "type": "dict",
+ "options": {
+ "log": {"type": "bool"},
+ "detail": {"type": "bool"},
+ },
+ },
+ "max_lsa": {
+ "type": "dict",
+ "options": {
+ "max_non_self_generated_lsa": {
+ "type": "int",
+ "required": True,
+ },
+ "threshold": {"type": "int"},
+ "ignore_count": {"type": "int"},
+ "ignore_time": {"type": "int"},
+ "reset_time": {"type": "int"},
+ "warning_only": {"type": "bool"},
+ },
+ },
+ "max_metric": {
+ "type": "dict",
+ "options": {
+ "router_lsa": {
+ "type": "dict",
+ "options": {
+ "set": {"type": "bool"},
+ "external_lsa": {
+ "type": "dict",
+ "options": {
+ "set": {
+ "type": "bool"
+ },
+ "max_metric_value": {
+ "type": "int"
+ },
+ },
+ },
+ "stub_prefix_lsa": {
+ "type": "bool"
+ },
+ "on_startup": {
+ "type": "dict",
+ "options": {
+ "set": {
+ "type": "bool"
+ },
+ "wait_period": {
+ "type": "int"
+ },
+ "wait_for_bgp_asn": {
+ "type": "int"
+ },
+ },
+ },
+ "inter_area_prefix_lsa": {
+ "type": "dict",
+ "options": {
+ "set": {
+ "type": "bool"
+ },
+ "max_metric_value": {
+ "type": "int"
+ },
+ },
+ },
+ },
+ }
+ },
+ },
+ "name_lookup": {"type": "bool"},
+ "passive_interface": {
+ "type": "dict",
+ "options": {"default": {"type": "bool"}},
+ },
+ "router_id": {"type": "str"},
+ "shutdown": {"type": "bool"},
+ "timers": {
+ "type": "dict",
+ "options": {
+ "lsa_arrival": {"type": "int"},
+ "lsa_group_pacing": {"type": "int"},
+ "throttle": {
+ "type": "dict",
+ "options": {
+ "lsa": {
+ "type": "dict",
+ "options": {
+ "start_interval": {
+ "type": "int"
+ },
+ "hold_interval": {
+ "type": "int"
+ },
+ "max_interval": {
+ "type": "int"
+ },
+ },
+ }
+ },
+ },
+ },
+ },
+ "vrf": {"type": "str", "required": True},
+ },
+ },
+ },
+ }
+ },
+ },
+ "state": {
+ "type": "str",
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "parsed",
+ "rendered",
+ ],
+ "default": "merged",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/static_routes/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/static_routes/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/static_routes/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/static_routes/static_routes.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/static_routes/static_routes.py
new file mode 100644
index 00000000..95e548f3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/static_routes/static_routes.py
@@ -0,0 +1,94 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The arg spec for the nxos_static_routes module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class Static_routesArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_static_routes module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "elements": "dict",
+ "options": {
+ "address_families": {
+ "elements": "dict",
+ "options": {
+ "afi": {
+ "choices": ["ipv4", "ipv6"],
+ "required": True,
+ "type": "str",
+ },
+ "routes": {
+ "elements": "dict",
+ "options": {
+ "dest": {"required": True, "type": "str"},
+ "next_hops": {
+ "elements": "dict",
+ "options": {
+ "admin_distance": {"type": "int"},
+ "dest_vrf": {"type": "str"},
+ "forward_router_address": {
+ "type": "str"
+ },
+ "interface": {"type": "str"},
+ "route_name": {"type": "str"},
+ "tag": {"type": "int"},
+ "track": {"type": "int"},
+ },
+ "type": "list",
+ },
+ },
+ "type": "list",
+ },
+ },
+ "type": "list",
+ },
+ "vrf": {"type": "str"},
+ },
+ "type": "list",
+ },
+ "running_config": {"type": "str"},
+ "state": {
+ "choices": [
+ "deleted",
+ "merged",
+ "overridden",
+ "replaced",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/telemetry/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/telemetry/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/telemetry/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/telemetry/telemetry.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/telemetry/telemetry.py
new file mode 100644
index 00000000..1787f3ae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/telemetry/telemetry.py
@@ -0,0 +1,118 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the nxos_telemetry module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class TelemetryArgs(object): # pylint: disable=R0903
+ """The arg spec for the nxos_telemetry module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "config": {
+ "options": {
+ "certificate": {
+ "options": {
+ "hostname": {"type": "str"},
+ "key": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ "compression": {"choices": ["gzip"], "type": "str"},
+ "source_interface": {"type": "str"},
+ "vrf": {"type": "str"},
+ "destination_groups": {
+ "options": {
+ "destination": {
+ "options": {
+ "encoding": {
+ "choices": ["GPB", "JSON"],
+ "type": "str",
+ },
+ "ip": {"type": "str"},
+ "port": {"type": "int"},
+ "protocol": {
+ "choices": ["HTTP", "TCP", "UDP", "gRPC"],
+ "type": "str",
+ },
+ },
+ "type": "dict",
+ },
+ "id": {"type": "int"},
+ },
+ "type": "list",
+ "elements": "raw",
+ },
+ "sensor_groups": {
+ "options": {
+ "data_source": {
+ "choices": ["NX-API", "DME", "YANG"],
+ "type": "str",
+ },
+ "id": {"type": "int"},
+ "path": {
+ "options": {
+ "depth": {"type": "str"},
+ "filter_condition": {"type": "str"},
+ "name": {"type": "str"},
+ "query_condition": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "list",
+ "elements": "raw",
+ },
+ "subscriptions": {
+ "options": {
+ "destination_group": {"type": "int"},
+ "id": {"type": "int"},
+ "sensor_group": {
+ "options": {
+ "id": {"type": "int"},
+ "sample_interval": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "list",
+ "elements": "raw",
+ },
+ },
+ "type": "dict",
+ },
+ "state": {
+ "choices": ["merged", "replaced", "deleted"],
+ "default": "merged",
+ "type": "str",
+ },
+ } # pylint: disable=C0301
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/vlans/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/vlans/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/vlans/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/vlans/vlans.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/vlans/vlans.py
new file mode 100644
index 00000000..539d9e2e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/argspec/vlans/vlans.py
@@ -0,0 +1,67 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The arg spec for the nxos_vlans module
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+class VlansArgs(object):
+ """The arg spec for the nxos_vlans module
+ """
+
+ def __init__(self, **kwargs):
+ pass
+
+ argument_spec = {
+ "running_config": {"type": "str"},
+ "config": {
+ "elements": "dict",
+ "options": {
+ "enabled": {"type": "bool"},
+ "mapped_vni": {"type": "int"},
+ "mode": {"choices": ["ce", "fabricpath"], "type": "str"},
+ "name": {"type": "str"},
+ "vlan_id": {"required": True, "type": "int"},
+ "state": {"choices": ["active", "suspend"], "type": "str"},
+ },
+ "type": "list",
+ },
+ "state": {
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "rendered",
+ "gathered",
+ "parsed",
+ ],
+ "default": "merged",
+ "type": "str",
+ },
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/cmdref/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/cmdref/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/cmdref/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/cmdref/telemetry/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/cmdref/telemetry/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/cmdref/telemetry/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/cmdref/telemetry/telemetry.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/cmdref/telemetry/telemetry.py
new file mode 100644
index 00000000..187a2c42
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/cmdref/telemetry/telemetry.py
@@ -0,0 +1,146 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+# Telemetry Command Reference File
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+TMS_GLOBAL = """
+# The cmd_ref is a yaml formatted list of module commands.
+# A leading underscore denotes a non-command variable; e.g. _template.
+# TMS does not have convenient global json data so this cmd_ref uses raw cli configs.
+---
+_template: # _template holds common settings for all commands
+ # Enable feature telemetry if disabled
+ feature: telemetry
+ # Common get syntax for TMS commands
+ get_command: show run telemetry all
+ # Parent configuration for TMS commands
+ context:
+ - telemetry
+certificate:
+ _exclude: ['N3K', 'N5K', 'N6k', 'N7k']
+ kind: dict
+ getval: certificate (?P<key>\\S+) (?P<hostname>\\S+)$
+ setval: certificate {key} {hostname}
+ default:
+ key: ~
+ hostname: ~
+compression:
+ _exclude: ['N3K', 'N5K', 'N6k', 'N7k']
+ kind: str
+ getval: use-compression (\\S+)$
+ setval: 'use-compression {0}'
+ default: ~
+ context: &dpcontext
+ - telemetry
+ - destination-profile
+source_interface:
+ _exclude: ['N3K', 'N5K', 'N6k', 'N7k']
+ kind: str
+ getval: source-interface (\\S+)$
+ setval: 'source-interface {0}'
+ default: ~
+ context: *dpcontext
+vrf:
+ _exclude: ['N3K', 'N5K', 'N6k', 'N7k']
+ kind: str
+ getval: use-vrf (\\S+)$
+ setval: 'use-vrf {0}'
+ default: ~
+ context: *dpcontext
+"""
+
+TMS_DESTGROUP = """
+# The cmd_ref is a yaml formatted list of module commands.
+# A leading underscore denotes a non-command variable; e.g. _template.
+# TBD: Use Structured Where Possible
+---
+_template: # _template holds common settings for all commands
+ # Enable feature telemetry if disabled
+ feature: telemetry
+ # Common get syntax for TMS commands
+ get_command: show run telemetry all
+ # Parent configuration for TMS commands
+ context:
+ - telemetry
+destination:
+ _exclude: ['N3K', 'N5K', 'N6k', 'N7k']
+ multiple: true
+ kind: dict
+ getval: ip address (?P<ip>\\S+) port (?P<port>\\S+) protocol (?P<protocol>\\S+) encoding (?P<encoding>\\S+)
+ setval: ip address {ip} port {port} protocol {protocol} encoding {encoding}
+ default:
+ ip: ~
+ port: ~
+ protocol: ~
+ encoding: ~
+"""
+
+TMS_SENSORGROUP = """
+# The cmd_ref is a yaml formatted list of module commands.
+# A leading underscore denotes a non-command variable; e.g. _template.
+# TBD: Use Structured Where Possible
+---
+_template: # _template holds common settings for all commands
+ # Enable feature telemetry if disabled
+ feature: telemetry
+ # Common get syntax for TMS commands
+ get_command: show run telemetry all
+ # Parent configuration for TMS commands
+ context:
+ - telemetry
+data_source:
+ _exclude: ['N3K', 'N5K', 'N6k', 'N7k']
+ kind: str
+ getval: data-source (\\S+)$
+ setval: 'data-source {0}'
+ default: ~
+path:
+ _exclude: ['N3K', 'N5K', 'N6k', 'N7k']
+ multiple: true
+ kind: dict
+ getval: path (?P<name>(\\S+|".*"))( depth (?P<depth>\\S+))?( query-condition (?P<query_condition>\\S+))?( filter-condition (?P<filter_condition>\\S+))?$
+ setval: path {name} depth {depth} query-condition {query_condition} filter-condition {filter_condition}
+ default:
+ name: ~
+ depth: ~
+ query_condition: ~
+ filter_condition: ~
+"""
+
+TMS_SUBSCRIPTION = """
+# The cmd_ref is a yaml formatted list of module commands.
+# A leading underscore denotes a non-command variable; e.g. _template.
+# TBD: Use Structured Where Possible
+---
+_template: # _template holds common settings for all commands
+ # Enable feature telemetry if disabled
+ feature: telemetry
+ # Common get syntax for TMS commands
+ get_command: show run telemetry all
+ # Parent configuration for TMS commands
+ context:
+ - telemetry
+destination_group:
+ _exclude: ['N3K', 'N5K', 'N6k', 'N7k']
+ multiple: true
+ kind: int
+ getval: dst-grp (\\S+)$
+ setval: 'dst-grp {0}'
+ default: ~
+sensor_group:
+ _exclude: ['N3K', 'N5K', 'N6k', 'N7k']
+ multiple: true
+ kind: dict
+ getval: snsr-grp (?P<id>\\S+) sample-interval (?P<sample_interval>\\S+)$
+ setval: snsr-grp {id} sample-interval {sample_interval}
+ default:
+ id: ~
+ sample_interval: ~
+"""
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acl_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acl_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acl_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acl_interfaces/acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acl_interfaces/acl_interfaces.py
new file mode 100644
index 00000000..b6b208ad
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acl_interfaces/acl_interfaces.py
@@ -0,0 +1,350 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_acl_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ remove_empties,
+ dict_diff,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ flatten_dict,
+ search_obj_in_list,
+ get_interface_type,
+ normalize_interface,
+)
+
+
+class Acl_interfaces(ConfigBase):
+ """
+ The nxos_acl_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["acl_interfaces"]
+
+ def __init__(self, module):
+ super(Acl_interfaces, self).__init__(module)
+
+ def get_acl_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ acl_interfaces_facts = facts["ansible_network_resources"].get(
+ "acl_interfaces"
+ )
+ if not acl_interfaces_facts:
+ return []
+ return acl_interfaces_facts
+
+ def edit_config(self, commands):
+ """Wrapper method for `_connection.edit_config()`
+ This exists solely to allow the unit test framework to mock device connection calls.
+ """
+ return self._connection.edit_config(commands)
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+ self.state = self._module.params["state"]
+ action_states = ["merged", "replaced", "deleted", "overridden"]
+
+ if self.state == "gathered":
+ result["gathered"] = self.get_acl_interfaces_facts()
+ elif self.state == "rendered":
+ result["rendered"] = self.set_config({})
+ # no need to fetch facts for rendered
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.set_config({})
+ # no need to fetch facts for parsed
+ else:
+ existing_acl_interfaces_facts = self.get_acl_interfaces_facts()
+ commands.extend(self.set_config(existing_acl_interfaces_facts))
+ if commands and self.state in action_states:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+ result["before"] = existing_acl_interfaces_facts
+ result["commands"] = commands
+
+ changed_acl_interfaces_facts = self.get_acl_interfaces_facts()
+ if result["changed"]:
+ result["after"] = changed_acl_interfaces_facts
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_acl_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params["config"]
+ want = []
+ if config:
+ for w in config:
+ if get_interface_type(w["name"]) == "loopback":
+ self._module.fail_json(
+ msg="This module works with ethernet, management or port-channe"
+ )
+ w.update({"name": normalize_interface(w["name"])})
+ want.append(remove_empties(w))
+ have = existing_acl_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ if (
+ self.state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ self.state
+ )
+ )
+
+ commands = []
+ if self.state == "overridden":
+ commands = self._state_overridden(want, have)
+ elif self.state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif self.state == "rendered":
+ commands = self._state_rendered(want)
+ elif self.state == "parsed":
+ want = self._module.params["running_config"]
+ commands = self._state_parsed(want)
+ else:
+ for w in want:
+ if self.state == "merged":
+ commands.extend(self._state_merged(w, have))
+ elif self.state == "replaced":
+ commands.extend(self._state_replaced(w, have))
+ return commands
+
+ def _state_parsed(self, want):
+ return self.get_acl_interfaces_facts(want)
+
+ def _state_rendered(self, want):
+ commands = []
+ for w in want:
+ commands.extend(self.set_commands(w, {}))
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ new_commands = []
+ del_dict = {"name": want["name"], "access_groups": []}
+ obj_in_have = search_obj_in_list(want["name"], have, "name")
+ if obj_in_have != want:
+ commands = []
+ if obj_in_have and "access_groups" in obj_in_have.keys():
+ for ag in obj_in_have["access_groups"]:
+ want_afi = []
+ if want.get("access_groups"):
+ want_afi = search_obj_in_list(
+ ag["afi"], want["access_groups"], "afi"
+ )
+ if not want_afi:
+ # whatever in have is not in want
+ del_dict["access_groups"].append(ag)
+ else:
+ del_acl = []
+ for acl in ag["acls"]:
+ if want_afi.get("acls"):
+ if acl not in want_afi["acls"]:
+ del_acl.append(acl)
+ else:
+ del_acl.append(acl)
+ afi = want_afi["afi"]
+ del_dict["access_groups"].append(
+ {"afi": afi, "acls": del_acl}
+ )
+
+ commands.extend(self._state_deleted([del_dict], have))
+ commands.extend(self._state_merged(want, have))
+ new_commands.append(commands[0])
+ commands = [
+ commands[i]
+ for i in range(1, len(commands))
+ if commands[i] != commands[0]
+ ]
+ new_commands.extend(commands)
+ return new_commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ want_intf = [w["name"] for w in want]
+ for h in have:
+ if h["name"] not in want_intf:
+ commands.extend(self._state_deleted([h], have))
+ for w in want:
+ commands.extend(self._state_replaced(w, have))
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ return self.set_commands(want, have)
+
+ def set_commands(self, want, have, deleted=False):
+ commands = []
+ have_name = search_obj_in_list(want["name"], have, "name")
+ if have_name and have_name.get("access_groups"):
+ if want.get("access_groups"):
+ for w_afi in want["access_groups"]:
+ ip = "ipv6"
+ if w_afi["afi"] == "ipv4":
+ ip = "ip"
+ have_afi = search_obj_in_list(
+ w_afi["afi"], have_name["access_groups"], "afi"
+ )
+ if have_afi:
+ new_acls = []
+ if deleted:
+ if w_afi.get("acls") and have_afi.get("acls"):
+ new_acls = [
+ acl
+ for acl in w_afi.get("acls")
+ if acl in have_afi.get("acls")
+ ]
+ elif "acls" not in w_afi.keys():
+ new_acls = have_afi.get("acls")
+ else:
+ if w_afi.get("acls"):
+ new_acls = [
+ acl
+ for acl in w_afi["acls"]
+ if acl not in have_afi["acls"]
+ ]
+ commands.extend(
+ self.process_acl(new_acls, ip, deleted)
+ )
+ else:
+ if not deleted:
+ if w_afi.get("acls"):
+ commands.extend(
+ self.process_acl(w_afi["acls"], ip)
+ )
+ else:
+ # only name is given to delete
+ if deleted and "access_groups" in have_name.keys():
+ commands.extend(self.process_access_group(have_name, True))
+ else:
+ if not deleted: # and 'access_groups' in have_name.keys():
+ commands.extend(self.process_access_group(want))
+
+ if len(commands) > 0:
+ commands.insert(0, "interface " + want["name"])
+ return commands
+
+ def process_access_group(self, item, deleted=False):
+ commands = []
+ for ag in item["access_groups"]:
+ ip = "ipv6"
+ if ag["afi"] == "ipv4":
+ ip = "ip"
+ if ag.get("acls"):
+ commands.extend(self.process_acl(ag["acls"], ip, deleted))
+ return commands
+
+ def process_acl(self, acls, ip, deleted=False):
+ commands = []
+ no = ""
+ if deleted:
+ no = "no "
+ for acl in acls:
+ port = ""
+ if acl.get("port"):
+ port = " port"
+ ag = " access-group "
+ if ip == "ipv6":
+ ag = " traffic-filter "
+ commands.append(
+ no + ip + port + ag + acl["name"] + " " + acl["direction"]
+ )
+ return commands
+
+ def _state_deleted(self, main_want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if main_want:
+ if self.state == "deleted":
+ for w in main_want:
+ h = search_obj_in_list(w["name"], have, "name") or {}
+ commands.extend(self.set_commands(h, have, deleted=True))
+ else:
+ for want in main_want:
+ commands.extend(
+ self.set_commands(want, have, deleted=True)
+ )
+ else:
+ for h in have:
+ commands.extend(self.set_commands(h, have, deleted=True))
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acls/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acls/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acls/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acls/acls.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acls/acls.py
new file mode 100644
index 00000000..64372df6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/acls/acls.py
@@ -0,0 +1,765 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_acls class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import socket
+import re
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ remove_empties,
+ dict_diff,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.acls.acls import (
+ AclsArgs,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ flatten_dict,
+ search_obj_in_list,
+ get_interface_type,
+ normalize_interface,
+)
+
+
+class Acls(ConfigBase):
+ """
+ The nxos_acls class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["acls"]
+
+ def __init__(self, module):
+ super(Acls, self).__init__(module)
+
+ def get_acls_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ acls_facts = facts["ansible_network_resources"].get("acls")
+ if not acls_facts:
+ return []
+ return acls_facts
+
+ def edit_config(self, commands):
+ """Wrapper method for `_connection.edit_config()`
+ This exists solely to allow the unit test framework to mock device connection calls.
+ """
+ return self._connection.edit_config(commands)
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+ state = self._module.params["state"]
+ action_states = ["merged", "replaced", "deleted", "overridden"]
+
+ if state == "gathered":
+ result["gathered"] = self.get_acls_facts()
+ elif state == "rendered":
+ result["rendered"] = self.set_config({})
+ elif state == "parsed":
+ result["parsed"] = self.set_config({})
+ else:
+ existing_acls_facts = self.get_acls_facts()
+ commands.extend(self.set_config(existing_acls_facts))
+ if commands and state in action_states:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+ result["before"] = existing_acls_facts
+ result["commands"] = commands
+
+ changed_acls_facts = self.get_acls_facts()
+ if result["changed"]:
+ result["after"] = changed_acls_facts
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_acls_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params["config"]
+ want = []
+ if config:
+ for w in config:
+ want.append(remove_empties(w))
+ have = existing_acls_facts
+ if want:
+ want = self.convert_values(want)
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def convert_values(self, want):
+ """
+ This method is used to map and convert the user given values with what will actually be present in the device configuation
+ """
+ port_protocol = {
+ 515: "lpd",
+ 517: "talk",
+ 7: "echo",
+ 9: "discard",
+ 12: "exec",
+ 13: "login",
+ 14: "cmd",
+ 109: "pop2",
+ 19: "chargen",
+ 20: "ftp-data",
+ 21: "ftp",
+ 23: "telnet",
+ 25: "smtp",
+ 540: "uucp",
+ 543: "klogin",
+ 544: "kshell",
+ 37: "time",
+ 43: "whois",
+ 49: "tacacs",
+ 179: "bgp",
+ 53: "domain",
+ 194: "irc",
+ 70: "gopher",
+ 79: "finger",
+ 80: "www",
+ 101: "hostname",
+ 3949: "drip",
+ 110: "pop3",
+ 111: "sunrpc",
+ 496: "pim-auto-rp",
+ 113: "ident",
+ 119: "nntp",
+ }
+ protocol = {
+ 1: "icmp",
+ 2: "igmp",
+ 4: "ip",
+ 6: "tcp",
+ 103: "pim",
+ 108: "pcp",
+ 47: "gre",
+ 17: "udp",
+ 50: "esp",
+ 51: "ahp",
+ 88: "eigrp",
+ 89: "ospf",
+ 94: "nos",
+ }
+ precedence = {
+ 0: "routine",
+ 1: "priority",
+ 2: "immediate",
+ 3: "flash",
+ 4: "flash-override",
+ 5: "critical",
+ 6: "internet",
+ 7: "network",
+ }
+ dscp = {
+ 10: "AF11",
+ 12: "AF12",
+ 14: "AF13",
+ 18: "AF21",
+ 20: "AF22",
+ 22: "AF23",
+ 26: "AF31",
+ 28: "AF32",
+ 30: "AF33",
+ 34: "AF41",
+ 36: "AF42",
+ 38: "AF43",
+ 8: "CS1",
+ 16: "CS2",
+ 24: "CS3",
+ 32: "CS4",
+ 40: "CS5",
+ 48: "CS6",
+ 56: "CS7",
+ 0: "Default",
+ 46: "EF",
+ }
+ # port_pro_num = list(protocol.keys())
+ for afi in want:
+ if "acls" in afi.keys():
+ for acl in afi["acls"]:
+ if "aces" in acl.keys():
+ for ace in acl["aces"]:
+ if "dscp" in ace.keys():
+ if ace["dscp"].isdigit():
+ ace["dscp"] = dscp[int(ace["dscp"])]
+ ace["dscp"] = ace["dscp"].lower()
+ if "precedence" in ace.keys():
+ if ace["precedence"].isdigit():
+ ace["precedence"] = precedence[
+ int(ace["precedence"])
+ ]
+ if (
+ "protocol" in ace.keys()
+ and ace["protocol"].isdigit()
+ and int(ace["protocol"]) in protocol.keys()
+ ):
+ ace["protocol"] = protocol[
+ int(ace["protocol"])
+ ]
+ # convert number to name
+ if "protocol" in ace.keys() and ace[
+ "protocol"
+ ] in ["tcp", "udp"]:
+ for end in ["source", "destination"]:
+ if "port_protocol" in ace[end].keys():
+ key = list(
+ ace[end]["port_protocol"].keys()
+ )[0]
+ # key could be eq,gt,lt,neq or range
+ if key != "range":
+ val = ace[end]["port_protocol"][
+ key
+ ]
+ if (
+ val.isdigit()
+ and int(val)
+ in port_protocol.keys()
+ ):
+ ace[end]["port_protocol"][
+ key
+ ] = port_protocol[int(val)]
+ else:
+ st = int(
+ ace[end]["port_protocol"][
+ "range"
+ ]["start"]
+ )
+
+ end = int(
+ ace[end]["port_protocol"][
+ "range"
+ ]["end"]
+ )
+
+ if st in port_protocol.keys():
+ ace[end]["port_protocol"][
+ "range"
+ ]["start"] = port_protocol[st]
+ if end in port_protocol.keys():
+ ace[end]["port_protocol"][
+ "range"
+ ]["end"] = port_protocol[end]
+ return want
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ commands = []
+ if state == "overridden":
+ commands = self._state_overridden(want, have)
+ elif state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif state == "rendered":
+ commands = self._state_rendered(want)
+ elif state == "parsed":
+ want = self._module.params["running_config"]
+ commands = self._state_parsed(want)
+ else:
+ for w in want:
+ if state == "merged":
+ commands.extend(self._state_merged(w, have))
+ elif state == "replaced":
+ commands.extend(self._state_replaced(w, have))
+ if state != "parsed":
+ commands = [c.strip() for c in commands]
+ return commands
+
+ def _state_parsed(self, want):
+ return self.get_acls_facts(want)
+
+ def _state_rendered(self, want):
+ commands = []
+ for w in want:
+ commands.extend(self.set_commands(w, {}))
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ have_afi = search_obj_in_list(want["afi"], have, "afi")
+ del_dict = {"acls": []}
+ want_names = []
+ if have_afi != want:
+ if have_afi:
+ del_dict.update({"afi": have_afi["afi"], "acls": []})
+ if want.get("acls"):
+ want_names = [w["name"] for w in want["acls"]]
+ have_names = [h["name"] for h in have_afi["acls"]]
+ want_acls = want.get("acls")
+ for w in want_acls:
+ acl_commands = []
+ if w["name"] not in have_names:
+ # creates new ACL in replaced state
+ merge_dict = {"afi": want["afi"], "acls": [w]}
+ commands.extend(
+ self._state_merged(merge_dict, have)
+ )
+ else:
+ # acl in want exists in have
+ have_name = search_obj_in_list(
+ w["name"], have_afi["acls"], "name"
+ )
+ have_aces = (
+ have_name.get("aces")
+ if have_name.get("aces")
+ else []
+ )
+ merge_aces = []
+ del_aces = []
+ w_aces = w.get("aces") if w.get("aces") else []
+
+ for ace in have_aces:
+ if ace not in w_aces:
+ del_aces.append(ace)
+ for ace in w_aces:
+ if ace not in have_aces:
+ merge_aces.append(ace)
+ merge_dict = {
+ "afi": want["afi"],
+ "acls": [
+ {"name": w["name"], "aces": merge_aces}
+ ],
+ }
+ del_dict = {
+ "afi": want["afi"],
+ "acls": [
+ {"name": w["name"], "aces": del_aces}
+ ],
+ }
+ if del_dict["acls"]:
+ acl_commands.extend(
+ self._state_deleted([del_dict], have)
+ )
+ acl_commands.extend(
+ self._state_merged(merge_dict, have)
+ )
+
+ for i in range(1, len(acl_commands)):
+ if acl_commands[i] == acl_commands[0]:
+ acl_commands[i] = ""
+ commands.extend(acl_commands)
+ else:
+ acls = []
+ # no acls given in want, so delete all have acls
+ for acl in have_afi["acls"]:
+ acls.append({"name": acl["name"]})
+ del_dict["acls"] = acls
+ if del_dict["acls"]:
+ commands.extend(self._state_deleted([del_dict], have))
+
+ else:
+ # want_afi is not present in have
+ commands.extend(self._state_merged(want, have))
+
+ commands = list(filter(None, commands))
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ want_afi = [w["afi"] for w in want]
+ for h in have:
+ if h["afi"] in want_afi:
+ w = search_obj_in_list(h["afi"], want, "afi")
+ for h_acl in h["acls"]:
+ w_acl = search_obj_in_list(
+ h_acl["name"], w["acls"], "name"
+ )
+ if not w_acl:
+ del_dict = {
+ "afi": h["afi"],
+ "acls": [{"name": h_acl["name"]}],
+ }
+ commands.extend(self._state_deleted([del_dict], have))
+ else:
+ # if afi is not in want
+ commands.extend(self._state_deleted([{"afi": h["afi"]}], have))
+ for w in want:
+ commands.extend(self._state_replaced(w, have))
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ return self.set_commands(want, have)
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if want: # and have != want:
+ for w in want:
+ ip = "ipv6" if w["afi"] == "ipv6" else "ip"
+ acl_names = []
+ have_afi = search_obj_in_list(w["afi"], have, "afi")
+ # if want['afi] not in have, ignore
+ if have_afi:
+ if w.get("acls"):
+ for acl in w["acls"]:
+ if (
+ "aces" in acl.keys()
+ and self._module.params["state"] != "deleted"
+ ):
+ have_name = search_obj_in_list(
+ acl["name"], have_afi["acls"], "name"
+ )
+ if have_name:
+ ace_commands = []
+ flag = 0
+ for ace in acl["aces"]:
+ if list(ace.keys()) == ["sequence"]:
+ # only sequence number is specified to be deleted
+ if "aces" in have_name.keys():
+ for h_ace in have_name["aces"]:
+ if (
+ h_ace["sequence"]
+ == ace["sequence"]
+ ):
+ ace_commands.append(
+ "no "
+ + str(
+ ace["sequence"]
+ )
+ )
+ flag = 1
+ else:
+ if "aces" in have_name.keys():
+ for h_ace in have_name["aces"]:
+ # when want['ace'] does not have seq number
+ if (
+ "sequence"
+ not in ace.keys()
+ ):
+ del h_ace["sequence"]
+ if ace == h_ace:
+ ace_commands.append(
+ "no "
+ + self.process_ace(
+ ace
+ )
+ )
+ flag = 1
+ if flag:
+ ace_commands.insert(
+ 0,
+ ip + " access-list " + acl["name"],
+ )
+ commands.extend(ace_commands)
+ else:
+ # only name given
+ for h in have_afi["acls"]:
+ if h["name"] == acl["name"]:
+ acl_names.append(acl["name"])
+ for name in acl_names:
+ commands.append(
+ "no " + ip + " access-list " + name
+ )
+
+ else:
+ # 'only afi is given'
+ if have_afi.get("acls"):
+ for h in have_afi["acls"]:
+ acl_names.append(h["name"])
+ for name in acl_names:
+ commands.append(
+ "no " + ip + " access-list " + name
+ )
+ else:
+ v6 = []
+ v4 = []
+ v6_local = v4_local = None
+ for h in have:
+ if h["afi"] == "ipv6":
+ v6 = (acl["name"] for acl in h["acls"])
+ if "match_local_traffic" in h.keys():
+ v6_local = True
+ else:
+ v4 = (acl["name"] for acl in h["acls"])
+ if "match_local_traffic" in h.keys():
+ v4_local = True
+
+ self.no_commands(v4, commands, v4_local, "ip")
+ self.no_commands(v6, commands, v6_local, "ipv6")
+
+ for name in v6:
+ commands.append("no ipv6 access-list " + name)
+ if v4_local:
+ commands.append("no ipv6 access-list match-local-traffic")
+
+ return commands
+
+ def no_commands(self, v_list, commands, match_local, ip):
+ for name in v_list:
+ commands.append("no " + ip + " access-list " + name)
+ if match_local:
+ commands.append("no " + ip + " access-list match-local-traffic")
+
+ def set_commands(self, want, have):
+ commands = []
+ have_afi = search_obj_in_list(want["afi"], have, "afi")
+ ip = ""
+ if "v6" in want["afi"]:
+ ip = "ipv6 "
+ else:
+ ip = "ip "
+
+ if have_afi:
+ if want.get("acls"):
+ for w_acl in want["acls"]:
+ have_acl = search_obj_in_list(
+ w_acl["name"], have_afi["acls"], "name"
+ )
+ name = w_acl["name"]
+ flag = 0
+ ace_commands = []
+ if have_acl != w_acl:
+ if have_acl:
+ ace_list = []
+ if w_acl.get("aces") and have_acl.get("aces"):
+ # case 1 --> sequence number not given in want --> new ace
+ # case 2 --> new sequence number in want --> new ace
+ # case 3 --> existing sequence number given --> update rule (only for merged state.
+ # For replaced and overridden, rule is deleted in the state's config)
+
+ ace_list = [
+ item
+ for item in w_acl["aces"]
+ if "sequence" not in item.keys()
+ ] # case 1
+
+ want_seq = [
+ item["sequence"]
+ for item in w_acl["aces"]
+ if "sequence" in item.keys()
+ ]
+
+ have_seq = [
+ item["sequence"]
+ for item in have_acl["aces"]
+ ]
+
+ new_seq = list(set(want_seq) - set(have_seq))
+ common_seq = list(
+ set(want_seq).intersection(set(have_seq))
+ )
+
+ temp_list = [
+ item
+ for item in w_acl["aces"]
+ if "sequence" in item.keys()
+ and item["sequence"] in new_seq
+ ] # case 2
+ ace_list.extend(temp_list)
+ for w in w_acl["aces"]:
+ self.argument_spec = AclsArgs.argument_spec
+ params = utils.validate_config(
+ self.argument_spec,
+ {
+ "config": [
+ {
+ "afi": want["afi"],
+ "acls": [
+ {
+ "name": name,
+ "aces": ace_list,
+ }
+ ],
+ }
+ ]
+ },
+ )
+ if (
+ "sequence" in w.keys()
+ and w["sequence"] in common_seq
+ ):
+ temp_obj = search_obj_in_list(
+ w["sequence"],
+ have_acl["aces"],
+ "sequence",
+ ) # case 3
+ if temp_obj != w:
+ for key, val in w.items():
+ temp_obj[key] = val
+ ace_list.append(temp_obj)
+ if (
+ self._module.params["state"]
+ == "merged"
+ ):
+ ace_commands.append(
+ "no " + str(w["sequence"])
+ )
+ # remove existing rule to update it
+ elif w_acl.get("aces"):
+ # 'have' has ACL defined without any ACE
+ ace_list = [item for item in w_acl["aces"]]
+ for w_ace in ace_list:
+ ace_commands.append(
+ self.process_ace(w_ace).strip()
+ )
+ flag = 1
+
+ if flag:
+ ace_commands.insert(
+ 0, ip + "access-list " + name
+ )
+
+ else:
+ commands.append(ip + "access-list " + name)
+ if "aces" in w_acl.keys():
+ for w_ace in w_acl["aces"]:
+ commands.append(
+ self.process_ace(w_ace).strip()
+ )
+ commands.extend(ace_commands)
+ else:
+ if want.get("acls"):
+ for w_acl in want["acls"]:
+ name = w_acl["name"]
+ commands.append(ip + "access-list " + name)
+ if "aces" in w_acl.keys():
+ for w_ace in w_acl["aces"]:
+ commands.append(self.process_ace(w_ace).strip())
+
+ return commands
+
+ def process_ace(self, w_ace):
+ command = ""
+ ace_keys = w_ace.keys()
+ if "remark" in ace_keys:
+ command += "remark " + w_ace["remark"] + " "
+ else:
+ command += w_ace["grant"] + " "
+ if "protocol" in ace_keys:
+ command += w_ace["protocol"] + " "
+ src = self.get_address(w_ace["source"], w_ace["protocol"])
+ dest = self.get_address(
+ w_ace["destination"], w_ace["protocol"]
+ )
+ command += src + dest
+ if "protocol_options" in ace_keys:
+ pro = list(w_ace["protocol_options"].keys())[0]
+ if pro != w_ace["protocol"]:
+ self._module.fail_json(
+ msg="protocol and protocol_options mismatch"
+ )
+ flags = ""
+ for k in w_ace["protocol_options"][pro].keys():
+ k = re.sub("_", "-", k)
+ flags += k + " "
+ command += flags
+ if "dscp" in ace_keys:
+ command += "dscp " + w_ace["dscp"] + " "
+ if "fragments" in ace_keys:
+ command += "fragments "
+ if "precedence" in ace_keys:
+ command += "precedence " + w_ace["precedence"] + " "
+ if "log" in ace_keys:
+ command += "log "
+ if "sequence" in ace_keys:
+ command = str(w_ace["sequence"]) + " " + command
+ return command
+
+ def get_address(self, endpoint, pro=""):
+ ret_addr = ""
+ keys = list(endpoint.keys())
+ if "address" in keys:
+ if "wildcard_bits" not in keys:
+ self._module.fail_json(
+ msg="wildcard bits not specified for address"
+ )
+ else:
+ ret_addr = (
+ endpoint["address"] + " " + endpoint["wildcard_bits"] + " "
+ )
+ elif "any" in keys:
+ ret_addr = "any "
+ elif "host" in keys:
+ ret_addr = "host " + endpoint["host"] + " "
+ elif "prefix" in keys:
+ ret_addr = endpoint["prefix"] + " "
+
+ if pro in ["tcp", "udp"]:
+ if "port_protocol" in keys:
+ options = self.get_options(endpoint["port_protocol"])
+ ret_addr += options
+ return ret_addr
+
+ def get_options(self, item):
+ com = ""
+ subkey = list(item.keys())
+ if "range" in subkey:
+ com = (
+ "range "
+ + item["range"]["start"]
+ + " "
+ + item["range"]["end"]
+ + " "
+ )
+ else:
+ com = subkey[0] + " " + item[subkey[0]] + " "
+ return com
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bfd_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bfd_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bfd_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bfd_interfaces/bfd_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bfd_interfaces/bfd_interfaces.py
new file mode 100644
index 00000000..b115ce49
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bfd_interfaces/bfd_interfaces.py
@@ -0,0 +1,323 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+nxos_bfd_interfaces class
+This class creates a command set to bring the current device configuration
+to a desired end-state. The command set is based on a comparison of the
+current configuration (as dict) and the provided configuration (as dict).
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_diff,
+ to_list,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ flatten_dict,
+ search_obj_in_list,
+)
+
+
+class Bfd_interfaces(ConfigBase):
+ """
+ The nxos_bfd_interfaces class
+ """
+
+ gather_subset = ["min"]
+ gather_network_resources = ["bfd_interfaces"]
+ # exclude_params = []
+
+ def __init__(self, module):
+ super(Bfd_interfaces, self).__init__(module)
+
+ def get_bfd_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :returns: A list of interface configs and a platform string
+ """
+ if self.state not in self.ACTION_STATES:
+ self.gather_subset = ["!all", "!min"]
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ bfd_interfaces_facts = facts["ansible_network_resources"].get(
+ "bfd_interfaces", []
+ )
+
+ platform = facts.get("ansible_net_platform", "")
+ return bfd_interfaces_facts, platform
+
+ def edit_config(self, commands):
+ return self._connection.edit_config(commands)
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_bfd_interfaces_facts, platform = (
+ self.get_bfd_interfaces_facts()
+ )
+ else:
+ existing_bfd_interfaces_facts, platform = [], ""
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(
+ self.set_config(existing_bfd_interfaces_facts, platform)
+ )
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_bfd_interfaces_facts, platform = (
+ self.get_bfd_interfaces_facts()
+ )
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"], platform = self.get_bfd_interfaces_facts(
+ data=running_config
+ )
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_bfd_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_bfd_interfaces_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_bfd_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_bfd_interfaces_facts, platform):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ if re.search("N[56]K", platform):
+ # Some platforms do not support the 'bfd' interface keyword;
+ # remove the 'bfd' key from each want/have interface.
+ orig_want = self._module.params["config"]
+ want = []
+ for w in orig_want:
+ del w["bfd"]
+ want.append(w)
+ orig_have = existing_bfd_interfaces_facts
+ have = []
+ for h in orig_have:
+ del h["bfd"]
+ have.append(h)
+ else:
+ want = self._module.params["config"]
+ have = existing_bfd_interfaces_facts
+
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ cmds = list()
+ if state == "overridden":
+ cmds.extend(self._state_overridden(want, have))
+ elif state == "deleted":
+ cmds.extend(self._state_deleted(want, have))
+ else:
+ for w in want:
+ if state in ["merged", "rendered"]:
+ cmds.extend(self._state_merged(flatten_dict(w), have))
+ elif state == "replaced":
+ cmds.extend(self._state_replaced(flatten_dict(w), have))
+ return cmds
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ cmds = []
+ obj_in_have = search_obj_in_list(want["name"], have, "name")
+ if obj_in_have:
+ diff = dict_diff(want, obj_in_have)
+ else:
+ diff = want
+ merged_cmds = self.set_commands(want, have)
+ if "name" not in diff:
+ diff["name"] = want["name"]
+
+ replaced_cmds = []
+ if obj_in_have:
+ replaced_cmds = self.del_attribs(diff)
+ if replaced_cmds or merged_cmds:
+ for cmd in set(replaced_cmds).intersection(set(merged_cmds)):
+ merged_cmds.remove(cmd)
+ cmds.extend(replaced_cmds)
+ cmds.extend(merged_cmds)
+ return cmds
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ cmds = []
+ for h in have:
+ # Clean up bfd attrs for any interfaces not listed in the play
+ h = flatten_dict(h)
+ obj_in_want = flatten_dict(
+ search_obj_in_list(h["name"], want, "name")
+ )
+ if obj_in_want:
+ # Let the 'want' loop handle all vals for this interface
+ continue
+ cmds.extend(self.del_attribs(h))
+ for w in want:
+ # Update any want attrs if needed. The overridden state considers
+ # the play as the source of truth for the entire device, therefore
+ # set any unspecified attrs to their default state.
+ w = self.set_none_vals_to_defaults(flatten_dict(w))
+ cmds.extend(self.set_commands(w, have))
+ return cmds
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ return self.set_commands(want, have)
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ if not (want or have):
+ return []
+ cmds = []
+ if want:
+ for w in want:
+ obj_in_have = flatten_dict(
+ search_obj_in_list(w["name"], have, "name")
+ )
+ cmds.extend(self.del_attribs(obj_in_have))
+ else:
+ for h in have:
+ cmds.extend(self.del_attribs(flatten_dict(h)))
+ return cmds
+
+ def del_attribs(self, obj):
+ if not obj or len(obj.keys()) == 1:
+ return []
+ cmds = []
+ # 'bfd' and 'bfd echo' are enabled by default so the handling is
+ # counter-intuitive; we are enabling them to remove them. The end result
+ # is that they are removed from the interface config on the device.
+ if "bfd" in obj and "disable" in obj["bfd"]:
+ cmds.append("bfd")
+ if "echo" in obj and "disable" in obj["echo"]:
+ cmds.append("bfd echo")
+ if cmds:
+ cmds.insert(0, "interface " + obj["name"])
+ return cmds
+
+ def set_none_vals_to_defaults(self, want):
+ # Set dict None values to default states
+ if "bfd" in want and want["bfd"] is None:
+ want["bfd"] = "enable"
+ if "echo" in want and want["echo"] is None:
+ want["echo"] = "enable"
+ return want
+
+ def diff_of_dicts(self, want, obj_in_have):
+ diff = set(want.items()) - set(obj_in_have.items())
+ diff = dict(diff)
+ if diff and want["name"] == obj_in_have["name"]:
+ diff.update({"name": want["name"]})
+ return diff
+
+ def add_commands(self, want):
+ if not want:
+ return []
+ cmds = []
+ if "bfd" in want and want["bfd"] is not None:
+ cmd = "bfd" if want["bfd"] == "enable" else "no bfd"
+ cmds.append(cmd)
+ if "echo" in want and want["echo"] is not None:
+ cmd = "bfd echo" if want["echo"] == "enable" else "no bfd echo"
+ cmds.append(cmd)
+
+ if cmds:
+ cmds.insert(0, "interface " + want["name"])
+ return cmds
+
+ def set_commands(self, want, have):
+ cmds = []
+ obj_in_have = flatten_dict(
+ search_obj_in_list(want["name"], have, "name")
+ )
+ if not obj_in_have:
+ cmds = self.add_commands(want)
+ else:
+ diff = self.diff_of_dicts(want, obj_in_have)
+ cmds = self.add_commands(diff)
+ return cmds
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bgp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bgp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bgp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bgp_global/bgp_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bgp_global/bgp_global.py
new file mode 100644
index 00000000..6481c9b6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/bgp_global/bgp_global.py
@@ -0,0 +1,412 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2021 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The nxos_bgp_global config file.
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to its desired end-state is
+created.
+"""
+
+from copy import deepcopy
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.rm_templates.bgp_global import (
+ Bgp_globalTemplate,
+)
+
+
+class Bgp_global(ResourceModule):
+ """
+ The nxos_bgp_global config class
+ """
+
+ def __init__(self, module):
+ super(Bgp_global, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="bgp_global",
+ tmplt=Bgp_globalTemplate(),
+ )
+ # VRF parsers = 29
+ self.parsers = [
+ "allocate_index",
+ "affinity_group.group_id",
+ "bestpath.always_compare_med",
+ "bestpath.as_path.ignore",
+ "bestpath.as_path.multipath_relax",
+ "bestpath.compare_neighborid",
+ "bestpath.compare_routerid",
+ "bestpath.cost_community_ignore",
+ "bestpath.igp_metric_ignore",
+ "bestpath.med.confed",
+ "bestpath.med.missing_as_worst",
+ "bestpath.med.non_deterministic",
+ "cluster_id",
+ "local_as",
+ "confederation.identifier",
+ "graceful_restart",
+ "graceful_restart.restart_time",
+ "graceful_restart.stalepath_time",
+ "graceful_restart.helper",
+ "log_neighbor_changes",
+ "maxas_limit",
+ "neighbor_down.fib_accelerate",
+ "reconnect_interval",
+ "router_id",
+ "timers.bestpath_limit",
+ "timers.bgp",
+ "timers.prefix_peer_timeout",
+ "timers.prefix_peer_wait",
+ # end VRF parsers
+ "disable_policy_batching",
+ "disable_policy_batching.ipv4.prefix_list",
+ "disable_policy_batching.ipv6.prefix_list",
+ "disable_policy_batching.nexthop",
+ "dynamic_med_interval",
+ "enforce_first_as",
+ "enhanced_error",
+ "fast_external_fallover",
+ "flush_routes",
+ "graceful_shutdown.activate",
+ "graceful_shutdown.aware",
+ "isolate",
+ "nexthop.suppress_default_resolution",
+ "shutdown",
+ "suppress_fib_pending",
+ "fabric_soo",
+ "rd",
+ ]
+ self._af_data = {}
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ if self.state not in ["parsed", "gathered"]:
+ self.generate_commands()
+ self.run_commands()
+ return self.result
+
+ def generate_commands(self):
+ """ Generate configuration commands to send based on
+ want, have and desired state.
+ """
+ if self.state in ["deleted", "replaced"]:
+ self._build_af_data()
+
+ for entry in self.want, self.have:
+ self._bgp_list_to_dict(entry)
+
+ # if state is deleted, clean up global params
+ if self.state == "deleted":
+ if not self.want or (
+ self.have.get("as_number") == self.want.get("as_number")
+ ):
+ self._compare(want={}, have=self.have)
+
+ elif self.state == "purged":
+ if not self.want or (
+ self.have.get("as_number") == self.want.get("as_number")
+ ):
+ self.addcmd(self.have or {}, "as_number", True)
+
+ else:
+ wantd = self.want
+ # if state is merged, merge want onto have and then compare
+ if self.state == "merged":
+ wantd = dict_merge(self.have, self.want)
+
+ self._compare(want=wantd, have=self.have)
+
+ def _compare(self, want, have, vrf=None):
+ """Leverages the base class `compare()` method and
+ populates the list of commands to be run by comparing
+ the `want` and `have` data with the `parsers` defined
+ for the Bgp_global network resource.
+ """
+ begin = len(self.commands)
+ self.compare(parsers=self.parsers, want=want, have=have)
+ self._compare_confederation_peers(want, have)
+ self._compare_neighbors(want, have, vrf=vrf)
+ self._vrfs_compare(want=want, have=have)
+
+ if len(self.commands) != begin:
+ self.commands.insert(
+ begin,
+ self._tmplt.render(
+ want or have,
+ "vrf"
+ if "vrf" in (want.keys() or have.keys())
+ else "as_number",
+ False,
+ ),
+ )
+
+ def _compare_confederation_peers(self, want, have):
+ """Custom handling of confederation.peers option
+
+ :params want: the want BGP dictionary
+ :params have: the have BGP dictionary
+ """
+ w_cpeers = want.get("confederation", {}).get("peers", [])
+ h_cpeers = have.get("confederation", {}).get("peers", [])
+
+ if set(w_cpeers) != set(h_cpeers):
+ if self.state in ["replaced", "deleted"]:
+ # if there are peers already configured
+ # we need to remove those before we pass
+ # the new ones otherwise the device appends
+ # them to the existing ones
+ if h_cpeers:
+ self.addcmd(have, "confederation.peers", True)
+ if w_cpeers:
+ self.addcmd(want, "confederation.peers", False)
+
+ def _compare_neighbors(self, want, have, vrf=None):
+ """Custom handling of neighbors option
+
+ :params want: the want BGP dictionary
+ :params have: the have BGP dictionary
+ """
+ nbr_parsers = [
+ "remote_as",
+ "neighbor_affinity_group.group_id",
+ "bmp_activate_server",
+ "capability",
+ "description",
+ "disable_connected_check",
+ "dont_capability_negotiate",
+ "dscp",
+ "dynamic_capability",
+ "ebgp_multihop",
+ "graceful_shutdown",
+ "inherit.peer",
+ "inherit.peer_session",
+ "local_as",
+ "log_neighbor_changes",
+ "low_memory",
+ "password",
+ "peer_type",
+ "remove_private_as",
+ "shutdown",
+ "timers",
+ "transport",
+ "ttl_security",
+ "update_source",
+ ]
+ wnbrs = want.get("neighbors", {})
+ hnbrs = have.get("neighbors", {})
+
+ # neighbors have separate contexts in NX-OS
+ for name, entry in iteritems(wnbrs):
+ begin = len(self.commands)
+ have_nbr = hnbrs.pop(name, {})
+
+ self.compare(parsers=nbr_parsers, want=entry, have=have_nbr)
+ self._compare_path_attribute(entry, have_nbr)
+
+ if len(self.commands) != begin:
+ self.commands.insert(
+ begin, self._tmplt.render(entry, "neighbor_address", False)
+ )
+
+ # cleanup remaining neighbors
+ # but do not negate it entirely
+ # instead remove only those attributes
+ # that this module manages
+ for name, entry in iteritems(hnbrs):
+ if self._has_af(vrf=vrf, neighbor=name):
+ self._module.fail_json(
+ msg="Neighbor {0} has address-family configurations. "
+ "Please use the nxos_bgp_neighbor_af module to remove those first.".format(
+ name
+ )
+ )
+ else:
+ self.addcmd(entry, "neighbor_address", True)
+
+ def _compare_path_attribute(self, want, have):
+ """Custom handling of neighbor path_attribute
+ option.
+
+ :params want: the want neighbor dictionary
+ :params have: the have neighbor dictionary
+ """
+ w_p_attr = want.get("path_attribute", {})
+ h_p_attr = have.get("path_attribute", {})
+
+ for wkey, wentry in iteritems(w_p_attr):
+ if wentry != h_p_attr.pop(wkey, {}):
+ self.addcmd(wentry, "path_attribute", False)
+
+ # remove remaining items in have for replaced
+ for hkey, hentry in iteritems(h_p_attr):
+ self.addcmd(hentry, "path_attribute", True)
+
+ def _vrfs_compare(self, want, have):
+ """Custom handling of VRFs option
+
+ :params want: the want BGP dictionary
+ :params have: the have BGP dictionary
+ """
+ wvrfs = want.get("vrfs", {})
+ hvrfs = have.get("vrfs", {})
+ for name, entry in iteritems(wvrfs):
+ self._compare(want=entry, have=hvrfs.pop(name, {}), vrf=name)
+ # cleanup remaining VRFs
+ # but do not negate it entirely
+ # instead remove only those attributes
+ # that this module manages
+ for name, entry in iteritems(hvrfs):
+ if self._has_af(vrf=name):
+ self._module.fail_json(
+ msg="VRF {0} has address-family configurations. "
+ "Please use the nxos_bgp_af module to remove those first.".format(
+ name
+ )
+ )
+ else:
+ self.addcmd(entry, "vrf", True)
+
+ def _bgp_list_to_dict(self, entry):
+ """Convert list of items to dict of items
+ for efficient diff calculation.
+
+ :params entry: data dictionary
+ """
+
+ def _build_key(x):
+ """Build primary key for path_attribute
+ option.
+ :params x: path_attribute dictionary
+ :returns: primary key as tuple
+ """
+ key_1 = "start_{0}".format(x.get("range", {}).get("start", ""))
+ key_2 = "end_{0}".format(x.get("range", {}).get("end", ""))
+ key_3 = "type_{0}".format(x.get("type", ""))
+ key_4 = x["action"]
+
+ return (key_1, key_2, key_3, key_4)
+
+ if "neighbors" in entry:
+ for x in entry["neighbors"]:
+ if "path_attribute" in x:
+ x["path_attribute"] = {
+ _build_key(item): item
+ for item in x.get("path_attribute", [])
+ }
+
+ entry["neighbors"] = {
+ x["neighbor_address"]: x for x in entry.get("neighbors", [])
+ }
+
+ if "vrfs" in entry:
+ entry["vrfs"] = {x["vrf"]: x for x in entry.get("vrfs", [])}
+ for _k, vrf in iteritems(entry["vrfs"]):
+ self._bgp_list_to_dict(vrf)
+
+ def _get_config(self):
+ return self._connection.get(
+ "show running-config | section '^router bgp'"
+ )
+
+ def _build_af_data(self):
+ """Build a dictionary with AF related information
+ from fetched BGP config.
+ _af_data = {
+ gbl_data = {'192.168.1.100', '192.168.1.101'},
+ vrf_data = {
+ 'vrf_1': {
+ 'has_af': True,
+ 'nbrs': {'192.0.1.1', '192.8.1.1'}
+ },
+ 'vrf_2': {
+ 'has_af': False,
+ 'nbrs': set()
+ }
+ }
+ }
+ """
+ data = self._get_config().split("\n")
+ cur_nbr = None
+ cur_vrf = None
+ gbl_data = set()
+ vrf_data = {}
+
+ for x in data:
+ if x.strip().startswith("vrf"):
+ cur_nbr = None
+ cur_vrf = x.split(" ")[-1]
+ vrf_data[cur_vrf] = {"nbrs": set(), "has_af": False}
+
+ elif x.strip().startswith("neighbor"):
+ cur_nbr = x.split(" ")[-1]
+
+ elif x.strip().startswith("address-family"):
+ if cur_nbr:
+ if cur_vrf:
+ vrf_data[cur_vrf]["nbrs"].add(cur_nbr)
+ else:
+ gbl_data.add(cur_nbr)
+ else:
+ if cur_vrf:
+ vrf_data[cur_vrf]["has_af"] = True
+
+ self._af_data["global"] = gbl_data
+ self._af_data["vrf"] = vrf_data
+
+ def _has_af(self, vrf=None, neighbor=None):
+ """Determine if the given vrf + neighbor
+ combination has AF configurations.
+
+ :params vrf: vrf name
+ :params neighbor: neighbor name
+ :returns: bool
+ """
+ has_af = False
+
+ if self._af_data:
+ vrf_af_data = self._af_data.get("vrf", {})
+ global_af_data = self._af_data.get("global", set())
+ if vrf:
+ vrf_nbr_has_af = vrf_af_data.get(vrf, {}).get("nbrs", set())
+ vrf_has_af = vrf_af_data.get(vrf, {}).get("has_af", False)
+ if neighbor and neighbor in vrf_nbr_has_af:
+ # we are inspecting neighbor within a VRF
+ # if the given neighbor has AF we return True
+ has_af = True
+ else:
+ # we are inspecting VRF as a whole
+ # if there is at least one neighbor
+ # with AF or VRF has AF itself return True
+ if vrf_nbr_has_af or vrf_has_af:
+ has_af = True
+ else:
+ # we are inspecting top level neighbors
+ # if the given neighbor has AF we return True
+ if neighbor and neighbor in global_af_data:
+ has_af = True
+
+ return has_af
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/hsrp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/hsrp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/hsrp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/hsrp_interfaces/hsrp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/hsrp_interfaces/hsrp_interfaces.py
new file mode 100644
index 00000000..04df23f3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/hsrp_interfaces/hsrp_interfaces.py
@@ -0,0 +1,302 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos hsrp_interfaces class
+This class creates a command set to bring the current device configuration
+to a desired end-state. The command set is based on a comparison of the
+current configuration (as dict) and the provided configuration (as dict).
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_diff,
+ to_list,
+ remove_empties,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ flatten_dict,
+ get_interface_type,
+ normalize_interface,
+ search_obj_in_list,
+ vlan_range_to_list,
+)
+
+
+class Hsrp_interfaces(ConfigBase):
+ """
+ The nxos_hsrp_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["hsrp_interfaces"]
+
+ def __init__(self, module):
+ super(Hsrp_interfaces, self).__init__(module)
+
+ def get_hsrp_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ hsrp_interfaces_facts = facts["ansible_network_resources"].get(
+ "hsrp_interfaces", []
+ )
+ return hsrp_interfaces_facts
+
+ def edit_config(self, commands):
+ return self._connection.edit_config(commands)
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = []
+ commands = []
+
+ if self.state in self.ACTION_STATES:
+ existing_hsrp_interfaces_facts = self.get_hsrp_interfaces_facts()
+ else:
+ existing_hsrp_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_hsrp_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_hsrp_interfaces_facts = self.get_hsrp_interfaces_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_hsrp_interfaces_facts(
+ data=running_config
+ )
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_hsrp_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_hsrp_interfaces_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_hsrp_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_hsrp_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params["config"]
+ want = []
+ if config:
+ for w in config:
+ w.update({"name": normalize_interface(w["name"])})
+ want.append(w)
+ have = existing_hsrp_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ # check for 'config' keyword in play
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ cmds = list()
+ if state == "overridden":
+ cmds.extend(self._state_overridden(want, have))
+ elif state == "deleted":
+ cmds.extend(self._state_deleted(want, have))
+ else:
+ for w in want:
+ if state in ["merged", "rendered"]:
+ cmds.extend(self._state_merged(flatten_dict(w), have))
+ elif state == "replaced":
+ cmds.extend(self._state_replaced(flatten_dict(w), have))
+ return cmds
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ cmds = []
+ obj_in_have = search_obj_in_list(want["name"], have, "name")
+ if obj_in_have:
+ diff = dict_diff(want, obj_in_have)
+ else:
+ diff = want
+ merged_cmds = self.set_commands(want, have)
+ if "name" not in diff:
+ diff["name"] = want["name"]
+
+ replaced_cmds = []
+ if obj_in_have:
+ replaced_cmds = self.del_attribs(diff)
+ if replaced_cmds or merged_cmds:
+ for cmd in set(replaced_cmds).intersection(set(merged_cmds)):
+ merged_cmds.remove(cmd)
+ cmds.extend(replaced_cmds)
+ cmds.extend(merged_cmds)
+ return cmds
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ cmds = []
+ for h in have:
+ # Check existing states, set to default if not in want or different than want
+ h = flatten_dict(h)
+ obj_in_want = search_obj_in_list(h["name"], want, "name")
+ if obj_in_want:
+ # Let the 'want' loop handle all vals for this interface
+ continue
+ cmds.extend(self.del_attribs(h))
+ for w in want:
+ # Update any want attrs if needed. The overridden state considers
+ # the play as the source of truth for the entire device, therefore
+ # set any unspecified attrs to their default state.
+ w = self.set_none_vals_to_defaults(flatten_dict(w))
+ cmds.extend(self.set_commands(w, have))
+ return cmds
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ return self.set_commands(want, have)
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ if not (want or have):
+ return []
+ cmds = []
+ if want:
+ for w in want:
+ obj_in_have = flatten_dict(
+ search_obj_in_list(w["name"], have, "name")
+ )
+ cmds.extend(self.del_attribs(obj_in_have))
+ else:
+ for h in have:
+ cmds.extend(self.del_attribs(flatten_dict(h)))
+ return cmds
+
+ def del_attribs(self, obj):
+ if not obj or len(obj.keys()) == 1:
+ return []
+ cmds = []
+ if "bfd" in obj:
+ cmds.append("no hsrp bfd")
+ if cmds:
+ cmds.insert(0, "interface " + obj["name"])
+ return cmds
+
+ def set_none_vals_to_defaults(self, want):
+ # Set dict None values to default states
+ if "bfd" in want and want["bfd"] is None:
+ want["bfd"] = "disable"
+ return want
+
+ def diff_of_dicts(self, want, obj_in_have):
+ diff = set(want.items()) - set(obj_in_have.items())
+ diff = dict(diff)
+ if diff and want["name"] == obj_in_have["name"]:
+ diff.update({"name": want["name"]})
+ return diff
+
+ def add_commands(self, want, obj_in_have):
+ if not want:
+ return []
+ cmds = []
+ if "bfd" in want and want["bfd"] is not None:
+ if want["bfd"] == "enable":
+ cmd = "hsrp bfd"
+ cmds.append(cmd)
+ elif (
+ want["bfd"] == "disable"
+ and obj_in_have
+ and obj_in_have.get("bfd") == "enable"
+ ):
+ cmd = "no hsrp bfd"
+ cmds.append(cmd)
+
+ if cmds:
+ cmds.insert(0, "interface " + want["name"])
+ return cmds
+
+ def set_commands(self, want, have):
+ cmds = []
+ obj_in_have = search_obj_in_list(want["name"], have, "name")
+ if not obj_in_have:
+ cmds = self.add_commands(want, obj_in_have)
+ else:
+ diff = self.diff_of_dicts(want, obj_in_have)
+ cmds = self.add_commands(diff, obj_in_have)
+ return cmds
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/interfaces/interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/interfaces/interfaces.py
new file mode 100644
index 00000000..6d17421a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/interfaces/interfaces.py
@@ -0,0 +1,495 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from copy import deepcopy
+import re
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_diff,
+ to_list,
+ remove_empties,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ normalize_interface,
+ search_obj_in_list,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ remove_rsvd_interfaces,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ default_intf_enabled,
+)
+
+
+class Interfaces(ConfigBase):
+ """
+ The nxos_interfaces class
+ """
+
+ gather_subset = ["min"]
+
+ gather_network_resources = ["interfaces"]
+
+ exclude_params = ["description", "mtu", "speed", "duplex"]
+
+ def __init__(self, module):
+ super(Interfaces, self).__init__(module)
+
+ def get_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :data: Mocked running-config data for state `parsed`
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ self.facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ interfaces_facts = self.facts["ansible_network_resources"].get(
+ "interfaces"
+ )
+
+ return interfaces_facts
+
+ def get_platform(self):
+ """Wrapper method for getting platform info
+ This method exists solely to allow the unit test framework to mock calls.
+ """
+ return self.facts.get("ansible_net_platform", "")
+
+ def get_system_defaults(self):
+ """Wrapper method for `_connection.get()`
+ This method exists solely to allow the unit test framework to mock device connection calls.
+ """
+ return self._connection.get(
+ "show running-config all | incl 'system default switchport'"
+ )
+
+ def edit_config(self, commands):
+ """Wrapper method for `_connection.edit_config()`
+ This method exists solely to allow the unit test framework to mock device connection calls.
+ """
+ return self._connection.edit_config(commands)
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = []
+ warnings = []
+
+ if self.state in self.ACTION_STATES:
+ existing_interfaces_facts = self.get_interfaces_facts()
+ else:
+ existing_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES:
+ self.intf_defs = self.render_interface_defaults(
+ self.get_system_defaults(), existing_interfaces_facts
+ )
+ commands.extend(self.set_config(existing_interfaces_facts))
+
+ if self.state == "rendered":
+ # Hardcode the system defaults for "rendered"
+ # This can be made a configurable option in the future
+ self.intf_defs = {
+ "sysdefs": {
+ "L2_enabled": False,
+ "L3_enabled": False,
+ "mode": "layer3",
+ }
+ }
+ commands.extend(self.set_config(existing_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_interfaces_facts = self.get_interfaces_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_interfaces_facts(data=running_config)
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_interfaces_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params.get("config")
+ want = []
+ if config:
+ for w in config:
+ w.update({"name": normalize_interface(w["name"])})
+ want.append(remove_empties(w))
+ have = deepcopy(existing_interfaces_facts)
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ commands = list()
+ if state == "overridden":
+ commands.extend(self._state_overridden(want, have))
+ elif state == "deleted":
+ commands.extend(self._state_deleted(want, have))
+ else:
+ for w in want:
+ if state in ["merged", "rendered"]:
+ commands.extend(self._state_merged(w, have))
+ elif state == "replaced":
+ commands.extend(self._state_replaced(w, have))
+ return commands
+
+ def _state_replaced(self, w, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ name = w["name"]
+ obj_in_have = search_obj_in_list(name, have, "name")
+ if obj_in_have:
+ # If 'w' does not specify mode then intf may need to change to its
+ # default mode, however default mode may depend on sysdef.
+ if not w.get("mode") and re.search("Ethernet|port-channel", name):
+ sysdefs = self.intf_defs["sysdefs"]
+ sysdef_mode = sysdefs["mode"]
+ if obj_in_have.get("mode") != sysdef_mode:
+ w["mode"] = sysdef_mode
+ diff = dict_diff(w, obj_in_have)
+ else:
+ diff = w
+
+ merged_commands = self.set_commands(w, have)
+ # merged_commands:
+ # - These commands are changes specified by the playbook.
+ # - merged_commands apply to both existing and new objects
+ # replaced_commands:
+ # - These are the unspecified commands, used to reset any params
+ # that are not already set to default states
+ # - replaced_commands should only be used on 'have' objects
+ # (interfaces that already exist)
+ if obj_in_have:
+ if "name" not in diff:
+ diff["name"] = name
+ wkeys = w.keys()
+ dkeys = diff.keys()
+ for k in wkeys:
+ if k in self.exclude_params and k in dkeys:
+ del diff[k]
+ replaced_commands = self.del_attribs(diff)
+ cmds = set(replaced_commands).intersection(set(merged_commands))
+ for cmd in cmds:
+ merged_commands.remove(cmd)
+ commands.extend(replaced_commands)
+
+ commands.extend(merged_commands)
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ # overridden is the same as replaced behavior except for the scope.
+ cmds = []
+ existing_interfaces = []
+ for h in have:
+ existing_interfaces.append(h["name"])
+ obj_in_want = search_obj_in_list(h["name"], want, "name")
+ if obj_in_want:
+ if h != obj_in_want:
+ replaced_cmds = self._state_replaced(obj_in_want, [h])
+ if replaced_cmds:
+ cmds.extend(replaced_cmds)
+ else:
+ cmds.extend(self.del_attribs(h))
+
+ for w in want:
+ if w["name"] not in existing_interfaces:
+ # This is an object that was excluded from the 'have' list
+ # because all of its params are currently set to default states
+ # -OR- it's a new object that does not exist on the device yet.
+ cmds.extend(self.add_commands(w))
+ return cmds
+
+ def _state_merged(self, w, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ return self.set_commands(w, have)
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if want:
+ for w in want:
+ obj_in_have = search_obj_in_list(w["name"], have, "name")
+ commands.extend(self.del_attribs(obj_in_have))
+ else:
+ if not have:
+ return commands
+ for h in have:
+ commands.extend(self.del_attribs(h))
+ return commands
+
+ def default_enabled(self, want=None, have=None, action=""):
+ # 'enabled' default state depends on the interface type and L2 state.
+ # Note that the current default could change when changing L2/L3 modes.
+ if self.state == "rendered":
+ # For "rendered", we always assume that
+ # the default enabled state is False
+ return False
+ if want is None:
+ want = {}
+ if have is None:
+ have = {}
+ name = have.get("name")
+ if name is None:
+ return None
+
+ sysdefs = self.intf_defs["sysdefs"]
+ sysdef_mode = sysdefs["mode"]
+
+ # Get the default enabled state for this interface. This was collected
+ # during Facts gathering.
+ intf_def_enabled = self.intf_defs.get(name)
+
+ have_mode = have.get("mode", sysdef_mode)
+ if action == "delete" and not want:
+ want_mode = sysdef_mode
+ else:
+ want_mode = want.get("mode", have_mode)
+ if (
+ (want_mode and have_mode) is None
+ or (want_mode != have_mode)
+ or intf_def_enabled is None
+ ):
+ # L2-L3 is changing or this is a new virtual intf. Get new default.
+ intf_def_enabled = default_intf_enabled(
+ name=name, sysdefs=sysdefs, mode=want_mode
+ )
+ return intf_def_enabled
+
+ def del_attribs(self, obj):
+ commands = []
+ if not obj or len(obj.keys()) == 1:
+ return commands
+ # mode/switchport changes should occur before other changes
+ sysdef_mode = self.intf_defs["sysdefs"]["mode"]
+ if "mode" in obj and obj["mode"] != sysdef_mode:
+ no_cmd = "no " if sysdef_mode == "layer3" else ""
+ commands.append(no_cmd + "switchport")
+ if "description" in obj:
+ commands.append("no description")
+ if "speed" in obj:
+ commands.append("no speed")
+ if "duplex" in obj:
+ commands.append("no duplex")
+ if "enabled" in obj:
+ sysdef_enabled = self.default_enabled(have=obj, action="delete")
+ if obj["enabled"] is False and sysdef_enabled is True:
+ commands.append("no shutdown")
+ elif obj["enabled"] is True and sysdef_enabled is False:
+ commands.append("shutdown")
+ if "mtu" in obj:
+ commands.append("no mtu")
+ if "ip_forward" in obj and obj["ip_forward"] is True:
+ commands.append("no ip forward")
+ if (
+ "fabric_forwarding_anycast_gateway" in obj
+ and obj["fabric_forwarding_anycast_gateway"] is True
+ ):
+ commands.append("no fabric forwarding mode anycast-gateway")
+ if commands:
+ commands.insert(0, "interface " + obj["name"])
+
+ return commands
+
+ def diff_of_dicts(self, w, obj):
+ diff = set(w.items()) - set(obj.items())
+ diff = dict(diff)
+ if diff and w["name"] == obj["name"]:
+ diff.update({"name": w["name"]})
+ return diff
+
+ def add_commands(self, d, obj_in_have=None):
+ commands = []
+ if not d:
+ return commands
+ if obj_in_have is None:
+ obj_in_have = {}
+ # mode/switchport changes should occur before other changes
+ if "mode" in d:
+ sysdef_mode = self.intf_defs["sysdefs"]["mode"]
+ have_mode = obj_in_have.get("mode", sysdef_mode)
+ want_mode = d["mode"]
+ if have_mode == "layer2":
+ if want_mode == "layer3":
+ commands.append("no switchport")
+ elif want_mode == "layer2":
+ commands.append("switchport")
+ if "description" in d:
+ commands.append("description " + d["description"])
+ if "speed" in d:
+ commands.append("speed " + str(d["speed"]))
+ if "duplex" in d:
+ commands.append("duplex " + d["duplex"])
+ if "enabled" in d:
+ have_enabled = obj_in_have.get(
+ "enabled", self.default_enabled(d, obj_in_have)
+ )
+ if d["enabled"] is False and have_enabled is True:
+ commands.append("shutdown")
+ elif d["enabled"] is True and have_enabled is False:
+ commands.append("no shutdown")
+ if "mtu" in d:
+ commands.append("mtu " + str(d["mtu"]))
+ if "ip_forward" in d:
+ if d["ip_forward"] is True:
+ commands.append("ip forward")
+ else:
+ commands.append("no ip forward")
+ if "fabric_forwarding_anycast_gateway" in d:
+ if d["fabric_forwarding_anycast_gateway"] is True:
+ commands.append("fabric forwarding mode anycast-gateway")
+ else:
+ commands.append("no fabric forwarding mode anycast-gateway")
+ if commands or not obj_in_have:
+ commands.insert(0, "interface" + " " + d["name"])
+ return commands
+
+ def set_commands(self, w, have):
+ commands = []
+ obj_in_have = search_obj_in_list(w["name"], have, "name")
+ if not obj_in_have:
+ commands = self.add_commands(w)
+ else:
+ diff = self.diff_of_dicts(w, obj_in_have)
+ commands = self.add_commands(diff, obj_in_have)
+ return commands
+
+ def render_interface_defaults(self, config, intfs):
+ """Collect user-defined-default states for 'system default switchport'
+ configurations. These configurations determine default L2/L3 modes
+ and enabled/shutdown states. The default values for user-defined-default
+ configurations may be different for legacy platforms.
+ Notes:
+ - L3 enabled default state is False on N9K,N7K but True for N3K,N6K
+ - Changing L2-L3 modes may change the default enabled value.
+ - '(no) system default switchport shutdown' only applies to L2 interfaces.
+ Run through the gathered interfaces and tag their default enabled state.
+ """
+ intf_defs = {}
+ L3_enabled = (
+ True if re.search("N[356]K", self.get_platform()) else False
+ )
+ intf_defs = {
+ "sysdefs": {
+ "mode": None,
+ "L2_enabled": None,
+ "L3_enabled": L3_enabled,
+ }
+ }
+ pat = "(no )*system default switchport$"
+ m = re.search(pat, config, re.MULTILINE)
+ if m:
+ intf_defs["sysdefs"]["mode"] = (
+ "layer3" if "no " in m.groups() else "layer2"
+ )
+
+ pat = "(no )*system default switchport shutdown$"
+ m = re.search(pat, config, re.MULTILINE)
+ if m:
+ intf_defs["sysdefs"]["L2_enabled"] = (
+ True if "no " in m.groups() else False
+ )
+
+ for item in intfs:
+ intf_defs[item["name"]] = default_intf_enabled(
+ name=item["name"],
+ sysdefs=intf_defs["sysdefs"],
+ mode=item.get("mode"),
+ )
+
+ return intf_defs
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l2_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l2_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l2_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l2_interfaces/l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l2_interfaces/l2_interfaces.py
new file mode 100644
index 00000000..9c947ba1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l2_interfaces/l2_interfaces.py
@@ -0,0 +1,355 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_l2_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_diff,
+ to_list,
+ remove_empties,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ flatten_dict,
+ normalize_interface,
+ search_obj_in_list,
+ vlan_range_to_list,
+)
+
+
+class L2_interfaces(ConfigBase):
+ """
+ The nxos_l2_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["l2_interfaces"]
+
+ exclude_params = ["vlan", "allowed_vlans", "native_vlans"]
+
+ def __init__(self, module):
+ super(L2_interfaces, self).__init__(module)
+
+ def get_l2_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ l2_interfaces_facts = facts["ansible_network_resources"].get(
+ "l2_interfaces"
+ )
+ if not l2_interfaces_facts:
+ return []
+ return l2_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_l2_interfaces_facts = self.get_l2_interfaces_facts()
+ else:
+ existing_l2_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_l2_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_l2_interfaces_facts = self.get_l2_interfaces_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_l2_interfaces_facts(
+ data=running_config
+ )
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_l2_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_l2_interfaces_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_l2_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_l2_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params.get("config")
+ want = []
+ if config:
+ for w in config:
+ w.update({"name": normalize_interface(w["name"])})
+ self.expand_trunk_allowed_vlans(w)
+ want.append(remove_empties(w))
+ have = existing_l2_interfaces_facts
+ for h in have:
+ self.expand_trunk_allowed_vlans(h)
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def expand_trunk_allowed_vlans(self, d):
+ if not d:
+ return None
+ if "trunk" in d and d["trunk"]:
+ if "allowed_vlans" in d["trunk"]:
+ allowed_vlans = vlan_range_to_list(d["trunk"]["allowed_vlans"])
+ vlans_list = [str(l) for l in sorted(allowed_vlans)]
+ d["trunk"]["allowed_vlans"] = ",".join(vlans_list)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ commands = list()
+ if state == "overridden":
+ commands.extend(self._state_overridden(want, have))
+ elif state == "deleted":
+ commands.extend(self._state_deleted(want, have))
+ else:
+ for w in want:
+ if state in ["merged", "rendered"]:
+ commands.extend(self._state_merged(flatten_dict(w), have))
+ elif state == "replaced":
+ commands.extend(
+ self._state_replaced(flatten_dict(w), have)
+ )
+ return commands
+
+ def _state_replaced(self, w, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ obj_in_have = flatten_dict(search_obj_in_list(w["name"], have, "name"))
+ if obj_in_have:
+ diff = dict_diff(w, obj_in_have)
+ else:
+ diff = w
+ merged_commands = self.set_commands(w, have, True)
+ if "name" not in diff:
+ diff["name"] = w["name"]
+
+ dkeys = diff.keys()
+ for k in w.copy():
+ if k in self.exclude_params and k in dkeys:
+ del diff[k]
+ replaced_commands = self.del_attribs(diff)
+
+ if merged_commands or replaced_commands:
+ cmds = set(replaced_commands).intersection(set(merged_commands))
+ for cmd in cmds:
+ merged_commands.remove(cmd)
+ commands.extend(replaced_commands)
+ commands.extend(merged_commands)
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ for h in have:
+ h = flatten_dict(h)
+ obj_in_want = flatten_dict(
+ search_obj_in_list(h["name"], want, "name")
+ )
+ if h == obj_in_want:
+ continue
+ for w in want:
+ w = flatten_dict(w)
+ if h["name"] == w["name"]:
+ wkeys = w.keys()
+ hkeys = h.keys()
+ for k in wkeys:
+ if k in self.exclude_params and k in hkeys:
+ del h[k]
+ commands.extend(self.del_attribs(h))
+ for w in want:
+ commands.extend(self.set_commands(flatten_dict(w), have, True))
+ return commands
+
+ def _state_merged(self, w, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ return self.set_commands(w, have)
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if want:
+ for w in want:
+ obj_in_have = flatten_dict(
+ search_obj_in_list(w["name"], have, "name")
+ )
+ commands.extend(self.del_attribs(obj_in_have))
+ else:
+ if not have:
+ return commands
+ for h in have:
+ commands.extend(self.del_attribs(flatten_dict(h)))
+ return commands
+
+ def del_attribs(self, obj):
+ commands = []
+ if not obj or len(obj.keys()) == 1:
+ return commands
+
+ cmd = "no switchport "
+ if "vlan" in obj:
+ commands.append(cmd + "access vlan")
+ if "mode" in obj:
+ commands.append(cmd + "mode")
+ if "allowed_vlans" in obj:
+ commands.append(cmd + "trunk allowed vlan")
+ if "native_vlan" in obj:
+ commands.append(cmd + "trunk native vlan")
+ if commands:
+ commands.insert(0, "interface " + obj["name"])
+ return commands
+
+ def diff_of_dicts(self, w, obj):
+ diff = set(w.items()) - set(obj.items())
+ diff = dict(diff)
+ if diff and w["name"] == obj["name"]:
+ diff.update({"name": w["name"]})
+ return diff
+
+ def add_commands(self, d, vlan_exists=False):
+ commands = []
+ if not d:
+ return commands
+
+ cmd = "switchport "
+ if "mode" in d:
+ commands.append(cmd + "mode {0}".format(d["mode"]))
+ if "vlan" in d:
+ commands.append(cmd + "access vlan " + str(d["vlan"]))
+ if "allowed_vlans" in d:
+ if vlan_exists:
+ commands.append(
+ cmd + "trunk allowed vlan add " + str(d["allowed_vlans"])
+ )
+ else:
+ commands.append(
+ cmd + "trunk allowed vlan " + str(d["allowed_vlans"])
+ )
+ if "native_vlan" in d:
+ commands.append(cmd + "trunk native vlan " + str(d["native_vlan"]))
+ if commands:
+ commands.insert(0, "interface " + d["name"])
+ return commands
+
+ def set_commands(self, w, have, replace=False):
+ commands = []
+
+ obj_in_have = flatten_dict(search_obj_in_list(w["name"], have, "name"))
+ if not obj_in_have:
+ commands = self.add_commands(w)
+ else:
+ diff = self.diff_of_dicts(w, obj_in_have)
+ if diff and not replace:
+ if "mode" in diff.keys() and diff["mode"]:
+ commands = self.add_commands(diff)
+ if "allowed_vlans" in diff.keys() and diff["allowed_vlans"]:
+ vlan_tobe_added = diff["allowed_vlans"].split(",")
+ vlan_list = vlan_tobe_added[:]
+ if obj_in_have.get("allowed_vlans"):
+ have_vlans = obj_in_have["allowed_vlans"].split(",")
+ else:
+ have_vlans = []
+ for w_vlans in vlan_list:
+ if w_vlans in have_vlans:
+ vlan_tobe_added.pop(vlan_tobe_added.index(w_vlans))
+ if vlan_tobe_added:
+ diff.update(
+ {"allowed_vlans": ",".join(vlan_tobe_added)}
+ )
+ if have_vlans:
+ commands = self.add_commands(diff, True)
+ else:
+ commands = self.add_commands(diff)
+ return commands
+ commands = self.add_commands(diff)
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l3_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l3_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l3_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l3_interfaces/l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l3_interfaces/l3_interfaces.py
new file mode 100644
index 00000000..18c46e50
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/l3_interfaces/l3_interfaces.py
@@ -0,0 +1,568 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_l3_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ remove_empties,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ normalize_interface,
+ search_obj_in_list,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ remove_rsvd_interfaces,
+ get_interface_type,
+)
+
+
+class L3_interfaces(ConfigBase):
+ """
+ The nxos_l3_interfaces class
+ """
+
+ gather_subset = ["min"]
+
+ gather_network_resources = ["l3_interfaces"]
+
+ exclude_params = []
+
+ def __init__(self, module):
+ super(L3_interfaces, self).__init__(module)
+
+ def get_l3_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ if self.state not in self.ACTION_STATES:
+ self.gather_subset = ["!all", "!min"]
+
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+
+ l3_interfaces_facts = facts["ansible_network_resources"].get(
+ "l3_interfaces"
+ )
+ self.platform = facts.get("ansible_net_platform", "")
+
+ return l3_interfaces_facts
+
+ def edit_config(self, commands):
+ return self._connection.edit_config(commands)
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = []
+ warnings = []
+
+ if self.state in self.ACTION_STATES:
+ existing_l3_interfaces_facts = self.get_l3_interfaces_facts()
+ else:
+ existing_l3_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_l3_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_l3_interfaces_facts = self.get_l3_interfaces_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_l3_interfaces_facts(
+ data=running_config
+ )
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_l3_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_l3_interfaces_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_l3_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_l3_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params.get("config")
+ want = []
+ if config:
+ for w in config:
+ w.update({"name": normalize_interface(w["name"])})
+ want.append(remove_empties(w))
+ have = deepcopy(existing_l3_interfaces_facts)
+ self.init_check_existing(have)
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ commands = []
+ if state == "overridden":
+ commands.extend(self._state_overridden(want, have))
+ elif state == "deleted":
+ commands.extend(self._state_deleted(want, have))
+ else:
+ for w in want:
+ if state in ["merged", "rendered"]:
+ commands.extend(self._state_merged(w, have))
+ elif state == "replaced":
+ commands.extend(self._state_replaced(w, have))
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+ Scope is limited to interface objects defined in the playbook.
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ cmds = []
+ name = want["name"]
+ obj_in_have = search_obj_in_list(want["name"], have, "name")
+
+ have_v4 = obj_in_have.pop("ipv4", []) if obj_in_have else []
+ have_v6 = obj_in_have.pop("ipv6", []) if obj_in_have else []
+
+ # Process lists of dicts separately
+ v4_cmds = self._v4_cmds(
+ want.pop("ipv4", []), have_v4, state="replaced"
+ )
+ v6_cmds = self._v6_cmds(
+ want.pop("ipv6", []), have_v6, state="replaced"
+ )
+
+ # Process remaining attrs
+ if obj_in_have:
+ # Find 'want' changes first
+ diff = self.diff_of_dicts(want, obj_in_have)
+ rmv = {"name": name}
+ haves_not_in_want = (
+ set(obj_in_have.keys()) - set(want.keys()) - set(diff.keys())
+ )
+ for i in haves_not_in_want:
+ rmv[i] = obj_in_have[i]
+ cmds.extend(self.generate_delete_commands(rmv))
+ else:
+ diff = want
+
+ cmds.extend(self.add_commands(diff, name=name))
+ cmds.extend(v4_cmds)
+ cmds.extend(v6_cmds)
+ self.cmd_order_fixup(cmds, name)
+ return cmds
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+ Scope includes all interface objects on the device.
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ # overridden behavior is the same as replaced except for scope.
+ cmds = []
+ for i in have:
+ obj_in_want = search_obj_in_list(i["name"], want, "name")
+ if obj_in_want:
+ if i != obj_in_want:
+ v4_cmds = self._v4_cmds(
+ obj_in_want.pop("ipv4", []),
+ i.pop("ipv4", []),
+ state="overridden",
+ )
+ replaced_cmds = self._state_replaced(obj_in_want, [i])
+ replaced_cmds.extend(v4_cmds)
+ self.cmd_order_fixup(replaced_cmds, obj_in_want["name"])
+ cmds.extend(replaced_cmds)
+ else:
+ deleted_cmds = self.generate_delete_commands(i)
+ self.cmd_order_fixup(deleted_cmds, i["name"])
+ cmds.extend(deleted_cmds)
+
+ for i in want:
+ if [item for item in have if i["name"] == item["name"]]:
+ continue
+ cmds.extend(self.add_commands(i, name=i["name"]))
+
+ return cmds
+
+ def _state_merged(self, w, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ return self.set_commands(w, have)
+
+ def _v4_cmds(self, want, have, state=None):
+ """Helper method for processing ipv4 changes.
+ This is needed to handle primary/secondary address changes, which require a specific sequence when changing.
+ """
+ # The ip address cli does not allow removing primary addresses while
+ # secondaries are present, but it does allow changing a primary to a
+ # new address as long as the address is not a current secondary.
+ # Be aware of scenarios where a secondary is taking over
+ # the role of the primary, which must be changed in sequence.
+ # In general, primaries/secondaries should change in this order:
+ # Step 1. Remove secondaries that are being changed or removed
+ # Step 2. Change the primary if needed
+ # Step 3. Merge secondaries
+
+ # Normalize inputs (add tag key if not present)
+ for i in want:
+ i["tag"] = i.get("tag")
+ for i in have:
+ i["tag"] = i.get("tag")
+
+ merged = True if state == "merged" else False
+ replaced = True if state == "replaced" else False
+ overridden = True if state == "overridden" else False
+
+ # Create secondary and primary wants/haves
+ sec_w = [i for i in want if i.get("secondary")]
+ sec_h = [i for i in have if i.get("secondary")]
+ pri_w = [i for i in want if not i.get("secondary")]
+ pri_h = [i for i in have if not i.get("secondary")]
+ pri_w = pri_w[0] if pri_w else {}
+ pri_h = pri_h[0] if pri_h else {}
+ cmds = []
+
+ # Remove all addrs when no primary is specified in want (pri_w)
+ if pri_h and not pri_w and (replaced or overridden):
+ cmds.append("no ip address")
+ return cmds
+
+ # 1. Determine which secondaries are changing and remove them. Need a have/want
+ # diff instead of want/have because a have sec addr may be changing to a pri.
+ sec_to_rmv = []
+ sec_diff = self.diff_list_of_dicts(sec_h, sec_w)
+ for i in sec_diff:
+ if overridden or [
+ w for w in sec_w if w["address"] == i["address"]
+ ]:
+ sec_to_rmv.append(i["address"])
+
+ # Check if new primary is currently a secondary
+ if pri_w and [h for h in sec_h if h["address"] == pri_w["address"]]:
+ if not overridden:
+ sec_to_rmv.append(pri_w["address"])
+
+ # Remove the changing secondaries
+ cmds.extend(["no ip address %s secondary" % i for i in sec_to_rmv])
+
+ # 2. change primary
+ if pri_w:
+ diff = dict(set(pri_w.items()) - set(pri_h.items()))
+ if diff:
+ addr = diff.get("address") or pri_w.get("address")
+ cmd = "ip address %s" % addr
+ tag = diff.get("tag")
+ cmd += " tag %s" % tag if tag else ""
+ cmds.append(cmd)
+
+ # 3. process remaining secondaries last
+ sec_w_to_chg = self.diff_list_of_dicts(sec_w, sec_h)
+ for i in sec_w_to_chg:
+ cmd = "ip address %s secondary" % i["address"]
+ cmd += " tag %s" % i["tag"] if i["tag"] else ""
+ cmds.append(cmd)
+
+ return cmds
+
+ def _v6_cmds(self, want, have, state=""):
+ """Helper method for processing ipv6 changes.
+ This is needed to avoid unnecessary churn on the device when removing or changing multiple addresses.
+ """
+ # Normalize inputs (add tag key if not present)
+ for i in want:
+ i["tag"] = i.get("tag")
+ for i in have:
+ i["tag"] = i.get("tag")
+
+ cmds = []
+ # items to remove (items in 'have' only)
+ if state == "replaced":
+ for i in self.diff_list_of_dicts(have, want):
+ want_addr = [w for w in want if w["address"] == i["address"]]
+ if not want_addr:
+ cmds.append("no ipv6 address %s" % i["address"])
+ elif i["tag"] and not want_addr[0]["tag"]:
+ # Must remove entire cli when removing tag
+ cmds.append("no ipv6 address %s" % i["address"])
+
+ # items to merge/add
+ for i in self.diff_list_of_dicts(want, have):
+ addr = i["address"]
+ tag = i["tag"]
+ if not tag and state == "merged":
+ # When want is IP-no-tag and have is IP+tag it will show up in diff,
+ # but for merged nothing has changed, so ignore it for idempotence.
+ have_addr = [h for h in have if h["address"] == addr]
+ if have_addr and have_addr[0].get("tag"):
+ continue
+ cmd = "ipv6 address %s" % i["address"]
+ cmd += " tag %s" % tag if tag else ""
+ cmds.append(cmd)
+
+ return cmds
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if want:
+ for w in want:
+ obj_in_have = search_obj_in_list(w["name"], have, "name")
+ commands.extend(self.del_all_attribs(obj_in_have))
+ else:
+ if not have:
+ return commands
+ for h in have:
+ commands.extend(self.del_all_attribs(h))
+ return commands
+
+ def del_all_attribs(self, obj):
+ commands = []
+ if not obj or len(obj.keys()) == 1:
+ return commands
+ commands = self.generate_delete_commands(obj)
+ self.cmd_order_fixup(commands, obj["name"])
+ return commands
+
+ def generate_delete_commands(self, obj):
+ """Generate CLI commands to remove non-default settings.
+ obj: dict of attrs to remove
+ """
+ commands = []
+ name = obj.get("name")
+ if "dot1q" in obj:
+ commands.append("no encapsulation dot1q")
+ if "redirects" in obj:
+ if not self.check_existing(name, "has_secondary") or re.match(
+ "N[3567]", self.platform
+ ):
+ # device auto-enables redirects when secondaries are removed;
+ # auto-enable may fail on legacy platforms so always do explicit enable
+ commands.append("ip redirects")
+ if "unreachables" in obj:
+ commands.append("no ip unreachables")
+ if "ipv4" in obj:
+ commands.append("no ip address")
+ if "ipv6" in obj:
+ commands.append("no ipv6 address")
+ if "evpn_multisite_tracking" in obj:
+ have = self.existing_facts.get(name, {})
+ if have.get("evpn_multisite_tracking", False) is not False:
+ cmd = "no evpn multisite %s" % have.get(
+ "evpn_multisite_tracking"
+ )
+ commands.append(cmd)
+ return commands
+
+ def init_check_existing(self, have):
+ """Creates a class var dict for easier access to existing states
+ """
+ self.existing_facts = dict()
+ have_copy = deepcopy(have)
+ for intf in have_copy:
+ name = intf["name"]
+ self.existing_facts[name] = intf
+ # Check for presence of secondaries; used for ip redirects logic
+ if [i for i in intf.get("ipv4", []) if i.get("secondary")]:
+ self.existing_facts[name]["has_secondary"] = True
+
+ def check_existing(self, name, query):
+ """Helper method to lookup existing states on an interface.
+ This is needed for attribute changes that have additional dependencies;
+ e.g. 'ip redirects' may auto-enable when all secondary ip addrs are removed.
+ """
+ if name:
+ have = self.existing_facts.get(name, {})
+ if "has_secondary" in query:
+ return have.get("has_secondary", False)
+ if "redirects" in query:
+ return have.get("redirects", True)
+ if "unreachables" in query:
+ return have.get("unreachables", False)
+ return None
+
+ def diff_of_dicts(self, w, obj):
+ diff = set(w.items()) - set(obj.items())
+ diff = dict(diff)
+ if diff and w["name"] == obj["name"]:
+ diff.update({"name": w["name"]})
+ return diff
+
+ def diff_list_of_dicts(self, w, h):
+ diff = []
+ set_w = set(tuple(sorted(d.items())) for d in w) if w else set()
+ set_h = set(tuple(sorted(d.items())) for d in h) if h else set()
+ difference = set_w.difference(set_h)
+ for element in difference:
+ diff.append(dict((x, y) for x, y in element))
+ return diff
+
+ def add_commands(self, diff, name=""):
+ commands = []
+ if not diff:
+ return commands
+ if "dot1q" in diff:
+ commands.append("encapsulation dot1q " + str(diff["dot1q"]))
+ if "redirects" in diff:
+ # Note: device will auto-disable redirects when secondaries are present
+ if diff["redirects"] != self.check_existing(name, "redirects"):
+ no_cmd = "no " if diff["redirects"] is False else ""
+ commands.append(no_cmd + "ip redirects")
+ self.cmd_order_fixup(commands, name)
+ if "unreachables" in diff:
+ if diff["unreachables"] != self.check_existing(
+ name, "unreachables"
+ ):
+ no_cmd = "no " if diff["unreachables"] is False else ""
+ commands.append(no_cmd + "ip unreachables")
+ if "evpn_multisite_tracking" in diff:
+ commands.append(
+ "evpn multisite " + str(diff["evpn_multisite_tracking"])
+ )
+ if "ipv4" in diff:
+ commands.extend(self.generate_afi_commands(diff["ipv4"]))
+ if "ipv6" in diff:
+ commands.extend(self.generate_afi_commands(diff["ipv6"]))
+ self.cmd_order_fixup(commands, name)
+
+ return commands
+
+ def generate_afi_commands(self, diff):
+ cmds = []
+ for i in diff:
+ cmd = (
+ "ipv6 address "
+ if re.search("::", i["address"])
+ else "ip address "
+ )
+ cmd += i["address"]
+ if i.get("secondary"):
+ cmd += " secondary"
+ if i.get("tag"):
+ cmd += " tag " + str(i["tag"])
+ cmds.append(cmd)
+ return cmds
+
+ def set_commands(self, w, have):
+ commands = []
+ name = w["name"]
+ obj_in_have = search_obj_in_list(name, have, "name")
+ if not obj_in_have:
+ commands = self.add_commands(w, name=name)
+ else:
+ # lists of dicts must be processed separately from non-list attrs
+ v4_cmds = self._v4_cmds(
+ w.pop("ipv4", []), obj_in_have.pop("ipv4", []), state="merged"
+ )
+ v6_cmds = self._v6_cmds(
+ w.pop("ipv6", []), obj_in_have.pop("ipv6", []), state="merged"
+ )
+
+ # diff remaining attrs
+ diff = self.diff_of_dicts(w, obj_in_have)
+ commands = self.add_commands(diff, name=name)
+ commands.extend(v4_cmds)
+ commands.extend(v6_cmds)
+
+ self.cmd_order_fixup(commands, name)
+ return commands
+
+ def cmd_order_fixup(self, cmds, name):
+ """Inserts 'interface <name>' config at the beginning of populated command list; reorders dependent commands that must process after others.
+ """
+ if cmds:
+ if name and not [
+ item for item in cmds if item.startswith("interface")
+ ]:
+ cmds.insert(0, "interface " + name)
+
+ redirects = [
+ item for item in cmds if re.match("(no )*ip redirects", item)
+ ]
+ if redirects:
+ # redirects should occur after ipv4 commands, just move to end of list
+ redirects = redirects.pop()
+ cmds.remove(redirects)
+ cmds.append(redirects)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp/lacp.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp/lacp.py
new file mode 100644
index 00000000..84ead279
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp/lacp.py
@@ -0,0 +1,234 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_lacp class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_diff,
+ to_list,
+ remove_empties,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+
+
+class Lacp(ConfigBase):
+ """
+ The nxos_lacp class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lacp"]
+
+ exclude_params = ["priority", "mac"]
+
+ def __init__(self, module):
+ super(Lacp, self).__init__(module)
+
+ def get_lacp_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lacp_facts = facts["ansible_network_resources"].get("lacp", {})
+
+ return lacp_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lacp_facts = self.get_lacp_facts()
+ else:
+ existing_lacp_facts = {}
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lacp_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lacp_facts = self.get_lacp_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lacp_facts(data=running_config)
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lacp_facts
+ if result["changed"]:
+ result["after"] = changed_lacp_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_lacp_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_lacp_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = remove_empties(self._module.params["config"])
+ have = existing_lacp_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ if state in ("merged", "replaced", "rendered") and not want:
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ commands = list()
+
+ if state == "deleted":
+ commands.extend(self._state_deleted(want, have))
+ elif state in ["merged", "rendered"]:
+ commands.extend(self._state_merged(want, have))
+ elif state == "replaced":
+ commands.extend(self._state_replaced(want, have))
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ diff = dict_diff(want, have)
+ wkeys = want.keys()
+ dkeys = diff.keys()
+ for k in wkeys:
+ if k in self.exclude_params and k in dkeys:
+ del diff[k]
+ deleted_commands = self.del_all(diff)
+ merged_commands = self._state_merged(want, have)
+
+ commands.extend(deleted_commands)
+ if merged_commands:
+ commands.extend(merged_commands)
+
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ return self.set_commands(want, have)
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if not have:
+ return commands
+ commands.extend(self.del_all(have))
+ return commands
+
+ def get_diff(self, comparable, base):
+ diff = {}
+ if not base:
+ diff = comparable
+ else:
+ diff = dict_diff(base, comparable)
+ return diff
+
+ def del_all(self, diff):
+ commands = []
+ base = "no lacp system-"
+ diff = diff.get("system")
+ if diff:
+ if "priority" in diff:
+ commands.append(base + "priority")
+ if "mac" in diff:
+ commands.append(base + "mac")
+ return commands
+
+ def add_commands(self, diff):
+ commands = []
+ base = "lacp system-"
+ diff = diff.get("system")
+ if diff and "priority" in diff:
+ cmd = base + "priority" + " " + str(diff["priority"])
+ commands.append(cmd)
+ if diff and "mac" in diff:
+ cmd = ""
+ if "address" in diff["mac"]:
+ cmd += base + "mac" + " " + diff["mac"]["address"]
+ if "role" in diff["mac"]:
+ cmd += " " + "role" + " " + diff["mac"]["role"]
+ if cmd:
+ commands.append(cmd)
+
+ return commands
+
+ def set_commands(self, want, have):
+ if not want:
+ return []
+ diff = self.get_diff(want, have)
+ return self.add_commands(diff)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp_interfaces/lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp_interfaces/lacp_interfaces.py
new file mode 100644
index 00000000..d2518c29
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lacp_interfaces/lacp_interfaces.py
@@ -0,0 +1,336 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_lacp_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ dict_diff,
+ remove_empties,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ flatten_dict,
+ search_obj_in_list,
+ get_interface_type,
+ normalize_interface,
+)
+
+
+class Lacp_interfaces(ConfigBase):
+ """
+ The nxos_lacp_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lacp_interfaces"]
+
+ exclude_params = ["port_priority", "rate", "min", "max"]
+
+ def __init__(self, module):
+ super(Lacp_interfaces, self).__init__(module)
+
+ def get_lacp_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lacp_interfaces_facts = facts["ansible_network_resources"].get(
+ "lacp_interfaces"
+ )
+ if not lacp_interfaces_facts:
+ return []
+ return lacp_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lacp_interfaces_facts = self.get_lacp_interfaces_facts()
+ else:
+ existing_lacp_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lacp_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lacp_interfaces_facts = self.get_lacp_interfaces_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lacp_interfaces_facts(
+ data=running_config
+ )
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lacp_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_lacp_interfaces_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_lacp_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_lacp_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params.get("config")
+ want = []
+ if config:
+ for w in config:
+ if get_interface_type(w["name"]) not in (
+ "portchannel",
+ "ethernet",
+ ):
+ self._module.fail_json(
+ msg="This module works with either portchannel or ethernet"
+ )
+ w.update({"name": normalize_interface(w["name"])})
+ want.append(remove_empties(w))
+ have = existing_lacp_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+ commands = list()
+
+ if state == "overridden":
+ commands.extend(self._state_overridden(want, have))
+ elif state == "deleted":
+ commands.extend(self._state_deleted(want, have))
+ else:
+ for w in want:
+ if state in ["merged", "rendered"]:
+ commands.extend(self._state_merged(flatten_dict(w), have))
+ elif state == "replaced":
+ commands.extend(
+ self._state_replaced(flatten_dict(w), have)
+ )
+ return commands
+
+ def _state_replaced(self, w, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ obj_in_have = flatten_dict(search_obj_in_list(w["name"], have, "name"))
+ diff = dict_diff(w, obj_in_have)
+ merged_commands = self.set_commands(w, have)
+ if "name" not in diff:
+ diff["name"] = w["name"]
+ wkeys = w.keys()
+ dkeys = diff.keys()
+ for k in wkeys:
+ if k in self.exclude_params and k in dkeys:
+ del diff[k]
+ replaced_commands = self.del_attribs(diff)
+
+ if merged_commands:
+ cmds = set(replaced_commands).intersection(set(merged_commands))
+ for cmd in cmds:
+ merged_commands.remove(cmd)
+ commands.extend(replaced_commands)
+ commands.extend(merged_commands)
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ for h in have:
+ h = flatten_dict(h)
+ obj_in_want = flatten_dict(
+ search_obj_in_list(h["name"], want, "name")
+ )
+ if h == obj_in_want:
+ continue
+ for w in want:
+ w = flatten_dict(w)
+ if h["name"] == w["name"]:
+ wkeys = w.keys()
+ hkeys = h.keys()
+ for k in wkeys:
+ if k in self.exclude_params and k in hkeys:
+ del h[k]
+ commands.extend(self.del_attribs(h))
+ for w in want:
+ commands.extend(self.set_commands(flatten_dict(w), have))
+ return commands
+
+ def _state_merged(self, w, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ return self.set_commands(w, have)
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if want:
+ for w in want:
+ obj_in_have = flatten_dict(
+ search_obj_in_list(w["name"], have, "name")
+ )
+ commands.extend(self.del_attribs(obj_in_have))
+ else:
+ if not have:
+ return commands
+ for h in have:
+ commands.extend(self.del_attribs(flatten_dict(h)))
+ return commands
+
+ def del_attribs(self, obj):
+ commands = []
+ if not obj or len(obj.keys()) == 1:
+ return commands
+ commands.append("interface " + obj["name"])
+ if "graceful" in obj:
+ commands.append("lacp graceful-convergence")
+ if "vpc" in obj:
+ commands.append("no lacp vpn-convergence")
+ if "suspend_individual" in obj:
+ commands.append("lacp suspend_individual")
+ if "mode" in obj:
+ commands.append("no lacp mode " + obj["mode"])
+ if "max" in obj:
+ commands.append("no lacp max-bundle")
+ if "min" in obj:
+ commands.append("no lacp min-links")
+ if "port_priority" in obj:
+ commands.append("no lacp port-priority")
+ if "rate" in obj:
+ commands.append("no lacp rate")
+ return commands
+
+ def diff_of_dicts(self, w, obj):
+ diff = set(w.items()) - set(obj.items())
+ diff = dict(diff)
+ if diff and w["name"] == obj["name"]:
+ diff.update({"name": w["name"]})
+ return diff
+
+ def add_commands(self, d):
+ commands = []
+ if not d:
+ return commands
+ commands.append("interface" + " " + d["name"])
+
+ if "port_priority" in d:
+ commands.append("lacp port-priority " + str(d["port_priority"]))
+ if "rate" in d:
+ commands.append("lacp rate " + str(d["rate"]))
+ if "min" in d:
+ commands.append("lacp min-links " + str(d["min"]))
+ if "max" in d:
+ commands.append("lacp max-bundle " + str(d["max"]))
+ if "mode" in d:
+ commands.append("lacp mode " + d["mode"])
+ if "suspend_individual" in d:
+ if d["suspend_individual"] is True:
+ commands.append("lacp suspend-individual")
+ else:
+ commands.append("no lacp suspend-individual")
+ if "graceful" in d:
+ if d["graceful"] is True:
+ commands.append("lacp graceful-convergence")
+ else:
+ commands.append("no lacp graceful-convergence")
+ if "vpc" in d:
+ if d["vpc"] is True:
+ commands.append("lacp vpc-convergence")
+ else:
+ commands.append("no lacp vpc-convergence")
+ return commands
+
+ def set_commands(self, w, have):
+ commands = []
+ obj_in_have = flatten_dict(search_obj_in_list(w["name"], have, "name"))
+ if not obj_in_have:
+ commands = self.add_commands(w)
+ else:
+ diff = self.diff_of_dicts(w, obj_in_have)
+ commands = self.add_commands(diff)
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lag_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lag_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lag_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py
new file mode 100644
index 00000000..c0808113
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lag_interfaces/lag_interfaces.py
@@ -0,0 +1,335 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_lag_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ remove_empties,
+ dict_diff,
+ search_obj_in_list,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ normalize_interface,
+)
+
+
+class Lag_interfaces(ConfigBase):
+ """
+ The nxos_lag_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lag_interfaces"]
+
+ def __init__(self, module):
+ super(Lag_interfaces, self).__init__(module)
+
+ def get_lag_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lag_interfaces_facts = facts["ansible_network_resources"].get(
+ "lag_interfaces"
+ )
+ if not lag_interfaces_facts:
+ return []
+ return lag_interfaces_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lag_interfaces_facts = self.get_lag_interfaces_facts()
+ else:
+ existing_lag_interfaces_facts = []
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lag_interfaces_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ resp = self._connection.edit_config(commands)
+ if "response" in resp:
+ for item in resp["response"]:
+ if item:
+ err_str = item
+ if err_str.lower().startswith("cannot add"):
+ self._module.fail_json(msg=err_str)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lag_interfaces_facts = self.get_lag_interfaces_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lag_interfaces_facts(
+ data=running_config
+ )
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lag_interfaces_facts
+ if result["changed"]:
+ result["after"] = changed_lag_interfaces_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_lag_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_lag_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params.get("config")
+ if want:
+ for w in want:
+ w.update(remove_empties(w))
+ if "members" in w and w["members"]:
+ for item in w["members"]:
+ item.update(
+ {"member": normalize_interface(item["member"])}
+ )
+ have = existing_lag_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+ commands = list()
+
+ if state == "overridden":
+ commands.extend(self._state_overridden(want, have))
+ elif state == "deleted":
+ commands.extend(self._state_deleted(want, have))
+ else:
+ for w in want:
+ if state in ["merged", "rendered"]:
+ commands.extend(self._state_merged(w, have))
+ if state == "replaced":
+ commands.extend(self._state_replaced(w, have))
+ return commands
+
+ def _state_replaced(self, w, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ merged_commands = self.set_commands(w, have)
+ replaced_commands = self.del_intf_commands(w, have)
+ if merged_commands:
+ commands.extend(replaced_commands)
+ commands.extend(merged_commands)
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ for h in have:
+ obj_in_want = search_obj_in_list(h["name"], want, "name")
+ if obj_in_want:
+ diff = self.diff_list_of_dicts(
+ h["members"], obj_in_want["members"]
+ )
+ if not diff:
+ continue
+ commands.extend(self.del_all_commands(h))
+ for w in want:
+ commands.extend(self.set_commands(w, have))
+ return commands
+
+ def _state_merged(self, w, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ return self.set_commands(w, have)
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if want:
+ for w in want:
+ obj_in_have = search_obj_in_list(w["name"], have, "name")
+ commands.extend(self.del_all_commands(obj_in_have))
+ else:
+ if not have:
+ return commands
+ for h in have:
+ commands.extend(self.del_all_commands(h))
+ return commands
+
+ def diff_list_of_dicts(self, want, have):
+ if not want:
+ want = []
+
+ if not have:
+ have = []
+
+ diff = []
+ for w_item in want:
+ h_item = (
+ search_obj_in_list(w_item["member"], have, key="member") or {}
+ )
+ delta = dict_diff(h_item, w_item)
+ if delta:
+ if h_item:
+ if (
+ "mode" in delta.keys()
+ and delta["mode"] == "on"
+ and "mode" not in h_item.keys()
+ ):
+ # mode = on will not be displayed in running-config
+ continue
+ if "member" not in delta.keys():
+ delta["member"] = w_item["member"]
+ diff.append(delta)
+
+ return diff
+
+ def intersect_list_of_dicts(self, w, h):
+ intersect = []
+ wmem = []
+ hmem = []
+ for d in w:
+ wmem.append({"member": d["member"]})
+ for d in h:
+ hmem.append({"member": d["member"]})
+ set_w = set(tuple(sorted(d.items())) for d in wmem)
+ set_h = set(tuple(sorted(d.items())) for d in hmem)
+ intersection = set_w.intersection(set_h)
+ for element in intersection:
+ intersect.append(dict((x, y) for x, y in element))
+ return intersect
+
+ def add_commands(self, diff, name):
+ commands = []
+ name = name.strip("port-channel")
+ for d in diff:
+ commands.append("interface" + " " + d["member"])
+ cmd = ""
+ group_cmd = "channel-group {0}".format(name)
+ if d.get("force"):
+ cmd = group_cmd + " force "
+ if "mode" in d:
+ if cmd:
+ cmd = cmd + " mode " + d["mode"]
+ else:
+ cmd = group_cmd + " mode " + d["mode"]
+ if not cmd:
+ cmd = group_cmd
+ commands.append(cmd)
+ return commands
+
+ def set_commands(self, w, have):
+ commands = []
+ obj_in_have = search_obj_in_list(w["name"], have, "name")
+ if not obj_in_have:
+ commands = self.add_commands(w["members"], w["name"])
+ else:
+ if "members" not in obj_in_have:
+ obj_in_have["members"] = None
+ diff = self.diff_list_of_dicts(
+ w["members"], obj_in_have["members"]
+ )
+ commands = self.add_commands(diff, w["name"])
+ return commands
+
+ def del_all_commands(self, obj_in_have):
+ commands = []
+ if not obj_in_have:
+ return commands
+ for m in obj_in_have.get("members", []):
+ commands.append("interface" + " " + m["member"])
+ commands.append("no channel-group")
+ return commands
+
+ def del_intf_commands(self, w, have):
+ commands = []
+ obj_in_have = search_obj_in_list(w["name"], have, "name")
+ if obj_in_have:
+ lst_to_del = self.intersect_list_of_dicts(
+ w["members"], obj_in_have["members"]
+ )
+ if lst_to_del:
+ for item in lst_to_del:
+ commands.append("interface" + " " + item["member"])
+ commands.append("no channel-group")
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_global/lldp_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_global/lldp_global.py
new file mode 100644
index 00000000..95b5f531
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_global/lldp_global.py
@@ -0,0 +1,285 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_lldp_global class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_empties,
+ dict_diff,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+
+
+class Lldp_global(ConfigBase):
+ """
+ The nxos_lldp_global class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lldp_global"]
+
+ def __init__(self, module):
+ super(Lldp_global, self).__init__(module)
+
+ def get_lldp_global_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lldp_global_facts = facts["ansible_network_resources"].get(
+ "lldp_global"
+ )
+ if not lldp_global_facts:
+ return {}
+ return lldp_global_facts
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ if self.state in self.ACTION_STATES:
+ existing_lldp_global_facts = self.get_lldp_global_facts()
+ else:
+ existing_lldp_global_facts = {}
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_lldp_global_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_lldp_global_facts = self.get_lldp_global_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_lldp_global_facts(data=running_config)
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_lldp_global_facts
+ if result["changed"]:
+ result["after"] = changed_lldp_global_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_lldp_global_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_lldp_global_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params["config"]
+ have = existing_lldp_global_facts
+ resp = self.set_state(remove_empties(want), have)
+ return resp
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ if state in ("merged", "replaced", "rendered") and not want:
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+ commands = list()
+
+ if state == "deleted":
+ commands = self._state_deleted(have)
+ elif state in ["merged", "rendered"]:
+ commands = self._state_merged(want, have)
+ elif state == "replaced":
+ commands = self._state_replaced(want, have)
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ merge_dict = dict_diff(have, want)
+ # merge_dict will contain new and unique values in want
+ delete_dict = self.find_delete_params(have, want)
+ self._module.params["state"] = "deleted"
+ commands.extend(self._state_deleted(delete_dict)) # delete
+ self._module.params["state"] = "merged"
+ commands.extend(self.set_commands(merge_dict)) # merge
+ self._module.params["state"] = "replaced"
+ return commands
+
+ def delete_nested_dict(self, have, want):
+ """
+ Returns tlv_select nested dict that needs to be defaulted
+ """
+ outer_dict = {}
+ for key, val in have.items():
+ inner_dict = {}
+ if not isinstance(val, dict):
+ if key not in want.keys():
+ inner_dict.update({key: val})
+ return inner_dict
+ else:
+ if key in want.keys():
+ outer_dict.update(
+ {key: self.delete_nested_dict(val, want[key])}
+ )
+ else:
+ outer_dict.update({key: val})
+ return outer_dict
+
+ def find_delete_params(self, have, want):
+ """
+ Returns parameters that are present in have and not in want, that need to be defaulted
+ """
+ delete_dict = {}
+ for key, val in have.items():
+ if key not in want.keys():
+ delete_dict.update({key: val})
+ else:
+ if key == "tlv_select":
+ delete_dict.update(
+ {
+ key: self.delete_nested_dict(
+ have["tlv_select"], want["tlv_select"]
+ )
+ }
+ )
+ return delete_dict
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = []
+ diff = dict_diff(have, want)
+ commands.extend(self.set_commands(diff))
+ return commands
+
+ def _state_deleted(self, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if have:
+ for key, val in have.items():
+ if "tlv_select" in key:
+ commands.extend(self.process_nested_dict(val))
+ else:
+ if key == "port_id":
+ key = "portid-subtype"
+ commands.append("no lldp " + key + " " + str(val))
+
+ return commands
+
+ def set_commands(self, diff):
+ commands = []
+ for key, val in diff.items():
+ commands.extend(self.add_commands(key, val))
+ return commands
+
+ def add_commands(self, key, val):
+ command = []
+ if "port_id" in key:
+ command.append("lldp portid-subtype " + str(val))
+ elif "tlv_select" in key:
+ command.extend(self.process_nested_dict(val))
+ else:
+ if val:
+ command.append("lldp " + key + " " + str(val))
+ return command
+
+ def process_nested_dict(self, val):
+ nested_commands = []
+ for k, v in val.items():
+ if isinstance(v, dict):
+ for k1, v1 in v.items():
+ com1 = "lldp tlv-select "
+ com2 = ""
+ if "system" in k:
+ com2 = "system-" + k1
+ elif "management_address" in k:
+ com2 = "management-address " + k1
+ elif "port" in k:
+ com2 = "port-" + k1
+
+ com1 += com2
+ com1 = self.negate_command(com1, v1)
+ nested_commands.append(com1)
+ else:
+ com1 = "lldp tlv-select "
+ if "power_management" in k:
+ com1 += "power-management"
+ else:
+ com1 += k
+
+ com1 = self.negate_command(com1, v)
+ nested_commands.append(com1)
+ return nested_commands
+
+ def negate_command(self, command, val):
+ # for merged, replaced vals need to be checked to add 'no'
+ if self._module.params["state"] == "merged":
+ if not val:
+ command = "no " + command
+ return command
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_interfaces/lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_interfaces/lldp_interfaces.py
new file mode 100644
index 00000000..7bc2db0c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/lldp_interfaces/lldp_interfaces.py
@@ -0,0 +1,325 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_lldp_interfaces class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ remove_empties,
+ dict_diff,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ flatten_dict,
+ search_obj_in_list,
+ get_interface_type,
+ normalize_interface,
+)
+
+
+class Lldp_interfaces(ConfigBase):
+ """
+ The nxos_lldp_interfaces class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["lldp_interfaces"]
+
+ def __init__(self, module):
+ super(Lldp_interfaces, self).__init__(module)
+
+ def get_lldp_interfaces_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ lldp_interfaces_facts = facts["ansible_network_resources"].get(
+ "lldp_interfaces"
+ )
+ if not lldp_interfaces_facts:
+ return []
+ return lldp_interfaces_facts
+
+ def edit_config(self, commands):
+ """Wrapper method for `_connection.edit_config()`
+ This exists solely to allow the unit test framework to mock device connection calls.
+ """
+ return self._connection.edit_config(commands)
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+ state = self._module.params["state"]
+ action_states = ["merged", "replaced", "deleted", "overridden"]
+
+ if state == "gathered":
+ result["gathered"] = self.get_lldp_interfaces_facts()
+ elif state == "rendered":
+ result["rendered"] = self.set_config({})
+ elif state == "parsed":
+ result["parsed"] = self.set_config({})
+ else:
+ existing_lldp_interfaces_facts = self.get_lldp_interfaces_facts()
+ commands.extend(self.set_config(existing_lldp_interfaces_facts))
+ if commands and state in action_states:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+ result["before"] = existing_lldp_interfaces_facts
+ result["commands"] = commands
+ result["commands"] = commands
+
+ changed_lldp_interfaces_facts = self.get_lldp_interfaces_facts()
+
+ if result["changed"]:
+ result["after"] = changed_lldp_interfaces_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_lldp_interfaces_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params["config"]
+ want = []
+ if config:
+ for w in config:
+ if get_interface_type(w["name"]) not in (
+ "management",
+ "ethernet",
+ ):
+ self._module.fail_json(
+ msg="This module works with either management or ethernet"
+ )
+ w.update({"name": normalize_interface(w["name"])})
+ want.append(remove_empties(w))
+ have = existing_lldp_interfaces_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ state = self._module.params["state"]
+ if state == "overridden":
+ commands = self._state_overridden(want, have)
+ elif state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif state == "rendered":
+ commands = self._state_rendered(want)
+ elif state == "parsed":
+ want = self._module.params["running_config"]
+ commands = self._state_parsed(want)
+ else:
+ for w in want:
+ if state == "merged":
+ commands.extend(self._state_merged(flatten_dict(w), have))
+ elif state == "replaced":
+ commands.extend(
+ self._state_replaced(flatten_dict(w), have)
+ )
+ return commands
+
+ def _state_parsed(self, want):
+ return self.get_lldp_interfaces_facts(want)
+
+ def _state_rendered(self, want):
+ commands = []
+ for w in want:
+ commands.extend(self.set_commands(w, {}))
+ return commands
+
+ def _state_gathered(self, have):
+ """ The command generator when state is gathered
+
+ :rtype: A list
+ :returns: the commands necessary to reproduce the current configuration
+ """
+ commands = []
+ want = {}
+ commands.append(self.set_commands(want, have))
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ del_commands = []
+ delete_dict = {}
+ obj_in_have = flatten_dict(
+ search_obj_in_list(want["name"], have, "name")
+ )
+ for k1 in obj_in_have.keys():
+ if k1 not in want.keys():
+ delete_dict.update({k1: obj_in_have[k1]})
+
+ if delete_dict:
+ delete_dict.update({"name": want["name"]})
+ del_commands = self.del_commands(delete_dict)
+ merged_commands = self.set_commands(want, have)
+
+ if merged_commands:
+ cmds = set(del_commands).intersection(set(merged_commands))
+ for cmd in cmds:
+ merged_commands.remove(cmd)
+
+ commands.extend(del_commands)
+ commands.extend(merged_commands)
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ want_intfs = [w["name"] for w in want]
+ for h in have:
+ h = flatten_dict(h)
+ delete_dict = {}
+ if h["name"] in want_intfs:
+ for w in want:
+ if w["name"] == h["name"]:
+ delete_keys = list(set(h) - set(flatten_dict(w)))
+ for k in delete_keys:
+ delete_dict.update({k: h[k]})
+ delete_dict.update({"name": h["name"]})
+ break
+ else:
+ delete_dict.update(h)
+ commands.extend(self.del_commands(delete_dict))
+ for w in want:
+ commands.extend(self.set_commands(flatten_dict(w), have))
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ return self.set_commands(want, have)
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if want:
+ for w in want:
+ obj_in_have = flatten_dict(
+ search_obj_in_list(w["name"], have, "name")
+ )
+ commands.extend(self.del_commands(obj_in_have))
+ else:
+ if not have:
+ return commands
+ for h in have:
+ commands.extend(self.del_commands(flatten_dict(h)))
+ return commands
+
+ def set_commands(self, want, have):
+ commands = []
+ obj_in_have = flatten_dict(
+ search_obj_in_list(want["name"], have, "name")
+ )
+ if not obj_in_have:
+ commands = self.add_commands(flatten_dict(want))
+ else:
+ diff = dict_diff(obj_in_have, want)
+ if diff:
+ diff.update({"name": want["name"]})
+ commands = self.add_commands(diff)
+ return commands
+
+ def add_commands(self, d):
+ commands = []
+ if not d:
+ return commands
+ commands.append("interface " + d["name"])
+ if "transmit" in d:
+ if d["transmit"]:
+ commands.append("lldp transmit")
+ else:
+ commands.append("no lldp transmit")
+ if "receive" in d:
+ if d["receive"]:
+ commands.append("lldp receive")
+ else:
+ commands.append("no lldp receive")
+ if "management_address" in d:
+ commands.append(
+ "lldp tlv-set management-address " + d["management_address"]
+ )
+ if "vlan" in d:
+ commands.append("lldp tlv-set vlan " + str(d["vlan"]))
+
+ return commands
+
+ def del_commands(self, obj):
+ commands = []
+ if not obj or len(obj.keys()) == 1:
+ return commands
+ commands.append("interface " + obj["name"])
+ if "transmit" in obj:
+ commands.append("lldp transmit")
+ if "receive" in obj:
+ commands.append("lldp receive")
+ if "management_address" in obj:
+ commands.append(
+ "no lldp tlv-set management-address "
+ + obj["management_address"]
+ )
+ if "vlan" in obj:
+ commands.append("no lldp tlv-set vlan " + str(obj["vlan"]))
+
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospf_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospf_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospf_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospf_interfaces/ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospf_interfaces/ospf_interfaces.py
new file mode 100644
index 00000000..10fd6a54
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospf_interfaces/ospf_interfaces.py
@@ -0,0 +1,206 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The nxos_ospf_interfaces config file.
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to its desired end-state is
+created.
+"""
+
+from copy import deepcopy
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.rm_templates.ospf_interfaces import (
+ Ospf_interfacesTemplate,
+)
+
+
+class Ospf_interfaces(ResourceModule):
+ """
+ The nxos_ospf_interfaces config class
+ """
+
+ def __init__(self, module):
+ super(Ospf_interfaces, self).__init__(
+ empty_fact_val=[],
+ facts_module=Facts(module),
+ module=module,
+ resource="ospf_interfaces",
+ tmplt=Ospf_interfacesTemplate(),
+ )
+ self.parsers = [
+ "authentication",
+ "authentication_key",
+ "message_digest_key",
+ "cost",
+ "dead_interval",
+ "hello_interval",
+ "instance",
+ "mtu_ignore",
+ "network",
+ "passive_interface",
+ "priority",
+ "retransmit_interval",
+ "shutdown",
+ "transmit_delay",
+ ]
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ if self.state not in ["parsed", "gathered"]:
+ self.generate_commands()
+ self.run_commands()
+ return self.result
+
+ def generate_commands(self):
+ """ Generate configuration commands to send based on
+ want, have and desired state.
+ """
+ wantd = {entry["name"]: entry for entry in self.want}
+ haved = {entry["name"]: entry for entry in self.have}
+
+ # turn all lists of dicts into dicts prior to merge
+ for entry in wantd, haved:
+ self._list_to_dict(entry)
+
+ # if state is merged, merge want onto have and then compare
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, empty out wantd and set haved to wantd
+ if self.state == "deleted":
+ haved = {
+ k: v for k, v in iteritems(haved) if k in wantd or not wantd
+ }
+ wantd = {}
+
+ # remove superfluous config for overridden and deleted
+ if self.state in ["overridden", "deleted"]:
+ for k, have in iteritems(haved):
+ if k not in wantd:
+ self._compare(want={}, have=have)
+
+ for k, want in iteritems(wantd):
+ self._compare(want=want, have=haved.pop(k, {}))
+
+ def _compare(self, want, have):
+ """Leverages the base class `compare()` method and
+ populates the list of commands to be run by comparing
+ the `want` and `have` data with the `parsers` defined
+ for the Ospf_interfaces network resource.
+ """
+ begin = len(self.commands)
+ self._compare_ospf_interfaces(want, have)
+ if len(self.commands) != begin:
+ self.commands.insert(
+ begin, self._tmplt.render(want or have, "interface", False)
+ )
+
+ def _compare_ospf_interfaces(self, want, have):
+ waf = want.get("address_family", {})
+ haf = have.get("address_family", {})
+
+ for afi in ("ipv4", "ipv6"):
+ witem = waf.pop(afi, {})
+ hitem = haf.pop(afi, {})
+
+ # this key needs to be compared separately and
+ # popped from `authentication` dict to
+ # preserve idempotence for other keys in this dict
+ self.compare(["authentication.key_chain"], want=witem, have=hitem)
+ witem.get("authentication", {}).pop("key_chain", None)
+ hitem.get("authentication", {}).pop("key_chain", None)
+
+ self.compare(parsers=self.parsers, want=witem, have=hitem)
+
+ # compare top-level `multi_areas` config
+ for area in witem.get("multi_areas", []):
+ if area not in hitem.get("multi_areas", []):
+ self.addcmd(
+ {"afi": afi, "area": area}, "multi_areas", negate=False
+ )
+ # remove superfluous top-level `multi_areas` config
+ for area in hitem.get("multi_areas", []):
+ if area not in witem.get("multi_areas", []):
+ self.addcmd(
+ {"afi": afi, "area": area}, "multi_areas", negate=True
+ )
+
+ # compare config->address_family->processes
+ self._compare_processes(
+ afi, witem.get("processes", {}), hitem.get("processes", {})
+ )
+
+ def _compare_processes(self, afi, want, have):
+ # add and update config->address_family->processes
+
+ for w_id, wproc in want.items():
+ hproc = have.pop(w_id, {})
+ hproc["afi"] = wproc["afi"] = afi
+
+ # compare config->address_family->processes->area
+ self.compare(["area"], wproc, hproc)
+
+ # compare config->address_family->processes->multi_areas
+ marea_dict = {"afi": afi, "process_id": wproc["process_id"]}
+ for area in wproc.get("multi_areas", []):
+ if area not in hproc.get("multi_areas", []):
+ marea_dict["area"] = area
+ self.addcmd(
+ marea_dict, "processes_multi_areas", negate=False
+ )
+ # remove superfluous processes->multi_areas config
+ for area in hproc.get("multi_areas", []):
+ if area not in wproc.get("multi_areas", []):
+ marea_dict["area"] = area
+ self.addcmd(
+ marea_dict, "processes_multi_areas", negate=True
+ )
+
+ # remove superflous config->address_family->processes
+ for hproc in have.values():
+ hproc["afi"] = afi
+
+ # remove config->address_family->processes->area
+ self.addcmd(hproc, "area", negate=True)
+
+ # remove superfluous processes->multi_areas config
+ marea_dict = {"afi": afi, "process_id": hproc["process_id"]}
+ for area in hproc.get("multi_areas", []):
+ marea_dict["area"] = area
+ self.addcmd(marea_dict, "processes_multi_areas", negate=True)
+
+ def _list_to_dict(self, entry):
+ for item in entry.values():
+ for ag in item.get("address_family", []):
+ ag["processes"] = {
+ subentry["process_id"]: subentry
+ for subentry in ag.get("processes", [])
+ }
+ item["address_family"] = {
+ subentry["afi"]: subentry
+ for subentry in item.get("address_family", [])
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv2/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv2/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv2/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv2/ospfv2.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv2/ospfv2.py
new file mode 100644
index 00000000..6338317e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv2/ospfv2.py
@@ -0,0 +1,238 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The nxos_ospfv2 class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from copy import deepcopy
+from ansible.module_utils.six import iteritems
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.rm_templates.ospfv2 import (
+ Ospfv2Template,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ get_from_dict,
+)
+
+
+class Ospfv2(ResourceModule):
+ """
+ The nxos_ospfv2 class
+ """
+
+ def __init__(self, module):
+ super(Ospfv2, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="ospfv2",
+ tmplt=Ospfv2Template(),
+ )
+ self.parsers = [
+ "router_id",
+ "auto_cost",
+ "graceful_restart.set",
+ "graceful_restart.helper_disable",
+ "isolate",
+ "log_adjacency_changes",
+ "max_lsa",
+ "mpls.traffic_eng.router_id",
+ "mpls.traffic_eng.multicast_intact",
+ "name_lookup",
+ "passive_interface.default",
+ "rfc1583compatibility",
+ "shutdown",
+ "default_information.originate",
+ "default_metric",
+ "distance",
+ "table_map",
+ "timers.lsa_arrival",
+ "timers.lsa_group_pacing",
+ "timers.throttle.lsa",
+ "timers.throttle.spf",
+ "maximum_paths",
+ "max_metric",
+ "down_bit_ignore",
+ "capability.vrf_lite",
+ "bfd",
+ ]
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ if self.state not in ["parsed", "gathered"]:
+ self.gen_config()
+ self.run_commands()
+ return self.result
+
+ def gen_config(self):
+ """ Select the appropriate function based on the state provided
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ wantd = {
+ (entry["process_id"]): entry
+ for entry in self.want.get("processes", [])
+ }
+ haved = {
+ (entry["process_id"]): entry
+ for entry in self.have.get("processes", [])
+ }
+
+ # turn all lists of dicts into dicts prior to merge
+ for entry in wantd, haved:
+ self._ospf_list_to_dict(entry)
+
+ # if state is merged, merge want onto have and then compare
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, empty out wantd and set haved to wantd
+ if self.state == "deleted":
+ haved = {
+ k: v for k, v in iteritems(haved) if k in wantd or not wantd
+ }
+ wantd = {}
+
+ # if state is overridden, first remove processes that are in have but not in want
+ if self.state in ["overridden", "deleted"]:
+ for k, have in iteritems(haved):
+ if k not in wantd:
+ self.addcmd(have, "process_id", True)
+
+ for k, want in iteritems(wantd):
+ self._compare(want=want, have=haved.pop(k, {}))
+
+ def _compare(self, want, have):
+ begin = len(self.commands)
+ self.compare(self.parsers, want=want, have=have)
+ self._compare_lists(want=want, have=have)
+ self._areas_compare(want=want, have=have)
+ self._vrfs_compare(want=want, have=have)
+
+ if len(self.commands) != begin or (not have and want):
+ self.commands.insert(
+ begin,
+ self._tmplt.render(
+ want or have,
+ "vrf"
+ if "vrf" in (want.keys() or have.keys())
+ else "process_id",
+ False,
+ ),
+ )
+
+ def _areas_compare(self, want, have):
+ wareas = want.get("areas", {})
+ hareas = have.get("areas", {})
+ for name, entry in iteritems(wareas):
+ self._area_compare(want=entry, have=hareas.pop(name, {}))
+ for name, entry in iteritems(hareas):
+ self._area_compare(want={}, have=entry)
+
+ def _area_compare(self, want, have):
+ parsers = [
+ "area.default_cost",
+ "area.authentication",
+ "area.nssa",
+ "area.nssa.translate",
+ "area.stub",
+ ]
+ self.compare(parsers=parsers, want=want, have=have)
+ self._area_compare_lists(want=want, have=have)
+
+ def _area_compare_lists(self, want, have):
+ for attrib in ["filter_list", "ranges"]:
+ wdict = want.get(attrib, {})
+ hdict = have.get(attrib, {})
+ for key, entry in iteritems(wdict):
+ if entry != hdict.pop(key, {}):
+ entry["area_id"] = want["area_id"]
+ self.addcmd(entry, "area.{0}".format(attrib), False)
+ # remove remaining items in have for replaced
+ for entry in hdict.values():
+ entry["area_id"] = have["area_id"]
+ self.addcmd(entry, "area.{0}".format(attrib), True)
+
+ def _compare_lists(self, want, have):
+ for attrib in [
+ "summary_address",
+ "redistribute",
+ "mpls.traffic_eng.areas",
+ ]:
+ wdict = get_from_dict(want, attrib) or {}
+ hdict = get_from_dict(have, attrib) or {}
+
+ for key, entry in iteritems(wdict):
+ if entry != hdict.pop(key, {}):
+ self.addcmd(entry, attrib, False)
+ # remove remaining items in have for replaced
+ for entry in hdict.values():
+ self.addcmd(entry, attrib, True)
+
+ def _vrfs_compare(self, want, have):
+ wvrfs = want.get("vrfs", {})
+ hvrfs = have.get("vrfs", {})
+ for name, entry in iteritems(wvrfs):
+ self._compare(want=entry, have=hvrfs.pop(name, {}))
+ # remove remaining items in have for replaced
+ for name, entry in iteritems(hvrfs):
+ self.addcmd(entry, "vrf", True)
+
+ def _ospf_list_to_dict(self, entry):
+ for _pid, proc in iteritems(entry):
+ for area in proc.get("areas", []):
+ area["ranges"] = {
+ entry["prefix"]: entry for entry in area.get("ranges", [])
+ }
+ area["filter_list"] = {
+ entry["direction"]: entry
+ for entry in area.get("filter_list", [])
+ }
+ mpls_areas = {
+ entry["area_id"]: entry
+ for entry in proc.get("mpls", {})
+ .get("traffic_eng", {})
+ .get("areas", [])
+ }
+ if mpls_areas:
+ proc["mpls"]["traffic_eng"]["areas"] = mpls_areas
+ proc["areas"] = {
+ entry["area_id"]: entry for entry in proc.get("areas", [])
+ }
+ proc["summary_address"] = {
+ entry["prefix"]: entry
+ for entry in proc.get("summary_address", [])
+ }
+ proc["redistribute"] = {
+ (entry.get("id"), entry["protocol"]): entry
+ for entry in proc.get("redistribute", [])
+ }
+ if "vrfs" in proc:
+ proc["vrfs"] = {
+ entry["vrf"]: entry for entry in proc.get("vrfs", [])
+ }
+ self._ospf_list_to_dict(proc["vrfs"])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv3/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv3/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv3/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv3/ospfv3.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv3/ospfv3.py
new file mode 100644
index 00000000..648332b9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/ospfv3/ospfv3.py
@@ -0,0 +1,253 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The nxos_ospfv3 config file.
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to its desired end-state is
+created.
+"""
+
+from copy import deepcopy
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_merge,
+ get_from_dict,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module import (
+ ResourceModule,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.rm_templates.ospfv3 import (
+ Ospfv3Template,
+)
+
+
+class Ospfv3(ResourceModule):
+ """
+ The nxos_ospfv3 config class
+ """
+
+ def __init__(self, module):
+ super(Ospfv3, self).__init__(
+ empty_fact_val={},
+ facts_module=Facts(module),
+ module=module,
+ resource="ospfv3",
+ tmplt=Ospfv3Template(),
+ )
+ self.parsers = [
+ "auto_cost",
+ "flush_routes",
+ "graceful_restart.set",
+ "graceful_restart.helper_disable",
+ "graceful_restart.grace_period",
+ "graceful_restart.planned_only",
+ "isolate",
+ "log_adjacency_changes",
+ "max_lsa",
+ "max_metric",
+ "name_lookup",
+ "passive_interface.default",
+ "router_id",
+ "shutdown",
+ "timers.lsa_arrival",
+ "timers.lsa_group_pacing",
+ "timers.throttle.lsa",
+ ]
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ if self.state not in ["parsed", "gathered"]:
+ self.generate_commands()
+ self.run_commands()
+ return self.result
+
+ def generate_commands(self):
+ """ Generate configuration commands to send based on
+ want, have and desired state.
+ """
+ wantd = {
+ (entry["process_id"]): entry
+ for entry in self.want.get("processes", [])
+ }
+ haved = {
+ (entry["process_id"]): entry
+ for entry in self.have.get("processes", [])
+ }
+
+ # turn all lists of dicts into dicts prior to merge
+ for entry in wantd, haved:
+ self._ospfv3_list_to_dict(entry)
+
+ # if state is merged, merge want onto have and then compare
+ if self.state == "merged":
+ wantd = dict_merge(haved, wantd)
+
+ # if state is deleted, empty out wantd and set haved to wantd
+ if self.state == "deleted":
+ haved = {
+ k: v for k, v in iteritems(haved) if k in wantd or not wantd
+ }
+ wantd = {}
+
+ # if state is overridden, first remove processes that are in have but not in want
+ if self.state in ["overridden", "deleted"]:
+ for k, have in iteritems(haved):
+ if k not in wantd:
+ self.addcmd(have, "process_id", True)
+
+ for k, want in iteritems(wantd):
+ self._compare(want=want, have=haved.pop(k, {}))
+
+ def _compare(self, want, have):
+ """Leverages the base class `compare()` method and
+ populates the list of commands to be run by comparing
+ the `want` and `have` data with the `parsers` defined
+ for the Ospfv3 network resource.
+ """
+ begin = len(self.commands)
+ self.compare(parsers=self.parsers, want=want, have=have)
+ self._areas_compare(want=want, have=have)
+ self._vrfs_compare(want=want, have=have)
+ self._af_compare(want=want, have=have)
+
+ if len(self.commands) != begin or (not have and want):
+ self.commands.insert(
+ begin,
+ self._tmplt.render(
+ want or have,
+ "vrf"
+ if "vrf" in (want.keys() or have.keys())
+ else "process_id",
+ False,
+ ),
+ )
+
+ def _areas_compare(self, want, have):
+ wareas = want.get("areas", {})
+ hareas = have.get("areas", {})
+ for name, entry in iteritems(wareas):
+ self._area_compare(want=entry, have=hareas.pop(name, {}))
+ for name, entry in iteritems(hareas):
+ self._area_compare(want={}, have=entry)
+
+ def _area_compare(self, want, have):
+ parsers = ["area.nssa", "area.nssa.translate", "area.stub"]
+ self.compare(parsers=parsers, want=want, have=have)
+
+ def _vrfs_compare(self, want, have):
+ wvrfs = want.get("vrfs", {})
+ hvrfs = have.get("vrfs", {})
+ for name, entry in iteritems(wvrfs):
+ self._compare(want=entry, have=hvrfs.pop(name, {}))
+ # remove remaining items in have for replaced
+ for name, entry in iteritems(hvrfs):
+ self.addcmd(entry, "vrf", True)
+
+ def _af_compare(self, want, have):
+ parsers = [
+ "default_information.originate",
+ "distance",
+ "maximum_paths",
+ "table_map",
+ "timers.throttle.spf",
+ ]
+ waf = want.get("address_family", {})
+ haf = have.get("address_family", {})
+
+ cmd_ptr = len(self.commands)
+
+ self._af_areas_compare(want=waf, have=haf)
+ self._af_compare_lists(want=waf, have=haf)
+ self.compare(parsers=parsers, want=waf, have=haf)
+
+ cmd_ptr_nxt = len(self.commands)
+ if cmd_ptr < cmd_ptr_nxt:
+ self.commands.insert(cmd_ptr, "address-family ipv6 unicast")
+
+ def _af_areas_compare(self, want, have):
+ wareas = want.get("areas", {})
+ hareas = have.get("areas", {})
+ for name, entry in iteritems(wareas):
+ self._af_area_compare(want=entry, have=hareas.pop(name, {}))
+ for name, entry in iteritems(hareas):
+ self._af_area_compare(want={}, have=entry)
+
+ def _af_area_compare(self, want, have):
+ self.compare(parsers=["area.default_cost"], want=want, have=have)
+ self._af_area_compare_lists(want=want, have=have)
+
+ def _af_area_compare_lists(self, want, have):
+ for attrib in ["filter_list", "ranges"]:
+ wdict = want.get(attrib, {})
+ hdict = have.get(attrib, {})
+ for key, entry in iteritems(wdict):
+ if entry != hdict.pop(key, {}):
+ entry["area_id"] = want["area_id"]
+ self.addcmd(entry, "area.{0}".format(attrib), False)
+ # remove remaining items in have for replaced
+ for entry in hdict.values():
+ entry["area_id"] = have["area_id"]
+ self.addcmd(entry, "area.{0}".format(attrib), True)
+
+ def _af_compare_lists(self, want, have):
+ for attrib in ["summary_address", "redistribute"]:
+ wdict = get_from_dict(want, attrib) or {}
+ hdict = get_from_dict(have, attrib) or {}
+
+ for key, entry in iteritems(wdict):
+ if entry != hdict.pop(key, {}):
+ self.addcmd(entry, attrib, False)
+ # remove remaining items in have for replaced
+ for entry in hdict.values():
+ self.addcmd(entry, attrib, True)
+
+ def _ospfv3_list_to_dict(self, entry):
+ for _pid, proc in iteritems(entry):
+ proc["areas"] = {
+ entry["area_id"]: entry for entry in proc.get("areas", [])
+ }
+ af = proc.get("address_family")
+ if af:
+ for area in af.get("areas", []):
+ area["ranges"] = {
+ entry["prefix"]: entry
+ for entry in area.get("ranges", [])
+ }
+ area["filter_list"] = {
+ entry["direction"]: entry
+ for entry in area.get("filter_list", [])
+ }
+ af["areas"] = {
+ entry["area_id"]: entry for entry in af.get("areas", [])
+ }
+ af["summary_address"] = {
+ entry["prefix"]: entry
+ for entry in af.get("summary_address", [])
+ }
+ af["redistribute"] = {
+ (entry.get("id"), entry["protocol"]): entry
+ for entry in af.get("redistribute", [])
+ }
+ if "vrfs" in proc:
+ proc["vrfs"] = {
+ entry["vrf"]: entry for entry in proc.get("vrfs", [])
+ }
+ self._ospfv3_list_to_dict(proc["vrfs"])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/static_routes/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/static_routes/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/static_routes/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/static_routes/static_routes.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/static_routes/static_routes.py
new file mode 100644
index 00000000..a28b5699
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/static_routes/static_routes.py
@@ -0,0 +1,616 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_static_routes class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ remove_empties,
+ dict_diff,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from copy import deepcopy
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ flatten_dict,
+ search_obj_in_list,
+ get_interface_type,
+ normalize_interface,
+)
+
+
+class Static_routes(ConfigBase):
+ """
+ The nxos_xstatic_routes class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["static_routes"]
+
+ def __init__(self, module):
+ super(Static_routes, self).__init__(module)
+
+ def get_static_routes_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ static_routes_facts = facts["ansible_network_resources"].get(
+ "static_routes"
+ )
+ if not static_routes_facts:
+ return []
+
+ return static_routes_facts
+
+ def edit_config(self, commands):
+ """Wrapper method for `_connection.edit_config()`
+ This exists solely to allow the unit test framework to mock device connection calls.
+ """
+ return self._connection.edit_config(commands)
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ warnings = list()
+ commands = list()
+ state = self._module.params["state"]
+ action_states = ["merged", "replaced", "deleted", "overridden"]
+
+ if state == "gathered":
+ result["gathered"] = self.get_static_routes_facts()
+ elif state == "rendered":
+ result["rendered"] = self.set_config({})
+ # no need to fetch facts for rendered
+ elif state == "parsed":
+ result["parsed"] = self.set_config({})
+ # no need to fetch facts for parsed
+ else:
+ existing_static_routes_facts = self.get_static_routes_facts()
+ commands.extend(self.set_config(existing_static_routes_facts))
+ if commands and state in action_states:
+ if not self._module.check_mode:
+ self._connection.edit_config(commands)
+ result["changed"] = True
+ result["before"] = existing_static_routes_facts
+ result["commands"] = commands
+
+ changed_static_routes_facts = self.get_static_routes_facts()
+ if result["changed"]:
+ result["after"] = changed_static_routes_facts
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_static_routes_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params["config"]
+ want = []
+ if config:
+ for w in config:
+ want.append(remove_empties(w))
+ have = existing_static_routes_facts
+ want = self.add_default_vrf(deepcopy(want))
+ have = self.add_default_vrf(deepcopy(have))
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ commands = []
+ if state == "overridden":
+ commands = self._state_overridden(want, have)
+ elif state == "deleted":
+ commands = self._state_deleted(want, have)
+ elif state == "rendered":
+ commands = self._state_rendered(want, have=[])
+ elif state == "parsed":
+ want = self._module.params["running_config"]
+ commands = self._state_parsed(want)
+ else:
+ for w in want:
+ if state == "merged":
+ commands.extend(self._state_merged(w, have))
+ elif state == "replaced":
+ commands.extend(self._state_replaced(w, have))
+ return commands
+
+ def _state_parsed(self, want):
+ return self.get_static_routes_facts(want)
+
+ def _state_rendered(self, want, have):
+ commands = []
+ for w in want:
+ commands.extend(self.set_commands(w, {}))
+ return commands
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ delete_commands = []
+ state = self._module.params["state"]
+ merged_commands = []
+ obj_in_have = search_obj_in_list(want["vrf"], have, "vrf")
+ # in replaced, we check if whatever in have is in want, unlike merged. This is because we need to apply deleted on have config
+ if obj_in_have and obj_in_have != {"vrf": "default"}:
+ want_afi_list = []
+ if "address_families" in want.keys():
+ want_afi_list = [w["afi"] for w in want["address_families"]]
+ if len(want_afi_list) > 0:
+ for h in obj_in_have["address_families"]:
+ if h["afi"] in want_afi_list:
+ want_afi = search_obj_in_list(
+ h["afi"], want["address_families"], "afi"
+ )
+ want_dest_list = []
+ if "routes" in want_afi.keys():
+ want_dest_list = [
+ w["dest"] for w in want_afi["routes"]
+ ]
+ if len(want_dest_list) > 0:
+ for ro in h["routes"]:
+ if ro["dest"] in want_dest_list:
+ want_dest = search_obj_in_list(
+ ro["dest"], want_afi["routes"], "dest"
+ )
+ want_next_hops = []
+ if "next_hops" in want_dest.keys():
+ want_next_hops = [
+ nh for nh in want_dest["next_hops"]
+ ]
+ if len(want_next_hops) > 0:
+ for next_hop in ro["next_hops"]:
+ if next_hop not in want_next_hops:
+ # have's next hop not in want, so delete it
+ delete_dict = {
+ "vrf": obj_in_have["vrf"],
+ "address_families": [
+ {
+ "afi": h["afi"],
+ "routes": [
+ {
+ "dest": ro[
+ "dest"
+ ],
+ "next_hops": [
+ next_hop
+ ],
+ }
+ ],
+ }
+ ],
+ }
+ delete_commands.extend(
+ self.del_commands(
+ [delete_dict]
+ )
+ )
+ else:
+ # want has no next_hops, so delete all next_hops under that dest
+ if state == "overridden":
+ delete_dict = {
+ "vrf": obj_in_have["vrf"],
+ "address_families": [
+ {
+ "afi": h["afi"],
+ "routes": [
+ {
+ "dest": ro[
+ "dest"
+ ],
+ "next_hops": ro[
+ "next_hops"
+ ],
+ }
+ ],
+ }
+ ],
+ }
+ delete_commands.extend(
+ self.del_commands(
+ [delete_dict]
+ )
+ )
+ else:
+ if state == "overridden":
+ delete_dict = {
+ "vrf": obj_in_have["vrf"],
+ "address_families": [
+ {
+ "afi": h["afi"],
+ "routes": [
+ {
+ "dest": ro["dest"],
+ "next_hops": ro[
+ "next_hops"
+ ],
+ }
+ ],
+ }
+ ],
+ }
+ delete_commands.extend(
+ self.del_commands([delete_dict])
+ )
+
+ else:
+ if (
+ state == "overridden"
+ ): # want has no 'routes' key, so delete all routes under that afi
+ if "routes" in h.keys():
+ delete_dict = {
+ "vrf": obj_in_have["vrf"],
+ "address_families": [
+ {
+ "afi": h["afi"],
+ "routes": h["routes"],
+ }
+ ],
+ }
+ delete_commands.extend(
+ self.del_commands([delete_dict])
+ )
+ else:
+ if (
+ state == "overridden"
+ ): # want has 'vrf' key only. So delete all address families in it
+ delete_commands.extend(
+ self.del_commands(
+ [
+ {
+ "address_families": [
+ h
+ for h in obj_in_have[
+ "address_families"
+ ]
+ ],
+ "vrf": obj_in_have["vrf"],
+ }
+ ]
+ )
+ )
+ final_delete_commands = []
+ for d in delete_commands:
+ if d not in final_delete_commands:
+ final_delete_commands.append(d)
+ # if there are two afis, 'vrf context..' is added twice fom del_commands. The above code removes the redundant 'vrf context ..'
+ merged_commands = self.set_commands(want, have)
+ if merged_commands:
+ cmds = set(final_delete_commands).intersection(
+ set(merged_commands)
+ )
+ for c in cmds:
+ merged_commands.remove(c)
+
+ # set_commands adds a 'vrf context..' line. The above code removes the redundant 'vrf context ..'
+ commands.extend(final_delete_commands)
+ commands.extend(merged_commands)
+ return commands
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ want_vrfs = [w["vrf"] for w in want]
+ for h in have:
+ if h["vrf"] not in want_vrfs and h["vrf"] != "management":
+ commands.extend(self._state_deleted([h], have))
+ for w in want:
+ commands.extend(self._state_replaced(w, have))
+ return commands
+
+ def _state_merged(self, want, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ return self.set_commands(want, have)
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if want:
+ for w in want:
+ delete_dict = {}
+ obj_in_have = search_obj_in_list(w["vrf"], have, "vrf")
+ if obj_in_have:
+ if "address_families" in w.keys():
+ o1 = obj_in_have["address_families"]
+ afi_list = [o["afi"] for o in o1] # have's afi list
+ for w1 in w["address_families"]:
+ if w1["afi"] in afi_list:
+ o2 = search_obj_in_list(w1["afi"], o1, "afi")
+ state = self._module.params["state"]
+ if state != "deleted":
+ # Deleted scope is till afi only. Part below is for use by overridden state.
+ if "routes" in w1.keys():
+ for w2 in w1["routes"]:
+ o3 = search_obj_in_list(
+ w2["dest"],
+ o2["routes"],
+ "dest",
+ )
+ hops = []
+ if "next_hops" in w2.keys():
+ for nh in w2["next_hops"]:
+ if nh in o3["next_hops"]:
+ hops.append(nh)
+ else:
+ # if next hops not given
+ hops = o3["next_hops"]
+
+ delete_dict = {
+ "vrf": obj_in_have["vrf"],
+ "address_families": [
+ {
+ "afi": w1["afi"],
+ "routes": [
+ {
+ "dest": w2[
+ "dest"
+ ],
+ "next_hops": hops,
+ }
+ ],
+ }
+ ],
+ }
+ commands.extend(
+ self.del_commands(
+ [delete_dict]
+ )
+ )
+ else:
+ # case when only afi given for delete
+ delete_dict = {
+ "vrf": obj_in_have["vrf"],
+ "address_families": [
+ {
+ "afi": o2["afi"],
+ "routes": o2["routes"],
+ }
+ ],
+ }
+ commands.extend(
+ self.del_commands([delete_dict])
+ )
+ else:
+ commands.extend(
+ self.del_commands(
+ [
+ {
+ "vrf": obj_in_have["vrf"],
+ "address_families": [o2],
+ }
+ ]
+ )
+ )
+ else:
+ # only vrf given to delete
+ commands.extend(self.del_commands([obj_in_have]))
+ else:
+ if have:
+ # delete everything
+ del_have = []
+ for h in have:
+ if h["vrf"] != "management": # protect management vrf
+ del_have.append(h)
+ commands = self.del_commands(del_have)
+
+ final_delete_commands = []
+ # del_commands might add 'vrf context..' twice for two routes in the same vrf. This removes it
+ for c in commands:
+ if c not in final_delete_commands:
+ final_delete_commands.append(c)
+ return final_delete_commands
+
+ def del_commands(self, have):
+ commands = []
+ for h in have:
+ if h != {"vrf": "default"}:
+ vrf = h["vrf"]
+ commands.append("vrf context " + vrf)
+ for af in h["address_families"]:
+ for route in af["routes"]:
+ for next_hop in route["next_hops"]:
+ command = self.del_next_hop(af, route, next_hop)
+ commands.append(command.strip())
+ return commands
+
+ def del_next_hop(self, af, route, next_hop):
+ command = ""
+ if af["afi"] == "ipv4":
+ command = (
+ "no ip route "
+ + route["dest"]
+ + " "
+ + self.add_commands(next_hop)
+ )
+ else:
+ command = (
+ "no ipv6 route "
+ + route["dest"]
+ + " "
+ + self.add_commands(next_hop)
+ )
+ return command
+
+ def add_commands(self, want):
+ command = ""
+ params = want.keys()
+ pref = vrf = ip = intf = name = tag = track = ""
+ if "admin_distance" in params:
+ pref = str(want["admin_distance"]) + " "
+ if "track" in params:
+ track = "track " + str(want["track"]) + " "
+ if "dest_vrf" in params:
+ vrf = "vrf " + str(want["dest_vrf"]) + " "
+ if "forward_router_address" in params:
+ ip = want["forward_router_address"] + " "
+ if "interface" in params:
+ intf = normalize_interface(want["interface"]) + " "
+ if "null0" in intf:
+ ip = ""
+ intf = "null0 "
+ if "route_name" in params:
+ name = "name " + str(want["route_name"]) + " "
+ if "tag" in params:
+ tag = "tag " + str(want["tag"]) + " "
+ command = intf + ip + vrf + name + tag + track + pref
+ if intf != "Null0 " and ip == "":
+ self._module.fail_json(msg="forward_router_address error")
+ return command.strip()
+
+ def set_commands(self, want, have):
+ commands = []
+ h1 = h2 = h3 = {}
+ want = remove_empties(want)
+ vrf_list = []
+ if have:
+ vrf_list = [h["vrf"] for h in have]
+ if want["vrf"] in vrf_list and have != [{"vrf": "default"}]:
+ for x in have:
+ if x["vrf"] == want["vrf"]:
+ h1 = x # this has the 'have' dict with same vrf as want
+ if "address_families" in h1.keys():
+ afi_list = [h["afi"] for h in h1["address_families"]]
+ if "address_families" in want.keys():
+ for af in want["address_families"]:
+ if af["afi"] in afi_list:
+ for x in h1["address_families"]:
+ if x["afi"] == af["afi"]:
+ h2 = (
+ x
+ ) # this has the have dict with same vrf and afi as want
+ dest_list = [h["dest"] for h in h2["routes"]]
+ if "routes" in af.keys():
+ for ro in af["routes"]:
+ if ro["dest"] in dest_list:
+ for x in h2["routes"]:
+ if x["dest"] == ro["dest"]:
+ h3 = (
+ x
+ ) # this has the have dict with same vrf, afi and dest as want
+ next_hop_list = [
+ h for h in h3["next_hops"]
+ ]
+ if "next_hops" in ro.keys():
+ for nh in ro["next_hops"]:
+ if "interface" in nh.keys():
+ nh[
+ "interface"
+ ] = normalize_interface(
+ nh["interface"]
+ )
+ if nh not in next_hop_list:
+ # no match for next hop in have
+ commands = self.set_next_hop(
+ want,
+ h2,
+ nh,
+ ro,
+ commands,
+ )
+ vrf_list.append(
+ want["vrf"]
+ )
+ else:
+ # no match for dest
+ if "next_hops" in ro.keys():
+ for nh in ro["next_hops"]:
+ commands = self.set_next_hop(
+ want, h2, nh, ro, commands
+ )
+ else:
+ # no match for afi
+ if "routes" in af.keys():
+ for ro in af["routes"]:
+ for nh in ro["next_hops"]:
+ commands = self.set_next_hop(
+ want, af, nh, ro, commands
+ )
+ else:
+ # no match for vrf
+ vrf_list.append(want["vrf"])
+ for af in want["address_families"]:
+ for ro in af["routes"]:
+ for nh in ro["next_hops"]:
+ commands = self.set_next_hop(
+ want, af, nh, ro, commands
+ )
+ return commands
+
+ def set_next_hop(self, want, h2, nh, ro, commands):
+ vrf = want["vrf"]
+ if h2["afi"] == "ipv4":
+ com = "ip route " + ro["dest"] + " " + self.add_commands(nh)
+ else:
+ com = "ipv6 route " + ro["dest"] + " " + self.add_commands(nh)
+ commands.append(com.strip())
+ string = "vrf context " + str(vrf)
+ if string not in commands:
+ commands.insert(0, string)
+ return commands
+
+ def add_default_vrf(self, dictionary):
+ """
+ This method is used to add 'default' vrf to the facts collected as global/default vrf
+ is not shown in facts. vrf key exists for all vrfs except global.
+ """
+ for d in dictionary:
+ if "vrf" not in d.keys():
+ d.update({"vrf": "default"})
+ return dictionary
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/telemetry/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/telemetry/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/telemetry/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/telemetry/telemetry.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/telemetry/telemetry.py
new file mode 100644
index 00000000..b1a5a0b2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/telemetry/telemetry.py
@@ -0,0 +1,665 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_telemetry class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.cmdref.telemetry.telemetry import (
+ TMS_GLOBAL,
+ TMS_DESTGROUP,
+ TMS_SENSORGROUP,
+ TMS_SUBSCRIPTION,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.telemetry.telemetry import (
+ normalize_data,
+ remove_duplicate_context,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.telemetry.telemetry import (
+ valiate_input,
+ get_setval_path,
+ massage_data,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.telemetry.telemetry import (
+ get_module_params_subsection,
+ remove_duplicate_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ normalize_interface,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ NxosCmdRef,
+)
+
+
+class Telemetry(ConfigBase):
+ """
+ The nxos_telemetry class
+ """
+
+ gather_subset = ["!all", "!min"]
+
+ gather_network_resources = ["telemetry"]
+
+ def __init__(self, module):
+ super(Telemetry, self).__init__(module)
+
+ def get_telemetry_facts(self):
+ """ Get the 'facts' (the current configuration)
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources
+ )
+ telemetry_facts = facts["ansible_network_resources"].get("telemetry")
+ if not telemetry_facts:
+ return {}
+ return telemetry_facts
+
+ def edit_config(self, commands):
+ return self._connection.edit_config(commands)
+
+ def execute_module(self):
+ """ Execute the module
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = list()
+ warnings = list()
+
+ state = self._module.params["state"]
+ if "overridden" in state:
+ self._module.fail_json(
+ msg="State <overridden> is invalid for this module."
+ )
+ # When state is 'deleted', the module_params should not contain data
+ # under the 'config' key
+ if "deleted" in state and self._module.params.get("config"):
+ self._module.fail_json(
+ msg="Remove config key from playbook when state is <deleted>"
+ )
+
+ if self._module.params["config"] is None:
+ self._module.params["config"] = {}
+ # Normalize interface name.
+ int = self._module.params["config"].get("source_interface")
+ if int:
+ self._module.params["config"][
+ "source_interface"
+ ] = normalize_interface(int)
+
+ existing_telemetry_facts = self.get_telemetry_facts()
+ commands.extend(self.set_config(existing_telemetry_facts))
+ if commands:
+ if not self._module.check_mode:
+ self.edit_config(commands)
+ # TODO: edit_config is only available for network_cli. Once we
+ # add support for httpapi, we will need to switch to load_config
+ # or add support to httpapi for edit_config
+ #
+ # self._connection.load_config(commands)
+ result["changed"] = True
+ result["commands"] = commands
+
+ changed_telemetry_facts = self.get_telemetry_facts()
+
+ result["before"] = existing_telemetry_facts
+ if result["changed"]:
+ result["after"] = changed_telemetry_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_tms_global_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ config = self._module.params["config"]
+ want = dict((k, v) for k, v in config.items() if v is not None)
+ have = existing_tms_global_facts
+ resp = self.set_state(want, have)
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+
+ # The deleted case is very simple since we purge all telemetry config
+ # and does not require any processing using NxosCmdRef objects.
+ if state == "deleted":
+ return self._state_deleted(want, have)
+ elif state == "replaced":
+ if want == have:
+ return []
+ return self._state_replaced(want, have)
+
+ # Save off module params
+ ALL_MP = self._module.params["config"]
+
+ cmd_ref = {}
+ cmd_ref["TMS_GLOBAL"] = {}
+ cmd_ref["TMS_DESTGROUP"] = {}
+ cmd_ref["TMS_SENSORGROUP"] = {}
+ cmd_ref["TMS_SUBSCRIPTION"] = {}
+
+ # Build Telemetry Global NxosCmdRef Object
+ cmd_ref["TMS_GLOBAL"]["ref"] = []
+ self._module.params["config"] = get_module_params_subsection(
+ ALL_MP, "TMS_GLOBAL"
+ )
+ cmd_ref["TMS_GLOBAL"]["ref"].append(
+ NxosCmdRef(self._module, TMS_GLOBAL)
+ )
+ ref = cmd_ref["TMS_GLOBAL"]["ref"][0]
+ ref.set_context()
+ ref.get_existing()
+ ref.get_playvals()
+ device_cache = ref.cache_existing
+
+ def build_cmdref_objects(td):
+ cmd_ref[td["type"]]["ref"] = []
+ saved_ids = []
+ if want.get(td["name"]):
+ for playvals in want[td["name"]]:
+ valiate_input(playvals, td["name"], self._module)
+ if playvals["id"] in saved_ids:
+ continue
+ saved_ids.append(playvals["id"])
+ resource_key = td["cmd"].format(playvals["id"])
+ # Only build the NxosCmdRef object for the td['name'] module parameters.
+ self._module.params[
+ "config"
+ ] = get_module_params_subsection(
+ ALL_MP, td["type"], playvals["id"]
+ )
+ cmd_ref[td["type"]]["ref"].append(
+ NxosCmdRef(self._module, td["obj"])
+ )
+ ref = cmd_ref[td["type"]]["ref"][-1]
+ ref.set_context([resource_key])
+ if td["type"] == "TMS_SENSORGROUP" and get_setval_path(
+ self._module
+ ):
+ # Sensor group path setting can contain optional values.
+ # Call get_setval_path helper function to process any
+ # optional setval keys.
+ ref._ref["path"]["setval"] = get_setval_path(
+ self._module
+ )
+ ref.get_existing(device_cache)
+ ref.get_playvals()
+ if td["type"] == "TMS_DESTGROUP":
+ normalize_data(ref)
+
+ # Build Telemetry Destination Group NxosCmdRef Objects
+ td = {
+ "name": "destination_groups",
+ "type": "TMS_DESTGROUP",
+ "obj": TMS_DESTGROUP,
+ "cmd": "destination-group {0}",
+ }
+ build_cmdref_objects(td)
+
+ # Build Telemetry Sensor Group NxosCmdRef Objects
+ td = {
+ "name": "sensor_groups",
+ "type": "TMS_SENSORGROUP",
+ "obj": TMS_SENSORGROUP,
+ "cmd": "sensor-group {0}",
+ }
+ build_cmdref_objects(td)
+
+ # Build Telemetry Subscription NxosCmdRef Objects
+ td = {
+ "name": "subscriptions",
+ "type": "TMS_SUBSCRIPTION",
+ "obj": TMS_SUBSCRIPTION,
+ "cmd": "subscription {0}",
+ }
+ build_cmdref_objects(td)
+
+ if state == "merged":
+ if want == have:
+ return []
+ commands = self._state_merged(cmd_ref)
+ return commands
+
+ @staticmethod
+ def _state_replaced(want, have):
+ """ The command generator when state is replaced
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ commands = []
+ massaged_have = massage_data(have)
+ massaged_want = massage_data(want)
+
+ ref = {}
+ ref["tms_global"] = NxosCmdRef([], TMS_GLOBAL, ref_only=True)
+ ref["tms_destgroup"] = NxosCmdRef([], TMS_DESTGROUP, ref_only=True)
+ ref["tms_sensorgroup"] = NxosCmdRef([], TMS_SENSORGROUP, ref_only=True)
+ ref["tms_subscription"] = NxosCmdRef(
+ [], TMS_SUBSCRIPTION, ref_only=True
+ )
+
+ # Order matters for state replaced.
+ # First remove all subscriptions, followed by sensor-groups and destination-groups.
+ # Second add all destination-groups, followed by sensor-groups and subscriptions
+ add = {
+ "TMS_GLOBAL": [],
+ "TMS_DESTGROUP": [],
+ "TMS_SENSORGROUP": [],
+ "TMS_SUBSCRIPTION": [],
+ }
+ delete = {
+ "TMS_DESTGROUP": [],
+ "TMS_SENSORGROUP": [],
+ "TMS_SUBSCRIPTION": [],
+ }
+
+ # Process Telemetry Global Want and Have Values
+ # Possible states:
+ # - want and have are (set) (equal: no action, not equal: replace with want)
+ # - want (set) have (not set) (add want)
+ # - want (not set) have (set) (delete have)
+ # - want (not set) have (not set) (no action)
+ # global_ctx = ref['tms_global']._ref['_template']['context']
+ # property_ctx = ref['tms_global']._ref['certificate'].get('context')
+ # setval = ref['tms_global']._ref['certificate']['setval']
+ #
+ all_global_properties = [
+ "certificate",
+ "compression",
+ "source_interface",
+ "vrf",
+ ]
+ dest_profile_properties = ["compression", "source_interface", "vrf"]
+ dest_profile_remote_commands = []
+ for property in all_global_properties:
+ cmd = None
+ global_ctx = ref["tms_global"]._ref["_template"]["context"]
+ property_ctx = ref["tms_global"]._ref[property].get("context")
+ setval = ref["tms_global"]._ref[property]["setval"]
+ kind = ref["tms_global"]._ref[property]["kind"]
+ if want.get(property) is not None:
+ if have.get(property) is not None:
+ if want.get(property) != have.get(property):
+ if kind == "dict":
+ cmd = [setval.format(**want.get(property))]
+ else:
+ cmd = [setval.format(want.get(property))]
+ elif have.get(property) is None:
+ if kind == "dict":
+ cmd = [setval.format(**want.get(property))]
+ else:
+ cmd = [setval.format(want.get(property))]
+ elif want.get(property) is None:
+ if have.get(property) is not None:
+ if kind == "dict":
+ cmd = ["no " + setval.format(**have.get(property))]
+ else:
+ cmd = ["no " + setval.format(have.get(property))]
+ if property in dest_profile_properties:
+ dest_profile_remote_commands.extend(cmd)
+
+ if cmd is not None:
+ ctx = global_ctx
+ if property_ctx is not None:
+ ctx.extend(property_ctx)
+ add["TMS_GLOBAL"].extend(ctx)
+ add["TMS_GLOBAL"].extend(cmd)
+
+ add["TMS_GLOBAL"] = remove_duplicate_commands(add["TMS_GLOBAL"])
+ # If all destination profile commands are being removed then just
+ # remove the config context instead.
+ if len(dest_profile_remote_commands) == 3:
+ for item in dest_profile_remote_commands:
+ add["TMS_GLOBAL"].remove(item)
+ add["TMS_GLOBAL"].remove("destination-profile")
+ add["TMS_GLOBAL"].extend(["no destination-profile"])
+
+ # Process Telemetry destination_group, sensor_group and subscription Want and Have Values
+ # Possible states:
+ # - want (not set) have (set) (delete have)
+ # - want and have are (set) (equal: no action, not equal: replace with want)
+ # - want (set) have (not set) (add want)
+ # - want (not set) have (not set) (no action)
+ tms_resources = [
+ "TMS_DESTGROUP",
+ "TMS_SENSORGROUP",
+ "TMS_SUBSCRIPTION",
+ ]
+ for resource in tms_resources:
+ if resource == "TMS_DESTGROUP":
+ name = "destination-group"
+ cmd_property = "destination"
+ global_ctx = ref["tms_destgroup"]._ref["_template"]["context"]
+ setval = ref["tms_destgroup"]._ref["destination"]["setval"]
+ want_resources = massaged_want.get("destination_groups")
+ have_resources = massaged_have.get("destination_groups")
+ if resource == "TMS_SENSORGROUP":
+ name = "sensor-group"
+ global_ctx = ref["tms_sensorgroup"]._ref["_template"][
+ "context"
+ ]
+ setval = {}
+ setval["data_source"] = ref["tms_sensorgroup"]._ref[
+ "data_source"
+ ]["setval"]
+ setval["path"] = ref["tms_sensorgroup"]._ref["path"]["setval"]
+ want_resources = massaged_want.get("sensor_groups")
+ have_resources = massaged_have.get("sensor_groups")
+ if resource == "TMS_SUBSCRIPTION":
+ name = "subscription"
+ global_ctx = ref["tms_subscription"]._ref["_template"][
+ "context"
+ ]
+ setval = {}
+ setval["destination_group"] = ref["tms_subscription"]._ref[
+ "destination_group"
+ ]["setval"]
+ setval["sensor_group"] = ref["tms_subscription"]._ref[
+ "sensor_group"
+ ]["setval"]
+ want_resources = massaged_want.get("subscriptions")
+ have_resources = massaged_have.get("subscriptions")
+
+ if not want_resources and have_resources:
+ # want not and have not set so delete have
+ for key in have_resources.keys():
+ remove_context = ["{0} {1} {2}".format("no", name, key)]
+ delete[resource].extend(global_ctx)
+ if remove_context[0] not in delete[resource]:
+ delete[resource].extend(remove_context)
+ else:
+ # want and have are set.
+ # process wants:
+ for want_key in want_resources.keys():
+ if want_key not in have_resources.keys():
+ # Want resource key not in have resource key so add it
+ property_ctx = ["{0} {1}".format(name, want_key)]
+ for item in want_resources[want_key]:
+ if resource == "TMS_DESTGROUP":
+ cmd = [setval.format(**item[cmd_property])]
+ add[resource].extend(global_ctx)
+ if property_ctx[0] not in add[resource]:
+ add[resource].extend(property_ctx)
+ add[resource].extend(cmd)
+ if resource == "TMS_SENSORGROUP":
+ cmd = {}
+ if item.get("data_source"):
+ cmd["data_source"] = [
+ setval["data_source"].format(
+ item["data_source"]
+ )
+ ]
+ if item.get("path"):
+ setval["path"] = get_setval_path(
+ item.get("path")
+ )
+ cmd["path"] = [
+ setval["path"].format(**item["path"])
+ ]
+ add[resource].extend(global_ctx)
+ if property_ctx[0] not in add[resource]:
+ add[resource].extend(property_ctx)
+ if cmd.get("data_source"):
+ add[resource].extend(cmd["data_source"])
+ if cmd.get("path"):
+ add[resource].extend(cmd["path"])
+ if resource == "TMS_SUBSCRIPTION":
+ cmd = {}
+ if item.get("destination_group"):
+ cmd["destination_group"] = [
+ setval["destination_group"].format(
+ item["destination_group"]
+ )
+ ]
+ if item.get("sensor_group"):
+ cmd["sensor_group"] = [
+ setval["sensor_group"].format(
+ **item["sensor_group"]
+ )
+ ]
+ add[resource].extend(global_ctx)
+ if property_ctx[0] not in add[resource]:
+ add[resource].extend(property_ctx)
+ if cmd.get("destination_group"):
+ add[resource].extend(
+ cmd["destination_group"]
+ )
+ if cmd.get("sensor_group"):
+ add[resource].extend(cmd["sensor_group"])
+
+ elif want_key in have_resources.keys():
+ # Want resource key exists in have resource keys but we need to
+ # inspect the individual items under the resource key
+ # for differences
+ for item in want_resources[want_key]:
+ if item not in have_resources[want_key]:
+ if item is None:
+ continue
+ # item wanted but does not exist so add it
+ property_ctx = [
+ "{0} {1}".format(name, want_key)
+ ]
+ if resource == "TMS_DESTGROUP":
+ cmd = [setval.format(**item[cmd_property])]
+ add[resource].extend(global_ctx)
+ if property_ctx[0] not in add[resource]:
+ add[resource].extend(property_ctx)
+ add[resource].extend(cmd)
+ if resource == "TMS_SENSORGROUP":
+ cmd = {}
+ if item.get("data_source"):
+ cmd["data_source"] = [
+ setval["data_source"].format(
+ item["data_source"]
+ )
+ ]
+ if item.get("path"):
+ setval["path"] = get_setval_path(
+ item.get("path")
+ )
+ cmd["path"] = [
+ setval["path"].format(
+ **item["path"]
+ )
+ ]
+ add[resource].extend(global_ctx)
+ if property_ctx[0] not in add[resource]:
+ add[resource].extend(property_ctx)
+ if cmd.get("data_source"):
+ add[resource].extend(
+ cmd["data_source"]
+ )
+ if cmd.get("path"):
+ add[resource].extend(cmd["path"])
+ if resource == "TMS_SUBSCRIPTION":
+ cmd = {}
+ if item.get("destination_group"):
+ cmd["destination_group"] = [
+ setval["destination_group"].format(
+ item["destination_group"]
+ )
+ ]
+ if item.get("sensor_group"):
+ cmd["sensor_group"] = [
+ setval["sensor_group"].format(
+ **item["sensor_group"]
+ )
+ ]
+ add[resource].extend(global_ctx)
+ if property_ctx[0] not in add[resource]:
+ add[resource].extend(property_ctx)
+ if cmd.get("destination_group"):
+ add[resource].extend(
+ cmd["destination_group"]
+ )
+ if cmd.get("sensor_group"):
+ add[resource].extend(
+ cmd["sensor_group"]
+ )
+
+ # process haves:
+ for have_key in have_resources.keys():
+ if have_key not in want_resources.keys():
+ # Want resource key is not in have resource keys so remove it
+ cmd = ["no " + "{0} {1}".format(name, have_key)]
+ delete[resource].extend(global_ctx)
+ delete[resource].extend(cmd)
+ elif have_key in want_resources.keys():
+ # Have resource key exists in want resource keys but we need to
+ # inspect the individual items under the resource key
+ # for differences
+ for item in have_resources[have_key]:
+ if item not in want_resources[have_key]:
+ if item is None:
+ continue
+ # have item not wanted so remove it
+ property_ctx = [
+ "{0} {1}".format(name, have_key)
+ ]
+ if resource == "TMS_DESTGROUP":
+ cmd = [
+ "no "
+ + setval.format(**item[cmd_property])
+ ]
+ delete[resource].extend(global_ctx)
+ if property_ctx[0] not in delete[resource]:
+ delete[resource].extend(property_ctx)
+ delete[resource].extend(cmd)
+ if resource == "TMS_SENSORGROUP":
+ cmd = {}
+ if item.get("data_source"):
+ cmd["data_source"] = [
+ "no "
+ + setval["data_source"].format(
+ item["data_source"]
+ )
+ ]
+ if item.get("path"):
+ setval["path"] = get_setval_path(
+ item.get("path")
+ )
+ cmd["path"] = [
+ "no "
+ + setval["path"].format(
+ **item["path"]
+ )
+ ]
+ delete[resource].extend(global_ctx)
+ if property_ctx[0] not in delete[resource]:
+ delete[resource].extend(property_ctx)
+ if cmd.get("data_source"):
+ delete[resource].extend(
+ cmd["data_source"]
+ )
+ if cmd.get("path"):
+ delete[resource].extend(cmd["path"])
+ if resource == "TMS_SUBSCRIPTION":
+ cmd = {}
+ if item.get("destination_group"):
+ cmd["destination_group"] = [
+ "no "
+ + setval[
+ "destination_group"
+ ].format(item["destination_group"])
+ ]
+ if item.get("sensor_group"):
+ cmd["sensor_group"] = [
+ "no "
+ + setval["sensor_group"].format(
+ **item["sensor_group"]
+ )
+ ]
+ delete[resource].extend(global_ctx)
+ if property_ctx[0] not in delete[resource]:
+ delete[resource].extend(property_ctx)
+ if cmd.get("destination_group"):
+ delete[resource].extend(
+ cmd["destination_group"]
+ )
+ if cmd.get("sensor_group"):
+ delete[resource].extend(
+ cmd["sensor_group"]
+ )
+
+ add[resource] = remove_duplicate_context(add[resource])
+ delete[resource] = remove_duplicate_context(delete[resource])
+
+ commands.extend(delete["TMS_SUBSCRIPTION"])
+ commands.extend(delete["TMS_SENSORGROUP"])
+ commands.extend(delete["TMS_DESTGROUP"])
+ commands.extend(add["TMS_DESTGROUP"])
+ commands.extend(add["TMS_SENSORGROUP"])
+ commands.extend(add["TMS_SUBSCRIPTION"])
+ commands.extend(add["TMS_GLOBAL"])
+ commands = remove_duplicate_context(commands)
+
+ return commands
+
+ @staticmethod
+ def _state_merged(cmd_ref):
+ """ The command generator when state is merged
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ commands = cmd_ref["TMS_GLOBAL"]["ref"][0].get_proposed()
+
+ if cmd_ref["TMS_DESTGROUP"].get("ref"):
+ for cr in cmd_ref["TMS_DESTGROUP"]["ref"]:
+ commands.extend(cr.get_proposed())
+
+ if cmd_ref["TMS_SENSORGROUP"].get("ref"):
+ for cr in cmd_ref["TMS_SENSORGROUP"]["ref"]:
+ commands.extend(cr.get_proposed())
+
+ if cmd_ref["TMS_SUBSCRIPTION"].get("ref"):
+ for cr in cmd_ref["TMS_SUBSCRIPTION"]["ref"]:
+ commands.extend(cr.get_proposed())
+
+ return remove_duplicate_context(commands)
+
+ @staticmethod
+ def _state_deleted(want, have):
+ """ The command generator when state is deleted
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if want != have:
+ commands = ["no telemetry"]
+ return commands
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/vlans/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/vlans/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/vlans/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/vlans/vlans.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/vlans/vlans.py
new file mode 100644
index 00000000..09badec7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/config/vlans/vlans.py
@@ -0,0 +1,338 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos_vlans class
+It is in this file where the current configuration (as dict)
+is compared to the provided configuration (as dict) and the command set
+necessary to bring the current configuration to it's desired end-state is
+created
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base import (
+ ConfigBase,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ dict_diff,
+ to_list,
+ remove_empties,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ search_obj_in_list,
+)
+
+
+class Vlans(ConfigBase):
+ """
+ The nxos_vlans class
+ """
+
+ gather_subset = ["min"]
+
+ gather_network_resources = ["vlans"]
+
+ def __init__(self, module):
+ super(Vlans, self).__init__(module)
+
+ def get_platform(self):
+ """Wrapper method for getting platform info
+ This method exists solely to allow the unit test framework to mock calls.
+ """
+ return self.facts.get("ansible_net_platform", "")
+
+ def get_vlans_facts(self, data=None):
+ """ Get the 'facts' (the current configuration)
+
+ :rtype: A dictionary
+ :returns: The current configuration as a dictionary
+ """
+ self.facts, _warnings = Facts(self._module).get_facts(
+ self.gather_subset, self.gather_network_resources, data=data
+ )
+ vlans_facts = self.facts["ansible_network_resources"].get("vlans")
+ if not vlans_facts:
+ return []
+
+ return vlans_facts
+
+ def edit_config(self, commands):
+ """Wrapper method for `_connection.edit_config()`
+ This exists solely to allow the unit test framework to mock device connection calls.
+ """
+ return self._connection.edit_config(commands)
+
+ def execute_module(self):
+ """ Execute the module
+
+ :rtype: A dictionary
+ :returns: The result from module execution
+ """
+ result = {"changed": False}
+ commands = []
+ warnings = []
+
+ if self.state in self.ACTION_STATES:
+ existing_vlans_facts = self.get_vlans_facts()
+ self._platform = self.get_platform()
+ else:
+ existing_vlans_facts = []
+ self._platform = ""
+
+ if self.state in self.ACTION_STATES or self.state == "rendered":
+ commands.extend(self.set_config(existing_vlans_facts))
+
+ if commands and self.state in self.ACTION_STATES:
+ if not self._module.check_mode:
+ self.edit_config(commands)
+ result["changed"] = True
+
+ if self.state in self.ACTION_STATES:
+ result["commands"] = commands
+
+ if self.state in self.ACTION_STATES or self.state == "gathered":
+ changed_vlans_facts = self.get_vlans_facts()
+
+ elif self.state == "rendered":
+ result["rendered"] = commands
+
+ elif self.state == "parsed":
+ running_config = self._module.params["running_config"]
+ if not running_config:
+ self._module.fail_json(
+ msg="value of running_config parameter must not be empty for state parsed"
+ )
+ result["parsed"] = self.get_vlans_facts(data=running_config)
+
+ if self.state in self.ACTION_STATES:
+ result["before"] = existing_vlans_facts
+ if result["changed"]:
+ result["after"] = changed_vlans_facts
+
+ elif self.state == "gathered":
+ result["gathered"] = changed_vlans_facts
+
+ result["warnings"] = warnings
+ return result
+
+ def set_config(self, existing_vlans_facts):
+ """ Collect the configuration from the args passed to the module,
+ collect the current configuration (as a dict from facts)
+
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ want = self._module.params.get("config") or []
+ have = existing_vlans_facts
+ resp = self.set_state(self._sanitize(want), self._sanitize(have))
+ return to_list(resp)
+
+ def set_state(self, want, have):
+ """ Select the appropriate function based on the state provided
+
+ :param want: the desired configuration as a dictionary
+ :param have: the current configuration as a dictionary
+ :rtype: A list
+ :returns: the commands necessary to migrate the current configuration
+ to the desired configuration
+ """
+ state = self._module.params["state"]
+ if (
+ state in ("overridden", "merged", "replaced", "rendered")
+ and not want
+ ):
+ self._module.fail_json(
+ msg="value of config parameter must not be empty for state {0}".format(
+ state
+ )
+ )
+
+ commands = list()
+ if state == "overridden":
+ commands.extend(self._state_overridden(want, have))
+ elif state == "deleted":
+ commands.extend(self._state_deleted(want, have))
+ else:
+ for w in want:
+ if state in ["merged", "rendered"]:
+ commands.extend(self._state_merged(w, have))
+ elif state == "replaced":
+ commands.extend(self._state_replaced(w, have))
+
+ return commands
+
+ def remove_default_states(self, obj):
+ """Removes non-empty but default states from the obj.
+ """
+ default_states = {"enabled": True, "state": "active", "mode": "ce"}
+ for k in default_states.keys():
+ if obj.get(k) == default_states[k]:
+ obj.pop(k, None)
+ return obj
+
+ def _state_replaced(self, want, have):
+ """ The command generator when state is replaced.
+ Scope is limited to vlan objects defined in the playbook.
+ :rtype: A list
+ :returns: The minimum command set required to migrate the current
+ configuration to the desired configuration.
+ """
+ obj_in_have = search_obj_in_list(want["vlan_id"], have, "vlan_id")
+ if obj_in_have:
+ # Diff the want and have
+ diff = dict_diff(want, obj_in_have)
+ # Remove merge items from diff; what's left will be used to
+ # remove states not specified in the playbook
+ for k in dict(set(want.items()) - set(obj_in_have.items())).keys():
+ diff.pop(k, None)
+ else:
+ diff = want
+
+ # Remove default states from resulting diff
+ diff = self.remove_default_states(diff)
+
+ # merged_cmds: 'want' cmds to update 'have' states that don't match
+ # replaced_cmds: remaining 'have' cmds that need to be reset to default
+ merged_cmds = self.set_commands(want, have)
+ replaced_cmds = []
+ if obj_in_have:
+ # Remaining diff items are used to reset states to default
+ replaced_cmds = self.del_attribs(diff)
+ cmds = []
+ if replaced_cmds or merged_cmds:
+ cmds += ["vlan %s" % str(want["vlan_id"])]
+ cmds += merged_cmds + replaced_cmds
+ return cmds
+
+ def _state_overridden(self, want, have):
+ """ The command generator when state is overridden.
+ Scope includes all vlan objects on the device.
+ :rtype: A list
+ :returns: the minimum command set required to migrate the current
+ configuration to the desired configuration.
+ """
+ # overridden behavior is the same as replaced except for scope.
+ cmds = []
+ existing_vlans = []
+ for h in have:
+ existing_vlans.append(h["vlan_id"])
+ obj_in_want = search_obj_in_list(h["vlan_id"], want, "vlan_id")
+ if obj_in_want:
+ if h != obj_in_want:
+ replaced_cmds = self._state_replaced(obj_in_want, [h])
+ if replaced_cmds:
+ cmds.extend(replaced_cmds)
+ else:
+ cmds.append("no vlan %s" % h["vlan_id"])
+
+ # Add wanted vlans that don't exist on the device yet
+ for w in want:
+ if w["vlan_id"] not in existing_vlans:
+ new_vlan = ["vlan %s" % w["vlan_id"]]
+ cmds.extend(new_vlan + self.add_commands(w))
+ return cmds
+
+ def _state_merged(self, w, have):
+ """ The command generator when state is merged
+
+ :rtype: A list
+ :returns: the commands necessary to merge the provided into
+ the current configuration
+ """
+ cmds = self.set_commands(w, have)
+ if cmds:
+ cmds.insert(0, "vlan %s" % str(w["vlan_id"]))
+ return cmds
+
+ def _state_deleted(self, want, have):
+ """ The command generator when state is deleted
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
+ commands = []
+ if want:
+ for w in want:
+ obj_in_have = search_obj_in_list(w["vlan_id"], have, "vlan_id")
+ if obj_in_have:
+ commands.append("no vlan " + str(obj_in_have["vlan_id"]))
+ else:
+ if not have:
+ return commands
+ for h in have:
+ commands.append("no vlan " + str(h["vlan_id"]))
+ return commands
+
+ def del_attribs(self, obj):
+ """Returns a list of commands to reset states to default
+ """
+ commands = []
+ if not obj:
+ return commands
+ default_cmds = {
+ "name": "no name",
+ "state": "no state",
+ "enabled": "no shutdown",
+ "mode": "mode ce",
+ "mapped_vni": "no vn-segment",
+ }
+ for k in obj:
+ commands.append(default_cmds[k])
+ return commands
+
+ def diff_of_dicts(self, w, obj):
+ diff = set(w.items()) - set(obj.items())
+ diff = dict(diff)
+ if diff and w["vlan_id"] == obj["vlan_id"]:
+ diff.update({"vlan_id": w["vlan_id"]})
+ return diff
+
+ def add_commands(self, d):
+ commands = []
+ if not d:
+ return commands
+ if "name" in d:
+ commands.append("name " + d["name"])
+ if "state" in d:
+ commands.append("state " + d["state"])
+ if "enabled" in d:
+ if d["enabled"] is True:
+ commands.append("no shutdown")
+ else:
+ commands.append("shutdown")
+ if "mode" in d:
+ commands.append("mode " + d["mode"])
+ if "mapped_vni" in d:
+ commands.append("vn-segment %s" % d["mapped_vni"])
+
+ return commands
+
+ def set_commands(self, w, have):
+ commands = []
+ obj_in_have = search_obj_in_list(w["vlan_id"], have, "vlan_id")
+ if not obj_in_have:
+ commands = self.add_commands(w)
+ else:
+ diff = self.diff_of_dicts(w, obj_in_have)
+ commands = self.add_commands(diff)
+ return commands
+
+ def _sanitize(self, vlans):
+ sanitized_vlans = []
+ for vlan in vlans:
+ if not re.search("N[567][7K]", self._platform):
+ if "mode" in vlan:
+ del vlan["mode"]
+ sanitized_vlans.append(remove_empties(vlan))
+ return sanitized_vlans
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acl_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acl_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acl_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acl_interfaces/acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acl_interfaces/acl_interfaces.py
new file mode 100644
index 00000000..94686bd9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acl_interfaces/acl_interfaces.py
@@ -0,0 +1,135 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+"""
+The nxos acl_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.acl_interfaces.acl_interfaces import (
+ Acl_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ normalize_interface,
+)
+
+
+class Acl_interfacesFacts(object):
+ """ The nxos acl_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Acl_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_device_data(self, connection):
+ return connection.get("show running-config | section ^interface")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for acl_interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = self.get_device_data(connection)
+ data = data.split("interface")
+
+ resources = []
+ for i in range(len(data)):
+ intf = data[i].split("\n")
+ for l in range(1, len(intf)):
+ if not re.search(
+ "ip(v6)?( port)? (access-group|traffic-filter)", intf[l]
+ ):
+ intf[l] = ""
+ intf = list(filter(None, intf))
+ resources.append(intf)
+
+ objs = []
+ for resource in resources:
+ if resource:
+ obj = self.render_config(self.generated_spec, resource)
+ if obj:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("acl_interfaces", None)
+ facts = {}
+ if objs:
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ params = utils.remove_empties(params)
+ facts["acl_interfaces"] = params["config"]
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ config["name"] = conf[0].strip()
+ config["access_groups"] = []
+ v4 = {"afi": "ipv4", "acls": []}
+ v6 = {"afi": "ipv6", "acls": []}
+ for c in conf[1:]:
+ if c:
+ acl4 = re.search(
+ r"ip(?P<port>\sport)?\saccess-group\s(?P<name>\S+)\s(?P<dir>in|out)",
+ c,
+ )
+ acl6 = re.search(
+ r"ipv6(?P<port>\sport)?\straffic-filter\s(?P<name>\S+)\s(?P<dir>in|out)",
+ c,
+ )
+ if acl4:
+ v4["acls"].append(self._parse(acl4))
+ elif acl6:
+ v6["acls"].append(self._parse(acl6))
+
+ if len(v4["acls"]) > 0:
+ config["access_groups"].append(v4)
+ if len(v6["acls"]) > 0:
+ config["access_groups"].append(v6)
+
+ return utils.remove_empties(config)
+
+ def _parse(self, data):
+ return {
+ "name": data.group("name").strip(),
+ "direction": data.group("dir").strip(),
+ "port": True if data.group("port") else None,
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acls/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acls/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acls/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acls/acls.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acls/acls.py
new file mode 100644
index 00000000..abdf2968
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/acls/acls.py
@@ -0,0 +1,283 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos acls fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.acls.acls import (
+ AclsArgs,
+)
+
+
+class AclsFacts(object):
+ """ The nxos acls fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = AclsArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_device_data(self, connection):
+ data = connection.get(
+ "show running-config | section 'ip(v6)* access-list'"
+ )
+ if data == "{}":
+ return ""
+ return data
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for acls
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = self.get_device_data(connection)
+ data = re.split("\nip", data)
+ v6 = []
+ v4 = []
+
+ for i in range(len(data)):
+ if str(data[i]):
+ if "v6" in str(data[i]).split()[0]:
+ v6.append(data[i])
+ else:
+ v4.append(data[i])
+
+ resources = []
+ resources.append(v6)
+ resources.append(v4)
+ objs = []
+ for resource in resources:
+ if resource:
+ obj = self.render_config(self.generated_spec, resource)
+ if obj:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("acls", None)
+ facts = {}
+ if objs:
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ params = utils.remove_empties(params)
+ facts["acls"] = params["config"]
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def get_endpoint(self, ace, pro):
+ ret_dict = {}
+ option = ace.split()[0]
+ if option == "any":
+ ret_dict.update({"any": True})
+ else:
+ # it could be a.b.c.d or a.b.c.d/x or a.b.c.d/32
+ if "/" in option: # or 'host' in option:
+ ip = re.search(r"(.*)/(\d+)", option)
+ if int(ip.group(2)) < 32 or 32 < int(ip.group(2)) < 128:
+ ret_dict.update({"prefix": option})
+ else:
+ ret_dict.update({"host": ip.group(1)})
+ else:
+ ret_dict.update({"address": option})
+ wb = ace.split()[1]
+ ret_dict.update({"wildcard_bits": wb})
+ ace = re.sub("{0}".format(wb), "", ace, 1)
+ ace = re.sub(option, "", ace, 1)
+ if pro in ["tcp", "udp"]:
+ keywords = ["eq", "lt", "gt", "neq", "range"]
+ if len(ace.split()) and ace.split()[0] in keywords:
+ port_protocol = {}
+ port_pro = re.search(r"(eq|lt|gt|neq) (\w*)", ace)
+ if port_pro:
+ port_protocol.update(
+ {port_pro.group(1): port_pro.group(2)}
+ )
+ ace = re.sub(port_pro.group(1), "", ace, 1)
+ ace = re.sub(port_pro.group(2), "", ace, 1)
+ else:
+ limit = re.search(r"(range) (\w*) (\w*)", ace)
+ if limit:
+ port_protocol.update(
+ {
+ "range": {
+ "start": limit.group(2),
+ "end": limit.group(3),
+ }
+ }
+ )
+ ace = re.sub(limit.group(2), "", ace, 1)
+ ace = re.sub(limit.group(3), "", ace, 1)
+ if port_protocol:
+ ret_dict.update({"port_protocol": port_protocol})
+ return ace, ret_dict
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ protocol_options = {
+ "tcp": ["fin", "established", "psh", "rst", "syn", "urg", "ack"],
+ "icmp": [
+ "administratively_prohibited",
+ "alternate_address",
+ "conversion_error",
+ "dod_host_prohibited",
+ "dod_net_prohibited",
+ "echo_request",
+ "echo",
+ "echo_reply",
+ "general_parameter_problem",
+ "host_isolated",
+ "host_precedence_unreachable",
+ "host_redirect",
+ "host_tos_redirect",
+ "host_tos_unreachable",
+ "host_unknown",
+ "host_unreachable",
+ "information_reply",
+ "information_request",
+ "mask_reply",
+ "mask_request",
+ "mobile_redirect",
+ "net_redirect",
+ "net_tos_redirect",
+ "net_tos_unreachable",
+ "net_unreachable",
+ "network_unknown",
+ "no_room_for_option",
+ "option_missing",
+ "packet_too_big",
+ "parameter_problem",
+ "port_unreachable",
+ "precedence_unreachable",
+ "protocol_unreachable",
+ "reassembly_timeout",
+ "redirect",
+ "router_advertisement",
+ "router_solicitation",
+ "source_quench",
+ "source_route_failed",
+ "time_exceeded",
+ "timestamp_reply",
+ "timestamp_request",
+ "traceroute",
+ "ttl_exceeded",
+ "unreachable",
+ ],
+ "igmp": ["dvmrp", "host_query", "host_report"],
+ }
+ if conf:
+ if "v6" in conf[0].split()[0]:
+ config["afi"] = "ipv6"
+ else:
+ config["afi"] = "ipv4"
+ config["acls"] = []
+ for acl in conf:
+ acls = {}
+ if "match-local-traffic" in acl:
+ config["match_local_traffic"] = True
+ continue
+ acl = acl.split("\n")
+ acl = [a.strip() for a in acl]
+ acl = list(filter(None, acl))
+ acls["name"] = re.match(
+ r"(ip)?(v6)?\s?access-list (.*)", acl[0]
+ ).group(3)
+ acls["aces"] = []
+ for ace in list(filter(None, acl[1:])):
+ if re.search(r"ip(.*)access-list.*", ace):
+ break
+ entry = {}
+ ace = ace.strip()
+ seq = re.match(r"(\d*)", ace).group(0)
+ entry.update({"sequence": seq})
+ ace = re.sub(seq, "", ace, 1)
+ grant = ace.split()[0]
+ rem = ""
+ if grant != "remark":
+ entry.update({"grant": grant})
+ else:
+ rem = re.match(".*remark (.*)", ace).group(1)
+ entry.update({"remark": rem})
+
+ if not rem:
+ ace = re.sub(grant, "", ace, 1)
+ pro = ace.split()[0]
+ entry.update({"protocol": pro})
+ ace = re.sub(pro, "", ace, 1)
+ ace, source = self.get_endpoint(ace, pro)
+ entry.update({"source": source})
+ ace, dest = self.get_endpoint(ace, pro)
+ entry.update({"destination": dest})
+
+ dscp = re.search(r"dscp (\w*)", ace)
+ if dscp:
+ entry.update({"dscp": dscp.group(1)})
+
+ frag = re.search(r"fragments", ace)
+ if frag:
+ entry.update({"fragments": True})
+
+ prec = re.search(r"precedence (\w*)", ace)
+ if prec:
+ entry.update({"precedence": prec.group(1)})
+
+ log = re.search("log", ace)
+ if log:
+ entry.update({"log": True})
+
+ if pro == "tcp" or pro == "icmp" or pro == "igmp":
+ pro_options = {}
+ options = {}
+ for option in protocol_options[pro]:
+ option = re.sub("_", "-", option)
+ if option in ace:
+ if (
+ option == "echo"
+ and "echo_request" in options
+ ):
+ continue
+ option = re.sub("-", "_", option)
+ options.update({option: True})
+ if options:
+ pro_options.update({pro: options})
+ if pro_options:
+ entry.update({"protocol_options": pro_options})
+ acls["aces"].append(entry)
+ config["acls"].append(acls)
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bfd_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bfd_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bfd_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bfd_interfaces/bfd_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bfd_interfaces/bfd_interfaces.py
new file mode 100644
index 00000000..dee9d60c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bfd_interfaces/bfd_interfaces.py
@@ -0,0 +1,114 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The nxos bfd_interfaces fact class
+Populate the facts tree based on the current device configuration.
+"""
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.bfd_interfaces.bfd_interfaces import (
+ Bfd_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ get_interface_type,
+)
+
+
+class Bfd_interfacesFacts(object):
+ """ The nxos_bfd_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Bfd_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for bfd_interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+
+ if not data:
+ data = connection.get(
+ "show running-config | section '^interface|^feature bfd'"
+ )
+
+ # Some of the bfd attributes
+ if "feature bfd" in data.split("\n"):
+ resources = data.split("interface ")
+ resources.pop(0)
+ else:
+ resources = []
+ for resource in resources:
+ if resource:
+ obj = self.render_config(self.generated_spec, resource)
+ if obj and len(obj.keys()) > 1:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("bfd_interfaces", None)
+ facts = {}
+ if objs:
+ facts["bfd_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["bfd_interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ match = re.search(r"^(\S+)", conf)
+ intf = match.group(1)
+ if get_interface_type(intf) == "unknown":
+ return {}
+ config["name"] = intf
+ # 'bfd'/'bfd echo' do not nvgen when enabled thus set to 'enable' when None.
+ # 'bfd' is not supported on some platforms
+ config["bfd"] = (
+ utils.parse_conf_cmd_arg(conf, "bfd", "enable", "disable")
+ or "enable"
+ )
+ config["echo"] = (
+ utils.parse_conf_cmd_arg(conf, "bfd echo", "enable", "disable")
+ or "enable"
+ )
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bgp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bgp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bgp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bgp_global/bgp_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bgp_global/bgp_global.py
new file mode 100644
index 00000000..764acaa1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/bgp_global/bgp_global.py
@@ -0,0 +1,135 @@
+# -*- coding: utf-8 -*-
+# Copyright 2021 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The nxos bgp_global fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from copy import deepcopy
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.rm_templates.bgp_global import (
+ Bgp_globalTemplate,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.bgp_global.bgp_global import (
+ Bgp_globalArgs,
+)
+
+
+class Bgp_globalFacts(object):
+ """ The nxos bgp_global facts class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Bgp_globalArgs.argument_spec
+
+ def get_config(self, connection):
+ """Wrapper method for `connection.get()`
+ This method exists solely to allow the unit test framework to mock device connection calls.
+ """
+ return connection.get("show running-config | section '^router bgp'")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for Bgp_global network resource
+
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+
+ :rtype: dictionary
+ :returns: facts
+ """
+ facts = {}
+
+ if not data:
+ data = self.get_config(connection)
+
+ data = self._flatten_config(data)
+
+ # parse native config using the Bgp_global template
+ bgp_global_parser = Bgp_globalTemplate(lines=data.splitlines())
+ obj = bgp_global_parser.parse()
+
+ vrfs = obj.get("vrfs", {})
+
+ # move global vals to their correct position in facts tree
+ # this is only needed for keys that are valid for both global
+ # and VRF contexts
+ global_vals = vrfs.pop("vrf_", {})
+ for key, value in iteritems(global_vals):
+ obj[key] = value
+
+ # transform vrfs into a list
+ if vrfs:
+ obj["vrfs"] = sorted(
+ list(obj["vrfs"].values()), key=lambda k, sk="vrf": k[sk]
+ )
+ for vrf in obj["vrfs"]:
+ self._post_parse(vrf)
+
+ self._post_parse(obj)
+
+ obj = utils.remove_empties(obj)
+
+ ansible_facts["ansible_network_resources"].pop("bgp_global", None)
+ params = utils.remove_empties(
+ utils.validate_config(self.argument_spec, {"config": obj})
+ )
+
+ facts["bgp_global"] = params.get("config", {})
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def _flatten_config(self, data):
+ """ Flatten neighbor contexts in
+ the running-config for easier parsing.
+ :param obj: dict
+ :returns: flattened running config
+ """
+ data = data.split("\n")
+ in_nbr_cxt = False
+ cur_nbr = {}
+
+ for x in data:
+ cur_indent = len(x) - len(x.lstrip())
+ if x.strip().startswith("neighbor"):
+ in_nbr_cxt = True
+ cur_nbr["nbr"] = x
+ cur_nbr["indent"] = cur_indent
+ elif cur_nbr and (cur_indent <= cur_nbr["indent"]):
+ in_nbr_cxt = False
+ elif in_nbr_cxt:
+ data[data.index(x)] = cur_nbr["nbr"] + " " + x.strip()
+
+ return "\n".join(data)
+
+ def _post_parse(self, obj):
+ """ Converts the intermediate data structure
+ to valid format as per argspec.
+ :param obj: dict
+ """
+ conf_peers = obj.get("confederation", {}).get("peers")
+ if conf_peers:
+ obj["confederation"]["peers"] = conf_peers.split()
+ obj["confederation"]["peers"].sort()
+
+ neighbors = obj.get("neighbors", {})
+ if neighbors:
+ obj["neighbors"] = sorted(
+ list(neighbors.values()),
+ key=lambda k, sk="neighbor_address": k[sk],
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/facts.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/facts.py
new file mode 100644
index 00000000..9620c415
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/facts.py
@@ -0,0 +1,145 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+"""
+The facts class for nxos
+this file validates each subset of facts and selectively
+calls the appropriate facts gathering function
+"""
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts import (
+ FactsBase,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.legacy.base import (
+ Default,
+ Legacy,
+ Hardware,
+ Config,
+ Interfaces,
+ Features,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.bfd_interfaces.bfd_interfaces import (
+ Bfd_interfacesFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.hsrp_interfaces.hsrp_interfaces import (
+ Hsrp_interfacesFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.interfaces.interfaces import (
+ InterfacesFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.l2_interfaces.l2_interfaces import (
+ L2_interfacesFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.lacp.lacp import (
+ LacpFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.l3_interfaces.l3_interfaces import (
+ L3_interfacesFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.lag_interfaces.lag_interfaces import (
+ Lag_interfacesFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.telemetry.telemetry import (
+ TelemetryFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.vlans.vlans import (
+ VlansFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.lacp_interfaces.lacp_interfaces import (
+ Lacp_interfacesFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.lldp_global.lldp_global import (
+ Lldp_globalFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.lldp_interfaces.lldp_interfaces import (
+ Lldp_interfacesFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.acl_interfaces.acl_interfaces import (
+ Acl_interfacesFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.acls.acls import (
+ AclsFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.static_routes.static_routes import (
+ Static_routesFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.ospfv2.ospfv2 import (
+ Ospfv2Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.ospfv3.ospfv3 import (
+ Ospfv3Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.ospf_interfaces.ospf_interfaces import (
+ Ospf_interfacesFacts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.bgp_global.bgp_global import (
+ Bgp_globalFacts,
+)
+
+
+FACT_LEGACY_SUBSETS = dict(
+ default=Default,
+ legacy=Legacy,
+ hardware=Hardware,
+ interfaces=Interfaces,
+ config=Config,
+ features=Features,
+)
+FACT_RESOURCE_SUBSETS = dict(
+ bfd_interfaces=Bfd_interfacesFacts,
+ hsrp_interfaces=Hsrp_interfacesFacts,
+ lag_interfaces=Lag_interfacesFacts,
+ lldp_global=Lldp_globalFacts,
+ telemetry=TelemetryFacts,
+ vlans=VlansFacts,
+ lacp=LacpFacts,
+ lacp_interfaces=Lacp_interfacesFacts,
+ interfaces=InterfacesFacts,
+ l3_interfaces=L3_interfacesFacts,
+ l2_interfaces=L2_interfacesFacts,
+ lldp_interfaces=Lldp_interfacesFacts,
+ acl_interfaces=Acl_interfacesFacts,
+ acls=AclsFacts,
+ static_routes=Static_routesFacts,
+ ospfv2=Ospfv2Facts,
+ ospfv3=Ospfv3Facts,
+ ospf_interfaces=Ospf_interfacesFacts,
+ bgp_global=Bgp_globalFacts,
+)
+
+
+class Facts(FactsBase):
+ """ The fact class for nxos
+ """
+
+ VALID_LEGACY_GATHER_SUBSETS = frozenset(FACT_LEGACY_SUBSETS.keys())
+ VALID_RESOURCE_SUBSETS = frozenset(FACT_RESOURCE_SUBSETS.keys())
+
+ def __init__(self, module):
+ super(Facts, self).__init__(module)
+
+ def get_facts(
+ self, legacy_facts_type=None, resource_facts_type=None, data=None
+ ):
+ """ Collect the facts for nxos
+ :param legacy_facts_type: List of legacy facts types
+ :param resource_facts_type: List of resource fact types
+ :param data: previously collected conf
+ :rtype: dict
+ :return: the facts gathered
+ """
+ if self.VALID_RESOURCE_SUBSETS:
+ self.get_network_resources_facts(
+ FACT_RESOURCE_SUBSETS, resource_facts_type, data
+ )
+
+ if self.VALID_LEGACY_GATHER_SUBSETS:
+ self.get_network_legacy_facts(
+ FACT_LEGACY_SUBSETS, legacy_facts_type
+ )
+
+ return self.ansible_facts, self._warnings
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/hsrp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/hsrp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/hsrp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/hsrp_interfaces/hsrp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/hsrp_interfaces/hsrp_interfaces.py
new file mode 100644
index 00000000..7275e4e3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/hsrp_interfaces/hsrp_interfaces.py
@@ -0,0 +1,100 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The nxos hsrp_interfaces fact class
+Populate the facts tree based on the current device configuration.
+"""
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.hsrp_interfaces.hsrp_interfaces import (
+ Hsrp_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ get_interface_type,
+)
+
+
+class Hsrp_interfacesFacts(object):
+ """ The nxos hsrp_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Hsrp_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for hsrp_interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+
+ if not data:
+ data = connection.get("show running-config | section ^interface")
+
+ resources = data.split("interface ")
+ for resource in resources:
+ if resource:
+ obj = self.render_config(self.generated_spec, resource)
+ if obj and len(obj.keys()) > 1:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("hsrp_interfaces", None)
+ facts = {}
+ if objs:
+ facts["hsrp_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["hsrp_interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ match = re.search(r"^(\S+)", conf)
+ intf = match.group(1)
+ if get_interface_type(intf) == "unknown":
+ return {}
+ config["name"] = intf
+ config["bfd"] = utils.parse_conf_cmd_arg(
+ conf, "hsrp bfd", "enable", "disable"
+ )
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/interfaces/interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/interfaces/interfaces.py
new file mode 100644
index 00000000..0c5f0964
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/interfaces/interfaces.py
@@ -0,0 +1,119 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)#!/usr/bin/python
+"""
+The nxos interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.interfaces.interfaces import (
+ InterfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ get_interface_type,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ default_intf_enabled,
+)
+
+
+class InterfacesFacts(object):
+ """ The nxos interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = InterfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for interfaces
+ :param connection: the device connection
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+ if not data:
+ data = connection.get("show running-config | section ^interface")
+
+ config = ("\n" + data).split("\ninterface ")
+ for conf in config:
+ conf = conf.strip()
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("interfaces", None)
+ facts = {}
+ facts["interfaces"] = []
+ if objs:
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ match = re.search(r"^(\S+)", conf)
+ intf = match.group(1)
+ if get_interface_type(intf) == "unknown":
+ return {}
+ config["name"] = intf
+ config["description"] = utils.parse_conf_arg(conf, "description")
+ config["speed"] = utils.parse_conf_arg(conf, "speed")
+ config["mtu"] = utils.parse_conf_arg(conf, "mtu")
+ config["duplex"] = utils.parse_conf_arg(conf, "duplex")
+ config["mode"] = utils.parse_conf_cmd_arg(
+ conf, "switchport", "layer2", "layer3"
+ )
+
+ config["enabled"] = utils.parse_conf_cmd_arg(
+ conf, "shutdown", False, True
+ )
+
+ config["fabric_forwarding_anycast_gateway"] = utils.parse_conf_cmd_arg(
+ conf, "fabric forwarding mode anycast-gateway", True
+ )
+ config["ip_forward"] = utils.parse_conf_cmd_arg(
+ conf, "ip forward", True
+ )
+
+ interfaces_cfg = utils.remove_empties(config)
+ return interfaces_cfg
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l2_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l2_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l2_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l2_interfaces/l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l2_interfaces/l2_interfaces.py
new file mode 100644
index 00000000..481b6db2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l2_interfaces/l2_interfaces.py
@@ -0,0 +1,109 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)#!/usr/bin/python
+"""
+The nxos l2_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.l2_interfaces.l2_interfaces import (
+ L2_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ get_interface_type,
+)
+
+
+class L2_interfacesFacts(object):
+ """The nxos l2_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = L2_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for l2_interfaces
+ :param connection: the device connection
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+ if not data:
+ data = connection.get("show running-config | section ^interface")
+
+ config = ("\n" + data).split("\ninterface ")
+ for conf in config:
+ conf = conf.strip()
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("l2_interfaces", None)
+ facts = {}
+ if objs:
+ facts["l2_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["l2_interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ match = re.search(r"^(\S+)", conf)
+ intf = match.group(1)
+ if get_interface_type(intf) == "unknown":
+ return {}
+
+ config["name"] = intf
+ config["mode"] = utils.parse_conf_arg(conf, "switchport mode")
+ config["ip_forward"] = utils.parse_conf_arg(conf, "ip forward")
+ config["access"]["vlan"] = utils.parse_conf_arg(
+ conf, "switchport access vlan"
+ )
+ config["trunk"]["allowed_vlans"] = utils.parse_conf_arg(
+ conf, "switchport trunk allowed vlan"
+ )
+ config["trunk"]["native_vlan"] = utils.parse_conf_arg(
+ conf, "switchport trunk native vlan"
+ )
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l3_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l3_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l3_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l3_interfaces/l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l3_interfaces/l3_interfaces.py
new file mode 100644
index 00000000..18dc6595
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/l3_interfaces/l3_interfaces.py
@@ -0,0 +1,144 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)#!/usr/bin/python
+"""
+The nxos l3_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.l3_interfaces.l3_interfaces import (
+ L3_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ get_interface_type,
+)
+
+
+class L3_interfacesFacts(object):
+ """ The nxos l3_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = L3_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for l3_interfaces
+ :param connection: the device connection
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+ if not data:
+ data = connection.get("show running-config | section ^interface")
+
+ config = ("\n" + data).split("\ninterface ")
+ for conf in config:
+ conf = conf.strip()
+ if conf:
+ obj = self.render_config(self.generated_spec, conf)
+ if obj:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("l3_interfaces", None)
+ facts = {}
+ if objs:
+ facts["l3_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["l3_interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ match = re.search(r"^(\S+)", conf)
+ intf = match.group(1)
+ if get_interface_type(intf) == "unknown":
+ return {}
+ config["name"] = intf
+ config["dot1q"] = utils.parse_conf_arg(conf, "encapsulation dot1[qQ]")
+ config["redirects"] = utils.parse_conf_cmd_arg(
+ conf, "no ip redirects", False, True
+ )
+ config["unreachables"] = utils.parse_conf_cmd_arg(
+ conf, "ip unreachables", True, False
+ )
+ config["evpn_multisite_tracking"] = utils.parse_conf_arg(
+ conf, "evpn multisite"
+ )
+ ipv4_match = re.compile(r"\n ip address (.*)")
+ matches = ipv4_match.findall(conf)
+ if matches:
+ if matches[0]:
+ config["ipv4"] = []
+ for m in matches:
+ ipv4_conf = m.split()
+ addr = ipv4_conf[0]
+ if addr:
+ config_dict = {"address": addr}
+ if len(ipv4_conf) > 1:
+ d = ipv4_conf[1]
+ if d == "secondary":
+ config_dict.update({"secondary": True})
+ if len(ipv4_conf) == 4:
+ if ipv4_conf[2] == "tag":
+ config_dict.update(
+ {"tag": int(ipv4_conf[-1])}
+ )
+ elif d == "tag":
+ config_dict.update({"tag": int(ipv4_conf[-1])})
+ config["ipv4"].append(config_dict)
+
+ ipv6_match = re.compile(r"\n ipv6 address (.*)")
+ matches = ipv6_match.findall(conf)
+ if matches:
+ if matches[0]:
+ config["ipv6"] = []
+ for m in matches:
+ ipv6_conf = m.split()
+ addr = ipv6_conf[0]
+ if addr:
+ config_dict = {"address": addr}
+ if len(ipv6_conf) > 1:
+ d = ipv6_conf[1]
+ if d == "tag":
+ config_dict.update({"tag": int(ipv6_conf[-1])})
+ config["ipv6"].append(config_dict)
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp/lacp.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp/lacp.py
new file mode 100644
index 00000000..3813bcd6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp/lacp.py
@@ -0,0 +1,93 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos lacp fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.lacp.lacp import (
+ LacpArgs,
+)
+
+
+class LacpFacts(object):
+ """ The nxos lacp fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = LacpArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lacp
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = connection.get("show running-config | include lacp")
+ resources = data.strip()
+ objs = self.render_config(self.generated_spec, resources)
+ ansible_facts["ansible_network_resources"].pop("lacp", None)
+ facts = {}
+ if objs:
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ facts["lacp"] = utils.remove_empties(params["config"])
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ p_match = re.search(r"lacp system-priority (\d+)", conf, re.M)
+ if p_match:
+ config["system"]["priority"] = p_match.group(1)
+
+ a_match = re.search(r"lacp system-mac (\S+)", conf, re.M)
+ if a_match:
+ address = a_match.group(1)
+ config["system"]["mac"]["address"] = address
+ r_match = re.search(
+ r"lacp system-mac {0} role (\S+)".format(address), conf, re.M
+ )
+ if r_match:
+ config["system"]["mac"]["role"] = r_match.group(1)
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp_interfaces/lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp_interfaces/lacp_interfaces.py
new file mode 100644
index 00000000..7e11c93a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lacp_interfaces/lacp_interfaces.py
@@ -0,0 +1,119 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos lacp_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.lacp_interfaces.lacp_interfaces import (
+ Lacp_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ get_interface_type,
+)
+
+
+class Lacp_interfacesFacts(object):
+ """ The nxos lacp_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Lacp_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lacp_interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+
+ if not data:
+ data = connection.get("show running-config | section ^interface")
+
+ resources = ("\n" + data).split("\ninterface ")
+ for resource in resources:
+ if resource and re.search(r"lacp", resource):
+ obj = self.render_config(self.generated_spec, resource)
+ if obj and len(obj.keys()) > 1:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("lacp_interfaces", None)
+ facts = {}
+ if objs:
+ facts["lacp_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["lacp_interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+
+ match = re.search(r"^(\S+)", conf)
+ intf = match.group(1)
+ if get_interface_type(intf) == "unknown":
+ return {}
+ config["name"] = intf
+ config["port_priority"] = utils.parse_conf_arg(
+ conf, "lacp port-priority"
+ )
+ config["rate"] = utils.parse_conf_arg(conf, "lacp rate")
+ config["mode"] = utils.parse_conf_arg(conf, "lacp mode")
+ suspend_individual = re.search(r"no lacp suspend-individual", conf)
+ if suspend_individual:
+ config["suspend_individual"] = False
+ max_links = utils.parse_conf_arg(conf, "lacp max-bundle")
+ if max_links:
+ config["links"]["max"] = max_links
+ min_links = utils.parse_conf_arg(conf, "lacp min-links")
+ if min_links:
+ config["links"]["min"] = min_links
+ graceful = re.search(r"no lacp graceful-convergence", conf)
+ if graceful:
+ config["convergence"]["graceful"] = False
+ vpc = re.search(r"lacp vpc-convergence", conf)
+ if vpc:
+ config["convergence"]["vpc"] = True
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lag_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lag_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lag_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lag_interfaces/lag_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lag_interfaces/lag_interfaces.py
new file mode 100644
index 00000000..ff287ecc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lag_interfaces/lag_interfaces.py
@@ -0,0 +1,112 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)#!/usr/bin/python
+"""
+The nxos lag_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.lag_interfaces.lag_interfaces import (
+ Lag_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ get_interface_type,
+ normalize_interface,
+)
+
+
+class Lag_interfacesFacts(object):
+ """ The nxos lag_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Lag_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lag_interfaces
+ :param connection: the device connection
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+ if not data:
+ data = connection.get("show running-config | section ^interface")
+
+ objs = self.render_config(self.generated_spec, data, connection)
+
+ ansible_facts["ansible_network_resources"].pop("lag_interfaces", None)
+ facts = {}
+ if objs:
+ facts["lag_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["lag_interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, conf, connection):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ result = []
+ match = re.findall(r"interface (port-channel\d+)", conf)
+
+ for item in match:
+ result.append({"name": item, "members": []})
+
+ for intf in conf.split("interface "):
+ member = {}
+ match_intf = re.search(r"(port-channel|Ethernet)(\S+)", intf)
+ if match_intf:
+ member["member"] = match_intf.group(0)
+
+ match_line = re.search(
+ r"channel-group\s(?P<port_channel>\d+)(\smode\s(?P<mode>on|active|passive))?",
+ intf,
+ )
+ if match_line:
+ member.update(match_line.groupdict())
+
+ if member and member.get("port_channel", None):
+ port_channel = "port-channel{0}".format(
+ member.pop("port_channel")
+ )
+ for x in result:
+ if x["name"] == port_channel:
+ x["members"].append(utils.remove_empties(member))
+
+ return result
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/legacy/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/legacy/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/legacy/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/legacy/base.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/legacy/base.py
new file mode 100644
index 00000000..bfe14e52
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/legacy/base.py
@@ -0,0 +1,822 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import platform
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ run_commands,
+ get_config,
+ get_capabilities,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ get_interface_type,
+ normalize_interface,
+)
+from ansible.module_utils.six import iteritems
+
+
+g_config = None
+
+
+class FactsBase(object):
+ def __init__(self, module):
+ self.module = module
+ self.warnings = list()
+ self.facts = dict()
+ self.capabilities = get_capabilities(self.module)
+
+ def populate(self):
+ pass
+
+ def run(self, command, output="text"):
+ command_string = command
+ command = {"command": command, "output": output}
+ resp = run_commands(self.module, [command], check_rc="retry_json")
+ try:
+ return resp[0]
+ except IndexError:
+ self.warnings.append(
+ "command %s failed, facts for this command will not be populated"
+ % command_string
+ )
+ return None
+
+ def get_config(self):
+ global g_config
+ if not g_config:
+ g_config = get_config(self.module)
+ return g_config
+
+ def transform_dict(self, data, keymap):
+ transform = dict()
+ for key, fact in keymap:
+ if key in data:
+ transform[fact] = data[key]
+ return transform
+
+ def transform_iterable(self, iterable, keymap):
+ for item in iterable:
+ yield self.transform_dict(item, keymap)
+
+
+class Default(FactsBase):
+ def populate(self):
+ data = None
+ data = self.run("show version")
+
+ if data:
+ self.facts["serialnum"] = self.parse_serialnum(data)
+
+ data = self.run("show license host-id")
+ if data:
+ self.facts["license_hostid"] = self.parse_license_hostid(data)
+
+ self.facts.update(self.platform_facts())
+
+ def parse_serialnum(self, data):
+ match = re.search(r"Processor Board ID\s*(\S+)", data, re.M)
+ if match:
+ return match.group(1)
+
+ def platform_facts(self):
+ platform_facts = {}
+
+ resp = self.capabilities
+ device_info = resp["device_info"]
+
+ platform_facts["system"] = device_info["network_os"]
+
+ for item in ("model", "image", "version", "platform", "hostname"):
+ val = device_info.get("network_os_%s" % item)
+ if val:
+ platform_facts[item] = val
+
+ platform_facts["api"] = resp["network_api"]
+ platform_facts["python_version"] = platform.python_version()
+
+ return platform_facts
+
+ def parse_license_hostid(self, data):
+ match = re.search(r"License hostid: VDH=(.+)$", data, re.M)
+ if match:
+ return match.group(1)
+
+
+class Config(FactsBase):
+ def populate(self):
+ super(Config, self).populate()
+ self.facts["config"] = self.get_config()
+
+
+class Features(FactsBase):
+ def populate(self):
+ super(Features, self).populate()
+ data = self.get_config()
+
+ if data:
+ features = []
+ for line in data.splitlines():
+ if line.startswith("feature"):
+ features.append(line.replace("feature", "").strip())
+
+ self.facts["features_enabled"] = features
+
+
+class Hardware(FactsBase):
+ def populate(self):
+ data = self.run("dir")
+ if data:
+ self.facts["filesystems"] = self.parse_filesystems(data)
+
+ data = None
+ data = self.run("show system resources", output="json")
+
+ if data:
+ if isinstance(data, dict):
+ self.facts["memtotal_mb"] = (
+ int(data["memory_usage_total"]) / 1024
+ )
+ self.facts["memfree_mb"] = (
+ int(data["memory_usage_free"]) / 1024
+ )
+ else:
+ self.facts["memtotal_mb"] = self.parse_memtotal_mb(data)
+ self.facts["memfree_mb"] = self.parse_memfree_mb(data)
+
+ def parse_filesystems(self, data):
+ return re.findall(r"^Usage for (\S+)//", data, re.M)
+
+ def parse_memtotal_mb(self, data):
+ match = re.search(r"(\S+)K(\s+|)total", data, re.M)
+ if match:
+ memtotal = match.group(1)
+ return int(memtotal) / 1024
+
+ def parse_memfree_mb(self, data):
+ match = re.search(r"(\S+)K(\s+|)free", data, re.M)
+ if match:
+ memfree = match.group(1)
+ return int(memfree) / 1024
+
+
+class Interfaces(FactsBase):
+
+ INTERFACE_MAP = frozenset(
+ [
+ ("state", "state"),
+ ("desc", "description"),
+ ("eth_bw", "bandwidth"),
+ ("eth_duplex", "duplex"),
+ ("eth_speed", "speed"),
+ ("eth_mode", "mode"),
+ ("eth_hw_addr", "macaddress"),
+ ("eth_mtu", "mtu"),
+ ("eth_hw_desc", "type"),
+ ]
+ )
+
+ INTERFACE_SVI_MAP = frozenset(
+ [
+ ("svi_line_proto", "state"),
+ ("svi_bw", "bandwidth"),
+ ("svi_mac", "macaddress"),
+ ("svi_mtu", "mtu"),
+ ("type", "type"),
+ ]
+ )
+
+ INTERFACE_IPV4_MAP = frozenset(
+ [("eth_ip_addr", "address"), ("eth_ip_mask", "masklen")]
+ )
+
+ INTERFACE_SVI_IPV4_MAP = frozenset(
+ [("svi_ip_addr", "address"), ("svi_ip_mask", "masklen")]
+ )
+
+ INTERFACE_IPV6_MAP = frozenset([("addr", "address"), ("prefix", "subnet")])
+
+ def ipv6_structure_op_supported(self):
+ data = self.capabilities
+ if data:
+ nxos_os_version = data["device_info"]["network_os_version"]
+ unsupported_versions = ["I2", "F1", "A8"]
+ for ver in unsupported_versions:
+ if ver in nxos_os_version:
+ return False
+ return True
+
+ def populate(self):
+ self.facts["all_ipv4_addresses"] = list()
+ self.facts["all_ipv6_addresses"] = list()
+ self.facts["neighbors"] = {}
+ data = None
+
+ data = self.run("show interface", output="json")
+
+ if data:
+ if isinstance(data, dict):
+ self.facts["interfaces"] = self.populate_structured_interfaces(
+ data
+ )
+ else:
+ interfaces = self.parse_interfaces(data)
+ self.facts["interfaces"] = self.populate_interfaces(interfaces)
+
+ if self.ipv6_structure_op_supported():
+ data = self.run("show ipv6 interface", output="json")
+ else:
+ data = None
+ if data:
+ if isinstance(data, dict):
+ self.populate_structured_ipv6_interfaces(data)
+ else:
+ interfaces = self.parse_interfaces(data)
+ self.populate_ipv6_interfaces(interfaces)
+
+ data = self.run("show lldp neighbors", output="json")
+ if data:
+ if isinstance(data, dict):
+ self.facts["neighbors"].update(
+ self.populate_structured_neighbors_lldp(data)
+ )
+ else:
+ self.facts["neighbors"].update(self.populate_neighbors(data))
+
+ data = self.run("show cdp neighbors detail", output="json")
+ if data:
+ if isinstance(data, dict):
+ self.facts["neighbors"].update(
+ self.populate_structured_neighbors_cdp(data)
+ )
+ else:
+ self.facts["neighbors"].update(
+ self.populate_neighbors_cdp(data)
+ )
+
+ self.facts["neighbors"].pop(None, None) # Remove null key
+
+ def populate_structured_interfaces(self, data):
+ interfaces = dict()
+ data = data["TABLE_interface"]["ROW_interface"]
+
+ if isinstance(data, dict):
+ data = [data]
+
+ for item in data:
+ name = item["interface"]
+
+ intf = dict()
+ if "type" in item:
+ intf.update(self.transform_dict(item, self.INTERFACE_SVI_MAP))
+ else:
+ intf.update(self.transform_dict(item, self.INTERFACE_MAP))
+
+ if "eth_ip_addr" in item:
+ intf["ipv4"] = self.transform_dict(
+ item, self.INTERFACE_IPV4_MAP
+ )
+ self.facts["all_ipv4_addresses"].append(item["eth_ip_addr"])
+
+ if "svi_ip_addr" in item:
+ intf["ipv4"] = self.transform_dict(
+ item, self.INTERFACE_SVI_IPV4_MAP
+ )
+ self.facts["all_ipv4_addresses"].append(item["svi_ip_addr"])
+
+ interfaces[name] = intf
+
+ return interfaces
+
+ def populate_structured_ipv6_interfaces(self, data):
+ try:
+ data = data["TABLE_intf"]
+ if data:
+ if isinstance(data, dict):
+ data = [data]
+ for item in data:
+ name = item["ROW_intf"]["intf-name"]
+ intf = self.facts["interfaces"][name]
+ intf["ipv6"] = self.transform_dict(
+ item, self.INTERFACE_IPV6_MAP
+ )
+ try:
+ addr = item["ROW_intf"]["addr"]
+ except KeyError:
+ addr = item["ROW_intf"]["TABLE_addr"]["ROW_addr"][
+ "addr"
+ ]
+ self.facts["all_ipv6_addresses"].append(addr)
+ else:
+ return ""
+ except TypeError:
+ return ""
+
+ def populate_structured_neighbors_lldp(self, data):
+ objects = dict()
+ data = data["TABLE_nbor"]["ROW_nbor"]
+
+ if isinstance(data, dict):
+ data = [data]
+
+ for item in data:
+ local_intf = normalize_interface(item["l_port_id"])
+ objects[local_intf] = list()
+ nbor = dict()
+ nbor["port"] = item["port_id"]
+ nbor["host"] = nbor["sysname"] = item["chassis_id"]
+ objects[local_intf].append(nbor)
+
+ return objects
+
+ def populate_structured_neighbors_cdp(self, data):
+ objects = dict()
+ data = data["TABLE_cdp_neighbor_detail_info"][
+ "ROW_cdp_neighbor_detail_info"
+ ]
+
+ if isinstance(data, dict):
+ data = [data]
+
+ for item in data:
+ local_intf = item["intf_id"]
+ objects[local_intf] = list()
+ nbor = dict()
+ nbor["port"] = item["port_id"]
+ nbor["host"] = nbor["sysname"] = item["device_id"]
+ objects[local_intf].append(nbor)
+
+ return objects
+
+ def parse_interfaces(self, data):
+ parsed = dict()
+ key = ""
+ for line in data.split("\n"):
+ if len(line) == 0:
+ continue
+ elif line.startswith("admin") or line[0] == " ":
+ parsed[key] += "\n%s" % line
+ else:
+ match = re.match(r"^(\S+)", line)
+ if match:
+ key = match.group(1)
+ if not key.startswith("admin") or not key.startswith(
+ "IPv6 Interface"
+ ):
+ parsed[key] = line
+ return parsed
+
+ def populate_interfaces(self, interfaces):
+ facts = dict()
+ for key, value in iteritems(interfaces):
+ intf = dict()
+ if get_interface_type(key) == "svi":
+ intf["state"] = self.parse_state(key, value, intf_type="svi")
+ intf["macaddress"] = self.parse_macaddress(
+ value, intf_type="svi"
+ )
+ intf["mtu"] = self.parse_mtu(value, intf_type="svi")
+ intf["bandwidth"] = self.parse_bandwidth(
+ value, intf_type="svi"
+ )
+ intf["type"] = self.parse_type(value, intf_type="svi")
+ if "Internet Address" in value:
+ intf["ipv4"] = self.parse_ipv4_address(
+ value, intf_type="svi"
+ )
+ facts[key] = intf
+ else:
+ intf["state"] = self.parse_state(key, value)
+ intf["description"] = self.parse_description(value)
+ intf["macaddress"] = self.parse_macaddress(value)
+ intf["mode"] = self.parse_mode(value)
+ intf["mtu"] = self.parse_mtu(value)
+ intf["bandwidth"] = self.parse_bandwidth(value)
+ intf["duplex"] = self.parse_duplex(value)
+ intf["speed"] = self.parse_speed(value)
+ intf["type"] = self.parse_type(value)
+ if "Internet Address" in value:
+ intf["ipv4"] = self.parse_ipv4_address(value)
+ facts[key] = intf
+
+ return facts
+
+ def parse_state(self, key, value, intf_type="ethernet"):
+ match = None
+ if intf_type == "svi":
+ match = re.search(r"line protocol is\s*(\S+)", value, re.M)
+ else:
+ match = re.search(r"%s is\s*(\S+)" % key, value, re.M)
+
+ if match:
+ return match.group(1)
+
+ def parse_macaddress(self, value, intf_type="ethernet"):
+ match = None
+ if intf_type == "svi":
+ match = re.search(r"address is\s*(\S+)", value, re.M)
+ else:
+ match = re.search(r"address:\s*(\S+)", value, re.M)
+
+ if match:
+ return match.group(1)
+
+ def parse_mtu(self, value, intf_type="ethernet"):
+ match = re.search(r"MTU\s*(\S+)", value, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_bandwidth(self, value, intf_type="ethernet"):
+ match = re.search(r"BW\s*(\S+)", value, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_type(self, value, intf_type="ethernet"):
+ match = None
+ if intf_type == "svi":
+ match = re.search(r"Hardware is\s*(\S+)", value, re.M)
+ else:
+ match = re.search(r"Hardware:\s*(.+),", value, re.M)
+
+ if match:
+ return match.group(1)
+
+ def parse_description(self, value, intf_type="ethernet"):
+ match = re.search(r"Description: (.+)$", value, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_mode(self, value, intf_type="ethernet"):
+ match = re.search(r"Port mode is (\S+)", value, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_duplex(self, value, intf_type="ethernet"):
+ match = re.search(r"(\S+)-duplex", value, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_speed(self, value, intf_type="ethernet"):
+ match = re.search(r"duplex, (.+)$", value, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_ipv4_address(self, value, intf_type="ethernet"):
+ ipv4 = {}
+ match = re.search(r"Internet Address is (.+)$", value, re.M)
+ if match:
+ address = match.group(1)
+ addr = address.split("/")[0]
+ ipv4["address"] = address.split("/")[0]
+ ipv4["masklen"] = address.split("/")[1]
+ self.facts["all_ipv4_addresses"].append(addr)
+ return ipv4
+
+ def populate_neighbors(self, data):
+ objects = dict()
+ # if there are no neighbors the show command returns
+ # ERROR: No neighbour information
+ if data.startswith("ERROR"):
+ return dict()
+
+ regex = re.compile(r"(\S+)\s+(\S+)\s+\d+\s+\w+\s+(\S+)")
+
+ for item in data.split("\n")[4:-1]:
+ match = regex.match(item)
+ if match:
+ nbor = dict()
+ nbor["host"] = nbor["sysname"] = match.group(1)
+ nbor["port"] = match.group(3)
+ local_intf = normalize_interface(match.group(2))
+ if local_intf not in objects:
+ objects[local_intf] = []
+ objects[local_intf].append(nbor)
+
+ return objects
+
+ def populate_neighbors_cdp(self, data):
+ facts = dict()
+
+ for item in data.split("----------------------------------------"):
+ if item == "":
+ continue
+ local_intf = self.parse_lldp_intf(item)
+ if local_intf not in facts:
+ facts[local_intf] = list()
+
+ fact = dict()
+ fact["port"] = self.parse_lldp_port(item)
+ fact["sysname"] = self.parse_lldp_sysname(item)
+ facts[local_intf].append(fact)
+
+ return facts
+
+ def parse_lldp_intf(self, data):
+ match = re.search(r"Interface:\s*(\S+)", data, re.M)
+ if match:
+ return match.group(1).strip(",")
+
+ def parse_lldp_port(self, data):
+ match = re.search(r"Port ID \(outgoing port\):\s*(\S+)", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_lldp_sysname(self, data):
+ match = re.search(r"Device ID:(.+)$", data, re.M)
+ if match:
+ return match.group(1)
+
+ def populate_ipv6_interfaces(self, interfaces):
+ facts = dict()
+ for key, value in iteritems(interfaces):
+ intf = dict()
+ intf["ipv6"] = self.parse_ipv6_address(value)
+ facts[key] = intf
+
+ def parse_ipv6_address(self, value):
+ ipv6 = {}
+ match_addr = re.search(r"IPv6 address:\s*(\S+)", value, re.M)
+ if match_addr:
+ addr = match_addr.group(1)
+ ipv6["address"] = addr
+ self.facts["all_ipv6_addresses"].append(addr)
+ match_subnet = re.search(r"IPv6 subnet:\s*(\S+)", value, re.M)
+ if match_subnet:
+ ipv6["subnet"] = match_subnet.group(1)
+
+ return ipv6
+
+
+class Legacy(FactsBase):
+ # facts from nxos_facts 2.1
+
+ VERSION_MAP = frozenset(
+ [
+ ("host_name", "_hostname"),
+ ("kickstart_ver_str", "_os"),
+ ("chassis_id", "_platform"),
+ ]
+ )
+
+ MODULE_MAP = frozenset(
+ [
+ ("model", "model"),
+ ("modtype", "type"),
+ ("ports", "ports"),
+ ("status", "status"),
+ ]
+ )
+
+ FAN_MAP = frozenset(
+ [
+ ("fanname", "name"),
+ ("fanmodel", "model"),
+ ("fanhwver", "hw_ver"),
+ ("fandir", "direction"),
+ ("fanstatus", "status"),
+ ]
+ )
+
+ POWERSUP_MAP = frozenset(
+ [
+ ("psmodel", "model"),
+ ("psnum", "number"),
+ ("ps_status", "status"),
+ ("ps_status_3k", "status"),
+ ("actual_out", "actual_output"),
+ ("actual_in", "actual_in"),
+ ("total_capa", "total_capacity"),
+ ("input_type", "input_type"),
+ ("watts", "watts"),
+ ("amps", "amps"),
+ ]
+ )
+
+ def populate(self):
+ data = None
+
+ data = self.run("show version", output="json")
+ if data:
+ if isinstance(data, dict):
+ self.facts.update(self.transform_dict(data, self.VERSION_MAP))
+ else:
+ self.facts["hostname"] = self.parse_hostname(data)
+ self.facts["os"] = self.parse_os(data)
+ self.facts["platform"] = self.parse_platform(data)
+
+ data = self.run("show interface", output="json")
+ if data:
+ if isinstance(data, dict):
+ self.facts[
+ "interfaces_list"
+ ] = self.parse_structured_interfaces(data)
+ else:
+ self.facts["interfaces_list"] = self.parse_interfaces(data)
+
+ data = self.run("show vlan brief", output="json")
+ if data:
+ if isinstance(data, dict):
+ self.facts["vlan_list"] = self.parse_structured_vlans(data)
+ else:
+ self.facts["vlan_list"] = self.parse_vlans(data)
+
+ data = self.run("show module", output="json")
+ if data:
+ if isinstance(data, dict):
+ self.facts["module"] = self.parse_structured_module(data)
+ else:
+ self.facts["module"] = self.parse_module(data)
+
+ data = self.run("show environment fan", output="json")
+ if data:
+ if isinstance(data, dict):
+ self.facts["fan_info"] = self.parse_structured_fan_info(data)
+ else:
+ self.facts["fan_info"] = self.parse_fan_info(data)
+
+ data = self.run("show environment power", output="json")
+ if data:
+ if isinstance(data, dict):
+ self.facts[
+ "power_supply_info"
+ ] = self.parse_structured_power_supply_info(data)
+ else:
+ self.facts["power_supply_info"] = self.parse_power_supply_info(
+ data
+ )
+
+ def parse_structured_interfaces(self, data):
+ objects = list()
+ data = data["TABLE_interface"]["ROW_interface"]
+ if isinstance(data, dict):
+ objects.append(data["interface"])
+ elif isinstance(data, list):
+ for item in data:
+ objects.append(item["interface"])
+ return objects
+
+ def parse_structured_vlans(self, data):
+ objects = list()
+ data = data["TABLE_vlanbriefxbrief"]["ROW_vlanbriefxbrief"]
+ if isinstance(data, dict):
+ objects.append(data["vlanshowbr-vlanid-utf"])
+ elif isinstance(data, list):
+ for item in data:
+ objects.append(item["vlanshowbr-vlanid-utf"])
+ return objects
+
+ def parse_structured_module(self, data):
+ data = data["TABLE_modinfo"]["ROW_modinfo"]
+ if isinstance(data, dict):
+ data = [data]
+ objects = list(self.transform_iterable(data, self.MODULE_MAP))
+ return objects
+
+ def parse_structured_fan_info(self, data):
+ objects = list()
+
+ for key in ("fandetails", "fandetails_3k"):
+ if data.get(key):
+ try:
+ data = data[key]["TABLE_faninfo"]["ROW_faninfo"]
+ except KeyError:
+ # Some virtual images don't actually report faninfo. In this case, move on and
+ # just return an empty list.
+ pass
+ else:
+ objects = list(self.transform_iterable(data, self.FAN_MAP))
+ break
+
+ return objects
+
+ def parse_structured_power_supply_info(self, data):
+ ps_data = data.get("powersup", {})
+ if ps_data.get("TABLE_psinfo_n3k"):
+ fact = ps_data["TABLE_psinfo_n3k"]["ROW_psinfo_n3k"]
+ else:
+ # {TABLE,ROW}_psinfo keys have been renamed to
+ # {TABLE,ROW}_ps_info in later NX-OS releases
+ tab_key, row_key = "TABLE_psinfo", "ROW_psinfo"
+ if tab_key not in ps_data:
+ tab_key, row_key = "TABLE_ps_info", "ROW_ps_info"
+
+ ps_tab_data = ps_data[tab_key]
+
+ if isinstance(ps_tab_data, list):
+ fact = []
+ for i in ps_tab_data:
+ fact.append(i[row_key])
+ else:
+ fact = ps_tab_data[row_key]
+
+ objects = list(self.transform_iterable(fact, self.POWERSUP_MAP))
+ return objects
+
+ def parse_hostname(self, data):
+ match = re.search(r"\s+Device name:\s+(\S+)", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_os(self, data):
+ match = re.search(r"\s+system:\s+version\s*(\S+)", data, re.M)
+ if match:
+ return match.group(1)
+ else:
+ match = re.search(r"\s+kickstart:\s+version\s*(\S+)", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_platform(self, data):
+ match = re.search(r"Hardware\n\s+cisco\s+(\S+\s+\S+)", data, re.M)
+ if match:
+ return match.group(1)
+
+ def parse_interfaces(self, data):
+ objects = list()
+ for line in data.split("\n"):
+ if len(line) == 0:
+ continue
+ elif line.startswith("admin") or line[0] == " ":
+ continue
+ else:
+ match = re.match(r"^(\S+)", line)
+ if match:
+ intf = match.group(1)
+ if get_interface_type(intf) != "unknown":
+ objects.append(intf)
+ return objects
+
+ def parse_vlans(self, data):
+ objects = list()
+ for line in data.splitlines():
+ if line == "":
+ continue
+ if line[0].isdigit():
+ vlan = line.split()[0]
+ objects.append(vlan)
+ return objects
+
+ def parse_module(self, data):
+ objects = list()
+ for line in data.splitlines():
+ if line == "":
+ break
+ if line[0].isdigit():
+ obj = {}
+ match_port = re.search(r"\d\s*(\d*)", line, re.M)
+ if match_port:
+ obj["ports"] = match_port.group(1)
+
+ match = re.search(r"\d\s*\d*\s*(.+)$", line, re.M)
+ if match:
+ l = match.group(1).split(" ")
+ items = list()
+ for item in l:
+ if item == "":
+ continue
+ items.append(item.strip())
+
+ if items:
+ obj["type"] = items[0]
+ obj["model"] = items[1]
+ obj["status"] = items[2]
+
+ objects.append(obj)
+ return objects
+
+ def parse_fan_info(self, data):
+ objects = list()
+
+ for l in data.splitlines():
+ if "-----------------" in l or "Status" in l:
+ continue
+ line = l.split()
+ if len(line) > 1:
+ obj = {}
+ obj["name"] = line[0]
+ obj["model"] = line[1]
+ obj["hw_ver"] = line[-2]
+ obj["status"] = line[-1]
+ objects.append(obj)
+ return objects
+
+ def parse_power_supply_info(self, data):
+ objects = list()
+
+ for l in data.splitlines():
+ if l == "":
+ break
+ if l[0].isdigit():
+ obj = {}
+ line = l.split()
+ obj["model"] = line[1]
+ obj["number"] = line[0]
+ obj["status"] = line[-1]
+
+ objects.append(obj)
+ return objects
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_global/lldp_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_global/lldp_global.py
new file mode 100644
index 00000000..d9898840
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_global/lldp_global.py
@@ -0,0 +1,113 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos lldp_global fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.lldp_global.lldp_global import (
+ Lldp_globalArgs,
+)
+
+
+class Lldp_globalFacts(object):
+ """ The nxos lldp_global fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Lldp_globalArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lldp_global
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+
+ if not data:
+ data = connection.get("show running-config | include lldp")
+
+ objs = {}
+ objs = self.render_config(self.generated_spec, data)
+ ansible_facts["ansible_network_resources"].pop("lldp_global", None)
+ facts = {}
+ if objs:
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ facts["lldp_global"] = params["config"]
+ facts = utils.remove_empties(facts)
+ ansible_facts["ansible_network_resources"].update((facts))
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ conf = re.split("\n", conf)
+ for command in conf:
+ param = re.search(
+ r"(.*)lldp (\w+(-?)\w+)", command
+ ) # get the word after 'lldp'
+ if param:
+ # get the nested-dict/value for that param
+ key2 = re.search(r"%s(.*)" % param.group(2), command)
+ key2 = key2.group(1).strip()
+ key1 = param.group(2).replace("-", "_")
+
+ if key1 == "portid_subtype":
+ key1 = "port_id"
+ config[key1] = key2
+ elif key1 == "tlv_select":
+ key2 = key2.split()
+ key2[0] = key2[0].replace("-", "_")
+ if len(key2) == 1:
+ if (
+ "port" in key2[0] or "system" in key2[0]
+ ): # nested dicts
+ key2 = key2[0].split("_")
+ # config[tlv_select][system][name]=False
+ config[key1][key2[0]][key2[1]] = False
+ else:
+ # config[tlv_select][dcbxp]=False
+ config[key1][key2[0]] = False
+ else:
+ # config[tlv_select][management_address][v6]=False
+ config[key1][key2[0]][key2[1]] = False
+ else:
+ config[key1] = key2 # config[reinit]=4
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_interfaces/lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_interfaces/lldp_interfaces.py
new file mode 100644
index 00000000..ebf13bc1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/lldp_interfaces/lldp_interfaces.py
@@ -0,0 +1,129 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos lldp_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.lldp_interfaces.lldp_interfaces import (
+ Lldp_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.utils import (
+ get_interface_type,
+)
+
+
+class Lldp_interfacesFacts(object):
+ """ The nxos lldp_interfaces fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Lldp_interfacesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_device_data(self, connection):
+ return connection.get("show running-config | section ^interface")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for lldp_interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = self.get_device_data(connection)
+
+ objs = []
+
+ data = data.split("interface")
+ resources = []
+
+ for i in range(len(data)):
+ intf = data[i].split("\n")
+ for l in range(1, len(intf)):
+ if not re.search("lldp", intf[l]):
+ intf[l] = ""
+ intf = list(filter(None, intf))
+ intf = "".join(i for i in intf)
+ resources.append(intf)
+
+ for resource in resources:
+ if resource: # and re.search(r'lldp', resource):
+ obj = self.render_config(self.generated_spec, resource)
+ if obj and len(obj.keys()) >= 1:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("lldp_interfaces", None)
+ facts = {}
+ if objs:
+ facts["lldp_interfaces"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["lldp_interfaces"].append(utils.remove_empties(cfg))
+
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
+
+ def render_config(self, spec, conf):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ match = re.search(r"^ (\S+)", conf)
+ if match is None:
+ return {}
+ intf = match.group(1)
+ if get_interface_type(intf) not in ["management", "ethernet"]:
+ return {}
+ config["name"] = intf
+ if "lldp receive" in conf: # for parsed state only
+ config["receive"] = True
+ if "no lldp receive" in conf:
+ config["receive"] = False
+
+ if "lldp transmit" in conf: # for parsed state only
+ config["transmit"] = True
+ if "no lldp transmit" in conf:
+ config["transmit"] = False
+ if "management-address" in conf:
+ config["tlv_set"]["management_address"] = re.search(
+ r"management-address (\S*)", conf
+ ).group(1)
+ if "vlan" in conf:
+ config["tlv_set"]["vlan"] = re.search(r"vlan (\S*)", conf).group(1)
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospf_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospf_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospf_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospf_interfaces/ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospf_interfaces/ospf_interfaces.py
new file mode 100644
index 00000000..44726688
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospf_interfaces/ospf_interfaces.py
@@ -0,0 +1,82 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The nxos ospf_interfaces fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+
+from copy import deepcopy
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.rm_templates.ospf_interfaces import (
+ Ospf_interfacesTemplate,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.ospf_interfaces.ospf_interfaces import (
+ Ospf_interfacesArgs,
+)
+
+
+class Ospf_interfacesFacts(object):
+ """ The nxos ospf_interfaces facts class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Ospf_interfacesArgs.argument_spec
+
+ def get_config(self, connection):
+ """Wrapper method for `connection.get()`
+ This method exists solely to allow the unit test framework to mock device connection calls.
+ """
+ return connection.get("show running-config | section '^interface'")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for Ospf_interfaces network resource
+
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+
+ :rtype: dictionary
+ :returns: facts
+ """
+ facts = {}
+ objs = []
+
+ if not data:
+ data = self.get_config(connection)
+
+ # parse native config using the Ospf_interfaces template
+ ospf_interfaces_parser = Ospf_interfacesTemplate(
+ lines=data.splitlines()
+ )
+ objs = list(ospf_interfaces_parser.parse().values())
+ if objs:
+ for item in objs:
+ item["address_family"] = list(item["address_family"].values())
+ for af in item["address_family"]:
+ if af.get("processes"):
+ af["processes"] = list(af["processes"].values())
+
+ ansible_facts["ansible_network_resources"].pop("ospf_interfaces", None)
+
+ params = utils.remove_empties(
+ utils.validate_config(self.argument_spec, {"config": objs})
+ )
+
+ facts["ospf_interfaces"] = params.get("config", [])
+ ansible_facts["ansible_network_resources"].update(facts)
+
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv2/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv2/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv2/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv2/ospfv2.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv2/ospfv2.py
new file mode 100644
index 00000000..c0c58a3f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv2/ospfv2.py
@@ -0,0 +1,97 @@
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The nxos snmp fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from copy import deepcopy
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.rm_templates.ospfv2 import (
+ Ospfv2Template,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.ospfv2.ospfv2 import (
+ Ospfv2Args,
+)
+
+
+class Ospfv2Facts(object):
+ """ The nxos snmp fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Ospfv2Args.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_config(self, connection):
+ """Wrapper method for `connection.get()`
+ This method exists solely to allow the unit test framework to mock device connection calls.
+ """
+ return connection.get(
+ "show running-config | section '^router ospf .*'"
+ )
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for interfaces
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = self.get_config(connection)
+
+ ipv4 = {"processes": []}
+ for section in data.split("router "):
+ rmmod = Ospfv2Template(lines=section.splitlines())
+ entry = rmmod.parse()
+
+ if entry:
+ global_vals = entry.get("vrfs", {}).pop("vrf_", {})
+ for key, value in iteritems(global_vals):
+ entry[key] = value
+
+ if "vrfs" in entry:
+ entry["vrfs"] = list(entry["vrfs"].values())
+
+ for vrf in entry["vrfs"]:
+ if "areas" in vrf:
+ vrf["areas"] = list(vrf["areas"].values())
+
+ if "areas" in entry:
+ entry["areas"] = list(entry["areas"].values())
+
+ ipv4["processes"].append(entry)
+
+ ansible_facts["ansible_network_resources"].pop("ospfv2", None)
+ facts = {}
+ params = utils.validate_config(self.argument_spec, {"config": ipv4})
+ params = utils.remove_empties(params)
+
+ facts["ospfv2"] = params.get("config", [])
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv3/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv3/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv3/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv3/ospfv3.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv3/ospfv3.py
new file mode 100644
index 00000000..9704b864
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/ospfv3/ospfv3.py
@@ -0,0 +1,93 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The nxos ospfv3 fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from copy import deepcopy
+
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.rm_templates.ospfv3 import (
+ Ospfv3Template,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.ospfv3.ospfv3 import (
+ Ospfv3Args,
+)
+
+
+class Ospfv3Facts(object):
+ """ The nxos ospfv3 facts class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Ospfv3Args.argument_spec
+
+ def get_config(self, connection):
+ """Wrapper method for `connection.get()`
+ This method exists solely to allow the unit test framework to mock device connection calls.
+ """
+ return connection.get("show running-config | section '^router ospfv3'")
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for Ospfv3 network resource
+
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+
+ :rtype: dictionary
+ :returns: facts
+ """
+ if not data:
+ data = self.get_config(connection)
+
+ ipv6 = {"processes": []}
+ for section in data.split("router "):
+ rmmod = Ospfv3Template(lines=section.splitlines())
+ entry = rmmod.parse()
+
+ if entry:
+ global_vals = entry.get("vrfs", {}).pop("vrf_", {})
+ for key, value in iteritems(global_vals):
+ entry[key] = value
+
+ if "vrfs" in entry:
+ entry["vrfs"] = list(entry["vrfs"].values())
+
+ for vrf in entry["vrfs"]:
+ if "areas" in vrf:
+ vrf["areas"] = list(vrf["areas"].values())
+
+ if "areas" in entry:
+ entry["areas"] = list(entry["areas"].values())
+
+ if "address_family" in entry:
+ if "areas" in entry["address_family"]:
+ entry["address_family"]["areas"] = list(
+ entry["address_family"]["areas"].values()
+ )
+
+ ipv6["processes"].append(entry)
+
+ ansible_facts["ansible_network_resources"].pop("ospfv3", None)
+ facts = {}
+ params = utils.validate_config(self.argument_spec, {"config": ipv6})
+ params = utils.remove_empties(params)
+
+ facts["ospfv3"] = params.get("config", [])
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/static_routes/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/static_routes/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/static_routes/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/static_routes/static_routes.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/static_routes/static_routes.py
new file mode 100644
index 00000000..e887fd5f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/static_routes/static_routes.py
@@ -0,0 +1,245 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+"""
+The nxos static_routes fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.static_routes.static_routes import (
+ Static_routesArgs,
+)
+
+
+class Static_routesFacts(object):
+ """ The nxos static_routes fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = Static_routesArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_device_data(self, connection, data):
+ vrf_data = []
+ non_vrf_data = []
+ if not data:
+ non_vrf_data = connection.get(
+ "show running-config | include '^ip(v6)* route'"
+ )
+ vrf_data = connection.get(
+ "show running-config | section '^vrf context'"
+ )
+ if non_vrf_data:
+ non_vrf_data = non_vrf_data.split("\n")
+ else:
+ non_vrf_data = []
+ vrf_data = vrf_data.split("\nvrf context")
+ # as we split based on 'vrf context', it is stripped from the data except the first element
+ else:
+ # used for parsed state where data is from the 'running-config' key
+ data = data.split("\n")
+ i = 0
+ while i <= (len(data) - 1):
+ if "vrf context " in data[i]:
+ vrf_conf = data[i]
+ j = i + 1
+ while j < len(data) and "vrf context " not in data[j]:
+ vrf_conf += "\n" + data[j]
+ j += 1
+ i = j
+ vrf_data.append(vrf_conf)
+ else:
+ non_vrf_data.append(data[i])
+ i += 1
+
+ new_vrf_data = []
+ for v in vrf_data:
+ if re.search(r"\n\s*ip(v6)? route", v):
+ new_vrf_data.append(v)
+ # dont consider vrf if it does not have routes
+ for i in range(len(new_vrf_data)):
+ if not re.search("^vrf context", new_vrf_data[i]):
+ new_vrf_data[i] = "vrf context" + new_vrf_data[i]
+
+ resources = non_vrf_data + new_vrf_data
+ return resources
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for static_routes
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+ resources = self.get_device_data(connection, data)
+ objs = self.render_config(self.generated_spec, resources)
+ ansible_facts["ansible_network_resources"].pop("static_routes", None)
+ facts = {}
+ if objs:
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ params = utils.remove_empties(params)
+ for c in params["config"]:
+ if c == {"vrf": "default"}:
+ params["config"].remove(c)
+ facts["static_routes"] = params["config"]
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def get_inner_dict(self, conf, inner_dict):
+ """
+ This method parses the command to create the innermost dictionary of the config
+ """
+ conf = re.sub(r"\s*ip(v6)? route", "", conf)
+ # strip 'ip route'
+ inner_dict["dest"] = re.match(r"^\s*(\S+\/\d+) .*", conf).group(1)
+
+ # ethernet1/2/23
+ iface = re.match(
+ r".* (Ethernet|loopback|mgmt|port\-channel)(\S*) .*", conf
+ )
+ i = ["Ethernet", "loopback", "mgmt", "port-channel"]
+ if iface and iface.group(1) in i:
+ inner_dict["interface"] = (iface.group(1)) + (iface.group(2))
+ conf = re.sub(inner_dict["interface"], "", conf)
+
+ if "." in inner_dict["dest"]:
+ conf = re.sub(inner_dict["dest"], "", conf)
+ inner_dict["afi"] = "ipv4"
+ ipv4 = re.match(
+ r".* (\d+\.\d+\.\d+\.\d+\/?\d*).*", conf
+ ) # gets next hop ip
+ if ipv4:
+ inner_dict["forward_router_address"] = ipv4.group(1)
+ conf = re.sub(inner_dict["forward_router_address"], "", conf)
+ else:
+ inner_dict["afi"] = "ipv6"
+ conf = re.sub(inner_dict["dest"], "", conf)
+ ipv6 = re.match(r".* (\S*:\S*:\S*\/?\d*).*", conf)
+ if ipv6:
+ inner_dict["forward_router_address"] = ipv6.group(1)
+ conf = re.sub(inner_dict["forward_router_address"], "", conf)
+
+ nullif = re.search(r"null0", conf, re.IGNORECASE)
+ if nullif:
+ inner_dict["interface"] = "Null0"
+ inner_dict["forward_router_address"] = None
+ return inner_dict # dest IP not needed for null if
+
+ keywords = ["vrf", "name", "tag", "track"]
+ for key in keywords:
+ pattern = re.match(r".* (?:%s) (\S+).*" % key, conf)
+ if pattern:
+ if key == "vrf":
+ key = "dest_vrf"
+ elif key == "name":
+ key = "route_name"
+ inner_dict[key] = pattern.group(1).strip()
+ conf = re.sub(key + " " + inner_dict[key], "", conf)
+
+ pref = re.match(r"(?:.*) (\d+)$", conf)
+ if pref:
+ # if something is left at the end without any key, it is the pref
+ inner_dict["admin_distance"] = pref.group(1)
+ return inner_dict
+
+ def get_command(self, conf, afi_list, dest_list, af):
+ inner_dict = {}
+ inner_dict = self.get_inner_dict(conf, inner_dict)
+ if inner_dict["afi"] not in afi_list:
+ af.append({"afi": inner_dict["afi"], "routes": []})
+ afi_list.append(inner_dict["afi"])
+
+ next_hop = {}
+ params = [
+ "forward_router_address",
+ "interface",
+ "admin_distance",
+ "route_name",
+ "tag",
+ "track",
+ "dest_vrf",
+ ]
+ for p in params:
+ if p in inner_dict.keys():
+ next_hop.update({p: inner_dict[p]})
+
+ if inner_dict["dest"] not in dest_list:
+ dest_list.append(inner_dict["dest"])
+ af[-1]["routes"].append(
+ {"dest": inner_dict["dest"], "next_hops": []}
+ )
+ # if 'dest' is new, create new list under 'routes'
+ af[-1]["routes"][-1]["next_hops"].append(next_hop)
+ else:
+ af[-1]["routes"][-1]["next_hops"].append(next_hop)
+ # just append if dest already exists
+ return af
+
+ def render_config(self, spec, con):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ # config=deepcopy(spec)
+ config = []
+ global_afi_list = []
+ global_af = []
+ global_dest_list = []
+ if con:
+ for conf in con:
+ if conf.startswith("vrf context"):
+ svrf = re.match(r"vrf context (\S+)\n", conf).group(1)
+ afi_list = []
+ af = []
+ dest_list = []
+ config_dict = {"vrf": svrf, "address_families": []}
+ conf = conf.split("\n")
+ # considering from the second line as first line is 'vrf context..'
+ conf = conf[1:]
+ for c in conf:
+ if "ip route" in c or "ipv6 route" in c:
+ self.get_command(c, afi_list, dest_list, af)
+ config_dict["address_families"] = af
+ config.append(config_dict)
+ else:
+ if "ip route" in conf or "ipv6 route" in conf:
+ self.get_command(
+ conf, global_afi_list, global_dest_list, global_af
+ )
+ if global_af:
+ config.append(
+ utils.remove_empties({"address_families": global_af})
+ )
+ return config
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/telemetry/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/telemetry/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/telemetry/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/telemetry/telemetry.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/telemetry/telemetry.py
new file mode 100644
index 00000000..47fdf118
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/telemetry/telemetry.py
@@ -0,0 +1,210 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos telemetry fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.telemetry.telemetry import (
+ TelemetryArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.cmdref.telemetry.telemetry import (
+ TMS_GLOBAL,
+ TMS_DESTGROUP,
+ TMS_SENSORGROUP,
+ TMS_SUBSCRIPTION,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.telemetry.telemetry import (
+ get_instance_data,
+ cr_key_lookup,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.utils.telemetry.telemetry import (
+ normalize_data,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ NxosCmdRef,
+)
+
+
+class TelemetryFacts(object):
+ """ The nxos telemetry fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = TelemetryArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for telemetry
+ :param connection: the device connection
+ :param ansible_facts: Facts dictionary
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ if connection: # just for linting purposes, remove
+ pass
+
+ cmd_ref = {}
+ cmd_ref["TMS_GLOBAL"] = {}
+ cmd_ref["TMS_DESTGROUP"] = {}
+ cmd_ref["TMS_SENSORGROUP"] = {}
+ cmd_ref["TMS_SUBSCRIPTION"] = {}
+
+ # For fact gathering, module state should be 'present' when using
+ # NxosCmdRef to query state
+ if self._module.params.get("state"):
+ saved_module_state = self._module.params["state"]
+ self._module.params["state"] = "present"
+
+ # Get Telemetry Global Data
+ cmd_ref["TMS_GLOBAL"]["ref"] = []
+ cmd_ref["TMS_GLOBAL"]["ref"].append(
+ NxosCmdRef(self._module, TMS_GLOBAL)
+ )
+ ref = cmd_ref["TMS_GLOBAL"]["ref"][0]
+ ref.set_context()
+ ref.get_existing()
+ device_cache = ref.cache_existing
+
+ if device_cache is None:
+ device_cache_lines = []
+ else:
+ device_cache_lines = device_cache.split("\n")
+
+ # Get Telemetry Destination Group Data
+ cmd_ref["TMS_DESTGROUP"]["ref"] = []
+ for line in device_cache_lines:
+ if re.search(r"destination-group", line):
+ resource_key = line.strip()
+ cmd_ref["TMS_DESTGROUP"]["ref"].append(
+ NxosCmdRef(self._module, TMS_DESTGROUP)
+ )
+ ref = cmd_ref["TMS_DESTGROUP"]["ref"][-1]
+ ref.set_context([resource_key])
+ ref.get_existing(device_cache)
+ normalize_data(ref)
+
+ # Get Telemetry Sensorgroup Group Data
+ cmd_ref["TMS_SENSORGROUP"]["ref"] = []
+ for line in device_cache_lines:
+ if re.search(r"sensor-group", line):
+ resource_key = line.strip()
+ cmd_ref["TMS_SENSORGROUP"]["ref"].append(
+ NxosCmdRef(self._module, TMS_SENSORGROUP)
+ )
+ ref = cmd_ref["TMS_SENSORGROUP"]["ref"][-1]
+ ref.set_context([resource_key])
+ ref.get_existing(device_cache)
+
+ # Get Telemetry Subscription Data
+ cmd_ref["TMS_SUBSCRIPTION"]["ref"] = []
+ for line in device_cache_lines:
+ if re.search(r"subscription", line):
+ resource_key = line.strip()
+ cmd_ref["TMS_SUBSCRIPTION"]["ref"].append(
+ NxosCmdRef(self._module, TMS_SUBSCRIPTION)
+ )
+ ref = cmd_ref["TMS_SUBSCRIPTION"]["ref"][-1]
+ ref.set_context([resource_key])
+ ref.get_existing(device_cache)
+
+ objs = []
+ objs = self.render_config(self.generated_spec, cmd_ref)
+ facts = {"telemetry": {}}
+ if objs:
+ # params = utils.validate_config(self.argument_spec, {'config': objs})
+ facts["telemetry"] = objs
+
+ ansible_facts["ansible_network_resources"].update(facts)
+ if self._module.params.get("state"):
+ self._module.params["state"] = saved_module_state
+ return ansible_facts
+
+ def render_config(self, spec, cmd_ref):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+
+ :param spec: The facts tree, generated from the argspec
+ :param conf: The configuration
+ :rtype: dictionary
+ :returns: The generated config
+ """
+ config = deepcopy(spec)
+ config["destination_groups"] = []
+ config["sensor_groups"] = []
+ config["subscriptions"] = []
+ managed_objects = [
+ "TMS_GLOBAL",
+ "TMS_DESTGROUP",
+ "TMS_SENSORGROUP",
+ "TMS_SUBSCRIPTION",
+ ]
+
+ # Walk the argspec and cmd_ref objects and build out config dict.
+ for key in config.keys():
+ for mo in managed_objects:
+ for cr in cmd_ref[mo]["ref"]:
+ cr_keys = cr_key_lookup(key, mo)
+ for cr_key in cr_keys:
+ if cr._ref.get(cr_key) and cr._ref[cr_key].get(
+ "existing"
+ ):
+ if isinstance(config[key], dict):
+ for k in config[key].keys():
+ for existing_key in cr._ref[cr_key][
+ "existing"
+ ].keys():
+ config[key][k] = cr._ref[cr_key][
+ "existing"
+ ][existing_key][k]
+ continue
+ if isinstance(config[key], list):
+ for existing_key in cr._ref[cr_key][
+ "existing"
+ ].keys():
+ data = get_instance_data(
+ key, cr_key, cr, existing_key
+ )
+ config[key].append(data)
+ continue
+ for existing_key in cr._ref[cr_key][
+ "existing"
+ ].keys():
+ config[key] = cr._ref[cr_key]["existing"][
+ existing_key
+ ]
+ elif cr._ref.get(cr_key):
+ data = get_instance_data(key, cr_key, cr, None)
+ if (
+ isinstance(config[key], list)
+ and data not in config[key]
+ ):
+ config[key].append(data)
+
+ return utils.remove_empties(config)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/vlans/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/vlans/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/vlans/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/vlans/vlans.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/vlans/vlans.py
new file mode 100644
index 00000000..78951140
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/facts/vlans/vlans.py
@@ -0,0 +1,192 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)#!/usr/bin/python
+
+"""
+The nxos vlans fact class
+It is in this file the configuration is collected from the device
+for a given resource, parsed, and the facts tree is populated
+based on the configuration.
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+import ast
+from copy import deepcopy
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common import (
+ utils,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ parse_conf_arg,
+ parse_conf_cmd_arg,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.vlans.vlans import (
+ VlansArgs,
+)
+
+
+class VlansFacts(object):
+ """ The nxos vlans fact class
+ """
+
+ def __init__(self, module, subspec="config", options="options"):
+ self._module = module
+ self.argument_spec = VlansArgs.argument_spec
+ spec = deepcopy(self.argument_spec)
+ if subspec:
+ if options:
+ facts_argument_spec = spec[subspec][options]
+ else:
+ facts_argument_spec = spec[subspec]
+ else:
+ facts_argument_spec = spec
+
+ self.generated_spec = utils.generate_dict(facts_argument_spec)
+
+ def get_device_data(self, connection, show_cmd):
+ """Wrapper method for `connection.get()`
+ This exists solely to allow the unit test framework to mock device connection calls.
+ """
+ return connection.get(show_cmd)
+
+ def populate_facts(self, connection, ansible_facts, data=None):
+ """ Populate the facts for vlans
+ :param connection: the device connection
+ :param data: previously collected conf
+ :rtype: dictionary
+ :returns: facts
+ """
+ objs = []
+ # **TBD**
+ # N7K EOL/legacy image 6.2 does not support show vlan | json output.
+ # If support is still required for this image then:
+ # - Wrapp the json calls below in a try/except
+ # - When excepted, use a helper method to parse the run_cfg_output,
+ # using the run_cfg_output data to generate compatible json data that
+ # can be read by normalize_table_data.
+ if not data:
+ # Use structured for most of the vlan parameter states.
+ # This data is consistent across the supported nxos platforms.
+ structured = self.get_device_data(connection, "show vlan | json")
+
+ # Raw cli config is needed for mapped_vni, which is not included in structured.
+ run_cfg_output = self.get_device_data(
+ connection, "show running-config | section ^vlan"
+ )
+ else:
+ running_config = data.split("\n\n")
+ structured, run_cfg_output = running_config[0], running_config[1]
+
+ # Create a single dictionary from all data sources
+ data = self.normalize_table_data(structured, run_cfg_output)
+
+ for vlan in data:
+ obj = self.render_config(self.generated_spec, vlan)
+ if obj:
+ objs.append(obj)
+
+ ansible_facts["ansible_network_resources"].pop("vlans", None)
+ facts = {}
+ if objs:
+ facts["vlans"] = []
+ params = utils.validate_config(
+ self.argument_spec, {"config": objs}
+ )
+ for cfg in params["config"]:
+ facts["vlans"].append(utils.remove_empties(cfg))
+ ansible_facts["ansible_network_resources"].update(facts)
+ return ansible_facts
+
+ def render_config(self, spec, vlan):
+ """
+ Render config as dictionary structure and delete keys
+ from spec for null values
+ :param spec: The facts tree, generated from the argspec
+ :param vlan: structured data vlan settings (dict) and raw cfg from device
+ :rtype: dictionary
+ :returns: The generated config
+ Sample inputs: test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan
+ """
+ obj = deepcopy(spec)
+
+ obj["vlan_id"] = vlan["vlan_id"]
+
+ # name: 'VLAN000x' (default name) or custom name
+ name = vlan["vlanshowbr-vlanname"]
+ if name and re.match("VLAN%04d" % int(vlan["vlan_id"]), name):
+ name = None
+ obj["name"] = name
+
+ # mode: 'ce-vlan' or 'fabricpath-vlan'
+ obj["mode"] = vlan["vlanshowinfo-vlanmode"].replace("-vlan", "")
+
+ # enabled: shutdown, noshutdown
+ obj["enabled"] = (
+ True if "noshutdown" in vlan["vlanshowbr-shutstate"] else False
+ )
+
+ # state: active, suspend
+ obj["state"] = vlan["vlanshowbr-vlanstate"]
+
+ # non-structured data
+ obj["mapped_vni"] = parse_conf_arg(vlan["run_cfg"], "vn-segment")
+
+ return utils.remove_empties(obj)
+
+ def normalize_table_data(self, structured, run_cfg_output):
+ """Normalize structured output and raw running-config output into
+ a single dict to simplify render_config usage.
+ This is needed because:
+ - The NXOS devices report most of the vlan settings within two
+ structured data keys: 'vlanbrief' and 'mtuinfo', but the output is
+ incomplete and therefore raw running-config data is also needed.
+ - running-config by itself is insufficient because of major differences
+ in the cli config syntax across platforms.
+ - Thus a helper method combines settings from the separate top-level keys,
+ and adds a 'run_cfg' key containing raw cli from the device.
+ """
+ # device output may be string, convert to list
+ structured = ast.literal_eval(str(structured))
+
+ vlanbrief = []
+ mtuinfo = []
+ if "TABLE_vlanbrief" in structured:
+ # SAMPLE: {"TABLE_vlanbriefid": {"ROW_vlanbriefid": {
+ # "vlanshowbr-vlanid": "4", "vlanshowbr-vlanid-utf": "4",
+ # "vlanshowbr-vlanname": "VLAN0004", "vlanshowbr-vlanstate": "active",
+ # "vlanshowbr-shutstate": "noshutdown"}},
+ vlanbrief = structured["TABLE_vlanbrief"]["ROW_vlanbrief"]
+
+ # SAMPLE: "TABLE_mtuinfoid": {"ROW_mtuinfoid": {
+ # "vlanshowinfo-vlanid": "4", "vlanshowinfo-media-type": "enet",
+ # "vlanshowinfo-vlanmode": "ce-vlan"}}
+ mtuinfo = structured["TABLE_mtuinfo"]["ROW_mtuinfo"]
+
+ if type(vlanbrief) is not list:
+ # vlanbrief is not a list when only one vlan is found.
+ vlanbrief = [vlanbrief]
+ mtuinfo = [mtuinfo]
+
+ # split out any per-vlan cli config
+ run_cfg_list = re.split(r"[\n^]vlan ", run_cfg_output)
+
+ # Create a list of vlan dicts where each dict contains vlanbrief,
+ # mtuinfo, and non-structured running-config data for one vlan.
+ vlans = []
+ for index, v in enumerate(vlanbrief):
+ v["vlan_id"] = v.get("vlanshowbr-vlanid-utf")
+ vlan = {}
+ vlan.update(v)
+ vlan.update(mtuinfo[index])
+
+ run_cfg = [
+ i for i in run_cfg_list if "%s\n" % v["vlan_id"] in i
+ ] or [""]
+ vlan["run_cfg"] = run_cfg.pop()
+ vlans.append(vlan)
+ return vlans
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/nxos.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/nxos.py
new file mode 100644
index 00000000..32ecc0d8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/nxos.py
@@ -0,0 +1,1501 @@
+#
+# This code is part of Ansible, but is an independent component.
+#
+# This particular file snippet, and this file snippet only, is BSD licensed.
+# Modules you write using this snippet, which is embedded dynamically by Ansible
+# still belong to the author of the module, and may assign their own license
+# to the complete work.
+#
+# Copyright: (c) 2017, Red Hat Inc.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+import collections
+import json
+import re
+import sys
+from copy import deepcopy
+
+from ansible.module_utils._text import to_text
+from ansible.module_utils.basic import env_fallback
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+ ComplexList,
+)
+from ansible.module_utils.connection import Connection, ConnectionError
+from ansible.module_utils.common._collections_compat import Mapping
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+ dumps,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+from ansible.module_utils.six import iteritems, PY2, PY3
+from ansible.module_utils.urls import fetch_url
+
+try:
+ import yaml
+
+ HAS_YAML = True
+except ImportError:
+ HAS_YAML = False
+
+try:
+ if sys.version_info[:2] < (2, 7):
+ from ordereddict import OrderedDict
+ else:
+ from collections import OrderedDict
+ HAS_ORDEREDDICT = True
+except ImportError:
+ HAS_ORDEREDDICT = False
+
+_DEVICE_CONNECTION = None
+
+nxos_provider_spec = {
+ "host": dict(type="str"),
+ "port": dict(type="int"),
+ "username": dict(
+ type="str", fallback=(env_fallback, ["ANSIBLE_NET_USERNAME"])
+ ),
+ "password": dict(
+ type="str",
+ no_log=True,
+ fallback=(env_fallback, ["ANSIBLE_NET_PASSWORD"]),
+ ),
+ "ssh_keyfile": dict(
+ type="str", fallback=(env_fallback, ["ANSIBLE_NET_SSH_KEYFILE"])
+ ),
+ "authorize": dict(
+ type="bool",
+ default=False,
+ fallback=(env_fallback, ["ANSIBLE_NET_AUTHORIZE"]),
+ ),
+ "auth_pass": dict(
+ type="str",
+ no_log=True,
+ fallback=(env_fallback, ["ANSIBLE_NET_AUTH_PASS"]),
+ ),
+ "use_ssl": dict(type="bool", default=False),
+ "use_proxy": dict(type="bool", default=True),
+ "validate_certs": dict(type="bool", default=False),
+ "timeout": dict(type="int"),
+ "transport": dict(type="str", default="cli", choices=["cli", "nxapi"]),
+}
+nxos_argument_spec = {
+ "provider": dict(
+ type="dict",
+ options=nxos_provider_spec,
+ removed_at_date="2022-06-01",
+ removed_from_collection="cisco.nxos",
+ )
+}
+
+
+def get_provider_argspec():
+ return nxos_provider_spec
+
+
+def get_connection(module):
+ global _DEVICE_CONNECTION
+ if not _DEVICE_CONNECTION:
+ if is_local_nxapi(module):
+ conn = LocalNxapi(module)
+ else:
+ connection_proxy = Connection(module._socket_path)
+ cap = json.loads(connection_proxy.get_capabilities())
+ if cap["network_api"] == "cliconf":
+ conn = Cli(module)
+ elif cap["network_api"] == "nxapi":
+ conn = HttpApi(module)
+ _DEVICE_CONNECTION = conn
+ return _DEVICE_CONNECTION
+
+
+class Cli:
+ def __init__(self, module):
+ self._module = module
+ self._device_configs = {}
+ self._connection = None
+
+ def _get_connection(self):
+ if self._connection:
+ return self._connection
+ self._connection = Connection(self._module._socket_path)
+
+ return self._connection
+
+ def get_config(self, flags=None):
+ """Retrieves the current config from the device or cache
+ """
+ flags = [] if flags is None else flags
+
+ cmd = "show running-config "
+ cmd += " ".join(flags)
+ cmd = cmd.strip()
+
+ try:
+ return self._device_configs[cmd]
+ except KeyError:
+ connection = self._get_connection()
+ try:
+ out = connection.get_config(flags=flags)
+ except ConnectionError as exc:
+ self._module.fail_json(
+ msg=to_text(exc, errors="surrogate_then_replace")
+ )
+
+ cfg = to_text(out, errors="surrogate_then_replace").strip() + "\n"
+ self._device_configs[cmd] = cfg
+ return cfg
+
+ def run_commands(self, commands, check_rc=True):
+ """Run list of commands on remote device and return results
+ """
+ connection = self._get_connection()
+
+ try:
+ out = connection.run_commands(commands, check_rc)
+ if check_rc == "retry_json":
+ capabilities = self.get_capabilities()
+ network_api = capabilities.get("network_api")
+
+ if network_api == "cliconf" and out:
+ for index, resp in enumerate(out):
+ if (
+ "Invalid command at" in resp
+ or "Ambiguous command at" in resp
+ ) and "json" in resp:
+ if commands[index]["output"] == "json":
+ commands[index]["output"] = "text"
+ out = connection.run_commands(
+ commands, check_rc
+ )
+ return out
+ except ConnectionError as exc:
+ self._module.fail_json(msg=to_text(exc))
+
+ def load_config(self, config, return_error=False, opts=None, replace=None):
+ """Sends configuration commands to the remote device
+ """
+ if opts is None:
+ opts = {}
+
+ connection = self._get_connection()
+ responses = []
+ try:
+ resp = connection.edit_config(config, replace=replace)
+ if isinstance(resp, Mapping):
+ resp = resp["response"]
+ except ConnectionError as e:
+ code = getattr(e, "code", 1)
+ message = getattr(e, "err", e)
+ err = to_text(message, errors="surrogate_then_replace")
+ if opts.get("ignore_timeout") and code:
+ responses.append(err)
+ return responses
+ elif code and "no graceful-restart" in err:
+ if (
+ "ISSU/HA will be affected if Graceful Restart is disabled"
+ in err
+ ):
+ msg = [""]
+ responses.extend(msg)
+ return responses
+ else:
+ self._module.fail_json(msg=err)
+ elif code:
+ self._module.fail_json(msg=err)
+
+ responses.extend(resp)
+ return responses
+
+ def get_diff(
+ self,
+ candidate=None,
+ running=None,
+ diff_match="line",
+ diff_ignore_lines=None,
+ path=None,
+ diff_replace="line",
+ ):
+ conn = self._get_connection()
+ try:
+ response = conn.get_diff(
+ candidate=candidate,
+ running=running,
+ diff_match=diff_match,
+ diff_ignore_lines=diff_ignore_lines,
+ path=path,
+ diff_replace=diff_replace,
+ )
+ except ConnectionError as exc:
+ self._module.fail_json(
+ msg=to_text(exc, errors="surrogate_then_replace")
+ )
+ return response
+
+ def get_capabilities(self):
+ """Returns platform info of the remove device
+ """
+ if hasattr(self._module, "_capabilities"):
+ return self._module._capabilities
+
+ connection = self._get_connection()
+ try:
+ capabilities = connection.get_capabilities()
+ except ConnectionError as exc:
+ self._module.fail_json(
+ msg=to_text(exc, errors="surrogate_then_replace")
+ )
+ self._module._capabilities = json.loads(capabilities)
+ return self._module._capabilities
+
+ def read_module_context(self, module_key):
+ connection = self._get_connection()
+ try:
+ module_context = connection.read_module_context(module_key)
+ except ConnectionError as exc:
+ self._module.fail_json(
+ msg=to_text(exc, errors="surrogate_then_replace")
+ )
+
+ return module_context
+
+ def save_module_context(self, module_key, module_context):
+ connection = self._get_connection()
+ try:
+ connection.save_module_context(module_key, module_context)
+ except ConnectionError as exc:
+ self._module.fail_json(
+ msg=to_text(exc, errors="surrogate_then_replace")
+ )
+
+ return None
+
+
+class LocalNxapi:
+
+ OUTPUT_TO_COMMAND_TYPE = {
+ "text": "cli_show_ascii",
+ "json": "cli_show",
+ "bash": "bash",
+ "config": "cli_conf",
+ }
+
+ def __init__(self, module):
+ self._module = module
+ self._nxapi_auth = None
+ self._device_configs = {}
+ self._module_context = {}
+
+ provider = self._module.params.get("provider") or {}
+ self._module.params["url_username"] = provider.get("username")
+ self._module.params["url_password"] = provider.get("password")
+
+ host = provider.get("host")
+ port = provider.get("port")
+
+ if provider.get("use_ssl"):
+ proto = "https"
+ port = port or 443
+ else:
+ proto = "http"
+ port = port or 80
+
+ self._url = "%s://%s:%s/ins" % (proto, host, port)
+
+ def _error(self, msg, **kwargs):
+ self._nxapi_auth = None
+ if "url" not in kwargs:
+ kwargs["url"] = self._url
+ self._module.fail_json(msg=msg, **kwargs)
+
+ def _request_builder(
+ self, commands, output, version="1.0", chunk="0", sid=None
+ ):
+ """Encodes a NXAPI JSON request message
+ """
+ try:
+ command_type = self.OUTPUT_TO_COMMAND_TYPE[output]
+ except KeyError:
+ msg = "invalid format, received %s, expected one of %s" % (
+ output,
+ ",".join(self.OUTPUT_TO_COMMAND_TYPE.keys()),
+ )
+ self._error(msg=msg)
+
+ if isinstance(commands, (list, set, tuple)):
+ commands = " ;".join(commands)
+
+ # Order should not matter but some versions of NX-OS software fail
+ # to process the payload properly if 'input' gets serialized before
+ # 'type' and the payload of 'input' contains the word 'type'.
+ msg = collections.OrderedDict()
+ msg["version"] = version
+ msg["type"] = command_type
+ msg["chunk"] = chunk
+ msg["sid"] = sid
+ msg["input"] = commands
+ msg["output_format"] = "json"
+
+ return dict(ins_api=msg)
+
+ def send_request(
+ self,
+ commands,
+ output="text",
+ check_status=True,
+ return_error=False,
+ opts=None,
+ ):
+ # only 10 show commands can be encoded in each request
+ # messages sent to the remote device
+ if opts is None:
+ opts = {}
+ if output != "config":
+ commands = collections.deque(to_list(commands))
+ stack = list()
+ requests = list()
+
+ while commands:
+ stack.append(commands.popleft())
+ if len(stack) == 10:
+ body = self._request_builder(stack, output)
+ data = self._module.jsonify(body)
+ requests.append(data)
+ stack = list()
+
+ if stack:
+ body = self._request_builder(stack, output)
+ data = self._module.jsonify(body)
+ requests.append(data)
+
+ else:
+ body = self._request_builder(commands, "config")
+ requests = [self._module.jsonify(body)]
+
+ headers = {"Content-Type": "application/json"}
+ result = list()
+ timeout = self._module.params["provider"]["timeout"]
+ use_proxy = self._module.params["provider"]["use_proxy"]
+
+ for req in requests:
+ if self._nxapi_auth:
+ headers["Cookie"] = self._nxapi_auth
+
+ response, headers = fetch_url(
+ self._module,
+ self._url,
+ data=req,
+ headers=headers,
+ timeout=timeout,
+ method="POST",
+ use_proxy=use_proxy,
+ )
+ self._nxapi_auth = headers.get("set-cookie")
+
+ if opts.get("ignore_timeout") and re.search(
+ r"(-1|5\d\d)", str(headers["status"])
+ ):
+ result.append(headers["status"])
+ return result
+ elif headers["status"] != 200:
+ self._error(**headers)
+
+ try:
+ response = self._module.from_json(response.read())
+ except ValueError:
+ self._module.fail_json(msg="unable to parse response")
+
+ if response["ins_api"].get("outputs"):
+ output = response["ins_api"]["outputs"]["output"]
+ for item in to_list(output):
+ if check_status is True and item["code"] != "200":
+ if return_error:
+ result.append(item)
+ else:
+ self._error(output=output, **item)
+ elif "body" in item:
+ result.append(item["body"])
+ # else:
+ # error in command but since check_status is disabled
+ # silently drop it.
+ # result.append(item['msg'])
+
+ return result
+
+ def get_config(self, flags=None):
+ """Retrieves the current config from the device or cache
+ """
+ flags = [] if flags is None else flags
+
+ cmd = "show running-config "
+ cmd += " ".join(flags)
+ cmd = cmd.strip()
+
+ try:
+ return self._device_configs[cmd]
+ except KeyError:
+ out = self.send_request(cmd)
+ cfg = str(out[0]).strip()
+ self._device_configs[cmd] = cfg
+ return cfg
+
+ def run_commands(self, commands, check_rc=True):
+ """Run list of commands on remote device and return results
+ """
+ output = None
+ queue = list()
+ responses = list()
+
+ def _send(commands, output):
+ return self.send_request(commands, output, check_status=check_rc)
+
+ for item in to_list(commands):
+ if is_json(item["command"]):
+ item["command"] = str(item["command"]).rsplit("|", 1)[0]
+ item["output"] = "json"
+
+ if all((output == "json", item["output"] == "text")) or all(
+ (output == "text", item["output"] == "json")
+ ):
+ responses.extend(_send(queue, output))
+ queue = list()
+
+ output = item["output"] or "json"
+ queue.append(item["command"])
+
+ if queue:
+ responses.extend(_send(queue, output))
+
+ return responses
+
+ def load_config(
+ self, commands, return_error=False, opts=None, replace=None
+ ):
+ """Sends the ordered set of commands to the device
+ """
+
+ if opts is None:
+ opts = {}
+
+ responses = []
+
+ if replace:
+ device_info = self.get_device_info()
+ if "9K" not in device_info.get("network_os_platform", ""):
+ self._module.fail_json(
+ msg="replace is supported only on Nexus 9K devices"
+ )
+ commands = "config replace {0}".format(replace)
+
+ commands = to_list(commands)
+ try:
+ resp = self.send_request(
+ commands,
+ output="config",
+ check_status=True,
+ return_error=return_error,
+ opts=opts,
+ )
+ except ValueError as exc:
+ code = getattr(exc, "code", 1)
+ message = getattr(exc, "err", exc)
+ err = to_text(message, errors="surrogate_then_replace")
+ if opts.get("ignore_timeout") and code:
+ responses.append(code)
+ return responses
+ elif code and "no graceful-restart" in err:
+ if (
+ "ISSU/HA will be affected if Graceful Restart is disabled"
+ in err
+ ):
+ msg = [""]
+ responses.extend(msg)
+ return responses
+ else:
+ self._module.fail_json(msg=err)
+ elif code:
+ self._module.fail_json(msg=err)
+
+ if return_error:
+ return resp
+ else:
+ return responses.extend(resp)
+
+ def get_diff(
+ self,
+ candidate=None,
+ running=None,
+ diff_match="line",
+ diff_ignore_lines=None,
+ path=None,
+ diff_replace="line",
+ ):
+ diff = {}
+
+ # prepare candidate configuration
+ candidate_obj = NetworkConfig(indent=2)
+ candidate_obj.load(candidate)
+
+ if running and diff_match != "none" and diff_replace != "config":
+ # running configuration
+ running_obj = NetworkConfig(
+ indent=2, contents=running, ignore_lines=diff_ignore_lines
+ )
+ configdiffobjs = candidate_obj.difference(
+ running_obj, path=path, match=diff_match, replace=diff_replace
+ )
+
+ else:
+ configdiffobjs = candidate_obj.items
+
+ diff["config_diff"] = (
+ dumps(configdiffobjs, "commands") if configdiffobjs else ""
+ )
+ return diff
+
+ def get_device_info(self):
+ device_info = {}
+
+ device_info["network_os"] = "nxos"
+ reply = self.run_commands(
+ {"command": "show version", "output": "json"}
+ )
+ data = reply[0]
+
+ platform_reply = self.run_commands(
+ {"command": "show inventory", "output": "json"}
+ )
+ platform_info = platform_reply[0]
+
+ device_info["network_os_version"] = data.get(
+ "sys_ver_str"
+ ) or data.get("kickstart_ver_str")
+ device_info["network_os_model"] = data["chassis_id"]
+ device_info["network_os_hostname"] = data["host_name"]
+ device_info["network_os_image"] = data.get(
+ "isan_file_name"
+ ) or data.get("kick_file_name")
+
+ if platform_info:
+ inventory_table = platform_info["TABLE_inv"]["ROW_inv"]
+ for info in inventory_table:
+ if "Chassis" in info["name"]:
+ device_info["network_os_platform"] = info["productid"]
+
+ return device_info
+
+ def get_capabilities(self):
+ result = {}
+ result["device_info"] = self.get_device_info()
+ result["network_api"] = "nxapi"
+ return result
+
+ def read_module_context(self, module_key):
+ if self._module_context.get(module_key):
+ return self._module_context[module_key]
+
+ return None
+
+ def save_module_context(self, module_key, module_context):
+ self._module_context[module_key] = module_context
+
+ return None
+
+
+class HttpApi:
+ def __init__(self, module):
+ self._module = module
+ self._device_configs = {}
+ self._module_context = {}
+ self._connection_obj = None
+
+ @property
+ def _connection(self):
+ if not self._connection_obj:
+ self._connection_obj = Connection(self._module._socket_path)
+
+ return self._connection_obj
+
+ def run_commands(self, commands, check_rc=True):
+ """Runs list of commands on remote device and returns results
+ """
+ try:
+ out = self._connection.send_request(commands)
+ except ConnectionError as exc:
+ if check_rc is True:
+ raise
+ out = to_text(exc)
+
+ out = to_list(out)
+ if not out[0]:
+ return out
+
+ for index, response in enumerate(out):
+ if response[0] == "{":
+ out[index] = json.loads(response)
+
+ return out
+
+ def get_config(self, flags=None):
+ """Retrieves the current config from the device or cache
+ """
+ flags = [] if flags is None else flags
+
+ cmd = "show running-config "
+ cmd += " ".join(flags)
+ cmd = cmd.strip()
+
+ try:
+ return self._device_configs[cmd]
+ except KeyError:
+ try:
+ out = self._connection.send_request(cmd)
+ except ConnectionError as exc:
+ self._module.fail_json(
+ msg=to_text(exc, errors="surrogate_then_replace")
+ )
+
+ cfg = to_text(out).strip()
+ self._device_configs[cmd] = cfg
+ return cfg
+
+ def get_diff(
+ self,
+ candidate=None,
+ running=None,
+ diff_match="line",
+ diff_ignore_lines=None,
+ path=None,
+ diff_replace="line",
+ ):
+ diff = {}
+
+ # prepare candidate configuration
+ candidate_obj = NetworkConfig(indent=2)
+ candidate_obj.load(candidate)
+
+ if running and diff_match != "none" and diff_replace != "config":
+ # running configuration
+ running_obj = NetworkConfig(
+ indent=2, contents=running, ignore_lines=diff_ignore_lines
+ )
+ configdiffobjs = candidate_obj.difference(
+ running_obj, path=path, match=diff_match, replace=diff_replace
+ )
+
+ else:
+ configdiffobjs = candidate_obj.items
+
+ diff["config_diff"] = (
+ dumps(configdiffobjs, "commands") if configdiffobjs else ""
+ )
+ return diff
+
+ def load_config(
+ self, commands, return_error=False, opts=None, replace=None
+ ):
+ """Sends the ordered set of commands to the device
+ """
+ if opts is None:
+ opts = {}
+
+ responses = []
+ try:
+ resp = self.edit_config(commands, replace=replace)
+ except ConnectionError as exc:
+ code = getattr(exc, "code", 1)
+ message = getattr(exc, "err", exc)
+ err = to_text(message, errors="surrogate_then_replace")
+ if opts.get("ignore_timeout") and code:
+ responses.append(code)
+ return responses
+ elif opts.get("catch_clierror") and "400" in code:
+ return [code, err]
+ elif code and "no graceful-restart" in err:
+ if (
+ "ISSU/HA will be affected if Graceful Restart is disabled"
+ in err
+ ):
+ msg = [""]
+ responses.extend(msg)
+ return responses
+ else:
+ self._module.fail_json(msg=err)
+ elif code:
+ self._module.fail_json(msg=err)
+
+ responses.extend(resp)
+ return responses
+
+ def edit_config(
+ self, candidate=None, commit=True, replace=None, comment=None
+ ):
+ resp = list()
+
+ self.check_edit_config_capability(candidate, commit, replace, comment)
+
+ if replace:
+ candidate = "config replace {0}".format(replace)
+
+ responses = self._connection.send_request(candidate, output="config")
+ for response in to_list(responses):
+ if response != "{}":
+ resp.append(response)
+ if not resp:
+ resp = [""]
+
+ return resp
+
+ def get_capabilities(self):
+ """Returns platform info of the remove device
+ """
+ try:
+ capabilities = self._connection.get_capabilities()
+ except ConnectionError as exc:
+ self._module.fail_json(
+ msg=to_text(exc, errors="surrogate_then_replace")
+ )
+
+ return json.loads(capabilities)
+
+ def check_edit_config_capability(
+ self, candidate=None, commit=True, replace=None, comment=None
+ ):
+ operations = self._connection.get_device_operations()
+
+ if not candidate and not replace:
+ raise ValueError(
+ "must provide a candidate or replace to load configuration"
+ )
+
+ if commit not in (True, False):
+ raise ValueError("'commit' must be a bool, got %s" % commit)
+
+ if replace and not operations.get("supports_replace"):
+ raise ValueError("configuration replace is not supported")
+
+ if comment and not operations.get("supports_commit_comment", False):
+ raise ValueError("commit comment is not supported")
+
+ def read_module_context(self, module_key):
+ try:
+ module_context = self._connection.read_module_context(module_key)
+ except ConnectionError as exc:
+ self._module.fail_json(
+ msg=to_text(exc, errors="surrogate_then_replace")
+ )
+
+ return module_context
+
+ def save_module_context(self, module_key, module_context):
+ try:
+ self._connection.save_module_context(module_key, module_context)
+ except ConnectionError as exc:
+ self._module.fail_json(
+ msg=to_text(exc, errors="surrogate_then_replace")
+ )
+
+ return None
+
+
+class NxosCmdRef:
+ """NXOS Command Reference utilities.
+ The NxosCmdRef class takes a yaml-formatted string of nxos module commands
+ and converts it into dict-formatted database of getters/setters/defaults
+ and associated common and platform-specific values. The utility methods
+ add additional data such as existing states, playbook states, and proposed cli.
+ The utilities also abstract away platform differences such as different
+ defaults and different command syntax.
+
+ Callers must provide a yaml formatted string that defines each command and
+ its properties; e.g. BFD global:
+ ---
+ _template: # _template holds common settings for all commands
+ # Enable feature bfd if disabled
+ feature: bfd
+ # Common getter syntax for BFD commands
+ get_command: show run bfd all | incl '^(no )*bfd'
+
+ interval:
+ kind: dict
+ getval: bfd interval (?P<tx>\\d+) min_rx (?P<min_rx>\\d+) multiplier (?P<multiplier>\\d+)
+ setval: bfd interval {tx} min_rx {min_rx} multiplier {multiplier}
+ default:
+ tx: 50
+ min_rx: 50
+ multiplier: 3
+ N3K:
+ # Platform overrides
+ default:
+ tx: 250
+ min_rx: 250
+ multiplier: 3
+ """
+
+ def __init__(self, module, cmd_ref_str, ref_only=False):
+ """Initialize cmd_ref from yaml data."""
+
+ self._module = module
+ self._check_imports()
+ self._yaml_load(cmd_ref_str)
+ self.cache_existing = None
+ self.present_states = ["present", "merged", "replaced"]
+ self.absent_states = ["absent", "deleted"]
+ ref = self._ref
+
+ # Create a list of supported commands based on ref keys
+ ref["commands"] = sorted([k for k in ref if not k.startswith("_")])
+ ref["_proposed"] = []
+ ref["_context"] = []
+ ref["_resource_key"] = None
+
+ if not ref_only:
+ ref["_state"] = module.params.get("state", "present")
+ self.feature_enable()
+ self.get_platform_defaults()
+ self.normalize_defaults()
+
+ def __getitem__(self, key=None):
+ if key is None:
+ return self._ref
+ return self._ref[key]
+
+ def _check_imports(self):
+ module = self._module
+ msg = nxosCmdRef_import_check()
+ if msg:
+ module.fail_json(msg=msg)
+
+ def _yaml_load(self, cmd_ref_str):
+ if PY2:
+ self._ref = yaml.load(cmd_ref_str)
+ elif PY3:
+ self._ref = yaml.load(cmd_ref_str, Loader=yaml.FullLoader)
+
+ def feature_enable(self):
+ """Add 'feature <foo>' to _proposed if ref includes a 'feature' key. """
+ ref = self._ref
+ feature = ref["_template"].get("feature")
+ if feature:
+ show_cmd = "show run | incl 'feature {0}'".format(feature)
+ output = self.execute_show_command(show_cmd, "text")
+ if not output or "CLI command error" in output:
+ msg = "** 'feature {0}' is not enabled. Module will auto-enable feature {0} ** ".format(
+ feature
+ )
+ self._module.warn(msg)
+ ref["_proposed"].append("feature {0}".format(feature))
+ ref["_cli_is_feature_disabled"] = ref["_proposed"]
+
+ def get_platform_shortname(self):
+ """Query device for platform type, normalize to a shortname/nickname.
+ Returns platform shortname (e.g. 'N3K-3058P' returns 'N3K') or None.
+ """
+ # TBD: add this method logic to get_capabilities() after those methods
+ # are made consistent across transports
+ platform_info = self.execute_show_command("show inventory", "json")
+ if not platform_info or not isinstance(platform_info, dict):
+ return None
+ inventory_table = platform_info["TABLE_inv"]["ROW_inv"]
+ for info in inventory_table:
+ if "Chassis" in info["name"]:
+ network_os_platform = info["productid"]
+ break
+ else:
+ return None
+
+ # Supported Platforms: N3K,N5K,N6K,N7K,N9K,N3K-F,N9K-F
+ m = re.match(
+ "(?P<short>N[35679][K57])-(?P<N35>C35)*", network_os_platform
+ )
+ if not m:
+ return None
+ shortname = m.group("short")
+
+ # Normalize
+ if m.groupdict().get("N35"):
+ shortname = "N35"
+ elif re.match("N77", shortname):
+ shortname = "N7K"
+ elif re.match(r"N3K|N9K", shortname):
+ for info in inventory_table:
+ if "-R" in info["productid"]:
+ # Fretta Platform
+ shortname += "-F"
+ break
+ return shortname
+
+ def get_platform_defaults(self):
+ """Update ref with platform specific defaults"""
+ plat = self.get_platform_shortname()
+ if not plat:
+ return
+
+ ref = self._ref
+ ref["_platform_shortname"] = plat
+ # Remove excluded commands (no platform support for command)
+ for k in ref["commands"]:
+ if plat in ref[k].get("_exclude", ""):
+ ref["commands"].remove(k)
+
+ # Update platform-specific settings for each item in ref
+ plat_spec_cmds = [k for k in ref["commands"] if plat in ref[k]]
+ for k in plat_spec_cmds:
+ for plat_key in ref[k][plat]:
+ ref[k][plat_key] = ref[k][plat][plat_key]
+
+ def normalize_defaults(self):
+ """Update ref defaults with normalized data"""
+ ref = self._ref
+ for k in ref["commands"]:
+ if "default" in ref[k] and ref[k]["default"]:
+ kind = ref[k]["kind"]
+ if "int" == kind:
+ ref[k]["default"] = int(ref[k]["default"])
+ elif "list" == kind:
+ ref[k]["default"] = [str(i) for i in ref[k]["default"]]
+ elif "dict" == kind:
+ for key, v in ref[k]["default"].items():
+ if v:
+ v = str(v)
+ ref[k]["default"][key] = v
+
+ def execute_show_command(self, command, format):
+ """Generic show command helper.
+ Warning: 'CLI command error' exceptions are caught, must be handled by caller.
+ Return device output as a newline-separated string or None.
+ """
+ cmds = [{"command": command, "output": format}]
+ output = None
+ try:
+ output = run_commands(self._module, cmds)
+ if output:
+ output = output[0]
+ except ConnectionError as exc:
+ if "CLI command error" in repr(exc):
+ # CLI may be feature disabled
+ output = repr(exc)
+ else:
+ raise
+ return output
+
+ def pattern_match_existing(self, output, k):
+ """Pattern matching helper for `get_existing`.
+ `k` is the command name string. Use the pattern from cmd_ref to
+ find a matching string in the output.
+ Return regex match object or None.
+ """
+ ref = self._ref
+ pattern = re.compile(ref[k]["getval"])
+ multiple = "multiple" in ref[k].keys()
+ match_lines = [re.search(pattern, line) for line in output]
+ if "dict" == ref[k]["kind"]:
+ match = [m for m in match_lines if m]
+ if not match:
+ return None
+ if len(match) > 1 and not multiple:
+ raise ValueError(
+ "get_existing: multiple matches found for property {0}".format(
+ k
+ )
+ )
+ else:
+ match = [m.groups() for m in match_lines if m]
+ if not match:
+ return None
+ if len(match) > 1 and not multiple:
+ raise ValueError(
+ "get_existing: multiple matches found for property {0}".format(
+ k
+ )
+ )
+ for item in match:
+ index = match.index(item)
+ match[index] = list(item) # tuple to list
+
+ # Handle config strings that nvgen with the 'no' prefix.
+ # Example match behavior:
+ # When pattern is: '(no )*foo *(\S+)*$' AND
+ # When output is: 'no foo' -> match: ['no ', None]
+ # When output is: 'foo 50' -> match: [None, '50']
+ if None is match[index][0]:
+ match[index].pop(0)
+ elif "no" in match[index][0]:
+ match[index].pop(0)
+ if not match:
+ return None
+
+ return match
+
+ def set_context(self, context=None):
+ """Update ref with command context.
+ """
+ if context is None:
+ context = []
+ ref = self._ref
+ # Process any additional context that this propoerty might require.
+ # 1) Global context from NxosCmdRef _template.
+ # 2) Context passed in using context arg.
+ ref["_context"] = ref["_template"].get("context", [])
+ for cmd in context:
+ ref["_context"].append(cmd)
+ # Last key in context is the resource key
+ ref["_resource_key"] = context[-1] if context else ref["_resource_key"]
+
+ def get_existing(self, cache_output=None):
+ """Update ref with existing command states from the device.
+ Store these states in each command's 'existing' key.
+ """
+ ref = self._ref
+ if ref.get("_cli_is_feature_disabled"):
+ # Add context to proposed if state is present
+ if ref["_state"] in self.present_states:
+ [ref["_proposed"].append(ctx) for ctx in ref["_context"]]
+ return
+
+ show_cmd = ref["_template"]["get_command"]
+ if cache_output:
+ output = cache_output
+ else:
+ output = self.execute_show_command(show_cmd, "text") or []
+ self.cache_existing = output
+
+ # Add additional command context if needed.
+ if ref["_context"]:
+ output = CustomNetworkConfig(indent=2, contents=output)
+ output = output.get_section(ref["_context"])
+
+ if not output:
+ # Add context to proposed if state is present
+ if ref["_state"] in self.present_states:
+ [ref["_proposed"].append(ctx) for ctx in ref["_context"]]
+ return
+
+ # We need to remove the last item in context for state absent case.
+ if ref["_state"] in self.absent_states and ref["_context"]:
+ if (
+ ref["_resource_key"]
+ and ref["_resource_key"] == ref["_context"][-1]
+ ):
+ if ref["_context"][-1] in output:
+ ref["_context"][-1] = "no " + ref["_context"][-1]
+ else:
+ del ref["_context"][-1]
+ return
+
+ # Walk each cmd in ref, use cmd pattern to discover existing cmds
+ output = output.split("\n")
+ for k in ref["commands"]:
+ match = self.pattern_match_existing(output, k)
+ if not match:
+ continue
+ ref[k]["existing"] = {}
+ for item in match:
+ index = match.index(item)
+ kind = ref[k]["kind"]
+ if "int" == kind:
+ ref[k]["existing"][index] = int(item[0])
+ elif "list" == kind:
+ ref[k]["existing"][index] = [str(i) for i in item[0]]
+ elif "dict" == kind:
+ # The getval pattern should contain regex named group keys that
+ # match up with the setval named placeholder keys; e.g.
+ # getval: my-cmd (?P<foo>\d+) bar (?P<baz>\d+)
+ # setval: my-cmd {foo} bar {baz}
+ ref[k]["existing"][index] = {}
+ for key in item.groupdict().keys():
+ ref[k]["existing"][index][key] = str(item.group(key))
+ elif "str" == kind:
+ ref[k]["existing"][index] = item[0]
+ else:
+ raise ValueError(
+ "get_existing: unknown 'kind' value specified for key '{0}'".format(
+ k
+ )
+ )
+
+ def get_playvals(self):
+ """Update ref with values from the playbook.
+ Store these values in each command's 'playval' key.
+ """
+ ref = self._ref
+ module = self._module
+ params = {}
+ if module.params.get("config"):
+ # Resource module builder packs playvals under 'config' key
+ param_data = module.params.get("config")
+ params["global"] = param_data
+ for key in param_data.keys():
+ if isinstance(param_data[key], list):
+ params[key] = param_data[key]
+ else:
+ params["global"] = module.params
+ for k in ref.keys():
+ for level in params.keys():
+ if isinstance(params[level], dict):
+ params[level] = [params[level]]
+ for item in params[level]:
+ if k in item and item[k] is not None:
+ if not ref[k].get("playval"):
+ ref[k]["playval"] = {}
+ playval = item[k]
+ index = params[level].index(item)
+ # Normalize each value
+ if "int" == ref[k]["kind"]:
+ playval = int(playval)
+ elif "list" == ref[k]["kind"]:
+ playval = [str(i) for i in playval]
+ elif "dict" == ref[k]["kind"]:
+ for key, v in playval.items():
+ playval[key] = str(v)
+ ref[k]["playval"][index] = playval
+
+ def build_cmd_set(self, playval, existing, k):
+ """Helper function to create list of commands to configure device
+ Return a list of commands
+ """
+ ref = self._ref
+ proposed = ref["_proposed"]
+ cmd = None
+ kind = ref[k]["kind"]
+ if "int" == kind:
+ cmd = ref[k]["setval"].format(playval)
+ elif "list" == kind:
+ cmd = ref[k]["setval"].format(*(playval))
+ elif "dict" == kind:
+ # The setval pattern should contain placeholder keys that
+ # match up with the getval regex named group keys; e.g.
+ # getval: my-cmd (?P<foo>\d+) bar (?P<baz>\d+)
+ # setval: my-cmd {foo} bar {baz}
+ cmd = ref[k]["setval"].format(**playval)
+ elif "str" == kind:
+ if "deleted" in playval:
+ if existing:
+ cmd = "no " + ref[k]["setval"].format(existing)
+ else:
+ cmd = ref[k]["setval"].format(playval)
+ else:
+ raise ValueError(
+ "get_proposed: unknown 'kind' value specified for key '{0}'".format(
+ k
+ )
+ )
+ if cmd:
+ if ref["_state"] in self.absent_states and not re.search(
+ r"^no", cmd
+ ):
+ cmd = "no " + cmd
+ # Commands may require parent commands for proper context.
+ # Global _template context is replaced by parameter context
+ [proposed.append(ctx) for ctx in ref["_context"]]
+ [proposed.append(ctx) for ctx in ref[k].get("context", [])]
+ proposed.append(cmd)
+
+ def get_proposed(self):
+ """Compare playbook values against existing states and create a list
+ of proposed commands.
+ Return a list of raw cli command strings.
+ """
+ ref = self._ref
+ # '_proposed' may be empty list or contain initializations; e.g. ['feature foo']
+ proposed = ref["_proposed"]
+
+ if ref["_context"] and ref["_context"][-1].startswith("no"):
+ [proposed.append(ctx) for ctx in ref["_context"]]
+ return proposed
+
+ # Create a list of commands that have playbook values
+ play_keys = [k for k in ref["commands"] if "playval" in ref[k]]
+
+ def compare(playval, existing):
+ if ref["_state"] in self.present_states:
+ if existing is None:
+ return False
+ elif playval == existing:
+ return True
+ elif (
+ isinstance(existing, dict) and playval in existing.values()
+ ):
+ return True
+
+ if ref["_state"] in self.absent_states:
+ if isinstance(existing, dict) and all(
+ x is None for x in existing.values()
+ ):
+ existing = None
+ if existing is None or playval not in existing.values():
+ return True
+ return False
+
+ # Compare against current state
+ for k in play_keys:
+ playval = ref[k]["playval"]
+ # Create playval copy to avoid RuntimeError
+ # dictionary changed size during iteration error
+ playval_copy = deepcopy(playval)
+ existing = ref[k].get("existing", ref[k]["default"])
+ multiple = "multiple" in ref[k].keys()
+
+ # Multiple Instances:
+ if isinstance(existing, dict) and multiple:
+ for ekey, evalue in existing.items():
+ if isinstance(evalue, dict):
+ # Remove values set to string 'None' from dvalue
+ evalue = dict(
+ (k, v) for k, v in evalue.items() if v != "None"
+ )
+ for pkey, pvalue in playval.items():
+ if compare(pvalue, evalue):
+ if playval_copy.get(pkey):
+ del playval_copy[pkey]
+ if not playval_copy:
+ continue
+ # Single Instance:
+ else:
+ for pkey, pval in playval.items():
+ if compare(pval, existing):
+ if playval_copy.get(pkey):
+ del playval_copy[pkey]
+ if not playval_copy:
+ continue
+
+ playval = playval_copy
+ # Multiple Instances:
+ if isinstance(existing, dict):
+ for dkey, dvalue in existing.items():
+ for pval in playval.values():
+ self.build_cmd_set(pval, dvalue, k)
+ # Single Instance:
+ else:
+ for pval in playval.values():
+ self.build_cmd_set(pval, existing, k)
+
+ # Remove any duplicate commands before returning.
+ # pylint: disable=unnecessary-lambda
+ cmds = sorted(set(proposed), key=lambda x: proposed.index(x))
+ return cmds
+
+
+def nxosCmdRef_import_check():
+ """Return import error messages or empty string"""
+ msg = ""
+ if PY2:
+ if not HAS_ORDEREDDICT and sys.version_info[:2] < (2, 7):
+ msg += "Mandatory python library 'ordereddict' is not present, try 'pip install ordereddict'\n"
+ if not HAS_YAML:
+ msg += "Mandatory python library 'yaml' is not present, try 'pip install yaml'\n"
+ elif PY3:
+ if not HAS_YAML:
+ msg += "Mandatory python library 'PyYAML' is not present, try 'pip install PyYAML'\n"
+ return msg
+
+
+def is_json(cmd):
+ return to_text(cmd).endswith("| json")
+
+
+def is_text(cmd):
+ return not is_json(cmd)
+
+
+def is_local_nxapi(module):
+ provider = module.params.get("provider")
+ if provider:
+ return provider.get("transport") == "nxapi"
+ return False
+
+
+def to_command(module, commands):
+ if is_local_nxapi(module):
+ default_output = "json"
+ else:
+ default_output = "text"
+
+ transform = ComplexList(
+ dict(
+ command=dict(key=True),
+ output=dict(default=default_output),
+ prompt=dict(type="list"),
+ answer=dict(type="list"),
+ newline=dict(type="bool", default=True),
+ sendonly=dict(type="bool", default=False),
+ check_all=dict(type="bool", default=False),
+ ),
+ module,
+ )
+
+ commands = transform(to_list(commands))
+
+ for item in commands:
+ if is_json(item["command"]):
+ item["output"] = "json"
+
+ return commands
+
+
+def get_config(module, flags=None):
+ flags = [] if flags is None else flags
+
+ conn = get_connection(module)
+ return conn.get_config(flags=flags)
+
+
+def run_commands(module, commands, check_rc=True):
+ conn = get_connection(module)
+ return conn.run_commands(to_command(module, commands), check_rc)
+
+
+def load_config(module, config, return_error=False, opts=None, replace=None):
+ conn = get_connection(module)
+ return conn.load_config(config, return_error, opts, replace=replace)
+
+
+def get_capabilities(module):
+ conn = get_connection(module)
+ return conn.get_capabilities()
+
+
+def get_diff(
+ self,
+ candidate=None,
+ running=None,
+ diff_match="line",
+ diff_ignore_lines=None,
+ path=None,
+ diff_replace="line",
+):
+ conn = self.get_connection()
+ return conn.get_diff(
+ candidate=candidate,
+ running=running,
+ diff_match=diff_match,
+ diff_ignore_lines=diff_ignore_lines,
+ path=path,
+ diff_replace=diff_replace,
+ )
+
+
+def normalize_interface(name):
+ """Return the normalized interface name
+ """
+ if not name:
+ return
+
+ def _get_number(name):
+ digits = ""
+ for char in name:
+ if char.isdigit() or char in "/.":
+ digits += char
+ return digits
+
+ if name.lower().startswith("et"):
+ if_type = "Ethernet"
+ elif name.lower().startswith("vl"):
+ if_type = "Vlan"
+ elif name.lower().startswith("lo"):
+ if_type = "loopback"
+ elif name.lower().startswith("po"):
+ if_type = "port-channel"
+ elif name.lower().startswith("nv"):
+ if_type = "nve"
+ else:
+ if_type = None
+
+ number_list = name.split(" ")
+ if len(number_list) == 2:
+ number = number_list[-1].strip()
+ else:
+ number = _get_number(name)
+
+ if if_type:
+ proper_interface = if_type + number
+ else:
+ proper_interface = name
+
+ return proper_interface
+
+
+def get_interface_type(interface):
+ """Gets the type of interface
+ """
+ if interface.upper().startswith("ET"):
+ return "ethernet"
+ elif interface.upper().startswith("VL"):
+ return "svi"
+ elif interface.upper().startswith("LO"):
+ return "loopback"
+ elif interface.upper().startswith("MG"):
+ return "management"
+ elif interface.upper().startswith("MA"):
+ return "management"
+ elif interface.upper().startswith("PO"):
+ return "portchannel"
+ elif interface.upper().startswith("NV"):
+ return "nve"
+ else:
+ return "unknown"
+
+
+def default_intf_enabled(name="", sysdefs=None, mode=None):
+ """Get device/version/interface-specific default 'enabled' state.
+ L3:
+ - Most L3 intfs default to 'shutdown'. Loopbacks default to 'no shutdown'.
+ - Some legacy platforms default L3 intfs to 'no shutdown'.
+ L2:
+ - User-System-Default 'system default switchport shutdown' defines the
+ enabled state for L2 intf's. USD defaults may be different on some platforms.
+ - An intf may be explicitly defined as L2 with 'switchport' or it may be
+ implicitly defined as L2 when USD 'system default switchport' is defined.
+ """
+ if not name:
+ return None
+ if sysdefs is None:
+ sysdefs = {}
+ default = False
+
+ if re.search("port-channel|loopback", name):
+ default = True
+ else:
+ if mode is None:
+ # intf 'switchport' cli is not present so use the user-system-default
+ mode = sysdefs.get("mode")
+
+ if mode == "layer3":
+ default = sysdefs.get("L3_enabled")
+ elif mode == "layer2":
+ default = sysdefs.get("L2_enabled")
+ return default
+
+
+def read_module_context(module):
+ conn = get_connection(module)
+ return conn.read_module_context(module._name)
+
+
+def save_module_context(module, module_context):
+ conn = get_connection(module)
+ return conn.save_module_context(module._name, module_context)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/bgp_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/bgp_global.py
new file mode 100644
index 00000000..eeab8592
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/bgp_global.py
@@ -0,0 +1,1455 @@
+# -*- coding: utf-8 -*-
+# Copyright 2021 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The Bgp_global parser templates file. This contains
+a list of parser definitions and associated functions that
+facilitates both facts gathering and native command generation for
+the given network resource.
+"""
+
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+def _tmplt_confederation_peers(proc):
+ cmd = "confederation peers"
+ for peer in proc.get("confederation", {})["peers"]:
+ cmd += " {0}".format(peer)
+ return cmd
+
+
+def _tmplt_path_attribute(proc):
+ cmd = "path-attribute {action}".format(**proc)
+
+ if "type" in proc:
+ cmd += " {type}".format(**proc)
+ elif "range" in proc:
+ cmd += " range {start} {end}".format(**proc["range"])
+ cmd += " in"
+
+ return cmd
+
+
+class Bgp_globalTemplate(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(Bgp_globalTemplate, self).__init__(lines=lines, tmplt=self)
+
+ # fmt: off
+ PARSERS = [
+ {
+ "name": "as_number",
+ "getval": re.compile(
+ r"""
+ ^router\sbgp\s(?P<as_number>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "router bgp {{ as_number }}",
+ "result": {
+ "as_number": "{{ as_number }}",
+ },
+ "shared": True
+ },
+ {
+ "name": "vrf",
+ "getval": re.compile(
+ r"""
+ \s+vrf
+ \s(?P<vrf>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "vrf {{ vrf }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "vrf": "{{ vrf }}"
+ }
+ }
+ },
+ "shared": True,
+ },
+ {
+ "name": "affinity_group.group_id",
+ "getval": re.compile(
+ r"""
+ \s+affinity-group
+ \sactivate\s(?P<group_id>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "affinity-group activate {{ affinity_group.group_id }}",
+ "result": {
+ "affinity_group": {
+ "group_id": "{{ group_id }}",
+ },
+ }
+ },
+ {
+ "name": "bestpath.always_compare_med",
+ "getval": re.compile(
+ r"""
+ \s+bestpath\s(?P<always_compare_med>always-compare-med)
+ $""", re.VERBOSE
+ ),
+ "setval": "bestpath always-compare-med",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "bestpath": {
+ "always_compare_med": "{{ not not always_compare_med }}",
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "bestpath.as_path.ignore",
+ "getval": re.compile(
+ r"""
+ \s+bestpath\sas-path\s(?P<ignore>ignore)
+ $""", re.VERBOSE
+ ),
+ "setval": "bestpath as-path ignore",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "bestpath": {
+ "as_path": {
+ "ignore": "{{ not not ignore }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "bestpath.as_path.multipath_relax",
+ "getval": re.compile(
+ r"""
+ \s+bestpath\sas-path\s(?P<multipath_relax>multipath-relax)
+ $""", re.VERBOSE
+ ),
+ "setval": "bestpath as-path multipath-relax",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "bestpath": {
+ "as_path": {
+ "multipath_relax": "{{ not not multipath_relax }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "bestpath.compare_neighborid",
+ "getval": re.compile(
+ r"""
+ \s+bestpath\s(?P<compare_neighborid>compare-neighborid)
+ $""", re.VERBOSE
+ ),
+ "setval": "bestpath compare-neighborid",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "bestpath": {
+ "compare_neighborid": "{{ not not compare_neighborid }}",
+ }
+ }
+ }
+
+ }
+ },
+ {
+ "name": "bestpath.compare_routerid",
+ "getval": re.compile(
+ r"""
+ \s+bestpath\s(?P<compare_routerid>compare-routerid)
+ $""", re.VERBOSE
+ ),
+ "setval": "bestpath compare-routerid",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "bestpath": {
+ "compare_routerid": "{{ not not compare_routerid }}",
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "bestpath.cost_community_ignore",
+ "getval": re.compile(
+ r"""
+ \s+bestpath\scost-community\s(?P<cost_community_ignore>ignore)
+ $""", re.VERBOSE
+ ),
+ "setval": "bestpath cost-community ignore",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "bestpath": {
+ "cost_community_ignore": "{{ not not cost_community_ignore }}",
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "bestpath.igp_metric_ignore",
+ "getval": re.compile(
+ r"""
+ \s+bestpath\sigp-metric\s(?P<igp_metric_ignore>ignore)
+ $""", re.VERBOSE
+ ),
+ "setval": "bestpath igp-metric ignore",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "bestpath": {
+ "igp_metric_ignore": "{{ not not igp_metric_ignore }}",
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "bestpath.med.confed",
+ "getval": re.compile(
+ r"""
+ \s+bestpath\smed\s(?P<confed>confed)
+ $""", re.VERBOSE
+ ),
+ "setval": "bestpath med confed",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "bestpath": {
+ "med": {
+ "confed": "{{ not not confed }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "bestpath.med.missing_as_worst",
+ "getval": re.compile(
+ r"""
+ \s+bestpath\smed\s(?P<missing_as_worst>missing-as-worst)
+ $""", re.VERBOSE
+ ),
+ "setval": "bestpath med missing-as-worst",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "bestpath": {
+ "med": {
+ "missing_as_worst": "{{ not not missing_as_worst }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "bestpath.med.non_deterministic",
+ "getval": re.compile(
+ r"""
+ \s+bestpath\smed\s(?P<non_deterministic>non-deterministic)
+ $""", re.VERBOSE
+ ),
+ "setval": "bestpath med non-deterministic",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "bestpath": {
+ "med": {
+ "non_deterministic": "{{ not not non_deterministic }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "cluster_id",
+ "getval": re.compile(
+ r"""
+ \s+cluster-id\s(?P<cluster_id>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "cluster-id {{ cluster_id }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "cluster_id": "{{ cluster_id }}",
+ }
+ }
+ }
+ },
+ {
+ "name": "confederation.identifier",
+ "getval": re.compile(
+ r"""
+ \s+confederation\sidentifier\s(?P<identifier>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "confederation identifier {{ confederation.identifier }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "confederation": {
+ "identifier": "{{ identifier }}",
+ },
+ }
+ }
+ },
+ },
+ {
+ "name": "confederation.peers",
+ "getval": re.compile(
+ r"""
+ \s+confederation\speers\s(?P<peers>.*)
+ $""", re.VERBOSE
+ ),
+ "setval": _tmplt_confederation_peers,
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "confederation": {
+ "peers": "{{ peers }}",
+ },
+ }
+ },
+ }
+ },
+ {
+ "name": "disable_policy_batching",
+ "getval": re.compile(
+ r"""
+ \s+(?P<disable_policy_batching>disable-policy-batching)
+ $""", re.VERBOSE
+ ),
+ "setval": "disable-policy-batching",
+ "result": {
+ "disable_policy_batching": {
+ "set": "{{ not not disable_policy_batching }}",
+ },
+ }
+ },
+ {
+ "name": "disable_policy_batching.ipv4.prefix_list",
+ "getval": re.compile(
+ r"""
+ \s+disable-policy-batching\sipv4
+ \sprefix-list\s(?P<ipv4_prefix_list>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "disable-policy-batching ipv4 prefix-list {{ disable_policy_batching.ipv4.prefix_list }}",
+ "result": {
+ "disable_policy_batching": {
+ "ipv4": {
+ "prefix_list": "{{ ipv4_prefix_list }}",
+ }
+ },
+ }
+ },
+ {
+ "name": "disable_policy_batching.ipv6.prefix_list",
+ "getval": re.compile(
+ r"""
+ \s+disable-policy-batching\sipv6
+ \sprefix-list\s(?P<ipv6_prefix_list>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "disable-policy-batching ipv6 prefix-list {{ disable_policy_batching.ipv6.prefix_list }}",
+ "result": {
+ "disable_policy_batching": {
+ "ipv6": {
+ "prefix_list": "{{ ipv6_prefix_list }}",
+ }
+ },
+ }
+ },
+ {
+ "name": "disable_policy_batching.nexthop",
+ "getval": re.compile(
+ r"""
+ \s+disable-policy-batching\s(?P<nexthop>nexthop)
+ $""", re.VERBOSE
+ ),
+ "setval": "disable-policy-batching nexthop",
+ "result": {
+ "disable_policy_batching": {
+ "nexthop": "{{ not not nexthop }}",
+ },
+ }
+ },
+ {
+ "name": "dynamic_med_interval",
+ "getval": re.compile(
+ r"""
+ \s+dynamic-med-interval\s(?P<dynamic_med_interval>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "dynamic-med-interval {{ dynamic_med_interval }}",
+ "result": {
+ "dynamic_med_interval": "{{ dynamic_med_interval }}",
+ }
+ },
+ {
+ "name": "enforce_first_as",
+ "getval": re.compile(
+ r"""
+ \s+no\s(?P<enforce_first_as>enforce-first-as)
+ $""", re.VERBOSE
+ ),
+ "setval": "enforce-first-as",
+ "result": {
+ "enforce_first_as": "{{ not enforce_first_as }}",
+ }
+ },
+ {
+ "name": "enhanced_error",
+ "getval": re.compile(
+ r"""
+ \s+no\s(?P<enhanced_error>enhanced-error)
+ $""", re.VERBOSE
+ ),
+ "setval": "enhanced-error",
+ "result": {
+ "enhanced_error": "{{ not enhanced_error }}",
+ }
+ },
+ {
+ "name": "fast_external_fallover",
+ "getval": re.compile(
+ r"""
+ \s+no\s(?P<fast_external_fallover>fast-external-fallover)
+ $""", re.VERBOSE
+ ),
+ "setval": "fast-external-fallover",
+ "result": {
+ "fast_external_fallover": "{{ not fast_external_fallover }}",
+ }
+ },
+ {
+ "name": "flush_routes",
+ "getval": re.compile(
+ r"""
+ \s+(?P<flush_routes>flush-routes)
+ $""", re.VERBOSE
+ ),
+ "setval": "flush-routes",
+ "result": {
+ "flush_routes": "{{ not not flush_routes }}",
+ }
+ },
+ {
+ "name": "graceful_restart",
+ "getval": re.compile(
+ r"""
+ \s+no\s(?P<graceful_restart>graceful-restart)
+ $""", re.VERBOSE
+ ),
+ "setval": "graceful-restart",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "graceful_restart": {
+ "set": "{{ not graceful_restart }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "graceful_restart.restart_time",
+ "getval": re.compile(
+ r"""
+ \s+graceful-restart\srestart-time\s(?P<restart_time>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "graceful-restart restart-time {{ graceful_restart.restart_time }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "graceful_restart": {
+ "restart_time": "{{ restart_time }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "graceful_restart.stalepath_time",
+ "getval": re.compile(
+ r"""
+ \s+graceful-restart\sstalepath-time\s(?P<stalepath_time>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "graceful-restart stalepath-time {{ graceful_restart.stalepath_time }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "graceful_restart": {
+ "stalepath_time": "{{ stalepath_time }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "graceful_restart.helper",
+ "getval": re.compile(
+ r"""
+ \s+(?P<helper>graceful-restart-helper)
+ $""", re.VERBOSE
+ ),
+ "setval": "graceful-restart-helper",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "graceful_restart": {
+ "helper": "{{ not not helper }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "graceful_shutdown.activate",
+ "getval": re.compile(
+ r"""
+ \s+graceful-shutdown
+ \s(?P<activate>activate)
+ (\sroute-map
+ \s(?P<route_map>\S+))?
+ $""", re.VERBOSE
+ ),
+ "setval": "graceful-shutdown activate{{ ' route-map ' + graceful_shutdown.activate.route_map if graceful_shutdown.activate.route_map is defined }}",
+ "result": {
+ "graceful_shutdown": {
+ "activate": {
+ "set": "{{ True if activate is defined and route_map is undefined else None }}",
+ "route_map": "{{ route_map }}",
+ }
+ },
+ }
+ },
+ {
+ "name": "graceful_shutdown.aware",
+ "getval": re.compile(
+ r"""
+ \s+no\sgraceful-shutdown
+ \s(?P<aware>aware)
+ $""", re.VERBOSE
+ ),
+ "setval": "graceful-shutdown aware",
+ "result": {
+ "graceful_shutdown": {
+ "aware": "{{ not aware }}"
+ },
+ }
+ },
+ {
+ "name": "isolate",
+ "getval": re.compile(
+ r"""
+ \s+(?P<isolate>isolate)
+ (\s(?P<include_local>include-local))?
+ $""", re.VERBOSE
+ ),
+ "setval": "isolate{{ ' include-local' if isolate.include_local|d(False) is True }}",
+ "result": {
+ "isolate": {
+ "set": "{{ True if isolate is defined and include_local is not defined else None }}",
+ "include_local": "{{ not not include_local }}",
+ },
+ }
+ },
+ {
+ "name": "log_neighbor_changes",
+ "getval": re.compile(
+ r"""
+ \s+(?P<log_neighbor_changes>log-neighbor-changes)
+ $""", re.VERBOSE
+ ),
+ "setval": "log-neighbor-changes",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "log_neighbor_changes": "{{ not not log_neighbor_changes }}",
+ }
+ }
+ }
+ },
+ {
+ "name": "maxas_limit",
+ "getval": re.compile(
+ r"""
+ \s+maxas-limit\s(?P<maxas_limit>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "maxas-limit {{ maxas_limit }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "maxas_limit": "{{ maxas_limit }}",
+ }
+ }
+ }
+ },
+ # start neighbor parsers
+ {
+ "name": "neighbor_address",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "neighbor {{ neighbor_address }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "neighbor_address": "{{ neighbor_address }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "remote_as",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \sremote-as\s(?P<remote_as>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "remote-as {{ remote_as }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "remote_as": "{{ remote_as }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "neighbor_affinity_group.group_id",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \saffinity-group\s(?P<group_id>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "affinity-group {{ neighbor_affinity_group.group_id }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "neighbor_affinity_group": {
+ "group_id": "{{ group_id }}",
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "bmp_activate_server",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \sbmp-activate-server\s(?P<bmp_activate_server>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "bmp-activate-server {{ bmp_activate_server }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "bmp_activate_server": "{{ bmp_activate_server }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "capability",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \scapability\ssuppress\s(?P<suppress_4_byte_as>4-byte-as)
+ $""", re.VERBOSE
+ ),
+ "setval": "capability suppress 4-byte-as",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "capability": {
+ "suppress_4_byte_as": "{{ not not suppress_4_byte_as }}",
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "description",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \sdescription\s(?P<description>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "description {{ description }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "description": "{{ description }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "disable_connected_check",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \s(?P<disable_connected_check>disable-connected-check)
+ $""", re.VERBOSE
+ ),
+ "setval": "disable-connected-check",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "disable_connected_check": "{{ not not disable_connected_check }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "dont_capability_negotiate",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \s(?P<dont_capability_negotiate>dont-capability-negotiate)
+ $""", re.VERBOSE
+ ),
+ "setval": "dont-capability-negotiate",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "dont_capability_negotiate": "{{ not not dont_capability_negotiate}}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "dscp",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \sdscp\s(?P<dscp>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "dscp {{ dscp }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "dscp": "{{ dscp }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "dynamic_capability",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \s(?P<dynamic_capability>dynamic-capability)
+ $""", re.VERBOSE
+ ),
+ "setval": "dynamic-capability",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "dynamic_capability": "{{ not not dynamic_capability }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "ebgp_multihop",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \sebgp-multihop\s(?P<ebgp_multihop>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "ebgp-multihop {{ ebgp_multihop }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "ebgp_multihop": "{{ ebgp_multihop }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "graceful_shutdown",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \sgraceful-shutdown
+ \s(?P<activate>activate)
+ (\sroute-map\s(?P<route_map>\S+))?
+ $""", re.VERBOSE
+ ),
+ "setval": "graceful-shutdown{{ (' route-map ' + graceful_shutdown.route_map) if graceful_shutdown.route_map is defined }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "graceful_shutdown": {
+ "activate": {
+ "set": "{{ True if activate is defined and route_map is undefined else None }}",
+ "route_map": "{{ route_map }}",
+ },
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "inherit.peer",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \sinherit
+ \speer\s(?P<peer>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "inherit peer {{ inherit.peer }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "inherit": {
+ "peer": "{{ peer }}",
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "inherit.peer_session",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \sinherit
+ \speer-session\s(?P<peer_session>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "inherit peer-session {{ inherit.peer_session }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "inherit": {
+ "peer_session": "{{ peer_session }}",
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "local_as",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \slocal-as\s(?P<local_as>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "local-as {{ local_as }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "local_as": "{{ local_as }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "log_neighbor_changes",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \s(?P<log_neighbor_changes>log-neighbor-changes)
+ (\s(?P<disable>disable))?
+ $""", re.VERBOSE
+ ),
+ "setval": "log-neighbor-changes{{ ' disable' if log_neighbor_changes.disable is defined }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "log_neighbor_changes": {
+ "set": "{{ True if log_neighbor_changes is defined and disable is undefined }}",
+ "disable": "{{ not not disable }}",
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "low_memory",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \slow-memory\s(?P<exempt>exempt)
+ $""", re.VERBOSE
+ ),
+ "setval": "low-memory exempt",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "low_memory": {
+ "exempt": "{{ not not exempt }}",
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "password",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \spassword\s(?P<encryption>\d+)
+ \s(?P<key>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "password{{ (' ' + password.encryption|string) if password.encryption is defined }} {{ password.key }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "password": {
+ "encryption": "{{ encryption }}",
+ "key": "{{ key }}",
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "path_attribute",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \spath-attribute\s(?P<action>\S+)\s
+ (?P<type>\d+)?
+ (range\s(?P<start>\d+)\s(?P<end>\d+))?
+ \sin
+ $""", re.VERBOSE
+ ),
+ "setval": _tmplt_path_attribute,
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "path_attribute": [
+ {
+ "action": "{{ action }}",
+ "type": "{{ type if type is defined else None }}",
+ "range": {
+ "start": "{{ start if start is defined }}",
+ "end": "{{ end if end is defined }}"
+ },
+ },
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "peer_type",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \speer-type\s(?P<peer_type>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "peer-type {{ neighbor.peer_type }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "peer_type": "{{ peer_type }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "remove_private_as",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \s(?P<remove_private_as>remove-private-as)
+ (\s(?P<all>all))?
+ (\s(?P<replace_as>replace-as))?
+ $""", re.VERBOSE
+ ),
+ "setval": "remove-private-as",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "remove_private_as": {
+ "set": "{{ True if remove_private_as is defined and replace_as is undefined and all is undefined else None }}",
+ "replace_as": "{{ not not replace_as }}",
+ "all": "{{ not not all }}",
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "shutdown",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \s(?P<shutdown>shutdown)
+ $""", re.VERBOSE
+ ),
+ "setval": "shutdown",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "shutdown": "{{ not not shutdown }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "timers",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \stimers\s(?P<keepalive>\d+)\s(?P<holdtime>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "shutdown",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "timers": {
+ "keepalive": "{{ keepalive }}",
+ "holdtime": "{{ holdtime }}",
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "transport",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \stransport\sconnection-mode
+ \s(?P<passive>passive)
+ $""", re.VERBOSE
+ ),
+ "setval": "transport connection-mode passive",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "transport": {
+ "connection_mode": {
+ "passive": "{{ not not passive }}",
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "ttl_security",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \sttl-security\shops\s(?P<hops>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "ttl-security hops {{ ttl_security.hops }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "ttl_security": {
+ "hops": "{{ hops }}",
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "update_source",
+ "getval": re.compile(
+ r"""
+ \s+neighbor\s(?P<neighbor_address>\S+)
+ \supdate-source\s(?P<update_source>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "update-source {{ update_source }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbors": {
+ "{{ neighbor_address }}": {
+ "update_source": "{{ update_source }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ # end neighbor parsers
+ {
+ "name": "neighbor_down.fib_accelerate",
+ "getval": re.compile(
+ r"""
+ \s+neighbor-down\s(?P<fib_accelerate>fib-accelerate)
+ $""", re.VERBOSE
+ ),
+ "setval": "neighbor-down fib-accelerate",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "neighbor_down": {
+ "fib_accelerate": "{{ not not fib_accelerate }}",
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "nexthop.suppress_default_resolution",
+ "getval": re.compile(
+ r"""
+ \s+nexthop
+ \s(?P<suppress_default_resolution>suppress-default-resolution)
+ $""", re.VERBOSE
+ ),
+ "setval": "nexthop suppress-default-resolution",
+ "result": {
+ "nexthop": {
+ "suppress_default_resolution": "{{ not not suppress_default_resolution }}",
+ },
+ }
+ },
+ {
+ "name": "reconnect_interval",
+ "getval": re.compile(
+ r"""
+ \s+reconnect-interval
+ \s(?P<reconnect_interval>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "reconnect-interval {{ reconnect_interval }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "reconnect_interval": "{{ reconnect_interval }}",
+ }
+ }
+ }
+ },
+ {
+ "name": "router_id",
+ "getval": re.compile(
+ r"""
+ \s+router-id
+ \s(?P<router_id>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "router-id {{ router_id }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "router_id": "{{ router_id }}",
+ }
+ }
+ }
+ },
+ {
+ "name": "shutdown",
+ "getval": re.compile(
+ r"""
+ \s+(?P<shutdown>shutdown)
+ $""", re.VERBOSE
+ ),
+ "setval": "shutdown",
+ "result": {
+ "shutdown": "{{ not not shutdown }}",
+ }
+ },
+ {
+ "name": "suppress_fib_pending",
+ "getval": re.compile(
+ r"""
+ \s+no\s(?P<suppress_fib_pending>suppress-fib-pending)
+ $""", re.VERBOSE
+ ),
+ "setval": "suppress-fib-pending",
+ "result": {
+ "suppress_fib_pending": "{{ not suppress_fib_pending }}",
+ }
+ },
+ {
+ "name": "timers.bestpath_limit",
+ "getval": re.compile(
+ r"""
+ \s+timers\sbestpath-limit
+ \s(?P<timeout>\d+)
+ (\s(?P<always>always))?
+ $""", re.VERBOSE
+ ),
+ "setval": "timers bestpath-limit {{ timers.bestpath_limit.timeout }}{{ ' always' if timers.bestpath_limit.timeout is defined }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "timers": {
+ "bestpath_limit": {
+ "timeout": "{{ timeout }}",
+ "always": "{{ not not always }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "timers.bgp",
+ "getval": re.compile(
+ r"""
+ \s+timers\sbgp
+ \s(?P<keepalive>\d+)
+ (\s(?P<holdtime>\d+))?
+ $""", re.VERBOSE
+ ),
+ "setval": "timers bgp {{ timers.bgp.keepalive }} {{ timers.bgp.holdtime }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "timers": {
+ "bgp": {
+ "keepalive": "{{ keepalive }}",
+ "holdtime": "{{ holdtime }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "timers.prefix_peer_timeout",
+ "getval": re.compile(
+ r"""
+ \s+timers
+ \sprefix-peer-timeout\s(?P<prefix_peer_timeout>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "timers prefix-peer-timeout {{ timers.prefix_peer_timeout }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "timers": {
+ "prefix_peer_timeout": "{{ prefix_peer_timeout }}",
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "timers.prefix_peer_wait",
+ "getval": re.compile(
+ r"""
+ \s+timers
+ \sprefix-peer-wait\s(?P<prefix_peer_wait>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "timers prefix-peer-wait {{ timers.prefix_peer_wait }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "timers": {
+ "prefix_peer_wait": "{{ prefix_peer_wait }}",
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "fabric_soo",
+ "getval": re.compile(
+ r"""
+ \s+fabric-soo
+ \s(?P<fabric_soo>\S+)
+ $""", re.VERBOSE
+ ),
+ "setval": "fabric-soo {{ fabric_soo }}",
+ "result": {
+ "fabric_soo": "{{ fabric_soo }}",
+ }
+ },
+ {
+ "name": "rd",
+ "getval": re.compile(
+ r"""
+ \s+rd\s(?P<dual>dual)
+ (\sid\s(?P<id>\d+))?
+ $""", re.VERBOSE
+ ),
+ "setval": "rd dual{{' id ' + rd.id if rd.id is defined }}",
+ "result": {
+ "rd": {
+ "dual": "{{ not not dual }}",
+ "id": "{{ id }}",
+ }
+ }
+ },
+ # VRF only
+ {
+ "name": "allocate_index",
+ "getval": re.compile(
+ r"""
+ \s+allocate-index\s(?P<allocate_index>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "allocate-index {{ allocate_index }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "allocate_index": "{{ allocate_index }}",
+ }
+ },
+ }
+ },
+ # VRF only
+ {
+ "name": "local_as",
+ "getval": re.compile(
+ r"""
+ \s+local-as\s(?P<local_as>\d+)
+ $""", re.VERBOSE
+ ),
+ "setval": "local-as {{ local_as }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "local_as": "{{ local_as }}",
+ }
+ }
+ }
+ },
+ ]
+ # fmt: on
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/ospf_interfaces.py
new file mode 100644
index 00000000..58575994
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/ospf_interfaces.py
@@ -0,0 +1,505 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The Ospf_interfaces parser templates file. This contains
+a list of parser definitions and associated functions that
+facilitates both facts gathering and native command generation for
+the given network resource.
+"""
+
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+def _tmplt_authentication(data):
+ auth = data.get("authentication")
+ cmd = "ip ospf authentication"
+
+ if auth.get("enable") is False:
+ cmd = "no " + cmd
+ else:
+ if auth.get("message_digest"):
+ cmd += " message-digest"
+ elif auth.get("null_auth"):
+ cmd += " null"
+ return cmd
+
+
+class Ospf_interfacesTemplate(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(Ospf_interfacesTemplate, self).__init__(lines=lines, tmplt=self)
+
+ # fmt: off
+ PARSERS = [
+ {
+ "name": "interface",
+ "getval": re.compile(r'''
+ ^interface
+ \s(?P<name>\S+)$''', re.VERBOSE),
+ "setval": "interface {{ name }}",
+ "result": {
+ "{{ name }}": {
+ "name": "{{ name }}",
+ "address_family": {},
+ },
+ },
+ "shared": True,
+ },
+ {
+ "name": "area",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)
+ \srouter\s(ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \sarea\s(?P<area_id>\S+)
+ (\s(?P<secondaries>secondaries\snone))?$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip' if afi == 'ipv4' else 'ipv6' }} "
+ "router {{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "{{ process_id }} area {{ area.area_id }}{{ ' secondaries none' if area.secondaries|default('True') == False}}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "area": {
+ "area_id": "{{ area_id }}",
+ "secondaries": "{{ False if secondaries is defined else None }}",
+ },
+ }
+ }
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "processes_multi_areas",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)
+ \srouter\s(ospf|ospfv3)
+ \s(?P<process_id>\S+)
+ \smulti-area\s(?P<area>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip' if afi == 'ipv4' else 'ipv6' }} "
+ "router {{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "{{ process_id }} multi-area {{ area }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "processes": {
+ "{{ process_id }}": {
+ "process_id": "{{ process_id }}",
+ "multi_areas": [
+ "{{ area }}",
+ ],
+ }
+ }
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "multi_areas",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)
+ \srouter\s(ospf|ospfv3)
+ \smulti-area\s(?P<area>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip' if afi == 'ipv4' else 'ipv6' }} "
+ "router {{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "multi-area {{ area }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "multi_areas": [
+ "{{ area }}",
+ ]
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "authentication",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip|ipv6)
+ \s(ospf|ospfv3)
+ \s(?P<authentication>authentication)
+ (\s(?P<opt>(message-digest|null)))?$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_authentication,
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ 'ipv4' if afi == 'ip' else 'ipv6' }}",
+ "authentication": {
+ "enable": "{{ True if authentication is defined and opt is undefined }}",
+ "message_digest": "{{ True if opt == 'message-digest' else None }}",
+ "null_auth": "{{ True if opt == 'null' else None }}",
+ }
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "authentication.key_chain",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)
+ \sospf
+ \s(?P<authentication>authentication)
+ \skey-chain\s(?P<key_chain>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "ip ospf authentication key-chain {{ authentication.key_chain }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ afi|replace('ip', 'ipv4') }}",
+ "authentication": {
+ "key_chain": "{{ key_chain }}",
+ }
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "authentication_key",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)
+ \sospf
+ \sauthentication-key
+ \s(?P<encryption>\d)
+ \s(?P<key>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "ip ospf authentication-key "
+ "{{ authentication_key.encryption }} {{ authentication_key.key }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ afi|replace('ip', 'ipv4') }}",
+ "authentication_key": {
+ "encryption": "{{ encryption }}",
+ "key": "{{ key }}",
+ }
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "message_digest_key",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)
+ \sospf
+ \smessage-digest-key
+ \s(?P<key_id>\d+)
+ \smd5
+ \s(?P<encryption>\d)
+ \s(?P<key>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "ip ospf "
+ "message-digest-key {{ message_digest_key.key_id }} "
+ "md5 {{ message_digest_key.encryption|default('') }} {{ message_digest_key.key }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi }}": {
+ "afi": "{{ afi|replace('ip', 'ipv4') }}",
+ "message_digest_key": {
+ "key_id": "{{ key_id }}",
+ "encryption": "{{ encryption }}",
+ "key": "{{ key }}",
+ }
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "cost",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)?
+ \s(ospf|ospfv3)
+ \scost\s(?P<cost>\d+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ' if afi == 'ipv4' else '' }}"
+ "{{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "cost {{ cost }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi|d('ipv6') }}": {
+ "afi": "{{ 'ipv4' if afi is defined else 'ipv6' }}",
+ "cost": "{{ cost }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "dead_interval",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)?
+ \s(ospf|ospfv3)
+ \sdead-interval\s(?P<dead_interval>\d+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ' if afi == 'ipv4' else '' }}"
+ "{{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "dead-interval {{ dead_interval }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi|d('ipv6') }}": {
+ "afi": "{{ 'ipv4' if afi is defined else 'ipv6' }}",
+ "dead_interval": "{{ dead_interval }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "hello_interval",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)?
+ \s(ospf|ospfv3)
+ \shello-interval\s(?P<hello_interval>\d+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ' if afi == 'ipv4' else '' }}"
+ "{{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "hello-interval {{ hello_interval }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi|d('ipv6') }}": {
+ "afi": "{{ 'ipv4' if afi is defined else 'ipv6' }}",
+ "hello_interval": "{{ hello_interval }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "instance",
+ "getval": re.compile(
+ r"""
+ \s+(ospf|ospfv3)
+ \sinstance\s(?P<instance>\d+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "ospfv3 instance {{ instance }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi|d('ipv6') }}": {
+ "afi": "ipv6",
+ "instance": "{{ instance }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "mtu_ignore",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)?
+ \s(ospf|ospfv3)
+ \s(?P<mtu_ignore>mtu-ignore)$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ' if afi == 'ipv4' else '' }}"
+ "{{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "mtu-ignore",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi|d('ipv6') }}": {
+ "afi": "{{ 'ipv4' if afi is defined else 'ipv6' }}",
+ "mtu_ignore": "{{ not not mtu_ignore }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "network",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)?
+ \s(ospf|ospfv3)
+ \snetwork\s(?P<network>(broadcast|point-to-point))$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ' if afi == 'ipv4' else '' }}"
+ "{{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "network {{ network }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi|d('ipv6') }}": {
+ "afi": "{{ 'ipv4' if afi is defined else 'ipv6' }}",
+ "network": "{{ network }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "passive_interface",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)?
+ \s(ospf|ospfv3)
+ \s(?P<passive_interface>passive-interface)$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ' if afi == 'ipv4' else '' }}"
+ "{{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "passive-interface",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi|d('ipv6') }}": {
+ "afi": "{{ 'ipv4' if afi is defined else 'ipv6' }}",
+ "passive_interface": "{{ not not passive_interface }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "priority",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)?
+ \s(ospf|ospfv3)
+ \spriority\s(?P<priority>\d+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ' if afi == 'ipv4' else '' }}"
+ "{{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "priority {{ priority }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi|d('ipv6') }}": {
+ "afi": "{{ 'ipv4' if afi is defined else 'ipv6' }}",
+ "priority": "{{ priority }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "retransmit_interval",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)?
+ \s(ospf|ospfv3)
+ \sretransmit-interval\s(?P<retransmit_interval>\d+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ' if afi == 'ipv4' else '' }}"
+ "{{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "retransmit-interval {{ retransmit_interval }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi|d('ipv6') }}": {
+ "afi": "{{ 'ipv4' if afi is defined else 'ipv6' }}",
+ "retransmit_interval": "{{ retransmit_interval }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "shutdown",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)?
+ \s(ospf|ospfv3)
+ \s(?P<shutdown>shutdown)$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ' if afi == 'ipv4' else '' }}"
+ "{{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "shutdown",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi|d('ipv6') }}": {
+ "afi": "{{ 'ipv4' if afi is defined else 'ipv6' }}",
+ "shutdown": "{{ not not shutdown }}",
+ },
+ }
+ }
+ }
+ },
+ {
+ "name": "transmit_delay",
+ "getval": re.compile(
+ r"""
+ \s+(?P<afi>ip)?
+ \s(ospf|ospfv3)
+ \stransmit-delay\s(?P<transmit_delay>\d+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "{{ 'ip ' if afi == 'ipv4' else '' }}"
+ "{{ 'ospf' if afi == 'ipv4' else 'ospfv3' }} "
+ "transmit-delay {{ transmit_delay }}",
+ "result": {
+ "{{ name }}": {
+ "address_family": {
+ "{{ afi|d('ipv6') }}": {
+ "afi": "{{ 'ipv4' if afi is defined else 'ipv6' }}",
+ "transmit_delay": "{{ transmit_delay }}",
+ },
+ }
+ }
+ }
+ },
+ ]
+ # fmt: on
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/ospfv2.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/ospfv2.py
new file mode 100644
index 00000000..8aaf41a5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/ospfv2.py
@@ -0,0 +1,1105 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+def _tmplt_area_range(arange):
+ command = "area {area} range {range}".format(**arange)
+ if arange.get("not_advertise") is True:
+ command += " not-advertise"
+ if "cost" in arange:
+ command += " cost {cost}".format(**arange)
+ return command
+
+
+def _tmplt_default_information(proc):
+ command = "default-information originate"
+ if (
+ "always" in proc["default_information"]
+ and proc["default_information"]["always"]
+ ):
+ command += " always"
+ if "route_map" in proc["default_information"]:
+ command += " route-map"
+ command += " {default_information[route_map]}".format(**proc)
+ return command
+
+
+def _tmplt_log_adjacency_changes(proc):
+ command = "log-adjacency-changes"
+ if proc.get("log_adjacency_changes").get("detail", False) is True:
+ command += " detail"
+ return command
+
+
+def _tmplt_area_authentication(area):
+ command = "area {area_id} authentication".format(**area)
+ if area.get("authentication", {}).get("message_digest"):
+ command += " message-digest"
+ return command
+
+
+def _tmplt_max_lsa(proc):
+ max_lsa = proc["max_lsa"]
+ command = "max-lsa {max_non_self_generated_lsa}".format(**max_lsa)
+ if max_lsa.get("threshold"):
+ command += " {threshold}".format(**max_lsa)
+ if max_lsa.get("warning_only"):
+ command += " warning-only"
+ if max_lsa.get("ignore_time"):
+ command += " ignore-time {ignore_time}".format(**max_lsa)
+ if max_lsa.get("ignore_count"):
+ command += " ignore-count {ignore_count}".format(**max_lsa)
+ if max_lsa.get("reset_time"):
+ command += " reset-time {reset_time}".format(**max_lsa)
+ return command
+
+
+def _tmplt_default_information(proc):
+ default_information = proc["default_information"]["originate"]
+ command = "default-information originate"
+
+ if default_information.get("set") is False:
+ command = "no {0}".format(command)
+ else:
+ if default_information.get("always"):
+ command += " always"
+ if default_information.get("route_map"):
+ command += " route-map {route_map}".format(**default_information)
+
+ return command
+
+
+def _tmplt_table_map(proc):
+ table_map = proc["table_map"]
+ command = "table-map"
+
+ if table_map.get("name"):
+ command += " {name}".format(**table_map)
+ if table_map.get("filter"):
+ command += " filter"
+
+ return command
+
+
+def _tmplt_max_metric(proc):
+ max_metric = proc["max_metric"]
+ command = "max-metric router-lsa"
+
+ if max_metric.get("router_lsa", {}).get("set") is False:
+ command = "no {0}".format(command)
+ else:
+ external_lsa = max_metric.get("router_lsa", {}).get("external_lsa", {})
+ include_stub = max_metric.get("router_lsa", {}).get("include_stub", {})
+ on_startup = max_metric.get("router_lsa", {}).get("on_startup", {})
+ summary_lsa = max_metric.get("router_lsa", {}).get("summary_lsa", {})
+ if external_lsa:
+ command += " external-lsa"
+ if external_lsa.get("max_metric_value"):
+ command += " {max_metric_value}".format(**external_lsa)
+ if include_stub:
+ command += " include-stub"
+ if on_startup:
+ command += " on-startup"
+ if on_startup.get("wait_period"):
+ command += " {wait_period}".format(**on_startup)
+ if on_startup.get("wait_for_bgp_asn"):
+ command += " wait-for bgp {wait_for_bgp_asn}".format(
+ **on_startup
+ )
+ if summary_lsa:
+ command += " summary-lsa"
+ if summary_lsa.get("max_metric_value"):
+ command += " {max_metric_value}".format(**summary_lsa)
+
+ return command
+
+
+def _tmplt_area_nssa(area):
+ nssa = area["nssa"]
+ command = "area {area_id} nssa".format(**area)
+ if nssa.get("set") is False:
+ command = "no {0}".format(command)
+ else:
+ for attrib in [
+ "no_summary",
+ "no_redistribution",
+ "default_information_originate",
+ ]:
+ if nssa.get(attrib):
+ command += " {0}".format(attrib.replace("_", "-"))
+ return command
+
+
+def _tmplt_area_nssa_translate(area):
+ translate = area["nssa"]["translate"]["type7"]
+ command = "area {area_id} nssa translate type7".format(**area)
+ for attrib in ["always", "never", "supress_fa"]:
+ if translate.get(attrib):
+ command += " {0}".format(attrib.replace("_", "-"))
+ return command
+
+
+def _tmplt_area_ranges(arange):
+ command = "area {area_id} range {prefix}".format(**arange)
+ if arange.get("not_advertise") is True:
+ command += " not-advertise"
+ if "cost" in arange:
+ command += " cost {cost}".format(**arange)
+ return command
+
+
+def _tmplt_area_ranges(arange):
+ command = "area {area_id} range {prefix}".format(**arange)
+ if arange.get("not_advertise") is True:
+ command += " not-advertise"
+ if "cost" in arange:
+ command += " cost {cost}".format(**arange)
+ return command
+
+
+def _tmplt_summary_address(proc):
+ command = "summary-address {prefix}".format(**proc)
+ if proc.get("tag"):
+ command += " tag {tag}".format(**proc)
+ elif proc.get("not_advertise"):
+ command += " not-advertise"
+ return command
+
+
+def _tmplt_area_stub(area):
+ stub = area["stub"]
+ command = "area {area_id} stub".format(**area)
+ if stub.get("set") is False:
+ command = "no {0}".format(command)
+ elif stub.get("no_summary"):
+ command += " no-summary"
+ return command
+
+
+def _tmplt_redistribute(redis):
+ command = "redistribute {protocol}".format(**redis)
+ if redis.get("id"):
+ command += " {id}".format(**redis)
+ if redis.get("route_map"):
+ command += " route-map {route_map}".format(**redis)
+ return command
+
+
+def _tmplt_capability_vrf_lite(proc):
+ command = "capability vrf-lite"
+ vrf_lite = proc["capability"]["vrf_lite"]
+ if vrf_lite.get("set") is False:
+ command = "no {0}".format(command)
+ else:
+ if vrf_lite.get("evpn"):
+ command += " evpn"
+ return command
+
+
+class Ospfv2Template(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(Ospfv2Template, self).__init__(lines=lines, tmplt=self)
+
+ # fmt: off
+ PARSERS = [
+ {
+ "name": "vrf",
+ "getval": re.compile(
+ r"""
+ \s+vrf
+ \s(?P<vrf>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "vrf {{ vrf }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "vrf": "{{ vrf }}"
+ }
+ }
+ },
+ "shared": True,
+ },
+ {
+ "name": "bfd",
+ "getval": re.compile(
+ r"""
+ \s+(?P<bfd>bfd)$""",
+ re.VERBOSE,
+ ),
+ "setval": "bfd",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "bfd": "{{ not not bfd }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "process_id",
+ "getval": re.compile(
+ r"""
+ ospf(?:v3)*\s
+ (?P<process_id>\S+)""",
+ re.VERBOSE,
+ ),
+ "setval": "router ospf {{ process_id }}",
+ "result": {
+ "process_id": "{{ process_id }}",
+ },
+ "shared": True,
+ },
+ {
+ "name": "down_bit_ignore",
+ "getval": re.compile(
+ r"""
+ \s+(?P<down_bit_ignore>down-bit-ignore)$""",
+ re.VERBOSE,
+ ),
+ "setval": "down-bit-ignore",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "down_bit_ignore": "{{ not not down_bit_ignore }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "capability.vrf_lite",
+ "getval": re.compile(
+ r"""
+ \s+capability
+ \s(?P<vrf_lite>vrf-lite)
+ \s*(?P<evpn>evpn)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_capability_vrf_lite,
+ "remval": "capability vrf-lite",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "capability": {
+ "vrf_lite": {
+ "set": "{{ True if vrf_lite is defined and evpn is undefined else None }}",
+ "evpn": "{{ not not evpn }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "auto_cost",
+ "getval": re.compile(
+ r"""
+ \s+auto-cost\sreference-bandwidth\s
+ (?P<acrb>\d+)\s(?P<unit>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": (
+ "auto-cost reference-bandwidth"
+ " {{ auto_cost.reference_bandwidth }}"
+ " {{ auto_cost.unit }}"
+ ),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "auto_cost": {
+ "reference_bandwidth": "{{ acrb }}",
+ "unit": "{{ unit }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "flush_routes",
+ "getval": re.compile(
+ r"""
+ \s+(?P<flush_routes>flush-routes)$""",
+ re.VERBOSE,
+ ),
+ "setval": "flush-routes",
+ "result": {
+ "flush_routes": "{{ not not flush_routes }}"
+ },
+ },
+ {
+ "name": "graceful_restart.set",
+ "getval": re.compile(
+ r"""
+ \s+(?P<graceful_restart>no\sgraceful-restart)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "graceful-restart",
+ "remval": "no graceful-restart",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "graceful_restart": {
+ "set": "{{ not graceful_restart }}"
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "graceful_restart.helper_disable",
+ "getval": re.compile(
+ r"""
+ \s+graceful-restart
+ \s+(?P<helper_disable>helper-disable)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "graceful-restart helper-disable",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "graceful_restart": {
+ "helper_disable": "{{ not not helper_disable }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "graceful_restart.grace_period",
+ "getval": re.compile(
+ r"""
+ \s+graceful-restart
+ \s+grace-period
+ \s+(?P<grace_period>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "graceful-restart helper-disable",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "graceful_restart": {
+ "grace_period": "{{ grace_period }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "isolate",
+ "getval": re.compile(
+ r"""
+ \s+(?P<isolate>isolate)$""",
+ re.VERBOSE,
+ ),
+ "setval": "isolate",
+ "result": {"isolate": "{{ not not isolate }}"},
+ },
+ {
+ "name": "log_adjacency_changes",
+ "getval": re.compile(
+ r"""
+ \s+(?P<log>log-adjacency-changes)
+ \s*(?P<detail>detail)*$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_log_adjacency_changes,
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "log_adjacency_changes": {
+ "log": "{{ True if log is defined and detail is undefined else None }}",
+ "detail": "{{ True if detail is defined else None }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "max_lsa",
+ "getval": re.compile(
+ r"""
+ \s+max-lsa
+ \s(?P<max_gen_lsa>\d+)
+ \s*(?P<threshold>\d*)
+ \s*(?P<warning_only>warning-only)*
+ \s*(ignore-time)*\s*(?P<ig_time>\d*)
+ \s*(ignore-count)*\s*(?P<ig_count>\d*)
+ \s*(reset-time)*\s*(?P<rst_time>\d*)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_max_lsa,
+ "remval": "max-lsa {{ max_lsa.max_non_self_generated_lsa }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "max_lsa": {
+ "max_non_self_generated_lsa": "{{ max_gen_lsa }}",
+ "threshold": "{{ threshold }}",
+ "ignore_time": "{{ ig_time }}",
+ "ignore_count": "{{ ig_count }}",
+ "reset_time": "{{ rst_time }}",
+ "warning_only": "{{ not not warning_only }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "mpls.traffic_eng.areas",
+ "getval": re.compile(
+ r"""
+ \s+mpls\straffic-eng\sarea
+ \s(?P<area_id>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": ("mpls traffic-eng area {{ area_id }}"),
+ "result": {
+ "mpls": {
+ "traffic_eng": {
+ "areas": [
+ {
+ "area_id": "{{ area_id }}",
+ }
+ ]
+ }
+ }
+ },
+ },
+ {
+ "name": "mpls.traffic_eng.router_id",
+ "getval": re.compile(
+ r"""
+ \s+mpls\straffic-eng\srouter-id
+ \s(?P<router_id>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": (
+ "mpls traffic-eng router-id" " {{ mpls.traffic_eng.router_id }}"
+ ),
+ "result": {"mpls": {"traffic_eng": {"router_id": "{{ router_id }}"}}},
+ },
+ {
+ "name": "mpls.traffic_eng.multicast_intact",
+ "getval": re.compile(
+ r"""
+ \s+mpls\straffic-eng
+ \s(?P<multicast_intact>multicast-intact)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": ("mpls traffic-eng multicast-intact"),
+ "result": {
+ "mpls": {
+ "traffic_eng": {
+ "multicast_intact": "{{ not not multicast_intact }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "name_lookup",
+ "getval": re.compile(
+ r"""
+ \s+(?P<name_lookup>name-lookup)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": ("name-lookup"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "name_lookup": "{{ not not name_lookup }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "passive_interface.default",
+ "getval": re.compile(
+ r"""
+ \s+passive-interface
+ \s+(?P<default>default)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": ("passive-interface default"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "passive_interface": {"default": "{{ not not default }}"}
+ }
+ }
+ },
+ },
+ {
+ "name": "rfc1583compatibility",
+ "getval": re.compile(
+ r"""
+ \s+(?P<rfc>rfc1583compatibility)$""",
+ re.VERBOSE,
+ ),
+ "setval": ("rfc1583compatibility"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "rfc1583compatibility": "{{ not not rfc }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "router_id",
+ "getval": re.compile(
+ r"""
+ \s+router-id
+ \s(?P<router_id>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": ("router-id" " {{ router_id }}"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "router_id": "{{ router_id }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "shutdown",
+ "getval": re.compile(
+ r"""
+ \s+(?P<shutdown>shutdown)$""",
+ re.VERBOSE,
+ ),
+ "setval": ("shutdown"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "shutdown": "{{ not not shutdown }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "default_information.originate",
+ "getval": re.compile(
+ r"""
+ \s+default-information
+ \s(?P<originate>originate)
+ \s*(?P<always>always)*
+ \s*(route-map)*
+ \s*(?P<route_map>\S+)*$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_default_information,
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "default_information": {
+ "originate": {
+ "set": "{{ True if originate is defined and always is undefined and route_map is undefined else None }}",
+ "always": "{{ not not always }}",
+ "route_map": "{{ route_map }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "default_metric",
+ "getval": re.compile(
+ r"""
+ \s+default-metric
+ \s(?P<default_metric>\d+)$""",
+ re.VERBOSE,
+ ),
+ "setval": ("default-metric {{ default_metric }}"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "default_metric": "{{ default_metric }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "distance",
+ "getval": re.compile(
+ r"""
+ \s+distance
+ \s(?P<distance>\d+)$""",
+ re.VERBOSE,
+ ),
+ "setval": ("distance {{ distance }}"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "distance": "{{ distance }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "table_map",
+ "getval": re.compile(
+ r"""
+ \s+table-map
+ \s(?P<rmap>\S+)
+ \s*(?P<filter>filter)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_table_map,
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "table_map": {
+ "name": "{{ rmap }}",
+ "filter": "{{ not not filter }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.lsa_arrival",
+ "getval": re.compile(
+ r"""
+ \s+timers
+ \slsa-arrival
+ \s(?P<lsa_arrival_val>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": ("timers lsa-arrival {{ timers.lsa_arrival }}"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "timers": {
+ "lsa_arrival": "{{ lsa_arrival_val }}"
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.lsa_group_pacing",
+ "getval": re.compile(
+ r"""
+ \s+timers
+ \slsa-group-pacing
+ \s(?P<lsa_group_pacing>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers lsa-group-pacing {{ timers.lsa_group_pacing }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "timers": {
+ "lsa_group_pacing": "{{ lsa_group_pacing }}"
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.throttle.lsa",
+ "getval": re.compile(
+ r"""
+ \s+timers\sthrottle\slsa
+ \s(?P<start>\d+)
+ \s(?P<hold>\d+)
+ \s(?P<max>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle lsa {{ timers.throttle.lsa.start_interval }}"
+ " {{ timers.throttle.lsa.hold_interval }}"
+ " {{ timers.throttle.lsa.max_interval }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "timers": {
+ "throttle": {
+ "lsa": {
+ "start_interval": "{{ start }}",
+ "hold_interval": "{{ hold }}",
+ "max_interval": "{{ max }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.throttle.spf",
+ "getval": re.compile(
+ r"""
+ \s+timers\sthrottle\sspf
+ \s(?P<initial>\d+)
+ \s(?P<min>\d+)
+ \s(?P<max>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle spf {{ timers.throttle.spf.initial_spf_delay }}"
+ " {{ timers.throttle.spf.min_hold_time }}"
+ " {{ timers.throttle.spf.max_wait_time }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "timers": {
+ "throttle": {
+ "spf": {
+ "initial_spf_delay": "{{ initial }}",
+ "min_hold_time": "{{ min }}",
+ "max_wait_time": "{{ max }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.default_cost",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)\s
+ default-cost\s(?P<default_cost>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} default-cost {{ default_cost }}",
+ "compval": "default_cost",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "default_cost": "{{ default_cost|int }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.authentication",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)
+ \s(?P<auth>authentication)
+ \s*(?P<md>message-digest)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_area_authentication,
+ "remval": "area {{ area_id }} authentication",
+ "compval": "authentication",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "authentication": {
+ "set": "{{ True if auth is defined and md is undefined }}",
+ "message_digest": "{{ True if md is defined else False }}"
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.filter_list",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)
+ \sfilter-list
+ \sroute-map\s(?P<rmap>\S+)
+ \s(?P<dir>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} filter-list route-map {{ route_map }} {{ direction }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "filter_list": [
+ {
+ "route_map": "{{ rmap }}",
+ "direction": "{{ dir }}",
+ },
+ ],
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "redistribute",
+ "getval": re.compile(
+ r"""
+ \s+redistribute
+ \s(?P<protocol>\S+)
+ \s*(?P<id>\S+)*
+ \sroute-map\s(?P<rmap>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_redistribute,
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "redistribute": [
+ {
+ "protocol": "{{ protocol }}",
+ "id": "{{ id }}",
+ "route_map": "{{ rmap }}",
+ },
+ ]
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)
+ \s(?P<nssa>nssa)
+ \s*(?P<no_sum>no-summary)*
+ \s*(?P<no_redis>no-redistribution)*
+ \s*(?P<def_info>default-information-originate)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_area_nssa,
+ "remval": "area {{ area_id }} nssa",
+ "compval": "nssa",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "set": "{{ True if nssa is defined and no_sum is undefined and no_redis is undefined and def_info is undefined }}",
+ "no_summary": "{{ not not no_sum }}",
+ "no_redistribution": "{{ not not no_redis }}",
+ "default_information_originate": "{{ not not def_info }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa.translate",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)\snssa
+ \stranslate
+ \stype7
+ \s(?P<choice>always|never)
+ \s*(?P<supress_fa>supress-fa)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_area_nssa_translate,
+ "compval": "nssa.translate",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "translate": {
+ "type7": {
+ "always": '{{ True if choice == "always" else None }}',
+ "never": '{{ True if choice == "never" else None }}',
+ "supress_fa": "{{ not not supress_fa }}",
+ }
+ }
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.ranges",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)
+ \srange\s(?P<prefix>\S+)
+ \s*(cost)*\s*(?P<cost>\d+)*
+ \s*(?P<not_adver>not-advertise)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_area_ranges,
+ "remval": "area {{ area_id }} range {{ prefix }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "ranges": [
+ {
+ "prefix": "{{ prefix }}",
+ "cost": "{{ cost }}",
+ "not_advertise": "{{ not not not_adver }}",
+ },
+ ],
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "summary_address",
+ "getval": re.compile(
+ r"""
+ \s+summary-address
+ \s(?P<prefix>\S+)
+ \s*(?P<not_adver>not-advertise)*
+ \s*(tag)*\s*(?P<tag>\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_summary_address,
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "summary_address": [
+ {
+ "prefix": "{{ prefix }}",
+ "not_advertise": "{{ not not not_adver }}",
+ "tag": "{{ tag }}",
+ },
+ ]
+ }
+ }
+ },
+ },
+ {
+ "name": "area.stub",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)
+ \s(?P<stub>stub)
+ \s*(?P<no_summary>no-summary)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_area_stub,
+ "remval": "area {{ area_id }} stub",
+ "compval": "stub",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "stub": {
+ "set": "{{ True if stub is defined and no_summary is undefined else None }}",
+ "no_summary": "{{ not not no_summary }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "maximum_paths",
+ "getval": re.compile(
+ r"""
+ \s+maximum-paths
+ \s(?P<maximum_paths>\d+)$""",
+ re.VERBOSE,
+ ),
+ "setval": ("maximum-paths {{ maximum_paths }}"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {"maximum_paths": "{{ maximum_paths }}"}
+ }
+ },
+ },
+ {
+ "name": "max_metric",
+ "getval": re.compile(
+ r"""
+ \s+max-metric
+ \s+(?P<router_lsa>router-lsa)
+ \s*(?P<external_lsa>external-lsa)*
+ \s*(?P<max_metric_value>\d+)*
+ \s*(?P<include_stub>include-stub)*
+ \s*(?P<on_startup>on-startup)*
+ \s*(?P<wait_period>\d+)*
+ \s*(wait-for\sbgp)*
+ \s*(?P<bgp_asn>\d+)*
+ \s*(?P<summary_lsa>summary-lsa)*
+ \s*(?P<sum_lsa_max_metric_value>\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_max_metric,
+ "remval": "max-metric router-lsa",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "max_metric": {
+ "router_lsa": {
+ "set": "{{ True if router_lsa is defined and external_lsa is undefined else None }}",
+ "external_lsa": {
+ "set": "{{ True if external_lsa is defined and max_metric_value is undefined else None }}",
+ "max_metric_value": "{{ max_metric_value }}",
+ },
+ "include_stub": "{{ not not include_stub }}",
+ "on_startup": {
+ "set": "{{ True if on_startup is defined and (wait_period and bgp_asn) is undefined else None }}",
+ "wait_period": "{{ wait_period }}",
+ "wait_for_bgp_asn": "{{ bgp_asn }}",
+ },
+ "summary_lsa": {
+ "set": "{{ True if summary_lsa is defined and sum_lsa_max_metric_value is undefined else None }}",
+ "max_metric_value": "{{ sum_lsa_max_metric_value }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ ]
+ # fmt: on
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/ospfv3.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/ospfv3.py
new file mode 100644
index 00000000..f2bd7cad
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/rm_templates/ospfv3.py
@@ -0,0 +1,951 @@
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+The Ospfv3 parser templates file. This contains
+a list of parser definitions and associated functions that
+facilitates both facts gathering and native command generation for
+the given network resource.
+"""
+
+import re
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network_template import (
+ NetworkTemplate,
+)
+
+
+def _tmplt_area_nssa(area):
+ nssa = area["nssa"]
+ command = "area {area_id} nssa".format(**area)
+ if nssa.get("set") is False:
+ command = "no {0}".format(command)
+ else:
+ for attrib in [
+ "no_summary",
+ "no_redistribution",
+ "default_information_originate",
+ ]:
+ if nssa.get(attrib):
+ command += " {0}".format(attrib.replace("_", "-"))
+ if nssa.get("route_map"):
+ command += " route-map {route_map}".format(**nssa)
+ return command
+
+
+def _tmplt_area_nssa_translate(area):
+ translate = area["nssa"]["translate"]["type7"]
+ command = "area {area_id} nssa translate type7".format(**area)
+ for attrib in ["always", "never", "supress_fa"]:
+ if translate.get(attrib):
+ command += " {0}".format(attrib.replace("_", "-"))
+ return command
+
+
+def _tmplt_area_stub(area):
+ stub = area["stub"]
+ command = "area {area_id} stub".format(**area)
+ if stub.get("set") is False:
+ command = "no {0}".format(command)
+ elif stub.get("no_summary"):
+ command += " no-summary"
+ return command
+
+
+def _tmplt_log_adjacency_changes(proc):
+ command = "log-adjacency-changes"
+ if proc.get("log_adjacency_changes").get("detail", False) is True:
+ command += " detail"
+ return command
+
+
+def _tmplt_max_lsa(proc):
+ max_lsa = proc["max_lsa"]
+ command = "max-lsa {max_non_self_generated_lsa}".format(**max_lsa)
+ if max_lsa.get("threshold"):
+ command += " {threshold}".format(**max_lsa)
+ if max_lsa.get("warning_only"):
+ command += " warning-only"
+ if max_lsa.get("ignore_time"):
+ command += " ignore-time {ignore_time}".format(**max_lsa)
+ if max_lsa.get("ignore_count"):
+ command += " ignore-count {ignore_count}".format(**max_lsa)
+ if max_lsa.get("reset_time"):
+ command += " reset-time {reset_time}".format(**max_lsa)
+ return command
+
+
+def _tmplt_max_metric(proc):
+ max_metric = proc["max_metric"]
+ command = "max-metric router-lsa"
+
+ if max_metric.get("router_lsa", {}).get("set") is False:
+ command = "no {0}".format(command)
+ else:
+ external_lsa = max_metric.get("router_lsa", {}).get("external_lsa", {})
+ stub_prefix_lsa = max_metric.get("router_lsa", {}).get(
+ "stub_prefix_lsa", {}
+ )
+ on_startup = max_metric.get("router_lsa", {}).get("on_startup", {})
+ inter_area_prefix_lsa = max_metric.get("router_lsa", {}).get(
+ "inter_area_prefix_lsa", {}
+ )
+ if external_lsa:
+ command += " external-lsa"
+ if external_lsa.get("max_metric_value"):
+ command += " {max_metric_value}".format(**external_lsa)
+ if stub_prefix_lsa:
+ command += " stub-prefix-lsa"
+ if on_startup:
+ command += " on-startup"
+ if on_startup.get("wait_period"):
+ command += " {wait_period}".format(**on_startup)
+ if on_startup.get("wait_for_bgp_asn"):
+ command += " wait-for bgp {wait_for_bgp_asn}".format(
+ **on_startup
+ )
+ if inter_area_prefix_lsa:
+ command += " inter-area-prefix-lsa"
+ if inter_area_prefix_lsa.get("max_metric_value"):
+ command += " {max_metric_value}".format(
+ **inter_area_prefix_lsa
+ )
+
+ return command
+
+
+def _tmplt_area_ranges(arange):
+ command = "area {area_id} range {prefix}".format(**arange)
+ if arange.get("not_advertise") is True:
+ command += " not-advertise"
+ if "cost" in arange:
+ command += " cost {cost}".format(**arange)
+ return command
+
+
+def _tmplt_default_information(proc):
+ default_information = proc["default_information"]["originate"]
+ command = "default-information originate"
+
+ if default_information.get("set") is False:
+ command = "no {0}".format(command)
+ else:
+ if default_information.get("always"):
+ command += " always"
+ if default_information.get("route_map"):
+ command += " route-map {route_map}".format(**default_information)
+
+ return command
+
+
+def _tmplt_redistribute(redis):
+ command = "redistribute {protocol}".format(**redis)
+ if redis.get("id"):
+ command += " {id}".format(**redis)
+ command += " route-map {route_map}".format(**redis)
+ return command
+
+
+def _tmplt_summary_address(proc):
+ command = "summary-address {prefix}".format(**proc)
+ if proc.get("tag"):
+ command += " tag {tag}".format(**proc)
+ elif proc.get("not_advertise"):
+ command += " not-advertise"
+ return command
+
+
+def _tmplt_table_map(proc):
+ table_map = proc["table_map"]
+ command = "table-map {name}".format(**table_map)
+ if table_map.get("filter"):
+ command += " filter"
+
+ return command
+
+
+class Ospfv3Template(NetworkTemplate):
+ def __init__(self, lines=None):
+ super(Ospfv3Template, self).__init__(lines=lines, tmplt=self)
+
+ # fmt: off
+ PARSERS = [
+ {
+ "name": "vrf",
+ "getval": re.compile(
+ r"""
+ \s+vrf
+ \s(?P<vrf>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "vrf {{ vrf }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "vrf": "{{ vrf }}"
+ }
+ }
+ },
+ "shared": True,
+ },
+ {
+ "name": "process_id",
+ "getval": re.compile(
+ r"""
+ ospfv3
+ \s(?P<process_id>\S+)""",
+ re.VERBOSE,
+ ),
+ "setval": "router ospfv3 {{ process_id }}",
+ "result": {
+ "process_id": "{{ process_id }}",
+ },
+ "shared": True,
+ },
+ {
+ "name": "router_id",
+ "getval": re.compile(
+ r"""
+ \s+router-id
+ \s(?P<router_id>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "router-id {{ router_id }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "router_id": "{{ router_id }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "address_family",
+ "getval": re.compile(
+ r"""
+ \s+address-family
+ \s(?P<afi>\S+)
+ \s(?P<safi>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "address-family {{ afi }} {{ safi }}",
+ "result": {
+ "address_family": {
+ "afi": "{{ afi }}",
+ "safi": "{{ safi }}",
+ }
+ },
+ 'shared': True,
+ },
+ {
+ "name": "area.default_cost",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)\s
+ default-cost\s(?P<default_cost>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} default-cost {{ default_cost }}",
+ "compval": "default_cost",
+ "result": {
+ 'address_family': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "default_cost": "{{ default_cost|int }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.filter_list",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)
+ \sfilter-list
+ \sroute-map\s(?P<rmap>\S+)
+ \s(?P<dir>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} filter-list route-map {{ route_map }} {{ direction }}",
+ "result": {
+ 'address_family': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "filter_list": [
+ {
+ "route_map": "{{ rmap }}",
+ "direction": "{{ dir }}",
+ },
+ ],
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.ranges",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)
+ \srange\s(?P<prefix>\S+)
+ \s*(cost)*\s*(?P<cost>\d+)*
+ \s*(?P<not_adver>not-advertise)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_area_ranges,
+ "remval": "area {{ area_id }} range {{ prefix }}",
+ "result": {
+ "address_family": {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "ranges": [
+ {
+ "prefix": "{{ prefix }}",
+ "cost": "{{ cost }}",
+ "not_advertise": "{{ not not not_adver }}",
+ },
+ ],
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "default_information.originate",
+ "getval": re.compile(
+ r"""
+ \s+default-information
+ \s(?P<originate>originate)
+ \s*(?P<always>always)*
+ \s*(route-map)*
+ \s*(?P<route_map>\S+)*$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_default_information,
+ "result": {
+ "address_family": {
+ "default_information": {
+ "originate": {
+ "set": "{{ True if originate is defined and always is undefined and route_map is undefined else None }}",
+ "always": "{{ not not always }}",
+ "route_map": "{{ route_map }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "distance",
+ "getval": re.compile(
+ r"""
+ \s+distance
+ \s(?P<distance>\d+)$""",
+ re.VERBOSE,
+ ),
+ "setval": "distance {{ distance }}",
+ "result": {
+ "address_family": {
+ "distance": "{{ distance }}"
+ }
+ },
+ },
+ {
+ "name": "maximum_paths",
+ "getval": re.compile(
+ r"""
+ \s+maximum-paths
+ \s(?P<maximum_paths>\d+)$""",
+ re.VERBOSE,
+ ),
+ "setval": ("maximum-paths {{ maximum_paths }}"),
+ "result": {
+ "address_family": {
+ "maximum_paths": "{{ maximum_paths }}"
+ }
+ },
+ },
+ {
+ "name": "redistribute",
+ "getval": re.compile(
+ r"""
+ \s+redistribute
+ \s(?P<protocol>\S+)
+ \s*(?P<id>\S+)*
+ \sroute-map\s(?P<rmap>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_redistribute,
+ "result": {
+ "address_family": {
+ "redistribute": [
+ {
+ "protocol": "{{ protocol }}",
+ "id": "{{ id }}",
+ "route_map": "{{ rmap }}",
+ },
+ ]
+ }
+ },
+ },
+ {
+ "name": "summary_address",
+ "getval": re.compile(
+ r"""
+ \s+summary-address
+ \s(?P<prefix>\S+)
+ \s*(?P<not_adver>not-advertise)*
+ \s*(tag)*\s*(?P<tag>\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_summary_address,
+ "result": {
+ "address_family": {
+ "summary_address": [
+ {
+ "prefix": "{{ prefix }}",
+ "not_advertise": "{{ not not not_adver }}",
+ "tag": "{{ tag }}",
+ },
+ ]
+ }
+ },
+ },
+ {
+ "name": "table_map",
+ "getval": re.compile(
+ r"""
+ \s+table-map
+ \s(?P<rmap>\S+)
+ \s*(?P<filter>filter)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_table_map,
+ "result": {
+ "address_family": {
+ "table_map": {
+ "name": "{{ rmap }}",
+ "filter": "{{ not not filter }}",
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.throttle.spf",
+ "getval": re.compile(
+ r"""
+ \s+timers\sthrottle\sspf
+ \s(?P<initial>\d+)
+ \s(?P<min>\d+)
+ \s(?P<max>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle spf {{ timers.throttle.spf.initial_spf_delay }}"
+ " {{ timers.throttle.spf.min_hold_time }}"
+ " {{ timers.throttle.spf.max_wait_time }}",
+ "result": {
+ "address_family": {
+ "timers": {
+ "throttle": {
+ "spf": {
+ "initial_spf_delay": "{{ initial }}",
+ "min_hold_time": "{{ min }}",
+ "max_wait_time": "{{ max }}",
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)
+ \s(?P<nssa>nssa)
+ \s*(?P<no_sum>no-summary)*
+ \s*(?P<no_redis>no-redistribution)*
+ \s*(?P<def_info>default-information-originate)*
+ \s*(route-map)*\s*(?P<rmap>\S+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_area_nssa,
+ "remval": "area {{ area_id }} nssa",
+ "compval": "nssa",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "set": "{{ True if nssa is defined and no_sum is undefined and no_redis is undefined and \
+ def_info is undefined and rmap is undefined }}",
+ "no_summary": "{{ not not no_sum }}",
+ "no_redistribution": "{{ not not no_redis }}",
+ "default_information_originate": "{{ not not def_info }}",
+ "route_map": "{{ rmap }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.nssa.translate",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)\snssa
+ \stranslate
+ \stype7
+ \s(?P<choice>always|never)
+ \s*(?P<supress_fa>supress-fa)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_area_nssa_translate,
+ "compval": "nssa.translate",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "nssa": {
+ "translate": {
+ "type7": {
+ "always": '{{ True if choice == "always" else None }}',
+ "never": '{{ True if choice == "never" else None }}',
+ "supress_fa": "{{ not not supress_fa }}",
+ }
+ }
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.stub",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)
+ \s(?P<stub>stub)
+ \s*(?P<no_summary>no-summary)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_area_stub,
+ "remval": "area {{ area_id }} stub",
+ "compval": "stub",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "stub": {
+ "set": "{{ True if stub is defined and no_summary is undefined else None }}",
+ "no_summary": "{{ not not no_summary }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "area.virtual_link",
+ "getval": re.compile(
+ r"""
+ \s+area\s(?P<area_id>\S+)
+ \svirtual-link
+ \s(?P<virtual_link>\S+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "area {{ area_id }} virtual-link {{ virtual_link }}",
+ "compval": "virtual_link",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "areas": {
+ "{{ area_id }}": {
+ "area_id": "{{ area_id }}",
+ "virtual_link": "{{ virtual_link }}",
+ },
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "auto_cost",
+ "getval": re.compile(
+ r"""
+ \s+auto-cost\sreference-bandwidth\s
+ (?P<acrb>\d+)\s(?P<unit>\S+)$""",
+ re.VERBOSE,
+ ),
+ "setval": (
+ "auto-cost reference-bandwidth"
+ " {{ auto_cost.reference_bandwidth }}"
+ " {{ auto_cost.unit }}"
+ ),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "auto_cost": {
+ "reference_bandwidth": "{{ acrb }}",
+ "unit": "{{ unit }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "flush_routes",
+ "getval": re.compile(
+ r"""
+ \s+(?P<flush_routes>flush-routes)$""",
+ re.VERBOSE,
+ ),
+ "setval": "flush-routes",
+ "result": {
+ "flush_routes": "{{ not not flush_routes }}"
+ },
+ },
+ {
+ "name": "graceful_restart.set",
+ "getval": re.compile(
+ r"""
+ \s+(?P<graceful_restart>no\sgraceful-restart)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "graceful-restart",
+ "remval": "no graceful-restart",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "graceful_restart": {
+ "set": "{{ not graceful_restart }}"
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "graceful_restart.helper_disable",
+ "getval": re.compile(
+ r"""
+ \s+graceful-restart
+ \s+(?P<helper_disable>helper-disable)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "graceful-restart helper-disable",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "graceful_restart": {
+ "helper_disable": "{{ not not helper_disable }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "graceful_restart.grace_period",
+ "getval": re.compile(
+ r"""
+ \s+graceful-restart
+ \s+grace-period
+ \s+(?P<grace_period>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "graceful-restart grace-period {{ graceful_restart.grace_period }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "graceful_restart": {
+ "grace_period": "{{ grace_period }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "graceful_restart.planned_only",
+ "getval": re.compile(
+ r"""
+ \s+no
+ \s+graceful-restart
+ \s+(?P<planned_only>planned-only)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "graceful-restart planned-only",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "graceful_restart": {
+ "planned_only": "{{ not planned_only }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "isolate",
+ "getval": re.compile(
+ r"""
+ \s+(?P<isolate>isolate)$""",
+ re.VERBOSE,
+ ),
+ "setval": "isolate",
+ "result": {"isolate": "{{ not not isolate }}"},
+ },
+ {
+ "name": "log_adjacency_changes",
+ "getval": re.compile(
+ r"""
+ \s+(?P<log>log-adjacency-changes)
+ \s*(?P<detail>detail)*$""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_log_adjacency_changes,
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "log_adjacency_changes": {
+ "log": "{{ True if log is defined and detail is undefined else None }}",
+ "detail": "{{ True if detail is defined else None }}",
+ }
+ }
+ }
+ },
+ },
+ {
+
+ "name": "max_lsa",
+ "getval": re.compile(
+ r"""
+ \s+max-lsa
+ \s(?P<max_gen_lsa>\d+)
+ \s*(?P<threshold>\d*)
+ \s*(?P<warning_only>warning-only)*
+ \s*(ignore-time)*\s*(?P<ig_time>\d*)
+ \s*(ignore-count)*\s*(?P<ig_count>\d*)
+ \s*(reset-time)*\s*(?P<rst_time>\d*)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_max_lsa,
+ "remval": "max-lsa {{ max_lsa.max_non_self_generated_lsa }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "max_lsa": {
+ "max_non_self_generated_lsa": "{{ max_gen_lsa }}",
+ "threshold": "{{ threshold }}",
+ "ignore_time": "{{ ig_time }}",
+ "ignore_count": "{{ ig_count }}",
+ "reset_time": "{{ rst_time }}",
+ "warning_only": "{{ not not warning_only }}",
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "max_metric",
+ "getval": re.compile(
+ r"""
+ \s+max-metric
+ \s+(?P<router_lsa>router-lsa)
+ \s*(?P<external_lsa>external-lsa)*
+ \s*(?P<max_metric_value>\d+)*
+ \s*(?P<stub_prefix_lsa>stub-prefix-lsa)*
+ \s*(?P<on_startup>on-startup)*
+ \s*(?P<wait_period>\d+)*
+ \s*(wait-for\sbgp)*
+ \s*(?P<bgp_asn>\d+)*
+ \s*(?P<inter_area_prefix_lsa>inter-area-prefix-lsa)*
+ \s*(?P<max_metric_summary_lsa>\d+)*
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": _tmplt_max_metric,
+ "remval": "max-metric router-lsa",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "max_metric": {
+ "router_lsa": {
+ "set": "{{ True if router_lsa is defined and (external_lsa is undefined) and (inter_area_prefix_lsa is undefined) and \
+ (stub_prefix_lsa is undefined) and (on_startup is undefined) else None }}",
+ "external_lsa": {
+ "set": "{{ True if external_lsa is defined and max_metric_value is undefined else None }}",
+ "max_metric_value": "{{ max_metric_value }}",
+ },
+ "stub_prefix_lsa": "{{ not not stub_prefix_lsa }}",
+ "on_startup": {
+ "set": "{{ True if on_startup is defined and (wait_period and bgp_asn) is undefined else None }}",
+ "wait_period": "{{ wait_period }}",
+ "wait_for_bgp_asn": "{{ bgp_asn }}",
+ },
+ "inter_area_prefix_lsa": {
+ "set": "{{ True if inter_area_prefix_lsa is defined and max_metric_summary_lsa is undefined else None }}",
+ "max_metric_value": "{{ max_metric_summary_lsa }}",
+ },
+ }
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "name_lookup",
+ "getval": re.compile(
+ r"""
+ \s+(?P<name_lookup>name-lookup)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": ("name-lookup"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "name_lookup": "{{ not not name_lookup }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "passive_interface.default",
+ "getval": re.compile(
+ r"""
+ \s+passive-interface
+ \s+(?P<default>default)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": ("passive-interface default"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "passive_interface": {"default": "{{ not not default }}"}
+ }
+ }
+ },
+ },
+ {
+ "name": "shutdown",
+ "getval": re.compile(
+ r"""
+ \s+(?P<shutdown>shutdown)$""",
+ re.VERBOSE,
+ ),
+ "setval": ("shutdown"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "shutdown": "{{ not not shutdown }}"
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.lsa_arrival",
+ "getval": re.compile(
+ r"""
+ \s+timers
+ \slsa-arrival
+ \s(?P<lsa_arrival_val>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": ("timers lsa-arrival {{ timers.lsa_arrival }}"),
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "timers": {
+ "lsa_arrival": "{{ lsa_arrival_val }}"
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.lsa_group_pacing",
+ "getval": re.compile(
+ r"""
+ \s+timers
+ \slsa-group-pacing
+ \s(?P<lsa_group_pacing>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers lsa-group-pacing {{ timers.lsa_group_pacing }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "timers": {
+ "lsa_group_pacing": "{{ lsa_group_pacing }}"
+ }
+ }
+ }
+ },
+ },
+ {
+ "name": "timers.throttle.lsa",
+ "getval": re.compile(
+ r"""
+ \s+timers\sthrottle\slsa
+ \s(?P<start>\d+)
+ \s(?P<hold>\d+)
+ \s(?P<max>\d+)
+ $""",
+ re.VERBOSE,
+ ),
+ "setval": "timers throttle lsa {{ timers.throttle.lsa.start_interval }}"
+ " {{ timers.throttle.lsa.hold_interval }}"
+ " {{ timers.throttle.lsa.max_interval }}",
+ "result": {
+ "vrfs": {
+ '{{ "vrf_" + vrf|d() }}': {
+ "timers": {
+ "throttle": {
+ "lsa": {
+ "start_interval": "{{ start }}",
+ "hold_interval": "{{ hold }}",
+ "max_interval": "{{ max }}",
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ ]
+ # fmt: on
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/telemetry/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/telemetry/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/telemetry/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/telemetry/telemetry.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/telemetry/telemetry.py
new file mode 100644
index 00000000..371de062
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/telemetry/telemetry.py
@@ -0,0 +1,276 @@
+#
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+"""
+The nxos telemetry utility library
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+from copy import deepcopy
+
+
+def get_module_params_subsection(module_params, tms_config, resource_key=None):
+ """
+ Helper method to get a specific module_params subsection
+ """
+ mp = {}
+ if tms_config == "TMS_GLOBAL":
+ relevant_keys = [
+ "certificate",
+ "compression",
+ "source_interface",
+ "vrf",
+ ]
+ for key in relevant_keys:
+ mp[key] = module_params[key]
+
+ if tms_config == "TMS_DESTGROUP":
+ mp["destination_groups"] = []
+ for destgrp in module_params["destination_groups"]:
+ if destgrp["id"] == resource_key:
+ mp["destination_groups"].append(destgrp)
+
+ if tms_config == "TMS_SENSORGROUP":
+ mp["sensor_groups"] = []
+ for sensor in module_params["sensor_groups"]:
+ if sensor["id"] == resource_key:
+ mp["sensor_groups"].append(sensor)
+
+ if tms_config == "TMS_SUBSCRIPTION":
+ mp["subscriptions"] = []
+ for sensor in module_params["subscriptions"]:
+ if sensor["id"] == resource_key:
+ mp["subscriptions"].append(sensor)
+
+ return mp
+
+
+def valiate_input(playvals, type, module):
+ """
+ Helper method to validate playbook values for destination groups
+ """
+ if type == "destination_groups":
+ if not playvals.get("id"):
+ msg = "Invalid playbook value: {0}.".format(playvals)
+ msg += " Parameter <id> under <destination_groups> is required"
+ module.fail_json(msg=msg)
+ if playvals.get("destination") and not isinstance(
+ playvals["destination"], dict
+ ):
+ msg = "Invalid playbook value: {0}.".format(playvals)
+ msg += " Parameter <destination> under <destination_groups> must be a dict"
+ module.fail_json(msg=msg)
+ if not playvals.get("destination") and len(playvals) > 1:
+ msg = "Invalid playbook value: {0}.".format(playvals)
+ msg += " Playbook entry contains unrecongnized parameters."
+ msg += " Make sure <destination> keys under <destination_groups> are specified as follows:"
+ msg += " destination: {ip: <ip>, port: <port>, protocol: <prot>, encoding: <enc>}}"
+ module.fail_json(msg=msg)
+
+ if type == "sensor_groups":
+ if not playvals.get("id"):
+ msg = "Invalid playbook value: {0}.".format(playvals)
+ msg += " Parameter <id> under <sensor_groups> is required"
+ module.fail_json(msg=msg)
+ if playvals.get("path") and "name" not in playvals["path"].keys():
+ msg = "Invalid playbook value: {0}.".format(playvals)
+ msg += (
+ " Parameter <path> under <sensor_groups> requires <name> key"
+ )
+ module.fail_json(msg=msg)
+
+
+def get_instance_data(key, cr_key, cr, existing_key):
+ """
+ Helper method to get instance data used to populate list structure in config
+ fact dictionary
+ """
+ data = {}
+ if existing_key is None:
+ instance = None
+ else:
+ instance = cr._ref[cr_key]["existing"][existing_key]
+
+ patterns = {
+ "destination_groups": r"destination-group (\d+)",
+ "sensor_groups": r"sensor-group (\d+)",
+ "subscriptions": r"subscription (\d+)",
+ }
+ if key in patterns.keys():
+ m = re.search(patterns[key], cr._ref["_resource_key"])
+ instance_key = m.group(1)
+ data = {"id": instance_key, cr_key: instance}
+
+ # Remove None values
+ data = dict((k, v) for k, v in data.items() if v is not None)
+ return data
+
+
+def cr_key_lookup(key, mo):
+ """
+ Helper method to get instance key value for Managed Object (mo)
+ """
+ cr_keys = [key]
+ if key == "destination_groups" and mo == "TMS_DESTGROUP":
+ cr_keys = ["destination"]
+ elif key == "sensor_groups" and mo == "TMS_SENSORGROUP":
+ cr_keys = ["data_source", "path"]
+ elif key == "subscriptions" and mo == "TMS_SUBSCRIPTION":
+ cr_keys = ["destination_group", "sensor_group"]
+
+ return cr_keys
+
+
+def normalize_data(cmd_ref):
+ """ Normalize playbook values and get_exisiting data """
+
+ playval = cmd_ref._ref.get("destination").get("playval")
+ existing = cmd_ref._ref.get("destination").get("existing")
+
+ dest_props = ["protocol", "encoding"]
+ if playval:
+ for prop in dest_props:
+ for key in playval.keys():
+ playval[key][prop] = playval[key][prop].lower()
+ if existing:
+ for key in existing.keys():
+ for prop in dest_props:
+ existing[key][prop] = existing[key][prop].lower()
+
+
+def remove_duplicate_context(cmds):
+ """ Helper method to remove duplicate telemetry context commands """
+ if not cmds:
+ return cmds
+ feature_indices = [
+ i for i, x in enumerate(cmds) if x == "feature telemetry"
+ ]
+ telemetry_indices = [i for i, x in enumerate(cmds) if x == "telemetry"]
+ if len(feature_indices) == 1 and len(telemetry_indices) == 1:
+ return cmds
+ if len(feature_indices) == 1 and not telemetry_indices:
+ return cmds
+ if len(telemetry_indices) == 1 and not feature_indices:
+ return cmds
+ if feature_indices and feature_indices[-1] > 1:
+ cmds.pop(feature_indices[-1])
+ return remove_duplicate_context(cmds)
+ if telemetry_indices and telemetry_indices[-1] > 1:
+ cmds.pop(telemetry_indices[-1])
+ return remove_duplicate_context(cmds)
+
+
+def get_setval_path(module_or_path_data):
+ """ Build setval for path parameter based on playbook inputs
+ Full Command:
+ - path {name} depth {depth} query-condition {query_condition} filter-condition {filter_condition}
+ Required:
+ - path {name}
+ Optional:
+ - depth {depth}
+ - query-condition {query_condition},
+ - filter-condition {filter_condition}
+ """
+ if isinstance(module_or_path_data, dict):
+ path = module_or_path_data
+ else:
+ path = module_or_path_data.params["config"]["sensor_groups"][0].get(
+ "path"
+ )
+ if path is None:
+ return path
+
+ setval = "path {name}"
+ if "depth" in path.keys():
+ if path.get("depth") != "None":
+ setval = setval + " depth {depth}"
+ if "query_condition" in path.keys():
+ if path.get("query_condition") != "None":
+ setval = setval + " query-condition {query_condition}"
+ if "filter_condition" in path.keys():
+ if path.get("filter_condition") != "None":
+ setval = setval + " filter-condition {filter_condition}"
+
+ return setval
+
+
+def remove_duplicate_commands(commands_list):
+ # Remove any duplicate commands.
+ # pylint: disable=unnecessary-lambda
+ return sorted(set(commands_list), key=lambda x: commands_list.index(x))
+
+
+def massage_data(have_or_want):
+ # Massage non global into a data structure that is indexed by id and
+ # normalized for destination_groups, sensor_groups and subscriptions.
+ data = deepcopy(have_or_want)
+ massaged = {}
+ massaged["destination_groups"] = {}
+ massaged["sensor_groups"] = {}
+ massaged["subscriptions"] = {}
+ from pprint import pprint
+
+ for subgroup in ["destination_groups", "sensor_groups", "subscriptions"]:
+ for item in data.get(subgroup, []):
+ id = str(item.get("id"))
+ if id not in massaged[subgroup].keys():
+ massaged[subgroup][id] = []
+ item.pop("id")
+ if not item:
+ item = None
+ else:
+ if item.get("destination"):
+ if item.get("destination").get("port"):
+ item["destination"]["port"] = str(
+ item["destination"]["port"]
+ )
+ if item.get("destination").get("protocol"):
+ item["destination"]["protocol"] = item["destination"][
+ "protocol"
+ ].lower()
+ if item.get("destination").get("encoding"):
+ item["destination"]["encoding"] = item["destination"][
+ "encoding"
+ ].lower()
+ if item.get("path"):
+ for key in [
+ "filter_condition",
+ "query_condition",
+ "depth",
+ ]:
+ if item.get("path").get(key) == "None":
+ del item["path"][key]
+ if item.get("path").get("depth") is not None:
+ item["path"]["depth"] = str(item["path"]["depth"])
+ if item.get("destination_group"):
+ item["destination_group"] = str(item["destination_group"])
+ if item.get("sensor_group"):
+ if item.get("sensor_group").get("id"):
+ item["sensor_group"]["id"] = str(
+ item["sensor_group"]["id"]
+ )
+ if item.get("sensor_group").get("sample_interval"):
+ item["sensor_group"]["sample_interval"] = str(
+ item["sensor_group"]["sample_interval"]
+ )
+ if item.get("destination_group") and item.get("sensor_group"):
+ item_copy = deepcopy(item)
+ del item_copy["sensor_group"]
+ del item["destination_group"]
+ massaged[subgroup][id].append(item_copy)
+ massaged[subgroup][id].append(item)
+ continue
+ if item.get("path") and item.get("data_source"):
+ item_copy = deepcopy(item)
+ del item_copy["data_source"]
+ del item["path"]
+ massaged[subgroup][id].append(item_copy)
+ massaged[subgroup][id].append(item)
+ continue
+ massaged[subgroup][id].append(item)
+ return massaged
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/utils.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/utils.py
new file mode 100644
index 00000000..d2da0aa6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/utils/utils.py
@@ -0,0 +1,145 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import socket
+
+from ansible.module_utils.six import iteritems
+
+
+def search_obj_in_list(name, lst, identifier):
+ for o in lst:
+ if o[identifier] == name:
+ return o
+ return None
+
+
+def flatten_dict(x):
+ result = {}
+ if not isinstance(x, dict):
+ return result
+
+ for key, value in iteritems(x):
+ if isinstance(value, dict):
+ result.update(flatten_dict(value))
+ else:
+ result[key] = value
+
+ return result
+
+
+def validate_ipv4_addr(address):
+ address = address.split("/")[0]
+ try:
+ socket.inet_aton(address)
+ except socket.error:
+ return False
+ return address.count(".") == 3
+
+
+def validate_ipv6_addr(address):
+ address = address.split("/")[0]
+ try:
+ socket.inet_pton(socket.AF_INET6, address)
+ except socket.error:
+ return False
+ return True
+
+
+def normalize_interface(name):
+ """Return the normalized interface name
+ """
+ if not name:
+ return
+
+ def _get_number(name):
+ digits = ""
+ for char in name:
+ if char.isdigit() or char in "/.":
+ digits += char
+ return digits
+
+ if name.lower().startswith("et"):
+ if_type = "Ethernet"
+ elif name.lower().startswith("vl"):
+ if_type = "Vlan"
+ elif name.lower().startswith("lo"):
+ if_type = "loopback"
+ elif name.lower().startswith("po"):
+ if_type = "port-channel"
+ elif name.lower().startswith("nv"):
+ if_type = "nve"
+ else:
+ if_type = None
+
+ number_list = name.split(" ")
+ if len(number_list) == 2:
+ number = number_list[-1].strip()
+ else:
+ number = _get_number(name)
+
+ if if_type:
+ proper_interface = if_type + number
+ else:
+ proper_interface = name
+
+ return proper_interface
+
+
+def get_interface_type(interface):
+ """Gets the type of interface
+ """
+ if interface.upper().startswith("ET"):
+ return "ethernet"
+ elif interface.upper().startswith("VL"):
+ return "svi"
+ elif interface.upper().startswith("LO"):
+ return "loopback"
+ elif interface.upper().startswith("MG"):
+ return "management"
+ elif interface.upper().startswith("MA"):
+ return "management"
+ elif interface.upper().startswith("PO"):
+ return "portchannel"
+ elif interface.upper().startswith("NV"):
+ return "nve"
+ else:
+ return "unknown"
+
+
+def remove_rsvd_interfaces(interfaces):
+ """Exclude reserved interfaces from user management
+ """
+ if not interfaces:
+ return []
+ return [
+ i for i in interfaces if get_interface_type(i["name"]) != "management"
+ ]
+
+
+def vlan_range_to_list(vlans):
+ result = []
+ if vlans:
+ for part in vlans.split(","):
+ if part == "none":
+ break
+ if "-" in part:
+ a, b = part.split("-")
+ a, b = int(a), int(b)
+ result.extend(range(a, b + 1))
+ else:
+ a = int(part)
+ result.append(a)
+ return numerical_sort(result)
+ return result
+
+
+def numerical_sort(string_int_list):
+ """Sorts list of integers that are digits in numerical order.
+ """
+
+ as_int_list = []
+
+ for vlan in string_int_list:
+ as_int_list.append(int(vlan))
+ as_int_list.sort()
+ return as_int_list
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_aaa_server.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_aaa_server.py
new file mode 100644
index 00000000..bfb33fd1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_aaa_server.py
@@ -0,0 +1,364 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_aaa_server
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages AAA server global configuration.
+description:
+- Manages AAA server global configuration
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- The server_type parameter is always required.
+- If encrypt_type is not supplied, the global AAA server key will be stored as encrypted
+ (type 7).
+- Changes to the global AAA server key with encrypt_type=0 are not idempotent.
+- state=default will set the supplied parameters to their default values. The parameters
+ that you want to default must also be set to default. If global_key=default, the
+ global key will be removed.
+options:
+ server_type:
+ description:
+ - The server type is either radius or tacacs.
+ required: true
+ choices:
+ - radius
+ - tacacs
+ type: str
+ global_key:
+ description:
+ - Global AAA shared secret or keyword 'default'.
+ type: str
+ encrypt_type:
+ description:
+ - The state of encryption applied to the entered global key. O clear text, 7 encrypted.
+ Type-6 encryption is not supported.
+ choices:
+ - '0'
+ - '7'
+ type: str
+ deadtime:
+ description:
+ - Duration for which a non-reachable AAA server is skipped, in minutes or keyword
+ 'default. Range is 1-1440. Device default is 0.
+ type: str
+ server_timeout:
+ description:
+ - Global AAA server timeout period, in seconds or keyword 'default. Range is 1-60.
+ Device default is 5.
+ type: str
+ directed_request:
+ description:
+ - Enables direct authentication requests to AAA server or keyword 'default' Device
+ default is disabled.
+ choices:
+ - enabled
+ - disabled
+ - default
+ type: str
+ state:
+ description:
+ - Manage the state of the resource.
+ default: present
+ choices:
+ - present
+ - default
+ type: str
+"""
+
+EXAMPLES = """
+# Radius Server Basic settings
+- name: Radius Server Basic settings
+ cisco.nxos.nxos_aaa_server:
+ server_type: radius
+ server_timeout: 9
+ deadtime: 20
+ directed_request: enabled
+
+# Tacacs Server Basic settings
+- name: Tacacs Server Basic settings
+ cisco.nxos.nxos_aaa_server:
+ server_type: tacacs
+ server_timeout: 8
+ deadtime: 19
+ directed_request: disabled
+
+# Setting Global Key
+- name: AAA Server Global Key
+ cisco.nxos.nxos_aaa_server:
+ server_type: radius
+ global_key: test_key
+"""
+
+RETURN = """
+commands:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["radius-server deadtime 22", "radius-server timeout 11",
+ "radius-server directed-request"]
+"""
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+PARAM_TO_DEFAULT_KEYMAP = {
+ "server_timeout": "5",
+ "deadtime": "0",
+ "directed_request": "disabled",
+}
+
+
+def execute_show_command(command, module):
+ command = {"command": command, "output": "text"}
+
+ return run_commands(module, command)
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_aaa_server_info(server_type, module):
+ aaa_server_info = {}
+ server_command = "show {0}-server".format(server_type)
+ request_command = "show {0}-server directed-request".format(server_type)
+ global_key_command = "show run | sec {0}".format(server_type)
+ aaa_regex = r".*{0}-server\skey\s\d\s+(?P<key>\S+).*".format(server_type)
+
+ server_body = execute_show_command(server_command, module)[0]
+
+ split_server = server_body.splitlines()
+
+ for line in split_server:
+ if line.startswith("timeout"):
+ aaa_server_info["server_timeout"] = line.split(":")[1]
+
+ elif line.startswith("deadtime"):
+ aaa_server_info["deadtime"] = line.split(":")[1]
+
+ request_body = execute_show_command(request_command, module)[0]
+
+ if bool(request_body):
+ aaa_server_info["directed_request"] = request_body.replace("\n", "")
+ else:
+ aaa_server_info["directed_request"] = "disabled"
+
+ key_body = execute_show_command(global_key_command, module)[0]
+
+ try:
+ match_global_key = re.match(aaa_regex, key_body, re.DOTALL)
+ group_key = match_global_key.groupdict()
+ aaa_server_info["global_key"] = group_key["key"].replace('"', "")
+ except (AttributeError, TypeError):
+ aaa_server_info["global_key"] = None
+
+ return aaa_server_info
+
+
+def config_aaa_server(params, server_type):
+ cmds = []
+
+ deadtime = params.get("deadtime")
+ server_timeout = params.get("server_timeout")
+ directed_request = params.get("directed_request")
+ encrypt_type = params.get("encrypt_type", "7")
+ global_key = params.get("global_key")
+
+ if deadtime is not None:
+ cmds.append("{0}-server deadtime {1}".format(server_type, deadtime))
+
+ if server_timeout is not None:
+ cmds.append(
+ "{0}-server timeout {1}".format(server_type, server_timeout)
+ )
+
+ if directed_request is not None:
+ if directed_request == "enabled":
+ cmds.append("{0}-server directed-request".format(server_type))
+ elif directed_request == "disabled":
+ cmds.append("no {0}-server directed-request".format(server_type))
+
+ if global_key is not None:
+ cmds.append(
+ "{0}-server key {1} {2}".format(
+ server_type, encrypt_type, global_key
+ )
+ )
+
+ return cmds
+
+
+def default_aaa_server(existing, params, server_type):
+ cmds = []
+
+ deadtime = params.get("deadtime")
+ server_timeout = params.get("server_timeout")
+ directed_request = params.get("directed_request")
+ global_key = params.get("global_key")
+ existing_key = existing.get("global_key")
+
+ if (
+ deadtime is not None
+ and existing.get("deadtime") != PARAM_TO_DEFAULT_KEYMAP["deadtime"]
+ ):
+ cmds.append("no {0}-server deadtime 1".format(server_type))
+
+ if (
+ server_timeout is not None
+ and existing.get("server_timeout")
+ != PARAM_TO_DEFAULT_KEYMAP["server_timeout"]
+ ):
+ cmds.append("no {0}-server timeout 1".format(server_type))
+
+ if (
+ directed_request is not None
+ and existing.get("directed_request")
+ != PARAM_TO_DEFAULT_KEYMAP["directed_request"]
+ ):
+ cmds.append("no {0}-server directed-request".format(server_type))
+
+ if global_key is not None and existing_key is not None:
+ cmds.append(
+ "no {0}-server key 7 {1}".format(server_type, existing_key)
+ )
+
+ return cmds
+
+
+def main():
+ argument_spec = dict(
+ server_type=dict(
+ type="str", choices=["radius", "tacacs"], required=True
+ ),
+ global_key=dict(type="str", no_log=True),
+ encrypt_type=dict(type="str", choices=["0", "7"]),
+ deadtime=dict(type="str"),
+ server_timeout=dict(type="str"),
+ directed_request=dict(
+ type="str", choices=["enabled", "disabled", "default"]
+ ),
+ state=dict(choices=["default", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ server_type = module.params["server_type"]
+ global_key = module.params["global_key"]
+ encrypt_type = module.params["encrypt_type"]
+ deadtime = module.params["deadtime"]
+ server_timeout = module.params["server_timeout"]
+ directed_request = module.params["directed_request"]
+ state = module.params["state"]
+
+ if encrypt_type and not global_key:
+ module.fail_json(msg="encrypt_type must be used with global_key.")
+
+ args = dict(
+ server_type=server_type,
+ global_key=global_key,
+ encrypt_type=encrypt_type,
+ deadtime=deadtime,
+ server_timeout=server_timeout,
+ directed_request=directed_request,
+ )
+
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+
+ existing = get_aaa_server_info(server_type, module)
+
+ commands = []
+ if state == "present":
+ if deadtime:
+ try:
+ if int(deadtime) < 0 or int(deadtime) > 1440:
+ raise ValueError
+ except ValueError:
+ module.fail_json(
+ msg="deadtime must be an integer between 0 and 1440"
+ )
+
+ if server_timeout:
+ try:
+ if int(server_timeout) < 1 or int(server_timeout) > 60:
+ raise ValueError
+ except ValueError:
+ module.fail_json(
+ msg="server_timeout must be an integer between 1 and 60"
+ )
+
+ delta = dict(set(proposed.items()).difference(existing.items()))
+ if delta:
+ command = config_aaa_server(delta, server_type)
+ if command:
+ commands.append(command)
+
+ elif state == "default":
+ for key, value in proposed.items():
+ if key != "server_type" and value != "default":
+ module.fail_json(
+ msg='Parameters must be set to "default"'
+ "when state=default"
+ )
+ command = default_aaa_server(existing, proposed, server_type)
+ if command:
+ commands.append(command)
+
+ cmds = flatten_list(commands)
+ if cmds:
+ results["changed"] = True
+ if not module.check_mode:
+ load_config(module, cmds)
+ if "configure" in cmds:
+ cmds.pop(0)
+ results["commands"] = cmds
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_aaa_server_host.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_aaa_server_host.py
new file mode 100644
index 00000000..7949ca28
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_aaa_server_host.py
@@ -0,0 +1,383 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_aaa_server_host
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages AAA server host-specific configuration.
+description:
+- Manages AAA server host-specific configuration.
+version_added: 1.0.0
+author: Jason Edelman (@jedelman8)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- Changes to the host key (shared secret) are not idempotent for type 0.
+- If C(state=absent) removes the whole host configuration.
+options:
+ server_type:
+ description:
+ - The server type is either radius or tacacs.
+ required: true
+ choices:
+ - radius
+ - tacacs
+ type: str
+ address:
+ description:
+ - Address or name of the radius or tacacs host.
+ required: true
+ type: str
+ key:
+ description:
+ - Shared secret for the specified host or keyword 'default'.
+ type: str
+ encrypt_type:
+ description:
+ - The state of encryption applied to the entered key. O for clear text, 7 for
+ encrypted. Type-6 encryption is not supported.
+ choices:
+ - '0'
+ - '7'
+ type: str
+ host_timeout:
+ description:
+ - Timeout period for specified host, in seconds or keyword 'default. Range is
+ 1-60.
+ type: str
+ auth_port:
+ description:
+ - Alternate UDP port for RADIUS authentication or keyword 'default'.
+ type: str
+ acct_port:
+ description:
+ - Alternate UDP port for RADIUS accounting or keyword 'default'.
+ type: str
+ tacacs_port:
+ description:
+ - Alternate TCP port TACACS Server or keyword 'default'.
+ type: str
+ state:
+ description:
+ - Manage the state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+EXAMPLES = """
+# Radius Server Host Basic settings
+- name: Radius Server Host Basic settings
+ cisco.nxos.nxos_aaa_server_host:
+ state: present
+ server_type: radius
+ address: 1.2.3.4
+ acct_port: 2084
+ host_timeout: 10
+
+# Radius Server Host Key Configuration
+- name: Radius Server Host Key Configuration
+ cisco.nxos.nxos_aaa_server_host:
+ state: present
+ server_type: radius
+ address: 1.2.3.4
+ key: hello
+ encrypt_type: 7
+
+# TACACS Server Host Configuration
+- name: Tacacs Server Host Configuration
+ cisco.nxos.nxos_aaa_server_host:
+ state: present
+ server_type: tacacs
+ tacacs_port: 89
+ host_timeout: 10
+ address: 5.6.7.8
+
+"""
+
+RETURN = """
+proposed:
+ description: k/v pairs of parameters passed into module
+ returned: always
+ type: dict
+ sample: {"address": "1.2.3.4", "auth_port": "2084",
+ "host_timeout": "10", "server_type": "radius"}
+existing:
+ description:
+ - k/v pairs of existing configuration
+ returned: always
+ type: dict
+ sample: {}
+end_state:
+ description: k/v pairs of configuration after module execution
+ returned: always
+ type: dict
+ sample: {"address": "1.2.3.4", "auth_port": "2084",
+ "host_timeout": "10", "server_type": "radius"}
+updates:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["radius-server host 1.2.3.4 auth-port 2084 timeout 10"]
+changed:
+ description: check to see if a change was made on the device
+ returned: always
+ type: bool
+ sample: true
+"""
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_capabilities,
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def execute_show_command(command, module):
+ device_info = get_capabilities(module)
+ network_api = device_info.get("network_api", "nxapi")
+
+ if network_api == "cliconf":
+ cmds = [command]
+ body = run_commands(module, cmds)
+ elif network_api == "nxapi":
+ cmds = {"command": command, "output": "text"}
+ body = run_commands(module, cmds)
+
+ return body
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_aaa_host_info(module, server_type, address):
+ aaa_host_info = {}
+ command = "show run | inc {0}-server.host.{1}".format(server_type, address)
+
+ body = execute_show_command(command, module)[0]
+ if body:
+ try:
+ if "radius" in body:
+ pattern = (
+ r"\S+ host \S+(?:\s+key 7\s+(\S+))?(?:\s+auth-port (\d+))?"
+ r"(?:\s+acct-port (\d+))?(?:\s+authentication)?"
+ r"(?:\s+accounting)?(?:\s+timeout (\d+))?"
+ )
+ match = re.search(pattern, body)
+ aaa_host_info["key"] = match.group(1)
+ if aaa_host_info["key"]:
+ aaa_host_info["key"] = aaa_host_info["key"].replace(
+ '"', ""
+ )
+ aaa_host_info["encrypt_type"] = "7"
+ aaa_host_info["auth_port"] = match.group(2)
+ aaa_host_info["acct_port"] = match.group(3)
+ aaa_host_info["host_timeout"] = match.group(4)
+ elif "tacacs" in body:
+ pattern = (
+ r"\S+ host \S+(?:\s+key 7\s+(\S+))?(?:\s+port (\d+))?"
+ r"(?:\s+timeout (\d+))?"
+ )
+ match = re.search(pattern, body)
+ aaa_host_info["key"] = match.group(1)
+ if aaa_host_info["key"]:
+ aaa_host_info["key"] = aaa_host_info["key"].replace(
+ '"', ""
+ )
+ aaa_host_info["encrypt_type"] = "7"
+ aaa_host_info["tacacs_port"] = match.group(2)
+ aaa_host_info["host_timeout"] = match.group(3)
+
+ aaa_host_info["server_type"] = server_type
+ aaa_host_info["address"] = address
+ except TypeError:
+ return {}
+ else:
+ return {}
+
+ return aaa_host_info
+
+
+def config_aaa_host(server_type, address, params, existing):
+ cmds = []
+ cmd_str = "{0}-server host {1}".format(server_type, address)
+ cmd_no_str = "no " + cmd_str
+
+ key = params.get("key")
+ enc_type = params.get("encrypt_type", "")
+
+ defval = False
+ nondef = False
+
+ if key:
+ if key != "default":
+ cmds.append(cmd_str + " key {0} {1}".format(enc_type, key))
+ else:
+ cmds.append(cmd_no_str + " key 7 {0}".format(existing.get("key")))
+
+ locdict = {
+ "auth_port": "auth-port",
+ "acct_port": "acct-port",
+ "tacacs_port": "port",
+ "host_timeout": "timeout",
+ }
+
+ # platform CLI needs the keywords in the following order
+ for key in ["auth_port", "acct_port", "tacacs_port", "host_timeout"]:
+ item = params.get(key)
+ if item:
+ if item != "default":
+ cmd_str += " {0} {1}".format(locdict.get(key), item)
+ nondef = True
+ else:
+ cmd_no_str += " {0} 1".format(locdict.get(key))
+ defval = True
+ if defval:
+ cmds.append(cmd_no_str)
+ if nondef or not existing:
+ cmds.append(cmd_str)
+
+ return cmds
+
+
+def main():
+ argument_spec = dict(
+ server_type=dict(choices=["radius", "tacacs"], required=True),
+ address=dict(type="str", required=True),
+ key=dict(type="str"),
+ encrypt_type=dict(type="str", choices=["0", "7"]),
+ host_timeout=dict(type="str"),
+ auth_port=dict(type="str"),
+ acct_port=dict(type="str"),
+ tacacs_port=dict(type="str"),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ server_type = module.params["server_type"]
+ address = module.params["address"]
+ key = module.params["key"]
+ encrypt_type = module.params["encrypt_type"]
+ host_timeout = module.params["host_timeout"]
+ auth_port = module.params["auth_port"]
+ acct_port = module.params["acct_port"]
+ tacacs_port = module.params["tacacs_port"]
+ state = module.params["state"]
+
+ args = dict(
+ server_type=server_type,
+ address=address,
+ key=key,
+ encrypt_type=encrypt_type,
+ host_timeout=host_timeout,
+ auth_port=auth_port,
+ acct_port=acct_port,
+ tacacs_port=tacacs_port,
+ )
+
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+ changed = False
+
+ if encrypt_type and not key:
+ module.fail_json(msg="encrypt_type must be used with key")
+
+ if tacacs_port and server_type != "tacacs":
+ module.fail_json(
+ msg="tacacs_port can only be used with server_type=tacacs"
+ )
+
+ if (auth_port or acct_port) and server_type != "radius":
+ module.fail_json(
+ msg="auth_port and acct_port can only be used"
+ "when server_type=radius"
+ )
+
+ existing = get_aaa_host_info(module, server_type, address)
+ end_state = existing
+
+ commands = []
+ delta = {}
+ if state == "present":
+ if not existing:
+ delta = proposed
+ else:
+ for key, value in proposed.items():
+ if key == "encrypt_type":
+ delta[key] = value
+ if value != existing.get(key):
+ if value != "default" or existing.get(key):
+ delta[key] = value
+
+ command = config_aaa_host(server_type, address, delta, existing)
+ if command:
+ commands.append(command)
+
+ elif state == "absent":
+ intersect = dict(set(proposed.items()).intersection(existing.items()))
+ if intersect.get("address") and intersect.get("server_type"):
+ command = "no {0}-server host {1}".format(
+ intersect.get("server_type"), intersect.get("address")
+ )
+ commands.append(command)
+
+ cmds = flatten_list(commands)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ changed = True
+ load_config(module, cmds)
+ end_state = get_aaa_host_info(module, server_type, address)
+
+ results = {}
+ results["proposed"] = proposed
+ results["existing"] = existing
+ results["updates"] = cmds
+ results["changed"] = changed
+ results["warnings"] = warnings
+ results["end_state"] = end_state
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acl.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acl.py
new file mode 100644
index 00000000..84b5acbc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acl.py
@@ -0,0 +1,698 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_acl
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2022-06-01) Manages access
+ list entries for ACLs.
+description:
+- Manages access list entries for ACLs.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+deprecated:
+ alternative: nxos_acls
+ why: Updated modules released with more functionality
+ removed_at_date: '2022-06-01'
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- C(state=absent) removes the ACE if it exists.
+- C(state=delete_acl) deletes the ACL if it exists.
+- For idempotency, use port numbers for the src/dest port params like I(src_port1)
+ and names for the well defined protocols for the I(proto) param.
+- Although this module is idempotent in that if the ace as presented in the task is
+ identical to the one on the switch, no changes will be made. If there is any difference,
+ what is in Ansible will be pushed (configured options will be overridden). This
+ is to improve security, but at the same time remember an ACE is removed, then re-added,
+ so if there is a change, the new ACE will be exactly what parameters you are sending
+ to the module.
+options:
+ seq:
+ description:
+ - Sequence number of the entry (ACE).
+ type: str
+ name:
+ description:
+ - Case sensitive name of the access list (ACL).
+ required: true
+ type: str
+ action:
+ description:
+ - Action of the ACE.
+ choices:
+ - permit
+ - deny
+ - remark
+ type: str
+ remark:
+ description:
+ - If action is set to remark, this is the description.
+ type: str
+ proto:
+ description:
+ - Port number or protocol (as supported by the switch).
+ type: str
+ src:
+ description:
+ - Source ip and mask using IP/MASK notation and supports keyword 'any'.
+ type: str
+ src_port_op:
+ description:
+ - Source port operands such as eq, neq, gt, lt, range.
+ choices:
+ - any
+ - eq
+ - gt
+ - lt
+ - neq
+ - range
+ type: str
+ src_port1:
+ description:
+ - Port/protocol and also first (lower) port when using range operand.
+ type: str
+ src_port2:
+ description:
+ - Second (end) port when using range operand.
+ type: str
+ dest:
+ description:
+ - Destination ip and mask using IP/MASK notation and supports the keyword 'any'.
+ type: str
+ dest_port_op:
+ description:
+ - Destination port operands such as eq, neq, gt, lt, range.
+ choices:
+ - any
+ - eq
+ - gt
+ - lt
+ - neq
+ - range
+ type: str
+ dest_port1:
+ description:
+ - Port/protocol and also first (lower) port when using range operand.
+ type: str
+ dest_port2:
+ description:
+ - Second (end) port when using range operand.
+ type: str
+ log:
+ description:
+ - Log matches against this entry.
+ choices:
+ - enable
+ type: str
+ urg:
+ description:
+ - Match on the URG bit.
+ choices:
+ - enable
+ type: str
+ ack:
+ description:
+ - Match on the ACK bit.
+ choices:
+ - enable
+ type: str
+ psh:
+ description:
+ - Match on the PSH bit.
+ choices:
+ - enable
+ type: str
+ rst:
+ description:
+ - Match on the RST bit.
+ choices:
+ - enable
+ type: str
+ syn:
+ description:
+ - Match on the SYN bit.
+ choices:
+ - enable
+ type: str
+ fin:
+ description:
+ - Match on the FIN bit.
+ choices:
+ - enable
+ type: str
+ established:
+ description:
+ - Match established connections.
+ choices:
+ - enable
+ type: str
+ fragments:
+ description:
+ - Check non-initial fragments.
+ choices:
+ - enable
+ type: str
+ time_range:
+ description:
+ - Name of time-range to apply.
+ type: str
+ precedence:
+ description:
+ - Match packets with given precedence.
+ choices:
+ - critical
+ - flash
+ - flash-override
+ - immediate
+ - internet
+ - network
+ - priority
+ - routine
+ type: str
+ dscp:
+ description:
+ - Match packets with given dscp value.
+ choices:
+ - af11
+ - af12
+ - af13
+ - af21
+ - af22
+ - af23
+ - af31
+ - af32
+ - af33
+ - af41
+ - af42
+ - af43
+ - cs1
+ - cs2
+ - cs3
+ - cs4
+ - cs5
+ - cs6
+ - cs7
+ - default
+ - ef
+ type: str
+ state:
+ description:
+ - Specify desired state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ - delete_acl
+ type: str
+
+
+"""
+
+EXAMPLES = """
+# configure ACL ANSIBLE
+- cisco.nxos.nxos_acl:
+ name: ANSIBLE
+ seq: 10
+ action: permit
+ proto: tcp
+ src: 192.0.2.1/24
+ dest: any
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["ip access-list ANSIBLE", "10 permit tcp 192.0.2.1/24 any"]
+"""
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def execute_show_command(command, module, check_rc=True):
+ command += " | json"
+ cmds = [command]
+ body = run_commands(module, cmds, check_rc=check_rc)
+ return body
+
+
+def get_acl(module, acl_name, seq_number):
+ command = "show ip access-list"
+ new_acl = []
+ saveme = {}
+ acl_body = {}
+
+ body = execute_show_command(command, module, check_rc=False)
+ if "Structured output unsupported" in repr(body):
+ # Some older versions raise 501 and return a string when no ACLs exist
+ return {}, []
+
+ if body and body[0]:
+ all_acl_body = body[0]["TABLE_ip_ipv6_mac"]["ROW_ip_ipv6_mac"]
+ else:
+ # no access-lists configured on the device
+ return {}, []
+
+ if isinstance(all_acl_body, dict):
+ # Only 1 ACL configured.
+ if all_acl_body.get("acl_name") == acl_name:
+ acl_body = all_acl_body
+ else:
+ for acl in all_acl_body:
+ if acl.get("acl_name") == acl_name:
+ acl_body = acl
+ break
+
+ try:
+ acl_entries = acl_body["TABLE_seqno"]["ROW_seqno"]
+ acl_name = acl_body.get("acl_name")
+ except KeyError: # could be raised if no ACEs are configured for an ACL
+ return {}, [{"acl": "no_entries"}]
+
+ if isinstance(acl_entries, dict):
+ acl_entries = [acl_entries]
+
+ for each in acl_entries:
+ temp = {}
+ options = {}
+ remark = each.get("remark")
+
+ temp["name"] = acl_name
+ temp["seq"] = str(each.get("seqno"))
+
+ if remark:
+ temp["remark"] = remark
+ temp["action"] = "remark"
+ else:
+ temp["action"] = each.get("permitdeny")
+ temp["proto"] = str(
+ each.get("proto", each.get("proto_str", each.get("ip")))
+ )
+ temp["src"] = each.get("src_any", each.get("src_ip_prefix"))
+ temp["src_port_op"] = each.get("src_port_op")
+ temp["src_port1"] = each.get("src_port1_num")
+ temp["src_port2"] = each.get("src_port2_num")
+ temp["dest"] = each.get("dest_any", each.get("dest_ip_prefix"))
+ temp["dest_port_op"] = each.get("dest_port_op")
+ temp["dest_port1"] = each.get("dest_port1_num")
+ temp["dest_port2"] = each.get("dest_port2_num")
+
+ options["log"] = each.get("log")
+ options["urg"] = each.get("urg")
+ options["ack"] = each.get("ack")
+ options["psh"] = each.get("psh")
+ options["rst"] = each.get("rst")
+ options["syn"] = each.get("syn")
+ options["fin"] = each.get("fin")
+ options["established"] = each.get("established")
+ options["dscp"] = each.get("dscp_str")
+ options["precedence"] = each.get("precedence_str")
+ options["fragments"] = each.get("fragments")
+ options["time_range"] = each.get("timerange")
+
+ keep = {}
+ for key, value in temp.items():
+ if value:
+ keep[key] = value
+
+ options_no_null = {}
+ for key, value in options.items():
+ if value is not None:
+ options_no_null[key] = value
+ keep["options"] = options_no_null
+
+ if keep.get("seq") == seq_number:
+ saveme = dict(keep)
+
+ new_acl.append(keep)
+
+ return saveme, new_acl
+
+
+def _acl_operand(operand, srcp1, sprcp2):
+ sub_entry = " " + operand
+
+ if operand == "range":
+ sub_entry += " " + srcp1 + " " + sprcp2
+ else:
+ sub_entry += " " + srcp1
+
+ return sub_entry
+
+
+def config_core_acl(proposed):
+ seq = proposed.get("seq")
+ action = proposed.get("action")
+ remark = proposed.get("remark")
+ proto = proposed.get("proto")
+ src = proposed.get("src")
+ src_port_op = proposed.get("src_port_op")
+ src_port1 = proposed.get("src_port1")
+ src_port2 = proposed.get("src_port2")
+
+ dest = proposed.get("dest")
+ dest_port_op = proposed.get("dest_port_op")
+ dest_port1 = proposed.get("dest_port1")
+ dest_port2 = proposed.get("dest_port2")
+
+ ace_start_entries = [action, proto, src]
+ if not remark:
+ ace = seq + " " + " ".join(ace_start_entries)
+ if src_port_op:
+ ace += _acl_operand(src_port_op, src_port1, src_port2)
+ ace += " " + dest
+ if dest_port_op:
+ ace += _acl_operand(dest_port_op, dest_port1, dest_port2)
+ else:
+ ace = seq + " remark " + remark
+
+ return ace
+
+
+def config_acl_options(options):
+ ENABLE_ONLY = [
+ "psh",
+ "urg",
+ "log",
+ "ack",
+ "syn",
+ "established",
+ "rst",
+ "fin",
+ "fragments",
+ "log",
+ ]
+
+ OTHER = ["dscp", "precedence", "time-range"]
+ # packet-length is the only option not currently supported
+
+ if options.get("time_range"):
+ options["time-range"] = options.get("time_range")
+ options.pop("time_range")
+
+ command = ""
+ for option, value in options.items():
+ if option in ENABLE_ONLY:
+ if value == "enable":
+ command += " " + option
+ elif option in OTHER:
+ command += " " + option + " " + value
+ if command:
+ command = command.strip()
+ return command
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def main():
+ argument_spec = dict(
+ seq=dict(required=False, type="str"),
+ name=dict(required=True, type="str"),
+ action=dict(required=False, choices=["remark", "permit", "deny"]),
+ remark=dict(required=False, type="str"),
+ proto=dict(required=False, type="str"),
+ src=dict(required=False, type="str"),
+ src_port_op=dict(
+ required=False, choices=["any", "eq", "gt", "lt", "neq", "range"]
+ ),
+ src_port1=dict(required=False, type="str"),
+ src_port2=dict(required=False, type="str"),
+ dest=dict(required=False, type="str"),
+ dest_port_op=dict(
+ required=False, choices=["any", "eq", "gt", "lt", "neq", "range"]
+ ),
+ dest_port1=dict(required=False, type="str"),
+ dest_port2=dict(required=False, type="str"),
+ log=dict(required=False, choices=["enable"]),
+ urg=dict(required=False, choices=["enable"]),
+ ack=dict(required=False, choices=["enable"]),
+ psh=dict(required=False, choices=["enable"]),
+ rst=dict(required=False, choices=["enable"]),
+ syn=dict(required=False, choices=["enable"]),
+ fragments=dict(required=False, choices=["enable"]),
+ fin=dict(required=False, choices=["enable"]),
+ established=dict(required=False, choices=["enable"]),
+ time_range=dict(required=False),
+ precedence=dict(
+ required=False,
+ choices=[
+ "critical",
+ "flash",
+ "flash-override",
+ "immediate",
+ "internet",
+ "network",
+ "priority",
+ "routine",
+ ],
+ ),
+ dscp=dict(
+ required=False,
+ choices=[
+ "af11",
+ "af12",
+ "af13",
+ "af21",
+ "af22",
+ "af23",
+ "af31",
+ "af32",
+ "af33",
+ "af41",
+ "af42",
+ "af43",
+ "cs1",
+ "cs2",
+ "cs3",
+ "cs4",
+ "cs5",
+ "cs6",
+ "cs7",
+ "default",
+ "ef",
+ ],
+ ),
+ state=dict(
+ choices=["absent", "present", "delete_acl"], default="present"
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ results = dict(changed=False, warnings=warnings)
+
+ state = module.params["state"]
+ action = module.params["action"]
+ remark = module.params["remark"]
+ dscp = module.params["dscp"]
+ precedence = module.params["precedence"]
+ seq = module.params["seq"]
+ name = module.params["name"]
+ seq = module.params["seq"]
+
+ if action == "remark" and not remark:
+ module.fail_json(
+ msg="when state is action, remark param is also required"
+ )
+
+ REQUIRED = ["seq", "name", "action", "proto", "src", "dest"]
+ ABSENT = ["name", "seq"]
+ if state == "present":
+ if action and remark and seq:
+ pass
+ else:
+ for each in REQUIRED:
+ if module.params[each] is None:
+ module.fail_json(
+ msg="req'd params when state is present:",
+ params=REQUIRED,
+ )
+ elif state == "absent":
+ for each in ABSENT:
+ if module.params[each] is None:
+ module.fail_json(
+ msg="require params when state is absent", params=ABSENT
+ )
+ elif state == "delete_acl":
+ if module.params["name"] is None:
+ module.fail_json(msg="param name req'd when state is delete_acl")
+
+ if dscp and precedence:
+ module.fail_json(
+ msg="only one of the params dscp/precedence " "are allowed"
+ )
+
+ OPTIONS_NAMES = [
+ "log",
+ "urg",
+ "ack",
+ "psh",
+ "rst",
+ "syn",
+ "fin",
+ "established",
+ "dscp",
+ "precedence",
+ "fragments",
+ "time_range",
+ ]
+
+ CORE = [
+ "seq",
+ "name",
+ "action",
+ "proto",
+ "src",
+ "src_port_op",
+ "src_port1",
+ "src_port2",
+ "dest",
+ "dest_port_op",
+ "dest_port1",
+ "dest_port2",
+ "remark",
+ ]
+
+ proposed_core = dict(
+ (param, value)
+ for (param, value) in module.params.items()
+ if param in CORE and value is not None
+ )
+
+ proposed_options = dict(
+ (param, value)
+ for (param, value) in module.params.items()
+ if param in OPTIONS_NAMES and value is not None
+ )
+ proposed = {}
+ proposed.update(proposed_core)
+ proposed.update(proposed_options)
+
+ existing_options = {}
+
+ # getting existing existing_core=dict, acl=list, seq=list
+ existing_core, acl = get_acl(module, name, seq)
+ if existing_core:
+ existing_options = existing_core.get("options")
+ existing_core.pop("options")
+
+ commands = []
+ delta_core = {}
+ delta_options = {}
+
+ if not existing_core.get("remark"):
+ dcore = dict(
+ set(proposed_core.items()).difference(existing_core.items())
+ )
+ if not dcore:
+ # check the diff in the other way just in case
+ dcore = dict(
+ set(existing_core.items()).difference(proposed_core.items())
+ )
+ delta_core = dcore
+ if delta_core:
+ delta_options = proposed_options
+ else:
+ doptions = dict(
+ set(proposed_options.items()).difference(
+ existing_options.items()
+ )
+ )
+ # check the diff in the other way just in case
+ if not doptions:
+ doptions = dict(
+ set(existing_options.items()).difference(
+ proposed_options.items()
+ )
+ )
+ delta_options = doptions
+ else:
+ delta_core = dict(
+ set(proposed_core.items()).difference(existing_core.items())
+ )
+
+ if state == "present":
+ if delta_core or delta_options:
+ if existing_core: # if the ace exists already
+ commands.append(["no {0}".format(seq)])
+ if delta_options:
+ myacl_str = config_core_acl(proposed_core)
+ myacl_str += " " + config_acl_options(proposed_options)
+ else:
+ myacl_str = config_core_acl(proposed_core)
+ command = [myacl_str]
+ commands.append(command)
+ elif state == "absent":
+ if existing_core:
+ commands.append(["no {0}".format(seq)])
+ elif state == "delete_acl":
+ if acl and acl[0].get("acl") != "no_entries":
+ commands.append(["no ip access-list {0}".format(name)])
+
+ cmds = []
+ if commands:
+ preface = []
+ if state in ["present", "absent"]:
+ preface = ["ip access-list {0}".format(name)]
+ commands.insert(0, preface)
+
+ cmds = flatten_list(commands)
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ load_config(module, cmds)
+ results["changed"] = True
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ results["commands"] = cmds
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acl_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acl_interface.py
new file mode 100644
index 00000000..2a65fa32
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acl_interface.py
@@ -0,0 +1,227 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_acl_interface
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2022-06-01) Manages applying
+ ACLs to interfaces.
+description:
+- Manages applying ACLs to interfaces.
+version_added: 1.0.0
+deprecated:
+ alternative: nxos_acl_interfaces
+ why: Updated modules released with more functionality
+ removed_at_date: '2022-06-01'
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+options:
+ name:
+ description:
+ - Case sensitive name of the access list (ACL).
+ required: true
+ type: str
+ interface:
+ description:
+ - Full name of interface, e.g. I(Ethernet1/1).
+ required: true
+ type: str
+ direction:
+ description:
+ - Direction ACL to be applied in on the interface.
+ required: true
+ choices:
+ - ingress
+ - egress
+ type: str
+ state:
+ description:
+ - Specify desired state of the resource.
+ required: false
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+
+
+"""
+
+EXAMPLES = """
+- name: apply egress acl to ethernet1/41
+ cisco.nxos.nxos_acl_interface:
+ name: ANSIBLE
+ interface: ethernet1/41
+ direction: egress
+ state: present
+"""
+
+RETURN = """
+acl_applied_to:
+ description: list of interfaces the ACL is applied to
+ returned: always
+ type: list
+ sample: [{"acl_type": "Router ACL", "direction": "egress",
+ "interface": "Ethernet1/41", "name": "ANSIBLE"}]
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["interface ethernet1/41", "ip access-group ANSIBLE out"]
+"""
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def check_for_acl_int_present(module, name, intf, direction):
+ # Need to Capitalize the interface name as the nxos
+ # output has capitalization
+ command = [
+ {
+ "command": "show running-config aclmgr | section {0}".format(
+ intf.title()
+ ),
+ "output": "text",
+ }
+ ]
+ body = run_commands(module, command)
+
+ if direction == "ingress":
+ mdir = "in"
+ elif direction == "egress":
+ mdir = "out"
+
+ match = re.search(
+ "ip access-group {0} {1}".format(name, mdir), str(body[0])
+ )
+ return bool(match)
+
+
+def apply_acl(proposed):
+ commands = []
+
+ commands.append("interface " + proposed.get("interface"))
+ direction = proposed.get("direction")
+ if direction == "egress":
+ cmd = "ip access-group {0} {1}".format(proposed.get("name"), "out")
+ elif direction == "ingress":
+ cmd = "ip access-group {0} {1}".format(proposed.get("name"), "in")
+ commands.append(cmd)
+
+ return commands
+
+
+def remove_acl(proposed):
+ commands = []
+
+ commands.append("interface " + proposed.get("interface"))
+ direction = proposed.get("direction")
+ if direction == "egress":
+ cmd = "no ip access-group {0} {1}".format(proposed.get("name"), "out")
+ elif direction == "ingress":
+ cmd = "no ip access-group {0} {1}".format(proposed.get("name"), "in")
+ commands.append(cmd)
+
+ return commands
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def main():
+ argument_spec = dict(
+ name=dict(required=True, type="str"),
+ interface=dict(required=True),
+ direction=dict(required=True, choices=["egress", "ingress"]),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ results = dict(changed=False, warnings=warnings)
+
+ state = module.params["state"]
+ name = module.params["name"]
+ interface = module.params["interface"].lower()
+ direction = module.params["direction"].lower()
+
+ proposed = dict(name=name, interface=interface, direction=direction)
+
+ existing = check_for_acl_int_present(module, name, interface, direction)
+
+ cmds = []
+ commands = []
+ if state == "present":
+ if not existing:
+ command = apply_acl(proposed)
+ if command:
+ commands.append(command)
+
+ elif state == "absent":
+ if existing:
+ command = remove_acl(proposed)
+ if command:
+ commands.append(command)
+
+ if commands:
+ cmds = flatten_list(commands)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ load_config(module, cmds)
+ results["changed"] = True
+ if "configure" in cmds:
+ cmds.pop(0)
+ else:
+ cmds = []
+
+ results["commands"] = cmds
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acl_interfaces.py
new file mode 100644
index 00000000..74728194
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acl_interfaces.py
@@ -0,0 +1,437 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_acl_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_acl_interfaces
+short_description: ACL interfaces resource module
+description: Add and remove Access Control Lists on interfaces in NX-OS platform
+version_added: 1.0.0
+author: Adharsh Srivats Rangarajan (@adharshsrivatsr)
+notes:
+- Tested against NX-OS 7.3.(0)D1(1) on VIRL
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section '^interface').
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A list of interfaces to be configured with ACLs
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Name of the interface
+ type: str
+ required: true
+ access_groups:
+ description: List of address family indicators with ACLs to be configured
+ on the interface
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description: Address Family Indicator of the ACLs to be configured
+ type: str
+ required: true
+ choices:
+ - ipv4
+ - ipv6
+ acls:
+ description: List of Access Control Lists for the interface
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Name of the ACL to be added/removed
+ type: str
+ required: true
+ direction:
+ description: Direction to be applied for the ACL
+ type: str
+ required: true
+ choices:
+ - in
+ - out
+ port:
+ description: Use ACL as port policy.
+ type: bool
+ state:
+ description: The state the configuration should be left in
+ type: str
+ choices:
+ - deleted
+ - gathered
+ - merged
+ - overridden
+ - rendered
+ - replaced
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# ------------
+#
+
+- name: Merge ACL interfaces configuration
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ - name: Ethernet1/2
+ access_groups:
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ direction: in
+
+ - name: Eth1/5
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: PortACL
+ direction: in
+ port: true
+
+ - name: ACL1v4
+ direction: out
+
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ direction: in
+ state: merged
+
+# After state:
+# ------------
+# interface Ethernet1/2
+# ipv6 traffic-filter ACL1v6 in
+# interface Ethernet1/5
+# ip port access-group PortACL in
+# ip access-group ACL1v4 out
+# ipv6 traffic-filter ACL1v6 in
+
+# Using replaced
+
+# Before state:
+# ------------
+# interface Ethernet1/2
+# ipv6 traffic-filter ACL1v6 in
+# interface Ethernet1/5
+# ip port access-group PortACL in
+# ip access-group ACL1v4 out
+# ipv6 traffic-filter ACL1v6 in
+
+- name: Replace interface configuration with given configuration
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ - name: Eth1/5
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: NewACLv4
+ direction: out
+
+ - name: Ethernet1/3
+ access_groups:
+ - afi: ipv6
+ acls:
+ - name: NewACLv6
+ direction: in
+ port: true
+ state: replaced
+
+# After state:
+# ------------
+# interface Ethernet1/2
+# ipv6 traffic-filter ACL1v6 in
+# interface Ethernet1/3
+# ipv6 port traffic-filter NewACLv6 in
+# interface Ethernet1/5
+# ip access-group NewACLv4 out
+
+# Using overridden
+
+# Before state:
+# ------------
+# interface Ethernet1/2
+# ipv6 traffic-filter ACL1v6 in
+# interface Ethernet1/5
+# ip port access-group PortACL in
+# ip access-group ACL1v4 out
+# ipv6 traffic-filter ACL1v6 in
+
+- name: Override interface configuration with given configuration
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ - name: Ethernet1/3
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: ACL1v4
+ direction: out
+
+ - name: PortACL
+ port: true
+ direction: in
+ - afi: ipv6
+ acls:
+ - name: NewACLv6
+ direction: in
+ port: true
+ state: overridden
+
+# After state:
+# ------------
+# interface Ethernet1/3
+# ip access-group ACL1v4 out
+# ip port access-group PortACL in
+# ipv6 port traffic-filter NewACLv6 in
+
+# Using deleted to remove ACL config from specified interfaces
+
+# Before state:
+# -------------
+# interface Ethernet1/1
+# ip access-group ACL2v4 in
+# interface Ethernet1/2
+# ipv6 traffic-filter ACL1v6 in
+# interface Ethernet1/5
+# ip port access-group PortACL in
+# ip access-group ACL1v4 out
+# ipv6 traffic-filter ACL1v6 in
+
+- name: Delete ACL configuration on interfaces
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ - name: Ethernet1/5
+ - name: Ethernet1/2
+ state: deleted
+
+# After state:
+# -------------
+# interface Ethernet1/1
+# ip access-group ACL2v4 in
+# interface Ethernet1/2
+# interface Ethernet1/5
+
+# Using deleted to remove ACL config from all interfaces
+
+# Before state:
+# -------------
+# interface Ethernet1/1
+# ip access-group ACL2v4 in
+# interface Ethernet1/2
+# ipv6 traffic-filter ACL1v6 in
+# interface Ethernet1/5
+# ip port access-group PortACL in
+# ip access-group ACL1v4 out
+# ipv6 traffic-filter ACL1v6 in
+
+- name: Delete ACL configuration from all interfaces
+ cisco.nxos.nxos_acl_interfaces:
+ state: deleted
+
+# After state:
+# -------------
+# interface Ethernet1/1
+# interface Ethernet1/2
+# interface Ethernet1/5
+
+# Using parsed
+
+- name: Parse given configuration into structured format
+ cisco.nxos.nxos_acl_interfaces:
+ running_config: |
+ interface Ethernet1/2
+ ipv6 traffic-filter ACL1v6 in
+ interface Ethernet1/5
+ ipv6 traffic-filter ACL1v6 in
+ ip access-group ACL1v4 out
+ ip port access-group PortACL in
+ state: parsed
+
+# returns
+# parsed:
+# - name: Ethernet1/2
+# access_groups:
+# - afi: ipv6
+# acls:
+# - name: ACL1v6
+# direction: in
+# - name: Ethernet1/5
+# access_groups:
+# - afi: ipv4
+# acls:
+# - name: PortACL
+# direction: in
+# port: True
+# - name: ACL1v4
+# direction: out
+# - afi: ipv6
+# acls:
+# - name: ACL1v6
+# direction: in
+
+
+# Using gathered:
+
+# Before state:
+# ------------
+# interface Ethernet1/2
+# ipv6 traffic-filter ACL1v6 in
+# interface Ethernet1/5
+# ipv6 traffic-filter ACL1v6 in
+# ip access-group ACL1v4 out
+# ip port access-group PortACL in
+
+- name: Gather existing configuration from device
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ state: gathered
+
+# returns
+# gathered:
+# - name: Ethernet1/2
+# access_groups:
+# - afi: ipv6
+# acls:
+# - name: ACL1v6
+# direction: in
+# - name: Ethernet1/5
+# access_groups:
+# - afi: ipv4
+# acls:
+# - name: PortACL
+# direction: in
+# port: True
+# - name: ACL1v4
+# direction: out
+# - afi: ipv6
+# acls:
+# - name: ACL1v6
+# direction: in
+
+
+# Using rendered
+
+- name: Render required configuration to be pushed to the device
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ - name: Ethernet1/2
+ access_groups:
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ direction: in
+
+ - name: Ethernet1/5
+ access_groups:
+ - afi: ipv4
+ acls:
+ - name: PortACL
+ direction: in
+ port: true
+ - name: ACL1v4
+ direction: out
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ direction: in
+ state: rendered
+
+# returns
+# rendered:
+# interface Ethernet1/2
+# ipv6 traffic-filter ACL1v6 in
+# interface Ethernet1/5
+# ipv6 traffic-filter ACL1v6 in
+# ip access-group ACL1v4 out
+# ip port access-group PortACL in
+
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface Ethernet1/2', 'ipv6 traffic-filter ACL1v6 out', 'ip port access-group PortACL in']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.acl_interfaces.acl_interfaces import (
+ Acl_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.acl_interfaces.acl_interfaces import (
+ Acl_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ module = AnsibleModule(
+ argument_spec=Acl_interfacesArgs.argument_spec,
+ supports_check_mode=True,
+ )
+
+ result = Acl_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acls.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acls.py
new file mode 100644
index 00000000..5414dfdd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_acls.py
@@ -0,0 +1,819 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The module file for nxos_acls
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_acls
+short_description: ACLs resource module
+description: Manage named IP ACLs on the Cisco NX-OS platform
+version_added: 1.0.0
+author: Adharsh Srivats Rangarajan (@adharshsrivatsr)
+notes:
+- Tested against NX-OS 7.3.(0)D1(1) on VIRL
+- As NX-OS allows configuring a rule again with different sequence numbers, the user
+ is expected to provide sequence numbers for the access control entries to preserve
+ idempotency. If no sequence number is given, the rule will be added as a new rule
+ by the device.
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section 'ip(v6)* access-list).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A dictionary of ACL options.
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description: The Address Family Indicator (AFI) for the ACL.
+ type: str
+ required: true
+ choices:
+ - ipv4
+ - ipv6
+ acls:
+ description: A list of the ACLs.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description: Name of the ACL.
+ type: str
+ required: true
+ aces:
+ description: The entries within the ACL.
+ type: list
+ elements: dict
+ suboptions:
+ grant:
+ description: Action to be applied on the rule.
+ type: str
+ choices:
+ - permit
+ - deny
+ destination:
+ description: Specify the packet destination.
+ type: dict
+ suboptions:
+ address:
+ description: Destination network address.
+ type: str
+ any:
+ description: Any destination address.
+ type: bool
+ host:
+ description: Host IP address.
+ type: str
+ port_protocol:
+ description: Specify the destination port or protocol (only for
+ TCP and UDP).
+ type: dict
+ suboptions:
+ eq:
+ description: Match only packets on a given port number.
+ type: str
+ gt:
+ description: Match only packets with a greater port number.
+ type: str
+ lt:
+ description: Match only packets with a lower port number.
+ type: str
+ neq:
+ description: Match only packets not on a given port number.
+ type: str
+ range:
+ description: Match only packets in the range of port numbers.
+ type: dict
+ suboptions:
+ start:
+ description: Specify the start of the port range.
+ type: str
+ end:
+ description: Specify the end of the port range.
+ type: str
+ prefix:
+ description: Destination network prefix. Only for prefixes of
+ value less than 31 for ipv4 and 127 for ipv6. Prefixes of 32
+ (ipv4) and 128 (ipv6) should be given in the 'host' key.
+ type: str
+ wildcard_bits:
+ description: Destination wildcard bits.
+ type: str
+ dscp:
+ description: Match packets with given DSCP value.
+ type: str
+ fragments:
+ description: Check non-initial fragments.
+ type: bool
+ remark:
+ description: Access list entry comment.
+ type: str
+ sequence:
+ description: Sequence number.
+ type: int
+ source:
+ description: Specify the packet source.
+ type: dict
+ suboptions:
+ address:
+ description: Source network address.
+ type: str
+ any:
+ description: Any source address.
+ type: bool
+ host:
+ description: Host IP address.
+ type: str
+ port_protocol:
+ description: Specify the destination port or protocol (only for
+ TCP and UDP).
+ type: dict
+ suboptions:
+ eq:
+ description: Match only packets on a given port number.
+ type: str
+ gt:
+ description: Match only packets with a greater port number.
+ type: str
+ lt:
+ description: Match only packets with a lower port number.
+ type: str
+ neq:
+ description: Match only packets not on a given port number.
+ type: str
+ range:
+ description: Match only packets in the range of port numbers.
+ type: dict
+ suboptions:
+ start:
+ description: Specify the start of the port range.
+ type: str
+ end:
+ description: Specify the end of the port range.
+ type: str
+ prefix:
+ description: Source network prefix. Only for prefixes of mask
+ value less than 31 for ipv4 and 127 for ipv6. Prefixes of mask
+ 32 (ipv4) and 128 (ipv6) should be given in the 'host' key.
+ type: str
+ wildcard_bits:
+ description: Source wildcard bits.
+ type: str
+ log:
+ description: Log matches against this entry.
+ type: bool
+ precedence:
+ description: Match packets with given precedence value.
+ type: str
+ protocol:
+ description: Specify the protocol.
+ type: str
+ protocol_options:
+ description: All possible suboptions for the protocol chosen.
+ type: dict
+ suboptions:
+ icmp:
+ description: ICMP protocol options.
+ type: dict
+ suboptions:
+ administratively_prohibited:
+ description: Administratively prohibited
+ type: bool
+ alternate_address:
+ description: Alternate address
+ type: bool
+ conversion_error:
+ description: Datagram conversion
+ type: bool
+ dod_host_prohibited:
+ description: Host prohibited
+ type: bool
+ dod_net_prohibited:
+ description: Net prohibited
+ type: bool
+ echo:
+ description: Echo (ping)
+ type: bool
+ echo_reply:
+ description: Echo reply
+ type: bool
+ echo_request:
+ description: Echo request (ping)
+ type: bool
+ general_parameter_problem:
+ description: Parameter problem
+ type: bool
+ host_isolated:
+ description: Host isolated
+ type: bool
+ host_precedence_unreachable:
+ description: Host unreachable for precedence
+ type: bool
+ host_redirect:
+ description: Host redirect
+ type: bool
+ host_tos_redirect:
+ description: Host redirect for TOS
+ type: bool
+ host_tos_unreachable:
+ description: Host unreachable for TOS
+ type: bool
+ host_unknown:
+ description: Host unknown
+ type: bool
+ host_unreachable:
+ description: Host unreachable
+ type: bool
+ information_reply:
+ description: Information replies
+ type: bool
+ information_request:
+ description: Information requests
+ type: bool
+ mask_reply:
+ description: Mask replies
+ type: bool
+ mask_request:
+ description: Mask requests
+ type: bool
+ message_code:
+ description: ICMP message code
+ type: int
+ message_type:
+ description: ICMP message type
+ type: int
+ mobile_redirect:
+ description: Mobile host redirect
+ type: bool
+ net_redirect:
+ description: Network redirect
+ type: bool
+ net_tos_redirect:
+ description: Net redirect for TOS
+ type: bool
+ net_tos_unreachable:
+ description: Network unreachable for TOS
+ type: bool
+ net_unreachable:
+ description: Net unreachable
+ type: bool
+ network_unknown:
+ description: Network unknown
+ type: bool
+ no_room_for_option:
+ description: Parameter required but no room
+ type: bool
+ option_missing:
+ description: Parameter required but not present
+ type: bool
+ packet_too_big:
+ description: Fragmentation needed and DF set
+ type: bool
+ parameter_problem:
+ description: All parameter problems
+ type: bool
+ port_unreachable:
+ description: Port unreachable
+ type: bool
+ precedence_unreachable:
+ description: Precedence cutoff
+ type: bool
+ protocol_unreachable:
+ description: Protocol unreachable
+ type: bool
+ reassembly_timeout:
+ description: Reassembly timeout
+ type: bool
+ redirect:
+ description: All redirects
+ type: bool
+ router_advertisement:
+ description: Router discovery advertisements
+ type: bool
+ router_solicitation:
+ description: Router discovery solicitations
+ type: bool
+ source_quench:
+ description: Source quenches
+ type: bool
+ source_route_failed:
+ description: Source route failed
+ type: bool
+ time_exceeded:
+ description: All time exceeded.
+ type: bool
+ timestamp_reply:
+ description: Timestamp replies
+ type: bool
+ timestamp_request:
+ description: Timestamp requests
+ type: bool
+ traceroute:
+ description: Traceroute
+ type: bool
+ ttl_exceeded:
+ description: TTL exceeded
+ type: bool
+ unreachable:
+ description: All unreachables
+ type: bool
+ tcp:
+ description: TCP flags.
+ type: dict
+ suboptions:
+ ack:
+ description: Match on the ACK bit
+ type: bool
+ established:
+ description: Match established connections
+ type: bool
+ fin:
+ description: Match on the FIN bit
+ type: bool
+ psh:
+ description: Match on the PSH bit
+ type: bool
+ rst:
+ description: Match on the RST bit
+ type: bool
+ syn:
+ description: Match on the SYN bit
+ type: bool
+ urg:
+ description: Match on the URG bit
+ type: bool
+ igmp:
+ description: IGMP protocol options.
+ type: dict
+ suboptions:
+ dvmrp:
+ description: Distance Vector Multicast Routing Protocol
+ type: bool
+ host_query:
+ description: Host Query
+ type: bool
+ host_report:
+ description: Host Report
+ type: bool
+ state:
+ description:
+ - The state the configuration should be left in
+ type: str
+ choices:
+ - deleted
+ - gathered
+ - merged
+ - overridden
+ - rendered
+ - replaced
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+
+- name: Merge new ACLs configuration
+ cisco.nxos.nxos_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: ACL1v4
+ aces:
+ - grant: deny
+ destination:
+ address: 192.0.2.64
+ wildcard_bits: 0.0.0.255
+ source:
+ any: true
+ port_protocol:
+ lt: 55
+ protocol: tcp
+ protocol_options:
+ tcp:
+ ack: true
+ fin: true
+ sequence: 50
+
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ aces:
+ - grant: permit
+ sequence: 10
+ source:
+ any: true
+ destination:
+ prefix: 2001:db8:12::/32
+ protocol: sctp
+ state: merged
+
+# After state:
+# ------------
+#
+# ip access-list ACL1v4
+# 50 deny tcp any lt 55 192.0.2.64 0.0.0.255 ack fin
+# ipv6 access-list ACL1v6
+# 10 permit sctp any any
+
+# Using replaced
+
+# Before state:
+# ----------------
+#
+# ip access-list ACL1v4
+# 10 permit ip any any
+# 20 deny udp any any
+# ip access-list ACL2v4
+# 10 permit ahp 192.0.2.0 0.0.0.255 any
+# ip access-list ACL1v6
+# 10 permit sctp any any
+# 20 remark IPv6 ACL
+# ip access-list ACL2v6
+# 10 deny ipv6 any 2001:db8:3000::/36
+# 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+- name: Replace existing ACL configuration with provided configuration
+ cisco.nxos.nxos_acls:
+ config:
+ - afi: ipv4
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ aces:
+ - sequence: 20
+ grant: permit
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: pip
+
+ - remark: Replaced ACE
+
+ - name: ACL2v6
+ state: replaced
+
+# After state:
+# ---------------
+#
+# ipv6 access-list ACL1v6
+# 20 permit pip any any
+# 30 remark Replaced ACE
+# ipv6 access-list ACL2v6
+
+# Using overridden
+
+# Before state:
+# ----------------
+#
+# ip access-list ACL1v4
+# 10 permit ip any any
+# 20 deny udp any any
+# ip access-list ACL2v4
+# 10 permit ahp 192.0.2.0 0.0.0.255 any
+# ip access-list ACL1v6
+# 10 permit sctp any any
+# 20 remark IPv6 ACL
+# ip access-list ACL2v6
+# 10 deny ipv6 any 2001:db8:3000::/36
+# 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+- name: Override existing configuration with provided configuration
+ cisco.nxos.nxos_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: NewACL
+ aces:
+ - grant: deny
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.255.255
+ destination:
+ any: true
+ protocol: eigrp
+ - remark: Example for overridden state
+ state: overridden
+
+# After state:
+# ------------
+#
+# ip access-list NewACL
+# 10 deny eigrp 192.0.2.0 0.0.255.255 any
+# 20 remark Example for overridden state
+
+# Using deleted:
+#
+# Before state:
+# -------------
+#
+# ip access-list ACL1v4
+# 10 permit ip any any
+# 20 deny udp any any
+# ip access-list ACL2v4
+# 10 permit ahp 192.0.2.0 0.0.0.255 any
+# ip access-list ACL1v6
+# 10 permit sctp any any
+# 20 remark IPv6 ACL
+# ip access-list ACL2v6
+# 10 deny ipv6 any 2001:db8:3000::/36
+# 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+- name: Delete all ACLs
+ cisco.nxos.nxos_acls:
+ config:
+ state: deleted
+
+# After state:
+# -----------
+#
+
+
+# Before state:
+# -------------
+#
+# ip access-list ACL1v4
+# 10 permit ip any any
+# 20 deny udp any any
+# ip access-list ACL2v4
+# 10 permit ahp 192.0.2.0 0.0.0.255 any
+# ip access-list ACL1v6
+# 10 permit sctp any any
+# 20 remark IPv6 ACL
+# ip access-list ACL2v6
+# 10 deny ipv6 any 2001:db8:3000::/36
+# 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+- name: Delete all ACLs in given AFI
+ cisco.nxos.nxos_acls:
+ config:
+ - afi: ipv4
+ state: deleted
+
+# After state:
+# ------------
+#
+# ip access-list ACL1v6
+# 10 permit sctp any any
+# 20 remark IPv6 ACL
+# ip access-list ACL2v6
+# 10 deny ipv6 any 2001:db8:3000::/36
+# 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+
+
+# Before state:
+# -------------
+#
+# ip access-list ACL1v4
+# 10 permit ip any any
+# 20 deny udp any any
+# ip access-list ACL2v4
+# 10 permit ahp 192.0.2.0 0.0.0.255 any
+# ipv6 access-list ACL1v6
+# 10 permit sctp any any
+# 20 remark IPv6 ACL
+# ipv6 access-list ACL2v6
+# 10 deny ipv6 any 2001:db8:3000::/36
+# 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+- name: Delete specific ACLs
+ cisco.nxos.nxos_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: ACL1v4
+ - name: ACL2v4
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ state: deleted
+
+# After state:
+# ------------
+# ipv6 access-list ACL2v6
+# 10 deny ipv6 any 2001:db8:3000::/36
+# 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
+
+# Using parsed
+
+- name: Parse given config to structured data
+ cisco.nxos.nxos_acls:
+ running_config: |
+ ip access-list ACL1v4
+ 50 deny tcp any lt 55 192.0.2.64 0.0.0.255 ack fin
+ ipv6 access-list ACL1v6
+ 10 permit sctp any any
+ state: parsed
+
+# returns:
+# parsed:
+# - afi: ipv4
+# acls:
+# - name: ACL1v4
+# aces:
+# - grant: deny
+# destination:
+# address: 192.0.2.64
+# wildcard_bits: 0.0.0.255
+# source:
+# any: true
+# port_protocol:
+# lt: 55
+# protocol: tcp
+# protocol_options:
+# tcp:
+# ack: true
+# fin: true
+# sequence: 50
+#
+# - afi: ipv6
+# acls:
+# - name: ACL1v6
+# aces:
+# - grant: permit
+# sequence: 10
+# source:
+# any: true
+# destination:
+# prefix: 2001:db8:12::/32
+# protocol: sctp
+
+
+# Using gathered:
+
+# Before state:
+# ------------
+#
+# ip access-list ACL1v4
+# 50 deny tcp any lt 55 192.0.2.64 0.0.0.255 ack fin
+# ipv6 access-list ACL1v6
+# 10 permit sctp any any
+
+- name: Gather existing configuration
+ cisco.nxos.nxos_acls:
+ state: gathered
+
+# returns:
+# gathered:
+# - afi: ipv4
+# acls:
+# - name: ACL1v4
+# aces:
+# - grant: deny
+# destination:
+# address: 192.0.2.64
+# wildcard_bits: 0.0.0.255
+# source:
+# any: true
+# port_protocol:
+# lt: 55
+# protocol: tcp
+# protocol_options:
+# tcp:
+# ack: true
+# fin: true
+# sequence: 50
+
+# - afi: ipv6
+# acls:
+# - name: ACL1v6
+# aces:
+# - grant: permit
+# sequence: 10
+# source:
+# any: true
+# destination:
+# prefix: 2001:db8:12::/32
+# protocol: sctp
+
+
+# Using rendered
+
+- name: Render required configuration to be pushed to the device
+ cisco.nxos.nxos_acls:
+ config:
+ - afi: ipv4
+ acls:
+ - name: ACL1v4
+ aces:
+ - grant: deny
+ destination:
+ address: 192.0.2.64
+ wildcard_bits: 0.0.0.255
+ source:
+ any: true
+ port_protocol:
+ lt: 55
+ protocol: tcp
+ protocol_options:
+ tcp:
+ ack: true
+ fin: true
+ sequence: 50
+
+ - afi: ipv6
+ acls:
+ - name: ACL1v6
+ aces:
+ - grant: permit
+ sequence: 10
+ source:
+ any: true
+ destination:
+ prefix: 2001:db8:12::/32
+ protocol: sctp
+ state: rendered
+
+# returns:
+# rendered:
+# ip access-list ACL1v4
+# 50 deny tcp any lt 55 192.0.2.64 0.0.0.255 ack fin
+# ipv6 access-list ACL1v6
+# 10 permit sctp any any
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['ip access-list ACL1v4', '10 permit ip any any precedence critical log', '20 deny tcp any lt smtp host 192.0.2.64 ack fin']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.acls.acls import (
+ AclsArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.acls.acls import (
+ Acls,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ module = AnsibleModule(
+ argument_spec=AclsArgs.argument_spec, supports_check_mode=True
+ )
+
+ result = Acls(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_banner.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_banner.py
new file mode 100644
index 00000000..84cc6d91
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_banner.py
@@ -0,0 +1,229 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+# (c) 2017, Ansible by Red Hat, inc
+#
+# This file is part of Ansible by Red Hat
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+
+
+DOCUMENTATION = """
+module: nxos_banner
+author: Trishna Guha (@trishnaguha)
+short_description: Manage multiline banners on Cisco NXOS devices
+description:
+- This will configure both exec and motd banners on remote devices running Cisco NXOS.
+ It allows playbooks to add or remove banner text from the active running configuration.
+notes:
+- Since responses from the device are always read with surrounding whitespaces stripped,
+ tasks that configure banners with preceeding or trailing whitespaces will not be idempotent.
+version_added: 1.0.0
+options:
+ banner:
+ description:
+ - Specifies which banner that should be configured on the remote device.
+ required: true
+ choices:
+ - exec
+ - motd
+ type: str
+ text:
+ description:
+ - The banner text that should be present in the remote device running configuration.
+ This argument accepts a multiline string, with no empty lines. Requires I(state=present).
+ type: str
+ state:
+ description:
+ - Specifies whether or not the configuration is present in the current devices
+ active running configuration.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+extends_documentation_fragment:
+- cisco.nxos.nxos
+"""
+
+EXAMPLES = """
+- name: configure the exec banner
+ cisco.nxos.nxos_banner:
+ banner: exec
+ text: |
+ this is my exec banner
+ that contains a multiline
+ string
+ state: present
+- name: remove the motd banner
+ cisco.nxos.nxos_banner:
+ banner: motd
+ state: absent
+- name: Configure banner from file
+ cisco.nxos.nxos_banner:
+ banner: motd
+ text: "{{ lookup('file', './config_partial/raw_banner.cfg') }}"
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - banner exec
+ - this is my exec banner
+ - that contains a multiline
+ - string
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils._text import to_text
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+import re
+
+
+def execute_show_command(module, command):
+ format = "text"
+ cmds = [{"command": command, "output": format}]
+ output = run_commands(module, cmds)
+ return output
+
+
+def map_obj_to_commands(want, have, module):
+ commands = list()
+ state = module.params["state"]
+ platform_regex = "Nexus.*Switch"
+
+ if state == "absent":
+ if have.get("text") and not (
+ (have.get("text") == "User Access Verification")
+ or re.match(platform_regex, have.get("text"))
+ ):
+ commands.append("no banner %s" % module.params["banner"])
+
+ elif state == "present" and want.get("text") != have.get("text"):
+ banner_cmd = "banner %s @\n%s\n@" % (
+ module.params["banner"],
+ want["text"],
+ )
+ commands.append(banner_cmd)
+
+ return commands
+
+
+def map_config_to_obj(module):
+ command = "show banner %s" % module.params["banner"]
+ output = execute_show_command(module, command)[0]
+
+ if "Invalid command" in output:
+ module.fail_json(
+ msg="banner: %s may not be supported on this platform. Possible values are : exec | motd"
+ % module.params["banner"]
+ )
+
+ if isinstance(output, dict):
+ output = list(output.values())
+ if output != []:
+ output = output[0]
+ else:
+ output = ""
+ if isinstance(output, dict):
+ output = list(output.values())
+ if output != []:
+ output = output[0]
+ else:
+ output = ""
+ else:
+ output = output.rstrip()
+
+ obj = {"banner": module.params["banner"], "state": "absent"}
+ if output:
+ obj["text"] = output
+ obj["state"] = "present"
+ return obj
+
+
+def map_params_to_obj(module):
+ text = module.params["text"]
+ return {
+ "banner": module.params["banner"],
+ "text": to_text(text) if text else None,
+ "state": module.params["state"],
+ }
+
+
+def main():
+ """ main entry point for module execution
+ """
+ argument_spec = dict(
+ banner=dict(required=True, choices=["exec", "motd"]),
+ text=dict(),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ required_if = [("state", "present", ("text",))]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+ commands = map_obj_to_commands(want, have, module)
+ result["commands"] = commands
+
+ if commands:
+ if not module.check_mode:
+ msgs = load_config(module, commands, True)
+ if msgs:
+ for item in msgs:
+ if item:
+ if isinstance(item, dict):
+ err_str = item["clierror"]
+ else:
+ err_str = item
+ if (
+ "more than 40 lines" in err_str
+ or "buffer overflowed" in err_str
+ ):
+ load_config(module, commands)
+
+ result["changed"] = True
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bfd_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bfd_global.py
new file mode 100644
index 00000000..54ce4ec6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bfd_global.py
@@ -0,0 +1,336 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_bfd_global
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Bidirectional Forwarding Detection (BFD) global-level configuration
+description:
+- Manages Bidirectional Forwarding Detection (BFD) global-level configuration.
+version_added: 1.0.0
+author:
+- Chris Van Heuveln (@chrisvanheuveln)
+notes:
+- Tested against NXOSv 9.2(2)
+- BFD global will automatically enable 'feature bfd' if it is disabled.
+- BFD global does not have a 'state' parameter. All of the BFD commands are unique
+ and are defined if 'feature bfd' is enabled.
+options:
+ echo_interface:
+ description:
+ - Loopback interface used for echo frames.
+ - Valid values are loopback interface name or 'deleted'.
+ - Not supported on N5K/N6K
+ required: false
+ type: str
+ echo_rx_interval:
+ description:
+ - BFD Echo receive interval in milliseconds.
+ required: false
+ type: int
+ interval:
+ description:
+ - BFD interval timer values.
+ - Value must be a dict defining values for keys (tx, min_rx, and multiplier)
+ required: false
+ type: dict
+ slow_timer:
+ description:
+ - BFD slow rate timer in milliseconds.
+ required: false
+ type: int
+ startup_timer:
+ description:
+ - BFD delayed startup timer in seconds.
+ - Not supported on N5K/N6K/N7K
+ required: false
+ type: int
+ ipv4_echo_rx_interval:
+ description:
+ - BFD IPv4 session echo receive interval in milliseconds.
+ required: false
+ type: int
+ ipv4_interval:
+ description:
+ - BFD IPv4 interval timer values.
+ - Value must be a dict defining values for keys (tx, min_rx, and multiplier).
+ required: false
+ type: dict
+ ipv4_slow_timer:
+ description:
+ - BFD IPv4 slow rate timer in milliseconds.
+ required: false
+ type: int
+ ipv6_echo_rx_interval:
+ description:
+ - BFD IPv6 session echo receive interval in milliseconds.
+ required: false
+ type: int
+ ipv6_interval:
+ description:
+ - BFD IPv6 interval timer values.
+ - Value must be a dict defining values for keys (tx, min_rx, and multiplier).
+ required: false
+ type: dict
+ ipv6_slow_timer:
+ description:
+ - BFD IPv6 slow rate timer in milliseconds.
+ required: false
+ type: int
+ fabricpath_interval:
+ description:
+ - BFD fabricpath interval timer values.
+ - Value must be a dict defining values for keys (tx, min_rx, and multiplier).
+ required: false
+ type: dict
+ fabricpath_slow_timer:
+ description:
+ - BFD fabricpath slow rate timer in milliseconds.
+ required: false
+ type: int
+ fabricpath_vlan:
+ description:
+ - BFD fabricpath control vlan.
+ required: false
+ type: int
+"""
+EXAMPLES = """
+- cisco.nxos.nxos_bfd_global:
+ echo_interface: Ethernet1/2
+ echo_rx_interval: 50
+ interval:
+ tx: 50
+ min_rx: 50
+ multiplier: 4
+"""
+
+RETURN = """
+cmds:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["bfd echo-interface loopback1", "bfd slow-timer 2000"]
+"""
+
+
+import re
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ NxosCmdRef,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+BFD_CMD_REF = """
+# The cmd_ref is a yaml formatted list of module commands.
+# A leading underscore denotes a non-command variable; e.g. _template.
+# BFD does not have convenient json data so this cmd_ref uses raw cli configs.
+---
+_template: # _template holds common settings for all commands
+ # Enable feature bfd if disabled
+ feature: bfd
+ # Common get syntax for BFD commands
+ get_command: show run bfd all | incl '^(no )*bfd'
+
+echo_interface:
+ kind: str
+ getval: (no )*bfd echo-interface *(\\S+)*$
+ setval: 'bfd echo-interface {0}'
+ default: ~
+
+echo_rx_interval:
+ _exclude: ['N5K', 'N6K']
+ kind: int
+ getval: bfd echo-rx-interval (\\d+)$
+ setval: bfd echo-rx-interval {0}
+ default: 50
+ N3K:
+ default: 250
+
+interval:
+ kind: dict
+ getval: bfd interval (?P<tx>\\d+) min_rx (?P<min_rx>\\d+) multiplier (?P<multiplier>\\d+)
+ setval: bfd interval {tx} min_rx {min_rx} multiplier {multiplier}
+ default: &def_interval
+ tx: 50
+ min_rx: 50
+ multiplier: 3
+ N3K:
+ default: &n3k_def_interval
+ tx: 250
+ min_rx: 250
+ multiplier: 3
+
+slow_timer:
+ kind: int
+ getval: bfd slow-timer (\\d+)$
+ setval: bfd slow-timer {0}
+ default: 2000
+
+startup_timer:
+ _exclude: ['N5K', 'N6K', 'N7K']
+ kind: int
+ getval: bfd startup-timer (\\d+)$
+ setval: bfd startup-timer {0}
+ default: 5
+
+# IPv4/IPv6 specific commands
+ipv4_echo_rx_interval:
+ _exclude: ['N5K', 'N6K']
+ kind: int
+ getval: bfd ipv4 echo-rx-interval (\\d+)$
+ setval: bfd ipv4 echo-rx-interval {0}
+ default: 50
+ N3K:
+ default: 250
+
+ipv4_interval:
+ _exclude: ['N5K', 'N6K']
+ kind: dict
+ getval: bfd ipv4 interval (?P<tx>\\d+) min_rx (?P<min_rx>\\d+) multiplier (?P<multiplier>\\d+)
+ setval: bfd ipv4 interval {tx} min_rx {min_rx} multiplier {multiplier}
+ default: *def_interval
+ N3K:
+ default: *n3k_def_interval
+
+ipv4_slow_timer:
+ _exclude: ['N5K', 'N6K']
+ kind: int
+ getval: bfd ipv4 slow-timer (\\d+)$
+ setval: bfd ipv4 slow-timer {0}
+ default: 2000
+
+ipv6_echo_rx_interval:
+ _exclude: ['N35', 'N5K', 'N6K']
+ kind: int
+ getval: bfd ipv6 echo-rx-interval (\\d+)$
+ setval: bfd ipv6 echo-rx-interval {0}
+ default: 50
+ N3K:
+ default: 250
+
+ipv6_interval:
+ _exclude: ['N35', 'N5K', 'N6K']
+ kind: dict
+ getval: bfd ipv6 interval (?P<tx>\\d+) min_rx (?P<min_rx>\\d+) multiplier (?P<multiplier>\\d+)
+ setval: bfd ipv6 interval {tx} min_rx {min_rx} multiplier {multiplier}
+ default: *def_interval
+ N3K:
+ default: *n3k_def_interval
+
+ipv6_slow_timer:
+ _exclude: ['N35', 'N5K', 'N6K']
+ kind: int
+ getval: bfd ipv6 slow-timer (\\d+)$
+ setval: bfd ipv6 slow-timer {0}
+ default: 2000
+
+# Fabricpath Commands
+fabricpath_interval:
+ _exclude: ['N35', 'N3K', 'N9K']
+ kind: dict
+ getval: bfd fabricpath interval (?P<tx>\\d+) min_rx (?P<min_rx>\\d+) multiplier (?P<multiplier>\\d+)
+ setval: bfd fabricpath interval {tx} min_rx {min_rx} multiplier {multiplier}
+ default: *def_interval
+
+fabricpath_slow_timer:
+ _exclude: ['N35', 'N3K', 'N9K']
+ kind: int
+ getval: bfd fabricpath slow-timer (\\d+)$
+ setval: bfd fabricpath slow-timer {0}
+ default: 2000
+
+fabricpath_vlan:
+ _exclude: ['N35', 'N3K', 'N9K']
+ kind: int
+ getval: bfd fabricpath vlan (\\d+)$
+ setval: bfd fabricpath vlan {0}
+ default: 1
+"""
+
+
+def reorder_cmds(cmds):
+ """
+ There is a bug in some image versions where bfd echo-interface and
+ bfd echo-rx-interval need to be applied last for them to nvgen properly.
+ """
+ regex1 = re.compile(r"^bfd echo-interface")
+ regex2 = re.compile(r"^bfd echo-rx-interval")
+ filtered_cmds = [i for i in cmds if not regex1.match(i)]
+ filtered_cmds = [i for i in filtered_cmds if not regex2.match(i)]
+ echo_int_cmd = [i for i in cmds if regex1.match(i)]
+ echo_rx_cmd = [i for i in cmds if regex2.match(i)]
+ filtered_cmds.extend(echo_int_cmd)
+ filtered_cmds.extend(echo_rx_cmd)
+
+ return filtered_cmds
+
+
+def main():
+ argument_spec = dict(
+ echo_interface=dict(required=False, type="str"),
+ echo_rx_interval=dict(required=False, type="int"),
+ interval=dict(required=False, type="dict"),
+ slow_timer=dict(required=False, type="int"),
+ startup_timer=dict(required=False, type="int"),
+ ipv4_echo_rx_interval=dict(required=False, type="int"),
+ ipv4_interval=dict(required=False, type="dict"),
+ ipv4_slow_timer=dict(required=False, type="int"),
+ ipv6_echo_rx_interval=dict(required=False, type="int"),
+ ipv6_interval=dict(required=False, type="dict"),
+ ipv6_slow_timer=dict(required=False, type="int"),
+ fabricpath_interval=dict(required=False, type="dict"),
+ fabricpath_slow_timer=dict(required=False, type="int"),
+ fabricpath_vlan=dict(required=False, type="int"),
+ )
+ argument_spec.update(nxos_argument_spec)
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+ warnings = list()
+
+ cmd_ref = NxosCmdRef(module, BFD_CMD_REF)
+ cmd_ref.get_existing()
+ cmd_ref.get_playvals()
+ cmds = reorder_cmds(cmd_ref.get_proposed())
+
+ result = {
+ "changed": False,
+ "commands": cmds,
+ "warnings": warnings,
+ "check_mode": module.check_mode,
+ }
+ if cmds:
+ result["changed"] = True
+ if not module.check_mode:
+ load_config(module, cmds)
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bfd_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bfd_interfaces.py
new file mode 100644
index 00000000..3e885dc2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bfd_interfaces.py
@@ -0,0 +1,299 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_bfd_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_bfd_interfaces
+short_description: BFD interfaces resource module
+description: Manages attributes of Bidirectional Forwarding Detection (BFD) on the
+ interface.
+version_added: 1.0.0
+author: Chris Van Heuveln (@chrisvanheuveln)
+notes:
+- Tested against NX-OS 7.0(3)I5(1).
+- Feature bfd should be enabled for this module.
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section '^interface|^feature
+ bfd').
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: The provided configuration
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ type: str
+ description: The name of the interface.
+ bfd:
+ type: str
+ description:
+ - Enable/Disable Bidirectional Forwarding Detection (BFD) on the interface.
+ choices:
+ - enable
+ - disable
+ echo:
+ type: str
+ description:
+ - Enable/Disable BFD Echo functionality on the interface.
+ choices:
+ - enable
+ - disable
+ state:
+ description:
+ - The state of the configuration after module completion
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using deleted
+
+- name: Configure interfaces
+ cisco.nxos.nxos_bfd_interfaces:
+ state: deleted
+
+
+# Using merged
+
+- name: Configure interfaces
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ - name: Ethernet1/1
+ bfd: enable
+ echo: enable
+ - name: Ethernet1/2
+ bfd: disable
+ echo: disable
+ state: merged
+
+
+# Using overridden
+
+- name: Configure interfaces
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ - name: Ethernet1/1
+ bfd: enable
+ echo: enable
+ - name: Ethernet1/2
+ bfd: disable
+ echo: disable
+ state: overridden
+
+
+# Using replaced
+
+- name: Configure interfaces
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ - name: Ethernet1/1
+ bfd: enable
+ echo: enable
+ - name: Ethernet1/2
+ bfd: disable
+ echo: disable
+ state: replaced
+
+# Using rendered
+
+- name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ - name: Ethernet1/800
+ bfd: enable
+ echo: enable
+ - name: Ethernet1/801
+ bfd: disable
+ echo: disable
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+
+# rendered:
+# - "interface Ethernet1/800"
+# - "bfd"
+# - "bfd echo"
+# - "interface Ethernet1/801"
+# - "no bfd"
+# - "no bfd echo"
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+
+# feature bfd
+# interface Ethernet1/800
+# no switchport
+# no bfd
+# no bfd echo
+# interface Ethernet1/801
+# no switchport
+# no bfd
+# interface Ethernet1/802
+# no switchport
+# no bfd echo
+# interface mgmt0
+# ip address dhcp
+# vrf member management
+
+- name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_bfd_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+
+# parsed:
+# - bfd: disable
+# echo: disable
+# name: Ethernet1/800
+# - bfd: disable
+# echo: enable
+# name: Ethernet1/801
+# - bfd: enable
+# echo: disable
+# name: Ethernet1/802
+# - bfd: enable
+# echo: enable
+# name: mgmt0
+
+# Using gathered
+
+# Existing device config state
+# -------------------------------
+
+# feature bfd
+# interface Ethernet1/1
+# no switchport
+# no bfd
+# interface Ethernet1/2
+# no switchport
+# no bfd echo
+# interface mgmt0
+# ip address dhcp
+# vrf member management
+
+- name: Gather bfd_interfaces facts from the device using nxos_bfd_interfaces
+ cisco.nxos.nxos_bfd_interfaces:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+# gathered:
+# - name: Ethernet1/1
+# bfd: disable
+# echo: enable
+# - name: Ethernet1/3
+# echo: disable
+# bfd: enable
+# - name: mgmt0
+# bfd: enable
+# echo: enable
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface Ethernet1/1', 'no bfd', 'no bfd echo']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.bfd_interfaces.bfd_interfaces import (
+ Bfd_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.bfd_interfaces.bfd_interfaces import (
+ Bfd_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Bfd_interfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Bfd_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp.py
new file mode 100644
index 00000000..a850d15b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp.py
@@ -0,0 +1,786 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_bgp
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2023-01-27) Manages BGP configuration.
+description:
+- Manages BGP configurations on NX-OS switches.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+deprecated:
+ alternative: nxos_bgp_global
+ why: Updated module released with more functionality.
+ removed_at_date: '2023-01-27'
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- C(state=absent) removes the whole BGP ASN configuration when C(vrf=default) or the
+ whole VRF instance within the BGP process when using a different VRF.
+- Default when supported restores params default value.
+- Configuring global params is only permitted if C(vrf=default).
+options:
+ asn:
+ description:
+ - BGP autonomous system number. Valid values are String, Integer in ASPLAIN or
+ ASDOT notation.
+ required: true
+ type: str
+ vrf:
+ description:
+ - Name of the VRF. The name 'default' is a valid VRF representing the global BGP.
+ default: 'default'
+ type: str
+ bestpath_always_compare_med:
+ description:
+ - Enable/Disable MED comparison on paths from different autonomous systems.
+ type: bool
+ bestpath_aspath_multipath_relax:
+ description:
+ - Enable/Disable load sharing across the providers with different (but equal-length)
+ AS paths.
+ type: bool
+ bestpath_compare_routerid:
+ description:
+ - Enable/Disable comparison of router IDs for identical eBGP paths.
+ type: bool
+ bestpath_compare_neighborid:
+ description:
+ - Enable/Disable neighborid. Use this when more paths available than max path
+ config.
+ type: bool
+ bestpath_cost_community_ignore:
+ description:
+ - Enable/Disable Ignores the cost community for BGP best-path calculations.
+ type: bool
+ bestpath_med_confed:
+ description:
+ - Enable/Disable enforcement of bestpath to do a MED comparison only between paths
+ originated within a confederation.
+ type: bool
+ bestpath_med_missing_as_worst:
+ description:
+ - Enable/Disable assigns the value of infinity to received routes that do not
+ carry the MED attribute, making these routes the least desirable.
+ type: bool
+ bestpath_med_non_deterministic:
+ description:
+ - Enable/Disable deterministic selection of the best MED pat from among the paths
+ from the same autonomous system.
+ type: bool
+ cluster_id:
+ description:
+ - Route Reflector Cluster-ID.
+ type: str
+ confederation_id:
+ description:
+ - Routing domain confederation AS.
+ type: str
+ confederation_peers:
+ description:
+ - AS confederation parameters.
+ type: list
+ elements: str
+ disable_policy_batching:
+ description:
+ - Enable/Disable the batching evaluation of prefix advertisement to all peers.
+ type: bool
+ disable_policy_batching_ipv4_prefix_list:
+ description:
+ - Enable/Disable the batching evaluation of prefix advertisements to all peers
+ with prefix list.
+ type: str
+ disable_policy_batching_ipv6_prefix_list:
+ description:
+ - Enable/Disable the batching evaluation of prefix advertisements to all peers
+ with prefix list.
+ type: str
+ enforce_first_as:
+ description:
+ - Enable/Disable enforces the neighbor autonomous system to be the first AS number
+ listed in the AS path attribute for eBGP. On NX-OS, this property is only supported
+ in the global BGP context.
+ type: bool
+ event_history_cli:
+ description:
+ - Enable/Disable cli event history buffer.
+ choices:
+ - size_small
+ - size_medium
+ - size_large
+ - size_disable
+ - default
+ - 'true'
+ - 'false'
+ type: str
+ event_history_detail:
+ description:
+ - Enable/Disable detail event history buffer.
+ choices:
+ - size_small
+ - size_medium
+ - size_large
+ - size_disable
+ - default
+ - 'true'
+ - 'false'
+ type: str
+ event_history_events:
+ description:
+ - Enable/Disable event history buffer.
+ choices:
+ - size_small
+ - size_medium
+ - size_large
+ - size_disable
+ - default
+ - 'true'
+ - 'false'
+ type: str
+ event_history_periodic:
+ description:
+ - Enable/Disable periodic event history buffer.
+ choices:
+ - size_small
+ - size_medium
+ - size_large
+ - size_disable
+ - default
+ - 'true'
+ - 'false'
+ type: str
+ fast_external_fallover:
+ description:
+ - Enable/Disable immediately reset the session if the link to a directly connected
+ BGP peer goes down. Only supported in the global BGP context.
+ type: bool
+ flush_routes:
+ description:
+ - Enable/Disable flush routes in RIB upon controlled restart. On NX-OS, this property
+ is only supported in the global BGP context.
+ type: bool
+ graceful_restart:
+ description:
+ - Enable/Disable graceful restart.
+ type: bool
+ graceful_restart_helper:
+ description:
+ - Enable/Disable graceful restart helper mode.
+ type: bool
+ graceful_restart_timers_restart:
+ description:
+ - Set maximum time for a restart sent to the BGP peer.
+ type: str
+ graceful_restart_timers_stalepath_time:
+ description:
+ - Set maximum time that BGP keeps the stale routes from the restarting BGP peer.
+ type: str
+ isolate:
+ description:
+ - Enable/Disable isolate this router from BGP perspective.
+ type: bool
+ local_as:
+ description:
+ - Local AS number to be used within a VRF instance.
+ type: str
+ log_neighbor_changes:
+ description:
+ - Enable/Disable message logging for neighbor up/down event.
+ type: bool
+ maxas_limit:
+ description:
+ - Specify Maximum number of AS numbers allowed in the AS-path attribute. Valid
+ values are between 1 and 512.
+ type: str
+ neighbor_down_fib_accelerate:
+ description:
+ - Enable/Disable handle BGP neighbor down event, due to various reasons.
+ type: bool
+ reconnect_interval:
+ description:
+ - The BGP reconnection interval for dropped sessions. Valid values are between
+ 1 and 60.
+ type: str
+ router_id:
+ description:
+ - Router Identifier (ID) of the BGP router VRF instance.
+ type: str
+ shutdown:
+ description:
+ - Administratively shutdown the BGP protocol.
+ type: bool
+ suppress_fib_pending:
+ description:
+ - Enable/Disable advertise only routes programmed in hardware to peers.
+ type: bool
+ timer_bestpath_limit:
+ description:
+ - Specify timeout for the first best path after a restart, in seconds.
+ type: str
+ timer_bgp_hold:
+ description:
+ - Set BGP hold timer.
+ type: str
+ timer_bgp_keepalive:
+ description:
+ - Set BGP keepalive timer.
+ type: str
+ state:
+ description:
+ - Determines whether the config should be present or not on the device.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+
+EXAMPLES = """
+- name: Configure a simple ASN
+ cisco.nxos.nxos_bgp:
+ asn: 65535
+ vrf: test
+ router_id: 192.0.2.1
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["router bgp 65535", "vrf test", "router-id 192.0.2.1"]
+"""
+
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+
+BOOL_PARAMS = [
+ "bestpath_always_compare_med",
+ "bestpath_aspath_multipath_relax",
+ "bestpath_compare_neighborid",
+ "bestpath_compare_routerid",
+ "bestpath_cost_community_ignore",
+ "bestpath_med_confed",
+ "bestpath_med_missing_as_worst",
+ "bestpath_med_non_deterministic",
+ "disable_policy_batching",
+ "enforce_first_as",
+ "fast_external_fallover",
+ "flush_routes",
+ "graceful_restart",
+ "graceful_restart_helper",
+ "isolate",
+ "log_neighbor_changes",
+ "neighbor_down_fib_accelerate",
+ "shutdown",
+ "suppress_fib_pending",
+]
+GLOBAL_PARAMS = [
+ "disable_policy_batching",
+ "disable_policy_batching_ipv4_prefix_list",
+ "disable_policy_batching_ipv6_prefix_list",
+ "enforce_first_as",
+ "event_history_cli",
+ "event_history_detail",
+ "event_history_events",
+ "event_history_periodic",
+ "fast_external_fallover",
+ "flush_routes",
+ "isolate",
+ "suppress_fib_pending",
+ "shutdown",
+]
+PARAM_TO_DEFAULT_KEYMAP = {
+ "timer_bgp_keepalive": "60",
+ "timer_bgp_hold": "180",
+ "timer_bestpath_limit": "300",
+ "graceful_restart": True,
+ "graceful_restart_timers_restart": "120",
+ "graceful_restart_timers_stalepath_time": "300",
+ "reconnect_interval": "60",
+ "suppress_fib_pending": True,
+ "fast_external_fallover": True,
+ "enforce_first_as": True,
+ "event_history_cli": True,
+ "event_history_detail": False,
+ "event_history_events": True,
+ "event_history_periodic": True,
+ "maxas_limit": "",
+ "router_id": "",
+ "cluster_id": "",
+ "disable_policy_batching_ipv4_prefix_list": "",
+ "disable_policy_batching_ipv6_prefix_list": "",
+ "local_as": "",
+ "confederation_id": "",
+}
+PARAM_TO_COMMAND_KEYMAP = {
+ "asn": "router bgp",
+ "bestpath_always_compare_med": "bestpath always-compare-med",
+ "bestpath_aspath_multipath_relax": "bestpath as-path multipath-relax",
+ "bestpath_compare_neighborid": "bestpath compare-neighborid",
+ "bestpath_compare_routerid": "bestpath compare-routerid",
+ "bestpath_cost_community_ignore": "bestpath cost-community ignore",
+ "bestpath_med_confed": "bestpath med confed",
+ "bestpath_med_missing_as_worst": "bestpath med missing-as-worst",
+ "bestpath_med_non_deterministic": "bestpath med non-deterministic",
+ "cluster_id": "cluster-id",
+ "confederation_id": "confederation identifier",
+ "confederation_peers": "confederation peers",
+ "disable_policy_batching": "disable-policy-batching",
+ "disable_policy_batching_ipv4_prefix_list": "disable-policy-batching ipv4 prefix-list",
+ "disable_policy_batching_ipv6_prefix_list": "disable-policy-batching ipv6 prefix-list",
+ "enforce_first_as": "enforce-first-as",
+ "event_history_cli": "event-history cli",
+ "event_history_detail": "event-history detail",
+ "event_history_events": "event-history events",
+ "event_history_periodic": "event-history periodic",
+ "fast_external_fallover": "fast-external-fallover",
+ "flush_routes": "flush-routes",
+ "graceful_restart": "graceful-restart",
+ "graceful_restart_helper": "graceful-restart-helper",
+ "graceful_restart_timers_restart": "graceful-restart restart-time",
+ "graceful_restart_timers_stalepath_time": "graceful-restart stalepath-time",
+ "isolate": "isolate",
+ "local_as": "local-as",
+ "log_neighbor_changes": "log-neighbor-changes",
+ "maxas_limit": "maxas-limit",
+ "neighbor_down_fib_accelerate": "neighbor-down fib-accelerate",
+ "reconnect_interval": "reconnect-interval",
+ "router_id": "router-id",
+ "shutdown": "shutdown",
+ "suppress_fib_pending": "suppress-fib-pending",
+ "timer_bestpath_limit": "timers bestpath-limit",
+ "timer_bgp_hold": "timers bgp",
+ "timer_bgp_keepalive": "timers bgp",
+ "vrf": "vrf",
+}
+
+
+def get_value(arg, config):
+ command = PARAM_TO_COMMAND_KEYMAP.get(arg)
+
+ if command.split()[0] == "event-history":
+ has_size = re.search(
+ r"^\s+{0} size\s(?P<value>.*)$".format(command), config, re.M
+ )
+
+ if command == "event-history detail":
+ value = False
+ else:
+ value = "size_small"
+
+ if has_size:
+ value = "size_%s" % has_size.group("value")
+
+ elif arg in ["enforce_first_as", "fast_external_fallover"]:
+ no_command_re = re.compile(r"no\s+{0}\s*".format(command), re.M)
+ value = True
+
+ if no_command_re.search(config):
+ value = False
+
+ elif arg in BOOL_PARAMS:
+ has_command = re.search(r"^\s+{0}\s*$".format(command), config, re.M)
+ value = False
+
+ if has_command:
+ value = True
+ else:
+ command_val_re = re.compile(
+ r"(?:{0}\s)(?P<value>.*)".format(command), re.M
+ )
+ value = ""
+
+ has_command = command_val_re.search(config)
+ if has_command:
+ found_value = has_command.group("value")
+
+ if arg == "confederation_peers":
+ value = found_value.split()
+ elif arg == "timer_bgp_keepalive":
+ value = found_value.split()[0]
+ elif arg == "timer_bgp_hold":
+ split_values = found_value.split()
+ if len(split_values) == 2:
+ value = split_values[1]
+ elif found_value:
+ value = found_value
+
+ return value
+
+
+def get_existing(module, args, warnings):
+ existing = {}
+ netcfg = CustomNetworkConfig(
+ indent=2, contents=get_config(module, flags=["bgp all"])
+ )
+
+ asn_re = re.compile(
+ r".*router\sbgp\s(?P<existing_asn>\d+(\.\d+)?).*", re.S
+ )
+ asn_match = asn_re.match(str(netcfg))
+
+ if asn_match:
+ existing_asn = asn_match.group("existing_asn")
+ bgp_parent = "router bgp {0}".format(existing_asn)
+
+ if module.params["vrf"] != "default":
+ parents = [bgp_parent, "vrf {0}".format(module.params["vrf"])]
+ else:
+ parents = [bgp_parent]
+
+ config = netcfg.get_section(parents)
+ if config:
+ for arg in args:
+ if arg != "asn" and (
+ module.params["vrf"] == "default"
+ or arg not in GLOBAL_PARAMS
+ ):
+ existing[arg] = get_value(arg, config)
+
+ existing["asn"] = existing_asn
+ if module.params["vrf"] == "default":
+ existing["vrf"] = "default"
+
+ if (
+ not existing
+ and module.params["vrf"] != "default"
+ and module.params["state"] == "present"
+ ):
+ msg = "VRF {0} doesn't exist.".format(module.params["vrf"])
+ warnings.append(msg)
+
+ return existing
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key in table:
+ new_key = key_map.get(key)
+ if new_key:
+ new_dict[new_key] = table.get(key)
+
+ return new_dict
+
+
+def state_present(module, existing, proposed, candidate):
+ commands = list()
+ proposed_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, proposed)
+ existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
+
+ for key, value in proposed_commands.items():
+ if value is True:
+ commands.append(key)
+ elif value is False:
+ commands.append("no {0}".format(key))
+ elif value == "default":
+ default_value = PARAM_TO_DEFAULT_KEYMAP.get(key)
+ existing_value = existing_commands.get(key)
+
+ if default_value:
+ commands.append("{0} {1}".format(key, default_value))
+ elif existing_value:
+ if key == "confederation peers":
+ existing_value = " ".join(existing_value)
+ commands.append("no {0} {1}".format(key, existing_value))
+ elif not value:
+ existing_value = existing_commands.get(key)
+ if existing_value:
+ commands.append("no {0} {1}".format(key, existing_value))
+ elif key == "confederation peers":
+ commands.append("{0} {1}".format(key, value))
+ elif key.startswith("timers bgp"):
+ command = "timers bgp {0} {1}".format(
+ proposed["timer_bgp_keepalive"], proposed["timer_bgp_hold"]
+ )
+ if command not in commands:
+ commands.append(command)
+ else:
+ if value.startswith("size"):
+ value = value.replace("_", " ")
+ command = "{0} {1}".format(key, value)
+ commands.append(command)
+
+ parents = []
+ if commands:
+ commands = fix_commands(commands)
+ parents = ["router bgp {0}".format(module.params["asn"])]
+ if module.params["vrf"] != "default":
+ parents.append("vrf {0}".format(module.params["vrf"]))
+ elif proposed:
+ if module.params["vrf"] != "default":
+ commands.append("vrf {0}".format(module.params["vrf"]))
+ parents = ["router bgp {0}".format(module.params["asn"])]
+ else:
+ commands.append("router bgp {0}".format(module.params["asn"]))
+
+ candidate.add(commands, parents=parents)
+
+
+def state_absent(module, existing, candidate):
+ commands = []
+ parents = []
+ if module.params["vrf"] == "default":
+ commands.append("no router bgp {0}".format(module.params["asn"]))
+ elif existing.get("vrf") == module.params["vrf"]:
+ commands.append("no vrf {0}".format(module.params["vrf"]))
+ parents = ["router bgp {0}".format(module.params["asn"])]
+
+ candidate.add(commands, parents=parents)
+
+
+def fix_commands(commands):
+ local_as_command = ""
+ confederation_id_command = ""
+ confederation_peers_command = ""
+
+ for command in commands:
+ if "local-as" in command:
+ local_as_command = command
+ elif "confederation identifier" in command:
+ confederation_id_command = command
+ elif "confederation peers" in command:
+ confederation_peers_command = command
+
+ if local_as_command and confederation_id_command:
+ if "no" in confederation_id_command:
+ commands.pop(commands.index(local_as_command))
+ commands.pop(commands.index(confederation_id_command))
+ commands.append(confederation_id_command)
+ commands.append(local_as_command)
+ else:
+ commands.pop(commands.index(local_as_command))
+ commands.pop(commands.index(confederation_id_command))
+ commands.append(local_as_command)
+ commands.append(confederation_id_command)
+
+ if confederation_peers_command and confederation_id_command:
+ if local_as_command:
+ if "no" in local_as_command:
+ commands.pop(commands.index(local_as_command))
+ commands.pop(commands.index(confederation_id_command))
+ commands.pop(commands.index(confederation_peers_command))
+ commands.append(confederation_id_command)
+ commands.append(confederation_peers_command)
+ commands.append(local_as_command)
+ else:
+ commands.pop(commands.index(local_as_command))
+ commands.pop(commands.index(confederation_id_command))
+ commands.pop(commands.index(confederation_peers_command))
+ commands.append(local_as_command)
+ commands.append(confederation_id_command)
+ commands.append(confederation_peers_command)
+ else:
+ commands.pop(commands.index(confederation_peers_command))
+ commands.pop(commands.index(confederation_id_command))
+ commands.append(confederation_id_command)
+ commands.append(confederation_peers_command)
+
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ asn=dict(required=True, type="str"),
+ vrf=dict(required=False, type="str", default="default"),
+ bestpath_always_compare_med=dict(required=False, type="bool"),
+ bestpath_aspath_multipath_relax=dict(required=False, type="bool"),
+ bestpath_compare_neighborid=dict(required=False, type="bool"),
+ bestpath_compare_routerid=dict(required=False, type="bool"),
+ bestpath_cost_community_ignore=dict(required=False, type="bool"),
+ bestpath_med_confed=dict(required=False, type="bool"),
+ bestpath_med_missing_as_worst=dict(required=False, type="bool"),
+ bestpath_med_non_deterministic=dict(required=False, type="bool"),
+ cluster_id=dict(required=False, type="str"),
+ confederation_id=dict(required=False, type="str"),
+ confederation_peers=dict(required=False, type="list", elements="str"),
+ disable_policy_batching=dict(required=False, type="bool"),
+ disable_policy_batching_ipv4_prefix_list=dict(
+ required=False, type="str"
+ ),
+ disable_policy_batching_ipv6_prefix_list=dict(
+ required=False, type="str"
+ ),
+ enforce_first_as=dict(required=False, type="bool"),
+ event_history_cli=dict(
+ required=False,
+ choices=[
+ "true",
+ "false",
+ "default",
+ "size_small",
+ "size_medium",
+ "size_large",
+ "size_disable",
+ ],
+ ),
+ event_history_detail=dict(
+ required=False,
+ choices=[
+ "true",
+ "false",
+ "default",
+ "size_small",
+ "size_medium",
+ "size_large",
+ "size_disable",
+ ],
+ ),
+ event_history_events=dict(
+ required=False,
+ choices=[
+ "true",
+ "false",
+ "default",
+ "size_small",
+ "size_medium",
+ "size_large",
+ "size_disable",
+ ],
+ ),
+ event_history_periodic=dict(
+ required=False,
+ choices=[
+ "true",
+ "false",
+ "default",
+ "size_small",
+ "size_medium",
+ "size_large",
+ "size_disable",
+ ],
+ ),
+ fast_external_fallover=dict(required=False, type="bool"),
+ flush_routes=dict(required=False, type="bool"),
+ graceful_restart=dict(required=False, type="bool"),
+ graceful_restart_helper=dict(required=False, type="bool"),
+ graceful_restart_timers_restart=dict(required=False, type="str"),
+ graceful_restart_timers_stalepath_time=dict(
+ required=False, type="str"
+ ),
+ isolate=dict(required=False, type="bool"),
+ local_as=dict(required=False, type="str"),
+ log_neighbor_changes=dict(required=False, type="bool"),
+ maxas_limit=dict(required=False, type="str"),
+ neighbor_down_fib_accelerate=dict(required=False, type="bool"),
+ reconnect_interval=dict(required=False, type="str"),
+ router_id=dict(required=False, type="str"),
+ shutdown=dict(required=False, type="bool"),
+ suppress_fib_pending=dict(required=False, type="bool"),
+ timer_bestpath_limit=dict(required=False, type="str"),
+ timer_bgp_hold=dict(required=False, type="str"),
+ timer_bgp_keepalive=dict(required=False, type="str"),
+ state=dict(
+ choices=["present", "absent"], default="present", required=False
+ ),
+ )
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_together=[["timer_bgp_hold", "timer_bgp_keepalive"]],
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ result = dict(changed=False, warnings=warnings)
+
+ state = module.params["state"]
+
+ if module.params["vrf"] != "default":
+ for param in GLOBAL_PARAMS:
+ if module.params[param]:
+ module.fail_json(
+ msg='Global params can be modified only under "default" VRF.',
+ vrf=module.params["vrf"],
+ global_param=param,
+ )
+
+ args = PARAM_TO_COMMAND_KEYMAP.keys()
+ existing = get_existing(module, args, warnings)
+
+ if existing.get("asn") and state == "present":
+ if existing.get("asn") != module.params["asn"]:
+ module.fail_json(
+ msg="Another BGP ASN already exists.",
+ proposed_asn=module.params["asn"],
+ existing_asn=existing.get("asn"),
+ )
+
+ proposed_args = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+ proposed = {}
+ for key, value in proposed_args.items():
+ if key not in ["asn", "vrf"]:
+ if str(value).lower() == "default":
+ value = PARAM_TO_DEFAULT_KEYMAP.get(key, "default")
+ if key == "confederation_peers":
+ if value[0] == "default":
+ if existing.get(key):
+ proposed[key] = "default"
+ else:
+ v = set([int(i) for i in value])
+ ex = set([int(i) for i in existing.get(key)])
+ if v != ex:
+ proposed[key] = " ".join(str(s) for s in v)
+ else:
+ if existing.get(key) != value:
+ proposed[key] = value
+
+ candidate = CustomNetworkConfig(indent=3)
+ if state == "present":
+ state_present(module, existing, proposed, candidate)
+ elif existing.get("asn") == module.params["asn"]:
+ state_absent(module, existing, candidate)
+
+ if candidate:
+ candidate = candidate.items_text()
+ if not module.check_mode:
+ load_config(module, candidate)
+ result["changed"] = True
+ result["commands"] = candidate
+ else:
+ result["commands"] = []
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_af.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_af.py
new file mode 100644
index 00000000..6f24acfe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_af.py
@@ -0,0 +1,935 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_bgp_af
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages BGP Address-family configuration.
+description:
+- Manages BGP Address-family configurations on NX-OS switches.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- C(state=absent) removes the whole BGP ASN configuration
+- Default, where supported, restores params default value.
+options:
+ asn:
+ description:
+ - BGP autonomous system number. Valid values are String, Integer in ASPLAIN or
+ ASDOT notation.
+ required: true
+ type: str
+ vrf:
+ description:
+ - Name of the VRF. The name 'default' is a valid VRF representing the global bgp.
+ default: 'default'
+ type: str
+ afi:
+ description:
+ - Address Family Identifier.
+ required: true
+ choices:
+ - ipv4
+ - ipv6
+ - vpnv4
+ - vpnv6
+ - l2vpn
+ type: str
+ safi:
+ description:
+ - Sub Address Family Identifier.
+ required: true
+ choices:
+ - unicast
+ - multicast
+ - evpn
+ type: str
+ additional_paths_install:
+ description:
+ - Install a backup path into the forwarding table and provide prefix independent
+ convergence (PIC) in case of a PE-CE link failure.
+ type: bool
+ additional_paths_receive:
+ description:
+ - Enables the receive capability of additional paths for all of the neighbors
+ under this address family for which the capability has not been disabled.
+ type: bool
+ additional_paths_selection:
+ description:
+ - Configures the capability of selecting additional paths for a prefix. Valid
+ values are a string defining the name of the route-map.
+ type: str
+ additional_paths_send:
+ description:
+ - Enables the send capability of additional paths for all of the neighbors under
+ this address family for which the capability has not been disabled.
+ type: bool
+ advertise_l2vpn_evpn:
+ description:
+ - Advertise evpn routes.
+ type: bool
+ client_to_client:
+ description:
+ - Configure client-to-client route reflection.
+ type: bool
+ dampen_igp_metric:
+ description:
+ - Specify dampen value for IGP metric-related changes, in seconds. Valid values
+ are integer and keyword 'default'.
+ type: str
+ dampening_state:
+ description:
+ - Enable/disable route-flap dampening.
+ type: bool
+ dampening_half_time:
+ description:
+ - Specify decay half-life in minutes for route-flap dampening. Valid values are
+ integer and keyword 'default'.
+ type: str
+ dampening_max_suppress_time:
+ description:
+ - Specify max suppress time for route-flap dampening stable route. Valid values
+ are integer and keyword 'default'.
+ type: str
+ dampening_reuse_time:
+ description:
+ - Specify route reuse time for route-flap dampening. Valid values are integer
+ and keyword 'default'.
+ type: str
+ dampening_routemap:
+ description:
+ - Specify route-map for route-flap dampening. Valid values are a string defining
+ the name of the route-map.
+ type: str
+ dampening_suppress_time:
+ description:
+ - Specify route suppress time for route-flap dampening. Valid values are integer
+ and keyword 'default'.
+ type: str
+ default_information_originate:
+ description:
+ - Default information originate.
+ type: bool
+ default_metric:
+ description:
+ - Sets default metrics for routes redistributed into BGP. Valid values are Integer
+ or keyword 'default'
+ type: str
+ distance_ebgp:
+ description:
+ - Sets the administrative distance for eBGP routes. Valid values are Integer or
+ keyword 'default'.
+ type: str
+ distance_ibgp:
+ description:
+ - Sets the administrative distance for iBGP routes. Valid values are Integer or
+ keyword 'default'.
+ type: str
+ distance_local:
+ description:
+ - Sets the administrative distance for local BGP routes. Valid values are Integer
+ or keyword 'default'.
+ type: str
+ inject_map:
+ description:
+ - An array of route-map names which will specify prefixes to inject. Each array
+ entry must first specify the inject-map name, secondly an exist-map name, and
+ optionally the copy-attributes keyword which indicates that attributes should
+ be copied from the aggregate. For example [['lax_inject_map', 'lax_exist_map'],
+ ['nyc_inject_map', 'nyc_exist_map', 'copy-attributes'], ['fsd_inject_map', 'fsd_exist_map']].
+ type: list
+ elements: list
+ maximum_paths:
+ description:
+ - Configures the maximum number of equal-cost paths for load sharing. Valid value
+ is an integer in the range 1-64.
+ type: str
+ maximum_paths_ibgp:
+ description:
+ - Configures the maximum number of ibgp equal-cost paths for load sharing. Valid
+ value is an integer in the range 1-64.
+ type: str
+ networks:
+ description:
+ - Networks to configure. Valid value is a list of network prefixes to advertise.
+ The list must be in the form of an array. Each entry in the array must include
+ a prefix address and an optional route-map. For example [['10.0.0.0/16', 'routemap_LA'],
+ ['192.168.1.1', 'Chicago'], ['192.168.2.0/24'], ['192.168.3.0/24', 'routemap_NYC']].
+ type: list
+ elements: list
+ next_hop_route_map:
+ description:
+ - Configure a route-map for valid nexthops. Valid values are a string defining
+ the name of the route-map.
+ type: str
+ redistribute:
+ description:
+ - A list of redistribute directives. Multiple redistribute entries are allowed.
+ The list must be in the form of a nested array. the first entry of each array
+ defines the source-protocol to redistribute from; the second entry defines a
+ route-map name. A route-map is highly advised but may be optional on some platforms,
+ in which case it may be omitted from the array list. For example [['direct',
+ 'rm_direct'], ['lisp', 'rm_lisp']].
+ type: list
+ elements: list
+ suppress_inactive:
+ description:
+ - Advertises only active routes to peers.
+ type: bool
+ table_map:
+ description:
+ - Apply table-map to filter routes downloaded into URIB. Valid values are a string.
+ type: str
+ table_map_filter:
+ description:
+ - Filters routes rejected by the route-map and does not download them to the RIB.
+ type: bool
+ state:
+ description:
+ - Determines whether the config should be present or not on the device.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+ retain_route_target:
+ description:
+ - Retains all of the routes or the routes which are part of configured route-map.
+ Valid values are route-map names or keyword C(all) or keyword C(default). C(all)
+ retains all the routes regardless of Target-VPN community. C(default) will disable
+ the retain route target option. If you are using route-map name please ensure
+ that the name is not same as C(all) and C(default).
+ type: str
+ version_added: 1.1.0
+"""
+EXAMPLES = """
+# configure a simple address-family
+- cisco.nxos.nxos_bgp_af:
+ asn: 65535
+ vrf: TESTING
+ afi: ipv4
+ safi: unicast
+ advertise_l2vpn_evpn: true
+ state: present
+ retain_route_target: all
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["router bgp 65535", "vrf TESTING",
+ "address-family ipv4 unicast", "advertise l2vpn evpn",
+ "retain route-target all"]
+"""
+
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+
+BOOL_PARAMS = [
+ "additional_paths_install",
+ "additional_paths_receive",
+ "additional_paths_send",
+ "advertise_l2vpn_evpn",
+ "dampening_state",
+ "default_information_originate",
+ "suppress_inactive",
+]
+PARAM_TO_DEFAULT_KEYMAP = {
+ "maximum_paths": "1",
+ "maximum_paths_ibgp": "1",
+ "client_to_client": True,
+ "distance_ebgp": "20",
+ "distance_ibgp": "200",
+ "distance_local": "220",
+ "dampen_igp_metric": "600",
+}
+PARAM_TO_COMMAND_KEYMAP = {
+ "asn": "router bgp",
+ "afi": "address-family",
+ "safi": "address-family",
+ "additional_paths_install": "additional-paths install backup",
+ "additional_paths_receive": "additional-paths receive",
+ "additional_paths_selection": "additional-paths selection route-map",
+ "additional_paths_send": "additional-paths send",
+ "advertise_l2vpn_evpn": "advertise l2vpn evpn",
+ "client_to_client": "client-to-client reflection",
+ "dampen_igp_metric": "dampen-igp-metric",
+ "dampening_state": "dampening",
+ "dampening_half_time": "dampening",
+ "dampening_max_suppress_time": "dampening",
+ "dampening_reuse_time": "dampening",
+ "dampening_routemap": "dampening route-map",
+ "dampening_suppress_time": "dampening",
+ "default_information_originate": "default-information originate",
+ "default_metric": "default-metric",
+ "distance_ebgp": "distance",
+ "distance_ibgp": "distance",
+ "distance_local": "distance",
+ "inject_map": "inject-map",
+ "maximum_paths": "maximum-paths",
+ "maximum_paths_ibgp": "maximum-paths ibgp",
+ "networks": "network",
+ "redistribute": "redistribute",
+ "next_hop_route_map": "nexthop route-map",
+ "suppress_inactive": "suppress-inactive",
+ "table_map": "table-map",
+ "table_map_filter": "table-map-filter",
+ "vrf": "vrf",
+ "retain_route_target": "retain route-target",
+}
+DAMPENING_PARAMS = [
+ "dampening_half_time",
+ "dampening_suppress_time",
+ "dampening_reuse_time",
+ "dampening_max_suppress_time",
+]
+
+
+def get_value(arg, config, module):
+ command = PARAM_TO_COMMAND_KEYMAP[arg]
+ command_val_re = re.compile(
+ r"(?:{0}\s)(?P<value>.*)$".format(command), re.M
+ )
+ has_command_val = command_val_re.search(config)
+
+ if arg in ["networks", "redistribute", "inject_map"]:
+ value = []
+ for ele in command_val_re.findall(config):
+ tl = ele.split()
+ if "exist-map" in tl:
+ tl.remove("exist-map")
+ elif "route-map" in tl:
+ tl.remove("route-map")
+ value.append(tl)
+
+ elif command == "distance":
+ distance_re = (
+ r".*distance\s(?P<d_ebgp>\w+)\s(?P<d_ibgp>\w+)\s(?P<d_local>\w+)"
+ )
+ match_distance = re.match(distance_re, config, re.DOTALL)
+
+ value = ""
+ if match_distance:
+ distance_group = match_distance.groupdict()
+
+ if arg == "distance_ebgp":
+ value = distance_group["d_ebgp"]
+ elif arg == "distance_ibgp":
+ value = distance_group["d_ibgp"]
+ elif arg == "distance_local":
+ value = distance_group["d_local"]
+
+ elif command.split()[0] == "dampening":
+ value = ""
+ if arg == "dampen_igp_metric" or arg == "dampening_routemap":
+ if command in config:
+ value = has_command_val.group("value")
+ else:
+ dampening_re = r".*dampening\s(?P<half>\w+)\s(?P<reuse>\w+)\s(?P<suppress>\w+)\s(?P<max_suppress>\w+)"
+ match_dampening = re.match(dampening_re, config, re.DOTALL)
+ if match_dampening:
+ dampening_group = match_dampening.groupdict()
+
+ if arg == "dampening_half_time":
+ value = dampening_group["half"]
+ elif arg == "dampening_reuse_time":
+ value = dampening_group["reuse"]
+ elif arg == "dampening_suppress_time":
+ value = dampening_group["suppress"]
+ elif arg == "dampening_max_suppress_time":
+ value = dampening_group["max_suppress"]
+ else:
+ if arg == "dampening_state":
+ value = True if "dampening" in config else False
+ elif arg == "table_map_filter":
+ tmf_regex = re.compile(r"\s+table-map.*filter$", re.M)
+ value = False
+ if tmf_regex.search(config):
+ value = True
+
+ elif arg == "table_map":
+ tm_regex = re.compile(
+ r"(?:table-map\s)(?P<value>\S+)(\sfilter)?$", re.M
+ )
+ has_tablemap = tm_regex.search(config)
+ value = ""
+ if has_tablemap:
+ value = has_tablemap.group("value")
+
+ elif arg == "client_to_client":
+ no_command_re = re.compile(r"^\s+no\s{0}\s*$".format(command), re.M)
+ value = True
+
+ if no_command_re.search(config):
+ value = False
+
+ elif arg == "retain_route_target":
+ value = ""
+ if command in config:
+ route_target = has_command_val.group("value")
+ if route_target:
+ if route_target == "all":
+ value = "all"
+ elif "route-map" in route_target:
+ value = route_target.replace("route-map ", "")
+
+ elif arg in BOOL_PARAMS:
+ command_re = re.compile(r"^\s+{0}\s*$".format(command), re.M)
+ value = False
+
+ if command_re.search(config):
+ value = True
+
+ else:
+ value = ""
+
+ if has_command_val:
+ value = has_command_val.group("value")
+
+ return value
+
+
+def get_existing(module, args, warnings):
+ existing = {}
+ netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
+
+ asn_regex = re.compile(
+ r".*router\sbgp\s(?P<existing_asn>\d+(\.\d+)?).*", re.DOTALL
+ )
+ match_asn = asn_regex.match(str(netcfg))
+
+ if match_asn:
+ existing_asn = match_asn.group("existing_asn")
+ parents = ["router bgp {0}".format(existing_asn)]
+ if module.params["vrf"] != "default":
+ parents.append("vrf {0}".format(module.params["vrf"]))
+
+ parents.append(
+ "address-family {0} {1}".format(
+ module.params["afi"], module.params["safi"]
+ )
+ )
+ config = netcfg.get_section(parents)
+
+ if config:
+ for arg in args:
+ if arg not in ["asn", "afi", "safi", "vrf"]:
+ gv = get_value(arg, config, module)
+ if gv:
+ existing[arg] = gv
+ else:
+ if (
+ arg != "client_to_client"
+ and arg in PARAM_TO_DEFAULT_KEYMAP.keys()
+ ):
+ existing[arg] = PARAM_TO_DEFAULT_KEYMAP.get(arg)
+ else:
+ existing[arg] = gv
+
+ existing["asn"] = existing_asn
+ existing["afi"] = module.params["afi"]
+ existing["safi"] = module.params["safi"]
+ existing["vrf"] = module.params["vrf"]
+ else:
+ warnings.append(
+ "The BGP process {0} didn't exist but the task just created it.".format(
+ module.params["asn"]
+ )
+ )
+
+ return existing
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key, value in table.items():
+ new_key = key_map.get(key)
+ if new_key:
+ new_dict[new_key] = value
+
+ return new_dict
+
+
+def fix_proposed(module, proposed, existing):
+ commands = list()
+ command = ""
+ fixed_proposed = {}
+ for key, value in proposed.items():
+ if key in DAMPENING_PARAMS:
+ if value != "default":
+ command = "dampening {0} {1} {2} {3}".format(
+ proposed.get("dampening_half_time"),
+ proposed.get("dampening_reuse_time"),
+ proposed.get("dampening_suppress_time"),
+ proposed.get("dampening_max_suppress_time"),
+ )
+ else:
+ if existing.get(key):
+ command = "no dampening {0} {1} {2} {3}".format(
+ existing["dampening_half_time"],
+ existing["dampening_reuse_time"],
+ existing["dampening_suppress_time"],
+ existing["dampening_max_suppress_time"],
+ )
+ if "default" in command:
+ command = ""
+ elif key.startswith("distance"):
+ command = "distance {0} {1} {2}".format(
+ proposed.get("distance_ebgp"),
+ proposed.get("distance_ibgp"),
+ proposed.get("distance_local"),
+ )
+ else:
+ fixed_proposed[key] = value
+
+ if command:
+ if command not in commands:
+ commands.append(command)
+
+ return fixed_proposed, commands
+
+
+def default_existing(existing_value, key, value):
+ commands = []
+ if key == "network":
+ for network in existing_value:
+ if len(network) == 2:
+ commands.append(
+ "no network {0} route-map {1}".format(
+ network[0], network[1]
+ )
+ )
+ elif len(network) == 1:
+ commands.append("no network {0}".format(network[0]))
+
+ elif key == "inject-map":
+ for maps in existing_value:
+ if len(maps) == 2:
+ commands.append(
+ "no inject-map {0} exist-map {1}".format(maps[0], maps[1])
+ )
+ elif len(maps) == 3:
+ commands.append(
+ "no inject-map {0} exist-map {1} "
+ "copy-attributes".format(maps[0], maps[1])
+ )
+
+ elif key == "redistribute":
+ for maps in existing_value:
+ commands.append(
+ "no redistribute {0} route-map {1}".format(maps[0], maps[1])
+ )
+
+ elif key == "retain route-target":
+ if existing_value == "all":
+ commands.append("no {0} {1}".format(key, existing_value))
+ elif existing_value != "default":
+ commands.append("no {0} route-map {1}".format(key, existing_value))
+
+ else:
+ commands.append("no {0} {1}".format(key, existing_value))
+ return commands
+
+
+def get_network_command(existing, key, value):
+ commands = []
+ existing_networks = existing.get("networks", [])
+ for inet in value:
+ if not isinstance(inet, list):
+ inet = [inet]
+ if inet not in existing_networks:
+ if len(inet) == 1:
+ command = "{0} {1}".format(key, inet[0])
+ elif len(inet) == 2:
+ command = "{0} {1} route-map {2}".format(key, inet[0], inet[1])
+ if command:
+ commands.append(command)
+ for enet in existing_networks:
+ if enet not in value:
+ if len(enet) == 1:
+ command = "no {0} {1}".format(key, enet[0])
+ elif len(enet) == 2:
+ command = "no {0} {1} route-map {2}".format(
+ key, enet[0], enet[1]
+ )
+ if command:
+ commands.append(command)
+ return commands
+
+
+def get_inject_map_command(existing, key, value):
+ commands = []
+ existing_maps = existing.get("inject_map", [])
+ for maps in value:
+ if not isinstance(maps, list):
+ maps = [maps]
+ if maps not in existing_maps:
+ if len(maps) == 2:
+ command = "inject-map {0} exist-map {1}".format(
+ maps[0], maps[1]
+ )
+ elif len(maps) == 3:
+ command = (
+ "inject-map {0} exist-map {1} "
+ "copy-attributes".format(maps[0], maps[1])
+ )
+ if command:
+ commands.append(command)
+ for emaps in existing_maps:
+ if emaps not in value:
+ if len(emaps) == 2:
+ command = "no inject-map {0} exist-map {1}".format(
+ emaps[0], emaps[1]
+ )
+ elif len(emaps) == 3:
+ command = (
+ "no inject-map {0} exist-map {1} "
+ "copy-attributes".format(emaps[0], emaps[1])
+ )
+ if command:
+ commands.append(command)
+ return commands
+
+
+def get_redistribute_command(existing, key, value):
+ commands = []
+ existing_rules = existing.get("redistribute", [])
+ for rule in value:
+ if not isinstance(rule, list):
+ rule = [rule]
+ if rule not in existing_rules:
+ command = "redistribute {0} route-map {1}".format(rule[0], rule[1])
+ commands.append(command)
+ for erule in existing_rules:
+ if erule not in value:
+ command = "no redistribute {0} route-map {1}".format(
+ erule[0], erule[1]
+ )
+ commands.append(command)
+ return commands
+
+
+def get_table_map_command(module, existing, key, value):
+ commands = []
+ if key == "table-map":
+ if value != "default":
+ command = "{0} {1}".format(key, module.params["table_map"])
+ if (
+ module.params["table_map_filter"] is not None
+ and module.params["table_map_filter"] != "default"
+ ):
+ command += " filter"
+ commands.append(command)
+ else:
+ if existing.get("table_map"):
+ command = "no {0} {1}".format(key, existing.get("table_map"))
+ commands.append(command)
+ return commands
+
+
+def get_retain_route_target_command(existing, key, value):
+ commands = []
+ if key == "retain route-target":
+ if value != "default":
+ if value == "all":
+ command = "{0} {1}".format(key, value)
+ else:
+ command = "{0} route-map {1}".format(key, value)
+ else:
+ existing_value = existing.get("retain_route_target")
+ if existing_value == "all":
+ command = "no {0} {1}".format(key, existing_value)
+ else:
+ command = "no {0} route-map {1}".format(key, existing_value)
+ commands.append(command)
+ return commands
+
+
+def get_default_table_map_filter(existing):
+ commands = []
+ existing_table_map_filter = existing.get("table_map_filter")
+ if existing_table_map_filter:
+ existing_table_map = existing.get("table_map")
+ if existing_table_map:
+ command = "table-map {0}".format(existing_table_map)
+ commands.append(command)
+ return commands
+
+
+def state_present(module, existing, proposed, candidate):
+ fixed_proposed, commands = fix_proposed(module, proposed, existing)
+ proposed_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, fixed_proposed)
+ existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
+ for key, value in proposed_commands.items():
+ if key == "address-family":
+ addr_family_command = "address-family {0} {1}".format(
+ module.params["afi"], module.params["safi"]
+ )
+ if addr_family_command not in commands:
+ commands.append(addr_family_command)
+
+ elif key.startswith("table-map"):
+ table_map_commands = get_table_map_command(
+ module, existing, key, value
+ )
+ if table_map_commands:
+ commands.extend(table_map_commands)
+
+ elif value is True:
+ commands.append(key)
+
+ elif value is False:
+ commands.append("no {0}".format(key))
+
+ elif value == "default":
+ if key in PARAM_TO_DEFAULT_KEYMAP:
+ commands.append(
+ "{0} {1}".format(key, PARAM_TO_DEFAULT_KEYMAP[key])
+ )
+
+ elif existing_commands.get(key):
+ if key == "table-map-filter":
+ default_tmf_command = get_default_table_map_filter(
+ existing
+ )
+
+ if default_tmf_command:
+ commands.extend(default_tmf_command)
+ else:
+ existing_value = existing_commands.get(key)
+ default_command = default_existing(
+ existing_value, key, value
+ )
+ if default_command:
+ commands.extend(default_command)
+ else:
+ if key == "network":
+ network_commands = get_network_command(existing, key, value)
+ if network_commands:
+ commands.extend(network_commands)
+
+ elif key == "inject-map":
+ inject_map_commands = get_inject_map_command(
+ existing, key, value
+ )
+ if inject_map_commands:
+ commands.extend(inject_map_commands)
+
+ elif key == "redistribute":
+ redistribute_commands = get_redistribute_command(
+ existing, key, value
+ )
+ if redistribute_commands:
+ commands.extend(redistribute_commands)
+
+ elif key == "retain route-target":
+ retain_route_target_commands = get_retain_route_target_command(
+ existing, key, value
+ )
+ if retain_route_target_commands:
+ commands.extend(retain_route_target_commands)
+
+ else:
+ command = "{0} {1}".format(key, value)
+ commands.append(command)
+
+ if commands:
+ parents = ["router bgp {0}".format(module.params["asn"])]
+ if module.params["vrf"] != "default":
+ parents.append("vrf {0}".format(module.params["vrf"]))
+
+ addr_family_command = "address-family {0} {1}".format(
+ module.params["afi"], module.params["safi"]
+ )
+ parents.append(addr_family_command)
+ if addr_family_command in commands:
+ commands.remove(addr_family_command)
+ candidate.add(commands, parents=parents)
+
+
+def state_absent(module, candidate):
+ commands = []
+ parents = ["router bgp {0}".format(module.params["asn"])]
+ if module.params["vrf"] != "default":
+ parents.append("vrf {0}".format(module.params["vrf"]))
+
+ commands.append(
+ "no address-family {0} {1}".format(
+ module.params["afi"], module.params["safi"]
+ )
+ )
+ candidate.add(commands, parents=parents)
+
+
+def main():
+ argument_spec = dict(
+ asn=dict(required=True, type="str"),
+ vrf=dict(required=False, type="str", default="default"),
+ safi=dict(
+ required=True, type="str", choices=["unicast", "multicast", "evpn"]
+ ),
+ afi=dict(
+ required=True,
+ type="str",
+ choices=["ipv4", "ipv6", "vpnv4", "vpnv6", "l2vpn"],
+ ),
+ additional_paths_install=dict(required=False, type="bool"),
+ additional_paths_receive=dict(required=False, type="bool"),
+ additional_paths_selection=dict(required=False, type="str"),
+ additional_paths_send=dict(required=False, type="bool"),
+ advertise_l2vpn_evpn=dict(required=False, type="bool"),
+ client_to_client=dict(required=False, type="bool"),
+ dampen_igp_metric=dict(required=False, type="str"),
+ dampening_state=dict(required=False, type="bool"),
+ dampening_half_time=dict(required=False, type="str"),
+ dampening_max_suppress_time=dict(required=False, type="str"),
+ dampening_reuse_time=dict(required=False, type="str"),
+ dampening_routemap=dict(required=False, type="str"),
+ dampening_suppress_time=dict(required=False, type="str"),
+ default_information_originate=dict(required=False, type="bool"),
+ default_metric=dict(required=False, type="str"),
+ distance_ebgp=dict(required=False, type="str"),
+ distance_ibgp=dict(required=False, type="str"),
+ distance_local=dict(required=False, type="str"),
+ inject_map=dict(required=False, type="list", elements="list"),
+ maximum_paths=dict(required=False, type="str"),
+ maximum_paths_ibgp=dict(required=False, type="str"),
+ networks=dict(required=False, type="list", elements="list"),
+ next_hop_route_map=dict(required=False, type="str"),
+ redistribute=dict(required=False, type="list", elements="list"),
+ suppress_inactive=dict(required=False, type="bool"),
+ table_map=dict(required=False, type="str"),
+ table_map_filter=dict(required=False, type="bool"),
+ state=dict(
+ choices=["present", "absent"], default="present", required=False
+ ),
+ retain_route_target=dict(required=False, type="str"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ mutually_exclusive = [
+ ("dampening_state", "dampening_routemap"),
+ ("dampening_state", "dampening_half_time"),
+ ("dampening_state", "dampening_suppress_time"),
+ ("dampening_state", "dampening_reuse_time"),
+ ("dampening_state", "dampening_max_suppress_time"),
+ ("dampening_routemap", "dampening_half_time"),
+ ("dampening_routemap", "dampening_suppress_time"),
+ ("dampening_routemap", "dampening_reuse_time"),
+ ("dampening_routemap", "dampening_max_suppress_time"),
+ ]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ required_together=[
+ DAMPENING_PARAMS,
+ ["distance_ibgp", "distance_ebgp", "distance_local"],
+ ],
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ result = dict(changed=False, warnings=warnings)
+
+ state = module.params["state"]
+
+ if module.params["advertise_l2vpn_evpn"]:
+ if module.params["vrf"] == "default":
+ module.fail_json(
+ msg="It is not possible to advertise L2VPN "
+ "EVPN in the default VRF. Please specify "
+ "another one.",
+ vrf=module.params["vrf"],
+ )
+
+ if module.params["table_map_filter"] and not module.params["table_map"]:
+ module.fail_json(
+ msg="table_map param is needed when using"
+ " table_map_filter filter."
+ )
+
+ args = PARAM_TO_COMMAND_KEYMAP.keys()
+ existing = get_existing(module, args, warnings)
+
+ if existing.get("asn") and state == "present":
+ if existing.get("asn") != module.params["asn"]:
+ module.fail_json(
+ msg="Another BGP ASN already exists.",
+ proposed_asn=module.params["asn"],
+ existing_asn=existing.get("asn"),
+ )
+
+ proposed_args = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+
+ for arg in ["networks", "inject_map", "redistribute"]:
+ if proposed_args.get(arg):
+ if proposed_args[arg][0] == "default":
+ proposed_args[arg] = "default"
+
+ proposed = {}
+ for key, value in proposed_args.items():
+ if key not in ["asn", "vrf"]:
+ if str(value).lower() == "default":
+ value = PARAM_TO_DEFAULT_KEYMAP.get(key, "default")
+ if existing.get(key) != value:
+ proposed[key] = value
+
+ candidate = CustomNetworkConfig(indent=3)
+ if state == "present":
+ state_present(module, existing, proposed, candidate)
+ elif state == "absent" and existing:
+ state_absent(module, candidate)
+
+ if candidate:
+ candidate = candidate.items_text()
+ if not module.check_mode:
+ load_config(module, candidate)
+ result["changed"] = True
+ result["commands"] = candidate
+ else:
+ result["commands"] = []
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_global.py
new file mode 100644
index 00000000..fcb8fbbc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_global.py
@@ -0,0 +1,1657 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2021 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+"""
+The module file for nxos_bgp_global
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+module: nxos_bgp_global
+short_description: BGP Global resource module.
+description:
+- This module manages global BGP configuration on devices running Cisco NX-OS.
+version_added: 1.4.0
+notes:
+- Tested against NX-OS 9.3.6.
+- This module works with connection C(network_cli) and C(httpapi).
+author: Nilashish Chakraborty (@NilashishC)
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section '^router bgp').
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A list of BGP process configuration.
+ type: dict
+ suboptions:
+ as_number:
+ description: Autonomous System Number of the router.
+ type: str
+ affinity_group:
+ description: Configure an affinity group.
+ type: dict
+ suboptions:
+ group_id:
+ description: Affinity Group ID.
+ type: int
+ bestpath: &bestpath
+ description: Define the default bestpath selection algorithm.
+ type: dict
+ suboptions:
+ always_compare_med:
+ description: Compare MED on paths from different AS.
+ type: bool
+ as_path:
+ description: AS-Path.
+ type: dict
+ suboptions:
+ ignore:
+ description: Ignore AS-Path during bestpath selection.
+ type: bool
+ multipath_relax:
+ description: Relax AS-Path restriction when choosing multipaths.
+ type: bool
+ compare_neighborid:
+ description: When more paths are available than max path config, use neighborid as tie-breaker.
+ type: bool
+ compare_routerid:
+ description: Compare router-id for identical EBGP paths.
+ type: bool
+ cost_community_ignore:
+ description: Ignore cost communities in bestpath selection.
+ type: bool
+ igp_metric_ignore:
+ description: Ignore IGP metric for next-hop during bestpath selection.
+ type: bool
+ med:
+ description: MED
+ type: dict
+ suboptions:
+ confed:
+ description: Compare MED only from paths originated from within a confederation.
+ type: bool
+ missing_as_worst:
+ description: Treat missing MED as highest MED.
+ type: bool
+ non_deterministic:
+ description: Not always pick the best-MED path among paths from same AS.
+ type: bool
+ cluster_id: &cluster_id
+ description: Configure Route Reflector Cluster-ID.
+ type: str
+ confederation: &confederation
+ description: AS confederation parameters.
+ type: dict
+ suboptions:
+ identifier:
+ description: Set routing domain confederation AS.
+ type: str
+ peers:
+ description: Peer ASs in BGP confederation.
+ type: list
+ elements: str
+ disable_policy_batching:
+ description: Disable batching evaluation of outbound policy for a peer.
+ type: dict
+ suboptions:
+ set:
+ description: Set policy batching.
+ type: bool
+ ipv4:
+ description: IPv4 address-family settings.
+ type: dict
+ suboptions:
+ prefix_list:
+ description: Name of prefix-list to apply.
+ type: str
+ ipv6:
+ description: IPv6 address-family settings.
+ type: dict
+ suboptions:
+ prefix_list:
+ description: Name of prefix-list to apply.
+ type: str
+ nexthop:
+ description: Batching based on nexthop.
+ type: bool
+ dynamic_med_interval:
+ description: Sets the interval for dampening of med changes.
+ type: int
+ enforce_first_as:
+ description: Enforce neighbor AS is the first AS in AS-PATH attribute (EBGP).
+ type: bool
+ enhanced_error:
+ description: Enable BGP Enhanced error handling.
+ type: bool
+ fabric_soo:
+ description: Fabric site of origin.
+ type: str
+ fast_external_fallover:
+ description: Immediately reset the session if the link to a directly connected BGP peer goes down.
+ type: bool
+ flush_routes:
+ description: Flush routes in RIB upon controlled restart.
+ type: bool
+ graceful_restart: &graceful_restart
+ description: Configure Graceful Restart functionality.
+ type: dict
+ suboptions:
+ set:
+ description: Enable graceful-restart.
+ type: bool
+ restart_time:
+ description: Maximum time for restart advertised to peers.
+ type: int
+ stalepath_time:
+ description: Maximum time to keep a restarting peer's stale routes.
+ type: int
+ helper:
+ description: Configure Graceful Restart Helper mode functionality.
+ type: bool
+ graceful_shutdown:
+ description: Graceful-shutdown for BGP protocol.
+ type: dict
+ suboptions:
+ activate:
+ description: Send graceful-shutdown community on all routes.
+ type: dict
+ suboptions:
+ set:
+ description: Activiate graceful-shutdown.
+ type: bool
+ route_map:
+ description: Apply route-map to modify attributes for outbound.
+ type: str
+ aware:
+ description: Lower preference of routes carrying graceful-shutdown community.
+ type: bool
+ isolate:
+ description: Isolate this router from BGP perspective.
+ type: dict
+ suboptions:
+ set:
+ description: Withdraw remote BGP routes to isolate this router.
+ type: bool
+ include_local:
+ description: Withdraw both local and remote BGP routes.
+ type: bool
+ log_neighbor_changes: &log_nbr
+ description: Log a message for neighbor up/down event.
+ type: bool
+ maxas_limit: &maxas_limit
+ description: Allow AS-PATH attribute from EBGP neighbor imposing a limit on number of ASes.
+ type: int
+ neighbors: &nbr
+ description: Configure BGP neighbors.
+ type: list
+ elements: dict
+ suboptions:
+ neighbor_address:
+ description: IP address/Prefix of the neighbor or interface.
+ type: str
+ required: True
+ neighbor_affinity_group:
+ description: Configure an affinity group.
+ type: dict
+ suboptions:
+ group_id:
+ description: Affinity Group ID.
+ type: int
+ bmp_activate_server:
+ description: Specify server ID for activating BMP monitoring for the peer.
+ type: int
+ capability:
+ description: Capability.
+ type: dict
+ suboptions:
+ suppress_4_byte_as:
+ description: Suppress 4-byte AS Capability.
+ type: bool
+ description:
+ description: Neighbor specific descripion.
+ type: str
+ disable_connected_check:
+ description: Disable check for directly connected peer.
+ type: bool
+ dont_capability_negotiate:
+ description: Don't negotiate capability with this neighbor.
+ type: bool
+ dscp:
+ description: Set dscp value for tcp transport.
+ type: str
+ dynamic_capability:
+ description: Dynamic Capability
+ type: bool
+ ebgp_multihop:
+ description: Specify multihop TTL for remote peer.
+ type: int
+ graceful_shutdown:
+ description: Graceful-shutdown for this neighbor.
+ type: dict
+ suboptions:
+ activate:
+ description: Send graceful-shutdown community.
+ type: dict
+ suboptions:
+ set:
+ description: Set activate.
+ type: bool
+ route_map:
+ description: Apply route-map to modify attributes for outbound.
+ type: str
+ inherit:
+ description: Inherit a template.
+ type: dict
+ suboptions:
+ peer:
+ description: Peer template to inherit.
+ type: str
+ peer_session:
+ description: Peer-session template to inherit.
+ type: str
+ local_as:
+ description: Specify the local-as number for the eBGP neighbor.
+ type: str
+ log_neighbor_changes:
+ description: Log message for neighbor up/down event.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set log-neighbor-changes.
+ type: bool
+ disable:
+ description:
+ - Disable logging of neighbor up/down event.
+ type: bool
+ low_memory:
+ description: Behaviour in low memory situations.
+ type: dict
+ suboptions:
+ exempt:
+ description: Do not shutdown this peer when under memory pressure.
+ type: bool
+ password:
+ description: Configure a password for neighbor.
+ type: dict
+ suboptions:
+ encryption:
+ description:
+ - 0 specifies an UNENCRYPTED neighbor password.
+ - 3 specifies an 3DES ENCRYPTED neighbor password will follow.
+ - 7 specifies a Cisco type 7 ENCRYPTED neighbor password will follow.
+ type: int
+ key:
+ description: Authentication password.
+ type: str
+ path_attribute:
+ description: BGP path attribute optional filtering.
+ type: list
+ elements: dict
+ suboptions:
+ action:
+ description: Action.
+ type: str
+ choices: ["discard", "treat-as-withdraw"]
+ type:
+ description: Path attribute type
+ type: int
+ range:
+ description: Path attribute range.
+ type: dict
+ suboptions:
+ start:
+ description: Path attribute range start value.
+ type: int
+ end:
+ description: Path attribute range end value.
+ type: int
+ peer_type:
+ description: Neighbor facing
+ type: str
+ choices: ["fabric-border-leaf", "fabric-external"]
+ remote_as:
+ description: Specify Autonomous System Number of the neighbor.
+ type: str
+ remove_private_as:
+ description: Remove private AS number from outbound updates.
+ type: dict
+ suboptions:
+ set:
+ description: Remove private AS.
+ type: bool
+ replace_as:
+ description: Replace.
+ type: bool
+ all:
+ description: All.
+ type: bool
+ shutdown:
+ description: Administratively shutdown this neighbor.
+ type: bool
+ timers:
+ description: Configure keepalive and hold timers.
+ type: dict
+ suboptions:
+ keepalive:
+ description: Keepalive interval (seconds).
+ type: int
+ holdtime:
+ description: Holdtime (seconds).
+ type: int
+ transport:
+ description: BGP transport connection.
+ type: dict
+ suboptions:
+ connection_mode:
+ description: Specify type of connection.
+ type: dict
+ suboptions:
+ passive:
+ description: Allow passive connection setup only.
+ type: bool
+ ttl_security:
+ description: Enable TTL Security Mechanism.
+ type: dict
+ suboptions:
+ hops:
+ description: Specify hop count for remote peer.
+ type: int
+ update_source:
+ description: Specify source of BGP session and updates.
+ type: str
+ neighbor_down: &nbr_down
+ description: Handle BGP neighbor down event, due to various reasons.
+ type: dict
+ suboptions:
+ fib_accelerate:
+ description: Accelerate the hardware updates for IP/IPv6 adjacencies for neighbor.
+ type: bool
+ nexthop:
+ description: Nexthop resolution options.
+ type: dict
+ suboptions:
+ suppress_default_resolution:
+ description: Prohibit use of default route for nexthop address resolution.
+ type: bool
+ rd:
+ description: Secondary Route Distinguisher for vxlan multisite border gateway.
+ type: dict
+ suboptions:
+ dual:
+ description: Generate Secondary RD for all VRFs and L2VNIs.
+ type: bool
+ id:
+ description: Specify 2 byte value for ID.
+ type: int
+ reconnect_interval: &reconn_intv
+ description: Configure connection reconnect interval.
+ type: int
+ router_id: &rtr_id
+ description: Specify the IP address to use as router-id.
+ type: str
+ shutdown: &shtdwn
+ description: Administratively shutdown BGP protocol.
+ type: bool
+ suppress_fib_pending: &suppr
+ description: Advertise only routes that are programmed in hardware to peers.
+ type: bool
+ timers: &timers
+ description: Configure bgp related timers.
+ type: dict
+ suboptions:
+ bestpath_limit:
+ description: Configure timeout for first bestpath after restart.
+ type: dict
+ suboptions:
+ timeout:
+ description: Bestpath timeout (seconds).
+ type: int
+ always:
+ description: Configure update-delay-always option.
+ type: bool
+ bgp:
+ description: Configure different bgp keepalive and holdtimes.
+ type: dict
+ suboptions:
+ keepalive:
+ description: Keepalive interval (seconds).
+ type: int
+ holdtime:
+ description: Holdtime (seconds).
+ type: int
+ prefix_peer_timeout:
+ description: Prefix Peer timeout (seconds).
+ type: int
+ prefix_peer_wait:
+ description: Configure wait timer for a prefix peer.
+ type: int
+ vrfs:
+ description: Virtual Router Context configurations.
+ type: list
+ elements: dict
+ suboptions:
+ vrf:
+ description: VRF name.
+ type: str
+ allocate_index:
+ description: Configure allocate-index.
+ type: int
+ bestpath: *bestpath
+ cluster_id: *cluster_id
+ confederation: *confederation
+ graceful_restart: *graceful_restart
+ local_as:
+ description: Specify the local-as for this vrf.
+ type: str
+ log_neighbor_changes: *log_nbr
+ maxas_limit: *maxas_limit
+ neighbors: *nbr
+ neighbor_down: *nbr_down
+ reconnect_interval: *reconn_intv
+ router_id: *rtr_id
+ timers: *timers
+ state:
+ description:
+ - The state the configuration should be left in.
+ - State I(purged) removes all the BGP configurations from the
+ target device. Use caution with this state.
+ - State I(deleted) only removes BGP attributes that this modules
+ manages and does not negate the BGP process completely. Thereby, preserving
+ address-family related configurations under BGP context.
+ - Running states I(deleted) and I(replaced) will result in an error if there
+ are address-family configuration lines present under a neighbor,
+ or a vrf context that is to be removed. Please use the
+ M(cisco.nxos.nxos_bgp_af) or M(cisco.nxos.nxos_bgp_neighbor_af)
+ modules for prior cleanup.
+ - Refer to examples for more details.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - deleted
+ - purged
+ - parsed
+ - gathered
+ - rendered
+ default: merged
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+# Nexus9000v# show running-config | section "^router bgp"
+# Nexus9000v#
+
+- name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65563
+ router_id: 192.168.1.1
+ bestpath:
+ as_path:
+ multipath_relax: True
+ compare_neighborid: True
+ cost_community_ignore: True
+ confederation:
+ identifier: 42
+ peers:
+ - 65020
+ - 65030
+ - 65040
+ log_neighbor_changes: True
+ maxas_limit: 20
+ neighbors:
+ - neighbor_address: 192.168.1.100
+ neighbor_affinity_group:
+ group_id: 160
+ bmp_activate_server: 1
+ remote_as: 65563
+ description: NBR-1
+ low_memory:
+ exempt: True
+ - neighbor_address: 192.168.1.101
+ remote_as: 65563
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ neighbor_down:
+ fib_accelerate: True
+ vrfs:
+ - vrf: site-1
+ allocate_index: 5000
+ local_as: 200
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 198.51.100.1
+ description: site-1-nbr-1
+ password:
+ encryption: 3
+ key: 13D4D3549493D2877B1DC116EE27A6BE
+ remote_as: 65562
+ - neighbor_address: 198.51.100.2
+ remote_as: 65562
+ description: site-1-nbr-2
+ - vrf: site-2
+ local_as: 300
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 203.0.113.2
+ description: site-2-nbr-1
+ password:
+ encryption: 3
+ key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+ remote_as: 65568
+ neighbor_down:
+ fib_accelerate: True
+
+# Task output
+# -------------
+# before: {}
+#
+# commands:
+# - router bgp 65563
+# - bestpath as-path multipath-relax
+# - bestpath compare-neighborid
+# - bestpath cost-community ignore
+# - confederation identifier 42
+# - log-neighbor-changes
+# - maxas-limit 20
+# - neighbor-down fib-accelerate
+# - router-id 192.168.1.1
+# - confederation peers 65020 65030 65040
+# - neighbor 192.168.1.100
+# - remote-as 65563
+# - affinity-group 160
+# - bmp-activate-server 1
+# - description NBR-1
+# - low-memory exempt
+# - neighbor 192.168.1.101
+# - remote-as 65563
+# - password 7 12090404011C03162E
+# - vrf site-1
+# - allocate-index 5000
+# - local-as 200
+# - log-neighbor-changes
+# - neighbor 198.51.100.1
+# - remote-as 65562
+# - description site-1-nbr-1
+# - password 3 13D4D3549493D2877B1DC116EE27A6BE
+# - neighbor 198.51.100.2
+# - remote-as 65562
+# - description site-1-nbr-2
+# - vrf site-2
+# - local-as 300
+# - log-neighbor-changes
+# - neighbor-down fib-accelerate
+# - neighbor 203.0.113.2
+# - remote-as 65568
+# - description site-2-nbr-1
+# - password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+#
+# after:
+# as_number: '65563'
+# bestpath:
+# as_path:
+# multipath_relax: true
+# compare_neighborid: true
+# cost_community_ignore: true
+# confederation:
+# identifier: '42'
+# peers:
+# - '65020'
+# - '65030'
+# - '65040'
+# log_neighbor_changes: true
+# maxas_limit: 20
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - bmp_activate_server: 1
+# description: NBR-1
+# low_memory:
+# exempt: true
+# neighbor_address: 192.168.1.100
+# neighbor_affinity_group:
+# group_id: 160
+# remote_as: '65563'
+# - neighbor_address: 192.168.1.101
+# password:
+# encryption: 7
+# key: 12090404011C03162E
+# remote_as: '65563'
+# router_id: 192.168.1.1
+# vrfs:
+# - allocate_index: 5000
+# local_as: '200'
+# log_neighbor_changes: true
+# neighbors:
+# - description: site-1-nbr-1
+# neighbor_address: 198.51.100.1
+# password:
+# encryption: 3
+# key: 13D4D3549493D2877B1DC116EE27A6BE
+# remote_as: '65562'
+# - description: site-1-nbr-2
+# neighbor_address: 198.51.100.2
+# remote_as: '65562'
+# vrf: site-1
+# - local_as: '300'
+# log_neighbor_changes: true
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - description: site-2-nbr-1
+# neighbor_address: 203.0.113.2
+# password:
+# encryption: 3
+# key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+# remote_as: '65568'
+# vrf: site-2
+
+
+# After state:
+# -------------
+# Nexus9000v# show running-config | section "^router bgp"
+# router bgp 65563
+# router-id 192.168.1.1
+# confederation identifier 42
+# confederation peers 65020 65030 65040
+# bestpath as-path multipath-relax
+# bestpath cost-community ignore
+# bestpath compare-neighborid
+# neighbor-down fib-accelerate
+# maxas-limit 20
+# log-neighbor-changes
+# neighbor 192.168.1.100
+# low-memory exempt
+# bmp-activate-server 1
+# remote-as 65563
+# description NBR-1
+# affinity-group 160
+# neighbor 192.168.1.101
+# remote-as 65563
+# password 7 12090404011C03162E
+# vrf site-1
+# local-as 200
+# log-neighbor-changes
+# allocate-index 5000
+# neighbor 198.51.100.1
+# remote-as 65562
+# description site-1-nbr-1
+# password 3 13D4D3549493D2877B1DC116EE27A6BE
+# neighbor 198.51.100.2
+# remote-as 65562
+# description site-1-nbr-2
+# vrf site-2
+# local-as 300
+# neighbor-down fib-accelerate
+# log-neighbor-changes
+# neighbor 203.0.113.2
+# remote-as 65568
+# description site-2-nbr-1
+# password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+# Using replaced
+
+# Before state:
+# -------------
+# Nexus9000v# show running-config | section "^router bgp"
+# router bgp 65563
+# router-id 192.168.1.1
+# confederation identifier 42
+# confederation peers 65020 65030 65040
+# bestpath as-path multipath-relax
+# bestpath cost-community ignore
+# bestpath compare-neighborid
+# neighbor-down fib-accelerate
+# maxas-limit 20
+# log-neighbor-changes
+# neighbor 192.168.1.100
+# low-memory exempt
+# bmp-activate-server 1
+# remote-as 65563
+# description NBR-1
+# affinity-group 160
+# neighbor 192.168.1.101
+# remote-as 65563
+# password 7 12090404011C03162E
+# vrf site-1
+# local-as 200
+# log-neighbor-changes
+# allocate-index 5000
+# neighbor 198.51.100.1
+# remote-as 65562
+# description site-1-nbr-1
+# password 3 13D4D3549493D2877B1DC116EE27A6BE
+# neighbor 198.51.100.2
+# remote-as 65562
+# description site-1-nbr-2
+# vrf site-2
+# local-as 300
+# neighbor-down fib-accelerate
+# log-neighbor-changes
+# neighbor 203.0.113.2
+# remote-as 65568
+# description site-2-nbr-1
+# password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+- name: Replace BGP configuration with provided configuration
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65563
+ router_id: 192.168.1.1
+ bestpath:
+ compare_neighborid: True
+ cost_community_ignore: True
+ confederation:
+ identifier: 42
+ peers:
+ - 65020
+ - 65030
+ - 65050
+ maxas_limit: 40
+ neighbors:
+ - neighbor_address: 192.168.1.100
+ neighbor_affinity_group:
+ group_id: 160
+ bmp_activate_server: 1
+ remote_as: 65563
+ description: NBR-1
+ low_memory:
+ exempt: True
+ neighbor_down:
+ fib_accelerate: True
+ vrfs:
+ - vrf: site-2
+ local_as: 300
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 203.0.113.2
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ neighbor_down:
+ fib_accelerate: True
+ state: replaced
+
+# Task output
+# -------------
+# before:
+# as_number: '65563'
+# bestpath:
+# as_path:
+# multipath_relax: true
+# compare_neighborid: true
+# cost_community_ignore: true
+# confederation:
+# identifier: '42'
+# peers:
+# - '65020'
+# - '65030'
+# - '65040'
+# log_neighbor_changes: true
+# maxas_limit: 20
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - bmp_activate_server: 1
+# description: NBR-1
+# low_memory:
+# exempt: true
+# neighbor_address: 192.168.1.100
+# neighbor_affinity_group:
+# group_id: 160
+# remote_as: '65563'
+# - neighbor_address: 192.168.1.101
+# password:
+# encryption: 7
+# key: 12090404011C03162E
+# remote_as: '65563'
+# router_id: 192.168.1.1
+# vrfs:
+# - allocate_index: 5000
+# local_as: '200'
+# log_neighbor_changes: true
+# neighbors:
+# - description: site-1-nbr-1
+# neighbor_address: 198.51.100.1
+# password:
+# encryption: 3
+# key: 13D4D3549493D2877B1DC116EE27A6BE
+# remote_as: '65562'
+# - description: site-1-nbr-2
+# neighbor_address: 198.51.100.2
+# remote_as: '65562'
+# vrf: site-1
+# - local_as: '300'
+# log_neighbor_changes: true
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - description: site-2-nbr-1
+# neighbor_address: 203.0.113.2
+# password:
+# encryption: 3
+# key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+# remote_as: '65568'
+# vrf: site-2
+#
+# commands:
+# - router bgp 65563
+# - no bestpath as-path multipath-relax
+# - no log-neighbor-changes
+# - maxas-limit 40
+# - no confederation peers 65020 65030 65040
+# - confederation peers 65020 65030 65050
+# - no neighbor 192.168.1.101
+# - vrf site-2
+# - neighbor 203.0.113.2
+# - no remote-as 65568
+# - no description site-2-nbr-1
+# - password 7 12090404011C03162E
+# - no vrf site-1
+
+# after:
+# as_number: '65563'
+# bestpath:
+# compare_neighborid: true
+# cost_community_ignore: true
+# confederation:
+# identifier: '42'
+# peers:
+# - '65020'
+# - '65030'
+# - '65050'
+# maxas_limit: 40
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - bmp_activate_server: 1
+# description: NBR-1
+# low_memory:
+# exempt: true
+# neighbor_address: 192.168.1.100
+# neighbor_affinity_group:
+# group_id: 160
+# remote_as: '65563'
+# router_id: 192.168.1.1
+# vrfs:
+# - local_as: '300'
+# log_neighbor_changes: true
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - neighbor_address: 203.0.113.2
+# password:
+# encryption: 7
+# key: 12090404011C03162E
+# vrf: site-2
+#
+# After state:
+# -------------
+# Nexus9000v# show running-config | section "^router bgp"
+# router bgp 65563
+# router-id 192.168.1.1
+# confederation identifier 42
+# confederation peers 65020 65030 65050
+# bestpath cost-community ignore
+# bestpath compare-neighborid
+# neighbor-down fib-accelerate
+# maxas-limit 40
+# neighbor 192.168.1.100
+# low-memory exempt
+# bmp-activate-server 1
+# remote-as 65563
+# description NBR-1
+# affinity-group 160
+# vrf site-2
+# local-as 300
+# neighbor-down fib-accelerate
+# log-neighbor-changes
+# neighbor 203.0.113.2
+# password 7 12090404011C03162E
+
+# Using deleted
+
+# Before state:
+# -------------
+# Nexus9000v# show running-config | section "^router bgp"
+# router bgp 65563
+# router-id 192.168.1.1
+# confederation identifier 42
+# confederation peers 65020 65030 65040
+# bestpath as-path multipath-relax
+# bestpath cost-community ignore
+# bestpath compare-neighborid
+# neighbor-down fib-accelerate
+# maxas-limit 20
+# log-neighbor-changes
+# address-family ipv4 unicast
+# default-metric 400
+# suppress-inactive
+# default-information originate
+# address-family ipv6 multicast
+# wait-igp-convergence
+# redistribute eigrp eigrp-1 route-map site-1-rmap
+# neighbor 192.168.1.100
+# low-memory exempt
+# bmp-activate-server 1
+# remote-as 65563
+# description NBR-1
+# affinity-group 160
+# neighbor 192.168.1.101
+# remote-as 65563
+# password 7 12090404011C03162E
+# vrf site-1
+# local-as 200
+# log-neighbor-changes
+# allocate-index 5000
+# address-family ipv4 multicast
+# maximum-paths 40
+# dampen-igp-metric 1200
+# neighbor 198.51.100.1
+# remote-as 65562
+# description site-1-nbr-1
+# password 3 13D4D3549493D2877B1DC116EE27A6BE
+# neighbor 198.51.100.2
+# remote-as 65562
+# description site-1-nbr-2
+# vrf site-2
+# local-as 300
+# neighbor-down fib-accelerate
+# log-neighbor-changes
+# neighbor 203.0.113.2
+# remote-as 65568
+# description site-1-nbr-1
+# password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+- name: Delete BGP configurations handled by this module
+ cisco.nxos.nxos_bgp_global:
+ state: deleted
+
+# Task output
+# -------------
+
+# before:
+# as_number: '65563'
+# bestpath:
+# as_path:
+# multipath_relax: true
+# compare_neighborid: true
+# cost_community_ignore: true
+# confederation:
+# identifier: '42'
+# peers:
+# - '65020'
+# - '65030'
+# - '65040'
+# log_neighbor_changes: true
+# maxas_limit: 20
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - bmp_activate_server: 1
+# description: NBR-1
+# low_memory:
+# exempt: true
+# neighbor_address: 192.168.1.100
+# neighbor_affinity_group:
+# group_id: 160
+# remote_as: '65563'
+# - neighbor_address: 192.168.1.101
+# password:
+# encryption: 7
+# key: 12090404011C03162E
+# remote_as: '65563'
+# router_id: 192.168.1.1
+# vrfs:
+# - allocate_index: 5000
+# local_as: '200'
+# log_neighbor_changes: true
+# neighbors:
+# - description: site-1-nbr-1
+# neighbor_address: 198.51.100.1
+# password:
+# encryption: 3
+# key: 13D4D3549493D2877B1DC116EE27A6BE
+# remote_as: '65562'
+# - description: site-1-nbr-2
+# neighbor_address: 198.51.100.2
+# remote_as: '65562'
+# vrf: site-1
+# - local_as: '300'
+# log_neighbor_changes: true
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - description: site-1-nbr-1
+# neighbor_address: 203.0.113.2
+# password:
+# encryption: 3
+# key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+# remote_as: '65568'
+# vrf: site-2
+#
+# commands:
+# - router bgp 65563
+# - no bestpath as-path multipath-relax
+# - no bestpath compare-neighborid
+# - no bestpath cost-community ignore
+# - no confederation identifier 42
+# - no log-neighbor-changes
+# - no maxas-limit 20
+# - no neighbor-down fib-accelerate
+# - no router-id 192.168.1.1
+# - no confederation peers 65020 65030 65040
+# - no neighbor 192.168.1.100
+# - no neighbor 192.168.1.101
+# - no vrf site-1
+# - no vrf site-2
+#
+# after:
+# as_number: '65563'
+#
+# After state:
+# -------------
+# Nexus9000v# show running-config | section "^router bgp"
+# router bgp 65563
+# address-family ipv4 unicast
+# default-metric 400
+# suppress-inactive
+# default-information originate
+# address-family ipv6 multicast
+# wait-igp-convergence
+# redistribute eigrp eigrp-1 route-map site-1-rmap
+#
+
+# Using purged
+
+# Before state:
+# -------------
+# Nexus9000v# show running-config | section "^router bgp"
+# router bgp 65563
+# router-id 192.168.1.1
+# confederation identifier 42
+# confederation peers 65020 65030 65040
+# bestpath as-path multipath-relax
+# bestpath cost-community ignore
+# bestpath compare-neighborid
+# neighbor-down fib-accelerate
+# maxas-limit 20
+# log-neighbor-changes
+# address-family ipv4 unicast
+# default-metric 400
+# suppress-inactive
+# default-information originate
+# address-family ipv6 multicast
+# wait-igp-convergence
+# redistribute eigrp eigrp-1 route-map site-1-rmap
+# neighbor 192.168.1.100
+# low-memory exempt
+# bmp-activate-server 1
+# remote-as 65563
+# description NBR-1
+# affinity-group 160
+# neighbor 192.168.1.101
+# remote-as 65563
+# password 7 12090404011C03162E
+# vrf site-1
+# local-as 200
+# log-neighbor-changes
+# allocate-index 5000
+# address-family ipv4 multicast
+# maximum-paths 40
+# dampen-igp-metric 1200
+# neighbor 198.51.100.1
+# remote-as 65562
+# description site-1-nbr-1
+# password 3 13D4D3549493D2877B1DC116EE27A6BE
+# neighbor 198.51.100.2
+# remote-as 65562
+# description site-1-nbr-2
+# vrf site-2
+# local-as 300
+# neighbor-down fib-accelerate
+# log-neighbor-changes
+# neighbor 203.0.113.2
+# remote-as 65568
+# description site-1-nbr-1
+# password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+- name: Purge all BGP configurations from the device
+ cisco.nxos.nxos_bgp_global:
+ state: purged
+
+# Task output
+# -------------
+
+# before:
+# as_number: '65563'
+# bestpath:
+# as_path:
+# multipath_relax: true
+# compare_neighborid: true
+# cost_community_ignore: true
+# confederation:
+# identifier: '42'
+# peers:
+# - '65020'
+# - '65030'
+# - '65040'
+# log_neighbor_changes: true
+# maxas_limit: 20
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - bmp_activate_server: 1
+# description: NBR-1
+# low_memory:
+# exempt: true
+# neighbor_address: 192.168.1.100
+# neighbor_affinity_group:
+# group_id: 160
+# remote_as: '65563'
+# - neighbor_address: 192.168.1.101
+# password:
+# encryption: 7
+# key: 12090404011C03162E
+# remote_as: '65563'
+# router_id: 192.168.1.1
+# vrfs:
+# - allocate_index: 5000
+# local_as: '200'
+# log_neighbor_changes: true
+# neighbors:
+# - description: site-1-nbr-1
+# neighbor_address: 198.51.100.1
+# password:
+# encryption: 3
+# key: 13D4D3549493D2877B1DC116EE27A6BE
+# remote_as: '65562'
+# - description: site-1-nbr-2
+# neighbor_address: 198.51.100.2
+# remote_as: '65562'
+# vrf: site-1
+# - local_as: '300'
+# log_neighbor_changes: true
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - description: site-1-nbr-1
+# neighbor_address: 203.0.113.2
+# password:
+# encryption: 3
+# key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+# remote_as: '65568'
+# vrf: site-2
+#
+# commands:
+# - no router bgp 65563
+#
+# after: {}
+#
+# After state:
+# -------------
+# Nexus9000v# show running-config | section "^router bgp"
+# Nexus9000v#
+
+# Using rendered
+
+- name: Render platform specific configuration lines (without connecting to the device)
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65563
+ router_id: 192.168.1.1
+ bestpath:
+ as_path:
+ multipath_relax: True
+ compare_neighborid: True
+ cost_community_ignore: True
+ confederation:
+ identifier: 42
+ peers:
+ - 65020
+ - 65030
+ - 65040
+ log_neighbor_changes: True
+ maxas_limit: 20
+ neighbors:
+ - neighbor_address: 192.168.1.100
+ neighbor_affinity_group:
+ group_id: 160
+ bmp_activate_server: 1
+ remote_as: 65563
+ description: NBR-1
+ low_memory:
+ exempt: True
+ - neighbor_address: 192.168.1.101
+ remote_as: 65563
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ neighbor_down:
+ fib_accelerate: True
+ vrfs:
+ - vrf: site-1
+ allocate_index: 5000
+ local_as: 200
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 198.51.100.1
+ description: site-1-nbr-1
+ password:
+ encryption: 3
+ key: 13D4D3549493D2877B1DC116EE27A6BE
+ remote_as: 65562
+ - neighbor_address: 198.51.100.2
+ remote_as: 65562
+ description: site-1-nbr-2
+ - vrf: site-2
+ local_as: 300
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 203.0.113.2
+ description: site-1-nbr-1
+ password:
+ encryption: 3
+ key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+ remote_as: 65568
+ neighbor_down:
+ fib_accelerate: True
+
+# Task Output (redacted)
+# -----------------------
+# rendered:
+# - router bgp 65563
+# - bestpath as-path multipath-relax
+# - bestpath compare-neighborid
+# - bestpath cost-community ignore
+# - confederation identifier 42
+# - log-neighbor-changes
+# - maxas-limit 20
+# - neighbor-down fib-accelerate
+# - router-id 192.168.1.1
+# - confederation peers 65020 65030 65040
+# - neighbor 192.168.1.100
+# - remote-as 65563
+# - affinity-group 160
+# - bmp-activate-server 1
+# - description NBR-1
+# - low-memory exempt
+# - neighbor 192.168.1.101
+# - remote-as 65563
+# - password 7 12090404011C03162E
+# - vrf site-1
+# - allocate-index 5000
+# - local-as 200
+# - log-neighbor-changes
+# - neighbor 198.51.100.1
+# - remote-as 65562
+# - description site-1-nbr-1
+# - password 3 13D4D3549493D2877B1DC116EE27A6BE
+# - neighbor 198.51.100.2
+# - remote-as 65562
+# - description site-1-nbr-2
+# - vrf site-2
+# - local-as 300
+# - log-neighbor-changes
+# - neighbor-down fib-accelerate
+# - neighbor 203.0.113.2
+# - remote-as 65568
+# - description site-1-nbr-1
+# - password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+# router bgp 65563
+# router-id 192.168.1.1
+# confederation identifier 42
+# confederation peers 65020 65030 65040
+# bestpath as-path multipath-relax
+# bestpath cost-community ignore
+# bestpath compare-neighborid
+# neighbor-down fib-accelerate
+# maxas-limit 20
+# log-neighbor-changes
+# neighbor 192.168.1.100
+# low-memory exempt
+# bmp-activate-server 1
+# remote-as 65563
+# description NBR-1
+# affinity-group 160
+# neighbor 192.168.1.101
+# remote-as 65563
+# password 7 12090404011C03162E
+# vrf site-1
+# local-as 200
+# log-neighbor-changes
+# allocate-index 5000
+# neighbor 198.51.100.1
+# remote-as 65562
+# description site-1-nbr-1
+# password 3 13D4D3549493D2877B1DC116EE27A6BE
+# neighbor 198.51.100.2
+# remote-as 65562
+# description site-1-nbr-2
+# vrf site-2
+# local-as 300
+# neighbor-down fib-accelerate
+# log-neighbor-changes
+# neighbor 203.0.113.2
+# remote-as 65568
+# description site-1-nbr-1
+# password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+- name: Parse externally provided BGP config
+ cisco.nxos.nxos_bgp_global:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+# parsed:
+# as_number: '65563'
+# bestpath:
+# as_path:
+# multipath_relax: true
+# compare_neighborid: true
+# cost_community_ignore: true
+# confederation:
+# identifier: '42'
+# peers:
+# - '65020'
+# - '65030'
+# - '65040'
+# log_neighbor_changes: true
+# maxas_limit: 20
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - bmp_activate_server: 1
+# description: NBR-1
+# low_memory:
+# exempt: true
+# neighbor_address: 192.168.1.100
+# neighbor_affinity_group:
+# group_id: 160
+# remote_as: '65563'
+# - neighbor_address: 192.168.1.101
+# password:
+# encryption: 7
+# key: 12090404011C03162E
+# remote_as: '65563'
+# router_id: 192.168.1.1
+# vrfs:
+# - allocate_index: 5000
+# local_as: '200'
+# log_neighbor_changes: true
+# neighbors:
+# - description: site-1-nbr-1
+# neighbor_address: 198.51.100.1
+# password:
+# encryption: 3
+# key: 13D4D3549493D2877B1DC116EE27A6BE
+# remote_as: '65562'
+# - description: site-1-nbr-2
+# neighbor_address: 198.51.100.2
+# remote_as: '65562'
+# vrf: site-1
+# - local_as: '300'
+# log_neighbor_changes: true
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - description: site-1-nbr-1
+# neighbor_address: 203.0.113.2
+# password:
+# encryption: 3
+# key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+# remote_as: '65568'
+# vrf: site-2
+
+# Using gathered
+
+# existing config
+#
+# Nexus9000v# show running-config | section "^router bgp"
+# router bgp 65563
+# router-id 192.168.1.1
+# confederation identifier 42
+# confederation peers 65020 65030 65050
+# bestpath cost-community ignore
+# bestpath compare-neighborid
+# neighbor-down fib-accelerate
+# maxas-limit 40
+# neighbor 192.168.1.100
+# low-memory exempt
+# bmp-activate-server 1
+# remote-as 65563
+# description NBR-1
+# affinity-group 160
+# vrf site-1
+# vrf site-2
+# local-as 300
+# neighbor-down fib-accelerate
+# log-neighbor-changes
+# neighbor 203.0.113.2
+# password 7 12090404011C03162E
+
+- name: Gather BGP facts using gathered
+ cisco.nxos.nxos_bgp_global:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+# gathered:
+# as_number: '65563'
+# bestpath:
+# compare_neighborid: true
+# cost_community_ignore: true
+# confederation:
+# identifier: '42'
+# peers:
+# - '65020'
+# - '65030'
+# - '65050'
+# maxas_limit: 40
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - bmp_activate_server: 1
+# description: NBR-1
+# low_memory:
+# exempt: true
+# neighbor_address: 192.168.1.100
+# neighbor_affinity_group:
+# group_id: 160
+# remote_as: '65563'
+# router_id: 192.168.1.1
+# vrfs:
+# - vrf: site-1
+# - local_as: '300'
+# log_neighbor_changes: true
+# neighbor_down:
+# fib_accelerate: true
+# neighbors:
+# - neighbor_address: 203.0.113.2
+# password:
+# encryption: 7
+# key: 12090404011C03162E
+# vrf: site-2
+
+# Remove a neighbor having AF configurations with state replaced (will fail)
+
+# Before state:
+# -------------
+# Nexus9000v# show running-config | section "^router bgp"
+# router bgp 65536
+# log-neighbor-changes
+# maxas-limit 20
+# router-id 198.51.100.2
+# neighbor 203.0.113.2
+# address-family ipv4 unicast
+# next-hop-self
+# remote-as 65538
+# affinity-group 160
+# description NBR-1
+# low-memory exempt
+# neighbor 192.0.2.1
+# remote-as 65537
+# password 7 12090404011C03162E
+
+- name: Remove a neighbor having AF configurations (should fail)
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65536
+ router_id: 198.51.100.2
+ maxas_limit: 20
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 192.0.2.1
+ remote_as: 65537
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ state: replaced
+
+# Task output (redacted)
+# -----------------------
+# fatal: [Nexus9000v]: FAILED! => changed=false
+# msg: Neighbor 203.0.113.2 has address-family configurations.
+# Please use the nxos_bgp_neighbor_af module to remove those first.
+
+# Remove a VRF having AF configurations with state replaced (will fail)
+
+# Before state:
+# -------------
+# Nexus9000v# show running-config | section "^router bgp"
+# router bgp 65536
+# log-neighbor-changes
+# maxas-limit 20
+# router-id 198.51.100.2
+# neighbor 192.0.2.1
+# remote-as 65537
+# password 7 12090404011C03162E
+# vrf site-1
+# address-family ipv4 unicast
+# default-information originate
+# neighbor 203.0.113.2
+# remote-as 65538
+# affinity-group 160
+# description NBR-1
+# low-memory exempt
+# vrf site-2
+# neighbor-down fib-accelerate
+
+- name: Remove a VRF having AF configurations (should fail)
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65536
+ router_id: 198.51.100.2
+ maxas_limit: 20
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 192.0.2.1
+ remote_as: 65537
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ vrfs:
+ - vrf: site-2
+ neighbor_down:
+ fib_accelerate: True
+ state: replaced
+
+# Task output (redacted)
+# -----------------------
+# fatal: [Nexus9000v]: FAILED! => changed=false
+# msg: VRF site-1 has address-family configurations.
+# Please use the nxos_bgp_af module to remove those first.
+"""
+
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample:
+ - router bgp 65563
+ - maxas-limit 20
+ - router-id 192.168.1.1
+ - confederation peers 65020 65030 65040
+ - neighbor 192.168.1.100
+ - remote-as 65563
+ - affinity-group 160
+ - bmp-activate-server 1
+ - description NBR-1
+ - low-memory exempt
+ - vrf site-1
+ - log-neighbor-changes
+ - neighbor 198.51.100.1
+ - remote-as 65562
+ - description site-1-nbr-1
+ - password 3 13D4D3549493D2877B1DC116EE27A6BE
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.bgp_global.bgp_global import (
+ Bgp_globalArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.bgp_global.bgp_global import (
+ Bgp_global,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ module = AnsibleModule(
+ argument_spec=Bgp_globalArgs.argument_spec,
+ mutually_exclusive=[["config", "running_config"]],
+ required_if=[
+ ["state", "merged", ["config"]],
+ ["state", "replaced", ["config"]],
+ ["state", "rendered", ["config"]],
+ ["state", "parsed", ["running_config"]],
+ ],
+ supports_check_mode=True,
+ )
+
+ result = Bgp_global(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_neighbor.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_neighbor.py
new file mode 100644
index 00000000..0b22c916
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_neighbor.py
@@ -0,0 +1,588 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_bgp_neighbor
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2023-01-27) Manages BGP neighbors configurations.
+description:
+- Manages BGP neighbors configurations on NX-OS switches.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+deprecated:
+ alternative: nxos_bgp_global
+ why: Updated module released with more functionality.
+ removed_at_date: '2023-01-27'
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- C(state=absent) removes the whole BGP neighbor configuration.
+- Default, where supported, restores params default value.
+options:
+ asn:
+ description:
+ - BGP autonomous system number. Valid values are string, Integer in ASPLAIN or
+ ASDOT notation.
+ required: true
+ type: str
+ vrf:
+ description:
+ - Name of the VRF. The name 'default' is a valid VRF representing the global bgp.
+ default: default
+ type: str
+ neighbor:
+ description:
+ - Neighbor Identifier. Valid values are string. Neighbors may use IPv4 or IPv6
+ notation, with or without prefix length.
+ required: true
+ type: str
+ description:
+ description:
+ - Description of the neighbor.
+ type: str
+ bfd:
+ description:
+ - Enables/Disables BFD for a given neighbor.
+ - "Dependency: ''feature bfd''"
+ type: str
+ choices:
+ - enable
+ - disable
+ connected_check:
+ description:
+ - Configure whether or not to check for directly connected peer.
+ type: bool
+ capability_negotiation:
+ description:
+ - Configure whether or not to negotiate capability with this neighbor.
+ type: bool
+ dynamic_capability:
+ description:
+ - Configure whether or not to enable dynamic capability.
+ type: bool
+ ebgp_multihop:
+ description:
+ - Specify multihop TTL for a remote peer. Valid values are integers between 2
+ and 255, or keyword 'default' to disable this property.
+ type: str
+ local_as:
+ description:
+ - Specify the local-as number for the eBGP neighbor. Valid values are String or
+ Integer in ASPLAIN or ASDOT notation, or 'default', which means not to configure
+ it.
+ type: str
+ log_neighbor_changes:
+ description:
+ - Specify whether or not to enable log messages for neighbor up/down event.
+ choices:
+ - enable
+ - disable
+ - inherit
+ type: str
+ low_memory_exempt:
+ description:
+ - Specify whether or not to shut down this neighbor under memory pressure.
+ type: bool
+ maximum_peers:
+ description:
+ - Specify Maximum number of peers for this neighbor prefix Valid values are between
+ 1 and 1000, or 'default', which does not impose the limit. Note that this parameter
+ is accepted only on neighbors with address/prefix.
+ type: str
+ pwd:
+ description:
+ - Specify the password for neighbor. Valid value is string.
+ type: str
+ pwd_type:
+ description:
+ - Specify the encryption type the password will use. Valid values are '3des' or
+ 'cisco_type_7' encryption or keyword 'default'.
+ choices:
+ - 3des
+ - cisco_type_7
+ - default
+ type: str
+ remote_as:
+ description:
+ - Specify Autonomous System Number of the neighbor. Valid values are String or
+ Integer in ASPLAIN or ASDOT notation, or 'default', which means not to configure
+ it.
+ type: str
+ remove_private_as:
+ description:
+ - Specify the config to remove private AS number from outbound updates. Valid
+ values are 'enable' to enable this config, 'disable' to disable this config,
+ 'all' to remove all private AS number, or 'replace-as', to replace the private
+ AS number.
+ choices:
+ - enable
+ - disable
+ - all
+ - replace-as
+ type: str
+ shutdown:
+ description:
+ - Configure to administratively shutdown this neighbor.
+ type: bool
+ suppress_4_byte_as:
+ description:
+ - Configure to suppress 4-byte AS Capability.
+ type: bool
+ timers_keepalive:
+ description:
+ - Specify keepalive timer value. Valid values are integers between 0 and 3600
+ in terms of seconds, or 'default', which is 60.
+ type: str
+ timers_holdtime:
+ description:
+ - Specify holdtime timer value. Valid values are integers between 0 and 3600 in
+ terms of seconds, or 'default', which is 180.
+ type: str
+ transport_passive_only:
+ description:
+ - Specify whether or not to only allow passive connection setup. Valid values
+ are 'true', 'false', and 'default', which defaults to 'false'. This property
+ can only be configured when the neighbor is in 'ip' address format without prefix
+ length.
+ type: bool
+ update_source:
+ description:
+ - Specify source interface of BGP session and updates.
+ type: str
+ state:
+ description:
+ - Determines whether the config should be present or not on the device.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+ peer_type:
+ description:
+ - Specify the peer type for BGP session.
+ choices:
+ - fabric_border_leaf
+ - fabric_external
+ - disable
+ type: str
+ version_added: 1.1.0
+"""
+EXAMPLES = """
+# create a new neighbor
+- cisco.nxos.nxos_bgp_neighbor:
+ asn: 65535
+ neighbor: 192.0.2.3
+ local_as: 20
+ remote_as: 30
+ bfd: enable
+ description: just a description
+ update_source: Ethernet1/3
+ state: present
+ peer_type: fabric_external
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["router bgp 65535", "neighbor 192.0.2.3",
+ "remote-as 30", "update-source Ethernet1/3",
+ "description just a description", "local-as 20", "peer-type fabric-external"]
+"""
+
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+
+BOOL_PARAMS = [
+ "capability_negotiation",
+ "shutdown",
+ "connected_check",
+ "dynamic_capability",
+ "low_memory_exempt",
+ "suppress_4_byte_as",
+ "transport_passive_only",
+]
+PARAM_TO_COMMAND_KEYMAP = {
+ "asn": "router bgp",
+ "bfd": "bfd",
+ "capability_negotiation": "dont-capability-negotiate",
+ "connected_check": "disable-connected-check",
+ "description": "description",
+ "dynamic_capability": "dynamic-capability",
+ "ebgp_multihop": "ebgp-multihop",
+ "local_as": "local-as",
+ "log_neighbor_changes": "log-neighbor-changes",
+ "low_memory_exempt": "low-memory exempt",
+ "maximum_peers": "maximum-peers",
+ "neighbor": "neighbor",
+ "pwd": "password",
+ "pwd_type": "password",
+ "remote_as": "remote-as",
+ "remove_private_as": "remove-private-as",
+ "shutdown": "shutdown",
+ "suppress_4_byte_as": "capability suppress 4-byte-as",
+ "timers_keepalive": "timers",
+ "timers_holdtime": "timers",
+ "transport_passive_only": "transport connection-mode passive",
+ "update_source": "update-source",
+ "vrf": "vrf",
+ "peer_type": "peer-type",
+}
+PARAM_TO_DEFAULT_KEYMAP = {
+ "bfd": "disable",
+ "shutdown": False,
+ "dynamic_capability": True,
+ "timers_keepalive": 60,
+ "timers_holdtime": 180,
+ "peer_type": "disable",
+}
+
+
+def get_value(arg, config):
+ command = PARAM_TO_COMMAND_KEYMAP[arg]
+ has_command = re.search(r"^\s+{0}$".format(command), config, re.M)
+ has_command_val = re.search(
+ r"(?:\s+{0}\s*)(?P<value>.*)$".format(command), config, re.M
+ )
+
+ if arg == "dynamic_capability":
+ has_no_command = re.search(
+ r"\s+no\s{0}\s*$".format(command), config, re.M
+ )
+ value = True
+ if has_no_command:
+ value = False
+ elif arg in BOOL_PARAMS:
+ value = False
+ if has_command:
+ value = True
+ elif arg == "log_neighbor_changes":
+ value = ""
+ if has_command:
+ value = "enable"
+ elif has_command_val:
+ value = "disable"
+
+ elif arg == "remove_private_as":
+ value = "disable"
+ if has_command:
+ value = "enable"
+ elif has_command_val:
+ value = has_command_val.group("value")
+ elif arg == "bfd":
+ value = "enable" if has_command else "disable"
+
+ elif arg == "peer_type":
+ value = "disable"
+ if has_command_val:
+ value = has_command_val.group("value").replace("-", "_")
+ else:
+ value = ""
+
+ if has_command_val:
+ value = has_command_val.group("value")
+
+ if command in ["timers", "password"]:
+ split_value = value.split()
+ value = ""
+
+ if arg in ["timers_keepalive", "pwd_type"]:
+ value = split_value[0]
+ elif (
+ arg in ["timers_holdtime", "pwd"] and len(split_value) == 2
+ ):
+ value = split_value[1]
+
+ return value
+
+
+def get_existing(module, args, warnings):
+ existing = {}
+ netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
+
+ asn_regex = re.compile(
+ r".*router\sbgp\s(?P<existing_asn>\d+(\.\d+)?).*", re.S
+ )
+ match_asn = asn_regex.match(str(netcfg))
+
+ if match_asn:
+ existing_asn = match_asn.group("existing_asn")
+ parents = ["router bgp {0}".format(existing_asn)]
+
+ if module.params["vrf"] != "default":
+ parents.append("vrf {0}".format(module.params["vrf"]))
+
+ parents.append("neighbor {0}".format(module.params["neighbor"]))
+ config = netcfg.get_section(parents)
+ if config:
+ for arg in args:
+ if arg not in ["asn", "vrf", "neighbor"]:
+ existing[arg] = get_value(arg, config)
+
+ existing["asn"] = existing_asn
+ existing["neighbor"] = module.params["neighbor"]
+ existing["vrf"] = module.params["vrf"]
+ else:
+ warnings.append(
+ "The BGP process didn't exist but the task" " just created it."
+ )
+ return existing
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key in table:
+ new_key = key_map.get(key)
+ if new_key:
+ new_dict[new_key] = table.get(key)
+
+ return new_dict
+
+
+def state_present(module, existing, proposed, candidate):
+ commands = list()
+ proposed_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, proposed)
+ existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
+
+ for key, value in proposed_commands.items():
+ if value is True:
+ commands.append(key)
+ elif value is False:
+ commands.append("no {0}".format(key))
+ elif value == "default":
+ if existing_commands.get(key):
+ if key == "password":
+ commands.append("no password")
+ else:
+ existing_value = existing_commands.get(key)
+ commands.append("no {0} {1}".format(key, existing_value))
+ else:
+ if key == "log-neighbor-changes":
+ if value == "enable":
+ commands.append("{0}".format(key))
+ elif value == "disable":
+ commands.append("{0} {1}".format(key, value))
+ elif value == "inherit":
+ if existing_commands.get(key):
+ commands.append("no {0}".format(key))
+ elif key == "password":
+ pwd_type = module.params["pwd_type"]
+ if pwd_type == "3des":
+ pwd_type = 3
+ else:
+ pwd_type = 7
+ command = "{0} {1} {2}".format(key, pwd_type, value)
+ if command not in commands:
+ commands.append(command)
+ elif key == "remove-private-as":
+ if value == "enable":
+ command = "{0}".format(key)
+ commands.append(command)
+ elif value == "disable":
+ if existing_commands.get(key) != "disable":
+ command = "no {0}".format(key)
+ commands.append(command)
+ else:
+ command = "{0} {1}".format(key, value)
+ commands.append(command)
+ elif key == "timers":
+ if proposed["timers_keepalive"] != PARAM_TO_DEFAULT_KEYMAP.get(
+ "timers_keepalive"
+ ) or proposed[
+ "timers_holdtime"
+ ] != PARAM_TO_DEFAULT_KEYMAP.get(
+ "timers_holdtime"
+ ):
+ command = "timers {0} {1}".format(
+ proposed["timers_keepalive"],
+ proposed["timers_holdtime"],
+ )
+ if command not in commands:
+ commands.append(command)
+ elif key == "bfd":
+ no_cmd = "no " if value == "disable" else ""
+ commands.append(no_cmd + key)
+ elif key == "peer-type":
+ if value == "disable":
+ if existing_commands.get(key) != "disable":
+ command = "no {0}".format(key)
+ commands.append(command)
+ elif value == "fabric_external":
+ ptype = "fabric-external"
+ command = "{0} {1}".format(key, ptype)
+ commands.append(command)
+ elif value == "fabric_border_leaf":
+ ptype = "fabric-border-leaf"
+ command = "{0} {1}".format(key, ptype)
+ commands.append(command)
+ else:
+ command = "{0} {1}".format(key, value)
+ commands.append(command)
+
+ if commands:
+ parents = ["router bgp {0}".format(module.params["asn"])]
+ if module.params["vrf"] != "default":
+ parents.append("vrf {0}".format(module.params["vrf"]))
+
+ parents.append("neighbor {0}".format(module.params["neighbor"]))
+
+ # make sure that local-as is the last command in the list.
+ local_as_command = "local-as {0}".format(module.params["local_as"])
+ if local_as_command in commands:
+ commands.remove(local_as_command)
+ commands.append(local_as_command)
+ candidate.add(commands, parents=parents)
+
+
+def state_absent(module, existing, proposed, candidate):
+ commands = []
+ parents = ["router bgp {0}".format(module.params["asn"])]
+ if module.params["vrf"] != "default":
+ parents.append("vrf {0}".format(module.params["vrf"]))
+
+ commands.append("no neighbor {0}".format(module.params["neighbor"]))
+ candidate.add(commands, parents=parents)
+
+
+def main():
+ argument_spec = dict(
+ asn=dict(required=True, type="str"),
+ vrf=dict(required=False, type="str", default="default"),
+ neighbor=dict(required=True, type="str"),
+ description=dict(required=False, type="str"),
+ bfd=dict(required=False, type="str", choices=["enable", "disable"]),
+ capability_negotiation=dict(required=False, type="bool"),
+ connected_check=dict(required=False, type="bool"),
+ dynamic_capability=dict(required=False, type="bool"),
+ ebgp_multihop=dict(required=False, type="str"),
+ local_as=dict(required=False, type="str"),
+ log_neighbor_changes=dict(
+ required=False,
+ type="str",
+ choices=["enable", "disable", "inherit"],
+ ),
+ low_memory_exempt=dict(required=False, type="bool"),
+ maximum_peers=dict(required=False, type="str"),
+ pwd=dict(required=False, type="str"),
+ pwd_type=dict(
+ required=False,
+ type="str",
+ choices=["3des", "cisco_type_7", "default"],
+ ),
+ remote_as=dict(required=False, type="str"),
+ remove_private_as=dict(
+ required=False,
+ type="str",
+ choices=["enable", "disable", "all", "replace-as"],
+ ),
+ shutdown=dict(required=False, type="bool"),
+ suppress_4_byte_as=dict(required=False, type="bool"),
+ timers_keepalive=dict(required=False, type="str"),
+ timers_holdtime=dict(required=False, type="str"),
+ transport_passive_only=dict(required=False, type="bool"),
+ update_source=dict(required=False, type="str"),
+ state=dict(
+ choices=["present", "absent"], default="present", required=False
+ ),
+ peer_type=dict(
+ required=False,
+ type="str",
+ choices=["disable", "fabric_border_leaf", "fabric_external"],
+ ),
+ )
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_together=[
+ ["timers_holdtime", "timers_keepalive"],
+ ["pwd", "pwd_type"],
+ ],
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ result = dict(changed=False, warnings=warnings)
+
+ state = module.params["state"]
+
+ if module.params["pwd_type"] == "default":
+ module.params["pwd_type"] = "0"
+
+ args = PARAM_TO_COMMAND_KEYMAP.keys()
+ existing = get_existing(module, args, warnings)
+
+ if existing.get("asn") and state == "present":
+ if existing["asn"] != module.params["asn"]:
+ module.fail_json(
+ msg="Another BGP ASN already exists.",
+ proposed_asn=module.params["asn"],
+ existing_asn=existing.get("asn"),
+ )
+
+ proposed_args = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+ proposed = {}
+ for key, value in proposed_args.items():
+ if key not in ["asn", "vrf", "neighbor", "pwd_type"]:
+ if str(value).lower() == "default":
+ value = PARAM_TO_DEFAULT_KEYMAP.get(key, "default")
+ if key == "bfd":
+ if existing.get("bfd", "disable") != value:
+ proposed[key] = value
+ elif existing.get(key) != value:
+ proposed[key] = value
+
+ candidate = CustomNetworkConfig(indent=3)
+ if state == "present":
+ state_present(module, existing, proposed, candidate)
+ elif state == "absent" and existing:
+ state_absent(module, existing, proposed, candidate)
+
+ if candidate:
+ candidate = candidate.items_text()
+ if not module.check_mode:
+ load_config(module, candidate)
+ result["changed"] = True
+ result["commands"] = candidate
+ else:
+ result["commands"] = []
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_neighbor_af.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_neighbor_af.py
new file mode 100644
index 00000000..b5e633b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_bgp_neighbor_af.py
@@ -0,0 +1,815 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_bgp_neighbor_af
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages BGP address-family's neighbors configuration.
+description:
+- Manages BGP address-family's neighbors configurations on NX-OS switches.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- C(state=absent) removes the whole BGP address-family's neighbor configuration.
+- Default, when supported, removes properties
+- In order to default maximum-prefix configuration, only C(max_prefix_limit=default)
+ is needed.
+options:
+ asn:
+ description:
+ - BGP autonomous system number. Valid values are String, Integer in ASPLAIN or
+ ASDOT notation.
+ required: true
+ type: str
+ vrf:
+ description:
+ - Name of the VRF. The name 'default' is a valid VRF representing the global bgp.
+ default: default
+ type: str
+ neighbor:
+ description:
+ - Neighbor Identifier. Valid values are string. Neighbors may use IPv4 or IPv6
+ notation, with or without prefix length.
+ required: true
+ type: str
+ afi:
+ description:
+ - Address Family Identifier.
+ required: true
+ choices:
+ - ipv4
+ - ipv6
+ - vpnv4
+ - vpnv6
+ - l2vpn
+ type: str
+ safi:
+ description:
+ - Sub Address Family Identifier.
+ required: true
+ choices:
+ - unicast
+ - multicast
+ - evpn
+ type: str
+ additional_paths_receive:
+ description:
+ - Valid values are enable for basic command enablement; disable for disabling
+ the command at the neighbor af level (it adds the disable keyword to the basic
+ command); and inherit to remove the command at this level (the command value
+ is inherited from a higher BGP layer).
+ choices:
+ - enable
+ - disable
+ - inherit
+ type: str
+ additional_paths_send:
+ description:
+ - Valid values are enable for basic command enablement; disable for disabling
+ the command at the neighbor af level (it adds the disable keyword to the basic
+ command); and inherit to remove the command at this level (the command value
+ is inherited from a higher BGP layer).
+ choices:
+ - enable
+ - disable
+ - inherit
+ type: str
+ advertise_map_exist:
+ description:
+ - Conditional route advertisement. This property requires two route maps, an advertise-map
+ and an exist-map. Valid values are an array specifying both the advertise-map
+ name and the exist-map name, or simply 'default' e.g. ['my_advertise_map', 'my_exist_map'].
+ This command is mutually exclusive with the advertise_map_non_exist property.
+ type: list
+ elements: str
+ advertise_map_non_exist:
+ description:
+ - Conditional route advertisement. This property requires two route maps, an advertise-map
+ and an exist-map. Valid values are an array specifying both the advertise-map
+ name and the non-exist-map name, or simply 'default' e.g. ['my_advertise_map',
+ 'my_non_exist_map']. This command is mutually exclusive with the advertise_map_exist
+ property.
+ type: list
+ elements: str
+ allowas_in:
+ description:
+ - Activate allowas-in property
+ type: bool
+ allowas_in_max:
+ description:
+ - Max-occurrences value for allowas_in. Valid values are an integer value or 'default'.
+ This is mutually exclusive with allowas_in.
+ type: str
+ as_override:
+ description:
+ - Activate the as-override feature.
+ type: bool
+ default_originate:
+ description:
+ - Activate the default-originate feature.
+ type: bool
+ default_originate_route_map:
+ description:
+ - Route-map for the default_originate property. Valid values are a string defining
+ a route-map name, or 'default'. This is mutually exclusive with default_originate.
+ type: str
+ disable_peer_as_check:
+ description:
+ - Disable checking of peer AS-number while advertising
+ type: bool
+ filter_list_in:
+ description:
+ - Valid values are a string defining a filter-list name, or 'default'.
+ type: str
+ filter_list_out:
+ description:
+ - Valid values are a string defining a filter-list name, or 'default'.
+ type: str
+ max_prefix_limit:
+ description:
+ - maximum-prefix limit value. Valid values are an integer value or 'default'.
+ type: str
+ max_prefix_interval:
+ description:
+ - Optional restart interval. Valid values are an integer. Requires max_prefix_limit.
+ May not be combined with max_prefix_warning.
+ type: str
+ max_prefix_threshold:
+ description:
+ - Optional threshold percentage at which to generate a warning. Valid values are
+ an integer value. Requires max_prefix_limit.
+ type: str
+ max_prefix_warning:
+ description:
+ - Optional warning-only keyword. Requires max_prefix_limit. May not be combined
+ with max_prefix_interval.
+ type: bool
+ next_hop_self:
+ description:
+ - Activate the next-hop-self feature.
+ type: bool
+ next_hop_third_party:
+ description:
+ - Activate the next-hop-third-party feature.
+ type: bool
+ prefix_list_in:
+ description:
+ - Valid values are a string defining a prefix-list name, or 'default'.
+ type: str
+ prefix_list_out:
+ description:
+ - Valid values are a string defining a prefix-list name, or 'default'.
+ type: str
+ route_map_in:
+ description:
+ - Valid values are a string defining a route-map name, or 'default'.
+ type: str
+ route_map_out:
+ description:
+ - Valid values are a string defining a route-map name, or 'default'.
+ type: str
+ route_reflector_client:
+ description:
+ - Router reflector client.
+ type: bool
+ send_community:
+ description:
+ - send-community attribute.
+ choices:
+ - none
+ - both
+ - extended
+ - standard
+ - default
+ type: str
+ soft_reconfiguration_in:
+ description:
+ - Valid values are 'enable' for basic command enablement; 'always' to add the
+ always keyword to the basic command; and 'inherit' to remove the command at
+ this level (the command value is inherited from a higher BGP layer).
+ choices:
+ - enable
+ - always
+ - inherit
+ type: str
+ soo:
+ description:
+ - Site-of-origin. Valid values are a string defining a VPN extcommunity or 'default'.
+ type: str
+ suppress_inactive:
+ description:
+ - suppress-inactive feature.
+ type: bool
+ unsuppress_map:
+ description:
+ - unsuppress-map. Valid values are a string defining a route-map name or 'default'.
+ type: str
+ weight:
+ description:
+ - Weight value. Valid values are an integer value or 'default'.
+ type: str
+ state:
+ description:
+ - Determines whether the config should be present or not on the device.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+ rewrite_evpn_rt_asn:
+ description:
+ - Auto generate route targets for EBGP neighbor.
+ type: bool
+ version_added: 1.1.0
+"""
+EXAMPLES = """
+- name: configure RR client
+ cisco.nxos.nxos_bgp_neighbor_af:
+ asn: 65535
+ neighbor: 192.0.2.3
+ afi: ipv4
+ safi: unicast
+ route_reflector_client: true
+ state: present
+ rewrite_evpn_rt_asn: true
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["router bgp 65535", "neighbor 192.0.2.3",
+ "address-family ipv4 unicast", "route-reflector-client",
+ "rewrite-evpn-rt-asn"]
+"""
+
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+
+BOOL_PARAMS = [
+ "allowas_in",
+ "as_override",
+ "default_originate",
+ "disable_peer_as_check",
+ "next_hop_self",
+ "next_hop_third_party",
+ "route_reflector_client",
+ "suppress_inactive",
+ "rewrite_evpn_rt_asn",
+]
+PARAM_TO_COMMAND_KEYMAP = {
+ "afi": "address-family",
+ "asn": "router bgp",
+ "neighbor": "neighbor",
+ "additional_paths_receive": "capability additional-paths receive",
+ "additional_paths_send": "capability additional-paths send",
+ "advertise_map_exist": "advertise-map exist-map",
+ "advertise_map_non_exist": "advertise-map non-exist-map",
+ "allowas_in": "allowas-in",
+ "allowas_in_max": "allowas-in",
+ "as_override": "as-override",
+ "default_originate": "default-originate",
+ "default_originate_route_map": "default-originate route-map",
+ "disable_peer_as_check": "disable-peer-as-check",
+ "filter_list_in": "filter-list in",
+ "filter_list_out": "filter-list out",
+ "max_prefix_limit": "maximum-prefix",
+ "max_prefix_interval": "maximum-prefix interval",
+ "max_prefix_threshold": "maximum-prefix threshold",
+ "max_prefix_warning": "maximum-prefix warning",
+ "next_hop_self": "next-hop-self",
+ "next_hop_third_party": "next-hop-third-party",
+ "prefix_list_in": "prefix-list in",
+ "prefix_list_out": "prefix-list out",
+ "route_map_in": "route-map in",
+ "route_map_out": "route-map out",
+ "route_reflector_client": "route-reflector-client",
+ "safi": "address-family",
+ "send_community": "send-community",
+ "soft_reconfiguration_in": "soft-reconfiguration inbound",
+ "soo": "soo",
+ "suppress_inactive": "suppress-inactive",
+ "unsuppress_map": "unsuppress-map",
+ "weight": "weight",
+ "vrf": "vrf",
+ "rewrite_evpn_rt_asn": "rewrite-evpn-rt-asn",
+}
+
+
+def get_value(arg, config, module):
+ custom = [
+ "additional_paths_send",
+ "additional_paths_receive",
+ "max_prefix_limit",
+ "max_prefix_interval",
+ "max_prefix_threshold",
+ "max_prefix_warning",
+ "send_community",
+ "soft_reconfiguration_in",
+ ]
+ command = PARAM_TO_COMMAND_KEYMAP[arg]
+ has_command = re.search(r"^\s+{0}\s*".format(command), config, re.M)
+ has_command_val = re.search(
+ r"(?:{0}\s)(?P<value>.*)$".format(command), config, re.M
+ )
+ value = ""
+
+ if arg in custom:
+ value = get_custom_value(arg, config, module)
+
+ elif arg == "next_hop_third_party":
+ has_no_command = re.search(
+ r"^\s+no\s+{0}\s*$".format(command), config, re.M
+ )
+ value = False
+ if not has_no_command:
+ value = True
+
+ elif arg in BOOL_PARAMS:
+ value = False
+ if has_command:
+ value = True
+
+ elif command.startswith("advertise-map"):
+ value = []
+ has_adv_map = re.search(
+ r"{0}\s(?P<value1>.*)\s{1}\s(?P<value2>.*)$".format(
+ *command.split()
+ ),
+ config,
+ re.M,
+ )
+ if has_adv_map:
+ value = list(has_adv_map.groups())
+
+ elif command.split()[0] in ["filter-list", "prefix-list", "route-map"]:
+ has_cmd_direction_val = re.search(
+ r"{0}\s(?P<value>.*)\s{1}$".format(*command.split()), config, re.M
+ )
+ if has_cmd_direction_val:
+ value = has_cmd_direction_val.group("value")
+
+ elif has_command_val:
+ value = has_command_val.group("value")
+
+ return value
+
+
+def get_custom_value(arg, config, module):
+ command = PARAM_TO_COMMAND_KEYMAP.get(arg)
+ splitted_config = config.splitlines()
+ value = ""
+
+ if arg.startswith("additional_paths"):
+ value = "inherit"
+ for line in splitted_config:
+ if command in line:
+ if "disable" in line:
+ value = "disable"
+ else:
+ value = "enable"
+ elif arg.startswith("max_prefix"):
+ for line in splitted_config:
+ if "maximum-prefix" in line:
+ splitted_line = line.split()
+ if arg == "max_prefix_limit":
+ value = splitted_line[1]
+ elif arg == "max_prefix_interval" and "restart" in line:
+ value = splitted_line[-1]
+ elif arg == "max_prefix_threshold" and len(splitted_line) > 2:
+ try:
+ int(splitted_line[2])
+ value = splitted_line[2]
+ except ValueError:
+ value = ""
+ elif arg == "max_prefix_warning":
+ value = "warning-only" in line
+ elif arg == "soft_reconfiguration_in":
+ value = "inherit"
+ for line in splitted_config:
+ if command in line:
+ if "always" in line:
+ value = "always"
+ else:
+ value = "enable"
+
+ elif arg == "send_community":
+ value = "none"
+ for line in splitted_config:
+ if command in line:
+ if "extended" in line:
+ if value == "standard":
+ value = "both"
+ else:
+ value = "extended"
+ elif "both" in line:
+ value = "both"
+ else:
+ value = "standard"
+
+ return value
+
+
+def get_existing(module, args, warnings):
+ existing = {}
+ netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
+
+ asn_regex = re.compile(
+ r".*router\sbgp\s(?P<existing_asn>\d+(\.\d+)?).*", re.S
+ )
+ match_asn = asn_regex.match(str(netcfg))
+
+ if match_asn:
+ existing_asn = match_asn.group("existing_asn")
+ parents = ["router bgp {0}".format(existing_asn)]
+
+ if module.params["vrf"] != "default":
+ parents.append("vrf {0}".format(module.params["vrf"]))
+
+ parents.append("neighbor {0}".format(module.params["neighbor"]))
+ parents.append(
+ "address-family {0} {1}".format(
+ module.params["afi"], module.params["safi"]
+ )
+ )
+ config = netcfg.get_section(parents)
+
+ if config:
+ for arg in args:
+ if arg not in ["asn", "vrf", "neighbor", "afi", "safi"]:
+ existing[arg] = get_value(arg, config, module)
+
+ existing["asn"] = existing_asn
+ existing["neighbor"] = module.params["neighbor"]
+ existing["vrf"] = module.params["vrf"]
+ existing["afi"] = module.params["afi"]
+ existing["safi"] = module.params["safi"]
+ else:
+ warnings.append(
+ "The BGP process didn't exist but the task just created it."
+ )
+
+ return existing
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key in table:
+ new_key = key_map.get(key)
+ if new_key:
+ new_dict[new_key] = table.get(key)
+
+ return new_dict
+
+
+def get_default_command(key, value, existing_commands):
+ command = ""
+ if existing_commands.get(key):
+ existing_value = existing_commands.get(key)
+ if value == "inherit":
+ if existing_value != "inherit":
+ command = "no {0}".format(key)
+ else:
+ if key == "advertise-map exist-map":
+ command = "no advertise-map {0} exist-map {1}".format(
+ existing_value[0], existing_value[1]
+ )
+ elif key == "advertise-map non-exist-map":
+ command = "no advertise-map {0} non-exist-map {1}".format(
+ existing_value[0], existing_value[1]
+ )
+ elif key == "filter-list in":
+ command = "no filter-list {0} in".format(existing_value)
+ elif key == "filter-list out":
+ command = "no filter-list {0} out".format(existing_value)
+ elif key == "prefix-list in":
+ command = "no prefix-list {0} in".format(existing_value)
+ elif key == "prefix-list out":
+ command = "no prefix-list {0} out".format(existing_value)
+ elif key == "route-map in":
+ command = "no route-map {0} in".format(existing_value)
+ elif key == "route-map out":
+ command = "no route-map {0} out".format(existing_value)
+ elif key.startswith("maximum-prefix"):
+ command = "no maximum-prefix"
+ elif key == "allowas-in max":
+ command = ["no allowas-in {0}".format(existing_value)]
+ command.append("allowas-in")
+ else:
+ command = "no {0} {1}".format(key, existing_value)
+ else:
+ if key.replace(" ", "_").replace("-", "_") in BOOL_PARAMS:
+ command = "no {0}".format(key)
+ return command
+
+
+def fix_proposed(module, existing, proposed):
+ allowas_in = proposed.get("allowas_in")
+ allowas_in_max = proposed.get("allowas_in_max")
+
+ if allowas_in_max and not allowas_in:
+ proposed.pop("allowas_in_max")
+ elif allowas_in and allowas_in_max:
+ proposed.pop("allowas_in")
+
+ if (
+ existing.get("send_community") == "none"
+ and proposed.get("send_community") == "default"
+ ):
+ proposed.pop("send_community")
+ return proposed
+
+
+def state_present(module, existing, proposed, candidate):
+ commands = list()
+ proposed = fix_proposed(module, existing, proposed)
+
+ proposed_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, proposed)
+ existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
+ for key, value in proposed_commands.items():
+ if value in ["inherit", "default"]:
+ command = get_default_command(key, value, existing_commands)
+
+ if isinstance(command, str):
+ if command and command not in commands:
+ commands.append(command)
+ elif isinstance(command, list):
+ for cmd in command:
+ if cmd not in commands:
+ commands.append(cmd)
+
+ elif key.startswith("maximum-prefix"):
+ if module.params["max_prefix_limit"] != "default":
+ command = "maximum-prefix {0}".format(
+ module.params["max_prefix_limit"]
+ )
+ if module.params["max_prefix_threshold"]:
+ command += " {0}".format(
+ module.params["max_prefix_threshold"]
+ )
+ if module.params["max_prefix_interval"]:
+ command += " restart {0}".format(
+ module.params["max_prefix_interval"]
+ )
+ elif module.params["max_prefix_warning"]:
+ command += " warning-only"
+ commands.append(command)
+
+ elif value is True:
+ commands.append(key)
+ elif value is False:
+ commands.append("no {0}".format(key))
+ elif key == "address-family":
+ commands.append(
+ "address-family {0} {1}".format(
+ module.params["afi"], module.params["safi"]
+ )
+ )
+ elif key.startswith("capability additional-paths"):
+ command = key
+ if value == "disable":
+ command += " disable"
+ commands.append(command)
+ elif key.startswith("advertise-map"):
+ direction = key.split()[1]
+ commands.append(
+ "advertise-map {1} {0} {2}".format(direction, *value)
+ )
+ elif key.split()[0] in ["filter-list", "prefix-list", "route-map"]:
+ commands.append("{1} {0} {2}".format(value, *key.split()))
+
+ elif key == "soft-reconfiguration inbound":
+ command = ""
+ if value == "enable":
+ command = key
+ elif value == "always":
+ command = "{0} {1}".format(key, value)
+ commands.append(command)
+ elif key == "send-community":
+ command = key
+ if value in ["standard", "extended"]:
+ commands.append("no " + key + " both")
+ command += " {0}".format(value)
+ commands.append(command)
+ else:
+ command = "{0} {1}".format(key, value)
+ commands.append(command)
+
+ if commands:
+ parents = ["router bgp {0}".format(module.params["asn"])]
+ if module.params["vrf"] != "default":
+ parents.append("vrf {0}".format(module.params["vrf"]))
+
+ parents.append("neighbor {0}".format(module.params["neighbor"]))
+
+ af_command = "address-family {0} {1}".format(
+ module.params["afi"], module.params["safi"]
+ )
+ parents.append(af_command)
+ if af_command in commands:
+ commands.remove(af_command)
+ candidate.add(commands, parents=parents)
+
+
+def state_absent(module, existing, candidate):
+ commands = []
+ parents = ["router bgp {0}".format(module.params["asn"])]
+ if module.params["vrf"] != "default":
+ parents.append("vrf {0}".format(module.params["vrf"]))
+
+ parents.append("neighbor {0}".format(module.params["neighbor"]))
+ commands.append(
+ "no address-family {0} {1}".format(
+ module.params["afi"], module.params["safi"]
+ )
+ )
+ candidate.add(commands, parents=parents)
+
+
+def main():
+ argument_spec = dict(
+ asn=dict(required=True, type="str"),
+ vrf=dict(required=False, type="str", default="default"),
+ neighbor=dict(required=True, type="str"),
+ afi=dict(
+ required=True,
+ type="str",
+ choices=["ipv4", "ipv6", "vpnv4", "vpnv6", "l2vpn"],
+ ),
+ safi=dict(
+ required=True, type="str", choices=["unicast", "multicast", "evpn"]
+ ),
+ additional_paths_receive=dict(
+ required=False,
+ type="str",
+ choices=["enable", "disable", "inherit"],
+ ),
+ additional_paths_send=dict(
+ required=False,
+ type="str",
+ choices=["enable", "disable", "inherit"],
+ ),
+ advertise_map_exist=dict(required=False, type="list", elements="str"),
+ advertise_map_non_exist=dict(
+ required=False, type="list", elements="str"
+ ),
+ allowas_in=dict(required=False, type="bool"),
+ allowas_in_max=dict(required=False, type="str"),
+ as_override=dict(required=False, type="bool"),
+ default_originate=dict(required=False, type="bool"),
+ default_originate_route_map=dict(required=False, type="str"),
+ disable_peer_as_check=dict(required=False, type="bool"),
+ filter_list_in=dict(required=False, type="str"),
+ filter_list_out=dict(required=False, type="str"),
+ max_prefix_limit=dict(required=False, type="str"),
+ max_prefix_interval=dict(required=False, type="str"),
+ max_prefix_threshold=dict(required=False, type="str"),
+ max_prefix_warning=dict(required=False, type="bool"),
+ next_hop_self=dict(required=False, type="bool"),
+ next_hop_third_party=dict(required=False, type="bool"),
+ prefix_list_in=dict(required=False, type="str"),
+ prefix_list_out=dict(required=False, type="str"),
+ route_map_in=dict(required=False, type="str"),
+ route_map_out=dict(required=False, type="str"),
+ route_reflector_client=dict(required=False, type="bool"),
+ send_community=dict(
+ required=False,
+ choices=["none", "both", "extended", "standard", "default"],
+ ),
+ soft_reconfiguration_in=dict(
+ required=False, type="str", choices=["enable", "always", "inherit"]
+ ),
+ soo=dict(required=False, type="str"),
+ suppress_inactive=dict(required=False, type="bool"),
+ unsuppress_map=dict(required=False, type="str"),
+ weight=dict(required=False, type="str"),
+ state=dict(
+ choices=["present", "absent"], default="present", required=False
+ ),
+ rewrite_evpn_rt_asn=dict(required=False, type="bool"),
+ )
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=[
+ ["advertise_map_exist", "advertise_map_non_exist"],
+ ["max_prefix_interval", "max_prefix_warning"],
+ ["default_originate", "default_originate_route_map"],
+ ["allowas_in", "allowas_in_max"],
+ ],
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ result = dict(changed=False, warnings=warnings)
+
+ state = module.params["state"]
+ for key in [
+ "max_prefix_interval",
+ "max_prefix_warning",
+ "max_prefix_threshold",
+ ]:
+ if module.params[key] and not module.params["max_prefix_limit"]:
+ module.fail_json(
+ msg="max_prefix_limit is required when using %s" % key
+ )
+ if module.params["vrf"] == "default" and module.params["soo"]:
+ module.fail_json(msg="SOO is only allowed in non-default VRF")
+
+ args = PARAM_TO_COMMAND_KEYMAP.keys()
+ existing = get_existing(module, args, warnings)
+
+ if existing.get("asn") and state == "present":
+ if existing.get("asn") != module.params["asn"]:
+ module.fail_json(
+ msg="Another BGP ASN already exists.",
+ proposed_asn=module.params["asn"],
+ existing_asn=existing.get("asn"),
+ )
+
+ for param in ["advertise_map_exist", "advertise_map_non_exist"]:
+ if module.params[param] == ["default"]:
+ module.params[param] = "default"
+
+ proposed_args = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+
+ proposed = {}
+ for key, value in proposed_args.items():
+ if key not in ["asn", "vrf", "neighbor"]:
+ if not isinstance(value, list):
+ if str(value).lower() == "true":
+ value = True
+ elif str(value).lower() == "false":
+ value = False
+ elif str(value).lower() == "default":
+ if key in BOOL_PARAMS:
+ value = False
+ else:
+ value = "default"
+ elif key == "send_community" and str(value).lower() == "none":
+ value = "default"
+ if existing.get(key) != value:
+ proposed[key] = value
+
+ candidate = CustomNetworkConfig(indent=3)
+ if state == "present":
+ state_present(module, existing, proposed, candidate)
+ elif state == "absent" and existing:
+ state_absent(module, existing, candidate)
+
+ if candidate:
+ candidate = candidate.items_text()
+ if not module.check_mode:
+ responses = load_config(module, candidate)
+ if responses:
+ for resp in responses:
+ if resp:
+ if resp.endswith("is valid only for EBGP peers"):
+ module.fail_json(msg=resp)
+ result["changed"] = True
+ result["commands"] = candidate
+ else:
+ result["commands"] = []
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_command.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_command.py
new file mode 100644
index 00000000..c90133f5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_command.py
@@ -0,0 +1,235 @@
+#!/usr/bin/python
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_command
+extends_documentation_fragment:
+- cisco.nxos.nxos
+author: Peter Sprygada (@privateip)
+short_description: Run arbitrary command on Cisco NXOS devices
+description:
+- Sends an arbitrary command to an NXOS node and returns the results read from the
+ device. This module includes an argument that will cause the module to wait for
+ a specific condition before returning or timing out if the condition is not met.
+version_added: 1.0.0
+options:
+ commands:
+ description:
+ - The commands to send to the remote NXOS device. The resulting output from the
+ command is returned. If the I(wait_for) argument is provided, the module is
+ not returned until the condition is satisfied or the number of retires as expired.
+ - The I(commands) argument also accepts an alternative form that allows for complex
+ values that specify the command to run and the output format to return. This
+ can be done on a command by command basis. The complex argument supports the
+ keywords C(command) and C(output) where C(command) is the command to run and
+ C(output) is one of 'text' or 'json'.
+ - If a command sent to the device requires answering a prompt, it is possible to pass
+ a dict containing command, answer and prompt. Common answers are 'y' or "\\r"
+ (carriage return, must be double quotes). See examples.
+ required: true
+ type: list
+ elements: raw
+ wait_for:
+ description:
+ - Specifies what to evaluate from the output of the command and what conditionals
+ to apply. This argument will cause the task to wait for a particular conditional
+ to be true before moving forward. If the conditional is not true by the configured
+ retries, the task fails. See examples.
+ aliases:
+ - waitfor
+ type: list
+ elements: str
+ match:
+ description:
+ - The I(match) argument is used in conjunction with the I(wait_for) argument to
+ specify the match policy. Valid values are C(all) or C(any). If the value
+ is set to C(all) then all conditionals in the I(wait_for) must be satisfied. If
+ the value is set to C(any) then only one of the values must be satisfied.
+ default: all
+ choices: ['any', 'all']
+ type: str
+ retries:
+ description:
+ - Specifies the number of retries a command should by tried before it is considered
+ failed. The command is run on the target device every retry and evaluated against
+ the I(wait_for) conditionals.
+ default: 10
+ type: int
+ interval:
+ description:
+ - Configures the interval in seconds to wait between retries of the command. If
+ the command does not pass the specified conditional, the interval indicates
+ how to long to wait before trying the command again.
+ default: 1
+ type: int
+"""
+
+EXAMPLES = """
+- name: run show version on remote devices
+ cisco.nxos.nxos_command:
+ commands: show version
+
+- name: run show version and check to see if output contains Cisco
+ cisco.nxos.nxos_command:
+ commands: show version
+ wait_for: result[0] contains Cisco
+
+- name: run multiple commands on remote nodes
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interfaces
+
+- name: run multiple commands and evaluate the output
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interfaces
+ wait_for:
+ - result[0] contains Cisco
+ - result[1] contains loopback0
+
+- name: run commands and specify the output format
+ cisco.nxos.nxos_command:
+ commands:
+ - command: show version
+ output: json
+
+- name: run commands that require answering a prompt
+ cisco.nxos.nxos_command:
+ commands:
+ - configure terminal
+ - command: no feature npv
+ prompt: Do you want to continue
+ answer: y
+
+"""
+
+RETURN = """
+stdout:
+ description: The set of responses from the commands
+ returned: always apart from low level errors (such as action plugin)
+ type: list
+ sample: ['...', '...']
+stdout_lines:
+ description: The value of stdout split into a list
+ returned: always apart from low level errors (such as action plugin)
+ type: list
+ sample: [['...', '...'], ['...'], ['...']]
+failed_conditions:
+ description: The list of conditionals that have failed
+ returned: failed
+ type: list
+ sample: ['...', '...']
+"""
+import time
+
+from ansible.module_utils._text import to_text
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.parsing import (
+ Conditional,
+ FailedConditionalError,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ transform_commands,
+ to_lines,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+ run_commands,
+)
+
+
+def parse_commands(module, warnings):
+ commands = transform_commands(module)
+
+ if module.check_mode:
+ for item in list(commands):
+ if not item["command"].startswith("show"):
+ warnings.append(
+ "Only show commands are supported when using check mode, not "
+ "executing %s" % item["command"]
+ )
+ commands.remove(item)
+
+ return commands
+
+
+def to_cli(obj):
+ cmd = obj["command"]
+ if obj.get("output") == "json":
+ cmd += " | json"
+ return cmd
+
+
+def main():
+ """entry point for module execution
+ """
+ argument_spec = dict(
+ # { command: <str>, output: <str>, prompt: <str>, response: <str> }
+ commands=dict(type="list", required=True, elements="raw"),
+ wait_for=dict(type="list", aliases=["waitfor"], elements="str"),
+ match=dict(default="all", choices=["any", "all"]),
+ retries=dict(default=10, type="int"),
+ interval=dict(default=1, type="int"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ result = {"changed": False, "warnings": warnings}
+ commands = parse_commands(module, warnings)
+ wait_for = module.params["wait_for"] or list()
+
+ try:
+ conditionals = [Conditional(c) for c in wait_for]
+ except AttributeError as exc:
+ module.fail_json(msg=to_text(exc))
+
+ retries = module.params["retries"]
+ interval = module.params["interval"]
+ match = module.params["match"]
+
+ while retries > 0:
+ responses = run_commands(module, commands)
+
+ for item in list(conditionals):
+ try:
+ if item(responses):
+ if match == "any":
+ conditionals = list()
+ break
+ conditionals.remove(item)
+ except FailedConditionalError as exc:
+ module.fail_json(msg=to_text(exc))
+
+ if not conditionals:
+ break
+
+ time.sleep(interval)
+ retries -= 1
+
+ if conditionals:
+ failed_conditions = [item.raw for item in conditionals]
+ msg = "One or more conditional statements have not been satisfied"
+ module.fail_json(msg=msg, failed_conditions=failed_conditions)
+
+ result.update(
+ {"stdout": responses, "stdout_lines": list(to_lines(responses))}
+ )
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_config.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_config.py
new file mode 100644
index 00000000..586ebeec
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_config.py
@@ -0,0 +1,598 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_config
+extends_documentation_fragment:
+- cisco.nxos.nxos
+author: Peter Sprygada (@privateip)
+short_description: Manage Cisco NXOS configuration sections
+description:
+- Cisco NXOS configurations use a simple block indent file syntax for segmenting configuration
+ into sections. This module provides an implementation for working with NXOS configuration
+ sections in a deterministic way. This module works with either CLI or NXAPI transports.
+version_added: 1.0.0
+options:
+ lines:
+ description:
+ - The ordered set of commands that should be configured in the section. The commands
+ must be the exact same commands as found in the device running-config to ensure idempotency
+ and correct diff. Be sure to note the configuration command syntax as some commands are
+ automatically modified by the device config parser.
+ type: list
+ aliases:
+ - commands
+ elements: str
+ parents:
+ description:
+ - 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.
+ type: list
+ elements: str
+ src:
+ description:
+ - The I(src) argument provides a path to the configuration file to load into the
+ remote system. The path can either be a full system path to the configuration
+ file if the value starts with / or relative to the root of the implemented role
+ or playbook. This argument is mutually exclusive with the I(lines) and I(parents)
+ arguments. The configuration lines in the source file should be similar to how it
+ will appear if present in the running-configuration of the device including indentation
+ to ensure idempotency and correct diff.
+ type: path
+ replace_src:
+ description:
+ - The I(replace_src) argument provides path to the configuration file to load
+ into the remote system. This argument is used to replace the entire config with
+ a flat-file. This is used with argument I(replace) with value I(config). This
+ is mutually exclusive with the I(lines) and I(src) arguments. This argument
+ will only work for NX-OS versions that support `config replace`. Use I(nxos_file_copy)
+ module to copy the flat file to remote device and then use the path with this argument.
+ The configuration lines in the file should be similar to how it
+ will appear if present in the running-configuration of the device including the indentation
+ to ensure idempotency and correct diff.
+ type: str
+ before:
+ description:
+ - The ordered set of commands to push on to the command stack if a change needs
+ to be made. This allows the playbook designer the opportunity to perform configuration
+ commands prior to pushing any changes without affecting how the set of commands
+ are matched against the system.
+ type: list
+ elements: str
+ after:
+ description:
+ - The ordered set of commands to append to the end of the command stack if a change
+ needs to be made. Just like with I(before) this allows the playbook designer
+ to append a set of commands to be executed after the command set.
+ type: list
+ elements: str
+ match:
+ description:
+ - Instructs the module on the way to perform the matching of the set of commands
+ against the current device config. If match is set to I(line), commands are
+ matched line by line. If match is set to I(strict), command lines are matched
+ with respect to position. If match is set to I(exact), command lines must be
+ an equal match. Finally, if match is set to I(none), the module will not attempt
+ to compare the source configuration with the running configuration on the remote
+ device.
+ default: line
+ choices:
+ - line
+ - strict
+ - exact
+ - none
+ type: str
+ replace:
+ description:
+ - Instructs the module on the way to perform the configuration on the device. If
+ the replace argument is set to I(line) then the modified lines are pushed to
+ the device in configuration mode. If the replace argument is set to I(block)
+ then the entire command block is pushed to the device in configuration mode
+ if any line is not correct. replace I(config) will only work for NX-OS versions
+ that support `config replace`.
+ default: line
+ choices:
+ - line
+ - block
+ - config
+ type: str
+ backup:
+ description:
+ - This argument will cause the module to create a full backup of the current C(running-config)
+ from the remote device before any changes are made. If the C(backup_options)
+ value is not given, the backup file is written to the C(backup) folder in the
+ playbook root directory or role root directory, if playbook is part of an ansible
+ role. If the directory does not exist, it is created.
+ type: bool
+ default: no
+ running_config:
+ description:
+ - The module, by default, will connect to the remote device and retrieve the current
+ running-config to use as a base for comparing against the contents of source. There
+ are times when it is not desirable to have the task get the current running-config
+ for every task in a playbook. The I(running_config) argument allows the implementer
+ to pass in the configuration to use as the base config for comparison.
+ The configuration lines for this option should be similar to how it will appear if present
+ in the running-configuration of the device including the indentation to ensure idempotency
+ and correct diff.
+ aliases:
+ - config
+ type: str
+ defaults:
+ description:
+ - The I(defaults) argument will influence how the running-config is collected
+ from the device. When the value is set to true, the command used to collect
+ the running-config is append with the all keyword. When the value is set to
+ false, the command is issued without the all keyword
+ type: bool
+ default: no
+ save_when:
+ description:
+ - When changes are made to the device running-configuration, the changes are not
+ copied to non-volatile storage by default. Using this argument will change
+ that before. If the argument is set to I(always), then the running-config will
+ always be copied to the startup-config and the I(modified) flag will always
+ be set to True. If the argument is set to I(modified), then the running-config
+ will only be copied to the startup-config if it has changed since the last save
+ to startup-config. If the argument is set to I(never), the running-config will
+ never be copied to the startup-config. If the argument is set to I(changed),
+ then the running-config will only be copied to the startup-config if the task
+ has made a change. I(changed) was added in Ansible 2.6.
+ default: never
+ choices:
+ - always
+ - never
+ - modified
+ - changed
+ type: str
+ diff_against:
+ description:
+ - When using the C(ansible-playbook --diff) command line argument the module can
+ generate diffs against different sources.
+ - When this option is configure as I(startup), the module will return the diff
+ of the running-config against the startup-config.
+ - When this option is configured as I(intended), the module will return the diff
+ of the running-config against the configuration provided in the C(intended_config)
+ argument.
+ - When this option is configured as I(running), the module will return the before
+ and after diff of the running-config with respect to any changes made to the
+ device configuration.
+ choices:
+ - startup
+ - intended
+ - running
+ type: str
+ diff_ignore_lines:
+ description:
+ - Use this argument to specify one or more lines that should be ignored during
+ the diff. This is used for lines in the configuration that are automatically
+ updated by the system. This argument takes a list of regular expressions or
+ exact line matches.
+ type: list
+ elements: str
+ intended_config:
+ description:
+ - The C(intended_config) provides the master configuration that the node should
+ conform to and is used to check the final running-config against. This argument
+ will not modify any settings on the remote device and is strictly used to check
+ the compliance of the current device's configuration against. When specifying
+ this argument, the task should also modify the C(diff_against) value and set
+ it to I(intended). The configuration lines for this value should be similar to how it
+ will appear if present in the running-configuration of the device including the indentation
+ to ensure correct diff.
+ type: str
+ backup_options:
+ description:
+ - This is a dict object containing configurable options related to backup file
+ path. The value of this option is read only when C(backup) is set to I(True),
+ if C(backup) is set to I(false) this option will be silently ignored.
+ suboptions:
+ filename:
+ description:
+ - The filename to be used to store the backup configuration. If the filename
+ is not given it will be generated based on the hostname, current time and
+ date in format defined by <hostname>_config.<current-date>@<current-time>
+ type: str
+ dir_path:
+ description:
+ - This option provides the path ending with directory name in which the backup
+ configuration file will be stored. If the directory does not exist it will
+ be created and the filename is either the value of C(filename) or default
+ filename as described in C(filename) options description. If the path value
+ is not given in that case a I(backup) directory will be created in the current
+ working directory and backup configuration will be copied in C(filename)
+ within I(backup) directory.
+ type: path
+ type: dict
+notes:
+- Abbreviated commands are NOT idempotent, see
+ L(Network FAQ,../network/user_guide/faq.html#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands).
+- To ensure idempotency and correct diff the configuration lines in the relevant module options should be similar to how they
+ appear if present in the running configuration on device including the indentation.
+"""
+
+EXAMPLES = """
+- name: configure top level configuration and save it
+ cisco.nxos.nxos_config:
+ lines: hostname {{ inventory_hostname }}
+ save_when: modified
+
+- name: diff the running-config against a provided config
+ cisco.nxos.nxos_config:
+ diff_against: intended
+ intended_config: "{{ lookup('file', 'master.cfg') }}"
+
+- cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ - 50 permit ip 192.0.2.5/32 any log
+ parents: ip access-list test
+ before: no ip access-list test
+ match: exact
+
+- cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ before: no ip access-list test
+ replace: block
+
+- name: replace config with flat file
+ cisco.nxos.nxos_config:
+ replace_src: config.txt
+ replace: config
+
+- name: for idempotency, use full-form commands
+ cisco.nxos.nxos_config:
+ lines:
+ # - shut
+ - shutdown
+ # parents: int eth1/1
+ parents: interface Ethernet1/1
+
+- name: configurable backup path
+ cisco.nxos.nxos_config:
+ backup: yes
+ backup_options:
+ filename: backup.cfg
+ dir_path: /home/user
+"""
+
+RETURN = """
+commands:
+ description: The set of commands that will be pushed to the remote device
+ returned: always
+ type: list
+ sample: ['hostname foo', 'vlan 1', 'name default']
+updates:
+ description: The set of commands that will be pushed to the remote device
+ returned: always
+ type: list
+ sample: ['hostname foo', 'vlan 1', 'name default']
+backup_path:
+ description: The full path to the backup file
+ returned: when backup is yes
+ type: str
+ sample: /playbooks/ansible/backup/nxos_config.2016-07-16@22:28:34
+filename:
+ description: The name of the backup file
+ returned: when backup is yes and filename is not specified in backup options
+ type: str
+ sample: nxos_config.2016-07-16@22:28:34
+shortname:
+ description: The full path to the backup file excluding the timestamp
+ returned: when backup is yes and filename is not specified in backup options
+ type: str
+ sample: /playbooks/ansible/backup/nxos_config
+date:
+ description: The date extracted from the backup file name
+ returned: when backup is yes
+ type: str
+ sample: "2016-07-16"
+time:
+ description: The time extracted from the backup file name
+ returned: when backup is yes
+ type: str
+ sample: "22:28:34"
+"""
+from ansible.module_utils._text import to_text
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.connection import ConnectionError
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+ dumps,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+ run_commands,
+ get_connection,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ to_list,
+)
+
+
+def get_running_config(module, config=None, flags=None):
+ contents = module.params["running_config"]
+ if not contents:
+ if config:
+ contents = config
+ else:
+ contents = get_config(module, flags=flags)
+ return contents
+
+
+def get_candidate(module):
+ candidate = ""
+ if module.params["src"]:
+ if module.params["replace"] != "config":
+ candidate = module.params["src"]
+ if module.params["replace"] == "config":
+ candidate = "config replace {0}".format(module.params["replace_src"])
+ elif module.params["lines"]:
+ candidate_obj = NetworkConfig(indent=2)
+ parents = module.params["parents"] or list()
+ candidate_obj.add(module.params["lines"], parents=parents)
+ candidate = dumps(candidate_obj, "raw")
+ return candidate
+
+
+def execute_show_commands(module, commands, output="text"):
+ cmds = []
+ for command in to_list(commands):
+ cmd = {"command": command, "output": output}
+ cmds.append(cmd)
+ body = run_commands(module, cmds)
+ return body
+
+
+def save_config(module, result):
+ result["changed"] = True
+ if not module.check_mode:
+ cmd = {
+ "command": "copy running-config startup-config",
+ "output": "text",
+ }
+ run_commands(module, [cmd])
+ else:
+ module.warn(
+ "Skipping command `copy running-config startup-config` "
+ "due to check_mode. Configuration not copied to "
+ "non-volatile storage"
+ )
+
+
+def main():
+ """ main entry point for module execution
+ """
+ backup_spec = dict(filename=dict(), dir_path=dict(type="path"))
+ argument_spec = dict(
+ src=dict(type="path"),
+ replace_src=dict(),
+ lines=dict(aliases=["commands"], type="list", elements="str"),
+ parents=dict(type="list", elements="str"),
+ before=dict(type="list", elements="str"),
+ after=dict(type="list", elements="str"),
+ match=dict(
+ default="line", choices=["line", "strict", "exact", "none"]
+ ),
+ replace=dict(default="line", choices=["line", "block", "config"]),
+ running_config=dict(aliases=["config"]),
+ intended_config=dict(),
+ defaults=dict(type="bool", default=False),
+ backup=dict(type="bool", default=False),
+ backup_options=dict(type="dict", options=backup_spec),
+ save_when=dict(
+ choices=["always", "never", "modified", "changed"], default="never"
+ ),
+ diff_against=dict(choices=["running", "startup", "intended"]),
+ diff_ignore_lines=dict(type="list", elements="str"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ mutually_exclusive = [("lines", "src", "replace_src"), ("parents", "src")]
+
+ required_if = [
+ ("match", "strict", ["lines"]),
+ ("match", "exact", ["lines"]),
+ ("replace", "block", ["lines"]),
+ ("replace", "config", ["replace_src"]),
+ ("diff_against", "intended", ["intended_config"]),
+ ]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+
+ result = {"changed": False, "warnings": warnings}
+
+ config = None
+
+ diff_ignore_lines = module.params["diff_ignore_lines"]
+ path = module.params["parents"]
+ connection = get_connection(module)
+ contents = None
+ flags = ["all"] if module.params["defaults"] else []
+ replace_src = module.params["replace_src"]
+ if replace_src:
+ if module.params["replace"] != "config":
+ module.fail_json(
+ msg="replace: config is required with replace_src"
+ )
+
+ if module.params["backup"] or (
+ module._diff and module.params["diff_against"] == "running"
+ ):
+ contents = get_config(module, flags=flags)
+ config = NetworkConfig(indent=2, contents=contents)
+ if module.params["backup"]:
+ result["__backup__"] = contents
+
+ if any((module.params["src"], module.params["lines"], replace_src)):
+ msg = (
+ "To ensure idempotency and correct diff the input configuration lines should be"
+ " similar to how they appear if present in the running configuration on device"
+ )
+ if module.params["src"] or replace_src:
+ msg += " including the indentation"
+ warnings.append(msg)
+ match = module.params["match"]
+ replace = module.params["replace"]
+
+ commit = not module.check_mode
+ candidate = get_candidate(module)
+ running = get_running_config(module, contents, flags=flags)
+ if replace_src:
+ commands = candidate.split("\n")
+ result["commands"] = result["updates"] = commands
+ if commit:
+ load_config(module, commands, replace=replace_src)
+
+ result["changed"] = True
+ else:
+ try:
+ response = connection.get_diff(
+ candidate=candidate,
+ running=running,
+ diff_match=match,
+ diff_ignore_lines=diff_ignore_lines,
+ path=path,
+ diff_replace=replace,
+ )
+ except ConnectionError as exc:
+ module.fail_json(
+ msg=to_text(exc, errors="surrogate_then_replace")
+ )
+
+ config_diff = response["config_diff"]
+ if config_diff:
+ commands = config_diff.split("\n")
+
+ if module.params["before"]:
+ commands[:0] = module.params["before"]
+
+ if module.params["after"]:
+ commands.extend(module.params["after"])
+
+ result["commands"] = commands
+ result["updates"] = commands
+
+ if commit:
+ load_config(module, commands, replace=replace_src)
+
+ result["changed"] = True
+
+ running_config = module.params["running_config"]
+ startup_config = None
+
+ if module.params["save_when"] == "always":
+ save_config(module, result)
+ elif module.params["save_when"] == "modified":
+ output = execute_show_commands(
+ module, ["show running-config", "show startup-config"]
+ )
+
+ running_config = NetworkConfig(
+ indent=2, contents=output[0], ignore_lines=diff_ignore_lines
+ )
+ startup_config = NetworkConfig(
+ indent=2, contents=output[1], ignore_lines=diff_ignore_lines
+ )
+
+ if running_config.sha1 != startup_config.sha1:
+ save_config(module, result)
+ elif module.params["save_when"] == "changed" and result["changed"]:
+ save_config(module, result)
+
+ if module._diff:
+ if not running_config:
+ output = execute_show_commands(module, "show running-config")
+ contents = output[0]
+ else:
+ contents = running_config
+
+ # recreate the object in order to process diff_ignore_lines
+ running_config = NetworkConfig(
+ indent=2, contents=contents, ignore_lines=diff_ignore_lines
+ )
+
+ if module.params["diff_against"] == "running":
+ if module.check_mode:
+ module.warn(
+ "unable to perform diff against running-config due to check mode"
+ )
+ contents = None
+ else:
+ contents = config.config_text
+
+ elif module.params["diff_against"] == "startup":
+ if not startup_config:
+ output = execute_show_commands(module, "show startup-config")
+ contents = output[0]
+ else:
+ contents = startup_config.config_text
+
+ elif module.params["diff_against"] == "intended":
+ contents = module.params["intended_config"]
+
+ if contents is not None:
+ base_config = NetworkConfig(
+ indent=2, contents=contents, ignore_lines=diff_ignore_lines
+ )
+
+ if running_config.sha1 != base_config.sha1:
+ if module.params["diff_against"] == "intended":
+ before = running_config
+ after = base_config
+ elif module.params["diff_against"] in ("startup", "running"):
+ before = base_config
+ after = running_config
+
+ result.update(
+ {
+ "changed": True,
+ "diff": {"before": str(before), "after": str(after)},
+ }
+ )
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_devicealias.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_devicealias.py
new file mode 100644
index 00000000..30edfc75
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_devicealias.py
@@ -0,0 +1,593 @@
+#!/usr/bin/python
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or
+# https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+
+DOCUMENTATION = """
+module: nxos_devicealias
+short_description: Configuration of device alias for Cisco NXOS MDS Switches.
+description:
+- Configuration of device alias for Cisco MDS NXOS.
+version_added: 1.0.0
+author:
+- Suhas Bharadwaj (@srbharadwaj) (subharad@cisco.com)
+notes:
+- Tested against NX-OS 8.4(1)
+options:
+ distribute:
+ description:
+ - Enable/Disable device-alias distribution
+ type: bool
+ mode:
+ description:
+ - Mode of devices-alias, basic or enhanced
+ choices:
+ - basic
+ - enhanced
+ type: str
+ da:
+ description:
+ - List of device-alias to be added or removed
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name of the device-alias to be added or removed
+ required: true
+ type: str
+ pwwn:
+ description:
+ - pwwn to which the name needs to be associated with
+ type: str
+ remove:
+ description:
+ - Removes the device-alias if set to True
+ type: bool
+ default: false
+ rename:
+ description:
+ - List of device-alias to be renamed
+ type: list
+ elements: dict
+ suboptions:
+ old_name:
+ description:
+ - Old name of the device-alias that needs to be renamed
+ required: true
+ type: str
+ new_name:
+ description:
+ - New name of the device-alias
+ required: true
+ type: str
+"""
+
+EXAMPLES = """
+- name: Test that device alias module works
+ cisco.nxos.nxos_devicealias:
+ da:
+ - name: test1_add
+ pwwn: 56:2:22:11:22:88:11:67
+ - name: test2_add
+ pwwn: 65:22:22:11:22:22:11:d
+ - name: dev1
+ remove: true
+ - name: dev2
+ remove: true
+ distribute: true
+ mode: enhanced
+ rename:
+ - new_name: bcd
+ old_name: abc
+ - new_name: bcd1
+ old_name: abc1
+
+
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample:
+ - terminal dont-ask
+ - device-alias database
+ - device-alias name somename pwwn 10:00:00:00:89:a1:01:03
+ - device-alias name somename1 pwwn 10:00:00:00:89:a1:02:03
+ - device-alias commit
+ - no terminal dont-ask
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+import string
+
+__metaclass__ = type
+
+VALID_DA_CHARS = ("-", "_", "$", "^")
+
+
+class showDeviceAliasStatus(object):
+ """docstring for showDeviceAliasStatus"""
+
+ def __init__(self, module):
+ self.module = module
+ self.distribute = ""
+ self.mode = ""
+ self.locked = False
+ self.update()
+
+ def execute_show_cmd(self, cmd):
+ output = execute_show_command(cmd, self.module)[0]
+ return output
+
+ def update(self):
+ command = "show device-alias status"
+ output = self.execute_show_cmd(command).split("\n")
+ for o in output:
+ if "Fabric Distribution" in o:
+ self.distribute = o.split(":")[1].strip().lower()
+ if "Mode" in o:
+ self.mode = o.split("Mode:")[1].strip().lower()
+ if "Locked" in o:
+ self.locked = True
+
+ def isLocked(self):
+ return self.locked
+
+ def getDistribute(self):
+ return self.distribute
+
+ def getMode(self):
+ return self.mode
+
+
+class showDeviceAliasDatabase(object):
+ """docstring for showDeviceAliasDatabase"""
+
+ def __init__(self, module):
+ self.module = module
+ self.da_dict = {}
+ self.update()
+
+ def execute_show_cmd(self, cmd):
+ output = execute_show_command(cmd, self.module)[0]
+ return output
+
+ def update(self):
+ command = "show device-alias database"
+ # output = execute_show_command(command, self.module)[0].split("\n")
+ output = self.execute_show_cmd(command)
+ self.da_list = output.split("\n")
+ for eachline in self.da_list:
+ if "device-alias" in eachline:
+ sv = eachline.strip().split()
+ self.da_dict[sv[2]] = sv[4]
+
+ def isNameInDaDatabase(self, name):
+ return name in self.da_dict.keys()
+
+ def isPwwnInDaDatabase(self, pwwn):
+ newpwwn = ":".join(
+ ["0" + str(ep) if len(ep) == 1 else ep for ep in pwwn.split(":")]
+ )
+ return newpwwn in self.da_dict.values()
+
+ def isNamePwwnPresentInDatabase(self, name, pwwn):
+ newpwwn = ":".join(
+ ["0" + str(ep) if len(ep) == 1 else ep for ep in pwwn.split(":")]
+ )
+ if name in self.da_dict.keys():
+ if newpwwn == self.da_dict[name]:
+ return True
+ return False
+
+ def getPwwnByName(self, name):
+ if name in self.da_dict.keys():
+ return self.da_dict[name]
+ else:
+ return None
+
+ def getNameByPwwn(self, pwwn):
+ newpwwn = ":".join(
+ ["0" + str(ep) if len(ep) == 1 else ep for ep in pwwn.split(":")]
+ )
+ for n, p in self.da_dict.items():
+ if p == newpwwn:
+ return n
+ return None
+
+
+def isPwwnValid(pwwn):
+ pwwnsplit = pwwn.split(":")
+ if len(pwwnsplit) != 8:
+ return False
+ for eachpwwnsplit in pwwnsplit:
+ if len(eachpwwnsplit) > 2 or len(eachpwwnsplit) < 1:
+ return False
+ if not all(c in string.hexdigits for c in eachpwwnsplit):
+ return False
+ return True
+
+
+def isNameValid(name):
+ if not name[0].isalpha():
+ # Illegal first character. Name must start with a letter
+ return False
+ if len(name) > 64:
+ return False
+ for character in name:
+ if not character.isalnum() and character not in VALID_DA_CHARS:
+ return False
+ return True
+
+
+def execute_show_command(command, module, command_type="cli_show"):
+ output = "text"
+ commands = [{"command": command, "output": output}]
+ out = run_commands(module, commands)
+ return out
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def main():
+ element_spec = dict(
+ name=dict(required=True, type="str"),
+ pwwn=dict(type="str"),
+ remove=dict(type="bool", default=False),
+ )
+
+ element_spec_rename = dict(
+ old_name=dict(required=True, type="str"),
+ new_name=dict(required=True, type="str"),
+ )
+
+ argument_spec = dict(
+ distribute=dict(type="bool"),
+ mode=dict(type="str", choices=["enhanced", "basic"]),
+ da=dict(type="list", elements="dict", options=element_spec),
+ rename=dict(type="list", elements="dict", options=element_spec_rename),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ messages = list()
+ commands_to_execute = list()
+ result = {"changed": False}
+
+ distribute = module.params["distribute"]
+ mode = module.params["mode"]
+ da = module.params["da"]
+ rename = module.params["rename"]
+
+ # Step 0.0: Validate syntax of name and pwwn
+ # Also validate syntax of rename arguments
+ if da is not None:
+ for eachdict in da:
+ name = eachdict["name"]
+ pwwn = eachdict["pwwn"]
+ remove = eachdict["remove"]
+ if pwwn is not None:
+ pwwn = pwwn.lower()
+ if not remove:
+ if pwwn is None:
+ module.fail_json(
+ msg="This device alias name "
+ + str(name)
+ + " which needs to be added, does not have pwwn specified. Please specify a valid pwwn"
+ )
+ if not isNameValid(name):
+ module.fail_json(
+ msg="This pwwn name is invalid : "
+ + str(name)
+ + ". Note that name cannot be more than 64 alphanumeric chars, "
+ + "it must start with a letter, and can only contain these characters: "
+ + ", ".join(
+ ["'{0}'".format(c) for c in VALID_DA_CHARS]
+ )
+ )
+ if not isPwwnValid(pwwn):
+ module.fail_json(
+ msg="This pwwn is invalid : "
+ + str(pwwn)
+ + ". Please check that its a valid pwwn"
+ )
+ if rename is not None:
+ for eachdict in rename:
+ oldname = eachdict["old_name"]
+ newname = eachdict["new_name"]
+ if not isNameValid(oldname):
+ module.fail_json(
+ msg="This pwwn name is invalid : "
+ + str(oldname)
+ + ". Note that name cannot be more than 64 alphanumeric chars, "
+ + "it must start with a letter, and can only contain these characters: "
+ + ", ".join(["'{0}'".format(c) for c in VALID_DA_CHARS])
+ )
+ if not isNameValid(newname):
+ module.fail_json(
+ msg="This pwwn name is invalid : "
+ + str(newname)
+ + ". Note that name cannot be more than 64 alphanumeric chars, "
+ + "it must start with a letter, and can only contain these characters: "
+ + ", ".join(["'{0}'".format(c) for c in VALID_DA_CHARS])
+ )
+
+ # Step 0.1: Check DA status
+ shDAStausObj = showDeviceAliasStatus(module)
+ d = shDAStausObj.getDistribute()
+ m = shDAStausObj.getMode()
+ if shDAStausObj.isLocked():
+ module.fail_json(
+ msg="device-alias has acquired lock on the switch. Hence cannot procced."
+ )
+
+ # Step 1: Process distribute
+ commands = []
+ if distribute is not None:
+ if distribute:
+ # playbook has distribute as True(enabled)
+ if d == "disabled":
+ # but switch distribute is disabled(false), so set it to
+ # true(enabled)
+ commands.append("device-alias distribute")
+ messages.append(
+ "device-alias distribute changed from disabled to enabled"
+ )
+ else:
+ messages.append(
+ "device-alias distribute remains unchanged. current distribution mode is enabled"
+ )
+ else:
+ # playbook has distribute as False(disabled)
+ if d == "enabled":
+ # but switch distribute is enabled(true), so set it to
+ # false(disabled)
+ commands.append("no device-alias distribute")
+ messages.append(
+ "device-alias distribute changed from enabled to disabled"
+ )
+ else:
+ messages.append(
+ "device-alias distribute remains unchanged. current distribution mode is disabled"
+ )
+
+ cmds = flatten_list(commands)
+ if cmds:
+ commands_to_execute = commands_to_execute + cmds
+ if module.check_mode:
+ # Check mode implemented at the da_add/da_remove stage
+ pass
+ else:
+ result["changed"] = True
+ load_config(module, cmds)
+
+ # Step 2: Process mode
+ commands = []
+ if mode is not None:
+ if mode == "basic":
+ # playbook has mode as basic
+ if m == "enhanced":
+ # but switch mode is enhanced, so set it to basic
+ commands.append("no device-alias mode enhanced")
+ messages.append(
+ "device-alias mode changed from enhanced to basic"
+ )
+ else:
+ messages.append(
+ "device-alias mode remains unchanged. current mode is basic"
+ )
+
+ else:
+ # playbook has mode as enhanced
+ if m == "basic":
+ # but switch mode is basic, so set it to enhanced
+ commands.append("device-alias mode enhanced")
+ messages.append(
+ "device-alias mode changed from basic to enhanced"
+ )
+ else:
+ messages.append(
+ "device-alias mode remains unchanged. current mode is enhanced"
+ )
+
+ if commands:
+ if distribute:
+ commands.append("device-alias commit")
+ commands = (
+ ["terminal dont-ask"] + commands + ["no terminal dont-ask"]
+ )
+ else:
+ if distribute is None and d == "enabled":
+ commands.append("device-alias commit")
+ commands = (
+ ["terminal dont-ask"] + commands + ["no terminal dont-ask"]
+ )
+
+ cmds = flatten_list(commands)
+
+ if cmds:
+ commands_to_execute = commands_to_execute + cmds
+ if module.check_mode:
+ # Check mode implemented at the end
+ pass
+ else:
+ result["changed"] = True
+ load_config(module, cmds)
+
+ # Step 3: Process da
+ commands = []
+ shDADatabaseObj = showDeviceAliasDatabase(module)
+ if da is not None:
+ da_remove_list = []
+ da_add_list = []
+ for eachdict in da:
+ name = eachdict["name"]
+ pwwn = eachdict["pwwn"]
+ remove = eachdict["remove"]
+ if pwwn is not None:
+ pwwn = pwwn.lower()
+ if remove:
+ if shDADatabaseObj.isNameInDaDatabase(name):
+ commands.append("no device-alias name " + name)
+ da_remove_list.append(name)
+ else:
+ messages.append(
+ name
+ + " - This device alias name is not in switch device-alias database, hence cannot be removed."
+ )
+ else:
+ if shDADatabaseObj.isNamePwwnPresentInDatabase(name, pwwn):
+ messages.append(
+ name
+ + " : "
+ + pwwn
+ + " - This device alias name,pwwn is already in switch device-alias database, hence nothing to configure"
+ )
+ else:
+ if shDADatabaseObj.isNameInDaDatabase(name):
+ module.fail_json(
+ msg=name
+ + " - This device alias name is already present in switch device-alias database but assigned to another pwwn ("
+ + shDADatabaseObj.getPwwnByName(name)
+ + ") hence cannot be added"
+ )
+
+ elif shDADatabaseObj.isPwwnInDaDatabase(pwwn):
+ module.fail_json(
+ msg=pwwn
+ + " - This device alias pwwn is already present in switch device-alias database but assigned to another name ("
+ + shDADatabaseObj.getNameByPwwn(pwwn)
+ + ") hence cannot be added"
+ )
+
+ else:
+ commands.append(
+ "device-alias name " + name + " pwwn " + pwwn
+ )
+ da_add_list.append(name)
+
+ if len(da_add_list) != 0 or len(da_remove_list) != 0:
+ commands = ["device-alias database"] + commands
+ if distribute:
+ commands.append("device-alias commit")
+ commands = (
+ ["terminal dont-ask"] + commands + ["no terminal dont-ask"]
+ )
+ else:
+ if distribute is None and d == "enabled":
+ commands.append("device-alias commit")
+ commands = (
+ ["terminal dont-ask"]
+ + commands
+ + ["no terminal dont-ask"]
+ )
+
+ cmds = flatten_list(commands)
+ if cmds:
+ commands_to_execute = commands_to_execute + cmds
+ if module.check_mode:
+ # Check mode implemented at the end
+ pass
+ else:
+ result["changed"] = True
+ load_config(module, cmds)
+ if len(da_remove_list) != 0:
+ messages.append(
+ "the required device-alias were removed. "
+ + ",".join(da_remove_list)
+ )
+ if len(da_add_list) != 0:
+ messages.append(
+ "the required device-alias were added. "
+ + ",".join(da_add_list)
+ )
+
+ # Step 5: Process rename
+ commands = []
+ if rename is not None:
+ for eachdict in rename:
+ oldname = eachdict["old_name"]
+ newname = eachdict["new_name"]
+ if shDADatabaseObj.isNameInDaDatabase(newname):
+ module.fail_json(
+ changed=False,
+ commands=cmds,
+ msg=newname
+ + " - this name is already present in the device-alias database, hence we cannot rename "
+ + oldname
+ + " with this one",
+ )
+ if shDADatabaseObj.isNameInDaDatabase(oldname):
+ commands.append(
+ "device-alias rename " + oldname + " " + newname
+ )
+ else:
+ module.fail_json(
+ changed=False,
+ commands=cmds,
+ msg=oldname
+ + " - this name is not present in the device-alias database, hence we cannot rename.",
+ )
+
+ if len(commands) != 0:
+ commands = ["device-alias database"] + commands
+ if distribute:
+ commands.append("device-alias commit")
+ commands = (
+ ["terminal dont-ask"] + commands + ["no terminal dont-ask"]
+ )
+ else:
+ if distribute is None and d == "enabled":
+ commands.append("device-alias commit")
+ commands = (
+ ["terminal dont-ask"]
+ + commands
+ + ["no terminal dont-ask"]
+ )
+ cmds = flatten_list(commands)
+ if cmds:
+ commands_to_execute = commands_to_execute + cmds
+ if module.check_mode:
+ # Check mode implemented at the end
+ pass
+ else:
+ result["changed"] = True
+ load_config(module, cmds)
+
+ # Step END: check for 'check' mode
+ if module.check_mode:
+ module.exit_json(
+ changed=False,
+ commands=commands_to_execute,
+ msg="Check Mode: No cmds issued to the hosts",
+ )
+
+ result["messages"] = messages
+ result["commands"] = commands_to_execute
+ result["warnings"] = warnings
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_evpn_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_evpn_global.py
new file mode 100644
index 00000000..29aa1bf4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_evpn_global.py
@@ -0,0 +1,109 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_evpn_global
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Handles the EVPN control plane for VXLAN.
+description:
+- Handles the EVPN control plane for VXLAN.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+notes:
+- This module is not supported on Nexus 3000 series of switches.
+options:
+ nv_overlay_evpn:
+ description:
+ - EVPN control plane.
+ required: true
+ type: bool
+"""
+
+EXAMPLES = """
+- cisco.nxos.nxos_evpn_global:
+ nv_overlay_evpn: true
+"""
+
+RETURN = """
+commands:
+ description: The set of commands to be sent to the remote device
+ returned: always
+ type: list
+ sample: ['nv overlay evpn']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_capabilities,
+ nxos_argument_spec,
+)
+
+
+def main():
+ argument_spec = dict(nv_overlay_evpn=dict(required=True, type="bool"))
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ result = {"changed": False}
+
+ warnings = list()
+ if warnings:
+ result["warnings"] = warnings
+
+ config = get_config(module)
+ commands = list()
+
+ info = get_capabilities(module).get("device_info", {})
+ os_platform = info.get("network_os_platform", "")
+
+ if "3K" in os_platform:
+ module.fail_json(
+ msg="This module is not supported on Nexus 3000 series"
+ )
+
+ if module.params["nv_overlay_evpn"] is True:
+ if "nv overlay evpn" not in config:
+ commands.append("nv overlay evpn")
+ elif "nv overlay evpn" in config:
+ commands.append("no nv overlay evpn")
+
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+
+ result["commands"] = commands
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_evpn_vni.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_evpn_vni.py
new file mode 100644
index 00000000..bd3dcb10
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_evpn_vni.py
@@ -0,0 +1,310 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_evpn_vni
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages Cisco EVPN VXLAN Network Identifier (VNI).
+description:
+- Manages Cisco Ethernet Virtual Private Network (EVPN) VXLAN Network Identifier (VNI)
+ configurations of a Nexus device.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- default, where supported, restores params default value.
+- RD override is not permitted. You should set it to the default values first and
+ then reconfigure it.
+- C(route_target_both), C(route_target_import) and C(route_target_export valid) values
+ are a list of extended communities, (i.e. ['1.2.3.4:5', '33:55']) or the keywords
+ 'auto' or 'default'.
+- The C(route_target_both) property is discouraged due to the inconsistent behavior
+ of the property across Nexus platforms and image versions. For this reason it is
+ recommended to use explicit C(route_target_export) and C(route_target_import) properties
+ instead of C(route_target_both).
+- RD valid values are a string in one of the route-distinguisher formats, the keyword
+ 'auto', or the keyword 'default'.
+options:
+ vni:
+ description:
+ - The EVPN VXLAN Network Identifier.
+ required: true
+ type: str
+ route_distinguisher:
+ description:
+ - The VPN Route Distinguisher (RD). The RD is combined with the IPv4 or IPv6 prefix
+ learned by the PE router to create a globally unique address.
+ type: str
+ route_target_both:
+ description:
+ - Enables/Disables route-target settings for both import and export target communities
+ using a single property.
+ type: list
+ elements: str
+ route_target_import:
+ description:
+ - Sets the route-target 'import' extended communities.
+ type: list
+ elements: str
+ route_target_export:
+ description:
+ - Sets the route-target 'export' extended communities.
+ type: list
+ elements: str
+ state:
+ description:
+ - Determines whether the config should be present or not on the device.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+- name: vni configuration
+ cisco.nxos.nxos_evpn_vni:
+ vni: 6000
+ route_distinguisher: 60:10
+ route_target_import:
+ - 5000:10
+ - 4100:100
+ route_target_export: auto
+ route_target_both: default
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["evpn", "vni 6000 l2", "route-target import 5001:10"]
+"""
+
+import re
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+
+PARAM_TO_COMMAND_KEYMAP = {
+ "vni": "vni",
+ "route_distinguisher": "rd",
+ "route_target_both": "route-target both",
+ "route_target_import": "route-target import",
+ "route_target_export": "route-target export",
+}
+
+
+def get_value(arg, config, module):
+ command = PARAM_TO_COMMAND_KEYMAP.get(arg)
+ command_re = re.compile(r"(?:{0}\s)(?P<value>.*)$".format(command), re.M)
+ value = ""
+ if command in config:
+ value = command_re.search(config).group("value")
+ return value
+
+
+def get_route_target_value(arg, config, module):
+ splitted_config = config.splitlines()
+ value_list = []
+ command = PARAM_TO_COMMAND_KEYMAP.get(arg)
+ command_re = re.compile(r"(?:{0}\s)(?P<value>.*)$".format(command), re.M)
+
+ for line in splitted_config:
+ value = ""
+ if command in line.strip():
+ value = command_re.search(line).group("value")
+ value_list.append(value)
+ return value_list
+
+
+def get_existing(module, args):
+ existing = {}
+ netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
+ parents = ["evpn", "vni {0} l2".format(module.params["vni"])]
+ config = netcfg.get_section(parents)
+
+ if config:
+ for arg in args:
+ if arg != "vni":
+ if arg == "route_distinguisher":
+ existing[arg] = get_value(arg, config, module)
+ else:
+ existing[arg] = get_route_target_value(arg, config, module)
+
+ existing_fix = dict((k, v) for k, v in existing.items() if v)
+ if not existing_fix:
+ existing = existing_fix
+
+ existing["vni"] = module.params["vni"]
+
+ return existing
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key in table:
+ new_key = key_map.get(key)
+ if new_key:
+ new_dict[new_key] = table.get(key)
+ return new_dict
+
+
+def fix_proposed(proposed_commands):
+ new_proposed = {}
+ for key, value in proposed_commands.items():
+ if key == "route-target both":
+ new_proposed["route-target export"] = value
+ new_proposed["route-target import"] = value
+ else:
+ new_proposed[key] = value
+ return new_proposed
+
+
+def state_present(module, existing, proposed):
+ commands = list()
+ parents = list()
+ proposed_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, proposed)
+ existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
+
+ if proposed_commands.get("route-target both"):
+ proposed_commands = fix_proposed(proposed_commands)
+
+ for key, value in proposed_commands.items():
+ if key.startswith("route-target"):
+ if value == ["default"]:
+ existing_value = existing_commands.get(key)
+
+ if existing_value:
+ for target in existing_value:
+ commands.append("no {0} {1}".format(key, target))
+ elif not isinstance(value, list):
+ value = [value]
+
+ for target in value:
+ if target == "default":
+ continue
+ if existing:
+ if target not in existing.get(
+ key.replace("-", "_").replace(" ", "_")
+ ):
+ commands.append("{0} {1}".format(key, target))
+ else:
+ commands.append("{0} {1}".format(key, target))
+
+ if existing.get(key.replace("-", "_").replace(" ", "_")):
+ for exi in existing.get(
+ key.replace("-", "_").replace(" ", "_")
+ ):
+ if exi not in value:
+ commands.append("no {0} {1}".format(key, exi))
+
+ elif value == "default":
+ existing_value = existing_commands.get(key)
+ if existing_value:
+ commands.append("no {0} {1}".format(key, existing_value))
+ else:
+ command = "{0} {1}".format(key, value)
+ commands.append(command)
+
+ if commands:
+ parents = ["evpn", "vni {0} l2".format(module.params["vni"])]
+
+ return commands, parents
+
+
+def state_absent(module, existing, proposed):
+ commands = ["no vni {0} l2".format(module.params["vni"])]
+ parents = ["evpn"]
+ return commands, parents
+
+
+def main():
+ argument_spec = dict(
+ vni=dict(required=True, type="str"),
+ route_distinguisher=dict(required=False, type="str"),
+ route_target_both=dict(required=False, type="list", elements="str"),
+ route_target_import=dict(required=False, type="list", elements="str"),
+ route_target_export=dict(required=False, type="list", elements="str"),
+ state=dict(
+ choices=["present", "absent"], default="present", required=False
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = dict(changed=False, warnings=warnings)
+
+ state = module.params["state"]
+ args = PARAM_TO_COMMAND_KEYMAP.keys()
+ existing = get_existing(module, args)
+ proposed_args = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+ commands = []
+ parents = []
+
+ proposed = {}
+ for key, value in proposed_args.items():
+ if key != "vni":
+ if value == "true":
+ value = True
+ elif value == "false":
+ value = False
+ if existing.get(key) != value:
+ proposed[key] = value
+
+ if state == "present":
+ commands, parents = state_present(module, existing, proposed)
+ elif state == "absent" and existing:
+ commands, parents = state_absent(module, existing, proposed)
+
+ if commands:
+ candidate = CustomNetworkConfig(indent=3)
+ candidate.add(commands, parents=parents)
+ candidate = candidate.items_text()
+ if not module.check_mode:
+ load_config(module, candidate)
+ results["changed"] = True
+ results["commands"] = candidate
+ else:
+ results["commands"] = []
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_facts.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_facts.py
new file mode 100644
index 00000000..5b23d9ac
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_facts.py
@@ -0,0 +1,248 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_facts
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Gets facts about NX-OS switches
+description:
+- Collects facts from Cisco Nexus devices running the NX-OS operating system. Fact
+ collection is supported over both Cli and Nxapi transports. This module prepends
+ all of the base network fact keys with C(ansible_net_<fact>). The facts module
+ will always collect a base set of facts from the device and can enable or disable
+ collection of additional facts.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+options:
+ gather_subset:
+ description:
+ - When supplied, this argument will restrict the facts collected to a given subset. Possible
+ values for this argument include all, hardware, config, legacy, and interfaces. Can
+ specify a list of values to include a larger subset. Values can also be used
+ with an initial C(!) to specify that a specific subset should not be collected.
+ required: false
+ default: '!config'
+ type: list
+ elements: str
+ gather_network_resources:
+ description:
+ - When supplied, this argument will restrict the facts collected 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. Values can
+ also be used with an initial C(!) to specify that a specific subset should
+ not be collected. Valid subsets are 'all', 'bfd_interfaces', 'lag_interfaces',
+ 'telemetry', 'vlans', 'lacp', 'lacp_interfaces', 'interfaces', 'l3_interfaces',
+ 'l2_interfaces', 'lldp_global', 'acls', 'acl_interfaces', 'ospfv2'.
+ required: false
+ type: list
+ elements: str
+"""
+
+EXAMPLES = """
+- name: Gather all legacy facts
+ cisco.nxos.nxos_facts:
+ gather_subset: all
+- name: Gather only the config and default facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - config
+- name: Do not gather hardware facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!hardware'
+- name: Gather legacy and resource facts
+ cisco.nxos.nxos_facts:
+ gather_subset: all
+ gather_network_resources: all
+- name: Gather only the interfaces resource facts and no legacy facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - interfaces
+- name: Gather interfaces resource and minimal legacy facts
+ cisco.nxos.nxos_facts:
+ gather_subset: min
+ gather_network_resources: interfaces
+"""
+
+RETURN = """
+ansible_net_gather_subset:
+ description: The list of fact subsets collected from the device
+ returned: always
+ type: list
+ansible_net_gather_network_resources:
+ description: The list of fact for network resource subsets collected from the device
+ returned: when the resource is configured
+ type: list
+# default
+ansible_net_model:
+ description: The model name returned from the device
+ returned: always
+ type: str
+ansible_net_serialnum:
+ description: The serial number of the remote device
+ returned: always
+ type: str
+ansible_net_version:
+ description: The operating system version running on the remote device
+ returned: always
+ type: str
+ansible_net_hostname:
+ description: The configured hostname of the device
+ returned: always
+ type: str
+ansible_net_image:
+ description: The image file the device is running
+ returned: always
+ type: str
+ansible_net_api:
+ description: The name of the transport
+ returned: always
+ type: str
+ansible_net_license_hostid:
+ description: The License host id of the device
+ returned: always
+ type: str
+ansible_net_python_version:
+ description: The Python version Ansible controller is using
+ returned: always
+ type: str
+# hardware
+ansible_net_filesystems:
+ description: All file system names available on the device
+ returned: when hardware is configured
+ type: list
+ansible_net_memfree_mb:
+ description: The available free memory on the remote device in Mb
+ returned: when hardware is configured
+ type: int
+ansible_net_memtotal_mb:
+ description: The total memory on the remote device in Mb
+ returned: when hardware is configured
+ type: int
+# config
+ansible_net_config:
+ description: The current active config from the device
+ returned: when config is configured
+ type: str
+# interfaces
+ansible_net_all_ipv4_addresses:
+ description: All IPv4 addresses configured on the device
+ returned: when interfaces is configured
+ type: list
+ansible_net_all_ipv6_addresses:
+ description: All IPv6 addresses configured on the device
+ returned: when interfaces is configured
+ type: list
+ansible_net_interfaces:
+ description: A hash of all interfaces running on the system
+ returned: when interfaces is configured
+ type: dict
+ansible_net_neighbors:
+ description:
+ - The list of LLDP and CDP neighbors from the device. If both,
+ CDP and LLDP neighbor data is present on one port, CDP is preferred.
+ returned: when interfaces is configured
+ type: dict
+# legacy (pre Ansible 2.2)
+fan_info:
+ description: A hash of facts about fans in the remote device
+ returned: when legacy is configured
+ type: dict
+hostname:
+ description: The configured hostname of the remote device
+ returned: when legacy is configured
+ type: dict
+interfaces_list:
+ description: The list of interface names on the remote device
+ returned: when legacy is configured
+ type: dict
+kickstart:
+ description: The software version used to boot the system
+ returned: when legacy is configured
+ type: str
+module:
+ description: A hash of facts about the modules in a remote device
+ returned: when legacy is configured
+ type: dict
+platform:
+ description: The hardware platform reported by the remote device
+ returned: when legacy is configured
+ type: str
+power_supply_info:
+ description: A hash of facts about the power supplies in the remote device
+ returned: when legacy is configured
+ type: str
+vlan_list:
+ description: The list of VLAN IDs configured on the remote device
+ returned: when legacy is configured
+ type: list
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.facts.facts import (
+ FactsArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts import (
+ Facts,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: ansible_facts
+ """
+ argument_spec = FactsArgs.argument_spec
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = []
+ if module.params["gather_subset"] == "!config":
+ warnings.append(
+ "default value for `gather_subset` will be changed to `min` from `!config` v2.11 onwards"
+ )
+
+ result = Facts(module).get_facts()
+
+ ansible_facts, additional_warnings = result
+ warnings.extend(additional_warnings)
+
+ module.exit_json(ansible_facts=ansible_facts, warnings=warnings)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_feature.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_feature.py
new file mode 100644
index 00000000..77a7e3c7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_feature.py
@@ -0,0 +1,285 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_feature
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manage features in NX-OS switches.
+description:
+- Offers ability to enable and disable features in NX-OS.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+options:
+ feature:
+ description:
+ - Name of feature.
+ required: true
+ type: str
+ state:
+ description:
+ - Desired state of the feature.
+ required: false
+ default: enabled
+ choices:
+ - enabled
+ - disabled
+ type: str
+"""
+
+EXAMPLES = """
+- name: Ensure lacp is enabled
+ cisco.nxos.nxos_feature:
+ feature: lacp
+ state: enabled
+
+- name: Ensure ospf is disabled
+ cisco.nxos.nxos_feature:
+ feature: ospf
+ state: disabled
+
+- name: Ensure vpc is enabled
+ cisco.nxos.nxos_feature:
+ feature: vpc
+ state: enabled
+"""
+
+RETURN = """
+commands:
+ description: The set of commands to be sent to the remote device
+ returned: always
+ type: list
+ sample: ['nv overlay evpn']
+"""
+
+import re
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.connection import ConnectionError
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+ get_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_capabilities,
+ nxos_argument_spec,
+)
+
+
+def get_available_features(feature, module):
+ available_features = {}
+ feature_regex = r"(?P<feature>\S+)\s+\d+\s+(?P<state>.*)"
+ command = {"command": "show feature", "output": "text"}
+
+ try:
+ body = run_commands(module, [command])[0]
+ split_body = body.splitlines()
+ except (KeyError, IndexError):
+ return {}
+
+ for line in split_body:
+ try:
+ match_feature = re.match(feature_regex, line, re.DOTALL)
+ feature_group = match_feature.groupdict()
+ feature = feature_group["feature"]
+ state = feature_group["state"]
+ except AttributeError:
+ feature = ""
+ state = ""
+
+ if feature and state:
+ if "enabled" in state:
+ state = "enabled"
+
+ if feature not in available_features:
+ available_features[feature] = state
+ else:
+ if (
+ available_features[feature] == "disabled"
+ and state == "enabled"
+ ):
+ available_features[feature] = state
+
+ # certain configurable features do not
+ # show up in the output of "show feature"
+ # but appear in running-config when set
+ run_cfg = get_config(module, flags=["| include ^feature"])
+ for item in re.findall(r"feature\s(.*)", run_cfg):
+ if item not in available_features:
+ available_features[item] = "enabled"
+
+ if "fabric forwarding" not in available_features:
+ available_features["fabric forwarding"] = "disabled"
+
+ return available_features
+
+
+def get_commands(proposed, existing, state, module):
+ feature = validate_feature(module, mode="config")
+ commands = []
+ feature_check = proposed == existing
+ if not feature_check:
+ if state == "enabled":
+ command = "feature {0}".format(feature)
+ commands.append(command)
+ elif state == "disabled":
+ command = "no feature {0}".format(feature)
+ commands.append(command)
+ return commands
+
+
+def validate_feature(module, mode="show"):
+ """Some features may need to be mapped due to inconsistency
+ between how they appear from "show feature" output and
+ how they are configured"""
+
+ feature = module.params["feature"]
+
+ try:
+ info = get_capabilities(module)
+ device_info = info.get("device_info", {})
+ os_version = device_info.get("network_os_version", "")
+ except ConnectionError:
+ os_version = ""
+
+ if "8.1" in os_version:
+ feature_to_be_mapped = {
+ "show": {
+ "nv overlay": "nve",
+ "vn-segment-vlan-based": "vnseg_vlan",
+ "hsrp": "hsrp_engine",
+ "fabric multicast": "fabric_mcast",
+ "scp-server": "scpServer",
+ "sftp-server": "sftpServer",
+ "sla responder": "sla_responder",
+ "sla sender": "sla_sender",
+ "ssh": "sshServer",
+ "tacacs+": "tacacs",
+ "telnet": "telnetServer",
+ "ethernet-link-oam": "elo",
+ },
+ "config": {
+ "nve": "nv overlay",
+ "vnseg_vlan": "vn-segment-vlan-based",
+ "hsrp_engine": "hsrp",
+ "fabric_mcast": "fabric multicast",
+ "scpServer": "scp-server",
+ "sftpServer": "sftp-server",
+ "sla_sender": "sla sender",
+ "sla_responder": "sla responder",
+ "sshServer": "ssh",
+ "tacacs": "tacacs+",
+ "telnetServer": "telnet",
+ "elo": "ethernet-link-oam",
+ },
+ }
+ else:
+ feature_to_be_mapped = {
+ "show": {
+ "nv overlay": "nve",
+ "vn-segment-vlan-based": "vnseg_vlan",
+ "hsrp": "hsrp_engine",
+ "fabric multicast": "fabric_mcast",
+ "scp-server": "scpServer",
+ "sftp-server": "sftpServer",
+ "sla responder": "sla_responder",
+ "sla sender": "sla_sender",
+ "ssh": "sshServer",
+ "tacacs+": "tacacs",
+ "telnet": "telnetServer",
+ "ethernet-link-oam": "elo",
+ "port-security": "eth_port_sec",
+ },
+ "config": {
+ "nve": "nv overlay",
+ "vnseg_vlan": "vn-segment-vlan-based",
+ "hsrp_engine": "hsrp",
+ "fabric_mcast": "fabric multicast",
+ "scpServer": "scp-server",
+ "sftpServer": "sftp-server",
+ "sla_sender": "sla sender",
+ "sla_responder": "sla responder",
+ "sshServer": "ssh",
+ "tacacs": "tacacs+",
+ "telnetServer": "telnet",
+ "elo": "ethernet-link-oam",
+ "eth_port_sec": "port-security",
+ },
+ }
+
+ if feature in feature_to_be_mapped[mode]:
+ feature = feature_to_be_mapped[mode][feature]
+
+ return feature
+
+
+def main():
+ argument_spec = dict(
+ feature=dict(type="str", required=True),
+ state=dict(choices=["enabled", "disabled"], default="enabled"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = dict(changed=False, warnings=warnings)
+
+ feature = validate_feature(module)
+ state = module.params["state"].lower()
+
+ available_features = get_available_features(feature, module)
+ if feature not in available_features:
+ module.fail_json(
+ msg="Invalid feature name.",
+ features_currently_supported=available_features,
+ invalid_feature=feature,
+ )
+ else:
+ existstate = available_features[feature]
+
+ existing = dict(state=existstate)
+ proposed = dict(state=state)
+ results["changed"] = False
+
+ cmds = get_commands(proposed, existing, state, module)
+
+ if cmds:
+ # On N35 A8 images, some features return a yes/no prompt
+ # on enablement or disablement. Bypass using terminal dont-ask
+ cmds.insert(0, "terminal dont-ask")
+ if not module.check_mode:
+ load_config(module, cmds)
+ results["changed"] = True
+
+ results["commands"] = cmds
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_file_copy.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_file_copy.py
new file mode 100644
index 00000000..d338a201
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_file_copy.py
@@ -0,0 +1,201 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+
+
+DOCUMENTATION = """
+module: nxos_file_copy
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Copy a file to a remote NXOS device.
+description:
+- This module supports two different workflows for copying a file to flash (or bootflash)
+ on NXOS devices. Files can either be (1) pushed from the Ansible controller to
+ the device or (2) pulled from a remote SCP file server to the device. File copies
+ are initiated from the NXOS device to the remote SCP server. This module only supports
+ the use of connection C(network_cli) or C(Cli) transport with connection C(local).
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+- Rewritten as a plugin by (@mikewiebe)
+notes:
+- Tested against NXOS 7.0(3)I2(5), 7.0(3)I4(6), 7.0(3)I5(3), 7.0(3)I6(1), 7.0(3)I7(3),
+ 6.0(2)A8(8), 7.0(3)F3(4), 7.3(0)D1(1), 8.3(0), 9.2, 9.3
+- When pushing files (file_pull is False) to the NXOS device, feature scp-server must
+ be enabled.
+- When pulling files (file_pull is True) to the NXOS device, feature scp-server is
+ not required.
+- When pulling files (file_pull is True) to the NXOS device, no transfer will take
+ place if the file is already present.
+- Check mode will tell you if the file would be copied.
+requirements:
+- paramiko (required when file_pull is False)
+- SCPClient (required when file_pull is False)
+- pexpect (required when file_pull is True)
+options:
+ local_file:
+ description:
+ - When (file_pull is False) this is the path to the local file on the Ansible
+ controller. The local directory must exist.
+ - When (file_pull is True) this is the target file name on the NXOS device.
+ remote_file:
+ description:
+ - When (file_pull is False) this is the remote file path on the NXOS device. If
+ omitted, the name of the local file will be used. The remote directory must
+ exist.
+ - When (file_pull is True) this is the full path to the file on the remote SCP
+ server to be copied to the NXOS device.
+ file_system:
+ description:
+ - The remote file system on the nxos device. If omitted, devices that support
+ a I(file_system) parameter will use their default values.
+ default: 'bootflash:'
+ connect_ssh_port:
+ description:
+ - SSH server port used for file transfer.
+ default: 22
+ file_pull:
+ description:
+ - When (False) file is copied from the Ansible controller to the NXOS device.
+ - When (True) file is copied from a remote SCP server to the NXOS device. In this
+ mode, the file copy is initiated from the NXOS device.
+ - If the file is already present on the device it will be overwritten and therefore
+ the operation is NOT idempotent.
+ type: bool
+ default: false
+ file_pull_protocol:
+ description:
+ - When file_pull is True, this can be used to define the transfer protocol for
+ copying file from remote to the NXOS device.
+ - When (file_pull is False), this is not used.
+ default: 'scp'
+ choices:
+ - scp
+ - sftp
+ - ftp
+ - http
+ - https
+ - tftp
+ type: str
+ file_pull_compact:
+ description:
+ - When file_pull is True, this is used to compact nxos image files. This option
+ can only be used with nxos image files.
+ - When (file_pull is False), this is not used.
+ type: bool
+ default: false
+ file_pull_kstack:
+ description:
+ - When file_pull is True, this can be used to speed up file copies when the nxos
+ running image supports the use-kstack option.
+ - When (file_pull is False), this is not used.
+ type: bool
+ default: false
+ local_file_directory:
+ description:
+ - When (file_pull is True) file is copied from a remote SCP server to the NXOS
+ device, and written to this directory on the NXOS device. If the directory does
+ not exist, it will be created under the file_system. This is an optional parameter.
+ - When (file_pull is False), this is not used.
+ file_pull_timeout:
+ description:
+ - Use this parameter to set timeout in seconds, when transferring large files
+ or when the network is slow.
+ - When (file_pull is False), this is not used.
+ default: 300
+ remote_scp_server:
+ description:
+ - The remote scp server address when file_pull is True. This is required if file_pull
+ is True.
+ - When (file_pull is False), this is not used.
+ remote_scp_server_user:
+ description:
+ - The remote scp server username when file_pull is True. This is required if file_pull
+ is True.
+ - When (file_pull is False), this is not used.
+ remote_scp_server_password:
+ description:
+ - The remote scp server password when file_pull is True. This is required if file_pull
+ is True.
+ - When (file_pull is False), this is not used.
+ vrf:
+ description:
+ - The VRF used to pull the file. Useful when no vrf management is defined
+ default: management
+"""
+
+EXAMPLES = """
+# File copy from ansible controller to nxos device
+- name: copy from server to device
+ cisco.nxos.nxos_file_copy:
+ local_file: ./test_file.txt
+ remote_file: test_file.txt
+
+# Initiate file copy from the nxos device to transfer file from an SCP server back to the nxos device
+- name: initiate file copy from device
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ local_file: xyz
+ local_file_directory: dir1/dir2/dir3
+ remote_file: /mydir/abc
+ remote_scp_server: 192.168.0.1
+ remote_scp_server_user: myUser
+ remote_scp_server_password: myPassword
+ vrf: management
+
+# Initiate file copy from the nxos device to transfer file from a ftp server back to the nxos device.
+# remote_scp_server_user and remote_scp_server_password are used to login to the FTP server.
+- name: initiate file copy from device
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ file_pull_protocol: ftp
+ local_file: xyz
+ remote_file: /mydir/abc
+ remote_scp_server: 192.168.0.1
+ remote_scp_server_user: myUser
+ remote_scp_server_password: myPassword
+ vrf: management
+"""
+
+RETURN = """
+transfer_status:
+ description: Whether a file was transferred to the nxos device.
+ returned: success
+ type: str
+ sample: 'Sent'
+local_file:
+ description: The path of the local file.
+ returned: success
+ type: str
+ sample: '/path/to/local/file'
+remote_file:
+ description: The path of the remote file.
+ returned: success
+ type: str
+ sample: '/path/to/remote/file'
+remote_scp_server:
+ description: The name of the scp server when file_pull is True.
+ returned: success
+ type: str
+ sample: 'fileserver.example.com'
+changed:
+ description: Indicates whether or not the file was copied.
+ returned: success
+ type: bool
+ sample: true
+"""
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_gir.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_gir.py
new file mode 100644
index 00000000..88912af4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_gir.py
@@ -0,0 +1,371 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_gir
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Trigger a graceful removal or insertion (GIR) of the switch.
+description:
+- Trigger a graceful removal or insertion (GIR) of the switch.
+- GIR processing may take more than 2 minutes. Timeout settings are automatically
+ extended to 200s when user timeout settings are insufficient.
+version_added: 1.0.0
+author:
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- C(state) has effect only in combination with C(system_mode_maintenance_timeout)
+ or C(system_mode_maintenance_on_reload_reset_reason).
+- Using C(system_mode_maintenance) and C(system_mode_maintenance_dont_generate_profile)
+ would make the module fail, but the system mode will be triggered anyway.
+options:
+ system_mode_maintenance:
+ description:
+ - When C(system_mode_maintenance=true) it puts all enabled protocols in maintenance
+ mode (using the isolate command). When C(system_mode_maintenance=false) it puts
+ all enabled protocols in normal mode (using the no isolate command).
+ type: bool
+ system_mode_maintenance_dont_generate_profile:
+ description:
+ - When C(system_mode_maintenance_dont_generate_profile=true) it prevents the dynamic
+ searching of enabled protocols and executes commands configured in a maintenance-mode
+ profile. Use this option if you want the system to use a maintenance-mode profile
+ that you have created. When C(system_mode_maintenance_dont_generate_profile=false)
+ it prevents the dynamic searching of enabled protocols and executes commands
+ configured in a normal-mode profile. Use this option if you want the system
+ to use a normal-mode profile that you have created.
+ type: bool
+ system_mode_maintenance_timeout:
+ description:
+ - Keeps the switch in maintenance mode for a specified number of minutes. Range
+ is 5-65535.
+ type: str
+ system_mode_maintenance_shutdown:
+ description:
+ - Shuts down all protocols, vPC domains, and interfaces except the management
+ interface (using the shutdown command). This option is disruptive while C(system_mode_maintenance)
+ (which uses the isolate command) is not.
+ type: bool
+ system_mode_maintenance_on_reload_reset_reason:
+ description:
+ - Boots the switch into maintenance mode automatically in the event of a specified
+ system crash. Note that not all reset reasons are applicable for all platforms.
+ Also if reset reason is set to match_any, it is not idempotent as it turns on
+ all reset reasons. If reset reason is match_any and state is absent, it turns
+ off all the reset reasons.
+ choices:
+ - hw_error
+ - svc_failure
+ - kern_failure
+ - wdog_timeout
+ - fatal_error
+ - lc_failure
+ - match_any
+ - manual_reload
+ - any_other
+ - maintenance
+ type: str
+ state:
+ description:
+ - Specify desired state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+# Trigger system maintenance mode
+- cisco.nxos.nxos_gir:
+ system_mode_maintenance: true
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+# Trigger system normal mode
+- cisco.nxos.nxos_gir:
+ system_mode_maintenance: false
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+# Configure on-reload reset-reason for maintenance mode
+- cisco.nxos.nxos_gir:
+ system_mode_maintenance_on_reload_reset_reason: manual_reload
+ state: present
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+# Add on-reload reset-reason for maintenance mode
+- cisco.nxos.nxos_gir:
+ system_mode_maintenance_on_reload_reset_reason: hw_error
+ state: present
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+# Remove on-reload reset-reason for maintenance mode
+- cisco.nxos.nxos_gir:
+ system_mode_maintenance_on_reload_reset_reason: manual_reload
+ state: absent
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+# Set timeout for maintenance mode
+- cisco.nxos.nxos_gir:
+ system_mode_maintenance_timeout: 30
+ state: present
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+# Remove timeout for maintenance mode
+- cisco.nxos.nxos_gir:
+ system_mode_maintenance_timeout: 30
+ state: absent
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+"""
+
+RETURN = """
+final_system_mode:
+ description: describe the last system mode
+ returned: verbose mode
+ type: str
+ sample: normal
+updates:
+ description: commands sent to the device
+ returned: verbose mode
+ type: list
+ sample: ["terminal dont-ask", "system mode maintenance timeout 10"]
+changed:
+ description: check to see if a change was made on the device
+ returned: always
+ type: bool
+ sample: true
+"""
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def get_system_mode(module):
+ command = {"command": "show system mode", "output": "text"}
+ body = run_commands(module, [command])[0]
+ if body and "normal" in body.lower():
+ mode = "normal"
+ else:
+ mode = "maintenance"
+ return mode
+
+
+def get_maintenance_timeout(module):
+ command = {"command": "show maintenance timeout", "output": "text"}
+ body = run_commands(module, [command])[0]
+ timeout = body.split()[4]
+ return timeout
+
+
+def get_reset_reasons(module):
+ command = {
+ "command": "show maintenance on-reload reset-reasons",
+ "output": "text",
+ }
+ body = run_commands(module, [command])[0]
+ return body
+
+
+def get_commands(module, state, mode):
+ commands = list()
+ if module.params["system_mode_maintenance"] is True and mode == "normal":
+ commands.append("system mode maintenance")
+ elif (
+ module.params["system_mode_maintenance"] is False
+ and mode == "maintenance"
+ ):
+ commands.append("no system mode maintenance")
+
+ elif (
+ module.params["system_mode_maintenance_dont_generate_profile"] is True
+ and mode == "normal"
+ ):
+ commands.append("system mode maintenance dont-generate-profile")
+ elif (
+ module.params["system_mode_maintenance_dont_generate_profile"] is False
+ and mode == "maintenance"
+ ):
+ commands.append("no system mode maintenance dont-generate-profile")
+
+ elif module.params["system_mode_maintenance_timeout"]:
+ timeout = get_maintenance_timeout(module)
+ if (
+ state == "present"
+ and timeout != module.params["system_mode_maintenance_timeout"]
+ ):
+ commands.append(
+ "system mode maintenance timeout {0}".format(
+ module.params["system_mode_maintenance_timeout"]
+ )
+ )
+ elif (
+ state == "absent"
+ and timeout == module.params["system_mode_maintenance_timeout"]
+ ):
+ commands.append(
+ "no system mode maintenance timeout {0}".format(
+ module.params["system_mode_maintenance_timeout"]
+ )
+ )
+
+ elif (
+ module.params["system_mode_maintenance_shutdown"] and mode == "normal"
+ ):
+ commands.append("system mode maintenance shutdown")
+ elif (
+ module.params["system_mode_maintenance_shutdown"] is False
+ and mode == "maintenance"
+ ):
+ commands.append("no system mode maintenance")
+
+ elif module.params["system_mode_maintenance_on_reload_reset_reason"]:
+ reset_reasons = get_reset_reasons(module)
+ if (
+ state == "present"
+ and module.params[
+ "system_mode_maintenance_on_reload_reset_reason"
+ ].lower()
+ not in reset_reasons.lower()
+ ):
+ commands.append(
+ "system mode maintenance on-reload "
+ "reset-reason {0}".format(
+ module.params[
+ "system_mode_maintenance_on_reload_reset_reason"
+ ]
+ )
+ )
+ elif (
+ state == "absent"
+ and module.params[
+ "system_mode_maintenance_on_reload_reset_reason"
+ ].lower()
+ in reset_reasons.lower()
+ ):
+ commands.append(
+ "no system mode maintenance on-reload "
+ "reset-reason {0}".format(
+ module.params[
+ "system_mode_maintenance_on_reload_reset_reason"
+ ]
+ )
+ )
+
+ if commands:
+ commands.insert(0, "terminal dont-ask")
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ system_mode_maintenance=dict(required=False, type="bool"),
+ system_mode_maintenance_dont_generate_profile=dict(
+ required=False, type="bool"
+ ),
+ system_mode_maintenance_timeout=dict(required=False, type="str"),
+ system_mode_maintenance_shutdown=dict(required=False, type="bool"),
+ system_mode_maintenance_on_reload_reset_reason=dict(
+ required=False,
+ choices=[
+ "hw_error",
+ "svc_failure",
+ "kern_failure",
+ "wdog_timeout",
+ "fatal_error",
+ "lc_failure",
+ "match_any",
+ "manual_reload",
+ "any_other",
+ "maintenance",
+ ],
+ ),
+ state=dict(
+ choices=["absent", "present"], default="present", required=False
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=[
+ [
+ "system_mode_maintenance",
+ "system_mode_maintenance_dont_generate_profile",
+ "system_mode_maintenance_timeout",
+ "system_mode_maintenance_shutdown",
+ "system_mode_maintenance_on_reload_reset_reason",
+ ]
+ ],
+ required_one_of=[
+ [
+ "system_mode_maintenance",
+ "system_mode_maintenance_dont_generate_profile",
+ "system_mode_maintenance_timeout",
+ "system_mode_maintenance_shutdown",
+ "system_mode_maintenance_on_reload_reset_reason",
+ ]
+ ],
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+
+ state = module.params["state"]
+ mode = get_system_mode(module)
+ commands = get_commands(module, state, mode)
+ changed = False
+ if commands:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=commands)
+ else:
+ load_config(module, commands)
+ changed = True
+
+ result = {}
+ result["changed"] = changed
+ if module._verbosity > 0:
+ final_system_mode = get_system_mode(module)
+ result["final_system_mode"] = final_system_mode
+ result["updates"] = commands
+
+ result["warnings"] = warnings
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_gir_profile_management.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_gir_profile_management.py
new file mode 100644
index 00000000..298c45da
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_gir_profile_management.py
@@ -0,0 +1,218 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_gir_profile_management
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Create a maintenance-mode or normal-mode profile for GIR.
+description:
+- Manage a maintenance-mode or normal-mode profile with configuration commands that
+ can be applied during graceful removal or graceful insertion.
+version_added: 1.0.0
+author:
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- C(state=absent) removes the whole profile.
+options:
+ commands:
+ description:
+ - List of commands to be included into the profile.
+ type: list
+ elements: str
+ mode:
+ description:
+ - Configure the profile as Maintenance or Normal mode.
+ required: true
+ choices:
+ - maintenance
+ - normal
+ type: str
+ state:
+ description:
+ - Specify desired state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+# Create a maintenance-mode profile
+- cisco.nxos.nxos_gir_profile_management:
+ mode: maintenance
+ commands:
+ - router eigrp 11
+ - isolate
+
+# Remove the maintenance-mode profile
+- cisco.nxos.nxos_gir_profile_management:
+ mode: maintenance
+ state: absent
+"""
+
+RETURN = """
+proposed:
+ description: list of commands passed into module.
+ returned: verbose mode
+ type: list
+ sample: ["router eigrp 11", "isolate"]
+existing:
+ description: list of existing profile commands.
+ returned: verbose mode
+ type: list
+ sample: ["router bgp 65535","isolate","router eigrp 10","isolate",
+ "diagnostic bootup level complete"]
+end_state:
+ description: list of profile entries after module execution.
+ returned: verbose mode
+ type: list
+ sample: ["router bgp 65535","isolate","router eigrp 10","isolate",
+ "diagnostic bootup level complete","router eigrp 11", "isolate"]
+updates:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["configure maintenance profile maintenance-mode",
+ "router eigrp 11","isolate"]
+changed:
+ description: check to see if a change was made on the device
+ returned: always
+ type: bool
+ sample: true
+"""
+
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+
+def get_existing(module):
+ existing = []
+ netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
+
+ if module.params["mode"] == "maintenance":
+ parents = ["configure maintenance profile maintenance-mode"]
+ else:
+ parents = ["configure maintenance profile normal-mode"]
+
+ config = netcfg.get_section(parents)
+ if config:
+ existing = config.splitlines()
+ existing = [cmd.strip() for cmd in existing]
+ existing.pop(0)
+
+ return existing
+
+
+def state_present(module, existing, commands):
+ cmds = list()
+ if existing == commands:
+ # Idempotent case
+ return cmds
+ cmds.extend(commands)
+ if module.params["mode"] == "maintenance":
+ cmds.insert(0, "configure maintenance profile maintenance-mode")
+ else:
+ cmds.insert(0, "configure maintenance profile normal-mode")
+
+ return cmds
+
+
+def state_absent(module, existing, commands):
+ if module.params["mode"] == "maintenance":
+ cmds = ["no configure maintenance profile maintenance-mode"]
+ else:
+ cmds = ["no configure maintenance profile normal-mode"]
+ return cmds
+
+
+def invoke(name, *args, **kwargs):
+ func = globals().get(name)
+ if func:
+ return func(*args, **kwargs)
+
+
+def main():
+ argument_spec = dict(
+ commands=dict(required=False, type="list", elements="str"),
+ mode=dict(required=True, choices=["maintenance", "normal"]),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ state = module.params["state"]
+ commands = module.params["commands"] or []
+
+ if state == "absent" and commands:
+ module.fail_json(msg="when state is absent, no command can be used.")
+
+ existing = invoke("get_existing", module)
+ end_state = existing
+ changed = False
+
+ result = {}
+ cmds = []
+ if state == "present" or (state == "absent" and existing):
+ cmds = invoke("state_%s" % state, module, existing, commands)
+
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ if cmds:
+ load_config(module, cmds)
+ changed = True
+ end_state = invoke("get_existing", module)
+
+ result["changed"] = changed
+ if module._verbosity > 0:
+ end_state = invoke("get_existing", module)
+ result["end_state"] = end_state
+ result["existing"] = existing
+ result["proposed"] = commands
+ result["updates"] = cmds
+
+ result["warnings"] = warnings
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_hsrp.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_hsrp.py
new file mode 100644
index 00000000..9d051e12
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_hsrp.py
@@ -0,0 +1,537 @@
+#!/usr/bin/python
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+DOCUMENTATION = """
+module: nxos_hsrp
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages HSRP configuration on NX-OS switches.
+description:
+- Manages HSRP configuration on NX-OS switches.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- HSRP feature needs to be enabled first on the system.
+- SVIs must exist before using this module.
+- Interface must be a L3 port before using this module.
+- HSRP cannot be configured on loopback interfaces.
+- MD5 authentication is only possible with HSRPv2 while it is ignored if HSRPv1 is
+ used instead, while it will not raise any error. Here we allow MD5 authentication
+ only with HSRPv2 in order to enforce better practice.
+options:
+ group:
+ description:
+ - HSRP group number.
+ required: true
+ type: str
+ interface:
+ description:
+ - Full name of interface that is being managed for HSRP.
+ required: true
+ type: str
+ version:
+ description:
+ - HSRP version.
+ default: 1
+ choices:
+ - '1'
+ - '2'
+ type: str
+ priority:
+ description:
+ - HSRP priority or keyword 'default'.
+ type: str
+ preempt:
+ description:
+ - Enable/Disable preempt.
+ choices:
+ - enabled
+ - disabled
+ type: str
+ vip:
+ description:
+ - HSRP virtual IP address or keyword 'default'
+ type: str
+ auth_string:
+ description:
+ - Authentication string. If this needs to be hidden(for md5 type), the string
+ should be 7 followed by the key string. Otherwise, it can be 0 followed by key
+ string or just key string (for backward compatibility). For text type, this
+ should be just be a key string. if this is 'default', authentication is removed.
+ type: str
+ auth_type:
+ description:
+ - Authentication type.
+ choices:
+ - text
+ - md5
+ type: str
+ state:
+ description:
+ - Specify desired state of the resource.
+ choices:
+ - present
+ - absent
+ default: present
+ type: str
+"""
+
+EXAMPLES = """
+- name: Ensure HSRP is configured with following params on a SVI
+ cisco.nxos.nxos_hsrp:
+ group: 10
+ vip: 10.1.1.1
+ priority: 150
+ interface: vlan10
+ preempt: enabled
+
+- name: Ensure HSRP is configured with following params on a SVI with clear text authentication
+ cisco.nxos.nxos_hsrp:
+ group: 10
+ vip: 10.1.1.1
+ priority: 150
+ interface: vlan10
+ preempt: enabled
+ auth_type: text
+ auth_string: CISCO
+
+- name: Ensure HSRP is configured with md5 authentication and clear authentication
+ string
+ cisco.nxos.nxos_hsrp:
+ group: 10
+ vip: 10.1.1.1
+ priority: 150
+ interface: vlan10
+ preempt: enabled
+ auth_type: md5
+ auth_string: 0 1234
+
+- name: Ensure HSRP is configured with md5 authentication and hidden authentication
+ string
+ cisco.nxos.nxos_hsrp:
+ group: 10
+ vip: 10.1.1.1
+ priority: 150
+ interface: vlan10
+ preempt: enabled
+ auth_type: md5
+ auth_string: 7 1234
+
+- name: Remove HSRP config for given interface, group, and VIP
+ cisco.nxos.nxos_hsrp:
+ group: 10
+ interface: vlan10
+ vip: 10.1.1.1
+ state: absent
+"""
+
+RETURN = r"""
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["interface vlan10", "hsrp version 2", "hsrp 30", "ip 10.30.1.1"]
+"""
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_capabilities,
+ nxos_argument_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_interface_type,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+PARAM_TO_DEFAULT_KEYMAP = {
+ "vip": None,
+ "priority": "100",
+ "auth_type": "text",
+ "auth_string": "cisco",
+}
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key in table:
+ new_key = key_map.get(key)
+ if new_key:
+ value = table.get(key)
+ if value:
+ new_dict[new_key] = str(value)
+ else:
+ new_dict[new_key] = value
+ return new_dict
+
+
+def get_interface_mode(interface, intf_type, module):
+ command = "show interface {0} | json".format(interface)
+ interface = {}
+ mode = "unknown"
+ try:
+ body = run_commands(module, [command])[0]
+ except IndexError:
+ return None
+
+ if intf_type in ["ethernet", "portchannel"]:
+ interface_table = body["TABLE_interface"]["ROW_interface"]
+ mode = str(interface_table.get("eth_mode", "layer3"))
+ if mode == "access" or mode == "trunk":
+ mode = "layer2"
+ elif intf_type == "svi":
+ mode = "layer3"
+ return mode
+
+
+def get_hsrp_group(group, interface, module):
+ command = "show hsrp group {0} all | json".format(group)
+ hsrp = {}
+
+ hsrp_key = {
+ "sh_if_index": "interface",
+ "sh_group_num": "group",
+ "sh_group_version": "version",
+ "sh_cfg_prio": "priority",
+ "sh_preempt": "preempt",
+ "sh_vip": "vip",
+ "sh_authentication_type": "auth_type",
+ "sh_keystring_attr": "auth_enc",
+ "sh_authentication_data": "auth_string",
+ }
+
+ try:
+ body = run_commands(module, [command])[0]
+ hsrp_table = body["TABLE_grp_detail"]["ROW_grp_detail"]
+ if "sh_keystring_attr" not in hsrp_table:
+ del hsrp_key["sh_keystring_attr"]
+ if "unknown enum:" in str(hsrp_table):
+ hsrp_table = get_hsrp_group_unknown_enum(
+ module, command, hsrp_table
+ )
+ except (AttributeError, IndexError, TypeError, KeyError):
+ return {}
+
+ if isinstance(hsrp_table, dict):
+ hsrp_table = [hsrp_table]
+
+ for hsrp_group in hsrp_table:
+ parsed_hsrp = apply_key_map(hsrp_key, hsrp_group)
+
+ parsed_hsrp["interface"] = parsed_hsrp["interface"].lower()
+
+ if parsed_hsrp["version"] == "v1":
+ parsed_hsrp["version"] = "1"
+ elif parsed_hsrp["version"] == "v2":
+ parsed_hsrp["version"] = "2"
+
+ if parsed_hsrp["auth_type"] == "md5":
+ if parsed_hsrp["auth_enc"] == "hidden":
+ parsed_hsrp["auth_enc"] = "7"
+ else:
+ parsed_hsrp["auth_enc"] = "0"
+
+ if parsed_hsrp["interface"] == interface:
+ return parsed_hsrp
+
+ return hsrp
+
+
+def get_hsrp_group_unknown_enum(module, command, hsrp_table):
+ """Some older NXOS images fail to set the attr values when using structured output and
+ instead set the values to <unknown enum>. This fallback method is a workaround that
+ uses an unstructured (text) request to query the device a second time.
+ 'sh_preempt' is currently the only attr affected. Add checks for other attrs as needed.
+ """
+ if "unknown enum:" in hsrp_table["sh_preempt"]:
+ cmd = {"output": "text", "command": command.split("|")[0]}
+ out = run_commands(module, cmd)[0]
+ hsrp_table["sh_preempt"] = (
+ "enabled" if ("may preempt" in out) else "disabled"
+ )
+ return hsrp_table
+
+
+def get_commands_remove_hsrp(group, interface):
+ commands = ["interface {0}".format(interface), "no hsrp {0}".format(group)]
+ return commands
+
+
+def get_commands_config_hsrp(delta, interface, args, existing):
+ commands = []
+
+ config_args = {
+ "group": "hsrp {group}",
+ "priority": "{priority}",
+ "preempt": "{preempt}",
+ "vip": "{vip}",
+ }
+
+ preempt = delta.get("preempt", None)
+ group = delta.get("group", None)
+ vip = delta.get("vip", None)
+ priority = delta.get("priority", None)
+
+ if preempt:
+ if preempt == "enabled":
+ delta["preempt"] = "preempt"
+ elif preempt == "disabled":
+ delta["preempt"] = "no preempt"
+
+ if priority:
+ if priority == "default":
+ if existing and existing.get(
+ "priority"
+ ) != PARAM_TO_DEFAULT_KEYMAP.get("priority"):
+ delta["priority"] = "no priority"
+ else:
+ del delta["priority"]
+ else:
+ delta["priority"] = "priority {0}".format(delta["priority"])
+
+ if vip:
+ if vip == "default":
+ if existing and existing.get("vip") != PARAM_TO_DEFAULT_KEYMAP.get(
+ "vip"
+ ):
+ delta["vip"] = "no ip"
+ else:
+ del delta["vip"]
+ else:
+ delta["vip"] = "ip {0}".format(delta["vip"])
+
+ for key in delta:
+ command = config_args.get(key, "DNE").format(**delta)
+ if command and command != "DNE":
+ if key == "group":
+ commands.insert(0, command)
+ else:
+ commands.append(command)
+ command = None
+
+ auth_type = delta.get("auth_type", None)
+ auth_string = delta.get("auth_string", None)
+ auth_enc = delta.get("auth_enc", None)
+ if auth_type or auth_string:
+ if not auth_type:
+ auth_type = args["auth_type"]
+ elif not auth_string:
+ auth_string = args["auth_string"]
+ if auth_string != "default":
+ if auth_type == "md5":
+ command = "authentication md5 key-string {0} {1}".format(
+ auth_enc, auth_string
+ )
+ commands.append(command)
+ elif auth_type == "text":
+ command = "authentication text {0}".format(auth_string)
+ commands.append(command)
+ else:
+ if existing and existing.get(
+ "auth_string"
+ ) != PARAM_TO_DEFAULT_KEYMAP.get("auth_string"):
+ commands.append("no authentication")
+
+ if commands and not group:
+ commands.insert(0, "hsrp {0}".format(args["group"]))
+
+ version = delta.get("version", None)
+ if version:
+ if version == "2":
+ command = "hsrp version 2"
+ elif version == "1":
+ command = "hsrp version 1"
+ commands.insert(0, command)
+ commands.insert(0, "interface {0}".format(interface))
+
+ if commands:
+ if not commands[0].startswith("interface"):
+ commands.insert(0, "interface {0}".format(interface))
+
+ return commands
+
+
+def is_default(interface, module):
+ command = "show run interface {0}".format(interface)
+
+ try:
+ body = run_commands(module, [command], check_rc=False)[0]
+ if "invalid" in body.lower():
+ return "DNE"
+ else:
+ raw_list = body.split("\n")
+ if raw_list[-1].startswith("interface"):
+ return True
+ else:
+ return False
+ except (KeyError):
+ return "DNE"
+
+
+def validate_config(body, vip, module):
+ new_body = "".join(body)
+ if "invalid ip address" in new_body.lower():
+ module.fail_json(
+ msg="Invalid VIP. Possible duplicate IP address.", vip=vip
+ )
+
+
+def main():
+ argument_spec = dict(
+ group=dict(required=True, type="str"),
+ interface=dict(required=True),
+ version=dict(choices=["1", "2"], default="1", required=False),
+ priority=dict(type="str", required=False),
+ preempt=dict(
+ type="str", choices=["disabled", "enabled"], required=False
+ ),
+ vip=dict(type="str", required=False),
+ auth_type=dict(choices=["text", "md5"], required=False),
+ auth_string=dict(type="str", required=False),
+ state=dict(
+ choices=["absent", "present"], required=False, default="present"
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = dict(changed=False, warnings=warnings)
+
+ interface = module.params["interface"].lower()
+ group = module.params["group"]
+ version = module.params["version"]
+ state = module.params["state"]
+ priority = module.params["priority"]
+ preempt = module.params["preempt"]
+ vip = module.params["vip"]
+ auth_type = module.params["auth_type"]
+ auth_full_string = module.params["auth_string"]
+ auth_enc = "0"
+ auth_string = None
+ if auth_full_string:
+ kstr = auth_full_string.split()
+ if len(kstr) == 2:
+ auth_enc = kstr[0]
+ auth_string = kstr[1]
+ elif len(kstr) == 1:
+ auth_string = kstr[0]
+ else:
+ module.fail_json(msg="Invalid auth_string")
+ if auth_enc != "0" and auth_enc != "7":
+ module.fail_json(msg="Invalid auth_string, only 0 or 7 allowed")
+
+ device_info = get_capabilities(module)
+ network_api = device_info.get("network_api", "nxapi")
+
+ intf_type = get_interface_type(interface)
+ if intf_type != "ethernet" and network_api == "cliconf":
+ if is_default(interface, module) == "DNE":
+ module.fail_json(
+ msg="That interface does not exist yet. Create " "it first.",
+ interface=interface,
+ )
+ if intf_type == "loopback":
+ module.fail_json(
+ msg="Loopback interfaces don't support HSRP.",
+ interface=interface,
+ )
+
+ mode = get_interface_mode(interface, intf_type, module)
+ if mode == "layer2":
+ module.fail_json(
+ msg="That interface is a layer2 port.\nMake it "
+ "a layer 3 port first.",
+ interface=interface,
+ )
+
+ if auth_type or auth_string:
+ if not (auth_type and auth_string):
+ module.fail_json(
+ msg="When using auth parameters, you need BOTH "
+ "auth_type AND auth_string."
+ )
+
+ args = dict(
+ group=group,
+ version=version,
+ priority=priority,
+ preempt=preempt,
+ vip=vip,
+ auth_type=auth_type,
+ auth_string=auth_string,
+ auth_enc=auth_enc,
+ )
+
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+
+ existing = get_hsrp_group(group, interface, module)
+
+ # This will enforce better practice with md5 and hsrp version.
+ if proposed.get("auth_type", None) == "md5":
+ if proposed["version"] == "1":
+ module.fail_json(
+ msg="It's recommended to use HSRP v2 " "when auth_type=md5"
+ )
+
+ elif not proposed.get("auth_type", None) and existing:
+ if (
+ proposed["version"] == "1" and existing["auth_type"] == "md5"
+ ) and state == "present":
+ module.fail_json(
+ msg="Existing auth_type is md5. It's recommended "
+ "to use HSRP v2 when using md5"
+ )
+
+ commands = []
+ if state == "present":
+ delta = dict(set(proposed.items()).difference(existing.items()))
+ if delta:
+ command = get_commands_config_hsrp(
+ delta, interface, args, existing
+ )
+ commands.extend(command)
+
+ elif state == "absent":
+ if existing:
+ command = get_commands_remove_hsrp(group, interface)
+ commands.extend(command)
+
+ if commands:
+ if module.check_mode:
+ module.exit_json(**results)
+ else:
+ load_config(module, commands)
+
+ # validate IP
+ if network_api == "cliconf" and state == "present":
+ commands.insert(0, "config t")
+ body = run_commands(module, commands)
+ validate_config(body, vip, module)
+
+ results["changed"] = True
+
+ if "configure" in commands:
+ commands.pop(0)
+
+ results["commands"] = commands
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_hsrp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_hsrp_interfaces.py
new file mode 100644
index 00000000..3b42f4c6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_hsrp_interfaces.py
@@ -0,0 +1,261 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_hsrp_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_hsrp_interfaces
+short_description: HSRP interfaces resource module
+description: Manages Hot Standby Router Protocol (HSRP) interface attributes.
+version_added: 1.0.0
+author: Chris Van Heuveln (@chrisvanheuveln)
+notes:
+- Tested against NX-OS 7.0(3)I5(1).
+- Feature bfd should be enabled for this module.
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section '^interface').
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: The provided configuration
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ type: str
+ description: The name of the interface.
+ bfd:
+ type: str
+ description:
+ - Enable/Disable HSRP Bidirectional Forwarding Detection (BFD) on the interface.
+ choices:
+ - enable
+ - disable
+ state:
+ description:
+ - The state the configuration should be left in
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using deleted
+
+- name: Configure hsrp attributes on interfaces
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ - name: Ethernet1/1
+ - name: Ethernet1/2
+ operation: deleted
+
+
+# Using merged
+
+- name: Configure hsrp attributes on interfaces
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ - name: Ethernet1/1
+ bfd: enable
+ - name: Ethernet1/2
+ bfd: disable
+ operation: merged
+
+
+# Using overridden
+
+- name: Configure hsrp attributes on interfaces
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ - name: Ethernet1/1
+ bfd: enable
+ - name: Ethernet1/2
+ bfd: disable
+ operation: overridden
+
+
+# Using replaced
+
+- name: Configure hsrp attributes on interfaces
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ - name: Ethernet1/1
+ bfd: enable
+ - name: Ethernet1/2
+ bfd: disable
+ operation: replaced
+
+# Using rendered
+
+- name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ - name: Ethernet1/800
+ bfd: enable
+ - name: Ethernet1/801
+ bfd: enable
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+
+# rendered:
+# - "interface Ethernet1/800"
+# - "hsrp bfd"
+# - "interface Ethernet1/801"
+# - "hsrp bfd"
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+# interface Ethernet1/800
+# no switchport
+# hsrp bfd
+# interface Ethernet1/801
+# no switchport
+# hsrp bfd
+
+- name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_hsrp_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+
+# parsed:
+# - name: Ethernet1/800
+# bfd: enable
+# - name: Ethernet1/801
+# bfd: enable
+
+# Using gathered
+
+# Existing device config state
+# -------------------------------
+
+# interface Ethernet1/1
+# no switchport
+# hsrp bfd
+# interface Ethernet1/2
+# no switchport
+# hsrp bfd
+# interface Ethernet1/3
+# no switchport
+
+- name: Gather hsrp_interfaces facts from the device using nxos_hsrp_interfaces
+ cisco.nxos.nxos_hsrp_interfaces:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+
+# gathered:
+# - name: Ethernet1/1
+# bfd: enable
+# - name: Ethernet1/2
+# bfd: enable
+
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface Ethernet1/1', 'hsrp bfd']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.hsrp_interfaces.hsrp_interfaces import (
+ Hsrp_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.hsrp_interfaces.hsrp_interfaces import (
+ Hsrp_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Hsrp_interfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Hsrp_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_igmp.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_igmp.py
new file mode 100644
index 00000000..4909a877
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_igmp.py
@@ -0,0 +1,168 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_igmp
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages IGMP global configuration.
+description:
+- Manages IGMP global configuration configuration settings.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- When C(state=default), all supported params will be reset to a default state.
+- If restart is set to true with other params set, the restart will happen last, i.e.
+ after the configuration takes place.
+options:
+ flush_routes:
+ description:
+ - Removes routes when the IGMP process is restarted. By default, routes are not
+ flushed.
+ type: bool
+ enforce_rtr_alert:
+ description:
+ - Enables or disables the enforce router alert option check for IGMPv2 and IGMPv3
+ packets.
+ type: bool
+ restart:
+ description:
+ - Restarts the igmp process (using an exec config command).
+ type: bool
+ default: False
+ state:
+ description:
+ - Manages desired state of the resource.
+ default: present
+ choices:
+ - present
+ - default
+ type: str
+"""
+EXAMPLES = """
+- name: Default igmp global params (all params except restart)
+ cisco.nxos.nxos_igmp:
+ state: default
+
+- name: Ensure the following igmp global config exists on the device
+ cisco.nxos.nxos_igmp:
+ flush_routes: true
+ enforce_rtr_alert: true
+
+- name: Restart the igmp process
+ cisco.nxos.nxos_igmp:
+ restart: true
+"""
+
+RETURN = """
+updates:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["ip igmp flush-routes"]
+"""
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def get_current(module):
+ output = run_commands(
+ module, {"command": "show running-config", "output": "text"}
+ )
+ return {
+ "flush_routes": "ip igmp flush-routes" in output[0],
+ "enforce_rtr_alert": "ip igmp enforce-router-alert" in output[0],
+ }
+
+
+def get_desired(module):
+ return {
+ "flush_routes": module.params["flush_routes"],
+ "enforce_rtr_alert": module.params["enforce_rtr_alert"],
+ }
+
+
+def main():
+ argument_spec = dict(
+ flush_routes=dict(type="bool"),
+ enforce_rtr_alert=dict(type="bool"),
+ restart=dict(type="bool", default=False),
+ state=dict(choices=["present", "default"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ current = get_current(module)
+ desired = get_desired(module)
+
+ state = module.params["state"]
+
+ commands = list()
+
+ if state == "default":
+ if current["flush_routes"]:
+ commands.append("no ip igmp flush-routes")
+ if current["enforce_rtr_alert"]:
+ commands.append("no ip igmp enforce-router-alert")
+
+ elif state == "present":
+ ldict = {
+ "flush_routes": "flush-routes",
+ "enforce_rtr_alert": "enforce-router-alert",
+ }
+ for arg in ["flush_routes", "enforce_rtr_alert"]:
+ if desired[arg] and not current[arg]:
+ commands.append("ip igmp {0}".format(ldict.get(arg)))
+ elif current[arg] and not desired[arg]:
+ commands.append("no ip igmp {0}".format(ldict.get(arg)))
+
+ result = {"changed": False, "updates": commands, "warnings": warnings}
+
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+
+ if module.params["restart"]:
+ cmd = {"command": "restart igmp", "output": "text"}
+ run_commands(module, cmd)
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_igmp_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_igmp_interface.py
new file mode 100644
index 00000000..07f6b18f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_igmp_interface.py
@@ -0,0 +1,687 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_igmp_interface
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages IGMP interface configuration.
+description:
+- Manages IGMP interface configuration settings.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- When C(state=default), supported params will be reset to a default state. These
+ include C(version), C(startup_query_interval), C(startup_query_count), C(robustness),
+ C(querier_timeout), C(query_mrt), C(query_interval), C(last_member_qrt), C(last_member_query_count),
+ C(group_timeout), C(report_llg), and C(immediate_leave).
+- When C(state=absent), all configs for C(oif_ps), and C(oif_routemap) will be removed.
+- PIM must be enabled to use this module.
+- This module is for Layer 3 interfaces.
+- Route-map check not performed (same as CLI) check when configuring route-map with
+ 'static-oif'
+- If restart is set to true with other params set, the restart will happen last, i.e.
+ after the configuration takes place. However, 'restart' itself is not idempotent
+ as it is an action and not configuration.
+options:
+ interface:
+ description:
+ - The full interface name for IGMP configuration. e.g. I(Ethernet1/2).
+ required: true
+ type: str
+ version:
+ description:
+ - IGMP version. It can be 2 or 3 or keyword 'default'.
+ choices:
+ - '2'
+ - '3'
+ - default
+ type: str
+ startup_query_interval:
+ description:
+ - Query interval used when the IGMP process starts up. The range is from 1 to
+ 18000 or keyword 'default'. The default is 31.
+ type: str
+ startup_query_count:
+ description:
+ - Query count used when the IGMP process starts up. The range is from 1 to 10
+ or keyword 'default'. The default is 2.
+ type: str
+ robustness:
+ description:
+ - Sets the robustness variable. Values can range from 1 to 7 or keyword 'default'.
+ The default is 2.
+ type: str
+ querier_timeout:
+ description:
+ - Sets the querier timeout that the software uses when deciding to take over as
+ the querier. Values can range from 1 to 65535 seconds or keyword 'default'.
+ The default is 255 seconds.
+ type: str
+ query_mrt:
+ description:
+ - Sets the response time advertised in IGMP queries. Values can range from 1 to
+ 25 seconds or keyword 'default'. The default is 10 seconds.
+ type: str
+ query_interval:
+ description:
+ - Sets the frequency at which the software sends IGMP host query messages. Values
+ can range from 1 to 18000 seconds or keyword 'default'. The default is 125 seconds.
+ type: str
+ last_member_qrt:
+ description:
+ - Sets the query interval waited after sending membership reports before the software
+ deletes the group state. Values can range from 1 to 25 seconds or keyword 'default'.
+ The default is 1 second.
+ type: str
+ last_member_query_count:
+ description:
+ - Sets the number of times that the software sends an IGMP query in response to
+ a host leave message. Values can range from 1 to 5 or keyword 'default'. The
+ default is 2.
+ type: str
+ group_timeout:
+ description:
+ - Sets the group membership timeout for IGMPv2. Values can range from 3 to 65,535
+ seconds or keyword 'default'. The default is 260 seconds.
+ type: str
+ report_llg:
+ description:
+ - Configures report-link-local-groups. Enables sending reports for groups in 224.0.0.0/24.
+ Reports are always sent for nonlink local groups. By default, reports are not
+ sent for link local groups.
+ type: bool
+ immediate_leave:
+ description:
+ - Enables the device to remove the group entry from the multicast routing table
+ immediately upon receiving a leave message for the group. Use this command to
+ minimize the leave latency of IGMPv2 group memberships on a given IGMP interface
+ because the device does not send group-specific queries. The default is disabled.
+ type: bool
+ oif_routemap:
+ description:
+ - Configure a routemap for static outgoing interface (OIF) or keyword 'default'.
+ type: str
+ oif_ps:
+ description:
+ - Configure prefixes and sources for static outgoing interface (OIF). This is
+ a list of dict where each dict has source and prefix defined or just prefix
+ if source is not needed. The specified values will be configured on the device
+ and if any previous prefix/sources exist, they will be removed. Keyword 'default'
+ is also accepted which removes all existing prefix/sources.
+ type: raw
+ restart:
+ description:
+ - Restart IGMP. This is NOT idempotent as this is action only.
+ type: bool
+ default: false
+ state:
+ description:
+ - Manages desired state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ - default
+ type: str
+"""
+EXAMPLES = """
+- cisco.nxos.nxos_igmp_interface:
+ interface: ethernet1/32
+ startup_query_interval: 30
+ oif_ps:
+ - {prefix: 238.2.2.6}
+ - {source: 192.168.0.1, prefix: 238.2.2.5}
+ state: present
+"""
+RETURN = """
+proposed:
+ description: k/v pairs of parameters passed into module
+ returned: always
+ type: dict
+ sample: {"startup_query_count": "30",
+ "oif_ps": [{'prefix': '238.2.2.6'}, {'source': '192.168.0.1', 'prefix': '238.2.2.5'}]}
+existing:
+ description: k/v pairs of existing igmp_interface configuration
+ returned: always
+ type: dict
+ sample: {"startup_query_count": "2", "oif_ps": []}
+end_state:
+ description: k/v pairs of igmp interface configuration after module execution
+ returned: always
+ type: dict
+ sample: {"startup_query_count": "30",
+ "oif_ps": [{'prefix': '238.2.2.6'}, {'source': '192.168.0.1', 'prefix': '238.2.2.5'}]}
+updates:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["interface Ethernet1/32", "ip igmp startup-query-count 30",
+ "ip igmp static-oif 238.2.2.6", "ip igmp static-oif 238.2.2.5 source 192.168.0.1"]
+changed:
+ description: check to see if a change was made on the device
+ returned: always
+ type: bool
+ sample: true
+"""
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_interface_type,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+import re
+
+
+def execute_show_command(command, module, command_type="cli_show"):
+ if command_type == "cli_show_ascii":
+ cmds = [{"command": command, "output": "text"}]
+ else:
+ cmds = [{"command": command, "output": "json"}]
+
+ return run_commands(module, cmds)
+
+
+def get_interface_mode(interface, intf_type, module):
+ command = "show interface {0}".format(interface)
+ interface = {}
+ mode = "unknown"
+
+ if intf_type in ["ethernet", "portchannel"]:
+ body = execute_show_command(command, module)[0]
+ interface_table = body["TABLE_interface"]["ROW_interface"]
+ mode = str(interface_table.get("eth_mode", "layer3"))
+ if mode == "access" or mode == "trunk":
+ mode = "layer2"
+ elif intf_type == "loopback" or intf_type == "svi":
+ mode = "layer3"
+ return mode
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key, value in table.items():
+ new_key = key_map.get(key)
+ if new_key:
+ value = table.get(key)
+ if value:
+ new_dict[new_key] = value
+ else:
+ new_dict[new_key] = value
+ return new_dict
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_igmp_interface(module, interface):
+ command = "show ip igmp interface {0}".format(interface)
+ igmp = {}
+
+ key_map = {
+ "IGMPVersion": "version",
+ "ConfiguredStartupQueryInterval": "startup_query_interval",
+ "StartupQueryCount": "startup_query_count",
+ "RobustnessVariable": "robustness",
+ "ConfiguredQuerierTimeout": "querier_timeout",
+ "ConfiguredMaxResponseTime": "query_mrt",
+ "ConfiguredQueryInterval": "query_interval",
+ "LastMemberMTR": "last_member_qrt",
+ "LastMemberQueryCount": "last_member_query_count",
+ "ConfiguredGroupTimeout": "group_timeout",
+ }
+
+ body = execute_show_command(command, module)[0]
+
+ if body:
+ if "not running" in body:
+ return igmp
+ resource = body["TABLE_vrf"]["ROW_vrf"]["TABLE_if"]["ROW_if"]
+ igmp = apply_key_map(key_map, resource)
+ report_llg = str(resource["ReportingForLinkLocal"]).lower()
+ if report_llg == "true":
+ igmp["report_llg"] = True
+ elif report_llg == "false":
+ igmp["report_llg"] = False
+
+ immediate_leave = str(
+ resource["ImmediateLeave"]
+ ).lower() # returns en or dis
+ if re.search(r"^en|^true|^enabled", immediate_leave):
+ igmp["immediate_leave"] = True
+ elif re.search(r"^dis|^false|^disabled", immediate_leave):
+ igmp["immediate_leave"] = False
+
+ # the next block of code is used to retrieve anything with:
+ # ip igmp static-oif *** i.e.. could be route-map ROUTEMAP
+ # or PREFIX source <ip>, etc.
+ command = "show run interface {0} | inc oif".format(interface)
+
+ body = execute_show_command(
+ command, module, command_type="cli_show_ascii"
+ )[0]
+
+ staticoif = []
+ if body:
+ split_body = body.split("\n")
+ route_map_regex = (
+ r".*ip igmp static-oif route-map\s+" r"(?P<route_map>\S+).*"
+ )
+ prefix_source_regex = (
+ r".*ip igmp static-oif\s+(?P<prefix>"
+ r"((\d+.){3}\d+))(\ssource\s"
+ r"(?P<source>\S+))?.*"
+ )
+
+ for line in split_body:
+ temp = {}
+ try:
+ match_route_map = re.match(route_map_regex, line, re.DOTALL)
+ route_map = match_route_map.groupdict()["route_map"]
+ except AttributeError:
+ route_map = ""
+
+ try:
+ match_prefix_source = re.match(
+ prefix_source_regex, line, re.DOTALL
+ )
+ prefix_source_group = match_prefix_source.groupdict()
+ prefix = prefix_source_group["prefix"]
+ source = prefix_source_group["source"]
+ except AttributeError:
+ prefix = ""
+ source = ""
+
+ if route_map:
+ temp["route_map"] = route_map
+ if prefix:
+ temp["prefix"] = prefix
+ if source:
+ temp["source"] = source
+ if temp:
+ staticoif.append(temp)
+
+ igmp["oif_routemap"] = None
+ igmp["oif_prefix_source"] = []
+
+ if staticoif:
+ if len(staticoif) == 1 and staticoif[0].get("route_map"):
+ igmp["oif_routemap"] = staticoif[0]["route_map"]
+ else:
+ igmp["oif_prefix_source"] = staticoif
+
+ return igmp
+
+
+def config_igmp_interface(delta, existing, existing_oif_prefix_source):
+ CMDS = {
+ "version": "ip igmp version {0}",
+ "startup_query_interval": "ip igmp startup-query-interval {0}",
+ "startup_query_count": "ip igmp startup-query-count {0}",
+ "robustness": "ip igmp robustness-variable {0}",
+ "querier_timeout": "ip igmp querier-timeout {0}",
+ "query_mrt": "ip igmp query-max-response-time {0}",
+ "query_interval": "ip igmp query-interval {0}",
+ "last_member_qrt": "ip igmp last-member-query-response-time {0}",
+ "last_member_query_count": "ip igmp last-member-query-count {0}",
+ "group_timeout": "ip igmp group-timeout {0}",
+ "report_llg": "ip igmp report-link-local-groups",
+ "immediate_leave": "ip igmp immediate-leave",
+ "oif_prefix_source": "ip igmp static-oif {0} source {1} ",
+ "oif_routemap": "ip igmp static-oif route-map {0}",
+ "oif_prefix": "ip igmp static-oif {0}",
+ }
+
+ commands = []
+ command = None
+ def_vals = get_igmp_interface_defaults()
+
+ for key, value in delta.items():
+ if key == "oif_ps" and value != "default":
+ for each in value:
+ if each in existing_oif_prefix_source:
+ existing_oif_prefix_source.remove(each)
+ else:
+ # add new prefix/sources
+ pf = each["prefix"]
+ src = ""
+ if "source" in each.keys():
+ src = each["source"]
+ if src:
+ commands.append(
+ CMDS.get("oif_prefix_source").format(pf, src)
+ )
+ else:
+ commands.append(CMDS.get("oif_prefix").format(pf))
+ if existing_oif_prefix_source:
+ for each in existing_oif_prefix_source:
+ # remove stale prefix/sources
+ pf = each["prefix"]
+ src = ""
+ if "source" in each.keys():
+ src = each["source"]
+ if src:
+ commands.append(
+ "no "
+ + CMDS.get("oif_prefix_source").format(pf, src)
+ )
+ else:
+ commands.append(
+ "no " + CMDS.get("oif_prefix").format(pf)
+ )
+ elif key == "oif_routemap":
+ if value == "default":
+ if existing.get(key):
+ command = "no " + CMDS.get(key).format(existing.get(key))
+ else:
+ command = CMDS.get(key).format(value)
+ elif value:
+ if value == "default":
+ if def_vals.get(key) != existing.get(key):
+ command = CMDS.get(key).format(def_vals.get(key))
+ else:
+ command = CMDS.get(key).format(value)
+ elif not value:
+ command = "no {0}".format(CMDS.get(key).format(value))
+
+ if command:
+ if command not in commands:
+ commands.append(command)
+ command = None
+
+ return commands
+
+
+def get_igmp_interface_defaults():
+ version = "2"
+ startup_query_interval = "31"
+ startup_query_count = "2"
+ robustness = "2"
+ querier_timeout = "255"
+ query_mrt = "10"
+ query_interval = "125"
+ last_member_qrt = "1"
+ last_member_query_count = "2"
+ group_timeout = "260"
+ report_llg = False
+ immediate_leave = False
+
+ args = dict(
+ version=version,
+ startup_query_interval=startup_query_interval,
+ startup_query_count=startup_query_count,
+ robustness=robustness,
+ querier_timeout=querier_timeout,
+ query_mrt=query_mrt,
+ query_interval=query_interval,
+ last_member_qrt=last_member_qrt,
+ last_member_query_count=last_member_query_count,
+ group_timeout=group_timeout,
+ report_llg=report_llg,
+ immediate_leave=immediate_leave,
+ )
+
+ default = dict(
+ (param, value) for (param, value) in args.items() if value is not None
+ )
+
+ return default
+
+
+def config_default_igmp_interface(existing, delta):
+ commands = []
+ proposed = get_igmp_interface_defaults()
+ delta = dict(set(proposed.items()).difference(existing.items()))
+ if delta:
+ command = config_igmp_interface(
+ delta, existing, existing_oif_prefix_source=None
+ )
+
+ if command:
+ for each in command:
+ commands.append(each)
+
+ return commands
+
+
+def config_remove_oif(existing, existing_oif_prefix_source):
+ commands = []
+ command = None
+ if existing.get("oif_routemap"):
+ commands.append(
+ "no ip igmp static-oif route-map {0}".format(
+ existing.get("oif_routemap")
+ )
+ )
+ elif existing_oif_prefix_source:
+ for each in existing_oif_prefix_source:
+ if each.get("prefix") and each.get("source"):
+ command = "no ip igmp static-oif {0} source {1} ".format(
+ each.get("prefix"), each.get("source")
+ )
+ elif each.get("prefix"):
+ command = "no ip igmp static-oif {0}".format(
+ each.get("prefix")
+ )
+ if command:
+ commands.append(command)
+ command = None
+
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ interface=dict(required=True, type="str"),
+ version=dict(
+ required=False, type="str", choices=["2", "3", "default"]
+ ),
+ startup_query_interval=dict(required=False, type="str"),
+ startup_query_count=dict(required=False, type="str"),
+ robustness=dict(required=False, type="str"),
+ querier_timeout=dict(required=False, type="str"),
+ query_mrt=dict(required=False, type="str"),
+ query_interval=dict(required=False, type="str"),
+ last_member_qrt=dict(required=False, type="str"),
+ last_member_query_count=dict(required=False, type="str"),
+ group_timeout=dict(required=False, type="str"),
+ report_llg=dict(type="bool"),
+ immediate_leave=dict(type="bool"),
+ oif_routemap=dict(required=False, type="str"),
+ oif_ps=dict(required=False, type="raw"),
+ restart=dict(type="bool", default=False),
+ state=dict(
+ choices=["present", "absent", "default"], default="present"
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+ mutually_exclusive = [("oif_ps", "oif_routemap")]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+
+ state = module.params["state"]
+ interface = module.params["interface"]
+ oif_routemap = module.params["oif_routemap"]
+ oif_ps = module.params["oif_ps"]
+
+ intf_type = get_interface_type(interface)
+ if get_interface_mode(interface, intf_type, module) == "layer2":
+ module.fail_json(msg="this module only works on Layer 3 interfaces")
+
+ existing = get_igmp_interface(module, interface)
+ existing_copy = existing.copy()
+ end_state = existing_copy
+
+ if not existing.get("version"):
+ module.fail_json(msg="pim needs to be enabled on the interface")
+
+ existing_oif_prefix_source = existing.get("oif_prefix_source")
+ # not json serializable
+ existing.pop("oif_prefix_source")
+
+ if oif_routemap and existing_oif_prefix_source:
+ module.fail_json(
+ msg="Delete static-oif configurations on this "
+ "interface if you want to use a routemap"
+ )
+
+ if oif_ps and existing.get("oif_routemap"):
+ module.fail_json(
+ msg="Delete static-oif route-map configuration "
+ "on this interface if you want to config "
+ "static entries"
+ )
+
+ args = [
+ "version",
+ "startup_query_interval",
+ "startup_query_count",
+ "robustness",
+ "querier_timeout",
+ "query_mrt",
+ "query_interval",
+ "last_member_qrt",
+ "last_member_query_count",
+ "group_timeout",
+ "report_llg",
+ "immediate_leave",
+ "oif_routemap",
+ ]
+
+ changed = False
+ commands = []
+ proposed = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+
+ CANNOT_ABSENT = [
+ "version",
+ "startup_query_interval",
+ "startup_query_count",
+ "robustness",
+ "querier_timeout",
+ "query_mrt",
+ "query_interval",
+ "last_member_qrt",
+ "last_member_query_count",
+ "group_timeout",
+ "report_llg",
+ "immediate_leave",
+ ]
+
+ if state == "absent":
+ for each in CANNOT_ABSENT:
+ if each in proposed:
+ module.fail_json(
+ msg="only params: "
+ "oif_ps, oif_routemap can be used when "
+ "state=absent"
+ )
+
+ # delta check for all params except oif_ps
+ delta = dict(set(proposed.items()).difference(existing.items()))
+
+ if oif_ps:
+ if oif_ps == "default":
+ delta["oif_ps"] = []
+ else:
+ delta["oif_ps"] = oif_ps
+
+ if state == "present":
+ if delta:
+ command = config_igmp_interface(
+ delta, existing, existing_oif_prefix_source
+ )
+ if command:
+ commands.append(command)
+
+ elif state == "default":
+ command = config_default_igmp_interface(existing, delta)
+ if command:
+ commands.append(command)
+ elif state == "absent":
+ command = None
+ if existing.get("oif_routemap") or existing_oif_prefix_source:
+ command = config_remove_oif(existing, existing_oif_prefix_source)
+
+ if command:
+ commands.append(command)
+
+ command = config_default_igmp_interface(existing, delta)
+ if command:
+ commands.append(command)
+
+ cmds = []
+ results = {}
+ if commands:
+ commands.insert(0, ["interface {0}".format(interface)])
+ cmds = flatten_list(commands)
+
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ load_config(module, cmds)
+ changed = True
+ end_state = get_igmp_interface(module, interface)
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ if module.params["restart"]:
+ cmd = {"command": "restart igmp", "output": "text"}
+ run_commands(module, cmd)
+
+ results["proposed"] = proposed
+ results["existing"] = existing_copy
+ results["updates"] = cmds
+ results["changed"] = changed
+ results["warnings"] = warnings
+ results["end_state"] = end_state
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_igmp_snooping.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_igmp_snooping.py
new file mode 100644
index 00000000..194e610d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_igmp_snooping.py
@@ -0,0 +1,321 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_igmp_snooping
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages IGMP snooping global configuration.
+description:
+- Manages IGMP snooping global configuration.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- When C(state=default), params will be reset to a default state.
+- C(group_timeout) also accepts I(never) as an input.
+options:
+ snooping:
+ description:
+ - Enables/disables IGMP snooping on the switch.
+ type: bool
+ group_timeout:
+ description:
+ - Group membership timeout value for all VLANs on the device. Accepted values
+ are integer in range 1-10080, I(never) and I(default).
+ type: str
+ link_local_grp_supp:
+ description:
+ - Global link-local groups suppression.
+ type: bool
+ report_supp:
+ description:
+ - Global IGMPv1/IGMPv2 Report Suppression.
+ type: bool
+ v3_report_supp:
+ description:
+ - Global IGMPv3 Report Suppression and Proxy Reporting.
+ type: bool
+ state:
+ description:
+ - Manage the state of the resource.
+ default: present
+ choices:
+ - present
+ - default
+ type: str
+"""
+
+EXAMPLES = """
+# ensure igmp snooping params supported in this module are in there default state
+- cisco.nxos.nxos_igmp_snooping:
+ state: default
+
+# ensure following igmp snooping params are in the desired state
+- cisco.nxos.nxos_igmp_snooping:
+ group_timeout: never
+ snooping: true
+ link_local_grp_supp: false
+ optimize_mcast_flood: false
+ report_supp: true
+ v3_report_supp: true
+"""
+
+RETURN = """
+commands:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["ip igmp snooping link-local-groups-suppression",
+ "ip igmp snooping group-timeout 50",
+ "no ip igmp snooping report-suppression",
+ "no ip igmp snooping v3-report-suppression",
+ "no ip igmp snooping"]
+"""
+
+
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def execute_show_command(command, module, output="text"):
+ command = {"command": command, "output": output}
+
+ return run_commands(module, [command])
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_group_timeout(config):
+ match = re.search(r" Group timeout configured: (\S+)", config, re.M)
+ if match:
+ value = match.group(1)
+ else:
+ value = ""
+ return value
+
+
+def get_igmp_snooping(module):
+ command = "show ip igmp snooping"
+ existing = {}
+
+ try:
+ body = execute_show_command(command, module, output="json")[0]
+ except IndexError:
+ body = []
+
+ if body:
+ snooping = str(body.get("enabled")).lower()
+ if snooping == "true" or snooping == "enabled":
+ existing["snooping"] = True
+ else:
+ existing["snooping"] = False
+
+ report_supp = str(body.get("grepsup")).lower()
+ if report_supp == "true" or report_supp == "enabled":
+ existing["report_supp"] = True
+ else:
+ existing["report_supp"] = False
+
+ link_local_grp_supp = str(body.get("glinklocalgrpsup")).lower()
+ if link_local_grp_supp == "true" or link_local_grp_supp == "enabled":
+ existing["link_local_grp_supp"] = True
+ else:
+ existing["link_local_grp_supp"] = False
+
+ v3_report_supp = str(body.get("gv3repsup")).lower()
+ if v3_report_supp == "true" or v3_report_supp == "enabled":
+ existing["v3_report_supp"] = True
+ else:
+ existing["v3_report_supp"] = False
+
+ command = "show ip igmp snooping"
+ body = execute_show_command(command, module)[0]
+ if body:
+ existing["group_timeout"] = get_group_timeout(body)
+
+ return existing
+
+
+def config_igmp_snooping(delta, existing, default=False):
+ CMDS = {
+ "snooping": "ip igmp snooping",
+ "group_timeout": "ip igmp snooping group-timeout {}",
+ "link_local_grp_supp": "ip igmp snooping link-local-groups-suppression",
+ "v3_report_supp": "ip igmp snooping v3-report-suppression",
+ "report_supp": "ip igmp snooping report-suppression",
+ }
+
+ commands = []
+ command = None
+ gt_command = None
+ for key, value in delta.items():
+ if value:
+ if default and key == "group_timeout":
+ if existing.get(key):
+ gt_command = "no " + CMDS.get(key).format(
+ existing.get(key)
+ )
+ elif value == "default" and key == "group_timeout":
+ if existing.get(key):
+ command = "no " + CMDS.get(key).format(existing.get(key))
+ else:
+ command = CMDS.get(key).format(value)
+ else:
+ command = "no " + CMDS.get(key).format(value)
+
+ if command:
+ commands.append(command)
+ command = None
+
+ if gt_command:
+ # ensure that group-timeout command is configured last
+ commands.append(gt_command)
+ return commands
+
+
+def get_igmp_snooping_defaults():
+ group_timeout = "dummy"
+ report_supp = True
+ link_local_grp_supp = True
+ v3_report_supp = False
+ snooping = True
+
+ args = dict(
+ snooping=snooping,
+ link_local_grp_supp=link_local_grp_supp,
+ report_supp=report_supp,
+ v3_report_supp=v3_report_supp,
+ group_timeout=group_timeout,
+ )
+
+ default = dict(
+ (param, value) for (param, value) in args.items() if value is not None
+ )
+
+ return default
+
+
+def igmp_snooping_gt_dependency(command, existing, module):
+ # group-timeout will fail if igmp snooping is disabled
+ gt = [i for i in command if i.startswith("ip igmp snooping group-timeout")]
+ if gt:
+ if "no ip igmp snooping" in command or (
+ existing["snooping"] is False and "ip igmp snooping" not in command
+ ):
+ msg = "group-timeout cannot be enabled or changed when ip igmp snooping is disabled"
+ module.fail_json(msg=msg)
+ else:
+ # ensure that group-timeout command is configured last
+ command.remove(gt[0])
+ command.append(gt[0])
+
+
+def main():
+ argument_spec = dict(
+ snooping=dict(required=False, type="bool"),
+ group_timeout=dict(required=False, type="str"),
+ link_local_grp_supp=dict(required=False, type="bool"),
+ report_supp=dict(required=False, type="bool"),
+ v3_report_supp=dict(required=False, type="bool"),
+ state=dict(choices=["present", "default"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ snooping = module.params["snooping"]
+ link_local_grp_supp = module.params["link_local_grp_supp"]
+ report_supp = module.params["report_supp"]
+ v3_report_supp = module.params["v3_report_supp"]
+ group_timeout = module.params["group_timeout"]
+ state = module.params["state"]
+
+ args = dict(
+ snooping=snooping,
+ link_local_grp_supp=link_local_grp_supp,
+ report_supp=report_supp,
+ v3_report_supp=v3_report_supp,
+ group_timeout=group_timeout,
+ )
+
+ proposed = dict(
+ (param, value) for (param, value) in args.items() if value is not None
+ )
+
+ existing = get_igmp_snooping(module)
+
+ commands = []
+ if state == "present":
+ delta = dict(set(proposed.items()).difference(existing.items()))
+ if delta:
+ command = config_igmp_snooping(delta, existing)
+ if command:
+ if group_timeout:
+ igmp_snooping_gt_dependency(command, existing, module)
+ commands.append(command)
+ elif state == "default":
+ proposed = get_igmp_snooping_defaults()
+ delta = dict(set(proposed.items()).difference(existing.items()))
+ if delta:
+ command = config_igmp_snooping(delta, existing, default=True)
+ if command:
+ commands.append(command)
+
+ cmds = flatten_list(commands)
+ if cmds:
+ results["changed"] = True
+ if not module.check_mode:
+ load_config(module, cmds)
+ if "configure" in cmds:
+ cmds.pop(0)
+ results["commands"] = cmds
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_install_os.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_install_os.py
new file mode 100644
index 00000000..bd9a8858
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_install_os.py
@@ -0,0 +1,607 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_install_os
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Set boot options like boot, kickstart image and issu.
+description:
+- Install an operating system by setting the boot options like boot image and kickstart
+ image and optionally select to install using ISSU (In Server Software Upgrade).
+version_added: 1.0.0
+notes:
+- Tested against the following platforms and images - N9k 7.0(3)I4(6), 7.0(3)I5(3),
+ 7.0(3)I6(1), 7.0(3)I7(1), 7.0(3)F2(2), 7.0(3)F3(2) - N3k 6.0(2)A8(6), 6.0(2)A8(8),
+ 7.0(3)I6(1), 7.0(3)I7(1) - N7k 7.3(0)D1(1), 8.0(1), 8.1(1), 8.2(1)
+- This module requires both the ANSIBLE_PERSISTENT_CONNECT_TIMEOUT and ANSIBLE_PERSISTENT_COMMAND_TIMEOUT
+ timers to be set to 600 seconds or higher. The module will exit if the timers are
+ not set properly.
+- When using connection local, ANSIBLE_PERSISTENT_CONNECT_TIMEOUT and ANSIBLE_PERSISTENT_COMMAND_TIMEOUT
+ can only be set using ENV variables or the ansible.cfg file.
+- Do not include full file paths, just the name of the file(s) stored on the top level
+ flash directory.
+- This module attempts to install the software immediately, which may trigger a reboot.
+- In check mode, the module will indicate if an upgrade is needed and whether or not
+ the upgrade is disruptive or non-disruptive(ISSU).
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbibo (@GGabriele)
+options:
+ system_image_file:
+ description:
+ - Name of the system (or combined) image file on flash.
+ required: true
+ type: str
+ kickstart_image_file:
+ description:
+ - Name of the kickstart image file on flash. (Not required on all Nexus platforms)
+ type: str
+ issu:
+ description:
+ - Upgrade using In Service Software Upgrade (ISSU). (Supported on N5k, N7k, N9k
+ platforms)
+ - Selecting 'required' or 'yes' means that upgrades will only proceed if the switch
+ is capable of ISSU.
+ - Selecting 'desired' means that upgrades will use ISSU if possible but will fall
+ back to disruptive upgrade if needed.
+ - Selecting 'no' means do not use ISSU. Forced disruptive.
+ choices:
+ - "required"
+ - "desired"
+ - "yes"
+ - "no"
+ default: "no"
+ type: str
+"""
+
+EXAMPLES = """
+- name: Install OS on N9k
+ check_mode: no
+ cisco.nxos.nxos_install_os:
+ system_image_file: nxos.7.0.3.I6.1.bin
+ issu: desired
+
+- name: Wait for device to come back up with new image
+ wait_for:
+ port: 22
+ state: started
+ timeout: 500
+ delay: 60
+ host: '{{ inventory_hostname }}'
+
+- name: Check installed OS for newly installed version
+ nxos_command:
+ commands: [show version | json]
+ provider: '{{ connection }}'
+ register: output
+- assert:
+ that:
+ - output['stdout'][0]['kickstart_ver_str'] == '7.0(3)I6(1)'
+"""
+
+RETURN = """
+install_state:
+ description: Boot and install information.
+ returned: always
+ type: dict
+ sample: {
+ "install_state": [
+ "Compatibility check is done:",
+ "Module bootable Impact Install-type Reason",
+ "------ -------- -------------- ------------ ------",
+ " 1 yes non-disruptive reset ",
+ "Images will be upgraded according to following table:",
+ "Module Image Running-Version(pri:alt) New-Version Upg-Required",
+ "------ ---------- ---------------------------------------- -------------------- ------------",
+ " 1 nxos 7.0(3)I6(1) 7.0(3)I7(1) yes",
+ " 1 bios v4.4.0(07/12/2017) v4.4.0(07/12/2017) no"
+ ],
+ }
+"""
+
+
+import re
+from time import sleep
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+# Output options are 'text' or 'json'
+def execute_show_command(module, command, output="text"):
+ cmds = [{"command": command, "output": output}]
+
+ return run_commands(module, cmds)
+
+
+def get_platform(module):
+ """Determine platform type"""
+ data = execute_show_command(module, "show inventory", "json")
+ pid = data[0]["TABLE_inv"]["ROW_inv"][0]["productid"]
+
+ if re.search(r"N3K", pid):
+ type = "N3K"
+ elif re.search(r"N5K", pid):
+ type = "N5K"
+ elif re.search(r"N6K", pid):
+ type = "N6K"
+ elif re.search(r"N7K", pid):
+ type = "N7K"
+ elif re.search(r"N9K", pid):
+ type = "N9K"
+ else:
+ type = "unknown"
+
+ return type
+
+
+def parse_show_install(data):
+ """Helper method to parse the output of the 'show install all impact' or
+ 'install all' commands.
+
+ Sample Output:
+
+ Installer will perform impact only check. Please wait.
+
+ Verifying image bootflash:/nxos.7.0.3.F2.2.bin for boot variable "nxos".
+ [####################] 100% -- SUCCESS
+
+ Verifying image type.
+ [####################] 100% -- SUCCESS
+
+ Preparing "bios" version info using image bootflash:/nxos.7.0.3.F2.2.bin.
+ [####################] 100% -- SUCCESS
+
+ Preparing "nxos" version info using image bootflash:/nxos.7.0.3.F2.2.bin.
+ [####################] 100% -- SUCCESS
+
+ Performing module support checks.
+ [####################] 100% -- SUCCESS
+
+ Notifying services about system upgrade.
+ [####################] 100% -- SUCCESS
+
+
+
+ Compatibility check is done:
+ Module bootable Impact Install-type Reason
+ ------ -------- -------------- ------------ ------
+ 8 yes disruptive reset Incompatible image for ISSU
+ 21 yes disruptive reset Incompatible image for ISSU
+
+
+ Images will be upgraded according to following table:
+ Module Image Running-Version(pri:alt) New-Version Upg-Required
+ ------ ---------- ---------------------------------------- ------------
+ 8 lcn9k 7.0(3)F3(2) 7.0(3)F2(2) yes
+ 8 bios v01.17 v01.17 no
+ 21 lcn9k 7.0(3)F3(2) 7.0(3)F2(2) yes
+ 21 bios v01.70 v01.70 no
+ """
+ if len(data) > 0:
+ data = massage_install_data(data)
+ ud = {"raw": data}
+ ud["processed"] = []
+ ud["disruptive"] = False
+ ud["upgrade_needed"] = False
+ ud["error"] = False
+ ud["invalid_command"] = False
+ ud["install_in_progress"] = False
+ ud["server_error"] = False
+ ud["upgrade_succeeded"] = False
+ ud["use_impact_data"] = False
+
+ # Check for server errors
+ if isinstance(data, int):
+ if data == -1:
+ ud["server_error"] = True
+ elif data >= 500:
+ ud["server_error"] = True
+ elif data == -32603:
+ ud["server_error"] = True
+ elif data == 1:
+ ud["server_error"] = True
+ return ud
+ else:
+ ud["list_data"] = data.split("\n")
+
+ for x in ud["list_data"]:
+ # Check for errors and exit if found.
+ if re.search(r"Pre-upgrade check failed", x):
+ ud["error"] = True
+ break
+ if re.search(r"[I|i]nvalid command", x):
+ ud["invalid_command"] = True
+ ud["error"] = True
+ break
+ if re.search(r"No install all data found", x):
+ ud["error"] = True
+ break
+
+ # Check for potentially transient conditions
+ if re.search(r"Another install procedure may\s*be in progress", x):
+ ud["install_in_progress"] = True
+ break
+ if re.search(r"Backend processing error", x):
+ ud["server_error"] = True
+ break
+ if re.search(r"timed out", x):
+ ud["server_error"] = True
+ break
+ if re.search(r"^(-1|5\d\d)$", x):
+ ud["server_error"] = True
+ break
+
+ # Check for messages indicating a successful upgrade.
+ if re.search(r"Finishing the upgrade", x):
+ ud["upgrade_succeeded"] = True
+ break
+ if re.search(r"Install has been successful", x):
+ ud["upgrade_succeeded"] = True
+ break
+ if re.search(r"Switching over onto standby", x):
+ ud["upgrade_succeeded"] = True
+ break
+
+ # We get these messages when the upgrade is non-disruptive and
+ # we loose connection with the switchover but far enough along that
+ # we can be confident the upgrade succeeded.
+ if re.search(r"timeout .*trying to send command: install", x):
+ ud["upgrade_succeeded"] = True
+ ud["use_impact_data"] = True
+ break
+ if re.search(r"[C|c]onnection failure: timed out", x):
+ ud["upgrade_succeeded"] = True
+ ud["use_impact_data"] = True
+ break
+
+ # Begin normal parsing.
+ if re.search(r"----|Module|Images will|Compatibility", x):
+ ud["processed"].append(x)
+ continue
+ # Check to see if upgrade will be disruptive or non-disruptive and
+ # build dictionary of individual modules and their status.
+ # Sample Line:
+ #
+ # Module bootable Impact Install-type Reason
+ # ------ -------- ---------- ------------ ------
+ # 8 yes disruptive reset Incompatible image
+ rd = r"(\d+)\s+(\S+)\s+(disruptive|non-disruptive)\s+(\S+)"
+ mo = re.search(rd, x)
+ if mo:
+ ud["processed"].append(x)
+ key = "m%s" % mo.group(1)
+ field = "disruptive"
+ if mo.group(3) == "non-disruptive":
+ ud[key] = {field: False}
+ else:
+ ud[field] = True
+ ud[key] = {field: True}
+ field = "bootable"
+ if mo.group(2) == "yes":
+ ud[key].update({field: True})
+ else:
+ ud[key].update({field: False})
+ continue
+
+ # Check to see if switch needs an upgrade and build a dictionary
+ # of individual modules and their individual upgrade status.
+ # Sample Line:
+ #
+ # Module Image Running-Version(pri:alt) New-Version Upg-Required
+ # ------ ----- ---------------------------------------- ------------
+ # 8 lcn9k 7.0(3)F3(2) 7.0(3)F2(2) yes
+ mo = re.search(r"(\d+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(yes|no)", x)
+ if mo:
+ ud["processed"].append(x)
+ key = "m%s_%s" % (mo.group(1), mo.group(2))
+ field = "upgrade_needed"
+ if mo.group(5) == "yes":
+ ud[field] = True
+ ud[key] = {field: True}
+ else:
+ ud[key] = {field: False}
+ continue
+
+ return ud
+
+
+def massage_install_data(data):
+ # Transport cli returns a list containing one result item.
+ # Transport nxapi returns a list containing two items. The second item
+ # contains the data we are interested in.
+ default_error_msg = "No install all data found"
+ if len(data) == 1:
+ result_data = data[0]
+ elif len(data) == 2:
+ result_data = data[1]
+ else:
+ result_data = default_error_msg
+
+ # Further processing may be needed for result_data
+ if len(data) == 2 and isinstance(data[1], dict):
+ if "clierror" in data[1].keys():
+ result_data = data[1]["clierror"]
+ elif "code" in data[1].keys() and data[1]["code"] == "500":
+ # We encountered a backend processing error for nxapi
+ result_data = data[1]["msg"]
+ else:
+ result_data = default_error_msg
+ return result_data
+
+
+def build_install_cmd_set(issu, image, kick, type, force=True):
+ commands = ["terminal dont-ask"]
+
+ # Different NX-OS platforms behave differently for
+ # disruptive and non-disruptive upgrade paths.
+ #
+ # 1) Combined kickstart/system image:
+ # * Use option 'non-disruptive' for issu.
+ # * Omit option 'non-disruptive' for disruptive upgrades.
+ # 2) Separate kickstart + system images.
+ # * Omit hidden 'force' option for issu.
+ # * Use hidden 'force' option for disruptive upgrades.
+ # * Note: Not supported on all platforms
+ if re.search(r"required|desired|yes", issu):
+ if kick is None:
+ issu_cmd = "non-disruptive"
+ else:
+ issu_cmd = ""
+ else:
+ if kick is None:
+ issu_cmd = ""
+ else:
+ issu_cmd = "force" if force else ""
+
+ if type == "impact":
+ rootcmd = "show install all impact"
+ # The force option is not available for the impact command.
+ if kick:
+ issu_cmd = ""
+ else:
+ rootcmd = "install all"
+ if kick is None:
+ commands.append("%s nxos %s %s" % (rootcmd, image, issu_cmd))
+ else:
+ commands.append(
+ "%s %s system %s kickstart %s" % (rootcmd, issu_cmd, image, kick)
+ )
+
+ return commands
+
+
+def parse_show_version(data):
+ version_data = {"raw": data[0].split("\n")}
+ version_data["version"] = ""
+ version_data["error"] = False
+ for x in version_data["raw"]:
+ mo = re.search(r"(kickstart|system|NXOS):\s+version\s+(\S+)", x)
+ if mo:
+ version_data["version"] = mo.group(2)
+ continue
+
+ if version_data["version"] == "":
+ version_data["error"] = True
+
+ return version_data
+
+
+def check_mode_legacy(module, issu, image, kick=None):
+ """Some platforms/images/transports don't support the 'install all impact'
+ command so we need to use a different method."""
+ current = execute_show_command(module, "show version", "json")[0]
+ # Call parse_show_data on empty string to create the default upgrade
+ # data structure dictionary
+ data = parse_show_install("")
+ upgrade_msg = "No upgrade required"
+
+ # Process System Image
+ data["error"] = False
+ tsver = "show version image bootflash:%s" % image
+ data["upgrade_cmd"] = [tsver]
+ target_image = parse_show_version(execute_show_command(module, tsver))
+ if target_image["error"]:
+ data["error"] = True
+ data["raw"] = target_image["raw"]
+ if (
+ current["kickstart_ver_str"] != target_image["version"]
+ and not data["error"]
+ ):
+ data["upgrade_needed"] = True
+ data["disruptive"] = True
+ upgrade_msg = "Switch upgraded: system: %s" % tsver
+
+ # Process Kickstart Image
+ if kick is not None and not data["error"]:
+ tkver = "show version image bootflash:%s" % kick
+ data["upgrade_cmd"].append(tsver)
+ target_kick = parse_show_version(execute_show_command(module, tkver))
+ if target_kick["error"]:
+ data["error"] = True
+ data["raw"] = target_kick["raw"]
+ if (
+ current["kickstart_ver_str"] != target_kick["version"]
+ and not data["error"]
+ ):
+ data["upgrade_needed"] = True
+ data["disruptive"] = True
+ upgrade_msg = upgrade_msg + " kickstart: %s" % tkver
+
+ data["list_data"] = data["raw"]
+ data["processed"] = upgrade_msg
+ return data
+
+
+def check_mode_nextgen(module, issu, image, kick=None):
+ """Use the 'install all impact' command for check_mode"""
+ opts = {"ignore_timeout": True}
+ commands = build_install_cmd_set(issu, image, kick, "impact")
+ data = parse_show_install(load_config(module, commands, True, opts))
+ # If an error is encountered when issu is 'desired' then try again
+ # but set issu to 'no'
+ if data["error"] and issu == "desired":
+ issu = "no"
+ commands = build_install_cmd_set(issu, image, kick, "impact")
+ # The system may be busy from the previous call to check_mode so loop
+ # until it's done.
+ data = check_install_in_progress(module, commands, opts)
+ if data["server_error"]:
+ data["error"] = True
+ data["upgrade_cmd"] = commands
+ return data
+
+
+def check_install_in_progress(module, commands, opts):
+ for attempt in range(20):
+ data = parse_show_install(load_config(module, commands, True, opts))
+ if data["install_in_progress"]:
+ sleep(1)
+ continue
+ break
+ return data
+
+
+def check_mode(module, issu, image, kick=None):
+ """Check switch upgrade impact using 'show install all impact' command"""
+ data = check_mode_nextgen(module, issu, image, kick)
+ if data["server_error"]:
+ # We encountered an unrecoverable error in the attempt to get upgrade
+ # impact data from the 'show install all impact' command.
+ # Fallback to legacy method.
+ data = check_mode_legacy(module, issu, image, kick)
+ if data["invalid_command"]:
+ # If we are upgrading from a device running a separate kickstart and
+ # system image the impact command will fail.
+ # Fallback to legacy method.
+ data = check_mode_legacy(module, issu, image, kick)
+ return data
+
+
+def do_install_all(module, issu, image, kick=None):
+ """Perform the switch upgrade using the 'install all' command"""
+ impact_data = check_mode(module, issu, image, kick)
+ if module.check_mode:
+ # Check mode set in the playbook so just return the impact data.
+ msg = "*** SWITCH WAS NOT UPGRADED: IMPACT DATA ONLY ***"
+ impact_data["processed"].append(msg)
+ return impact_data
+ if impact_data["error"]:
+ # Check mode discovered an error so return with this info.
+ return impact_data
+ elif not impact_data["upgrade_needed"]:
+ # The switch is already upgraded. Nothing more to do.
+ return impact_data
+ else:
+ # If we get here, check_mode returned no errors and the switch
+ # needs to be upgraded.
+ if impact_data["disruptive"]:
+ # Check mode indicated that ISSU is not possible so issue the
+ # upgrade command without the non-disruptive flag unless the
+ # playbook specified issu: yes/required.
+ if issu == "yes":
+ msg = "ISSU/ISSD requested but impact data indicates ISSU/ISSD is not possible"
+ module.fail_json(msg=msg, raw_data=impact_data["list_data"])
+ else:
+ issu = "no"
+
+ commands = build_install_cmd_set(issu, image, kick, "install")
+ opts = {"ignore_timeout": True}
+ # The system may be busy from the call to check_mode so loop until
+ # it's done.
+ upgrade = check_install_in_progress(module, commands, opts)
+ if upgrade["invalid_command"] and "force" in commands[1]:
+ # Not all platforms support the 'force' keyword. Check for this
+ # condition and re-try without the 'force' keyword if needed.
+ commands = build_install_cmd_set(
+ issu, image, kick, "install", False
+ )
+ upgrade = check_install_in_progress(module, commands, opts)
+ upgrade["upgrade_cmd"] = commands
+
+ # Special case: If we encounter a server error at this stage
+ # it means the command was sent and the upgrade was started but
+ # we will need to use the impact data instead of the current install
+ # data.
+ if upgrade["server_error"]:
+ upgrade["upgrade_succeeded"] = True
+ upgrade["use_impact_data"] = True
+
+ if upgrade["use_impact_data"]:
+ if upgrade["upgrade_succeeded"]:
+ upgrade = impact_data
+ upgrade["upgrade_succeeded"] = True
+ else:
+ upgrade = impact_data
+ upgrade["upgrade_succeeded"] = False
+
+ if not upgrade["upgrade_succeeded"]:
+ upgrade["error"] = True
+ return upgrade
+
+
+def main():
+ argument_spec = dict(
+ system_image_file=dict(required=True),
+ kickstart_image_file=dict(required=False),
+ issu=dict(choices=["required", "desired", "no", "yes"], default="no"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ # Get system_image_file(sif), kickstart_image_file(kif) and
+ # issu settings from module params.
+ sif = module.params["system_image_file"]
+ kif = module.params["kickstart_image_file"]
+ issu = module.params["issu"]
+
+ if re.search(r"(yes|required)", issu):
+ issu = "yes"
+
+ if kif == "null" or kif == "":
+ kif = None
+
+ install_result = do_install_all(module, issu, sif, kick=kif)
+ if install_result["error"]:
+ cmd = install_result["upgrade_cmd"]
+ msg = "Failed to upgrade device using command: %s" % cmd
+ module.fail_json(msg=msg, raw_data=install_result["list_data"])
+
+ state = install_result["processed"]
+ changed = install_result["upgrade_needed"]
+ module.exit_json(changed=changed, install_state=state, warnings=warnings)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_interface.py
new file mode 100644
index 00000000..1393f883
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_interface.py
@@ -0,0 +1,991 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_interface
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2022-06-01) Manages physical
+ attributes of interfaces.
+description:
+- Manages physical attributes of interfaces of NX-OS switches.
+version_added: 1.0.0
+deprecated:
+ alternative: nxos_interfaces
+ why: Updated modules released with more functionality
+ removed_at_date: '2022-06-01'
+author:
+- Jason Edelman (@jedelman8)
+- Trishna Guha (@trishnaguha)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- This module is also used to create logical interfaces such as svis and loopbacks.
+- Be cautious of platform specific idiosyncrasies. For example, when you default a
+ loopback interface, the admin state toggles on certain versions of NX-OS.
+- The M(cisco.nxos.nxos_overlay_global) C(anycast_gateway_mac) attribute must be set before setting
+ the C(fabric_forwarding_anycast_gateway) property.
+options:
+ name:
+ description:
+ - Full name of interface, i.e. Ethernet1/1, port-channel10.
+ aliases:
+ - interface
+ type: str
+ interface_type:
+ description:
+ - Interface type to be unconfigured from the device.
+ choices:
+ - loopback
+ - portchannel
+ - svi
+ - nve
+ type: str
+ speed:
+ description:
+ - Interface link speed. Applicable for ethernet interface only.
+ type: str
+ admin_state:
+ description:
+ - Administrative state of the interface.
+ default: up
+ choices:
+ - up
+ - down
+ type: str
+ description:
+ description:
+ - Interface description.
+ type: str
+ mode:
+ description:
+ - Manage Layer 2 or Layer 3 state of the interface. This option is supported for
+ ethernet and portchannel interface. Applicable for ethernet and portchannel
+ interface only.
+ choices:
+ - layer2
+ - layer3
+ type: str
+ mtu:
+ description:
+ - MTU for a specific interface. Must be an even number between 576 and 9216. Applicable
+ for ethernet interface only.
+ type: str
+ ip_forward:
+ description:
+ - Enable/Disable ip forward feature on SVIs.
+ choices:
+ - enable
+ - disable
+ type: str
+ fabric_forwarding_anycast_gateway:
+ description:
+ - Associate SVI with anycast gateway under VLAN configuration mode. Applicable
+ for SVI interface only.
+ type: bool
+ duplex:
+ description:
+ - Interface link status. Applicable for ethernet interface only.
+ choices:
+ - full
+ - half
+ - auto
+ type: str
+ tx_rate:
+ description:
+ - Transmit rate in bits per second (bps).
+ - This is state check parameter only.
+ - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
+ type: str
+ rx_rate:
+ description:
+ - Receiver rate in bits per second (bps).
+ - This is state check parameter only.
+ - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
+ type: str
+ neighbors:
+ description:
+ - Check the operational state of given interface C(name) for LLDP neighbor.
+ - The following suboptions are available. This is state check parameter only.
+ type: list
+ elements: dict
+ suboptions:
+ host:
+ description:
+ - LLDP neighbor host for given interface C(name).
+ type: str
+ port:
+ description:
+ - LLDP neighbor port to which given interface C(name) is connected.
+ type: str
+ aggregate:
+ description: List of Interfaces definitions.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of interface, i.e. Ethernet1/1, port-channel10.
+ required: true
+ type: str
+ interface_type:
+ description:
+ - Interface type to be unconfigured from the device.
+ choices:
+ - loopback
+ - portchannel
+ - svi
+ - nve
+ type: str
+ speed:
+ description:
+ - Interface link speed. Applicable for ethernet interface only.
+ type: str
+ admin_state:
+ description:
+ - Administrative state of the interface.
+ choices:
+ - up
+ - down
+ type: str
+ description:
+ description:
+ - Interface description.
+ type: str
+ mode:
+ description:
+ - Manage Layer 2 or Layer 3 state of the interface. This option is supported for
+ ethernet and portchannel interface. Applicable for ethernet and portchannel
+ interface only.
+ choices:
+ - layer2
+ - layer3
+ type: str
+ mtu:
+ description:
+ - MTU for a specific interface. Must be an even number between 576 and 9216. Applicable
+ for ethernet interface only.
+ type: str
+ ip_forward:
+ description:
+ - Enable/Disable ip forward feature on SVIs.
+ choices:
+ - enable
+ - disable
+ type: str
+ fabric_forwarding_anycast_gateway:
+ description:
+ - Associate SVI with anycast gateway under VLAN configuration mode. Applicable
+ for SVI interface only.
+ type: bool
+ duplex:
+ description:
+ - Interface link status. Applicable for ethernet interface only.
+ choices:
+ - full
+ - half
+ - auto
+ type: str
+ tx_rate:
+ description:
+ - Transmit rate in bits per second (bps).
+ - This is state check parameter only.
+ - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
+ type: str
+ rx_rate:
+ description:
+ - Receiver rate in bits per second (bps).
+ - This is state check parameter only.
+ - Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
+ type: str
+ neighbors:
+ description:
+ - Check the operational state of given interface C(name) for LLDP neighbor.
+ - The following suboptions are available. This is state check parameter only.
+ type: list
+ elements: dict
+ suboptions:
+ host:
+ description:
+ - LLDP neighbor host for given interface C(name).
+ type: str
+ port:
+ description:
+ - LLDP neighbor port to which given interface C(name) is connected.
+ type: str
+ state:
+ description:
+ - Specify desired state of the resource.
+ choices:
+ - present
+ - absent
+ - default
+ type: str
+ delay:
+ description:
+ - Time in seconds to wait before checking for the operational state on remote
+ device. This wait is applicable for operational state arguments.
+ type: int
+ state:
+ description:
+ - Specify desired state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ - default
+ type: str
+ delay:
+ description:
+ - Time in seconds to wait before checking for the operational state on remote
+ device. This wait is applicable for operational state arguments.
+ default: 10
+ type: int
+
+
+"""
+
+EXAMPLES = """
+- name: Ensure an interface is a Layer 3 port and that it has the proper description
+ cisco.nxos.nxos_interface:
+ name: Ethernet1/1
+ description: Configured by Ansible
+ mode: layer3
+
+- name: Admin down an interface
+ cisco.nxos.nxos_interface:
+ name: Ethernet2/1
+ admin_state: down
+
+- name: Remove all loopback interfaces
+ cisco.nxos.nxos_interface:
+ name: loopback
+ state: absent
+
+- name: Remove all logical interfaces
+ cisco.nxos.nxos_interface:
+ interface_type: '{{ item }} '
+ state: absent
+ loop:
+ - loopback
+ - portchannel
+ - svi
+ - nve
+
+- name: Admin up all loopback interfaces
+ cisco.nxos.nxos_interface:
+ name: loopback 0-1023
+ admin_state: up
+
+- name: Admin down all loopback interfaces
+ cisco.nxos.nxos_interface:
+ name: loopback 0-1023
+ admin_state: down
+
+- name: Check neighbors intent arguments
+ cisco.nxos.nxos_interface:
+ name: Ethernet2/3
+ neighbors:
+ - port: Ethernet2/3
+ host: abc.mycompany.com
+
+- name: Add interface using aggregate
+ cisco.nxos.nxos_interface:
+ aggregate:
+ - {name: Ethernet0/1, mtu: 256, description: test-interface-1}
+ - {name: Ethernet0/2, mtu: 516, description: test-interface-2}
+ duplex: full
+ speed: 100
+ state: present
+
+- name: Delete interface using aggregate
+ cisco.nxos.nxos_interface:
+ aggregate:
+ - name: Loopback9
+ - name: Loopback10
+ state: absent
+
+- name: Check intent arguments
+ cisco.nxos.nxos_interface:
+ name: Ethernet0/2
+ state: up
+ tx_rate: ge(0)
+ rx_rate: le(0)
+"""
+
+RETURN = """
+commands:
+ description: command list sent to the device
+ returned: always
+ type: list
+ sample:
+ - interface Ethernet2/3
+ - mtu 1500
+ - speed 10
+"""
+
+import re
+import time
+
+from copy import deepcopy
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+ normalize_interface,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_interface_type,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ conditional,
+ remove_default_spec,
+)
+
+
+def execute_show_command(command, module):
+ if "show run" not in command:
+ output = "json"
+ else:
+ output = "text"
+ cmds = [{"command": command, "output": output}]
+ body = run_commands(module, cmds, check_rc=False)
+ if body and "Invalid" in body[0]:
+ return []
+ else:
+ return body
+
+
+def search_obj_in_list(name, lst):
+ for o in lst:
+ if o["name"] == name:
+ return o
+
+ return None
+
+
+def get_interfaces_dict(module):
+ """Gets all active interfaces on a given switch
+ """
+ try:
+ body = execute_show_command("show interface", module)[0]
+ except IndexError:
+ return {}
+
+ interfaces = {
+ "ethernet": [],
+ "svi": [],
+ "loopback": [],
+ "management": [],
+ "portchannel": [],
+ "nve": [],
+ "unknown": [],
+ }
+
+ if body:
+ interface_list = body["TABLE_interface"]["ROW_interface"]
+ for index in interface_list:
+ intf = index["interface"]
+ intf_type = get_interface_type(intf)
+ interfaces[intf_type].append(intf)
+
+ return interfaces
+
+
+def get_vlan_interface_attributes(name, intf_type, module):
+ """ Returns dictionary that has two k/v pairs:
+ admin_state & description if not an svi, returns None
+ """
+ command = "show run interface {0} all".format(name)
+ try:
+ body = execute_show_command(command, module)[0]
+ except (IndexError, TypeError):
+ return None
+ if body:
+ command_list = body.split("\n")
+ desc = None
+ admin_state = "down"
+ for each in command_list:
+ if "description" in each:
+ desc = each.lstrip().split("description")[1].lstrip()
+ elif "no shutdown" in each:
+ admin_state = "up"
+ return dict(description=desc, admin_state=admin_state)
+ else:
+ return None
+
+
+def get_interface_type_removed_cmds(interfaces):
+ commands = []
+
+ for interface in interfaces:
+ if interface != "Vlan1":
+ commands.append("no interface {0}".format(interface))
+
+ return commands
+
+
+def get_admin_state(admin_state):
+ command = ""
+ if admin_state == "up":
+ command = "no shutdown"
+ elif admin_state == "down":
+ command = "shutdown"
+ return command
+
+
+def is_default_interface(name, module):
+ """Checks to see if interface exists and if it is a default config
+ """
+ command = "show run interface {0}".format(name)
+
+ try:
+ body = execute_show_command(command, module)[0]
+ except (IndexError, TypeError):
+ body = ""
+
+ if body:
+ raw_list = body.split("\n")
+ found = False
+ for line in raw_list:
+ if line.startswith("interface"):
+ found = True
+ if found and line and not line.startswith("interface"):
+ return False
+ return True
+
+ else:
+ return "DNE"
+
+
+def add_command_to_interface(interface, cmd, commands):
+ if interface not in commands:
+ commands.append(interface)
+ commands.append(cmd)
+
+
+def map_obj_to_commands(updates, module):
+ commands = list()
+ commands2 = list()
+ want, have = updates
+
+ args = ("speed", "description", "duplex", "mtu")
+ for w in want:
+ name = w["name"]
+ mode = w["mode"]
+ ip_forward = w["ip_forward"]
+ fabric_forwarding_anycast_gateway = w[
+ "fabric_forwarding_anycast_gateway"
+ ]
+ admin_state = w["admin_state"]
+ state = w["state"]
+ interface_type = w["interface_type"]
+ del w["state"]
+ if name:
+ w["interface_type"] = None
+
+ if interface_type:
+ obj_in_have = {}
+ if state in ("present", "default"):
+ module.fail_json(
+ msg="The interface_type param can be used only with state absent."
+ )
+ else:
+ obj_in_have = search_obj_in_list(name, have)
+ is_default = is_default_interface(name, module)
+
+ if name:
+ interface = "interface " + name
+
+ if state == "absent":
+ if obj_in_have:
+ commands.append("no interface {0}".format(name))
+ elif interface_type and not obj_in_have:
+ intfs = get_interfaces_dict(module)[interface_type]
+ cmds = get_interface_type_removed_cmds(intfs)
+ commands.extend(cmds)
+
+ elif state == "present":
+ if obj_in_have:
+ # Don't run switchport command for loopback and svi interfaces
+ if get_interface_type(name) in ("ethernet", "portchannel"):
+ if mode == "layer2" and mode != obj_in_have.get("mode"):
+ add_command_to_interface(
+ interface, "switchport", commands
+ )
+ elif mode == "layer3" and mode != obj_in_have.get("mode"):
+ add_command_to_interface(
+ interface, "no switchport", commands
+ )
+
+ if admin_state == "up" and admin_state != obj_in_have.get(
+ "admin_state"
+ ):
+ add_command_to_interface(
+ interface, "no shutdown", commands
+ )
+ elif admin_state == "down" and admin_state != obj_in_have.get(
+ "admin_state"
+ ):
+ add_command_to_interface(interface, "shutdown", commands)
+
+ if ip_forward == "enable" and ip_forward != obj_in_have.get(
+ "ip_forward"
+ ):
+ add_command_to_interface(interface, "ip forward", commands)
+ elif ip_forward == "disable" and ip_forward != obj_in_have.get(
+ "ip forward"
+ ):
+ add_command_to_interface(
+ interface, "no ip forward", commands
+ )
+
+ if (
+ fabric_forwarding_anycast_gateway is True
+ and obj_in_have.get("fabric_forwarding_anycast_gateway")
+ is False
+ ):
+ add_command_to_interface(
+ interface,
+ "fabric forwarding mode anycast-gateway",
+ commands,
+ )
+
+ elif (
+ fabric_forwarding_anycast_gateway is False
+ and obj_in_have.get("fabric_forwarding_anycast_gateway")
+ is True
+ ):
+ add_command_to_interface(
+ interface,
+ "no fabric forwarding mode anycast-gateway",
+ commands,
+ )
+
+ for item in args:
+ candidate = w.get(item)
+ if candidate and candidate != obj_in_have.get(item):
+ cmd = item + " " + str(candidate)
+ add_command_to_interface(interface, cmd, commands)
+
+ if name and get_interface_type(name) == "ethernet":
+ if mode != obj_in_have.get("mode"):
+ admin_state = w.get("admin_state") or obj_in_have.get(
+ "admin_state"
+ )
+ if admin_state:
+ c1 = "interface {0}".format(
+ normalize_interface(w["name"])
+ )
+ c2 = get_admin_state(admin_state)
+ commands2.append(c1)
+ commands2.append(c2)
+
+ else:
+ commands.append(interface)
+ # Don't run switchport command for loopback and svi interfaces
+ if get_interface_type(name) in ("ethernet", "portchannel"):
+ if mode == "layer2":
+ commands.append("switchport")
+ elif mode == "layer3":
+ commands.append("no switchport")
+
+ if admin_state == "up":
+ commands.append("no shutdown")
+ elif admin_state == "down":
+ commands.append("shutdown")
+
+ if ip_forward == "enable":
+ commands.append("ip forward")
+ elif ip_forward == "disable":
+ commands.append("no ip forward")
+
+ if fabric_forwarding_anycast_gateway is True:
+ commands.append("fabric forwarding mode anycast-gateway")
+
+ elif fabric_forwarding_anycast_gateway is False:
+ commands.append(
+ "no fabric forwarding mode anycast-gateway"
+ )
+
+ for item in args:
+ candidate = w.get(item)
+ if candidate:
+ commands.append(item + " " + str(candidate))
+
+ elif state == "default":
+ if is_default is False:
+ commands.append("default interface {0}".format(name))
+ elif is_default == "DNE":
+ module.exit_json(
+ msg="interface you are trying to default does not exist"
+ )
+
+ return commands, commands2
+
+
+def map_params_to_obj(module):
+ obj = []
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+
+ d = item.copy()
+ name = d["name"]
+ d["name"] = normalize_interface(name)
+ obj.append(d)
+
+ else:
+ obj.append(
+ {
+ "name": normalize_interface(module.params["name"]),
+ "description": module.params["description"],
+ "speed": module.params["speed"],
+ "mode": module.params["mode"],
+ "mtu": module.params["mtu"],
+ "duplex": module.params["duplex"],
+ "ip_forward": module.params["ip_forward"],
+ "fabric_forwarding_anycast_gateway": module.params[
+ "fabric_forwarding_anycast_gateway"
+ ],
+ "admin_state": module.params["admin_state"],
+ "state": module.params["state"],
+ "interface_type": module.params["interface_type"],
+ "tx_rate": module.params["tx_rate"],
+ "rx_rate": module.params["rx_rate"],
+ "neighbors": module.params["neighbors"],
+ }
+ )
+
+ return obj
+
+
+def map_config_to_obj(want, module):
+ objs = list()
+
+ for w in want:
+ obj = dict(
+ name=None,
+ description=None,
+ admin_state=None,
+ speed=None,
+ mtu=None,
+ mode=None,
+ duplex=None,
+ interface_type=None,
+ ip_forward=None,
+ fabric_forwarding_anycast_gateway=None,
+ )
+
+ if not w["name"]:
+ return obj
+
+ command = "show interface {0}".format(w["name"])
+ try:
+ body = execute_show_command(command, module)[0]
+ except IndexError:
+ return list()
+ if body:
+ try:
+ interface_table = body["TABLE_interface"]["ROW_interface"]
+ except (KeyError, TypeError):
+ return list()
+
+ if interface_table:
+ if interface_table.get("eth_mode") == "fex-fabric":
+ module.fail_json(
+ msg='nxos_interface does not support interfaces with mode "fex-fabric"'
+ )
+
+ intf_type = get_interface_type(w["name"])
+
+ if intf_type in ["portchannel", "ethernet"]:
+ mode = interface_table.get("eth_mode")
+ if mode in ("access", "trunk", "dot1q-tunnel"):
+ obj["mode"] = "layer2"
+ elif mode in ("routed", "layer3"):
+ obj["mode"] = "layer3"
+ else:
+ obj["mode"] = "layer3"
+
+ if intf_type == "ethernet":
+ obj["name"] = normalize_interface(
+ interface_table.get("interface")
+ )
+ obj["admin_state"] = interface_table.get("admin_state")
+ obj["description"] = interface_table.get("desc")
+ obj["mtu"] = interface_table.get("eth_mtu")
+ obj["duplex"] = interface_table.get("eth_duplex")
+
+ command = "show run interface {0}".format(obj["name"])
+ body = execute_show_command(command, module)[0]
+
+ speed_match = re.search(r"speed (\d+)", body)
+ if speed_match is None:
+ obj["speed"] = "auto"
+ else:
+ obj["speed"] = speed_match.group(1)
+
+ duplex_match = re.search(r"duplex (\S+)", body)
+ if duplex_match is None:
+ obj["duplex"] = "auto"
+ else:
+ obj["duplex"] = duplex_match.group(1)
+
+ if "ip forward" in body:
+ obj["ip_forward"] = "enable"
+ else:
+ obj["ip_forward"] = "disable"
+
+ elif intf_type == "svi":
+ obj["name"] = normalize_interface(
+ interface_table.get("interface")
+ )
+ attributes = get_vlan_interface_attributes(
+ obj["name"], intf_type, module
+ )
+ obj["admin_state"] = str(
+ attributes.get("admin_state", "nxapibug")
+ )
+ obj["description"] = str(
+ attributes.get("description", "nxapi_bug")
+ )
+ obj["mtu"] = interface_table.get("svi_mtu")
+
+ command = "show run interface {0}".format(obj["name"])
+ body = execute_show_command(command, module)[0]
+ if "ip forward" in body:
+ obj["ip_forward"] = "enable"
+ else:
+ obj["ip_forward"] = "disable"
+ if "fabric forwarding mode anycast-gateway" in body:
+ obj["fabric_forwarding_anycast_gateway"] = True
+ else:
+ obj["fabric_forwarding_anycast_gateway"] = False
+
+ elif intf_type in ("loopback", "management", "nve"):
+ obj["name"] = normalize_interface(
+ interface_table.get("interface")
+ )
+ obj["admin_state"] = interface_table.get("admin_state")
+ if obj["admin_state"] is None and intf_type == "loopback":
+ # Some platforms don't have the 'admin_state' key.
+ # For loopback interfaces it's safe to use the
+ # 'state' key instead.
+ obj["admin_state"] = interface_table.get("state")
+ obj["description"] = interface_table.get("desc")
+
+ elif intf_type == "portchannel":
+ obj["name"] = normalize_interface(
+ interface_table.get("interface")
+ )
+ obj["admin_state"] = interface_table.get("admin_state")
+ obj["description"] = interface_table.get("desc")
+ obj["mtu"] = interface_table.get("eth_mtu")
+
+ if obj["admin_state"] is None:
+ # Some nxos platforms do not have the 'admin_state' key.
+ # Use the 'state_rsn_desc' key instead to determine the
+ # admin state of the interface.
+ state_description = interface_table.get("state_rsn_desc")
+ if state_description == "Administratively down":
+ obj["admin_state"] = "down"
+ elif state_description is not None:
+ obj["admin_state"] = "up"
+
+ objs.append(obj)
+
+ return objs
+
+
+def check_declarative_intent_params(module, want):
+ failed_conditions = []
+ have_neighbors = None
+ for w in want:
+ if w["interface_type"]:
+ continue
+ want_tx_rate = w.get("tx_rate")
+ want_rx_rate = w.get("rx_rate")
+ want_neighbors = w.get("neighbors")
+ if not (want_tx_rate or want_rx_rate or want_neighbors):
+ continue
+
+ time.sleep(module.params["delay"])
+
+ cmd = [
+ {
+ "command": "show interface {0}".format(w["name"]),
+ "output": "text",
+ }
+ ]
+
+ try:
+ out = run_commands(module, cmd, check_rc=False)[0]
+ except (AttributeError, IndexError, TypeError):
+ out = ""
+
+ if want_tx_rate:
+ match = re.search(r"output rate (\d+)", out, re.M)
+ have_tx_rate = None
+
+ if match:
+ have_tx_rate = match.group(1)
+
+ if have_tx_rate is None or not conditional(
+ want_tx_rate, have_tx_rate.strip(), cast=int
+ ):
+ failed_conditions.append("tx_rate " + want_tx_rate)
+
+ if want_rx_rate:
+ match = re.search(r"input rate (\d+)", out, re.M)
+ have_rx_rate = None
+
+ if match:
+ have_rx_rate = match.group(1)
+
+ if have_rx_rate is None or not conditional(
+ want_rx_rate, have_rx_rate.strip(), cast=int
+ ):
+ failed_conditions.append("rx_rate " + want_rx_rate)
+
+ if want_neighbors:
+ have_host = []
+ have_port = []
+ if have_neighbors is None:
+ cmd = [
+ {
+ "command": "show lldp neighbors interface {0} detail".format(
+ w["name"]
+ ),
+ "output": "text",
+ }
+ ]
+ output = run_commands(module, cmd, check_rc=False)
+ if output:
+ have_neighbors = output[0]
+ else:
+ have_neighbors = ""
+ if (
+ have_neighbors
+ and "Total entries displayed: 0" not in have_neighbors
+ ):
+ for line in have_neighbors.strip().split("\n"):
+ if line.startswith("Port Description"):
+ have_port.append(line.split(": ")[1])
+ if line.startswith("System Name"):
+ have_host.append(line.split(": ")[1])
+
+ for item in want_neighbors:
+ host = item.get("host")
+ port = item.get("port")
+ if host and host not in have_host:
+ failed_conditions.append("host " + host)
+ if port and port not in have_port:
+ failed_conditions.append("port " + port)
+
+ return failed_conditions
+
+
+def main():
+ """ main entry point for module execution
+ """
+ neighbors_spec = dict(host=dict(), port=dict())
+
+ element_spec = dict(
+ name=dict(aliases=["interface"]),
+ admin_state=dict(default="up", choices=["up", "down"]),
+ description=dict(),
+ speed=dict(),
+ mode=dict(choices=["layer2", "layer3"]),
+ mtu=dict(),
+ duplex=dict(choices=["full", "half", "auto"]),
+ interface_type=dict(choices=["loopback", "portchannel", "svi", "nve"]),
+ ip_forward=dict(choices=["enable", "disable"]),
+ fabric_forwarding_anycast_gateway=dict(type="bool"),
+ tx_rate=dict(),
+ rx_rate=dict(),
+ neighbors=dict(type="list", elements="dict", options=neighbors_spec),
+ delay=dict(default=10, type="int"),
+ state=dict(
+ choices=["absent", "present", "default"], default="present"
+ ),
+ )
+
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["name"] = dict(required=True)
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+
+ argument_spec = dict(
+ aggregate=dict(
+ type="list",
+ elements="dict",
+ options=aggregate_spec,
+ mutually_exclusive=[["name", "interface_type"]],
+ )
+ )
+
+ argument_spec.update(element_spec)
+ argument_spec.update(nxos_argument_spec)
+
+ required_one_of = [["name", "aggregate", "interface_type"]]
+ mutually_exclusive = [["name", "aggregate"], ["name", "interface_type"]]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=required_one_of,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+ warnings = list()
+
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(want, module)
+
+ commands = []
+ commands1, commands2 = map_obj_to_commands((want, have), module)
+ commands.extend(commands1)
+
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+ # if the mode changes from L2 to L3, the admin state
+ # seems to change after the API call, so adding a second API
+ # call to ensure it's in the desired state.
+ if commands2:
+ load_config(module, commands2)
+ commands.extend(commands2)
+ commands = [cmd for cmd in commands if cmd != "configure"]
+ result["commands"] = commands
+
+ if result["changed"]:
+ failed_conditions = check_declarative_intent_params(module, want)
+
+ if failed_conditions:
+ msg = "One or more conditional statements have not been satisfied"
+ module.fail_json(msg=msg, failed_conditions=failed_conditions)
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_interface_ospf.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_interface_ospf.py
new file mode 100644
index 00000000..188682c8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_interface_ospf.py
@@ -0,0 +1,614 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_interface_ospf
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2022-10-26) Manages configuration of an OSPF interface instance.
+description:
+- Manages configuration of an OSPF interface instance.
+version_added: 1.0.0
+deprecated:
+ alternative: nxos_ospf_interfaces
+ why: Updated modules released with more functionality
+ removed_at_date: '2022-10-26'
+author: Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- Default, where supported, restores params default value.
+- To remove an existing authentication configuration you should use C(message_digest_key_id=default)
+ plus all other options matching their existing values.
+- Loopback interfaces only support ospf network type 'point-to-point'.
+- C(state=absent) removes the whole OSPF interface configuration.
+options:
+ interface:
+ description:
+ - Name of this cisco_interface resource. Valid value is a string.
+ required: true
+ type: str
+ ospf:
+ description:
+ - Name of the ospf instance.
+ required: true
+ type: str
+ area:
+ description:
+ - Ospf area associated with this cisco_interface_ospf instance. Valid values are
+ a string, formatted as an IP address (i.e. "0.0.0.0") or as an integer.
+ required: true
+ type: str
+ bfd:
+ description:
+ - Enables bfd at interface level. This overrides the bfd variable set at the ospf
+ router level.
+ - Valid values are 'enable', 'disable' or 'default'.
+ - "Dependency: ''feature bfd''"
+ type: str
+ choices:
+ - enable
+ - disable
+ - default
+ cost:
+ description:
+ - The cost associated with this cisco_interface_ospf instance.
+ type: str
+ hello_interval:
+ description:
+ - Time between sending successive hello packets. Valid values are an integer or
+ the keyword 'default'.
+ type: str
+ dead_interval:
+ description:
+ - Time interval an ospf neighbor waits for a hello packet before tearing down
+ adjacencies. Valid values are an integer or the keyword 'default'.
+ type: str
+ passive_interface:
+ description:
+ - Enable or disable passive-interface state on this interface. true - (enable)
+ Prevent OSPF from establishing an adjacency or sending routing updates on this
+ interface. false - (disable) Override global 'passive-interface default' for
+ this interface.
+ type: bool
+ network:
+ description:
+ - Specifies interface ospf network type. Valid values are 'point-to-point' or
+ 'broadcast'.
+ choices:
+ - point-to-point
+ - broadcast
+ type: str
+ message_digest:
+ description:
+ - Enables or disables the usage of message digest authentication.
+ type: bool
+ message_digest_key_id:
+ description:
+ - Md5 authentication key-id associated with the ospf instance. If this is present,
+ message_digest_encryption_type, message_digest_algorithm_type and message_digest_password
+ are mandatory. Valid value is an integer and 'default'.
+ type: str
+ message_digest_algorithm_type:
+ description:
+ - Algorithm used for authentication among neighboring routers within an area.
+ Valid values are 'md5' and 'default'.
+ choices:
+ - md5
+ - default
+ type: str
+ message_digest_encryption_type:
+ description:
+ - Specifies the scheme used for encrypting message_digest_password. Valid values
+ are '3des' or 'cisco_type_7' encryption or 'default'.
+ choices:
+ - cisco_type_7
+ - 3des
+ - default
+ type: str
+ message_digest_password:
+ description:
+ - Specifies the message_digest password. Valid value is a string.
+ type: str
+ state:
+ description:
+ - Determines whether the config should be present or not on the device.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+EXAMPLES = """
+- cisco.nxos.nxos_interface_ospf:
+ interface: ethernet1/32
+ ospf: 1
+ area: 1
+ bfd: disable
+ cost: default
+
+- cisco.nxos.nxos_interface_ospf:
+ interface: loopback0
+ ospf: prod
+ area: 0.0.0.0
+ bfd: enable
+ network: point-to-point
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["interface Ethernet1/32", "ip router ospf 1 area 0.0.0.1", "ip ospf bfd disable"]
+"""
+
+
+import re
+import struct
+import socket
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+BOOL_PARAMS = ["passive_interface", "message_digest"]
+PARAM_TO_COMMAND_KEYMAP = {
+ "interface": "",
+ "cost": "ip ospf cost",
+ "ospf": "ip router ospf",
+ "area": "ip router ospf",
+ "bfd": "ip ospf bfd",
+ "hello_interval": "ip ospf hello-interval",
+ "dead_interval": "ip ospf dead-interval",
+ "passive_interface": "ip ospf passive-interface",
+ "message_digest": "ip ospf authentication message-digest",
+ "message_digest_key_id": "ip ospf message-digest-key",
+ "message_digest_algorithm_type": "ip ospf message-digest-key",
+ "message_digest_encryption_type": "ip ospf message-digest-key",
+ "message_digest_password": "ip ospf message-digest-key",
+ "network": "ip ospf network",
+}
+
+
+def get_value(arg, config, module):
+ command = PARAM_TO_COMMAND_KEYMAP[arg]
+ has_command = re.search(r"\s+{0}\s*$".format(command), config, re.M)
+ has_command_val = re.search(
+ r"(?:{0}\s)(?P<value>.*)$".format(command), config, re.M
+ )
+
+ if command == "ip router ospf":
+ value = ""
+ if has_command_val:
+ value_list = has_command_val.group("value").split()
+ if arg == "ospf":
+ value = value_list[0]
+ elif arg == "area":
+ value = value_list[2]
+ value = normalize_area(value, module)
+ elif command == "ip ospf message-digest-key":
+ value = ""
+ if has_command_val:
+ value_list = has_command_val.group("value").split()
+ if arg == "message_digest_key_id":
+ value = value_list[0]
+ elif arg == "message_digest_algorithm_type":
+ value = value_list[1]
+ elif arg == "message_digest_encryption_type":
+ value = value_list[2]
+ if value == "3":
+ value = "3des"
+ elif value == "7":
+ value = "cisco_type_7"
+ elif arg == "message_digest_password":
+ value = value_list[3]
+ elif arg == "passive_interface":
+ has_no_command = re.search(
+ r"\s+no\s+{0}\s*$".format(command), config, re.M
+ )
+ if has_no_command:
+ value = False
+ elif has_command:
+ value = True
+ else:
+ value = None
+ elif arg == "bfd":
+ m = re.search(r"\s*ip ospf bfd(?P<disable> disable)?", config)
+ if m:
+ value = "disable" if m.group("disable") else "enable"
+ else:
+ value = "default"
+ elif arg in BOOL_PARAMS:
+ value = bool(has_command)
+ else:
+ value = ""
+ if has_command_val:
+ value = has_command_val.group("value")
+ return value
+
+
+def get_existing(module, args):
+ existing = {}
+ netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
+ if module.params["interface"].startswith("loopback") or module.params[
+ "interface"
+ ].startswith("port-channel"):
+ parents = ["interface {0}".format(module.params["interface"])]
+ else:
+ parents = [
+ "interface {0}".format(module.params["interface"].capitalize())
+ ]
+ config = netcfg.get_section(parents)
+ if "ospf" in config:
+ for arg in args:
+ if arg not in ["interface"]:
+ existing[arg] = get_value(arg, config, module)
+ existing["interface"] = module.params["interface"]
+ return existing
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key, value in table.items():
+ new_key = key_map.get(key)
+ if new_key:
+ new_dict[new_key] = value
+ return new_dict
+
+
+def get_default_commands(existing, proposed, existing_commands, key, module):
+ commands = list()
+ existing_value = existing_commands.get(key)
+ if key.startswith("ip ospf message-digest-key"):
+ check = False
+ for param in [
+ "message_digest_encryption_type",
+ "message_digest_algorithm_type",
+ "message_digest_password",
+ ]:
+ if existing[param] == proposed[param]:
+ check = True
+ if check:
+ if existing["message_digest_encryption_type"] == "3des":
+ encryption_type = "3"
+ elif existing["message_digest_encryption_type"] == "cisco_type_7":
+ encryption_type = "7"
+ command = "no {0} {1} {2} {3} {4}".format(
+ key,
+ existing["message_digest_key_id"],
+ existing["message_digest_algorithm_type"],
+ encryption_type,
+ existing["message_digest_password"],
+ )
+ commands.append(command)
+ elif "ip ospf bfd" in key:
+ commands.append("no {0}".format(key))
+ elif "passive-interface" in key:
+ commands.append("default ip ospf passive-interface")
+ else:
+ commands.append("no {0} {1}".format(key, existing_value))
+ return commands
+
+
+def get_custom_command(existing_cmd, proposed, key, module):
+ commands = list()
+
+ if key == "ip router ospf":
+ command = "{0} {1} area {2}".format(
+ key, proposed["ospf"], proposed["area"]
+ )
+ if command not in existing_cmd:
+ commands.append(command)
+
+ if key == "ip ospf network":
+ command = "{0} {1}".format(key, proposed["network"])
+
+ if command not in existing_cmd:
+ commands.append(command)
+
+ elif key.startswith("ip ospf message-digest-key"):
+ if (
+ proposed["message_digest_key_id"] != "default"
+ and "options" not in key
+ ):
+ if proposed["message_digest_encryption_type"] == "3des":
+ encryption_type = "3"
+ elif proposed["message_digest_encryption_type"] == "cisco_type_7":
+ encryption_type = "7"
+ command = "{0} {1} {2} {3} {4}".format(
+ key,
+ proposed["message_digest_key_id"],
+ proposed["message_digest_algorithm_type"],
+ encryption_type,
+ proposed["message_digest_password"],
+ )
+ commands.append(command)
+ return commands
+
+
+def state_present(module, existing, proposed, candidate):
+ commands = list()
+ proposed_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, proposed)
+ existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
+
+ for key, value in proposed_commands.items():
+ if existing_commands.get(key):
+ if key == "ip router ospf":
+ if proposed["area"] == existing["area"]:
+ continue
+ if existing_commands[key] == proposed_commands[key]:
+ continue
+
+ if key == "ip ospf passive-interface" and module.params.get(
+ "interface"
+ ).upper().startswith("LO"):
+ module.fail_json(
+ msg="loopback interface does not support passive_interface"
+ )
+ if (
+ key == "ip ospf network"
+ and value == "broadcast"
+ and module.params.get("interface").upper().startswith("LO")
+ ):
+ module.fail_json(
+ msg="loopback interface does not support ospf network type broadcast"
+ )
+
+ if key == "ip ospf bfd":
+ cmd = key
+ if "disable" in value:
+ cmd += " disable"
+ elif "default" in value and existing.get("bfd") is not None:
+ cmd = "no " + cmd
+ commands.append(cmd)
+ continue
+
+ if value is True:
+ commands.append(key)
+ elif value is False:
+ commands.append("no {0}".format(key))
+ elif value == "default":
+ if existing_commands.get(key):
+ commands.extend(
+ get_default_commands(
+ existing, proposed, existing_commands, key, module
+ )
+ )
+ else:
+ if key == "ip router ospf" or key.startswith(
+ "ip ospf message-digest-key"
+ ):
+ commands.extend(
+ get_custom_command(commands, proposed, key, module)
+ )
+ else:
+ command = "{0} {1}".format(key, value.lower())
+ commands.append(command)
+
+ if commands:
+ parents = [
+ "interface {0}".format(module.params["interface"].capitalize())
+ ]
+ candidate.add(commands, parents=parents)
+
+
+def state_absent(module, existing, proposed, candidate):
+ commands = []
+ parents = ["interface {0}".format(module.params["interface"].capitalize())]
+ existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
+
+ for key, value in existing_commands.items():
+ if "ip ospf bfd" in key:
+ if "default" not in value:
+ # cli is present when enabled or disabled; this removes either case
+ commands.append("no ip ospf bfd")
+ continue
+ if "ip ospf passive-interface" in key and value is not None:
+ # cli is present for both enabled or disabled; 'no' will not remove
+ commands.append("default ip ospf passive-interface")
+ continue
+
+ if value:
+ if key.startswith("ip ospf message-digest-key"):
+ if "options" not in key:
+ if existing["message_digest_encryption_type"] == "3des":
+ encryption_type = "3"
+ elif (
+ existing["message_digest_encryption_type"]
+ == "cisco_type_7"
+ ):
+ encryption_type = "7"
+ command = "no {0} {1} {2} {3} {4}".format(
+ key,
+ existing["message_digest_key_id"],
+ existing["message_digest_algorithm_type"],
+ encryption_type,
+ existing["message_digest_password"],
+ )
+ commands.append(command)
+ elif key in [
+ "ip ospf authentication message-digest",
+ "ip ospf network",
+ ]:
+ if value:
+ commands.append("no {0}".format(key))
+ elif key == "ip router ospf":
+ command = "no {0} {1} area {2}".format(
+ key, proposed["ospf"], proposed["area"]
+ )
+ if command not in commands:
+ commands.append(command)
+ else:
+ existing_value = existing_commands.get(key)
+ commands.append("no {0} {1}".format(key, existing_value))
+
+ candidate.add(commands, parents=parents)
+
+
+def normalize_area(area, module):
+ try:
+ area = int(area)
+ area = socket.inet_ntoa(struct.pack("!L", area))
+ except ValueError:
+ splitted_area = area.split(".")
+ if len(splitted_area) != 4:
+ module.fail_json(msg="Incorrect Area ID format", area=area)
+ return area
+
+
+def main():
+ argument_spec = dict(
+ interface=dict(required=True, type="str"),
+ ospf=dict(required=True, type="str"),
+ area=dict(required=True, type="str"),
+ bfd=dict(
+ choices=["enable", "disable", "default"],
+ required=False,
+ type="str",
+ ),
+ cost=dict(required=False, type="str"),
+ hello_interval=dict(required=False, type="str"),
+ dead_interval=dict(required=False, type="str"),
+ passive_interface=dict(required=False, type="bool"),
+ network=dict(
+ required=False, type="str", choices=["broadcast", "point-to-point"]
+ ),
+ message_digest=dict(required=False, type="bool"),
+ message_digest_key_id=dict(required=False, type="str"),
+ message_digest_algorithm_type=dict(
+ required=False, type="str", choices=["md5", "default"]
+ ),
+ message_digest_encryption_type=dict(
+ required=False,
+ type="str",
+ choices=["cisco_type_7", "3des", "default"],
+ ),
+ message_digest_password=dict(required=False, type="str", no_log=True),
+ state=dict(
+ choices=["present", "absent"], default="present", required=False
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_together=[
+ [
+ "message_digest_key_id",
+ "message_digest_algorithm_type",
+ "message_digest_encryption_type",
+ "message_digest_password",
+ ]
+ ],
+ supports_check_mode=True,
+ )
+
+ # Normalize interface input data.
+ #
+ # * For port-channel and loopback interfaces expection is all lower case names.
+ # * All other interfaces the expectation is an uppercase leading character
+ # followed by lower case characters.
+ #
+ if re.match(r"(port-channel|loopback)", module.params["interface"], re.I):
+ module.params["interface"] = module.params["interface"].lower()
+ else:
+ module.params["interface"] = module.params["interface"].capitalize()
+
+ warnings = list()
+ result = {"changed": False, "commands": [], "warnings": warnings}
+
+ for param in [
+ "message_digest_encryption_type",
+ "message_digest_algorithm_type",
+ "message_digest_password",
+ ]:
+ if (
+ module.params[param] == "default"
+ and module.params["message_digest_key_id"] != "default"
+ ):
+ module.exit_json(
+ msg="Use message_digest_key_id=default to remove an existing authentication configuration"
+ )
+
+ state = module.params["state"]
+ args = PARAM_TO_COMMAND_KEYMAP.keys()
+
+ existing = get_existing(module, args)
+ proposed_args = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+
+ proposed = {}
+ for key, value in proposed_args.items():
+ if key != "interface":
+ if str(value).lower() == "true":
+ value = True
+ elif str(value).lower() == "false":
+ value = False
+ elif str(value).lower() == "default":
+ value = "default"
+ elif key == "bfd":
+ value = str(value).lower()
+ if existing.get(key) or (not existing.get(key) and value):
+ proposed[key] = value
+ elif (
+ "passive_interface" in key
+ and existing.get(key) is None
+ and value is False
+ ):
+ proposed[key] = value
+
+ proposed["area"] = normalize_area(proposed["area"], module)
+ if "hello_interval" in proposed and proposed["hello_interval"] == "10":
+ proposed["hello_interval"] = "default"
+
+ candidate = CustomNetworkConfig(indent=3)
+ if state == "present":
+ state_present(module, existing, proposed, candidate)
+ elif (
+ state == "absent"
+ and existing.get("ospf") == proposed["ospf"]
+ and existing.get("area") == proposed["area"]
+ ):
+ state_absent(module, existing, proposed, candidate)
+
+ if candidate:
+ candidate = candidate.items_text()
+ if not module.check_mode:
+ load_config(module, candidate)
+ result["changed"] = True
+ result["commands"] = candidate
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_interfaces.py
new file mode 100644
index 00000000..b3ec69ac
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_interfaces.py
@@ -0,0 +1,403 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_interfaces
+short_description: Interfaces resource module
+description: This module manages the interface attributes of NX-OS interfaces.
+version_added: 1.0.0
+author: Trishna Guha (@trishnaguha)
+notes:
+- Tested against NXOS 7.3.(0)D1(1) on VIRL
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section ^interface)
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A dictionary of interface options
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of interface, e.g. Ethernet1/1, port-channel10.
+ type: str
+ required: true
+ description:
+ description:
+ - Interface description.
+ type: str
+ enabled:
+ description:
+ - Administrative state of the interface. Set the value to C(true) to administratively
+ enable the interface or C(false) to disable it
+ type: bool
+ speed:
+ description:
+ - Interface link speed. Applicable for Ethernet interfaces only.
+ type: str
+ mode:
+ description:
+ - Manage Layer2 or Layer3 state of the interface. Applicable for Ethernet
+ and port channel interfaces only.
+ choices:
+ - layer2
+ - layer3
+ type: str
+ mtu:
+ description:
+ - MTU for a specific interface. Must be an even number between 576 and 9216.
+ Applicable for Ethernet interfaces only.
+ type: str
+ duplex:
+ description:
+ - Interface link status. Applicable for Ethernet interfaces only.
+ type: str
+ choices:
+ - full
+ - half
+ - auto
+ ip_forward:
+ description:
+ - Enable or disable IP forward feature on SVIs. Set the value to C(true) to
+ enable or C(false) to disable.
+ type: bool
+ fabric_forwarding_anycast_gateway:
+ description:
+ - Associate SVI with anycast gateway under VLAN configuration mode. Applicable
+ for SVI interfaces only.
+ type: bool
+ state:
+ description:
+ - The state of the configuration after module completion
+ - The state I(rendered) considers the system default mode for interfaces to be
+ "Layer 3" and the system default state for interfaces to be shutdown.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/1
+# description testing
+# mtu 1800
+
+- name: Merge provided configuration with device configuration
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: Ethernet1/1
+ description: Configured by Ansible
+ enabled: true
+ - name: Ethernet1/2
+ description: Configured by Ansible Network
+ enabled: false
+ state: merged
+
+# After state:
+# ------------
+#
+# interface Ethernet1/1
+# description Configured by Ansible
+# no shutdown
+# mtu 1800
+# interface Ethernet2
+# description Configured by Ansible Network
+# shutdown
+
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/1
+# description Interface 1/1
+# interface Ethernet1/2
+
+- name: Replaces device configuration of listed interfaces with provided configuration
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: Ethernet1/1
+ description: Configured by Ansible
+ enabled: true
+ mtu: 2000
+ - name: Ethernet1/2
+ description: Configured by Ansible Network
+ enabled: false
+ mode: layer2
+ state: replaced
+
+# After state:
+# ------------
+#
+# interface Ethernet1/1
+# description Configured by Ansible
+# no shutdown
+# mtu 1500
+# interface Ethernet2/2
+# description Configured by Ansible Network
+# shutdown
+# switchport
+
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/1
+# description Interface Ethernet1/1
+# interface Ethernet1/2
+# interface mgmt0
+# description Management interface
+# ip address dhcp
+
+- name: Override device configuration of all interfaces with provided configuration
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: Ethernet1/1
+ enabled: true
+ - name: Ethernet1/2
+ description: Configured by Ansible Network
+ enabled: false
+ state: overridden
+
+# After state:
+# ------------
+#
+# interface Ethernet1/1
+# interface Ethernet1/2
+# description Configured by Ansible Network
+# shutdown
+# interface mgmt0
+# ip address dhcp
+
+
+# Using deleted
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/1
+# description Interface Ethernet1/1
+# interface Ethernet1/2
+# interface mgmt0
+# description Management interface
+# ip address dhcp
+
+- name: Delete or return interface parameters to default settings
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: Ethernet1/1
+ state: deleted
+
+# After state:
+# ------------
+#
+# interface Ethernet1/1
+# interface Ethernet1/2
+# interface mgmt0
+# description Management interface
+# ip address dhcp
+
+# Using rendered
+
+- name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: Ethernet1/1
+ description: outbound-intf
+ mode: layer3
+ speed: 100
+ - name: Ethernet1/2
+ mode: layer2
+ enabled: true
+ duplex: full
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+
+# rendered:
+# - "interface Ethernet1/1"
+# - "description outbound-intf"
+# - "speed 100"
+# - "interface Ethernet1/2"
+# - "switchport"
+# - "duplex full"
+# - "no shutdown"
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+# interface Ethernet1/800
+# description test-1
+# speed 1000
+# shutdown
+# no switchport
+# duplex half
+# interface Ethernet1/801
+# description test-2
+# switchport
+# no shutdown
+# mtu 1800
+
+- name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+# parsed:
+# - description: "test-1"
+# duplex: "half"
+# enabled: false
+# mode: "layer3"
+# name: "Ethernet1/800"
+# speed: "1000"
+#
+# - description: "test-2"
+# enabled: true
+# mode: "layer2"
+# mtu: "1800"
+# name: "Ethernet1/801"
+
+# Using gathered
+
+# Existing device config state
+# -----------------------------
+# interface Ethernet1/1
+# description outbound-intf
+# switchport
+# no shutdown
+# interface Ethernet1/2
+# description intf-l3
+# speed 1000
+# interface Ethernet1/3
+# interface Ethernet1/4
+# interface Ethernet1/5
+
+- name: Gather interfaces facts from the device using nxos_interfaces
+ cisco.nxos.nxos_interfaces:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+# - name: Ethernet1/1
+# description: outbound-intf
+# mode: layer2
+# enabled: True
+# - name: Ethernet1/2
+# description: intf-l3
+# speed: "1000"
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface Ethernet1/1', 'mtu 1800']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.interfaces.interfaces import (
+ InterfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.interfaces.interfaces import (
+ Interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=InterfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l2_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l2_interface.py
new file mode 100644
index 00000000..867a7da3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l2_interface.py
@@ -0,0 +1,702 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# (c) 2017, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_l2_interface
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2022-06-01) Manage Layer-2
+ interface on Cisco NXOS devices.
+description:
+- This module provides declarative management of Layer-2 interface on Cisco NXOS devices.
+version_added: 1.0.0
+deprecated:
+ alternative: nxos_l2_interfaces
+ why: Updated modules released with more functionality
+ removed_at_date: '2022-06-01'
+author:
+- Trishna Guha (@trishnaguha)
+notes:
+- Tested against NXOSv 7.0(3)I5(1).
+options:
+ name:
+ description:
+ - Full name of the interface excluding any logical unit number, i.e. Ethernet1/1.
+ aliases:
+ - interface
+ type: str
+ mode:
+ description:
+ - Mode in which interface needs to be configured.
+ choices:
+ - access
+ - trunk
+ type: str
+ access_vlan:
+ description:
+ - Configure given VLAN in access port. If C(mode=access), used as the access VLAN
+ ID.
+ type: str
+ native_vlan:
+ description:
+ - Native VLAN to be configured in trunk port. If C(mode=trunk), used as the trunk
+ native VLAN ID.
+ type: str
+ trunk_vlans:
+ description:
+ - List of VLANs to be configured in trunk port. If C(mode=trunk), used as the
+ VLAN range to ADD or REMOVE from the trunk.
+ aliases:
+ - trunk_add_vlans
+ type: str
+ trunk_allowed_vlans:
+ description:
+ - List of allowed VLANs in a given trunk port. If C(mode=trunk), these are the
+ only VLANs that will be configured on the trunk, i.e. "2-10,15".
+ type: str
+ aggregate:
+ description:
+ - List of Layer-2 interface definitions.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of the interface excluding any logical unit number, i.e. Ethernet1/1.
+ aliases:
+ - interface
+ type: str
+ mode:
+ description:
+ - Mode in which interface needs to be configured.
+ choices:
+ - access
+ - trunk
+ type: str
+ access_vlan:
+ description:
+ - Configure given VLAN in access port. If C(mode=access), used as the access VLAN
+ ID.
+ type: str
+ native_vlan:
+ description:
+ - Native VLAN to be configured in trunk port. If C(mode=trunk), used as the trunk
+ native VLAN ID.
+ type: str
+ trunk_vlans:
+ description:
+ - List of VLANs to be configured in trunk port. If C(mode=trunk), used as the
+ VLAN range to ADD or REMOVE from the trunk.
+ aliases:
+ - trunk_add_vlans
+ type: str
+ trunk_allowed_vlans:
+ description:
+ - List of allowed VLANs in a given trunk port. If C(mode=trunk), these are the
+ only VLANs that will be configured on the trunk, i.e. "2-10,15".
+ type: str
+ state:
+ description:
+ - Manage the state of the Layer-2 Interface configuration.
+ choices:
+ - present
+ - absent
+ - unconfigured
+ type: str
+
+ state:
+ description:
+ - Manage the state of the Layer-2 Interface configuration.
+ default: present
+ choices:
+ - present
+ - absent
+ - unconfigured
+ type: str
+
+
+"""
+
+EXAMPLES = """
+- name: Ensure Eth1/5 is in its default l2 interface state
+ cisco.nxos.nxos_l2_interface:
+ name: Ethernet1/5
+ state: unconfigured
+
+- name: Ensure Eth1/5 is configured for access vlan 20
+ cisco.nxos.nxos_l2_interface:
+ name: Ethernet1/5
+ mode: access
+ access_vlan: 20
+
+- name: Ensure Eth1/5 only has vlans 5-10 as trunk vlans
+ cisco.nxos.nxos_l2_interface:
+ name: Ethernet1/5
+ mode: trunk
+ native_vlan: 10
+ trunk_vlans: 5-10
+
+- name: Ensure eth1/5 is a trunk port and ensure 2-50 are being tagged (doesn't mean
+ others aren't also being tagged)
+ cisco.nxos.nxos_l2_interface:
+ name: Ethernet1/5
+ mode: trunk
+ native_vlan: 10
+ trunk_vlans: 2-50
+
+- name: Ensure these VLANs are not being tagged on the trunk
+ cisco.nxos.nxos_l2_interface:
+ name: Ethernet1/5
+ mode: trunk
+ trunk_vlans: 51-4094
+ state: absent
+
+- name: Aggregate Configure interfaces for access_vlan with aggregate
+ cisco.nxos.nxos_l2_interface:
+ aggregate:
+ - {name: Ethernet1/2, access_vlan: 6}
+ - {name: Ethernet1/7, access_vlan: 15}
+ mode: access
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always, except for the platforms that use Netconf transport to manage the device.
+ type: list
+ sample:
+ - interface eth1/5
+ - switchport access vlan 20
+"""
+
+from copy import deepcopy
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+ get_interface_type,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+
+
+def get_interface_mode(name, module):
+ """Gets current mode of interface: layer2 or layer3
+ Args:
+ device (Device): This is the device object of an NX-API enabled device
+ using the Device class within device.py
+ interface (string): full name of interface, i.e. Ethernet1/1,
+ loopback10, port-channel20, vlan20
+ Returns:
+ str: 'layer2' or 'layer3'
+ """
+ command = "show interface {0} | json".format(name)
+ intf_type = get_interface_type(name)
+ mode = "unknown"
+ interface_table = {}
+
+ try:
+ body = run_commands(module, [command])[0]
+ interface_table = body["TABLE_interface"]["ROW_interface"]
+ except (KeyError, AttributeError, IndexError):
+ return mode
+
+ if interface_table:
+ # HACK FOR NOW
+ if intf_type in ["ethernet", "portchannel"]:
+ mode = str(interface_table.get("eth_mode", "layer3"))
+ if mode in ["access", "trunk"]:
+ mode = "layer2"
+ if mode == "routed":
+ mode = "layer3"
+ elif intf_type == "loopback" or intf_type == "svi":
+ mode = "layer3"
+ return mode
+
+
+def interface_is_portchannel(name, module):
+ """Checks to see if an interface is part of portchannel bundle
+ Args:
+ interface (str): full name of interface, i.e. Ethernet1/1
+ Returns:
+ True/False based on if interface is a member of a portchannel bundle
+ """
+ intf_type = get_interface_type(name)
+
+ if intf_type == "ethernet":
+ command = "show interface {0} | json".format(name)
+ try:
+ body = run_commands(module, [command])[0]
+ interface_table = body["TABLE_interface"]["ROW_interface"]
+ except (KeyError, AttributeError, IndexError):
+ interface_table = None
+
+ if interface_table:
+ state = interface_table.get("eth_bundle")
+ if state:
+ return True
+ else:
+ return False
+
+ return False
+
+
+def get_switchport(port, module):
+ """Gets current config of L2 switchport
+ Args:
+ device (Device): This is the device object of an NX-API enabled device
+ using the Device class within device.py
+ port (str): full name of interface, i.e. Ethernet1/1
+ Returns:
+ dictionary with k/v pairs for L2 vlan config
+ """
+
+ command = "show interface {0} switchport | json".format(port)
+
+ try:
+ body = run_commands(module, [command])[0]
+ sp_table = body["TABLE_interface"]["ROW_interface"]
+ except (KeyError, AttributeError, IndexError):
+ sp_table = None
+
+ if sp_table:
+ key_map = {
+ "interface": "name",
+ "oper_mode": "mode",
+ "switchport": "switchport",
+ "access_vlan": "access_vlan",
+ "access_vlan_name": "access_vlan_name",
+ "native_vlan": "native_vlan",
+ "native_vlan_name": "native_vlan_name",
+ "trunk_vlans": "trunk_vlans",
+ }
+ sp = apply_key_map(key_map, sp_table)
+ return sp
+
+ else:
+ return {}
+
+
+def remove_switchport_config_commands(name, existing, proposed, module):
+ mode = proposed.get("mode")
+ commands = []
+ command = None
+
+ if mode == "access":
+ av_check = existing.get("access_vlan") == proposed.get("access_vlan")
+ if av_check:
+ command = "no switchport access vlan {0}".format(
+ existing.get("access_vlan")
+ )
+ commands.append(command)
+
+ elif mode == "trunk":
+ existing_vlans = existing.get("trunk_vlans_list")
+ proposed_vlans = proposed.get("trunk_vlans_list")
+ vlans_to_remove = set(proposed_vlans).intersection(existing_vlans)
+
+ if vlans_to_remove:
+ proposed_allowed_vlans = proposed.get("trunk_allowed_vlans")
+ remove_trunk_allowed_vlans = proposed.get(
+ "trunk_vlans", proposed_allowed_vlans
+ )
+ command = "switchport trunk allowed vlan remove {0}".format(
+ remove_trunk_allowed_vlans
+ )
+ commands.append(command)
+
+ native_check = existing.get("native_vlan") == proposed.get(
+ "native_vlan"
+ )
+ if native_check and proposed.get("native_vlan"):
+ command = "no switchport trunk native vlan {0}".format(
+ existing.get("native_vlan")
+ )
+ commands.append(command)
+
+ if commands:
+ commands.insert(0, "interface " + name)
+ return commands
+
+
+def get_switchport_config_commands(name, existing, proposed, module):
+ """Gets commands required to config a given switchport interface
+ """
+
+ proposed_mode = proposed.get("mode")
+ existing_mode = existing.get("mode")
+ commands = []
+ command = None
+
+ if proposed_mode != existing_mode:
+ if proposed_mode == "trunk":
+ command = "switchport mode trunk"
+ elif proposed_mode == "access":
+ command = "switchport mode access"
+
+ if command:
+ commands.append(command)
+
+ if proposed_mode == "access":
+ av_check = str(existing.get("access_vlan")) == str(
+ proposed.get("access_vlan")
+ )
+ if not av_check:
+ command = "switchport access vlan {0}".format(
+ proposed.get("access_vlan")
+ )
+ commands.append(command)
+
+ elif proposed_mode == "trunk":
+ tv_check = existing.get("trunk_vlans_list") == proposed.get(
+ "trunk_vlans_list"
+ )
+
+ if not tv_check:
+ if proposed.get("allowed"):
+ command = "switchport trunk allowed vlan {0}".format(
+ proposed.get("trunk_allowed_vlans")
+ )
+ commands.append(command)
+
+ else:
+ existing_vlans = existing.get("trunk_vlans_list")
+ proposed_vlans = proposed.get("trunk_vlans_list")
+ vlans_to_add = set(proposed_vlans).difference(existing_vlans)
+ if vlans_to_add:
+ command = "switchport trunk allowed vlan add {0}".format(
+ proposed.get("trunk_vlans")
+ )
+ commands.append(command)
+
+ native_check = str(existing.get("native_vlan")) == str(
+ proposed.get("native_vlan")
+ )
+ if not native_check and proposed.get("native_vlan"):
+ command = "switchport trunk native vlan {0}".format(
+ proposed.get("native_vlan")
+ )
+ commands.append(command)
+
+ if commands:
+ commands.insert(0, "interface " + name)
+ return commands
+
+
+def is_switchport_default(existing):
+ """Determines if switchport has a default config based on mode
+ Args:
+ existing (dict): existing switchport configuration from Ansible mod
+ Returns:
+ boolean: True if switchport has OOB Layer 2 config, i.e.
+ vlan 1 and trunk all and mode is access
+ """
+
+ c1 = str(existing["access_vlan"]) == "1"
+ c2 = str(existing["native_vlan"]) == "1"
+ c3 = existing["trunk_vlans"] == "1-4094"
+ c4 = existing["mode"] == "access"
+
+ default = c1 and c2 and c3 and c4
+
+ return default
+
+
+def default_switchport_config(name):
+ commands = []
+ commands.append("interface " + name)
+ commands.append("switchport mode access")
+ commands.append("switch access vlan 1")
+ commands.append("switchport trunk native vlan 1")
+ commands.append("switchport trunk allowed vlan all")
+ return commands
+
+
+def vlan_range_to_list(vlans):
+ result = []
+ if vlans:
+ for part in vlans.split(","):
+ if part == "none":
+ break
+ if "-" in part:
+ a, b = part.split("-")
+ a, b = int(a), int(b)
+ result.extend(range(a, b + 1))
+ else:
+ a = int(part)
+ result.append(a)
+ return numerical_sort(result)
+ return result
+
+
+def get_list_of_vlans(module):
+
+ command = "show vlan | json"
+ vlan_list = []
+
+ try:
+ body = run_commands(module, [command])[0]
+ vlan_table = body["TABLE_vlanbrief"]["ROW_vlanbrief"]
+ except (KeyError, AttributeError, IndexError):
+ return []
+
+ if isinstance(vlan_table, list):
+ for vlan in vlan_table:
+ vlan_list.append(str(vlan["vlanshowbr-vlanid-utf"]))
+ else:
+ vlan_list.append("1")
+
+ return vlan_list
+
+
+def numerical_sort(string_int_list):
+ """Sorts list of strings/integers that are digits in numerical order.
+ """
+
+ as_int_list = []
+ as_str_list = []
+ for vlan in string_int_list:
+ as_int_list.append(int(vlan))
+ as_int_list.sort()
+ for vlan in as_int_list:
+ as_str_list.append(str(vlan))
+ return as_str_list
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key, value in table.items():
+ new_key = key_map.get(key)
+ if new_key:
+ new_dict[new_key] = str(value)
+ return new_dict
+
+
+def apply_value_map(value_map, resource):
+ for key, value in value_map.items():
+ resource[key] = value[resource.get(key)]
+ return resource
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def map_params_to_obj(module):
+ obj = []
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+
+ d = item.copy()
+ obj.append(d)
+ else:
+ obj.append(
+ {
+ "name": module.params["name"],
+ "mode": module.params["mode"],
+ "access_vlan": module.params["access_vlan"],
+ "native_vlan": module.params["native_vlan"],
+ "trunk_vlans": module.params["trunk_vlans"],
+ "trunk_allowed_vlans": module.params["trunk_allowed_vlans"],
+ "state": module.params["state"],
+ }
+ )
+
+ return obj
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ name=dict(type="str", aliases=["interface"]),
+ mode=dict(choices=["access", "trunk"]),
+ access_vlan=dict(type="str"),
+ native_vlan=dict(type="str"),
+ trunk_vlans=dict(type="str", aliases=["trunk_add_vlans"]),
+ trunk_allowed_vlans=dict(type="str"),
+ state=dict(
+ choices=["absent", "present", "unconfigured"], default="present"
+ ),
+ )
+
+ aggregate_spec = deepcopy(element_spec)
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec)
+ )
+
+ argument_spec.update(element_spec)
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=[
+ ["access_vlan", "trunk_vlans"],
+ ["access_vlan", "native_vlan"],
+ ["access_vlan", "trunk_allowed_vlans"],
+ ],
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ commands = []
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+
+ want = map_params_to_obj(module)
+ for w in want:
+ name = w["name"]
+ mode = w["mode"]
+ access_vlan = w["access_vlan"]
+ state = w["state"]
+ trunk_vlans = w["trunk_vlans"]
+ native_vlan = w["native_vlan"]
+ trunk_allowed_vlans = w["trunk_allowed_vlans"]
+
+ args = dict(
+ name=name,
+ mode=mode,
+ access_vlan=access_vlan,
+ native_vlan=native_vlan,
+ trunk_vlans=trunk_vlans,
+ trunk_allowed_vlans=trunk_allowed_vlans,
+ )
+
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+
+ name = name.lower()
+
+ if mode == "access" and state == "present" and not access_vlan:
+ module.fail_json(
+ msg="access_vlan param is required when mode=access && state=present"
+ )
+
+ if mode == "trunk" and access_vlan:
+ module.fail_json(
+ msg="access_vlan param not supported when using mode=trunk"
+ )
+
+ current_mode = get_interface_mode(name, module)
+
+ # Current mode will return layer3, layer2, or unknown
+ if current_mode == "unknown" or current_mode == "layer3":
+ module.fail_json(
+ msg="Ensure interface is configured to be a L2"
+ "\nport first before using this module. You can use"
+ "\nthe nxos_interface module for this."
+ )
+
+ if interface_is_portchannel(name, module):
+ module.fail_json(
+ msg="Cannot change L2 config on physical "
+ "\nport because it is in a portchannel. "
+ "\nYou should update the portchannel config."
+ )
+
+ # existing will never be null for Eth intfs as there is always a default
+ existing = get_switchport(name, module)
+
+ # Safeguard check
+ # If there isn't an existing, something is wrong per previous comment
+ if not existing:
+ module.fail_json(
+ msg="Make sure you are using the FULL interface name"
+ )
+
+ if trunk_vlans or trunk_allowed_vlans:
+ if trunk_vlans:
+ trunk_vlans_list = vlan_range_to_list(trunk_vlans)
+ elif trunk_allowed_vlans:
+ trunk_vlans_list = vlan_range_to_list(trunk_allowed_vlans)
+ proposed["allowed"] = True
+
+ existing_trunks_list = vlan_range_to_list(
+ (existing["trunk_vlans"])
+ )
+
+ existing["trunk_vlans_list"] = existing_trunks_list
+ proposed["trunk_vlans_list"] = trunk_vlans_list
+
+ current_vlans = get_list_of_vlans(module)
+
+ if state == "present":
+ if access_vlan and access_vlan not in current_vlans:
+ module.fail_json(
+ msg="You are trying to configure a VLAN"
+ " on an interface that\ndoes not exist on the "
+ " switch yet!",
+ vlan=access_vlan,
+ )
+ elif native_vlan and native_vlan not in current_vlans:
+ module.fail_json(
+ msg="You are trying to configure a VLAN"
+ " on an interface that\ndoes not exist on the "
+ " switch yet!",
+ vlan=native_vlan,
+ )
+ else:
+ command = get_switchport_config_commands(
+ name, existing, proposed, module
+ )
+ commands.append(command)
+ elif state == "unconfigured":
+ is_default = is_switchport_default(existing)
+ if not is_default:
+ command = default_switchport_config(name)
+ commands.append(command)
+ elif state == "absent":
+ command = remove_switchport_config_commands(
+ name, existing, proposed, module
+ )
+ commands.append(command)
+
+ if trunk_vlans or trunk_allowed_vlans:
+ existing.pop("trunk_vlans_list")
+ proposed.pop("trunk_vlans_list")
+
+ cmds = flatten_list(commands)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ result["changed"] = True
+ load_config(module, cmds)
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ result["commands"] = cmds
+ result["warnings"] = warnings
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l2_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l2_interfaces.py
new file mode 100644
index 00000000..1d7c4456
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l2_interfaces.py
@@ -0,0 +1,404 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_l2_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_l2_interfaces
+short_description: L2 interfaces resource module
+description: This module manages Layer-2 interfaces attributes of NX-OS Interfaces.
+version_added: 1.0.0
+author: Trishna Guha (@trishnaguha)
+notes:
+- Tested against NXOS 7.3.(0)D1(1) on VIRL
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section ^interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A dictionary of Layer-2 interface options
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of interface, i.e. Ethernet1/1.
+ type: str
+ required: true
+ access:
+ description:
+ - Switchport mode access command to configure the interface as a Layer-2 access.
+ type: dict
+ suboptions:
+ vlan:
+ description:
+ - Configure given VLAN in access port. It's used as the access VLAN ID.
+ type: int
+ trunk:
+ description:
+ - Switchport mode trunk command to configure the interface as a Layer-2 trunk.
+ type: dict
+ suboptions:
+ native_vlan:
+ description:
+ - Native VLAN to be configured in trunk port. It is used as the trunk
+ native VLAN ID.
+ type: int
+ allowed_vlans:
+ description:
+ - List of allowed VLANs in a given trunk port. These are the only VLANs
+ that will be configured on the trunk.
+ type: str
+ mode:
+ description:
+ - Mode in which interface needs to be configured.
+ - Access mode is not shown in interface facts, so idempotency will not be
+ maintained for switchport mode access and every time the output will come
+ as changed=True.
+ type: str
+ choices:
+ - access
+ - trunk
+ - fex-fabric
+ - fabricpath
+ state:
+ description:
+ - The state of the configuration after module completion.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/1
+# switchport access vlan 20
+# interface Ethernet1/2
+# switchport trunk native vlan 20
+# interface mgmt0
+# ip address dhcp
+# ipv6 address auto-config
+
+- name: Merge provided configuration with device configuration.
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: Ethernet1/1
+ trunk:
+ native_vlan: 10
+ allowed_vlans: 2,4,15
+ - name: Ethernet1/2
+ access:
+ vlan: 30
+ state: merged
+
+# After state:
+# ------------
+#
+# interface Ethernet1/1
+# switchport trunk native vlan 10
+# switchport trunk allowed vlans 2,4,15
+# interface Ethernet1/2
+# switchport access vlan 30
+# interface mgmt0
+# ip address dhcp
+# ipv6 address auto-config
+
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/1
+# switchport access vlan 20
+# interface Ethernet1/2
+# switchport trunk native vlan 20
+# interface mgmt0
+# ip address dhcp
+# ipv6 address auto-config
+
+- name: Replace device configuration of specified L2 interfaces with provided configuration.
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: Ethernet1/1
+ trunk:
+ native_vlan: 20
+ allowed_vlans: 5-10, 15
+ state: replaced
+
+# After state:
+# ------------
+#
+# interface Ethernet1/1
+# switchport trunk native vlan 20
+# switchport trunk allowed vlan 5-10,15
+# interface Ethernet1/2
+# switchport trunk native vlan 20
+# switchport mode trunk
+# interface mgmt0
+# ip address dhcp
+# ipv6 address auto-config
+
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/1
+# switchport access vlan 20
+# interface Ethernet1/2
+# switchport trunk native vlan 20
+# interface mgmt0
+# ip address dhcp
+# ipv6 address auto-config
+
+- name: Override device configuration of all L2 interfaces on device with provided
+ configuration.
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: Ethernet1/2
+ access:
+ vlan: 30
+ state: overridden
+
+# After state:
+# ------------
+#
+# interface Ethernet1/1
+# interface Ethernet1/2
+# switchport access vlan 30
+# interface mgmt0
+# ip address dhcp
+# ipv6 address auto-config
+
+
+# Using deleted
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/1
+# switchport access vlan 20
+# interface Ethernet1/2
+# switchport trunk native vlan 20
+# interface mgmt0
+# ip address dhcp
+# ipv6 address auto-config
+
+- name: Delete L2 attributes of given interfaces (Note This won't delete the interface
+ itself).
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: Ethernet1/1
+ - name: Ethernet1/2
+ state: deleted
+
+# After state:
+# ------------
+#
+# interface Ethernet1/1
+# interface Ethernet1/2
+# interface mgmt0
+# ip address dhcp
+# ipv6 address auto-config
+
+# Using rendered
+
+- name: Render platform specific configuration lines (without connecting to the device)
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: Ethernet1/1
+ trunk:
+ native_vlan: 10
+ allowed_vlans: 2,4,15
+ - name: Ethernet1/2
+ access:
+ vlan: 30
+ - name: Ethernet1/3
+ trunk:
+ native_vlan: 20
+ allowed_vlans: 5-10, 15
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+
+# rendered:
+# - "interface Ethernet1/1"
+# - "switchport trunk allowed vlan 2,4,15"
+# - "switchport trunk native vlan 10"
+# - "interface Ethernet1/2"
+# - "switchport access vlan 30"
+# - "interface Ethernet1/3"
+# - "switchport trunk allowed vlan 5,6,7,8,9,10,15"
+# - "switchport trunk native vlan 20"
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+# interface Ethernet1/800
+# switchport access vlan 18
+# switchport trunk allowed vlan 210
+# interface Ethernet1/801
+# switchport trunk allowed vlan 2,4,15
+
+- name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_l2_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+# parsed:
+# - name: Ethernet1/800
+# access:
+# vlan: 18
+# trunk:
+# allowed_vlans: "210"
+# - name: Ethernet1/801
+# trunk:
+# allowed_vlans: "2,4,15"
+
+# Using gathered
+
+# Existing device config state
+# -------------------------------
+# Nexus9kvI5# sh running-config | section ^interface
+# interface Ethernet1/1
+# switchport access vlan 6
+# switchport trunk allowed vlan 200
+# interface Ethernet1/2
+# switchport trunk native vlan 10
+
+- name: Gather l2_interfaces facts from the device using nxos_l2_interfaces
+ cisco.nxos.nxos_l2_interfaces:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+# gathered:
+# - name: "Ethernet1/1"
+# access:
+# vlan: 6
+# trunk:
+# allowed_vlans: "200"
+#
+# - name: "Ethernet1/2"
+# trunk:
+# native_vlan: 10
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample:
+ - "interface Ethernet1/1"
+ - "switchport trunk allowed vlan 2,4,15"
+ - "switchport trunk native vlan 10"
+ - "interface Ethernet1/2"
+ - "switchport access vlan 30"
+ - "interface Ethernet1/3"
+ - "switchport trunk allowed vlan 5,6,7,8,9,10,15"
+ - "switchport trunk native vlan 20"
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.l2_interfaces.l2_interfaces import (
+ L2_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.l2_interfaces.l2_interfaces import (
+ L2_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=L2_interfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = L2_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l3_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l3_interface.py
new file mode 100644
index 00000000..4d2635b9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l3_interface.py
@@ -0,0 +1,290 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# (c) 2017, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_l3_interface
+author: Trishna Guha (@trishnaguha)
+short_description: (deprecated, removed after 2022-06-01) Manage L3 interfaces
+ on Cisco NXOS network devices
+description:
+- This module provides declarative management of L3 interfaces on Cisco NXOS network
+ devices.
+version_added: 1.0.0
+deprecated:
+ alternative: nxos_l3_interfaces
+ why: Updated modules released with more functionality
+ removed_at_date: '2022-06-01'
+notes:
+- Tested against NXOSv 7.0(3)I5(1).
+options:
+ name:
+ description:
+ - Name of the L3 interface.
+ type: str
+ ipv4:
+ description:
+ - IPv4 of the L3 interface.
+ type: str
+ ipv6:
+ description:
+ - IPv6 of the L3 interface.
+ type: str
+ aggregate:
+ description: List of L3 interfaces definitions.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name of the L3 interface.
+ type: str
+ ipv4:
+ description:
+ - IPv4 of the L3 interface.
+ type: str
+ ipv6:
+ description:
+ - IPv6 of the L3 interface.
+ type: str
+ state:
+ description:
+ - State of the L3 interface configuration.
+ choices:
+ - present
+ - absent
+ type: str
+ state:
+ description:
+ - State of the L3 interface configuration.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+extends_documentation_fragment:
+- cisco.nxos.nxos
+"""
+
+EXAMPLES = """
+- name: Set interface IPv4 address
+ cisco.nxos.nxos_l3_interface:
+ name: Ethernet2/3
+ ipv4: 192.168.0.1/24
+
+- name: Remove interface IPv4 address
+ cisco.nxos.nxos_l3_interface:
+ name: Ethernet2/3
+ state: absent
+
+- name: Set IP addresses on aggregate
+ cisco.nxos.nxos_l3_interface:
+ aggregate:
+ - {name: Ethernet2/1, ipv4: 192.168.2.10/24}
+ - {name: Ethernet2/5, ipv4: 192.168.3.10/24, ipv6: fd5d:12c9:2201:1::1/64}
+
+- name: Remove IP addresses on aggregate
+ cisco.nxos.nxos_l3_interface:
+ aggregate:
+ - {name: Ethernet2/1, ipv4: 192.168.2.10/24}
+ - {name: Ethernet2/5, ipv4: 192.168.3.10/24, ipv6: fd5d:12c9:2201:1::1/64}
+ state: absent
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always, except for the platforms that use Netconf transport to manage the device.
+ type: list
+ sample:
+ - interface ethernet2/3
+ - no switchport
+ - ip address 192.168.22.1/24
+ - ipv6 address "fd5d:12c9:2201:1::1/64"
+ - no ip address 192.168.22.1/24
+"""
+
+import re
+
+from copy import deepcopy
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+ normalize_interface,
+)
+
+
+def search_obj_in_list(name, lst):
+ for o in lst:
+ if o["name"] == name:
+ return o
+
+
+def map_obj_to_commands(updates, module, warnings):
+ commands = list()
+ want, have = updates
+
+ for w in want:
+ name = w["name"]
+ ipv4 = w["ipv4"]
+ ipv6 = w["ipv6"]
+ state = w["state"]
+ del w["state"]
+
+ obj_in_have = search_obj_in_list(name, have)
+
+ if not obj_in_have:
+ warnings.append("Unknown interface {0}".format(name))
+ elif state == "absent":
+ command = []
+ if obj_in_have["name"] == name:
+ if ipv4 and ipv4 == obj_in_have["ipv4"]:
+ command.append("no ip address {0}".format(ipv4))
+ if ipv6 and ipv6 in obj_in_have["ipv6"]:
+ command.append("no ipv6 address {0}".format(ipv6))
+ if command:
+ command.append("exit")
+ command.insert(0, "interface {0}".format(name))
+ commands.extend(command)
+
+ elif state == "present":
+ command = []
+ if obj_in_have["name"] == name:
+ if ipv4 and ipv4 != obj_in_have["ipv4"]:
+ command.append("ip address {0}".format(ipv4))
+ if ipv6 and ipv6 not in obj_in_have["ipv6"]:
+ command.append("ipv6 address {0}".format(ipv6))
+ if command:
+ command.append("exit")
+ command.insert(0, "interface {0}".format(name))
+ elif not ipv4 and not ipv6:
+ command.append("interface {0}".format(name))
+ commands.extend(command)
+
+ return commands
+
+
+def map_params_to_obj(module):
+ obj = []
+
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+
+ d = item.copy()
+ name = d["name"]
+ d["name"] = normalize_interface(name)
+ obj.append(d)
+
+ else:
+ obj.append(
+ {
+ "name": normalize_interface(module.params["name"]),
+ "ipv4": module.params["ipv4"],
+ "ipv6": module.params["ipv6"],
+ "state": module.params["state"],
+ }
+ )
+
+ return obj
+
+
+def map_config_to_obj(want, module):
+ objs = list()
+ netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
+
+ for w in want:
+ parents = ["interface {0}".format(w["name"])]
+ config = netcfg.get_section(parents)
+ obj = dict(name=None, ipv4=None, ipv6=[])
+
+ if config:
+ match_name = re.findall(r"interface (\S+)", config, re.M)
+ if match_name:
+ obj["name"] = normalize_interface(match_name[0])
+
+ match_ipv4 = re.findall(r"ip address (\S+)", config, re.M)
+ if match_ipv4:
+ obj["ipv4"] = match_ipv4[0]
+
+ match_ipv6 = re.findall(r"ipv6 address (\S+)", config, re.M)
+ if match_ipv6:
+ obj["ipv6"] = match_ipv6
+
+ objs.append(obj)
+ return objs
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ name=dict(),
+ ipv4=dict(),
+ ipv6=dict(),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+
+ aggregate_spec = deepcopy(element_spec)
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec)
+ )
+
+ argument_spec.update(element_spec)
+ argument_spec.update(nxos_argument_spec)
+
+ required_one_of = [["name", "aggregate"]]
+ mutually_exclusive = [["name", "aggregate"]]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=required_one_of,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ result = {"changed": False}
+
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(want, module)
+
+ commands = map_obj_to_commands((want, have), module, warnings)
+ result["commands"] = commands
+
+ if warnings:
+ result["warnings"] = warnings
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l3_interfaces.py
new file mode 100644
index 00000000..3c623776
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_l3_interfaces.py
@@ -0,0 +1,404 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_l3_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_l3_interfaces
+short_description: L3 interfaces resource module
+description: This module manages Layer-3 interfaces attributes of NX-OS Interfaces.
+version_added: 1.0.0
+author: Trishna Guha (@trishnaguha)
+notes:
+- Tested against NXOS 7.3.(0)D1(1) on VIRL
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section '^interface').
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A dictionary of Layer-3 interface options
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Full name of L3 interface, i.e. Ethernet1/1.
+ type: str
+ required: true
+ dot1q:
+ description:
+ - Configures IEEE 802.1Q VLAN encapsulation on a subinterface.
+ type: int
+ ipv4:
+ description:
+ - IPv4 address and attributes of the L3 interface.
+ type: list
+ elements: dict
+ suboptions:
+ address:
+ description:
+ - IPV4 address of the L3 interface.
+ type: str
+ tag:
+ description:
+ - URIB route tag value for local/direct routes.
+ type: int
+ secondary:
+ description:
+ - A boolean attribute to manage addition of secondary IP address.
+ type: bool
+ ipv6:
+ description:
+ - IPv6 address and attributes of the L3 interface.
+ type: list
+ elements: dict
+ suboptions:
+ address:
+ description:
+ - IPV6 address of the L3 interface.
+ type: str
+ tag:
+ description:
+ - URIB route tag value for local/direct routes.
+ type: int
+ redirects:
+ description:
+ - Enables/disables ip redirects
+ type: bool
+ unreachables:
+ description:
+ - Enables/disables ip redirects
+ type: bool
+ evpn_multisite_tracking:
+ description:
+ - VxLAN evpn multisite Interface tracking. Supported only on selected model.
+ type: str
+ version_added: 1.1.0
+ choices:
+ - fabric-tracking
+ - dci-tracking
+ state:
+ description:
+ - The state of the configuration after module completion.
+ - The state I(overridden) would override the IP address configuration
+ of all interfaces on the device with the provided configuration in
+ the task. Use caution with this state as you may loose access to the
+ device.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/6
+
+- name: Merge provided configuration with device configuration.
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: Ethernet1/6
+ ipv4:
+ - address: 192.168.1.1/24
+ tag: 5
+ - address: 10.1.1.1/24
+ secondary: true
+ tag: 10
+ ipv6:
+ - address: fd5d:12c9:2201:2::1/64
+ tag: 6
+ - name: Ethernet1/7.42
+ dot1q: 42
+ redirects: false
+ unreachables: false
+ state: merged
+
+# After state:
+# ------------
+#
+# interface Ethernet1/6
+# ip address 192.168.22.1/24 tag 5
+# ip address 10.1.1.1/24 secondary tag 10
+# interface Ethernet1/6
+# ipv6 address fd5d:12c9:2201:2::1/64 tag 6
+# interface Ethernet1/7.42
+# encapsulation dot1q 42
+# no ip redirects
+# no ip unreachables
+
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/6
+# ip address 192.168.22.1/24
+# ipv6 address "fd5d:12c9:2201:1::1/64"
+
+- name: Replace device configuration of specified L3 interfaces with provided configuration.
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: Ethernet1/6
+ ipv4:
+ - address: 192.168.22.3/24
+ state: replaced
+
+# After state:
+# ------------
+#
+# interface Ethernet1/6
+# ip address 192.168.22.3/24
+
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/2
+# ip address 192.168.22.1/24
+# interface Ethernet1/6
+# ipv6 address "fd5d:12c9:2201:1::1/64"
+
+- name: Override device configuration of all L3 interfaces on device with provided
+ configuration.
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: Ethernet1/2
+ ipv4: 192.168.22.3/4
+ state: overridden
+
+# After state:
+# ------------
+#
+# interface Ethernet1/2
+# ipv4 address 192.168.22.3/24
+# interface Ethernet1/6
+
+
+# Using deleted
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/6
+# ip address 192.168.22.1/24
+# interface Ethernet1/2
+# ipv6 address "fd5d:12c9:2201:1::1/64"
+
+- name: Delete L3 attributes of given interfaces (This won't delete the interface
+ itself).
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: Ethernet1/6
+ - name: Ethernet1/2
+ state: deleted
+
+# After state:
+# ------------
+#
+# interface Ethernet1/6
+# interface Ethernet1/2
+
+# Using rendered
+
+- name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: Ethernet1/800
+ ipv4:
+ - address: 192.168.1.100/24
+ tag: 5
+ - address: 10.1.1.1/24
+ secondary: true
+ tag: 10
+ - name: Ethernet1/800
+ ipv6:
+ - address: fd5d:12c9:2201:2::1/64
+ tag: 6
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+
+# rendered:
+# - "interface Ethernet1/800"
+# - "ip address 192.168.1.100/24 tag 5"
+# - "ip address 10.1.1.1/24 secondary tag 10"
+# - "interface Ethernet1/800"
+# - "ipv6 address fd5d:12c9:2201:2::1/64 tag 6"
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+# interface Ethernet1/800
+# ip address 192.168.1.100/24 tag 5
+# ip address 10.1.1.1/24 secondary tag 10
+# no ip redirects
+# interface Ethernet1/801
+# ipv6 address fd5d:12c9:2201:2::1/64 tag 6
+# ip unreachables
+# interface mgmt0
+# ip address dhcp
+# vrf member management
+
+- name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_l3_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+
+# parsed:
+# - name: Ethernet1/800
+# ipv4:
+# - address: 192.168.1.100/24
+# tag: 5
+# - address: 10.1.1.1/24
+# secondary: True
+# tag: 10
+# redirects: False
+# - name: Ethernet1/801
+# ipv6:
+# - address: fd5d:12c9:2201:2::1/64
+# tag: 6
+# unreachables: True
+
+# Using gathered
+
+# Existing device config state
+# -------------------------------
+# interface Ethernet1/1
+# ip address 192.0.2.100/24
+# interface Ethernet1/2
+# no ip redirects
+# ip address 203.0.113.10/24
+# ip unreachables
+# ipv6 address 2001:db8::1/32
+
+- name: Gather l3_interfaces facts from the device using nxos_l3_interfaces
+ cisco.nxos.nxos_l3_interfaces:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+
+# gathered:
+# - name: Ethernet1/1
+# ipv4:
+# - address: 192.0.2.100/24
+# - name: Ethernet1/2
+# ipv4:
+# - address: 203.0.113.10/24
+# ipv6:
+# - address: 2001:db8::1/32
+# redirects: False
+# unreachables: True
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface Ethernet1/2', 'ip address 192.168.0.1/2']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.l3_interfaces.l3_interfaces import (
+ L3_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.l3_interfaces.l3_interfaces import (
+ L3_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=L3_interfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = L3_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lacp.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lacp.py
new file mode 100644
index 00000000..072499a2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lacp.py
@@ -0,0 +1,275 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_lacp
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_lacp
+short_description: LACP resource module
+description: This module manages Global Link Aggregation Control Protocol (LACP) on
+ NX-OS devices.
+version_added: 1.0.0
+author: Trishna Guha (@trishnaguha)
+notes:
+- Tested against NXOS 7.3.(0)D1(1) on VIRL.
+- Feature lacp should be enabled for this module.
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | include lacp).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: LACP global options.
+ type: dict
+ suboptions:
+ system:
+ description:
+ - LACP system options
+ type: dict
+ suboptions:
+ priority:
+ description:
+ - The system priority to use in LACP negotiations.
+ type: int
+ mac:
+ description:
+ - MAC address to be used for the LACP Protocol exchanges
+ type: dict
+ suboptions:
+ address:
+ description:
+ - MAC-address (FORMAT :xxxx.xxxx.xxxx).
+ type: str
+ role:
+ description:
+ - The role for the Switch.
+ type: str
+ choices:
+ - primary
+ - secondary
+ state:
+ description:
+ - The state of the configuration after module completion.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+
+- name: Merge provided configuration with device configuration.
+ cisco.nxos.nxos_lacp:
+ config:
+ system:
+ priority: 10
+ mac:
+ address: 00c1.4c00.bd15
+ state: merged
+
+# After state:
+# ------------
+#
+# lacp system-priority 10
+# lacp system-mac 00c1.4c00.bd15
+
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# lacp system-priority 10
+
+- name: Replace device global lacp configuration with the given configuration.
+ cisco.nxos.nxos_lacp:
+ config:
+ system:
+ mac:
+ address: 00c1.4c00.bd15
+ state: replaced
+
+# After state:
+# ------------
+#
+# lacp system-mac 00c1.4c00.bd15
+
+
+# Using deleted
+
+# Before state:
+# -------------
+#
+# lacp system-priority 10
+
+- name: Delete global LACP configurations.
+ cisco.nxos.nxos_lacp:
+ state: deleted
+
+# After state:
+# ------------
+#
+
+# Using rendered
+
+- name: Render platform specific configuration lines (without connecting to the device)
+ cisco.nxos.nxos_lacp:
+ config:
+ system:
+ priority: 10
+ mac:
+ address: 00c1.4c00.bd15
+ role: secondary
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+
+# rendered:
+# - "lacp system-priority 10"
+# - "lacp system-mac 00c1.4c00.bd15 role secondary"
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+# lacp system-priority 10
+# lacp system-mac 00c1.4c00.bd15 role secondary
+
+- name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_lacp:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+# parsed:
+# system:
+# priority: 10
+# mac:
+# address: 00c1.4c00.bd15
+# role: secondary
+
+# Using gathered
+
+# Existing device config state
+# -------------------------------
+# Nexus9000v# show running-config | include lacp
+# lacp system-priority 11
+# lacp system-mac 00c1.4c00.bd15 role primary
+
+- name: Gather lacp facts from the device using nxos_lacp
+ cisco.nxos.nxos_lacp:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+# gathered:
+# system:
+# priority: 11
+# mac:
+# address: 00c1.4c00.bd15
+# role: primary
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['lacp system-priority 15', 'lacp system-mac 00c1.4c00.bd15 role primary']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.lacp.lacp import (
+ LacpArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.lacp.lacp import (
+ Lacp,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=LacpArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Lacp(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lacp_interfaces.py
new file mode 100644
index 00000000..e208fad1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lacp_interfaces.py
@@ -0,0 +1,378 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_lacp_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_lacp_interfaces
+short_description: LACP interfaces resource module
+description: This module manages Link Aggregation Control Protocol (LACP) attributes
+ of NX-OS Interfaces.
+version_added: 1.0.0
+author: Trishna Guha (@trishnaguha)
+notes:
+- Tested against NXOS 7.3.(0)D1(1) on VIRL
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section ^interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A dictionary of LACP interfaces options.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name of the interface.
+ required: true
+ type: str
+ port_priority:
+ description:
+ - LACP port priority for the interface. Range 1-65535. Applicable only for
+ Ethernet.
+ type: int
+ rate:
+ description:
+ - Rate at which PDUs are sent by LACP. Applicable only for Ethernet. At fast
+ rate LACP is transmitted once every 1 second. At normal rate LACP is transmitted
+ every 30 seconds after the link is bundled.
+ type: str
+ choices:
+ - fast
+ - normal
+ links:
+ description:
+ - This dict contains configurable options related to max and min port-channel
+ links. Applicable only for Port-channel.
+ type: dict
+ suboptions:
+ max:
+ description:
+ - Port-channel max bundle.
+ type: int
+ min:
+ description:
+ - Port-channel min links.
+ type: int
+ mode:
+ description:
+ - LACP mode. Applicable only for Port-channel.
+ type: str
+ choices:
+ - delay
+ suspend_individual:
+ description:
+ - port-channel lacp state. Disabling this will cause lacp to put the port
+ to individual state and not suspend the port in case it does not get LACP
+ BPDU from the peer ports in the port-channel.
+ type: bool
+ convergence:
+ description:
+ - This dict contains configurable options related to convergence. Applicable
+ only for Port-channel.
+ type: dict
+ suboptions:
+ graceful:
+ description:
+ - port-channel lacp graceful convergence. Disable this only with lacp
+ ports connected to Non-Nexus peer. Disabling this with Nexus peer can
+ lead to port suspension.
+ type: bool
+ vpc:
+ description:
+ - Enable lacp convergence for vPC port channels.
+ type: bool
+ state:
+ description:
+ - The state of the configuration after module completion.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+
+- name: Merge provided configuration with device configuration.
+ cisco.nxos.nxos_lacp_interfaces:
+ config:
+ - name: Ethernet1/3
+ port_priority: 5
+ rate: fast
+ state: merged
+
+# After state:
+# ------------
+#
+# interface Ethernet1/3
+# lacp port-priority 5
+# lacp rate fast
+
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/3
+# lacp port-priority 5
+# interface port-channel11
+# lacp mode delay
+
+- name: Replace device lacp interfaces configuration with the given configuration.
+ cisco.nxos.nxos_lacp_interfaces:
+ config:
+ - name: port-channel11
+ links:
+ min: 4
+ state: replaced
+
+# After state:
+# ------------
+#
+# interface Ethernet1/3
+# lacp port-priority 5
+# interface port-channel11
+# lacp min-links 4
+
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/3
+# lacp port-priority 5
+# interface port-channel11
+# lacp mode delay
+
+- name: Override device configuration of all LACP interfaces attributes of given interfaces
+ on device with provided configuration.
+ cisco.nxos.nxos_lacp_interfaces:
+ config:
+ - name: port-channel11
+ links:
+ min: 4
+ state: overridden
+
+# After state:
+# ------------
+#
+# interface port-channel11
+# lacp min-links 4
+
+
+# Using deleted
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/3
+# lacp port-priority 5
+# interface port-channel11
+# lacp mode delay
+
+- name: Delete LACP interfaces configurations.
+ cisco.nxos.nxos_lacp_interfaces:
+ state: deleted
+
+# After state:
+# ------------
+#
+
+# Using rendered
+
+- name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_lacp_interfaces:
+ config:
+ - name: Ethernet1/800
+ rate: fast
+ - name: Ethernet1/801
+ rate: fast
+ port_priority: 32
+ - name: port-channel10
+ links:
+ max: 15
+ min: 2
+ convergence:
+ graceful: true
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+
+# rendered:
+# - "interface Ethernet1/800"
+# - "lacp rate fast"
+# - "interface Ethernet1/801"
+# - "lacp port-priority 32"
+# - "lacp rate fast"
+# - "interface port-channel10"
+# - "lacp min-links 2"
+# - "lacp max-bundle 15"
+# - "lacp graceful-convergence"
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+
+# interface port-channel10
+# lacp min-links 10
+# lacp max-bundle 15
+# interface Ethernet1/800
+# lacp port-priority 100
+# lacp rate fast
+
+- name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_lacp_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+
+# parsed:
+# - name: port-channel10
+# links:
+# max: 15
+# min: 10
+# - name: Ethernet1/800
+# port_priority: 100
+# rate: fast
+
+# Using gathered
+
+# Existing device config state
+# -------------------------------
+# interface Ethernet1/1
+# lacp port-priority 5
+# lacp rate fast
+# interface port-channel10
+# lacp mode delay
+# interface port-channel11
+# lacp max-bundle 10
+# lacp min-links 5
+
+- name: Gather lacp_interfaces facts from the device using nxos_lacp_interfaces
+ cisco.nxos.nxos_lacp_interfaces:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+# gathered:
+# - name: Ethernet1/1
+# port_priority: 5
+# rate: fast
+# - name: port-channel10
+# mode: delay
+# - name: port-channel11
+# links:
+# max: 10
+# min: 5
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface port-channel10', 'lacp min-links 5', 'lacp mode delay']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.lacp_interfaces.lacp_interfaces import (
+ Lacp_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.lacp_interfaces.lacp_interfaces import (
+ Lacp_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Lacp_interfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Lacp_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lag_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lag_interfaces.py
new file mode 100644
index 00000000..cb9c6682
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lag_interfaces.py
@@ -0,0 +1,365 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_lag_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_lag_interfaces
+short_description: LAG interfaces resource module
+description: This module manages attributes of link aggregation groups of NX-OS Interfaces.
+version_added: 1.0.0
+author:
+- Trishna Guha (@trishnaguha)
+- Nilashish Chakraborty (@NilashishC)
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section ^interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A list of link aggregation group configurations.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name of the link aggregation group (LAG).
+ type: str
+ required: true
+ members:
+ description:
+ - The list of interfaces that are part of the group.
+ type: list
+ elements: dict
+ suboptions:
+ member:
+ description:
+ - The interface name.
+ type: str
+ mode:
+ description:
+ - Link aggregation group (LAG).
+ type: str
+ choices:
+ - 'active'
+ - 'on'
+ - 'passive'
+ force:
+ description:
+ - When true it forces link aggregation group members to match what is
+ declared in the members param. This can be used to remove members.
+ type: bool
+ state:
+ description:
+ - The state of the configuration after module completion.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+notes:
+- Tested against NXOS 7.3.(0)D1(1) on VIRL.
+- This module works with connection C(network_cli).
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/4
+
+- name: Merge provided configuration with device configuration.
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ - name: port-channel99
+ members:
+ - member: Ethernet1/4
+ state: merged
+
+# After state:
+# ------------
+#
+# interface Ethernet1/4
+# channel-group 99
+
+
+# Using replaced
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/4
+# channel-group 99 mode active
+
+- name: Replace device configuration of specified LAG attributes of given interfaces
+ with provided configuration.
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ - name: port-channel10
+ members:
+ - member: Ethernet1/4
+ state: replaced
+
+# After state:
+# ------------
+#
+# interface Ethernet1/4
+# channel-group 10
+
+
+# Using overridden
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/4
+# channel-group 10
+# interface Ethernet1/2
+# channel-group 99 mode passive
+
+- name: Override device configuration of all LAG attributes of given interfaces on
+ device with provided configuration.
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ - name: port-channel20
+ members:
+ - member: Ethernet1/6
+ force: true
+ state: overridden
+
+# After state:
+# ------------
+# interface Ethernet1/2
+# interface Ethernet1/4
+# interface Ethernet1/6
+# channel-group 20 force
+
+
+# Using deleted
+
+# Before state:
+# -------------
+#
+# interface Ethernet1/4
+# channel-group 99 mode active
+
+- name: Delete LAG attributes of given interface (This won't delete the port-channel
+ itself).
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ - port-channel: port-channel99
+ state: deleted
+
+- name: Delete LAG attributes of all the interfaces
+ cisco.nxos.nxos_lag_interfaces:
+ state: deleted
+
+# After state:
+# ------------
+#
+# interface Ethernet1/4
+# no channel-group 99
+
+# Using rendered
+
+- name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ - name: port-channel10
+ members:
+ - member: Ethernet1/800
+ mode: active
+ - member: Ethernet1/801
+ - name: port-channel11
+ members:
+ - member: Ethernet1/802
+ mode: passive
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+
+# rendered:
+# - "interface Ethernet1/800"
+# - "channel-group 10 mode active"
+# - "interface Ethernet1/801"
+# - "channel-group 10"
+# - "interface Ethernet1/802"
+# - "channel-group 11 mode passive"
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+
+# interface port-channel10
+# interface port-channel11
+# interface port-channel12
+# interface Ethernet1/800
+# channel-group 10 mode active
+# interface Ethernet1/801
+# channel-group 10 mode active
+# interface Ethernet1/802
+# channel-group 11 mode passive
+# interface Ethernet1/803
+# channel-group 11 mode passive
+
+- name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_lag_interfaces:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+
+# parsed:
+# - members:
+# - member: Ethernet1/800
+# mode: active
+# - member: Ethernet1/801
+# mode: active
+# name: port-channel10
+#
+# - members:
+# - member: Ethernet1/802
+# mode: passive
+# - member: Ethernet1/803
+# mode: passive
+# name: port-channel11
+#
+# - name: port-channel12
+
+# Using gathered
+
+# Existing device config state
+# -------------------------------
+# interface port-channel10
+# interface port-channel11
+# interface Ethernet1/1
+# channel-group 10 mode active
+# interface Ethernet1/2
+# channel-group 11 mode passive
+#
+
+- name: Gather lag_interfaces facts from the device using nxos_lag_interfaces
+ cisco.nxos.nxos_lag_interfaces:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+# gathered:
+# - name: port-channel10
+# members:
+# - member: Ethernet1/1
+# mode: active
+# - name: port-channel11
+# members:
+# - member: Ethernet1/2
+# mode: passive
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample:
+ - "interface Ethernet1/800"
+ - "channel-group 10 mode active"
+ - "interface Ethernet1/801"
+ - "channel-group 10"
+ - "interface Ethernet1/802"
+ - "channel-group 11 mode passive"
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.lag_interfaces.lag_interfaces import (
+ Lag_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.lag_interfaces.lag_interfaces import (
+ Lag_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Lag_interfacesArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Lag_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_linkagg.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_linkagg.py
new file mode 100644
index 00000000..2ff69d99
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_linkagg.py
@@ -0,0 +1,559 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# (c) 2017, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_linkagg
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2022-06-01) Manage link
+ aggregation groups on Cisco NXOS devices.
+description:
+- This module provides declarative management of link aggregation groups on Cisco
+ NXOS devices.
+version_added: 1.0.0
+deprecated:
+ alternative: nxos_lag_interfaces
+ why: Updated modules released with more functionality.
+ removed_at_date: '2022-06-01'
+author:
+- Trishna Guha (@trishnaguha)
+notes:
+- Tested against NXOSv 7.0(3)I5(1).
+- C(state=absent) removes the portchannel config and interface if it already exists.
+ If members to be removed are not explicitly passed, all existing members (if any),
+ are removed.
+- Members must be a list.
+- LACP needs to be enabled first if active/passive modes are used.
+options:
+ group:
+ description:
+ - Channel-group number for the port-channel Link aggregation group.
+ type: str
+ mode:
+ description:
+ - Mode for the link aggregation group.
+ choices:
+ - 'active'
+ - 'on'
+ - 'passive'
+ default: 'on'
+ type: str
+ min_links:
+ description:
+ - Minimum number of ports required up before bringing up the link aggregation
+ group.
+ type: int
+ members:
+ description:
+ - List of interfaces that will be managed in the link aggregation group.
+ type: list
+ elements: str
+ force:
+ description:
+ - When true it forces link aggregation group members to match what is declared
+ in the members param. This can be used to remove members.
+ type: bool
+ default: no
+ aggregate:
+ description: List of link aggregation definitions.
+ type: list
+ elements: dict
+ suboptions:
+ group:
+ description:
+ - Channel-group number for the port-channel Link aggregation group.
+ type: str
+ required: True
+ mode:
+ description:
+ - Mode for the link aggregation group.
+ choices:
+ - 'active'
+ - 'on'
+ - 'passive'
+ type: str
+ min_links:
+ description:
+ - Minimum number of ports required up before bringing up the link aggregation
+ group.
+ type: int
+ members:
+ description:
+ - List of interfaces that will be managed in the link aggregation group.
+ type: list
+ elements: str
+ force:
+ description:
+ - When true it forces link aggregation group members to match what is declared
+ in the members param. This can be used to remove members.
+ type: bool
+ state:
+ description:
+ - State of the link aggregation group.
+ choices:
+ - present
+ - absent
+ type: str
+ state:
+ description:
+ - State of the link aggregation group.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+ purge:
+ description:
+ - Purge links not defined in the I(aggregate) parameter.
+ type: bool
+ default: no
+"""
+
+EXAMPLES = """
+- name: create link aggregation group
+ cisco.nxos.nxos_linkagg:
+ group: 99
+ state: present
+
+- name: delete link aggregation group
+ cisco.nxos.nxos_linkagg:
+ group: 99
+ state: absent
+
+- name: set link aggregation group to members
+ cisco.nxos.nxos_linkagg:
+ group: 10
+ min_links: 3
+ mode: active
+ members:
+ - Ethernet1/2
+ - Ethernet1/4
+
+- name: remove link aggregation group from Ethernet1/2
+ cisco.nxos.nxos_linkagg:
+ group: 10
+ min_links: 3
+ mode: active
+ members:
+ - Ethernet1/4
+
+- name: Create aggregate of linkagg definitions
+ cisco.nxos.nxos_linkagg:
+ aggregate:
+ - {group: 3}
+ - {group: 100, min_links: 3}
+
+- name: Remove aggregate of linkagg definitions
+ cisco.nxos.nxos_linkagg:
+ aggregate:
+ - {group: 3}
+ - {group: 100, min_links: 3}
+ state: absent
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always, except for the platforms that use Netconf transport to manage the device.
+ type: list
+ sample:
+ - interface port-channel 30
+ - lacp min-links 5
+ - interface Ethernet2/1
+ - channel-group 30 mode active
+ - no interface port-channel 30
+"""
+
+import re
+from copy import deepcopy
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ normalize_interface,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+
+
+def search_obj_in_list(group, lst):
+ for o in lst:
+ if o["group"] == group:
+ return o
+
+
+def get_diff(w, obj):
+ c = deepcopy(w)
+ o = deepcopy(obj)
+
+ if o["group"] == c["group"] and o.get("members") == c.get("members"):
+ if "members" in o:
+ del o["members"]
+ if "members" in c:
+ del c["members"]
+ diff_dict = dict(set(c.items()) - set(o.items()))
+ return diff_dict
+
+
+def map_obj_to_commands(updates, module):
+ commands = list()
+ want, have = updates
+ purge = module.params["purge"]
+ force = module.params["force"]
+
+ for w in want:
+ group = w["group"]
+ mode = w["mode"]
+ min_links = w["min_links"]
+ members = w.get("members") or []
+ state = w["state"]
+ del w["state"]
+
+ obj_in_have = search_obj_in_list(group, have)
+
+ if state == "absent":
+ if obj_in_have:
+ members_to_remove = list(
+ set(obj_in_have["members"]) - set(members)
+ )
+ if members_to_remove:
+ for m in members_to_remove:
+ commands.append("interface {0}".format(m))
+ commands.append(
+ "no channel-group {0}".format(obj_in_have["group"])
+ )
+ commands.append("exit")
+ commands.append("no interface port-channel {0}".format(group))
+
+ elif state == "present":
+ if not obj_in_have:
+ commands.append("interface port-channel {0}".format(group))
+ if min_links != "None":
+ commands.append("lacp min-links {0}".format(min_links))
+ commands.append("exit")
+ if members:
+ for m in members:
+ commands.append("interface {0}".format(m))
+ if force:
+ commands.append(
+ "channel-group {0} force mode {1}".format(
+ group, mode
+ )
+ )
+ else:
+ commands.append(
+ "channel-group {0} mode {1}".format(
+ group, mode
+ )
+ )
+
+ else:
+ if members:
+ if not obj_in_have["members"]:
+ for m in members:
+ commands.append(
+ "interface port-channel {0}".format(group)
+ )
+ commands.append("exit")
+ commands.append("interface {0}".format(m))
+ if force:
+ commands.append(
+ "channel-group {0} force mode {1}".format(
+ group, mode
+ )
+ )
+ else:
+ commands.append(
+ "channel-group {0} mode {1}".format(
+ group, mode
+ )
+ )
+
+ elif set(members) != set(obj_in_have["members"]):
+ missing_members = list(
+ set(members) - set(obj_in_have["members"])
+ )
+ for m in missing_members:
+ commands.append(
+ "interface port-channel {0}".format(group)
+ )
+ commands.append("exit")
+ commands.append("interface {0}".format(m))
+ if force:
+ commands.append(
+ "channel-group {0} force mode {1}".format(
+ group, mode
+ )
+ )
+ else:
+ commands.append(
+ "channel-group {0} mode {1}".format(
+ group, mode
+ )
+ )
+
+ superfluous_members = list(
+ set(obj_in_have["members"]) - set(members)
+ )
+ for m in superfluous_members:
+ commands.append(
+ "interface port-channel {0}".format(group)
+ )
+ commands.append("exit")
+ commands.append("interface {0}".format(m))
+ commands.append(
+ "no channel-group {0}".format(group)
+ )
+
+ else:
+ diff = get_diff(w, obj_in_have)
+ if diff and "mode" in diff:
+ mode = diff["mode"]
+ for i in members:
+ commands.append("interface {0}".format(i))
+ if force:
+ commands.append(
+ "channel-group {0} force mode {1}".format(
+ group, mode
+ )
+ )
+ else:
+ commands.append(
+ "channel-group {0} mode {1}".format(
+ group, mode
+ )
+ )
+
+ if purge:
+ for h in have:
+ obj_in_want = search_obj_in_list(h["group"], want)
+ if not obj_in_want:
+ commands.append(
+ "no interface port-channel {0}".format(h["group"])
+ )
+
+ return commands
+
+
+def map_params_to_obj(module):
+ obj = []
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+
+ d = item.copy()
+ d["group"] = str(d["group"])
+ d["min_links"] = str(d["min_links"])
+ if d["members"]:
+ d["members"] = [normalize_interface(i) for i in d["members"]]
+
+ obj.append(d)
+ else:
+ members = None
+ if module.params["members"]:
+ members = [
+ normalize_interface(i) for i in module.params["members"]
+ ]
+
+ obj.append(
+ {
+ "group": str(module.params["group"]),
+ "mode": module.params["mode"],
+ "min_links": str(module.params["min_links"]),
+ "members": members,
+ "state": module.params["state"],
+ }
+ )
+
+ return obj
+
+
+def parse_min_links(module, group):
+ min_links = None
+
+ flags = ["| section interface.port-channel{0}".format(group)]
+ config = get_config(module, flags=flags)
+ match = re.search(r"lacp min-links (\S+)", config, re.M)
+ if match:
+ min_links = match.group(1)
+
+ return min_links
+
+
+def parse_mode(module, m):
+ mode = None
+
+ flags = ["| section interface.{0}".format(m)]
+ config = get_config(module, flags=flags)
+ match = re.search(
+ r"channel-group [0-9]+ (force )?mode (\S+)", config, re.M
+ )
+ if match:
+ mode = match.group(2)
+
+ return mode
+
+
+def get_members(channel):
+ members = []
+ if "TABLE_member" in channel.keys():
+ interfaces = channel["TABLE_member"]["ROW_member"]
+ else:
+ return list()
+
+ if isinstance(interfaces, dict):
+ members.append(normalize_interface(interfaces.get("port")))
+ elif isinstance(interfaces, list):
+ for i in interfaces:
+ members.append(normalize_interface(i.get("port")))
+
+ return members
+
+
+def parse_members(output, group):
+ channels = output["TABLE_channel"]["ROW_channel"]
+
+ if isinstance(channels, list):
+ for channel in channels:
+ if channel["group"] == group:
+ members = get_members(channel)
+ elif isinstance(channels, dict):
+ if channels["group"] == group:
+ members = get_members(channels)
+ else:
+ return list()
+
+ return members
+
+
+def parse_channel_options(module, output, channel):
+ obj = {}
+
+ group = channel["group"]
+ obj["group"] = str(group)
+ obj["min_links"] = parse_min_links(module, group)
+ members = parse_members(output, group)
+ obj["members"] = members
+ for m in members:
+ obj["mode"] = parse_mode(module, m)
+
+ return obj
+
+
+def map_config_to_obj(module):
+ objs = list()
+ output = run_commands(module, ["show port-channel summary | json"])[0]
+ if not output:
+ return list()
+
+ try:
+ channels = output["TABLE_channel"]["ROW_channel"]
+ except (TypeError, KeyError):
+ return objs
+
+ if channels:
+ if isinstance(channels, list):
+ for channel in channels:
+ obj = parse_channel_options(module, output, channel)
+ objs.append(obj)
+
+ elif isinstance(channels, dict):
+ obj = parse_channel_options(module, output, channels)
+ objs.append(obj)
+
+ return objs
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ group=dict(type="str"),
+ mode=dict(
+ required=False,
+ choices=["on", "active", "passive"],
+ default="on",
+ type="str",
+ ),
+ min_links=dict(required=False, default=None, type="int"),
+ members=dict(
+ required=False, default=None, type="list", elements="str"
+ ),
+ force=dict(required=False, default=False, type="bool"),
+ state=dict(
+ required=False, choices=["absent", "present"], default="present"
+ ),
+ )
+
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["group"] = dict(required=True)
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec),
+ purge=dict(default=False, type="bool"),
+ )
+
+ argument_spec.update(element_spec)
+ argument_spec.update(nxos_argument_spec)
+
+ required_one_of = [["group", "aggregate"]]
+ mutually_exclusive = [["group", "aggregate"]]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=required_one_of,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+
+ commands = map_obj_to_commands((want, have), module)
+ result["commands"] = commands
+
+ if commands:
+ if not module.check_mode:
+ resp = load_config(module, commands, True)
+ if resp:
+ for item in resp:
+ if item:
+ if isinstance(item, dict):
+ err_str = item["clierror"]
+ else:
+ err_str = item
+ if "cannot add" in err_str.lower():
+ module.fail_json(msg=err_str)
+ result["changed"] = True
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lldp.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lldp.py
new file mode 100644
index 00000000..c9ccfdb8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lldp.py
@@ -0,0 +1,129 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# (c) 2017, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_lldp
+author: Ganesh Nalawade (@ganeshrn)
+short_description: (deprecated, removed after 2022-06-01) Manage LLDP
+ configuration on Cisco NXOS network devices.
+description:
+- This module provides declarative management of LLDP service on Cisco NXOS network
+ devices.
+version_added: 1.0.0
+deprecated:
+ alternative: nxos_lldp_global
+ why: Updated modules released with more functionality
+ removed_at_date: '2022-06-01'
+notes:
+- Tested against NXOSv 7.0(3)I5(1).
+options:
+ state:
+ description:
+ - State of the LLDP configuration. If value is I(present) lldp will be enabled
+ else if it is I(absent) it will be disabled.
+ default: present
+ choices:
+ - present
+ - absent
+ - enabled
+ - disabled
+ type: str
+extends_documentation_fragment:
+- cisco.nxos.nxos
+
+
+"""
+
+EXAMPLES = """
+- name: Enable LLDP service
+ cisco.nxos.nxos_lldp:
+ state: present
+
+- name: Disable LLDP service
+ cisco.nxos.nxos_lldp:
+ state: absent
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always, except for the platforms that use Netconf transport to manage the device.
+ type: list
+ sample:
+ - feature lldp
+"""
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+
+
+def has_lldp(module):
+ output = get_config(module, ["| section lldp"])
+ is_lldp_enable = False
+ if output and "feature lldp" in output:
+ is_lldp_enable = True
+
+ return is_lldp_enable
+
+
+def main():
+ """ main entry point for module execution
+ """
+ argument_spec = dict(
+ state=dict(
+ default="present",
+ choices=["present", "absent", "enabled", "disabled"],
+ )
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ result = {"changed": False}
+
+ if warnings:
+ result["warnings"] = warnings
+
+ HAS_LLDP = has_lldp(module)
+
+ commands = []
+
+ if module.params["state"] == "absent" and HAS_LLDP:
+ commands.append("no feature lldp")
+ elif module.params["state"] == "present" and not HAS_LLDP:
+ commands.append("feature lldp")
+
+ result["commands"] = commands
+
+ if commands:
+ # On N35 A8 images, some features return a yes/no prompt
+ # on enablement or disablement. Bypass using terminal dont-ask
+ commands.insert(0, "terminal dont-ask")
+ if not module.check_mode:
+ load_config(module, commands)
+
+ result["changed"] = True
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lldp_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lldp_global.py
new file mode 100644
index 00000000..3bf38c19
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lldp_global.py
@@ -0,0 +1,342 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The module file for nxos_lldp_global
+"""
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_lldp_global
+short_description: LLDP resource module
+description: This module configures and manages the Link Layer Discovery Protocol(LLDP)
+ attributes on NX-OS platforms.
+version_added: 1.0.0
+author: Adharsh Srivats Rangarajan (@adharshsrivatsr)
+notes:
+- Tested against NxOS 7.3.(0)D1(1) on VIRL
+- The LLDP feature needs to be enabled before using this module
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | include lldp).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description:
+ - A list of link layer discovery configurations
+ type: dict
+ suboptions:
+ holdtime:
+ description:
+ - Amount of time the receiving device should hold the information (in seconds)
+ type: int
+ port_id:
+ description:
+ - This attribute defines if the interface names should be advertised in the
+ long(0) or short(1) form.
+ type: int
+ choices:
+ - 0
+ - 1
+ reinit:
+ description:
+ - Amount of time to delay the initialization of LLDP on any interface (in
+ seconds)
+ type: int
+ timer:
+ description:
+ - Frequency at which LLDP updates need to be transmitted (in seconds)
+ type: int
+ tlv_select:
+ description:
+ - This attribute can be used to specify the TLVs that need to be sent and
+ received in the LLDP packets. By default, all TLVs are advertised
+ type: dict
+ suboptions:
+ dcbxp:
+ description:
+ - Used to specify the Data Center Bridging Exchange Protocol TLV
+ type: bool
+ management_address:
+ description:
+ - Used to specify the management address in TLV messages
+ type: dict
+ suboptions:
+ v4:
+ description: Management address with TLV v4
+ type: bool
+ v6:
+ description: Management address with TLV v6
+ type: bool
+ port:
+ description:
+ - Used to manage port based attributes in TLV messages
+ type: dict
+ suboptions:
+ description:
+ description:
+ - Used to specify the port description TLV
+ type: bool
+ vlan:
+ description:
+ - Used to specify the port VLAN ID TLV
+ type: bool
+ power_management:
+ description:
+ - Used to specify IEEE 802.3 DTE Power via MDI TLV
+ type: bool
+ system:
+ description:
+ - Used to manage system based attributes in TLV messages
+ type: dict
+ suboptions:
+ capabilities:
+ description:
+ - Used to specify the system capabilities TLV
+ type: bool
+ description:
+ description:
+ - Used to specify the system description TLV
+ type: bool
+ name:
+ description:
+ - Used to specify the system name TLV
+ type: bool
+ state:
+ description:
+ - The state of the configuration after module completion
+ type: str
+ choices:
+ - merged
+ - replaced
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+# Before state:
+# -------------
+#
+# user(config)# show running-config | include lldp
+# feature lldp
+
+- name: Merge provided configuration with device configuration
+ cisco.nxos.nxos_lldp_global:
+ config:
+ timer: 35
+ holdtime: 100
+ state: merged
+
+# After state:
+# ------------
+#
+# user(config)# show running-config | include lldp
+# feature lldp
+# lldp timer 35
+# lldp holdtime 100
+
+
+# Using replaced
+# Before state:
+# -------------
+#
+# user(config)# show running-config | include lldp
+# feature lldp
+# lldp holdtime 100
+# lldp reinit 5
+# lldp timer 35
+
+- name: Replace device configuration of specific LLDP attributes with provided configuration
+ cisco.nxos.nxos_lldp_global:
+ config:
+ timer: 40
+ tlv_select:
+ system:
+ description: true
+ name: false
+ management_address:
+ v4: true
+ state: replaced
+
+# After state:
+# ------------
+#
+# user(config)# show running-config | include lldp
+# feature lldp
+# lldp timer 40
+# no lldp tlv-select system-name
+
+
+# Using deleted
+# Before state:
+# -------------
+#
+# user(config)# show running-config | include lldp
+# feature lldp
+# lldp holdtime 5
+# lldp reinit 3
+
+- name: Delete LLDP configuration (this will by default remove all lldp configuration)
+ cisco.nxos.nxos_lldp_global:
+ state: deleted
+
+# After state:
+# ------------
+#
+# user(config)# show running-config | include lldp
+# feature lldp
+
+# Using rendered
+
+- name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_lldp_global:
+ config:
+ holdtime: 130
+ port_id: 1
+ reinit: 5
+ tlv_select:
+ dcbxp: yes
+ power_management: yes
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+
+# rendered:
+# - "lldp tlv-select dcbxp"
+# - "lldp tlv-select power-management"
+# - "lldp portid-subtype 1"
+# - "lldp reinit 5"
+# - "lldp holdtime 130"
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+# lldp holdtime 131
+# lldp reinit 7
+# no lldp tlv-select system-name
+# no lldp tlv-select system-description
+
+# Task output (redacted)
+# -----------------------
+
+# parsed:
+# holdtime: 131
+# reinit: 7
+# tlv_select:
+# system:
+# description: false
+# name: false
+
+# Using gathered
+
+# Existing device config state
+# -------------------------------
+# feature lldp
+# lldp holdtime 129
+# lldp reinit 5
+# lldp timer 35
+# no lldp tlv-select system-name
+
+# Task output (redacted)
+# -----------------------
+
+# gathered:
+# reinit: 5
+# timer: 35
+# tlv_select:
+# system:
+# name: False
+# holdtime: 129
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['lldp holdtime 125', 'lldp reinit 4', 'no lldp tlv-select system-name']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.lldp_global.lldp_global import (
+ Lldp_globalArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.lldp_global.lldp_global import (
+ Lldp_global,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ mutually_exclusive = [("config", "running_config")]
+
+ module = AnsibleModule(
+ argument_spec=Lldp_globalArgs.argument_spec,
+ required_if=required_if,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = Lldp_global(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lldp_interfaces.py
new file mode 100644
index 00000000..045686a6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_lldp_interfaces.py
@@ -0,0 +1,260 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The module file for nxos_lldp_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_lldp_interfaces
+short_description: LLDP interfaces resource module
+description: This module manages interfaces' configuration for Link Layer Discovery
+ Protocol (LLDP) on NX-OS platforms.
+version_added: 1.0.0
+author: Adharsh Srivats Rangarajan (@adharshsrivatsr)
+notes:
+- Tested against NXOS 7.3.(0)D1(1) on VIRL
+- The LLDP feature needs to be enabled before using this module
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section ^interface).
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description:
+ - A list of link layer discovery configurations for interfaces.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name of the interface
+ required: true
+ type: str
+ receive:
+ description:
+ - Used to enable or disable the reception of LLDP packets on that interface.
+ By default, this is enabled after LLDP is enabled globally.
+ type: bool
+ transmit:
+ description:
+ - Used to enable or disable the transmission of LLDP packets on that interface.
+ By default, this is enabled after LLDP is enabled globally.
+ type: bool
+ tlv_set:
+ description:
+ - Used to configure TLV parameters on the interface
+ type: dict
+ suboptions:
+ management_address:
+ description:
+ - Used to mention the IPv4 or IPv6 management address for the interface
+ type: str
+ vlan:
+ description:
+ - Used to mention the VLAN for the interface
+ type: int
+ state:
+ description:
+ - The state the configuration should be left in
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+#
+
+- name: Merge provided configuration with device configuration
+ cisco.nxos.nxos_lldp_interfaces:
+ config:
+ - name: Ethernet1/4
+ receive: false
+ transmit: true
+ tlv_set:
+ management_address: 192.168.122.64
+ vlan: 12
+ state: merged
+
+# After state:
+# -------------
+#
+# interface Ethernet1/4
+# no lldp receive
+# lldp tlv-set management-address 192.168.122.64
+# lldp tlv-set vlan 12
+
+
+# Using replaced
+
+# Before state:
+# ------------
+#
+# interface Ethernet1/4
+# no lldp receive
+# lldp tlv-set management-address 192.168.122.64
+# interface Ethernet1/5
+# no lldp transmit
+# lldp tlv-set vlan 10
+
+- name: Replace LLDP configuration on interfaces with given configuration
+ cisco.nxos.nxos_lldp_interfaces:
+ config:
+ - name: Ethernet1/4
+ transmit: no
+ tlv_set:
+ vlan: 2
+ state: replaced
+
+
+# After state:
+# -----------
+#
+# interface Ethernet1/4
+# no lldp transmit
+# lldp tlv_set vlan 2
+# interface Ethernet1/5
+# no lldp transmit
+# lldp tlv-set vlan 10
+
+
+# Using overridden
+
+# Before state:
+# ------------
+#
+# interface Ethernet1/4
+# no lldp receive
+# lldp tlv-set management-address 192.168.122.64
+# interface Ethernet1/5
+# no lldp transmit
+# lldp tlv-set vlan 10
+
+- name: Override LLDP configuration on all interfaces with given configuration
+ cisco.nxos.nxos_lldp_interfaces:
+ config:
+ - name: Ethernet1/7
+ receive: no
+ tlv_set:
+ vlan: 12
+ state: overridden
+
+
+# After state:
+# -----------
+#
+# interface Ethernet1/7
+# no lldp receive
+# lldp tlv_set vlan 12
+
+
+# Using deleted
+
+# Before state:
+# ------------
+#
+# interface Ethernet1/4
+# lldp tlv-set management vlan 24
+# no lldp transmit
+# interface mgmt0
+# no lldp receive
+
+- name: Delete LLDP interfaces configuration
+ cisco.nxos.nxos_lldp_interfaces:
+ state: deleted
+
+# After state:
+# ------------
+#
+
+
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['interface Ethernet1/2', 'lldp receive', 'lldp tlv-set vlan 12']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.lldp_interfaces.lldp_interfaces import (
+ Lldp_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.lldp_interfaces.lldp_interfaces import (
+ Lldp_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ module = AnsibleModule(
+ argument_spec=Lldp_interfacesArgs.argument_spec,
+ supports_check_mode=True,
+ )
+
+ result = Lldp_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_logging.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_logging.py
new file mode 100644
index 00000000..b8845861
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_logging.py
@@ -0,0 +1,979 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+# Copyright: (c) 2017, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+DOCUMENTATION = """
+module: nxos_logging
+author: Trishna Guha (@trishnaguha)
+short_description: Manage logging on network devices
+description:
+- This module provides declarative management of logging on Cisco NX-OS devices.
+version_added: 1.0.0
+options:
+ dest:
+ description:
+ - Destination of the logs.
+ choices:
+ - console
+ - logfile
+ - module
+ - monitor
+ - server
+ type: str
+ remote_server:
+ description:
+ - Hostname or IP Address for remote logging (when dest is 'server').
+ type: str
+ use_vrf:
+ description:
+ - VRF to be used while configuring remote logging (when dest is 'server').
+ type: str
+ interface:
+ description:
+ - Interface to be used while configuring source-interface for logging (e.g., 'Ethernet1/2',
+ 'mgmt0')
+ type: str
+ name:
+ description:
+ - If value of C(dest) is I(logfile) it indicates file-name.
+ type: str
+ facility:
+ description:
+ - Facility name for logging.
+ type: str
+ dest_level:
+ description:
+ - Set logging severity levels.
+ aliases:
+ - level
+ type: int
+ facility_level:
+ description:
+ - Set logging severity levels for facility based log messages.
+ type: int
+ aggregate:
+ description: List of logging definitions.
+ type: list
+ elements: dict
+ state:
+ description:
+ - State of the logging configuration.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+ event:
+ description:
+ - Link/trunk enable/default interface configuration logging
+ choices:
+ - link-enable
+ - link-default
+ - trunk-enable
+ - trunk-default
+ type: str
+ interface_message:
+ description:
+ - Add interface description to interface syslogs. Does not work with version 6.0
+ images using nxapi as a transport.
+ choices:
+ - add-interface-description
+ type: str
+ file_size:
+ description:
+ - Set logfile size
+ type: int
+ facility_link_status:
+ description:
+ - Set logging facility ethpm link status. Not idempotent with version 6.0 images.
+ choices:
+ - link-down-notif
+ - link-down-error
+ - link-up-notif
+ - link-up-error
+ type: str
+ timestamp:
+ description:
+ - Set logging timestamp format
+ choices:
+ - microseconds
+ - milliseconds
+ - seconds
+ type: str
+ purge:
+ description:
+ - Remove any switch logging configuration that does not match what has been configured
+ Not supported for ansible_connection local. All nxos_logging tasks must use
+ the same ansible_connection type.
+ type: bool
+ default: false
+extends_documentation_fragment:
+- cisco.nxos.nxos
+"""
+
+EXAMPLES = """
+- name: configure console logging with level
+ cisco.nxos.nxos_logging:
+ dest: console
+ level: 2
+ state: present
+- name: remove console logging configuration
+ cisco.nxos.nxos_logging:
+ dest: console
+ level: 2
+ state: absent
+- name: configure file logging with level
+ cisco.nxos.nxos_logging:
+ dest: logfile
+ name: testfile
+ dest_level: 3
+ state: present
+- name: Configure logging logfile with size
+ cisco.nxos.nxos_logging:
+ dest: logfile
+ name: testfile
+ dest_level: 3
+ file_size: 16384
+- name: configure facility level logging
+ cisco.nxos.nxos_logging:
+ facility: daemon
+ facility_level: 0
+ state: present
+- name: remove facility level logging
+ cisco.nxos.nxos_logging:
+ facility: daemon
+ facility_level: 0
+ state: absent
+- name: Configure Remote Logging
+ cisco.nxos.nxos_logging:
+ dest: server
+ remote_server: test-syslogserver.com
+ facility: auth
+ facility_level: 1
+ use_vrf: management
+ state: present
+- name: Configure Source Interface for Logging
+ cisco.nxos.nxos_logging:
+ interface: mgmt0
+ state: present
+- name: Purge nxos_logging configuration not managed by this playbook
+ cisco.nxos.nxos_logging:
+ purge: true
+- name: Configure logging timestamp
+ cisco.nxos.nxos_logging:
+ timestamp: milliseconds
+ state: present
+- name: Configure logging facility ethpm link status
+ cisco.nxos.nxos_logging:
+ facility: ethpm
+ facility_link_status: link-up-notif
+ state: present
+- name: Configure logging message ethernet description
+ cisco.nxos.nxos_logging:
+ interface_message: add-interface-description
+ state: present
+- name: Configure logging event link enable
+ cisco.nxos.nxos_logging:
+ event: link-enable
+ state: present
+- name: Configure logging using aggregate
+ cisco.nxos.nxos_logging:
+ aggregate:
+ - {dest: console, dest_level: 2}
+ - {dest: logfile, dest_level: 2, name: testfile}
+ - {facility: daemon, facility_level: 0}
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - logging console 2
+ - logging logfile testfile 3
+ - logging level daemon 0
+"""
+
+import re
+import copy
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+ run_commands,
+ save_module_context,
+ read_module_context,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+ normalize_interface,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+STATIC_CLI = {
+ "link-enable": "logging event link-status enable",
+ "link-default": "logging event link-status default",
+ "trunk-enable": "logging event trunk-status enable",
+ "trunk-default": "logging event trunk-status default",
+ "microseconds": "logging timestamp microseconds",
+ "milliseconds": "logging timestamp milliseconds",
+ "seconds": "logging timestamp seconds",
+ "link-up-error": "link-up error",
+ "link-up-notif": "link-up notif",
+ "link-down-error": "link-down error",
+ "link-down-notif": "link-down notif",
+ "add-interface-description": "logging message interface type ethernet description",
+}
+
+DEFAULT_LOGGING_LEVEL = {
+ 0: [],
+ 1: [],
+ 2: ["pktmgr"],
+ 3: ["adjmgr", "arp", "icmpv6", "l2rib", "netstack"],
+ 4: [],
+ 5: ["mrib", "m6rib"],
+ 6: [],
+ 7: [],
+}
+
+DEST_GROUP = ["console", "logfile", "module", "monitor", "server"]
+
+
+def map_obj_to_commands(module, updates):
+ commands = list()
+ want, have = updates
+
+ for w in want:
+ state = w["state"]
+ del w["state"]
+
+ if state == "absent" and w in have:
+ if w["facility"] is not None:
+ if (
+ not w["dest"]
+ and not w["facility_link_status"]
+ and w["facility"]
+ not in DEFAULT_LOGGING_LEVEL[int(w["facility_level"])]
+ ):
+ commands.append(
+ "no logging level {0} {1}".format(
+ w["facility"], w["facility_level"]
+ )
+ )
+
+ if w["facility_link_status"] and w["facility"] in ("ethpm"):
+ commands.append(
+ "no logging level {0} {1}".format(
+ w["facility"],
+ STATIC_CLI[w["facility_link_status"]],
+ )
+ )
+
+ if w["name"] is not None:
+ commands.append("no logging logfile")
+
+ if w["dest"] in ("console", "module", "monitor"):
+ commands.append("no logging {0}".format(w["dest"]))
+
+ if w["dest"] == "server":
+ commands.append(
+ "no logging server {0}".format(w["remote_server"])
+ )
+
+ if w["interface"]:
+ commands.append("no logging source-interface")
+
+ if w["event"] and w["event"] in STATIC_CLI:
+ commands.append("no " + STATIC_CLI[w["event"]])
+
+ if w["message"] and w["message"] in STATIC_CLI:
+ commands.append("no " + STATIC_CLI[w["message"]])
+
+ if w["timestamp"] and w["timestamp"] in STATIC_CLI:
+ commands.append("no " + STATIC_CLI[w["timestamp"]])
+
+ if state == "present" and w not in have:
+ if w["facility"] is None:
+ if w["dest"]:
+ if w["dest"] not in ("logfile", "server"):
+ commands.append(
+ "logging {0} {1}".format(
+ w["dest"], w["dest_level"]
+ )
+ )
+
+ elif w["dest"] == "logfile":
+ if w["file_size"]:
+ commands.append(
+ "logging logfile {0} {1} size {2}".format(
+ w["name"], w["dest_level"], w["file_size"]
+ )
+ )
+ else:
+ commands.append(
+ "logging logfile {0} {1}".format(
+ w["name"], w["dest_level"]
+ )
+ )
+
+ elif w["dest"] == "server":
+ if w["facility_level"]:
+ if w["use_vrf"]:
+ commands.append(
+ "logging server {0} {1} use-vrf {2}".format(
+ w["remote_server"],
+ w["facility_level"],
+ w["use_vrf"],
+ )
+ )
+ else:
+ commands.append(
+ "logging server {0} {1}".format(
+ w["remote_server"], w["facility_level"]
+ )
+ )
+
+ else:
+ if w["use_vrf"]:
+ commands.append(
+ "logging server {0} use-vrf {1}".format(
+ w["remote_server"], w["use_vrf"]
+ )
+ )
+ else:
+ commands.append(
+ "logging server {0}".format(
+ w["remote_server"]
+ )
+ )
+
+ if w["facility"]:
+ if w["dest"] == "server":
+ if w["facility_level"]:
+ if w["use_vrf"]:
+ commands.append(
+ "logging server {0} {1} facility {2} use-vrf {3}".format(
+ w["remote_server"],
+ w["facility_level"],
+ w["facility"],
+ w["use_vrf"],
+ )
+ )
+ else:
+ commands.append(
+ "logging server {0} {1} facility {2}".format(
+ w["remote_server"],
+ w["facility_level"],
+ w["facility"],
+ )
+ )
+ else:
+ if w["use_vrf"]:
+ commands.append(
+ "logging server {0} facility {1} use-vrf {2}".format(
+ w["remote_server"],
+ w["facility"],
+ w["use_vrf"],
+ )
+ )
+ else:
+ commands.append(
+ "logging server {0} facility {1}".format(
+ w["remote_server"], w["facility"]
+ )
+ )
+ else:
+ if w["facility_link_status"]:
+ commands.append(
+ "logging level {0} {1}".format(
+ w["facility"],
+ STATIC_CLI[w["facility_link_status"]],
+ )
+ )
+ else:
+ if not match_facility_default(
+ module, w["facility"], w["facility_level"]
+ ):
+ commands.append(
+ "logging level {0} {1}".format(
+ w["facility"], w["facility_level"]
+ )
+ )
+
+ if w["interface"]:
+ commands.append(
+ "logging source-interface {0} {1}".format(
+ *split_interface(w["interface"])
+ )
+ )
+
+ if w["event"] and w["event"] in STATIC_CLI:
+ commands.append(STATIC_CLI[w["event"]])
+
+ if w["message"] and w["message"] in STATIC_CLI:
+ commands.append(STATIC_CLI[w["message"]])
+
+ if w["timestamp"] and w["timestamp"] in STATIC_CLI:
+ commands.append(STATIC_CLI[w["timestamp"]])
+
+ return commands
+
+
+def match_facility_default(module, facility, want_level):
+ """ Check wanted facility to see if it matches current device default """
+
+ matches_default = False
+ # Sample output from show logging level command
+ # Facility Default Severity Current Session Severity
+ # -------- ---------------- ------------------------
+ # bfd 5 5
+ #
+ # 0(emergencies) 1(alerts) 2(critical)
+ # 3(errors) 4(warnings) 5(notifications)
+ # 6(information) 7(debugging)
+
+ regexl = r"\S+\s+(\d+)\s+(\d+)"
+ cmd = {
+ "command": "show logging level {0}".format(facility),
+ "output": "text",
+ }
+ facility_data = run_commands(module, cmd)
+ for line in facility_data[0].split("\n"):
+ mo = re.search(regexl, line)
+ if (
+ mo
+ and int(mo.group(1)) == int(want_level)
+ and int(mo.group(2)) == int(want_level)
+ ):
+ matches_default = True
+
+ return matches_default
+
+
+def split_interface(interface):
+ match = re.search(r"(\D+)(\S*)", interface, re.M)
+ if match:
+ return match.group(1), match.group(2)
+
+
+def parse_facility_link_status(line, facility, status):
+ facility_link_status = None
+
+ if facility is not None:
+ match = re.search(
+ r"logging level {0} {1} (\S+)".format(facility, status), line, re.M
+ )
+ if match:
+ facility_link_status = status + "-" + match.group(1)
+
+ return facility_link_status
+
+
+def parse_event_status(line, event):
+ status = None
+
+ match = re.search(
+ r"logging event {0} (\S+)".format(event + "-status"), line, re.M
+ )
+ if match:
+ state = match.group(1)
+ if state:
+ status = state
+
+ return status
+
+
+def parse_event(line):
+ event = None
+
+ match = re.search(r"logging event (\S+)", line, re.M)
+ if match:
+ state = match.group(1)
+ if state == "link-status":
+ event = "link"
+ elif state == "trunk-status":
+ event = "trunk"
+
+ return event
+
+
+def parse_message(line):
+ message = None
+
+ match = re.search(
+ r"logging message interface type ethernet description", line, re.M
+ )
+ if match:
+ message = "add-interface-description"
+
+ return message
+
+
+def parse_file_size(line, name, level):
+ file_size = None
+
+ match = re.search(
+ r"logging logfile {0} {1} size (\S+)".format(name, level), line, re.M
+ )
+ if match:
+ file_size = match.group(1)
+ if file_size == "8192":
+ file_size = None
+
+ return file_size
+
+
+def parse_timestamp(line):
+ timestamp = None
+
+ match = re.search(r"logging timestamp (\S+)", line, re.M)
+ if match:
+ timestamp = match.group(1)
+
+ return timestamp
+
+
+def parse_name(line, dest):
+ name = None
+
+ if dest is not None:
+ if dest == "logfile":
+ match = re.search(r"logging logfile (\S+)", line, re.M)
+ if match:
+ name = match.group(1)
+ else:
+ pass
+
+ return name
+
+
+def parse_remote_server(line, dest):
+ remote_server = None
+
+ if dest and dest == "server":
+ match = re.search(r"logging server (\S+)", line, re.M)
+ if match:
+ remote_server = match.group(1)
+
+ return remote_server
+
+
+def parse_dest_level(line, dest, name):
+ dest_level = None
+
+ def parse_match(match):
+ level = None
+ if match:
+ if int(match.group(1)) in range(0, 8):
+ level = match.group(1)
+ else:
+ pass
+ return level
+
+ if dest and dest != "server":
+ if dest == "logfile":
+ match = re.search(
+ r"logging logfile {0} (\S+)".format(name), line, re.M
+ )
+ if match:
+ dest_level = parse_match(match)
+
+ elif dest == "server":
+ match = re.search(r"logging server (?:\S+) (\d+)", line, re.M)
+ if match:
+ dest_level = parse_match(match)
+ else:
+ match = re.search(r"logging {0} (\S+)".format(dest), line, re.M)
+ if match:
+ dest_level = parse_match(match)
+
+ return dest_level
+
+
+def parse_facility_level(line, facility, dest):
+ facility_level = None
+
+ if dest == "server":
+ match = re.search(r"logging server (?:\S+) (\d+)", line, re.M)
+ if match:
+ facility_level = match.group(1)
+
+ elif facility is not None:
+ match = re.search(
+ r"logging level {0} (\S+)".format(facility), line, re.M
+ )
+ if match:
+ facility_level = match.group(1)
+
+ return facility_level
+
+
+def parse_facility(line):
+ facility = None
+
+ match = re.search(
+ r"logging server (?:\S+) (?:\d+) (?:\S+) (?:\S+) (?:\S+) (\S+)",
+ line,
+ re.M,
+ )
+ if match:
+ facility = match.group(1)
+
+ return facility
+
+
+def parse_use_vrf(line, dest):
+ use_vrf = None
+
+ if dest and dest == "server":
+ match = re.search(
+ r"logging server (?:\S+) (?:\d+) use-vrf (\S+)", line, re.M
+ )
+ if match:
+ use_vrf = match.group(1)
+
+ return use_vrf
+
+
+def parse_interface(line):
+ interface = None
+
+ match = re.search(r"logging source-interface (\S*)", line, re.M)
+ if match:
+ interface = match.group(1)
+
+ return interface
+
+
+def map_config_to_obj(module):
+ obj = []
+
+ data = get_config(module, flags=[" all | section logging"])
+
+ for line in data.split("\n"):
+ if re.search(r"no (\S+)", line, re.M):
+ state = "absent"
+ else:
+ state = "present"
+
+ match = re.search(r"logging (\S+)", line, re.M)
+ if state == "present" and match:
+ event_status = None
+ name = None
+ dest_level = None
+ dest = None
+ facility = None
+ remote_server = None
+ facility_link_status = None
+ file_size = None
+ facility_level = None
+
+ if match.group(1) in DEST_GROUP:
+ dest = match.group(1)
+
+ name = parse_name(line, dest)
+ remote_server = parse_remote_server(line, dest)
+ dest_level = parse_dest_level(line, dest, name)
+
+ if dest == "server":
+ facility = parse_facility(line)
+
+ facility_level = parse_facility_level(line, facility, dest)
+
+ if dest == "logfile":
+ file_size = parse_file_size(line, name, dest_level)
+
+ elif match.group(1) == "level":
+ match_facility = re.search(r"logging level (\S+)", line, re.M)
+ facility = match_facility.group(1)
+
+ level = parse_facility_level(line, facility, dest)
+ if level.isdigit():
+ facility_level = level
+ else:
+ facility_link_status = parse_facility_link_status(
+ line, facility, level
+ )
+
+ elif match.group(1) == "event" and state == "present":
+ event = parse_event(line)
+ if event:
+ status = parse_event_status(line, event)
+ if status:
+ event_status = event + "-" + status
+ else:
+ continue
+
+ else:
+ pass
+
+ obj.append(
+ {
+ "dest": dest,
+ "remote_server": remote_server,
+ "use_vrf": parse_use_vrf(line, dest),
+ "name": name,
+ "facility": facility,
+ "dest_level": dest_level,
+ "facility_level": facility_level,
+ "interface": parse_interface(line),
+ "facility_link_status": facility_link_status,
+ "event": event_status,
+ "file_size": file_size,
+ "message": parse_message(line),
+ "timestamp": parse_timestamp(line),
+ }
+ )
+
+ cmd = [
+ {
+ "command": "show logging | section enabled | section console",
+ "output": "text",
+ },
+ {
+ "command": "show logging | section enabled | section monitor",
+ "output": "text",
+ },
+ ]
+
+ default_data = run_commands(module, cmd)
+
+ for line in default_data:
+ flag = False
+ match = re.search(
+ r"Logging (\w+):(?:\s+) (?:\w+) (?:\W)Severity: (\w+)",
+ str(line),
+ re.M,
+ )
+ if match:
+ if match.group(1) == "console" and match.group(2) == "critical":
+ dest_level = "2"
+ flag = True
+ elif (
+ match.group(1) == "monitor"
+ and match.group(2) == "notifications"
+ ):
+ dest_level = "5"
+ flag = True
+ if flag:
+ obj.append(
+ {
+ "dest": match.group(1),
+ "remote_server": None,
+ "name": None,
+ "facility": None,
+ "dest_level": dest_level,
+ "facility_level": None,
+ "use_vrf": None,
+ "interface": None,
+ "facility_link_status": None,
+ "event": None,
+ "file_size": None,
+ "message": None,
+ "timestamp": None,
+ }
+ )
+
+ return obj
+
+
+def map_params_to_obj(module):
+ obj = []
+
+ if "aggregate" in module.params and module.params["aggregate"]:
+ args = {
+ "dest": "",
+ "remote_server": "",
+ "use_vrf": "",
+ "name": "",
+ "facility": "",
+ "dest_level": "",
+ "facility_level": "",
+ "interface": "",
+ "facility_link_status": None,
+ "event": None,
+ "file_size": None,
+ "message": None,
+ "timestamp": None,
+ }
+
+ for c in module.params["aggregate"]:
+ d = c.copy()
+
+ for key in args:
+ if key not in d:
+ d[key] = None
+
+ if d["dest_level"] is not None:
+ d["dest_level"] = str(d["dest_level"])
+
+ if d["facility_level"] is not None:
+ d["facility_level"] = str(d["facility_level"])
+
+ if d["interface"]:
+ d["interface"] = normalize_interface(d["interface"])
+
+ if "state" not in d:
+ d["state"] = module.params["state"]
+
+ if d["file_size"]:
+ d["file_size"] = str(d["file_size"])
+
+ obj.append(d)
+
+ else:
+ dest_level = None
+ facility_level = None
+ file_size = None
+
+ if module.params["dest_level"] is not None:
+ dest_level = str(module.params["dest_level"])
+
+ if module.params["facility_level"] is not None:
+ facility_level = str(module.params["facility_level"])
+
+ if module.params["file_size"] is not None:
+ file_size = str(module.params["file_size"])
+
+ obj.append(
+ {
+ "dest": module.params["dest"],
+ "remote_server": module.params["remote_server"],
+ "use_vrf": module.params["use_vrf"],
+ "name": module.params["name"],
+ "facility": module.params["facility"],
+ "dest_level": dest_level,
+ "facility_level": facility_level,
+ "interface": normalize_interface(module.params["interface"]),
+ "state": module.params["state"],
+ "facility_link_status": module.params["facility_link_status"],
+ "event": module.params["event"],
+ "message": module.params["interface_message"],
+ "file_size": file_size,
+ "timestamp": module.params["timestamp"],
+ }
+ )
+ return obj
+
+
+def merge_wants(wants, want):
+ if not wants:
+ wants = list()
+
+ for w in want:
+ w = copy.copy(w)
+ state = w["state"]
+ del w["state"]
+
+ if state == "absent":
+ if w in wants:
+ wants.remove(w)
+ elif w not in wants:
+ wants.append(w)
+
+ return wants
+
+
+def absent(h):
+ h["state"] = "absent"
+ return h
+
+
+def outliers(haves, wants):
+ wants = list(wants)
+ return [absent(h) for h in haves if not (h in wants or wants.append(h))]
+
+
+def main():
+ """ main entry point for module execution
+ """
+ argument_spec = dict(
+ dest=dict(choices=DEST_GROUP),
+ name=dict(),
+ facility=dict(),
+ remote_server=dict(),
+ use_vrf=dict(),
+ dest_level=dict(type="int", aliases=["level"]),
+ facility_level=dict(type="int"),
+ interface=dict(),
+ facility_link_status=dict(
+ choices=[
+ "link-down-notif",
+ "link-down-error",
+ "link-up-notif",
+ "link-up-error",
+ ]
+ ),
+ event=dict(
+ choices=[
+ "link-enable",
+ "link-default",
+ "trunk-enable",
+ "trunk-default",
+ ]
+ ),
+ interface_message=dict(choices=["add-interface-description"]),
+ file_size=dict(type="int"),
+ timestamp=dict(choices=["microseconds", "milliseconds", "seconds"]),
+ state=dict(default="present", choices=["present", "absent"]),
+ aggregate=dict(type="list", elements="dict"),
+ purge=dict(default=False, type="bool"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ required_if = [
+ ("dest", "logfile", ["name"]),
+ ("dest", "server", ["remote_server"]),
+ ]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+
+ want = map_params_to_obj(module)
+ merged_wants = merge_wants(read_module_context(module), want)
+ have = map_config_to_obj(module)
+
+ commands = map_obj_to_commands(module, (want, have))
+ result["commands"] = commands
+
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+
+ save_module_context(module, merged_wants)
+
+ if module.params.get("purge"):
+ pcommands = map_obj_to_commands(
+ module, (outliers(have, merged_wants), have)
+ )
+ if pcommands:
+ if not module.check_mode:
+ load_config(module, pcommands)
+ result["changed"] = True
+ result["commands"] += pcommands
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ntp.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ntp.py
new file mode 100644
index 00000000..3a4f0ec4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ntp.py
@@ -0,0 +1,459 @@
+#!/usr/bin/python
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_ntp
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages core NTP configuration.
+description:
+- Manages core NTP configuration.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+options:
+ server:
+ description:
+ - Network address of NTP server.
+ type: str
+ peer:
+ description:
+ - Network address of NTP peer.
+ type: str
+ key_id:
+ description:
+ - Authentication key identifier to use with given NTP server or peer or keyword
+ 'default'.
+ type: str
+ prefer:
+ description:
+ - Makes given NTP server or peer the preferred NTP server or peer for the device.
+ choices:
+ - enabled
+ - disabled
+ type: str
+ vrf_name:
+ description:
+ - Makes the device communicate with the given NTP server or peer over a specific
+ VRF or keyword 'default'.
+ type: str
+ source_addr:
+ description:
+ - Local source address from which NTP messages are sent or keyword 'default'.
+ type: str
+ source_int:
+ description:
+ - Local source interface from which NTP messages are sent. Must be fully qualified
+ interface name or keyword 'default'
+ type: str
+ state:
+ description:
+ - Manage the state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+# Set NTP Server with parameters
+- cisco.nxos.nxos_ntp:
+ server: 1.2.3.4
+ key_id: 32
+ prefer: enabled
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+"""
+
+RETURN = """
+proposed:
+ description: k/v pairs of parameters passed into module
+ returned: always
+ type: dict
+ sample: {"address": "192.0.2.2", "key_id": "48",
+ "peer_type": "server", "prefer": "enabled",
+ "source": "192.0.2.3", "source_type": "source"}
+existing:
+ description:
+ - k/v pairs of existing ntp server/peer
+ returned: always
+ type: dict
+ sample: {"address": "192.0.2.2", "key_id": "32",
+ "peer_type": "server", "prefer": "enabled",
+ "source": "ethernet2/1", "source_type": "source-interface"}
+end_state:
+ description: k/v pairs of ntp info after module execution
+ returned: always
+ type: dict
+ sample: {"address": "192.0.2.2", "key_id": "48",
+ "peer_type": "server", "prefer": "enabled",
+ "source": "192.0.2.3", "source_type": "source"}
+updates:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["ntp server 192.0.2.2 prefer key 48",
+ "no ntp source-interface ethernet2/1", "ntp source 192.0.2.3"]
+changed:
+ description: check to see if a change was made on the device
+ returned: always
+ type: bool
+ sample: true
+"""
+
+import re
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ nxos_argument_spec,
+ run_commands,
+)
+
+
+def execute_show_command(command, module, command_type="cli_show"):
+ if "show run" not in command:
+ output = "json"
+ else:
+ output = "text"
+
+ commands = [{"command": command, "output": output}]
+ return run_commands(module, commands)
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_ntp_source(module):
+ source_type = None
+ source = None
+ command = "show run | inc ntp.source"
+ output = execute_show_command(
+ command, module, command_type="cli_show_ascii"
+ )
+
+ if output:
+ try:
+ if "interface" in output[0]:
+ source_type = "source-interface"
+ else:
+ source_type = "source"
+ source = output[0].split()[2].lower()
+ except (AttributeError, IndexError):
+ source_type = None
+ source = None
+
+ return source_type, source
+
+
+def get_ntp_peer(module):
+ command = "show run | inc ntp.(server|peer)"
+ ntp_peer_list = []
+ response = execute_show_command(
+ command, module, command_type="cli_show_ascii"
+ )
+
+ if response:
+ if isinstance(response, list):
+ ntp = response[0]
+ else:
+ ntp = response
+ if ntp:
+ ntp_regex = (
+ r".*ntp\s(server\s(?P<address>\S+)|peer\s(?P<peer_address>\S+))"
+ r"\s*((?P<prefer>prefer)\s*)?(use-vrf\s(?P<vrf_name>\S+)\s*)?"
+ r"(key\s(?P<key_id>\d+))?.*"
+ )
+
+ split_ntp = ntp.splitlines()
+ for peer_line in split_ntp:
+ if "access-group" in peer_line:
+ continue
+ ntp_peer = {}
+ try:
+ peer_address = None
+ vrf_name = "default"
+ prefer = None
+ key_id = None
+ match_ntp = re.match(ntp_regex, peer_line, re.DOTALL)
+ group_ntp = match_ntp.groupdict()
+
+ address = group_ntp["address"]
+ peer_address = group_ntp["peer_address"]
+ prefer = group_ntp["prefer"]
+ vrf_name = group_ntp["vrf_name"]
+ key_id = group_ntp["key_id"]
+
+ if prefer is not None:
+ prefer = "enabled"
+ else:
+ prefer = "disabled"
+
+ if address is not None:
+ peer_type = "server"
+ elif peer_address is not None:
+ peer_type = "peer"
+ address = peer_address
+
+ args = dict(
+ peer_type=peer_type,
+ address=address,
+ prefer=prefer,
+ vrf_name=vrf_name,
+ key_id=key_id,
+ )
+
+ ntp_peer = dict((k, v) for k, v in args.items())
+ ntp_peer_list.append(ntp_peer)
+ except AttributeError:
+ ntp_peer_list = []
+
+ return ntp_peer_list
+
+
+def get_ntp_existing(address, peer_type, module):
+ peer_dict = {}
+ peer_server_list = []
+
+ peer_list = get_ntp_peer(module)
+ for peer in peer_list:
+ if peer["address"] == address:
+ peer_dict.update(peer)
+ else:
+ peer_server_list.append(peer)
+
+ source_type, source = get_ntp_source(module)
+
+ if source_type is not None and source is not None:
+ peer_dict["source_type"] = source_type
+ peer_dict["source"] = source
+
+ return (peer_dict, peer_server_list)
+
+
+def set_ntp_server_peer(peer_type, address, prefer, key_id, vrf_name):
+ command_strings = []
+
+ if prefer:
+ command_strings.append(" prefer")
+ if key_id:
+ command_strings.append(" key {0}".format(key_id))
+ if vrf_name:
+ command_strings.append(" use-vrf {0}".format(vrf_name))
+
+ command_strings.insert(0, "ntp {0} {1}".format(peer_type, address))
+
+ command = "".join(command_strings)
+
+ return command
+
+
+def config_ntp(delta, existing):
+ if (
+ delta.get("address")
+ or delta.get("peer_type")
+ or delta.get("vrf_name")
+ or delta.get("key_id")
+ or delta.get("prefer")
+ ):
+ address = delta.get("address", existing.get("address"))
+ peer_type = delta.get("peer_type", existing.get("peer_type"))
+ key_id = delta.get("key_id", existing.get("key_id"))
+ prefer = delta.get("prefer", existing.get("prefer"))
+ vrf_name = delta.get("vrf_name", existing.get("vrf_name"))
+ if delta.get("key_id") == "default":
+ key_id = None
+ else:
+ peer_type = None
+ prefer = None
+
+ source_type = delta.get("source_type")
+ source = delta.get("source")
+
+ if prefer:
+ if prefer == "enabled":
+ prefer = True
+ elif prefer == "disabled":
+ prefer = False
+
+ if source:
+ source_type = delta.get("source_type", existing.get("source_type"))
+
+ ntp_cmds = []
+ if peer_type:
+ if existing.get("peer_type") and existing.get("address"):
+ ntp_cmds.append(
+ "no ntp {0} {1}".format(
+ existing.get("peer_type"), existing.get("address")
+ )
+ )
+ ntp_cmds.append(
+ set_ntp_server_peer(peer_type, address, prefer, key_id, vrf_name)
+ )
+ if source:
+ existing_source_type = existing.get("source_type")
+ existing_source = existing.get("source")
+ if existing_source_type and source_type != existing_source_type:
+ ntp_cmds.append(
+ "no ntp {0} {1}".format(existing_source_type, existing_source)
+ )
+ if source == "default":
+ if existing_source_type and existing_source:
+ ntp_cmds.append(
+ "no ntp {0} {1}".format(
+ existing_source_type, existing_source
+ )
+ )
+ else:
+ ntp_cmds.append("ntp {0} {1}".format(source_type, source))
+
+ return ntp_cmds
+
+
+def main():
+ argument_spec = dict(
+ server=dict(type="str"),
+ peer=dict(type="str"),
+ key_id=dict(type="str"),
+ prefer=dict(type="str", choices=["enabled", "disabled"]),
+ vrf_name=dict(type="str"),
+ source_addr=dict(type="str"),
+ source_int=dict(type="str"),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=[["server", "peer"], ["source_addr", "source_int"]],
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+
+ server = module.params["server"] or None
+ peer = module.params["peer"] or None
+ key_id = module.params["key_id"]
+ prefer = module.params["prefer"]
+ vrf_name = module.params["vrf_name"]
+ source_addr = module.params["source_addr"]
+ source_int = module.params["source_int"]
+ state = module.params["state"]
+
+ if source_int is not None:
+ source_int = source_int.lower()
+
+ if server:
+ peer_type = "server"
+ address = server
+ elif peer:
+ peer_type = "peer"
+ address = peer
+ else:
+ peer_type = None
+ address = None
+
+ source_type = None
+ source = None
+ if source_addr:
+ source_type = "source"
+ source = source_addr
+ elif source_int:
+ source_type = "source-interface"
+ source = source_int
+
+ if key_id or vrf_name or prefer:
+ if not server and not peer:
+ module.fail_json(msg="Please supply the server or peer parameter")
+
+ args = dict(
+ peer_type=peer_type,
+ address=address,
+ key_id=key_id,
+ prefer=prefer,
+ vrf_name=vrf_name,
+ source_type=source_type,
+ source=source,
+ )
+
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+
+ existing, peer_server_list = get_ntp_existing(address, peer_type, module)
+
+ end_state = existing
+ changed = False
+ commands = []
+
+ if state == "present":
+ delta = dict(set(proposed.items()).difference(existing.items()))
+ if delta.get("key_id") and delta.get("key_id") == "default":
+ if not existing.get("key_id"):
+ delta.pop("key_id")
+ if delta:
+ command = config_ntp(delta, existing)
+ if command:
+ commands.append(command)
+
+ elif state == "absent":
+ if existing.get("peer_type") and existing.get("address"):
+ command = "no ntp {0} {1}".format(
+ existing["peer_type"], existing["address"]
+ )
+ if command:
+ commands.append([command])
+
+ existing_source_type = existing.get("source_type")
+ existing_source = existing.get("source")
+ proposed_source_type = proposed.get("source_type")
+ proposed_source = proposed.get("source")
+
+ if proposed_source_type:
+ if proposed_source_type == existing_source_type:
+ if proposed_source == existing_source:
+ command = "no ntp {0} {1}".format(
+ existing_source_type, existing_source
+ )
+ if command:
+ commands.append([command])
+
+ cmds = flatten_list(commands)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ changed = True
+ load_config(module, cmds)
+ end_state = get_ntp_existing(address, peer_type, module)[0]
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ results = {}
+ results["proposed"] = proposed
+ results["existing"] = existing
+ results["updates"] = cmds
+ results["changed"] = changed
+ results["warnings"] = warnings
+ results["end_state"] = end_state
+ results["peer_server_list"] = peer_server_list
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ntp_auth.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ntp_auth.py
new file mode 100644
index 00000000..4aee5b9f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ntp_auth.py
@@ -0,0 +1,347 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_ntp_auth
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages NTP authentication.
+description:
+- Manages NTP authentication.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- If C(state=absent), the module will remove the given key configuration if it exists.
+- If C(state=absent) and C(authentication=on), authentication will be turned off.
+options:
+ key_id:
+ description:
+ - Authentication key identifier (numeric).
+ type: str
+ md5string:
+ description:
+ - MD5 String.
+ type: str
+ auth_type:
+ description:
+ - Whether the given md5string is in cleartext or has been encrypted. If in cleartext,
+ the device will encrypt it before storing it.
+ default: text
+ choices:
+ - text
+ - encrypt
+ type: str
+ trusted_key:
+ description:
+ - Whether the given key is required to be supplied by a time source for the device
+ to synchronize to the time source.
+ choices:
+ - 'false'
+ - 'true'
+ default: 'false'
+ type: str
+ authentication:
+ description:
+ - Turns NTP authentication on or off.
+ choices:
+ - "on"
+ - "off"
+ type: str
+ state:
+ description:
+ - Manage the state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+# Basic NTP authentication configuration
+- cisco.nxos.nxos_ntp_auth:
+ key_id: 32
+ md5string: hello
+ auth_type: text
+"""
+
+RETURN = """
+commands:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["ntp authentication-key 32 md5 helloWorld 0", "ntp trusted-key 32"]
+"""
+
+
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def execute_show_command(command, module):
+ if "show run" not in command:
+ command = {"command": command, "output": "json"}
+ else:
+ command = {"command": command, "output": "text"}
+
+ return run_commands(module, [command])
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_ntp_auth(module):
+ command = "show ntp authentication-status"
+
+ body = execute_show_command(command, module)[0]
+ ntp_auth_str = body["authentication"]
+
+ if "enabled" in ntp_auth_str:
+ ntp_auth = True
+ else:
+ ntp_auth = False
+
+ return ntp_auth
+
+
+def get_ntp_trusted_key(module):
+ trusted_key_list = []
+ command = "show run | inc ntp.trusted-key"
+
+ trusted_key_str = execute_show_command(command, module)[0]
+ if trusted_key_str:
+ trusted_keys = trusted_key_str.splitlines()
+
+ else:
+ trusted_keys = []
+
+ for line in trusted_keys:
+ if line:
+ trusted_key_list.append(str(line.split()[2]))
+
+ return trusted_key_list
+
+
+def get_ntp_auth_key(key_id, module):
+ authentication_key = {}
+ command = "show run | inc ntp.authentication-key.{0}".format(key_id)
+ auth_regex = (
+ r".*ntp\sauthentication-key\s(?P<key_id>\d+)\s"
+ r"md5\s(?P<md5string>\S+)\s(?P<atype>\S+).*"
+ )
+
+ body = execute_show_command(command, module)[0]
+
+ try:
+ match_authentication = re.match(auth_regex, body, re.DOTALL)
+ group_authentication = match_authentication.groupdict()
+ authentication_key["key_id"] = group_authentication["key_id"]
+ authentication_key["md5string"] = group_authentication["md5string"]
+ if group_authentication["atype"] == "7":
+ authentication_key["auth_type"] = "encrypt"
+ else:
+ authentication_key["auth_type"] = "text"
+ except (AttributeError, TypeError):
+ authentication_key = {}
+
+ return authentication_key
+
+
+def get_ntp_auth_info(key_id, module):
+ auth_info = get_ntp_auth_key(key_id, module)
+ trusted_key_list = get_ntp_trusted_key(module)
+ auth_power = get_ntp_auth(module)
+
+ if key_id in trusted_key_list:
+ auth_info["trusted_key"] = "true"
+ else:
+ auth_info["trusted_key"] = "false"
+
+ if auth_power:
+ auth_info["authentication"] = "on"
+ else:
+ auth_info["authentication"] = "off"
+
+ return auth_info
+
+
+def auth_type_to_num(auth_type):
+ if auth_type == "encrypt":
+ return "7"
+ else:
+ return "0"
+
+
+def set_ntp_auth_key(
+ key_id, md5string, auth_type, trusted_key, authentication
+):
+ ntp_auth_cmds = []
+ if key_id and md5string:
+ auth_type_num = auth_type_to_num(auth_type)
+ ntp_auth_cmds.append(
+ "ntp authentication-key {0} md5 {1} {2}".format(
+ key_id, md5string, auth_type_num
+ )
+ )
+
+ if trusted_key == "true":
+ ntp_auth_cmds.append("ntp trusted-key {0}".format(key_id))
+ elif trusted_key == "false":
+ ntp_auth_cmds.append("no ntp trusted-key {0}".format(key_id))
+
+ if authentication == "on":
+ ntp_auth_cmds.append("ntp authenticate")
+ elif authentication == "off":
+ ntp_auth_cmds.append("no ntp authenticate")
+
+ return ntp_auth_cmds
+
+
+def remove_ntp_auth_key(
+ key_id, md5string, auth_type, trusted_key, authentication
+):
+ auth_remove_cmds = []
+ if key_id:
+ auth_type_num = auth_type_to_num(auth_type)
+ auth_remove_cmds.append(
+ "no ntp authentication-key {0} md5 {1} {2}".format(
+ key_id, md5string, auth_type_num
+ )
+ )
+
+ if authentication:
+ auth_remove_cmds.append("no ntp authenticate")
+ return auth_remove_cmds
+
+
+def main():
+ argument_spec = dict(
+ key_id=dict(type="str"),
+ md5string=dict(type="str"),
+ auth_type=dict(choices=["text", "encrypt"], default="text"),
+ trusted_key=dict(choices=["true", "false"], default="false"),
+ authentication=dict(choices=["on", "off"]),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ key_id = module.params["key_id"]
+ md5string = module.params["md5string"]
+ auth_type = module.params["auth_type"]
+ trusted_key = module.params["trusted_key"]
+ authentication = module.params["authentication"]
+ state = module.params["state"]
+
+ if key_id:
+ if not trusted_key and not md5string:
+ module.fail_json(msg="trusted_key or md5string MUST be specified")
+
+ args = dict(
+ key_id=key_id,
+ md5string=md5string,
+ auth_type=auth_type,
+ trusted_key=trusted_key,
+ authentication=authentication,
+ )
+
+ changed = False
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+
+ existing = get_ntp_auth_info(key_id, module)
+ end_state = existing
+
+ delta = dict(set(proposed.items()).difference(existing.items()))
+
+ commands = []
+ if state == "present":
+ if delta:
+ command = set_ntp_auth_key(
+ key_id,
+ md5string,
+ delta.get("auth_type"),
+ delta.get("trusted_key"),
+ delta.get("authentication"),
+ )
+ if command:
+ commands.append(command)
+ elif state == "absent":
+ auth_toggle = None
+ if existing.get("authentication") == "on":
+ auth_toggle = True
+ if not existing.get("key_id"):
+ key_id = None
+ command = remove_ntp_auth_key(
+ key_id, md5string, auth_type, trusted_key, auth_toggle
+ )
+ if command:
+ commands.append(command)
+
+ cmds = flatten_list(commands)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ load_config(module, cmds)
+ end_state = get_ntp_auth_info(key_id, module)
+ delta = dict(set(end_state.items()).difference(existing.items()))
+ if delta or (len(existing) != len(end_state)):
+ changed = True
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ results = {}
+ results["proposed"] = proposed
+ results["existing"] = existing
+ results["updates"] = cmds
+ results["changed"] = changed
+ results["warnings"] = warnings
+ results["end_state"] = end_state
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ntp_options.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ntp_options.py
new file mode 100644
index 00000000..21a47155
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ntp_options.py
@@ -0,0 +1,173 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_ntp_options
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages NTP options.
+description:
+- Manages NTP options, e.g. authoritative server and logging.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- When C(state=absent), master and logging will be set to False and stratum will be
+ removed as well
+options:
+ master:
+ description:
+ - Sets whether the device is an authoritative NTP server.
+ type: bool
+ stratum:
+ description:
+ - If C(master=true), an optional stratum can be supplied (1-15). The device default
+ is 8.
+ type: str
+ logging:
+ description:
+ - Sets whether NTP logging is enabled on the device.
+ type: bool
+ state:
+ description:
+ - Manage the state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+EXAMPLES = """
+# Basic NTP options configuration
+- cisco.nxos.nxos_ntp_options:
+ master: true
+ stratum: 12
+ logging: false
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+"""
+
+RETURN = """
+updates:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["no ntp logging", "ntp master 12"]
+"""
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def get_current(module):
+ cmd = "show running-config | inc ntp"
+
+ master = False
+ logging = False
+ stratum = None
+
+ output = run_commands(module, ({"command": cmd, "output": "text"}))[0]
+
+ if output:
+ match = re.search(r"^ntp master(?: (\d+))", output, re.M)
+ if match:
+ master = True
+ stratum = match.group(1)
+ logging = "ntp logging" in output.lower()
+
+ return {"master": master, "stratum": stratum, "logging": logging}
+
+
+def main():
+ argument_spec = dict(
+ master=dict(required=False, type="bool"),
+ stratum=dict(required=False, type="str"),
+ logging=dict(required=False, type="bool"),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ master = module.params["master"]
+ stratum = module.params["stratum"]
+ logging = module.params["logging"]
+ state = module.params["state"]
+
+ if stratum and master is False:
+ if stratum != 8:
+ module.fail_json(msg="master MUST be True when stratum is changed")
+
+ current = get_current(module)
+
+ result = {"changed": False}
+
+ commands = list()
+
+ if state == "absent":
+ if current["master"]:
+ commands.append("no ntp master")
+ if current["logging"]:
+ commands.append("no ntp logging")
+
+ elif state == "present":
+ if master and not current["master"]:
+ commands.append("ntp master")
+ elif master is False and current["master"]:
+ commands.append("no ntp master")
+ if stratum and stratum != current["stratum"]:
+ commands.append("ntp master %s" % stratum)
+
+ if logging and not current["logging"]:
+ commands.append("ntp logging")
+ elif logging is False and current["logging"]:
+ commands.append("no ntp logging")
+
+ result["commands"] = commands
+ result["updates"] = commands
+
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+
+ result["warnings"] = warnings
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_nxapi.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_nxapi.py
new file mode 100644
index 00000000..f3d2fde9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_nxapi.py
@@ -0,0 +1,442 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# pylint: skip-file
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_nxapi
+extends_documentation_fragment:
+- cisco.nxos.nxos
+author: Peter Sprygada (@privateip)
+short_description: Manage NXAPI configuration on an NXOS device.
+description:
+- Configures the NXAPI feature on devices running Cisco NXOS. The NXAPI feature is
+ absent from the configuration by default. Since this module manages the NXAPI feature
+ it only supports the use of the C(Cli) transport.
+version_added: 1.0.0
+options:
+ http_port:
+ description:
+ - Configure the port with which the HTTP server will listen on for requests. By
+ default, NXAPI will bind the HTTP service to the standard HTTP port 80. This
+ argument accepts valid port values in the range of 1 to 65535.
+ required: false
+ default: 80
+ type: int
+ http:
+ description:
+ - Controls the operating state of the HTTP protocol as one of the underlying transports
+ for NXAPI. By default, NXAPI will enable the HTTP transport when the feature
+ is first configured. To disable the use of the HTTP transport, set the value
+ of this argument to False.
+ required: false
+ default: true
+ type: bool
+ aliases:
+ - enable_http
+ https_port:
+ description:
+ - Configure the port with which the HTTPS server will listen on for requests. By
+ default, NXAPI will bind the HTTPS service to the standard HTTPS port 443. This
+ argument accepts valid port values in the range of 1 to 65535.
+ required: false
+ default: 443
+ type: int
+ https:
+ description:
+ - Controls the operating state of the HTTPS protocol as one of the underlying
+ transports for NXAPI. By default, NXAPI will disable the HTTPS transport when
+ the feature is first configured. To enable the use of the HTTPS transport,
+ set the value of this argument to True.
+ required: false
+ default: false
+ type: bool
+ aliases:
+ - enable_https
+ sandbox:
+ description:
+ - The NXAPI feature provides a web base UI for developers for entering commands. This
+ feature is initially disabled when the NXAPI feature is configured for the first
+ time. When the C(sandbox) argument is set to True, the developer sandbox URL
+ will accept requests and when the value is set to False, the sandbox URL is
+ unavailable. This is supported on NX-OS 7K series.
+ required: false
+ type: bool
+ aliases:
+ - enable_sandbox
+ state:
+ description:
+ - The C(state) argument controls whether or not the NXAPI feature is configured
+ on the remote device. When the value is C(present) the NXAPI feature configuration
+ is present in the device running-config. When the values is C(absent) the feature
+ configuration is removed from the running-config.
+ choices:
+ - present
+ - absent
+ required: false
+ default: present
+ type: str
+ ssl_strong_ciphers:
+ description:
+ - Controls the use of whether strong or weak ciphers are configured. By default,
+ this feature is disabled and weak ciphers are configured. To enable the use
+ of strong ciphers, set the value of this argument to True.
+ required: false
+ default: false
+ type: bool
+ tlsv1_0:
+ description:
+ - Controls the use of the Transport Layer Security version 1.0 is configured. By
+ default, this feature is enabled. To disable the use of TLSV1.0, set the value
+ of this argument to True.
+ required: false
+ default: true
+ type: bool
+ tlsv1_1:
+ description:
+ - Controls the use of the Transport Layer Security version 1.1 is configured. By
+ default, this feature is disabled. To enable the use of TLSV1.1, set the value
+ of this argument to True.
+ required: false
+ default: false
+ type: bool
+ tlsv1_2:
+ description:
+ - Controls the use of the Transport Layer Security version 1.2 is configured. By
+ default, this feature is disabled. To enable the use of TLSV1.2, set the value
+ of this argument to True.
+ required: false
+ default: false
+ type: bool
+"""
+
+EXAMPLES = """
+- name: Enable NXAPI access with default configuration
+ cisco.nxos.nxos_nxapi:
+ state: present
+
+- name: Enable NXAPI with no HTTP, HTTPS at port 9443 and sandbox disabled
+ cisco.nxos.nxos_nxapi:
+ enable_http: false
+ https_port: 9443
+ https: yes
+ enable_sandbox: no
+
+- name: remove NXAPI configuration
+ cisco.nxos.nxos_nxapi:
+ state: absent
+"""
+
+RETURN = """
+updates:
+ description:
+ - Returns the list of commands that need to be pushed into the remote
+ device to satisfy the arguments
+ returned: always
+ type: list
+ sample: ['no feature nxapi']
+"""
+import re
+
+from distutils.version import LooseVersion
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ run_commands,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_capabilities,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def check_args(module, warnings, capabilities):
+ network_api = capabilities.get("network_api", "nxapi")
+ if network_api == "nxapi":
+ module.fail_json(msg="module not supported over nxapi transport")
+
+ os_platform = capabilities["device_info"]["network_os_platform"]
+ if "7K" not in os_platform and module.params["sandbox"]:
+ module.fail_json(
+ msg="sandbox or enable_sandbox is supported on NX-OS 7K series of switches"
+ )
+
+ state = module.params["state"]
+
+ if state == "started":
+ module.params["state"] = "present"
+ warnings.append(
+ "state=started is deprecated and will be removed in a "
+ "a future release. Please use state=present instead"
+ )
+ elif state == "stopped":
+ module.params["state"] = "absent"
+ warnings.append(
+ "state=stopped is deprecated and will be removed in a "
+ "a future release. Please use state=absent instead"
+ )
+
+ for key in ["http_port", "https_port"]:
+ if module.params[key] is not None:
+ if not 1 <= module.params[key] <= 65535:
+ module.fail_json(msg="%s must be between 1 and 65535" % key)
+
+ return warnings
+
+
+def map_obj_to_commands(want, have, module, warnings, capabilities):
+ send_commands = list()
+ commands = dict()
+ os_platform = None
+ os_version = None
+
+ device_info = capabilities.get("device_info")
+ if device_info:
+ os_version = device_info.get("network_os_version")
+ if os_version:
+ os_version = os_version[:3]
+ os_platform = device_info.get("network_os_platform")
+ if os_platform:
+ os_platform = os_platform[:3]
+
+ def needs_update(x):
+ return want.get(x) is not None and (want.get(x) != have.get(x))
+
+ if needs_update("state"):
+ if want["state"] == "absent":
+ return ["no feature nxapi"]
+ send_commands.append("feature nxapi")
+ elif want["state"] == "absent":
+ return send_commands
+
+ for parameter in ["http", "https"]:
+ port_param = parameter + "_port"
+ if needs_update(parameter):
+ if want.get(parameter) is False:
+ commands[parameter] = "no nxapi %s" % parameter
+ else:
+ commands[parameter] = "nxapi %s port %s" % (
+ parameter,
+ want.get(port_param),
+ )
+
+ if needs_update(port_param) and want.get(parameter) is True:
+ commands[parameter] = "nxapi %s port %s" % (
+ parameter,
+ want.get(port_param),
+ )
+
+ if needs_update("sandbox"):
+ commands["sandbox"] = "nxapi sandbox"
+ if not want["sandbox"]:
+ commands["sandbox"] = "no %s" % commands["sandbox"]
+
+ if os_platform and os_version:
+ if (os_platform == "N9K" or os_platform == "N3K") and LooseVersion(
+ os_version
+ ) >= "9.2":
+ if needs_update("ssl_strong_ciphers"):
+ commands["ssl_strong_ciphers"] = "nxapi ssl ciphers weak"
+ if want["ssl_strong_ciphers"] is True:
+ commands[
+ "ssl_strong_ciphers"
+ ] = "no nxapi ssl ciphers weak"
+
+ have_ssl_protocols = ""
+ want_ssl_protocols = ""
+ for key, value in {
+ "tlsv1_2": "TLSv1.2",
+ "tlsv1_1": "TLSv1.1",
+ "tlsv1_0": "TLSv1",
+ }.items():
+ if needs_update(key):
+ if want.get(key) is True:
+ want_ssl_protocols = " ".join(
+ [want_ssl_protocols, value]
+ )
+ elif have.get(key) is True:
+ have_ssl_protocols = " ".join([have_ssl_protocols, value])
+
+ if len(want_ssl_protocols) > 0:
+ commands["ssl_protocols"] = "nxapi ssl protocols%s" % (
+ " ".join([want_ssl_protocols, have_ssl_protocols])
+ )
+ else:
+ warnings.append(
+ "os_version and/or os_platform keys from "
+ "platform capabilities are not available. "
+ "Any NXAPI SSL optional arguments will be ignored"
+ )
+
+ send_commands.extend(commands.values())
+
+ return send_commands
+
+
+def parse_http(data):
+ http_res = [r"nxapi http port (\d+)"]
+ http_port = None
+
+ for regex in http_res:
+ match = re.search(regex, data, re.M)
+ if match:
+ http_port = int(match.group(1))
+ break
+
+ return {"http": http_port is not None, "http_port": http_port}
+
+
+def parse_https(data):
+ https_res = [r"nxapi https port (\d+)"]
+ https_port = None
+
+ for regex in https_res:
+ match = re.search(regex, data, re.M)
+ if match:
+ https_port = int(match.group(1))
+ break
+
+ return {"https": https_port is not None, "https_port": https_port}
+
+
+def parse_sandbox(data):
+ sandbox = [
+ item for item in data.split("\n") if re.search(r".*sandbox.*", item)
+ ]
+ value = False
+ if sandbox and sandbox[0] == "nxapi sandbox":
+ value = True
+ return {"sandbox": value}
+
+
+def parse_ssl_strong_ciphers(data):
+ ciphers_res = [r"(\w+) nxapi ssl ciphers weak"]
+ value = None
+
+ for regex in ciphers_res:
+ match = re.search(regex, data, re.M)
+ if match:
+ value = match.group(1)
+ break
+
+ return {"ssl_strong_ciphers": value == "no"}
+
+
+def parse_ssl_protocols(data):
+ tlsv1_0 = re.search(r"(?<!\S)TLSv1(?!\S)", data, re.M) is not None
+ tlsv1_1 = re.search(r"(?<!\S)TLSv1.1(?!\S)", data, re.M) is not None
+ tlsv1_2 = re.search(r"(?<!\S)TLSv1.2(?!\S)", data, re.M) is not None
+
+ return {"tlsv1_0": tlsv1_0, "tlsv1_1": tlsv1_1, "tlsv1_2": tlsv1_2}
+
+
+def map_config_to_obj(module):
+ out = run_commands(module, ["show run all | inc nxapi"], check_rc=False)[0]
+ match = re.search(r"no feature nxapi", out, re.M)
+ # There are two possible outcomes when nxapi is disabled on nxos platforms.
+ # 1. Nothing is displayed in the running config.
+ # 2. The 'no feature nxapi' command is displayed in the running config.
+ if match or out == "":
+ return {"state": "absent"}
+
+ out = str(out).strip()
+
+ obj = {"state": "present"}
+ obj.update(parse_http(out))
+ obj.update(parse_https(out))
+ obj.update(parse_sandbox(out))
+ obj.update(parse_ssl_strong_ciphers(out))
+ obj.update(parse_ssl_protocols(out))
+
+ return obj
+
+
+def map_params_to_obj(module):
+ obj = {
+ "http": module.params["http"],
+ "http_port": module.params["http_port"],
+ "https": module.params["https"],
+ "https_port": module.params["https_port"],
+ "sandbox": module.params["sandbox"],
+ "state": module.params["state"],
+ "ssl_strong_ciphers": module.params["ssl_strong_ciphers"],
+ "tlsv1_0": module.params["tlsv1_0"],
+ "tlsv1_1": module.params["tlsv1_1"],
+ "tlsv1_2": module.params["tlsv1_2"],
+ }
+
+ return obj
+
+
+def main():
+ """ main entry point for module execution
+ """
+ argument_spec = dict(
+ http=dict(aliases=["enable_http"], type="bool", default=True),
+ http_port=dict(type="int", default=80),
+ https=dict(aliases=["enable_https"], type="bool", default=False),
+ https_port=dict(type="int", default=443),
+ sandbox=dict(aliases=["enable_sandbox"], type="bool"),
+ state=dict(default="present", choices=["present", "absent"]),
+ ssl_strong_ciphers=dict(type="bool", default=False),
+ tlsv1_0=dict(type="bool", default=True),
+ tlsv1_1=dict(type="bool", default=False),
+ tlsv1_2=dict(type="bool", default=False),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ warning_msg = (
+ "Module nxos_nxapi currently defaults to configure 'http port 80'. "
+ )
+ warning_msg += "Default behavior is changing to configure 'https port 443'"
+ warning_msg += " when params 'http, http_port, https, https_port' are not set in the playbook"
+ module.deprecate(
+ msg=warning_msg, date="2022-06-01", collection_name="cisco.nxos"
+ )
+
+ capabilities = get_capabilities(module)
+
+ check_args(module, warnings, capabilities)
+
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+
+ commands = map_obj_to_commands(want, have, module, warnings, capabilities)
+
+ result = {"changed": False, "warnings": warnings, "commands": commands}
+
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospf.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospf.py
new file mode 100644
index 00000000..53640b13
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospf.py
@@ -0,0 +1,171 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_ospf
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2022-06-01) Manages configuration
+ of an ospf instance.
+description:
+- Manages configuration of an ospf instance.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+deprecated:
+ alternative: nxos_ospfv2 and nxos_ospfv3
+ why: Updated modules released with more functionality.
+ removed_at_date: '2022-06-01'
+options:
+ ospf:
+ description:
+ - Name of the ospf instance.
+ required: true
+ type: str
+ state:
+ description:
+ - Determines whether the config should be present or not on the device.
+ required: false
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+
+"""
+
+EXAMPLES = """
+- cisco.nxos.nxos_ospf:
+ ospf: 1
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["router ospf 1"]
+"""
+
+import re
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+
+PARAM_TO_COMMAND_KEYMAP = {"ospf": "router ospf"}
+
+
+def get_value(config, module):
+ splitted_config = config.splitlines()
+ value_list = []
+ REGEX = r"^router ospf\s(?P<ospf>\S+).*"
+ for line in splitted_config:
+ value = ""
+ if "router ospf" in line:
+ try:
+ match_ospf = re.match(REGEX, line, re.DOTALL)
+ ospf_group = match_ospf.groupdict()
+ value = ospf_group["ospf"]
+ except AttributeError:
+ value = ""
+ if value:
+ value_list.append(value)
+
+ return value_list
+
+
+def get_existing(module):
+ existing = {}
+ config = str(get_config(module))
+
+ value = get_value(config, module)
+ if value:
+ existing["ospf"] = value
+ return existing
+
+
+def state_present(module, proposed, candidate):
+ commands = ["router ospf {0}".format(proposed["ospf"])]
+ candidate.add(commands, parents=[])
+
+
+def state_absent(module, proposed, candidate):
+ commands = ["no router ospf {0}".format(proposed["ospf"])]
+ candidate.add(commands, parents=[])
+
+
+def main():
+ argument_spec = dict(
+ ospf=dict(required=True, type="str"),
+ state=dict(
+ choices=["present", "absent"], default="present", required=False
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ result = dict(changed=False, warnings=warnings)
+
+ state = module.params["state"]
+ ospf = str(module.params["ospf"])
+
+ existing = get_existing(module)
+ proposed = dict(ospf=ospf)
+
+ if not existing:
+ existing_list = []
+ else:
+ existing_list = existing["ospf"]
+
+ candidate = CustomNetworkConfig(indent=3)
+ if state == "present" and ospf not in existing_list:
+ state_present(module, proposed, candidate)
+ if state == "absent" and ospf in existing_list:
+ state_absent(module, proposed, candidate)
+
+ if candidate:
+ candidate = candidate.items_text()
+ load_config(module, candidate)
+ result["changed"] = True
+ result["commands"] = candidate
+
+ else:
+ result["commands"] = []
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospf_interfaces.py
new file mode 100644
index 00000000..1dc0c861
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospf_interfaces.py
@@ -0,0 +1,1445 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+"""
+The module file for nxos_ospf_interfaces
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+module: nxos_ospf_interfaces
+version_added: 1.3.0
+short_description: OSPF Interfaces Resource Module.
+description:
+- This module manages OSPF(v2/v3) configuration of interfaces on devices running Cisco NX-OS.
+author: Nilashish Chakraborty (@NilashishC)
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section "^interface").
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A list of OSPF configuration for interfaces.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name/Identifier of the interface.
+ type: str
+ required: True
+ address_family:
+ description:
+ - OSPF settings on the interfaces in address-family context.
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description:
+ - Address Family Identifier (AFI) for OSPF settings on the interfaces.
+ type: str
+ choices: ['ipv4', 'ipv6']
+ required: True
+ processes:
+ description:
+ - Interfaces configuration for an OSPF process.
+ type: list
+ elements: dict
+ suboptions:
+ process_id:
+ description:
+ - OSPF process tag.
+ type: str
+ required: True
+ area:
+ description:
+ - Area associated with interface.
+ type: dict
+ suboptions:
+ area_id:
+ description:
+ - Area ID as a decimal or IP address format.
+ type: str
+ required: True
+ secondaries:
+ description:
+ - Do not include secondary IPv4/IPv6 addresses.
+ type: bool
+ multi_areas:
+ description:
+ - Multi-Areas associated with interface.
+ - Valid values are Area Ids as an integer or IP address.
+ type: list
+ elements: str
+ multi_areas:
+ description:
+ - Multi-Areas associated with interface (not tied to OSPF process).
+ - Valid values are Area Ids as an integer or IP address.
+ type: list
+ elements: str
+ authentication:
+ description:
+ - Authentication settings on the interface.
+ type: dict
+ suboptions:
+ key_chain:
+ description:
+ - Authentication password key-chain.
+ type: str
+ message_digest:
+ description:
+ - Use message-digest authentication.
+ type: bool
+ enable:
+ description:
+ - Enable/disable authentication on the interface.
+ type: bool
+ null_auth:
+ description:
+ - Use null(disable) authentication.
+ type: bool
+ authentication_key:
+ description:
+ - Configure the authentication key for the interface.
+ type: dict
+ suboptions:
+ encryption:
+ description:
+ - 0 Specifies an UNENCRYPTED authentication key will follow.
+ - 3 Specifies an 3DES ENCRYPTED authentication key will follow.
+ - 7 Specifies a Cisco type 7 ENCRYPTED authentication key will follow.
+ type: int
+ key:
+ description:
+ - Authentication key.
+ - Valid values are Cisco type 7 ENCRYPTED password, 3DES ENCRYPTED password
+ and UNENCRYPTED (cleartext) password based on the value of encryption key.
+ type: str
+ required: True
+ message_digest_key:
+ description:
+ - Message digest authentication password (key) settings.
+ type: dict
+ suboptions:
+ key_id:
+ description:
+ - Key ID.
+ type: int
+ required: True
+ encryption:
+ description:
+ - 0 Specifies an UNENCRYPTED ospf password (key) will follow.
+ - 3 Specifies an 3DES ENCRYPTED ospf password (key) will follow.
+ - 7 Specifies a Cisco type 7 ENCRYPTED the ospf password (key) will follow.
+ type: int
+ key:
+ description:
+ - Authentication key.
+ - Valid values are Cisco type 7 ENCRYPTED password, 3DES ENCRYPTED password
+ and UNENCRYPTED (cleartext) password based on the value of encryption key.
+ type: str
+ required: True
+ cost:
+ description:
+ - Cost associated with interface.
+ type: int
+ dead_interval:
+ description:
+ - Dead interval value (in seconds).
+ type: int
+ hello_interval:
+ description:
+ - Hello interval value (in seconds).
+ type: int
+ instance:
+ description:
+ - Instance identifier.
+ type: int
+ mtu_ignore:
+ description:
+ - Enable/disable OSPF MTU mismatch detection.
+ type: bool
+ network:
+ description:
+ - Network type.
+ type: str
+ choices: ["broadcast", "point-to-point"]
+ passive_interface:
+ description:
+ - Suppress routing updates on the interface.
+ type: bool
+ priority:
+ description:
+ - Router priority.
+ type: int
+ retransmit_interval:
+ description:
+ - Packet retransmission interval.
+ type: int
+ shutdown:
+ description:
+ - Shutdown OSPF on this interface.
+ type: bool
+ transmit_delay:
+ description:
+ - Packet transmission delay.
+ type: int
+ state:
+ description:
+ - The state the configuration should be left in.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - parsed
+ - rendered
+ default: merged
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+# NXOS# show running-config | section ^interface
+# interface Ethernet1/1
+# no switchport
+# interface Ethernet1/2
+# no switchport
+# interface Ethernet1/3
+# no switchport
+
+- name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ - name: Ethernet1/1
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.11
+ - afi: ipv6
+ processes:
+ - process_id: "200"
+ area:
+ area_id: 2.2.2.2
+ multi_areas:
+ - 21.0.0.0
+ - process_id: "300"
+ multi_areas:
+ - 50.50.50.50
+ multi_areas:
+ - 16.10.10.10
+ - name: Ethernet1/2
+ address_family:
+ - afi: ipv4
+ authentication:
+ enable: True
+ key_chain: test-1
+ message_digest_key:
+ key_id: 10
+ encryption: 3
+ key: abc01d272be25d29
+ cost: 100
+ - afi: ipv6
+ network: broadcast
+ shutdown: True
+ - name: Ethernet1/3
+ address_family:
+ - afi: ipv4
+ authentication_key:
+ encryption: 7
+ key: 12090404011C03162E
+ state: merged
+
+# Task output
+# -------------
+# "before": [
+# {
+# "name": "Ethernet1/1"
+# },
+# {
+# "name": "Ethernet1/2"
+# },
+# {
+# "name": "Ethernet1/3"
+# },
+# ]
+#
+# "commands": [
+# "interface Ethernet1/1",
+# "ip router ospf multi-area 11.11.11.11",
+# "ip router ospf 100 area 1.1.1.1 secondaries none",
+# "ipv6 router ospfv3 multi-area 16.10.10.10",
+# "ipv6 router ospfv3 200 area 2.2.2.2",
+# "ipv6 router ospfv3 200 multi-area 21.0.0.0",
+# "ipv6 router ospfv3 300 multi-area 50.50.50.50",
+# "interface Ethernet1/2",
+# "ip ospf authentication key-chain test-1",
+# "ip ospf authentication",
+# "ip ospf message-digest-key 10 md5 3 abc01d272be25d29",
+# "ip ospf cost 100",
+# "ospfv3 network broadcast",
+# "ospfv3 shutdown",
+# "interface Ethernet1/3",
+# "ip ospf authentication-key 7 12090404011C03162E"
+# ]
+#
+# "after": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "multi_areas": [
+# "11.11.11.11"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "1.1.1.1",
+# "secondaries": false
+# },
+# "process_id": "100"
+# }
+# ]
+# },
+# {
+# "afi": "ipv6",
+# "multi_areas": [
+# "16.10.10.10"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "2.2.2.2"
+# },
+# "multi_areas": [
+# "21.0.0.0"
+# ],
+# "process_id": "200"
+# },
+# {
+# "multi_areas": [
+# "50.50.50.50"
+# ],
+# "process_id": "300"
+# }
+# ]
+# }
+# ],
+# "name": "Ethernet1/1"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "enable": true,
+# "key_chain": "test-1"
+# },
+# "cost": 100,
+# "message_digest_key": {
+# "encryption": 3,
+# "key": "abc01d272be25d29",
+# "key_id": 10
+# }
+# },
+# {
+# "afi": "ipv6",
+# "network": "broadcast",
+# "shutdown": true
+# }
+# ],
+# "name": "Ethernet1/2"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication_key": {
+# "encryption": 7,
+# "key": "12090404011C03162E"
+# }
+# }
+# ],
+# "name": "Ethernet1/3"
+# },
+# ]
+
+# After state:
+# -------------
+# NXOS# show running-config | section ^interface
+# interface Ethernet1/1
+# no switchport
+# ip router ospf 100 area 1.1.1.1 secondaries none
+# ip router ospf multi-area 11.11.11.11
+# ipv6 router ospfv3 200 area 2.2.2.2
+# ipv6 router ospfv3 multi-area 16.10.10.10
+# ipv6 router ospfv3 200 multi-area 21.0.0.0
+# ipv6 router ospfv3 300 multi-area 50.50.50.50
+# interface Ethernet1/2
+# no switchport
+# ip ospf authentication
+# ip ospf authentication key-chain test-1
+# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+# ip ospf cost 100
+# ospfv3 network broadcast
+# ospfv3 shutdown
+# interface Ethernet1/3
+# no switchport
+# ip ospf authentication-key 7 12090404011C03162E
+
+
+# Using replaced
+
+# Before state:
+# ------------
+# NXOS# show running-config | section ^interface
+# interface Ethernet1/1
+# no switchport
+# ip router ospf 100 area 1.1.1.1 secondaries none
+# ip router ospf multi-area 11.11.11.11
+# ipv6 router ospfv3 200 area 2.2.2.2
+# ipv6 router ospfv3 multi-area 16.10.10.10
+# ipv6 router ospfv3 200 multi-area 21.0.0.0
+# ipv6 router ospfv3 300 multi-area 50.50.50.50
+# interface Ethernet1/2
+# no switchport
+# ip ospf authentication
+# ip ospf authentication key-chain test-1
+# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+# ip ospf cost 100
+# ospfv3 network broadcast
+# ospfv3 shutdown
+# interface Ethernet1/3
+# no switchport
+# ip ospf authentication-key 7 12090404011C03162E
+
+- name: Replace OSPF configurations of listed interfaces with provided configurations
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ - name: Ethernet1/1
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.12
+ - name: Ethernet1/3
+ state: replaced
+
+# Task output
+# -------------
+# "before": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "multi_areas": [
+# "11.11.11.11"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "1.1.1.1",
+# "secondaries": false
+# },
+# "process_id": "100"
+# }
+# ]
+# },
+# {
+# "afi": "ipv6",
+# "multi_areas": [
+# "16.10.10.10"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "2.2.2.2"
+# },
+# "multi_areas": [
+# "21.0.0.0"
+# ],
+# "process_id": "200"
+# },
+# {
+# "multi_areas": [
+# "50.50.50.50"
+# ],
+# "process_id": "300"
+# }
+# ]
+# }
+# ],
+# "name": "Ethernet1/1"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "enable": true,
+# "key_chain": "test-1"
+# },
+# "cost": 100,
+# "message_digest_key": {
+# "encryption": 3,
+# "key": "abc01d272be25d29",
+# "key_id": 10
+# }
+# },
+# {
+# "afi": "ipv6",
+# "network": "broadcast",
+# "shutdown": true
+# }
+# ],
+# "name": "Ethernet1/2"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication_key": {
+# "encryption": 7,
+# "key": "12090404011C03162E"
+# }
+# }
+# ],
+# "name": "Ethernet1/3"
+# },
+# ]
+#
+# "commands": [
+# "interface Ethernet1/1",
+# "ip router ospf multi-area 11.11.11.12",
+# "no ip router ospf multi-area 11.11.11.11",
+# "no ipv6 router ospfv3 multi-area 16.10.10.10",
+# "no ipv6 router ospfv3 200 area 2.2.2.2",
+# "no ipv6 router ospfv3 200 multi-area 21.0.0.0",
+# "no ipv6 router ospfv3 300 multi-area 50.50.50.50",
+# "interface Ethernet1/3",
+# "no ip ospf authentication-key 7 12090404011C03162E"
+# ]
+#
+# "after": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "multi_areas": [
+# "11.11.11.12"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "1.1.1.1",
+# "secondaries": false
+# },
+# "process_id": "100"
+# }
+# ]
+# }
+# ],
+# "name": "Ethernet1/1"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "enable": true,
+# "key_chain": "test-1"
+# },
+# "cost": 100,
+# "message_digest_key": {
+# "encryption": 3,
+# "key": "abc01d272be25d29",
+# "key_id": 10
+# }
+# },
+# {
+# "afi": "ipv6",
+# "network": "broadcast",
+# "shutdown": true
+# }
+# ],
+# "name": "Ethernet1/2"
+# },
+# {
+# "name": "Ethernet1/3"
+# },
+#
+# After state:
+# -------------
+# NXOS# show running-config | section ^interface
+# interface Ethernet1/1
+# no switchport
+# ip router ospf 100 area 1.1.1.1 secondaries none
+# ip router ospf multi-area 11.11.11.12
+# interface Ethernet1/2
+# no switchport
+# ip ospf authentication
+# ip ospf authentication key-chain test-1
+# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+# ip ospf cost 100
+# ospfv3 network broadcast
+# ospfv3 shutdown
+# interface Ethernet1/3
+# no switchport
+
+
+# Using overridden
+
+# Before state:
+# ------------
+# NXOS# show running-config | section ^interface
+# interface Ethernet1/1
+# no switchport
+# ip router ospf 100 area 1.1.1.1 secondaries none
+# ip router ospf multi-area 11.11.11.11
+# ipv6 router ospfv3 200 area 2.2.2.2
+# ipv6 router ospfv3 multi-area 16.10.10.10
+# ipv6 router ospfv3 200 multi-area 21.0.0.0
+# ipv6 router ospfv3 300 multi-area 50.50.50.50
+# interface Ethernet1/2
+# no switchport
+# ip ospf authentication
+# ip ospf authentication key-chain test-1
+# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+# ip ospf cost 100
+# ospfv3 network broadcast
+# ospfv3 shutdown
+# interface Ethernet1/3
+# no switchport
+# ip ospf authentication-key 7 12090404011C03162E
+
+- name: Overridde all OSPF interfaces configuration with provided configuration
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ - name: Ethernet1/1
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.12
+ state: overridden
+
+# Task output
+# -------------
+# "before": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "multi_areas": [
+# "11.11.11.11"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "1.1.1.1",
+# "secondaries": false
+# },
+# "process_id": "100"
+# }
+# ]
+# },
+# {
+# "afi": "ipv6",
+# "multi_areas": [
+# "16.10.10.10"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "2.2.2.2"
+# },
+# "multi_areas": [
+# "21.0.0.0"
+# ],
+# "process_id": "200"
+# },
+# {
+# "multi_areas": [
+# "50.50.50.50"
+# ],
+# "process_id": "300"
+# }
+# ]
+# }
+# ],
+# "name": "Ethernet1/1"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "enable": true,
+# "key_chain": "test-1"
+# },
+# "cost": 100,
+# "message_digest_key": {
+# "encryption": 3,
+# "key": "abc01d272be25d29",
+# "key_id": 10
+# }
+# },
+# {
+# "afi": "ipv6",
+# "network": "broadcast",
+# "shutdown": true
+# }
+# ],
+# "name": "Ethernet1/2"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication_key": {
+# "encryption": 7,
+# "key": "12090404011C03162E"
+# }
+# }
+# ],
+# "name": "Ethernet1/3"
+# },
+# ]
+#
+# "commands": [
+# "interface Ethernet1/2",
+# "no ip ospf authentication key-chain test-1",
+# "no ip ospf authentication",
+# "no ip ospf message-digest-key 10 md5 3 abc01d272be25d29",
+# "no ip ospf cost 100",
+# "no ospfv3 network broadcast",
+# "no ospfv3 shutdown",
+# "interface Ethernet1/3",
+# "no ip ospf authentication-key 7 12090404011C03162E",
+# "interface Ethernet1/1",
+# "ip router ospf multi-area 11.11.11.12",
+# "no ip router ospf multi-area 11.11.11.11",
+# "no ipv6 router ospfv3 multi-area 16.10.10.10",
+# "no ipv6 router ospfv3 200 area 2.2.2.2",
+# "no ipv6 router ospfv3 200 multi-area 21.0.0.0",
+# "no ipv6 router ospfv3 300 multi-area 50.50.50.50"
+# ]
+#
+# "after": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "multi_areas": [
+# "11.11.11.12"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "1.1.1.1",
+# "secondaries": false
+# },
+# "process_id": "100"
+# }
+# ]
+# }
+# ],
+# "name": "Ethernet1/1"
+# },
+# {
+# "name": "Ethernet1/2"
+# },
+# {
+# "name": "Ethernet1/3"
+# },
+# ]
+
+# After state:
+# -------------
+# NXOS# show running-config | section ^interface
+# interface Ethernet1/1
+# no switchport
+# ip router ospf 100 area 1.1.1.1 secondaries none
+# ip router ospf multi-area 11.11.11.12
+# interface Ethernet1/2
+# no switchport
+# interface Ethernet1/3
+# no switchport
+
+# Using deleted to delete OSPF config of a single interface
+
+# Before state:
+# ------------
+# NXOS# show running-config | section ^interface
+# interface Ethernet1/1
+# no switchport
+# ip router ospf 100 area 1.1.1.1 secondaries none
+# ip router ospf multi-area 11.11.11.11
+# ipv6 router ospfv3 200 area 2.2.2.2
+# ipv6 router ospfv3 multi-area 16.10.10.10
+# ipv6 router ospfv3 200 multi-area 21.0.0.0
+# ipv6 router ospfv3 300 multi-area 50.50.50.50
+# interface Ethernet1/2
+# no switchport
+# ip ospf authentication
+# ip ospf authentication key-chain test-1
+# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+# ip ospf cost 100
+# ospfv3 network broadcast
+# ospfv3 shutdown
+# interface Ethernet1/3
+# no switchport
+# ip ospf authentication-key 7 12090404011C03162E
+
+- name: Delete OSPF config from a single interface
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ - name: Ethernet1/1
+ state: deleted
+
+# Task output
+# -------------
+# "before": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "multi_areas": [
+# "11.11.11.11"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "1.1.1.1",
+# "secondaries": false
+# },
+# "process_id": "100"
+# }
+# ]
+# },
+# {
+# "afi": "ipv6",
+# "multi_areas": [
+# "16.10.10.10"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "2.2.2.2"
+# },
+# "multi_areas": [
+# "21.0.0.0"
+# ],
+# "process_id": "200"
+# },
+# {
+# "multi_areas": [
+# "50.50.50.50"
+# ],
+# "process_id": "300"
+# }
+# ]
+# }
+# ],
+# "name": "Ethernet1/1"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "enable": true,
+# "key_chain": "test-1"
+# },
+# "cost": 100,
+# "message_digest_key": {
+# "encryption": 3,
+# "key": "abc01d272be25d29",
+# "key_id": 10
+# }
+# },
+# {
+# "afi": "ipv6",
+# "network": "broadcast",
+# "shutdown": true
+# }
+# ],
+# "name": "Ethernet1/2"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication_key": {
+# "encryption": 7,
+# "key": "12090404011C03162E"
+# }
+# }
+# ],
+# "name": "Ethernet1/3"
+# },
+# ]
+#
+# "commands": [
+# "interface Ethernet1/1",
+# "no ip router ospf multi-area 11.11.11.11",
+# "no ip router ospf 100 area 1.1.1.1 secondaries none",
+# "no ipv6 router ospfv3 multi-area 16.10.10.10",
+# "no ipv6 router ospfv3 200 area 2.2.2.2",
+# "no ipv6 router ospfv3 200 multi-area 21.0.0.0",
+# "no ipv6 router ospfv3 300 multi-area 50.50.50.50"
+# ]
+#
+# "before": [
+# {
+# "name": "Ethernet1/1"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "enable": true,
+# "key_chain": "test-1"
+# },
+# "cost": 100,
+# "message_digest_key": {
+# "encryption": 3,
+# "key": "abc01d272be25d29",
+# "key_id": 10
+# }
+# },
+# {
+# "afi": "ipv6",
+# "network": "broadcast",
+# "shutdown": true
+# }
+# ],
+# "name": "Ethernet1/2"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication_key": {
+# "encryption": 7,
+# "key": "12090404011C03162E"
+# }
+# }
+# ],
+# "name": "Ethernet1/3"
+# },
+# ]
+
+# After state:
+# ------------
+# NXOS# show running-config | section ^interface
+# interface Ethernet1/1
+# no switchport
+# interface Ethernet1/2
+# no switchport
+# ip ospf authentication
+# ip ospf authentication key-chain test-1
+# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+# ip ospf cost 100
+# ospfv3 network broadcast
+# ospfv3 shutdown
+# interface Ethernet1/3
+# no switchport
+# ip ospf authentication-key 7 12090404011C03162E
+
+# Using deleted to delete OSPF config from all interfaces
+
+# Before state:
+# ------------
+# NXOS# show running-config | section ^interface
+# interface Ethernet1/1
+# no switchport
+# ip router ospf 100 area 1.1.1.1 secondaries none
+# ip router ospf multi-area 11.11.11.11
+# ipv6 router ospfv3 200 area 2.2.2.2
+# ipv6 router ospfv3 multi-area 16.10.10.10
+# ipv6 router ospfv3 200 multi-area 21.0.0.0
+# ipv6 router ospfv3 300 multi-area 50.50.50.50
+# interface Ethernet1/2
+# no switchport
+# ip ospf authentication
+# ip ospf authentication key-chain test-1
+# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+# ip ospf cost 100
+# ospfv3 network broadcast
+# ospfv3 shutdown
+# interface Ethernet1/3
+# no switchport
+# ip ospf authentication-key 7 12090404011C03162E
+
+- name: Delete OSPF config from all interfaces
+ cisco.nxos.nxos_ospf_interfaces:
+ state: deleted
+
+# Task output
+# -------------
+# "before": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "multi_areas": [
+# "11.11.11.11"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "1.1.1.1",
+# "secondaries": false
+# },
+# "process_id": "100"
+# }
+# ]
+# },
+# {
+# "afi": "ipv6",
+# "multi_areas": [
+# "16.10.10.10"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "2.2.2.2"
+# },
+# "multi_areas": [
+# "21.0.0.0"
+# ],
+# "process_id": "200"
+# },
+# {
+# "multi_areas": [
+# "50.50.50.50"
+# ],
+# "process_id": "300"
+# }
+# ]
+# }
+# ],
+# "name": "Ethernet1/1"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "enable": true,
+# "key_chain": "test-1"
+# },
+# "cost": 100,
+# "message_digest_key": {
+# "encryption": 3,
+# "key": "abc01d272be25d29",
+# "key_id": 10
+# }
+# },
+# {
+# "afi": "ipv6",
+# "network": "broadcast",
+# "shutdown": true
+# }
+# ],
+# "name": "Ethernet1/2"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication_key": {
+# "encryption": 7,
+# "key": "12090404011C03162E"
+# }
+# }
+# ],
+# "name": "Ethernet1/3"
+# },
+# ]
+#
+# "commands": [
+# "interface Ethernet1/1",
+# "no ip router ospf multi-area 11.11.11.11",
+# "no ip router ospf 100 area 1.1.1.1 secondaries none",
+# "no ipv6 router ospfv3 multi-area 16.10.10.10",
+# "no ipv6 router ospfv3 200 area 2.2.2.2",
+# "no ipv6 router ospfv3 200 multi-area 21.0.0.0",
+# "no ipv6 router ospfv3 300 multi-area 50.50.50.50",
+# "interface Ethernet1/2",
+# "no ip ospf authentication key-chain test-1",
+# "no ip ospf authentication",
+# "no ip ospf message-digest-key 10 md5 3 abc01d272be25d29",
+# "no ip ospf cost 100",
+# "no ospfv3 network broadcast",
+# "no ospfv3 shutdown",
+# "interface Ethernet1/3",
+# "no ip ospf authentication-key 7 12090404011C03162E"
+# ]
+#
+# "after": [
+# {
+# "name": "Ethernet1/1"
+# },
+# {
+# "name": "Ethernet1/2"
+# },
+# {
+# "name": "Ethernet1/3"
+# },
+# ]
+
+# After state:
+# ------------
+# NXOS# show running-config | section ^interface
+# interface Ethernet1/1
+# no switchport
+# interface Ethernet1/2
+# no switchport
+# interface Ethernet1/3
+# no switchport
+
+# Using rendered
+
+- name: Render platform specific configuration lines with state rendered (without connecting to the device)
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ - name: Ethernet1/1
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.11
+ - afi: ipv6
+ processes:
+ - process_id: "200"
+ area:
+ area_id: 2.2.2.2
+ multi_areas:
+ - 21.0.0.0
+ - process_id: "300"
+ multi_areas:
+ - 50.50.50.50
+ multi_areas:
+ - 16.10.10.10
+ - name: Ethernet1/2
+ address_family:
+ - afi: ipv4
+ authentication:
+ enable: True
+ key_chain: test-1
+ message_digest_key:
+ key_id: 10
+ encryption: 3
+ key: abc01d272be25d29
+ cost: 100
+ - afi: ipv6
+ network: broadcast
+ shutdown: True
+ - name: Ethernet1/3
+ address_family:
+ - afi: ipv4
+ authentication_key:
+ encryption: 7
+ key: 12090404011C03162E
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+# "rendered": [
+# "interface Ethernet1/1",
+# "ip router ospf multi-area 11.11.11.11",
+# "ip router ospf 100 area 1.1.1.1 secondaries none",
+# "ipv6 router ospfv3 multi-area 16.10.10.10",
+# "ipv6 router ospfv3 200 area 2.2.2.2",
+# "ipv6 router ospfv3 200 multi-area 21.0.0.0",
+# "ipv6 router ospfv3 300 multi-area 50.50.50.50",
+# "interface Ethernet1/2",
+# "ip ospf authentication key-chain test-1",
+# "ip ospf authentication",
+# "ip ospf message-digest-key 10 md5 3 abc01d272be25d29",
+# "ip ospf cost 100",
+# "ospfv3 network broadcast",
+# "ospfv3 shutdown",
+# "interface Ethernet1/3",
+# "ip ospf authentication-key 7 12090404011C03162E"
+# ]
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+# interface Ethernet1/1
+# ip router ospf 100 area 1.1.1.1 secondaries none
+# ip router ospf multi-area 11.11.11.11
+# ipv6 router ospfv3 200 area 2.2.2.2
+# ipv6 router ospfv3 200 multi-area 21.0.0.0
+# ipv6 router ospfv3 300 multi-area 50.50.50.50
+# ipv6 router ospfv3 multi-area 16.10.10.10
+# interface Ethernet1/2
+# ip ospf authentication
+# ip ospf authentication key-chain test-1
+# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+# ip ospf cost 100
+# ospfv3 network broadcast
+# ospfv3 shutdown
+# interface Ethernet1/3
+# ip ospf authentication-key 7 12090404011C03162E
+
+- name: arse externally provided OSPF interfaces config
+ cisco.nxos.nxos_ospf_interfaces:
+ running_config: "{{ lookup('file', 'ospf_interfaces.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+# "parsed": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "multi_areas": [
+# "11.11.11.11"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "1.1.1.1",
+# "secondaries": false
+# },
+# "process_id": "100"
+# }
+# ]
+# },
+# {
+# "afi": "ipv6",
+# "multi_areas": [
+# "16.10.10.10"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "2.2.2.2"
+# },
+# "multi_areas": [
+# "21.0.0.0"
+# ],
+# "process_id": "200"
+# },
+# {
+# "multi_areas": [
+# "50.50.50.50"
+# ],
+# "process_id": "300"
+# }
+# ]
+# }
+# ],
+# "name": "Ethernet1/1"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "enable": true,
+# "key_chain": "test-1"
+# },
+# "cost": 100,
+# "message_digest_key": {
+# "encryption": 3,
+# "key": "abc01d272be25d29",
+# "key_id": 10
+# }
+# },
+# {
+# "afi": "ipv6",
+# "network": "broadcast",
+# "shutdown": true
+# }
+# ],
+# "name": "Ethernet1/2"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication_key": {
+# "encryption": 7,
+# "key": "12090404011C03162E"
+# }
+# }
+# ],
+# "name": "Ethernet1/3"
+# },
+# ]
+
+# Using gathered
+
+# On-box config
+
+# NXOS# show running-config | section ^interface
+# interface Ethernet1/1
+# no switchport
+# ip router ospf 100 area 1.1.1.1 secondaries none
+# ip router ospf multi-area 11.11.11.12
+# interface Ethernet1/2
+# no switchport
+# ip ospf authentication
+# ip ospf authentication key-chain test-1
+# ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+# ip ospf cost 100
+# ospfv3 network broadcast
+# ospfv3 shutdown
+# interface Ethernet1/3
+# no switchport
+
+# Task output (redacted)
+# -----------------------
+# "gathered": [
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "multi_areas": [
+# "11.11.11.12"
+# ],
+# "processes": [
+# {
+# "area": {
+# "area_id": "1.1.1.1",
+# "secondaries": false
+# },
+# "process_id": "100"
+# }
+# ]
+# }
+# ],
+# "name": "Ethernet1/1"
+# },
+# {
+# "address_family": [
+# {
+# "afi": "ipv4",
+# "authentication": {
+# "enable": true,
+# "key_chain": "test-1"
+# },
+# "cost": 100,
+# "message_digest_key": {
+# "encryption": 3,
+# "key": "abc01d272be25d29",
+# "key_id": 10
+# }
+# },
+# {
+# "afi": "ipv6",
+# "network": "broadcast",
+# "shutdown": true
+# }
+# ],
+# "name": "Ethernet1/2"
+# },
+# {
+# "name": "Ethernet1/3"
+# },
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample:
+ - interface Ethernet1/1
+ - ip router ospf multi-area 11.11.11.11
+ - ip router ospf 100 area 1.1.1.1 secondaries none
+ - no ipv6 router ospfv3 multi-area 16.10.10.10
+ - ipv6 router ospfv3 200 area 2.2.2.2
+ - ipv6 router ospfv3 200 multi-area 21.0.0.0
+ - ipv6 router ospfv3 300 multi-area 50.50.50.50
+ - interface Ethernet1/2
+ - no ip ospf authentication key-chain test-1
+ - ip ospf authentication
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.ospf_interfaces.ospf_interfaces import (
+ Ospf_interfacesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.ospf_interfaces.ospf_interfaces import (
+ Ospf_interfaces,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ module = AnsibleModule(
+ argument_spec=Ospf_interfacesArgs.argument_spec,
+ mutually_exclusive=[["config", "running_config"]],
+ required_if=[
+ ["state", "merged", ["config"]],
+ ["state", "replaced", ["config"]],
+ ["state", "overridden", ["config"]],
+ ["state", "rendered", ["config"]],
+ ["state", "parsed", ["running_config"]],
+ ],
+ supports_check_mode=True,
+ )
+
+ result = Ospf_interfaces(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospf_vrf.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospf_vrf.py
new file mode 100644
index 00000000..68729cf4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospf_vrf.py
@@ -0,0 +1,495 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_ospf_vrf
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2022-10-01)Manages a VRF for an OSPF router.
+description:
+- Manages a VRF for an OSPF router.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+deprecated:
+ alternative: nxos_ospfv2 and nxos_ospfv3
+ why: Updated modules released with more functionality.
+ removed_at_date: '2022-10-01'
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- Value I(default) restores params default value, if any. Otherwise it removes the
+ existing param configuration.
+options:
+ vrf:
+ description:
+ - Name of the resource instance. Valid value is a string. The name 'default' is
+ a valid VRF representing the global OSPF.
+ default: default
+ type: str
+ ospf:
+ description:
+ - Name of the OSPF instance.
+ required: true
+ type: str
+ router_id:
+ description:
+ - Router Identifier (ID) of the OSPF router VRF instance.
+ type: str
+ default_metric:
+ description:
+ - Specify the default Metric value. Valid values are an integer or the keyword
+ 'default'.
+ type: str
+ log_adjacency:
+ description:
+ - Controls the level of log messages generated whenever a neighbor changes state.
+ Valid values are 'log', 'detail', and 'default'.
+ choices:
+ - log
+ - detail
+ - default
+ type: str
+ timer_throttle_lsa_start:
+ description:
+ - Specify the start interval for rate-limiting Link-State Advertisement (LSA)
+ generation. Valid values are an integer, in milliseconds, or the keyword 'default'.
+ type: str
+ timer_throttle_lsa_hold:
+ description:
+ - Specify the hold interval for rate-limiting Link-State Advertisement (LSA) generation.
+ Valid values are an integer, in milliseconds, or the keyword 'default'.
+ type: str
+ timer_throttle_lsa_max:
+ description:
+ - Specify the max interval for rate-limiting Link-State Advertisement (LSA) generation.
+ Valid values are an integer, in milliseconds, or the keyword 'default'.
+ type: str
+ timer_throttle_spf_start:
+ description:
+ - Specify initial Shortest Path First (SPF) schedule delay. Valid values are an
+ integer, in milliseconds, or the keyword 'default'.
+ type: str
+ timer_throttle_spf_hold:
+ description:
+ - Specify minimum hold time between Shortest Path First (SPF) calculations. Valid
+ values are an integer, in milliseconds, or the keyword 'default'.
+ type: str
+ timer_throttle_spf_max:
+ description:
+ - Specify the maximum wait time between Shortest Path First (SPF) calculations.
+ Valid values are an integer, in milliseconds, or the keyword 'default'.
+ type: str
+ auto_cost:
+ description:
+ - Specifies the reference bandwidth used to assign OSPF cost. Valid values are
+ an integer, in Mbps, or the keyword 'default'.
+ type: str
+ bfd:
+ description:
+ - Enables BFD on all OSPF interfaces.
+ - "Dependency: ''feature bfd''"
+ type: str
+ choices:
+ - enable
+ - disable
+ passive_interface:
+ description:
+ - Setting to C(yes) will suppress routing update on interface.
+ type: bool
+ state:
+ description:
+ - State of ospf vrf configuration.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+- cisco.nxos.nxos_ospf_vrf:
+ ospf: 1
+ timer_throttle_spf_start: 50
+ timer_throttle_spf_hold: 1000
+ timer_throttle_spf_max: 2000
+ timer_throttle_lsa_start: 60
+ timer_throttle_lsa_hold: 1100
+ timer_throttle_lsa_max: 3000
+ vrf: test
+ bfd: enable
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample:
+ - router ospf 1
+ - vrf test
+ - bfd
+ - timers throttle lsa 60 1100 3000
+"""
+
+import re
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+
+BOOL_PARAMS = ["passive_interface"]
+PARAM_TO_COMMAND_KEYMAP = {
+ "vrf": "vrf",
+ "router_id": "router-id",
+ "default_metric": "default-metric",
+ "log_adjacency": "log-adjacency-changes",
+ "timer_throttle_lsa_start": "timers throttle lsa",
+ "timer_throttle_lsa_max": "timers throttle lsa",
+ "timer_throttle_lsa_hold": "timers throttle lsa",
+ "timer_throttle_spf_max": "timers throttle spf",
+ "timer_throttle_spf_start": "timers throttle spf",
+ "timer_throttle_spf_hold": "timers throttle spf",
+ "auto_cost": "auto-cost reference-bandwidth",
+ "bfd": "bfd",
+ "passive_interface": "passive-interface default",
+}
+PARAM_TO_DEFAULT_KEYMAP = {
+ "timer_throttle_lsa_start": "0",
+ "timer_throttle_lsa_max": "5000",
+ "timer_throttle_lsa_hold": "5000",
+ "timer_throttle_spf_start": "200",
+ "timer_throttle_spf_max": "5000",
+ "timer_throttle_spf_hold": "1000",
+ "auto_cost": "40000",
+ "bfd": "disable",
+ "default_metric": "",
+ "passive_interface": False,
+ "router_id": "",
+ "log_adjacency": "",
+}
+
+
+def get_existing(module, args):
+ existing = {}
+ netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
+ parents = ["router ospf {0}".format(module.params["ospf"])]
+
+ if module.params["vrf"] != "default":
+ parents.append("vrf {0}".format(module.params["vrf"]))
+
+ config = netcfg.get_section(parents)
+ for arg in args:
+ if arg not in ["ospf", "vrf"]:
+ existing[arg] = PARAM_TO_DEFAULT_KEYMAP.get(arg)
+
+ if config:
+ if module.params["vrf"] == "default":
+ splitted_config = config.splitlines()
+ vrf_index = False
+ for index in range(0, len(splitted_config) - 1):
+ if "vrf" in splitted_config[index].strip():
+ vrf_index = index
+ break
+ if vrf_index:
+ config = "\n".join(splitted_config[0:vrf_index])
+
+ splitted_config = config.splitlines()
+ for line in splitted_config:
+ if "passive" in line:
+ existing["passive_interface"] = True
+ elif "router-id" in line:
+ existing["router_id"] = re.search(
+ r"router-id (\S+)", line
+ ).group(1)
+ elif "metric" in line:
+ existing["default_metric"] = re.search(
+ r"default-metric (\S+)", line
+ ).group(1)
+ elif "adjacency" in line:
+ log = re.search(
+ r"log-adjacency-changes(?: (\S+))?", line
+ ).group(1)
+ if log:
+ existing["log_adjacency"] = log
+ else:
+ existing["log_adjacency"] = "log"
+ elif "auto" in line:
+ cost = re.search(
+ r"auto-cost reference-bandwidth (\d+) (\S+)", line
+ ).group(1)
+ if "Gbps" in line:
+ cost = int(cost) * 1000
+ existing["auto_cost"] = str(cost)
+ elif "bfd" in line:
+ existing["bfd"] = "enable"
+ elif "timers throttle lsa" in line:
+ tmp = re.search(r"timers throttle lsa (\S+) (\S+) (\S+)", line)
+ existing["timer_throttle_lsa_start"] = tmp.group(1)
+ existing["timer_throttle_lsa_hold"] = tmp.group(2)
+ existing["timer_throttle_lsa_max"] = tmp.group(3)
+ elif "timers throttle spf" in line:
+ tmp = re.search(r"timers throttle spf (\S+) (\S+) (\S+)", line)
+ existing["timer_throttle_spf_start"] = tmp.group(1)
+ existing["timer_throttle_spf_hold"] = tmp.group(2)
+ existing["timer_throttle_spf_max"] = tmp.group(3)
+ existing["vrf"] = module.params["vrf"]
+ existing["ospf"] = module.params["ospf"]
+
+ return existing
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key in table:
+ new_key = key_map.get(key)
+ if new_key:
+ new_dict[new_key] = table.get(key)
+ return new_dict
+
+
+def get_timer_prd(key, proposed):
+ if proposed.get(key):
+ return proposed.get(key)
+ else:
+ return PARAM_TO_DEFAULT_KEYMAP.get(key)
+
+
+def state_present(module, existing, proposed, candidate):
+ commands = list()
+ proposed_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, proposed)
+ existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
+
+ for key, value in proposed_commands.items():
+ if key == "vrf":
+ continue
+ if value is True:
+ commands.append(key)
+
+ elif value is False:
+ if key == "passive-interface default":
+ if existing_commands.get(key):
+ commands.append("no {0}".format(key))
+ else:
+ commands.append("no {0}".format(key))
+
+ elif value == "default" or value == "":
+ if key == "log-adjacency-changes":
+ commands.append("no {0}".format(key))
+ elif existing_commands.get(key):
+ existing_value = existing_commands.get(key)
+ commands.append("no {0} {1}".format(key, existing_value))
+ else:
+ if key == "timers throttle lsa":
+ command = "{0} {1} {2} {3}".format(
+ key,
+ get_timer_prd("timer_throttle_lsa_start", proposed),
+ get_timer_prd("timer_throttle_lsa_hold", proposed),
+ get_timer_prd("timer_throttle_lsa_max", proposed),
+ )
+ elif key == "timers throttle spf":
+ command = "{0} {1} {2} {3}".format(
+ key,
+ get_timer_prd("timer_throttle_spf_start", proposed),
+ get_timer_prd("timer_throttle_spf_hold", proposed),
+ get_timer_prd("timer_throttle_spf_max", proposed),
+ )
+ elif key == "log-adjacency-changes":
+ if value == "log":
+ command = key
+ elif value == "detail":
+ command = "{0} {1}".format(key, value)
+ elif key == "auto-cost reference-bandwidth":
+ if len(value) < 5:
+ command = "{0} {1} Mbps".format(key, value)
+ else:
+ value = str(int(value) // 1000)
+ command = "{0} {1} Gbps".format(key, value)
+ elif key == "bfd":
+ command = "no bfd" if value == "disable" else "bfd"
+ else:
+ command = "{0} {1}".format(key, value.lower())
+
+ if command not in commands:
+ commands.append(command)
+
+ if commands:
+ parents = ["router ospf {0}".format(module.params["ospf"])]
+ if module.params["vrf"] != "default":
+ parents.append("vrf {0}".format(module.params["vrf"]))
+ candidate.add(commands, parents=parents)
+
+
+def state_absent(module, existing, proposed, candidate):
+ commands = []
+ parents = ["router ospf {0}".format(module.params["ospf"])]
+ if module.params["vrf"] == "default":
+ existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
+ for key, value in existing_commands.items():
+ if value and key != "vrf":
+ command = None
+ if key == "passive-interface default":
+ command = "no {0}".format(key)
+ elif key == "timers throttle lsa":
+ if (
+ existing["timer_throttle_lsa_start"]
+ != PARAM_TO_DEFAULT_KEYMAP.get(
+ "timer_throttle_lsa_start"
+ )
+ or existing["timer_throttle_lsa_hold"]
+ != PARAM_TO_DEFAULT_KEYMAP.get(
+ "timer_throttle_lsa_hold"
+ )
+ or existing["timer_throttle_lsa_max"]
+ != PARAM_TO_DEFAULT_KEYMAP.get(
+ "timer_throttle_lsa_max"
+ )
+ ):
+ command = "no {0} {1} {2} {3}".format(
+ key,
+ existing["timer_throttle_lsa_start"],
+ existing["timer_throttle_lsa_hold"],
+ existing["timer_throttle_lsa_max"],
+ )
+ elif key == "timers throttle spf":
+ if (
+ existing["timer_throttle_spf_start"]
+ != PARAM_TO_DEFAULT_KEYMAP.get(
+ "timer_throttle_spf_start"
+ )
+ or existing["timer_throttle_spf_hold"]
+ != PARAM_TO_DEFAULT_KEYMAP.get(
+ "timer_throttle_spf_hold"
+ )
+ or existing["timer_throttle_spf_max"]
+ != PARAM_TO_DEFAULT_KEYMAP.get(
+ "timer_throttle_spf_max"
+ )
+ ):
+ command = "no {0} {1} {2} {3}".format(
+ key,
+ existing["timer_throttle_spf_start"],
+ existing["timer_throttle_spf_hold"],
+ existing["timer_throttle_spf_max"],
+ )
+ elif key == "log-adjacency-changes":
+ command = "no {0}".format(key)
+ elif key == "auto-cost reference-bandwidth":
+ if value != PARAM_TO_DEFAULT_KEYMAP.get("auto_cost"):
+ command = "no {0}".format(key)
+ else:
+ command = None
+ elif key == "bfd":
+ if value == "enable":
+ command = "no bfd"
+ else:
+ existing_value = existing_commands.get(key)
+ command = "no {0} {1}".format(key, existing_value)
+
+ if command:
+ if command not in commands:
+ commands.append(command)
+ else:
+ if existing.get("vrf") and existing.get("vrf") == module.params["vrf"]:
+ commands = ["no vrf {0}".format(module.params["vrf"])]
+
+ if commands:
+ candidate.add(commands, parents=parents)
+
+
+def main():
+ argument_spec = dict(
+ vrf=dict(required=False, type="str", default="default"),
+ ospf=dict(required=True, type="str"),
+ router_id=dict(required=False, type="str"),
+ default_metric=dict(required=False, type="str"),
+ log_adjacency=dict(
+ required=False, type="str", choices=["log", "detail", "default"]
+ ),
+ timer_throttle_lsa_start=dict(required=False, type="str"),
+ timer_throttle_lsa_hold=dict(required=False, type="str"),
+ timer_throttle_lsa_max=dict(required=False, type="str"),
+ timer_throttle_spf_start=dict(required=False, type="str"),
+ timer_throttle_spf_hold=dict(required=False, type="str"),
+ timer_throttle_spf_max=dict(required=False, type="str"),
+ auto_cost=dict(required=False, type="str"),
+ bfd=dict(required=False, type="str", choices=["enable", "disable"]),
+ passive_interface=dict(required=False, type="bool"),
+ state=dict(
+ choices=["present", "absent"], default="present", required=False
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ result = dict(changed=False, commands=[], warnings=warnings)
+
+ state = module.params["state"]
+ args = PARAM_TO_COMMAND_KEYMAP.keys()
+ existing = get_existing(module, args)
+ proposed_args = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+
+ proposed = {}
+ for key, value in proposed_args.items():
+ if key != "interface":
+ if str(value).lower() == "true":
+ value = True
+ elif str(value).lower() == "false":
+ value = False
+ elif str(value).lower() == "default":
+ value = PARAM_TO_DEFAULT_KEYMAP.get(key)
+ if value is None:
+ value = "default"
+ if existing.get(key) != value:
+ proposed[key] = value
+
+ candidate = CustomNetworkConfig(indent=3)
+ if state == "present":
+ state_present(module, existing, proposed, candidate)
+ if state == "absent" and existing:
+ state_absent(module, existing, proposed, candidate)
+
+ if candidate:
+ candidate = candidate.items_text()
+ result["commands"] = candidate
+ if not module.check_mode:
+ load_config(module, candidate)
+ result["changed"] = True
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospfv2.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospfv2.py
new file mode 100644
index 00000000..a1a547f1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospfv2.py
@@ -0,0 +1,1981 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_ospfv2
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_ospfv2
+short_description: OSPFv2 resource module
+description:
+- This module manages OSPFv2 configuration on devices running Cisco NX-OS.
+version_added: 1.0.0
+notes:
+- Tested against NX-OS 7.0(3)I5(1).
+- This module works with connection C(network_cli) and C(httpapi).
+author: Nilashish Chakraborty (@NilashishC)
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section "^router ospf .*").
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A list of OSPF process configuration.
+ type: dict
+ suboptions:
+ processes:
+ description:
+ - A list of OSPF instances' configurations.
+ type: list
+ elements: dict
+ suboptions:
+ areas:
+ description:
+ - Configure properties of OSPF Areas.
+ type: list
+ elements: dict
+ suboptions:
+ area_id:
+ description:
+ - The Area ID as an integer or IP Address.
+ type: str
+ required: true
+ authentication:
+ description:
+ - Authentication settings for the Area.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set authentication for the area.
+ type: bool
+ message_digest:
+ description:
+ - Use message-digest authentication.
+ type: bool
+ default_cost:
+ description:
+ - Specify the default cost for default summary LSA.
+ type: int
+ filter_list:
+ description:
+ - Filter prefixes between OSPF areas.
+ type: list
+ elements: dict
+ suboptions:
+ route_map:
+ description:
+ - The Route-map name.
+ type: str
+ required: true
+ direction:
+ description:
+ - The direction to apply the route map.
+ type: str
+ choices: [in, out]
+ required: true
+ nssa:
+ description:
+ - NSSA settings for the area.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Configure area as NSSA.
+ type: bool
+ default_information_originate:
+ description:
+ - Originate Type-7 default LSA into NSSA area.
+ type: bool
+ no_redistribution:
+ description:
+ - Do not send redistributed LSAs into NSSA area.
+ type: bool
+ no_summary:
+ description:
+ - Do not send summary LSAs into NSSA area.
+ type: bool
+ translate:
+ description:
+ - Translate LSA.
+ type: dict
+ suboptions:
+ type7:
+ description:
+ - Translate from Type 7 to Type 5.
+ type: dict
+ suboptions:
+ always:
+ description:
+ - Always translate LSAs
+ type: bool
+ never:
+ description:
+ - Never translate LSAs
+ type: bool
+ supress_fa:
+ description:
+ - Suppress forwarding address in translated LSAs.
+ type: bool
+ ranges:
+ description:
+ - Configure an address range for the area.
+ type: list
+ elements: dict
+ suboptions:
+ prefix:
+ description:
+ - IP in Prefix format (x.x.x.x/len)
+ type: str
+ required: true
+ cost:
+ description:
+ - Cost to use for the range.
+ type: int
+ not_advertise:
+ description:
+ - Suppress advertising the specified range.
+ type: bool
+ stub:
+ description:
+ - Settings for configuring the area as a stub.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Configure the area as a stub.
+ type: bool
+ no_summary:
+ description:
+ - Prevent ABR from sending summary LSAs into stub area.
+ type: bool
+ auto_cost:
+ description:
+ - Calculate OSPF cost according to bandwidth.
+ type: dict
+ suboptions:
+ reference_bandwidth:
+ description:
+ - Reference bandwidth used to assign OSPF cost.
+ type: int
+ required: true
+ unit:
+ description:
+ - Specify in which unit the reference bandwidth is specified.
+ type: str
+ required: true
+ choices: [Gbps, Mbps]
+ bfd:
+ description:
+ - Enable BFD on all OSPF interfaces.
+ type: bool
+ default_information:
+ description:
+ - Control distribution of default routes.
+ type: dict
+ suboptions:
+ originate:
+ description:
+ - Distribute a default route.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Enable distribution of default route.
+ type: bool
+ always:
+ description:
+ - Always advertise a default route.
+ type: bool
+ route_map:
+ description:
+ - Policy to control distribution of default routes
+ type: str
+ default_metric:
+ description:
+ - Specify default metric for redistributed routes.
+ type: int
+ distance:
+ description:
+ - Configure the OSPF administrative distance.
+ type: int
+ flush_routes:
+ description:
+ - Flush routes on a non-graceful controlled restart.
+ type: bool
+ graceful_restart:
+ description:
+ - Configure graceful restart.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Enable graceful-restart.
+ type: bool
+ grace_period:
+ description:
+ - Configure maximum interval to restart gracefully.
+ type: int
+ helper_disable:
+ description:
+ - Enable/Disable helper mode.
+ type: bool
+ isolate:
+ description:
+ - Isolate this router from OSPF perspective.
+ type: bool
+ log_adjacency_changes:
+ description:
+ - Log changes in adjacency state.
+ type: dict
+ suboptions:
+ log:
+ description:
+ - Enable/disable logging changes in adjacency state.
+ type: bool
+ detail:
+ description:
+ - Notify all state changes.
+ type: bool
+ max_lsa:
+ description:
+ - Feature to limit the number of non-self-originated LSAs.
+ type: dict
+ suboptions:
+ max_non_self_generated_lsa:
+ description:
+ - Set the maximum number of non self-generated LSAs.
+ type: int
+ required: true
+ threshold:
+ description:
+ - Threshold value (%) at which to generate a warning message.
+ type: int
+ ignore_count:
+ description:
+ - Set count on how many times adjacencies can be suppressed.
+ type: int
+ ignore_time:
+ description:
+ - Set time during which all adjacencies are suppressed.
+ type: int
+ reset_time:
+ description:
+ - Set number of minutes after which ignore-count is reset to zero.
+ type: int
+ warning_only:
+ description:
+ - Log a warning message when limit is exceeded.
+ type: bool
+ max_metric:
+ description:
+ - Maximize the cost metric.
+ type: dict
+ suboptions:
+ router_lsa:
+ description:
+ - Router LSA configuration.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set router-lsa attribute.
+ type: bool
+ external_lsa:
+ description:
+ - External LSA configuration.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set external-lsa attribute.
+ type: bool
+ max_metric_value:
+ description:
+ - Set max metric value for external LSAs.
+ type: int
+ include_stub:
+ description:
+ - Advertise Max metric for Stub links as well.
+ type: bool
+ on_startup:
+ description:
+ - Effective only at startup.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set on-startup attribute.
+ type: bool
+ wait_period:
+ description:
+ - Wait period in seconds after startup.
+ type: int
+ wait_for_bgp_asn:
+ description:
+ - ASN of BGP to wait for.
+ type: int
+ summary_lsa:
+ description:
+ - Summary LSAs configuration.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set summary-lsa attribute.
+ type: bool
+ max_metric_value:
+ description:
+ - Max metric value for summary LSAs.
+ type: int
+ maximum_paths:
+ description:
+ - Maximum paths per destination.
+ type: int
+ mpls:
+ description:
+ - OSPF MPLS configuration settings.
+ type: dict
+ suboptions:
+ traffic_eng:
+ description:
+ - OSPF MPLS Traffic Engineering commands.
+ type: dict
+ suboptions:
+ areas:
+ description:
+ - List of Area IDs.
+ type: list
+ elements: dict
+ suboptions:
+ area_id:
+ description:
+ - Area Id as an integer or ip address.
+ type: str
+ multicast_intact:
+ description:
+ - MPLS TE multicast support.
+ type: bool
+ router_id:
+ description:
+ - Router ID associated with TE.
+ type: str
+ name_lookup:
+ description:
+ - Display OSPF router ids as DNS names.
+ type: bool
+ passive_interface:
+ description:
+ - Suppress routing updates on the interface.
+ type: dict
+ suboptions:
+ default:
+ description:
+ - Interfaces passive by default.
+ type: bool
+ process_id:
+ description:
+ - The OSPF process tag.
+ type: str
+ required: true
+ redistribute:
+ description:
+ - Redistribute information from another routing protocol.
+ type: list
+ elements: dict
+ suboptions:
+ protocol:
+ description:
+ - The name of the protocol.
+ type: str
+ choices: [bgp, direct, eigrp, isis, lisp, ospf, rip, static]
+ required: true
+ id:
+ description:
+ - The identifier for the protocol specified.
+ type: str
+ route_map:
+ description:
+ - The route map policy to constrain redistribution.
+ type: str
+ required: true
+ rfc1583compatibility:
+ description:
+ - Configure 1583 compatibility for external path preferences.
+ type: bool
+ router_id:
+ description:
+ - Set OSPF process router-id.
+ type: str
+ shutdown:
+ description:
+ - Shutdown the OSPF protocol instance.
+ type: bool
+ summary_address:
+ description:
+ - Configure route summarization for redistribution.
+ type: list
+ elements: dict
+ suboptions:
+ prefix:
+ description:
+ - IP prefix in format x.x.x.x/ml.
+ type: str
+ required: true
+ not_advertise:
+ description:
+ - Supress advertising the specified summary.
+ type: bool
+ tag:
+ description:
+ - A 32-bit tag value.
+ type: int
+ table_map:
+ description:
+ - Policy for filtering/modifying OSPF routes before sending them to RIB.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The Route Map name.
+ type: str
+ required: true
+ filter:
+ description:
+ - Block the OSPF routes from being sent to RIB.
+ type: bool
+ timers:
+ description:
+ - Configure timer related constants.
+ type: dict
+ suboptions:
+ lsa_arrival:
+ description:
+ - Mimimum interval between arrival of a LSA.
+ type: int
+ lsa_group_pacing:
+ description:
+ - LSA group refresh/maxage interval.
+ type: int
+ throttle:
+ description:
+ - Configure throttle related constants.
+ type: dict
+ suboptions:
+ lsa:
+ description:
+ - Set rate-limiting for LSA generation.
+ type: dict
+ suboptions:
+ start_interval:
+ description:
+ - The start interval.
+ type: int
+ hold_interval:
+ description:
+ - The hold interval.
+ type: int
+ max_interval:
+ description:
+ - The max interval.
+ type: int
+ spf:
+ description:
+ - Set OSPF SPF timers.
+ type: dict
+ suboptions:
+ initial_spf_delay:
+ description:
+ - Initial SPF schedule delay in milliseconds.
+ type: int
+ min_hold_time:
+ description:
+ - Minimum hold time between SPF calculations.
+ type: int
+ max_wait_time:
+ description:
+ - Maximum wait time between SPF calculations.
+ type: int
+ vrfs:
+ description:
+ - Configure VRF specific OSPF settings.
+ type: list
+ elements: dict
+ suboptions:
+ areas:
+ description:
+ - Configure properties of OSPF Areas.
+ type: list
+ elements: dict
+ suboptions:
+ area_id:
+ description:
+ - The Area ID as an integer or IP Address.
+ type: str
+ required: true
+ authentication:
+ description:
+ - Authentication settings for the Area.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set authentication for the area.
+ type: bool
+ message_digest:
+ description:
+ - Use message-digest authentication.
+ type: bool
+ default_cost:
+ description:
+ - Specify the default cost for default summary LSA.
+ type: int
+ filter_list:
+ description:
+ - Filter prefixes between OSPF areas.
+ type: list
+ elements: dict
+ suboptions:
+ route_map:
+ description:
+ - The Route-map name.
+ type: str
+ required: true
+ direction:
+ description:
+ - The direction to apply the route map.
+ type: str
+ choices: [in, out]
+ required: true
+ nssa:
+ description:
+ - NSSA settings for the area.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Configure area as NSSA.
+ type: bool
+ default_information_originate:
+ description:
+ - Originate Type-7 default LSA into NSSA area.
+ type: bool
+ no_redistribution:
+ description:
+ - Do not send redistributed LSAs into NSSA area.
+ type: bool
+ no_summary:
+ description:
+ - Do not send summary LSAs into NSSA area.
+ type: bool
+ translate:
+ description:
+ - Translate LSA.
+ type: dict
+ suboptions:
+ type7:
+ description:
+ - Translate from Type 7 to Type 5.
+ type: dict
+ suboptions:
+ always:
+ description:
+ - Always translate LSAs
+ type: bool
+ never:
+ description:
+ - Never translate LSAs
+ type: bool
+ supress_fa:
+ description:
+ - Suppress forwarding address in translated LSAs.
+ type: bool
+ ranges:
+ description:
+ - Configure an address range for the area.
+ type: list
+ elements: dict
+ suboptions:
+ prefix:
+ description:
+ - IP in Prefix format (x.x.x.x/len)
+ type: str
+ required: true
+ cost:
+ description:
+ - Cost to use for the range.
+ type: int
+ not_advertise:
+ description:
+ - Suppress advertising the specified range.
+ type: bool
+ stub:
+ description:
+ - Settings for configuring the area as a stub.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Configure the area as a stub.
+ type: bool
+ no_summary:
+ description:
+ - Prevent ABR from sending summary LSAs into stub area.
+ type: bool
+ auto_cost:
+ description:
+ - Calculate OSPF cost according to bandwidth.
+ type: dict
+ suboptions:
+ reference_bandwidth:
+ description:
+ - Reference bandwidth used to assign OSPF cost.
+ type: int
+ required: true
+ unit:
+ description:
+ - Specify in which unit the reference bandwidth is specified.
+ type: str
+ required: True
+ choices: [Gbps, Mbps]
+ bfd:
+ description:
+ - Enable BFD on all OSPF interfaces.
+ type: bool
+ default_information:
+ description:
+ - Control distribution of default routes.
+ type: dict
+ suboptions:
+ originate:
+ description:
+ - Distribute a default route.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Enable distribution of default route.
+ type: bool
+ always:
+ description:
+ - Always advertise a default route.
+ type: bool
+ route_map:
+ description:
+ - Policy to control distribution of default routes
+ type: str
+ default_metric:
+ description:
+ - Specify default metric for redistributed routes.
+ type: int
+ distance:
+ description:
+ - Configure the OSPF administrative distance.
+ type: int
+ down_bit_ignore:
+ description:
+ - Configure a PE router to ignore the DN bit for network summary,
+ external and NSSA external LSA.
+ type: bool
+ capability:
+ description:
+ - OSPF capability settings.
+ type: dict
+ suboptions:
+ vrf_lite:
+ description:
+ - Enable VRF-lite capability settings.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Enable VRF-lite support.
+ type: bool
+ evpn:
+ description:
+ - Ethernet VPN.
+ type: bool
+ graceful_restart:
+ description:
+ - Configure graceful restart.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Enable graceful-restart.
+ type: bool
+ grace_period:
+ description:
+ - Configure maximum interval to restart gracefully.
+ type: int
+ helper_disable:
+ description:
+ - Enable/Disable helper mode.
+ type: bool
+ log_adjacency_changes:
+ description:
+ - Log changes in adjacency state.
+ type: dict
+ suboptions:
+ log:
+ description:
+ - Enable/disable logging changes in adjacency state.
+ type: bool
+ detail:
+ description:
+ - Notify all state changes.
+ type: bool
+ max_lsa:
+ description:
+ - Feature to limit the number of non-self-originated LSAs.
+ type: dict
+ suboptions:
+ max_non_self_generated_lsa:
+ description:
+ - Set the maximum number of non self-generated LSAs.
+ type: int
+ required: true
+ threshold:
+ description:
+ - Threshold value (%) at which to generate a warning message.
+ type: int
+ ignore_count:
+ description:
+ - Set count on how many times adjacencies can be suppressed.
+ type: int
+ ignore_time:
+ description:
+ - Set time during which all adjacencies are suppressed.
+ type: int
+ reset_time:
+ description:
+ - Set number of minutes after which ignore-count is reset to zero.
+ type: int
+ warning_only:
+ description:
+ - Log a warning message when limit is exceeded.
+ type: bool
+ max_metric:
+ description:
+ - Maximize the cost metric.
+ type: dict
+ suboptions:
+ router_lsa:
+ description:
+ - Router LSA configuration.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set router-lsa attribute.
+ type: bool
+ external_lsa:
+ description:
+ - External LSA configuration.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set external-lsa attribute.
+ type: bool
+ max_metric_value:
+ description:
+ - Set max metric value for external LSAs.
+ type: int
+ include_stub:
+ description:
+ - Advertise Max metric for Stub links as well.
+ type: bool
+ on_startup:
+ description:
+ - Effective only at startup.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set on-startup attribute.
+ type: bool
+ wait_period:
+ description:
+ - Wait period in seconds after startup.
+ type: int
+ wait_for_bgp_asn:
+ description:
+ - ASN of BGP to wait for.
+ type: int
+ summary_lsa:
+ description:
+ - Summary LSAs configuration.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set summary-lsa attribute.
+ type: bool
+ max_metric_value:
+ description:
+ - Max metric value for summary LSAs.
+ type: int
+ maximum_paths:
+ description:
+ - Maximum paths per destination.
+ type: int
+ name_lookup:
+ description:
+ - Display OSPF router ids as DNS names.
+ type: bool
+ passive_interface:
+ description:
+ - Suppress routing updates on the interface.
+ type: dict
+ suboptions:
+ default:
+ description:
+ - Interfaces passive by default.
+ type: bool
+ redistribute:
+ description:
+ - Redistribute information from another routing protocol.
+ type: list
+ elements: dict
+ suboptions:
+ protocol:
+ description:
+ - The name of the protocol.
+ type: str
+ choices: [bgp, direct, eigrp, isis, lisp, ospf, rip, static]
+ required: true
+ id:
+ description:
+ - The identifier for the protocol specified.
+ type: str
+ route_map:
+ description:
+ - The route map policy to constrain redistribution.
+ type: str
+ required: true
+ rfc1583compatibility:
+ description:
+ - Configure 1583 compatibility for external path preferences.
+ type: bool
+ router_id:
+ description:
+ - Set OSPF process router-id.
+ type: str
+ shutdown:
+ description:
+ - Shutdown the OSPF protocol instance.
+ type: bool
+ summary_address:
+ description:
+ - Configure route summarization for redistribution.
+ type: list
+ elements: dict
+ suboptions:
+ prefix:
+ description:
+ - IP prefix in format x.x.x.x/ml.
+ type: str
+ required: true
+ not_advertise:
+ description:
+ - Supress advertising the specified summary.
+ type: bool
+ tag:
+ description:
+ - A 32-bit tag value.
+ type: int
+ table_map:
+ description:
+ - Policy for filtering/modifying OSPF routes before sending them to
+ RIB.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The Route Map name.
+ type: str
+ required: true
+ filter:
+ description:
+ - Block the OSPF routes from being sent to RIB.
+ type: bool
+ timers:
+ description:
+ - Configure timer related constants.
+ type: dict
+ suboptions:
+ lsa_arrival:
+ description:
+ - Mimimum interval between arrival of a LSA.
+ type: int
+ lsa_group_pacing:
+ description:
+ - LSA group refresh/maxage interval.
+ type: int
+ throttle:
+ description:
+ - Configure throttle related constants.
+ type: dict
+ suboptions:
+ lsa:
+ description:
+ - Set rate-limiting for LSA generation.
+ type: dict
+ suboptions:
+ start_interval:
+ description:
+ - The start interval.
+ type: int
+ hold_interval:
+ description:
+ - The hold interval.
+ type: int
+ max_interval:
+ description:
+ - The max interval.
+ type: int
+ spf:
+ description:
+ - Set OSPF SPF timers.
+ type: dict
+ suboptions:
+ initial_spf_delay:
+ description:
+ - Initial SPF schedule delay in milliseconds.
+ type: int
+ min_hold_time:
+ description:
+ - Minimum hold time between SPF calculations.
+ type: int
+ max_wait_time:
+ description:
+ - Maximum wait time between SPF calculations.
+ type: int
+ vrf:
+ description:
+ - Name/Identifier of the VRF.
+ type: str
+ required: true
+ state:
+ description:
+ - The state the configuration should be left in.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - parsed
+ - rendered
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+# nxos-9k-rdo# sh running-config | section "^router ospf .*"
+# nxos-9k-rdo#
+
+- name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_ospfv2:
+ config:
+ processes:
+ - process_id: 100
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_1
+ direction: in
+ - route_map: rmap_2
+ direction: out
+ ranges:
+ - prefix: 198.51.100.64/27
+ not_advertise: true
+ - prefix: 198.51.100.96/27
+ cost: 120
+ - area_id: 0.0.0.101
+ authentication:
+ message_digest: true
+ redistribute:
+ - protocol: eigrp
+ id: 120
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ redistribute:
+ - protocol: static
+ route_map: zone1-static-connect
+ summary_address:
+ - prefix: 198.51.100.128/27
+ tag: 121
+ - prefix: 198.51.100.160/27
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: true
+ translate:
+ type7:
+ always: true
+ - vrf: zone2
+ auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ state: merged
+
+# Task output
+# -------------
+# before: {}
+#
+# commands:
+# - router ospf 102
+# - router-id 198.51.100.1
+# - redistribute eigrp 120 route-map rmap_1
+# - redistribute direct route-map ospf102-direct-connect
+# - area 0.0.0.100 filter-list route-map rmap_1 in
+# - area 0.0.0.100 filter-list route-map rmap_2 out
+# - area 0.0.0.100 range 198.51.100.64/27 not-advertise
+# - area 0.0.0.100 range 198.51.100.96/27 cost 120
+# - area 0.0.0.101 authentication message-digest
+# - vrf zone1
+# - router-id 198.51.100.129
+# - summary-address 198.51.100.128/27 tag 121
+# - summary-address 198.51.100.160/27
+# - redistribute static route-map zone1-static-connect
+# - area 0.0.0.102 nssa no-summary default-information-originate
+# - area 0.0.0.103 nssa no-summary
+# - area 0.0.0.103 nssa translate type7 always
+# - vrf zone2
+# - auto-cost reference-bandwidth 45 Gbps
+# - router ospf 100
+# - router-id 203.0.113.20
+#
+# after:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - areas:
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 198.51.100.64/27
+# - cost: 120
+# prefix: 198.51.100.96/27
+# - area_id: 0.0.0.101
+# authentication:
+# message_digest: true
+# process_id: "102"
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# - area_id: 0.0.0.103
+# nssa:
+# no_summary: true
+# translate:
+# type7:
+# always: true
+# redistribute:
+# - protocol: static
+# route_map: zone1-static-connect
+# router_id: 198.51.100.129
+# vrf: zone1
+# - auto_cost:
+# reference_bandwidth: 45
+# unit: Gbps
+# vrf: zone2
+#
+
+# After state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospf .*"
+# router ospf 100
+# router-id 203.0.113.20
+# router ospf 102
+# router-id 198.51.100.1
+# redistribute direct route-map ospf102-direct-connect
+# redistribute eigrp 120 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_2 out
+# area 0.0.0.100 filter-list route-map rmap_1 in
+# area 0.0.0.100 range 198.51.100.64/27 not-advertise
+# area 0.0.0.100 range 198.51.100.96/27 cost 120
+# area 0.0.0.101 authentication message-digest
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.0.102 nssa no-summary default-information-originate
+# area 0.0.0.103 nssa no-summary
+# area 0.0.0.103 nssa translate type7 always
+# redistribute static route-map zone1-static-connect
+# summary-address 198.51.100.128/27 tag 121
+# summary-address 198.51.100.160/27
+# vrf zone2
+# auto-cost reference-bandwidth 45 Gbps
+
+# Using replaced
+
+# Before state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospf .*"
+# router ospf 100
+# router-id 203.0.113.20
+# router ospf 102
+# router-id 198.51.100.1
+# redistribute direct route-map ospf102-direct-connect
+# redistribute eigrp 120 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_2 out
+# area 0.0.0.100 filter-list route-map rmap_1 in
+# area 0.0.0.100 range 198.51.100.64/27 not-advertise
+# area 0.0.0.100 range 198.51.100.96/27 cost 120
+# area 0.0.0.101 authentication message-digest
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.0.102 nssa no-summary default-information-originate
+# area 0.0.0.103 nssa no-summary
+# area 0.0.0.103 nssa translate type7 always
+# redistribute static route-map zone1-static-connect
+# summary-address 198.51.100.128/27 tag 121
+# summary-address 198.51.100.160/27
+# vrf zone2
+# auto-cost reference-bandwidth 45 Gbps
+
+- name: Replace device configurations of listed OSPF processes with provided configurations
+ cisco.nxos.nxos_ospfv2:
+ config:
+ processes:
+ - process_id: 102
+ router_id: 198.51.100.1
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_8
+ direction: in
+ ranges:
+ - prefix: 198.51.100.64/27
+ not_advertise: true
+ - area_id: 0.0.0.101
+ stub:
+ no_summary: true
+ redistribute:
+ - protocol: eigrp
+ id: 130
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ redistribute:
+ - protocol: bgp
+ id: 65563
+ route_map: zone1-bgp-connect
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ state: replaced
+
+# Task output
+# -------------
+# before:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - areas:
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 198.51.100.64/27
+# - cost: 120
+# prefix: 198.51.100.96/27
+# - area_id: 0.0.0.101
+# authentication:
+# message_digest: true
+# process_id: "102"
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# - area_id: 0.0.0.103
+# nssa:
+# no_summary: true
+# translate:
+# type7:
+# always: true
+# redistribute:
+# - protocol: static
+# route_map: zone1-static-connect
+# router_id: 198.51.100.129
+# vrf: zone1
+# - auto_cost:
+# reference_bandwidth: 45
+# unit: Gbps
+# vrf: zone2
+#
+# commands:
+# - router ospf 102
+# - redistribute eigrp 130 route-map rmap_1
+# - no redistribute eigrp 120 route-map rmap_1
+# - area 0.0.0.100 filter-list route-map rmap_8 in
+# - no area 0.0.0.100 filter-list route-map rmap_2 out
+# - no area 0.0.0.100 range 198.51.100.96/27
+# - no area 0.0.0.101 authentication
+# - area 0.0.0.101 stub no-summary
+# - vrf zone1
+# - no summary-address 198.51.100.128/27 tag 121
+# - no summary-address 198.51.100.160/27
+# - redistribute bgp 65563 route-map zone1-bgp-connect
+# - no redistribute static route-map zone1-static-connect
+# - no area 0.0.0.103 nssa
+# - no area 0.0.0.103 nssa translate type7 always
+# - no vrf zone2
+#
+# after:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - areas:
+# - area_id: 0.0.0.101
+# stub:
+# no_summary: true
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: in
+# route_map: rmap_8
+# ranges:
+# - not_advertise: true
+# prefix: 198.51.100.64/27
+# process_id: "102"
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "130"
+# protocol: eigrp
+# route_map: rmap_1
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# redistribute:
+# - id: "65563"
+# protocol: bgp
+# route_map: zone1-bgp-connect
+# router_id: 198.51.100.129
+# vrf: zone1
+
+# After state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospf .*"
+# router ospf 100
+# router-id 203.0.113.20
+# router ospf 102
+# router-id 198.51.100.1
+# area 0.0.0.101 stub no-summary
+# redistribute direct route-map ospf102-direct-connect
+# redistribute eigrp 130 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_8 in
+# area 0.0.0.100 range 198.51.100.64/27 not-advertise
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.0.102 nssa no-summary default-information-originate
+# redistribute bgp 65563 route-map zone1-bgp-connect
+
+# Using overridden
+
+# Before state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospf .*"
+# router ospf 100
+# router-id 203.0.113.20
+# router ospf 102
+# router-id 198.51.100.1
+# redistribute direct route-map ospf102-direct-connect
+# redistribute eigrp 120 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_2 out
+# area 0.0.0.100 filter-list route-map rmap_1 in
+# area 0.0.0.100 range 198.51.100.64/27 not-advertise
+# area 0.0.0.100 range 198.51.100.96/27 cost 120
+# area 0.0.0.101 authentication message-digest
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.0.102 nssa no-summary default-information-originate
+# area 0.0.0.103 nssa no-summary
+# area 0.0.0.103 nssa translate type7 always
+# redistribute static route-map zone1-static-connect
+# summary-address 198.51.100.128/27 tag 121
+# summary-address 198.51.100.160/27
+# vrf zone2
+# auto-cost reference-bandwidth 45 Gbps
+
+- name: Overridde all OSPF configuration with provided configuration
+ cisco.nxos.nxos_ospfv2:
+ config:
+ processes:
+ - process_id: 104
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ shutdown: true
+ state: overridden
+
+# Task output
+# -------------
+# before:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - areas:
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 198.51.100.64/27
+# - cost: 120
+# prefix: 198.51.100.96/27
+# - area_id: 0.0.0.101
+# authentication:
+# message_digest: true
+# process_id: "102"
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# - area_id: 0.0.0.103
+# nssa:
+# no_summary: true
+# translate:
+# type7:
+# always: true
+# redistribute:
+# - protocol: static
+# route_map: zone1-static-connect
+# router_id: 198.51.100.129
+# vrf: zone1
+# - auto_cost:
+# reference_bandwidth: 45
+# unit: Gbps
+# vrf: zone2
+#
+# commands:
+# - no router ospf 100
+# - router ospf 104
+# - router-id 203.0.113.20
+# - router ospf 102
+# - shutdown
+# - no redistribute direct route-map ospf102-direct-connect
+# - no redistribute eigrp 120 route-map rmap_1
+# - no area 0.0.0.100 filter-list route-map rmap_2 out
+# - no area 0.0.0.100 filter-list route-map rmap_1 in
+# - no area 0.0.0.100 range 198.51.100.64/27
+# - no area 0.0.0.100 range 198.51.100.96/27
+# - no area 0.0.0.101 authentication
+# - no vrf zone1
+# - no vrf zone2
+#
+# after:
+# processes:
+# - process_id: "102"
+# router_id: 198.51.100.1
+# shutdown: true
+# - process_id: "104"
+# router_id: 203.0.113.20
+
+# After state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospf .*"
+# router ospf 102
+# router-id 198.51.100.1
+# shutdown
+# router ospf 104
+# router-id 203.0.113.20
+
+# Using deleted to delete a single OSPF process
+
+# Before state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospf .*"
+# router ospf 100
+# router-id 203.0.113.20
+# router ospf 102
+# router-id 198.51.100.1
+# redistribute direct route-map ospf102-direct-connect
+# redistribute eigrp 120 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_2 out
+# area 0.0.0.100 filter-list route-map rmap_1 in
+# area 0.0.0.100 range 198.51.100.64/27 not-advertise
+# area 0.0.0.100 range 198.51.100.96/27 cost 120
+# area 0.0.0.101 authentication message-digest
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.0.102 nssa no-summary default-information-originate
+# area 0.0.0.103 nssa no-summary
+# area 0.0.0.103 nssa translate type7 always
+# redistribute static route-map zone1-static-connect
+# summary-address 198.51.100.128/27 tag 121
+# summary-address 198.51.100.160/27
+# vrf zone2
+# auto-cost reference-bandwidth 45 Gbps
+
+- name: Delete a single OSPF process
+ cisco.nxos.nxos_ospfv2:
+ config:
+ processes:
+ - process_id: 102
+ state: deleted
+
+# Task output
+# -------------
+# before:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - areas:
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 198.51.100.64/27
+# - cost: 120
+# prefix: 198.51.100.96/27
+# - area_id: 0.0.0.101
+# authentication:
+# message_digest: true
+# process_id: "102"
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# - area_id: 0.0.0.103
+# nssa:
+# no_summary: true
+# translate:
+# type7:
+# always: true
+# redistribute:
+# - protocol: static
+# route_map: zone1-static-connect
+# router_id: 198.51.100.129
+# vrf: zone1
+# - auto_cost:
+# reference_bandwidth: 45
+# unit: Gbps
+# vrf: zone2
+#
+# commands:
+# - no router ospf 102
+#
+# after:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+
+# After state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospf .*"
+# router ospf 100
+# router-id 203.0.113.20
+
+# Using deleted all OSPF processes from the device
+
+# Before state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospf .*"
+# router ospf 100
+# router-id 203.0.113.20
+# router ospf 102
+# router-id 198.51.100.1
+# redistribute direct route-map ospf102-direct-connect
+# redistribute eigrp 120 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_2 out
+# area 0.0.0.100 filter-list route-map rmap_1 in
+# area 0.0.0.100 range 198.51.100.64/27 not-advertise
+# area 0.0.0.100 range 198.51.100.96/27 cost 120
+# area 0.0.0.101 authentication message-digest
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.0.102 nssa no-summary default-information-originate
+# area 0.0.0.103 nssa no-summary
+# area 0.0.0.103 nssa translate type7 always
+# redistribute static route-map zone1-static-connect
+# summary-address 198.51.100.128/27 tag 121
+# summary-address 198.51.100.160/27
+# vrf zone2
+# auto-cost reference-bandwidth 45 Gbps
+
+- name: Delete all OSPF processes from the device
+ cisco.nxos.nxos_ospfv2:
+ state: deleted
+
+# Task output
+# -------------
+# before:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - areas:
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 198.51.100.64/27
+# - cost: 120
+# prefix: 198.51.100.96/27
+# - area_id: 0.0.0.101
+# authentication:
+# message_digest: true
+# process_id: "102"
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# - area_id: 0.0.0.103
+# nssa:
+# no_summary: true
+# translate:
+# type7:
+# always: true
+# redistribute:
+# - protocol: static
+# route_map: zone1-static-connect
+# router_id: 198.51.100.129
+# vrf: zone1
+# - auto_cost:
+# reference_bandwidth: 45
+# unit: Gbps
+# vrf: zone2
+#
+# commands:
+# - no router ospf 100
+# - no router ospf 102
+#
+# after: {}
+
+# After state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospf .*"
+# nxos-9k-rdo#
+
+# Using rendered
+
+- name: Render platform specific configuration lines (without connecting to the device)
+ cisco.nxos.nxos_ospfv2:
+ config:
+ processes:
+ - process_id: 100
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_1
+ direction: in
+ - route_map: rmap_2
+ direction: out
+ ranges:
+ - prefix: 198.51.100.64/27
+ not_advertise: true
+ - prefix: 198.51.100.96/27
+ cost: 120
+ - area_id: 0.0.0.101
+ authentication:
+ message_digest: true
+ redistribute:
+ - protocol: eigrp
+ id: 120
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ redistribute:
+ - protocol: static
+ route_map: zone1-static-connect
+ summary_address:
+ - prefix: 198.51.100.128/27
+ tag: 121
+ - prefix: 198.51.100.160/27
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: true
+ translate:
+ type7:
+ always: true
+ - vrf: zone2
+ auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+# rendered:
+# - router ospf 100
+# - router-id 203.0.113.20
+# - router ospf 102
+# - router-id 198.51.100.1
+# - redistribute eigrp 120 route-map rmap_1
+# - redistribute direct route-map ospf102-direct-connect
+# - area 0.0.0.100 filter-list route-map rmap_1 in
+# - area 0.0.0.100 filter-list route-map rmap_2 out
+# - area 0.0.0.100 range 198.51.100.64/27 not-advertise
+# - area 0.0.0.100 range 198.51.100.96/27 cost 120
+# - area 0.0.0.101 authentication message-digest
+# - vrf zone1
+# - router-id 198.51.100.129
+# - summary-address 198.51.100.128/27 tag 121
+# - summary-address 198.51.100.160/27
+# - redistribute static route-map zone1-static-connect
+# - area 0.0.0.102 nssa no-summary default-information-originate
+# - area 0.0.0.103 nssa no-summary
+# - area 0.0.0.103 nssa translate type7 always
+# - vrf zone2
+# - auto-cost reference-bandwidth 45 Gbps
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+# router ospf 100
+# router-id 192.0.100.1
+# area 0.0.0.101 nssa no-summary no-redistribution
+# area 0.0.0.102 stub no-summary
+# redistribute direct route-map ospf-direct-connect
+# redistribute eigrp 120 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_2 out
+# area 0.0.0.100 filter-list route-map rmap_1 in
+# area 0.0.0.100 range 192.0.2.0/24 not-advertise
+# area 0.0.0.100 range 192.0.3.0/24 cost 120
+# area 0.0.0.100 authentication message-digest
+# vrf zone1
+# router-id 192.0.100.2
+# area 0.0.100.1 nssa no-summary no-redistribution
+# redistribute static route-map zone1-direct-connect
+# summary-address 10.0.0.0/24 tag 120
+# summary-address 11.0.0.0/24 not-advertise
+# vrf zone2
+# auto-cost reference-bandwidth 45 Gbps
+# down-bit-ignore
+# capability vrf-lite evpn
+# shutdown
+# router ospf 102
+# router-id 198.54.100.1
+# shutdown
+# vrf zone2
+# summary-address 192.0.8.0/24 tag 120
+# vrf zone4
+# shutdown
+
+- name: Parse externally provided OSPFv2 config
+ cisco.nxos.nxos_ospfv2:
+ running_config: "{{ lookup('file', 'ospfv2.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+# parsed:
+# processes:
+# - process_id: "100"
+# areas:
+# - area_id: 0.0.0.101
+# nssa:
+# no_redistribution: true
+# no_summary: true
+# - area_id: 0.0.0.102
+# stub:
+# no_summary: true
+# - area_id: 0.0.0.100
+# authentication:
+# message_digest: true
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 192.0.2.0/24
+# - cost: 120
+# prefix: 192.0.3.0/24
+# redistribute:
+# - protocol: direct
+# route_map: ospf-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# router_id: 192.0.100.1
+# vrfs:
+# - vrf: zone1
+# areas:
+# - area_id: 0.0.100.1
+# nssa:
+# no_redistribution: true
+# no_summary: true
+# redistribute:
+# - protocol: static
+# route_map: zone1-direct-connect
+# router_id: 192.0.100.2
+# summary_address:
+# - prefix: 10.0.0.0/24
+# tag: 120
+# - not_advertise: true
+# prefix: 11.0.0.0/24
+# - vrf: zone2
+# auto_cost:
+# reference_bandwidth: 45
+# unit: Gbps
+# capability:
+# vrf_lite:
+# evpn: true
+# down_bit_ignore: true
+# shutdown: true
+# - process_id: "102"
+# router_id: 198.54.100.1
+# shutdown: true
+# vrfs:
+# - vrf: zone2
+# summary_address:
+# - prefix: 192.0.8.0/24
+# tag: 120
+# - vrf: zone4
+# shutdown: true
+
+# Using gathered
+
+- name: Gather OSPFv2 facts using gathered
+ cisco.nxos.nxos_ospfv2:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+# gathered:
+# processes:
+# - process_id: "102"
+# areas:
+# - area_id: 0.0.0.101
+# stub:
+# no_summary: true
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: in
+# route_map: rmap_8
+# ranges:
+# - not_advertise: true
+# prefix: 198.51.100.64/27
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "130"
+# protocol: eigrp
+# route_map: rmap_1
+# router_id: 198.51.100.1
+# vrfs:
+# - vrf: zone1
+# areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# redistribute:
+# - id: "65563"
+# protocol: bgp
+# route_map: zone1-bgp-connect
+# router_id: 198.51.100.129
+#
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample:
+ - "router ospf 102"
+ - "router-id 198.54.100.1"
+ - "router ospf 100"
+ - "router-id 192.0.100.1"
+ - "redistribute eigrp 120 route-map rmap_1"
+ - "redistribute direct route-map ospf-direct-connect"
+ - "area 0.0.0.100 filter-list route-map rmap_1 in"
+ - "area 0.0.0.100 filter-list route-map rmap_2 out"
+ - "area 0.0.0.100 range 192.0.2.0/24 not-advertise"
+ - "area 0.0.0.100 range 192.0.3.0/24 cost 120"
+ - "vrf zone1"
+ - "router-id 192.0.100.2"
+ - "summary-address 10.0.0.0/24 tag 121"
+ - "summary-address 11.0.0.0/24"
+ - "redistribute static route-map zone1-direct-connect"
+ - "vrf zone2"
+ - "auto-cost reference-bandwidth 45 Gbps"
+ - "capability vrf-lite evpn"
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.ospfv2.ospfv2 import (
+ Ospfv2Args,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.ospfv2.ospfv2 import (
+ Ospfv2,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ required_if = [
+ ("state", "merged", ("config",)),
+ ("state", "replaced", ("config",)),
+ ("state", "overridden", ("config",)),
+ ("state", "rendered", ("config",)),
+ ("state", "parsed", ("running_config",)),
+ ]
+ module = AnsibleModule(
+ argument_spec=Ospfv2Args.argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+
+ result = Ospfv2(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospfv3.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospfv3.py
new file mode 100644
index 00000000..2783a6cf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ospfv3.py
@@ -0,0 +1,1699 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2020 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_ospfv3
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+DOCUMENTATION = """
+module: nxos_ospfv3
+short_description: OSPFv3 resource module
+description:
+- This module manages OSPFv3 configuration on devices running Cisco NX-OS.
+version_added: 1.2.0
+notes:
+- Tested against NX-OS 7.0(3)I5(1).
+- This module works with connection C(network_cli) and C(httpapi).
+author: Nilashish Chakraborty (@NilashishC)
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the command B(show running-config | section "^router ospfv3").
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A list of OSPFv3 process configuration.
+ type: dict
+ suboptions:
+ processes:
+ description:
+ - A list of OSPFv3 instances' configurations.
+ type: list
+ elements: dict
+ suboptions:
+ address_family:
+ description:
+ - IPv6 unicast address-family OSPFv3 settings.
+ type: dict
+ suboptions:
+ afi:
+ description:
+ - Configure OSPFv3 settings under IPv6 address-family.
+ type: str
+ choices: ['ipv6']
+ safi:
+ description:
+ - Configure OSPFv3 settings under IPv6 unicast address-family.
+ type: str
+ choices: ['unicast']
+ areas:
+ description:
+ - Configure properties of OSPF Areas under address-family.
+ type: list
+ elements: dict
+ suboptions:
+ area_id:
+ description:
+ - The Area ID as an integer or IP Address.
+ type: str
+ required: True
+ default_cost:
+ description:
+ - Specify the default cost.
+ type: int
+ filter_list:
+ description:
+ - Filter prefixes between OSPF areas.
+ type: list
+ elements: dict
+ suboptions:
+ route_map:
+ description:
+ - The Route-map name.
+ type: str
+ required: True
+ direction:
+ description:
+ - The direction to apply the route map.
+ type: str
+ choices: [in, out]
+ required: True
+ ranges:
+ description:
+ - Configure an address range for the area.
+ type: list
+ elements: dict
+ suboptions:
+ prefix:
+ description:
+ - IP in Prefix format (x.x.x.x/len)
+ type: str
+ required: True
+ cost:
+ description:
+ - Cost to use for the range.
+ type: int
+ not_advertise:
+ description:
+ - Suppress advertising the specified range.
+ type: bool
+ default_information:
+ description:
+ - Control distribution of default routes.
+ type: dict
+ suboptions:
+ originate:
+ description:
+ - Distribute a default route.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Enable distribution of default route.
+ type: bool
+ always:
+ description:
+ - Always advertise a default route.
+ type: bool
+ route_map:
+ description:
+ - Policy to control distribution of default routes
+ type: str
+ distance:
+ description:
+ - Configure the OSPF administrative distance.
+ type: int
+ maximum_paths:
+ description:
+ - Maximum paths per destination.
+ type: int
+ redistribute:
+ description:
+ - Redistribute information from another routing protocol.
+ type: list
+ elements: dict
+ suboptions:
+ protocol:
+ description:
+ - The name of the protocol.
+ type: str
+ choices: [bgp, direct, eigrp, isis, lisp, ospfv3, rip, static]
+ required: True
+ id:
+ description:
+ - The identifier for the protocol specified.
+ type: str
+ route_map:
+ description:
+ - The route map policy to constrain redistribution.
+ type: str
+ required: True
+ summary_address:
+ description:
+ - Configure route summarization for redistribution.
+ type: list
+ elements: dict
+ suboptions:
+ prefix:
+ description:
+ - IPv6 prefix format 'xxxx:xxxx/ml', 'xxxx:xxxx::/ml' or 'xxxx::xx/128'
+ type: str
+ required: True
+ not_advertise:
+ description:
+ - Supress advertising the specified summary.
+ type: bool
+ tag:
+ description:
+ - A 32-bit tag value.
+ type: int
+ table_map:
+ description:
+ - Policy for filtering/modifying OSPF routes before sending them to
+ RIB.
+ type: dict
+ suboptions:
+ name:
+ description:
+ - The Route Map name.
+ type: str
+ required: True
+ filter:
+ description:
+ - Block the OSPF routes from being sent to RIB.
+ type: bool
+ timers:
+ description:
+ - Configure timer related constants.
+ type: dict
+ suboptions:
+ throttle:
+ description:
+ - Configure throttle related constants.
+ type: dict
+ suboptions:
+ spf:
+ description:
+ - Set OSPF SPF timers.
+ type: dict
+ suboptions:
+ initial_spf_delay:
+ description:
+ - Initial SPF schedule delay in milliseconds.
+ type: int
+ min_hold_time:
+ description:
+ - Minimum hold time between SPF calculations.
+ type: int
+ max_wait_time:
+ description:
+ - Maximum wait time between SPF calculations.
+ type: int
+ areas:
+ description:
+ - Configure properties of OSPF Areas.
+ type: list
+ elements: dict
+ suboptions:
+ area_id:
+ description:
+ - The Area ID as an integer or IP Address.
+ type: str
+ required: True
+ nssa:
+ description:
+ - NSSA settings for the area.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Configure area as NSSA.
+ type: bool
+ default_information_originate:
+ description:
+ - Originate Type-7 default LSA into NSSA area.
+ type: bool
+ no_redistribution:
+ description:
+ - Do not send redistributed LSAs into NSSA area.
+ type: bool
+ no_summary:
+ description:
+ - Do not send summary LSAs into NSSA area.
+ type: bool
+ route_map:
+ description:
+ - Policy to control distribution of default route.
+ type: str
+ translate:
+ description:
+ - Translate LSA.
+ type: dict
+ suboptions:
+ type7:
+ description:
+ - Translate from Type 7 to Type 5.
+ type: dict
+ suboptions:
+ always:
+ description:
+ - Always translate LSAs
+ type: bool
+ never:
+ description:
+ - Never translate LSAs
+ type: bool
+ supress_fa:
+ description:
+ - Suppress forwarding address in translated LSAs.
+ type: bool
+ stub:
+ description:
+ - Settings for configuring the area as a stub.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Configure the area as a stub.
+ type: bool
+ no_summary:
+ description:
+ - Prevent ABR from sending summary LSAs into stub area.
+ type: bool
+ auto_cost:
+ description:
+ - Calculate OSPF cost according to bandwidth.
+ type: dict
+ suboptions:
+ reference_bandwidth:
+ description:
+ - Reference bandwidth used to assign OSPF cost.
+ type: int
+ required: True
+ unit:
+ description:
+ - Specify in which unit the reference bandwidth is specified.
+ type: str
+ required: True
+ choices: [Gbps, Mbps]
+ flush_routes:
+ description:
+ - Flush routes on a non-graceful controlled restart.
+ type: bool
+ graceful_restart:
+ description:
+ - Configure graceful restart.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Enable graceful-restart.
+ type: bool
+ grace_period:
+ description:
+ - Configure maximum interval to restart gracefully.
+ type: int
+ helper_disable:
+ description:
+ - Enable/Disable helper mode.
+ type: bool
+ planned_only:
+ description:
+ - Enable graceful restart only for a planned restart
+ type: bool
+ isolate:
+ description:
+ - Isolate this router from OSPF perspective.
+ type: bool
+ log_adjacency_changes:
+ description:
+ - Log changes in adjacency state.
+ type: dict
+ suboptions:
+ log:
+ description:
+ - Enable/disable logging changes in adjacency state.
+ type: bool
+ detail:
+ description:
+ - Notify all state changes.
+ type: bool
+ max_lsa:
+ description:
+ - Feature to limit the number of non-self-originated LSAs.
+ type: dict
+ suboptions:
+ max_non_self_generated_lsa:
+ description:
+ - Set the maximum number of non self-generated LSAs.
+ type: int
+ required: True
+ threshold:
+ description:
+ - Threshold value (%) at which to generate a warning message.
+ type: int
+ ignore_count:
+ description:
+ - Set count on how many times adjacencies can be suppressed.
+ type: int
+ ignore_time:
+ description:
+ - Set time during which all adjacencies are suppressed.
+ type: int
+ reset_time:
+ description:
+ - Set number of minutes after which ignore-count is reset to zero.
+ type: int
+ warning_only:
+ description:
+ - Log a warning message when limit is exceeded.
+ type: bool
+ max_metric:
+ description:
+ - Maximize the cost metric.
+ type: dict
+ suboptions:
+ router_lsa:
+ description:
+ - Router LSA configuration.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set router-lsa attribute.
+ type: bool
+ external_lsa:
+ description:
+ - External LSA configuration.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set external-lsa attribute.
+ type: bool
+ max_metric_value:
+ description:
+ - Set max metric value for external LSAs.
+ type: int
+ stub_prefix_lsa:
+ description:
+ - Advertise Max metric for Stub links as well.
+ type: bool
+ on_startup:
+ description:
+ - Effective only at startup.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set on-startup attribute.
+ type: bool
+ wait_period:
+ description:
+ - Wait period in seconds after startup.
+ type: int
+ wait_for_bgp_asn:
+ description:
+ - ASN of BGP to wait for.
+ type: int
+ inter_area_prefix_lsa:
+ description:
+ - Inter-area-prefix LSAs configuration.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set summary-lsa attribute.
+ type: bool
+ max_metric_value:
+ description:
+ - Max metric value for summary LSAs.
+ type: int
+ name_lookup:
+ description:
+ - Display OSPF router ids as DNS names.
+ type: bool
+ passive_interface:
+ description:
+ - Suppress routing updates on the interface.
+ type: dict
+ suboptions:
+ default:
+ description:
+ - Interfaces passive by default.
+ type: bool
+ process_id:
+ description:
+ - The OSPF process tag.
+ type: str
+ required: True
+ router_id:
+ description:
+ - Set OSPF process router-id.
+ type: str
+ shutdown:
+ description:
+ - Shutdown the OSPF protocol instance.
+ type: bool
+ timers:
+ description:
+ - Configure timer related constants.
+ type: dict
+ suboptions:
+ lsa_arrival:
+ description:
+ - Mimimum interval between arrival of a LSA.
+ type: int
+ lsa_group_pacing:
+ description:
+ - LSA group refresh/maxage interval.
+ type: int
+ throttle:
+ description:
+ - Configure throttle related constants.
+ type: dict
+ suboptions:
+ lsa:
+ description:
+ - Set rate-limiting for LSA generation.
+ type: dict
+ suboptions:
+ start_interval:
+ description:
+ - The start interval.
+ type: int
+ hold_interval:
+ description:
+ - The hold interval.
+ type: int
+ max_interval:
+ description:
+ - The max interval.
+ type: int
+ vrfs:
+ description:
+ - Configure VRF specific OSPF settings.
+ type: list
+ elements: dict
+ suboptions:
+ areas:
+ description:
+ - Configure properties of OSPF Areas.
+ type: list
+ elements: dict
+ suboptions:
+ area_id:
+ description:
+ - The Area ID as an integer or IP Address.
+ type: str
+ required: True
+ nssa:
+ description:
+ - NSSA settings for the area.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Configure area as NSSA.
+ type: bool
+ default_information_originate:
+ description:
+ - Originate Type-7 default LSA into NSSA area.
+ type: bool
+ no_redistribution:
+ description:
+ - Do not send redistributed LSAs into NSSA area.
+ type: bool
+ no_summary:
+ description:
+ - Do not send summary LSAs into NSSA area.
+ type: bool
+ route_map:
+ description:
+ - Policy to control distribution of default route.
+ type: str
+ translate:
+ description:
+ - Translate LSA.
+ type: dict
+ suboptions:
+ type7:
+ description:
+ - Translate from Type 7 to Type 5.
+ type: dict
+ suboptions:
+ always:
+ description:
+ - Always translate LSAs
+ type: bool
+ never:
+ description:
+ - Never translate LSAs
+ type: bool
+ supress_fa:
+ description:
+ - Suppress forwarding address in translated LSAs.
+ type: bool
+ stub:
+ description:
+ - Settings for configuring the area as a stub.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Configure the area as a stub.
+ type: bool
+ no_summary:
+ description:
+ - Prevent ABR from sending summary LSAs into stub area.
+ type: bool
+ auto_cost:
+ description:
+ - Calculate OSPF cost according to bandwidth.
+ type: dict
+ suboptions:
+ reference_bandwidth:
+ description:
+ - Reference bandwidth used to assign OSPF cost.
+ type: int
+ required: True
+ unit:
+ description:
+ - Specify in which unit the reference bandwidth is specified.
+ type: str
+ required: True
+ choices: [Gbps, Mbps]
+ graceful_restart:
+ description:
+ - Configure graceful restart.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Enable graceful-restart.
+ type: bool
+ grace_period:
+ description:
+ - Configure maximum interval to restart gracefully.
+ type: int
+ helper_disable:
+ description:
+ - Enable/Disable helper mode.
+ type: bool
+ planned_only:
+ description:
+ - Enable graceful restart only for a planned restart
+ type: bool
+ log_adjacency_changes:
+ description:
+ - Log changes in adjacency state.
+ type: dict
+ suboptions:
+ log:
+ description:
+ - Enable/disable logging changes in adjacency state.
+ type: bool
+ detail:
+ description:
+ - Notify all state changes.
+ type: bool
+ max_lsa:
+ description:
+ - Feature to limit the number of non-self-originated LSAs.
+ type: dict
+ suboptions:
+ max_non_self_generated_lsa:
+ description:
+ - Set the maximum number of non self-generated LSAs.
+ type: int
+ required: True
+ threshold:
+ description:
+ - Threshold value (%) at which to generate a warning message.
+ type: int
+ ignore_count:
+ description:
+ - Set count on how many times adjacencies can be suppressed.
+ type: int
+ ignore_time:
+ description:
+ - Set time during which all adjacencies are suppressed.
+ type: int
+ reset_time:
+ description:
+ - Set number of minutes after which ignore-count is reset to zero.
+ type: int
+ warning_only:
+ description:
+ - Log a warning message when limit is exceeded.
+ type: bool
+ max_metric:
+ description:
+ - Maximize the cost metric.
+ type: dict
+ suboptions:
+ router_lsa:
+ description:
+ - Router LSA configuration.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set router-lsa attribute.
+ type: bool
+ external_lsa:
+ description:
+ - External LSA configuration.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set external-lsa attribute.
+ type: bool
+ max_metric_value:
+ description:
+ - Set max metric value for external LSAs.
+ type: int
+ stub_prefix_lsa:
+ description:
+ - Advertise Max metric for Stub links as well.
+ type: bool
+ on_startup:
+ description:
+ - Effective only at startup.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set on-startup attribute.
+ type: bool
+ wait_period:
+ description:
+ - Wait period in seconds after startup.
+ type: int
+ wait_for_bgp_asn:
+ description:
+ - ASN of BGP to wait for.
+ type: int
+ inter_area_prefix_lsa:
+ description:
+ - Inter-area-prefix LSAs configuration.
+ type: dict
+ suboptions:
+ set:
+ description:
+ - Set summary-lsa attribute.
+ type: bool
+ max_metric_value:
+ description:
+ - Max metric value for summary LSAs.
+ type: int
+ name_lookup:
+ description:
+ - Display OSPF router ids as DNS names.
+ type: bool
+ passive_interface:
+ description:
+ - Suppress routing updates on the interface.
+ type: dict
+ suboptions:
+ default:
+ description:
+ - Interfaces passive by default.
+ type: bool
+ router_id:
+ description:
+ - Set OSPF process router-id.
+ type: str
+ shutdown:
+ description:
+ - Shutdown the OSPF protocol instance.
+ type: bool
+ timers:
+ description:
+ - Configure timer related constants.
+ type: dict
+ suboptions:
+ lsa_arrival:
+ description:
+ - Mimimum interval between arrival of a LSA.
+ type: int
+ lsa_group_pacing:
+ description:
+ - LSA group refresh/maxage interval.
+ type: int
+ throttle:
+ description:
+ - Configure throttle related constants.
+ type: dict
+ suboptions:
+ lsa:
+ description:
+ - Set rate-limiting for LSA generation.
+ type: dict
+ suboptions:
+ start_interval:
+ description:
+ - The start interval.
+ type: int
+ hold_interval:
+ description:
+ - The hold interval.
+ type: int
+ max_interval:
+ description:
+ - The max interval.
+ type: int
+ vrf:
+ description:
+ - Name/Identifier of the VRF.
+ type: str
+ required: True
+ state:
+ description:
+ - The state the configuration should be left in.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - parsed
+ - rendered
+ default: merged
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+# nxos-9k-rdo# sh running-config | section "^router ospfv3"
+# nxos-9k-rdo#
+
+- name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_ospfv3:
+ config:
+ processes:
+ - process_id: 100
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ address_family:
+ afi: ipv6
+ safi: unicast
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_1
+ direction: in
+ - route_map: rmap_2
+ direction: out
+ ranges:
+ - prefix: 2001:db2::/32
+ not_advertise: true
+ - prefix: 2001:db3::/32
+ cost: 120
+ redistribute:
+ - protocol: eigrp
+ id: 120
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: true
+ translate:
+ type7:
+ always: true
+ - vrf: zone2
+ auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ state: merged
+
+# Task output
+# -------------
+# before: {}
+#
+# commands:
+# - router ospf 102
+# - router-id 198.51.100.1
+# - address-family ipv6 unicast
+# - redistribute eigrp 120 route-map rmap_1
+# - redistribute direct route-map ospf102-direct-connect
+# - area 0.0.0.100 filter-list route-map rmap_1 in
+# - area 0.0.0.100 filter-list route-map rmap_2 out
+# - area 0.0.0.100 range 2001:db2::/32 not-advertise
+# - area 0.0.0.100 range 2001:db3::/32 cost 120
+# - vrf zone1
+# - router-id 198.51.100.129
+# - area 0.0.0.102 nssa no-summary default-information-originate
+# - area 0.0.0.103 nssa no-summary
+# - area 0.0.0.103 nssa translate type7 always
+# - vrf zone2
+# - auto-cost reference-bandwidth 45 Gbps
+# - router ospf 100
+# - router-id 203.0.113.20
+#
+# after:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - address_family:
+# afi: ipv4
+# safi: unicast
+# areas:
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 2001:db2::/32
+# - cost: 120
+# prefix: 2001:db3::/32
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# process_id: "102"
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# - area_id: 0.0.0.103
+# nssa:
+# no_summary: true
+# translate:
+# type7:
+# always: true
+# router_id: 198.51.100.129
+# vrf: zone1
+# - auto_cost:
+# reference_bandwidth: 45
+# unit: Gbps
+# vrf: zone2
+#
+
+# After state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospfv3"
+# router ospfv3 100
+# router-id 203.0.113.20
+# router ospfv3 102
+# router-id 198.51.100.1
+# address-family ipv6 unicast
+# redistribute direct route-map ospf102-direct-connect
+# redistribute eigrp 120 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_2 out
+# area 0.0.0.100 filter-list route-map rmap_1 in
+# area 0.0.0.100 range 2001:db2::/32 not-advertise
+# area 0.0.0.100 range 2001:db3::/32 cost 120
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.0.102 nssa no-summary default-information-originate
+# area 0.0.0.103 nssa no-summary
+# area 0.0.0.103 nssa translate type7 always
+# vrf zone2
+# auto-cost reference-bandwidth 45 Gbps
+
+# Using replaced
+
+# Before state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospfv3"
+# router ospfv3 100
+# router-id 203.0.113.20
+# router ospfv3 102
+# router-id 198.51.100.1
+# address-family upv6 unicast
+# redistribute direct route-map ospf102-direct-connect
+# redistribute eigrp 120 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_2 out
+# area 0.0.0.100 filter-list route-map rmap_1 in
+# area 0.0.0.100 range 2001:db2::/32 not-advertise
+# area 0.0.0.100 range 2001:db3::/32 cost 120
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.0.102 nssa no-summary default-information-originate
+# area 0.0.0.103 nssa no-summary
+# area 0.0.0.103 nssa translate type7 always
+# vrf zone2
+# auto-cost reference-bandwidth 45 Gbps
+
+- name: Replace device configurations of listed OSPFv3 processes with provided configurations
+ cisco.nxos.nxos_ospfv3:
+ config:
+ processes:
+ - process_id: 102
+ router_id: 198.51.100.1
+ address_family:
+ afi: ipv6
+ safi: unicast
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_8
+ direction: in
+ ranges:
+ - not_advertise: true
+ prefix: 2001:db2::/32
+ redistribute:
+ - protocol: eigrp
+ id: 130
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: True
+ no_summary: True
+ state: replaced
+
+# Task output
+# -------------
+# before:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - address_family:
+# afi: ipv4
+# safi: unicast
+# areas:
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 2001:db2::/32
+# - cost: 120
+# prefix: 2001:db3::/32
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# process_id: "102"
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# - area_id: 0.0.0.103
+# nssa:
+# no_summary: true
+# translate:
+# type7:
+# always: true
+# router_id: 198.51.100.129
+# vrf: zone1
+# - auto_cost:
+# reference_bandwidth: 45
+# unit: Gbps
+# vrf: zone2
+#
+# commands:
+# - router ospf 102
+# - address-family ipv6 unicast
+# - redistribute eigrp 130 route-map rmap_1
+# - no redistribute eigrp 120 route-map rmap_1
+# - area 0.0.0.100 filter-list route-map rmap_8 in
+# - no area 0.0.0.100 filter-list route-map rmap_2 out
+# - no area 0.0.0.100 range 2001:db3::/32
+# - vrf zone1
+# - no area 0.0.0.103 nssa
+# - no area 0.0.0.103 nssa translate type7 always
+# - no vrf zone2
+#
+# after:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - address_family:
+# afi: ipv6
+# safi: unicast
+# areas:
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: in
+# route_map: rmap_8
+# ranges:
+# - not_advertise: true
+# prefix: 2001:db2::/32
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "130"
+# protocol: eigrp
+# route_map: rmap_1
+# process_id: "102"
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# router_id: 198.51.100.129
+# vrf: zone1
+
+# After state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospfv3"
+# router ospfv3 100
+# router-id 203.0.113.20
+# router ospfv3 102
+# router-id 198.51.100.1
+# address-family ipv6 unicast
+# redistribute direct route-map ospf102-direct-connect
+# redistribute eigrp 130 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_8 in
+# area 0.0.0.100 range 198.51.100.64/27 not-advertise
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.0.102 nssa no-summary default-information-originate
+
+# Using overridden
+
+# Before state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospfv3"
+# router ospfv3 100
+# router-id 203.0.113.20
+# router ospfv3 102
+# router-id 198.51.100.1
+# address-family ipv6 unicast
+# redistribute direct route-map ospf102-direct-connect
+# redistribute eigrp 120 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_2 out
+# area 0.0.0.100 filter-list route-map rmap_1 in
+# area 0.0.0.100 range 2001:db2::/32 not-advertise
+# area 0.0.0.100 range 2001:db3::/32 cost 120
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.0.102 nssa no-summary default-information-originate
+# area 0.0.0.103 nssa no-summary
+# area 0.0.0.103 nssa translate type7 always
+# vrf zone2
+# auto-cost reference-bandwidth 45 Gbps
+
+- name: Overridde all OSPFv3 configuration with provided configuration
+ cisco.nxos.nxos_ospfv3:
+ config:
+ processes:
+ - process_id: 104
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ shutdown: true
+ state: overridden
+
+# Task output
+# -------------
+# before:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - address_family:
+# afi: ipv4
+# safi: unicast
+# areas:
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 2001:db2::/32
+# - cost: 120
+# prefix: 2001:db3::/32
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# process_id: "102"
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# - area_id: 0.0.0.103
+# nssa:
+# no_summary: true
+# translate:
+# type7:
+# always: true
+# router_id: 198.51.100.129
+# vrf: zone1
+# - auto_cost:
+# reference_bandwidth: 45
+# unit: Gbps
+# vrf: zone2
+#
+# commands:
+# - no router ospfv3 100
+# - router ospfv3 104
+# - router-id 203.0.113.20
+# - router ospfv3 102
+# - shutdown
+# - address-family ipv6 unicast
+# - no redistribute direct route-map ospf102-direct-connect
+# - no redistribute eigrp 120 route-map rmap_1
+# - no area 0.0.0.100 filter-list route-map rmap_2 out
+# - no area 0.0.0.100 filter-list route-map rmap_1 in
+# - no area 0.0.0.100 range 2001:db2::/32
+# - no area 0.0.0.100 range 2001:db3::/32
+# - no vrf zone1
+# - no vrf zone2
+#
+# after:
+# processes:
+# - process_id: "102"
+# router_id: 198.51.100.1
+# shutdown: true
+# address_family:
+# afi: ipv6
+# safi: unicast
+# - process_id: "104"
+# router_id: 203.0.113.20
+
+# After state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospfv3"
+# router ospfv3 102
+# router-id 198.51.100.1
+# address-family ipv6 unicast
+# shutdown
+# router ospfv3 104
+# router-id 203.0.113.20
+
+# Using deleted to delete a single OSPF process
+
+# Before state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospf .*"
+# router ospfv3 100
+# router-id 203.0.113.20
+# router ospfv3 102
+# router-id 198.51.100.1
+# address-family ipv6 unicast
+# redistribute direct route-map ospf102-direct-connect
+# redistribute eigrp 120 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_2 out
+# area 0.0.0.100 filter-list route-map rmap_1 in
+# area 0.0.0.100 range 2001:db2::/32 not-advertise
+# area 0.0.0.100 range 2001:db3::/32 cost 120
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.0.102 nssa no-summary default-information-originate
+# area 0.0.0.103 nssa no-summary
+# area 0.0.0.103 nssa translate type7 always
+# vrf zone2
+# auto-cost reference-bandwidth 45 Gbps
+
+- name: Delete a single OSPFv3 process
+ cisco.nxos.nxos_ospfv3:
+ config:
+ processes:
+ - process_id: 102
+ state: deleted
+
+# Task output
+# -------------
+# before:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - address_family:
+# afi: ipv4
+# safi: unicast
+# areas:
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 2001:db2::/32
+# - cost: 120
+# prefix: 2001:db3::/32
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# process_id: "102"
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# - area_id: 0.0.0.103
+# nssa:
+# no_summary: true
+# translate:
+# type7:
+# always: true
+# router_id: 198.51.100.129
+# vrf: zone1
+# - auto_cost:
+# reference_bandwidth: 45
+# unit: Gbps
+# vrf: zone2
+#
+# commands:
+# - no router ospfv3 102
+#
+# after:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+
+# After state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospfv3"
+# router ospfv3 100
+# router-id 203.0.113.20
+
+# Using deleted all OSPFv3 processes from the device
+
+# Before state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospfv3"
+# router ospfv3 100
+# router-id 203.0.113.20
+# router ospfv3 102
+# router-id 198.51.100.1
+# address-family ipv6 unicast
+# redistribute direct route-map ospf102-direct-connect
+# redistribute eigrp 120 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_2 out
+# area 0.0.0.100 filter-list route-map rmap_1 in
+# area 0.0.0.100 range 2001:db2::/32 not-advertise
+# area 0.0.0.100 range 2001:db3::/32 cost 120
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.0.102 nssa no-summary default-information-originate
+# area 0.0.0.103 nssa no-summary
+# area 0.0.0.103 nssa translate type7 always
+# vrf zone2
+# auto-cost reference-bandwidth 45 Gbps
+
+- name: Delete all OSPFv3 processes from the device
+ cisco.nxos.nxos_ospfv3:
+ state: deleted
+
+# Task output
+# -------------
+# before:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - address_family:
+# afi: ipv4
+# safi: unicast
+# areas:
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 2001:db2::/32
+# - cost: 120
+# prefix: 2001:db3::/32
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# process_id: "102"
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# - area_id: 0.0.0.103
+# nssa:
+# no_summary: true
+# translate:
+# type7:
+# always: true
+# router_id: 198.51.100.129
+# vrf: zone1
+# - auto_cost:
+# reference_bandwidth: 45
+# unit: Gbps
+# vrf: zone2
+#
+# commands:
+# - no router ospfv3 100
+# - no router ospfv3 102
+#
+# after: {}
+
+# After state:
+# ------------
+# nxos-9k-rdo# sh running-config | section "^router ospfv3"
+# nxos-9k-rdo#
+
+# Using rendered
+
+- name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_ospfv3:
+ config:
+ processes:
+ - process_id: 100
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ address_family:
+ afi: ipv6
+ safi: unicast
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_1
+ direction: in
+ - route_map: rmap_2
+ direction: out
+ ranges:
+ - prefix: 2001:db2::/32
+ not_advertise: true
+ - prefix: 2001:db3::/32
+ cost: 120
+ redistribute:
+ - protocol: eigrp
+ id: 120
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: true
+ translate:
+ type7:
+ always: true
+ - vrf: zone2
+ auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+# rendered:
+# - router ospfv3 100
+# - router-id 203.0.113.20
+# - router ospfv3 102
+# - router-id 198.51.100.1
+# - address-family ipv6 unicast
+# - redistribute eigrp 120 route-map rmap_1
+# - redistribute direct route-map ospf102-direct-connect
+# - area 0.0.0.100 filter-list route-map rmap_1 in
+# - area 0.0.0.100 filter-list route-map rmap_2 out
+# - area 0.0.0.100 range 2001:db2::/32 not-advertise
+# - area 0.0.0.100 range 2001:db3::/32 cost 120
+# - vrf zone1
+# - router-id 198.51.100.129
+# - area 0.0.0.102 nssa no-summary default-information-originate
+# - area 0.0.0.103 nssa no-summary
+# - area 0.0.0.103 nssa translate type7 always
+# - vrf zone2
+# - auto-cost reference-bandwidth 45 Gbps
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+# router ospfv3 100
+# router-id 192.0.100.1
+# address-family ipv6 unicast
+# redistribute direct route-map ospf-direct-connect
+# redistribute eigrp 120 route-map rmap_1
+# area 0.0.0.100 filter-list route-map rmap_2 out
+# area 0.0.0.100 filter-list route-map rmap_1 in
+# area 0.0.0.100 range 2001:db2::/32 not-advertise
+# area 0.0.0.100 range 2001:db3::/32 cost 120
+# vrf zone1
+# router-id 198.51.100.129
+# area 0.0.100.1 nssa no-summary no-redistribution
+# router ospfv3 102
+# router-id 198.54.100.1
+# shutdown
+
+- name: Parse externally provided OSPFv3 config
+ cisco.nxos.nxos_ospfv3:
+ running_config: "{{ lookup('file', 'ospfv2.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+# parsed:
+# processes:
+# - process_id: "100"
+# address_family:
+# afi: ipv6
+# safi: unicast
+# areas:
+# - area_id: 0.0.0.101
+# nssa:
+# no_redistribution: true
+# no_summary: true
+# - area_id: 0.0.0.102
+# stub:
+# no_summary: true
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 192.0.2.0/24
+# - cost: 120
+# prefix: 192.0.3.0/24
+# redistribute:
+# - protocol: direct
+# route_map: ospf-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# router_id: 192.0.100.1
+# vrfs:
+# - vrf: zone1
+# areas:
+# - area_id: 0.0.100.1
+# nssa:
+# no_redistribution: true
+# no_summary: true
+# router_id: 192.0.100.2
+# - process_id: "102"
+# router_id: 198.54.100.1
+# shutdown: True
+
+# Using gathered
+
+- name: Gather OSPFv3 facts using gathered
+ cisco.nxos.nxos_ospfv3:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+# gathered:
+# processes:
+# - process_id: "100"
+# router_id: 203.0.113.20
+# - address_family:
+# afi: ipv4
+# safi: unicast
+# areas:
+# - area_id: 0.0.0.100
+# filter_list:
+# - direction: out
+# route_map: rmap_2
+# - direction: in
+# route_map: rmap_1
+# ranges:
+# - not_advertise: true
+# prefix: 2001:db2::/32
+# - cost: 120
+# prefix: 2001:db3::/32
+# redistribute:
+# - protocol: direct
+# route_map: ospf102-direct-connect
+# - id: "120"
+# protocol: eigrp
+# route_map: rmap_1
+# process_id: "102"
+# router_id: 198.51.100.1
+# vrfs:
+# - areas:
+# - area_id: 0.0.0.102
+# nssa:
+# default_information_originate: true
+# no_summary: true
+# - area_id: 0.0.0.103
+# nssa:
+# no_summary: true
+# translate:
+# type7:
+# always: true
+# router_id: 198.51.100.129
+# vrf: zone1
+# - auto_cost:
+# reference_bandwidth: 45
+# unit: Gbps
+# vrf: zone2
+#
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample:
+ - "router ospfv3 102"
+ - "router-id 198.54.100.1"
+ - "router ospfv3 100"
+ - "router-id 192.0.100.1"
+ - "address-family ipv6 unicast"
+ - "redistribute eigrp 120 route-map rmap_1"
+ - "redistribute direct route-map ospf-direct-connect"
+ - "area 0.0.0.100 filter-list route-map rmap_1 in"
+ - "area 0.0.0.100 filter-list route-map rmap_2 out"
+ - "area 0.0.0.100 range 2001:db2::/32 not-advertise"
+ - "area 0.0.0.100 range 2001:db3::/32 cost 120"
+ - "vrf zone1"
+ - "router-id 192.0.100.2"
+ - "vrf zone2"
+ - "auto-cost reference-bandwidth 45 Gbps"
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.ospfv3.ospfv3 import (
+ Ospfv3Args,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.ospfv3.ospfv3 import (
+ Ospfv3,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ module = AnsibleModule(
+ argument_spec=Ospfv3Args.argument_spec,
+ mutually_exclusive=[["config", "running_config"]],
+ required_if=[
+ ["state", "merged", ["config"]],
+ ["state", "replaced", ["config"]],
+ ["state", "overridden", ["config"]],
+ ["state", "rendered", ["config"]],
+ ["state", "parsed", ["running_config"]],
+ ],
+ supports_check_mode=True,
+ )
+
+ result = Ospfv3(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_overlay_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_overlay_global.py
new file mode 100644
index 00000000..1ea560c3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_overlay_global.py
@@ -0,0 +1,204 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_overlay_global
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Configures anycast gateway MAC of the switch.
+description:
+- Configures anycast gateway MAC of the switch.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- Default restores params default value
+- Supported MAC address format are "E.E.E", "EE-EE-EE-EE-EE-EE", "EE:EE:EE:EE:EE:EE"
+ and "EEEE.EEEE.EEEE"
+options:
+ anycast_gateway_mac:
+ description:
+ - Anycast gateway mac of the switch.
+ required: true
+ type: str
+"""
+
+EXAMPLES = """
+- cisco.nxos.nxos_overlay_global:
+ anycast_gateway_mac: b.b.b
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["fabric forwarding anycast-gateway-mac 000B.000B.000B"]
+"""
+
+import re
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+PARAM_TO_COMMAND_KEYMAP = {
+ "anycast_gateway_mac": "fabric forwarding anycast-gateway-mac"
+}
+
+
+def get_existing(module, args):
+ existing = {}
+ config = str(get_config(module))
+
+ for arg in args:
+ command = PARAM_TO_COMMAND_KEYMAP[arg]
+ has_command = re.findall(
+ r"(?:{0}\s)(?P<value>.*)$".format(command), config, re.M
+ )
+ value = ""
+ if has_command:
+ value = has_command[0]
+ existing[arg] = value
+
+ return existing
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key, value in table.items():
+ new_key = key_map.get(key)
+ if value:
+ new_dict[new_key] = value
+ return new_dict
+
+
+def get_commands(module, existing, proposed, candidate):
+ commands = list()
+ proposed_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, proposed)
+ existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
+
+ for key, proposed in proposed_commands.items():
+ existing_value = existing_commands.get(key)
+ if proposed == "default" and existing_value:
+ commands.append("no {0} {1}".format(key, existing_value))
+ elif "anycast-gateway-mac" in key and proposed != "default":
+ proposed = normalize_mac(proposed, module)
+ existing_value = normalize_mac(existing_value, module)
+ if proposed != existing_value:
+ command = "{0} {1}".format(key, proposed)
+ commands.append(command)
+ if commands:
+ candidate.add(commands, parents=[])
+
+
+def normalize_mac(proposed_mac, module):
+ if proposed_mac is None:
+ return ""
+ try:
+ if "-" in proposed_mac:
+ splitted_mac = proposed_mac.split("-")
+ if len(splitted_mac) != 6:
+ raise ValueError
+
+ for octect in splitted_mac:
+ if len(octect) != 2:
+ raise ValueError
+
+ elif "." in proposed_mac:
+ splitted_mac = []
+ splitted_dot_mac = proposed_mac.split(".")
+ if len(splitted_dot_mac) != 3:
+ raise ValueError
+
+ for octect in splitted_dot_mac:
+ if len(octect) > 4:
+ raise ValueError
+ else:
+ octect_len = len(octect)
+ padding = 4 - octect_len
+ splitted_mac.append(octect.zfill(padding + 1))
+
+ elif ":" in proposed_mac:
+ splitted_mac = proposed_mac.split(":")
+ if len(splitted_mac) != 6:
+ raise ValueError
+
+ for octect in splitted_mac:
+ if len(octect) != 2:
+ raise ValueError
+ else:
+ raise ValueError
+ except ValueError:
+ module.fail_json(
+ msg="Invalid MAC address format", proposed_mac=proposed_mac
+ )
+
+ joined_mac = "".join(splitted_mac)
+ # fmt: off
+ mac = [joined_mac[i: i + 4] for i in range(0, len(joined_mac), 4)]
+ # fmt: on
+ return ".".join(mac).upper()
+
+
+def main():
+ argument_spec = dict(anycast_gateway_mac=dict(required=True, type="str"))
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ result = {"changed": False, "commands": [], "warnings": warnings}
+
+ args = PARAM_TO_COMMAND_KEYMAP.keys()
+
+ existing = get_existing(module, args)
+ proposed = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+
+ candidate = CustomNetworkConfig(indent=3)
+ get_commands(module, existing, proposed, candidate)
+
+ if candidate:
+ candidate = candidate.items_text()
+ result["commands"] = candidate
+
+ if not module.check_mode:
+ load_config(module, candidate)
+ result["changed"] = True
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_pim.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_pim.py
new file mode 100644
index 00000000..1f8aefc6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_pim.py
@@ -0,0 +1,220 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_pim
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages configuration of a PIM instance.
+description:
+- Manages configuration of a Protocol Independent Multicast (PIM) instance.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+options:
+ bfd:
+ description:
+ - Enables BFD on all PIM interfaces.
+ - "Dependency: ''feature bfd''"
+ type: str
+ choices:
+ - enable
+ - disable
+ ssm_range:
+ description:
+ - Configure group ranges for Source Specific Multicast (SSM). Valid values are
+ multicast addresses or the keyword C(none) or keyword C(default). C(none) removes
+ all SSM group ranges. C(default) will set ssm_range to the default multicast
+ address. If you set multicast address, please ensure that it is not the same
+ as the C(default), otherwise use the C(default) option.
+ type: list
+ elements: str
+"""
+EXAMPLES = """
+- name: Configure ssm_range, enable bfd
+ cisco.nxos.nxos_pim:
+ bfd: enable
+ ssm_range: 224.0.0.0/8
+
+- name: Set to default
+ cisco.nxos.nxos_pim:
+ ssm_range: default
+
+- name: Remove all ssm group ranges
+ cisco.nxos.nxos_pim:
+ ssm_range: none
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample:
+ - ip pim bfd
+ - ip pim ssm range 224.0.0.0/8
+"""
+
+
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+
+PARAM_TO_COMMAND_KEYMAP = {
+ "bfd": "ip pim bfd",
+ "ssm_range": "ip pim ssm range",
+}
+
+
+def get_existing(module, args):
+ existing = {}
+ config = str(get_config(module))
+
+ for arg in args:
+ if "ssm_range" in arg:
+ # <value> may be 'n.n.n.n/s', 'none', or 'default'
+ m = re.search(
+ r"ssm range (?P<value>(?:[\s\d.\/]+|none|default))?$",
+ config,
+ re.M,
+ )
+ if m:
+ # Remove rsvd SSM range
+ value = m.group("value").replace("232.0.0.0/8", "")
+ existing[arg] = value.split()
+
+ elif "bfd" in arg and "ip pim bfd" in config:
+ existing[arg] = "enable"
+
+ return existing
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key, value in table.items():
+ new_key = key_map.get(key)
+ if value is not None:
+ new_dict[new_key] = value
+ return new_dict
+
+
+def get_commands(module, existing, proposed, candidate):
+ commands = list()
+ proposed_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, proposed)
+
+ for key, value in proposed_commands.items():
+ command = ""
+ if key == "ip pim ssm range":
+ if value == "default":
+ # no cmd needs a value but the actual value does not matter
+ command = "no ip pim ssm range none"
+ elif value == "none":
+ command = "ip pim ssm range none"
+ elif value:
+ command = "ip pim ssm range {0}".format(value)
+ elif key == "ip pim bfd":
+ no_cmd = "no " if value == "disable" else ""
+ command = no_cmd + key
+
+ if command:
+ commands.append(command)
+
+ if commands:
+ candidate.add(commands, parents=[])
+
+
+def main():
+ argument_spec = dict(
+ bfd=dict(required=False, type="str", choices=["enable", "disable"]),
+ ssm_range=dict(
+ required=False, type="list", default=[], elements="str"
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+ warnings = list()
+ result = {"changed": False, "commands": [], "warnings": warnings}
+
+ params = module.params
+ args = [k for k in PARAM_TO_COMMAND_KEYMAP.keys() if params[k] is not None]
+
+ # SSM syntax check
+ if "ssm_range" in args:
+ for item in params["ssm_range"]:
+ if re.search("none|default", item):
+ break
+ if len(item.split(".")) != 4:
+ module.fail_json(
+ msg="Valid ssm_range values are multicast addresses "
+ "or the keyword 'none' or the keyword 'default'."
+ )
+
+ existing = get_existing(module, args)
+ proposed_args = dict((k, v) for k, v in params.items() if k in args)
+
+ proposed = {}
+ for key, value in proposed_args.items():
+ if key == "ssm_range":
+ if value and value[0] == "default":
+ if existing.get(key):
+ proposed[key] = "default"
+ else:
+ v = sorted(set([str(i) for i in value]))
+ ex = sorted(set([str(i) for i in existing.get(key, [])]))
+ if v != ex:
+ proposed[key] = " ".join(str(s) for s in v)
+
+ elif key == "bfd":
+ if value != existing.get("bfd", "disable"):
+ proposed[key] = value
+
+ elif value != existing.get(key):
+ proposed[key] = value
+
+ candidate = CustomNetworkConfig(indent=3)
+ get_commands(module, existing, proposed, candidate)
+
+ if candidate:
+ candidate = candidate.items_text()
+ result["commands"] = candidate
+ result["changed"] = True
+ load_config(module, candidate)
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_pim_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_pim_interface.py
new file mode 100644
index 00000000..5c0a9601
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_pim_interface.py
@@ -0,0 +1,621 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+DOCUMENTATION = """
+module: nxos_pim_interface
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages PIM interface configuration.
+description:
+- Manages PIM interface configuration settings.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- When C(state=default), supported params will be reset to a default state. These
+ include C(dr_prio), C(hello_auth_key), C(hello_interval), C(jp_policy_out), C(jp_policy_in),
+ C(jp_type_in), C(jp_type_out), C(border), C(neighbor_policy), C(neighbor_type).
+- The C(hello_auth_key) param is not idempotent.
+- C(hello_auth_key) only supports clear text passwords.
+- When C(state=absent), pim interface configuration will be set to defaults and pim-sm
+ will be disabled on the interface.
+- PIM must be enabled on the device to use this module.
+- This module is for Layer 3 interfaces.
+options:
+ interface:
+ description:
+ - Full name of the interface such as Ethernet1/33.
+ type: str
+ required: true
+ sparse:
+ description:
+ - Enable/disable sparse-mode on the interface.
+ type: bool
+ default: false
+ bfd:
+ description:
+ - Enables BFD for PIM at the interface level. This overrides the bfd variable
+ set at the pim global level.
+ - Valid values are 'enable', 'disable' or 'default'.
+ - "Dependency: ''feature bfd''"
+ type: str
+ choices:
+ - enable
+ - disable
+ - default
+ dr_prio:
+ description:
+ - Configures priority for PIM DR election on interface.
+ type: str
+ hello_auth_key:
+ description:
+ - Authentication for hellos on this interface.
+ type: str
+ hello_interval:
+ description:
+ - Hello interval in milliseconds for this interface.
+ type: int
+ jp_policy_out:
+ description:
+ - Policy for join-prune messages (outbound).
+ type: str
+ jp_policy_in:
+ description:
+ - Policy for join-prune messages (inbound).
+ type: str
+ jp_type_out:
+ description:
+ - Type of policy mapped to C(jp_policy_out).
+ type: str
+ choices:
+ - prefix
+ - routemap
+ jp_type_in:
+ description:
+ - Type of policy mapped to C(jp_policy_in).
+ type: str
+ choices:
+ - prefix
+ - routemap
+ border:
+ description:
+ - Configures interface to be a boundary of a PIM domain.
+ type: bool
+ default: false
+ neighbor_policy:
+ description:
+ - Configures a neighbor policy for filtering adjacencies.
+ type: str
+ neighbor_type:
+ description:
+ - Type of policy mapped to neighbor_policy.
+ type: str
+ choices:
+ - prefix
+ - routemap
+ state:
+ description:
+ - Manages desired state of the resource.
+ type: str
+ choices:
+ - present
+ - absent
+ - default
+ default: present
+"""
+EXAMPLES = """
+- name: Ensure PIM is not running on the interface
+ cisco.nxos.nxos_pim_interface:
+ interface: eth1/33
+ state: absent
+
+- name: Ensure the interface has pim-sm enabled with the appropriate priority and
+ hello interval
+ cisco.nxos.nxos_pim_interface:
+ interface: eth1/33
+ dr_prio: 10
+ hello_interval: 40
+ state: present
+
+- name: Ensure join-prune policies exist
+ cisco.nxos.nxos_pim_interface:
+ interface: eth1/33
+ jp_policy_in: JPIN
+ jp_policy_out: JPOUT
+ jp_type_in: routemap
+ jp_type_out: routemap
+
+- name: disable bfd on the interface
+ cisco.nxos.nxos_pim_interface:
+ interface: eth1/33
+ bfd: disable
+
+- name: Ensure defaults are in place
+ cisco.nxos.nxos_pim_interface:
+ interface: eth1/33
+ state: default
+"""
+
+RETURN = r"""
+commands:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["interface eth1/33",
+ "ip pim neighbor-policy test",
+ "ip pim bfd-instance disable",
+ "ip pim neighbor-policy test"
+ ]
+"""
+
+import re
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_interface_type,
+)
+
+
+PARAM_TO_COMMAND_KEYMAP = {
+ "interface": "",
+ "bfd": "ip pim bfd-instance",
+ "sparse": "ip pim sparse-mode",
+ "dr_prio": "ip pim dr-priority {0}",
+ "hello_interval": "ip pim hello-interval {0}",
+ "hello_auth_key": "ip pim hello-authentication ah-md5 {0}",
+ "border": "ip pim border",
+ "jp_policy_out": "ip pim jp-policy prefix-list {0} out",
+ "jp_policy_in": "ip pim jp-policy prefix-list {0} in",
+ "jp_type_in": "",
+ "jp_type_out": "",
+ "neighbor_policy": "ip pim neighbor-policy prefix-list {0}",
+ "neighbor_type": "",
+}
+
+PARAM_TO_DEFAULT_KEYMAP = {
+ "bfd": "default",
+ "dr_prio": "1",
+ "hello_interval": "30000",
+ "sparse": False,
+ "border": False,
+ "hello_auth_key": False,
+}
+
+BFD_KEYMAP = {
+ None: None,
+ "default": "no ip pim bfd-instance",
+ "disable": "ip pim bfd-instance disable",
+ "enable": "ip pim bfd-instance",
+}
+
+
+def execute_show_command(command, module, text=False):
+ if text:
+ cmds = [{"command": command, "output": "text"}]
+ else:
+ cmds = [{"command": command, "output": "json"}]
+
+ return run_commands(module, cmds)
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def local_existing(gexisting):
+ jp_bidir = False
+ isauth = False
+ if gexisting:
+ jp_bidir = gexisting.get("jp_bidir")
+ isauth = gexisting.get("isauth")
+ if jp_bidir and isauth:
+ gexisting.pop("jp_bidir")
+ gexisting.pop("isauth")
+
+ return gexisting, jp_bidir, isauth
+
+
+def get_interface_mode(interface, intf_type, module):
+ mode = "unknown"
+ command = "show interface {0}".format(interface)
+ body = execute_show_command(command, module)
+
+ try:
+ interface_table = body[0]["TABLE_interface"]["ROW_interface"]
+ except (KeyError, AttributeError, IndexError):
+ return mode
+
+ if intf_type in ["ethernet", "portchannel"]:
+ mode = str(interface_table.get("eth_mode", "layer3"))
+ if mode in ["access", "trunk"]:
+ mode = "layer2"
+ elif mode == "routed":
+ mode = "layer3"
+ elif intf_type in ["loopback", "svi"]:
+ mode = "layer3"
+ return mode
+
+
+def get_pim_interface(module, interface):
+ pim_interface = {}
+ body = get_config(module, flags=["interface {0}".format(interface)])
+
+ pim_interface["bfd"] = "default"
+ pim_interface["neighbor_type"] = None
+ pim_interface["neighbor_policy"] = None
+ pim_interface["jp_policy_in"] = None
+ pim_interface["jp_policy_out"] = None
+ pim_interface["jp_type_in"] = None
+ pim_interface["jp_type_out"] = None
+ pim_interface["jp_bidir"] = False
+ pim_interface["isauth"] = False
+
+ if body:
+ all_lines = body.splitlines()
+
+ for each in all_lines:
+ if "jp-policy" in each:
+ policy_name = re.search(
+ r"ip pim jp-policy(?: prefix-list)? (\S+)(?: \S+)?", each
+ ).group(1)
+ if "prefix-list" in each:
+ ptype = "prefix"
+ else:
+ ptype = "routemap"
+ if "out" in each:
+ pim_interface["jp_policy_out"] = policy_name
+ pim_interface["jp_type_out"] = ptype
+ elif "in" in each:
+ pim_interface["jp_policy_in"] = policy_name
+ pim_interface["jp_type_in"] = ptype
+ else:
+ pim_interface["jp_policy_in"] = policy_name
+ pim_interface["jp_policy_out"] = policy_name
+ pim_interface["jp_bidir"] = True
+ elif "neighbor-policy" in each:
+ pim_interface["neighbor_policy"] = re.search(
+ r"ip pim neighbor-policy(?: prefix-list)? (\S+)", each
+ ).group(1)
+ if "prefix-list" in each:
+ pim_interface["neighbor_type"] = "prefix"
+ else:
+ pim_interface["neighbor_type"] = "routemap"
+ elif "ah-md5" in each:
+ pim_interface["isauth"] = True
+ elif "sparse-mode" in each:
+ pim_interface["sparse"] = True
+ elif "bfd-instance" in each:
+ m = re.search(
+ r"ip pim bfd-instance(?P<disable> disable)?", each
+ )
+ if m:
+ pim_interface["bfd"] = (
+ "disable" if m.group("disable") else "enable"
+ )
+ elif "border" in each:
+ pim_interface["border"] = True
+ elif "hello-interval" in each:
+ pim_interface["hello_interval"] = re.search(
+ r"ip pim hello-interval (\d+)", body
+ ).group(1)
+ elif "dr-priority" in each:
+ pim_interface["dr_prio"] = re.search(
+ r"ip pim dr-priority (\d+)", body
+ ).group(1)
+
+ return pim_interface
+
+
+def fix_delta(delta, existing):
+ for key in list(delta):
+ if key in ["dr_prio", "hello_interval", "sparse", "border"]:
+ if (
+ delta.get(key) == PARAM_TO_DEFAULT_KEYMAP.get(key)
+ and existing.get(key) is None
+ ):
+ delta.pop(key)
+ return delta
+
+
+def config_pim_interface(delta, existing, jp_bidir, isauth):
+ command = None
+ commands = []
+
+ delta = fix_delta(delta, existing)
+
+ if jp_bidir:
+ if delta.get("jp_policy_in") or delta.get("jp_policy_out"):
+ if existing.get("jp_type_in") == "prefix":
+ command = "no ip pim jp-policy prefix-list {0}".format(
+ existing.get("jp_policy_in")
+ )
+ else:
+ command = "no ip pim jp-policy {0}".format(
+ existing.get("jp_policy_in")
+ )
+ if command:
+ commands.append(command)
+
+ for k, v in delta.items():
+ if k in [
+ "bfd",
+ "dr_prio",
+ "hello_interval",
+ "hello_auth_key",
+ "border",
+ "sparse",
+ ]:
+ if k == "bfd":
+ command = BFD_KEYMAP[v]
+ elif v:
+ command = PARAM_TO_COMMAND_KEYMAP.get(k).format(v)
+ elif k == "hello_auth_key":
+ if isauth:
+ command = "no ip pim hello-authentication ah-md5"
+ else:
+ command = "no " + PARAM_TO_COMMAND_KEYMAP.get(k).format(v)
+
+ if command:
+ commands.append(command)
+ elif k in [
+ "neighbor_policy",
+ "jp_policy_in",
+ "jp_policy_out",
+ "neighbor_type",
+ ]:
+ if k in ["neighbor_policy", "neighbor_type"]:
+ temp = delta.get("neighbor_policy") or existing.get(
+ "neighbor_policy"
+ )
+ if delta.get("neighbor_type") == "prefix":
+ command = PARAM_TO_COMMAND_KEYMAP.get(k).format(temp)
+ elif delta.get("neighbor_type") == "routemap":
+ command = "ip pim neighbor-policy {0}".format(temp)
+ elif existing.get("neighbor_type") == "prefix":
+ command = PARAM_TO_COMMAND_KEYMAP.get(k).format(temp)
+ elif existing.get("neighbor_type") == "routemap":
+ command = "ip pim neighbor-policy {0}".format(temp)
+ elif k in ["jp_policy_in", "jp_type_in"]:
+ temp = delta.get("jp_policy_in") or existing.get(
+ "jp_policy_in"
+ )
+ if delta.get("jp_type_in") == "prefix":
+ command = PARAM_TO_COMMAND_KEYMAP.get(k).format(temp)
+ elif delta.get("jp_type_in") == "routemap":
+ command = "ip pim jp-policy {0} in".format(temp)
+ elif existing.get("jp_type_in") == "prefix":
+ command = PARAM_TO_COMMAND_KEYMAP.get(k).format(temp)
+ elif existing.get("jp_type_in") == "routemap":
+ command = "ip pim jp-policy {0} in".format(temp)
+ elif k in ["jp_policy_out", "jp_type_out"]:
+ temp = delta.get("jp_policy_out") or existing.get(
+ "jp_policy_out"
+ )
+ if delta.get("jp_type_out") == "prefix":
+ command = PARAM_TO_COMMAND_KEYMAP.get(k).format(temp)
+ elif delta.get("jp_type_out") == "routemap":
+ command = "ip pim jp-policy {0} out".format(temp)
+ elif existing.get("jp_type_out") == "prefix":
+ command = PARAM_TO_COMMAND_KEYMAP.get(k).format(temp)
+ elif existing.get("jp_type_out") == "routemap":
+ command = "ip pim jp-policy {0} out".format(temp)
+ if command:
+ commands.append(command)
+ command = None
+
+ if "no ip pim sparse-mode" in commands:
+ # sparse is long-running on some platforms, process it last
+ commands.remove("no ip pim sparse-mode")
+ commands.append("no ip pim sparse-mode")
+ return commands
+
+
+def get_pim_interface_defaults():
+
+ args = dict(
+ dr_prio=PARAM_TO_DEFAULT_KEYMAP.get("dr_prio"),
+ bfd=PARAM_TO_DEFAULT_KEYMAP.get("bfd"),
+ border=PARAM_TO_DEFAULT_KEYMAP.get("border"),
+ sparse=PARAM_TO_DEFAULT_KEYMAP.get("sparse"),
+ hello_interval=PARAM_TO_DEFAULT_KEYMAP.get("hello_interval"),
+ hello_auth_key=PARAM_TO_DEFAULT_KEYMAP.get("hello_auth_key"),
+ )
+
+ default = dict(
+ (param, value) for (param, value) in args.items() if value is not None
+ )
+
+ return default
+
+
+def default_pim_interface_policies(existing, jp_bidir):
+ commands = []
+
+ if jp_bidir:
+ if existing.get("jp_policy_in") or existing.get("jp_policy_out"):
+ if existing.get("jp_type_in") == "prefix":
+ command = "no ip pim jp-policy prefix-list {0}".format(
+ existing.get("jp_policy_in")
+ )
+ if command:
+ commands.append(command)
+
+ elif not jp_bidir:
+ command = None
+ for k in existing:
+ if k == "jp_policy_in":
+ if existing.get("jp_policy_in"):
+ if existing.get("jp_type_in") == "prefix":
+ command = "no ip pim jp-policy prefix-list {0} in".format(
+ existing.get("jp_policy_in")
+ )
+ else:
+ command = "no ip pim jp-policy {0} in".format(
+ existing.get("jp_policy_in")
+ )
+ elif k == "jp_policy_out":
+ if existing.get("jp_policy_out"):
+ if existing.get("jp_type_out") == "prefix":
+ command = "no ip pim jp-policy prefix-list {0} out".format(
+ existing.get("jp_policy_out")
+ )
+ else:
+ command = "no ip pim jp-policy {0} out".format(
+ existing.get("jp_policy_out")
+ )
+ if command:
+ commands.append(command)
+ command = None
+
+ if existing.get("neighbor_policy"):
+ command = "no ip pim neighbor-policy"
+ commands.append(command)
+
+ return commands
+
+
+def config_pim_interface_defaults(existing, jp_bidir, isauth):
+ command = []
+
+ # returns a dict
+ defaults = get_pim_interface_defaults()
+ delta = dict(set(defaults.items()).difference(existing.items()))
+ if delta:
+ # returns a list
+ command = config_pim_interface(delta, existing, jp_bidir, isauth)
+ comm = default_pim_interface_policies(existing, jp_bidir)
+ if comm:
+ for each in comm:
+ command.append(each)
+
+ return command
+
+
+def normalize_proposed_values(proposed):
+ keys = proposed.keys()
+ if "bfd" in keys:
+ # bfd is a tri-state string: enable, disable, default
+ proposed["bfd"] = proposed["bfd"].lower()
+ if "hello_interval" in keys:
+ proposed["hello_interval"] = str(proposed["hello_interval"] * 1000)
+
+
+def main():
+ argument_spec = dict(
+ interface=dict(type="str", required=True),
+ sparse=dict(type="bool", default=False),
+ dr_prio=dict(type="str"),
+ hello_auth_key=dict(type="str", no_log=True),
+ hello_interval=dict(type="int"),
+ jp_policy_out=dict(type="str"),
+ jp_policy_in=dict(type="str"),
+ jp_type_out=dict(type="str", choices=["prefix", "routemap"]),
+ jp_type_in=dict(type="str", choices=["prefix", "routemap"]),
+ bfd=dict(type="str", choices=["enable", "disable", "default"]),
+ border=dict(type="bool", default=False),
+ neighbor_policy=dict(type="str"),
+ neighbor_type=dict(type="str", choices=["prefix", "routemap"]),
+ state=dict(
+ type="str",
+ default="present",
+ choices=["absent", "default", "present"],
+ ),
+ )
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ state = module.params["state"]
+ interface = module.params["interface"]
+ jp_type_in = module.params["jp_type_in"]
+ jp_type_out = module.params["jp_type_out"]
+ jp_policy_in = module.params["jp_policy_in"]
+ jp_policy_out = module.params["jp_policy_out"]
+ neighbor_policy = module.params["neighbor_policy"]
+ neighbor_type = module.params["neighbor_type"]
+
+ intf_type = get_interface_type(interface)
+ if get_interface_mode(interface, intf_type, module) == "layer2":
+ module.fail_json(msg="this module only works on Layer 3 interfaces.")
+
+ if jp_policy_in:
+ if not jp_type_in:
+ module.fail_json(
+ msg="jp_type_in required when using jp_policy_in."
+ )
+ if jp_policy_out:
+ if not jp_type_out:
+ module.fail_json(
+ msg="jp_type_out required when using jp_policy_out."
+ )
+ if neighbor_policy:
+ if not neighbor_type:
+ module.fail_json(
+ msg="neighbor_type required when using neighbor_policy."
+ )
+
+ get_existing = get_pim_interface(module, interface)
+ existing, jp_bidir, isauth = local_existing(get_existing)
+
+ args = PARAM_TO_COMMAND_KEYMAP.keys()
+ proposed = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+ normalize_proposed_values(proposed)
+
+ delta = dict(set(proposed.items()).difference(existing.items()))
+
+ commands = []
+ if state == "present":
+ if delta:
+ command = config_pim_interface(delta, existing, jp_bidir, isauth)
+ if command:
+ commands.append(command)
+ elif state == "default" or state == "absent":
+ defaults = config_pim_interface_defaults(existing, jp_bidir, isauth)
+ if defaults:
+ commands.append(defaults)
+
+ if commands:
+ commands.insert(0, ["interface {0}".format(interface)])
+
+ cmds = flatten_list(commands)
+ if cmds:
+ results["changed"] = True
+ if not module.check_mode:
+ load_config(module, cmds)
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ results["commands"] = cmds
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_pim_rp_address.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_pim_rp_address.py
new file mode 100644
index 00000000..70c955c8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_pim_rp_address.py
@@ -0,0 +1,256 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_pim_rp_address
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages configuration of an PIM static RP address instance.
+description:
+- Manages configuration of an Protocol Independent Multicast (PIM) static rendezvous
+ point (RP) address instance.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- C(state=absent) is currently not supported on all platforms.
+options:
+ rp_address:
+ description:
+ - Configures a Protocol Independent Multicast (PIM) static rendezvous point (RP)
+ address. Valid values are unicast addresses.
+ required: true
+ type: str
+ group_list:
+ description:
+ - Group range for static RP. Valid values are multicast addresses.
+ type: str
+ prefix_list:
+ description:
+ - Prefix list policy for static RP. Valid values are prefix-list policy names.
+ type: str
+ route_map:
+ description:
+ - Route map policy for static RP. Valid values are route-map policy names.
+ type: str
+ bidir:
+ description:
+ - Group range is treated in PIM bidirectional mode.
+ type: bool
+ state:
+ description:
+ - Specify desired state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+EXAMPLES = """
+- cisco.nxos.nxos_pim_rp_address:
+ rp_address: 10.1.1.20
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["router bgp 65535", "vrf test", "router-id 192.0.2.1"]
+"""
+
+
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+
+def get_existing(module, args, gl):
+ existing = {}
+ config = str(get_config(module))
+ address = module.params["rp_address"]
+
+ pim_address_re = r"ip pim rp-address (?P<value>.*)$"
+ for line in re.findall(pim_address_re, config, re.M):
+
+ values = line.split()
+ if values[0] != address:
+ continue
+ if gl and "group-list" not in line:
+ continue
+ elif not gl and "group-list" in line:
+ if "224.0.0.0/4" not in line: # ignore default group-list
+ continue
+
+ existing["bidir"] = existing.get("bidir") or "bidir" in line
+ if len(values) > 2:
+ value = values[2]
+ if values[1] == "route-map":
+ existing["route_map"] = value
+ elif values[1] == "prefix-list":
+ existing["prefix_list"] = value
+ elif values[1] == "group-list":
+ if value != "224.0.0.0/4": # ignore default group-list
+ existing["group_list"] = value
+
+ return existing
+
+
+def state_present(module, existing, proposed, candidate):
+ address = module.params["rp_address"]
+ command = "ip pim rp-address {0}".format(address)
+ if module.params["group_list"] and not proposed.get("group_list"):
+ command += " group-list " + module.params["group_list"]
+ if module.params["prefix_list"]:
+ if not proposed.get("prefix_list"):
+ command += " prefix-list " + module.params["prefix_list"]
+ if module.params["route_map"]:
+ if not proposed.get("route_map"):
+ command += " route-map " + module.params["route_map"]
+ commands = build_command(proposed, command)
+ if commands:
+ candidate.add(commands, parents=[])
+
+
+def build_command(param_dict, command):
+ for param in ["group_list", "prefix_list", "route_map"]:
+ if param_dict.get(param):
+ command += " {0} {1}".format(
+ param.replace("_", "-"), param_dict.get(param)
+ )
+ if param_dict.get("bidir"):
+ command += " bidir"
+ return [command]
+
+
+def state_absent(module, existing, candidate):
+ address = module.params["rp_address"]
+
+ commands = []
+ command = "no ip pim rp-address {0}".format(address)
+ if module.params["group_list"] == existing.get("group_list"):
+ commands = build_command(existing, command)
+ elif not module.params["group_list"]:
+ commands = [command]
+
+ if commands:
+ candidate.add(commands, parents=[])
+
+
+def get_proposed(pargs, existing):
+ proposed = {}
+
+ for key, value in pargs.items():
+ if key != "rp_address":
+ if str(value).lower() == "true":
+ value = True
+ elif str(value).lower() == "false":
+ value = False
+
+ if existing.get(key) != value:
+ proposed[key] = value
+
+ return proposed
+
+
+def main():
+ argument_spec = dict(
+ rp_address=dict(required=True, type="str"),
+ group_list=dict(required=False, type="str"),
+ prefix_list=dict(required=False, type="str"),
+ route_map=dict(required=False, type="str"),
+ bidir=dict(required=False, type="bool"),
+ state=dict(
+ choices=["present", "absent"], default="present", required=False
+ ),
+ )
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=[
+ ["group_list", "route_map"],
+ ["group_list", "prefix_list"],
+ ["route_map", "prefix_list"],
+ ],
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ result = {"changed": False, "commands": [], "warnings": warnings}
+
+ state = module.params["state"]
+
+ args = ["rp_address", "group_list", "prefix_list", "route_map", "bidir"]
+
+ proposed_args = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+
+ if module.params["group_list"]:
+ existing = get_existing(module, args, True)
+ proposed = get_proposed(proposed_args, existing)
+
+ else:
+ existing = get_existing(module, args, False)
+ proposed = get_proposed(proposed_args, existing)
+
+ candidate = CustomNetworkConfig(indent=3)
+ if state == "present" and (proposed or not existing):
+ state_present(module, existing, proposed, candidate)
+ elif state == "absent" and existing:
+ state_absent(module, existing, candidate)
+
+ if candidate:
+ candidate = candidate.items_text()
+ result["commands"] = candidate
+ result["changed"] = True
+ msgs = load_config(module, candidate, True)
+ if msgs:
+ for item in msgs:
+ if item:
+ if isinstance(item, dict):
+ err_str = item["clierror"]
+ else:
+ err_str = item
+ if "No policy was configured" in err_str:
+ if state == "absent":
+ addr = module.params["rp_address"]
+ new_cmd = "no ip pim rp-address {0}".format(addr)
+ load_config(module, new_cmd)
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ping.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ping.py
new file mode 100644
index 00000000..11f08a93
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_ping.py
@@ -0,0 +1,237 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_ping
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Tests reachability using ping from Nexus switch.
+description:
+- Tests reachability using ping from switch to a remote destination.
+- For a general purpose network module, see the M(ansible.netcommon.net_ping) module.
+- For Windows targets, use the M(ansible.windows.win_ping) module instead.
+- For targets running Python, use the M(ansible.builtin.ping) module instead.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+options:
+ dest:
+ description:
+ - IP address or hostname (resolvable by switch) of remote node.
+ required: true
+ type: str
+ count:
+ description:
+ - Number of packets to send.
+ default: 5
+ type: int
+ source:
+ description:
+ - Source IP Address or hostname (resolvable by switch)
+ type: str
+ vrf:
+ description:
+ - Outgoing VRF.
+ type: str
+ state:
+ description:
+ - Determines if the expected result is success or fail.
+ choices:
+ - absent
+ - present
+ default: present
+ type: str
+notes:
+- For a general purpose network module, see the M(ansible.netcommon.net_ping) module.
+- For Windows targets, use the M(ansible.windows.win_ping) module instead.
+- For targets running Python, use the M(ansible.builtin.ping) module instead.
+"""
+
+EXAMPLES = """
+- name: Test reachability to 8.8.8.8 using mgmt vrf
+ cisco.nxos.nxos_ping:
+ dest: 8.8.8.8
+ vrf: management
+ host: 68.170.147.165
+
+- name: Test reachability to a few different public IPs using mgmt vrf
+ cisco.nxos.nxos_ping:
+ dest: nxos_ping
+ vrf: management
+ host: 68.170.147.165
+ with_items:
+ - 8.8.8.8
+ - 4.4.4.4
+ - 198.6.1.4
+"""
+
+RETURN = """
+commands:
+ description: Show the command sent
+ returned: always
+ type: list
+ sample: ["ping 8.8.8.8 count 2 vrf management"]
+rtt:
+ description: Show RTT stats
+ returned: always
+ type: dict
+ sample: {"avg": 6.264, "max": 6.564, "min": 5.978}
+packets_rx:
+ description: Packets successfully received
+ returned: always
+ type: int
+ sample: 2
+packets_tx:
+ description: Packets successfully transmitted
+ returned: always
+ type: int
+ sample: 2
+packet_loss:
+ description: Percentage of packets lost
+ returned: always
+ type: str
+ sample: "0.00%"
+"""
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def get_summary(results_list, reference_point):
+ summary_string = results_list[reference_point + 1]
+ summary_list = summary_string.split(",")
+
+ summary = dict(
+ packets_tx=int(summary_list[0].split("packets")[0].strip()),
+ packets_rx=int(summary_list[1].split("packets")[0].strip()),
+ packet_loss=summary_list[2].split("packet")[0].strip(),
+ )
+
+ if "bytes from" not in results_list[reference_point - 2]:
+ ping_pass = False
+ else:
+ ping_pass = True
+
+ return summary, ping_pass
+
+
+def get_rtt(results_list, packet_loss, location):
+ rtt = dict(min=None, avg=None, max=None)
+
+ if packet_loss != "100.00%":
+ rtt_string = results_list[location]
+ base = rtt_string.split("=")[1]
+ rtt_list = base.split("/")
+
+ rtt["min"] = float(rtt_list[0].lstrip())
+ rtt["avg"] = float(rtt_list[1])
+ rtt["max"] = float(rtt_list[2][:-3])
+
+ return rtt
+
+
+def get_statistics_summary_line(response_as_list):
+ for each in response_as_list:
+ if "---" in each:
+ index = response_as_list.index(each)
+ return index
+
+
+def get_ping_results(command, module):
+ cmd = {"command": command, "output": "text"}
+ ping = run_commands(module, [cmd])[0]
+
+ if not ping:
+ module.fail_json(
+ msg="An unexpected error occurred. Check all params.",
+ command=command,
+ destination=module.params["dest"],
+ vrf=module.params["vrf"],
+ source=module.params["source"],
+ )
+
+ elif "can't bind to address" in ping:
+ module.fail_json(msg="Can't bind to source address.", command=command)
+ elif "bad context" in ping:
+ module.fail_json(
+ msg="Wrong VRF name inserted.",
+ command=command,
+ vrf=module.params["vrf"],
+ )
+ else:
+ splitted_ping = ping.split("\n")
+ reference_point = get_statistics_summary_line(splitted_ping)
+ summary, ping_pass = get_summary(splitted_ping, reference_point)
+ rtt = get_rtt(
+ splitted_ping, summary["packet_loss"], reference_point + 2
+ )
+
+ return (summary, rtt, ping_pass)
+
+
+def main():
+ argument_spec = dict(
+ dest=dict(required=True),
+ count=dict(required=False, default=5, type="int"),
+ vrf=dict(required=False),
+ source=dict(required=False),
+ state=dict(
+ required=False, choices=["present", "absent"], default="present"
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ destination = module.params["dest"]
+ state = module.params["state"]
+
+ ping_command = "ping {0}".format(destination)
+ for command in ["count", "source", "vrf"]:
+ arg = module.params[command]
+ if arg:
+ ping_command += " {0} {1}".format(command, arg)
+
+ summary, rtt, ping_pass = get_ping_results(ping_command, module)
+
+ results = summary
+ results["rtt"] = rtt
+ results["commands"] = [ping_command]
+
+ if ping_pass and state == "absent":
+ module.fail_json(msg="Ping succeeded unexpectedly")
+ elif not ping_pass and state == "present":
+ module.fail_json(msg="Ping failed unexpectedly")
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_reboot.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_reboot.py
new file mode 100644
index 00000000..89fcb897
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_reboot.py
@@ -0,0 +1,94 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_reboot
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Reboot a network device.
+description:
+- Reboot a network device.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- The module will fail due to timeout issues, but the reboot will be performed anyway.
+options:
+ confirm:
+ description:
+ - Safeguard boolean. Set to true if you're sure you want to reboot.
+ required: false
+ default: false
+ type: bool
+"""
+
+EXAMPLES = """
+- cisco.nxos.nxos_reboot:
+ confirm: true
+"""
+
+RETURN = """
+rebooted:
+ description: Whether the device was instructed to reboot.
+ returned: success
+ type: bool
+ sample: true
+"""
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def reboot(module):
+ cmds = "terminal dont-ask ; reload"
+ opts = {"ignore_timeout": True}
+ load_config(module, cmds, False, opts)
+
+
+def main():
+ argument_spec = dict(confirm=dict(default=False, type="bool"))
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = dict(changed=False, warnings=warnings)
+
+ if module.params["confirm"]:
+ if not module.check_mode:
+ reboot(module)
+ results["changed"] = True
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_rollback.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_rollback.py
new file mode 100644
index 00000000..fae27263
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_rollback.py
@@ -0,0 +1,134 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_rollback
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Set a checkpoint or rollback to a checkpoint.
+description:
+- This module offers the ability to set a configuration checkpoint file or rollback
+ to a configuration checkpoint file on Cisco NXOS switches.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- Sometimes C(transport=nxapi) may cause a timeout error.
+options:
+ checkpoint_file:
+ description:
+ - Name of checkpoint file to create. Mutually exclusive with rollback_to.
+ type: str
+ rollback_to:
+ description:
+ - Name of checkpoint file to rollback to. Mutually exclusive with checkpoint_file.
+ type: str
+"""
+
+EXAMPLES = """
+- cisco.nxos.nxos_rollback:
+ checkpoint_file: backup.cfg
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+ host: '{{ inventory_hostname }}'
+- cisco.nxos.nxos_rollback:
+ rollback_to: backup.cfg
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+ host: '{{ inventory_hostname }}'
+"""
+
+RETURN = """
+filename:
+ description: The filename of the checkpoint/rollback file.
+ returned: success
+ type: str
+ sample: 'backup.cfg'
+status:
+ description: Which operation took place and whether it was successful.
+ returned: success
+ type: str
+ sample: 'rollback executed'
+"""
+
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+ run_commands,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def checkpoint(filename, module):
+ commands = [
+ {"command": "terminal dont-ask", "output": "text"},
+ {"command": "checkpoint file %s" % filename, "output": "text"},
+ ]
+ run_commands(module, commands)
+
+
+def rollback(filename, module):
+ commands = [
+ {
+ "command": "rollback running-config file %s" % filename,
+ "output": "text",
+ }
+ ]
+ run_commands(module, commands)
+
+
+def main():
+ argument_spec = dict(
+ checkpoint_file=dict(required=False), rollback_to=dict(required=False)
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=[["checkpoint_file", "rollback_to"]],
+ supports_check_mode=False,
+ )
+
+ checkpoint_file = module.params["checkpoint_file"]
+ rollback_to = module.params["rollback_to"]
+
+ status = None
+ filename = None
+ changed = False
+
+ if checkpoint_file:
+ checkpoint(checkpoint_file, module)
+ status = "checkpoint file created"
+ elif rollback_to:
+ rollback(rollback_to, module)
+ status = "rollback executed"
+ changed = True
+ filename = rollback_to or checkpoint_file
+
+ module.exit_json(changed=changed, status=status, filename=filename)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_rpm.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_rpm.py
new file mode 100644
index 00000000..ac813c9a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_rpm.py
@@ -0,0 +1,421 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_rpm
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Install patch or feature rpms on Cisco NX-OS devices.
+description:
+- Install software maintenance upgrade (smu) RPMS and 3rd party RPMS on Cisco NX-OS
+ devices.
+version_added: 1.0.0
+author: Sai Chintalapudi (@saichint)
+notes:
+- Tested against NXOSv 7.0(3)I2(5), 7.0(3)I4(6), 7.0(3)I5(3), 7.0(3)I6(1), 7.0(3)I7(3)
+- For patches, the minimum platform version needed is 7.0(3)I2(5)
+- For feature rpms, the minimum platform version needed is 7.0(3)I6(1)
+- The module manages the entire RPM lifecycle (Add, activate, commit, deactivate,
+ remove)
+- For reload patches, this module is NOT idempotent until the patch is committed.
+options:
+ pkg:
+ description:
+ - Name of the RPM package.
+ type: str
+ file_system:
+ description:
+ - The remote file system of the device. If omitted, devices that support a file_system
+ parameter will use their default values.
+ default: bootflash
+ type: str
+ aggregate:
+ description:
+ - List of RPM/patch definitions.
+ type: list
+ elements: dict
+ suboptions:
+ pkg:
+ description:
+ - Name of the RPM package.
+ required: True
+ type: str
+ file_system:
+ description:
+ - The remote file system of the device. If omitted, devices that support a file_system
+ parameter will use their default values.
+ type: str
+ state:
+ description:
+ - If the state is present, the rpm will be installed, If the state is absent,
+ it will be removed.
+ choices:
+ - present
+ - absent
+ type: str
+ state:
+ description:
+ - If the state is present, the rpm will be installed, If the state is absent,
+ it will be removed.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+- cisco.nxos.nxos_rpm:
+ pkg: nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000.rpm
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["install add bootflash:nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000.rpm forced",
+ "install activate nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000 forced",
+ "install commit nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000"]
+"""
+
+
+import time
+
+from copy import deepcopy
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+
+
+def execute_show_command(command, module):
+ iteration = 0
+ cmds = [{"command": command, "output": "text"}]
+
+ while iteration < 10:
+ body = run_commands(module, cmds)[0]
+ if body:
+ return body
+ else:
+ time.sleep(2)
+ iteration += 1
+
+
+def remote_file_exists(module, dst, file_system):
+ command = "dir {0}:/{1}".format(file_system, dst)
+ body = execute_show_command(command, module)
+ if "No such file" in body:
+ return False
+ return True
+
+
+def config_cmd_operation(module, cmd):
+ iteration = 0
+ while iteration < 10:
+ msg = load_config(module, [cmd], True)
+ if msg:
+ if (
+ "another install operation is in progress" in msg[0].lower()
+ or "failed" in msg[0].lower()
+ ):
+ time.sleep(2)
+ iteration += 1
+ else:
+ return
+ else:
+ return
+
+
+def validate_operation(module, show_cmd, cfg_cmd, pkg, pkg_not_present):
+ iteration = 0
+ while iteration < 10:
+ body = execute_show_command(show_cmd, module)
+ if pkg_not_present:
+ if pkg not in body:
+ return
+ else:
+ if pkg in body:
+ return
+ time.sleep(2)
+ iteration += 1
+
+ err = 'Operation "{0}" Failed'.format(cfg_cmd)
+ module.fail_json(msg=err)
+
+
+def add_operation(module, show_cmd, file_system, full_pkg, pkg):
+ cmd = "install add {0}:{1}".format(file_system, full_pkg)
+ config_cmd_operation(module, cmd)
+ validate_operation(module, show_cmd, cmd, pkg, False)
+ return cmd
+
+
+def activate_operation(module, show_cmd, pkg):
+ cmd = "install activate {0} forced".format(pkg)
+ config_cmd_operation(module, cmd)
+ validate_operation(module, show_cmd, cmd, pkg, False)
+ return cmd
+
+
+def activate_reload(module, pkg, flag):
+ iteration = 0
+ if flag:
+ cmd = "install activate {0} forced".format(pkg)
+ else:
+ cmd = "install deactivate {0} forced".format(pkg)
+ opts = {"ignore_timeout": True}
+ while iteration < 10:
+ msg = load_config(module, [cmd], True, opts)
+ if msg:
+ if isinstance(msg[0], int):
+ if msg[0] == -32603:
+ return cmd
+ elif isinstance(msg[0], str):
+ if "socket is closed" in msg[0].lower():
+ return cmd
+ if (
+ "another install operation is in progress"
+ in msg[0].lower()
+ or "failed" in msg[0].lower()
+ ):
+ time.sleep(2)
+ iteration += 1
+
+
+def commit_operation(module, show_cmd, pkg, flag):
+ cmd = "install commit {0}".format(pkg)
+ config_cmd_operation(module, cmd)
+ validate_operation(module, show_cmd, cmd, pkg, flag)
+ return cmd
+
+
+def deactivate_operation(module, show_cmd, pkg, flag):
+ cmd = "install deactivate {0} forced".format(pkg)
+ config_cmd_operation(module, cmd)
+ validate_operation(module, show_cmd, cmd, pkg, flag)
+ return cmd
+
+
+def terminal_operation(module, config):
+ if config:
+ cmd = "terminal dont-ask"
+ else:
+ cmd = "no terminal dont-ask"
+ config_cmd_operation(module, cmd)
+ return cmd
+
+
+def remove_operation(module, show_cmd, pkg):
+ commands = []
+ commands.append(terminal_operation(module, True))
+ cmd = "install remove {0} forced".format(pkg)
+ config_cmd_operation(module, cmd)
+ validate_operation(module, show_cmd, cmd, pkg, True)
+ commands.append(cmd)
+ commands.append(terminal_operation(module, False))
+ return commands
+
+
+def install_remove_rpm(module, full_pkg, file_system, state):
+ commands = []
+ reload_patch = False
+
+ splitted_pkg = full_pkg.split(".")
+ pkg = ".".join(splitted_pkg[0:-1])
+
+ show_inactive = "show install inactive"
+ show_active = "show install active"
+ show_commit = "show install committed"
+ show_patches = "show install patches"
+ show_pkg_info = "show install pkg-info {0}".format(pkg)
+
+ if state == "present":
+ inactive_body = execute_show_command(show_inactive, module)
+ active_body = execute_show_command(show_active, module)
+
+ if pkg not in inactive_body and pkg not in active_body:
+ commands.append(
+ add_operation(
+ module, show_inactive, file_system, full_pkg, pkg
+ )
+ )
+
+ patch_type_body = execute_show_command(show_pkg_info, module)
+ if patch_type_body and "Patch Type : reload" in patch_type_body:
+ # This is reload smu/patch rpm
+ reload_patch = True
+
+ if pkg not in active_body:
+ if reload_patch:
+ commands.append(activate_reload(module, pkg, True))
+ return commands
+ else:
+ commands.append(activate_operation(module, show_active, pkg))
+
+ commit_body = execute_show_command(show_commit, module)
+ if pkg not in commit_body:
+ patch_body = execute_show_command(show_patches, module)
+ if pkg in patch_body:
+ # This is smu/patch rpm
+ commands.append(
+ commit_operation(module, show_commit, pkg, False)
+ )
+ else:
+ err = 'Operation "install activate {0} forced" Failed'.format(
+ pkg
+ )
+ module.fail_json(msg=err)
+
+ else:
+ commit_body = execute_show_command(show_commit, module)
+ active_body = execute_show_command(show_active, module)
+
+ patch_type_body = execute_show_command(show_pkg_info, module)
+ if patch_type_body and "Patch Type : reload" in patch_type_body:
+ # This is reload smu/patch rpm
+ reload_patch = True
+
+ if pkg in commit_body and pkg in active_body:
+ if reload_patch:
+ commands.append(activate_reload(module, pkg, False))
+ return commands
+ else:
+ commands.append(
+ deactivate_operation(module, show_active, pkg, True)
+ )
+ commit_body = execute_show_command(show_commit, module)
+ if pkg in commit_body:
+ # This is smu/patch rpm
+ commands.append(
+ commit_operation(module, show_commit, pkg, True)
+ )
+ commands.extend(remove_operation(module, show_inactive, pkg))
+
+ elif pkg in commit_body:
+ # This is smu/patch rpm
+ commands.append(commit_operation(module, show_commit, pkg, True))
+ commands.extend(remove_operation(module, show_inactive, pkg))
+
+ elif pkg in active_body:
+ # This is smu/patch rpm
+ if reload_patch:
+ commands.append(activate_reload(module, pkg, False))
+ return commands
+ else:
+ commands.append(
+ deactivate_operation(module, show_inactive, pkg, False)
+ )
+ commands.extend(remove_operation(module, show_inactive, pkg))
+
+ else:
+ inactive_body = execute_show_command(show_inactive, module)
+ if pkg in inactive_body:
+ commands.extend(remove_operation(module, show_inactive, pkg))
+
+ return commands
+
+
+def main():
+ element_spec = dict(
+ pkg=dict(type="str"),
+ file_system=dict(type="str", default="bootflash"),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["pkg"] = dict(required=True)
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec)
+ )
+
+ argument_spec.update(element_spec)
+ argument_spec.update(nxos_argument_spec)
+
+ required_one_of = [["pkg", "aggregate"]]
+ mutually_exclusive = [["pkg", "aggregate"]]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=required_one_of,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=False,
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ aggregate = module.params.get("aggregate")
+ objects = []
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+
+ d = item.copy()
+ objects.append(d)
+ else:
+ objects.append(
+ {
+ "pkg": module.params["pkg"],
+ "file_system": module.params["file_system"],
+ "state": module.params["state"],
+ }
+ )
+
+ for obj in objects:
+ if obj["state"] == "present":
+ remote_exists = remote_file_exists(
+ module, obj["pkg"], file_system=obj["file_system"]
+ )
+
+ if not remote_exists:
+ module.fail_json(
+ msg="The requested package doesn't exist on the device"
+ )
+
+ cmds = install_remove_rpm(
+ module, obj["pkg"], obj["file_system"], obj["state"]
+ )
+
+ if cmds:
+ results["changed"] = True
+ results["commands"].extend(cmds)
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_smu.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_smu.py
new file mode 100644
index 00000000..4f674a6d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_smu.py
@@ -0,0 +1,163 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_smu
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2022-10-01) Perform SMUs on Cisco NX-OS devices.
+description:
+- Perform software maintenance upgrades (SMUs) on Cisco NX-OS devices.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+deprecated:
+ alternative: nxos_rpm
+ why: Updated modules released with more functionality.
+ removed_at_date: '2022-10-01'
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- The module can only activate and commit a package, not remove or deactivate it.
+- Use C(transport=nxapi) to avoid connection timeout
+options:
+ pkg:
+ description:
+ - Name of the remote package.
+ required: true
+ type: str
+ file_system:
+ description:
+ - The remote file system of the device. If omitted, devices that support a file_system
+ parameter will use their default values.
+ default: 'bootflash:'
+ type: str
+"""
+
+EXAMPLES = """
+- cisco.nxos.nxos_smu:
+ pkg: nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["install add bootflash:nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm",
+ "install activate bootflash:nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm force",
+ "install commit bootflash:nxos.CSCuz65185-n9k_EOR-1.0.0-7.0.3.I2.2d.lib32_n9000.rpm"]
+"""
+
+
+import time
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def execute_show_command(command, module):
+ cmds = [{"command": command, "output": "text"}]
+
+ return run_commands(module, cmds)
+
+
+def remote_file_exists(module, dst, file_system="bootflash:"):
+ command = "dir {0}/{1}".format(file_system, dst)
+ body = execute_show_command(command, module)
+ if "No such file" in body[0]:
+ return False
+ return True
+
+
+def apply_patch(module, commands):
+ for command in commands:
+ load_config(module, [command])
+ time.sleep(5)
+
+
+def get_commands(module, pkg, file_system):
+ commands = []
+ splitted_pkg = pkg.split(".")
+ fixed_pkg = ".".join(splitted_pkg[0:-1])
+
+ command = "show install inactive"
+ inactive_body = execute_show_command(command, module)
+
+ command = "show install active"
+ active_body = execute_show_command(command, module)
+
+ if fixed_pkg not in inactive_body[0] and fixed_pkg not in active_body[0]:
+ commands.append("install add {0}{1}".format(file_system, pkg))
+
+ if fixed_pkg not in active_body[0]:
+ commands.append("install activate {0} force".format(pkg))
+ command = "show install committed"
+ install_body = execute_show_command(command, module)
+ if fixed_pkg not in install_body[0]:
+ commands.append("install commit {0}".format(pkg))
+
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ pkg=dict(required=True),
+ file_system=dict(required=False, default="bootflash:"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ pkg = module.params["pkg"]
+ file_system = module.params["file_system"]
+ remote_exists = remote_file_exists(module, pkg, file_system=file_system)
+
+ if not remote_exists:
+ module.fail_json(
+ msg="The requested package doesn't exist on the device"
+ )
+
+ commands = get_commands(module, pkg, file_system)
+ if commands:
+ results["changed"] = True
+ if not module.check_mode:
+ apply_patch(module, commands)
+ if "configure" in commands:
+ commands.pop(0)
+ results["commands"] = commands
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snapshot.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snapshot.py
new file mode 100644
index 00000000..864977f6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snapshot.py
@@ -0,0 +1,425 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+
+DOCUMENTATION = """
+module: nxos_snapshot
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manage snapshots of the running states of selected features.
+description:
+- Create snapshots of the running states of selected features, add new show commands
+ for snapshot creation, delete and compare existing snapshots.
+version_added: 1.0.0
+author:
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- C(transport=cli) may cause timeout errors.
+- The C(element_key1) and C(element_key2) parameter specify the tags used to distinguish
+ among row entries. In most cases, only the element_key1 parameter needs to specified
+ to be able to distinguish among row entries.
+- C(action=compare) will always store a comparison report on a local file.
+options:
+ action:
+ description:
+ - Define what snapshot action the module would perform.
+ required: true
+ choices:
+ - add
+ - compare
+ - create
+ - delete
+ - delete_all
+ type: str
+ snapshot_name:
+ description:
+ - Snapshot name, to be used when C(action=create) or C(action=delete).
+ type: str
+ description:
+ description:
+ - Snapshot description to be used when C(action=create).
+ type: str
+ snapshot1:
+ description:
+ - First snapshot to be used when C(action=compare).
+ type: str
+ snapshot2:
+ description:
+ - Second snapshot to be used when C(action=compare).
+ type: str
+ comparison_results_file:
+ description:
+ - Name of the file where snapshots comparison will be stored when C(action=compare).
+ type: str
+ compare_option:
+ description:
+ - Snapshot options to be used when C(action=compare).
+ choices:
+ - summary
+ - ipv4routes
+ - ipv6routes
+ type: str
+ section:
+ description:
+ - Used to name the show command output, to be used when C(action=add).
+ type: str
+ show_command:
+ description:
+ - Specify a new show command, to be used when C(action=add).
+ type: str
+ row_id:
+ description:
+ - Specifies the tag of each row entry of the show command's XML output, to be
+ used when C(action=add).
+ type: str
+ element_key1:
+ description:
+ - Specify the tags used to distinguish among row entries, to be used when C(action=add).
+ type: str
+ element_key2:
+ description:
+ - Specify the tags used to distinguish among row entries, to be used when C(action=add).
+ type: str
+ save_snapshot_locally:
+ description:
+ - Specify to locally store a new created snapshot, to be used when C(action=create).
+ type: bool
+ default: no
+ path:
+ description:
+ - Specify the path of the file where new created snapshot or snapshots comparison
+ will be stored, to be used when C(action=create) and C(save_snapshot_locally=true)
+ or C(action=compare).
+ default: ./
+ type: str
+"""
+
+EXAMPLES = """
+# Create a snapshot and store it locally
+- cisco.nxos.nxos_snapshot:
+ action: create
+ snapshot_name: test_snapshot
+ description: Done with Ansible
+ save_snapshot_locally: true
+ path: /home/user/snapshots/
+
+# Delete a snapshot
+- cisco.nxos.nxos_snapshot:
+ action: delete
+ snapshot_name: test_snapshot
+
+# Delete all existing snapshots
+- cisco.nxos.nxos_snapshot:
+ action: delete_all
+
+# Add a show command for snapshots creation
+- cisco.nxos.nxos_snapshot:
+ section: myshow
+ show_command: show ip interface brief
+ row_id: ROW_intf
+ element_key1: intf-name
+
+# Compare two snapshots
+- cisco.nxos.nxos_snapshot:
+ action: compare
+ snapshot1: pre_snapshot
+ snapshot2: post_snapshot
+ comparison_results_file: compare_snapshots.txt
+ compare_option: summary
+ path: ../snapshot_reports/
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: verbose mode
+ type: list
+ sample: ["snapshot create post_snapshot Post-snapshot"]
+"""
+
+import os
+import re
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+
+
+def execute_show_command(command, module):
+ command = [{"command": command, "output": "text"}]
+
+ return run_commands(module, command)
+
+
+def get_existing(module):
+ existing = []
+ command = "show snapshots"
+
+ body = execute_show_command(command, module)[0]
+ if body:
+ split_body = body.splitlines()
+ snapshot_regex = (
+ r"(?P<name>\S+)\s+(?P<date>\w+\s+\w+\s+\d+\s+\d+"
+ r":\d+:\d+\s+\d+)\s+(?P<description>.*)"
+ )
+ for snapshot in split_body:
+ temp = {}
+ try:
+ match_snapshot = re.match(snapshot_regex, snapshot, re.DOTALL)
+ snapshot_group = match_snapshot.groupdict()
+ temp["name"] = snapshot_group["name"]
+ temp["date"] = snapshot_group["date"]
+ temp["description"] = snapshot_group["description"]
+ existing.append(temp)
+ except AttributeError:
+ pass
+
+ return existing
+
+
+def action_create(module, existing_snapshots):
+ commands = list()
+ exist = False
+ for snapshot in existing_snapshots:
+ if module.params["snapshot_name"] == snapshot["name"]:
+ exist = True
+
+ if exist is False:
+ commands.append(
+ "snapshot create {0} {1}".format(
+ module.params["snapshot_name"], module.params["description"]
+ )
+ )
+
+ return commands
+
+
+def action_add(module, existing_snapshots):
+ commands = list()
+ command = "show snapshot sections"
+ sections = []
+ body = execute_show_command(command, module)[0]
+
+ if body:
+ section_regex = r".*\[(?P<section>\S+)\].*"
+ split_body = body.split("\n\n")
+ for section in split_body:
+ temp = {}
+ for line in section.splitlines():
+ try:
+ match_section = re.match(section_regex, section, re.DOTALL)
+ temp["section"] = match_section.groupdict()["section"]
+ except (AttributeError, KeyError):
+ pass
+
+ if "show command" in line:
+ temp["show_command"] = line.split("show command: ")[1]
+ elif "row id" in line:
+ temp["row_id"] = line.split("row id: ")[1]
+ elif "key1" in line:
+ temp["element_key1"] = line.split("key1: ")[1]
+ elif "key2" in line:
+ temp["element_key2"] = line.split("key2: ")[1]
+
+ if temp:
+ sections.append(temp)
+
+ proposed = {
+ "section": module.params["section"],
+ "show_command": module.params["show_command"],
+ "row_id": module.params["row_id"],
+ "element_key1": module.params["element_key1"],
+ "element_key2": module.params["element_key2"] or "-",
+ }
+
+ if proposed not in sections:
+ if module.params["element_key2"]:
+ commands.append(
+ 'snapshot section add {0} "{1}" {2} {3} {4}'.format(
+ module.params["section"],
+ module.params["show_command"],
+ module.params["row_id"],
+ module.params["element_key1"],
+ module.params["element_key2"],
+ )
+ )
+ else:
+ commands.append(
+ 'snapshot section add {0} "{1}" {2} {3}'.format(
+ module.params["section"],
+ module.params["show_command"],
+ module.params["row_id"],
+ module.params["element_key1"],
+ )
+ )
+
+ return commands
+
+
+def action_compare(module, existing_snapshots):
+ command = "show snapshot compare {0} {1}".format(
+ module.params["snapshot1"], module.params["snapshot2"]
+ )
+
+ if module.params["compare_option"]:
+ command += " {0}".format(module.params["compare_option"])
+
+ body = execute_show_command(command, module)[0]
+ return body
+
+
+def action_delete(module, existing_snapshots):
+ commands = list()
+
+ exist = False
+ for snapshot in existing_snapshots:
+ if module.params["snapshot_name"] == snapshot["name"]:
+ exist = True
+
+ if exist:
+ commands.append(
+ "snapshot delete {0}".format(module.params["snapshot_name"])
+ )
+
+ return commands
+
+
+def action_delete_all(module, existing_snapshots):
+ commands = list()
+ if existing_snapshots:
+ commands.append("snapshot delete all")
+ return commands
+
+
+def invoke(name, *args, **kwargs):
+ func = globals().get(name)
+ if func:
+ return func(*args, **kwargs)
+
+
+def write_on_file(content, filename, module):
+ path = module.params["path"]
+ if path[-1] != "/":
+ path += "/"
+ filepath = "{0}{1}".format(path, filename)
+ try:
+ report = open(filepath, "w")
+ report.write(content)
+ report.close()
+ except Exception:
+ module.fail_json(msg="Error while writing on file.")
+
+ return filepath
+
+
+def main():
+ argument_spec = dict(
+ action=dict(
+ required=True,
+ choices=["create", "add", "compare", "delete", "delete_all"],
+ ),
+ snapshot_name=dict(type="str"),
+ description=dict(type="str"),
+ snapshot1=dict(type="str"),
+ snapshot2=dict(type="str"),
+ compare_option=dict(choices=["summary", "ipv4routes", "ipv6routes"]),
+ comparison_results_file=dict(type="str"),
+ section=dict(type="str"),
+ show_command=dict(type="str"),
+ row_id=dict(type="str"),
+ element_key1=dict(type="str"),
+ element_key2=dict(type="str"),
+ save_snapshot_locally=dict(type="bool", default=False),
+ path=dict(type="str", default="./"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ required_if = [
+ (
+ "action",
+ "compare",
+ ["snapshot1", "snapshot2", "comparison_results_file"],
+ ),
+ ("action", "create", ["snapshot_name", "description"]),
+ (
+ "action",
+ "add",
+ ["section", "show_command", "row_id", "element_key1"],
+ ),
+ ("action", "delete", ["snapshot_name"]),
+ ]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_if=required_if,
+ supports_check_mode=True,
+ )
+
+ action = module.params["action"]
+ comparison_results_file = module.params["comparison_results_file"]
+
+ if not os.path.isdir(module.params["path"]):
+ module.fail_json(
+ msg="{0} is not a valid directory name.".format(
+ module.params["path"]
+ )
+ )
+
+ existing_snapshots = invoke("get_existing", module)
+ action_results = invoke("action_%s" % action, module, existing_snapshots)
+
+ result = {"changed": False, "commands": []}
+
+ if not module.check_mode:
+ if action == "compare":
+ result["commands"] = []
+
+ if module.params["path"] and comparison_results_file:
+ snapshot1 = module.params["snapshot1"]
+ snapshot2 = module.params["snapshot2"]
+ compare_option = module.params["compare_option"]
+ command = "show snapshot compare {0} {1}".format(
+ snapshot1, snapshot2
+ )
+ if compare_option:
+ command += " {0}".format(compare_option)
+ content = execute_show_command(command, module)[0]
+ if content:
+ write_on_file(content, comparison_results_file, module)
+ else:
+ if action_results:
+ load_config(module, action_results)
+ result["commands"] = action_results
+ result["changed"] = True
+
+ if (
+ action == "create"
+ and module.params["path"]
+ and module.params["save_snapshot_locally"]
+ ):
+ command = "show snapshot dump {0} | json".format(
+ module.params["snapshot_name"]
+ )
+ content = execute_show_command(command, module)[0]
+ if content:
+ write_on_file(
+ str(content), module.params["snapshot_name"], module
+ )
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_community.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_community.py
new file mode 100644
index 00000000..bb3d2512
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_community.py
@@ -0,0 +1,253 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_snmp_community
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages SNMP community configs.
+description:
+- Manages SNMP community configuration.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+options:
+ community:
+ description:
+ - Case-sensitive community string.
+ required: true
+ type: str
+ access:
+ description:
+ - Access type for community.
+ choices:
+ - ro
+ - rw
+ type: str
+ group:
+ description:
+ - Group to which the community belongs.
+ type: str
+ acl:
+ description:
+ - ACL name to filter snmp requests or keyword 'default'.
+ type: str
+ state:
+ description:
+ - Manage the state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+# ensure snmp community is configured
+- cisco.nxos.nxos_snmp_community:
+ community: TESTING7
+ group: network-operator
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["snmp-server community TESTING7 group network-operator"]
+"""
+
+import re
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def execute_show_command(command, module):
+ if "show run" not in command:
+ output = "json"
+ else:
+ output = "text"
+ cmds = [{"command": command, "output": output}]
+
+ body = run_commands(module, cmds)
+ return body
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_snmp_groups(module):
+ data = execute_show_command("show snmp group", module)[0]
+ group_list = []
+
+ try:
+ group_table = data["TABLE_role"]["ROW_role"]
+ for group in group_table:
+ group_list.append(group["role_name"])
+ except (KeyError, AttributeError):
+ pass
+
+ return group_list
+
+
+def get_snmp_community(module, name):
+ command = "show run snmp all | grep word-exp {0}".format(name)
+ data = execute_show_command(command, module)[0]
+ community_dict = {}
+
+ if not data:
+ return community_dict
+
+ community_re = r"snmp-server community (\S+)"
+ mo = re.search(community_re, data)
+ if mo:
+ community_name = mo.group(1)
+ else:
+ return community_dict
+
+ community_dict["group"] = None
+ group_re = r"snmp-server community {0} group (\S+)".format(community_name)
+ mo = re.search(group_re, data)
+ if mo:
+ community_dict["group"] = mo.group(1)
+
+ community_dict["acl"] = None
+ acl_re = r"snmp-server community {0} use-acl (\S+)".format(community_name)
+ mo = re.search(acl_re, data)
+ if mo:
+ community_dict["acl"] = mo.group(1)
+
+ return community_dict
+
+
+def config_snmp_community(delta, community):
+ CMDS = {
+ "group": "snmp-server community {0} group {group}",
+ "acl": "snmp-server community {0} use-acl {acl}",
+ "no_acl": "no snmp-server community {0} use-acl {no_acl}",
+ }
+ commands = []
+ for k in delta.keys():
+ cmd = CMDS.get(k).format(community, **delta)
+ if cmd:
+ if "group" in cmd:
+ commands.insert(0, cmd)
+ else:
+ commands.append(cmd)
+ cmd = None
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ community=dict(required=True, type="str"),
+ access=dict(choices=["ro", "rw"]),
+ group=dict(type="str"),
+ acl=dict(type="str"),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=[["access", "group"]],
+ mutually_exclusive=[["access", "group"]],
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ access = module.params["access"]
+ group = module.params["group"]
+ community = module.params["community"]
+ acl = module.params["acl"]
+ state = module.params["state"]
+
+ if access:
+ if access == "ro":
+ group = "network-operator"
+ elif access == "rw":
+ group = "network-admin"
+
+ # group check - ensure group being configured exists on the device
+ configured_groups = get_snmp_groups(module)
+
+ if group not in configured_groups:
+ module.fail_json(
+ msg="Group not on switch. Please add before moving forward"
+ )
+
+ existing = get_snmp_community(module, community)
+ args = dict(group=group, acl=acl)
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+ delta = dict(set(proposed.items()).difference(existing.items()))
+ if delta.get("acl") == "default":
+ delta.pop("acl")
+ if existing.get("acl"):
+ delta["no_acl"] = existing.get("acl")
+
+ commands = []
+
+ if state == "absent":
+ if existing:
+ command = "no snmp-server community {0}".format(community)
+ commands.append(command)
+ elif state == "present":
+ if delta:
+ command = config_snmp_community(dict(delta), community)
+ commands.append(command)
+
+ cmds = flatten_list(commands)
+
+ if cmds:
+ results["changed"] = True
+ if not module.check_mode:
+ load_config(module, cmds)
+
+ if "configure" in cmds:
+ cmds.pop(0)
+ results["commands"] = cmds
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_contact.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_contact.py
new file mode 100644
index 00000000..eacba94c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_contact.py
@@ -0,0 +1,151 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_snmp_contact
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages SNMP contact info.
+description:
+- Manages SNMP contact information.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- C(state=absent) removes the contact configuration if it is configured.
+options:
+ contact:
+ description:
+ - Contact information.
+ required: true
+ type: str
+ state:
+ description:
+ - Manage the state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+# ensure snmp contact is configured
+- cisco.nxos.nxos_snmp_contact:
+ contact: Test
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["snmp-server contact New_Test"]
+"""
+
+
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def execute_show_command(command, module):
+ command = {"command": command, "output": "text"}
+
+ return run_commands(module, command)
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_snmp_contact(module):
+ contact = {}
+ contact_regex = r"^\s*snmp-server\scontact\s(?P<contact>.+)$"
+
+ body = execute_show_command("show run snmp", module)[0]
+ match_contact = re.search(contact_regex, body, re.M)
+ if match_contact:
+ contact["contact"] = match_contact.group("contact")
+
+ return contact
+
+
+def main():
+ argument_spec = dict(
+ contact=dict(required=True, type="str"),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ contact = module.params["contact"]
+ state = module.params["state"]
+
+ existing = get_snmp_contact(module)
+ commands = []
+
+ if state == "absent":
+ if existing and existing["contact"] == contact:
+ commands.append("no snmp-server contact")
+ elif state == "present":
+ if not existing or existing["contact"] != contact:
+ commands.append("snmp-server contact {0}".format(contact))
+
+ cmds = flatten_list(commands)
+ if cmds:
+ results["changed"] = True
+ if not module.check_mode:
+ load_config(module, cmds)
+
+ if "configure" in cmds:
+ cmds.pop(0)
+ results["commands"] = cmds
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_host.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_host.py
new file mode 100644
index 00000000..15541103
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_host.py
@@ -0,0 +1,521 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_snmp_host
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages SNMP host configuration.
+description:
+- Manages SNMP host configuration parameters.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- C(state=absent) removes the host configuration if it is configured.
+options:
+ snmp_host:
+ description:
+ - IP address of hostname of target host.
+ required: true
+ type: str
+ version:
+ description:
+ - SNMP version. If this is not specified, v1 is used.
+ choices:
+ - v1
+ - v2c
+ - v3
+ type: str
+ v3:
+ description:
+ - Use this when verion is v3. SNMPv3 Security level.
+ choices:
+ - noauth
+ - auth
+ - priv
+ type: str
+ community:
+ description:
+ - Community string or v3 username.
+ type: str
+ udp:
+ description:
+ - UDP port number (0-65535).
+ default: 162
+ type: str
+ snmp_type:
+ description:
+ - type of message to send to host. If this is not specified, trap type is used.
+ choices:
+ - trap
+ - inform
+ type: str
+ vrf:
+ description:
+ - VRF to use to source traffic to source. If state = absent, the vrf is removed.
+ type: str
+ vrf_filter:
+ description:
+ - Name of VRF to filter. If state = absent, the vrf is removed from the filter.
+ type: str
+ src_intf:
+ description:
+ - Source interface. Must be fully qualified interface name. If state = absent,
+ the interface is removed.
+ type: str
+ state:
+ description:
+ - Manage the state of the resource. If state = present, the host is added to the
+ configuration. If only vrf and/or vrf_filter and/or src_intf are given, they
+ will be added to the existing host configuration. If state = absent, the host
+ is removed if community parameter is given. It is possible to remove only vrf
+ and/or src_int and/or vrf_filter by providing only those parameters and no community
+ parameter.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+# ensure snmp host is configured
+- cisco.nxos.nxos_snmp_host:
+ snmp_host: 192.0.2.3
+ community: TESTING
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["snmp-server host 192.0.2.3 filter-vrf another_test_vrf"]
+"""
+
+
+import re
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def execute_show_command(command, module):
+ command = {"command": command, "output": "json"}
+
+ return run_commands(module, command)
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key, value in table.items():
+ new_key = key_map.get(key)
+ if new_key:
+ value = table.get(key)
+ if value:
+ new_dict[new_key] = str(value)
+ else:
+ new_dict[new_key] = value
+ return new_dict
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_snmp_host(host, udp, module):
+ body = execute_show_command("show snmp host", module)
+
+ host_map = {
+ "port": "udp",
+ "version": "version",
+ "level": "v3",
+ "type": "snmp_type",
+ "secname": "community",
+ }
+
+ host_map_5k = {
+ "port": "udp",
+ "version": "version",
+ "sec_level": "v3",
+ "notif_type": "snmp_type",
+ "commun_or_user": "community",
+ }
+
+ resource = {}
+
+ if body:
+ try:
+ resource_table = body[0]["TABLE_host"]["ROW_host"]
+
+ if isinstance(resource_table, dict):
+ resource_table = [resource_table]
+
+ for each in resource_table:
+ key = str(each["host"]) + "_" + str(each["port"]).strip()
+ src = each.get("src_intf")
+ host_resource = apply_key_map(host_map, each)
+
+ if src:
+ host_resource["src_intf"] = src
+ if re.search(r"interface:", src):
+ host_resource["src_intf"] = src.split(":")[1].strip()
+
+ vrf_filt = each.get("TABLE_vrf_filters")
+ if vrf_filt:
+ vrf_filter = (
+ vrf_filt["ROW_vrf_filters"]["vrf_filter"]
+ .split(":")[1]
+ .split(",")
+ )
+ filters = [vrf.strip() for vrf in vrf_filter]
+ host_resource["vrf_filter"] = filters
+
+ vrf = each.get("vrf")
+ if vrf:
+ host_resource["vrf"] = vrf.split(":")[1].strip()
+ resource[key] = host_resource
+ except KeyError:
+ # Handle the 5K case
+ try:
+ resource_table = body[0]["TABLE_hosts"]["ROW_hosts"]
+
+ if isinstance(resource_table, dict):
+ resource_table = [resource_table]
+
+ for each in resource_table:
+ key = (
+ str(each["address"]) + "_" + str(each["port"]).strip()
+ )
+ src = each.get("src_intf")
+ host_resource = apply_key_map(host_map_5k, each)
+
+ if src:
+ host_resource["src_intf"] = src
+ if re.search(r"interface:", src):
+ host_resource["src_intf"] = src.split(":")[
+ 1
+ ].strip()
+
+ vrf = each.get("use_vrf_name")
+ if vrf:
+ host_resource["vrf"] = vrf.strip()
+
+ vrf_filt = each.get("TABLE_filter_vrf")
+ if vrf_filt:
+ vrf_filter = vrf_filt["ROW_filter_vrf"][
+ "filter_vrf_name"
+ ].split(",")
+ filters = [vrf.strip() for vrf in vrf_filter]
+ host_resource["vrf_filter"] = filters
+
+ resource[key] = host_resource
+ except (KeyError, AttributeError, TypeError):
+ return resource
+ except (AttributeError, TypeError):
+ return resource
+
+ find = resource.get(host + "_" + udp)
+
+ if find:
+ fix_find = {}
+ for (key, value) in find.items():
+ if isinstance(value, str):
+ fix_find[key] = value.strip()
+ else:
+ fix_find[key] = value
+ return fix_find
+
+ return {}
+
+
+def remove_snmp_host(host, udp, existing):
+ commands = []
+ if existing["version"] == "v3":
+ existing["version"] = "3"
+ command = "no snmp-server host {0} {snmp_type} version \
+ {version} {v3} {community} udp-port {1}".format(
+ host, udp, **existing
+ )
+
+ elif existing["version"] == "v2c":
+ existing["version"] = "2c"
+ command = "no snmp-server host {0} {snmp_type} version \
+ {version} {community} udp-port {1}".format(
+ host, udp, **existing
+ )
+
+ elif existing["version"] == "v1":
+ existing["version"] = "1"
+ command = "no snmp-server host {0} {snmp_type} version \
+ {version} {community} udp-port {1}".format(
+ host, udp, **existing
+ )
+
+ if command:
+ commands.append(command)
+ return commands
+
+
+def remove_vrf(host, udp, proposed, existing):
+ commands = []
+ if existing.get("vrf"):
+ commands.append(
+ "no snmp-server host {0} use-vrf \
+ {1} udp-port {2}".format(
+ host, proposed.get("vrf"), udp
+ )
+ )
+ return commands
+
+
+def remove_filter(host, udp, proposed, existing):
+ commands = []
+ if existing.get("vrf_filter"):
+ if proposed.get("vrf_filter") in existing.get("vrf_filter"):
+ commands.append(
+ "no snmp-server host {0} filter-vrf \
+ {1} udp-port {2}".format(
+ host, proposed.get("vrf_filter"), udp
+ )
+ )
+ return commands
+
+
+def remove_src(host, udp, proposed, existing):
+ commands = []
+ if existing.get("src_intf"):
+ commands.append(
+ "no snmp-server host {0} source-interface \
+ {1} udp-port {2}".format(
+ host, proposed.get("src_intf"), udp
+ )
+ )
+ return commands
+
+
+def config_snmp_host(delta, udp, proposed, existing, module):
+ commands = []
+ command_builder = []
+ host = proposed["snmp_host"]
+ cmd = "snmp-server host {0}".format(proposed["snmp_host"])
+
+ snmp_type = delta.get("snmp_type")
+ version = delta.get("version")
+ ver = delta.get("v3")
+ community = delta.get("community")
+
+ command_builder.append(cmd)
+ if any([snmp_type, version, ver, community]):
+ type_string = snmp_type or existing.get("type")
+ if type_string:
+ command_builder.append(type_string)
+
+ version = version or existing.get("version")
+ if version:
+ if version == "v1":
+ vn = "1"
+ elif version == "v2c":
+ vn = "2c"
+ elif version == "v3":
+ vn = "3"
+
+ version_string = "version {0}".format(vn)
+ command_builder.append(version_string)
+
+ if ver:
+ ver_string = ver or existing.get("v3")
+ command_builder.append(ver_string)
+
+ if community:
+ community_string = community or existing.get("community")
+ command_builder.append(community_string)
+
+ udp_string = " udp-port {0}".format(udp)
+ command_builder.append(udp_string)
+
+ cmd = " ".join(command_builder)
+
+ commands.append(cmd)
+
+ CMDS = {
+ "vrf_filter": "snmp-server host {0} filter-vrf {vrf_filter} udp-port {1}",
+ "vrf": "snmp-server host {0} use-vrf {vrf} udp-port {1}",
+ "src_intf": "snmp-server host {0} source-interface {src_intf} udp-port {1}",
+ }
+
+ for key in delta:
+ command = CMDS.get(key)
+ if command:
+ cmd = command.format(host, udp, **delta)
+ commands.append(cmd)
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ snmp_host=dict(required=True, type="str"),
+ community=dict(type="str"),
+ udp=dict(type="str", default="162"),
+ version=dict(choices=["v1", "v2c", "v3"]),
+ src_intf=dict(type="str"),
+ v3=dict(choices=["noauth", "auth", "priv"]),
+ vrf_filter=dict(type="str"),
+ vrf=dict(type="str"),
+ snmp_type=dict(choices=["trap", "inform"]),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ snmp_host = module.params["snmp_host"]
+ community = module.params["community"]
+ udp = module.params["udp"]
+ version = module.params["version"]
+ src_intf = module.params["src_intf"]
+ v3 = module.params["v3"]
+ vrf_filter = module.params["vrf_filter"]
+ vrf = module.params["vrf"]
+ snmp_type = module.params["snmp_type"]
+ state = module.params["state"]
+
+ existing = get_snmp_host(snmp_host, udp, module)
+
+ if version is None:
+ if existing:
+ version = existing.get("version")
+ else:
+ version = "v1"
+
+ if snmp_type is None:
+ if existing:
+ snmp_type = existing.get("snmp_type")
+ else:
+ snmp_type = "trap"
+
+ if v3 is None:
+ if version == "v3" and existing:
+ v3 = existing.get("v3")
+
+ if snmp_type == "inform" and version == "v1":
+ module.fail_json(msg="inform requires snmp v2c or v3")
+
+ if (version == "v1" or version == "v2c") and v3:
+ module.fail_json(
+ msg='param: "v3" should not be used when '
+ "using version v1 or v2c"
+ )
+
+ if not any([vrf_filter, vrf, src_intf]):
+ if not all([snmp_type, version, community, udp]):
+ module.fail_json(
+ msg="when not configuring options like "
+ "vrf_filter, vrf, and src_intf,"
+ "the following params are required: "
+ "type, version, community"
+ )
+
+ if version == "v3" and v3 is None:
+ module.fail_json(
+ msg="when using version=v3, the param v3 "
+ "(options: auth, noauth, priv) is also required"
+ )
+
+ # existing returns the list of vrfs configured for a given host
+ # checking to see if the proposed is in the list
+ store = existing.get("vrf_filter")
+ if existing and store:
+ if vrf_filter not in existing["vrf_filter"]:
+ existing["vrf_filter"] = None
+ else:
+ existing["vrf_filter"] = vrf_filter
+ commands = []
+
+ args = dict(
+ community=community,
+ snmp_host=snmp_host,
+ udp=udp,
+ version=version,
+ src_intf=src_intf,
+ vrf_filter=vrf_filter,
+ v3=v3,
+ vrf=vrf,
+ snmp_type=snmp_type,
+ )
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+
+ if state == "absent" and existing:
+ if proposed.get("community"):
+ commands.append(remove_snmp_host(snmp_host, udp, existing))
+ else:
+ if proposed.get("src_intf"):
+ commands.append(remove_src(snmp_host, udp, proposed, existing))
+ if proposed.get("vrf"):
+ commands.append(remove_vrf(snmp_host, udp, proposed, existing))
+ if proposed.get("vrf_filter"):
+ commands.append(
+ remove_filter(snmp_host, udp, proposed, existing)
+ )
+
+ elif state == "present":
+ delta = dict(set(proposed.items()).difference(existing.items()))
+ if delta:
+ command = config_snmp_host(delta, udp, proposed, existing, module)
+ commands.append(command)
+
+ cmds = flatten_list(commands)
+ if cmds:
+ results["changed"] = True
+ if not module.check_mode:
+ load_config(module, cmds)
+
+ if "configure" in cmds:
+ cmds.pop(0)
+ results["commands"] = cmds
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_location.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_location.py
new file mode 100644
index 00000000..ed742cbd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_location.py
@@ -0,0 +1,156 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_snmp_location
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages SNMP location information.
+description:
+- Manages SNMP location configuration.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+options:
+ location:
+ description:
+ - Location information.
+ required: true
+ type: str
+ state:
+ description:
+ - Manage the state of the resource.
+ required: false
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+# ensure snmp location is configured
+- cisco.nxos.nxos_snmp_location:
+ location: Test
+ state: present
+
+# ensure snmp location is not configured
+- cisco.nxos.nxos_snmp_location:
+ location: Test
+ state: absent
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["snmp-server location New_Test"]
+"""
+
+
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def execute_show_command(command, module):
+ command = {"command": command, "output": "text"}
+
+ return run_commands(module, command)
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_snmp_location(module):
+ location = {}
+ location_regex = r"^\s*snmp-server\s+location\s+(?P<location>.+)$"
+
+ body = execute_show_command("show run snmp", module)[0]
+ match_location = re.search(location_regex, body, re.M)
+ if match_location:
+ location["location"] = match_location.group("location")
+
+ return location
+
+
+def main():
+ argument_spec = dict(
+ location=dict(required=True, type="str"),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ location = module.params["location"]
+ state = module.params["state"]
+
+ existing = get_snmp_location(module)
+ commands = []
+
+ if state == "absent":
+ if existing and existing["location"] == location:
+ commands.append("no snmp-server location")
+ elif state == "present":
+ if not existing or existing["location"] != location:
+ commands.append("snmp-server location {0}".format(location))
+
+ cmds = flatten_list(commands)
+ if cmds:
+ results["changed"] = True
+ if not module.check_mode:
+ load_config(module, cmds)
+
+ if "configure" in cmds:
+ cmds.pop(0)
+ results["commands"] = cmds
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_traps.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_traps.py
new file mode 100644
index 00000000..c48f6a27
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_traps.py
@@ -0,0 +1,331 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_snmp_traps
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages SNMP traps.
+description:
+- Manages SNMP traps configurations.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- This module works at the group level for traps. If you need to only enable/disable
+ 1 specific trap within a group, use the M(cisco.nxos.nxos_command) module.
+- Be aware that you can set a trap only for an enabled feature.
+options:
+ group:
+ description:
+ - Case sensitive group.
+ required: true
+ choices:
+ - aaa
+ - bfd
+ - bgp
+ - bridge
+ - callhome
+ - cfs
+ - config
+ - eigrp
+ - entity
+ - feature-control
+ - generic
+ - hsrp
+ - license
+ - link
+ - lldp
+ - mmode
+ - ospf
+ - pim
+ - rf
+ - rmon
+ - snmp
+ - storm-control
+ - stpx
+ - switchfabric
+ - syslog
+ - sysmgr
+ - system
+ - upgrade
+ - vtp
+ - all
+ type: str
+ state:
+ description:
+ - Manage the state of the resource.
+ required: false
+ default: enabled
+ choices:
+ - enabled
+ - disabled
+ type: str
+"""
+
+EXAMPLES = """
+# ensure lldp trap configured
+- cisco.nxos.nxos_snmp_traps:
+ group: lldp
+ state: enabled
+
+# ensure lldp trap is not configured
+- cisco.nxos.nxos_snmp_traps:
+ group: lldp
+ state: disabled
+"""
+
+RETURN = """
+commands:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: "snmp-server enable traps lldp ;"
+"""
+
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_capabilities,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def get_platform_id(module):
+ info = get_capabilities(module).get("device_info", {})
+ return info.get("network_os_platform", "")
+
+
+def execute_show_command(command, module):
+ command = {"command": command, "output": "text"}
+
+ return run_commands(module, command)
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_snmp_traps(group, module):
+ body = execute_show_command("show run snmp all", module)[0].split("\n")
+
+ resource = {}
+ feature_list = [
+ "aaa",
+ "bfd",
+ "bgp",
+ "bridge",
+ "callhome",
+ "cfs",
+ "config",
+ "eigrp",
+ "entity",
+ "feature-control",
+ "generic",
+ "hsrp",
+ "license",
+ "link",
+ "lldp",
+ "mmode",
+ "ospf",
+ "pim",
+ "rf",
+ "rmon",
+ "snmp",
+ "storm-control",
+ "stpx",
+ "switchfabric",
+ "syslog",
+ "sysmgr",
+ "system",
+ "upgrade",
+ "vtp",
+ ]
+
+ if "all" in group and "N3K-C35" in get_platform_id(module):
+ module.warn(
+ "Platform does not support bfd traps; bfd ignored for 'group: all' request"
+ )
+ feature_list.remove("bfd")
+
+ for each in feature_list:
+ for line in body:
+ if each == "ospf":
+ # ospf behaves differently when routers are present
+ if "snmp-server enable traps ospf" == line:
+ resource[each] = True
+ break
+ else:
+ if "enable traps {0}".format(each) in line:
+ if "no " in line:
+ resource[each] = False
+ break
+ else:
+ resource[each] = True
+
+ for each in feature_list:
+ if resource.get(each) is None:
+ # on some platforms, the 'no' cmd does not
+ # show up and so check if the feature is enabled
+ body = execute_show_command("show run | inc feature", module)[0]
+ if "feature {0}".format(each) in body:
+ resource[each] = False
+
+ find = resource.get(group, None)
+
+ if group == "all".lower():
+ return resource
+ elif find is not None:
+ trap_resource = {group: find}
+ return trap_resource
+ else:
+ # if 'find' is None, it means that 'group' is a
+ # currently disabled feature.
+ return {}
+
+
+def get_trap_commands(group, state, existing, module):
+ commands = []
+ enabled = False
+ disabled = False
+
+ if group == "all":
+ if state == "disabled":
+ for feature in existing:
+ if existing[feature]:
+ trap_command = "no snmp-server enable traps {0}".format(
+ feature
+ )
+ commands.append(trap_command)
+
+ elif state == "enabled":
+ for feature in existing:
+ if existing[feature] is False:
+ trap_command = "snmp-server enable traps {0}".format(
+ feature
+ )
+ commands.append(trap_command)
+
+ else:
+ if group in existing:
+ if existing[group]:
+ enabled = True
+ else:
+ disabled = True
+
+ if state == "disabled" and enabled:
+ commands.append(
+ ["no snmp-server enable traps {0}".format(group)]
+ )
+ elif state == "enabled" and disabled:
+ commands.append(["snmp-server enable traps {0}".format(group)])
+ else:
+ module.fail_json(
+ msg="{0} is not a currently " "enabled feature.".format(group)
+ )
+
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ state=dict(choices=["enabled", "disabled"], default="enabled"),
+ group=dict(
+ choices=[
+ "aaa",
+ "bfd",
+ "bgp",
+ "bridge",
+ "callhome",
+ "cfs",
+ "config",
+ "eigrp",
+ "entity",
+ "feature-control",
+ "generic",
+ "hsrp",
+ "license",
+ "link",
+ "lldp",
+ "mmode",
+ "ospf",
+ "pim",
+ "rf",
+ "rmon",
+ "snmp",
+ "storm-control",
+ "stpx",
+ "switchfabric",
+ "syslog",
+ "sysmgr",
+ "system",
+ "upgrade",
+ "vtp",
+ "all",
+ ],
+ required=True,
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ group = module.params["group"].lower()
+ state = module.params["state"]
+
+ existing = get_snmp_traps(group, module)
+
+ commands = get_trap_commands(group, state, existing, module)
+ cmds = flatten_list(commands)
+ if cmds:
+ results["changed"] = True
+ if not module.check_mode:
+ load_config(module, cmds)
+
+ if "configure" in cmds:
+ cmds.pop(0)
+ results["commands"] = cmds
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_user.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_user.py
new file mode 100644
index 00000000..32235eb7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_snmp_user.py
@@ -0,0 +1,413 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_snmp_user
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages SNMP users for monitoring.
+description:
+- Manages SNMP user configuration.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- Authentication parameters not idempotent.
+options:
+ user:
+ description:
+ - Name of the user.
+ required: true
+ type: str
+ group:
+ description:
+ - Group to which the user will belong to. If state = present, and the user is
+ existing, the group is added to the user. If the user is not existing, user
+ entry is created with this group argument. If state = absent, only the group
+ is removed from the user entry. However, to maintain backward compatibility,
+ if the existing user belongs to only one group, and if group argument is same
+ as the existing user's group, then the user entry also is deleted.
+ type: str
+ authentication:
+ description:
+ - Authentication parameters for the user.
+ choices:
+ - md5
+ - sha
+ type: str
+ pwd:
+ description:
+ - Authentication password when using md5 or sha. This is not idempotent
+ type: str
+ privacy:
+ description:
+ - Privacy password for the user. This is not idempotent
+ type: str
+ encrypt:
+ description:
+ - Enables AES-128 bit encryption when using privacy password.
+ type: bool
+ state:
+ description:
+ - Manage the state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+- cisco.nxos.nxos_snmp_user:
+ user: ntc
+ group: network-operator
+ authentication: md5
+ pwd: test_password
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["snmp-server user ntc network-operator auth md5 test_password"]
+"""
+
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def execute_show_command(command, module, text=False):
+ command = {"command": command, "output": "json"}
+ if text:
+ command["output"] = "text"
+
+ return run_commands(module, command)
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_snmp_groups(module):
+ data = execute_show_command("show snmp group", module)[0]
+ group_list = []
+
+ try:
+ group_table = data["TABLE_role"]["ROW_role"]
+ for group in group_table:
+ group_list.append(group["role_name"])
+ except (KeyError, AttributeError):
+ return group_list
+
+ return group_list
+
+
+def get_snmp_user(user, module):
+ command = "show snmp user {0}".format(user)
+ body = execute_show_command(command, module, text=True)
+ body_text = body[0]
+
+ if "No such entry" not in body[0]:
+ body = execute_show_command(command, module)
+
+ resource = {}
+ try:
+ # The TABLE and ROW keys differ between NXOS platforms.
+ if body[0].get("TABLE_snmp_user"):
+ tablekey = "TABLE_snmp_user"
+ rowkey = "ROW_snmp_user"
+ tablegrpkey = "TABLE_snmp_group_names"
+ rowgrpkey = "ROW_snmp_group_names"
+ authkey = "auth_protocol"
+ privkey = "priv_protocol"
+ grpkey = "group_names"
+ elif body[0].get("TABLE_snmp_users"):
+ tablekey = "TABLE_snmp_users"
+ rowkey = "ROW_snmp_users"
+ tablegrpkey = "TABLE_groups"
+ rowgrpkey = "ROW_groups"
+ authkey = "auth"
+ privkey = "priv"
+ grpkey = "group"
+
+ rt = body[0][tablekey][rowkey]
+ # on some older platforms, all groups except the 1st one
+ # are in list elements by themselves and they are
+ # indexed by 'user'. This is due to a platform bug.
+ # Get first element if rt is a list due to the bug
+ # or if there is no bug, parse rt directly
+ if isinstance(rt, list):
+ resource_table = rt[0]
+ else:
+ resource_table = rt
+
+ resource["user"] = user
+ resource["authentication"] = str(resource_table[authkey]).strip()
+ encrypt = str(resource_table[privkey]).strip()
+ if encrypt.startswith("aes"):
+ resource["encrypt"] = "aes-128"
+ else:
+ resource["encrypt"] = "none"
+
+ groups = []
+ if tablegrpkey in resource_table:
+ group_table = resource_table[tablegrpkey][rowgrpkey]
+ try:
+ for group in group_table:
+ groups.append(str(group[grpkey]).strip())
+ except TypeError:
+ groups.append(str(group_table[grpkey]).strip())
+
+ # Now for the platform bug case, get the groups
+ if isinstance(rt, list):
+ # remove 1st element from the list as this is parsed already
+ rt.pop(0)
+ # iterate through other elements indexed by
+ # 'user' and add it to groups.
+ for each in rt:
+ groups.append(each["user"].strip())
+
+ # Some 'F' platforms use 'group' key instead
+ elif "group" in resource_table:
+ # single group is a string, multiple groups in a list
+ groups = resource_table["group"]
+ if isinstance(groups, str):
+ groups = [groups]
+
+ resource["group"] = groups
+
+ except (KeyError, AttributeError, IndexError, TypeError):
+ if not resource and body_text and "No such entry" not in body_text:
+ # 6K and other platforms may not return structured output;
+ # attempt to get state from text output
+ resource = get_non_structured_snmp_user(body_text)
+
+ return resource
+
+
+def get_non_structured_snmp_user(body_text):
+ # This method is a workaround for platforms that don't support structured
+ # output for 'show snmp user <foo>'. This workaround may not work on all
+ # platforms. Sample non-struct output:
+ #
+ # User Auth Priv(enforce) Groups acl_filter
+ # ____ ____ _____________ ______ __________
+ # sample1 no no network-admin ipv4:my_acl
+ # network-operator
+ # priv-11
+ # -OR-
+ # sample2 md5 des(no) priv-15
+ # -OR-
+ # sample3 md5 aes-128(no) network-admin
+ resource = {}
+ output = body_text.rsplit("__________")[-1]
+ pat = re.compile(
+ r"^(?P<user>\S+)\s+"
+ r"(?P<auth>\S+)\s+"
+ r"(?P<priv>[\w\d-]+)(?P<enforce>\([\w\d-]+\))*\s+"
+ r"(?P<group>\S+)",
+ re.M,
+ )
+ m = re.search(pat, output)
+ if not m:
+ return resource
+ resource["user"] = m.group("user")
+ resource["auth"] = m.group("auth")
+ resource["encrypt"] = (
+ "aes-128" if "aes" in str(m.group("priv")) else "none"
+ )
+
+ resource["group"] = [m.group("group")]
+ more_groups = re.findall(r"^\s+([\w\d-]+)\s*$", output, re.M)
+ if more_groups:
+ resource["group"] += more_groups
+
+ return resource
+
+
+def remove_snmp_user(user, group=None):
+ if group:
+ return ["no snmp-server user {0} {1}".format(user, group)]
+ else:
+ return ["no snmp-server user {0}".format(user)]
+
+
+def config_snmp_user(proposed, user, reset):
+ if reset:
+ commands = remove_snmp_user(user)
+ else:
+ commands = []
+
+ if proposed.get("group"):
+ cmd = "snmp-server user {0} {group}".format(user, **proposed)
+ else:
+ cmd = "snmp-server user {0}".format(user)
+
+ auth = proposed.get("authentication", None)
+ pwd = proposed.get("pwd", None)
+
+ if auth and pwd:
+ cmd += " auth {authentication} {pwd}".format(**proposed)
+
+ encrypt = proposed.get("encrypt", None)
+ privacy = proposed.get("privacy", None)
+
+ if encrypt and privacy:
+ cmd += " priv {encrypt} {privacy}".format(**proposed)
+ elif privacy:
+ cmd += " priv {privacy}".format(**proposed)
+
+ if cmd:
+ commands.append(cmd)
+
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ user=dict(required=True, type="str"),
+ group=dict(type="str"),
+ pwd=dict(type="str", no_log=True),
+ privacy=dict(type="str"),
+ authentication=dict(choices=["md5", "sha"]),
+ encrypt=dict(type="bool"),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_together=[["authentication", "pwd"], ["encrypt", "privacy"]],
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ user = module.params["user"]
+ group = module.params["group"]
+ pwd = module.params["pwd"]
+ privacy = module.params["privacy"]
+ encrypt = module.params["encrypt"]
+ authentication = module.params["authentication"]
+ state = module.params["state"]
+
+ if privacy and encrypt:
+ if not pwd and authentication:
+ module.fail_json(
+ msg="pwd and authentication must be provided "
+ "when using privacy and encrypt"
+ )
+
+ if group and group not in get_snmp_groups(module):
+ module.fail_json(msg="group not configured yet on switch.")
+
+ existing = get_snmp_user(user, module)
+
+ if state == "present" and existing:
+ if group:
+ if group not in existing["group"]:
+ existing["group"] = None
+ else:
+ existing["group"] = group
+ else:
+ existing["group"] = None
+
+ commands = []
+
+ if state == "absent" and existing:
+ if group:
+ if group in existing["group"]:
+ if len(existing["group"]) == 1:
+ commands.append(remove_snmp_user(user))
+ else:
+ commands.append(remove_snmp_user(user, group))
+ else:
+ commands.append(remove_snmp_user(user))
+
+ elif state == "present":
+ reset = False
+
+ args = dict(
+ user=user,
+ pwd=pwd,
+ group=group,
+ privacy=privacy,
+ encrypt=encrypt,
+ authentication=authentication,
+ )
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+
+ if not existing:
+ if encrypt:
+ proposed["encrypt"] = "aes-128"
+ commands.append(config_snmp_user(proposed, user, reset))
+
+ elif existing:
+ if encrypt and not existing["encrypt"].startswith("aes"):
+ reset = True
+ proposed["encrypt"] = "aes-128"
+
+ delta = dict(set(proposed.items()).difference(existing.items()))
+
+ if delta.get("pwd"):
+ delta["authentication"] = authentication
+
+ if delta and encrypt:
+ delta["encrypt"] = "aes-128"
+
+ if delta:
+ command = config_snmp_user(delta, user, reset)
+ commands.append(command)
+
+ cmds = flatten_list(commands)
+ if cmds:
+ results["changed"] = True
+ if not module.check_mode:
+ load_config(module, cmds)
+
+ if "configure" in cmds:
+ cmds.pop(0)
+ results["commands"] = cmds
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_static_route.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_static_route.py
new file mode 100644
index 00000000..595a22b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_static_route.py
@@ -0,0 +1,383 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_static_route
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2022-06-01) Manages static
+ route configuration
+description:
+- Manages static route configuration
+version_added: 1.0.0
+deprecated:
+ alternative: nxos_static_routes
+ why: Updated modules released with more functionality
+ removed_at_date: '2022-06-01'
+author: Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- If no vrf is supplied, vrf is set to default.
+- If C(state=absent), the route will be removed, regardless of the non-required parameters.
+options:
+ prefix:
+ description:
+ - Destination prefix of static route.
+ aliases:
+ - address
+ type: str
+ next_hop:
+ description:
+ - Next hop address or interface of static route. If interface, it must be the
+ fully-qualified interface name.
+ type: str
+ vrf:
+ description:
+ - VRF for static route.
+ default: default
+ type: str
+ tag:
+ description:
+ - Route tag value (numeric) or keyword 'default'.
+ type: str
+ route_name:
+ description:
+ - Name of the route or keyword 'default'. Used with the name parameter on the
+ CLI.
+ type: str
+ pref:
+ description:
+ - Preference or administrative difference of route (range 1-255) or keyword 'default'.
+ aliases:
+ - admin_distance
+ type: str
+ aggregate:
+ description: List of static route definitions
+ type: list
+ elements: dict
+ suboptions:
+ prefix:
+ description:
+ - Destination prefix of static route.
+ required: True
+ type: str
+ next_hop:
+ description:
+ - Next hop address or interface of static route. If interface, it must be the
+ fully-qualified interface name.
+ required: true
+ type: str
+ vrf:
+ description:
+ - VRF for static route.
+ type: str
+ tag:
+ description:
+ - Route tag value (numeric) or keyword 'default'.
+ type: str
+ route_name:
+ description:
+ - Name of the route or keyword 'default'. Used with the name parameter on the
+ CLI.
+ type: str
+ pref:
+ description:
+ - Preference or administrative difference of route (range 1-255) or keyword 'default'.
+ aliases:
+ - admin_distance
+ type: str
+ track:
+ description:
+ - Track value (range 1 - 512). Track must already be configured on the device
+ before adding the route.
+ type: int
+ state:
+ description:
+ - Manage the state of the resource.
+ choices:
+ - present
+ - absent
+ type: str
+ track:
+ description:
+ - Track value (range 1 - 512). Track must already be configured on the device
+ before adding the route.
+ type: int
+ state:
+ description:
+ - Manage the state of the resource.
+ choices:
+ - present
+ - absent
+ default: present
+ type: str
+"""
+
+EXAMPLES = """
+- cisco.nxos.nxos_static_route:
+ prefix: 192.168.20.64/24
+ next_hop: 192.0.2.3
+ route_name: testing
+ pref: 100
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["ip route 192.168.20.0/24 192.0.2.3 name testing 100"]
+"""
+import re
+from copy import deepcopy
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+
+
+def reconcile_candidate(module, candidate, prefix, want):
+ state, vrf = want["state"], want["vrf"]
+ if vrf == "default":
+ parents = []
+ flags = " | include '^ip route'"
+ else:
+ parents = ["vrf context {0}".format(vrf)]
+ flags = " | section '{0}' | include '^ ip route'".format(parents[0])
+
+ # Find existing routes in this vrf/default
+ netcfg = CustomNetworkConfig(
+ indent=2, contents=get_config(module, flags=[flags])
+ )
+ routes = str(netcfg).split("\n")
+ # strip whitespace from route strings
+ routes = [i.strip() for i in routes]
+
+ prefix_and_nh = "ip route {0} {1}".format(prefix, want["next_hop"])
+ existing = [i for i in routes if i.startswith(prefix_and_nh)]
+ proposed = set_route_command(prefix, want, module)
+
+ commands = []
+ if state == "absent" and existing:
+ commands = ["no " + existing[0]]
+ elif state == "present" and proposed not in routes:
+ if existing:
+ commands = ["no " + existing[0]]
+ commands.append(proposed)
+
+ if commands:
+ candidate.add(commands, parents=parents)
+
+
+def get_configured_track(module, ctrack):
+ check_track = "{0}".format(ctrack)
+ track_exists = False
+ command = "show track"
+ try:
+ body = run_commands(module, {"command": command, "output": "text"})
+ match = re.findall(r"Track\s+(\d+)", body[0])
+ except IndexError:
+ return None
+ if check_track in match:
+ track_exists = True
+ return track_exists
+
+
+def set_route_command(prefix, w, module):
+ route_cmd = "ip route {0} {1}".format(prefix, w["next_hop"])
+
+ if w["track"]:
+ if w["track"] in range(1, 512):
+ if get_configured_track(module, w["track"]):
+ route_cmd += " track {0}".format(w["track"])
+ else:
+ module.fail_json(
+ msg="Track {0} not configured on device".format(w["track"])
+ )
+ else:
+ module.fail_json(msg="Invalid track number, valid range is 1-512.")
+ if w["route_name"] and w["route_name"] != "default":
+ route_cmd += " name {0}".format(w["route_name"])
+ if w["tag"]:
+ if w["tag"] != "default" and w["tag"] != "0":
+ route_cmd += " tag {0}".format(w["tag"])
+ if w["pref"] and w["pref"] != "default":
+ route_cmd += " {0}".format(w["pref"])
+
+ return route_cmd
+
+
+def get_dotted_mask(mask):
+ bits = 0
+ for i in range(32 - mask, 32):
+ bits |= 1 << i
+ mask = "%d.%d.%d.%d" % (
+ (bits & 0xFF000000) >> 24,
+ (bits & 0xFF0000) >> 16,
+ (bits & 0xFF00) >> 8,
+ (bits & 0xFF),
+ )
+ return mask
+
+
+def get_network_start(address, netmask):
+ address = address.split(".")
+ netmask = netmask.split(".")
+ return [str(int(address[x]) & int(netmask[x])) for x in range(0, 4)]
+
+
+def network_from_string(address, mask, module):
+ octects = address.split(".")
+
+ if len(octects) > 4:
+ module.fail_json(msg="Incorrect address format.", address=address)
+
+ for octect in octects:
+ try:
+ if int(octect) < 0 or int(octect) > 255:
+ module.fail_json(
+ msg="Address may contain invalid values.", address=address
+ )
+ except ValueError:
+ module.fail_json(
+ msg="Address may contain non-integer values.", address=address
+ )
+
+ try:
+ if int(mask) < 0 or int(mask) > 32:
+ module.fail_json(msg="Incorrect mask value.", mask=mask)
+ except ValueError:
+ module.fail_json(msg="Mask may contain non-integer values.", mask=mask)
+
+ netmask = get_dotted_mask(int(mask))
+ return ".".join(get_network_start(address, netmask))
+
+
+def normalize_prefix(module, prefix):
+ splitted_prefix = prefix.split("/")
+
+ address = splitted_prefix[0]
+ if len(splitted_prefix) > 2:
+ module.fail_json(msg="Incorrect address format.", address=address)
+ elif len(splitted_prefix) == 2:
+ mask = splitted_prefix[1]
+ network = network_from_string(address, mask, module)
+
+ normalized_prefix = str(network) + "/" + str(mask)
+ else:
+ normalized_prefix = prefix + "/" + str(32)
+
+ return normalized_prefix
+
+
+def map_params_to_obj(module):
+ obj = []
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+
+ d = item.copy()
+ obj.append(d)
+ else:
+ obj.append(
+ {
+ "prefix": module.params["prefix"],
+ "next_hop": module.params["next_hop"],
+ "vrf": module.params["vrf"],
+ "tag": module.params["tag"],
+ "route_name": module.params["route_name"],
+ "pref": module.params["pref"],
+ "state": module.params["state"],
+ "track": module.params["track"],
+ }
+ )
+
+ return obj
+
+
+def main():
+ element_spec = dict(
+ prefix=dict(type="str", aliases=["address"]),
+ next_hop=dict(type="str"),
+ vrf=dict(type="str", default="default"),
+ tag=dict(type="str"),
+ route_name=dict(type="str"),
+ pref=dict(type="str", aliases=["admin_distance"]),
+ state=dict(choices=["absent", "present"], default="present"),
+ track=dict(type="int"),
+ )
+
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["prefix"] = dict(required=True)
+ aggregate_spec["next_hop"] = dict(required=True)
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec)
+ )
+
+ argument_spec.update(element_spec)
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ result = {"changed": False, "commands": []}
+ if warnings:
+ result["warnings"] = warnings
+
+ want = map_params_to_obj(module)
+ for w in want:
+ prefix = normalize_prefix(module, w["prefix"])
+ candidate = CustomNetworkConfig(indent=3)
+ reconcile_candidate(module, candidate, prefix, w)
+
+ if not module.check_mode and candidate:
+ candidate = candidate.items_text()
+ load_config(module, candidate)
+ result["commands"].extend(candidate)
+ result["changed"] = True
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_static_routes.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_static_routes.py
new file mode 100644
index 00000000..8117eb39
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_static_routes.py
@@ -0,0 +1,476 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+"""
+The module file for nxos_static_routes
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_static_routes
+short_description: Static routes resource module
+description: This module configures and manages the attributes of static routes on
+ Cisco NX-OS platforms.
+version_added: 1.0.0
+author: Adharsh Srivats Rangarajan (@adharshsrivatsr)
+notes:
+- Tested against NX-OS 7.3.(0)D1(1) on VIRL
+- When a route is configured for a non-existent VRF, the VRF is created and the route
+ is added to it.
+- When deleting routes for a VRF, all routes inside the VRF are deleted, but the VRF
+ is not deleted.
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the following commands in order B(show running-config | include
+ '^ip(v6)* route') and B(show running-config | section '^vrf context').
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description:
+ - A list of configurations for static routes
+ type: list
+ elements: dict
+ suboptions:
+ vrf:
+ description:
+ - The VRF to which the static route(s) belong
+ type: str
+ address_families:
+ description: A dictionary specifying the address family to which the static
+ route(s) belong.
+ type: list
+ elements: dict
+ suboptions:
+ afi:
+ description:
+ - Specifies the top level address family indicator.
+ type: str
+ choices: [ipv4, ipv6]
+ required: true
+ routes:
+ description: A dictionary that specifies the static route configurations
+ elements: dict
+ type: list
+ suboptions:
+ dest:
+ description:
+ - Destination prefix of static route
+ - The address format is <ipv4/v6 address>/<mask>
+ - The mask is number in range 0-32 for IPv4 and in range 0-128 for
+ IPv6
+ type: str
+ required: true
+ next_hops:
+ description:
+ - Details of route to be taken
+ type: list
+ elements: dict
+ suboptions:
+ forward_router_address:
+ description:
+ - IP address of the next hop router
+ type: str
+ # required: True
+ interface:
+ description:
+ - Outgoing interface to take. For anything except 'Null0', then
+ next hop IP address should also be configured.
+ type: str
+ admin_distance:
+ description:
+ - Preference or administrative distance of route (range 1-255)
+ type: int
+ route_name:
+ description:
+ - Name of the static route
+ type: str
+ tag:
+ description:
+ - Route tag value (numeric)
+ type: int
+ track:
+ description:
+ - Track value (range 1 - 512). Track must already be configured
+ on the device before adding the route.
+ type: int
+ dest_vrf:
+ description:
+ - VRF of the destination
+ type: str
+ state:
+ description:
+ - The state the configuration should be left in
+ type: str
+ choices:
+ - deleted
+ - merged
+ - overridden
+ - replaced
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using deleted:
+
+# Before state:
+# -------------
+#
+# ip route 192.0.2.32/28 192.0.2.12 name new_route
+# ip route 192.0.2.26/24 192.0.2.13 tag 12
+
+- name: Delete all routes
+ cisco.nxos.nxos_static_routes:
+ state: deleted
+
+# After state:
+# ------------
+#
+
+
+# Before state:
+# ------------
+#
+# ip route 192.0.2.16/28 192.0.2.24 name new_route
+# ip route 192.0.2.80/28 192.0.2.26 tag 12
+# vrf context trial_vrf
+# ip route 192.0.2.64/28 192.0.2.22 tag 4
+# ip route 192.0.2.64/28 192.0.2.23 name merged_route 1
+# ipv6 route 2200:10::/36 2048:ae12::1 vrf dest 5
+
+- name: Delete routes based on VRF
+ cisco.nxos.nxos_static_routes:
+ config:
+ - vrf: trial_vrf
+ state: deleted
+
+# After state:
+# -----------
+# ip route 192.0.2.16/28 192.0.2.24 name new_route
+# ip route 192.0.2.80/28 192.0.2.26 tag 12
+# vrf context trial_vrf
+
+
+# Before state:
+# ------------
+#
+# ip route 192.0.2.16/28 192.0.2.24 name new_route
+# ip route 192.0.2.80/28 192.0.2.26 tag 12
+# vrf context trial_vrf
+# ip route 192.0.2.64/28 192.0.2.22 tag 4
+# ip route 192.0.2.64/28 192.0.2.23 name merged_route 1
+# ipv6 route 2200:10::/36 2048:ae12::1 vrf dest 5
+
+- name: Delete routes based on AFI in a VRF
+ cisco.nxos.nxos_static_routes:
+ config:
+ - vrf: trial_vrf
+ address_families:
+ - afi: ipv4
+ state: deleted
+
+# After state:
+# -----------
+# ip route 192.0.2.16/28 192.0.2.24 name new_route
+# ip route 192.0.2.80/28 192.0.2.26 tag 12
+# vrf context trial_vrf
+# ipv6 route 2200:10::/36 2048:ae12::1 vrf dest 5
+
+
+# Before state:
+# -----------
+# ip route 192.0.2.16/28 192.0.2.24 name new_route
+# vrf context trial_vrf
+# ipv6 route 2200:10::/36 2048:ae12::1 vrf dest 5
+
+
+# Using merged
+
+# Before state:
+# -------------
+#
+
+- name: Merge new static route configuration
+ cisco.nxos.nxos_static_routes:
+ config:
+ - vrf: trial_vrf
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.64/24
+ next_hops:
+ - forward_router_address: 192.0.2.22
+ tag: 4
+ admin_distance: 2
+
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/24
+ next_hops:
+ - forward_router_address: 192.0.2.24
+ route_name: new_route
+ - afi: ipv6
+ routes:
+ - dest: 2001:db8::/64
+ next_hops:
+ - interface: eth1/3
+ forward_router_address: 2001:db8::12
+ state: merged
+
+# After state:
+# ------------
+#
+# ip route 192.0.2.16/24 192.0.2.24 name new_route
+# ipv6 route 2001:db8::/64 Ethernet1/3 2001:db8::12
+# vrf context trial_vrf
+# ip route 192.0.2.0/24 192.0.2.22 tag 4 2
+
+
+# Using overridden:
+
+# Before state:
+# -------------
+#
+# ip route 192.0.2.16/28 192.0.2.24 name new_route
+# ip route 192.0.2.80/28 192.0.2.26 tag 12
+# vrf context trial_vrf
+# ip route 192.0.2.64/28 192.0.2.22 tag 4
+# ip route 192.0.2.64/28 192.0.2.23 name merged_route 1
+
+- name: Overriden existing static route configuration with new configuration
+ cisco.nxos.nxos_static_routes:
+ config:
+ - vrf: trial_vrf
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - forward_router_address: 192.0.2.23
+ route_name: overridden_route1
+ admin_distance: 3
+
+ - forward_router_address: 192.0.2.45
+ route_name: overridden_route2
+ dest_vrf: destinationVRF
+ interface: Ethernet1/2
+ state: overridden
+
+# After state:
+# ------------
+#
+# ip route 192.0.2.16/28 192.0.2.23 name replaced_route1 3
+# ip route 192.0.2.16/28 Ethernet1/2 192.0.2.45 vrf destinationVRF name replaced_route2
+
+
+# Using replaced:
+
+# Before state:
+# ------------
+# ip route 192.0.2.16/28 192.0.2.24 name new_route
+# ip route 192.0.2.80/28 192.0.2.26 tag 12
+# vrf context trial_vrf
+# ip route 192.0.2.64/28 192.0.2.22 tag 4
+# ip route 192.0.2.64/28 192.0.2.23 name merged_route 1
+
+- name: Replaced the existing static configuration of a prefix with new configuration
+ cisco.nxos.nxos_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - forward_router_address: 192.0.2.23
+ route_name: replaced_route1
+ admin_distance: 3
+
+ - forward_router_address: 192.0.2.45
+ route_name: replaced_route2
+ dest_vrf: destinationVRF
+ interface: Ethernet1/2
+ state: replaced
+
+# After state:
+# -----------
+# ip route 192.0.2.16/28 192.0.2.23 name replaced_route1 3
+# ip route 192.0.2.16/28 Ethernet1/2 192.0.2.45 vrf destinationVRF name replaced_route2
+# ip route 192.0.2.80/28 192.0.2.26 tag 12
+# vrf context trial_vrf
+# ip route 192.0.2.64/28 192.0.2.22 tag 4
+# ip route 192.0.2.64/28 192.0.2.23 name merged_route 1
+
+
+# Using gathered:
+
+# Before state:
+# -------------
+# ipv6 route 2001:db8:12::/32 2001:db8::12
+# vrf context Test
+# ip route 192.0.2.48/28 192.0.2.13
+# ip route 192.0.2.48/28 192.0.2.14 5
+
+- name: Gather the exisitng condiguration
+ cisco.nxos.nxos_static_routes:
+ state: gathered
+
+# returns:
+# gathered:
+# - vrf: Test
+# address_families:
+# - afi: ipv4
+# routes:
+# - dest: 192.0.2.48/28
+# next_hops:
+# - forward_router_address: 192.0.2.13
+#
+# - forward_router_address: 192.0.2.14
+# admin_distance: 5
+#
+# - address_families:
+# - afi: ipv6
+# routes:
+# - dest: 2001:db8:12::/32
+# next_hops:
+# - forward_router_address: 2001:db8::12
+
+
+# Using rendered:
+
+- name: Render required configuration to be pushed to the device
+ cisco.nxos.nxos_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.48/28
+ next_hops:
+ - forward_router_address: 192.0.2.13
+
+ - afi: ipv6
+ routes:
+ - dest: 2001:db8::/64
+ next_hops:
+ - interface: eth1/3
+ forward_router_address: 2001:db8::12
+ state: rendered
+
+# returns
+# rendered:
+# vrf context default
+# ip route 192.0.2.48/28 192.0.2.13
+# ipv6 route 2001:db8::/64 Ethernet1/3 2001:db8::12
+
+
+# Using parsed
+
+- name: Parse the config to structured data
+ cisco.nxos.nxos_static_routes:
+ running_config: |
+ ipv6 route 2002:db8:12::/32 2002:db8:12::1
+ vrf context Test
+ ip route 192.0.2.48/28 192.0.2.13
+ ip route 192.0.2.48/28 192.0.2.14 5
+
+# returns:
+# parsed:
+# - vrf: Test
+# address_families:
+# - afi: ipv4
+# routes:
+# - dest: 192.0.2.48/28
+# next_hops:
+# - forward_router_address: 192.0.2.13
+#
+# - forward_router_address: 192.0.2.14
+# admin_distance: 5
+#
+# - address_families:
+# - afi: ipv6
+# routes:
+# - dest: 2002:db8:12::/32
+# next_hops:
+# - forward_router_address: 2002:db8:12::1
+
+
+"""
+RETURN = """
+before:
+ description: The configuration prior to the model invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The resulting configuration model invocation.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['ip route 192.0.2.48/28 192.0.2.12 Ethernet1/2 name sample_route',
+ 'ipv6 route 2001:db8:3000::/36 2001:db8:200:2::2', 'vrf context test','ip route 192.0.2.48/28 192.0.2.121']
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.static_routes.static_routes import (
+ Static_routesArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.static_routes.static_routes import (
+ Static_routes,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ module = AnsibleModule(
+ argument_spec=Static_routesArgs.argument_spec, supports_check_mode=True
+ )
+
+ result = Static_routes(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_system.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_system.py
new file mode 100644
index 00000000..0ab78d3e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_system.py
@@ -0,0 +1,402 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_system
+extends_documentation_fragment:
+- cisco.nxos.nxos
+author: Peter Sprygada (@privateip)
+short_description: Manage the system attributes on Cisco NXOS devices
+description:
+- This module provides declarative management of node system attributes on Cisco NXOS
+ devices. It provides an option to configure host system parameters or remove those
+ parameters from the device active configuration.
+version_added: 1.0.0
+options:
+ hostname:
+ description:
+ - Configure the device hostname parameter. This option takes an ASCII string value
+ or keyword 'default'
+ type: str
+ domain_name:
+ description:
+ - Configures the default domain name suffix to be used when referencing this node
+ by its FQDN. This argument accepts either a list of domain names or a list
+ of dicts that configure the domain name and VRF name or keyword 'default'. See
+ examples.
+ type: list
+ elements: raw
+ domain_lookup:
+ description:
+ - Enables or disables the DNS lookup feature in Cisco NXOS. This argument accepts
+ boolean values. When enabled, the system will try to resolve hostnames using
+ DNS and when disabled, hostnames will not be resolved.
+ type: bool
+ domain_search:
+ description:
+ - Configures a list of domain name suffixes to search when performing DNS name
+ resolution. This argument accepts either a list of domain names or a list of
+ dicts that configure the domain name and VRF name or keyword 'default'. See
+ examples.
+ type: list
+ elements: raw
+ name_servers:
+ description:
+ - List of DNS name servers by IP address to use to perform name resolution lookups. This
+ argument accepts either a list of DNS servers or a list of hashes that configure
+ the name server and VRF name or keyword 'default'. See examples.
+ type: list
+ elements: raw
+ system_mtu:
+ description:
+ - Specifies the mtu, must be an integer or keyword 'default'.
+ type: str
+ state:
+ description:
+ - State of the configuration values in the device's current active configuration. When
+ set to I(present), the values should be configured in the device active configuration
+ and when set to I(absent) the values should not be in the device active configuration
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+- name: configure hostname and domain-name
+ cisco.nxos.nxos_system:
+ hostname: nxos01
+ domain_name: test.example.com
+
+- name: remove configuration
+ cisco.nxos.nxos_system:
+ state: absent
+
+- name: configure name servers
+ cisco.nxos.nxos_system:
+ name_servers:
+ - 8.8.8.8
+ - 8.8.4.4
+
+- name: configure name servers with VRF support
+ cisco.nxos.nxos_system:
+ name_servers:
+ - {server: 8.8.8.8, vrf: mgmt}
+ - {server: 8.8.4.4, vrf: mgmt}
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - hostname nxos01
+ - ip domain-name test.example.com
+"""
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ ComplexList,
+)
+
+_CONFIGURED_VRFS = None
+
+
+def has_vrf(module, vrf):
+ global _CONFIGURED_VRFS
+ if _CONFIGURED_VRFS is not None:
+ return vrf in _CONFIGURED_VRFS
+ config = get_config(module)
+ _CONFIGURED_VRFS = re.findall(r"vrf context (\S+)", config)
+ return vrf in _CONFIGURED_VRFS
+
+
+def map_obj_to_commands(want, have, module):
+ commands = list()
+ state = module.params["state"]
+
+ def needs_update(x):
+ return want.get(x) and (want.get(x) != have.get(x))
+
+ def difference(x, y, z):
+ return [item for item in x[z] if item not in y[z]]
+
+ def remove(cmd, commands, vrf=None):
+ if vrf:
+ commands.append("vrf context %s" % vrf)
+ commands.append(cmd)
+ if vrf:
+ commands.append("exit")
+
+ def add(cmd, commands, vrf=None):
+ if vrf:
+ if not has_vrf(module, vrf):
+ module.fail_json(msg="invalid vrf name %s" % vrf)
+ return remove(cmd, commands, vrf)
+
+ if state == "absent":
+ if have["hostname"]:
+ commands.append("no hostname")
+
+ for item in have["domain_name"]:
+ cmd = "no ip domain-name %s" % item["name"]
+ remove(cmd, commands, item["vrf"])
+
+ for item in have["domain_search"]:
+ cmd = "no ip domain-list %s" % item["name"]
+ remove(cmd, commands, item["vrf"])
+
+ for item in have["name_servers"]:
+ cmd = "no ip name-server %s" % item["server"]
+ remove(cmd, commands, item["vrf"])
+
+ if have["system_mtu"]:
+ commands.append("no system jumbomtu")
+
+ if state == "present":
+ if needs_update("hostname"):
+ if want["hostname"] == "default":
+ if have["hostname"]:
+ commands.append("no hostname")
+ else:
+ commands.append("hostname %s" % want["hostname"])
+
+ if want.get("domain_lookup") is not None:
+ if have.get("domain_lookup") != want.get("domain_lookup"):
+ cmd = "ip domain-lookup"
+ if want["domain_lookup"] is False:
+ cmd = "no %s" % cmd
+ commands.append(cmd)
+
+ if want["domain_name"]:
+ if want.get("domain_name")[0]["name"] == "default":
+ if have["domain_name"]:
+ for item in have["domain_name"]:
+ cmd = "no ip domain-name %s" % item["name"]
+ remove(cmd, commands, item["vrf"])
+ else:
+ for item in difference(have, want, "domain_name"):
+ cmd = "no ip domain-name %s" % item["name"]
+ remove(cmd, commands, item["vrf"])
+ for item in difference(want, have, "domain_name"):
+ cmd = "ip domain-name %s" % item["name"]
+ add(cmd, commands, item["vrf"])
+
+ if want["domain_search"]:
+ if want.get("domain_search")[0]["name"] == "default":
+ if have["domain_search"]:
+ for item in have["domain_search"]:
+ cmd = "no ip domain-list %s" % item["name"]
+ remove(cmd, commands, item["vrf"])
+ else:
+ for item in difference(have, want, "domain_search"):
+ cmd = "no ip domain-list %s" % item["name"]
+ remove(cmd, commands, item["vrf"])
+ for item in difference(want, have, "domain_search"):
+ cmd = "ip domain-list %s" % item["name"]
+ add(cmd, commands, item["vrf"])
+
+ if want["name_servers"]:
+ if want.get("name_servers")[0]["server"] == "default":
+ if have["name_servers"]:
+ for item in have["name_servers"]:
+ cmd = "no ip name-server %s" % item["server"]
+ remove(cmd, commands, item["vrf"])
+ else:
+ for item in difference(have, want, "name_servers"):
+ cmd = "no ip name-server %s" % item["server"]
+ remove(cmd, commands, item["vrf"])
+ for item in difference(want, have, "name_servers"):
+ cmd = "ip name-server %s" % item["server"]
+ add(cmd, commands, item["vrf"])
+
+ if needs_update("system_mtu"):
+ if want["system_mtu"] == "default":
+ if have["system_mtu"]:
+ commands.append("no system jumbomtu")
+ else:
+ commands.append("system jumbomtu %s" % want["system_mtu"])
+
+ return commands
+
+
+def parse_hostname(config):
+ match = re.search(r"^hostname (\S+)", config, re.M)
+ if match:
+ return match.group(1)
+
+
+def parse_domain_name(config, vrf_config):
+ objects = list()
+ match = re.search(r"^ip domain-name (\S+)", config, re.M)
+ if match:
+ objects.append({"name": match.group(1), "vrf": None})
+
+ for vrf, cfg in iteritems(vrf_config):
+ match = re.search(r"ip domain-name (\S+)", cfg, re.M)
+ if match:
+ objects.append({"name": match.group(1), "vrf": vrf})
+
+ return objects
+
+
+def parse_domain_search(config, vrf_config):
+ objects = list()
+
+ for item in re.findall(r"^ip domain-list (\S+)", config, re.M):
+ objects.append({"name": item, "vrf": None})
+
+ for vrf, cfg in iteritems(vrf_config):
+ for item in re.findall(r"ip domain-list (\S+)", cfg, re.M):
+ objects.append({"name": item, "vrf": vrf})
+
+ return objects
+
+
+def parse_name_servers(config, vrf_config, vrfs):
+ objects = list()
+
+ match = re.search("^ip name-server (.+)$", config, re.M)
+ if match and "use-vrf" not in match.group(1):
+ for addr in match.group(1).split(" "):
+ objects.append({"server": addr, "vrf": None})
+
+ for vrf, cfg in iteritems(vrf_config):
+ vrf_match = re.search("ip name-server (.+)", cfg, re.M)
+ if vrf_match:
+ for addr in vrf_match.group(1).split(" "):
+ objects.append({"server": addr, "vrf": vrf})
+
+ return objects
+
+
+def parse_system_mtu(config):
+ match = re.search(r"^system jumbomtu (\d+)", config, re.M)
+ if match:
+ return match.group(1)
+
+
+def map_config_to_obj(module):
+ config = get_config(module)
+ configobj = NetworkConfig(indent=2, contents=config)
+
+ vrf_config = {}
+
+ vrfs = re.findall(r"^vrf context (\S+)$", config, re.M)
+ for vrf in vrfs:
+ config_data = configobj.get_block_config(path=["vrf context %s" % vrf])
+ vrf_config[vrf] = config_data
+
+ return {
+ "hostname": parse_hostname(config),
+ "domain_lookup": "no ip domain-lookup" not in config,
+ "domain_name": parse_domain_name(config, vrf_config),
+ "domain_search": parse_domain_search(config, vrf_config),
+ "name_servers": parse_name_servers(config, vrf_config, vrfs),
+ "system_mtu": parse_system_mtu(config),
+ }
+
+
+def map_params_to_obj(module):
+ obj = {
+ "hostname": module.params["hostname"],
+ "domain_lookup": module.params["domain_lookup"],
+ "system_mtu": module.params["system_mtu"],
+ }
+
+ domain_name = ComplexList(dict(name=dict(key=True), vrf=dict()), module)
+
+ domain_search = ComplexList(dict(name=dict(key=True), vrf=dict()), module)
+
+ name_servers = ComplexList(dict(server=dict(key=True), vrf=dict()), module)
+
+ for arg, cast in [
+ ("domain_name", domain_name),
+ ("domain_search", domain_search),
+ ("name_servers", name_servers),
+ ]:
+ if module.params[arg] is not None:
+ obj[arg] = cast(module.params[arg])
+ else:
+ obj[arg] = None
+
+ return obj
+
+
+def main():
+ """ main entry point for module execution
+ """
+ argument_spec = dict(
+ hostname=dict(),
+ domain_lookup=dict(type="bool"),
+ # { name: <str>, vrf: <str> }
+ domain_name=dict(type="list", elements="raw"),
+ # {name: <str>, vrf: <str> }
+ domain_search=dict(type="list", elements="raw"),
+ # { server: <str>; vrf: <str> }
+ name_servers=dict(type="list", elements="raw"),
+ system_mtu=dict(type="str"),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+
+ commands = map_obj_to_commands(want, have, module)
+ result["commands"] = commands
+
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_telemetry.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_telemetry.py
new file mode 100644
index 00000000..af619a69
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_telemetry.py
@@ -0,0 +1,337 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Cisco and/or its affiliates.
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_telemetry
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_telemetry
+short_description: TELEMETRY resource module
+description: Manages Telemetry Monitoring Service (TMS) configuration
+version_added: 1.0.0
+author: Mike Wiebe (@mikewiebe)
+notes:
+- Supported on N9k Version 7.0(3)I7(5) and later.
+options:
+ config:
+ description: The provided configuration
+ type: dict
+ suboptions:
+ certificate:
+ type: dict
+ description:
+ - Certificate SSL/TLS and hostname values.
+ - Value must be a dict defining values for keys (key and hostname).
+ suboptions:
+ key:
+ description:
+ - Certificate key
+ type: str
+ hostname:
+ description:
+ - Certificate hostname
+ type: str
+ compression:
+ type: str
+ description:
+ - Destination profile compression method.
+ choices:
+ - gzip
+ source_interface:
+ type: str
+ description:
+ - Destination profile source interface.
+ - Valid value is a str representing the source interface name.
+ vrf:
+ type: str
+ description:
+ - Destination profile vrf.
+ - Valid value is a str representing the vrf name.
+ destination_groups:
+ type: list
+ description:
+ - List of telemetry destination groups.
+ elements: raw
+ suboptions:
+ id:
+ type: int
+ description:
+ - Destination group identifier.
+ - Value must be a int representing the destination group identifier.
+ destination:
+ type: dict
+ description:
+ - Group destination ipv4, port, protocol and encoding values.
+ - Value must be a dict defining values for keys (ip, port, protocol, encoding).
+ suboptions:
+ ip:
+ type: str
+ description:
+ - Destination group IP address.
+ port:
+ type: int
+ description:
+ - Destination group port number.
+ protocol:
+ type: str
+ description:
+ - Destination group protocol.
+ choices:
+ - HTTP
+ - TCP
+ - UDP
+ - gRPC
+ encoding:
+ type: str
+ description:
+ - Destination group encoding.
+ choices:
+ - GPB
+ - JSON
+ sensor_groups:
+ type: list
+ description:
+ - List of telemetry sensor groups.
+ elements: raw
+ suboptions:
+ id:
+ type: int
+ description:
+ - Sensor group identifier.
+ - Value must be a int representing the sensor group identifier.
+ data_source:
+ type: str
+ description:
+ - Telemetry data source.
+ choices:
+ - NX-API
+ - DME
+ - YANG
+ path:
+ type: dict
+ description:
+ - Telemetry sensor path.
+ - Value must be a dict defining values for keys (name, depth, filter_condition,
+ query_condition).
+ - Mandatory Keys (name)
+ - Optional Keys (depth, filter_condition, query_condition)
+ suboptions:
+ name:
+ type: str
+ description:
+ - Sensor group path name.
+ depth:
+ type: str
+ description:
+ - Sensor group depth.
+ filter_condition:
+ type: str
+ description:
+ - Sensor group filter condition.
+ query_condition:
+ type: str
+ description:
+ - Sensor group query condition.
+ subscriptions:
+ type: list
+ description:
+ - List of telemetry subscriptions.
+ elements: raw
+ suboptions:
+ id:
+ type: int
+ description:
+ - Subscription identifier.
+ - Value must be a int representing the subscription identifier.
+ destination_group:
+ type: int
+ description:
+ - Associated destination group.
+ sensor_group:
+ type: dict
+ description:
+ - Associated sensor group.
+ - Value must be a dict defining values for keys (id, sample_interval).
+ suboptions:
+ id:
+ type: int
+ description:
+ - Associated sensor group id.
+ sample_interval:
+ type: int
+ description:
+ - Associated sensor group id sample interval.
+ state:
+ description:
+ - Final configuration state
+ type: str
+ choices:
+ - merged
+ - replaced
+ - deleted
+ default: merged
+
+"""
+EXAMPLES = """
+# Using deleted
+# This action will delete all telemetry configuration on the device
+
+- name: Delete Telemetry Configuration
+ cisco.nxos.nxos_telemetry:
+ state: deleted
+
+
+# Using merged
+# This action will merge telemetry configuration defined in the playbook with
+# telemetry configuration that is already on the device.
+
+- name: Merge Telemetry Configuration
+ cisco.nxos.nxos_telemetry:
+ config:
+ certificate:
+ key: /bootflash/server.key
+ hostname: localhost
+ compression: gzip
+ source_interface: Ethernet1/1
+ vrf: management
+ destination_groups:
+ - id: 2
+ destination:
+ ip: 192.168.0.2
+ port: 50001
+ protocol: gPRC
+ encoding: GPB
+ - id: 55
+ destination:
+ ip: 192.168.0.55
+ port: 60001
+ protocol: gPRC
+ encoding: GPB
+ sensor_groups:
+ - id: 1
+ data_source: NX-API
+ path:
+ name: '"show lldp neighbors detail"'
+ depth: 0
+ - id: 55
+ data_source: DME
+ path:
+ name: sys/ch
+ depth: unbounded
+ filter_condition: ne(eqptFt.operSt,"ok")
+ subscriptions:
+ - id: 5
+ destination_group: 55
+ sensor_group:
+ id: 1
+ sample_interval: 1000
+ - id: 6
+ destination_group: 2
+ sensor_group:
+ id: 55
+ sample_interval: 2000
+ state: merged
+
+
+# Using replaced
+# This action will replace telemetry configuration on the device with the
+# telemetry configuration defined in the playbook.
+
+- name: Override Telemetry Configuration
+ cisco.nxos.nxos_telemetry:
+ config:
+ certificate:
+ key: /bootflash/server.key
+ hostname: localhost
+ compression: gzip
+ source_interface: Ethernet1/1
+ vrf: management
+ destination_groups:
+ - id: 2
+ destination:
+ ip: 192.168.0.2
+ port: 50001
+ protocol: gPRC
+ encoding: GPB
+ subscriptions:
+ - id: 5
+ destination_group: 55
+ state: replaced
+
+
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: dict
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['command 1', 'command 2', 'command 3']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.telemetry.telemetry import (
+ TelemetryArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.telemetry.telemetry import (
+ Telemetry,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ module = AnsibleModule(
+ argument_spec=TelemetryArgs.argument_spec, supports_check_mode=True
+ )
+
+ result = Telemetry(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_udld.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_udld.py
new file mode 100644
index 00000000..b509c7ed
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_udld.py
@@ -0,0 +1,266 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_udld
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages UDLD global configuration params.
+description:
+- Manages UDLD global configuration params.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- Module will fail if the udld feature has not been previously enabled.
+options:
+ aggressive:
+ description:
+ - Toggles aggressive mode.
+ choices:
+ - enabled
+ - disabled
+ type: str
+ msg_time:
+ description:
+ - Message time in seconds for UDLD packets or keyword 'default'.
+ type: str
+ reset:
+ description:
+ - Ability to reset all ports shut down by UDLD. 'state' parameter cannot be 'absent'
+ when this is present.
+ type: bool
+ state:
+ description:
+ - Manage the state of the resource. When set to 'absent', aggressive and msg_time
+ are set to their default values.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+EXAMPLES = """
+# ensure udld aggressive mode is globally disabled and se global message interval is 20
+- cisco.nxos.nxos_udld:
+ aggressive: disabled
+ msg_time: 20
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+# Ensure agg mode is globally enabled and msg time is 15
+- cisco.nxos.nxos_udld:
+ aggressive: enabled
+ msg_time: 15
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+"""
+
+RETURN = """
+proposed:
+ description: k/v pairs of parameters passed into module
+ returned: always
+ type: dict
+ sample: {"aggressive": "enabled", "msg_time": "40"}
+existing:
+ description:
+ - k/v pairs of existing udld configuration
+ returned: always
+ type: dict
+ sample: {"aggressive": "disabled", "msg_time": "15"}
+end_state:
+ description: k/v pairs of udld configuration after module execution
+ returned: always
+ type: dict
+ sample: {"aggressive": "enabled", "msg_time": "40"}
+updates:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["udld message-time 40", "udld aggressive"]
+changed:
+ description: check to see if a change was made on the device
+ returned: always
+ type: bool
+ sample: true
+"""
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+PARAM_TO_DEFAULT_KEYMAP = {"msg_time": "15"}
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key, value in table.items():
+ new_key = key_map.get(key)
+ if new_key:
+ value = table.get(key)
+ if value:
+ new_dict[new_key] = str(value)
+ else:
+ new_dict[new_key] = value
+ return new_dict
+
+
+def get_commands_config_udld_global(delta, reset, existing):
+ commands = []
+ for param, value in delta.items():
+ if param == "aggressive":
+ command = (
+ "udld aggressive"
+ if value == "enabled"
+ else "no udld aggressive"
+ )
+ commands.append(command)
+ elif param == "msg_time":
+ if value == "default":
+ if existing.get("msg_time") != PARAM_TO_DEFAULT_KEYMAP.get(
+ "msg_time"
+ ):
+ commands.append("no udld message-time")
+ else:
+ commands.append("udld message-time " + value)
+ if reset:
+ command = "udld reset"
+ commands.append(command)
+ return commands
+
+
+def get_commands_remove_udld_global(existing):
+ commands = []
+ if existing.get("aggressive") == "enabled":
+ command = "no udld aggressive"
+ commands.append(command)
+ if existing.get("msg_time") != PARAM_TO_DEFAULT_KEYMAP.get("msg_time"):
+ command = "no udld message-time"
+ commands.append(command)
+ return commands
+
+
+def get_udld_global(module):
+ command = "show udld global | json"
+ udld_table = run_commands(module, [command])[0]
+
+ status = str(udld_table.get("udld-global-mode", None))
+ if status == "enabled-aggressive":
+ aggressive = "enabled"
+ else:
+ aggressive = "disabled"
+
+ interval = str(udld_table.get("message-interval", None))
+ udld = dict(msg_time=interval, aggressive=aggressive)
+
+ return udld
+
+
+def main():
+ argument_spec = dict(
+ aggressive=dict(required=False, choices=["enabled", "disabled"]),
+ msg_time=dict(required=False, type="str"),
+ reset=dict(required=False, type="bool"),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ aggressive = module.params["aggressive"]
+ msg_time = module.params["msg_time"]
+ reset = module.params["reset"]
+ state = module.params["state"]
+
+ if reset and state == "absent":
+ module.fail_json(msg="state must be present when using reset flag.")
+
+ args = dict(aggressive=aggressive, msg_time=msg_time, reset=reset)
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+
+ existing = get_udld_global(module)
+ end_state = existing
+
+ delta = set(proposed.items()).difference(existing.items())
+ changed = False
+
+ commands = []
+ if state == "present":
+ if delta:
+ command = get_commands_config_udld_global(
+ dict(delta), reset, existing
+ )
+ commands.append(command)
+
+ elif state == "absent":
+ command = get_commands_remove_udld_global(existing)
+ if command:
+ commands.append(command)
+
+ cmds = flatten_list(commands)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ changed = True
+ load_config(module, cmds)
+ end_state = get_udld_global(module)
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ results = {}
+ results["proposed"] = proposed
+ results["existing"] = existing
+ results["end_state"] = end_state
+ results["updates"] = cmds
+ results["changed"] = changed
+ results["warnings"] = warnings
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_udld_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_udld_interface.py
new file mode 100644
index 00000000..d37530b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_udld_interface.py
@@ -0,0 +1,315 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_udld_interface
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages UDLD interface configuration params.
+description:
+- Manages UDLD interface configuration params.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- Feature UDLD must be enabled on the device to use this module.
+options:
+ mode:
+ description:
+ - Manages UDLD mode for an interface.
+ required: true
+ choices:
+ - enabled
+ - disabled
+ - aggressive
+ type: str
+ interface:
+ description:
+ - FULL name of the interface, i.e. Ethernet1/1-
+ required: true
+ type: str
+ state:
+ description:
+ - Manage the state of the resource.
+ required: false
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+EXAMPLES = """
+# ensure Ethernet1/1 is configured to be in aggressive mode
+- cisco.nxos.nxos_udld_interface:
+ interface: Ethernet1/1
+ mode: aggressive
+ state: present
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+# Remove the aggressive config only if it's currently in aggressive mode and then disable udld (switch default)
+- cisco.nxos.nxos_udld_interface:
+ interface: Ethernet1/1
+ mode: aggressive
+ state: absent
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+# ensure Ethernet1/1 has aggressive mode enabled
+- cisco.nxos.nxos_udld_interface:
+ interface: Ethernet1/1
+ mode: enabled
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+"""
+
+RETURN = """
+proposed:
+ description: k/v pairs of parameters passed into module
+ returned: always
+ type: dict
+ sample: {"mode": "enabled"}
+existing:
+ description:
+ - k/v pairs of existing configuration
+ returned: always
+ type: dict
+ sample: {"mode": "aggressive"}
+end_state:
+ description: k/v pairs of configuration after module execution
+ returned: always
+ type: dict
+ sample: {"mode": "enabled"}
+updates:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["interface ethernet1/33",
+ "no udld aggressive ; no udld disable"]
+changed:
+ description: check to see if a change was made on the device
+ returned: always
+ type: bool
+ sample: true
+"""
+
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_udld_interface(module, interface):
+ command = "show run udld all | section " + interface.title() + "$"
+ interface_udld = {}
+ mode = None
+ mode_str = None
+ try:
+ body = run_commands(module, [{"command": command, "output": "text"}])[
+ 0
+ ]
+ if "aggressive" in body:
+ mode = "aggressive"
+ mode_str = "aggressive"
+ elif "no udld enable" in body:
+ mode = "disabled"
+ mode_str = "no udld enable"
+ elif "no udld disable" in body:
+ mode = "enabled"
+ mode_str = "no udld disable"
+ elif "udld disable" in body:
+ mode = "disabled"
+ mode_str = "udld disable"
+ elif "udld enable" in body:
+ mode = "enabled"
+ mode_str = "udld enable"
+ interface_udld["mode"] = mode
+
+ except (KeyError, AttributeError, IndexError):
+ interface_udld = {}
+
+ return interface_udld, mode_str
+
+
+def get_commands_config_udld_interface1(delta, interface, module, existing):
+ commands = []
+ mode = delta["mode"]
+ if mode == "aggressive":
+ commands.append("udld aggressive")
+ else:
+ commands.append("no udld aggressive")
+ commands.insert(0, "interface {0}".format(interface))
+
+ return commands
+
+
+def get_commands_config_udld_interface2(delta, interface, module, existing):
+ commands = []
+ existing, mode_str = get_udld_interface(module, interface)
+ mode = delta["mode"]
+ if mode == "enabled":
+ if mode_str == "no udld enable":
+ command = "udld enable"
+ else:
+ command = "no udld disable"
+ else:
+ if mode_str == "no udld disable":
+ command = "udld disable"
+ else:
+ command = "no udld enable"
+ if command:
+ commands.append(command)
+ commands.insert(0, "interface {0}".format(interface))
+
+ return commands
+
+
+def get_commands_remove_udld_interface(delta, interface, module, existing):
+ commands = []
+ existing, mode_str = get_udld_interface(module, interface)
+
+ mode = delta["mode"]
+ if mode == "aggressive":
+ command = "no udld aggressive"
+ else:
+ if mode == "enabled":
+ if mode_str == "udld enable":
+ command = "no udld enable"
+ else:
+ command = "udld disable"
+ elif mode == "disabled":
+ if mode_str == "no udld disable":
+ command = "udld disable"
+ else:
+ command = "no udld enable"
+ if command:
+ commands.append(command)
+ commands.insert(0, "interface {0}".format(interface))
+
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ mode=dict(
+ choices=["enabled", "disabled", "aggressive"], required=True
+ ),
+ interface=dict(type="str", required=True),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ interface = module.params["interface"].lower()
+ mode = module.params["mode"]
+ state = module.params["state"]
+
+ proposed = dict(mode=mode)
+ existing, mode_str = get_udld_interface(module, interface)
+ end_state = existing
+
+ delta = dict(set(proposed.items()).difference(existing.items()))
+
+ changed = False
+ commands = []
+ cmds = []
+ if state == "present":
+ if delta:
+ command = get_commands_config_udld_interface1(
+ delta, interface, module, existing
+ )
+ commands.append(command)
+ cmds = flatten_list(commands)
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ changed = True
+ load_config(module, cmds)
+
+ if delta["mode"] == "enabled" or delta["mode"] == "disabled":
+ commands = []
+ command = get_commands_config_udld_interface2(
+ delta, interface, module, existing
+ )
+ commands.append(command)
+ cmds = flatten_list(commands)
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ load_config(module, cmds)
+
+ else:
+ common = set(proposed.items()).intersection(existing.items())
+ if common:
+ command = get_commands_remove_udld_interface(
+ dict(common), interface, module, existing
+ )
+ cmds = flatten_list(commands)
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ changed = True
+ load_config(module, cmds)
+
+ if not module.check_mode:
+ end_state, mode_str = get_udld_interface(module, interface)
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ results = {}
+ results["proposed"] = proposed
+ results["existing"] = existing
+ results["end_state"] = end_state
+ results["updates"] = cmds
+ results["changed"] = changed
+ results["warnings"] = warnings
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_user.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_user.py
new file mode 100644
index 00000000..06c291cc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_user.py
@@ -0,0 +1,483 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_user
+extends_documentation_fragment:
+- cisco.nxos.nxos
+author: Peter Sprygada (@privateip)
+short_description: Manage the collection of local users on Nexus devices
+description:
+- This module provides declarative management of the local usernames configured on
+ Cisco Nexus devices. It allows playbooks to manage either individual usernames
+ or the collection of usernames in the current running config. It also supports
+ purging usernames from the configuration that are not explicitly defined.
+version_added: 1.0.0
+options:
+ aggregate:
+ description:
+ - The set of username objects to be configured on the remote Cisco Nexus device. The
+ list entries can either be the username or a hash of username and properties. This
+ argument is mutually exclusive with the C(name) argument.
+ aliases:
+ - users
+ - collection
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - The username to be configured on the remote Cisco Nexus device. This argument
+ accepts a string value and is mutually exclusive with the C(aggregate) argument.
+ type: str
+ configured_password:
+ description:
+ - The password to be configured on the network device. The password needs to be
+ provided in cleartext and it will be encrypted on the device. Please note that
+ this option is not same as C(provider password).
+ type: str
+ update_password:
+ description:
+ - Since passwords are encrypted in the device running config, this argument will
+ instruct the module when to change the password. When set to C(always), the
+ password will always be updated in the device and when set to C(on_create) the
+ password will be updated only if the username is created.
+ choices:
+ - on_create
+ - always
+ type: str
+ roles:
+ description:
+ - The C(role) argument configures the role for the username in the device running
+ configuration. The argument accepts a string value defining the role name. This
+ argument does not check if the role has been configured on the device.
+ aliases:
+ - role
+ type: list
+ elements: str
+ sshkey:
+ description:
+ - The C(sshkey) argument defines the SSH public key to configure for the username. This
+ argument accepts a valid SSH key value.
+ type: str
+ state:
+ description:
+ - The C(state) argument configures the state of the username definition as it
+ relates to the device operational configuration. When set to I(present), the
+ username(s) should be configured in the device active configuration and when
+ set to I(absent) the username(s) should not be in the device active configuration
+ choices:
+ - present
+ - absent
+ type: str
+ name:
+ description:
+ - The username to be configured on the remote Cisco Nexus device. This argument
+ accepts a string value and is mutually exclusive with the C(aggregate) argument.
+ type: str
+ configured_password:
+ description:
+ - The password to be configured on the network device. The password needs to be
+ provided in cleartext and it will be encrypted on the device. Please note that
+ this option is not same as C(provider password).
+ type: str
+ update_password:
+ description:
+ - Since passwords are encrypted in the device running config, this argument will
+ instruct the module when to change the password. When set to C(always), the
+ password will always be updated in the device and when set to C(on_create) the
+ password will be updated only if the username is created.
+ default: always
+ choices:
+ - on_create
+ - always
+ type: str
+ roles:
+ description:
+ - The C(role) argument configures the role for the username in the device running
+ configuration. The argument accepts a string value defining the role name. This
+ argument does not check if the role has been configured on the device.
+ aliases:
+ - role
+ type: list
+ elements: str
+ sshkey:
+ description:
+ - The C(sshkey) argument defines the SSH public key to configure for the username. This
+ argument accepts a valid SSH key value.
+ type: str
+ purge:
+ description:
+ - The C(purge) argument instructs the module to consider the resource definition
+ absolute. It will remove any previously configured usernames on the device
+ with the exception of the `admin` user which cannot be deleted per nxos constraints.
+ type: bool
+ default: no
+ state:
+ description:
+ - The C(state) argument configures the state of the username definition as it
+ relates to the device operational configuration. When set to I(present), the
+ username(s) should be configured in the device active configuration and when
+ set to I(absent) the username(s) should not be in the device active configuration
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+- name: create a new user
+ cisco.nxos.nxos_user:
+ name: ansible
+ sshkey: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
+ state: present
+
+- name: remove all users except admin
+ cisco.nxos.nxos_user:
+ purge: yes
+
+- name: set multiple users role
+ cisco.nxos.nxos_user:
+ aggregate:
+ - name: netop
+ - name: netend
+ role: network-operator
+ state: present
+"""
+
+RETURN = """
+commands:
+ description: The list of configuration mode commands to send to the device
+ returned: always
+ type: list
+ sample:
+ - name ansible
+ - name ansible password password
+"""
+import re
+
+from copy import deepcopy
+from functools import partial
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ run_commands,
+ load_config,
+ get_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible.module_utils.six import iteritems
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+ to_list,
+)
+
+BUILTIN_ROLES = [
+ "network-admin",
+ "network-operator",
+ "vdc-admin",
+ "vdc-operator",
+ "priv-15",
+ "priv-14",
+ "priv-13",
+ "priv-12",
+ "priv-11",
+ "priv-10",
+ "priv-9",
+ "priv-8",
+ "priv-7",
+ "priv-6",
+ "priv-5",
+ "priv-4",
+ "priv-3",
+ "priv-2",
+ "priv-1",
+ "priv-0",
+]
+
+
+def get_custom_roles(module):
+ return re.findall(
+ r"^role name (\S+)",
+ get_config(module, flags=["| include '^role name'"]),
+ re.M,
+ )
+
+
+def validate_roles(value, module):
+ valid_roles = BUILTIN_ROLES + get_custom_roles(module)
+ for item in value:
+ if item not in valid_roles:
+ module.fail_json(msg="invalid role specified")
+
+
+def map_obj_to_commands(updates, module):
+ commands = list()
+ update_password = module.params["update_password"]
+
+ for update in updates:
+ want, have = update
+
+ def needs_update(x):
+ return want.get(x) and (want.get(x) != have.get(x))
+
+ def add(x):
+ return commands.append("username %s %s" % (want["name"], x))
+
+ def remove(x):
+ return commands.append("no username %s %s" % (want["name"], x))
+
+ def configure_roles():
+ if want["roles"]:
+ if have:
+ for item in set(have["roles"]).difference(want["roles"]):
+ remove("role %s" % item)
+
+ for item in set(want["roles"]).difference(have["roles"]):
+ add("role %s" % item)
+ else:
+ for item in want["roles"]:
+ add("role %s" % item)
+
+ return True
+ return False
+
+ if want["state"] == "absent":
+ commands.append("no username %s" % want["name"])
+ continue
+
+ roles_configured = False
+ if want["state"] == "present" and not have:
+ roles_configured = configure_roles()
+ if not roles_configured:
+ commands.append("username %s" % want["name"])
+
+ if needs_update("configured_password"):
+ if update_password == "always" or not have:
+ add("password %s" % want["configured_password"])
+
+ if needs_update("sshkey"):
+ add("sshkey %s" % want["sshkey"])
+
+ if not roles_configured:
+ configure_roles()
+
+ return commands
+
+
+def parse_password(data):
+ if not data.get("remote_login"):
+ return "<PASSWORD>"
+
+
+def parse_roles(data):
+ configured_roles = None
+ if "TABLE_role" in data:
+ configured_roles = data.get("TABLE_role")["ROW_role"]
+
+ roles = list()
+ if configured_roles:
+ for item in to_list(configured_roles):
+ roles.append(item["role"])
+ return roles
+
+
+def map_config_to_obj(module):
+ out = run_commands(
+ module, [{"command": "show user-account", "output": "json"}]
+ )
+ data = out[0]
+
+ objects = list()
+
+ for item in to_list(data["TABLE_template"]["ROW_template"]):
+ objects.append(
+ {
+ "name": item["usr_name"],
+ "configured_password": parse_password(item),
+ "sshkey": item.get("sshkey_info"),
+ "roles": parse_roles(item),
+ "state": "present",
+ }
+ )
+ return objects
+
+
+def get_param_value(key, item, module):
+ # if key doesn't exist in the item, get it from module.params
+ if not item.get(key):
+ value = module.params[key]
+
+ # if key does exist, do a type check on it to validate it
+ else:
+ value_type = module.argument_spec[key].get("type", "str")
+ type_checker = module._CHECK_ARGUMENT_TYPES_DISPATCHER[value_type]
+ type_checker(item[key])
+ value = item[key]
+
+ return value
+
+
+def map_params_to_obj(module):
+ aggregate = module.params["aggregate"]
+ if not aggregate:
+ if not module.params["name"] and module.params["purge"]:
+ return list()
+ elif not module.params["name"]:
+ module.fail_json(msg="username is required")
+ else:
+ collection = [{"name": module.params["name"]}]
+ else:
+ collection = list()
+ for item in aggregate:
+ if not isinstance(item, dict):
+ collection.append({"name": item})
+ elif "name" not in item:
+ module.fail_json(msg="name is required")
+ else:
+ collection.append(item)
+
+ objects = list()
+
+ for item in collection:
+ get_value = partial(get_param_value, item=item, module=module)
+ item.update(
+ {
+ "configured_password": get_value("configured_password"),
+ "sshkey": get_value("sshkey"),
+ "roles": get_value("roles"),
+ "state": get_value("state"),
+ }
+ )
+
+ for key, value in iteritems(item):
+ if value:
+ # validate the param value (if validator func exists)
+ validator = globals().get("validate_%s" % key)
+ if all((value, validator)):
+ validator(value, module)
+
+ objects.append(item)
+
+ return objects
+
+
+def update_objects(want, have):
+ updates = list()
+ for entry in want:
+ item = next((i for i in have if i["name"] == entry["name"]), None)
+ if all((item is None, entry["state"] == "present")):
+ updates.append((entry, {}))
+ elif item:
+ for key, value in iteritems(entry):
+ if value and value != item[key]:
+ updates.append((entry, item))
+ return updates
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ name=dict(),
+ configured_password=dict(no_log=True),
+ update_password=dict(
+ default="always", choices=["on_create", "always"]
+ ),
+ roles=dict(type="list", aliases=["role"], elements="str"),
+ sshkey=dict(),
+ state=dict(default="present", choices=["present", "absent"]),
+ )
+
+ aggregate_spec = deepcopy(element_spec)
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+
+ argument_spec = dict(
+ aggregate=dict(
+ type="list",
+ elements="dict",
+ options=aggregate_spec,
+ aliases=["collection", "users"],
+ ),
+ purge=dict(type="bool", default=False),
+ )
+
+ argument_spec.update(element_spec)
+ argument_spec.update(nxos_argument_spec)
+
+ mutually_exclusive = [("name", "aggregate")]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ result = {"changed": False, "warnings": []}
+
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(module)
+
+ commands = map_obj_to_commands(update_objects(want, have), module)
+
+ if module.params["purge"]:
+ want_users = [x["name"] for x in want]
+ have_users = [x["name"] for x in have]
+ for item in set(have_users).difference(want_users):
+ if item != "admin":
+ item = item.replace("\\", "\\\\")
+ commands.append("no username %s" % item)
+
+ result["commands"] = commands
+
+ # the nxos cli prevents this by rule so capture it and display
+ # a nice failure message
+ if "no username admin" in commands:
+ module.fail_json(msg="cannot delete the `admin` account")
+
+ if commands:
+ if not module.check_mode:
+ responses = load_config(module, commands)
+ for resp in responses:
+ if resp.lower().startswith("wrong password"):
+ module.fail_json(msg=resp)
+ else:
+ result["warnings"].extend(
+ [
+ x[9:]
+ for x in resp.splitlines()
+ if x.startswith("WARNING: ")
+ ]
+ )
+
+ result["changed"] = True
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vlan.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vlan.py
new file mode 100644
index 00000000..a5729b68
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vlan.py
@@ -0,0 +1,849 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vlan
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: (deprecated, removed after 2022-06-01) Manages VLAN
+ resources and attributes.
+description:
+- Manages VLAN configurations on NX-OS switches.
+version_added: 1.0.0
+deprecated:
+ alternative: nxos_vlans
+ why: Updated modules released with more functionality
+ removed_at_date: '2022-06-01'
+author: Jason Edelman (@jedelman8)
+options:
+ vlan_id:
+ description:
+ - Single VLAN ID.
+ type: int
+ vlan_range:
+ description:
+ - Range of VLANs such as 2-10 or 2,5,10-15, etc.
+ type: str
+ name:
+ description:
+ - Name of VLAN or keyword 'default'.
+ type: str
+ interfaces:
+ description:
+ - List of interfaces that should be associated to the VLAN or keyword 'default'.
+ type: list
+ elements: str
+ associated_interfaces:
+ description:
+ - This is a intent option and checks the operational state of the for given vlan
+ C(name) for associated interfaces. If the value in the C(associated_interfaces)
+ does not match with the operational state of vlan interfaces on device it will
+ result in failure.
+ type: list
+ elements: str
+ vlan_state:
+ description:
+ - Manage the vlan operational state of the VLAN
+ default: active
+ choices:
+ - active
+ - suspend
+ type: str
+ admin_state:
+ description:
+ - Manage the VLAN administrative state of the VLAN equivalent to shut/no shut
+ in VLAN config mode.
+ default: up
+ choices:
+ - up
+ - down
+ type: str
+ mapped_vni:
+ description:
+ - The Virtual Network Identifier (VNI) ID that is mapped to the VLAN. Valid values
+ are integer and keyword 'default'. Range 4096-16773119.
+ type: str
+ aggregate:
+ description: List of VLANs definitions.
+ type: list
+ elements: dict
+ suboptions:
+ vlan_id:
+ description:
+ - Single VLAN ID.
+ required: True
+ type: int
+ vlan_range:
+ description:
+ - Range of VLANs such as 2-10 or 2,5,10-15, etc.
+ type: str
+ name:
+ description:
+ - Name of VLAN or keyword 'default'.
+ type: str
+ interfaces:
+ description:
+ - List of interfaces that should be associated to the VLAN or keyword 'default'.
+ type: list
+ elements: str
+ associated_interfaces:
+ description:
+ - This is a intent option and checks the operational state of the for given vlan
+ C(name) for associated interfaces. If the value in the C(associated_interfaces)
+ does not match with the operational state of vlan interfaces on device it will
+ result in failure.
+ type: list
+ elements: str
+ vlan_state:
+ description:
+ - Manage the vlan operational state of the VLAN
+ choices:
+ - active
+ - suspend
+ type: str
+ admin_state:
+ description:
+ - Manage the VLAN administrative state of the VLAN equivalent to shut/no shut
+ in VLAN config mode.
+ choices:
+ - up
+ - down
+ type: str
+ mapped_vni:
+ description:
+ - The Virtual Network Identifier (VNI) ID that is mapped to the VLAN. Valid values
+ are integer and keyword 'default'. Range 4096-16773119.
+ type: str
+ mode:
+ description:
+ - Set VLAN mode to classical ethernet or fabricpath. This is a valid option for
+ Nexus 5000 and 7000 series.
+ choices:
+ - ce
+ - fabricpath
+ type: str
+ delay:
+ description:
+ - Time in seconds to wait before checking for the operational state on remote
+ device. This wait is applicable for operational state arguments.
+ type: int
+ state:
+ description:
+ - Manage the state of the resource.
+ choices:
+ - present
+ - absent
+ type: str
+ state:
+ description:
+ - Manage the state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+ mode:
+ description:
+ - Set VLAN mode to classical ethernet or fabricpath. This is a valid option for
+ Nexus 5000 and 7000 series.
+ choices:
+ - ce
+ - fabricpath
+ default: ce
+ type: str
+ purge:
+ description:
+ - Purge VLANs not defined in the I(aggregate) parameter. This parameter can be
+ used without aggregate as well.
+ - Removal of Vlan 1 is not allowed and will be ignored by purge.
+ type: bool
+ default: no
+ delay:
+ description:
+ - Time in seconds to wait before checking for the operational state on remote
+ device. This wait is applicable for operational state arguments.
+ default: 10
+ type: int
+
+
+"""
+
+EXAMPLES = """
+- name: Ensure a range of VLANs are not present on the switch
+ cisco.nxos.nxos_vlan:
+ vlan_range: 2-10,20,50,55-60,100-150
+ state: absent
+
+- name: Ensure VLAN 50 exists with the name WEB and is in the shutdown state
+ cisco.nxos.nxos_vlan:
+ vlan_id: 50
+ admin_state: down
+ name: WEB
+
+- name: Ensure VLAN is NOT on the device
+ cisco.nxos.nxos_vlan:
+ vlan_id: 50
+ state: absent
+
+- name: Add interfaces to VLAN and check intent (config + intent)
+ cisco.nxos.nxos_vlan:
+ vlan_id: 100
+ interfaces:
+ - Ethernet2/1
+ - Ethernet2/5
+ associated_interfaces:
+ - Ethernet2/1
+ - Ethernet2/5
+
+- name: Check interfaces assigned to VLAN
+ cisco.nxos.nxos_vlan:
+ vlan_id: 100
+ associated_interfaces:
+ - Ethernet2/1
+ - Ethernet2/5
+
+- name: Create aggregate of vlans
+ cisco.nxos.nxos_vlan:
+ aggregate:
+ - {vlan_id: 4000, mode: ce}
+ - {vlan_id: 4001, name: vlan-4001}
+
+- name: purge vlans - removes all other vlans except the ones mentioned in aggregate)
+ cisco.nxos.nxos_vlan:
+ aggregate:
+ - vlan_id: 1
+ - vlan_id: 4001
+ purge: yes
+
+"""
+
+RETURN = """
+commands:
+ description: Set of command strings to send to the remote device
+ returned: always
+ type: list
+ sample: ["vlan 20", "vlan 55", "vn-segment 5000"]
+"""
+
+import re
+import time
+
+from copy import deepcopy
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_capabilities,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ normalize_interface,
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+
+
+def search_obj_in_list(vlan_id, lst):
+ for o in lst:
+ if o["vlan_id"] == vlan_id:
+ return o
+
+
+def get_diff(w, obj):
+ c = deepcopy(w)
+ entries = ("interfaces", "associated_interfaces", "delay", "vlan_range")
+ for key in entries:
+ if key in c:
+ del c[key]
+
+ o = deepcopy(obj)
+ del o["interfaces"]
+ if o["vlan_id"] == w["vlan_id"]:
+ diff_dict = dict(set(c.items()) - set(o.items()))
+ return diff_dict
+
+
+def is_default_name(obj, vlan_id):
+ cname = obj["name"]
+ if "VLAN" in cname:
+ vid = int(cname[4:])
+ if vid == int(vlan_id):
+ return True
+
+ return False
+
+
+def map_obj_to_commands(updates, module):
+ commands = list()
+ purge = module.params["purge"]
+ want, have = updates
+ info = get_capabilities(module).get("device_info")
+ os_platform = info.get("network_os_platform")
+
+ for w in want:
+ vlan_id = w["vlan_id"]
+ name = w["name"]
+ interfaces = w.get("interfaces") or []
+ mapped_vni = w["mapped_vni"]
+ mode = w["mode"]
+ vlan_state = w["vlan_state"]
+ admin_state = w["admin_state"]
+ state = w["state"]
+ del w["state"]
+
+ obj_in_have = search_obj_in_list(vlan_id, have) or {}
+ if not re.match("N[567]", os_platform) or (
+ not obj_in_have.get("mode") and mode == "ce"
+ ):
+ mode = w["mode"] = None
+
+ if state == "absent":
+ if obj_in_have:
+ commands.append("no vlan {0}".format(vlan_id))
+
+ elif state == "present":
+ if not obj_in_have:
+ commands.append("vlan {0}".format(vlan_id))
+
+ if name and name != "default":
+ commands.append("name {0}".format(name))
+ if mode:
+ commands.append("mode {0}".format(mode))
+ if vlan_state:
+ commands.append("state {0}".format(vlan_state))
+ if mapped_vni != "None" and mapped_vni != "default":
+ commands.append("vn-segment {0}".format(mapped_vni))
+ if admin_state == "up":
+ commands.append("no shutdown")
+ if admin_state == "down":
+ commands.append("shutdown")
+ commands.append("exit")
+
+ if interfaces and interfaces[0] != "default":
+ for i in interfaces:
+ commands.append("interface {0}".format(i))
+ commands.append("switchport")
+ commands.append("switchport mode access")
+ commands.append(
+ "switchport access vlan {0}".format(vlan_id)
+ )
+
+ else:
+ diff = get_diff(w, obj_in_have)
+ if diff:
+ commands.append("vlan {0}".format(vlan_id))
+ for key, value in diff.items():
+ if key == "name":
+ if name != "default":
+ if name is not None:
+ commands.append("name {0}".format(value))
+ else:
+ if not is_default_name(obj_in_have, vlan_id):
+ commands.append("no name")
+ if key == "vlan_state" and value:
+ commands.append("state {0}".format(value))
+ if key == "mapped_vni":
+ if value == "default":
+ if obj_in_have["mapped_vni"] != "None":
+ commands.append("no vn-segment")
+ elif value != "None":
+ commands.append("vn-segment {0}".format(value))
+ if key == "admin_state":
+ if value == "up":
+ commands.append("no shutdown")
+ elif value == "down":
+ commands.append("shutdown")
+ if key == "mode" and value:
+ commands.append("mode {0}".format(value))
+ if len(commands) > 1:
+ commands.append("exit")
+ else:
+ del commands[:]
+
+ if interfaces and interfaces[0] != "default":
+ if not obj_in_have["interfaces"]:
+ for i in interfaces:
+ commands.append("vlan {0}".format(vlan_id))
+ commands.append("exit")
+ commands.append("interface {0}".format(i))
+ commands.append("switchport")
+ commands.append("switchport mode access")
+ commands.append(
+ "switchport access vlan {0}".format(vlan_id)
+ )
+
+ elif set(interfaces) != set(obj_in_have["interfaces"]):
+ missing_interfaces = list(
+ set(interfaces) - set(obj_in_have["interfaces"])
+ )
+ for i in missing_interfaces:
+ commands.append("vlan {0}".format(vlan_id))
+ commands.append("exit")
+ commands.append("interface {0}".format(i))
+ commands.append("switchport")
+ commands.append("switchport mode access")
+ commands.append(
+ "switchport access vlan {0}".format(vlan_id)
+ )
+
+ superfluous_interfaces = list(
+ set(obj_in_have["interfaces"]) - set(interfaces)
+ )
+ for i in superfluous_interfaces:
+ commands.append("vlan {0}".format(vlan_id))
+ commands.append("exit")
+ commands.append("interface {0}".format(i))
+ commands.append("switchport")
+ commands.append("switchport mode access")
+ commands.append(
+ "no switchport access vlan {0}".format(vlan_id)
+ )
+
+ elif interfaces and interfaces[0] == "default":
+ if obj_in_have["interfaces"]:
+ for i in obj_in_have["interfaces"]:
+ commands.append("vlan {0}".format(vlan_id))
+ commands.append("exit")
+ commands.append("interface {0}".format(i))
+ commands.append("switchport")
+ commands.append("switchport mode access")
+ commands.append(
+ "no switchport access vlan {0}".format(vlan_id)
+ )
+
+ if purge:
+ for h in have:
+ if h["vlan_id"] == "1":
+ module.warn(
+ "Deletion of vlan 1 is not allowed; purge will ignore vlan 1"
+ )
+ continue
+ obj_in_want = search_obj_in_list(h["vlan_id"], want)
+ if not obj_in_want:
+ commands.append("no vlan {0}".format(h["vlan_id"]))
+
+ return commands
+
+
+def want_vlan_list(module):
+ result = []
+ vlan_range = module.params["vlan_range"]
+ for part in vlan_range.split(","):
+ if part == "none":
+ break
+ if "-" in part:
+ start, end = part.split("-")
+ start, end = int(start), int(end)
+ result.extend([str(i) for i in range(start, end + 1)])
+ else:
+ result.append(part)
+ return result
+
+
+def have_vlan_list(have):
+ result = []
+ if have:
+ for h in have:
+ result.append(str(h.get("vlan_id")))
+ return result
+
+
+def vlan_range_commands(module, have):
+ commands = list()
+ proposed_vlans_list = want_vlan_list(module)
+ existing_vlans_list = have_vlan_list(have)
+
+ if module.params["state"] == "absent":
+ vlans = set(proposed_vlans_list).intersection(existing_vlans_list)
+ for vlan in vlans:
+ commands.append("no vlan {0}".format(vlan))
+
+ elif module.params["state"] == "present":
+ vlans = set(proposed_vlans_list).difference(existing_vlans_list)
+ for vlan in vlans:
+ commands.append("vlan {0}".format(vlan))
+
+ return commands
+
+
+def normalize(interfaces):
+ normalized = None
+ if interfaces:
+ normalized = [normalize_interface(i) for i in interfaces]
+ return normalized
+
+
+def map_params_to_obj(module):
+ obj = []
+ if module.params["vlan_range"]:
+ return []
+
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+
+ d = item.copy()
+ d["vlan_id"] = str(d["vlan_id"])
+ d["mapped_vni"] = str(d["mapped_vni"])
+ d["interfaces"] = normalize(d["interfaces"])
+ d["associated_interfaces"] = normalize(d["associated_interfaces"])
+
+ obj.append(d)
+ else:
+ interfaces = normalize(module.params["interfaces"])
+ associated_interfaces = normalize(
+ module.params["associated_interfaces"]
+ )
+
+ obj.append(
+ {
+ "vlan_id": str(module.params["vlan_id"]),
+ "name": module.params["name"],
+ "interfaces": interfaces,
+ "vlan_state": module.params["vlan_state"],
+ "mapped_vni": str(module.params["mapped_vni"]),
+ "state": module.params["state"],
+ "admin_state": module.params["admin_state"],
+ "mode": module.params["mode"],
+ "associated_interfaces": associated_interfaces,
+ }
+ )
+
+ return obj
+
+
+def parse_admin_state(vlan):
+ shutstate = vlan.get("vlanshowbr-shutstate")
+ if shutstate == "noshutdown":
+ return "up"
+ elif shutstate == "shutdown":
+ return "down"
+
+
+def parse_mode(config):
+ mode = None
+
+ if config:
+ match = re.search(r"mode (\S+)", config)
+ if match:
+ mode = match.group(1)
+ return mode
+
+
+def parse_vni(config):
+ vni = None
+
+ if config:
+ match = re.search(r"vn-segment (\S+)", config)
+ if match:
+ vni = match.group(1)
+ return str(vni)
+
+
+def get_vlan_int(interfaces):
+ vlan_int = []
+ for i in interfaces.split(","):
+ if "eth" in i.lower() and "-" in i:
+ int_range = i.split("-")
+ stop = int((int_range)[1])
+ start = int(int_range[0].split("/")[1])
+ eth = int_range[0].split("/")[0]
+ for r in range(start, stop + 1):
+ vlan_int.append(eth + "/" + str(r))
+ else:
+ vlan_int.append(i)
+ return vlan_int
+
+
+def parse_interfaces(module, vlan):
+ vlan_int = []
+ interfaces = vlan.get("vlanshowplist-ifidx")
+ if interfaces:
+ if isinstance(interfaces, list):
+ interfaces_list = [i.strip() for i in interfaces]
+ interfaces_str = ",".join(interfaces_list)
+ vlan_int = get_vlan_int(interfaces_str)
+ else:
+ vlan_int = get_vlan_int(interfaces)
+ return vlan_int
+
+
+def parse_vlan_config(netcfg, vlan_id):
+ parents = ["vlan {0}".format(vlan_id)]
+ config = netcfg.get_section(parents)
+ return config
+
+
+def parse_vlan_options(module, netcfg, output, vlan):
+ obj = {}
+ vlan_id = vlan["vlanshowbr-vlanid-utf"]
+ config = parse_vlan_config(netcfg, vlan_id)
+
+ obj["vlan_id"] = str(vlan_id)
+ obj["name"] = vlan.get("vlanshowbr-vlanname")
+ obj["vlan_state"] = vlan.get("vlanshowbr-vlanstate")
+ obj["admin_state"] = parse_admin_state(vlan)
+ obj["mode"] = parse_mode(config)
+ obj["mapped_vni"] = parse_vni(config)
+ obj["interfaces"] = parse_interfaces(module, vlan)
+ return obj
+
+
+def parse_vlan_non_structured(module, netcfg, vlans):
+ objs = list()
+
+ for vlan in vlans:
+ vlan_match = re.search(r"(\d+)", vlan, re.M)
+ if vlan_match:
+ obj = {}
+ vlan_id = vlan_match.group(1)
+ obj["vlan_id"] = str(vlan_id)
+
+ name_match = re.search(r"{0}\s*(\S+)".format(vlan_id), vlan, re.M)
+ if name_match:
+ name = name_match.group(1)
+ obj["name"] = name
+ state_match = re.search(
+ r"{0}\s*{1}\s*(\S+)".format(vlan_id, re.escape(name)),
+ vlan,
+ re.M,
+ )
+ if state_match:
+ vlan_state_match = state_match.group(1)
+ if vlan_state_match == "suspended":
+ vlan_state = "suspend"
+ admin_state = "up"
+ elif vlan_state_match == "sus/lshut":
+ vlan_state = "suspend"
+ admin_state = "down"
+ if vlan_state_match == "active":
+ vlan_state = "active"
+ admin_state = "up"
+ if vlan_state_match == "act/lshut":
+ vlan_state = "active"
+ admin_state = "down"
+
+ obj["vlan_state"] = vlan_state
+ obj["admin_state"] = admin_state
+
+ vlan = ",".join(vlan.splitlines())
+ interfaces = list()
+ intfs_match = re.search(
+ r"{0}\s*{1}\s*{2}\s*(.*)".format(
+ vlan_id, re.escape(name), vlan_state_match
+ ),
+ vlan,
+ re.M,
+ )
+ if intfs_match:
+ intfs = intfs_match.group(1)
+ intfs = intfs.split()
+ for i in intfs:
+ intf = normalize_interface(i.strip(","))
+ interfaces.append(intf)
+
+ if interfaces:
+ obj["interfaces"] = interfaces
+ else:
+ obj["interfaces"] = None
+
+ config = parse_vlan_config(netcfg, vlan_id)
+ obj["mode"] = parse_mode(config)
+ obj["mapped_vni"] = parse_vni(config)
+
+ objs.append(obj)
+
+ return objs
+
+
+def map_config_to_obj(module):
+ objs = list()
+ output = None
+
+ command = ["show vlan brief | json"]
+ output = run_commands(module, command, check_rc="retry_json")[0]
+ if output:
+ netcfg = CustomNetworkConfig(
+ indent=2, contents=get_config(module, flags=["all"])
+ )
+
+ if isinstance(output, dict):
+ vlans = None
+ try:
+ vlans = output["TABLE_vlanbriefxbrief"]["ROW_vlanbriefxbrief"]
+ except KeyError:
+ return objs
+
+ if vlans:
+ if isinstance(vlans, list):
+ for vlan in vlans:
+ obj = parse_vlan_options(module, netcfg, output, vlan)
+ objs.append(obj)
+ elif isinstance(vlans, dict):
+ obj = parse_vlan_options(module, netcfg, output, vlans)
+ objs.append(obj)
+ else:
+ vlans = list()
+ splitted_line = re.split(r"\n(\d+)|\n{2}", output.strip())
+
+ for line in splitted_line:
+ if not line:
+ continue
+ if len(line) > 0:
+ line = line.strip()
+ if line[0].isdigit():
+ match = re.search(r"^(\d+)$", line, re.M)
+ if match:
+ v = match.group(1)
+ pos1 = splitted_line.index(v)
+ pos2 = pos1 + 1
+ # fmt: off
+ vlaninfo = "".join(splitted_line[pos1: pos2 + 1])
+ # fmt: on
+ vlans.append(vlaninfo)
+
+ if vlans:
+ objs = parse_vlan_non_structured(module, netcfg, vlans)
+ else:
+ return objs
+
+ return objs
+
+
+def check_declarative_intent_params(want, module, result):
+
+ have = None
+ is_delay = False
+
+ for w in want:
+ if w.get("associated_interfaces") is None:
+ continue
+
+ if result["changed"] and not is_delay:
+ time.sleep(module.params["delay"])
+ is_delay = True
+
+ if have is None:
+ have = map_config_to_obj(module)
+
+ for i in w["associated_interfaces"]:
+ obj_in_have = search_obj_in_list(w["vlan_id"], have)
+ if (
+ obj_in_have
+ and "interfaces" in obj_in_have
+ and i not in obj_in_have["interfaces"]
+ ):
+ module.fail_json(
+ msg="Interface %s not configured on vlan %s"
+ % (i, w["vlan_id"])
+ )
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ vlan_id=dict(required=False, type="int"),
+ vlan_range=dict(required=False),
+ name=dict(required=False),
+ interfaces=dict(type="list", elements="str"),
+ associated_interfaces=dict(type="list", elements="str"),
+ vlan_state=dict(
+ choices=["active", "suspend"], required=False, default="active"
+ ),
+ mapped_vni=dict(required=False),
+ delay=dict(default=10, type="int"),
+ state=dict(
+ choices=["present", "absent"], default="present", required=False
+ ),
+ admin_state=dict(choices=["up", "down"], required=False, default="up"),
+ mode=dict(default="ce", choices=["ce", "fabricpath"]),
+ )
+
+ aggregate_spec = deepcopy(element_spec)
+ aggregate_spec["vlan_id"] = dict(required=True, type="int")
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec),
+ purge=dict(default=False, type="bool"),
+ )
+
+ argument_spec.update(element_spec)
+ argument_spec.update(nxos_argument_spec)
+
+ required_one_of = [["vlan_id", "aggregate", "vlan_range"]]
+ mutually_exclusive = [
+ ["vlan_id", "aggregate"],
+ ["vlan_range", "name"],
+ ["vlan_id", "vlan_range"],
+ ]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=required_one_of,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+
+ have = map_config_to_obj(module)
+ want = map_params_to_obj(module)
+
+ if module.params["vlan_range"]:
+ commands = vlan_range_commands(module, have)
+ result["commands"] = commands
+ else:
+ commands = map_obj_to_commands((want, have), module)
+ result["commands"] = commands
+
+ if commands:
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+
+ if want:
+ check_declarative_intent_params(want, module, result)
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vlans.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vlans.py
new file mode 100644
index 00000000..8cc4ca90
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vlans.py
@@ -0,0 +1,438 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright 2019 Red Hat
+# GNU General Public License v3.0+
+# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+#############################################
+# WARNING #
+#############################################
+#
+# This file is auto generated by the resource
+# module builder playbook.
+#
+# Do not edit this file manually.
+#
+# Changes to this file will be over written
+# by the resource module builder.
+#
+# Changes should be made in the model used to
+# generate this file or in the resource module
+# builder template.
+#
+#############################################
+
+"""
+The module file for nxos_vlans
+"""
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vlans
+short_description: VLANs resource module
+description: This module creates and manages VLAN configurations on Cisco NX-OS.
+version_added: 1.0.0
+author: Trishna Guha (@trishnaguha)
+notes:
+- Tested against NXOS 7.3.(0)D1(1) on VIRL
+options:
+ running_config:
+ description:
+ - This option is used only with state I(parsed).
+ - The value of this option should be the output received from the NX-OS device
+ by executing the commands B(show vlans | json-pretty) and B(show running-config
+ | section ^vlan) in order and delimited by a line.
+ - The state I(parsed) reads the configuration from C(running_config) option and
+ transforms it into Ansible structured data as per the resource module's argspec
+ and the value is then returned in the I(parsed) key within the result.
+ type: str
+ config:
+ description: A dictionary of Vlan options
+ type: list
+ elements: dict
+ suboptions:
+ vlan_id:
+ description:
+ - Vlan ID.
+ type: int
+ required: true
+ name:
+ description:
+ - Name of VLAN.
+ type: str
+ state:
+ description:
+ - Manage operational state of the vlan.
+ type: str
+ choices:
+ - active
+ - suspend
+ enabled:
+ description:
+ - Manage administrative state of the vlan.
+ type: bool
+ mode:
+ description:
+ - Set vlan mode to classical ethernet or fabricpath. This is a valid option
+ for Nexus 5000, 6000 and 7000 series.
+ type: str
+ choices:
+ - ce
+ - fabricpath
+ mapped_vni:
+ description:
+ - The Virtual Network Identifier (VNI) ID that is mapped to the VLAN.
+ type: int
+ state:
+ description:
+ - The state of the configuration after module completion.
+ - The state I(overridden) would override the configuration of all the
+ VLANs on the device (including VLAN 1) with the provided configuration in
+ the task. Use caution with this state.
+ type: str
+ choices:
+ - merged
+ - replaced
+ - overridden
+ - deleted
+ - gathered
+ - rendered
+ - parsed
+ default: merged
+
+"""
+EXAMPLES = """
+# Using merged
+
+# Before state:
+# -------------
+# vlan 1
+
+- name: Merge provided configuration with device configuration.
+ cisco.nxos.nxos_vlans:
+ config:
+ - vlan_id: 5
+ name: test-vlan5
+ - vlan_id: 10
+ enabled: false
+ state: merged
+
+# After state:
+# ------------
+# vlan 5
+# name test-vlan5
+# state active
+# no shutdown
+# vlan 10
+# state active
+# shutdown
+
+
+# Using replaced
+
+# Before state:
+# -------------
+# vlan 1
+# vlan 5
+# name test-vlan5
+# vlan 10
+# shutdown
+
+- name: Replace device configuration of specified vlan with provided configuration.
+ cisco.nxos.nxos_vlans:
+ config:
+ - vlan_id: 5
+ name: test-vlan
+ enabled: false
+ - vlan_id: 10
+ enabled: false
+ state: replaced
+
+# After state:
+# ------------
+# vlan 1
+# vlan 5
+# name test-vlan
+# state active
+# shutdown
+# vlan 10
+# state active
+# shutdown
+
+
+# Using overridden
+
+# Before state:
+# -------------
+# vlan 1
+# vlan 3
+# name testing
+# vlan 5
+# name test-vlan5
+# shutdown
+# vlan 10
+# shutdown
+
+- name: Override device configuration of all vlans with provided configuration.
+ cisco.nxos.nxos_vlans:
+ config:
+ - vlan_id: 5
+ name: test-vlan
+ - vlan_id: 10
+ state: active
+ state: overridden
+
+# After state:
+# ------------
+# vlan 5
+# name test-vlan
+# state active
+# no shutdown
+# vlan 10
+# state active
+# no shutdown
+
+
+# Using deleted
+
+# Before state:
+# -------------
+# vlan 1
+# vlan 5
+# vlan 10
+
+- name: Delete vlans.
+ cisco.nxos.nxos_vlans:
+ config:
+ - vlan_id: 5
+ - vlan_id: 10
+ state: deleted
+
+# After state:
+# ------------
+#
+
+# Using rendered
+
+- name: Use rendered state to convert task input to device specific commands
+ cisco.nxos.nxos_vlans:
+ config:
+ - vlan_id: 5
+ name: vlan5
+ mapped_vni: 100
+
+ - vlan_id: 6
+ name: vlan6
+ state: suspend
+ state: rendered
+
+# Task Output (redacted)
+# -----------------------
+
+# rendered:
+# - vlan 5
+# - name vlan5
+# - vn-segment 100
+# - vlan 6
+# - name vlan6
+# - state suspend
+
+# Using parsed
+
+# parsed.cfg
+# ------------
+# {
+# "TABLE_vlanbrief": {
+# "ROW_vlanbrief": [
+# {
+# "vlanshowbr-vlanid": "1",
+# "vlanshowbr-vlanid-utf": "1",
+# "vlanshowbr-vlanname": "default",
+# "vlanshowbr-vlanstate": "active",
+# "vlanshowbr-shutstate": "noshutdown"
+# },
+# {
+# "vlanshowbr-vlanid": "5",
+# "vlanshowbr-vlanid-utf": "5",
+# "vlanshowbr-vlanname": "vlan5",
+# "vlanshowbr-vlanstate": "suspend",
+# "vlanshowbr-shutstate": "noshutdown"
+# },
+# {
+# "vlanshowbr-vlanid": "6",
+# "vlanshowbr-vlanid-utf": "6",
+# "vlanshowbr-vlanname": "VLAN0006",
+# "vlanshowbr-vlanstate": "active",
+# "vlanshowbr-shutstate": "noshutdown"
+# },
+# {
+# "vlanshowbr-vlanid": "7",
+# "vlanshowbr-vlanid-utf": "7",
+# "vlanshowbr-vlanname": "vlan7",
+# "vlanshowbr-vlanstate": "active",
+# "vlanshowbr-shutstate": "noshutdown"
+# }
+# ]
+# },
+# "TABLE_mtuinfo": {
+# "ROW_mtuinfo": [
+# {
+# "vlanshowinfo-vlanid": "1",
+# "vlanshowinfo-media-type": "enet",
+# "vlanshowinfo-vlanmode": "ce-vlan"
+# },
+# {
+# "vlanshowinfo-vlanid": "5",
+# "vlanshowinfo-media-type": "enet",
+# "vlanshowinfo-vlanmode": "ce-vlan"
+# },
+# {
+# "vlanshowinfo-vlanid": "6",
+# "vlanshowinfo-media-type": "enet",
+# "vlanshowinfo-vlanmode": "ce-vlan"
+# },
+# {
+# "vlanshowinfo-vlanid": "7",
+# "vlanshowinfo-media-type": "enet",
+# "vlanshowinfo-vlanmode": "ce-vlan"
+# }
+# ]
+# }
+# }
+#
+# vlan 1,5-7
+# vlan 5
+# state suspend
+# name vlan5
+# vlan 7
+# name vlan7
+# vn-segment 100
+
+- name: Use parsed state to convert externally supplied config to structured format
+ cisco.nxos.nxos_vlans:
+ running_config: "{{ lookup('file', 'parsed.cfg') }}"
+ state: parsed
+
+# Task output (redacted)
+# -----------------------
+
+# parsed:
+# - vlan_id: 5
+# enabled: True
+# mode: "ce"
+# name: "vlan5"
+# state: suspend
+#
+# - vlan_id: 6
+# enabled: True
+# mode: "ce"
+# state: active
+#
+# - vlan_id: 7
+# enabled: True
+# mode: "ce"
+# name: "vlan7"
+# state: active
+# mapped_vni: 100
+
+# Using gathered
+
+# Existing device config state
+# -------------------------------
+# nxos-9k# show vlan | json
+# {"TABLE_vlanbrief": {"ROW_vlanbrief": [{"vlanshowbr-vlanid": "1", "vlanshowbr-vlanid-utf": "1", "vlanshowbr-vlanname": "default", "vlanshowbr-vlanstate
+# ": "active", "vlanshowbr-shutstate": "noshutdown"}, {"vlanshowbr-vlanid": "5", "vlanshowbr-vlanid-utf": "5", "vlanshowbr-vlanname": "vlan5", "vlanshowb
+# r-vlanstate": "suspend", "vlanshowbr-shutstate": "noshutdown"}, {"vlanshowbr-vlanid": "6", "vlanshowbr-vlanid-utf": "6", "vlanshowbr-vlanname": "VLAN00
+# 06", "vlanshowbr-vlanstate": "active", "vlanshowbr-shutstate": "noshutdown"}, {"vlanshowbr-vlanid": "7", "vlanshowbr-vlanid-utf": "7", "vlanshowbr-vlan
+# name": "vlan7", "vlanshowbr-vlanstate": "active", "vlanshowbr-shutstate": "shutdown"}]}, "TABLE_mtuinfo": {"ROW_mtuinfo": [{"vlanshowinfo-vlanid": "1",
+# "vlanshowinfo-media-type": "enet", "vlanshowinfo-vlanmode": "ce-vlan"}, {"vlanshowinfo-vlanid": "5", "vlanshowinfo-media-type": "enet", "vlanshowinfo-
+# vlanmode": "ce-vlan"}, {"vlanshowinfo-vlanid": "6", "vlanshowinfo-media-type": "enet", "vlanshowinfo-vlanmode": "ce-vlan"}, {"vlanshowinfo-vlanid": "7"
+# , "vlanshowinfo-media-type": "enet", "vlanshowinfo-vlanmode": "ce-vlan"}]}}
+#
+# nxos-9k# show running-config | section ^vlan
+# vlan 1,5-7
+# vlan 5
+# state suspend
+# name vlan5
+# vlan 7
+# shutdown
+# name vlan7
+# vn-segment 190
+
+- name: Gather vlans facts from the device using nxos_vlans
+ cisco.nxos.nxos_vlans:
+ state: gathered
+
+# Task output (redacted)
+# -----------------------
+# gathered:
+# - vlan_id: 5
+# enabled: True
+# mode: "ce"
+# name: "vlan5"
+# state: suspend
+#
+# - vlan_id: 6
+# enabled: True
+# mode: "ce"
+# state: active
+#
+# - vlan_id: 7
+# enabled: False
+# mode: "ce"
+# name: "vlan7"
+# state: active
+# mapped_vni: 190
+"""
+RETURN = """
+before:
+ description: The configuration as structured data prior to module invocation.
+ returned: always
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+after:
+ description: The configuration as structured data after module completion.
+ returned: when changed
+ type: list
+ sample: >
+ The configuration returned will always be in the same format
+ of the parameters above.
+commands:
+ description: The set of commands pushed to the remote device.
+ returned: always
+ type: list
+ sample: ['vlan 5', 'name test-vlan5', 'state suspend']
+"""
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.argspec.vlans.vlans import (
+ VlansArgs,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.vlans.vlans import (
+ Vlans,
+)
+
+
+def main():
+ """
+ Main entry point for module execution
+
+ :returns: the result form module invocation
+ """
+ module = AnsibleModule(
+ argument_spec=VlansArgs.argument_spec, supports_check_mode=True
+ )
+
+ result = Vlans(module).execute_module()
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vpc.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vpc.py
new file mode 100644
index 00000000..635af126
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vpc.py
@@ -0,0 +1,482 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vpc
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages global VPC configuration
+description:
+- Manages global VPC configuration
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- The feature vpc must be enabled before this module can be used
+- If not using management vrf, vrf must be globally on the device before using in
+ the pkl config
+- Although source IP isn't required on the command line it is required when using
+ this module. The PKL VRF must also be configured prior to using this module.
+- Both pkl_src and pkl_dest are needed when changing PKL VRF.
+options:
+ domain:
+ description:
+ - VPC domain
+ required: true
+ type: str
+ role_priority:
+ description:
+ - Role priority for device. Remember lower is better.
+ type: str
+ system_priority:
+ description:
+ - System priority device. Remember they must match between peers.
+ type: str
+ pkl_src:
+ description:
+ - Source IP address used for peer keepalive link
+ type: str
+ pkl_dest:
+ description:
+ - Destination (remote) IP address used for peer keepalive link
+ - pkl_dest is required whenever pkl options are used.
+ type: str
+ pkl_vrf:
+ description:
+ - VRF used for peer keepalive link
+ - The VRF must exist on the device before using pkl_vrf.
+ - "(Note) 'default' is an overloaded term: Default vrf context for pkl_vrf is
+ 'management'; 'pkl_vrf: default' refers to the literal 'default' rib."
+ type: str
+ peer_gw:
+ description:
+ - Enables/Disables peer gateway
+ type: bool
+ auto_recovery:
+ description:
+ - Enables/Disables auto recovery on platforms that support disable
+ - timers are not modifiable with this attribute
+ - mutually exclusive with auto_recovery_reload_delay
+ type: bool
+ auto_recovery_reload_delay:
+ description:
+ - Manages auto-recovery reload-delay timer in seconds
+ - mutually exclusive with auto_recovery
+ type: str
+ delay_restore:
+ description:
+ - manages delay restore command and config value in seconds
+ type: str
+ delay_restore_interface_vlan:
+ description:
+ - manages delay restore interface-vlan command and config value in seconds
+ - not supported on all platforms
+ type: str
+ delay_restore_orphan_port:
+ description:
+ - manages delay restore orphan-port command and config value in seconds
+ - not supported on all platforms
+ type: str
+ state:
+ description:
+ - Manages desired state of the resource
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+- name: configure a simple asn
+ cisco.nxos.nxos_vpc:
+ domain: 100
+ role_priority: 1000
+ system_priority: 2000
+ pkl_dest: 192.168.100.4
+ pkl_src: 10.1.100.20
+ peer_gw: true
+ auto_recovery: true
+
+- name: configure
+ cisco.nxos.nxos_vpc:
+ domain: 100
+ role_priority: 32667
+ system_priority: 2000
+ peer_gw: true
+ pkl_src: 10.1.100.2
+ pkl_dest: 192.168.100.4
+ auto_recovery: true
+
+- name: Configure VPC with delay restore and existing keepalive VRF
+ cisco.nxos.nxos_vpc:
+ domain: 10
+ role_priority: 28672
+ system_priority: 2000
+ delay_restore: 180
+ peer_gw: true
+ pkl_src: 1.1.1.2
+ pkl_dest: 1.1.1.1
+ pkl_vrf: vpckeepalive
+ auto_recovery: true
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["vpc domain 100",
+ "peer-keepalive destination 192.168.100.4 source 10.1.100.20 vrf management",
+ "auto-recovery", "peer-gateway"]
+"""
+
+import re
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+CONFIG_ARGS = {
+ "role_priority": "role priority {role_priority}",
+ "system_priority": "system-priority {system_priority}",
+ "delay_restore": "delay restore {delay_restore}",
+ "delay_restore_interface_vlan": "delay restore interface-vlan {delay_restore_interface_vlan}",
+ "delay_restore_orphan_port": "delay restore orphan-port {delay_restore_orphan_port}",
+ "peer_gw": "{peer_gw} peer-gateway",
+ "auto_recovery": "{auto_recovery} auto-recovery",
+ "auto_recovery_reload_delay": "auto-recovery reload-delay {auto_recovery_reload_delay}",
+}
+
+PARAM_TO_DEFAULT_KEYMAP = {
+ "delay_restore": "60",
+ "delay_restore_interface_vlan": "10",
+ "delay_restore_orphan_port": "0",
+ "role_priority": "32667",
+ "system_priority": "32667",
+ "peer_gw": False,
+ "auto_recovery_reload_delay": 240,
+}
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_vrf_list(module):
+
+ try:
+ body = run_commands(module, ["show vrf all | json"])[0]
+ vrf_table = body["TABLE_vrf"]["ROW_vrf"]
+ except (KeyError, AttributeError):
+ return []
+
+ vrf_list = []
+ if vrf_table:
+ for each in vrf_table:
+ vrf_list.append(str(each["vrf_name"].lower()))
+
+ return vrf_list
+
+
+def get_auto_recovery_default(module):
+ auto = False
+ data = run_commands(module, ["show inventory | json"])[0]
+ pid = data["TABLE_inv"]["ROW_inv"][0]["productid"]
+ if re.search(r"N7K", pid):
+ auto = True
+ elif re.search(r"N9K", pid):
+ data = run_commands(module, ["show hardware | json"])[0]
+ ver = data["kickstart_ver_str"]
+ if re.search(r"7.0\(3\)F", ver):
+ auto = True
+
+ return auto
+
+
+def get_vpc(module):
+ body = run_commands(module, ["show vpc | json"])[0]
+ if body:
+ domain = str(body["vpc-domain-id"])
+ else:
+ body = run_commands(module, ["show run vpc | inc domain"])[0]
+ if body:
+ domain = body.split()[2]
+ else:
+ domain = "not configured"
+
+ vpc = {}
+ if domain != "not configured":
+ run = get_config(module, flags=["vpc all"])
+ if run:
+ vpc["domain"] = domain
+ for key in PARAM_TO_DEFAULT_KEYMAP.keys():
+ vpc[key] = PARAM_TO_DEFAULT_KEYMAP.get(key)
+ vpc["auto_recovery"] = get_auto_recovery_default(module)
+ vpc_list = run.split("\n")
+ for each in vpc_list:
+ if "role priority" in each:
+ line = each.split()
+ vpc["role_priority"] = line[-1]
+ if "system-priority" in each:
+ line = each.split()
+ vpc["system_priority"] = line[-1]
+ if re.search(r"delay restore \d+", each):
+ line = each.split()
+ vpc["delay_restore"] = line[-1]
+ if "delay restore interface-vlan" in each:
+ line = each.split()
+ vpc["delay_restore_interface_vlan"] = line[-1]
+ if "delay restore orphan-port" in each:
+ line = each.split()
+ vpc["delay_restore_orphan_port"] = line[-1]
+ if "auto-recovery" in each:
+ vpc["auto_recovery"] = False if "no " in each else True
+ line = each.split()
+ vpc["auto_recovery_reload_delay"] = line[-1]
+ if "peer-gateway" in each:
+ vpc["peer_gw"] = False if "no " in each else True
+ if "peer-keepalive destination" in each:
+ # destination is reqd; src & vrf are optional
+ m = re.search(
+ r"destination (?P<pkl_dest>[\d.]+)"
+ r"(?:.* source (?P<pkl_src>[\d.]+))*"
+ r"(?:.* vrf (?P<pkl_vrf>\S+))*",
+ each,
+ )
+ if m:
+ for pkl in m.groupdict().keys():
+ if m.group(pkl):
+ vpc[pkl] = m.group(pkl)
+ return vpc
+
+
+def pkl_dependencies(module, delta, existing):
+ """peer-keepalive dependency checking.
+ 1. 'destination' is required with all pkl configs.
+ 2. If delta has optional pkl keywords present, then all optional pkl
+ keywords in existing must be added to delta, otherwise the device cli
+ will remove those values when the new config string is issued.
+ 3. The desired behavior for this set of properties is to merge changes;
+ therefore if an optional pkl property exists on the device but not
+ in the playbook, then that existing property should be retained.
+ Example:
+ CLI: peer-keepalive dest 10.1.1.1 source 10.1.1.2 vrf orange
+ Playbook: {pkl_dest: 10.1.1.1, pkl_vrf: blue}
+ Result: peer-keepalive dest 10.1.1.1 source 10.1.1.2 vrf blue
+ """
+ pkl_existing = [i for i in existing.keys() if i.startswith("pkl")]
+ for pkl in pkl_existing:
+ param = module.params.get(pkl)
+ if not delta.get(pkl):
+ if param and param == existing[pkl]:
+ # delta is missing this param because it's idempotent;
+ # however another pkl command has changed; therefore
+ # explicitly add it to delta so that the cli retains it.
+ delta[pkl] = existing[pkl]
+ elif param is None and existing[pkl]:
+ # retain existing pkl commands even if not in playbook
+ delta[pkl] = existing[pkl]
+
+
+def get_commands_to_config_vpc(module, vpc, domain, existing):
+ vpc = dict(vpc)
+
+ domain_only = vpc.get("domain")
+
+ commands = []
+ if "pkl_dest" in vpc:
+ pkl_command = "peer-keepalive destination {pkl_dest}".format(**vpc)
+ if "pkl_src" in vpc:
+ pkl_command += " source {pkl_src}".format(**vpc)
+ if "pkl_vrf" in vpc:
+ pkl_command += " vrf {pkl_vrf}".format(**vpc)
+ commands.append(pkl_command)
+
+ if "auto_recovery" in vpc:
+ if not vpc.get("auto_recovery"):
+ vpc["auto_recovery"] = "no"
+ else:
+ vpc["auto_recovery"] = ""
+
+ if "peer_gw" in vpc:
+ if not vpc.get("peer_gw"):
+ vpc["peer_gw"] = "no"
+ else:
+ vpc["peer_gw"] = ""
+
+ for param in vpc:
+ command = CONFIG_ARGS.get(param)
+ if command is not None:
+ command = command.format(**vpc).strip()
+ if "peer-gateway" in command:
+ commands.append("terminal dont-ask")
+ commands.append(command)
+
+ if commands or domain_only:
+ commands.insert(0, "vpc domain {0}".format(domain))
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ domain=dict(required=True, type="str"),
+ role_priority=dict(required=False, type="str"),
+ system_priority=dict(required=False, type="str"),
+ pkl_src=dict(required=False),
+ pkl_dest=dict(required=False),
+ pkl_vrf=dict(required=False),
+ peer_gw=dict(required=False, type="bool"),
+ auto_recovery=dict(required=False, type="bool"),
+ auto_recovery_reload_delay=dict(required=False, type="str"),
+ delay_restore=dict(required=False, type="str"),
+ delay_restore_interface_vlan=dict(required=False, type="str"),
+ delay_restore_orphan_port=dict(required=False, type="str"),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ mutually_exclusive = [("auto_recovery", "auto_recovery_reload_delay")]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ results = {"changed": False, "warnings": warnings}
+
+ domain = module.params["domain"]
+ role_priority = module.params["role_priority"]
+ system_priority = module.params["system_priority"]
+ pkl_src = module.params["pkl_src"]
+ pkl_dest = module.params["pkl_dest"]
+ pkl_vrf = module.params["pkl_vrf"]
+ peer_gw = module.params["peer_gw"]
+ auto_recovery = module.params["auto_recovery"]
+ auto_recovery_reload_delay = module.params["auto_recovery_reload_delay"]
+ delay_restore = module.params["delay_restore"]
+ delay_restore_interface_vlan = module.params[
+ "delay_restore_interface_vlan"
+ ]
+ delay_restore_orphan_port = module.params["delay_restore_orphan_port"]
+ state = module.params["state"]
+
+ args = dict(
+ domain=domain,
+ role_priority=role_priority,
+ system_priority=system_priority,
+ pkl_src=pkl_src,
+ pkl_dest=pkl_dest,
+ pkl_vrf=pkl_vrf,
+ peer_gw=peer_gw,
+ auto_recovery=auto_recovery,
+ auto_recovery_reload_delay=auto_recovery_reload_delay,
+ delay_restore=delay_restore,
+ delay_restore_interface_vlan=delay_restore_interface_vlan,
+ delay_restore_orphan_port=delay_restore_orphan_port,
+ )
+
+ if not pkl_dest:
+ if pkl_src:
+ module.fail_json(
+ msg="dest IP for peer-keepalive is required"
+ " when src IP is present"
+ )
+ elif pkl_vrf:
+ if pkl_vrf != "management":
+ module.fail_json(
+ msg="dest and src IP for peer-keepalive are required"
+ " when vrf is present"
+ )
+ else:
+ module.fail_json(
+ msg="dest IP for peer-keepalive is required"
+ " when vrf is present"
+ )
+ if pkl_vrf:
+ if pkl_vrf.lower() not in get_vrf_list(module):
+ module.fail_json(
+ msg="The VRF you are trying to use for the peer "
+ "keepalive link is not on device yet. Add it"
+ " first, please."
+ )
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+ existing = get_vpc(module)
+
+ commands = []
+ if state == "present":
+ delta = {}
+ for key, value in proposed.items():
+ if str(value).lower() == "default" and key != "pkl_vrf":
+ # 'default' is a reserved word for vrf
+ value = PARAM_TO_DEFAULT_KEYMAP.get(key)
+ if existing.get(key) != value:
+ delta[key] = value
+
+ if delta:
+ pkl_dependencies(module, delta, existing)
+ command = get_commands_to_config_vpc(
+ module, delta, domain, existing
+ )
+ commands.append(command)
+ elif state == "absent":
+ if existing:
+ if domain != existing["domain"]:
+ module.fail_json(
+ msg="You are trying to remove a domain that "
+ "does not exist on the device"
+ )
+ else:
+ commands.append("terminal dont-ask")
+ commands.append("no vpc domain {0}".format(domain))
+
+ cmds = flatten_list(commands)
+ results["commands"] = cmds
+
+ if cmds:
+ results["changed"] = True
+ if not module.check_mode:
+ load_config(module, cmds)
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vpc_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vpc_interface.py
new file mode 100644
index 00000000..034582ea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vpc_interface.py
@@ -0,0 +1,353 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vpc_interface
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages interface VPC configuration
+description:
+- Manages interface VPC configuration
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- Either vpc or peer_link param is required, but not both.
+- C(state=absent) removes whatever VPC config is on a port-channel if one exists.
+- Re-assigning a vpc or peerlink from one portchannel to another is not supported. The
+ module will force the user to unconfigure an existing vpc/pl before configuring
+ the same value on a new portchannel
+options:
+ portchannel:
+ description:
+ - Group number of the portchannel that will be configured.
+ required: true
+ type: str
+ vpc:
+ description:
+ - VPC group/id that will be configured on associated portchannel.
+ type: str
+ peer_link:
+ description:
+ - Set to true/false for peer link config on associated portchannel.
+ type: bool
+ state:
+ description:
+ - Manages desired state of the resource.
+ choices:
+ - present
+ - absent
+ default: present
+ type: str
+"""
+
+EXAMPLES = """
+- cisco.nxos.nxos_vpc_interface:
+ portchannel: 10
+ vpc: 100
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["interface port-channel100", "vpc 10"]
+"""
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_portchannel_list(module):
+ portchannels = []
+ pc_list = []
+
+ try:
+ body = run_commands(module, ["show port-channel summary | json"])[0]
+ pc_list = body["TABLE_channel"]["ROW_channel"]
+ except (KeyError, AttributeError, TypeError):
+ return portchannels
+
+ if pc_list:
+ if isinstance(pc_list, dict):
+ pc_list = [pc_list]
+
+ for pc in pc_list:
+ portchannels.append(pc["group"])
+
+ return portchannels
+
+
+def get_existing_portchannel_to_vpc_mappings(module):
+ pc_vpc_mapping = {}
+
+ try:
+ body = run_commands(module, ["show vpc brief | json"])[0]
+ vpc_table = body["TABLE_vpc"]["ROW_vpc"]
+ except (KeyError, AttributeError, TypeError):
+ vpc_table = None
+
+ if vpc_table:
+ if isinstance(vpc_table, dict):
+ vpc_table = [vpc_table]
+
+ for vpc in vpc_table:
+ pc_vpc_mapping[str(vpc["vpc-id"])] = str(vpc["vpc-ifindex"])
+
+ return pc_vpc_mapping
+
+
+def peer_link_exists(module):
+ found = False
+ run = get_config(module, flags=["vpc"])
+
+ vpc_list = run.split("\n")
+ for each in vpc_list:
+ if "peer-link" in each:
+ found = True
+ return found
+
+
+def get_active_vpc_peer_link(module):
+ peer_link = None
+
+ try:
+ body = run_commands(module, ["show vpc brief | json"])[0]
+ peer_link = body["TABLE_peerlink"]["ROW_peerlink"]["peerlink-ifindex"]
+ except (KeyError, AttributeError, TypeError):
+ return peer_link
+
+ return peer_link
+
+
+def get_portchannel_vpc_config(module, portchannel):
+ peer_link_pc = None
+ peer_link = False
+ vpc = ""
+ pc = ""
+ config = {}
+
+ try:
+ body = run_commands(module, ["show vpc brief | json"])[0]
+ table = body["TABLE_peerlink"]["ROW_peerlink"]
+ except (KeyError, AttributeError, TypeError):
+ table = {}
+
+ if table:
+ peer_link_pc = table.get("peerlink-ifindex", None)
+
+ if peer_link_pc:
+ plpc = str(peer_link_pc[2:])
+ if portchannel == plpc:
+ config["portchannel"] = portchannel
+ config["peer-link"] = True
+ config["vpc"] = vpc
+
+ mapping = get_existing_portchannel_to_vpc_mappings(module)
+
+ for existing_vpc, port_channel in mapping.items():
+ port_ch = str(port_channel[2:])
+ if port_ch == portchannel:
+ pc = port_ch
+ vpc = str(existing_vpc)
+
+ config["portchannel"] = pc
+ config["peer-link"] = peer_link
+ config["vpc"] = vpc
+
+ return config
+
+
+def get_commands_to_config_vpc_interface(
+ portchannel, delta, config_value, existing
+):
+ commands = []
+
+ if not delta.get("peer-link") and existing.get("peer-link"):
+ commands.append("no vpc peer-link")
+ commands.insert(0, "interface port-channel{0}".format(portchannel))
+
+ elif delta.get("peer-link") and not existing.get("peer-link"):
+ commands.append("vpc peer-link")
+ commands.insert(0, "interface port-channel{0}".format(portchannel))
+
+ elif delta.get("vpc") and not existing.get("vpc"):
+ command = "vpc {0}".format(config_value)
+ commands.append(command)
+ commands.insert(0, "interface port-channel{0}".format(portchannel))
+
+ return commands
+
+
+def state_present(portchannel, delta, config_value, existing):
+ commands = []
+
+ command = get_commands_to_config_vpc_interface(
+ portchannel, delta, config_value, existing
+ )
+ commands.append(command)
+
+ return commands
+
+
+def state_absent(portchannel, existing):
+ commands = []
+ if existing.get("vpc"):
+ command = "no vpc"
+ commands.append(command)
+ elif existing.get("peer-link"):
+ command = "no vpc peer-link"
+ commands.append(command)
+ if commands:
+ commands.insert(0, "interface port-channel{0}".format(portchannel))
+
+ return commands
+
+
+def main():
+ argument_spec = dict(
+ portchannel=dict(required=True, type="str"),
+ vpc=dict(required=False, type="str"),
+ peer_link=dict(required=False, type="bool"),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=[["vpc", "peer_link"]],
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ commands = []
+ results = {"changed": False, "warnings": warnings}
+
+ portchannel = module.params["portchannel"]
+ vpc = module.params["vpc"]
+ peer_link = module.params["peer_link"]
+ state = module.params["state"]
+
+ args = {"portchannel": portchannel, "vpc": vpc, "peer-link": peer_link}
+ active_peer_link = None
+
+ if portchannel not in get_portchannel_list(module):
+ if not portchannel.isdigit() or int(
+ portchannel
+ ) not in get_portchannel_list(module):
+ module.fail_json(
+ msg="The portchannel you are trying to make a"
+ " VPC or PL is not created yet. "
+ "Create it first!"
+ )
+ if vpc:
+ mapping = get_existing_portchannel_to_vpc_mappings(module)
+
+ if vpc in mapping and portchannel != mapping[vpc].strip("Po"):
+ module.fail_json(
+ msg="This vpc is already configured on "
+ "another portchannel. Remove it first "
+ "before trying to assign it here. ",
+ existing_portchannel=mapping[vpc],
+ )
+
+ for vpcid, existing_pc in mapping.items():
+ if portchannel == existing_pc.strip("Po") and vpcid != vpc:
+ module.fail_json(
+ msg="This portchannel already has another"
+ " VPC configured. Remove it first "
+ "before assigning this one",
+ existing_vpc=vpcid,
+ )
+
+ if peer_link_exists(module):
+ active_peer_link = get_active_vpc_peer_link(module)
+ if active_peer_link[-2:] == portchannel:
+ module.fail_json(
+ msg="That port channel is the current "
+ "PEER LINK. Remove it if you want it"
+ " to be a VPC"
+ )
+ config_value = vpc
+
+ elif peer_link is not None:
+ if peer_link_exists(module):
+ active_peer_link = get_active_vpc_peer_link(module)[2::]
+ if active_peer_link != portchannel:
+ if peer_link:
+ module.fail_json(
+ msg="A peer link already exists on"
+ " the device. Remove it first",
+ current_peer_link="Po{0}".format(active_peer_link),
+ )
+ config_value = "peer-link"
+
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+ existing = get_portchannel_vpc_config(module, portchannel)
+
+ if state == "present":
+ delta = dict(set(proposed.items()).difference(existing.items()))
+ if delta:
+ commands = state_present(
+ portchannel, delta, config_value, existing
+ )
+
+ elif state == "absent" and existing:
+ commands = state_absent(portchannel, existing)
+
+ cmds = flatten_list(commands)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ load_config(module, cmds)
+ results["changed"] = True
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ results["commands"] = cmds
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrf.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrf.py
new file mode 100644
index 00000000..be6a921c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrf.py
@@ -0,0 +1,643 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vrf
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages global VRF configuration.
+description:
+- This module provides declarative management of VRFs on CISCO NXOS network devices.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+- Trishna Guha (@trishnaguha)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- Cisco NX-OS creates the default VRF by itself. Therefore, you're not allowed to
+ use default as I(vrf) name in this module.
+- C(vrf) name must be shorter than 32 chars.
+- VRF names are not case sensible in NX-OS. Anyway, the name is stored just like it's
+ inserted by the user and it'll not be changed again unless the VRF is removed and
+ re-created. i.e. C(vrf=NTC) will create a VRF named NTC, but running it again with
+ C(vrf=ntc) will not cause a configuration change.
+options:
+ name:
+ description:
+ - Name of VRF to be managed.
+ aliases:
+ - vrf
+ type: str
+ admin_state:
+ description:
+ - Administrative state of the VRF.
+ default: up
+ choices:
+ - up
+ - down
+ type: str
+ vni:
+ description:
+ - Specify virtual network identifier. Valid values are Integer or keyword 'default'.
+ type: str
+ rd:
+ description:
+ - VPN Route Distinguisher (RD). Valid values are a string in one of the route-distinguisher
+ formats (ASN2:NN, ASN4:NN, or IPV4:NN); the keyword 'auto', or the keyword 'default'.
+ type: str
+ interfaces:
+ description:
+ - List of interfaces to check the VRF has been configured correctly or keyword
+ 'default'.
+ type: list
+ elements: str
+ associated_interfaces:
+ description:
+ - This is a intent option and checks the operational state of the for given vrf
+ C(name) for associated interfaces. If the value in the C(associated_interfaces)
+ does not match with the operational state of vrf interfaces on device it will
+ result in failure.
+ type: list
+ elements: str
+ aggregate:
+ description: List of VRFs definitions.
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name of VRF to be managed.
+ aliases:
+ - vrf
+ type: str
+ admin_state:
+ description:
+ - Administrative state of the VRF.
+ choices:
+ - up
+ - down
+ type: str
+ vni:
+ description:
+ - Specify virtual network identifier. Valid values are Integer or keyword 'default'.
+ type: str
+ rd:
+ description:
+ - VPN Route Distinguisher (RD). Valid values are a string in one of the route-distinguisher
+ formats (ASN2:NN, ASN4:NN, or IPV4:NN); the keyword 'auto', or the keyword 'default'.
+ type: str
+ interfaces:
+ description:
+ - List of interfaces to check the VRF has been configured correctly or keyword
+ 'default'.
+ type: list
+ elements: str
+ associated_interfaces:
+ description:
+ - This is a intent option and checks the operational state of the for given vrf
+ C(name) for associated interfaces. If the value in the C(associated_interfaces)
+ does not match with the operational state of vrf interfaces on device it will
+ result in failure.
+ type: list
+ elements: str
+ state:
+ description:
+ - Manages desired state of the resource.
+ choices:
+ - present
+ - absent
+ type: str
+ description:
+ description:
+ - Description of the VRF or keyword 'default'.
+ type: str
+ delay:
+ description:
+ - Time in seconds to wait before checking for the operational state on remote
+ device. This wait is applicable for operational state arguments.
+ type: int
+ purge:
+ description:
+ - Purge VRFs not defined in the I(aggregate) parameter.
+ type: bool
+ default: no
+ state:
+ description:
+ - Manages desired state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+ description:
+ description:
+ - Description of the VRF or keyword 'default'.
+ type: str
+ delay:
+ description:
+ - Time in seconds to wait before checking for the operational state on remote
+ device. This wait is applicable for operational state arguments.
+ default: 10
+ type: int
+"""
+
+EXAMPLES = """
+- name: Ensure ntc VRF exists on switch
+ cisco.nxos.nxos_vrf:
+ name: ntc
+ description: testing
+ state: present
+
+- name: Aggregate definition of VRFs
+ cisco.nxos.nxos_vrf:
+ aggregate:
+ - {name: test1, description: Testing, admin_state: down}
+ - {name: test2, interfaces: Ethernet1/2}
+
+- name: Aggregate definitions of VRFs with Purge
+ cisco.nxos.nxos_vrf:
+ aggregate:
+ - {name: ntc1, description: purge test1}
+ - {name: ntc2, description: purge test2}
+ state: present
+ purge: yes
+
+- name: Delete VRFs exist on switch
+ cisco.nxos.nxos_vrf:
+ aggregate:
+ - {name: ntc1}
+ - {name: ntc2}
+ state: absent
+
+- name: Assign interfaces to VRF declaratively
+ cisco.nxos.nxos_vrf:
+ name: test1
+ interfaces:
+ - Ethernet2/3
+ - Ethernet2/5
+
+- name: Check interfaces assigned to VRF
+ cisco.nxos.nxos_vrf:
+ name: test1
+ associated_interfaces:
+ - Ethernet2/3
+ - Ethernet2/5
+
+- name: Ensure VRF is tagged with interface Ethernet2/5 only (Removes from Ethernet2/3)
+ cisco.nxos.nxos_vrf:
+ name: test1
+ interfaces:
+ - Ethernet2/5
+
+- name: Delete VRF
+ cisco.nxos.nxos_vrf:
+ name: ntc
+ state: absent
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample:
+ - vrf context ntc
+ - no shutdown
+ - interface Ethernet1/2
+ - no switchport
+ - vrf member test2
+"""
+
+import re
+import time
+
+from copy import deepcopy
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+ get_interface_type,
+)
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
+ remove_default_spec,
+)
+
+
+def search_obj_in_list(name, lst):
+ for o in lst:
+ if o["name"] == name:
+ return o
+
+
+def execute_show_command(command, module):
+ if "show run" not in command:
+ output = "json"
+ else:
+ output = "text"
+ cmds = [{"command": command, "output": output}]
+ body = run_commands(module, cmds)
+ return body
+
+
+def get_existing_vrfs(module):
+ objs = list()
+ command = "show vrf all"
+ try:
+ body = execute_show_command(command, module)[0]
+ except IndexError:
+ return list()
+ try:
+ vrf_table = body["TABLE_vrf"]["ROW_vrf"]
+ except (TypeError, IndexError, KeyError):
+ return list()
+
+ if isinstance(vrf_table, list):
+ for vrf in vrf_table:
+ obj = {}
+ obj["name"] = vrf["vrf_name"]
+ objs.append(obj)
+
+ elif isinstance(vrf_table, dict):
+ obj = {}
+ obj["name"] = vrf_table["vrf_name"]
+ objs.append(obj)
+
+ return objs
+
+
+def map_obj_to_commands(updates, module):
+ commands = list()
+ want, have = updates
+ state = module.params["state"]
+ purge = module.params["purge"]
+
+ args = ("rd", "description", "vni")
+
+ for w in want:
+ name = w["name"]
+ admin_state = w["admin_state"]
+ vni = w["vni"]
+ interfaces = w.get("interfaces") or []
+ if purge:
+ state = "absent"
+ else:
+ state = w["state"]
+ del w["state"]
+
+ obj_in_have = search_obj_in_list(name, have)
+ if state == "absent" and obj_in_have:
+ commands.append("no vrf context {0}".format(name))
+
+ elif state == "present":
+ if not obj_in_have:
+ commands.append("vrf context {0}".format(name))
+ for item in args:
+ candidate = w.get(item)
+ if candidate and candidate != "default":
+ cmd = item + " " + str(candidate)
+ commands.append(cmd)
+ if admin_state == "up":
+ commands.append("no shutdown")
+ elif admin_state == "down":
+ commands.append("shutdown")
+ commands.append("exit")
+
+ if interfaces and interfaces[0] != "default":
+ for i in interfaces:
+ commands.append("interface {0}".format(i))
+ if get_interface_type(i) in (
+ "ethernet",
+ "portchannel",
+ ):
+ commands.append("no switchport")
+ commands.append("vrf member {0}".format(name))
+
+ else:
+ # If vni is already configured on vrf, unconfigure it first.
+ if vni:
+ if obj_in_have.get("vni") and vni != obj_in_have.get(
+ "vni"
+ ):
+ commands.append(
+ "no vni {0}".format(obj_in_have.get("vni"))
+ )
+
+ for item in args:
+ candidate = w.get(item)
+ if candidate == "default":
+ if obj_in_have.get(item):
+ cmd = "no " + item + " " + obj_in_have.get(item)
+ commands.append(cmd)
+ elif candidate and candidate != obj_in_have.get(item):
+ cmd = item + " " + str(candidate)
+ commands.append(cmd)
+ if admin_state and admin_state != obj_in_have.get(
+ "admin_state"
+ ):
+ if admin_state == "up":
+ commands.append("no shutdown")
+ elif admin_state == "down":
+ commands.append("shutdown")
+
+ if commands:
+ commands.insert(0, "vrf context {0}".format(name))
+ commands.append("exit")
+
+ if interfaces and interfaces[0] != "default":
+ if not obj_in_have["interfaces"]:
+ for i in interfaces:
+ commands.append("vrf context {0}".format(name))
+ commands.append("exit")
+ commands.append("interface {0}".format(i))
+ if get_interface_type(i) in (
+ "ethernet",
+ "portchannel",
+ ):
+ commands.append("no switchport")
+ commands.append("vrf member {0}".format(name))
+
+ elif set(interfaces) != set(obj_in_have["interfaces"]):
+ missing_interfaces = list(
+ set(interfaces) - set(obj_in_have["interfaces"])
+ )
+ for i in missing_interfaces:
+ commands.append("vrf context {0}".format(name))
+ commands.append("exit")
+ commands.append("interface {0}".format(i))
+ if get_interface_type(i) in (
+ "ethernet",
+ "portchannel",
+ ):
+ commands.append("no switchport")
+ commands.append("vrf member {0}".format(name))
+
+ superfluous_interfaces = list(
+ set(obj_in_have["interfaces"]) - set(interfaces)
+ )
+ for i in superfluous_interfaces:
+ commands.append("vrf context {0}".format(name))
+ commands.append("exit")
+ commands.append("interface {0}".format(i))
+ if get_interface_type(i) in (
+ "ethernet",
+ "portchannel",
+ ):
+ commands.append("no switchport")
+ commands.append("no vrf member {0}".format(name))
+ elif interfaces and interfaces[0] == "default":
+ if obj_in_have["interfaces"]:
+ for i in obj_in_have["interfaces"]:
+ commands.append("vrf context {0}".format(name))
+ commands.append("exit")
+ commands.append("interface {0}".format(i))
+ if get_interface_type(i) in (
+ "ethernet",
+ "portchannel",
+ ):
+ commands.append("no switchport")
+ commands.append("no vrf member {0}".format(name))
+
+ if purge:
+ existing = get_existing_vrfs(module)
+ if existing:
+ for h in existing:
+ if h["name"] in ("default", "management"):
+ pass
+ else:
+ obj_in_want = search_obj_in_list(h["name"], want)
+ if not obj_in_want:
+ commands.append("no vrf context {0}".format(h["name"]))
+
+ return commands
+
+
+def validate_vrf(name, module):
+ if name:
+ name = name.strip()
+ if name == "default":
+ module.fail_json(msg="cannot use default as name of a VRF")
+ elif len(name) > 32:
+ module.fail_json(
+ msg="VRF name exceeded max length of 32", name=name
+ )
+ else:
+ return name
+
+
+def map_params_to_obj(module):
+ obj = []
+ aggregate = module.params.get("aggregate")
+ if aggregate:
+ for item in aggregate:
+ for key in item:
+ if item.get(key) is None:
+ item[key] = module.params[key]
+
+ d = item.copy()
+ d["name"] = validate_vrf(d["name"], module)
+ obj.append(d)
+ else:
+ obj.append(
+ {
+ "name": validate_vrf(module.params["name"], module),
+ "description": module.params["description"],
+ "vni": module.params["vni"],
+ "rd": module.params["rd"],
+ "admin_state": module.params["admin_state"],
+ "state": module.params["state"],
+ "interfaces": module.params["interfaces"],
+ "associated_interfaces": module.params[
+ "associated_interfaces"
+ ],
+ }
+ )
+ return obj
+
+
+def get_value(arg, config, module):
+ extra_arg_regex = re.compile(r"(?:{0}\s)(?P<value>.*)$".format(arg), re.M)
+ value = ""
+ if arg in config:
+ value = extra_arg_regex.search(config).group("value")
+ return value
+
+
+def map_config_to_obj(want, element_spec, module):
+ objs = list()
+
+ for w in want:
+ obj = deepcopy(element_spec)
+ del obj["delay"]
+ del obj["state"]
+
+ command = "show vrf {0}".format(w["name"])
+ try:
+ body = execute_show_command(command, module)[0]
+ vrf_table = body["TABLE_vrf"]["ROW_vrf"]
+ except (TypeError, IndexError):
+ return list()
+
+ name = vrf_table["vrf_name"]
+ obj["name"] = name
+ obj["admin_state"] = vrf_table["vrf_state"].lower()
+
+ command = "show run all | section vrf.context.{0}".format(name)
+ body = execute_show_command(command, module)[0]
+ extra_params = ["vni", "rd", "description"]
+ for param in extra_params:
+ obj[param] = get_value(param, body, module)
+
+ obj["interfaces"] = []
+ command = "show vrf {0} interface".format(name)
+ try:
+ body = execute_show_command(command, module)[0]
+ vrf_int = body["TABLE_if"]["ROW_if"]
+ except (TypeError, IndexError):
+ vrf_int = None
+
+ if vrf_int:
+ if isinstance(vrf_int, list):
+ for i in vrf_int:
+ intf = i["if_name"]
+ obj["interfaces"].append(intf)
+ elif isinstance(vrf_int, dict):
+ intf = vrf_int["if_name"]
+ obj["interfaces"].append(intf)
+
+ objs.append(obj)
+ return objs
+
+
+def check_declarative_intent_params(want, module, element_spec, result):
+
+ have = None
+ is_delay = False
+
+ for w in want:
+ if w.get("associated_interfaces") is None:
+ continue
+
+ if result["changed"] and not is_delay:
+ time.sleep(module.params["delay"])
+ is_delay = True
+
+ if have is None:
+ have = map_config_to_obj(want, element_spec, module)
+
+ for i in w["associated_interfaces"]:
+ obj_in_have = search_obj_in_list(w["name"], have)
+
+ if obj_in_have:
+ interfaces = obj_in_have.get("interfaces")
+ if interfaces is not None and i not in interfaces:
+ module.fail_json(
+ msg="Interface %s not configured on vrf %s"
+ % (i, w["name"])
+ )
+
+
+def vrf_error_check(module, commands, responses):
+ """Checks for VRF config errors and executes a retry in some circumstances.
+ """
+ pattern = "ERROR: Deletion of VRF .* in progress"
+ if re.search(pattern, str(responses)):
+ # Allow delay/retry for VRF changes
+ time.sleep(15)
+ responses = load_config(
+ module, commands, opts={"catch_clierror": True}
+ )
+ if re.search(pattern, str(responses)):
+ module.fail_json(
+ msg="VRF config (and retry) failure: %s " % responses
+ )
+ module.warn("VRF config delayed by VRF deletion - passed on retry")
+
+
+def main():
+ """ main entry point for module execution
+ """
+ element_spec = dict(
+ name=dict(type="str", aliases=["vrf"]),
+ description=dict(type="str"),
+ vni=dict(type="str"),
+ rd=dict(type="str"),
+ admin_state=dict(type="str", default="up", choices=["up", "down"]),
+ interfaces=dict(type="list", elements="str"),
+ associated_interfaces=dict(type="list", elements="str"),
+ delay=dict(type="int", default=10),
+ state=dict(
+ type="str", default="present", choices=["present", "absent"]
+ ),
+ )
+
+ aggregate_spec = deepcopy(element_spec)
+
+ # remove default in aggregate spec, to handle common arguments
+ remove_default_spec(aggregate_spec)
+
+ argument_spec = dict(
+ aggregate=dict(type="list", elements="dict", options=aggregate_spec),
+ purge=dict(type="bool", default=False),
+ )
+
+ argument_spec.update(element_spec)
+ argument_spec.update(nxos_argument_spec)
+
+ required_one_of = [["name", "aggregate"]]
+ mutually_exclusive = [["name", "aggregate"]]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ required_one_of=required_one_of,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ result = {"changed": False}
+ if warnings:
+ result["warnings"] = warnings
+
+ want = map_params_to_obj(module)
+ have = map_config_to_obj(want, element_spec, module)
+
+ commands = map_obj_to_commands((want, have), module)
+ result["commands"] = commands
+
+ if commands and not module.check_mode:
+ responses = load_config(
+ module, commands, opts={"catch_clierror": True}
+ )
+ vrf_error_check(module, commands, responses)
+ result["changed"] = True
+
+ check_declarative_intent_params(want, module, element_spec, result)
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrf_af.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrf_af.py
new file mode 100644
index 00000000..9ac10a0e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrf_af.py
@@ -0,0 +1,283 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vrf_af
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages VRF AF.
+description:
+- Manages VRF AF
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- Default, where supported, restores params default value.
+- In case of C(state=absent) the address-family configuration will be absent. Therefore
+ the options C(route_target_both_auto_evpn) and C(route_targets) are ignored.
+options:
+ vrf:
+ description:
+ - Name of the VRF.
+ required: true
+ type: str
+ afi:
+ description:
+ - Address-Family Identifier (AFI).
+ required: true
+ choices:
+ - ipv4
+ - ipv6
+ type: str
+ route_target_both_auto_evpn:
+ description:
+ - Enable/Disable the EVPN route-target 'auto' setting for both import and export
+ target communities.
+ type: bool
+ route_targets:
+ description:
+ - Specify the route-targets which should be imported and/or exported under the
+ AF. This argument accepts a list of dicts that specify the route-target, the
+ direction (import|export|both) and state of each route-target. Default direction
+ is C(direction=both). See examples.
+ suboptions:
+ rt:
+ description:
+ - Defines the route-target itself
+ required: true
+ type: str
+ direction:
+ description:
+ - Indicates the direction of the route-target (import|export|both)
+ choices:
+ - import
+ - export
+ - both
+ default: both
+ type: str
+ state:
+ description:
+ - Determines whether the route-target with the given direction should be present
+ or not on the device.
+ choices:
+ - present
+ - absent
+ default: present
+ type: str
+ elements: dict
+ type: list
+ state:
+ description:
+ - Determines whether the config should be present or not on the device.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+- cisco.nxos.nxos_vrf_af:
+ vrf: ntc
+ afi: ipv4
+ route_target_both_auto_evpn: true
+ state: present
+
+- cisco.nxos.nxos_vrf_af:
+ vrf: ntc
+ afi: ipv4
+ route_targets:
+ - rt: 65000:1000
+ direction: import
+ - rt: 65001:1000
+ direction: import
+
+- cisco.nxos.nxos_vrf_af:
+ vrf: ntc
+ afi: ipv4
+ route_targets:
+ - rt: 65000:1000
+ direction: import
+ - rt: 65001:1000
+ state: absent
+
+- cisco.nxos.nxos_vrf_af:
+ vrf: ntc
+ afi: ipv4
+ route_targets:
+ - rt: 65000:1000
+ direction: export
+ - rt: 65001:1000
+ direction: export
+
+- cisco.nxos.nxos_vrf_af:
+ vrf: ntc
+ afi: ipv4
+ route_targets:
+ - rt: 65000:1000
+ direction: export
+ state: absent
+
+- cisco.nxos.nxos_vrf_af:
+ vrf: ntc
+ afi: ipv4
+ route_targets:
+ - rt: 65000:1000
+ direction: both
+ state: present
+ - rt: 65001:1000
+ direction: import
+ state: present
+ - rt: 65002:1000
+ direction: both
+ state: absent
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["vrf context ntc", "address-family ipv4 unicast"]
+"""
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ NetworkConfig,
+)
+
+import re
+
+
+def match_current_rt(rt, direction, current, rt_commands):
+ command = "route-target %s %s" % (direction, rt.get("rt"))
+ match = re.findall(command, current, re.M)
+ want = bool(rt.get("state") != "absent")
+ if not match and want:
+ rt_commands.append(command)
+ elif match and not want:
+ rt_commands.append("no %s" % command)
+ return rt_commands
+
+
+def main():
+ argument_spec = dict(
+ vrf=dict(required=True),
+ afi=dict(required=True, choices=["ipv4", "ipv6"]),
+ route_target_both_auto_evpn=dict(required=False, type="bool"),
+ state=dict(choices=["present", "absent"], default="present"),
+ route_targets=dict(
+ type="list",
+ elements="dict",
+ options=dict(
+ rt=dict(type="str", required=True),
+ direction=dict(
+ choices=["import", "export", "both"], default="both"
+ ),
+ state=dict(choices=["present", "absent"], default="present"),
+ ),
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ result = {"changed": False, "warnings": warnings}
+
+ config_text = get_config(module)
+ config = NetworkConfig(indent=2, contents=config_text)
+
+ path = [
+ "vrf context %s" % module.params["vrf"],
+ "address-family %s unicast" % module.params["afi"],
+ ]
+
+ try:
+ current = config.get_block_config(path)
+ except ValueError:
+ current = None
+
+ commands = list()
+ if current and module.params["state"] == "absent":
+ commands.append("no address-family %s unicast" % module.params["afi"])
+
+ elif module.params["state"] == "present":
+ rt_commands = list()
+
+ if not current:
+ commands.append("address-family %s unicast" % module.params["afi"])
+ current = ""
+
+ have_auto_evpn = "route-target both auto evpn" in current
+ if module.params["route_target_both_auto_evpn"] is not None:
+ want_auto_evpn = bool(module.params["route_target_both_auto_evpn"])
+ if want_auto_evpn and not have_auto_evpn:
+ commands.append("route-target both auto evpn")
+ elif have_auto_evpn and not want_auto_evpn:
+ commands.append("no route-target both auto evpn")
+
+ if module.params["route_targets"] is not None:
+ for rt in module.params["route_targets"]:
+ if rt.get("direction") == "both" or not rt.get("direction"):
+ rt_commands = match_current_rt(
+ rt, "import", current, rt_commands
+ )
+ rt_commands = match_current_rt(
+ rt, "export", current, rt_commands
+ )
+ else:
+ rt_commands = match_current_rt(
+ rt, rt.get("direction"), current, rt_commands
+ )
+
+ if rt_commands:
+ commands.extend(rt_commands)
+
+ if commands and current:
+ commands.insert(
+ 0, "address-family %s unicast" % module.params["afi"]
+ )
+
+ if commands:
+ commands.insert(0, "vrf context %s" % module.params["vrf"])
+ if not module.check_mode:
+ load_config(module, commands)
+ result["changed"] = True
+
+ result["commands"] = commands
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrf_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrf_interface.py
new file mode 100644
index 00000000..37826176
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrf_interface.py
@@ -0,0 +1,278 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vrf_interface
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages interface specific VRF configuration.
+description:
+- Manages interface specific VRF configuration.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- VRF needs to be added globally with M(cisco.nxos.nxos_vrf) before adding a VRF to an interface.
+- Remove a VRF from an interface will still remove all L3 attributes just as it does
+ from CLI.
+- VRF is not read from an interface until IP address is configured on that interface.
+options:
+ vrf:
+ description:
+ - Name of VRF to be managed.
+ required: true
+ type: str
+ interface:
+ description:
+ - Full name of interface to be managed, i.e. Ethernet1/1.
+ required: true
+ type: str
+ state:
+ description:
+ - Manages desired state of the resource.
+ required: false
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+- name: Ensure vrf ntc exists on Eth1/1
+ cisco.nxos.nxos_vrf_interface:
+ vrf: ntc
+ interface: Ethernet1/1
+ state: present
+
+- name: Ensure ntc VRF does not exist on Eth1/1
+ cisco.nxos.nxos_vrf_interface:
+ vrf: ntc
+ interface: Ethernet1/1
+ state: absent
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["interface loopback16", "vrf member ntc"]
+"""
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_capabilities,
+ nxos_argument_spec,
+ normalize_interface,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_interface_type,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+def execute_show_command(command, module):
+ if "show run" not in command:
+ output = "json"
+ else:
+ output = "text"
+ cmds = [{"command": command, "output": output}]
+ return run_commands(module, cmds)[0]
+
+
+def get_interface_mode(interface, intf_type, module):
+ command = "show interface {0}".format(interface)
+ interface = {}
+ mode = "unknown"
+
+ if intf_type in ["ethernet", "portchannel"]:
+ body = execute_show_command(command, module)
+ try:
+ interface_table = body["TABLE_interface"]["ROW_interface"]
+ except KeyError:
+ return mode
+
+ if interface_table and isinstance(interface_table, dict):
+ mode = str(interface_table.get("eth_mode", "layer3"))
+ if mode == "access" or mode == "trunk":
+ mode = "layer2"
+ else:
+ return mode
+
+ elif intf_type == "loopback" or intf_type == "svi":
+ mode = "layer3"
+ return mode
+
+
+def get_vrf_list(module):
+ command = "show vrf all"
+ vrf_list = []
+ body = execute_show_command(command, module)
+
+ try:
+ vrf_table = body["TABLE_vrf"]["ROW_vrf"]
+ except (KeyError, AttributeError):
+ return vrf_list
+
+ for each in vrf_table:
+ vrf_list.append(str(each["vrf_name"]))
+
+ return vrf_list
+
+
+def get_interface_info(interface, module):
+ if not interface.startswith("loopback"):
+ interface = interface.capitalize()
+
+ command = "show run interface {0}".format(interface)
+ vrf_regex = r".*vrf\s+member\s+(?P<vrf>\S+).*"
+
+ try:
+ body = execute_show_command(command, module)
+ match_vrf = re.match(vrf_regex, body, re.DOTALL)
+ group_vrf = match_vrf.groupdict()
+ vrf = group_vrf["vrf"]
+ except (AttributeError, TypeError):
+ return ""
+
+ return vrf
+
+
+def is_default(interface, module):
+ command = "show run interface {0}".format(interface)
+
+ try:
+ body = execute_show_command(command, module)
+ raw_list = body.split("\n")
+ if raw_list[-1].startswith("interface"):
+ return True
+ else:
+ return False
+
+ except (KeyError, IndexError):
+ return "DNE"
+
+
+def main():
+ argument_spec = dict(
+ vrf=dict(required=True),
+ interface=dict(type="str", required=True),
+ state=dict(
+ default="present", choices=["present", "absent"], required=False
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ vrf = module.params["vrf"]
+ interface = normalize_interface(module.params["interface"])
+ state = module.params["state"]
+
+ device_info = get_capabilities(module)
+ network_api = device_info.get("network_api", "nxapi")
+
+ current_vrfs = get_vrf_list(module)
+ if vrf not in current_vrfs:
+ warnings.append(
+ "The VRF is not present/active on the device. "
+ "Use nxos_vrf to fix this."
+ )
+
+ intf_type = get_interface_type(interface)
+ if intf_type != "ethernet" and network_api == "cliconf":
+ if is_default(interface, module) == "DNE":
+ module.fail_json(
+ msg="interface does not exist on switch. Verify "
+ "switch platform or create it first with "
+ "nxos_interface if it's a logical interface"
+ )
+
+ mode = get_interface_mode(interface, intf_type, module)
+ if mode == "layer2":
+ module.fail_json(
+ msg="Ensure interface is a Layer 3 port before "
+ "configuring a VRF on an interface. You can "
+ "use nxos_interface"
+ )
+
+ current_vrf = get_interface_info(interface, module)
+ existing = dict(interface=interface, vrf=current_vrf)
+ changed = False
+
+ if not existing["vrf"]:
+ pass
+ elif vrf != existing["vrf"] and state == "absent":
+ module.fail_json(
+ msg="The VRF you are trying to remove "
+ "from the interface does not exist "
+ "on that interface.",
+ interface=interface,
+ proposed_vrf=vrf,
+ existing_vrf=existing["vrf"],
+ )
+
+ commands = []
+ if existing:
+ if state == "absent":
+ if existing and vrf == existing["vrf"]:
+ command = "no vrf member {0}".format(vrf)
+ commands.append(command)
+
+ elif state == "present":
+ if existing["vrf"] != vrf:
+ command = "vrf member {0}".format(vrf)
+ commands.append(command)
+
+ if commands:
+ commands.insert(0, "interface {0}".format(interface))
+
+ if commands:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=commands)
+ else:
+ load_config(module, commands)
+ changed = True
+ if "configure" in commands:
+ commands.pop(0)
+
+ results["commands"] = commands
+ results["changed"] = changed
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrrp.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrrp.py
new file mode 100644
index 00000000..976c6df9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vrrp.py
@@ -0,0 +1,442 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vrrp
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages VRRP configuration on NX-OS switches.
+description:
+- Manages VRRP configuration on NX-OS switches.
+version_added: 1.0.0
+author:
+- Jason Edelman (@jedelman8)
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- VRRP feature needs to be enabled first on the system.
+- SVIs must exist before using this module.
+- Interface must be a L3 port before using this module.
+- C(state=absent) removes the VRRP group if it exists on the device.
+- VRRP cannot be configured on loopback interfaces.
+options:
+ group:
+ description:
+ - VRRP group number.
+ required: true
+ type: str
+ interface:
+ description:
+ - Full name of interface that is being managed for VRRP.
+ required: true
+ type: str
+ interval:
+ description:
+ - Time interval between advertisement or 'default' keyword
+ required: false
+ type: str
+ priority:
+ description:
+ - VRRP priority or 'default' keyword
+ type: str
+ preempt:
+ description:
+ - Enable/Disable preempt.
+ type: bool
+ vip:
+ description:
+ - VRRP virtual IP address or 'default' keyword
+ type: str
+ authentication:
+ description:
+ - Clear text authentication string or 'default' keyword
+ type: str
+ admin_state:
+ description:
+ - Used to enable or disable the VRRP process.
+ choices:
+ - shutdown
+ - no shutdown
+ - default
+ default: shutdown
+ type: str
+ state:
+ description:
+ - Specify desired state of the resource.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+- name: Ensure vrrp group 100 and vip 10.1.100.1 is on vlan10
+ cisco.nxos.nxos_vrrp:
+ interface: vlan10
+ group: 100
+ vip: 10.1.100.1
+
+- name: Ensure removal of the vrrp group config
+ cisco.nxos.nxos_vrrp:
+ interface: vlan10
+ group: 100
+ vip: 10.1.100.1
+ state: absent
+
+- name: Re-config with more params
+ cisco.nxos.nxos_vrrp:
+ interface: vlan10
+ group: 100
+ vip: 10.1.100.1
+ preempt: false
+ priority: 130
+ authentication: AUTHKEY
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["interface vlan10", "vrrp 150", "address 10.1.15.1",
+ "authentication text testing", "no shutdown"]
+"""
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_capabilities,
+ nxos_argument_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_interface_type,
+)
+from ansible.module_utils.basic import AnsibleModule
+
+
+PARAM_TO_DEFAULT_KEYMAP = {
+ "priority": "100",
+ "interval": "1",
+ "vip": "0.0.0.0",
+ "admin_state": "shutdown",
+}
+
+
+def execute_show_command(command, module):
+ if "show run" not in command:
+ output = "json"
+ else:
+ output = "text"
+
+ commands = [{"command": command, "output": output}]
+ return run_commands(module, commands)[0]
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key, value in table.items():
+ new_key = key_map.get(key)
+ if new_key:
+ if value:
+ new_dict[new_key] = str(value)
+ else:
+ new_dict[new_key] = value
+ return new_dict
+
+
+def is_default(interface, module):
+ command = "show run interface {0}".format(interface)
+
+ try:
+ body = execute_show_command(command, module)
+ if "invalid" in body.lower():
+ return "DNE"
+ else:
+ raw_list = body.split("\n")
+ if raw_list[-1].startswith("interface"):
+ return True
+ else:
+ return False
+ except (KeyError):
+ return "DNE"
+
+
+def get_interface_mode(interface, intf_type, module):
+ command = "show interface {0}".format(interface)
+ interface = {}
+ mode = "unknown"
+ body = execute_show_command(command, module)
+ interface_table = body["TABLE_interface"]["ROW_interface"]
+ name = interface_table.get("interface")
+
+ if intf_type in ["ethernet", "portchannel"]:
+ mode = str(interface_table.get("eth_mode", "layer3"))
+
+ if mode == "access" or mode == "trunk":
+ mode = "layer2"
+ elif intf_type == "svi":
+ mode = "layer3"
+
+ return mode, name
+
+
+def get_vrr_status(group, module, interface):
+ command = "show run all | section interface.{0}$".format(interface)
+ body = execute_show_command(command, module)
+ vrf_index = None
+ admin_state = "shutdown"
+
+ if body:
+ splitted_body = body.splitlines()
+ for index in range(0, len(splitted_body) - 1):
+ if splitted_body[index].strip() == "vrrp {0}".format(group):
+ vrf_index = index
+ vrf_section = splitted_body[vrf_index::]
+
+ for line in vrf_section:
+ if line.strip() == "no shutdown":
+ admin_state = "no shutdown"
+ break
+
+ return admin_state
+
+
+def get_existing_vrrp(interface, group, module, name):
+ command = "show vrrp detail interface {0}".format(interface)
+ body = execute_show_command(command, module)
+ vrrp = {}
+
+ vrrp_key = {
+ "sh_group_id": "group",
+ "sh_vip_addr": "vip",
+ "sh_priority": "priority",
+ "sh_group_preempt": "preempt",
+ "sh_auth_text": "authentication",
+ "sh_adv_interval": "interval",
+ }
+
+ try:
+ vrrp_table = body["TABLE_vrrp_group"]
+ except (AttributeError, IndexError, TypeError):
+ return {}
+
+ if isinstance(vrrp_table, dict):
+ vrrp_table = [vrrp_table]
+
+ for each_vrrp in vrrp_table:
+ vrrp_row = each_vrrp["ROW_vrrp_group"]
+ parsed_vrrp = apply_key_map(vrrp_key, vrrp_row)
+
+ if parsed_vrrp["preempt"] == "Disable":
+ parsed_vrrp["preempt"] = False
+ elif parsed_vrrp["preempt"] == "Enable":
+ parsed_vrrp["preempt"] = True
+
+ if parsed_vrrp["group"] == group:
+ parsed_vrrp["admin_state"] = get_vrr_status(group, module, name)
+ return parsed_vrrp
+
+ return vrrp
+
+
+def get_commands_config_vrrp(delta, existing, group):
+ commands = []
+
+ CMDS = {
+ "priority": "priority {0}",
+ "preempt": "preempt",
+ "vip": "address {0}",
+ "interval": "advertisement-interval {0}",
+ "auth": "authentication text {0}",
+ "admin_state": "{0}",
+ }
+
+ for arg in ["vip", "priority", "interval", "admin_state"]:
+ val = delta.get(arg)
+ if val == "default":
+ val = PARAM_TO_DEFAULT_KEYMAP.get(arg)
+ if val != existing.get(arg):
+ commands.append((CMDS.get(arg)).format(val))
+ elif val:
+ commands.append((CMDS.get(arg)).format(val))
+
+ preempt = delta.get("preempt")
+ auth = delta.get("authentication")
+
+ if preempt:
+ commands.append(CMDS.get("preempt"))
+ elif preempt is False:
+ commands.append("no " + CMDS.get("preempt"))
+ if auth:
+ if auth != "default":
+ commands.append((CMDS.get("auth")).format(auth))
+ elif existing.get("authentication"):
+ commands.append("no authentication")
+
+ if commands:
+ commands.insert(0, "vrrp {0}".format(group))
+
+ return commands
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def validate_params(param, module):
+ value = module.params[param]
+
+ if param == "group":
+ try:
+ if int(value) < 1 or int(value) > 255:
+ raise ValueError
+ except ValueError:
+ module.fail_json(
+ msg="Warning! 'group' must be an integer between" " 1 and 255",
+ group=value,
+ )
+ elif param == "priority":
+ try:
+ if int(value) < 1 or int(value) > 254:
+ raise ValueError
+ except ValueError:
+ module.fail_json(
+ msg="Warning! 'priority' must be an integer "
+ "between 1 and 254",
+ priority=value,
+ )
+
+
+def main():
+ argument_spec = dict(
+ group=dict(required=True, type="str"),
+ interface=dict(required=True),
+ interval=dict(required=False, type="str"),
+ priority=dict(required=False, type="str"),
+ preempt=dict(required=False, type="bool"),
+ vip=dict(required=False, type="str"),
+ admin_state=dict(
+ required=False,
+ type="str",
+ choices=["shutdown", "no shutdown", "default"],
+ default="shutdown",
+ ),
+ authentication=dict(required=False, type="str", no_log=True),
+ state=dict(
+ choices=["absent", "present"], required=False, default="present"
+ ),
+ )
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ results = {"changed": False, "commands": [], "warnings": warnings}
+
+ state = module.params["state"]
+ interface = module.params["interface"].lower()
+ group = module.params["group"]
+ priority = module.params["priority"]
+ interval = module.params["interval"]
+ preempt = module.params["preempt"]
+ vip = module.params["vip"]
+ authentication = module.params["authentication"]
+ admin_state = module.params["admin_state"]
+
+ device_info = get_capabilities(module)
+ network_api = device_info.get("network_api", "nxapi")
+
+ if state == "present" and not vip:
+ module.fail_json(msg='the "vip" param is required when state=present')
+
+ intf_type = get_interface_type(interface)
+ if intf_type != "ethernet" and network_api == "cliconf":
+ if is_default(interface, module) == "DNE":
+ module.fail_json(
+ msg="That interface does not exist yet. Create " "it first.",
+ interface=interface,
+ )
+ if intf_type == "loopback":
+ module.fail_json(
+ msg="Loopback interfaces don't support VRRP.",
+ interface=interface,
+ )
+
+ mode, name = get_interface_mode(interface, intf_type, module)
+ if mode == "layer2":
+ module.fail_json(
+ msg="That interface is a layer2 port.\nMake it "
+ "a layer 3 port first.",
+ interface=interface,
+ )
+
+ args = dict(
+ group=group,
+ priority=priority,
+ preempt=preempt,
+ vip=vip,
+ authentication=authentication,
+ interval=interval,
+ admin_state=admin_state,
+ )
+
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+ existing = get_existing_vrrp(interface, group, module, name)
+
+ commands = []
+
+ if state == "present":
+ delta = dict(set(proposed.items()).difference(existing.items()))
+ if delta:
+ command = get_commands_config_vrrp(delta, existing, group)
+ if command:
+ commands.append(command)
+ elif state == "absent":
+ if existing:
+ commands.append(["no vrrp {0}".format(group)])
+
+ if commands:
+ commands.insert(0, ["interface {0}".format(interface)])
+ commands = flatten_list(commands)
+ results["commands"] = commands
+ results["changed"] = True
+ if not module.check_mode:
+ load_config(module, commands)
+ if "configure" in commands:
+ commands.pop(0)
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vsan.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vsan.py
new file mode 100644
index 00000000..c68dd0ca
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vsan.py
@@ -0,0 +1,385 @@
+#!/usr/bin/python
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or
+# https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+
+DOCUMENTATION = """
+module: nxos_vsan
+short_description: Configuration of vsan for Cisco NXOS MDS Switches.
+description:
+- Configuration of vsan for Cisco MDS NXOS.
+version_added: 1.0.0
+author:
+- Suhas Bharadwaj (@srbharadwaj) (subharad@cisco.com)
+notes:
+- Tested against NX-OS 8.4(1)
+options:
+ vsan:
+ description:
+ - List of vsan details to be added or removed
+ type: list
+ elements: dict
+ suboptions:
+ id:
+ description:
+ - Vsan id
+ required: true
+ type: int
+ name:
+ description:
+ - Name of the vsan
+ type: str
+ suspend:
+ description:
+ - suspend the vsan if True
+ type: bool
+ remove:
+ description:
+ - Removes the vsan if True
+ type: bool
+ interface:
+ description:
+ - List of vsan's interfaces to be added
+ type: list
+ elements: str
+"""
+
+EXAMPLES = """
+- name: Test that vsan module works
+ cisco.nxos.nxos_vsan:
+ vsan:
+ - id: 922
+ interface:
+ - fc1/1
+ - fc1/2
+ - port-channel 1
+ name: vsan-SAN-A
+ remove: false
+ suspend: false
+ - id: 923
+ interface:
+ - fc1/11
+ - fc1/21
+ - port-channel 2
+ name: vsan-SAN-B
+ remove: false
+ suspend: true
+ - id: 1923
+ name: vsan-SAN-Old
+ remove: true
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample:
+ - terminal dont-ask
+ - vsan database
+ - vsan 922 interface fc1/40
+ - vsan 922 interface port-channel 155
+ - no terminal dont-ask
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+import re
+
+__metaclass__ = type
+
+
+class Vsan(object):
+ def __init__(self, vsanid):
+ self.vsanid = vsanid
+ self.vsanname = None
+ self.vsanstate = None
+ self.vsanoperstate = None
+ self.vsaninterfaces = []
+
+
+class GetVsanInfoFromSwitch(object):
+ """docstring for GetVsanInfoFromSwitch"""
+
+ def __init__(self, module):
+ self.module = module
+ self.vsaninfo = {}
+ self.processShowVsan()
+ self.processShowVsanMembership()
+
+ def execute_show_vsan_cmd(self):
+ output = execute_show_command("show vsan", self.module)[0]
+ return output
+
+ def execute_show_vsan_mem_cmd(self):
+ output = execute_show_command("show vsan membership", self.module)[0]
+ return output
+
+ def processShowVsan(self):
+ patv = r"^vsan\s+(\d+)\s+information"
+ patnamestate = "name:(.*)state:(.*)"
+ patoperstate = "operational state:(.*)"
+
+ output = self.execute_show_vsan_cmd().split("\n")
+ for o in output:
+ z = re.match(patv, o.strip())
+ if z:
+ v = z.group(1).strip()
+ self.vsaninfo[v] = Vsan(v)
+
+ z1 = re.match(patnamestate, o.strip())
+ if z1:
+ n = z1.group(1).strip()
+ s = z1.group(2).strip()
+ self.vsaninfo[v].vsanname = n
+ self.vsaninfo[v].vsanstate = s
+
+ z2 = re.match(patoperstate, o.strip())
+ if z2:
+ oper = z2.group(1).strip()
+ self.vsaninfo[v].vsanoperstate = oper
+
+ # 4094/4079 vsan is always present
+ self.vsaninfo["4079"] = Vsan("4079")
+ self.vsaninfo["4094"] = Vsan("4094")
+
+ def processShowVsanMembership(self):
+ patv = r"^vsan\s+(\d+).*"
+ output = self.execute_show_vsan_mem_cmd().split("\n")
+ memlist = []
+ v = None
+ for o in output:
+ z = re.match(patv, o.strip())
+ if z:
+ if v is not None:
+ self.vsaninfo[v].vsaninterfaces = memlist
+ memlist = []
+ v = z.group(1)
+ if "interfaces" not in o:
+ llist = o.strip().split()
+ memlist = memlist + llist
+ self.vsaninfo[v].vsaninterfaces = memlist
+
+ def getVsanInfoObjects(self):
+ return self.vsaninfo
+
+
+def execute_show_command(command, module, command_type="cli_show"):
+ output = "text"
+ commands = [{"command": command, "output": output}]
+ return run_commands(module, commands)
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def main():
+ vsan_element_spec = dict(
+ id=dict(required=True, type="int"),
+ name=dict(type="str"),
+ remove=dict(type="bool"),
+ suspend=dict(type="bool"),
+ interface=dict(type="list", elements="str"),
+ )
+
+ argument_spec = dict(
+ vsan=dict(type="list", elements="dict", options=vsan_element_spec)
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+ warnings = list()
+ messages = list()
+ commands_executed = list()
+ result = {"changed": False}
+
+ obj = GetVsanInfoFromSwitch(module)
+ dictSwVsanObjs = obj.getVsanInfoObjects()
+
+ commands = []
+ vsan_list = module.params["vsan"]
+
+ for eachvsan in vsan_list:
+ vsanid = str(eachvsan["id"])
+ vsanname = eachvsan["name"]
+ vsanremove = eachvsan["remove"]
+ vsansuspend = eachvsan["suspend"]
+ vsaninterface_list = eachvsan["interface"]
+
+ if int(vsanid) < 1 or int(vsanid) >= 4095:
+ module.fail_json(
+ msg=vsanid
+ + " - This is an invalid vsan. Supported vsan range is 1-4094"
+ )
+
+ if vsanid in dictSwVsanObjs.keys():
+ sw_vsanid = vsanid
+ sw_vsanname = dictSwVsanObjs[vsanid].vsanname
+ sw_vsanstate = dictSwVsanObjs[vsanid].vsanstate
+ sw_vsaninterfaces = dictSwVsanObjs[vsanid].vsaninterfaces
+ else:
+ sw_vsanid = None
+ sw_vsanname = None
+ sw_vsanstate = None
+ sw_vsaninterfaces = []
+
+ if vsanremove:
+ # Negative case:
+ if vsanid == "4079" or vsanid == "4094":
+ messages.append(
+ str(vsanid)
+ + " is a reserved vsan, hence cannot be removed"
+ )
+ continue
+ if vsanid == sw_vsanid:
+ commands.append("no vsan " + str(vsanid))
+ messages.append("deleting the vsan " + str(vsanid))
+ else:
+ messages.append(
+ "There is no vsan "
+ + str(vsanid)
+ + " present in the switch. Hence there is nothing to delete"
+ )
+ continue
+ else:
+ # Negative case:
+ if vsanid == "4079" or vsanid == "4094":
+ messages.append(
+ str(vsanid)
+ + " is a reserved vsan, and always present on the switch"
+ )
+ else:
+ if vsanid == sw_vsanid:
+ messages.append(
+ "There is already a vsan "
+ + str(vsanid)
+ + " present in the switch. Hence there is nothing to configure"
+ )
+ else:
+ commands.append("vsan " + str(vsanid))
+ messages.append("creating vsan " + str(vsanid))
+
+ if vsanname is not None:
+ # Negative case:
+ if vsanid == "4079" or vsanid == "4094":
+ messages.append(
+ str(vsanid) + " is a reserved vsan, and cannot be renamed"
+ )
+ else:
+ if vsanname == sw_vsanname:
+ messages.append(
+ "There is already a vsan "
+ + str(vsanid)
+ + " present in the switch, which has the name "
+ + vsanname
+ + " Hence there is nothing to configure"
+ )
+ else:
+ commands.append(
+ "vsan " + str(vsanid) + " name " + vsanname
+ )
+ messages.append(
+ "setting vsan name to "
+ + vsanname
+ + " for vsan "
+ + str(vsanid)
+ )
+
+ if vsansuspend:
+ # Negative case:
+ if vsanid == "4079" or vsanid == "4094":
+ messages.append(
+ str(vsanid)
+ + " is a reserved vsan, and cannot be suspended"
+ )
+ else:
+ if sw_vsanstate == "suspended":
+ messages.append(
+ "There is already a vsan "
+ + str(vsanid)
+ + " present in the switch, which is in suspended state "
+ )
+ else:
+ commands.append("vsan " + str(vsanid) + " suspend")
+ messages.append("suspending the vsan " + str(vsanid))
+ else:
+ if sw_vsanstate == "active":
+ messages.append(
+ "There is already a vsan "
+ + str(vsanid)
+ + " present in the switch, which is in active state "
+ )
+ else:
+ commands.append("no vsan " + str(vsanid) + " suspend")
+ messages.append("no suspending the vsan " + str(vsanid))
+
+ if vsaninterface_list is not None:
+ for each_interface_name in vsaninterface_list:
+ # For fcip,port-channel,vfc-port-channel need to remove the
+ # extra space to compare
+ temp = re.sub(" +", "", each_interface_name)
+ if temp in sw_vsaninterfaces:
+ messages.append(
+ each_interface_name
+ + " is already present in the vsan "
+ + str(vsanid)
+ + " interface list"
+ )
+ else:
+ commands.append(
+ "vsan "
+ + str(vsanid)
+ + " interface "
+ + each_interface_name
+ )
+ messages.append(
+ "adding interface "
+ + each_interface_name
+ + " to vsan "
+ + str(vsanid)
+ )
+
+ if len(commands) != 0:
+ commands = (
+ ["terminal dont-ask"]
+ + ["vsan database"]
+ + commands
+ + ["no terminal dont-ask"]
+ )
+
+ cmds = flatten_list(commands)
+ commands_executed = cmds
+
+ if commands_executed:
+ if module.check_mode:
+ module.exit_json(
+ changed=False,
+ commands=commands_executed,
+ msg="Check Mode: No cmds issued to the hosts",
+ )
+ else:
+ result["changed"] = True
+ load_config(module, commands_executed)
+
+ result["messages"] = messages
+ result["commands"] = commands_executed
+ result["warnings"] = warnings
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vtp_domain.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vtp_domain.py
new file mode 100644
index 00000000..1d44b2ce
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vtp_domain.py
@@ -0,0 +1,220 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vtp_domain
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages VTP domain configuration.
+description:
+- Manages VTP domain configuration.
+version_added: 1.0.0
+author:
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- VTP feature must be active on the device to use this module.
+- This module is used to manage only VTP domain names.
+- VTP domain names are case-sensible.
+- If it's never been configured before, VTP version is set to 1 by default. Otherwise,
+ it leaves the previous configured version untouched. Use M(cisco.nxos.nxos_vtp_version)
+ to change it.
+- Use this in combination with M(cisco.nxos.nxos_vtp_password) and M(cisco.nxos.nxos_vtp_version)
+ to fully manage VTP operations.
+options:
+ domain:
+ description:
+ - VTP domain name.
+ required: true
+ type: str
+"""
+
+EXAMPLES = """
+# ENSURE VTP DOMAIN IS CONFIGURED
+- cisco.nxos.nxos_vtp_domain:
+ domain: ntc
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+"""
+
+
+RETURN = """
+proposed:
+ description: k/v pairs of parameters passed into module
+ returned: always
+ type: dict
+ sample: {"domain": "ntc"}
+existing:
+ description:
+ - k/v pairs of existing vtp domain
+ returned: always
+ type: dict
+ sample: {"domain": "testing", "version": "2", "vtp_password": "\"}
+end_state:
+ description: k/v pairs of vtp domain after module execution
+ returned: always
+ type: dict
+ sample: {"domain": "ntc", "version": "2", "vtp_password": "\"}
+updates:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["vtp domain ntc"]
+changed:
+ description: check to see if a change was made on the device
+ returned: always
+ type: bool
+ sample: true
+"""
+
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_capabilities,
+)
+from ansible.module_utils.basic import AnsibleModule
+import re
+
+
+def execute_show_command(command, module, output="json"):
+ cmds = [{"command": command, "output": output}]
+ body = run_commands(module, cmds)
+ return body
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_vtp_config(module):
+ command = "show vtp status"
+ body = execute_show_command(command, module, "text")[0]
+ vtp_parsed = {}
+
+ if body:
+ version_regex = r".*VTP version running\s+:\s+(?P<version>\d).*"
+ domain_regex = r".*VTP Domain Name\s+:\s+(?P<domain>\S+).*"
+
+ try:
+ match_version = re.match(version_regex, body, re.DOTALL)
+ version = match_version.groupdict()["version"]
+ except AttributeError:
+ version = ""
+
+ try:
+ match_domain = re.match(domain_regex, body, re.DOTALL)
+ domain = match_domain.groupdict()["domain"]
+ except AttributeError:
+ domain = ""
+
+ if domain and version:
+ vtp_parsed["domain"] = domain
+ vtp_parsed["version"] = version
+ vtp_parsed["vtp_password"] = get_vtp_password(module)
+
+ return vtp_parsed
+
+
+def get_vtp_password(module):
+ command = "show vtp password"
+ output = "json"
+ cap = get_capabilities(module)["device_info"]["network_os_model"]
+ if re.search(r"Nexus 6", cap):
+ output = "text"
+
+ body = execute_show_command(command, module, output)[0]
+
+ if output == "json":
+ password = body.get("passwd", "")
+ else:
+ password = ""
+ rp = r"VTP Password: (\S+)"
+ mo = re.search(rp, body)
+ if mo:
+ password = mo.group(1)
+
+ return str(password)
+
+
+def main():
+ argument_spec = dict(domain=dict(type="str", required=True))
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ domain = module.params["domain"]
+
+ existing = get_vtp_config(module)
+ end_state = existing
+
+ args = dict(domain=domain)
+
+ changed = False
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+ delta = dict(set(proposed.items()).difference(existing.items()))
+
+ commands = []
+ if delta:
+ commands.append(["vtp domain {0}".format(domain)])
+
+ cmds = flatten_list(commands)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ changed = True
+ load_config(module, cmds)
+ end_state = get_vtp_config(module)
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ results = {}
+ results["proposed"] = proposed
+ results["existing"] = existing
+ results["end_state"] = end_state
+ results["updates"] = cmds
+ results["changed"] = changed
+ results["warnings"] = warnings
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vtp_password.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vtp_password.py
new file mode 100644
index 00000000..138f7969
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vtp_password.py
@@ -0,0 +1,287 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vtp_password
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages VTP password configuration.
+description:
+- Manages VTP password configuration.
+version_added: 1.0.0
+author:
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- VTP feature must be active on the device to use this module.
+- This module is used to manage only VTP passwords.
+- Use this in combination with M(cisco.nxos.nxos_vtp_domain) and M(cisco.nxos.nxos_vtp_version) to fully
+ manage VTP operations.
+- You can set/remove password only if a VTP domain already exist.
+- If C(state=absent) and no C(vtp_password) is provided, it remove the current VTP
+ password.
+- If C(state=absent) and C(vtp_password) is provided, the proposed C(vtp_password)
+ has to match the existing one in order to remove it.
+options:
+ vtp_password:
+ description:
+ - VTP password
+ type: str
+ state:
+ description:
+ - Manage the state of the resource
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+"""
+
+EXAMPLES = """
+# ENSURE VTP PASSWORD IS SET
+- cisco.nxos.nxos_vtp_password:
+ state: present
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+
+# ENSURE VTP PASSWORD IS REMOVED
+- cisco.nxos.nxos_vtp_password:
+ state: absent
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+"""
+
+RETURN = """
+proposed:
+ description: k/v pairs of parameters passed into module
+ returned: always
+ type: dict
+ sample: {"vtp_password": "new_ntc"}
+existing:
+ description:
+ - k/v pairs of existing vtp
+ returned: always
+ type: dict
+ sample: {"domain": "ntc", "version": "1", "vtp_password": "ntc"}
+end_state:
+ description: k/v pairs of vtp after module execution
+ returned: always
+ type: dict
+ sample: {"domain": "ntc", "version": "1", "vtp_password": "new_ntc"}
+updates:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["vtp password new_ntc"]
+changed:
+ description: check to see if a change was made on the device
+ returned: always
+ type: bool
+ sample: true
+"""
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_capabilities,
+)
+from ansible.module_utils.basic import AnsibleModule
+import re
+
+
+def execute_show_command(command, module, output="json"):
+ cmds = [{"command": command, "output": output}]
+ body = run_commands(module, cmds)
+ return body
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key, value in table.items():
+ new_key = key_map.get(key)
+ if new_key:
+ value = table.get(key)
+ if value:
+ new_dict[new_key] = str(value)
+ else:
+ new_dict[new_key] = value
+ return new_dict
+
+
+def get_vtp_config(module):
+ command = "show vtp status"
+
+ body = execute_show_command(command, module, "text")[0]
+ vtp_parsed = {}
+
+ if body:
+ version_regex = r".*VTP version running\s+:\s+(?P<version>\d).*"
+ domain_regex = r".*VTP Domain Name\s+:\s+(?P<domain>\S+).*"
+
+ try:
+ match_version = re.match(version_regex, body, re.DOTALL)
+ version = match_version.groupdict()["version"]
+ except AttributeError:
+ version = ""
+
+ try:
+ match_domain = re.match(domain_regex, body, re.DOTALL)
+ domain = match_domain.groupdict()["domain"]
+ except AttributeError:
+ domain = ""
+
+ if domain and version:
+ vtp_parsed["domain"] = domain
+ vtp_parsed["version"] = version
+ vtp_parsed["vtp_password"] = get_vtp_password(module)
+
+ return vtp_parsed
+
+
+def get_vtp_password(module):
+ command = "show vtp password"
+ output = "json"
+ cap = get_capabilities(module)["device_info"]["network_os_model"]
+ if re.search(r"Nexus 6", cap):
+ output = "text"
+
+ body = execute_show_command(command, module, output)[0]
+
+ if output == "json":
+ password = body.get("passwd", "")
+ else:
+ password = ""
+ rp = r"VTP Password: (\S+)"
+ mo = re.search(rp, body)
+ if mo:
+ password = mo.group(1)
+
+ return str(password)
+
+
+def main():
+ argument_spec = dict(
+ vtp_password=dict(type="str", no_log=True),
+ state=dict(choices=["absent", "present"], default="present"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ vtp_password = module.params["vtp_password"] or None
+ state = module.params["state"]
+
+ existing = get_vtp_config(module)
+ end_state = existing
+
+ args = dict(vtp_password=vtp_password)
+
+ changed = False
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+ delta = dict(set(proposed.items()).difference(existing.items()))
+
+ commands = []
+ if state == "absent":
+ # if vtp_password is not set, some devices returns '\\' or the string 'None'
+ if (
+ not existing["vtp_password"]
+ or existing["vtp_password"] == "\\"
+ or existing["vtp_password"] == "None"
+ ):
+ pass
+ elif vtp_password is not None:
+ if existing["vtp_password"] == proposed["vtp_password"]:
+ commands.append(["no vtp password"])
+ else:
+ module.fail_json(
+ msg="Proposed vtp password doesn't match "
+ "current vtp password. It cannot be "
+ "removed when state=absent. If you are "
+ "trying to change the vtp password, use "
+ "state=present."
+ )
+ else:
+ if not existing.get("domain"):
+ module.fail_json(
+ msg="Cannot remove a vtp password "
+ "before vtp domain is set."
+ )
+
+ elif existing["vtp_password"] != ("\\"):
+ commands.append(["no vtp password"])
+
+ elif state == "present":
+ if delta:
+ if not existing.get("domain"):
+ module.fail_json(
+ msg="Cannot set vtp password " "before vtp domain is set."
+ )
+
+ else:
+ commands.append(["vtp password {0}".format(vtp_password)])
+
+ cmds = flatten_list(commands)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ changed = True
+ load_config(module, cmds)
+ end_state = get_vtp_config(module)
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ results = {}
+ results["proposed"] = proposed
+ results["existing"] = existing
+ results["end_state"] = end_state
+ results["updates"] = cmds
+ results["changed"] = changed
+ results["warnings"] = warnings
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vtp_version.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vtp_version.py
new file mode 100644
index 00000000..b9561d5d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vtp_version.py
@@ -0,0 +1,217 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vtp_version
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages VTP version configuration.
+description:
+- Manages VTP version configuration.
+version_added: 1.0.0
+author:
+- Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- VTP feature must be active on the device to use this module.
+- This module is used to manage only VTP version.
+- Use this in combination with M(cisco.nxos.nxos_vtp_password) and M(cisco.nxos.nxos_vtp_version)
+ to fully manage VTP operations.
+options:
+ version:
+ description:
+ - VTP version number.
+ required: true
+ choices:
+ - '1'
+ - '2'
+ type: str
+"""
+EXAMPLES = """
+# ENSURE VTP VERSION IS 2
+- cisco.nxos.nxos_vtp_version:
+ version: 2
+ host: '{{ inventory_hostname }}'
+ username: '{{ un }}'
+ password: '{{ pwd }}'
+"""
+
+RETURN = """
+proposed:
+ description: k/v pairs of parameters passed into module
+ returned: always
+ type: dict
+ sample: {"version": "2"}
+existing:
+ description:
+ - k/v pairs of existing vtp
+ returned: always
+ type: dict
+ sample: {"domain": "testing", "version": "1", "vtp_password": "\"}
+end_state:
+ description: k/v pairs of vtp after module execution
+ returned: always
+ type: dict
+ sample: {"domain": "testing", "version": "2", "vtp_password": "\"}
+updates:
+ description: command sent to the device
+ returned: always
+ type: list
+ sample: ["vtp version 2"]
+changed:
+ description: check to see if a change was made on the device
+ returned: always
+ type: bool
+ sample: true
+"""
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_capabilities,
+)
+from ansible.module_utils.basic import AnsibleModule
+import re
+
+
+def execute_show_command(command, module, output="json"):
+ cmds = [{"command": command, "output": output}]
+ body = run_commands(module, cmds)
+ return body
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def get_vtp_config(module):
+ command = "show vtp status"
+ body = execute_show_command(command, module, "text")[0]
+ vtp_parsed = {}
+
+ if body:
+ version_regex = r".*VTP version running\s+:\s+(?P<version>\d).*"
+ domain_regex = r".*VTP Domain Name\s+:\s+(?P<domain>\S+).*"
+
+ try:
+ match_version = re.match(version_regex, body, re.DOTALL)
+ version = match_version.groupdict()["version"]
+ except AttributeError:
+ version = ""
+
+ try:
+ match_domain = re.match(domain_regex, body, re.DOTALL)
+ domain = match_domain.groupdict()["domain"]
+ except AttributeError:
+ domain = ""
+
+ if domain and version:
+ vtp_parsed["domain"] = domain
+ vtp_parsed["version"] = version
+ vtp_parsed["vtp_password"] = get_vtp_password(module)
+
+ return vtp_parsed
+
+
+def get_vtp_password(module):
+ command = "show vtp password"
+ output = "json"
+ cap = get_capabilities(module)["device_info"]["network_os_model"]
+ if re.search(r"Nexus 6", cap):
+ output = "text"
+
+ body = execute_show_command(command, module, output)[0]
+
+ if output == "json":
+ password = body.get("passwd", "")
+ else:
+ password = ""
+ rp = r"VTP Password: (\S+)"
+ mo = re.search(rp, body)
+ if mo:
+ password = mo.group(1)
+
+ return str(password)
+
+
+def main():
+ argument_spec = dict(
+ version=dict(type="str", choices=["1", "2"], required=True)
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+
+ version = module.params["version"]
+
+ existing = get_vtp_config(module)
+ end_state = existing
+
+ args = dict(version=version)
+
+ changed = False
+ proposed = dict((k, v) for k, v in args.items() if v is not None)
+ delta = dict(set(proposed.items()).difference(existing.items()))
+
+ commands = []
+ if delta:
+ commands.append(["vtp version {0}".format(version)])
+
+ cmds = flatten_list(commands)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(changed=True, commands=cmds)
+ else:
+ changed = True
+ load_config(module, cmds)
+ end_state = get_vtp_config(module)
+ if "configure" in cmds:
+ cmds.pop(0)
+
+ results = {}
+ results["proposed"] = proposed
+ results["existing"] = existing
+ results["end_state"] = end_state
+ results["updates"] = cmds
+ results["changed"] = changed
+ results["warnings"] = warnings
+
+ module.exit_json(**results)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vxlan_vtep.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vxlan_vtep.py
new file mode 100644
index 00000000..86f0d3e3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vxlan_vtep.py
@@ -0,0 +1,488 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vxlan_vtep
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Manages VXLAN Network Virtualization Endpoint (NVE).
+description:
+- Manages VXLAN Network Virtualization Endpoint (NVE) overlay interface that terminates
+ VXLAN tunnels.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- The module is used to manage NVE properties, not to create NVE interfaces. Use M(cisco.nxos.nxos_interface)
+ if you wish to do so.
+- C(state=absent) removes the interface.
+- Default, where supported, restores params default value.
+options:
+ interface:
+ description:
+ - Interface name for the VXLAN Network Virtualization Endpoint.
+ required: true
+ type: str
+ description:
+ description:
+ - Description of the NVE interface.
+ type: str
+ host_reachability:
+ description:
+ - Specify mechanism for host reachability advertisement. A Boolean value of 'true'
+ indicates that BGP will be used for host reachability advertisement. A Boolean
+ value of 'false' indicates that no protocol is used for host reachability advertisement.
+ Other host reachability advertisement protocols (e.g. OpenFlow, controller, etc.) are not
+ supported.
+ type: bool
+ shutdown:
+ description:
+ - Administratively shutdown the NVE interface.
+ type: bool
+ source_interface:
+ description:
+ - Specify the loopback interface whose IP address should be used for the NVE interface.
+ type: str
+ source_interface_hold_down_time:
+ description:
+ - Suppresses advertisement of the NVE loopback address until the overlay has converged.
+ type: str
+ global_mcast_group_L3:
+ description:
+ - Global multicast IP prefix for L3 VNIs or the keyword 'default'. This is available on
+ Nexus 9000 series switches running NX-OS software release 9.2(x) or higher.
+ type: str
+ global_mcast_group_L2:
+ description:
+ - Global multicast IP prefix for L2 VNIs or the keyword 'default'. This is available on
+ Nexus 9000 series switches running NX-OS software release 9.2(x) or higher.
+ type: str
+ global_suppress_arp:
+ description:
+ - Enables ARP suppression for all VNIs. This is available on NX-OS 9K series running
+ 9.2.x or higher.
+ type: bool
+ global_ingress_replication_bgp:
+ description:
+ - Configures ingress replication protocol as bgp for all VNIs. This is available on Nexus
+ 9000 series switches running NX-OS software release 9.2(x) or higher.
+ type: bool
+ state:
+ description:
+ - Determines whether the config should be present or not on the device.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+ multisite_border_gateway_interface:
+ description:
+ - Specify the loopback interface whose IP address should be used for the NVE
+ Multisite Border-gateway Interface. This is available on specific Nexus 9000
+ series switches running NX-OS 7.0(3)I7(x) or higher. Specify "default" to remove
+ an existing gateway config.
+ type: str
+ version_added: 1.1.0
+"""
+EXAMPLES = """
+- cisco.nxos.nxos_vxlan_vtep:
+ interface: nve1
+ description: default
+ host_reachability: true
+ source_interface: Loopback0
+ source_interface_hold_down_time: 30
+ shutdown: default
+ multisite_border_gateway_interface: Loopback0
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["interface nve1", "source-interface loopback0",
+ "source-interface hold-down-time 30", "description simple description",
+ "shutdown", "host-reachability protocol bgp",
+ "multisite border-gateway interface loopback0"]
+"""
+
+import re
+
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ run_commands,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+BOOL_PARAMS = [
+ "shutdown",
+ "host_reachability",
+ "global_ingress_replication_bgp",
+ "global_suppress_arp",
+]
+PARAM_TO_COMMAND_KEYMAP = {
+ "description": "description",
+ "global_suppress_arp": "global suppress-arp",
+ "global_ingress_replication_bgp": "global ingress-replication protocol bgp",
+ "global_mcast_group_L3": "global mcast-group L3",
+ "global_mcast_group_L2": "global mcast-group L2",
+ "host_reachability": "host-reachability protocol bgp",
+ "interface": "interface",
+ "shutdown": "shutdown",
+ "source_interface": "source-interface",
+ "source_interface_hold_down_time": "source-interface hold-down-time",
+ "multisite_border_gateway_interface": "multisite border-gateway interface",
+}
+PARAM_TO_DEFAULT_KEYMAP = {
+ "description": False,
+ "shutdown": True,
+ "source_interface_hold_down_time": "180",
+}
+
+
+def get_value(arg, config, module):
+ if arg in BOOL_PARAMS:
+ REGEX = re.compile(
+ r"\s+{0}\s*$".format(PARAM_TO_COMMAND_KEYMAP[arg]), re.M
+ )
+ NO_SHUT_REGEX = re.compile(r"\s+no shutdown\s*$", re.M)
+ value = False
+ if arg == "shutdown":
+ try:
+ if NO_SHUT_REGEX.search(config):
+ value = False
+ elif REGEX.search(config):
+ value = True
+ except TypeError:
+ value = False
+ else:
+ try:
+ if REGEX.search(config):
+ value = True
+ except TypeError:
+ value = False
+ else:
+ REGEX = re.compile(
+ r"(?:{0}\s)(?P<value>.*)$".format(PARAM_TO_COMMAND_KEYMAP[arg]),
+ re.M,
+ )
+ NO_DESC_REGEX = re.compile(
+ r"\s+{0}\s*$".format("no description"), re.M
+ )
+ SOURCE_INTF_REGEX = re.compile(
+ r"(?:{0}\s)(?P<value>\S+)$".format(PARAM_TO_COMMAND_KEYMAP[arg]),
+ re.M,
+ )
+ value = ""
+ if arg == "description":
+ if NO_DESC_REGEX.search(config):
+ value = False
+ elif PARAM_TO_COMMAND_KEYMAP[arg] in config:
+ value = REGEX.search(config).group("value").strip()
+ elif arg == "source_interface":
+ for line in config.splitlines():
+ try:
+ if PARAM_TO_COMMAND_KEYMAP[arg] in config:
+ value = (
+ SOURCE_INTF_REGEX.search(config)
+ .group("value")
+ .strip()
+ )
+ break
+ except AttributeError:
+ value = ""
+ elif arg == "global_mcast_group_L2":
+ for line in config.splitlines():
+ try:
+ if "global mcast-group" in line and "L2" in line:
+ value = line.split()[2].strip()
+ break
+ except AttributeError:
+ value = ""
+ elif arg == "global_mcast_group_L3":
+ for line in config.splitlines():
+ try:
+ if "global mcast-group" in line and "L3" in line:
+ value = line.split()[2].strip()
+ break
+ except AttributeError:
+ value = ""
+ elif arg == "multisite_border_gateway_interface":
+ for line in config.splitlines():
+ try:
+ if PARAM_TO_COMMAND_KEYMAP[arg] in config:
+ value = (
+ SOURCE_INTF_REGEX.search(config)
+ .group("value")
+ .strip()
+ )
+ break
+ except AttributeError:
+ value = ""
+ else:
+ if PARAM_TO_COMMAND_KEYMAP[arg] in config:
+ value = REGEX.search(config).group("value").strip()
+ return value
+
+
+def get_existing(module, args):
+ existing = {}
+ netcfg = CustomNetworkConfig(
+ indent=2, contents=get_config(module, flags=["all"])
+ )
+
+ interface_string = "interface {0}".format(
+ module.params["interface"].lower()
+ )
+ parents = [interface_string]
+ config = netcfg.get_section(parents)
+
+ if config:
+ for arg in args:
+ existing[arg] = get_value(arg, config, module)
+
+ existing["interface"] = module.params["interface"].lower()
+ else:
+ if interface_string in str(netcfg):
+ existing["interface"] = module.params["interface"].lower()
+ for arg in args:
+ existing[arg] = ""
+ return existing
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key, value in table.items():
+ new_key = key_map.get(key)
+ if new_key:
+ value = table.get(key)
+ if value:
+ new_dict[new_key] = value
+ else:
+ new_dict[new_key] = value
+ return new_dict
+
+
+def fix_commands(commands, module):
+ source_interface_command = ""
+ no_source_interface_command = ""
+ no_host_reachability_command = ""
+ host_reachability_command = ""
+
+ for command in commands:
+ if "no source-interface hold-down-time" in command:
+ pass
+ elif "source-interface hold-down-time" in command:
+ pass
+ elif "no source-interface" in command:
+ no_source_interface_command = command
+ elif "source-interface" in command:
+ source_interface_command = command
+ elif "no host-reachability" in command:
+ no_host_reachability_command = command
+ elif "host-reachability" in command:
+ host_reachability_command = command
+
+ if host_reachability_command:
+ commands.pop(commands.index(host_reachability_command))
+ commands.insert(0, host_reachability_command)
+
+ if source_interface_command:
+ commands.pop(commands.index(source_interface_command))
+ commands.insert(0, source_interface_command)
+
+ if no_host_reachability_command:
+ commands.pop(commands.index(no_host_reachability_command))
+ commands.append(no_host_reachability_command)
+
+ if no_source_interface_command:
+ commands.pop(commands.index(no_source_interface_command))
+ commands.append(no_source_interface_command)
+
+ commands.insert(0, "terminal dont-ask")
+ return commands
+
+
+def gsa_tcam_check(module):
+ """
+ global_suppress_arp is an N9k-only command that requires TCAM resources.
+ This method checks the current TCAM allocation.
+ Note that changing tcam_size requires a switch reboot to take effect.
+ """
+ cmds = [
+ {"command": "show hardware access-list tcam region", "output": "json"}
+ ]
+ body = run_commands(module, cmds)
+ if body:
+ tcam_region = body[0]["TCAM_Region"]["TABLE_Sizes"]["ROW_Sizes"]
+ if bool(
+ [
+ i
+ for i in tcam_region
+ if i["type"].startswith("Ingress ARP-Ether ACL")
+ and i["tcam_size"] == "0"
+ ]
+ ):
+ msg = (
+ "'show hardware access-list tcam region' indicates 'ARP-Ether' tcam size is 0 (no allocated resources). "
+ + "'global_suppress_arp' will be rejected by device."
+ )
+ module.fail_json(msg=msg)
+
+
+def state_present(module, existing, proposed, candidate):
+ commands = list()
+ proposed_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, proposed)
+ existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
+ for key, value in proposed_commands.items():
+ if value is True:
+ commands.append(key)
+
+ elif value is False:
+ commands.append("no {0}".format(key))
+
+ elif value == "default":
+ if existing_commands.get(key):
+ existing_value = existing_commands.get(key)
+ if "global mcast-group" in key:
+ commands.append("no {0}".format(key))
+ else:
+ commands.append("no {0} {1}".format(key, existing_value))
+ else:
+ if key.replace(" ", "_").replace("-", "_") in BOOL_PARAMS:
+ commands.append("no {0}".format(key.lower()))
+ module.exit_json(commands=commands)
+ else:
+ if "L2" in key:
+ commands.append("global mcast-group " + value + " L2")
+ elif "L3" in key:
+ commands.append("global mcast-group " + value + " L3")
+ else:
+ command = "{0} {1}".format(key, value.lower())
+ commands.append(command)
+
+ if commands:
+ commands = fix_commands(commands, module)
+ parents = ["interface {0}".format(module.params["interface"].lower())]
+ candidate.add(commands, parents=parents)
+ else:
+ if not existing and module.params["interface"]:
+ commands = [
+ "interface {0}".format(module.params["interface"].lower())
+ ]
+ candidate.add(commands, parents=[])
+
+
+def state_absent(module, existing, proposed, candidate):
+ commands = ["no interface {0}".format(module.params["interface"].lower())]
+ candidate.add(commands, parents=[])
+
+
+def main():
+ argument_spec = dict(
+ interface=dict(required=True, type="str"),
+ description=dict(required=False, type="str"),
+ host_reachability=dict(required=False, type="bool"),
+ global_ingress_replication_bgp=dict(required=False, type="bool"),
+ global_suppress_arp=dict(required=False, type="bool"),
+ global_mcast_group_L2=dict(required=False, type="str"),
+ global_mcast_group_L3=dict(required=False, type="str"),
+ shutdown=dict(required=False, type="bool"),
+ source_interface=dict(required=False, type="str"),
+ source_interface_hold_down_time=dict(required=False, type="str"),
+ state=dict(
+ choices=["present", "absent"], default="present", required=False
+ ),
+ multisite_border_gateway_interface=dict(required=False, type="str"),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ mutually_exclusive = [
+ ("global_ingress_replication_bgp", "global_mcast_group_L2")
+ ]
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ result = {"changed": False, "commands": [], "warnings": warnings}
+
+ state = module.params["state"]
+
+ args = PARAM_TO_COMMAND_KEYMAP.keys()
+
+ existing = get_existing(module, args)
+ proposed_args = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+ proposed = {}
+ for key, value in proposed_args.items():
+ if key != "interface":
+ if str(value).lower() == "default":
+ value = PARAM_TO_DEFAULT_KEYMAP.get(key)
+ if value is None:
+ if key in BOOL_PARAMS:
+ value = False
+ else:
+ value = "default"
+ if str(existing.get(key)).lower() != str(value).lower():
+ proposed[key] = value
+
+ candidate = CustomNetworkConfig(indent=3)
+
+ if proposed.get("global_suppress_arp"):
+ gsa_tcam_check(module)
+ if state == "present":
+ if not existing:
+ warnings.append(
+ "The proposed NVE interface did not exist. "
+ "It's recommended to use nxos_interface to create "
+ "all logical interfaces."
+ )
+ state_present(module, existing, proposed, candidate)
+ elif state == "absent" and existing:
+ state_absent(module, existing, proposed, candidate)
+
+ if candidate:
+ candidate = candidate.items_text()
+ result["commands"] = candidate
+ result["changed"] = True
+ load_config(module, candidate)
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vxlan_vtep_vni.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vxlan_vtep_vni.py
new file mode 100644
index 00000000..96cabb71
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_vxlan_vtep_vni.py
@@ -0,0 +1,482 @@
+#!/usr/bin/python
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+
+DOCUMENTATION = """
+module: nxos_vxlan_vtep_vni
+extends_documentation_fragment:
+- cisco.nxos.nxos
+short_description: Creates a Virtual Network Identifier member (VNI)
+description:
+- Creates a Virtual Network Identifier member (VNI) for an NVE overlay interface.
+version_added: 1.0.0
+author: Gabriele Gerbino (@GGabriele)
+notes:
+- Tested against NXOSv 7.3.(0)D1(1) on VIRL
+- default, where supported, restores params default value.
+options:
+ interface:
+ description:
+ - Interface name for the VXLAN Network Virtualization Endpoint.
+ required: true
+ type: str
+ vni:
+ description:
+ - ID of the Virtual Network Identifier.
+ required: true
+ type: str
+ assoc_vrf:
+ description:
+ - This attribute is used to identify and separate processing VNIs that are associated
+ with a VRF and used for routing. The VRF and VNI specified with this command
+ must match the configuration of the VNI under the VRF.
+ type: bool
+ ingress_replication:
+ description:
+ - Specifies mechanism for host reachability advertisement.
+ choices:
+ - bgp
+ - static
+ - default
+ type: str
+ multicast_group:
+ description:
+ - The multicast group (range) of the VNI. Valid values are string and keyword
+ 'default'.
+ type: str
+ peer_list:
+ description:
+ - Set the ingress-replication static peer list. Valid values are an array, a space-separated
+ string of ip addresses, or the keyword 'default'.
+ type: list
+ elements: str
+ suppress_arp:
+ description:
+ - Suppress arp under layer 2 VNI.
+ type: bool
+ suppress_arp_disable:
+ description:
+ - Overrides the global ARP suppression config. This is available on NX-OS 9K series
+ running 9.2.x or higher.
+ type: bool
+ state:
+ description:
+ - Determines whether the config should be present or not on the device.
+ default: present
+ choices:
+ - present
+ - absent
+ type: str
+ multisite_ingress_replication:
+ description:
+ - Enables multisite ingress replication.
+ choices:
+ - disable
+ - enable
+ - optimized
+ type: str
+ version_added: 1.1.0
+"""
+EXAMPLES = """
+- cisco.nxos.nxos_vxlan_vtep_vni:
+ interface: nve1
+ vni: 6000
+ ingress_replication: default
+ multisite_ingress_replication: enable
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample: ["interface nve1", "member vni 6000", "multisite ingress-replication"]
+"""
+
+import re
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ get_config,
+ load_config,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxos_argument_spec,
+)
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
+ CustomNetworkConfig,
+)
+
+BOOL_PARAMS = ["assoc_vrf", "suppress_arp", "suppress_arp_disable"]
+PARAM_TO_DEFAULT_KEYMAP = {
+ "multicast_group": "",
+ "peer_list": [],
+ "ingress_replication": "",
+}
+PARAM_TO_COMMAND_KEYMAP = {
+ "assoc_vrf": "associate-vrf",
+ "interface": "interface",
+ "vni": "member vni",
+ "ingress_replication": "ingress-replication protocol",
+ "multicast_group": "mcast-group",
+ "peer_list": "peer-ip",
+ "suppress_arp": "suppress-arp",
+ "suppress_arp_disable": "suppress-arp disable",
+ "multisite_ingress_replication": "multisite ingress-replication",
+}
+
+
+def get_value(arg, config, module):
+ command = PARAM_TO_COMMAND_KEYMAP[arg]
+ command_val_re = re.compile(
+ r"(?:{0}\s)(?P<value>.*)$".format(command), re.M
+ )
+
+ if arg in BOOL_PARAMS:
+ command_re = re.compile(r"\s+{0}\s*$".format(command), re.M)
+ value = False
+ if command_re.search(config):
+ value = True
+ elif arg == "peer_list":
+ has_command_val = command_val_re.findall(config, re.M)
+ value = []
+ if has_command_val:
+ value = has_command_val
+ elif arg == "multisite_ingress_replication":
+ has_command = re.search(r"^\s+{0}$".format(command), config, re.M)
+ has_command_val = command_val_re.search(config, re.M)
+ value = "disable"
+ if has_command:
+ value = "enable"
+ elif has_command_val:
+ value = "optimized"
+ else:
+ value = ""
+ has_command_val = command_val_re.search(config, re.M)
+ if has_command_val:
+ value = has_command_val.group("value")
+ return value
+
+
+def check_interface(module, netcfg):
+ config = str(netcfg)
+
+ has_interface = re.search(r"(?:interface nve)(?P<value>.*)$", config, re.M)
+ value = ""
+ if has_interface:
+ value = "nve{0}".format(has_interface.group("value"))
+
+ return value
+
+
+def get_existing(module, args):
+ existing = {}
+ netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
+
+ interface_exist = check_interface(module, netcfg)
+ if interface_exist:
+ parents = ["interface {0}".format(interface_exist)]
+ temp_config = netcfg.get_section(parents)
+
+ if (
+ "member vni {0} associate-vrf".format(module.params["vni"])
+ in temp_config
+ ):
+ parents.append(
+ "member vni {0} associate-vrf".format(module.params["vni"])
+ )
+ config = netcfg.get_section(parents)
+ elif "member vni {0}".format(module.params["vni"]) in temp_config:
+ parents.append("member vni {0}".format(module.params["vni"]))
+ config = netcfg.get_section(parents)
+ else:
+ config = {}
+
+ if config:
+ for arg in args:
+ if arg not in ["interface", "vni"]:
+ existing[arg] = get_value(arg, config, module)
+ existing["interface"] = interface_exist
+ existing["vni"] = module.params["vni"]
+
+ return existing, interface_exist
+
+
+def apply_key_map(key_map, table):
+ new_dict = {}
+ for key, value in table.items():
+ new_key = key_map.get(key)
+ if new_key:
+ new_dict[new_key] = value
+ return new_dict
+
+
+def state_present(module, existing, proposed, candidate):
+ commands = list()
+ proposed_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, proposed)
+ existing_commands = apply_key_map(PARAM_TO_COMMAND_KEYMAP, existing)
+
+ for key, value in proposed_commands.items():
+ if key == "associate-vrf":
+ command = "member vni {0} {1}".format(module.params["vni"], key)
+ if not value:
+ command = "no {0}".format(command)
+ commands.append(command)
+
+ elif key == "peer-ip" and value != []:
+ for peer in value:
+ commands.append("{0} {1}".format(key, peer))
+
+ elif key == "mcast-group" and value != existing_commands.get(key):
+ commands.append("no {0}".format(key))
+ vni_command = "member vni {0}".format(module.params["vni"])
+ if vni_command not in commands:
+ commands.append("member vni {0}".format(module.params["vni"]))
+ if value != PARAM_TO_DEFAULT_KEYMAP.get(
+ "multicast_group", "default"
+ ):
+ commands.append("{0} {1}".format(key, value))
+
+ elif (
+ key == "ingress-replication protocol"
+ and value != existing_commands.get(key)
+ ):
+ evalue = existing_commands.get(key)
+ dvalue = PARAM_TO_DEFAULT_KEYMAP.get(
+ "ingress_replication", "default"
+ )
+ if value != dvalue:
+ if evalue and evalue != dvalue:
+ commands.append("no {0} {1}".format(key, evalue))
+ commands.append("{0} {1}".format(key, value))
+ else:
+ if evalue:
+ commands.append("no {0} {1}".format(key, evalue))
+
+ elif value is True:
+ commands.append(key)
+ elif value is False:
+ commands.append("no {0}".format(key))
+ elif value == "default" or value == []:
+ if existing_commands.get(key):
+ existing_value = existing_commands.get(key)
+ if key == "peer-ip":
+ for peer in existing_value:
+ commands.append("no {0} {1}".format(key, peer))
+ else:
+ commands.append("no {0} {1}".format(key, existing_value))
+ else:
+ if key.replace(" ", "_").replace("-", "_") in BOOL_PARAMS:
+ commands.append("no {0}".format(key.lower()))
+ elif (
+ key == "multisite ingress-replication"
+ and value != existing_commands.get(key)
+ ):
+ vni_command = "member vni {0}".format(module.params["vni"])
+ if vni_command not in commands:
+ commands.append("member vni {0}".format(module.params["vni"]))
+ if value == "disable":
+ command = "no {0}".format(key)
+ commands.append(command)
+ elif value == "enable":
+ command = "{0}".format(key)
+ commands.append(command)
+ elif value == "optimized":
+ command = "{0} {1}".format(key, value)
+ commands.append(command)
+ else:
+ command = "{0} {1}".format(key, value.lower())
+ commands.append(command)
+
+ if commands:
+ vni_command = "member vni {0}".format(module.params["vni"])
+ ingress_replications_command = "ingress-replication protocol static"
+ ingress_replicationb_command = "ingress-replication protocol bgp"
+ ingress_replicationns_command = (
+ "no ingress-replication protocol static"
+ )
+ ingress_replicationnb_command = "no ingress-replication protocol bgp"
+ interface_command = "interface {0}".format(module.params["interface"])
+
+ if any(
+ c in commands
+ for c in (
+ ingress_replications_command,
+ ingress_replicationb_command,
+ ingress_replicationnb_command,
+ ingress_replicationns_command,
+ )
+ ):
+ static_level_cmds = [cmd for cmd in commands if "peer" in cmd]
+ parents = [interface_command, vni_command]
+ commands = [cmd for cmd in commands if "peer" not in cmd]
+ for cmd in commands:
+ parents.append(cmd)
+ candidate.add(static_level_cmds, parents=parents)
+
+ elif "peer-ip" in commands[0]:
+ static_level_cmds = [cmd for cmd in commands]
+ parents = [
+ interface_command,
+ vni_command,
+ ingress_replications_command,
+ ]
+ candidate.add(static_level_cmds, parents=parents)
+
+ if vni_command in commands:
+ parents = [interface_command]
+ commands.remove(vni_command)
+ if module.params["assoc_vrf"] is None:
+ parents.append(vni_command)
+ candidate.add(commands, parents=parents)
+
+
+def state_absent(module, existing, proposed, candidate):
+ if existing["assoc_vrf"]:
+ commands = [
+ "no member vni {0} associate-vrf".format(module.params["vni"])
+ ]
+ else:
+ commands = ["no member vni {0}".format(module.params["vni"])]
+ parents = ["interface {0}".format(module.params["interface"])]
+ candidate.add(commands, parents=parents)
+
+
+def main():
+ argument_spec = dict(
+ interface=dict(required=True, type="str"),
+ vni=dict(required=True, type="str"),
+ assoc_vrf=dict(required=False, type="bool"),
+ multicast_group=dict(required=False, type="str"),
+ peer_list=dict(required=False, type="list", elements="str"),
+ suppress_arp=dict(required=False, type="bool"),
+ suppress_arp_disable=dict(required=False, type="bool"),
+ ingress_replication=dict(
+ required=False, type="str", choices=["bgp", "static", "default"]
+ ),
+ state=dict(
+ choices=["present", "absent"], default="present", required=False
+ ),
+ multisite_ingress_replication=dict(
+ required=False,
+ type="str",
+ choices=["enable", "optimized", "disable"],
+ ),
+ )
+
+ argument_spec.update(nxos_argument_spec)
+
+ mutually_exclusive = [
+ ("suppress_arp", "suppress_arp_disable"),
+ ("assoc_vrf", "multicast_group"),
+ ("assoc_vrf", "suppress_arp"),
+ ("assoc_vrf", "suppress_arp_disable"),
+ ("assoc_vrf", "ingress_replication"),
+ ]
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ mutually_exclusive=mutually_exclusive,
+ supports_check_mode=True,
+ )
+
+ warnings = list()
+ result = {"changed": False, "commands": [], "warnings": warnings}
+
+ if module.params["peer_list"]:
+ if (
+ module.params["peer_list"][0] != "default"
+ and module.params["ingress_replication"] != "static"
+ ):
+ module.fail_json(
+ msg="ingress_replication=static is required "
+ "when using peer_list param"
+ )
+ else:
+ peer_list = module.params["peer_list"]
+ if peer_list[0] == "default":
+ module.params["peer_list"] = "default"
+ else:
+ stripped_peer_list = list(map(str.strip, peer_list))
+ module.params["peer_list"] = stripped_peer_list
+
+ if (
+ module.params["multisite_ingress_replication"] == "enable"
+ or module.params["multisite_ingress_replication"] == "optimized"
+ ):
+ if module.params["ingress_replication"] == "static":
+ module.fail_json(
+ msg="ingress_replication=static is not allowed "
+ "when using multisite_ingress_replication"
+ )
+
+ state = module.params["state"]
+ args = PARAM_TO_COMMAND_KEYMAP.keys()
+ existing, interface_exist = get_existing(module, args)
+
+ if state == "present":
+ if not interface_exist:
+ module.fail_json(
+ msg="The proposed NVE interface does not exist. Use nxos_interface to create it first."
+ )
+ elif interface_exist != module.params["interface"]:
+ module.fail_json(
+ msg="Only 1 NVE interface is allowed on the switch."
+ )
+ elif state == "absent":
+ if interface_exist != module.params["interface"]:
+ module.exit_json(**result)
+ elif existing and existing["vni"] != module.params["vni"]:
+ module.fail_json(
+ msg="ERROR: VNI delete failed: Could not find vni node for {0}".format(
+ module.params["vni"]
+ ),
+ existing_vni=existing["vni"],
+ )
+
+ proposed_args = dict(
+ (k, v) for k, v in module.params.items() if v is not None and k in args
+ )
+
+ proposed = {}
+ for key, value in proposed_args.items():
+ if key in ["multicast_group", "peer_list", "ingress_replication"]:
+ if str(value).lower() == "default":
+ value = PARAM_TO_DEFAULT_KEYMAP.get(key, "default")
+ if key != "interface" and existing.get(key) != value:
+ proposed[key] = value
+
+ candidate = CustomNetworkConfig(indent=3)
+ if state == "present":
+ state_present(module, existing, proposed, candidate)
+ elif existing and state == "absent":
+ state_absent(module, existing, proposed, candidate)
+
+ if candidate:
+ candidate = candidate.items_text()
+ result["changed"] = True
+ result["commands"] = candidate
+ if not module.check_mode:
+ load_config(module, candidate)
+
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_zone_zoneset.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_zone_zoneset.py
new file mode 100644
index 00000000..299b5898
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/nxos_zone_zoneset.py
@@ -0,0 +1,990 @@
+#!/usr/bin/python
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or
+# https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+
+DOCUMENTATION = """
+module: nxos_zone_zoneset
+short_description: Configuration of zone/zoneset for Cisco NXOS MDS Switches.
+description:
+- Configuration of zone/zoneset for Cisco MDS NXOS.
+version_added: 1.0.0
+author:
+- Suhas Bharadwaj (@srbharadwaj) (subharad@cisco.com)
+notes:
+- Tested against NX-OS 8.4(1)
+options:
+ zone_zoneset_details:
+ description:
+ - List of zone/zoneset details to be added or removed
+ type: list
+ elements: dict
+ suboptions:
+ vsan:
+ description:
+ - vsan id
+ required: true
+ type: int
+ mode:
+ description:
+ - mode of the zone for the vsan
+ choices:
+ - enhanced
+ - basic
+ type: str
+ default_zone:
+ description:
+ - default zone behaviour for the vsan
+ choices:
+ - permit
+ - deny
+ type: str
+ smart_zoning:
+ description:
+ - Removes the vsan if True
+ type: bool
+ zone:
+ description:
+ - List of zone options for that vsan
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - name of the zone
+ required: true
+ type: str
+ remove:
+ description:
+ - Deletes the zone if True
+ type: bool
+ default: false
+ members:
+ description:
+ - Members of the zone that needs to be removed or added
+ type: list
+ elements: dict
+ suboptions:
+ pwwn:
+ description:
+ - pwwn member of the zone, use alias 'device_alias' as option for
+ device_alias member
+ aliases:
+ - device_alias
+ required: true
+ type: str
+ remove:
+ description:
+ - Removes member from the zone if True
+ type: bool
+ default: false
+ devtype:
+ description:
+ - devtype of the zone member used along with Smart zoning config
+ choices:
+ - initiator
+ - target
+ - both
+ type: str
+ zoneset:
+ description:
+ - List of zoneset options for the vsan
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - name of the zoneset
+ required: true
+ type: str
+ remove:
+ description:
+ - Removes zoneset if True
+ type: bool
+ default: false
+ action:
+ description:
+ - activates/de-activates the zoneset
+ choices:
+ - activate
+ - deactivate
+ type: str
+ members:
+ description:
+ - Members of the zoneset that needs to be removed or added
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - name of the zone that needs to be added to the zoneset or removed
+ from the zoneset
+ required: true
+ type: str
+ remove:
+ description:
+ - Removes zone member from the zoneset
+ type: bool
+ default: false
+"""
+
+EXAMPLES = """
+- name: Test that zone/zoneset module works
+ cisco.nxos.nxos_zone_zoneset:
+ zone_zoneset_details:
+ - mode: enhanced
+ vsan: 22
+ zone:
+ - members:
+ - pwwn: 11:11:11:11:11:11:11:11
+ - device_alias: test123
+ - pwwn: 61:61:62:62:12:12:12:12
+ remove: true
+ name: zoneA
+ - members:
+ - pwwn: 10:11:11:11:11:11:11:11
+ - pwwn: 62:62:62:62:21:21:21:21
+ name: zoneB
+ - name: zoneC
+ remove: true
+ zoneset:
+ - action: activate
+ members:
+ - name: zoneA
+ - name: zoneB
+ - name: zoneC
+ remove: true
+ name: zsetname1
+ - action: deactivate
+ name: zsetTestExtra
+ remove: true
+ - mode: basic
+ smart_zoning: true
+ vsan: 21
+ zone:
+ - members:
+ - devtype: both
+ pwwn: 11:11:11:11:11:11:11:11
+ - pwwn: 62:62:62:62:12:12:12:12
+ - devtype: both
+ pwwn: 92:62:62:62:12:12:1a:1a
+ remove: true
+ name: zone21A
+ - members:
+ - pwwn: 10:11:11:11:11:11:11:11
+ - pwwn: 62:62:62:62:21:21:21:21
+ name: zone21B
+ zoneset:
+ - action: activate
+ members:
+ - name: zone21A
+ - name: zone21B
+ name: zsetname212
+
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample:
+ - terminal dont-ask
+ - zone name zoneA vsan 923
+ - member pwwn 11:11:11:11:11:11:11:11
+ - no member device-alias test123
+ - zone commit vsan 923
+ - no terminal dont-ask
+messages:
+ description: debug messages
+ returned: always
+ type: list
+ sample:
+ - "zone mode is already enhanced ,no change in zone mode configuration for vsan 922"
+ - "zone member '11:11:11:11:11:11:11:11' is already present in zone 'zoneA' in vsan 922 hence nothing to add"
+ - "zone member 'test123' is already present in zone 'zoneA' in vsan 922 hence nothing to add"
+ - "zone member '61:61:62:62:12:12:12:12' is not present in zone 'zoneA' in vsan 922 hence nothing to remove"
+ - "zone member '10:11:11:11:11:11:11:11' is already present in zone 'zoneB' in vsan 922 hence nothing to add"
+ - "zone member '62:62:62:62:21:21:21:21' is already present in zone 'zoneB' in vsan 922 hence nothing to add"
+ - "zone 'zoneC' is not present in vsan 922 , so nothing to remove"
+"""
+
+
+import re
+import json
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+
+
+__metaclass__ = type
+
+
+class ShowZonesetActive(object):
+ """docstring for ShowZonesetActive"""
+
+ def __init__(self, module, vsan):
+ self.vsan = vsan
+ self.module = module
+ self.activeZSName = None
+ self.parseCmdOutput()
+
+ def execute_show_zoneset_active_cmd(self):
+ command = (
+ "show zoneset active vsan " + str(self.vsan) + " | grep zoneset"
+ )
+ output = execute_show_command(command, self.module)[0]
+ return output
+
+ def parseCmdOutput(self):
+ patZoneset = r"zoneset name (\S+) vsan " + str(self.vsan)
+ output = self.execute_show_zoneset_active_cmd().split("\n")
+ if len(output) == 0:
+ return
+ else:
+ for line in output:
+ line = line.strip()
+ mzs = re.match(patZoneset, line.strip())
+ if mzs:
+ self.activeZSName = mzs.group(1).strip()
+ return
+
+ def isZonesetActive(self, zsname):
+ if zsname == self.activeZSName:
+ return True
+ return False
+
+
+class ShowZoneset(object):
+ """docstring for ShowZoneset"""
+
+ def __init__(self, module, vsan):
+ self.vsan = vsan
+ self.module = module
+ self.zsDetails = {}
+ self.parseCmdOutput()
+
+ def execute_show_zoneset_cmd(self):
+ command = "show zoneset vsan " + str(self.vsan)
+ output = execute_show_command(command, self.module)[0]
+ return output
+
+ def parseCmdOutput(self):
+ patZoneset = r"zoneset name (\S+) vsan " + str(self.vsan)
+ patZone = r"zone name (\S+) vsan " + str(self.vsan)
+ output = self.execute_show_zoneset_cmd().split("\n")
+ for line in output:
+ line = line.strip()
+ mzs = re.match(patZoneset, line.strip())
+ mz = re.match(patZone, line.strip())
+ if mzs:
+ zonesetname = mzs.group(1).strip()
+ self.zsDetails[zonesetname] = []
+ continue
+ elif mz:
+ zonename = mz.group(1).strip()
+ v = self.zsDetails[zonesetname]
+ v.append(zonename)
+ self.zsDetails[zonesetname] = v
+
+ def isZonesetPresent(self, zsname):
+ return zsname in self.zsDetails.keys()
+
+ def isZonePresentInZoneset(self, zsname, zname):
+ if zsname in self.zsDetails.keys():
+ return zname in self.zsDetails[zsname]
+ return False
+
+
+class ShowZone(object):
+ """docstring for ShowZone"""
+
+ def __init__(self, module, vsan):
+ self.vsan = vsan
+ self.module = module
+ self.zDetails = {}
+ self.parseCmdOutput()
+
+ def execute_show_zone_vsan_cmd(self):
+ command = "show zone vsan " + str(self.vsan)
+ output = execute_show_command(command, self.module)[0]
+ return output
+
+ def parseCmdOutput(self):
+ patZone = r"zone name (\S+) vsan " + str(self.vsan)
+ output = self.execute_show_zone_vsan_cmd().split("\n")
+ for line in output:
+ line = " ".join(line.strip().split())
+ if "init" in line:
+ line = line.replace("init", "initiator")
+ m = re.match(patZone, line)
+ if m:
+ zonename = m.group(1).strip()
+ self.zDetails[zonename] = []
+ continue
+ else:
+ # For now we support only pwwn and device-alias under zone
+ # Ideally should use 'supported_choices'....but maybe next
+ # time.
+ if "pwwn" in line or "device-alias" in line:
+ v = self.zDetails[zonename]
+ v.append(line)
+ self.zDetails[zonename] = v
+
+ def isZonePresent(self, zname):
+ return zname in self.zDetails.keys()
+
+ def isZoneMemberPresent(self, zname, cmd):
+ if zname in self.zDetails.keys():
+ zonememlist = self.zDetails[zname]
+ for eachline in zonememlist:
+ if cmd in eachline:
+ return True
+ return False
+
+ def get_zDetails(self):
+ return self.zDetails
+
+
+class ShowZoneStatus(object):
+ """docstring for ShowZoneStatus"""
+
+ def __init__(self, module, vsan):
+ self.vsan = vsan
+ self.vsanAbsent = False
+ self.module = module
+ self.default_zone = ""
+ self.mode = ""
+ self.session = ""
+ self.sz = ""
+ self.locked = False
+ self.update()
+
+ def execute_show_zone_status_cmd(self):
+ command = "show zone status vsan " + str(self.vsan)
+ output = execute_show_command(command, self.module)[0]
+ return output
+
+ def update(self):
+
+ output = self.execute_show_zone_status_cmd().split("\n")
+
+ patfordefzone = "VSAN: " + str(self.vsan) + r" default-zone:\s+(\S+).*"
+ patformode = r".*mode:\s+(\S+).*"
+ patforsession = r"^session:\s+(\S+).*"
+ patforsz = r".*smart-zoning:\s+(\S+).*"
+ for line in output:
+ if "is not configured" in line:
+ self.vsanAbsent = True
+ break
+ mdefz = re.match(patfordefzone, line.strip())
+ mmode = re.match(patformode, line.strip())
+ msession = re.match(patforsession, line.strip())
+ msz = re.match(patforsz, line.strip())
+
+ if mdefz:
+ self.default_zone = mdefz.group(1)
+ if mmode:
+ self.mode = mmode.group(1)
+ if msession:
+ self.session = msession.group(1)
+ if self.session != "none":
+ self.locked = True
+ if msz:
+ self.sz = msz.group(1)
+
+ def isLocked(self):
+ return self.locked
+
+ def getDefaultZone(self):
+ return self.default_zone
+
+ def getMode(self):
+ return self.mode
+
+ def getSmartZoningStatus(self):
+ return self.sz
+
+ def isVsanAbsent(self):
+ return self.vsanAbsent
+
+
+def execute_show_command(command, module, command_type="cli_show"):
+ output = "text"
+ commands = [{"command": command, "output": output}]
+ return run_commands(module, commands)
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def getMemType(supported_choices, allmemkeys, default="pwwn"):
+ for eachchoice in supported_choices:
+ if eachchoice in allmemkeys:
+ return eachchoice
+ return default
+
+
+def main():
+
+ supported_choices = ["device_alias"]
+ zone_member_spec = dict(
+ pwwn=dict(required=True, type="str", aliases=["device_alias"]),
+ devtype=dict(type="str", choices=["initiator", "target", "both"]),
+ remove=dict(type="bool", default=False),
+ )
+
+ zone_spec = dict(
+ name=dict(required=True, type="str"),
+ members=dict(type="list", elements="dict", options=zone_member_spec),
+ remove=dict(type="bool", default=False),
+ )
+
+ zoneset_member_spec = dict(
+ name=dict(required=True, type="str"),
+ remove=dict(type="bool", default=False),
+ )
+
+ zoneset_spec = dict(
+ name=dict(type="str", required=True),
+ members=dict(
+ type="list", elements="dict", options=zoneset_member_spec
+ ),
+ remove=dict(type="bool", default=False),
+ action=dict(type="str", choices=["activate", "deactivate"]),
+ )
+
+ zonedetails_spec = dict(
+ vsan=dict(required=True, type="int"),
+ mode=dict(type="str", choices=["enhanced", "basic"]),
+ default_zone=dict(type="str", choices=["permit", "deny"]),
+ smart_zoning=dict(type="bool"),
+ zone=dict(type="list", elements="dict", options=zone_spec),
+ zoneset=dict(type="list", elements="dict", options=zoneset_spec),
+ )
+
+ argument_spec = dict(
+ zone_zoneset_details=dict(
+ type="list", elements="dict", options=zonedetails_spec
+ )
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ messages = list()
+ commands = list()
+ result = {"changed": False}
+
+ commands_executed = []
+ listOfZoneDetails = module.params["zone_zoneset_details"]
+ for eachZoneZonesetDetail in listOfZoneDetails:
+ vsan = eachZoneZonesetDetail["vsan"]
+ op_mode = eachZoneZonesetDetail["mode"]
+ op_default_zone = eachZoneZonesetDetail["default_zone"]
+ op_smart_zoning = eachZoneZonesetDetail["smart_zoning"]
+ op_zone = eachZoneZonesetDetail["zone"]
+ op_zoneset = eachZoneZonesetDetail["zoneset"]
+
+ # Step1: execute show zone status and get
+ shZoneStatusObj = ShowZoneStatus(module, vsan)
+ sw_default_zone = shZoneStatusObj.getDefaultZone()
+ sw_mode = shZoneStatusObj.getMode()
+ sw_smart_zoning = shZoneStatusObj.getSmartZoningStatus()
+
+ if sw_smart_zoning.lower() == "Enabled".lower():
+ sw_smart_zoning_bool = True
+ else:
+ sw_smart_zoning_bool = False
+
+ if shZoneStatusObj.isVsanAbsent():
+ module.fail_json(
+ msg="Vsan "
+ + str(vsan)
+ + " is not present in the switch. Hence cannot procced."
+ )
+
+ if shZoneStatusObj.isLocked():
+ module.fail_json(
+ msg="zone has acquired lock on the switch for vsan "
+ + str(vsan)
+ + ". Hence cannot procced."
+ )
+
+ # Process zone default zone options
+ if op_default_zone is not None:
+ if op_default_zone != sw_default_zone:
+ if op_default_zone == "permit":
+ commands_executed.append(
+ "zone default-zone permit vsan " + str(vsan)
+ )
+ messages.append(
+ "default zone configuration changed from deny to permit for vsan "
+ + str(vsan)
+ )
+ else:
+ commands_executed.append(
+ "no zone default-zone permit vsan " + str(vsan)
+ )
+ messages.append(
+ "default zone configuration changed from permit to deny for vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "default zone is already "
+ + op_default_zone
+ + " ,no change in default zone configuration for vsan "
+ + str(vsan)
+ )
+
+ # Process zone mode options
+ if op_mode is not None:
+ if op_mode != sw_mode:
+ if op_mode == "enhanced":
+ commands_executed.append(
+ "zone mode enhanced vsan " + str(vsan)
+ )
+ messages.append(
+ "zone mode configuration changed from basic to enhanced for vsan "
+ + str(vsan)
+ )
+ else:
+ commands_executed.append(
+ "no zone mode enhanced vsan " + str(vsan)
+ )
+ messages.append(
+ "zone mode configuration changed from enhanced to basic for vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "zone mode is already "
+ + op_mode
+ + " ,no change in zone mode configuration for vsan "
+ + str(vsan)
+ )
+
+ # Process zone smart-zone options
+ if op_smart_zoning is not None:
+ if op_smart_zoning != sw_smart_zoning_bool:
+ if op_smart_zoning:
+ commands_executed.append(
+ "zone smart-zoning enable vsan " + str(vsan)
+ )
+ messages.append(
+ "smart-zoning enabled for vsan " + str(vsan)
+ )
+ else:
+ commands_executed.append(
+ "no zone smart-zoning enable vsan " + str(vsan)
+ )
+ messages.append(
+ "smart-zoning disabled for vsan " + str(vsan)
+ )
+ else:
+ messages.append(
+ "smart-zoning is already set to "
+ + sw_smart_zoning
+ + " , no change in smart-zoning configuration for vsan "
+ + str(vsan)
+ )
+
+ # Process zone member options
+ # TODO: Obviously this needs to be cleaned up properly, as there are a lot of ifelse statements which is bad
+ # Will take it up later becoz of time constraints
+ if op_zone is not None:
+ shZoneObj = ShowZone(module, vsan)
+ for eachzone in op_zone:
+ zname = eachzone["name"]
+ zmembers = eachzone["members"]
+ removeflag = eachzone["remove"]
+ if removeflag:
+ if shZoneObj.isZonePresent(zname):
+ messages.append(
+ "zone '"
+ + zname
+ + "' is removed from vsan "
+ + str(vsan)
+ )
+ commands_executed.append(
+ "no zone name " + zname + " vsan " + str(vsan)
+ )
+ else:
+ messages.append(
+ "zone '"
+ + zname
+ + "' is not present in vsan "
+ + str(vsan)
+ + " , so nothing to remove"
+ )
+ else:
+ if zmembers is None:
+ if shZoneObj.isZonePresent(zname):
+ messages.append(
+ "zone '"
+ + zname
+ + "' is already present in vsan "
+ + str(vsan)
+ )
+ else:
+ commands_executed.append(
+ "zone name " + zname + " vsan " + str(vsan)
+ )
+ messages.append(
+ "zone '"
+ + zname
+ + "' is created in vsan "
+ + str(vsan)
+ )
+ else:
+ cmdmemlist = []
+ for eachmem in zmembers:
+ memtype = getMemType(
+ supported_choices, eachmem.keys()
+ )
+ cmd = (
+ memtype.replace("_", "-")
+ + " "
+ + eachmem[memtype]
+ )
+ if op_smart_zoning or sw_smart_zoning_bool:
+ if eachmem["devtype"] is not None:
+ cmd = cmd + " " + eachmem["devtype"]
+ if eachmem["remove"]:
+ if shZoneObj.isZonePresent(zname):
+ if shZoneObj.isZoneMemberPresent(
+ zname, cmd
+ ):
+ cmd = "no member " + cmd
+ cmdmemlist.append(cmd)
+ if (
+ op_smart_zoning
+ and eachmem["devtype"] is not None
+ ):
+ messages.append(
+ "removing zone member '"
+ + eachmem[memtype]
+ + " of device type '"
+ + eachmem["devtype"]
+ + "' from zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "removing zone member '"
+ + eachmem[memtype]
+ + "' from zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ )
+ else:
+ if (
+ op_smart_zoning
+ and eachmem["devtype"] is not None
+ ):
+ messages.append(
+ "zone member '"
+ + eachmem[memtype]
+ + "' of device type '"
+ + eachmem["devtype"]
+ + "' is not present in zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ + " hence nothing to remove"
+ )
+ else:
+ messages.append(
+ "zone member '"
+ + eachmem[memtype]
+ + "' is not present in zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ + " hence nothing to remove"
+ )
+ else:
+ messages.append(
+ "zone '"
+ + zname
+ + "' is not present in vsan "
+ + str(vsan)
+ + " , hence cannot remove the members"
+ )
+
+ else:
+ if shZoneObj.isZoneMemberPresent(zname, cmd):
+ if (
+ op_smart_zoning
+ and eachmem["devtype"] is not None
+ ):
+ messages.append(
+ "zone member '"
+ + eachmem[memtype]
+ + "' of device type '"
+ + eachmem["devtype"]
+ + "' is already present in zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ + " hence nothing to add"
+ )
+ else:
+ messages.append(
+ "zone member '"
+ + eachmem[memtype]
+ + "' is already present in zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ + " hence nothing to add"
+ )
+ else:
+ cmd = "member " + cmd
+ cmdmemlist.append(cmd)
+ if (
+ op_smart_zoning
+ and eachmem["devtype"] is not None
+ ):
+ messages.append(
+ "adding zone member '"
+ + eachmem[memtype]
+ + "' of device type '"
+ + eachmem["devtype"]
+ + "' to zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "adding zone member '"
+ + eachmem[memtype]
+ + "' to zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ )
+ if len(cmdmemlist) != 0:
+ commands_executed.append(
+ "zone name " + zname + " vsan " + str(vsan)
+ )
+ commands_executed = commands_executed + cmdmemlist
+
+ # Process zoneset member options
+ if op_zoneset is not None:
+ dactcmd = []
+ actcmd = []
+ shZonesetObj = ShowZoneset(module, vsan)
+ shZonesetActiveObj = ShowZonesetActive(module, vsan)
+ for eachzoneset in op_zoneset:
+ zsetname = eachzoneset["name"]
+ zsetmembers = eachzoneset["members"]
+ removeflag = eachzoneset["remove"]
+ actionflag = eachzoneset["action"]
+ if removeflag:
+ if shZonesetObj.isZonesetPresent(zsetname):
+ messages.append(
+ "zoneset '"
+ + zsetname
+ + "' is removed from vsan "
+ + str(vsan)
+ )
+ commands_executed.append(
+ "no zoneset name "
+ + zsetname
+ + " vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "zoneset '"
+ + zsetname
+ + "' is not present in vsan "
+ + str(vsan)
+ + " ,hence there is nothing to remove"
+ )
+ else:
+ if zsetmembers is not None:
+ cmdmemlist = []
+ for eachzsmem in zsetmembers:
+ zsetmem_name = eachzsmem["name"]
+ zsetmem_removeflag = eachzsmem["remove"]
+ if zsetmem_removeflag:
+ if shZonesetObj.isZonePresentInZoneset(
+ zsetname, zsetmem_name
+ ):
+ cmd = "no member " + zsetmem_name
+ cmdmemlist.append(cmd)
+ messages.append(
+ "removing zoneset member '"
+ + zsetmem_name
+ + "' from zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "zoneset member '"
+ + zsetmem_name
+ + "' is not present in zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ + " ,hence there is nothing to remove"
+ )
+ else:
+ if shZonesetObj.isZonePresentInZoneset(
+ zsetname, zsetmem_name
+ ):
+ messages.append(
+ "zoneset member '"
+ + zsetmem_name
+ + "' is already present in zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ + " ,hence there is nothing to add"
+ )
+ else:
+ cmd = "member " + zsetmem_name
+ cmdmemlist.append(cmd)
+ messages.append(
+ "adding zoneset member '"
+ + zsetmem_name
+ + "' to zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ )
+ if len(cmdmemlist) != 0:
+ commands_executed.append(
+ "zoneset name "
+ + zsetname
+ + " vsan "
+ + str(vsan)
+ )
+ commands_executed = commands_executed + cmdmemlist
+ else:
+ if shZonesetObj.isZonesetPresent(zsetname):
+ messages.append(
+ "zoneset '"
+ + zsetname
+ + "' is already present in vsan "
+ + str(vsan)
+ )
+ else:
+ commands_executed.append(
+ "zoneset name "
+ + zsetname
+ + " vsan "
+ + str(vsan)
+ )
+ messages.append(
+ "zoneset '"
+ + zsetname
+ + "' is created in vsan "
+ + str(vsan)
+ )
+
+ # Process zoneset activate options
+ if actionflag == "deactivate":
+ if shZonesetActiveObj.isZonesetActive(zsetname):
+ messages.append(
+ "deactivating zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ )
+ dactcmd.append(
+ "no zoneset activate name "
+ + zsetname
+ + " vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ + " is not activated, hence cannot deactivate"
+ )
+ elif actionflag == "activate":
+ if commands_executed:
+ messages.append(
+ "activating zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ )
+ actcmd.append(
+ "zoneset activate name "
+ + zsetname
+ + " vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "no changes to existing zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ + " hence activate action is ignored"
+ )
+ commands_executed = commands_executed + dactcmd + actcmd
+
+ if commands_executed:
+ if op_mode == "enhanced":
+ commands_executed.append("zone commit vsan " + str(vsan))
+ elif op_mode is None:
+ if sw_mode == "enhanced":
+ commands_executed.append("zone commit vsan " + str(vsan))
+
+ if commands_executed:
+ commands_executed = (
+ ["terminal dont-ask"]
+ + commands_executed
+ + ["no terminal dont-ask"]
+ )
+
+ cmds = flatten_list(commands_executed)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(
+ changed=False,
+ commands=cmds,
+ msg="Check Mode: No cmds issued to the hosts",
+ )
+ else:
+ result["changed"] = True
+ commands = commands + cmds
+ load_config(module, cmds)
+
+ result["messages"] = messages
+ result["commands"] = commands_executed
+ result["warnings"] = warnings
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/nxos_devicealias.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/nxos_devicealias.py
new file mode 100644
index 00000000..30edfc75
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/nxos_devicealias.py
@@ -0,0 +1,593 @@
+#!/usr/bin/python
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or
+# https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+
+DOCUMENTATION = """
+module: nxos_devicealias
+short_description: Configuration of device alias for Cisco NXOS MDS Switches.
+description:
+- Configuration of device alias for Cisco MDS NXOS.
+version_added: 1.0.0
+author:
+- Suhas Bharadwaj (@srbharadwaj) (subharad@cisco.com)
+notes:
+- Tested against NX-OS 8.4(1)
+options:
+ distribute:
+ description:
+ - Enable/Disable device-alias distribution
+ type: bool
+ mode:
+ description:
+ - Mode of devices-alias, basic or enhanced
+ choices:
+ - basic
+ - enhanced
+ type: str
+ da:
+ description:
+ - List of device-alias to be added or removed
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - Name of the device-alias to be added or removed
+ required: true
+ type: str
+ pwwn:
+ description:
+ - pwwn to which the name needs to be associated with
+ type: str
+ remove:
+ description:
+ - Removes the device-alias if set to True
+ type: bool
+ default: false
+ rename:
+ description:
+ - List of device-alias to be renamed
+ type: list
+ elements: dict
+ suboptions:
+ old_name:
+ description:
+ - Old name of the device-alias that needs to be renamed
+ required: true
+ type: str
+ new_name:
+ description:
+ - New name of the device-alias
+ required: true
+ type: str
+"""
+
+EXAMPLES = """
+- name: Test that device alias module works
+ cisco.nxos.nxos_devicealias:
+ da:
+ - name: test1_add
+ pwwn: 56:2:22:11:22:88:11:67
+ - name: test2_add
+ pwwn: 65:22:22:11:22:22:11:d
+ - name: dev1
+ remove: true
+ - name: dev2
+ remove: true
+ distribute: true
+ mode: enhanced
+ rename:
+ - new_name: bcd
+ old_name: abc
+ - new_name: bcd1
+ old_name: abc1
+
+
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample:
+ - terminal dont-ask
+ - device-alias database
+ - device-alias name somename pwwn 10:00:00:00:89:a1:01:03
+ - device-alias name somename1 pwwn 10:00:00:00:89:a1:02:03
+ - device-alias commit
+ - no terminal dont-ask
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+import string
+
+__metaclass__ = type
+
+VALID_DA_CHARS = ("-", "_", "$", "^")
+
+
+class showDeviceAliasStatus(object):
+ """docstring for showDeviceAliasStatus"""
+
+ def __init__(self, module):
+ self.module = module
+ self.distribute = ""
+ self.mode = ""
+ self.locked = False
+ self.update()
+
+ def execute_show_cmd(self, cmd):
+ output = execute_show_command(cmd, self.module)[0]
+ return output
+
+ def update(self):
+ command = "show device-alias status"
+ output = self.execute_show_cmd(command).split("\n")
+ for o in output:
+ if "Fabric Distribution" in o:
+ self.distribute = o.split(":")[1].strip().lower()
+ if "Mode" in o:
+ self.mode = o.split("Mode:")[1].strip().lower()
+ if "Locked" in o:
+ self.locked = True
+
+ def isLocked(self):
+ return self.locked
+
+ def getDistribute(self):
+ return self.distribute
+
+ def getMode(self):
+ return self.mode
+
+
+class showDeviceAliasDatabase(object):
+ """docstring for showDeviceAliasDatabase"""
+
+ def __init__(self, module):
+ self.module = module
+ self.da_dict = {}
+ self.update()
+
+ def execute_show_cmd(self, cmd):
+ output = execute_show_command(cmd, self.module)[0]
+ return output
+
+ def update(self):
+ command = "show device-alias database"
+ # output = execute_show_command(command, self.module)[0].split("\n")
+ output = self.execute_show_cmd(command)
+ self.da_list = output.split("\n")
+ for eachline in self.da_list:
+ if "device-alias" in eachline:
+ sv = eachline.strip().split()
+ self.da_dict[sv[2]] = sv[4]
+
+ def isNameInDaDatabase(self, name):
+ return name in self.da_dict.keys()
+
+ def isPwwnInDaDatabase(self, pwwn):
+ newpwwn = ":".join(
+ ["0" + str(ep) if len(ep) == 1 else ep for ep in pwwn.split(":")]
+ )
+ return newpwwn in self.da_dict.values()
+
+ def isNamePwwnPresentInDatabase(self, name, pwwn):
+ newpwwn = ":".join(
+ ["0" + str(ep) if len(ep) == 1 else ep for ep in pwwn.split(":")]
+ )
+ if name in self.da_dict.keys():
+ if newpwwn == self.da_dict[name]:
+ return True
+ return False
+
+ def getPwwnByName(self, name):
+ if name in self.da_dict.keys():
+ return self.da_dict[name]
+ else:
+ return None
+
+ def getNameByPwwn(self, pwwn):
+ newpwwn = ":".join(
+ ["0" + str(ep) if len(ep) == 1 else ep for ep in pwwn.split(":")]
+ )
+ for n, p in self.da_dict.items():
+ if p == newpwwn:
+ return n
+ return None
+
+
+def isPwwnValid(pwwn):
+ pwwnsplit = pwwn.split(":")
+ if len(pwwnsplit) != 8:
+ return False
+ for eachpwwnsplit in pwwnsplit:
+ if len(eachpwwnsplit) > 2 or len(eachpwwnsplit) < 1:
+ return False
+ if not all(c in string.hexdigits for c in eachpwwnsplit):
+ return False
+ return True
+
+
+def isNameValid(name):
+ if not name[0].isalpha():
+ # Illegal first character. Name must start with a letter
+ return False
+ if len(name) > 64:
+ return False
+ for character in name:
+ if not character.isalnum() and character not in VALID_DA_CHARS:
+ return False
+ return True
+
+
+def execute_show_command(command, module, command_type="cli_show"):
+ output = "text"
+ commands = [{"command": command, "output": output}]
+ out = run_commands(module, commands)
+ return out
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def main():
+ element_spec = dict(
+ name=dict(required=True, type="str"),
+ pwwn=dict(type="str"),
+ remove=dict(type="bool", default=False),
+ )
+
+ element_spec_rename = dict(
+ old_name=dict(required=True, type="str"),
+ new_name=dict(required=True, type="str"),
+ )
+
+ argument_spec = dict(
+ distribute=dict(type="bool"),
+ mode=dict(type="str", choices=["enhanced", "basic"]),
+ da=dict(type="list", elements="dict", options=element_spec),
+ rename=dict(type="list", elements="dict", options=element_spec_rename),
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ messages = list()
+ commands_to_execute = list()
+ result = {"changed": False}
+
+ distribute = module.params["distribute"]
+ mode = module.params["mode"]
+ da = module.params["da"]
+ rename = module.params["rename"]
+
+ # Step 0.0: Validate syntax of name and pwwn
+ # Also validate syntax of rename arguments
+ if da is not None:
+ for eachdict in da:
+ name = eachdict["name"]
+ pwwn = eachdict["pwwn"]
+ remove = eachdict["remove"]
+ if pwwn is not None:
+ pwwn = pwwn.lower()
+ if not remove:
+ if pwwn is None:
+ module.fail_json(
+ msg="This device alias name "
+ + str(name)
+ + " which needs to be added, does not have pwwn specified. Please specify a valid pwwn"
+ )
+ if not isNameValid(name):
+ module.fail_json(
+ msg="This pwwn name is invalid : "
+ + str(name)
+ + ". Note that name cannot be more than 64 alphanumeric chars, "
+ + "it must start with a letter, and can only contain these characters: "
+ + ", ".join(
+ ["'{0}'".format(c) for c in VALID_DA_CHARS]
+ )
+ )
+ if not isPwwnValid(pwwn):
+ module.fail_json(
+ msg="This pwwn is invalid : "
+ + str(pwwn)
+ + ". Please check that its a valid pwwn"
+ )
+ if rename is not None:
+ for eachdict in rename:
+ oldname = eachdict["old_name"]
+ newname = eachdict["new_name"]
+ if not isNameValid(oldname):
+ module.fail_json(
+ msg="This pwwn name is invalid : "
+ + str(oldname)
+ + ". Note that name cannot be more than 64 alphanumeric chars, "
+ + "it must start with a letter, and can only contain these characters: "
+ + ", ".join(["'{0}'".format(c) for c in VALID_DA_CHARS])
+ )
+ if not isNameValid(newname):
+ module.fail_json(
+ msg="This pwwn name is invalid : "
+ + str(newname)
+ + ". Note that name cannot be more than 64 alphanumeric chars, "
+ + "it must start with a letter, and can only contain these characters: "
+ + ", ".join(["'{0}'".format(c) for c in VALID_DA_CHARS])
+ )
+
+ # Step 0.1: Check DA status
+ shDAStausObj = showDeviceAliasStatus(module)
+ d = shDAStausObj.getDistribute()
+ m = shDAStausObj.getMode()
+ if shDAStausObj.isLocked():
+ module.fail_json(
+ msg="device-alias has acquired lock on the switch. Hence cannot procced."
+ )
+
+ # Step 1: Process distribute
+ commands = []
+ if distribute is not None:
+ if distribute:
+ # playbook has distribute as True(enabled)
+ if d == "disabled":
+ # but switch distribute is disabled(false), so set it to
+ # true(enabled)
+ commands.append("device-alias distribute")
+ messages.append(
+ "device-alias distribute changed from disabled to enabled"
+ )
+ else:
+ messages.append(
+ "device-alias distribute remains unchanged. current distribution mode is enabled"
+ )
+ else:
+ # playbook has distribute as False(disabled)
+ if d == "enabled":
+ # but switch distribute is enabled(true), so set it to
+ # false(disabled)
+ commands.append("no device-alias distribute")
+ messages.append(
+ "device-alias distribute changed from enabled to disabled"
+ )
+ else:
+ messages.append(
+ "device-alias distribute remains unchanged. current distribution mode is disabled"
+ )
+
+ cmds = flatten_list(commands)
+ if cmds:
+ commands_to_execute = commands_to_execute + cmds
+ if module.check_mode:
+ # Check mode implemented at the da_add/da_remove stage
+ pass
+ else:
+ result["changed"] = True
+ load_config(module, cmds)
+
+ # Step 2: Process mode
+ commands = []
+ if mode is not None:
+ if mode == "basic":
+ # playbook has mode as basic
+ if m == "enhanced":
+ # but switch mode is enhanced, so set it to basic
+ commands.append("no device-alias mode enhanced")
+ messages.append(
+ "device-alias mode changed from enhanced to basic"
+ )
+ else:
+ messages.append(
+ "device-alias mode remains unchanged. current mode is basic"
+ )
+
+ else:
+ # playbook has mode as enhanced
+ if m == "basic":
+ # but switch mode is basic, so set it to enhanced
+ commands.append("device-alias mode enhanced")
+ messages.append(
+ "device-alias mode changed from basic to enhanced"
+ )
+ else:
+ messages.append(
+ "device-alias mode remains unchanged. current mode is enhanced"
+ )
+
+ if commands:
+ if distribute:
+ commands.append("device-alias commit")
+ commands = (
+ ["terminal dont-ask"] + commands + ["no terminal dont-ask"]
+ )
+ else:
+ if distribute is None and d == "enabled":
+ commands.append("device-alias commit")
+ commands = (
+ ["terminal dont-ask"] + commands + ["no terminal dont-ask"]
+ )
+
+ cmds = flatten_list(commands)
+
+ if cmds:
+ commands_to_execute = commands_to_execute + cmds
+ if module.check_mode:
+ # Check mode implemented at the end
+ pass
+ else:
+ result["changed"] = True
+ load_config(module, cmds)
+
+ # Step 3: Process da
+ commands = []
+ shDADatabaseObj = showDeviceAliasDatabase(module)
+ if da is not None:
+ da_remove_list = []
+ da_add_list = []
+ for eachdict in da:
+ name = eachdict["name"]
+ pwwn = eachdict["pwwn"]
+ remove = eachdict["remove"]
+ if pwwn is not None:
+ pwwn = pwwn.lower()
+ if remove:
+ if shDADatabaseObj.isNameInDaDatabase(name):
+ commands.append("no device-alias name " + name)
+ da_remove_list.append(name)
+ else:
+ messages.append(
+ name
+ + " - This device alias name is not in switch device-alias database, hence cannot be removed."
+ )
+ else:
+ if shDADatabaseObj.isNamePwwnPresentInDatabase(name, pwwn):
+ messages.append(
+ name
+ + " : "
+ + pwwn
+ + " - This device alias name,pwwn is already in switch device-alias database, hence nothing to configure"
+ )
+ else:
+ if shDADatabaseObj.isNameInDaDatabase(name):
+ module.fail_json(
+ msg=name
+ + " - This device alias name is already present in switch device-alias database but assigned to another pwwn ("
+ + shDADatabaseObj.getPwwnByName(name)
+ + ") hence cannot be added"
+ )
+
+ elif shDADatabaseObj.isPwwnInDaDatabase(pwwn):
+ module.fail_json(
+ msg=pwwn
+ + " - This device alias pwwn is already present in switch device-alias database but assigned to another name ("
+ + shDADatabaseObj.getNameByPwwn(pwwn)
+ + ") hence cannot be added"
+ )
+
+ else:
+ commands.append(
+ "device-alias name " + name + " pwwn " + pwwn
+ )
+ da_add_list.append(name)
+
+ if len(da_add_list) != 0 or len(da_remove_list) != 0:
+ commands = ["device-alias database"] + commands
+ if distribute:
+ commands.append("device-alias commit")
+ commands = (
+ ["terminal dont-ask"] + commands + ["no terminal dont-ask"]
+ )
+ else:
+ if distribute is None and d == "enabled":
+ commands.append("device-alias commit")
+ commands = (
+ ["terminal dont-ask"]
+ + commands
+ + ["no terminal dont-ask"]
+ )
+
+ cmds = flatten_list(commands)
+ if cmds:
+ commands_to_execute = commands_to_execute + cmds
+ if module.check_mode:
+ # Check mode implemented at the end
+ pass
+ else:
+ result["changed"] = True
+ load_config(module, cmds)
+ if len(da_remove_list) != 0:
+ messages.append(
+ "the required device-alias were removed. "
+ + ",".join(da_remove_list)
+ )
+ if len(da_add_list) != 0:
+ messages.append(
+ "the required device-alias were added. "
+ + ",".join(da_add_list)
+ )
+
+ # Step 5: Process rename
+ commands = []
+ if rename is not None:
+ for eachdict in rename:
+ oldname = eachdict["old_name"]
+ newname = eachdict["new_name"]
+ if shDADatabaseObj.isNameInDaDatabase(newname):
+ module.fail_json(
+ changed=False,
+ commands=cmds,
+ msg=newname
+ + " - this name is already present in the device-alias database, hence we cannot rename "
+ + oldname
+ + " with this one",
+ )
+ if shDADatabaseObj.isNameInDaDatabase(oldname):
+ commands.append(
+ "device-alias rename " + oldname + " " + newname
+ )
+ else:
+ module.fail_json(
+ changed=False,
+ commands=cmds,
+ msg=oldname
+ + " - this name is not present in the device-alias database, hence we cannot rename.",
+ )
+
+ if len(commands) != 0:
+ commands = ["device-alias database"] + commands
+ if distribute:
+ commands.append("device-alias commit")
+ commands = (
+ ["terminal dont-ask"] + commands + ["no terminal dont-ask"]
+ )
+ else:
+ if distribute is None and d == "enabled":
+ commands.append("device-alias commit")
+ commands = (
+ ["terminal dont-ask"]
+ + commands
+ + ["no terminal dont-ask"]
+ )
+ cmds = flatten_list(commands)
+ if cmds:
+ commands_to_execute = commands_to_execute + cmds
+ if module.check_mode:
+ # Check mode implemented at the end
+ pass
+ else:
+ result["changed"] = True
+ load_config(module, cmds)
+
+ # Step END: check for 'check' mode
+ if module.check_mode:
+ module.exit_json(
+ changed=False,
+ commands=commands_to_execute,
+ msg="Check Mode: No cmds issued to the hosts",
+ )
+
+ result["messages"] = messages
+ result["commands"] = commands_to_execute
+ result["warnings"] = warnings
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/nxos_vsan.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/nxos_vsan.py
new file mode 100644
index 00000000..c68dd0ca
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/nxos_vsan.py
@@ -0,0 +1,385 @@
+#!/usr/bin/python
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or
+# https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+
+DOCUMENTATION = """
+module: nxos_vsan
+short_description: Configuration of vsan for Cisco NXOS MDS Switches.
+description:
+- Configuration of vsan for Cisco MDS NXOS.
+version_added: 1.0.0
+author:
+- Suhas Bharadwaj (@srbharadwaj) (subharad@cisco.com)
+notes:
+- Tested against NX-OS 8.4(1)
+options:
+ vsan:
+ description:
+ - List of vsan details to be added or removed
+ type: list
+ elements: dict
+ suboptions:
+ id:
+ description:
+ - Vsan id
+ required: true
+ type: int
+ name:
+ description:
+ - Name of the vsan
+ type: str
+ suspend:
+ description:
+ - suspend the vsan if True
+ type: bool
+ remove:
+ description:
+ - Removes the vsan if True
+ type: bool
+ interface:
+ description:
+ - List of vsan's interfaces to be added
+ type: list
+ elements: str
+"""
+
+EXAMPLES = """
+- name: Test that vsan module works
+ cisco.nxos.nxos_vsan:
+ vsan:
+ - id: 922
+ interface:
+ - fc1/1
+ - fc1/2
+ - port-channel 1
+ name: vsan-SAN-A
+ remove: false
+ suspend: false
+ - id: 923
+ interface:
+ - fc1/11
+ - fc1/21
+ - port-channel 2
+ name: vsan-SAN-B
+ remove: false
+ suspend: true
+ - id: 1923
+ name: vsan-SAN-Old
+ remove: true
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample:
+ - terminal dont-ask
+ - vsan database
+ - vsan 922 interface fc1/40
+ - vsan 922 interface port-channel 155
+ - no terminal dont-ask
+"""
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+import re
+
+__metaclass__ = type
+
+
+class Vsan(object):
+ def __init__(self, vsanid):
+ self.vsanid = vsanid
+ self.vsanname = None
+ self.vsanstate = None
+ self.vsanoperstate = None
+ self.vsaninterfaces = []
+
+
+class GetVsanInfoFromSwitch(object):
+ """docstring for GetVsanInfoFromSwitch"""
+
+ def __init__(self, module):
+ self.module = module
+ self.vsaninfo = {}
+ self.processShowVsan()
+ self.processShowVsanMembership()
+
+ def execute_show_vsan_cmd(self):
+ output = execute_show_command("show vsan", self.module)[0]
+ return output
+
+ def execute_show_vsan_mem_cmd(self):
+ output = execute_show_command("show vsan membership", self.module)[0]
+ return output
+
+ def processShowVsan(self):
+ patv = r"^vsan\s+(\d+)\s+information"
+ patnamestate = "name:(.*)state:(.*)"
+ patoperstate = "operational state:(.*)"
+
+ output = self.execute_show_vsan_cmd().split("\n")
+ for o in output:
+ z = re.match(patv, o.strip())
+ if z:
+ v = z.group(1).strip()
+ self.vsaninfo[v] = Vsan(v)
+
+ z1 = re.match(patnamestate, o.strip())
+ if z1:
+ n = z1.group(1).strip()
+ s = z1.group(2).strip()
+ self.vsaninfo[v].vsanname = n
+ self.vsaninfo[v].vsanstate = s
+
+ z2 = re.match(patoperstate, o.strip())
+ if z2:
+ oper = z2.group(1).strip()
+ self.vsaninfo[v].vsanoperstate = oper
+
+ # 4094/4079 vsan is always present
+ self.vsaninfo["4079"] = Vsan("4079")
+ self.vsaninfo["4094"] = Vsan("4094")
+
+ def processShowVsanMembership(self):
+ patv = r"^vsan\s+(\d+).*"
+ output = self.execute_show_vsan_mem_cmd().split("\n")
+ memlist = []
+ v = None
+ for o in output:
+ z = re.match(patv, o.strip())
+ if z:
+ if v is not None:
+ self.vsaninfo[v].vsaninterfaces = memlist
+ memlist = []
+ v = z.group(1)
+ if "interfaces" not in o:
+ llist = o.strip().split()
+ memlist = memlist + llist
+ self.vsaninfo[v].vsaninterfaces = memlist
+
+ def getVsanInfoObjects(self):
+ return self.vsaninfo
+
+
+def execute_show_command(command, module, command_type="cli_show"):
+ output = "text"
+ commands = [{"command": command, "output": output}]
+ return run_commands(module, commands)
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def main():
+ vsan_element_spec = dict(
+ id=dict(required=True, type="int"),
+ name=dict(type="str"),
+ remove=dict(type="bool"),
+ suspend=dict(type="bool"),
+ interface=dict(type="list", elements="str"),
+ )
+
+ argument_spec = dict(
+ vsan=dict(type="list", elements="dict", options=vsan_element_spec)
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+ warnings = list()
+ messages = list()
+ commands_executed = list()
+ result = {"changed": False}
+
+ obj = GetVsanInfoFromSwitch(module)
+ dictSwVsanObjs = obj.getVsanInfoObjects()
+
+ commands = []
+ vsan_list = module.params["vsan"]
+
+ for eachvsan in vsan_list:
+ vsanid = str(eachvsan["id"])
+ vsanname = eachvsan["name"]
+ vsanremove = eachvsan["remove"]
+ vsansuspend = eachvsan["suspend"]
+ vsaninterface_list = eachvsan["interface"]
+
+ if int(vsanid) < 1 or int(vsanid) >= 4095:
+ module.fail_json(
+ msg=vsanid
+ + " - This is an invalid vsan. Supported vsan range is 1-4094"
+ )
+
+ if vsanid in dictSwVsanObjs.keys():
+ sw_vsanid = vsanid
+ sw_vsanname = dictSwVsanObjs[vsanid].vsanname
+ sw_vsanstate = dictSwVsanObjs[vsanid].vsanstate
+ sw_vsaninterfaces = dictSwVsanObjs[vsanid].vsaninterfaces
+ else:
+ sw_vsanid = None
+ sw_vsanname = None
+ sw_vsanstate = None
+ sw_vsaninterfaces = []
+
+ if vsanremove:
+ # Negative case:
+ if vsanid == "4079" or vsanid == "4094":
+ messages.append(
+ str(vsanid)
+ + " is a reserved vsan, hence cannot be removed"
+ )
+ continue
+ if vsanid == sw_vsanid:
+ commands.append("no vsan " + str(vsanid))
+ messages.append("deleting the vsan " + str(vsanid))
+ else:
+ messages.append(
+ "There is no vsan "
+ + str(vsanid)
+ + " present in the switch. Hence there is nothing to delete"
+ )
+ continue
+ else:
+ # Negative case:
+ if vsanid == "4079" or vsanid == "4094":
+ messages.append(
+ str(vsanid)
+ + " is a reserved vsan, and always present on the switch"
+ )
+ else:
+ if vsanid == sw_vsanid:
+ messages.append(
+ "There is already a vsan "
+ + str(vsanid)
+ + " present in the switch. Hence there is nothing to configure"
+ )
+ else:
+ commands.append("vsan " + str(vsanid))
+ messages.append("creating vsan " + str(vsanid))
+
+ if vsanname is not None:
+ # Negative case:
+ if vsanid == "4079" or vsanid == "4094":
+ messages.append(
+ str(vsanid) + " is a reserved vsan, and cannot be renamed"
+ )
+ else:
+ if vsanname == sw_vsanname:
+ messages.append(
+ "There is already a vsan "
+ + str(vsanid)
+ + " present in the switch, which has the name "
+ + vsanname
+ + " Hence there is nothing to configure"
+ )
+ else:
+ commands.append(
+ "vsan " + str(vsanid) + " name " + vsanname
+ )
+ messages.append(
+ "setting vsan name to "
+ + vsanname
+ + " for vsan "
+ + str(vsanid)
+ )
+
+ if vsansuspend:
+ # Negative case:
+ if vsanid == "4079" or vsanid == "4094":
+ messages.append(
+ str(vsanid)
+ + " is a reserved vsan, and cannot be suspended"
+ )
+ else:
+ if sw_vsanstate == "suspended":
+ messages.append(
+ "There is already a vsan "
+ + str(vsanid)
+ + " present in the switch, which is in suspended state "
+ )
+ else:
+ commands.append("vsan " + str(vsanid) + " suspend")
+ messages.append("suspending the vsan " + str(vsanid))
+ else:
+ if sw_vsanstate == "active":
+ messages.append(
+ "There is already a vsan "
+ + str(vsanid)
+ + " present in the switch, which is in active state "
+ )
+ else:
+ commands.append("no vsan " + str(vsanid) + " suspend")
+ messages.append("no suspending the vsan " + str(vsanid))
+
+ if vsaninterface_list is not None:
+ for each_interface_name in vsaninterface_list:
+ # For fcip,port-channel,vfc-port-channel need to remove the
+ # extra space to compare
+ temp = re.sub(" +", "", each_interface_name)
+ if temp in sw_vsaninterfaces:
+ messages.append(
+ each_interface_name
+ + " is already present in the vsan "
+ + str(vsanid)
+ + " interface list"
+ )
+ else:
+ commands.append(
+ "vsan "
+ + str(vsanid)
+ + " interface "
+ + each_interface_name
+ )
+ messages.append(
+ "adding interface "
+ + each_interface_name
+ + " to vsan "
+ + str(vsanid)
+ )
+
+ if len(commands) != 0:
+ commands = (
+ ["terminal dont-ask"]
+ + ["vsan database"]
+ + commands
+ + ["no terminal dont-ask"]
+ )
+
+ cmds = flatten_list(commands)
+ commands_executed = cmds
+
+ if commands_executed:
+ if module.check_mode:
+ module.exit_json(
+ changed=False,
+ commands=commands_executed,
+ msg="Check Mode: No cmds issued to the hosts",
+ )
+ else:
+ result["changed"] = True
+ load_config(module, commands_executed)
+
+ result["messages"] = messages
+ result["commands"] = commands_executed
+ result["warnings"] = warnings
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/nxos_zone_zoneset.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/nxos_zone_zoneset.py
new file mode 100644
index 00000000..299b5898
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/modules/storage/nxos_zone_zoneset.py
@@ -0,0 +1,990 @@
+#!/usr/bin/python
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or
+# https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+
+DOCUMENTATION = """
+module: nxos_zone_zoneset
+short_description: Configuration of zone/zoneset for Cisco NXOS MDS Switches.
+description:
+- Configuration of zone/zoneset for Cisco MDS NXOS.
+version_added: 1.0.0
+author:
+- Suhas Bharadwaj (@srbharadwaj) (subharad@cisco.com)
+notes:
+- Tested against NX-OS 8.4(1)
+options:
+ zone_zoneset_details:
+ description:
+ - List of zone/zoneset details to be added or removed
+ type: list
+ elements: dict
+ suboptions:
+ vsan:
+ description:
+ - vsan id
+ required: true
+ type: int
+ mode:
+ description:
+ - mode of the zone for the vsan
+ choices:
+ - enhanced
+ - basic
+ type: str
+ default_zone:
+ description:
+ - default zone behaviour for the vsan
+ choices:
+ - permit
+ - deny
+ type: str
+ smart_zoning:
+ description:
+ - Removes the vsan if True
+ type: bool
+ zone:
+ description:
+ - List of zone options for that vsan
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - name of the zone
+ required: true
+ type: str
+ remove:
+ description:
+ - Deletes the zone if True
+ type: bool
+ default: false
+ members:
+ description:
+ - Members of the zone that needs to be removed or added
+ type: list
+ elements: dict
+ suboptions:
+ pwwn:
+ description:
+ - pwwn member of the zone, use alias 'device_alias' as option for
+ device_alias member
+ aliases:
+ - device_alias
+ required: true
+ type: str
+ remove:
+ description:
+ - Removes member from the zone if True
+ type: bool
+ default: false
+ devtype:
+ description:
+ - devtype of the zone member used along with Smart zoning config
+ choices:
+ - initiator
+ - target
+ - both
+ type: str
+ zoneset:
+ description:
+ - List of zoneset options for the vsan
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - name of the zoneset
+ required: true
+ type: str
+ remove:
+ description:
+ - Removes zoneset if True
+ type: bool
+ default: false
+ action:
+ description:
+ - activates/de-activates the zoneset
+ choices:
+ - activate
+ - deactivate
+ type: str
+ members:
+ description:
+ - Members of the zoneset that needs to be removed or added
+ type: list
+ elements: dict
+ suboptions:
+ name:
+ description:
+ - name of the zone that needs to be added to the zoneset or removed
+ from the zoneset
+ required: true
+ type: str
+ remove:
+ description:
+ - Removes zone member from the zoneset
+ type: bool
+ default: false
+"""
+
+EXAMPLES = """
+- name: Test that zone/zoneset module works
+ cisco.nxos.nxos_zone_zoneset:
+ zone_zoneset_details:
+ - mode: enhanced
+ vsan: 22
+ zone:
+ - members:
+ - pwwn: 11:11:11:11:11:11:11:11
+ - device_alias: test123
+ - pwwn: 61:61:62:62:12:12:12:12
+ remove: true
+ name: zoneA
+ - members:
+ - pwwn: 10:11:11:11:11:11:11:11
+ - pwwn: 62:62:62:62:21:21:21:21
+ name: zoneB
+ - name: zoneC
+ remove: true
+ zoneset:
+ - action: activate
+ members:
+ - name: zoneA
+ - name: zoneB
+ - name: zoneC
+ remove: true
+ name: zsetname1
+ - action: deactivate
+ name: zsetTestExtra
+ remove: true
+ - mode: basic
+ smart_zoning: true
+ vsan: 21
+ zone:
+ - members:
+ - devtype: both
+ pwwn: 11:11:11:11:11:11:11:11
+ - pwwn: 62:62:62:62:12:12:12:12
+ - devtype: both
+ pwwn: 92:62:62:62:12:12:1a:1a
+ remove: true
+ name: zone21A
+ - members:
+ - pwwn: 10:11:11:11:11:11:11:11
+ - pwwn: 62:62:62:62:21:21:21:21
+ name: zone21B
+ zoneset:
+ - action: activate
+ members:
+ - name: zone21A
+ - name: zone21B
+ name: zsetname212
+
+"""
+
+RETURN = """
+commands:
+ description: commands sent to the device
+ returned: always
+ type: list
+ sample:
+ - terminal dont-ask
+ - zone name zoneA vsan 923
+ - member pwwn 11:11:11:11:11:11:11:11
+ - no member device-alias test123
+ - zone commit vsan 923
+ - no terminal dont-ask
+messages:
+ description: debug messages
+ returned: always
+ type: list
+ sample:
+ - "zone mode is already enhanced ,no change in zone mode configuration for vsan 922"
+ - "zone member '11:11:11:11:11:11:11:11' is already present in zone 'zoneA' in vsan 922 hence nothing to add"
+ - "zone member 'test123' is already present in zone 'zoneA' in vsan 922 hence nothing to add"
+ - "zone member '61:61:62:62:12:12:12:12' is not present in zone 'zoneA' in vsan 922 hence nothing to remove"
+ - "zone member '10:11:11:11:11:11:11:11' is already present in zone 'zoneB' in vsan 922 hence nothing to add"
+ - "zone member '62:62:62:62:21:21:21:21' is already present in zone 'zoneB' in vsan 922 hence nothing to add"
+ - "zone 'zoneC' is not present in vsan 922 , so nothing to remove"
+"""
+
+
+import re
+import json
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ load_config,
+ run_commands,
+)
+
+
+__metaclass__ = type
+
+
+class ShowZonesetActive(object):
+ """docstring for ShowZonesetActive"""
+
+ def __init__(self, module, vsan):
+ self.vsan = vsan
+ self.module = module
+ self.activeZSName = None
+ self.parseCmdOutput()
+
+ def execute_show_zoneset_active_cmd(self):
+ command = (
+ "show zoneset active vsan " + str(self.vsan) + " | grep zoneset"
+ )
+ output = execute_show_command(command, self.module)[0]
+ return output
+
+ def parseCmdOutput(self):
+ patZoneset = r"zoneset name (\S+) vsan " + str(self.vsan)
+ output = self.execute_show_zoneset_active_cmd().split("\n")
+ if len(output) == 0:
+ return
+ else:
+ for line in output:
+ line = line.strip()
+ mzs = re.match(patZoneset, line.strip())
+ if mzs:
+ self.activeZSName = mzs.group(1).strip()
+ return
+
+ def isZonesetActive(self, zsname):
+ if zsname == self.activeZSName:
+ return True
+ return False
+
+
+class ShowZoneset(object):
+ """docstring for ShowZoneset"""
+
+ def __init__(self, module, vsan):
+ self.vsan = vsan
+ self.module = module
+ self.zsDetails = {}
+ self.parseCmdOutput()
+
+ def execute_show_zoneset_cmd(self):
+ command = "show zoneset vsan " + str(self.vsan)
+ output = execute_show_command(command, self.module)[0]
+ return output
+
+ def parseCmdOutput(self):
+ patZoneset = r"zoneset name (\S+) vsan " + str(self.vsan)
+ patZone = r"zone name (\S+) vsan " + str(self.vsan)
+ output = self.execute_show_zoneset_cmd().split("\n")
+ for line in output:
+ line = line.strip()
+ mzs = re.match(patZoneset, line.strip())
+ mz = re.match(patZone, line.strip())
+ if mzs:
+ zonesetname = mzs.group(1).strip()
+ self.zsDetails[zonesetname] = []
+ continue
+ elif mz:
+ zonename = mz.group(1).strip()
+ v = self.zsDetails[zonesetname]
+ v.append(zonename)
+ self.zsDetails[zonesetname] = v
+
+ def isZonesetPresent(self, zsname):
+ return zsname in self.zsDetails.keys()
+
+ def isZonePresentInZoneset(self, zsname, zname):
+ if zsname in self.zsDetails.keys():
+ return zname in self.zsDetails[zsname]
+ return False
+
+
+class ShowZone(object):
+ """docstring for ShowZone"""
+
+ def __init__(self, module, vsan):
+ self.vsan = vsan
+ self.module = module
+ self.zDetails = {}
+ self.parseCmdOutput()
+
+ def execute_show_zone_vsan_cmd(self):
+ command = "show zone vsan " + str(self.vsan)
+ output = execute_show_command(command, self.module)[0]
+ return output
+
+ def parseCmdOutput(self):
+ patZone = r"zone name (\S+) vsan " + str(self.vsan)
+ output = self.execute_show_zone_vsan_cmd().split("\n")
+ for line in output:
+ line = " ".join(line.strip().split())
+ if "init" in line:
+ line = line.replace("init", "initiator")
+ m = re.match(patZone, line)
+ if m:
+ zonename = m.group(1).strip()
+ self.zDetails[zonename] = []
+ continue
+ else:
+ # For now we support only pwwn and device-alias under zone
+ # Ideally should use 'supported_choices'....but maybe next
+ # time.
+ if "pwwn" in line or "device-alias" in line:
+ v = self.zDetails[zonename]
+ v.append(line)
+ self.zDetails[zonename] = v
+
+ def isZonePresent(self, zname):
+ return zname in self.zDetails.keys()
+
+ def isZoneMemberPresent(self, zname, cmd):
+ if zname in self.zDetails.keys():
+ zonememlist = self.zDetails[zname]
+ for eachline in zonememlist:
+ if cmd in eachline:
+ return True
+ return False
+
+ def get_zDetails(self):
+ return self.zDetails
+
+
+class ShowZoneStatus(object):
+ """docstring for ShowZoneStatus"""
+
+ def __init__(self, module, vsan):
+ self.vsan = vsan
+ self.vsanAbsent = False
+ self.module = module
+ self.default_zone = ""
+ self.mode = ""
+ self.session = ""
+ self.sz = ""
+ self.locked = False
+ self.update()
+
+ def execute_show_zone_status_cmd(self):
+ command = "show zone status vsan " + str(self.vsan)
+ output = execute_show_command(command, self.module)[0]
+ return output
+
+ def update(self):
+
+ output = self.execute_show_zone_status_cmd().split("\n")
+
+ patfordefzone = "VSAN: " + str(self.vsan) + r" default-zone:\s+(\S+).*"
+ patformode = r".*mode:\s+(\S+).*"
+ patforsession = r"^session:\s+(\S+).*"
+ patforsz = r".*smart-zoning:\s+(\S+).*"
+ for line in output:
+ if "is not configured" in line:
+ self.vsanAbsent = True
+ break
+ mdefz = re.match(patfordefzone, line.strip())
+ mmode = re.match(patformode, line.strip())
+ msession = re.match(patforsession, line.strip())
+ msz = re.match(patforsz, line.strip())
+
+ if mdefz:
+ self.default_zone = mdefz.group(1)
+ if mmode:
+ self.mode = mmode.group(1)
+ if msession:
+ self.session = msession.group(1)
+ if self.session != "none":
+ self.locked = True
+ if msz:
+ self.sz = msz.group(1)
+
+ def isLocked(self):
+ return self.locked
+
+ def getDefaultZone(self):
+ return self.default_zone
+
+ def getMode(self):
+ return self.mode
+
+ def getSmartZoningStatus(self):
+ return self.sz
+
+ def isVsanAbsent(self):
+ return self.vsanAbsent
+
+
+def execute_show_command(command, module, command_type="cli_show"):
+ output = "text"
+ commands = [{"command": command, "output": output}]
+ return run_commands(module, commands)
+
+
+def flatten_list(command_lists):
+ flat_command_list = []
+ for command in command_lists:
+ if isinstance(command, list):
+ flat_command_list.extend(command)
+ else:
+ flat_command_list.append(command)
+ return flat_command_list
+
+
+def getMemType(supported_choices, allmemkeys, default="pwwn"):
+ for eachchoice in supported_choices:
+ if eachchoice in allmemkeys:
+ return eachchoice
+ return default
+
+
+def main():
+
+ supported_choices = ["device_alias"]
+ zone_member_spec = dict(
+ pwwn=dict(required=True, type="str", aliases=["device_alias"]),
+ devtype=dict(type="str", choices=["initiator", "target", "both"]),
+ remove=dict(type="bool", default=False),
+ )
+
+ zone_spec = dict(
+ name=dict(required=True, type="str"),
+ members=dict(type="list", elements="dict", options=zone_member_spec),
+ remove=dict(type="bool", default=False),
+ )
+
+ zoneset_member_spec = dict(
+ name=dict(required=True, type="str"),
+ remove=dict(type="bool", default=False),
+ )
+
+ zoneset_spec = dict(
+ name=dict(type="str", required=True),
+ members=dict(
+ type="list", elements="dict", options=zoneset_member_spec
+ ),
+ remove=dict(type="bool", default=False),
+ action=dict(type="str", choices=["activate", "deactivate"]),
+ )
+
+ zonedetails_spec = dict(
+ vsan=dict(required=True, type="int"),
+ mode=dict(type="str", choices=["enhanced", "basic"]),
+ default_zone=dict(type="str", choices=["permit", "deny"]),
+ smart_zoning=dict(type="bool"),
+ zone=dict(type="list", elements="dict", options=zone_spec),
+ zoneset=dict(type="list", elements="dict", options=zoneset_spec),
+ )
+
+ argument_spec = dict(
+ zone_zoneset_details=dict(
+ type="list", elements="dict", options=zonedetails_spec
+ )
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec, supports_check_mode=True
+ )
+
+ warnings = list()
+ messages = list()
+ commands = list()
+ result = {"changed": False}
+
+ commands_executed = []
+ listOfZoneDetails = module.params["zone_zoneset_details"]
+ for eachZoneZonesetDetail in listOfZoneDetails:
+ vsan = eachZoneZonesetDetail["vsan"]
+ op_mode = eachZoneZonesetDetail["mode"]
+ op_default_zone = eachZoneZonesetDetail["default_zone"]
+ op_smart_zoning = eachZoneZonesetDetail["smart_zoning"]
+ op_zone = eachZoneZonesetDetail["zone"]
+ op_zoneset = eachZoneZonesetDetail["zoneset"]
+
+ # Step1: execute show zone status and get
+ shZoneStatusObj = ShowZoneStatus(module, vsan)
+ sw_default_zone = shZoneStatusObj.getDefaultZone()
+ sw_mode = shZoneStatusObj.getMode()
+ sw_smart_zoning = shZoneStatusObj.getSmartZoningStatus()
+
+ if sw_smart_zoning.lower() == "Enabled".lower():
+ sw_smart_zoning_bool = True
+ else:
+ sw_smart_zoning_bool = False
+
+ if shZoneStatusObj.isVsanAbsent():
+ module.fail_json(
+ msg="Vsan "
+ + str(vsan)
+ + " is not present in the switch. Hence cannot procced."
+ )
+
+ if shZoneStatusObj.isLocked():
+ module.fail_json(
+ msg="zone has acquired lock on the switch for vsan "
+ + str(vsan)
+ + ". Hence cannot procced."
+ )
+
+ # Process zone default zone options
+ if op_default_zone is not None:
+ if op_default_zone != sw_default_zone:
+ if op_default_zone == "permit":
+ commands_executed.append(
+ "zone default-zone permit vsan " + str(vsan)
+ )
+ messages.append(
+ "default zone configuration changed from deny to permit for vsan "
+ + str(vsan)
+ )
+ else:
+ commands_executed.append(
+ "no zone default-zone permit vsan " + str(vsan)
+ )
+ messages.append(
+ "default zone configuration changed from permit to deny for vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "default zone is already "
+ + op_default_zone
+ + " ,no change in default zone configuration for vsan "
+ + str(vsan)
+ )
+
+ # Process zone mode options
+ if op_mode is not None:
+ if op_mode != sw_mode:
+ if op_mode == "enhanced":
+ commands_executed.append(
+ "zone mode enhanced vsan " + str(vsan)
+ )
+ messages.append(
+ "zone mode configuration changed from basic to enhanced for vsan "
+ + str(vsan)
+ )
+ else:
+ commands_executed.append(
+ "no zone mode enhanced vsan " + str(vsan)
+ )
+ messages.append(
+ "zone mode configuration changed from enhanced to basic for vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "zone mode is already "
+ + op_mode
+ + " ,no change in zone mode configuration for vsan "
+ + str(vsan)
+ )
+
+ # Process zone smart-zone options
+ if op_smart_zoning is not None:
+ if op_smart_zoning != sw_smart_zoning_bool:
+ if op_smart_zoning:
+ commands_executed.append(
+ "zone smart-zoning enable vsan " + str(vsan)
+ )
+ messages.append(
+ "smart-zoning enabled for vsan " + str(vsan)
+ )
+ else:
+ commands_executed.append(
+ "no zone smart-zoning enable vsan " + str(vsan)
+ )
+ messages.append(
+ "smart-zoning disabled for vsan " + str(vsan)
+ )
+ else:
+ messages.append(
+ "smart-zoning is already set to "
+ + sw_smart_zoning
+ + " , no change in smart-zoning configuration for vsan "
+ + str(vsan)
+ )
+
+ # Process zone member options
+ # TODO: Obviously this needs to be cleaned up properly, as there are a lot of ifelse statements which is bad
+ # Will take it up later becoz of time constraints
+ if op_zone is not None:
+ shZoneObj = ShowZone(module, vsan)
+ for eachzone in op_zone:
+ zname = eachzone["name"]
+ zmembers = eachzone["members"]
+ removeflag = eachzone["remove"]
+ if removeflag:
+ if shZoneObj.isZonePresent(zname):
+ messages.append(
+ "zone '"
+ + zname
+ + "' is removed from vsan "
+ + str(vsan)
+ )
+ commands_executed.append(
+ "no zone name " + zname + " vsan " + str(vsan)
+ )
+ else:
+ messages.append(
+ "zone '"
+ + zname
+ + "' is not present in vsan "
+ + str(vsan)
+ + " , so nothing to remove"
+ )
+ else:
+ if zmembers is None:
+ if shZoneObj.isZonePresent(zname):
+ messages.append(
+ "zone '"
+ + zname
+ + "' is already present in vsan "
+ + str(vsan)
+ )
+ else:
+ commands_executed.append(
+ "zone name " + zname + " vsan " + str(vsan)
+ )
+ messages.append(
+ "zone '"
+ + zname
+ + "' is created in vsan "
+ + str(vsan)
+ )
+ else:
+ cmdmemlist = []
+ for eachmem in zmembers:
+ memtype = getMemType(
+ supported_choices, eachmem.keys()
+ )
+ cmd = (
+ memtype.replace("_", "-")
+ + " "
+ + eachmem[memtype]
+ )
+ if op_smart_zoning or sw_smart_zoning_bool:
+ if eachmem["devtype"] is not None:
+ cmd = cmd + " " + eachmem["devtype"]
+ if eachmem["remove"]:
+ if shZoneObj.isZonePresent(zname):
+ if shZoneObj.isZoneMemberPresent(
+ zname, cmd
+ ):
+ cmd = "no member " + cmd
+ cmdmemlist.append(cmd)
+ if (
+ op_smart_zoning
+ and eachmem["devtype"] is not None
+ ):
+ messages.append(
+ "removing zone member '"
+ + eachmem[memtype]
+ + " of device type '"
+ + eachmem["devtype"]
+ + "' from zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "removing zone member '"
+ + eachmem[memtype]
+ + "' from zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ )
+ else:
+ if (
+ op_smart_zoning
+ and eachmem["devtype"] is not None
+ ):
+ messages.append(
+ "zone member '"
+ + eachmem[memtype]
+ + "' of device type '"
+ + eachmem["devtype"]
+ + "' is not present in zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ + " hence nothing to remove"
+ )
+ else:
+ messages.append(
+ "zone member '"
+ + eachmem[memtype]
+ + "' is not present in zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ + " hence nothing to remove"
+ )
+ else:
+ messages.append(
+ "zone '"
+ + zname
+ + "' is not present in vsan "
+ + str(vsan)
+ + " , hence cannot remove the members"
+ )
+
+ else:
+ if shZoneObj.isZoneMemberPresent(zname, cmd):
+ if (
+ op_smart_zoning
+ and eachmem["devtype"] is not None
+ ):
+ messages.append(
+ "zone member '"
+ + eachmem[memtype]
+ + "' of device type '"
+ + eachmem["devtype"]
+ + "' is already present in zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ + " hence nothing to add"
+ )
+ else:
+ messages.append(
+ "zone member '"
+ + eachmem[memtype]
+ + "' is already present in zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ + " hence nothing to add"
+ )
+ else:
+ cmd = "member " + cmd
+ cmdmemlist.append(cmd)
+ if (
+ op_smart_zoning
+ and eachmem["devtype"] is not None
+ ):
+ messages.append(
+ "adding zone member '"
+ + eachmem[memtype]
+ + "' of device type '"
+ + eachmem["devtype"]
+ + "' to zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "adding zone member '"
+ + eachmem[memtype]
+ + "' to zone '"
+ + zname
+ + "' in vsan "
+ + str(vsan)
+ )
+ if len(cmdmemlist) != 0:
+ commands_executed.append(
+ "zone name " + zname + " vsan " + str(vsan)
+ )
+ commands_executed = commands_executed + cmdmemlist
+
+ # Process zoneset member options
+ if op_zoneset is not None:
+ dactcmd = []
+ actcmd = []
+ shZonesetObj = ShowZoneset(module, vsan)
+ shZonesetActiveObj = ShowZonesetActive(module, vsan)
+ for eachzoneset in op_zoneset:
+ zsetname = eachzoneset["name"]
+ zsetmembers = eachzoneset["members"]
+ removeflag = eachzoneset["remove"]
+ actionflag = eachzoneset["action"]
+ if removeflag:
+ if shZonesetObj.isZonesetPresent(zsetname):
+ messages.append(
+ "zoneset '"
+ + zsetname
+ + "' is removed from vsan "
+ + str(vsan)
+ )
+ commands_executed.append(
+ "no zoneset name "
+ + zsetname
+ + " vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "zoneset '"
+ + zsetname
+ + "' is not present in vsan "
+ + str(vsan)
+ + " ,hence there is nothing to remove"
+ )
+ else:
+ if zsetmembers is not None:
+ cmdmemlist = []
+ for eachzsmem in zsetmembers:
+ zsetmem_name = eachzsmem["name"]
+ zsetmem_removeflag = eachzsmem["remove"]
+ if zsetmem_removeflag:
+ if shZonesetObj.isZonePresentInZoneset(
+ zsetname, zsetmem_name
+ ):
+ cmd = "no member " + zsetmem_name
+ cmdmemlist.append(cmd)
+ messages.append(
+ "removing zoneset member '"
+ + zsetmem_name
+ + "' from zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "zoneset member '"
+ + zsetmem_name
+ + "' is not present in zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ + " ,hence there is nothing to remove"
+ )
+ else:
+ if shZonesetObj.isZonePresentInZoneset(
+ zsetname, zsetmem_name
+ ):
+ messages.append(
+ "zoneset member '"
+ + zsetmem_name
+ + "' is already present in zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ + " ,hence there is nothing to add"
+ )
+ else:
+ cmd = "member " + zsetmem_name
+ cmdmemlist.append(cmd)
+ messages.append(
+ "adding zoneset member '"
+ + zsetmem_name
+ + "' to zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ )
+ if len(cmdmemlist) != 0:
+ commands_executed.append(
+ "zoneset name "
+ + zsetname
+ + " vsan "
+ + str(vsan)
+ )
+ commands_executed = commands_executed + cmdmemlist
+ else:
+ if shZonesetObj.isZonesetPresent(zsetname):
+ messages.append(
+ "zoneset '"
+ + zsetname
+ + "' is already present in vsan "
+ + str(vsan)
+ )
+ else:
+ commands_executed.append(
+ "zoneset name "
+ + zsetname
+ + " vsan "
+ + str(vsan)
+ )
+ messages.append(
+ "zoneset '"
+ + zsetname
+ + "' is created in vsan "
+ + str(vsan)
+ )
+
+ # Process zoneset activate options
+ if actionflag == "deactivate":
+ if shZonesetActiveObj.isZonesetActive(zsetname):
+ messages.append(
+ "deactivating zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ )
+ dactcmd.append(
+ "no zoneset activate name "
+ + zsetname
+ + " vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ + " is not activated, hence cannot deactivate"
+ )
+ elif actionflag == "activate":
+ if commands_executed:
+ messages.append(
+ "activating zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ )
+ actcmd.append(
+ "zoneset activate name "
+ + zsetname
+ + " vsan "
+ + str(vsan)
+ )
+ else:
+ messages.append(
+ "no changes to existing zoneset '"
+ + zsetname
+ + "' in vsan "
+ + str(vsan)
+ + " hence activate action is ignored"
+ )
+ commands_executed = commands_executed + dactcmd + actcmd
+
+ if commands_executed:
+ if op_mode == "enhanced":
+ commands_executed.append("zone commit vsan " + str(vsan))
+ elif op_mode is None:
+ if sw_mode == "enhanced":
+ commands_executed.append("zone commit vsan " + str(vsan))
+
+ if commands_executed:
+ commands_executed = (
+ ["terminal dont-ask"]
+ + commands_executed
+ + ["no terminal dont-ask"]
+ )
+
+ cmds = flatten_list(commands_executed)
+ if cmds:
+ if module.check_mode:
+ module.exit_json(
+ changed=False,
+ commands=cmds,
+ msg="Check Mode: No cmds issued to the hosts",
+ )
+ else:
+ result["changed"] = True
+ commands = commands + cmds
+ load_config(module, cmds)
+
+ result["messages"] = messages
+ result["commands"] = commands_executed
+ result["warnings"] = warnings
+ module.exit_json(**result)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/terminal/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/terminal/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/terminal/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/plugins/terminal/nxos.py b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/terminal/nxos.py
new file mode 100644
index 00000000..912dfe4e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/plugins/terminal/nxos.py
@@ -0,0 +1,142 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import re
+import json
+
+from ansible.plugins.terminal import TerminalBase
+from ansible.errors import AnsibleConnectionFailure
+from ansible.module_utils._text import to_bytes, to_text
+
+
+class TerminalModule(TerminalBase):
+
+ terminal_stdout_re = [
+ re.compile(
+ br"[\r\n](?!\s*<)?(\x1b\S+)*[a-zA-Z_0-9]{1}[a-zA-Z0-9-_.]*[>|#](?:\s*)(\x1b\S+)*$"
+ ),
+ re.compile(br"[\r\n]?[a-zA-Z0-9]{1}[a-zA-Z0-9-_.]*\(.+\)#(?:\s*)$"),
+ ]
+
+ terminal_stderr_re = [
+ re.compile(br"% ?Error"),
+ re.compile(br"\nerror:(.*)", re.I),
+ re.compile(br"^% \w+", re.M),
+ re.compile(br"% ?Bad secret"),
+ re.compile(br"invalid input", re.I),
+ re.compile(br"(?:incomplete|ambiguous) command", re.I),
+ re.compile(br"connection timed out", re.I),
+ re.compile(br"[^\r\n]+ not found", re.I),
+ re.compile(br"'[^']' +returned error code: ?\d+"),
+ re.compile(br"syntax error"),
+ re.compile(br"unknown command"),
+ re.compile(br"user not present"),
+ re.compile(br"invalid (.+?)at '\^' marker", re.I),
+ re.compile(br"configuration not allowed .+ at '\^' marker"),
+ re.compile(
+ br"[B|b]aud rate of console should be.* (\d*) to increase [a-z]* level",
+ re.I,
+ ),
+ re.compile(
+ br"cannot apply non-existing acl policy to interface", re.I
+ ),
+ re.compile(br"Duplicate sequence number", re.I),
+ re.compile(
+ br"Cannot apply ACL to an interface that is a port-channel member",
+ re.I,
+ ),
+ ]
+
+ def on_become(self, passwd=None):
+ if self._get_prompt().strip().endswith(b"enable#"):
+ return
+
+ out = self._exec_cli_command("show privilege")
+ out = to_text(out, errors="surrogate_then_replace").strip()
+
+ # if already at privilege level 15 return
+ if "15" in out:
+ return
+
+ if self.validate_user_role():
+ return
+
+ if "Disabled" in out:
+ raise AnsibleConnectionFailure("Feature privilege is not enabled")
+
+ cmd = {u"command": u"enable"}
+ if passwd:
+ cmd[u"prompt"] = to_text(
+ r"(?i)[\r\n]?Password: $", errors="surrogate_or_strict"
+ )
+ cmd[u"answer"] = passwd
+ cmd[u"prompt_retry_check"] = True
+
+ try:
+ self._exec_cli_command(
+ to_bytes(json.dumps(cmd), errors="surrogate_or_strict")
+ )
+ prompt = self._get_prompt()
+ if prompt is None or not prompt.strip().endswith(b"enable#"):
+ raise AnsibleConnectionFailure(
+ "failed to elevate privilege to enable mode still at prompt [%s]"
+ % prompt
+ )
+ except AnsibleConnectionFailure as e:
+ prompt = self._get_prompt()
+ raise AnsibleConnectionFailure(
+ "unable to elevate privilege to enable mode, at prompt [%s] with error: %s"
+ % (prompt, e.message)
+ )
+
+ def on_unbecome(self):
+ prompt = self._get_prompt()
+ if prompt is None:
+ # if prompt is None most likely the terminal is hung up at a prompt
+ return
+
+ if b"(config" in prompt:
+ self._exec_cli_command("end")
+ self._exec_cli_command("exit")
+
+ elif prompt.endswith(b"enable#"):
+ self._exec_cli_command("exit")
+
+ def on_open_shell(self):
+ try:
+ for cmd in ("terminal length 0", "terminal width 511"):
+ self._exec_cli_command(cmd)
+ except AnsibleConnectionFailure:
+ raise AnsibleConnectionFailure("unable to set terminal parameters")
+
+ def validate_user_role(self):
+ user = self._connection._play_context.remote_user
+
+ out = self._exec_cli_command("show user-account %s" % user)
+ out = to_text(out, errors="surrogate_then_replace").strip()
+
+ match = re.search(r"roles:(.+)$", out, re.M)
+ if match:
+ roles = match.group(1).split()
+ if "network-admin" in roles:
+ return True
+ return False
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/requirements.txt b/collections-debian-merged/ansible_collections/cisco/nxos/requirements.txt
new file mode 100644
index 00000000..ee91c107
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/requirements.txt
@@ -0,0 +1,2 @@
+paramiko
+scp
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/test-requirements.txt b/collections-debian-merged/ansible_collections/cisco/nxos/test-requirements.txt
new file mode 100644
index 00000000..cef9e921
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/test-requirements.txt
@@ -0,0 +1,7 @@
+black==19.3b0 ; python_version > '3.5'
+flake8
+pexpect
+yamllint
+pytest-xdist
+coverage==4.5.4
+mock
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/.gitignore b/collections-debian-merged/ansible_collections/cisco/nxos/tests/.gitignore
new file mode 100644
index 00000000..9b1960e7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/.gitignore
@@ -0,0 +1 @@
+output/ \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/network-integration.requirements.txt b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/network-integration.requirements.txt
new file mode 100644
index 00000000..e8c81df1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/network-integration.requirements.txt
@@ -0,0 +1,6 @@
+pexpect # for _user test
+scp # for Cisco ios
+selectors2 # for ncclient
+ncclient # for Junos
+jxmlease # for Junos
+xmltodict # for Junos
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/target-prefixes.network b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/target-prefixes.network
new file mode 100644
index 00000000..73cf59df
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/target-prefixes.network
@@ -0,0 +1 @@
+nxos \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tests/common/radius.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tests/common/radius.yaml
new file mode 100644
index 00000000..e0cdaec1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tests/common/radius.yaml
@@ -0,0 +1,98 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server radius.yaml
+ sanity test"
+
+- name: Setup
+ ignore_errors: true
+ cisco.nxos.nxos_aaa_server: &id004
+ server_type: radius
+ deadtime: default
+ server_timeout: default
+ directed_request: default
+ state: default
+
+- block:
+
+ - name: Configure radius server defaults
+ register: result
+ cisco.nxos.nxos_aaa_server: &id001
+ server_type: radius
+ state: present
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server: *id001
+
+ - assert: &id003
+ that:
+ - result.changed == false
+
+ - name: Configure radius server non defaults
+ register: result
+ cisco.nxos.nxos_aaa_server: &id002
+ server_type: radius
+ server_timeout: 9
+ deadtime: 20
+ directed_request: enabled
+ state: present
+
+ - assert: &id005
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server: *id002
+
+ - assert: *id003
+
+ - name: Remove radius server configuration
+ register: result
+ cisco.nxos.nxos_aaa_server: *id004
+
+ - assert: *id005
+
+ - name: Configure radius server with global key
+ register: result
+ cisco.nxos.nxos_aaa_server: &id006
+ server_type: radius
+ encrypt_type: 7
+ global_key: test_key
+ state: present
+
+ - assert: *id005
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server: *id006
+
+ - assert: *id003
+
+ - name: Remove radius server configuration
+ register: result
+ cisco.nxos.nxos_aaa_server: &id007
+ server_type: radius
+ deadtime: default
+ server_timeout: default
+ global_key: default
+ directed_request: default
+ state: default
+
+ - assert: *id005
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server: *id007
+
+ - assert: *id003
+ rescue:
+
+ - debug: msg="connection={{ ansible_connection }} nxos_aaa_server failure detected"
+ always:
+
+ - name: Remove radius server configuration
+ register: result
+ cisco.nxos.nxos_aaa_server: *id004
+
+- debug: msg="END connection={{ ansible_connection }} nxos_aaa_server radius.yaml
+ sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tests/common/tacacs.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tests/common/tacacs.yaml
new file mode 100644
index 00000000..274f7f8d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server/tests/common/tacacs.yaml
@@ -0,0 +1,108 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server tacacs.yaml
+ sanity test"
+
+- name: Enable feature tacacs+
+ cisco.nxos.nxos_feature:
+ feature: tacacs+
+ state: enabled
+
+- name: Setup
+ ignore_errors: true
+ cisco.nxos.nxos_aaa_server: &id004
+ server_type: tacacs
+ deadtime: default
+ server_timeout: default
+ directed_request: default
+ state: default
+
+- block:
+
+ - name: Configure tacacs server defaults
+ register: result
+ cisco.nxos.nxos_aaa_server: &id001
+ server_type: tacacs
+ state: present
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server: *id001
+
+ - assert: &id003
+ that:
+ - result.changed == false
+
+ - name: Configure tacacs server non defaults
+ register: result
+ cisco.nxos.nxos_aaa_server: &id002
+ server_type: tacacs
+ server_timeout: 9
+ deadtime: 20
+ directed_request: enabled
+ state: present
+
+ - assert: &id005
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server: *id002
+
+ - assert: *id003
+
+ - name: Remove tacacs server configuration
+ register: result
+ cisco.nxos.nxos_aaa_server: *id004
+
+ - assert: *id005
+
+ - name: Configure tacacs server with global key
+ register: result
+ cisco.nxos.nxos_aaa_server: &id006
+ server_type: tacacs
+ encrypt_type: 7
+ global_key: test_key
+ state: present
+
+ - assert: *id005
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server: *id006
+
+ - assert: *id003
+
+ - name: Remove tacacs server configuration
+ register: result
+ cisco.nxos.nxos_aaa_server: &id007
+ server_type: tacacs
+ deadtime: default
+ server_timeout: default
+ global_key: default
+ directed_request: default
+ state: default
+
+ - assert: *id005
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server: *id007
+
+ - assert: *id003
+ rescue:
+
+ - debug: msg="connection={{ ansible_connection }} nxos_aaa_server failure detected"
+ always:
+
+ - name: Remove tacacs server configuration
+ register: result
+ cisco.nxos.nxos_aaa_server: *id004
+
+ - name: Disable feature tacacs+
+ cisco.nxos.nxos_feature:
+ feature: tacacs+
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_aaa_server tacacs.yaml
+ sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml
new file mode 100644
index 00000000..70bd89d0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml
@@ -0,0 +1,199 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server_host radius.yaml
+ sanity test"
+
+- name: Setup
+ ignore_errors: true
+ cisco.nxos.nxos_aaa_server_host: &id002
+ server_type: radius
+ address: 8.8.8.8
+ state: absent
+
+- block:
+
+ - name: Configure radius server defaults
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id001
+ server_type: radius
+ address: 8.8.8.8
+ state: present
+
+ - assert: &id003
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Remove radius server configuration
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id002
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id002
+
+ - assert: *id004
+
+ - name: Configure radius server non defaults
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id005
+ server_type: radius
+ address: 8.8.8.8
+ host_timeout: 25
+ auth_port: 2083
+ acct_port: 2084
+ state: present
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id005
+
+ - assert: *id004
+
+ - name: Configure some defaults on radius server
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id006
+ server_type: radius
+ address: 8.8.8.8
+ host_timeout: default
+ auth_port: 1000
+ acct_port: default
+ state: present
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id006
+
+ - assert: *id004
+
+ - name: Configure radius server with clear text pwd
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id007
+ server_type: radius
+ address: 8.8.8.8
+ host_timeout: 25
+ auth_port: default
+ acct_port: 2084
+ encrypt_type: 0
+ key: hello
+ state: present
+
+ - assert: *id003
+
+ - name: Check NOT Idempotent
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id007
+
+ - assert: *id003
+
+ - name: Remove radius server configuration
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id002
+
+ - assert: *id003
+
+ - name: Configure radius server with type 7 encryption
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id008
+ server_type: radius
+ address: 8.8.8.8
+ host_timeout: 25
+ auth_port: 2083
+ acct_port: 2084
+ encrypt_type: 7
+ key: hello
+ state: present
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id008
+
+ - assert: *id004
+
+ - name: Configure radius server with new type 7 encryption key
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id009
+ server_type: radius
+ address: 8.8.8.8
+ host_timeout: 25
+ auth_port: 2083
+ acct_port: 2084
+ encrypt_type: 7
+ key: helloback
+ state: present
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'key 7' in result.updates[0]"
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id009
+
+ - assert: *id004
+
+ - name: Configure radius server with default key
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id010
+ server_type: radius
+ address: 8.8.8.8
+ host_timeout: default
+ auth_port: 1000
+ acct_port: default
+ encrypt_type: 7
+ key: default
+ state: present
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id010
+
+ - assert: *id004
+
+ - name: Configure radius server with all def
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id011
+ server_type: radius
+ address: 8.8.8.8
+ host_timeout: default
+ auth_port: default
+ acct_port: default
+ key: default
+ state: present
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id011
+
+ - assert: *id004
+ rescue:
+
+ - debug: msg="connection={{ ansible_connection }} nxos_aaa_server_host failure
+ detected"
+ always:
+
+ - name: Remove radius server configuration
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id002
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_aaa_server_host radius.yaml
+ sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml
new file mode 100644
index 00000000..37fcd563
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml
@@ -0,0 +1,202 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server_host tacacs.yaml
+ sanity test"
+
+- name: Enable feature tacacs+
+ cisco.nxos.nxos_feature:
+ feature: tacacs+
+ state: enabled
+
+- name: Setup
+ ignore_errors: true
+ cisco.nxos.nxos_aaa_server_host: &id002
+ server_type: tacacs
+ address: 8.8.8.8
+ state: absent
+
+- block:
+
+ - name: Configure tacacs server defaults
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id001
+ server_type: tacacs
+ address: 8.8.8.8
+ state: present
+
+ - assert: &id003
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Remove tacacs server configuration
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id002
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id002
+
+ - assert: *id004
+
+ - name: Configure tacacs server non defaults
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id005
+ server_type: tacacs
+ address: 8.8.8.8
+ host_timeout: 25
+ tacacs_port: 89
+ state: present
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id005
+
+ - assert: *id004
+
+ - name: Configure some defaults on tacacs server
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id006
+ server_type: tacacs
+ address: 8.8.8.8
+ host_timeout: default
+ tacacs_port: 100
+ state: present
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id006
+
+ - assert: *id004
+
+ - name: Configure tacacs server with clear text pwd
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id007
+ server_type: tacacs
+ address: 8.8.8.8
+ host_timeout: 25
+ tacacs_port: default
+ encrypt_type: 0
+ key: hello
+ state: present
+
+ - assert: *id003
+
+ - name: Check NOT Idempotent
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id007
+
+ - assert: *id003
+
+ - name: Remove tacacs server configuration
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id002
+
+ - assert: *id003
+
+ - name: Configure tacacs server with type 7 encryption
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id008
+ server_type: tacacs
+ address: 8.8.8.8
+ host_timeout: 25
+ tacacs_port: 89
+ encrypt_type: 7
+ key: hello
+ state: present
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id008
+
+ - assert: *id004
+
+ - name: Configure tacacs server with new type 7 encryption key
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id009
+ server_type: tacacs
+ address: 8.8.8.8
+ host_timeout: 25
+ tacacs_port: 89
+ encrypt_type: 7
+ key: helloback
+ state: present
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'key 7' in result.updates[0]"
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id009
+
+ - assert: *id004
+
+ - name: Configure tacacs server with default key
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id010
+ server_type: tacacs
+ address: 8.8.8.8
+ host_timeout: default
+ tacacs_port: 89
+ encrypt_type: 7
+ key: default
+ state: present
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id010
+
+ - assert: *id004
+
+ - name: Configure tacacs server with all def
+ register: result
+ cisco.nxos.nxos_aaa_server_host: &id011
+ server_type: tacacs
+ address: 8.8.8.8
+ host_timeout: default
+ tacacs_port: default
+ key: default
+ state: present
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id011
+
+ - assert: *id004
+ rescue:
+
+ - debug: msg="connection={{ ansible_connection }} nxos_aaa_server_host failure
+ detected"
+ always:
+
+ - name: Remove tacacs server configuration
+ register: result
+ cisco.nxos.nxos_aaa_server_host: *id002
+
+ - name: Disable feature tacacs+
+ cisco.nxos.nxos_feature:
+ feature: tacacs+
+ state: disabled
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_aaa_server_host tacacs.yaml
+ sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tests/common/sanity.yaml
new file mode 100644
index 00000000..5bb1f8e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl/tests/common/sanity.yaml
@@ -0,0 +1,230 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_acl sanity test"
+
+- set_fact: time_range="ans-range"
+ when: platform is not search('N35|N5K|N6K')
+
+- name: 'Setup: Cleanup possibly existing acl.'
+ ignore_errors: true
+ cisco.nxos.nxos_acl: &id012
+ name: TEST_ACL
+ seq: 10
+ state: delete_acl
+
+- name: Configure ACE10
+ register: result
+ cisco.nxos.nxos_acl: &id001
+ name: TEST_ACL
+ seq: 10
+ action: permit
+ proto: tcp
+ src: 192.0.2.1/24
+ src_port_op: range
+ src_port1: 1900
+ src_port2: 1910
+ ack: enable
+ dscp: af43
+ dest: any
+ dest_port_op: neq
+ dest_port1: 1899
+ urg: enable
+ psh: enable
+ established: enable
+ log: enable
+ fin: enable
+ rst: enable
+ syn: enable
+ time_range: '{{time_range|default(omit)}}'
+ state: present
+
+- assert: &id002
+ that:
+ - result.changed == true
+
+- name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_acl: *id001
+
+- assert: &id004
+ that:
+ - result.changed == false
+
+- name: Change ACE10
+ register: result
+ cisco.nxos.nxos_acl: &id003
+ name: TEST_ACL
+ seq: 10
+ action: deny
+ proto: tcp
+ src: 192.0.2.1/24
+ src_port_op: range
+ src_port1: 1900
+ src_port2: 1910
+ ack: enable
+ dscp: af43
+ dest: any
+ dest_port_op: neq
+ dest_port1: 1899
+ urg: enable
+ psh: enable
+ established: enable
+ log: enable
+ fin: enable
+ rst: enable
+ syn: enable
+ time_range: '{{time_range|default(omit)}}'
+ state: present
+
+- assert: *id002
+
+- name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_acl: *id003
+
+- assert: *id004
+
+- name: ace remark
+ register: result
+ cisco.nxos.nxos_acl: &id005
+ name: TEST_ACL
+ seq: 20
+ action: remark
+ remark: test_remark
+ state: present
+
+- assert: *id002
+
+- name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_acl: *id005
+
+- assert: *id004
+
+- name: change remark
+ register: result
+ cisco.nxos.nxos_acl: &id006
+ name: TEST_ACL
+ seq: 20
+ action: remark
+ remark: changed_remark
+ state: present
+
+- assert: *id002
+
+- name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_acl: *id006
+
+- assert: *id004
+
+- name: ace 30
+ register: result
+ cisco.nxos.nxos_acl: &id007
+ name: TEST_ACL
+ seq: 30
+ action: deny
+ proto: 24
+ src: any
+ dest: any
+ fragments: enable
+ precedence: network
+ state: present
+
+- assert: *id002
+
+- name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_acl: *id007
+
+- assert: *id004
+
+- name: change ace 30 options
+ register: result
+ cisco.nxos.nxos_acl: &id008
+ name: TEST_ACL
+ seq: 30
+ action: deny
+ proto: 24
+ src: any
+ dest: any
+ precedence: network
+ state: present
+
+- assert: *id002
+
+- name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_acl: *id008
+
+- assert: *id004
+
+- name: ace 40
+ register: result
+ cisco.nxos.nxos_acl: &id009
+ name: TEST_ACL
+ seq: 40
+ action: permit
+ proto: udp
+ src: any
+ src_port_op: neq
+ src_port1: 1200
+ dest: any
+ precedence: network
+ state: present
+
+- assert: *id002
+
+- name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_acl: *id009
+
+- assert: *id004
+
+- name: change ace 40
+ register: result
+ cisco.nxos.nxos_acl: &id010
+ name: TEST_ACL
+ seq: 40
+ action: permit
+ proto: udp
+ src: any
+ dest: any
+ precedence: network
+ state: present
+
+- assert: *id002
+
+- name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_acl: *id010
+
+- assert: *id004
+
+- name: remove ace 30
+ register: result
+ cisco.nxos.nxos_acl: &id011
+ name: TEST_ACL
+ seq: 30
+ state: absent
+
+- assert: *id002
+
+- name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_acl: *id011
+
+- assert: *id004
+
+- name: Remove ACL
+ register: result
+ cisco.nxos.nxos_acl: *id012
+
+- assert: *id002
+
+- name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_acl: *id012
+
+- assert: *id004
+
+- debug: msg="END connection={{ ansible_connection }} nxos_acl sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tests/common/sanity.yaml
new file mode 100644
index 00000000..a5c97ab9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interface/tests/common/sanity.yaml
@@ -0,0 +1,122 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_acl_interface sanity
+ test"
+
+- set_fact: intname="{{ nxos_int1 }}"
+
+- name: Interface selected for this test
+ debug: msg="{{ intname }}"
+
+- name: 'Setup: Put interface into a default state'
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id007
+ lines:
+ - default interface {{ intname }}
+
+- name: 'Setup: Put interface into no switch port mode'
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - no switchport
+ parents:
+ - interface {{ intname }}
+ match: none
+
+- name: 'Setup: Cleanup possibly existing acl'
+ ignore_errors: true
+ cisco.nxos.nxos_acl: &id008
+ name: ANSIBLE_ACL
+ seq: 10
+ state: delete_acl
+
+- name: Configure Supporting ACL
+ cisco.nxos.nxos_acl:
+ name: ANSIBLE_ACL
+ seq: 10
+ action: permit
+ proto: tcp
+ src: 192.0.2.1/24
+ dest: any
+
+- block:
+
+ - name: Configure acl interface egress
+ register: result
+ cisco.nxos.nxos_acl_interface: &id001
+ name: ANSIBLE_ACL
+ interface: '{{ intname }}'
+ direction: egress
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence egress
+ register: result
+ cisco.nxos.nxos_acl_interface: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure acl interface ingress
+ register: result
+ cisco.nxos.nxos_acl_interface: &id003
+ name: ANSIBLE_ACL
+ interface: '{{ intname }}'
+ direction: ingress
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence ingress
+ register: result
+ cisco.nxos.nxos_acl_interface: *id003
+
+ - assert: *id004
+
+ - name: Cleanup acl interface egress
+ register: result
+ cisco.nxos.nxos_acl_interface: &id005
+ name: ANSIBLE_ACL
+ interface: '{{ intname }}'
+ direction: egress
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence egress cleanup
+ register: result
+ cisco.nxos.nxos_acl_interface: *id005
+
+ - assert: *id004
+
+ - name: Cleanup acl interface ingress
+ register: result
+ cisco.nxos.nxos_acl_interface: &id006
+ name: ANSIBLE_ACL
+ interface: '{{ intname }}'
+ direction: ingress
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence ingress cleanup
+ register: result
+ cisco.nxos.nxos_acl_interface: *id006
+
+ - assert: *id004
+ rescue:
+
+ - name: Put test interface into default state.
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id007
+ always:
+
+ - name: Remove possible configured ACL
+ ignore_errors: true
+ cisco.nxos.nxos_acl: *id008
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_acl_interface sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..0f1d5c08
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tasks/nxapi.yaml
new file mode 100644
index 00000000..dbedf2d6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/templates/populate_config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/templates/populate_config.cfg
new file mode 100644
index 00000000..69e9d9a1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/templates/populate_config.cfg
@@ -0,0 +1,11 @@
+ip access-list ACL1v4
+ip access-list NewACLv4
+ipv6 access-list ACL1v6
+ipv6 access-list NewACLv6
+ip access-list PortACL
+interface Ethernet1/5
+ ip port access-group PortACL in
+ ip access-group ACL1v4 out
+ ipv6 traffic-filter ACL1v6 in
+interface Ethernet1/2
+ ipv6 traffic-filter ACL1v6 in
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/deleted.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/deleted.yml
new file mode 100644
index 00000000..08a728ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/deleted.yml
@@ -0,0 +1,59 @@
+---
+- debug:
+ msg: Start nxos_acl_interfaces deleted integration tests connection = {{ansible_connection}}
+
+- include_tasks: remove_config.yaml
+
+- include_tasks: populate_acl.yaml
+
+- include_tasks: populate_config.yaml
+
+- block:
+ - name: Delete all ACLs configuration from given interface
+ register: result
+ cisco.nxos.nxos_acl_interfaces: &id002
+ config:
+
+ - name: Ethernet1/2
+ state: deleted
+
+ - assert:
+ that:
+ - result.changed == True
+ - "'interface Ethernet1/2' in result.commands"
+ - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
+ - result.commands | length == 2
+
+ - include_tasks: populate_config.yaml
+
+ - name: Delete all ACLs from all interfaces (from all interfaces)
+ register: result
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ state: deleted
+
+ - name: Gather acl interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: acl_interfaces
+
+ - assert:
+ that:
+ - result.changed == True
+ - ansible_facts.network_resources.acl_interfaces == result.after
+
+ - name: Gather acls facts
+ cisco.nxos.nxos_facts: *id001
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_acl_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/empty_config.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/empty_config.yml
new file mode 100644
index 00000000..894e1802
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/empty_config.yml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START nxos_acl_interfaces empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_acl_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_acl_interfaces empty_config integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/gathered.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/gathered.yml
new file mode 100644
index 00000000..00d03091
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/gathered.yml
@@ -0,0 +1,35 @@
+---
+- debug:
+ msg: Start nxos_acl_interfaces gathered integration tests connection={{ansible_connection}}"
+
+- include_tasks: populate_config.yaml
+
+- block:
+
+ - name: Gather acl interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: acl_interfaces
+
+ - name: Gathered
+ register: result
+ cisco.nxos.nxos_acl_interfaces: &id001
+ state: gathered
+
+ - assert:
+ that:
+ - result.changed == false
+ - ansible_facts.network_resources.acl_interfaces == result.gathered
+
+ - name: Idempotence - Gathered
+ register: result
+ cisco.nxos.nxos_acl_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/merged.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/merged.yml
new file mode 100644
index 00000000..dc716ae4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/merged.yml
@@ -0,0 +1,72 @@
+---
+- debug:
+ msg: Start nxos_acl_interfaces merged integration tests connection = {{ansible_connection}}
+
+- include_tasks: remove_config.yaml
+
+- include_tasks: populate_acl.yaml
+
+- block:
+
+ - name: Gather acl interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: acl_interfaces
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_acl_interfaces: &id001
+ config:
+
+ - name: Ethernet1/2
+ access_groups:
+
+ - afi: ipv6
+ acls:
+
+ - name: ACL1v6
+ direction: in
+
+ - name: Eth1/5
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: PortACL
+ direction: in
+ port: true
+
+ - name: ACL1v4
+ direction: out
+
+ - afi: ipv6
+ acls:
+
+ - name: ACL1v6
+ direction: in
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == True
+ - "'interface Ethernet1/2' in result.commands"
+ - "'ipv6 traffic-filter ACL1v6 in' in result.commands"
+ - "'interface Ethernet1/5' in result.commands"
+ - "'ip port access-group PortACL in' in result.commands"
+ - "'ip access-group ACL1v4 out' in result.commands"
+ - "'ipv6 traffic-filter ACL1v6 in' in result.commands"
+ - 'result.commands | length == 6 '
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_acl_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/overridden.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/overridden.yml
new file mode 100644
index 00000000..5f2a7572
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/overridden.yml
@@ -0,0 +1,77 @@
+---
+- debug:
+ msg: Start nxos_acl_interfaces overridden integration tests connection = {{ansible_connection}}
+
+- include_tasks: remove_config.yaml
+
+- include_tasks: populate_acl.yaml
+
+- include_tasks: populate_config.yaml
+
+- block:
+
+ - name: Overridden
+ register: result
+ cisco.nxos.nxos_acl_interfaces: &id002
+ config:
+
+ - name: Ethernet1/3
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: ACL1v4
+ direction: out
+
+ - name: PortACL
+ port: true
+ direction: in
+
+ - afi: ipv6
+ acls:
+
+ - name: NewACLv6
+ direction: in
+ port: true
+ state: overridden
+
+ - assert:
+ that:
+ - result.changed == True
+ - "'interface Ethernet1/2' in result.commands"
+ - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
+ - "'interface Ethernet1/5' in result.commands"
+ - "'no ip access-group ACL1v4 out' in result.commands"
+ - "'no ip port access-group PortACL in' in result.commands"
+ - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
+ - "'interface Ethernet1/3' in result.commands"
+ - "'ip access-group ACL1v4 out' in result.commands"
+ - "'ip port access-group PortACL in' in result.commands"
+ - "'ipv6 port traffic-filter NewACLv6 in' in result.commands"
+ - result.commands | length == 10
+
+ - name: Gather acl_interfaces post facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: acl_interfaces
+
+ - name: Gather acls post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.acl_interfaces == result.after
+
+ - name: Idempotence - overridden
+ register: result
+ cisco.nxos.nxos_acl_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/parsed.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/parsed.yml
new file mode 100644
index 00000000..04efedea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/parsed.yml
@@ -0,0 +1,32 @@
+---
+- debug:
+ msg: Start nxos_acl_interfaces parsed integration tests connection={{ansible_connection}}"
+
+- block:
+
+ - name: Gather acl interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: acl_interfaces
+
+ - name: Parsed
+ register: result
+ cisco.nxos.nxos_acl_interfaces: &id001
+ running_config: "interface Ethernet1/2\nipv6 traffic-filter ACL1v6 in\n\
+ interface Ethernet1/5\nipv6 traffic-filter ACL1v6 in\nip access-group\
+ \ ACL1v4 out\nip port access-group PortACL in\n"
+ state: parsed
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.parsed == parsed
+
+ - name: Idempotence - Parsed
+ register: result
+ cisco.nxos.nxos_acl_interfaces: *id001
+
+ - assert:
+ that: result.changed == false
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/populate_acl.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/populate_acl.yaml
new file mode 100644
index 00000000..c6251dc6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/populate_acl.yaml
@@ -0,0 +1,9 @@
+---
+- name: Adding base configuration
+ cisco.nxos.nxos_config:
+ lines:
+ - "ip access-list ACL1v4"
+ - "ip access-list NewACLv4"
+ - "ipv6 access-list ACL1v6"
+ - "ipv6 access-list NewACLv6"
+ - "ip access-list PortACL"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/populate_config.yaml
new file mode 100644
index 00000000..7265d081
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/populate_config.yaml
@@ -0,0 +1,4 @@
+---
+- name: Adding base configuration
+ cisco.nxos.nxos_config:
+ src: populate_config.cfg
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/remove_config.yaml
new file mode 100644
index 00000000..757a9fb3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/remove_config.yaml
@@ -0,0 +1,37 @@
+---
+- name: Remove config - 1
+ cisco.nxos.nxos_config:
+ lines:
+ - "no ip access-list ACL1v4"
+ - "no ip access-list NewACLv4"
+ - "no ip access-list PortACL"
+ - "no ipv6 access-list ACL1v6"
+ - "no ipv6 access-list NewACLv6"
+ - "interface Ethernet1/2"
+ - " no ipv6 traffic-filter ACL1v6 in"
+ ignore_errors: True
+
+- name: Remove config - 2
+ cisco.nxos.nxos_config:
+ lines:
+ - no ip access-group ACL1v4 out
+ - no ip port access-group PortACL in
+ - no ipv6 traffic-filter ACL1v6 in
+ parents: interface Ethernet1/5
+ ignore_errors: True
+
+- name: Remove config - 3
+ cisco.nxos.nxos_config:
+ lines:
+ - no ipv6 port traffic-filter NewACLv6 in
+ - no ip access-group ACL1v4 out
+ - no ip port access-group PortACL in
+ parents: interface Ethernet1/3
+ ignore_errors: True
+
+- name: Remove config - 4
+ cisco.nxos.nxos_config:
+ lines:
+ - no ip access-group NewACLv4 out
+ parents: interface Ethernet1/4
+ ignore_errors: True
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/rendered.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/rendered.yml
new file mode 100644
index 00000000..3186a04a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/rendered.yml
@@ -0,0 +1,57 @@
+---
+- debug:
+ msg: Start nxos_acl_interfaces rendered tests connection={{ ansible_connection
+ }}
+
+- name: Rendered
+ register: result
+ cisco.nxos.nxos_acl_interfaces: &id001
+ config:
+
+ - name: Ethernet1/2
+ access_groups:
+
+ - afi: ipv6
+ acls:
+
+ - name: ACL1v6
+ direction: in
+
+ - name: Ethernet1/5
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: PortACL
+ direction: in
+ port: true
+
+ - name: ACL1v4
+ direction: out
+
+ - afi: ipv6
+ acls:
+
+ - name: ACL1v6
+ direction: in
+ state: rendered
+
+- assert:
+ that:
+ - result.changed == false
+ - "'interface Ethernet1/2' in result.rendered"
+ - "'ipv6 traffic-filter ACL1v6 in' in result.rendered"
+ - "'interface Ethernet1/5' in result.rendered"
+ - "'ipv6 traffic-filter ACL1v6 in' in result.rendered"
+ - "'ip access-group ACL1v4 out' in result.rendered"
+ - "'ip port access-group PortACL in' in result.rendered"
+ - result.rendered | length == 6
+
+- name: Idempotence - Rendered
+ register: result
+ cisco.nxos.nxos_acl_interfaces: *id001
+
+- assert:
+ that:
+ - result.changed == false
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/replaced.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/replaced.yml
new file mode 100644
index 00000000..88ba19be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/replaced.yml
@@ -0,0 +1,70 @@
+---
+- debug:
+ msg: Start nxos_acl_interfaces replaced integration tests connection = {{ansible_connection}}
+
+- include_tasks: remove_config.yaml
+
+- include_tasks: populate_acl.yaml
+
+- include_tasks: populate_config.yaml
+
+- block:
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_acl_interfaces: &id001
+ config:
+
+ - name: Eth1/5
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: NewACLv4
+ direction: out
+
+ - name: Ethernet1/3
+ access_groups:
+
+ - afi: ipv6
+ acls:
+
+ - name: NewACLv6
+ direction: in
+ port: true
+ state: replaced
+
+ - assert:
+ that:
+ - result.changed==True
+ - "'interface Ethernet1/5' in result.commands"
+ - "'no ip access-group ACL1v4 out' in result.commands"
+ - "'no ip port access-group PortACL in' in result.commands"
+ - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
+ - "'ip access-group NewACLv4 out' in result.commands"
+ - "'interface Ethernet1/3' in result.commands"
+ - "'ipv6 port traffic-filter NewACLv6 in' in result.commands"
+ - result.commands|length==7
+
+ - name: Gather acl_interfaces post facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: acl_interfaces
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.acl_interfaces == result.after
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_acl_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/rtt.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/rtt.yml
new file mode 100644
index 00000000..a0fa737e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/tests/common/rtt.yml
@@ -0,0 +1,116 @@
+---
+- debug:
+ msg: Start nxos_acl_interfaces round trip integration tests connection = {{ansible_connection}}
+
+- include_tasks: remove_config.yaml
+
+- include_tasks: populate_acl.yaml
+
+- include_tasks: populate_config.yaml
+
+- block:
+
+ - name: RTT- Apply provided configuration
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+
+ - name: Ethernet1/2
+ access_groups:
+
+ - afi: ipv6
+ acls:
+
+ - name: ACL1v6
+ direction: in
+
+ - name: Eth1/5
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: PortACL
+ direction: in
+ port: true
+
+ - name: ACL1v4
+ direction: out
+
+ - afi: ipv6
+ acls:
+
+ - name: ACL1v6
+ direction: in
+ state: merged
+
+ - name: Gather interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - acl_interfaces
+
+ - name: Apply configuration to be reverted
+ register: result
+ cisco.nxos.nxos_acl_interfaces:
+ config:
+
+ - name: Eth1/4
+ access_groups:
+
+ - afi: ipv4
+ acls:
+
+ - name: NewACLv4
+ direction: out
+
+ - name: Ethernet1/3
+ access_groups:
+
+ - afi: ipv6
+ acls:
+
+ - name: NewACLv6
+ direction: in
+ port: true
+ state: overridden
+
+ - name: Assert that changes were applied
+ assert:
+ that:
+ - result.changed==True
+ - "'interface Ethernet1/2' in result.commands"
+ - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
+ - "'interface Ethernet1/5' in result.commands"
+ - "'no ip access-group ACL1v4 out' in result.commands"
+ - "'no ip port access-group PortACL in' in result.commands"
+ - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
+ - "'interface Ethernet1/4' in result.commands"
+ - "'ip access-group NewACLv4 out' in result.commands"
+ - "'interface Ethernet1/3' in result.commands"
+ - "'ipv6 port traffic-filter NewACLv6 in' in result.commands"
+
+ - name: Revert back to base configuration using facts round trip
+ register: result
+ cisco.nxos.nxos_acl_interfaces:
+ config: "{{ ansible_facts['network_resources']['acl_interfaces'] }}"
+ state: overridden
+
+ - name: Assert that config was reverted
+ assert:
+ that:
+ - result.changed==True
+ - "'interface Ethernet1/2' in result.commands"
+ - "'ipv6 traffic-filter ACL1v6 in' in result.commands"
+ - "'interface Ethernet1/3' in result.commands"
+ - "'no ipv6 port traffic-filter NewACLv6 in' in result.commands"
+ - "'interface Ethernet1/4' in result.commands"
+ - "'no ip access-group NewACLv4 out' in result.commands"
+ - "'interface Ethernet1/5' in result.commands"
+ - "'ip access-group ACL1v4 out' in result.commands"
+ - "'ip port access-group PortACL in' in result.commands"
+ - "'ipv6 traffic-filter ACL1v6 in' in result.commands"
+ always:
+
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/vars/main.yml
new file mode 100644
index 00000000..ad0b22e5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acl_interfaces/vars/main.yml
@@ -0,0 +1,21 @@
+---
+parsed:
+ - access_groups:
+ - acls:
+ - direction: in
+ name: ACL1v6
+ afi: ipv6
+ name: Ethernet1/2
+ - access_groups:
+ - acls:
+ - direction: out
+ name: ACL1v4
+ - direction: in
+ name: PortACL
+ port: true
+ afi: ipv4
+ - acls:
+ - direction: in
+ name: ACL1v6
+ afi: ipv6
+ name: Ethernet1/5
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tasks/cli.yaml
new file mode 100644
index 00000000..b2117741
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tasks/cli.yaml
@@ -0,0 +1,27 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tasks/main.yaml
new file mode 100644
index 00000000..6bcfed90
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tasks/main.yaml
@@ -0,0 +1,15 @@
+---
+- name: Set system defaults for switchports
+ cisco.nxos.nxos_config:
+ lines:
+ - "no system default switchport"
+ - "system default switchport shutdown"
+ connection: ansible.netcommon.network_cli
+
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tasks/nxapi.yaml
new file mode 100644
index 00000000..b6bd3eaf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tasks/nxapi.yaml
@@ -0,0 +1,27 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/deleted.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/deleted.yml
new file mode 100644
index 00000000..936f676f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/deleted.yml
@@ -0,0 +1,56 @@
+---
+- debug:
+ msg: Start nxos_acls deleted integration tests connection={{ansible_connection}}"
+
+- include_tasks: populate_config.yaml
+
+- block:
+ - name: Deleted (All ACLs)
+ cisco.nxos.nxos_acls:
+ config:
+ state: deleted
+
+ - name: Gather acls facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - "!all"
+ - "!min"
+ gather_network_resources: acls
+
+ - assert:
+ that:
+ - ansible_facts.network_resources == {}
+
+ - include_tasks: populate_config.yaml
+
+ - name: Deleted
+ register: result
+ cisco.nxos.nxos_acls: &id002
+ config:
+ - afi: ipv4
+
+ - afi: ipv6
+
+ state: deleted
+
+ - assert:
+ that:
+ - result.changed==True
+ - "'no ip access-list ACL1v4' in result.commands"
+ - "'no ip access-list ACL2v4' in result.commands"
+ - "'no ipv6 access-list ACL1v6' in result.commands"
+ - "'no ipv6 access-list ACL2v6' in result.commands"
+ - result.commands | length == 4
+
+ - name: Gather acls facts
+ cisco.nxos.nxos_facts: *id001
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_acls: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/gathered.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/gathered.yml
new file mode 100644
index 00000000..6d5c6554
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/gathered.yml
@@ -0,0 +1,35 @@
+---
+- debug:
+ msg: Start nxos_acls gathered integration tests connection={{ansible_connection}}"
+
+- include_tasks: populate_config.yaml
+
+- block:
+
+ - name: Gather acls facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: acls
+
+ - name: Gathered
+ register: result
+ cisco.nxos.nxos_acls: &id001
+ state: gathered
+
+ - assert:
+ that:
+ - result.changed == false
+ - ansible_facts.network_resources.acls == result.gathered
+
+ - name: Idempotence - Gathered
+ register: result
+ cisco.nxos.nxos_acls: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/merged.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/merged.yml
new file mode 100644
index 00000000..fb445828
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/merged.yml
@@ -0,0 +1,118 @@
+---
+- debug:
+ msg: Start nxos_acls merged integration tests connection={{ansible_connection}}"
+
+- include_tasks: remove_config.yaml
+
+- block:
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_acls: &id001
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: ACL1v4
+ aces:
+
+ - grant: deny
+ destination:
+ address: 192.0.2.64
+ wildcard_bits: 0.0.0.255
+ source:
+ any: true
+ port_protocol:
+ lt: 25
+ protocol: tcp
+ protocol_options:
+ tcp:
+ ack: true
+ fin: true
+ sequence: 50
+
+ - grant: permit
+ protocol: ip
+ source:
+ any: true
+ destination:
+ any: true
+ fragments: true
+ log: true
+ sequence: 20
+
+ - afi: ipv6
+ acls:
+
+ - name: ACL1v6
+ aces:
+
+ - grant: permit
+ sequence: 10
+ source:
+ any: true
+ destination:
+ host: 2001:db8:12::128
+ protocol: sctp
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == True
+ - "'ip access-list ACL1v4' in result.commands"
+ - "'20 permit ip any any fragments log' in result.commands"
+ - "'50 deny tcp any lt smtp 192.0.2.64 0.0.0.255 ack fin' in result.commands"
+ - "'ipv6 access-list ACL1v6' in result.commands"
+ - "'10 permit sctp any host 2001:db8:12::128' in result.commands"
+ - 'result.commands | length == 5 '
+
+ - name: Gather acls facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: acls
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.acls == result.after
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_acls: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Update one parameter of an ACE
+ register: result
+ cisco.nxos.nxos_acls:
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: ACL1v4
+ aces:
+
+ - grant: permit
+ protocol: tcp
+ source:
+ any: true
+ destination:
+ any: true
+ sequence: 20
+ precedence: 5
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == True
+ - "'ip access-list ACL1v4' in result.commands"
+ - "'no 20' in result.commands"
+ - "'20 permit tcp any any fragments precedence critical log' in result.commands"
+ always:
+
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/overridden.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/overridden.yml
new file mode 100644
index 00000000..4c042be5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/overridden.yml
@@ -0,0 +1,107 @@
+---
+- debug:
+ msg: Start nxos_acls overridden integration tests connection={{ansible_connection}}"
+
+- include_tasks: populate_config.yaml
+
+- block:
+
+ - name: Overridden (first test)
+ register: result
+ cisco.nxos.nxos_acls:
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: NewACL
+ aces:
+
+ - grant: deny
+ source:
+ address: 192.0.2.0
+ wildcard_bits: 0.0.255.255
+ destination:
+ any: true
+ protocol: eigrp
+
+ - remark: Example for overridden state
+ state: overridden
+
+ - assert:
+ that:
+ - result.changed==True
+ - "'no ip access-list ACL1v4' in result.commands"
+ - "'no ip access-list ACL2v4' in result.commands"
+ - "'no ipv6 access-list ACL1v6' in result.commands"
+ - "'no ipv6 access-list ACL2v6' in result.commands"
+ - "'ip access-list NewACL' in result.commands"
+ - "'deny eigrp 192.0.2.0 0.0.255.255 any' in result.commands"
+ - "'remark Example for overridden state' in result.commands"
+ - result.commands|length==7
+
+ - name: Gather acls post facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: acls
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.acls == result.after
+
+ - include_tasks: populate_config.yaml
+
+ - name: Overridden (second test)
+ register: result
+ cisco.nxos.nxos_acls: &id002
+ config:
+
+ - afi: ipv6
+ acls:
+
+ - name: ACL1v6
+ aces:
+
+ - grant: deny
+ protocol: udp
+ destination:
+ any: true
+ source:
+ host: 2001:db8:3431::12
+ port_protocol:
+ lt: 35
+ sequence: 10
+ state: overridden
+
+ - assert:
+ that:
+ - result.changed==True
+ - "'no ip access-list ACL1v4' in result.commands"
+ - "'no ip access-list ACL2v4' in result.commands"
+ - "'no ipv6 access-list ACL2v6' in result.commands"
+ - "'no ip access-list NewACL' in result.commands"
+ - "'ipv6 access-list ACL1v6' in result.commands"
+ - "'no 10 permit sctp any any' in result.commands"
+ - "'no 20 remark IPv6 ACL' in result.commands"
+ - "'10 deny udp host 2001:db8:3431::12 lt 35 any' in result.commands"
+ - result.commands|length==8
+
+ - name: Gather acls post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.acls == result.after
+
+ - name: Idempotence - overridden
+ register: result
+ cisco.nxos.nxos_acls: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/parsed.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/parsed.yml
new file mode 100644
index 00000000..d8be5087
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/parsed.yml
@@ -0,0 +1,39 @@
+---
+- debug:
+ msg: Start nxos_acls gathered integration tests connection={{ansible_connection}}"
+
+- include_tasks: populate_config.yaml
+
+- block:
+
+ - name: Gather acls facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: acls
+
+ - name: Parsed
+ register: result
+ cisco.nxos.nxos_acls: &id001
+ running_config: "ip access-list ACL1v4\n10 permit ip any any\n20 deny udp\
+ \ any any\nip access-list ACL2v4\n10 permit ahp 192.0.2.0 0.0.0.255 any\n\
+ ipv6 access-list ACL1v6\n10 permit sctp any any\n20 remark IPv6 ACL\n\
+ ipv6 access-list ACL2v6\n10 deny ipv6 any 2001:db8:3000::36/128\n20 permit\
+ \ tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128\n"
+ state: parsed
+
+ - assert:
+ that:
+ - result.changed == false
+ - ansible_facts.network_resources.acls == result.parsed
+
+ - name: Idempotence - Parsed
+ register: result
+ cisco.nxos.nxos_acls: *id001
+
+ - assert:
+ that: result.changed == false
+ always:
+
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/populate_config.yaml
new file mode 100644
index 00000000..0d8644e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/populate_config.yaml
@@ -0,0 +1,15 @@
+---
+- name: Add configuration
+ cisco.nxos.nxos_config:
+ lines:
+ - "ip access-list ACL1v4"
+ - " 10 permit ip any any"
+ - " 20 deny udp any any"
+ - "ip access-list ACL2v4"
+ - " 10 permit ahp 192.0.2.0 0.0.0.255 any"
+ - "ipv6 access-list ACL1v6"
+ - " 10 permit sctp any any"
+ - " 20 remark IPv6 ACL"
+ - "ipv6 access-list ACL2v6"
+ - " 10 deny ipv6 any host 2001:db8:3000::36"
+ - " 20 permit tcp host 2001:db8:2000:2::2 host 2001:db8:2000:ab::2"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/remove_config.yaml
new file mode 100644
index 00000000..24f7b9d0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/remove_config.yaml
@@ -0,0 +1,9 @@
+---
+- name: Remove config
+ cisco.nxos.nxos_config:
+ lines:
+ - "no ip access-list ACL1v4"
+ - "no ip access-list ACL2v4"
+ - "no ipv6 access-list ACL1v6"
+ - "no ipv6 access-list ACL2v6"
+ - "no ip access-list NewACL"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/rendered.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/rendered.yml
new file mode 100644
index 00000000..dbd42409
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/rendered.yml
@@ -0,0 +1,61 @@
+---
+- debug:
+ msg: Start nxos_acls rendered tests connection={{ ansible_connection }}
+
+- name: Rendered
+ register: result
+ cisco.nxos.nxos_acls: &id001
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: ACL1v4
+ aces:
+
+ - grant: deny
+ destination:
+ address: 192.0.2.64
+ wildcard_bits: 0.0.0.255
+ source:
+ any: true
+ port_protocol:
+ eq: 43
+ protocol: tcp
+ protocol_options:
+ tcp:
+ ack: true
+ fin: true
+ sequence: 50
+
+ - afi: ipv6
+ acls:
+
+ - name: ACL1v6
+ aces:
+
+ - grant: permit
+ sequence: 10
+ source:
+ any: true
+ destination:
+ prefix: 2001:db8:12::/32
+ protocol: sctp
+ state: rendered
+
+- assert:
+ that:
+ - result.changed == false
+ - "'ip access-list ACL1v4' in result.rendered"
+ - "'50 deny tcp any eq whois 192.0.2.64 0.0.0.255 ack fin' in result.rendered"
+ - "'ipv6 access-list ACL1v6' in result.rendered"
+ - "'10 permit sctp any 2001:db8:12::/32' in result.rendered"
+ - result.rendered | length == 4
+
+- name: Idempotence - Rendered
+ register: result
+ cisco.nxos.nxos_acls: *id001
+
+- assert:
+ that:
+ - result.changed == false
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/replaced.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/replaced.yml
new file mode 100644
index 00000000..c155afd5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/replaced.yml
@@ -0,0 +1,71 @@
+---
+- debug:
+ msg: Start nxos_acls replaced integration tests connection={{ansible_connection}}"
+
+- include_tasks: populate_config.yaml
+
+- block:
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_acls: &id001
+ config:
+
+ - afi: ipv4
+
+ - afi: ipv6
+ acls:
+
+ - name: ACL1v6
+ aces:
+
+ - sequence: 30
+ grant: permit
+ source:
+ any: true
+ destination:
+ any: true
+ protocol: pim
+
+ - sequence: 40
+ remark: Replaced ACE
+
+ - name: ACL2v6
+ state: replaced
+
+ - assert:
+ that:
+ - "'no ip access-list ACL1v4' in result.commands"
+ - "'no ip access-list ACL2v4' in result.commands"
+ - "'ipv6 access-list ACL1v6' in result.commands"
+ - "'no 10 permit sctp any any' in result.commands"
+ - "'no 20 remark IPv6 ACL' in result.commands"
+ - "'30 permit pim any any' in result.commands"
+ - "'40 remark Replaced ACE' in result.commands"
+ - "'ipv6 access-list ACL2v6' in result.commands"
+ - "'no 10 deny ipv6 any host 2001:db8:3000::36' in result.commands"
+ - "'no 20 permit tcp host 2001:db8:2000:2::2 host 2001:db8:2000:ab::2'\
+ \ in result.commands"
+ - result.commands|length == 10
+
+ - name: Gather static_routes post facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: acls
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.acls == result.after
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_acls: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/rtt.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/rtt.yml
new file mode 100644
index 00000000..c1e91d46
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_acls/tests/common/rtt.yml
@@ -0,0 +1,95 @@
+---
+- debug:
+ msg: Start nxos_acls round trip integration tests connection = {{ansible_connection}}
+
+- block:
+
+ - name: RTT - Apply provided configuration
+ cisco.nxos.nxos_acls:
+ config:
+
+ - afi: ipv4
+ acls:
+
+ - name: ACL1v4
+ aces:
+
+ - grant: deny
+ destination:
+ address: 192.0.2.64
+ wildcard_bits: 0.0.0.255
+ source:
+ any: true
+ port_protocol:
+ lt: 25
+ protocol: tcp
+ protocol_options:
+ tcp:
+ ack: true
+ fin: true
+ sequence: 50
+
+ - grant: permit
+ protocol: ip
+ source:
+ any: true
+ destination:
+ any: true
+ fragments: true
+ log: true
+ sequence: 20
+ state: merged
+
+ - name: Gather interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - acls
+
+ - name: Apply configuration to be reverted
+ register: result
+ cisco.nxos.nxos_acls:
+ config:
+
+ - afi: ipv6
+ acls:
+
+ - name: ACL1v6
+ aces:
+
+ - grant: permit
+ sequence: 10
+ source:
+ any: true
+ destination:
+ host: 2001:db8:12::128
+ protocol: sctp
+ state: overridden
+
+ - assert:
+ that:
+ - result.changed == True
+ - "'no ip access-list ACL1v4' in result.commands"
+ - "'ipv6 access-list ACL1v6' in result.commands"
+ - "'10 permit sctp any host 2001:db8:12::128' in result.commands"
+ - 'result.commands | length == 3 '
+
+ - name: Revert back to base configuration using facts round trip
+ register: result
+ cisco.nxos.nxos_acls:
+ config: "{{ ansible_facts['network_resources']['acls'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - result.changed == True
+ - "'ip access-list ACL1v4' in result.commands"
+ - "'20 permit ip any any fragments log' in result.commands"
+ - "'50 deny tcp any lt smtp 192.0.2.64 0.0.0.255 fin ack' in result.commands"
+ - "'no ipv6 access-list ACL1v6' in result.commands"
+ - 'result.commands | length == 4 '
+ always:
+
+ - include_tasks: remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/meta/main.yaml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tasks/main.yaml
new file mode 100644
index 00000000..af71367b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tasks/main.yaml
@@ -0,0 +1,12 @@
+---
+- set_fact:
+ banner_exec_image_ok: False
+ banner_motd_image_ok: False
+
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tests/common/sanity.yaml
new file mode 100644
index 00000000..876e7b25
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_banner/tests/common/sanity.yaml
@@ -0,0 +1,78 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_banner sanity test"
+
+- set_fact:
+ banner_exec_image_ok: True
+ when: platform is search("N7K|N3K-F")
+
+- set_fact:
+ banner_motd_image_ok: True
+ when: imagetag is not search("I7") and ansible_connection != "ansible.netcommon.httpapi"
+
+- block:
+
+ - debug: msg="START nxos_banner exec tests"
+
+ - name: setup exec
+ cisco.nxos.nxos_banner: &id002
+ banner: exec
+ state: absent
+
+ - name: Set exec
+ register: result
+ cisco.nxos.nxos_banner: &id001
+ banner: exec
+ text: "this is my exec banner\nthat has a multiline\nstring"
+ state: present
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'banner exec @\nthis is my exec banner\nthat has a multiline\nstring\n\
+ @' in result.commands"
+
+ - name: Set exec again (idempotent)
+ register: result
+ cisco.nxos.nxos_banner: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
+
+ - name: teardown exec
+ cisco.nxos.nxos_banner: *id002
+ when: banner_exec_image_ok == True
+
+- block:
+
+ - name: setup motd
+ cisco.nxos.nxos_banner: &id004
+ banner: motd
+ state: absent
+
+ - name: Set motd
+ register: result
+ cisco.nxos.nxos_banner: &id003
+ banner: motd
+ text: "Junk motd banner\nover multiple lines"
+ state: present
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'banner motd @\nJunk motd banner\nover multiple lines\n@' in result.commands"
+
+ - name: Set motd again (idempotent)
+ register: result
+ cisco.nxos.nxos_banner: *id003
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: teardown motd
+ cisco.nxos.nxos_banner: *id004
+ when: banner_motd_image_ok == True
+
+- debug: msg="END connection={{ ansible_connection }} nxos_banner sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tests/common/sanity.yaml
new file mode 100644
index 00000000..384952f6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_global/tests/common/sanity.yaml
@@ -0,0 +1,167 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bfd_global sanity test"
+
+- name: set facts common
+ set_fact:
+ echo: deleted
+ nd_echo: loopback1
+ interval: &id001
+ tx: 50
+ min_rx: 50
+ multiplier: 3
+ nd_interval:
+ tx: 51
+ min_rx: 52
+ multiplier: 4
+ slow: 2000
+ nd_slow: 2001
+
+- name: set facts (exclude 5K/6K)
+ set_fact:
+ echo_rx: 50
+ nd_echo_rx: 51
+ ipv4_echo_rx: 50
+ nd_ipv4_echo_rx: 54
+ ipv4_interval: *id001
+ nd_ipv4_interval: &id002
+ tx: 54
+ min_rx: 56
+ multiplier: 8
+ ipv4_slow: 2000
+ nd_ipv4_slow: 2044
+ when: platform is not search('N5K|N6K')
+
+- name: set facts (exclude 35/5K/6K)
+ set_fact:
+ ipv6_echo_rx: 50
+ nd_ipv6_echo_rx: 56
+ ipv6_interval: *id001
+ nd_ipv6_interval: *id002
+ ipv6_slow: 2000
+ nd_ipv6_slow: 2046
+ when: platform is not search('N35|N5K|N6K')
+
+- name: set facts (exclude 5K/6K/7K)
+ set_fact:
+ startup: 5
+ nd_startup: 6
+ when: platform is not search('N35|N5K|N6K|N7K')
+
+- name: set facts 3k defaults (resets some values above)
+ set_fact:
+ echo_rx: 250
+ interval: &id003
+ tx: 250
+ min_rx: 250
+ multiplier: 3
+ ipv4_echo_rx: 250
+ ipv6_echo_rx: 250
+ ipv4_interval: *id003
+ ipv6_interval: *id003
+ ipv4_slow: 2000
+ ipv6_slow: 2000
+ when: platform is search('N3K')
+
+- name: set facts fabricpath
+ set_fact:
+ fab_interval: *id001
+ nd_fab_interval:
+ tx: 57
+ min_rx: 57
+ multiplier: 7
+ fab_slow_timer: 2000
+ nd_fab_slow_timer: 2007
+ fab_vlan: 1
+ nd_fab_vlan: 47
+ when: platform is not search('N35|N3K|N9K')
+
+- name: Setup
+ ignore_errors: true
+ cisco.nxos.nxos_feature: &id008
+ feature: bfd
+ state: disabled
+
+- name: Setup supporting loopback interface
+ cisco.nxos.nxos_config:
+ lines: interface loopback1
+ match: none
+
+- name: feature bfd init
+ delay: 3
+ retries: 1
+ register: result
+ until: result is not failed
+ ignore_errors: true
+ cisco.nxos.nxos_bfd_global:
+ slow_timer: '{{ nd_slow }}'
+
+- block:
+
+ - name: BFD non defaults
+ register: result
+ cisco.nxos.nxos_bfd_global: &id004
+ echo_interface: '{{ nd_echo }}'
+ echo_rx_interval: '{{ nd_echo_rx | default(omit) }}'
+ interval: '{{ nd_interval }}'
+ slow_timer: '{{ nd_slow }}'
+ startup_timer: '{{ nd_startup | default(omit) }}'
+ ipv4_echo_rx_interval: '{{ nd_ipv4_echo_rx | default(omit) }}'
+ ipv6_echo_rx_interval: '{{ nd_ipv6_echo_rx | default(omit) }}'
+ ipv4_interval: '{{ nd_ipv4_interval | default(omit) }}'
+ ipv6_interval: '{{ nd_ipv6_interval | default(omit) }}'
+ ipv4_slow_timer: '{{ nd_ipv4_slow | default(omit) }}'
+ ipv6_slow_timer: '{{ nd_ipv6_slow | default(omit) }}'
+ fabricpath_interval: '{{ nd_fab_interval | default(omit) }}'
+ fabricpath_slow_timer: '{{ nd_fab_slow | default(omit) }}'
+ fabricpath_vlan: '{{ nd_fab_vlan | default(omit) }}'
+
+ - assert: &id005
+ that:
+ - result.changed == true
+
+ - name: bfd_non_def idempotence
+ register: result
+ cisco.nxos.nxos_bfd_global: *id004
+
+ - assert: &id007
+ that:
+ - result.changed == false
+
+ - name: BFD defaults
+ register: result
+ cisco.nxos.nxos_bfd_global: &id006
+ echo_interface: '{{ echo }}'
+ echo_rx_interval: '{{ echo_rx | default(omit) }}'
+ interval: '{{ interval }}'
+ slow_timer: '{{ slow }}'
+ startup_timer: '{{ startup | default(omit) }}'
+ ipv4_echo_rx_interval: '{{ ipv4_echo_rx | default(omit) }}'
+ ipv6_echo_rx_interval: '{{ ipv6_echo_rx | default(omit) }}'
+ ipv4_interval: '{{ ipv4_interval | default(omit) }}'
+ ipv6_interval: '{{ ipv6_interval | default(omit) }}'
+ ipv4_slow_timer: '{{ ipv4_slow | default(omit) }}'
+ ipv6_slow_timer: '{{ ipv6_slow | default(omit) }}'
+ fabricpath_interval: '{{ fab_interval | default(omit) }}'
+ fabricpath_slow_timer: '{{ fab_slow | default(omit) }}'
+ fabricpath_vlan: '{{ fab_vlan | default(omit) }}'
+
+ - assert: *id005
+
+ - name: bfd_def idempotence
+ register: result
+ cisco.nxos.nxos_bfd_global: *id006
+
+ - assert: *id007
+ always:
+
+ - name: Teardown
+ ignore_errors: true
+ cisco.nxos.nxos_feature: *id008
+
+ - name: Teardown supporting loopback interface
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines: no interface loopback1
+ match: none
+
+- debug: msg="END connection={{ ansible_connection }} nxos_bfd_global sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..12c20322
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tasks/cli.yaml
@@ -0,0 +1,29 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tasks/nxapi.yaml
new file mode 100644
index 00000000..e6144de9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..3edd20df
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/_populate_config.yaml
@@ -0,0 +1,14 @@
+- name: Populate config - 1
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature bfd"
+ - "interface {{ nxos_int1 }}"
+ - " no switchport"
+ - " no bfd"
+
+- name: Populate config - 2
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ nxos_int2 }}"
+ - " no switchport"
+ - " no bfd echo"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..3ec2b2de
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/_remove_config.yaml
@@ -0,0 +1,8 @@
+- name: Remove config
+ cisco.nxos.nxos_config:
+ lines:
+ - "no feature bfd"
+ - "default interface {{ nxos_int1 }}"
+ - "default interface {{ nxos_int2 }}"
+ - "default interface {{ nxos_int3 }}"
+ ignore_errors: True
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/deleted.yaml
new file mode 100644
index 00000000..d6eb85b1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/deleted.yaml
@@ -0,0 +1,75 @@
+---
+- debug:
+ msg: Start nxos_bfd_interfaces deleted integration tests connection={{ ansible_connection
+ }}
+
+- set_fact: test_int1="{{ nxos_int1 }}"
+
+- set_fact:
+ bfd_enable: enable
+ bfd_disable: disable
+ when: platform is not search('N5K|N6K')
+
+- name: setup1
+ cisco.nxos.nxos_config: &id002
+ lines:
+ - "no feature bfd"
+ - "default interface {{ test_int1 }}"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature bfd"
+ - "interface {{ test_int1 }}"
+ - " no switchport"
+
+ - name: setup initial bfd state
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+
+ - name: '{{ test_int1 }}'
+ bfd: '{{ bfd_disable|default(omit)}}'
+ echo: disable
+ state: merged
+
+ - name: Gather bfd_interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: bfd_interfaces
+
+ - name: deleted
+ register: result
+ cisco.nxos.nxos_bfd_interfaces: &id001
+ config:
+
+ - name: '{{ test_int1 }}'
+ state: deleted
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'bfd echo' in result.commands"
+ msg: "Assert failed. 'result.commands': {{ result.commands }}"
+
+ - assert:
+ that:
+ - "{{ 'bfd' in result.commands }}"
+ msg: "Assert failed. 'result.commands': {{ result.commands }}"
+ when: bfd_enable is defined
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_bfd_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id002
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/empty_config.yaml
new file mode 100644
index 00000000..50b4d6ba
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/empty_config.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START nxos_bfd_interfaces empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_bfd_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_bfd_interfaces empty_config integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/gathered.yaml
new file mode 100644
index 00000000..1d0187b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/gathered.yaml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: START nxos_bfd_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather bfd_interfaces facts from the device using nxos_bfd_interfaces
+ register: result
+ cisco.nxos.nxos_bfd_interfaces:
+ state: gathered
+
+ - assert:
+ that: "{{ result['gathered'][:3] | symmetric_difference(gathered)\
+ \ |length == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+ - debug:
+ msg: END nxos_bfd_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/merged.yaml
new file mode 100644
index 00000000..e1b930d3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/merged.yaml
@@ -0,0 +1,73 @@
+---
+- debug:
+ msg: Start nxos_bfd_interfaces merged integration tests connection={{ ansible_connection
+ }}
+
+- set_fact: test_int1="{{ nxos_int1 }}"
+
+- set_fact:
+ bfd_enable: enable
+ bfd_disable: disable
+ when: platform is not search('N5K|N6K')
+
+- name: setup1
+ cisco.nxos.nxos_config: &id002
+ lines:
+ - "no feature bfd"
+ - "default interface {{ test_int1 }}"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature bfd"
+ - "interface {{ test_int1 }}"
+ - " no switchport"
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_bfd_interfaces: &id001
+ config:
+
+ - name: '{{ test_int1 }}'
+ bfd: '{{ bfd_disable|default(omit)}}'
+ echo: disable
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'no bfd echo' in result.commands"
+ msg: "Assert failed. 'result.commands': {{ result.commands }}"
+
+ - assert:
+ that:
+ - "{{ 'no bfd' in result.commands }}"
+ msg: "Assert failed. 'result.commands': {{ result.commands }}"
+ when: bfd_enable is defined
+
+ - name: Gather bfd_interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: bfd_interfaces
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.bfd_interfaces|symmetric_difference(result.after)|length
+ == 0
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_bfd_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id002
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/overridden.yaml
new file mode 100644
index 00000000..60a77cbe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/overridden.yaml
@@ -0,0 +1,79 @@
+---
+- debug:
+ msg: Start nxos_bfd_interfaces overridden integration tests connection={{ ansible_connection
+ }}
+
+- set_fact: test_int1="{{ nxos_int1 }}"
+
+- set_fact: test_int2="{{ nxos_int2 }}"
+
+- set_fact:
+ bfd_enable: enable
+ bfd_disable: disable
+ when: platform is not search('N5K|N6K')
+
+- name: setup1
+ cisco.nxos.nxos_config: &id002
+ lines:
+ - "no feature bfd"
+ - "default interface {{ test_int1 }}"
+ - "default interface {{ test_int2 }}"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature bfd"
+
+ - name: setup3
+ cisco.nxos.nxos_config:
+ lines:
+ - "no switchport"
+ parents: "interface {{ item }}"
+ loop:
+ - "{{ test_int1 }}"
+ - "{{ test_int2 }}"
+
+ - name: setup initial bfd state
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+
+ - name: '{{ test_int1 }}'
+ bfd: '{{ bfd_disable|default(omit)}}'
+ echo: enable
+
+ - name: '{{ test_int2 }}'
+ bfd: '{{ bfd_enable|default(omit)}}'
+ echo: disable
+ state: merged
+
+ - name: Overridden
+ register: result
+ cisco.nxos.nxos_bfd_interfaces: &id001
+ config:
+
+ - name: '{{ test_int1 }}'
+ bfd: '{{ bfd_disable|default(omit)}}'
+ echo: disable
+ state: overridden
+
+ - assert:
+ that:
+ - result.changed == true
+ - result.commands[1] == 'bfd echo'
+ - result.commands[3] == 'no bfd echo'
+ msg: "Assert failed. 'result.commands': {{ result.commands }}"
+
+ - name: Idempotence - Overridden
+ register: result
+ cisco.nxos.nxos_bfd_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id002
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/parsed.yaml
new file mode 100644
index 00000000..0b8403e3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/parsed.yaml
@@ -0,0 +1,34 @@
+---
+- debug:
+ msg: START nxos_bfd_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+ # Interfaces used in the task don't actually exist on the appliance
+ - name: Use parsed state to convert externally supplied config to structured format
+ register: result
+ cisco.nxos.nxos_bfd_interfaces:
+ running_config: |
+ feature bfd
+ interface Ethernet1/800
+ no switchport
+ no bfd
+ no bfd echo
+ interface Ethernet1/801
+ no switchport
+ no bfd
+ interface Ethernet1/802
+ no switchport
+ no bfd echo
+ interface mgmt0
+ ip address dhcp
+ vrf member management
+ state: parsed
+
+ - assert:
+ that: "{{ parsed | symmetric_difference(result['parsed']) |length==0\
+ \ }}"
+
+- debug:
+ msg: END nxos_bfd_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/rendered.yaml
new file mode 100644
index 00000000..ad23ab64
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/rendered.yaml
@@ -0,0 +1,41 @@
+---
+- debug:
+ msg: START nxos_bfd_interfaces rendered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ # Interfaces used here doesn't actually exist on the device
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+ - name: Ethernet1/800
+ bfd: enable
+ echo: enable
+ - name: Ethernet1/801
+ bfd: disable
+ echo: disable
+ state: rendered
+
+ - assert:
+ that: "{{ rendered | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather bfd_interfaces facts from the device and assert that its empty
+ register: result
+ cisco.nxos.nxos_bfd_interfaces:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the
+ device
+ assert:
+ that: "{{ result['gathered'] == [] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_bfd_interfaces rendered integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/replaced.yaml
new file mode 100644
index 00000000..6d9a25d1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/tests/common/replaced.yaml
@@ -0,0 +1,70 @@
+---
+- debug:
+ msg: Start nxos_bfd_interfaces replaced integration tests connection={{ ansible_connection
+ }}
+
+- set_fact: test_int1="{{ nxos_int1 }}"
+
+- set_fact:
+ bfd_enable: enable
+ bfd_disable: disable
+ when: platform is not search('N5K|N6K')
+
+- name: setup1
+ cisco.nxos.nxos_config: &id002
+ lines:
+ - "no feature bfd"
+ - "default interface {{ test_int1 }}"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature bfd"
+ - "interface {{ test_int1 }}"
+ - " no switchport"
+
+ - name: setup initial bfd state
+ cisco.nxos.nxos_bfd_interfaces:
+ config:
+
+ - name: '{{ test_int1 }}'
+ bfd: '{{ bfd_disable|default(omit)}}'
+ echo: enable
+ state: merged
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_bfd_interfaces: &id001
+ config:
+
+ - name: '{{ test_int1 }}'
+ bfd: '{{ bfd_enable|default(omit)}}'
+ echo: disable
+ state: replaced
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'no bfd echo' in result.commands"
+ msg: "Assert failed. 'result.commands': {{ result.commands }}"
+
+ - assert:
+ that:
+ - "{{ 'bfd' in result.commands }}"
+ msg: "Assert failed. 'result.commands': {{ result.commands }}"
+ when: bfd_enable is defined
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_bfd_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id002
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/vars/main.yml
new file mode 100644
index 00000000..29552637
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bfd_interfaces/vars/main.yml
@@ -0,0 +1,32 @@
+gathered:
+ - name: "{{ nxos_int1 }}"
+ bfd: disable
+ echo: enable
+ - name: "{{ nxos_int2 }}"
+ echo: disable
+ bfd: enable
+ - name: "{{ nxos_int3 }}"
+ bfd: enable
+ echo: enable
+
+parsed:
+ - bfd: disable
+ echo: disable
+ name: Ethernet1/800
+ - bfd: disable
+ echo: enable
+ name: Ethernet1/801
+ - bfd: enable
+ echo: disable
+ name: Ethernet1/802
+ - bfd: enable
+ echo: enable
+ name: mgmt0
+
+rendered:
+ - "interface Ethernet1/800"
+ - "bfd"
+ - "bfd echo"
+ - "interface Ethernet1/801"
+ - "no bfd"
+ - "no bfd echo"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/defaults/main.yaml
new file mode 100644
index 00000000..e69126b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/defaults/main.yaml
@@ -0,0 +1,5 @@
+---
+testcase: '*'
+vrfs:
+- default
+- myvrf
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/dis_policy.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/dis_policy.yaml
new file mode 100644
index 00000000..bea37b7f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/dis_policy.yaml
@@ -0,0 +1,80 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
+
+- debug: msg="This bgp_disable_policy is not supported on {{ image_version }}"
+ when: imagetag is search("A8|D1")
+
+- set_fact: bgp_disable_policy="false"
+
+- set_fact: bgp_disable_policy="true"
+ when: imagetag is not search("A8|D1")
+
+- name: Disable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- name: Enable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- block:
+
+ - name: set disable policy
+ register: result
+ when: bgp_disable_policy
+ cisco.nxos.nxos_bgp: &id001
+ asn: 65535
+ disable_policy_batching: true
+ disable_policy_batching_ipv4_prefix_list: v4_p
+ disable_policy_batching_ipv6_prefix_list: v6_p
+
+ - assert: &id002
+ that:
+ - result.changed == true
+ when: bgp_disable_policy
+
+ - name: Check Idempotence
+ register: result
+ when: bgp_disable_policy
+ cisco.nxos.nxos_bgp: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+ when: bgp_disable_policy
+
+ - name: reset disable policy
+ register: result
+ when: bgp_disable_policy
+ cisco.nxos.nxos_bgp: &id003
+ asn: 65535
+ disable_policy_batching: false
+ disable_policy_batching_ipv4_prefix_list: default
+ disable_policy_batching_ipv6_prefix_list: default
+
+ - assert: *id002
+ when: bgp_disable_policy
+
+ - name: Check Idempotence
+ register: result
+ when: bgp_disable_policy
+ cisco.nxos.nxos_bgp: *id003
+
+ - assert: *id004
+ when: bgp_disable_policy
+ rescue:
+
+ - debug: msg="Tests can fail on A8 or helsinki images"
+ always:
+
+ - name: Disable feature bgp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/hels.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/hels.yaml
new file mode 100644
index 00000000..a92258c9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/hels.yaml
@@ -0,0 +1,96 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
+
+- debug: msg="This test is not supported on {{ image_version }}"
+ when: imagetag is search("D1")
+
+- set_fact: test_helsinki="false"
+
+- set_fact: test_helsinki="true"
+ when: imagetag is not search("D1")
+
+- name: Disable feature BGP
+ ignore_errors: true
+ when: test_helsinki
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- name: Enable feature BGP
+ ignore_errors: true
+ when: test_helsinki
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- block:
+
+ - name: set helsinki
+ with_items: '{{ vrfs }}'
+ register: result
+ when: test_helsinki
+ cisco.nxos.nxos_bgp: &id001
+ asn: 65535
+ vrf: '{{ item }}'
+ graceful_restart_timers_restart: 130
+ graceful_restart_timers_stalepath_time: 310
+ neighbor_down_fib_accelerate: true
+ reconnect_interval: 55
+ timer_bgp_hold: 110
+ timer_bgp_keepalive: 45
+
+ - assert: &id002
+ that:
+ - result.changed == true
+ when: test_helsinki
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ when: test_helsinki
+ cisco.nxos.nxos_bgp: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+ when: test_helsinki
+
+ - name: reset helsinki
+ with_items: '{{ vrfs }}'
+ register: result
+ when: test_helsinki
+ cisco.nxos.nxos_bgp: &id003
+ asn: 65535
+ vrf: '{{ item }}'
+ graceful_restart: true
+ graceful_restart_timers_restart: default
+ graceful_restart_timers_stalepath_time: default
+ neighbor_down_fib_accelerate: false
+ reconnect_interval: default
+ timer_bgp_hold: default
+ timer_bgp_keepalive: default
+
+ - assert: *id002
+ when: test_helsinki
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ when: test_helsinki
+ cisco.nxos.nxos_bgp: *id003
+
+ - assert: *id004
+ when: test_helsinki
+ rescue:
+
+ - debug: msg="Tests can fail on helsinki images"
+ always:
+
+ - name: Disable feature bgp
+ ignore_errors: true
+ when: test_helsinki
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/isolate.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/isolate.yaml
new file mode 100644
index 00000000..8b2d7138
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/isolate.yaml
@@ -0,0 +1,76 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
+
+- debug: msg="This bgp_isolate is not supported on {{ image_version }}"
+ when: imagetag is search("A8")
+
+- set_fact: bgp_isolate="false"
+
+- set_fact: bgp_isolate="true"
+ when: imagetag is not search("A8")
+
+- name: Disable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- name: Enable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- block:
+
+ - name: set isolate
+ register: result
+ when: bgp_isolate
+ cisco.nxos.nxos_bgp: &id001
+ asn: 65535
+ isolate: false
+
+ - assert: &id002
+ that:
+ - result.changed == true
+ when: bgp_isolate
+
+ - name: Check Idempotence
+ register: result
+ when: bgp_isolate
+ cisco.nxos.nxos_bgp: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+ when: bgp_isolate
+
+ - name: reset isolate
+ register: result
+ when: bgp_isolate
+ cisco.nxos.nxos_bgp: &id003
+ asn: 65535
+ isolate: true
+
+ - assert: *id002
+ when: bgp_isolate
+
+ - name: Check Idempotence
+ register: result
+ when: bgp_isolate
+ cisco.nxos.nxos_bgp: *id003
+
+ - assert: *id004
+ when: bgp_isolate
+ rescue:
+
+ - debug: msg="Tests can fail on A8 images"
+ always:
+
+ - name: Disable feature bgp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/param.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/param.yaml
new file mode 100644
index 00000000..4e5d9b84
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/param.yaml
@@ -0,0 +1,258 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
+
+- name: Disable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- name: Enable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- block:
+
+ - name: set multi vrf params
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp: &id001
+ asn: 65535
+ vrf: '{{ item }}'
+ router_id: 192.0.2.1
+ bestpath_always_compare_med: true
+ bestpath_aspath_multipath_relax: true
+ bestpath_compare_routerid: true
+ bestpath_cost_community_ignore: true
+ bestpath_med_confed: true
+ bestpath_med_missing_as_worst: true
+ bestpath_med_non_deterministic: true
+ graceful_restart_helper: true
+ log_neighbor_changes: true
+ maxas_limit: 50
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: reset multi vrf params
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp: &id003
+ asn: 65535
+ vrf: '{{ item }}'
+ bestpath_always_compare_med: false
+ bestpath_aspath_multipath_relax: false
+ bestpath_compare_routerid: false
+ bestpath_cost_community_ignore: false
+ bestpath_med_confed: false
+ bestpath_med_missing_as_worst: false
+ bestpath_med_non_deterministic: false
+ graceful_restart_helper: false
+ log_neighbor_changes: false
+ maxas_limit: default
+ router_id: default
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp: *id003
+
+ - assert: *id004
+
+ - name: set clusterid
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp: &id005
+ asn: 65535
+ vrf: '{{ item }}'
+ cluster_id: 10.0.0.1
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp: *id005
+
+ - assert: *id004
+
+ - name: reset cluster_id
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp: &id006
+ asn: 65535
+ vrf: '{{ item }}'
+ cluster_id: default
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp: *id006
+
+ - assert: *id004
+
+ - name: set confederation
+ register: result
+ cisco.nxos.nxos_bgp: &id007
+ asn: 65535
+ confederation_id: 99
+ confederation_peers:
+ - 16
+ - 22
+ - 18
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp: *id007
+
+ - assert: *id004
+
+ - name: reset confederation
+ register: result
+ cisco.nxos.nxos_bgp: &id008
+ asn: 65535
+ confederation_id: default
+ confederation_peers: default
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp: *id008
+
+ - assert: *id004
+
+ - name: set confederation_local_as
+ register: result
+ cisco.nxos.nxos_bgp: &id009
+ asn: 65535
+ vrf: myvrf
+ local_as: 33
+ confederation_id: 99
+ confederation_peers:
+ - 16
+ - 22
+ - 18
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp: *id009
+
+ - assert: *id004
+
+ - name: reset confederation local_as
+ register: result
+ cisco.nxos.nxos_bgp: &id010
+ asn: 65535
+ vrf: myvrf
+ local_as: default
+ confederation_id: default
+ confederation_peers: default
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp: *id010
+
+ - assert: *id004
+
+ - name: set local_as
+ register: result
+ cisco.nxos.nxos_bgp: &id011
+ asn: 65535
+ vrf: myvrf
+ local_as: 33
+ confederation_id: 99
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp: *id011
+
+ - assert: *id004
+
+ - name: reset local_as
+ register: result
+ cisco.nxos.nxos_bgp: &id012
+ asn: 65535
+ vrf: myvrf
+ confederation_id: default
+ local_as: default
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp: *id012
+
+ - assert: *id004
+
+ - name: set default vrf params
+ register: result
+ cisco.nxos.nxos_bgp: &id013
+ asn: 65535
+ event_history_cli: size_medium
+ event_history_detail: size_large
+ event_history_events: size_medium
+ event_history_periodic: size_small
+ enforce_first_as: false
+ fast_external_fallover: false
+ flush_routes: true
+ shutdown: true
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp: *id013
+
+ - assert: *id004
+
+ - name: reset default vrf params
+ register: result
+ cisco.nxos.nxos_bgp: &id014
+ asn: 65535
+ event_history_detail: default
+ enforce_first_as: true
+ fast_external_fallover: true
+ flush_routes: false
+ shutdown: false
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp: *id014
+
+ - assert: *id004
+ always:
+
+ - name: Disable feature bgp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/sanity.yaml
new file mode 100644
index 00000000..06027a5b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/sanity.yaml
@@ -0,0 +1,133 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bgp sanity test"
+
+- set_fact: neighbor_down_fib_accelerate="true"
+ when: (not titanium) and ((imagetag != 'N1') and (imagetag != 'D1'))
+
+- set_fact: reconnect_interval="55"
+ when: (not titanium) and ((imagetag != 'N1') and (imagetag != 'D1'))
+
+- set_fact: isolate="false"
+ when: platform is not match("N35")
+
+- name: Enable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- name: Setup
+ ignore_errors: true
+ register: result
+ cisco.nxos.nxos_bgp: &id002
+ asn: 65535
+ state: absent
+
+- block:
+
+ - name: Configure BGP defaults
+ register: result
+ cisco.nxos.nxos_bgp: &id001
+ asn: 65535
+ router_id: 192.0.2.1
+ state: present
+
+ - assert: &id003
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Remove BGP
+ register: result
+ cisco.nxos.nxos_bgp: *id002
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp: *id002
+
+ - assert: *id004
+
+ - name: Configure BGP non defaults
+ register: result
+ cisco.nxos.nxos_bgp: &id005
+ asn: 65535
+ router_id: 192.0.2.1
+ bestpath_always_compare_med: true
+ bestpath_aspath_multipath_relax: true
+ bestpath_compare_routerid: true
+ bestpath_cost_community_ignore: true
+ bestpath_med_confed: true
+ bestpath_med_missing_as_worst: true
+ bestpath_med_non_deterministic: true
+ cluster_id: 10.0.0.1
+ confederation_id: 99
+ disable_policy_batching: true
+ enforce_first_as: false
+ fast_external_fallover: false
+ flush_routes: true
+ graceful_restart_helper: true
+ graceful_restart_timers_restart: 130
+ graceful_restart_timers_stalepath_time: 310
+ isolate: '{{isolate|default(omit)}}'
+ log_neighbor_changes: true
+ maxas_limit: 50
+ neighbor_down_fib_accelerate: '{{neighbor_down_fib_accelerate|default(omit)}}'
+ reconnect_interval: '{{reconnect_interval|default(omit)}}'
+ shutdown: true
+ timer_bestpath_limit: 255
+ timer_bgp_hold: 110
+ timer_bgp_keepalive: 45
+ event_history_cli: size_medium
+ event_history_detail: size_large
+ event_history_events: size_medium
+ event_history_periodic: size_small
+ suppress_fib_pending: true
+ state: present
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp: *id005
+
+ - assert: *id004
+
+ - name: Remove BGP
+ register: result
+ cisco.nxos.nxos_bgp: *id002
+
+ - assert: *id003
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp: *id002
+
+ - assert: *id004
+
+ - name: Disable feature bgp
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+ rescue:
+
+ - name: Cleanup BGP
+ ignore_errors: true
+ cisco.nxos.nxos_bgp: *id002
+
+ - name: Disable feature bgp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+ always:
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_bgp sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/supp_fib.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/supp_fib.yaml
new file mode 100644
index 00000000..9fe8e643
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp/tests/common/supp_fib.yaml
@@ -0,0 +1,112 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
+
+- set_fact: bgp_best_path_limit="false"
+
+- set_fact: bgp_best_path_limit="true"
+ when: imagetag is not search("I2")
+
+- set_fact: bgp_suppress_fib_supported="false"
+
+- set_fact: bgp_suppress_fib_supported="true"
+ when: imagetag is not search("A8|D1|I2|I4")
+
+- name: Disable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- name: Enable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- block:
+
+ - name: set bestpath limit
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp: &id001
+ asn: 65535
+ vrf: '{{ item }}'
+ timer_bestpath_limit: 255
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: reset bestpath limit
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp: &id003
+ asn: 65535
+ vrf: '{{ item }}'
+ timer_bestpath_limit: default
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ when: bgp_best_path_limit
+ cisco.nxos.nxos_bgp: *id003
+
+ - assert: *id004
+ when: bgp_best_path_limit
+
+ - name: set suppress fib
+ register: result
+ cisco.nxos.nxos_bgp: &id005
+ asn: 65535
+ suppress_fib_pending: false
+
+ - assert: *id002
+ when: bgp_suppress_fib_supported
+
+ - name: Check Idempotence
+ register: result
+ when: bgp_suppress_fib_supported
+ cisco.nxos.nxos_bgp: *id005
+
+ - assert: *id004
+ when: bgp_suppress_fib_supported
+
+ - name: reset suppress fib
+ register: result
+ cisco.nxos.nxos_bgp: &id006
+ asn: 65535
+ suppress_fib_pending: true
+
+ - assert: *id002
+ when: bgp_suppress_fib_supported
+
+ - name: Check Idempotence
+ register: result
+ when: bgp_suppress_fib_supported
+ cisco.nxos.nxos_bgp: *id006
+
+ - assert: *id004
+ when: bgp_suppress_fib_supported
+ rescue:
+
+ - debug: msg="Tests can fail on I2/I4/A8/Fretta or helsinki images"
+ always:
+
+ - name: Disable feature bgp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/defaults/main.yaml
new file mode 100644
index 00000000..e69126b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/defaults/main.yaml
@@ -0,0 +1,5 @@
+---
+testcase: '*'
+vrfs:
+- default
+- myvrf
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tests/common/multisite.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tests/common/multisite.yaml
new file mode 100644
index 00000000..74dfff6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tests/common/multisite.yaml
@@ -0,0 +1,131 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bgp_af multisite sanity test"
+
+- name: Enable feature BGP - multisite
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- name: Enable feature nv overlay - multisite
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nv overlay
+ state: enabled
+
+- name: Setup - multisite
+ ignore_errors: true
+ cisco.nxos.nxos_bgp: &id012
+ asn: 65535
+ state: absent
+
+- name: Enable nv overlay evpn - multisite
+ when: platform is search('N9K')
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - nv overlay evpn
+
+- name: Enable multisite border gateway - multisite
+ ignore_errors: true
+ register: multiout
+ cisco.nxos.nxos_config:
+ lines:
+ - evpn multisite border-gateway 10
+
+- block:
+
+ - name: Configure BGP_AF Route Target Name
+ register: result
+ cisco.nxos.nxos_bgp_af: &id001
+ asn: 65535
+ afi: l2vpn
+ safi: evpn
+ state: present
+ retain_route_target: abc
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_af: *id001
+
+ - assert: &id003
+ that:
+ - result.changed == false
+
+ - name: Configure BGP_AF Route Target Default
+ register: result
+ cisco.nxos.nxos_bgp_af: &id004
+ asn: 65535
+ afi: l2vpn
+ safi: evpn
+ state: present
+ retain_route_target: default
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_af: *id004
+
+ - assert: *id003
+
+ - name: Configure BGP_AF 1 Route Target All
+ register: result
+ cisco.nxos.nxos_bgp_af: &id005
+ asn: 65535
+ afi: l2vpn
+ safi: evpn
+ state: present
+ retain_route_target: all
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_af: *id005
+
+ - assert: *id003
+
+ - name: Remove BGP - Route Target
+ register: result
+ cisco.nxos.nxos_bgp_af: &id006
+ asn: 65535
+ afi: l2vpn
+ safi: evpn
+ retain_route_target: all
+ state: absent
+
+ - assert: *id002
+
+ - name: Disable multisite border gateway - multisite
+ cisco.nxos.nxos_config:
+ lines:
+ - no evpn multisite border-gateway 10
+ when: multiout is not search("Invalid command")
+
+- name: Disable feature bgp - multisite
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- name: Disable feature nv overlay - multisite
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nv overlay
+ state: disabled
+
+- pause:
+ seconds: 5
+
+- name: Remove nv overlay evpn - multisite
+ when: platform is search('N9K')
+ cisco.nxos.nxos_config:
+ lines:
+ - no nv overlay evpn
+
+- debug: msg="END connection={{ ansible_connection }} nxos_bgp_af multisite sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tests/common/sanity.yaml
new file mode 100644
index 00000000..f013588b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_af/tests/common/sanity.yaml
@@ -0,0 +1,336 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bgp_af sanity test"
+
+- set_fact: advertise_l2vpn_evpn="true"
+ when: platform is search('N9K')
+
+- name: Enable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- name: Enable feature nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nv overlay
+ state: enabled
+
+- name: Setup
+ ignore_errors: true
+ cisco.nxos.nxos_bgp: &id012
+ asn: 65535
+ state: absent
+
+- block:
+
+ - name: Enable nv overlay evpn
+ when: platform is search('N9K')
+ cisco.nxos.nxos_config:
+ lines:
+ - nv overlay evpn
+
+ - name: Configure BGP_AF 1
+ register: result
+ cisco.nxos.nxos_bgp_af: &id001
+ asn: 65535
+ vrf: testing
+ afi: ipv4
+ safi: unicast
+ advertise_l2vpn_evpn: '{{advertise_l2vpn_evpn|default(omit)}}'
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_af: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Remove BGP
+ register: result
+ cisco.nxos.nxos_bgp_af:
+ asn: 65535
+ vrf: testing
+ afi: ipv4
+ safi: unicast
+ state: absent
+
+ - assert: *id002
+
+ - name: Configure BGP_AF 2
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: &id003
+ asn: 65535
+ vrf: '{{ item }}'
+ afi: ipv4
+ safi: unicast
+ dampening_state: true
+ additional_paths_install: true
+ additional_paths_receive: true
+ additional_paths_selection: RouteMap
+ additional_paths_send: true
+ client_to_client: false
+ default_information_originate: true
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: *id003
+
+ - assert: *id004
+
+ - name: Configure BGP_AF def2
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: &id005
+ asn: 65535
+ vrf: '{{ item }}'
+ afi: ipv4
+ safi: unicast
+ dampening_state: false
+ additional_paths_install: false
+ additional_paths_receive: false
+ additional_paths_selection: default
+ additional_paths_send: false
+ client_to_client: true
+ default_information_originate: false
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: *id005
+
+ - assert: *id004
+
+ - name: Remove BGP
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: &id008
+ asn: 65535
+ vrf: '{{ item }}'
+ afi: ipv4
+ safi: unicast
+ state: absent
+
+ - assert: *id002
+
+ - name: Configure BGP_AF 3
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: &id006
+ asn: 65535
+ vrf: '{{ item }}'
+ afi: ipv4
+ safi: unicast
+ dampening_routemap: abcd
+ default_metric: 50
+ distance_ebgp: 30
+ distance_ibgp: 60
+ distance_local: 90
+ maximum_paths: 9
+ maximum_paths_ibgp: 9
+ next_hop_route_map: RouteMap
+ suppress_inactive: true
+ table_map: RouteMap
+ table_map_filter: true
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: *id006
+
+ - assert: *id004
+
+ - name: Configure BGP_AF def3
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: &id007
+ asn: 65535
+ vrf: '{{ item }}'
+ afi: ipv4
+ safi: unicast
+ dampening_routemap: default
+ default_metric: default
+ distance_ebgp: default
+ distance_ibgp: default
+ distance_local: default
+ maximum_paths: default
+ maximum_paths_ibgp: default
+ next_hop_route_map: default
+ suppress_inactive: false
+ table_map: default
+ table_map_filter: false
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: *id007
+
+ - assert: *id004
+
+ - name: Remove BGP
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: *id008
+
+ - assert: *id002
+
+ - name: Configure BGP_AF 4
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: &id009
+ asn: 65535
+ vrf: '{{ item }}'
+ afi: ipv4
+ safi: unicast
+ dampen_igp_metric: 200
+ dampening_half_time: 1
+ dampening_max_suppress_time: 4
+ dampening_reuse_time: 2
+ dampening_suppress_time: 3
+ inject_map: [
+ [lax_inject_map, lax_exist_map],
+ [nyc_inject_map, nyc_exist_map, copy-attributes],
+ [fsd_inject_map, fsd_exist_map]
+ ]
+ networks: [
+ [10.0.0.0/16, routemap_LA],
+ [192.168.1.1/32, Chicago],
+ [192.168.2.0/24],
+ [192.168.3.0/24, routemap_NYC]
+ ]
+ redistribute: [
+ [direct, rm_direct],
+ [lisp, rm_lisp]
+ ]
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: *id009
+
+ - assert: *id004
+
+ - name: Configure BGP_AF 5
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: &id010
+ asn: 65535
+ vrf: '{{ item }}'
+ afi: ipv4
+ safi: unicast
+ dampen_igp_metric: 300
+ dampening_half_time: 10
+ dampening_max_suppress_time: 40
+ dampening_reuse_time: 20
+ dampening_suppress_time: 30
+ inject_map: [
+ [fsd_inject_map, fsd_exist_map]
+ ]
+ networks: [
+ [192.168.2.0/24]
+ ]
+ redistribute: [
+ [lisp, rm_lisp]
+ ]
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: *id010
+
+ - assert: *id004
+
+ - name: Configure BGP_AF def5
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: &id011
+ asn: 65535
+ vrf: '{{ item }}'
+ afi: ipv4
+ safi: unicast
+ dampen_igp_metric: default
+ dampening_half_time: default
+ dampening_max_suppress_time: default
+ dampening_reuse_time: default
+ dampening_suppress_time: default
+ inject_map: default
+ networks: default
+ redistribute: default
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: *id011
+
+ - assert: *id004
+
+ - name: Remove BGP
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: *id008
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_af: *id008
+
+ - assert: *id004
+ rescue:
+
+ - name: Cleanup BGP
+ ignore_errors: true
+ cisco.nxos.nxos_bgp: *id012
+ always:
+
+ - name: Disable feature bgp
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+ - name: Disable feature nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nv overlay
+ state: disabled
+
+ - pause:
+ seconds: 5
+
+ - name: Remove nv overlay evpn
+ when: platform is search('N9K')
+ cisco.nxos.nxos_config:
+ lines:
+ - no nv overlay evpn
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_bgp_af sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/meta/main.yml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/meta/main.yml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tasks/cli.yaml
new file mode 100644
index 00000000..073787b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tasks/main.yaml
new file mode 100644
index 00000000..6b13ac86
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tasks/main.yaml
@@ -0,0 +1,32 @@
+---
+- name: Enable BGP feature
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+
+- name: Enable fabric forwarding
+ cisco.nxos.nxos_config:
+ lines: feature fabric forwarding
+
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
+
+ always:
+ - name: Disable BGP feature
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+
+ - name: Disable fabric forwarding
+ cisco.nxos.nxos_config:
+ lines: no feature fabric forwarding
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tasks/nxapi.yaml
new file mode 100644
index 00000000..e6144de9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..e37bd0e2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/_populate_config.yaml
@@ -0,0 +1,63 @@
+- name: "Setup - 1"
+ cisco.nxos.nxos_config:
+ lines:
+ - "router bgp 65536"
+ - "bestpath as-path multipath-relax"
+ - "bestpath compare-neighborid"
+ - "bestpath cost-community ignore"
+ - "confederation identifier 42"
+ - "log-neighbor-changes"
+ - "maxas-limit 20"
+ - "neighbor-down fib-accelerate"
+ - "router-id 198.51.100.2"
+ - "confederation peers 65020 65030 65040"
+ - "neighbor 198.51.100.20"
+ - " remote-as 65537"
+ - " affinity-group 160"
+ - " description NBR-1"
+ - " low-memory exempt"
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+
+- name: "Setup - 2"
+ cisco.nxos.nxos_config:
+ lines:
+ - "neighbor 198.51.100.21"
+ - " remote-as 65537"
+ - " password 7 12090404011C03162E"
+ - "vrf site-2"
+ - " local-as 300"
+ - " log-neighbor-changes"
+ - " neighbor-down fib-accelerate"
+ - " neighbor 203.0.113.2"
+ - " remote-as 65539"
+ - " description site-2-nbr-1"
+ - " password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6"
+ parents: "router bgp 65536"
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+
+- name: "Setup - 3"
+ cisco.nxos.nxos_config:
+ lines:
+ - "vrf site-1"
+ - " local-as 200"
+ - " log-neighbor-changes"
+ - " neighbor 192.0.2.10"
+ - " remote-as 65538"
+ - " description site-1-nbr-1"
+ - " password 3 13D4D3549493D2877B1DC116EE27A6BE"
+ parents: "router bgp 65536"
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+
+- name: "Setup - 3"
+ cisco.nxos.nxos_config:
+ lines:
+ - "vrf site-1"
+ - " neighbor 192.0.2.11"
+ - " remote-as 65538"
+ - " description site-1-nbr-2"
+ parents: "router bgp 65536"
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..a10dc96b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/_remove_config.yaml
@@ -0,0 +1,7 @@
+- name: Remove pre-existing BGP configurations
+ cisco.nxos.nxos_config:
+ lines:
+ - no router bgp 65536
+ ignore_errors: True
+ vars:
+ ansible_connection: ansible.netcommon.network_cli \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/deleted.yaml
new file mode 100644
index 00000000..bcf3cb69
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/deleted.yaml
@@ -0,0 +1,45 @@
+---
+- debug:
+ msg: Start nxos_bgp_global deleted integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Delete BGP configs handled by this module
+ cisco.nxos.nxos_bgp_global: &id003
+ state: deleted
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - merged['after'] == result['before']
+
+ - debug:
+ msg: "{{ result['commands'] | symmetric_difference(deleted['commands']) }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ result['commands'] | symmetric_difference(deleted['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - deleted['after'] == result['after']
+
+ - name: Delete BGP configs handled by this module (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_bgp_global: *id003
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/deleted_af.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/deleted_af.yaml
new file mode 100644
index 00000000..c2d4125f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/deleted_af.yaml
@@ -0,0 +1,115 @@
+---
+- debug:
+ msg: Start nxos_bgp_global deleted_af integration tests connection={{ ansible_connection}}
+
+- name: Remove pre-existing BGP configurations
+ cisco.nxos.nxos_config: &remove
+ lines:
+ - no router bgp 65536
+ ignore_errors: True
+
+- name: "Setup - 1 (Add neighbor with AF config)"
+ cisco.nxos.nxos_config:
+ lines:
+ - "router bgp 65536"
+ - "log-neighbor-changes"
+ - "maxas-limit 20"
+ - "router-id 198.51.100.2"
+ - "neighbor 203.0.113.2"
+ - " address-family ipv4 unicast"
+ - " next-hop-self"
+ - " remote-as 65538"
+ - " affinity-group 160"
+ - " description NBR-1"
+ - " low-memory exempt"
+ - "neighbor 192.0.2.1"
+ - " remote-as 65537"
+ - " password 7 12090404011C03162E"
+
+- block:
+ - name: Remove a neighbor having AF configurations (should fail)
+ cisco.nxos.nxos_bgp_global: &deleted
+ state: deleted
+ register: result
+ ignore_errors: True
+
+ - name: Assert that the task failed
+ assert:
+ that:
+ - result.failed == True
+ - "'Neighbor 203.0.113.2 has address-family configurations. Please use the nxos_bgp_neighbor_af module to remove those first.' in result.msg"
+
+ - name: Remove pre-existing BGP configurations
+ cisco.nxos.nxos_config: *remove
+ ignore_errors: True
+
+ - name: "Setup - 2 (Add neighbor with AF config under a VRF)"
+ cisco.nxos.nxos_config:
+ lines:
+ - "router bgp 65536"
+ - "log-neighbor-changes"
+ - "maxas-limit 20"
+ - "router-id 198.51.100.2"
+ - "neighbor 192.0.2.1"
+ - " remote-as 65537"
+ - " password 7 12090404011C03162E"
+ - "vrf site-1"
+ - " neighbor 203.0.113.2"
+ - " address-family ipv4 unicast"
+ - " next-hop-self"
+ - " remote-as 65538"
+ - " affinity-group 160"
+ - " description NBR-1"
+ - " low-memory exempt"
+ - " neighbor-down fib-accelerate"
+
+ - name: Remove a neighbor under a VRF having AF configurations (should fail)
+ cisco.nxos.nxos_bgp_global: *deleted
+ register: result
+ ignore_errors: True
+
+ - name: Assert that the task failed
+ assert:
+ that:
+ - result.failed == True
+ - "'VRF site-1 has address-family configurations. Please use the nxos_bgp_af module to remove those first.' in result.msg"
+
+ - name: Remove pre-existing BGP configurations
+ cisco.nxos.nxos_config: *remove
+ ignore_errors: True
+
+ - name: "Setup - 3 (Add a VRF with AF config)"
+ cisco.nxos.nxos_config:
+ lines:
+ - "router bgp 65536"
+ - "log-neighbor-changes"
+ - "maxas-limit 20"
+ - "router-id 198.51.100.2"
+ - "neighbor 192.0.2.1"
+ - " remote-as 65537"
+ - " password 7 12090404011C03162E"
+ - "vrf site-1"
+ - " address-family ipv4 unicast"
+ - " default-information originate"
+ - " neighbor 203.0.113.2"
+ - " remote-as 65538"
+ - " affinity-group 160"
+ - " description NBR-1"
+ - " low-memory exempt"
+ - "vrf site-2"
+ - " neighbor-down fib-accelerate"
+
+ - name: Remove a neighbor under a VRF having AF configurations (should fail)
+ cisco.nxos.nxos_bgp_global: *deleted
+ register: result
+ ignore_errors: True
+
+ - name: Assert that the task failed
+ assert:
+ that:
+ - result.failed == True
+ - "'VRF site-1 has address-family configurations. Please use the nxos_bgp_af module to remove those first.' in result.msg"
+
+ always:
+ - name: Remove pre-existing BGP configurations
+ cisco.nxos.nxos_config: *remove
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/empty_config.yaml
new file mode 100644
index 00000000..345be09c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/empty_config.yaml
@@ -0,0 +1,50 @@
+---
+- debug:
+ msg: START nxos_bgp_global empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_bgp_global:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_bgp_global:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_bgp_global:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_bgp_global:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_bgp_global empty_config integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/fixtures/parsed.cfg
new file mode 100644
index 00000000..8a39b241
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/fixtures/parsed.cfg
@@ -0,0 +1,36 @@
+router bgp 65536
+ router-id 198.51.100.2
+ confederation identifier 42
+ confederation peers 65020 65030 65040
+ bestpath as-path multipath-relax
+ bestpath cost-community ignore
+ bestpath compare-neighborid
+ neighbor-down fib-accelerate
+ maxas-limit 20
+ log-neighbor-changes
+ neighbor 198.51.100.20
+ low-memory exempt
+ remote-as 65537
+ description NBR-1
+ affinity-group 160
+ neighbor 198.51.100.21
+ remote-as 65537
+ password 7 12090404011C03162E
+ vrf site-1
+ local-as 200
+ log-neighbor-changes
+ neighbor 192.0.2.10
+ remote-as 65538
+ description site-1-nbr-1
+ password 3 13D4D3549493D2877B1DC116EE27A6BE
+ neighbor 192.0.2.11
+ remote-as 65538
+ description site-1-nbr-2
+ vrf site-2
+ local-as 300
+ neighbor-down fib-accelerate
+ log-neighbor-changes
+ neighbor 203.0.113.2
+ remote-as 65539
+ description site-2-nbr-1
+ password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/gathered.yaml
new file mode 100644
index 00000000..01fdc8c6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/gathered.yaml
@@ -0,0 +1,20 @@
+---
+- debug:
+ msg: START nxos_bgp_global gathered integration tests on connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Gather BGP facts using gathered
+ register: result
+ cisco.nxos.nxos_bgp_global:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: merged['after'] == result['gathered']
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/merged.yaml
new file mode 100644
index 00000000..a172b228
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/merged.yaml
@@ -0,0 +1,95 @@
+---
+- debug:
+ msg: Start nxos_bgp_global merged integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ - name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_bgp_global: &id001
+ config:
+ as_number: 65536
+ router_id: 198.51.100.2
+ bestpath:
+ as_path:
+ multipath_relax: True
+ compare_neighborid: True
+ cost_community_ignore: True
+ confederation:
+ identifier: 42
+ peers:
+ - 65020
+ - 65030
+ - 65040
+ log_neighbor_changes: True
+ maxas_limit: 20
+ neighbors:
+ - neighbor_address: 198.51.100.20
+ neighbor_affinity_group:
+ group_id: 160
+ remote_as: 65537
+ description: NBR-1
+ low_memory:
+ exempt: True
+ - neighbor_address: 198.51.100.21
+ remote_as: 65537
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ neighbor_down:
+ fib_accelerate: True
+ vrfs:
+ - vrf: site-1
+ local_as: 200
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 192.0.2.10
+ description: site-1-nbr-1
+ password:
+ encryption: 3
+ key: 13D4D3549493D2877B1DC116EE27A6BE
+ remote_as: 65538
+ - neighbor_address: 192.0.2.11
+ remote_as: 65538
+ description: site-1-nbr-2
+ - vrf: site-2
+ local_as: 300
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 203.0.113.2
+ description: site-2-nbr-1
+ password:
+ encryption: 3
+ key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+ remote_as: 65539
+ neighbor_down:
+ fib_accelerate: True
+ register: result
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ result['before'] == {} }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts were correctly generated
+ assert:
+ that:
+ - merged['after'] == result['after']
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ cisco.nxos.nxos_bgp_global: *id001
+ register: result
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/parsed.yaml
new file mode 100644
index 00000000..d0fb2842
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/parsed.yaml
@@ -0,0 +1,14 @@
+---
+- debug:
+ msg: START nxos_bgp_global parsed integration tests on connection={{ ansible_connection }}
+
+- name: Parse externally provided BGP config
+ register: result
+ cisco.nxos.nxos_bgp_global:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - merged['after'] == result['parsed']
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/purged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/purged.yaml
new file mode 100644
index 00000000..86655f5a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/purged.yaml
@@ -0,0 +1,42 @@
+---
+- debug:
+ msg: Start nxos_bgp_global purged integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Delete all BGP config from the device
+ cisco.nxos.nxos_bgp_global: &id003
+ state: purged
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - merged['after'] == result['before']
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "'no router bgp 65536' in result.commands"
+ - result.commands|length == 1
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - result['after'] == {}
+
+ - name: Delete all BGP config from the device (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_bgp_global: *id003
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/rendered.yaml
new file mode 100644
index 00000000..0b63120e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/rendered.yaml
@@ -0,0 +1,80 @@
+---
+- debug:
+ msg: START nxos_bgp_global rendered integration tests on connection={{ ansible_connection }}
+
+- name: Render platform specific configuration lines with state rendered (without connecting to the device)
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65536
+ router_id: 198.51.100.2
+ bestpath:
+ as_path:
+ multipath_relax: True
+ compare_neighborid: True
+ cost_community_ignore: True
+ confederation:
+ identifier: 42
+ peers:
+ - 65020
+ - 65030
+ - 65040
+ log_neighbor_changes: True
+ maxas_limit: 20
+ neighbors:
+ - neighbor_address: 198.51.100.20
+ neighbor_affinity_group:
+ group_id: 160
+ remote_as: 65537
+ description: NBR-1
+ low_memory:
+ exempt: True
+ - neighbor_address: 198.51.100.21
+ remote_as: 65537
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ neighbor_down:
+ fib_accelerate: True
+ vrfs:
+ - vrf: site-1
+ local_as: 200
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 192.0.2.10
+ description: site-1-nbr-1
+ password:
+ encryption: 3
+ key: 13D4D3549493D2877B1DC116EE27A6BE
+ remote_as: 65538
+ - neighbor_address: 192.0.2.11
+ remote_as: 65538
+ description: site-1-nbr-2
+ - vrf: site-2
+ local_as: 300
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 203.0.113.2
+ description: site-2-nbr-1
+ password:
+ encryption: 3
+ key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+ remote_as: 65539
+ neighbor_down:
+ fib_accelerate: True
+ state: rendered
+ register: result
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - merged['commands'] == result['rendered']
+
+- name: Gather BGP facts
+ cisco.nxos.nxos_bgp_global:
+ state: gathered
+ register: result
+
+- name: Ensure that no configuration changes were made
+ assert:
+ that:
+ - result.gathered == {}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/replaced.yaml
new file mode 100644
index 00000000..5eda5d29
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/replaced.yaml
@@ -0,0 +1,81 @@
+---
+- debug:
+ msg: Start nxos_bgp_global replaced integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Replace BGP configuration with provided configuration
+ cisco.nxos.nxos_bgp_global: &id002
+ config:
+ as_number: 65536
+ router_id: 198.51.100.2
+ bestpath:
+ compare_neighborid: True
+ cost_community_ignore: True
+ confederation:
+ identifier: 42
+ peers:
+ - 65020
+ - 65030
+ - 65050
+ maxas_limit: 40
+ neighbors:
+ - neighbor_address: 198.51.100.20
+ neighbor_affinity_group:
+ group_id: 160
+ remote_as: 65537
+ description: NBR-1
+ low_memory:
+ exempt: True
+ neighbor_down:
+ fib_accelerate: True
+ vrfs:
+ - vrf: site-2
+ local_as: 300
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 203.0.113.2
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ neighbor_down:
+ fib_accelerate: True
+ state: replaced
+ register: result
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - replaced['after'] == result['after']
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - merged['after'] == result['before']
+
+ - name: Replace device configurations of listed OSPF processes with provided configurarions
+ (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_bgp_global: *id002
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - replaced['after'] == result['before']
+ always:
+ - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/replaced_af.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/replaced_af.yaml
new file mode 100644
index 00000000..da51a8ac
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/tests/common/replaced_af.yaml
@@ -0,0 +1,158 @@
+---
+- debug:
+ msg: Start nxos_bgp_global replaced_af integration tests connection={{ ansible_connection}}
+
+- name: Remove pre-existing BGP configurations
+ cisco.nxos.nxos_config: &remove
+ lines:
+ - no router bgp 65536
+ ignore_errors: True
+
+- name: "Setup - 1 (Add neighbor with AF config)"
+ cisco.nxos.nxos_config:
+ lines:
+ - "router bgp 65536"
+ - "log-neighbor-changes"
+ - "maxas-limit 20"
+ - "router-id 198.51.100.2"
+ - "neighbor 203.0.113.2"
+ - " address-family ipv4 unicast"
+ - " next-hop-self"
+ - " remote-as 65538"
+ - " affinity-group 160"
+ - " description NBR-1"
+ - " low-memory exempt"
+ - "neighbor 192.0.2.1"
+ - " remote-as 65537"
+ - " password 7 12090404011C03162E"
+
+- block:
+ - name: Remove a neighbor having AF configurations (should fail)
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65536
+ router_id: 198.51.100.2
+ maxas_limit: 20
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 192.0.2.1
+ remote_as: 65537
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ state: replaced
+ register: result
+ ignore_errors: True
+
+ - name: Assert that the task failed
+ assert:
+ that:
+ - result.failed == True
+ - "'Neighbor 203.0.113.2 has address-family configurations. Please use the nxos_bgp_neighbor_af module to remove those first.' in result.msg"
+
+ - name: Remove pre-existing BGP configurations
+ cisco.nxos.nxos_config: *remove
+ ignore_errors: True
+
+ - name: "Setup - 2 (Add neighbor with AF config under a VRF)"
+ cisco.nxos.nxos_config:
+ lines:
+ - "router bgp 65536"
+ - "log-neighbor-changes"
+ - "maxas-limit 20"
+ - "router-id 198.51.100.2"
+ - "neighbor 192.0.2.1"
+ - " remote-as 65537"
+ - " password 7 12090404011C03162E"
+ - "vrf site-1"
+ - " neighbor 203.0.113.2"
+ - " address-family ipv4 unicast"
+ - " next-hop-self"
+ - " remote-as 65538"
+ - " affinity-group 160"
+ - " description NBR-1"
+ - " low-memory exempt"
+ - " neighbor-down fib-accelerate"
+
+ - name: Remove a neighbor under a VRF having AF configurations (should fail)
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65536
+ router_id: 198.51.100.2
+ maxas_limit: 20
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 192.0.2.1
+ remote_as: 65537
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ vrfs:
+ - vrf: site-1
+ neighbor_down:
+ fib_accelerate: True
+ state: replaced
+ register: result
+ ignore_errors: True
+
+ - name: Assert that the task failed
+ assert:
+ that:
+ - result.failed == True
+ - "'Neighbor 203.0.113.2 has address-family configurations. Please use the nxos_bgp_neighbor_af module to remove those first.' in result.msg"
+
+ - name: Remove pre-existing BGP configurations
+ cisco.nxos.nxos_config: *remove
+ ignore_errors: True
+
+ - name: "Setup - 3 (Add a VRF with AF config)"
+ cisco.nxos.nxos_config:
+ lines:
+ - "router bgp 65536"
+ - "log-neighbor-changes"
+ - "maxas-limit 20"
+ - "router-id 198.51.100.2"
+ - "neighbor 192.0.2.1"
+ - " remote-as 65537"
+ - " password 7 12090404011C03162E"
+ - "vrf site-1"
+ - " address-family ipv4 unicast"
+ - " default-information originate"
+ - " neighbor 203.0.113.2"
+ - " remote-as 65538"
+ - " affinity-group 160"
+ - " description NBR-1"
+ - " low-memory exempt"
+ - "vrf site-2"
+ - " neighbor-down fib-accelerate"
+
+ - name: Remove a VRF having AF configurations (should fail)
+ cisco.nxos.nxos_bgp_global:
+ config:
+ as_number: 65536
+ router_id: 198.51.100.2
+ maxas_limit: 20
+ log_neighbor_changes: True
+ neighbors:
+ - neighbor_address: 192.0.2.1
+ remote_as: 65537
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ vrfs:
+ - vrf: site-2
+ neighbor_down:
+ fib_accelerate: True
+ state: replaced
+ register: result
+ ignore_errors: True
+
+ - name: Assert that the task failed
+ assert:
+ that:
+ - result.failed == True
+ - "'VRF site-1 has address-family configurations. Please use the nxos_bgp_af module to remove those first.' in result.msg"
+
+ always:
+ - name: Remove pre-existing BGP configurations
+ cisco.nxos.nxos_config: *remove
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/vars/main.yml
new file mode 100644
index 00000000..463ba3b8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_global/vars/main.yml
@@ -0,0 +1,168 @@
+---
+merged:
+ commands:
+ - router bgp 65536
+ - bestpath as-path multipath-relax
+ - bestpath compare-neighborid
+ - bestpath cost-community ignore
+ - confederation identifier 42
+ - log-neighbor-changes
+ - maxas-limit 20
+ - neighbor-down fib-accelerate
+ - router-id 198.51.100.2
+ - confederation peers 65020 65030 65040
+ - neighbor 198.51.100.20
+ - remote-as 65537
+ - affinity-group 160
+ - description NBR-1
+ - low-memory exempt
+ - neighbor 198.51.100.21
+ - remote-as 65537
+ - password 7 12090404011C03162E
+ - vrf site-1
+ - local-as 200
+ - log-neighbor-changes
+ - neighbor 192.0.2.10
+ - remote-as 65538
+ - description site-1-nbr-1
+ - password 3 13D4D3549493D2877B1DC116EE27A6BE
+ - neighbor 192.0.2.11
+ - remote-as 65538
+ - description site-1-nbr-2
+ - vrf site-2
+ - local-as 300
+ - log-neighbor-changes
+ - neighbor-down fib-accelerate
+ - neighbor 203.0.113.2
+ - remote-as 65539
+ - description site-2-nbr-1
+ - password 3 AF92F4C16A0A0EC5BDF56CF58BC030F6
+
+ after:
+ as_number: '65536'
+ bestpath:
+ as_path:
+ multipath_relax: true
+ compare_neighborid: true
+ cost_community_ignore: true
+ confederation:
+ identifier: '42'
+ peers:
+ - '65020'
+ - '65030'
+ - '65040'
+ log_neighbor_changes: true
+ maxas_limit: 20
+ neighbor_down:
+ fib_accelerate: true
+ neighbors:
+ - description: NBR-1
+ low_memory:
+ exempt: true
+ neighbor_address: 198.51.100.20
+ neighbor_affinity_group:
+ group_id: 160
+ remote_as: '65537'
+ - neighbor_address: 198.51.100.21
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ remote_as: '65537'
+ router_id: 198.51.100.2
+ vrfs:
+ - local_as: '200'
+ log_neighbor_changes: true
+ neighbors:
+ - description: site-1-nbr-1
+ neighbor_address: 192.0.2.10
+ password:
+ encryption: 3
+ key: 13D4D3549493D2877B1DC116EE27A6BE
+ remote_as: '65538'
+ - description: site-1-nbr-2
+ neighbor_address: 192.0.2.11
+ remote_as: '65538'
+ vrf: site-1
+ - local_as: '300'
+ log_neighbor_changes: true
+ neighbor_down:
+ fib_accelerate: true
+ neighbors:
+ - description: site-2-nbr-1
+ neighbor_address: 203.0.113.2
+ password:
+ encryption: 3
+ key: AF92F4C16A0A0EC5BDF56CF58BC030F6
+ remote_as: '65539'
+ vrf: site-2
+
+replaced:
+ commands:
+ - router bgp 65536
+ - no bestpath as-path multipath-relax
+ - no log-neighbor-changes
+ - maxas-limit 40
+ - no confederation peers 65020 65030 65040
+ - confederation peers 65020 65030 65050
+ - no neighbor 198.51.100.21
+ - vrf site-2
+ - neighbor 203.0.113.2
+ - no remote-as 65539
+ - no description site-2-nbr-1
+ - password 7 12090404011C03162E
+ - no vrf site-1
+
+ after:
+ as_number: '65536'
+ bestpath:
+ compare_neighborid: true
+ cost_community_ignore: true
+ confederation:
+ identifier: '42'
+ peers:
+ - '65020'
+ - '65030'
+ - '65050'
+ maxas_limit: 40
+ neighbor_down:
+ fib_accelerate: true
+ neighbors:
+ - description: NBR-1
+ low_memory:
+ exempt: true
+ neighbor_address: 198.51.100.20
+ neighbor_affinity_group:
+ group_id: 160
+ remote_as: '65537'
+ router_id: 198.51.100.2
+ vrfs:
+ - local_as: '300'
+ log_neighbor_changes: true
+ neighbor_down:
+ fib_accelerate: true
+ neighbors:
+ - neighbor_address: 203.0.113.2
+ password:
+ encryption: 7
+ key: 12090404011C03162E
+ vrf: site-2
+
+deleted:
+ commands:
+ - router bgp 65536
+ - no bestpath as-path multipath-relax
+ - no bestpath compare-neighborid
+ - no bestpath cost-community ignore
+ - no confederation identifier 42
+ - no log-neighbor-changes
+ - no maxas-limit 20
+ - no neighbor-down fib-accelerate
+ - no router-id 198.51.100.2
+ - no confederation peers 65020 65030 65040
+ - no neighbor 198.51.100.20
+ - no neighbor 198.51.100.21
+ - no vrf site-1
+ - no vrf site-2
+
+ after:
+ as_number: '65536'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/defaults/main.yaml
new file mode 100644
index 00000000..e69126b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/defaults/main.yaml
@@ -0,0 +1,5 @@
+---
+testcase: '*'
+vrfs:
+- default
+- myvrf
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tests/common/multisite.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tests/common/multisite.yaml
new file mode 100644
index 00000000..5256646b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tests/common/multisite.yaml
@@ -0,0 +1,119 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bgp_neighbor multisite sanity
+ test"
+
+- set_fact: intname="{{ nxos_int1 }}"
+
+- name: 'Setup: Disable features - multisite'
+ loop:
+ - bgp
+ - bfd
+ - nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: disabled
+
+- name: 'Setup: Enable features - multisite'
+ loop:
+ - bgp
+ - bfd
+ - nv overlay
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: enabled
+
+- name: Enable nv overlay evpn - multisite
+ when: platform is search('N9K')
+ cisco.nxos.nxos_config:
+ lines:
+ - nv overlay evpn
+
+- name: Enable multisite border gateway - multisite
+ ignore_errors: true
+ register: multiout
+ cisco.nxos.nxos_config:
+ lines:
+ - evpn multisite border-gateway 10
+
+- block:
+
+ - name: Configure BGP neighbor1 - multisite
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id001
+ asn: 65535
+ neighbor: 192.0.2.3/32
+ remote_as: 33.22
+ description: just a description
+ shutdown: true
+ state: present
+ peer_type: fabric_border_leaf
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id001
+
+ - assert: &id003
+ that:
+ - result.changed == false
+
+ - name: Configure BGP neighbor2 - multisite
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id004
+ asn: 65535
+ neighbor: 192.0.2.3/32
+ peer_type: disable
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id004
+
+ - assert: *id003
+
+ - name: Configure BGP neighbor3 - multisite
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id005
+ asn: 65535
+ neighbor: 192.0.2.3/32
+ peer_type: fabric_external
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id005
+
+ - assert: *id003
+
+ - name: Disable multisite border gateway - multisite
+ cisco.nxos.nxos_config:
+ lines:
+ - no evpn multisite border-gateway 10
+ when: multiout is not search("Invalid command")
+
+- name: 'Teardown: Disable features'
+ loop:
+ - bgp
+ - bfd
+ - nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: disabled
+
+- pause:
+ seconds: 5
+
+- name: Remove nv overlay evpn - multisite
+ when: platform is search('N9K')
+ cisco.nxos.nxos_config:
+ lines:
+ - no nv overlay evpn
+
+- debug: msg="END connection={{ ansible_connection }} nxos_bgp_neighbor multisite sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tests/common/sanity.yaml
new file mode 100644
index 00000000..541f3dc1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor/tests/common/sanity.yaml
@@ -0,0 +1,350 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bgp_neighbor sanity
+ test"
+
+- set_fact: intname="{{ nxos_int1 }}"
+
+- set_fact: log_neighbor_changese="enable"
+ when: (imagetag and (imagetag is version_compare('D1', 'ne')) and (imagetag is
+ version_compare('N1', 'ne')))
+
+- set_fact: log_neighbor_changesd="disable"
+ when: (imagetag and (imagetag is version_compare('D1', 'ne')) and (imagetag is
+ version_compare('N1', 'ne')))
+
+- debug:
+ var: titanium
+
+- set_fact: remove_private_asa="all"
+ when: not titanium
+
+- set_fact: remove_private_asr="replace-as"
+ when: not titanium
+
+- name: 'Setup: Disable features'
+ loop:
+ - bgp
+ - bfd
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: disabled
+
+- name: 'Setup: Enable features'
+ loop:
+ - bgp
+ - bfd
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: enabled
+
+- block:
+
+ - name: Configure BGP neighbor1
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id001
+ asn: 65535
+ neighbor: 192.0.2.3/32
+ vrf: '{{ item }}'
+ connected_check: true
+ capability_negotiation: true
+ dynamic_capability: true
+ ebgp_multihop: 2
+ low_memory_exempt: true
+ maximum_peers: 10
+ suppress_4_byte_as: true
+ timers_keepalive: 90
+ timers_holdtime: 270
+ log_neighbor_changes: '{{log_neighbor_changese|default(omit)}}'
+ local_as: 22.33
+ remote_as: 33.22
+ description: just a description
+ update_source: '{{ intname.capitalize() }}'
+ shutdown: true
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure BGP neighbor2
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id003
+ asn: 65535
+ neighbor: 192.0.2.3/32
+ vrf: '{{ item }}'
+ connected_check: false
+ capability_negotiation: false
+ dynamic_capability: false
+ ebgp_multihop: default
+ low_memory_exempt: false
+ maximum_peers: default
+ suppress_4_byte_as: false
+ timers_keepalive: default
+ timers_holdtime: default
+ log_neighbor_changes: '{{log_neighbor_changesd|default(omit)}}'
+ local_as: default
+ remote_as: default
+ description: default
+ update_source: default
+ shutdown: false
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id003
+
+ - assert: *id004
+
+ - name: Remove BGP
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id005
+ asn: 65535
+ neighbor: 192.0.2.3/32
+ vrf: '{{ item }}'
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id005
+
+ - assert: *id004
+
+ - name: Configure BGP neighbor3
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id006
+ asn: 65535
+ neighbor: 192.0.2.3/32
+ vrf: '{{ item }}'
+ description: tested by ansible
+ remove_private_as: '{{remove_private_asa|default(omit)}}'
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id006
+
+ - assert: *id004
+
+ - name: Configure BGP neighbor4
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id007
+ asn: 65535
+ neighbor: 192.0.2.3/32
+ vrf: '{{ item }}'
+ description: tested by ansible
+ remove_private_as: '{{remove_private_asr|default(omit)}}'
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id007
+
+ - assert: *id004
+
+ - name: Remove BGP
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id005
+
+ - assert: *id002
+
+ - name: Configure BGP neighbor 3des password
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id008
+ asn: 65535
+ neighbor: 192.0.2.3/32
+ vrf: '{{ item }}'
+ remote_as: 30
+ pwd: 386c0565965f89de
+ pwd_type: 3des
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id008
+
+ - assert: *id004
+
+ - name: Remove BGP
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id005
+
+ - assert: *id002
+
+ - name: Configure BGP neighbor type 7 password
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id009
+ asn: 65535
+ neighbor: 192.0.2.3/32
+ vrf: '{{ item }}'
+ remote_as: 30
+ pwd: 386c0565965f89de
+ pwd_type: cisco_type_7
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id009
+
+ - assert: *id004
+
+ - name: Remove BGP neighbor password
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id010
+ asn: 65535
+ neighbor: 192.0.2.3/32
+ vrf: '{{ item }}'
+ remote_as: 30
+ pwd: default
+ pwd_type: default
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id010
+
+ - assert: *id004
+
+ - name: Remove BGP
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id005
+
+ - assert: *id002
+
+ - name: Configure BGP neighbor transport type passive
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id011
+ asn: 65535
+ neighbor: 192.0.2.3
+ vrf: '{{ item }}'
+ remote_as: 30
+ transport_passive_only: true
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id011
+
+ - assert: *id004
+
+ - name: Configure BGP neighbor transport type default
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id012
+ asn: 65535
+ neighbor: 192.0.2.3
+ vrf: '{{ item }}'
+ remote_as: 30
+ transport_passive_only: false
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id012
+
+ - assert: *id004
+
+ - name: Remove BGP
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id013
+ asn: 65535
+ neighbor: 192.0.2.3
+ vrf: '{{ item }}'
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id013
+
+ - assert: *id004
+
+ - name: Configure BFD enable
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id014
+ asn: 65535
+ neighbor: 192.168.1.1
+ bfd: enable
+ state: present
+
+ - assert: *id002
+
+ - name: Check BFD enable Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id014
+
+ - assert: *id004
+
+ - name: Configure BFD disable Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: &id015
+ asn: 65535
+ neighbor: 192.168.1.1
+ bfd: disable
+ state: present
+
+ - assert: *id002
+
+ - name: Check BFD disable Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor: *id015
+
+ - assert: *id004
+ always:
+
+ - name: 'Teardown: Disable features'
+ loop:
+ - bgp
+ - bfd
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_bgp_neighbor sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tests/common/multisite.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tests/common/multisite.yaml
new file mode 100644
index 00000000..36e13389
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tests/common/multisite.yaml
@@ -0,0 +1,116 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bgp_neighbor_af multisite
+ sanity test"
+
+- set_fact: soft_reconfiguration_ina="always"
+ when: imagetag is not search("D1|N1")
+
+- name: Disable feature BGP - multisite
+ ignore_errors: true
+ cisco.nxos.nxos_feature: &id013
+ feature: bgp
+ state: disabled
+
+- name: Enable feature BGP - multisite
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- name: Enable feature nv overlay - multisite
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nv overlay
+ state: enabled
+
+- name: Enable nv overlay evpn - multisite
+ when: platform is search('N9K')
+ cisco.nxos.nxos_config:
+ lines:
+ - nv overlay evpn
+
+- name: Enable multisite border gateway - multisite
+ ignore_errors: true
+ register: multiout
+ cisco.nxos.nxos_config:
+ lines:
+ - evpn multisite border-gateway 10
+
+- block:
+
+ - name: Configure eBGP - multisite
+ cisco.nxos.nxos_bgp_neighbor:
+ asn: 65535
+ neighbor: 192.0.2.3
+ remote_as: 2
+
+ - name: Configure BGP neighbor - multisite
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: &id001
+ asn: 65535
+ neighbor: 192.0.2.3
+ afi: l2vpn
+ safi: evpn
+ send_community: standard
+ rewrite_evpn_rt_asn: true
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id001
+
+ - assert: &id003
+ that:
+ - result.changed == false
+
+ - name: Configure BGP neighbor 1 - multisite
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: &id004
+ asn: 65535
+ neighbor: 192.0.2.3
+ afi: l2vpn
+ safi: evpn
+ send_community: standard
+ rewrite_evpn_rt_asn: false
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id004
+
+ - assert: *id003
+
+ - name: Disable multisite border gateway - multisite
+ cisco.nxos.nxos_config:
+ lines:
+ - no evpn multisite border-gateway 10
+ when: multiout is not search("Invalid command")
+
+- name: Disable feature bgp - multisite
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- name: Disable feature nv overlay - multisite
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nv overlay
+ state: disabled
+
+- pause:
+ seconds: 5
+
+- name: Remove nv overlay evpn - multisite
+ when: platform is search('N9K')
+ cisco.nxos.nxos_config:
+ lines:
+ - no nv overlay evpn
+
+- debug: msg="END connection={{ ansible_connection }} nxos_bgp_neighbor_af multisite
+ sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tests/common/sanity.yaml
new file mode 100644
index 00000000..51e6bc92
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_bgp_neighbor_af/tests/common/sanity.yaml
@@ -0,0 +1,295 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_bgp_neighbor_af sanity
+ test"
+
+- set_fact: soft_reconfiguration_ina="always"
+ when: imagetag is not search("D1|N1")
+
+- name: Disable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature: &id013
+ feature: bgp
+ state: disabled
+
+- name: Enable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- block:
+
+ - name: Configure BGP neighbor address-family
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: &id001
+ asn: 65535
+ neighbor: 192.0.2.3
+ afi: ipv4
+ safi: unicast
+ additional_paths_receive: enable
+ additional_paths_send: enable
+ advertise_map_exist:
+ - ansible_rm
+ - my_exist_map
+ allowas_in: true
+ default_originate: true
+ disable_peer_as_check: true
+ filter_list_in: my_filter_list_in
+ filter_list_out: my_filter_list_out
+ max_prefix_limit: 100
+ max_prefix_threshold: 50
+ max_prefix_warning: 'true'
+ next_hop_self: true
+ next_hop_third_party: false
+ prefix_list_in: pfx_in
+ prefix_list_out: pfx_out
+ send_community: both
+ soft_reconfiguration_in: enable
+ suppress_inactive: true
+ unsuppress_map: unsup_map
+ weight: '30'
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure BGP neighbor address-family def1
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: &id003
+ asn: 65535
+ neighbor: 192.0.2.3
+ afi: ipv4
+ safi: unicast
+ additional_paths_receive: inherit
+ additional_paths_send: inherit
+ advertise_map_exist: default
+ allowas_in: false
+ default_originate: false
+ disable_peer_as_check: false
+ filter_list_in: default
+ filter_list_out: default
+ max_prefix_limit: default
+ max_prefix_threshold: default
+ max_prefix_warning: false
+ next_hop_self: false
+ next_hop_third_party: false
+ prefix_list_in: default
+ prefix_list_out: default
+ send_community: none
+ soft_reconfiguration_in: inherit
+ suppress_inactive: false
+ unsuppress_map: default
+ weight: default
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id003
+
+ - assert: *id004
+
+ - name: 'Setup: Remove BGP config'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: &id005
+ asn: 65535
+ neighbor: 192.0.2.3
+ afi: ipv4
+ safi: unicast
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id005
+
+ - assert: *id004
+
+ - name: Configure BGP neighbor address-family
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: &id006
+ asn: 65535
+ neighbor: 192.0.2.3
+ afi: ipv4
+ safi: unicast
+ allowas_in_max: '5'
+ advertise_map_non_exist:
+ - ansible_rm
+ - my_non_exist_map
+ default_originate_route_map: my_route_map
+ max_prefix_limit: 100
+ max_prefix_interval: 30
+ max_prefix_threshold: 50
+ route_map_in: rm_in
+ route_map_out: rm_out
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id006
+
+ - assert: *id004
+
+ - name: Configure BGP neighbor address-family def2
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: &id007
+ asn: 65535
+ neighbor: 192.0.2.3
+ afi: ipv4
+ safi: unicast
+ allowas_in_max: default
+ advertise_map_non_exist: default
+ default_originate_route_map: default
+ max_prefix_limit: default
+ max_prefix_interval: default
+ max_prefix_threshold: default
+ route_map_in: default
+ route_map_out: default
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id007
+
+ - assert: *id004
+
+ - name: 'Setup: Remove BGP config'
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id005
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id005
+
+ - assert: *id004
+
+ - name: Configure eBGP
+ cisco.nxos.nxos_bgp_neighbor:
+ asn: 65535
+ vrf: blue
+ neighbor: 192.0.2.3
+ remote_as: 2
+
+ - name: Configure BGP neighbor 3
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: &id008
+ asn: 65535
+ vrf: blue
+ neighbor: 192.0.2.3
+ afi: ipv4
+ safi: unicast
+ additional_paths_receive: disable
+ additional_paths_send: disable
+ as_override: 'true'
+ send_community: standard
+ soft_reconfiguration_in: '{{soft_reconfiguration_ina|default(omit)}}'
+ soo: "3:3"
+ next_hop_third_party: true
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id008
+
+ - assert: *id004
+
+ - name: Configure BGP neighbor def3
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: &id009
+ asn: 65535
+ vrf: blue
+ neighbor: 192.0.2.3
+ afi: ipv4
+ safi: unicast
+ additional_paths_receive: inherit
+ additional_paths_send: inherit
+ as_override: false
+ send_community: default
+ soo: default
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id009
+
+ - assert: *id004
+
+ - name: 'Setup: Remove BGP config'
+ register: result
+ cisco.nxos.nxos_bgp: &id012
+ asn: 65535
+ state: absent
+
+ - assert: *id002
+
+ - name: Configure BGP neighbor af route_reflector_client
+ cisco.nxos.nxos_bgp_neighbor:
+ asn: 65535
+ neighbor: 192.0.2.2
+ remote_as: 65535
+
+ - name: Configure BGP neighbor 4
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: &id010
+ asn: 65535
+ neighbor: 192.0.2.2
+ afi: ipv4
+ safi: unicast
+ route_reflector_client: 'true'
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id010
+
+ - assert: *id004
+
+ - name: Configure BGP neighbor def4
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: &id011
+ asn: 65535
+ neighbor: 192.0.2.2
+ afi: ipv4
+ safi: unicast
+ route_reflector_client: false
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_bgp_neighbor_af: *id011
+
+ - assert: *id004
+ always:
+
+ - name: Cleanup BGP
+ ignore_errors: true
+ cisco.nxos.nxos_bgp: *id012
+
+ - name: Disable feature bgp
+ cisco.nxos.nxos_feature: *id013
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_bgp_neighbor_af sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/cli/cli_command.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/cli/cli_command.yaml
new file mode 100644
index 00000000..ecff9e6b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/cli/cli_command.yaml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: START cli/cli_command.yaml on connection={{ ansible_connection }}
+
+- name: get output for single command
+ register: result
+ ansible.netcommon.cli_command:
+ command: show version
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+
+- name: send invalid command
+ register: result
+ ignore_errors: true
+ ansible.netcommon.cli_command:
+ command: show foo
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+
+- debug: msg="END cli/cli_command.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/cli/contains.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/cli/contains.yaml
new file mode 100644
index 00000000..c031f854
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/cli/contains.yaml
@@ -0,0 +1,18 @@
+---
+- debug: msg="START common/contains.yaml on connection={{ ansible_connection }}"
+
+- name: test contains operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[0] contains NX-OS
+ - result[1].TABLE_interface.ROW_interface.interface contains mgmt
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END common/contains.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/cli/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/cli/sanity.yaml
new file mode 100644
index 00000000..3d2555a4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/cli/sanity.yaml
@@ -0,0 +1,67 @@
+---
+- debug: msg="START cli/sanity.yaml on connection={{ ansible_connection }}"
+
+- name: Disable feature BGP
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- block:
+
+ - name: Run show running-config bgp - should fail
+ ignore_errors: true
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - sh running-config bgp
+
+ - assert: &id001
+ that:
+ - result.failed == true
+
+ - name: Enable feature BGP
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+ - name: Configure BGP defaults
+ register: result
+ cisco.nxos.nxos_bgp:
+ asn: 65535
+ router_id: 192.0.2.1
+ state: present
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Run show running-config bgp - should pass
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - sh running-config bgp
+
+ - assert:
+ that:
+ - result.failed == false
+ - "'65535' in result.stdout[0]"
+
+ - name: Run an invalid command - should fail
+ ignore_errors: true
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show interface bief
+
+ - assert: *id001
+ rescue:
+
+ - debug: msg="nxos_command sanity test failure detected"
+ always:
+
+ - name: Disable feature bgp
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- debug: msg="END cli/sanity.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/bad_operator.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/bad_operator.yaml
new file mode 100644
index 00000000..d5fa92bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/bad_operator.yaml
@@ -0,0 +1,20 @@
+---
+- debug: msg="START common/bad_operator.yaml on connection={{ ansible_connection
+ }}"
+
+- name: test bad operator
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.state foo up
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+
+- debug: msg="END common/bad_operator.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/equal.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/equal.yaml
new file mode 100644
index 00000000..bd46e51a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/equal.yaml
@@ -0,0 +1,30 @@
+---
+- debug: msg="START common/equal.yaml on connection={{ ansible_connection }}"
+
+- name: test eq operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.state eq up
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: test == operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.state == up
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END common/equal.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/greaterthan.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/greaterthan.yaml
new file mode 100644
index 00000000..bc080bd3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/greaterthan.yaml
@@ -0,0 +1,31 @@
+---
+- debug: msg="START common/greaterthan.yaml on connection={{ ansible_connection
+ }}"
+
+- name: test gt operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.eth_ip_mask gt 0
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: test > operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.eth_ip_mask > 0
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END common/greaterthan.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/greaterthanorequal.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/greaterthanorequal.yaml
new file mode 100644
index 00000000..0a1fc6b7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/greaterthanorequal.yaml
@@ -0,0 +1,32 @@
+---
+- debug: msg="START common/greaterthanorequal.yaml on connection={{ ansible_connection
+ }}"
+
+- name: test ge operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.eth_ip_mask ge 0
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: test >= operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.eth_ip_mask >= 0
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END common/greaterthanorequal.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/invalid.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/invalid.yaml
new file mode 100644
index 00000000..23efe712
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/invalid.yaml
@@ -0,0 +1,27 @@
+---
+- debug: msg="START common/invalid.yaml on connection={{ ansible_connection }}"
+
+- name: run invalid command
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_command:
+ commands:
+ - show foo
+
+- assert:
+ that:
+ - result.failed == true
+
+- name: run commands that include invalid command
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show foo
+
+- assert:
+ that:
+ - result.failed == true
+
+- debug: msg="END common/invalid.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/lessthan.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/lessthan.yaml
new file mode 100644
index 00000000..616cca27
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/lessthan.yaml
@@ -0,0 +1,30 @@
+---
+- debug: msg="START common/lessthan.yaml on connection={{ ansible_connection }}"
+
+- name: test lt operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.eth_ip_mask lt 33
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: test < operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.eth_ip_mask lt 33
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END common/lessthan.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/lessthanorequal.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/lessthanorequal.yaml
new file mode 100644
index 00000000..426384d1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/lessthanorequal.yaml
@@ -0,0 +1,32 @@
+---
+- debug: msg="START common/lessthanorequal.yaml on connection={{ ansible_connection
+ }}"
+
+- name: test le operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.eth_ip_mask le 32
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: test <= operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.eth_ip_mask <= 32
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END common/lessthanorequal.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/not_comparison_operator.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/not_comparison_operator.yaml
new file mode 100644
index 00000000..b97be495
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/not_comparison_operator.yaml
@@ -0,0 +1,20 @@
+---
+- debug: msg="START common/not_comparison_operator.yaml on connection={{ ansible_connection
+ }}"
+
+- name: test 'not' keyword in wait_for
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ wait_for:
+ - result[0] not contains QWERTYQWERTYQWERTY
+ - result[0] == not QWERTYQWERTYQWERTY
+ - result[0] matches not QWERTYQWERTYQWERTY
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END common/not_comparison_operator.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/notequal.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/notequal.yaml
new file mode 100644
index 00000000..cd6da5d9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/notequal.yaml
@@ -0,0 +1,32 @@
+---
+- debug: msg="START common/notequal.yaml on connection={{ ansible_connection }}"
+
+- name: test neq operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.state neq down
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+
+- name: test != operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface mgmt0 | json
+ wait_for:
+ - result[1].TABLE_interface.ROW_interface.state != down
+
+- assert:
+ that:
+ - result.changed == false
+ - result.stdout is defined
+
+- debug: msg="END common/notequal.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/output.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/output.yaml
new file mode 100644
index 00000000..1d662070
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/output.yaml
@@ -0,0 +1,25 @@
+---
+- debug: msg="START common/output.yaml on connection={{ ansible_connection }}"
+
+- name: get output for single command
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: get output for multiple commands
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ - show interface
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END common/output.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/timeout.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/timeout.yaml
new file mode 100644
index 00000000..63c601a4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/common/timeout.yaml
@@ -0,0 +1,18 @@
+---
+- debug: msg="START common/timeout.yaml on connection={{ ansible_connection }}"
+
+- name: test bad condition
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ wait_for:
+ - result[0] contains bad_value_string
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg is defined
+
+- debug: msg="END common/timeout.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/nxapi/contains.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/nxapi/contains.yaml
new file mode 100644
index 00000000..4bde6dee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/nxapi/contains.yaml
@@ -0,0 +1,22 @@
+---
+- debug: msg="START common/contains.yaml on connection={{ ansible_connection }}"
+
+- name: test contains operator
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+
+ - command: show version
+ output: text
+
+ - command: show interface mgmt0
+ output: json
+ wait_for:
+ - result[0] contains NX-OS
+ - result[1].TABLE_interface.ROW_interface.interface contains mgmt
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END common/contains.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/nxapi/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/nxapi/sanity.yaml
new file mode 100644
index 00000000..34a6655d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_command/tests/nxapi/sanity.yaml
@@ -0,0 +1,67 @@
+---
+- debug: msg="START nxapi/sanity.yaml on connection={{ ansible_connection }}"
+
+- name: Disable feature BGP
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- block:
+
+ - name: Run show running-config bgp - should fail
+ ignore_errors: true
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - sh running-config bgp
+
+ - assert: &id001
+ that:
+ - result.failed == true
+
+ - name: Enable feature BGP
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+ - name: Configure BGP defaults
+ register: result
+ cisco.nxos.nxos_bgp:
+ asn: 65535
+ router_id: 192.0.2.1
+ state: present
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Run show running-config bgp - should pass
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - sh running-config bgp
+
+ - assert:
+ that:
+ - result.failed == false
+ - "'65535' in result.stdout[0]|to_json"
+
+ - name: Run an invalid command - should fail
+ ignore_errors: true
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show interface bief
+
+ - assert: *id001
+ rescue:
+
+ - debug: msg="nxos_command sanity test failure detected"
+ always:
+
+ - name: Disable feature bgp
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- debug: msg="END nxapi/sanity.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/cli_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/cli_config.yaml
new file mode 100644
index 00000000..98bd1fce
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/cli_config.yaml
@@ -0,0 +1,16 @@
+---
+- name: collect all cli_config test cases
+ find:
+ paths: '{{ role_path }}/tests/cli_config'
+ patterns: '{{ testcase }}.yaml'
+ register: test_cases
+ delegate_to: localhost
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/main.yaml
new file mode 100644
index 00000000..8fa8524c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/main.yaml
@@ -0,0 +1,24 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
+
+ - include: cli_config.yaml
+ tags:
+ - cli_config
+
+ - include: redirection.yaml
+ when: ansible_version.full is version('2.10.0', '>=')
+ always:
+
+ - name: Change hostname back to {{ inventory_hostname_short }}
+ cisco.nxos.nxos_config:
+ lines:
+ - hostname {{ inventory_hostname_short }}
+ match: none
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/redirection.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/redirection.yaml
new file mode 100644
index 00000000..5564a3ea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tasks/redirection.yaml
@@ -0,0 +1,16 @@
+---
+- name: collect all redirection cli test cases
+ find:
+ paths: '{{ role_path }}/tests/redirection/cli'
+ patterns: '{{ testcase }}.yaml'
+ register: shortname_test_cases
+ delegate_to: localhost
+
+- name: set test_items for redirection
+ set_fact: test_items="{{ shortname_test_cases.files | map(attribute='path') | list }}"
+
+- name: run test case (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/base_running_config b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/base_running_config
new file mode 100644
index 00000000..563371d9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/base_running_config
@@ -0,0 +1,10 @@
+version 7.0(3)I6(1)
+hostname an-nxos9k-02.ansible.com
+vdc an-nxos9k-02 id 1
+ limit-resource vlan minimum 16 maximum 4094
+ limit-resource vrf minimum 2 maximum 4096
+ limit-resource port-channel minimum 0 maximum 511
+ limit-resource u4route-mem minimum 96 maximum 96
+ limit-resource u6route-mem minimum 24 maximum 24
+ limit-resource m4route-mem minimum 58 maximum 58
+ limit-resource m6route-mem minimum 8 maximum 8
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/config.j2 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/config.j2
new file mode 100644
index 00000000..5c79ec8c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/config.j2
@@ -0,0 +1,4 @@
+interface loopback1
+ description this is a test
+ shutdown
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configblock.j2 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configblock.j2
new file mode 100644
index 00000000..ec03c24a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configblock.j2
@@ -0,0 +1,5 @@
+ip access-list test
+ 10 permit ip 192.0.2.1/32 any log
+ 20 permit ip 192.0.2.2/32 any log
+ 30 permit ip 192.0.2.3/32 any log
+ 40 permit ip 192.0.2.4/32 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configexact1.j2 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configexact1.j2
new file mode 100644
index 00000000..ec03c24a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configexact1.j2
@@ -0,0 +1,5 @@
+ip access-list test
+ 10 permit ip 192.0.2.1/32 any log
+ 20 permit ip 192.0.2.2/32 any log
+ 30 permit ip 192.0.2.3/32 any log
+ 40 permit ip 192.0.2.4/32 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configexact2.j2 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configexact2.j2
new file mode 100644
index 00000000..3fc6800d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configexact2.j2
@@ -0,0 +1,6 @@
+ip access-list test
+ 10 permit ip 192.0.2.1/32 any log
+ 20 permit ip 192.0.2.2/32 any log
+ 30 permit ip 192.0.2.3/32 any log
+ 40 permit ip 192.0.2.4/32 any log
+ 50 permit ip 192.0.2.5/32 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configstrict1.j2 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configstrict1.j2
new file mode 100644
index 00000000..1e7e6f44
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/configstrict1.j2
@@ -0,0 +1,6 @@
+no ip access-list test
+ip access-list test
+ 10 permit ip 192.0.2.1/32 any log
+ 20 permit ip 192.0.2.2/32 any log
+ 30 permit ip 192.0.2.3/32 any log
+ 40 permit ip 192.0.2.4/32 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/intended_running_config b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/intended_running_config
new file mode 100644
index 00000000..ab96584b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/intended_running_config
@@ -0,0 +1,10 @@
+version 7.0(3)I6(1)
+hostname an-nxos9k-01.ansible.com
+vdc an-nxos9k-01 id 1
+ limit-resource vlan minimum 16 maximum 4094
+ limit-resource vrf minimum 2 maximum 4096
+ limit-resource port-channel minimum 0 maximum 511
+ limit-resource u4route-mem minimum 96 maximum 96
+ limit-resource u6route-mem minimum 24 maximum 24
+ limit-resource m4route-mem minimum 58 maximum 58
+ limit-resource m6route-mem minimum 8 maximum 8
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/setupexact.j2 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/setupexact.j2
new file mode 100644
index 00000000..815e003c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/setupexact.j2
@@ -0,0 +1,7 @@
+no ip access-list test
+ip access-list test
+ 10 permit ip 192.0.2.1/32 any log
+ 20 permit ip 192.0.2.2/32 any log
+ 30 permit ip 192.0.2.3/32 any log
+ 40 permit ip 192.0.2.4/32 any log
+ 50 permit ip 192.0.2.5/32 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/setupstrict.j2 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/setupstrict.j2
new file mode 100644
index 00000000..815e003c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/basic/setupstrict.j2
@@ -0,0 +1,7 @@
+no ip access-list test
+ip access-list test
+ 10 permit ip 192.0.2.1/32 any log
+ 20 permit ip 192.0.2.2/32 any log
+ 30 permit ip 192.0.2.3/32 any log
+ 40 permit ip 192.0.2.4/32 any log
+ 50 permit ip 192.0.2.5/32 any log
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/config.js b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/config.js
new file mode 100644
index 00000000..d2ec0c0c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/config.js
@@ -0,0 +1,4 @@
+interface Ethernet2/5
+ description test description from ansible
+ shutdown
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/defaults/config.j2 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/defaults/config.j2
new file mode 100644
index 00000000..df0cac70
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/defaults/config.j2
@@ -0,0 +1,4 @@
+interface Ethernet2/5
+ description this is a test
+ no shutdown
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/defaults/test.j2 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/defaults/test.j2
new file mode 100644
index 00000000..9705ee14
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/templates/defaults/test.j2
@@ -0,0 +1,4 @@
+interface Ethernet2/5
+ description this is a test
+ shutdown
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/diff.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/diff.yaml
new file mode 100644
index 00000000..b9292e16
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/diff.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg="START cli/diff.yaml on connection={{ ansible_connection }}"
+
+- name: setup hostname
+ cisco.nxos.nxos_config:
+ lines: hostname switch
+
+- name: nxos_config diff against retrieved config
+ diff: true
+ register: result
+ cisco.nxos.nxos_config:
+ diff_against: intended
+ intended_config: "{{ lookup('file', '{{ role_path }}/templates/basic/intended_running_config')\
+ \ }}"
+
+- assert:
+ that:
+ - "'hostname an-nxos9k-01.ansible.com' in result['diff']['after']"
+ - "'hostname switch' in result['diff']['before']"
+
+- name: nxos_config diff against provided running_config
+ diff: true
+ register: result
+ cisco.nxos.nxos_config:
+ diff_against: intended
+ intended_config: "{{ lookup('file', '{{ role_path }}/templates/basic/intended_running_config')\
+ \ }}"
+ running_config: "{{ lookup('file', '{{ role_path }}/templates/basic/base_running_config')\
+ \ }}"
+
+- assert:
+ that:
+ - "'hostname an-nxos9k-01.ansible.com' in result['diff']['after']"
+ - "'hostname an-nxos9k-02.ansible.com' in result['diff']['before']"
+
+- debug: msg="END cli/diff.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/multilevel.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/multilevel.yaml
new file mode 100644
index 00000000..2754f6a3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/multilevel.yaml
@@ -0,0 +1,52 @@
+---
+- debug: msg="START cli/mulitlevel.yaml"
+
+- name: get config
+ register: config
+ cisco.nxos.nxos_command:
+ commands: show running-config
+
+- name: enable feature bgp
+ when: "'feature bgp' not in config.stdout[0]"
+ cisco.nxos.nxos_config:
+ lines: feature bgp
+
+- name: remove bgp
+ when: "'router bgp 1' in config.stdout[0]"
+ cisco.nxos.nxos_config:
+ lines: no router bgp 1
+
+- name: configure multi level command
+ register: result
+ cisco.nxos.nxos_config:
+ lines: maximum-paths 14
+ parents:
+ - router bgp 1
+ - address-family ipv4 unicast
+
+- assert:
+ that:
+ - result.changed == true
+ - "'router bgp 1' in result.updates"
+ - "'address-family ipv4 unicast' in result.updates"
+ - "'maximum-paths 14' in result.updates"
+
+- name: check multi level command
+ register: result
+ cisco.nxos.nxos_config:
+ lines: maximum-paths 14
+ parents:
+ - router bgp 1
+ - address-family ipv4 unicast
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines:
+ - no feature bgp
+ match: none
+
+- debug: msg="END cli/mulitlevel.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/sublevel.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/sublevel.yaml
new file mode 100644
index 00000000..3ea0dd91
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/sublevel.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg='START cli/sublevel.yaml'
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines: no ip access-list test
+ match: none
+
+- name: configure sub level command
+ register: result
+ cisco.nxos.nxos_config:
+ lines: 10 permit ip any any log
+ parents: ip access-list test
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip access-list test' in result.updates"
+ - "'10 permit ip any any log' in result.updates"
+
+- name: configure sub level command idempotent check
+ register: result
+ cisco.nxos.nxos_config:
+ lines: 10 permit ip any any log
+ parents: ip access-list test
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines: no ip access-list test
+ match: none
+
+- debug: msg='END cli/sublevel.yaml'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/sublevel_exact.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/sublevel_exact.yaml
new file mode 100644
index 00000000..95aef28b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/sublevel_exact.yaml
@@ -0,0 +1,58 @@
+---
+- debug: msg='START cli/sublevel_exact.yaml'
+
+- name: setup
+ cisco.nxos.nxos_config:
+ commands:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ - 50 permit ip 192.0.2.5/32 any log
+ parents: ip access-list test
+ before: no ip access-list test
+ match: none
+
+- name: configure sub level command using exact match
+ register: result
+ cisco.nxos.nxos_config:
+ commands:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ match: exact
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip access-list test' in result.updates"
+ - "'10 permit ip 192.0.2.1/32 any log' in result.updates"
+ - "'20 permit ip 192.0.2.2/32 any log' in result.updates"
+ - "'30 permit ip 192.0.2.3/32 any log' in result.updates"
+ - "'40 permit ip 192.0.2.4/32 any log' in result.updates"
+ - "'50 permit ip 192.0.2.5/32 any log' not in result.updates"
+
+- name: check sub level command using exact match
+ register: result
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ - 50 permit ip 192.0.2.5/32 any log
+ parents: ip access-list test
+ match: exact
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines: no ip access-list test
+ match: none
+
+- debug: msg='END cli/sublevel_exact.yaml'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/sublevel_strict.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/sublevel_strict.yaml
new file mode 100644
index 00000000..0a2e3201
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/sublevel_strict.yaml
@@ -0,0 +1,59 @@
+---
+- debug: msg='START cli/sublevel_strict.yaml'
+
+- name: setup
+ cisco.nxos.nxos_config:
+ commands:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ - 50 permit ip 192.0.2.5/32 any log
+ parents: ip access-list test
+ before: no ip access-list test
+ match: none
+
+- name: configure sub level command using strict match
+ register: result
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ before: no ip access-list test
+ match: strict
+ replace: block
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip access-list test' in result.updates"
+ - "'10 permit ip 192.0.2.1/32 any log' in result.updates"
+ - "'20 permit ip 192.0.2.2/32 any log' in result.updates"
+ - "'30 permit ip 192.0.2.3/32 any log' in result.updates"
+ - "'40 permit ip 192.0.2.4/32 any log' in result.updates"
+ - "'50 permit ip 192.0.2.5/32 any log' not in result.updates"
+
+- name: check sub level command using strict match
+ register: result
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ match: strict
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ commands: no ip access-list test
+ match: none
+
+- debug: msg='END cli/sublevel_strict.yaml'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/toplevel_after.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/toplevel_after.yaml
new file mode 100644
index 00000000..1f0d4814
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/toplevel_after.yaml
@@ -0,0 +1,40 @@
+---
+- debug: msg='START cli/toplevel_after.yaml'
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines:
+ - snmp-server contact ansible
+ - hostname switch
+ match: none
+
+- name: configure top level command with before
+ register: result
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+ after: snmp-server contact bar
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+ - "'snmp-server contact bar' in result.updates"
+
+- name: configure top level command with before idempotent check
+ register: result
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+ after: snmp-server contact foo
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines:
+ - no snmp-server contact
+ - hostname switch
+ match: none
+
+- debug: msg='END cli/toplevel_after.yaml'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/toplevel_before.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/toplevel_before.yaml
new file mode 100644
index 00000000..caf09c31
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli/toplevel_before.yaml
@@ -0,0 +1,40 @@
+---
+- debug: msg='START cli/toplevel_before.yaml'
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines:
+ - snmp-server contact ansible
+ - hostname switch
+ match: none
+
+- name: configure top level command with before
+ register: result
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+ before: snmp-server contact bar
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+ - "'snmp-server contact bar' in result.updates"
+
+- name: configure top level command with before idempotent check
+ register: result
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+ before: snmp-server contact foo
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines:
+ - no snmp-server contact
+ - hostname switch
+ match: none
+
+- debug: msg='END cli/toplevel_before.yaml'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_backup.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_backup.yaml
new file mode 100644
index 00000000..3880a040
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_backup.yaml
@@ -0,0 +1,114 @@
+---
+- debug: msg="END cli_config/backup.yaml on connection={{ ansible_connection }}"
+
+- name: delete configurable backup file path
+ file:
+ path: '{{ item }}'
+ state: absent
+ with_items:
+ - '{{ role_path }}/backup_test_dir/'
+ - '{{ role_path }}/backup/backup.cfg'
+
+- name: collect any backup files
+ find:
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_files
+ connection: local
+
+- name: delete backup files
+ file:
+ path: '{{ item.path }}'
+ state: absent
+ with_items: '{{backup_files.files|default([])}}'
+
+- name: take config backup
+ become: true
+ register: result
+ ansible.netcommon.cli_config:
+ backup: true
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: collect any backup files
+ find:
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_files
+ connection: local
+
+- assert:
+ that:
+ - backup_files.files is defined
+
+- name: take configuration backup in custom filename and directory path
+ become: true
+ register: result
+ ansible.netcommon.cli_config:
+ backup: true
+ backup_options:
+ filename: backup.cfg
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-1 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- name: take configuration backup in custom filename
+ become: true
+ register: result
+ ansible.netcommon.cli_config:
+ backup: true
+ backup_options:
+ filename: backup.cfg
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-2 exist
+ find:
+ paths: '{{ role_path }}/backup/backup.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- name: take configuration backup in custom path and default filename
+ become: true
+ register: result
+ ansible.netcommon.cli_config:
+ backup: true
+ backup_options:
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-3 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- debug: msg="END cli_config/backup.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_basic.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_basic.yaml
new file mode 100644
index 00000000..de30c90f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_basic.yaml
@@ -0,0 +1,44 @@
+---
+- debug: msg="START cli_config/cli_basic.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ ansible.netcommon.cli_config: &id002
+ config: "interface loopback1\nno description\nno shutdown\n"
+ diff_match: none
+
+- name: configure device with config
+ register: result
+ ansible.netcommon.cli_config: &id001
+ config: "{{ lookup('template', 'basic/config.j2') }}"
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Idempotence
+ register: result
+ ansible.netcommon.cli_config: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove config
+ ansible.netcommon.cli_config: *id002
+
+- name: configure device with config
+ register: result
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/config.j2') }}"
+ defaults: true
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: teardown
+ ansible.netcommon.cli_config: *id002
+
+- debug: msg="END cli_config/cli_basic.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_block_replace.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_block_replace.yaml
new file mode 100644
index 00000000..9eaeb09d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_block_replace.yaml
@@ -0,0 +1,32 @@
+---
+- debug: msg="START cli_config/cli_block_replace.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup - remove configuration
+ ansible.netcommon.cli_config: &id002
+ config: no ip access-list test
+ diff_match: none
+
+- name: block replace
+ register: result
+ ansible.netcommon.cli_config: &id001
+ config: "{{ lookup('template', 'basic/configblock.j2') }}"
+ diff_replace: block
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: block replace (Idempotence)
+ register: result
+ ansible.netcommon.cli_config: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ ansible.netcommon.cli_config: *id002
+
+- debug: msg="END cli_config/cli_block_replace.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_exact_match.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_exact_match.yaml
new file mode 100644
index 00000000..1d347376
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_exact_match.yaml
@@ -0,0 +1,35 @@
+---
+- debug: msg="START cli_config/cli_exact_match.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup - remove configuration
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/setupexact.j2') }}"
+ diff_match: none
+
+- name: configure using exact match
+ register: result
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/configexact1.j2') }}"
+ diff_match: exact
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check using exact match
+ register: result
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/configexact2.j2') }}"
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ ansible.netcommon.cli_config:
+ config: no ip access-list test
+ diff_match: none
+
+- debug: msg="END cli_config/cli_exact_match.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_strict_match.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_strict_match.yaml
new file mode 100644
index 00000000..a593685d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/cli_config/cli_strict_match.yaml
@@ -0,0 +1,27 @@
+---
+- debug: msg="START cli_config/cli_strict_match.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup - remove configuration
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/setupstrict.j2') }}"
+ diff_match: none
+
+- name: configure using strict match
+ register: result
+ ansible.netcommon.cli_config:
+ config: "{{ lookup('template', 'basic/configstrict1.j2') }}"
+ diff_match: strict
+ diff_replace: block
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: teardown
+ ansible.netcommon.cli_config:
+ config: no ip access-list test
+ diff_match: none
+
+- debug: msg="END cli_config/cli_strict_match.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/backup.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/backup.yaml
new file mode 100644
index 00000000..3b69dfb4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/backup.yaml
@@ -0,0 +1,125 @@
+---
+- debug: msg="START common/backup.yaml on connection={{ ansible_connection }}"
+
+- set_fact: intname="{{ nxos_int1 }}"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface {{ intname }}
+ match: none
+
+- name: collect any backup files
+ find: &id001
+ paths: '{{ role_path }}/backup'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ connection: local
+ register: backup_files
+
+- name: delete backup files
+ file:
+ path: '{{ item.path }}'
+ state: absent
+ with_items: '{{backup_files.files|default([])}}'
+
+- name: configure device with config
+ register: result
+ cisco.nxos.nxos_config:
+ commands:
+ - description this is a test
+ - shutdown
+ parents:
+ - interface {{ intname }}
+ backup: true
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is defined
+
+- name: collect any backup files
+ find: *id001
+ connection: local
+ register: backup_files
+
+- assert:
+ that:
+ - backup_files.files is defined
+
+- name: delete configurable backup file path
+ file:
+ path: '{{ item }}'
+ state: absent
+ with_items:
+ - '{{ role_path }}/backup_test_dir/'
+ - '{{ role_path }}/backup/backup.cfg'
+
+- name: take configuration backup in custom filename and directory path
+ register: result
+ cisco.nxos.nxos_config:
+ backup: true
+ backup_options:
+ filename: backup.cfg
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-1 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- name: take configuration backup in custom filename
+ register: result
+ cisco.nxos.nxos_config:
+ backup: true
+ backup_options:
+ filename: backup.cfg
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-2 exist
+ find:
+ paths: '{{ role_path }}/backup/backup.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- name: take configuration backup in custom path and default filename
+ register: result
+ cisco.nxos.nxos_config:
+ backup: true
+ backup_options:
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-3 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+ pattern: '{{ inventory_hostname_short }}_config*'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- debug: msg="END common/backup.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/defaults.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/defaults.yaml
new file mode 100644
index 00000000..4496a86e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/defaults.yaml
@@ -0,0 +1,49 @@
+---
+- debug: msg="START common/defaults.yaml on connection={{ ansible_connection }}"
+
+- set_fact: intname="{{ nxos_int1 }}"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ commands:
+ - no description
+ - shutdown
+ parents:
+ - interface {{ intname }}
+ match: none
+
+- name: configure device with defaults included
+ register: result
+ cisco.nxos.nxos_config:
+ commands:
+ - description this is a test
+ - no shutdown
+ parents:
+ - interface {{ intname }}
+ defaults: true
+
+- debug: var=result
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is defined
+
+- name: check device with defaults included
+ register: result
+ cisco.nxos.nxos_config:
+ commands:
+ - description this is a test
+ - no shutdown
+ parents:
+ - interface {{ intname }}
+ defaults: true
+
+- debug: var=result
+
+- assert:
+ that:
+ - result.changed == false
+ - result.updates is not defined
+
+- debug: msg="END common/defaults.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/sanity.yaml
new file mode 100644
index 00000000..c5864fe9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/sanity.yaml
@@ -0,0 +1,71 @@
+---
+- debug: msg="START common/sanity.yaml on connection={{ ansible_connection }}"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines: ip access-list test
+ match: none
+
+- name: nxos_config sanity test
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ - 50 permit ip 192.0.2.5/32 any log
+ parents: ip access-list test
+ before: no ip access-list test
+ match: exact
+
+- name: nxos_config sanity test - replace block
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ before: no ip access-list test
+ replace: block
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines: no ip access-list test
+ match: none
+
+- debug: msg='Verify https://github.com/ansible/ansible/issues/50635'
+
+- name: PUT INTERFACE INTO DEFAULT STATE
+ cisco.nxos.nxos_config:
+ lines:
+ - default interface {{ nxos_int1 }}
+
+- name: MAKE INTERFACE A SWITCHPORT
+ cisco.nxos.nxos_config:
+ lines:
+ - switchport
+ parents: interface {{ nxos_int1 }}
+
+- name: CONFIGURE EDGE TRUNK TYPE
+ register: result
+ cisco.nxos.nxos_config: &id001
+ lines:
+ - description foo
+ - switchport access vlan 3333
+ - spanning-tree port type edge
+ parents: interface {{ nxos_int1 }}
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: IDEMPOTENCE CHECK
+ register: result
+ cisco.nxos.nxos_config: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END common/sanity.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/save.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/save.yaml
new file mode 100644
index 00000000..cdfe44f9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/save.yaml
@@ -0,0 +1,33 @@
+---
+- debug: msg="START common/save.yaml on connection={{ ansible_connection }}"
+
+- set_fact: intname="{{ nxos_int1 }}"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface {{ intname }}
+ match: none
+
+- name: save config
+ register: result
+ cisco.nxos.nxos_config:
+ save_when: always
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: save should always run
+ register: result
+ cisco.nxos.nxos_config:
+ save_when: always
+
+- assert:
+ that:
+ - result.changed == true
+
+- debug: msg="END common/save.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/src_basic.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/src_basic.yaml
new file mode 100644
index 00000000..48983b7f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/src_basic.yaml
@@ -0,0 +1,36 @@
+---
+- debug: msg="START common/src_basic.yaml on connection={{ ansible_connection }}"
+
+- set_fact: intname="loopback1"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface {{ intname }}
+ match: none
+
+- name: configure device with config
+ register: result
+ cisco.nxos.nxos_config:
+ src: basic/config.j2
+ defaults: true
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is defined
+
+- name: check device with config
+ register: result
+ cisco.nxos.nxos_config:
+ src: basic/config.j2
+
+- assert:
+ that:
+ - result.changed == false
+ - result.updates is not defined
+
+- debug: msg="END common/src_basic.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/src_invalid.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/src_invalid.yaml
new file mode 100644
index 00000000..7041be11
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/src_invalid.yaml
@@ -0,0 +1,16 @@
+---
+- debug: msg="START common/src_invalid.yaml on connection={{ ansible_connection
+ }}"
+
+- name: configure with invalid src
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ src: basic/foobar.j2
+
+- assert:
+ that:
+ - result.failed == true
+ - result.msg == 'path specified in src not found'
+
+- debug: msg="END common/src_invalid.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/src_match_none.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/src_match_none.yaml
new file mode 100644
index 00000000..84ddc909
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/src_match_none.yaml
@@ -0,0 +1,48 @@
+---
+- debug: msg="START common/src_match_none.yaml on connection={{ ansible_connection
+ }}"
+
+- set_fact: intname="{{ nxos_int1 }}"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - interface {{ intname }}
+ match: none
+
+- name: configure device with config
+ register: result
+ cisco.nxos.nxos_config:
+ commands:
+ - description this is a test
+ - shutdown
+ parents:
+ - interface {{ intname }}
+ match: none
+ defaults: true
+
+- assert:
+ that:
+ - result.changed == true
+ - result.updates is defined
+
+- name: check device with config
+ register: result
+ cisco.nxos.nxos_config:
+ commands:
+ - description this is a test
+ - shutdown
+ parents:
+ - interface {{ intname }}
+ defaults: true
+
+- assert:
+ that:
+ - result.changed == false
+ - result.updates is not defined
+
+- debug: msg="END common/src_match_none.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/sublevel_block.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/sublevel_block.yaml
new file mode 100644
index 00000000..e7dcd579
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/sublevel_block.yaml
@@ -0,0 +1,50 @@
+---
+- debug: msg='START common/sublevel_block.yaml on connection={{ ansible_connection
+ }}'
+
+- name: setup
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id001
+ lines: no ip access-list test
+ match: none
+
+- name: configure sub level command using block replace
+ register: result
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ replace: block
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip access-list test' in result.updates"
+ - "'10 permit ip 192.0.2.1/32 any log' in result.updates"
+ - "'20 permit ip 192.0.2.2/32 any log' in result.updates"
+ - "'30 permit ip 192.0.2.3/32 any log' in result.updates"
+ - "'40 permit ip 192.0.2.4/32 any log' in result.updates"
+
+- name: check sub level command using block replace
+ register: result
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ replace: block
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config: *id001
+
+- debug: msg='END common/sublevel_block.yaml on connection={{ ansible_connection
+ }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/toplevel.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/toplevel.yaml
new file mode 100644
index 00000000..d0ca8d43
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/toplevel.yaml
@@ -0,0 +1,33 @@
+---
+- debug: msg='START common/toplevel.yaml on connection={{ ansible_connection }}'
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines: hostname switch
+ match: none
+
+- name: configure top level command
+ register: result
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+
+- name: configure top level command idempotent check
+ register: result
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines: hostname switch
+ match: none
+
+- debug: msg='END common/toplevel.yaml on connection={{ ansible_connection }}'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/toplevel_nonidempotent.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/toplevel_nonidempotent.yaml
new file mode 100644
index 00000000..a3d42840
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/common/toplevel_nonidempotent.yaml
@@ -0,0 +1,37 @@
+---
+- debug: msg="START common/nonidempotent.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines: hostname switch
+ match: none
+
+- name: configure top level command
+ register: result
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+
+- name: configure top level command idempotent check
+ register: result
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+ match: strict
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines: hostname switch
+ match: none
+
+- debug: msg="END common/nonidempotent.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/multilevel.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/multilevel.yaml
new file mode 100644
index 00000000..9cd5059d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/multilevel.yaml
@@ -0,0 +1,41 @@
+---
+- debug: msg="START nxapi/mulitlevel.yaml"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines: feature bgp
+ match: none
+
+- name: configure multi level command
+ register: result
+ cisco.nxos.nxos_config:
+ lines: maximum-paths 14
+ parents:
+ - router bgp 1
+ - address-family ipv4 unicast
+
+- assert:
+ that:
+ - result.changed == true
+ - "'router bgp 1' in result.updates"
+ - "'address-family ipv4 unicast' in result.updates"
+ - "'maximum-paths 14' in result.updates"
+
+- name: test multi level command
+ register: result
+ cisco.nxos.nxos_config:
+ lines: maximum-paths 14
+ parents:
+ - router bgp 1
+ - address-family ipv4 unicast
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines: no feature bgp
+ match: none
+
+- debug: msg="END nxapi/mulitlevel.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/sublevel.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/sublevel.yaml
new file mode 100644
index 00000000..72836bfd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/sublevel.yaml
@@ -0,0 +1,37 @@
+---
+- debug: msg="START nxapi/sublevel.yaml"
+
+- name: setup
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines: no ip access-list test
+ match: none
+
+- name: configure sub level command
+ register: result
+ cisco.nxos.nxos_config:
+ lines: 10 permit ip any any log
+ parents: ip access-list test
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip access-list test' in result.updates"
+ - "'10 permit ip any any log' in result.updates"
+
+- name: configure sub level command idempotent check
+ register: result
+ cisco.nxos.nxos_config:
+ lines: 10 permit ip any any log
+ parents: ip access-list test
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines: no ip access-list test
+ match: none
+
+- debug: msg="END nxapi/sublevel.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/sublevel_exact.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/sublevel_exact.yaml
new file mode 100644
index 00000000..fddce0b6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/sublevel_exact.yaml
@@ -0,0 +1,59 @@
+---
+- debug: msg="START nxapi/sublevel_exact.yaml"
+
+- name: setup
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ - 50 permit ip 192.0.2.5/32 any log
+ parents: ip access-list test
+ match: none
+
+- name: configure sub level command using exact match
+ register: result
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ before: no ip access-list test
+ match: exact
+ replace: block
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip access-list test' in result.updates"
+ - "'10 permit ip 192.0.2.1/32 any log' in result.updates"
+ - "'20 permit ip 192.0.2.2/32 any log' in result.updates"
+ - "'30 permit ip 192.0.2.3/32 any log' in result.updates"
+ - "'40 permit ip 192.0.2.4/32 any log' in result.updates"
+ - "'50 permit ip 192.0.2.5/32 any log' not in result.updates"
+
+- name: check sub level command using exact match
+ register: result
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ match: exact
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines: no ip access-list test
+ match: none
+
+- debug: msg="END nxapi/sublevel_exact.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/sublevel_strict.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/sublevel_strict.yaml
new file mode 100644
index 00000000..d04b4b23
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/sublevel_strict.yaml
@@ -0,0 +1,58 @@
+---
+- debug: msg="START nxapi/sublevel_strict.yaml"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ - 50 permit ip 192.0.2.5/32 any log
+ parents: ip access-list test
+ match: none
+
+- name: configure sub level command using strict match
+ register: result
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 30 permit ip 192.0.2.2/32 any log
+ - 20 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ before: no ip access-list test
+ match: strict
+ replace: block
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip access-list test' in result.updates"
+ - "'10 permit ip 192.0.2.1/32 any log' in result.updates"
+ - "'30 permit ip 192.0.2.2/32 any log' in result.updates"
+ - "'20 permit ip 192.0.2.3/32 any log' in result.updates"
+ - "'40 permit ip 192.0.2.4/32 any log' in result.updates"
+ - "'50 permit ip 192.0.2.5/32 any log' not in result.updates"
+
+- name: check sub level command using strict match
+ register: result
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.3/32 any log
+ - 30 permit ip 192.0.2.2/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ match: strict
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines: no ip access-list test
+ match: none
+
+- debug: msg="END nxapi/sublevel_strict.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/toplevel_after.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/toplevel_after.yaml
new file mode 100644
index 00000000..8b9b299c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/toplevel_after.yaml
@@ -0,0 +1,40 @@
+---
+- debug: msg="START nxapi/toplevel_after.yaml"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines:
+ - snmp-server contact ansible
+ - hostname switch
+ match: none
+
+- name: configure top level command with before
+ register: result
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+ after: snmp-server contact bar
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+ - "'snmp-server contact bar' in result.updates"
+
+- name: configure top level command with before idempotent check
+ register: result
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+ after: snmp-server contact foo
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines:
+ - no snmp-server contact ansible
+ - hostname switch
+ match: none
+
+- debug: msg="END nxapi/toplevel_after.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/toplevel_before.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/toplevel_before.yaml
new file mode 100644
index 00000000..733c0ce1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/nxapi/toplevel_before.yaml
@@ -0,0 +1,40 @@
+---
+- debug: msg="START nxapi/toplevel_before.yaml"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines:
+ - snmp-server contact ansible
+ - hostname switch
+ match: none
+
+- name: configure top level command with before
+ register: result
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+ before: snmp-server contact bar
+
+- assert:
+ that:
+ - result.changed == true
+ - "'hostname foo' in result.updates"
+ - "'snmp-server contact bar' in result.updates"
+
+- name: configure top level command with before idempotent check
+ register: result
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+ before: snmp-server contact foo
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines:
+ - no snmp-server contact ansible
+ - hostname switch
+ match: none
+
+- debug: msg="END nxapi/toplevel_before.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/redirection/cli/shortname.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/redirection/cli/shortname.yaml
new file mode 100644
index 00000000..f7e80cd5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_config/tests/redirection/cli/shortname.yaml
@@ -0,0 +1,37 @@
+---
+- debug: msg="START cli/shortname.yaml on connection={{ ansible_connection }}"
+
+- name: Use src with module alias
+ register: result
+ cisco.nxos.config:
+ src: basic/config.j2
+
+- assert:
+ that:
+ # make sure that the template content was read and not the path
+ - result.changed == true
+ - result.updates is defined
+
+- name: use module alias to take configuration backup
+ register: result
+ cisco.nxos.config:
+ backup: true
+ backup_options:
+ filename: backup_with_alias.cfg
+ dir_path: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: check if the backup file-4 exist
+ find:
+ paths: '{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}/backup_with_alias.cfg'
+ register: backup_file
+ connection: local
+
+- assert:
+ that:
+ - backup_file.files is defined
+
+- debug: msg="END cli/shortname.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/meta/main.yml
new file mode 100644
index 00000000..91da2a75
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/meta/main.yml
@@ -0,0 +1,2 @@
+---
+...
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/tasks/main.yaml
new file mode 100644
index 00000000..d7c416ee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/tasks/main.yaml
@@ -0,0 +1,18 @@
+---
+- name: Check platform type and skip if not MDS
+ register: result
+ cisco.nxos.nxos_command:
+ commands: show version | grep MDS
+
+- name: Set skip_test flag to false
+ set_fact:
+ skip_test=False
+
+- name: Set skip_test flag to true if not MDS
+ set_fact:
+ skip_test=True
+ when: result.stdout[0] is not search('MDS')
+
+- include: cli.yaml
+ tags: cli
+ when: not skip_test
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/tests/common/sanity.yaml
new file mode 100644
index 00000000..5ddb8103
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_devicealias/tests/common/sanity.yaml
@@ -0,0 +1,57 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_devicealias sanity
+ test"
+
+- name: Setup - Remove device alias if configured
+ ignore_errors: true
+ cisco.nxos.nxos_devicealias: &id002
+ da:
+
+ - name: ansible_test1_add
+ remove: true
+
+ - name: ansible_test2_add
+ remove: true
+
+- block:
+
+ - name: Configure device alias
+ register: result
+ cisco.nxos.nxos_devicealias: &id001
+ da:
+
+ - name: ansible_test1_add
+ pwwn: 57:bb:cc:dd:ee:ff:11:67
+
+ - name: ansible_test2_add
+ pwwn: 65:22:21:20:19:18:1a:0d
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - assert:
+ that:
+ - result.commands == ["terminal dont-ask", "device-alias database", "device-alias
+ name ansible_test1_add pwwn 57:bb:cc:dd:ee:ff:11:67", "device-alias
+ name ansible_test2_add pwwn 65:22:21:20:19:18:1a:0d", "device-alias
+ commit", "no terminal dont-ask"]
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_devicealias: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - assert:
+ that:
+ - result.commands == []
+ always:
+
+ - name: Remove device alias config
+ cisco.nxos.nxos_devicealias: *id002
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_devicealias sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tests/common/sanity.yaml
new file mode 100644
index 00000000..966ca6f8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_global/tests/common/sanity.yaml
@@ -0,0 +1,70 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_evpn_global sanity
+ test"
+
+- name: Setup
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id005
+ lines: no nv overlay evpn
+ match: none
+
+- name: Disable feature nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_feature: &id006
+ feature: nv overlay
+ state: disabled
+
+- block:
+
+ - name: Enable feature nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nv overlay
+ state: enabled
+
+ - name: Enable nv overlay evpn
+ register: result
+ cisco.nxos.nxos_evpn_global: &id001
+ nv_overlay_evpn: true
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: CHECK IDEMPOTENCE - enable nv overlay evpn
+ register: result
+ cisco.nxos.nxos_evpn_global: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Disable nv overlay evpn
+ register: result
+ cisco.nxos.nxos_evpn_global: &id003
+ nv_overlay_evpn: false
+
+ - assert: *id002
+
+ - name: CHECK DEMPOTENCE - Disable nv overlay evpn
+ register: result
+ cisco.nxos.nxos_evpn_global: *id003
+
+ - assert: *id004
+ when: not ( platform is search('N3K|N35|N3L'))
+ rescue:
+
+ - debug: msg="connection={{ ansible_connection }} nxos_evpn_global sanity test
+ - FALURE ENCOUNTERED"
+ always:
+
+ - name: Cleanup - Disable nv overlay evpn
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id005
+
+ - name: Cleanup - Disable feature nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_feature: *id006
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_evpn_global sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tests/common/sanity.yaml
new file mode 100644
index 00000000..8745dfca
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_evpn_vni/tests/common/sanity.yaml
@@ -0,0 +1,112 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_evpn_vni sanity test"
+
+- set_fact: nvoe_supported="{{ platform is not search('N3K|N3L|N35')}}"
+
+- name: Setup
+ ignore_errors: true
+ when: nvoe_supported
+ cisco.nxos.nxos_config: &id007
+ lines: no nv overlay evpn
+ match: none
+
+- block:
+
+ - name: Enable feature BGP
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+ - name: Enable nv overlay evpn
+ cisco.nxos.nxos_config:
+ lines: nv overlay evpn
+ match: none
+
+ - name: Configure nxos_evpn_vni
+ register: result
+ cisco.nxos.nxos_evpn_vni: &id001
+ vni: 6000
+ route_distinguisher: "60:10"
+ route_target_import:
+ - auto
+ - "5000:10"
+ - "4100:100"
+ route_target_export:
+ - auto
+ - "5000:10"
+ - "192.0.2.1:43"
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_evpn_vni: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure nxos_evpn_vni
+ register: result
+ cisco.nxos.nxos_evpn_vni: &id003
+ vni: 6000
+ route_distinguisher: "50:20"
+ route_target_import: auto
+ route_target_export: auto
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_evpn_vni: *id003
+
+ - assert: *id004
+
+ - name: Configure nxos_evpn_vni
+ register: result
+ cisco.nxos.nxos_evpn_vni: &id005
+ vni: 6000
+ route_distinguisher: default
+ route_target_import: default
+ route_target_export: default
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_evpn_vni: *id005
+
+ - assert: *id004
+
+ - name: remove nxos_evpn_vni
+ register: result
+ cisco.nxos.nxos_evpn_vni: &id006
+ vni: 6000
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_evpn_vni: *id006
+
+ - assert: *id004
+ when: nvoe_supported
+ always:
+
+ - block:
+
+ - name: Remove nv overlay evpn
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id007
+
+ - name: Disable feature bgp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+ when: nvoe_supported
+
+- debug: msg="END connection={{ ansible_connection }} nxos_evpn_vni sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/all_facts.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/all_facts.yaml
new file mode 100644
index 00000000..a008042d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/all_facts.yaml
@@ -0,0 +1,24 @@
+---
+- debug: msg="START connection={{ ansible_connection }}/all_facts.yaml"
+
+- name: test getting all facts
+ register: result
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - all
+
+- assert:
+ that:
+ - result.changed == false
+ - "'config' in result.ansible_facts.ansible_net_gather_subset"
+ - "'hardware' in result.ansible_facts.ansible_net_gather_subset"
+ - "'default' in result.ansible_facts.ansible_net_gather_subset"
+ - "'interfaces' in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - result.ansible_facts.ansible_net_interfaces is defined
+ - result.ansible_facts.ansible_net_config is defined
+ - result.ansible_facts.ansible_net_model is defined
+ - result.ansible_facts.ansible_net_memfree_mb > 1
+ - result.ansible_facts.ansible_net_memtotal_mb > 1
+
+- debug: msg="END connection={{ ansible_connection }}/all_facts.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/default_facts.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/default_facts.yaml
new file mode 100644
index 00000000..48f3af5f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/default_facts.yaml
@@ -0,0 +1,22 @@
+---
+- debug: msg="START connection={{ ansible_connection }}/default_facts.yaml"
+
+- name: test getting default facts
+ register: result
+ cisco.nxos.nxos_facts:
+
+- assert:
+ that:
+ - result.changed == false
+ - "'hardware' in result.ansible_facts.ansible_net_gather_subset"
+ - "'default' in result.ansible_facts.ansible_net_gather_subset"
+ - "'interfaces' in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - "'config' not in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - result.ansible_facts.ansible_net_memtotal_mb > 10
+ - result.ansible_facts.ansible_net_model is defined
+ - result.ansible_facts.ansible_net_interfaces is defined
+ - result.ansible_facts.ansible_net_config is not defined
+
+- debug: msg="END cli/default.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/invalid_subset.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/invalid_subset.yaml
new file mode 100644
index 00000000..9f6d8697
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/invalid_subset.yaml
@@ -0,0 +1,17 @@
+---
+- debug: msg="START connection={{ ansible_connection }}/invalid_subset.yaml"
+
+- name: test invalid subset (foobar)
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - foobar
+
+- assert:
+ that:
+ - result.changed == false
+ - result.failed == true
+ - "'Subset must be one of' in result.msg"
+
+- debug: msg="END connection={{ ansible_connection }}/invalid_subset.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/not_hardware.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/not_hardware.yaml
new file mode 100644
index 00000000..64cd2e05
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/not_hardware.yaml
@@ -0,0 +1,19 @@
+---
+- debug: msg="START connection={{ ansible_connection }}/not_hardware_facts.yaml"
+
+- name: test not hardware
+ register: result
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!hardware'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'config' in result.ansible_facts.ansible_net_gather_subset"
+ - "'default' in result.ansible_facts.ansible_net_gather_subset"
+ - "'interfaces' in result.ansible_facts.ansible_net_gather_subset"
+ - "'hardware' not in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is not defined
+
+- debug: msg="END connection={{ ansible_connection }}/not_hardware_facts.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/sanity.yaml
new file mode 100644
index 00000000..18af85c7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_facts/tests/common/sanity.yaml
@@ -0,0 +1,61 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_facts sanity test"
+
+- name: nxos_facts gather hardware facts
+ register: result
+ cisco.nxos.nxos_facts:
+ gather_subset: hardware
+
+- assert:
+ that:
+ - result.changed == false
+ - "'hardware' in result.ansible_facts.ansible_net_gather_subset"
+ - "'config' not in result.ansible_facts.ansible_net_gather_subset"
+ - "'interfaces' not in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - result.ansible_facts.ansible_net_memfree_mb > 1
+ - result.ansible_facts.ansible_net_memtotal_mb > 1
+
+- name: nxos_facts gather config facts
+ register: result
+ cisco.nxos.nxos_facts:
+ gather_subset: config
+
+- assert:
+ that:
+ - result.changed == false
+ - "'config' in result.ansible_facts.ansible_net_gather_subset"
+ - "'hardware' not in result.ansible_facts.ansible_net_gather_subset"
+ - "'interfaces' not in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_config is defined
+
+- name: nxos_facts gather config and hardware facts
+ register: result
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - hardware
+ - config
+
+- assert:
+ that:
+ - result.changed == false
+ - "'hardware' in result.ansible_facts.ansible_net_gather_subset"
+ - "'config' in result.ansible_facts.ansible_net_gather_subset"
+ - "'interfaces' not in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_filesystems is defined
+ - result.ansible_facts.ansible_net_config is defined
+ - result.ansible_facts.ansible_net_memfree_mb > 1
+ - result.ansible_facts.ansible_net_memtotal_mb > 1
+
+- name: nxos_facts gather features facts
+ register: result
+ cisco.nxos.nxos_facts:
+ gather_subset: features
+
+- assert:
+ that:
+ - result.changed == false
+ - "'features' in result.ansible_facts.ansible_net_gather_subset"
+ - result.ansible_facts.ansible_net_features_enabled is defined
+
+- debug: msg="END connection={{ ansible_connection }} nxos_facts sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tests/common/configure.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tests/common/configure.yaml
new file mode 100644
index 00000000..6a8eec3d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tests/common/configure.yaml
@@ -0,0 +1,96 @@
+---
+- debug: msg="START connection={{ ansible_connection }}/configure.yaml"
+
+- name: setup
+ cisco.nxos.nxos_config: &teardown
+ lines:
+ - no feature bgp
+ - no feature fabric forwarding
+ match: none
+
+- name: enable bgp
+ register: result
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify bgp
+ register: result
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: disable bgp
+ register: result
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify bgp
+ register: result
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: verify fabric forwarding
+ register: result
+ cisco.nxos.nxos_feature:
+ feature: fabric forwarding
+ state: enabled
+
+- assert:
+ that:
+ - result.changed == True
+ - "'feature fabric forwarding' in result.commands"
+
+- name: verify fabric forwarding (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_feature:
+ feature: fabric forwarding
+ state: enabled
+
+- assert:
+ that:
+ - result.changed == False
+
+- name: verify fabric forwarding disable
+ register: result
+ cisco.nxos.nxos_feature:
+ feature: fabric forwarding
+ state: disabled
+
+- assert:
+ that:
+ - result.changed == True
+ - "'no feature fabric forwarding' in result.commands"
+
+- name: verify fabric forwarding disabled (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_feature:
+ feature: fabric forwarding
+ state: disabled
+
+- assert:
+ that:
+ - result.changed == False
+
+- name: teardown
+ cisco.nxos.nxos_config: *teardown
+
+- debug: msg="END connection={{ ansible_connection }}/configure.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tests/common/invalid.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tests/common/invalid.yaml
new file mode 100644
index 00000000..cd2017ba
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_feature/tests/common/invalid.yaml
@@ -0,0 +1,14 @@
+---
+- debug: msg="START connection={{ ansible_connection }}/invalid.yaml"
+
+- name: configure invalid feature name
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: invalid
+
+- assert:
+ that:
+ - result.failed == true
+
+- debug: msg="END connection={{ ansible_connection }}/invalid.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/fixtures/data.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/fixtures/data.cfg
new file mode 100644
index 00000000..fafd7451
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/fixtures/data.cfg
@@ -0,0 +1 @@
+TEST FILE
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tasks/cli.yaml
new file mode 100644
index 00000000..1edbef6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tasks/cli.yaml
@@ -0,0 +1,27 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tasks/main.yaml
new file mode 100644
index 00000000..cde4e27c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tasks/main.yaml
@@ -0,0 +1,34 @@
+---
+- name: Fetch mgmt interface information
+ cisco.nxos.nxos_command:
+ commands: show interface mgmt 0 | json
+ register: result
+
+- name: Store mgmt interface IP address
+ set_fact:
+ mgmt0_ip: "{{ result['stdout'][0]['TABLE_interface']['ROW_interface']['eth_ip_addr'] }}"
+
+- name: Generate and store random password for temp user
+ set_fact:
+ temp_passwd: "{{ lookup('password', 'length=15 chars=ascii_letters') }}"
+ delegate_to: localhost
+ no_log: True
+
+- name: Configure temporary user for test
+ cisco.nxos.nxos_user:
+ name: temp_user
+ configured_password: "{{ temp_passwd }}"
+
+- block:
+ - include: cli.yaml
+ tags:
+ - cli
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
+ always:
+ - name: Remove temporary user
+ cisco.nxos.nxos_user:
+ name: temp_user
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tasks/nxapi.yaml
new file mode 100644
index 00000000..7e21ea41
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tasks/nxapi.yaml
@@ -0,0 +1,27 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/cli/input_validation.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/cli/input_validation.yaml
new file mode 100644
index 00000000..ce94948e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/cli/input_validation.yaml
@@ -0,0 +1,86 @@
+---
+- debug: msg="START nxos_file_copy input_validation test"
+
+- name: Input Validation - param should be type <path>
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ remote_file: 500
+ file_pull: true
+
+- assert:
+ that:
+ - not result is search('argument remote_file is of type')
+
+- name: Input Validation - param should be type <int>
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ file_pull_timeout: foobar
+
+- assert:
+ that:
+ - result is search("argument file_pull_timeout is of type <class 'ansible.parsing.yaml.objects.AnsibleUnicode'>
+ and we were unable to convert to int")
+
+- name: Input Validation - param should be type <bool>
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ file_pull: foobar
+
+- assert:
+ that:
+ - result is search("argument file_pull is of type <class 'ansible.parsing.yaml.objects.AnsibleUnicode'>
+ and we were unable to convert to bool")
+
+- name: Input Validation - param <file_pull> <remote_file> dependency
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+
+- assert:
+ that:
+ - result is search("Playbook parameter <remote_file> required when <file_pull>
+ is True")
+
+- name: Input Validation - param <file_pull> <remote_scp_server> dependency
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ remote_file: /network-integration.cfg
+
+- assert:
+ that:
+ - result is search('Playbook parameter <remote_scp_server> required when <file_pull>
+ is True')
+
+- name: Input Validation - remote_scp_server params together
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ remote_scp_server: '{{ inventory_hostname_short }}'
+
+- assert:
+ that:
+ - result is search('Playbook parameters <remote_scp_server>, <remote_scp_server_user>
+ must be set together')
+
+- name: Input Validation - param <file_pull_protocol> should only accept strings, which are included in choices
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ file_pull_protocol: foobar
+ remote_file: /network-integration.cfg
+ remote_scp_server: foobar
+ remote_scp_server_user: foobar
+
+- assert:
+ that:
+ - result is search("argument file_pull_protocol with value foobar is not valid.
+ Allowed values are scp, sftp, http, https, tftp, ftp")
+
+- debug: msg="END nxos_file_copy input_validation test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/cli/negative.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/cli/negative.yaml
new file mode 100644
index 00000000..c085831b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/cli/negative.yaml
@@ -0,0 +1,130 @@
+---
+- debug: msg="START nxos_file_copy negative test"
+
+- set_fact:
+ test_source_file: "data.cfg"
+ test_destination_file: "test_destination_file"
+
+- name: Attempt to copy file to invalid file_system
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ file_pull: false
+ local_file: "{{ role_path }}/fixtures/{{ test_source_file }}"
+ file_system: 'invalid_media_type:'
+ connect_ssh_port: '{{ ansible_ssh_port }}'
+
+- assert:
+ that:
+ - result is search('Invalid nxos filesystem invalid_media_type:')
+
+- name: Attempt to copy source file that does not exist on Ansible controller
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ file_pull: false
+ local_file: ./{{ test_source_file }}_does_not_exist
+ file_system: 'bootflash:'
+ connect_ssh_port: '{{ ansible_ssh_port }}'
+
+- assert:
+ that:
+ - result is search('Local file ./data.cfg_does_not_exist not
+ found')
+
+- name: Try and copy file using an invalid remote scp server name
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ file_pull_timeout: 10
+ remote_file: "{{ role_path }}/fixtures/{{ test_source_file }}"
+ local_file: '{{ test_destination_file }}_copy'
+ local_file_directory: dir1/dir2/dir3
+ remote_scp_server: scp_server_gone.example.com
+ remote_scp_server_user: '{{ ansible_ssh_user }}'
+ remote_scp_server_password: '{{ temp_passwd }}'
+ connect_ssh_port: '{{ ansible_ssh_port }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'copy scp:' in result.copy_cmd"
+ - "'bootflash:' in result.file_system"
+ - "'No Transfer' in result.transfer_status"
+
+- assert:
+ that:
+ - result.error_data is search("ERROR Could not resolve hostname|Copying to.*from
+ this server name is not permitted")
+
+- name: Try and copy file using an invalid remote scp server ip address
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ file_pull_timeout: 300
+ remote_file: /{{ test_destination_file }}
+ local_file: '{{ test_destination_file }}_copy'
+ local_file_directory: dir1/dir2/dir3
+ remote_scp_server: 192.168.55.55
+ remote_scp_server_user: '{{ ansible_ssh_user }}'
+ remote_scp_server_password: '{{ temp_passwd }}'
+ connect_ssh_port: '{{ ansible_ssh_port }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'copy scp:' in result.copy_cmd"
+ - "'timed out' in result.error_data"
+ - "'bootflash:' in result.file_system"
+ - "'No Transfer' in result.transfer_status"
+
+- pause:
+ seconds: 10
+
+- name: Try and copy file using an invalid username
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ file_pull_timeout: 10
+ remote_file: /{{ test_destination_file }}
+ local_file: '{{ test_destination_file }}_copy'
+ local_file_directory: dir1/dir2/dir3
+ remote_scp_server: '{{ mgmt0_ip }}'
+ remote_scp_server_user: invalid_user_name
+ remote_scp_server_password: '{{ temp_passwd }}'
+ connect_ssh_port: '{{ ansible_ssh_port }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'copy scp:' in result.copy_cmd"
+ - "'Too many authentication failures' in result.error_data"
+ - "'bootflash:' in result.file_system"
+ - "'No Transfer' in result.transfer_status"
+
+- name: Try and copy file using an invalid password
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ file_pull_timeout: 10
+ remote_file: /{{ test_destination_file }}
+ local_file: '{{ test_destination_file }}_copy'
+ local_file_directory: dir1/dir2/dir3
+ remote_scp_server: '{{ mgmt0_ip }}'
+ remote_scp_server_user: '{{ ansible_ssh_user }}'
+ remote_scp_server_password: invalid_password
+ connect_ssh_port: '{{ ansible_ssh_port }}'
+
+- assert:
+ that:
+ - result.changed == false
+ - "'copy scp:' in result.copy_cmd"
+ - "'Too many authentication failures' in result.error_data"
+ - "'bootflash:' in result.file_system"
+ - "'No Transfer' in result.transfer_status"
+
+- debug: msg="END nxos_file_copy negative test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/cli/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/cli/sanity.yaml
new file mode 100644
index 00000000..055043b2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/cli/sanity.yaml
@@ -0,0 +1,202 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_file_copy sanity test"
+
+- set_fact:
+ test_source_file: "data.cfg"
+ test_destination_file: "test_destination_file"
+
+- set_fact:
+ sftp_root_dir: "{% if major_version is version('9.2', 'ge') %}/bootflash{% else %}/{% endif %}"
+
+- name: Setup - Remove existing file
+ ignore_errors: true
+ cisco.nxos.nxos_command: &id002
+ commands:
+ - terminal dont-ask
+ - delete {{ test_source_file }}
+ - delete {{ test_destination_file }}
+ - delete bootflash:/dir1/dir2/dir3/*
+ - rmdir dir1/dir2/dir3
+ - rmdir dir1/dir2
+ - rmdir dir1
+
+- name: Setup - Turn on feature scp-server
+ cisco.nxos.nxos_feature:
+ feature: scp-server
+ state: enabled
+
+- name: Setup - Turn on feature sftp-server
+ cisco.nxos.nxos_feature:
+ feature: sftp-server
+ state: enabled
+
+- name: Setup - Backup admin password if ansible_user is not admin
+ cisco.nxos.nxos_command:
+ commands:
+ - command: show running-config | include "username admin password"
+ register: nxos_admin_password
+ no_log: true
+ when: ansible_user != "admin"
+
+- name: Setup - Change admin password if ansible_user is not admin
+ cisco.nxos.nxos_user:
+ name: admin
+ configured_password: "{{ temp_passwd }}"
+ when: ansible_user != "admin"
+
+- block:
+
+ - name: Copy {{ test_source_file }} file from Ansible controller to bootflash
+ register: result
+ cisco.nxos.nxos_file_copy: &id001
+ local_file: "{{ role_path }}/fixtures/{{ test_source_file }}"
+ file_system: 'bootflash:'
+ connect_ssh_port: '{{ ansible_ssh_port }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'bootflash:' in result.file_system"
+ - "'/{{ test_source_file }}' in result.local_file"
+ - "'{{ test_source_file }}' in result.remote_file"
+
+ - "'Sent: File copied to remote device.' in result.transfer_status"
+
+ - name: Idempotence - Copy {{ test_source_file }} file from Ansible controller
+ to bootflash
+ register: result
+ cisco.nxos.nxos_file_copy: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Setup - Remove existing file
+ register: result
+ cisco.nxos.nxos_command: *id002
+
+ - name: Copy {{ test_source_file }} file from Ansible controller to bootflash
+ renamed as {{ test_destination_file }}
+ register: result
+ cisco.nxos.nxos_file_copy: &id003
+ local_file: "{{ role_path }}/fixtures/{{ test_source_file }}"
+ remote_file: '{{ test_destination_file }}'
+ file_system: 'bootflash:'
+ connect_ssh_port: '{{ ansible_ssh_port }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'bootflash:' in result.file_system"
+ - "'{{ test_source_file }}' in result.local_file"
+ - "'{{ test_destination_file }}' in result.remote_file"
+
+ - "'Sent: File copied to remote device.' in result.transfer_status"
+
+ - name: Idempotence - Copy {{ test_source_file }} file from Ansible controller
+ to bootflash renamed as {{ test_destination_file }}
+ register: result
+ cisco.nxos.nxos_file_copy: *id003
+
+ - name: Verify file_pull true options have no impact when file_pull is false
+ register: result
+ cisco.nxos.nxos_file_copy:
+ file_pull: false
+ file_pull_timeout: 1200
+ file_pull_compact: true
+ file_pull_kstack: true
+ local_file_directory: dir1/dir2/dir3
+ remote_scp_server: '{{ inventory_hostname_short }}'
+ remote_scp_server_user: temp_user
+ remote_scp_server_password: '{{ temp_passwd }}'
+ local_file: "{{ role_path }}/fixtures/{{ test_source_file }}"
+ remote_file: '{{ test_destination_file }}'
+ file_system: 'bootflash:'
+ connect_ssh_port: '{{ ansible_ssh_port }}'
+
+ - assert: *id004
+
+ - name: Initiate copy from nxos device to copy {{ test_destination_file }} to
+ bootflash:dir1/dir2/dir3/{{ test_destination_file }}_copy
+ register: result
+ cisco.nxos.nxos_file_copy: &id005
+ file_pull: true
+ file_pull_timeout: 30
+ remote_file: /{{ test_destination_file }}
+ local_file: '{{ test_destination_file }}_copy'
+ local_file_directory: dir1/dir2/dir3
+ remote_scp_server: '{{ mgmt0_ip }}'
+ remote_scp_server_user: temp_user
+ remote_scp_server_password: "{{ temp_passwd }}"
+ connect_ssh_port: '{{ ansible_ssh_port }}'
+
+ - assert: &id006
+ that:
+ - result.changed == true
+ - "'copy scp:' in result.copy_cmd"
+ - "'bootflash:' in result.file_system"
+ - "'bootflash:dir1/dir2/dir3/{{ test_destination_file }}_copy' in result.local_file"
+ - "'/{{ test_destination_file }}' in result.remote_file"
+
+ - "'Received: File copied/pulled to nxos device from remote scp server.'\
+ \ in result.transfer_status"
+ - "'{{ mgmt0_ip }}' in result.remote_scp_server"
+
+ - name: Overwrite the file
+ register: result
+ cisco.nxos.nxos_file_copy: *id005
+
+ - assert: *id006
+
+ - name: Initiate copy with sftp from nxos device to copy /bootflash/{{ test_destination_file }} to
+ bootflash:dir2/dir2/dir3/{{ test_destination_file }}_another_copy
+ register: result
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ file_pull_protocol: sftp
+ file_pull_timeout: 30
+ remote_file: "{{ sftp_root_dir }}/{{ test_destination_file }}"
+ local_file: '{{ test_destination_file }}_another_copy'
+ local_file_directory: dir1/dir2/dir3
+ remote_scp_server: '{{ mgmt0_ip }}'
+ remote_scp_server_user: admin
+ remote_scp_server_password: "{% if ansible_user == 'admin' %}{{ ansible_password }}{% else %}{{ temp_passwd }}{% endif %}"
+ connect_ssh_port: '{{ ansible_ssh_port }}'
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'copy sftp:' in result.copy_cmd"
+ - "'bootflash:' in result.file_system"
+ - "'bootflash:dir1/dir2/dir3/{{ test_destination_file }}_another_copy' in result.local_file"
+ - "'{{ sftp_root_dir }}/{{ test_destination_file }}' in result.remote_file"
+
+ - "'Received: File copied/pulled to nxos device from remote scp server.'\
+ \ in result.transfer_status"
+ - "'{{ mgmt0_ip }}' in result.remote_scp_server"
+
+ always:
+ - name: Remove file
+ ignore_errors: true
+ cisco.nxos.nxos_command: *id002
+
+
+ - name: Recover the admin password if ansible_user is not admin
+ cisco.nxos.nxos_config:
+ lines:
+ - "{{ nxos_admin_password['stdout_lines'][0][0] }}"
+ no_log: true
+ when: ansible_user != "admin"
+
+ - name: Turn off feature scp-server
+ cisco.nxos.nxos_feature:
+ feature: scp-server
+ state: disabled
+
+ - name: Turn off feature sftp-server
+ cisco.nxos.nxos_feature:
+ feature: sftp-server
+ state: disabled
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_file_copy sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/nxapi/badtransport.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/nxapi/badtransport.yaml
new file mode 100644
index 00000000..933c6172
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_file_copy/tests/nxapi/badtransport.yaml
@@ -0,0 +1,16 @@
+---
+- debug: msg="START nxapi/badtransport.yaml"
+
+- name: Sending transport other than cli should fail
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_file_copy:
+ local_file: ./network-integration.cfg
+ file_system: 'bootflash:'
+ connect_ssh_port: '{{ ansible_ssh_port }}'
+
+- assert:
+ that:
+ - result.failed and result.msg is search('Connection type must be fully qualified name for network_cli connection type, got {{ ansible_connection }}')
+
+- debug: msg="END nxapi/badtransport.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tests/common/sanity.yaml
new file mode 100644
index 00000000..7defac0f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir/tests/common/sanity.yaml
@@ -0,0 +1,110 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_gir sanity test"
+
+- set_fact: gir_run='{{ true if (platform is not search("N35")) else false }}'
+
+- name: Setup0
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id007
+ lines:
+ - no system mode maintenance timeout 30
+ - no configure maintenance profile normal-mode
+ - no configure maintenance profile maintenance-mode
+ match: none
+
+- name: Setup1
+ ignore_errors: true
+ cisco.nxos.nxos_gir:
+ system_mode_maintenance: false
+
+- block:
+
+ - name: Put system in maintenance mode with reload reset reason
+ register: result
+ cisco.nxos.nxos_gir: &id001
+ system_mode_maintenance_on_reload_reset_reason: manual_reload
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_gir: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Remove reload reason
+ register: result
+ cisco.nxos.nxos_gir: &id003
+ system_mode_maintenance_on_reload_reset_reason: manual_reload
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_gir: *id003
+
+ - assert: *id004
+
+ - name: Put system in maintenance mode with timeout
+ register: result
+ cisco.nxos.nxos_gir: &id005
+ system_mode_maintenance_timeout: 30
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_gir: *id005
+
+ - assert: *id004
+
+ - name: Remove maintenance mode timeout
+ register: result
+ cisco.nxos.nxos_gir: &id006
+ system_mode_maintenance_timeout: 30
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_gir: *id006
+
+ - assert: *id004
+
+ - name: Put system in maintenance mode
+ register: result
+ cisco.nxos.nxos_gir:
+ system_mode_maintenance: true
+
+ - assert: *id002
+ when: gir_run
+ rescue:
+
+ - debug: msg="connection={{ ansible_connection }} nxos_gir failure detected"
+ always:
+
+ - name: Remove snapshots
+ ignore_errors: true
+ cisco.nxos.nxos_snapshot:
+ action: delete_all
+
+ - name: Teardown0
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id007
+
+ - name: Put system back in normal mode
+ retries: 3
+ delay: 30
+ register: result
+ until: result is not failed
+ ignore_errors: true
+ cisco.nxos.nxos_gir:
+ system_mode_maintenance: false
+
+- debug: msg="END connection={{ ansible_connection }} nxos_gir sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tests/common/sanity.yaml
new file mode 100644
index 00000000..5db400f3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_gir_profile_management/tests/common/sanity.yaml
@@ -0,0 +1,105 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_gir_profile_management
+ sanity test"
+
+- name: Setup - Remove maintenace mode profiles
+ ignore_errors: true
+ cisco.nxos.nxos_gir_profile_management: &id005
+ mode: maintenance
+ state: absent
+
+- name: Setup - Remove normal mode profiles
+ ignore_errors: true
+ cisco.nxos.nxos_gir_profile_management: &id006
+ mode: normal
+ state: absent
+
+- name: Setup - Turn on feature eigrp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: eigrp
+ state: enabled
+
+- block:
+
+ - name: Create maintenace mode profile
+ register: result
+ cisco.nxos.nxos_gir_profile_management: &id001
+ mode: maintenance
+ commands:
+ - router eigrp 11
+ - isolate
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence - Create maintenace mode profile
+ register: result
+ cisco.nxos.nxos_gir_profile_management: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Create normal mode profile
+ register: result
+ cisco.nxos.nxos_gir_profile_management: &id003
+ mode: normal
+ commands:
+ - router eigrp 11
+ - isolate
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence - Create normal mode profile
+ register: result
+ cisco.nxos.nxos_gir_profile_management: *id003
+
+ - assert: *id004
+
+ - name: Remove maintenance mode profile
+ register: result
+ cisco.nxos.nxos_gir_profile_management: *id005
+
+ - assert: *id002
+
+ - name: Check Idempotence - Remove maintenance mode profile
+ register: result
+ cisco.nxos.nxos_gir_profile_management: *id005
+
+ - assert: *id004
+
+ - name: Remove normal mode profile
+ register: result
+ cisco.nxos.nxos_gir_profile_management: *id006
+
+ - assert: *id002
+
+ - name: Check Idempotence - Remove normal mode profile
+ register: result
+ cisco.nxos.nxos_gir_profile_management: *id006
+
+ - assert: *id004
+ when: not ( platform is match('N35')) and not titanium
+ rescue:
+
+ - debug: msg="connection={{ ansible_connection }} nxos_gir_profile_management
+ failure detected"
+ always:
+
+ - name: Remove normal mode profile
+ cisco.nxos.nxos_gir_profile_management: *id006
+
+ - name: Remove maintenance mode profile
+ cisco.nxos.nxos_gir_profile_management: *id005
+
+ - name: Turn off feature eigrp
+ cisco.nxos.nxos_feature:
+ feature: eigrp
+ state: disabled
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_gir_profile_management
+ sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tests/common/sanity.yaml
new file mode 100644
index 00000000..ad9bd1b5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp/tests/common/sanity.yaml
@@ -0,0 +1,153 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_hsrp sanity test"
+
+- set_fact: intname1="{{ nxos_int1 }}"
+
+- set_fact: intname2="{{ nxos_int2 }}"
+
+- block:
+
+ - name: Enable feature hsrp
+ cisco.nxos.nxos_feature:
+ feature: hsrp
+ state: enabled
+
+ - name: change int1 mode
+ cisco.nxos.nxos_config:
+ commands:
+ - no switchport
+ parents:
+ - interface {{ intname1 }}
+ match: none
+
+ - name: change int2 mode
+ cisco.nxos.nxos_config:
+ commands:
+ - no switchport
+ parents:
+ - interface {{ intname2 }}
+ match: none
+
+ - name: configure nxos_hsrp
+ register: result
+ cisco.nxos.nxos_hsrp: &id001
+ group: 1000
+ version: 2
+ vip: 10.1.1.1
+ priority: 150
+ interface: '{{ intname1 }}'
+ preempt: enabled
+ auth_type: md5
+ auth_string: 7 1234
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_hsrp: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: configure group 100
+ register: result
+ cisco.nxos.nxos_hsrp: &id003
+ group: 100
+ version: 2
+ vip: 192.0.2.2
+ priority: 25
+ interface: '{{ intname1 }}'
+ preempt: enabled
+ auth_type: md5
+ auth_string: 0 1234
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_hsrp: *id003
+
+ - assert: *id004
+
+ - name: change group 100
+ register: result
+ cisco.nxos.nxos_hsrp: &id005
+ group: 100
+ version: 2
+ vip: default
+ priority: default
+ interface: '{{ intname1 }}'
+ preempt: disabled
+ auth_type: md5
+ auth_string: 0 1234
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_hsrp: *id005
+
+ - assert: *id004
+
+ - name: configure group 200
+ register: result
+ cisco.nxos.nxos_hsrp: &id006
+ group: 200
+ vip: 192.0.2.3
+ version: 1
+ interface: '{{ intname2 }}'
+ auth_type: text
+ auth_string: '1234'
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_hsrp: *id006
+
+ - assert: *id004
+
+ - name: change group 200
+ register: result
+ cisco.nxos.nxos_hsrp: &id007
+ group: 200
+ vip: 192.0.2.3
+ version: 2
+ interface: '{{ intname2 }}'
+ auth_type: text
+ auth_string: default
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_hsrp: *id007
+
+ - assert: *id004
+
+ - name: remove nxos_hsrp
+ register: result
+ cisco.nxos.nxos_hsrp: &id008
+ group: 1000
+ interface: '{{ intname1 }}'
+ state: absent
+
+ - assert: *id002
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_hsrp: *id008
+
+ - assert: *id004
+ always:
+
+ - name: Disable feature hsrp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: hsrp
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_hsrp sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..12c20322
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tasks/cli.yaml
@@ -0,0 +1,29 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tasks/nxapi.yaml
new file mode 100644
index 00000000..e6144de9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..cba9ae6b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/_populate_config.yaml
@@ -0,0 +1,15 @@
+- name: Populate Config - 1
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature hsrp"
+ - "feature bfd"
+ - "interface {{ nxos_int1 }}"
+ - " no switchport"
+ - " hsrp bfd"
+
+- name: Populate Config - 2
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ nxos_int2 }}"
+ - " no switchport"
+ - " hsrp bfd"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..39c607e4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/_remove_config.yaml
@@ -0,0 +1,8 @@
+- name: Remove Config
+ cisco.nxos.nxos_config:
+ lines:
+ - "no feature bfd"
+ - "no feature hsrp"
+ - "default interface {{ nxos_int1 }}"
+ - "default interface {{ nxos_int2 }}"
+ ignore_errors: True
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/deleted.yaml
new file mode 100644
index 00000000..efa5dbda
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/deleted.yaml
@@ -0,0 +1,57 @@
+---
+- debug:
+ msg: Start nxos_hsrp_interfaces deleted integration tests connection={{ ansible_connection
+ }}
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+
+- set_fact:
+ bfd_enable: enable
+ bfd_disable: disable
+ when: platform is not search('N35')
+
+- block:
+ - include_tasks: _remove_config.yaml
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature bfd"
+ - "feature hsrp"
+ - "interface {{ test_int1 }}"
+ - " no switchport"
+ - " hsrp bfd"
+
+ - name: setup3
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ test_int2 }}"
+ - " no switchport"
+
+ - name: deleted
+ register: result
+ cisco.nxos.nxos_hsrp_interfaces: &id001
+ config:
+ - name: '{{ test_int1 }}'
+ bfd: '{{ bfd_disable|default(omit)}}'
+ state: deleted
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'no hsrp bfd' in result.commands"
+ msg: "Assert failed. 'result.commands': {{ result.commands }}"
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_hsrp_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/empty_config.yaml
new file mode 100644
index 00000000..65b2565f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/empty_config.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START nxos_hsrp_interfaces empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_hsrp_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_hsrp_interfaces empty_config integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/gathered.yaml
new file mode 100644
index 00000000..d4ad00bb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/gathered.yaml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: START nxos_hsrp_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather hsrp_interfaces facts from the device using nxos_hsrp_interfaces
+ register: result
+ cisco.nxos.nxos_hsrp_interfaces:
+ state: gathered
+
+ - assert:
+ that: "{{ result['gathered'] | symmetric_difference(gathered)\
+ \ |length == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+ - debug:
+ msg: END nxos_hsrp_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/merged.yaml
new file mode 100644
index 00000000..812a8fad
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/merged.yaml
@@ -0,0 +1,65 @@
+---
+- debug:
+ msg: Start nxos_hsrp_interfaces merged integration tests connection={{ ansible_connection
+ }}
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+
+- set_fact:
+ bfd_enable: enable
+ bfd_disable: disable
+ when: platform is not search('N35')
+
+- block:
+ - include_tasks: _remove_config.yaml
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature bfd"
+ - "feature hsrp"
+ - "interface {{ test_int1 }}"
+ - " no switchport"
+ - " hsrp bfd"
+
+ - name: setup3
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ test_int2 }}"
+ - " no switchport"
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_hsrp_interfaces: &id001
+ config:
+ - name: '{{ test_int1 }}'
+ bfd: '{{ bfd_disable|default(omit)}}'
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'no hsrp bfd' in result.commands"
+ msg: "Assert failed. 'result.commands': {{ result.commands }}"
+
+ - name: Gather hsrp_interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: hsrp_interfaces
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_hsrp_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ when: bfd_enable is defined
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/overridden.yaml
new file mode 100644
index 00000000..e1b8a962
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/overridden.yaml
@@ -0,0 +1,59 @@
+---
+- debug:
+ msg: Start nxos_hsrp_interfaces overridden integration tests connection={{ ansible_connection
+ }}
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+
+- set_fact:
+ bfd_enable: enable
+ bfd_disable: disable
+ when: platform is not search('N35')
+
+- block:
+ - include_tasks: _remove_config.yaml
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature bfd"
+ - "feature hsrp"
+ - "interface {{ test_int1 }}"
+ - " no switchport"
+
+ - name: setup3
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ test_int2 }}"
+ - " no switchport"
+ - " hsrp bfd"
+
+ - name: Overridden
+ register: result
+ cisco.nxos.nxos_hsrp_interfaces: &id001
+ config:
+
+ - name: '{{ test_int1 }}'
+ bfd: '{{ bfd_enable|default(omit)}}'
+ state: overridden
+
+ - assert:
+ that:
+ - result.changed == true
+ - result.commands[1] == 'no hsrp bfd'
+ - result.commands[3] == 'hsrp bfd'
+ msg: "Assert failed. 'result.commands': {{ result.commands }}"
+
+ - name: Idempotence - Overridden
+ register: result
+ cisco.nxos.nxos_hsrp_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/parsed.yaml
new file mode 100644
index 00000000..b7d52df9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/parsed.yaml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: START nxos_hsrp_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+ # Interfaces used in the task don't actually exist on the appliance
+ - name: Use parsed state to convert externally supplied config to structured format
+ register: result
+ cisco.nxos.nxos_hsrp_interfaces:
+ running_config: |
+ interface Ethernet1/800
+ no switchport
+ hsrp bfd
+ interface Ethernet1/801
+ no switchport
+ hsrp bfd
+ state: parsed
+
+ - assert:
+ that: "{{ parsed | symmetric_difference(result['parsed']) |length==0\
+ \ }}"
+
+- debug:
+ msg: END nxos_hsrp_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/rendered.yaml
new file mode 100644
index 00000000..ed3e9490
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/rendered.yaml
@@ -0,0 +1,39 @@
+---
+- debug:
+ msg: START nxos_hsrp_interfaces rendered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ # Interfaces used here doesn't actually exist on the device
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.nxos.nxos_hsrp_interfaces:
+ config:
+ - name: Ethernet1/800
+ bfd: enable
+ - name: Ethernet1/801
+ bfd: enable
+ state: rendered
+
+ - assert:
+ that: "{{ rendered | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather bfd_interfaces facts from the device and assert that its empty
+ register: result
+ cisco.nxos.nxos_hsrp_interfaces:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the
+ device
+ assert:
+ that: "{{ result['gathered'] == [] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_hsrp_interfaces rendered integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/replaced.yaml
new file mode 100644
index 00000000..ff3cd0d2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/tests/common/replaced.yaml
@@ -0,0 +1,58 @@
+---
+- debug:
+ msg: Start nxos_hsrp_interfaces replaced integration tests connection={{ ansible_connection
+ }}
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+
+- set_fact:
+ bfd_enable: enable
+ bfd_disable: disable
+ when: platform is not search('N35')
+
+- block:
+ - include_tasks: _remove_config.yaml
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature bfd"
+ - "feature hsrp"
+ - "interface {{ test_int1 }}"
+ - " no switchport"
+ - " hsrp bfd"
+
+ - name: setup3
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ test_int2 }}"
+ - " no switchport"
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_hsrp_interfaces: &id001
+ config:
+
+ - name: '{{ test_int1 }}'
+ bfd: '{{ bfd_disable|default(omit)}}'
+ state: replaced
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'no hsrp bfd' in result.commands"
+ msg: "Assert failed. 'result.commands': {{ result.commands }}"
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_hsrp_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/vars/main.yml
new file mode 100644
index 00000000..3956fbfe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_hsrp_interfaces/vars/main.yml
@@ -0,0 +1,17 @@
+gathered:
+ - name: "{{ nxos_int1 }}"
+ bfd: enable
+ - name: "{{ nxos_int2 }}"
+ bfd: enable
+
+parsed:
+ - name: Ethernet1/800
+ bfd: enable
+ - name: Ethernet1/801
+ bfd: enable
+
+rendered:
+ - "interface Ethernet1/800"
+ - "hsrp bfd"
+ - "interface Ethernet1/801"
+ - "hsrp bfd"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tests/common/sanity.yaml
new file mode 100644
index 00000000..9301477e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp/tests/common/sanity.yaml
@@ -0,0 +1,68 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_igmp sanity test"
+
+- set_fact: restart="true"
+ when: platform is not match("N35")
+
+- block:
+
+ - name: Configure igmp with non-default values
+ register: result
+ cisco.nxos.nxos_igmp: &id001
+ flush_routes: true
+ enforce_rtr_alert: true
+ restart: false
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence - Configure igmp interface with non-default values
+ register: result
+ cisco.nxos.nxos_igmp: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure igmp defaults
+ register: result
+ cisco.nxos.nxos_igmp: &id003
+ flush_routes: false
+ enforce_rtr_alert: false
+ restart: '{{restart|default(omit)}}'
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence - Configure igmp with defaults
+ register: result
+ cisco.nxos.nxos_igmp: *id003
+
+ - assert: *id004
+
+ - name: Configure igmp non-defaults again
+ register: result
+ cisco.nxos.nxos_igmp: *id001
+
+ - name: Configure igmp state as values
+ register: result
+ cisco.nxos.nxos_igmp: &id005
+ state: default
+
+ - assert: *id002
+
+ - name: Check Idempotence - Configure igmp with state default
+ register: result
+ cisco.nxos.nxos_igmp: *id005
+
+ - assert: *id004
+ always:
+
+ - name: Configure igmp with default values
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_igmp: *id005
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_igmp sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tests/common/sanity.yaml
new file mode 100644
index 00000000..bcca31eb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_interface/tests/common/sanity.yaml
@@ -0,0 +1,185 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_igmp_interface sanity
+ test"
+
+- set_fact: intname="{{ nxos_int1 }}"
+
+- set_fact: restart="true"
+ when: platform is not match("N35")
+
+- name: Enable feature PIM
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: pim
+ state: enabled
+
+- name: Put interface in default mode
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - default interface {{ intname }}
+ match: none
+
+- block:
+
+ - name: put interface in L3 and enable PIM
+ cisco.nxos.nxos_config:
+ commands:
+ - no switchport
+ - ip pim sparse-mode
+ parents:
+ - interface {{ intname }}
+ match: none
+
+ - name: Configure igmp interface with non-default values
+ register: result
+ cisco.nxos.nxos_igmp_interface: &id001
+ interface: '{{ intname }}'
+ version: 3
+ startup_query_interval: 60
+ startup_query_count: 5
+ robustness: 6
+ querier_timeout: 2000
+ query_mrt: 12
+ query_interval: 200
+ last_member_qrt: 2
+ last_member_query_count: 4
+ report_llg: true
+ immediate_leave: true
+ group_timeout: 300
+ oif_ps:
+
+ - source: 192.0.2.1
+ prefix: 239.255.255.2
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence - Configure igmp interface with non-default values
+ register: result
+ cisco.nxos.nxos_igmp_interface: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure igmp interface with some default values
+ register: result
+ cisco.nxos.nxos_igmp_interface: &id003
+ interface: '{{ intname }}'
+ version: default
+ startup_query_interval: default
+ startup_query_count: default
+ robustness: default
+ querier_timeout: default
+ query_mrt: default
+ query_interval: default
+ last_member_qrt: default
+ last_member_query_count: default
+ group_timeout: default
+ oif_ps:
+
+ - prefix: 238.2.2.6
+
+ - prefix: 238.2.2.5
+
+ - source: 192.0.2.1
+ prefix: 238.2.2.5
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence - Configure igmp interface with some default values
+ register: result
+ cisco.nxos.nxos_igmp_interface: *id003
+
+ - assert: *id004
+
+ - name: restart igmp
+ cisco.nxos.nxos_igmp_interface:
+ interface: '{{ intname }}'
+ restart: '{{restart|default(omit)}}'
+
+ - name: Configure igmp interface with default oif_ps
+ register: result
+ cisco.nxos.nxos_igmp_interface: &id005
+ interface: '{{ intname }}'
+ oif_ps: default
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence - Configure igmp interface with default oif_ps
+ register: result
+ cisco.nxos.nxos_igmp_interface: *id005
+
+ - assert: *id004
+
+ - name: Configure igmp interface with oif_routemap
+ register: result
+ cisco.nxos.nxos_igmp_interface: &id006
+ interface: '{{ intname }}'
+ version: 3
+ startup_query_interval: 60
+ startup_query_count: 5
+ robustness: 6
+ oif_routemap: abcd
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence - Configure igmp interface with oif_routemap
+ register: result
+ cisco.nxos.nxos_igmp_interface: *id006
+
+ - assert: *id004
+
+ - name: Configure igmp interface with default state
+ register: result
+ cisco.nxos.nxos_igmp_interface: &id007
+ interface: '{{ intname }}'
+ state: default
+
+ - assert: *id002
+
+ - name: Check Idempotence - Configure igmp interface with default state
+ register: result
+ cisco.nxos.nxos_igmp_interface: *id007
+
+ - assert: *id004
+
+ - name: Configure igmp interface with absent state
+ register: result
+ cisco.nxos.nxos_igmp_interface: &id008
+ interface: '{{ intname }}'
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence - Configure igmp interface with absent state
+ register: result
+ cisco.nxos.nxos_igmp_interface: *id008
+
+ - assert: *id004
+ always:
+
+ - name: Configure igmp interface with absent state
+ register: result
+ cisco.nxos.nxos_igmp_interface: *id008
+
+ - name: Put interface in default mode
+ cisco.nxos.nxos_config:
+ commands:
+ - default interface {{ intname }}
+ match: none
+
+ - name: Disable feature PIM
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: pim
+ state: disabled
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_igmp_interface sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tests/common/sanity.yaml
new file mode 100644
index 00000000..860b7269
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_igmp_snooping/tests/common/sanity.yaml
@@ -0,0 +1,120 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_igmp_snooping sanity
+ test"
+
+- meta: end_host
+ when: platform is search('N6K')
+
+- set_fact: gt_run="false"
+
+- block:
+
+ - set_fact: gt_run="true"
+
+ - set_fact: group_timeout="never"
+
+ - set_fact: def_group_timeout="default"
+ when: platform is not search('N35|N5K|N6K')
+
+- name: Setup
+ cisco.nxos.nxos_igmp_snooping: &id006
+ state: default
+
+- block:
+
+ - name: Configure igmp snooping with non-default values
+ register: result
+ cisco.nxos.nxos_igmp_snooping: &id001
+ snooping: false
+ link_local_grp_supp: false
+ report_supp: false
+ v3_report_supp: true
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - block:
+
+ - name: Check Idempotence - Configure igmp snooping with non-default values
+ register: result
+ cisco.nxos.nxos_igmp_snooping: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+ when: (imagetag and (imagetag is version_compare('D1', 'ne')))
+
+ - block:
+
+ - name: Negative Test config group-timeout when igmp snooping disabled
+ ignore_errors: true
+ register: result
+ cisco.nxos.nxos_igmp_snooping:
+ snooping: false
+ group_timeout: '{{group_timeout|default(omit)}}'
+ state: present
+
+ - assert:
+ that:
+ - result.failed == true
+ - result.msg == 'group-timeout cannot be enabled or changed when ip
+ igmp snooping is disabled'
+
+ - name: Configure group-timeout non-default
+ register: result
+ cisco.nxos.nxos_igmp_snooping: &id003
+ snooping: true
+ group_timeout: '{{group_timeout|default(omit)}}'
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_igmp_snooping: *id003
+
+ - assert: *id004
+ when: gt_run
+
+ - name: Configure igmp snooping with default group timeout
+ register: result
+ cisco.nxos.nxos_igmp_snooping: &id005
+ group_timeout: '{{def_group_timeout|default(omit)}}'
+ state: present
+
+ - assert: *id002
+ when: gt_run
+
+ - block:
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_igmp_snooping: *id005
+
+ - assert: *id004
+ when: gt_run or (imagetag and (imagetag is version_compare('D1', 'ne')))
+
+ - name: Configure igmp snooping with default values
+ register: result
+ cisco.nxos.nxos_igmp_snooping: *id006
+
+ - assert: *id002
+
+ - block:
+
+ - name: Check Idempotence - Configure igmp snooping with default values
+ register: result
+ cisco.nxos.nxos_igmp_snooping: *id006
+
+ - assert: *id004
+ when: (imagetag and (imagetag is version_compare('D1', 'ne')))
+ always:
+
+ - name: Configure igmp snooping with default values
+ register: result
+ cisco.nxos.nxos_igmp_snooping: *id006
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_igmp_snooping sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/defaults/main.yaml
new file mode 100644
index 00000000..aeb94781
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: ''
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/meta/main.yml
new file mode 100644
index 00000000..7f867d73
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/meta/main.yml
@@ -0,0 +1,2 @@
+---
+dependencies:
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/httpapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/httpapi.yaml
new file mode 100644
index 00000000..ccd42c6c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/httpapi.yaml
@@ -0,0 +1,17 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (ansible_connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/main.yaml
new file mode 100644
index 00000000..fe00501d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/main.yaml
@@ -0,0 +1,6 @@
+---
+- include: network_cli.yaml
+ when: ansible_connection == 'ansible.netcommon.network_cli'
+
+- include: httpapi.yaml
+ when: ansible_connection == 'ansible.netcommon.httpapi'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/network_cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/network_cli.yaml
new file mode 100644
index 00000000..65994419
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/network_cli.yaml
@@ -0,0 +1,17 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (ansible_connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml
new file mode 100644
index 00000000..01370548
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml
@@ -0,0 +1,15 @@
+---
+- name: Clean up sockets with file module
+ file:
+ state: absent
+ path: '{{ home }}/.ansible/pc/'
+ delegate_to: 127.0.0.1
+
+- name: Display socket info after delete
+ shell: /bin/ls {{ home }}/.ansible
+ args:
+ executable: /bin/bash
+ delegate_to: 127.0.0.1
+ register: output
+
+- debug: msg="Local Socket Info {{ output['stdout_lines'] }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml
new file mode 100644
index 00000000..8412f5d6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml
@@ -0,0 +1,42 @@
+---
+- set_fact: ignore_errors_httpapi='no'
+
+- set_fact: ignore_errors_httpapi='yes'
+ when: ansible_connection == 'ansible.netcommon.httpapi'
+
+- include: targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml
+
+- name: Remove SSH known_hosts file before scp of image file
+ ignore_errors: true
+ cisco.nxos.nxos_command:
+ commands: run bash rm /var/home/admin/.ssh/known_hosts
+
+- name: Copy {{ si }} to bootflash
+ register: result
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ file_pull_timeout: 1200
+ remote_file: '{{image_dir}}{{ si }}'
+ remote_scp_server: '{{ remote_scp_server }}'
+ remote_scp_server_user: '{{ remote_scp_user }}'
+ remote_scp_server_password: '{{ remote_scp_password }}'
+
+- debug:
+ msg: '{{ item.key }} {{ item.value }}'
+ with_dict: '{{ result }}'
+
+- name: Copy {{ ki }} to bootflash
+ when: ki is defined
+ register: result
+ cisco.nxos.nxos_file_copy:
+ file_pull: true
+ file_pull_timeout: 1200
+ remote_file: '{{image_dir}}{{ ki }}'
+ remote_scp_server: '{{ remote_scp_server }}'
+ remote_scp_server_user: '{{ remote_scp_user }}'
+ remote_scp_server_password: '{{ remote_scp_password }}'
+
+- debug:
+ msg: '{{ item.key }} {{ item.value }}'
+ with_dict: '{{ result }}'
+ when: ki is defined
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/delete_files.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/delete_files.yaml
new file mode 100644
index 00000000..9a947823
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/delete_files.yaml
@@ -0,0 +1,10 @@
+---
+- name: Delete Files To Make Room On Bootflash
+ ignore_errors: true
+ with_items: '{{ delete_image_list }}'
+ cisco.nxos.nxos_config:
+ lines:
+ - terminal dont-ask
+ - allow delete boot-image
+ - delete {{ item }}
+ match: none
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml
new file mode 100644
index 00000000..173332cd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml
@@ -0,0 +1,5 @@
+---
+- name: Setup - Turn on feature scp-server
+ cisco.nxos.nxos_feature:
+ feature: scp-server
+ state: enabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/install_os.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/install_os.yaml
new file mode 100644
index 00000000..6b7432ed
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/install_os.yaml
@@ -0,0 +1,24 @@
+---
+- include: targets/nxos_install_os/tasks/upgrade/delete_files.yaml
+ when: delete_files
+
+- include: targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}
+ when: copy_images
+
+- include: targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml
+ when: ki is defined
+
+- include: targets/nxos_install_os/tasks/upgrade/install_system.yaml
+ when: ki is undefined
+
+- meta: reset_connection
+
+- name: Check installed OS for newly installed version {{ tv }}
+ register: output
+ cisco.nxos.nxos_command:
+ commands:
+ - show version | json
+
+- debug: msg="Version detected {{ output['stdout_lines'][0]['kickstart_ver_str']
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/install_system.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/install_system.yaml
new file mode 100644
index 00000000..af5580e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/install_system.yaml
@@ -0,0 +1,53 @@
+---
+- name: Install OS image {{ si }}
+ check_mode: '{{ checkmode }}'
+ register: result
+ when: not force
+ cisco.nxos.nxos_install_os:
+ system_image_file: '{{ si }}'
+ issu: '{{ issu }}'
+
+- name: Remove old boot pointers if any
+ ignore_errors: true
+ when: force
+ cisco.nxos.nxos_config:
+ lines:
+ - no boot nxos
+ - no boot kickstart
+ - no boot system
+ match: line
+
+- name: Set OS image {{ si }} boot pointers
+ when: force
+ cisco.nxos.nxos_config:
+ lines:
+ - boot nxos bootflash:{{ si }}
+ - copy run start
+ match: line
+
+- name: Boot image {{ si }} using reload
+ ignore_errors: true
+ when: force
+ cisco.nxos.nxos_config:
+ lines:
+ - terminal dont-ask
+ - reload
+
+- debug: msg=" {{ result['install_state'] }}"
+ when: not force
+
+- name: Wait for device to come back up with new image
+ wait_for:
+ port: 22
+ state: started
+ timeout: 500
+ delay: 60
+ host: '{{ inventory_hostname }}'
+ when: result.changed and not checkmode
+
+- debug: msg='Wait 5 mins to allow system to stabilize'
+ when: result.changed and not checkmode
+
+- pause:
+ seconds: 300
+ when: result.changed and not checkmode
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml
new file mode 100644
index 00000000..fd0290f7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml
@@ -0,0 +1,45 @@
+---
+- name: Install OS image {{ si }}
+ check_mode: '{{ checkmode }}'
+ register: result
+ when: not force
+ cisco.nxos.nxos_install_os:
+ system_image_file: '{{ si }}'
+ kickstart_image_file: '{{ ki }}'
+ issu: '{{ issu }}'
+
+- name: Set OS image {{ si }} boot pointers
+ when: force
+ cisco.nxos.nxos_config:
+ lines:
+ - no boot kickstart
+ - no boot system
+ - boot kickstart bootflash:{{ ki }}
+ - boot system bootflash:{{ si }}
+ - copy run start
+ match: line
+
+- name: Boot image {{ si }} using reload
+ ignore_errors: true
+ when: force
+ cisco.nxos.nxos_command:
+ commands: terminal dont-ask ; reload
+
+- debug: msg=" {{ result['install_state'] }}"
+ when: not force
+
+- name: Wait for device to come back up with new image
+ wait_for:
+ port: 22
+ state: started
+ timeout: 500
+ delay: 60
+ host: '{{ inventory_hostname }}'
+ when: result.changed and not checkmode
+
+- debug: msg='Wait 5 mins to allow system to stabilize'
+ when: result.changed and not checkmode
+
+- pause:
+ seconds: 300
+ when: result.changed and not checkmode
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/main_os_install.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
new file mode 100644
index 00000000..5af834dc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
@@ -0,0 +1,6 @@
+---
+- debug: msg="***WARNING*** Remove meta end_play to verify this module ***WARNING***"
+
+- meta: end_play
+
+- include: targets/nxos_install_os/tasks/upgrade/install_os.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade.yaml
new file mode 100644
index 00000000..19deee85
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade.yaml
@@ -0,0 +1,48 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/Users/mwiebe/Projects/nxos_ansible/images/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='desired'
+
+- set_fact: copy_images=True
+
+- set_fact: force=False
+
+- set_fact: delete_files=True
+
+- set_fact:
+ delete_image_list:
+ - nxos.7.0.3.I7.2.bin
+ - nxos.7.0.3.I7.3.bin
+
+- set_fact: si='n3000-uk9.6.0.2.U6.1a.bin'
+
+- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.1a.bin'
+
+- name: Upgrade to U6.1a
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
+
+- set_fact: si='n3000-uk9.6.0.2.U6.2a.bin'
+
+- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.2a.bin'
+
+- name: Upgrade to U6.2a
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
+
+- set_fact: si='n3000-s2-dk9.8.0.1.bin'
+
+- set_fact: ki='n3000-s2-kickstart.8.0.1.bin'
+
+- name: Upgrade to U6.3a
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
+
+- set_fact: si='nxos.7.0.3.I7.2.bin'
+
+- name: Upgrade to 7.0.3.I7.2
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
+
+- debug: msg="END connection={{ ansible_connection }} nxos_os_install upgrade"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_greensboro.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_greensboro.yaml
new file mode 100644
index 00000000..46b74442
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_greensboro.yaml
@@ -0,0 +1,25 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/greensboro/REL_7_0_3_I7_4/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='no'
+
+- set_fact: copy_images=True
+
+- set_fact: force=False
+
+- set_fact: delete_files=True
+
+- set_fact:
+ delete_image_list:
+ - nxos*.bin
+ - n3000*.bin
+
+- set_fact: si='nxos.7.0.3.I7.4.bin'
+
+- name: Upgrade N3172 Device to Greensboro Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u61a.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u61a.yaml
new file mode 100644
index 00000000..3b5f4b97
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u61a.yaml
@@ -0,0 +1,27 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/602U6_1/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='desired'
+
+- set_fact: copy_images=True
+
+- set_fact: force=False
+
+- set_fact: delete_files=True
+
+- set_fact:
+ delete_image_list:
+ - n3000*.bin
+ - nxos*.bin
+
+- set_fact: si='n3000-uk9.6.0.2.U6.1a.bin'
+
+- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.1a.bin'
+
+- name: Upgrade N3500 Device to U61a Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u62a.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u62a.yaml
new file mode 100644
index 00000000..fbd6306b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u62a.yaml
@@ -0,0 +1,27 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/602U6_2/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='no'
+
+- set_fact: copy_images=True
+
+- set_fact: force=False
+
+- set_fact: delete_files=True
+
+- set_fact:
+ delete_image_list:
+ - n3000*.bin
+ - nxos*.bin
+
+- set_fact: si='n3000-uk9.6.0.2.U6.2a.bin'
+
+- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.2a.bin'
+
+- name: Upgrade N3500 Device to U62a Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u63a.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u63a.yaml
new file mode 100644
index 00000000..b1a9afbd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u63a.yaml
@@ -0,0 +1,27 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/602U6_3/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='desired'
+
+- set_fact: copy_images=True
+
+- set_fact: force=False
+
+- set_fact: delete_files=True
+
+- set_fact:
+ delete_image_list:
+ - n3000*.bin
+ - nxos*.bin
+
+- set_fact: si='n3000-uk9.6.0.2.U6.3a.bin'
+
+- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.3a.bin'
+
+- name: Upgrade N3500 Device to U63a Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n35_62a88.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n35_62a88.yaml
new file mode 100644
index 00000000..a2a2ebd0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n35_62a88.yaml
@@ -0,0 +1,27 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/602A8_8/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='desired'
+
+- set_fact: copy_images=True
+
+- set_fact: force=False
+
+- set_fact: delete_files=True
+
+- set_fact:
+ delete_image_list:
+ - n3000*.bin
+ - n3500*.bin
+
+- set_fact: si='n3500-uk9.6.0.2.A8.8.bin'
+
+- set_fact: ki='n3500-uk9-kickstart.6.0.2.A8.8.bin'
+
+- name: Upgrade N3500 Device to A8_8 Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n35_greensboro.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n35_greensboro.yaml
new file mode 100644
index 00000000..b2274818
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n35_greensboro.yaml
@@ -0,0 +1,25 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/greensboro/REL_7_0_3_I7_4/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='desired'
+
+- set_fact: copy_images=False
+
+- set_fact: force=False
+
+- set_fact: delete_files=False
+
+- set_fact:
+ delete_image_list:
+ - nxos*.bin
+ - n3500*.bin
+
+- set_fact: si='nxos.7.0.3.I7.4.bin'
+
+- name: Upgrade N3500 Device to Greensboro Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n5k_730_N11.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n5k_730_N11.yaml
new file mode 100644
index 00000000..6e7ae774
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n5k_730_N11.yaml
@@ -0,0 +1,26 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/730_N11/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='no'
+
+- set_fact: copy_images=True
+
+- set_fact: force=False
+
+- set_fact: delete_files=True
+
+- set_fact:
+ delete_image_list:
+ - n6000*.bin
+
+- set_fact: si='n6000-uk9.7.3.0.N1.1.bin'
+
+- set_fact: ki='n6000-uk9-kickstart.7.3.0.N1.1.bin'
+
+- name: Upgrade N5k Device to 7.3(0)N1(1) Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n5k_733_N11.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n5k_733_N11.yaml
new file mode 100644
index 00000000..a18b3502
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n5k_733_N11.yaml
@@ -0,0 +1,26 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/733_N11/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='no'
+
+- set_fact: copy_images=False
+
+- set_fact: force=False
+
+- set_fact: delete_files=False
+
+- set_fact:
+ delete_image_list:
+ - n6000*.bin
+
+- set_fact: si='n6000-uk9.7.3.3.N1.1.bin'
+
+- set_fact: ki='n6000-uk9-kickstart.7.3.3.N1.1.bin'
+
+- name: Upgrade N5k Device to 7.3(3)N1(1) Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n7k_atherton.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n7k_atherton.yaml
new file mode 100644
index 00000000..6e18ae19
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n7k_atherton.yaml
@@ -0,0 +1,26 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/atherton/REL_8_0_1/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='no'
+
+- set_fact: copy_images=True
+
+- set_fact: force=False
+
+- set_fact: delete_files=True
+
+- set_fact:
+ delete_image_list:
+ - n7000*.bin
+
+- set_fact: si='n7000-s2-dk9.8.0.1.bin'
+
+- set_fact: ki='n7000-s2-kickstart.8.0.1.bin'
+
+- name: Upgrade N7k Device to Atherton Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n7k_helsinki.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n7k_helsinki.yaml
new file mode 100644
index 00000000..d493c508
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n7k_helsinki.yaml
@@ -0,0 +1,26 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/helsinki/REL_7_3_0_D1_1/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='no'
+
+- set_fact: copy_images=True
+
+- set_fact: force=True
+
+- set_fact: delete_files=True
+
+- set_fact:
+ delete_image_list:
+ - n7000*.bin
+
+- set_fact: si='n7000-s2-dk9.7.3.0.D1.1.bin'
+
+- set_fact: ki='n7000-s2-kickstart.7.3.0.D1.1.bin'
+
+- name: Upgrade N7k Device to Helsinki Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro.yaml
new file mode 100644
index 00000000..c8753257
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro.yaml
@@ -0,0 +1,34 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/greensboro/REL_7_0_3_I7_4/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='desired'
+
+- set_fact: copy_images=True
+
+- set_fact: force=False
+
+- set_fact: delete_files=True
+
+- set_fact:
+ delete_image_list:
+ - nxos*.bin
+
+- name: Unconfigure features that will conflict with upgrade
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - terminal dont-ask
+ - no feature nv overlay
+ - no nxapi ssl protocols
+ - no nxapi ssl ciphers weak
+ match: none
+
+- set_fact: si='nxos.7.0.3.I7.4.bin'
+
+- name: Upgrade N9k Device to Greensboro Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro_force.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro_force.yaml
new file mode 100644
index 00000000..9649467f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro_force.yaml
@@ -0,0 +1,34 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/greensboro/REL_7_0_3_I7_4/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='desired'
+
+- set_fact: copy_images=True
+
+- set_fact: force=True
+
+- set_fact: delete_files=True
+
+- set_fact:
+ delete_image_list:
+ - nxos*.bin
+
+- name: Unconfigure features that will conflict with upgrade
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - terminal dont-ask
+ - no feature nv overlay
+ - no nxapi ssl protocols
+ - no nxapi ssl ciphers weak
+ match: none
+
+- set_fact: si='nxos.7.0.3.I7.4.bin'
+
+- name: Upgrade N9k Device to Greensboro Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_hamilton.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_hamilton.yaml
new file mode 100644
index 00000000..a9972b1e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_install_os/tests/common/upgrade_n9k_hamilton.yaml
@@ -0,0 +1,32 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
+ when: connection is defined
+
+- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/hamilton/REL_9_2_1/'
+
+- set_fact: checkmode='no'
+
+- set_fact: issu='desired'
+
+- set_fact: copy_images=True
+
+- set_fact: force=False
+
+- set_fact: delete_files=True
+
+- set_fact:
+ delete_image_list:
+ - nxos*.bin
+
+- name: Unconfigure features that will conflict with upgrade
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - terminal dont-ask
+ - no feature ngmvpn
+ match: none
+
+- set_fact: si='nxos.9.2.1.bin'
+
+- name: Upgrade N9k Device to Hamilton Release Image
+ include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/intent.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/intent.yaml
new file mode 100644
index 00000000..0d4502f4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/intent.yaml
@@ -0,0 +1,69 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_interface intent test"
+
+- set_fact: testint1="{{ nxos_int1 }}"
+
+- set_fact: testint2="{{ nxos_int2 }}"
+
+- name: 'Setup: Put interfaces into a default state'
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - default interface {{ testint1 }}
+ - default interface {{ testint2 }}
+
+- name: Check intent arguments
+ register: result
+ cisco.nxos.nxos_interface:
+ name: '{{ testint2 }}'
+ admin_state: up
+ tx_rate: ge(0)
+ rx_rate: ge(0)
+
+- assert:
+ that:
+ - result.failed == false
+
+- name: Clear interface {{ testint2 }} counters before next task
+ ignore_errors: true
+ cisco.nxos.nxos_command:
+ commands: clear counters interface {{ testint2 }}
+
+- name: Check intent arguments (failed condition)
+ ignore_errors: true
+ register: result
+ cisco.nxos.nxos_interface:
+ name: '{{ testint2 }}'
+ admin_state: down
+ tx_rate: gt(10000)
+ rx_rate: lt(0)
+
+- assert:
+ that:
+ - result.failed == true
+ - "'tx_rate gt(10000)' in result.failed_conditions"
+ - "'rx_rate lt(0)' in result.failed_conditions"
+
+- name: aggregate definition of interface
+ register: result
+ cisco.nxos.nxos_interface:
+ aggregate:
+
+ - name: '{{ testint1 }}'
+ description: Test aggregation on first interface
+
+ - name: '{{ testint2 }}'
+ mode: layer3
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: 'TearDown: Put interfaces into a default state'
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - default interface {{ testint1 }}
+ - default interface {{ testint2 }}
+
+- debug: msg="END connection={{ ansible_connection }} nxos_interface intent test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/sanity.yaml
new file mode 100644
index 00000000..d9881325
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/sanity.yaml
@@ -0,0 +1,135 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_interface sanity test"
+
+- set_fact: testint="{{ nxos_int1 }}"
+
+- name: 'Setup: Enable feature interface-vlan'
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: interface-vlan
+ state: enabled
+
+- name: 'Setup: Put interface {{ testint }} into a default state'
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id008
+ lines:
+ - default interface {{ testint }}
+
+- name: 'Setup: Remove possibly existing vlan interfaces'
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id009
+ lines:
+ - no interface vlan 2
+ - no interface vlan 710
+ - no interface vlan 711
+ - no interface vlan 712
+
+- block:
+
+ - name: Configure layer3 params
+ register: result
+ cisco.nxos.nxos_interface: &id001
+ interface: '{{ testint }}'
+ mode: layer3
+ description: Configured by Ansible - Layer3
+ admin_state: up
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_interface: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure layer2 params
+ register: result
+ cisco.nxos.nxos_interface: &id003
+ interface: '{{ testint }}'
+ mode: layer2
+ description: Configured by Ansible - Layer2
+ admin_state: down
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_interface: *id003
+
+ - assert: *id004
+
+ - name: Create VLAN Interfaces
+ with_items: &id005
+
+ - os_svi_int: vlan2
+ os_svi_desc: SVI_VLAN2
+
+ - os_svi_int: vlan710
+ os_svi_desc: SVI_VLAN710
+
+ - os_svi_int: vlan711
+ os_svi_desc: SVI_VLAN711
+
+ - os_svi_int: vlan712
+ os_svi_desc: SVI_VLAN712
+ register: result
+ cisco.nxos.nxos_interface: &id006
+ interface: '{{ item.os_svi_int }}'
+ description: '{{ item.os_svi_desc }}'
+
+ - assert: *id002
+
+ - name: Configure Required SVI
+ register: result
+ cisco.nxos.nxos_l3_interface: &id007
+ aggregate:
+
+ - name: vlan2
+ ipv4: 192.168.2.1/24
+
+ - name: vlan710
+ ipv4: 192.168.3.1/24
+
+ - name: vlan711
+ ipv4: 192.168.4.1/24
+
+ - name: vlan712
+ ipv4: 192.168.5.1/24
+
+ - assert: *id002
+
+ - name: Create VLAN Interfaces Idempotence Check
+ with_items: *id005
+ register: result
+ cisco.nxos.nxos_interface: *id006
+
+ - assert: *id004
+
+ - name: Configure Required SVI Idempotence Check
+ register: result
+ cisco.nxos.nxos_l3_interface: *id007
+
+ - assert: *id004
+ always:
+
+ - name: Set interface back to default
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id008
+
+ - name: Remove vlan interfaces
+ cisco.nxos.nxos_config: *id009
+
+ - name: 'Setup: Disable feature interface-vlan'
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: interface-vlan
+ state: disabled
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_interface sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/set_state_absent.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/set_state_absent.yaml
new file mode 100644
index 00000000..077d03fb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/set_state_absent.yaml
@@ -0,0 +1,29 @@
+---
+- debug: msg="START connection={{ ansible_connection }}/set_state_absent.yaml"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines:
+ - interface Loopback1
+
+- name: set state=absent
+ register: result
+ cisco.nxos.nxos_interface:
+ interface: Loopback1
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify state=absent
+ register: result
+ cisco.nxos.nxos_interface:
+ interface: Loopback1
+ state: absent
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END connection={{ ansible_connection }}/set_state_absent.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/set_state_present.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/set_state_present.yaml
new file mode 100644
index 00000000..aed1b220
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/set_state_present.yaml
@@ -0,0 +1,32 @@
+---
+- debug: msg="START connection={{ ansible_connection }}/set_state_present.yaml"
+
+- name: setup
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no interface Loopback1
+
+- name: set state=present
+ register: result
+ cisco.nxos.nxos_interface:
+ interface: Loopback1
+ state: present
+ description: Configured by Ansible - Layer3
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify state=present
+ register: result
+ cisco.nxos.nxos_interface:
+ interface: Loopback1
+ state: present
+ description: Configured by Ansible - Layer3
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END connection={{ ansible_connection }}/set_state_present.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/sub_int.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/sub_int.yaml
new file mode 100644
index 00000000..38e760b6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface/tests/common/sub_int.yaml
@@ -0,0 +1,75 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_interface sub-interface
+ test"
+
+- set_fact: testint="{{ nxos_int1 }}"
+
+- name: Setup - delete sub-interface
+ ignore_errors: true
+ cisco.nxos.nxos_interface: &id003
+ name: '{{ testint }}.20'
+ state: absent
+
+- name: Setup - Ensure the interface is layer3
+ cisco.nxos.nxos_interface:
+ name: '{{ testint }}'
+ mode: layer3
+
+- name: Create sub-interface
+ register: result
+ cisco.nxos.nxos_interface: &id001
+ name: '{{ testint }}.20'
+ description: sub-interface Configured by Ansible
+ admin_state: up
+ mtu: 800
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Create sub-interface (Idempotence)
+ register: result
+ cisco.nxos.nxos_interface: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Make admin_state down
+ register: result
+ cisco.nxos.nxos_interface: &id002
+ name: '{{ testint }}.20'
+ description: sub-interface Configured by Ansible
+ admin_state: down
+ mtu: 800
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Create sub-interface (Idempotence)
+ register: result
+ cisco.nxos.nxos_interface: *id002
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Remove sub-interface
+ register: result
+ cisco.nxos.nxos_interface: *id003
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Remove sub-interface (Idempotence)
+ register: result
+ cisco.nxos.nxos_interface: *id003
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END connection={{ ansible_connection }} nxos_interface sub-interface
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tests/common/sanity.yaml
new file mode 100644
index 00000000..bf0d94b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interface_ospf/tests/common/sanity.yaml
@@ -0,0 +1,295 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_interface_ospf sanity
+ test"
+
+- set_fact: testint="{{ nxos_int1 }}"
+
+- name: Setup - Disable features
+ loop:
+ - ospf
+ - bfd
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: disabled
+
+- name: Setup - Enable features
+ loop:
+ - ospf
+ - bfd
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: enabled
+
+- name: Put interface into default state
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id013
+ lines:
+ - default interface {{ testint }}
+
+- name: Remove switchport config
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - no switchport
+ parents:
+ - interface {{ testint }}
+
+- name: Remove possibly existing port-channel and loopback ints
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id014
+ commands:
+ - no interface port-channel10
+ - no interface port-channel11
+ - no interface loopback55
+ - no interface loopback77
+
+- block:
+
+ - name: configure ospf interface
+ register: result
+ cisco.nxos.nxos_interface_ospf: &id001
+ interface: '{{ nxos_int1|upper }}'
+ ospf: 1
+ area: 12345678
+ bfd: enable
+ cost: 55
+ passive_interface: true
+ hello_interval: 15
+ dead_interval: 75
+ network: point-to-point
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_interface_ospf: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Modify properties
+ register: result
+ cisco.nxos.nxos_interface_ospf: &id003
+ interface: '{{ testint }}'
+ ospf: 1
+ area: 12345678
+ cost: 66
+ passive_interface: false
+ hello_interval: 17
+ dead_interval: 70
+ network: broadcast
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_interface_ospf: *id003
+
+ - assert: *id004
+
+ - name: default properties
+ register: result
+ cisco.nxos.nxos_interface_ospf: &id005
+ interface: '{{ testint }}'
+ ospf: 1
+ area: 12345678
+ bfd: default
+ cost: default
+ hello_interval: 10
+ dead_interval: default
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_interface_ospf: *id005
+
+ - assert: *id004
+
+ - name: Message_digest properties
+ register: result
+ cisco.nxos.nxos_interface_ospf: &id006
+ interface: '{{ testint }}'
+ ospf: 1
+ area: 12345678
+ message_digest: true
+ message_digest_key_id: 10
+ message_digest_algorithm_type: md5
+ message_digest_encryption_type: 3des
+ message_digest_password: b69f7bc54725b1bfd1ea93afa7b09400
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_interface_ospf: *id006
+
+ - assert: *id004
+
+ - name: Message_digest defaults
+ register: result
+ cisco.nxos.nxos_interface_ospf: &id007
+ interface: '{{ testint }}'
+ ospf: 1
+ area: 12345678
+ message_digest: false
+ message_digest_key_id: default
+ message_digest_algorithm_type: default
+ message_digest_encryption_type: default
+ message_digest_password: default
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_interface_ospf: *id007
+
+ - assert: *id004
+
+ - name: create port-channel and loopback interfaces
+ cisco.nxos.nxos_config:
+ commands:
+ - interface port-channel10
+ - interface port-channel11
+ - interface loopback55
+ - interface loopback77
+ match: none
+
+ - name: Ensure port-channels are layer3
+ with_items:
+ - port-channel10
+ - port-channel11
+ cisco.nxos.nxos_config:
+ commands:
+ - no switchport
+ parents:
+ - interface {{ item }}
+
+ - name: configure ospf interface port-channel10
+ register: result
+ cisco.nxos.nxos_interface_ospf: &id008
+ interface: Port-channel10
+ ospf: 1
+ area: 429496729
+ cost: 55
+ passive_interface: true
+ hello_interval: 15
+ dead_interval: 75
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence for port-channel10
+ register: result
+ cisco.nxos.nxos_interface_ospf: *id008
+
+ - assert: *id004
+
+ - name: configure ospf interface port-channel11 using lower case name
+ register: result
+ cisco.nxos.nxos_interface_ospf: &id009
+ interface: port-channel11
+ ospf: 1
+ area: 42949672
+ cost: 55
+ passive_interface: true
+ hello_interval: 15
+ dead_interval: 75
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence for port-channel11
+ register: result
+ cisco.nxos.nxos_interface_ospf: *id009
+
+ - assert: *id004
+
+ - name: configure ospf interface loopback55
+ register: result
+ cisco.nxos.nxos_interface_ospf: &id010
+ interface: LOOPBACK55
+ ospf: 1
+ area: 192.0.2.4
+ cost: 55
+ hello_interval: 15
+ dead_interval: 75
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence for loopback55
+ register: result
+ cisco.nxos.nxos_interface_ospf: *id010
+
+ - assert: *id004
+
+ - name: configure ospf interface loopback77 using lower case name
+ register: result
+ cisco.nxos.nxos_interface_ospf: &id011
+ interface: loopback77
+ ospf: 1
+ area: 429496
+ cost: 77
+ hello_interval: 45
+ dead_interval: 75
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence for loopback77
+ register: result
+ cisco.nxos.nxos_interface_ospf: *id011
+
+ - assert: *id004
+
+ - name: remove ospf interface config
+ register: result
+ cisco.nxos.nxos_interface_ospf: &id012
+ interface: '{{ testint }}'
+ ospf: 1
+ area: 12345678
+ bfd: disable
+ cost: 55
+ passive_interface: true
+ hello_interval: 15
+ dead_interval: 75
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_interface_ospf: *id012
+
+ - assert: *id004
+ always:
+
+ - name: Disable features
+ loop:
+ - ospf
+ - bfd
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: disabled
+
+ - name: Interface cleanup
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id013
+
+ - name: Remove port-channel and loopback ints
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id014
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_interface_ospf sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..073787b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..0138ecb8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tasks/main.yaml
@@ -0,0 +1,13 @@
+---
+- name: Set system defaults for switchports
+ cisco.nxos.nxos_config:
+ lines: "no system default switchport\nsystem default switchport shutdown\n"
+ connection: ansible.netcommon.network_cli
+
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tasks/nxapi.yaml
new file mode 100644
index 00000000..e6144de9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..b1da8bbe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/_populate_config.yaml
@@ -0,0 +1,15 @@
+- name: "Populate config - {{ nxos_int1 }}"
+ cisco.nxos.nxos_config:
+ lines:
+ - "description outbound-intf"
+ - "switchport"
+ - "no shutdown"
+ parents: "interface {{ nxos_int1 }}"
+
+- name: "Populate config - {{ nxos_int2 }}"
+ cisco.nxos.nxos_config:
+ lines:
+ - "description intf-l3"
+ - "no switchport"
+ - "speed 1000"
+ parents: "interface {{ nxos_int2 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..7d4b12a0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/_remove_config.yaml
@@ -0,0 +1,9 @@
+- name: Remove Config
+ cisco.nxos.nxos_config:
+ lines:
+ - "default interface {{ nxos_int1 }}"
+ - "default interface {{ nxos_int2 }}"
+ - "default interface {{ nxos_int3 }}"
+ - "no interface loopback1"
+ - "no interface loopback8"
+ ignore_errors: True
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/deleted.yaml
new file mode 100644
index 00000000..a573e245
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/deleted.yaml
@@ -0,0 +1,66 @@
+---
+- debug:
+ msg: "Start nxos_interfaces deleted integration tests connection={{ ansible_connection }}"
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+
+- set_fact: test_shutdown
+ when: platform is not search('N3[5KL]|N[56]K|titanium')
+
+- name: 'setup0: clean up (interfaces) attributes on all interfaces'
+ cisco.nxos.nxos_interfaces:
+ state: deleted
+
+- name: setup1
+ cisco.nxos.nxos_config: &id002
+ lines: "default interface {{ test_int1 }}"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ test_int1 }}"
+ - " description Test-interface1"
+ - " no shutdown"
+
+ - name: Gather interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: interfaces
+
+ - name: deleted
+ register: result
+ cisco.nxos.nxos_interfaces: &id001
+ state: deleted
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.interfaces|symmetric_difference(result.before) == []
+ - result.changed == true
+ - "'interface {{ test_int1 }}' in result.commands"
+ - "'no description' in result.commands"
+
+ - assert:
+ that:
+ - result.after|length == 0
+ - "'shutdown' in result.commands"
+ when: test_shutdown is defined
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ when: test_shutdown is defined
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id002
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/empty_config.yaml
new file mode 100644
index 00000000..76036516
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/empty_config.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START nxos_interfaces empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_interfaces empty_config integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/gathered.yaml
new file mode 100644
index 00000000..6aac19ea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/gathered.yaml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START nxos_interfaces gathered integration tests on connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather interfaces facts from the device using nxos_interfaces
+ register: result
+ cisco.nxos.nxos_interfaces:
+ state: gathered
+
+ - assert:
+ that: "{{ result['gathered'][:2] | symmetric_difference(gathered)\
+ \ |length == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+ - debug:
+ msg: END nxos_interfaces gathered integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/merged.yaml
new file mode 100644
index 00000000..254fcc12
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/merged.yaml
@@ -0,0 +1,89 @@
+---
+- debug:
+ msg: "Start nxos_interfaces merged integration tests connection={{ ansible_connection }}"
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+
+- set_fact: enabled=true
+ when: platform is not search('N3[5KL]|N[56]K|titanium')
+
+- block:
+
+ - name: setup
+ cisco.nxos.nxos_config: &id002
+ lines:
+ - "default interface {{ test_int1 }}"
+ - "default interface {{ test_int2 }}"
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_interfaces: &id001
+ config:
+
+ - name: '{{ test_int1 }}'
+ description: Configured by Ansible
+ enabled: '{{ enabled|default(omit)}}'
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface {{ test_int1 }}' in result.commands"
+ - "'description Configured by Ansible' in result.commands"
+
+ - assert:
+ that:
+ - "'no shutdown' in result.commands"
+ when: enabled is defined
+
+ - name: Gather interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: interfaces
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.interfaces|symmetric_difference(result.after)|length
+ == 0
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: "Populate {{ test_int2 }}"
+ cisco.nxos.nxos_config:
+ lines:
+ - "description Test"
+ - "switchport"
+ - "no shutdown"
+ parents: "interface {{ test_int2 }}"
+
+ - name: Update interface state
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: "{{ test_int2 }}"
+ enabled: False
+ mode: layer2
+ description: Test
+ state: merged
+ register: result
+
+ - assert:
+ that:
+ - "'interface {{ test_int2 }}' in result.commands"
+ - "'shutdown' in result.commands"
+ - result.changed == True
+ - result.commands|length == 2
+
+ always:
+ - name: teardown
+ cisco.nxos.nxos_config: *id002
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/overridden.yaml
new file mode 100644
index 00000000..906a2757
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/overridden.yaml
@@ -0,0 +1,71 @@
+---
+- debug:
+ msg: "Start nxos_interfaces overridden integration tests connection={{ ansible_connection }}"
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+
+- block:
+
+ - name: setup1
+ cisco.nxos.nxos_config: &id003
+ lines:
+ - "default interface {{ test_int1 }}"
+ - "default interface {{ test_int2 }}"
+
+ - block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ test_int1 }}"
+ - " description Test-interface1"
+ - " no shutdown"
+
+ - name: Gather interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: interfaces
+
+ - name: Overridden
+ register: result
+ cisco.nxos.nxos_interfaces: &id002
+ config:
+ - name: '{{ test_int2 }}'
+ description: Configured by Ansible
+ state: overridden
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.interfaces|symmetric_difference(result.before)|length
+ == 0
+ - result.changed == true
+ - "'interface {{ test_int1 }}' in result.commands"
+ - "'shutdown' in result.commands"
+ - "'interface {{ test_int2 }}' in result.commands"
+ - "'description Configured by Ansible' in result.commands"
+
+ - name: Gather interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.interfaces|symmetric_difference(result.after)|length
+ == 0
+
+ - name: Idempotence - Overridden
+ register: result
+ cisco.nxos.nxos_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id003
+ when: platform is not search('N3[5KL]|N[56]K|titanium')
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/parsed.yaml
new file mode 100644
index 00000000..63b469af
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/parsed.yaml
@@ -0,0 +1,31 @@
+---
+- debug:
+ msg: START nxos_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+ # Interfaces used in the task don't actually exist on the appliance
+ - name: Use parsed state to convert externally supplied config to structured format
+ register: result
+ cisco.nxos.nxos_interfaces:
+ running_config: |
+ interface Ethernet1/800
+ description test-1
+ speed 1000
+ shutdown
+ no switchport
+ duplex half
+ interface Ethernet1/801
+ description test-2
+ switchport
+ no shutdown
+ mtu 1800
+ state: parsed
+
+ - assert:
+ that: "{{ parsed | symmetric_difference(result['parsed']) |length==0\
+ \ }}"
+
+- debug:
+ msg: END nxos_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/rendered.yaml
new file mode 100644
index 00000000..709940b1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/rendered.yaml
@@ -0,0 +1,46 @@
+---
+- debug:
+ msg: START nxos_interfaces rendered integration tests on connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- name: Gather pre-facts
+ cisco.nxos.nxos_facts:
+ gather_subset: ["!all", "!min"]
+ gather_network_resources: ["interfaces"]
+
+- block:
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: Ethernet1/1
+ description: outbound-intf
+ mode: layer3 # Sys Default for rendered is assumed to be Layer3 - so no command should be sent
+ speed: 100
+ - name: Ethernet1/2
+ mode: layer2
+ enabled: True # Sys Default for rendered is assumed to be disabled - so command should be sent
+ duplex: full
+ state: rendered
+
+ - assert:
+ that: "{{ rendered | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather interfaces facts from the device and assert that nothing changed
+ register: result
+ cisco.nxos.nxos_interfaces:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the
+ device
+ assert:
+ that: "{{ result['gathered']|symmetric_difference(ansible_facts.network_resources.interfaces)|length
+ == 0}}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_interfaces rendered integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/replaced.yaml
new file mode 100644
index 00000000..a085681c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/replaced.yaml
@@ -0,0 +1,100 @@
+---
+- debug:
+ msg: "Start nxos_interfaces replaced integration tests connection={{ ansible_connection }}"
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+
+- block:
+
+ - name: setup1
+ cisco.nxos.nxos_config: &id003
+ lines:
+ - "default interface {{ test_int1 }}"
+
+ - block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ test_int1 }}"
+ - " description Test-interface1"
+
+ - name: Gather interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: interfaces
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_interfaces: &id002
+ config:
+ - name: '{{ test_int1 }}'
+ description: Configured by Ansible
+ enabled: true
+ state: replaced
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.interfaces|symmetric_difference(result.before)|length
+ == 0
+ - result.changed == true
+ - "'interface {{ test_int1 }}' in result.commands"
+ - "'description Configured by Ansible' in result.commands"
+ - "'no shutdown' in result.commands"
+
+ - name: Gather interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.interfaces|symmetric_difference(result.after)|length
+ == 0
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: Reset interfaces
+ cisco.nxos.nxos_config:
+ lines:
+ - "default interface {{ test_int1 }}"
+ - "default interface {{ test_int2 }}"
+ - "interface {{ test_int1 }}"
+ - " description TEST-INTF-1"
+ - " speed 1000"
+
+ - name: Replace (default existing and add new attributes)
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: "{{ test_int1 }}"
+ enabled: False
+ - name: "{{ test_int2 }}"
+ description: TEST-INTF-2
+ enabled: True
+ state: replaced
+ register: result
+
+ - assert:
+ that:
+ - "'interface {{ test_int1 }}' in result.commands"
+ - "'no description' in result.commands"
+ - "'no speed' in result.commands"
+ - "'interface {{ test_int2 }}' in result.commands"
+ - "'description TEST-INTF-2' in result.commands"
+ - "'no shutdown' in result.commands"
+ - result.commands|length == 6
+
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id003
+ when: platform is not search('N3[5KL]|N[56]K|titanium')
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/rtt.yaml
new file mode 100644
index 00000000..8b52de4e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/tests/common/rtt.yaml
@@ -0,0 +1,77 @@
+---
+- debug:
+ msg: START nxos_interfaces round trip integration tests on connection={{ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: "{{ nxos_int1 }}"
+ description: TEST-INTF-1
+ speed: 100
+
+ - name: "{{ nxos_int2 }}"
+ description: TEST-INTF-2
+ mode: layer2
+
+ - name: "{{ nxos_int3 }}"
+ description: TEST-INTF-3
+ mtu: 9216
+ state: merged
+ tags: base_config
+
+ - name: Gather interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: "{{ nxos_int1 }}"
+ description: WRONG-TEST-INTF-1
+ speed: 1000
+
+ - name: "{{ nxos_int2 }}"
+ description: WRONG-TEST-INTF-2
+
+ - name: "{{ nxos_int3 }}"
+ description: WRONG-TEST-INTF-3
+ enabled: False
+ state: overridden
+
+ - assert:
+ that:
+ - '"interface Ethernet1/1" in result.commands'
+ - '"description WRONG-TEST-INTF-1" in result.commands'
+ - '"speed 1000" in result.commands'
+ - '"interface Ethernet1/2" in result.commands'
+ - '"no switchport" in result.commands'
+ - '"description WRONG-TEST-INTF-2" in result.commands'
+ - '"interface Ethernet1/3" in result.commands'
+ - '"no mtu" in result.commands'
+ - '"description WRONG-TEST-INTF-3" in result.commands'
+ - result.commands|length == 9
+ - result.changed == true
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.nxos.nxos_interfaces:
+ config: "{{ ansible_facts['network_resources']['interfaces'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - "{{ base_config['after'] == revert['after'] }}"
+ always:
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_interfaces round trip integration tests on connection={{ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/vars/main.yml
new file mode 100644
index 00000000..016f0acd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_interfaces/vars/main.yml
@@ -0,0 +1,31 @@
+gathered:
+ - name: "{{ nxos_int1 }}"
+ description: outbound-intf
+ mode: layer2
+ enabled: True
+ - name: "{{ nxos_int2 }}"
+ description: intf-l3
+ speed: "1000"
+
+rendered:
+ - "interface Ethernet1/1"
+ - "description outbound-intf"
+ - "speed 100"
+ - "interface Ethernet1/2"
+ - "switchport"
+ - "duplex full"
+ - "no shutdown"
+
+parsed:
+ - description: "test-1"
+ duplex: "half"
+ enabled: false
+ mode: "layer3"
+ name: "Ethernet1/800"
+ speed: "1000"
+
+ - description: "test-2"
+ enabled: true
+ mode: "layer2"
+ mtu: "1800"
+ name: "Ethernet1/801"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tests/common/agg.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tests/common/agg.yaml
new file mode 100644
index 00000000..eaa7bc38
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tests/common/agg.yaml
@@ -0,0 +1,122 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_l2_interface aggregate
+ test"
+
+- set_fact: intname1="{{ nxos_int1 }}"
+
+- set_fact: intname2="{{ nxos_int2 }}"
+
+- name: Setup vlans
+ cisco.nxos.nxos_vlan:
+ vlan_range: 6,15
+
+- name: Setup - Ensure interfaces are layer2
+ cisco.nxos.nxos_interface:
+ aggregate:
+
+ - name: '{{ intname1 }}'
+
+ - name: '{{ intname2 }}'
+ mode: layer2
+
+- name: Setup - Remove interface aggregate before testing
+ cisco.nxos.nxos_l2_interface:
+ aggregate:
+
+ - name: '{{ intname1 }}'
+ mode: access
+ access_vlan: 6
+
+ - name: '{{ intname2 }}'
+ mode: access
+ access_vlan: 15
+ state: absent
+
+- name: Sleep for 2 seconds on Fretta Platform
+ wait_for: timeout=2
+ when: platform is match("N9K-F")
+
+- block:
+
+ - name: Configure interface for access_vlan aggregate
+ register: result
+ cisco.nxos.nxos_l2_interface: &id001
+ aggregate:
+
+ - name: '{{ intname1 }}'
+ mode: access
+ access_vlan: 6
+
+ - name: '{{ intname2 }}'
+ mode: access
+ access_vlan: 15
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Sleep for 2 seconds on Fretta Platform
+ wait_for: timeout=2
+ when: platform is match("N9K-F")
+
+ - name: Configure interface for access_vlan aggregate(Idempotence)
+ register: result
+ cisco.nxos.nxos_l2_interface: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Remove interface aggregate
+ register: result
+ cisco.nxos.nxos_l2_interface: &id002
+ aggregate:
+
+ - name: '{{ intname1 }}'
+ mode: access
+ access_vlan: 6
+
+ - name: '{{ intname2 }}'
+ mode: access
+ access_vlan: 15
+ state: absent
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Sleep for 2 seconds on Fretta Platform
+ wait_for: timeout=2
+ when: platform is match("N9K-F")
+
+ - name: Remove interface aggregate(Idempotence)
+ register: result
+ cisco.nxos.nxos_l2_interface: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - name: remove vlans
+ ignore_errors: true
+ cisco.nxos.nxos_vlan:
+ vlan_range: 6,15
+ state: absent
+
+ - name: Remove interface aggregate after testing
+ ignore_errors: true
+ cisco.nxos.nxos_l2_interface:
+ aggregate:
+
+ - name: '{{ intname1 }}'
+ mode: access
+ access_vlan: 6
+
+ - name: '{{ intname2 }}'
+ mode: access
+ access_vlan: 15
+ state: absent
+
+- debug: msg="END connection={{ ansible_connection }} nxos_l2_interface aggregate
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tests/common/sanity.yaml
new file mode 100644
index 00000000..91084d13
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interface/tests/common/sanity.yaml
@@ -0,0 +1,156 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_l2_interface sanity
+ test"
+
+- set_fact: intname="{{ nxos_int1 }}"
+
+- name: Interface selected for this test
+ debug: msg="{{ intname }}"
+
+- name: Setup interface
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id009
+ lines:
+ - default interface {{ intname }}
+
+- name: Setup - Ensure interface is layer2
+ cisco.nxos.nxos_interface:
+ interface: '{{ intname }}'
+ mode: layer2
+
+- name: Setup vlans
+ cisco.nxos.nxos_vlan:
+ vlan_range: 5-10,20
+
+- block:
+
+ - name: Ensure interface is in its default switchport state
+ cisco.nxos.nxos_l2_interface: &id008
+ name: '{{ intname }}'
+ state: unconfigured
+
+ - name: Ensure interface is configured for access vlan 20
+ register: result
+ cisco.nxos.nxos_l2_interface: &id001
+ name: '{{ intname }}'
+ mode: access
+ access_vlan: 20
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Sleep for 2 seconds on Fretta Platform
+ wait_for: timeout=2
+ when: platform is match("N9K-F")
+
+ - name: access vlan Idempotence
+ register: result
+ cisco.nxos.nxos_l2_interface: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Ensure interface only has vlans 5-10 as trunk vlans
+ register: result
+ cisco.nxos.nxos_l2_interface: &id003
+ name: '{{ intname }}'
+ mode: trunk
+ native_vlan: 10
+ trunk_allowed_vlans: 5-10
+
+ - assert: *id002
+
+ - name: trunk vlan Idempotence
+ register: result
+ cisco.nxos.nxos_l2_interface: *id003
+
+ - assert: *id004
+
+ - name: Ensure interface is a trunk port and ensure 2-50 are being tagged (doesn't
+ mean others aren't also being tagged)
+ register: result
+ cisco.nxos.nxos_l2_interface: &id005
+ name: '{{ intname }}'
+ mode: trunk
+ native_vlan: 10
+ trunk_vlans: 2-50
+
+ - assert: *id002
+
+ - name: tag vlan Idempotence
+ register: result
+ cisco.nxos.nxos_l2_interface: *id005
+
+ - assert: *id004
+
+ - name: Remove full trunk vlan range 2-50
+ register: result
+ cisco.nxos.nxos_l2_interface: &id006
+ name: '{{ intname }}'
+ mode: trunk
+ trunk_vlans: 2-50
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence Remove full trunk vlan range 2-50
+ register: result
+ cisco.nxos.nxos_l2_interface: *id006
+
+ - assert: *id004
+
+ - name: Reconfigure interface trunk port and ensure 2-50 are being tagged
+ register: result
+ cisco.nxos.nxos_l2_interface: *id005
+
+ - assert: *id002
+
+ - name: Check Idempotence Reconfigure interface trunk port and ensure 2-50 are
+ being tagged
+ register: result
+ cisco.nxos.nxos_l2_interface: *id005
+
+ - assert: *id004
+
+ - name: Remove partial trunk vlan range 30-4094 are removed
+ register: result
+ cisco.nxos.nxos_l2_interface: &id007
+ name: '{{ intname }}'
+ mode: trunk
+ trunk_vlans: 30-4094
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence Remove partial trunk vlan range 30-4094 are removed
+ register: result
+ cisco.nxos.nxos_l2_interface: *id007
+
+ - assert: *id004
+
+ - name: put interface default state
+ register: result
+ cisco.nxos.nxos_l2_interface: *id008
+
+ - assert: *id002
+
+ - name: default state idempotence
+ register: result
+ cisco.nxos.nxos_l2_interface: *id008
+
+ - assert: *id004
+ always:
+
+ - name: remove vlans
+ ignore_errors: true
+ cisco.nxos.nxos_vlan:
+ vlan_range: 5-10,20
+ state: absent
+
+ - name: default interface
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id009
+
+- debug: msg="END connection={{ ansible_connection }} nxos_l2_interface sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..073787b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..29193c00
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tasks/main.yaml
@@ -0,0 +1,7 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tasks/nxapi.yaml
new file mode 100644
index 00000000..e6144de9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..7c9a1c1c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/_populate_config.yaml
@@ -0,0 +1,18 @@
+- name: Populate interface - 1
+ cisco.nxos.nxos_config:
+ lines:
+ - "switchport"
+ - "switchport access vlan 6"
+ - "switchport trunk allowed vlan 200"
+ parents: "interface {{ nxos_int1 }}"
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+
+- name: Populate interface - 2
+ cisco.nxos.nxos_config:
+ lines:
+ - "switchport"
+ - "switchport trunk native vlan 10"
+ parents: "interface {{ nxos_int2 }}"
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..dc451877
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/_remove_config.yaml
@@ -0,0 +1,8 @@
+- name: Cleanup
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - "default interface {{ nxos_int1 }}"
+ - "default interface {{ nxos_int2 }}"
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/deleted.yaml
new file mode 100644
index 00000000..159cd5ce
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/deleted.yaml
@@ -0,0 +1,69 @@
+---
+- debug:
+ msg: Start nxos_l2_interfaces deleted integration tests connection={{ ansible_connection }}
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+
+- name: setup1
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id002
+ lines:
+ - "default interface {{ test_int1 }}"
+ - "default interface {{ test_int2 }}"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "switchport"
+ - "switchport trunk native vlan 10"
+ parents: "interface {{ test_int1 }}"
+
+ - name: setup3
+ cisco.nxos.nxos_config:
+ lines:
+ - "switchport"
+ - "switchport mode trunk"
+ - "switchport trunk allowed vlan 20"
+ parents: "interface {{ test_int2 }}"
+
+ - name: Gather l2_interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l2_interfaces
+
+ - name: deleted
+ register: result
+ cisco.nxos.nxos_l2_interfaces: &id001
+ state: deleted
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.before)|length
+ == 0
+ - result.changed == true
+ - "'interface {{ test_int1 }}' in result.commands"
+ - "'no switchport trunk native vlan' in result.commands"
+ - "'interface {{ test_int2 }}' in result.commands"
+ - "'no switchport mode' in result.commands"
+ - "'no switchport trunk allowed vlan' in result.commands"
+ - result.commands|length == 5
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_l2_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id002
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/empty_config.yaml
new file mode 100644
index 00000000..58da74ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/empty_config.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START nxos_lacp empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_l2_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_lacp empty_config integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/gathered.yaml
new file mode 100644
index 00000000..202112e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/gathered.yaml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: START nxos_l2_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather l2_interfaces facts from the device using nxos_l2_interfaces
+ register: result
+ cisco.nxos.nxos_l2_interfaces:
+ state: gathered
+
+ - assert:
+ that: "{{ result['gathered'][:2] | symmetric_difference(gathered)\
+ \ |length == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+ - debug:
+ msg: END nxos_l2_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/merged.yaml
new file mode 100644
index 00000000..91f7624b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/merged.yaml
@@ -0,0 +1,103 @@
+---
+- debug:
+ msg: Start nxos_l2_interfaces merged integration tests connection={{ ansible_connection }}
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+
+- name: setup1
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id003
+ lines:
+ - "default interface {{ test_int1 }}"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ test_int1 }}"
+ - " switchport"
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_l2_interfaces: &id001
+ config:
+ - name: '{{ test_int1 }}'
+ access:
+ vlan: 6
+ trunk:
+ allowed_vlans: 200
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface {{ test_int1 }}' in result.commands"
+ - "'switchport access vlan 6' in result.commands"
+ - "'switchport trunk allowed vlan 200' in result.commands"
+ - result.commands|length == 3
+
+ - name: Gather l2_interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l2_interfaces
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.after) == []
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_l2_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: Merge with existing vlans
+ register: result
+ cisco.nxos.nxos_l2_interfaces: &id002
+ config:
+
+ - name: '{{ test_int1 }}'
+ mode: trunk
+ trunk:
+ allowed_vlans: 10-12
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface {{ test_int1 }}' in result.commands"
+ - "'switchport mode trunk' in result.commands"
+ - "'switchport trunk allowed vlan add 10,11,12' in result.commands"
+ - result.commands|length == 3
+
+ - name: Gather l2_interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l2_interfaces
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.after) == []
+
+ - name: Idempotence - with newly added vlans
+ register: result
+ cisco.nxos.nxos_l2_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id003
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/overridden.yaml
new file mode 100644
index 00000000..44e7e1b9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/overridden.yaml
@@ -0,0 +1,79 @@
+---
+- debug:
+ msg: Start nxos_l2_interfaces overridden integration tests connection={{ ansible_connection }}
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+
+- name: setup1
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id003
+ lines:
+ - "default interface {{ test_int1 }}"
+ - "default interface {{ test_int2 }}"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "switchport"
+ - "switchport trunk allowed vlan 11"
+ parents: "interface {{ test_int1 }}"
+
+ - name: setup3
+ cisco.nxos.nxos_config:
+ lines:
+ - "switchport"
+ parents: "interface {{ test_int2 }}"
+
+ - name: Gather l2_interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l2_interfaces
+
+ - name: Overridden
+ register: result
+ cisco.nxos.nxos_l2_interfaces: &id002
+ config:
+
+ - name: '{{ test_int2 }}'
+ access:
+ vlan: 6
+ trunk:
+ allowed_vlans: 10-12
+ state: overridden
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.before) == []
+ - result.changed == true
+ - "'interface {{ test_int1 }}' in result.commands"
+ - "'no switchport trunk allowed vlan' in result.commands"
+ - "'interface {{ test_int2 }}' in result.commands"
+ - "'switchport access vlan 6' in result.commands"
+ - "'switchport trunk allowed vlan 10,11,12' in result.commands"
+
+ - name: Gather l2_interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.after) == []
+
+ - name: Idempotence - Overridden
+ register: result
+ cisco.nxos.nxos_l2_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id003
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/parsed.yaml
new file mode 100644
index 00000000..96b13bc5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/parsed.yaml
@@ -0,0 +1,35 @@
+---
+- debug:
+ msg: START nxos_l2_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+ # Interfaces used in the task don't actually exist on the appliance
+ - name: Use parsed state to convert externally supplied config to structured format
+ register: result
+ cisco.nxos.nxos_l2_interfaces:
+ running_config: |
+ interface nve1
+ no shutdown
+ host-reachability protocol bgp
+ advertise virtual-rmac
+ source-interface loopback1
+ interface Ethernet1/800
+ switchport access vlan 18
+ switchport trunk allowed vlan 210
+ interface Ethernet1/801
+ switchport trunk allowed vlan 2,4,15
+ interface Ethernet1/802
+ switchport mode fex-fabric
+ interface Ethernet1/803
+ switchport mode fabricpath
+ interface loopback1
+ state: parsed
+
+ - assert:
+ that: "{{ parsed | symmetric_difference(result['parsed']) |length==0\
+ \ }}"
+
+- debug:
+ msg: END nxos_l2_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/rendered.yaml
new file mode 100644
index 00000000..80bd0011
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/rendered.yaml
@@ -0,0 +1,52 @@
+---
+- debug:
+ msg: START nxos_l2_interfaces rendered integration tests on connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- name: Gather pre-facts
+ cisco.nxos.nxos_facts:
+ gather_subset: ['!all', '!min']
+ gather_network_resources: l2_interfaces
+
+- block:
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: Ethernet1/1
+ trunk:
+ native_vlan: 10
+ allowed_vlans: 2,4,15
+ - name: Ethernet1/2
+ access:
+ vlan: 30
+ - name: Ethernet1/3
+ trunk:
+ native_vlan: 20
+ allowed_vlans: 5-10, 15
+ - name: Ethernet1/4
+ mode: fex-fabric
+ - name: Ethernet1/5
+ mode: fabricpath
+ state: rendered
+
+ - assert:
+ that: "{{ rendered | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather l2_interfaces facts from the device and assert that its empty
+ register: result
+ cisco.nxos.nxos_l2_interfaces:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the
+ device
+ assert:
+ that: "{{ result['gathered']|symmetric_difference(ansible_facts.network_resources.l2_interfaces) == [] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_l2_interfaces rendered integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/replaced.yaml
new file mode 100644
index 00000000..243358db
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/replaced.yaml
@@ -0,0 +1,83 @@
+---
+- debug:
+ msg: Start nxos_l2_interfaces replaced integration tests connection={{ ansible_connection }}
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+
+- name: setup1
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id003
+ lines:
+ - "default interface {{ test_int1 }}"
+ - "default interface {{ test_int2 }}"
+
+- block:
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "switchport"
+ - "switchport access vlan 5"
+ parents: "interface {{ test_int1 }}"
+
+ - name: setup3
+ cisco.nxos.nxos_config:
+ lines:
+ - "switchport"
+ - "switchport trunk native vlan 15"
+ - "switchport trunk allowed vlan 25-27"
+ parents: "interface {{ test_int2 }}"
+
+ - name: Gather l2_interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l2_interfaces
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_l2_interfaces: &id002
+ config:
+ - name: '{{ test_int1 }}'
+ access:
+ vlan: 8
+ trunk:
+ allowed_vlans: 10-12
+
+ - name: '{{ test_int2 }}'
+ trunk:
+ allowed_vlans: 25-27
+ state: replaced
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface {{ test_int1 }}' in result.commands"
+ - "'switchport access vlan 8' in result.commands"
+ - "'switchport trunk allowed vlan 10,11,12' in result.commands"
+ - "'interface {{ test_int2 }}' in result.commands"
+ - "'no switchport trunk native vlan' in result.commands"
+ - result.commands|length == 5
+
+ - name: Gather l2_interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.after) == []
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_l2_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id003
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/rtt.yaml
new file mode 100644
index 00000000..9151442b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/tests/common/rtt.yaml
@@ -0,0 +1,74 @@
+---
+- debug:
+ msg: START nxos_l2_interfaces round trip integration tests on connection={{ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ - name: Prepare interfaces (switch to L2)
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: "{{ nxos_int1 }}"
+ mode: layer2
+ - name: "{{ nxos_int2 }}"
+ mode: layer2
+ - name: "{{ nxos_int3 }}"
+ mode: layer2
+ state: merged
+
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: "{{ nxos_int1 }}"
+ trunk:
+ native_vlan: 10
+ allowed_vlans: 2,4,15
+ - name: "{{ nxos_int2 }}"
+ access:
+ vlan: 30
+ state: merged
+ tags: base_config
+
+ - name: Gather interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - l2_interfaces
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.nxos.nxos_l2_interfaces:
+ config:
+ - name: "{{ nxos_int1 }}"
+ trunk:
+ native_vlan: 20
+ - name: "{{ nxos_int2 }}"
+ access:
+ vlan: 31
+ - name: "{{ nxos_int3 }}"
+ trunk:
+ native_vlan: 20
+ allowed_vlans: 5-10, 15
+ state: overridden
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.nxos.nxos_l2_interfaces:
+ config: "{{ ansible_facts['network_resources']['l2_interfaces'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - "{{ base_config['after'] == revert['after'] }}"
+ always:
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_l2_interfaces round trip integration tests on connection={{ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/vars/main.yml
new file mode 100644
index 00000000..ffba3095
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l2_interfaces/vars/main.yml
@@ -0,0 +1,40 @@
+gathered:
+ - name: "{{ nxos_int1 }}"
+ access:
+ vlan: 6
+ trunk:
+ allowed_vlans: "200"
+
+ - name: "{{ nxos_int2 }}"
+ trunk:
+ native_vlan: 10
+
+parsed:
+ - name: nve1
+ - name: Ethernet1/800
+ access:
+ vlan: 18
+ trunk:
+ allowed_vlans: "210"
+ - name: Ethernet1/801
+ trunk:
+ allowed_vlans: "2,4,15"
+ - name: Ethernet1/802
+ mode: fex-fabric
+ - name: Ethernet1/803
+ mode: fabricpath
+ - name: loopback1
+
+rendered:
+ - "interface Ethernet1/1"
+ - "switchport trunk allowed vlan 2,4,15"
+ - "switchport trunk native vlan 10"
+ - "interface Ethernet1/2"
+ - "switchport access vlan 30"
+ - "interface Ethernet1/3"
+ - "switchport trunk allowed vlan 5,6,7,8,9,10,15"
+ - "switchport trunk native vlan 20"
+ - "interface Ethernet1/4"
+ - "switchport mode fex-fabric"
+ - "interface Ethernet1/5"
+ - "switchport mode fabricpath"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tests/cli/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tests/cli/sanity.yaml
new file mode 100644
index 00000000..d36376fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tests/cli/sanity.yaml
@@ -0,0 +1,125 @@
+---
+- debug: msg="START TRANSPORT:CLI nxos_l3_interface sanity test"
+
+- set_fact: testint2="{{ nxos_int2 }}"
+
+- set_fact: testint3="{{ nxos_int3 }}"
+
+- set_fact: ipv6_address=""
+
+- set_fact: ipv6_address="33:db::2/8"
+ when: ipv6_supported
+
+- name: Setup - remove address from interface prior to testing(Part1)
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no ip address 192.168.22.1/24
+ parents: no switchport
+ before: interface {{ testint2 }}
+
+- name: Setup - remove address from interface prior to testing(Part2)
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no ip address 192.168.20.1/24
+ - no ipv6 address 33:db::2/8
+ parents: no switchport
+ before: interface {{ testint3 }}
+
+- name: Setup - Ensure interfaces are layer3
+ cisco.nxos.nxos_interface:
+ aggregate:
+
+ - name: '{{ testint2 }}'
+
+ - name: '{{ testint3 }}'
+ mode: layer3
+
+- name: Configure ipv4 address to interface
+ register: result
+ cisco.nxos.nxos_l3_interface: &id001
+ name: '{{ testint2 }}'
+ ipv4: 192.168.22.1/24
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Configure ipv4 address to interface(Idempotence)
+ register: result
+ cisco.nxos.nxos_l3_interface: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Remove ipv4 address from interface
+ register: result
+ cisco.nxos.nxos_l3_interface: &id002
+ name: '{{ testint2 }}'
+ ipv4: 192.168.22.1/24
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Remove ipv4 address from interface(Idempotence)
+ register: result
+ cisco.nxos.nxos_l3_interface: *id002
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Configure address to interfaces aggregate
+ register: result
+ cisco.nxos.nxos_l3_interface: &id003
+ aggregate:
+
+ - name: '{{ testint2 }}'
+ ipv4: 192.168.22.1/24
+
+ - name: '{{ testint3 }}'
+ ipv4: 192.168.20.1/24
+ ipv6: '{{ ipv6_address }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Configure address to interfaces aggregate(Idempotence)
+ register: result
+ cisco.nxos.nxos_l3_interface: *id003
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Remove address from interfaces aggregate
+ register: result
+ cisco.nxos.nxos_l3_interface: &id004
+ aggregate:
+
+ - name: '{{ testint2 }}'
+ ipv4: 192.168.22.1/24
+
+ - name: '{{ testint3 }}'
+ ipv4: 192.168.20.1/24
+ ipv6: '{{ ipv6_address }}'
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Remove address from interfaces aggregate(Idempotence)
+ register: result
+ cisco.nxos.nxos_l3_interface: *id004
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END TRANSPORT:CLI nxos_l3_interface sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tests/nxapi/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tests/nxapi/sanity.yaml
new file mode 100644
index 00000000..903da370
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interface/tests/nxapi/sanity.yaml
@@ -0,0 +1,121 @@
+---
+- debug: msg="START TRANSPORT:NXAPI nxos_l3_interface sanity test"
+
+- set_fact: testint2="{{ nxos_int2 }}"
+
+- set_fact: testint3="{{ nxos_int3 }}"
+
+- set_fact: ipv6_address=""
+
+- set_fact: ipv6_address="33:db::2/8"
+ when: ipv6_supported
+
+- name: Setup - Remove address from interfaces aggregate
+ ignore_errors: true
+ cisco.nxos.nxos_l3_interface:
+ aggregate:
+
+ - name: '{{ testint2 }}'
+ ipv4: 192.168.22.1/24
+
+ - name: '{{ testint3 }}'
+ ipv4: 192.168.20.1/24
+ ipv6: '{{ ipv6_address }}'
+ state: absent
+
+- name: Setup - Ensure interfaces are layer3
+ cisco.nxos.nxos_interface:
+ aggregate:
+
+ - name: '{{ testint2 }}'
+
+ - name: '{{ testint3 }}'
+ mode: layer3
+
+- name: Configure ipv4 address to interface
+ register: result
+ cisco.nxos.nxos_l3_interface: &id001
+ name: '{{ testint2 }}'
+ ipv4: 192.168.22.1/24
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Configure ipv4 address to interface(Idempotence)
+ register: result
+ cisco.nxos.nxos_l3_interface: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Remove ipv4 address from interface
+ register: result
+ cisco.nxos.nxos_l3_interface: &id002
+ name: '{{ testint2 }}'
+ ipv4: 192.168.22.1/24
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Remove ipv4 address from interface(Idempotence)
+ register: result
+ cisco.nxos.nxos_l3_interface: *id002
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Configure address to interfaces aggregate
+ register: result
+ cisco.nxos.nxos_l3_interface: &id003
+ aggregate:
+
+ - name: '{{ testint2 }}'
+ ipv4: 192.168.22.1/24
+
+ - name: '{{ testint3 }}'
+ ipv4: 192.168.20.1/24
+ ipv6: '{{ ipv6_address }}'
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Configure address to interfaces aggregate(Idempotence)
+ register: result
+ cisco.nxos.nxos_l3_interface: *id003
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Remove address from interfaces aggregate
+ register: result
+ cisco.nxos.nxos_l3_interface: &id004
+ aggregate:
+
+ - name: '{{ testint2 }}'
+ ipv4: 192.168.22.1/24
+
+ - name: '{{ testint3 }}'
+ ipv4: 192.168.20.1/24
+ ipv6: '{{ ipv6_address }}'
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Remove address from interfaces aggregate(Idempotence)
+ register: result
+ cisco.nxos.nxos_l3_interface: *id004
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END TRANSPORT:NXAPI nxos_l3_interface sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..073787b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..8eefce04
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- set_fact:
+ rsvd_intf: "{{ rsvd_intf|default('mgmt0') }}"
+
+- block:
+ - include: cli.yaml
+ tags:
+ - cli
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tasks/nxapi.yaml
new file mode 100644
index 00000000..e6144de9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..8d5e2a39
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/_populate_config.yaml
@@ -0,0 +1,17 @@
+- name: Populate config - 1
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ nxos_int1 }}"
+ - " no switchport"
+ - " ip redirects"
+ - " ip address 192.0.2.100/24"
+
+- name: Populate config - 2
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ nxos_int2 }}"
+ - " no switchport"
+ - " no ip redirects"
+ - " ip unreachables"
+ - " ip address 203.0.113.10/24"
+ - " ipv6 address 2001:db8::1/32"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..1bad31bc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/_remove_config.yaml
@@ -0,0 +1,7 @@
+- name: Remove Config
+ cisco.nxos.nxos_config:
+ lines:
+ - "default interface {{ nxos_int1 }}"
+ - "default interface {{ nxos_int2 }}"
+ - "default interface {{ nxos_int3 }}"
+ ignore_errors: True
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/deleted.yaml
new file mode 100644
index 00000000..30e67f61
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/deleted.yaml
@@ -0,0 +1,70 @@
+---
+- debug:
+ msg: Start nxos_l3_interfaces deleted integration tests connection={{ ansible_connection }}
+
+- set_fact:
+ test_int3: '{{ nxos_int3 }}'
+ subint3: '{{ nxos_int3 }}.42'
+
+- include_tasks: _remove_config.yaml
+
+- name: setup1
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - "no system default switchport"
+ - "default interface {{ test_int3 }}"
+ - "interface {{ test_int3 }}"
+ - " no switchport"
+
+- block:
+
+ - name: setup3
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ subint3 }}"
+ - " encapsulation dot1q 42"
+ - " ip address 192.168.10.2/24"
+ - " no ip redirects"
+ - " ip unreachables"
+
+ - name: Gather l3_interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l3_interfaces
+
+ - name: deleted
+ register: result
+ cisco.nxos.nxos_l3_interfaces: &id001
+ config:
+ - name: "{{ subint3 }}"
+ state: deleted
+
+ - assert:
+ that:
+ - result.before|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == []
+ - result.changed == true
+ - "'interface {{ subint3 }}' in result.commands"
+ - "'no encapsulation dot1q' in result.commands"
+ - "'ip redirects' in result.commands"
+ - "'no ip unreachables' in result.commands"
+ - "'no ip address' in result.commands"
+ - result.commands|length == 5
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_l3_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - "no interface {{ subint3 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/empty_config.yaml
new file mode 100644
index 00000000..41aec5d7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/empty_config.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START nxos_l3_interfaces empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_l3_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_l3_interfaces empty_config integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/gathered.yaml
new file mode 100644
index 00000000..3fbc4e54
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/gathered.yaml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START nxos_l3_interfaces gathered integration tests on connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather l3_interfaces facts from the device using nxos_l3_interfaces
+ register: result
+ cisco.nxos.nxos_l3_interfaces:
+ state: gathered
+
+ - assert:
+ that: "{{ result['gathered'][:2] | symmetric_difference(gathered)\
+ \ |length == 0 }}"
+
+ always:
+ - include_tasks: _remove_config.yaml
+
+ - debug:
+ msg: END nxos_l3_interfaces gathered integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/merged.yaml
new file mode 100644
index 00000000..2b652d79
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/merged.yaml
@@ -0,0 +1,73 @@
+---
+- debug:
+ msg: Start nxos_l3_interfaces merged integration tests connection={{ ansible_connection }}
+
+- set_fact:
+ test_int3: '{{ nxos_int3 }}'
+ subint3: '{{ nxos_int3 }}.42'
+
+- include_tasks: _remove_config.yaml
+
+- name: setup1
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - "no system default switchport"
+ - "default interface {{ test_int3 }}"
+ - "interface {{ test_int3 }}"
+ - " no switchport"
+
+- block:
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_l3_interfaces: &id001
+ config:
+
+ - name: '{{ subint3 }}'
+ dot1q: 42
+ redirects: false
+ unreachables: true
+ ipv4:
+
+ - address: 192.168.10.2/24
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface {{ subint3 }}' in result.commands"
+ - "'encapsulation dot1q 42' in result.commands"
+ - "'no ip redirects' in result.commands"
+ - "'ip unreachables' in result.commands"
+ - "'ip address 192.168.10.2/24' in result.commands"
+ - result.commands|length == 5
+
+ - name: Gather l3_interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l3_interfaces
+
+ - assert:
+ that:
+ - result.after|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == []
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_l3_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown sub-interface
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - "no interface {{ subint3 }}"
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/multisite.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/multisite.yaml
new file mode 100644
index 00000000..c847d90b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/multisite.yaml
@@ -0,0 +1,379 @@
+---
+- debug:
+ msg: Start nxos_l3_interfaces multisite integration tests connection={{ ansible_connection }}
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+ test_int3: '{{ nxos_int3 }}'
+
+- include_tasks: _remove_config.yaml
+
+- name: Enable feature nv overlay - multisite
+ cisco.nxos.nxos_config:
+ commands:
+ - no feature nv overlay
+ - feature nv overlay
+ match: none
+
+- name: Enable nv overlay evpn - multisite
+ when: platform is search('N9K')
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - nv overlay evpn
+
+- name: Enable multisite border gateway - multisite
+ ignore_errors: true
+ register: multiout
+ cisco.nxos.nxos_config:
+ lines:
+ - evpn multisite border-gateway 10
+
+- block:
+
+ - name: setup1 - deleted
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - "no system default switchport"
+ - "default interface {{ test_int3 }}"
+ - "interface {{ test_int3 }}"
+ - " no switchport"
+
+ - name: setup3 - deleted
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ test_int3 }}"
+ - " ip address 192.168.10.2/24"
+ - " no ip redirects"
+ - " ip unreachables"
+ - " evpn multisite dci-tracking"
+
+ - name: Gather l3_interfaces facts deleted
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l3_interfaces
+
+ - name: deleted
+ register: result
+ cisco.nxos.nxos_l3_interfaces: &id001
+ config:
+ - name: "{{ test_int3 }}"
+ state: deleted
+
+ - assert:
+ that:
+ - result.before|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == []
+ - result.changed == true
+ - "'interface {{ test_int3 }}' in result.commands"
+ - "'ip redirects' in result.commands"
+ - "'no ip unreachables' in result.commands"
+ - "'no ip address' in result.commands"
+ - "'no evpn multisite dci-tracking' in result.commands"
+ - result.commands|length == 5
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_l3_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - include_tasks: _remove_config.yaml
+
+ - name: setup1 - merged
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - "no system default switchport"
+ - "default interface {{ test_int3 }}"
+ - "interface {{ test_int3 }}"
+ - " no switchport"
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_l3_interfaces: &id002
+ config:
+
+ - name: '{{ test_int3 }}'
+ redirects: false
+ unreachables: true
+ evpn_multisite_tracking: fabric-tracking
+ ipv4:
+
+ - address: 192.168.10.2/24
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface {{ test_int3 }}' in result.commands"
+ - "'no ip redirects' in result.commands"
+ - "'ip unreachables' in result.commands"
+ - "'ip address 192.168.10.2/24' in result.commands"
+ - "'evpn multisite fabric-tracking' in result.commands"
+ - result.commands|length == 5
+
+ - name: Gather l3_interfaces facts - merged
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l3_interfaces
+
+ - assert:
+ that:
+ - result.after|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == []
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_l3_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - include_tasks: _remove_config.yaml
+
+ - name: setup1 - replaced
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - "no system default switchport"
+ - "default interface {{ test_int3 }}"
+ - "interface {{ test_int3 }}"
+ - " no switchport"
+
+ - name: setup3 - replaced
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ test_int3 }}"
+ - " ip address 192.168.10.2/24"
+ - " no ip redirects"
+ - " ip unreachables"
+ - " evpn multisite dci-tracking"
+
+ - name: Gather l3_interfaces facts
+ cisco.nxos.nxos_facts: &id003
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l3_interfaces
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_l3_interfaces: &id004
+ config:
+
+ - name: '{{ test_int3 }}'
+ redirects: false
+ unreachables: false
+ evpn_multisite_tracking: fabric-tracking
+ ipv4:
+
+ - address: 192.168.20.2/24
+ tag: 5
+
+ - address: 192.168.200.2/24
+ secondary: true
+ state: replaced
+
+ - assert:
+ that:
+ - result.before|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == []
+ - result.changed == true
+ - "'interface {{ test_int3 }}' in result.commands"
+ - "'no ip unreachables' in result.commands"
+ - "'ip address 192.168.20.2/24 tag 5' in result.commands"
+ - "'ip address 192.168.200.2/24 secondary' in result.commands"
+ - "'evpn multisite fabric-tracking' in result.commands"
+ - result.commands|length == 5
+
+ - name: Gather l3_interfaces post facts
+ cisco.nxos.nxos_facts: *id003
+
+ - assert:
+ that:
+ - result.after|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == []
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_l3_interfaces: *id004
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - include_tasks: _remove_config.yaml
+
+ - name: setup1 - overidden
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id005
+ lines:
+ - "no system default switchport"
+ - "default interface {{ item }}"
+ - "interface {{ item }}"
+ - " no switchport"
+ loop:
+ - "{{ test_int1 }}"
+ - "{{ test_int2 }}"
+ - "{{ test_int3 }}"
+
+ - name: setup3 - overidden
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ test_int1 }}"
+ - " ip address 192.168.10.2/24 tag 5"
+ - " evpn multisite fabric-tracking"
+ - "interface {{ test_int2 }}"
+ - " ip address 10.1.1.1/24"
+ - " evpn multisite dci-tracking"
+
+ - name: Gather l3_interfaces facts
+ cisco.nxos.nxos_facts: &id006
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l3_interfaces
+
+ - name: Store reserved interface IP config
+ set_fact:
+ mgmt: "{{ ansible_facts.network_resources.l3_interfaces|selectattr('name', 'equalto', rsvd_intf)|list }}"
+ overriden_config:
+ - name: '{{ test_int3 }}'
+ ipv4:
+ - address: 10.1.1.3/24
+ evpn_multisite_tracking: dci-tracking
+
+ - name: Overridden
+ register: result
+ cisco.nxos.nxos_l3_interfaces: &id007
+ config: "{{ overriden_config + mgmt }}"
+ state: overridden
+
+ - assert:
+ that:
+ - result.before|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == []
+ - result.changed == true
+ - "'interface {{ test_int1 }}' in result.commands"
+ - "'no ip address' in result.commands"
+ - "'no evpn multisite fabric-tracking' in result.commands"
+ - "'interface {{ test_int2 }}' in result.commands"
+ - "'no ip address' in result.commands"
+ - "'no evpn multisite dci-tracking' in result.commands"
+ - "'interface {{ test_int3 }}' in result.commands"
+ - "'ip address 10.1.1.3/24' in result.commands"
+ - "'evpn multisite dci-tracking' in result.commands"
+ - result.commands|length == 9
+
+ - name: Gather l3_interfaces post facts
+ cisco.nxos.nxos_facts: *id006
+
+ - assert:
+ that:
+ - result.after|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == []
+
+ - name: Idempotence - Overridden
+ register: result
+ cisco.nxos.nxos_l3_interfaces: *id007
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: teardown - overdidden
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id005
+ loop:
+ - "{{ test_int1 }}"
+ - "{{ test_int2 }}"
+ - "{{ test_int3 }}"
+
+ - name: Gather pre-facts
+ cisco.nxos.nxos_facts:
+ gather_subset: ['!all', '!min']
+ gather_network_resources: l3_interfaces
+
+ # Interfaces used here doesn't actually exist on the device
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: Ethernet1/800
+ ipv4:
+ - address: 192.168.1.100/24
+ tag: 5
+ - address: 10.1.1.1/24
+ secondary: True
+ tag: 10
+ evpn_multisite_tracking: fabric-tracking
+ - name: Ethernet1/800
+ ipv6:
+ - address: fd5d:12c9:2201:2::1/64
+ tag: 6
+ evpn_multisite_tracking: dci-tracking
+ state: rendered
+
+ - assert:
+ that: "{{ rendered_multi | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather l3_interfaces facts from the device and assert that its empty
+ register: result
+ cisco.nxos.nxos_l3_interfaces:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the device
+ assert:
+ that: "{{ result['gathered']|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == [] }}"
+
+ - include_tasks: _remove_config.yaml
+
+ # Interfaces used in the task don't actually exist on the appliance
+ - name: Use parsed state to convert externally supplied config to structured format
+ register: result
+ cisco.nxos.nxos_l3_interfaces:
+ running_config: |
+ interface Ethernet1/800
+ ip address 192.168.1.100/24 tag 5
+ ip address 10.1.1.1/24 secondary tag 10
+ no ip redirects
+ evpn multisite fabric-tracking
+ interface Ethernet1/801
+ ipv6 address fd5d:12c9:2201:2::1/64 tag 6
+ ip unreachables
+ evpn multisite dci-tracking
+ interface mgmt0
+ ip address dhcp
+ vrf member management
+ state: parsed
+
+ - assert:
+ that: "{{ parsed_multi | symmetric_difference(result['parsed']) |length==0\
+ \ }}"
+
+ when: multiout is not search("Invalid command")
+
+- name: Disable nv overlay evpn
+ when: platform is search('N9K')
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - no nv overlay evpn
+ match: none
+
+- name: Disable feature nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nve
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_l3_interfaces multisite test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/overridden.yaml
new file mode 100644
index 00000000..b05d613d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/overridden.yaml
@@ -0,0 +1,91 @@
+---
+- debug:
+ msg: Start nxos_l3_interfaces overridden integration tests connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+ test_int3: "{{ nxos_int3 }}"
+
+- name: setup1
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id003
+ lines:
+ - "no system default switchport"
+ - "default interface {{ item }}"
+ - "interface {{ item }}"
+ - " no switchport"
+ loop:
+ - "{{ test_int1 }}"
+ - "{{ test_int2 }}"
+ - "{{ test_int3 }}"
+
+- block:
+
+ - name: setup3
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ test_int1 }}"
+ - " ip address 192.168.10.2/24 tag 5"
+ - "interface {{ test_int2 }}"
+ - " ip address 10.1.1.1/24"
+
+ - name: Gather l3_interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l3_interfaces
+
+ - name: Store reserved interface IP config
+ set_fact:
+ mgmt: "{{ ansible_facts.network_resources.l3_interfaces|selectattr('name', 'equalto', rsvd_intf)|list }}"
+ overriden_config:
+ - name: '{{ test_int3 }}'
+ ipv4:
+ - address: 10.1.1.3/24
+
+ - name: Overridden
+ register: result
+ cisco.nxos.nxos_l3_interfaces: &id002
+ config: "{{ overriden_config + mgmt }}"
+ state: overridden
+
+ - assert:
+ that:
+ - result.before|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == []
+ - result.changed == true
+ - "'interface {{ test_int1 }}' in result.commands"
+ - "'no ip address' in result.commands"
+ - "'interface {{ test_int2 }}' in result.commands"
+ - "'no ip address' in result.commands"
+ - "'interface {{ test_int3 }}' in result.commands"
+ - "'ip address 10.1.1.3/24' in result.commands"
+ - result.commands|length == 6
+
+ - name: Gather l3_interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - result.after|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == []
+
+ - name: Idempotence - Overridden
+ register: result
+ cisco.nxos.nxos_l3_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id003
+ loop:
+ - "{{ test_int1 }}"
+ - "{{ test_int2 }}"
+ - "{{ test_int3 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/parsed.yaml
new file mode 100644
index 00000000..84deae97
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/parsed.yaml
@@ -0,0 +1,30 @@
+---
+- debug:
+ msg: START nxos_l3_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+ # Interfaces used in the task don't actually exist on the appliance
+ - name: Use parsed state to convert externally supplied config to structured format
+ register: result
+ cisco.nxos.nxos_l3_interfaces:
+ running_config: |
+ interface Ethernet1/800
+ ip address 192.168.1.100/24 tag 5
+ ip address 10.1.1.1/24 secondary tag 10
+ no ip redirects
+ interface Ethernet1/801
+ ipv6 address fd5d:12c9:2201:2::1/64 tag 6
+ ip unreachables
+ interface mgmt0
+ ip address dhcp
+ vrf member management
+ state: parsed
+
+ - assert:
+ that: "{{ parsed | symmetric_difference(result['parsed']) |length==0\
+ \ }}"
+
+- debug:
+ msg: END nxos_l3_interface parsed integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/rendered.yaml
new file mode 100644
index 00000000..cda45f09
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/rendered.yaml
@@ -0,0 +1,50 @@
+---
+- debug:
+ msg: START nxos_l3_interfaces rendered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+
+- name: Gather pre-facts
+ cisco.nxos.nxos_facts:
+ gather_subset: ['!all', '!min']
+ gather_network_resources: l3_interfaces
+
+- block:
+ # Interfaces used here doesn't actually exist on the device
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: Ethernet1/800
+ ipv4:
+ - address: 192.168.1.100/24
+ tag: 5
+ - address: 10.1.1.1/24
+ secondary: True
+ tag: 10
+ - name: Ethernet1/800
+ ipv6:
+ - address: fd5d:12c9:2201:2::1/64
+ tag: 6
+ state: rendered
+
+ - assert:
+ that: "{{ rendered | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather l3_interfaces facts from the device and assert that its empty
+ register: result
+ cisco.nxos.nxos_l3_interfaces:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the device
+ assert:
+ that: "{{ result['gathered']|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == [] }}"
+
+ always:
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_l3_interfaces rendered integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/replaced.yaml
new file mode 100644
index 00000000..39b8bfb0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/replaced.yaml
@@ -0,0 +1,119 @@
+---
+- debug:
+ msg: Start nxos_l3_interfaces replaced integration tests connection={{ ansible_connection }}
+
+- set_fact:
+ test_int3: '{{ nxos_int3 }}'
+ subint3: '{{ nxos_int3 }}.42'
+
+- include_tasks: _remove_config.yaml
+
+- name: setup1
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - "no system default switchport"
+ - "default interface {{ test_int3 }}"
+ - "interface {{ test_int3 }}"
+ - " no switchport"
+
+- block:
+
+ - name: setup3
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ subint3 }}"
+ - " encapsulation dot1q 42"
+ - " ip address 192.168.10.2/24"
+ - " no ip redirects"
+ - " ip unreachables"
+
+ - name: Gather l3_interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: l3_interfaces
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_l3_interfaces: &id002
+ config:
+
+ - name: '{{ subint3 }}'
+ dot1q: 442
+ redirects: false
+ unreachables: false
+ ipv4:
+
+ - address: 192.168.20.2/24
+ tag: 5
+
+ - address: 192.168.200.2/24
+ secondary: true
+ state: replaced
+
+ - assert:
+ that:
+ - result.before|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == []
+ - result.changed == true
+ - "'interface {{ subint3 }}' in result.commands"
+ - "'encapsulation dot1q 442' in result.commands"
+ - "'no ip unreachables' in result.commands"
+ - "'ip address 192.168.20.2/24 tag 5' in result.commands"
+ - "'ip address 192.168.200.2/24 secondary' in result.commands"
+ - result.commands|length == 5
+
+ - name: Gather l3_interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - result.after|symmetric_difference(ansible_facts.network_resources.l3_interfaces) == []
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_l3_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: Replaced with no optional attrs specified
+ register: result
+ cisco.nxos.nxos_l3_interfaces: &id003
+ config:
+
+ - name: '{{ subint3 }}'
+ state: replaced
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface {{ subint3 }}' in result.commands"
+ - "'no encapsulation dot1q' in result.commands"
+ - "'no ip address' in result.commands"
+
+ - assert:
+ that:
+ - "'ip redirects' in result.commands"
+ when: platform is match('N[3567]')
+
+ - name: Idempotence - Replaced with no attrs specified
+ register: result
+ cisco.nxos.nxos_l3_interfaces: *id003
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown sub-interface
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - "no interface {{ subint3 }}"
+
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/rtt.yaml
new file mode 100644
index 00000000..65fc05e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/tests/common/rtt.yaml
@@ -0,0 +1,89 @@
+---
+- debug:
+ msg: START nxos_l3_interfaces round trip integration tests on connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ - name: Prepare interfaces (switch to L3)
+ cisco.nxos.nxos_interfaces:
+ config:
+ - name: "{{ nxos_int1 }}"
+ mode: layer3
+ - name: "{{ nxos_int2 }}"
+ mode: layer3
+ - name: "{{ nxos_int3 }}"
+ mode: layer3
+ state: merged
+
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.nxos.nxos_l3_interfaces:
+ config:
+ - name: "{{ nxos_int1 }}"
+ ipv4:
+ - address: 192.0.2.49/28
+ tag: 5
+ - address: 198.51.100.65/27
+ secondary: true
+ tag: 10
+ ipv6:
+ - address: 2001:db8:2000::1/32
+ tag: 6
+ - name: "{{ nxos_int2 }}"
+ ipv4:
+ - address: 192.0.2.81/28
+ state: merged
+ tags: base_config
+
+ - name: Gather interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - l3_interfaces
+
+ - name: Set reserved interface IP config and config to revert
+ set_fact:
+ mgmt: "{{ ansible_facts.network_resources.l3_interfaces|selectattr('name', 'equalto', rsvd_intf)|list }}"
+ config_to_revert:
+ - name: "{{ nxos_int1 }}"
+ ipv4:
+ - address: 203.0.113.67/26
+ - name: "{{ nxos_int2 }}"
+ ipv4:
+ - address: 198.51.100.10/24
+ tag: 7
+ - address: 198.51.100.130/25
+ secondary: true
+ tag: 11
+ - name: "{{ nxos_int3 }}"
+ ipv6:
+ - address: 2001:db8::20/32
+ tag: 6
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.nxos.nxos_l3_interfaces:
+ config: "{{ config_to_revert + mgmt }}"
+ state: overridden
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.nxos.nxos_l3_interfaces:
+ config: "{{ ansible_facts['network_resources']['l3_interfaces'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - base_config['after'] == revert['after']
+ always:
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_l3_interfaces round trip integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/vars/main.yml
new file mode 100644
index 00000000..a954978f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_l3_interfaces/vars/main.yml
@@ -0,0 +1,65 @@
+gathered:
+ - name: "{{ nxos_int1 }}"
+ ipv4:
+ - address: 192.0.2.100/24
+ - name: "{{ nxos_int2 }}"
+ ipv4:
+ - address: 203.0.113.10/24
+ ipv6:
+ - address: 2001:db8::1/32
+ redirects: False
+ unreachables: True
+
+rendered:
+ - "interface Ethernet1/800"
+ - "ip address 192.168.1.100/24 tag 5"
+ - "ip address 10.1.1.1/24 secondary tag 10"
+ - "interface Ethernet1/800"
+ - "ipv6 address fd5d:12c9:2201:2::1/64 tag 6"
+
+parsed:
+ - name: Ethernet1/800
+ ipv4:
+ - address: 192.168.1.100/24
+ tag: 5
+ - address: 10.1.1.1/24
+ secondary: True
+ tag: 10
+ redirects: False
+ - name: Ethernet1/801
+ ipv6:
+ - address: fd5d:12c9:2201:2::1/64
+ tag: 6
+ unreachables: True
+ - name: mgmt0
+ ipv4:
+ - address: dhcp
+
+rendered_multi:
+ - "interface Ethernet1/800"
+ - "ip address 192.168.1.100/24 tag 5"
+ - "ip address 10.1.1.1/24 secondary tag 10"
+ - "evpn multisite fabric-tracking"
+ - "interface Ethernet1/800"
+ - "ipv6 address fd5d:12c9:2201:2::1/64 tag 6"
+ - "evpn multisite dci-tracking"
+
+parsed_multi:
+ - name: Ethernet1/800
+ ipv4:
+ - address: 192.168.1.100/24
+ tag: 5
+ - address: 10.1.1.1/24
+ secondary: True
+ tag: 10
+ redirects: False
+ evpn_multisite_tracking: fabric-tracking
+ - name: Ethernet1/801
+ ipv6:
+ - address: fd5d:12c9:2201:2::1/64
+ tag: 6
+ unreachables: True
+ evpn_multisite_tracking: dci-tracking
+ - name: mgmt0
+ ipv4:
+ - address: dhcp
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tasks/cli.yaml
new file mode 100644
index 00000000..073787b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tasks/main.yaml
new file mode 100644
index 00000000..29193c00
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tasks/main.yaml
@@ -0,0 +1,7 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tasks/nxapi.yaml
new file mode 100644
index 00000000..e6144de9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..1959395c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/_populate_config.yaml
@@ -0,0 +1,5 @@
+# The CI NX-OS image doesn't support `lacp system-mac`
+- name: Setup
+ cisco.nxos.nxos_config:
+ lines:
+ - "lacp system-priority 10"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..a1520d81
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/_remove_config.yaml
@@ -0,0 +1,5 @@
+- name: Remove existing LACP config
+ cisco.nxos.nxos_config:
+ lines:
+ - "no lacp system-priority"
+ ignore_errors: True
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/deleted.yaml
new file mode 100644
index 00000000..476a73ff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/deleted.yaml
@@ -0,0 +1,72 @@
+---
+- debug:
+ msg: Start nxos_lacp deleted integration tests connection={{ ansible_connection }}
+
+- name: Enable lacp feature
+ cisco.nxos.nxos_feature:
+ feature: lacp
+
+- set_fact:
+ mac: lacp system-mac 00c1.4c00.bd15 role primary
+ when: platform is search('N9K') and imagetag is not search('I[2-6]')
+
+- block:
+
+ - name: Setup
+ cisco.nxos.nxos_config:
+ lines: lacp system-priority 11
+
+ - name: Setup
+ cisco.nxos.nxos_config:
+ lines: '{{ mac|default(omit) }}'
+
+ - name: Gather lacp facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lacp
+
+ - name: deleted
+ register: result
+ cisco.nxos.nxos_lacp: &id002
+ state: deleted
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lacp == result.before
+ - "'no lacp system-priority' in result.commands"
+ - result.changed == true
+ - result.commands|length == 1
+ when: platform is not search('N9K')
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lacp == result.before
+ - "'no lacp system-priority' in result.commands"
+ - "'no lacp system-mac' in result.commands"
+ - result.changed == true
+ - result.commands|length == 2
+ when: platform is search('N9K') and imagetag is not search('I[2-6]')
+
+ - name: Gather lacp post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - result.after|length == 0
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_lacp: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature:
+ feature: lacp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/empty_config.yaml
new file mode 100644
index 00000000..bb06efa3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/empty_config.yaml
@@ -0,0 +1,51 @@
+---
+- debug:
+ msg: START nxos_lacp empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lacp:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lacp:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lacp:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lacp:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_lacp empty_config integration tests on connection={{ ansible_connection }} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/gathered.yaml
new file mode 100644
index 00000000..311c2f03
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/gathered.yaml
@@ -0,0 +1,32 @@
+---
+- debug:
+ msg: START nxos_lacp gathered integration tests on connection={{ ansible_connection }}
+
+- name: Enable lacp
+ cisco.nxos.nxos_feature:
+ feature: lacp
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather lacp facts from the device using nxos_lacp
+ register: result
+ cisco.nxos.nxos_lacp:
+ state: gathered
+
+ - assert:
+ that: "{{ result['gathered'] == gathered }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: teardown
+ cisco.nxos.nxos_feature:
+ feature: lacp
+ state: disabled
+
+ - debug:
+ msg: END nxos_lacp gathered integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/merged.yaml
new file mode 100644
index 00000000..37db2256
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/merged.yaml
@@ -0,0 +1,67 @@
+---
+- debug:
+ msg: Start nxos_lacp merged integration tests connection={{ ansible_connection }}
+
+- name: Enable lacp
+ cisco.nxos.nxos_feature:
+ feature: lacp
+
+- set_fact:
+ mac:
+ address: 00c1.4c00.bd15
+ role: primary
+ when: platform is search('N9K') and imagetag is not search('I[2-6]')
+
+- block:
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_lacp: &id001
+ config:
+ system:
+ priority: 11
+ mac: '{{ mac|default(omit) }}'
+ state: merged
+
+ - assert:
+ that:
+ - result.before|length == 0
+ - result.changed == true
+ - "'lacp system-priority 11' in result.commands"
+ - "'lacp system-mac 00c1.4c00.bd15 role primary' in result.commands"
+ - result.commands|length == 2
+ when: platform is search('N9K') and imagetag is not search('I[2-6]')
+
+ - assert:
+ that:
+ - result.before|length == 0
+ - result.changed == true
+ - "'lacp system-priority 11' in result.commands"
+ - result.commands|length == 1
+ when: platform is not search('N9K')
+
+ - name: Gather lacp facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lacp
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lacp == result.after
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_lacp: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature:
+ feature: lacp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/parsed.yaml
new file mode 100644
index 00000000..6771d74f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/parsed.yaml
@@ -0,0 +1,18 @@
+---
+- debug:
+ msg: START nxos_lacp parsed integration tests on connection={{ ansible_connection }}
+
+- block:
+ - name: Use parsed state to convert externally supplied config to structured format
+ register: result
+ cisco.nxos.nxos_lacp:
+ running_config: |
+ lacp system-priority 10
+ lacp system-mac 00c1.4c00.bd15 role secondary
+ state: parsed
+
+ - assert:
+ that: "{{ parsed == result['parsed'] }}"
+
+- debug:
+ msg: END nxos_lacp parsed integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/rendered.yaml
new file mode 100644
index 00000000..126ac336
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/rendered.yaml
@@ -0,0 +1,37 @@
+---
+- debug:
+ msg: START nxos_lacp rendered integration tests on connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.nxos.nxos_lacp:
+ config:
+ system:
+ priority: 10
+ mac:
+ address: 00c1.4c00.bd15
+ role: secondary
+ state: rendered
+
+ - assert:
+ that: "{{ rendered | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather lacp facts from the device and assert that its empty
+ register: result
+ cisco.nxos.nxos_lacp:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the
+ device
+ assert:
+ that: "{{ result['gathered'] == {} }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_lacp rendered integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/replaced.yaml
new file mode 100644
index 00000000..2653b6b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/tests/common/replaced.yaml
@@ -0,0 +1,101 @@
+---
+- debug:
+ msg: Start nxos_lacp replaced integration tests connection={{ ansible_connection }}
+
+- name: Enable lacp feature
+ cisco.nxos.nxos_feature:
+ feature: lacp
+
+- set_fact:
+ mac1: lacp system-mac 00c1.4c00.bd20 role primary
+ mac2:
+ address: 00c1.4c00.bd15
+ role: secondary
+ when: platform is search('N9K') and imagetag is not search('I[2-6]')
+
+- block:
+
+ - name: Setup1
+ cisco.nxos.nxos_config:
+ lines: lacp system-priority 11
+
+ - name: Setup2
+ cisco.nxos.nxos_config:
+ lines: '{{ mac1|default(omit) }}'
+
+ - name: Gather lacp facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lacp
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_lacp: &id002
+ config:
+ system:
+ priority: 12
+ mac: '{{ mac2|default(omit) }}'
+ state: replaced
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lacp == result.before
+ - result.changed == true
+ - result.commands|length == 2
+ - "'no lacp system-priority' in result.commands"
+ - "'lacp system-priority 12' in result.commands"
+ when: platform is not search('N9K')
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lacp == result.before
+ - result.changed == true
+ - "'no lacp system-priority' in result.commands"
+ - "'no lacp system-mac' in result.commands"
+ - "'lacp system-priority 12' in result.commands"
+ - "'lacp system-mac 00c1.4c00.bd15 role secondary' in result.commands"
+ - result.commands|length == 4
+ when: platform is search('N9K') and imagetag is not search('I[2-6]')
+
+ - name: Gather lacp interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lacp == result.after
+ when: platform is search('N9K') and imagetag is not search('I[2-6]')
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_lacp: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: Setup3
+ cisco.nxos.nxos_config:
+ lines: '{{ mac1|default(omit) }}'
+
+ - name: Replaced
+ register: result
+ when: platform is search('N9K') and imagetag is not search('I[2-6]')
+ cisco.nxos.nxos_lacp:
+ state: replaced
+
+ - assert:
+ that:
+ - result.changed == true
+ - result.commands|length == 2
+ - "'no lacp system-mac' in result.commands"
+ - "'no lacp system-priority' in result.commands"
+ when: platform is search('N9K') and imagetag is not search('I[2-6]')
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature:
+ feature: lacp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/vars/main.yml
new file mode 100644
index 00000000..bdb43ed4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp/vars/main.yml
@@ -0,0 +1,18 @@
+# The CI NX-OS image doesn't support `lacp system-mac`
+gathered:
+ system:
+ priority: 10
+
+# using mac related configs in parsed and rendered would also
+# prove that we're not connecting to the appliance as expected
+
+rendered:
+ - "lacp system-priority 10"
+ - "lacp system-mac 00c1.4c00.bd15 role secondary"
+
+parsed:
+ system:
+ priority: 10
+ mac:
+ address: 00c1.4c00.bd15
+ role: secondary
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..073787b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..29193c00
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tasks/main.yaml
@@ -0,0 +1,7 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tasks/nxapi.yaml
new file mode 100644
index 00000000..7e21ea41
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tasks/nxapi.yaml
@@ -0,0 +1,27 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..de1d0a2c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/_populate_config.yaml
@@ -0,0 +1,13 @@
+- name: Populate Config
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature lacp"
+ - "interface {{ nxos_int1 }}"
+ - " lacp port-priority 5"
+ - " lacp rate fast"
+ - "interface port-channel10"
+ - " switchport"
+ - " lacp mode delay"
+ - "interface port-channel11"
+ - " lacp max-bundle 10"
+ - " lacp min-links 5"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..d69f2cbf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/_remove_config.yaml
@@ -0,0 +1,10 @@
+- name: Remove Config
+ cisco.nxos.nxos_config:
+ lines:
+ - "no interface port-channel5"
+ - "no interface port-channel10"
+ - "no interface port-channel11"
+ - "default interface {{ nxos_int1 }}"
+ - "default interface {{ nxos_int2 }}"
+ - "no feature lacp"
+ ignore_errors: True
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/deleted.yaml
new file mode 100644
index 00000000..7e3d9682
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/deleted.yaml
@@ -0,0 +1,76 @@
+---
+- debug:
+ msg: Start nxos_lacp_interfaces deleted integration tests connection={{ ansible_connection }}
+
+- set_fact:
+ mode: delay
+ when: platform is not search('N3K|N5K|N6K|N7K') and imagetag is not search('A8|I2')
+ and image_version is not search ('9.2') and chassis_type is not search('C95')
+
+- name: setup1
+ cisco.nxos.nxos_config: &id002
+ lines:
+ - "no interface port-channel5"
+ - "no interface port-channel10"
+ - "no feature lacp"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature lacp"
+ - "interface port-channel5"
+ - "lacp min-links 5"
+ - "interface port-channel10"
+ - " lacp max-bundle 10"
+
+ - name: setup3 - L2 for mode command
+ when: mode is defined
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface port-channel10"
+ - " switchport"
+ - " lacp mode delay"
+
+ - name: Gather lacp_interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lacp_interfaces
+
+ - name: deleted
+ register: result
+ cisco.nxos.nxos_lacp_interfaces: &id001
+ state: deleted
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.before)|length
+ == 0
+ - result.after|length == 0
+ - result.changed == true
+ - "'interface port-channel5' in result.commands"
+ - "'no lacp min-links' in result.commands"
+ - "'interface port-channel10' in result.commands"
+ - "'no lacp max-bundle' in result.commands"
+
+ - assert:
+ that:
+ - "'no lacp mode delay' in result.commands"
+ - result.commands|length == 5
+ when: mode is defined
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_lacp_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id002
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/empty_config.yaml
new file mode 100644
index 00000000..8e34bf27
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/empty_config.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START nxos_lacp_interfaces empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lacp_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lacp_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lacp_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lacp_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lacp_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_lacp_interfaces empty_config integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/gathered.yaml
new file mode 100644
index 00000000..3006765e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/gathered.yaml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START nxos_lacp_interfaces gathered integration tests on connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather lacp_interfaces facts from the device using nxos_lacp_interfaces
+ register: result
+ cisco.nxos.nxos_lacp_interfaces:
+ state: gathered
+
+ - assert:
+ that: "{{ result['gathered'] | symmetric_difference(gathered)\
+ \ |length == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+ - debug:
+ msg: END nxos_lacp_interfaces gathered integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/merged.yaml
new file mode 100644
index 00000000..7737b73a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/merged.yaml
@@ -0,0 +1,84 @@
+---
+- debug:
+ msg: Start nxos_lacp_interfaces merged integration tests connection={{ ansible_connection }}
+
+- set_fact:
+ mode: delay
+ when: platform is not search('N3K|N5K|N6K|N7K') and imagetag is not search('A8|I2')
+ and image_version is not search ('9.2') and chassis_type is not search('C95')
+
+- name: setup1
+ cisco.nxos.nxos_config: &id002
+ lines:
+ - "no interface port-channel5"
+ - "no interface port-channel10"
+ - "no feature lacp"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature lacp"
+
+ - name: setup3 - L2 for mode command
+ when: mode is defined
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface port-channel5"
+ - " switchport"
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_lacp_interfaces: &id001
+ config:
+
+ - name: port-channel10
+ links:
+ min: 5
+
+ - name: port-channel5
+ mode: '{{ mode | default(omit) }}'
+ links:
+ max: 10
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == true
+ - result.before|length == 0
+ - "'interface port-channel10' in result.commands"
+ - "'lacp min-links 5' in result.commands"
+ - "'interface port-channel5' in result.commands"
+ - "'lacp max-bundle 10' in result.commands"
+
+ - assert:
+ that:
+ - "'lacp mode delay' in result.commands"
+ - result.commands|length == 5
+ when: mode is defined
+
+ - name: Gather lacp_interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lacp_interfaces
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.after)|length
+ == 0
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_lacp_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id002
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/overridden.yaml
new file mode 100644
index 00000000..9c75940f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/overridden.yaml
@@ -0,0 +1,90 @@
+---
+- debug:
+ msg: Start nxos_lacp_interfaces overridden integration tests connection={{ ansible_connection }}
+
+- set_fact:
+ mode: delay
+ when: platform is not search('N3K|N5K|N6K|N7K') and imagetag is not search('A8|I2')
+ and image_version is not search ('9.2') and chassis_type is not search('C95')
+
+- name: setup1
+ cisco.nxos.nxos_config: &id003
+ lines:
+ - "no interface port-channel5"
+ - "no interface port-channel10"
+ - "no interface port-channel11"
+ - "no feature lacp"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature lacp"
+ - "interface port-channel10"
+ - "lacp min-links 5"
+ - "interface port-channel5"
+ - " lacp max-bundle 10"
+
+ - name: setup3 - L2 for mode command
+ when: mode is defined
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface port-channel11"
+ - " switchport"
+
+ - name: Gather lacp_interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lacp_interfaces
+
+ - name: Overridden
+ register: result
+ cisco.nxos.nxos_lacp_interfaces: &id002
+ config:
+
+ - name: port-channel11
+ links:
+ min: 4
+ mode: '{{ mode | default(omit) }}'
+ state: overridden
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.before)|length
+ == 0
+ - result.changed == true
+ - "'interface port-channel10' in result.commands"
+ - "'no lacp min-links' in result.commands"
+ - "'interface port-channel5' in result.commands"
+ - "'no lacp max-bundle' in result.commands"
+ - "'interface port-channel11' in result.commands"
+
+ - assert:
+ that:
+ - "'lacp mode delay' in result.commands"
+ - result.commands|length == 7
+ when: mode is defined
+
+ - name: Gather lacp_interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.after)|length
+ == 0
+
+ - name: Idempotence - Overridden
+ register: result
+ cisco.nxos.nxos_lacp_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id003
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/parsed.yaml
new file mode 100644
index 00000000..eb2ab053
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/parsed.yaml
@@ -0,0 +1,27 @@
+---
+- debug:
+ msg: START nxos_lacp_interfaces parsed integration tests on connection={{ ansible_connection }}
+
+- block:
+ # Ethernet interface used in the task don't actually exist on the appliance
+ - name: Use parsed state to convert externally supplied config to structured format
+ register: result
+ cisco.nxos.nxos_lacp_interfaces:
+ running_config: |
+ interface nve1
+ source-interface Ethernet1/100
+ interface port-channel10
+ lacp min-links 10
+ lacp max-bundle 15
+ interface Ethernet1/800
+ lacp port-priority 100
+ lacp rate fast
+ description interface
+ state: parsed
+
+ - assert:
+ that: "{{ parsed | symmetric_difference(result['parsed']) |length==0\
+ \ }}"
+
+- debug:
+ msg: END nxos_lacp_interfaces parsed integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/rendered.yaml
new file mode 100644
index 00000000..5c118618
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/rendered.yaml
@@ -0,0 +1,43 @@
+---
+- debug:
+ msg: START nxos_lacp_interfaces rendered integration tests on connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ # Interfaces used here doesn't actually exist on the device
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ nxos_lacp_interfaces:
+ config:
+ - name: Ethernet1/800
+ rate: fast
+ - name: Ethernet1/801
+ rate: fast
+ port_priority: 32
+ - name: port-channel10
+ links:
+ max: 15
+ min: 2
+ convergence:
+ graceful: True
+ state: rendered
+
+ - assert:
+ that: "{{ rendered | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather lacp_interfaces facts from the device and assert that its empty
+ register: result
+ cisco.nxos.nxos_lacp_interfaces:
+ state: gathered
+
+ - name: Make sure that rendered
+ assert:
+ that: "{{ result['gathered'] == [] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_lacp_interfaces rendered integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/replaced.yaml
new file mode 100644
index 00000000..460b7744
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/tests/common/replaced.yaml
@@ -0,0 +1,78 @@
+---
+- debug:
+ msg: Start nxos_lacp_interfaces replaced integration tests connection={{ ansible_connection }}
+
+- set_fact:
+ mode: delay
+ when: platform is not search('N3K|N5K|N6K|N7K') and imagetag is not search('A8|I2')
+ and image_version is not search ('9.2') and chassis_type is not search('C95')
+
+- name: setup1
+ cisco.nxos.nxos_config: &id003
+ lines:
+ - "no interface port-channel10"
+ - "no feature lacp"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature lacp"
+ - "interface port-channel10"
+ - "switchport"
+ - " lacp min-links 5"
+
+ - name: Gather lacp_interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lacp_interfaces
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_lacp_interfaces: &id002
+ config:
+
+ - name: port-channel10
+ links:
+ max: 10
+ mode: '{{ mode | default(omit) }}'
+ state: replaced
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.before)|length
+ == 0
+ - result.changed == true
+ - "'interface port-channel10' in result.commands"
+ - "'no lacp min-links' in result.commands"
+ - "'lacp max-bundle 10' in result.commands"
+
+ - assert:
+ that:
+ - "'lacp mode delay' in result.commands"
+ - result.commands|length == 4
+ when: mode is defined
+
+ - name: Gather lacp_interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.after)|length
+ == 0
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_lacp_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id003
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/vars/main.yml
new file mode 100644
index 00000000..bbb0687b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lacp_interfaces/vars/main.yml
@@ -0,0 +1,30 @@
+gathered:
+ - name: "{{ nxos_int1 }}"
+ port_priority: 5
+ rate: fast
+ - name: port-channel10
+ mode: delay
+ - name: port-channel11
+ links:
+ max: 10
+ min: 5
+
+parsed:
+ - name: port-channel10
+ links:
+ max: 15
+ min: 10
+ - name: Ethernet1/800
+ port_priority: 100
+ rate: fast
+
+rendered:
+ - "interface Ethernet1/800"
+ - "lacp rate fast"
+ - "interface Ethernet1/801"
+ - "lacp port-priority 32"
+ - "lacp rate fast"
+ - "interface port-channel10"
+ - "lacp min-links 2"
+ - "lacp max-bundle 15"
+ - "lacp graceful-convergence"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..073787b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..29193c00
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tasks/main.yaml
@@ -0,0 +1,7 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tasks/nxapi.yaml
new file mode 100644
index 00000000..7e21ea41
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tasks/nxapi.yaml
@@ -0,0 +1,27 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..bef46eeb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/_populate_config.yaml
@@ -0,0 +1,8 @@
+- name: Populate Config
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature lacp"
+ - "interface {{ nxos_int1 }}"
+ - " channel-group 10 mode active"
+ - "interface {{ nxos_int2 }}"
+ - " channel-group 11 mode passive"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..9539edb7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/_remove_config.yaml
@@ -0,0 +1,10 @@
+- name: Remove config
+ cisco.nxos.nxos_config:
+ lines:
+ - "default interface {{ nxos_int1 }}"
+ - "default interface {{ nxos_int2 }}"
+ - "no interface port-channel10"
+ - "no interface port-channel11"
+ - "no interface port-channel19"
+ - "no feature lacp"
+ ignore_errors: True
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/deleted.yaml
new file mode 100644
index 00000000..06c08d69
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/deleted.yaml
@@ -0,0 +1,67 @@
+---
+- debug:
+ msg: Start nxos_lag_interfaces deleted integration tests connection={{ ansible_connection
+ }}
+
+- set_fact: test_int1="{{ nxos_int1 }}"
+
+- set_fact: test_int2="{{ nxos_int2 }}"
+
+- include_tasks: _remove_config.yaml
+
+- name: enable feature lacp
+ cisco.nxos.nxos_feature:
+ feature: lacp
+
+- block:
+
+ - name: Setup2
+ loop:
+ - interface {{ test_int1 }}
+ - interface {{ test_int2 }}
+ cisco.nxos.nxos_config:
+ lines:
+ - channel-group 10
+ parents: '{{ item }}'
+
+ - name: Gather LAG interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lag_interfaces
+
+ - name: deleted
+ register: result
+ cisco.nxos.nxos_lag_interfaces: &id002
+ state: deleted
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.before)|length
+ == 0
+
+ - name: Gather LAG interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ # the module should not remove the implicitly created port-channel
+ - result.after|length == 1
+ - result.changed == true
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_lag_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+ - name: disable feature lacp
+ cisco.nxos.nxos_feature:
+ feature: lacp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/empty_config.yaml
new file mode 100644
index 00000000..10b583bb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/empty_config.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START nxos_lag_interfaces empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_lag_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_lag_interfaces empty_config integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/gathered.yaml
new file mode 100644
index 00000000..c6f42542
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/gathered.yaml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: START nxos_lag_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather lag_interfaces facts from the device using nxos_lag_interfaces
+ register: result
+ cisco.nxos.nxos_lag_interfaces:
+ state: gathered
+
+ - assert:
+ that: "{{ result['gathered'] | symmetric_difference(gathered)\
+ \ |length == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+ - debug:
+ msg: END nxos_lag_interfaces gathered integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/merged.yaml
new file mode 100644
index 00000000..1103e870
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/merged.yaml
@@ -0,0 +1,108 @@
+---
+- debug:
+ msg: Start nxos_lag_interfaces merged integration tests connection={{ ansible_connection
+ }}
+
+- set_fact: test_int1="{{ nxos_int1 }}"
+
+- set_fact: test_int2="{{ nxos_int2 }}"
+
+- name: Enable feature lacp
+ cisco.nxos.nxos_feature:
+ feature: lacp
+
+- name: Setup
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no interface port-channel 10
+ - no interface port-channel 11
+ - no interface port-channel 19
+
+- name: setup2
+ cisco.nxos.nxos_lag_interfaces: &id002
+ state: deleted
+
+- block:
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_lag_interfaces: &id001
+ config:
+
+ - name: port-channel10
+ members:
+
+ - member: '{{ test_int1 }}'
+
+ - member: '{{ test_int2 }}'
+ mode: true
+ state: merged
+
+ - assert:
+ that:
+ - result.before|length == 0
+ - result.changed == true
+
+ - name: Gather LAG interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lag_interfaces
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.after)|length
+ == 0
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_lag_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Add new port-channel with no members
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - interface port-channel 11
+
+ - name: Merged - No Members
+ register: result
+ cisco.nxos.nxos_lag_interfaces: &id003
+ config:
+
+ - name: port-channel11
+ members:
+
+ - member: '{{ test_int1 }}'
+
+ - member: '{{ test_int2 }}'
+ mode: true
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Idempotence - Merged - No Members
+ register: result
+ cisco.nxos.nxos_lag_interfaces: *id003
+
+ - assert:
+ that:
+ - result.changed == false
+
+ always:
+
+ - name: Teardown
+ ignore_errors: true
+ cisco.nxos.nxos_lag_interfaces: *id002
+
+ - name: Disable feature lacp
+ cisco.nxos.nxos_feature:
+ feature: lacp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/overridden.yaml
new file mode 100644
index 00000000..061ca7ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/overridden.yaml
@@ -0,0 +1,85 @@
+---
+- debug:
+ msg: Start nxos_lag_interfaces overridden integration tests connection={{ ansible_connection
+ }}
+
+- set_fact:
+ test_int1: "{{ nxos_int1 }}"
+ test_int2: "{{ nxos_int2 }}"
+ test_int3: "{{ nxos_int3 }}"
+
+- name: enable feature lacp
+ cisco.nxos.nxos_feature:
+ feature: lacp
+
+- name: setup1
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no interface port-channel 10
+ - no interface port-channel 19
+
+- name: setup2
+ cisco.nxos.nxos_lag_interfaces: &id003
+ state: deleted
+
+- block:
+
+ - name: setup3
+ ignore_errors: true
+ loop:
+ - interface {{ test_int1 }}
+ - interface {{ test_int2 }}
+ cisco.nxos.nxos_config:
+ lines:
+ - channel-group 10
+ parents: '{{ item }}'
+
+ - name: Gather LAG interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lag_interfaces
+
+ - name: Overridden
+ register: result
+ cisco.nxos.nxos_lag_interfaces: &id002
+ config:
+ - name: port-channel19
+ members:
+
+ - member: '{{ test_int3 }}'
+ state: overridden
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.before)|length
+ == 0
+ - result.changed == true
+
+ - name: Gather LAG interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.after)|length
+ == 0
+
+ - name: Idempotence - Overridden
+ register: result
+ cisco.nxos.nxos_lag_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - name: Teardown
+ ignore_errors: true
+ cisco.nxos.nxos_lag_interfaces: *id003
+
+ - name: disable feature lacp
+ cisco.nxos.nxos_feature:
+ feature: lacp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/parsed.yaml
new file mode 100644
index 00000000..a2f00db8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/parsed.yaml
@@ -0,0 +1,32 @@
+---
+- debug:
+ msg: START nxos_lag_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+ # Interfaces used in the task don't actually exist on the appliance
+ - name: Use parsed state to convert externally supplied config to structured format
+ register: result
+ cisco.nxos.nxos_lag_interfaces:
+ running_config: |
+ interface port-channel10
+ interface port-channel11
+ interface port-channel12
+ interface Ethernet1/800
+ channel-group 10
+ no shutdown
+ interface Ethernet1/801
+ channel-group 10 mode active
+ interface Ethernet1/802
+ channel-group 11 mode passive
+ interface Ethernet1/803
+ channel-group 11 mode passive
+ state: parsed
+
+ - assert:
+ that: "{{ parsed | symmetric_difference(result['parsed']) |length==0\
+ \ }}"
+
+- debug:
+ msg: END nxos_lag_interfaces parsed integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/rendered.yaml
new file mode 100644
index 00000000..dd72cc18
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/rendered.yaml
@@ -0,0 +1,43 @@
+---
+- debug:
+ msg: START nxos_lag_interfaces rendered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ # Interfaces used here doesn't actually exist on the device
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.nxos.nxos_lag_interfaces:
+ config:
+ - name: port-channel10
+ members:
+ - member: Ethernet1/800
+ mode: active
+ - member: Ethernet1/801
+ - name: port-channel11
+ members:
+ - member: Ethernet1/802
+ mode: passive
+ state: rendered
+
+ - assert:
+ that: "{{ rendered | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather l2_interfaces facts from the device and assert that its empty
+ register: result
+ cisco.nxos.nxos_lag_interfaces:
+ state: gathered
+
+ - name: Make sure that rendered
+ assert:
+ that: "{{ result['gathered'] == [] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_lag_interfaces rendered integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/replaced.yaml
new file mode 100644
index 00000000..16952a45
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/tests/common/replaced.yaml
@@ -0,0 +1,86 @@
+---
+- debug:
+ msg: Start nxos_lag_interfaces replaced integration tests connection={{ ansible_connection
+ }}
+
+- set_fact: test_int1="{{ nxos_int1 }}"
+
+- set_fact: test_int2="{{ nxos_int2 }}"
+
+- name: enable feature lacp
+ cisco.nxos.nxos_feature:
+ feature: lacp
+
+- name: setup1
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no interface port-channel 10
+ - no interface port-channel 11
+ - no interface port-channel 19
+
+- name: setup2
+ cisco.nxos.nxos_lag_interfaces: &id003
+ state: deleted
+
+- block:
+
+ - name: setup3
+ ignore_errors: true
+ loop:
+ - interface {{ test_int1 }}
+ - interface {{ test_int2 }}
+ cisco.nxos.nxos_config:
+ lines:
+ - channel-group 10
+ parents: '{{ item }}'
+
+ - name: Gather LAG interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lag_interfaces
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_lag_interfaces: &id002
+ config:
+
+ - name: port-channel11
+ members:
+
+ - member: '{{ test_int2 }}'
+ mode: active
+ state: replaced
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.before)|length
+ == 0
+
+ - name: Gather LAG interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.after)|length
+ == 0
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_lag_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - name: teardown1
+ ignore_errors: true
+ cisco.nxos.nxos_lag_interfaces: *id003
+
+ - name: disable feature lacp
+ cisco.nxos.nxos_feature:
+ feature: lacp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/vars/main.yml
new file mode 100644
index 00000000..a0edbc1b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lag_interfaces/vars/main.yml
@@ -0,0 +1,33 @@
+gathered:
+ - name: port-channel10
+ members:
+ - member: '{{ nxos_int1 }}'
+ mode: active
+ - name: port-channel11
+ members:
+ - member: '{{ nxos_int2 }}'
+ mode: passive
+
+rendered:
+ - "interface Ethernet1/800"
+ - "channel-group 10 mode active"
+ - "interface Ethernet1/801"
+ - "channel-group 10"
+ - "interface Ethernet1/802"
+ - "channel-group 11 mode passive"
+
+parsed:
+ - members:
+ - member: Ethernet1/800
+ - member: Ethernet1/801
+ mode: active
+ name: port-channel10
+
+ - members:
+ - member: Ethernet1/802
+ mode: passive
+ - member: Ethernet1/803
+ mode: passive
+ name: port-channel11
+
+ - name: port-channel12
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/defaults/main.yaml
new file mode 100644
index 00000000..a845c24b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: '*'
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tests/common/sanity.yaml
new file mode 100644
index 00000000..19e75afd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_linkagg/tests/common/sanity.yaml
@@ -0,0 +1,201 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_linkagg sanity test"
+
+- set_fact: testint1="{{ nxos_int1 }}"
+
+- set_fact: testint2="{{ nxos_int2 }}"
+
+- name: Enable feature LACP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: lacp
+ state: enabled
+
+- name: setup - remove config used in test(part1)
+ cisco.nxos.nxos_config:
+ lines:
+ - no interface port-channel 20
+ - no interface port-channel 100
+
+- name: setup - remove config used in test(part2)
+ ignore_errors: true
+ loop:
+ - interface {{ testint1 }}
+ - interface {{ testint2 }}
+ cisco.nxos.nxos_config:
+ lines:
+ - no channel-group 20
+ parents: '{{ item }}'
+
+- name: Put interface in L2 mode
+ when: platform is match("N35")
+ cisco.nxos.nxos_interface:
+ aggregate:
+
+ - name: '{{testint1}}'
+
+ - name: '{{testint2}}'
+ mode: layer2
+
+- name: create linkagg
+ register: result
+ cisco.nxos.nxos_linkagg: &id001
+ group: 20
+ state: present
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface port-channel 20" in result.commands'
+
+- name: create linkagg(Idempotence)
+ register: result
+ cisco.nxos.nxos_linkagg: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: set link aggregation group to members declaratively
+ register: result
+ cisco.nxos.nxos_linkagg: &id002
+ group: 20
+ mode: active
+ force: true
+ members:
+ - '{{ testint1 }}'
+ - '{{ testint2 }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ testint1 }}" in result.commands'
+ - '"channel-group 20 force mode active" in result.commands'
+ - '"interface {{ testint2 }}" in result.commands'
+ - '"channel-group 20 force mode active" in result.commands'
+
+- name: set link aggregation group to members(Idempotence)
+ register: result
+ cisco.nxos.nxos_linkagg: *id002
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove link aggregation group from member declaratively
+ register: result
+ cisco.nxos.nxos_linkagg: &id003
+ group: 20
+ mode: active
+ force: true
+ members:
+ - '{{ testint2 }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ testint1 }}" in result.commands'
+ - '"no channel-group 20" in result.commands'
+
+- name: remove link aggregation group from member(Idempotence)
+ register: result
+ cisco.nxos.nxos_linkagg: *id003
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove linkagg
+ register: result
+ cisco.nxos.nxos_linkagg: &id004
+ group: 20
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no interface port-channel 20" in result.commands'
+
+- name: remove linkagg(Idempotence)
+ register: result
+ cisco.nxos.nxos_linkagg: *id004
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: create aggregate of linkagg definitions
+ register: result
+ cisco.nxos.nxos_linkagg: &id005
+ aggregate:
+
+ - group: 20
+ min_links: 3
+
+ - group: 100
+ min_links: 4
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface port-channel 20" in result.commands'
+ - '"lacp min-links 3" in result.commands'
+ - '"interface port-channel 100" in result.commands'
+ - '"lacp min-links 4" in result.commands'
+
+- name: create aggregate of linkagg definitions(Idempotence)
+ register: result
+ cisco.nxos.nxos_linkagg: *id005
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove aggregate of linkagg definitions
+ register: result
+ cisco.nxos.nxos_linkagg: &id006
+ aggregate:
+
+ - group: 20
+ min_links: 3
+
+ - group: 100
+ min_links: 4
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no interface port-channel 20" in result.commands'
+ - '"no interface port-channel 100" in result.commands'
+
+- name: remove aggregate of linkagg definitions(Idempotence)
+ register: result
+ cisco.nxos.nxos_linkagg: *id006
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown - remove config used in test(part1)
+ cisco.nxos.nxos_config:
+ lines:
+ - no interface port-channel 20
+ - no interface port-channel 100
+
+- name: teardown - remove config used in test(part2)
+ ignore_errors: true
+ loop:
+ - interface {{ testint1 }}
+ - interface {{ testint2 }}
+ cisco.nxos.nxos_config:
+ lines:
+ - no channel-group 20
+ parents: '{{ item }}'
+
+- name: Disable feature LACP
+ cisco.nxos.nxos_feature:
+ feature: lacp
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_linkagg sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tests/cli/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tests/cli/sanity.yaml
new file mode 100644
index 00000000..17036385
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tests/cli/sanity.yaml
@@ -0,0 +1,47 @@
+---
+- debug: msg="START TRANSPORT:CLI nxos_lldp sanity test"
+
+- name: Make sure LLDP is not running before tests
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: disabled
+
+- name: Enable LLDP service
+ register: result
+ cisco.nxos.nxos_lldp:
+ state: present
+
+- assert:
+ that:
+ - result.changed == true
+ - '"feature lldp" in result.commands'
+
+- name: Enable LLDP service again (idempotent)
+ register: result
+ cisco.nxos.nxos_lldp:
+ state: present
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Disable LLDP service
+ register: result
+ cisco.nxos.nxos_lldp:
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no feature lldp" in result.commands'
+
+- name: Disable LLDP service (idempotent)
+ register: result
+ cisco.nxos.nxos_lldp:
+ state: absent
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END TRANSPORT:CLI nxos_lldp sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tests/nxapi/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tests/nxapi/sanity.yaml
new file mode 100644
index 00000000..36cc40ae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp/tests/nxapi/sanity.yaml
@@ -0,0 +1,47 @@
+---
+- debug: msg="START TRANSPORT:NXAPI nxos_lldp sanity test"
+
+- name: Make sure LLDP is not running before tests
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: disabled
+
+- name: Enable LLDP service
+ register: result
+ cisco.nxos.nxos_lldp:
+ state: present
+
+- assert:
+ that:
+ - result.changed == true
+ - '"feature lldp" in result.commands'
+
+- name: Enable LLDP service again (idempotent)
+ register: result
+ cisco.nxos.nxos_lldp:
+ state: present
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Disable LLDP service
+ register: result
+ cisco.nxos.nxos_lldp:
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no feature lldp" in result.commands'
+
+- name: Disable LLDP service (idempotent)
+ register: result
+ cisco.nxos.nxos_lldp:
+ state: absent
+
+- assert:
+ that:
+ - result.changed == false
+
+- debug: msg="END TRANSPORT:NXAPI nxos_lldp sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tasks/cli.yaml
new file mode 100644
index 00000000..251529d5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tasks/nxapi.yaml
new file mode 100644
index 00000000..b6bd3eaf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tasks/nxapi.yaml
@@ -0,0 +1,27 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/_populate_config.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/_populate_config.yml
new file mode 100644
index 00000000..153d1895
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/_populate_config.yml
@@ -0,0 +1,8 @@
+- name: Populate config
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature lldp"
+ - "lldp holdtime 129"
+ - "lldp reinit 5"
+ - "lldp timer 35"
+ - "no lldp tlv-select system-name"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/_remove_config.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/_remove_config.yml
new file mode 100644
index 00000000..3ee42c41
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/_remove_config.yml
@@ -0,0 +1,5 @@
+- name: Remove config
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: disabled
+ ignore_errors: True
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/deleted.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/deleted.yml
new file mode 100644
index 00000000..2d85aa50
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/deleted.yml
@@ -0,0 +1,84 @@
+---
+- debug:
+ msg: Start nxos_lldp_global deleted integration tests connection = {{ ansible_connection
+ }}
+
+- block:
+
+ - set_fact: cfg_port_id=True
+ when: platform is not search('N[567]K') and imagetag is not search("I[2345]")
+
+ - name: feature off to cleanup lldp
+ cisco.nxos.nxos_feature: &id003
+ feature: lldp
+ state: disabled
+
+ - name: Enable LLDP feature
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: enabled
+
+ - name: Setup
+ cisco.nxos.nxos_config:
+ lines:
+ - "lldp holdtime 125"
+ - "lldp timer 32"
+ - "no lldp tlv-select dcbxp"
+ - "lldp tlv-select system-name"
+ - "no lldp tlv-select system-description"
+
+ - name: Setup2
+ when: cfg_port_id is defined
+ cisco.nxos.nxos_config:
+ lines:
+ - "lldp portid-subtype 1"
+ - "no lldp tlv-select power-management"
+
+ - name: Gather lldp_global facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lldp_global
+
+ - name: Deleted
+ register: result
+ cisco.nxos.nxos_lldp_global: &id002
+ state: deleted
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lldp_global == result.before
+ - "'no lldp holdtime 125' in result.commands"
+ - "'no lldp timer 32' in result.commands"
+ - "'lldp tlv-select dcbxp' in result.commands"
+ - "'lldp tlv-select system-description' in result.commands"
+ - 'result.changed == true '
+ - result.after | length == 0
+
+ - assert:
+ that:
+ - "'no lldp portid-subtype 1' in result.commands"
+ - "'lldp tlv-select power-management' in result.commands"
+ when: cfg_port_id is defined
+
+ - name: Gather lldp_global post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - 'ansible_facts.network_resources == {} '
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_lldp_global: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature: *id003
+ when: platform is not search('N35')
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/gathered.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/gathered.yml
new file mode 100644
index 00000000..f7df327d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/gathered.yml
@@ -0,0 +1,24 @@
+---
+- debug:
+ msg: START nxos_lldp_global gathered integration tests on connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yml
+
+- include_tasks: _populate_config.yml
+
+- block:
+
+ - name: Gather lldp_global facts from the device using nxos_lldp_global
+ register: result
+ cisco.nxos.nxos_lldp_global:
+ state: gathered
+
+ - assert:
+ that: "{{ result['gathered'] == gathered }}"
+
+ always:
+
+ - include_tasks: _remove_config.yml
+
+ - debug:
+ msg: END nxos_lldp_global gathered integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/merged.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/merged.yml
new file mode 100644
index 00000000..1bdf945b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/merged.yml
@@ -0,0 +1,72 @@
+---
+- debug:
+ msg: Start nxos_lldp_global merged integration tests connection={{ansible_connection}}
+
+- block:
+
+ - set_fact:
+ port_id: 1
+ tlv_power_mgmt:
+ power_management: false
+ when: platform is not search('N5K|N6K|N7K') and imagetag is not search("I[2345]")
+
+ - name: feature off to cleanup lldp
+ cisco.nxos.nxos_feature: &id002
+ feature: lldp
+ state: disabled
+
+ - name: Enable lldp
+ cisco.nxos.nxos_feature:
+ feature: lldp
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_lldp_global: &id001
+ config:
+ reinit: 5
+ timer: 40
+ port_id: '{{port_id|default(omit)}}'
+ tlv_select: '{{tlv_power_mgmt|default(omit)}}'
+ state: merged
+
+ - assert:
+ that:
+ - result.before|length == 0
+ - result.changed == true
+ - "'lldp reinit 5' in result.commands"
+ - "'lldp timer 40' in result.commands"
+
+ - assert:
+ that:
+ - "'lldp portid-subtype 1' in result.commands"
+ when: port_id is defined
+
+ - assert:
+ that:
+ - "'no lldp tlv-select power-management' in result.commands"
+ when: tlv_power_mgmt is defined
+
+ - name: Gather lldp_global facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lldp_global
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lldp_global == result.after
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_lldp_global: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature: *id002
+ when: platform is not search('N35')
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/parsed.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/parsed.yml
new file mode 100644
index 00000000..0a025c0e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/parsed.yml
@@ -0,0 +1,20 @@
+---
+- debug:
+ msg: START nxos_lldp_global parsed integration tests on connection={{ ansible_connection }}
+
+- block:
+ - name: Use parsed state to convert externally supplied config to structured format
+ register: result
+ cisco.nxos.nxos_lldp_global:
+ running_config: |
+ lldp holdtime 131
+ lldp reinit 7
+ no lldp tlv-select system-name
+ no lldp tlv-select system-description
+ state: parsed
+
+ - assert:
+ that: "{{ parsed == result['parsed'] }}"
+
+- debug:
+ msg: END nxos_lldp_global parsed integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/rendered.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/rendered.yml
new file mode 100644
index 00000000..63ffe95d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/rendered.yml
@@ -0,0 +1,38 @@
+---
+- debug:
+ msg: START nxos_lldp_global rendered integration tests on connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yml
+
+- block:
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.nxos.nxos_lldp_global:
+ config:
+ holdtime: 130
+ port_id: 1
+ reinit: 5
+ tlv_select:
+ dcbxp: yes
+ power_management: yes
+ state: rendered
+
+ - assert:
+ that: "{{ rendered | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather lldp_global facts from the device and assert that its empty
+ register: result
+ cisco.nxos.nxos_lldp_global:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the
+ device
+ assert:
+ that: "{{ result['gathered'] == {} }}"
+ always:
+
+ - include_tasks: _remove_config.yml
+
+- debug:
+ msg: END nxos_lldp_global rendered integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/replaced.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/replaced.yml
new file mode 100644
index 00000000..e42e1b68
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/tests/common/replaced.yml
@@ -0,0 +1,93 @@
+---
+- debug:
+ msg: Start nxos_lldp_global replaced integration tests connection = {{ansible_connection}}
+
+- block:
+
+ - set_fact:
+ port_id: 1
+ tlv_power_mgmt:
+ power_management: false
+ when: platform is not search('N[567]K') and imagetag is not search("I[2345]")
+
+ - name: feature off to cleanup lldp
+ cisco.nxos.nxos_feature: &id002
+ feature: lldp
+ state: disabled
+
+ - name: Enable lldp feature
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: enabled
+
+ - name: Setup
+ cisco.nxos.nxos_config:
+ lines:
+ - "lldp holdtime 125"
+ - "lldp tlv-select system-name"
+ - "no lldp tlv-select port-vlan"
+
+ - name: Setup2
+ when: port_id is defined
+ cisco.nxos.nxos_config:
+ lines:
+ - "lldp portid-subtype 1"
+ - "no lldp tlv-select power-management"
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_lldp_global: &id001
+ config:
+ holdtime: 125
+ timer: 35
+ tlv_select:
+ system:
+ name: false
+ description: false
+ port:
+ vlan: false
+ dcbxp: false
+ state: replaced
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'lldp timer 35' in result.commands"
+ - "'no lldp tlv-select system-name' in result.commands"
+ - "'no lldp tlv-select system-description' in result.commands"
+ - "'no lldp tlv-select dcbxp' in result.commands"
+
+ - assert:
+ that:
+ - "'no lldp portid-subtype 1' in result.commands"
+ when: port_id is defined
+
+ - assert:
+ that:
+ - "'lldp tlv-select power-management' in result.commands"
+ when: tlv_power_mgmt is defined
+
+ - name: Gather lldp_global post facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lldp_global
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lldp_global == result.after
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_lldp_global: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature: *id002
+ when: platform is not search('N35')
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/vars/main.yml
new file mode 100644
index 00000000..7bca43e2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_global/vars/main.yml
@@ -0,0 +1,22 @@
+gathered:
+ reinit: 5
+ timer: 35
+ tlv_select:
+ system:
+ name: False
+ holdtime: 129
+
+rendered:
+ - "lldp tlv-select dcbxp"
+ - "lldp tlv-select power-management"
+ - "lldp portid-subtype 1"
+ - "lldp reinit 5"
+ - "lldp holdtime 130"
+
+parsed:
+ holdtime: 131
+ reinit: 7
+ tlv_select:
+ system:
+ description: false
+ name: false
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..b2117741
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tasks/cli.yaml
@@ -0,0 +1,27 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..29193c00
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tasks/main.yaml
@@ -0,0 +1,7 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tasks/nxapi.yaml
new file mode 100644
index 00000000..b6bd3eaf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tasks/nxapi.yaml
@@ -0,0 +1,27 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/deleted.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/deleted.yml
new file mode 100644
index 00000000..5f0c129e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/deleted.yml
@@ -0,0 +1,76 @@
+---
+- debug:
+ msg: Start nxos_lldp_interfaces deleted integration tests connection = {{ ansible_connection
+ }}
+
+- name: Enable LLDP feature
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: enabled
+
+- block:
+
+ - name: Setup
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface Ethernet1/1"
+ - " lldp receive"
+ - " no lldp transmit"
+ - "interface Ethernet1/2"
+ - " no lldp receive"
+ - " lldp tlv-set vlan 12"
+ - "interface Ethernet1/3"
+ - " lldp tlv-set management-address 192.0.2.12"
+
+ - name: Delete on single interface
+ register: result
+ cisco.nxos.nxos_lldp_interfaces:
+ config:
+
+ - name: Ethernet1/2
+ state: deleted
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface Ethernet1/2' in result.commands"
+ - "'lldp receive' in result.commands"
+ - "'no lldp tlv-set vlan 12' in result.commands"
+ - result.commands | length == 3
+
+ - name: Gather lldp_interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lldp_interfaces
+
+ - name: Deleted
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: &id001
+ state: deleted
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lldp_interfaces == result.before
+ - "'interface Ethernet1/1' in result.commands"
+ - "'lldp transmit' in result.commands"
+ - "'interface Ethernet1/3' in result.commands"
+ - "'no lldp tlv-set management-address 192.0.2.12' in result.commands"
+ - 'result.changed == true '
+ - result.commands | length == 4
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/gathered.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/gathered.yml
new file mode 100644
index 00000000..d00691ad
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/gathered.yml
@@ -0,0 +1,53 @@
+---
+- debug:
+ msg: Start nxos_lldp_interfaces gathered integration tests connection={{ansible_connection}}"
+
+- name: Enable LLDP feature
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: enabled
+
+- block:
+
+ - name: Setup
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface Ethernet1/1"
+ - " lldp receive"
+ - " no lldp transmit"
+ - "interface Ethernet1/2"
+ - " no lldp receive"
+ - " lldp tlv-set vlan 12"
+ - "interface Ethernet1/3"
+ - " lldp tlv-set management-address 192.0.2.12"
+
+ - name: Gather lldp interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lldp_interfaces
+
+ - name: Gathered
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: &id001
+ state: gathered
+
+ - assert:
+ that:
+ - result.changed == false
+ - ansible_facts.network_resources.lldp_interfaces == result.gathered
+
+ - name: Idempotence - Gathered
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/merged.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/merged.yml
new file mode 100644
index 00000000..89cd5ea0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/merged.yml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: Start nxos_lldp_interfaces merged integration tests connection={{ansible_connection}}
+
+- name: Enable lldp
+ cisco.nxos.nxos_feature:
+ feature: lldp
+
+- block:
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: &id001
+ config:
+
+ - name: Ethernet 1/1
+ receive: false
+ tlv_set:
+ vlan: 123
+
+ - name: Ethernet1/2
+ transmit: false
+ tlv_set:
+ management_address: 10.0.0.1
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface Ethernet1/1' in result.commands"
+ - "'no lldp receive' in result.commands"
+ - "'lldp tlv-set vlan 123' in result.commands"
+ - "'interface Ethernet1/2' in result.commands"
+ - "'no lldp transmit' in result.commands"
+ - "'lldp tlv-set management-address 10.0.0.1' in result.commands"
+ - result.commands | length == 6
+
+ - name: Gather lldp_interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lldp_interfaces
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lldp_interfaces == result.after
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands | length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/overridden.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/overridden.yml
new file mode 100644
index 00000000..edacef1e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/overridden.yml
@@ -0,0 +1,69 @@
+---
+- debug:
+ msg: Start nxos_lldp_interfaces overridden tests connection={{ ansible_connection
+ }}
+
+- name: Enable LLDP feature
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: enabled
+
+- block:
+
+ - name: Setup
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface Ethernet1/1"
+ - " no lldp receive"
+ - " lldp tlv-set management-address 12.12.12.12"
+
+ - name: Gather lldp_interfaces facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lldp_interfaces
+
+ - name: Overridden
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: &id002
+ config:
+
+ - name: Ethernet1/2
+ receive: false
+ tlv_set:
+ vlan: 12
+ state: overridden
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lldp_interfaces == result.before
+ - "'interface Ethernet1/1' in result.commands"
+ - "'lldp receive' in result.commands"
+ - "'no lldp tlv-set management-address 12.12.12.12' in result.commands"
+ - "'interface Ethernet1/2' in result.commands"
+ - "'no lldp receive' in result.commands"
+ - "'lldp tlv-set vlan 12' in result.commands"
+ - result.commands | length == 6
+
+ - name: Gather lldp_interfaces post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lldp_interfaces == result.after
+
+ - name: Idempotence - overridden
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/parsed.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/parsed.yml
new file mode 100644
index 00000000..72d97425
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/parsed.yml
@@ -0,0 +1,42 @@
+---
+- debug:
+ msg: Start nxos_lldp_interfaces parsed integration tests connection={{ansible_connection}}"
+
+- name: Enable lldp
+ cisco.nxos.nxos_feature:
+ feature: lldp
+
+- block:
+
+ - name: Gather lldp interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lldp_interfaces
+
+ - name: Parsed
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: &id001
+ running_config: "interface Ethernet1/1\n lldp receive\n no lldp transmit\n\
+ interface Ethernet1/2\n no lldp receive\n lldp tlv-set vlan 12\ninterface\
+ \ Ethernet1/3\n lldp tlv-set management-address 192.0.2.12\n"
+ state: parsed
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.parsed == parsed
+
+ - name: Idempotence - Parsed
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: *id001
+
+ - assert:
+ that: result.changed == false
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/remove_config.yaml
new file mode 100644
index 00000000..db070420
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/remove_config.yaml
@@ -0,0 +1,7 @@
+---
+- ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - "no interface port-channel1"
+ - "no interface port-channel2"
+ - "no interface port-channel12"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/rendered.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/rendered.yml
new file mode 100644
index 00000000..a20f1488
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/rendered.yml
@@ -0,0 +1,44 @@
+---
+- debug:
+ msg: Start nxos_lldp_interfaces rendered tests connection={{ ansible_connection
+ }}
+
+- name: Rendered
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: &id001
+ config:
+
+ - name: Ethernet1/1
+ receive: true
+ transmit: false
+
+ - name: Ethernet1/2
+ receive: false
+ tlv_set:
+ vlan: 12
+
+ - name: Ethernet1/3
+ tlv_set:
+ management_address: 192.0.2.12
+ state: rendered
+
+- assert:
+ that:
+ - result.changed == false
+ - "'interface Ethernet1/1' in result.rendered"
+ - "'lldp receive' in result.rendered"
+ - "'no lldp transmit' in result.rendered"
+ - "'interface Ethernet1/2' in result.rendered"
+ - "'no lldp receive' in result.rendered"
+ - "'lldp tlv-set vlan 12' in result.rendered"
+ - "'interface Ethernet1/3' in result.rendered"
+ - "'lldp tlv-set management-address 192.0.2.12' in result.rendered"
+ - result.rendered | length == 8
+
+- name: Idempotence - Rendered
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: *id001
+
+- assert:
+ that:
+ - result.changed == false
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/replaced.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/replaced.yml
new file mode 100644
index 00000000..b6127906
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/replaced.yml
@@ -0,0 +1,64 @@
+---
+- debug:
+ msg: Start nxos_lldp_interfaces replaced integration tests connection = {{ansible_connection}}
+
+- name: Enable lldp feature
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: enabled
+
+- block:
+
+ - name: Setup
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface Ethernet1/2"
+ - " no lldp receive"
+ - " lldp tlv-set management-address 192.168.122.64"
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: &id001
+ config:
+
+ - name: Ethernet1/2
+ transmit: false
+ tlv_set:
+ vlan: 2
+ state: replaced
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'interface Ethernet1/2' in result.commands"
+ - "'lldp receive' in result.commands"
+ - "'no lldp tlv-set management-address 192.168.122.64' in result.commands"
+ - "'no lldp transmit' in result.commands"
+ - "'lldp tlv-set vlan 2' in result.commands"
+ - result.commands|length == 5
+
+ - name: Gather lldp_interfaces post facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: lldp_interfaces
+
+ - assert:
+ that:
+ - ansible_facts.network_resources.lldp_interfaces == result.after
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_lldp_interfaces: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/rtt.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/rtt.yml
new file mode 100644
index 00000000..4adb7c15
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/tests/common/rtt.yml
@@ -0,0 +1,75 @@
+---
+- debug:
+ msg: Start nxos_lldp_interfaces round trip integration tests on connection={{
+ ansible_connection }}
+
+- name: Enable lldp
+ cisco.nxos.nxos_feature:
+ feature: lldp
+
+- include_tasks: remove_config.yaml
+
+- block:
+
+ - name: RTT - Apply the provided configuration (base config)
+ register: base_config
+ cisco.nxos.nxos_lldp_interfaces:
+ config:
+
+ - name: Ethernet1/1
+ transmit: false
+ tlv_set:
+ vlan: 5
+ state: merged
+
+ - name: Gather interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - lldp_interfaces
+
+ - name: Apply provided configuration (this will be reverted)
+ register: result
+ cisco.nxos.nxos_lldp_interfaces:
+ config:
+
+ - name: Ethernet1/1
+ transmit: false
+
+ - name: Ethernet1/2
+ transmit: true
+ tlv_set:
+ vlan: 12
+ management_address: 10.1.1.2
+ state: overridden
+
+ - name: Assert that changes were applied
+ assert:
+ that:
+ - result.changed == true
+ - "'interface Ethernet1/1' in result.commands"
+ - "'no lldp tlv-set vlan 5' in result.commands"
+ - "'interface Ethernet1/2' in result.commands"
+ - "'lldp transmit' in result.commands"
+ - "'lldp tlv-set vlan 12' in result.commands"
+ - "'lldp tlv-set management-address 10.1.1.2' in result.commands"
+ - result.commands | length == 6
+
+ - name: Revert back to base configuration
+ register: revert
+ cisco.nxos.nxos_lldp_interfaces:
+ config: "{{ ansible_facts['network_resources']['lldp_interfaces'] }}"
+ state: overridden
+
+ - name: Assert that config was reverted
+ assert:
+ that: "{{ base_config['after'] | symmetric_difference(revert['after']) |length\
+ \ == 0 }}"
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_feature:
+ feature: lldp
+ state: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/vars/main.yml
new file mode 100644
index 00000000..ed33efa4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_lldp_interfaces/vars/main.yml
@@ -0,0 +1,12 @@
+---
+parsed:
+ - name: Ethernet1/1
+ receive: true
+ transmit: false
+ - name: Ethernet1/2
+ receive: false
+ tlv_set:
+ vlan: 12
+ - name: Ethernet1/3
+ tlv_set:
+ management_address: 192.0.2.12
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/meta/main.yaml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tasks/main.yaml
new file mode 100644
index 00000000..02b53261
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tasks/main.yaml
@@ -0,0 +1,18 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
+ always:
+
+ - name: Set Baud Rate Back to 9600 so our tests don't break
+ connection: ansible.netcommon.network_cli
+ cisco.nxos.nxos_config:
+ lines:
+ - speed 9600
+ parents: line console
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tests/common/basic.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tests/common/basic.yaml
new file mode 100644
index 00000000..403e8161
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tests/common/basic.yaml
@@ -0,0 +1,519 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_logging basic test"
+
+- name: Workaround to clear logging logfile size
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - logging logfile test 1 size 4194304
+
+- name: Purge logging configuration first
+ cisco.nxos.nxos_logging:
+ purge: true
+
+- name: Set up console logging
+ register: result
+ cisco.nxos.nxos_logging: &id001
+ dest: console
+ dest_level: 0
+ state: present
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging console 0" in result.commands'
+
+- name: Set up console logging again (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id001
+
+- assert: &id003
+ that:
+ - result.changed == false
+
+- name: Set up console logging with level 2 (edge case)
+ register: result
+ cisco.nxos.nxos_logging: &id002
+ dest: console
+ dest_level: 2
+ state: present
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging console 2" in result.commands'
+
+- name: Set up console logging with level 2 (edge case) (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id002
+
+- assert: *id003
+
+- name: Set Baud Rate to less than 38400
+ cisco.nxos.nxos_config:
+ lines:
+ - speed 19200
+ parents: line console
+
+- name: Enable console logging with level 3 (will fail)
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_logging: &id004
+ dest: console
+ dest_level: 3
+
+- assert:
+ that:
+ - result.failed == true
+
+- name: Set Baud Rate to 38400
+ cisco.nxos.nxos_config:
+ lines:
+ - speed 38400
+ parents: line console
+
+- name: Enable console logging with level 3 (will pass)
+ register: result
+ cisco.nxos.nxos_logging: *id004
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging console 3" in result.commands'
+
+- block:
+
+ - name: Logfile logging with level
+ register: result
+ cisco.nxos.nxos_logging: &id005
+ dest: logfile
+ name: test
+ dest_level: 1
+ state: present
+
+ - assert:
+ that:
+ - result.changed == true
+ - '"logging logfile test 1" in result.commands'
+
+ - name: Logfile logging with level (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id005
+
+ - assert: *id003
+ when: platform is not search('N5K|N7K') and imagetag is not search("A8")
+
+- name: Configure module with level
+ register: result
+ cisco.nxos.nxos_logging: &id006
+ dest: module
+ dest_level: 2
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging module 2" in result.commands'
+
+- name: Configure module with level (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id006
+
+- assert: *id003
+
+- name: Configure monitor with level
+ register: result
+ cisco.nxos.nxos_logging: &id007
+ dest: monitor
+ dest_level: 3
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging monitor 3" in result.commands'
+
+- name: Configure monitor with level (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id007
+
+- assert: *id003
+
+- name: Configure monitor with level 5 (edge case)
+ register: result
+ cisco.nxos.nxos_logging: &id008
+ dest: monitor
+ dest_level: 5
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging monitor 5" in result.commands'
+
+- name: Configure monitor with level 5 (edge case) (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id008
+
+- assert: *id003
+
+- name: Configure facility with level
+ register: result
+ cisco.nxos.nxos_logging: &id009
+ facility: daemon
+ facility_level: 4
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging level daemon 4" in result.commands'
+
+- name: Configure facility with level (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id009
+
+- assert: *id003
+
+- name: Configure Remote Logging
+ register: result
+ cisco.nxos.nxos_logging: &id010
+ dest: server
+ remote_server: test-syslogserver.com
+ facility: auth
+ facility_level: 1
+ use_vrf: management
+ state: present
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging server test-syslogserver.com 1 facility auth use-vrf management"
+ in result.commands'
+
+- name: Configure Remote Logging (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id010
+
+- assert: *id003
+
+- name: Configure Source Interface for Logging
+ register: result
+ cisco.nxos.nxos_logging: &id011
+ interface: mgmt0
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging source-interface mgmt 0" in result.commands'
+
+- name: Configure Source Interface for Logging (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id011
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove logging as collection tearDown
+ register: result
+ cisco.nxos.nxos_logging: &id012
+ aggregate:
+
+ - dest: console
+ dest_level: 3
+
+ - dest: module
+ dest_level: 2
+
+ - dest: monitor
+ dest_level: 5
+
+ - dest: logfile
+ dest_level: 1
+ name: test
+
+ - facility: daemon
+ facility_level: 4
+
+ - dest: server
+ remote_server: test-syslogserver.com
+ facility: auth
+ facility_level: 1
+ use_vrf: management
+
+ - interface: mgmt0
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no logging logfile" in result.commands'
+ - '"no logging level daemon 4" in result.commands'
+ - '"no logging monitor" in result.commands'
+ - '"no logging module" in result.commands'
+ - '"no logging server test-syslogserver.com" in result.commands'
+ - '"no logging source-interface" in result.commands'
+ when: platform is not search('N5K|N7K') and imagetag is not search("A8")
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no logging level daemon 4" in result.commands'
+ - '"no logging monitor" in result.commands'
+ - '"no logging module" in result.commands'
+ - '"no logging server test-syslogserver.com" in result.commands'
+ - '"no logging source-interface" in result.commands'
+ when: platform is search('N5K|N7K') or imagetag is search("A8")
+
+- name: remove aggregate logging (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id012
+
+- assert: *id003
+
+- block:
+
+ - name: Configure Logging message
+ register: result
+ cisco.nxos.nxos_logging: &id013
+ interface_message: add-interface-description
+ state: present
+
+ - assert: &id014
+ that:
+ - result.changed == true
+
+ - name: Configure Logging message (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id013
+
+ - assert: *id003
+
+ - name: Remove Logging message
+ register: result
+ cisco.nxos.nxos_logging:
+ interface_message: add-interface-description
+ state: absent
+
+ - assert: *id014
+ when: platform is not search('N5K') and imagetag is not search("A8")
+
+- name: Logfile logging with level and size
+ register: result
+ cisco.nxos.nxos_logging: &id015
+ dest: logfile
+ name: test
+ dest_level: 1
+ file_size: 16384
+ state: present
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging logfile test 1 size 16384" in result.commands'
+
+- name: Logfile logging with level and size (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id015
+
+- assert: *id003
+
+- name: Remove logfile logging with level and size
+ register: result
+ cisco.nxos.nxos_logging:
+ dest: logfile
+ name: test
+ dest_level: 1
+ file_size: 16384
+ state: absent
+
+- assert: *id014
+
+- name: Set up logging event link enable
+ register: result
+ cisco.nxos.nxos_logging: &id016
+ event: link-enable
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging event link-status enable" in result.commands'
+
+- name: Set up logging event link enable again (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id016
+
+- assert: *id003
+
+- name: Remove logging event link enable
+ register: result
+ cisco.nxos.nxos_logging: &id017
+ event: link-enable
+ state: absent
+
+- assert: *id014
+
+- name: Remove logging event link enable again (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id017
+
+- assert: *id003
+
+- name: Set up logging event link default
+ register: result
+ cisco.nxos.nxos_logging: &id018
+ event: link-default
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging event link-status default" in result.commands'
+
+- name: Set up logging event link default again (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id018
+
+- assert: *id003
+
+- name: Remove logging event link default
+ register: result
+ cisco.nxos.nxos_logging: &id019
+ event: link-default
+ state: absent
+
+- assert: *id014
+
+- name: Remove logging event link default again (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id019
+
+- assert: *id003
+
+- name: Set up logging event trunk enable
+ register: result
+ cisco.nxos.nxos_logging: &id020
+ event: trunk-enable
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging event trunk-status enable" in result.commands'
+
+- name: Set up logging event trunk enable again (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id020
+
+- assert: *id003
+
+- name: Remove logging event trunk enable
+ register: result
+ cisco.nxos.nxos_logging: &id021
+ event: trunk-enable
+ state: absent
+
+- assert: *id014
+
+- name: Remove logging event trunk enable again (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id021
+
+- assert: *id003
+
+- name: Set up logging event trunk default
+ register: result
+ cisco.nxos.nxos_logging: &id022
+ event: trunk-default
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging event trunk-status default" in result.commands'
+
+- name: Set up logging event trunk default again (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id022
+
+- assert: *id003
+
+- name: Remove logging event trunk default
+ register: result
+ cisco.nxos.nxos_logging: &id023
+ event: trunk-default
+ state: absent
+
+- assert: *id014
+
+- name: Remove logging event trunk default again (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id023
+
+- assert: *id003
+
+- name: Set up Logging Timestamp
+ register: result
+ cisco.nxos.nxos_logging: &id024
+ timestamp: microseconds
+ state: present
+
+- assert: *id014
+
+- name: Set up Logging Timestamp (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id024
+
+- assert: *id003
+
+- name: Remove Logging Timestamp
+ register: result
+ cisco.nxos.nxos_logging:
+ timestamp: microseconds
+ state: absent
+
+- assert: *id014
+
+- name: Set up Facility ethpm Link UP Error
+ register: result
+ cisco.nxos.nxos_logging: &id025
+ facility: ethpm
+ facility_link_status: link-up-error
+ state: present
+
+- assert: *id014
+
+- name: Set up Facility ethpm Link UP Error (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id025
+
+- assert: *id003
+
+- name: Remove Facility ethpm Link UP Error
+ register: result
+ cisco.nxos.nxos_logging:
+ facility: ethpm
+ facility_link_status: link-up-error
+ state: absent
+
+- assert: *id014
+
+- name: Set up Facility ethpm Link DOWN Error
+ register: result
+ cisco.nxos.nxos_logging: &id026
+ facility: ethpm
+ facility_link_status: link-down-error
+ state: present
+
+- assert: *id014
+
+- name: Set up Facility ethpm Link DOWN Error (idempotent)
+ register: result
+ cisco.nxos.nxos_logging: *id026
+
+- assert: *id003
+
+- name: Remove Facility ethpm Link DOWN Error
+ register: result
+ cisco.nxos.nxos_logging:
+ facility: ethpm
+ facility_link_status: link-down-error
+ state: absent
+
+- assert: *id014
+
+- debug: msg="END connection={{ ansible_connection }} nxos_logging basic test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tests/common/net_logging.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tests/common/net_logging.yaml
new file mode 100644
index 00000000..8f9cc35d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tests/common/net_logging.yaml
@@ -0,0 +1,30 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos common/net_logging.yaml"
+
+- name: Delete/disable console logging - setup
+ register: result
+ ansible.netcommon.net_logging:
+ dest: console
+ dest_level: 0
+ state: absent
+
+- name: Set up console logging using platform agnostic module
+ register: result
+ ansible.netcommon.net_logging:
+ dest: console
+ dest_level: 0
+ state: present
+
+- assert:
+ that:
+ - result.changed == true
+ - '"logging console 0" in result.commands'
+
+- name: Delete/disable console logging - teardown
+ register: result
+ ansible.netcommon.net_logging:
+ dest: console
+ dest_level: 0
+ state: absent
+
+- debug: msg="END connection={{ ansible_connection }} nxos common/net_logging.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tests/common/purge.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tests/common/purge.yaml
new file mode 100644
index 00000000..f0d56822
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_logging/tests/common/purge.yaml
@@ -0,0 +1,112 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_logging purge test"
+
+- name: Purge logging configuration first
+ cisco.nxos.nxos_logging:
+ purge: true
+
+- block:
+
+ - name: Set up console logging
+ register: result
+ cisco.nxos.nxos_logging:
+ dest: console
+ dest_level: 0
+ state: present
+
+ - assert:
+ that:
+ - result.changed == true
+ - '"logging console 0" in result.commands'
+
+ - name: Set up Logging Timestamp
+ register: result
+ cisco.nxos.nxos_logging:
+ timestamp: microseconds
+ state: present
+
+ - assert:
+ that:
+ - result.changed == true
+ - '"logging timestamp microseconds" in result.commands'
+
+ - name: Configure monitor with level
+ register: result
+ cisco.nxos.nxos_logging:
+ dest: monitor
+ dest_level: 3
+
+ - assert:
+ that:
+ - result.changed == true
+ - '"logging monitor 3" in result.commands'
+
+ - name: Configure facility with level
+ register: result
+ cisco.nxos.nxos_logging:
+ facility: daemon
+ facility_level: 4
+
+ - assert:
+ that:
+ - result.changed == true
+ - '"logging level daemon 4" in result.commands'
+
+ - name: Configure logging level virtual-service 7 using nxos_config
+ register: result
+ cisco.nxos.nxos_config:
+ lines: logging level virtual-service 7
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Purge the outliers
+ register: result
+ cisco.nxos.nxos_logging:
+ purge: true
+
+ - assert:
+ that:
+ - result.changed == true
+ - '"no logging level virtual-service 7" in result.commands'
+
+ - block:
+
+ - name: Purge the outliers (idempotent)
+ register: result
+ cisco.nxos.nxos_logging:
+ purge: true
+
+ - assert:
+ that:
+ - result.changed == false
+ when: imagetag is not search("A8")
+
+ - name: remove logging as collection tearDown
+ register: result
+ cisco.nxos.nxos_logging:
+ aggregate:
+
+ - dest: console
+ dest_level: 0
+
+ - dest: monitor
+ dest_level: 3
+
+ - timestamp: microseconds
+
+ - facility: daemon
+ facility_level: 4
+ state: absent
+
+ - assert:
+ that:
+ - result.changed == true
+ - '"no logging console" in result.commands'
+ - '"no logging timestamp microseconds" in result.commands'
+ - '"no logging level daemon 4" in result.commands'
+ - '"no logging monitor" in result.commands'
+ when: ansible_connection != "local"
+
+- debug: msg="END connection={{ ansible_connection }} nxos_logging purge test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tests/common/sanity.yaml
new file mode 100644
index 00000000..d8baa70f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp/tests/common/sanity.yaml
@@ -0,0 +1,114 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_ntp sanity test"
+
+- name: Setup - Remove ntp if configured
+ ignore_errors: true
+ cisco.nxos.nxos_ntp: &id005
+ server: 1.2.3.4
+ key_id: 32
+ prefer: disabled
+ vrf_name: management
+ source_addr: 192.0.2.5
+ state: absent
+
+- block:
+
+ - name: Configure ntp
+ register: result
+ cisco.nxos.nxos_ntp: &id001
+ server: 1.2.3.4
+ key_id: 32
+ prefer: enabled
+ vrf_name: management
+ source_addr: 192.0.2.5
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_ntp: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure ntp with some defaults
+ register: result
+ cisco.nxos.nxos_ntp: &id003
+ peer: 1.2.3.4
+ key_id: default
+ prefer: enabled
+ vrf_name: default
+ source_addr: default
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_ntp: *id003
+
+ - assert: *id004
+
+ - name: Remove ntp config
+ register: result
+ cisco.nxos.nxos_ntp: *id005
+
+ - assert: *id002
+
+ - name: Remove Idempotence Check
+ register: result
+ cisco.nxos.nxos_ntp: *id005
+
+ - assert: *id004
+
+ - name: Configure ntp again
+ register: result
+ cisco.nxos.nxos_ntp: &id006
+ source_int: Ethernet1/3
+ peer: 1.2.3.4
+ prefer: enabled
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_ntp: *id006
+
+ - assert: *id004
+
+ - name: Remove source interface
+ register: result
+ cisco.nxos.nxos_ntp: &id007
+ source_int: default
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_ntp: *id007
+
+ - assert: *id004
+
+ - name: Remove ntp
+ register: result
+ cisco.nxos.nxos_ntp: *id005
+
+ - assert: *id002
+
+ - name: Remove Idempotence Check
+ register: result
+ cisco.nxos.nxos_ntp: *id005
+
+ - assert: *id004
+ always:
+
+ - name: Remove ntp config
+ cisco.nxos.nxos_ntp: *id005
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_ntp sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tests/common/sanity.yaml
new file mode 100644
index 00000000..5fa09b68
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_auth/tests/common/sanity.yaml
@@ -0,0 +1,133 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_ntp_auth sanity test"
+
+- name: Configure text ntp authentication
+ ignore_errors: true
+ cisco.nxos.nxos_ntp_auth: &id009
+ key_id: 32
+ md5string: hello
+ state: absent
+
+- block:
+
+ - name: Configure text ntp authentication
+ register: result
+ cisco.nxos.nxos_ntp_auth:
+ key_id: 32
+ md5string: hello
+ authentication: false
+ state: present
+
+ - assert: &id001
+ that:
+ - result.changed == true
+
+ - name: Remove text ntp authentication
+ register: result
+ cisco.nxos.nxos_ntp_auth:
+ key_id: 32
+ md5string: hello
+ authentication: false
+ state: absent
+
+ - assert: *id001
+
+ - name: Configure encrypt ntp authentication
+ register: result
+ cisco.nxos.nxos_ntp_auth: &id002
+ key_id: 32
+ md5string: hello
+ auth_type: encrypt
+ state: present
+
+ - assert: *id001
+
+ - name: Check Idempotence - Configure encrypt ntp authentication
+ register: result
+ cisco.nxos.nxos_ntp_auth: *id002
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Turn on authentication
+ register: result
+ cisco.nxos.nxos_ntp_auth: &id003
+ authentication: true
+ state: present
+
+ - assert: *id001
+
+ - name: Check Idempotence - Turn on authentication
+ register: result
+ cisco.nxos.nxos_ntp_auth: *id003
+
+ - assert: *id004
+
+ - name: Turn off authentication
+ register: result
+ cisco.nxos.nxos_ntp_auth: &id005
+ authentication: false
+ state: present
+
+ - assert: *id001
+
+ - name: Check Idempotence - Turn off authentication
+ register: result
+ cisco.nxos.nxos_ntp_auth: *id005
+
+ - assert: *id004
+
+ - name: Add trusted key
+ register: result
+ cisco.nxos.nxos_ntp_auth: &id006
+ key_id: 32
+ trusted_key: true
+ state: present
+
+ - assert: *id001
+
+ - name: Check Idempotence - Add trusted key
+ register: result
+ cisco.nxos.nxos_ntp_auth: *id006
+
+ - assert: *id004
+
+ - name: Remove trusted key
+ register: result
+ cisco.nxos.nxos_ntp_auth: &id007
+ key_id: 32
+ trusted_key: false
+ state: present
+
+ - assert: *id001
+
+ - name: Check Idempotence - Remove trusted key
+ register: result
+ cisco.nxos.nxos_ntp_auth: *id007
+
+ - assert: *id004
+
+ - name: Remove encrypt ntp authentication
+ register: result
+ cisco.nxos.nxos_ntp_auth: &id008
+ key_id: 32
+ md5string: hello
+ auth_type: encrypt
+ authentication: true
+ state: absent
+
+ - assert: *id001
+
+ - name: Check Idempotence - Remove encrypt ntp authentication
+ register: result
+ cisco.nxos.nxos_ntp_auth: *id008
+
+ - assert: *id004
+ always:
+
+ - name: Cleanup ntp auth config
+ ignore_errors: true
+ cisco.nxos.nxos_ntp_auth: *id009
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_ntp_auth sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tests/common/sanity.yaml
new file mode 100644
index 00000000..a4babe05
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ntp_options/tests/common/sanity.yaml
@@ -0,0 +1,101 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_ntp_options sanity
+ test"
+
+- name: Apply default ntp config
+ ignore_errors: true
+ cisco.nxos.nxos_ntp_options: &id007
+ state: absent
+
+- block:
+
+ - name: Configure ntp with master and default stratum
+ register: result
+ cisco.nxos.nxos_ntp_options: &id001
+ master: true
+ logging: true
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence - Configure ntp with master and default stratum
+ register: result
+ cisco.nxos.nxos_ntp_options: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure ntp with master and non-default stratum
+ register: result
+ cisco.nxos.nxos_ntp_options: &id003
+ master: true
+ stratum: 10
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence - Configure ntp with master and non-default stratum
+ register: result
+ cisco.nxos.nxos_ntp_options: *id003
+
+ - assert: *id004
+
+ - name: Configure ntp with master and no logging
+ register: result
+ cisco.nxos.nxos_ntp_options: &id005
+ master: true
+ stratum: 10
+ logging: false
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence - Configure ntp with master and no logging
+ register: result
+ cisco.nxos.nxos_ntp_options: *id005
+
+ - assert: *id004
+
+ - name: Configure ntp with logging and no master
+ register: result
+ cisco.nxos.nxos_ntp_options: &id006
+ master: false
+ logging: true
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence - Configure ntp with logging and no master
+ register: result
+ cisco.nxos.nxos_ntp_options: *id006
+
+ - assert: *id004
+
+ - name: Configure ntp with master and non-default stratum again
+ register: result
+ cisco.nxos.nxos_ntp_options: *id003
+
+ - assert: *id002
+
+ - name: Remove ntp options
+ register: result
+ cisco.nxos.nxos_ntp_options: *id007
+
+ - assert: *id002
+
+ - name: Check Idempotence - Remove
+ register: result
+ cisco.nxos.nxos_ntp_options: *id007
+
+ - assert: *id004
+ always:
+
+ - name: Cleanup ntp config
+ register: result
+ cisco.nxos.nxos_ntp_options: *id007
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_ntp_options sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/nxapi.yaml
new file mode 100644
index 00000000..a41d081b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/nxapi.yaml
@@ -0,0 +1,35 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+
+- name: run test cases (connection=local)
+ include: '{{ test_case_to_run }} ansible_connection=local connection={{ nxapi
+ }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_http.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_http.yaml
new file mode 100644
index 00000000..134e5d7c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_http.yaml
@@ -0,0 +1,17 @@
+---
+- name: Assert HTTP configuration changes
+ assert:
+ that:
+ - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port
+ - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port|string
+ is search("80")
+ - result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
+ when: result.stdout[0].TABLE_listen_on_port is defined
+
+- name: Assert HTTP configuration changes 9.2 or greater
+ assert:
+ that:
+ - result.stdout[0]['http_port']
+ - result.stdout[0]['http_port']|string is search("80")
+ - result.stdout[0]['nxapi_status'] == 'nxapi enabled'
+ when: result.stdout[0].http_port is defined
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https.yaml
new file mode 100644
index 00000000..b6e642e5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https.yaml
@@ -0,0 +1,17 @@
+---
+- name: Assert HTTPS configuration changes
+ assert:
+ that:
+ - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port
+ - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port|string
+ is search("9443")
+ - result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
+ when: result.stdout[0].TABLE_listen_on_port is defined
+
+- name: Assert HTTPS configuration changes 9.2 or greater
+ assert:
+ that:
+ - result.stdout[0]['https_port']
+ - result.stdout[0]['https_port']|string is search("9443")
+ - result.stdout[0]['nxapi_status'] == 'nxapi enabled'
+ when: result.stdout[0].https_port is defined
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http.yaml
new file mode 100644
index 00000000..bdf5bfab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http.yaml
@@ -0,0 +1,23 @@
+---
+- name: Assert HTTPS & HTTP configuration changes
+ assert:
+ that:
+ - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][1].l_port
+ - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][1].l_port|string
+ is search("9443")
+ - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port
+ - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port|string
+ is search("80")
+ - result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
+ when: result.stdout[0].TABLE_listen_on_port is defined
+
+- name: Assert HTTPS & HTTP configuration changes 9.2 or greater
+ assert:
+ that:
+ - result.stdout[0]['https_port']
+ - result.stdout[0]['https_port']|string is search("9443")
+ - result.stdout[0]['http_port']
+ - result.stdout[0]['http_port']|string is search("80")
+ - result.stdout[0]['nxapi_status'] == 'nxapi enabled'
+ when: result.stdout[0].https_port is defined or result.stdout[0].http_port is
+ defined
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http_ports.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http_ports.yaml
new file mode 100644
index 00000000..4154a4e4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http_ports.yaml
@@ -0,0 +1,23 @@
+---
+- name: Assert HTTPS & HTTP configuration changes
+ assert:
+ that:
+ - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][1].l_port
+ - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][1].l_port|string
+ is search("500")
+ - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port
+ - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port|string
+ is search("99")
+ - result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
+ when: result.stdout[0].TABLE_listen_on_port is defined
+
+- name: Assert HTTPS & HTTP configuration changes 9.2 or greater
+ assert:
+ that:
+ - result.stdout[0]['https_port']
+ - result.stdout[0]['https_port']|string is search("500")
+ - result.stdout[0]['http_port']
+ - result.stdout[0]['http_port']|string is search("99")
+ - result.stdout[0]['nxapi_status'] == 'nxapi enabled'
+ when: result.stdout[0].https_port is defined or result.stdout[0].http_port is
+ defined
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_http.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_http.yaml
new file mode 100644
index 00000000..2f79127f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_http.yaml
@@ -0,0 +1,6 @@
+---
+- name: Assert HTTP configuration changes
+ assert:
+ that:
+ - result.stdout[0].https_port is not defined
+ - result.stdout[0].http_port|string is search("80")
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https.yaml
new file mode 100644
index 00000000..a934a1fa
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https.yaml
@@ -0,0 +1,6 @@
+---
+- name: Assert HTTPS configuration changes
+ assert:
+ that:
+ - result.stdout[0].http_port is not defined
+ - result.stdout[0].https_port|string is search("9443")
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http.yaml
new file mode 100644
index 00000000..4dded98c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http.yaml
@@ -0,0 +1,8 @@
+---
+- name: Assert HTTPS && HTTP configuration changes
+ assert:
+ that:
+ - result.stdout[0].https_port is defined
+ - result.stdout[0].http_port is defined
+ - result.stdout[0].https_port|string is search("9443")
+ - result.stdout[0].http_port|string is search("80")
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http_ports.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http_ports.yaml
new file mode 100644
index 00000000..09c69d67
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http_ports.yaml
@@ -0,0 +1,8 @@
+---
+- name: Assert HTTPS && HTTP configuration changes
+ assert:
+ that:
+ - result.stdout[0].https_port is defined
+ - result.stdout[0].http_port is defined
+ - result.stdout[0].https_port|string is search("500")
+ - result.stdout[0].http_port|string is search("99")
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_http.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_http.yaml
new file mode 100644
index 00000000..fbfba2fd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_http.yaml
@@ -0,0 +1,7 @@
+---
+- name: Assert HTTP configuration changes
+ assert:
+ that:
+ - result.stdout[0].https_port is not defined
+ - result.stdout[0].http_port|string is search("80")
+ - result.stdout[0].sandbox_status == 'Enabled'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https.yaml
new file mode 100644
index 00000000..83d954aa
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https.yaml
@@ -0,0 +1,7 @@
+---
+- name: Assert HTTPS configuration changes
+ assert:
+ that:
+ - result.stdout[0].http_port is not defined
+ - result.stdout[0].https_port|string is search("9443")
+ - result.stdout[0].sandbox_status == 'Enabled'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http.yaml
new file mode 100644
index 00000000..1db6d488
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http.yaml
@@ -0,0 +1,9 @@
+---
+- name: Assert HTTPS & HTTP configuration changes
+ assert:
+ that:
+ - result.stdout[0].https_port is defined
+ - result.stdout[0].http_port is defined
+ - result.stdout[0].https_port|string is search("9443")
+ - result.stdout[0].http_port|string is search("80")
+ - result.stdout[0].sandbox_status == 'Enabled'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http_ports.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http_ports.yaml
new file mode 100644
index 00000000..48611ef8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http_ports.yaml
@@ -0,0 +1,9 @@
+---
+- name: Assert HTTPS & HTTP configuration changes
+ assert:
+ that:
+ - result.stdout[0].https_port is defined
+ - result.stdout[0].http_port is defined
+ - result.stdout[0].https_port|string is search("500")
+ - result.stdout[0].http_port|string is search("99")
+ - result.stdout[0].sandbox_status == 'Enabled'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/configure.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/configure.yaml
new file mode 100644
index 00000000..bf1c0bc5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/configure.yaml
@@ -0,0 +1,142 @@
+---
+- debug: msg="START cli/configure.yaml"
+
+- set_fact: nxapi_sandbox_option="yes"
+ when: platform is search('N7K')
+
+- name: Setup - put NXAPI in stopped state
+ cisco.nxos.nxos_nxapi:
+ state: absent
+
+- block:
+
+ - name: Configure NXAPI HTTPS
+ register: result
+ cisco.nxos.nxos_nxapi: &id001
+ enable_http: false
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+ enable_https: true
+ https_port: 9443
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show nxapi | json
+
+ - include: tasks/platform/n7k/assert_changes_https.yaml
+ when: platform is match('N7K')
+
+ - include: tasks/platform/n5k/assert_changes_https.yaml
+ when: platform is search('N5K|N6K')
+
+ - include: tasks/platform/default/assert_changes_https.yaml
+ when: platform is not search('N35|N5K|N6K|N7K')
+
+ - name: Configure NXAPI HTTPS again
+ register: result
+ cisco.nxos.nxos_nxapi: *id001
+
+ - name: Assert configuration is idempotent
+ assert: &id003
+ that:
+ - result.changed == false
+
+ - name: Configure NXAPI HTTPS & HTTP
+ register: result
+ cisco.nxos.nxos_nxapi: &id002
+ enable_http: true
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+ enable_https: true
+ https_port: 9443
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show nxapi | json
+
+ - include: tasks/platform/n7k/assert_changes_https_http.yaml
+ when: platform is match('N7K')
+
+ - include: tasks/platform/n5k/assert_changes_https_http.yaml
+ when: platform is match('N5K')
+
+ - include: tasks/platform/default/assert_changes_https_http.yaml
+ when: platform is not search('N35|N5K|N6K|N7K')
+
+ - name: Configure NXAPI HTTPS & HTTP again
+ register: result
+ cisco.nxos.nxos_nxapi: *id002
+
+ - name: Assert configuration is idempotent
+ assert: *id003
+
+ - name: Configure different NXAPI HTTPS & HTTP ports
+ register: result
+ cisco.nxos.nxos_nxapi: &id004
+ enable_http: true
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+ enable_https: true
+ http_port: 99
+ https_port: 500
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show nxapi | json
+
+ - include: tasks/platform/n7k/assert_changes_https_http_ports.yaml
+ when: platform is match('N7K')
+
+ - include: tasks/platform/n5k/assert_changes_https_http_ports.yaml
+ when: platform is match('N5K')
+
+ - include: tasks/platform/default/assert_changes_https_http_ports.yaml
+ when: platform is not search('N35|N5K|N6K|N7K')
+
+ - name: Configure different NXAPI HTTPS & HTTP ports again
+ register: result
+ cisco.nxos.nxos_nxapi: *id004
+
+ - name: Assert configuration is idempotent
+ assert: *id003
+
+ - name: Configure NXAPI HTTP
+ register: result
+ cisco.nxos.nxos_nxapi: &id005
+ enable_http: true
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+ enable_https: false
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show nxapi | json
+
+ - include: tasks/platform/n7k/assert_changes_http.yaml
+ when: platform is match('N7K')
+
+ - include: tasks/platform/n5k/assert_changes_http.yaml
+ when: platform is match('N5K')
+
+ - include: tasks/platform/default/assert_changes_http.yaml
+ when: platform is not search('N35|N5K|N6K|N7K')
+
+ - name: Configure NXAPI HTTP again
+ register: result
+ cisco.nxos.nxos_nxapi: *id005
+
+ - name: Assert configuration is idempotent
+ assert: *id003
+ always:
+
+ - name: Cleanup - Disable NXAPI
+ register: result
+ cisco.nxos.nxos_nxapi:
+ state: absent
+
+ - name: Cleanup - Re-enable NXAPI
+ register: result
+ cisco.nxos.nxos_nxapi:
+ state: present
+
+ - debug: msg="END cli/configure.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/disable.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/disable.yaml
new file mode 100644
index 00000000..5d44c1a2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/disable.yaml
@@ -0,0 +1,28 @@
+---
+- debug: msg="START cli/disable.yaml"
+
+- name: Disable NXAPI
+ register: result
+ cisco.nxos.nxos_nxapi:
+ state: absent
+
+- name: Check NXAPI state
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show feature | grep nxapi
+
+- name: Assert NXAPI is disabled
+ assert:
+ that: result.stdout[0] is search('disabled')
+
+- name: Disable NXAPI again
+ register: result
+ cisco.nxos.nxos_nxapi:
+ state: absent
+
+- name: Assert idempotence
+ assert:
+ that: result.changed == false
+
+- debug: msg="END cli/disable.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/enable.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/enable.yaml
new file mode 100644
index 00000000..7bcf411c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/enable.yaml
@@ -0,0 +1,32 @@
+---
+- debug: msg="START cli/enable.yaml"
+
+- name: Setup - put NXAPI in stopped state
+ register: result
+ cisco.nxos.nxos_nxapi:
+ state: absent
+
+- name: Enable NXAPI
+ register: result
+ cisco.nxos.nxos_nxapi:
+ state: present
+
+- name: Check NXAPI state
+ register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show feature | grep nxapi
+
+- name: Assert NXAPI is enabled
+ assert:
+ that: result.stdout[0] is search('enabled')
+
+- name: Enable NXAPI again
+ register: result
+ cisco.nxos.nxos_nxapi:
+
+- name: Assert idempotence
+ assert:
+ that: result.changed == false
+
+- debug: msg="END cli/enable.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/nxapi_ssl.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/nxapi_ssl.yaml
new file mode 100644
index 00000000..d70d5134
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/cli/nxapi_ssl.yaml
@@ -0,0 +1,248 @@
+---
+- block:
+
+ - debug: msg="START cli/nxapi_ssl.yaml"
+
+ - name: Configure NXAPI HTTPs w/weak ciphers
+ register: result
+ cisco.nxos.nxos_nxapi: &id001
+ enable_https: true
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+ ssl_strong_ciphers: false
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show run all | inc nxapi | inc ciphers
+
+ - name: Assert weak ciphers configuration
+ assert:
+ that:
+ - result.stdout_lines[0][0] == 'nxapi ssl ciphers weak'
+
+ - name: Configure NXAPI HTTP w/weak ciphers again
+ register: result
+ cisco.nxos.nxos_nxapi: *id001
+
+ - name: Assert configuration is idempotent
+ assert: &id003
+ that:
+ - result.changed == false
+
+ - name: Configure NXAPI HTTPs w/strong ciphers
+ register: result
+ cisco.nxos.nxos_nxapi: &id002
+ enable_https: true
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+ ssl_strong_ciphers: true
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show run all | inc nxapi | inc ciphers
+
+ - name: Assert strong ciphers configuration
+ assert:
+ that:
+ - result.stdout_lines[0][0] == 'no nxapi ssl ciphers weak'
+
+ - name: Configure NXAPI HTTPs w/strong ciphers again
+ register: result
+ cisco.nxos.nxos_nxapi: *id002
+
+ - name: Assert configuration is idempotent
+ assert: *id003
+
+ - name: Configure NXAPI HTTPs w/default TLSv1
+ register: result
+ cisco.nxos.nxos_nxapi: &id004
+ enable_https: true
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show run all | inc nxapi | inc protocols
+
+ - name: Assert NXAPI HTTPs w/default TLSv1 configuration
+ assert:
+ that:
+ - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1'
+
+ - name: Configure NXAPI HTTPs w/default again
+ register: result
+ cisco.nxos.nxos_nxapi: *id004
+
+ - name: Assert configuration is idempotent
+ assert: *id003
+
+ - name: Configure NXAPI HTTPs TLSv1.1 -default TLSv1
+ register: result
+ cisco.nxos.nxos_nxapi: &id005
+ enable_https: true
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+ tlsv1_1: true
+ tlsv1_0: false
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show run all | inc nxapi | inc protocols
+
+ - name: Assert NXAPI HTTPs w/TLSv1.1 configuration
+ assert:
+ that:
+ - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1.1'
+
+ - name: Configure NXAPI HTTPs w/TLSv1.1 -default TLSv1 again
+ register: result
+ cisco.nxos.nxos_nxapi: *id005
+
+ - name: Assert configuration is idempotent
+ assert: *id003
+
+ - name: Configure NXAPI HTTPs TLSv1.2 -default TLSv1
+ register: result
+ cisco.nxos.nxos_nxapi: &id006
+ enable_https: true
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+ tlsv1_2: true
+ tlsv1_0: false
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show run all | inc nxapi | inc protocols
+
+ - name: Assert NXAPI HTTPs w/TLSv1.2 configuration
+ assert:
+ that:
+ - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1.2'
+
+ - name: Configure NXAPI HTTPs w/TLSv1.2 -default TLSv1 again
+ register: result
+ cisco.nxos.nxos_nxapi: *id006
+
+ - name: Assert configuration is idempotent
+ assert: *id003
+
+ - name: Configure NXAPI HTTPs w/TLS1.2 +default TLSv1
+ register: result
+ cisco.nxos.nxos_nxapi: &id007
+ enable_https: true
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+ ssl_strong_ciphers: true
+ tlsv1_2: true
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show run all | inc nxapi | inc protocols
+
+ - name: Assert NXAPI HTTPs w/TLS1.2 +default TLSv1 configuration
+ assert:
+ that:
+ - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1 TLSv1.2'
+
+ - name: Configure NXAPI HTTPs w/TLS1.2 again
+ register: result
+ cisco.nxos.nxos_nxapi: *id007
+
+ - name: Assert configuration is idempotent
+ assert: *id003
+
+ - name: Configure NXAPI HTTPs w/TLS1.2 TLS1.1 -default TLSv1
+ register: result
+ cisco.nxos.nxos_nxapi: &id008
+ enable_https: true
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+ ssl_strong_ciphers: true
+ tlsv1_0: false
+ tlsv1_1: true
+ tlsv1_2: true
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show run all | inc nxapi | inc protocols
+
+ - name: Assert NXAPI HTTPs w/TLS1.2 TLS1.2 -default TLSv1 configuration
+ assert:
+ that:
+ - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1.1 TLSv1.2'
+
+ - name: Configure NXAPI HTTPs w/TLS1.2 TLS1.1 -default TLSv1 again
+ register: result
+ cisco.nxos.nxos_nxapi: *id008
+
+ - name: Assert configuration is idempotent
+ assert: *id003
+
+ - name: Configure NXAPI HTTPs w/TLS1.2 TLS1.1 +default TLSv1
+ register: result
+ cisco.nxos.nxos_nxapi: &id009
+ enable_https: true
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+ ssl_strong_ciphers: true
+ tlsv1_1: true
+ tlsv1_2: true
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show run all | inc nxapi | inc protocols
+
+ - name: Assert NXAPI HTTPs w/TLS1.2 TLS1.1 +default TLSv1 configuration
+ assert:
+ that:
+ - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1 TLSv1.1 TLSv1.2'
+
+ - name: Configure NXAPI HTTPs w/TLS1.2 TLS1.1 +default TLSv1 again
+ register: result
+ cisco.nxos.nxos_nxapi: *id009
+
+ - name: Assert configuration is idempotent
+ assert: *id003
+
+ - name: Configure NXAPI HTTPs with explicit TLS1.2 TLS1.1 TLSv1
+ register: result
+ cisco.nxos.nxos_nxapi: &id010
+ enable_https: true
+ enable_sandbox: '{{nxapi_sandbox_option|default(omit)}}'
+ ssl_strong_ciphers: true
+ tlsv1_0: true
+ tlsv1_1: true
+ tlsv1_2: true
+
+ - register: result
+ cisco.nxos.nxos_command:
+ commands:
+ - show run all | inc nxapi | inc protocols
+
+ - name: Assert NXAPI HTTPs w/TLS1.2 TLS1.2 TLSv1 configuration
+ assert:
+ that:
+ - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1 TLSv1.1 TLSv1.2'
+
+ - name: Configure NXAPI HTTPs w/TLS1.2 TLS1.1 TLSv1 again
+ register: result
+ cisco.nxos.nxos_nxapi: *id010
+
+ - name: Assert configuration is idempotent
+ assert: *id003
+ always:
+
+ - name: Cleanup - Disable NXAPI
+ register: result
+ cisco.nxos.nxos_nxapi:
+ state: absent
+
+ - name: Cleanup - Re-enable NXAPI
+ register: result
+ cisco.nxos.nxos_nxapi:
+ state: present
+
+ - debug: msg="END cli/nxapi_ssl.yaml"
+ when: (platform is match("N9K") or platform is match("N3K") or platform is match("N9K-F")
+ or platform is match("N35") or platform is match("N3L")) and major_version is
+ version('9.2', '>=')
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/nxapi/badtransport.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/nxapi/badtransport.yaml
new file mode 100644
index 00000000..6feb46ec
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_nxapi/tests/nxapi/badtransport.yaml
@@ -0,0 +1,17 @@
+---
+- debug: msg="START nxapi/badtransport.yaml"
+
+- name: Sending transport other than cli should fail
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_nxapi:
+ enable_http: false
+ enable_sandbox: false
+ https_port: 9443
+ provider: '{{ nxapi }}'
+
+- assert:
+ that:
+ - result.failed and result.msg is search('Transport')
+
+- debug: msg="END nxapi/badtransport.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tests/common/sanity.yaml
new file mode 100644
index 00000000..b5108468
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf/tests/common/sanity.yaml
@@ -0,0 +1,52 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_ospf sanity test"
+
+- name: Enable feature OSPF
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: ospf
+ state: enabled
+
+- block:
+
+ - name: Configure ospf
+ register: result
+ cisco.nxos.nxos_ospf: &id001
+ ospf: 1
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_ospf: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+ rescue:
+
+ - name: Disable feature OSPF
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: ospf
+ state: disabled
+ always:
+
+ - name: Unconfigure ospf
+ register: result
+ cisco.nxos.nxos_ospf: &id003
+ ospf: 1
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_ospf: *id003
+
+ - assert: *id004
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_ospf sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/meta/main.yml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/meta/main.yml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tasks/cli.yaml
new file mode 100644
index 00000000..073787b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tasks/main.yaml
new file mode 100644
index 00000000..583ae0fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tasks/main.yaml
@@ -0,0 +1,27 @@
+---
+- name: Enable OSPF v2 and v3 features
+ cisco.nxos.nxos_config:
+ lines:
+ - feature ospf
+ - feature ospfv3
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli.yaml
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
+
+ always:
+ - name: Disable OSPF v2 and v3 features
+ cisco.nxos.nxos_config:
+ lines:
+ - feature ospf
+ - feature ospfv3
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tasks/nxapi.yaml
new file mode 100644
index 00000000..e6144de9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..ad6404f8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/_populate_config.yaml
@@ -0,0 +1,20 @@
+---
+- name: Populate config
+ cisco.nxos.nxos_config:
+ lines:
+ - "interface {{ nxos_int1 }}"
+ - " ip router ospf 100 area 1.1.1.1 secondaries none"
+ - " ip router ospf multi-area 11.11.11.11"
+ - " ipv6 router ospfv3 200 area 2.2.2.2"
+ - " ipv6 router ospfv3 200 multi-area 21.0.0.0"
+ - " ipv6 router ospfv3 300 multi-area 50.50.50.50"
+ - " ipv6 router ospfv3 multi-area 16.10.10.10"
+ - "interface {{ nxos_int2 }}"
+ - " ip ospf authentication"
+ - " ip ospf authentication key-chain test-1"
+ - " ip ospf message-digest-key 10 md5 3 abc01d272be25d29"
+ - " ip ospf cost 100"
+ - " ospfv3 network broadcast"
+ - " ospfv3 shutdown"
+ - "interface {{ nxos_int3 }}"
+ - " ip ospf authentication-key 7 12090404011C03162E" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..24c11bbb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/_remove_config.yaml
@@ -0,0 +1,9 @@
+- name: Default interfaces
+ cisco.nxos.nxos_config:
+ lines:
+ - "default interface {{ nxos_int1 }}"
+ - "default interface {{ nxos_int2 }}"
+ - "default interface {{ nxos_int3 }}"
+ ignore_errors: True
+ vars:
+ ansible_connection: ansible.netcommon.network_cli \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/_setup.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/_setup.yaml
new file mode 100644
index 00000000..dc8db1c6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/_setup.yaml
@@ -0,0 +1,11 @@
+- name: "Populate interfaces"
+ cisco.nxos.nxos_config:
+ lines:
+ - "no switchport"
+ parents: "interface {{ item }}"
+ loop:
+ - "{{ nxos_int1 }}"
+ - "{{ nxos_int2 }}"
+ - "{{ nxos_int3 }}"
+ vars:
+ ansible_connection: ansible.netcommon.network_cli \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/deleted.yaml
new file mode 100644
index 00000000..e923050c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/deleted.yaml
@@ -0,0 +1,101 @@
+---
+- debug:
+ msg: Start nxos_ospf_interfaces deleted integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _setup.yaml
+
+- include_tasks: _populate_config.yaml
+
+- set_fact:
+ int1:
+ name: "{{ nxos_int1 }}"
+ int2:
+ name: "{{ nxos_int2 }}"
+ int3:
+ name: "{{ nxos_int3 }}"
+
+- block:
+ - name: Delete OSPF config from a single interface
+ cisco.nxos.nxos_ospf_interfaces: &id005
+ config:
+ - name: "{{ nxos_int1 }}"
+ state: deleted
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - result["before"][0] == merged["after"][0]
+ - result["before"][1] == merged["after"][1]
+ - result["before"][2] == merged["after"][2]
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - '"interface {{ nxos_int1 }}" in result.commands'
+ - '"no ip router ospf 100 area 1.1.1.1 secondaries none" in result.commands'
+ - '"no ip router ospf multi-area 11.11.11.11" in result.commands'
+ - '"no ipv6 router ospfv3 200 area 2.2.2.2" in result.commands'
+ - '"no ipv6 router ospfv3 200 multi-area 21.0.0.0" in result.commands'
+ - '"no ipv6 router ospfv3 300 multi-area 50.50.50.50" in result.commands'
+ - '"no ipv6 router ospfv3 multi-area 16.10.10.10" in result.commands'
+ - result.commands|length == 7
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - result["after"][0] == int1
+ - result["after"][1] == merged["after"][1]
+ - result["after"][2] == merged["after"][2]
+
+
+ - name: Delete OSPF config from a single interface (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_ospf_interfaces: *id005
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete OSPF config from all interfaces
+ cisco.nxos.nxos_ospf_interfaces: &id007
+ state: deleted
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - result["before"][0] == merged["after"][0]
+ - result["before"][1] == merged["after"][1]
+ - result["before"][2] == merged["after"][2]
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - result["after"][0] == int1
+ - result["after"][1] == int2
+ - result["after"][2] == int3
+
+ - name: Delete OSPF config from all interfaces (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_ospf_interfaces: *id007
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/empty_config.yaml
new file mode 100644
index 00000000..b318c4a9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/empty_config.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START nxos_ospf_interfaces empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_ospf_interfaces:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_ospf_interfaces empty_config integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/fixtures/parsed.cfg
new file mode 100644
index 00000000..846a722c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/fixtures/parsed.cfg
@@ -0,0 +1,16 @@
+interface Ethernet1/1
+ ip router ospf 100 area 1.1.1.1 secondaries none
+ ip router ospf multi-area 11.11.11.11
+ ipv6 router ospfv3 200 area 2.2.2.2
+ ipv6 router ospfv3 200 multi-area 21.0.0.0
+ ipv6 router ospfv3 300 multi-area 50.50.50.50
+ ipv6 router ospfv3 multi-area 16.10.10.10
+interface Ethernet1/2
+ ip ospf authentication
+ ip ospf authentication key-chain test-1
+ ip ospf message-digest-key 10 md5 3 abc01d272be25d29
+ ip ospf cost 100
+ ospfv3 network broadcast
+ ospfv3 shutdown
+interface Ethernet1/3
+ ip ospf authentication-key 7 12090404011C03162E \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/gathered.yaml
new file mode 100644
index 00000000..15eeb759
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/gathered.yaml
@@ -0,0 +1,25 @@
+---
+- debug:
+ msg: START nxos_ospf_interfaces gathered integration tests on connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _setup.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Gather OSPF interfaces facts using gathered
+ register: result
+ cisco.nxos.nxos_ospf_interfaces:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that:
+ - result["gathered"][0] == merged["after"][0]
+ - result["gathered"][1] == merged["after"][1]
+ - result["gathered"][2] == merged["after"][2]
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/merged.yaml
new file mode 100644
index 00000000..69c37f06
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/merged.yaml
@@ -0,0 +1,89 @@
+---
+- debug:
+ msg: Start nxos_ospf_interfaces merged integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _setup.yaml
+
+- block:
+ - name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_ospf_interfaces: &id001
+ config:
+ - name: "{{ nxos_int1 }}"
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.11
+ - afi: ipv6
+ processes:
+ - process_id: "200"
+ area:
+ area_id: 2.2.2.2
+ multi_areas:
+ - 21.0.0.0
+ - process_id: "300"
+ multi_areas:
+ - 50.50.50.50
+ multi_areas:
+ - 16.10.10.10
+ - name: "{{ nxos_int2 }}"
+ address_family:
+ - afi: ipv4
+ authentication:
+ enable: True
+ key_chain: test-1
+ message_digest_key:
+ key_id: 10
+ encryption: 3
+ key: abc01d272be25d29
+ cost: 100
+ - afi: ipv6
+ network: broadcast
+ shutdown: True
+ - name: "{{ nxos_int3 }}"
+ address_family:
+ - afi: ipv4
+ authentication_key:
+ encryption: 7
+ key: 12090404011C03162E
+ state: merged
+ register: result
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that:
+ - result["before"][0] == merged["before"][0]
+ - result["before"][1] == merged["before"][1]
+ - result["before"][2] == merged["before"][2]
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts were correctly generated
+ assert:
+ that:
+ - "{{ result['after'][0] == merged['after'][0] }}"
+ - "{{ result['after'][1] == merged['after'][1] }}"
+ - "{{ result['after'][2] == merged['after'][2] }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ cisco.nxos.nxos_ospf_interfaces: *id001
+ register: result
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+ always:
+ - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/overridden.yaml
new file mode 100644
index 00000000..da49c0db
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/overridden.yaml
@@ -0,0 +1,59 @@
+---
+- debug:
+ msg: Start nxos_ospf_interfaces overridden integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _setup.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Overridde all OSPF interfaces configuration with provided configuration
+ cisco.nxos.nxos_ospf_interfaces: &id003
+ config:
+ - name: Ethernet1/1
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.12
+ state: overridden
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - result["before"][0] == merged["after"][0]
+ - result["before"][1] == merged["after"][1]
+ - result["before"][2] == merged["after"][2]
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - result['after'][0] == overridden['after'][0]
+ - result['after'][1] == overridden['after'][1]
+ - result['after'][2] == overridden['after'][2]
+
+ - name: Overridde all OSPF interfaces configuration with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_ospf_interfaces: *id003
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+ always:
+ - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/parsed.yaml
new file mode 100644
index 00000000..90d3185a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/parsed.yaml
@@ -0,0 +1,14 @@
+---
+- debug:
+ msg: START nxos_ospf_interfaces parsed integration tests on connection={{ ansible_connection }}
+
+- name: Parse externally provided OSPF interfaces config
+ register: result
+ cisco.nxos.nxos_ospf_interfaces:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - "{{ merged['after'] | symmetric_difference(result['parsed']) |length == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/rendered.yaml
new file mode 100644
index 00000000..5218998a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/rendered.yaml
@@ -0,0 +1,58 @@
+---
+- debug:
+ msg: START nxos_ospf_interfaces rendered integration tests on connection={{ ansible_connection }}
+
+- name: Render platform specific configuration lines with state rendered (without connecting to the device)
+ cisco.nxos.nxos_ospf_interfaces:
+ config:
+ - name: "{{ nxos_int1 }}"
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.11
+ - afi: ipv6
+ processes:
+ - process_id: "200"
+ area:
+ area_id: 2.2.2.2
+ multi_areas:
+ - 21.0.0.0
+ - process_id: "300"
+ multi_areas:
+ - 50.50.50.50
+ multi_areas:
+ - 16.10.10.10
+ - name: "{{ nxos_int2 }}"
+ address_family:
+ - afi: ipv4
+ authentication:
+ enable: True
+ key_chain: test-1
+ message_digest_key:
+ key_id: 10
+ encryption: 3
+ key: abc01d272be25d29
+ cost: 100
+ - afi: ipv6
+ network: broadcast
+ shutdown: True
+ - name: "{{ nxos_int3 }}"
+ address_family:
+ - afi: ipv4
+ authentication_key:
+ encryption: 7
+ key: 12090404011C03162E
+ state: rendered
+ register: result
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['rendered']) |length\
+ \ == 0 }}"
+ - result.changed == False
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/replaced.yaml
new file mode 100644
index 00000000..474fb887
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/tests/common/replaced.yaml
@@ -0,0 +1,61 @@
+---
+- debug:
+ msg: Start nxos_ospf_interfaces replaced integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _setup.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Replace OSPF configurations of listed interfaces with provided configurations
+ cisco.nxos.nxos_ospf_interfaces: &id002
+ config:
+ - name: "{{ nxos_int1 }}"
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.12
+ - name: "{{ nxos_int3 }}"
+ state: replaced
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - result["before"][0] == merged["after"][0]
+ - result["before"][1] == merged["after"][1]
+ - result["before"][2] == merged["after"][2]
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - result['after'][0] == replaced['after'][0]
+ - result['after'][1] == replaced['after'][1]
+ - result['after'][2] == replaced['after'][2]
+
+ - name: Replace OSPF configurations of listed interfaces with provided configurations
+ (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_ospf_interfaces: *id002
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ always:
+ - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/vars/main.yml
new file mode 100644
index 00000000..b1540343
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_interfaces/vars/main.yml
@@ -0,0 +1,153 @@
+---
+merged:
+ before:
+ - name: "{{ nxos_int1 }}"
+ - name: "{{ nxos_int2 }}"
+ - name: "{{ nxos_int3 }}"
+ commands:
+ - "interface {{ nxos_int1 }}"
+ - "ip router ospf 100 area 1.1.1.1 secondaries none"
+ - "ip router ospf multi-area 11.11.11.11"
+ - "ipv6 router ospfv3 200 area 2.2.2.2"
+ - "ipv6 router ospfv3 200 multi-area 21.0.0.0"
+ - "ipv6 router ospfv3 300 multi-area 50.50.50.50"
+ - "ipv6 router ospfv3 multi-area 16.10.10.10"
+ - "interface {{ nxos_int2 }}"
+ - "ip ospf authentication"
+ - "ip ospf authentication key-chain test-1"
+ - "ip ospf message-digest-key 10 md5 3 abc01d272be25d29"
+ - "ip ospf cost 100"
+ - "ospfv3 network broadcast"
+ - "ospfv3 shutdown"
+ - "interface {{ nxos_int3 }}"
+ - "ip ospf authentication-key 7 12090404011C03162E"
+ after:
+ - name: "{{ nxos_int1 }}"
+ address_family:
+ - afi: ipv4
+ multi_areas:
+ - 11.11.11.11
+ processes:
+ - area:
+ area_id: 1.1.1.1
+ secondaries: false
+ process_id: "100"
+ - afi: ipv6
+ multi_areas:
+ - 16.10.10.10
+ processes:
+ - area:
+ area_id: 2.2.2.2
+ multi_areas:
+ - 21.0.0.0
+ process_id: "200"
+ - multi_areas:
+ - 50.50.50.50
+ process_id: "300"
+ - name: "{{ nxos_int2 }}"
+ address_family:
+ - afi: ipv4
+ authentication:
+ enable: True
+ key_chain: test-1
+ message_digest_key:
+ key_id: 10
+ encryption: 3
+ key: abc01d272be25d29
+ cost: 100
+ - afi: ipv6
+ network: broadcast
+ shutdown: True
+ - name: "{{ nxos_int3 }}"
+ address_family:
+ - afi: ipv4
+ authentication_key:
+ encryption: 7
+ key: 12090404011C03162E
+
+replaced:
+ commands:
+ - "interface {{ nxos_int1 }}"
+ - "no ip router ospf multi-area 11.11.11.11"
+ - "ip router ospf multi-area 11.11.11.12"
+ - "no ipv6 router ospfv3 200 area 2.2.2.2"
+ - "no ipv6 router ospfv3 200 multi-area 21.0.0.0"
+ - "no ipv6 router ospfv3 300 multi-area 50.50.50.50"
+ - "no ipv6 router ospfv3 multi-area 16.10.10.10"
+ - "interface {{ nxos_int3 }}"
+ - "no ip ospf authentication-key 7 12090404011C03162E"
+ after:
+ - name: "{{ nxos_int1 }}"
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.12
+ - name: "{{ nxos_int2 }}"
+ address_family:
+ - afi: ipv4
+ authentication:
+ enable: True
+ key_chain: test-1
+ message_digest_key:
+ key_id: 10
+ encryption: 3
+ key: abc01d272be25d29
+ cost: 100
+ - afi: ipv6
+ network: broadcast
+ shutdown: True
+ - name: "{{ nxos_int3 }}"
+overridden:
+ commands:
+ - "interface {{ nxos_int1 }}"
+ - "no ip router ospf multi-area 11.11.11.11"
+ - "ip router ospf multi-area 11.11.11.12"
+ - "no ipv6 router ospfv3 200 area 2.2.2.2"
+ - "no ipv6 router ospfv3 200 multi-area 21.0.0.0"
+ - "no ipv6 router ospfv3 300 multi-area 50.50.50.50"
+ - "no ipv6 router ospfv3 multi-area 16.10.10.10"
+ - "interface {{ nxos_int2 }}"
+ - "no ip ospf authentication"
+ - "no ip ospf authentication key-chain test-1"
+ - "no ip ospf message-digest-key 10 md5 3 abc01d272be25d29"
+ - "no ip ospf cost 100"
+ - "no ospfv3 network broadcast"
+ - "no ospfv3 shutdown"
+ - "interface {{ nxos_int3 }}"
+ - "no ip ospf authentication-key 7 12090404011C03162E"
+ after:
+ - name: "{{ nxos_int1 }}"
+ address_family:
+ - afi: ipv4
+ processes:
+ - process_id: "100"
+ area:
+ area_id: 1.1.1.1
+ secondaries: False
+ multi_areas:
+ - 11.11.11.12
+ - name: "{{ nxos_int2 }}"
+ - name: "{{ nxos_int3 }}"
+deleted:
+ commands:
+ - "interface {{ nxos_int1 }}"
+ - "no ip router ospf 100 area 1.1.1.1 secondaries none"
+ - "no ip router ospf multi-area 11.11.11.11"
+ - "no ipv6 router ospfv3 200 area 2.2.2.2"
+ - "no ipv6 router ospfv3 200 multi-area 21.0.0.0"
+ - "no ipv6 router ospfv3 300 multi-area 50.50.50.50"
+ - "no ipv6 router ospfv3 multi-area 16.10.10.10"
+ - "interface {{ nxos_int2 }}"
+ - "no ip ospf authentication"
+ - "no ip ospf authentication key-chain test-1"
+ - "no ip ospf message-digest-key 10 md5 3 abc01d272be25d29"
+ - "no ip ospf cost 100"
+ - "no ospfv3 network broadcast"
+ - "no ospfv3 shutdown"
+ - "interface {{ nxos_int3 }}"
+ - "no ip ospf authentication-key 7 12090404011C03162E"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tests/common/sanity.yaml
new file mode 100644
index 00000000..61921d09
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospf_vrf/tests/common/sanity.yaml
@@ -0,0 +1,139 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_ospf_vrf sanity test"
+
+- set_fact: def_met_default="default"
+ when: imagetag is not search("I7")
+
+- name: 'Setup: disable features for initial cleanup'
+ loop:
+ - ospf
+ - bfd
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: disabled
+
+- name: Enable features
+ loop:
+ - ospf
+ - bfd
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: enabled
+
+- block:
+
+ - name: Configure ospf vrf
+ register: result
+ cisco.nxos.nxos_ospf_vrf: &id001
+ ospf: 1
+ router_id: 192.0.2.1
+ timer_throttle_spf_start: 50
+ timer_throttle_spf_hold: 1000
+ timer_throttle_spf_max: 2000
+ timer_throttle_lsa_start: 60
+ timer_throttle_lsa_hold: 1100
+ timer_throttle_lsa_max: 3000
+ vrf: test
+ bfd: enable
+ passive_interface: true
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_ospf_vrf: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure ospf vrf
+ register: result
+ cisco.nxos.nxos_ospf_vrf: &id003
+ ospf: 2
+ auto_cost: 5000
+ timer_throttle_spf_hold: 1100
+ timer_throttle_lsa_hold: 2220
+ timer_throttle_lsa_max: 2222
+ default_metric: 1000
+ log_adjacency: log
+ vrf: default
+ bfd: disable
+ passive_interface: true
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_ospf_vrf: *id003
+
+ - assert: *id004
+
+ - name: Configure ospf vrf
+ register: result
+ cisco.nxos.nxos_ospf_vrf: &id005
+ ospf: 2
+ auto_cost: default
+ default_metric: '{{def_met_default|default(omit)}}'
+ log_adjacency: default
+ timer_throttle_spf_hold: default
+ passive_interface: false
+ vrf: default
+ state: present
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_ospf_vrf: *id005
+
+ - assert: *id004
+
+ - name: Unconfigure ospf vrf
+ register: result
+ cisco.nxos.nxos_ospf_vrf: &id006
+ ospf: 2
+ vrf: default
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_ospf_vrf: *id006
+
+ - assert: *id004
+ when: def_met_default is defined
+
+ - name: Unconfigure ospf vrf
+ register: result
+ cisco.nxos.nxos_ospf_vrf: &id007
+ ospf: 1
+ vrf: test
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_ospf_vrf: *id007
+
+ - assert: *id004
+ when: def_met_default is defined
+ always:
+
+ - name: Disable features
+ loop:
+ - ospf
+ - bfd
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_ospf_vrf sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/meta/main.yml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/meta/main.yml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tasks/cli.yaml
new file mode 100644
index 00000000..073787b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tasks/main.yaml
new file mode 100644
index 00000000..58efe95c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tasks/main.yaml
@@ -0,0 +1,24 @@
+---
+- name: Enable OSPF feature
+ cisco.nxos.nxos_feature:
+ feature: ospf
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli.yaml
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
+
+ always:
+ - name: Disable OSPF feature
+ cisco.nxos.nxos_feature:
+ feature: ospf
+ state: disabled
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tasks/nxapi.yaml
new file mode 100644
index 00000000..e6144de9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..8550fe93
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/_populate_config.yaml
@@ -0,0 +1,26 @@
+- name: Setup
+ cisco.nxos.nxos_config:
+ lines:
+ - "router ospf 102"
+ - " router-id 198.51.100.1"
+ - " redistribute eigrp 120 route-map rmap_1"
+ - " redistribute direct route-map ospf102-direct-connect"
+ - " area 0.0.0.100 filter-list route-map rmap_1 in"
+ - " area 0.0.0.100 filter-list route-map rmap_2 out"
+ - " area 0.0.0.100 range 192.0.2.0/24 not-advertise"
+ - " area 0.0.0.100 range 203.0.113.0/24 cost 120"
+ - " area 0.0.0.101 authentication message-digest"
+ - " vrf zone1"
+ - " router-id 198.51.100.129"
+ - " summary-address 203.0.113.64/26 tag 121"
+ - " summary-address 192.0.2.128/25"
+ - " redistribute static route-map zone1-static-connect"
+ - " area 0.0.0.102 nssa no-summary default-information-originate"
+ - " area 0.0.0.103 nssa no-summary"
+ - " area 0.0.0.103 nssa translate type7 always"
+ - " vrf zone2"
+ - " auto-cost reference-bandwidth 45 Gbps"
+ - "router ospf 100"
+ - " router-id 203.0.113.20"
+ vars:
+ ansible_connection: ansible.netcommon.network_cli \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..e214e052
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/_remove_config.yaml
@@ -0,0 +1,9 @@
+- name: Remove pre-existing OSPF processes
+ cisco.nxos.nxos_config:
+ lines:
+ - no router ospf 100
+ - no router ospf 102
+ - no router ospf 104
+ ignore_errors: True
+ vars:
+ ansible_connection: ansible.netcommon.network_cli \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/deleted.yaml
new file mode 100644
index 00000000..de7aaee7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/deleted.yaml
@@ -0,0 +1,93 @@
+---
+- debug:
+ msg: Start nxos_ospfv2 deleted integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Delete a single OSPF process
+ cisco.nxos.nxos_ospfv2: &id005
+ config:
+ processes:
+ - process_id: 102
+ state: deleted
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - '"no router ospf 102" in result.commands'
+ - result.commands|length == 1
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after']['processes'] | symmetric_difference(result['after']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Delete a single OSPF process (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_ospfv2: *id005
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete all OSPF processes from the device
+ cisco.nxos.nxos_ospfv2: &id007
+ state: deleted
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - '"no router ospf 100" in result.commands'
+ - '"no router ospf 102" in result.commands'
+ - result.commands|length == 2
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ result['after'] == {} }}"
+
+ - name: Delete all OSPF processes from the device (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_ospfv2: *id007
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ result['before'] == {} }}"
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/fixtures/parsed.cfg
new file mode 100644
index 00000000..5d04c80f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/fixtures/parsed.cfg
@@ -0,0 +1,21 @@
+router ospf 100
+ router-id 203.0.113.20
+router ospf 102
+ router-id 198.51.100.1
+ redistribute direct route-map ospf102-direct-connect
+ redistribute eigrp 120 route-map rmap_1
+ area 0.0.0.100 filter-list route-map rmap_2 out
+ area 0.0.0.100 filter-list route-map rmap_1 in
+ area 0.0.0.100 range 192.0.2.0/24 not-advertise
+ area 0.0.0.100 range 203.0.113.0/24 cost 120
+ area 0.0.0.101 authentication message-digest
+ vrf zone1
+ router-id 198.51.100.129
+ area 0.0.0.102 nssa no-summary default-information-originate
+ area 0.0.0.103 nssa no-summary
+ area 0.0.0.103 nssa translate type7 always
+ redistribute static route-map zone1-static-connect
+ summary-address 192.0.2.128/25
+ summary-address 203.0.113.64/26 tag 121
+ vrf zone2
+ auto-cost reference-bandwidth 45 Gbps \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/gathered.yaml
new file mode 100644
index 00000000..d9b2ab19
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/gathered.yaml
@@ -0,0 +1,21 @@
+---
+- debug:
+ msg: START nxos_ospfv2 gathered integration tests on connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Gather OSPFv2 facts using gathered
+ register: result
+ cisco.nxos.nxos_ospfv2:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: "{{ merged['after']['processes'] | symmetric_difference(result['gathered']['processes']) |length\
+ \ == 0 }}"
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/merged.yaml
new file mode 100644
index 00000000..32904387
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/merged.yaml
@@ -0,0 +1,92 @@
+---
+- debug:
+ msg: Start nxos_ospfv2 merged integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ - name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_ospfv2: &id001
+ config:
+ processes:
+ - process_id: 100
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_1
+ direction: in
+ - route_map: rmap_2
+ direction: out
+ ranges:
+ - prefix: 192.0.2.0/24
+ not_advertise: True
+ - prefix: 203.0.113.0/24
+ cost: 120
+ - area_id: 0.0.0.101
+ authentication:
+ message_digest: True
+ redistribute:
+ - protocol: eigrp
+ id: 120
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ redistribute:
+ - protocol: static
+ route_map: zone1-static-connect
+ summary_address:
+ - prefix: 203.0.113.64/26
+ tag: 121
+ - prefix: 192.0.2.128/25
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: True
+ no_summary: True
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: True
+ translate:
+ type7:
+ always: True
+ - vrf: zone2
+ auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ state: merged
+ register: result
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ result['before'] == {} }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['after']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ cisco.nxos.nxos_ospfv2: *id001
+ register: result
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+ always:
+ - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/overridden.yaml
new file mode 100644
index 00000000..00735549
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/overridden.yaml
@@ -0,0 +1,57 @@
+---
+- debug:
+ msg: Start nxos_ospfv2 overridden integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Overridde all OSPF configuration with provided configuration
+ cisco.nxos.nxos_ospfv2: &id003
+ config:
+ processes:
+ - process_id: 104
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ shutdown: True
+ state: overridden
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after']['processes'] | symmetric_difference(result['after']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Overridde all OSPF configuration with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_ospfv2: *id003
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+ always:
+ - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/parsed.yaml
new file mode 100644
index 00000000..a471a4f0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/parsed.yaml
@@ -0,0 +1,14 @@
+---
+- debug:
+ msg: START nxos_ospfv2 parsed integration tests on connection={{ ansible_connection }}
+
+- name: Parse externally provided OSPFv2 config
+ register: result
+ cisco.nxos.nxos_ospfv2:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['parsed']['processes']) |length == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/rendered.yaml
new file mode 100644
index 00000000..32e15333
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/rendered.yaml
@@ -0,0 +1,66 @@
+---
+- debug:
+ msg: START nxos_ospfv2 rendered integration tests on connection={{ ansible_connection }}
+
+- name: Render platform specific configuration lines with state rendered (without connecting to the device)
+ cisco.nxos.nxos_ospfv2:
+ config:
+ processes:
+ - process_id: 100
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_1
+ direction: in
+ - route_map: rmap_2
+ direction: out
+ ranges:
+ - prefix: 192.0.2.0/24
+ not_advertise: True
+ - prefix: 203.0.113.0/24
+ cost: 120
+ - area_id: 0.0.0.101
+ authentication:
+ message_digest: True
+ redistribute:
+ - protocol: eigrp
+ id: 120
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ redistribute:
+ - protocol: static
+ route_map: zone1-static-connect
+ summary_address:
+ - prefix: 203.0.113.64/26
+ tag: 121
+ - prefix: 192.0.2.128/25
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: True
+ no_summary: True
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: True
+ translate:
+ type7:
+ always: True
+ - vrf: zone2
+ auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ state: rendered
+ register: result
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['rendered']) |length\
+ \ == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/replaced.yaml
new file mode 100644
index 00000000..6aecb7fb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/tests/common/replaced.yaml
@@ -0,0 +1,83 @@
+---
+- debug:
+ msg: Start nxos_ospfv2 replaced integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Replace device configurations of listed OSPF processes with provided configurations
+ cisco.nxos.nxos_ospfv2: &id002
+ config:
+ processes:
+ - process_id: 102
+ router_id: 198.51.100.1
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_8
+ direction: in
+ ranges:
+ - not_advertise: true
+ prefix: 192.0.2.0/24
+ - area_id: 0.0.0.101
+ stub:
+ no_summary: True
+ redistribute:
+ - protocol: eigrp
+ id: 130
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ redistribute:
+ - protocol: bgp
+ id: 65563
+ route_map: zone1-bgp-connect
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: True
+ no_summary: True
+ state: replaced
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after']['processes'] | symmetric_difference(result['after']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Replace device configurations of listed OSPF processes with provided configurarions
+ (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_ospfv2: *id002
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+ always:
+ - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/vars/main.yml
new file mode 100644
index 00000000..6e537407
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv2/vars/main.yml
@@ -0,0 +1,158 @@
+---
+merged:
+ commands:
+ - router ospf 102
+ - router-id 198.51.100.1
+ - redistribute eigrp 120 route-map rmap_1
+ - redistribute direct route-map ospf102-direct-connect
+ - area 0.0.0.100 filter-list route-map rmap_1 in
+ - area 0.0.0.100 filter-list route-map rmap_2 out
+ - area 0.0.0.100 range 192.0.2.0/24 not-advertise
+ - area 0.0.0.100 range 203.0.113.0/24 cost 120
+ - area 0.0.0.101 authentication message-digest
+ - vrf zone1
+ - router-id 198.51.100.129
+ - summary-address 203.0.113.64/26 tag 121
+ - summary-address 192.0.2.128/25
+ - redistribute static route-map zone1-static-connect
+ - area 0.0.0.102 nssa no-summary default-information-originate
+ - area 0.0.0.103 nssa no-summary
+ - area 0.0.0.103 nssa translate type7 always
+ - vrf zone2
+ - auto-cost reference-bandwidth 45 Gbps
+ - router ospf 100
+ - router-id 203.0.113.20
+ after:
+ processes:
+ - process_id: '100'
+ router_id: 203.0.113.20
+ - areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - direction: out
+ route_map: rmap_2
+ - direction: in
+ route_map: rmap_1
+ ranges:
+ - not_advertise: true
+ prefix: 192.0.2.0/24
+ - cost: 120
+ prefix: 203.0.113.0/24
+ - area_id: 0.0.0.101
+ authentication:
+ message_digest: true
+ process_id: '102'
+ redistribute:
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ - id: '120'
+ protocol: eigrp
+ route_map: rmap_1
+ router_id: 198.51.100.1
+ vrfs:
+ - areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: True
+ translate:
+ type7:
+ always: true
+ redistribute:
+ - protocol: static
+ route_map: zone1-static-connect
+ router_id: 198.51.100.129
+ summary_address:
+ - prefix: 192.0.2.128/25
+ - prefix: 203.0.113.64/26
+ tag: 121
+ vrf: zone1
+ - auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ vrf: zone2
+
+replaced:
+ commands:
+ - router ospf 102
+ - redistribute eigrp 130 route-map rmap_1
+ - no redistribute eigrp 120 route-map rmap_1
+ - area 0.0.0.100 filter-list route-map rmap_8 in
+ - no area 0.0.0.100 filter-list route-map rmap_2 out
+ - no area 0.0.0.100 range 203.0.113.0/24
+ - no area 0.0.0.101 authentication
+ - area 0.0.0.101 stub no-summary
+ - vrf zone1
+ - no summary-address 203.0.113.64/26 tag 121
+ - no summary-address 192.0.2.128/25
+ - redistribute bgp 65563 route-map zone1-bgp-connect
+ - no redistribute static route-map zone1-static-connect
+ - no area 0.0.0.103 nssa
+ - no area 0.0.0.103 nssa translate type7 always
+ - no vrf zone2
+ after:
+ processes:
+ - process_id: '100'
+ router_id: 203.0.113.20
+ - areas:
+ - area_id: 0.0.0.101
+ stub:
+ no_summary: true
+ - area_id: 0.0.0.100
+ filter_list:
+ - direction: in
+ route_map: rmap_8
+ ranges:
+ - not_advertise: true
+ prefix: 192.0.2.0/24
+ process_id: '102'
+ redistribute:
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ - id: '130'
+ protocol: eigrp
+ route_map: rmap_1
+ router_id: 198.51.100.1
+ vrfs:
+ - areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ redistribute:
+ - id: '65563'
+ protocol: bgp
+ route_map: zone1-bgp-connect
+ router_id: 198.51.100.129
+ vrf: zone1
+overridden:
+ commands:
+ - no router ospf 100
+ - router ospf 104
+ - router-id 203.0.113.20
+ - router ospf 102
+ - shutdown
+ - no redistribute direct route-map ospf102-direct-connect
+ - no redistribute eigrp 120 route-map rmap_1
+ - no area 0.0.0.100 filter-list route-map rmap_2 out
+ - no area 0.0.0.100 filter-list route-map rmap_1 in
+ - no area 0.0.0.100 range 192.0.2.0/24
+ - no area 0.0.0.100 range 203.0.113.0/24
+ - no area 0.0.0.101 authentication
+ - no vrf zone1
+ - no vrf zone2
+ after:
+ processes:
+ - process_id: '104'
+ router_id: 203.0.113.20
+ - process_id: '102'
+ router_id: 198.51.100.1
+ shutdown: True
+deleted:
+ after:
+ processes:
+ - process_id: '100'
+ router_id: 203.0.113.20
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/meta/main.yml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/meta/main.yml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tasks/cli.yaml
new file mode 100644
index 00000000..073787b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tasks/main.yaml
new file mode 100644
index 00000000..0193e5a7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tasks/main.yaml
@@ -0,0 +1,24 @@
+---
+- name: Enable OSPFv3 feature
+ cisco.nxos.nxos_feature:
+ feature: ospfv3
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
+
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli.yaml
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
+
+ always:
+ - name: Disable OSPFv3 feature
+ cisco.nxos.nxos_feature:
+ feature: ospfv3
+ state: disabled
+ vars:
+ ansible_connection: ansible.netcommon.network_cli
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tasks/nxapi.yaml
new file mode 100644
index 00000000..e6144de9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..d4d838a8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/_populate_config.yaml
@@ -0,0 +1,23 @@
+- name: Setup
+ cisco.nxos.nxos_config:
+ lines:
+ - "router ospf 102"
+ - " router-id 198.51.100.1"
+ - " address-family ipv6 unicast"
+ - " redistribute eigrp 120 route-map rmap_1"
+ - " redistribute direct route-map ospf102-direct-connect"
+ - " area 0.0.0.100 filter-list route-map rmap_1 in"
+ - " area 0.0.0.100 filter-list route-map rmap_2 out"
+ - " area 0.0.0.100 range 2001:db2::/32 not-advertise"
+ - " area 0.0.0.100 range 2001:db3::/32 cost 120"
+ - " vrf zone1"
+ - " router-id 198.51.100.129"
+ - " area 0.0.0.102 nssa no-summary default-information-originate"
+ - " area 0.0.0.103 nssa no-summary"
+ - " area 0.0.0.103 nssa translate type7 always"
+ - " vrf zone2"
+ - " auto-cost reference-bandwidth 45 Gbps"
+ - "router ospf 100"
+ - " router-id 203.0.113.20"
+ vars:
+ ansible_connection: ansible.netcommon.network_cli \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..655c5248
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/_remove_config.yaml
@@ -0,0 +1,9 @@
+- name: Remove pre-existing OSPF processes
+ cisco.nxos.nxos_config:
+ lines:
+ - no router ospfv3 100
+ - no router ospfv3 102
+ - no router ospfv3 104
+ ignore_errors: True
+ vars:
+ ansible_connection: ansible.netcommon.network_cli \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/deleted.yaml
new file mode 100644
index 00000000..940ee366
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/deleted.yaml
@@ -0,0 +1,93 @@
+---
+- debug:
+ msg: Start nxos_ospfv3 deleted integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Delete a single OSPF process
+ cisco.nxos.nxos_ospfv3: &id005
+ config:
+ processes:
+ - process_id: 102
+ state: deleted
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - '"no router ospfv3 102" in result.commands'
+ - result.commands|length == 1
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after']['processes'] | symmetric_difference(result['after']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Delete a single OSPF process (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_ospfv3: *id005
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ deleted['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete all OSPFv3 processes from the device
+ cisco.nxos.nxos_ospfv3: &id007
+ state: deleted
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - '"no router ospfv3 100" in result.commands'
+ - '"no router ospfv3 102" in result.commands'
+ - result.commands|length == 2
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ result['after'] == {} }}"
+
+ - name: Delete all OSPF processes from the device (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_ospfv3: *id007
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ result['before'] == {} }}"
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/empty_config.yaml
new file mode 100644
index 00000000..0f451d14
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/empty_config.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START nxos_ospfv3 empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_ospfv3:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_ospfv3:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_ospfv3:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_ospfv3:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_ospfv3:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_ospfv3 empty_config integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/fixtures/parsed.cfg
new file mode 100644
index 00000000..16d2caab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/fixtures/parsed.cfg
@@ -0,0 +1,18 @@
+router ospfv3 100
+ router-id 203.0.113.20
+router ospfv3 102
+ router-id 198.51.100.1
+ address-family ipv6 unicast
+ redistribute direct route-map ospf102-direct-connect
+ redistribute eigrp 120 route-map rmap_1
+ area 0.0.0.100 filter-list route-map rmap_2 out
+ area 0.0.0.100 filter-list route-map rmap_1 in
+ area 0.0.0.100 range 2001:db2::/32 not-advertise
+ area 0.0.0.100 range 2001:db3::/32 cost 120
+ vrf zone1
+ router-id 198.51.100.129
+ area 0.0.0.102 nssa no-summary default-information-originate
+ area 0.0.0.103 nssa no-summary
+ area 0.0.0.103 nssa translate type7 always
+ vrf zone2
+ auto-cost reference-bandwidth 45 Gbps \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/gathered.yaml
new file mode 100644
index 00000000..7d2fd302
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/gathered.yaml
@@ -0,0 +1,21 @@
+---
+- debug:
+ msg: START nxos_ospfv3 gathered integration tests on connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Gather OSPFv3 facts using gathered
+ register: result
+ cisco.nxos.nxos_ospfv3:
+ state: gathered
+
+ - name: Assert that facts were correctly generated
+ assert:
+ that: "{{ merged['after']['processes'] | symmetric_difference(result['gathered']['processes']) |length\
+ \ == 0 }}"
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/merged.yaml
new file mode 100644
index 00000000..7dca04ce
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/merged.yaml
@@ -0,0 +1,85 @@
+---
+- debug:
+ msg: Start nxos_ospfv3 merged integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ - name: Merge the provided configuration with the exisiting running configuration
+ cisco.nxos.nxos_ospfv3: &id001
+ config:
+ processes:
+ - process_id: 100
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ address_family:
+ afi: ipv6
+ safi: unicast
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_1
+ direction: in
+ - route_map: rmap_2
+ direction: out
+ ranges:
+ - prefix: 2001:db2::/32
+ not_advertise: True
+ - prefix: 2001:db3::/32
+ cost: 120
+ redistribute:
+ - protocol: eigrp
+ id: 120
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: True
+ no_summary: True
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: True
+ translate:
+ type7:
+ always: True
+ - vrf: zone2
+ auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ state: merged
+ register: result
+
+ - name: Assert that before dicts were correctly generated
+ assert:
+ that: "{{ result['before'] == {} }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['commands']) |length\
+ \ == 0 }}"
+
+ - name: Assert that after dicts were correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['after']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Merge the provided configuration with the existing running configuration
+ (IDEMPOTENT)
+ cisco.nxos.nxos_ospfv3: *id001
+ register: result
+
+ - name: Assert that the previous task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+ always:
+ - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/overridden.yaml
new file mode 100644
index 00000000..c6780225
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/overridden.yaml
@@ -0,0 +1,57 @@
+---
+- debug:
+ msg: Start nxos_ospfv3 overridden integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Overridde all OSPFv3 configuration with provided configuration
+ cisco.nxos.nxos_ospfv3: &id003
+ config:
+ processes:
+ - process_id: 104
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ shutdown: True
+ state: overridden
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ overridden['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after']['processes'] | symmetric_difference(result['after']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Overridde all OSPF configuration with provided configuration
+ (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_ospfv3: *id003
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ overridden['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+ always:
+ - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/parsed.yaml
new file mode 100644
index 00000000..6f4918b4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/parsed.yaml
@@ -0,0 +1,14 @@
+---
+- debug:
+ msg: START nxos_ospfv3 parsed integration tests on connection={{ ansible_connection }}
+
+- name: Parse externally provided OSPFv3 config
+ register: result
+ cisco.nxos.nxos_ospfv3:
+ running_config: "{{ lookup('file', './fixtures/parsed.cfg') }}"
+ state: parsed
+
+- name: Assert that config was correctly parsed
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['parsed']['processes']) |length == 0 }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/rendered.yaml
new file mode 100644
index 00000000..576a823e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/rendered.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: START nxos_ospfv3 rendered integration tests on connection={{ ansible_connection }}
+
+- name: Render platform specific configuration lines with state rendered (without connecting to the device)
+ cisco.nxos.nxos_ospfv3:
+ config:
+ processes:
+ - process_id: 100
+ router_id: 203.0.113.20
+ - process_id: 102
+ router_id: 198.51.100.1
+ address_family:
+ afi: ipv6
+ safi: unicast
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_1
+ direction: in
+ - route_map: rmap_2
+ direction: out
+ ranges:
+ - prefix: 2001:db2::/32
+ not_advertise: True
+ - prefix: 2001:db3::/32
+ cost: 120
+ redistribute:
+ - protocol: eigrp
+ id: 120
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: True
+ no_summary: True
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: True
+ translate:
+ type7:
+ always: True
+ - vrf: zone2
+ auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ state: rendered
+ register: result
+
+- name: Assert that correct set of commands were rendered
+ assert:
+ that:
+ - "{{ merged['commands'] | symmetric_difference(result['rendered']) |length\
+ \ == 0 }}"
+ - result.changed == False
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/replaced.yaml
new file mode 100644
index 00000000..772bbc7b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/tests/common/replaced.yaml
@@ -0,0 +1,79 @@
+---
+- debug:
+ msg: Start nxos_ospfv3 replaced integration tests connection={{ ansible_connection}}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Replace device configurations of listed OSPFv3 processes with provided configurations
+ cisco.nxos.nxos_ospfv3: &id002
+ config:
+ processes:
+ - process_id: 102
+ router_id: 198.51.100.1
+ address_family:
+ afi: ipv6
+ safi: unicast
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - route_map: rmap_8
+ direction: in
+ ranges:
+ - not_advertise: true
+ prefix: 2001:db2::/32
+ redistribute:
+ - protocol: eigrp
+ id: 130
+ route_map: rmap_1
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ vrfs:
+ - vrf: zone1
+ router_id: 198.51.100.129
+ areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: True
+ no_summary: True
+ state: replaced
+ register: result
+
+ - name: Assert that before dicts are correctly generated
+ assert:
+ that:
+ - "{{ merged['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Assert that correct set of commands were generated
+ assert:
+ that:
+ - "{{ replaced['commands'] | symmetric_difference(result['commands'])\
+ \ |length == 0 }}"
+
+ - name: Assert that after dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after']['processes'] | symmetric_difference(result['after']['processes']) |length\
+ \ == 0 }}"
+
+ - name: Replace device configurations of listed OSPF processes with provided configurarions
+ (IDEMPOTENT)
+ register: result
+ cisco.nxos.nxos_ospfv3: *id002
+
+ - name: Assert that task was idempotent
+ assert:
+ that:
+ - result['changed'] == false
+ - result.commands|length == 0
+
+ - name: Assert that before dict is correctly generated
+ assert:
+ that:
+ - "{{ replaced['after']['processes'] | symmetric_difference(result['before']['processes']) |length\
+ \ == 0 }}"
+ always:
+ - include_tasks: _remove_config.yaml \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/vars/main.yml
new file mode 100644
index 00000000..d161a584
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_ospfv3/vars/main.yml
@@ -0,0 +1,142 @@
+---
+merged:
+ commands:
+ - router ospfv3 102
+ - router-id 198.51.100.1
+ - address-family ipv6 unicast
+ - redistribute eigrp 120 route-map rmap_1
+ - redistribute direct route-map ospf102-direct-connect
+ - area 0.0.0.100 filter-list route-map rmap_1 in
+ - area 0.0.0.100 filter-list route-map rmap_2 out
+ - area 0.0.0.100 range 2001:db2::/32 not-advertise
+ - area 0.0.0.100 range 2001:db3::/32 cost 120
+ - vrf zone1
+ - router-id 198.51.100.129
+ - area 0.0.0.102 nssa no-summary default-information-originate
+ - area 0.0.0.103 nssa no-summary
+ - area 0.0.0.103 nssa translate type7 always
+ - vrf zone2
+ - auto-cost reference-bandwidth 45 Gbps
+ - router ospfv3 100
+ - router-id 203.0.113.20
+ after:
+ processes:
+ - process_id: '100'
+ router_id: 203.0.113.20
+ - address_family:
+ afi: ipv6
+ safi: unicast
+ redistribute:
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ - id: '120'
+ protocol: eigrp
+ route_map: rmap_1
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - direction: out
+ route_map: rmap_2
+ - direction: in
+ route_map: rmap_1
+ ranges:
+ - not_advertise: true
+ prefix: 2001:db2::/32
+ - cost: 120
+ prefix: 2001:db3::/32
+ process_id: '102'
+ router_id: 198.51.100.1
+ vrfs:
+ - areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ - area_id: 0.0.0.103
+ nssa:
+ no_summary: True
+ translate:
+ type7:
+ always: true
+ router_id: 198.51.100.129
+ vrf: zone1
+ - auto_cost:
+ reference_bandwidth: 45
+ unit: Gbps
+ vrf: zone2
+
+replaced:
+ commands:
+ - router ospfv3 102
+ - address-family ipv6 unicast
+ - redistribute eigrp 130 route-map rmap_1
+ - no redistribute eigrp 120 route-map rmap_1
+ - area 0.0.0.100 filter-list route-map rmap_8 in
+ - no area 0.0.0.100 filter-list route-map rmap_2 out
+ - no area 0.0.0.100 range 2001:db3::/32
+ - vrf zone1
+ - no area 0.0.0.103 nssa
+ - no area 0.0.0.103 nssa translate type7 always
+ - no vrf zone2
+ after:
+ processes:
+ - process_id: '100'
+ router_id: 203.0.113.20
+ - address_family:
+ afi: ipv6
+ areas:
+ - area_id: 0.0.0.100
+ filter_list:
+ - direction: in
+ route_map: rmap_8
+ ranges:
+ - not_advertise: true
+ prefix: 2001:db2::/32
+ redistribute:
+ - protocol: direct
+ route_map: ospf102-direct-connect
+ - id: "130"
+ protocol: eigrp
+ route_map: rmap_1
+ safi: unicast
+ process_id: '102'
+ router_id: 198.51.100.1
+ vrfs:
+ - areas:
+ - area_id: 0.0.0.102
+ nssa:
+ default_information_originate: true
+ no_summary: true
+ router_id: 198.51.100.129
+ vrf: zone1
+overridden:
+ commands:
+ - no router ospfv3 100
+ - router ospfv3 104
+ - router-id 203.0.113.20
+ - router ospfv3 102
+ - shutdown
+ - address-family ipv6 unicast
+ - no redistribute direct route-map ospf102-direct-connect
+ - no redistribute eigrp 120 route-map rmap_1
+ - no area 0.0.0.100 filter-list route-map rmap_2 out
+ - no area 0.0.0.100 filter-list route-map rmap_1 in
+ - no area 0.0.0.100 range 2001:db2::/32
+ - no area 0.0.0.100 range 2001:db3::/32
+ - no vrf zone1
+ - no vrf zone2
+ after:
+ processes:
+ - process_id: '104'
+ router_id: 203.0.113.20
+ - process_id: '102'
+ router_id: 198.51.100.1
+ shutdown: True
+ address_family:
+ afi: ipv6
+ safi: unicast
+deleted:
+ after:
+ processes:
+ - process_id: '100'
+ router_id: 203.0.113.20
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/platform/n7k/cleanup.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/platform/n7k/cleanup.yaml
new file mode 100644
index 00000000..0fba16a7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/platform/n7k/cleanup.yaml
@@ -0,0 +1,24 @@
+---
+- name: Unconfigure VDC setting limit-resource module-type f3
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - terminal dont-ask ; vdc {{ vdcid }} ; no limit-resource module-type f3
+ match: none
+
+- name: Previous command is asynchronous and can take a while. Allow time for it
+ to complete
+ pause:
+ seconds: 45
+
+- name: Configure VDC setting allocate interface unallocated-interfaces
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - terminal dont-ask ; vdc {{ vdcid }} ; allocate interface unallocated-interfaces
+ match: none
+
+- name: Previous command is asynchronous can take a while. Allow time for it to
+ complete
+ pause:
+ seconds: 45
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/platform/n7k/setup.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/platform/n7k/setup.yaml
new file mode 100644
index 00000000..dec5a9b7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tasks/platform/n7k/setup.yaml
@@ -0,0 +1,39 @@
+---
+- name: Get default vdc id
+ register: vdcout
+ cisco.nxos.nxos_command:
+ commands:
+ - show vdc current-vdc | json
+
+- set_fact: vdcid="{{ vdcout.stdout_lines[0].name }}"
+
+- name: Configure VDC setting limit-resource module-type f3
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - terminal dont-ask ; vdc {{ vdcid }} ; limit-resource module-type f3
+ match: none
+
+- name: Previous command is asynchronous and can take a while. Allow time for it
+ to complete
+ pause:
+ seconds: 45
+
+- name: Configure VDC setting allocate interface unallocated-interfaces
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - terminal dont-ask ; vdc {{ vdcid }} ; allocate interface unallocated-interfaces
+ match: none
+
+- name: Previous command is asynchronous and can take a while. Allow time for it
+ to complete
+ pause:
+ seconds: 45
+
+- name: Configure Additional N7K requiste features
+ cisco.nxos.nxos_config:
+ commands:
+ - feature-set fabric
+ - feature fabric forwarding
+ match: none
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tests/common/sanity.yaml
new file mode 100644
index 00000000..01b63160
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_overlay_global/tests/common/sanity.yaml
@@ -0,0 +1,97 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_overlay_global sanity
+ test"
+
+- set_fact: overlay_global_supported="false"
+
+- set_fact: overlay_global_supported="true"
+ when: platform is search("N35NG|N7K|^N9K$") or ( platform is match("N9k-F") and
+ imagetag is version('F3', 'ne'))
+
+- debug: msg="Platform {{ platform }} running Image version {{ image_version }}
+ supports nxos_overlay_global"
+ when: overlay_global_supported
+
+- block:
+
+ - name: Enable nv overlay evpn
+ cisco.nxos.nxos_evpn_global:
+ nv_overlay_evpn: true
+
+ - name: Apply N7K specific setup config
+ include: tasks/platform/n7k/setup.yaml
+ when: platform is match('N7K')
+
+ - name: Configure Additional N7K requiste features
+ when: platform is match('N7K')
+ cisco.nxos.nxos_config:
+ commands:
+ - feature-set fabric
+ - feature fabric forwarding
+ match: none
+
+ - name: Remove possibly existing mac
+ ignore_errors: true
+ cisco.nxos.nxos_overlay_global:
+ anycast_gateway_mac: default
+ when: overlay_global_supported
+
+- block:
+
+ - name: Configure overlay global
+ register: result
+ cisco.nxos.nxos_overlay_global: &id001
+ anycast_gateway_mac: b.b.b
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_overlay_global: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Update anycast gateway mac
+ register: result
+ cisco.nxos.nxos_overlay_global: &id003
+ anycast_gateway_mac: a.a.a
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_overlay_global: *id003
+
+ - assert: *id004
+
+ - name: Remove anycast gateway mac
+ register: result
+ cisco.nxos.nxos_overlay_global: &id005
+ anycast_gateway_mac: default
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_overlay_global: *id005
+
+ - assert: *id004
+ when: overlay_global_supported
+ always:
+
+ - name: Apply N7K specific cleanup config
+ include: tasks/platform/n7k/cleanup.yaml
+ when: platform is match('N7K')
+
+ - name: Disable nv overlay evpn
+ ignore_errors: true
+ when: overlay_global_supported
+ cisco.nxos.nxos_evpn_global:
+ nv_overlay_evpn: false
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_overlay_global sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tests/common/sanity.yaml
new file mode 100644
index 00000000..4e24a2ba
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim/tests/common/sanity.yaml
@@ -0,0 +1,85 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_pim sanity test"
+
+- name: 'Setup: Disable features'
+ ignore_errors: true
+ loop:
+ - pim
+ - bfd
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: disabled
+
+- name: 'Setup: Enable features'
+ loop:
+ - pim
+ - bfd
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: enabled
+
+- name: 'Setup: Configure ssm_range none'
+ cisco.nxos.nxos_pim: &id005
+ ssm_range: none
+
+- block:
+
+ - name: Initial config from none
+ register: result
+ cisco.nxos.nxos_pim: &id001
+ bfd: enable
+ ssm_range:
+ - 239.128.1.0/24
+ - 224.0.0.0/8
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Initial config idempotence
+ register: result
+ cisco.nxos.nxos_pim: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure ssm_range default
+ register: result
+ cisco.nxos.nxos_pim: &id003
+ bfd: disable
+ ssm_range: default
+
+ - assert: *id002
+
+ - name: ssm_range default idempotence
+ register: result
+ cisco.nxos.nxos_pim: *id003
+
+ - assert: *id004
+
+ - name: Configure ssm_range none
+ register: result
+ cisco.nxos.nxos_pim: *id005
+
+ - assert: *id002
+
+ - meta: end_play
+
+ - name: ssm_range none idempotence
+ register: result
+ cisco.nxos.nxos_pim: *id005
+
+ - assert: *id004
+ always:
+
+ - name: 'Teardown: Disable features'
+ ignore_errors: true
+ loop:
+ - pim
+ - bfd
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_pim sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tests/common/sanity.yaml
new file mode 100644
index 00000000..9283842c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_interface/tests/common/sanity.yaml
@@ -0,0 +1,197 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_pim_interface sanity
+ test"
+
+- name: 'Setup: Disable features'
+ loop:
+ - pim
+ - bfd
+ ignore_errors: true
+ cisco.nxos.nxos_feature: &id011
+ feature: '{{ item }}'
+ state: disabled
+
+- name: 'Setup: Enable features'
+ loop:
+ - pim
+ - bfd
+ cisco.nxos.nxos_feature:
+ feature: '{{ item }}'
+ state: enabled
+
+- set_fact: testint="{{ nxos_int1 }}"
+
+- name: 'Setup: Put interface {{ testint }} into a default state'
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - default interface {{ testint }}
+
+- name: Ensure {{testint}} is layer3
+ cisco.nxos.nxos_interface:
+ interface: '{{ testint }}'
+ mode: layer3
+ description: Configured by Ansible - Layer3
+ admin_state: up
+ state: present
+
+- block:
+
+ - name: Configure nxos_pim_interface state absent
+ cisco.nxos.nxos_pim_interface: &id010
+ interface: '{{ testint }}'
+ state: absent
+
+ - name: configure jp policy and type
+ register: result
+ cisco.nxos.nxos_pim_interface: &id001
+ interface: '{{ testint }}'
+ jp_policy_in: JPIN
+ jp_policy_out: JPOUT
+ jp_type_in: routemap
+ jp_type_out: routemap
+ sparse: true
+ border: true
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check idempotence
+ register: result
+ cisco.nxos.nxos_pim_interface: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: configure neighbor policy and rm
+ register: result
+ cisco.nxos.nxos_pim_interface: &id003
+ interface: '{{ testint }}'
+ neighbor_policy: NPR
+ neighbor_type: routemap
+
+ - assert: *id002
+
+ - name: Check idempotence
+ register: result
+ cisco.nxos.nxos_pim_interface: *id003
+
+ - assert: *id004
+
+ - pause:
+ seconds: 5
+
+ - name: configure neighbor policy and prefix
+ register: result
+ cisco.nxos.nxos_pim_interface: &id005
+ interface: '{{ testint }}'
+ neighbor_policy: NPPF
+ neighbor_type: prefix
+
+ - assert: *id002
+
+ - name: Check idempotence
+ register: result
+ cisco.nxos.nxos_pim_interface: *id005
+
+ - assert: *id004
+
+ - name: configure hello_auth_key
+ register: result
+ cisco.nxos.nxos_pim_interface:
+ interface: '{{ testint }}'
+ hello_auth_key: password1
+
+ - assert: *id002
+
+ - name: configure pim other params
+ register: result
+ cisco.nxos.nxos_pim_interface: &id006
+ interface: '{{ testint }}'
+ dr_prio: 10
+ hello_interval: 40
+ sparse: true
+ border: true
+ bfd: enable
+ state: present
+
+ - assert: *id002
+
+ - name: Check idempotence
+ register: result
+ cisco.nxos.nxos_pim_interface: *id006
+
+ - assert: *id004
+
+ - name: configure negative
+ register: result
+ cisco.nxos.nxos_pim_interface: &id007
+ interface: '{{ testint }}'
+ sparse: false
+ border: false
+ bfd: disable
+ state: present
+
+ - assert: *id002
+
+ - name: Check idempotence
+ register: result
+ cisco.nxos.nxos_pim_interface: *id007
+
+ - assert: *id004
+
+ - pause:
+ seconds: 5
+
+ - name: configure state default
+ register: result
+ cisco.nxos.nxos_pim_interface: &id008
+ interface: '{{ testint }}'
+ state: default
+
+ - assert: *id002
+
+ - name: Check idempotence
+ register: result
+ cisco.nxos.nxos_pim_interface: *id008
+
+ - assert: *id004
+
+ - name: configure border
+ register: result
+ cisco.nxos.nxos_pim_interface: &id009
+ interface: '{{ testint }}'
+ border: true
+ state: present
+
+ - assert: *id002
+
+ - name: Check idempotence
+ register: result
+ cisco.nxos.nxos_pim_interface: *id009
+
+ - assert: *id004
+
+ - name: configure state absent
+ register: result
+ cisco.nxos.nxos_pim_interface: *id010
+
+ - assert: *id002
+
+ - name: Check idempotence
+ register: result
+ cisco.nxos.nxos_pim_interface: *id010
+
+ - assert: *id004
+ always:
+
+ - name: Disable feature PIM
+ loop:
+ - pim
+ - bfd
+ cisco.nxos.nxos_feature: *id011
+
+- debug: msg="END connection={{ ansible_connection }} nxos_pim_interface sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tests/common/configure.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tests/common/configure.yaml
new file mode 100644
index 00000000..d8afa496
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_pim_rp_address/tests/common/configure.yaml
@@ -0,0 +1,220 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_pim_rp_address sanity"
+
+- block:
+
+ - set_fact: bidir_true="true"
+
+ - set_fact: bidir_false="false"
+ when: platform is not search('N3L')
+
+- block:
+
+ - set_fact: pim_prefix_list="pim_prefix_list"
+
+ - set_fact: pim_route_map="pim_route_map"
+ when: platform is not search('N3L|N7K')
+
+- block:
+
+ - name: Disable feature PIM
+ cisco.nxos.nxos_feature: &id014
+ feature: pim
+ state: disabled
+
+ - name: Enable feature PIM
+ cisco.nxos.nxos_feature:
+ feature: pim
+ state: enabled
+
+ - name: 1.0 Configure rp_address + group_list
+ register: result
+ cisco.nxos.nxos_pim_rp_address: &id001
+ rp_address: 10.1.1.1
+ group_list: 224.0.0.0/8
+ bidir: '{{ bidir_true|default(omit) }}'
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: 1.0 Idempotence rp_address + group_list
+ register: result
+ cisco.nxos.nxos_pim_rp_address: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - block:
+
+ - name: 1.1 Configure rp_address + group_list (bidir_false)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: &id003
+ rp_address: 10.1.1.1
+ group_list: 224.0.0.0/8
+ bidir: false
+ state: present
+
+ - assert: *id002
+
+ - name: 1.1 Idempotence rp_address + group_list (bidir_false)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: *id003
+
+ - assert: *id004
+
+ - name: 1.2 Configure rp_address (bidir_true)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: &id005
+ rp_address: 10.1.1.1
+ bidir: true
+ state: present
+
+ - assert: *id002
+
+ - name: 1.2 Idempotence rp_address (bidir_true)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: *id005
+
+ - assert: *id004
+
+ - name: 1.3 Configure rp_address (bidir_false)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: &id006
+ rp_address: 10.1.1.1
+ bidir: false
+ state: present
+
+ - assert: *id002
+
+ - name: 1.3 Idempotence rp_address (bidir_false)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: *id006
+
+ - assert: *id004
+ when: bidir_true is defined
+
+ - name: 1.4 Remove rp_address + group_list
+ register: result
+ cisco.nxos.nxos_pim_rp_address: &id007
+ rp_address: 10.1.1.1
+ group_list: 224.0.0.0/8
+ state: absent
+
+ - assert: *id002
+
+ - name: 1.4 Idempotence remove rp_address + group_list
+ register: result
+ cisco.nxos.nxos_pim_rp_address: *id007
+
+ - assert: *id004
+
+ - name: 2.0 Configure rp_address + prefix_list (bidir_true)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: &id008
+ rp_address: 10.1.1.2
+ prefix_list: '{{ pim_prefix_list|default(omit) }}'
+ bidir: '{{ bidir_true|default(omit) }}'
+ state: present
+
+ - assert: *id002
+
+ - name: 2.0 Idempotence rp_address + prefix_list (bidir_true)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: *id008
+
+ - assert: *id004
+
+ - block:
+
+ - name: 2.1 Configure rp_address + prefix_list (bidir_false)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: &id009
+ rp_address: 10.1.1.2
+ prefix_list: '{{ pim_prefix_list|default(omit) }}'
+ bidir: '{{ bidir_false|default(omit) }}'
+ state: present
+
+ - assert: *id002
+
+ - name: 2.1 Idempotence rp_address + prefix_list (bidir_false)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: *id009
+
+ - assert: *id004
+ when: bidir_false is defined
+
+ - name: 2.2 Remove rp_address + prefix_list (bidir_false)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: &id010
+ rp_address: 10.1.1.2
+ prefix_list: '{{ pim_prefix_list|default(omit)}}'
+ bidir: '{{ bidir_false|default(omit)}}'
+ state: absent
+
+ - assert: *id002
+
+ - name: 2.2 Idempotence remove rp_address + prefix_list (bidir_false)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: *id010
+
+ - assert: *id004
+
+ - name: 3.0 Configure rp_address + route_map + (bidir_true)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: &id011
+ rp_address: 10.1.1.3
+ route_map: '{{ pim_route_map|default(omit)}}'
+ bidir: '{{ bidir_true|default(omit) }}'
+ state: present
+
+ - assert: *id002
+
+ - name: 3.0 Idempotence rp_address + route_map + (bidir_true)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: *id011
+
+ - assert: *id004
+
+ - block:
+
+ - name: 3.1 Configure rp_address + route_map (bidir_false)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: &id012
+ rp_address: 10.1.1.3
+ route_map: '{{ pim_route_map|default(omit)}}'
+ bidir: '{{ bidir_false|default(omit)}}'
+ state: present
+
+ - assert: *id002
+
+ - name: 3.1 Idempotence rp_address + route_map
+ register: result
+ cisco.nxos.nxos_pim_rp_address: *id012
+
+ - assert: *id004
+ when: bidir_false is defined
+
+ - name: 3.2 Remove rp_address + route_map (bidir_false)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: &id013
+ rp_address: 10.1.1.3
+ route_map: '{{ pim_route_map|default(omit)}}'
+ bidir: '{{ bidir_false|default(omit)}}'
+ state: absent
+
+ - assert: *id002
+
+ - name: 3.2 Idempotence remove rp_address + route_map (bidir_false)
+ register: result
+ cisco.nxos.nxos_pim_rp_address: *id013
+
+ - assert: *id004
+ always:
+
+ - name: Disable feature PIM
+ cisco.nxos.nxos_feature: *id014
+
+- debug: msg="END connection={{ ansible_connection }} nxos_pim_rp_address sanity"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tasks/main.yaml
new file mode 100644
index 00000000..9b16323e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tasks/main.yaml
@@ -0,0 +1,6 @@
+---
+- include: cli.yaml
+ tags: cli
+
+- include: nxapi.yaml
+ tags: nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tasks/nxapi.yaml
new file mode 100644
index 00000000..92fa58ea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tasks/nxapi.yaml
@@ -0,0 +1,29 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
+ tags: nxapi_httpapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tests/common/sanity.yaml
new file mode 100644
index 00000000..29ec19c5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_reboot/tests/common/sanity.yaml
@@ -0,0 +1,24 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_reboot sanity test"
+
+- debug: msg="***WARNING*** Remove meta end_play to verify this module ***WARNING***"
+
+- meta: end_play
+
+- block:
+
+ - name: Reboot Switch
+ ignore_errors: true
+ cisco.nxos.nxos_reboot:
+ confirm: true
+ always:
+
+ - name: Wait for device to come back up
+ wait_for:
+ port: 22
+ state: started
+ timeout: 600
+ delay: 60
+ host: '{{ inventory_hostname }}'
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_reboot sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tests/common/sanity.yaml
new file mode 100644
index 00000000..5fef9ab7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rollback/tests/common/sanity.yaml
@@ -0,0 +1,24 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_rollback sanity test"
+
+- name: delete existing checkpoint file
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id001
+ commands:
+ - terminal dont-ask
+ - delete backup.cfg
+ match: none
+
+- name: Create checkpoint file
+ cisco.nxos.nxos_rollback:
+ checkpoint_file: backup.cfg
+
+- name: rollback to the previously created checkpoint file
+ cisco.nxos.nxos_rollback:
+ rollback_to: backup.cfg
+
+- name: cleanup checkpoint file
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id001
+
+- debug: msg="END connection={{ ansible_connection }} nxos_rollback sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tests/common/sanity.yaml
new file mode 100644
index 00000000..991ca7d5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_rpm/tests/common/sanity.yaml
@@ -0,0 +1,155 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_rpm sanity test"
+
+- set_fact: smu_run="false"
+
+- set_fact: smu_run="true"
+ when: ((platform is search('N9K')) and (imagetag and (imagetag is version_compare('I2',
+ 'ge'))))
+
+- set_fact: sdk_run="false"
+
+- set_fact: sdk_run="true"
+ when: ((platform is search('N9K')) and (imagetag and (imagetag is version_compare('I6',
+ 'ge'))))
+
+- debug: msg="***WARNING*** Remove meta end_play to verify this module ***WARNING***"
+
+- meta: end_play
+
+- block:
+
+ - name: Install smu RPM
+ register: result
+ cisco.nxos.nxos_rpm: &id001
+ pkg: nxos.sample-n9k_ALL-1.0.0-7.0.3.I6.1.lib32_n9000.rpm
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_rpm: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Remove smu RPM
+ register: result
+ cisco.nxos.nxos_rpm: &id003
+ pkg: nxos.sample-n9k_ALL-1.0.0-7.0.3.I6.1.lib32_n9000.rpm
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_rpm: *id003
+
+ - assert: *id004
+ when: smu_run
+
+- block:
+
+ - name: Install nxsdk RPM(aggregate)
+ register: result
+ cisco.nxos.nxos_rpm: &id005
+ aggregate:
+
+ - pkg: healthMonitor-1.0-1.5.0.x86_64.rpm
+ file_system: bootflash
+
+ - pkg: customCliApp-1.0-1.0.0.x86_64.rpm
+
+ - assert: &id006
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_rpm: *id005
+
+ - assert: &id008
+ that:
+ - result.changed == false
+
+ - name: Remove nxsdk RPM(aggregate)
+ register: result
+ cisco.nxos.nxos_rpm: &id007
+ aggregate:
+
+ - pkg: healthMonitor-1.0-1.5.0.x86_64.rpm
+
+ - pkg: customCliApp-1.0-1.0.0.x86_64.rpm
+ state: absent
+
+ - assert: *id006
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_rpm: *id007
+
+ - assert: *id008
+ when: sdk_run
+
+- block:
+
+ - name: Install reload smu RPM
+ register: result
+ cisco.nxos.nxos_rpm: &id009
+ pkg: nxos.CSCve91311-n9k_ALL-1.0.0-7.0.3.I6.1.lib32_n9000.rpm
+
+ - assert: *id002
+
+ - name: Wait for device to come back up
+ wait_for:
+ port: 22
+ state: started
+ timeout: 600
+ delay: 60
+ host: '{{ inventory_hostname_short }}'
+
+ - name: Continue with install reload smu RPM
+ register: result
+ cisco.nxos.nxos_rpm: *id009
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_rpm: *id009
+
+ - assert: *id004
+
+ - name: Remove reload smu RPM
+ register: result
+ cisco.nxos.nxos_rpm: &id010
+ pkg: nxos.CSCve91311-n9k_ALL-1.0.0-7.0.3.I6.1.lib32_n9000.rpm
+ state: absent
+
+ - assert: *id002
+
+ - name: Wait for device to come back up
+ wait_for:
+ port: 22
+ state: started
+ timeout: 600
+ delay: 60
+ host: '{{ inventory_hostname_short }}'
+
+ - name: Continue with remove reload smu RPM
+ register: result
+ cisco.nxos.nxos_rpm: *id010
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_rpm: *id010
+
+ - assert: *id004
+ when: smu_run
+
+- debug: msg="END connection={{ ansible_connection }} nxos_rpm sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/defaults/main.yaml
new file mode 100644
index 00000000..9ef5ba51
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+testcase: "*"
+test_items: []
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/meta/main.yml
new file mode 100644
index 00000000..ae741cbd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tasks/cli.yaml
new file mode 100644
index 00000000..e0f56372
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tasks/cli.yaml
@@ -0,0 +1,33 @@
+---
+- name: collect common test cases
+ find:
+ paths: "{{ role_path }}/tests/common"
+ patterns: "{{ testcase }}.yaml"
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: "{{ role_path }}/tests/cli"
+ patterns: "{{ testcase }}.yaml"
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: "{{ test_cases.files }} + {{ cli_cases.files }}"
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=network_cli)
+ include: "{{ test_case_to_run }} ansible_connection=network_cli connection={{ cli }}"
+ with_items: "{{ test_items }}"
+ loop_control:
+ loop_var: test_case_to_run
+
+- name: run test cases (connection=local)
+ include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
+ with_items: "{{ test_items }}"
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tasks/main.yaml
new file mode 100644
index 00000000..b165a5f6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tasks/main.yaml
@@ -0,0 +1,14 @@
+---
+# Some of the tests in this suite change the hostname to switch.
+# This block/always ensures the hostname gets changed back to
+# the correct name.
+- block:
+ - { include: cli.yaml, tags: ['cli'] }
+ - { include: nxapi.yaml, tags: ['nxapi'] }
+
+ always:
+ - name: "Change hostname back to {{ inventory_hostname_short }}"
+ nxos_config:
+ lines:
+ - "hostname {{ inventory_hostname_short }}"
+ match: none
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tasks/nxapi.yaml
new file mode 100644
index 00000000..04c99602
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tasks/nxapi.yaml
@@ -0,0 +1,33 @@
+---
+- name: collect common test cases
+ find:
+ paths: "{{ role_path }}/tests/common"
+ patterns: "{{ testcase }}.yaml"
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: "{{ role_path }}/tests/nxapi"
+ patterns: "{{ testcase }}.yaml"
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=httpapi)
+ include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
+ with_items: "{{ test_items }}"
+ loop_control:
+ loop_var: test_case_to_run
+
+- name: run test cases (connection=local)
+ include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
+ with_items: "{{ test_items }}"
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/cli/misc_tests.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/cli/misc_tests.yaml
new file mode 100644
index 00000000..2acabe30
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/cli/misc_tests.yaml
@@ -0,0 +1,10 @@
+---
+- debug: msg="START cli/misc_tests.yaml on connection={{ ansible_connection }}"
+
+- block:
+ - name: Test that provider values are properly ignored
+ cisco.nxos.nxos_command:
+ commands: show version
+ provider: "{{ nxapi }}"
+
+ when: "ansible_connection != 'local'"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/common/common_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/common/common_config.yaml
new file mode 100644
index 00000000..81c6015b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/common/common_config.yaml
@@ -0,0 +1,160 @@
+---
+# nxos_config -> NetworkConfig, dumps
+# nxos_static_route -> CustomNetworkConfig
+
+# hit NetworkConfig
+# Select interface for test
+- debug: msg="START connection={{ ansible_connection }} common/common_config.yaml"
+- debug: msg="Using provider={{ connection.transport }}"
+ when: ansible_connection == "local"
+
+- set_fact: intname="{{ nxos_int1 }}"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ commands:
+ - no description
+ - no shutdown
+ parents:
+ - "interface {{ intname }}"
+ match: none
+ provider: "{{ connection }}"
+
+- name: collect any backup files
+ find: &backups
+ paths: "{{ role_path }}/backup"
+ pattern: "{{ inventory_hostname_short }}_config*"
+ connection: local
+ register: backup_files
+
+- name: delete backup files
+ file:
+ path: "{{ item.path }}"
+ state: absent
+ with_items: "{{backup_files.files|default([])}}"
+
+- name: configure device with config
+ cisco.nxos.nxos_config:
+ commands:
+ - description this is a test
+ - shutdown
+ parents:
+ - "interface {{ intname }}"
+ backup: yes
+ provider: "{{ connection }}"
+ register: result
+
+- assert:
+ that:
+ - "result.changed == true"
+ - "result.updates is defined"
+
+- name: collect any backup files
+ find: *backups
+ connection: local
+ register: backup_files
+
+- assert:
+ that:
+ - "backup_files.files is defined"
+
+# hit block/sublevel sections
+- name: setup
+ cisco.nxos.nxos_config: &clear
+ lines: no ip access-list test
+ provider: "{{ connection }}"
+ match: none
+ ignore_errors: yes
+
+# hit NetworkConfig._diff_exact
+- name: configure sub level command using block replace - exact
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ replace: block
+ provider: "{{ connection }}"
+ match: exact
+ register: result
+
+- assert:
+ that:
+ - "result.changed == true"
+ - "'ip access-list test' in result.updates"
+ - "'10 permit ip 192.0.2.1/32 any log' in result.updates"
+ - "'20 permit ip 192.0.2.2/32 any log' in result.updates"
+ - "'30 permit ip 192.0.2.3/32 any log' in result.updates"
+ - "'40 permit ip 192.0.2.4/32 any log' in result.updates"
+
+# hit NetworkConfig._diff_strict
+- name: configure sub level command using block replace strict
+ cisco.nxos.nxos_config:
+ lines:
+ - 10 permit ip 192.0.2.1/32 any log
+ - 20 permit ip 192.0.2.2/32 any log
+ - 30 permit ip 192.0.2.3/32 any log
+ - 40 permit ip 192.0.2.4/32 any log
+ parents: ip access-list test
+ replace: block
+ provider: "{{ connection }}"
+ match: strict
+ register: result
+
+- name: teardown
+ nxos_config: *clear
+
+# hit CustomNetworkConfig
+- block:
+ - name: create static route
+ cisco.nxos.nxos_static_route: &configure
+ prefix: "192.168.20.64/24"
+ next_hop: "192.0.2.3"
+ route_name: testing
+ pref: 100
+ tag: 5500
+ vrf: testing
+ provider: "{{ connection }}"
+ register: result
+
+ - assert: &true
+ that:
+ - "result.changed == true"
+
+ - name: remove static route
+ cisco.nxos.nxos_static_route: &remove
+ prefix: "192.168.20.64/24"
+ next_hop: "192.0.2.3"
+ route_name: testing
+ pref: 100
+ tag: 5500
+ vrf: testing
+ state: absent
+ provider: "{{ connection }}"
+ register: result
+
+ - assert: *true
+
+ always:
+ - name: remove static route
+ cisco.nxos.nxos_static_route:
+ prefix: "192.168.20.64/24"
+ next_hop: "192.0.2.3"
+ route_name: testing
+ pref: 100
+ tag: 5500
+ vrf: testing
+ state: absent
+ provider: "{{ connection }}"
+ ignore_errors: yes
+
+ - name: remove static route aggregate
+ cisco.nxos.nxos_static_route:
+ aggregate:
+ - { prefix: "192.168.22.64/24", next_hop: "192.0.2.3" }
+ - { prefix: "192.168.24.64/24", next_hop: "192.0.2.3" }
+ state: absent
+ provider: "{{ connection }}"
+ ignore_errors: yes
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/common/common_utils.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/common/common_utils.yaml
new file mode 100644
index 00000000..03a71119
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/common/common_utils.yaml
@@ -0,0 +1,102 @@
+---
+# nxos_command -> ComplexList
+# nxos_config -> to_list
+# nxos_interface -> conditional, remove_default_spec
+
+- debug: msg="START connection={{ ansible_connection }} common/common_utils.yaml"
+- debug: msg="Using provider={{ connection.transport }}"
+ when: ansible_connection == "local"
+
+# hit ComplexList
+- name: test contains operator
+ cisco.nxos.nxos_command:
+ commands:
+ - show version
+ provider: "{{ connection }}"
+
+# hit to_list()
+- name: setup
+ cisco.nxos.nxos_config:
+ lines: hostname switch
+ provider: "{{ connection }}"
+ match: none
+
+- name: configure top level command
+ cisco.nxos.nxos_config:
+ lines: hostname foo
+ provider: "{{ connection }}"
+ register: result
+
+- assert:
+ that:
+ - "result.changed == true"
+ - "'hostname foo' in result.updates"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines: hostname switch
+ provider: "{{ connection }}"
+ match: none
+
+# hit conditional()
+- set_fact: testint1="{{ nxos_int1 }}"
+- set_fact: testint2="{{ nxos_int2 }}"
+
+- name: "Setup: Put interfaces into a default state"
+ cisco.nxos.nxos_config:
+ lines:
+ - "default interface {{ testint1 }}"
+ - "default interface {{ testint2 }}"
+ provider: "{{ connection }}"
+ ignore_errors: yes
+
+ register: result
+
+- name: Check intent arguments
+ cisco.nxos.nxos_interface:
+ name: "{{ testint2 }}"
+ admin_state: up
+ tx_rate: ge(0)
+ rx_rate: ge(0)
+ provider: "{{ connection }}"
+ register: result
+
+- assert:
+ that:
+ - "result.failed == false"
+
+- name: Check intent arguments (failed condition)
+ cisco.nxos.nxos_interface:
+ name: "{{ testint2 }}"
+ admin_state: down
+ tx_rate: gt(0)
+ rx_rate: lt(0)
+ provider: "{{ connection }}"
+ ignore_errors: yes
+ register: result
+
+- assert:
+ that:
+ - "result.failed == true"
+ - "'tx_rate gt(0)' in result.failed_conditions"
+ - "'rx_rate lt(0)' in result.failed_conditions"
+
+- name: aggregate definition of interface
+ cisco.nxos.nxos_interface:
+ aggregate:
+ - { name: "{{ testint1 }}", description: "Test aggregation on first interface" }
+ - { name: "{{ testint2 }}", mode: layer3 }
+ provider: "{{ connection }}"
+ register: result
+
+- assert:
+ that:
+ - "result.changed == true"
+
+- name: "TearDown: Put interfaces into a default state"
+ cisco.nxos.nxos_config:
+ lines:
+ - "default interface {{ testint1 }}"
+ - "default interface {{ testint2 }}"
+ provider: "{{ connection }}"
+ ignore_errors: yes
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/common/misc_tests.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/common/misc_tests.yaml
new file mode 100644
index 00000000..4fd84d62
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_smoke/tests/common/misc_tests.yaml
@@ -0,0 +1,30 @@
+---
+- debug: msg="START connection={{ ansible_connection }} common/misc_tests.yaml"
+- debug: msg="Using provider={{ connection.transport }}"
+ when: ansible_connection == "local"
+
+- name: hit conditional for lists of 10 or more commands
+ cisco.nxos.nxos_command:
+ commands:
+ - show hostname
+ - show hostname
+ - show hostname
+ - show hostname
+ - show hostname
+ - show hostname
+ - show hostname
+ - show hostname
+ - show hostname
+ - show hostname
+ provider: "{{ connection }}"
+ register: result
+
+- assert:
+ that:
+ - result.stdout|length == 10
+
+- name: combine with provider
+ cisco.nxos.nxos_command:
+ commands:
+ - show hostname
+ provider: "{{ connection | combine({'timeout': 500}) }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tests/common/sanity.yaml
new file mode 100644
index 00000000..80c077e4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snapshot/tests/common/sanity.yaml
@@ -0,0 +1,129 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_snapshot sanity test"
+
+- set_fact: snapshot_run="true"
+
+- set_fact: snapshot_run="false"
+ when: titanium and (ansible_connection is match('nxapi'))
+
+- set_fact: snapshot_run="false"
+ when: platform is match('N35')
+
+- set_fact: add_sec="true"
+
+- set_fact: add_sec="false"
+ when: imagetag is search("D1")
+
+- block:
+
+ - name: create snapshot
+ register: result
+ cisco.nxos.nxos_snapshot: &id001
+ action: create
+ snapshot_name: test_snapshot1
+ description: Ansible
+ save_snapshot_locally: true
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_snapshot: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - block:
+
+ - name: Add section
+ register: result
+ cisco.nxos.nxos_snapshot: &id003
+ action: add
+ section: myshow
+ show_command: show ip interface brief
+ row_id: ROW_intf
+ element_key1: intf-name
+ element_key2: intf-name
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_snapshot: *id003
+
+ - assert: *id004
+ when: add_sec
+
+ - name: create another snapshot
+ register: result
+ cisco.nxos.nxos_snapshot: &id005
+ action: create
+ snapshot_name: test_snapshot2
+ description: row
+ section: myshow
+ show_command: show ip interface brief
+ row_id: ROW_intf
+ element_key1: intf-name
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_snapshot: *id005
+
+ - assert: *id004
+
+ - name: compare snapshots
+ cisco.nxos.nxos_snapshot:
+ action: compare
+ snapshot1: test_snapshot1
+ snapshot2: test_snapshot2
+ comparison_results_file: compare_snapshots.txt
+ compare_option: summary
+ path: .
+
+ - name: delete snapshot
+ register: result
+ cisco.nxos.nxos_snapshot: &id006
+ snapshot_name: test_snapshot2
+ action: delete
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_snapshot: *id006
+
+ - assert: *id004
+
+ - name: delete all snapshots
+ register: result
+ cisco.nxos.nxos_snapshot: &id007
+ action: delete_all
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_snapshot: *id007
+
+ - assert: *id004
+ when: snapshot_run
+ always:
+
+ - name: delete all sections
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - snapshot section delete myshow
+ match: none
+
+ - name: delete all snapshots
+ ignore_errors: true
+ cisco.nxos.nxos_snapshot:
+ action: delete_all
+
+- debug: msg="END connection={{ ansible_connection }} nxos_snapshot sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tests/common/sanity.yaml
new file mode 100644
index 00000000..e6e4c8ea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_community/tests/common/sanity.yaml
@@ -0,0 +1,163 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_snmp_community sanity
+ test"
+
+- name: Setup - Remove snmp_community if configured - 1
+ ignore_errors: true
+ cisco.nxos.nxos_snmp_community: &id005
+ community: TESTING7
+ group: network-operator
+ state: absent
+
+- name: Setup - Remove snmp_community if configured - 2
+ ignore_errors: true
+ cisco.nxos.nxos_snmp_community: &id010
+ community: TEST
+ group: network-operator
+ state: absent
+
+- block:
+
+ - name: Configure snmp_community group
+ register: result
+ cisco.nxos.nxos_snmp_community: &id001
+ community: TESTING7
+ group: network-operator
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_community: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Change snmp_community group
+ register: result
+ cisco.nxos.nxos_snmp_community: &id003
+ community: TESTING7
+ group: network-admin
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_community: *id003
+
+ - assert: *id004
+
+ - name: Remove snmp_community
+ register: result
+ cisco.nxos.nxos_snmp_community: *id005
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_community: *id005
+
+ - assert: *id004
+
+ - name: Configure snmp_community access read-only
+ register: result
+ cisco.nxos.nxos_snmp_community: &id006
+ community: TESTING7
+ access: ro
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_community: *id006
+
+ - assert: *id004
+
+ - name: Remove snmp_community
+ register: result
+ cisco.nxos.nxos_snmp_community: *id005
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_community: *id005
+
+ - assert: *id004
+
+ - name: Configure snmp_community access read-write
+ register: result
+ cisco.nxos.nxos_snmp_community: &id007
+ community: TESTING7
+ access: rw
+ acl: ansible_acl
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_community: *id007
+
+ - assert: *id004
+
+ - name: Change acl
+ register: result
+ cisco.nxos.nxos_snmp_community: &id008
+ community: TESTING7
+ access: rw
+ acl: new_acl
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_community: *id008
+
+ - assert: *id004
+
+ - name: Remove acl
+ register: result
+ cisco.nxos.nxos_snmp_community: &id009
+ community: TESTING7
+ access: rw
+ acl: default
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_community: *id009
+
+ - assert: *id004
+
+ - name: Add partial match community
+ register: result
+ cisco.nxos.nxos_snmp_community:
+ community: TEST
+ access: rw
+ acl: default
+ state: present
+
+ - assert:
+ that:
+ - result.changed == True
+ - "'snmp-server community TEST group network-admin' in result.commands"
+ always:
+
+ - name: Cleanup
+ cisco.nxos.nxos_snmp_community: *id005
+
+ - name: Cleanup
+ cisco.nxos.nxos_snmp_community: *id010
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_snmp_community sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tests/common/sanity.yaml
new file mode 100644
index 00000000..251ede91
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_contact/tests/common/sanity.yaml
@@ -0,0 +1,61 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_snmp_community sanity
+ test"
+
+- name: Setup - Remove snmp_contact if configured
+ cisco.nxos.nxos_snmp_contact: &id005
+ contact: Test
+ state: absent
+
+- block:
+
+ - name: Configure snmp contact
+ register: result
+ cisco.nxos.nxos_snmp_contact: &id001
+ contact: Testing
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_contact: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Change snmp contact
+ register: result
+ cisco.nxos.nxos_snmp_contact: &id003
+ contact: Test
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_contact: *id003
+
+ - assert: *id004
+
+ - name: Remove snmp contact
+ register: result
+ cisco.nxos.nxos_snmp_contact: *id005
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_contact: *id005
+
+ - assert: *id004
+ always:
+
+ - name: Cleanup
+ cisco.nxos.nxos_snmp_contact: *id005
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_snmp_community sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v1_trap.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v1_trap.yaml
new file mode 100644
index 00000000..8f0d0fd3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v1_trap.yaml
@@ -0,0 +1,125 @@
+---
+- set_fact: snmp_type="trap"
+
+- set_fact: snmp_version="v1"
+
+- debug: msg="START connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type
+ }} {{ snmp_version }} sanity test"
+
+- set_fact: intname="{{ nxos_int1 }}"
+ when: platform is not search('N5K|N6K')
+
+- name: Setup - Remove snmp_host if configured
+ ignore_errors: true
+ cisco.nxos.nxos_snmp_host: &id007
+ snmp_host: 192.0.2.3
+ community: TESTING
+ version: '{{ snmp_version }}'
+ snmp_type: '{{ snmp_type }}'
+ vrf: management
+ vrf_filter: management
+ src_intf: '{{ intname|default(omit) }}'
+ udp: 222
+ state: absent
+
+- block:
+
+ - name: Configure snmp host
+ register: result
+ cisco.nxos.nxos_snmp_host: &id001
+ snmp_host: 192.0.2.3
+ community: TESTING
+ version: '{{ snmp_version }}'
+ snmp_type: '{{ snmp_type }}'
+ vrf: management
+ vrf_filter: management
+ src_intf: '{{ intname|default(omit) }}'
+ udp: 222
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - block:
+
+ - name: Add another vrf to filter
+ register: result
+ cisco.nxos.nxos_snmp_host: &id003
+ snmp_host: 192.0.2.3
+ vrf_filter: default
+ udp: 222
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id003
+
+ - assert: *id004
+ when: platform is not search('N35|N5K|N6K')
+
+ - name: remove some configuration
+ register: result
+ cisco.nxos.nxos_snmp_host: &id005
+ snmp_host: 192.0.2.3
+ udp: 222
+ src_intf: '{{ intname|default(omit) }}'
+ vrf: management
+ vrf_filter: management
+ state: absent
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id005
+
+ - assert: *id004
+
+ - block:
+
+ - name: remove some more configuration
+ register: result
+ cisco.nxos.nxos_snmp_host: &id006
+ snmp_host: 192.0.2.3
+ udp: 222
+ vrf_filter: default
+ state: absent
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id006
+
+ - assert: *id004
+ when: platform is not search('N35|N5K|N6K')
+
+ - name: Cleanup
+ register: result
+ cisco.nxos.nxos_snmp_host: *id007
+
+ - assert: *id002
+
+ - name: Cleanup Idempotence
+ register: result
+ cisco.nxos.nxos_snmp_host: *id007
+
+ - assert: *id004
+ always:
+
+ - name: Cleanup
+ cisco.nxos.nxos_snmp_host: *id007
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type
+ }} {{ snmp_version }} sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v2_inform.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v2_inform.yaml
new file mode 100644
index 00000000..423fa6cb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v2_inform.yaml
@@ -0,0 +1,125 @@
+---
+- set_fact: snmp_type="inform"
+
+- set_fact: snmp_version="v2c"
+
+- debug: msg="START connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type
+ }} {{ snmp_version }} sanity test"
+
+- set_fact: intname="{{ nxos_int1 }}"
+ when: platform is not search('N5K|N6K')
+
+- name: Setup - Remove snmp_host if configured
+ ignore_errors: true
+ cisco.nxos.nxos_snmp_host: &id007
+ snmp_host: 192.0.2.3
+ community: TESTING
+ version: '{{ snmp_version }}'
+ snmp_type: '{{ snmp_type }}'
+ vrf: management
+ vrf_filter: management
+ src_intf: '{{ intname|default(omit) }}'
+ udp: 222
+ state: absent
+
+- block:
+
+ - name: Configure snmp host
+ register: result
+ cisco.nxos.nxos_snmp_host: &id001
+ snmp_host: 192.0.2.3
+ community: TESTING
+ version: '{{ snmp_version }}'
+ snmp_type: '{{ snmp_type }}'
+ vrf: management
+ vrf_filter: management
+ src_intf: '{{ intname|default(omit) }}'
+ udp: 222
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - block:
+
+ - name: Add another vrf to filter
+ register: result
+ cisco.nxos.nxos_snmp_host: &id003
+ snmp_host: 192.0.2.3
+ vrf_filter: default
+ udp: 222
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id003
+
+ - assert: *id004
+ when: platform is not search('N35|N5K|N6K')
+
+ - name: remove some configuration
+ register: result
+ cisco.nxos.nxos_snmp_host: &id005
+ snmp_host: 192.0.2.3
+ udp: 222
+ src_intf: '{{ intname|default(omit) }}'
+ vrf: management
+ vrf_filter: management
+ state: absent
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id005
+
+ - assert: *id004
+
+ - block:
+
+ - name: remove some more configuration
+ register: result
+ cisco.nxos.nxos_snmp_host: &id006
+ snmp_host: 192.0.2.3
+ udp: 222
+ vrf_filter: default
+ state: absent
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id006
+
+ - assert: *id004
+ when: platform is not search('N35|N5K|N6K')
+
+ - name: Cleanup
+ register: result
+ cisco.nxos.nxos_snmp_host: *id007
+
+ - assert: *id002
+
+ - name: Cleanup Idempotence
+ register: result
+ cisco.nxos.nxos_snmp_host: *id007
+
+ - assert: *id004
+ always:
+
+ - name: Cleanup
+ cisco.nxos.nxos_snmp_host: *id007
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type
+ }} {{ snmp_version }} sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_inform.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_inform.yaml
new file mode 100644
index 00000000..0f7d0c70
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_inform.yaml
@@ -0,0 +1,131 @@
+---
+- set_fact: snmp_type="inform"
+
+- set_fact: snmp_version="v3"
+
+- set_fact: snmp_auth="priv"
+
+- debug: msg="START connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type
+ }} {{ snmp_version }} sanity test"
+
+- set_fact: intname="{{ nxos_int1 }}"
+ when: platform is not search('N5K|N6K')
+
+- set_fact: run="true"
+
+- set_fact: run="false"
+ when: platform is match('N35')
+
+- name: Setup - Remove snmp_host if configured
+ ignore_errors: true
+ cisco.nxos.nxos_snmp_host: &id007
+ snmp_host: 192.0.2.3
+ community: TESTING
+ version: '{{ snmp_version }}'
+ snmp_type: '{{ snmp_type }}'
+ v3: '{{ snmp_auth }}'
+ vrf: management
+ vrf_filter: management
+ src_intf: '{{ intname|default(omit) }}'
+ state: absent
+
+- block:
+
+ - name: Configure snmp host
+ register: result
+ cisco.nxos.nxos_snmp_host: &id001
+ snmp_host: 192.0.2.3
+ community: TESTING
+ v3: '{{ snmp_auth|default(omit) }}'
+ version: '{{ snmp_version }}'
+ snmp_type: '{{ snmp_type }}'
+ vrf: management
+ vrf_filter: management
+ src_intf: '{{ intname|default(omit) }}'
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - block:
+
+ - name: Add another vrf to filter
+ register: result
+ cisco.nxos.nxos_snmp_host: &id003
+ snmp_host: 192.0.2.3
+ vrf_filter: default
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id003
+
+ - assert: *id004
+ when: platform is not search('N35|N5K|N6K')
+
+ - name: remove some configuration
+ register: result
+ cisco.nxos.nxos_snmp_host: &id005
+ snmp_host: 192.0.2.3
+ src_intf: '{{ intname|default(omit) }}'
+ vrf: management
+ vrf_filter: management
+ state: absent
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id005
+
+ - assert: *id004
+
+ - block:
+
+ - name: remove some more configuration
+ register: result
+ cisco.nxos.nxos_snmp_host: &id006
+ snmp_host: 192.0.2.3
+ vrf_filter: default
+ state: absent
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id006
+
+ - assert: *id004
+ when: platform is not search('N35|N5K|N6K')
+
+ - name: Cleanup
+ register: result
+ cisco.nxos.nxos_snmp_host: *id007
+
+ - assert: *id002
+
+ - name: Cleanup Idempotence
+ register: result
+ cisco.nxos.nxos_snmp_host: *id007
+
+ - assert: *id004
+ when: run
+ always:
+
+ - name: Cleanup
+ register: result
+ cisco.nxos.nxos_snmp_host: *id007
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type
+ }} {{ snmp_version }} sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_trap.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_trap.yaml
new file mode 100644
index 00000000..12eaf77f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_trap.yaml
@@ -0,0 +1,130 @@
+---
+- set_fact: snmp_type="trap"
+
+- set_fact: snmp_version="v3"
+
+- set_fact: snmp_auth="priv"
+
+- debug: msg="START connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type
+ }} {{ snmp_version }} sanity test"
+
+- set_fact: intname="{{ nxos_int1 }}"
+ when: platform is not search('N5K|N6K')
+
+- name: Setup - Remove snmp_host if configured
+ ignore_errors: true
+ cisco.nxos.nxos_snmp_host: &id007
+ snmp_host: 192.0.2.3
+ community: TESTING
+ udp: 222
+ v3: '{{ snmp_auth|default(omit) }}'
+ version: '{{ snmp_version }}'
+ snmp_type: '{{ snmp_type }}'
+ vrf: management
+ vrf_filter: management
+ src_intf: '{{ intname|default(omit) }}'
+ state: absent
+
+- block:
+
+ - name: Configure snmp host
+ register: result
+ cisco.nxos.nxos_snmp_host: &id001
+ snmp_host: 192.0.2.3
+ community: TESTING
+ udp: 222
+ v3: '{{ snmp_auth|default(omit) }}'
+ version: '{{ snmp_version }}'
+ snmp_type: '{{ snmp_type }}'
+ vrf: management
+ vrf_filter: management
+ src_intf: '{{ intname|default(omit) }}'
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - block:
+
+ - name: Add another vrf to filter
+ register: result
+ cisco.nxos.nxos_snmp_host: &id003
+ snmp_host: 192.0.2.3
+ udp: 222
+ vrf_filter: default
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id003
+
+ - assert: *id004
+ when: platform is not search('N35|N5K|N6K')
+
+ - name: remove some configuration
+ register: result
+ cisco.nxos.nxos_snmp_host: &id005
+ snmp_host: 192.0.2.3
+ udp: 222
+ src_intf: '{{ intname|default(omit) }}'
+ vrf: management
+ vrf_filter: management
+ state: absent
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id005
+
+ - assert: *id004
+
+ - block:
+
+ - name: remove some more configuration
+ register: result
+ cisco.nxos.nxos_snmp_host: &id006
+ snmp_host: 192.0.2.3
+ udp: 222
+ vrf_filter: default
+ state: absent
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_host: *id006
+
+ - assert: *id004
+ when: platform is not search('N35|N5K|N6K')
+
+ - name: Cleanup
+ register: result
+ cisco.nxos.nxos_snmp_host: *id007
+
+ - assert: *id002
+
+ - name: Cleanup Idempotence
+ register: result
+ cisco.nxos.nxos_snmp_host: *id007
+
+ - assert: *id004
+ always:
+
+ - name: Cleanup
+ register: result
+ cisco.nxos.nxos_snmp_host: *id007
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type
+ }} {{ snmp_version }} sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tests/common/sanity.yaml
new file mode 100644
index 00000000..487bcd38
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_location/tests/common/sanity.yaml
@@ -0,0 +1,62 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_snmp_location sanity
+ test"
+
+- name: Setup - Remove snmp_location if configured
+ cisco.nxos.nxos_snmp_location: &id005
+ location: Test
+ state: absent
+
+- block:
+
+ - name: Configure snmp location
+ register: result
+ cisco.nxos.nxos_snmp_location: &id001
+ location: Testing
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_location: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Change snmp location
+ register: result
+ cisco.nxos.nxos_snmp_location: &id003
+ location: Test
+ state: present
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_location: *id003
+
+ - assert: *id004
+
+ - name: remove snmp location
+ register: result
+ cisco.nxos.nxos_snmp_location: *id005
+
+ - assert: *id002
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_snmp_location: *id005
+
+ - assert: *id004
+ always:
+
+ - name: Cleanup
+ register: result
+ cisco.nxos.nxos_snmp_location: *id005
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_snmp_location sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tests/common/sanity.yaml
new file mode 100644
index 00000000..85ac8a05
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_traps/tests/common/sanity.yaml
@@ -0,0 +1,77 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_snmp_traps sanity test"
+
+- name: Setup - Remove snmp_traps if configured
+ cisco.nxos.nxos_snmp_traps: &id006
+ group: all
+ state: disabled
+
+- block:
+
+ - name: Configure one snmp trap group
+ register: result
+ cisco.nxos.nxos_snmp_traps: &id001
+ group: bridge
+ state: enabled
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_traps: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Remove snmp trap group
+ register: result
+ cisco.nxos.nxos_snmp_traps: &id003
+ group: bridge
+ state: disabled
+
+ - assert: *id002
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_traps: *id003
+
+ - assert: *id004
+
+ - name: Configure all snmp trap groups
+ register: result
+ cisco.nxos.nxos_snmp_traps: &id005
+ group: all
+ state: enabled
+
+ - assert: *id002
+
+ - block:
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_snmp_traps: *id005
+
+ - assert: *id004
+ when: imagetag is not search("I2|I7|D1")
+
+ - name: Cleanup
+ register: result
+ cisco.nxos.nxos_snmp_traps: *id006
+
+ - assert: *id002
+
+ - name: Cleanup Idempotence
+ register: result
+ cisco.nxos.nxos_snmp_traps: *id006
+
+ - assert: *id004
+ always:
+
+ - name: Cleanup
+ cisco.nxos.nxos_snmp_traps: *id006
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_snmp_traps sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tests/common/sanity.yaml
new file mode 100644
index 00000000..63af96d7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_snmp_user/tests/common/sanity.yaml
@@ -0,0 +1,109 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_snmp_user sanity test"
+
+- set_fact: delete_last_user_allowed='true'
+
+- set_fact: delete_last_user_allowed='false'
+ when: imagetag and (major_version is version_compare('9.1', 'ge'))
+
+- set_fact: delete_last_user_allowed='false'
+ when: platform is search('N5K|N6K|N9K-F')
+
+- name: Remove snmp user
+ ignore_errors: true
+ when: platform is not search('N5K|N6K|N9K-F')
+ cisco.nxos.nxos_snmp_user: &id006
+ user: ntc
+ state: absent
+
+- name: Remove user workaround
+ ignore_errors: true
+ when: platform is search('N5K|N6K|N9K-F')
+ cisco.nxos.nxos_user: &id007
+ name: ntc
+ state: absent
+
+- pause:
+ seconds: 5
+
+- block:
+
+ - name: Create snmp user
+ register: result
+ cisco.nxos.nxos_snmp_user:
+ user: ntc
+ group: network-operator
+ authentication: md5
+ pwd: N$tOpe%1
+ privacy: HelloU$er1
+ encrypt: true
+
+ - assert: &id001
+ that:
+ - result.changed == true
+
+ - name: Add another group to user
+ register: result
+ cisco.nxos.nxos_snmp_user: &id002
+ user: ntc
+ group: network-admin
+
+ - assert: *id001
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_snmp_user: *id002
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Remove group from user
+ register: result
+ cisco.nxos.nxos_snmp_user: &id003
+ user: ntc
+ group: network-admin
+ state: absent
+
+ - assert: *id001
+
+ - pause:
+ seconds: 5
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_snmp_user: *id003
+
+ - assert: *id004
+
+ - block:
+
+ - name: delete snmp user
+ register: result
+ cisco.nxos.nxos_snmp_user: &id005
+ user: ntc
+ group: network-operator
+ state: absent
+
+ - assert: *id001
+
+ - pause:
+ seconds: 5
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_snmp_user: *id005
+
+ - assert: *id004
+ when: delete_last_user_allowed
+ always:
+
+ - name: delete snmp user
+ when: platform is not search('N5K|N6K|N9K-F')
+ cisco.nxos.nxos_snmp_user: *id006
+
+ - name: remove user workaround
+ when: platform is search('N5K|N6K|N9K-F')
+ cisco.nxos.nxos_user: *id007
+
+- debug: msg="END connection={{ ansible_connection }} nxos_snmp_user sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/defaults/main.yaml
new file mode 100644
index 00000000..e69126b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/defaults/main.yaml
@@ -0,0 +1,5 @@
+---
+testcase: '*'
+vrfs:
+- default
+- myvrf
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tests/common/sanity.yaml
new file mode 100644
index 00000000..cccaa916
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_route/tests/common/sanity.yaml
@@ -0,0 +1,211 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_static_route sanity
+ test"
+
+- set_fact: test_track_feature="true"
+
+- name: configure track
+ register: cmd_result
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - track 1 ip sla 1
+
+- debug: msg="cmd result {{ cmd_result }}"
+
+- set_fact: test_track_feature="false"
+ when: cmd_result.failed
+
+- debug: msg="Test Track Feature {{ test_track_feature }}"
+
+- name: Setup and teardown, remove test routes if present
+ with_items: '{{ vrfs }}'
+ ignore_errors: true
+ cisco.nxos.nxos_static_route: &id009
+ aggregate:
+
+ - prefix: 192.168.1.164/32
+ next_hop: 192.0.2.3
+
+ - prefix: 192.168.20.64/24
+ next_hop: 192.0.2.3
+
+ - prefix: 192.168.22.64/24
+ next_hop: 192.0.2.3
+
+ - prefix: 192.168.24.64/24
+ next_hop: 192.0.2.3
+ vrf: '{{ item }}'
+ state: absent
+
+- name: Setup noise routes to ensure testing while non-test routes present
+ with_items: '{{ vrfs }}'
+ cisco.nxos.nxos_static_route:
+ prefix: 192.168.1.164/32
+ next_hop: 192.0.2.3
+ vrf: '{{ item }}'
+ state: present
+
+- block:
+
+ - name: create static route
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_static_route: &id001
+ prefix: 192.168.20.64/24
+ next_hop: 192.0.2.3
+ route_name: testing
+ pref: 100
+ tag: 5500
+ vrf: '{{ item }}'
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf static Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_static_route: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: change static route
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_static_route: &id003
+ prefix: 192.168.20.64/24
+ next_hop: 192.0.2.3
+ route_name: default
+ pref: 10
+ tag: default
+ vrf: '{{ item }}'
+
+ - assert: *id002
+
+ - name: Change Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_static_route: *id003
+
+ - assert: *id004
+
+ - name: configure static route with track
+ with_items: '{{ vrfs }}'
+ register: result
+ when: test_track_feature
+ cisco.nxos.nxos_static_route: &id005
+ prefix: 192.168.20.64/24
+ next_hop: 192.0.2.3
+ route_name: default
+ pref: 10
+ tag: default
+ track: 1
+ vrf: '{{ item }}'
+
+ - assert: *id002
+ when: test_track_feature
+
+ - name: Config track Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ when: test_track_feature
+ cisco.nxos.nxos_static_route: *id005
+
+ - assert: *id004
+ when: test_track_feature
+
+ - name: configure static route with not configured track
+ with_items: '{{ vrfs }}'
+ register: result
+ ignore_errors: true
+ when: test_track_feature
+ cisco.nxos.nxos_static_route:
+ prefix: 192.168.20.64/24
+ next_hop: 192.0.2.3
+ route_name: default
+ pref: 10
+ tag: default
+ track: 2
+ vrf: '{{ item }}'
+
+ - assert:
+ that:
+ - result.failed == True
+ when: test_track_feature
+
+ - name: remove static route
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_static_route: &id006
+ prefix: 192.168.20.64/24
+ next_hop: 192.0.2.3
+ route_name: testing
+ pref: 100
+ vrf: '{{ item }}'
+ state: absent
+
+ - assert: *id002
+
+ - name: Remove Idempotence
+ with_items: '{{ vrfs }}'
+ register: result
+ cisco.nxos.nxos_static_route: *id006
+
+ - assert: *id004
+
+ - name: configure static route(aggregate)
+ register: result
+ cisco.nxos.nxos_static_route: &id007
+ aggregate:
+
+ - prefix: 192.168.22.64/24
+ next_hop: 192.0.2.3
+
+ - prefix: 192.168.24.64/24
+ next_hop: 192.0.2.3
+
+ - assert: *id002
+
+ - name: configure static route aggregate(Idempotence)
+ register: result
+ cisco.nxos.nxos_static_route: *id007
+
+ - assert: *id004
+
+ - name: remove static route aggregate
+ register: result
+ cisco.nxos.nxos_static_route: &id008
+ aggregate:
+
+ - prefix: 192.168.22.64/24
+ next_hop: 192.0.2.3
+
+ - prefix: 192.168.24.64/24
+ next_hop: 192.0.2.3
+ state: absent
+
+ - assert: *id002
+
+ - name: remove static route aggregate(Idempotence)
+ register: result
+ cisco.nxos.nxos_static_route: *id008
+
+ - assert: *id004
+ always:
+
+ - name: remove track
+ ignore_errors: true
+ when: test_track_feature
+ cisco.nxos.nxos_config:
+ lines:
+ - no track 1
+
+ - name: teardown test routes
+ with_items: '{{ vrfs }}'
+ ignore_errors: true
+ cisco.nxos.nxos_static_route: *id009
+
+- debug: msg="END connection={{ ansible_connection }} nxos_static_route sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/defaults/main.yaml
new file mode 100644
index 00000000..871ea460
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: "[^_].*"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/meta/main.yml
new file mode 100644
index 00000000..ae741cbd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tasks/cli.yaml
new file mode 100644
index 00000000..4b1a0153
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: "{{ role_path }}/tests/common"
+ patterns: "{{ testcase }}.yml"
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: "{{ role_path }}/tests/cli"
+ patterns: "{{ testcase }}.yaml"
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: "{{ test_cases.files }} + {{ cli_cases.files }}"
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli"
+ with_items: "{{ test_items }}"
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tasks/main.yaml
new file mode 100644
index 00000000..415c99d8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tasks/main.yaml
@@ -0,0 +1,2 @@
+---
+- { include: cli.yaml, tags: ['cli'] }
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..d0a8d79a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/_populate_config.yaml
@@ -0,0 +1,11 @@
+---
+- name: Populate config
+ cisco.nxos.nxos_config:
+ lines:
+ - "ip route 192.0.2.16/28 192.0.2.24 name new_route"
+ - "ip route 192.0.2.80/28 192.0.2.26 tag 12"
+ - "vrf context trial_vrf"
+ - " ip route 192.0.2.64/28 192.0.2.22 tag 4"
+ - " ip route 192.0.2.64/28 192.0.2.23 name merged_route 1"
+ - "interface {{ nxos_int2 }}"
+ - " no switchport"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..2af46721
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/_remove_config.yaml
@@ -0,0 +1,15 @@
+---
+- name: Remove config
+ cisco.nxos.nxos_config:
+ lines:
+ - "no ip route 192.0.2.16/28 192.0.2.24 name new_route"
+ - "no ip route 192.0.2.80/28 192.0.2.26 tag 12"
+ - "no ip route 192.0.2.44/30 192.0.2.55 tag 1 1"
+ - "no ip route 192.0.2.16/28 192.0.2.23 name replaced_route1 3"
+ - "no ip route 192.0.2.16/28 {{ nxos_int2 }} 192.0.2.45 vrf destinationVRF name replaced_route2"
+ - "no ip route 192.0.2.36/30 192.0.2.32 name test_route1 tag 14"
+ - "no ip route 192.0.2.36/30 192.0.2.48 name test_route2 2"
+ - "no vrf context trial_vrf"
+ - "default interface {{ nxos_int2 }}"
+ ignore_errors: yes
+ #error is thrown if we deleted trial_vrf when it is not present already. ignore_errors circumvents it
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/deleted.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/deleted.yml
new file mode 100644
index 00000000..2b66a2ee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/deleted.yml
@@ -0,0 +1,81 @@
+---
+- debug:
+ msg: "Start nxos_static_routes deleted integration tests connection = {{ ansible_connection }}"
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Gather static_routes facts
+ cisco.nxos.nxos_facts: &facts
+ gather_subset:
+ - "!all"
+ - "!min"
+ gather_network_resources: static_routes
+
+ - name: Delete all routes based on VRF
+ cisco.nxos.nxos_static_routes:
+ config:
+ - vrf: trial_vrf
+ state: deleted
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == true"
+ - "'vrf context trial_vrf' in result.commands"
+ - "'no ip route 192.0.2.64/28 192.0.2.22 tag 4' in result.commands"
+ - "'no ip route 192.0.2.64/28 192.0.2.23 name merged_route 1' in result.commands"
+ - "result.commands | length == 3"
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Delete routes based on AFI in a VRF
+ cisco.nxos.nxos_static_routes:
+ config:
+ - vrf: trial_vrf
+ address_families:
+ - afi: ipv4
+ state: deleted
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == true"
+ - "'vrf context trial_vrf' in result.commands"
+ - "'no ip route 192.0.2.64/28 192.0.2.22 tag 4' in result.commands"
+ - "'no ip route 192.0.2.64/28 192.0.2.23 name merged_route 1' in result.commands"
+ - "result.commands | length == 3"
+
+ - include_tasks: _remove_config.yaml
+
+ - include_tasks: _populate_config.yaml
+
+ - name: Deleted (All routes)
+ cisco.nxos.nxos_static_routes: &deleted
+ state: deleted
+ register: result
+
+ - name: Gather static_routes post facts
+ cisco.nxos.nxos_facts: *facts
+
+ - assert:
+ that:
+ - "'vrf context trial_vrf' in result.commands"
+ - "'no ip route 192.0.2.64/28 192.0.2.22 tag 4' in result.commands"
+ - "'no ip route 192.0.2.64/28 192.0.2.23 name merged_route 1' in result.commands"
+ - "'vrf context default' in result.commands"
+ - "'no ip route 192.0.2.16/28 192.0.2.24 name new_route' in result.commands"
+ - "'no ip route 192.0.2.80/28 192.0.2.26 tag 12' in result.commands"
+ - "result.changed == true"
+ - "result.commands | length == 6"
+
+ - name: Idempotence - deleted
+ cisco.nxos.nxos_static_routes: *deleted
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == false"
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/gathered.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/gathered.yml
new file mode 100644
index 00000000..05e87d81
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/gathered.yml
@@ -0,0 +1,34 @@
+---
+- debug:
+ msg: "Start nxos_static_routes gathered tests connection={{ ansible_connection }}"
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Gather static_routes facts
+ cisco.nxos.nxos_facts: &facts
+ gather_subset:
+ - "!all"
+ - "!min"
+ gather_network_resources: static_routes
+
+ - name: Gathered
+ cisco.nxos.nxos_static_routes: &gathered
+ state: gathered
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == false"
+ - "ansible_facts.network_resources.static_routes == result.gathered"
+
+ - name: Idempotence - Gathered
+ cisco.nxos.nxos_static_routes: *gathered
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == false"
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/merged.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/merged.yml
new file mode 100644
index 00000000..e8ec880b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/merged.yml
@@ -0,0 +1,61 @@
+---
+- debug:
+ msg: "Start nxos_static_routes merged integration tests connection={{ansible_connection}}"
+
+- include_tasks: _populate_config.yaml
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ - name: Merged
+ cisco.nxos.nxos_static_routes: &merged
+ config:
+ - vrf: trial_vrf
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.64/28
+ next_hops:
+ - forward_router_address: 192.0.2.22
+ tag: 4
+
+ - forward_router_address: 192.0.2.23
+ route_name: merged_route
+ admin_distance: 1
+
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - forward_router_address: 192.0.2.24
+ route_name: new_route
+
+ - dest: 192.0.2.80/28
+ next_hops:
+ - forward_router_address: 192.0.2.26
+ tag: 12
+ state: merged
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == true"
+ - "'vrf context default' in result.commands"
+ - "'ip route 192.0.2.16/28 192.0.2.24 name new_route' in result.commands"
+ - "'ip route 192.0.2.80/28 192.0.2.26 tag 12' in result.commands"
+ - "'vrf context trial_vrf' in result.commands"
+ - "'ip route 192.0.2.64/28 192.0.2.22 tag 4' in result.commands"
+ - "'ip route 192.0.2.64/28 192.0.2.23 name merged_route 1' in result.commands"
+ - "result.commands | length == 6"
+
+ - name: Idempotence - Merged
+ cisco.nxos.nxos_static_routes: *merged
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == false"
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/overridden.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/overridden.yml
new file mode 100644
index 00000000..2a007d7b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/overridden.yml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: "Start nxos_static_routes overridden tests connection={{ ansible_connection }}"
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Gather static_routes facts
+ cisco.nxos.nxos_facts: &facts
+ gather_subset:
+ - "!all"
+ - "!min"
+ gather_network_resources: static_routes
+
+ - name: Overridden
+ cisco.nxos.nxos_static_routes: &overridden
+ config:
+ - vrf: trial_vrf
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - forward_router_address: 192.0.2.23
+ route_name: overridden_route1
+ admin_distance: 3
+
+ - forward_router_address: 192.0.2.45
+ route_name: overridden_route2
+ dest_vrf: destinationVRF
+ interface: "{{ nxos_int2 }}"
+
+ state: overridden
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == true"
+ - "'vrf context trial_vrf' in result.commands"
+ - "'no ip route 192.0.2.64/28 192.0.2.22 tag 4' in result.commands"
+ - "'no ip route 192.0.2.64/28 192.0.2.23 name merged_route 1' in result.commands"
+ - "'ip route 192.0.2.16/28 192.0.2.23 name overridden_route1 3' in result.commands"
+ - "'ip route 192.0.2.16/28 {{ nxos_int2 }} 192.0.2.45 vrf destinationVRF name overridden_route2' in result.commands"
+ - "'vrf context default' in result.commands"
+ - "'no ip route 192.0.2.16/28 192.0.2.24 name new_route' in result.commands"
+ - "'no ip route 192.0.2.80/28 192.0.2.26 tag 12' in result.commands"
+ - "result.commands | length == 8"
+
+ - name: Idempotence - overridden
+ cisco.nxos.nxos_static_routes: *overridden
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == false"
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/parsed.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/parsed.yml
new file mode 100644
index 00000000..1cfe07af
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/parsed.yml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: "Start nxos_static_routes parsed tests connection={{ ansible_connection }}"
+
+- name: Parsed
+ cisco.nxos.nxos_static_routes: &parsed
+ running_config: |
+ ip route 192.0.2.16/28 192.0.2.24 name new_route
+ ip route 192.0.2.80/28 192.0.2.26 tag 12
+ vrf context trial_vrf
+ ip route 192.0.2.64/28 192.0.2.22 tag 4
+ ip route 192.0.2.64/28 192.0.2.23 name merged_route 1
+ state: parsed
+ register: result
+
+- assert:
+ that:
+ - "result.changed == false"
+ - "result.parsed == parsed"
+
+- name: Idempotence - Parsed
+ cisco.nxos.nxos_static_routes: *parsed
+ register: result
+
+- assert:
+ that: "result.changed == false"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/rendered.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/rendered.yml
new file mode 100644
index 00000000..05098874
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/rendered.yml
@@ -0,0 +1,49 @@
+---
+- debug:
+ msg: "Start nxos_static_routes rendered tests connection={{ ansible_connection }}"
+
+- name: Rendered
+ nxos_static_routes: &rendered
+ config:
+ - vrf: trial_vrf
+ address_families:
+ - afi: ipv6
+ routes:
+ - dest: 2001:db8:12::/32
+ next_hops:
+ - forward_router_address: 2001:db8::1001
+ route_name: rendered_route
+ admin_distance: 3
+
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - forward_router_address: 192.0.2.24
+ route_name: new_route
+
+ - dest: 192.0.2.80/28
+ next_hops:
+ - forward_router_address: 192.0.2.26
+ tag: 12
+ state: rendered
+ register: result
+
+- assert:
+ that:
+ - "result.changed == false"
+ - "'vrf context default' in result.rendered"
+ - "'ip route 192.0.2.16/28 192.0.2.24 name new_route' in result.rendered"
+ - "'ip route 192.0.2.80/28 192.0.2.26 tag 12' in result.rendered"
+ - "'vrf context trial_vrf' in result.rendered"
+ - "'ipv6 route 2001:db8:12::/32 2001:db8::1001 name rendered_route 3' in result.rendered"
+ - "result.rendered | length == 5"
+
+- name: Idempotence - Rendered
+ nxos_static_routes: *rendered
+ register: result
+
+- assert:
+ that:
+ - "result.changed == false"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/replaced.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/replaced.yml
new file mode 100644
index 00000000..c50b0e96
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/replaced.yml
@@ -0,0 +1,52 @@
+---
+- debug:
+ msg: "Start nxos_static_routes replaced integration tests connection = {{ansible_connection}}"
+
+- include_tasks: _populate_config.yaml
+
+- block:
+ - name: Gather static_routes post facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - "!all"
+ - "!min"
+ gather_network_resources: static_routes
+
+ - name: Replaced
+ cisco.nxos.nxos_static_routes: &replaced
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.16/28
+ next_hops:
+ - forward_router_address: 192.0.2.23
+ route_name: replaced_route1
+ admin_distance: 3
+
+ - forward_router_address: 192.0.2.45
+ route_name: replaced_route2
+ dest_vrf: destinationVRF
+ interface: "{{ nxos_int2 }}"
+ state: replaced
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == true"
+ - "'vrf context default' in result.commands"
+ - "'no ip route 192.0.2.16/28 192.0.2.24 name new_route' in result.commands"
+ - "'ip route 192.0.2.16/28 192.0.2.23 name replaced_route1 3' in result.commands"
+ - "'ip route 192.0.2.16/28 {{ nxos_int2 }} 192.0.2.45 vrf destinationVRF name replaced_route2' in result.commands"
+ - "result.commands | length == 4"
+
+ - name: Idempotence - Replaced
+ cisco.nxos.nxos_static_routes: *replaced
+ register: result
+
+ - assert:
+ that:
+ - "result.changed == false"
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/rtt.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/rtt.yml
new file mode 100644
index 00000000..a844a6b1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/tests/common/rtt.yml
@@ -0,0 +1,80 @@
+---
+- debug:
+ msg: "Start nxos_static_routes round trip integration tests on connection={{ ansible_connection }}"
+
+- block:
+ - include_tasks: _remove_config.yaml
+
+ - name: Apply the provided configuration(base config)
+ cisco.nxos.nxos_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.36/30
+ next_hops:
+ - forward_router_address: 192.0.2.32
+ route_name: test_route1
+ tag: 14
+
+ - forward_router_address: 192.0.2.48
+ route_name: test_route2
+ admin_distance: 2
+
+ - vrf: trial_vrf
+ address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.32/30
+ next_hops:
+ - forward_router_address: 192.0.2.105
+ dest_vrf: test_dest_vrf
+ state: merged
+ register: base_config
+
+ - name: Gather interfaces facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - "!all"
+ - "!min"
+ gather_network_resources:
+ - static_routes
+
+ - name: Apply provided configuration(this will be reverted)
+ cisco.nxos.nxos_static_routes:
+ config:
+ - address_families:
+ - afi: ipv4
+ routes:
+ - dest: 192.0.2.44/30
+ next_hops:
+ - forward_router_address: 192.0.2.55
+ tag: 1
+ admin_distance: 1
+ state: overridden
+ register: result
+
+ - name: Assert that changes are applied
+ assert:
+ that:
+ - "result.changed == true"
+ - "'vrf context default' in result.commands"
+ - "'no ip route 192.0.2.36/30 192.0.2.32 name test_route1 tag 14' in result.commands"
+ - "'no ip route 192.0.2.36/30 192.0.2.48 name test_route2 2'"
+ - "'ip route 192.0.2.44/30 192.0.2.55 tag 1 1' in result.commands"
+ - "'vrf context trial_vrf' in result.commands"
+ - "'no ip route 192.0.2.32/30 192.0.2.105 vrf test_dest_vrf' in result.commands"
+ - "result.commands | length == 6"
+
+ - name: Revert back to base configuration
+ cisco.nxos.nxos_static_routes:
+ config: "{{ ansible_facts['network_resources']['static_routes'] }}"
+ state: overridden
+ register: revert
+
+ - assert:
+ that:
+ - " base_config['after'] | symmetric_difference(revert['after']) | length == 0"
+
+ always:
+ - include_tasks: _remove_config.yaml
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/vars/main.yml
new file mode 100644
index 00000000..b0c6d454
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_static_routes/vars/main.yml
@@ -0,0 +1,53 @@
+"parsed":
+ [
+ {
+ "address_families":
+ [
+ {
+ "afi": "ipv4",
+ "routes":
+ [
+ {
+ "dest": "192.0.2.64/28",
+ "next_hops":
+ [
+ { "forward_router_address": "192.0.2.22", "tag": 4 },
+ {
+ "admin_distance": 1,
+ "forward_router_address": "192.0.2.23",
+ "route_name": "merged_route",
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ "vrf": "trial_vrf",
+ },
+ {
+ "address_families":
+ [
+ {
+ "afi": "ipv4",
+ "routes":
+ [
+ {
+ "dest": "192.0.2.16/28",
+ "next_hops":
+ [
+ {
+ "forward_router_address": "192.0.2.24",
+ "route_name": "new_route",
+ },
+ ],
+ },
+ {
+ "dest": "192.0.2.80/28",
+ "next_hops":
+ [{ "forward_router_address": "192.0.2.26", "tag": 12 }],
+ },
+ ],
+ },
+ ],
+ },
+ ]
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/net_system.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/net_system.yaml
new file mode 100644
index 00000000..ac99912d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/net_system.yaml
@@ -0,0 +1,32 @@
+---
+- debug: msg="START nxos cli/net_system.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines:
+ - no ip domain-list ansible.com
+ - no ip domain-list redhat.com
+ match: none
+
+- name: configure domain_list using platform agnostic module
+ register: result
+ ansible.netcommon.net_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip domain-list ansible.com' in result.commands"
+ - "'ip domain-list redhat.com' in result.commands"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines:
+ - no ip domain-list ansible.com
+ - no ip domain-list redhat.com
+ match: none
+
+- debug: msg="END nxos cli/net_system.yaml on connection={{ ansible_connection }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/set_domain_list.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/set_domain_list.yaml
new file mode 100644
index 00000000..c5e0655b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/set_domain_list.yaml
@@ -0,0 +1,112 @@
+---
+- debug: msg="START cli/set_domain_list.yaml"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines:
+ - no ip domain-list ansible.com
+ - no ip domain-list redhat.com
+ match: none
+
+- name: configure domain_list
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip domain-list ansible.com' in result.commands"
+ - "'ip domain-list redhat.com' in result.commands"
+
+- name: verify domain_list
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove one entry
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+
+- assert:
+ that:
+ - result.changed == true
+ - "'no ip domain-list redhat.com' in result.commands"
+
+- name: verify remove one entry
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: add one entry
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip domain-list redhat.com' in result.commands"
+
+- name: verify add one entry
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: add and remove one entry
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+ - eng.ansible.com
+
+- assert:
+ that:
+ - result.changed == true
+ - "'no ip domain-list redhat.com' in result.commands"
+ - "'ip domain-list eng.ansible.com' in result.commands"
+ - result.commands|length == 2
+
+- name: verify add and remove one entry
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+ - eng.ansible.com
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines:
+ - no ip domain-list ansible.com
+ - no ip domain-list redhat.com
+ - no ip domain-list eng.ansible.com
+ match: none
+
+- debug: msg="END cli/set_domain_search.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/set_domain_name.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/set_domain_name.yaml
new file mode 100644
index 00000000..aecce57c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/set_domain_name.yaml
@@ -0,0 +1,32 @@
+---
+- debug: msg="START cli/set_domain_name.yaml"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines: no ip domain-name eng.ansible.com
+ match: none
+
+- name: configure domain_name
+ register: result
+ cisco.nxos.nxos_system:
+ domain_name: eng.ansible.com
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify domain_name
+ register: result
+ cisco.nxos.nxos_system:
+ domain_name: eng.ansible.com
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines: no ip domain-name eng.ansible.com
+ match: none
+
+- debug: msg="END cli/set_domain_name.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/set_name_servers.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/set_name_servers.yaml
new file mode 100644
index 00000000..542c7ac8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/cli/set_name_servers.yaml
@@ -0,0 +1,73 @@
+---
+- debug: msg="START cli/set_name_servers.yaml"
+
+- name: setup
+ cisco.nxos.nxos_config: &id002
+ lines:
+ - no ip name-server 192.0.2.1
+ - no ip name-server 192.0.2.2
+ - no ip name-server 192.0.2.3
+ match: none
+
+- name: configure name_servers
+ register: result
+ cisco.nxos.nxos_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip name-server 192.0.2.1' in result.commands"
+ - "'ip name-server 192.0.2.2' in result.commands"
+ - "'ip name-server 192.0.2.3' in result.commands"
+
+- name: verify name_servers
+ register: result
+ cisco.nxos.nxos_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove one
+ register: result
+ cisco.nxos.nxos_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands|length == 1
+ - "'no ip name-server 192.0.2.3' in result.commands"
+
+- name: default name server
+ register: result
+ cisco.nxos.nxos_system: &id001
+ name_servers: default
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Idempotent check
+ register: result
+ cisco.nxos.nxos_system: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id002
+
+- debug: msg="END cli/set_name_servers.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/common/sanity.yaml
new file mode 100644
index 00000000..4dd8e8fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/common/sanity.yaml
@@ -0,0 +1,131 @@
+---
+- debug: msg="START connection={{ ansible_connection }}/sanity.yaml"
+
+- block:
+
+ - name: remove configuration
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_system: &id010
+ state: absent
+
+ - name: configure domain lookup
+ register: result
+ cisco.nxos.nxos_system: &id007
+ domain_lookup: true
+ state: present
+
+ - name: configure hostname and domain-name
+ register: result
+ cisco.nxos.nxos_system: &id001
+ hostname: switch
+ domain_name: test.example.com
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Idempotence check
+ register: result
+ cisco.nxos.nxos_system: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: configure name servers
+ register: result
+ cisco.nxos.nxos_system: &id003
+ name_servers:
+ - 8.8.8.8
+ - 8.8.4.4
+
+ - assert: *id002
+
+ - name: Idempotence check
+ register: result
+ cisco.nxos.nxos_system: *id003
+
+ - assert: *id004
+
+ - name: configure name servers with VRF support
+ register: result
+ cisco.nxos.nxos_system: &id005
+ name_servers:
+
+ - server: 8.8.8.8
+ vrf: management
+
+ - server: 8.8.4.4
+ vrf: management
+
+ - assert: *id002
+
+ - name: Idempotence check
+ register: result
+ cisco.nxos.nxos_system: *id005
+
+ - assert: *id004
+
+ - name: configure domain lookup1
+ register: result
+ cisco.nxos.nxos_system: &id006
+ domain_lookup: false
+
+ - assert: *id002
+
+ - name: Idempotence check
+ register: result
+ cisco.nxos.nxos_system: *id006
+
+ - assert: *id004
+
+ - name: configure domain lookup2
+ register: result
+ cisco.nxos.nxos_system: *id007
+
+ - assert: *id002
+
+ - name: Idempotence check
+ register: result
+ cisco.nxos.nxos_system: *id007
+
+ - assert: *id004
+
+ - name: configure system mtu
+ register: result
+ cisco.nxos.nxos_system: &id008
+ system_mtu: 3000
+
+ - assert: *id002
+
+ - name: Idempotence check
+ register: result
+ cisco.nxos.nxos_system: *id008
+
+ - assert: *id004
+
+ - name: default configuration
+ register: result
+ cisco.nxos.nxos_system: &id009
+ hostname: default
+ domain_name: default
+ name_servers: default
+ system_mtu: default
+
+ - assert: *id002
+
+ - name: Idempotence check
+ register: result
+ cisco.nxos.nxos_system: *id009
+
+ - assert: *id004
+ always:
+
+ - name: remove configuration
+ cisco.nxos.nxos_system: *id010
+
+ - name: Re-configure hostname
+ cisco.nxos.nxos_system: *id001
+
+ - debug: msg="END connection={{ ansible_connection }}/sanity.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/common/set_hostname.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/common/set_hostname.yaml
new file mode 100644
index 00000000..6efd90e2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/common/set_hostname.yaml
@@ -0,0 +1,35 @@
+---
+- debug: msg="START connection={{ ansible_connection }}/set_hostname.yaml"
+
+- block:
+
+ - name: setup
+ cisco.nxos.nxos_config:
+ lines: hostname switch
+ match: none
+
+ - name: configure hostname
+ register: result
+ cisco.nxos.nxos_system:
+ hostname: foo
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: verify hostname
+ register: result
+ cisco.nxos.nxos_system:
+ hostname: foo
+
+ - assert:
+ that:
+ - result.changed == false
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config:
+ lines: hostname switch
+ match: none
+
+ - debug: msg="END connection={{ ansible_connection }}/set_hostname.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/net_system.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/net_system.yaml
new file mode 100644
index 00000000..77762020
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/net_system.yaml
@@ -0,0 +1,34 @@
+---
+- debug: msg="START nxos nxapi/net_system.yaml on connection={{ ansible_connection
+ }}"
+
+- name: setup
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no ip domain-list ansible.com
+ - no ip domain-list redhat.com
+ match: none
+
+- name: configure domain_list using platform agnostic module
+ register: result
+ ansible.netcommon.net_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip domain-list ansible.com' in result.commands"
+ - "'ip domain-list redhat.com' in result.commands"
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines:
+ - no ip domain-list ansible.com
+ - no ip domain-list redhat.com
+ match: none
+
+- debug: msg="END nxos nxapi/net_system.yaml on connection={{ ansible_connection
+ }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/set_domain_list.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/set_domain_list.yaml
new file mode 100644
index 00000000..a035304e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/set_domain_list.yaml
@@ -0,0 +1,118 @@
+---
+- debug: msg="START nxapi/set_domain_list.yaml"
+
+- name: setup
+ ignore_errors: true
+ with_items:
+ - ansible.com
+ - redhat.com
+ cisco.nxos.nxos_config:
+ lines:
+ - no ip domain-list {{ item }}
+ match: none
+
+- name: configure domain_list
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip domain-list ansible.com' in result.commands"
+ - "'ip domain-list redhat.com' in result.commands"
+
+- name: verify domain_list
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove one entry
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+
+- assert:
+ that:
+ - result.changed == true
+ - "'no ip domain-list redhat.com' in result.commands"
+
+- name: verify remove one entry
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: add one entry
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip domain-list redhat.com' in result.commands"
+
+- name: verify add one entry
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+ - redhat.com
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: add and remove one entry
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+ - eng.ansible.com
+
+- assert:
+ that:
+ - result.changed == true
+ - "'no ip domain-list redhat.com' in result.commands"
+ - "'ip domain-list eng.ansible.com' in result.commands"
+ - result.commands|length == 2
+
+- name: verify add and remove one entry
+ register: result
+ cisco.nxos.nxos_system:
+ domain_search:
+ - ansible.com
+ - eng.ansible.com
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ ignore_errors: true
+ with_items:
+ - ansible.com
+ - redhat.com
+ - eng.ansible.com
+ cisco.nxos.nxos_config:
+ lines:
+ - no ip domain-list {{ item }}
+ match: none
+
+- debug: msg="END nxapi/set_domain_search.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/set_domain_name.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/set_domain_name.yaml
new file mode 100644
index 00000000..4dd0ddc1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/set_domain_name.yaml
@@ -0,0 +1,33 @@
+---
+- debug: msg="START nxapi/set_domain_name.yaml"
+
+- name: setup
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines: no ip domain-name eng.ansible.com
+ match: none
+
+- name: configure domain_name
+ register: result
+ cisco.nxos.nxos_system:
+ domain_name: eng.ansible.com
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: verify domain_name
+ register: result
+ cisco.nxos.nxos_system:
+ domain_name: eng.ansible.com
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ cisco.nxos.nxos_config:
+ lines: no ip domain-name eng.ansible.com
+ match: none
+
+- debug: msg="END nxapi/set_domain_name.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/set_name_servers.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/set_name_servers.yaml
new file mode 100644
index 00000000..6ce15f89
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_system/tests/nxapi/set_name_servers.yaml
@@ -0,0 +1,80 @@
+---
+- debug: msg="START nxapi/set_name_servers.yaml"
+
+- name: setup
+ ignore_errors: true
+ with_items:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+ cisco.nxos.nxos_config: &id002
+ lines:
+ - no ip name-server {{ item }}
+ match: none
+
+- name: configure name_servers
+ register: result
+ cisco.nxos.nxos_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+
+- assert:
+ that:
+ - result.changed == true
+ - "'ip name-server 192.0.2.1' in result.commands"
+ - "'ip name-server 192.0.2.2' in result.commands"
+ - "'ip name-server 192.0.2.3' in result.commands"
+
+- name: verify name_servers
+ register: result
+ cisco.nxos.nxos_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: remove one
+ register: result
+ cisco.nxos.nxos_system:
+ name_servers:
+ - 192.0.2.1
+ - 192.0.2.2
+
+- assert:
+ that:
+ - result.changed == true
+ - result.commands|length == 1
+ - "'no ip name-server 192.0.2.3' in result.commands"
+
+- name: default name server
+ register: result
+ cisco.nxos.nxos_system: &id001
+ name_servers: default
+
+- assert:
+ that:
+ - result.changed == true
+
+- name: Idempotent check
+ register: result
+ cisco.nxos.nxos_system: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ with_items:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id002
+
+- debug: msg="END nxapi/set_name_servers.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tasks/cli.yaml
new file mode 100644
index 00000000..1edbef6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tasks/cli.yaml
@@ -0,0 +1,27 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tasks/main.yaml
new file mode 100644
index 00000000..30f9acf2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tasks/main.yaml
@@ -0,0 +1,16 @@
+---
+- set_fact: run_test="true"
+
+- set_fact: run_test="false"
+ when: platform is not search("N9K")
+
+- set_fact: run_test="false"
+ when: imagetag is search("I2|I3|I4|I5|I6")
+
+- include: cli.yaml
+ tags: cli
+ when: run_test
+
+- include: nxapi.yaml
+ tags: nxapi
+ when: run_test
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tasks/nxapi.yaml
new file mode 100644
index 00000000..7e21ea41
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tasks/nxapi.yaml
@@ -0,0 +1,27 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/templates/populate_config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/templates/populate_config.cfg
new file mode 100644
index 00000000..408324fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/templates/populate_config.cfg
@@ -0,0 +1,38 @@
+telemetry
+ certificate test_cert host.example.com
+ destination-profile
+ use-vrf blue
+ use-compression gzip
+ destination-group 2
+ ip address 192.168.0.1 port 50001 protocol gRPC encoding GPB
+ ip address 192.168.0.2 port 60001 protocol gRPC encoding GPB
+ destination-group 10
+ ip address 192.168.0.1 port 50001 protocol gRPC encoding GPB
+ ip address 192.168.0.2 port 60001 protocol gRPC encoding GPB
+ ip address 192.168.1.1 port 55 protocol HTTP encoding JSON
+ ip address 192.168.1.2 port 100 protocol gRPC encoding GPB
+ destination-group 99
+ sensor-group 2
+ data-source NX-API
+ path "show bgp l2vpn evpn summary" depth unbounded query-condition foo filter-condition foo
+ sensor-group 8
+ data-source NX-API
+ path "show ip bgp neighbors" depth 0 query-condition foo filter-condition foo
+ sensor-group 55
+ data-source DME
+ path sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11] depth 0 query-condition foo filter-condition foo
+ path sys/ospf depth 0 query-condition foo filter-condition or(eq(ethpmPhysIf.operSt,"down"),eq(ethpmPhysIf.operSt,"up"))
+ sensor-group 77
+ subscription 44
+ dst-grp 2
+ dst-grp 10
+ snsr-grp 2 sample-interval 2000
+ snsr-grp 8 sample-interval 2000
+ subscription 55
+ dst-grp 10
+ snsr-grp 55 sample-interval 2000
+ subscription 99
+ dst-grp 2
+ dst-grp 99
+ snsr-grp 8 sample-interval 90000
+ snsr-grp 77 sample-interval 2000
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tests/common/deleted.yaml
new file mode 100644
index 00000000..21c0081d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tests/common/deleted.yaml
@@ -0,0 +1,160 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_telemetry deleted sanity
+ test"
+
+- set_fact: source_interface="Loopback55"
+ when: imagetag and (major_version is version_compare('9.1', 'ge'))
+
+- set_fact: before_keys_length=6
+
+- set_fact: before_keys_length=7
+ when: imagetag and (major_version is version_compare('9.1', 'ge'))
+
+- name: Setup
+ ignore_errors: true
+ cisco.nxos.nxos_feature: &id003
+ feature: telemetry
+ state: disabled
+
+- name: Setup - Configure Telemetry
+ cisco.nxos.nxos_telemetry:
+ state: merged
+ config:
+ certificate:
+ key: /bootflash/server.key
+ hostname: localhost
+ compression: gzip
+ source_interface: '{{source_interface|default(omit)}}'
+ vrf: management
+ destination_groups:
+
+ - id: 2
+ destination:
+ ip: 192.168.0.1
+ port: 50001
+ protocol: grpc
+ encoding: gpb
+
+ - id: 2
+ destination:
+ ip: 192.168.0.2
+ port: 60001
+ protocol: gRPC
+ encoding: GPB
+
+ - id: 10
+ destination:
+ ip: 192.168.0.1
+ port: 50001
+ protocol: Grpc
+ encoding: gPB
+
+ - id: 10
+ destination:
+ ip: 192.168.0.2
+ port: 60001
+ protocol: gRPC
+ encoding: gpb
+ sensor_groups:
+
+ - id: 8
+ data_source: NX-API
+ path:
+ name: '"show bgp l2vpn evpn summary"'
+ depth: 0
+ query_condition: foo
+ filter_condition: foo
+
+ - id: 2
+ data_source: NX-API
+ path:
+ name: '"show ip bgp neighbors"'
+ depth: unbounded
+ query_condition: foo
+ filter_condition: foo
+
+ - id: 55
+ data_source: DME
+ path:
+ name: sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]
+ depth: 0
+ query_condition: foo
+ filter_condition: foo
+
+ - id: 55
+ data_source: DME
+ path:
+ name: sys/ospf
+ depth: 0
+ query_condition: foo
+ filter_condition: or(eq(ethpmPhysIf.operSt,"down"),eq(ethpmPhysIf.operSt,"up"))
+ subscriptions:
+
+ - id: 44
+ destination_group: 10
+ sensor_group:
+ id: 8
+ sample_interval: 2000
+
+ - id: 44
+ destination_group: 2
+ sensor_group:
+ id: 2
+ sample_interval: 2000
+
+ - id: 55
+ destination_group: 10
+ sensor_group:
+ id: 55
+ sample_interval: 2000
+
+- block:
+
+ - name: Gather Telemetry Facts Before Changes
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - telemetry
+
+ - name: Telemetry - deleted
+ register: result
+ cisco.nxos.nxos_telemetry: &id002
+ state: deleted
+
+ - assert:
+ that:
+ - result.changed == true
+ - "'no telemetry' in result.commands"
+ - result.before|dict2items|length == {{ before_keys_length }}
+
+ - assert:
+ that:
+ - (ansible_facts.network_resources.telemetry|dict2items)|symmetric_difference(result.before|dict2items)|length
+ == 0
+
+ - name: Gather Telemetry Facts After Changes
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - (ansible_facts.network_resources.telemetry|dict2items)|symmetric_difference(result.after|dict2items)|length
+ == 0
+
+ - name: Telemetry - deleted - idempotence
+ register: result
+ cisco.nxos.nxos_telemetry: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: Teardown
+ ignore_errors: true
+ cisco.nxos.nxos_feature: *id003
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_telemetry deleted
+ sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tests/common/merged.yaml
new file mode 100644
index 00000000..6d22f6e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tests/common/merged.yaml
@@ -0,0 +1,309 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_telemetry merged sanity
+ test"
+
+- set_fact: source_interface="Loopback55"
+ when: imagetag and (major_version is version_compare('9.1', 'ge'))
+
+- set_fact: command_list_length=30
+
+- set_fact: command_list_length=31
+ when: imagetag and (major_version is version_compare('9.1', 'ge'))
+
+- name: Setup
+ ignore_errors: true
+ cisco.nxos.nxos_feature: &id004
+ feature: telemetry
+ state: disabled
+
+- block:
+
+ - name: Gather Telemetry Facts Before Changes
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - telemetry
+
+ - name: Telemetry - merged
+ register: result
+ cisco.nxos.nxos_telemetry: &id002
+ state: merged
+ config:
+ certificate:
+ key: /bootflash/server.key
+ hostname: localhost
+ compression: gzip
+ source_interface: '{{source_interface|default(omit)}}'
+ vrf: management
+ destination_groups:
+
+ - id: 2
+ destination:
+ ip: 192.168.0.1
+ port: 50001
+ protocol: grpc
+ encoding: gpb
+
+ - id: 2
+ destination:
+ ip: 192.168.0.2
+ port: 60001
+ protocol: gRPC
+ encoding: GPB
+
+ - id: 10
+ destination:
+ ip: 192.168.0.1
+ port: 50001
+ protocol: Grpc
+ encoding: gPB
+
+ - id: 10
+ destination:
+ ip: 192.168.0.2
+ port: 60001
+ protocol: gRPC
+ encoding: gpb
+ sensor_groups:
+
+ - id: 8
+ data_source: NX-API
+ path:
+ name: '"show bgp l2vpn evpn summary"'
+ depth: 0
+ query_condition: foo
+ filter_condition: foo
+
+ - id: 2
+ data_source: NX-API
+ path:
+ name: '"show ip bgp neighbors"'
+ depth: unbounded
+ query_condition: foo
+ filter_condition: foo
+
+ - id: 55
+ data_source: DME
+ path:
+ name: sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]
+ depth: 0
+ query_condition: foo
+ filter_condition: foo
+
+ - id: 55
+ data_source: DME
+ path:
+ name: sys/ospf
+ depth: 0
+ query_condition: foo
+ filter_condition: or(eq(ethpmPhysIf.operSt,"down"),eq(ethpmPhysIf.operSt,"up"))
+ subscriptions:
+
+ - id: 44
+ destination_group: 10
+ sensor_group:
+ id: 8
+ sample_interval: 2000
+
+ - id: 44
+ destination_group: 2
+ sensor_group:
+ id: 2
+ sample_interval: 2000
+
+ - id: 55
+ destination_group: 10
+ sensor_group:
+ id: 55
+ sample_interval: 2000
+
+ - assert:
+ that:
+ - result.changed == true
+ - result.before|length == 0
+ - "'feature telemetry' in result.commands"
+ - "'telemetry' in result.commands"
+ - "'certificate /bootflash/server.key localhost' in result.commands"
+ - "'destination-profile' in result.commands"
+ - "'use-compression gzip' in result.commands"
+ - "'use-vrf management' in result.commands"
+ - "'destination-group 2' in result.commands"
+ - "'ip address 192.168.0.1 port 50001 protocol grpc encoding gpb' in result.commands"
+ - "'ip address 192.168.0.2 port 60001 protocol grpc encoding gpb' in result.commands"
+ - "'destination-group 10' in result.commands"
+ - "'ip address 192.168.0.1 port 50001 protocol grpc encoding gpb' in result.commands"
+ - "'ip address 192.168.0.2 port 60001 protocol grpc encoding gpb' in result.commands"
+ - "'sensor-group 8' in result.commands"
+ - "'data-source NX-API' in result.commands"
+ - result.commands is search("path .*show bgp l2vpn evpn summary.* depth
+ 0 query-condition foo filter-condition foo")
+ - "'sensor-group 2' in result.commands"
+ - "'data-source NX-API' in result.commands"
+ - result.commands is search("path .*show ip bgp neighbors.* depth unbounded
+ query-condition foo filter-condition foo")
+ - "'sensor-group 55' in result.commands"
+ - "'data-source DME' in result.commands"
+ - "'path sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]\
+ \ depth 0 query-condition foo filter-condition foo' in result.commands"
+ - "'path sys/ospf depth 0 query-condition foo filter-condition or(eq(ethpmPhysIf.operSt,\"\
+ down\"),eq(ethpmPhysIf.operSt,\"up\"))' in result.commands"
+ - "'subscription 44' in result.commands"
+ - "'dst-grp 10' in result.commands"
+ - "'dst-grp 2' in result.commands"
+ - "'snsr-grp 8 sample-interval 2000' in result.commands"
+ - "'snsr-grp 2 sample-interval 2000' in result.commands"
+ - "'subscription 55' in result.commands"
+ - "'dst-grp 10' in result.commands"
+ - "'snsr-grp 55 sample-interval 2000' in result.commands"
+ - result.commands|length == {{ command_list_length }}
+
+ - assert:
+ that:
+ - "'source-interface loopback55' in result.commands"
+ when: imagetag and (major_version is version_compare('9.1', 'ge'))
+
+ - assert:
+ that:
+ - (ansible_facts.network_resources.telemetry|dict2items)|symmetric_difference(result.before|dict2items)|length
+ == 0
+
+ - name: Gather Telemetry Facts After Changes
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - (ansible_facts.network_resources.telemetry|dict2items)|symmetric_difference(result.after|dict2items)|length
+ == 0
+
+ - name: Telemetry - merged - idempotence
+ register: result
+ cisco.nxos.nxos_telemetry: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+
+ - name: Telemetry - change values
+ register: result
+ cisco.nxos.nxos_telemetry: &id003
+ state: merged
+ config:
+ certificate:
+ key: /bootflash/local_server.key
+ hostname: localhost
+ compression: gzip
+ source_interface: '{{source_interface|default(omit)}}'
+ vrf: management
+ destination_groups:
+
+ - id: 2
+ destination:
+ ip: 192.168.0.1
+ port: 50001
+ protocol: grpc
+ encoding: gpb
+
+ - id: 2
+ destination:
+ ip: 192.168.0.2
+ port: 60001
+ protocol: gRPC
+ encoding: GPB
+
+ - id: 10
+ destination:
+ ip: 192.168.0.1
+ port: 50001
+ protocol: Grpc
+ encoding: gPB
+
+ - id: 10
+ destination:
+ ip: 192.168.0.2
+ port: 60001
+ protocol: gRPC
+ encoding: gpb
+ sensor_groups:
+
+ - id: 8
+ data_source: NX-API
+ path:
+ name: '"show bgp l2vpn evpn summary"'
+ depth: 0
+ query_condition: foo
+ filter_condition: foo
+
+ - id: 2
+ data_source: NX-API
+ path:
+ name: '"show ip bgp neighbors"'
+ depth: unbounded
+ query_condition: foo
+ filter_condition: foo
+
+ - id: 55
+ data_source: DME
+ path:
+ name: sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]
+ depth: 0
+ query_condition: foo
+ filter_condition: foo
+
+ - id: 55
+ data_source: DME
+ path:
+ name: sys/ospf
+ depth: 0
+ query_condition: foo
+ filter_condition: or(eq(ethpmPhysIf.operSt,"down"),eq(ethpmPhysIf.operSt,"up"))
+ subscriptions:
+
+ - id: 44
+ destination_group: 10
+ sensor_group:
+ id: 8
+ sample_interval: 1000
+
+ - id: 44
+ destination_group: 2
+ sensor_group:
+ id: 2
+ sample_interval: 2000
+
+ - id: 55
+ destination_group: 10
+ sensor_group:
+ id: 55
+ sample_interval: 2000
+
+ - set_fact:
+ test_list:
+ - telemetry
+ - certificate /bootflash/local_server.key localhost
+ - subscription 44
+ - snsr-grp 8 sample-interval 1000
+
+ - assert:
+ that:
+ - result.changed == true
+ - test_list|symmetric_difference(result.commands)|length == 0
+
+ - name: Telemetry - change values - idempotent
+ register: result
+ cisco.nxos.nxos_telemetry: *id003
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: Teardown
+ ignore_errors: true
+ cisco.nxos.nxos_feature: *id004
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_telemetry merged
+ sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tests/common/replaced.yaml
new file mode 100644
index 00000000..daa7e354
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_telemetry/tests/common/replaced.yaml
@@ -0,0 +1,166 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_telemetry replaced
+ sanity test"
+
+- set_fact: source_interface="Loopback55"
+ when: imagetag and (major_version is version_compare('9.1', 'ge'))
+
+- set_fact: command_list_length=27
+
+- set_fact: command_list_length=28
+ when: imagetag and (major_version is version_compare('9.1', 'ge'))
+
+- set_fact: dict_facts_length=6
+
+- set_fact: dict_facts_length=7
+ when: imagetag and (major_version is version_compare('9.1', 'ge'))
+
+- name: Setup - disable feature telemetry
+ ignore_errors: true
+ cisco.nxos.nxos_feature: &id003
+ feature: telemetry
+ state: disabled
+
+- name: Setup - enable feature telemetry
+ cisco.nxos.nxos_feature:
+ feature: telemetry
+ state: enabled
+
+- name: Setup - add initial telemetry config
+ cisco.nxos.nxos_config:
+ src: populate_config.cfg
+
+- name: Setup - add initial source-interface telemetry config
+ when: imagetag and (major_version is version_compare('9.1', 'ge'))
+ cisco.nxos.nxos_config:
+ lines:
+ - "telemetry"
+ - " destination-profile"
+ - " source-interface loopback55"
+
+- block:
+
+ - name: Gather Telemetry Facts Before Changes
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - telemetry
+
+ - name: Telemetry - replaced
+ register: result
+ cisco.nxos.nxos_telemetry: &id002
+ state: replaced
+ config:
+ certificate:
+ key: /file_dir/new_server.key
+ hostname: newhost.example.com
+ vrf: management
+ compression: gzip
+ destination_groups:
+
+ - id: 2
+ destination:
+ ip: 192.168.0.1
+ port: 65001
+ protocol: grpc
+ encoding: gpb
+
+ - id: 2
+ destination:
+ ip: 192.168.0.3
+ port: 55001
+ protocol: grpc
+ encoding: gpb
+ sensor_groups:
+
+ - id: 100
+ data_source: NX-API
+ path:
+ name: '"show bgp l2vpn evpn summary"'
+ depth: unbounded
+ query_condition: foo
+ filter_condition: foo
+ subscriptions:
+
+ - id: 99
+ destination_group: 2
+ sensor_group:
+ id: 100
+ sample_interval: 2000
+
+ - assert:
+ that:
+ - result.changed == true
+ - result.before|length == {{ dict_facts_length }}
+ - result.before.certificate|length == 2
+ - result.before.destination_groups|length == 7
+ - result.before.sensor_groups|length == 8
+ - result.before.subscriptions|length == 10
+ - "'telemetry' in result.commands"
+ - "'no subscription 55' in result.commands"
+ - "'subscription 99' in result.commands"
+ - "'no dst-grp 99' in result.commands"
+ - "'no snsr-grp 8 sample-interval 90000' in result.commands"
+ - "'no snsr-grp 77 sample-interval 2000' in result.commands"
+ - "'no subscription 44' in result.commands"
+ - "'no sensor-group 55' in result.commands"
+ - "'no sensor-group 8' in result.commands"
+ - "'no sensor-group 2' in result.commands"
+ - "'no sensor-group 77' in result.commands"
+ - "'no destination-group 99' in result.commands"
+ - "'no destination-group 10' in result.commands"
+ - "'destination-group 2' in result.commands"
+ - "'no ip address 192.168.0.1 port 50001 protocol grpc encoding gpb' in\
+ \ result.commands"
+ - "'no ip address 192.168.0.2 port 60001 protocol grpc encoding gpb' in\
+ \ result.commands"
+ - "'destination-group 2' in result.commands"
+ - "'ip address 192.168.0.1 port 65001 protocol grpc encoding gpb' in result.commands"
+ - "'ip address 192.168.0.3 port 55001 protocol grpc encoding gpb' in result.commands"
+ - "'sensor-group 100' in result.commands"
+ - result.commands is search("path .*show bgp l2vpn evpn summary.* depth
+ unbounded query-condition foo filter-condition foo")
+ - "'data-source NX-API' in result.commands"
+ - "'subscription 99' in result.commands"
+ - "'snsr-grp 100 sample-interval 2000' in result.commands"
+ - "'certificate /file_dir/new_server.key newhost.example.com' in result.commands"
+ - "'destination-profile' in result.commands"
+ - "'use-vrf management' in result.commands"
+ - result.commands|length == {{ command_list_length }}
+
+ - assert:
+ that:
+ - "'no source-interface loopback55' in result.commands"
+ when: imagetag and (major_version is version_compare('9.1', 'ge'))
+
+ - assert:
+ that:
+ - (ansible_facts.network_resources.telemetry|dict2items)|symmetric_difference(result.before|dict2items)|length
+ == 0
+
+ - name: Gather Telemetry Facts After Changes
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - (ansible_facts.network_resources.telemetry|dict2items)|symmetric_difference(result.after|dict2items)|length
+ == 0
+
+ - name: Telemetry - replaced - idempotence
+ register: result
+ cisco.nxos.nxos_telemetry: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: Teardown
+ ignore_errors: true
+ cisco.nxos.nxos_feature: *id003
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_telemetry replaced
+ sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tests/common/sanity.yaml
new file mode 100644
index 00000000..88f8c401
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld/tests/common/sanity.yaml
@@ -0,0 +1,95 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_udld sanity test"
+
+- set_fact: udld_run="true"
+
+- set_fact: udld_run="false"
+ when: ((platform is search('N9K-F')) and (imagetag and (imagetag is version_compare('F3',
+ 'lt'))))
+
+- set_fact: udld_run="false"
+ when: titanium
+
+- block:
+
+ - name: Enable feature udld
+ cisco.nxos.nxos_feature:
+ feature: udld
+ state: enabled
+
+ - name: Configure udld
+ register: result
+ cisco.nxos.nxos_udld: &id001
+ aggressive: enabled
+ msg_time: 20
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_udld: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Reset udld
+ cisco.nxos.nxos_udld:
+ reset: true
+
+ - name: Configure udld2
+ register: result
+ cisco.nxos.nxos_udld: &id003
+ aggressive: disabled
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_udld: *id003
+
+ - assert: *id004
+
+ - name: Configure udld3
+ register: result
+ cisco.nxos.nxos_udld: &id005
+ msg_time: default
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_udld: *id005
+
+ - assert: *id004
+
+ - name: Configure udld again
+ register: result
+ cisco.nxos.nxos_udld: *id001
+
+ - assert: *id002
+
+ - name: Remove udld config
+ register: result
+ cisco.nxos.nxos_udld: &id006
+ state: absent
+
+ - assert: *id002
+
+ - name: Check Idempotence
+ register: result
+ cisco.nxos.nxos_udld: *id006
+
+ - assert: *id004
+ when: udld_run
+ always:
+
+ - name: Disable udld
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: udld
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_udld sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tests/common/sanity.yaml
new file mode 100644
index 00000000..ed1b46bc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_udld_interface/tests/common/sanity.yaml
@@ -0,0 +1,113 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_udld_interface sanity
+ test"
+
+- set_fact: udld_run="true"
+
+- set_fact: udld_enable="true"
+
+- set_fact: udld_run="false"
+ when: ((platform is search('N9K-F')) and (imagetag and (imagetag is version_compare('F3',
+ 'lt'))))
+
+- set_fact: udld_run="false"
+ when: titanium
+
+- set_fact: udld_enable="false"
+ when: imagetag and (imagetag is version_compare('N1', 'eq'))
+
+- set_fact: intname="{{ nxos_int1 }}"
+
+- block:
+
+ - name: Enable feature udld
+ cisco.nxos.nxos_feature:
+ feature: udld
+ state: enabled
+
+ - name: put the interface into default state
+ cisco.nxos.nxos_config:
+ commands:
+ - default interface {{intname}}
+ match: none
+
+ - name: ensure interface is configured to be in aggressive mode
+ register: result
+ cisco.nxos.nxos_udld_interface: &id001
+ interface: '{{ intname }}'
+ mode: aggressive
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf1 Idempotence
+ register: result
+ cisco.nxos.nxos_udld_interface: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - block:
+
+ - name: ensure interface has mode enabled
+ register: result
+ cisco.nxos.nxos_udld_interface: &id003
+ interface: '{{ intname }}'
+ mode: enabled
+ state: present
+
+ - assert: *id002
+
+ - name: Conf2 Idempotence
+ register: result
+ cisco.nxos.nxos_udld_interface: *id003
+
+ - assert: *id004
+
+ - name: ensure interface has mode aggressive
+ register: result
+ cisco.nxos.nxos_udld_interface: *id001
+
+ - assert: *id002
+
+ - name: Conf1 Idempotence
+ register: result
+ cisco.nxos.nxos_udld_interface: *id001
+
+ - assert: *id004
+
+ - name: ensure interface has mode disabled
+ register: result
+ cisco.nxos.nxos_udld_interface: &id005
+ interface: '{{ intname }}'
+ mode: disabled
+ state: present
+
+ - assert: *id002
+
+ - name: Conf3 Idempotence
+ register: result
+ cisco.nxos.nxos_udld_interface: *id005
+
+ - assert: *id004
+ when: udld_enable
+
+ - name: Remove the config
+ cisco.nxos.nxos_udld_interface:
+ interface: '{{ intname }}'
+ mode: enabled
+ state: absent
+ when: udld_run
+ always:
+
+ - name: Disable udld
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: udld
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_udld_interface sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/meta/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/meta/main.yaml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/meta/main.yaml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/auth.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/auth.yaml
new file mode 100644
index 00000000..b182282b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/auth.yaml
@@ -0,0 +1,39 @@
+---
+- block:
+
+ - name: Create user with password
+ cisco.nxos.nxos_user:
+ name: auth_user
+ role: network-operator
+ state: present
+ configured_password: pasS!123
+
+ - name: test login
+ expect:
+ command: ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port|default(22)
+ }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=no
+ show version
+ responses:
+ (?i)password: pasS!123
+
+ - name: test login with invalid password (should fail)
+ expect:
+ command: ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_ssh_port|default(22)
+ }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=no
+ show version
+ responses:
+ (?i)password: badpass
+ ignore_errors: true
+ register: results
+
+ - name: check that attempt failed
+ assert:
+ that:
+ - results.failed
+ always:
+
+ - name: delete user
+ register: result
+ cisco.nxos.nxos_user:
+ name: auth_user
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/basic.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/basic.yaml
new file mode 100644
index 00000000..ce86b05d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/basic.yaml
@@ -0,0 +1,143 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_user basic test"
+
+- name: Remove old entries of user
+ cisco.nxos.nxos_user: &rem
+ aggregate:
+
+ - name: ansibletest1
+
+ - name: ansibletest2
+
+ - name: ansibletest3
+
+ - name: ansibletest_failed
+
+ - name: ansibletest_warn
+
+ - name: ansibletest_role
+ state: absent
+
+- name: Create user
+ register: result
+ cisco.nxos.nxos_user:
+ name: ansibletest1
+ roles: network-operator
+ state: present
+
+- debug: msg="{{result}}"
+
+- assert:
+ that:
+ - result.changed == true
+ - '"username" in result.commands[0]'
+ - '"role network-operator" in result.commands[0]'
+
+- name: Collection of users
+ register: result
+ cisco.nxos.nxos_user:
+ aggregate:
+
+ - name: ansibletest2
+
+ - name: ansibletest3
+ state: present
+ roles: network-admin
+
+- assert:
+ that:
+ - result.changed == true
+
+- cisco.nxos.nxos_command:
+ commands: show password strength-check
+ register: pwd
+
+- set_fact:
+ pwdchck: "{{ True if pwd is search('enabled') else False }}"
+
+- name: Enable password check (if disabled by default) for failure test
+ cisco.nxos.nxos_config: &enable
+ lines: password strength-check
+ when: not pwdchck
+
+- name: Attempt to create user with weak password with pwd check enabled (SHOULD FAIL)
+ cisco.nxos.nxos_user:
+ name: ansibletest_failed
+ configured_password: abc
+ register: result
+ ignore_errors: True
+
+- assert:
+ that:
+ - result.failed == True
+ - result.msg is search('Wrong Password')
+
+- name: Disable password check (will be always enabled at this stage) for warnings test
+ cisco.nxos.nxos_config:
+ lines: no password strength-check
+
+- name: Attempt to create user with weak password without pwd check enabled (SHOULD WARN)
+ cisco.nxos.nxos_user:
+ name: ansibletest_warn
+ configured_password: abc
+ register: result
+
+- assert:
+ that:
+ - result.changed == True
+ - result.failed == False
+ - '"Minimum recommended length of 8 characters" in result.warnings[1]'
+ - '"Password should contain characters from at least three of the following classes:" in result.warnings[2]'
+ - '"it is WAY too short" in result.warnings[3]'
+ - '"Configuration accepted because password strength check is disabled" in result.warnings[4]'
+
+- name: Enable password check (if that was the default)
+ cisco.nxos.nxos_config: *enable
+ when: pwdchck
+
+- name: Create a custom role
+ cisco.nxos.nxos_config:
+ lines:
+ - role name customrole
+
+- name: Attempt to create a user with a valid custom role
+ cisco.nxos.nxos_user:
+ name: ansibletest_role
+ role: customrole
+ state: present
+ register: result
+
+- assert:
+ that:
+ - result.changed == True
+ - result.failed == False
+ - '"username ansibletest_role role customrole" in result.commands'
+
+- name: Attempt to create user with invalid role (should fail)
+ cisco.nxos.nxos_user:
+ name: ansibletest_role
+ role: invalid_role
+ state: present
+ register: result
+ ignore_errors: True
+
+- assert:
+ that:
+ - result.failed == True
+ - '"invalid role specified" in result.msg'
+
+- name: tearDown
+ register: result
+ cisco.nxos.nxos_user: *rem
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no username" in result.commands[0]'
+
+- name: Delete custom role
+ cisco.nxos.nxos_config:
+ lines:
+ - no role name customrole
+
+- debug: msg="END connection={{ ansible_connection }} nxos_user basic test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/net_user.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/net_user.yaml
new file mode 100644
index 00000000..fe86710b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/net_user.yaml
@@ -0,0 +1,27 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos common/net_user.yaml"
+
+- name: Remove old entries of user - setup
+ ansible.netcommon.net_user:
+ name: ansibletest1
+ state: absent
+
+- name: Create user with platform agnostic module
+ register: result
+ ansible.netcommon.net_user:
+ name: ansibletest1
+ roles: network-operator
+ state: present
+
+- assert:
+ that:
+ - result.changed == true
+ - '"username" in result.commands[0]'
+ - '"role network-operator" in result.commands[0]'
+
+- name: teardown
+ ansible.netcommon.net_user:
+ name: ansibletest1
+ state: absent
+
+- debug: msg="END connection={{ ansible_connection }} nxos common/net_user.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/sanity.yaml
new file mode 100644
index 00000000..d48439b8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_user/tests/common/sanity.yaml
@@ -0,0 +1,99 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_user parameter test"
+
+- set_fact: idem="true"
+
+- set_fact: idem="false"
+ when: ((platform is search('N7K')) and (imagetag and (imagetag is version_compare('D1',
+ 'eq'))))
+
+- block:
+
+ - name: Create user
+ register: result
+ cisco.nxos.nxos_user: &id001
+ name: netend
+ configured_password: Hello!23$
+ update_password: on_create
+ roles: network-operator
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - block:
+
+ - name: conf idempotency
+ register: result
+ cisco.nxos.nxos_user: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+ when: idem
+
+ - name: Remove user
+ register: result
+ cisco.nxos.nxos_user: &id003
+ name: netend
+ state: absent
+
+ - assert: *id002
+
+ - name: remove idempotency
+ register: result
+ cisco.nxos.nxos_user: *id003
+
+ - assert: *id004
+
+ - debug: msg="skipping sshkey test as the key needs to be created on the server
+ first"
+
+ - name: Collection of users
+ register: result
+ cisco.nxos.nxos_user: &id005
+ users:
+
+ - name: test1
+
+ - name: test2
+ configured_password: Hello!23$
+ update_password: on_create
+ state: present
+ roles:
+ - network-admin
+ - network-operator
+
+ - assert: *id002
+
+ - block:
+
+ - name: users idempotency
+ register: result
+ cisco.nxos.nxos_user: *id005
+
+ - assert: *id004
+ when: idem
+
+ - name: tearDown
+ register: result
+ cisco.nxos.nxos_user: &id006
+ name: '{{ ansible_user }}'
+ purge: true
+
+ - assert: *id002
+
+ - name: teardown idempotency
+ register: result
+ cisco.nxos.nxos_user: *id006
+
+ - assert: *id004
+ always:
+
+ - name: tearDown
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_user: *id006
+
+- debug: msg="END connection={{ ansible_connection }} nxos_user parameter test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tests/common/agg.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tests/common/agg.yaml
new file mode 100644
index 00000000..dedc1b61
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tests/common/agg.yaml
@@ -0,0 +1,123 @@
+---
+- debug: msg="START connection={{ ansible_connection }}/agg.yaml"
+
+- name: setup - remove vlan used in test
+ ignore_errors: true
+ cisco.nxos.nxos_config: &id005
+ lines:
+ - no vlan 102
+ - no vlan 103
+ - no vlan 104
+
+- name: configure vlan with aggregate
+ register: result
+ cisco.nxos.nxos_vlan: &id001
+ aggregate:
+
+ - name: app02
+ vlan_id: 102
+
+ - name: app03
+ vlan_id: 103
+ vlan_state: active
+ admin_state: up
+
+- assert:
+ that:
+ - result.changed == true
+ - '"vlan 102" in result.commands'
+ - '"vlan 103" in result.commands'
+ - '"no shutdown" in result.commands'
+ - '"state active" in result.commands'
+
+- name: conf1 - Idempotence
+ register: result
+ cisco.nxos.nxos_vlan: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: change property of existing vlan - admin_state down
+ register: result
+ cisco.nxos.nxos_vlan: &id002
+ aggregate:
+
+ - name: app02
+ vlan_id: 102
+
+ - name: app03
+ vlan_id: 103
+ vlan_state: active
+ admin_state: down
+
+- assert:
+ that:
+ - result.changed == true
+ - '"vlan 102" in result.commands'
+ - '"vlan 103" in result.commands'
+ - '"shutdown" in result.commands'
+
+- name: conf2 - Idempotence
+ register: result
+ cisco.nxos.nxos_vlan: *id002
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: purge
+ register: result
+ cisco.nxos.nxos_vlan: &id003
+ vlan_id: 1
+ purge: true
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no vlan 102" in result.commands'
+ - '"no vlan 103" in result.commands'
+
+- name: purge - Idempotence
+ register: result
+ cisco.nxos.nxos_vlan: *id003
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: setup for purge test with aggregate add
+ cisco.nxos.nxos_vlan:
+ vlan_id: 104
+ purge: true
+
+- name: purge 104 with aggregate add 102-103
+ register: result
+ cisco.nxos.nxos_vlan: &id004
+ aggregate:
+
+ - vlan_id: 102
+
+ - vlan_id: 103
+ purge: true
+
+- assert:
+ that:
+ - result.changed == true
+ - '"vlan 102" in result.commands'
+ - '"vlan 103" in result.commands'
+ - '"no vlan 104" in result.commands'
+
+- name: purge_add - Idempotence
+ register: result
+ cisco.nxos.nxos_vlan: *id004
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown
+ ignore_errors: true
+ cisco.nxos.nxos_config: *id005
+
+- debug: msg="END connection={{ ansible_connection }}/agg.yaml"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tests/common/interface.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tests/common/interface.yaml
new file mode 100644
index 00000000..2191cc77
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tests/common/interface.yaml
@@ -0,0 +1,125 @@
+---
+- set_fact: testint1="{{ nxos_int1 }}"
+
+- set_fact: testint2="{{ nxos_int2 }}"
+
+- name: setup - remove vlan used in test
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no vlan 100
+
+- name: setup - remove vlan from interfaces used in test(part1)
+ cisco.nxos.nxos_config:
+ lines:
+ - no switchport access vlan 100
+ parents: switchport
+ before: interface {{ testint1 }}
+
+- name: setup - remove vlan from interfaces used in test(part2)
+ cisco.nxos.nxos_config:
+ lines:
+ - no switchport access vlan 100
+ parents: switchport
+ before: interface {{ testint2 }}
+
+- name: create vlan
+ cisco.nxos.nxos_vlan:
+ vlan_id: 100
+
+- name: Add interfaces to vlan and check intent (config + intent)
+ register: result
+ cisco.nxos.nxos_vlan: &id001
+ vlan_id: 100
+ interfaces:
+ - '{{ testint1 }}'
+ - '{{ testint2 }}'
+ associated_interfaces:
+ - '{{ testint1 }}'
+ - '{{ testint2 }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ testint1 }}" in result.commands'
+ - '"switchport" in result.commands'
+ - '"switchport mode access" in result.commands'
+ - '"switchport access vlan 100" in result.commands'
+ - '"interface {{ testint2 }}" in result.commands'
+ - '"switchport" in result.commands'
+ - '"switchport mode access" in result.commands'
+ - '"switchport access vlan 100" in result.commands'
+
+- name: Add interfaces to vlan(idempotence)
+ register: result
+ cisco.nxos.nxos_vlan: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Check interfaces intent
+ register: result
+ cisco.nxos.nxos_vlan:
+ vlan_id: 100
+ associated_interfaces:
+ - '{{ testint1 }}'
+ - '{{ testint2 }}'
+
+- assert:
+ that:
+ - result.failed == false
+
+- name: Check interfaces intent fail
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_vlan:
+ vlan_id: 100
+ associated_interfaces:
+ - test
+
+- assert:
+ that:
+ - result.failed == True
+
+- name: Remove interface from vlan
+ register: result
+ cisco.nxos.nxos_vlan: &id002
+ vlan_id: 100
+ interfaces:
+ - '{{ testint2 }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ testint1 }}" in result.commands'
+ - '"switchport" in result.commands'
+ - '"switchport mode access" in result.commands'
+ - '"no switchport access vlan 100" in result.commands'
+
+- name: Remove interface from vlan(idempotence)
+ register: result
+ cisco.nxos.nxos_vlan: *id002
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: teardown(part1)
+ cisco.nxos.nxos_config:
+ lines:
+ - no vlan 100
+
+- name: teardown - remove vlan from interfaces used in test(part1)
+ cisco.nxos.nxos_config:
+ lines:
+ - no switchport access vlan 100
+ parents: switchport
+ before: interface {{ testint1 }}
+
+- name: teardown - remove vlan from interfaces used in test(part2)
+ cisco.nxos.nxos_config:
+ lines:
+ - no switchport access vlan 100
+ parents: switchport
+ before: interface {{ testint2 }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tests/common/sanity.yaml
new file mode 100644
index 00000000..82799b1b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlan/tests/common/sanity.yaml
@@ -0,0 +1,226 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vlan sanity test"
+
+- set_fact: testint1="{{ nxos_int1 }}"
+
+- set_fact: testint2="{{ nxos_int2 }}"
+
+- block:
+
+ - name: Install and Enable FabricPath feature set
+ when: platform is search('N5K|N7K')
+ cisco.nxos.nxos_config:
+ lines:
+ - install feature-set fabricpath
+ - feature-set fabricpath
+
+ - name: Enable feature vn segment
+ when: platform is search('N9K')
+ cisco.nxos.nxos_config:
+ commands:
+ - feature vn-segment-vlan-based
+ match: none
+
+ - name: vlan teardown
+ ignore_errors: true
+ cisco.nxos.nxos_vlan: &id013
+ vlan_range: 2-200
+ state: absent
+
+ - name: Ensure a range of VLANs are present on the switch
+ register: result
+ cisco.nxos.nxos_vlan: &id001
+ vlan_range: 2-10,20,50,55-60,100-150
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Vlan Idempotence
+ register: result
+ cisco.nxos.nxos_vlan: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Ensure VLAN 50 exists with the name WEB and is in the shutdown state
+ register: result
+ when: platform is search('N9K')
+ cisco.nxos.nxos_vlan: &id003
+ vlan_id: 50
+ vlan_state: suspend
+ admin_state: down
+ name: WEB
+ mapped_vni: 5555
+
+ - assert: *id002
+ when: platform is search('N9K')
+
+ - name: web1 Idempotence
+ register: result
+ when: platform is search('N9K')
+ cisco.nxos.nxos_vlan: *id003
+
+ - assert: *id004
+ when: platform is search('N9K')
+
+ - name: change name and vni to default
+ register: result
+ when: platform is search('N9K')
+ cisco.nxos.nxos_vlan: &id005
+ vlan_id: 50
+ vlan_state: active
+ admin_state: up
+ name: default
+ mapped_vni: default
+
+ - assert: *id002
+ when: platform is search('N9K')
+
+ - name: web2 Idempotence
+ register: result
+ when: platform is search('N9K')
+ cisco.nxos.nxos_vlan: *id005
+
+ - assert: *id004
+ when: platform is search('N9K')
+
+ - name: Ensure VLAN 50 exists with the name WEB and is in the shutdown state
+ register: result
+ when: platform is search('N3K|N7K')
+ cisco.nxos.nxos_vlan: &id006
+ vlan_id: 50
+ vlan_state: suspend
+ admin_state: down
+ name: WEB
+
+ - assert: *id002
+ when: platform is search('N3K|N7K')
+
+ - name: web3 Idempotence
+ register: result
+ when: platform is search('N3K|N7K')
+ cisco.nxos.nxos_vlan: *id006
+
+ - assert: *id004
+ when: platform is search('N3K|N7K')
+
+ - name: Change name to default
+ register: result
+ when: platform is search('N3K|N7K')
+ cisco.nxos.nxos_vlan: &id007
+ vlan_id: 50
+ vlan_state: active
+ admin_state: up
+ name: default
+
+ - assert: *id002
+ when: platform is search('N3K|N7K')
+
+ - name: web4 Idempotence
+ register: result
+ when: platform is search('N3K|N7K')
+ cisco.nxos.nxos_vlan: *id007
+
+ - assert: *id004
+ when: platform is search('N3K|N7K')
+
+ - name: Change mode
+ register: result
+ when: platform is search('N5K|N7K')
+ cisco.nxos.nxos_vlan: &id008
+ vlan_id: 50
+ mode: fabricpath
+
+ - assert: *id002
+ when: platform is search('N5K|N7K')
+
+ - name: mode1 Idempotence
+ register: result
+ when: platform is search('N5K|N7K')
+ cisco.nxos.nxos_vlan: *id008
+
+ - assert: *id004
+ when: platform is search('N5K|N7K')
+
+ - name: Change mode again
+ register: result
+ when: platform is search('N5K|N7K')
+ cisco.nxos.nxos_vlan: &id009
+ vlan_id: 50
+ mode: ce
+
+ - assert: *id002
+ when: platform is search('N5K|N7K')
+
+ - name: mode2 Idempotence
+ register: result
+ when: platform is search('N5K|N7K')
+ cisco.nxos.nxos_vlan: *id009
+
+ - assert: *id004
+ when: platform is search('N5K|N7K')
+
+ - name: Ensure VLAN is NOT on the device
+ register: result
+ cisco.nxos.nxos_vlan: &id010
+ vlan_id: 50
+ state: absent
+
+ - assert: *id002
+
+ - name: no vlan Idempotence
+ register: result
+ cisco.nxos.nxos_vlan: *id010
+
+ - assert: *id004
+
+ - name: Add interfaces to vlan
+ register: result
+ cisco.nxos.nxos_vlan: &id011
+ vlan_id: 101
+ vlan_state: suspend
+ interfaces:
+ - '{{ testint1 }}'
+ - '{{ testint2 }}'
+
+ - assert: *id002
+
+ - name: Addint idempotence
+ register: result
+ cisco.nxos.nxos_vlan: *id011
+
+ - assert: *id004
+
+ - name: Remove interfaces from vlan
+ register: result
+ cisco.nxos.nxos_vlan: &id012
+ vlan_id: 101
+ interfaces: default
+
+ - assert: *id002
+
+ - name: Remint idempotence
+ register: result
+ cisco.nxos.nxos_vlan: *id012
+
+ - assert: *id004
+ always:
+
+ - name: Remove int from vlan
+ ignore_errors: true
+ cisco.nxos.nxos_vlan: *id012
+
+ - name: vlan teardown final
+ ignore_errors: true
+ cisco.nxos.nxos_vlan: *id013
+
+ - name: Disable feature vn segement
+ ignore_errors: true
+ when: platform is search('N9K')
+ cisco.nxos.nxos_feature:
+ feature: vn-segment-vlan-based
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vlan sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/defaults/main.yaml
new file mode 100644
index 00000000..2a2672be
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '[^_].*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/fixtures/parsed.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/fixtures/parsed.cfg
new file mode 100644
index 00000000..8d3631d2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/fixtures/parsed.cfg
@@ -0,0 +1,67 @@
+{
+ "TABLE_vlanbrief": {
+ "ROW_vlanbrief": [
+ {
+ "vlanshowbr-vlanid": "1",
+ "vlanshowbr-vlanid-utf": "1",
+ "vlanshowbr-vlanname": "default",
+ "vlanshowbr-vlanstate": "active",
+ "vlanshowbr-shutstate": "noshutdown"
+ },
+ {
+ "vlanshowbr-vlanid": "5",
+ "vlanshowbr-vlanid-utf": "5",
+ "vlanshowbr-vlanname": "vlan5",
+ "vlanshowbr-vlanstate": "suspend",
+ "vlanshowbr-shutstate": "noshutdown"
+ },
+ {
+ "vlanshowbr-vlanid": "6",
+ "vlanshowbr-vlanid-utf": "6",
+ "vlanshowbr-vlanname": "VLAN0006",
+ "vlanshowbr-vlanstate": "active",
+ "vlanshowbr-shutstate": "noshutdown"
+ },
+ {
+ "vlanshowbr-vlanid": "7",
+ "vlanshowbr-vlanid-utf": "7",
+ "vlanshowbr-vlanname": "vlan7",
+ "vlanshowbr-vlanstate": "active",
+ "vlanshowbr-shutstate": "noshutdown"
+ }
+ ]
+ },
+ "TABLE_mtuinfo": {
+ "ROW_mtuinfo": [
+ {
+ "vlanshowinfo-vlanid": "1",
+ "vlanshowinfo-media-type": "enet",
+ "vlanshowinfo-vlanmode": "ce-vlan"
+ },
+ {
+ "vlanshowinfo-vlanid": "5",
+ "vlanshowinfo-media-type": "enet",
+ "vlanshowinfo-vlanmode": "ce-vlan"
+ },
+ {
+ "vlanshowinfo-vlanid": "6",
+ "vlanshowinfo-media-type": "enet",
+ "vlanshowinfo-vlanmode": "ce-vlan"
+ },
+ {
+ "vlanshowinfo-vlanid": "7",
+ "vlanshowinfo-media-type": "enet",
+ "vlanshowinfo-vlanmode": "ce-vlan"
+ }
+ ]
+ }
+}
+
+
+vlan 1,5-7
+vlan 5
+ state suspend
+ name vlan5
+vlan 7
+ name vlan7
+ vn-segment 100
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/meta/main.yml
new file mode 100644
index 00000000..23d65c7e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/meta/main.yml
@@ -0,0 +1,2 @@
+---
+dependencies: []
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tasks/cli.yaml
new file mode 100644
index 00000000..073787b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ use_regex: True
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/_populate_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/_populate_config.yaml
new file mode 100644
index 00000000..47adc63a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/_populate_config.yaml
@@ -0,0 +1,13 @@
+- name: Populate config
+ cisco.nxos.nxos_config:
+ lines:
+ - "feature vn-segment-vlan-based"
+ - "vlan 5"
+ - "name vlan5"
+ - "state suspend"
+ - "vlan 6"
+ - "state active"
+ - "vlan 7"
+ - "name vlan7"
+ - "vn-segment 190"
+ - "shutdown"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/_remove_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/_remove_config.yaml
new file mode 100644
index 00000000..9dba2816
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/_remove_config.yaml
@@ -0,0 +1,6 @@
+- name: Remove Config
+ cisco.nxos.nxos_config:
+ lines:
+ - "no vlan 2-100"
+ - "no feature vn-segment-vlan-based"
+ ignore_errors: True
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/deleted.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/deleted.yaml
new file mode 100644
index 00000000..d0daa3b9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/deleted.yaml
@@ -0,0 +1,53 @@
+---
+- debug:
+ msg: Start nxos_vlans deleted integration tests connection={{ ansible_connection
+ }}
+
+- name: setup
+ cisco.nxos.nxos_config:
+ lines:
+ - "no vlan 2-100"
+ - "vlan 5"
+ - "vlan 6"
+
+- block:
+
+ - name: Gather vlans facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: vlans
+
+ - name: deleted
+ register: result
+ cisco.nxos.nxos_vlans: &id001
+ config:
+ - vlan_id: 5
+ - vlan_id: 6
+ state: deleted
+
+ - assert:
+ that:
+ - result.before|length == ansible_facts.network_resources.vlans|length
+ - result.after|length == 1
+ - result.changed == true
+ - "'no vlan 5' in result.commands"
+ - "'no vlan 6' in result.commands"
+ - result.commands|length == 2
+
+ - name: Idempotence - deleted
+ register: result
+ cisco.nxos.nxos_vlans: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config:
+ lines:
+ - "no vlan 5"
+ - "no vlan 6"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/empty_config.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/empty_config.yaml
new file mode 100644
index 00000000..11680d9c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/empty_config.yaml
@@ -0,0 +1,62 @@
+---
+- debug:
+ msg: START nxos_vlans empty_config integration tests on connection={{ ansible_connection }}
+
+- name: Merged with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_vlans:
+ config:
+ state: merged
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state merged'
+
+- name: Replaced with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_vlans:
+ config:
+ state: replaced
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state replaced'
+
+- name: Overridden with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_vlans:
+ config:
+ state: overridden
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state overridden'
+
+- name: Rendered with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_vlans:
+ config:
+ state: rendered
+
+- assert:
+ that:
+ - result.msg == 'value of config parameter must not be empty for state rendered'
+
+
+- name: Parsed with empty config should give appropriate error message
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_vlans:
+ running_config:
+ state: parsed
+
+- assert:
+ that:
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
+
+- debug:
+ msg: END nxos_vlans empty_config integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/gathered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/gathered.yaml
new file mode 100644
index 00000000..ce7474c6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/gathered.yaml
@@ -0,0 +1,26 @@
+---
+- debug:
+ msg: START nxos_vlans gathered integration tests on connection={{ ansible_connection
+ }}
+
+- include_tasks: _remove_config.yaml
+
+- include_tasks: _populate_config.yaml
+
+- block:
+
+ - name: Gather vlans facts from the device using nxos_vlans
+ register: result
+ cisco.nxos.nxos_vlans:
+ state: gathered
+
+ - assert:
+ that: "{{ result['gathered'] | symmetric_difference(gathered)\
+ \ |length == 0 }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+ - debug:
+ msg: END nxos_vlans gathered integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/merged.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/merged.yaml
new file mode 100644
index 00000000..8a2669e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/merged.yaml
@@ -0,0 +1,60 @@
+---
+- debug:
+ msg: Start nxos_vlans merged integration tests connection={{ ansible_connection
+ }}
+
+- name: setup
+ cisco.nxos.nxos_config: &id002
+ lines:
+ - "no vlan 2-100"
+
+- block:
+
+ - name: Merged
+ register: result
+ cisco.nxos.nxos_vlans: &id001
+ config:
+
+ - vlan_id: 5
+ name: vlan5
+
+ - vlan_id: 6
+ name: vlan6
+ state: suspend
+ state: merged
+
+ - assert:
+ that:
+ - result.changed == true
+ # default vlan
+ - result.before|length == 1
+ - "'vlan 5' in result.commands"
+ - "'name vlan5' in result.commands"
+ - "'vlan 6' in result.commands"
+ - "'name vlan6' in result.commands"
+ - "'state suspend' in result.commands"
+ - result.commands|length == 5
+
+ - name: Gather vlans facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: vlans
+
+ - assert:
+ that:
+ - result.after|length == ansible_facts.network_resources.vlans|length
+
+ - name: Idempotence - Merged
+ register: result
+ cisco.nxos.nxos_vlans: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id002
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/overridden.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/overridden.yaml
new file mode 100644
index 00000000..2f8a1c65
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/overridden.yaml
@@ -0,0 +1,71 @@
+---
+- debug:
+ msg: Start nxos_vlans overridden integration tests connection={{ ansible_connection
+ }}
+
+- name: setup1
+ cisco.nxos.nxos_config: &id003
+ lines:
+ - "no vlan 2-100"
+
+- block:
+
+ - name: setup
+ cisco.nxos.nxos_config:
+ lines:
+ - "vlan 5"
+ - " name test-vlan5"
+ - " state suspend"
+ - "vlan 6"
+
+ - name: Gather vlans facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: vlans
+
+ - name: Set default vlan (vlan1) config and config to revert
+ set_fact:
+ default_vlan: "{{ ansible_facts.network_resources.vlans|selectattr('vlan_id', 'equalto', 1)|list }}"
+ config_to_override:
+ - vlan_id: 9
+ name: test-vlan9
+ enabled: false
+
+ - name: Overridden
+ register: result
+ cisco.nxos.nxos_vlans: &id002
+ config: "{{ default_vlan + config_to_override }}"
+ state: overridden
+
+ - assert:
+ that:
+ - result.before|length == ansible_facts.network_resources.vlans|length
+ - result.changed == true
+ - "'no vlan 5' in result.commands"
+ - "'no vlan 6' in result.commands"
+ - "'vlan 9' in result.commands"
+ - "'name test-vlan9' in result.commands"
+ - "'shutdown' in result.commands"
+ - result.commands|length == 5
+
+ - name: Gather vlans post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - result.after|length == ansible_facts.network_resources.vlans|length
+
+ - name: Idempotence - Overridden
+ register: result
+ cisco.nxos.nxos_vlans: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id003
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/parsed.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/parsed.yaml
new file mode 100644
index 00000000..928a48db
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/parsed.yaml
@@ -0,0 +1,19 @@
+---
+- debug:
+ msg: START nxos_vlans parsed integration tests on connection={{ ansible_connection
+ }}
+
+- block:
+ - name: Use parsed state to convert externally supplied config to structured format
+ register: result
+ cisco.nxos.nxos_vlans:
+ running_config: "{{ lookup('file', '{{ role_path }}/fixtures/parsed.cfg') }}"
+ state: parsed
+
+ - assert:
+ that: "{{ parsed | symmetric_difference(result['parsed']) |length==0\
+ \ }}"
+
+- debug:
+ msg: END nxos_vlans parsed integration tests on connection={{ ansible_connection
+ }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/rendered.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/rendered.yaml
new file mode 100644
index 00000000..077480b8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/rendered.yaml
@@ -0,0 +1,44 @@
+---
+- debug:
+ msg: START nxos_vlans rendered integration tests on connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- name: Gather pre facts
+ cisco.nxos.nxos_facts:
+ gather_subset: ['!all', '!min']
+ gather_network_resources: "vlans"
+
+- block:
+ - name: Use rendered state to convert task input to device specific commands
+ register: result
+ cisco.nxos.nxos_vlans:
+ config:
+ - vlan_id: 5
+ name: vlan5
+ mapped_vni: 100
+
+ - vlan_id: 6
+ name: vlan6
+ state: suspend
+ state: rendered
+
+ - assert:
+ that: "{{ rendered | symmetric_difference(result['rendered'])\
+ \ |length==0 }}"
+
+ - name: Gather vlans facts from the device and assert that its empty
+ register: result
+ cisco.nxos.nxos_vlans:
+ state: gathered
+
+ - name: Make sure that rendered task actually did not make any changes to the
+ device
+ assert:
+ that: "{{ result['gathered'] == ansible_facts['network_resources']['vlans'] }}"
+ always:
+
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_vlans rendered integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/replaced.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/replaced.yaml
new file mode 100644
index 00000000..d7905671
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/replaced.yaml
@@ -0,0 +1,64 @@
+---
+- debug:
+ msg: Start nxos_vlans replaced integration tests connection={{ ansible_connection
+ }}
+
+- name: setup1
+ cisco.nxos.nxos_config: &id003
+ lines:
+ - "no vlan 2-100"
+
+- block:
+
+ - name: setup2
+ cisco.nxos.nxos_config:
+ lines:
+ - "vlan 5"
+ - " name test-vlan5"
+ - "vlan 6"
+ - " name test-vlan6"
+
+ - name: Gather vlans facts
+ cisco.nxos.nxos_facts: &id001
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources: vlans
+
+ - name: Replaced
+ register: result
+ cisco.nxos.nxos_vlans: &id002
+ config:
+
+ - vlan_id: 6
+ state: suspend
+ state: replaced
+
+ - assert:
+ that:
+ - result.before|length == ansible_facts.network_resources.vlans|length
+ - result.changed == true
+ - "'vlan 6' in result.commands"
+ - "'no name' in result.commands"
+ - "'state suspend' in result.commands"
+ - result.commands|length == 3
+
+ - name: Gather vlans post facts
+ cisco.nxos.nxos_facts: *id001
+
+ - assert:
+ that:
+ - result.after|length == ansible_facts.network_resources.vlans|length
+
+ - name: Idempotence - Replaced
+ register: result
+ cisco.nxos.nxos_vlans: *id002
+
+ - assert:
+ that:
+ - result.changed == false
+ - result.commands|length == 0
+ always:
+
+ - name: teardown
+ cisco.nxos.nxos_config: *id003
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/rtt.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/rtt.yaml
new file mode 100644
index 00000000..ed328717
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/tests/common/rtt.yaml
@@ -0,0 +1,65 @@
+---
+- debug:
+ msg: START nxos_vlans round trip integration tests on connection={{ ansible_connection }}
+
+- include_tasks: _remove_config.yaml
+
+- block:
+ - name: Apply the provided configuration (Base config)
+ register: base_config
+ cisco.nxos.nxos_vlans:
+ config:
+ - vlan_id: 2
+ name: test-vlan2
+ enabled: false
+ - vlan_id: 4
+ name: test-vlan3
+ enabled: true
+ state: active
+ state: merged
+ tags: base_config
+
+ - name: Gather VLANs facts
+ cisco.nxos.nxos_facts:
+ gather_subset:
+ - '!all'
+ - '!min'
+ gather_network_resources:
+ - 'vlans'
+
+ - name: Set default vlan (vlan1) config and config to revert
+ set_fact:
+ default_vlan: "{{ ansible_facts.network_resources.vlans|selectattr('vlan_id', 'equalto', 1)|list }}"
+ config_to_revert:
+ - vlan_id: 3
+ name: test-vlan3
+ enabled: true
+ state: suspend
+ - vlan_id: 5
+ name: test-vlan5
+ enabled: false
+
+ - name: Apply the provided configuration (config to be reverted)
+ register: result
+ cisco.nxos.nxos_vlans:
+ config: "{{ config_to_revert + default_vlan }}"
+ state: overridden
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Revert back to base config using facts round trip
+ register: revert
+ cisco.nxos.nxos_vlans:
+ config: "{{ ansible_facts['network_resources']['vlans'] }}"
+ state: overridden
+
+ - assert:
+ that:
+ - base_config['after'] == revert['after']
+ always:
+ - include_tasks: _remove_config.yaml
+
+- debug:
+ msg: END nxos_vlans round trip integration tests on connection={{ ansible_connection }}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/vars/main.yml
new file mode 100644
index 00000000..bb73df45
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vlans/vars/main.yml
@@ -0,0 +1,57 @@
+gathered:
+ - vlan_id: 1
+ enabled: True
+ mode: "ce"
+ state: active
+ name: default
+
+ - vlan_id: 5
+ enabled: True
+ mode: "ce"
+ name: "vlan5"
+ state: suspend
+
+ - vlan_id: 6
+ enabled: True
+ mode: "ce"
+ state: active
+
+ - vlan_id: 7
+ enabled: False
+ mode: "ce"
+ name: "vlan7"
+ state: active
+ mapped_vni: 190
+
+parsed:
+ - vlan_id: 1
+ enabled: True
+ mode: "ce"
+ state: active
+ name: default
+
+ - vlan_id: 5
+ enabled: True
+ mode: "ce"
+ name: "vlan5"
+ state: suspend
+
+ - vlan_id: 6
+ enabled: True
+ mode: "ce"
+ state: active
+
+ - vlan_id: 7
+ enabled: True
+ mode: "ce"
+ name: "vlan7"
+ state: active
+ mapped_vni: 100
+
+rendered:
+ - vlan 5
+ - name vlan5
+ - vn-segment 100
+ - vlan 6
+ - name vlan6
+ - state suspend
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tests/common/sanity.yaml
new file mode 100644
index 00000000..476cc301
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc/tests/common/sanity.yaml
@@ -0,0 +1,181 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vpc sanity test"
+
+- block:
+
+ - set_fact: delay_restore_orphan_port=25
+
+ - set_fact: def_delay_restore_orphan_port=default
+ when: platform is not search("N35|N5K|N6K")
+
+- block:
+
+ - name: disable vpc for initial vpc config cleanup
+ cisco.nxos.nxos_feature:
+ feature: vpc
+ state: disabled
+
+ - name: enable feature vpc
+ cisco.nxos.nxos_feature:
+ feature: vpc
+ state: enabled
+
+ - name: Ensure ntc VRF exists on switch
+ cisco.nxos.nxos_vrf:
+ vrf: ntc
+
+ - name: Configure vpc
+ register: result
+ cisco.nxos.nxos_vpc: &id001
+ state: present
+ domain: 100
+ pkl_dest: 192.168.100.4
+ pkl_src: 10.1.100.20
+ pkl_vrf: ntc
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vpc: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure vpc1
+ register: result
+ cisco.nxos.nxos_vpc: &id003
+ state: present
+ domain: 100
+ role_priority: 500
+ system_priority: 2000
+ peer_gw: true
+ delay_restore: 5
+ delay_restore_interface_vlan: 15
+ delay_restore_orphan_port: '{{ delay_restore_orphan_port|default(omit) }}'
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vpc: *id003
+
+ - assert: *id004
+
+ - block:
+
+ - set_fact: def_auto_recovery=False
+
+ - set_fact: def_auto_recovery=True
+ when: platform is search("N7K")
+
+ - name: auto-recovery from default to non-default
+ register: result
+ cisco.nxos.nxos_vpc: &id005
+ domain: 100
+ auto_recovery: '{{ not def_auto_recovery }}'
+
+ - assert: *id002
+
+ - name: Conf Idempotence auto-recovery def-to-non-def
+ register: result
+ cisco.nxos.nxos_vpc: *id005
+
+ - assert: *id004
+
+ - name: auto-recovery from non-default to default
+ register: result
+ cisco.nxos.nxos_vpc: &id006
+ domain: 100
+ auto_recovery: '{{ def_auto_recovery }}'
+
+ - assert: *id002
+
+ - name: Conf Idempotence auto-recovery non-def-to-def
+ register: result
+ cisco.nxos.nxos_vpc: *id006
+
+ - assert: *id004
+ when: platform is search("N35|N7K|N3K-F|N9K-F")
+
+ - name: Configure auto-recovery reload-delay
+ register: result
+ cisco.nxos.nxos_vpc: &id007
+ domain: 100
+ auto_recovery_reload_delay: 242
+
+ - assert: *id002
+
+ - name: Conf Idempotence auto-recovery reload-delay
+ register: result
+ cisco.nxos.nxos_vpc: *id007
+
+ - assert: *id004
+
+ - name: Configure vpc2
+ register: result
+ cisco.nxos.nxos_vpc: &id008
+ state: present
+ domain: 100
+ role_priority: default
+ system_priority: default
+ peer_gw: true
+ delay_restore: default
+ delay_restore_interface_vlan: default
+ delay_restore_orphan_port: '{{ def_delay_restore_orphan_port|default(omit)
+ }}'
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vpc: *id008
+
+ - assert: *id004
+
+ - name: Configure vpc3
+ register: result
+ cisco.nxos.nxos_vpc: &id009
+ state: present
+ domain: 100
+ peer_gw: false
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vpc: *id009
+
+ - assert: *id004
+
+ - name: remove vpc
+ register: result
+ cisco.nxos.nxos_vpc: &id010
+ state: absent
+ domain: 100
+
+ - assert: *id002
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_vpc: *id010
+
+ - assert: *id004
+ always:
+
+ - name: remove vrf
+ ignore_errors: true
+ cisco.nxos.nxos_vrf:
+ vrf: ntc
+ state: absent
+
+ - name: disable feature vpc
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: vpc
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vpc sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tests/common/sanity.yaml
new file mode 100644
index 00000000..64c00a89
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vpc_interface/tests/common/sanity.yaml
@@ -0,0 +1,140 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vpc_interface sanity
+ test"
+
+- block:
+
+ - name: enable feature vpc
+ cisco.nxos.nxos_feature:
+ feature: vpc
+ state: enabled
+
+ - name: create port-channel10
+ cisco.nxos.nxos_config:
+ commands:
+ - interface port-channel10
+ - switchport
+ match: none
+
+ - name: create port-channel11
+ cisco.nxos.nxos_config:
+ commands:
+ - interface port-channel11
+ - switchport
+ match: none
+
+ - name: configure vpc
+ cisco.nxos.nxos_vpc:
+ state: present
+ domain: 100
+ role_priority: 32667
+ system_priority: 2000
+ pkl_dest: 192.168.100.4
+ pkl_src: 10.1.100.20
+ peer_gw: true
+ auto_recovery: false
+
+ - name: Configure vpc port channel
+ register: result
+ cisco.nxos.nxos_vpc_interface: &id001
+ portchannel: 10
+ vpc: 10
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vpc_interface: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure vpc port channel
+ register: result
+ when: image_version != "7.0(3)I5(1)"
+ cisco.nxos.nxos_vpc_interface: &id003
+ portchannel: 11
+ peer_link: true
+
+ - assert: *id002
+ when: image_version != "7.0(3)I5(1)"
+
+ - name: Conf Idempotence
+ register: result
+ when: image_version != "7.0(3)I5(1)"
+ cisco.nxos.nxos_vpc_interface: *id003
+
+ - assert: *id004
+ when: image_version != "7.0(3)I5(1)"
+
+ - name: Configure vpc port channel
+ register: result
+ when: image_version != "7.0(3)I5(1)"
+ cisco.nxos.nxos_vpc_interface: &id005
+ portchannel: 11
+ peer_link: false
+
+ - assert: *id002
+ when: image_version != "7.0(3)I5(1)"
+
+ - name: Conf Idempotence
+ register: result
+ when: image_version != "7.0(3)I5(1)"
+ cisco.nxos.nxos_vpc_interface: *id005
+
+ - assert: *id004
+ when: image_version != "7.0(3)I5(1)"
+
+ - name: remove vpc port channel
+ register: result
+ cisco.nxos.nxos_vpc_interface: &id006
+ portchannel: 10
+ vpc: 10
+ state: absent
+
+ - assert: *id002
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_vpc_interface: *id006
+
+ - assert: *id004
+ always:
+
+ - name: remove vpc
+ ignore_errors: true
+ cisco.nxos.nxos_vpc:
+ state: absent
+ domain: 100
+ role_priority: 32667
+ system_priority: 2000
+ pkl_dest: 192.168.100.4
+ pkl_src: 10.1.100.20
+ peer_gw: true
+ auto_recovery: false
+
+ - name: remove vpc port channel
+ ignore_errors: true
+ cisco.nxos.nxos_vpc_interface:
+ portchannel: 10
+ vpc: 10
+ state: absent
+
+ - name: remove port channel
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - no interface port-channel10
+ - no interface port-channel11
+ match: none
+
+ - name: disable feature vpc
+ cisco.nxos.nxos_feature:
+ feature: vpc
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vpc_interface sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tests/common/intent.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tests/common/intent.yaml
new file mode 100644
index 00000000..2aeaeb56
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tests/common/intent.yaml
@@ -0,0 +1,196 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vrf intent & aggregate
+ test"
+
+- set_fact: testint1="{{ nxos_int1 }}"
+
+- set_fact: testint2="{{ nxos_int2 }}"
+
+- name: setup - remove vrf from interfaces used in test(part1)
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no vrf member test1
+ parents: no switchport
+ before: interface {{ testint1 }}
+
+- name: setup - remove vrf from interfaces used in test(part2)
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no vrf member test1
+ parents: no switchport
+ before: interface {{ testint2 }}
+
+- name: setup - delete VRF test1 used in test
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no vrf context test1
+
+- name: setup - remove VRF test2 used in test
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no vrf context test2
+
+- name: aggregate definitions of VRFs
+ register: result
+ cisco.nxos.nxos_vrf: &id001
+ aggregate:
+
+ - name: test1
+ description: Configured by Ansible
+
+ - name: test2
+ description: Testing
+ admin_state: down
+
+- assert:
+ that:
+ - result.changed == true
+ - '"vrf context test1" in result.commands'
+ - '"description Configured by Ansible" in result.commands'
+ - '"no shutdown" in result.commands'
+ - '"vrf context test2" in result.commands'
+ - '"description Testing" in result.commands'
+ - '"shutdown" in result.commands'
+
+- name: aggregate definitions of VRFs(Idempotence)
+ register: result
+ cisco.nxos.nxos_vrf: *id001
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Assign interfaces to VRF (Config + intent)
+ register: result
+ cisco.nxos.nxos_vrf: &id002
+ name: test1
+ interfaces:
+ - '{{ testint1 }}'
+ - '{{ testint2 }}'
+ associated_interfaces:
+ - '{{ testint1 }}'
+ - '{{ testint2 }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - result.failed == false
+ - '"interface {{ testint1 }}" in result.commands'
+ - '"vrf member test1" in result.commands'
+ - '"interface {{ testint2 }}" in result.commands'
+ - '"vrf member test1" in result.commands'
+
+- name: Assign interfaces to vrf(Idempotence)
+ register: result
+ cisco.nxos.nxos_vrf: *id002
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Check interfaces assigned to VRF (intent)
+ register: result
+ cisco.nxos.nxos_vrf:
+ name: test1
+ associated_interfaces:
+ - '{{ testint1 }}'
+ - '{{ testint2 }}'
+
+- assert:
+ that:
+ - result.failed == false
+
+- name: Assign interfaces to VRF (intent fail)
+ register: result
+ ignore_errors: true
+ cisco.nxos.nxos_vrf:
+ name: test1
+ associated_interfaces:
+ - test
+
+- assert:
+ that:
+ - result.failed == True
+
+- name: Remove interface from vrf
+ register: result
+ cisco.nxos.nxos_vrf: &id003
+ name: test1
+ interfaces:
+ - '{{ testint2 }}'
+
+- assert:
+ that:
+ - result.changed == true
+ - '"interface {{ testint1 }}" in result.commands'
+ - '"no vrf member test1" in result.commands'
+
+- name: Remove interface from vrf(idempotence)
+ register: result
+ cisco.nxos.nxos_vrf: *id003
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: Delete VRFs
+ register: result
+ cisco.nxos.nxos_vrf: &id004
+ aggregate:
+
+ - name: test1
+ description: Configured by Ansible
+
+ - name: test2
+ description: Testing
+ admin_state: down
+ state: absent
+
+- assert:
+ that:
+ - result.changed == true
+ - '"no vrf context test1" in result.commands'
+ - '"no vrf context test2" in result.commands'
+
+- name: Delete VRFs(Idempotence)
+ register: result
+ cisco.nxos.nxos_vrf: *id004
+
+- assert:
+ that:
+ - result.changed == false
+
+- name: setup - remove vrf from interfaces used in test(part1)
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no vrf member test1
+ parents: no switchport
+ before: interface {{ testint1 }}
+
+- name: setup - remove vrf from interfaces used in test(part2)
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no vrf member test1
+ parents: no switchport
+ before: interface {{ testint2 }}
+
+- name: setup - delete VRF test1 used in test
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no vrf context test1
+
+- name: setup - remove VRF test2 used in test
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - no vrf context test2
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vrf intent & aggregate
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tests/common/sanity.yaml
new file mode 100644
index 00000000..41ea526e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf/tests/common/sanity.yaml
@@ -0,0 +1,112 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vrf sanity test"
+
+- set_fact: intname1="{{ nxos_int1 }}"
+
+- set_fact: intname2="{{ nxos_int2 }}"
+
+- set_fact: rdnd="1:2"
+ when: (platform is not match("N35|N7K")) and ((imagetag != 'I2'))
+
+- set_fact: rdd="default"
+ when: (platform is not match("N35|N7K")) and ((imagetag != 'I2'))
+
+- set_fact: vnind="5000"
+ when: platform is not match("N35|N7K|N3L")
+
+- set_fact: vnid="default"
+ when: platform is not match("N35|N7K|N3L")
+
+- name: Enable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- name: 'Setup: Enable nv overlay evpn'
+ ignore_errors: true
+ when: platform is match("N5K|N6K")
+ cisco.nxos.nxos_config:
+ commands:
+ - nv overlay evpn
+ provider: '{{ connection }}'
+
+- block:
+
+ - name: Ensure ntc VRF exists on switch
+ register: result
+ cisco.nxos.nxos_vrf: &id001
+ vrf: ntc
+ admin_state: down
+ description: testing
+ vni: '{{vnind|default(omit)}}'
+ rd: '{{rdnd|default(omit)}}'
+ interfaces:
+ - '{{ intname1 }}'
+ - '{{ intname2 }}'
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vrf: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - pause:
+ seconds: 30
+
+ - name: Remove config
+ register: result
+ cisco.nxos.nxos_vrf: &id003
+ vrf: ntc
+ admin_state: up
+ vni: '{{vnid|default(omit)}}'
+ rd: '{{rdd|default(omit)}}'
+ interfaces: default
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vrf: *id003
+
+ - assert: *id004
+
+ - name: Ensure ntc VRF does not exist on switch
+ register: result
+ cisco.nxos.nxos_vrf: &id005
+ vrf: ntc
+ state: absent
+
+ - assert: *id002
+
+ - pause:
+ seconds: 30
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_vrf: *id005
+
+ - assert: *id004
+ always:
+
+ - name: 'Setup: Disable nv overlay evpn'
+ ignore_errors: true
+ when: platform is match("N5K|N6K")
+ cisco.nxos.nxos_config:
+ commands:
+ - no nv overlay evpn
+ provider: '{{ connection }}'
+
+ - name: Disable feature BGP
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+ - debug: msg="END connection={{ ansible_connection }} nxos_vrf sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tests/common/sanity.yaml
new file mode 100644
index 00000000..238fbeb3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_af/tests/common/sanity.yaml
@@ -0,0 +1,146 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vrf_af sanity test"
+
+- name: Configure feature bgp
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: enabled
+
+- name: Configure feature nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands: feature nv overlay
+
+- name: Configure nv overlay evpn
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands: nv overlay evpn
+
+- block:
+
+ - name: Configure vrf af ipv4
+ register: result
+ cisco.nxos.nxos_vrf_af: &id001
+ vrf: ansible
+ afi: ipv4
+ route_target_both_auto_evpn: true
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vrf_af: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Configure vrf af ipv6
+ register: result
+ cisco.nxos.nxos_vrf_af: &id003
+ vrf: ansible
+ afi: ipv6
+ route_target_both_auto_evpn: true
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vrf_af: *id003
+
+ - assert: *id004
+
+ - name: Remove router target4
+ register: result
+ cisco.nxos.nxos_vrf_af: &id005
+ vrf: ansible
+ afi: ipv4
+ route_target_both_auto_evpn: false
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vrf_af: *id005
+
+ - assert: *id004
+
+ - name: Remove router target6
+ register: result
+ cisco.nxos.nxos_vrf_af: &id006
+ vrf: ansible
+ afi: ipv6
+ route_target_both_auto_evpn: false
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vrf_af: *id006
+
+ - assert: *id004
+
+ - name: Remove vrf af v6
+ register: result
+ cisco.nxos.nxos_vrf_af: &id007
+ vrf: ansible
+ afi: ipv6
+ route_target_both_auto_evpn: true
+ state: absent
+
+ - assert: *id002
+
+ - pause:
+ seconds: 30
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_vrf_af: *id007
+
+ - assert: *id004
+
+ - name: Remove vrf af v4
+ register: result
+ cisco.nxos.nxos_vrf_af: &id008
+ vrf: ansible
+ afi: ipv4
+ route_target_both_auto_evpn: true
+ state: absent
+
+ - assert: *id002
+
+ - pause:
+ seconds: 30
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_vrf_af: *id008
+
+ - assert: *id004
+ when: not platform is search("N35|N3L")
+ always:
+
+ - name: Remove vrf
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands: no vrf context ansible
+
+ - name: Remove nv overlay evpn
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands: no nv overlay evpn
+
+ - name: Remove feature nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands: no feature nv overlay
+
+ - name: Remove feature bgp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: bgp
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vrf_af sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tests/common/sanity.yaml
new file mode 100644
index 00000000..cd87e87c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrf_interface/tests/common/sanity.yaml
@@ -0,0 +1,59 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vrf_interface sanity
+ test"
+
+- set_fact: intname="{{ nxos_int1 }}"
+
+- block:
+
+ - name: put interface in L3
+ cisco.nxos.nxos_config:
+ commands:
+ - no switchport
+ parents:
+ - interface {{ intname }}
+ match: none
+
+ - name: Ensure vrf ntc exists on interface
+ register: result
+ cisco.nxos.nxos_vrf_interface: &id001
+ vrf: ntc
+ interface: '{{ intname }}'
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vrf_interface: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Ensure ntc VRF does not exist on interface
+ register: result
+ cisco.nxos.nxos_vrf_interface: &id003
+ vrf: ntc
+ interface: '{{ intname }}'
+ state: absent
+
+ - assert: *id002
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_vrf_interface: *id003
+
+ - assert: *id004
+ always:
+
+ - name: put interface in default mode
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines: default interface {{ intname }}
+ match: none
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vrf_interface sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tests/common/sanity.yaml
new file mode 100644
index 00000000..744209da
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vrrp/tests/common/sanity.yaml
@@ -0,0 +1,133 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vrrp sanity test"
+
+- block:
+
+ - name: Enable interface-vlan
+ cisco.nxos.nxos_feature:
+ feature: interface-vlan
+ state: enabled
+
+ - name: Enable vrrp
+ cisco.nxos.nxos_feature:
+ feature: vrrp
+ state: enabled
+
+ - name: create int vlan 10
+ cisco.nxos.nxos_config:
+ commands: int vlan 10
+
+ - name: Ensure vrrp group 100 and vip 10.1.100.1 is on vlan10
+ register: result
+ cisco.nxos.nxos_vrrp: &id001
+ interface: vlan10
+ group: 100
+ vip: 10.1.100.1
+ admin_state: no shutdown
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vrrp: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: Ensure vrrp group 100 is default
+ register: result
+ cisco.nxos.nxos_vrrp: &id003
+ interface: vlan10
+ group: 100
+ vip: default
+ admin_state: default
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vrrp: *id003
+
+ - assert: *id004
+
+ - name: Ensure removal of the vrrp group config
+ register: result
+ cisco.nxos.nxos_vrrp: &id005
+ interface: vlan10
+ group: 100
+ state: absent
+
+ - assert: *id002
+
+ - pause:
+ seconds: 30
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_vrrp: *id005
+
+ - assert: *id004
+
+ - pause:
+ seconds: 30
+
+ - name: Re-config with more params
+ register: result
+ cisco.nxos.nxos_vrrp: &id006
+ interface: vlan10
+ group: 100
+ vip: 10.1.100.1
+ preempt: false
+ interval: 10
+ priority: 130
+ authentication: AUTHKEY
+
+ - assert: *id002
+
+ - name: Reconfig Idempotence
+ register: result
+ cisco.nxos.nxos_vrrp: *id006
+
+ - assert: *id004
+
+ - name: Re-config with defaults
+ register: result
+ cisco.nxos.nxos_vrrp: &id007
+ interface: vlan10
+ group: 100
+ vip: default
+ preempt: true
+ interval: default
+ priority: default
+ authentication: default
+
+ - assert: *id002
+
+ - name: Reconfig Idempotence
+ register: result
+ cisco.nxos.nxos_vrrp: *id007
+
+ - assert: *id004
+ always:
+
+ - name: remove vrrp
+ ignore_errors: true
+ cisco.nxos.nxos_vrrp: *id005
+
+ - name: Disable interface-vlan
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - no feature interface-vlan
+ match: none
+
+ - name: Disable vrrp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: vrrp
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vrrp sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/meta/main.yml
new file mode 100644
index 00000000..91da2a75
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/meta/main.yml
@@ -0,0 +1,2 @@
+---
+...
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/tasks/main.yaml
new file mode 100644
index 00000000..d7c416ee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/tasks/main.yaml
@@ -0,0 +1,18 @@
+---
+- name: Check platform type and skip if not MDS
+ register: result
+ cisco.nxos.nxos_command:
+ commands: show version | grep MDS
+
+- name: Set skip_test flag to false
+ set_fact:
+ skip_test=False
+
+- name: Set skip_test flag to true if not MDS
+ set_fact:
+ skip_test=True
+ when: result.stdout[0] is not search('MDS')
+
+- include: cli.yaml
+ tags: cli
+ when: not skip_test
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/tests/common/sanity.yaml
new file mode 100644
index 00000000..de512b18
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/tests/common/sanity.yaml
@@ -0,0 +1,65 @@
+---
+- debug: msg="START nxos_vsan sanity test with connection={{ ansible_connection
+ }} "
+
+- debug: msg="Using vsans {{ vsan1 }}, {{ vsan2 }} for running this sanity test,
+ please make sure these are not used in the setup, these will be deleted after
+ the tests"
+
+- block:
+
+ - name: Setup - Remove vsan if configured
+ ignore_errors: true
+ cisco.nxos.nxos_vsan: &id002
+ vsan:
+
+ - id: '{{ vsan1 | int }}'
+ remove: true
+
+ - id: '{{ vsan2 | int }}'
+ remove: true
+
+ - name: Configure vsan
+ register: result
+ cisco.nxos.nxos_vsan: &id001
+ vsan:
+
+ - id: '{{ vsan1 | int }}'
+ name: vsan-SAN-A
+ suspend: true
+ interface:
+ - '{{intA1}}'
+ remove: false
+
+ - id: '{{ vsan2 | int }}'
+ name: vsan-SAN-B
+ interface:
+ - '{{intB1}}'
+ remove: false
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - assert:
+ that:
+ - result.commands == ["terminal dont-ask", "vsan database", "vsan 922",
+ "vsan 922 name vsan-SAN-A", "vsan 922 suspend", "vsan 922 interface
+ fc1/1", "vsan 923", "vsan 923 name vsan-SAN-B", "no vsan 923 suspend",
+ "vsan 923 interface fc1/2", "no terminal dont-ask"]
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_vsan: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - assert:
+ that:
+ - result.commands == []
+ always:
+
+ - name: Remove vsan config
+ cisco.nxos.nxos_vsan: *id002
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/vars/main.yml
new file mode 100644
index 00000000..9c8077a4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vsan/vars/main.yml
@@ -0,0 +1,5 @@
+---
+vsan1: 922
+vsan2: 923
+intA1: fc1/1
+intB1: fc1/2
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tests/common/sanity.yaml
new file mode 100644
index 00000000..a8c00a66
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_domain/tests/common/sanity.yaml
@@ -0,0 +1,46 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vtp_domain sanity test"
+
+- set_fact: vtp_run="true"
+
+- set_fact: vtp_run="false"
+ when: platform is search('N3K-F|N9K-F')
+
+- block:
+
+ - name: disable feature vtp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: vtp
+ state: disabled
+
+ - name: enable feature vtp
+ cisco.nxos.nxos_feature:
+ feature: vtp
+ state: enabled
+
+ - name: configure vtp domain
+ register: result
+ cisco.nxos.nxos_vtp_domain: &id001
+ domain: ntc
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vtp_domain: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ when: vtp_run
+ always:
+
+ - name: disable feature vtp
+ cisco.nxos.nxos_feature:
+ feature: vtp
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vtp_domain sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tests/common/sanity.yaml
new file mode 100644
index 00000000..d4930e0d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_password/tests/common/sanity.yaml
@@ -0,0 +1,66 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vtp_password sanity
+ test"
+
+- set_fact: vtp_run="true"
+
+- set_fact: vtp_run="false"
+ when: platform is search('N3K-F|N9K-F')
+
+- block:
+
+ - name: disable feature vtp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: vtp
+ state: disabled
+
+ - name: enable feature vtp
+ cisco.nxos.nxos_feature:
+ feature: vtp
+ state: enabled
+
+ - name: configure vtp domain
+ cisco.nxos.nxos_vtp_domain:
+ domain: testing
+
+ - name: configure vtp password
+ register: result
+ cisco.nxos.nxos_vtp_password: &id001
+ vtp_password: ntc
+ state: present
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vtp_password: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: remove vtp password
+ register: result
+ cisco.nxos.nxos_vtp_password: &id003
+ vtp_password: ntc
+ state: absent
+
+ - assert: *id002
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_vtp_password: *id003
+
+ - assert: *id004
+ when: vtp_run
+ always:
+
+ - name: disable feature vtp
+ cisco.nxos.nxos_feature:
+ feature: vtp
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vtp_password sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tests/common/sanity.yaml
new file mode 100644
index 00000000..7557893f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vtp_version/tests/common/sanity.yaml
@@ -0,0 +1,51 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vtp_version sanity
+ test"
+
+- set_fact: vtp_run="true"
+
+- set_fact: vtp_run="false"
+ when: platform is search('N3K-F|N9K-F')
+
+- block:
+
+ - name: disable feature vtp
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: vtp
+ state: disabled
+
+ - name: enable feature vtp
+ cisco.nxos.nxos_feature:
+ feature: vtp
+ state: enabled
+
+ - name: configure supporting vtp domain
+ cisco.nxos.nxos_vtp_domain:
+ domain: foo
+
+ - name: configure vtp version
+ register: result
+ cisco.nxos.nxos_vtp_version: &id001
+ version: 2
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vtp_version: *id001
+
+ - assert:
+ that:
+ - result.changed == false
+ when: vtp_run | bool
+ always:
+
+ - name: disable feature vtp
+ cisco.nxos.nxos_feature:
+ feature: vtp
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vtp_version sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/main.yaml
new file mode 100644
index 00000000..c7dfdab6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/main.yaml
@@ -0,0 +1,8 @@
+---
+- include: cli.yaml
+ tags:
+ - cli
+
+- include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml
new file mode 100644
index 00000000..0fba16a7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml
@@ -0,0 +1,24 @@
+---
+- name: Unconfigure VDC setting limit-resource module-type f3
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - terminal dont-ask ; vdc {{ vdcid }} ; no limit-resource module-type f3
+ match: none
+
+- name: Previous command is asynchronous and can take a while. Allow time for it
+ to complete
+ pause:
+ seconds: 45
+
+- name: Configure VDC setting allocate interface unallocated-interfaces
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - terminal dont-ask ; vdc {{ vdcid }} ; allocate interface unallocated-interfaces
+ match: none
+
+- name: Previous command is asynchronous can take a while. Allow time for it to
+ complete
+ pause:
+ seconds: 45
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml
new file mode 100644
index 00000000..0423606c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml
@@ -0,0 +1,32 @@
+---
+- name: Get default vdc id
+ register: vdcout
+ cisco.nxos.nxos_command:
+ commands:
+ - show vdc current-vdc | json
+
+- set_fact: vdcid="{{ vdcout.stdout_lines[0].name }}"
+
+- name: Configure VDC setting limit-resource module-type f3
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - terminal dont-ask ; vdc {{ vdcid }} ; limit-resource module-type f3
+ match: none
+
+- name: Previous command is asynchronous and can take a while. Allow time for it
+ to complete
+ pause:
+ seconds: 45
+
+- name: Configure VDC setting allocate interface unallocated-interfaces
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - terminal dont-ask ; vdc {{ vdcid }} ; allocate interface unallocated-interfaces
+ match: none
+
+- name: Previous command is asynchronous and can take a while. Allow time for it
+ to complete
+ pause:
+ seconds: 45
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tests/common/multisite.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tests/common/multisite.yaml
new file mode 100644
index 00000000..7a48a4bd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tests/common/multisite.yaml
@@ -0,0 +1,112 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vxlan_vtep multisite sanity test"
+
+- name: Enable feature nv overlay - multisite
+ cisco.nxos.nxos_config:
+ commands:
+ - feature nv overlay
+ match: none
+
+- name: Enable nv overlay evpn - multisite
+ when: platform is search('N9K')
+ cisco.nxos.nxos_config:
+ lines:
+ - nv overlay evpn
+
+- name: Enable multisite border gateway - multisite
+ ignore_errors: true
+ register: multiout
+ cisco.nxos.nxos_config:
+ lines:
+ - evpn multisite border-gateway 10
+
+- block:
+
+ - name: configure vxlan_vtep
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: &id001
+ interface: nve1
+ description: abcd
+ host_reachability: true
+ source_interface: Loopback0
+ source_interface_hold_down_time: 30
+ global_ingress_replication_bgp: true
+ multisite_border_gateway_interface: Loopback10
+ shutdown: false
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: *id001
+
+ - assert: &id003
+ that:
+ - result.changed == false
+
+ - name: reset vxlan_vtep
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: &id004
+ interface: nve1
+ description: default
+ host_reachability: false
+ source_interface_hold_down_time: default
+ source_interface: default
+ global_ingress_replication_bgp: false
+ multisite_border_gateway_interface: default
+ shutdown: true
+
+ - assert: *id002
+
+ - name: reset Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: *id004
+
+ - assert: *id003
+
+ - name: remove vxlan_vtep
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: &id005
+ interface: nve1
+ description: default
+ host_reachability: true
+ source_interface: Loopback0
+ source_interface_hold_down_time: 30
+ shutdown: true
+ state: absent
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: *id005
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Disable multisite border gateway - multisite
+ cisco.nxos.nxos_config:
+ lines:
+ - no evpn multisite border-gateway 10
+ when: multiout is not search("Invalid command")
+
+- name: Disable nv overlay evpn
+ when: platform is search('N9K')
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - no nv overlay evpn
+ match: none
+
+- name: Disable feature nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nve
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vxlan_vtep sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml
new file mode 100644
index 00000000..f349282d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml
@@ -0,0 +1,225 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vxlan_vtep sanity test"
+
+- block:
+
+ - set_fact: global_mcast_group_L2="225.1.1.2"
+
+ - set_fact: def_global_mcast_group_L2="default"
+
+ - block:
+
+ - set_fact: global_mcast_group_L3="225.1.1.1"
+
+ - set_fact: def_global_mcast_group_L3="default"
+
+ - set_fact: global_ingress_replication_bgp="true"
+
+ - set_fact: def_global_ingress_replication_bgp="false"
+ when: false
+
+ - name: TCAM resource check for global_suppress_arp
+ connection: ansible.netcommon.network_cli
+ register: tcam_state
+ cisco.nxos.nxos_command:
+ commands:
+
+ - command: show hardware access-list tcam region | incl arp-ether | sed
+ 's/.*size = *//'
+ output: text
+
+ - block:
+
+ - set_fact: global_suppress_arp="true"
+
+ - set_fact: def_global_suppress_arp="false"
+ when: tcam_state.stdout[0]|int > 0
+ when: platform is search('N9K') and (major_version is version('9.2', 'ge'))
+
+- block:
+
+ - name: Apply N7K specific setup config
+ include: targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml
+ when: platform is match('N7K')
+
+ - name: Enable feature nv overlay
+ cisco.nxos.nxos_config:
+ commands:
+ - feature nv overlay
+ - nv overlay evpn
+ match: none
+
+ - block:
+
+ - name: Enable feature ngmvpn
+ cisco.nxos.nxos_config:
+ commands:
+ - feature ngmvpn
+ match: none
+ when: global_mcast_group_L3 is defined
+
+ - block:
+
+ - name: configure vxlan_vtep
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: &id001
+ interface: nve1
+ description: abcd
+ host_reachability: true
+ source_interface: Loopback0
+ source_interface_hold_down_time: 30
+ global_ingress_replication_bgp: '{{ global_ingress_replication_bgp|default(omit)
+ }}'
+ global_suppress_arp: '{{ global_suppress_arp|default(omit) }}'
+ global_mcast_group_L3: '{{ global_mcast_group_L3|default(omit) }}'
+ shutdown: false
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: reset vxlan_vtep
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: &id003
+ interface: nve1
+ description: default
+ host_reachability: false
+ source_interface_hold_down_time: default
+ source_interface: default
+ global_ingress_replication_bgp: '{{ def_global_ingress_replication_bgp|default(omit)
+ }}'
+ global_suppress_arp: '{{ def_global_suppress_arp|default(omit) }}'
+ global_mcast_group_L3: '{{ def_global_mcast_group_L3|default(omit) }}'
+ shutdown: true
+
+ - assert: *id002
+
+ - name: reset Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: *id003
+
+ - assert: *id004
+
+ - name: configure global mcast L2
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: &id005
+ interface: nve1
+ host_reachability: true
+ global_mcast_group_L2: '{{ global_mcast_group_L2|default(omit) }}'
+
+ - assert: *id002
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: *id005
+
+ - assert: *id004
+
+ - name: reset global mcast L2
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: &id006
+ interface: nve1
+ host_reachability: false
+ global_mcast_group_L2: '{{ def_global_mcast_group_L2|default(omit) }}'
+
+ - assert: *id002
+
+ - name: reset Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: *id006
+
+ - assert: *id004
+ when: (platform is search('N9K'))
+
+ - block:
+
+ - name: configure vxlan_vtep
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: &id007
+ interface: nve1
+ description: default
+ host_reachability: true
+ source_interface: Loopback0
+ shutdown: false
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Conf Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: *id007
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: reset vxlan_vtep
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: &id008
+ interface: nve1
+ description: default
+ host_reachability: false
+ source_interface: default
+ shutdown: true
+
+ - assert: *id002
+
+ - name: reset Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: *id008
+
+ - assert: *id004
+ when: (platform is search('N7K'))
+
+ - name: remove vxlan_vtep
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: &id009
+ interface: nve1
+ description: default
+ host_reachability: true
+ source_interface: Loopback0
+ source_interface_hold_down_time: 30
+ shutdown: true
+ state: absent
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - name: Remove Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep: *id009
+
+ - assert:
+ that:
+ - result.changed == false
+ when: (platform is search("N7K|N9K"))
+ always:
+
+ - name: Apply N7K specific cleanup config
+ include: targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml
+ when: platform is match('N7K')
+
+ - name: Disable nv overlay evpn
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ commands:
+ - no nv overlay evpn
+ match: none
+
+ - name: Disable feature nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nve
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vxlan_vtep sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/meta/main.yml
new file mode 100644
index 00000000..f504a6ab
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/meta/main.yml
@@ -0,0 +1,3 @@
+---
+dependencies:
+ - prepare_nxos_tests
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tasks/main.yaml
new file mode 100644
index 00000000..9d6833c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tasks/main.yaml
@@ -0,0 +1,11 @@
+---
+- block:
+
+ - include: cli.yaml
+ tags:
+ - cli
+ always:
+
+ - include: nxapi.yaml
+ tags:
+ - nxapi
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tasks/nxapi.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tasks/nxapi.yaml
new file mode 100644
index 00000000..0d152403
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tasks/nxapi.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect nxapi test cases
+ find:
+ paths: '{{ role_path }}/tests/nxapi'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: nxapi_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ nxapi_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.httpapi)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.httpapi
+ connection={{ nxapi }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tests/common/multisite.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tests/common/multisite.yaml
new file mode 100644
index 00000000..bcc44cc4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tests/common/multisite.yaml
@@ -0,0 +1,108 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vxlan_vtep_vni multisite
+ sanity test"
+
+- name: Disable feature nv overlay - multisite
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nv overlay
+ state: disabled
+
+- name: Enable feature nv overlay - multisite
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nv overlay
+ state: enabled
+
+- name: Enable nv overlay evpn - multisite
+ when: platform is search('N9K')
+ cisco.nxos.nxos_config:
+ lines:
+ - nv overlay evpn
+
+- name: Enable multisite border gateway - multisite
+ ignore_errors: true
+ register: multiout
+ cisco.nxos.nxos_config:
+ lines:
+ - evpn multisite border-gateway 10
+
+- block:
+
+ - name: configure vxlan_vtep - multisite
+ cisco.nxos.nxos_vxlan_vtep:
+ interface: nve1
+ host_reachability: true
+
+ - name: Configure multisite ingress replication - multisite
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: &id001
+ interface: nve1
+ vni: 8000
+ multisite_ingress_replication: enable
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Idempotence check
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id001
+
+ - assert: &id003
+ that:
+ - result.changed == false
+
+ - name: Remove multisite ingress replication - multisite
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: &id004
+ interface: nve1
+ vni: 8000
+ multisite_ingress_replication: disable
+
+ - assert: *id002
+
+ - name: Idempotence check
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id004
+
+ - assert: *id003
+
+ - name: Configure optimized multisite ingress replication - multisite
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: &id005
+ interface: nve1
+ vni: 8000
+ multisite_ingress_replication: optimized
+
+ - assert: *id002
+
+ - name: Idempotence check
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id005
+
+ - assert: *id003
+
+ - name: Disable multisite border gateway - multisite
+ cisco.nxos.nxos_config:
+ lines:
+ - no evpn multisite border-gateway 10
+ when: multiout is not search("Invalid command")
+
+- name: Disable feature nv overlay - multisite
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nv overlay
+ state: disabled
+
+- pause:
+ seconds: 5
+
+- name: Remove nv overlay evpn - multisite
+ when: platform is search('N9K')
+ cisco.nxos.nxos_config:
+ lines:
+ - no nv overlay evpn
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vxlan_vtep_vni multisite
+ sanity test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml
new file mode 100644
index 00000000..f80b0227
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml
@@ -0,0 +1,253 @@
+---
+- debug: msg="START connection={{ ansible_connection }} nxos_vxlan_vtep_vni sanity
+ test"
+
+- block:
+
+ - name: Apply N7K specific setup config
+ include: targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml
+ when: platform is match('N7K')
+
+ - name: Enable feature nv overlay
+ cisco.nxos.nxos_config:
+ commands:
+ - feature nv overlay
+ match: none
+
+ - name: configure vxlan_vtep
+ cisco.nxos.nxos_vxlan_vtep:
+ interface: nve1
+ host_reachability: true
+
+ - name: configure vxlan_vtep_vni assoc-vrf
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: &id001
+ interface: nve1
+ vni: 6000
+ assoc_vrf: true
+
+ - assert: &id002
+ that:
+ - result.changed == true
+
+ - name: Conf 1 Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id001
+
+ - assert: &id004
+ that:
+ - result.changed == false
+
+ - name: remove vxlan_vtep_vni
+ cisco.nxos.nxos_vxlan_vtep_vni:
+ interface: nve1
+ vni: 6000
+ assoc_vrf: true
+ state: absent
+
+ - name: configure vxlan_vtep_vni
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni:
+ interface: nve1
+ vni: 8000
+
+ - assert: *id002
+
+ - name: configure vxlan_vtep_vni mcast
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: &id003
+ interface: nve1
+ vni: 8000
+ multicast_group: 224.1.1.1
+
+ - assert: *id002
+
+ - name: Conf 3 Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id003
+
+ - assert: *id004
+
+ - name: configure vxlan_vtep_vni default mcast
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: &id005
+ interface: nve1
+ vni: 8000
+ multicast_group: default
+
+ - assert: *id002
+
+ - name: Conf 4 Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id005
+
+ - assert: *id004
+
+ - name: remove config
+ cisco.nxos.nxos_vxlan_vtep_vni: &id013
+ interface: nve1
+ vni: 8000
+ state: absent
+
+ - name: configure vxlan_vtep
+ cisco.nxos.nxos_vxlan_vtep:
+ interface: nve1
+ host_reachability: false
+
+ - block:
+
+ - name: configure vxlan_vtep_vni
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni:
+ interface: nve1
+ vni: 8000
+
+ - assert: *id002
+
+ - name: configure vxlan_vtep_vni ingress static
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: &id006
+ interface: nve1
+ vni: 8000
+ ingress_replication: static
+
+ - assert: *id002
+
+ - name: check configure vxlan_vtep_vni ingress static idempotence check
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id006
+
+ - assert: *id004
+
+ - name: Remove and reconfigure vxlan_vtep
+ cisco.nxos.nxos_vxlan_vtep: &id009
+ interface: nve1
+ state: absent
+
+ - name: Configure vxlan_vtep with host reachability bgp
+ cisco.nxos.nxos_vxlan_vtep:
+ interface: nve1
+ host_reachability: true
+
+ - name: configure vxlan_vtep_vni
+ cisco.nxos.nxos_vxlan_vtep_vni: &id010
+ interface: nve1
+ vni: 8000
+
+ - name: configure vxlan_vtep_vni ingress bgp
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: &id007
+ interface: nve1
+ vni: 8000
+ ingress_replication: bgp
+
+ - assert: *id002
+
+ - name: Conf 7 Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id007
+
+ - assert: *id004
+
+ - name: remove ingress_repl
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: &id008
+ interface: nve1
+ vni: 8000
+ ingress_replication: default
+
+ - assert: *id002
+
+ - name: Conf 8 Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id008
+
+ - assert: *id004
+
+ - name: Remove and reconfigure vxlan_vtep
+ cisco.nxos.nxos_vxlan_vtep: *id009
+
+ - name: Configure vxlan_vtep with host reachability static
+ cisco.nxos.nxos_vxlan_vtep:
+ interface: nve1
+ host_reachability: false
+
+ - name: configure vxlan_vtep_vni
+ cisco.nxos.nxos_vxlan_vtep_vni: *id010
+
+ - name: configure vxlan_vtep_vni peer-list
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: &id011
+ interface: nve1
+ vni: 8000
+ peer_list:
+ - 192.0.2.1
+ - 192.0.2.2
+ - 192.0.2.3
+ - 192.0.2.4
+ ingress_replication: static
+
+ - assert: *id002
+
+ - name: Conf 9 Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id011
+
+ - assert: *id004
+
+ - name: configure vxlan_vtep_vni default peer-list
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: &id012
+ interface: nve1
+ vni: 8000
+ peer_list: default
+ ingress_replication: static
+
+ - assert: *id002
+
+ - name: Conf 10 Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id012
+
+ - assert: *id004
+
+ - name: Conf 9 again
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id011
+
+ - assert: *id002
+
+ - name: remove vxlan_vtep_vni
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id013
+
+ - assert: *id002
+
+ - name: remove Idempotence
+ register: result
+ cisco.nxos.nxos_vxlan_vtep_vni: *id013
+
+ - assert: *id004
+ when: (platform is search('N9K'))
+ when: (platform is search("N7K|N9K"))
+ always:
+
+ - name: Apply N7K specific cleanup config
+ include: targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml
+ when: platform is match('N7K')
+
+ - name: remove vxlan_vtep
+ ignore_errors: true
+ cisco.nxos.nxos_vxlan_vtep:
+ interface: nve1
+ shutdown: true
+ state: absent
+
+ - name: Disable feature nv overlay
+ ignore_errors: true
+ cisco.nxos.nxos_feature:
+ feature: nve
+ state: disabled
+
+- debug: msg="END connection={{ ansible_connection }} nxos_vxlan_vtep_vni sanity
+ test"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/defaults/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/defaults/main.yaml
new file mode 100644
index 00000000..10c0fabc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+testcase: '*'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/meta/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/meta/main.yml
new file mode 100644
index 00000000..91da2a75
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/meta/main.yml
@@ -0,0 +1,2 @@
+---
+...
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/tasks/cli.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/tasks/cli.yaml
new file mode 100644
index 00000000..1b09e6e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/tasks/cli.yaml
@@ -0,0 +1,28 @@
+---
+- name: collect common test cases
+ find:
+ paths: '{{ role_path }}/tests/common'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: test_cases
+
+- name: collect cli test cases
+ find:
+ paths: '{{ role_path }}/tests/cli'
+ patterns: '{{ testcase }}.yaml'
+ connection: local
+ register: cli_cases
+
+- set_fact:
+ test_cases:
+ files: '{{ test_cases.files }} + {{ cli_cases.files }}'
+
+- name: set test_items
+ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
+
+- name: run test cases (connection=ansible.netcommon.network_cli)
+ include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli
+ connection={{ cli }}'
+ with_items: '{{ test_items }}'
+ loop_control:
+ loop_var: test_case_to_run
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/tasks/main.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/tasks/main.yaml
new file mode 100644
index 00000000..d7c416ee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/tasks/main.yaml
@@ -0,0 +1,18 @@
+---
+- name: Check platform type and skip if not MDS
+ register: result
+ cisco.nxos.nxos_command:
+ commands: show version | grep MDS
+
+- name: Set skip_test flag to false
+ set_fact:
+ skip_test=False
+
+- name: Set skip_test flag to true if not MDS
+ set_fact:
+ skip_test=True
+ when: result.stdout[0] is not search('MDS')
+
+- include: cli.yaml
+ tags: cli
+ when: not skip_test
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/tests/common/sanity.yaml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/tests/common/sanity.yaml
new file mode 100644
index 00000000..cc8d2684
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/tests/common/sanity.yaml
@@ -0,0 +1,222 @@
+---
+- debug: msg="START nxos_zone_zoneset sanity test with connection={{ ansible_connection
+ }} "
+
+- debug: msg="Using vsans {{ vsan1 }}, {{ vsan2 }} for running this sanity test,
+ please make sure these are not used in the setup, these will be deleted after
+ the tests"
+
+- always:
+
+ - name: Remove vsan config
+ cisco.nxos.nxos_vsan:
+ vsan:
+
+ - id: '{{ vsan1 | int }}'
+ remove: true
+
+ - id: '{{ vsan2 | int }}'
+ remove: true
+ block:
+
+ - ignore_errors: true
+ name: Setup - Remove vsan if configured
+ cisco.nxos.nxos_vsan:
+ vsan:
+
+ - id: '{{ vsan1 | int }}'
+ remove: true
+
+ - id: '{{ vsan2 | int }}'
+ remove: true
+
+ - name: Configure vsan
+ cisco.nxos.nxos_vsan:
+ vsan:
+
+ - id: '{{ vsan1 | int }}'
+
+ - id: '{{ vsan2 | int }}'
+
+ - name: Configure zone and zoneset
+ register: result
+ cisco.nxos.nxos_zone_zoneset: &id001
+ zone_zoneset_details:
+
+ - mode: enhanced
+ vsan: '{{ vsan1 | int }}'
+ zone:
+
+ - members:
+
+ - pwwn: "11:11:11:11:11:11:11:11"
+
+ - device_alias: test123
+
+ - pwwn: "61:61:62:62:12:12:12:12"
+ remove: true
+ name: zoneA
+
+ - members:
+
+ - pwwn: "10:11:11:11:11:11:11:11"
+
+ - pwwn: "62:62:62:62:21:21:21:21"
+ name: zoneB
+
+ - name: zoneC
+ remove: true
+ zoneset:
+
+ - action: activate
+ members:
+
+ - name: zoneA
+
+ - name: zoneB
+
+ - name: zoneC
+ remove: true
+ name: zsetname1
+
+ - action: deactivate
+ name: zsetTestExtra
+ remove: true
+
+ - mode: basic
+ smart_zoning: true
+ vsan: '{{ vsan2 | int }}'
+ zone:
+
+ - members:
+
+ - devtype: both
+ pwwn: "11:11:11:11:11:11:11:11"
+
+ - pwwn: "62:62:62:62:12:12:12:12"
+
+ - devtype: both
+ pwwn: "92:62:62:62:12:12:1a:1a"
+ remove: true
+ name: zone21A
+
+ - members:
+
+ - pwwn: "10:11:11:11:11:11:11:11"
+
+ - pwwn: "62:62:62:62:21:21:21:21"
+
+ - device_alias: somedummyname
+
+ - device_alias: anydummyname
+ remove: true
+ name: zone21B
+ zoneset:
+
+ - action: activate
+ members:
+
+ - name: zone21A
+
+ - name: zone21B
+ name: zsetname21
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - assert:
+ that:
+ - result.commands == ["terminal dont-ask", "zone mode enhanced vsan 922",
+ "zone name zoneA vsan 922", "member pwwn 11:11:11:11:11:11:11:11", "member
+ device-alias test123", "zone name zoneB vsan 922", "member pwwn 10:11:11:11:11:11:11:11",
+ "member pwwn 62:62:62:62:21:21:21:21", "zoneset name zsetname1 vsan
+ 922", "member zoneA", "member zoneB", "zoneset activate name zsetname1
+ vsan 922", "zone commit vsan 922", "zone smart-zoning enable vsan 923",
+ "zone name zone21A vsan 923", "member pwwn 11:11:11:11:11:11:11:11 both",
+ "member pwwn 62:62:62:62:12:12:12:12", "zone name zone21B vsan 923",
+ "member pwwn 10:11:11:11:11:11:11:11", "member pwwn 62:62:62:62:21:21:21:21",
+ "member device-alias somedummyname", "zoneset name zsetname21 vsan 923",
+ "member zone21A", "member zone21B", "zoneset activate name zsetname21
+ vsan 923", "no terminal dont-ask"]
+
+ - name: Idempotence Check
+ register: result
+ cisco.nxos.nxos_zone_zoneset: *id001
+
+ - name: Display Idempotence Check result
+ debug:
+ var: result
+
+ - assert:
+ that:
+ - result.commands == []
+
+ - assert:
+ that:
+ - result.changed == false
+
+ - name: Delete zone and zoneset that was configured
+ register: result
+ cisco.nxos.nxos_zone_zoneset: &id002
+ zone_zoneset_details:
+
+ - mode: enhanced
+ vsan: '{{ vsan1 | int }}'
+ zone:
+
+ - name: zoneA
+ remove: true
+
+ - name: zoneB
+ remove: true
+
+ - name: zoneC
+ remove: true
+ zoneset:
+
+ - name: zsetname1
+ remove: true
+
+ - action: deactivate
+ name: zsetTestExtra
+ remove: true
+
+ - mode: basic
+ smart_zoning: true
+ vsan: '{{ vsan2 | int }}'
+ zone:
+
+ - name: zone21A
+ remove: true
+
+ - name: zone21B
+ remove: true
+ zoneset:
+
+ - name: zsetname21
+ remove: true
+
+ - assert:
+ that:
+ - result.changed == true
+
+ - assert:
+ that:
+ - result.commands == ["terminal dont-ask", "no zone name zoneA vsan 922",
+ "no zone name zoneB vsan 922", "no zoneset name zsetname1 vsan 922",
+ "zone commit vsan 922", "no zone name zone21A vsan 923", "no zone name
+ zone21B vsan 923", "no zoneset name zsetname21 vsan 923", "no terminal
+ dont-ask"]
+
+ - name: Idempotence Check for zone/zoneset removal
+ register: result
+ cisco.nxos.nxos_zone_zoneset: *id002
+
+ - assert:
+ that:
+ - result.commands == []
+
+ - assert:
+ that:
+ - result.changed == false
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/vars/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/vars/main.yml
new file mode 100644
index 00000000..9c8077a4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/nxos_zone_zoneset/vars/main.yml
@@ -0,0 +1,5 @@
+---
+vsan1: 922
+vsan2: 923
+intA1: fc1/1
+intB1: fc1/2
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/prepare_nxos_tests/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/prepare_nxos_tests/tasks/main.yml
new file mode 100644
index 00000000..b9ae40f3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/integration/targets/prepare_nxos_tests/tasks/main.yml
@@ -0,0 +1,149 @@
+---
+- block:
+
+ - name: Enable Feature Privilege
+ connection: ansible.netcommon.network_cli
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - feature privilege
+
+ - name: Enable Feature NXAPI
+ connection: ansible.netcommon.network_cli
+ cisco.nxos.nxos_nxapi:
+ state: present
+
+ - name: Enable lldp
+ connection: ansible.netcommon.network_cli
+ ignore_errors: true
+ cisco.nxos.nxos_config:
+ lines:
+ - feature lldp
+
+ - name: Collect interface list
+ connection: ansible.netcommon.network_cli
+ register: intout
+ cisco.nxos.nxos_command:
+ commands:
+ - show interface brief | json
+
+ - set_fact:
+ intdataraw: "{{ intout.stdout_lines[0]['TABLE_interface']['ROW_interface']\
+ \ }}"
+
+ - set_fact:
+ nxos_int1: '{{ intdataraw[1].interface }}'
+
+ - set_fact:
+ nxos_int2: '{{ intdataraw[2].interface }}'
+
+ - set_fact:
+ nxos_int3: '{{ intdataraw[3].interface }}'
+
+ - name: Gather image version info
+ connection: ansible.netcommon.network_cli
+ register: nxos_version_output
+ cisco.nxos.nxos_command:
+ commands:
+ - show version | json
+
+ - set_fact:
+ image_version: "{{ nxos_version_output.stdout[0]['kickstart_ver_str'] }}"
+
+ - name: Gather platform info
+ connection: ansible.netcommon.network_cli
+ register: nxos_inventory_output
+ cisco.nxos.nxos_command:
+ commands:
+ - show inventory | json
+
+ - set_fact:
+ platform: "{{ nxos_inventory_output.stdout_lines[0]['TABLE_inv']['ROW_inv'][0]['productid'].split('-')[0]\
+ \ }}"
+
+ - set_fact:
+ chassis_type: "{{ nxos_inventory_output.stdout_lines[0]['TABLE_inv']['ROW_inv'][0]['productid'].split('-')[1]\
+ \ }}"
+
+ - set_fact:
+ fretta: "{% for row in nxos_inventory_output.stdout_lines[0]['TABLE_inv']['ROW_inv']\
+ \ if '-R' in row['productid'] %}true{% endfor %}"
+ when: platform is match("N9K|N3K")
+
+ - set_fact:
+ platform: N3K-F
+ when: ( platform is match("N3K")) and ( fretta is search("true"))
+
+ - set_fact:
+ platform: N9K-F
+ when: ( platform is match("N9K")) and ( fretta is search("true"))
+
+ - set_fact:
+ titanium: 'false'
+
+ - set_fact:
+ titanium: "{% for row in nxos_inventory_output.stdout_lines[0]['TABLE_inv']['ROW_inv']\
+ \ if 'NX-OSv' in row['desc']%}true{% endfor %}"
+ when: platform is match("N7K")
+
+ - set_fact:
+ platform: N35
+ when: ( chassis_type is search("C35"))
+
+ - set_fact:
+ platform: N35NG
+ when: ( chassis_type is search("C35")) and image_version is search("7.0\(3\)I7")
+
+ - set_fact:
+ platform: N3L
+ when: ( chassis_type is search("C3048"))
+
+ - set_fact:
+ imagetag: ''
+
+ - set_fact:
+ imagemr: ''
+
+ - set_fact:
+ major_version: '{{ image_version[0:3] }}'
+
+ - set_fact:
+ imagetag: '{{ image_version[0:3] }}'
+ when: image_version is search("\d\.\d\(\d\)")
+
+ - set_fact:
+ imagetag: '{{ image_version[6:8] }}'
+ when: image_version is search("\d\.\d\(\d\)\S\S\(\d\)")
+
+ - set_fact:
+ imagetag: '{{ image_version[6:10] }}'
+ when: image_version is search("\d\.\d\(\d\)\S\S\S\S\(\d\)")
+
+ - set_fact:
+ imagemr: '{{ image_version[4:5] }}'
+ when: image_version is search("\d\.\d\(\d\)")
+
+ - set_fact:
+ imagemr: '{{ image_version[9:10] }}'
+ when: image_version is search("\d\.\d\(\d\)\S\S\(\d\)")
+
+ - set_fact:
+ imagemr: '{{ image_version[11:12] }}'
+ when: image_version is search("\d\.\d\(\d\)\S\S\S\S\(\d\)")
+
+ - debug:
+ msg: IMAGE VERSION {{ image_version }}
+
+ - debug:
+ msg: IMAGE TAG {{ imagetag }}
+
+ - debug:
+ msg: IMAGE MR {{ imagemr }}
+
+ - set_fact:
+ ipv6_supported: 'true'
+
+ - set_fact:
+ ipv6_supported: 'false'
+ when: platform is match("N35")
+ when: prepare_nxos_tests_task | default(True) | bool
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/sanity/ignore-2.10.txt b/collections-debian-merged/ansible_collections/cisco/nxos/tests/sanity/ignore-2.10.txt
new file mode 100644
index 00000000..46cfbc64
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/sanity/ignore-2.10.txt
@@ -0,0 +1 @@
+plugins/action/nxos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/sanity/ignore-2.9.txt b/collections-debian-merged/ansible_collections/cisco/nxos/tests/sanity/ignore-2.9.txt
new file mode 100644
index 00000000..19b33017
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/sanity/ignore-2.9.txt
@@ -0,0 +1,31 @@
+plugins/modules/nxos_acl.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_acl.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_acl_interface.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_acl_interface.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_interface.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_interface.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_l2_interface.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_l2_interface.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_l3_interface.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_l3_interface.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_linkagg.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_linkagg.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_lldp.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_lldp.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_ospf.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_ospf.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_static_route.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_static_route.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_vlan.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_vlan.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_ospf_vrf.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_ospf_vrf.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/action/nxos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
+plugins/modules/nxos_smu.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_smu.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_interface_ospf.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_interface_ospf.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_bgp.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_bgp.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
+plugins/modules/nxos_bgp_neighbor.py validate-modules:deprecation-mismatch # 2.9 expects METADATA
+plugins/modules/nxos_bgp_neighbor.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/sanity/requirements.txt b/collections-debian-merged/ansible_collections/cisco/nxos/tests/sanity/requirements.txt
new file mode 100644
index 00000000..3e3a9669
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/sanity/requirements.txt
@@ -0,0 +1,4 @@
+packaging # needed for update-bundled and changelog
+sphinx ; python_version >= '3.5' # docs build requires python 3+
+sphinx-notfound-page ; python_version >= '3.5' # docs build requires python 3+
+straight.plugin ; python_version >= '3.5' # needed for hacking/build-ansible.py which will host changelog generation and requires python 3+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/builtins.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/builtins.py
new file mode 100644
index 00000000..bfc8adfb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/builtins.py
@@ -0,0 +1,34 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+#
+# Compat for python2.7
+#
+
+# One unittest needs to import builtins via __import__() so we need to have
+# the string that represents it
+try:
+ import __builtin__
+except ImportError:
+ BUILTINS = "builtins"
+else:
+ BUILTINS = "__builtin__"
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/mock.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/mock.py
new file mode 100644
index 00000000..b45d6b5c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/mock.py
@@ -0,0 +1,127 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+Compat module for Python3.x's unittest.mock module
+"""
+import sys
+
+# Python 2.7
+
+# Note: Could use the pypi mock library on python3.x as well as python2.x. It
+# is the same as the python3 stdlib mock library
+
+try:
+ # Allow wildcard import because we really do want to import all of mock's
+ # symbols into this compat shim
+ # pylint: disable=wildcard-import,unused-wildcard-import
+ from unittest.mock import *
+except ImportError:
+ # Python 2
+ # pylint: disable=wildcard-import,unused-wildcard-import
+ try:
+ from mock import *
+ except ImportError:
+ print("You need the mock library installed on python2.x to run tests")
+
+
+# Prior to 3.4.4, mock_open cannot handle binary read_data
+if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
+ file_spec = None
+
+ def _iterate_read_data(read_data):
+ # Helper for mock_open:
+ # Retrieve lines from read_data via a generator so that separate calls to
+ # readline, read, and readlines are properly interleaved
+ sep = b"\n" if isinstance(read_data, bytes) else "\n"
+ data_as_list = [l + sep for l in read_data.split(sep)]
+
+ if data_as_list[-1] == sep:
+ # If the last line ended in a newline, the list comprehension will have an
+ # extra entry that's just a newline. Remove this.
+ data_as_list = data_as_list[:-1]
+ else:
+ # If there wasn't an extra newline by itself, then the file being
+ # emulated doesn't have a newline to end the last line remove the
+ # newline that our naive format() added
+ data_as_list[-1] = data_as_list[-1][:-1]
+
+ for line in data_as_list:
+ yield line
+
+ def mock_open(mock=None, read_data=""):
+ """
+ A helper function to create a mock to replace the use of `open`. It works
+ for `open` called directly or used as a context manager.
+
+ The `mock` argument is the mock object to configure. If `None` (the
+ default) then a `MagicMock` will be created for you, with the API limited
+ to methods or attributes available on standard file handles.
+
+ `read_data` is a string for the `read` methoddline`, and `readlines` of the
+ file handle to return. This is an empty string by default.
+ """
+
+ def _readlines_side_effect(*args, **kwargs):
+ if handle.readlines.return_value is not None:
+ return handle.readlines.return_value
+ return list(_data)
+
+ def _read_side_effect(*args, **kwargs):
+ if handle.read.return_value is not None:
+ return handle.read.return_value
+ return type(read_data)().join(_data)
+
+ def _readline_side_effect():
+ if handle.readline.return_value is not None:
+ while True:
+ yield handle.readline.return_value
+ for line in _data:
+ yield line
+
+ global file_spec
+ if file_spec is None:
+ import _io
+
+ file_spec = list(
+ set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO)))
+ )
+
+ if mock is None:
+ mock = MagicMock(name="open", spec=open)
+
+ handle = MagicMock(spec=file_spec)
+ handle.__enter__.return_value = handle
+
+ _data = _iterate_read_data(read_data)
+
+ handle.write.return_value = None
+ handle.read.return_value = None
+ handle.readline.return_value = None
+ handle.readlines.return_value = None
+
+ handle.read.side_effect = _read_side_effect
+ handle.readline.side_effect = _readline_side_effect()
+ handle.readlines.side_effect = _readlines_side_effect
+
+ mock.return_value = handle
+ return mock
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/unittest.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/unittest.py
new file mode 100644
index 00000000..df3379b8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/compat/unittest.py
@@ -0,0 +1,39 @@
+# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+"""
+Compat module for Python2.7's unittest module
+"""
+
+import sys
+
+# Allow wildcard import because we really do want to import all of
+# unittests's symbols into this compat shim
+# pylint: disable=wildcard-import,unused-wildcard-import
+if sys.version_info < (2, 7):
+ try:
+ # Need unittest2 on python2.6
+ from unittest2 import *
+ except ImportError:
+ print("You need unittest2 installed on python2.6.x to run tests")
+else:
+ from unittest import *
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/loader.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/loader.py
new file mode 100644
index 00000000..c21188ee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/loader.py
@@ -0,0 +1,116 @@
+# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import os
+
+from ansible.errors import AnsibleParserError
+from ansible.parsing.dataloader import DataLoader
+from ansible.module_utils._text import to_bytes, to_text
+
+
+class DictDataLoader(DataLoader):
+ def __init__(self, file_mapping=None):
+ file_mapping = {} if file_mapping is None else file_mapping
+ assert type(file_mapping) == dict
+
+ super(DictDataLoader, self).__init__()
+
+ self._file_mapping = file_mapping
+ self._build_known_directories()
+ self._vault_secrets = None
+
+ def load_from_file(self, path, cache=True, unsafe=False):
+ path = to_text(path)
+ if path in self._file_mapping:
+ return self.load(self._file_mapping[path], path)
+ return None
+
+ # TODO: the real _get_file_contents returns a bytestring, so we actually convert the
+ # unicode/text it's created with to utf-8
+ def _get_file_contents(self, path):
+ path = to_text(path)
+ if path in self._file_mapping:
+ return (to_bytes(self._file_mapping[path]), False)
+ else:
+ raise AnsibleParserError("file not found: %s" % path)
+
+ def path_exists(self, path):
+ path = to_text(path)
+ return path in self._file_mapping or path in self._known_directories
+
+ def is_file(self, path):
+ path = to_text(path)
+ return path in self._file_mapping
+
+ def is_directory(self, path):
+ path = to_text(path)
+ return path in self._known_directories
+
+ def list_directory(self, path):
+ ret = []
+ path = to_text(path)
+ for x in list(self._file_mapping.keys()) + self._known_directories:
+ if x.startswith(path):
+ if os.path.dirname(x) == path:
+ ret.append(os.path.basename(x))
+ return ret
+
+ def is_executable(self, path):
+ # FIXME: figure out a way to make paths return true for this
+ return False
+
+ def _add_known_directory(self, directory):
+ if directory not in self._known_directories:
+ self._known_directories.append(directory)
+
+ def _build_known_directories(self):
+ self._known_directories = []
+ for path in self._file_mapping:
+ dirname = os.path.dirname(path)
+ while dirname not in ("/", ""):
+ self._add_known_directory(dirname)
+ dirname = os.path.dirname(dirname)
+
+ def push(self, path, content):
+ rebuild_dirs = False
+ if path not in self._file_mapping:
+ rebuild_dirs = True
+
+ self._file_mapping[path] = content
+
+ if rebuild_dirs:
+ self._build_known_directories()
+
+ def pop(self, path):
+ if path in self._file_mapping:
+ del self._file_mapping[path]
+ self._build_known_directories()
+
+ def clear(self):
+ self._file_mapping = dict()
+ self._known_directories = []
+
+ def get_basedir(self):
+ return os.getcwd()
+
+ def set_vault_secrets(self, vault_secrets):
+ self._vault_secrets = vault_secrets
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/path.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/path.py
new file mode 100644
index 00000000..8db8e041
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/path.py
@@ -0,0 +1,10 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import MagicMock
+from ansible.utils.path import unfrackpath
+
+
+mock_unfrackpath_noop = MagicMock(
+ spec_set=unfrackpath, side_effect=lambda x, *args, **kwargs: x
+)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/procenv.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/procenv.py
new file mode 100644
index 00000000..59fc1978
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/procenv.py
@@ -0,0 +1,94 @@
+# (c) 2016, Matt Davis <mdavis@ansible.com>
+# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import sys
+import json
+
+from contextlib import contextmanager
+from io import BytesIO, StringIO
+from ansible_collections.cisco.nxos.tests.unit.compat import unittest
+from ansible.module_utils.six import PY3
+from ansible.module_utils._text import to_bytes
+
+
+@contextmanager
+def swap_stdin_and_argv(stdin_data="", argv_data=tuple()):
+ """
+ context manager that temporarily masks the test runner's values for stdin and argv
+ """
+ real_stdin = sys.stdin
+ real_argv = sys.argv
+
+ if PY3:
+ fake_stream = StringIO(stdin_data)
+ fake_stream.buffer = BytesIO(to_bytes(stdin_data))
+ else:
+ fake_stream = BytesIO(to_bytes(stdin_data))
+
+ try:
+ sys.stdin = fake_stream
+ sys.argv = argv_data
+
+ yield
+ finally:
+ sys.stdin = real_stdin
+ sys.argv = real_argv
+
+
+@contextmanager
+def swap_stdout():
+ """
+ context manager that temporarily replaces stdout for tests that need to verify output
+ """
+ old_stdout = sys.stdout
+
+ if PY3:
+ fake_stream = StringIO()
+ else:
+ fake_stream = BytesIO()
+
+ try:
+ sys.stdout = fake_stream
+
+ yield fake_stream
+ finally:
+ sys.stdout = old_stdout
+
+
+class ModuleTestCase(unittest.TestCase):
+ def setUp(self, module_args=None):
+ if module_args is None:
+ module_args = {
+ "_ansible_remote_tmp": "/tmp",
+ "_ansible_keep_remote_files": False,
+ }
+
+ args = json.dumps(dict(ANSIBLE_MODULE_ARGS=module_args))
+
+ # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
+ self.stdin_swap = swap_stdin_and_argv(stdin_data=args)
+ self.stdin_swap.__enter__()
+
+ def tearDown(self):
+ # unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
+ self.stdin_swap.__exit__(None, None, None)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/vault_helper.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/vault_helper.py
new file mode 100644
index 00000000..b34ae134
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/vault_helper.py
@@ -0,0 +1,42 @@
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible.module_utils._text import to_bytes
+
+from ansible.parsing.vault import VaultSecret
+
+
+class TextVaultSecret(VaultSecret):
+ """A secret piece of text. ie, a password. Tracks text encoding.
+
+ The text encoding of the text may not be the default text encoding so
+ we keep track of the encoding so we encode it to the same bytes."""
+
+ def __init__(self, text, encoding=None, errors=None, _bytes=None):
+ super(TextVaultSecret, self).__init__()
+ self.text = text
+ self.encoding = encoding or "utf-8"
+ self._bytes = _bytes
+ self.errors = errors or "strict"
+
+ @property
+ def bytes(self):
+ """The text encoded with encoding, unless we specifically set _bytes."""
+ return self._bytes or to_bytes(
+ self.text, encoding=self.encoding, errors=self.errors
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/yaml_helper.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/yaml_helper.py
new file mode 100644
index 00000000..5df30aae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/mock/yaml_helper.py
@@ -0,0 +1,167 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import io
+import yaml
+
+from ansible.module_utils.six import PY3
+from ansible.parsing.yaml.loader import AnsibleLoader
+from ansible.parsing.yaml.dumper import AnsibleDumper
+
+
+class YamlTestUtils(object):
+ """Mixin class to combine with a unittest.TestCase subclass."""
+
+ def _loader(self, stream):
+ """Vault related tests will want to override this.
+
+ Vault cases should setup a AnsibleLoader that has the vault password."""
+ return AnsibleLoader(stream)
+
+ def _dump_stream(self, obj, stream, dumper=None):
+ """Dump to a py2-unicode or py3-string stream."""
+ if PY3:
+ return yaml.dump(obj, stream, Dumper=dumper)
+ else:
+ return yaml.dump(obj, stream, Dumper=dumper, encoding=None)
+
+ def _dump_string(self, obj, dumper=None):
+ """Dump to a py2-unicode or py3-string"""
+ if PY3:
+ return yaml.dump(obj, Dumper=dumper)
+ else:
+ return yaml.dump(obj, Dumper=dumper, encoding=None)
+
+ def _dump_load_cycle(self, obj):
+ # Each pass though a dump or load revs the 'generation'
+ # obj to yaml string
+ string_from_object_dump = self._dump_string(obj, dumper=AnsibleDumper)
+
+ # wrap a stream/file like StringIO around that yaml
+ stream_from_object_dump = io.StringIO(string_from_object_dump)
+ loader = self._loader(stream_from_object_dump)
+ # load the yaml stream to create a new instance of the object (gen 2)
+ obj_2 = loader.get_data()
+
+ # dump the gen 2 objects directory to strings
+ string_from_object_dump_2 = self._dump_string(
+ obj_2, dumper=AnsibleDumper
+ )
+
+ # The gen 1 and gen 2 yaml strings
+ self.assertEqual(string_from_object_dump, string_from_object_dump_2)
+ # the gen 1 (orig) and gen 2 py object
+ self.assertEqual(obj, obj_2)
+
+ # again! gen 3... load strings into py objects
+ stream_3 = io.StringIO(string_from_object_dump_2)
+ loader_3 = self._loader(stream_3)
+ obj_3 = loader_3.get_data()
+
+ string_from_object_dump_3 = self._dump_string(
+ obj_3, dumper=AnsibleDumper
+ )
+
+ self.assertEqual(obj, obj_3)
+ # should be transitive, but...
+ self.assertEqual(obj_2, obj_3)
+ self.assertEqual(string_from_object_dump, string_from_object_dump_3)
+
+ def _old_dump_load_cycle(self, obj):
+ """Dump the passed in object to yaml, load it back up, dump again, compare."""
+ stream = io.StringIO()
+
+ yaml_string = self._dump_string(obj, dumper=AnsibleDumper)
+ self._dump_stream(obj, stream, dumper=AnsibleDumper)
+
+ yaml_string_from_stream = stream.getvalue()
+
+ # reset stream
+ stream.seek(0)
+
+ loader = self._loader(stream)
+ # loader = AnsibleLoader(stream, vault_password=self.vault_password)
+ obj_from_stream = loader.get_data()
+
+ stream_from_string = io.StringIO(yaml_string)
+ loader2 = self._loader(stream_from_string)
+ # loader2 = AnsibleLoader(stream_from_string, vault_password=self.vault_password)
+ obj_from_string = loader2.get_data()
+
+ stream_obj_from_stream = io.StringIO()
+ stream_obj_from_string = io.StringIO()
+
+ if PY3:
+ yaml.dump(
+ obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper
+ )
+ yaml.dump(
+ obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper
+ )
+ else:
+ yaml.dump(
+ obj_from_stream,
+ stream_obj_from_stream,
+ Dumper=AnsibleDumper,
+ encoding=None,
+ )
+ yaml.dump(
+ obj_from_stream,
+ stream_obj_from_string,
+ Dumper=AnsibleDumper,
+ encoding=None,
+ )
+
+ yaml_string_stream_obj_from_stream = stream_obj_from_stream.getvalue()
+ yaml_string_stream_obj_from_string = stream_obj_from_string.getvalue()
+
+ stream_obj_from_stream.seek(0)
+ stream_obj_from_string.seek(0)
+
+ if PY3:
+ yaml_string_obj_from_stream = yaml.dump(
+ obj_from_stream, Dumper=AnsibleDumper
+ )
+ yaml_string_obj_from_string = yaml.dump(
+ obj_from_string, Dumper=AnsibleDumper
+ )
+ else:
+ yaml_string_obj_from_stream = yaml.dump(
+ obj_from_stream, Dumper=AnsibleDumper, encoding=None
+ )
+ yaml_string_obj_from_string = yaml.dump(
+ obj_from_string, Dumper=AnsibleDumper, encoding=None
+ )
+
+ assert yaml_string == yaml_string_obj_from_stream
+ assert (
+ yaml_string
+ == yaml_string_obj_from_stream
+ == yaml_string_obj_from_string
+ )
+ assert (
+ yaml_string
+ == yaml_string_obj_from_stream
+ == yaml_string_obj_from_string
+ == yaml_string_stream_obj_from_stream
+ == yaml_string_stream_obj_from_string
+ )
+ assert obj == obj_from_stream
+ assert obj == obj_from_string
+ assert obj == yaml_string_obj_from_stream
+ assert obj == yaml_string_obj_from_string
+ assert (
+ obj
+ == obj_from_stream
+ == obj_from_string
+ == yaml_string_obj_from_stream
+ == yaml_string_obj_from_string
+ )
+ return {
+ "obj": obj,
+ "yaml_string": yaml_string,
+ "yaml_string_from_stream": yaml_string_from_stream,
+ "obj_from_stream": obj_from_stream,
+ "obj_from_string": obj_from_string,
+ "yaml_string_obj_from_string": yaml_string_obj_from_string,
+ }
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/conftest.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/conftest.py
new file mode 100644
index 00000000..e19a1e04
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/conftest.py
@@ -0,0 +1,40 @@
+# Copyright (c) 2017 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+
+import pytest
+
+from ansible.module_utils.six import string_types
+from ansible.module_utils._text import to_bytes
+from ansible.module_utils.common._collections_compat import MutableMapping
+
+
+@pytest.fixture
+def patch_ansible_module(request, mocker):
+ if isinstance(request.param, string_types):
+ args = request.param
+ elif isinstance(request.param, MutableMapping):
+ if "ANSIBLE_MODULE_ARGS" not in request.param:
+ request.param = {"ANSIBLE_MODULE_ARGS": request.param}
+ if "_ansible_remote_tmp" not in request.param["ANSIBLE_MODULE_ARGS"]:
+ request.param["ANSIBLE_MODULE_ARGS"][
+ "_ansible_remote_tmp"
+ ] = "/tmp"
+ if (
+ "_ansible_keep_remote_files"
+ not in request.param["ANSIBLE_MODULE_ARGS"]
+ ):
+ request.param["ANSIBLE_MODULE_ARGS"][
+ "_ansible_keep_remote_files"
+ ] = False
+ args = json.dumps(request.param)
+ else:
+ raise Exception(
+ "Malformed data to the patch_ansible_module pytest fixture"
+ )
+
+ mocker.patch("ansible.module_utils.basic._ANSIBLE_ARGS", to_bytes(args))
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/_nxos_ip_interface.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/_nxos_ip_interface.cfg
new file mode 100644
index 00000000..3ca37d78
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/_nxos_ip_interface.cfg
@@ -0,0 +1,30 @@
+IP Interface Status for VRF "default"(1)
+Ethernet2/4, Interface status: protocol-up/link-up/admin-up, iod: 39,
+ IP address: 192.0.2.1, IP subnet: 1.1.1.0/8 route-preference: 0, tag: 0
+ IP broadcast address: 255.255.255.255
+ IP multicast groups locally joined: none
+ IP MTU: 1500 bytes (using link MTU)
+ IP primary address route-preference: 0, tag: 0
+ IP proxy ARP : disabled
+ IP Local Proxy ARP : disabled
+ IP multicast routing: disabled
+ IP icmp redirects: enabled
+ IP directed-broadcast: disabled
+ IP Forwarding: disabled
+ IP icmp unreachables (except port): disabled
+ IP icmp port-unreachable: enabled
+ IP unicast reverse path forwarding: none
+ IP load sharing: none
+ IP interface statistics last reset: never
+ IP interface software stats: (sent/received/forwarded/originated/consumed)
+ Unicast packets : 0/0/0/0/0
+ Unicast bytes : 0/0/0/0/0
+ Multicast packets : 0/0/0/0/0
+ Multicast bytes : 0/0/0/0/0
+ Broadcast packets : 0/0/0/0/0
+ Broadcast bytes : 0/0/0/0/0
+ Labeled packets : 0/0/0/0/0
+ Labeled bytes : 0/0/0/0/0
+ WCCP Redirect outbound: disabled
+ WCCP Redirect inbound: disabled
+ WCCP Redirect exclude: disabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/mds/show_inventory b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/mds/show_inventory
new file mode 100644
index 00000000..2fb8f120
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/mds/show_inventory
@@ -0,0 +1,53 @@
+NAME: "Chassis", DESCR: "MDS 9710 (10 Slot) Chassis"
+PID: DS-C9710 , VID: V01 , SN: JAF1724ADSD
+
+NAME: "Slot 1", DESCR: "4/8/16/32 Gbps Advanced FC Module"
+PID: DS-X9648-1536K9 , VID: V01 , SN: JAE204207TT
+
+NAME: "Slot 2", DESCR: "1/10/40G IPS,2/4/8/10/16G FC Module"
+PID: DS-X9334-K9 , VID: V00 , SN: JAE200806S9
+
+NAME: "Slot 3", DESCR: "2/4/8/10/16 Gbps Advanced FC Module"
+PID: DS-X9448-768K9 , VID: V01 , SN: JAE180605X5
+
+NAME: "Slot 4", DESCR: "2/4/8/10/16 Gbps Advanced FC Module"
+PID: DS-X9448-768K9 , VID: V01 , SN: JAE180605XZ
+
+NAME: "Slot 5", DESCR: "Supervisor Module-3"
+PID: DS-X97-SF1-K9 , VID: V01 , SN: JAE172007TK
+
+NAME: "Slot 6", DESCR: "Supervisor Module-3"
+PID: DS-X97-SF1-K9 , VID: V01 , SN: JAE17200573
+
+NAME: "Slot 7", DESCR: "4/8/16/32 Gbps Advanced FC Module"
+PID: DS-X9648-1536K9 , VID: V01 , SN: JAE203901ZM
+
+NAME: "Slot 8", DESCR: "1/10/40G IPS,2/4/8/10/16G FC Module"
+PID: DS-X9334-K9 , VID: V02 , SN: JAE240306KZ
+
+NAME: "Slot 11", DESCR: "Fabric card module"
+PID: DS-X9710-FAB1 , VID: V01 , SN: JAE172008WA
+
+NAME: "Slot 12", DESCR: "Fabric card module"
+PID: DS-X9710-FAB1 , VID: V01 , SN: JAE172006B7
+
+NAME: "Slot 13", DESCR: "Fabric card module"
+PID: DS-X9710-FAB1 , VID: V01 , SN: JAE1720069V
+
+NAME: "Slot 33", DESCR: "MDS 9710 (10 Slot) Chassis Power Supply"
+PID: DS-CAC97-3KW , VID: V01 , SN: DTM172005SG
+
+NAME: "Slot 34", DESCR: "MDS 9710 (10 Slot) Chassis Power Supply"
+PID: DS-CAC97-3KW , VID: V01 , SN: DTM172005SH
+
+NAME: "Slot 35", DESCR: "MDS 9710 (10 Slot) Chassis Power Supply"
+PID: DS-CAC97-3KW , VID: V01 , SN: DTM172005JK
+
+NAME: "Slot 41", DESCR: "MDS 9710 (10 Slot) Chassis Fan Module"
+PID: DS-C9710-FAN , VID: V01 , SN: JAF1724ALHP
+
+NAME: "Slot 42", DESCR: "MDS 9710 (10 Slot) Chassis Fan Module"
+PID: DS-C9710-FAN , VID: V01 , SN: JAF1721ALCB
+
+NAME: "Slot 43", DESCR: "MDS 9710 (10 Slot) Chassis Fan Module"
+PID: DS-C9710-FAN , VID: V01 , SN: JAF1721AKRL
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/mds/show_version b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/mds/show_version
new file mode 100644
index 00000000..22b9f816
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/mds/show_version
@@ -0,0 +1,40 @@
+Cisco Nexus Operating System (NX-OS) Software
+TAC support: http://www.cisco.com/tac
+Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_serie
+s_home.html
+Copyright (c) 2002-2020, Cisco Systems, Inc. All rights reserved.
+The copyrights to certain works contained herein are owned by
+other third parties and are used and distributed under license.
+Some parts of this software are covered under the GNU Public
+License. A copy of the license is available at
+http://www.gnu.org/licenses/gpl.html.
+
+Software
+ BIOS: version 2.1.18
+ loader: version N/A
+ kickstart: version 8.4(2b)
+ system: version 8.4(2b)
+ BIOS compile time: 04/06/20
+ kickstart image file is: bootflash:///m9100-s5ek9-kickstart-mz.8.4.2b.bin
+ kickstart compile time: 9/30/2020 12:00:00 [10/06/2020 13:37:39]
+ system image file is: bootflash:///m9100-s5ek9-mz.8.4.2b.bin
+ system compile time: 9/30/2020 12:00:00 [10/06/2020 15:30:06]
+
+
+Hardware
+ cisco MDS 9148S 16G 48 FC (1 Slot) Chassis ("2/4/8/16 Gbps FC/Supervisor")
+ Motorola, e500v2 with 4088624 kB of memory.
+ Processor Board ID JAF1751BGPS
+
+ Device name: sw109-Mini
+ bootflash: 4001760 kB
+
+Kernel uptime is 42 day(s), 23 hour(s), 31 minute(s), 29 second(s)
+
+Last reset at 870592 usecs after Tue Oct 13 17:01:33 2020
+ Reason: Reset Requested by CLI command reload
+ System version: 8.4(2b)
+ Service:
+
+plugin
+ Core Plugin
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/nxos/show_inventory b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/nxos/show_inventory
new file mode 100644
index 00000000..128e9410
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/nxos/show_inventory
@@ -0,0 +1,8 @@
+NAME: "Chassis", DESCR: "Nexus9000 C9300v Chassis"
+PID: N9K-C9300v , VID: , SN: 9UTMKABK3C4
+
+NAME: "Slot 1", DESCR: "Nexus 9000v 64 port Ethernet Module"
+PID: N9K-X9364v , VID: , SN: 9VUZB48Q0AF
+
+NAME: "Slot 27", DESCR: "Supervisor Module"
+PID: N9K-vSUP , VID: , SN: 9J9LUC1LLV5
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/nxos/show_version b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/nxos/show_version
new file mode 100644
index 00000000..109c6cd7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/cliconf/nxos/show_version
@@ -0,0 +1,38 @@
+Cisco Nexus Operating System (NX-OS) Software
+TAC support: http://www.cisco.com/tac
+Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_series_home.html
+Copyright (c) 2002-2019, Cisco Systems, Inc. All rights reserved.
+The copyrights to certain works contained herein are owned by
+other third parties and are used and distributed under license.
+Some parts of this software are covered under the GNU Public
+License. A copy of the license is available at
+http://www.gnu.org/licenses/gpl.html.
+
+Nexus 9000v is a demo version of the Nexus Operating System
+
+Software
+ BIOS: version
+ NXOS: version 9.3(3)
+ BIOS compile time:
+ NXOS image file is: bootflash:///nxos.9.3.3.bin
+ NXOS compile time: 12/22/2019 2:00:00 [12/22/2019 14:00:37]
+
+
+Hardware
+ cisco Nexus9000 C9300v Chassis
+ Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz with 6087432 kB of memory.
+ Processor Board ID 9J9LUC1LLV5
+
+ Device name: nxos-9kv-933
+ bootflash: 4287040 kB
+Kernel uptime is 2 day(s), 5 hour(s), 5 minute(s), 41 second(s)
+
+Last reset
+ Reason: Unknown
+ System version:
+ Service:
+
+plugin
+ Core Plugin, Ethernet Plugin
+
+Active Package(s):
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl/show_ip_access-list.txt b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl/show_ip_access-list.txt
new file mode 100644
index 00000000..37be9f7d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl/show_ip_access-list.txt
@@ -0,0 +1,227 @@
+{
+ "TABLE_ip_ipv6_mac": {
+ "ROW_ip_ipv6_mac": [
+ {
+ "op_ip_ipv6_mac": "ip",
+ "acl_name": "copp-system-p-acl-bgp",
+ "TABLE_seqno": {
+ "ROW_seqno": [
+ {
+ "seqno": 10,
+ "permitdeny": "permit",
+ "proto_str": "tcp",
+ "src_any": "any",
+ "src_port_op": "gt",
+ "src_port1_num": "1024",
+ "dest_any": "any",
+ "dest_port_op": "eq",
+ "dest_port1_str": "bgp",
+ "dest_port1_num": "179"
+ },
+ {
+ "seqno": 20,
+ "permitdeny": "permit",
+ "proto_str": "tcp",
+ "src_any": "any",
+ "src_port_op": "eq",
+ "src_port1_str": "bgp",
+ "src_port1_num": "179",
+ "dest_any": "any",
+ "dest_port_op": "gt",
+ "dest_port1_num": "1024"
+ }
+ ]
+ }
+ },
+ {
+ "op_ip_ipv6_mac": "ip",
+ "acl_name": "copp-system-p-acl-cts",
+ "TABLE_seqno": {
+ "ROW_seqno": [
+ {
+ "seqno": 10,
+ "permitdeny": "permit",
+ "proto_str": "tcp",
+ "src_any": "any",
+ "dest_any": "any",
+ "dest_port_op": "eq",
+ "dest_port1_num": "64999"
+ },
+ {
+ "seqno": 20,
+ "permitdeny": "permit",
+ "proto_str": "tcp",
+ "src_any": "any",
+ "src_port_op": "eq",
+ "src_port1_num": "64999",
+ "dest_any": "any"
+ }
+ ]
+ }
+ },
+ {
+ "op_ip_ipv6_mac": "ip",
+ "acl_name": "copp-system-p-acl-dhcp",
+ "TABLE_seqno": {
+ "ROW_seqno": [
+ {
+ "seqno": 10,
+ "permitdeny": "permit",
+ "proto_str": "udp",
+ "src_any": "any",
+ "src_port_op": "eq",
+ "src_port1_str": "bootpc",
+ "src_port1_num": "68",
+ "dest_any": "any"
+ },
+ {
+ "seqno": 20,
+ "permitdeny": "permit",
+ "proto_str": "udp",
+ "src_any": "any",
+ "src_port_op": "neq",
+ "src_port1_str": "bootps",
+ "src_port1_num": "67",
+ "dest_any": "any",
+ "dest_port_op": "eq",
+ "dest_port1_str": "bootps",
+ "dest_port1_num": "67"
+ }
+ ]
+ }
+ },
+ {
+ "op_ip_ipv6_mac": "ip",
+ "acl_name": "copp-system-p-acl-dhcp-relay-response",
+ "TABLE_seqno": {
+ "ROW_seqno": [
+ {
+ "seqno": 10,
+ "permitdeny": "permit",
+ "proto_str": "udp",
+ "src_any": "any",
+ "src_port_op": "eq",
+ "src_port1_str": "bootps",
+ "src_port1_num": "67",
+ "dest_any": "any"
+ },
+ {
+ "seqno": 20,
+ "permitdeny": "permit",
+ "proto_str": "udp",
+ "src_any": "any",
+ "dest_any": "any",
+ "dest_port_op": "eq",
+ "dest_port1_str": "bootpc",
+ "dest_port1_num": "68"
+ }
+ ]
+ }
+ },
+ {
+ "op_ip_ipv6_mac": "ip",
+ "acl_name": "copp-system-p-acl-eigrp",
+ "TABLE_seqno": {
+ "ROW_seqno": {
+ "seqno": 10,
+ "permitdeny": "permit",
+ "proto_str": "eigrp",
+ "src_any": "any",
+ "dest_any": "any"
+ }
+ }
+ },
+ {
+ "op_ip_ipv6_mac": "ip",
+ "acl_name": "copp-system-p-acl-ftp",
+ "TABLE_seqno": {
+ "ROW_seqno": [
+ {
+ "seqno": 10,
+ "permitdeny": "permit",
+ "proto_str": "tcp",
+ "src_any": "any",
+ "dest_any": "any",
+ "dest_port_op": "eq",
+ "dest_port1_str": "ftp-data",
+ "dest_port1_num": "20"
+ },
+ {
+ "seqno": 20,
+ "permitdeny": "permit",
+ "proto_str": "tcp",
+ "src_any": "any",
+ "dest_any": "any",
+ "dest_port_op": "eq",
+ "dest_port1_str": "ftp",
+ "dest_port1_num": "21"
+ },
+ {
+ "seqno": 30,
+ "permitdeny": "permit",
+ "proto_str": "tcp",
+ "src_any": "any",
+ "src_port_op": "eq",
+ "src_port1_str": "ftp-data",
+ "src_port1_num": "20",
+ "dest_any": "any"
+ },
+ {
+ "seqno": 40,
+ "permitdeny": "permit",
+ "proto_str": "tcp",
+ "src_any": "any",
+ "src_port_op": "eq",
+ "src_port1_str": "ftp",
+ "src_port1_num": "21",
+ "dest_any": "any"
+ }
+ ]
+ }
+ },
+ {
+ "op_ip_ipv6_mac": "ip",
+ "acl_name": "copp-system-p-acl-glbp",
+ "TABLE_seqno": {
+ "ROW_seqno": {
+ "seqno": 10,
+ "permitdeny": "permit",
+ "proto_str": "udp",
+ "src_any": "any",
+ "src_port_op": "eq",
+ "src_port1_num": "3222",
+ "dest_ip_prefix": "224.0.0.0/24",
+ "dest_port_op": "eq",
+ "dest_port1_num": "3222"
+ }
+ }
+ },
+ {
+ "op_ip_ipv6_mac": "ip",
+ "acl_name": "copp-system-p-acl-hsrp",
+ "TABLE_seqno": {
+ "ROW_seqno": [
+ {
+ "seqno": 10,
+ "permitdeny": "permit",
+ "proto_str": "udp",
+ "src_any": "any",
+ "dest_ip_prefix": "224.0.0.2/32",
+ "dest_port_op": "eq",
+ "dest_port1_num": "1985"
+ },
+ {
+ "seqno": 20,
+ "permitdeny": "permit",
+ "proto_str": "udp",
+ "src_any": "any",
+ "dest_ip_prefix": "224.0.0.102/32",
+ "dest_port_op": "eq",
+ "dest_port1_num": "1985"
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interface/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interface/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interface/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interface/show_running-config_aclmgr.txt b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interface/show_running-config_aclmgr.txt
new file mode 100644
index 00000000..ccf92c99
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interface/show_running-config_aclmgr.txt
@@ -0,0 +1,4 @@
+ip access-list ANSIBLE_OUT
+ 10 permit tcp 192.0.2.1/24 any
+interface Ethernet1/41
+ ip access-group copp-system-p-acl-bgp out
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interfaces/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interfaces/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interfaces/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interfaces/nxos_acl_interfaces.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interfaces/nxos_acl_interfaces.cfg
new file mode 100644
index 00000000..199244e7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_acl_interfaces/nxos_acl_interfaces.cfg
@@ -0,0 +1,2 @@
+interface Ethernet1/2
+ ip access-group ACL1v4 out \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/N7K.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/N7K.cfg
new file mode 100644
index 00000000..efe96268
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/N7K.cfg
@@ -0,0 +1,16 @@
+feature bfd
+
+bfd echo-interface loopback2
+bfd echo-rx-interval 56
+bfd interval 51 min_rx 52 multiplier 4
+bfd slow-timer 2001
+bfd startup-timer 6
+bfd ipv4 echo-rx-interval 54
+bfd ipv4 interval 54 min_rx 54 multiplier 4
+bfd ipv4 slow-timer 2004
+bfd ipv6 echo-rx-interval 56
+bfd ipv6 interval 56 min_rx 56 multiplier 6
+bfd ipv6 slow-timer 2006
+bfd fabricpath slow-timer 2008
+bfd fabricpath interval 58 min_rx 58 multiplier 8
+bfd fabricpath vlan 2
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/N9K.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/N9K.cfg
new file mode 100644
index 00000000..ab1d2d4a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/N9K.cfg
@@ -0,0 +1,13 @@
+feature bfd
+
+bfd echo-interface loopback2
+bfd echo-rx-interval 56
+bfd interval 51 min_rx 52 multiplier 4
+bfd slow-timer 2001
+bfd startup-timer 6
+bfd ipv4 echo-rx-interval 54
+bfd ipv4 interval 54 min_rx 54 multiplier 4
+bfd ipv4 slow-timer 2004
+bfd ipv6 echo-rx-interval 56
+bfd ipv6 interval 56 min_rx 56 multiplier 6
+bfd ipv6 slow-timer 2006
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bfd_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bgp/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bgp/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bgp/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bgp/config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bgp/config.cfg
new file mode 100644
index 00000000..f0797ee4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bgp/config.cfg
@@ -0,0 +1,26 @@
+feature bgp
+
+router bgp 65535
+ router-id 192.168.1.1
+ event-history cli size medium
+ event-history detail
+ vrf test2
+ address-family ipv4 unicast
+ timers bgp 1 10
+ neighbor 1.1.1.1
+ neighbor 1.1.1.2
+ bfd
+ neighbor 3.3.3.4
+ remove-private-as all
+ neighbor 3.3.3.5
+ address-family ipv4 unicast
+ maximum-prefix 30 30
+ neighbor 5.5.5.5
+ peer-type fabric-border-leaf
+ neighbor 6.6.6.6
+ peer-type fabric-external
+ address-family l2vpn evpn
+ retain route-target route-map xyz
+ neighbor 7.7.7.7
+ address-family l2vpn evpn
+ rewrite-evpn-rt-asn
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bgp/config_32_bits_as.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bgp/config_32_bits_as.cfg
new file mode 100644
index 00000000..03db9936
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_bgp/config_32_bits_as.cfg
@@ -0,0 +1,6 @@
+feature bgp
+
+router bgp 65535.65535
+ router-id 192.168.1.1
+ vrf test
+ address-family ipv4 unicast
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_command/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_command/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_command/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_command/show_version.txt b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_command/show_version.txt
new file mode 100644
index 00000000..ba9ae665
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_command/show_version.txt
@@ -0,0 +1,68 @@
+Cisco NX-OS Software
+Copyright (c) 2002-2016, Cisco Systems, Inc. All rights reserved.
+NX-OSv software ("NX-OSv Software") and related documentation,
+files or other reference materials ("Documentation") are
+the proprietary property and confidential information of Cisco
+Systems, Inc. ("Cisco") and are protected, without limitation,
+pursuant to United States and International copyright and trademark
+laws in the applicable jurisdiction which provide civil and criminal
+penalties for copying or distribution without Cisco's authorization.
+
+Any use or disclosure, in whole or in part, of the NX-OSv Software
+or Documentation to any third party for any purposes is expressly
+prohibited except as otherwise authorized by Cisco in writing.
+The copyrights to certain works contained herein are owned by other
+third parties and are used and distributed under license. Some parts
+of this software may be covered under the GNU Public License or the
+GNU Lesser General Public License. A copy of each such license is
+available at
+http://www.gnu.org/licenses/gpl.html and
+http://www.gnu.org/licenses/lgpl.html
+***************************************************************************
+* NX-OSv is strictly limited to use for evaluation, demonstration and *
+* NX-OS education. NX-OSv is provided as-is and is not supported by *
+* Cisco's Technical Advisory Center. Any use or disclosure, in whole or *
+* in part of the NX-OSv Software or Documentation to any third party for *
+* any purposes is expressly prohibited except as otherwise authorized by *
+* Cisco in writing. *
+***************************************************************************
+nxos01# show version
+Cisco Nexus Operating System (NX-OS) Software
+TAC support: http://www.cisco.com/tac
+Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_series_home.html
+Copyright (c) 2002-2016, Cisco Systems, Inc. All rights reserved.
+The copyrights to certain works contained herein are owned by
+other third parties and are used and distributed under license.
+Some parts of this software are covered under the GNU Public
+License. A copy of the license is available at
+http://www.gnu.org/licenses/gpl.html.
+
+NX-OSv is a demo version of the Nexus Operating System
+
+Software
+ loader: version N/A
+ kickstart: version 7.3(0)D1(1)
+ system: version 7.3(0)D1(1)
+ kickstart image file is: bootflash:///titanium-d1-kickstart.7.3.0.D1.1.bin
+ kickstart compile time: 1/11/2016 16:00:00 [02/11/2016 10:30:12]
+ system image file is: bootflash:///titanium-d1.7.3.0.D1.1.bin
+ system compile time: 1/11/2016 16:00:00 [02/11/2016 13:08:11]
+
+
+Hardware
+ cisco NX-OSv Chassis ("NX-OSv Supervisor Module")
+ QEMU Virtual CPU version 2.0 with 3064860 kB of memory.
+ Processor Board ID TM3E35B910B
+
+ Device name: nxos01
+ bootflash: 3184776 kB
+
+Kernel uptime is 7 day(s), 17 hour(s), 0 minute(s), 23 second(s)
+
+
+plugin
+ Core Plugin, Ethernet Plugin
+
+Active Package(s)
+
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_config/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_config/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_config/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_config/candidate.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_config/candidate.cfg
new file mode 100644
index 00000000..b11bc93e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_config/candidate.cfg
@@ -0,0 +1,7 @@
+hostname switch01
+!
+interface Ethernet1
+ description test interface
+ no shutdown
+!
+ip routing
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_config/config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_config/config.cfg
new file mode 100644
index 00000000..6a471371
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_config/config.cfg
@@ -0,0 +1,26 @@
+!
+hostname localhost
+ip domain-name eng.ansible.com
+!
+vrf definition mgmt
+!
+vrf definition test
+!
+interface Management1
+ ip address 192.168.1.1/24
+!
+interface Ethernet1
+ shutdown
+!
+interface Ethernet2
+ shutdown
+!
+interface Ethernet3
+ shutdown
+!
+interface Ethernet4
+ shutdown
+!
+interface Ethernet5
+ shutdown
+!
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdadatabse.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdadatabse.cfg
new file mode 100644
index 00000000..cc526a71
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdadatabse.cfg
@@ -0,0 +1,5 @@
+device-alias name test1_add pwwn 56:02:22:11:22:88:11:67
+device-alias name test2_add pwwn 65:22:22:11:22:22:11:0d
+device-alias name tieHost-1 pwwn 10:00:00:00:89:a1:01:01
+device-alias name tieHost-2 pwwn 10:00:00:00:89:a1:01:02
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatus.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatus.cfg
new file mode 100644
index 00000000..7db88034
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatus.cfg
@@ -0,0 +1,4 @@
+Fabric Distribution : Enabled
+Database:- Device Aliases 3831 Mode: Enhanced
+ Checksum: 0xdc7b6c6c124abd8fe28cf6a1ab293c
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatus_mansi.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatus_mansi.cfg
new file mode 100644
index 00000000..aa399b64
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatus_mansi.cfg
@@ -0,0 +1,4 @@
+Fabric Distribution : Disabled
+Database:- Device Aliases 3831 Mode: Basic
+ Checksum: 0xdc7b6c6c124abd8fe28cf6a1ab293c
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatuslock.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatuslock.cfg
new file mode 100644
index 00000000..65cb052f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_devicealias/shdastatuslock.cfg
@@ -0,0 +1,6 @@
+Fabric Distribution : Enabled
+Database:- Device Aliases 3831 Mode: Enhanced
+ Checksum: 0xdc7b6c6c124abd8fe28cf6a1ab293c
+Locked By:- User "CLI/SNMPv3:admin" SWWN 20:00:54:7f:ee:1b:13:f0
+Pending Database:- Device Aliases 3831 Mode: Enhanced
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/configured.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/configured.cfg
new file mode 100644
index 00000000..32504f6b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/configured.cfg
@@ -0,0 +1,3 @@
+hostname switch01
+nv overlay evpn
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/unconfigured.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/unconfigured.cfg
new file mode 100644
index 00000000..c555eaaf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_global/unconfigured.cfg
@@ -0,0 +1 @@
+hostname switch01
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_vni_config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_vni_config.cfg
new file mode 100644
index 00000000..b1c8352f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_evpn_vni_config.cfg
@@ -0,0 +1,8 @@
+nv overlay evpn
+feature nv overlay
+
+evpn
+ vni 6000 l2
+ rd auto
+ route-target import auto
+ route-target export auto
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_feature/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_feature/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_feature/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_feature/show_feature.txt b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_feature/show_feature.txt
new file mode 100644
index 00000000..cf6dbdbd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_feature/show_feature.txt
@@ -0,0 +1,4 @@
+Feature Name Instance State
+-------------------- -------- -----
+nve 1 disabled
+ospf 1 enabled
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface
new file mode 100644
index 00000000..f50b8f24
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface
@@ -0,0 +1,129 @@
+{
+ "TABLE_interface": {
+ "ROW_interface": [
+ {
+ "interface": "Ethernet2/1",
+ "state": "up",
+ "admin_state": "up",
+ "share_state": "Dedicated",
+ "eth_hw_desc": "Ethernet",
+ "eth_hw_addr": "fa16.3e50.6647",
+ "eth_bia_addr": "fa16.3e50.6619",
+ "desc": "Test aggregation on first interface",
+ "eth_mtu": "1500",
+ "eth_bw": 1000000,
+ "eth_dly": 10,
+ "eth_reliability": "255",
+ "eth_txload": "1",
+ "eth_rxload": "1",
+ "medium": "broadcast",
+ "eth_mode": "routed",
+ "eth_duplex": "full",
+ "eth_speed": "1000 Mb/s",
+ "eth_beacon": "off",
+ "eth_autoneg": "off",
+ "eth_in_flowctrl": "off",
+ "eth_out_flowctrl": "off",
+ "eth_mdix": "off",
+ "eth_swt_monitor": "off",
+ "eth_ethertype": "0x8100",
+ "eth_eee_state": "n/a",
+ "eth_link_flapped": "4d15h",
+ "eth_clear_counters": "never",
+ "eth_reset_cntr": 87,
+ "eth_load_interval1_rx": 0,
+ "eth_inrate1_bits": 0,
+ "eth_inrate1_pkts": 0,
+ "eth_load_interval1_tx": 0,
+ "eth_outrate1_bits": 0,
+ "eth_outrate1_pkts": 0,
+ "eth_inrate1_summary_bits": "0 bps",
+ "eth_inrate1_summary_pkts": "0 pps",
+ "eth_outrate1_summary_bits": "0 bps",
+ "eth_outrate1_summary_pkts": "0 pps",
+ "eth_load_interval2_rx": 0,
+ "eth_inrate2_bits": 0,
+ "eth_inrate2_pkts": 0,
+ "eth_load_interval2_tx": 0,
+ "eth_outrate2_bits": 0,
+ "eth_outrate2_pkts": 0,
+ "eth_inrate2_summary_bits": "0 bps",
+ "eth_inrate2_summary_pkts": "0 pps",
+ "eth_outrate2_summary_bits": "0 bps",
+ "eth_outrate2_summary_pkts": "0 pps",
+ "eth_inucast": 0,
+ "eth_inmcast": 0,
+ "eth_inbcast": 0,
+ "eth_inpkts": 0,
+ "eth_inbytes": 0,
+ "eth_jumbo_inpkts": 0,
+ "eth_storm_supp": 0,
+ "eth_runts": 0,
+ "eth_giants": 0,
+ "eth_crc": 0,
+ "eth_nobuf": 0,
+ "eth_inerr": 0,
+ "eth_frame": 0,
+ "eth_overrun": 0,
+ "eth_underrun": 0,
+ "eth_ignored": 0,
+ "eth_watchdog": 0,
+ "eth_bad_eth": 0,
+ "eth_bad_proto": 0,
+ "eth_in_ifdown_drops": 0,
+ "eth_dribble": 0,
+ "eth_indiscard": 0,
+ "eth_inpause": 0,
+ "eth_outucast": 0,
+ "eth_outmcast": 0,
+ "eth_outbcast": 0,
+ "eth_outpkts": 0,
+ "eth_outbytes": 0,
+ "eth_jumbo_outpkts": 0,
+ "eth_outerr": 0,
+ "eth_coll": 0,
+ "eth_deferred": 0,
+ "eth_latecoll": 0,
+ "eth_lostcarrier": 0,
+ "eth_nocarrier": 0,
+ "eth_babbles": 0,
+ "eth_outdiscard": 0,
+ "eth_outpause": 0
+ },
+ {
+ "interface": "loopback0",
+ "state": "up",
+ "admin_state": "up",
+ "eth_hw_desc": "Loopback",
+ "desc": "Loopback",
+ "eth_ip_addr": "192.168.255.1",
+ "eth_ip_mask": 32,
+ "eth_ip_prefix": "192.168.255.1",
+ "eth_mtu": "1500",
+ "eth_bw": 8000000,
+ "eth_dly": 5000,
+ "eth_reliability": "255",
+ "eth_txload": "1",
+ "eth_rxload": "1",
+ "medium": "broadcast",
+ "eth_mode": "routed",
+ "eth_mdix": "off",
+ "loop_in_pkts": 1451854,
+ "loop_in_bytes": 75138128,
+ "loop_in_mcast": 0,
+ "loop_in_compressed": 0,
+ "loop_in_errors": 0,
+ "loop_in_frame": 0,
+ "loop_in_overrun": 0,
+ "loop_in_fifo": 0,
+ "loop_out_pkts": 0,
+ "loop_out_bytes": 0,
+ "loop_out_underruns": 0,
+ "loop_out_errors": 0,
+ "loop_out_collisions": 0,
+ "loop_out_fifo": 0,
+ "loop_out_carriers": 0
+ }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface_Ethernet2_1 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface_Ethernet2_1
new file mode 100644
index 00000000..f478350f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface_Ethernet2_1
@@ -0,0 +1,96 @@
+{
+ "TABLE_interface": {
+ "ROW_interface": {
+ "interface": "Ethernet2/1",
+ "state": "up",
+ "admin_state": "up",
+ "share_state": "Dedicated",
+ "eth_hw_desc": "Ethernet",
+ "eth_hw_addr": "fa16.3e00.0001",
+ "eth_bia_addr": "fa16.3e27.f279",
+ "desc": "to nxos03",
+ "eth_ip_addr": "10.0.0.45",
+ "eth_ip_mask": 30,
+ "eth_ip_prefix": "10.0.0.44",
+ "eth_mtu": "1500",
+ "eth_bw": 1000000,
+ "eth_dly": 10,
+ "eth_reliability": "255",
+ "eth_txload": "1",
+ "eth_rxload": "1",
+ "medium": "broadcast",
+ "eth_mode": "routed",
+ "eth_duplex": "full",
+ "eth_speed": "1000 Mb/s",
+ "eth_beacon": "off",
+ "eth_autoneg": "off",
+ "eth_in_flowctrl": "off",
+ "eth_out_flowctrl": "off",
+ "eth_mdix": "off",
+ "eth_swt_monitor": "off",
+ "eth_ethertype": "0x8100",
+ "eth_eee_state": "n/a",
+ "eth_link_flapped": "14week(s) 0day(s)",
+ "eth_clear_counters": "never",
+ "eth_reset_cntr": 1,
+ "eth_load_interval1_rx": 0,
+ "eth_inrate1_bits": 0,
+ "eth_inrate1_pkts": 0,
+ "eth_load_interval1_tx": 0,
+ "eth_outrate1_bits": 0,
+ "eth_outrate1_pkts": 0,
+ "eth_inrate1_summary_bits": "0 bps",
+ "eth_inrate1_summary_pkts": "0 pps",
+ "eth_outrate1_summary_bits": "0 bps",
+ "eth_outrate1_summary_pkts": "0 pps",
+ "eth_load_interval2_rx": 0,
+ "eth_inrate2_bits": 0,
+ "eth_inrate2_pkts": 0,
+ "eth_load_interval2_tx": 0,
+ "eth_outrate2_bits": 0,
+ "eth_outrate2_pkts": 0,
+ "eth_inrate2_summary_bits": "0 bps",
+ "eth_inrate2_summary_pkts": "0 pps",
+ "eth_outrate2_summary_bits": "0 bps",
+ "eth_outrate2_summary_pkts": "0 pps",
+ "eth_inucast": 0,
+ "eth_inmcast": 0,
+ "eth_inbcast": 0,
+ "eth_inpkts": 0,
+ "eth_inbytes": 0,
+ "eth_jumbo_inpkts": 0,
+ "eth_storm_supp": 0,
+ "eth_runts": 0,
+ "eth_giants": 0,
+ "eth_crc": 0,
+ "eth_nobuf": 0,
+ "eth_inerr": 0,
+ "eth_frame": 0,
+ "eth_overrun": 0,
+ "eth_underrun": 0,
+ "eth_ignored": 0,
+ "eth_watchdog": 0,
+ "eth_bad_eth": 0,
+ "eth_bad_proto": 0,
+ "eth_in_ifdown_drops": 0,
+ "eth_dribble": 0,
+ "eth_indiscard": 0,
+ "eth_inpause": 0,
+ "eth_outucast": 0,
+ "eth_outmcast": 0,
+ "eth_outbcast": 0,
+ "eth_outpkts": 0,
+ "eth_outbytes": 0,
+ "eth_jumbo_outpkts": 0,
+ "eth_outerr": 0,
+ "eth_coll": 0,
+ "eth_deferred": 0,
+ "eth_latecoll": 0,
+ "eth_lostcarrier": 0,
+ "eth_nocarrier": 0,
+ "eth_babbles": 0,
+ "eth_outdiscard": 0,
+ "eth_outpause": 0
+ }
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface_loopback0 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface_loopback0
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_interface_loopback0
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_run_interface_Ethernet2_1 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_run_interface_Ethernet2_1
new file mode 100644
index 00000000..e60c3b4c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_run_interface_Ethernet2_1
@@ -0,0 +1,8 @@
+interface Ethernet1/5
+ description to csr02
+ no switchport
+ speed 1000
+ mtu 1500
+ mac-address fa16.3e00.000b
+ ip address 172.31.0.66/30
+ no shutdown
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_run_interface_loopback0 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_run_interface_loopback0
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface/show_run_interface_loopback0
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface_ospf/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface_ospf/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface_ospf/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface_ospf/config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface_ospf/config.cfg
new file mode 100644
index 00000000..2061d4d7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_interface_ospf/config.cfg
@@ -0,0 +1,17 @@
+interface Ethernet1/33
+interface Ethernet1/33.101
+ ip router ospf 1 area 0.0.0.1
+interface Ethernet1/34
+ ip router ospf 1 area 0.0.0.1
+ ip ospf passive-interface
+interface Ethernet1/35
+ ip router ospf 1 area 0.0.0.1
+ no ip ospf passive-interface
+
+interface Ethernet1/36
+ ip router ospf 1 area 0.0.0.1
+ ip ospf bfd
+
+interface Ethernet1/37
+ ip router ospf 1 area 0.0.0.1
+ ip ospf bfd disable
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut
new file mode 100644
index 00000000..b0407edc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut
@@ -0,0 +1,3 @@
+interface Ethernet1/1
+ description Configured by Ansible
+ no shutdown
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_ipv4_ipv6 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_ipv4_ipv6
new file mode 100644
index 00000000..3e4f1978
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_ipv4_ipv6
@@ -0,0 +1,5 @@
+interface Ethernet1/1
+ description Configured by Ansible
+ ip address 192.168.0.1/24
+ ipv6 address 2001:db8::1/124
+ no shutdown
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_multiple_ipv6 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_multiple_ipv6
new file mode 100644
index 00000000..9013b134
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_multiple_ipv6
@@ -0,0 +1,7 @@
+interface Ethernet1/1
+ description Configured by Ansible
+ ip address 192.168.0.1/24
+ ipv6 address 2001:db8:1::1/124
+ ipv6 address 2001:db8:2::1/124
+ ipv6 address 2001:db8::1/124
+ no shutdown
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n3k/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n3k/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n3k/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n3k/show_run_all b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n3k/show_run_all
new file mode 100644
index 00000000..da0dfaa7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n3k/show_run_all
@@ -0,0 +1,2 @@
+feature nxapi
+nxapi http port 80
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n7k/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n7k/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n7k/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n7k/show_run_all b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n7k/show_run_all
new file mode 100644
index 00000000..0c4a3ea5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_nxapi/n7k/show_run_all
@@ -0,0 +1,5 @@
+feature nxapi
+nxapi http port 80
+no nxapi https
+no nxapi sandbox
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_overlay_global_config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_overlay_global_config.cfg
new file mode 100644
index 00000000..45a6ff99
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_overlay_global_config.cfg
@@ -0,0 +1 @@
+fabric forwarding anycast-gateway-mac 000B.000B.000B
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim/config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim/config.cfg
new file mode 100644
index 00000000..9771622d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim/config.cfg
@@ -0,0 +1,2 @@
+ip pim bfd
+ip pim ssm range 127.0.0.0/31
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/config.cfg
new file mode 100644
index 00000000..2120e607
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/config.cfg
@@ -0,0 +1,11 @@
+!Command: show running-config interface Ethernet2/1
+!Time: Mon Aug 21 17:22:02 2017
+
+version 7.3(0)D1(1)
+
+interface Ethernet2/1
+ description Configured by Ansible - Layer3
+ no switchport
+ mac-address fa16.3e00.0006
+ ip address 10.0.0.69/30
+ no shutdown
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/sh_run_interface_eth2_1_all b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/sh_run_interface_eth2_1_all
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/sh_run_interface_eth2_1_all
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/show_interface_eth2_1 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/show_interface_eth2_1
new file mode 100644
index 00000000..f478350f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/show_interface_eth2_1
@@ -0,0 +1,96 @@
+{
+ "TABLE_interface": {
+ "ROW_interface": {
+ "interface": "Ethernet2/1",
+ "state": "up",
+ "admin_state": "up",
+ "share_state": "Dedicated",
+ "eth_hw_desc": "Ethernet",
+ "eth_hw_addr": "fa16.3e00.0001",
+ "eth_bia_addr": "fa16.3e27.f279",
+ "desc": "to nxos03",
+ "eth_ip_addr": "10.0.0.45",
+ "eth_ip_mask": 30,
+ "eth_ip_prefix": "10.0.0.44",
+ "eth_mtu": "1500",
+ "eth_bw": 1000000,
+ "eth_dly": 10,
+ "eth_reliability": "255",
+ "eth_txload": "1",
+ "eth_rxload": "1",
+ "medium": "broadcast",
+ "eth_mode": "routed",
+ "eth_duplex": "full",
+ "eth_speed": "1000 Mb/s",
+ "eth_beacon": "off",
+ "eth_autoneg": "off",
+ "eth_in_flowctrl": "off",
+ "eth_out_flowctrl": "off",
+ "eth_mdix": "off",
+ "eth_swt_monitor": "off",
+ "eth_ethertype": "0x8100",
+ "eth_eee_state": "n/a",
+ "eth_link_flapped": "14week(s) 0day(s)",
+ "eth_clear_counters": "never",
+ "eth_reset_cntr": 1,
+ "eth_load_interval1_rx": 0,
+ "eth_inrate1_bits": 0,
+ "eth_inrate1_pkts": 0,
+ "eth_load_interval1_tx": 0,
+ "eth_outrate1_bits": 0,
+ "eth_outrate1_pkts": 0,
+ "eth_inrate1_summary_bits": "0 bps",
+ "eth_inrate1_summary_pkts": "0 pps",
+ "eth_outrate1_summary_bits": "0 bps",
+ "eth_outrate1_summary_pkts": "0 pps",
+ "eth_load_interval2_rx": 0,
+ "eth_inrate2_bits": 0,
+ "eth_inrate2_pkts": 0,
+ "eth_load_interval2_tx": 0,
+ "eth_outrate2_bits": 0,
+ "eth_outrate2_pkts": 0,
+ "eth_inrate2_summary_bits": "0 bps",
+ "eth_inrate2_summary_pkts": "0 pps",
+ "eth_outrate2_summary_bits": "0 bps",
+ "eth_outrate2_summary_pkts": "0 pps",
+ "eth_inucast": 0,
+ "eth_inmcast": 0,
+ "eth_inbcast": 0,
+ "eth_inpkts": 0,
+ "eth_inbytes": 0,
+ "eth_jumbo_inpkts": 0,
+ "eth_storm_supp": 0,
+ "eth_runts": 0,
+ "eth_giants": 0,
+ "eth_crc": 0,
+ "eth_nobuf": 0,
+ "eth_inerr": 0,
+ "eth_frame": 0,
+ "eth_overrun": 0,
+ "eth_underrun": 0,
+ "eth_ignored": 0,
+ "eth_watchdog": 0,
+ "eth_bad_eth": 0,
+ "eth_bad_proto": 0,
+ "eth_in_ifdown_drops": 0,
+ "eth_dribble": 0,
+ "eth_indiscard": 0,
+ "eth_inpause": 0,
+ "eth_outucast": 0,
+ "eth_outmcast": 0,
+ "eth_outbcast": 0,
+ "eth_outpkts": 0,
+ "eth_outbytes": 0,
+ "eth_jumbo_outpkts": 0,
+ "eth_outerr": 0,
+ "eth_coll": 0,
+ "eth_deferred": 0,
+ "eth_latecoll": 0,
+ "eth_lostcarrier": 0,
+ "eth_nocarrier": 0,
+ "eth_babbles": 0,
+ "eth_outdiscard": 0,
+ "eth_outpause": 0
+ }
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/show_ip_pim_interface_eth2_1 b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/show_ip_pim_interface_eth2_1
new file mode 100644
index 00000000..e013423b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_interface/show_ip_pim_interface_eth2_1
@@ -0,0 +1,68 @@
+{
+ "TABLE_vrf": {
+ "ROW_vrf": {
+ "vrf-name": "default",
+ "TABLE_iod": {
+ "ROW_iod": {
+ "if-name": "Ethernet2/1",
+ "if-status": "protocol-up/link-up/admin-up",
+ "if-addr-summary": "IP address: 10.0.0.45, IP subnet: 10.0.0.44/30",
+ "pim-dr-address": "10.0.0.45",
+ "dr-priority": 2,
+ "nbr-cnt": 0,
+ "hello-interval-sec": 35,
+ "hello-timer": "PT3S",
+ "holdtime-sec": 105,
+ "if-conf-dr-priority": 1,
+ "if-conf-delay": 3,
+ "is-border": "true",
+ "genid": "38c4b959",
+ "isauth-config": "false",
+ "nbr-policy-name": "none configured",
+ "jp-interval": 1,
+ "jp-next-send": 1,
+ "pim-bfd-enabled": "no",
+ "is-passive": "false",
+ "is-pim-vpc-svi": "no",
+ "is-auto-enabled": "no",
+ "last-cleared": "PT0S",
+ "hello-sent": 23,
+ "hello-rcvd": 0,
+ "hello-early-sent": 0,
+ "jp-sent": 0,
+ "jp-rcvd": 0,
+ "assert-sent": 0,
+ "assert-rcvd": 0,
+ "graft-sent": 0,
+ "graft-rcvd": 0,
+ "graft-ack-sent": 0,
+ "graft-ack-rcvd": 0,
+ "df-offer-sent": 0,
+ "df-offer-rcvd": 0,
+ "df-winner-sent": 0,
+ "df-winner-rcvd": 0,
+ "df-backoff-sent": 0,
+ "df-backoff-rcvd": 0,
+ "pass-sent": 0,
+ "pass-rcvd": 0,
+ "cksum-errors": 0,
+ "invalid-errors": 0,
+ "invalid-df-errors": 0,
+ "auth-failed": 0,
+ "pak-len-errors": 0,
+ "ver-errors": 0,
+ "pkts-self": 0,
+ "pkts-non-nbr": 0,
+ "pkts-on-passive": 0,
+ "jp-rcvd-on-rpf": 0,
+ "jp-rcvd-no-rp": 0,
+ "jp-rcvd-wrong-rp": 0,
+ "jp-rcvd-for-ssm": 0,
+ "jp-rcvd-for-bidir": 0,
+ "jp-in-policy-filter": 0,
+ "jp-out-policy-filter": 0
+ }
+ }
+ }
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_rp_address/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_rp_address/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_rp_address/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_rp_address/config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_rp_address/config.cfg
new file mode 100644
index 00000000..ca9730ec
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_pim_rp_address/config.cfg
@@ -0,0 +1 @@
+ip pim rp-address 1.2.3.4
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_static_route.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_static_route.cfg
new file mode 100644
index 00000000..8b1a6fe8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_static_route.cfg
@@ -0,0 +1,3 @@
+ip route 10.10.30.0/24 1.2.4.8
+vrf context test
+ ip route 10.8.0.0/14 15.16.17.18
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_interface_ethernet b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_interface_ethernet
new file mode 100644
index 00000000..60e729b2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_interface_ethernet
@@ -0,0 +1,97 @@
+{
+ "TABLE_interface": {
+ "ROW_interface": {
+ "interface": "Ethernet2/1",
+ "state": "up",
+ "admin_state": "up",
+ "share_state": "Dedicated",
+ "eth_hw_desc": "Ethernet",
+ "eth_hw_addr": "fa16.3e00.0001",
+ "eth_bia_addr": "fa16.3e27.f279",
+ "desc": "to nxos03",
+ "eth_ip_addr": "10.0.0.45",
+ "eth_ip_mask": 30,
+ "eth_ip_prefix": "10.0.0.44",
+ "eth_mtu": "1500",
+ "eth_bw": 1000000,
+ "eth_dly": 10,
+ "eth_reliability": "255",
+ "eth_txload": "1",
+ "eth_rxload": "1",
+ "medium": "broadcast",
+ "eth_mode": "access",
+ "eth_bundle": 0,
+ "eth_duplex": "full",
+ "eth_speed": "1000 Mb/s",
+ "eth_beacon": "off",
+ "eth_autoneg": "off",
+ "eth_in_flowctrl": "off",
+ "eth_out_flowctrl": "off",
+ "eth_mdix": "off",
+ "eth_swt_monitor": "off",
+ "eth_ethertype": "0x8100",
+ "eth_eee_state": "n/a",
+ "eth_link_flapped": "13week(s) 0day(s)",
+ "eth_clear_counters": "never",
+ "eth_reset_cntr": 1,
+ "eth_load_interval1_rx": 0,
+ "eth_inrate1_bits": 0,
+ "eth_inrate1_pkts": 0,
+ "eth_load_interval1_tx": 0,
+ "eth_outrate1_bits": 0,
+ "eth_outrate1_pkts": 0,
+ "eth_inrate1_summary_bits": "0 bps",
+ "eth_inrate1_summary_pkts": "0 pps",
+ "eth_outrate1_summary_bits": "0 bps",
+ "eth_outrate1_summary_pkts": "0 pps",
+ "eth_load_interval2_rx": 0,
+ "eth_inrate2_bits": 0,
+ "eth_inrate2_pkts": 0,
+ "eth_load_interval2_tx": 0,
+ "eth_outrate2_bits": 0,
+ "eth_outrate2_pkts": 0,
+ "eth_inrate2_summary_bits": "0 bps",
+ "eth_inrate2_summary_pkts": "0 pps",
+ "eth_outrate2_summary_bits": "0 bps",
+ "eth_outrate2_summary_pkts": "0 pps",
+ "eth_inucast": 0,
+ "eth_inmcast": 0,
+ "eth_inbcast": 0,
+ "eth_inpkts": 0,
+ "eth_inbytes": 0,
+ "eth_jumbo_inpkts": 0,
+ "eth_storm_supp": 0,
+ "eth_runts": 0,
+ "eth_giants": 0,
+ "eth_crc": 0,
+ "eth_nobuf": 0,
+ "eth_inerr": 0,
+ "eth_frame": 0,
+ "eth_overrun": 0,
+ "eth_underrun": 0,
+ "eth_ignored": 0,
+ "eth_watchdog": 0,
+ "eth_bad_eth": 0,
+ "eth_bad_proto": 0,
+ "eth_in_ifdown_drops": 0,
+ "eth_dribble": 0,
+ "eth_indiscard": 0,
+ "eth_inpause": 0,
+ "eth_outucast": 0,
+ "eth_outmcast": 0,
+ "eth_outbcast": 0,
+ "eth_outpkts": 0,
+ "eth_outbytes": 0,
+ "eth_jumbo_outpkts": 0,
+ "eth_outerr": 0,
+ "eth_coll": 0,
+ "eth_deferred": 0,
+ "eth_latecoll": 0,
+ "eth_lostcarrier": 0,
+ "eth_nocarrier": 0,
+ "eth_babbles": 0,
+ "eth_outdiscard": 0,
+ "eth_outpause": 0
+ }
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_interface_ethernet_switchport b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_interface_ethernet_switchport
new file mode 100644
index 00000000..352da5e7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_interface_ethernet_switchport
@@ -0,0 +1,14 @@
+{
+ "TABLE_interface": {
+ "ROW_interface": {
+ "interface": "Ethernet2/1",
+ "oper_mode": "access",
+ "switchport": "Enabled",
+ "access_vlan": 2,
+ "access_vlan_name": "VLAN2",
+ "native_vlan": 10,
+ "native_vlan_name": "VLAN10",
+ "trunk_vlans": "1-50"
+ }
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_vlan b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_vlan
new file mode 100644
index 00000000..407267bb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_switchport/show_vlan
@@ -0,0 +1,18 @@
+{
+ "TABLE_vlanbrief": {
+ "ROW_vlanbrief": {
+ "vlanshowbr-vlanid": 1,
+ "vlanshowbr-vlanid-utf": 1,
+ "vlanshowbr-vlanname": "VLAN1",
+ "vlanshowbr-vlanstate": "active",
+ "vlanshowbr-shutstate": "noshutdown"
+ }
+ },
+ "TABLE_mtuinfo": {
+ "ROW_mtuinfo": {
+ "vlanshowinfo-vlanid": 1,
+ "vlanshowinfo-media-type": "enet",
+ "vlanshowinfo-vlanmode": "ce-vlan"
+ }
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_system/config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_system/config.cfg
new file mode 100644
index 00000000..362b7332
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_system/config.cfg
@@ -0,0 +1,16 @@
+hostname nxos01
+system jumbomtu 1500
+!
+no ip domain-lookup
+ip domain-name ansible.com
+ip domain-list ansible.com
+ip domain-list redhat.com
+ip name-server 8.8.8.8 172.26.1.1
+!
+vrf context management
+ ip domain-name eng.ansible.com
+ ip domain-list ansible.com
+ ip domain-list redhat.com
+ ip name-server 172.26.1.1 8.8.8.8
+ ip route 172.26.0.0/16 172.26.4.1
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_system/vrf_only/config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_system/vrf_only/config.cfg
new file mode 100644
index 00000000..2b039f57
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_system/vrf_only/config.cfg
@@ -0,0 +1,4 @@
+vrf context test
+ ip domain-name abc.com
+vrf context test2
+ ip domain-name xyz.com \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_telemetry/N9K.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_telemetry/N9K.cfg
new file mode 100644
index 00000000..697c2c18
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_telemetry/N9K.cfg
@@ -0,0 +1,43 @@
+feature telemetry
+
+telemetry
+ certificate /bootflash/server.key localhost
+ destination-profile
+ use-vrf management
+ use-compression gzip
+ source-interface loopback55
+ destination-group 2
+ ip address 192.168.0.1 port 50001 protocol gRPC encoding GPB
+ ip address 192.168.0.2 port 60001 protocol gRPC encoding GPB
+ destination-group 10
+ ip address 192.168.0.1 port 50001 protocol gRPC encoding GPB
+ ip address 192.168.0.2 port 60001 protocol gRPC encoding GPB
+ sensor-group 2
+ data-source DME
+ path boo depth 0
+ path sys/ospf depth 0 query-condition qc filter-condition fc
+ path interfaces depth 0
+ path sys/bgp
+ path sys/bgp/inst depth 0 query-condition foo filter-condition foo
+ path sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]
+ path sys/bgp/inst/dom-default/peer-[20.20.20.11]/ent-[20.20.20.11]
+ path too depth 0 filter-condition foo
+ sensor-group 55
+ sensor-group 56
+ data-source DME
+ path environment
+ path interface
+ path resources
+ path vxlan
+ subscription 3
+ subscription 4
+ dst-grp 2
+ snsr-grp 2 sample-interval 1000
+ subscription 5
+ dst-grp 2
+ snsr-grp 2 sample-interval 1000
+ subscription 6
+ dst-grp 10
+ subscription 7
+ dst-grp 10
+ snsr-grp 2 sample-interval 1000
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_telemetry/N9K_SGs.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_telemetry/N9K_SGs.cfg
new file mode 100644
index 00000000..1729ad81
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_telemetry/N9K_SGs.cfg
@@ -0,0 +1,19 @@
+feature telemetry
+
+telemetry
+ sensor-group 1
+ path sys/ch depth 4
+ path sys/procsys depth 1
+ sensor-group 2
+ data-source NX-API
+ path "show bgp l2vpn evpn summary"
+ path "show isis adjacency"
+ path "show mac address-table count" depth 2
+ path "show bgp sessions"
+ sensor-group 3
+ data-source NX-API
+ path "show interface ethernet1/1-52"
+ sensor-group 4
+ path sys/bd depth 2
+ path sys/eps/epId-1/nws depth 2
+ path sys/eps/epId-1/peers depth 2
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_telemetry/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_telemetry/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_telemetry/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/agg_show_vlan_brief.txt b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/agg_show_vlan_brief.txt
new file mode 100644
index 00000000..4ba12553
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/agg_show_vlan_brief.txt
@@ -0,0 +1,27 @@
+{
+ "TABLE_vlanbriefxbrief": {
+ "ROW_vlanbriefxbrief": [
+ {
+ "vlanshowbr-vlanid": 1,
+ "vlanshowbr-vlanid-utf": 1,
+ "vlanshowbr-vlanname": "default",
+ "vlanshowbr-vlanstate": "active",
+ "vlanshowbr-shutstate": "noshutdown"
+ },
+ {
+ "vlanshowbr-vlanid": 4,
+ "vlanshowbr-vlanid-utf": 4,
+ "vlanshowbr-vlanname": "_4_",
+ "vlanshowbr-vlanstate": "active",
+ "vlanshowbr-shutstate": "noshutdown"
+ },
+ {
+ "vlanshowbr-vlanid": 5,
+ "vlanshowbr-vlanid-utf": 5,
+ "vlanshowbr-vlanname": "_5_",
+ "vlanshowbr-vlanstate": "active",
+ "vlanshowbr-shutstate": "noshutdown"
+ }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/config.cfg
new file mode 100644
index 00000000..905d309f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/config.cfg
@@ -0,0 +1,4 @@
+vlan 1
+ mode ce
+ state active
+ no shutdown
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/show_vlan_brief.txt b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/show_vlan_brief.txt
new file mode 100644
index 00000000..ca90e5d4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlan/show_vlan_brief.txt
@@ -0,0 +1,11 @@
+{
+ "TABLE_vlanbriefxbrief": {
+ "ROW_vlanbriefxbrief": {
+ "vlanshowbr-vlanid": 16777216,
+ "vlanshowbr-vlanid-utf": 1,
+ "vlanshowbr-vlanname": "default",
+ "vlanshowbr-vlanstate": "active",
+ "vlanshowbr-shutstate": "noshutdown"
+ }
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_running-config b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_running-config
new file mode 100644
index 00000000..51e64c99
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_running-config
@@ -0,0 +1,13 @@
+vlan 1,3-5,8
+vlan 3
+ name test-vlan3
+vlan 5
+ shutdown
+ name test-changeme
+ mode fabricpath
+ state suspend
+ vn-segment 942
+vlan 8
+ shutdown
+ name test-changeme-not
+ state suspend
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_running-config_no_facts b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_running-config_no_facts
new file mode 100644
index 00000000..ef66a7ff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_running-config_no_facts
@@ -0,0 +1 @@
+! no data
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_vlan b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_vlan
new file mode 100644
index 00000000..9d53309f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_vlan
@@ -0,0 +1,45 @@
+{
+ "TABLE_vlanbrief": {
+ "ROW_vlanbrief": [
+ { "vlanshowbr-vlanid": "1", "vlanshowbr-vlanid-utf": "1",
+ "vlanshowbr-vlanname": "default",
+ "vlanshowbr-vlanstate": "active",
+ "vlanshowbr-shutstate": "noshutdown"
+ },
+ { "vlanshowbr-vlanid": "3", "vlanshowbr-vlanid-utf": "3",
+ "vlanshowbr-vlanname": "test-vlan3",
+ "vlanshowbr-vlanstate": "active",
+ "vlanshowbr-shutstate": "noshutdown"
+ },
+ { "vlanshowbr-vlanid": "4", "vlanshowbr-vlanid-utf": "4",
+ "vlanshowbr-vlanname": "VLAN0004",
+ "vlanshowbr-vlanstate": "active",
+ "vlanshowbr-shutstate": "noshutdown"
+ },
+ { "vlanshowbr-vlanid": "5", "vlanshowbr-vlanid-utf": "5",
+ "vlanshowbr-vlanname": "test-changeme",
+ "vlanshowbr-vlanstate": "suspend",
+ "vlanshowbr-shutstate": "shutdown"
+ },
+ { "vlanshowbr-vlanid": "8", "vlanshowbr-vlanid-utf": "8",
+ "vlanshowbr-vlanname": "test-changeme-not",
+ "vlanshowbr-vlanstate": "suspend",
+ "vlanshowbr-shutstate": "shutdown"
+ }
+ ]
+ },
+ "TABLE_mtuinfo": {
+ "ROW_mtuinfo": [
+ { "vlanshowinfo-vlanid": "1", "vlanshowinfo-media-type": "enet",
+ "vlanshowinfo-vlanmode": "ce-vlan" },
+ { "vlanshowinfo-vlanid": "3", "vlanshowinfo-media-type": "enet",
+ "vlanshowinfo-vlanmode": "ce-vlan" },
+ { "vlanshowinfo-vlanid": "4", "vlanshowinfo-media-type": "enet",
+ "vlanshowinfo-vlanmode": "ce-vlan" },
+ { "vlanshowinfo-vlanid": "5", "vlanshowinfo-media-type": "enet",
+ "vlanshowinfo-vlanmode": "fabricpath-vlan" },
+ { "vlanshowinfo-vlanid": "8", "vlanshowinfo-media-type": "enet",
+ "vlanshowinfo-vlanmode": "ce-vlan" }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_vlan_no_facts b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_vlan_no_facts
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vlans/show_vlan_no_facts
@@ -0,0 +1 @@
+{}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/show_vpc b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/show_vpc
new file mode 100644
index 00000000..7d2c2eae
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/show_vpc
@@ -0,0 +1,20 @@
+{
+ "vpc-domain-id": "not configured",
+ "vpc-peer-status": "peer-not-configured",
+ "vpc-peer-status-reason": "SUCCESS",
+ "vpc-peer-keepalive-status": "disabled",
+ "vpc-peer-consistency": "inconsistent",
+ "vpc-peer-consistency-status": "SYSERR_MCECM_MCT_DOES_NOT_EXISTS",
+ "vpc-per-vlan-peer-consistency": "inconsistent",
+ "vpc-type-2-consistency": "inconsistent",
+ "vpc-type-2-consistency-status": "SYSERR_MCECM_MCT_DOES_NOT_EXISTS",
+ "vpc-role": "none-established",
+ "num-of-vpcs": "0",
+ "peer-gateway": "disabled",
+ "dual-active-excluded-vlans": "-",
+ "vpc-graceful-consistency-check-status": "enabled",
+ "vpc-auto-recovery-status": "Enabled (timeout = 240 seconds)",
+ "operational-l3-peer": "disabled",
+ "vpc-isolation-status": "disabled-user",
+ "vpc-check-consist-note": "disabled"
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/show_vrf_all b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/show_vrf_all
new file mode 100644
index 00000000..838190fb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/show_vrf_all
@@ -0,0 +1,30 @@
+{
+ "TABLE_vrf": {
+ "ROW_vrf": [
+ {
+ "vrf_name": "coke",
+ "vrf_id": 4,
+ "vrf_state": "Up",
+ "vrf_reason": "--"
+ },
+ {
+ "vrf_name": "default",
+ "vrf_id": 1,
+ "vrf_state": "Up",
+ "vrf_reason": "--"
+ },
+ {
+ "vrf_name": "management",
+ "vrf_id": 2,
+ "vrf_state": "Up",
+ "vrf_reason": "--"
+ },
+ {
+ "vrf_name": "test-vrf",
+ "vrf_id": 3,
+ "vrf_state": "Up",
+ "vrf_reason": "--"
+ }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_hardware b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_hardware
new file mode 100644
index 00000000..612a6b3d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_hardware
@@ -0,0 +1,3 @@
+{
+ "kickstart_ver_str": "7.0(3)I5(3)"
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_inventory b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_inventory
new file mode 100644
index 00000000..c1a149dd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_inventory
@@ -0,0 +1,13 @@
+{
+ "TABLE_inv": {
+ "ROW_inv": [
+ {
+ "name": "Chassis",
+ "desc": "Nexus9000 C9504 (4 Slot) Chassis",
+ "productid": "N9K-C9504",
+ "vendorid": "V01",
+ "serialnum": "BR-549"
+ }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vpc b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vpc
new file mode 100644
index 00000000..f86daa6b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vpc
@@ -0,0 +1,3 @@
+{
+ "vpc-domain-id": "100"
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vrf_all b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vrf_all
new file mode 100644
index 00000000..3f56f8ad
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vrf_all
@@ -0,0 +1,36 @@
+{
+ "TABLE_vrf": {
+ "ROW_vrf": [
+ {
+ "vrf_name": "my_vrf",
+ "vrf_id": 4,
+ "vrf_state": "Up",
+ "vrf_reason": "--"
+ },
+ {
+ "vrf_name": "default",
+ "vrf_id": 1,
+ "vrf_state": "Up",
+ "vrf_reason": "--"
+ },
+ {
+ "vrf_name": "management",
+ "vrf_id": 2,
+ "vrf_state": "Up",
+ "vrf_reason": "--"
+ },
+ {
+ "vrf_name": "test-vrf",
+ "vrf_id": 3,
+ "vrf_state": "Up",
+ "vrf_reason": "--"
+ },
+ {
+ "vrf_name": "obviously-different-vrf",
+ "vrf_id": 4,
+ "vrf_state": "Up",
+ "vrf_reason": "--"
+ }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_vpc_config b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_vpc_config
new file mode 100644
index 00000000..e7258296
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc/vrf_test_vpc_config
@@ -0,0 +1,2 @@
+vpc domain 100
+ peer-keepalive destination 192.168.1.1 source 10.1.1.1 vrf my_vrf
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/show_port-channel_summary b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/show_port-channel_summary
new file mode 100644
index 00000000..d62bea66
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/show_port-channel_summary
@@ -0,0 +1,22 @@
+{
+ "TABLE_channel": {
+ "ROW_channel": [
+ {
+ "group": "10",
+ "port-channel": "port-channel10",
+ "layer": "R",
+ "status": "D",
+ "type": "Eth",
+ "prtcl": "NONE"
+ },
+ {
+ "group": "20",
+ "port-channel": "port-channel20",
+ "layer": "R",
+ "status": "D",
+ "type": "Eth",
+ "prtcl": "NONE"
+ }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/show_vpc_brief b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/show_vpc_brief
new file mode 100644
index 00000000..2206eca0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vpc_interface/show_vpc_brief
@@ -0,0 +1,14 @@
+{
+ "TABLE_vpc": {
+ "ROW_vpc": [
+ {
+ "vpc-id": 100,
+ "vpc-ifindex": "Po10",
+ "vpc-port-state": "Up",
+ "vpc-thru-peerlink": 19,
+ "vpc-consistency": "consistent",
+ "vpc-consistency-status": "SUCCESS"
+ }
+ ]
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_run_all b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_run_all
new file mode 100644
index 00000000..06fe9f91
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_run_all
@@ -0,0 +1,4 @@
+vrf context coke
+vrf context management
+ ip route 172.26.0.0/16 172.26.4.1
+vrf context test-vrf
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default_interface b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default_interface
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default_interface
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management
new file mode 100644
index 00000000..2b6e9b52
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management
@@ -0,0 +1,10 @@
+{
+ "TABLE_vrf": {
+ "ROW_vrf": {
+ "vrf_name": "management",
+ "vrf_id": 2,
+ "vrf_state": "Up",
+ "vrf_reason": "--"
+ }
+ }
+}
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management_interface b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management_interface
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management_interface
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc_interface b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc_interface
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc_interface
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf_af/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf_af/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf_af/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf_af/config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf_af/config.cfg
new file mode 100644
index 00000000..1ac093f7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vrf_af/config.cfg
@@ -0,0 +1,22 @@
+vrf context vrf1
+ address-family ipv4 unicast
+
+vrf context vrf11
+ address-family ipv4 unicast
+ route-target both auto evpn
+
+vrf context vrf21
+ address-family ipv4 unicast
+ route-target import 65000:1000
+ route-target import 65001:1000
+ route-target import 65002:1000
+ route-target export 65000:1000
+ route-target export 65001:1000
+ route-target export 65002:1000
+
+vrf context vrf31
+ address-family ipv4 unicast
+ route-target import 65000:1000
+ route-target export 65001:1000
+ route-target import 65002:1000
+ route-target export 65003:1000 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vsan/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vsan/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vsan/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vsan/shvsan.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vsan/shvsan.cfg
new file mode 100644
index 00000000..035351a9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vsan/shvsan.cfg
@@ -0,0 +1,35 @@
+vsan 1 information
+ name:VSAN0001 state:active
+ interoperability mode:default
+ loadbalancing:src-id/dst-id/oxid
+ operational state:up
+
+vsan 10 information
+ name:VsanAll state:suspended
+ interoperability mode:default
+ loadbalancing:src-id/dst-id/oxid
+ operational state:down
+
+vsan 221 information
+ name:VSAN0221 state:active
+ interoperability mode:default
+ loadbalancing:src-id/dst-id/oxid
+ operational state:up
+
+vsan 922 information
+ name:vsan-SAN-A state:active
+ interoperability mode:default
+ loadbalancing:src-id/dst-id/oxid
+ operational state:down
+
+vsan 923 information
+ name:vsan-SAN-B state:active
+ interoperability mode:default
+ loadbalancing:src-id/dst-id/oxid
+ operational state:up
+
+vsan 4079:evfp_isolated_vsan
+
+vsan 4094:isolated_vsan
+
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vsan/shvsanmem.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vsan/shvsanmem.cfg
new file mode 100644
index 00000000..c57c72a2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vsan/shvsanmem.cfg
@@ -0,0 +1,30 @@
+vsan 1 interfaces:
+ fc1/4 fc1/5 fc1/6 fc1/7
+ fc1/8 fc1/9 fc1/10 fc1/12
+ fc1/13 fc1/14 fc1/15 fc1/16
+ fc1/17 fc1/18 fc1/19 fc1/20
+ fc1/22 fc1/23 fc1/24 fc1/25
+ fc1/26 fc1/27 fc1/28 fc1/29
+ fc1/30 fc1/31 fc1/32 fc1/33
+ fc1/34 fc1/35 fc1/36 fc1/37
+ fc1/38 fc1/39 fc1/40
+
+vsan 10 interfaces:
+
+
+vsan 221 interfaces:
+
+
+vsan 922 interfaces:
+ fc1/1 fc1/2 fc1/3 port-channel55
+
+vsan 923 interfaces:
+ fc1/11 fc1/21 port-channel56
+
+vsan 4079(evfp_isolated_vsan) interfaces:
+
+
+vsan 4094(isolated_vsan) interfaces:
+ port-channel145
+
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep/config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep/config.cfg
new file mode 100644
index 00000000..acc2da73
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep/config.cfg
@@ -0,0 +1,3 @@
+interface nve1
+ member vni 6000
+ multisite border-gateway interface loopback1
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/config.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/config.cfg
new file mode 100644
index 00000000..2532ecf9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/config.cfg
@@ -0,0 +1,3 @@
+interface nve1
+ member vni 6000
+ multisite ingress-replication optimized
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zone_status_vsan.out b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zone_status_vsan.out
new file mode 100644
index 00000000..890b4a09
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zone_status_vsan.out
@@ -0,0 +1,22 @@
+VSAN: 50 default-zone: deny distribute: full Interop: default
+ mode: basic merge-control: allow
+ session: none
+ hard-zoning: enabled broadcast: unsupported
+ smart-zoning: disabled
+ rscn-format: fabric-address
+ activation overwrite control: disabled
+Default zone:
+ qos: none broadcast: unsupported ronly: unsupported
+Full Zoning Database :
+ DB size: 31812 bytes
+ Zonesets:1 Zones:134 Aliases: 106
+Active Zoning Database :
+ DB size: 10808 bytes
+ Name: z50_csphfab1_zoneset Zonesets:1 Zones:134
+Current Total Zone DB Usage: 42620 / 4000000 bytes (1 % used)
+Pending (Session) DB size:
+ Full DB Copy size: n/a
+ Active DB Copy size: n/a
+SFC size: 42620 / 4000000 bytes (1 % used)
+Status: Activation completed at 22:19:08 PDT Apr 13 2020
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zone_vsan.out b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zone_vsan.out
new file mode 100644
index 00000000..3dfc77d3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zone_vsan.out
@@ -0,0 +1,946 @@
+zone name z50_azusant_f0_unity8174_spa1 vsan 50
+ pwwn c0:50:76:09:5b:20:00:64 [azusant_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azplcbsx000652_san01-azsncbsx01_0ac vsan 50
+ fcalias name azplcbsx000652_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:57:6e:66 [azplcbsx000652_san01]
+
+ fcalias name azsncbsx01_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:fa:42:6e [azsncbsx01_c01_0a]
+
+ fcalias name azsncbsx01_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:6e [azsncbsx01_c01_0c]
+
+ fcalias name azsncbsx01_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:6e [azsncbsx01_c02_0a]
+
+ fcalias name azsncbsx01_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:6e [azsncbsx01_c02_0c]
+
+zone name z50_azplcbsx000653_san01-azsncbsx01_0ac vsan 50
+ fcalias name azplcbsx000653_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:54:a7:c8 [azplcbsx000653_san01]
+
+ fcalias name azsncbsx01_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:fa:42:6e [azsncbsx01_c01_0a]
+
+ fcalias name azsncbsx01_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:6e [azsncbsx01_c01_0c]
+
+ fcalias name azsncbsx01_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:6e [azsncbsx01_c02_0a]
+
+ fcalias name azsncbsx01_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:6e [azsncbsx01_c02_0c]
+
+zone name z50_azplwebodb01_f0_unity1773_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azplwebdb01_f0 vsan 50
+ pwwn 21:00:00:24:ff:0c:58:37 [azplwebodb01_f0]
+
+zone name z50_azpwvnasql1_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpwvnasql1_f0 vsan 50
+ pwwn 21:00:00:24:ff:0d:26:68 [azpwvnasql1_f0]
+
+zone name z50_azplcbsx000652_san01-azsncbsx02_0ac vsan 50
+ fcalias name azplcbsx000652_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:57:6e:66 [azplcbsx000652_san01]
+
+ fcalias name azsncbsx02_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:42:fa:8c
+
+ fcalias name azsncbsx02_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:8c [azsncbsx02_c01_0c]
+
+ fcalias name azsncbsx02_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:8c [azsncbsx02_c02_0a]
+
+ fcalias name azsncbsx02_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:8c [azsncbsx02_c02_0c]
+
+zone name z50_azplcbsx000653_san01-azsncbsx02_0ac vsan 50
+ fcalias name azplcbsx000653_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:54:a7:c8 [azplcbsx000653_san01]
+
+ fcalias name azsncbsx02_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:42:fa:8c
+
+ fcalias name azsncbsx02_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:8c [azsncbsx02_c01_0c]
+
+ fcalias name azsncbsx02_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:8c [azsncbsx02_c02_0a]
+
+ fcalias name azsncbsx02_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:8c [azsncbsx02_c02_0c]
+
+zone name z50_azpwovd01_A001_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a2:a0:01 [azpwovd01_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azplocat02_f0_unity8174_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azplocat02_f0 vsan 50
+ pwwn 21:00:00:24:ff:01:18:5f [azplocat02_f0]
+
+zone name z50_azpe123_A03B_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:3b [azpe123_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpe001_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpe001_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1d [azpe001_f0]
+
+zone name z50_azpe123_A03B_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:3b [azpe123_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azuqaunx_f1_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azuqaunx_01_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:0e [azuqaunx-01_f0]
+ pwwn c0:50:76:09:5b:20:00:0f
+
+zone name z50_azplcbsx000309_san01-azsncbsx01_0ac vsan 50
+ fcalias name azsncbsx01_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:fa:42:6e [azsncbsx01_c01_0a]
+
+ fcalias name azsncbsx01_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:6e [azsncbsx01_c01_0c]
+
+ fcalias name azsncbsx01_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:6e [azsncbsx01_c02_0a]
+
+ fcalias name azsncbsx01_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:6e [azsncbsx01_c02_0c]
+
+ fcalias name azplcbsx000309_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:55:f3:e6 [azplcbsx000309_san01]
+
+zone name z50_azpe002_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpe002_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1e [azpe002_f0]
+
+zone name z50_azpe122_A03A_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:3a [azpe122_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpe122_A03A_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:3a [azpe122_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azulaba_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azulaba_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:30
+ pwwn c0:50:76:09:5b:20:00:31
+
+zone name z50_azulaba_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azulaba_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:34 [azulaba_f2]
+ pwwn c0:50:76:09:5b:20:00:35
+
+zone name z50_azlonbasep1_f0_unity8174_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azlonbasep1_f0 vsan 50
+ pwwn 21:00:00:24:ff:01:78:b0 [azlonbasep1_f0]
+
+zone name z50_azplcbsx000309_san01-azsncbsx02_0ac vsan 50
+ fcalias name azsncbsx02_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:42:fa:8c
+
+ fcalias name azsncbsx02_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:8c [azsncbsx02_c01_0c]
+
+ fcalias name azsncbsx02_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:8c [azsncbsx02_c02_0a]
+
+ fcalias name azsncbsx02_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:8c [azsncbsx02_c02_0c]
+
+ fcalias name azplcbsx000309_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:55:f3:e6 [azplcbsx000309_san01]
+
+zone name z50_azplcslrpa1_f0_unity1773 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azplcslrpa1-1_f0 vsan 50
+ pwwn 50:01:24:80:0b:50:46:03 [azplcslrpa1-1_f0]
+
+ fcalias name azplcslrpa1-2_f0 vsan 50
+ pwwn 50:01:24:80:00:a0:46:03 [azplcslrpa1-2_f0]
+
+ fcalias name azplcslrpa1-4_f0 vsan 50
+ pwwn 50:01:24:80:09:c0:66:03 [azplcslrpa1-4_f0]
+
+ fcalias name azplcslrpa1-3_f0 vsan 50
+ pwwn 50:01:24:80:0f:d0:46:03 [azplcslrpa1-3_f0]
+
+zone name z50_azpe120_A038_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:38 [azpe120_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpe120_A038_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:38 [azpe120_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpe121_A039_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:39 [azpe121_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azplcbsx000310_san01-azsncbsx01_0ac vsan 50
+ fcalias name azsncbsx01_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:fa:42:6e [azsncbsx01_c01_0a]
+
+ fcalias name azsncbsx01_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:6e [azsncbsx01_c01_0c]
+
+ fcalias name azsncbsx01_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:6e [azsncbsx01_c02_0a]
+
+ fcalias name azsncbsx01_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:6e [azsncbsx01_c02_0c]
+
+ fcalias name azplcbsx000310_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:55:f4:4a [azplcbsx000310_san01]
+
+zone name z50_azplcbsx000310_san01-azsncbsx02_0ac vsan 50
+ fcalias name azsncbsx02_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:42:fa:8c
+
+ fcalias name azsncbsx02_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:8c [azsncbsx02_c01_0c]
+
+ fcalias name azsncbsx02_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:8c [azsncbsx02_c02_0a]
+
+ fcalias name azsncbsx02_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:8c [azsncbsx02_c02_0c]
+
+ fcalias name azplcbsx000310_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:55:f4:4a [azplcbsx000310_san01]
+
+zone name z50_azpe121_A039_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:39 [azpe121_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpesxctx48_A036_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:36 [azpesxctx48_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpesxctx48_A036_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:36 [azpesxctx48_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx50_A033_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:33 [azpesxctx50_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azuqaunx_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azuqaunx_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx50_A033_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:33 [azpesxctx50_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx46_A034_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:34 [azpesxctx46_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx46_A034_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:34 [azpesxctx46_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpesxctx47_A035_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:35 [azpesxctx47_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azplepicbu01_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azplepicbu01_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a3:a0:02 [azplepicbu01_f0]
+
+zone name z50_azxe01p_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azxe01p_f0 vsan 50
+ pwwn 21:00:00:24:ff:03:0f:ae [azxe01p_f0]
+
+zone name z50_azxe02p_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azxe02p_f0 vsan 50
+ pwwn 21:00:00:24:ff:03:10:69 [azxe02p_f0]
+
+zone name z50_azpesxclin01_f0_unity8174_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azpesxclin01_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:02 [azpesxclin01_f0]
+
+zone name z50_azpesxclin02_f0_unity8174_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azpesxclin02_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:03 [azpesxclin02_f0]
+
+zone name z50_azpesxclin03_f0_unity8174_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azpesxclin03_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:01 [azpesxclin03_f0]
+
+zone name z50_azpesxctx01_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx01_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:04 [azpesxctx01_f0]
+
+zone name z50_azpesxctx02_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx02_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:05 [azpesxctx02_f0]
+
+zone name z50_azpesxctx03_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx03_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:06 [azpesxctx03_f0]
+
+zone name z50_azpesxctx04_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx04_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:07 [azpesxctx04_f0]
+
+zone name z50_azpesxctx05_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx05_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:08 [azpesxctx05_f0]
+
+zone name z50_azpesxctx06_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx06_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:09 [azpesxctx06_f0]
+
+zone name z50_azpesxctx07_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx07_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:0a [azpesxctx07_f0]
+
+zone name z50_azpesxctx08_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx08_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:0b [azpesxctx08_f0]
+
+zone name z50_azpesxctx09_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx09_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:0c [azpesxctx09_f0]
+
+zone name z50_azpesxctx10_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx10_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:0d [azpesxctx10_f0]
+
+zone name z50_azpesxctx11_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx11_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:0e [azpesxctx11_f0]
+
+zone name z50_azpesxctx12_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx12_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:0f [azpesxctx12_f0]
+
+zone name z50_azpesxctx13_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx13_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:10 [azpesxctx13_f0]
+
+zone name z50_azpesxctx14_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx14_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:11 [azpesxctx14_f0]
+
+zone name z50_azpesxctx15_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx15_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:12 [azpesxctx15_f0]
+
+zone name z50_azpesxctx16_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx16_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:13 [azpesxctx16_f0]
+
+zone name z50_azpesxctx17_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx17_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:14 [azpesxctx17_f0]
+
+zone name z50_azpesxctx18_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx18_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:15 [azpesxctx18_f0]
+
+zone name z50_azpesxctx19_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx19_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:16 [azpesxctx19_f0]
+
+zone name z50_azpesxctx20_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx20_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:17 [azpesxctx20_f0]
+
+zone name z50_azpesxctx21_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx21_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:18 [azpesxctx21_f0]
+
+zone name z50_azpesxctx22_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx22_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:19 [azpesxctx22_f0]
+
+zone name z50_azpesxctx23_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx23_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1b [azpesxctx23_f0]
+
+zone name z50_azpesxctx24_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx24_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1a [azpesxctx24_f0]
+
+zone name z50_azpesxctx25_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx25_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1c [azpesxctx25_f0]
+
+zone name z50_azpesxpci01-x_f0_unity8174_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azpesxpci01-x_f0 vsan 50
+ pwwn 21:00:00:24:ff:10:02:00 [azpesxpci01-x_f0]
+
+zone name z50_azxe01p_0FAE_8174_spb_iom_1_fc2 vsan 50
+ pwwn 21:00:00:24:ff:03:0f:ae [azxe01p_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azxe02p_1069_8174_spb_iom_1_fc2 vsan 50
+ pwwn 21:00:00:24:ff:03:10:69 [azxe02p_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpe001_A01D_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1d [azpe001_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpe002_A01E_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1e [azpe002_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx47_A035_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:35 [azpesxctx47_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx49_A037_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:37 [azpesxctx49_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx49_A037_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:37 [azpesxctx49_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpesxctx26_A027_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:27 [azpesxctx26_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpesxctx26_A027_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:27 [azpesxctx26_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx28_A02B_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2b [azpesxctx28_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx28_A02B_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2b [azpesxctx28_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpesxctx31_A021_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:21 [azpesxctx31_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpesxctx31_A021_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:21 [azpesxctx31_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx32_A023_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:23 [azpesxctx32_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx32_A023_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:23 [azpesxctx32_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpesxctx29_A02D_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2d [azpesxctx29_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpesxctx29_A02D_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2d [azpesxctx29_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx33_A024_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:24 [azpesxctx33_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx33_A024_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:24 [azpesxctx33_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpesxctx30_A01F_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1f [azpesxctx30_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpesxctx30_A01F_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1f [azpesxctx30_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx27_A029_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:29 [azpesxctx27_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx27_A029_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:29 [azpesxctx27_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpesxctx35_A026_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:26 [azpesxctx35_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpesxctx35_A026_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:26 [azpesxctx35_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx37_A02A_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2a [azpesxctx37_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx37_A02A_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2a [azpesxctx37_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpesxctx38_A02C_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2c [azpesxctx38_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpesxctx38_A02C_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2c [azpesxctx38_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx40_A020_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:20 [azpesxctx40_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx40_A020_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:20 [azpesxctx40_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpesxctx34_A025_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:25 [azpesxctx34_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpesxctx34_A025_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:25 [azpesxctx34_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx41_A022_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:22 [azpesxctx41_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx41_A022_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:22 [azpesxctx41_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpesxctx42_A02F_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2f [azpesxctx42_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpesxctx42_A02F_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2f [azpesxctx42_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx36_A028_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:28 [azpesxctx36_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx36_A028_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:28 [azpesxctx36_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpesxctx43_A030_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:30 [azpesxctx43_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpesxctx43_A030_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:30 [azpesxctx43_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx44_A031_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:31 [azpesxctx44_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx44_A031_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:31 [azpesxctx44_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azpesxctx45_A032_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:32 [azpesxctx45_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+zone name z50_azpesxctx45_A032_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:32 [azpesxctx45_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+zone name z50_azpesxctx39_A02E_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2e [azpesxctx39_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+zone name z50_azpesxctx39_A02E_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2e [azpesxctx39_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+zone name z50_azunim1_f0_unity8714_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azunim1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:10 [azunim1_f0]
+
+zone name z50_azunim1_f2_unity8714_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azunim1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:14 [azunim1_f2]
+
+zone name z50_azusant_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azusant_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:60 [azusant_f2]
+
+zone name z50_azucdrdb1_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azucdrdb1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:3a [azucdrdb1_f0]
+
+zone name z50_azucdrdb1_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azucdrdb1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:3e [azucdrdb1_f2]
+
+zone name z50_azpups01_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azupsp1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:1a [azupsp1_f0]
+
+zone name z50_azupsdbp1_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azupsdbp1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:20 [azupsdbp1_f0]
+
+zone name z50_azupsdbp1_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azupsdbp1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:24 [azupsdbp1_f2]
+
+zone name z50_azucdrsr1_f0_unity1773_spa3 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azucdrsr1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:44 [azucdrsr1_f0]
+
+zone name z50_azudbas1_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azudbas1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:4a [azudbas1_f0]
+
+zone name z50_azudbas1_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azudbas1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:4e [azudbas1_f2]
+
+zone name z50_azukronp1_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azukronp1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:2a [azukronp1_f0]
+
+zone name z50_azukronp1_f00_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azukronp1_f00 vsan 50
+ pwwn c0:50:76:09:5b:20:00:2e [azukronp1_f00]
+
+zone name z50_azpups01_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azupsp1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:1e [azupsp1_f2]
+
+zone name z50_azucdrsr1_f2_unity1773_spb2 vsan 50
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azucdrsr1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:40 [azucdrsr1_f2]
+
+zone name z50_azuepicclarp1_f0_unity8174_spa3 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azuepicclarp1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:50 [azuepicclarp1_f0]
+
+zone name z50_azuepicclarp1_f2_unity8174_spb2 vsan 50
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azuepicclarp1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:54 [azuepicclarp1_f2]
+
+zone name z50_azpwovd01_A001_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a2:a0:01 [azpwovd01_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zoneset_active_vsan.out b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zoneset_active_vsan.out
new file mode 100644
index 00000000..8d1251c8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zoneset_active_vsan.out
@@ -0,0 +1,606 @@
+zoneset name z50_csphfab1_zoneset vsan 50
+ zone name z50_azusant_f0_unity8174_spa1 vsan 50
+ * fcid 0x3211cb [pwwn c0:50:76:09:5b:20:00:64] [azusant_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azplcbsx000652_san01-azsncbsx01_0ac vsan 50
+ * fcid 0x321240 [pwwn 21:00:f4:e9:d4:57:6e:66] [azplcbsx000652_san01]
+ * fcid 0x321101 [pwwn 20:12:00:a0:98:fa:42:6e] [azsncbsx01_c01_0a]
+ * fcid 0x321100 [pwwn 20:32:00:a0:98:fa:42:6e] [azsncbsx01_c01_0c]
+ * fcid 0x321141 [pwwn 20:13:00:a0:98:fa:42:6e] [azsncbsx01_c02_0a]
+ * fcid 0x321140 [pwwn 20:33:00:a0:98:fa:42:6e] [azsncbsx01_c02_0c]
+
+ zone name z50_azplcbsx000653_san01-azsncbsx01_0ac vsan 50
+ * fcid 0x321260 [pwwn 21:00:f4:e9:d4:54:a7:c8] [azplcbsx000653_san01]
+ * fcid 0x321101 [pwwn 20:12:00:a0:98:fa:42:6e] [azsncbsx01_c01_0a]
+ * fcid 0x321100 [pwwn 20:32:00:a0:98:fa:42:6e] [azsncbsx01_c01_0c]
+ * fcid 0x321141 [pwwn 20:13:00:a0:98:fa:42:6e] [azsncbsx01_c02_0a]
+ * fcid 0x321140 [pwwn 20:33:00:a0:98:fa:42:6e] [azsncbsx01_c02_0c]
+
+ zone name z50_azplwebodb01_f0_unity1773_spa3_spb2 vsan 50
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+ * fcid 0x320120 [pwwn 21:00:00:24:ff:0c:58:37] [azplwebodb01_f0]
+
+ zone name z50_azpwvnasql1_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320b60 [pwwn 21:00:00:24:ff:0d:26:68] [azpwvnasql1_f0]
+
+ zone name z50_azplcbsx000652_san01-azsncbsx02_0ac vsan 50
+ * fcid 0x321240 [pwwn 21:00:f4:e9:d4:57:6e:66] [azplcbsx000652_san01]
+ pwwn 20:12:00:a0:98:42:fa:8c
+ * fcid 0x321040 [pwwn 20:32:00:a0:98:fa:42:8c] [azsncbsx02_c01_0c]
+ * fcid 0x3210a1 [pwwn 20:13:00:a0:98:fa:42:8c] [azsncbsx02_c02_0a]
+ * fcid 0x3210a0 [pwwn 20:33:00:a0:98:fa:42:8c] [azsncbsx02_c02_0c]
+
+ zone name z50_azplcbsx000653_san01-azsncbsx02_0ac vsan 50
+ * fcid 0x321260 [pwwn 21:00:f4:e9:d4:54:a7:c8] [azplcbsx000653_san01]
+ pwwn 20:12:00:a0:98:42:fa:8c
+ * fcid 0x321040 [pwwn 20:32:00:a0:98:fa:42:8c] [azsncbsx02_c01_0c]
+ * fcid 0x3210a1 [pwwn 20:13:00:a0:98:fa:42:8c] [azsncbsx02_c02_0a]
+ * fcid 0x3210a0 [pwwn 20:33:00:a0:98:fa:42:8c] [azsncbsx02_c02_0c]
+
+ zone name z50_azpwovd01_A001_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f5d [pwwn 20:ff:00:25:b5:a2:a0:01] [azpwovd01_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azplocat02_f0_unity8174_spa3_spb2 vsan 50
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+ * fcid 0x320017 [pwwn 21:00:00:24:ff:01:18:5f] [azplocat02_f0]
+
+ zone name z50_azpe123_A03B_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f9f [pwwn 20:ff:00:25:b5:a1:a0:3b] [azpe123_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpe001_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f5e [pwwn 20:ff:00:25:b5:a1:a0:1d] [azpe001_f0]
+
+ zone name z50_azpe123_A03B_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f9f [pwwn 20:ff:00:25:b5:a1:a0:3b] [azpe123_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azuqaunx_f1_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x3211a1 [pwwn c0:50:76:09:5b:20:00:0e] [azuqaunx-01_f0]
+ pwwn c0:50:76:09:5b:20:00:0f
+
+ zone name z50_azplcbsx000309_san01-azsncbsx01_0ac vsan 50
+ * fcid 0x321101 [pwwn 20:12:00:a0:98:fa:42:6e] [azsncbsx01_c01_0a]
+ * fcid 0x321100 [pwwn 20:32:00:a0:98:fa:42:6e] [azsncbsx01_c01_0c]
+ * fcid 0x321141 [pwwn 20:13:00:a0:98:fa:42:6e] [azsncbsx01_c02_0a]
+ * fcid 0x321140 [pwwn 20:33:00:a0:98:fa:42:6e] [azsncbsx01_c02_0c]
+ * fcid 0x321160 [pwwn 21:00:f4:e9:d4:55:f3:e6] [azplcbsx000309_san01]
+
+ zone name z50_azpe002_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f5f [pwwn 20:ff:00:25:b5:a1:a0:1e] [azpe002_f0]
+
+ zone name z50_azpe122_A03A_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f9e [pwwn 20:ff:00:25:b5:a1:a0:3a] [azpe122_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpe122_A03A_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f9e [pwwn 20:ff:00:25:b5:a1:a0:3a] [azpe122_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azulaba_f0_unity8174_spa1 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x3211c5 [pwwn c0:50:76:09:5b:20:00:30]
+ pwwn c0:50:76:09:5b:20:00:31
+
+ zone name z50_azulaba_f2_unity8174_spb0 vsan 50
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x321205 [pwwn c0:50:76:09:5b:20:00:34] [azulaba_f2]
+ pwwn c0:50:76:09:5b:20:00:35
+
+ zone name z50_azlonbasep1_f0_unity8174_spa3_spb2 vsan 50
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+ * fcid 0x320018 [pwwn 21:00:00:24:ff:01:78:b0] [azlonbasep1_f0]
+
+ zone name z50_azplcbsx000309_san01-azsncbsx02_0ac vsan 50
+ pwwn 20:12:00:a0:98:42:fa:8c
+ * fcid 0x321040 [pwwn 20:32:00:a0:98:fa:42:8c] [azsncbsx02_c01_0c]
+ * fcid 0x3210a1 [pwwn 20:13:00:a0:98:fa:42:8c] [azsncbsx02_c02_0a]
+ * fcid 0x3210a0 [pwwn 20:33:00:a0:98:fa:42:8c] [azsncbsx02_c02_0c]
+ * fcid 0x321160 [pwwn 21:00:f4:e9:d4:55:f3:e6] [azplcbsx000309_san01]
+
+ zone name z50_azplcslrpa1_f0_unity1773 vsan 50
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320e20 [pwwn 50:01:24:80:0b:50:46:03] [azplcslrpa1-1_f0]
+ * fcid 0x320e60 [pwwn 50:01:24:80:00:a0:46:03] [azplcslrpa1-2_f0]
+ * fcid 0x320e40 [pwwn 50:01:24:80:09:c0:66:03] [azplcslrpa1-4_f0]
+ * fcid 0x320e80 [pwwn 50:01:24:80:0f:d0:46:03] [azplcslrpa1-3_f0]
+
+ zone name z50_azpe120_A038_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f9c [pwwn 20:ff:00:25:b5:a1:a0:38] [azpe120_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpe120_A038_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f9c [pwwn 20:ff:00:25:b5:a1:a0:38] [azpe120_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpe121_A039_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f9d [pwwn 20:ff:00:25:b5:a1:a0:39] [azpe121_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azplcbsx000310_san01-azsncbsx01_0ac vsan 50
+ * fcid 0x321101 [pwwn 20:12:00:a0:98:fa:42:6e] [azsncbsx01_c01_0a]
+ * fcid 0x321100 [pwwn 20:32:00:a0:98:fa:42:6e] [azsncbsx01_c01_0c]
+ * fcid 0x321141 [pwwn 20:13:00:a0:98:fa:42:6e] [azsncbsx01_c02_0a]
+ * fcid 0x321140 [pwwn 20:33:00:a0:98:fa:42:6e] [azsncbsx01_c02_0c]
+ * fcid 0x321180 [pwwn 21:00:f4:e9:d4:55:f4:4a] [azplcbsx000310_san01]
+
+ zone name z50_azplcbsx000310_san01-azsncbsx02_0ac vsan 50
+ pwwn 20:12:00:a0:98:42:fa:8c
+ * fcid 0x321040 [pwwn 20:32:00:a0:98:fa:42:8c] [azsncbsx02_c01_0c]
+ * fcid 0x3210a1 [pwwn 20:13:00:a0:98:fa:42:8c] [azsncbsx02_c02_0a]
+ * fcid 0x3210a0 [pwwn 20:33:00:a0:98:fa:42:8c] [azsncbsx02_c02_0c]
+ * fcid 0x321180 [pwwn 21:00:f4:e9:d4:55:f4:4a] [azplcbsx000310_san01]
+
+ zone name z50_azpe121_A039_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f9d [pwwn 20:ff:00:25:b5:a1:a0:39] [azpe121_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx48_A036_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f99 [pwwn 20:ff:00:25:b5:a1:a0:36] [azpesxctx48_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx48_A036_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f99 [pwwn 20:ff:00:25:b5:a1:a0:36] [azpesxctx48_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx50_A033_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f9b [pwwn 20:ff:00:25:b5:a1:a0:33] [azpesxctx50_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azuqaunx_f0_unity8174_spa1 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azuqaunx_f2_unity8174_spb0 vsan 50
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx50_A033_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f9b [pwwn 20:ff:00:25:b5:a1:a0:33] [azpesxctx50_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx46_A034_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f97 [pwwn 20:ff:00:25:b5:a1:a0:34] [azpesxctx46_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx46_A034_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f97 [pwwn 20:ff:00:25:b5:a1:a0:34] [azpesxctx46_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx47_A035_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f98 [pwwn 20:ff:00:25:b5:a1:a0:35] [azpesxctx47_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azplepicbu01_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f82 [pwwn 20:ff:00:25:b5:a3:a0:02] [azplepicbu01_f0]
+
+ zone name z50_azxe01p_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320ca0 [pwwn 21:00:00:24:ff:03:0f:ae] [azxe01p_f0]
+
+ zone name z50_azxe02p_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320da0 [pwwn 21:00:00:24:ff:03:10:69] [azxe02p_f0]
+
+ zone name z50_azpesxclin01_f0_unity8174_spa3_spb2 vsan 50
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+ * fcid 0x320f42 [pwwn 20:ff:00:25:b5:a1:a0:02] [azpesxclin01_f0]
+
+ zone name z50_azpesxclin02_f0_unity8174_spa3_spb2 vsan 50
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+ * fcid 0x320f43 [pwwn 20:ff:00:25:b5:a1:a0:03] [azpesxclin02_f0]
+
+ zone name z50_azpesxclin03_f0_unity8174_spa3_spb2 vsan 50
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+ * fcid 0x320f44 [pwwn 20:ff:00:25:b5:a1:a0:01] [azpesxclin03_f0]
+
+ zone name z50_azpesxctx01_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f41 [pwwn 20:ff:00:25:b5:a1:a0:04] [azpesxctx01_f0]
+
+ zone name z50_azpesxctx02_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f45 [pwwn 20:ff:00:25:b5:a1:a0:05] [azpesxctx02_f0]
+
+ zone name z50_azpesxctx03_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f46 [pwwn 20:ff:00:25:b5:a1:a0:06] [azpesxctx03_f0]
+
+ zone name z50_azpesxctx04_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f47 [pwwn 20:ff:00:25:b5:a1:a0:07] [azpesxctx04_f0]
+
+ zone name z50_azpesxctx05_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f48 [pwwn 20:ff:00:25:b5:a1:a0:08] [azpesxctx05_f0]
+
+ zone name z50_azpesxctx06_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f49 [pwwn 20:ff:00:25:b5:a1:a0:09] [azpesxctx06_f0]
+
+ zone name z50_azpesxctx07_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f4a [pwwn 20:ff:00:25:b5:a1:a0:0a] [azpesxctx07_f0]
+
+ zone name z50_azpesxctx08_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f4b [pwwn 20:ff:00:25:b5:a1:a0:0b] [azpesxctx08_f0]
+
+ zone name z50_azpesxctx09_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f4c [pwwn 20:ff:00:25:b5:a1:a0:0c] [azpesxctx09_f0]
+
+ zone name z50_azpesxctx10_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f4d [pwwn 20:ff:00:25:b5:a1:a0:0d] [azpesxctx10_f0]
+
+ zone name z50_azpesxctx11_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f4e [pwwn 20:ff:00:25:b5:a1:a0:0e] [azpesxctx11_f0]
+
+ zone name z50_azpesxctx12_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f4f [pwwn 20:ff:00:25:b5:a1:a0:0f] [azpesxctx12_f0]
+
+ zone name z50_azpesxctx13_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f50 [pwwn 20:ff:00:25:b5:a1:a0:10] [azpesxctx13_f0]
+
+ zone name z50_azpesxctx14_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f51 [pwwn 20:ff:00:25:b5:a1:a0:11] [azpesxctx14_f0]
+
+ zone name z50_azpesxctx15_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f52 [pwwn 20:ff:00:25:b5:a1:a0:12] [azpesxctx15_f0]
+
+ zone name z50_azpesxctx16_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f53 [pwwn 20:ff:00:25:b5:a1:a0:13] [azpesxctx16_f0]
+
+ zone name z50_azpesxctx17_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f54 [pwwn 20:ff:00:25:b5:a1:a0:14] [azpesxctx17_f0]
+
+ zone name z50_azpesxctx18_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f55 [pwwn 20:ff:00:25:b5:a1:a0:15] [azpesxctx18_f0]
+
+ zone name z50_azpesxctx19_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f56 [pwwn 20:ff:00:25:b5:a1:a0:16] [azpesxctx19_f0]
+
+ zone name z50_azpesxctx20_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f57 [pwwn 20:ff:00:25:b5:a1:a0:17] [azpesxctx20_f0]
+
+ zone name z50_azpesxctx21_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f59 [pwwn 20:ff:00:25:b5:a1:a0:18] [azpesxctx21_f0]
+
+ zone name z50_azpesxctx22_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f58 [pwwn 20:ff:00:25:b5:a1:a0:19] [azpesxctx22_f0]
+
+ zone name z50_azpesxctx23_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f5a [pwwn 20:ff:00:25:b5:a1:a0:1b] [azpesxctx23_f0]
+
+ zone name z50_azpesxctx24_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f5b [pwwn 20:ff:00:25:b5:a1:a0:1a] [azpesxctx24_f0]
+
+ zone name z50_azpesxctx25_f0_unity8174_spa1_spb0 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x320f5c [pwwn 20:ff:00:25:b5:a1:a0:1c] [azpesxctx25_f0]
+
+ zone name z50_azpesxpci01-x_f0_unity8174_spa3_spb2 vsan 50
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+ * fcid 0x320f60 [pwwn 21:00:00:24:ff:10:02:00] [azpesxpci01-x_f0]
+
+ zone name z50_azxe01p_0FAE_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320ca0 [pwwn 21:00:00:24:ff:03:0f:ae] [azxe01p_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azxe02p_1069_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320da0 [pwwn 21:00:00:24:ff:03:10:69] [azxe02p_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpe001_A01D_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f5e [pwwn 20:ff:00:25:b5:a1:a0:1d] [azpe001_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpe002_A01E_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f5f [pwwn 20:ff:00:25:b5:a1:a0:1e] [azpe002_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx47_A035_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f98 [pwwn 20:ff:00:25:b5:a1:a0:35] [azpesxctx47_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx49_A037_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f9a [pwwn 20:ff:00:25:b5:a1:a0:37] [azpesxctx49_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx49_A037_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f9a [pwwn 20:ff:00:25:b5:a1:a0:37] [azpesxctx49_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx26_A027_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f83 [pwwn 20:ff:00:25:b5:a1:a0:27] [azpesxctx26_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx26_A027_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f83 [pwwn 20:ff:00:25:b5:a1:a0:27] [azpesxctx26_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx28_A02B_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f85 [pwwn 20:ff:00:25:b5:a1:a0:2b] [azpesxctx28_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx28_A02B_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f85 [pwwn 20:ff:00:25:b5:a1:a0:2b] [azpesxctx28_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx31_A021_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f88 [pwwn 20:ff:00:25:b5:a1:a0:21] [azpesxctx31_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx31_A021_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f88 [pwwn 20:ff:00:25:b5:a1:a0:21] [azpesxctx31_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx32_A023_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f89 [pwwn 20:ff:00:25:b5:a1:a0:23] [azpesxctx32_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx32_A023_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f89 [pwwn 20:ff:00:25:b5:a1:a0:23] [azpesxctx32_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx29_A02D_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f86 [pwwn 20:ff:00:25:b5:a1:a0:2d] [azpesxctx29_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx29_A02D_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f86 [pwwn 20:ff:00:25:b5:a1:a0:2d] [azpesxctx29_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx33_A024_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f8b [pwwn 20:ff:00:25:b5:a1:a0:24] [azpesxctx33_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx33_A024_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f8b [pwwn 20:ff:00:25:b5:a1:a0:24] [azpesxctx33_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx30_A01F_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f87 [pwwn 20:ff:00:25:b5:a1:a0:1f] [azpesxctx30_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx30_A01F_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f87 [pwwn 20:ff:00:25:b5:a1:a0:1f] [azpesxctx30_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx27_A029_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f84 [pwwn 20:ff:00:25:b5:a1:a0:29] [azpesxctx27_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx27_A029_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f84 [pwwn 20:ff:00:25:b5:a1:a0:29] [azpesxctx27_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx35_A026_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f8c [pwwn 20:ff:00:25:b5:a1:a0:26] [azpesxctx35_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx35_A026_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f8c [pwwn 20:ff:00:25:b5:a1:a0:26] [azpesxctx35_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx37_A02A_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f8e [pwwn 20:ff:00:25:b5:a1:a0:2a] [azpesxctx37_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx37_A02A_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f8e [pwwn 20:ff:00:25:b5:a1:a0:2a] [azpesxctx37_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx38_A02C_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f8f [pwwn 20:ff:00:25:b5:a1:a0:2c] [azpesxctx38_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx38_A02C_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f8f [pwwn 20:ff:00:25:b5:a1:a0:2c] [azpesxctx38_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx40_A020_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f91 [pwwn 20:ff:00:25:b5:a1:a0:20] [azpesxctx40_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx40_A020_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f91 [pwwn 20:ff:00:25:b5:a1:a0:20] [azpesxctx40_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx34_A025_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f8a [pwwn 20:ff:00:25:b5:a1:a0:25] [azpesxctx34_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx34_A025_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f8a [pwwn 20:ff:00:25:b5:a1:a0:25] [azpesxctx34_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx41_A022_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f92 [pwwn 20:ff:00:25:b5:a1:a0:22] [azpesxctx41_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx41_A022_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f92 [pwwn 20:ff:00:25:b5:a1:a0:22] [azpesxctx41_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx42_A02F_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f93 [pwwn 20:ff:00:25:b5:a1:a0:2f] [azpesxctx42_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx42_A02F_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f93 [pwwn 20:ff:00:25:b5:a1:a0:2f] [azpesxctx42_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx36_A028_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f8d [pwwn 20:ff:00:25:b5:a1:a0:28] [azpesxctx36_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx36_A028_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f8d [pwwn 20:ff:00:25:b5:a1:a0:28] [azpesxctx36_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx43_A030_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f94 [pwwn 20:ff:00:25:b5:a1:a0:30] [azpesxctx43_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx43_A030_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f94 [pwwn 20:ff:00:25:b5:a1:a0:30] [azpesxctx43_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx44_A031_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f95 [pwwn 20:ff:00:25:b5:a1:a0:31] [azpesxctx44_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx44_A031_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f95 [pwwn 20:ff:00:25:b5:a1:a0:31] [azpesxctx44_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx45_A032_8174_spa_iom_1_fc1 vsan 50
+ * fcid 0x320f96 [pwwn 20:ff:00:25:b5:a1:a0:32] [azpesxctx45_f0]
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx45_A032_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f96 [pwwn 20:ff:00:25:b5:a1:a0:32] [azpesxctx45_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx39_A02E_8174_spb_iom_1_fc0 vsan 50
+ * fcid 0x320f90 [pwwn 20:ff:00:25:b5:a1:a0:2e] [azpesxctx39_f0]
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx39_A02E_8174_spa_iom_1_fc3 vsan 50
+ * fcid 0x320f90 [pwwn 20:ff:00:25:b5:a1:a0:2e] [azpesxctx39_f0]
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+
+ zone name z50_azunim1_f0_unity8714_spa1 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x3211c1 [pwwn c0:50:76:09:5b:20:00:10] [azunim1_f0]
+
+ zone name z50_azunim1_f2_unity8714_spb0 vsan 50
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x321201 [pwwn c0:50:76:09:5b:20:00:14] [azunim1_f2]
+
+ zone name z50_azusant_f2_unity8174_spb0 vsan 50
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x32120b [pwwn c0:50:76:09:5b:20:00:60] [azusant_f2]
+
+ zone name z50_azucdrdb1_f0_unity8174_spa1 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x3211a7 [pwwn c0:50:76:09:5b:20:00:3a] [azucdrdb1_f0]
+
+ zone name z50_azucdrdb1_f2_unity8174_spb0 vsan 50
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x321229 [pwwn c0:50:76:09:5b:20:00:3e] [azucdrdb1_f2]
+
+ zone name z50_azpups01_f0_unity8174_spa1 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x3211a3 [pwwn c0:50:76:09:5b:20:00:1a] [azupsp1_f0]
+
+ zone name z50_azupsdbp1_f0_unity8174_spa1 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321203 [pwwn c0:50:76:09:5b:20:00:20] [azupsdbp1_f0]
+
+ zone name z50_azupsdbp1_f2_unity8174_spb0 vsan 50
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x3211c3 [pwwn c0:50:76:09:5b:20:00:24] [azupsdbp1_f2]
+
+ zone name z50_azucdrsr1_f0_unity1773_spa3 vsan 50
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+ * fcid 0x3211c7 [pwwn c0:50:76:09:5b:20:00:44] [azucdrsr1_f0]
+
+ zone name z50_azudbas1_f0_unity8174_spa1 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x32122b [pwwn c0:50:76:09:5b:20:00:4a] [azudbas1_f0]
+
+ zone name z50_azudbas1_f2_unity8174_spb0 vsan 50
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x3211a9 [pwwn c0:50:76:09:5b:20:00:4e] [azudbas1_f2]
+
+ zone name z50_azukronp1_f0_unity8174_spa1 vsan 50
+ * fcid 0x320fa0 [pwwn 50:06:01:61:47:e4:22:97] [azseunty1773_SPA1]
+ * fcid 0x321227 [pwwn c0:50:76:09:5b:20:00:2a] [azukronp1_f0]
+
+ zone name z50_azukronp1_f00_unity8174_spb0 vsan 50
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x3211a5 [pwwn c0:50:76:09:5b:20:00:2e] [azukronp1_f00]
+
+ zone name z50_azpups01_f2_unity8174_spb0 vsan 50
+ * fcid 0x321000 [pwwn 50:06:01:68:47:e4:22:97] [azseunty1773_SPB0]
+ * fcid 0x321225 [pwwn c0:50:76:09:5b:20:00:1e] [azupsp1_f2]
+
+ zone name z50_azucdrsr1_f2_unity1773_spb2 vsan 50
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+ * fcid 0x321207 [pwwn c0:50:76:09:5b:20:00:40] [azucdrsr1_f2]
+
+ zone name z50_azuepicclarp1_f0_unity8174_spa3 vsan 50
+ * fcid 0x320fc0 [pwwn 50:06:01:63:47:e4:22:97] [azseunty1773_SPA3]
+ * fcid 0x3211c9 [pwwn c0:50:76:09:5b:20:00:50] [azuepicclarp1_f0]
+
+ zone name z50_azuepicclarp1_f2_unity8174_spb2 vsan 50
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
+ * fcid 0x321209 [pwwn c0:50:76:09:5b:20:00:54] [azuepicclarp1_f2]
+
+ zone name z50_azpwovd01_A001_8174_spb_iom_1_fc2 vsan 50
+ * fcid 0x320f5d [pwwn 20:ff:00:25:b5:a2:a0:01] [azpwovd01_f0]
+ * fcid 0x321020 [pwwn 50:06:01:6a:47:e4:22:97] [azseunty1773_SPB2]
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zoneset_vsan.out b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zoneset_vsan.out
new file mode 100644
index 00000000..ec6ca418
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/show_zoneset_vsan.out
@@ -0,0 +1,947 @@
+zoneset name z50_csphfab1_zoneset vsan 50
+ zone name z50_azusant_f0_unity8174_spa1 vsan 50
+ pwwn c0:50:76:09:5b:20:00:64 [azusant_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azplcbsx000652_san01-azsncbsx01_0ac vsan 50
+ fcalias name azplcbsx000652_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:57:6e:66 [azplcbsx000652_san01]
+
+ fcalias name azsncbsx01_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:fa:42:6e [azsncbsx01_c01_0a]
+
+ fcalias name azsncbsx01_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:6e [azsncbsx01_c01_0c]
+
+ fcalias name azsncbsx01_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:6e [azsncbsx01_c02_0a]
+
+ fcalias name azsncbsx01_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:6e [azsncbsx01_c02_0c]
+
+ zone name z50_azplcbsx000653_san01-azsncbsx01_0ac vsan 50
+ fcalias name azplcbsx000653_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:54:a7:c8 [azplcbsx000653_san01]
+
+ fcalias name azsncbsx01_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:fa:42:6e [azsncbsx01_c01_0a]
+
+ fcalias name azsncbsx01_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:6e [azsncbsx01_c01_0c]
+
+ fcalias name azsncbsx01_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:6e [azsncbsx01_c02_0a]
+
+ fcalias name azsncbsx01_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:6e [azsncbsx01_c02_0c]
+
+ zone name z50_azplwebodb01_f0_unity1773_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azplwebdb01_f0 vsan 50
+ pwwn 21:00:00:24:ff:0c:58:37 [azplwebodb01_f0]
+
+ zone name z50_azpwvnasql1_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpwvnasql1_f0 vsan 50
+ pwwn 21:00:00:24:ff:0d:26:68 [azpwvnasql1_f0]
+
+ zone name z50_azplcbsx000652_san01-azsncbsx02_0ac vsan 50
+ fcalias name azplcbsx000652_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:57:6e:66 [azplcbsx000652_san01]
+
+ fcalias name azsncbsx02_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:42:fa:8c
+
+ fcalias name azsncbsx02_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:8c [azsncbsx02_c01_0c]
+
+ fcalias name azsncbsx02_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:8c [azsncbsx02_c02_0a]
+
+ fcalias name azsncbsx02_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:8c [azsncbsx02_c02_0c]
+
+ zone name z50_azplcbsx000653_san01-azsncbsx02_0ac vsan 50
+ fcalias name azplcbsx000653_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:54:a7:c8 [azplcbsx000653_san01]
+
+ fcalias name azsncbsx02_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:42:fa:8c
+
+ fcalias name azsncbsx02_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:8c [azsncbsx02_c01_0c]
+
+ fcalias name azsncbsx02_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:8c [azsncbsx02_c02_0a]
+
+ fcalias name azsncbsx02_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:8c [azsncbsx02_c02_0c]
+
+ zone name z50_azpwovd01_A001_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a2:a0:01 [azpwovd01_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azplocat02_f0_unity8174_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azplocat02_f0 vsan 50
+ pwwn 21:00:00:24:ff:01:18:5f [azplocat02_f0]
+
+ zone name z50_azpe123_A03B_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:3b [azpe123_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpe001_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpe001_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1d [azpe001_f0]
+
+ zone name z50_azpe123_A03B_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:3b [azpe123_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azuqaunx_f1_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azuqaunx_01_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:0e [azuqaunx-01_f0]
+ pwwn c0:50:76:09:5b:20:00:0f
+
+ zone name z50_azplcbsx000309_san01-azsncbsx01_0ac vsan 50
+ fcalias name azsncbsx01_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:fa:42:6e [azsncbsx01_c01_0a]
+
+ fcalias name azsncbsx01_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:6e [azsncbsx01_c01_0c]
+
+ fcalias name azsncbsx01_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:6e [azsncbsx01_c02_0a]
+
+ fcalias name azsncbsx01_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:6e [azsncbsx01_c02_0c]
+
+ fcalias name azplcbsx000309_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:55:f3:e6 [azplcbsx000309_san01]
+
+ zone name z50_azpe002_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpe002_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1e [azpe002_f0]
+
+ zone name z50_azpe122_A03A_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:3a [azpe122_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpe122_A03A_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:3a [azpe122_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azulaba_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azulaba_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:30
+ pwwn c0:50:76:09:5b:20:00:31
+
+ zone name z50_azulaba_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azulaba_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:34 [azulaba_f2]
+ pwwn c0:50:76:09:5b:20:00:35
+
+ zone name z50_azlonbasep1_f0_unity8174_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azlonbasep1_f0 vsan 50
+ pwwn 21:00:00:24:ff:01:78:b0 [azlonbasep1_f0]
+
+ zone name z50_azplcbsx000309_san01-azsncbsx02_0ac vsan 50
+ fcalias name azsncbsx02_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:42:fa:8c
+
+ fcalias name azsncbsx02_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:8c [azsncbsx02_c01_0c]
+
+ fcalias name azsncbsx02_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:8c [azsncbsx02_c02_0a]
+
+ fcalias name azsncbsx02_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:8c [azsncbsx02_c02_0c]
+
+ fcalias name azplcbsx000309_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:55:f3:e6 [azplcbsx000309_san01]
+
+ zone name z50_azplcslrpa1_f0_unity1773 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azplcslrpa1-1_f0 vsan 50
+ pwwn 50:01:24:80:0b:50:46:03 [azplcslrpa1-1_f0]
+
+ fcalias name azplcslrpa1-2_f0 vsan 50
+ pwwn 50:01:24:80:00:a0:46:03 [azplcslrpa1-2_f0]
+
+ fcalias name azplcslrpa1-4_f0 vsan 50
+ pwwn 50:01:24:80:09:c0:66:03 [azplcslrpa1-4_f0]
+
+ fcalias name azplcslrpa1-3_f0 vsan 50
+ pwwn 50:01:24:80:0f:d0:46:03 [azplcslrpa1-3_f0]
+
+ zone name z50_azpe120_A038_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:38 [azpe120_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpe120_A038_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:38 [azpe120_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpe121_A039_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:39 [azpe121_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azplcbsx000310_san01-azsncbsx01_0ac vsan 50
+ fcalias name azsncbsx01_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:fa:42:6e [azsncbsx01_c01_0a]
+
+ fcalias name azsncbsx01_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:6e [azsncbsx01_c01_0c]
+
+ fcalias name azsncbsx01_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:6e [azsncbsx01_c02_0a]
+
+ fcalias name azsncbsx01_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:6e [azsncbsx01_c02_0c]
+
+ fcalias name azplcbsx000310_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:55:f4:4a [azplcbsx000310_san01]
+
+ zone name z50_azplcbsx000310_san01-azsncbsx02_0ac vsan 50
+ fcalias name azsncbsx02_c01_0a vsan 50
+ pwwn 20:12:00:a0:98:42:fa:8c
+
+ fcalias name azsncbsx02_c01_0c vsan 50
+ pwwn 20:32:00:a0:98:fa:42:8c [azsncbsx02_c01_0c]
+
+ fcalias name azsncbsx02_c02_0a vsan 50
+ pwwn 20:13:00:a0:98:fa:42:8c [azsncbsx02_c02_0a]
+
+ fcalias name azsncbsx02_c02_0c vsan 50
+ pwwn 20:33:00:a0:98:fa:42:8c [azsncbsx02_c02_0c]
+
+ fcalias name azplcbsx000310_san01 vsan 50
+ pwwn 21:00:f4:e9:d4:55:f4:4a [azplcbsx000310_san01]
+
+ zone name z50_azpe121_A039_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:39 [azpe121_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx48_A036_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:36 [azpesxctx48_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx48_A036_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:36 [azpesxctx48_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx50_A033_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:33 [azpesxctx50_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azuqaunx_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azuqaunx_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx50_A033_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:33 [azpesxctx50_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx46_A034_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:34 [azpesxctx46_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx46_A034_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:34 [azpesxctx46_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx47_A035_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:35 [azpesxctx47_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azplepicbu01_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azplepicbu01_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a3:a0:02 [azplepicbu01_f0]
+
+ zone name z50_azxe01p_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azxe01p_f0 vsan 50
+ pwwn 21:00:00:24:ff:03:0f:ae [azxe01p_f0]
+
+ zone name z50_azxe02p_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azxe02p_f0 vsan 50
+ pwwn 21:00:00:24:ff:03:10:69 [azxe02p_f0]
+
+ zone name z50_azpesxclin01_f0_unity8174_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azpesxclin01_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:02 [azpesxclin01_f0]
+
+ zone name z50_azpesxclin02_f0_unity8174_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azpesxclin02_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:03 [azpesxclin02_f0]
+
+ zone name z50_azpesxclin03_f0_unity8174_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azpesxclin03_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:01 [azpesxclin03_f0]
+
+ zone name z50_azpesxctx01_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx01_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:04 [azpesxctx01_f0]
+
+ zone name z50_azpesxctx02_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx02_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:05 [azpesxctx02_f0]
+
+ zone name z50_azpesxctx03_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx03_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:06 [azpesxctx03_f0]
+
+ zone name z50_azpesxctx04_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx04_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:07 [azpesxctx04_f0]
+
+ zone name z50_azpesxctx05_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx05_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:08 [azpesxctx05_f0]
+
+ zone name z50_azpesxctx06_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx06_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:09 [azpesxctx06_f0]
+
+ zone name z50_azpesxctx07_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx07_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:0a [azpesxctx07_f0]
+
+ zone name z50_azpesxctx08_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx08_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:0b [azpesxctx08_f0]
+
+ zone name z50_azpesxctx09_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx09_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:0c [azpesxctx09_f0]
+
+ zone name z50_azpesxctx10_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx10_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:0d [azpesxctx10_f0]
+
+ zone name z50_azpesxctx11_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx11_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:0e [azpesxctx11_f0]
+
+ zone name z50_azpesxctx12_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx12_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:0f [azpesxctx12_f0]
+
+ zone name z50_azpesxctx13_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx13_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:10 [azpesxctx13_f0]
+
+ zone name z50_azpesxctx14_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx14_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:11 [azpesxctx14_f0]
+
+ zone name z50_azpesxctx15_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx15_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:12 [azpesxctx15_f0]
+
+ zone name z50_azpesxctx16_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx16_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:13 [azpesxctx16_f0]
+
+ zone name z50_azpesxctx17_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx17_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:14 [azpesxctx17_f0]
+
+ zone name z50_azpesxctx18_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx18_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:15 [azpesxctx18_f0]
+
+ zone name z50_azpesxctx19_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx19_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:16 [azpesxctx19_f0]
+
+ zone name z50_azpesxctx20_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx20_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:17 [azpesxctx20_f0]
+
+ zone name z50_azpesxctx21_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx21_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:18 [azpesxctx21_f0]
+
+ zone name z50_azpesxctx22_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx22_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:19 [azpesxctx22_f0]
+
+ zone name z50_azpesxctx23_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx23_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1b [azpesxctx23_f0]
+
+ zone name z50_azpesxctx24_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx24_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1a [azpesxctx24_f0]
+
+ zone name z50_azpesxctx25_f0_unity8174_spa1_spb0 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azpesxctx25_f0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1c [azpesxctx25_f0]
+
+ zone name z50_azpesxpci01-x_f0_unity8174_spa3_spb2 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azpesxpci01-x_f0 vsan 50
+ pwwn 21:00:00:24:ff:10:02:00 [azpesxpci01-x_f0]
+
+ zone name z50_azxe01p_0FAE_8174_spb_iom_1_fc2 vsan 50
+ pwwn 21:00:00:24:ff:03:0f:ae [azxe01p_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azxe02p_1069_8174_spb_iom_1_fc2 vsan 50
+ pwwn 21:00:00:24:ff:03:10:69 [azxe02p_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpe001_A01D_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1d [azpe001_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpe002_A01E_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1e [azpe002_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx47_A035_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:35 [azpesxctx47_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx49_A037_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:37 [azpesxctx49_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx49_A037_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:37 [azpesxctx49_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx26_A027_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:27 [azpesxctx26_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx26_A027_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:27 [azpesxctx26_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx28_A02B_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2b [azpesxctx28_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx28_A02B_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2b [azpesxctx28_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx31_A021_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:21 [azpesxctx31_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx31_A021_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:21 [azpesxctx31_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx32_A023_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:23 [azpesxctx32_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx32_A023_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:23 [azpesxctx32_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx29_A02D_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2d [azpesxctx29_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx29_A02D_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2d [azpesxctx29_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx33_A024_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:24 [azpesxctx33_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx33_A024_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:24 [azpesxctx33_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx30_A01F_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1f [azpesxctx30_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx30_A01F_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:1f [azpesxctx30_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx27_A029_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:29 [azpesxctx27_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx27_A029_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:29 [azpesxctx27_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx35_A026_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:26 [azpesxctx35_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx35_A026_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:26 [azpesxctx35_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx37_A02A_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2a [azpesxctx37_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx37_A02A_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2a [azpesxctx37_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx38_A02C_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2c [azpesxctx38_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx38_A02C_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2c [azpesxctx38_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx40_A020_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:20 [azpesxctx40_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx40_A020_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:20 [azpesxctx40_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx34_A025_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:25 [azpesxctx34_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx34_A025_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:25 [azpesxctx34_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx41_A022_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:22 [azpesxctx41_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx41_A022_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:22 [azpesxctx41_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx42_A02F_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2f [azpesxctx42_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx42_A02F_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2f [azpesxctx42_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx36_A028_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:28 [azpesxctx36_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx36_A028_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:28 [azpesxctx36_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx43_A030_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:30 [azpesxctx43_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx43_A030_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:30 [azpesxctx43_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx44_A031_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:31 [azpesxctx44_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx44_A031_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:31 [azpesxctx44_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azpesxctx45_A032_8174_spa_iom_1_fc1 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:32 [azpesxctx45_f0]
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ zone name z50_azpesxctx45_A032_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:32 [azpesxctx45_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ zone name z50_azpesxctx39_A02E_8174_spb_iom_1_fc0 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2e [azpesxctx39_f0]
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ zone name z50_azpesxctx39_A02E_8174_spa_iom_1_fc3 vsan 50
+ pwwn 20:ff:00:25:b5:a1:a0:2e [azpesxctx39_f0]
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ zone name z50_azunim1_f0_unity8714_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azunim1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:10 [azunim1_f0]
+
+ zone name z50_azunim1_f2_unity8714_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azunim1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:14 [azunim1_f2]
+
+ zone name z50_azusant_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azusant_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:60 [azusant_f2]
+
+ zone name z50_azucdrdb1_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azucdrdb1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:3a [azucdrdb1_f0]
+
+ zone name z50_azucdrdb1_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azucdrdb1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:3e [azucdrdb1_f2]
+
+ zone name z50_azpups01_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azupsp1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:1a [azupsp1_f0]
+
+ zone name z50_azupsdbp1_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azupsdbp1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:20 [azupsdbp1_f0]
+
+ zone name z50_azupsdbp1_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azupsdbp1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:24 [azupsdbp1_f2]
+
+ zone name z50_azucdrsr1_f0_unity1773_spa3 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azucdrsr1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:44 [azucdrsr1_f0]
+
+ zone name z50_azudbas1_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azudbas1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:4a [azudbas1_f0]
+
+ zone name z50_azudbas1_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azudbas1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:4e [azudbas1_f2]
+
+ zone name z50_azukronp1_f0_unity8174_spa1 vsan 50
+ fcalias name azseunty8174_SPA1 vsan 50
+ pwwn 50:06:01:61:47:e4:22:97 [azseunty1773_SPA1]
+
+ fcalias name azukronp1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:2a [azukronp1_f0]
+
+ zone name z50_azukronp1_f00_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azukronp1_f00 vsan 50
+ pwwn c0:50:76:09:5b:20:00:2e [azukronp1_f00]
+
+ zone name z50_azpups01_f2_unity8174_spb0 vsan 50
+ fcalias name azseunty8174_SPB0 vsan 50
+ pwwn 50:06:01:68:47:e4:22:97 [azseunty1773_SPB0]
+
+ fcalias name azupsp1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:1e [azupsp1_f2]
+
+ zone name z50_azucdrsr1_f2_unity1773_spb2 vsan 50
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azucdrsr1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:40 [azucdrsr1_f2]
+
+ zone name z50_azuepicclarp1_f0_unity8174_spa3 vsan 50
+ fcalias name azseunty8174_SPA3 vsan 50
+ pwwn 50:06:01:63:47:e4:22:97 [azseunty1773_SPA3]
+
+ fcalias name azuepicclarp1_f0 vsan 50
+ pwwn c0:50:76:09:5b:20:00:50 [azuepicclarp1_f0]
+
+ zone name z50_azuepicclarp1_f2_unity8174_spb2 vsan 50
+ fcalias name azseunty8174_SPB2 vsan 50
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
+
+ fcalias name azuepicclarp1_f2 vsan 50
+ pwwn c0:50:76:09:5b:20:00:54 [azuepicclarp1_f2]
+
+ zone name z50_azpwovd01_A001_8174_spb_iom_1_fc2 vsan 50
+ pwwn 20:ff:00:25:b5:a2:a0:01 [azpwovd01_f0]
+ pwwn 50:06:01:6a:47:e4:22:97 [azseunty1773_SPB2]
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_0.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_0.cfg
new file mode 100644
index 00000000..14b431b9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_0.cfg
@@ -0,0 +1,8 @@
+zone name zoneA vsan 923
+ pwwn 11:11:11:11:11:11:11:11
+ device-alias test123
+
+zone name zoneB vsan 923
+ pwwn 10:11:11:11:11:11:11:11
+ pwwn 62:62:62:62:21:21:21:21
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_1.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_1.cfg
new file mode 100644
index 00000000..73d58c51
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_1.cfg
@@ -0,0 +1,8 @@
+zone name zoneA vsan 922
+ pwwn 11:11:11:11:11:11:11:11
+ device-alias test123 both
+
+zone name zoneB vsan 922
+ pwwn 10:11:11:11:11:11:11:11
+ pwwn 62:62:62:62:21:21:21:21
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_2.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_2.cfg
new file mode 100644
index 00000000..530266d4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_2.cfg
@@ -0,0 +1,6 @@
+zone name zv221 vsan 221
+ pwwn 21:01:00:1b:32:a1:c0:a8 [h181-dell-linux-top-p2]
+ pwwn 10:00:00:90:fa:c7:da:42 [h172-32ghost-p2]
+ pwwn 21:01:00:1b:32:aa:50:4b [h190-dell-linux-top-p2]
+ pwwn 50:06:01:6a:47:e4:6e:59 [VNX_UNITY_235_SPB-1-2]
+ pwwn 21:01:00:1b:32:aa:ff:4a [h189-dell-windows-bottom-p2]
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_0.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_0.cfg
new file mode 100644
index 00000000..c1b56005
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_0.cfg
@@ -0,0 +1,10 @@
+zoneset name zsetname21 vsan 922
+ zone name zone21A vsan 922
+ pwwn 11:11:11:11:11:11:11:11 both
+ pwwn 62:62:62:62:12:12:12:12
+
+ zone name zone21B vsan 922
+ pwwn 10:11:11:11:11:11:11:11
+ pwwn 62:62:62:62:21:21:21:21
+ device-alias somedummyname
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_1.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_1.cfg
new file mode 100644
index 00000000..77d29622
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_1.cfg
@@ -0,0 +1,9 @@
+zoneset name zsetname1 vsan 923
+ zone name zoneA vsan 923
+ pwwn 11:11:11:11:11:11:11:11
+ device-alias test123
+
+ zone name zoneB vsan 923
+ pwwn 10:11:11:11:11:11:11:11
+ pwwn 62:62:62:62:21:21:21:21
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_2.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_2.cfg
new file mode 100644
index 00000000..923f54e4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_2.cfg
@@ -0,0 +1,7 @@
+zoneset name zsv221 vsan 221
+ zone name zv221 vsan 221
+ pwwn 21:01:00:1b:32:a1:c0:a8 [h181-dell-linux-top-p2]
+ pwwn 10:00:00:90:fa:c7:da:42 [h172-32ghost-p2]
+ pwwn 21:01:00:1b:32:aa:50:4b [h190-dell-linux-top-p2]
+ pwwn 50:06:01:6a:47:e4:6e:59 [VNX_UNITY_235_SPB-1-2]
+ pwwn 21:01:00:1b:32:aa:ff:4a [h189-dell-windows-bottom-p2]
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonesetactive_0.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonesetactive_0.cfg
new file mode 100644
index 00000000..1180410a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonesetactive_0.cfg
@@ -0,0 +1,8 @@
+zoneset name zsv221 vsan 221
+ zone name zv221 vsan 221
+ * fcid 0x2f0000 [pwwn 21:01:00:1b:32:a1:c0:a8] [h181-dell-linux-top-p2]
+ * fcid 0xa90000 [pwwn 10:00:00:90:fa:c7:da:42] [h172-32ghost-p2]
+ * fcid 0xd50000 [pwwn 21:01:00:1b:32:aa:50:4b] [h190-dell-linux-top-p2]
+ * fcid 0xde0000 [pwwn 50:06:01:6a:47:e4:6e:59] [VNX_UNITY_235_SPB-1-2]
+ pwwn 21:01:00:1b:32:aa:ff:4a [h189-dell-windows-bottom-p2]
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_0.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_0.cfg
new file mode 100644
index 00000000..0bfced83
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_0.cfg
@@ -0,0 +1,23 @@
+VSAN: 922 default-zone: deny distribute: active only Interop: default
+ mode: basic merge-control: allow
+ session: none
+ hard-zoning: enabled broadcast: unsupported
+ smart-zoning: enabled
+ rscn-format: fabric-address
+ activation overwrite control: disabled
+Default zone:
+ qos: none broadcast: unsupported ronly: unsupported
+Full Zoning Database :
+ DB size: 358 bytes
+ Zonesets: 1 Zones: 2 Aliases: 0
+Active Zoning Database :
+ DB Size: 125 bytes
+ Name: zsetname21 Zonesets: 1 Zones: 2
+Current Total Zone DB Usage: 483 / 2097152 bytes (0 % used)
+Pending (Session) DB size:
+ Full DB Copy size: n/a
+ Active DB Copy size: n/a
+SFC size: 483 / 2097152 bytes (0 % used)
+Status: Activation completed at 23:50:35 IST Jul 3 2019
+
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_1.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_1.cfg
new file mode 100644
index 00000000..bf7a4615
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_1.cfg
@@ -0,0 +1,23 @@
+VSAN: 922 default-zone: deny distribute: full Interop: default
+ mode: enhanced merge-control: allow
+ session: none
+ hard-zoning: enabled broadcast: unsupported
+ smart-zoning: disabled
+ rscn-format: fabric-address
+ activation overwrite control: disabled
+Default zone:
+ qos: none broadcast: unsupported ronly: unsupported
+Full Zoning Database :
+ DB size: 376 bytes
+ Zonesets: 1 Zones: 2 Aliases: 0 Attribute-groups: 1
+Active Zoning Database :
+ DB Size: 156 bytes
+ Name: zsetname21 Zonesets: 1 Zones: 2
+Current Total Zone DB Usage: 532 / 2097152 bytes (0 % used)
+Pending (Session) DB size:
+ Full DB Copy size: 0 bytes
+ Active DB Copy size: 0 bytes
+SFC size: 0 / 2097152 bytes (0 % used)
+Status: Set zoning mode complete at 10:19:02 IST Jul 5 2019
+
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_2.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_2.cfg
new file mode 100644
index 00000000..eb0db28e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_2.cfg
@@ -0,0 +1,24 @@
+VSAN: 923 default-zone: permit distribute: full Interop: default
+ mode: enhanced merge-control: allow
+ session: none
+ hard-zoning: enabled broadcast: unsupported
+ smart-zoning: disabled
+ rscn-format: fabric-address
+ activation overwrite control: disabled
+Default zone:
+ qos: none broadcast: unsupported ronly: unsupported
+Full Zoning Database :
+ DB size: 356 bytes
+ Zonesets: 1 Zones: 2 Aliases: 0 Attribute-groups: 1
+Active Zoning Database :
+ DB Size: 136 bytes
+ Name: zsetname1 Zonesets: 1 Zones: 2
+Current Total Zone DB Usage: 492 / 2097152 bytes (0 % used)
+Pending (Session) DB size:
+ Full DB Copy size: 0 bytes
+ Active DB Copy size: 0 bytes
+SFC size: 0 / 2097152 bytes (0 % used)
+Status: Operation failed: [Error: WARNING: Specified zoneset already active and unchanged]:
+ at 11:06:21 IST Jul 5 2019
+
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_3.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_3.cfg
new file mode 100644
index 00000000..c5c32db0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_3.cfg
@@ -0,0 +1,24 @@
+VSAN: 923 default-zone: permit distribute: full Interop: default
+ mode: basic merge-control: allow
+ session: none
+ hard-zoning: enabled broadcast: unsupported
+ smart-zoning: disabled
+ rscn-format: fabric-address
+ activation overwrite control: disabled
+Default zone:
+ qos: none broadcast: unsupported ronly: unsupported
+Full Zoning Database :
+ DB size: 356 bytes
+ Zonesets: 1 Zones: 2 Aliases: 0 Attribute-groups: 1
+Active Zoning Database :
+ DB Size: 136 bytes
+ Name: zsetname1 Zonesets: 1 Zones: 2
+Current Total Zone DB Usage: 492 / 2097152 bytes (0 % used)
+Pending (Session) DB size:
+ Full DB Copy size: 0 bytes
+ Active DB Copy size: 0 bytes
+SFC size: 0 / 2097152 bytes (0 % used)
+Status: Operation failed: [Error: WARNING: Specified zoneset already active and unchanged]:
+ at 11:06:21 IST Jul 5 2019
+
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_4.cfg b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_4.cfg
new file mode 100644
index 00000000..97c3a715
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_4.cfg
@@ -0,0 +1,23 @@
+VSAN: 221 default-zone: deny distribute: full Interop: default
+ mode: enhanced merge-control: allow
+ session: none
+ hard-zoning: enabled broadcast: unsupported
+ smart-zoning: disabled
+ rscn-format: fabric-address
+ activation overwrite control: disabled
+Default zone:
+ qos: none broadcast: unsupported ronly: unsupported
+Full Zoning Database :
+ DB size: 300 bytes
+ Zonesets: 1 Zones: 1 Aliases: 0 Attribute-groups: 1
+Active Zoning Database :
+ DB Size: 112 bytes
+ Name: zsv221 Zonesets: 1 Zones: 1
+Current Total Zone DB Usage: 412 / 2097152 bytes (0 % used)
+Pending (Session) DB size:
+ Full DB Copy size: 0 bytes
+ Active DB Copy size: 0 bytes
+SFC size: 0 / 2097152 bytes (0 % used)
+Status:
+
+
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/nxos_module.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/nxos_module.py
new file mode 100644
index 00000000..0c7b90c1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/nxos_module.py
@@ -0,0 +1,137 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import os
+import json
+
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleExitJson,
+ AnsibleFailJson,
+ ModuleTestCase,
+)
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ set_module_args as _set_module_args,
+)
+
+
+def set_module_args(args, ignore_provider=None):
+ if "provider" not in args and not ignore_provider:
+ args["provider"] = {"transport": args.get("transport") or "cli"}
+
+ return _set_module_args(args)
+
+
+fixture_path = os.path.join(os.path.dirname(__file__), "fixtures")
+fixture_data = {}
+
+
+def load_fixture(module_name, name, device=""):
+ path = os.path.join(fixture_path, module_name, device, name)
+ if not os.path.exists(path):
+ path = os.path.join(fixture_path, module_name, name)
+
+ if path in fixture_data:
+ return fixture_data[path]
+
+ with open(path) as f:
+ data = f.read()
+
+ try:
+ data = json.loads(data)
+ except Exception:
+ pass
+
+ fixture_data[path] = data
+ return data
+
+
+class TestNxosModule(ModuleTestCase):
+ def execute_module_devices(
+ self,
+ failed=False,
+ changed=False,
+ commands=None,
+ sort=True,
+ defaults=False,
+ ):
+ module_name = self.module.__name__.rsplit(".", 1)[1]
+ local_fixture_path = os.path.join(fixture_path, module_name)
+
+ models = []
+ for path in os.listdir(local_fixture_path):
+ path = os.path.join(local_fixture_path, path)
+ if os.path.isdir(path):
+ models.append(os.path.basename(path))
+ if not models:
+ models = [""]
+
+ retvals = {}
+ for model in models:
+ retvals[model] = self.execute_module(
+ failed, changed, commands, sort, device=model
+ )
+
+ return retvals
+
+ def execute_module(
+ self, failed=False, changed=False, commands=None, sort=True, device=""
+ ):
+
+ self.load_fixtures(commands, device=device)
+
+ if failed:
+ result = self.failed()
+ self.assertTrue(result["failed"], result)
+ else:
+ result = self.changed(changed)
+ self.assertEqual(result["changed"], changed, result)
+ if commands is not None and len(commands) > 0:
+ if sort:
+ self.assertEqual(
+ sorted(commands),
+ sorted(result["commands"]),
+ result["commands"],
+ )
+ else:
+ self.assertEqual(
+ commands, result["commands"], result["commands"]
+ )
+
+ return result
+
+ def failed(self):
+ with self.assertRaises(AnsibleFailJson) as exc:
+ self.module.main()
+ result = exc.exception.args[0]
+ self.assertTrue(result["failed"], result)
+ return result
+
+ def changed(self, changed=False):
+ with self.assertRaises(AnsibleExitJson) as exc:
+ self.module.main()
+
+ result = exc.exception.args[0]
+ self.assertEqual(result["changed"], changed, result)
+ return result
+
+ def load_fixtures(self, commands=None, device=""):
+ pass
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/__init__.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/__init__.py
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/test_nxos_devicealias.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/test_nxos_devicealias.py
new file mode 100644
index 00000000..227221fa
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/test_nxos_devicealias.py
@@ -0,0 +1,454 @@
+#!/usr/bin/env python
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import pytest
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules.storage import (
+ nxos_devicealias,
+)
+from ansible_collections.cisco.nxos.plugins.modules.storage.nxos_devicealias import (
+ showDeviceAliasStatus,
+ showDeviceAliasDatabase,
+)
+
+from ..nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosDeviceAliasModule(TestNxosModule):
+ module = nxos_devicealias
+
+ def setUp(self):
+ super(TestNxosDeviceAliasModule, self).setUp()
+ module_path = "ansible_collections.cisco.nxos.plugins.modules.storage.nxos_devicealias."
+
+ self.mock_run_commands = patch(module_path + "run_commands")
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_execute_show_cmd = patch(
+ module_path + "showDeviceAliasStatus.execute_show_cmd"
+ )
+ self.execute_show_cmd = self.mock_execute_show_cmd.start()
+
+ self.mock_execute_show_cmd_1 = patch(
+ module_path + "showDeviceAliasDatabase.execute_show_cmd"
+ )
+ self.execute_show_cmd_1 = self.mock_execute_show_cmd_1.start()
+
+ self.mock_load_config = patch(module_path + "load_config")
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestNxosDeviceAliasModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_execute_show_cmd.stop()
+ self.mock_execute_show_cmd_1.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.load_config.return_value = None
+
+ def test_da_mode_1(self):
+ # Playbook mode is basic
+ # Switch has mode as enahnced
+ set_module_args(dict(mode="basic"), True)
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "no device-alias mode enhanced",
+ "device-alias commit",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_da_mode_2(self):
+ # Playbook mode is enhanced
+ # Switch has mode as enahnced
+ set_module_args(dict(mode="enhanced"), True)
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_da_distribute_1(self):
+ # Playbook mode is enhanced , distrbute = True
+ # Switch has mode as enahnced, distrbute = True
+ set_module_args(dict(distribute=True, mode="enhanced"), True)
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_da_distribute_2(self):
+ # Playbook mode is enhanced , distrbute = False
+ # Switch has mode as enhanced, distrbute = True
+ set_module_args(dict(distribute=False, mode="enhanced"), True)
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["no device-alias distribute"])
+
+ def test_da_distribute_3(self):
+ # Playbook mode is basic , distrbute = False
+ # Switch has mode as enahnced, distrbute = True
+ set_module_args(dict(distribute=False, mode="basic"), True)
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["no device-alias distribute", "no device-alias mode enhanced"],
+ )
+
+ def test_da_add_1(self):
+ # Playbook mode is enhanced , distrbute = true , some new da being added
+ # Switch has mode as enahnced, distrbute = True, switch doesnt have the new da being added
+ set_module_args(
+ dict(
+ distribute=True,
+ mode="enhanced",
+ da=[
+ dict(name="somename", pwwn="10:00:00:00:89:a1:01:03"),
+ dict(name="somename1", pwwn="10:00:00:00:89:a1:02:03"),
+ ],
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "device-alias database",
+ "device-alias name somename pwwn 10:00:00:00:89:a1:01:03",
+ "device-alias name somename1 pwwn 10:00:00:00:89:a1:02:03",
+ "device-alias commit",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_da_add_2(self):
+ # Playbook mode is enhanced , distrbute = true , some new da being added
+ # Switch has mode as enahnced, distrbute = True, switch already has the pwwn:name
+ set_module_args(
+ dict(
+ distribute=True,
+ mode="enhanced",
+ da=[dict(name="tieHost-2", pwwn="10:00:00:00:89:a1:01:02")],
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_da_add_3(self):
+ # Playbook mode is enhanced , distrbute = true , some new da being added
+ # Switch has mode as enahnced, distrbute = True, switch same name present with different pwwn
+ set_module_args(
+ dict(
+ distribute=True,
+ mode="enhanced",
+ da=[dict(name="tieHost-2", pwwn="10:00:00:00:89:a1:01:ff")],
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+ result = self.execute_module(changed=False, failed=True)
+
+ def test_da_add_4(self):
+ # Playbook mode is enhanced , distrbute = true , some new da being added
+ # Switch has mode as enahnced, distrbute = True, switch same pwwn present with different name
+ set_module_args(
+ dict(
+ distribute=True,
+ mode="enhanced",
+ da=[dict(name="tieHost-2222", pwwn="10:00:00:00:89:a1:01:02")],
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+ result = self.execute_module(changed=False, failed=True)
+
+ def test_da_remove_1(self):
+ # Playbook mode is enhanced , distrbute = true , some da being removed
+ # Switch has mode as enahnced, distrbute = True, switch has the da that needs to be removed
+ set_module_args(
+ dict(
+ distribute=True,
+ mode="enhanced",
+ da=[
+ dict(
+ name="tieHost-2",
+ pwwn="10:00:00:00:89:a1:01:02",
+ remove=True,
+ )
+ ],
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "device-alias database",
+ "no device-alias name tieHost-2",
+ "device-alias commit",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_da_remove_2(self):
+ # Playbook mode is enhanced , distrbute = true , some da being removed
+ # Switch has mode as enahnced, distrbute = True, switch does NOT have the da that needs to be removed
+ set_module_args(
+ dict(
+ distribute=True,
+ mode="enhanced",
+ da=[
+ dict(
+ name="somename",
+ pwwn="10:00:00:00:89:a1:01:02",
+ remove=True,
+ )
+ ],
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_da_lock(self):
+ # Playbook mode with some data, but switch has cfs lock acq
+ set_module_args(
+ dict(
+ distribute=True,
+ mode="enhanced",
+ da=[
+ dict(
+ name="somename",
+ pwwn="10:00:00:00:89:a1:01:02",
+ remove=True,
+ )
+ ],
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatuslock.cfg"
+ )
+ self.execute_module(failed=True)
+
+ def test_da_paramete_not_supported(self):
+ # Playbook mode with some data, but switch has cfs lock acq
+ # the below one instead of 'mode' we are passing 'mod', kind of typo in playbook
+ set_module_args(
+ dict(
+ distribute=True,
+ mod="enhanced",
+ da=[
+ dict(
+ name="somename",
+ pwwn="10:00:00:00:89:a1:01:02",
+ remove=True,
+ )
+ ],
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+ with pytest.raises(AnsibleFailJson) as errinfo:
+ self.execute_module()
+ testdata = errinfo.value.args[0]
+ assert "Unsupported parameters" in str(testdata["msg"])
+ assert testdata["failed"]
+
+ def test_da_name_parameter_missing(self):
+ # Lets say you are trying to add a device alias but forgot to put 'name' in the 'da' parameter
+ set_module_args(
+ dict(
+ distribute=True,
+ mode="enhanced",
+ da=[dict(pwwn="10:00:00:00:89:a1:01:02")],
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+ with pytest.raises(AnsibleFailJson) as errinfo:
+ self.execute_module()
+ testdata = errinfo.value.args[0]
+ assert "missing required arguments" in str(testdata["msg"])
+ assert testdata["failed"]
+
+ def test_da_rename_1(self):
+ # rename works
+ set_module_args(
+ dict(
+ rename=[
+ dict(old_name="test1_add", new_name="test234"),
+ dict(old_name="tieHost-1", new_name="tieTarget-1"),
+ ]
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "device-alias database",
+ "device-alias rename test1_add test234",
+ "device-alias rename tieHost-1 tieTarget-1",
+ "device-alias commit",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_da_rename_2(self):
+ # rename : oldname not present
+ set_module_args(
+ dict(
+ rename=[
+ dict(old_name="test1", new_name="test234"),
+ dict(old_name="tie", new_name="tieTarget-1"),
+ ]
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+ result = self.execute_module(changed=False, failed=True)
+ self.assertEqual(result["commands"], [])
+
+ def test_da_mansi(self):
+ set_module_args({"distribute": True, "mode": "enhanced"}, True)
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus_mansi.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "device-alias distribute",
+ "terminal dont-ask",
+ "device-alias mode enhanced",
+ "device-alias commit",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_da_add_bad(self):
+ # Playbook mode is enhanced , distrbute = true , some new da being added
+ # Switch has mode as enahnced, distrbute = True, switch doesnt have the new da being added
+ set_module_args(
+ dict(
+ distribute=True,
+ mode="enhanced",
+ da=[dict(name="*somename*", pwwn="10:00:00:00:89:a1:01:03")],
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+
+ result = self.execute_module(changed=False, failed=True)
+ assert "it must start with a letter" in str(result["msg"])
+
+ def test_da_add_bad_1(self):
+ # Playbook mode is enhanced , distrbute = true , some new da being added
+ # Switch has mode as enahnced, distrbute = True, switch doesnt have the new da being added
+ set_module_args(
+ dict(
+ distribute=True,
+ mode="enhanced",
+ da=[dict(name="somename*", pwwn="10:00:00:00:89:a1:01:03")],
+ ),
+ True,
+ )
+ self.execute_show_cmd.return_value = load_fixture(
+ "nxos_devicealias", "shdastatus.cfg"
+ )
+ self.execute_show_cmd_1.return_value = load_fixture(
+ "nxos_devicealias", "shdadatabse.cfg"
+ )
+
+ result = self.execute_module(changed=False, failed=True)
+ assert "and can only contain these characters" in str(result["msg"])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/test_nxos_vsan.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/test_nxos_vsan.py
new file mode 100644
index 00000000..691b05bc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/test_nxos_vsan.py
@@ -0,0 +1,260 @@
+#!/usr/bin/env python
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import pytest
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules.storage import nxos_vsan
+from ansible_collections.cisco.nxos.plugins.modules.storage.nxos_vsan import (
+ GetVsanInfoFromSwitch,
+)
+
+from ..nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosVsanModule(TestNxosModule):
+ module = nxos_vsan
+
+ def setUp(self):
+ super(TestNxosVsanModule, self).setUp()
+ module_path = (
+ "ansible_collections.cisco.nxos.plugins.modules.storage.nxos_vsan."
+ )
+
+ self.mock_run_commands = patch(module_path + "run_commands")
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_execute_show_vsan_cmd = patch(
+ module_path + "GetVsanInfoFromSwitch.execute_show_vsan_cmd"
+ )
+ self.execute_show_vsan_cmd = self.mock_execute_show_vsan_cmd.start()
+
+ self.mock_execute_show_vsanmemcmd = patch(
+ module_path + "GetVsanInfoFromSwitch.execute_show_vsan_mem_cmd"
+ )
+ self.execute_show_vsanmem_cmd = (
+ self.mock_execute_show_vsanmemcmd.start()
+ )
+
+ self.mock_load_config = patch(module_path + "load_config")
+ self.load_config = self.mock_load_config.start()
+
+ self.maxDiff = None
+
+ def tearDown(self):
+ super(TestNxosVsanModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.execute_show_vsan_cmd.stop()
+ self.execute_show_vsanmem_cmd.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.load_config.return_value = None
+
+ def test_vsan_add_remove_but_present_in_switch(self):
+ margs = {
+ "vsan": [
+ {
+ "interface": ["fc1/1", "port-channel 55"],
+ "id": 922,
+ "remove": False,
+ "name": "vsan-SAN-A",
+ },
+ {
+ "interface": ["fc1/11", "fc1/21", "port-channel 56"],
+ "id": 923,
+ "remove": False,
+ "name": "vsan-SAN-B",
+ },
+ {"id": 1923, "remove": True, "name": "vsan-SAN-Old"},
+ ]
+ }
+ set_module_args(margs, True)
+ self.execute_show_vsan_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsan.cfg"
+ )
+ self.execute_show_vsanmem_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsanmem.cfg"
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_vsan_remove(self):
+ margs = {
+ "vsan": [{"id": 922, "remove": True}, {"id": 923, "remove": True}]
+ }
+ set_module_args(margs, True)
+ self.execute_show_vsan_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsan.cfg"
+ )
+ self.execute_show_vsanmem_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsanmem.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["terminal dont-ask"]
+ + ["vsan database"]
+ + ["no vsan 922", "no vsan 923"]
+ + ["no terminal dont-ask"],
+ )
+
+ def test_vsan_add(self):
+ margs = {
+ "vsan": [
+ {
+ "interface": ["fc1/1", "port-channel 55"],
+ "id": 924,
+ "name": "vsan-SAN-924",
+ },
+ {
+ "interface": ["fc1/11", "fc1/21", "port-channel 56"],
+ "id": 925,
+ "name": "vsan-SAN-925",
+ },
+ ]
+ }
+ set_module_args(margs, True)
+ self.execute_show_vsan_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsan.cfg"
+ )
+ self.execute_show_vsanmem_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsanmem.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["terminal dont-ask"]
+ + ["vsan database"]
+ + [
+ "vsan 924",
+ "vsan 924 name vsan-SAN-924",
+ "no vsan 924 suspend",
+ "vsan 924 interface fc1/1",
+ "vsan 924 interface port-channel 55",
+ ]
+ + [
+ "vsan 925",
+ "vsan 925 name vsan-SAN-925",
+ "no vsan 925 suspend",
+ "vsan 925 interface fc1/11",
+ "vsan 925 interface fc1/21",
+ "vsan 925 interface port-channel 56",
+ ]
+ + ["no terminal dont-ask"],
+ )
+
+ def test_vsan_suspend(self):
+ margs = {
+ "vsan": [
+ {
+ "interface": ["fc1/1", "port-channel 55"],
+ "id": 924,
+ "name": "vsan-SAN-924",
+ },
+ {"id": 925, "name": "vsan-SAN-925", "suspend": True},
+ ]
+ }
+ set_module_args(margs, True)
+ self.execute_show_vsan_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsan.cfg"
+ )
+ self.execute_show_vsanmem_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsanmem.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["terminal dont-ask"]
+ + ["vsan database"]
+ + [
+ "vsan 924",
+ "vsan 924 name vsan-SAN-924",
+ "no vsan 924 suspend",
+ "vsan 924 interface fc1/1",
+ "vsan 924 interface port-channel 55",
+ ]
+ + ["vsan 925", "vsan 925 name vsan-SAN-925", "vsan 925 suspend"]
+ + ["no terminal dont-ask"],
+ )
+
+ def test_vsan_invalid_vsan(self):
+ margs = {
+ "vsan": [{"id": 4096, "name": "vsan-SAN-925", "suspend": True}]
+ }
+ set_module_args(margs, True)
+ self.execute_show_vsan_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsan.cfg"
+ )
+ self.execute_show_vsanmem_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsanmem.cfg"
+ )
+ with pytest.raises(AnsibleFailJson) as errinfo:
+ self.execute_module()
+ testdata = errinfo.value.args[0]
+ assert "invalid vsan" in str(testdata["msg"])
+ assert testdata["failed"]
+
+ def test_vsan_change_reserved_vsan(self):
+ margs = {
+ "vsan": [{"id": 4094, "name": "vsan-SAN-925", "suspend": True}]
+ }
+ set_module_args(margs, True)
+ self.execute_show_vsan_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsan.cfg"
+ )
+ self.execute_show_vsanmem_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsanmem.cfg"
+ )
+ result = self.execute_module(changed=False)
+ assert "reserved vsan" in str(result["messages"])
+ self.assertEqual(result["commands"], [])
+
+ def test_vsan_add_int_existing_vsan(self):
+ margs = {
+ "vsan": [
+ {
+ "interface": ["fc1/1", "fc1/40", "port-channel 155"],
+ "id": 922,
+ }
+ ]
+ }
+ set_module_args(margs, True)
+ self.execute_show_vsan_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsan.cfg"
+ )
+ self.execute_show_vsanmem_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsanmem.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["terminal dont-ask"]
+ + ["vsan database"]
+ + [
+ "vsan 922 interface fc1/40",
+ "vsan 922 interface port-channel 155",
+ ]
+ + ["no terminal dont-ask"],
+ )
+
+ def test_vsan_remove_non_existing_vsan(self):
+ margs = {"vsan": [{"id": 1111, "remove": True}]}
+ set_module_args(margs, True)
+ self.execute_show_vsan_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsan.cfg"
+ )
+ self.execute_show_vsanmem_cmd.return_value = load_fixture(
+ "nxos_vsan", "shvsanmem.cfg"
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+ assert "no vsan" in str(result["messages"])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/test_nxos_zone_zoneset.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/test_nxos_zone_zoneset.py
new file mode 100644
index 00000000..87df7f09
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/storage/test_nxos_zone_zoneset.py
@@ -0,0 +1,797 @@
+#!/usr/bin/env python
+# Copyright: Ansible Project
+# GNU General Public License v3.0+ (see COPYING or
+# https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import pytest
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+ AnsibleExitJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules.storage import (
+ nxos_zone_zoneset,
+)
+from ansible_collections.cisco.nxos.plugins.modules.storage.nxos_zone_zoneset import (
+ ShowZonesetActive,
+ ShowZoneset,
+ ShowZone,
+ ShowZoneStatus,
+)
+
+from ..nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosZoneZonesetModule(TestNxosModule):
+ module = nxos_zone_zoneset
+
+ def setUp(self):
+ super(TestNxosZoneZonesetModule, self).setUp()
+ module_path = "ansible_collections.cisco.nxos.plugins.modules.storage.nxos_zone_zoneset."
+
+ self.mock_run_commands = patch(module_path + "run_commands")
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_execute_show_cmd_zoneset_active = patch(
+ module_path + "ShowZonesetActive.execute_show_zoneset_active_cmd"
+ )
+ self.execute_show_cmd_zoneset_active = (
+ self.mock_execute_show_cmd_zoneset_active.start()
+ )
+
+ self.mock_execute_show_cmd_zoneset = patch(
+ module_path + "ShowZoneset.execute_show_zoneset_cmd"
+ )
+ self.execute_show_cmd_zoneset = (
+ self.mock_execute_show_cmd_zoneset.start()
+ )
+
+ self.mock_execute_show_cmd_zone = patch(
+ module_path + "ShowZone.execute_show_zone_vsan_cmd"
+ )
+ self.execute_show_cmd_zone = self.mock_execute_show_cmd_zone.start()
+
+ self.mock_execute_show_cmd_zone_status = patch(
+ module_path + "ShowZoneStatus.execute_show_zone_status_cmd"
+ )
+ self.execute_show_cmd_zone_status = (
+ self.mock_execute_show_cmd_zone_status.start()
+ )
+
+ self.mock_load_config = patch(module_path + "load_config")
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestNxosZoneZonesetModule, self).tearDown()
+ self.mock_run_commands.stop()
+
+ self.execute_show_cmd_zoneset_active.stop()
+ self.execute_show_cmd_zoneset.stop()
+ self.execute_show_cmd_zone.stop()
+ self.execute_show_cmd_zone_status.stop()
+
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.load_config.return_value = None
+
+ # Test def zone from deny to permit and vice versa
+ def test_zone_defzone_deny_to_permit(self):
+ # switch has def-zone deny and mode basic
+ a = dict(zone_zoneset_details=[dict(vsan=922, default_zone="permit")])
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_0.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zone default-zone permit vsan 922",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_zone_defzone_deny_to_permit_1(self):
+ # switch has def-zone deny and mode enhanced
+ a = dict(zone_zoneset_details=[dict(vsan=922, default_zone="permit")])
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_1.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zone default-zone permit vsan 922",
+ "zone commit vsan 922",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_zone_defzone_permit_to_deny_1(self):
+ # switch has def-zone deny and mode enhanced
+ a = dict(zone_zoneset_details=[dict(vsan=923, default_zone="deny")])
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_2.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "no zone default-zone permit vsan 923",
+ "zone commit vsan 923",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_zone_defzone_permit_to_deny_2(self):
+ # switch has def-zone deny and mode enhanced
+ a = dict(zone_zoneset_details=[dict(vsan=923, default_zone="deny")])
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_3.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "no zone default-zone permit vsan 923",
+ "no terminal dont-ask",
+ ],
+ )
+
+ # Test zone mode from basic to enhanced and vice versa
+ def test_zone_mode_basic_to_enh(self):
+ # switch has def-zone deny and mode basic
+ a = dict(zone_zoneset_details=[dict(vsan=922, mode="enhanced")])
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_0.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zone mode enhanced vsan 922",
+ "zone commit vsan 922",
+ "no terminal dont-ask",
+ ],
+ )
+
+ # Test zone mode from basic to enhanced and vice versa
+ def test_zone_mode_basic_to_enh_1(self):
+ # switch has def-zone deny and mode basic
+ a = dict(zone_zoneset_details=[dict(vsan=922, mode="basic")])
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_1.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "no zone mode enhanced vsan 922",
+ "no terminal dont-ask",
+ ],
+ )
+
+ # Test zone smart-zone from enabled to disabled and vice versa
+ def test_zone_smart_zone(self):
+ # switch has def-zone deny and mode basic
+ a = dict(zone_zoneset_details=[dict(vsan=922, smart_zoning=False)])
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_0.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "no zone smart-zoning enable vsan 922",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_zone_smart_zone_1(self):
+ # switch has def-zone deny and mode basic
+ a = dict(zone_zoneset_details=[dict(vsan=923, smart_zoning=True)])
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_1.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zone smart-zoning enable vsan 923",
+ "zone commit vsan 923",
+ "no terminal dont-ask",
+ ],
+ )
+
+ # Test zone add/removal
+ def test_zone_add_rem(self):
+ a = dict(
+ zone_zoneset_details=[
+ dict(vsan=923, zone=[dict(name="zoneB", remove=True)])
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_1.cfg"
+ )
+ self.execute_show_cmd_zone.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzone_0.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "no zone name zoneB vsan 923",
+ "zone commit vsan 923",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_zone_add_rem_1(self):
+ a = dict(
+ zone_zoneset_details=[
+ dict(vsan=923, zone=[dict(name="zoneC", remove=True)])
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_1.cfg"
+ )
+ self.execute_show_cmd_zone.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzone_0.cfg"
+ )
+ result = self.execute_module(changed=False, failed=False)
+ m = "zone 'zoneC' is not present in vsan 923"
+ assert m in str(result["messages"])
+ self.assertEqual(result["commands"], [])
+
+ def test_zone_add_rem_2(self):
+ a = dict(
+ zone_zoneset_details=[dict(vsan=923, zone=[dict(name="zoneBNew")])]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_1.cfg"
+ )
+ self.execute_show_cmd_zone.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzone_0.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zone name zoneBNew vsan 923",
+ "zone commit vsan 923",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_zone_add_rem_3(self):
+ a = dict(
+ zone_zoneset_details=[dict(vsan=923, zone=[dict(name="zoneB")])]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_1.cfg"
+ )
+ self.execute_show_cmd_zone.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzone_0.cfg"
+ )
+ result = self.execute_module(changed=False, failed=False)
+ m = "zone 'zoneB' is already present in vsan 923"
+ assert m in str(result["messages"])
+ self.assertEqual(result["commands"], [])
+
+ # Test zone mem add/removal
+ def test_zonemem_add_rem(self):
+ mem1 = {"pwwn": "10:00:10:94:00:00:00:01"}
+ mem2 = {"device_alias": "somename"}
+ a = dict(
+ zone_zoneset_details=[
+ dict(
+ vsan=923,
+ zone=[dict(name="zoneBNew", members=[mem1, mem2])],
+ )
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_1.cfg"
+ )
+ self.execute_show_cmd_zone.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzone_0.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zone name zoneBNew vsan 923",
+ "member pwwn 10:00:10:94:00:00:00:01",
+ "member device-alias somename",
+ "zone commit vsan 923",
+ "no terminal dont-ask",
+ ],
+ )
+
+ # Test zone mem add/removal
+ def test_zonemem_add_rem_1(self):
+ mem1 = {"pwwn": "11:11:11:11:11:11:11:11", "remove": True}
+ mem2 = {"device_alias": "test123", "remove": True}
+ a = dict(
+ zone_zoneset_details=[
+ dict(vsan=923, zone=[dict(name="zoneA", members=[mem1, mem2])])
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_1.cfg"
+ )
+ self.execute_show_cmd_zone.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzone_0.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zone name zoneA vsan 923",
+ "no member pwwn 11:11:11:11:11:11:11:11",
+ "no member device-alias test123",
+ "zone commit vsan 923",
+ "no terminal dont-ask",
+ ],
+ )
+
+ # Test zone mem add/removal
+ def test_zonemem_add_rem_2(self):
+ mem1 = {"pwwn": "11:11:11:11:11:11:11:11", "remove": True}
+ mem2 = {"device_alias": "test123", "remove": True}
+ a = dict(
+ zone_zoneset_details=[
+ dict(
+ vsan=923, zone=[dict(name="zoneA1", members=[mem1, mem2])]
+ )
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_1.cfg"
+ )
+ self.execute_show_cmd_zone.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzone_0.cfg"
+ )
+ result = self.execute_module(changed=False, failed=False)
+ m = "zone 'zoneA1' is not present in vsan 923 , hence cannot remove the members"
+ assert m in str(result["messages"])
+ self.assertEqual(result["commands"], [])
+
+ def test_zonemem_add_rem_3(self):
+ mem1 = {"pwwn": "10:00:10:94:00:00:00:01", "devtype": "initiator"}
+ mem2 = {"device_alias": "somename", "devtype": "target"}
+ mem3 = {"device_alias": "somenameWithBoth", "devtype": "both"}
+
+ a = dict(
+ zone_zoneset_details=[
+ dict(
+ vsan=922,
+ zone=[dict(name="zoneBNew", members=[mem1, mem2, mem3])],
+ )
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_0.cfg"
+ )
+ self.execute_show_cmd_zone.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzone_1.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zone name zoneBNew vsan 922",
+ "member pwwn 10:00:10:94:00:00:00:01 initiator",
+ "member device-alias somename target",
+ "member device-alias somenameWithBoth both",
+ "no terminal dont-ask",
+ ],
+ )
+
+ # Test zone mem add/removal with devtype
+ def test_zonemem_add_rem_4(self):
+ mem2 = {"device_alias": "test123", "devtype": "both", "remove": True}
+
+ a = dict(
+ zone_zoneset_details=[
+ dict(vsan=922, zone=[dict(name="zoneA", members=[mem2])])
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_0.cfg"
+ )
+ self.execute_show_cmd_zone.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzone_1.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zone name zoneA vsan 922",
+ "no member device-alias test123 both",
+ "no terminal dont-ask",
+ ],
+ )
+
+ # Test zoneset add/removal
+ def test_zoneset_add_rem(self):
+ a = dict(
+ zone_zoneset_details=[
+ dict(vsan=922, zoneset=[dict(name="zsetname21", remove=True)])
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_0.cfg"
+ )
+ self.execute_show_cmd_zoneset.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzoneset_0.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "no zoneset name zsetname21 vsan 922",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_zoneset_add_rem_1(self):
+ a = dict(
+ zone_zoneset_details=[
+ dict(vsan=922, zoneset=[dict(name="zsetname21New")])
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_0.cfg"
+ )
+ self.execute_show_cmd_zoneset.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzoneset_0.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zoneset name zsetname21New vsan 922",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_zoneset_add_rem_2(self):
+ a = dict(
+ zone_zoneset_details=[
+ dict(vsan=922, zoneset=[dict(name="zsetname21")])
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_0.cfg"
+ )
+ self.execute_show_cmd_zoneset.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzoneset_0.cfg"
+ )
+ result = self.execute_module(changed=False, failed=False)
+ m = "zoneset 'zsetname21' is already present in vsan 922"
+ self.assertEqual(result["commands"], [])
+ self.assertEqual(result["messages"], [m])
+
+ def test_zoneset_add_rem_3(self):
+ a = dict(
+ zone_zoneset_details=[
+ dict(
+ vsan=922, zoneset=[dict(name="zsetname21New", remove=True)]
+ )
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_0.cfg"
+ )
+ self.execute_show_cmd_zoneset.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzoneset_0.cfg"
+ )
+ result = self.execute_module(changed=False, failed=False)
+ m = "zoneset 'zsetname21New' is not present in vsan 922 ,hence there is nothing to remove"
+ self.assertEqual(result["commands"], [])
+ self.assertEqual(result["messages"], [m])
+
+ # Test zoneset mem add/removal
+ def test_zoneset_mem_add_rem(self):
+ mem1 = {"name": "newZoneV100"}
+
+ a = dict(
+ zone_zoneset_details=[
+ dict(
+ vsan=922, zoneset=[dict(name="zsetname21", members=[mem1])]
+ )
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_0.cfg"
+ )
+ self.execute_show_cmd_zoneset.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzoneset_0.cfg"
+ )
+ result = self.execute_module(changed=True, failed=False)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zoneset name zsetname21 vsan 922",
+ "member newZoneV100",
+ "no terminal dont-ask",
+ ],
+ )
+
+ # Test zoneset mem add/removal
+ def test_zoneset_mem_add_rem_1(self):
+ mem1 = {"name": "zone21A", "remove": True}
+
+ a = dict(
+ zone_zoneset_details=[
+ dict(
+ vsan=922, zoneset=[dict(name="zsetname21", members=[mem1])]
+ )
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_0.cfg"
+ )
+ self.execute_show_cmd_zoneset.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzoneset_0.cfg"
+ )
+ result = self.execute_module(changed=True, failed=False)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zoneset name zsetname21 vsan 922",
+ "no member zone21A",
+ "no terminal dont-ask",
+ ],
+ )
+
+ # Test zoneset mem add/removal
+ def test_zoneset_mem_add_rem_2(self):
+ mem1 = {"name": "zone21", "remove": True}
+
+ a = dict(
+ zone_zoneset_details=[
+ dict(
+ vsan=922, zoneset=[dict(name="zsetname21", members=[mem1])]
+ )
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_0.cfg"
+ )
+ self.execute_show_cmd_zoneset.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzoneset_0.cfg"
+ )
+ result = self.execute_module(changed=False, failed=False)
+ m = "zoneset member 'zone21' is not present in zoneset 'zsetname21' in vsan 922 ,hence there is nothing to remove"
+ self.assertEqual(result["commands"], [])
+ self.assertEqual(result["messages"], [m])
+
+ # Test zoneset activate/deactivate
+ def test_zoneset_activate_deactivate(self):
+ a = dict(
+ zone_zoneset_details=[
+ dict(
+ vsan=221, zoneset=[dict(name="zsv221", action="activate")]
+ )
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_4.cfg"
+ )
+ self.execute_show_cmd_zoneset.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzoneset_2.cfg"
+ )
+ self.execute_show_cmd_zoneset_active.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonesetactive_0.cfg"
+ )
+ result = self.execute_module(changed=False, failed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_zoneset_activate_deactivate_1(self):
+ a = dict(
+ zone_zoneset_details=[
+ dict(
+ vsan=221,
+ zoneset=[dict(name="zsv221", action="deactivate")],
+ )
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_4.cfg"
+ )
+ self.execute_show_cmd_zoneset.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzoneset_2.cfg"
+ )
+ self.execute_show_cmd_zoneset_active.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonesetactive_0.cfg"
+ )
+ result = self.execute_module(changed=True, failed=False)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "no zoneset activate name zsv221 vsan 221",
+ "zone commit vsan 221",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_zoneset_activate_deactivate_2(self):
+ a = dict(
+ zone_zoneset_details=[
+ dict(
+ vsan=221,
+ zoneset=[dict(name="zsv221New", action="activate")],
+ )
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_4.cfg"
+ )
+ self.execute_show_cmd_zoneset.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzoneset_2.cfg"
+ )
+ self.execute_show_cmd_zoneset_active.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonesetactive_0.cfg"
+ )
+ result = self.execute_module(changed=True, failed=False)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zoneset name zsv221New vsan 221",
+ "zoneset activate name zsv221New vsan 221",
+ "zone commit vsan 221",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_bug_zone_remove(self):
+ mem1 = {"pwwn": "21:01:00:1b:32:a1:c0:a8", "remove": True}
+ mem2 = {"pwwn": "50:06:01:6a:47:e4:6e:59", "remove": True}
+ a = dict(
+ zone_zoneset_details=[
+ dict(vsan=221, zone=[dict(name="zv221", members=[mem1, mem2])])
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_4.cfg"
+ )
+ self.execute_show_cmd_zone.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzone_2.cfg"
+ )
+ self.execute_show_cmd_zoneset_active.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonesetactive_0.cfg"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zone name zv221 vsan 221",
+ "no member pwwn 21:01:00:1b:32:a1:c0:a8",
+ "no member pwwn 50:06:01:6a:47:e4:6e:59",
+ "zone commit vsan 221",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_bug_from_active_zoneset_act(self):
+ a = dict(
+ zone_zoneset_details=[
+ dict(
+ vsan=221,
+ zoneset=[dict(name="zsv221New", action="activate")],
+ )
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonestatus_4.cfg"
+ )
+ self.execute_show_cmd_zoneset.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzoneset_2.cfg"
+ )
+ self.execute_show_cmd_zoneset_active.return_value = load_fixture(
+ "nxos_zone_zoneset", "shzonesetactive_0.cfg"
+ )
+ result = self.execute_module(changed=True, failed=False)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zoneset name zsv221New vsan 221",
+ "zoneset activate name zsv221New vsan 221",
+ "zone commit vsan 221",
+ "no terminal dont-ask",
+ ],
+ )
+
+ def test_bug_zone_remove_oliver(self):
+ mem1 = {"pwwn": "c0:50:76:09:5b:20:00:64", "remove": True}
+ a = dict(
+ zone_zoneset_details=[
+ dict(
+ vsan=50,
+ zone=[
+ dict(
+ name="z50_azusant_f0_unity8174_spa1",
+ members=[mem1],
+ )
+ ],
+ )
+ ]
+ )
+ set_module_args(a, True)
+ self.execute_show_cmd_zone_status.return_value = load_fixture(
+ "nxos_zone_zoneset", "show_zone_status_vsan.out"
+ )
+ self.execute_show_cmd_zone.return_value = load_fixture(
+ "nxos_zone_zoneset", "show_zone_vsan.out"
+ )
+ self.execute_show_cmd_zoneset_active.return_value = load_fixture(
+ "nxos_zone_zoneset", "show_zoneset_active_vsan.out"
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "terminal dont-ask",
+ "zone name z50_azusant_f0_unity8174_spa1 vsan 50",
+ "no member pwwn c0:50:76:09:5b:20:00:64",
+ "no terminal dont-ask",
+ ],
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos.py
new file mode 100644
index 00000000..889affee
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos.py
@@ -0,0 +1,127 @@
+#
+# (c) 2020 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from os import path
+
+from mock import MagicMock
+
+from ansible_collections.cisco.nxos.tests.unit.compat import unittest
+from ansible_collections.cisco.nxos.plugins.cliconf import nxos
+from ansible.module_utils._text import to_bytes, to_text
+
+
+class TestPluginCLIConfNXOS(unittest.TestCase):
+ """ Test class for NXOS CLI Conf Methods
+ """
+
+ def setUp(self):
+ self._mock_connection = MagicMock()
+ self._prepare()
+ self._cliconf = nxos.Cliconf(self._mock_connection)
+ self.maxDiff = None
+
+ def _prepare(self, platform="nxos"):
+ b_FIXTURE_DIR = b"%s/fixtures/cliconf/%s" % (
+ to_bytes(
+ path.dirname(path.abspath(__file__)),
+ errors="surrogate_or_strict",
+ ),
+ to_bytes(platform),
+ )
+
+ def _connection_side_effect(*args, **kwargs):
+ try:
+ if args:
+ value = args[0]
+ else:
+ value = kwargs.get("command")
+
+ fixture_path = path.abspath(
+ b"%s/%s" % (b_FIXTURE_DIR, b"_".join(value.split(b" ")))
+ )
+ with open(fixture_path, "rb") as file_desc:
+ return to_text(file_desc.read())
+ except (OSError, IOError):
+ if args:
+ value = args[0]
+ return value
+ elif kwargs.get("command"):
+ value = kwargs.get("command")
+ return value
+ return "NO-OP"
+
+ self._mock_connection.send.side_effect = _connection_side_effect
+
+ def tearDown(self):
+ pass
+
+ def test_get_device_info_nxos(self):
+ """ Test get_device_info for nxos
+ """
+ device_info = self._cliconf.get_device_info()
+
+ mock_device_info = {
+ "network_os": "nxos",
+ "network_os_hostname": "nxos-9kv-933",
+ "network_os_image": "bootflash:///nxos.9.3.3.bin",
+ "network_os_model": "Nexus9000 C9300v Chassis",
+ "network_os_platform": "N9K-C9300v",
+ "network_os_version": "9.3(3)",
+ }
+
+ self.assertEqual(device_info, mock_device_info)
+
+ def test_get_device_info_mds(self):
+ """ Test get_device_info for mds
+ """
+ self._prepare(platform="mds")
+ device_info = self._cliconf.get_device_info()
+ mock_device_info = {
+ "network_os": "nxos",
+ "network_os_version": "8.4(2b)",
+ "network_os_model": 'MDS 9148S 16G 48 FC (1 Slot) Chassis ("2/4/8/16 Gbps FC/Supervisor")',
+ "network_os_hostname": "sw109-Mini",
+ "network_os_image": "bootflash:///m9100-s5ek9-mz.8.4.2b.bin",
+ "network_os_platform": "DS-C9710",
+ }
+
+ self.assertEqual(device_info, mock_device_info)
+
+ def test_get_command_with_output_nxos(self):
+ """ Test _get_command_with_output for nxos
+ """
+ self._prepare()
+ cmd = self._cliconf._get_command_with_output(
+ command="show version", output="json"
+ )
+
+ self.assertEqual(cmd, "show version | json")
+
+ def test_get_command_with_output_mds(self):
+ """ Test _get_command_with_output for mds
+ """
+ self._prepare(platform="mds")
+ cmd = self._cliconf._get_command_with_output(
+ command="show version", output="json"
+ )
+
+ self.assertEqual(cmd, "show version | json native")
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acl.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acl.py
new file mode 100644
index 00000000..67f44171
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acl.py
@@ -0,0 +1,104 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_acl
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosAclModule(TestNxosModule):
+
+ module = nxos_acl
+
+ def setUp(self):
+ super(TestNxosAclModule, self).setUp()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_acl.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_acl.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestNxosAclModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+
+ for item in commands:
+ try:
+ obj = json.loads(item)
+ command = obj["command"]
+ except ValueError:
+ command = item
+ filename = "%s.txt" % str(command).split(" | ")[0].replace(
+ " ", "_"
+ )
+ output.append(load_fixture("nxos_acl", filename))
+ return output
+
+ self.run_commands.side_effect = load_from_file
+ self.load_config.return_value = None
+
+ def test_nxos_acl(self):
+ set_module_args(
+ dict(
+ name="ANSIBLE",
+ seq=10,
+ action="permit",
+ proto="tcp",
+ src="192.0.2.1/24",
+ dest="any",
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["ip access-list ANSIBLE", "10 permit tcp 192.0.2.1/24 any"],
+ )
+
+ def test_nxos_acl_remove(self):
+ set_module_args(
+ dict(name="copp-system-p-acl-bgp", seq=10, state="absent")
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["ip access-list copp-system-p-acl-bgp", "no 10"],
+ )
+
+ def test_nxos_acl_delete_acl(self):
+ set_module_args(dict(name="copp-system-p-acl-bgp", state="delete_acl"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"], ["no ip access-list copp-system-p-acl-bgp"]
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acl_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acl_interface.py
new file mode 100644
index 00000000..3efc0fcd
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acl_interface.py
@@ -0,0 +1,98 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+__metacl_interfaceass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_acl_interface
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosAclInterfaceModule(TestNxosModule):
+
+ module = nxos_acl_interface
+
+ def setUp(self):
+ super(TestNxosAclInterfaceModule, self).setUp()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_acl_interface.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_acl_interface.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestNxosAclInterfaceModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+
+ for item in commands:
+ try:
+ command = item["command"]
+ except ValueError:
+ command = item
+ filename = "%s.txt" % str(command).split(" | ")[0].replace(
+ " ", "_"
+ )
+ output.append(load_fixture("nxos_acl_interface", filename))
+ return output
+
+ self.run_commands.side_effect = load_from_file
+ self.load_config.return_value = None
+
+ def test_nxos_acl_interface(self):
+ set_module_args(
+ dict(name="ANSIBLE", interface="ethernet1/41", direction="egress")
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["interface ethernet1/41", "ip access-group ANSIBLE out"],
+ )
+
+ def test_nxos_acl_interface_remove(self):
+ set_module_args(
+ dict(
+ name="copp-system-p-acl-bgp",
+ interface="ethernet1/41",
+ direction="egress",
+ state="absent",
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "interface ethernet1/41",
+ "no ip access-group copp-system-p-acl-bgp out",
+ ],
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acl_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acl_interfaces.py
new file mode 100644
index 00000000..99eaf6c1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acl_interfaces.py
@@ -0,0 +1,407 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.plugins.modules import nxos_acl_interfaces
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import (
+ patch,
+ MagicMock,
+)
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .nxos_module import TestNxosModule, load_fixture
+
+
+class TestNxosAclInterfacesModule(TestNxosModule):
+
+ module = nxos_acl_interfaces
+
+ def setUp(self):
+ super(TestNxosAclInterfacesModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.acl_interfaces.acl_interfaces.Acl_interfaces.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.acl_interfaces.acl_interfaces.Acl_interfacesFacts.get_device_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestNxosAclInterfacesModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ output = """interface Ethernet1/2\n ip access-group ACL1v4 out\n interface Ethernet1/4\n ipv6 port traffic-filter ACL2v6 in\n"""
+ return output
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_nxos_acl_interfaces_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/3",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[dict(name="ACL1-v4", direction="in")],
+ )
+ ],
+ )
+ ],
+ state="merged",
+ )
+ )
+ commands = ["interface Ethernet1/3", "ip access-group ACL1-v4 in"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_acl_interfaces_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/2",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[dict(name="ACL1v4", direction="out")],
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/4",
+ access_groups=[
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(
+ name="ACL2v6",
+ direction="in",
+ port=True,
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_acl_interfaces_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/2",
+ access_groups=[
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(
+ name="ACL1v6",
+ direction="in",
+ port=True,
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/5",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="ACL2v4",
+ direction="in",
+ port=True,
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="replaced",
+ )
+ )
+ commands = [
+ "interface Ethernet1/2",
+ "no ip access-group ACL1v4 out",
+ "ipv6 port traffic-filter ACL1v6 in",
+ "interface Ethernet1/5",
+ "ip port access-group ACL2v4 in",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_acl_interfaces_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/2",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[dict(name="ACL1v4", direction="out")],
+ )
+ ],
+ )
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_acl_interfaces_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/3",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(name="ACL2v4", direction="out"),
+ dict(
+ name="PortACL",
+ direction="in",
+ port=True,
+ ),
+ ],
+ )
+ ],
+ )
+ ],
+ state="overridden",
+ )
+ )
+ commands = [
+ "interface Ethernet1/2",
+ "no ip access-group ACL1v4 out",
+ "interface Ethernet1/4",
+ "no ipv6 port traffic-filter ACL2v6 in",
+ "interface Ethernet1/3",
+ "ip access-group ACL2v4 out",
+ "ip port access-group PortACL in",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_acl_interfaces_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/2",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[dict(name="ACL1v4", direction="out")],
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/4",
+ access_groups=[
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(
+ name="ACL2v6",
+ direction="in",
+ port=True,
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_acl_interfaces_deletedname(self):
+ set_module_args(
+ dict(config=[dict(name="Ethernet1/2")], state="deleted")
+ )
+ commands = ["interface Ethernet1/2", "no ip access-group ACL1v4 out"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_acl_interfaces_deletedafi(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(name="Ethernet1/2", access_groups=[dict(afi="ipv4")])
+ ],
+ state="deleted",
+ )
+ )
+ commands = ["interface Ethernet1/2", "no ip access-group ACL1v4 out"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_acl_interfaces_deletedacl(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/2",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[dict(name="ACL1v4", direction="out")],
+ )
+ ],
+ )
+ ],
+ state="deleted",
+ )
+ )
+ commands = ["interface Ethernet1/2", "no ip access-group ACL1v4 out"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_acl_interfaces_rendered(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/2",
+ access_groups=[
+ dict(
+ afi="ipv4",
+ acls=[dict(name="ACL1v4", direction="out")],
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/4",
+ access_groups=[
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(
+ name="ACL2v6",
+ direction="in",
+ port=True,
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="rendered",
+ )
+ )
+ commands = [
+ "interface Ethernet1/2",
+ "ip access-group ACL1v4 out",
+ "interface Ethernet1/4",
+ "ipv6 port traffic-filter ACL2v6 in",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(
+ sorted(result["rendered"]), sorted(commands), result["rendered"]
+ )
+
+ def test_nxos_acl_interfaces_parsed(self):
+ set_module_args(
+ dict(
+ running_config="""interface Ethernet1/2\n ip access-group ACL1v4 out\n interface Ethernet1/4\n \
+ ipv6 port traffic-filter ACL2v6 in""",
+ state="parsed",
+ )
+ )
+ result = self.execute_module(changed=False)
+ compare_list = [
+ {
+ "access_groups": [
+ {
+ "acls": [{"direction": "out", "name": "ACL1v4"}],
+ "afi": "ipv4",
+ }
+ ],
+ "name": "Ethernet1/2",
+ },
+ {
+ "access_groups": [
+ {
+ "acls": [
+ {"direction": "in", "name": "ACL2v6", "port": True}
+ ],
+ "afi": "ipv6",
+ }
+ ],
+ "name": "Ethernet1/4",
+ },
+ ]
+ self.assertEqual(result["parsed"], compare_list, result["parsed"])
+
+ def test_nxos_acl_interfaces_gathered(self):
+ set_module_args(dict(config=[], state="gathered"))
+ result = self.execute_module(changed=False)
+ compare_list = [
+ {
+ "access_groups": [
+ {
+ "acls": [{"direction": "out", "name": "ACL1v4"}],
+ "afi": "ipv4",
+ }
+ ],
+ "name": "Ethernet1/2",
+ },
+ {
+ "access_groups": [
+ {
+ "acls": [
+ {"direction": "in", "name": "ACL2v6", "port": True}
+ ],
+ "afi": "ipv6",
+ }
+ ],
+ "name": "Ethernet1/4",
+ },
+ ]
+ self.assertEqual(result["gathered"], compare_list, result["gathered"])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acls.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acls.py
new file mode 100644
index 00000000..978556dc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_acls.py
@@ -0,0 +1,517 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.plugins.modules import nxos_acls
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import (
+ patch,
+ MagicMock,
+)
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .nxos_module import TestNxosModule, load_fixture
+
+
+class TestNxosAclsModule(TestNxosModule):
+
+ module = nxos_acls
+
+ def setUp(self):
+ super(TestNxosAclsModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.acls.acls.Acls.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.acls.acls.AclsFacts.get_device_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestNxosAclsModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ v4 = """\nip access-list ACL1v4\n 10 permit ip any any\n 20 deny udp any any"""
+ v6 = """\nipv6 access-list ACL1v6\n 10 permit sctp any any"""
+ return v4 + v6
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_nxos_acls_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="ACL2v4",
+ aces=[
+ dict(
+ grant="deny",
+ destination=dict(any=True),
+ source=dict(any=True),
+ fragments=True,
+ sequence=20,
+ protocol="tcp",
+ protocol_options=dict(
+ tcp=dict(ack=True)
+ ),
+ ),
+ dict(
+ grant="deny",
+ destination=dict(
+ prefix="2002:2:2:2::/64"
+ ),
+ source=dict(prefix="2002:1:1:1::/64"),
+ sequence=30,
+ protocol="icmp",
+ protocol_options=dict(
+ icmp=dict(echo_request=True)
+ ),
+ ),
+ ],
+ )
+ ],
+ ),
+ dict(afi="ipv6", acls=[dict(name="ACL2v6")]),
+ ],
+ state="merged",
+ )
+ )
+ commands = [
+ "ip access-list ACL2v4",
+ "20 deny tcp any any ack fragments",
+ "30 deny icmp 2002:1:1:1::/64 2002:2:2:2::/64 echo-request",
+ "ipv6 access-list ACL2v6",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_acls_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="ACL1v4",
+ aces=[
+ dict(
+ grant="permit",
+ destination=dict(any=True),
+ source=dict(any=True),
+ sequence=10,
+ protocol="ip",
+ ),
+ dict(
+ grant="deny",
+ destination=dict(any=True),
+ source=dict(any=True),
+ sequence=20,
+ protocol="udp",
+ ),
+ ],
+ )
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(
+ name="ACL1v6",
+ aces=[
+ dict(
+ grant="permit",
+ destination=dict(any=True),
+ source=dict(any=True),
+ sequence=10,
+ protocol="sctp",
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_acls_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="ACL1v4",
+ aces=[
+ dict(
+ grant="permit",
+ destination=dict(host="192.0.2.28"),
+ source=dict(any=True),
+ log=True,
+ sequence=50,
+ protocol="icmp",
+ protocol_options=dict(
+ icmp=dict(
+ administratively_prohibited=True
+ )
+ ),
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="replaced",
+ )
+ )
+ commands = [
+ "ip access-list ACL1v4",
+ "no 20 deny udp any any",
+ "no 10 permit ip any any",
+ "50 permit icmp any host 192.0.2.28 administratively-prohibited log",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_acls_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="ACL1v4",
+ aces=[
+ dict(
+ grant="permit",
+ destination=dict(any=True),
+ source=dict(any=True),
+ sequence=10,
+ protocol="ip",
+ ),
+ dict(
+ grant="deny",
+ destination=dict(any=True),
+ source=dict(any=True),
+ sequence=20,
+ protocol="udp",
+ ),
+ ],
+ )
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(
+ name="ACL1v6",
+ aces=[
+ dict(
+ grant="permit",
+ destination=dict(any=True),
+ source=dict(any=True),
+ sequence=10,
+ protocol="sctp",
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_acls_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="ACL2v4",
+ aces=[
+ dict(
+ grant="permit",
+ destination=dict(host="192.0.2.28"),
+ source=dict(any=True),
+ log=True,
+ sequence=50,
+ protocol="icmp",
+ protocol_options=dict(
+ icmp=dict(
+ administratively_prohibited=True
+ )
+ ),
+ ),
+ dict(remark="Overridden ACL"),
+ ],
+ )
+ ],
+ )
+ ],
+ state="overridden",
+ )
+ )
+ commands = [
+ "no ip access-list ACL1v4",
+ "no ipv6 access-list ACL1v6",
+ "ip access-list ACL2v4",
+ "50 permit icmp any host 192.0.2.28 administratively-prohibited log",
+ "remark Overridden ACL",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_acls_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="ACL1v4",
+ aces=[
+ dict(
+ grant="permit",
+ destination=dict(any=True),
+ source=dict(any=True),
+ sequence=10,
+ protocol="ip",
+ ),
+ dict(
+ grant="deny",
+ destination=dict(any=True),
+ source=dict(any=True),
+ sequence=20,
+ protocol="udp",
+ ),
+ ],
+ )
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(
+ name="ACL1v6",
+ aces=[
+ dict(
+ grant="permit",
+ destination=dict(any=True),
+ source=dict(any=True),
+ sequence=10,
+ protocol="sctp",
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_acls_deletedafi(self):
+ set_module_args(dict(config=[dict(afi="ipv4")], state="deleted"))
+ commands = ["no ip access-list ACL1v4"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_acls_deletedall(self):
+ set_module_args(dict(config=[], state="deleted"))
+ commands = ["no ipv6 access-list ACL1v6", "no ip access-list ACL1v4"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_acls_rendered(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ afi="ipv4",
+ acls=[
+ dict(
+ name="ACL1v4",
+ aces=[
+ dict(
+ grant="permit",
+ destination=dict(any=True),
+ source=dict(any=True),
+ sequence=10,
+ protocol="ip",
+ ),
+ dict(
+ grant="deny",
+ destination=dict(any=True),
+ source=dict(any=True),
+ sequence=20,
+ protocol="udp",
+ ),
+ ],
+ )
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ acls=[
+ dict(
+ name="ACL1v6",
+ aces=[
+ dict(
+ grant="permit",
+ destination=dict(any=True),
+ source=dict(any=True),
+ sequence=10,
+ protocol="sctp",
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="rendered",
+ )
+ )
+ commands = [
+ "ip access-list ACL1v4",
+ "10 permit ip any any",
+ "20 deny udp any any",
+ "ipv6 access-list ACL1v6",
+ "10 permit sctp any any",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(
+ sorted(result["rendered"]), sorted(commands), result["rendered"]
+ )
+
+ def test_nxos_acls_parsed(self):
+ set_module_args(
+ dict(
+ running_config="""\nip access-list ACL1v4\n 10 permit ip any any\n 20 deny udp any any dscp AF23 precedence critical""",
+ state="parsed",
+ )
+ )
+ result = self.execute_module(changed=False)
+ compare_list = [
+ {
+ "afi": "ipv4",
+ "acls": [
+ {
+ "name": "ACL1v4",
+ "aces": [
+ {
+ "grant": "permit",
+ "sequence": 10,
+ "protocol": "ip",
+ "source": {"any": True},
+ "destination": {"any": True},
+ },
+ {
+ "grant": "deny",
+ "sequence": 20,
+ "protocol": "udp",
+ "source": {"any": True},
+ "destination": {"any": True},
+ "dscp": "AF23",
+ "precedence": "critical",
+ },
+ ],
+ }
+ ],
+ }
+ ]
+ self.assertEqual(result["parsed"], compare_list, result["parsed"])
+
+ def test_nxos_acls_gathered(self):
+ set_module_args(dict(config=[], state="gathered"))
+ result = self.execute_module(changed=False)
+ compare_list = [
+ {
+ "acls": [
+ {
+ "aces": [
+ {
+ "destination": {"any": True},
+ "sequence": 10,
+ "protocol": "sctp",
+ "source": {"any": True},
+ "grant": "permit",
+ }
+ ],
+ "name": "ACL1v6",
+ }
+ ],
+ "afi": "ipv6",
+ },
+ {
+ "acls": [
+ {
+ "aces": [
+ {
+ "destination": {"any": True},
+ "sequence": 10,
+ "protocol": "ip",
+ "source": {"any": True},
+ "grant": "permit",
+ },
+ {
+ "destination": {"any": True},
+ "sequence": 20,
+ "protocol": "udp",
+ "source": {"any": True},
+ "grant": "deny",
+ },
+ ],
+ "name": "ACL1v4",
+ }
+ ],
+ "afi": "ipv4",
+ },
+ ]
+ self.assertEqual(result["gathered"], compare_list, result["gathered"])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_banner.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_banner.py
new file mode 100644
index 00000000..a4784d58
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_banner.py
@@ -0,0 +1,101 @@
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_banner
+from .nxos_module import TestNxosModule, set_module_args
+
+
+class TestNxosBannerModule(TestNxosModule):
+
+ module = nxos_banner
+
+ def setUp(self):
+ super(TestNxosBannerModule, self).setUp()
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_banner.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_banner.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestNxosBannerModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.load_config.return_value = dict(diff=None, session="session")
+
+ def test_nxos_banner_exec_create(self):
+ set_module_args(dict(banner="exec", text="test\nbanner\nstring"))
+ commands = ["banner exec @\ntest\nbanner\nstring\n@"]
+ self.run_commands.return_value = commands
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_banner_exec_remove(self):
+ set_module_args(dict(banner="exec", state="absent"))
+ commands = ["no banner exec"]
+ self.run_commands.return_value = commands
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_banner_exec_fail_create(self):
+ set_module_args(dict(banner="exec", text="test\nbanner\nstring"))
+ commands = ["banner exec @\ntest\nbanner\nstring\n@"]
+ err_rsp = ["Invalid command"]
+ self.run_commands.return_value = err_rsp
+ result = self.execute_module(failed=True, changed=True)
+ self.assertEqual(
+ result["msg"],
+ "banner: exec may not be supported on this platform. Possible values are : exec | motd",
+ )
+
+ def test_nxos_banner_exec_fail_remove(self):
+ set_module_args(dict(banner="exec", state="absent"))
+ commands = ["no banner exec"]
+ err_rsp = ["Invalid command"]
+ self.run_commands.return_value = err_rsp
+ result = self.execute_module(failed=True, changed=True)
+ self.assertEqual(
+ result["msg"],
+ "banner: exec may not be supported on this platform. Possible values are : exec | motd",
+ )
+
+ def test_nxos_banner_motd_create(self):
+ set_module_args(dict(banner="motd", text="test\nbanner\nstring"))
+ commands = ["banner motd @\ntest\nbanner\nstring\n@"]
+ self.run_commands.return_value = commands
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_banner_motd_remove(self):
+ set_module_args(dict(banner="motd", state="absent"))
+ commands = ["no banner motd"]
+ self.run_commands.return_value = commands
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_banner_with_preserved_spaces(self):
+ set_module_args(dict(banner="motd", text=" foo \n"))
+ commands = ["banner motd @\n foo \n\n@"]
+ self.run_commands.return_value = commands
+ self.execute_module(changed=True, commands=commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bfd_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bfd_global.py
new file mode 100644
index 00000000..ad4cd1a1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bfd_global.py
@@ -0,0 +1,336 @@
+# (c) 2019 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_bfd_global
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ NxosCmdRef,
+)
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+# TBD: These imports / import checks are only needed as a workaround for
+# shippable, which fails this test due to import yaml & import ordereddict.
+import pytest
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxosCmdRef_import_check,
+)
+
+msg = nxosCmdRef_import_check()
+
+
+@pytest.mark.skipif(len(msg), reason=msg)
+class TestNxosBfdGlobalModule(TestNxosModule):
+
+ module = nxos_bfd_global
+
+ def setUp(self):
+ super(TestNxosBfdGlobalModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_bfd_global.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos.NxosCmdRef.execute_show_command"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ self.mock_get_platform_shortname = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos.NxosCmdRef.get_platform_shortname"
+ )
+ self.get_platform_shortname = self.mock_get_platform_shortname.start()
+
+ def tearDown(self):
+ super(TestNxosBfdGlobalModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.execute_show_command.stop()
+ self.get_platform_shortname.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.load_config.return_value = None
+
+ def test_bfd_defaults_n9k(self):
+ # feature bfd is enabled, no non-defaults are set.
+ self.execute_show_command.return_value = "feature bfd"
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ dict(
+ echo_interface="deleted",
+ echo_rx_interval=50,
+ interval={"tx": 50, "min_rx": 50, "multiplier": 3},
+ slow_timer=2000,
+ startup_timer=5,
+ ipv4_echo_rx_interval=50,
+ ipv4_interval={"tx": 50, "min_rx": 50, "multiplier": 3},
+ ipv4_slow_timer=2000,
+ ipv6_echo_rx_interval=50,
+ ipv6_interval={"tx": 50, "min_rx": 50, "multiplier": 3},
+ ipv6_slow_timer=2000,
+ )
+ )
+ self.execute_module(changed=False)
+
+ def test_bfd_non_defaults_n9k(self):
+ # feature bfd is enabled, apply all non-default values.
+ # This testcase also tests reordering of echo_interface to make sure
+ # it gets applied last.
+ self.execute_show_command.return_value = "feature bfd"
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ dict(
+ echo_interface="loopback1",
+ echo_rx_interval=51,
+ interval={"tx": 51, "min_rx": 51, "multiplier": 4},
+ slow_timer=2001,
+ startup_timer=6,
+ ipv4_echo_rx_interval=51,
+ ipv4_interval={"tx": 51, "min_rx": 51, "multiplier": 4},
+ ipv4_slow_timer=2001,
+ ipv6_echo_rx_interval=51,
+ ipv6_interval={"tx": 51, "min_rx": 51, "multiplier": 4},
+ ipv6_slow_timer=2001,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "bfd interval 51 min_rx 51 multiplier 4",
+ "bfd ipv4 echo-rx-interval 51",
+ "bfd ipv4 interval 51 min_rx 51 multiplier 4",
+ "bfd ipv4 slow-timer 2001",
+ "bfd ipv6 echo-rx-interval 51",
+ "bfd ipv6 interval 51 min_rx 51 multiplier 4",
+ "bfd ipv6 slow-timer 2001",
+ "bfd slow-timer 2001",
+ "bfd startup-timer 6",
+ "bfd echo-interface loopback1",
+ "bfd echo-rx-interval 51",
+ ],
+ )
+
+ def test_bfd_defaults_n3k(self):
+ # feature bfd is enabled, no non-defaults are set.
+ self.execute_show_command.return_value = "feature bfd"
+ self.get_platform_shortname.return_value = "N3K"
+ set_module_args(
+ dict(
+ echo_interface="deleted",
+ echo_rx_interval=250,
+ interval={"tx": 250, "min_rx": 250, "multiplier": 3},
+ slow_timer=2000,
+ startup_timer=5,
+ ipv4_echo_rx_interval=250,
+ ipv4_interval={"tx": 250, "min_rx": 250, "multiplier": 3},
+ ipv4_slow_timer=2000,
+ ipv6_echo_rx_interval=250,
+ ipv6_interval={"tx": 250, "min_rx": 250, "multiplier": 3},
+ ipv6_slow_timer=2000,
+ )
+ )
+ self.execute_module(changed=False)
+
+ def test_bfd_defaults_n35(self):
+ # feature bfd is enabled, no non-defaults are set.
+ self.execute_show_command.return_value = "feature bfd"
+ self.get_platform_shortname.return_value = "N35"
+ set_module_args(
+ dict(
+ echo_interface="deleted",
+ echo_rx_interval=50,
+ interval={"tx": 50, "min_rx": 50, "multiplier": 3},
+ slow_timer=2000,
+ startup_timer=5,
+ ipv4_echo_rx_interval=50,
+ ipv4_interval={"tx": 50, "min_rx": 50, "multiplier": 3},
+ ipv4_slow_timer=2000,
+ )
+ )
+ self.execute_module(changed=False)
+
+ def test_bfd_defaults_n6k(self):
+ # feature bfd is enabled, no non-defaults are set.
+ self.execute_show_command.return_value = "feature bfd"
+ self.get_platform_shortname.return_value = "N6K"
+ set_module_args(
+ dict(
+ echo_interface="deleted",
+ interval={"tx": 50, "min_rx": 50, "multiplier": 3},
+ slow_timer=2000,
+ fabricpath_interval={"tx": 50, "min_rx": 50, "multiplier": 3},
+ fabricpath_slow_timer=2000,
+ fabricpath_vlan=1,
+ )
+ )
+ self.execute_module(changed=False)
+
+ def test_bfd_defaults_n7k(self):
+ # feature bfd is enabled, no non-defaults are set.
+ self.execute_show_command.return_value = "feature bfd"
+ self.get_platform_shortname.return_value = "N7K"
+ set_module_args(
+ dict(
+ echo_interface="deleted",
+ echo_rx_interval=50,
+ interval={"tx": 50, "min_rx": 50, "multiplier": 3},
+ slow_timer=2000,
+ ipv4_echo_rx_interval=50,
+ ipv4_interval={"tx": 50, "min_rx": 50, "multiplier": 3},
+ ipv4_slow_timer=2000,
+ ipv6_echo_rx_interval=50,
+ ipv6_interval={"tx": 50, "min_rx": 50, "multiplier": 3},
+ ipv6_slow_timer=2000,
+ fabricpath_interval={"tx": 50, "min_rx": 50, "multiplier": 3},
+ fabricpath_slow_timer=2000,
+ fabricpath_vlan=1,
+ )
+ )
+ self.execute_module(changed=False)
+
+ def test_bfd_existing_n9k(self):
+ module_name = self.module.__name__.rsplit(".", 1)[1]
+ self.execute_show_command.return_value = load_fixture(
+ module_name, "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ dict(
+ echo_interface="deleted",
+ echo_rx_interval=51,
+ interval={"tx": 51, "min_rx": 51, "multiplier": 3},
+ slow_timer=2000,
+ startup_timer=5,
+ ipv4_echo_rx_interval=50,
+ ipv4_interval={"tx": 51, "min_rx": 51, "multiplier": 3},
+ ipv4_slow_timer=2000,
+ ipv6_echo_rx_interval=50,
+ ipv6_interval={"tx": 51, "min_rx": 51, "multiplier": 3},
+ ipv6_slow_timer=2000,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "no bfd echo-interface loopback2",
+ "bfd echo-rx-interval 51",
+ "bfd interval 51 min_rx 51 multiplier 3",
+ "bfd slow-timer 2000",
+ "bfd startup-timer 5",
+ "bfd ipv4 echo-rx-interval 50",
+ "bfd ipv4 interval 51 min_rx 51 multiplier 3",
+ "bfd ipv4 slow-timer 2000",
+ "bfd ipv6 echo-rx-interval 50",
+ "bfd ipv6 interval 51 min_rx 51 multiplier 3",
+ "bfd ipv6 slow-timer 2000",
+ ],
+ )
+
+ def test_bfd_idempotence_n9k(self):
+ module_name = self.module.__name__.rsplit(".", 1)[1]
+ self.execute_show_command.return_value = load_fixture(
+ module_name, "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ dict(
+ echo_interface="loopback2",
+ echo_rx_interval=56,
+ interval={"tx": 51, "min_rx": 52, "multiplier": 4},
+ slow_timer=2001,
+ startup_timer=6,
+ ipv4_echo_rx_interval=54,
+ ipv4_interval={"tx": 54, "min_rx": 54, "multiplier": 4},
+ ipv4_slow_timer=2004,
+ ipv6_echo_rx_interval=56,
+ ipv6_interval={"tx": 56, "min_rx": 56, "multiplier": 6},
+ ipv6_slow_timer=2006,
+ )
+ )
+ self.execute_module(changed=False)
+
+ def test_bfd_existing_n7k(self):
+ module_name = self.module.__name__.rsplit(".", 1)[1]
+ self.execute_show_command.return_value = load_fixture(
+ module_name, "N7K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N7K"
+ set_module_args(
+ dict(
+ echo_interface="deleted",
+ echo_rx_interval=51,
+ interval={"tx": 51, "min_rx": 51, "multiplier": 3},
+ slow_timer=2002,
+ ipv4_echo_rx_interval=51,
+ ipv4_interval={"tx": 51, "min_rx": 51, "multiplier": 3},
+ ipv4_slow_timer=2002,
+ ipv6_echo_rx_interval=51,
+ ipv6_interval={"tx": 51, "min_rx": 51, "multiplier": 3},
+ ipv6_slow_timer=2002,
+ fabricpath_interval={"tx": 51, "min_rx": 51, "multiplier": 3},
+ fabricpath_slow_timer=2003,
+ fabricpath_vlan=3,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "no bfd echo-interface loopback2",
+ "bfd echo-rx-interval 51",
+ "bfd interval 51 min_rx 51 multiplier 3",
+ "bfd slow-timer 2002",
+ "bfd ipv4 echo-rx-interval 51",
+ "bfd ipv4 interval 51 min_rx 51 multiplier 3",
+ "bfd ipv4 slow-timer 2002",
+ "bfd ipv6 echo-rx-interval 51",
+ "bfd ipv6 interval 51 min_rx 51 multiplier 3",
+ "bfd ipv6 slow-timer 2002",
+ "bfd fabricpath interval 51 min_rx 51 multiplier 3",
+ "bfd fabricpath slow-timer 2003",
+ "bfd fabricpath vlan 3",
+ ],
+ )
+
+ def test_bfd_idempotence_n7k(self):
+ module_name = self.module.__name__.rsplit(".", 1)[1]
+ self.execute_show_command.return_value = load_fixture(
+ module_name, "N7K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N7K"
+ set_module_args(
+ dict(
+ echo_interface="loopback2",
+ echo_rx_interval=56,
+ interval={"tx": 51, "min_rx": 52, "multiplier": 4},
+ slow_timer=2001,
+ ipv4_echo_rx_interval=54,
+ ipv4_interval={"tx": 54, "min_rx": 54, "multiplier": 4},
+ ipv4_slow_timer=2004,
+ ipv6_echo_rx_interval=56,
+ ipv6_interval={"tx": 56, "min_rx": 56, "multiplier": 6},
+ ipv6_slow_timer=2006,
+ fabricpath_interval={"tx": 58, "min_rx": 58, "multiplier": 8},
+ fabricpath_slow_timer=2008,
+ fabricpath_vlan=2,
+ )
+ )
+ self.execute_module(changed=False)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bfd_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bfd_interfaces.py
new file mode 100644
index 00000000..8e5dc271
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bfd_interfaces.py
@@ -0,0 +1,357 @@
+# (c) 2019 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from textwrap import dedent
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules import nxos_bfd_interfaces
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.bfd_interfaces.bfd_interfaces import (
+ Bfd_interfaces,
+)
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+ignore_provider_arg = True
+
+
+class TestNxosBfdInterfacesModule(TestNxosModule):
+
+ module = nxos_bfd_interfaces
+
+ def setUp(self):
+ super(TestNxosBfdInterfacesModule, self).setUp()
+
+ self.mock_FACT_LEGACY_SUBSETS = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS"
+ )
+ self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.bfd_interfaces.bfd_interfaces.Bfd_interfaces.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ def tearDown(self):
+ super(TestNxosBfdInterfacesModule, self).tearDown()
+ self.mock_FACT_LEGACY_SUBSETS.stop()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.mock_FACT_LEGACY_SUBSETS.return_value = dict()
+ self.get_resource_connection_config.return_value = None
+ self.edit_config.return_value = None
+
+ # ---------------------------
+ # Bfd_interfaces Test Cases
+ # ---------------------------
+
+ # 'state' logic behaviors
+ #
+ # - 'merged' : Update existing device state with any differences in the play.
+ # - 'deleted' : Reset existing device state to default values. Ignores any
+ # play attrs other than 'name'. Scope is limited to interfaces
+ # in the play.
+ # - 'overridden': The play is the source of truth. Similar to replaced but the
+ # scope includes all interfaces; ie. it will also reset state
+ # on interfaces not found in the play.
+ # - 'replaced' : Scope is limited to the interfaces in the play.
+
+ SHOW_CMD = "show running-config | section '^interface|^feature bfd'"
+
+ def test_1(self):
+ # Setup: No BFD configs shown on device interfaces
+ # NOTE: The bfd 'enable' state is the default and does not nvgen.
+ existing = dedent(
+ """\
+ feature bfd
+ interface Ethernet1/1
+ interface Ethernet1/2
+ interface Ethernet1/3
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(name="Ethernet1/1", bfd="disable", echo="disable"),
+ dict(name="Ethernet1/2", bfd="disable"),
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = [
+ "interface Ethernet1/1",
+ "no bfd",
+ "no bfd echo",
+ "interface Ethernet1/2",
+ "no bfd",
+ ]
+ deleted = []
+ overridden = merged
+ replaced = merged
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=deleted)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ def test_2(self):
+ # Change existing BFD configs
+ existing = dedent(
+ """\
+ feature bfd
+ interface Ethernet1/1
+ no bfd
+ interface Ethernet1/2
+ no bfd echo
+ interface Ethernet1/3
+ no bfd
+ no bfd echo
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(name="Ethernet1/1", bfd="enable", echo="disable"),
+ dict(name="Ethernet1/2"),
+ # Eth1/3 not present! Thus overridden should set Eth1/3 to defaults;
+ # replaced should ignore Eth1/3.
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = ["interface Ethernet1/1", "bfd", "no bfd echo"]
+ deleted = [
+ "interface Ethernet1/1",
+ "bfd",
+ "interface Ethernet1/2",
+ "bfd echo",
+ ]
+ overridden = [
+ "interface Ethernet1/3",
+ "bfd",
+ "bfd echo",
+ "interface Ethernet1/1",
+ "bfd",
+ "no bfd echo",
+ "interface Ethernet1/2",
+ "bfd echo",
+ ]
+ replaced = [
+ "interface Ethernet1/1",
+ "bfd",
+ "no bfd echo",
+ "interface Ethernet1/2",
+ "bfd echo",
+ ]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ def test_3(self):
+ # Device has bfd configs, playbook has no values
+ existing = dedent(
+ """\
+ feature bfd
+ interface Ethernet1/1
+ no bfd
+ interface Ethernet1/2
+ no bfd echo
+ interface Ethernet1/3
+ no bfd
+ no bfd echo
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(config=[dict(name="Ethernet1/1")])
+ # Expected result commands for each 'state'
+ merged = []
+ deleted = ["interface Ethernet1/1", "bfd"]
+ overridden = [
+ "interface Ethernet1/1",
+ "bfd",
+ "interface Ethernet1/2",
+ "bfd echo",
+ "interface Ethernet1/3",
+ "bfd",
+ "bfd echo",
+ ]
+ replaced = ["interface Ethernet1/1", "bfd"]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ def test_4(self):
+ # Test with interface that doesn't exist yet
+ existing = dedent(
+ """\
+ feature bfd
+ interface Ethernet1/1
+ no bfd
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[dict(name="Ethernet1/1.42", bfd="enable", echo="disable")]
+ )
+ # Expected result commands for each 'state'
+ merged = ["interface Ethernet1/1.42", "bfd", "no bfd echo"]
+ deleted = []
+ overridden = [
+ "interface Ethernet1/1.42",
+ "bfd",
+ "no bfd echo",
+ "interface Ethernet1/1",
+ "bfd",
+ ]
+ replaced = ["interface Ethernet1/1.42", "bfd", "no bfd echo"]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=deleted)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ def test_5(self):
+ # idempotence
+ existing = dedent(
+ """\
+ feature bfd
+ interface Ethernet1/1
+ no bfd
+ no bfd echo
+ interface Ethernet1/2
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(name="Ethernet1/1", bfd="disable", echo="disable"),
+ dict(name="Ethernet1/2", bfd="enable", echo="enable"),
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = []
+ deleted = ["interface Ethernet1/1", "bfd", "bfd echo"]
+ overridden = []
+ replaced = []
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=overridden)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=replaced)
+
+
+def build_args(data, type, state=None, check_mode=None):
+ if state is None:
+ state = "merged"
+ if check_mode is None:
+ check_mode = False
+ args = {
+ "state": state,
+ "_ansible_check_mode": check_mode,
+ "config": {type: data},
+ }
+ return args
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp.py
new file mode 100644
index 00000000..71edccf0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp.py
@@ -0,0 +1,162 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_bgp
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosBgpModule(TestNxosModule):
+
+ module = nxos_bgp
+
+ def setUp(self):
+ super(TestNxosBgpModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_bgp.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_bgp.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosBgpModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture("nxos_bgp", "config.cfg")
+ self.load_config.return_value = []
+
+ def test_nxos_bgp(self):
+ set_module_args(dict(asn=65535, router_id="192.0.2.1"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"], ["router bgp 65535", "router-id 192.0.2.1"]
+ )
+
+ def test_nxos_bgp_change_nothing(self):
+ set_module_args(dict(asn=65535, router_id="192.168.1.1"))
+ self.execute_module(changed=False)
+
+ def test_nxos_bgp_wrong_asn(self):
+ set_module_args(dict(asn=10, router_id="192.168.1.1"))
+ result = self.execute_module(failed=True)
+ self.assertEqual(result["msg"], "Another BGP ASN already exists.")
+
+ def test_nxos_bgp_remove(self):
+ set_module_args(dict(asn=65535, state="absent"))
+ self.execute_module(changed=True, commands=["no router bgp 65535"])
+
+ def test_nxos_bgp_remove_vrf(self):
+ set_module_args(dict(asn=65535, vrf="test2", state="absent"))
+ self.execute_module(
+ changed=True, commands=["router bgp 65535", "no vrf test2"]
+ )
+
+ def test_nxos_bgp_remove_nonexistant_vrf(self):
+ set_module_args(dict(asn=65535, vrf="foo", state="absent"))
+ self.execute_module(changed=False)
+
+ def test_nxos_bgp_remove_wrong_asn(self):
+ set_module_args(dict(asn=10, state="absent"))
+ self.execute_module(changed=False)
+
+ def test_nxos_bgp_vrf(self):
+ set_module_args(dict(asn=65535, vrf="test", router_id="192.0.2.1"))
+ result = self.execute_module(
+ changed=True,
+ commands=["router bgp 65535", "vrf test", "router-id 192.0.2.1"],
+ )
+ self.assertEqual(result["warnings"], ["VRF test doesn't exist."])
+
+ def test_nxos_bgp_global_param(self):
+ set_module_args(dict(asn=65535, shutdown=True))
+ self.execute_module(
+ changed=True, commands=["router bgp 65535", "shutdown"]
+ )
+
+ def test_nxos_bgp_global_param_outside_default(self):
+ set_module_args(dict(asn=65535, vrf="test", shutdown=True))
+ result = self.execute_module(failed=True)
+ self.assertEqual(
+ result["msg"],
+ 'Global params can be modified only under "default" VRF.',
+ )
+
+ def test_nxos_bgp_default_value(self):
+ set_module_args(
+ dict(asn=65535, graceful_restart_timers_restart="default")
+ )
+ self.execute_module(
+ changed=True,
+ commands=["router bgp 65535", "graceful-restart restart-time 120"],
+ )
+
+
+class TestNxosBgp32BitsAS(TestNxosModule):
+
+ module = nxos_bgp
+
+ def setUp(self):
+ super(TestNxosBgp32BitsAS, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_bgp.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_bgp.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosBgp32BitsAS, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture(
+ "nxos_bgp", "config_32_bits_as.cfg"
+ )
+ self.load_config.return_value = []
+
+ def test_nxos_bgp_change_nothing(self):
+ set_module_args(dict(asn="65535.65535", router_id="192.168.1.1"))
+ self.execute_module(changed=False)
+
+ def test_nxos_bgp_wrong_asn(self):
+ set_module_args(dict(asn="65535.10", router_id="192.168.1.1"))
+ result = self.execute_module(failed=True)
+ self.assertEqual(result["msg"], "Another BGP ASN already exists.")
+
+ def test_nxos_bgp_remove(self):
+ set_module_args(dict(asn="65535.65535", state="absent"))
+ self.execute_module(
+ changed=True, commands=["no router bgp 65535.65535"]
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_af.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_af.py
new file mode 100644
index 00000000..b4fc5de3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_af.py
@@ -0,0 +1,192 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_bgp_af
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosBgpAfModule(TestNxosModule):
+
+ module = nxos_bgp_af
+
+ def setUp(self):
+ super(TestNxosBgpAfModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_bgp_af.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_bgp_af.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosBgpAfModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture("nxos_bgp", "config.cfg")
+ self.load_config.return_value = None
+
+ def test_nxos_bgp_af(self):
+ set_module_args(dict(asn=65535, afi="ipv4", safi="unicast"))
+ self.execute_module(
+ changed=True,
+ sort=False,
+ commands=["router bgp 65535", "address-family ipv4 unicast"],
+ )
+
+ def test_nxos_bgp_af_vrf(self):
+ set_module_args(
+ dict(asn=65535, vrf="test", afi="ipv4", safi="unicast")
+ )
+ self.execute_module(
+ changed=True,
+ sort=False,
+ commands=[
+ "router bgp 65535",
+ "vrf test",
+ "address-family ipv4 unicast",
+ ],
+ )
+
+ def test_nxos_bgp_af_vrf_exists(self):
+ set_module_args(
+ dict(asn=65535, vrf="test2", afi="ipv4", safi="unicast")
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_bgp_af_dampening_routemap(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ afi="ipv4",
+ safi="unicast",
+ dampening_routemap="route-map-a",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "router bgp 65535",
+ "address-family ipv4 unicast",
+ "dampening route-map route-map-a",
+ ],
+ )
+
+ def test_nxos_bgp_af_dampening_manual(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ afi="ipv4",
+ safi="unicast",
+ dampening_half_time=5,
+ dampening_suppress_time=2000,
+ dampening_reuse_time=1900,
+ dampening_max_suppress_time=10,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "router bgp 65535",
+ "address-family ipv4 unicast",
+ "dampening 5 1900 2000 10",
+ ],
+ )
+
+ def test_nxos_bgp_af_dampening_mix(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ afi="ipv4",
+ safi="unicast",
+ dampening_routemap="route-map-a",
+ dampening_half_time=5,
+ dampening_suppress_time=2000,
+ dampening_reuse_time=1900,
+ dampening_max_suppress_time=10,
+ )
+ )
+ result = self.execute_module(failed=True)
+ self.assertEqual(
+ result["msg"],
+ "parameters are mutually exclusive: dampening_routemap|dampening_half_time, "
+ "dampening_routemap|dampening_suppress_time, dampening_routemap|dampening_reuse_time, "
+ "dampening_routemap|dampening_max_suppress_time",
+ )
+
+ def test_nxos_bgp_af_client(self):
+ set_module_args(
+ dict(asn=65535, afi="ipv4", safi="unicast", client_to_client=False)
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "router bgp 65535",
+ "address-family ipv4 unicast",
+ "no client-to-client reflection",
+ ],
+ )
+
+ def test_nxos_bgp_af_retain_route_target(self):
+ set_module_args(
+ dict(
+ asn=65535, afi="l2vpn", safi="evpn", retain_route_target="abc"
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "router bgp 65535",
+ "address-family l2vpn evpn",
+ "retain route-target route-map abc",
+ ],
+ )
+
+ def test_nxos_bgp_af_retain_route_target_all(self):
+ set_module_args(
+ dict(
+ asn=65535, afi="l2vpn", safi="evpn", retain_route_target="all"
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "router bgp 65535",
+ "address-family l2vpn evpn",
+ "retain route-target all",
+ ],
+ )
+
+ def test_nxos_bgp_af_retain_route_target_exists(self):
+ set_module_args(
+ dict(
+ asn=65535, afi="l2vpn", safi="evpn", retain_route_target="xyz"
+ )
+ )
+ self.execute_module(changed=False, commands=[])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_global.py
new file mode 100644
index 00000000..f2cee75f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_global.py
@@ -0,0 +1,795 @@
+# (c) 2021 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from textwrap import dedent
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules import nxos_bgp_global
+
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+ignore_provider_arg = True
+
+
+class TestNxosBgpGlobalModule(TestNxosModule):
+
+ module = nxos_bgp_global
+
+ def setUp(self):
+ super(TestNxosBgpGlobalModule, self).setUp()
+
+ self.mock_get_resource_connection = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module.get_resource_connection"
+ )
+ self.get_resource_connection = (
+ self.mock_get_resource_connection.start()
+ )
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.bgp_global.bgp_global.Bgp_globalFacts.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_cfg_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.bgp_global.bgp_global.Bgp_global._get_config"
+ )
+ self.cfg_get_config = self.mock_cfg_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosBgpGlobalModule, self).tearDown()
+ self.get_resource_connection.stop()
+ self.get_config.stop()
+ self.cfg_get_config.stop()
+
+ def test_nxos_bgp_global_merged(self):
+ set_module_args(
+ dict(
+ config=dict(
+ as_number="65536",
+ router_id="198.51.100.2",
+ log_neighbor_changes=True,
+ maxas_limit=20,
+ neighbors=[
+ dict(
+ neighbor_address="198.51.100.20",
+ neighbor_affinity_group=dict(group_id=160),
+ remote_as="65537",
+ description="NBR-1",
+ low_memory=dict(exempt=True),
+ ),
+ dict(
+ neighbor_address="198.51.100.21",
+ remote_as="65537",
+ password=dict(
+ encryption=7, key="12090404011C03162E"
+ ),
+ ),
+ ],
+ vrfs=[
+ dict(
+ vrf="site-1",
+ local_as="200",
+ log_neighbor_changes=True,
+ neighbors=[
+ dict(
+ neighbor_address="192.0.2.10",
+ neighbor_affinity_group=dict(group_id=161),
+ remote_as="65538",
+ description="site-1-nbr-1",
+ password=dict(
+ encryption=3,
+ key="13D4D3549493D2877B1DC116EE27A6BE",
+ ),
+ )
+ ],
+ ),
+ dict(
+ vrf="site-2",
+ local_as="300",
+ log_neighbor_changes=True,
+ neighbor_down=dict(fib_accelerate=True),
+ ),
+ ],
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router bgp 65536",
+ "log-neighbor-changes",
+ "maxas-limit 20",
+ "router-id 198.51.100.2",
+ "neighbor 198.51.100.20",
+ "remote-as 65537",
+ "affinity-group 160",
+ "description NBR-1",
+ "low-memory exempt",
+ "neighbor 198.51.100.21",
+ "remote-as 65537",
+ "password 7 12090404011C03162E",
+ "vrf site-1",
+ "local-as 200",
+ "log-neighbor-changes",
+ "neighbor 192.0.2.10",
+ "affinity-group 161",
+ "remote-as 65538",
+ "description site-1-nbr-1",
+ "password 3 13D4D3549493D2877B1DC116EE27A6BE",
+ "vrf site-2",
+ "local-as 300",
+ "log-neighbor-changes",
+ "neighbor-down fib-accelerate",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_bgp_global_merged_idempotent(self):
+ run_cfg = dedent(
+ """\
+ router bgp 65536
+ log-neighbor-changes
+ maxas-limit 20
+ router-id 198.51.100.2
+ neighbor 198.51.100.20
+ remote-as 65537
+ affinity-group 160
+ description NBR-1
+ low-memory exempt
+ neighbor 198.51.100.21
+ remote-as 65537
+ password 7 12090404011C03162E
+ vrf site-1
+ local-as 200
+ log-neighbor-changes
+ neighbor 192.0.2.10
+ affinity-group 161
+ remote-as 65538
+ description site-1-nbr-1
+ password 3 13D4D3549493D2877B1DC116EE27A6BE
+ vrf site-2
+ local-as 300
+ log-neighbor-changes
+ neighbor-down fib-accelerate
+ """
+ )
+ self.get_config.return_value = run_cfg
+
+ set_module_args(
+ dict(
+ config=dict(
+ as_number="65536",
+ router_id="198.51.100.2",
+ log_neighbor_changes=True,
+ maxas_limit=20,
+ neighbors=[
+ dict(
+ neighbor_address="198.51.100.20",
+ neighbor_affinity_group=dict(group_id=160),
+ remote_as="65537",
+ description="NBR-1",
+ low_memory=dict(exempt=True),
+ ),
+ dict(
+ neighbor_address="198.51.100.21",
+ remote_as="65537",
+ password=dict(
+ encryption=7, key="12090404011C03162E"
+ ),
+ ),
+ ],
+ vrfs=[
+ dict(
+ vrf="site-1",
+ local_as="200",
+ log_neighbor_changes=True,
+ neighbors=[
+ dict(
+ neighbor_address="192.0.2.10",
+ neighbor_affinity_group=dict(group_id=161),
+ remote_as="65538",
+ description="site-1-nbr-1",
+ password=dict(
+ encryption=3,
+ key="13D4D3549493D2877B1DC116EE27A6BE",
+ ),
+ )
+ ],
+ ),
+ dict(
+ vrf="site-2",
+ local_as="300",
+ log_neighbor_changes=True,
+ neighbor_down=dict(fib_accelerate=True),
+ ),
+ ],
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_bgp_global_replaced(self):
+ run_cfg = dedent(
+ """\
+ router bgp 65536
+ log-neighbor-changes
+ maxas-limit 20
+ router-id 198.51.100.2
+ neighbor 198.51.100.20
+ remote-as 65537
+ affinity-group 161
+ description NBR-1
+ low-memory exempt
+ neighbor 198.51.100.21
+ remote-as 65537
+ password 7 12090404011C03162E
+ vrf site-1
+ local-as 200
+ log-neighbor-changes
+ neighbor 192.0.2.10
+ affinity-group 170
+ remote-as 65538
+ description site-1-nbr-1
+ password 3 13D4D3549493D2877B1DC116EE27A6BE
+ vrf site-2
+ local-as 300
+ log-neighbor-changes
+ neighbor-down fib-accelerate
+ """
+ )
+ self.get_config.return_value = run_cfg
+ self.cfg_get_config.return_value = run_cfg
+
+ set_module_args(
+ dict(
+ config=dict(
+ as_number="65536",
+ router_id="198.51.100.212",
+ log_neighbor_changes=True,
+ maxas_limit=20,
+ neighbors=[
+ dict(
+ neighbor_address="198.51.100.20",
+ neighbor_affinity_group=dict(group_id=161),
+ remote_as="65537",
+ description="NBR-1",
+ low_memory=dict(exempt=True),
+ )
+ ],
+ vrfs=[
+ dict(
+ vrf="site-1",
+ local_as="200",
+ log_neighbor_changes=True,
+ neighbors=[
+ dict(
+ neighbor_address="192.0.2.10",
+ neighbor_affinity_group=dict(group_id=190),
+ remote_as="65538",
+ description="site-1-nbr-1",
+ password=dict(
+ encryption=3,
+ key="13D4D3549493D2877B1DC116EE27A6BE",
+ ),
+ )
+ ],
+ )
+ ],
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router bgp 65536",
+ "router-id 198.51.100.212",
+ "no neighbor 198.51.100.21",
+ "vrf site-1",
+ "neighbor 192.0.2.10",
+ "affinity-group 190",
+ "no vrf site-2",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_bgp_global_replaced_idempotent(self):
+ run_cfg = dedent(
+ """\
+ router bgp 65536
+ log-neighbor-changes
+ maxas-limit 20
+ router-id 198.51.100.212
+ neighbor 198.51.100.20
+ remote-as 65537
+ affinity-group 161
+ description NBR-1
+ low-memory exempt
+ vrf site-1
+ local-as 200
+ log-neighbor-changes
+ neighbor 192.0.2.10
+ affinity-group 190
+ remote-as 65538
+ description site-1-nbr-1
+ password 3 13D4D3549493D2877B1DC116EE27A6BE
+ """
+ )
+ self.get_config.return_value = run_cfg
+ self.cfg_get_config.return_value = run_cfg
+
+ set_module_args(
+ dict(
+ config=dict(
+ as_number="65536",
+ router_id="198.51.100.212",
+ log_neighbor_changes=True,
+ maxas_limit=20,
+ neighbors=[
+ dict(
+ neighbor_address="198.51.100.20",
+ neighbor_affinity_group=dict(group_id=161),
+ remote_as="65537",
+ description="NBR-1",
+ low_memory=dict(exempt=True),
+ )
+ ],
+ vrfs=[
+ dict(
+ vrf="site-1",
+ local_as="200",
+ log_neighbor_changes=True,
+ neighbors=[
+ dict(
+ neighbor_address="192.0.2.10",
+ neighbor_affinity_group=dict(group_id=190),
+ remote_as="65538",
+ description="site-1-nbr-1",
+ password=dict(
+ encryption=3,
+ key="13D4D3549493D2877B1DC116EE27A6BE",
+ ),
+ )
+ ],
+ )
+ ],
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_bgp_global_replaced_failed_1(self):
+ run_cfg = dedent(
+ """\
+ router bgp 65536
+ log-neighbor-changes
+ maxas-limit 20
+ router-id 198.51.100.2
+ neighbor 198.51.100.20
+ remote-as 65537
+ affinity-group 161
+ description NBR-1
+ low-memory exempt
+ neighbor 198.51.100.21
+ address-family ipv4 unicast
+ remote-as 65537
+ password 7 12090404011C03162E
+ vrf site-1
+ local-as 200
+ log-neighbor-changes
+ neighbor 192.0.2.10
+ affinity-group 170
+ remote-as 65538
+ description site-1-nbr-1
+ password 3 13D4D3549493D2877B1DC116EE27A6BE
+ vrf site-2
+ local-as 300
+ log-neighbor-changes
+ neighbor-down fib-accelerate
+ """
+ )
+ self.get_config.return_value = run_cfg
+ self.cfg_get_config.return_value = run_cfg
+
+ set_module_args(
+ dict(
+ config=dict(
+ as_number="65536",
+ router_id="198.51.100.212",
+ log_neighbor_changes=True,
+ maxas_limit=20,
+ neighbors=[
+ dict(
+ neighbor_address="198.51.100.20",
+ neighbor_affinity_group=dict(group_id=161),
+ remote_as="65537",
+ description="NBR-1",
+ low_memory=dict(exempt=True),
+ )
+ ],
+ vrfs=[
+ dict(
+ vrf="site-1",
+ local_as="200",
+ log_neighbor_changes=True,
+ neighbors=[
+ dict(
+ neighbor_address="192.0.2.10",
+ neighbor_affinity_group=dict(group_id=190),
+ remote_as="65538",
+ description="site-1-nbr-1",
+ password=dict(
+ encryption=3,
+ key="13D4D3549493D2877B1DC116EE27A6BE",
+ ),
+ )
+ ],
+ )
+ ],
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ result = self.execute_module(failed=True)
+
+ def test_nxos_bgp_global_replaced_failed_2(self):
+ run_cfg = dedent(
+ """\
+ router bgp 65536
+ log-neighbor-changes
+ maxas-limit 20
+ router-id 198.51.100.2
+ neighbor 198.51.100.20
+ remote-as 65537
+ affinity-group 161
+ description NBR-1
+ low-memory exempt
+ neighbor 198.51.100.21
+ remote-as 65537
+ password 7 12090404011C03162E
+ vrf site-1
+ address-family ipv4 unicast
+ local-as 200
+ log-neighbor-changes
+ neighbor 192.0.2.10
+ affinity-group 170
+ remote-as 65538
+ description site-1-nbr-1
+ password 3 13D4D3549493D2877B1DC116EE27A6BE
+ vrf site-2
+ local-as 300
+ log-neighbor-changes
+ neighbor-down fib-accelerate
+ """
+ )
+ self.get_config.return_value = run_cfg
+ self.cfg_get_config.return_value = run_cfg
+
+ set_module_args(
+ dict(
+ config=dict(
+ as_number="65536",
+ router_id="198.51.100.2",
+ log_neighbor_changes=True,
+ maxas_limit=20,
+ neighbors=[
+ dict(
+ neighbor_address="198.51.100.20",
+ neighbor_affinity_group=dict(group_id=160),
+ remote_as="65537",
+ description="NBR-1",
+ low_memory=dict(exempt=True),
+ ),
+ dict(
+ neighbor_address="198.51.100.21",
+ remote_as="65537",
+ password=dict(
+ encryption=7, key="12090404011C03162E"
+ ),
+ ),
+ ],
+ vrfs=[
+ dict(
+ vrf="site-2",
+ local_as="300",
+ log_neighbor_changes=True,
+ neighbor_down=dict(fib_accelerate=True),
+ )
+ ],
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ result = self.execute_module(failed=True)
+
+ def test_nxos_bgp_global_replaced_failed_3(self):
+ run_cfg = dedent(
+ """\
+ router bgp 65536
+ log-neighbor-changes
+ maxas-limit 20
+ router-id 198.51.100.2
+ neighbor 198.51.100.20
+ remote-as 65537
+ affinity-group 161
+ description NBR-1
+ low-memory exempt
+ neighbor 198.51.100.21
+ remote-as 65537
+ password 7 12090404011C03162E
+ vrf site-1
+ local-as 200
+ log-neighbor-changes
+ neighbor 192.0.2.10
+ address-family ipv4 unicast
+ affinity-group 170
+ remote-as 65538
+ description site-1-nbr-1
+ password 3 13D4D3549493D2877B1DC116EE27A6BE
+ vrf site-2
+ local-as 300
+ log-neighbor-changes
+ neighbor-down fib-accelerate
+ """
+ )
+ self.get_config.return_value = run_cfg
+ self.cfg_get_config.return_value = run_cfg
+
+ set_module_args(
+ dict(
+ config=dict(
+ as_number="65536",
+ router_id="198.51.100.2",
+ log_neighbor_changes=True,
+ maxas_limit=20,
+ neighbors=[
+ dict(
+ neighbor_address="198.51.100.20",
+ neighbor_affinity_group=dict(group_id=160),
+ remote_as="65537",
+ description="NBR-1",
+ low_memory=dict(exempt=True),
+ ),
+ dict(
+ neighbor_address="198.51.100.21",
+ remote_as="65537",
+ password=dict(
+ encryption=7, key="12090404011C03162E"
+ ),
+ ),
+ ],
+ vrfs=[
+ dict(
+ vrf="site-1",
+ local_as="200",
+ log_neighbor_changes=True,
+ ),
+ dict(
+ vrf="site-2",
+ local_as="300",
+ log_neighbor_changes=True,
+ neighbor_down=dict(fib_accelerate=True),
+ ),
+ ],
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ result = self.execute_module(failed=True)
+
+ def test_nxos_bgp_global_deleted(self):
+ run_cfg = dedent(
+ """\
+ router bgp 65536
+ log-neighbor-changes
+ maxas-limit 20
+ router-id 198.51.100.2
+ neighbor 198.51.100.20
+ remote-as 65537
+ affinity-group 161
+ description NBR-1
+ low-memory exempt
+ neighbor 198.51.100.21
+ remote-as 65537
+ password 7 12090404011C03162E
+ vrf site-1
+ local-as 200
+ log-neighbor-changes
+ neighbor 192.0.2.10
+ affinity-group 170
+ remote-as 65538
+ description site-1-nbr-1
+ password 3 13D4D3549493D2877B1DC116EE27A6BE
+ vrf site-2
+ local-as 300
+ log-neighbor-changes
+ neighbor-down fib-accelerate
+ """
+ )
+ self.get_config.return_value = run_cfg
+ self.cfg_get_config.return_value = run_cfg
+
+ set_module_args(dict(state="deleted"), ignore_provider_arg)
+ commands = [
+ "router bgp 65536",
+ "no log-neighbor-changes",
+ "no maxas-limit 20",
+ "no router-id 198.51.100.2",
+ "no neighbor 198.51.100.20",
+ "no neighbor 198.51.100.21",
+ "no vrf site-1",
+ "no vrf site-2",
+ ]
+
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_bgp_global_deleted_idempotent_1(self):
+ run_cfg = dedent(
+ """\
+ """
+ )
+ self.get_config.return_value = run_cfg
+ self.cfg_get_config.return_value = run_cfg
+
+ set_module_args(dict(state="deleted"), ignore_provider_arg)
+
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_bgp_global_deleted_idempotent_2(self):
+ run_cfg = dedent(
+ """\
+ router bgp 65536
+ log-neighbor-changes
+ maxas-limit 20
+ router-id 198.51.100.2
+ neighbor 198.51.100.20
+ remote-as 65537
+ affinity-group 161
+ description NBR-1
+ low-memory exempt
+ neighbor 198.51.100.21
+ remote-as 65537
+ password 7 12090404011C03162E
+ vrf site-1
+ local-as 200
+ log-neighbor-changes
+ neighbor 192.0.2.10
+ affinity-group 170
+ remote-as 65538
+ description site-1-nbr-1
+ password 3 13D4D3549493D2877B1DC116EE27A6BE
+ vrf site-2
+ local-as 300
+ log-neighbor-changes
+ neighbor-down fib-accelerate
+ """
+ )
+ self.get_config.return_value = run_cfg
+ self.cfg_get_config.return_value = run_cfg
+
+ set_module_args(
+ dict(config=dict(as_number="65539"), state="deleted"),
+ ignore_provider_arg,
+ )
+
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_bgp_global_deleted_failed(self):
+ run_cfg = dedent(
+ """\
+ router bgp 65536
+ log-neighbor-changes
+ maxas-limit 20
+ router-id 198.51.100.2
+ neighbor 198.51.100.20
+ remote-as 65537
+ affinity-group 161
+ description NBR-1
+ low-memory exempt
+ neighbor 198.51.100.21
+ address-family ipv4 unicast
+ remote-as 65537
+ password 7 12090404011C03162E
+ vrf site-1
+ local-as 200
+ log-neighbor-changes
+ neighbor 192.0.2.10
+ affinity-group 170
+ remote-as 65538
+ description site-1-nbr-1
+ password 3 13D4D3549493D2877B1DC116EE27A6BE
+ vrf site-2
+ local-as 300
+ log-neighbor-changes
+ neighbor-down fib-accelerate
+ """
+ )
+ self.get_config.return_value = run_cfg
+ self.cfg_get_config.return_value = run_cfg
+
+ set_module_args(dict(state="deleted"), ignore_provider_arg)
+ result = self.execute_module(failed=True)
+
+ def test_nxos_bgp_global_purged(self):
+ run_cfg = dedent(
+ """\
+ router bgp 65536
+ log-neighbor-changes
+ maxas-limit 20
+ router-id 198.51.100.2
+ neighbor 198.51.100.20
+ remote-as 65537
+ affinity-group 161
+ description NBR-1
+ low-memory exempt
+ neighbor 198.51.100.21
+ remote-as 65537
+ password 7 12090404011C03162E
+ vrf site-1
+ local-as 200
+ log-neighbor-changes
+ neighbor 192.0.2.10
+ affinity-group 170
+ remote-as 65538
+ description site-1-nbr-1
+ password 3 13D4D3549493D2877B1DC116EE27A6BE
+ vrf site-2
+ local-as 300
+ log-neighbor-changes
+ neighbor-down fib-accelerate
+ """
+ )
+ self.get_config.return_value = run_cfg
+ self.cfg_get_config.return_value = run_cfg
+
+ set_module_args(dict(state="purged"), ignore_provider_arg)
+ commands = ["no router bgp 65536"]
+
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_bgp_global_purged_idempotent(self):
+ run_cfg = dedent(
+ """\
+ """
+ )
+ self.get_config.return_value = run_cfg
+ self.cfg_get_config.return_value = run_cfg
+
+ set_module_args(dict(state="purged"), ignore_provider_arg)
+
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_neighbor.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_neighbor.py
new file mode 100644
index 00000000..ebaa3852
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_neighbor.py
@@ -0,0 +1,155 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_bgp_neighbor
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosBgpNeighborModule(TestNxosModule):
+
+ module = nxos_bgp_neighbor
+
+ def setUp(self):
+ super(TestNxosBgpNeighborModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_bgp_neighbor.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_bgp_neighbor.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosBgpNeighborModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture("nxos_bgp", "config.cfg")
+ self.load_config.return_value = []
+
+ def test_nxos_bgp_neighbor_bfd_1(self):
+ # None (disable) -> enable
+ set_module_args(dict(asn=65535, neighbor="1.1.1.1", bfd="enable"))
+ self.execute_module(
+ changed=True,
+ commands=["router bgp 65535", "neighbor 1.1.1.1", "bfd"],
+ )
+
+ # enable -> enable (idempotence)
+ set_module_args(dict(asn=65535, neighbor="1.1.1.2", bfd="enable"))
+ self.execute_module(changed=False)
+
+ def test_nxos_bgp_neighbor_bfd_2(self):
+ # enable -> None (disable)
+ set_module_args(dict(asn=65535, neighbor="1.1.1.2", bfd="disable"))
+ self.execute_module(
+ changed=True,
+ commands=["router bgp 65535", "neighbor 1.1.1.2", "no bfd"],
+ )
+
+ # None (disable) -> disable (idempotence)
+ set_module_args(dict(asn=65535, neighbor="1.1.1.1", bfd="disable"))
+ self.execute_module(changed=False)
+
+ def test_nxos_bgp_neighbor(self):
+ set_module_args(
+ dict(asn=65535, neighbor="192.0.2.3", description="some words")
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "router bgp 65535",
+ "neighbor 192.0.2.3",
+ "description some words",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_absent(self):
+ set_module_args(dict(asn=65535, neighbor="1.1.1.1", state="absent"))
+ self.execute_module(
+ changed=True, commands=["router bgp 65535", "no neighbor 1.1.1.1"]
+ )
+
+ def test_nxos_bgp_neighbor_remove_private_as(self):
+ set_module_args(
+ dict(asn=65535, neighbor="3.3.3.4", remove_private_as="all")
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_bgp_neighbor_remove_private_as_changed(self):
+ set_module_args(
+ dict(asn=65535, neighbor="3.3.3.4", remove_private_as="replace-as")
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "router bgp 65535",
+ "neighbor 3.3.3.4",
+ "remove-private-as replace-as",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_peertype_border_leaf(self):
+ set_module_args(
+ dict(
+ asn=65535, neighbor="192.0.2.3", peer_type="fabric_border_leaf"
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "router bgp 65535",
+ "neighbor 192.0.2.3",
+ "peer-type fabric-border-leaf",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_peertype_external(self):
+ set_module_args(
+ dict(asn=65535, neighbor="192.0.2.3", peer_type="fabric_external")
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "router bgp 65535",
+ "neighbor 192.0.2.3",
+ "peer-type fabric-external",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_peertype_border_leaf_exists(self):
+ set_module_args(
+ dict(asn=65535, neighbor="5.5.5.5", peer_type="fabric_border_leaf")
+ )
+ self.execute_module(changed=False)
+
+ def test_nxos_bgp_neighbor_peertype_external_exists(self):
+ set_module_args(
+ dict(asn=65535, neighbor="6.6.6.6", peer_type="fabric_external")
+ )
+ self.execute_module(changed=False)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_neighbor_af.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_neighbor_af.py
new file mode 100644
index 00000000..daeea18e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_bgp_neighbor_af.py
@@ -0,0 +1,260 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_bgp_neighbor_af
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosBgpNeighborAfModule(TestNxosModule):
+
+ module = nxos_bgp_neighbor_af
+
+ def setUp(self):
+ super(TestNxosBgpNeighborAfModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_bgp_neighbor_af.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_bgp_neighbor_af.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosBgpNeighborAfModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture("nxos_bgp", "config.cfg")
+ self.load_config.return_value = []
+
+ def test_nxos_bgp_neighbor_af(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ neighbor="192.0.2.3",
+ afi="ipv4",
+ safi="unicast",
+ route_reflector_client=True,
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "router bgp 65535",
+ "neighbor 192.0.2.3",
+ "address-family ipv4 unicast",
+ "route-reflector-client",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_af_exists(self):
+ set_module_args(
+ dict(asn=65535, neighbor="3.3.3.5", afi="ipv4", safi="unicast")
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_bgp_neighbor_af_absent(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ neighbor="3.3.3.5",
+ afi="ipv4",
+ safi="unicast",
+ state="absent",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ sort=False,
+ commands=[
+ "router bgp 65535",
+ "neighbor 3.3.3.5",
+ "no address-family ipv4 unicast",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_af_advertise_map(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ neighbor="3.3.3.5",
+ afi="ipv4",
+ safi="unicast",
+ advertise_map_exist=["my_advertise_map", "my_exist_map"],
+ )
+ )
+ self.execute_module(
+ changed=True,
+ sort=False,
+ commands=[
+ "router bgp 65535",
+ "neighbor 3.3.3.5",
+ "address-family ipv4 unicast",
+ "advertise-map my_advertise_map exist-map my_exist_map",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_af_advertise_map_non_exist(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ neighbor="3.3.3.5",
+ afi="ipv4",
+ safi="unicast",
+ advertise_map_non_exist=[
+ "my_advertise_map",
+ "my_non_exist_map",
+ ],
+ )
+ )
+ self.execute_module(
+ changed=True,
+ sort=False,
+ commands=[
+ "router bgp 65535",
+ "neighbor 3.3.3.5",
+ "address-family ipv4 unicast",
+ "advertise-map my_advertise_map non-exist-map my_non_exist_map",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_af_max_prefix_limit_default(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ neighbor="3.3.3.5",
+ afi="ipv4",
+ safi="unicast",
+ max_prefix_limit="default",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ sort=False,
+ commands=[
+ "router bgp 65535",
+ "neighbor 3.3.3.5",
+ "address-family ipv4 unicast",
+ "no maximum-prefix",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_af_max_prefix(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ neighbor="3.3.3.5",
+ afi="ipv4",
+ safi="unicast",
+ max_prefix_threshold=20,
+ max_prefix_limit=20,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ sort=False,
+ commands=[
+ "router bgp 65535",
+ "neighbor 3.3.3.5",
+ "address-family ipv4 unicast",
+ "maximum-prefix 20 20",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_af_disable_peer_as_check(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ neighbor="3.3.3.5",
+ afi="ipv4",
+ safi="unicast",
+ disable_peer_as_check=True,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "router bgp 65535",
+ "neighbor 3.3.3.5",
+ "address-family ipv4 unicast",
+ "disable-peer-as-check",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_af_rewrite_evpn(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ neighbor="30.30.30.5",
+ afi="l2vpn",
+ safi="evpn",
+ rewrite_evpn_rt_asn=True,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "router bgp 65535",
+ "neighbor 30.30.30.5",
+ "address-family l2vpn evpn",
+ "rewrite-evpn-rt-asn",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_af_rewrite_evpn_disable(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ neighbor="30.30.30.5",
+ afi="l2vpn",
+ safi="evpn",
+ rewrite_evpn_rt_asn=False,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "router bgp 65535",
+ "neighbor 30.30.30.5",
+ "address-family l2vpn evpn",
+ "no rewrite-evpn-rt-asn",
+ ],
+ )
+
+ def test_nxos_bgp_neighbor_af_rewrite_evpn_exists(self):
+ set_module_args(
+ dict(
+ asn=65535,
+ neighbor="7.7.7.7",
+ afi="l2vpn",
+ safi="evpn",
+ rewrite_evpn_rt_asn=True,
+ )
+ )
+ self.execute_module(changed=False, commands=[])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_command.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_command.py
new file mode 100644
index 00000000..af27c64d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_command.py
@@ -0,0 +1,124 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_command
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosCommandModule(TestNxosModule):
+
+ module = nxos_command
+
+ def setUp(self):
+ super(TestNxosCommandModule, self).setUp()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_command.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ def tearDown(self):
+ super(TestNxosCommandModule, self).tearDown()
+ self.mock_run_commands.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+
+ for item in commands:
+ try:
+ obj = json.loads(item["command"])
+ command = obj["command"]
+ except ValueError:
+ command = item["command"]
+ filename = "%s.txt" % str(command).replace(" ", "_")
+ output.append(load_fixture("nxos_command", filename))
+ return output
+
+ self.run_commands.side_effect = load_from_file
+
+ def test_nxos_command_simple(self):
+ set_module_args(dict(commands=["show version"]))
+ result = self.execute_module()
+ self.assertEqual(len(result["stdout"]), 1)
+ self.assertTrue(result["stdout"][0].startswith("Cisco"))
+
+ def test_nxos_command_multiple(self):
+ set_module_args(dict(commands=["show version", "show version"]))
+ result = self.execute_module()
+ self.assertEqual(len(result["stdout"]), 2)
+ self.assertTrue(result["stdout"][0].startswith("Cisco"))
+
+ def test_nxos_command_wait_for(self):
+ wait_for = 'result[0] contains "NX-OS"'
+ set_module_args(dict(commands=["show version"], wait_for=wait_for))
+ self.execute_module()
+
+ def test_nxos_command_wait_for_fails(self):
+ wait_for = 'result[0] contains "test string"'
+ set_module_args(dict(commands=["show version"], wait_for=wait_for))
+ self.execute_module(failed=True)
+ self.assertEqual(self.run_commands.call_count, 10)
+
+ def test_nxos_command_retries(self):
+ wait_for = 'result[0] contains "test string"'
+ set_module_args(
+ dict(commands=["show version"], wait_for=wait_for, retries=2)
+ )
+ self.execute_module(failed=True)
+ self.assertEqual(self.run_commands.call_count, 2)
+
+ def test_nxos_command_match_any(self):
+ wait_for = [
+ 'result[0] contains "Cisco"',
+ 'result[0] contains "test string"',
+ ]
+ set_module_args(
+ dict(commands=["show version"], wait_for=wait_for, match="any")
+ )
+ self.execute_module()
+
+ def test_nxos_command_match_all(self):
+ wait_for = [
+ 'result[0] contains "Cisco"',
+ 'result[0] contains "image file"',
+ ]
+ set_module_args(
+ dict(commands=["show version"], wait_for=wait_for, match="all")
+ )
+ self.execute_module()
+
+ def test_nxos_command_match_all_failure(self):
+ wait_for = [
+ 'result[0] contains "Cisco"',
+ 'result[0] contains "test string"',
+ ]
+ commands = ["show version", "show version"]
+ set_module_args(
+ dict(commands=commands, wait_for=wait_for, match="all")
+ )
+ self.execute_module(failed=True)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_config.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_config.py
new file mode 100644
index 00000000..ec51d19f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_config.py
@@ -0,0 +1,295 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import (
+ patch,
+ MagicMock,
+)
+from ansible_collections.cisco.nxos.plugins.modules import nxos_config
+from ansible_collections.cisco.nxos.plugins.cliconf.nxos import Cliconf
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosConfigModule(TestNxosModule):
+
+ module = nxos_config
+
+ def setUp(self):
+ super(TestNxosConfigModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_save_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_config.save_config"
+ )
+ self.save_config = self.mock_save_config.start()
+
+ self.mock_get_connection = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_config.get_connection"
+ )
+ self.get_connection = self.mock_get_connection.start()
+
+ self.conn = self.get_connection()
+ self.conn.edit_config = MagicMock()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_config.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.cliconf_obj = Cliconf(MagicMock())
+ self.running_config = load_fixture("nxos_config", "config.cfg")
+
+ def tearDown(self):
+ super(TestNxosConfigModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_run_commands.stop()
+ self.mock_get_connection.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture(
+ "nxos_config", "config.cfg"
+ )
+ self.load_config.return_value = None
+
+ def test_nxos_config_no_change(self):
+ lines = ["hostname localhost"]
+ args = dict(lines=lines)
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ set_module_args(args)
+ result = self.execute_module()
+
+ def test_nxos_config_src(self):
+ src = load_fixture("nxos_config", "candidate.cfg")
+ args = dict(src=src)
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(src, self.running_config)
+ )
+ set_module_args(args)
+
+ result = self.execute_module(changed=True)
+ config = [
+ "hostname switch01",
+ "interface Ethernet1",
+ "description test interface",
+ "no shutdown",
+ "ip routing",
+ ]
+
+ self.assertEqual(
+ sorted(config), sorted(result["commands"]), result["commands"]
+ )
+
+ def test_nxos_config_replace_src(self):
+ set_module_args(dict(replace_src="bootflash:config", replace="config"))
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ self.running_config, self.running_config, diff_replace="config"
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"], ["config replace bootflash:config"]
+ )
+
+ def test_nxos_config_lines(self):
+ lines = ["hostname switch01", "ip domain-name eng.ansible.com"]
+ args = dict(lines=lines)
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ set_module_args(args)
+
+ result = self.execute_module(changed=True)
+ config = ["hostname switch01"]
+
+ self.assertEqual(
+ sorted(config), sorted(result["commands"]), result["commands"]
+ )
+
+ def test_nxos_config_before(self):
+ lines = ["hostname switch01", "ip domain-name eng.ansible.com"]
+ args = dict(lines=lines, before=["before command"])
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ set_module_args(args)
+
+ result = self.execute_module(changed=True)
+ config = ["before command", "hostname switch01"]
+
+ self.assertEqual(
+ sorted(config), sorted(result["commands"]), result["commands"]
+ )
+ self.assertEqual("before command", result["commands"][0])
+
+ def test_nxos_config_after(self):
+ lines = ["hostname switch01", "ip domain-name eng.ansible.com"]
+ args = dict(lines=lines, after=["after command"])
+
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(lines), self.running_config
+ )
+ )
+ set_module_args(args)
+
+ result = self.execute_module(changed=True)
+ config = ["after command", "hostname switch01"]
+
+ self.assertEqual(
+ sorted(config), sorted(result["commands"]), result["commands"]
+ )
+ self.assertEqual("after command", result["commands"][-1])
+
+ def test_nxos_config_parents(self):
+ lines = ["ip address 1.2.3.4/5", "no shutdown"]
+ parents = ["interface Ethernet10"]
+ args = dict(lines=lines, parents=parents)
+ self.conn.get_diff = MagicMock(
+ return_value=self.cliconf_obj.get_diff(
+ "\n".join(parents + lines), self.running_config, path=parents
+ )
+ )
+ set_module_args(args)
+
+ result = self.execute_module(changed=True)
+ config = [
+ "interface Ethernet10",
+ "ip address 1.2.3.4/5",
+ "no shutdown",
+ ]
+
+ self.assertEqual(config, result["commands"], result["commands"])
+
+ def test_nxos_config_src_and_lines_fails(self):
+ args = dict(src="foo", lines="foo")
+ set_module_args(args)
+ result = self.execute_module(failed=True)
+
+ def test_nxos_config_src_and_parents_fails(self):
+ args = dict(src="foo", parents="foo")
+ set_module_args(args)
+ result = self.execute_module(failed=True)
+
+ def test_nxos_config_match_exact_requires_lines(self):
+ args = dict(match="exact")
+ set_module_args(args)
+ result = self.execute_module(failed=True)
+
+ def test_nxos_config_match_strict_requires_lines(self):
+ args = dict(match="strict")
+ set_module_args(args)
+ result = self.execute_module(failed=True)
+
+ def test_nxos_config_replace_block_requires_lines(self):
+ args = dict(replace="block")
+ set_module_args(args)
+ result = self.execute_module(failed=True)
+
+ def test_nxos_config_replace_config_requires_src(self):
+ args = dict(replace="config")
+ set_module_args(args)
+ result = self.execute_module(failed=True)
+
+ def test_nxos_config_backup_returns__backup__(self):
+ args = dict(backup=True)
+ set_module_args(args)
+ result = self.execute_module()
+ self.assertIn("__backup__", result)
+
+ def test_nxos_config_save_always(self):
+ args = dict(save_when="always")
+ set_module_args(args)
+ self.execute_module()
+ self.assertEqual(self.save_config.call_count, 1)
+ self.assertEqual(self.get_config.call_count, 0)
+ self.assertEqual(self.load_config.call_count, 0)
+
+ def test_nxos_config_save_changed_true(self):
+ args = dict(
+ save_when="changed",
+ lines=[
+ "hostname foo",
+ "interface GigabitEthernet0/0",
+ "no ip address",
+ ],
+ )
+ set_module_args(args)
+ self.execute_module(changed=True)
+ self.assertEqual(self.save_config.call_count, 1)
+ self.assertEqual(self.get_config.call_count, 1)
+ self.assertEqual(self.load_config.call_count, 1)
+
+ def test_nxos_config_save_changed_false(self):
+ args = dict(save_when="changed")
+ set_module_args(args)
+ self.execute_module()
+ self.assertEqual(self.save_config.call_count, 0)
+ self.assertEqual(self.get_config.call_count, 0)
+ self.assertEqual(self.load_config.call_count, 0)
+
+ def test_nxos_config_defaults_false(self):
+ set_module_args(dict(lines=["hostname localhost"], defaults=False))
+ result = self.execute_module(changed=True)
+ self.assertEqual(self.get_config.call_count, 1)
+ self.assertEqual(self.get_config.call_args[1], dict(flags=[]))
+
+ def test_nxos_config_defaults_true(self):
+ set_module_args(dict(lines=["hostname localhost"], defaults=True))
+ result = self.execute_module(changed=True)
+ self.assertEqual(self.get_config.call_count, 1)
+ self.assertEqual(self.get_config.call_args[1], dict(flags=["all"]))
+
+ def test_nxos_config_defaults_false_backup_true(self):
+ set_module_args(
+ dict(lines=["hostname localhost"], defaults=False, backup=True)
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(self.get_config.call_count, 1)
+ self.assertEqual(self.get_config.call_args[1], dict(flags=[]))
+
+ def test_nxos_config_defaults_true_backup_true(self):
+ set_module_args(
+ dict(lines=["hostname localhost"], defaults=True, backup=True)
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(self.get_config.call_count, 1)
+ self.assertEqual(self.get_config.call_args[1], dict(flags=["all"]))
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_evpn_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_evpn_global.py
new file mode 100644
index 00000000..2f926f6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_evpn_global.py
@@ -0,0 +1,81 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_evpn_global
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosEvpnGlobalModule(TestNxosModule):
+
+ module = nxos_evpn_global
+
+ def setUp(self):
+ super(TestNxosEvpnGlobalModule, self).setUp()
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_evpn_global.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_evpn_global.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_capabilities = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_evpn_global.get_capabilities"
+ )
+ self.get_capabilities = self.mock_get_capabilities.start()
+ self.get_capabilities.return_value = {"network_api": "cliconf"}
+
+ def tearDown(self):
+ super(TestNxosEvpnGlobalModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_get_capabilities.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.load_config.return_value = None
+
+ def start_configured(self, *args, **kwargs):
+ self.get_config.return_value = load_fixture(
+ "nxos_evpn_global", "configured.cfg"
+ )
+ return self.execute_module(*args, **kwargs)
+
+ def start_unconfigured(self, *args, **kwargs):
+ self.get_config.return_value = load_fixture(
+ "nxos_evpn_global", "unconfigured.cfg"
+ )
+ return self.execute_module(*args, **kwargs)
+
+ def test_nxos_evpn_global_enable(self):
+ set_module_args(dict(nv_overlay_evpn=True))
+ commands = ["nv overlay evpn"]
+ self.start_unconfigured(changed=True, commands=commands)
+
+ def test_nxos_evpn_global_disable(self):
+ set_module_args(dict(nv_overlay_evpn=False))
+ commands = ["no nv overlay evpn"]
+ self.start_configured(changed=True, commands=commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_evpn_vni.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_evpn_vni.py
new file mode 100644
index 00000000..53e23d48
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_evpn_vni.py
@@ -0,0 +1,80 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_evpn_vni
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosEvpnVniModule(TestNxosModule):
+
+ module = nxos_evpn_vni
+
+ def setUp(self):
+ super(TestNxosEvpnVniModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_evpn_vni.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_evpn_vni.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosEvpnVniModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture(
+ "", "nxos_evpn_vni_config.cfg"
+ )
+ self.load_config.return_value = None
+
+ def test_nxos_evpn_vni_present(self):
+ set_module_args(
+ dict(vni="6000", route_target_import="5000:10", state="present")
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "evpn",
+ "vni 6000 l2",
+ "route-target import 5000:10",
+ "no route-target import auto",
+ ],
+ )
+
+ def test_nxos_evpn_vni_absent_not_existing(self):
+ set_module_args(dict(vni="12000", state="absent"))
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_evpn_vni_absent_existing(self):
+ set_module_args(dict(vni="6000", state="absent"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["evpn", "no vni 6000 l2"])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_feature.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_feature.py
new file mode 100644
index 00000000..ff09149a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_feature.py
@@ -0,0 +1,96 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_feature
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosFeatureModule(TestNxosModule):
+
+ module = nxos_feature
+
+ def setUp(self):
+ super(TestNxosFeatureModule, self).setUp()
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_feature.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_feature.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_feature.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_get_capabilities = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_feature.get_capabilities"
+ )
+ self.get_capabilities = self.mock_get_capabilities.start()
+ self.get_capabilities.return_value = {"network_api": "cliconf"}
+
+ def tearDown(self):
+ super(TestNxosFeatureModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+ self.mock_get_capabilities.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+
+ for item in commands:
+ try:
+ obj = json.loads(item["command"])
+ command = obj["command"]
+ except ValueError:
+ command = item["command"]
+ filename = "%s.txt" % str(command).replace(" ", "_")
+ output.append(load_fixture("nxos_feature", filename))
+ return output
+
+ self.run_commands.side_effect = load_from_file
+ self.get_config.return_value = ""
+ self.load_config.return_value = None
+
+ def test_nxos_feature_enable(self):
+ set_module_args(dict(feature="nve", state="enabled"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"], ["terminal dont-ask", "feature nv overlay"]
+ )
+
+ def test_nxos_feature_disable(self):
+ set_module_args(dict(feature="ospf", state="disabled"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"], ["terminal dont-ask", "no feature ospf"]
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_hsrp.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_hsrp.py
new file mode 100644
index 00000000..3c125c85
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_hsrp.py
@@ -0,0 +1,84 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_hsrp
+from .nxos_module import TestNxosModule, set_module_args
+
+
+class TestNxosHsrpModule(TestNxosModule):
+
+ module = nxos_hsrp
+
+ def setUp(self):
+ super(TestNxosHsrpModule, self).setUp()
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_hsrp.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_hsrp.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_capabilities = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_hsrp.get_capabilities"
+ )
+ self.get_capabilities = self.mock_get_capabilities.start()
+ self.get_capabilities.return_value = {"network_api": "cliconf"}
+
+ def tearDown(self):
+ super(TestNxosHsrpModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_load_config.stop()
+ self.mock_get_capabilities.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.load_config.return_value = None
+
+ def test_nxos_hsrp(self):
+ set_module_args(
+ dict(
+ group="10",
+ vip="192.0.2.2/8",
+ priority="150",
+ interface="Ethernet1/2",
+ preempt="enabled",
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ sorted(result["commands"]),
+ sorted(
+ [
+ "config t",
+ "interface ethernet1/2",
+ "hsrp version 1",
+ "hsrp 10",
+ "priority 150",
+ "ip 192.0.2.2/8",
+ "preempt",
+ ]
+ ),
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_hsrp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_hsrp_interfaces.py
new file mode 100644
index 00000000..2af403c6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_hsrp_interfaces.py
@@ -0,0 +1,351 @@
+# (c) 2019 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from textwrap import dedent
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules import nxos_hsrp_interfaces
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.hsrp_interfaces.hsrp_interfaces import (
+ Hsrp_interfaces,
+)
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+ignore_provider_arg = True
+
+
+class TestNxosHsrpInterfacesModule(TestNxosModule):
+
+ module = nxos_hsrp_interfaces
+
+ def setUp(self):
+ super(TestNxosHsrpInterfacesModule, self).setUp()
+
+ self.mock_FACT_LEGACY_SUBSETS = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS"
+ )
+ self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.hsrp_interfaces.hsrp_interfaces.Hsrp_interfaces.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ def tearDown(self):
+ super(TestNxosHsrpInterfacesModule, self).tearDown()
+ self.mock_FACT_LEGACY_SUBSETS.stop()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.mock_FACT_LEGACY_SUBSETS.return_value = dict()
+ self.get_resource_connection_config.return_value = None
+ self.edit_config.return_value = None
+
+ # ---------------------------
+ # Hsrp_interfaces Test Cases
+ # ---------------------------
+
+ # 'state' logic behaviors
+ #
+ # - 'merged' : Update existing device state with any differences in the play.
+ # - 'deleted' : Reset existing device state to default values. Ignores any
+ # play attrs other than 'name'. Scope is limited to interfaces
+ # in the play.
+ # - 'overridden': The play is the source of truth. Similar to replaced but the
+ # scope includes all interfaces; ie. it will also reset state
+ # on interfaces not found in the play.
+ # - 'replaced' : Scope is limited to the interfaces in the play.
+
+ SHOW_CMD = "show running-config | section ^interface"
+
+ def test_1(self):
+ # Setup: No HSRP BFD configs shown on device interfaces
+ existing = dedent(
+ """\
+ interface Ethernet1/1
+ interface Ethernet1/2
+ interface Ethernet1/3
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(name="Ethernet1/1", bfd="enable"),
+ dict(name="Ethernet1/2", bfd="disable"),
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = ["interface Ethernet1/1", "hsrp bfd"]
+ deleted = []
+ overridden = merged
+ replaced = merged
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=deleted)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ def test_2(self):
+ # Change existing HSRP configs
+ existing = dedent(
+ """\
+ interface Ethernet1/1
+ hsrp bfd
+ interface Ethernet1/2
+ hsrp bfd
+ interface Ethernet1/3
+ hsrp bfd
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(name="Ethernet1/1", bfd="disable"),
+ dict(name="Ethernet1/2"),
+ # Eth1/3 not present! Thus overridden should set Eth1/3 to defaults;
+ # replaced should ignore Eth1/3.
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = ["interface Ethernet1/1", "no hsrp bfd"]
+ deleted = [
+ "interface Ethernet1/1",
+ "no hsrp bfd",
+ "interface Ethernet1/2",
+ "no hsrp bfd",
+ ]
+ overridden = [
+ "interface Ethernet1/3",
+ "no hsrp bfd",
+ "interface Ethernet1/1",
+ "no hsrp bfd",
+ "interface Ethernet1/2",
+ "no hsrp bfd",
+ ]
+ replaced = [
+ "interface Ethernet1/1",
+ "no hsrp bfd",
+ "interface Ethernet1/2",
+ "no hsrp bfd",
+ ]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ def test_3(self):
+ # Device has hsrp bfd configs, playbook has no values
+ existing = dedent(
+ """\
+ interface Ethernet1/1
+ hsrp bfd
+ interface Ethernet1/2
+ hsrp bfd
+ interface Ethernet1/3
+ hsrp bfd
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[dict(name="Ethernet1/1"), dict(name="Ethernet1/2")]
+ )
+ # Expected result commands for each 'state'
+ merged = []
+ deleted = [
+ "interface Ethernet1/1",
+ "no hsrp bfd",
+ "interface Ethernet1/2",
+ "no hsrp bfd",
+ ]
+ overridden = [
+ "interface Ethernet1/3",
+ "no hsrp bfd",
+ "interface Ethernet1/1",
+ "no hsrp bfd",
+ "interface Ethernet1/2",
+ "no hsrp bfd",
+ ]
+ replaced = [
+ "interface Ethernet1/1",
+ "no hsrp bfd",
+ "interface Ethernet1/2",
+ "no hsrp bfd",
+ ]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ def test_4(self):
+ # Test with interface that doesn't exist yet
+ existing = dedent(
+ """\
+ interface Ethernet1/1
+ hsrp bfd
+ interface Ethernet1/2
+ hsrp bfd
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(config=[dict(name="Ethernet1/1.42", bfd="enable")])
+ # Expected result commands for each 'state'
+ merged = ["interface Ethernet1/1.42", "hsrp bfd"]
+ deleted = []
+ overridden = [
+ "interface Ethernet1/1.42",
+ "hsrp bfd",
+ "interface Ethernet1/1",
+ "no hsrp bfd",
+ "interface Ethernet1/2",
+ "no hsrp bfd",
+ ]
+ replaced = ["interface Ethernet1/1.42", "hsrp bfd"]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=deleted)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ def test_5(self):
+ # idempotence
+ existing = dedent(
+ """\
+ interface Ethernet1/1
+ hsrp bfd
+ interface Ethernet1/2
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(name="Ethernet1/1", bfd="enable"),
+ dict(name="Ethernet1/2", bfd="disable"),
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = []
+ deleted = ["interface Ethernet1/1", "no hsrp bfd"]
+ overridden = []
+ replaced = []
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=overridden)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=replaced)
+
+
+def build_args(data, type, state=None, check_mode=None):
+ if state is None:
+ state = "merged"
+ if check_mode is None:
+ check_mode = False
+ args = {
+ "state": state,
+ "_ansible_check_mode": check_mode,
+ "config": {type: data},
+ }
+ return args
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_interface.py
new file mode 100644
index 00000000..e8e451d4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_interface.py
@@ -0,0 +1,116 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_interface
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosInterfaceModule(TestNxosModule):
+
+ module = nxos_interface
+
+ def setUp(self):
+ super(TestNxosInterfaceModule, self).setUp()
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_interface.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_interface.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestNxosInterfaceModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ module_name = self.module.__name__.rsplit(".", 1)[1]
+
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+
+ for command in commands:
+ if type(command) == dict:
+ command = command["command"]
+ filename = (
+ str(command)
+ .split(" | ")[0]
+ .replace(" ", "_")
+ .replace("/", "_")
+ )
+ print(filename)
+ output.append(load_fixture(module_name, filename))
+ return output
+
+ self.load_config.return_value = None
+ self.run_commands.side_effect = load_from_file
+
+ def test_nxos_interface_up(self):
+ set_module_args(dict(interface="loopback0"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"], ["interface loopback0", "no shutdown"]
+ )
+
+ def test_nxos_interface_down(self):
+ set_module_args(dict(interface="loopback0", admin_state="down"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"], ["interface loopback0", "shutdown"]
+ )
+
+ def test_nxos_interface_delete(self):
+ set_module_args(dict(interface="loopback0", state="absent"))
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_interface_type(self):
+ set_module_args(dict(interface_type="loopback", state="absent"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["no interface loopback0"])
+
+ def test_nxos_interface_mtu(self):
+ set_module_args(
+ dict(interface="Ethernet2/1", mode="layer2", mtu="1800")
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "interface Ethernet2/1",
+ "switchport",
+ "mtu 1800",
+ "interface Ethernet2/1",
+ "no shutdown",
+ ],
+ )
+
+ def test_nxos_interface_speed_idempotence(self):
+ set_module_args(dict(interface="Ethernet2/1", speed="1000"))
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_interface_ospf.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_interface_ospf.py
new file mode 100644
index 00000000..b1fa1157
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_interface_ospf.py
@@ -0,0 +1,296 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_interface_ospf
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosInterfaceOspfModule(TestNxosModule):
+
+ module = nxos_interface_ospf
+
+ def setUp(self):
+ super(TestNxosInterfaceOspfModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_interface_ospf.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_interface_ospf.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestNxosInterfaceOspfModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ module_name = self.module.__name__.rsplit(".", 1)[1]
+ self.get_config.return_value = load_fixture(module_name, "config.cfg")
+ self.load_config.return_value = None
+
+ def test_nxos_interface_ospf(self):
+ set_module_args(dict(interface="ethernet1/32", ospf=1, area=1))
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface Ethernet1/32",
+ "ip router ospf 1 area 0.0.0.1",
+ ],
+ )
+
+ def test_bfd_1(self):
+ # default -> enable
+ set_module_args(
+ dict(interface="ethernet1/33", ospf=1, area=1, bfd="enable")
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface Ethernet1/33",
+ "ip router ospf 1 area 0.0.0.1",
+ "ip ospf bfd",
+ ],
+ )
+
+ # default -> disable
+ set_module_args(
+ dict(interface="ethernet1/33", ospf=1, area=1, bfd="disable")
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface Ethernet1/33",
+ "ip router ospf 1 area 0.0.0.1",
+ "ip ospf bfd disable",
+ ],
+ )
+
+ def test_bfd_2(self):
+ # default -> default
+ set_module_args(
+ dict(interface="ethernet1/33.101", ospf=1, area=1, bfd="default")
+ )
+ self.execute_module(changed=False)
+
+ # enable -> default
+ set_module_args(
+ dict(interface="ethernet1/36", ospf=1, area=1, bfd="default")
+ )
+ self.execute_module(
+ changed=True, commands=["interface Ethernet1/36", "no ip ospf bfd"]
+ )
+
+ # disable -> default
+ set_module_args(
+ dict(interface="ethernet1/37", ospf=1, area=1, bfd="default")
+ )
+ self.execute_module(
+ changed=True, commands=["interface Ethernet1/37", "no ip ospf bfd"]
+ )
+
+ def test_bfd_3(self):
+ # enable -> idempotence
+ set_module_args(
+ dict(interface="ethernet1/36", ospf=1, area=1, bfd="enable")
+ )
+ self.execute_module(changed=False)
+
+ # disable -> idempotence
+ set_module_args(
+ dict(interface="ethernet1/37", ospf=1, area=1, bfd="disable")
+ )
+ self.execute_module(changed=False)
+
+ def test_bfd_4(self):
+ # None -> absent
+ set_module_args(
+ dict(interface="ethernet1/33.101", ospf=1, area=1, state="absent")
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface Ethernet1/33.101",
+ "no ip router ospf 1 area 0.0.0.1",
+ ],
+ )
+
+ # enable -> absent
+ set_module_args(
+ dict(
+ interface="ethernet1/36",
+ ospf=1,
+ area=1,
+ bfd="enable",
+ state="absent",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface Ethernet1/36",
+ "no ip router ospf 1 area 0.0.0.1",
+ "no ip ospf bfd",
+ ],
+ )
+
+ # disable -> absent
+ set_module_args(
+ dict(
+ interface="ethernet1/37",
+ ospf=1,
+ area=1,
+ bfd="disable",
+ state="absent",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface Ethernet1/37",
+ "no ip router ospf 1 area 0.0.0.1",
+ "no ip ospf bfd",
+ ],
+ )
+
+ def test_absent_1(self):
+ # area only -> absent
+ set_module_args(
+ dict(interface="ethernet1/33.101", ospf=1, area=1, state="absent")
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface Ethernet1/33.101",
+ "no ip router ospf 1 area 0.0.0.1",
+ ],
+ )
+
+ # None -> absent
+ set_module_args(
+ dict(interface="ethernet1/33", ospf=1, area=1, state="absent")
+ )
+ self.execute_module(changed=False)
+
+ def test_loopback_interface_failed(self):
+ set_module_args(
+ dict(interface="loopback0", ospf=1, area=0, passive_interface=True)
+ )
+ self.execute_module(failed=True, changed=False)
+ set_module_args(
+ dict(interface="loopback0", ospf=1, area=0, network="broadcast")
+ )
+ self.execute_module(failed=True, changed=False)
+
+ def test_nxos_interface_ospf_passive(self):
+ # default -> True
+ set_module_args(
+ dict(
+ interface="ethernet1/33",
+ ospf=1,
+ area=1,
+ passive_interface=True,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface Ethernet1/33",
+ "ip router ospf 1 area 0.0.0.1",
+ "ip ospf passive-interface",
+ ],
+ )
+ # default -> False
+ set_module_args(
+ dict(
+ interface="ethernet1/33",
+ ospf=1,
+ area=1,
+ passive_interface=False,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface Ethernet1/33",
+ "ip router ospf 1 area 0.0.0.1",
+ "no ip ospf passive-interface",
+ ],
+ )
+ # True -> False
+ set_module_args(
+ dict(
+ interface="ethernet1/34",
+ ospf=1,
+ area=1,
+ passive_interface=False,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface Ethernet1/34",
+ "no ip ospf passive-interface",
+ ],
+ )
+ # True -> default (absent)
+ set_module_args(
+ dict(interface="ethernet1/34", ospf=1, area=1, state="absent")
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface Ethernet1/34",
+ "no ip router ospf 1 area 0.0.0.1",
+ "default ip ospf passive-interface",
+ ],
+ )
+ # False -> True
+ set_module_args(
+ dict(
+ interface="ethernet1/35",
+ ospf=1,
+ area=1,
+ passive_interface=True,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=["interface Ethernet1/35", "ip ospf passive-interface"],
+ )
+ # False -> default (absent)
+ set_module_args(
+ dict(interface="ethernet1/35", ospf=1, area=1, state="absent")
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface Ethernet1/35",
+ "no ip router ospf 1 area 0.0.0.1",
+ "default ip ospf passive-interface",
+ ],
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_interfaces.py
new file mode 100644
index 00000000..ef76b6b4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_interfaces.py
@@ -0,0 +1,681 @@
+# (c) 2019 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from textwrap import dedent
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules import nxos_interfaces
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.interfaces.interfaces import (
+ Interfaces,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.interfaces.interfaces import (
+ InterfacesFacts,
+)
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+ignore_provider_arg = True
+
+
+class TestNxosInterfacesModule(TestNxosModule):
+
+ module = nxos_interfaces
+
+ def setUp(self):
+ super(TestNxosInterfacesModule, self).setUp()
+
+ self.mock_FACT_LEGACY_SUBSETS = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS"
+ )
+ self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.interfaces.interfaces.Interfaces.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_get_system_defaults = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.interfaces.interfaces.Interfaces.get_system_defaults"
+ )
+ self.get_system_defaults = self.mock_get_system_defaults.start()
+
+ self.mock_get_platform = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.interfaces.interfaces.Interfaces.get_platform"
+ )
+ self.get_platform = self.mock_get_platform.start()
+
+ def tearDown(self):
+ super(TestNxosInterfacesModule, self).tearDown()
+ self.mock_FACT_LEGACY_SUBSETS.stop()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_system_defaults.stop()
+ self.mock_get_platform.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.mock_FACT_LEGACY_SUBSETS.return_value = dict()
+ self.get_resource_connection_config.return_value = None
+ self.edit_config.return_value = None
+ if device == "legacy":
+ # call execute_module() with device='legacy' to use this codepath
+ self.get_platform.return_value = "N3K-Cxxx"
+ else:
+ self.get_platform.return_value = "N9K-Cxxx"
+
+ SHOW_RUN_INTF = "show running-config | section ^interface"
+
+ def test_1(self):
+ # Overall general test for each state: merged, deleted, overridden, replaced
+ sysdefs = dedent(
+ """\
+ !
+ ! Interfaces default to L3 !!
+ !
+ no system default switchport
+ no system default switchport shutdown
+ """
+ )
+ intf = dedent(
+ """\
+ interface mgmt0
+ description do not manage mgmt0!
+ interface Ethernet1/1
+ description foo
+ interface Ethernet1/2
+ description bar
+ speed 1000
+ duplex full
+ mtu 4096
+ ip forward
+ fabric forwarding mode anycast-gateway
+ interface Ethernet1/3
+ interface Ethernet1/4
+ interface Ethernet1/5
+ interface Ethernet1/6
+ no shutdown
+ interface loopback0
+ description test-loopback
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_RUN_INTF: intf
+ }
+ self.get_system_defaults.return_value = sysdefs
+
+ playbook = dict(
+ config=[
+ dict(name="Ethernet1/1", description="ansible", mode="layer3"),
+ dict(
+ name="Ethernet1/2",
+ speed=10000,
+ duplex="auto",
+ mtu=1500,
+ ip_forward=False,
+ fabric_forwarding_anycast_gateway=False,
+ ),
+ dict(name="Ethernet1/3", description="ansible", mode="layer3"),
+ dict(
+ name="Ethernet1/3.101",
+ description="test-sub-intf",
+ enabled=False,
+ ),
+ dict(name="Ethernet1/4", mode="layer2"),
+ dict(name="Ethernet1/5"),
+ dict(name="loopback1", description="test-loopback"),
+ ]
+ )
+ merged = [
+ # Update existing device states with any differences in the playbook.
+ "interface Ethernet1/1",
+ "description ansible",
+ "interface Ethernet1/2",
+ "speed 10000",
+ "duplex auto",
+ "mtu 1500",
+ "no ip forward",
+ "no fabric forwarding mode anycast-gateway",
+ "interface Ethernet1/3",
+ "description ansible",
+ "interface Ethernet1/3.101",
+ "description test-sub-intf",
+ "interface Ethernet1/4",
+ "switchport",
+ "interface loopback1",
+ "description test-loopback",
+ ]
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ deleted = [
+ # Reset existing device state to default values. Scope is limited to
+ # objects in the play. Ignores any play attrs other than 'name'.
+ "interface Ethernet1/1",
+ "no description",
+ "interface Ethernet1/2",
+ "no description",
+ "no speed",
+ "no duplex",
+ "no mtu",
+ "no ip forward",
+ "no fabric forwarding mode anycast-gateway",
+ ]
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ replaced = [
+ # Scope is limited to objects in the play. The play is the source of
+ # truth for the objects that are explicitly listed.
+ "interface Ethernet1/1",
+ "description ansible",
+ "interface Ethernet1/2",
+ "no description",
+ "no ip forward",
+ "no fabric forwarding mode anycast-gateway",
+ "speed 10000",
+ "duplex auto",
+ "mtu 1500",
+ "interface Ethernet1/3",
+ "description ansible",
+ "interface Ethernet1/3.101",
+ "description test-sub-intf",
+ "interface Ethernet1/4",
+ "switchport",
+ "interface loopback1",
+ "description test-loopback",
+ ]
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ overridden = [
+ # The play is the source of truth. Similar to replaced but the scope
+ # includes all objects on the device; i.e. it will also reset state
+ # on objects not found in the play.
+ "interface Ethernet1/1",
+ "description ansible",
+ "interface Ethernet1/2",
+ "no description",
+ "no ip forward",
+ "no fabric forwarding mode anycast-gateway",
+ "speed 10000",
+ "duplex auto",
+ "mtu 1500",
+ "interface Ethernet1/6",
+ "shutdown",
+ "interface loopback0",
+ "no description",
+ "interface Ethernet1/3",
+ "description ansible",
+ "interface Ethernet1/4",
+ "switchport",
+ "interface Ethernet1/3.101",
+ "description test-sub-intf",
+ "interface loopback1",
+ "description test-loopback",
+ "interface mgmt0",
+ "no description",
+ ]
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ def test_2(self):
+ # 'enabled'/shutdown behaviors are tricky:
+ # - different default states for different interface types for different
+ # platforms, based on 'system default switchport' settings
+ # - virtual interfaces may not exist yet
+ # - idempotence for interfaces with all default states
+ sysdefs = dedent(
+ """\
+ !
+ ! Interfaces default to L3 !!
+ !
+ no system default switchport
+ no system default switchport shutdown
+ """
+ )
+ intf = dedent(
+ """\
+ interface mgmt0
+ interface Ethernet1/1
+ interface Ethernet1/2
+ switchport
+ shutdown
+ interface Ethernet1/3
+ switchport
+ interface loopback1
+ interface loopback2
+ shutdown
+ interface loopback3
+ interface loopback8
+ interface loopback9
+ shutdown
+ interface port-channel2
+ interface port-channel3
+ shutdown
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_RUN_INTF: intf
+ }
+ self.get_system_defaults.return_value = sysdefs
+
+ playbook = dict(
+ config=[
+ # Set non-default states on existing objs
+ dict(name="Ethernet1/1", mode="layer3", enabled=True),
+ dict(name="loopback1", enabled=False),
+ # Set default states on existing objs
+ dict(name="Ethernet1/2", enabled=True),
+ dict(name="loopback2", enabled=True),
+ # Set explicit default state on existing objs (no chg)
+ dict(name="Ethernet1/3", enabled=True),
+ dict(name="loopback3", enabled=True),
+ dict(name="port-channel3", enabled=True),
+ # Set default state on non-existent objs; no state changes but need to create intf
+ dict(name="loopback4", enabled=True),
+ dict(name="port-channel4", enabled=True),
+ dict(name="Ethernet1/4.101"),
+ ]
+ )
+ # Testing with newer code version
+ merged = [
+ "interface Ethernet1/1",
+ "no shutdown",
+ "interface loopback1",
+ "shutdown",
+ "interface Ethernet1/2",
+ "no shutdown",
+ "interface loopback2",
+ "no shutdown",
+ "interface port-channel3",
+ "no shutdown",
+ "interface loopback4",
+ "interface port-channel4",
+ "interface Ethernet1/4.101",
+ ]
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ deleted = [
+ # e1/2 becomes L3 so enable default changes to false
+ "interface Ethernet1/2",
+ "no switchport",
+ "interface loopback2",
+ "no shutdown",
+ "interface Ethernet1/3",
+ "no switchport",
+ "interface port-channel3",
+ "no shutdown",
+ ]
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ replaced = [
+ "interface Ethernet1/1",
+ "no shutdown",
+ "interface loopback1",
+ "shutdown",
+ "interface Ethernet1/2",
+ "no switchport",
+ "no shutdown",
+ "interface loopback2",
+ "no shutdown",
+ "interface Ethernet1/3",
+ "no switchport",
+ "no shutdown",
+ "interface port-channel3",
+ "no shutdown",
+ "interface loopback4",
+ "interface port-channel4",
+ "interface Ethernet1/4.101",
+ ]
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ overridden = [
+ "interface Ethernet1/2",
+ "no switchport",
+ "no shutdown",
+ "interface Ethernet1/3",
+ "no switchport",
+ "no shutdown",
+ "interface loopback2",
+ "no shutdown",
+ "interface loopback9",
+ "no shutdown",
+ "interface port-channel3",
+ "no shutdown",
+ "interface Ethernet1/1",
+ "no shutdown",
+ "interface loopback1",
+ "shutdown",
+ "interface loopback4",
+ "interface port-channel4",
+ "interface Ethernet1/4.101",
+ ]
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ def test_3(self):
+ # Testing 'enabled' with different 'system default' settings.
+ # This is the same as test_2 with some minor changes.
+ sysdefs = dedent(
+ """\
+ !
+ ! Interfaces default to L2 !!
+ !
+ system default switchport
+ system default switchport shutdown
+ """
+ )
+ intf = dedent(
+ """\
+ interface mgmt0
+ interface Ethernet1/1
+ interface Ethernet1/2
+ no switchport
+ no shutdown
+ interface Ethernet1/3
+ no switchport
+ interface loopback1
+ interface loopback2
+ shutdown
+ interface loopback3
+ interface loopback8
+ interface loopback9
+ shutdown
+ interface port-channel2
+ interface port-channel3
+ shutdown
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_RUN_INTF: intf
+ }
+ self.get_system_defaults.return_value = sysdefs
+
+ playbook = dict(
+ config=[
+ # Set non-default states on existing objs
+ dict(name="Ethernet1/1", mode="layer3", enabled=True),
+ dict(name="loopback1", enabled=False),
+ # Set default states on existing objs
+ dict(name="Ethernet1/2", enabled=False),
+ dict(name="loopback2", enabled=True),
+ # Set explicit default state on existing objs (no chg)
+ dict(name="Ethernet1/3", enabled=False),
+ dict(name="loopback3", enabled=True),
+ dict(name="port-channel3", enabled=True),
+ # Set default state on non-existent objs; no state changes but need to create intf
+ dict(name="loopback4", enabled=True),
+ dict(name="port-channel4", enabled=True),
+ dict(name="Ethernet1/4.101"),
+ ]
+ )
+ merged = [
+ "interface Ethernet1/1",
+ "no switchport",
+ "no shutdown",
+ "interface loopback1",
+ "shutdown",
+ "interface Ethernet1/2",
+ "shutdown",
+ "interface loopback2",
+ "no shutdown",
+ "interface port-channel3",
+ "no shutdown",
+ "interface loopback4",
+ "interface port-channel4",
+ "interface Ethernet1/4.101",
+ ]
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ # Test with an older image version which has different defaults
+ merged_legacy = [
+ "interface Ethernet1/1",
+ "no switchport",
+ "interface loopback1",
+ "shutdown",
+ "interface Ethernet1/2",
+ "shutdown",
+ "interface loopback2",
+ "no shutdown",
+ "interface Ethernet1/3",
+ "shutdown",
+ "interface port-channel3",
+ "no shutdown",
+ "interface loopback4",
+ "interface port-channel4",
+ "interface Ethernet1/4.101",
+ ]
+ self.execute_module(
+ changed=True, commands=merged_legacy, device="legacy"
+ )
+
+ deleted = [
+ "interface Ethernet1/2",
+ "switchport",
+ "shutdown",
+ "interface loopback2",
+ "no shutdown",
+ "interface Ethernet1/3",
+ "switchport",
+ "interface port-channel3",
+ "no shutdown",
+ ]
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ replaced = [
+ "interface Ethernet1/1",
+ "no switchport",
+ "no shutdown",
+ "interface loopback1",
+ "shutdown",
+ "interface Ethernet1/2",
+ "switchport",
+ "shutdown",
+ "interface loopback2",
+ "no shutdown",
+ "interface Ethernet1/3",
+ "switchport",
+ "interface port-channel3",
+ "no shutdown",
+ "interface loopback4",
+ "interface port-channel4",
+ "interface Ethernet1/4.101",
+ ]
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ overridden = [
+ "interface Ethernet1/2",
+ "switchport",
+ "shutdown",
+ "interface Ethernet1/3",
+ "switchport",
+ "interface loopback2",
+ "no shutdown",
+ "interface loopback9",
+ "no shutdown",
+ "interface port-channel3",
+ "no shutdown",
+ "interface Ethernet1/1",
+ "no switchport",
+ "no shutdown",
+ "interface loopback1",
+ "shutdown",
+ "interface loopback4",
+ "interface port-channel4",
+ "interface Ethernet1/4.101",
+ ]
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ def test_4(self):
+ # Basic idempotence test
+ sysdefs = dedent(
+ """\
+ !
+ ! Interfaces default to L3 !!
+ !
+ no system default switchport
+ no system default switchport shutdown
+ """
+ )
+ intf = dedent(
+ """\
+ interface Ethernet1/1
+ interface Ethernet1/2
+ switchport
+ speed 1000
+ shutdown
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_RUN_INTF: intf
+ }
+ self.get_system_defaults.return_value = sysdefs
+
+ playbook = dict(
+ config=[
+ dict(name="Ethernet1/1", mode="layer3"),
+ dict(name="Ethernet1/2", mode="layer2", enabled=False),
+ ]
+ )
+ merged = []
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, commands=merged)
+
+ def test_5(self):
+ # 'state: deleted' without 'config'; clean all objects.
+ sysdefs = dedent(
+ """\
+ !
+ ! Interfaces default to L3 !!
+ !
+ no system default switchport
+ no system default switchport shutdown
+ """
+ )
+ intf = dedent(
+ """\
+ interface Ethernet1/1
+ switchport
+ interface Ethernet1/2
+ speed 1000
+ no shutdown
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_RUN_INTF: intf
+ }
+ self.get_system_defaults.return_value = sysdefs
+
+ playbook = dict()
+ deleted = [
+ "interface Ethernet1/1",
+ "no switchport",
+ "interface Ethernet1/2",
+ "no speed",
+ "shutdown",
+ ]
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ def test_6_gathered(self):
+ # check for parsing correct contexts
+ sysdefs = dedent(
+ """\
+ !
+ ! Interfaces default to L3 !!
+ !
+ no system default switchport
+ no system default switchport shutdown
+ """
+ )
+ intf = dedent(
+ """\
+ interface nve1
+ no shutdown
+ source-interface loopback1
+ interface Ethernet1/1
+ switchport
+ description interface
+ interface Ethernet1/2
+ speed 1000
+ no shutdown
+ interface loopback1
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_RUN_INTF: intf
+ }
+ self.get_system_defaults.return_value = sysdefs
+
+ playbook = dict()
+ playbook["state"] = "gathered"
+
+ gathered_facts = [
+ {"name": "nve1", "enabled": True},
+ {
+ "name": "Ethernet1/1",
+ "mode": "layer2",
+ "description": "interface",
+ },
+ {"name": "Ethernet1/2", "enabled": True, "speed": "1000"},
+ {"name": "loopback1"},
+ ]
+ set_module_args(playbook, ignore_provider_arg)
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["gathered"], gathered_facts)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_l3_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_l3_interface.py
new file mode 100644
index 00000000..f30ad8ff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_l3_interface.py
@@ -0,0 +1,395 @@
+# Copyright: (c) 2019, Olivier Blin <olivier.oblin@gmail.com>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_l3_interface
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosL3InterfaceModule(TestNxosModule):
+
+ module = nxos_l3_interface
+
+ def setUp(self):
+ super(TestNxosL3InterfaceModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_l3_interface.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_l3_interface.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosL3InterfaceModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.load_config.return_value = None
+ self.get_config.return_value = load_fixture(
+ "nxos_l3_interface", self.mode
+ )
+
+ def test_nxos_l3_interface_unknonw_ethernet(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(dict(name="Ethernet1/2", ipv4="192.168.0.1/24"))
+ result = self.execute_module(changed=False)
+
+ # Add when missing
+ def test_nxos_l3_interface_add_missing_ipv4(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(dict(name="Ethernet1/1", ipv4="192.168.0.1/24"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["interface Ethernet1/1", "ip address 192.168.0.1/24", "exit"],
+ )
+
+ def test_nxos_l3_interface_add_missing_ipv4_on_e11(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(dict(name="et1/1", ipv4="192.168.0.1/24"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["interface Ethernet1/1", "ip address 192.168.0.1/24", "exit"],
+ )
+
+ def test_nxos_l3_interface_add_missing_ipv6(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(dict(name="Ethernet1/1", ipv6="2001:db8::1/124"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["interface Ethernet1/1", "ipv6 address 2001:db8::1/124", "exit"],
+ )
+
+ def test_nxos_l3_interface_add_missing_ipv4_and_ipv6(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(
+ dict(
+ name="Ethernet1/1",
+ ipv4="192.168.0.1/24",
+ ipv6="2001:db8::1/124",
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "interface Ethernet1/1",
+ "ip address 192.168.0.1/24",
+ "ipv6 address 2001:db8::1/124",
+ "exit",
+ ],
+ )
+
+ # Add when existing
+ def test_nxos_l3_interface_add_existing_ipv4(self):
+ self.mode = "ethernet_noshut_ipv4_ipv6"
+ set_module_args(dict(name="Ethernet1/1", ipv4="192.168.0.1/24"))
+ result = self.execute_module()
+
+ def test_nxos_l3_interface_add_existing_ipv4_on_e11(self):
+ self.mode = "ethernet_noshut_ipv4_ipv6"
+ set_module_args(dict(name="et1/1", ipv4="192.168.0.1/24"))
+ result = self.execute_module()
+
+ def test_nxos_l3_interface_add_existing_ipv6(self):
+ self.mode = "ethernet_noshut_ipv4_ipv6"
+ set_module_args(dict(name="Ethernet1/1", ipv6="2001:db8::1/124"))
+ result = self.execute_module()
+
+ def test_nxos_l3_interface_add_existing_ipv4_and_ipv6(self):
+ self.mode = "ethernet_noshut_ipv4_ipv6"
+ set_module_args(
+ dict(
+ name="Ethernet1/1",
+ ipv4="192.168.0.1/24",
+ ipv6="2001:db8::1/124",
+ )
+ )
+ result = self.execute_module()
+
+ def test_nxos_l3_interface_new_ipv4_and_ipv6(self):
+ self.mode = "ethernet_noshut_ipv4_ipv6"
+ set_module_args(
+ dict(
+ name="Ethernet1/1",
+ ipv4="192.168.0.2/24",
+ ipv6="2001:db8::2/124",
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "interface Ethernet1/1",
+ "ip address 192.168.0.2/24",
+ "ipv6 address 2001:db8::2/124",
+ "exit",
+ ],
+ )
+
+ # Add when existing with multiple IPv6
+ def test_nxos_l3_interface_multiple_ipv6_add_first(self):
+ self.mode = "ethernet_noshut_multiple_ipv6"
+ set_module_args(dict(name="Ethernet1/1", ipv6="2001:db8::1/124"))
+ result = self.execute_module()
+
+ def test_nxos_l3_interface_multiple_ipv6_add_last(self):
+ self.mode = "ethernet_noshut_multiple_ipv6"
+ set_module_args(dict(name="Ethernet1/1", ipv6="2001:db8:2::1/124"))
+ result = self.execute_module()
+
+ # Add aggregate
+ def test_nxos_l3_interface_add_missing_with_empty_aggregate(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(dict(aggregate=[]))
+ result = self.execute_module()
+
+ def test_nxos_l3_interface_add_missing_with_aggregate(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(
+ dict(
+ aggregate=[
+ dict(
+ name="Ethernet1/1",
+ ipv4="192.168.0.2/24",
+ ipv6="2001:db8::2/124",
+ ),
+ dict(name="Ethernet1/1", ipv6="2001:db8:1::2/124"),
+ dict(name="Ethernet1/1", ipv6="2001:db8:2::2/124"),
+ ]
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "interface Ethernet1/1",
+ "ip address 192.168.0.2/24",
+ "ipv6 address 2001:db8::2/124",
+ "exit",
+ "interface Ethernet1/1",
+ "ipv6 address 2001:db8:1::2/124",
+ "exit",
+ "interface Ethernet1/1",
+ "ipv6 address 2001:db8:2::2/124",
+ "exit",
+ ],
+ )
+
+ # Rem when missing
+ def test_nxos_l3_interface_rem_missing_ipv4(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(
+ dict(name="Ethernet1/1", ipv4="192.168.0.1/24", state="absent")
+ )
+ result = self.execute_module()
+
+ def test_nxos_l3_interface_rem_missing_ipv4_on_e11(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(
+ dict(name="et1/1", ipv4="192.168.0.1/24", state="absent")
+ )
+ result = self.execute_module()
+
+ def test_nxos_l3_interface_rem_missing_ipv6(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(
+ dict(name="Ethernet1/1", ipv6="2001:db8::1/124", state="absent")
+ )
+ result = self.execute_module()
+
+ def test_nxos_l3_interface_rem_missing_ipv4_and_ipv6(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(
+ dict(
+ name="Ethernet1/1",
+ ipv4="192.168.0.1/24",
+ ipv6="2001:db8::1/124",
+ state="absent",
+ )
+ )
+ result = self.execute_module()
+
+ # Rem when existing
+ def test_nxos_l3_interface_rem_existing_ipv4(self):
+ self.mode = "ethernet_noshut_ipv4_ipv6"
+ set_module_args(
+ dict(name="Ethernet1/1", ipv4="192.168.0.1/24", state="absent")
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["interface Ethernet1/1", "no ip address 192.168.0.1/24", "exit"],
+ )
+
+ def test_nxos_l3_interface_rem_existing_ipv4_on_e11(self):
+ self.mode = "ethernet_noshut_ipv4_ipv6"
+ set_module_args(
+ dict(name="et1/1", ipv4="192.168.0.1/24", state="absent")
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["interface Ethernet1/1", "no ip address 192.168.0.1/24", "exit"],
+ )
+
+ def test_nxos_l3_interface_rem_existing_ipv6(self):
+ self.mode = "ethernet_noshut_ipv4_ipv6"
+ set_module_args(
+ dict(name="Ethernet1/1", ipv6="2001:db8::1/124", state="absent")
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "interface Ethernet1/1",
+ "no ipv6 address 2001:db8::1/124",
+ "exit",
+ ],
+ )
+
+ def test_nxos_l3_interface_rem_existing_ipv4_and_ipv6(self):
+ self.mode = "ethernet_noshut_ipv4_ipv6"
+ set_module_args(
+ dict(
+ name="Ethernet1/1",
+ ipv4="192.168.0.1/24",
+ ipv6="2001:db8::1/124",
+ state="absent",
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "interface Ethernet1/1",
+ "no ip address 192.168.0.1/24",
+ "no ipv6 address 2001:db8::1/124",
+ "exit",
+ ],
+ )
+
+ # Rem when existing with multiple IPv6
+ def test_nxos_l3_interface_multiple_ipv6_rem_first(self):
+ self.mode = "ethernet_noshut_multiple_ipv6"
+ set_module_args(
+ dict(name="Ethernet1/1", ipv6="2001:db8::1/124", state="absent")
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "interface Ethernet1/1",
+ "no ipv6 address 2001:db8::1/124",
+ "exit",
+ ],
+ )
+
+ def test_nxos_l3_interface_multiple_ipv6_rem_last(self):
+ self.mode = "ethernet_noshut_multiple_ipv6"
+ set_module_args(
+ dict(name="Ethernet1/1", ipv6="2001:db8:2::1/124", state="absent")
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "interface Ethernet1/1",
+ "no ipv6 address 2001:db8:2::1/124",
+ "exit",
+ ],
+ )
+
+ # Rem when missing with aggregate
+ def test_nxos_l3_interface_rem_with_empty_aggregate(self):
+ self.mode = "ethernet_noshut_multiple_ipv6"
+ set_module_args(dict(aggregate=[], state="absent"))
+ result = self.execute_module()
+
+ def test_nxos_l3_interface_rem_missing_with_aggregate(self):
+ self.mode = "ethernet_noshut_multiple_ipv6"
+ set_module_args(
+ dict(
+ state="absent",
+ aggregate=[
+ dict(
+ name="Ethernet1/1",
+ ipv4="192.168.0.2/24",
+ ipv6="2001:db8::2/124",
+ ),
+ dict(name="Ethernet1/1", ipv6="2001:db8:1::2/124"),
+ dict(name="Ethernet1/1", ipv6="2001:db8:2::2/124"),
+ ],
+ )
+ )
+ result = self.execute_module()
+
+ # Rem when existing with aggregate
+ def test_nxos_l3_interface_rem_existing_with_aggregate(self):
+ self.mode = "ethernet_noshut_multiple_ipv6"
+ set_module_args(
+ dict(
+ state="absent",
+ aggregate=[
+ dict(
+ name="Ethernet1/1",
+ ipv4="192.168.0.1/24",
+ ipv6="2001:db8::1/124",
+ ),
+ dict(name="Ethernet1/1", ipv6="2001:db8:1::1/124"),
+ dict(name="Ethernet1/1", ipv6="2001:db8:2::1/124"),
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "interface Ethernet1/1",
+ "no ip address 192.168.0.1/24",
+ "no ipv6 address 2001:db8::1/124",
+ "exit",
+ "interface Ethernet1/1",
+ "no ipv6 address 2001:db8:1::1/124",
+ "exit",
+ "interface Ethernet1/1",
+ "no ipv6 address 2001:db8:2::1/124",
+ "exit",
+ ],
+ )
+
+ # Add itf only
+ def test_nxos_l3_interface_add_on_itf_only(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(dict(name="Ethernet1/1"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["interface Ethernet1/1"])
+
+ # Add unknown interface
+ def test_nxos_l3_interface_add_on_unknown_itf(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(dict(name="Ethernet1/2", ipv4="192.168.0.1/24"))
+ result = self.execute_module()
+ self.assertEqual(result["warnings"], ["Unknown interface Ethernet1/2"])
+
+ # Rem unknown interface
+ def test_nxos_l3_interface_rem_on_unknown_itf(self):
+ self.mode = "ethernet_noshut"
+ set_module_args(
+ dict(name="Ethernet1/2", ipv4="192.168.0.1/24", state="absent")
+ )
+ result = self.execute_module()
+ self.assertEqual(result["warnings"], ["Unknown interface Ethernet1/2"])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_l3_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_l3_interfaces.py
new file mode 100644
index 00000000..bacc0d4c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_l3_interfaces.py
@@ -0,0 +1,1037 @@
+# (c) 2019 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from textwrap import dedent
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import (
+ patch,
+ PropertyMock,
+)
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules import nxos_l3_interfaces
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.l3_interfaces.l3_interfaces import (
+ L3_interfaces,
+)
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+ignore_provider_arg = True
+
+
+class TestNxosL3InterfacesModule(TestNxosModule):
+
+ module = nxos_l3_interfaces
+
+ def setUp(self):
+ super(TestNxosL3InterfacesModule, self).setUp()
+
+ self.mock_FACT_LEGACY_SUBSETS = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS"
+ )
+ self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.l3_interfaces.l3_interfaces.L3_interfaces.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ def tearDown(self):
+ super(TestNxosL3InterfacesModule, self).tearDown()
+ self.mock_FACT_LEGACY_SUBSETS.stop()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+
+ def load_fixtures(self, commands=None, device="N9K"):
+ self.mock_FACT_LEGACY_SUBSETS.return_value = dict()
+ self.get_resource_connection_config.return_value = None
+ self.edit_config.return_value = None
+ L3_interfaces.platform = PropertyMock(return_value=device)
+
+ # ---------------------------
+ # L3_interfaces Test Cases
+ # ---------------------------
+
+ # 'state' logic behaviors
+ #
+ # - 'merged' : Update existing device state with any differences in the play.
+ # - 'deleted' : Reset existing device state to default values. Ignores any
+ # play attrs other than 'name'. Scope is limited to interfaces
+ # in the play.
+ # - 'overridden': The play is the source of truth. Similar to replaced but the
+ # scope includes all interfaces; ie. it will also reset state
+ # on interfaces not found in the play.
+ # - 'replaced' : Scope is limited to the interfaces in the play.
+
+ SHOW_CMD = "show running-config | section ^interface"
+
+ def test_2(self):
+ # basic tests
+ existing = dedent(
+ """\
+ interface mgmt0
+ ip address 10.0.0.254/24
+ interface Ethernet1/1
+ ip address 10.1.1.1/24
+ interface Ethernet1/2
+ ip address 10.1.2.1/24
+ interface Ethernet1/3
+ ip address 10.1.3.1/24
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(name="mgmt0", ipv4=[{"address": "10.0.0.254/24"}]),
+ dict(name="Ethernet1/1", ipv4=[{"address": "192.168.1.1/24"}]),
+ dict(name="Ethernet1/2"),
+ # Eth1/3 not present! Thus overridden should set Eth1/3 to defaults;
+ # replaced should ignore Eth1/3.
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = ["interface Ethernet1/1", "ip address 192.168.1.1/24"]
+ deleted = [
+ "interface mgmt0",
+ "no ip address",
+ "interface Ethernet1/1",
+ "no ip address",
+ "interface Ethernet1/2",
+ "no ip address",
+ ]
+ replaced = [
+ "interface Ethernet1/1",
+ "ip address 192.168.1.1/24",
+ "interface Ethernet1/2",
+ "no ip address",
+ ]
+ overridden = [
+ "interface Ethernet1/1",
+ "ip address 192.168.1.1/24",
+ "interface Ethernet1/2",
+ "no ip address",
+ "interface Ethernet1/3",
+ "no ip address",
+ ]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ def test_3(self):
+ # encap testing
+ existing = dedent(
+ """\
+ interface mgmt0
+ ip address 10.0.0.254/24
+ interface Ethernet1/1.41
+ encapsulation dot1q 4100
+ ip address 10.1.1.1/24
+ interface Ethernet1/1.42
+ encapsulation dot1q 42
+ interface Ethernet1/1.44
+ encapsulation dot1q 44
+ interface Ethernet1/1.45
+ encapsulation dot1q 45
+ ip address 10.5.5.5/24
+ ipv6 address 10::5/128
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(name="mgmt0", ipv4=[{"address": "10.0.0.254/24"}]),
+ dict(
+ name="Ethernet1/1.41",
+ dot1q=41,
+ ipv4=[{"address": "10.2.2.2/24"}],
+ ),
+ dict(name="Ethernet1/1.42", dot1q=42),
+ dict(
+ name="Ethernet1/1.43",
+ dot1q=43,
+ ipv6=[{"address": "10::2/128"}],
+ ),
+ dict(name="Ethernet1/1.44"),
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = [
+ "interface Ethernet1/1.41",
+ "encapsulation dot1q 41",
+ "ip address 10.2.2.2/24",
+ "interface Ethernet1/1.43",
+ "encapsulation dot1q 43",
+ "ipv6 address 10::2/128",
+ ]
+ deleted = [
+ "interface mgmt0",
+ "no ip address",
+ "interface Ethernet1/1.41",
+ "no encapsulation dot1q",
+ "no ip address",
+ "interface Ethernet1/1.42",
+ "no encapsulation dot1q",
+ "interface Ethernet1/1.44",
+ "no encapsulation dot1q",
+ ]
+ replaced = [
+ "interface Ethernet1/1.41",
+ "encapsulation dot1q 41",
+ "ip address 10.2.2.2/24",
+ # 42 no chg
+ "interface Ethernet1/1.43",
+ "encapsulation dot1q 43",
+ "ipv6 address 10::2/128",
+ "interface Ethernet1/1.44",
+ "no encapsulation dot1q",
+ ]
+ overridden = [
+ "interface Ethernet1/1.41",
+ "encapsulation dot1q 41",
+ "ip address 10.2.2.2/24",
+ # 42 no chg
+ "interface Ethernet1/1.44",
+ "no encapsulation dot1q",
+ "interface Ethernet1/1.45",
+ "no encapsulation dot1q",
+ "no ip address",
+ "no ipv6 address",
+ "interface Ethernet1/1.43",
+ "encapsulation dot1q 43",
+ "ipv6 address 10::2/128",
+ ]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ def test_4(self):
+ # IPv4-centric testing
+ existing = dedent(
+ """\
+ interface mgmt0
+ ip address 10.0.0.254/24
+ interface Ethernet1/1
+ no ip redirects
+ ip address 10.1.1.1/24 tag 11
+ ip address 10.2.2.2/24 secondary tag 12
+ ip address 10.3.3.3/24 secondary
+ ip address 10.4.4.4/24 secondary tag 14
+ ip address 10.5.5.5/24 secondary tag 15
+ ip address 10.6.6.6/24 secondary tag 16
+ interface Ethernet1/2
+ ip address 10.12.12.12/24
+ interface Ethernet1/3
+ ip address 10.13.13.13/24
+ interface Ethernet1/5
+ no ip redirects
+ ip address 10.15.15.15/24
+ ip address 10.25.25.25/24 secondary
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(name="mgmt0", ipv4=[{"address": "10.0.0.254/24"}]),
+ dict(
+ name="Ethernet1/1",
+ ipv4=[
+ {
+ "address": "10.1.1.1/24",
+ "secondary": True,
+ }, # prim->sec
+ {
+ "address": "10.2.2.2/24",
+ "secondary": True,
+ }, # rmv tag
+ {"address": "10.3.3.3/24", "tag": 3}, # become prim
+ {
+ "address": "10.4.4.4/24",
+ "secondary": True,
+ "tag": 14,
+ }, # no chg
+ {
+ "address": "10.5.5.5/24",
+ "secondary": True,
+ "tag": 55,
+ }, # chg tag
+ {
+ "address": "10.7.7.7/24",
+ "secondary": True,
+ "tag": 77,
+ },
+ ],
+ ), # new ip
+ dict(name="Ethernet1/2"),
+ dict(
+ name="Ethernet1/4",
+ ipv4=[
+ {"address": "10.40.40.40/24"},
+ {"address": "10.41.41.41/24", "secondary": True},
+ ],
+ ),
+ dict(name="Ethernet1/5"),
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = [
+ "interface Ethernet1/1",
+ "no ip address 10.5.5.5/24 secondary",
+ "no ip address 10.2.2.2/24 secondary",
+ "no ip address 10.3.3.3/24 secondary",
+ "ip address 10.3.3.3/24 tag 3", # Changes primary
+ "ip address 10.1.1.1/24 secondary",
+ "ip address 10.2.2.2/24 secondary",
+ "ip address 10.7.7.7/24 secondary tag 77",
+ "ip address 10.5.5.5/24 secondary tag 55",
+ "interface Ethernet1/4",
+ "ip address 10.40.40.40/24",
+ "ip address 10.41.41.41/24 secondary",
+ ]
+ deleted = [
+ "interface mgmt0",
+ "no ip address",
+ "interface Ethernet1/1",
+ "no ip address",
+ "interface Ethernet1/2",
+ "no ip address",
+ "interface Ethernet1/5",
+ "no ip address",
+ ]
+ replaced = [
+ "interface Ethernet1/1",
+ "no ip address 10.5.5.5/24 secondary",
+ "no ip address 10.2.2.2/24 secondary",
+ "no ip address 10.3.3.3/24 secondary",
+ "ip address 10.3.3.3/24 tag 3", # Changes primary
+ "ip address 10.1.1.1/24 secondary",
+ "ip address 10.2.2.2/24 secondary",
+ "ip address 10.7.7.7/24 secondary tag 77",
+ "ip address 10.5.5.5/24 secondary tag 55",
+ "interface Ethernet1/2",
+ "no ip address",
+ "interface Ethernet1/4",
+ "ip address 10.40.40.40/24",
+ "ip address 10.41.41.41/24 secondary",
+ "interface Ethernet1/5",
+ "no ip address",
+ ]
+ overridden = [
+ "interface Ethernet1/1",
+ "no ip address 10.6.6.6/24 secondary",
+ "no ip address 10.5.5.5/24 secondary",
+ "no ip address 10.2.2.2/24 secondary",
+ "no ip address 10.3.3.3/24 secondary",
+ "ip address 10.3.3.3/24 tag 3", # Changes primary
+ "ip address 10.1.1.1/24 secondary",
+ "ip address 10.2.2.2/24 secondary",
+ "ip address 10.7.7.7/24 secondary tag 77",
+ "ip address 10.5.5.5/24 secondary tag 55",
+ "interface Ethernet1/2",
+ "no ip address",
+ "interface Ethernet1/3",
+ "no ip address",
+ "interface Ethernet1/4",
+ "ip address 10.40.40.40/24",
+ "ip address 10.41.41.41/24 secondary",
+ "interface Ethernet1/5",
+ "no ip address",
+ ]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ def test_5(self):
+ # IPv6-centric testing
+ existing = dedent(
+ """\
+ interface Ethernet1/1
+ ipv6 address 10::1/128
+ ipv6 address 10::2/128 tag 12
+ ipv6 address 10::3/128 tag 13
+ ipv6 address 10::4/128 tag 14
+ interface Ethernet1/2
+ ipv6 address 10::12/128
+ interface Ethernet1/3
+ ipv6 address 10::13/128
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ ipv6=[
+ {"address": "10::1/128"}, # no chg
+ {"address": "10::3/128"}, # tag rmv
+ {"address": "10::4/128", "tag": 44}, # tag chg
+ {"address": "10::5/128"}, # new addr
+ {"address": "10::6/128", "tag": 66},
+ ],
+ ), # new addr+tag
+ dict(name="Ethernet1/2"),
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = [
+ "interface Ethernet1/1",
+ "ipv6 address 10::4/128 tag 44",
+ "ipv6 address 10::5/128",
+ "ipv6 address 10::6/128 tag 66",
+ ]
+ deleted = [
+ "interface Ethernet1/1",
+ "no ipv6 address",
+ "interface Ethernet1/2",
+ "no ipv6 address",
+ ]
+ replaced = [
+ "interface Ethernet1/1",
+ "no ipv6 address 10::3/128",
+ "no ipv6 address 10::2/128",
+ "ipv6 address 10::4/128 tag 44",
+ "ipv6 address 10::3/128",
+ "ipv6 address 10::5/128",
+ "ipv6 address 10::6/128 tag 66",
+ "interface Ethernet1/2",
+ "no ipv6 address 10::12/128",
+ ]
+ overridden = [
+ "interface Ethernet1/1",
+ "no ipv6 address 10::3/128",
+ "no ipv6 address 10::2/128",
+ "ipv6 address 10::4/128 tag 44",
+ "ipv6 address 10::3/128",
+ "ipv6 address 10::5/128",
+ "ipv6 address 10::6/128 tag 66",
+ "interface Ethernet1/2",
+ "no ipv6 address 10::12/128",
+ "interface Ethernet1/3",
+ "no ipv6 address",
+ ]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+ #
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+ #
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ def test_6(self):
+ # misc tests
+ existing = dedent(
+ """\
+ interface Ethernet1/1
+ ip address 10.1.1.1/24
+ no ip redirects
+ ip unreachables
+ interface Ethernet1/2
+ interface Ethernet1/3
+ interface Ethernet1/4
+ interface Ethernet1/5
+ no ip redirects
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ redirects=True,
+ unreachables=False,
+ ipv4=[{"address": "192.168.1.1/24"}],
+ ),
+ dict(name="Ethernet1/2"),
+ dict(
+ name="Ethernet1/3", redirects=True, unreachables=False
+ ), # defaults
+ dict(name="Ethernet1/4", redirects=False, unreachables=True),
+ ]
+ )
+ merged = [
+ "interface Ethernet1/1",
+ "ip redirects",
+ "no ip unreachables",
+ "ip address 192.168.1.1/24",
+ "interface Ethernet1/4",
+ "no ip redirects",
+ "ip unreachables",
+ ]
+ deleted = [
+ "interface Ethernet1/1",
+ "ip redirects",
+ "no ip unreachables",
+ "no ip address",
+ ]
+ replaced = [
+ "interface Ethernet1/1",
+ "ip redirects",
+ "no ip unreachables",
+ "ip address 192.168.1.1/24",
+ "interface Ethernet1/4",
+ "no ip redirects",
+ "ip unreachables",
+ ]
+ overridden = [
+ "interface Ethernet1/1",
+ "ip redirects",
+ "no ip unreachables",
+ "ip address 192.168.1.1/24",
+ "interface Ethernet1/5",
+ "ip redirects",
+ "interface Ethernet1/4",
+ "no ip redirects",
+ "ip unreachables",
+ ]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ def test_7(self):
+ # idempotence
+ existing = dedent(
+ """\
+ interface Ethernet1/1
+ ip address 10.1.1.1/24
+ ip address 10.2.2.2/24 secondary tag 2
+ ip address 10.3.3.3/24 secondary tag 3
+ ip address 10.4.4.4/24 secondary
+ ipv6 address 10::1/128
+ ipv6 address 10::2/128 tag 2
+ no ip redirects
+ ip unreachables
+ interface Ethernet1/2
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ redirects=False,
+ unreachables=True,
+ ipv4=[
+ {"address": "10.1.1.1/24"},
+ {
+ "address": "10.2.2.2/24",
+ "secondary": True,
+ "tag": 2,
+ },
+ {
+ "address": "10.3.3.3/24",
+ "secondary": True,
+ "tag": 3,
+ },
+ {"address": "10.4.4.4/24", "secondary": True},
+ ],
+ ipv6=[
+ {"address": "10::1/128"},
+ {"address": "10::2/128", "tag": 2},
+ ],
+ ),
+ dict(name="Ethernet1/2"),
+ ]
+ )
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ # Modify output for deleted idempotence test
+ existing = dedent(
+ """\
+ interface Ethernet1/1
+ interface Ethernet1/2
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_8(self):
+ # no 'config' key in playbook
+ existing = dedent(
+ """\
+ interface Ethernet1/1
+ ip address 10.1.1.1/24
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict()
+
+ for i in ["merged", "replaced", "overridden"]:
+ playbook["state"] = i
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(failed=True)
+
+ deleted = ["interface Ethernet1/1", "no ip address"]
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ def test_9(self):
+ # Platform specific checks
+ # 'ip redirects' has platform-specific behaviors
+ existing = dedent(
+ """\
+ interface Ethernet1/3
+ ip address 10.13.13.13/24
+ interface Ethernet1/5
+ no ip redirects
+ ip address 10.15.15.15/24
+ ip address 10.25.25.25/24 secondary
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[dict(name="Ethernet1/3"), dict(name="Ethernet1/5")]
+ )
+ # Expected result commands for each 'state'
+ deleted = [
+ "interface Ethernet1/3",
+ "no ip address",
+ "interface Ethernet1/5",
+ "no ip address",
+ "ip redirects",
+ ]
+ replaced = [
+ "interface Ethernet1/3",
+ "no ip address",
+ "interface Ethernet1/5",
+ "no ip address",
+ "ip redirects",
+ ]
+ overridden = [
+ "interface Ethernet1/3",
+ "no ip address",
+ "interface Ethernet1/5",
+ "no ip address",
+ "ip redirects",
+ ]
+ platform = "N3K"
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False, device=platform)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted, device=platform)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced, device=platform)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden, device=platform)
+
+ def test_10(self):
+ # basic tests
+ existing = dedent(
+ """\
+ interface mgmt0
+ ip address 10.0.0.254/24
+ interface Ethernet1/1
+ ip address 10.1.1.1/24
+ interface Ethernet1/2
+ ip address 10.1.2.1/24
+ evpn multisite fabric-tracking
+ interface Ethernet1/3
+ ip address 10.1.3.1/24
+ evpn multisite dci-tracking
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(name="mgmt0", ipv4=[{"address": "10.0.0.254/24"}]),
+ dict(name="Ethernet1/1", ipv4=[{"address": "192.168.1.1/24"}]),
+ dict(name="Ethernet1/2"),
+ # Eth1/3 not present! Thus overridden should set Eth1/3 to defaults;
+ # replaced should ignore Eth1/3.
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = ["interface Ethernet1/1", "ip address 192.168.1.1/24"]
+ deleted = [
+ "interface mgmt0",
+ "no ip address",
+ "interface Ethernet1/1",
+ "no ip address",
+ "interface Ethernet1/2",
+ "no ip address",
+ "no evpn multisite fabric-tracking",
+ ]
+ replaced = [
+ "interface Ethernet1/1",
+ "ip address 192.168.1.1/24",
+ "interface Ethernet1/2",
+ "no ip address",
+ "no evpn multisite fabric-tracking",
+ ]
+ overridden = [
+ "interface Ethernet1/1",
+ "ip address 192.168.1.1/24",
+ "interface Ethernet1/2",
+ "no ip address",
+ "no evpn multisite fabric-tracking",
+ "interface Ethernet1/3",
+ "no ip address",
+ "no evpn multisite dci-tracking",
+ ]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ def test_11(self):
+ # IPv4-centric testing
+ existing = dedent(
+ """\
+ interface mgmt0
+ ip address 10.0.0.254/24
+ interface Ethernet1/1
+ no ip redirects
+ ip address 10.1.1.1/24 tag 11
+ ip address 10.2.2.2/24 secondary tag 12
+ ip address 10.3.3.3/24 secondary
+ ip address 10.4.4.4/24 secondary tag 14
+ ip address 10.5.5.5/24 secondary tag 15
+ ip address 10.6.6.6/24 secondary tag 16
+ interface Ethernet1/2
+ ip address 10.12.12.12/24
+ interface Ethernet1/3
+ ip address 10.13.13.13/24
+ interface Ethernet1/5
+ no ip redirects
+ ip address 10.15.15.15/24
+ ip address 10.25.25.25/24 secondary
+ evpn multisite fabric-tracking
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(name="mgmt0", ipv4=[{"address": "10.0.0.254/24"}]),
+ dict(
+ name="Ethernet1/1",
+ ipv4=[
+ {
+ "address": "10.1.1.1/24",
+ "secondary": True,
+ }, # prim->sec
+ {
+ "address": "10.2.2.2/24",
+ "secondary": True,
+ }, # rmv tag
+ {"address": "10.3.3.3/24", "tag": 3}, # become prim
+ {
+ "address": "10.4.4.4/24",
+ "secondary": True,
+ "tag": 14,
+ }, # no chg
+ {
+ "address": "10.5.5.5/24",
+ "secondary": True,
+ "tag": 55,
+ }, # chg tag
+ {
+ "address": "10.7.7.7/24",
+ "secondary": True,
+ "tag": 77,
+ },
+ ],
+ ), # new ip
+ dict(name="Ethernet1/2"),
+ dict(
+ name="Ethernet1/4",
+ ipv4=[
+ {"address": "10.40.40.40/24"},
+ {"address": "10.41.41.41/24", "secondary": True},
+ ],
+ evpn_multisite_tracking="dci-tracking",
+ ),
+ dict(name="Ethernet1/5"),
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = [
+ "interface Ethernet1/1",
+ "no ip address 10.5.5.5/24 secondary",
+ "no ip address 10.2.2.2/24 secondary",
+ "no ip address 10.3.3.3/24 secondary",
+ "ip address 10.3.3.3/24 tag 3", # Changes primary
+ "ip address 10.1.1.1/24 secondary",
+ "ip address 10.2.2.2/24 secondary",
+ "ip address 10.7.7.7/24 secondary tag 77",
+ "ip address 10.5.5.5/24 secondary tag 55",
+ "interface Ethernet1/4",
+ "ip address 10.40.40.40/24",
+ "ip address 10.41.41.41/24 secondary",
+ "evpn multisite dci-tracking",
+ ]
+ deleted = [
+ "interface mgmt0",
+ "no ip address",
+ "interface Ethernet1/1",
+ "no ip address",
+ "interface Ethernet1/2",
+ "no ip address",
+ "interface Ethernet1/5",
+ "no ip address",
+ "no evpn multisite fabric-tracking",
+ ]
+ replaced = [
+ "interface Ethernet1/1",
+ "no ip address 10.5.5.5/24 secondary",
+ "no ip address 10.2.2.2/24 secondary",
+ "no ip address 10.3.3.3/24 secondary",
+ "ip address 10.3.3.3/24 tag 3", # Changes primary
+ "ip address 10.1.1.1/24 secondary",
+ "ip address 10.2.2.2/24 secondary",
+ "ip address 10.7.7.7/24 secondary tag 77",
+ "ip address 10.5.5.5/24 secondary tag 55",
+ "interface Ethernet1/2",
+ "no ip address",
+ "interface Ethernet1/4",
+ "ip address 10.40.40.40/24",
+ "ip address 10.41.41.41/24 secondary",
+ "evpn multisite dci-tracking",
+ "interface Ethernet1/5",
+ "no ip address",
+ "no evpn multisite fabric-tracking",
+ ]
+ overridden = [
+ "interface Ethernet1/1",
+ "no ip address 10.6.6.6/24 secondary",
+ "no ip address 10.5.5.5/24 secondary",
+ "no ip address 10.2.2.2/24 secondary",
+ "no ip address 10.3.3.3/24 secondary",
+ "ip address 10.3.3.3/24 tag 3", # Changes primary
+ "ip address 10.1.1.1/24 secondary",
+ "ip address 10.2.2.2/24 secondary",
+ "ip address 10.7.7.7/24 secondary tag 77",
+ "ip address 10.5.5.5/24 secondary tag 55",
+ "interface Ethernet1/2",
+ "no ip address",
+ "interface Ethernet1/3",
+ "no ip address",
+ "interface Ethernet1/4",
+ "ip address 10.40.40.40/24",
+ "ip address 10.41.41.41/24 secondary",
+ "evpn multisite dci-tracking",
+ "interface Ethernet1/5",
+ "no ip address",
+ "no evpn multisite fabric-tracking",
+ ]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ def test_12(self):
+ # Use case specific
+ existing = dedent(
+ """\
+ interface mgmt0
+ ip address 10.0.0.254/24
+ interface Vlan99
+ no shutdown
+ ip address 192.168.1.1/24
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(
+ name="Vlan99",
+ ipv4=[
+ {"address": "192.168.1.1/24", "tag": 500}
+ ], # adding a tag
+ )
+ ],
+ state="replaced",
+ )
+ cmds = ["interface Vlan99", "ip address 192.168.1.1/24 tag 500"]
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=cmds)
+
+ def test_12_gathered(self):
+ # check for parsing correct contexts
+ existing = dedent(
+ """\
+ interface nve1
+ no shutdown
+ source-interface loopback1
+ interface Ethernet1/1
+ description
+ ip address 192.168.1.1/24
+ interface Ethernet1/2
+ ip address 192.168.2.1/24
+ interface loopback1
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(state="gathered")
+ gathered_facts = [
+ {"name": "nve1"},
+ {"name": "Ethernet1/1", "ipv4": [{"address": "192.168.1.1/24"}]},
+ {"name": "Ethernet1/2", "ipv4": [{"address": "192.168.2.1/24"}]},
+ {"name": "loopback1"},
+ ]
+ set_module_args(playbook, ignore_provider_arg)
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["gathered"], gathered_facts)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_lacp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_lacp_interfaces.py
new file mode 100644
index 00000000..b9f69948
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_lacp_interfaces.py
@@ -0,0 +1,113 @@
+# (c) 2020 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from textwrap import dedent
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import (
+ patch,
+ PropertyMock,
+)
+from ansible_collections.cisco.nxos.plugins.modules import nxos_lacp_interfaces
+from .nxos_module import TestNxosModule, set_module_args
+
+ignore_provider_arg = True
+
+
+class TestNxosLacpInterfacesModule(TestNxosModule):
+
+ module = nxos_lacp_interfaces
+
+ def setUp(self):
+ super(TestNxosLacpInterfacesModule, self).setUp()
+
+ self.mock_FACT_LEGACY_SUBSETS = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS"
+ )
+ self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.l3_interfaces.l3_interfaces.L3_interfaces.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ def tearDown(self):
+ super(TestNxosLacpInterfacesModule, self).tearDown()
+ self.mock_FACT_LEGACY_SUBSETS.stop()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+
+ # ---------------------------
+ # Lacp_interfaces Test Cases
+ # ---------------------------
+
+ SHOW_CMD = "show running-config | section ^interface"
+
+ def test_lacp_mode_parse(self):
+ # basic tests
+ existing = dedent(
+ """\
+ interface port-channel1
+ switchport
+ switchport mode trunk
+ switchport trunk native vlan 5
+ switchport trunk allowed vlan 10
+ no lacp graceful-convergence
+ """
+ )
+ self.get_resource_connection_facts.return_value = {
+ self.SHOW_CMD: existing
+ }
+ playbook = dict(
+ config=[
+ dict(
+ name="port-channel1",
+ convergence={"graceful": False},
+ suspend_individual=True,
+ mode="delay",
+ )
+ ]
+ )
+ # Expected result commands for each 'state'
+ merged = [
+ "interface port-channel1",
+ "lacp mode delay",
+ "lacp suspend-individual",
+ ]
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_lldp_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_lldp_interfaces.py
new file mode 100644
index 00000000..843a766c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_lldp_interfaces.py
@@ -0,0 +1,272 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.plugins.modules import nxos_lldp_interfaces
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import (
+ patch,
+ MagicMock,
+)
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .nxos_module import TestNxosModule, load_fixture
+
+
+class TestNxosLldpInterfacesModule(TestNxosModule):
+
+ module = nxos_lldp_interfaces
+
+ def setUp(self):
+ super(TestNxosLldpInterfacesModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.lldp_interfaces.lldp_interfaces.Lldp_interfaces.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.lldp_interfaces.lldp_interfaces.Lldp_interfacesFacts.get_device_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestNxosLldpInterfacesModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ output = """interface Ethernet1/1
+ lldp receive
+ no lldp transmit
+ interface Ethernet1/2
+ no lldp receive
+ lldp tlv-set vlan 12"""
+ return output
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_nxos_lldp_interfaces_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/3",
+ receive=False,
+ tlv_set=dict(vlan=123),
+ )
+ ],
+ state="merged",
+ )
+ )
+ commands = [
+ "interface Ethernet1/3",
+ "no lldp receive",
+ "lldp tlv-set vlan 123",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_lldp_interfaces_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/2",
+ receive=False,
+ tlv_set=dict(vlan=12),
+ ),
+ dict(name="Ethernet1/1", receive=True, transmit=False),
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_lldp_interfaces_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/2",
+ receive=True,
+ transmit=False,
+ tlv_set=dict(management_address="192.0.2.123"),
+ )
+ ],
+ state="replaced",
+ )
+ )
+ commands = [
+ "interface Ethernet1/2",
+ "lldp receive",
+ "no lldp transmit",
+ "no lldp tlv-set vlan 12",
+ "lldp tlv-set management-address 192.0.2.123",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_lldp_interfaces_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/2",
+ receive=False,
+ tlv_set=dict(vlan=12),
+ ),
+ dict(name="Ethernet1/1", receive=True, transmit=False),
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_lldp_interfaces_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(name="Ethernet1/4", receive=True, transmit=False)
+ ],
+ state="overridden",
+ )
+ )
+ commands = [
+ "interface Ethernet1/4",
+ "lldp receive",
+ "no lldp transmit",
+ "interface Ethernet1/1",
+ "lldp receive",
+ "lldp transmit",
+ "interface Ethernet1/2",
+ "lldp receive",
+ "no lldp tlv-set vlan 12",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_lldp_interfaces_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/2",
+ receive=False,
+ tlv_set=dict(vlan=12),
+ ),
+ dict(name="Ethernet1/1", receive=True, transmit=False),
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_lldp_interfaces_deleted_intf(self):
+ set_module_args(
+ dict(config=[dict(name="Ethernet1/2")], state="deleted")
+ )
+ commands = [
+ "interface Ethernet1/2",
+ "lldp receive",
+ "no lldp tlv-set vlan 12",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_lldp_interfaces_deleted_all(self):
+ set_module_args(dict(state="deleted"))
+ commands = [
+ "interface Ethernet1/2",
+ "lldp receive",
+ "no lldp tlv-set vlan 12",
+ "interface Ethernet1/1",
+ "lldp receive",
+ "lldp transmit",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_lldp_interfaces_rendered(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/2",
+ receive=False,
+ tlv_set=dict(vlan=12),
+ ),
+ dict(name="Ethernet1/1", receive=True, transmit=False),
+ ],
+ state="rendered",
+ )
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "lldp receive",
+ "no lldp transmit",
+ "interface Ethernet1/2",
+ "no lldp receive",
+ "lldp tlv-set vlan 12",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(
+ sorted(result["rendered"]), sorted(commands), result["rendered"]
+ )
+
+ def test_nxos_lldp_interfaces_parsed(self):
+ set_module_args(
+ dict(
+ running_config="""interface Ethernet1/1
+ lldp receive
+ no lldp transmit
+ interface Ethernet1/2
+ no lldp receive
+ lldp tlv-set vlan 12""",
+ state="parsed",
+ )
+ )
+ result = self.execute_module(changed=False)
+ compare_list = [
+ {"name": "Ethernet1/1", "receive": True, "transmit": False},
+ {"name": "Ethernet1/2", "receive": False, "tlv_set": {"vlan": 12}},
+ ]
+ self.assertEqual(result["parsed"], compare_list, result["parsed"])
+
+ def test_nxos_lldp_interfaces_gathered(self):
+ set_module_args(dict(state="gathered"))
+ result = self.execute_module(changed=False)
+ compare_list = [
+ {"name": "Ethernet1/1", "receive": True, "transmit": False},
+ {"name": "Ethernet1/2", "receive": False, "tlv_set": {"vlan": 12}},
+ ]
+ self.assertEqual(result["gathered"], compare_list, result["gathered"])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_nxapi.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_nxapi.py
new file mode 100644
index 00000000..ccdd0683
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_nxapi.py
@@ -0,0 +1,100 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_nxapi
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosNxapiModule(TestNxosModule):
+
+ module = nxos_nxapi
+
+ def setUp(self):
+ super(TestNxosNxapiModule, self).setUp()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_nxapi.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_nxapi.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_capabilities = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_nxapi.get_capabilities"
+ )
+ self.get_capabilities = self.mock_get_capabilities.start()
+ self.get_capabilities.return_value = {
+ "device_info": {
+ "network_os_platform": "N7K-C7018",
+ "network_os_version": "8.3(1)",
+ },
+ "network_api": "cliconf",
+ }
+
+ def tearDown(self):
+ super(TestNxosNxapiModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_load_config.stop()
+ self.mock_get_capabilities.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ module_name = self.module.__name__.rsplit(".", 1)[1]
+
+ output = list()
+ for command in commands:
+ filename = str(command).split(" | ")[0].replace(" ", "_")
+ output.append(load_fixture(module_name, filename, device))
+ return output
+
+ self.run_commands.side_effect = load_from_file
+ self.load_config.return_value = None
+
+ def test_nxos_nxapi_no_change(self):
+ set_module_args(
+ dict(
+ http=True,
+ https=False,
+ http_port=80,
+ https_port=443,
+ sandbox=False,
+ )
+ )
+ self.execute_module_devices(changed=False, commands=[])
+
+ def test_nxos_nxapi_disable(self):
+ set_module_args(dict(state="absent"))
+ self.execute_module_devices(
+ changed=True, commands=["no feature nxapi"]
+ )
+
+ def test_nxos_nxapi_no_http(self):
+ set_module_args(dict(https=True, http=False, https_port=8443))
+ self.execute_module_devices(
+ changed=True, commands=["no nxapi http", "nxapi https port 8443"]
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospf.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospf.py
new file mode 100644
index 00000000..5cc4102a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospf.py
@@ -0,0 +1,62 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_ospf
+from .nxos_module import TestNxosModule, set_module_args
+
+
+class TestNxosOspfModule(TestNxosModule):
+
+ module = nxos_ospf
+
+ def setUp(self):
+ super(TestNxosOspfModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_ospf.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_ospf.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosOspfModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.load_config.return_value = None
+
+ def test_nxos_ospf_present(self):
+ set_module_args(dict(ospf=1, state="present"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["router ospf 1"])
+
+ def test_nxos_ospf_absent(self):
+ set_module_args(dict(ospf=1, state="absent"))
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospf_interfaces.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospf_interfaces.py
new file mode 100644
index 00000000..305b46bb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospf_interfaces.py
@@ -0,0 +1,1572 @@
+# (c) 2020 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from textwrap import dedent
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules import nxos_ospf_interfaces
+
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+ignore_provider_arg = True
+
+
+class TestNxosOspfInterfacesModule(TestNxosModule):
+
+ # Testing strategy
+ # ------------------
+ # (a) The unit tests cover `merged` and `replaced` for every attribute.
+ # Since `overridden` is essentially `replaced` but at a larger
+ # scale, these indirectly cover `overridden` as well.
+ # (b) For linear attributes replaced is not valid and hence, those tests
+ # delete the attributes from the config subsection.
+
+ module = nxos_ospf_interfaces
+
+ def setUp(self):
+ super(TestNxosOspfInterfacesModule, self).setUp()
+
+ self.mock_get_resource_connection = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module.get_resource_connection"
+ )
+ self.get_resource_connection = (
+ self.mock_get_resource_connection.start()
+ )
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.ospf_interfaces.ospf_interfaces.Ospf_interfacesFacts.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosOspfInterfacesModule, self).tearDown()
+ self.get_resource_connection.stop()
+ self.get_config.stop()
+
+ def test_nxos_ospf_interfaces_af_process_area_merged(self):
+ # test merged for config->af->processes->area
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip router ospf 100 area 1.1.1.1 secondaries none
+ interface Ethernet1/2
+ no switchport
+ ip router ospf 101 area 2.2.2.2
+ ipv6 router ospfv3 100 area 4.4.4.4
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv4",
+ processes=[
+ dict(
+ process_id="102",
+ area=dict(area_id="1.1.1.2"),
+ )
+ ],
+ ),
+ dict(
+ afi="ipv6",
+ processes=[
+ dict(
+ process_id="200",
+ area=dict(area_id="2.2.2.8"),
+ )
+ ],
+ ),
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(
+ afi="ipv4",
+ processes=[
+ dict(
+ process_id="101",
+ area=dict(area_id="2.2.2.3"),
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/3",
+ address_family=[
+ dict(
+ afi="ipv6",
+ processes=[
+ dict(
+ process_id="300",
+ area=dict(
+ area_id="2.2.2.3",
+ secondaries="False",
+ ),
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "ip router ospf 102 area 1.1.1.2",
+ "ipv6 router ospfv3 200 area 2.2.2.8",
+ "interface Ethernet1/2",
+ "ip router ospf 101 area 2.2.2.3",
+ "interface Ethernet1/3",
+ "ipv6 router ospfv3 300 area 2.2.2.3 secondaries none",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_af_process_area_replaced(self):
+ # test replaced for config->af->processes->area
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip router ospf 100 area 1.1.1.1 secondaries none
+ interface Ethernet1/2
+ no switchport
+ ip router ospf 101 area 2.2.2.2
+ ipv6 router ospfv3 100 area 4.4.4.4
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv6",
+ processes=[
+ dict(
+ process_id="200",
+ area=dict(area_id="2.2.2.8"),
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(
+ afi="ipv4",
+ processes=[
+ dict(
+ process_id="102",
+ area=dict(area_id="1.1.1.2"),
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "no ip router ospf 100 area 1.1.1.1 secondaries none",
+ "ipv6 router ospfv3 200 area 2.2.2.8",
+ "interface Ethernet1/2",
+ "no ip router ospf 101 area 2.2.2.2",
+ "ip router ospf 102 area 1.1.1.2",
+ "no ipv6 router ospfv3 100 area 4.4.4.4",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_af_process_multiareas_merged(self):
+ # test merged for config->af->processes->multiareas
+ # processes->multiareas is only valid for IPv6
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ipv6 router ospfv3 100 multi-area 1.1.1.1
+ ipv6 router ospfv3 100 multi-area 1.1.1.2
+ ipv6 router ospfv3 102 multi-area 2.2.2.1
+ ipv6 router ospfv3 102 multi-area 2.2.2.2
+ interface Ethernet1/2
+ no switchport
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv6",
+ processes=[
+ dict(
+ process_id="100",
+ multi_areas=["1.1.1.3"],
+ ),
+ dict(
+ process_id="200",
+ multi_areas=["3.3.3.3", "4.4.4.4"],
+ ),
+ ],
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(
+ afi="ipv6",
+ processes=[
+ dict(
+ process_id="109",
+ multi_areas=["5.5.5.5", "5.5.5.6"],
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "ipv6 router ospfv3 100 multi-area 1.1.1.3",
+ "ipv6 router ospfv3 200 multi-area 3.3.3.3",
+ "ipv6 router ospfv3 200 multi-area 4.4.4.4",
+ "interface Ethernet1/2",
+ "ipv6 router ospfv3 109 multi-area 5.5.5.5",
+ "ipv6 router ospfv3 109 multi-area 5.5.5.6",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_af_process_multiareas_replaced(self):
+ # test replaced for config->af->processes->multiareas
+ # processes->multiareas is only valid for IPv6
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ipv6 router ospfv3 100 multi-area 1.1.1.1
+ ipv6 router ospfv3 100 multi-area 1.1.1.2
+ ipv6 router ospfv3 102 multi-area 2.2.2.1
+ ipv6 router ospfv3 102 multi-area 2.2.2.2
+ interface Ethernet1/2
+ no switchport
+ ipv6 router ospfv3 109 multi-area 5.5.5.5
+ ipv6 router ospfv3 200 multi-area 4.2.2.1
+ ipv6 router ospfv3 200 multi-area 4.2.2.2
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv6",
+ processes=[
+ dict(
+ process_id="100",
+ multi_areas=["1.1.1.3"],
+ ),
+ dict(
+ process_id="102",
+ multi_areas=["2.2.2.2"],
+ ),
+ dict(
+ process_id="200",
+ multi_areas=["3.3.3.3", "4.4.4.4"],
+ ),
+ ],
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(
+ afi="ipv6",
+ processes=[
+ dict(
+ process_id="109",
+ multi_areas=["5.5.5.6"],
+ )
+ ],
+ )
+ ],
+ ),
+ ],
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "no ipv6 router ospfv3 100 multi-area 1.1.1.1",
+ "no ipv6 router ospfv3 100 multi-area 1.1.1.2",
+ "no ipv6 router ospfv3 102 multi-area 2.2.2.1",
+ "ipv6 router ospfv3 100 multi-area 1.1.1.3",
+ "ipv6 router ospfv3 200 multi-area 3.3.3.3",
+ "ipv6 router ospfv3 200 multi-area 4.4.4.4",
+ "interface Ethernet1/2",
+ "no ipv6 router ospfv3 109 multi-area 5.5.5.5",
+ "no ipv6 router ospfv3 200 multi-area 4.2.2.1",
+ "no ipv6 router ospfv3 200 multi-area 4.2.2.2",
+ "ipv6 router ospfv3 109 multi-area 5.5.5.6",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_af_multiareas_merged(self):
+ # test merged for config->af->multiareas
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip router ospf multi-area 1.1.1.1
+ ip router ospf multi-area 1.1.1.2
+ ipv6 router ospfv3 multi-area 2.2.2.1
+ ipv6 router ospfv3 multi-area 2.2.2.2
+ interface Ethernet1/2
+ no switchport
+ ipv6 router ospfv3 multi-area 5.5.5.5
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv4", multi_areas=["1.1.1.1", "1.1.1.3"]
+ ),
+ dict(
+ afi="ipv6", multi_areas=["3.3.3.3", "4.4.4.4"]
+ ),
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(afi="ipv6", multi_areas=["5.5.5.6"])
+ ],
+ ),
+ ],
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "ip router ospf multi-area 1.1.1.3",
+ "ipv6 router ospfv3 multi-area 3.3.3.3",
+ "ipv6 router ospfv3 multi-area 4.4.4.4",
+ "interface Ethernet1/2",
+ "ipv6 router ospfv3 multi-area 5.5.5.6",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_af_multiareas_replaced(self):
+ # test replaced for config->af->multiareas
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip router ospf multi-area 1.1.1.1
+ ip router ospf multi-area 1.1.1.2
+ ipv6 router ospfv3 multi-area 2.2.2.1
+ ipv6 router ospfv3 multi-area 2.2.2.2
+ interface Ethernet1/2
+ no switchport
+ ipv6 router ospfv3 multi-area 5.5.5.5
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv4", multi_areas=["1.1.1.1", "1.1.1.3"]
+ ),
+ dict(
+ afi="ipv6", multi_areas=["3.3.3.3", "4.4.4.4"]
+ ),
+ ],
+ ),
+ dict(name="Ethernet1/2"),
+ ],
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "no ip router ospf multi-area 1.1.1.2",
+ "no ipv6 router ospfv3 multi-area 2.2.2.1",
+ "no ipv6 router ospfv3 multi-area 2.2.2.2",
+ "ip router ospf multi-area 1.1.1.3",
+ "ipv6 router ospfv3 multi-area 3.3.3.3",
+ "ipv6 router ospfv3 multi-area 4.4.4.4",
+ "interface Ethernet1/2",
+ "no ipv6 router ospfv3 multi-area 5.5.5.5",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_authentication_merged(self):
+ # test merged for config->af->authentication
+ # only valid for IPv4
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf authentication
+ interface Ethernet1/2
+ no switchport
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ ip ospf authentication
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv4",
+ authentication=dict(
+ key_chain="test-1", message_digest=True
+ ),
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(
+ afi="ipv4", authentication=dict(null_auth=True)
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/3",
+ address_family=[
+ dict(afi="ipv4", authentication=dict(enable=True))
+ ],
+ ),
+ dict(
+ name="Ethernet1/4",
+ address_family=[
+ dict(afi="ipv4", authentication=dict(enable=False))
+ ],
+ ),
+ ],
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "ip ospf authentication message-digest",
+ "ip ospf authentication key-chain test-1",
+ "interface Ethernet1/2",
+ "ip ospf authentication null",
+ "interface Ethernet1/3",
+ "ip ospf authentication",
+ "interface Ethernet1/4",
+ "no ip ospf authentication",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_authentication_replaced(self):
+ # test merged for config->af->authentication
+ # only valid for IPv4
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf authentication message-digest
+ ip ospf authentication key-chain test-1
+ interface Ethernet1/2
+ no switchport
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(name="Ethernet1/1"),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(
+ afi="ipv4", authentication=dict(null_auth=True)
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/3",
+ address_family=[
+ dict(afi="ipv4", authentication=dict(enable=True))
+ ],
+ ),
+ ],
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "no ip ospf authentication message-digest",
+ "no ip ospf authentication key-chain test-1",
+ "interface Ethernet1/2",
+ "ip ospf authentication null",
+ "interface Ethernet1/3",
+ "ip ospf authentication",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_authentication_key_merged(self):
+ # test merged for config->af->authentication_key
+ # only valid for IPv4
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf authentication-key 3 abc01d272be25d29
+ interface Ethernet1/2
+ no switchport
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv4",
+ authentication_key=dict(
+ encryption=3, key="77840f9d4d882176"
+ ),
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(
+ afi="ipv4",
+ authentication_key=dict(
+ encryption=0, key="password"
+ ),
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/3",
+ address_family=[
+ dict(
+ afi="ipv4",
+ authentication_key=dict(
+ encryption=7, key="712090404011C031628"
+ ),
+ )
+ ],
+ ),
+ ],
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "ip ospf authentication-key 3 77840f9d4d882176",
+ "interface Ethernet1/2",
+ "ip ospf authentication-key 0 password",
+ "interface Ethernet1/3",
+ "ip ospf authentication-key 7 712090404011C031628",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_authentication_key_replaced(self):
+ # test replaced for config->af->authentication_key
+ # only valid for IPv4
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf authentication-key 3 abc01d272be25d29
+ interface Ethernet1/2
+ no switchport
+ interface Ethernet1/3
+ no switchport
+ ip ospf authentication-key 7 712090404011C031628
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(name="Ethernet1/1"),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(
+ afi="ipv4",
+ authentication_key=dict(
+ encryption=0, key="password"
+ ),
+ )
+ ],
+ ),
+ ],
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "no ip ospf authentication-key 3 abc01d272be25d29",
+ "interface Ethernet1/2",
+ "ip ospf authentication-key 0 password",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_message_digest_key_merged(self):
+ # test merged for config->af->message_digest_key
+ # only valid for IPv4
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf message-digest-key 101 md5 3 109a86e9d947cc5d
+ interface Ethernet1/2
+ no switchport
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv4",
+ message_digest_key=dict(
+ key_id=101,
+ encryption=3,
+ key="abc01d272be25d29",
+ ),
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(
+ afi="ipv4",
+ message_digest_key=dict(
+ key_id=1, encryption=0, key="password"
+ ),
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/3",
+ address_family=[
+ dict(
+ afi="ipv4",
+ message_digest_key=dict(
+ key_id=2,
+ encryption=7,
+ key="712090404011C031628",
+ ),
+ )
+ ],
+ ),
+ ],
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "ip ospf message-digest-key 101 md5 3 abc01d272be25d29",
+ "interface Ethernet1/2",
+ "ip ospf message-digest-key 1 md5 0 password",
+ "interface Ethernet1/3",
+ "ip ospf message-digest-key 2 md5 7 712090404011C031628",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_message_digest_key_replaced(self):
+ # test replaced for config->af->message_digest_key
+ # only valid for IPv4
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf message-digest-key 101 md5 3 109a86e9d947cc5d
+ interface Ethernet1/2
+ no switchport
+ ip ospf message-digest-key 1 md5 0 password
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(name="Ethernet1/1"),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(
+ afi="ipv4",
+ message_digest_key=dict(
+ key_id=1, encryption=0, key="password1"
+ ),
+ )
+ ],
+ ),
+ ],
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "no ip ospf message-digest-key 101 md5 3 109a86e9d947cc5d",
+ "interface Ethernet1/2",
+ "ip ospf message-digest-key 1 md5 0 password1",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_linear_args_1_merged(self):
+ # test merged for config->af->cost, dead_interval, hello_interval
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf cost 100
+ ospfv3 cost 120
+ ip ospf dead-interval 2400
+ ospfv3 dead-interval 1200
+ ip ospf hello-interval 9000
+ interface Ethernet1/2
+ no switchport
+ ip ospf cost 110
+ ip ospf dead-interval 3000
+ ospfv3 hello-interval 8000
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(afi="ipv4", cost=200),
+ dict(
+ afi="ipv6",
+ dead_interval=5000,
+ hello_interval=9000,
+ ),
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(
+ afi="ipv4",
+ cost=120,
+ dead_interval=3400,
+ hello_interval=8100,
+ ),
+ dict(afi="ipv6", cost=180, dead_interval=3000),
+ ],
+ ),
+ ],
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "ip ospf cost 200",
+ "ospfv3 dead-interval 5000",
+ "ospfv3 hello-interval 9000",
+ "interface Ethernet1/2",
+ "ip ospf cost 120",
+ "ip ospf dead-interval 3400",
+ "ospfv3 cost 180",
+ "ospfv3 dead-interval 3000",
+ "ip ospf hello-interval 8100",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_linear_args_1_replaced(self):
+ # test replaced for config->af->cost, dead_interval, hello_interval
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf cost 100
+ ospfv3 cost 120
+ ip ospf dead-interval 2400
+ ospfv3 dead-interval 1200
+ ip ospf hello-interval 9000
+ interface Ethernet1/2
+ no switchport
+ ip ospf cost 110
+ ip ospf dead-interval 3000
+ ospfv3 hello-interval 8000
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(afi="ipv4", cost=200, hello_interval=9000)
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(afi="ipv6", cost=180, dead_interval=3000)
+ ],
+ ),
+ ],
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "ip ospf cost 200",
+ "no ospfv3 cost 120",
+ "no ip ospf dead-interval 2400",
+ "no ospfv3 dead-interval 1200",
+ "interface Ethernet1/2",
+ "no ip ospf cost 110",
+ "no ip ospf dead-interval 3000",
+ "no ospfv3 hello-interval 8000",
+ "ospfv3 cost 180",
+ "ospfv3 dead-interval 3000",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_linear_args_2_merged(self):
+ # test merged for config->af->instance, mtu_ignore, network
+ # `instance` is only valid for IPv6
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ospfv3 instance 200
+ interface Ethernet1/2
+ no switchport
+ ip ospf mtu-ignore
+ ip ospf network broadcast
+ ospfv3 network point-to-point
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv4",
+ mtu_ignore=True,
+ network="point-to-point",
+ ),
+ dict(afi="ipv6", instance=210),
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(afi="ipv4", mtu_ignore=False),
+ dict(afi="ipv6", network="broadcast"),
+ ],
+ ),
+ ],
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "ip ospf mtu-ignore",
+ "ip ospf network point-to-point",
+ "ospfv3 instance 210",
+ "interface Ethernet1/2",
+ "no ip ospf mtu-ignore",
+ "ospfv3 network broadcast",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_linear_args_2_replaced(self):
+ # test replaced for config->af->instance, mtu_ignore, network
+ # `instance` is only valid for IPv6
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf mtu-ignore
+ ospfv3 instance 200
+ interface Ethernet1/2
+ no switchport
+ ip ospf mtu-ignore
+ ip ospf network broadcast
+ ospfv3 network point-to-point
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv4",
+ mtu_ignore=False,
+ network="point-to-point",
+ ),
+ dict(afi="ipv6", instance=200),
+ ],
+ ),
+ dict(name="Ethernet1/2"),
+ ],
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "no ip ospf mtu-ignore",
+ "ip ospf network point-to-point",
+ "interface Ethernet1/2",
+ "no ip ospf mtu-ignore",
+ "no ip ospf network broadcast",
+ "no ospfv3 network point-to-point",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_linear_args_3_merged(self):
+ # test merged for config->af->passive_interface, priority, retransmit_interval
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf passive-interface
+ ip ospf priority 120
+ ospfv3 retransmit-interval 4800
+ interface Ethernet1/2
+ no switchport
+ ip ospf retransmit-interval 5000
+ ospfv3 passive-interface
+ ospfv3 priority 140
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv4",
+ passive_interface=False,
+ retransmit_interval=8000,
+ ),
+ dict(afi="ipv6", passive_interface=True),
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(
+ afi="ipv4",
+ passive_interface=True,
+ retransmit_interval=5000,
+ )
+ ],
+ ),
+ dict(
+ name="Ethernet1/3",
+ address_family=[
+ dict(
+ afi="ipv4",
+ passive_interface=True,
+ priority=200,
+ ),
+ dict(afi="ipv6", retransmit_interval=5100),
+ ],
+ ),
+ ],
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "no ip ospf passive-interface",
+ "ospfv3 passive-interface",
+ "ip ospf retransmit-interval 8000",
+ "interface Ethernet1/2",
+ "ip ospf passive-interface",
+ "interface Ethernet1/3",
+ "ip ospf passive-interface",
+ "ip ospf priority 200",
+ "ospfv3 retransmit-interval 5100",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_linear_args_3_replaced(self):
+ # test merged for config->af->passive_interface, priority, retransmit_interval
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf passive-interface
+ ip ospf priority 120
+ ospfv3 retransmit-interval 4800
+ interface Ethernet1/2
+ no switchport
+ ip ospf retransmit-interval 5000
+ ospfv3 passive-interface
+ ospfv3 priority 140
+ interface Ethernet1/3
+ no switchport
+ ip ospf passive-interface
+ ip ospf priority 200
+ ospfv3 retransmit-interval 5100
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(name="Ethernet1/1"),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(afi="ipv4", retransmit_interval=5100),
+ dict(
+ afi="ipv6",
+ passive_interface=True,
+ priority=140,
+ ),
+ ],
+ ),
+ ],
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "no ip ospf passive-interface",
+ "no ip ospf priority 120",
+ "no ospfv3 retransmit-interval 4800",
+ "interface Ethernet1/2",
+ "ip ospf retransmit-interval 5100",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_linear_args_4_merged(self):
+ # test merged for config->af->shutdown, transmit_delay
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf shutdown
+ ospfv3 transmit-delay 200
+ interface Ethernet1/2
+ no switchport
+ ip ospf transmit-delay 210
+ ospfv3 shutdown
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv4", shutdown=False, transmit_delay=210
+ ),
+ dict(afi="ipv6", shutdown=True),
+ ],
+ ),
+ dict(
+ name="Ethernet1/2",
+ address_family=[
+ dict(afi="ipv4", shutdown=True),
+ dict(afi="ipv6", transmit_delay=300),
+ ],
+ ),
+ dict(
+ name="Ethernet1/3",
+ address_family=[
+ dict(
+ afi="ipv4", shutdown=True, transmit_delay=430
+ ),
+ dict(
+ afi="ipv6", shutdown=True, transmit_delay=120
+ ),
+ ],
+ ),
+ ],
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "no ip ospf shutdown",
+ "ip ospf transmit-delay 210",
+ "ospfv3 shutdown",
+ "interface Ethernet1/2",
+ "ip ospf shutdown",
+ "ospfv3 transmit-delay 300",
+ "interface Ethernet1/3",
+ "ip ospf shutdown",
+ "ip ospf transmit-delay 430",
+ "ospfv3 shutdown",
+ "ospfv3 transmit-delay 120",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_linear_args_4_replaced(self):
+ # test replaced for config->af->shutdown, transmit_delay
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf shutdown
+ ospfv3 transmit-delay 200
+ interface Ethernet1/2
+ no switchport
+ ip ospf transmit-delay 210
+ ospfv3 shutdown
+ interface Ethernet1/3
+ no switchport
+ ip ospf shutdown
+ ip ospf transmit-delay 430
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(name="Ethernet1/1"),
+ dict(
+ name="Ethernet1/2",
+ address_family=[dict(afi="ipv6", transmit_delay=300)],
+ ),
+ ],
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "no ip ospf shutdown",
+ "no ospfv3 transmit-delay 200",
+ "interface Ethernet1/2",
+ "no ospfv3 shutdown",
+ "no ip ospf transmit-delay 210",
+ "ospfv3 transmit-delay 300",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_parsed(self):
+ # test parsed
+ set_module_args(
+ dict(
+ running_config=dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip router ospf 102 area 1.1.1.2 secondaries none
+ ipv6 router ospfv3 200 area 2.2.2.8
+ interface Ethernet1/2
+ no switchport
+ ipv6 router ospfv3 210 multi-area 3.3.3.3
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ ),
+ state="parsed",
+ ),
+ ignore_provider_arg,
+ )
+ parsed = [
+ {
+ "name": "Ethernet1/1",
+ "address_family": [
+ {
+ "afi": "ipv4",
+ "processes": [
+ {
+ "process_id": "102",
+ "area": {
+ "area_id": "1.1.1.2",
+ "secondaries": False,
+ },
+ }
+ ],
+ },
+ {
+ "afi": "ipv6",
+ "processes": [
+ {
+ "process_id": "200",
+ "area": {"area_id": "2.2.2.8"},
+ }
+ ],
+ },
+ ],
+ },
+ {
+ "name": "Ethernet1/2",
+ "address_family": [
+ {
+ "afi": "ipv6",
+ "processes": [
+ {"process_id": "210", "multi_areas": ["3.3.3.3"]}
+ ],
+ }
+ ],
+ },
+ {"name": "Ethernet1/3"},
+ {"name": "Ethernet1/4"},
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["parsed"], parsed)
+
+ def test_nxos_ospf_interfaces_gathered(self):
+ # test gathered
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip router ospf 102 area 1.1.1.2 secondaries none
+ ipv6 router ospfv3 200 area 2.2.2.8
+ interface Ethernet1/2
+ no switchport
+ ipv6 router ospfv3 210 multi-area 3.3.3.3
+ interface Ethernet1/3
+ no switchport
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(dict(state="gathered"), ignore_provider_arg)
+ gathered = [
+ {
+ "name": "Ethernet1/1",
+ "address_family": [
+ {
+ "afi": "ipv4",
+ "processes": [
+ {
+ "process_id": "102",
+ "area": {
+ "area_id": "1.1.1.2",
+ "secondaries": False,
+ },
+ }
+ ],
+ },
+ {
+ "afi": "ipv6",
+ "processes": [
+ {
+ "process_id": "200",
+ "area": {"area_id": "2.2.2.8"},
+ }
+ ],
+ },
+ ],
+ },
+ {
+ "name": "Ethernet1/2",
+ "address_family": [
+ {
+ "afi": "ipv6",
+ "processes": [
+ {"process_id": "210", "multi_areas": ["3.3.3.3"]}
+ ],
+ }
+ ],
+ },
+ {"name": "Ethernet1/3"},
+ {"name": "Ethernet1/4"},
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["gathered"], gathered)
+
+ def test_nxos_ospf_interfaces_sanity(self):
+ # test gathered
+ self.get_config.return_value = dedent(
+ """
+ """
+ )
+ set_module_args(dict(state="gathered"), ignore_provider_arg)
+ gathered = []
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["gathered"], gathered)
+
+ def test_nxos_ospf_interfaces_overridden(self):
+ # test overriden
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf shutdown
+ ospfv3 transmit-delay 200
+ interface Ethernet1/2
+ no switchport
+ ip ospf transmit-delay 210
+ ospfv3 shutdown
+ interface Ethernet1/3
+ no switchport
+ ip ospf message-digest-key 101 md5 3 109a86e9d947cc5d
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ name="Ethernet1/1",
+ address_family=[
+ dict(
+ afi="ipv4", shutdown=False, transmit_delay=300
+ ),
+ dict(afi="ipv6", shutdown=True),
+ ],
+ )
+ ],
+ state="overridden",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "ip ospf transmit-delay 300",
+ "no ip ospf shutdown",
+ "no ospfv3 transmit-delay 200",
+ "ospfv3 shutdown",
+ "interface Ethernet1/2",
+ "no ip ospf transmit-delay 210",
+ "no ospfv3 shutdown",
+ "interface Ethernet1/3",
+ "no ip ospf message-digest-key 101 md5 3 109a86e9d947cc5d",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_deleted(self):
+ # test deleted
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf shutdown
+ ospfv3 transmit-delay 200
+ interface Ethernet1/2
+ no switchport
+ ip ospf transmit-delay 210
+ ospfv3 shutdown
+ interface Ethernet1/3
+ no switchport
+ ip ospf message-digest-key 101 md5 3 109a86e9d947cc5d
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(
+ dict(config=[dict(name="Ethernet1/1")], state="deleted"),
+ ignore_provider_arg,
+ )
+ commands = [
+ "interface Ethernet1/1",
+ "no ip ospf shutdown",
+ "no ospfv3 transmit-delay 200",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospf_interfaces_deleted_all(self):
+ # test deleted
+ self.get_config.return_value = dedent(
+ """\
+ interface Ethernet1/1
+ no switchport
+ ip ospf shutdown
+ ospfv3 transmit-delay 200
+ interface Ethernet1/2
+ no switchport
+ ip ospf transmit-delay 210
+ ospfv3 shutdown
+ interface Ethernet1/3
+ no switchport
+ ip ospf message-digest-key 101 md5 3 109a86e9d947cc5d
+ interface Ethernet1/4
+ no switchport
+ """
+ )
+ set_module_args(dict(state="deleted"), ignore_provider_arg)
+ commands = [
+ "interface Ethernet1/1",
+ "no ip ospf shutdown",
+ "no ospfv3 transmit-delay 200",
+ "interface Ethernet1/2",
+ "no ip ospf transmit-delay 210",
+ "no ospfv3 shutdown",
+ "interface Ethernet1/3",
+ "no ip ospf message-digest-key 101 md5 3 109a86e9d947cc5d",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospf_vrf.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospf_vrf.py
new file mode 100644
index 00000000..75445330
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospf_vrf.py
@@ -0,0 +1,116 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_ospf_vrf
+from .nxos_module import TestNxosModule, set_module_args
+
+
+class TestNxosOspfVrfModule(TestNxosModule):
+
+ module = nxos_ospf_vrf
+
+ def setUp(self):
+ super(TestNxosOspfVrfModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_ospf_vrf.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_ospf_vrf.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosOspfVrfModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.load_config.return_value = None
+
+ def test_nxos_ospf_vrf_present(self):
+ set_module_args(
+ dict(
+ ospf=1,
+ vrf="test",
+ timer_throttle_spf_start=50,
+ timer_throttle_spf_hold=1000,
+ timer_throttle_spf_max=2000,
+ timer_throttle_lsa_start=60,
+ timer_throttle_lsa_hold=1100,
+ timer_throttle_lsa_max=3000,
+ bfd="enable",
+ state="present",
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ sorted(result["commands"]),
+ sorted(
+ [
+ "router ospf 1",
+ "vrf test",
+ "timers throttle lsa 60 1100 3000",
+ "timers throttle spf 50 1000 2000",
+ "bfd",
+ ]
+ ),
+ )
+
+ def test_nxos_ospf_vrf_absent(self):
+ set_module_args(dict(ospf=1, vrf="test", state="absent"))
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_bfd_1(self):
+ self.get_config.return_value = "router ospf 1\n bfd\nrouter ospf 2"
+ # enable -> disable
+ set_module_args(dict(ospf=1, bfd="disable"))
+ self.execute_module(changed=True, commands=["router ospf 1", "no bfd"])
+
+ # disable -> enable
+ set_module_args(dict(ospf=2, bfd="enable"))
+ self.execute_module(changed=True, commands=["router ospf 2", "bfd"])
+
+ def test_bfd_2(self):
+ # enable idempotence
+ self.get_config.return_value = "router ospf 1\n bfd\nrouter ospf 2"
+ set_module_args(dict(ospf=1, bfd="enable"))
+ self.execute_module(changed=False)
+
+ # disable idempotence
+ set_module_args(dict(ospf=2, bfd="disable"))
+ self.execute_module(changed=False)
+
+ def test_bfd_3(self):
+ # absent tests
+ self.get_config.return_value = "router ospf 1\n bfd\nrouter ospf 2"
+ set_module_args(dict(ospf=1, state="absent"))
+ self.execute_module(changed=True, commands=["router ospf 1", "no bfd"])
+
+ # absent w/bfd disable
+ set_module_args(dict(ospf=2, state="absent"))
+ self.execute_module(changed=False)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospfv2.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospfv2.py
new file mode 100644
index 00000000..0dc66489
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospfv2.py
@@ -0,0 +1,588 @@
+# (c) 2019 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from textwrap import dedent
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules import nxos_ospfv2
+
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+ignore_provider_arg = True
+
+
+class TestNxosOspfv2Module(TestNxosModule):
+
+ module = nxos_ospfv2
+
+ def setUp(self):
+ super(TestNxosOspfv2Module, self).setUp()
+
+ self.mock_get_resource_connection = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module.get_resource_connection"
+ )
+ self.get_resource_connection = (
+ self.mock_get_resource_connection.start()
+ )
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.ospfv2.ospfv2.Ospfv2Facts.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosOspfv2Module, self).tearDown()
+ self.get_resource_connection.stop()
+ self.get_config.stop()
+
+ def test_nxos_ospfv2_merged(self):
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ router_id="203.0.113.20",
+ redistribute=[
+ dict(
+ protocol="eigrp",
+ id="100",
+ route_map="rmap_1",
+ ),
+ dict(
+ protocol="direct",
+ route_map="direct-connect",
+ ),
+ ],
+ log_adjacency_changes=dict(detail=True),
+ ),
+ dict(
+ process_id="200",
+ router_id="198.51.100.1",
+ areas=[
+ dict(
+ area_id="0.0.0.100",
+ filter_list=[
+ dict(
+ route_map="rmap_1", direction="in"
+ ),
+ dict(
+ route_map="rmap_2", direction="out"
+ ),
+ ],
+ ranges=[
+ dict(prefix="198.51.100.64/27"),
+ dict(prefix="198.51.100.96/27"),
+ ],
+ ),
+ dict(
+ area_id="0.0.0.101",
+ authentication=dict(message_digest=True),
+ ),
+ ],
+ ),
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospf 100",
+ "router-id 203.0.113.20",
+ "redistribute eigrp 100 route-map rmap_1",
+ "redistribute direct route-map direct-connect",
+ "log-adjacency-changes detail",
+ "router ospf 200",
+ "router-id 198.51.100.1",
+ "area 0.0.0.100 filter-list route-map rmap_1 in",
+ "area 0.0.0.100 filter-list route-map rmap_2 out",
+ "area 0.0.0.100 range 198.51.100.64/27",
+ "area 0.0.0.100 range 198.51.100.96/27",
+ "area 0.0.0.101 authentication message-digest",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv2_merged_idempotent(self):
+ self.get_config.return_value = dedent(
+ """\
+ router ospf 100
+ router-id 203.0.113.20
+ redistribute eigrp 100 route-map rmap_1
+ redistribute direct route-map direct-connect
+ router ospf 200
+ router-id 198.51.100.1
+ area 0.0.0.100 filter-list route-map rmap_1 in
+ area 0.0.0.100 filter-list route-map rmap_2 out
+ area 0.0.0.100 range 198.51.100.64/27
+ area 0.0.0.100 range 198.51.100.96/27
+ area 0.0.0.101 authentication message-digest
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ router_id="203.0.113.20",
+ redistribute=[
+ dict(
+ protocol="eigrp",
+ id="100",
+ route_map="rmap_1",
+ ),
+ dict(
+ protocol="direct",
+ route_map="direct-connect",
+ ),
+ ],
+ ),
+ dict(
+ process_id="200",
+ router_id="198.51.100.1",
+ areas=[
+ dict(
+ area_id="0.0.0.100",
+ filter_list=[
+ dict(
+ route_map="rmap_1", direction="in"
+ ),
+ dict(
+ route_map="rmap_2", direction="out"
+ ),
+ ],
+ ranges=[
+ dict(prefix="198.51.100.64/27"),
+ dict(prefix="198.51.100.96/27"),
+ ],
+ ),
+ dict(
+ area_id="0.0.0.101",
+ authentication=dict(message_digest=True),
+ ),
+ ],
+ ),
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_ospfv2_merged_update(self):
+ self.get_config.return_value = dedent(
+ """\
+ router ospf 100
+ router-id 203.0.113.20
+ redistribute eigrp 100 route-map rmap_1
+ redistribute direct route-map direct-connect
+ router ospf 200
+ router-id 198.51.100.1
+ area 0.0.0.100 filter-list route-map rmap_1 in
+ area 0.0.0.100 filter-list route-map rmap_2 out
+ area 0.0.0.100 range 198.51.100.64/27
+ area 0.0.0.100 range 198.51.100.96/27
+ area 0.0.0.101 authentication message-digest
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ router_id="203.0.113.20",
+ redistribute=[
+ dict(
+ protocol="eigrp",
+ id="100",
+ route_map="rmap_2",
+ )
+ ],
+ areas=[
+ dict(
+ area_id="0.0.0.101",
+ stub=dict(no_summary=True),
+ )
+ ],
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+
+ commands = [
+ "router ospf 100",
+ "redistribute eigrp 100 route-map rmap_2",
+ "area 0.0.0.101 stub no-summary",
+ ]
+
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv2_replaced(self):
+ self.get_config.return_value = dedent(
+ """\
+ router ospf 100
+ router-id 203.0.113.20
+ redistribute eigrp 100 route-map rmap_1
+ redistribute direct route-map direct-connect
+ router ospf 200
+ router-id 198.51.100.1
+ area 0.0.0.100 filter-list route-map rmap_1 in
+ area 0.0.0.100 filter-list route-map rmap_2 out
+ area 0.0.0.100 range 198.51.100.64/27
+ area 0.0.0.100 range 198.51.100.96/27
+ area 0.0.0.101 authentication message-digest
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ router_id="203.0.113.20",
+ areas=[
+ dict(
+ area_id="0.0.0.101",
+ stub=dict(no_summary=True),
+ )
+ ],
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospf 100",
+ "no redistribute eigrp 100 route-map rmap_1",
+ "no redistribute direct route-map direct-connect",
+ "area 0.0.0.101 stub no-summary",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv2_replaced_idempotent(self):
+ self.get_config.return_value = dedent(
+ """\
+ router ospf 100
+ router-id 203.0.113.20
+ redistribute eigrp 100 route-map rmap_1
+ redistribute direct route-map direct-connect
+ router ospf 200
+ router-id 198.51.100.1
+ area 0.0.0.100 filter-list route-map rmap_1 in
+ area 0.0.0.100 filter-list route-map rmap_2 out
+ area 0.0.0.100 range 198.51.100.64/27
+ area 0.0.0.100 range 198.51.100.96/27
+ area 0.0.0.101 authentication message-digest
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ router_id="203.0.113.20",
+ redistribute=[
+ dict(
+ protocol="eigrp",
+ id="100",
+ route_map="rmap_1",
+ ),
+ dict(
+ protocol="direct",
+ route_map="direct-connect",
+ ),
+ ],
+ ),
+ dict(
+ process_id="200",
+ router_id="198.51.100.1",
+ areas=[
+ dict(
+ area_id="0.0.0.100",
+ filter_list=[
+ dict(
+ route_map="rmap_1", direction="in"
+ ),
+ dict(
+ route_map="rmap_2", direction="out"
+ ),
+ ],
+ ranges=[
+ dict(prefix="198.51.100.64/27"),
+ dict(prefix="198.51.100.96/27"),
+ ],
+ ),
+ dict(
+ area_id="0.0.0.101",
+ authentication=dict(message_digest=True),
+ ),
+ ],
+ ),
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_ospfv2_overridden(self):
+ self.get_config.return_value = dedent(
+ """\
+ router ospf 100
+ router-id 203.0.113.20
+ redistribute eigrp 100 route-map rmap_1
+ redistribute direct route-map direct-connect
+ router ospf 200
+ router-id 198.51.100.1
+ area 0.0.0.100 filter-list route-map rmap_1 in
+ area 0.0.0.100 filter-list route-map rmap_2 out
+ area 0.0.0.100 range 198.51.100.64/27
+ area 0.0.0.100 range 198.51.100.96/27
+ area 0.0.0.101 authentication message-digest
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(process_id="300", router_id="203.0.113.20")
+ ]
+ ),
+ state="overridden",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "no router ospf 100",
+ "no router ospf 200",
+ "router ospf 300",
+ "router-id 203.0.113.20",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv2_overridden_idempotent(self):
+ self.get_config.return_value = dedent(
+ """\
+ router ospf 100
+ router-id 203.0.113.20
+ redistribute eigrp 100 route-map rmap_1
+ redistribute direct route-map direct-connect
+ router ospf 200
+ router-id 198.51.100.1
+ area 0.0.0.100 filter-list route-map rmap_1 in
+ area 0.0.0.100 filter-list route-map rmap_2 out
+ area 0.0.0.100 range 198.51.100.64/27
+ area 0.0.0.100 range 198.51.100.96/27
+ area 0.0.0.101 authentication message-digest
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ router_id="203.0.113.20",
+ redistribute=[
+ dict(
+ protocol="eigrp",
+ id="100",
+ route_map="rmap_1",
+ ),
+ dict(
+ protocol="direct",
+ route_map="direct-connect",
+ ),
+ ],
+ ),
+ dict(
+ process_id="200",
+ router_id="198.51.100.1",
+ areas=[
+ dict(
+ area_id="0.0.0.100",
+ filter_list=[
+ dict(
+ route_map="rmap_1", direction="in"
+ ),
+ dict(
+ route_map="rmap_2", direction="out"
+ ),
+ ],
+ ranges=[
+ dict(prefix="198.51.100.64/27"),
+ dict(prefix="198.51.100.96/27"),
+ ],
+ ),
+ dict(
+ area_id="0.0.0.101",
+ authentication=dict(message_digest=True),
+ ),
+ ],
+ ),
+ ]
+ ),
+ state="overridden",
+ ),
+ ignore_provider_arg,
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_ospfv2_deleted(self):
+ self.get_config.return_value = dedent(
+ """\
+ router ospf 100
+ router-id 203.0.113.20
+ redistribute eigrp 100 route-map rmap_1
+ redistribute direct route-map direct-connect
+ router ospf 200
+ router-id 198.51.100.1
+ area 0.0.0.100 filter-list route-map rmap_1 in
+ area 0.0.0.100 filter-list route-map rmap_2 out
+ area 0.0.0.100 range 198.51.100.64/27
+ area 0.0.0.100 range 198.51.100.96/27
+ area 0.0.0.101 authentication message-digest
+ router ospf 300
+ router-id 192.0.168.102
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[dict(process_id="100"), dict(process_id="300")]
+ ),
+ state="deleted",
+ ),
+ ignore_provider_arg,
+ )
+ commands = ["no router ospf 100", "no router ospf 300"]
+
+ result = self.execute_module(changed=True)
+ self.assertEqual(sorted(result["commands"]), sorted(commands))
+
+ def test_nxos_ospfv2_deleted_idempotent(self):
+ self.get_config.return_value = dedent(
+ """\
+ router ospf 100
+ router-id 203.0.113.20
+ redistribute eigrp 100 route-map rmap_1
+ redistribute direct route-map direct-connect
+ router ospf 200
+ router-id 198.51.100.1
+ area 0.0.0.100 filter-list route-map rmap_1 in
+ area 0.0.0.100 filter-list route-map rmap_2 out
+ area 0.0.0.100 range 198.51.100.64/27
+ area 0.0.0.100 range 198.51.100.96/27
+ area 0.0.0.101 authentication message-digest
+ router ospf 300
+ router-id 192.0.168.102
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[dict(process_id="400"), dict(process_id="500")]
+ ),
+ state="deleted",
+ ),
+ ignore_provider_arg,
+ )
+
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_ospfv2_deleted_all(self):
+ self.get_config.return_value = dedent(
+ """\
+ router ospf 100
+ router-id 203.0.113.20
+ redistribute eigrp 100 route-map rmap_1
+ redistribute direct route-map direct-connect
+ router ospf 200
+ router-id 198.51.100.1
+ area 0.0.0.100 filter-list route-map rmap_1 in
+ area 0.0.0.100 filter-list route-map rmap_2 out
+ area 0.0.0.100 range 198.51.100.64/27
+ area 0.0.0.100 range 198.51.100.96/27
+ area 0.0.0.101 authentication message-digest
+ router ospf 300
+ router-id 192.0.168.102
+ """
+ )
+ set_module_args(dict(state="deleted"), ignore_provider_arg)
+
+ commands = [
+ "no router ospf 100",
+ "no router ospf 200",
+ "no router ospf 300",
+ ]
+
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv2_process_id_word(self):
+ self.get_config.return_value = dedent(
+ """\
+ router ospf 100
+ router-id 203.0.113.20
+ router ospf TEST-1
+ router-id 198.51.100.1
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(process_id="100", router_id="203.0.113.20"),
+ dict(process_id="TEST-1", router_id="198.51.100.1"),
+ dict(process_id="TEST-2", router_id="198.52.200.1"),
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+
+ commands = ["router ospf TEST-2", "router-id 198.52.200.1"]
+
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospfv3.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospfv3.py
new file mode 100644
index 00000000..13f02582
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_ospfv3.py
@@ -0,0 +1,2260 @@
+# (c) 2020 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from textwrap import dedent
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules import nxos_ospfv3
+
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+ignore_provider_arg = True
+
+
+class TestNxosOspfv3Module(TestNxosModule):
+
+ # Testing strategy
+ # ------------------
+ # (a) The unit tests cover `merged` and `replaced` for every attribute.
+ # Since `overridden` is essentially `replaced` but at a larger
+ # scale, these indirectly cover `overridden` as well.
+ # (b) For linear attributes replaced is not valid and hence, those tests
+ # delete the attributes from the config subsection.
+ # (c) The argspec for VRFs is same as the top-level spec and the config logic
+ # is re-used. Hence, those attributes are not explictly covered. However, a
+ # combination of VRF + top-level spec + AF is tested.
+
+ module = nxos_ospfv3
+
+ def setUp(self):
+ super(TestNxosOspfv3Module, self).setUp()
+
+ self.mock_get_resource_connection = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.resource_module.get_resource_connection"
+ )
+ self.get_resource_connection = (
+ self.mock_get_resource_connection.start()
+ )
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.ospfv3.ospfv3.Ospfv3Facts.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosOspfv3Module, self).tearDown()
+ self.get_resource_connection.stop()
+ self.get_config.stop()
+
+ def test_nxos_ospfv3_af_areas_filter_list_merged(self):
+ # test merged for config->processes->af->areas->filter_list
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ area 1.1.1.1 default-cost 100
+ area 1.1.1.1 filter-list route-map test-11 in
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ areas=[
+ dict(
+ area_id="1.1.1.1",
+ filter_list=[
+ dict(
+ route_map="test-1",
+ direction="in",
+ ),
+ dict(
+ route_map="test-2",
+ direction="out",
+ ),
+ ],
+ ),
+ dict(
+ area_id="1.1.1.2",
+ filter_list=[
+ dict(
+ route_map="test-3",
+ direction="in",
+ ),
+ dict(
+ route_map="test-4",
+ direction="out",
+ ),
+ ],
+ ),
+ ],
+ ),
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "area 1.1.1.1 filter-list route-map test-1 in",
+ "area 1.1.1.1 filter-list route-map test-2 out",
+ "area 1.1.1.2 filter-list route-map test-3 in",
+ "area 1.1.1.2 filter-list route-map test-4 out",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_areas_filter_list_replaced(self):
+ # test replaced for config->processes->af->areas->filter_list
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ area 1.1.1.4 filter-list route-map test-11 out
+ area 1.1.1.4 filter-list route-map test-12 in
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ areas=[
+ dict(
+ area_id="1.1.1.1",
+ filter_list=[
+ dict(
+ route_map="test-1",
+ direction="in",
+ ),
+ dict(
+ route_map="test-2",
+ direction="out",
+ ),
+ ],
+ ),
+ dict(
+ area_id="1.1.1.2",
+ filter_list=[
+ dict(
+ route_map="test-3",
+ direction="in",
+ ),
+ dict(
+ route_map="test-4",
+ direction="out",
+ ),
+ ],
+ ),
+ ],
+ ),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "no area 1.1.1.4 filter-list route-map test-11 out",
+ "no area 1.1.1.4 filter-list route-map test-12 in",
+ "area 1.1.1.1 filter-list route-map test-1 in",
+ "area 1.1.1.1 filter-list route-map test-2 out",
+ "area 1.1.1.2 filter-list route-map test-3 in",
+ "area 1.1.1.2 filter-list route-map test-4 out",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_areas_ranges_merged(self):
+ # test merged for config->processes->af->areas->rang
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ area 1.1.1.1 range 2001:db2::/32
+ area 1.1.1.1 range 2001:db3::/32 cost 10
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ areas=[
+ dict(
+ area_id="1.1.1.1",
+ ranges=[
+ dict(
+ prefix="2001:db3::/32",
+ cost="20",
+ )
+ ],
+ ),
+ dict(
+ area_id="1.1.1.2",
+ ranges=[
+ dict(
+ prefix="2001:db4::/32", cost=11
+ ),
+ dict(
+ prefix="2001:db5::/32",
+ not_advertise=True,
+ ),
+ dict(
+ prefix="2001:db7::/32",
+ not_advertise=True,
+ cost=18,
+ ),
+ ],
+ ),
+ ],
+ ),
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "area 1.1.1.1 range 2001:db3::/32 cost 20",
+ "area 1.1.1.2 range 2001:db4::/32 cost 11",
+ "area 1.1.1.2 range 2001:db5::/32 not-advertise",
+ "area 1.1.1.2 range 2001:db7::/32 not-advertise cost 18",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_areas_ranges_replaced(self):
+ # test replaced for config->processes->af->areas->ranges
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ area 1.1.1.1 range 2001:db2::/32
+ area 1.1.1.1 range 2001:db3::/32 cost 10
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ areas=[
+ dict(
+ area_id="1.1.1.2",
+ ranges=[
+ dict(
+ prefix="2001:db4::/32", cost=11
+ ),
+ dict(
+ prefix="2001:db5::/32",
+ not_advertise=True,
+ ),
+ dict(
+ prefix="2001:db7::/32",
+ not_advertise=True,
+ cost=18,
+ ),
+ ],
+ )
+ ],
+ ),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "no area 1.1.1.1 range 2001:db2::/32",
+ "no area 1.1.1.1 range 2001:db3::/32",
+ "area 1.1.1.2 range 2001:db4::/32 cost 11",
+ "area 1.1.1.2 range 2001:db5::/32 not-advertise",
+ "area 1.1.1.2 range 2001:db7::/32 not-advertise cost 18",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_areas_default_cost_merged(self):
+ # test merged for config->processes->af->areas->default_cost
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ area 1.1.1.1 default-cost 10
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ areas=[
+ dict(area_id="1.1.1.1", default_cost=12),
+ dict(area_id="1.1.1.2", default_cost=200),
+ ],
+ ),
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "area 1.1.1.1 default-cost 12",
+ "area 1.1.1.2 default-cost 200",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_areas_default_cost_replaced(self):
+ # test merged for config->processes->af->areas->default_cost
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ area 1.1.1.1 default-cost 10
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ areas=[
+ dict(area_id="1.1.1.2", default_cost=200)
+ ],
+ ),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "no area 1.1.1.1 default-cost 10",
+ "area 1.1.1.2 default-cost 200",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_default_information_merged(self):
+ # test merged for config->processes->af->default_information
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ default-information originate
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ default_information=dict(
+ originate=dict(
+ always=True, route_map="test-2"
+ )
+ ),
+ ),
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "default-information originate always route-map test-2",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_default_information_merged_2(self):
+ # test merged for config->processes->af->default_information->set
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ default-information originate always route-map test-2
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ default_information=dict(
+ originate=dict(set=False)
+ ),
+ ),
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "no default-information originate",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_default_information_replaced(self):
+ # test replaced for config->processes->af->default_information
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ default-information originate always test-2
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ default_information=dict(
+ originate=dict(set=True)
+ ),
+ ),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "default-information originate",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_distance_merged(self):
+ # test merged for config->processes->af->distance
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ distance 20
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6", safi="unicast", distance=35
+ ),
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "distance 35",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_distance_replaced(self):
+ # test replaced for config->processes->af->distance
+ # `distance` is a linear attribute so replaced test
+ # can only be removal of this attribute
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ distance 20
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(afi="ipv6", safi="unicast"),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "no distance 20",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_maximum_paths_merged(self):
+ # test merged for config->processes->af->maximum_paths
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ maximum-paths 18
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6", safi="unicast", maximum_paths=27
+ ),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "maximum-paths 27",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_maximum_paths_replaced(self):
+ # test replaced for config->processes->af->maximum_paths
+ # `maximum_paths` is a linear attribute so replaced test
+ # can only be removal of this attribute
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ maximum-paths 18
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(afi="ipv6", safi="unicast"),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "no maximum-paths 18",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_redistribute_merged(self):
+ # test merged for config->processes->af->redistribute
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ redistribute eigrp 100 route-map test-17
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ redistribute=[
+ dict(
+ protocol="eigrp",
+ id="100",
+ route_map="test-1",
+ ),
+ dict(
+ protocol="eigrp",
+ id="101",
+ route_map="test-2",
+ ),
+ dict(
+ protocol="bgp",
+ id="65563",
+ route_map="test-3",
+ ),
+ dict(
+ protocol="static", route_map="test-4"
+ ),
+ ],
+ ),
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "redistribute eigrp 100 route-map test-1",
+ "redistribute eigrp 101 route-map test-2",
+ "redistribute bgp 65563 route-map test-3",
+ "redistribute static route-map test-4",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_redistribute_replaced(self):
+ # test replaced for config->processes->af->redistribute
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ redistribute eigrp 100 route-map test-1
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ redistribute=[
+ dict(
+ protocol="eigrp",
+ id="101",
+ route_map="test-2",
+ ),
+ dict(
+ protocol="bgp",
+ id="65563",
+ route_map="test-3",
+ ),
+ dict(
+ protocol="static", route_map="test-4"
+ ),
+ ],
+ ),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "no redistribute eigrp 100 route-map test-1",
+ "redistribute eigrp 101 route-map test-2",
+ "redistribute bgp 65563 route-map test-3",
+ "redistribute static route-map test-4",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_summary_address_merged(self):
+ # test merged for config->processes->af->summary_address
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ summary-address 2001:db2::/32
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ summary_address=[
+ dict(prefix="2001:db2::/32", tag=19),
+ dict(
+ prefix="2001:db3::/32",
+ not_advertise=True,
+ ),
+ dict(prefix="2001:db4::/32"),
+ ],
+ ),
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "summary-address 2001:db2::/32 tag 19",
+ "summary-address 2001:db3::/32 not-advertise",
+ "summary-address 2001:db4::/32",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_summary_address_replaced(self):
+ # test replaced for config->processes->af->summary_address
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ summary-address 2001:db2::/32 tag 19
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ summary_address=[
+ dict(
+ prefix="2001:db3::/32",
+ not_advertise=True,
+ )
+ ],
+ ),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "no summary-address 2001:db2::/32 tag 19",
+ "summary-address 2001:db3::/32 not-advertise",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_table_map_merged(self):
+ # test merged for config->processes->af->table_map
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ summary-address 2001:db2::/32 tag 19
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ table_map=dict(name="test-1", filter=True),
+ ),
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "table-map test-1 filter",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_table_map_replaced(self):
+ # test replaced for config->processes->af->table_map
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ table-map test-1 filter
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ table_map=dict(name="test-2"),
+ ),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "table-map test-2",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_timers_merged(self):
+ # test merged for config->processes->af->timers
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ timers throttle spf 1000 20 2800
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ timers=dict(
+ throttle=dict(
+ spf=dict(
+ initial_spf_delay=1100,
+ max_wait_time=2805,
+ )
+ )
+ ),
+ ),
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "timers throttle spf 1100 20 2805",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_af_timers_replaced(self):
+ # test replaced for config->processes->af->timers
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ timers throttle spf 1000 20 2800
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(afi="ipv6", safi="unicast"),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "no timers throttle spf 1000 20 2800",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_areas_nssa_merged(self):
+ # test merged for config->processes->areas->nssa
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ area 1.1.1.1 nssa no-redistribution default-information-originate
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ areas=[
+ dict(
+ area_id="1.1.1.1",
+ nssa=dict(no_summary=True),
+ ),
+ dict(area_id="1.1.1.2", nssa=dict(set=True)),
+ dict(
+ area_id="1.1.1.3",
+ nssa=dict(
+ default_information_originate=True,
+ no_summary=True,
+ no_redistribution=True,
+ route_map="test-1",
+ translate=dict(
+ type7=dict(
+ always=True, supress_fa=True
+ )
+ ),
+ ),
+ ),
+ ],
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "area 1.1.1.1 nssa no-summary no-redistribution default-information-originate",
+ "area 1.1.1.2 nssa",
+ "area 1.1.1.3 nssa translate type7 always supress-fa",
+ "area 1.1.1.3 nssa no-summary no-redistribution default-information-originate route-map test-1",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_areas_nssa_merged_2(self):
+ # test merged for config->processes->areas->nssa->set
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ area 1.1.1.1 nssa no-summary
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ areas=[
+ dict(area_id="1.1.1.1", nssa=dict(set=False))
+ ],
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = ["router ospfv3 100", "no area 1.1.1.1 nssa"]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_areas_nssa_replaced(self):
+ # test replaced for config->processes->areas->nssa
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ area 1.1.1.1 nssa no-summary no-redistribution default-information-originate
+ area 1.1.1.3 nssa translate type7 always supress-fa
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ areas=[
+ dict(
+ area_id="1.1.1.3",
+ nssa=dict(
+ default_information_originate=True,
+ no_summary=True,
+ no_redistribution=True,
+ route_map="test-1",
+ ),
+ )
+ ],
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "no area 1.1.1.1 nssa",
+ "no area 1.1.1.3 nssa translate type7 always supress-fa",
+ "area 1.1.1.3 nssa no-summary no-redistribution default-information-originate route-map test-1",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_areas_stub_merged(self):
+ # test merged for config->processes->areas->stub
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ area 1.1.1.3 stub
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ areas=[
+ dict(
+ area_id="1.1.1.3",
+ stub=dict(no_summary=True),
+ )
+ ],
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = ["router ospfv3 100", "area 1.1.1.3 stub no-summary"]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_areas_stub_merged_2(self):
+ # test merged for config->processes->areas->stub->set
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ area 1.1.1.3 stub
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ areas=[
+ dict(area_id="1.1.1.3", stub=dict(set=False)),
+ dict(
+ area_id="1.1.1.4",
+ stub=dict(no_summary=True),
+ ),
+ ],
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "no area 1.1.1.3 stub",
+ "area 1.1.1.4 stub no-summary",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_areas_stub_replaced(self):
+ # test replaced for config->processes->areas->stub
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ area 1.1.1.3 stub no-summary
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(process_id="100", areas=[dict(area_id="1.1.1.3")])
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = ["router ospfv3 100", "no area 1.1.1.3 stub"]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_autocost_flush_route_isolate_merged(self):
+ # test merged for config->processes->autocost,flush_routes, isolate
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ auto-cost reference-bandwidth 300 Mbps
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ auto_cost=dict(
+ reference_bandwidth=100, unit="Gbps"
+ ),
+ flush_routes=True,
+ isolate=True,
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "auto-cost reference-bandwidth 100 Gbps",
+ "flush-routes",
+ "isolate",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_autocost_flush_route_isolate_replaced(self):
+ # test merged for config->processes->autocost,flush_routes, isolate
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ auto-cost reference-bandwidth 300 Mbps
+ flush-routes
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(processes=[dict(process_id="100", isolate=True)]),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "no auto-cost reference-bandwidth 300 Mbps",
+ "no flush-routes",
+ "isolate",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_log_adjacency_changes_name_lookup_passive_interface_merged(
+ self
+ ):
+ # test merged for config->processes->log_adjacency_changes, name_lookup, passive_interface
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ log-adjacency-changes
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ log_adjacency_changes=dict(detail=True),
+ name_lookup=True,
+ passive_interface=dict(default=True),
+ ),
+ dict(
+ process_id="102",
+ log_adjacency_changes=dict(log=True),
+ ),
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "log-adjacency-changes detail",
+ "name-lookup",
+ "passive-interface default",
+ "router ospfv3 102",
+ "log-adjacency-changes",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_log_adjacency_changes_name_lookup_passive_interface_replaced(
+ self
+ ):
+ # test replaced for config->processes->log_adjacency_changes, name_lookup, passive_interface
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ log-adjacency-changes detail
+ name-lookup
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ passive_interface=dict(default=True),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "no log-adjacency-changes detail",
+ "no name-lookup",
+ "passive-interface default",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_max_lsa_router_id_merged(self):
+ # test merged for config->processes->max_lsa, router_id
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ router-id 192.168.1.100
+ max-lsa 4200 85 ignore-count 10 reset-time 120
+ router ospfv3 102
+ max-lsa 4200 85 ignore-time 120 ignore-count 12 reset-time 300
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ router_id="192.168.1.100",
+ max_lsa=dict(
+ max_non_self_generated_lsa=4200,
+ threshold=85,
+ ignore_count=100,
+ reset_time=138,
+ ),
+ ),
+ dict(
+ process_id="102",
+ router_id="192.168.2.102",
+ max_lsa=dict(
+ max_non_self_generated_lsa=4200,
+ threshold=85,
+ ignore_time=200,
+ ignore_count=20,
+ reset_time=120,
+ ),
+ ),
+ dict(
+ process_id="103",
+ max_lsa=dict(
+ max_non_self_generated_lsa=4200,
+ warning_only=True,
+ ),
+ ),
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "max-lsa 4200 85 ignore-count 100 reset-time 138",
+ "router ospfv3 102",
+ "router-id 192.168.2.102",
+ "max-lsa 4200 85 ignore-time 200 ignore-count 20 reset-time 120",
+ "router ospfv3 103",
+ "max-lsa 4200 warning-only",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_max_lsa_router_id_replaced(self):
+ # test replaced for config->processes->max_lsa, router_id
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ router-id 192.168.1.100
+ max-lsa 4200 85 ignore-count 10 reset-time 120
+ router ospfv3 102
+ max-lsa 4200 85 ignore-time 120 ignore-count 12 reset-time 300
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ max_lsa=dict(
+ max_non_self_generated_lsa=4200,
+ threshold=85,
+ warning_only=True,
+ ),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "no router-id 192.168.1.100",
+ "max-lsa 4200 85 warning-only",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_graceful_restart_merged(self):
+ # test merged for config->processes->graceful_restart
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ no graceful-restart
+ router ospfv3 102
+ no graceful-restart planned-only
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ graceful_restart=dict(
+ grace_period=50, helper_disable=True
+ ),
+ ),
+ dict(
+ process_id="102",
+ graceful_restart=dict(planned_only=True),
+ ),
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "graceful-restart grace-period 50",
+ "graceful-restart helper-disable",
+ "router ospfv3 102",
+ "graceful-restart planned-only",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_graceful_restart_replaced(self):
+ # test replaced for config->processes->graceful_restart
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ graceful-restart grace-period 50
+ graceful-restart helper-disable
+ router ospfv3 102
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ graceful_restart=dict(grace_period=10),
+ ),
+ dict(
+ process_id="102",
+ graceful_restart=dict(helper_disable=True),
+ ),
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "graceful-restart grace-period 10",
+ "no graceful-restart helper-disable",
+ "router ospfv3 102",
+ "graceful-restart helper-disable",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_max_metric_merged(self):
+ # test merged for config->processes->max_metric
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ max-metric router-lsa external-lsa 1900
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ max_metric=dict(
+ router_lsa=dict(
+ external_lsa=dict(max_metric_value=2000),
+ stub_prefix_lsa=True,
+ on_startup=dict(set=True),
+ )
+ ),
+ ),
+ dict(
+ process_id="102",
+ max_metric=dict(
+ router_lsa=dict(
+ inter_area_prefix_lsa=dict(
+ max_metric_value=1800
+ )
+ )
+ ),
+ ),
+ dict(
+ process_id="103",
+ max_metric=dict(
+ router_lsa=dict(
+ on_startup=dict(
+ wait_period=1200,
+ wait_for_bgp_asn=65563,
+ ),
+ inter_area_prefix_lsa=dict(set=True),
+ )
+ ),
+ ),
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "max-metric router-lsa external-lsa 2000 stub-prefix-lsa on-startup",
+ "router ospfv3 102",
+ "max-metric router-lsa inter-area-prefix-lsa 1800",
+ "router ospfv3 103",
+ "max-metric router-lsa on-startup 1200 wait-for bgp 65563 inter-area-prefix-lsa",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_max_metric_merged_2(self):
+ # test merged for config->processes->max_metric->set
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ max-metric router-lsa inter-area-prefix-lsa 1800
+ router ospfv3 103
+ max-metric router-lsa on-startup 1200 wait-for bgp 65563 inter-area-prefix-lsa
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ max_metric=dict(router_lsa=dict(set=False)),
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = ["router ospfv3 100", "no max-metric router-lsa"]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_max_metric_replaced(self):
+ # test replaced for config->processes->max_metric
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ router ospfv3 102
+ max-metric router-lsa inter-area-prefix-lsa 1800
+ router ospfv3 103
+ max-metric router-lsa on-startup 1200 wait-for bgp 65563 inter-area-prefix-lsa
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ max_metric=dict(
+ router_lsa=dict(
+ external_lsa=dict(max_metric_value=2000),
+ stub_prefix_lsa=True,
+ on_startup=dict(set=True),
+ )
+ ),
+ ),
+ dict(process_id="102"),
+ dict(process_id="103"),
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "max-metric router-lsa external-lsa 2000 stub-prefix-lsa on-startup",
+ "router ospfv3 102",
+ "no max-metric router-lsa",
+ "router ospfv3 103",
+ "no max-metric router-lsa",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_timers_shutdown_merged(self):
+ # test merged for config->processes->timers, shutdown
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ timers lsa-group-pacing 190
+ shutdown
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ timers=dict(
+ lsa_arrival=1200,
+ lsa_group_pacing=210,
+ throttle=dict(
+ lsa=dict(
+ start_interval=100,
+ hold_interval=70,
+ max_interval=1500,
+ )
+ ),
+ ),
+ shutdown=False,
+ )
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "timers lsa-arrival 1200",
+ "timers lsa-group-pacing 210",
+ "timers throttle lsa 100 70 1500",
+ "no shutdown",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_timers_shutdown_replaced(self):
+ # test replaced for config->processes->timers, shutdown
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ timers lsa-arrival 800
+ timers lsa-group-pacing 210
+ timers throttle lsa 100 70 1500
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ timers=dict(lsa_arrival=1200),
+ shutdown=True,
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "timers lsa-arrival 1200",
+ "no timers lsa-group-pacing 210",
+ "no timers throttle lsa 100 70 1500",
+ "shutdown",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_vrf_merged(self):
+ # test merged for config->processes->vrf
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ vrf blue
+ area 1.1.1.1 nssa
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ vrfs=[
+ dict(
+ vrf="blue",
+ areas=[
+ dict(
+ area_id="1.1.1.1",
+ nssa=dict(no_summary=True),
+ ),
+ dict(
+ area_id="1.1.1.2",
+ nssa=dict(set=True),
+ ),
+ ],
+ ),
+ dict(
+ vrf="red",
+ areas=[
+ dict(
+ area_id="1.1.1.3",
+ nssa=dict(
+ default_information_originate=True,
+ no_summary=True,
+ no_redistribution=True,
+ route_map="test-1",
+ translate=dict(
+ type7=dict(
+ always=True,
+ supress_fa=True,
+ )
+ ),
+ ),
+ )
+ ],
+ ),
+ ],
+ ),
+ dict(
+ process_id="103",
+ vrfs=[
+ dict(
+ vrf="red",
+ max_metric=dict(
+ router_lsa=dict(
+ on_startup=dict(
+ wait_period=1200,
+ wait_for_bgp_asn=65563,
+ ),
+ inter_area_prefix_lsa=dict(
+ set=True
+ ),
+ )
+ ),
+ )
+ ],
+ ),
+ dict(
+ process_id="104",
+ vrfs=[
+ dict(
+ vrf="red",
+ timers=dict(
+ lsa_arrival=1200,
+ lsa_group_pacing=210,
+ throttle=dict(
+ lsa=dict(
+ start_interval=100,
+ hold_interval=70,
+ max_interval=1500,
+ )
+ ),
+ ),
+ shutdown=True,
+ )
+ ],
+ ),
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "vrf blue",
+ "area 1.1.1.1 nssa no-summary",
+ "area 1.1.1.2 nssa",
+ "vrf red",
+ "area 1.1.1.3 nssa translate type7 always supress-fa",
+ "area 1.1.1.3 nssa no-summary no-redistribution default-information-originate route-map test-1",
+ "router ospfv3 103",
+ "vrf red",
+ "max-metric router-lsa on-startup 1200 wait-for bgp 65563 inter-area-prefix-lsa",
+ "router ospfv3 104",
+ "vrf red",
+ "timers lsa-arrival 1200",
+ "timers lsa-group-pacing 210",
+ "timers throttle lsa 100 70 1500",
+ "shutdown",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_vrf_replaced(self):
+ # test replaced for config->processes->vrf
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ vrf blue
+ area 1.1.1.1 nssa no-summary
+ area 1.1.1.2 nssa
+ vrf red
+ area 1.1.1.3 nssa translate type7 always supress-fa
+ area 1.1.1.3 nssa no-summary no-redistribution default-information-originate route-map test-1
+ router ospfv3 103
+ vrf red
+ max-metric router-lsa on-startup 1200 wait-for bgp 65563 inter-area-prefix-lsa
+ router ospfv3 104
+ vrf red
+ timers lsa-arrival 1200
+ timers lsa-group-pacing 210
+ timers throttle lsa 100 70 1500
+ shutdown
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ vrfs=[
+ dict(
+ vrf="blue",
+ areas=[
+ dict(
+ area_id="1.1.1.1",
+ nssa=dict(
+ no_summary=True,
+ translate=dict(
+ type7=dict(
+ always=True,
+ supress_fa=True,
+ )
+ ),
+ ),
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "vrf blue",
+ "area 1.1.1.1 nssa no-summary",
+ "no area 1.1.1.2 nssa",
+ "area 1.1.1.1 nssa translate type7 always supress-fa",
+ "no vrf red",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_top_spec_af_vrf_merged(self):
+ # test merged for every nested level
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ table-map map1 filter
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ redistribute=[
+ dict(
+ protocol="eigrp",
+ id="100",
+ route_map="rmap1",
+ )
+ ],
+ ),
+ vrfs=[
+ dict(vrf="blue", router_id="10.0.0.2"),
+ dict(
+ vrf="red",
+ areas=[
+ dict(
+ area_id="1.1.1.1",
+ nssa=dict(set=True),
+ )
+ ],
+ ),
+ ],
+ ),
+ dict(
+ process_id="103",
+ vrfs=[dict(vrf="red", shutdown=True)],
+ ),
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "redistribute eigrp 100 route-map rmap1",
+ "vrf blue",
+ "router-id 10.0.0.2",
+ "vrf red",
+ "area 1.1.1.1 nssa",
+ "router ospfv3 103",
+ "vrf red",
+ "shutdown",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_top_spec_af_vrf_replaced(self):
+ # test replaced for every nested level
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ table-map map1 filter
+ redistribute eigrp 100 route-map rmap1
+ vrf blue
+ router-id 10.0.0.2
+ vrf red
+ area 1.1.1.1 nssa
+ router ospfv3 103
+ vrf red
+ shutdown
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ redistribute=[
+ dict(
+ protocol="eigrp",
+ id="100",
+ route_map="rmap1",
+ )
+ ],
+ ),
+ )
+ ]
+ ),
+ state="replaced",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "no table-map map1 filter",
+ "no vrf blue",
+ "no vrf red",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_top_spec_af_vrf_overridden(self):
+ # test overridden for every nested level
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ table-map map1 filter
+ redistribute eigrp 100 route-map rmap1
+ vrf blue
+ router-id 10.0.0.2
+ vrf red
+ area 1.1.1.1 nssa
+ router ospfv3 103
+ vrf red
+ shutdown
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(
+ process_id="100",
+ address_family=dict(
+ afi="ipv6",
+ safi="unicast",
+ redistribute=[
+ dict(
+ protocol="eigrp",
+ id="100",
+ route_map="rmap2",
+ )
+ ],
+ ),
+ )
+ ]
+ ),
+ state="overridden",
+ ),
+ ignore_provider_arg,
+ )
+ commands = [
+ "router ospfv3 100",
+ "address-family ipv6 unicast",
+ "no table-map map1 filter",
+ "redistribute eigrp 100 route-map rmap2",
+ "no vrf blue",
+ "no vrf red",
+ "no router ospfv3 103",
+ ]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_top_spec_af_vrf_deleted(self):
+ # test overridden for every nested level
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ table-map map1 filter
+ redistribute eigrp 100 route-map rmap1
+ vrf blue
+ router-id 10.0.0.2
+ vrf red
+ area 1.1.1.1 nssa
+ router ospfv3 103
+ vrf red
+ shutdown
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(processes=[dict(process_id="100")]),
+ state="deleted",
+ ),
+ ignore_provider_arg,
+ )
+ commands = ["no router ospfv3 100"]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_top_spec_af_vrf_deleted_all(self):
+ # test overridden for every nested level
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ table-map map1 filter
+ redistribute eigrp 100 route-map rmap1
+ vrf blue
+ router-id 10.0.0.2
+ vrf red
+ area 1.1.1.1 nssa
+ router ospfv3 103
+ vrf red
+ shutdown
+ """
+ )
+ set_module_args(dict(state="deleted"), ignore_provider_arg)
+ commands = ["no router ospfv3 100", "no router ospfv3 103"]
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
+
+ def test_nxos_ospfv3_parsed(self):
+ # test parsed
+ set_module_args(
+ dict(
+ running_config=dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ table-map map1 filter
+ redistribute eigrp 100 route-map rmap1
+ vrf blue
+ router-id 10.0.0.2
+ vrf red
+ area 1.1.1.1 nssa
+ router ospfv3 103
+ vrf red
+ shutdown
+ """
+ ),
+ state="parsed",
+ ),
+ ignore_provider_arg,
+ )
+ parsed = {
+ "processes": [
+ {
+ "process_id": "100",
+ "address_family": {
+ "table_map": {"name": "map1", "filter": True},
+ "redistribute": [
+ {
+ "protocol": "eigrp",
+ "id": "100",
+ "route_map": "rmap1",
+ }
+ ],
+ "afi": "ipv6",
+ "safi": "unicast",
+ },
+ "vrfs": [
+ {"vrf": "blue", "router_id": "10.0.0.2"},
+ {
+ "vrf": "red",
+ "areas": [
+ {"area_id": "1.1.1.1", "nssa": {"set": True}}
+ ],
+ },
+ ],
+ },
+ {
+ "process_id": "103",
+ "vrfs": [{"vrf": "red", "shutdown": True}],
+ },
+ ]
+ }
+ result = self.execute_module(changed=False)
+ self.assertEqual(set(result["parsed"]), set(parsed))
+
+ def test_nxos_ospfv3_gathered(self):
+ # test gathered
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ address-family ipv6 unicast
+ table-map map1 filter
+ redistribute eigrp 100 route-map rmap1
+ vrf blue
+ router-id 10.0.0.2
+ vrf red
+ area 1.1.1.1 nssa
+ router ospfv3 103
+ vrf red
+ shutdown
+ """
+ )
+ set_module_args(dict(state="gathered"), ignore_provider_arg)
+ gathered = {
+ "processes": [
+ {
+ "process_id": "100",
+ "address_family": {
+ "table_map": {"name": "map1", "filter": True},
+ "redistribute": [
+ {
+ "protocol": "eigrp",
+ "id": "100",
+ "route_map": "rmap1",
+ }
+ ],
+ "afi": "ipv6",
+ "safi": "unicast",
+ },
+ "vrfs": [
+ {"vrf": "blue", "router_id": "10.0.0.2"},
+ {
+ "vrf": "red",
+ "areas": [
+ {"area_id": "1.1.1.1", "nssa": {"set": True}}
+ ],
+ },
+ ],
+ },
+ {
+ "process_id": "103",
+ "vrfs": [{"vrf": "red", "shutdown": True}],
+ },
+ ]
+ }
+ result = self.execute_module(changed=False)
+ self.assertEqual(set(result["gathered"]), set(gathered))
+
+ def test_nxos_ospfv3_process_id_word(self):
+ self.get_config.return_value = dedent(
+ """\
+ router ospfv3 100
+ router-id 203.0.113.20
+ router ospfv3 TEST-1
+ router-id 198.51.100.1
+ """
+ )
+ set_module_args(
+ dict(
+ config=dict(
+ processes=[
+ dict(process_id="100", router_id="203.0.113.20"),
+ dict(process_id="TEST-1", router_id="198.51.100.1"),
+ dict(process_id="TEST-2", router_id="198.52.200.1"),
+ ]
+ ),
+ state="merged",
+ ),
+ ignore_provider_arg,
+ )
+
+ commands = ["router ospfv3 TEST-2", "router-id 198.52.200.1"]
+
+ result = self.execute_module(changed=True)
+ self.assertEqual(set(result["commands"]), set(commands))
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_overlay_global.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_overlay_global.py
new file mode 100644
index 00000000..4ec52692
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_overlay_global.py
@@ -0,0 +1,62 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_overlay_global
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosOverlayGlobalModule(TestNxosModule):
+
+ module = nxos_overlay_global
+
+ def setUp(self):
+ super(TestNxosOverlayGlobalModule, self).setUp()
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_overlay_global.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_overlay_global.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosOverlayGlobalModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture(
+ "", "nxos_overlay_global_config.cfg"
+ )
+ self.load_config.return_value = None
+
+ def test_nxos_overlay_global_up(self):
+ set_module_args(dict(anycast_gateway_mac="a.a.a"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["fabric forwarding anycast-gateway-mac 000A.000A.000A"],
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_pim.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_pim.py
new file mode 100644
index 00000000..66fe0162
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_pim.py
@@ -0,0 +1,107 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_pim
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosPimModule(TestNxosModule):
+
+ module = nxos_pim
+
+ def setUp(self):
+ super(TestNxosPimModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_pim.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_pim.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestNxosPimModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.load_config.return_value = None
+
+ def test_nxos_pim_1(self):
+ # Add/ Modify
+ self.get_config.return_value = load_fixture("nxos_pim", "config.cfg")
+ set_module_args(dict(ssm_range="233.0.0.0/8"))
+ self.execute_module(
+ changed=True, commands=["ip pim ssm range 233.0.0.0/8"]
+ )
+
+ def test_nxos_pim_2(self):
+ # Remove existing values
+ self.get_config.return_value = load_fixture("nxos_pim", "config.cfg")
+ set_module_args(dict(bfd="disable", ssm_range="none"))
+ self.execute_module(
+ changed=True, commands=["no ip pim bfd", "ip pim ssm range none"]
+ )
+
+ def test_nxos_pim_3(self):
+ # bfd None (disable)-> enable
+ self.get_config.return_value = None
+ set_module_args(dict(bfd="enable"))
+ self.execute_module(changed=True, commands=["ip pim bfd"])
+
+ # bfd None (disable) -> disable
+ set_module_args(dict(bfd="disable"))
+ self.execute_module(changed=False)
+
+ # ssm None to 'default'
+ set_module_args(dict(ssm_range="default"))
+ self.execute_module(changed=False)
+
+ def test_nxos_pim_4(self):
+ # SSM 'none'
+ self.get_config.return_value = load_fixture("nxos_pim", "config.cfg")
+ set_module_args(dict(ssm_range="none"))
+ self.execute_module(changed=True, commands=["ip pim ssm range none"])
+
+ def test_nxos_pim_5(self):
+ # SSM 'default'
+ self.get_config.return_value = load_fixture("nxos_pim", "config.cfg")
+ set_module_args(dict(ssm_range="default"))
+ self.execute_module(
+ changed=True, commands=["no ip pim ssm range none"]
+ )
+
+ # SSM 'default' idempotence
+ self.get_config.return_value = None
+ set_module_args(dict(ssm_range="default"))
+ self.execute_module(changed=False)
+
+ def test_nxos_pim_6(self):
+ # Idempotence
+ self.get_config.return_value = load_fixture("nxos_pim", "config.cfg")
+ set_module_args(dict(bfd="enable", ssm_range="127.0.0.0/31"))
+ self.execute_module(changed=False, commands=[])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_pim_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_pim_interface.py
new file mode 100644
index 00000000..d03f0471
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_pim_interface.py
@@ -0,0 +1,265 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_pim_interface
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosIPInterfaceModule(TestNxosModule):
+
+ module = nxos_pim_interface
+
+ def setUp(self):
+ super(TestNxosIPInterfaceModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_pim_interface.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_pim_interface.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_pim_interface.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ def tearDown(self):
+ super(TestNxosIPInterfaceModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_run_commands.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ module_name = self.module.__name__.rsplit(".", 1)[1]
+
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+
+ for command in commands:
+ if type(command) == dict:
+ command = command["command"]
+ filename = (
+ str(command)
+ .split(" | ")[0]
+ .replace(" ", "_")
+ .replace("/", "_")
+ )
+ output.append(load_fixture(module_name, filename))
+ return output
+
+ self.get_config.return_value = load_fixture(module_name, "config.cfg")
+ self.load_config.return_value = None
+ self.run_commands.side_effect = load_from_file
+
+ def test_nxos_pim_interface_present(self):
+ set_module_args(
+ dict(
+ interface="eth2/1",
+ dr_prio=10,
+ hello_interval=40,
+ sparse=True,
+ border=False,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface eth2/1",
+ "ip pim dr-priority 10",
+ "ip pim hello-interval 40000",
+ "ip pim sparse-mode",
+ ],
+ )
+
+ def test_nxos_pim_interface_jp(self):
+ set_module_args(
+ dict(
+ interface="eth2/1",
+ jp_policy_in="JPIN",
+ jp_policy_out="JPOUT",
+ jp_type_in="routemap",
+ jp_type_out="routemap",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface eth2/1",
+ "ip pim jp-policy JPOUT out",
+ "ip pim jp-policy JPIN in",
+ ],
+ )
+
+ def test_nxos_pim_interface_default(self):
+ set_module_args(dict(interface="eth2/1", state="default"))
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_pim_interface_ip_absent(self):
+ set_module_args(dict(interface="eth2/1", state="absent"))
+ self.execute_module(changed=False, commands=[])
+
+
+class TestNxosPimInterfaceBfdModule(TestNxosModule):
+
+ module = nxos_pim_interface
+
+ def setUp(self):
+ super(TestNxosPimInterfaceBfdModule, self).setUp()
+
+ self.mock_get_interface_mode = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_pim_interface.get_interface_mode"
+ )
+ self.get_interface_mode = self.mock_get_interface_mode.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_pim_interface.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_pim_interface.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_pim_interface.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ def tearDown(self):
+ super(TestNxosPimInterfaceBfdModule, self).tearDown()
+ self.mock_get_interface_mode.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_run_commands.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.load_config.return_value = None
+
+ def test_bfd_1(self):
+ # default (None) -> enable
+ self.get_config.return_value = None
+ set_module_args(dict(interface="eth2/1", bfd="enable"))
+ self.execute_module(
+ changed=True, commands=["interface eth2/1", "ip pim bfd-instance"]
+ )
+
+ # default (None) -> disable
+ set_module_args(dict(interface="eth2/1", bfd="disable"))
+ self.execute_module(
+ changed=True,
+ commands=["interface eth2/1", "ip pim bfd-instance disable"],
+ )
+
+ # default (None) -> default (None) (idempotence)
+ set_module_args(dict(interface="eth2/1", bfd="default"))
+ self.execute_module(changed=False)
+
+ # default (None) -> interface state 'default'
+ set_module_args(dict(interface="Ethernet9/3", state="default"))
+ self.execute_module(changed=False)
+
+ # default (None) -> interface state 'absent'
+ set_module_args(dict(interface="Ethernet9/3", state="absent"))
+ self.execute_module(changed=False)
+
+ def test_bfd_2(self):
+ # From disable
+ self.get_config.return_value = """
+ interface Ethernet9/2
+ ip pim bfd-instance disable
+ """
+ # disable -> enable
+ set_module_args(dict(interface="Ethernet9/2", bfd="enable"))
+ self.execute_module(
+ changed=True,
+ commands=["interface Ethernet9/2", "ip pim bfd-instance"],
+ )
+
+ # disable -> disable (idempotence)
+ set_module_args(dict(interface="Ethernet9/2", bfd="disable"))
+ self.execute_module(changed=False)
+
+ # disable -> default (None)
+ set_module_args(dict(interface="Ethernet9/2", bfd="default"))
+ self.execute_module(
+ changed=True,
+ commands=["interface Ethernet9/2", "no ip pim bfd-instance"],
+ )
+ # disable -> interface state 'default'
+ set_module_args(dict(interface="Ethernet9/3", state="default"))
+ self.execute_module(
+ changed=True,
+ commands=["interface Ethernet9/3", "no ip pim bfd-instance"],
+ )
+
+ # disable -> interface state 'absent'
+ set_module_args(dict(interface="Ethernet9/3", state="absent"))
+ self.execute_module(
+ changed=True,
+ commands=["interface Ethernet9/3", "no ip pim bfd-instance"],
+ )
+
+ def test_bfd_3(self):
+ # From enable
+ self.get_config.return_value = """
+ interface Ethernet9/2
+ ip pim bfd-instance
+ """
+ # enable -> disabled
+ set_module_args(dict(interface="Ethernet9/3", bfd="disable"))
+ self.execute_module(
+ changed=True,
+ commands=["interface Ethernet9/3", "ip pim bfd-instance disable"],
+ )
+
+ # enable -> enable (idempotence)
+ set_module_args(dict(interface="Ethernet9/3", bfd="enable"))
+ self.execute_module(changed=False)
+
+ # enable -> default (None)
+ set_module_args(dict(interface="Ethernet9/3", bfd="default"))
+ self.execute_module(
+ changed=True,
+ commands=["interface Ethernet9/3", "no ip pim bfd-instance"],
+ )
+
+ # enable -> interface state 'default'
+ set_module_args(dict(interface="Ethernet9/3", state="default"))
+ self.execute_module(
+ changed=True,
+ commands=["interface Ethernet9/3", "no ip pim bfd-instance"],
+ )
+
+ # enable -> interface state 'absent'
+ set_module_args(dict(interface="Ethernet9/3", state="absent"))
+ self.execute_module(
+ changed=True,
+ commands=["interface Ethernet9/3", "no ip pim bfd-instance"],
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_pim_rp_address.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_pim_rp_address.py
new file mode 100644
index 00000000..ebff3a47
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_pim_rp_address.py
@@ -0,0 +1,75 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_pim_rp_address
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosPimRpAddressModule(TestNxosModule):
+
+ module = nxos_pim_rp_address
+
+ def setUp(self):
+ super(TestNxosPimRpAddressModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_pim_rp_address.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_pim_rp_address.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosPimRpAddressModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture(
+ "nxos_pim_rp_address", "config.cfg"
+ )
+ self.load_config.return_value = None
+
+ def test_nxos_pim_rp_address(self):
+ set_module_args(dict(rp_address="5.6.7.8"))
+ self.execute_module(
+ changed=True, commands=["ip pim rp-address 5.6.7.8"]
+ )
+
+ def test_nxos_pim_rp_address_no_change(self):
+ set_module_args(dict(rp_address="1.2.3.4"))
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_pim_rp_address_absent(self):
+ set_module_args(dict(rp_address="1.2.3.4", state="absent"))
+ self.execute_module(
+ changed=True, commands=["no ip pim rp-address 1.2.3.4"]
+ )
+
+ def test_nxos_pim_rp_address_absent_no_change(self):
+ set_module_args(dict(rp_address="5.6.7.8", state="absent"))
+ self.execute_module(changed=False, commands=[])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_static_route.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_static_route.py
new file mode 100644
index 00000000..55cf040d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_static_route.py
@@ -0,0 +1,126 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_static_route
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosStaticRouteModule(TestNxosModule):
+
+ module = nxos_static_route
+
+ def setUp(self):
+ super(TestNxosStaticRouteModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_static_route.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_static_route.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosStaticRouteModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture(
+ "", "nxos_static_route.cfg"
+ )
+ self.load_config.return_value = None
+
+ def test_nxos_static_route_present(self):
+ set_module_args(dict(prefix="192.168.20.64/24", next_hop="192.0.2.3"))
+ self.execute_module(
+ changed=True, commands=["ip route 192.168.20.0/24 192.0.2.3"]
+ )
+
+ def test_nxos_static_route_present_no_defaults(self):
+ set_module_args(
+ dict(
+ prefix="192.168.20.64/24",
+ next_hop="192.0.2.3",
+ route_name="testing",
+ pref=100,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=["ip route 192.168.20.0/24 192.0.2.3 name testing 100"],
+ )
+
+ def test_nxos_static_route_present_vrf(self):
+ set_module_args(
+ dict(prefix="192.168.20.64/24", next_hop="192.0.2.3", vrf="test")
+ )
+ self.execute_module(
+ changed=True,
+ sort=False,
+ commands=[
+ "vrf context test",
+ "ip route 192.168.20.0/24 192.0.2.3",
+ ],
+ )
+
+ def test_nxos_static_route_no_change(self):
+ set_module_args(dict(prefix="10.10.30.64/24", next_hop="1.2.4.8"))
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_static_route_absent(self):
+ set_module_args(
+ dict(prefix="10.10.30.12/24", next_hop="1.2.4.8", state="absent")
+ )
+ self.execute_module(
+ changed=True, commands=["no ip route 10.10.30.0/24 1.2.4.8"]
+ )
+
+ def test_nxos_static_route_absent_no_change(self):
+ set_module_args(
+ dict(
+ prefix="192.168.20.6/24", next_hop="192.0.2.3", state="absent"
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_static_route_absent_vrf(self):
+ set_module_args(
+ dict(
+ prefix="10.11.12.13/14",
+ next_hop="15.16.17.18",
+ vrf="test",
+ state="absent",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ sort=False,
+ commands=[
+ "vrf context test",
+ "no ip route 10.8.0.0/14 15.16.17.18",
+ ],
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_static_routes.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_static_routes.py
new file mode 100644
index 00000000..2f632289
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_static_routes.py
@@ -0,0 +1,531 @@
+#
+# (c) 2019, Ansible by Red Hat, inc
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+#
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.plugins.modules import nxos_static_routes
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import (
+ patch,
+ MagicMock,
+)
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ set_module_args,
+)
+from .nxos_module import TestNxosModule, load_fixture
+
+
+class TestNxosStaticRoutesModule(TestNxosModule):
+
+ module = nxos_static_routes
+
+ def setUp(self):
+ super(TestNxosStaticRoutesModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.network.Config.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.static_routes.static_routes.Static_routes.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.static_routes.static_routes.Static_routesFacts.get_device_data"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ def tearDown(self):
+ super(TestNxosStaticRoutesModule, self).tearDown()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_execute_show_command.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ non_vrf_data = [
+ "ip route 192.0.2.16/28 192.0.2.24 name initial_route"
+ ]
+ vrf_data = [
+ "vrf context test\n ip route 192.0.2.96/28 192.0.2.122 vrf dest_vrf\n ipv6 route 2001:db8:12::/32 2001:db8::1001 name ipv6_route 3\n"
+ ]
+
+ output = non_vrf_data + vrf_data
+ return output
+
+ self.execute_show_command.side_effect = load_from_file
+
+ def test_nxos_static_routes_merged(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.32/28",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.40",
+ interface="Ethernet1/2",
+ admin_distance=5,
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ )
+ ],
+ state="merged",
+ )
+ )
+ commands = [
+ "vrf context default",
+ "ip route 192.0.2.32/28 Ethernet1/2 192.0.2.40 5",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_static_routes_merged_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.16/28",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.24",
+ route_name="initial_route",
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ )
+ ],
+ state="merged",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_static_routes_replaced(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.16/28",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.50",
+ tag=12,
+ route_name="replaced_route",
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ )
+ ],
+ state="replaced",
+ )
+ )
+ commands = [
+ "vrf context default",
+ "no ip route 192.0.2.16/28 192.0.2.24 name initial_route",
+ "ip route 192.0.2.16/28 192.0.2.50 name replaced_route tag 12",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_static_routes_replaced_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.16/28",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.24",
+ route_name="initial_route",
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ )
+ ],
+ state="replaced",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_static_routes_overridden(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.112/28",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.68",
+ route_name="overridden_route",
+ dest_vrf="end_vrf",
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ )
+ ],
+ state="overridden",
+ )
+ )
+ commands = [
+ "vrf context default",
+ "no ip route 192.0.2.16/28 192.0.2.24 name initial_route",
+ "ip route 192.0.2.112/28 192.0.2.68 vrf end_vrf name overridden_route",
+ "vrf context test",
+ "no ipv6 route 2001:db8:12::/32 2001:db8::1001 name ipv6_route 3",
+ "no ip route 192.0.2.96/28 192.0.2.122 vrf dest_vrf",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_static_routes_overridden_idempotent(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="test",
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.96/28",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.122",
+ dest_vrf="dest_vrf",
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ ),
+ dict(
+ address_families=[
+ dict(
+ afi="ipv4",
+ routes=[
+ dict(
+ dest="192.0.2.16/28",
+ next_hops=[
+ dict(
+ forward_router_address="192.0.2.24",
+ route_name="initial_route",
+ )
+ ],
+ )
+ ],
+ )
+ ]
+ ),
+ ],
+ state="overridden",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_static_routes_deletedvrf(self):
+ set_module_args(dict(config=[dict(vrf="test")], state="deleted"))
+ commands = [
+ "vrf context test",
+ "no ip route 192.0.2.96/28 192.0.2.122 vrf dest_vrf",
+ "no ipv6 route 2001:db8:12::/32 2001:db8::1001 name ipv6_route 3",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_static_routes_deletedafi(self):
+ set_module_args(
+ dict(
+ config=[dict(address_families=[dict(afi="ipv4")])],
+ state="deleted",
+ )
+ )
+ commands = [
+ "vrf context default",
+ "no ip route 192.0.2.16/28 192.0.2.24 name initial_route",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_static_routes_deleteddest(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="test",
+ address_families=[
+ dict(
+ afi="ipv4", routes=[dict(dest="192.0.2.96/28")]
+ )
+ ],
+ )
+ ],
+ state="deleted",
+ )
+ )
+ commands = [
+ "vrf context test",
+ "no ip route 192.0.2.96/28 192.0.2.122 vrf dest_vrf",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_static_routes_deletedroute(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="test",
+ address_families=[
+ dict(
+ afi="ipv6",
+ routes=[
+ dict(
+ dest="2001:db8:12::/32",
+ next_hops=[
+ dict(
+ forward_router_address="2001:db8::1001",
+ route_name="ipv6_route",
+ admin_distance=3,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="deleted",
+ )
+ )
+ commands = [
+ "vrf context test",
+ "no ipv6 route 2001:db8:12::/32 2001:db8::1001 name ipv6_route 3",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_static_routes_rendered(self):
+ set_module_args(
+ dict(
+ config=[
+ dict(
+ vrf="testvrf",
+ address_families=[
+ dict(
+ afi="ipv6",
+ routes=[
+ dict(
+ dest="1200:10::/64",
+ next_hops=[
+ dict(
+ forward_router_address="2048:ae12::/64",
+ interface="Eth1/4",
+ admin_distance=5,
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ )
+ ],
+ state="rendered",
+ )
+ )
+ commands = [
+ "vrf context testvrf",
+ "ipv6 route 1200:10::/64 Ethernet1/4 2048:ae12::/64 5",
+ ]
+ result = self.execute_module(changed=False)
+ self.assertEqual(
+ sorted(result["rendered"]), sorted(commands), result["rendered"]
+ )
+
+ def test_nxos_static_routes_parsed(self):
+ set_module_args(
+ dict(
+ running_config="""ip route 192.0.2.16/28 192.0.2.24 name initial_route
+ vrf context test
+ ip route 192.0.2.96/28 192.0.2.122 vrf dest_vrf
+ ipv6 route 2001:db8:12::/32 2001:db8::1001 name ipv6_route 3""",
+ state="parsed",
+ )
+ )
+ result = self.execute_module(changed=False)
+ compare_list = [
+ {
+ "vrf": "test",
+ "address_families": [
+ {
+ "routes": [
+ {
+ "dest": "192.0.2.96/28",
+ "next_hops": [
+ {
+ "dest_vrf": "dest_vrf",
+ "forward_router_address": "192.0.2.122",
+ }
+ ],
+ }
+ ],
+ "afi": "ipv4",
+ },
+ {
+ "routes": [
+ {
+ "dest": "2001:db8:12::/32",
+ "next_hops": [
+ {
+ "route_name": "ipv6_route",
+ "forward_router_address": "2001:db8::1001",
+ "admin_distance": 3,
+ }
+ ],
+ }
+ ],
+ "afi": "ipv6",
+ },
+ ],
+ },
+ {
+ "address_families": [
+ {
+ "routes": [
+ {
+ "dest": "192.0.2.16/28",
+ "next_hops": [
+ {
+ "route_name": "initial_route",
+ "forward_router_address": "192.0.2.24",
+ }
+ ],
+ }
+ ],
+ "afi": "ipv4",
+ }
+ ]
+ },
+ ]
+ self.assertEqual(result["parsed"], compare_list, result["parsed"])
+
+ def test_nxos_static_routes_gathered(self):
+ set_module_args(dict(config=[], state="gathered"))
+ result = self.execute_module(changed=False)
+ compare_list = [
+ {
+ "vrf": "test",
+ "address_families": [
+ {
+ "routes": [
+ {
+ "dest": "192.0.2.96/28",
+ "next_hops": [
+ {
+ "dest_vrf": "dest_vrf",
+ "forward_router_address": "192.0.2.122",
+ }
+ ],
+ }
+ ],
+ "afi": "ipv4",
+ },
+ {
+ "routes": [
+ {
+ "dest": "2001:db8:12::/32",
+ "next_hops": [
+ {
+ "route_name": "ipv6_route",
+ "forward_router_address": "2001:db8::1001",
+ "admin_distance": 3,
+ }
+ ],
+ }
+ ],
+ "afi": "ipv6",
+ },
+ ],
+ },
+ {
+ "address_families": [
+ {
+ "routes": [
+ {
+ "dest": "192.0.2.16/28",
+ "next_hops": [
+ {
+ "route_name": "initial_route",
+ "forward_router_address": "192.0.2.24",
+ }
+ ],
+ }
+ ],
+ "afi": "ipv4",
+ }
+ ]
+ },
+ ]
+ self.assertEqual(result["gathered"], compare_list, result["gathered"])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_system.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_system.py
new file mode 100644
index 00000000..aa6bc1f3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_system.py
@@ -0,0 +1,208 @@
+#
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_system
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosSystemModule(TestNxosModule):
+
+ module = nxos_system
+
+ def setUp(self):
+ super(TestNxosSystemModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_system.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_system.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ def tearDown(self):
+ super(TestNxosSystemModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture(
+ "nxos_system", "config.cfg", device=device
+ )
+ self.load_config.return_value = None
+
+ def test_nxos_system_hostname_changed(self):
+ set_module_args(dict(hostname="foo"))
+ commands = ["hostname foo"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_system_domain_lookup(self):
+ set_module_args(dict(domain_lookup=True))
+ commands = ["ip domain-lookup"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_system_missing_vrf(self):
+ domain_name = dict(name="example.com", vrf="example")
+ set_module_args(dict(domain_name=domain_name))
+ self.execute_module(failed=True)
+
+ def test_nxos_system_domain_name(self):
+ set_module_args(dict(domain_name=["example.net"]))
+ commands = [
+ "no ip domain-name ansible.com",
+ "vrf context management",
+ "no ip domain-name eng.ansible.com",
+ "exit",
+ "ip domain-name example.net",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_system_domain_name_vrf_only(self):
+ set_module_args(
+ dict(
+ domain_name=[
+ {"name": "abc.com", "vrf": "test"},
+ {"name": "xyz.com", "vrf": "test2"},
+ ]
+ )
+ )
+ commands = []
+ self.execute_module(
+ changed=False, commands=commands, device="vrf_only"
+ )
+
+ def test_nxos_system_domain_name_complex(self):
+ domain_name = dict(name="example.net", vrf="management")
+ set_module_args(dict(domain_name=[domain_name]))
+ commands = [
+ "no ip domain-name ansible.com",
+ "vrf context management",
+ "no ip domain-name eng.ansible.com",
+ "exit",
+ "vrf context management",
+ "ip domain-name example.net",
+ "exit",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_system_domain_search(self):
+ set_module_args(dict(domain_search=["example.net"]))
+ commands = [
+ "vrf context management",
+ "no ip domain-list ansible.com",
+ "exit",
+ "vrf context management",
+ "no ip domain-list redhat.com",
+ "exit",
+ "no ip domain-list ansible.com",
+ "no ip domain-list redhat.com",
+ "ip domain-list example.net",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_system_domain_search_complex(self):
+ domain_search = dict(name="example.net", vrf="management")
+ set_module_args(dict(domain_search=[domain_search]))
+ commands = [
+ "vrf context management",
+ "no ip domain-list ansible.com",
+ "exit",
+ "vrf context management",
+ "no ip domain-list redhat.com",
+ "exit",
+ "no ip domain-list ansible.com",
+ "no ip domain-list redhat.com",
+ "vrf context management",
+ "ip domain-list example.net",
+ "exit",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_system_name_servers(self):
+ set_module_args(dict(name_servers=["1.2.3.4", "8.8.8.8"]))
+ commands = [
+ "no ip name-server 172.26.1.1",
+ "vrf context management",
+ "no ip name-server 8.8.8.8",
+ "exit",
+ "vrf context management",
+ "no ip name-server 172.26.1.1",
+ "exit",
+ "ip name-server 1.2.3.4",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_system_name_servers_complex(self):
+ name_servers = dict(server="1.2.3.4", vrf="management")
+ set_module_args(dict(name_servers=[name_servers]))
+ commands = [
+ "no ip name-server 8.8.8.8",
+ "no ip name-server 172.26.1.1",
+ "vrf context management",
+ "no ip name-server 8.8.8.8",
+ "exit",
+ "vrf context management",
+ "no ip name-server 172.26.1.1",
+ "exit",
+ "vrf context management",
+ "ip name-server 1.2.3.4",
+ "exit",
+ ]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_system_system_mtu(self):
+ set_module_args(dict(system_mtu=2000))
+ commands = ["system jumbomtu 2000"]
+ self.execute_module(changed=True, commands=commands)
+
+ def test_nxos_system_state_absent(self):
+ set_module_args(dict(state="absent"))
+ commands = [
+ "no hostname",
+ "no ip domain-name ansible.com",
+ "vrf context management",
+ "no ip domain-name eng.ansible.com",
+ "exit",
+ "no ip domain-list ansible.com",
+ "no ip domain-list redhat.com",
+ "vrf context management",
+ "no ip domain-list ansible.com",
+ "exit",
+ "vrf context management",
+ "no ip domain-list redhat.com",
+ "exit",
+ "no ip name-server 8.8.8.8",
+ "no ip name-server 172.26.1.1",
+ "vrf context management",
+ "no ip name-server 8.8.8.8",
+ "exit",
+ "vrf context management",
+ "no ip name-server 172.26.1.1",
+ "exit",
+ "no system jumbomtu",
+ ]
+ self.execute_module(changed=True, commands=commands)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_telemetry.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_telemetry.py
new file mode 100644
index 00000000..0895af96
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_telemetry.py
@@ -0,0 +1,1834 @@
+# (c) 2019 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules import nxos_telemetry
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ NxosCmdRef,
+)
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.telemetry.telemetry import (
+ Telemetry,
+)
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+# TBD: These imports / import checks are only needed as a workaround for
+# shippable, which fails this test due to import yaml & import ordereddict.
+import pytest
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos import (
+ nxosCmdRef_import_check,
+)
+
+msg = nxosCmdRef_import_check()
+ignore_provider_arg = True
+
+
+@pytest.mark.skipif(len(msg), reason=msg)
+class TestNxosTelemetryModule(TestNxosModule):
+
+ module = nxos_telemetry
+
+ def setUp(self):
+ super(TestNxosTelemetryModule, self).setUp()
+
+ self.mock_FACT_LEGACY_SUBSETS = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS"
+ )
+ self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.telemetry.telemetry.Telemetry.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_execute_show_command = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos.NxosCmdRef.execute_show_command"
+ )
+ self.execute_show_command = self.mock_execute_show_command.start()
+
+ self.mock_get_platform_shortname = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.nxos.NxosCmdRef.get_platform_shortname"
+ )
+ self.get_platform_shortname = self.mock_get_platform_shortname.start()
+
+ def tearDown(self):
+ super(TestNxosTelemetryModule, self).tearDown()
+ self.mock_FACT_LEGACY_SUBSETS.stop()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_execute_show_command.stop()
+ self.get_platform_shortname.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.mock_FACT_LEGACY_SUBSETS.return_value = dict()
+ self.get_resource_connection_config.return_value = "Connection"
+ self.get_resource_connection_facts.return_value = "Connection"
+ self.edit_config.return_value = None
+
+ # ---------------------------
+ # Telemetry Global Test Cases
+ # ---------------------------
+
+ def test_tms_global_merged_n9k(self):
+ # Assumes feature telemetry is disabled
+ # TMS global config is not present.
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ dict(
+ config=dict(
+ certificate={
+ "key": "/bootflash/sample.key",
+ "hostname": "server.example.com",
+ },
+ compression="gzip",
+ source_interface="Ethernet2/1",
+ vrf="blue",
+ )
+ ),
+ ignore_provider_arg,
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "certificate /bootflash/sample.key server.example.com",
+ "destination-profile",
+ "use-compression gzip",
+ "source-interface Ethernet2/1",
+ "use-vrf blue",
+ ],
+ )
+
+ def test_tms_global_checkmode_n9k(self):
+ # Assumes feature telemetry is disabled
+ # TMS global config is not present.
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ dict(
+ _ansible_check_mode=True,
+ config=dict(
+ certificate={
+ "key": "/bootflash/sample.key",
+ "hostname": "server.example.com",
+ },
+ compression="gzip",
+ source_interface="Ethernet2/1",
+ vrf="blue",
+ ),
+ ),
+ ignore_provider_arg,
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "certificate /bootflash/sample.key server.example.com",
+ "destination-profile",
+ "use-compression gzip",
+ "source-interface Ethernet2/1",
+ "use-vrf blue",
+ ],
+ )
+
+ def test_tms_global_merged2_n9k(self):
+ # Assumes feature telemetry is disabled
+ # TMS global config is not present.
+ # Configure only vrf
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(dict(config=dict(vrf="blue")), ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "destination-profile",
+ "use-vrf blue",
+ ],
+ )
+
+ def test_tms_global_idempotent_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS global config is present.
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ dict(
+ config=dict(
+ certificate={
+ "key": "/bootflash/server.key",
+ "hostname": "localhost",
+ },
+ compression="gzip",
+ source_interface="loopback55",
+ vrf="management",
+ )
+ ),
+ ignore_provider_arg,
+ )
+ self.execute_module(changed=False)
+
+ def test_tms_global_change_cert_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS global config is present
+ # Change certificate
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ dict(
+ config=dict(
+ certificate={
+ "key": "/bootflash/server.key",
+ "hostname": "my_host",
+ },
+ compression="gzip",
+ source_interface="loopback55",
+ vrf="management",
+ )
+ ),
+ ignore_provider_arg,
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "telemetry",
+ "certificate /bootflash/server.key my_host",
+ ],
+ )
+
+ def test_tms_global_change_interface_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS global config is present
+ # Change interface
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ dict(
+ config=dict(
+ certificate={
+ "key": "/bootflash/server.key",
+ "hostname": "localhost",
+ },
+ compression="gzip",
+ source_interface="Ethernet8/1",
+ vrf="management",
+ )
+ ),
+ ignore_provider_arg,
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "telemetry",
+ "destination-profile",
+ "source-interface Ethernet8/1",
+ ],
+ )
+
+ def test_tms_global_change_several_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS global config is present
+ # Change source_interface, vrf and cert
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ dict(
+ config=dict(
+ certificate={
+ "key": "/bootflash/server_5.key",
+ "hostname": "my_host",
+ },
+ compression="gzip",
+ source_interface="Ethernet8/1",
+ vrf="blue",
+ )
+ ),
+ ignore_provider_arg,
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "telemetry",
+ "certificate /bootflash/server_5.key my_host",
+ "destination-profile",
+ "source-interface Ethernet8/1",
+ "use-vrf blue",
+ ],
+ )
+
+ # ------------------------------
+ # Telemetry DestGroup Test Cases
+ # ------------------------------
+
+ def test_tms_destgroup_input_validation_1(self):
+ # Mandatory parameter 'id' missing.
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "destination": {
+ "ip": "192.168.1.1",
+ "port": "5001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ }
+ }
+ ],
+ "destination_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ with pytest.raises(AnsibleFailJson) as errinfo:
+ self.execute_module()
+ testdata = errinfo.value.args[0]
+ assert "Parameter <id> under <destination_groups> is required" in str(
+ testdata["msg"]
+ )
+ assert testdata["failed"]
+
+ def test_tms_destgroup_input_validation_2(self):
+ # Parameter 'destination' is not a dict.
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [{"id": "88", "destination": "192.168.1.1"}], "destination_groups"
+ )
+ set_module_args(args, ignore_provider_arg)
+ with pytest.raises(AnsibleFailJson) as errinfo:
+ self.execute_module()
+ testdata = errinfo.value.args[0]
+ assert (
+ "Parameter <destination> under <destination_groups> must be a dict"
+ in str(testdata["msg"])
+ )
+ assert testdata["failed"]
+
+ def test_tms_destgroup_input_validation_3(self):
+ # Parameter 'destination' is not a dict.
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [{"id": "88", "ip": "192.168.1.1", "port": "5001"}],
+ "destination_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ with pytest.raises(AnsibleFailJson) as errinfo:
+ self.execute_module()
+ testdata = errinfo.value.args[0]
+ assert "Playbook entry contains unrecongnized parameters" in str(
+ testdata["msg"]
+ )
+ assert testdata["failed"]
+
+ def test_tms_destgroup_merged_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS destgroup config is not present.
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "88",
+ "destination": {
+ "ip": "192.168.1.1",
+ "port": "5001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ {
+ "id": "88",
+ "destination": {
+ "ip": "192.168.1.2",
+ "port": "6001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ {
+ "id": "99",
+ "destination": {
+ "ip": "192.168.1.2",
+ "port": "6001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ {
+ "id": "99",
+ "destination": {
+ "ip": "192.168.1.1",
+ "port": "5001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ ],
+ "destination_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "destination-group 88",
+ "ip address 192.168.1.1 port 5001 protocol grpc encoding gpb",
+ "ip address 192.168.1.2 port 6001 protocol grpc encoding gpb",
+ "destination-group 99",
+ "ip address 192.168.1.2 port 6001 protocol grpc encoding gpb",
+ "ip address 192.168.1.1 port 5001 protocol grpc encoding gpb",
+ ],
+ )
+
+ def test_tms_destgroup_checkmode_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS destgroup config is not present.
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "88",
+ "destination": {
+ "ip": "192.168.1.1",
+ "port": "5001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ }
+ ],
+ "destination_groups",
+ state="merged",
+ check_mode=True,
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "destination-group 88",
+ "ip address 192.168.1.1 port 5001 protocol grpc encoding gpb",
+ ],
+ )
+
+ def test_tms_destgroup_merged2_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS destgroup config is not present.
+ # Configure only identifier
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args([{"id": "88"}], "destination_groups")
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "destination-group 88",
+ ],
+ )
+
+ def test_tms_destgroup_idempotent_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS destgroup config is not present.
+ # Configure only identifier
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "2",
+ "destination": {
+ "ip": "192.168.0.2",
+ "port": "60001",
+ "protocol": "grpc",
+ "encoding": "gpb",
+ },
+ }
+ ],
+ "destination_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_tms_destgroup_idempotent2_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS destgroup config is not present.
+ # Configure only identifier
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args([{"id": "2"}], "destination_groups")
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_tms_destgroup_merged_aggregate_idempotent_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS destgroup config is present.
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "2",
+ "destination": {
+ "ip": "192.168.0.1",
+ "port": "50001",
+ "protocol": "gRPC",
+ "encoding": "gpb",
+ },
+ },
+ {
+ "id": "10",
+ "destination": {
+ "ip": "192.168.0.1",
+ "port": "50001",
+ "protocol": "gRPC",
+ "encoding": "gpb",
+ },
+ },
+ ],
+ "destination_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_tms_destgroup_change_n9k(self):
+ # TMS destgroup config is not present.
+ # Change protocol and encoding for dest group 2
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "2",
+ "destination": {
+ "ip": "192.168.0.1",
+ "port": "50001",
+ "protocol": "http",
+ "encoding": "JSON",
+ },
+ },
+ {
+ "id": "10",
+ "destination": {
+ "ip": "192.168.0.1",
+ "port": "50001",
+ "protocol": "gRPC",
+ "encoding": "gpb",
+ },
+ },
+ ],
+ "destination_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "telemetry",
+ "destination-group 2",
+ "ip address 192.168.0.1 port 50001 protocol http encoding json",
+ ],
+ )
+
+ def test_tms_destgroup_add_n9k(self):
+ # TMS destgroup config is not present.
+ # Add destinations to destgroup 10
+ # Add new destgroup 55 and 56
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "10",
+ "destination": {
+ "ip": "192.168.0.1",
+ "port": "50001",
+ "protocol": "gRPC",
+ "encoding": "gpb",
+ },
+ },
+ {
+ "id": "10",
+ "destination": {
+ "ip": "192.168.0.10",
+ "port": "50001",
+ "protocol": "gRPC",
+ "encoding": "gpb",
+ },
+ },
+ {
+ "id": "55",
+ "destination": {
+ "ip": "192.168.0.2",
+ "port": "50001",
+ "protocol": "gRPC",
+ "encoding": "gpb",
+ },
+ },
+ {"id": "56"},
+ ],
+ "destination_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "telemetry",
+ "destination-group 10",
+ "ip address 192.168.0.10 port 50001 protocol grpc encoding gpb",
+ "destination-group 55",
+ "ip address 192.168.0.2 port 50001 protocol grpc encoding gpb",
+ "destination-group 56",
+ ],
+ )
+
+ # --------------------------------
+ # Telemetry SensorGroup Test Cases
+ # --------------------------------
+
+ def test_tms_sensorgroup_merged_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS sensorgroup config is not present.
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ td55_name = (
+ "sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]"
+ )
+ td55_fc = (
+ 'or(eq(ethpmPhysIf.operSt,"down"),eq(ethpmPhysIf.operSt,"up"))'
+ )
+ args = build_args(
+ [
+ {
+ "id": "2",
+ "data_source": "NX-API",
+ "path": {
+ "name": "sys/bgp",
+ "depth": 0,
+ "query_condition": "foo",
+ "filter_condition": "foo",
+ },
+ },
+ {
+ "id": "2",
+ "data_source": "NX-API",
+ "path": {
+ "name": "sys/bgp/inst",
+ "depth": "unbounded",
+ "query_condition": "foo",
+ "filter_condition": "foo",
+ },
+ },
+ {
+ "id": "55",
+ "data_source": "DME",
+ "path": {
+ "name": td55_name,
+ "depth": 0,
+ "query_condition": "foo",
+ "filter_condition": "foo",
+ },
+ },
+ {
+ "id": "55",
+ "data_source": "DME",
+ "path": {
+ "name": "sys/ospf",
+ "depth": 0,
+ "query_condition": "foo",
+ "filter_condition": td55_fc,
+ },
+ },
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "sensor-group 2",
+ "data-source NX-API",
+ "path sys/bgp depth 0 query-condition foo filter-condition foo",
+ "path sys/bgp/inst depth unbounded query-condition foo filter-condition foo",
+ "sensor-group 55",
+ "data-source DME",
+ "path sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11] depth 0 query-condition foo filter-condition foo",
+ 'path sys/ospf depth 0 query-condition foo filter-condition or(eq(ethpmPhysIf.operSt,"down"),eq(ethpmPhysIf.operSt,"up"))',
+ ],
+ )
+
+ def test_tms_sensorgroup_input_validation_1(self):
+ # Mandatory parameter 'id' missing.
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "data_source": "DME",
+ "path": {
+ "name": "sys/bgp",
+ "depth": 0,
+ "query_condition": "query_condition_xyz",
+ "filter_condition": "filter_condition_xyz",
+ },
+ }
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ with pytest.raises(AnsibleFailJson) as errinfo:
+ self.execute_module()
+ testdata = errinfo.value.args[0]
+ assert "Parameter <id> under <sensor_groups> is required" in str(
+ testdata["msg"]
+ )
+ assert testdata["failed"]
+
+ def test_tms_sensorgroup_input_validation_2(self):
+ # Path present but mandatory 'name' key is not
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "77",
+ "data_source": "DME",
+ "path": {
+ "depth": 0,
+ "query_condition": "query_condition_xyz",
+ "filter_condition": "filter_condition_xyz",
+ },
+ }
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ with pytest.raises(AnsibleFailJson) as errinfo:
+ self.execute_module()
+ testdata = errinfo.value.args[0]
+ assert (
+ "Parameter <path> under <sensor_groups> requires <name> key"
+ in str(testdata["msg"])
+ )
+ assert testdata["failed"]
+
+ def test_tms_sensorgroup_resource_key_n9k(self):
+ # TMS sensorgroup config is not present.
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args([{"id": "77"}], "sensor_groups")
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=["feature telemetry", "telemetry", "sensor-group 77"],
+ )
+
+ def test_tms_sensorgroup_merged_variable_args1_n9k(self):
+ # TMS sensorgroup config is not present.
+ # Only path key name provided
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [{"id": "77", "data_source": "DME", "path": {"name": "sys/bgp"}}],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "sensor-group 77",
+ "data-source DME",
+ "path sys/bgp",
+ ],
+ )
+
+ def test_tms_sensorgroup_merged_variable_args2_n9k(self):
+ # TMS sensorgroup config is not present.
+ # Only path keys name and depth provided
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "77",
+ "data_source": "DME",
+ "path": {"name": "sys/bgp", "depth": 0},
+ }
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "sensor-group 77",
+ "data-source DME",
+ "path sys/bgp depth 0",
+ ],
+ )
+
+ def test_tms_sensorgroup_merged_variable_args3_n9k(self):
+ # TMS sensorgroup config is not present.
+ # Only path keys name, depth and query_condition provided
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "77",
+ "data_source": "DME",
+ "path": {
+ "name": "sys/bgp",
+ "depth": 0,
+ "query_condition": "query_condition_xyz",
+ },
+ }
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "sensor-group 77",
+ "data-source DME",
+ "path sys/bgp depth 0 query-condition query_condition_xyz",
+ ],
+ )
+
+ def test_tms_sensorgroup_merged_variable_args4_n9k(self):
+ # TMS sensorgroup config is not present.
+ # Only path keys name, depth and filter_condition provided
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "77",
+ "data_source": "DME",
+ "path": {
+ "name": "sys/bgp",
+ "depth": 0,
+ "filter_condition": "filter_condition_xyz",
+ },
+ }
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "sensor-group 77",
+ "data-source DME",
+ "path sys/bgp depth 0 filter-condition filter_condition_xyz",
+ ],
+ )
+
+ def test_tms_sensorgroup_merged_idempotent_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS sensorgroup config is not present.
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "2",
+ "data_source": "DME",
+ "path": {
+ "name": "sys/ospf",
+ "depth": 0,
+ "query_condition": "qc",
+ "filter_condition": "fc",
+ },
+ }
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_tms_sensorgroup_quotes_merged_idempotent_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS sensorgroup config is present with quotes in NX-API path.
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K_SGs.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "2",
+ "data_source": "NX-API",
+ "path": {
+ "name": '"show mac address-table count"',
+ "depth": 2,
+ },
+ },
+ {
+ "id": "3",
+ "data_source": "NX-API",
+ "path": {"name": '"show interface ethernet1/1-52"'},
+ },
+ {"id": "1", "path": {"name": "sys/procsys", "depth": 1}},
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_tms_sensorgroup_vxlan_idempotent_n9k(self):
+ # TMS sensorgroup config present.
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [{"id": "56", "data_source": "DME", "path": {"name": "vxlan"}}],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_tms_sensorgroup_idempotent_variable1_n9k(self):
+ # TMS sensorgroup config is present with path key name.
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "2",
+ "data_source": "DME",
+ "path": {
+ "name": "sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]"
+ },
+ }
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_tms_sensorgroup_idempotent_variable2_n9k(self):
+ # TMS sensorgroup config is present with path key name and depth.
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "2",
+ "data_source": "DME",
+ "path": {"name": "boo", "depth": 0},
+ }
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_tms_sensorgroup_idempotent_resource_key_n9k(self):
+ # TMS sensorgroup config is present resource key only.
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args([{"id": "55"}], "sensor_groups")
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_tms_sensorgroup_present_path_environment_n9k(self):
+ # TMS sensorgroup config is not present.
+ # Path name 'environment' test
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "77",
+ "data_source": "YANG",
+ "path": {"name": "environment"},
+ }
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "sensor-group 77",
+ "data-source YANG",
+ "path environment",
+ ],
+ )
+
+ def test_tms_sensorgroup_present_path_interface_n9k(self):
+ # TMS sensorgroup config is not present.
+ # Path name 'interface' test
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "77",
+ "data_source": "NATIVE",
+ "path": {"name": "interface"},
+ }
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "sensor-group 77",
+ "data-source NATIVE",
+ "path interface",
+ ],
+ )
+
+ def test_tms_sensorgroup_present_path_interface_n9k(self):
+ # TMS sensorgroup config is not present.
+ # Path name 'resources' test
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": "77",
+ "data_source": "NX-API",
+ "path": {"name": "resources"},
+ }
+ ],
+ "sensor_groups",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "sensor-group 77",
+ "data-source NX-API",
+ "path resources",
+ ],
+ )
+
+ # ---------------------------------
+ # Telemetry Subscription Test Cases
+ # ---------------------------------
+
+ def test_tms_subscription_merged_n9k(self):
+ # TMS subscription config is not present.
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {
+ "id": 5,
+ "destination_group": 55,
+ "sensor_group": {"id": 1, "sample_interval": 1000},
+ },
+ {
+ "id": 88,
+ "destination_group": 3,
+ "sensor_group": {"id": 4, "sample_interval": 2000},
+ },
+ ],
+ "subscriptions",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "subscription 5",
+ "dst-grp 55",
+ "snsr-grp 1 sample-interval 1000",
+ "subscription 88",
+ "dst-grp 3",
+ "snsr-grp 4 sample-interval 2000",
+ ],
+ )
+
+ def test_tms_subscription_merged_idempotent_n9k(self):
+ # TMS subscription config is not present.
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {"id": 3},
+ {
+ "id": 7,
+ "destination_group": 10,
+ "sensor_group": {"id": 2, "sample_interval": 1000},
+ },
+ {
+ "id": 5,
+ "destination_group": 2,
+ "sensor_group": {"id": 2, "sample_interval": 1000},
+ },
+ ],
+ "subscriptions",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_tms_subscription_merged_change1_n9k(self):
+ # TMS subscription config present.
+ # Change sample interval for sensor group 2
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {"id": 3},
+ {
+ "id": 7,
+ "destination_group": 10,
+ "sensor_group": {"id": 2, "sample_interval": 3000},
+ },
+ {
+ "id": 5,
+ "destination_group": 2,
+ "sensor_group": {"id": 2, "sample_interval": 1000},
+ },
+ ],
+ "subscriptions",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "telemetry",
+ "subscription 7",
+ "snsr-grp 2 sample-interval 3000",
+ ],
+ )
+
+ def test_tms_subscription_add_n9k(self):
+ # TMS subscription config present.
+ # Add new destination_group and sensor_group to subscription 5
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ args = build_args(
+ [
+ {"id": 3},
+ {
+ "id": 7,
+ "destination_group": 10,
+ "sensor_group": {"id": 2, "sample_interval": 1000},
+ },
+ {
+ "id": 5,
+ "destination_group": 2,
+ "sensor_group": {"id": 2, "sample_interval": 1000},
+ },
+ {
+ "id": 5,
+ "destination_group": 7,
+ "sensor_group": {"id": 2, "sample_interval": 1000},
+ },
+ {
+ "id": 5,
+ "destination_group": 8,
+ "sensor_group": {"id": 9, "sample_interval": 1000},
+ },
+ {
+ "id": 5,
+ "destination_group": 9,
+ "sensor_group": {"id": 10, "sample_interval": 1000},
+ },
+ ],
+ "subscriptions",
+ )
+ set_module_args(args, ignore_provider_arg)
+ self.execute_module(
+ changed=True,
+ commands=[
+ "telemetry",
+ "subscription 5",
+ "dst-grp 7",
+ "dst-grp 8",
+ "dst-grp 9",
+ "snsr-grp 9 sample-interval 1000",
+ "snsr-grp 10 sample-interval 1000",
+ ],
+ )
+
+ def test_telemetry_full_n9k(self):
+ # Assumes feature telemetry is disabled
+ # TMS global config is not present.
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ {
+ "state": "merged",
+ "config": {
+ "certificate": {
+ "key": "/bootflash/sample.key",
+ "hostname": "server.example.com",
+ },
+ "compression": "gzip",
+ "source_interface": "Ethernet2/1",
+ "vrf": "blue",
+ "destination_groups": [
+ {
+ "id": "88",
+ "destination": {
+ "ip": "192.168.1.1",
+ "port": "5001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ {
+ "id": "88",
+ "destination": {
+ "ip": "192.168.1.2",
+ "port": "6001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ {
+ "id": "99",
+ "destination": {
+ "ip": "192.168.1.2",
+ "port": "6001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ {
+ "id": "99",
+ "destination": {
+ "ip": "192.168.1.1",
+ "port": "5001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ ],
+ "sensor_groups": [
+ {
+ "id": "77",
+ "data_source": "DME",
+ "path": {
+ "name": "sys/bgp",
+ "depth": 0,
+ "query_condition": "query_condition_xyz",
+ "filter_condition": "filter_condition_xyz",
+ },
+ },
+ {
+ "id": "99",
+ "data_source": "DME",
+ "path": {
+ "name": "sys/bgp",
+ "depth": 0,
+ "query_condition": "query_condition_xyz",
+ "filter_condition": "filter_condition_xyz",
+ },
+ },
+ ],
+ "subscriptions": [
+ {
+ "id": 5,
+ "destination_group": 88,
+ "sensor_group": {
+ "id": 77,
+ "sample_interval": 1000,
+ },
+ },
+ {
+ "id": 5,
+ "destination_group": 99,
+ "sensor_group": {
+ "id": 77,
+ "sample_interval": 1000,
+ },
+ },
+ {
+ "id": 88,
+ "destination_group": 99,
+ "sensor_group": {
+ "id": 99,
+ "sample_interval": 2000,
+ },
+ },
+ ],
+ },
+ },
+ ignore_provider_arg,
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "feature telemetry",
+ "telemetry",
+ "certificate /bootflash/sample.key server.example.com",
+ "destination-profile",
+ "use-compression gzip",
+ "source-interface Ethernet2/1",
+ "use-vrf blue",
+ "destination-group 88",
+ "ip address 192.168.1.1 port 5001 protocol grpc encoding gpb",
+ "ip address 192.168.1.2 port 6001 protocol grpc encoding gpb",
+ "destination-group 99",
+ "ip address 192.168.1.2 port 6001 protocol grpc encoding gpb",
+ "ip address 192.168.1.1 port 5001 protocol grpc encoding gpb",
+ "sensor-group 77",
+ "data-source DME",
+ "path sys/bgp depth 0 query-condition query_condition_xyz filter-condition filter_condition_xyz",
+ "sensor-group 99",
+ "data-source DME",
+ "path sys/bgp depth 0 query-condition query_condition_xyz filter-condition filter_condition_xyz",
+ "subscription 5",
+ "dst-grp 88",
+ "dst-grp 99",
+ "snsr-grp 77 sample-interval 1000",
+ "subscription 88",
+ "dst-grp 99",
+ "snsr-grp 99 sample-interval 2000",
+ ],
+ )
+
+ def test_telemetry_deleted_input_validation_n9k(self):
+ # State is 'deleted' and 'config' key present.
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ dict(
+ state="deleted",
+ config=dict(
+ certificate={
+ "key": "/bootflash/server.key",
+ "hostname": "localhost",
+ },
+ compression="gzip",
+ source_interface="loopback55",
+ vrf="management",
+ ),
+ ),
+ ignore_provider_arg,
+ )
+ with pytest.raises(AnsibleFailJson) as errinfo:
+ self.execute_module()
+ testdata = errinfo.value.args[0]
+ assert (
+ "Remove config key from playbook when state is <deleted>"
+ in str(testdata["msg"])
+ )
+ assert testdata["failed"]
+
+ def test_telemetry_deleted_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS global config is present.
+ # Make absent with all playbook keys provided
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(dict(state="deleted"), ignore_provider_arg)
+ self.execute_module(changed=True, commands=["no telemetry"])
+
+ def test_telemetry_deleted_idempotent_n9k(self):
+ # Assumes feature telemetry is enabled
+ # TMS global config is present.
+ # Make absent with all playbook keys provided
+ self.execute_show_command.return_value = None
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(dict(state="deleted"), ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_tms_replaced1_n9k(self):
+ # Assumes feature telemetry is enabled
+ # Modify global config and remove everything else
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ dict(
+ state="replaced",
+ config=dict(
+ certificate={
+ "key": "/bootflash/sample.key",
+ "hostname": "server.example.com",
+ },
+ compression="gzip",
+ vrf="blue",
+ ),
+ ),
+ ignore_provider_arg,
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "telemetry",
+ "no subscription 3",
+ "no subscription 4",
+ "no subscription 5",
+ "no subscription 6",
+ "no subscription 7",
+ "no sensor-group 2",
+ "no sensor-group 55",
+ "no sensor-group 56",
+ "no destination-group 2",
+ "no destination-group 10",
+ "certificate /bootflash/sample.key server.example.com",
+ "destination-profile",
+ "no source-interface loopback55",
+ "use-vrf blue",
+ ],
+ )
+
+ def test_tms_replaced2_n9k(self):
+ # Assumes feature telemetry is enabled
+ # Remove/default all global config
+ # Modify destination-group 10, add 11 and 99, remove 2
+ # Modify sensor-group 55, 56
+ # remove all subscriptions
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ {
+ "state": "replaced",
+ "config": {
+ "destination_groups": [
+ {
+ "id": 10,
+ "destination": {
+ "ip": "192.168.1.1",
+ "port": "5001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ {
+ "id": 11,
+ "destination": {
+ "ip": "192.168.1.2",
+ "port": "6001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ {
+ "id": 99,
+ "destination": {
+ "ip": "192.168.1.2",
+ "port": "6001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ {
+ "id": "99",
+ "destination": {
+ "ip": "192.168.1.1",
+ "port": "5001",
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ ],
+ "sensor_groups": [
+ {
+ "id": 55,
+ "data_source": "NX-API",
+ "path": {
+ "name": "sys/bgp",
+ "depth": 0,
+ "query_condition": "query_condition_xyz",
+ "filter_condition": "filter_condition_xyz",
+ },
+ },
+ {
+ "id": "56",
+ "data_source": "NX-API",
+ "path": {
+ "name": "sys/bgp",
+ "depth": 0,
+ "query_condition": "query_condition_xyz",
+ "filter_condition": "filter_condition_xyz",
+ },
+ },
+ ],
+ },
+ },
+ ignore_provider_arg,
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "telemetry",
+ "no subscription 3",
+ "no subscription 5",
+ "no subscription 4",
+ "no subscription 7",
+ "no subscription 6",
+ "sensor-group 56",
+ "no data-source DME",
+ "no path environment",
+ "no path interface",
+ "no path resources",
+ "no path vxlan",
+ "no sensor-group 2",
+ "destination-group 10",
+ "no ip address 192.168.0.1 port 50001 protocol grpc encoding gpb",
+ "no ip address 192.168.0.2 port 60001 protocol grpc encoding gpb",
+ "no destination-group 2",
+ "destination-group 11",
+ "ip address 192.168.1.2 port 6001 protocol grpc encoding gpb",
+ "destination-group 10",
+ "ip address 192.168.1.1 port 5001 protocol grpc encoding gpb",
+ "destination-group 99",
+ "ip address 192.168.1.2 port 6001 protocol grpc encoding gpb",
+ "ip address 192.168.1.1 port 5001 protocol grpc encoding gpb",
+ "sensor-group 55",
+ "data-source NX-API",
+ "path sys/bgp depth 0 query-condition query_condition_xyz filter-condition filter_condition_xyz",
+ "sensor-group 56",
+ "data-source NX-API",
+ "path sys/bgp depth 0 query-condition query_condition_xyz filter-condition filter_condition_xyz",
+ "no certificate /bootflash/server.key localhost",
+ "no destination-profile",
+ ],
+ )
+
+ def test_tms_replaced3_n9k(self):
+ # Assumes feature telemetry is enabled
+ # Modify vrf global config, remove default all other global config.
+ # destination-group 2 destination '192.168.0.1' idempotent
+ # destination-group 2 destination '192.168.0.2' remove
+ # remove all other destination-groups
+ # Modify sensor-group 55 and delete all others
+ # Modify subscription 7, add 10 and delete all others
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ {
+ "state": "replaced",
+ "config": {
+ "vrf": "blue",
+ "destination_groups": [
+ {
+ "id": 2,
+ "destination": {
+ "ip": "192.168.0.1",
+ "port": 50001,
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ }
+ ],
+ "sensor_groups": [
+ {
+ "id": 55,
+ "data_source": "NX-API",
+ "path": {
+ "name": "sys/bgp",
+ "depth": 0,
+ "query_condition": "query_condition_xyz",
+ "filter_condition": "filter_condition_xyz",
+ },
+ }
+ ],
+ "subscriptions": [
+ {
+ "id": 7,
+ "destination_group": 10,
+ "sensor_group": {
+ "id": 55,
+ "sample_interval": 1000,
+ },
+ },
+ {
+ "id": 10,
+ "destination_group": 2,
+ "sensor_group": {
+ "id": 55,
+ "sample_interval": 1000,
+ },
+ },
+ ],
+ },
+ },
+ ignore_provider_arg,
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "telemetry",
+ "no subscription 3",
+ "no subscription 5",
+ "no subscription 4",
+ "subscription 7",
+ "no snsr-grp 2 sample-interval 1000",
+ "no subscription 6",
+ "no sensor-group 56",
+ "no sensor-group 2",
+ "no destination-group 10",
+ "destination-group 2",
+ "no ip address 192.168.0.2 port 60001 protocol grpc encoding gpb",
+ "sensor-group 55",
+ "data-source NX-API",
+ "path sys/bgp depth 0 query-condition query_condition_xyz filter-condition filter_condition_xyz",
+ "subscription 10",
+ "dst-grp 2",
+ "snsr-grp 55 sample-interval 1000",
+ "subscription 7",
+ "snsr-grp 55 sample-interval 1000",
+ "no certificate /bootflash/server.key localhost",
+ "destination-profile",
+ "no use-compression gzip",
+ "no source-interface loopback55",
+ "use-vrf blue",
+ ],
+ )
+
+ def test_tms_replaced_idempotent_n9k(self):
+ # Assumes feature telemetry is enabled
+ # Modify vrf global config, remove default all other global config.
+ # destination-group 2 destination '192.168.0.1' idempotent
+ # destination-group 2 destination '192.168.0.2' remove
+ # remove all other destination-groups
+ # Modify sensor-group 55 and delete all others
+ # Modify subscription 7, add 10 and delete all others
+ self.execute_show_command.return_value = load_fixture(
+ "nxos_telemetry", "N9K.cfg"
+ )
+ self.get_platform_shortname.return_value = "N9K"
+ set_module_args(
+ {
+ "state": "replaced",
+ "config": {
+ "certificate": {
+ "key": "/bootflash/server.key",
+ "hostname": "localhost",
+ },
+ "compression": "gzip",
+ "vrf": "management",
+ "source_interface": "loopback55",
+ "destination_groups": [
+ {
+ "id": 2,
+ "destination": {
+ "ip": "192.168.0.1",
+ "port": 50001,
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ {
+ "id": 2,
+ "destination": {
+ "ip": "192.168.0.2",
+ "port": 60001,
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ {
+ "id": 10,
+ "destination": {
+ "ip": "192.168.0.1",
+ "port": 50001,
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ {
+ "id": 10,
+ "destination": {
+ "ip": "192.168.0.2",
+ "port": 60001,
+ "protocol": "GRPC",
+ "encoding": "GPB",
+ },
+ },
+ ],
+ "sensor_groups": [
+ {
+ "id": 2,
+ "data_source": "DME",
+ "path": {"name": "boo", "depth": 0},
+ },
+ {
+ "id": 2,
+ "path": {
+ "name": "sys/ospf",
+ "depth": 0,
+ "query_condition": "qc",
+ "filter_condition": "fc",
+ },
+ },
+ {"id": 2, "path": {"name": "interfaces", "depth": 0}},
+ {"id": 2, "path": {"name": "sys/bgp"}},
+ {
+ "id": 2,
+ "path": {
+ "name": "sys/bgp/inst",
+ "depth": 0,
+ "query_condition": "foo",
+ "filter_condition": "foo",
+ },
+ },
+ {
+ "id": 2,
+ "path": {
+ "name": "sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]"
+ },
+ },
+ {
+ "id": 2,
+ "path": {
+ "name": "sys/bgp/inst/dom-default/peer-[20.20.20.11]/ent-[20.20.20.11]"
+ },
+ },
+ {
+ "id": 2,
+ "path": {
+ "name": "too",
+ "depth": 0,
+ "filter_condition": "foo",
+ },
+ },
+ {"id": 55},
+ {"id": 56, "data_source": "DME"},
+ {"id": 56, "path": {"name": "environment"}},
+ {"id": 56, "path": {"name": "interface"}},
+ {"id": 56, "path": {"name": "resources"}},
+ {"id": 56, "path": {"name": "vxlan"}},
+ ],
+ "subscriptions": [
+ {"id": 3},
+ {
+ "id": 4,
+ "destination_group": 2,
+ "sensor_group": {"id": 2, "sample_interval": 1000},
+ },
+ {"id": 5, "destination_group": 2},
+ {
+ "id": 5,
+ "sensor_group": {"id": 2, "sample_interval": 1000},
+ },
+ {"id": 6, "destination_group": 10},
+ {
+ "id": 7,
+ "destination_group": 10,
+ "sensor_group": {"id": 2, "sample_interval": 1000},
+ },
+ ],
+ },
+ },
+ ignore_provider_arg,
+ )
+ self.execute_module(changed=False, commands=[])
+
+
+def build_args(data, type, state=None, check_mode=None):
+ if state is None:
+ state = "merged"
+ if check_mode is None:
+ check_mode = False
+ args = {
+ "state": state,
+ "_ansible_check_mode": check_mode,
+ "config": {type: data},
+ }
+ return args
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_user.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_user.py
new file mode 100644
index 00000000..62620129
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_user.py
@@ -0,0 +1,104 @@
+# (c) 2020 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_user
+from .nxos_module import TestNxosModule, set_module_args
+
+ignore_provider_arg = True
+
+
+class TestNxosUserModule(TestNxosModule):
+
+ module = nxos_user
+
+ def setUp(self):
+ super(TestNxosUserModule, self).setUp()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_user.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_user.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_user.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_get_device_info = patch(
+ "ansible_collections.cisco.nxos.plugins.cliconf.nxos.Cliconf.get_device_info"
+ )
+ self.get_device_info = self.mock_get_device_info.start()
+
+ def tearDown(self):
+ super(TestNxosUserModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+ self.mock_get_device_info.stop()
+
+ def test_mds(self):
+ self.get_config.return_value = ""
+ self.run_commands.return_value = [
+ {
+ "TABLE_template": {
+ "ROW_template": [
+ {
+ "usr_name": "admin",
+ "expire_date": "this user account has no expiry date",
+ "TABLE_role": {
+ "ROW_role": {"role": "network-admin"}
+ },
+ },
+ {
+ "usr_name": "ansible-test-1",
+ "expire_date": "this user account has no expiry date",
+ "TABLE_role": {"ROW_role": [{"role": "priv-10"}]},
+ },
+ ]
+ }
+ }
+ ]
+ self.get_device_info.return_value = {
+ "network_os": "nxos",
+ "network_os_version": "8.4(2b)",
+ "network_os_model": 'MDS 9148S 16G 48 FC (1 Slot) Chassis ("2/4/8/16 Gbps FC/Supervisor")',
+ "network_os_hostname": "sw109-Mini",
+ "network_os_image": "bootflash:///m9100-s5ek9-mz.8.4.2b.bin",
+ "network_os_platform": "DS-C9710",
+ }
+ set_module_args(
+ dict(name="ansible-test-2", configured_password="ansible")
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "username ansible-test-2",
+ "username ansible-test-2 password ansible",
+ ],
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vlan.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vlan.py
new file mode 100644
index 00000000..0ba5a783
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vlan.py
@@ -0,0 +1,235 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+import json
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_vlan
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosVlanModule(TestNxosModule):
+
+ module = nxos_vlan
+
+ def setUp(self):
+ super(TestNxosVlanModule, self).setUp()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vlan.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vlan.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vlan.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_get_capabilities = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vlan.get_capabilities"
+ )
+ self.get_capabilities = self.mock_get_capabilities.start()
+ self.get_capabilities.return_value = {
+ "device_info": {"network_os_platform": "N9K-9000v"},
+ "network_api": "cliconf",
+ }
+
+ def tearDown(self):
+ super(TestNxosVlanModule, self).tearDown()
+ self.mock_run_commands.stop()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+ self.mock_get_capabilities.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+
+ for item in commands:
+ try:
+ obj = json.loads(item)
+ command = obj["command"]
+ except ValueError:
+ command = item
+ filename = "%s.txt" % str(command).split(" | ")[0].replace(
+ " ", "_"
+ )
+ output.append(load_fixture("nxos_vlan", filename))
+ return output
+
+ def agg_load_from_file(*args, **kwargs):
+ """Load vlan output for aggregate/purge tests"""
+ return [load_fixture("nxos_vlan", "agg_show_vlan_brief.txt")]
+
+ if "_agg_" in self._testMethodName:
+ self.run_commands.side_effect = agg_load_from_file
+ else:
+ self.run_commands.side_effect = load_from_file
+
+ self.load_config.return_value = None
+ self.get_config.return_value = load_fixture("nxos_vlan", "config.cfg")
+
+ def test_nxos_vlan_agg_1(self):
+ # Aggregate: vlan 4/5 exist -> Add 6
+ set_module_args(
+ dict(
+ aggregate=[
+ {"name": "_5_", "vlan_id": 5},
+ {"name": "_6_", "vlan_id": 6},
+ ]
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "vlan 6",
+ "name _6_",
+ "state active",
+ "no shutdown",
+ "exit",
+ ],
+ )
+
+ def test_nxos_vlan_agg_2(self):
+ # Aggregate: vlan 4/5 exist -> Add none (idempotence)
+ set_module_args(
+ dict(
+ aggregate=[
+ {"name": "_5_", "vlan_id": 5},
+ {"name": "_4_", "vlan_id": 4},
+ ]
+ )
+ )
+ self.execute_module(changed=False)
+
+ def test_nxos_vlan_agg_3(self):
+ # Aggregate/Purge: vlan 4/5 exist -> Add 6, Purge 4
+ set_module_args(
+ dict(
+ aggregate=[
+ {"name": "_5_", "vlan_id": 5},
+ {"name": "_6_", "vlan_id": 6},
+ ],
+ purge=True,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "vlan 6",
+ "name _6_",
+ "state active",
+ "no shutdown",
+ "exit",
+ "no vlan 4",
+ ],
+ )
+
+ def test_nxos_vlan_agg_4(self):
+ # Aggregate/Purge: vlan 4/5 exist -> Purge None (idempotence)
+ set_module_args(
+ dict(
+ aggregate=[
+ {"name": "_5_", "vlan_id": 5},
+ {"name": "_4_", "vlan_id": 4},
+ ]
+ )
+ )
+ self.execute_module(changed=False)
+
+ def test_nxos_vlan_agg_5(self):
+ # Purge with Single Vlan: vlan 4/5 exist -> Add 6, Purge 4/5
+ set_module_args(dict(vlan_id=6, name="_6_", purge=True))
+ self.execute_module(
+ changed=True,
+ commands=[
+ "vlan 6",
+ "name _6_",
+ "state active",
+ "no shutdown",
+ "exit",
+ "no vlan 4",
+ "no vlan 5",
+ ],
+ )
+
+ def test_nxos_vlan_agg_6(self):
+ # Purge All: vlan 4/5 exist -> Purge 4/5
+ set_module_args(dict(vlan_id=1, purge=True))
+ self.execute_module(changed=True, commands=["no vlan 4", "no vlan 5"])
+
+ def test_nxos_vlan_range(self):
+ set_module_args(dict(vlan_range="6-10"))
+ self.execute_module(
+ changed=True,
+ commands=["vlan 6", "vlan 7", "vlan 8", "vlan 9", "vlan 10"],
+ )
+
+ def test_nxos_vlan_range_absent(self):
+ set_module_args(dict(vlan_range="1-5", state="absent"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["no vlan 1"])
+
+ def test_nxos_vlan_id(self):
+ set_module_args(dict(vlan_id="15", state="present"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["vlan 15", "state active", "no shutdown", "exit"],
+ )
+
+ def test_nxos_vlan_id_absent(self):
+ set_module_args(dict(vlan_id="1", state="absent"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["no vlan 1"])
+
+ def test_nxos_vlan_named_vlan(self):
+ set_module_args(dict(vlan_id="15", name="WEB"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["vlan 15", "name WEB", "state active", "no shutdown", "exit"],
+ )
+
+ def test_nxos_vlan_shut_down(self):
+ set_module_args(dict(vlan_id="1", admin_state="down"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(result["commands"], ["vlan 1", "shutdown", "exit"])
+
+ def test_nxos_vlan_no_change(self):
+ set_module_args(
+ dict(
+ vlan_id="1",
+ name="default",
+ vlan_state="active",
+ admin_state="up",
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vlans.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vlans.py
new file mode 100644
index 00000000..955da390
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vlans.py
@@ -0,0 +1,294 @@
+# (c) 2019 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from textwrap import dedent
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.tests.unit.modules.utils import (
+ AnsibleFailJson,
+)
+from ansible_collections.cisco.nxos.plugins.modules import nxos_vlans
+from ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.vlans.vlans import (
+ Vlans,
+)
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+ignore_provider_arg = True
+
+
+class TestNxosVlansModule(TestNxosModule):
+
+ module = nxos_vlans
+
+ def setUp(self):
+ super(TestNxosVlansModule, self).setUp()
+
+ self.mock_FACT_LEGACY_SUBSETS = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS"
+ )
+ self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.start()
+
+ self.mock_get_resource_connection_config = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.cfg.base.get_resource_connection"
+ )
+ self.get_resource_connection_config = (
+ self.mock_get_resource_connection_config.start()
+ )
+
+ self.mock_get_resource_connection_facts = patch(
+ "ansible_collections.ansible.netcommon.plugins.module_utils.network.common.facts.facts.get_resource_connection"
+ )
+ self.get_resource_connection_facts = (
+ self.mock_get_resource_connection_facts.start()
+ )
+
+ self.mock_edit_config = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.vlans.vlans.Vlans.edit_config"
+ )
+ self.edit_config = self.mock_edit_config.start()
+
+ self.mock_get_device_data = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.facts.vlans.vlans.VlansFacts.get_device_data"
+ )
+ self.get_device_data = self.mock_get_device_data.start()
+
+ self.mock_get_platform = patch(
+ "ansible_collections.cisco.nxos.plugins.module_utils.network.nxos.config.vlans.vlans.Vlans.get_platform"
+ )
+ self.get_platform = self.mock_get_platform.start()
+
+ def tearDown(self):
+ super(TestNxosVlansModule, self).tearDown()
+ self.mock_FACT_LEGACY_SUBSETS.stop()
+ self.mock_get_resource_connection_config.stop()
+ self.mock_get_resource_connection_facts.stop()
+ self.mock_edit_config.stop()
+ self.mock_get_platform.stop()
+
+ def prepare(self, test=""):
+ if test == "_no_facts":
+ self.get_device_data.side_effect = self.load_from_file_no_facts
+ else:
+ self.get_device_data.side_effect = self.load_from_file
+ self.get_platform.return_value = "N9K-NXOSv"
+
+ def load_from_file(self, *args, **kwargs):
+ cmd = args[1]
+ filename = str(cmd).split(" | ")[0].replace(" ", "_")
+ return load_fixture("nxos_vlans", filename)
+
+ def load_from_file_no_facts(self, *args, **kwargs):
+ cmd = args[1]
+ filename = str(cmd).split(" | ")[0].replace(" ", "_")
+ filename += "_no_facts"
+ return load_fixture("nxos_vlans", filename)
+
+ def test_1(self):
+ """
+ **NOTE** This config is for reference only! See fixtures files for real data.
+ vlan 1,3-5,8
+ vlan 3
+ name test-vlan3
+ !Note:vlan 4 is present with default settings
+ vlan 5
+ shutdown
+ name test-changeme
+ mode fabricpath
+ state suspend
+ vn-segment 942
+ !Note:vlan 7 is not present
+ vlan 8
+ shutdown
+ name test-changeme-not
+ state suspend
+ """
+ self.prepare()
+ self.get_platform.return_value = "N7K-Cxxx"
+
+ playbook = dict(
+ config=[
+ dict(vlan_id=4),
+ dict(vlan_id=5, mapped_vni=555, mode="ce"),
+ dict(
+ vlan_id=7, mapped_vni=777, name="test-vlan7", enabled=False
+ ),
+ dict(vlan_id="8", state="active", name="test-changeme-not")
+ # vlan 3 is not present in playbook.
+ ]
+ )
+
+ merged = [
+ # Update existing device states with any differences in the playbook.
+ "vlan 5",
+ "vn-segment 555",
+ "mode ce",
+ "vlan 7",
+ "vn-segment 777",
+ "name test-vlan7",
+ "shutdown",
+ "vlan 8",
+ "state active",
+ ]
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=merged)
+
+ self.get_platform.return_value = "N9K-NXOSv"
+ deleted = [
+ # Reset existing device state to default values. Scope is limited to
+ # objects in the play when the 'config' key is specified. For vlans
+ # this means deleting each vlan listed in the playbook and ignoring
+ # any play attrs other than 'vlan_id'.
+ "no vlan 4",
+ "no vlan 5",
+ "no vlan 8",
+ ]
+ playbook["state"] = "deleted"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ self.get_platform.return_value = "N5K-Cxxx"
+ overridden = [
+ # The play is the source of truth. Similar to replaced but the scope
+ # includes all objects on the device; i.e. it will also reset state
+ # on objects not found in the play.
+ "no vlan 1",
+ "no vlan 3",
+ "vlan 5",
+ "mode ce",
+ "vn-segment 555",
+ "no state",
+ "no shutdown",
+ "no name",
+ "vlan 8",
+ "no shutdown",
+ "state active",
+ "vlan 7",
+ "name test-vlan7",
+ "shutdown",
+ "vn-segment 777",
+ ]
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=overridden)
+
+ self.get_platform.return_value = "N7K-NXOSv"
+ replaced = [
+ # Scope is limited to objects in the play.
+ # replaced should ignore existing vlan 3.
+ "vlan 5",
+ "mode ce",
+ "vn-segment 555",
+ "no state",
+ "no shutdown",
+ "no name",
+ "vlan 7",
+ "shutdown",
+ "name test-vlan7",
+ "vn-segment 777",
+ "vlan 8",
+ "no shutdown",
+ "state active",
+ ]
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ def test_2(self):
+ # Test when no 'config' key is used in playbook.
+ self.prepare()
+ deleted = [
+ "no vlan 1",
+ "no vlan 3",
+ "no vlan 4",
+ "no vlan 5",
+ "no vlan 8",
+ ]
+ playbook = dict(state="deleted")
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=deleted)
+
+ for test_state in ["merged", "replaced", "overridden"]:
+ set_module_args(dict(state=test_state), ignore_provider_arg)
+ self.execute_module(failed=True)
+
+ def test_3(self):
+ # Test no facts returned
+ self.prepare(test="_no_facts")
+ playbook = dict(state="deleted")
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=False)
+
+ def test_4(self):
+ self.prepare()
+ # Misc tests to hit codepaths highlighted by code coverage tool as missed.
+ playbook = dict(config=[dict(vlan_id=8, enabled=True)])
+ replaced = [
+ # Update existing device states with any differences in the playbook.
+ "vlan 8",
+ "no shutdown",
+ "no state",
+ "no name",
+ ]
+ playbook["state"] = "replaced"
+ playbook["_ansible_check_mode"] = True
+ set_module_args(playbook, ignore_provider_arg)
+ self.execute_module(changed=True, commands=replaced)
+
+ def test_5(self):
+ """
+ Idempotency test
+ """
+
+ self.prepare()
+ playbook = dict(
+ config=[
+ dict(vlan_id=1, name="default", enabled=True),
+ dict(vlan_id=3, name="test-vlan3", enabled=True),
+ dict(vlan_id=4, enabled=True),
+ dict(
+ vlan_id=5,
+ name="test-changeme",
+ mapped_vni=942,
+ state="suspend",
+ enabled=False,
+ ),
+ dict(
+ vlan_id=8,
+ name="test-changeme-not",
+ state="suspend",
+ enabled=False,
+ ),
+ ]
+ )
+
+ playbook["state"] = "merged"
+ set_module_args(playbook, ignore_provider_arg)
+ r = self.execute_module(changed=False)
+
+ playbook["state"] = "overridden"
+ set_module_args(playbook, ignore_provider_arg)
+ r = self.execute_module(changed=False)
+
+ playbook["state"] = "replaced"
+ set_module_args(playbook, ignore_provider_arg)
+ r = self.execute_module(changed=False)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vpc.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vpc.py
new file mode 100644
index 00000000..5c862732
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vpc.py
@@ -0,0 +1,235 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_vpc
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosVpcModule(TestNxosModule):
+
+ module = nxos_vpc
+
+ def setUp(self):
+ super(TestNxosVpcModule, self).setUp()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vpc.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vpc.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vpc.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ def tearDown(self):
+ super(TestNxosVpcModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+ self.mock_run_commands.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+
+ for command in commands:
+ filename = str(command).split(" | ")[0].replace(" ", "_")
+ output.append(load_fixture("nxos_vpc", filename))
+ return output
+
+ def vrf_load_from_file(*args, **kwargs):
+ """Load vpc output for vrf tests"""
+ module, commands = args
+ output = list()
+ for command in commands:
+ filename = "vrf_test_" + str(command).split(" | ")[0].replace(
+ " ", "_"
+ )
+ output.append(load_fixture("nxos_vpc", filename))
+ return output
+
+ self.load_config.return_value = None
+ if device == "_vrf_test":
+ self.run_commands.side_effect = vrf_load_from_file
+ else:
+ self.run_commands.side_effect = load_from_file
+
+ def test_nxos_vpc_present(self):
+ set_module_args(
+ dict(
+ domain=100,
+ role_priority=32667,
+ system_priority=2000,
+ pkl_dest="192.168.100.4",
+ pkl_src="10.1.100.20",
+ peer_gw=True,
+ auto_recovery=True,
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "vpc domain 100",
+ "terminal dont-ask",
+ "role priority 32667",
+ "system-priority 2000",
+ "peer-keepalive destination 192.168.100.4 source 10.1.100.20",
+ "peer-gateway",
+ "auto-recovery",
+ ],
+ )
+
+ def test_nxos_vpc_vrf_1(self):
+ # No vrf -> vrf 'default'
+ set_module_args(
+ dict(
+ domain=100,
+ pkl_dest="192.168.1.1",
+ pkl_src="10.1.1.1",
+ pkl_vrf="default",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "vpc domain 100",
+ "peer-keepalive destination 192.168.1.1 source 10.1.1.1 vrf default",
+ ],
+ )
+
+ def test_nxos_vpc_vrf_2(self):
+ # vrf 'my_vrf'-> vrf 'test-vrf'
+ # All pkl commands should be present
+ self.get_config.return_value = load_fixture(
+ "nxos_vpc", "vrf_test_vpc_config"
+ )
+ set_module_args(
+ dict(
+ domain=100,
+ pkl_dest="192.168.1.1",
+ pkl_src="10.1.1.1",
+ pkl_vrf="test-vrf",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ device="_vrf_test",
+ commands=[
+ "vpc domain 100",
+ "peer-keepalive destination 192.168.1.1 source 10.1.1.1 vrf test-vrf",
+ ],
+ )
+
+ def test_nxos_vpc_vrf_3(self):
+ # vrf 'my_vrf' -> vrf 'obviously-different-vrf'
+ # Existing pkl_src should be retained even though playbook does not specify it
+ self.get_config.return_value = load_fixture(
+ "nxos_vpc", "vrf_test_vpc_config"
+ )
+ set_module_args(
+ dict(
+ domain=100,
+ pkl_dest="192.168.1.1",
+ pkl_vrf="obviously-different-vrf",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ device="_vrf_test",
+ commands=[
+ "vpc domain 100",
+ "peer-keepalive destination 192.168.1.1 source 10.1.1.1 vrf obviously-different-vrf",
+ ],
+ )
+
+ def test_nxos_vpc_vrf_4(self):
+ # vrf 'my_vrf'-> vrf 'management'
+ # 'management' is the default value for vrf, it will not nvgen
+ self.get_config.return_value = load_fixture(
+ "nxos_vpc", "vrf_test_vpc_config"
+ )
+ set_module_args(
+ dict(domain=100, pkl_dest="192.168.1.1", pkl_vrf="management")
+ )
+ self.execute_module(
+ changed=True,
+ device="_vrf_test",
+ commands=[
+ "vpc domain 100",
+ "peer-keepalive destination 192.168.1.1 source 10.1.1.1 vrf management",
+ ],
+ )
+
+ def test_nxos_vpc_vrf_5(self):
+ # vrf 'my_vrf' -> vrf 'my_vrf' (idempotence)
+ self.get_config.return_value = load_fixture(
+ "nxos_vpc", "vrf_test_vpc_config"
+ )
+ set_module_args(
+ dict(
+ domain=100,
+ pkl_dest="192.168.1.1",
+ pkl_src="10.1.1.1",
+ pkl_vrf="my_vrf",
+ )
+ )
+ self.execute_module(changed=False, device="_vrf_test")
+
+ def test_nxos_vpc_vrf_6(self):
+ # vrf 'my_vrf' -> absent tests
+ self.get_config.return_value = load_fixture(
+ "nxos_vpc", "vrf_test_vpc_config"
+ )
+ set_module_args(dict(domain=100, state="absent"))
+ self.execute_module(
+ changed=True,
+ device="_vrf_test",
+ commands=["terminal dont-ask", "no vpc domain 100"],
+ )
+
+ def test_nxos_vpc_vrf_7(self):
+ # dest 192.168.1.1 source 10.1.1.1 vrf my_vrf -> (dest only) (idempotence)
+ # pkl_src/pkl_vrf not in playbook but exists on device.
+ self.get_config.return_value = load_fixture(
+ "nxos_vpc", "vrf_test_vpc_config"
+ )
+ set_module_args(dict(domain=100, pkl_dest="192.168.1.1"))
+ self.execute_module(changed=False, device="_vrf_test")
+
+ def test_nxos_vpc_vrf_8(self):
+ # dest 192.168.1.1 source 10.1.1.1 vrf my_vrf -> (optional vrf) (idempotence)
+ # pkl_src not in playbook but exists on device.
+ self.get_config.return_value = load_fixture(
+ "nxos_vpc", "vrf_test_vpc_config"
+ )
+ set_module_args(
+ dict(domain=100, pkl_dest="192.168.1.1", pkl_vrf="my_vrf")
+ )
+ self.execute_module(changed=False, device="_vrf_test")
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vpc_interface.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vpc_interface.py
new file mode 100644
index 00000000..82d84524
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vpc_interface.py
@@ -0,0 +1,81 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_vpc_interface
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosVpcModule(TestNxosModule):
+
+ module = nxos_vpc_interface
+
+ def setUp(self):
+ super(TestNxosVpcModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vpc_interface.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vpc_interface.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vpc_interface.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ def tearDown(self):
+ super(TestNxosVpcModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+ self.mock_run_commands.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+ for command in commands:
+ filename = str(command).split(" | ")[0].replace(" ", "_")
+ output.append(load_fixture("nxos_vpc_interface", filename))
+ return output
+
+ self.run_commands.side_effect = load_from_file
+ self.load_config.return_value = None
+
+ def test_nxos_vpc_interface_absent(self):
+ set_module_args(dict(portchannel=10, vpc=100, state="absent"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"], ["interface port-channel10", "no vpc"]
+ )
+
+ def test_nxos_vpc_interface_present(self):
+ set_module_args(dict(portchannel=20, vpc=200, state="present"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"], ["interface port-channel20", "vpc 200"]
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vrf.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vrf.py
new file mode 100644
index 00000000..58631038
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vrf.py
@@ -0,0 +1,91 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_vrf
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosVrfModule(TestNxosModule):
+
+ module = nxos_vrf
+
+ def setUp(self):
+ super(TestNxosVrfModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vrf.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_run_commands = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vrf.run_commands"
+ )
+ self.run_commands = self.mock_run_commands.start()
+
+ def tearDown(self):
+ super(TestNxosVrfModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_run_commands.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ def load_from_file(*args, **kwargs):
+ module, commands = args
+ output = list()
+
+ for command in commands:
+ if isinstance(command, dict):
+ command = command["command"]
+ filename = str(command).split(" | ")[0].replace(" ", "_")
+ output.append(load_fixture("nxos_vrf", filename))
+ return output
+
+ self.load_config.return_value = None
+ self.run_commands.side_effect = load_from_file
+
+ def test_nxos_vrf_present(self):
+ set_module_args(dict(vrf="ntc", state="present", admin_state="up"))
+ self.execute_module(
+ changed=True, commands=["vrf context ntc", "no shutdown", "exit"]
+ )
+
+ def test_nxos_vrf_present_no_change(self):
+ set_module_args(
+ dict(vrf="management", state="present", admin_state="up")
+ )
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_vrf_absent(self):
+ set_module_args(dict(vrf="management", state="absent"))
+ self.execute_module(
+ changed=True, commands=["no vrf context management"]
+ )
+
+ def test_nxos_vrf_absent_no_change(self):
+ set_module_args(dict(vrf="ntc", state="absent"))
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_vrf_default(self):
+ set_module_args(dict(vrf="default"))
+ result = self.execute_module(failed=True)
+ self.assertEqual(result["msg"], "cannot use default as name of a VRF")
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vrf_af.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vrf_af.py
new file mode 100644
index 00000000..c68c6f40
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vrf_af.py
@@ -0,0 +1,1090 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_vrf_af
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosVrfafModule(TestNxosModule):
+
+ module = nxos_vrf_af
+
+ def setUp(self):
+ super(TestNxosVrfafModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vrf_af.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vrf_af.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosVrfafModule, self).tearDown()
+ self.mock_load_config.stop()
+ self.mock_get_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture(
+ "nxos_vrf_af", "config.cfg"
+ )
+ self.load_config.return_value = None
+
+ def test_nxos_vrf_af_present_current_non_existing(self):
+ set_module_args(dict(vrf="vrf0", afi="ipv4", state="present"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["vrf context vrf0", "address-family ipv4 unicast"],
+ )
+
+ def test_nxos_vrf_af_present_current_existing(self):
+ set_module_args(dict(vrf="vrf1", afi="ipv4", state="present"))
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_absent_current_non_existing(self):
+ set_module_args(dict(vrf="vrf0", afi="ipv4", state="absent"))
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_absent_current_existing(self):
+ set_module_args(dict(vrf="vrf1", afi="ipv4", state="absent"))
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["vrf context vrf1", "no address-family ipv4 unicast"],
+ )
+
+ def test_nxos_vrf_af_auto_evpn_route_target_present_current_existing(self):
+ set_module_args(
+ dict(vrf="vrf11", afi="ipv4", route_target_both_auto_evpn=True)
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_auto_evpn_route_target_present_current_non_existing(
+ self
+ ):
+ set_module_args(
+ dict(vrf="vrf10", afi="ipv4", route_target_both_auto_evpn=True)
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf10",
+ "address-family ipv4 unicast",
+ "route-target both auto evpn",
+ ],
+ )
+
+ def test_nxos_vrf_af_auto_evpn_route_target_absent_current_existing(self):
+ set_module_args(
+ dict(vrf="vrf11", afi="ipv4", route_target_both_auto_evpn=False)
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf11",
+ "address-family ipv4 unicast",
+ "no route-target both auto evpn",
+ ],
+ )
+
+ def test_nxos_vrf_af_auto_evpn_route_target_absent_current_non_existing(
+ self
+ ):
+ set_module_args(
+ dict(vrf="vrf1", afi="ipv4", route_target_both_auto_evpn=False)
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_import_present_current_non_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "import",
+ "state": "present",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf1",
+ "address-family ipv4 unicast",
+ "route-target import 65000:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_default_direction_present_current_non_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[{"rt": "65000:1000", "state": "present"}],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf1",
+ "address-family ipv4 unicast",
+ "route-target import 65000:1000",
+ "route-target export 65000:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_import_present_current_existing(self):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "import",
+ "state": "present",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_default_direction_present_current_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[{"rt": "65000:1000", "state": "present"}],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_multi_import_present_current_non_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "import",
+ "state": "present",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "import",
+ "state": "present",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "import",
+ "state": "present",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf1",
+ "address-family ipv4 unicast",
+ "route-target import 65000:1000",
+ "route-target import 65001:1000",
+ "route-target import 65002:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_multi_import_present_current_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "import",
+ "state": "present",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "import",
+ "state": "present",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "import",
+ "state": "present",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_import_absent_current_non_existing(self):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "import",
+ "state": "absent",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_import_absent_current_existing(self):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "import",
+ "state": "absent",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf21",
+ "address-family ipv4 unicast",
+ "no route-target import 65000:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_multi_import_absent_current_non_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "import",
+ "state": "absent",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "import",
+ "state": "absent",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "import",
+ "state": "absent",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_multi_import_absent_current_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "import",
+ "state": "absent",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "import",
+ "state": "absent",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "import",
+ "state": "absent",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf21",
+ "address-family ipv4 unicast",
+ "no route-target import 65000:1000",
+ "no route-target import 65001:1000",
+ "no route-target import 65002:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_multi_import_absent_current_mix(self):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "import",
+ "state": "present",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "import",
+ "state": "present",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "import",
+ "state": "absent",
+ },
+ {
+ "rt": "65003:1000",
+ "direction": "import",
+ "state": "present",
+ },
+ {
+ "rt": "65004:1000",
+ "direction": "import",
+ "state": "absent",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf21",
+ "address-family ipv4 unicast",
+ "no route-target import 65002:1000",
+ "route-target import 65003:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_export_present_current_non_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "export",
+ "state": "present",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf1",
+ "address-family ipv4 unicast",
+ "route-target export 65000:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_export_present_current_existing(self):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "export",
+ "state": "present",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_multi_export_present_current_non_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "export",
+ "state": "present",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "export",
+ "state": "present",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "export",
+ "state": "present",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf1",
+ "address-family ipv4 unicast",
+ "route-target export 65000:1000",
+ "route-target export 65001:1000",
+ "route-target export 65002:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_multi_export_present_current_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "export",
+ "state": "present",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "export",
+ "state": "present",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "export",
+ "state": "present",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_export_absent_current_non_existing(self):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "export",
+ "state": "absent",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_export_absent_current_existing(self):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "export",
+ "state": "absent",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf21",
+ "address-family ipv4 unicast",
+ "no route-target export 65000:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_multi_export_absent_current_non_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "export",
+ "state": "absent",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "export",
+ "state": "absent",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "export",
+ "state": "absent",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_multi_export_absent_current_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "export",
+ "state": "absent",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "export",
+ "state": "absent",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "export",
+ "state": "absent",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf21",
+ "address-family ipv4 unicast",
+ "no route-target export 65000:1000",
+ "no route-target export 65001:1000",
+ "no route-target export 65002:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_multi_export_absent_current_mix(self):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "export",
+ "state": "present",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "export",
+ "state": "present",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "export",
+ "state": "absent",
+ },
+ {
+ "rt": "65003:1000",
+ "direction": "export",
+ "state": "present",
+ },
+ {
+ "rt": "65004:1000",
+ "direction": "export",
+ "state": "absent",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf21",
+ "address-family ipv4 unicast",
+ "no route-target export 65002:1000",
+ "route-target export 65003:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_both_present_current_non_existing(self):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "present",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf1",
+ "address-family ipv4 unicast",
+ "route-target import 65000:1000",
+ "route-target export 65000:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_both_present_current_existing(self):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "present",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_multi_both_present_current_non_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "present",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "both",
+ "state": "present",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "both",
+ "state": "present",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf1",
+ "address-family ipv4 unicast",
+ "route-target import 65000:1000",
+ "route-target export 65000:1000",
+ "route-target import 65001:1000",
+ "route-target export 65001:1000",
+ "route-target import 65002:1000",
+ "route-target export 65002:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_multi_both_present_current_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "present",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "both",
+ "state": "present",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "both",
+ "state": "present",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_both_absent_current_non_existing(self):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "absent",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_both_absent_current_existing(self):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "absent",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf21",
+ "address-family ipv4 unicast",
+ "no route-target import 65000:1000",
+ "no route-target export 65000:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_multi_both_absent_current_non_existing(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "absent",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "both",
+ "state": "absent",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "both",
+ "state": "absent",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=False)
+ self.assertEqual(result["commands"], [])
+
+ def test_nxos_vrf_af_route_target_multi_both_absent_current_existing(self):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "absent",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "both",
+ "state": "absent",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "both",
+ "state": "absent",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf21",
+ "address-family ipv4 unicast",
+ "no route-target import 65000:1000",
+ "no route-target export 65000:1000",
+ "no route-target import 65001:1000",
+ "no route-target export 65001:1000",
+ "no route-target import 65002:1000",
+ "no route-target export 65002:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_multi_both_absent_current_mix(self):
+ set_module_args(
+ dict(
+ vrf="vrf21",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "present",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "both",
+ "state": "present",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "both",
+ "state": "absent",
+ },
+ {
+ "rt": "65003:1000",
+ "direction": "both",
+ "state": "present",
+ },
+ {
+ "rt": "65004:1000",
+ "direction": "both",
+ "state": "absent",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf21",
+ "address-family ipv4 unicast",
+ "no route-target import 65002:1000",
+ "no route-target export 65002:1000",
+ "route-target import 65003:1000",
+ "route-target export 65003:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_multi_both_current_only_import_or_export(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf31",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "present",
+ },
+ {
+ "rt": "65001:1000",
+ "direction": "both",
+ "state": "present",
+ },
+ {
+ "rt": "65002:1000",
+ "direction": "both",
+ "state": "absent",
+ },
+ {
+ "rt": "65003:1000",
+ "direction": "both",
+ "state": "absent",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf31",
+ "address-family ipv4 unicast",
+ "route-target export 65000:1000",
+ "route-target import 65001:1000",
+ "no route-target import 65002:1000",
+ "no route-target export 65003:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_route_target_multi_direction_current_only_import_or_export(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf31",
+ afi="ipv4",
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "present",
+ },
+ {"rt": "65001:1000", "state": "present"},
+ {
+ "rt": "65002:1000",
+ "direction": "export",
+ "state": "absent",
+ },
+ {
+ "rt": "65003:1000",
+ "direction": "export",
+ "state": "absent",
+ },
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf31",
+ "address-family ipv4 unicast",
+ "route-target export 65000:1000",
+ "route-target import 65001:1000",
+ "no route-target export 65003:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_auto_evpn_route_target_and_manual_route_target(self):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ route_target_both_auto_evpn=True,
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "present",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ [
+ "vrf context vrf1",
+ "address-family ipv4 unicast",
+ "route-target both auto evpn",
+ "route-target import 65000:1000",
+ "route-target export 65000:1000",
+ ],
+ )
+
+ def test_nxos_vrf_af_auto_evpn_route_target_and_manual_route_targets_with_absent_vrf(
+ self
+ ):
+ set_module_args(
+ dict(
+ vrf="vrf1",
+ afi="ipv4",
+ state="absent",
+ route_target_both_auto_evpn=True,
+ route_targets=[
+ {
+ "rt": "65000:1000",
+ "direction": "both",
+ "state": "present",
+ }
+ ],
+ )
+ )
+ result = self.execute_module(changed=True)
+ self.assertEqual(
+ result["commands"],
+ ["vrf context vrf1", "no address-family ipv4 unicast"],
+ )
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vxlan_vtep.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vxlan_vtep.py
new file mode 100644
index 00000000..e0011c15
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vxlan_vtep.py
@@ -0,0 +1,105 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_vxlan_vtep
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosVxlanVtepVniModule(TestNxosModule):
+
+ module = nxos_vxlan_vtep
+
+ def setUp(self):
+ super(TestNxosVxlanVtepVniModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vxlan_vtep.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vxlan_vtep.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosVxlanVtepVniModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture(
+ "nxos_vxlan_vtep", "config.cfg"
+ )
+ self.load_config.return_value = None
+
+ def test_nxos_vxlan_vtep(self):
+ set_module_args(
+ dict(interface="nve1", description="simple description")
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface nve1",
+ "terminal dont-ask",
+ "description simple description",
+ ],
+ )
+
+ def test_nxos_vxlan_vtep_present_no_change(self):
+ set_module_args(dict(interface="nve1"))
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_vxlan_vtep_absent(self):
+ set_module_args(dict(interface="nve1", state="absent"))
+ self.execute_module(changed=True, commands=["no interface nve1"])
+
+ def test_nxos_vxlan_vtep_absent_no_change(self):
+ set_module_args(dict(interface="nve2", state="absent"))
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_vxlan_vtep_multisite(self):
+ set_module_args(
+ dict(
+ interface="nve1",
+ multisite_border_gateway_interface="Loopback10",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface nve1",
+ "terminal dont-ask",
+ "multisite border-gateway interface loopback10",
+ ],
+ )
+
+ def test_nxos_vxlan_vtep_multisite_exists(self):
+ set_module_args(
+ dict(
+ interface="nve1",
+ multisite_border_gateway_interface="Loopback1",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vxlan_vtep_vni.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vxlan_vtep_vni.py
new file mode 100644
index 00000000..638c2a76
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/network/nxos/test_nxos_vxlan_vtep_vni.py
@@ -0,0 +1,119 @@
+# (c) 2016 Red Hat Inc.
+#
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+
+# Make coding more python3-ish
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible_collections.cisco.nxos.plugins.modules import nxos_vxlan_vtep_vni
+from .nxos_module import TestNxosModule, load_fixture, set_module_args
+
+
+class TestNxosVxlanVtepVniModule(TestNxosModule):
+
+ module = nxos_vxlan_vtep_vni
+
+ def setUp(self):
+ super(TestNxosVxlanVtepVniModule, self).setUp()
+
+ self.mock_load_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vxlan_vtep_vni.load_config"
+ )
+ self.load_config = self.mock_load_config.start()
+
+ self.mock_get_config = patch(
+ "ansible_collections.cisco.nxos.plugins.modules.nxos_vxlan_vtep_vni.get_config"
+ )
+ self.get_config = self.mock_get_config.start()
+
+ def tearDown(self):
+ super(TestNxosVxlanVtepVniModule, self).tearDown()
+ self.mock_get_config.stop()
+ self.mock_load_config.stop()
+
+ def load_fixtures(self, commands=None, device=""):
+ self.get_config.return_value = load_fixture(
+ "nxos_vxlan_vtep_vni", "config.cfg"
+ )
+ self.load_config.return_value = None
+
+ def test_nxos_vxlan_vtep_vni_present_no_change(self):
+ set_module_args(dict(interface="nve1", vni=6000))
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_vxlan_vtep_vni(self):
+ set_module_args(dict(interface="nve1", vni=5000))
+ self.execute_module(
+ changed=True, commands=["interface nve1", "member vni 5000"]
+ )
+
+ def test_nxos_vxlan_vtep_vni_absent(self):
+ set_module_args(dict(interface="nve1", vni=6000, state="absent"))
+ self.execute_module(
+ changed=True, commands=["interface nve1", "no member vni 6000"]
+ )
+
+ def test_nxos_vxlan_vtep_vni_absent_no_change(self):
+ set_module_args(dict(interface="nve2", vni=6000, state="absent"))
+ self.execute_module(changed=False, commands=[])
+
+ def test_nxos_vxlan_vtep_vni_multi_ingress_repl(self):
+ set_module_args(
+ dict(
+ interface="nve1",
+ vni=5000,
+ multisite_ingress_replication="enable",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface nve1",
+ "member vni 5000",
+ "multisite ingress-replication",
+ ],
+ )
+
+ def test_nxos_vxlan_vtep_vni_multi_ingress_repl_opt(self):
+ set_module_args(
+ dict(
+ interface="nve1",
+ vni=5000,
+ multisite_ingress_replication="optimized",
+ )
+ )
+ self.execute_module(
+ changed=True,
+ commands=[
+ "interface nve1",
+ "member vni 5000",
+ "multisite ingress-replication optimized",
+ ],
+ )
+
+ def test_nxos_vxlan_vtep_vni_multi_ingress_repl_opt_exists(self):
+ set_module_args(
+ dict(
+ interface="nve1",
+ vni=6000,
+ multisite_ingress_replication="optimized",
+ )
+ )
+ self.execute_module(changed=False, commands=[])
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/utils.py b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/utils.py
new file mode 100644
index 00000000..dbfae764
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/modules/utils.py
@@ -0,0 +1,51 @@
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+import json
+
+from ansible_collections.cisco.nxos.tests.unit.compat import unittest
+from ansible_collections.cisco.nxos.tests.unit.compat.mock import patch
+from ansible.module_utils import basic
+from ansible.module_utils._text import to_bytes
+
+
+def set_module_args(args):
+ if "_ansible_remote_tmp" not in args:
+ args["_ansible_remote_tmp"] = "/tmp"
+ if "_ansible_keep_remote_files" not in args:
+ args["_ansible_keep_remote_files"] = False
+
+ args = json.dumps({"ANSIBLE_MODULE_ARGS": args})
+ basic._ANSIBLE_ARGS = to_bytes(args)
+
+
+class AnsibleExitJson(Exception):
+ pass
+
+
+class AnsibleFailJson(Exception):
+ pass
+
+
+def exit_json(*args, **kwargs):
+ if "changed" not in kwargs:
+ kwargs["changed"] = False
+ raise AnsibleExitJson(kwargs)
+
+
+def fail_json(*args, **kwargs):
+ kwargs["failed"] = True
+ raise AnsibleFailJson(kwargs)
+
+
+class ModuleTestCase(unittest.TestCase):
+ def setUp(self):
+ self.mock_module = patch.multiple(
+ basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json
+ )
+ self.mock_module.start()
+ self.mock_sleep = patch("time.sleep")
+ self.mock_sleep.start()
+ set_module_args({})
+ self.addCleanup(self.mock_module.stop)
+ self.addCleanup(self.mock_sleep.stop)
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/requirements.txt b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/requirements.txt
new file mode 100644
index 00000000..a9772bea
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tests/unit/requirements.txt
@@ -0,0 +1,42 @@
+boto3
+placebo
+pycrypto
+passlib
+pypsrp
+python-memcached
+pytz
+pyvmomi
+redis
+requests
+setuptools > 0.6 # pytest-xdist installed via requirements does not work with very old setuptools (sanity_ok)
+unittest2 ; python_version < '2.7'
+importlib ; python_version < '2.7'
+netaddr
+ipaddress
+netapp-lib
+solidfire-sdk-python
+
+# requirements for F5 specific modules
+f5-sdk ; python_version >= '2.7'
+f5-icontrol-rest ; python_version >= '2.7'
+deepdiff
+
+# requirement for Fortinet specific modules
+pyFMG
+
+# requirement for aci_rest module
+xmljson
+
+# requirement for winrm connection plugin tests
+pexpect
+
+# requirement for the linode module
+linode-python # APIv3
+linode_api4 ; python_version > '2.6' # APIv4
+
+# requirement for the gitlab module
+python-gitlab
+httmock
+
+# requirment for kubevirt modules
+openshift ; python_version >= '2.7'
diff --git a/collections-debian-merged/ansible_collections/cisco/nxos/tox.ini b/collections-debian-merged/ansible_collections/cisco/nxos/tox.ini
new file mode 100644
index 00000000..a46d4a0c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/nxos/tox.ini
@@ -0,0 +1,31 @@
+[tox]
+minversion = 1.4.2
+envlist = linters
+skipsdist = True
+
+[testenv]
+deps = -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+
+[testenv:black]
+install_command = pip install {opts} {packages}
+commands =
+ black -v -l79 {toxinidir}
+
+[testenv:linters]
+install_command = pip install {opts} {packages}
+commands =
+ black -v -l79 --diff --check {toxinidir}
+ flake8 {posargs}
+
+[testenv:venv]
+commands = {posargs}
+
+[flake8]
+# E123, E125 skipped as they are invalid PEP-8.
+
+show-source = True
+ignore = E123,E125,E203,E402,E501,E741,F401,F811,F841,W503
+max-line-length = 160
+builtins = _
+exclude = .git,.tox,tests/unit/compat/
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/.gitignore b/collections-debian-merged/ansible_collections/cisco/ucs/.gitignore
new file mode 100644
index 00000000..3f711c89
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/.gitignore
@@ -0,0 +1,135 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Editor
+.vscode/
+collections/
+ansible.cfg
+args/
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+pip-wheel-metadata/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+.python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/Development.md b/collections-debian-merged/ansible_collections/cisco/ucs/Development.md
new file mode 100644
index 00000000..d4596d0f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/Development.md
@@ -0,0 +1,61 @@
+# cisco.ucs Collection Development Notes
+
+### Current Development Status
+
+These object specific modules cover a very small set of UCS Manager managed objects. For UCS objects that do not
+have a specific module below use `ucs_managed_objects`. This module accepts either JSON or YAML
+when used as a task in a playbook. Review `playbooks/ucs_managed_objects` playbook for examples.
+
+| Configuration Category | Configuration Task | Module Name |
+| ---------------------- | ------------------ | ----------- |
+| Objects | | |
+| | Any UCS Object | cisco.ucs.ucs_managed_objects |
+| Query | | |
+| | Query Classes or DNs | cisco.ucs.ucs_query |
+| | VLAN Find | cisco.ucs.ucs_vlan_find
+| Organizations | | |
+| | Organizations | cisco.ucs.ucs_org |
+| Servers | | |
+| | Graphics Card Policy | cisco.ucs.ucs_graphics_card_policy |
+| | Scrub Policy | cisco.ucs.ucs_scrub_policy |
+| | Serial Over Lan Policy | cisco.ucs.ucs_serial_over_lan_policy |
+| | Service Profile Template | cisco.ucs.ucs_service_profile_template |
+| | Service Profile from Template | cisco.ucs.ucs_service_profile_from_template |
+| | UUID Suffix Pool | cisco.ucs.ucs_uuid_pool |
+| LAN | | |
+| | IP Addresses for KVM Access | cisco.ucs.ucs_ip_pool |
+| | LAN Connectivity Policy | cisco.ucs.ucs_lan_connectivity |
+| | MAC Address Pools | cisco.ucs.ucs_mac_pool |
+| | System QOS | cisco.ucs.ucs_system_qos |
+| | vNIC Template | cisco.ucs.ucs_vnic_template |
+| | VLANs | cisco.ucs.ucs_vlans |
+| SAN | | |
+| | SAN Connectivity Policy | cisco.ucs.ucs_san_connectivity |
+| | vHBA Template | cisco.ucs.ucs_vhba_template |
+| | VSANs | cisco.ucs.ucs_vsans |
+| | WWN Pool | cisco.ucs.ucs_wwn_pool |
+| Storage | | |
+| | Disk Group Policy | cisco.ucs.ucs_disk_group_policy |
+| | Storage Profile | cisco.ucs.ucs_storage_profile |
+| Admin | | |
+| | DNS Server | cisco.ucs.ucs_dns_server |
+| | NTP Server | cisco.ucs.ucs_ntp_server |
+| | Time Zone | cisco.ucs.ucs_timezone |
+
+### Ansible Development Notes
+
+Modules in development follow processes documented at http://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html. The modules support ansible-doc and should eventually have integration tests.
+
+When developing modules in this repository, here are a few helpful commands to sanity check the code and documentation (replace module_name with your module (e.g., intersight_objects)). Ansible modules won't generally be pylint or pycodestyle (PEP8) clean without disabling several of the checks:
+ ```
+ pylint --disable=invalid-name,no-member,too-many-nested-blocks,redefined-variable-type,too-many-statements,too-many-branches,broad-except,line-too-long,missing-docstring,wrong-import-position,too-many-locals,import-error <module_name>.py
+
+ pycodestyle --max-line-length 160 --config /dev/null --ignore E402 <module_name>.py
+
+ ansible-doc <module_name>
+ ```
+
+# Community:
+
+* We are on Slack (https://ciscoucs.slack.com/) - Slack requires registration, but the ucspython team is open invitation to
+ anyone. Click [here](https://ucspython.herokuapp.com) to register
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/FILES.json b/collections-debian-merged/ansible_collections/cisco/ucs/FILES.json
new file mode 100644
index 00000000..6110875f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/FILES.json
@@ -0,0 +1,705 @@
+{
+ "files": [
+ {
+ "name": ".",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "misc",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "misc/README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e61dd07deb821f7d7de15f2667c7b8c0a636efab8ad63484badfeb37ad6d7796",
+ "format": 1
+ },
+ {
+ "name": "misc/Impact DNW07 UCS Ansible Collection Lab Guide.pdf",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8cce3d380ece9706c078a39e2ab729a555d585e546c12acd4d247d78ff3dfb7f",
+ "format": 1
+ },
+ {
+ "name": "releases",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "releases/cisco-ucs-1.1.0.tar.gz",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "72556df938ebe13382cbf52b5b8eff723ad4cf0f66cb960a202e9f4f03f4830e",
+ "format": 1
+ },
+ {
+ "name": "releases/README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f2a1583a116aa9353b014e2e90c4eac624e1b53ec9a25f7647e3417f411f3a85",
+ "format": 1
+ },
+ {
+ "name": "releases/cisco-ucs-1.4.0.tar.gz",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a33686582e60f43418883c0f7ac764893fe68fe0b0576734ff52cff4d6bac9bf",
+ "format": 1
+ },
+ {
+ "name": "releases/cisco-ucs-1.5.0.tar.gz",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "52053502b0af08e0964c9dff9df3aedc79183726490b4435f057da1fc5f33c68",
+ "format": 1
+ },
+ {
+ "name": "releases/cisco-ucs-1.3.0.tar.gz",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "197707f5d795471909b9ae0f6f8137b1ab98a99672cc75c6bf8a96d315857194",
+ "format": 1
+ },
+ {
+ "name": "releases/cisco-ucs-1.2.0.tar.gz",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e11c97947dddd411f392ba4925617553ab058e9d9f09d2cb4464848320faea18",
+ "format": 1
+ },
+ {
+ "name": "requirements.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "aa3e8ff6c09414944bff4bf66cd0d1b885333c1ea305c1aa7b4dde48a1abee1e",
+ "format": 1
+ },
+ {
+ "name": "plugins",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/doc_fragments/ucs.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9a91b29311e81b8c9db22d6fa74e6aebea262e57ec4b3e8912103e5efbe90328",
+ "format": 1
+ },
+ {
+ "name": "plugins/README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c82ee692702ec1dd604cdbc38ff252114e5204e1b0627045a66c9451e7a918ac",
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/module_utils/ucs.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1c2bb177e2a14aada0ef9921533ed78813e7969b77b5e5aa25f383e21e94f5e1",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_vsans.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8919b0519d1083b08e27d8df96f3823612359c9bb059547794b38272962ba242",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_lan_connectivity.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fbdbaf175df169e342ce705a9bb681341a65e7bff4bb56b9c4d33d5203f1252c",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_system_qos.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "80b949ac3deb50592098a49ce517b962a3972c85f9732961431e5c667440d366",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_managed_objects.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b60efa21bcd6162f8f2b30e21e8456e1babfa40d9d22e90c4a5737c7be5d71d0",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_san_connectivity.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1a33a74d1ab46735686d97ab5abfdac74965f9dcf3f442a7a222e1519a6a2b64",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_serial_over_lan_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2fc8fca5ddd9a070486e6507a26e6fb3286de264cc1ffcf9548637109da23e77",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_wwn_pool.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "64fd4588ad5f970d9ebb7326d0cbde40c38a7dc243252e0fd55a8118e162f670",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_vhba_template.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "2f49fb8de46c89971bf97d201a790f63c3e90e962f05260b65b4e05d76013f33",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_vlans.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "44833390c6dca5c4d84ea741b011ebdd8048a8d3ae08f56b092f94f407a2819d",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_sp_vnic_order.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3b1f5b666900e81ed47c0fc49c864d9ca3e325ae83e123110f1f95a34b0d110e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_disk_group_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b2079621e3ec6b509006acd22ac9a422191926cfd34315ca8c0af843cdb96870",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_ntp_server.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c87d20311dc4520fef184a523657bddecc1659912bcba747da49551c77c64dba",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_scrub_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "efc721b747f2955a998ea67c595286a94ef983b71cced9eb10ca16378a488099",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_uuid_pool.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "937ed44aca4af4f9cc3795850d0b6faa283d0f511461e7a9842b1b08d1723e0e",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_dns_server.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "737d20161c466848d0d4fef11cf989a70c37a8b1255c76ed77f74cdc56748458",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_vlan_find.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "efcc0bd315ecfc7404b4f50bfa8416d7e8bc2329278b5e5343dc63c71c5af760",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_graphics_card_policy.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a635e301c5a42ab7d3b93d107638bdfa13256926f7507a4386ba5afee2a569e3",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_org.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8b50c9af02932abe59b7dc3044a8146ea2393de435932ba83450ca4174608b58",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_vnic_template.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "da4b4e7c608e690d4b53f6e1972c3b3bbd3782245b303a847dee6db8ce8ecd71",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_storage_profile.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "60ed97f411860171f579fe1b1d31716db66cce08a69e9e9752fb3484bd97990f",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_service_profile_association.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cb306f31e4e0f23519d6af4de72a1eda5382c6d5bc79b697c4c140978a7635dc",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_vlan_to_group.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e34928b3c067dae6da852ec16183db1f4464f4ec4c6ebf06e6e2f5c7607777ef",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_timezone.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ac8518370ee6f0f6d768f9464e13011269d55d4032a9b767228b0d27a7f0fb03",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_ip_pool.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9990d779de27b83f6449e06d933d7d9a2d0344ad0b871ee83f01cdc71f7cb1cb",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_service_profile_from_template.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b097f619a6193da85ab48247027f4924f69fd673927a5b78c5dbd86ba01ffc83",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_query.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "c41609719a3501d378dee7c3d64ac436c5b7b58459ec4151820b9b6e9f0c640b",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_server_maintenance.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7909713ae7541e07c14a47fdeef30741b35424a49be8688a582aee60d80e2c07",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_service_profile_template.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "945abd9f0855f640afccdba195a9b0e8ad15f75adf7e8c8ebfda15adbb87d4c0",
+ "format": 1
+ },
+ {
+ "name": "plugins/modules/ucs_mac_pool.py",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "13a00a3f340c16e71a3f907f499db455b9c10e12034db6dc8536203898f99afd",
+ "format": 1
+ },
+ {
+ "name": "roles",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_storage_profile.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3777b58c91917d04a3ec4dc9d279489dd865c2fcb269aa43ceb23bea968937c8",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_wwn_pool.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "191db96eb7a6adb4a2bc82c95aaff7cd20fdba0a532d1dd1e2e50dc97f65feb2",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_serial_over_lan_policy.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "6dcfa1cbcb46ca123dd97ef08c5c434753da47c7ed685991b77ea6464f743370",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_vhba_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "00cda823af22cc1603f448616cac0c76fbb6ca2bde70a2ffbb4b69a346c4d43b",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_lan_connectivity.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "859208b19078ba8862402da21e574e7878b03a0ad941110962e153472a19ca25",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_mac_pool.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1b08ecac7d4b2391bc679199a2048ef21e4c530bde0657540c30c18c69f2b6cf",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_vsans.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "79074b78bc316bae4834d7bf6e24e6483cb7d5cb1008f4989ef2cbcb37b30280",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_system_qos.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "d4d6c5b5c72bcd66ad8dcba66c8453b395fb3bfa9fe0fc72a6bc3b0251c46dfa",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_ntp_server.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "77299c4830b65606abc39d720469981362df6dd498e88baee7cc989616982317",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_service_profile_from_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9e7cf62de403f1ca24e6048ecab5a4de7f9fbcc366a65e457e85b6f530b23937",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_vlan_find.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4314b028607d257cd71018545d70198f0514ed237f6338b9c66ee8363691629b",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_vlan_to_group.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "96d7f24656cbd38da33aef2570ae605a64340152396bfa63cd09d43faf3b3c59",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_uuid_pool.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7241264e900011016678b997bbf831f1d6bc779108e67634f3b51e2e368d2556",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_service_profile_association.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "14dac7f4aaacfafe69fda6574416fa6fd37ca2d84df4880b8b9f2cca85513c82",
+ "format": 1
+ },
+ {
+ "name": "playbooks/example_playbook.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "7510073bfa856bd46084f6f64817f4a4dc918eb41b06305cf6441697be4700ae",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers/service_profile_templates",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers/service_profile_templates/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers/service_profile_templates/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "76a596b849386fd161f9a0404954c6a84ce372e13ffbbc9cd8184a8f4c844599",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers/service_profiles",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers/service_profiles/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers/service_profiles/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "b03e8aa16fddd905499d0bb4fcbe84f95dfadf9cce767d321f33205b64419645",
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers/defaults",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers/defaults/tasks",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "playbooks/roles/servers/defaults/tasks/main.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bbe7b86819348adaf8076cc9633535a80b858b957860d97cddc71acf0018e7c3",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_managed_objects.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3c6b7a20e2c330a5cade1a53f67534296714456abd99f1371aac62fad178219e",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_vnic_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "cbc6add894923e8a6246a94f1f2381de211b1483f733c5a7c881f52ad859197e",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_scrub_policy.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "3e03124d0180685b351cc39dbcb4d2c7070204ce812753150ccfd49c7bf5ed8e",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_san_connectivity.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "bea00638d91b6ed884bad08f631643894a6336dd85c9ea594d089c52017fd60c",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_server_maintenance.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f66d3bafb2811978d47b31d9148ace000c70045809e6ba70c1882cc587677f42",
+ "format": 1
+ },
+ {
+ "name": "playbooks/fw_download_config_hfp.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "17cd79e71470587a70d01b6f3d80afc8d3e4fe51daa4dd1f72b2bc2f9e8ee6c2",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_vlans.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "0525339a713095f1cd72688203c1bf7e09af518ff34449f9dfa6c150d0754155",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_timezone.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "e9ae6a7429ee3030b96caee58a8e417a23b919023d892ad00143dc5206d0ff87",
+ "format": 1
+ },
+ {
+ "name": "playbooks/inventory",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fb8cee99e65566c3554036f8954a343bbeb1028c0400fb39f13d446745eb15f3",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_service_profile_template.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "a6fea5f68845578d69aaf34883be9d6f5bd846f0f22815bdbbd9b39e91c40d48",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_query.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f67b361a468838e509c252e739b37c85978821ce4dafef6fb5a0645321bf769e",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_ip_pool.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "705bff291c1ef759c19110c2c941269470a0e40b1e8ea0831a15dcc7611c37b3",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_graphics_card_policy.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "65ef05804963545ee353e13395751b63177949b6713003f4124502a40109e9a4",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_sp_vnic_order.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "4732febd59e04f510c13372427c2351dc7d681cc4ea9281d17efa1311d6f47c3",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_org.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "8d66cd58db0b4ad70f2ff4ba8e0dd33061b2d78ad7830a680d917e309cefc892",
+ "format": 1
+ },
+ {
+ "name": "playbooks/sandbox_inventory",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "f39d48e2ce1d77a8a2c7c48580e474470793757faa3f6b49adc5382277ba1182",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_dns_server.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1d6622fbe1de63bc74e280c556ea2c1047b8dcb76f3fc2c3e808647f142c4c2d",
+ "format": 1
+ },
+ {
+ "name": "playbooks/ucs_disk_group_policy.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "ae1f622dfcb5d1c1a31244432ea35b1b1fbba0da585ad19d2ba7321a52168c75",
+ "format": 1
+ },
+ {
+ "name": "playbooks/server_deploy.yml",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "087cece69b2bd12dcbe7d4b98b5783a94bd440c24ba88e9dcfe01fdd8b4790d5",
+ "format": 1
+ },
+ {
+ "name": "docs",
+ "ftype": "dir",
+ "chksum_type": null,
+ "chksum_sha256": null,
+ "format": 1
+ },
+ {
+ "name": "README.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "eebb8fd73b6f1040b24bb9176c6c28484dab8833149bff13abb25455419eb01f",
+ "format": 1
+ },
+ {
+ "name": ".gitignore",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "fbbde23b486e876ee1aab3a0053c76df8b996c6e0f15502013fff9c8ecdb4fcc",
+ "format": 1
+ },
+ {
+ "name": "LICENSE.txt",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "1babfc8408a4d1d6f39b9c01c763e313b3e0f764bf90a11fc9151a2ae556b12d",
+ "format": 1
+ },
+ {
+ "name": "Development.md",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "9877e1ab8e3670990bf466609609750a6f38c54f8e5ddb9761fe5f7966bfd93d",
+ "format": 1
+ }
+ ],
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/LICENSE.txt b/collections-debian-merged/ansible_collections/cisco/ucs/LICENSE.txt
new file mode 100644
index 00000000..02f66092
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/LICENSE.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Cisco Systems, Inc. and/or its affiliates
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/MANIFEST.json b/collections-debian-merged/ansible_collections/cisco/ucs/MANIFEST.json
new file mode 100644
index 00000000..4ca72ba6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/MANIFEST.json
@@ -0,0 +1,34 @@
+{
+ "collection_info": {
+ "namespace": "cisco",
+ "name": "ucs",
+ "version": "1.6.0",
+ "authors": [
+ "David Soper (@dsoper2)",
+ "John McDonough (@movinalot)"
+ ],
+ "readme": "README.md",
+ "tags": [
+ "cisco",
+ "ucs"
+ ],
+ "description": "modules for Cisco UCS Manager",
+ "license": [
+ "GPL-3.0-or-later"
+ ],
+ "license_file": null,
+ "dependencies": {},
+ "repository": "https://github.com/CiscoDevNet/ansible-ucs",
+ "documentation": "https://developer.cisco.com/site/ucs-dev-center",
+ "homepage": "https://github.com/CiscoDevNet/ansible-ucs",
+ "issues": "https://github.com/CiscoDevNet/ansible-ucs"
+ },
+ "file_manifest_file": {
+ "name": "FILES.json",
+ "ftype": "file",
+ "chksum_type": "sha256",
+ "chksum_sha256": "67a34d17ee57345f555f7a69596adc57db0a9e38935e75d7bbbe6d77427d1a4a",
+ "format": 1
+ },
+ "format": 1
+} \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/README.md b/collections-debian-merged/ansible_collections/cisco/ucs/README.md
new file mode 100644
index 00000000..354f4647
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/README.md
@@ -0,0 +1,101 @@
+# Ansible Collection - cisco.ucs
+
+Ansible collection for managing and automing Cisco UCS Manager envrionments. Modules and roles are provided for common Cisco UCS Manager tasks.
+
+* Note: This collection is not compatible with versions of Ansible before v2.8.
+
+## Requirements
+
+- Ansible v2.8 or newer
+- UCSM Python SDK (ucsmsdk)
+
+## Install
+- ansible must be installed
+```
+sudo pip install ansible
+```
+- ucsmsdk must be installed
+```
+sudo pip install ucsmsdk
+```
+We recommend verifying the ucsmsdk can connect to the domains you want to manage with Ansible. Here is an example connection test using python:
+```
+# python
+Python 2.7.14 (default, Apr 27 2018, 14:31:56)
+[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
+Type "help", "copyright", "credits" or "license" for more information.
+>>> from ucsmsdk import ucshandle
+>>> handle = ucshandle.UcsHandle(ip='172.22.250.236', username='admin', password='password')
+>>> handle.login()
+True
+```
+
+## Usage
+Once Ansible is installed you can create inventory files and playbooks to manage your UCS domains. Each module supports ansible-doc which includes example usage:
+```
+# ansible-doc cisco.ucs.ucs_vlans
+<snip>
+EXAMPLES:
+- name: Configure VLAN
+ cisco.ucs.ucs_vlans:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: vlan2
+ id: '2'
+ native: 'yes'
+```
+This repository includes a playbooks directory with examples including an inventory file that can be edited with information for the UCSM domain you want to configure:
+```
+# vi inventory
+[ucs]
+13.58.22.56
+
+[ucs:vars]
+username=admin
+password=password
+```
+An example_playbook.yml playbook is included to test VLAN configuration on the UCSM domain given in the inventory file:
+```
+# vi example_playbook.yml
+
+---
+# Example Playbook: VLAN configuration using the [ucs] hosts group
+- hosts: ucs
+ connection: local
+ collections:
+ - cisco.ucs
+ gather_facts: false
+ tasks:
+ - name: Configure VLAN
+ ucs_vlans:
+ hostname: "{{ inventory_hostname }}"
+ username: "{{ username | default(omit) }}"
+ password: "{{ password }}"
+ state: "{{ state | default(omit) }}"
+ name: vlan2
+ id: '2'
+ native: 'no'
+ delegate_to: localhost
+```
+Ansible will use data from the inventory file for the hostname and other variables above. Multiple UCSM domains can be listed in the inventory file and Ansible will configure all the listed domains in parallel using host specific data.
+
+The ansible-playbook command can be used to run the above playbook and inventory file:
+```
+# ansible-playbook -i inventory example_playbook.yml
+
+PLAY [ucs] *********************************************************************
+
+TASK [Configure VLAN] **********************************************************
+ok: [13.58.22.56 -> localhost]
+
+PLAY RECAP *********************************************************************
+13.58.22.56 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
+```
+
+A more detailed configuration example is provided in the server_deploy.yml playbook.
+
+# Community:
+
+* We are on Slack (https://ciscoucs.slack.com/) - Slack requires registration, but the ucspython team is open invitation to
+ anyone. Click [here](https://ucspython.herokuapp.com) to register.
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/misc/Impact DNW07 UCS Ansible Collection Lab Guide.pdf b/collections-debian-merged/ansible_collections/cisco/ucs/misc/Impact DNW07 UCS Ansible Collection Lab Guide.pdf
new file mode 100644
index 00000000..6c7f3040
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/misc/Impact DNW07 UCS Ansible Collection Lab Guide.pdf
Binary files differ
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/misc/README.md b/collections-debian-merged/ansible_collections/cisco/ucs/misc/README.md
new file mode 100644
index 00000000..934c8a1d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/misc/README.md
@@ -0,0 +1,3 @@
+# Miscellaneous Items
+
+This folder contains miscellaneous items related to the collection. Trainings, DevNet Workshop giudes, etc. \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/example_playbook.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/example_playbook.yml
new file mode 100644
index 00000000..36e72837
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/example_playbook.yml
@@ -0,0 +1,18 @@
+---
+# Example Playbook: VLAN configuration using the [ucs] hosts group
+- hosts: ucs
+ connection: local
+ collections:
+ - cisco.ucs
+ gather_facts: false
+ tasks:
+ - name: Configure VLAN
+ ucs_vlans:
+ hostname: "{{ inventory_hostname }}"
+ username: "{{ username | default(omit) }}"
+ password: "{{ password }}"
+ state: "{{ state | default(omit) }}"
+ name: vlan2
+ id: '2'
+ native: 'no'
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/fw_download_config_hfp.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/fw_download_config_hfp.yml
new file mode 100644
index 00000000..32ab0abf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/fw_download_config_hfp.yml
@@ -0,0 +1,83 @@
+---
+#
+# Download firmware to the FI and configure Host Firmware Packages (HFP).
+# Uses remote fileshare and scp for FW download (server, remote_path, etc. provided through variables):
+# Example vars:
+# [ucs:vars]
+# remote_ip_address=172.28.224.77
+# remote_fw_path=/mnt/SHARE/ISOS/UCS_Code/4.1
+# remote_username=...
+#
+# The fw_bundles variable is a list that can be passed on the command line.
+# Example:
+# ansible-playbook ... -e '{"fw_bundles": ["ucs-k9-bundle-b-series.4.1.2b.B.bin"]}'
+#
+- hosts: ucs
+ connection: local
+ gather_facts: false
+ vars:
+ login_info: &login_info
+ hostname: "{{ inventory_hostname }}"
+ username: "{{ username | default(omit) }}"
+ password: "{{ password }}"
+ tasks:
+ - name: Download FW to FI
+ ucs_managed_objects:
+ <<: *login_info
+ objects:
+ - module: ucsmsdk.mometa.firmware.FirmwareCatalogue
+ class: FirmwareCatalogue
+ properties:
+ parent_mo_or_dn: sys
+ children:
+ - module: ucsmsdk.mometa.firmware.FirmwareDownloader
+ class: FirmwareDownloader
+ properties:
+ protocol: scp
+ server: "{{ remote_ip_address }}"
+ remote_path: "{{ remote_fw_path }}"
+ file_name: "{{ item }}"
+ user: "{{ remote_username }}"
+ pwd: "{{ remote_password }}"
+ loop: "{{ fw_bundles }}"
+ delegate_to: localhost
+ register: download_result
+ - name: Query and wait for download if needed
+ cisco.ucs.ucs_query:
+ <<: *login_info
+ distinguished_names: "{{ fw_download_dn }}"
+ loop: "{{ fw_bundles }}"
+ vars:
+ fw_download_dn: "sys/fw-catalogue/dnld-{{ item }}"
+ delegate_to: localhost
+ register: query_response
+ # works with warnings:
+ # until: query_response['objects']["{{ fw_download_dn }}"]['transfer_state'] == 'downloaded'
+ until: query_response.objects is search('downloaded')
+ # retry every 60 seconds for 20 minutes
+ delay: 60
+ retries: 20
+ # regular escapes in a set variable
+ - set_fact:
+ match_str: 'ucs-.*?\.(?P<rel>\d\.\d)\.(?P<patch>.*)\.'
+ # escape the escapes when used directly in strings
+ - set_fact:
+ blade_version: "{{ item | regex_replace(match_str + 'B\\.bin', '\\g<rel>(\\g<patch>)B') }}"
+ loop: "{{ fw_bundles }}"
+ when: item | regex_search(match_str + 'B\\.bin')
+ - set_fact:
+ rack_version: "{{ item | regex_replace(match_str + 'C\\.bin', '\\g<rel>(\\g<patch>)C') }}"
+ loop: "{{ fw_bundles }}"
+ when: item | regex_search(match_str + 'C\\.bin')
+ - name: Config Host FW Package
+ ucs_managed_objects:
+ <<: *login_info
+ objects:
+ - module: ucsmsdk.mometa.firmware.FirmwareComputeHostPack
+ class: FirmwareComputeHostPack
+ properties:
+ parent_mo_or_dn: org-root
+ name: ansible-latest
+ blade_bundle_version: "{{ blade_version | default(omit) }}"
+ rack_bundle_version: "{{ rack_version | default(omit) }}"
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/inventory b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/inventory
new file mode 100644
index 00000000..aed6af36
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/inventory
@@ -0,0 +1,6 @@
+[ucs]
+13.58.22.56
+
+[ucs:vars]
+username=admin
+password=password
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/roles/servers/defaults/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/roles/servers/defaults/tasks/main.yml
new file mode 100644
index 00000000..ab28cd57
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/roles/servers/defaults/tasks/main.yml
@@ -0,0 +1,136 @@
+---
+- name: "Configure default IP Pool"
+ vars:
+ # Create an anchor for login_info that can be used throughout the file
+ login_info: &login_info
+ hostname: "{{ hostname }}"
+ username: "{{ username | default(omit) }}"
+ password: "{{ password | default('password') }}"
+ state: "{{ state | default(omit) }}"
+ cisco.ucs.ucs_ip_pool:
+ <<: *login_info
+ name: ext-mgmt
+ ipv4_blocks:
+ - first_addr: 198.18.0.20
+ last_addr: 198.18.0.40
+ subnet_mask: 255.255.255.0
+ default_gw: 198.18.0.1
+ tags: ip_pool
+- name: "Configure default MAC Pool"
+ cisco.ucs.ucs_mac_pool:
+ <<: *login_info
+ name: default
+ first_addr: 00:25:B5:DE:30:00
+ last_addr: 00:25:B5:DE:32:FF
+ tags: mac_pool
+- name: "Configure default UUID Pool"
+ cisco.ucs.ucs_uuid_pool:
+ <<: *login_info
+ name: default
+ first_uuid: 0000-000000000001
+ last_uuid: 0000-000000000078
+ tags: uuid_pool
+- name: "Configure default Virtual Media Policy"
+ cisco.ucs.ucs_managed_objects:
+ <<: *login_info
+ objects:
+ - module: ucsmsdk.mometa.cimcvmedia.CimcvmediaMountConfigPolicy
+ class: CimcvmediaMountConfigPolicy
+ properties:
+ parent_mo_or_dn: org-root
+ name: "{{ vmedia_policy }}"
+ children:
+ - module: ucsmsdk.mometa.cimcvmedia.CimcvmediaConfigMountEntry
+ class: CimcvmediaConfigMountEntry
+ properties:
+ device_type: cdd
+ image_file_name: "{{ image_file_name | default('centos7.2-boot-ks.iso') }}"
+ image_path: "{{ image_path | default('/home/public') }}"
+ mapping_name: cdd-nfs
+ mount_protocol: nfs
+ remote_ip_address: "{{ remote_ip_address | default('198.18.134.242') }}"
+ tags: virtual_media
+- name: "Configure default Boot Order Policy"
+ cisco.ucs.ucs_managed_objects:
+ <<: *login_info
+ objects:
+ - module: ucsmsdk.mometa.lsboot.LsbootPolicy
+ class: LsbootPolicy
+ properties:
+ parent_mo_or_dn: org-root
+ boot_mode: legacy
+ enforce_vnic_name: 'yes'
+ name: vmedia-local
+ reboot_on_update: 'no'
+ children:
+ - module: ucsmsdk.mometa.lsboot.LsbootVirtualMedia
+ class: LsbootVirtualMedia
+ properties:
+ access: read-only-remote-cimc
+ lun_id: '0'
+ order: '1'
+ - module: ucsmsdk.mometa.lsboot.LsbootStorage
+ class: LsbootStorage
+ properties:
+ order: '2'
+ children:
+ - module: ucsmsdk.mometa.lsboot.LsbootLocalStorage
+ class: LsbootLocalStorage
+ properties: {}
+ children:
+ - module: ucsmsdk.mometa.lsboot.LsbootDefaultLocalImage
+ class: LsbootDefaultLocalImage
+ properties:
+ order: '2'
+ tags: boot_order
+- name: "Configure default Server Pool"
+ cisco.ucs.ucs_managed_objects:
+ <<: *login_info
+ objects:
+ - module: ucsmsdk.mometa.compute.ComputePool
+ class: ComputePool
+ properties:
+ parent_mo_or_dn: org-root
+ name: default
+ children:
+ - module: ucsmsdk.mometa.compute.ComputePooledSlot
+ class: ComputePooledSlot
+ properties:
+ chassis_id: '1'
+ slot_id: '1'
+ - module: ucsmsdk.mometa.compute.ComputePooledSlot
+ class: ComputePooledSlot
+ properties:
+ chassis_id: '1'
+ slot_id: '2'
+ - module: ucsmsdk.mometa.compute.ComputePooledSlot
+ class: ComputePooledSlot
+ properties:
+ chassis_id: '1'
+ slot_id: '3'
+ - module: ucsmsdk.mometa.compute.ComputePooledSlot
+ class: ComputePooledSlot
+ properties:
+ chassis_id: '1'
+ slot_id: '4'
+ - module: ucsmsdk.mometa.compute.ComputePooledSlot
+ class: ComputePooledSlot
+ properties:
+ chassis_id: '1'
+ slot_id: '5'
+ - module: ucsmsdk.mometa.compute.ComputePooledSlot
+ class: ComputePooledSlot
+ properties:
+ chassis_id: '1'
+ slot_id: '6'
+ - module: ucsmsdk.mometa.compute.ComputePooledSlot
+ class: ComputePooledSlot
+ properties:
+ chassis_id: '1'
+ slot_id: '7'
+ - module: ucsmsdk.mometa.compute.ComputePooledSlot
+ class: ComputePooledSlot
+ properties:
+ chassis_id: '1'
+ slot_id: '8'
+ tags: server_pool
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/roles/servers/service_profile_templates/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/roles/servers/service_profile_templates/tasks/main.yml
new file mode 100644
index 00000000..c6143280
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/roles/servers/service_profile_templates/tasks/main.yml
@@ -0,0 +1,18 @@
+---
+- name: "Configure {{ template_name }} Service Profile Template"
+ vars:
+ # Create an anchor for login_info that can be used throughout the file
+ login_info: &login_info
+ hostname: "{{ hostname }}"
+ username: "{{ username | default(omit) }}"
+ password: "{{ password | default('password') }}"
+ state: "{{ state | default(omit) }}"
+ cisco.ucs.ucs_service_profile_template:
+ <<: *login_info
+ name: "{{ template_name }}"
+ template_type: "{{ template_type }}"
+ host_firmware_package: "{{ host_firmware_package }}"
+ server_pool: default
+ vmedia_policy: "{{ vmedia_policy }}"
+ boot_policy: vmedia-local
+ maintenance_policy: "{{ maintenance_policy }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/roles/servers/service_profiles/tasks/main.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/roles/servers/service_profiles/tasks/main.yml
new file mode 100644
index 00000000..ac1f920b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/roles/servers/service_profiles/tasks/main.yml
@@ -0,0 +1,14 @@
+---
+- name: "Configure {{ profile_name }} Service Profiles from template {{ template_name }}"
+ vars:
+ # Create an anchor for login_info that can be used throughout the file
+ login_info: &login_info
+ hostname: "{{ hostname }}"
+ username: "{{ username | default(omit) }}"
+ password: "{{ password | default('password') }}"
+ state: "{{ state | default(omit) }}"
+ cisco.ucs.ucs_service_profile_from_template:
+ <<: *login_info
+ name: "{{ profile_name }}-{{ '%d' | format(item) }}"
+ source_template: "{{ template_name }}"
+ loop: "{{ range(1, num_profiles|int + 1) | list }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/sandbox_inventory b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/sandbox_inventory
new file mode 100644
index 00000000..4a3a2b26
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/sandbox_inventory
@@ -0,0 +1,6 @@
+[ucs]
+ucs1 ucs_hostname=sandbox-ucsm1.cisco.com
+
+[ucs:vars]
+ucs_username=admin
+ucs_password=C1sco12345
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/server_deploy.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/server_deploy.yml
new file mode 100644
index 00000000..a7d62439
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/server_deploy.yml
@@ -0,0 +1,39 @@
+---
+#
+# Configure UCS, Associate Service Profiles, and Install OS
+#
+# The hosts group used is provided by the group variable or defaulted to 'ucs'.
+# You can specify a specific host (or host group) on the command line:
+# ansible-playbook ... -e group=<your host group>
+# e.g., ansible-playbook server_profiles.yml -e group=TME_Demo
+#
+- hosts: "{{ group | default('ucs') }}"
+ connection: local
+ gather_facts: false
+ vars:
+ # The UCS domain hostname can be set in the inventory or on the command line as needed
+ hostname: "{{ inventory_hostname }}"
+ # Names for Service Profiles, Policies, and number of Profiles
+ template_name: auto-template
+ template_type: updating-template
+ host_firmware_package: ansible-latest
+ maintenance_policy: user-ack
+ vmedia_policy: cdd-nfs
+ profile_name: auto-profile
+ num_profiles: 2
+ tasks:
+ - block:
+ # Configure default pools and other settings
+ - import_role:
+ name: servers/defaults
+ tags: defaults
+ # Configure Service Profile Template with default settings
+ - import_role:
+ name: servers/service_profile_templates
+ tags: templates
+ # Create Service Profiles from template and associate
+ - import_role:
+ name: servers/service_profiles
+ tags: profiles
+ # Use the localhost's environment and Python
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_disk_group_policy.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_disk_group_policy.yml
new file mode 100644
index 00000000..877bdb93
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_disk_group_policy.yml
@@ -0,0 +1,74 @@
+---
+# Example Playbook: cisco.ucs.ucs_disk_group_policy
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure Disk Group Policy
+ cisco.ucs.ucs_disk_group_policy:
+ <<: *login_info
+ name: DEE-DG
+ raid_level: mirror
+ configuration_mode: manual
+ manual_disks:
+ - slot_num: '1'
+ role: normal
+ - slot_num: '2'
+ role: normal
+ org_dn: org-root/org-level1
+
+ - name: Remove Disk from Policy
+ cisco.ucs.ucs_disk_group_policy:
+ <<: *login_info
+ name: DEE-DG
+ description: Testing Ansible
+ raid_level: stripe
+ configuration_mode: manual
+ manual_disks:
+ - slot_num: '1'
+ role: normal
+ - slot_num: '2'
+ role: normal
+ state: absent
+ virtual_drive:
+ access_policy: platform-default
+ io_policy: direct
+ strip_size: 64KB
+ org_dn: org-root/org-level1
+
+ - name: Remove Disk Group Policy
+ cisco.ucs.ucs_disk_group_policy:
+ <<: *login_info
+ name: DEE-DG
+ state: absent
+ org_dn: org-root/org-level1
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_dns_server.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_dns_server.yml
new file mode 100644
index 00000000..5ded54b2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_dns_server.yml
@@ -0,0 +1,33 @@
+---
+# Example Playbook: cisco.ucs.ucs_dns_server
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Configure DNS server
+ cisco.ucs.ucs_dns_server:
+ <<: *login_info
+ dns_server: 10.10.10.10
+ description: DNS Server IP address
+ state: present
+ delegate_to: localhost
+
+ - name: Remove DNS server
+ cisco.ucs.ucs_dns_server:
+ <<: *login_info
+ dns_server: 10.10.10.10
+ state: absent
+ delegate_to: localhost \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_graphics_card_policy.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_graphics_card_policy.yml
new file mode 100644
index 00000000..9a2cab85
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_graphics_card_policy.yml
@@ -0,0 +1,105 @@
+---
+# Example Playbook: cisco.ucs_graphics_card_policy
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ vars:
+ org: AnsibleOrg
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: "{{ org }}"
+ parent_org_path: root
+ description: "Org {{ org }}"
+ state: present
+ delegate_to: localhost
+
+ - name: Add Graphics Card Policy
+ cisco.ucs.ucs_graphics_card_policy:
+ <<: *login_info
+ state: present
+ org_dn: "org-root/org-{{ org }}"
+ description: Any Graphics Mode Policy
+ name: prod_graphics
+ graphics_card_mode: any-configuration
+ delegate_to: localhost
+
+ - name: Check Graphics Card Policy
+ cisco.ucs.ucs_graphics_card_policy:
+ <<: *login_info
+ state: present
+ org_dn: "org-root/org-{{ org }}"
+ description: Any Graphics Mode Policy
+ name: prod_graphics
+ graphics_card_mode: any-configuration
+ delegate_to: localhost
+ check_mode: True
+
+ - name: Add Graphics Card Policy
+ cisco.ucs.ucs_graphics_card_policy:
+ <<: *login_info
+ state: present
+ description: Any Graphics Mode Policy
+ name: any_graphics
+ graphics_card_mode: any-configuration
+ delegate_to: localhost
+
+ - name: Idempotent Graphics Card Policy
+ cisco.ucs.ucs_graphics_card_policy:
+ <<: *login_info
+ state: present
+ description: Any Graphics Mode Policy
+ name: any_graphics
+ graphics_card_mode: any-configuration
+ delegate_to: localhost
+
+ - name: Check Create/Update Graphics Card Policy
+ cisco.ucs.ucs_graphics_card_policy:
+ <<: *login_info
+ state: present
+ org_dn: "org-root/org-{{ org }}"
+ description: Compute Graphics Mode Policy
+ name: prod_graphics
+ graphics_card_mode: compute
+ delegate_to: localhost
+ check_mode: true
+
+ - name: Create/Update Graphics Card Policy
+ cisco.ucs.ucs_graphics_card_policy:
+ <<: *login_info
+ state: present
+ org_dn: "org-root/org-{{ org }}"
+ description: Compute Graphics Mode Policy
+ name: prod_graphics
+ graphics_card_mode: compute
+ delegate_to: localhost
+
+ - name: Delete Graphics Card Policy
+ cisco.ucs.ucs_graphics_card_policy:
+ <<: *login_info
+ state: absent
+ name: any_graphics
+ delegate_to: localhost
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: "{{ org }}"
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_ip_pool.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_ip_pool.yml
new file mode 100644
index 00000000..f1d9da98
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_ip_pool.yml
@@ -0,0 +1,78 @@
+---
+# Example Playbook: cisco.ucs.ucs_ip_pool
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure IPv4 and IPv6 address pool
+ cisco.ucs.ucs_ip_pool:
+ <<: *login_info
+ name: ip-pool-01
+ org_dn: org-root/org-level1
+ ipv4_blocks:
+ - first_addr: 192.168.10.1
+ last_addr: 192.168.10.20
+ subnet_mask: 255.255.255.128
+ default_gw: 192.168.10.2
+ - first_addr: 192.168.11.1
+ last_addr: 192.168.11.20
+ subnet_mask: 255.255.255.128
+ default_gw: 192.168.11.2
+ ipv6_blocks:
+ - ipv6_first_addr: fe80::1cae:7992:d7a1:ed07
+ ipv6_last_addr: fe80::1cae:7992:d7a1:edfe
+ ipv6_default_gw: fe80::1cae:7992:d7a1:ecff
+ - ipv6_first_addr: fe80::1cae:7992:d7a1:ec07
+ ipv6_last_addr: fe80::1cae:7992:d7a1:ecfe
+ ipv6_default_gw: fe80::1cae:7992:d7a1:ecff
+
+ - name: Remove IPv4 and IPv6 address pool blocks
+ cisco.ucs.ucs_ip_pool:
+ <<: *login_info
+ name: ip-pool-01
+ org_dn: org-root/org-level1
+ ipv4_blocks:
+ - first_addr: 192.168.10.1
+ last_addr: 192.168.10.20
+ state: absent
+ ipv6_blocks:
+ - ipv6_first_addr: fe80::1cae:7992:d7a1:ec07
+ ipv6_last_addr: fe80::1cae:7992:d7a1:ecfe
+ state: absent
+
+ - name: Remove IPv4 and IPv6 address pool
+ cisco.ucs.ucs_ip_pool:
+ <<: *login_info
+ name: ip-pool-01
+ org_dn: org-root/org-level1
+ state: absent
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_lan_connectivity.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_lan_connectivity.yml
new file mode 100644
index 00000000..09903bac
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_lan_connectivity.yml
@@ -0,0 +1,67 @@
+---
+# Example Playbook: cisco.ucs.ucs_lan_connectivity
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure LAN Connectivity Policy
+ cisco.ucs.ucs_lan_connectivity:
+ <<: *login_info
+ name: Cntr-FC-Boot
+ org_dn: org-root/org-level1
+ vnic_list:
+ - name: eno1
+ vnic_template: Cntr-Template
+ adapter_policy: Linux
+ - name: eno2
+ vnic_template: Container-NFS-A
+ adapter_policy: Linux
+ - name: eno3
+ vnic_template: Container-NFS-B
+ adapter_policy: Linux
+ iscsi_vnic_list:
+ - name: iSCSIa
+ overlay_vnic: eno1
+ iscsi_adapter_policy: default
+ vlan_name: Container-MGMT-VLAN
+ - name: iSCSIb
+ overlay_vnic: eno3
+ iscsi_adapter_policy: default
+ vlan_name: Container-TNT-A-NFS
+
+ - name: Remove LAN Connectivity Policy
+ cisco.ucs.ucs_lan_connectivity:
+ <<: *login_info
+ name: Cntr-FC-Boot
+ org_dn: org-root/org-level1
+ state: absent
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_mac_pool.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_mac_pool.yml
new file mode 100644
index 00000000..a590bdfb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_mac_pool.yml
@@ -0,0 +1,51 @@
+---
+# Example Playbook: cisco.ucs.ucs_mac_pool
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure MAC address pool
+ cisco.ucs.ucs_mac_pool:
+ <<: *login_info
+ name: mac-A
+ org_dn: org-root/org-level1
+ first_addr: 00:25:B5:00:66:00
+ last_addr: 00:25:B5:00:67:F3
+ order: sequential
+
+ - name: Remove MAC address pool
+ cisco.ucs.ucs_mac_pool:
+ <<: *login_info
+ name: mac-A
+ org_dn: org-root/org-level1
+ state: absent
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_managed_objects.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_managed_objects.yml
new file mode 100644
index 00000000..f36d2b26
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_managed_objects.yml
@@ -0,0 +1,124 @@
+---
+# Example Playbook: cisco.ucs.ucs_managed_objects
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure Network Control Policy
+ cisco.ucs.ucs_managed_objects:
+ <<: *login_info
+ objects:
+ - module: ucsmsdk.mometa.nwctrl.NwctrlDefinition
+ class: NwctrlDefinition
+ properties:
+ parent_mo_or_dn: org-root/org-level1
+ cdp: enabled
+ descr: ''
+ lldp_receive: enabled
+ lldp_transmit: enabled
+ name: Enable-CDP-LLDP
+
+ - name: Remove Network Control Policy
+ cisco.ucs.ucs_managed_objects:
+ <<: *login_info
+ objects:
+ - module: ucsmsdk.mometa.nwctrl.NwctrlDefinition
+ class: NwctrlDefinition
+ properties:
+ parent_mo_or_dn: org-root/org-level1
+ name: Enable-CDP-LLDP
+ state: absent
+
+ - name: Configure Boot Policy Using JSON objects list with children
+ cisco.ucs.ucs_managed_objects:
+ <<: *login_info
+ objects:
+ - {
+ "module": "ucsmsdk.mometa.lsboot.LsbootPolicy",
+ "class": "LsbootPolicy",
+ "properties": {
+ "parent_mo_or_dn": "org-root/org-level1",
+ "name": "Python_SDS",
+ "enforce_vnic_name": "yes",
+ "boot_mode": "legacy",
+ "reboot_on_update": "no"
+ },
+ "children": [
+ {
+ "module": "ucsmsdk.mometa.lsboot.LsbootVirtualMedia",
+ "class": "LsbootVirtualMedia",
+ "properties": {
+ "access": "read-only-local",
+ "lun_id": "0",
+ "order": "2"
+ }
+ },
+ {
+ "module": "ucsmsdk.mometa.lsboot.LsbootStorage",
+ "class": "LsbootStorage",
+ "properties": {
+ "order": "1"
+ },
+ "children": [
+ {
+ "module": "ucsmsdk.mometa.lsboot.LsbootLocalStorage",
+ "class": "LsbootLocalStorage",
+ "properties": {},
+ "children": [
+ {
+ "module": "ucsmsdk.mometa.lsboot.LsbootDefaultLocalImage",
+ "class": "LsbootDefaultLocalImage",
+ "properties": {
+ "order": "1"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+
+ - name: Remove Boot Policy Using JSON objects list
+ cisco.ucs.ucs_managed_objects:
+ <<: *login_info
+ objects:
+ - {
+ "module": "ucsmsdk.mometa.lsboot.LsbootPolicy",
+ "class": "LsbootPolicy",
+ "properties": {
+ "parent_mo_or_dn": "org-root/org-level1",
+ "name": "Python_SDS"
+ }
+ }
+ state: absent
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_ntp_server.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_ntp_server.yml
new file mode 100644
index 00000000..be8f049e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_ntp_server.yml
@@ -0,0 +1,44 @@
+---
+# Example Playbook: cisco.ucs.ucs_dns_server
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Configure NTP server
+ cisco.ucs.ucs_ntp_server:
+ <<: *login_info
+ ntp_server: 10.10.10.10
+ description: Internal NTP Server by IP address
+ state: present
+
+ - name: Configure NTP server
+ cisco.ucs.ucs_ntp_server:
+ <<: *login_info
+ ntp_server: pool.ntp.org
+ description: External NTP Server by hostname
+ state: present
+
+ - name: Remove NTP server
+ cisco.ucs.ucs_ntp_server:
+ <<: *login_info
+ ntp_server: 10.10.10.10
+ state: absent
+
+ - name: Remove NTP server
+ cisco.ucs.ucs_ntp_server:
+ <<: *login_info
+ ntp_server: pool.ntp.org
+ state: absent \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_org.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_org.yml
new file mode 100644
index 00000000..367beb7d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_org.yml
@@ -0,0 +1,73 @@
+---
+# Example Playbook: cisco.ucs.ucs_org
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: test
+ description: testing org
+ state: present
+ delegate_to: localhost
+
+ - name: Update UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: test
+ description: Testing org
+ state: present
+ delegate_to: localhost
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: test
+ state: absent
+ delegate_to: localhost
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level2
+ parent_org_path: root/level1
+ description: level2 org
+ state: present
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level3
+ parent_org_path: root/level1/level2
+ description: level3 org
+ state: present
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level2
+ parent_org_path: root/level1
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_query.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_query.yml
new file mode 100644
index 00000000..be9d70e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_query.yml
@@ -0,0 +1,62 @@
+---
+# Example Playbook: cisco.ucs.ucs_query
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Query UCS Class ID
+ cisco.ucs.ucs_query:
+ <<: *login_info
+ class_ids: computeBlade
+ delegate_to: localhost
+ register: response
+
+ - name: show response
+ debug:
+ msg: "{{ response }}"
+
+ - name: Query UCS Class IDs
+ cisco.ucs.ucs_query:
+ <<: *login_info
+ class_ids: computeBlade, fabricVlan
+ delegate_to: localhost
+ register: response
+
+ - name: show response
+ debug:
+ msg: "{{ response }}"
+
+ - name: Query UCS Distinguished Name
+ cisco.ucs.ucs_query:
+ <<: *login_info
+ distinguished_names: org-root
+ delegate_to: localhost
+ register: response
+
+ - name: show response
+ debug:
+ msg: "{{ response }}"
+
+ - name: Query UCS Distinguished Names
+ cisco.ucs.ucs_query:
+ <<: *login_info
+ distinguished_names: org-root, sys/rack-unit-1, sys/chassis-1/blade-2
+ delegate_to: localhost
+ register: response
+
+ - name: show response
+ debug:
+ msg: "{{ response }}" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_san_connectivity.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_san_connectivity.yml
new file mode 100644
index 00000000..7958af12
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_san_connectivity.yml
@@ -0,0 +1,56 @@
+---
+# Example Playbook: cisco.ucs.ucs_san_connectivity
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure SAN Connectivity Policy
+ cisco.ucs.ucs_san_connectivity:
+ <<: *login_info
+ name: Cntr-FC-Boot
+ org_dn: org-root/org-level1
+ wwnn_pool: WWNN-Pool
+ vhba_list:
+ - name: Fabric-A
+ vhba_template: vHBA-Template-A
+ adapter_policy: Linux
+ - name: Fabric-B
+ vhba_template: vHBA-Template-B
+ adapter_policy: Linux
+
+ - name: Remove SAN Connectivity Policy
+ cisco.ucs.ucs_san_connectivity:
+ <<: *login_info
+ name: Cntr-FC-Boot
+ org_dn: org-root/org-level1
+ state: absent
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_scrub_policy.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_scrub_policy.yml
new file mode 100644
index 00000000..96e9477a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_scrub_policy.yml
@@ -0,0 +1,123 @@
+---
+# Example Playbook: cisco.ucs.ucs_scrub_policy
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ vars:
+ org: AnsibleOrg
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: "{{ org }}"
+ parent_org_path: root
+ description: "Org {{ org }}"
+ state: present
+ delegate_to: localhost
+
+ - name: Add Scrub Policy
+ cisco.ucs.ucs_scrub_policy:
+ <<: *login_info
+ state: present
+ org_dn: "org-root/org-{{ org }}"
+ description: Scrub All Policy
+ name: all_scrub
+ bios_settings_scrub: "yes"
+ disk_scrub: "yes"
+ flex_flash_scrub: "yes"
+ persistent_memory_scrub: "yes"
+ delegate_to: localhost
+
+ - name: Check Scrub Policy
+ cisco.ucs.ucs_scrub_policy:
+ <<: *login_info
+ state: present
+ org_dn: "org-root/org-{{ org }}"
+ description: Scrub All Policy
+ name: all_scrub
+ bios_settings_scrub: "yes"
+ disk_scrub: "yes"
+ flex_flash_scrub: "yes"
+ persistent_memory_scrub: "yes"
+ delegate_to: localhost
+ check_mode: True
+
+ - name: Add Scrub Policy
+ cisco.ucs.ucs_scrub_policy:
+ <<: *login_info
+ state: present
+ description: Scrub All Policy
+ name: all_scrub
+ bios_settings_scrub: "yes"
+ disk_scrub: "yes"
+ flex_flash_scrub: "yes"
+ persistent_memory_scrub: "yes"
+ delegate_to: localhost
+
+ - name: Idempotent Scrub Policy
+ cisco.ucs.ucs_scrub_policy:
+ <<: *login_info
+ state: present
+ description: Scrub All Policy
+ name: all_scrub
+ bios_settings_scrub: "yes"
+ disk_scrub: "yes"
+ flex_flash_scrub: "yes"
+ persistent_memory_scrub: "yes"
+ delegate_to: localhost
+
+ - name: Check Create/Update Scrub Policy
+ cisco.ucs.ucs_scrub_policy:
+ <<: *login_info
+ state: present
+ org_dn: "org-root/org-{{ org }}"
+ name: BD_scrub
+ description: Scrub BIOS and Disk Policy
+ bios_settings_scrub: "yes"
+ disk_scrub: "yes"
+ flex_flash_scrub: "no"
+ persistent_memory_scrub: "no"
+ delegate_to: localhost
+ check_mode: true
+
+ - name: Create/Update Scrub Policy
+ cisco.ucs.ucs_scrub_policy:
+ <<: *login_info
+ state: present
+ org_dn: "org-root/org-{{ org }}"
+ name: BD_scrub
+ description: Scrub BIOS and Disk Policy
+ bios_settings_scrub: "yes"
+ disk_scrub: "yes"
+ flex_flash_scrub: "no"
+ persistent_memory_scrub: "no"
+ delegate_to: localhost
+
+ - name: Delete Scrub Policy
+ cisco.ucs.ucs_scrub_policy:
+ <<: *login_info
+ state: absent
+ name: all_scrub
+ delegate_to: localhost
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: "{{ org }}"
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_serial_over_lan_policy.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_serial_over_lan_policy.yml
new file mode 100644
index 00000000..7ed640df
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_serial_over_lan_policy.yml
@@ -0,0 +1,109 @@
+---
+# Example Playbook: cisco.ucs.ucs_serial_over_lan_policy
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ vars:
+ org: AnsibleOrg
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: "{{ org }}"
+ parent_org_path: root
+ description: "Org {{ org }}"
+ state: present
+ delegate_to: localhost
+
+ - name: Add UCS Serial Over Lan Policy
+ cisco.ucs.ucs_serial_over_lan_policy:
+ <<: *login_info
+ state: present
+ org_dn: "org-root/org-{{ org }}"
+ name: sol_pol
+ description: "Serial Over Lan for Org {{ org }} servers"
+ admin_state: enable
+ speed: "38400"
+ delegate_to: localhost
+
+ - name: Check Serial Over Lan
+ cisco.ucs.ucs_serial_over_lan_policy:
+ <<: *login_info
+ state: present
+ org_dn: "org-root/org-{{ org }}"
+ name: sol_pol
+ description: "Serial Over Lan for Org {{ org }} servers"
+ admin_state: enable
+ speed: "38400"
+ delegate_to: localhost
+ check_mode: True
+
+ - name: Add Serial Over Lan
+ cisco.ucs.ucs_serial_over_lan_policy:
+ <<: *login_info
+ state: present
+ name: sol_pol
+ description: Serial Over Lan for Org Root servers
+ admin_state: enable
+ speed: "57600"
+ delegate_to: localhost
+
+ - name: Idempotent Serial Over Lan
+ cisco.ucs.ucs_serial_over_lan_policy:
+ <<: *login_info
+ state: present
+ name: sol_pol
+ description: Serial Over Lan for Org Root servers
+ admin_state: enable
+ speed: "57600"
+ delegate_to: localhost
+
+ - name: Check Update Serial Over Lan
+ cisco.ucs.ucs_serial_over_lan_policy:
+ <<: *login_info
+ state: present
+ name: sol_pol
+ description: Serial Over Lan for Org Root servers
+ admin_state: enable
+ speed: "57600"
+ delegate_to: localhost
+ check_mode: true
+
+ - name: Update Serial Over Lan
+ cisco.ucs.ucs_serial_over_lan_policy:
+ <<: *login_info
+ state: present
+ name: sol_pol
+ description: Serial Over Lan for Org Root servers
+ admin_state: enable
+ speed: "57600"
+ delegate_to: localhost
+
+ - name: Delete Serial Over Lan
+ cisco.ucs.ucs_serial_over_lan_policy:
+ <<: *login_info
+ state: absent
+ name: sol_pol
+ delegate_to: localhost
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: "{{ org }}"
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_server_maintenance.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_server_maintenance.yml
new file mode 100644
index 00000000..84a58da8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_server_maintenance.yml
@@ -0,0 +1,43 @@
+---
+# Example Playbook: cisco.ucs.ucs_server_maintenance
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add Server Maintenance Policy (check_mode)
+ cisco.ucs.ucs_server_maintenance:
+ <<: *login_info
+ name: user-ack
+ uptime_disr: user-ack
+ trigger_config: on-next-boot
+ delegate_to: localhost
+ check_mode: true
+
+ - name: Add Server Maintenance Policy
+ cisco.ucs.ucs_server_maintenance:
+ <<: *login_info
+ name: user-ack
+ uptime_disr: user-ack
+ trigger_config: on-next-boot
+ delegate_to: localhost
+
+ - name: Idempotent Add Server Maintenance Policy
+ cisco.ucs.ucs_server_maintenance:
+ <<: *login_info
+ name: user-ack
+ uptime_disr: user-ack
+ trigger_config: on-next-boot
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_service_profile_association.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_service_profile_association.yml
new file mode 100644
index 00000000..96d1ca78
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_service_profile_association.yml
@@ -0,0 +1,53 @@
+---
+# Example Playbook: cisco.ucs.ucs_ucs_service_profile_association
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Change Service Profile Association to Existing Server
+ cisco.ucs.ucs_service_profile_association:
+ <<: *login_info
+ service_profile_name: auto-profile-2
+ server_assignment: server
+ server_dn: sys/chassis-6/blade-1
+ delegate_to: localhost
+ register: result
+ until: result.assign_state == 'assigned' and result.assoc_state == 'associated'
+ retries: 10
+ delay: 60
+
+ - name: Change Service Profile Association to Pool
+ cisco.ucs.ucs_service_profile_association:
+ <<: *login_info
+ service_profile_name: auto-profile-2
+ server_assignment: pool
+ server_pool_name: default
+ delegate_to: localhost
+ register: result
+ until: result.assign_state == 'assigned' and result.assoc_state == 'associated'
+ retries: 10
+ delay: 60
+
+ - name: Disassociate Service Profile
+ cisco.ucs.ucs_service_profile_association:
+ <<: *login_info
+ service_profile_name: auto-profile-2
+ state: absent
+ delegate_to: localhost
+ register: result
+ until: result.assign_state == 'unassigned' and result.assoc_state == 'unassociated'
+ retries: 10
+ delay: 60
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_service_profile_from_template.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_service_profile_from_template.yml
new file mode 100644
index 00000000..ba05b116
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_service_profile_from_template.yml
@@ -0,0 +1,68 @@
+---
+# Example Playbook: cisco.ucs.ucs_service_profile_from_template
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure Service Profile Template with LAN/SAN Connectivity and all other options defaulted
+ cisco.ucs.ucs_service_profile_template:
+ <<: *login_info
+ name: sp-template
+ org_dn: org-root/org-level1
+ template_type: updating-template
+ uuid_pool: UUID-Pool
+ storage_profile: DEE-StgProf
+ lan_connectivity_policy: Cntr-FC-Boot
+ iqn_pool: iSCSI-Boot-A
+ san_connectivity_policy: Cntr-FC-Boot
+ boot_policy: DEE-vMedia
+ maintenance_policy: default
+ server_pool: Container-Pool
+ host_firmware_package: 3.1.2b
+ bios_policy: Docker
+
+ - name: Configure Service Profile from Template
+ cisco.ucs.ucs_service_profile_from_template:
+ <<: *login_info
+ name: sp-instance-1
+ org_dn: org-root/org-level1
+ user_label: SP Instance
+ power_state: down
+ source_template: sp-template
+
+ - name: Remove Service Profile Template
+ cisco.ucs.ucs_service_profile_template:
+ <<: *login_info
+ name: sp-template
+ org_dn: org-root/org-level1
+ state: absent
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_service_profile_template.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_service_profile_template.yml
new file mode 100644
index 00000000..a63330c3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_service_profile_template.yml
@@ -0,0 +1,59 @@
+---
+# Example Playbook: cisco.ucs.ucs_service_profile_template
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure Service Profile Template with LAN/SAN Connectivity and all other options defaulted
+ cisco.ucs.ucs_service_profile_template:
+ <<: *login_info
+ name: sp-template
+ org_dn: org-root/org-level1
+ template_type: updating-template
+ uuid_pool: UUID-Pool
+ storage_profile: DEE-StgProf
+ lan_connectivity_policy: Cntr-FC-Boot
+ iqn_pool: iSCSI-Boot-A
+ san_connectivity_policy: Cntr-FC-Boot
+ boot_policy: DEE-vMedia
+ maintenance_policy: default
+ server_pool: Container-Pool
+ host_firmware_package: 3.1.2b
+ bios_policy: Docker
+
+ - name: Remove Service Profile Template
+ cisco.ucs.ucs_service_profile_template:
+ <<: *login_info
+ name: sp-template
+ org_dn: org-root/org-level1
+ state: absent
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_sp_vnic_order.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_sp_vnic_order.yml
new file mode 100644
index 00000000..9c511c87
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_sp_vnic_order.yml
@@ -0,0 +1,29 @@
+---
+# Example Playbook: cisco.ucs.ucs_sp_vnic_order
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Configure vnic order
+ cisco.ucs.ucs_sp_vnic_order:
+ <<: *login_info
+ sp_name: DEE-Ctrl-02
+ vnics:
+ - name: eno1
+ admin_vcon: '1'
+ order: '1'
+ transport: ethernet
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_storage_profile.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_storage_profile.yml
new file mode 100644
index 00000000..aaeac874
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_storage_profile.yml
@@ -0,0 +1,64 @@
+---
+# Example Playbook: cisco.ucs.ucs_storage_profile
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure Storage Profile
+ cisco.ucs.ucs_storage_profile:
+ <<: *login_info
+ name: DEE-StgProf
+ org_dn: org-root/org-level1
+ local_luns:
+ - name: Boot-LUN
+ size: '60'
+ disk_policy_name: DEE-DG
+ - name: Data-LUN
+ size: '200'
+ disk_policy_name: DEE-DG
+
+ - name: Remove Local LUN from Storage Profile
+ cisco.ucs.ucs_storage_profile:
+ <<: *login_info
+ name: DEE-StgProf
+ org_dn: org-root/org-level1
+ local_luns:
+ - name: Data-LUN
+ state: absent
+
+ - name: Remove Storage Profile
+ cisco.ucs.ucs_storage_profile:
+ <<: *login_info
+ name: DEE-StgProf
+ org_dn: org-root/org-level1
+ state: absent
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_system_qos.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_system_qos.yml
new file mode 100644
index 00000000..2dbfb61f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_system_qos.yml
@@ -0,0 +1,71 @@
+---
+# Example Playbook: cisco.ucs.ucs_system_qos
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Check QoS System Class
+ cisco.ucs.ucs_system_qos:
+ <<: *login_info
+ priority: platinum
+ cos: '5'
+ weight: '10'
+ delegate_to: localhost
+ check_mode: true
+
+ - name: Add QoS System Class
+ cisco.ucs.ucs_system_qos:
+ <<: *login_info
+ priority: platinum
+ cos: '5'
+ weight: '10'
+ delegate_to: localhost
+
+ - name: Idempotent Add QoS System Class
+ cisco.ucs.ucs_system_qos:
+ <<: *login_info
+ priority: platinum
+ cos: '5'
+ weight: '10'
+ delegate_to: localhost
+
+ - name: Check Update QoS System Class
+ cisco.ucs.ucs_system_qos:
+ <<: *login_info
+ priority: platinum
+ cos: '5'
+ weight: '10'
+ mtu: '9216'
+ delegate_to: localhost
+ check_mode: true
+
+ - name: Update QoS System Class
+ cisco.ucs.ucs_system_qos:
+ <<: *login_info
+ priority: platinum
+ cos: '5'
+ weight: '10'
+ mtu: '9216'
+ delegate_to: localhost
+
+ - name: Idempotent Update QoS System Class
+ cisco.ucs.ucs_system_qos:
+ <<: *login_info
+ priority: platinum
+ cos: '5'
+ weight: '10'
+ mtu: '9216'
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_timezone.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_timezone.yml
new file mode 100644
index 00000000..15a5c3b6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_timezone.yml
@@ -0,0 +1,31 @@
+---
+# Example Playbook: cisco.ucs.ucs_timezone
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Configure Time Zone
+ cisco.ucs.ucs_timezone:
+ <<: *login_info
+ state: present
+ admin_state: enabled
+ timezone: America/Phoenix
+
+ - name: Unconfigure Time Zone
+ cisco.ucs.ucs_timezone:
+ <<: *login_info
+ state: absent
+ admin_state: disabled \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_uuid_pool.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_uuid_pool.yml
new file mode 100644
index 00000000..a0b3798a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_uuid_pool.yml
@@ -0,0 +1,51 @@
+---
+# Example Playbook: cisco.ucs.ucs_uuid_pool
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure UUID address pool
+ cisco.ucs.ucs_uuid_pool:
+ <<: *login_info
+ name: UUID-Pool
+ org_dn: org-root/org-level1
+ order: sequential
+ first_uuid: 0000-000000000001
+ last_uuid: 0000-000000000078
+
+ - name: Remove UUID address pool
+ cisco.ucs.ucs_uuid_pool:
+ <<: *login_info
+ name: UUID-Pool
+ org_dn: org-root/org-level1
+ state: absent
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vhba_template.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vhba_template.yml
new file mode 100644
index 00000000..e830147c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vhba_template.yml
@@ -0,0 +1,51 @@
+---
+# Example Playbook: cisco.ucs.ucs_vhba_template
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure vHBA template
+ cisco.ucs.ucs_vhba_template:
+ <<: *login_info
+ name: vHBA-A
+ org_dn: org-root/org-level1
+ fabric: A
+ vsan: VSAN-A
+ wwpn_pool: WWPN-Pool-A
+
+ - name: Remote vHBA template
+ cisco.ucs.ucs_vhba_template:
+ <<: *login_info
+ name: vHBA-A
+ org_dn: org-root/org-level1
+ state: absent
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vlan_find.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vlan_find.yml
new file mode 100644
index 00000000..b2568b19
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vlan_find.yml
@@ -0,0 +1,39 @@
+---
+# Example Playbook: cisco.ucs.ucs_vlan_find
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Get all vlans in fabric A
+ cisco.ucs.ucs_vlan_find:
+ <<: *login_info
+ fabric: 'common'
+ pattern: '.'
+ register: response
+
+ - name: show response
+ debug:
+ msg: "{{ response }}"
+
+ - name: Confirm if vlan 15 is present
+ cisco.ucs.ucs_vlan_find:
+ <<: *login_info
+ vlanid: '200'
+ register: response
+
+ - name: show response
+ debug:
+ msg: "{{ response }}"
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vlan_to_group.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vlan_to_group.yml
new file mode 100644
index 00000000..4470b075
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vlan_to_group.yml
@@ -0,0 +1,25 @@
+---
+# Example Playbook: cisco.ucs.ucs_vlan_to_group
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add VLAN to existing VLAN group
+ cisco.ucs.ucs_vlan_to_group:
+ <<: *login_info
+ vlangroup: inband
+ vlanname: vlan244
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vlans.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vlans.yml
new file mode 100644
index 00000000..d7796ac2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vlans.yml
@@ -0,0 +1,31 @@
+---
+# Example Playbook: cisco.ucs.ucs_vlans
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Configure VLAN
+ cisco.ucs.ucs_vlans:
+ <<: *login_info
+ name: vlan300
+ id: '300'
+ native: 'no'
+
+ - name: Remove VLAN
+ cisco.ucs.ucs_vlans:
+ <<: *login_info
+ name: vlan300
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vnic_template.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vnic_template.yml
new file mode 100644
index 00000000..ff98822d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vnic_template.yml
@@ -0,0 +1,98 @@
+---
+# Example Playbook: cisco.ucs.ucs_vnic_template
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure vNIC template
+ cisco.ucs.ucs_vnic_template:
+ <<: *login_info
+ name: vNIC-A
+ org_dn: org-root/org-level1
+ fabric: A
+ vlans_list:
+ - name: default
+ native: 'yes'
+ - name: vlan200
+ native: 'no'
+
+ - name: Remove VLAN from template
+ cisco.ucs.ucs_vnic_template:
+ <<: *login_info
+ name: vNIC-A
+ org_dn: org-root/org-level1
+ fabric: A
+ vlans_list:
+ - name: vlan200
+ state: absent
+
+ - name: Configure vNIC template for failover
+ cisco.ucs.ucs_vnic_template:
+ <<: *login_info
+ name: vNIC-A-B
+ org_dn: org-root/org-level1
+ fabric: A-B
+ redundancy_type: primary
+ vlans_list:
+ - name: default
+ native: 'yes'
+ - name: vlan200
+ native: 'no'
+
+ - name: Configure vNIC template for failover
+ cisco.ucs.ucs_vnic_template:
+ <<: *login_info
+ name: vNIC-B-A
+ org_dn: org-root/org-level1
+ fabric: B-A
+ redundancy_type: secondary
+ vlans_list:
+ - name: default
+ native: 'yes'
+ - name: vlan200
+ native: 'no'
+
+
+ - name: Remove vNIC template
+ cisco.ucs.ucs_vnic_template:
+ <<: *login_info
+ name: vNIC-A-B
+ org_dn: org-root/org-level1
+# state: absent
+
+ - name: Remove vNIC template
+ cisco.ucs.ucs_vnic_template:
+ <<: *login_info
+ name: vNIC-B-A
+ org_dn: org-root/org-level1
+# state: absent
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+# state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vsans.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vsans.yml
new file mode 100644
index 00000000..5868690f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_vsans.yml
@@ -0,0 +1,32 @@
+---
+# Example Playbook: cisco.ucs.ucs_vsans
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Configure VSAN
+ cisco.ucs.ucs_vsans:
+ <<: *login_info
+ name: vsan110
+ fabric: common
+ vsan_id: '110'
+ vlan_id: '110'
+
+ - name: Remove VSAN
+ cisco.ucs.ucs_vsans:
+ <<: *login_info
+ name: vsan110
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_wwn_pool.yml b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_wwn_pool.yml
new file mode 100644
index 00000000..17ccb62d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/playbooks/ucs_wwn_pool.yml
@@ -0,0 +1,85 @@
+---
+# Example Playbook: cisco.ucs.ucs_wwn_pool
+- hosts: ucs
+ connection: local
+ gather_facts: false
+
+ tasks:
+ - name: Test that we have a UCS hostname, UCS username, and UCS password
+ fail:
+ msg: 'Please define the following variables: ucs_hostname, ucs_username and ucs_password.'
+ when: ucs_hostname is not defined or ucs_username is not defined or ucs_password is not defined
+ vars:
+ # use "<<: *login_info" to substite the information below in each task
+ # this is not required, however it makes the playbook shorter.
+ login_info: &login_info
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+
+ - name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+ - name: Configure WWNN pool
+ cisco.ucs.ucs_wwn_pool:
+ <<: *login_info
+ name: WWNN-Pool
+ org_dn: org-root/org-level1
+ purpose: node
+ first_addr: 20:00:00:25:B5:48:00:00
+ last_addr: 20:00:00:25:B5:48:00:0F
+
+ - name: Configure WWPN A pool
+ cisco.ucs.ucs_wwn_pool:
+ <<: *login_info
+ name: WWPN-Pool-A
+ org_dn: org-root/org-level1
+ purpose: port
+ order: sequential
+ first_addr: 20:00:00:25:B5:48:0A:00
+ last_addr: 20:00:00:25:B5:48:0A:0F
+
+ - name: Configure WWPN Bpool
+ cisco.ucs.ucs_wwn_pool:
+ <<: *login_info
+ name: WWPN-Pool-B
+ org_dn: org-root/org-level1
+ purpose: port
+ order: sequential
+ first_addr: 20:00:00:25:B5:48:0B:00
+ last_addr: 20:00:00:25:B5:48:0B:0F
+
+ - name: Remove WWNN pool
+ cisco.ucs.ucs_wwn_pool:
+ <<: *login_info
+ org_dn: org-root/org-level1
+ name: WWNN-Pool
+ state: absent
+
+ - name: Remove WWPN pool
+ cisco.ucs.ucs_wwn_pool:
+ <<: *login_info
+ name: WWPN-Pool-A
+ org_dn: org-root/org-level1
+ state: absent
+
+ - name: Remove WWPN pool
+ cisco.ucs.ucs_wwn_pool:
+ <<: *login_info
+ name: WWPN-Pool-B
+ org_dn: org-root/org-level1
+ state: absent
+
+ - name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ <<: *login_info
+ org_name: level1
+ parent_org_path: root
+ state: absent
+ delegate_to: localhost
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/README.md b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/README.md
new file mode 100644
index 00000000..6541cf7c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/README.md
@@ -0,0 +1,31 @@
+# Collections Plugins Directory
+
+This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that
+is named after the type of plugin it is in. It can also include the `module_utils` and `modules` directory that
+would contain module utils and modules respectively.
+
+Here is an example directory of the majority of plugins currently supported by Ansible:
+
+```
+└── plugins
+ ├── action
+ ├── become
+ ├── cache
+ ├── callback
+ ├── cliconf
+ ├── connection
+ ├── filter
+ ├── httpapi
+ ├── inventory
+ ├── lookup
+ ├── module_utils
+ ├── modules
+ ├── netconf
+ ├── shell
+ ├── strategy
+ ├── terminal
+ ├── test
+ └── vars
+```
+
+A full list of plugin types can be found at [Working With Plugins](https://docs.ansible.com/ansible/2.9/plugins/plugins.html). \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/doc_fragments/ucs.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/doc_fragments/ucs.py
new file mode 100644
index 00000000..5e03a772
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/doc_fragments/ucs.py
@@ -0,0 +1,72 @@
+# -*- coding: utf-8 -*-
+
+# This code is part of Ansible, but is an independent component.
+# This particular file snippet, and this file snippet only, is BSD licensed.
+# Modules you write using this snippet, which is embedded dynamically by Ansible
+# still belong to the author of the module, and may assign their own license
+# to the complete work.
+#
+# (c) 2016 Red Hat Inc.
+# (c) 2017 Cisco Systems Inc.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+
+class ModuleDocFragment(object):
+ # Cisco UCS doc fragment
+ DOCUMENTATION = '''
+options:
+ hostname:
+ description:
+ - IP address or hostname of Cisco UCS Manager.
+ - Modules can be used with the UCS Platform Emulator U(https://cs.co/ucspe)
+ type: str
+ required: yes
+ username:
+ description:
+ - Username for Cisco UCS Manager authentication.
+ type: str
+ default: admin
+ password:
+ description:
+ - Password for Cisco UCS Manager authentication.
+ type: str
+ required: yes
+ port:
+ description:
+ - Port number to be used during connection (by default uses 443 for https and 80 for http connection).
+ type: int
+ use_ssl:
+ description:
+ - If C(no), an HTTP connection will be used instead of the default HTTPS connection.
+ type: bool
+ default: yes
+ use_proxy:
+ description:
+ - If C(no), will not use the proxy as defined by system environment variable.
+ type: bool
+ default: yes
+ proxy:
+ description:
+ - If use_proxy is no, specfies proxy to be used for connection.
+ e.g. 'http://proxy.xy.z:8080'
+ type: str
+'''
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/module_utils/ucs.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/module_utils/ucs.py
new file mode 100644
index 00000000..bbb0a407
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/module_utils/ucs.py
@@ -0,0 +1,97 @@
+# This code is part of Ansible, but is an independent component.
+# This particular file snippet, and this file snippet only, is BSD licensed.
+# Modules you write using this snippet, which is embedded dynamically by Ansible
+# still belong to the author of the module, and may assign their own license
+# to the complete work.
+#
+# (c) 2016 Red Hat Inc.
+# (c) 2019 Cisco Systems Inc.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+import traceback
+
+from ansible.module_utils.basic import missing_required_lib
+
+UCSMSDK_IMP_ERR = None
+try:
+ import ucsmsdk
+ HAS_UCSMSDK = True
+except Exception:
+ UCSMSDK_IMP_ERR = traceback.format_exc()
+ HAS_UCSMSDK = False
+
+ucs_argument_spec = dict(
+ hostname=dict(type='str', required=True),
+ username=dict(type='str', default='admin'),
+ password=dict(type='str', required=True, no_log=True),
+ port=dict(type='int', default=None),
+ use_ssl=dict(type='bool', default=True),
+ use_proxy=dict(type='bool', default=True),
+ proxy=dict(type='str', default=None),
+)
+
+
+class UCSModule():
+
+ def __init__(self, module):
+ self.module = module
+ self.result = {}
+ if not HAS_UCSMSDK:
+ self.module.fail_json(msg=missing_required_lib('ucsmsdk'), exception=UCSMSDK_IMP_ERR)
+ self.login()
+
+ def __del__(self):
+ self.logout()
+
+ def login(self):
+ from ucsmsdk.ucshandle import UcsHandle
+
+ # use_proxy=yes (default) and proxy=None (default) should be using the system defined proxy
+ # use_proxy=yes (default) and proxy=value should use the provided proxy
+ # use_proxy=no (user) should not be using a proxy
+ if self.module.params['use_proxy']:
+ proxy = self.module.params['proxy']
+ else:
+ # force no proxy to be used. Note that proxy=None in UcsHandle will
+ # use the system proxy so we must set to something else
+ proxy = {}
+
+ try:
+ handle = UcsHandle(
+ ip=self.module.params['hostname'],
+ username=self.module.params['username'],
+ password=self.module.params['password'],
+ port=self.module.params['port'],
+ secure=self.module.params['use_ssl'],
+ proxy=proxy
+ )
+ handle.login()
+ except Exception as e:
+ self.result['msg'] = str(e)
+ self.module.fail_json(**self.result)
+ self.login_handle = handle
+
+ def logout(self):
+ if hasattr(self, 'login_handle'):
+ self.login_handle.logout()
+ return True
+ return False
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_disk_group_policy.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_disk_group_policy.py
new file mode 100644
index 00000000..86d7eaca
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_disk_group_policy.py
@@ -0,0 +1,428 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_disk_group_policy
+short_description: Configures disk group policies on Cisco UCS Manager
+description:
+- Configures disk group policies on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - Desired state of the disk group policy.
+ - If C(present), will verify that the disk group policy is present and will create if needed.
+ - If C(absent), will verify that the disk group policy is absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name of the disk group policy.
+ - This name can be between 1 and 16 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after the policy is created.
+ required: yes
+ description:
+ description:
+ - The user-defined description of the storage profile.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ raid_level:
+ description:
+ - "The RAID level for the disk group policy. This can be one of the following:"
+ - "stripe - UCS Manager shows RAID 0 Striped"
+ - "mirror - RAID 1 Mirrored"
+ - "mirror-stripe - RAID 10 Mirrored and Striped"
+ - "stripe-parity - RAID 5 Striped Parity"
+ - "stripe-dual-parity - RAID 6 Striped Dual Parity"
+ - "stripe-parity-stripe - RAID 50 Striped Parity and Striped"
+ - "stripe-dual-parity-stripe - RAID 60 Striped Dual Parity and Striped"
+ choices: [stripe, mirror, mirror-stripe, stripe-parity, stripe-dual-parity, stripe-parity-stripe, stripe-dual-parity-stripe]
+ default: stripe
+ configuration_mode:
+ description:
+ - "Disk group configuration mode. Choose one of the following:"
+ - "automatic - Automatically configures the disks in the disk group."
+ - "manual - Enables you to manually configure the disks in the disk group."
+ choices: [automatic, manual]
+ default: automatic
+ num_drives:
+ description:
+ - Specify the number of drives for the disk group.
+ - This can be from 0 to 24.
+ - Option only applies when configuration mode is automatic.
+ default: 1
+ drive_type:
+ description:
+ - Specify the drive type to use in the drive group.
+ - "This can be one of the following:"
+ - "unspecified — Selects the first available drive type, and applies that to all drives in the group."
+ - "HDD — Hard disk drive"
+ - "SSD — Solid state drive"
+ - Option only applies when configuration mode is automatic.
+ choices: [unspecified, HDD, SSD]
+ default: unspecified
+ num_ded_hot_spares:
+ description:
+ - Specify the number of hot spares for the disk group.
+ - This can be from 0 to 24.
+ - Option only applies when configuration mode is automatic.
+ default: unspecified
+ num_glob_hot_spares:
+ description:
+ - Specify the number of global hot spares for the disk group.
+ - This can be from 0 to 24.
+ - Option only applies when configuration mode is automatic.
+ default: unspecified
+ min_drive_size:
+ description:
+ - Specify the minimum drive size or unspecified to allow all drive sizes.
+ - This can be from 0 to 10240 GB.
+ - Option only applies when configuration mode is automatic.
+ default: 'unspecified'
+ use_remaining_disks:
+ description:
+ - Specifies whether you can use all the remaining disks in the disk group or not.
+ - Option only applies when configuration mode is automatic.
+ choices: ['yes', 'no']
+ default: 'no'
+ manual_disks:
+ description:
+ - List of manually configured disks.
+ - Options are only used when you choose manual configuration_mode.
+ suboptions:
+ name:
+ description:
+ - The name of the local LUN.
+ required: yes
+ slot_num:
+ description:
+ - The slot number of the specific disk.
+ role:
+ description:
+ - "The role of the disk. This can be one of the following:"
+ - "normal - Normal"
+ - "ded-hot-spare - Dedicated Hot Spare"
+ - "glob-hot-spare - Glob Hot Spare"
+ span_id:
+ description:
+ - The Span ID of the specific disk.
+ default: 'unspecified'
+ state:
+ description:
+ - If C(present), will verify disk slot is configured within policy.
+ If C(absent), will verify disk slot is absent from policy.
+ choices: [ present, absent ]
+ default: present
+ virtual_drive:
+ description:
+ - Configuration of virtual drive options.
+ suboptions:
+ access_policy:
+ description:
+ - Configure access policy to virtual drive.
+ choices: [blocked, hidden, platform-default, read-only, read-write, transport-ready]
+ default: platform-default
+ drive_cache:
+ description:
+ - Configure drive caching.
+ choices: [disable, enable, no-change, platform-default]
+ default: platform-default
+ io_policy:
+ description:
+ - Direct or Cached IO path.
+ choices: [cached, direct, platform-default]
+ default: platform-default
+ read_policy:
+ description:
+ - Read access policy to virtual drive.
+ choices: [normal, platform-default, read-ahead]
+ default: platform-default
+ strip_size:
+ description:
+ - Virtual drive strip size.
+ choices: [ present, absent ]
+ default: platform-default
+ write_cache_policy:
+ description:
+ - Write back cache policy.
+ choices: [always-write-back, platform-default, write-back-good-bbu, write-through]
+ default: platform-default
+ org_dn:
+ description:
+ - The distinguished name (dn) of the organization where the resource is assigned.
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+- Sindhu Sudhir (@sisudhir)
+- David Soper (@dsoper2)
+- CiscoUcs (@CiscoUcs)
+- Brett Johnson (@sdbrett)
+- John McDonough (@movinalot)
+version_added: '2.8'
+'''
+
+EXAMPLES = r'''
+- name: Configure Disk Group Policy
+ cisco.ucs.ucs_disk_group_policy:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: DEE-DG
+ raid_level: mirror
+ configuration_mode: manual
+ manual_disks:
+ - slot_num: '1'
+ role: normal
+ - slot_num: '2'
+ role: normal
+
+- name: Remove Disk Group Policy
+ cisco.ucs.ucs_disk_group_policy:
+ name: DEE-DG
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ state: absent
+
+- name: Remove Disk from Policy
+ cisco.ucs.ucs_disk_group_policy:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: DEE-DG
+ description: Testing Ansible
+ raid_level: stripe
+ configuration_mode: manual
+ manual_disks:
+ - slot_num: '1'
+ role: normal
+ - slot_num: '2'
+ role: normal
+ state: absent
+ virtual_drive:
+ access_policy: platform-default
+ io_policy: direct
+ strip_size: 64KB
+'''
+
+RETURN = r'''
+#
+'''
+
+from ucsmsdk.mometa.lstorage.LstorageDiskGroupConfigPolicy import LstorageDiskGroupConfigPolicy
+from ucsmsdk.mometa.lstorage.LstorageDiskGroupQualifier import LstorageDiskGroupQualifier
+from ucsmsdk.mometa.lstorage.LstorageLocalDiskConfigRef import LstorageLocalDiskConfigRef
+from ucsmsdk.mometa.lstorage.LstorageVirtualDriveDef import LstorageVirtualDriveDef
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def configure_disk_policy(ucs, module, dn):
+ # from ucsmsdk.mometa.lstorage.LstorageDiskGroupConfigPolicy import LstorageDiskGroupConfigPolicy
+ # from ucsmsdk.mometa.lstorage.LstorageDiskGroupQualifier import LstorageDiskGroupQualifier
+ # from ucsmsdk.mometa.lstorage.LstorageLocalDiskConfigRef import LstorageLocalDiskConfigRef
+
+ if not module.check_mode:
+ try:
+ # create if mo does not already exist
+ mo = LstorageDiskGroupConfigPolicy(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=module.params['name'],
+ descr=module.params['description'],
+ raid_level=module.params['raid_level'],
+ )
+ if module.params['configuration_mode'] == 'automatic':
+ LstorageDiskGroupQualifier(
+ parent_mo_or_dn=mo,
+ num_drives=module.params['num_drives'],
+ drive_type=module.params['drive_type'],
+ use_remaining_disks=module.params['use_remaining_disks'],
+ num_ded_hot_spares=module.params['num_ded_hot_spares'],
+ num_glob_hot_spares=module.params['num_glob_hot_spares'],
+ min_drive_size=module.params['min_drive_size'],
+ )
+ else: # configuration_mode == 'manual'
+ for disk in module.params['manual_disks']:
+ if disk['state'] == 'absent':
+ child_dn = dn + '/slot-' + disk['slot_num']
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ ucs.login_handle.remove_mo(mo_1)
+ else: # state == 'present'
+ LstorageLocalDiskConfigRef(
+ parent_mo_or_dn=mo,
+ slot_num=disk['slot_num'],
+ role=disk['role'],
+ span_id=disk['span_id'],
+ )
+
+ if module.params['virtual_drive']:
+ _configure_virtual_drive(module, mo)
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ except Exception as e: # generic Exception handling because SDK can throw a variety
+ ucs.result['msg'] = "setup error: %s " % str(e)
+ module.fail_json(**ucs.result)
+
+ ucs.result['changed'] = True
+
+
+def check_disk_policy_props(ucs, module, mo, dn):
+ props_match = True
+
+ # check top-level mo props
+ kwargs = dict(descr=module.params['description'])
+ kwargs['raid_level'] = module.params['raid_level']
+ if mo.check_prop_match(**kwargs):
+ # top-level props match, check next level mo/props
+ if module.params['configuration_mode'] == 'automatic':
+ child_dn = dn + '/disk-group-qual'
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ kwargs = dict(num_drives=module.params['num_drives'])
+ kwargs['drive_type'] = module.params['drive_type']
+ kwargs['use_remaining_disks'] = module.params['use_remaining_disks']
+ kwargs['num_ded_hot_spares'] = module.params['num_ded_hot_spares']
+ kwargs['num_glob_hot_spares'] = module.params['num_glob_hot_spares']
+ kwargs['min_drive_size'] = module.params['min_drive_size']
+ props_match = mo_1.check_prop_match(**kwargs)
+
+ else: # configuration_mode == 'manual'
+ for disk in module.params['manual_disks']:
+ child_dn = dn + '/slot-' + disk['slot_num']
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ if disk['state'] == 'absent':
+ props_match = False
+ else: # state == 'present'
+ kwargs = dict(slot_num=disk['slot_num'])
+ kwargs['role'] = disk['role']
+ kwargs['span_id'] = disk['span_id']
+ if not mo_1.check_prop_match(**kwargs):
+ props_match = False
+ break
+ if props_match:
+ if module.params['virtual_drive']:
+ props_match = check_virtual_drive_props(ucs, module, dn)
+ else:
+ props_match = False
+ return props_match
+
+
+def check_virtual_drive_props(ucs, module, dn):
+ child_dn = dn + '/virtual-drive-def'
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ return mo_1.check_prop_match(**module.params['virtual_drive'])
+
+
+def _configure_virtual_drive(module, mo):
+ # from ucsmsdk.mometa.lstorage.LstorageVirtualDriveDef import LstorageVirtualDriveDef
+ LstorageVirtualDriveDef(parent_mo_or_dn=mo, **module.params['virtual_drive'])
+
+
+def _virtual_drive_argument_spec():
+ return dict(
+ access_policy=dict(type='str', default='platform-default',
+ choices=["blocked", "hidden", "platform-default", "read-only", "read-write",
+ "transport-ready"]),
+ drive_cache=dict(type='str', default='platform-default',
+ choices=["disable", "enable", "no-change", "platform-default"]),
+ io_policy=dict(type='str', default='platform-default',
+ choices=["cached", "direct", "platform-default"]),
+ read_policy=dict(type='str', default='platform-default',
+ choices=["normal", "platform-default", "read-ahead"]),
+ strip_size=dict(type='str', default='platform-default',
+ choices=["1024KB", "128KB", "16KB", "256KB", "32KB", "512KB", "64KB", "8KB",
+ "platform-default"]),
+ write_cache_policy=dict(type='str', default='platform-default',
+ choices=["always-write-back", "platform-default", "write-back-good-bbu",
+ "write-through"]),
+ )
+
+
+def main():
+ manual_disk = dict(
+ slot_num=dict(type='str', required=True),
+ role=dict(type='str', default='normal', choices=['normal', 'ded-hot-spare', 'glob-hot-spare']),
+ span_id=dict(type='str', default='unspecified'),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(type='str', required=True),
+ description=dict(type='str', aliases=['descr'], default=''),
+ raid_level=dict(
+ type='str',
+ default='stripe',
+ choices=[
+ 'stripe',
+ 'mirror',
+ 'mirror-stripe',
+ 'stripe-parity',
+ 'stripe-dual-parity',
+ 'stripe-parity-stripe',
+ 'stripe-dual-parity-stripe',
+ ],
+ ),
+ num_drives=dict(type='str', default='1'),
+ configuration_mode=dict(type='str', default='automatic', choices=['automatic', 'manual']),
+ num_ded_hot_spares=dict(type='str', default='unspecified'),
+ num_glob_hot_spares=dict(type='str', default='unspecified'),
+ drive_type=dict(type='str', default='unspecified', choices=['unspecified', 'HDD', 'SSD']),
+ use_remaining_disks=dict(type='str', default='no', choices=['yes', 'no']),
+ min_drive_size=dict(type='str', default='unspecified'),
+ manual_disks=dict(type='list', elements='dict', options=manual_disk),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ virtual_drive=dict(type='dict', options=_virtual_drive_argument_spec()),
+ )
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+ ucs = UCSModule(module)
+ # UCSModule creation above verifies ucsmsdk is present and exits on failure.
+ # Additional imports are done below or in called functions.
+
+ ucs.result['changed'] = False
+ props_match = False
+ # dn is <org_dn>/disk-group-config-<name>
+ dn = module.params['org_dn'] + '/disk-group-config-' + module.params['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ if module.params['state'] == 'absent':
+ # mo must exist but all properties do not have to match
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ ucs.result['changed'] = True
+ else: # state == 'present'
+ props_match = check_disk_policy_props(ucs, module, mo, dn)
+
+ if module.params['state'] == 'present' and not props_match:
+ configure_disk_policy(ucs, module, dn)
+
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_dns_server.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_dns_server.py
new file mode 100644
index 00000000..5271cacc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_dns_server.py
@@ -0,0 +1,165 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_dns_server
+short_description: Configure DNS servers on Cisco UCS Manager
+description:
+- Configure DNS servers on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(absent), will remove a DNS server.
+ - If C(present), will add or update a DNS server.
+ choices: [absent, present]
+ default: present
+ type: str
+
+ dns_server:
+ description:
+ - DNS server IP address.
+ - Enter a valid IPV4 Address.
+ - UCS Manager supports up to 4 DNS Servers
+ aliases: [ name ]
+ type: str
+
+ description:
+ description:
+ - A user-defined description of the DNS server.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ type: str
+
+ delegate_to:
+ description:
+ - Where the module will be run
+ default: localhost
+ type: str
+
+requirements:
+- ucsmsdk
+
+author:
+- David Soper (@dsoper2)
+- John McDonough (@movinalot)
+- CiscoUcs (@CiscoUcs)
+
+version_added: "2.8"
+'''
+
+EXAMPLES = r'''
+- name: Configure DNS server
+ cisco.ucs.ucs_dns_server:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ dns_server: 10.10.10.10
+ description: DNS Server IP address
+ state: present
+ delegate_to: localhost
+
+- name: Remove DNS server
+ cisco.ucs.ucs_dns_server:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ dns_server: 10.10.10.10
+ state: absent
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+#
+'''
+from ucsmsdk.mometa.comm.CommDnsProvider import CommDnsProvider
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def run_module():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ dns_server=dict(type='str', aliases=['name']),
+ description=dict(type='str', aliases=['descr'], default=''),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ delegate_to=dict(type='str', default='localhost'),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['dns_server']],
+ ],
+ )
+ # UCSModule verifies ucsmsdk is present and exits on failure.
+ # Imports are below for UCS object creation.
+ ucs = UCSModule(module)
+ # from ucsmsdk.mometa.comm.CommDnsProvider import CommDnsProvider
+
+ err = False
+ changed = False
+
+ try:
+ mo_exists = False
+ props_match = False
+
+ dn = 'sys/svc-ext/dns-svc/dns-' + module.params['dns_server']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+
+ if module.params['state'] == 'absent':
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(descr=module.params['description'])
+ if mo.check_prop_match(**kwargs):
+ props_match = True
+
+ if not props_match:
+ if not module.check_mode:
+ # update/add mo
+ mo = CommDnsProvider(parent_mo_or_dn='sys/svc-ext/dns-svc',
+ name=module.params['dns_server'],
+ descr=module.params['description'])
+ ucs.login_handle.add_mo(mo, modify_present=True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+def main():
+ run_module()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_graphics_card_policy.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_graphics_card_policy.py
new file mode 100644
index 00000000..ccc8c583
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_graphics_card_policy.py
@@ -0,0 +1,261 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_graphics_card_policy
+
+short_description: Manages UCS Graphics Card Policies on UCS Manager
+
+description:
+ - Manages UCS Graphics Card Policies on UCS Manager.
+
+extends_documentation_fragment: cisco.ucs.ucs
+
+options:
+ state:
+ description:
+ - If C(absent), will remove organization.
+ - If C(present), will create or update organization.
+ choices: [absent, present]
+ default: present
+ type: str
+
+ name:
+ description:
+ - The name of the organization.
+ - Enter up to 16 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote)"
+ - "= (equal sign), > (greater than), < (less than), ' (single quote)."
+ required: true
+ type: str
+
+ description:
+ description:
+ - A user-defined description of the organization.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote)"
+ - "= (equal sign), > (greater than), < (less than), ' (single quote)."
+ aliases: [ descr ]
+ type: str
+
+ graphics_card_mode:
+ description:
+ - Set the Graphics Card Mode.
+ choices: [any-configuration, compute, graphics]
+ type: str
+
+ org_dn:
+ description:
+ - Org dn (distinguished name)
+ default: org-root
+ type: str
+
+requirements:
+- ucsmsdk
+
+author:
+- John McDonough (@movinalot)
+version_added: "2.9"
+'''
+
+EXAMPLES = r'''
+- name: Add UCS Graphics Card Policy
+ cisco.ucs.ucs_graphics_card_policy:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: present
+ description: Any Graphics Mode Policy
+ name: any_graphics
+ graphics_card_mode: any-configuration
+ delegate_to: localhost
+
+- name: Add UCS Graphics Card Policy in an Organization
+ cisco.ucs.ucs_graphics_card_policy:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: present
+ org_dn: org-root/org-prod
+ description: Any Graphics Mode Policy
+ name: prod_graphics
+ graphics_card_mode: any-configuration
+ delegate_to: localhost
+
+- name: Update UCS Graphics Card Policy in an Organization
+ cisco.ucs.ucs_graphics_card_policy:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: present
+ org_dn: org-root/org-prod
+ description: Graphics Mode Policy
+ name: prod_graphics
+ graphics_card_mode: graphics
+ delegate_to: localhost
+
+- name: Update UCS Graphics Card Policy in an Organization
+ cisco.ucs.ucs_graphics_card_policy:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: present
+ org_dn: org-root/org-prod
+ description: Compute Mode Policy
+ name: prod_graphics
+ graphics_card_mode: compute
+ delegate_to: localhost
+
+- name: Delete UCS Graphics Card Policy in an Organization
+ cisco.ucs.ucs_graphics_card_policy:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: absent
+ org_dn: org-root/org-prod
+ name: prod_graphics
+ delegate_to: localhost
+
+- name: Delete UCS Graphics Card Policy
+ cisco.ucs.ucs_graphics_card_policy:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: absent
+ name: any_graphics
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import (
+ UCSModule,
+ ucs_argument_spec
+)
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(required=True, type='str'),
+ descr=dict(type='str'),
+ description=dict(type='str', aliases=['descr']),
+ graphics_card_mode=dict(type='str', choices=[
+ 'any-configuration',
+ 'compute',
+ 'graphics'
+ ]),
+ state=dict(
+ type='str', default='present',
+ choices=['present', 'absent']
+ ),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['name']],
+ ],
+ )
+
+ # UCSModule verifies ucsmsdk is present and exits on failure.
+ # Imports are below for UCS object creation.
+ ucs = UCSModule(module)
+ from importlib import import_module
+ from ucsmsdk.ucscoreutils import get_meta_info
+
+ # The Class(es) this module is managing
+ module_file = 'ucsmsdk.mometa.compute.ComputeGraphicsCardPolicy'
+ module_class = 'ComputeGraphicsCardPolicy'
+ mo_module = import_module(module_file)
+ mo_class = getattr(mo_module, module_class)
+
+ META = get_meta_info(class_id=module_class)
+
+ err = False
+ changed = False
+ requested_state = module.params['state']
+
+ kwargs = dict()
+
+ # Manage Aliased Attributes
+ for attribute in ['descr:description']:
+ attribute_alias = attribute.split(':')
+ if module.params[attribute_alias[1]] is not None:
+ kwargs[attribute_alias[0]] = module.params[attribute_alias[1]]
+
+ # Manage Attributes
+ for attribute in [
+ 'graphics_card_mode', 'descr']:
+ if module.params[attribute] is not None:
+ kwargs[attribute] = module.params[attribute]
+
+ try:
+ dn = (
+ module.params['org_dn'] + '/' +
+ META.rn[0:META.rn.rindex('-') + 1] +
+ module.params['name']
+ )
+ mo = ucs.login_handle.query_dn(dn)
+
+ # Determine state change
+ if mo:
+ # Object exists, if it should exist has anything changed?
+ if requested_state == 'present':
+ # Do some or all Object properties not match, that is a change
+
+ if not mo.check_prop_match(**kwargs):
+ changed = True
+
+ # Object does not exist but should, that is a change
+ else:
+ if requested_state == 'present':
+ changed = True
+
+ # Object exists but should not, that is a change
+ if mo and requested_state == 'absent':
+ changed = True
+
+ # Apply state if not check_mode
+ if changed and not module.check_mode:
+ if requested_state == 'absent':
+ ucs.login_handle.remove_mo(mo)
+ else:
+ kwargs['parent_mo_or_dn'] = module.params['org_dn']
+ kwargs['name'] = module.params['name']
+
+ mo = mo_class(**kwargs)
+ ucs.login_handle.add_mo(mo, modify_present=True)
+ ucs.login_handle.commit()
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_ip_pool.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_ip_pool.py
new file mode 100644
index 00000000..308ffd4b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_ip_pool.py
@@ -0,0 +1,452 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_ip_pool
+short_description: Configures IP address pools on Cisco UCS Manager
+description:
+- Configures IP address pools and blocks of IP addresses on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify IP pool is present and will create if needed.
+ - If C(absent), will verify IP pool is absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name of the IP address pool.
+ - This name can be between 1 and 32 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after the IP address pool is created.
+ required: yes
+ description:
+ description:
+ - The user-defined description of the IP address pool.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ order:
+ description:
+ - The Assignment Order field.
+ - "This can be one of the following:"
+ - "default - Cisco UCS Manager selects a random identity from the pool."
+ - "sequential - Cisco UCS Manager selects the lowest available identity from the pool."
+ choices: [default, sequential]
+ default: default
+ ip_blocks:
+ description:
+ - List of IPv4 blocks used by the IP Pool.
+ suboptions:
+ first_addr:
+ description:
+ - The first IPv4 address in the IPv4 addresses block.
+ - This is the From field in the UCS Manager Add IPv4 Blocks menu.
+ last_addr:
+ description:
+ - The last IPv4 address in the IPv4 addresses block.
+ - This is the To field in the UCS Manager Add IPv4 Blocks menu.
+ subnet_mask:
+ description:
+ - The subnet mask associated with the IPv4 addresses in the block.
+ default: 255.255.255.0
+ default_gw:
+ description:
+ - The default gateway associated with the IPv4 addresses in the block.
+ default: 0.0.0.0
+ primary_dns:
+ description:
+ - The primary DNS server that this block of IPv4 addresses should access.
+ default: 0.0.0.0
+ secondary_dns:
+ description:
+ - The secondary DNS server that this block of IPv4 addresses should access.
+ default: 0.0.0.0
+ ipv6_blocks:
+ description:
+ - List of IPv6 blocks used by the IP Pool.
+ suboptions:
+ ipv6_first_addr:
+ description:
+ - The first IPv6 address in the IPv6 addresses block.
+ - This is the From field in the UCS Manager Add IPv6 Blocks menu.
+ ipv6_last_addr:
+ description:
+ - The last IPv6 address in the IPv6 addresses block.
+ - This is the To field in the UCS Manager Add IPv6 Blocks menu.
+ ipv6_prefix:
+ description:
+ - The network address prefix associated with the IPv6 addresses in the block.
+ default: '64'
+ ipv6_default_gw:
+ description:
+ - The default gateway associated with the IPv6 addresses in the block.
+ default: '::'
+ ipv6_primary_dns:
+ description:
+ - The primary DNS server that this block of IPv6 addresses should access.
+ default: '::'
+ ipv6_secondary_dns:
+ description:
+ - The secondary DNS server that this block of IPv6 addresses should access.
+ default: '::'
+ org_dn:
+ description:
+ - Org dn (distinguished name)
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+ - Brett Johnson (@sdbrett)
+ - David Soper (@dsoper2)
+ - John McDonough (@movinalot)
+ - CiscoUcs (@CiscoUcs)
+version_added: '2.5'
+'''
+
+EXAMPLES = r'''
+- name: Configure IPv4 and IPv6 address pool
+ cisco.ucs.ucs_ip_pool:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ name: ip-pool-01
+ org_dn: org-root/org-level1
+ ipv4_blocks:
+ - first_addr: 192.168.10.1
+ last_addr: 192.168.10.20
+ subnet_mask: 255.255.255.128
+ default_gw: 192.168.10.2
+ - first_addr: 192.168.11.1
+ last_addr: 192.168.11.20
+ subnet_mask: 255.255.255.128
+ default_gw: 192.168.11.2
+ ipv6_blocks:
+ - ipv6_first_addr: fe80::1cae:7992:d7a1:ed07
+ ipv6_last_addr: fe80::1cae:7992:d7a1:edfe
+ ipv6_default_gw: fe80::1cae:7992:d7a1:ecff
+ - ipv6_first_addr: fe80::1cae:7992:d7a1:ec07
+ ipv6_last_addr: fe80::1cae:7992:d7a1:ecfe
+ ipv6_default_gw: fe80::1cae:7992:d7a1:ecff
+
+- name: Delete IPv4 and IPv6 address pool blocks
+ cisco.ucs.ucs_ip_pool:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ name: ip-pool-01
+ org_dn: org-root/org-level1
+ ipv4_blocks:
+ - first_addr: 192.168.10.1
+ last_addr: 192.168.10.20
+ state: absent
+ ipv6_blocks:
+ - ipv6_first_addr: fe80::1cae:7992:d7a1:ec07
+ ipv6_last_addr: fe80::1cae:7992:d7a1:ecfe
+ state: absent
+
+- name: Remove IPv4 and IPv6 address pool
+ cisco.ucs.ucs_ip_pool:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ name: ip-pool-01
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+
+def update_ip_pool(ucs, module):
+ from ucsmsdk.mometa.ippool.IppoolPool import IppoolPool
+
+ mo = IppoolPool(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=module.params['name'],
+ descr=module.params['descr'],
+ assignment_order=module.params['order'],
+ )
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+
+ return mo
+
+
+def match_existing_ipv4_block(ucs, dn, ipv4_block):
+ # ipv4 block specified, check properties
+ mo_1 = get_ip_block(ucs, dn, ipv4_block['first_addr'], ipv4_block['last_addr'], 'v4')
+ if not mo_1:
+ if ipv4_block['state'] == 'absent':
+ return True
+ return False
+ else:
+ if ipv4_block['state'] == 'absent':
+ return False
+ kwargs = dict(subnet=ipv4_block['subnet_mask'])
+ kwargs['def_gw'] = ipv4_block['default_gw']
+ kwargs['prim_dns'] = ipv4_block['primary_dns']
+ kwargs['sec_dns'] = ipv4_block['secondary_dns']
+ return mo_1.check_prop_match(**kwargs)
+
+
+def match_existing_ipv6_block(ucs, dn, ipv6_block):
+ # ipv6 block specified, check properties
+ mo_1 = get_ip_block(ucs, dn, ipv6_block['ipv6_first_addr'], ipv6_block['ipv6_last_addr'], 'v6')
+ if not mo_1:
+ if ipv6_block['state'] == 'absent':
+ return True
+ return False
+ else:
+ if ipv6_block['state'] == 'absent':
+ return False
+ kwargs = dict(prefix=ipv6_block['ipv6_prefix'])
+ kwargs['def_gw'] = ipv6_block['ipv6_default_gw']
+ kwargs['prim_dns'] = ipv6_block['ipv6_primary_dns']
+ kwargs['sec_dns'] = ipv6_block['ipv6_secondary_dns']
+ return mo_1.check_prop_match(**kwargs)
+
+
+def remove_ip_block(ucs, dn, ip_block, ip_version):
+ if ip_version == 'v6':
+ first_addr = ip_block['ipv6_first_addr']
+ last_addr = ip_block['ipv6_last_addr']
+ else:
+ first_addr = ip_block['first_addr']
+ last_addr = ip_block['last_addr']
+
+ mo_1 = get_ip_block(ucs, dn, first_addr, last_addr, ip_version)
+ if mo_1:
+ ucs.login_handle.remove_mo(mo_1)
+ ucs.login_handle.commit()
+
+
+def update_ip_block(ucs, mo, ip_block, ip_version):
+
+ remove_ip_block(ucs, mo.dn, ip_block, ip_version)
+ if not ip_block['state'] == 'absent':
+ if ip_version == 'v6':
+ from ucsmsdk.mometa.ippool.IppoolIpV6Block import IppoolIpV6Block
+ IppoolIpV6Block(
+ parent_mo_or_dn=mo,
+ to=ip_block['ipv6_last_addr'],
+ r_from=ip_block['ipv6_first_addr'],
+ prefix=ip_block['ipv6_prefix'],
+ def_gw=ip_block['ipv6_default_gw'],
+ prim_dns=ip_block['ipv6_primary_dns'],
+ sec_dns=ip_block['ipv6_secondary_dns']
+ )
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ else:
+ from ucsmsdk.mometa.ippool.IppoolBlock import IppoolBlock
+ IppoolBlock(
+ parent_mo_or_dn=mo,
+ to=ip_block['last_addr'],
+ r_from=ip_block['first_addr'],
+ subnet=ip_block['subnet_mask'],
+ def_gw=ip_block['default_gw'],
+ prim_dns=ip_block['primary_dns'],
+ sec_dns=ip_block['secondary_dns']
+ )
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+
+
+def get_ip_block(ucs, pool_dn, first_addr, last_addr, ip_version):
+ if ip_version == 'v6':
+ dn_type = '/v6block-'
+ else:
+ dn_type = '/block-'
+
+ block_dn = pool_dn + dn_type + first_addr + '-' + last_addr
+ return ucs.login_handle.query_dn(block_dn)
+
+
+def main():
+ from ansible.module_utils.basic import AnsibleModule
+ from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+ ipv4_configuration_spec = dict(
+ first_addr=dict(type='str'),
+ last_addr=dict(type='str'),
+ subnet_mask=dict(type='str', default='255.255.255.0'),
+ default_gw=dict(type='str', default='0.0.0.0'),
+ primary_dns=dict(type='str', default='0.0.0.0'),
+ secondary_dns=dict(type='str', default='0.0.0.0'),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+ ipv6_configuration_spec = dict(
+ ipv6_first_addr=dict(type='str'),
+ ipv6_last_addr=dict(type='str'),
+ ipv6_prefix=dict(type='str', default='64'),
+ ipv6_default_gw=dict(type='str', default='::'),
+ ipv6_primary_dns=dict(type='str', default='::'),
+ ipv6_secondary_dns=dict(type='str', default='::'),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(type='str', required=True),
+ descr=dict(type='str', default='', aliases=['description']),
+ order=dict(type='str', default='default', choices=['default', 'sequential']),
+ first_addr=dict(type='str'),
+ last_addr=dict(type='str'),
+ subnet_mask=dict(type='str', default='255.255.255.0'),
+ default_gw=dict(type='str', default='0.0.0.0'),
+ primary_dns=dict(type='str', default='0.0.0.0'),
+ secondary_dns=dict(type='str', default='0.0.0.0'),
+ ipv6_first_addr=dict(type='str'),
+ ipv6_last_addr=dict(type='str'),
+ ipv6_prefix=dict(type='str', default='64'),
+ ipv6_default_gw=dict(type='str', default='::'),
+ ipv6_primary_dns=dict(type='str', default='::'),
+ ipv6_secondary_dns=dict(type='str', default='::'),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ ipv4_blocks=dict(type='list', default=None, elements='dict', options=ipv4_configuration_spec),
+ ipv6_blocks=dict(type='list', default=None, elements='dict', options=ipv6_configuration_spec),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+ # UCSModule verifies ucsmsdk is present and exits on failure. Imports are below ucs object creation.
+ ucs = UCSModule(module)
+
+ err = False
+
+ from ucsmsdk.mometa.ippool.IppoolBlock import IppoolBlock
+ from ucsmsdk.mometa.ippool.IppoolIpV6Block import IppoolIpV6Block
+
+ changed = False
+ try:
+ mo_exists = False
+ ipv4_props_match = True
+ ipv6_props_match = True
+ # dn is <org_dn>/ip-pool-<name>
+ dn = module.params['org_dn'] + '/ip-pool-' + module.params['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+ if module.params['state'] == 'absent':
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ if not mo_exists:
+ if not module.check_mode:
+ mo = update_ip_pool(ucs, module)
+ changed = True
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(assignment_order=module.params['order'])
+ kwargs['descr'] = module.params['descr']
+ if not mo.check_prop_match(**kwargs):
+ if not module.check_mode:
+ mo = update_ip_pool(ucs, module)
+ changed = True
+ # top-level props match, check next level mo/props
+ if module.params['ipv4_blocks']:
+ for ipv4_block in module.params['ipv4_blocks']:
+ if not match_existing_ipv4_block(ucs, dn, ipv4_block):
+ if not module.check_mode:
+ update_ip_block(ucs, mo, ipv4_block, 'v4')
+ changed = True
+ elif module.params['last_addr'] and module.params['first_addr']:
+ # ipv4 block specified, check properties
+ mo_1 = get_ip_block(ucs, dn, module.params['first_addr'], module.params['last_addr'], 'v4')
+ if mo_1:
+ kwargs = dict(subnet=module.params['subnet_mask'])
+ kwargs['def_gw'] = module.params['default_gw']
+ kwargs['prim_dns'] = module.params['primary_dns']
+ kwargs['sec_dns'] = module.params['secondary_dns']
+ if not mo_1.check_prop_match(**kwargs):
+ # ipv4 block exists and properties match
+ ipv4_props_match = False
+ else:
+ ipv4_props_match = False
+
+ # only check ipv6 props if the top-level and ipv4 props matched
+ if module.params['ipv6_blocks']:
+ for ipv6_block in module.params['ipv6_blocks']:
+ if not match_existing_ipv6_block(ucs, dn, ipv6_block):
+ if not module.check_mode:
+ update_ip_block(ucs, mo, ipv6_block, 'v6')
+ changed = True
+ elif module.params['ipv6_last_addr'] and module.params['ipv6_first_addr']:
+ # ipv6 block specified, check properties
+ block_dn = dn + '/v6block-' + module.params['ipv6_first_addr'].lower() + '-' + module.params[
+ 'ipv6_last_addr'].lower()
+ mo_1 = ucs.login_handle.query_dn(block_dn)
+ if mo_1:
+ kwargs = dict(prefix=module.params['ipv6_prefix'])
+ kwargs['def_gw'] = module.params['ipv6_default_gw']
+ kwargs['prim_dns'] = module.params['ipv6_primary_dns']
+ kwargs['sec_dns'] = module.params['ipv6_secondary_dns']
+ if not mo_1.check_prop_match(**kwargs):
+ # ipv6 block exists and properties match
+ ipv6_props_match = False
+ else:
+ ipv6_props_match = False
+
+ if not ipv4_props_match or not ipv6_props_match:
+ if not module.check_mode:
+ if module.params['last_addr'] and module.params['first_addr']:
+ IppoolBlock(
+ parent_mo_or_dn=mo,
+ to=module.params['last_addr'],
+ r_from=module.params['first_addr'],
+ subnet=module.params['subnet_mask'],
+ def_gw=module.params['default_gw'],
+ prim_dns=module.params['primary_dns'],
+ sec_dns=module.params['secondary_dns'],
+ )
+
+ if module.params['ipv6_last_addr'] and module.params['ipv6_first_addr']:
+ IppoolIpV6Block(
+ parent_mo_or_dn=mo,
+ to=module.params['ipv6_last_addr'],
+ r_from=module.params['ipv6_first_addr'],
+ prefix=module.params['ipv6_prefix'],
+ def_gw=module.params['ipv6_default_gw'],
+ prim_dns=module.params['ipv6_primary_dns'],
+ sec_dns=module.params['ipv6_secondary_dns'],
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_lan_connectivity.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_lan_connectivity.py
new file mode 100644
index 00000000..7638091f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_lan_connectivity.py
@@ -0,0 +1,355 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_lan_connectivity
+short_description: Configures LAN Connectivity Policies on Cisco UCS Manager
+description:
+- Configures LAN Connectivity Policies on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify LAN Connectivity Policies are present and will create if needed.
+ - If C(absent), will verify LAN Connectivity Policies are absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name of the LAN Connectivity Policy.
+ - This name can be between 1 and 16 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after the policy is created.
+ required: yes
+ description:
+ description:
+ - A description of the LAN Connectivity Policy.
+ - Cisco recommends including information about where and when to use the policy.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ vnic_list:
+ description:
+ - List of vNICs used by the LAN Connectivity Policy.
+ - vNICs used by the LAN Connectivity Policy must be created from a vNIC template.
+ suboptions:
+ name:
+ description:
+ - The name of the vNIC.
+ required: yes
+ vnic_template:
+ description:
+ - The name of the vNIC template.
+ required: yes
+ adapter_policy:
+ description:
+ - The name of the Ethernet adapter policy.
+ - A user defined policy can be used, or one of the system defined policies.
+ order:
+ description:
+ - String specifying the vNIC assignment order (e.g., '1', '2').
+ default: 'unspecified'
+ state:
+ description:
+ - If C(present), will verify vnic is configured within policy.
+ If C(absent), will verify vnic is absent from policy.
+ choices: [ present, absent ]
+ default: present
+ version_added: '2.8'
+ iscsi_vnic_list:
+ description:
+ - List of iSCSI vNICs used by the LAN Connectivity Policy.
+ suboptions:
+ name:
+ description:
+ - The name of the iSCSI vNIC.
+ required: yes
+ overlay_vnic:
+ description:
+ - The LAN vNIC associated with this iSCSI vNIC.
+ iscsi_adapter_policy:
+ description:
+ - The iSCSI adapter policy associated with this iSCSI vNIC.
+ mac_address:
+ description:
+ - The MAC address associated with this iSCSI vNIC.
+ - If the MAC address is not set, Cisco UCS Manager uses a derived MAC address.
+ default: derived
+ vlan_name:
+ description:
+ - The VLAN used for the iSCSI vNIC.
+ default: default
+ state:
+ description:
+ - If C(present), will verify iscsi vnic is configured within policy.
+ If C(absent), will verify iscsi vnic is absent from policy.
+ choices: [ present, absent ]
+ default: present
+ version_added: '2.8'
+ org_dn:
+ description:
+ - Org dn (distinguished name)
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- John McDonough (@movinalot)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.5'
+'''
+
+EXAMPLES = r'''
+- name: Configure LAN Connectivity Policy
+ cisco.ucs.ucs_lan_connectivity:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: Cntr-FC-Boot
+ vnic_list:
+ - name: eno1
+ vnic_template: Cntr-Template
+ adapter_policy: Linux
+ - name: eno2
+ vnic_template: Container-NFS-A
+ adapter_policy: Linux
+ - name: eno3
+ vnic_template: Container-NFS-B
+ adapter_policy: Linux
+ iscsi_vnic_list:
+ - name: iSCSIa
+ overlay_vnic: eno1
+ iscsi_adapter_policy: default
+ vlan_name: Container-MGMT-VLAN
+ - name: iSCSIb
+ overlay_vnic: eno3
+ iscsi_adapter_policy: default
+ vlan_name: Container-TNT-A-NFS
+
+- name: Remove LAN Connectivity Policy
+ cisco.ucs.ucs_lan_connectivity:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: Cntr-FC-Boot
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def configure_lan_connectivity(ucs, module, dn):
+ from ucsmsdk.mometa.vnic.VnicLanConnPolicy import VnicLanConnPolicy
+ from ucsmsdk.mometa.vnic.VnicEther import VnicEther
+ from ucsmsdk.mometa.vnic.VnicIScsiLCP import VnicIScsiLCP
+ from ucsmsdk.mometa.vnic.VnicVlan import VnicVlan
+
+ if not module.check_mode:
+ try:
+ # create if mo does not already exist
+ mo = VnicLanConnPolicy(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=module.params['name'],
+ descr=module.params['description'],
+ )
+
+ if module.params.get('vnic_list'):
+ for vnic in module.params['vnic_list']:
+ if vnic['state'] == 'absent':
+ child_dn = dn + '/ether-' + vnic['name']
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ ucs.login_handle.remove_mo(mo_1)
+ else: # state == 'present'
+ mo_1 = VnicEther(
+ addr='derived',
+ parent_mo_or_dn=mo,
+ name=vnic['name'],
+ adaptor_profile_name=vnic['adapter_policy'],
+ nw_templ_name=vnic['vnic_template'],
+ order=vnic['order'],
+ )
+
+ if module.params.get('iscsi_vnic_list'):
+ for iscsi_vnic in module.params['iscsi_vnic_list']:
+ if iscsi_vnic['state'] == 'absent':
+ child_dn = dn + '/iscsi-' + iscsi_vnic['name']
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ ucs.login_handle.remove_mo(mo_1)
+ else: # state == 'present'
+ mo_1 = VnicIScsiLCP(
+ parent_mo_or_dn=mo,
+ name=iscsi_vnic['name'],
+ adaptor_profile_name=iscsi_vnic['iscsi_adapter_policy'],
+ vnic_name=iscsi_vnic['overlay_vnic'],
+ addr=iscsi_vnic['mac_address'],
+ )
+ VnicVlan(
+ parent_mo_or_dn=mo_1,
+ vlan_name=iscsi_vnic['vlan_name'],
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ except Exception as e: # generic Exception handling because SDK can throw a variety of exceptions
+ ucs.result['msg'] = "setup error: %s " % str(e)
+ module.fail_json(**ucs.result)
+
+ ucs.result['changed'] = True
+
+
+def check_vnic_props(ucs, module, dn):
+ props_match = True
+
+ if module.params.get('vnic_list'):
+ # check vnicEther props
+ for vnic in module.params['vnic_list']:
+ child_dn = dn + '/ether-' + vnic['name']
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ if vnic['state'] == 'absent':
+ props_match = False
+ break
+ else: # state == 'present'
+ kwargs = dict(adaptor_profile_name=vnic['adapter_policy'])
+ kwargs['order'] = vnic['order']
+ kwargs['nw_templ_name'] = vnic['vnic_template']
+ if not (mo_1.check_prop_match(**kwargs)):
+ props_match = False
+ break
+ else: # mo_1 did not exist
+ if vnic['state'] == 'present':
+ props_match = False
+ break
+
+ return props_match
+
+
+def check_iscsi_vnic_props(ucs, module, dn):
+ props_match = True
+
+ if module.params.get('iscsi_vnic_list'):
+ # check vnicIScsiLCP props
+ for iscsi_vnic in module.params['iscsi_vnic_list']:
+ child_dn = dn + '/iscsi-' + iscsi_vnic['name']
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ if iscsi_vnic['state'] == 'absent':
+ props_match = False
+ break
+ else: # state == 'present'
+ kwargs = dict(vnic_name=iscsi_vnic['overlay_vnic'])
+ kwargs['adaptor_profile_name'] = iscsi_vnic['iscsi_adapter_policy']
+ kwargs['addr'] = iscsi_vnic['mac_address']
+ if (mo_1.check_prop_match(**kwargs)):
+ # check vlan
+ child_dn = child_dn + '/vlan'
+ mo_2 = ucs.login_handle.query_dn(child_dn)
+ if mo_2:
+ kwargs = dict(vlan_name=iscsi_vnic['vlan_name'])
+ if not (mo_2.check_prop_match(**kwargs)):
+ props_match = False
+ break
+ else: # mo_1 props did not match
+ props_match = False
+ break
+ else: # mo_1 did not exist
+ if iscsi_vnic['state'] == 'present':
+ props_match = False
+ break
+
+ return props_match
+
+
+def check_lan_connecivity_props(ucs, module, mo, dn):
+ props_match = False
+
+ # check top-level mo props
+ kwargs = dict(descr=module.params['description'])
+ if (mo.check_prop_match(**kwargs)):
+ # top-level props match, check next level mo/props
+ # check vnic 1st
+ props_match = check_vnic_props(ucs, module, dn)
+
+ if props_match:
+ props_match = check_iscsi_vnic_props(ucs, module, dn)
+
+ return props_match
+
+
+def main():
+ vnic = dict(
+ name=dict(type='str', required=True),
+ vnic_template=dict(type='str', required=True),
+ adapter_policy=dict(type='str', default=''),
+ order=dict(type='str', default='unspecified'),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+ iscsi_vnic = dict(
+ name=dict(type='str', required=True),
+ overlay_vnic=dict(type='str', default=''),
+ iscsi_adapter_policy=dict(type='str', default=''),
+ mac_address=dict(type='str', default='derived'),
+ vlan_name=dict(type='str', default='default'),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(type='str', required=True),
+ description=dict(type='str', aliases=['descr'], default=''),
+ vnic_list=dict(type='list', elements='dict', options=vnic),
+ iscsi_vnic_list=dict(type='list', elements='dict', options=iscsi_vnic),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+ ucs = UCSModule(module)
+ # UCSModule creation above verifies ucsmsdk is present and exits on failure.
+ # Additional imports are done below or in called functions.
+
+ ucs.result['changed'] = False
+ props_match = False
+ # dn is <org_dn>/lan-conn-pol-<name>
+ dn = module.params['org_dn'] + '/lan-conn-pol-' + module.params['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ if module.params['state'] == 'absent':
+ # mo must exist but all properties do not have to match
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ ucs.result['changed'] = True
+ else: # state == 'present'
+ props_match = check_lan_connecivity_props(ucs, module, mo, dn)
+
+ if module.params['state'] == 'present' and not props_match:
+ configure_lan_connectivity(ucs, module, dn)
+
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_mac_pool.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_mac_pool.py
new file mode 100644
index 00000000..35bdbfa5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_mac_pool.py
@@ -0,0 +1,185 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_mac_pool
+short_description: Configures MAC address pools on Cisco UCS Manager
+description:
+- Configures MAC address pools and MAC address blocks on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify MAC pool is present and will create if needed.
+ - If C(absent), will verify MAC pool is absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name of the MAC pool.
+ - This name can be between 1 and 32 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after the MAC pool is created.
+ required: yes
+ description:
+ description:
+ - A description of the MAC pool.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ order:
+ description:
+ - The Assignment Order field.
+ - "This can be one of the following:"
+ - "default - Cisco UCS Manager selects a random identity from the pool."
+ - "sequential - Cisco UCS Manager selects the lowest available identity from the pool."
+ choices: [default, sequential]
+ default: default
+ first_addr:
+ description:
+ - The first MAC address in the block of addresses.
+ - This is the From field in the UCS Manager MAC Blocks menu.
+ last_addr:
+ description:
+ - The last MAC address in the block of addresses.
+ - This is the To field in the UCS Manager Add MAC Blocks menu.
+ org_dn:
+ description:
+ - The distinguished name (dn) of the organization where the resource is assigned.
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.5'
+'''
+
+EXAMPLES = r'''
+- name: Configure MAC address pool
+ cisco.ucs.ucs_mac_pool:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: mac-A
+ first_addr: 00:25:B5:00:66:00
+ last_addr: 00:25:B5:00:67:F3
+ order: sequential
+
+- name: Remove MAC address pool
+ cisco.ucs.ucs_mac_pool:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: mac-A
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(type='str', required=True),
+ descr=dict(type='str', default='', aliases=['description']),
+ order=dict(type='str', default='default', choices=['default', 'sequential']),
+ first_addr=dict(type='str'),
+ last_addr=dict(type='str'),
+ state=dict(default='present', choices=['present', 'absent'], type='str'),
+ )
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+ # UCSModule verifies ucsmsdk is present and exits on failure. Imports are below ucs object creation.
+ ucs = UCSModule(module)
+
+ err = False
+
+ from ucsmsdk.mometa.macpool.MacpoolPool import MacpoolPool
+ from ucsmsdk.mometa.macpool.MacpoolBlock import MacpoolBlock
+
+ changed = False
+ try:
+ mo_exists = False
+ props_match = False
+ # dn is <org_dn>/mac-pool-<name>
+ dn = module.params['org_dn'] + '/mac-pool-' + module.params['name']
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+
+ if module.params['state'] == 'absent':
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(assignment_order=module.params['order'])
+ kwargs['descr'] = module.params['descr']
+ if mo.check_prop_match(**kwargs):
+ # top-level props match, check next level mo/props
+ if module.params['last_addr'] and module.params['first_addr']:
+ # mac address block specified, check properties
+ block_dn = dn + '/block-' + module.params['first_addr'].upper() + '-' + module.params['last_addr'].upper()
+ mo_1 = ucs.login_handle.query_dn(block_dn)
+ if mo_1:
+ props_match = True
+ else:
+ # no MAC address block specified, but top-level props matched
+ props_match = True
+
+ if not props_match:
+ if not module.check_mode:
+ # create if mo does not already exist
+ mo = MacpoolPool(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=module.params['name'],
+ descr=module.params['descr'],
+ assignment_order=module.params['order'],
+ )
+
+ if module.params['last_addr'] and module.params['first_addr']:
+ mo_1 = MacpoolBlock(
+ parent_mo_or_dn=mo,
+ to=module.params['last_addr'],
+ r_from=module.params['first_addr'],
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_managed_objects.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_managed_objects.py
new file mode 100644
index 00000000..7e679e12
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_managed_objects.py
@@ -0,0 +1,256 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_managed_objects
+short_description: Configures Managed Objects on Cisco UCS Manager
+description:
+- Configures Managed Objects on Cisco UCS Manager.
+- The Python SDK module, Python class within the module (UCSM Class), and all properties must be directly specified.
+- More information on the UCSM Python SDK and how to directly configure Managed Objects is available at L(UCSM Python SDK,http://ucsmsdk.readthedocs.io/).
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify that the Managed Objects are present and will create if needed.
+ - If C(absent), will verify that the Managed Objects are absent and will delete if needed.
+ choices: [ absent, present ]
+ default: present
+ objects:
+ description:
+ - List of managed objects to configure. Each managed object has suboptions the specify the Python SDK module, class, and properties to configure.
+ suboptions:
+ module:
+ description:
+ - Name of the Python SDK module implementing the required class.
+ required: yes
+ class_name:
+ description:
+ - Name of the Python class that will be used to configure the Managed Object.
+ required: yes
+ properties:
+ description:
+ - List of properties to configure on the Managed Object. See the UCSM Python SDK for information on properties for each class.
+ required: yes
+ children:
+ description:
+ - Optional list of child objects. Each child has its own module, class, and properties suboptions.
+ - The parent_mo_or_dn property for child objects is automatically set as the list of children is configured.
+ required: yes
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.8'
+'''
+
+EXAMPLES = r'''
+- name: Configure Network Control Policy
+ cisco.ucs.ucs_managed_objects:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ objects:
+ - module: ucsmsdk.mometa.nwctrl.NwctrlDefinition
+ class: NwctrlDefinition
+ properties:
+ parent_mo_or_dn: org-root
+ cdp: enabled
+ descr: ''
+ lldp_receive: enabled
+ lldp_transmit: enabled
+ name: Enable-CDP-LLDP
+
+- name: Remove Network Control Policy
+ cisco.ucs.ucs_managed_objects:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ objects:
+ - module: ucsmsdk.mometa.nwctrl.NwctrlDefinition
+ class: NwctrlDefinition
+ properties:
+ parent_mo_or_dn: org-root
+ name: Enable-CDP-LLDP
+ state: absent
+
+- name: Configure Boot Policy Using JSON objects list with children
+ cisco.ucs.ucs_managed_objects:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ objects:
+ - {
+ "module": "ucsmsdk.mometa.lsboot.LsbootPolicy",
+ "class": "LsbootPolicy",
+ "properties": {
+ "parent_mo_or_dn": "org-root",
+ "name": "Python_SDS",
+ "enforce_vnic_name": "yes",
+ "boot_mode": "legacy",
+ "reboot_on_update": "no"
+ },
+ "children": [
+ {
+ "module": "ucsmsdk.mometa.lsboot.LsbootVirtualMedia",
+ "class": "LsbootVirtualMedia",
+ "properties": {
+ "access": "read-only-local",
+ "lun_id": "0",
+ "order": "2"
+ }
+ },
+ {
+ "module": "ucsmsdk.mometa.lsboot.LsbootStorage",
+ "class": "LsbootStorage",
+ "properties": {
+ "order": "1"
+ },
+ "children": [
+ {
+ "module": "ucsmsdk.mometa.lsboot.LsbootLocalStorage",
+ "class": "LsbootLocalStorage",
+ "properties": {},
+ "children": [
+ {
+ "module": "ucsmsdk.mometa.lsboot.LsbootDefaultLocalImage",
+ "class": "LsbootDefaultLocalImage",
+ "properties": {
+ "order": "1"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+
+- name: Remove Boot Policy Using JSON objects list
+ cisco.ucs.ucs_managed_objects:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ objects:
+ - {
+ "module": "ucsmsdk.mometa.lsboot.LsbootPolicy",
+ "class": "LsbootPolicy",
+ "properties": {
+ "parent_mo_or_dn": "org-root",
+ "name": "Python_SDS"
+ }
+ }
+ state: absent
+
+
+'''
+
+RETURN = r'''
+#
+'''
+
+try:
+ from importlib import import_module
+ HAS_IMPORT_MODULE = True
+except ImportError:
+ HAS_IMPORT_MODULE = False
+
+from copy import deepcopy
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def traverse_objects(module, ucs, managed_object, mo=''):
+ props_match = False
+
+ mo_module = import_module(managed_object['module'])
+ mo_class = getattr(mo_module, managed_object['class'])
+
+ if not managed_object['properties'].get('parent_mo_or_dn'):
+ managed_object['properties']['parent_mo_or_dn'] = mo
+
+ mo = mo_class(**managed_object['properties'])
+
+ existing_mo = ucs.login_handle.query_dn(mo.dn)
+
+ if module.params['state'] == 'absent':
+ # mo must exist, but all properties do not have to match
+ if existing_mo:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(existing_mo)
+ ucs.result['changed'] = True
+ else:
+ if existing_mo:
+ # check mo props
+ kwargs = dict(managed_object['properties'])
+ # remove parent info and passwords because those aren't presented in the actual props
+ kwargs.pop('parent_mo_or_dn', None)
+ kwargs.pop('pwd', None)
+ kwargs.pop('password', None)
+ if existing_mo.check_prop_match(**kwargs):
+ props_match = True
+
+ if not props_match:
+ if not module.check_mode:
+ ucs.login_handle.add_mo(mo, modify_present=True)
+ ucs.result['changed'] = True
+
+ if managed_object.get('children'):
+ for child in managed_object['children']:
+ # explicit deep copy of child object since traverse_objects may modify parent mo information
+ copy_of_child = deepcopy(child)
+ traverse_objects(module, ucs, copy_of_child, mo)
+
+
+def main():
+ object_dict = dict(
+ module=dict(type='str', required=True),
+ class_name=dict(type='str', aliases=['class'], required=True),
+ properties=dict(type='dict', required=True),
+ children=dict(type='list'),
+ )
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ objects=dict(type='list', elements='dict', options=object_dict, required=True),
+ state=dict(type='str', choices=['present', 'absent'], default='present'),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+
+ if not HAS_IMPORT_MODULE:
+ module.fail_json(msg='import_module is required for this module')
+ ucs = UCSModule(module)
+
+ # note that all objects specified in the object list report a single result (including a single changed).
+ ucs.result['changed'] = False
+
+ for managed_object in module.params['objects']:
+ traverse_objects(module, ucs, managed_object)
+ # single commit for object and any children
+ if not module.check_mode and ucs.result['changed']:
+ try:
+ ucs.login_handle.commit()
+ except Exception as e:
+ # generic Exception because UCSM can throw a variety of exceptions
+ ucs.result['msg'] = "setup error: %s " % str(e)
+ module.fail_json(**ucs.result)
+
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_ntp_server.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_ntp_server.py
new file mode 100644
index 00000000..a917ed60
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_ntp_server.py
@@ -0,0 +1,169 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_ntp_server
+short_description: Configures NTP server on Cisco UCS Manager
+extends_documentation_fragment: cisco.ucs.ucs
+description:
+- Configures NTP server on Cisco UCS Manager.
+options:
+ state:
+ description:
+ - If C(absent), will remove an NTP server.
+ - If C(present), will add or update an NTP server.
+ choices: [absent, present]
+ default: present
+
+ ntp_server:
+ description:
+ - NTP server IP address or hostname.
+ - Enter up to 63 characters that form a valid hostname.
+ - Enter a valid IPV4 Address.
+ aliases: [ name ]
+ default: ""
+
+ description:
+ description:
+ - A user-defined description of the NTP server.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ default: ""
+
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- John McDonough (@movinalot)
+- CiscoUcs (@CiscoUcs)
+version_added: "2.7"
+'''
+
+EXAMPLES = r'''
+- name: Configure NTP server
+ cisco.ucs.ucs_ntp_server:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ ntp_server: 10.10.10.10
+ description: Internal NTP Server by IP address
+ state: present
+
+- name: Configure NTP server
+ cisco.ucs.ucs_ntp_server:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ ntp_server: pool.ntp.org
+ description: External NTP Server by hostname
+ state: present
+
+- name: Remove NTP server
+ cisco.ucs.ucs_ntp_server:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ ntp_server: 10.10.10.10
+ state: absent
+
+- name: Remove NTP server
+ cisco.ucs.ucs_ntp_server:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ ntp_server: pool.ntp.org
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def run_module():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ ntp_server=dict(type='str', aliases=['name']),
+ description=dict(type='str', aliases=['descr'], default=''),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['ntp_server']],
+ ],
+ )
+ # UCSModule verifies ucsmsdk is present and exits on failure. Imports are below ucs object creation.
+ ucs = UCSModule(module)
+
+ err = False
+
+ from ucsmsdk.mometa.comm.CommNtpProvider import CommNtpProvider
+
+ changed = False
+ try:
+ mo_exists = False
+ props_match = False
+
+ dn = 'sys/svc-ext/datetime-svc/ntp-' + module.params['ntp_server']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+
+ if module.params['state'] == 'absent':
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(descr=module.params['description'])
+ if mo.check_prop_match(**kwargs):
+ props_match = True
+
+ if not props_match:
+ if not module.check_mode:
+ # update/add mo
+ mo = CommNtpProvider(parent_mo_or_dn='sys/svc-ext/datetime-svc',
+ name=module.params['ntp_server'],
+ descr=module.params['description'])
+ ucs.login_handle.add_mo(mo, modify_present=True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+def main():
+ run_module()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_org.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_org.py
new file mode 100644
index 00000000..51237ca6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_org.py
@@ -0,0 +1,227 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_org
+
+short_description: Manages UCS Organizations for UCS Manager
+
+description:
+ - Manages UCS Organizations for UCS Manager.
+
+extends_documentation_fragment: cisco.ucs.ucs
+
+options:
+ state:
+ description:
+ - If C(absent), will remove organization.
+ - If C(present), will create or update organization.
+ choices: [absent, present]
+ default: present
+ type: str
+
+ org_name:
+ description:
+ - The name of the organization.
+ - Enter up to 16 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ name ]
+ type: str
+
+ parent_org_path:
+ description:
+ - A forward slash / separated hierarchical path from the root organization to the parent of the organization to be added or updated.
+ - UCS Manager supports a hierarchical structure of organizations up to five levels deep not including the root organization.
+ - For example the parent_org_path for an organization named level5 could be root/level1/level2/level3/level4
+ default: root
+ type: str
+
+ description:
+ description:
+ - A user-defined description of the organization.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ type: str
+
+ delegate_to:
+ description:
+ - Where the module will be run
+ default: localhost
+ type: str
+
+requirements:
+- ucsmsdk
+
+author:
+- David Soper (@dsoper2)
+- John McDonough (@movinalot)
+- CiscoUcs (@CiscoUcs)
+version_added: "2.8"
+'''
+
+EXAMPLES = r'''
+- name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ org_name: test
+ description: testing org
+ state: present
+ delegate_to: localhost
+
+- name: Update UCS Organization
+ cisco.ucs.ucs_org:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ org_name: test
+ description: Testing org
+ state: present
+ delegate_to: localhost
+
+- name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ org_name: level1
+ parent_org_path: root
+ description: level1 org
+ state: present
+ delegate_to: localhost
+
+- name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ org_name: level2
+ parent_org_path: root/level1
+ description: level2 org
+ state: present
+
+- name: Add UCS Organization
+ cisco.ucs.ucs_org:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ org_name: level3
+ parent_org_path: root/level1/level2
+ description: level3 org
+ state: present
+
+- name: Remove UCS Organization
+ cisco.ucs.ucs_org:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ org_name: level2
+ parent_org_path: root/level1
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_name=dict(type='str', aliases=['name']),
+ parent_org_path=dict(type='str', default='root'),
+ description=dict(type='str', aliases=['descr']),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ delegate_to=dict(type='str', default='localhost'),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['org_name']],
+ ],
+ )
+
+ # UCSModule verifies ucsmsdk is present and exits on failure.
+ # Imports are below for UCS object creation.
+ ucs = UCSModule(module)
+ from ucsmsdk.mometa.org.OrgOrg import OrgOrg
+
+ err = False
+ changed = False
+ requested_state = module.params['state']
+
+ kwargs = dict()
+
+ if module.params['description'] is not None:
+ kwargs['descr'] = module.params['description']
+
+ try:
+ parent_org_dn = 'org-' + module.params['parent_org_path'].replace('/', '/org-')
+ dn = parent_org_dn + '/org-' + module.params['org_name']
+
+ mo = ucs.login_handle.query_dn(dn)
+
+ # Determine state change
+ if mo:
+ # Object exists, if it should exist has anything changed?
+ if requested_state == 'present':
+ # Do some or all Object properties not match, that is a change
+ if not mo.check_prop_match(**kwargs):
+ changed = True
+
+ # Object does not exist but should, that is a change
+ else:
+ if requested_state == 'present':
+ changed = True
+
+ # Object exists but should not, that is a change
+ if mo and requested_state == 'absent':
+ changed = True
+
+ # Apply state if not check_mode
+ if changed and not module.check_mode:
+ if requested_state == 'absent':
+ ucs.login_handle.remove_mo(mo)
+ else:
+ kwargs['parent_mo_or_dn'] = parent_org_dn
+ kwargs['name'] = module.params['org_name']
+ if module.params['description'] is not None:
+ kwargs['descr'] = module.params['description']
+
+ mo = OrgOrg(**kwargs)
+ ucs.login_handle.add_mo(mo, modify_present=True)
+ ucs.login_handle.commit()
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_query.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_query.py
new file mode 100644
index 00000000..f9a7a1a0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_query.py
@@ -0,0 +1,172 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_query
+
+short_description: Queries UCS Manager objects by class or distinguished name
+
+description:
+ -Queries UCS Manager objects by class or distinguished name.
+
+extends_documentation_fragment: cisco.ucs.ucs
+
+options:
+ class_ids:
+ description:
+ - One or more UCS Manager Class IDs to query.
+ - As a comma separated list
+ type: str
+
+ distinguished_names:
+ description:
+ - One or more UCS Manager Distinguished Names to query.
+ - As a comma separated list
+ type: str
+
+ delegate_to:
+ description:
+ - Where the module will be run
+ default: localhost
+ type: str
+
+requirements:
+ - ucsmsdk
+
+author:
+ - John McDonough (@movinalot)
+ - CiscoUcs (@CiscoUcs)
+version_added: "2.8"
+'''
+
+EXAMPLES = r'''
+- name: Query UCS Class ID
+ cisco.ucs.ucs_query:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ class_ids: computeBlade
+ delegate_to: localhost
+
+- name: Query UCS Class IDs
+ cisco.ucs.ucs_query:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ class_ids: computeBlade, fabricVlan
+ delegate_to: localhost
+
+- name: Query UCS Distinguished Name
+ cisco.ucs.ucs_query:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ distinguished_names: org-root
+ delegate_to: localhost
+
+- name: Query UCS Distinguished Names
+ cisco.ucs.ucs_query:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ distinguished_names: org-root, sys/rack-unit-1, sys/chassis-1/blade-2
+ delegate_to: localhost
+'''
+
+RETURN = '''
+objects:
+ description: results JSON encodded
+ type: dict
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def retrieve_class_id(class_id, ucs):
+ return ucs.login_handle.query_classid(class_id)
+
+
+def retrieve_distinguished_name(distinguished_name, ucs):
+ return ucs.login_handle.query_dn(distinguished_name)
+
+
+def make_mo_dict(ucs_mo):
+ obj_dict = {}
+ for mo_property in ucs_mo.prop_map.values():
+ obj_dict[mo_property] = getattr(ucs_mo, mo_property)
+ return obj_dict
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ class_ids=dict(type='str'),
+ distinguished_names=dict(type='str'),
+ delegate_to=dict(type='str', default='localhost'),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=False,
+ mutually_exclusive=[
+ ['class_ids', 'distinguished_names'],
+ ],
+ )
+
+ # UCSModule verifies ucsmsdk is present and exits on failure.
+ # Imports are below for UCS object creation.
+ ucs = UCSModule(module)
+ err = False
+ query_result = {}
+
+ try:
+ if module.params['class_ids']:
+ class_ids = [
+ x.strip() for x in module.params['class_ids'].split(',')
+ ]
+ for class_id in class_ids:
+ query_result[class_id] = []
+ ucs_mos = retrieve_class_id(class_id, ucs)
+ if ucs_mos:
+ for ucs_mo in ucs_mos:
+ query_result[class_id].append(make_mo_dict(ucs_mo))
+
+ ucs.result['objects'] = query_result
+
+ elif module.params['distinguished_names']:
+ distinguished_names = [
+ x.strip()
+ for x in module.params['distinguished_names'].split(',')
+ ]
+ for distinguished_name in distinguished_names:
+ query_result[distinguished_name] = {}
+ ucs_mo = retrieve_distinguished_name(distinguished_name, ucs)
+
+ if ucs_mo:
+ query_result[distinguished_name] = make_mo_dict(ucs_mo)
+
+ ucs.result['objects'] = query_result
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ if err:
+ module.fail_json(**ucs.result)
+
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_san_connectivity.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_san_connectivity.py
new file mode 100644
index 00000000..7e9c1054
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_san_connectivity.py
@@ -0,0 +1,248 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_san_connectivity
+short_description: Configures SAN Connectivity Policies on Cisco UCS Manager
+description:
+- Configures SAN Connectivity Policies on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify SAN Connectivity Policies are present and will create if needed.
+ - If C(absent), will verify SAN Connectivity Policies are absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name of the SAN Connectivity Policy.
+ - This name can be between 1 and 16 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after the policy is created.
+ required: yes
+ description:
+ description:
+ - A description of the policy.
+ - Cisco recommends including information about where and when to use the policy.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ wwnn_pool:
+ description:
+ - Name of the WWNN pool to use for WWNN assignment.
+ default: default
+ vhba_list:
+ description:
+ - List of vHBAs used by the SAN Connectivity Policy.
+ - vHBAs used by the SAN Connectivity Policy must be created from a vHBA template.
+ - "Each list element has the following suboptions:"
+ - "= name"
+ - " The name of the virtual HBA (required)."
+ - "= vhba_template"
+ - " The name of the virtual HBA template (required)."
+ - "- adapter_policy"
+ - " The name of the Fibre Channel adapter policy."
+ - " A user defined policy can be used, or one of the system defined policies (default, Linux, Solaris, VMware, Windows, WindowsBoot)"
+ - " [Default: default]"
+ - "- order"
+ - " String specifying the vHBA assignment order (e.g., '1', '2')."
+ - " [Default: unspecified]"
+ org_dn:
+ description:
+ - Org dn (distinguished name)
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- John McDonough (@movinalot)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.5'
+'''
+
+EXAMPLES = r'''
+- name: Configure SAN Connectivity Policy
+ cisco.ucs.ucs_san_connectivity:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: Cntr-FC-Boot
+ wwnn_pool: WWNN-Pool
+ vhba_list:
+ - name: Fabric-A
+ vhba_template: vHBA-Template-A
+ adapter_policy: Linux
+ - name: Fabric-B
+ vhba_template: vHBA-Template-B
+ adapter_policy: Linux
+
+- name: Remove SAN Connectivity Policy
+ cisco.ucs.ucs_san_connectivity:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: Cntr-FC-Boot
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(type='str'),
+ descr=dict(type='str'),
+ wwnn_pool=dict(type='str', default='default'),
+ vhba_list=dict(type='list'),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ san_connectivity_list=dict(type='list'),
+ )
+
+ # Note that use of san_connectivity_list is an experimental feature which allows multiple resource updates with a single UCSM connection.
+ # Support for san_connectivity_list may change or be removed once persistent UCS connections are supported.
+ # Either san_connectivity_list or name is required (user can specify either a list or single resource).
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_one_of=[
+ ['san_connectivity_list', 'name'],
+ ],
+ mutually_exclusive=[
+ ['san_connectivity_list', 'name'],
+ ],
+ )
+ ucs = UCSModule(module)
+
+ err = False
+
+ from ucsmsdk.mometa.vnic.VnicSanConnPolicy import VnicSanConnPolicy
+ from ucsmsdk.mometa.vnic.VnicFcNode import VnicFcNode
+ from ucsmsdk.mometa.vnic.VnicFc import VnicFc
+ from ucsmsdk.mometa.vnic.VnicFcIf import VnicFcIf
+
+ changed = False
+ try:
+ # Only documented use is a single resource, but to also support experimental
+ # feature allowing multiple updates all params are converted to a san_connectivity_list below.
+
+ if module.params['san_connectivity_list']:
+ # directly use the list (single resource and list are mutually exclusive
+ san_connectivity_list = module.params['san_connectivity_list']
+ else:
+ # single resource specified, create list from the current params
+ san_connectivity_list = [module.params]
+ for san_connectivity in san_connectivity_list:
+ mo_exists = False
+ props_match = False
+ # set default params. Done here to set values for lists which can't be done in the argument_spec
+ if not san_connectivity.get('descr'):
+ san_connectivity['descr'] = ''
+ if not san_connectivity.get('wwnn_pool'):
+ san_connectivity['wwnn_pool'] = 'default'
+ if san_connectivity.get('vhba_list'):
+ for vhba in san_connectivity['vhba_list']:
+ if not vhba.get('adapter_policy'):
+ vhba['adapter_policy'] = ''
+ if not vhba.get('order'):
+ vhba['order'] = 'unspecified'
+ # dn is <org_dn>/san-conn-pol-<name>
+ dn = module.params['org_dn'] + '/san-conn-pol-' + san_connectivity['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+ # check top-level mo props
+ kwargs = dict(descr=san_connectivity['descr'])
+ if (mo.check_prop_match(**kwargs)):
+ # top-level props match, check next level mo/props
+ # vnicFcNode object
+ child_dn = dn + '/fc-node'
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ kwargs = dict(ident_pool_name=san_connectivity['wwnn_pool'])
+ if (mo_1.check_prop_match(**kwargs)):
+ if not san_connectivity.get('vhba_list'):
+ props_match = True
+ else:
+ # check vnicFc props
+ for vhba in san_connectivity['vhba_list']:
+ child_dn = dn + '/fc-' + vhba['name']
+ mo_2 = ucs.login_handle.query_dn(child_dn)
+ kwargs = {}
+ kwargs['adaptor_profile_name'] = vhba['adapter_policy']
+ kwargs['order'] = vhba['order']
+ kwargs['nw_templ_name'] = vhba['vhba_template']
+ if (mo_2.check_prop_match(**kwargs)):
+ props_match = True
+
+ if module.params['state'] == 'absent':
+ # mo must exist but all properties do not have to match
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ if not props_match:
+ if not module.check_mode:
+ # create if mo does not already exist
+ mo = VnicSanConnPolicy(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=san_connectivity['name'],
+ descr=san_connectivity['descr'],
+ )
+ mo_1 = VnicFcNode(
+ parent_mo_or_dn=mo,
+ ident_pool_name=san_connectivity['wwnn_pool'],
+ addr='pool-derived',
+ )
+ if san_connectivity.get('vhba_list'):
+ for vhba in san_connectivity['vhba_list']:
+ mo_2 = VnicFc(
+ parent_mo_or_dn=mo,
+ name=vhba['name'],
+ adaptor_profile_name=vhba['adapter_policy'],
+ nw_templ_name=vhba['vhba_template'],
+ order=vhba['order'],
+ )
+ mo_2_1 = VnicFcIf(
+ parent_mo_or_dn=mo_2,
+ name='default',
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_scrub_policy.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_scrub_policy.py
new file mode 100644
index 00000000..f6c262e6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_scrub_policy.py
@@ -0,0 +1,320 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_scrub_policy
+
+short_description: Manages UCS Scrub Policies on UCS Manager
+
+description:
+ - Manages UCS Scrub Policies on UCS Manager.
+
+extends_documentation_fragment: cisco.ucs.ucs
+
+options:
+ state:
+ description:
+ - If C(absent), will remove organization.
+ - If C(present), will create or update organization.
+ choices: [absent, present]
+ default: present
+ type: str
+
+ name:
+ description:
+ - The name of the organization.
+ - Enter up to 16 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote)"
+ - "= (equal sign), > (greater than), < (less than), ' (single quote)."
+ required: true
+ type: str
+
+ description:
+ description:
+ - A user-defined description of the organization.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote)"
+ - "= (equal sign), > (greater than), < (less than), ' (single quote)."
+ aliases: [ descr ]
+ type: str
+
+ bios_settings_scrub:
+ description:
+ - Scrub the BIOS settings.
+ - If the field is set to Yes, when a service profile containing this
+ - scrub policy is disassociated from a server, the BIOS settings for
+ - that server are erased and reset to the defaults for that server
+ - type and vendor. If this field is set to No, the BIOS settings are
+ - preserved.
+ - yes scrub the BIOS settings.
+ - no do not scrub the BIOS settings.
+ choices: [yes, no]
+ type: str
+
+ disk_scrub:
+ description:
+ - Scrub the BIOS settings.
+ - If this field is set to Yes, when a service profile containing this
+ - scrub policy is disassociated from a server, all data on the server
+ - local drives is completely erased. If this field is set to No, the
+ - data on the local drives is preserved, including all local storage
+ - configuration.
+ - yes scrub the server disks.
+ - no do not scrub the server disks.
+ choices: [yes, no]
+ type: str
+
+ flex_flash_scrub:
+ description:
+ - Scrub the BIOS settings.
+ - If the field is set to Yes, the HV partition on the SD card is
+ - formatted using the PNUOS formatting utility when the server is
+ - reacknowledged. If this field is set to No, the SD card is preserved.
+ - yes scrub the flex flash.
+ - no do not scrub the flex flash.
+ choices: [yes, no]
+ type: str
+
+ persistent_memory_scrub:
+ description:
+ - Scrub the BIOS settings.
+ - If the field is set to Yes, when a service profile containing this
+ - scrub policy is disassociated from a server, all persistent memory
+ - modules for that server are erased and reset to the defaults for that
+ - server type and vendor. If this field is set to No, the persistent
+ - memory modules are preserved.
+ - yes scrub the persistent memory.
+ - no do not scrub the persistent memory.
+ choices: [yes, no]
+ type: str
+
+ org_dn:
+ description:
+ - Org dn (distinguished name)
+ default: org-root
+ type: str
+
+requirements:
+- ucsmsdk
+
+author:
+- John McDonough (@movinalot)
+version_added: "2.9"
+'''
+
+EXAMPLES = r'''
+- name: Add UCS Scrub Policy
+ cisco.ucs.ucs_scrub_policy:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: present
+ description: Scrub All Policy
+ name: all_scrub
+ bios_settings_scrub: yes
+ disk_scrub: yes
+ flex_flash_scrub: yes
+ persistent_memory_scrub: yes
+ delegate_to: localhost
+
+- name: Add UCS Scrub Policy in an Organization
+ cisco.ucs.ucs_scrub_policy:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: present
+ org_dn: org-root/org-prod
+ name: all_scrub
+ description: Scrub All Policy Org Prod servers
+ bios_settings_scrub: yes
+ disk_scrub: yes
+ flex_flash_scrub: yes
+ persistent_memory_scrub: yes
+ delegate_to: localhost
+
+- name: Update UCS Scrub Policy
+ cisco.ucs.ucs_scrub_policy:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: present
+ org_dn: org-root/org-prod
+ name: BD_scrub
+ description: Scrub BIOS and Disk Policy Org Prod servers
+ bios_settings_scrub: yes
+ disk_scrub: yes
+ flex_flash_scrub: no
+ persistent_memory_scrub: no
+ delegate_to: localhost
+
+- name: Update UCS Scrub Policy
+ cisco.ucs.ucs_scrub_policy:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: present
+ org_dn: org-root/org-prod
+ name: BD_scrub
+ description: Scrub BIOS and Disk Policy Org Prod servers
+ bios_settings_scrub: yes
+ disk_scrub: yes
+ flex_flash_scrub: yes
+ delegate_to: localhost
+
+- name: Delete UCS Scrub Policy
+ cisco.ucs.ucs_scrub_policy:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: absent
+ org_dn: org-root/org-prod
+ name: BD_scrub
+ delegate_to: localhost
+
+- name: Delete UCS Scrub Policy
+ cisco.ucs.ucs_scrub_policy:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: absent
+ name: BD_scrub
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import (
+ UCSModule,
+ ucs_argument_spec
+)
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(required=True, type='str'),
+ descr=dict(type='str'),
+ description=dict(type='str', aliases=['descr']),
+ bios_settings_scrub=dict(type='str', choices=['yes', 'no']),
+ disk_scrub=dict(type='str', choices=['yes', 'no']),
+ flex_flash_scrub=dict(type='str', choices=['yes', 'no']),
+ persistent_memory_scrub=dict(type='str', choices=['yes', 'no']),
+ state=dict(
+ type='str', default='present',
+ choices=['present', 'absent']
+ ),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['name']],
+ ],
+ )
+
+ # UCSModule verifies ucsmsdk is present and exits on failure.
+ # Imports are below for UCS object creation.
+ ucs = UCSModule(module)
+ from importlib import import_module
+ from ucsmsdk.ucscoreutils import get_meta_info
+
+ # The Class(es) this module is managing
+ module_file = 'ucsmsdk.mometa.compute.ComputeScrubPolicy'
+ module_class = 'ComputeScrubPolicy'
+ mo_module = import_module(module_file)
+ mo_class = getattr(mo_module, module_class)
+
+ META = get_meta_info(class_id=module_class)
+
+ err = False
+ changed = False
+ requested_state = module.params['state']
+
+ kwargs = dict()
+
+ # Manage Aliased Attributes
+ for attribute in ['descr:description']:
+ attribute_alias = attribute.split(':')
+ if module.params[attribute_alias[1]] is not None:
+ kwargs[attribute_alias[0]] = module.params[attribute_alias[1]]
+
+ # Manage Attributes
+ for attribute in [
+ 'bios_settings_scrub',
+ 'descr',
+ 'disk_scrub',
+ 'flex_flash_scrub',
+ 'persistent_memory_scrub'
+ ]:
+ if module.params[attribute] is not None:
+ kwargs[attribute] = module.params[attribute]
+
+ try:
+ dn = (
+ module.params['org_dn'] + '/' +
+ META.rn[0:META.rn.index('-') + 1] +
+ module.params['name']
+ )
+ mo = ucs.login_handle.query_dn(dn)
+
+ # Determine state change
+ if mo:
+ # Object exists, if it should exist has anything changed?
+ if requested_state == 'present':
+ # Do some or all Object properties not match, that is a change
+
+ if not mo.check_prop_match(**kwargs):
+ changed = True
+
+ # Object does not exist but should, that is a change
+ else:
+ if requested_state == 'present':
+ changed = True
+
+ # Object exists but should not, that is a change
+ if mo and requested_state == 'absent':
+ changed = True
+
+ # Apply state if not check_mode
+ if changed and not module.check_mode:
+ if requested_state == 'absent':
+ ucs.login_handle.remove_mo(mo)
+ else:
+ kwargs['parent_mo_or_dn'] = module.params['org_dn']
+ kwargs['name'] = module.params['name']
+
+ mo = mo_class(**kwargs)
+ ucs.login_handle.add_mo(mo, modify_present=True)
+ ucs.login_handle.commit()
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_serial_over_lan_policy.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_serial_over_lan_policy.py
new file mode 100644
index 00000000..0dd9ba57
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_serial_over_lan_policy.py
@@ -0,0 +1,271 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_serial_over_lan_policy
+
+short_description: Manages UCS Serial Over Lan Policies on UCS Manager
+
+description:
+ - Manages UCS Serial Over Lan Policies on UCS Manager.
+
+extends_documentation_fragment: cisco.ucs.ucs
+
+options:
+ state:
+ description:
+ - If C(absent), will remove Serial Over Lan Policy.
+ - If C(present), will create or update Serial Over Lan Policy.
+ choices: [absent, present]
+ default: present
+ type: str
+
+ name:
+ description:
+ - The name of the serial over lan policy.
+ - Enter up to 16 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote)"
+ - "= (equal sign), > (greater than), < (less than), ' (single quote)."
+ required: true
+ type: str
+
+ description:
+ description:
+ - A user-defined description of the serial over lan policy.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote)"
+ - "= (equal sign), > (greater than), < (less than), ' (single quote)."
+ aliases: [ descr ]
+ type: str
+
+ admin_state:
+ description:
+ - The administrative state of the serial over lan policy.
+ - disable Serial over LAN access is blocked.
+ - enable Serial over LAN access is permitted.
+ choices: [disable, enable]
+ type: str
+
+ speed:
+ description:
+ - The transmission speed of the serial over lan policy.
+ choices: [9600, 19200, 38400, 57600, 115200]
+ type: str
+
+ org_dn:
+ description:
+ - Org dn (distinguished name) of the serial over lan policy.
+ default: org-root
+ type: str
+
+requirements:
+- ucsmsdk
+
+author:
+- John McDonough (@movinalot)
+version_added: "2.9"
+'''
+
+EXAMPLES = r'''
+- name: Add UCS Serial Over Lan Policy
+ cisco.ucs.ucs_serial_over_lan:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: present
+ name: sol_org_root
+ description: Serial Over Lan for Org root servers
+ admin_state: enable
+ speed: 115200
+ delegate_to: localhost
+
+- name: Add UCS Serial Over Lan Policy in Organization
+ cisco.ucs.ucs_serial_over_lan:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: present
+ org_dn: org-root/org-prod
+ name: sol_org_prod
+ description: Serial Over Lan for Org Prod servers
+ admin_state: enable
+ speed: 115200
+ delegate_to: localhost
+
+- name: Update UCS Serial Over Lan Policy in Organization
+ cisco.ucs.ucs_serial_over_lan:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: present
+ org_dn: org-root/org-prod
+ name: sol_org_prod
+ description: Serial Over Lan for Org Prod servers
+ admin_state: enable
+ speed: 38400
+ delegate_to: localhost
+
+- name: Update UCS Serial Over Lan Policy in Organization
+ cisco.ucs.ucs_serial_over_lan:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: present
+ org_dn: org-root/org-prod
+ name: sol_org_prod
+ descr: Serial Over Lan for Org Prod servers
+ admin_state: enable
+ speed: 57600
+ delegate_to: localhost
+
+- name: Delete UCS Serial Over Lan Policy in Organization
+ cisco.ucs.ucs_serial_over_lan:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: absent
+ org_dn: org-root/org-prod
+ name: sol_org_prod
+ delegate_to: localhost
+
+- name: Delete UCS Serial Over Lan Policy
+ cisco.ucs.ucs_serial_over_lan:
+ hostname: "{{ ucs_hostname }}"
+ username: "{{ ucs_username }}"
+ password: "{{ ucs_password }}"
+ state: absent
+ name: sol_org_root
+ delegate_to: localhost
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import (
+ UCSModule,
+ ucs_argument_spec
+)
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(required=True, type='str'),
+ descr=dict(type='str'),
+ description=dict(type='str', aliases=['descr']),
+ admin_state=dict(type='str', choices=['enable', 'disable']),
+ speed=dict(type='str', choices=[
+ '9600', '19200', '38400', '57600', '115200'
+ ]),
+ state=dict(
+ type='str', default='present',
+ choices=['present', 'absent']
+ ),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['name']],
+ ],
+ )
+
+ # UCSModule verifies ucsmsdk is present and exits on failure.
+ # Imports are below for UCS object creation.
+ ucs = UCSModule(module)
+ from importlib import import_module
+ from ucsmsdk.ucscoreutils import get_meta_info
+
+ # The Class(es) this module is managing
+ module_file = 'ucsmsdk.mometa.sol.SolPolicy'
+ module_class = 'SolPolicy'
+ mo_module = import_module(module_file)
+ mo_class = getattr(mo_module, module_class)
+
+ META = get_meta_info(class_id=module_class)
+
+ err = False
+ changed = False
+ requested_state = module.params['state']
+
+ kwargs = dict()
+
+ # Manage Aliased Attributes
+ for attribute in ['descr:description']:
+ attribute_alias = attribute.split(':')
+ if module.params[attribute_alias[1]] is not None:
+ kwargs[attribute_alias[0]] = module.params[attribute_alias[1]]
+
+ # Manage Attributes
+ for attribute in ['admin_state', 'descr', 'speed']:
+ if module.params[attribute] is not None:
+ kwargs[attribute] = module.params[attribute]
+
+ try:
+ dn = (
+ module.params['org_dn'] + '/' +
+ META.rn[0:META.rn.index('-') + 1] +
+ module.params['name']
+ )
+ mo = ucs.login_handle.query_dn(dn)
+
+ # Determine state change
+ if mo:
+ # Object exists, if it should exist has anything changed?
+ if requested_state == 'present':
+ # Do some or all Object properties not match, that is a change
+
+ if not mo.check_prop_match(**kwargs):
+ changed = True
+
+ # Object does not exist but should, that is a change
+ else:
+ if requested_state == 'present':
+ changed = True
+
+ # Object exists but should not, that is a change
+ if mo and requested_state == 'absent':
+ changed = True
+
+ # Apply state if not check_mode
+ if changed and not module.check_mode:
+ if requested_state == 'absent':
+ ucs.login_handle.remove_mo(mo)
+ else:
+ kwargs['parent_mo_or_dn'] = module.params['org_dn']
+ kwargs['name'] = module.params['name']
+
+ mo = mo_class(**kwargs)
+ ucs.login_handle.add_mo(mo, modify_present=True)
+ ucs.login_handle.commit()
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_server_maintenance.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_server_maintenance.py
new file mode 100644
index 00000000..a8aca943
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_server_maintenance.py
@@ -0,0 +1,158 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_server_maintenance
+short_description: Creates Server Maintenance Policy on Cisco UCS Manager
+version_added: 2.10
+description:
+- Configures Server Maintenance Policy on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify Server Maintenance Policy is present and will create if needed.
+ - If C(absent), will verify Server Maintenance Policy is absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name assigned to the Server Maintenance Policy.
+ - The Server Maintenance Policy name is case sensitive.
+ - This name can be between 1 and 16 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after the Server Maintenance Policy is created.
+ required: yes
+ description:
+ description:
+ - A description of the Server Maintenance Package Policy.
+ - Cisco recommends including information about where and when to use the policy.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ trigger_config:
+ description:
+ - This option is used in combination with either User Ack (user-ack) or Timer Automatic (timer-automatic).
+ - When the On Next Boot option is enabled, the host OS reboot, shutdown, or server reset also triggers the associated FSM to apply the changes.
+ - Note that de-selecting the On Next Boot option disables the Maintenance Policy on the BMC.
+ choices: [on-next-boot]
+ uptime_disr:
+ description:
+ - When a Server profile is associated with a Server, or when changes are made to a Server profile that is already associated with a Server, you must reboot the Server to complete the process.
+ - The Reboot Policy field determines when the reboot occurs for Server associated with any Server profiles that include this maintenance policy.
+ choices: [immediate, timer-automatic, user-ack]
+ required: true
+requirements:
+- ucsmsdk
+author:
+- Brett Johnson (@brettjohnson008)
+'''
+
+EXAMPLES = r'''
+- name: Add Server Maintenance Policy
+ cisco.ucs.ucs_server_maintenance:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: user-ack
+ uptime_disr: user-ack
+ trigger_config: on-next-boot
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ name=dict(type='str', required=True),
+ description=dict(type='str', default=''),
+ trigger_config=dict(type='str', default='', choices=['on-next-boot']),
+ uptime_disr=dict(type='str', required=True, choices=['immediate', 'timer-automatic', 'user-ack']),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+
+ ucs = UCSModule(module)
+
+ err = False
+
+ # UCSModule creation above verifies ucsmsdk is present and exits on failure, so additional imports are done below.
+ from ucsmsdk.mometa.lsmaint.LsmaintMaintPolicy import LsmaintMaintPolicy
+
+ changed = False
+ try:
+ mo_exists = False
+ props_match = False
+ dn_base = 'org-root'
+ dn = dn_base + '/maint-' + module.params['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+
+ if module.params['state'] == 'absent':
+ # mo must exist but all properties do not have to match
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(name=module.params['name'])
+ kwargs['descr'] = module.params['description']
+ kwargs['trigger_config'] = module.params['trigger_config']
+ kwargs['uptime_disr'] = module.params['uptime_disr']
+ if mo.check_prop_match(**kwargs):
+ props_match = True
+
+ if not props_match:
+ if not module.check_mode:
+ # create if mo does not already exist
+ mo = LsmaintMaintPolicy(
+ parent_mo_or_dn=dn_base,
+ name=module.params['name'],
+ descr=module.params['description'],
+ trigger_config=module.params['trigger_config'],
+ uptime_disr=module.params['uptime_disr'],
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_service_profile_association.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_service_profile_association.py
new file mode 100644
index 00000000..81d9aa4b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_service_profile_association.py
@@ -0,0 +1,252 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_service_profile_association
+short_description: Configures Service Profile Association on Cisco UCS Manager
+description:
+- Configures Service Profile Association (change association or disassociate) on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify service profile association and associate with specified server or server pool if needed.
+ - If C(absent), will verify service profile is not associated and will disassociate if needed. This is the same as specifying Assign Later in the webUI.
+ choices: [present, absent]
+ default: present
+ service_profile_name:
+ description:
+ - The name of the Service Profile being associated or disassociated.
+ required: yes
+ server_assignment:
+ description:
+ - "Specifies how to associate servers with this service profile using the following choices:"
+ - "server - Use to pre-provision a slot or select an existing server. Slot or server is specified by the server_dn option."
+ - "pool - Use to select from a server pool. The server_pool option specifies the name of the server pool to use."
+ - Option is not valid if the service profile is bound to a template.
+ - Optional if the state is absent.
+ choices: [server, pool]
+ required: yes
+ server_dn:
+ description:
+ - The Distinguished Name (dn) of the server object used for pre-provisioning or selecting an existing server.
+ - Required if the server_assignment option is server.
+ - Optional if the state is absent.
+ server_pool_name:
+ description:
+ - Name of the server pool used for server pool based assignment.
+ - Required if the server_assignment option is pool.
+ - Optional if the state is absent.
+ restrict_migration:
+ description:
+ - Restricts the migration of the service profile after it has been associated with a server.
+ - If set to no, Cisco UCS Manager does not perform any compatibility checks on the new server before migrating the existing service profile.
+ - If set to no and the hardware of both servers used in migration are not similar, the association might fail.
+ choices: ['yes', 'no']
+ default: 'no'
+ org_dn:
+ description:
+ - The distinguished name (dn) of the organization where the resource is assigned.
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- CiscoUcs (@CiscoUcs)
+version_added: 2.10
+'''
+
+EXAMPLES = r'''
+- name: Change Service Profile Association to server pool Container-Pool and restrict migration
+ cisco.ucs.ucs_service_profile_association:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ service_profile_name: test-sp
+ server_assignment: pool
+ server_pool_name: Container-Pool
+ restrict_migration: 'yes'
+
+- name: Attempt to change association once a minute for up to 10 minutes
+ cisco.ucs.ucs_service_profile_association:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ service_profile_name: test-sp
+ server_assignment: server
+ server_dn: sys/chassis-2/blade-1
+ register: result
+ until: result.assign_state == 'assigned' and result.assoc_state == 'associated'
+ retries: 10
+ delay: 60
+
+- name: Disassociate Service Profile
+ cisco.ucs.ucs_service_profile_association:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ service_profile_name: test-sp
+ state: absent
+'''
+
+RETURN = r'''
+assign_state:
+ description: The logical server Assigned State (assigned, unassigned, or failed).
+ returned: success
+ type: string
+ sample: assigned
+assoc_state:
+ description: The logical server Association State (associated or unassociated).
+ returned: success
+ type: string
+ sample: associated
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ service_profile_name=dict(type='str', required=True),
+ server_assignment=dict(type='str', choices=['server', 'pool']),
+ server_dn=dict(type='str'),
+ server_pool_name=dict(type='str'),
+ restrict_migration=dict(type='str', default='no', choices=['yes', 'no']),
+ state=dict(default='present', choices=['present', 'absent'], type='str'),
+ )
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['server_assignment']],
+ ['server_assignment', 'server', ['server_dn']],
+ ['server_assignment', 'pool', ['server_pool_name']],
+ ],
+ mutually_exclusive=[
+ ['server_dn', 'server_pool_name'],
+ ],
+ )
+ # UCSModule verifies ucsmsdk is present and exits on failure. Imports are below ucs object creation.
+ ucs = UCSModule(module)
+
+ err = False
+
+ from ucsmsdk.mometa.ls.LsRequirement import LsRequirement
+ from ucsmsdk.mometa.ls.LsBinding import LsBinding
+ from ucsmsdk.mometa.ls.LsServer import LsServer
+
+ changed = False
+ ucs.result['assign_state'] = 'unassigned'
+ ucs.result['assoc_state'] = 'unassociated'
+ try:
+ ls_mo_exists = False
+ pn_mo_exists = False
+ pn_req_mo_exists = False
+ props_match = False
+
+ # logical server distinguished name is <org>/ls-<name> and physical node dn appends 'pn' or 'pn-req'
+ ls_dn = module.params['org_dn'] + '/ls-' + module.params['service_profile_name']
+ ls_mo = ucs.login_handle.query_dn(ls_dn)
+ if ls_mo:
+ ls_mo_exists = True
+ pn_dn = ls_dn + '/pn'
+ pn_mo = ucs.login_handle.query_dn(pn_dn)
+ if pn_mo:
+ pn_mo_exists = True
+
+ pn_req_dn = ls_dn + '/pn-req'
+ pn_req_mo = ucs.login_handle.query_dn(pn_req_dn)
+ if pn_req_mo:
+ pn_req_mo_exists = True
+
+ if module.params['state'] == 'absent':
+ if ls_mo_exists and ls_mo.assign_state != 'unassigned':
+ if pn_mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(pn_mo)
+ ucs.login_handle.commit()
+ changed = True
+ elif pn_req_mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(pn_req_mo)
+ ucs.login_handle.commit()
+ changed = True
+ elif ls_mo_exists:
+ # check if logical server is assigned and associated
+ ucs.result['assign_state'] = ls_mo.assign_state
+ ucs.result['assoc_state'] = ls_mo.assoc_state
+ if module.params['server_assignment'] == 'pool' and pn_req_mo_exists:
+ # check the current pool
+ kwargs = dict(name=module.params['server_pool_name'])
+ kwargs['restrict_migration'] = module.params['restrict_migration']
+ if pn_req_mo.check_prop_match(**kwargs):
+ props_match = True
+ elif pn_mo_exists:
+ kwargs = dict(pn_dn=module.params['server_dn'])
+ kwargs['restrict_migration'] = module.params['restrict_migration']
+ if pn_mo.check_prop_match(**kwargs):
+ props_match = True
+
+ if not props_match:
+ if not module.check_mode:
+ # create if mo does not already exist in desired state
+ mo = LsServer(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=module.params['service_profile_name'],
+ )
+ if module.params['server_assignment'] == 'pool':
+ if pn_mo_exists:
+ ucs.login_handle.remove_mo(pn_mo)
+
+ mo_1 = LsRequirement(
+ parent_mo_or_dn=mo,
+ name=module.params['server_pool_name'],
+ restrict_migration=module.params['restrict_migration'],
+ )
+ else:
+ mo_1 = LsBinding(
+ parent_mo_or_dn=mo,
+ pn_dn=module.params['server_dn'],
+ restrict_migration=module.params['restrict_migration'],
+ )
+ ucs.login_handle.add_mo(mo_1, True)
+ ucs.login_handle.commit()
+
+ pn_req_mo = ucs.login_handle.query_dn(pn_req_dn)
+ if pn_req_mo:
+ # profiles from templates will add a server pool, so remove and add the server again
+ ucs.login_handle.remove_mo(pn_req_mo)
+
+ ucs.login_handle.add_mo(mo_1, True)
+ ucs.login_handle.commit()
+ ls_mo = ucs.login_handle.query_dn(ls_dn)
+ if ls_mo:
+ ucs.result['assign_state'] = ls_mo.assign_state
+ ucs.result['assoc_state'] = ls_mo.assoc_state
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_service_profile_from_template.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_service_profile_from_template.py
new file mode 100644
index 00000000..0c1bc60d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_service_profile_from_template.py
@@ -0,0 +1,177 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_service_profile_from_template
+short_description: Configures Service Profiles from templates on Cisco UCS Manager
+description:
+- Configures Service Profile created from templates on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify Service Profiles are present and will create if needed.
+ - If C(absent), will verify Service Profiles are absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name of the service profile.
+ - This name can be between 2 and 32 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - This name must be unique across all service profiles and service profile templates within the same organization.
+ required: yes
+ source_template:
+ description:
+ - The name of the service profile template used to create this serivce profile.
+ required: yes
+ power_state:
+ description:
+ - The power state to be applied when this service profile is associated with a server.
+ - If no value is provided, the power_state for the service profile will not be modified.
+ choices: [up, down]
+ user_label:
+ description:
+ - The User Label you want to assign to this service profile.
+ org_dn:
+ description:
+ - Org dn (distinguished name)
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.5'
+'''
+
+EXAMPLES = r'''
+- name: Configure Service Profile from Template
+ cisco.ucs.ucs_service_profile_from_template:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: test-sp-instance1
+ source_template: test-sp
+
+- name: Remove Service Profile
+ cisco.ucs.ucs_service_profile_from_template:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: test-sp-instance1
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(type='str', required=True),
+ source_template=dict(type='str', required=True),
+ user_label=dict(type='str', default=''),
+ power_state=dict(type='str', choices=['up', 'down']),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+ ucs = UCSModule(module)
+
+ err = False
+
+ # UCSModule creation above verifies ucsmsdk is present and exits on failure. Additional imports are done below.
+ from ucsmsdk.mometa.ls.LsServer import LsServer
+ from ucsmsdk.mometa.ls.LsPower import LsPower
+
+ changed = False
+ try:
+ mo_exists = False
+ props_match = False
+ dn = module.params['org_dn'] + '/ls-' + module.params['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+
+ if module.params['state'] == 'absent':
+ # mo must exist but all properties do not have to match
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(src_templ_name=module.params['source_template'])
+ kwargs['usr_lbl'] = module.params['user_label']
+ # service profiles are of type 'instance'
+ kwargs['type'] = 'instance'
+
+ if mo.check_prop_match(**kwargs):
+ # top-level props match
+ if module.params.get('power_state'):
+ child_dn = dn + '/power'
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ kwargs = dict(state=module.params['power_state'])
+ if mo_1.check_prop_match(**kwargs):
+ props_match = True
+ else:
+ # no power state provided, use existing state as match
+ props_match = True
+
+ if not props_match:
+ if not module.check_mode:
+ # create if mo does not already exist
+ mo = LsServer(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=module.params['name'],
+ src_templ_name=module.params['source_template'],
+ type='instance',
+ usr_lbl=module.params['user_label'],
+ )
+ if module.params.get('power_state'):
+ admin_state = 'admin-' + module.params['power_state']
+ mo_1 = LsPower(
+ parent_mo_or_dn=mo,
+ state=admin_state,
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_service_profile_template.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_service_profile_template.py
new file mode 100644
index 00000000..0c6f2e71
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_service_profile_template.py
@@ -0,0 +1,523 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_service_profile_template
+short_description: Configures Service Profile Templates on Cisco UCS Manager
+description:
+- Configures Service Profile Templates on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify Service Profile Templates are present and will create if needed.
+ - If C(absent), will verify Service Profile Templates are absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name of the service profile template.
+ - This name can be between 2 and 32 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - This name must be unique across all service profiles and service profile templates within the same organization.
+ required: yes
+ template_type:
+ description:
+ - "The template type field which can be one of the following:"
+ - "initial-template — Any service profiles created from this template are not updated if the template changes."
+ - "updating-template — Any service profiles created from this template are updated if the template changes."
+ choices: [initial-template, updating-template]
+ default: initial-template
+ uuid_pool:
+ description:
+ - Specifies how the UUID will be set on a server associated with a service profile created from this template.
+ - "The uuid_pool option can be the name of the UUID pool to use or '' (the empty string)."
+ - An empty string will use the UUID assigned to the server by the manufacturer, and the
+ - UUID remains unassigned until a service profile created from this template is associated with a server. At that point,
+ - the UUID is set to the UUID value assigned to the server by the manufacturer. If the service profile is later moved to
+ - a different server, the UUID is changed to match the new server."
+ default: default
+ description:
+ description:
+ - A user-defined description of the service profile template.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ storage_profile:
+ description:
+ - The name of the storage profile you want to associate with service profiles created from this template
+ local_disk_policy:
+ description:
+ - The name of the local disk policy you want to associate with service profiles created from this template.
+ lan_connectivity_policy:
+ description:
+ - The name of the LAN connectivity policy you want to associate with service profiles created from this template.
+ iqn_pool:
+ description:
+ - The name of the IQN pool (initiator) you want to apply to all iSCSI vNICs for service profiles created from this template.
+ san_connectivity_policy:
+ description:
+ - The name of the SAN connectivity policy you want to associate with service profiles created from this template.
+ vmedia_policy:
+ description:
+ - The name of the vMedia policy you want to associate with service profiles created from this template.
+ boot_policy:
+ description:
+ - The name of the boot order policy you want to associate with service profiles created from this template.
+ default: default
+ maintenance_policy:
+ description:
+ - The name of the maintenance policy you want to associate with service profiles created from this template.
+ server_pool:
+ description:
+ - The name of the server pool you want to associate with this service profile template.
+ server_pool_qualification:
+ description:
+ - The name of the server pool policy qualificaiton you want to use for this service profile template.
+ power_state:
+ description:
+ - The power state to be applied when a service profile created from this template is associated with a server.
+ choices: [up, down]
+ default: up
+ host_firmware_package:
+ description:
+ - The name of the host firmware package you want to associate with service profiles created from this template.
+ bios_policy:
+ description:
+ - The name of the BIOS policy you want to associate with service profiles created from this template.
+ ipmi_access_profile:
+ description:
+ - The name of the IPMI access profile you want to associate with service profiles created from this template.
+ sol_policy:
+ description:
+ - The name of the Serial over LAN (SoL) policy you want to associate with service profiles created from this template.
+ mgmt_ip_state:
+ description:
+ - The state for the Outband Management IP pool you want to use with service profiles created from this template.
+ choices: [none, pooled]
+ default: pooled
+ mgmt_ip_pool:
+ description:
+ - The name of the Outband Management IP pool you want to use with service profiles created from this template.
+ default: ext-mgmt
+ power_control_policy:
+ description:
+ - The name of the power control policy you want to associate with service profiles created from this template.
+ default: default
+ power_sync_policy:
+ description:
+ - The name of the power sync policy you want to associate with service profiles created from this template.
+ scrub_policy:
+ description:
+ - The name of the scrub policy you want to associate with service profiles created from this template.
+ kvm_mgmt_policy:
+ description:
+ - The name of the KVM management policy you want to associate with service profiles created from this template.
+ graphics_card_policy:
+ description:
+ - The name of the graphics card policy you want to associate with service profiles created from this template.
+ threshold_policy:
+ description:
+ - The name of the threshold policy you want to associate with service profiles created from this template.
+ default: default
+ user_label:
+ description:
+ - The User Label you want to assign to service profiles created from this template.
+ mgmt_interface_mode:
+ description:
+ - The Management Interface you want to assign to service profiles created from this template.
+ choices: ['', in-band]
+ mgmt_vnet_name:
+ description:
+ - A VLAN selected from the associated VLAN group.
+ mgmt_inband_pool_name:
+ description:
+ - How the inband management IPv4 address is derived for the server associated with this service profile.
+ org_dn:
+ description:
+ - Org dn (distinguished name)
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.8'
+'''
+
+EXAMPLES = r'''
+- name: Configure Service Profile Template with LAN/SAN Connectivity and all other options defaulted
+ cisco.ucs.ucs_service_profile_template:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: DEE-Ctrl
+ template_type: updating-template
+ uuid_pool: UUID-Pool
+ storage_profile: DEE-StgProf
+ lan_connectivity_policy: Cntr-FC-Boot
+ iqn_pool: iSCSI-Boot-A
+ san_connectivity_policy: Cntr-FC-Boot
+ boot_policy: DEE-vMedia
+ maintenance_policy: default
+ server_pool: Container-Pool
+ host_firmware_package: 3.1.2b
+ bios_policy: Docker
+
+- name: Remove Service Profile Template
+ cisco.ucs.ucs_service_profile_template:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: DEE-Ctrl
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def configure_service_profile_template(ucs, module):
+ from ucsmsdk.mometa.ls.LsServer import LsServer
+ from ucsmsdk.mometa.vnic.VnicConnDef import VnicConnDef
+ from ucsmsdk.mometa.vnic.VnicIScsiNode import VnicIScsiNode
+ from ucsmsdk.mometa.ls.LsRequirement import LsRequirement
+ from ucsmsdk.mometa.ls.LsPower import LsPower
+ from ucsmsdk.mometa.lstorage.LstorageProfileBinding import LstorageProfileBinding
+ from ucsmsdk.mometa.mgmt.MgmtInterface import MgmtInterface
+ from ucsmsdk.mometa.mgmt.MgmtVnet import MgmtVnet
+ from ucsmsdk.mometa.vnic.VnicIpV4MgmtPooledAddr import VnicIpV4MgmtPooledAddr
+
+ if not module.check_mode:
+ try:
+ # create if mo does not already exist
+ mo = LsServer(
+ parent_mo_or_dn=module.params['org_dn'],
+ bios_profile_name=module.params['bios_policy'],
+ boot_policy_name=module.params['boot_policy'],
+ descr=module.params['description'],
+ ext_ip_state=module.params['mgmt_ip_state'],
+ ext_ip_pool_name=module.params['mgmt_ip_pool'],
+ # graphics_card_policy_name=module.params['graphics_card_policy'],
+ host_fw_policy_name=module.params['host_firmware_package'],
+ ident_pool_name=module.params['uuid_pool'],
+ kvm_mgmt_policy_name=module.params['kvm_mgmt_policy'],
+ local_disk_policy_name=module.params['local_disk_policy'],
+ maint_policy_name=module.params['maintenance_policy'],
+ mgmt_access_policy_name=module.params['ipmi_access_profile'],
+ name=module.params['name'],
+ power_policy_name=module.params['power_control_policy'],
+ power_sync_policy_name=module.params['power_sync_policy'],
+ scrub_policy_name=module.params['scrub_policy'],
+ sol_policy_name=module.params['sol_policy'],
+ stats_policy_name=module.params['threshold_policy'],
+ type=module.params['template_type'],
+ usr_lbl=module.params['user_label'],
+ vmedia_policy_name=module.params['vmedia_policy'],
+ )
+
+ if module.params['storage_profile']:
+ # Storage profile
+ mo_1 = LstorageProfileBinding(
+ parent_mo_or_dn=mo,
+ storage_profile_name=module.params['storage_profile'],
+ )
+
+ if module.params['mgmt_interface_mode']:
+ # Management Interface
+ mo_1 = MgmtInterface(
+ parent_mo_or_dn=mo,
+ mode=module.params['mgmt_interface_mode'],
+ ip_v4_state='pooled',
+ )
+ mo_2 = MgmtVnet(
+ parent_mo_or_dn=mo_1,
+ id='1',
+ name=module.params['mgmt_vnet_name'],
+ )
+ VnicIpV4MgmtPooledAddr(
+ parent_mo_or_dn=mo_2,
+ name=module.params['mgmt_inband_pool_name'],
+ )
+
+ # LAN/SAN connectivity policy
+ mo_1 = VnicConnDef(
+ parent_mo_or_dn=mo,
+ lan_conn_policy_name=module.params['lan_connectivity_policy'],
+ san_conn_policy_name=module.params['san_connectivity_policy'],
+ )
+
+ if module.params['iqn_pool']:
+ # IQN pool
+ mo_1 = VnicIScsiNode(
+ parent_mo_or_dn=mo,
+ iqn_ident_pool_name=module.params['iqn_pool']
+ )
+
+ # power state
+ admin_state = 'admin-' + module.params['power_state']
+ mo_1 = LsPower(
+ parent_mo_or_dn=mo,
+ state=admin_state,
+ )
+
+ if module.params['server_pool']:
+ # server pool
+ mo_1 = LsRequirement(
+ parent_mo_or_dn=mo,
+ name=module.params['server_pool'],
+ qualifier=module.params['server_pool_qualification'],
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ except Exception as e: # generic Exception handling because SDK can throw a variety of exceptions
+ ucs.result['msg'] = "setup error: %s " % str(e)
+ module.fail_json(**ucs.result)
+
+ ucs.result['changed'] = True
+
+
+def check_storage_profile_props(ucs, module, dn):
+ props_match = False
+
+ child_dn = dn + '/profile-binding'
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ kwargs = dict(storage_profile_name=module.params['storage_profile'])
+ if mo_1.check_prop_match(**kwargs):
+ props_match = True
+ elif not module.params['storage_profile']:
+ # no stroage profile mo or desired state
+ props_match = True
+
+ return props_match
+
+
+def check_connectivity_policy_props(ucs, module, dn):
+ props_match = False
+
+ child_dn = dn + '/conn-def'
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ kwargs = dict(lan_conn_policy_name=module.params['lan_connectivity_policy'])
+ kwargs['san_conn_policy_name'] = module.params['san_connectivity_policy']
+ if mo_1.check_prop_match(**kwargs):
+ props_match = True
+ elif not module.params['lan_connectivity_policy'] and not module.params['san_connectivity_policy']:
+ # no mo and no desired state
+ props_match = True
+
+ return props_match
+
+
+def check_iqn_pool_props(ucs, module, dn):
+ props_match = False
+
+ child_dn = dn + '/iscsi-node'
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ kwargs = dict(iqn_ident_pool_name=module.params['iqn_pool'])
+ if mo_1.check_prop_match(**kwargs):
+ props_match = True
+ elif not module.params['iqn_pool']:
+ # no mo and no desired state
+ props_match = True
+
+ return props_match
+
+
+def check_inband_management_props(ucs, module, dn):
+ props_match = False
+
+ child_dn = dn + '/iface-in-band'
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ kwargs = dict(mode=module.params['mgmt_interface_mode'])
+ if mo_1.check_prop_match(**kwargs):
+ child_dn = child_dn + '/network'
+ mo_2 = ucs.login_handle.query_dn(child_dn)
+ if mo_2:
+ kwargs = dict(name=module.params['mgmt_vnet_name'])
+ if mo_2.check_prop_match(**kwargs):
+ child_dn = child_dn + '/ipv4-pooled-addr'
+ mo_3 = ucs.login_handle.query_dn(child_dn)
+ if mo_3:
+ kwargs = dict(name=module.params['mgmt_inband_pool_name'])
+ if mo_3.check_prop_match(**kwargs):
+ props_match = True
+ elif not module.params['mgmt_interface_mode']:
+ # no mo and no desired state
+ props_match = True
+
+ return props_match
+
+
+def check_power_props(ucs, module, dn):
+ props_match = False
+
+ child_dn = dn + '/power'
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ kwargs = dict(state=module.params['power_state'])
+ if mo_1.check_prop_match(**kwargs):
+ props_match = True
+ elif not module.params['power_state']:
+ # no mo and no desired state
+ props_match = True
+
+ return props_match
+
+
+def check_server_pool(ucs, module, dn):
+ props_match = False
+
+ child_dn = dn + '/pn-req'
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ kwargs = dict(name=module.params['server_pool'])
+ kwargs['qualifier'] = module.params['server_pool_qualification']
+ if mo_1.check_prop_match(**kwargs):
+ props_match = True
+ elif not module.params['server_pool']:
+ # no pn-req object and no server pool name provided
+ props_match = True
+
+ return props_match
+
+
+def check_serivce_profile_templates_props(ucs, module, mo, dn):
+ props_match = False
+
+ # check top-level mo props
+ kwargs = dict(bios_profile_name=module.params['bios_policy'])
+ kwargs['boot_policy_name'] = module.params['boot_policy']
+ kwargs['descr'] = module.params['description']
+ kwargs['ext_ip_state'] = module.params['mgmt_ip_state']
+ kwargs['ext_ip_pool_name'] = module.params['mgmt_ip_pool']
+ # kwargs['graphics_card_policy_name'] = module.params['graphics_card_policy']
+ kwargs['host_fw_policy_name'] = module.params['host_firmware_package']
+ kwargs['ident_pool_name'] = module.params['uuid_pool']
+ kwargs['kvm_mgmt_policy_name'] = module.params['kvm_mgmt_policy']
+ kwargs['local_disk_policy_name'] = module.params['local_disk_policy']
+ kwargs['maint_policy_name'] = module.params['maintenance_policy']
+ kwargs['mgmt_access_policy_name'] = module.params['ipmi_access_profile']
+ kwargs['power_policy_name'] = module.params['power_control_policy']
+ kwargs['power_sync_policy_name'] = module.params['power_sync_policy']
+ kwargs['scrub_policy_name'] = module.params['scrub_policy']
+ kwargs['sol_policy_name'] = module.params['sol_policy']
+ kwargs['stats_policy_name'] = module.params['threshold_policy']
+ kwargs['type'] = module.params['template_type']
+ kwargs['usr_lbl'] = module.params['user_label']
+ kwargs['vmedia_policy_name'] = module.params['vmedia_policy']
+
+ if mo.check_prop_match(**kwargs):
+ # top-level props match, check next level mo/props
+ # code below should discontinue checks once any mismatch is found
+
+ # check storage profile 1st
+ props_match = check_storage_profile_props(ucs, module, dn)
+
+ if props_match:
+ props_match = check_connectivity_policy_props(ucs, module, dn)
+
+ if props_match:
+ props_match = check_iqn_pool_props(ucs, module, dn)
+
+ if props_match:
+ props_match = check_inband_management_props(ucs, module, dn)
+
+ if props_match:
+ props_match = check_power_props(ucs, module, dn)
+
+ if props_match:
+ props_match = check_server_pool(ucs, module, dn)
+
+ return props_match
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(type='str', required=True),
+ bios_policy=dict(type='str', default=''),
+ boot_policy=dict(type='str', default='default'),
+ description=dict(type='str', aliases=['descr'], default=''),
+ mgmt_ip_state=dict(type='str', default='pooled'),
+ mgmt_ip_pool=dict(type='str', default='ext-mgmt'),
+ graphics_card_policy=dict(type='str', default=''),
+ host_firmware_package=dict(type='str', default=''),
+ uuid_pool=dict(type='str', default='default'),
+ kvm_mgmt_policy=dict(type='str', default=''),
+ local_disk_policy=dict(type='str', default=''),
+ maintenance_policy=dict(type='str', default=''),
+ ipmi_access_profile=dict(type='str', default=''),
+ power_control_policy=dict(type='str', default='default'),
+ power_sync_policy=dict(type='str', default=''),
+ scrub_policy=dict(type='str', default=''),
+ sol_policy=dict(type='str', default=''),
+ threshold_policy=dict(type='str', default='default'),
+ template_type=dict(type='str', default='initial-template', choices=['initial-template', 'updating-template']),
+ user_label=dict(type='str', default=''),
+ vmedia_policy=dict(type='str', default=''),
+ storage_profile=dict(type='str', default=''),
+ lan_connectivity_policy=dict(type='str', default=''),
+ iqn_pool=dict(type='str', default=''),
+ san_connectivity_policy=dict(type='str', default=''),
+ server_pool=dict(type='str', default=''),
+ server_pool_qualification=dict(type='str', default=''),
+ power_state=dict(type='str', default='up', choices=['up', 'down']),
+ mgmt_interface_mode=dict(type='str', default='', choices=['', 'in-band']),
+ mgmt_vnet_name=dict(type='str', default=''),
+ mgmt_inband_pool_name=dict(type='str', default=''),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+ ucs = UCSModule(module)
+ # UCSModule creation above verifies ucsmsdk is present and exits on failure.
+ # Additional imports are done below or in called functions.
+
+ ucs.result['changed'] = False
+ props_match = False
+ # dn is <org_dn>/ls-<name>
+ dn = module.params['org_dn'] + '/ls-' + module.params['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ if module.params['state'] == 'absent':
+ # mo must exist but all properties do not have to match
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ ucs.result['changed'] = True
+ else: # state == 'present'
+ props_match = check_serivce_profile_templates_props(ucs, module, mo, dn)
+
+ if module.params['state'] == 'present' and not props_match:
+ configure_service_profile_template(ucs, module)
+
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_sp_vnic_order.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_sp_vnic_order.py
new file mode 100644
index 00000000..6498323c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_sp_vnic_order.py
@@ -0,0 +1,230 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.0',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_sp_vnic_order
+
+short_description: Configures vNIC order for service profiles and templates on Cisco UCS Manager
+
+version_added: 2.10
+
+description:
+ - Configures Configures vNIC order for service profiles and templates on Cisco UCS Manager
+
+options:
+ sp_name:
+ description: DN of the service profile
+ vnics:
+ description: List of vNIC order properties
+ suboptions:
+ name:
+ description: Name of the vNIC
+ required: true
+ admin_vcon:
+ description: Name of the virtual connection
+ choices: ["1","2","3","4","any"]
+ order:
+ description: vNIC connection order
+ choices: ["unspecified", "0-256"]
+ transport:
+ description: transport medium
+ choices: ["ethernet", "fc"]
+ required: true
+ state:
+ description: Desired state of the vNIC.
+ choices: [present, absent]
+ default: present
+ org_dn:
+ description: root org dn
+extends_documentation_fragment:
+ - cisco.ucs.ucs
+requirements:
+ - ucsmsdk
+author:
+ - Brett Johnson (@sdbrett)
+
+'''
+
+EXAMPLES = r'''
+- name: Configure vnic order
+ cisco.ucs.ucs_sp_vnic_order:
+ sp_name: my_sp
+ vnics:
+ - name: 'my_vnic'
+ admin_vcon: '1'
+ order: '1'
+ transport: 'ethernet'
+ hostname: 192.168.99.100
+ username: admin
+ password: password
+- name: Configure vhba order
+ cisco.ucs.ucs_sp_vnic_order:
+ sp_name: my_sp
+ vnics:
+ - name: 'my_vhba'
+ admin_vcon: '2'
+ order: '1'
+ transport: 'fc'
+ hostname: 192.168.99.100
+ username: admin
+ password: password
+- name: Configure vnic and vhba order
+ cisco.ucs.ucs_sp_vnic_order:
+ sp_name: my_sp
+ vnics:
+ - name: my_vhba
+ admin_vcon: '2'
+ order: '1'
+ transport: fc
+ - name: my_vnic
+ admin_vcon: '1'
+ order: '1'
+ transport: ethernet
+ hostname: 192.168.99.100
+ username: admin
+ password: password
+- name: Remove vnic order configuration from my_vnic
+ cisco.ucs.ucs_sp_vnic_order:
+ sp_name: my_sp
+ vnics:
+ - name: 'my_vnic'
+ transport: ethernet
+ state: absent
+ hostname: 192.168.99.100
+ username: admin
+ password: password
+
+'''
+
+RETURN = r'''
+#
+'''
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def get_service_profile(handle, org_dn, sp_name):
+ dn = org_dn + "/ls-" + sp_name
+ sp = handle.query_dn(dn)
+ return sp
+
+
+def update_vnic_assignment_order(ucs, vnic, sp):
+ from ucsmsdk.mometa.ls.LsVConAssign import LsVConAssign
+
+ mo = LsVConAssign(parent_mo_or_dn=sp, admin_vcon=vnic['admin_vcon'],
+ order=vnic['order'], transport=vnic['transport'],
+ vnic_name=vnic['name'])
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+
+
+def remove_vnic_assignment_order(ucs, vnic, sp):
+ from ucsmsdk.mometa.ls.LsVConAssign import LsVConAssign
+
+ mo = LsVConAssign(parent_mo_or_dn=sp, admin_vcon='any',
+ order='unspecified', transport=vnic['transport'],
+ vnic_name=vnic['name'])
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+
+
+def get_vnic(ucs, dn):
+ return ucs.login_handle.query_dn(dn)
+
+
+def get_vnic_dn(sp_dn, transport, name):
+ if transport == 'ethernet':
+ return sp_dn + '/ether-' + name
+ return sp_dn + '/fc-' + name
+
+
+def matches_existing_vnic_order(vnic, vnic_mo):
+ if vnic['state'] == 'absent':
+ kwargs = dict(admin_vcon='any')
+ kwargs['order'] = 'unspecified'
+ else:
+ kwargs = dict(admin_vcon=vnic['admin_vcon'])
+ kwargs['order'] = vnic['order']
+
+ if vnic['transport'] == 'ethernet':
+ kwargs['type'] = 'ether'
+ else:
+ kwargs['type'] = vnic['transport']
+ return vnic_mo.check_prop_match(**kwargs)
+
+
+def main():
+ vnic_spec = dict(
+ name=dict(type='str', required=True),
+ admin_vcon=dict(type='str', choices=['1', '2', '3', '4', 'any']),
+ order=dict(type='str'),
+ transport=dict(type='str', required=True, choices=['ethernet', 'fc']),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ sp_name=dict(required=True, type='str'),
+ vnics=dict(required=True, type='list', elements='dict', options=vnic_spec),
+ org_dn=dict(required=False, type='str', default='org-root'),
+ )
+ module = AnsibleModule(argument_spec,
+ supports_check_mode=True)
+ ucs = UCSModule(module)
+
+ err = False
+ changed = False
+
+ try:
+ sp_dn = dn = module.params['org_dn'] + "/ls-" + module.params['sp_name']
+ sp = ucs.login_handle.query_dn(dn)
+ if not sp:
+ raise ValueError("SP '%s' does not exist" % sp_dn)
+
+ for vnic in module.params['vnics']:
+ vnic_mo = get_vnic(ucs, (get_vnic_dn(sp_dn, vnic['transport'], vnic['name'])))
+
+ if vnic['state'] != 'absent' and not vnic_mo:
+ raise ValueError("vNIC '%s' is not assigned to service profile '%s'" % (vnic['name'], sp_dn))
+
+ if vnic_mo:
+ if not matches_existing_vnic_order(vnic, vnic_mo):
+ changed = True
+ break
+
+ if changed and not module.check_mode:
+ for vnic in module.params['vnics']:
+ vnic_mo = get_vnic(ucs, (get_vnic_dn(sp_dn, vnic['transport'], vnic['name'])))
+ if vnic['state'] == 'absent' and vnic_mo:
+ remove_vnic_assignment_order(ucs, vnic, sp)
+ elif not vnic_mo:
+
+ update_vnic_assignment_order(ucs, vnic, sp)
+ elif not matches_existing_vnic_order(vnic, vnic_mo):
+ update_vnic_assignment_order(ucs, vnic, sp)
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_storage_profile.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_storage_profile.py
new file mode 100644
index 00000000..9ca825a8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_storage_profile.py
@@ -0,0 +1,254 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_storage_profile
+short_description: Configures storage profiles on Cisco UCS Manager
+description:
+- Configures storage profiles on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify that the storage profile is present and will create if needed.
+ - If C(absent), will verify that the storage profile is absent and will delete if needed.
+ choices: [ absent, present ]
+ default: present
+ name:
+ description:
+ - The name of the storage profile.
+ - This name can be between 1 and 16 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after profile is created.
+ required: yes
+ description:
+ description:
+ - The user-defined description of the storage profile.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ local_luns:
+ description:
+ - List of Local LUNs used by the storage profile.
+ suboptions:
+ name:
+ description:
+ - The name of the local LUN.
+ required: yes
+ size:
+ description:
+ - Size of this LUN in GB.
+ - The size can range from 1 to 10240 GB.
+ default: '1'
+ auto_deploy:
+ description:
+ - Whether the local LUN should be automatically deployed or not.
+ choices: [ auto-deploy, no-auto-deploy ]
+ default: auto-deploy
+ expand_to_avail:
+ description:
+ - Specifies that this LUN can be expanded to use the entire available disk group.
+ - For each service profile, only one LUN can use this option.
+ - Expand To Available option is not supported for already deployed LUN.
+ type: bool
+ default: 'no'
+ fractional_size:
+ description:
+ - Fractional size of this LUN in MB.
+ default: '0'
+ disk_policy_name:
+ description:
+ - The disk group configuration policy to be applied to this local LUN.
+ state:
+ description:
+ - If C(present), will verify local LUN is present on profile.
+ If C(absent), will verify local LUN is absent on profile.
+ choices: [ absent, present ]
+ default: present
+ org_dn:
+ description:
+ - The distinguished name (dn) of the organization where the resource is assigned.
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+- Sindhu Sudhir (@sisudhir)
+- David Soper (@dsoper2)
+- John McDonough (@movinalot)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.7'
+'''
+
+EXAMPLES = r'''
+- name: Configure Storage Profile
+ cisco.ucs.ucs_storage_profile:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: DEE-StgProf
+ local_luns:
+ - name: Boot-LUN
+ size: '60'
+ disk_policy_name: DEE-DG
+ - name: Data-LUN
+ size: '200'
+ disk_policy_name: DEE-DG
+
+- name: Remove Storage Profile
+ cisco.ucs.ucs_storage_profile:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: DEE-StgProf
+ state: absent
+
+- name: Remove Local LUN from Storage Profile
+ cisco.ucs.ucs_storage_profile:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: DEE-StgProf
+ local_luns:
+ - name: Data-LUN
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ local_lun = dict(
+ name=dict(type='str', required=True),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ size=dict(type='str', default='1'),
+ auto_deploy=dict(type='str', default='auto-deploy', choices=['auto-deploy', 'no-auto-deploy']),
+ expand_to_avail=dict(type='str', default='no', choices=['no', 'yes']),
+ fractional_size=dict(type='str', default='0'),
+ disk_policy_name=dict(type='str', default=''),
+ )
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(type='str', required=True),
+ description=dict(type='str', aliases=['descr'], default=''),
+ local_luns=dict(type='list', elements='dict', options=local_lun),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+ ucs = UCSModule(module)
+
+ err = False
+
+ # UCSModule creation above verifies ucsmsdk is present and exits on failure. Additional imports are done below.
+ from ucsmsdk.mometa.lstorage.LstorageProfile import LstorageProfile
+ from ucsmsdk.mometa.lstorage.LstorageDasScsiLun import LstorageDasScsiLun
+
+ ucs.result['changed'] = False
+ try:
+ mo_exists = False
+ props_match = False
+ # dn is <org_dn>/profile-<name>
+ dn = module.params['org_dn'] + '/profile-' + module.params['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+
+ if module.params['state'] == 'absent':
+ # mo must exist but all properties do not have to match
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ ucs.result['changed'] = True
+ else:
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(descr=module.params['description'])
+ if mo.check_prop_match(**kwargs):
+ # top-level props match, check next level mo/props
+ if not module.params.get('local_luns'):
+ props_match = True
+ else:
+ # check local lun props
+ for lun in module.params['local_luns']:
+ child_dn = dn + '/das-scsi-lun-' + lun['name']
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if lun['state'] == 'absent':
+ if mo_1:
+ props_match = False
+ break
+ else:
+ if mo_1:
+ kwargs = dict(size=str(lun['size']))
+ kwargs['auto_deploy'] = lun['auto_deploy']
+ kwargs['expand_to_avail'] = lun['expand_to_avail']
+ kwargs['fractional_size'] = str(lun['fractional_size'])
+ kwargs['local_disk_policy_name'] = lun['disk_policy_name']
+ if mo_1.check_prop_match(**kwargs):
+ props_match = True
+ else:
+ props_match = False
+ break
+
+ if not props_match:
+ if not module.check_mode:
+ # create if mo does not already exist
+ mo = LstorageProfile(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=module.params['name'],
+ descr=module.params['description'],
+ )
+
+ if module.params.get('local_luns'):
+ for lun in module.params['local_luns']:
+ if lun['state'] == 'absent':
+ child_dn = dn + '/das-scsi-lun-' + lun['name']
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ ucs.login_handle.remove_mo(mo_1)
+ else:
+ mo_1 = LstorageDasScsiLun(
+ parent_mo_or_dn=mo,
+ name=lun['name'],
+ size=str(lun['size']),
+ auto_deploy=lun['auto_deploy'],
+ expand_to_avail=lun['expand_to_avail'],
+ fractional_size=str(lun['fractional_size']),
+ local_disk_policy_name=lun['disk_policy_name'],
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ ucs.result['changed'] = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_system_qos.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_system_qos.py
new file mode 100644
index 00000000..6dcf7aac
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_system_qos.py
@@ -0,0 +1,152 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_system_qos
+short_description: Configures system QoS settings
+version_added: 2.10
+description:
+ - Configures system QoS settings
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ priority:
+ description: Priority to configure
+ choices: ["best-effort", "bronze", "fc", "gold","platinum", "silver"]
+ required: true
+ admin_state:
+ description: Admin state of QoS Policy
+ choices: ['disabled', 'enabled']
+ default: enabled
+ cos:
+ description: CoS setting
+ choices: ['any', '0-6']
+ required: true
+ weight:
+ description: CoS profile weight
+ choices: ['best-effort', 'none', '0-10']
+ required: true
+ mtu:
+ description: MTU size
+ choices: ['fc', 'normal', '0-4294967295']
+ default: normal
+ multicast_optimize:
+ description: Set multicast optimization options
+ choices: ['false', 'no', 'true', 'yes']
+ drop:
+ description: Set multicast optimization options
+ default: 'drop'
+ choices: ['drop', 'no-drop']
+requirements: ['ucsmsdk']
+author: "Brett Johnson (@sdbrett)"
+'''
+
+EXAMPLES = '''
+- name:
+ cisco.ucs.ucs_system_qos:
+ priority: platinum
+ admin_state: enabled
+ multicast_optimize: no
+ cos: '5'
+ weight: '10'
+ mtu: '9216'
+ hostname: 192.168.99.100
+ username: admin
+ password: password
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+# TODO Add ranges for cos, weight and mtu
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ priority=dict(required=True, type='str', choices=["best-effort", "bronze", "fc", "gold", "platinum", "silver"]),
+ cos=dict(required=True, type='str'),
+ weight=dict(required=True, type='str'),
+ admin_state=dict(required=False, type='str', default='enabled', choices=['disabled', 'enabled']),
+ drop=dict(required=False, type='str', default='drop', choices=['drop', 'no-drop']),
+ mtu=dict(required=False, type='str', default='normal'),
+ multicast_optimize=dict(required=False, type='str', default='no', choices=['false', 'no', 'true', 'yes']),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+ ucs = UCSModule(module)
+
+ err = False
+
+ changed = False
+ try:
+ dn = "fabric/lan/classes/class-" + module.params['priority']
+ mo = ucs.login_handle.query_dn(dn)
+ # check top-level mo props
+ if module.params['priority'] == 'best-effort':
+ kwargs = dict(weight=module.params['weight'])
+ kwargs['mtu'] = module.params['mtu']
+ kwargs['multicast_optimize'] = module.params['multicast_optimize']
+ if not mo.check_prop_match(**kwargs):
+ if not module.check_mode:
+ mo.weight = module.params['weight']
+ mo.mtu = module.params['mtu']
+ mo.multicast_optimize = module.params['multicast_optimize']
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+ elif module.params['priority'] == 'fc':
+ kwargs = dict(weight=module.params['weight'])
+ kwargs['cos'] = module.params['cos']
+ if not mo.check_prop_match(**kwargs):
+ if not module.check_mode:
+ mo.weight = module.params['weight']
+ mo.cos = module.params['cos']
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+
+ else:
+ kwargs = dict(weight=module.params['weight'])
+ kwargs['priority'] = module.params['priority']
+ kwargs['mtu'] = module.params['mtu']
+ kwargs['cos'] = module.params['cos']
+ kwargs['drop'] = module.params['drop']
+ kwargs['admin_state'] = module.params['admin_state']
+ kwargs['multicast_optimize'] = module.params['multicast_optimize']
+ if not mo.check_prop_match(**kwargs):
+ if not module.check_mode:
+ mo.weight = module.params['weight']
+ mo.mtu = module.params['mtu']
+ mo.cos = module.params['cos']
+ mo.drop = module.params['drop']
+ mo.admin_state = module.params['admin_state']
+ mo.multicast_optimize = module.params['multicast_optimize']
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_timezone.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_timezone.py
new file mode 100644
index 00000000..d7a22e78
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_timezone.py
@@ -0,0 +1,165 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_timezone
+short_description: Configures timezone on Cisco UCS Manager
+description:
+- Configures timezone on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(absent), will unset timezone.
+ - If C(present), will set or update timezone.
+ choices: [absent, present]
+ default: present
+
+ admin_state:
+ description:
+ - The admin_state setting
+ - The enabled admin_state indicates the timezone configuration is utilized by UCS Manager.
+ - The disabled admin_state indicates the timezone configuration is ignored by UCS Manager.
+ choices: [disabled, enabled]
+ default: enabled
+
+ description:
+ description:
+ - A user-defined description of the timezone.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ default: ""
+
+ timezone:
+ description:
+ - The timezone name.
+ - Time zone names are from the L(tz database,https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
+ - The timezone name is case sensitive.
+ - The timezone name can be between 0 and 510 alphanumeric characters.
+ - You cannot use spaces or any special characters other than
+ - "\"-\" (hyphen), \"_\" (underscore), \"/\" (backslash)."
+
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- John McDonough (@movinalot)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.7'
+'''
+
+EXAMPLES = r'''
+- name: Configure Time Zone
+ cisco.ucs.ucs_timezone:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ state: present
+ admin_state: enabled
+ timezone: America/Los_Angeles
+ description: 'Time Zone for Los Angeles'
+
+- name: Unconfigure Time Zone
+ cisco.ucs.ucs_timezone:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ state: absent
+ admin_state: disabled
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def run_module():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ timezone=dict(type='str'),
+ description=dict(type='str', aliases=['descr'], default=''),
+ admin_state=dict(type='str', default='enabled', choices=['disabled', 'enabled']),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['timezone']],
+ ],
+ )
+ ucs = UCSModule(module)
+
+ err = False
+
+ changed = False
+ try:
+ mo_exists = False
+ props_match = False
+
+ dn = 'sys/svc-ext/datetime-svc'
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+
+ if module.params['state'] == 'absent':
+ # mo must exist but all properties do not have to match
+ if mo_exists:
+ if not module.check_mode:
+ mo.timezone = ""
+ mo.descr = ""
+ ucs.login_handle.add_mo(mo, modify_present=True)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(descr=module.params['description'])
+ kwargs['timezone'] = module.params['timezone']
+ kwargs['admin_state'] = module.params['admin_state']
+ if mo.check_prop_match(**kwargs):
+ props_match = True
+
+ if not props_match:
+ if not module.check_mode:
+ # update mo, timezone mo always exists
+ mo.timezone = module.params['timezone']
+ mo.descr = module.params['description']
+ mo.admin_state = module.params['admin_state']
+ ucs.login_handle.add_mo(mo, modify_present=True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+def main():
+ run_module()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_uuid_pool.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_uuid_pool.py
new file mode 100644
index 00000000..d314a9ba
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_uuid_pool.py
@@ -0,0 +1,196 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_uuid_pool
+short_description: Configures server UUID pools on Cisco UCS Manager
+description:
+- Configures server UUID pools and UUID blocks on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify UUID pool is present and will create if needed.
+ - If C(absent), will verify UUID pool is absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name of the UUID pool.
+ - This name can be between 1 and 32 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after the UUID pool is created.
+ required: yes
+ description:
+ description:
+ - "The user-defined description of the UUID pool."
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ prefix:
+ description:
+ - UUID prefix used for the range of server UUIDs.
+ - "If no value is provided, the system derived prefix will be used (equivalent to selecting 'derived' option in UI)."
+ - "If the user provides a value, the user provided prefix will be used (equivalent to selecting 'other' option in UI)."
+ - A user provided value should be in the format XXXXXXXX-XXXX-XXXX.
+ order:
+ description:
+ - The Assignment Order field.
+ - "This can be one of the following:"
+ - "default - Cisco UCS Manager selects a random identity from the pool."
+ - "sequential - Cisco UCS Manager selects the lowest available identity from the pool."
+ choices: [default, sequential]
+ default: default
+ first_uuid:
+ description:
+ - The first UUID in the block of UUIDs.
+ - This is the From field in the UCS Manager UUID Blocks menu.
+ last_uuid:
+ description:
+ - The last UUID in the block of UUIDs.
+ - This is the To field in the UCS Manager Add UUID Blocks menu.
+ org_dn:
+ description:
+ - The distinguished name (dn) of the organization where the resource is assigned.
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.7'
+'''
+
+EXAMPLES = r'''
+- name: Configure UUID address pool
+ cisco.ucs.ucs_uuid_pool:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: UUID-Pool
+ order: sequential
+ first_uuid: 0000-000000000001
+ last_uuid: 0000-000000000078
+
+- name: Remove UUID address pool
+ cisco.ucs.ucs_uuid_pool:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: UUID-Pool
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(type='str', required=True),
+ description=dict(type='str', aliases=['descr'], default=''),
+ order=dict(type='str', default='default', choices=['default', 'sequential']),
+ prefix=dict(type='str', default=''),
+ first_uuid=dict(type='str'),
+ last_uuid=dict(type='str'),
+ state=dict(default='present', choices=['present', 'absent'], type='str'),
+ )
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ )
+ # UCSModule verifies ucsmsdk is present and exits on failure. Imports are below ucs object creation.
+ ucs = UCSModule(module)
+
+ err = False
+
+ from ucsmsdk.mometa.uuidpool.UuidpoolPool import UuidpoolPool
+ from ucsmsdk.mometa.uuidpool.UuidpoolBlock import UuidpoolBlock
+
+ ucs.result['changed'] = False
+ try:
+ mo_exists = False
+ props_match = False
+ # dn is <org_dn>/uuid-pool-<name>
+ dn = module.params['org_dn'] + '/uuid-pool-' + module.params['name']
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+
+ if module.params['state'] == 'absent':
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ ucs.result['changed'] = True
+ else:
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(assignment_order=module.params['order'])
+ kwargs['descr'] = module.params['description']
+ if module.params['prefix']:
+ kwargs['prefix'] = module.params['prefix']
+ if mo.check_prop_match(**kwargs):
+ # top-level props match, check next level mo/props
+ if module.params['last_uuid'] and module.params['first_uuid']:
+ # uuid address block specified, check properties
+ block_dn = dn + '/block-from-' + module.params['first_uuid'].upper() + '-to-' + module.params['last_uuid'].upper()
+ mo_1 = ucs.login_handle.query_dn(block_dn)
+ if mo_1:
+ props_match = True
+ else:
+ # no UUID address block specified, but top-level props matched
+ props_match = True
+
+ if not props_match:
+ if not module.check_mode:
+ # create if mo does not already exist
+ if not module.params['prefix']:
+ module.params['prefix'] = 'derived'
+ mo = UuidpoolPool(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=module.params['name'],
+ descr=module.params['description'],
+ assignment_order=module.params['order'],
+ prefix=module.params['prefix']
+ )
+
+ if module.params['last_uuid'] and module.params['first_uuid']:
+ mo_1 = UuidpoolBlock(
+ parent_mo_or_dn=mo,
+ to=module.params['last_uuid'],
+ r_from=module.params['first_uuid'],
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ ucs.result['changed'] = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vhba_template.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vhba_template.py
new file mode 100644
index 00000000..597e8c91
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vhba_template.py
@@ -0,0 +1,274 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_vhba_template
+short_description: Configures vHBA templates on Cisco UCS Manager
+description:
+- Configures vHBA templates on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify vHBA templates are present and will create if needed.
+ - If C(absent), will verify vHBA templates are absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name of the virtual HBA template.
+ - This name can be between 1 and 16 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after the template is created.
+ required: yes
+ description:
+ description:
+ - A user-defined description of the template.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ fabric:
+ description:
+ - The Fabric ID field.
+ - The name of the fabric interconnect that vHBAs created with this template are associated with.
+ choices: [A, B]
+ default: A
+ redundancy_type:
+ description:
+ - The Redundancy Type used for template pairing from the Primary or Secondary redundancy template.
+ - "primary — Creates configurations that can be shared with the Secondary template."
+ - Any other shared changes on the Primary template are automatically synchronized to the Secondary template.
+ - "secondary — All shared configurations are inherited from the Primary template."
+ - "none - Legacy vHBA template behavior. Select this option if you do not want to use redundancy."
+ choices: [none, primary, secondary]
+ default: none
+ vsan:
+ description:
+ - The VSAN to associate with vHBAs created from this template.
+ default: default
+ template_type:
+ description:
+ - The Template Type field.
+ - "This can be one of the following:"
+ - "initial-template — vHBAs created from this template are not updated if the template changes."
+ - "updating-template - vHBAs created from this template are updated if the template changes."
+ choices: [initial-template, updating-template]
+ default: initial-template
+ max_data:
+ description:
+ - The Max Data Field Size field.
+ - The maximum size of the Fibre Channel frame payload bytes that the vHBA supports.
+ - Enter an string between '256' and '2112'.
+ default: '2048'
+ wwpn_pool:
+ description:
+ - The WWPN pool that a vHBA created from this template uses to derive its WWPN address.
+ default: default
+ qos_policy:
+ description:
+ - The QoS policy that is associated with vHBAs created from this template.
+ pin_group:
+ description:
+ - The SAN pin group that is associated with vHBAs created from this template.
+ stats_policy:
+ description:
+ - The statistics collection policy that is associated with vHBAs created from this template.
+ default: default
+ org_dn:
+ description:
+ - Org dn (distinguished name)
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- John McDonough (@movinalot)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.5'
+'''
+
+EXAMPLES = r'''
+- name: Configure vHBA template
+ cisco.ucs.ucs_vhba_template:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: vHBA-A
+ fabric: A
+ vsan: VSAN-A
+ wwpn_pool: WWPN-Pool-A
+
+- name: Remote vHBA template
+ cisco.ucs.ucs_vhba_template:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: vHBA-A
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(type='str'),
+ descr=dict(type='str'),
+ fabric=dict(type='str', default='A', choices=['A', 'B']),
+ redundancy_type=dict(type='str', default='none', choices=['none', 'primary', 'secondary']),
+ vsan=dict(type='str', default='default'),
+ template_type=dict(type='str', default='initial-template', choices=['initial-template', 'updating-template']),
+ max_data=dict(type='str', default='2048'),
+ wwpn_pool=dict(type='str', default='default'),
+ qos_policy=dict(type='str'),
+ pin_group=dict(type='str'),
+ stats_policy=dict(type='str', default='default'),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ vhba_template_list=dict(type='list'),
+ )
+
+ # Note that use of vhba_template_list is an experimental feature which allows multiple resource updates with a single UCSM connection.
+ # Support for vhba_template_list may change or be removed once persistent UCS connections are supported.
+ # Either vhba_template_list or name is required (user can specify either a list of single resource).
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_one_of=[
+ ['vhba_template_list', 'name']
+ ],
+ mutually_exclusive=[
+ ['vhba_template_list', 'name']
+ ],
+ )
+ ucs = UCSModule(module)
+
+ err = False
+
+ from ucsmsdk.mometa.vnic.VnicSanConnTempl import VnicSanConnTempl
+ from ucsmsdk.mometa.vnic.VnicFcIf import VnicFcIf
+
+ changed = False
+ try:
+ # Only documented use is a single resource, but to also support experimental
+ # feature allowing multiple updates all params are converted to a vhba_template_list below.
+
+ if module.params['vhba_template_list']:
+ # directly use the list (single resource and list are mutually exclusive
+ vhba_template_list = module.params['vhba_template_list']
+ else:
+ # single resource specified, create list from the current params
+ vhba_template_list = [module.params]
+ for vhba_template in vhba_template_list:
+ mo_exists = False
+ props_match = False
+ # set default params. Done here to set values for lists which can't be done in the argument_spec
+ if not vhba_template.get('descr'):
+ vhba_template['descr'] = ''
+ if not vhba_template.get('fabric'):
+ vhba_template['fabric'] = 'A'
+ if not vhba_template.get('redundancy_type'):
+ vhba_template['redundancy_type'] = 'none'
+ if not vhba_template.get('vsan'):
+ vhba_template['vsan'] = 'default'
+ if not vhba_template.get('template_type'):
+ vhba_template['template_type'] = 'initial-template'
+ if not vhba_template.get('max_data'):
+ vhba_template['max_data'] = '2048'
+ if not vhba_template.get('wwpn_pool'):
+ vhba_template['wwpn_pool'] = 'default'
+ if not vhba_template.get('qos_policy'):
+ vhba_template['qos_policy'] = ''
+ if not vhba_template.get('pin_group'):
+ vhba_template['pin_group'] = ''
+ if not vhba_template.get('stats_policy'):
+ vhba_template['stats_policy'] = 'default'
+ # dn is <org_dn>/san-conn-templ-<name>
+ dn = module.params['org_dn'] + '/san-conn-templ-' + vhba_template['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+ # check top-level mo props
+ kwargs = dict(descr=vhba_template['descr'])
+ kwargs['switch_id'] = vhba_template['fabric']
+ kwargs['redundancy_pair_type'] = vhba_template['redundancy_type']
+ kwargs['templ_type'] = vhba_template['template_type']
+ kwargs['max_data_field_size'] = vhba_template['max_data']
+ kwargs['ident_pool_name'] = vhba_template['wwpn_pool']
+ kwargs['qos_policy_name'] = vhba_template['qos_policy']
+ kwargs['pin_to_group_name'] = vhba_template['pin_group']
+ kwargs['stats_policy_name'] = vhba_template['stats_policy']
+ if (mo.check_prop_match(**kwargs)):
+ # top-level props match, check next level mo/props
+ child_dn = dn + '/if-default'
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if mo_1:
+ kwargs = dict(name=vhba_template['vsan'])
+ if (mo_1.check_prop_match(**kwargs)):
+ props_match = True
+
+ if module.params['state'] == 'absent':
+ # mo must exist but all properties do not have to match
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ if not props_match:
+ if not module.check_mode:
+ # create if mo does not already exist
+ mo = VnicSanConnTempl(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=vhba_template['name'],
+ descr=vhba_template['descr'],
+ switch_id=vhba_template['fabric'],
+ redundancy_pair_type=vhba_template['redundancy_type'],
+ templ_type=vhba_template['template_type'],
+ max_data_field_size=vhba_template['max_data'],
+ ident_pool_name=vhba_template['wwpn_pool'],
+ qos_policy_name=vhba_template['qos_policy'],
+ pin_to_group_name=vhba_template['pin_group'],
+ stats_policy_name=vhba_template['stats_policy'],
+ )
+
+ mo_1 = VnicFcIf(
+ parent_mo_or_dn=mo,
+ name=vhba_template['vsan'],
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vlan_find.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vlan_find.py
new file mode 100644
index 00000000..595fb596
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vlan_find.py
@@ -0,0 +1,123 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_vlan_find
+short_description: Find VLANs on Cisco UCS Manager
+description:
+- Find VLANs on Cisco UCS Manager based on different criteria.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ pattern:
+ description:
+ - Regex pattern to find within the name property of the fabricVlan class.
+ - This is required if C(vlanid) parameter is not supplied.
+ type: str
+ fabric:
+ description:
+ - "The fabric configuration of the VLAN. This can be one of the following:"
+ - "common - The VLAN applies to both fabrics and uses the same configuration parameters in both cases."
+ - "A — The VLAN only applies to fabric A."
+ - "B — The VLAN only applies to fabric B."
+ choices: [common, A, B]
+ default: common
+ type: str
+ vlanid:
+ description:
+ - The unique string identifier assigned to the VLAN.
+ - A VLAN ID can be between '1' and '3967', or between '4048' and '4093'.
+ - This is required if C(pattern) parameter is not supplied.
+ type: str
+requirements:
+- ucsmsdk
+author:
+- David Martinez (@dx0xm)
+- David Soper (@dsoper2)
+- John McDonough (@movinalot)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.9'
+'''
+
+EXAMPLES = r'''
+- name: Get all vlans in fabric A
+ cisco.ucs.ucs_vlan_find:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ fabric: 'A'
+ pattern: '.'
+- name: Confirm if vlan 15 is present
+ cisco.ucs.ucs_vlan_find:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ vlanid: '15'
+'''
+
+RETURN = r'''
+vlan_list:
+ description: basic details of vlans found
+ returned: on success
+ type: list
+ sample: [
+ {
+ "id": "0",
+ "name": "vlcloud1"
+ }
+ ]
+'''
+
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ fabric=dict(type='str', default='common', choices=['common', 'A', 'B']),
+ pattern=dict(type='str'),
+ vlanid=dict(type='str')
+ )
+
+ module = AnsibleModule(
+ argument_spec=argument_spec,
+ supports_check_mode=True,
+ required_one_of=[['pattern', 'vlanid']]
+ )
+
+ ucs = UCSModule(module)
+
+ filtls = ['(cloud,"ethlan")']
+ if module.params['fabric'] != 'common':
+ filtls.append('(switch_id,"' + module.params['fabric'] + '")')
+ if module.params['vlanid']:
+ filtls.append('(id,"' + module.params['vlanid'] + '")')
+ else:
+ filtls.append('(name,"' + module.params['pattern'] + '")')
+
+ object_dict = ucs.login_handle.query_classid("fabricVlan", filter_str=' and '.join(filtls))
+
+ if object_dict is None:
+ module.fail_json(msg="Failed to query vlan objects")
+
+ vlnlist = []
+ for ob in object_dict:
+ vlnlist.append(dict(name=ob.name, id=ob.id))
+
+ module.exit_json(changed=False,
+ vlan_list=vlnlist)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vlan_to_group.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vlan_to_group.py
new file mode 100644
index 00000000..c7b6e81c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vlan_to_group.py
@@ -0,0 +1,158 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'community'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_vlan_to_group
+short_description: Add VLANs to a VLAN Group. Requires VLAN and VLAN Group to already be created on UCS prior to running module.
+description:
+- Add VLANs to VLAN Groups on Cisco UCS Manager.
+extends_documentation_fragment: ucs
+options:
+ state:
+ description:
+ - If C(present), will verify VLANs are present and will create if needed.
+ - If C(absent), will verify VLANs are absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ vlanname:
+ description:
+ - The name assigned to the VLAN.
+ - The VLAN name is case sensitive.
+ - This name can be between 1 and 32 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ required: yes
+ vlangroup:
+ description:
+ - The name assigned to the VLAN Group.
+ - The VLAN Group name is case sensitive.
+ - This name can be between 1 and 32 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ required: yes
+requirements:
+- ucsmsdk
+author:
+- Derrick Johnson @derricktj
+version_added: '2.10'
+'''
+
+EXAMPLES = r'''
+- name: Configure VLAN
+ cisco.ucs.ucs_vlan_to_group:
+ hostname: 1.1.1.1
+ username: admin
+ password: password
+ vlangroup: VLANGROUP
+ vlanname: VLANNAME
+ state: present
+- name: Remove VLAN
+ cisco.ucs.ucs_vlan_to_group:
+ hostname: 1.1.1.1
+ username: admin
+ password: password
+ vlangroup: VLANGROUP
+ vlanname: VLANNAME
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ vlangroup=dict(type='str', required=True),
+ vlanname=dict(type='str', required=True),
+ state=dict(default='present', choices=['present', 'absent'], type='str'),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['vlangroup', 'vlanname']],
+ ],
+ )
+ ucs = UCSModule(module)
+
+ err = False
+
+ from ucsmsdk.mometa.fabric.FabricNetGroup import FabricNetGroup
+ from ucsmsdk.mometa.fabric.FabricPooledVlan import FabricPooledVlan
+
+ changed = False
+ try:
+ dnpooled1_exists = False
+
+ # dn = fabric/lan/net-group-VLANGROUP
+ # Check for VLAN Group
+ dngroup = 'fabric/lan/net-group-' + module.params['vlangroup']
+ dngroup1 = ucs.login_handle.query_dn(dngroup)
+
+ # dn = fabric/lan/net-VLANNAME
+ # Check for VLAN
+ dnvlan = 'fabric/lan/net-' + module.params['vlanname']
+ dnvlan1 = ucs.login_handle.query_dn(dnvlan)
+
+ # dn = fabric/lan/net-group-VLANGROUP/net-VLANNAME
+ # Check for VLAN within VLAN Group
+ dnpooled = 'fabric/lan/net-group-' + module.params['vlangroup'] + '/net-' + module.params['vlanname']
+ dnpooled1 = ucs.login_handle.query_dn(dnpooled)
+
+ # Configuration MOs. Couldn't really get this to work off the DNs, so I built additional objects.
+ mo = FabricNetGroup(parent_mo_or_dn="fabric/lan", name=module.params['vlangroup'])
+ mo_1 = FabricPooledVlan(parent_mo_or_dn=mo, name=module.params['vlanname'])
+
+ if not dngroup1:
+ # Error out if the VLAN Group is missing
+ err = True
+ ucs.result['msg'] = module.params['vlangroup'] + " VLAN Group not configured in UCS"
+
+ if not dnvlan1:
+ # Error out if VLAN is missing
+ err = True
+ ucs.result['msg'] = module.params['vlanname'] + " VLAN not configured in UCS. Use ucs_vlans module to create the VLAN first"
+
+ if dnpooled1:
+ dnpooled1_exists = True
+
+ if module.params['state'] == 'absent':
+ if dnpooled1_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo_1)
+ ucs.login_handle.commit()
+ changed = True
+
+ if module.params['state'] == 'present':
+ if not dnpooled1_exists:
+ if not module.check_mode:
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vlans.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vlans.py
new file mode 100644
index 00000000..a0376f9b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vlans.py
@@ -0,0 +1,192 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_vlans
+short_description: Configures VLANs on Cisco UCS Manager
+description:
+- Configures VLANs on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify VLANs are present and will create if needed.
+ - If C(absent), will verify VLANs are absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name assigned to the VLAN.
+ - The VLAN name is case sensitive.
+ - This name can be between 1 and 32 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after the VLAN is created.
+ required: yes
+ multicast_policy:
+ description:
+ - The multicast policy associated with this VLAN.
+ - This option is only valid if the Sharing Type field is set to None or Primary.
+ default: ''
+ fabric:
+ description:
+ - "The fabric configuration of the VLAN. This can be one of the following:"
+ - "common - The VLAN applies to both fabrics and uses the same configuration parameters in both cases."
+ - "A — The VLAN only applies to fabric A."
+ - "B — The VLAN only applies to fabric B."
+ - For upstream disjoint L2 networks, Cisco recommends that you choose common to create VLANs that apply to both fabrics.
+ choices: [common, A, B]
+ default: common
+ id:
+ description:
+ - The unique string identifier assigned to the VLAN.
+ - A VLAN ID can be between '1' and '3967', or between '4048' and '4093'.
+ - You cannot create VLANs with IDs from 4030 to 4047. This range of VLAN IDs is reserved.
+ - The VLAN IDs you specify must also be supported on the switch that you are using.
+ - VLANs in the LAN cloud and FCoE VLANs in the SAN cloud must have different IDs.
+ - Optional if state is absent.
+ required: yes
+ sharing:
+ description:
+ - The Sharing Type field.
+ - "Whether this VLAN is subdivided into private or secondary VLANs. This can be one of the following:"
+ - "none - This VLAN does not have any secondary or private VLANs. This is a regular VLAN."
+ - "primary - This VLAN can have one or more secondary VLANs, as shown in the Secondary VLANs area. This VLAN is a primary VLAN in the private VLAN domain."
+ - "isolated - This is a private VLAN associated with a primary VLAN. This VLAN is an Isolated VLAN."
+ - "community - This VLAN can communicate with other ports on the same community VLAN as well as the promiscuous port. This VLAN is a Community VLAN."
+ choices: [none, primary, isolated, community]
+ default: none
+ native:
+ description:
+ - Designates the VLAN as a native VLAN.
+ choices: ['yes', 'no']
+ default: 'no'
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.5'
+'''
+
+EXAMPLES = r'''
+- name: Configure VLAN
+ cisco.ucs.ucs_vlans:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: vlan2
+ id: '2'
+ native: 'yes'
+
+- name: Remove VLAN
+ cisco.ucs.ucs_vlans:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: vlan2
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ name=dict(type='str', required=True),
+ multicast_policy=dict(type='str', default=''),
+ fabric=dict(type='str', default='common', choices=['common', 'A', 'B']),
+ id=dict(type='str'),
+ sharing=dict(type='str', default='none', choices=['none', 'primary', 'isolated', 'community']),
+ native=dict(type='str', default='no', choices=['yes', 'no']),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['state', 'present', ['id']],
+ ],
+ )
+ ucs = UCSModule(module)
+
+ err = False
+
+ # UCSModule creation above verifies ucsmsdk is present and exits on failure, so additional imports are done below.
+ from ucsmsdk.mometa.fabric.FabricVlan import FabricVlan
+
+ changed = False
+ try:
+ mo_exists = False
+ props_match = False
+ # dn is fabric/lan/net-<name> for common vlans or fabric/lan/[A or B]/net-<name> for A or B
+ dn_base = 'fabric/lan'
+ if module.params['fabric'] != 'common':
+ dn_base += '/' + module.params['fabric']
+ dn = dn_base + '/net-' + module.params['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+
+ if module.params['state'] == 'absent':
+ # mo must exist but all properties do not have to match
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(id=module.params['id'])
+ kwargs['default_net'] = module.params['native']
+ kwargs['sharing'] = module.params['sharing']
+ kwargs['mcast_policy_name'] = module.params['multicast_policy']
+ if mo.check_prop_match(**kwargs):
+ props_match = True
+
+ if not props_match:
+ if not module.check_mode:
+ # create if mo does not already exist
+ mo = FabricVlan(
+ parent_mo_or_dn=dn_base,
+ name=module.params['name'],
+ id=module.params['id'],
+ default_net=module.params['native'],
+ sharing=module.params['sharing'],
+ mcast_policy_name=module.params['multicast_policy'],
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vnic_template.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vnic_template.py
new file mode 100644
index 00000000..544af9a0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vnic_template.py
@@ -0,0 +1,377 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_vnic_template
+short_description: Configures vNIC templates on Cisco UCS Manager
+description:
+- Configures vNIC templates on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify vNIC templates are present and will create if needed.
+ - If C(absent), will verify vNIC templates are absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name of the vNIC template.
+ - This name can be between 1 and 16 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after the template is created.
+ required: yes
+ description:
+ description:
+ - A user-defined description of the vNIC template.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ fabric:
+ description:
+ - The Fabric ID field specifying the fabric interconnect associated with vNICs created from this template.
+ - If you want fabric failover enabled on vNICs created from this template, use of of the following:"
+ - "A-B to use Fabric A by default with failover enabled."
+ - "B-A to use Fabric B by default with failover enabled."
+ - "Do not enable vNIC fabric failover under the following circumstances:"
+ - "- If the Cisco UCS domain is running in Ethernet switch mode. vNIC fabric failover is not supported in that mode."
+ - "- If you plan to associate one or more vNICs created from this template to a server with an adapter that does not support fabric failover."
+ choices: [A, B, A-B, B-A]
+ default: A
+ redundancy_type:
+ description:
+ - The Redundancy Type used for vNIC redundancy pairs during fabric failover.
+ - "This can be one of the following:"
+ - "primary — Creates configurations that can be shared with the Secondary template."
+ - "secondary — All shared configurations are inherited from the Primary template."
+ - "none - Legacy vNIC template behavior. Select this option if you do not want to use redundancy."
+ choices: [none, primary, secondary]
+ default: none
+ peer_redundancy_template:
+ description:
+ - The Peer Redundancy Template.
+ - The name of the vNIC template sharing a configuration with this template.
+ - If the redundancy_type is primary, the name of the secondary template should be provided.
+ - If the redundancy_type is secondary, the name of the primary template should be provided.
+ - Secondary templates can only configure non-shared properties (name, description, and mac_pool).
+ aliases: [ peer_redundancy_templ ]
+ target:
+ description:
+ - The possible target for vNICs created from this template.
+ - The target determines whether or not Cisco UCS Manager automatically creates a VM-FEX port profile with the appropriate settings for the vNIC template.
+ - "This can be one of the following:"
+ - "adapter — The vNICs apply to all adapters. No VM-FEX port profile is created if you choose this option."
+ - "vm - The vNICs apply to all virtual machines. A VM-FEX port profile is created if you choose this option."
+ default: adapter
+ template_type:
+ description:
+ - The Template Type field.
+ - "This can be one of the following:"
+ - "initial-template — vNICs created from this template are not updated if the template changes."
+ - "updating-template - vNICs created from this template are updated if the template changes."
+ choices: [initial-template, updating-template]
+ default: initial-template
+ vlans_list:
+ description:
+ - List of VLANs used by the vNIC template.
+ - "Each list element has the following suboptions:"
+ - "= name"
+ - " The name of the VLAN (required)."
+ - "- native"
+ - " Designates the VLAN as a native VLAN. Only one VLAN in the list can be a native VLAN."
+ - " [choices: 'no', 'yes']"
+ - " [Default: 'no']"
+ - "- state"
+ - " If present, will verify VLAN is present on template."
+ - " If absent, will verify VLAN is absent on template."
+ - " choices: [present, absent]"
+ - " default: present"
+ cdn_source:
+ description:
+ - CDN Source field.
+ - "This can be one of the following options:"
+ - "vnic-name - Uses the vNIC template name of the vNIC instance as the CDN name. This is the default option."
+ - "user-defined - Uses a user-defined CDN name for the vNIC template. If this option is chosen, cdn_name must also be provided."
+ choices: [vnic-name, user-defined]
+ default: vnic-name
+ cdn_name:
+ description:
+ - CDN Name used when cdn_source is set to user-defined.
+ mtu:
+ description:
+ - The MTU field.
+ - The maximum transmission unit, or packet size, that vNICs created from this vNIC template should use.
+ - Enter a string between '1500' and '9000'.
+ - If the vNIC template has an associated QoS policy, the MTU specified here must be equal to or less than the MTU specified in the QoS system class.
+ default: '1500'
+ mac_pool:
+ description:
+ - The MAC address pool that vNICs created from this vNIC template should use.
+ qos_policy:
+ description:
+ - The quality of service (QoS) policy that vNICs created from this vNIC template should use.
+ network_control_policy:
+ description:
+ - The network control policy that vNICs created from this vNIC template should use.
+ pin_group:
+ description:
+ - The LAN pin group that vNICs created from this vNIC template should use.
+ stats_policy:
+ description:
+ - The statistics collection policy that vNICs created from this vNIC template should use.
+ default: default
+ org_dn:
+ description:
+ - Org dn (distinguished name)
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- John McDonough (@movinalot)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.5'
+'''
+
+EXAMPLES = r'''
+- name: Configure vNIC template
+ cisco.ucs.ucs_vnic_template:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: vNIC-A
+ fabric: A
+ vlans_list:
+ - name: default
+ native: 'yes'
+
+- name: Configure vNIC template with failover
+ cisco.ucs.ucs_vnic_template:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: vNIC-A-B
+ fabric: A-B
+ vlans_list:
+ - name: default
+ native: 'yes'
+ state: present
+
+- name: Remove vNIC template
+ cisco.ucs.ucs_vnic_template:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: vNIC-A
+ state: absent
+
+- name: Remove another vNIC template
+ cisco.ucs.ucs_vnic_template:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: vNIC-A-B
+ state: absent
+
+- name: Remove VLAN from template
+ cisco.ucs.ucs_vnic_template:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: vNIC-A-B
+ fabric: A-B
+ vlans_list:
+ - name: default
+ native: 'yes'
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(type='str', required=True),
+ description=dict(type='str', aliases=['descr'], default=''),
+ fabric=dict(type='str', default='A', choices=['A', 'B', 'A-B', 'B-A']),
+ redundancy_type=dict(type='str', default='none', choices=['none', 'primary', 'secondary']),
+ peer_redundancy_template=dict(type='str', aliases=['peer_redundancy_templ'], default=''),
+ target=dict(type='str', default='adapter', choices=['adapter', 'vm']),
+ template_type=dict(type='str', default='initial-template', choices=['initial-template', 'updating-template']),
+ vlans_list=dict(type='list'),
+ cdn_source=dict(type='str', default='vnic-name', choices=['vnic-name', 'user-defined']),
+ cdn_name=dict(type='str', default=''),
+ mtu=dict(type='str', default='1500'),
+ mac_pool=dict(type='str', default=''),
+ qos_policy=dict(type='str', default=''),
+ network_control_policy=dict(type='str', default=''),
+ pin_group=dict(type='str', default=''),
+ stats_policy=dict(type='str', default='default'),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ )
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_if=[
+ ['cdn_source', 'user-defined', ['cdn_name']],
+ ],
+ )
+ ucs = UCSModule(module)
+
+ err = False
+
+ # UCSModule creation above verifies ucsmsdk is present and exits on failure. Additional imports are done below.
+ from ucsmsdk.mometa.vnic.VnicLanConnTempl import VnicLanConnTempl
+ from ucsmsdk.mometa.vnic.VnicEtherIf import VnicEtherIf
+
+ changed = False
+ try:
+ mo_exists = False
+ props_match = False
+ # dn is <org_dn>/lan-conn-templ-<name>
+ dn = module.params['org_dn'] + '/lan-conn-templ-' + module.params['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+
+ if module.params['state'] == 'absent':
+ # mo must exist but all properties do not have to match
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ # set default params for lists which can't be done in the argument_spec
+ if module.params.get('vlans_list'):
+ for vlan in module.params['vlans_list']:
+ if not vlan.get('native'):
+ vlan['native'] = 'no'
+ if not vlan.get('state'):
+ vlan['state'] = 'present'
+ # for target 'adapter', change to internal UCS Manager spelling 'adaptor'
+ if module.params['target'] == 'adapter':
+ module.params['target'] = 'adaptor'
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(descr=module.params['description'])
+ kwargs['switch_id'] = module.params['fabric']
+ kwargs['redundancy_pair_type'] = module.params['redundancy_type']
+ kwargs['peer_redundancy_templ_name'] = module.params['peer_redundancy_template']
+ kwargs['ident_pool_name'] = module.params['mac_pool']
+ # do not check shared props if this is a secondary template
+ if module.params['redundancy_type'] != 'secondary':
+ kwargs['target'] = module.params['target']
+ kwargs['templ_type'] = module.params['template_type']
+ kwargs['cdn_source'] = module.params['cdn_source']
+ kwargs['admin_cdn_name'] = module.params['cdn_name']
+ kwargs['mtu'] = module.params['mtu']
+ kwargs['qos_policy_name'] = module.params['qos_policy']
+ kwargs['nw_ctrl_policy_name'] = module.params['network_control_policy']
+ kwargs['pin_to_group_name'] = module.params['pin_group']
+ kwargs['stats_policy_name'] = module.params['stats_policy']
+ if mo.check_prop_match(**kwargs):
+ # top-level props match, check next level mo/props
+ if not module.params.get('vlans_list'):
+ props_match = True
+ else:
+ # check vlan props
+ for vlan in module.params['vlans_list']:
+ child_dn = dn + '/if-' + str(vlan['name'])
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ if vlan['state'] == 'absent':
+ if mo_1:
+ props_match = False
+ break
+ else:
+ if mo_1:
+ kwargs = dict(default_net=vlan['native'])
+ if mo_1.check_prop_match(**kwargs):
+ props_match = True
+ else:
+ props_match = False
+ break
+
+ if not props_match:
+ if not module.check_mode:
+ # create if mo does not already exist
+ # secondary template only sets non shared props
+ if module.params['redundancy_type'] == 'secondary':
+ mo = VnicLanConnTempl(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=module.params['name'],
+ descr=module.params['description'],
+ switch_id=module.params['fabric'],
+ redundancy_pair_type=module.params['redundancy_type'],
+ peer_redundancy_templ_name=module.params['peer_redundancy_template'],
+ ident_pool_name=module.params['mac_pool'],
+ )
+ else:
+ mo = VnicLanConnTempl(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=module.params['name'],
+ descr=module.params['description'],
+ switch_id=module.params['fabric'],
+ redundancy_pair_type=module.params['redundancy_type'],
+ peer_redundancy_templ_name=module.params['peer_redundancy_template'],
+ target=module.params['target'],
+ templ_type=module.params['template_type'],
+ cdn_source=module.params['cdn_source'],
+ admin_cdn_name=module.params['cdn_name'],
+ mtu=module.params['mtu'],
+ ident_pool_name=module.params['mac_pool'],
+ qos_policy_name=module.params['qos_policy'],
+ nw_ctrl_policy_name=module.params['network_control_policy'],
+ pin_to_group_name=module.params['pin_group'],
+ stats_policy_name=module.params['stats_policy'],
+ )
+
+ if module.params.get('vlans_list'):
+ for vlan in module.params['vlans_list']:
+ if vlan['state'] == 'absent':
+ child_dn = dn + '/if-' + str(vlan['name'])
+ mo_1 = ucs.login_handle.query_dn(child_dn)
+ ucs.login_handle.remove_mo(mo_1)
+ else:
+ mo_1 = VnicEtherIf(
+ parent_mo_or_dn=mo,
+ name=str(vlan['name']),
+ default_net=vlan['native'],
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vsans.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vsans.py
new file mode 100644
index 00000000..cf4c656e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_vsans.py
@@ -0,0 +1,204 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_vsans
+short_description: Configures VSANs on Cisco UCS Manager
+description:
+- Configures VSANs on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify VSANs are present and will create if needed.
+ - If C(absent), will verify VSANs are absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name assigned to the VSAN.
+ - This name can be between 1 and 32 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after the VSAN is created.
+ required: yes
+ vsan_id:
+ description:
+ - The unique identifier assigned to the VSAN.
+ - The ID can be a string between '1' and '4078', or between '4080' and '4093'. '4079' is a reserved VSAN ID.
+ - In addition, if you plan to use FC end-host mode, the range between '3840' to '4079' is also a reserved VSAN ID range.
+ - Optional if state is absent.
+ required: yes
+ vlan_id:
+ description:
+ - The unique string identifier assigned to the VLAN used for Fibre Channel connections.
+ - Note that Cisco UCS Manager uses VLAN '4048'. See the UCS Manager configuration guide if you want to assign '4048' to a VLAN.
+ - Optional if state is absent.
+ required: yes
+ fc_zoning:
+ description:
+ - Fibre Channel zoning configuration for the Cisco UCS domain.
+ - "Fibre Channel zoning can be set to one of the following values:"
+ - "disabled — The upstream switch handles Fibre Channel zoning, or Fibre Channel zoning is not implemented for the Cisco UCS domain."
+ - "enabled — Cisco UCS Manager configures and controls Fibre Channel zoning for the Cisco UCS domain."
+ - If you enable Fibre Channel zoning, do not configure the upstream switch with any VSANs that are being used for Fibre Channel zoning.
+ choices: [disabled, enabled]
+ default: disabled
+ fabric:
+ description:
+ - "The fabric configuration of the VSAN. This can be one of the following:"
+ - "common - The VSAN maps to the same VSAN ID in all available fabrics."
+ - "A - The VSAN maps to the a VSAN ID that exists only in fabric A."
+ - "B - The VSAN maps to the a VSAN ID that exists only in fabric B."
+ choices: [common, A, B]
+ default: common
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- John McDonough (@movinalot)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.5'
+'''
+
+EXAMPLES = r'''
+- name: Configure VSAN
+ cisco.ucs.ucs_vsans:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: vsan110
+ fabric: common
+ vsan_id: '110'
+ vlan_id: '110'
+
+- name: Remove VSAN
+ cisco.ucs.ucs_vsans:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: vsan110
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ name=dict(type='str'),
+ vsan_id=dict(type='str'),
+ vlan_id=dict(type='str'),
+ fc_zoning=dict(type='str', default='disabled', choices=['disabled', 'enabled']),
+ fabric=dict(type='str', default='common', choices=['common', 'A', 'B']),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ vsan_list=dict(type='list'),
+ )
+
+ # Note that use of vsan_list is an experimental feature which allows multiple resource updates with a single UCSM connection.
+ # Support for vsan_list may change or be removed once persistent UCS connections are supported.
+ # Either vsan_list or name/vsan_id/vlan_id is required (user can specify either a list or single resource).
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_one_of=[
+ ['vsan_list', 'name']
+ ],
+ mutually_exclusive=[
+ ['vsan_list', 'name']
+ ],
+ )
+ ucs = UCSModule(module)
+
+ err = False
+
+ from ucsmsdk.mometa.fabric.FabricVsan import FabricVsan
+
+ changed = False
+ try:
+ # Only documented use is a single resource, but to also support experimental
+ # feature allowing multiple updates all params are converted to a vsan_list below.
+
+ if module.params['vsan_list']:
+ # directly use the list (single resource and list are mutually exclusive
+ vsan_list = module.params['vsan_list']
+ else:
+ # single resource specified, create list from the current params
+ vsan_list = [module.params]
+ for vsan in vsan_list:
+ mo_exists = False
+ props_match = False
+ # set default params. Done here to set values for lists which can't be done in the argument_spec
+ if not vsan.get('fc_zoning'):
+ vsan['fc_zoning'] = 'disabled'
+ if not vsan.get('fabric'):
+ vsan['fabric'] = 'common'
+ # dn is fabric/san/net-<name> for common vsans or fabric/san/[A or B]/net-<name> for A or B
+ dn_base = 'fabric/san'
+ if vsan['fabric'] != 'common':
+ dn_base += '/' + vsan['fabric']
+ dn = dn_base + '/net-' + vsan['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+
+ if module.params['state'] == 'absent':
+ # mo must exist but all properties do not have to match
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(id=vsan['vsan_id'])
+ kwargs['fcoe_vlan'] = vsan['vlan_id']
+ kwargs['zoning_state'] = vsan['fc_zoning']
+ if (mo.check_prop_match(**kwargs)):
+ props_match = True
+
+ if not props_match:
+ if not module.check_mode:
+ # create if mo does not already exist
+ mo = FabricVsan(
+ parent_mo_or_dn=dn_base,
+ name=vsan['name'],
+ id=vsan['vsan_id'],
+ fcoe_vlan=vsan['vlan_id'],
+ zoning_state=vsan['fc_zoning'],
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_wwn_pool.py b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_wwn_pool.py
new file mode 100644
index 00000000..9751ebcb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/plugins/modules/ucs_wwn_pool.py
@@ -0,0 +1,239 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+from __future__ import absolute_import, division, print_function
+__metaclass__ = type
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['preview'],
+ 'supported_by': 'certified'}
+
+DOCUMENTATION = r'''
+---
+module: ucs_wwn_pool
+short_description: Configures WWNN or WWPN pools on Cisco UCS Manager
+description:
+- Configures WWNNs or WWPN pools on Cisco UCS Manager.
+extends_documentation_fragment: cisco.ucs.ucs
+options:
+ state:
+ description:
+ - If C(present), will verify WWNNs/WWPNs are present and will create if needed.
+ - If C(absent), will verify WWNNs/WWPNs are absent and will delete if needed.
+ choices: [present, absent]
+ default: present
+ name:
+ description:
+ - The name of the World Wide Node Name (WWNN) or World Wide Port Name (WWPN) pool.
+ - This name can be between 1 and 32 alphanumeric characters.
+ - "You cannot use spaces or any special characters other than - (hyphen), \"_\" (underscore), : (colon), and . (period)."
+ - You cannot change this name after the WWNN or WWPN pool is created.
+ required: yes
+ purpose:
+ description:
+ - Specify whether this is a node (WWNN) or port (WWPN) pool.
+ - Optional if state is absent.
+ choices: [node, port]
+ required: yes
+ description:
+ description:
+ - A description of the WWNN or WWPN pool.
+ - Enter up to 256 characters.
+ - "You can use any characters or spaces except the following:"
+ - "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
+ aliases: [ descr ]
+ order:
+ description:
+ - The Assignment Order field.
+ - "This can be one of the following:"
+ - "default - Cisco UCS Manager selects a random identity from the pool."
+ - "sequential - Cisco UCS Manager selects the lowest available identity from the pool."
+ choices: [default, sequential]
+ default: default
+ first_addr:
+ description:
+ - The first initiator in the World Wide Name (WWN) block.
+ - This is the From field in the UCS Manager Add WWN Blocks menu.
+ last_addr:
+ description:
+ - The last initiator in the World Wide Name (WWN) block.
+ - This is the To field in the UCS Manager Add WWN Blocks menu.
+ - For WWxN pools, the pool size must be a multiple of ports-per-node + 1.
+ - For example, if there are 7 ports per node, the pool size must be a multiple of 8.
+ - If there are 63 ports per node, the pool size must be a multiple of 64.
+ org_dn:
+ description:
+ - Org dn (distinguished name)
+ default: org-root
+requirements:
+- ucsmsdk
+author:
+- David Soper (@dsoper2)
+- John McDonough (@movinalot)
+- CiscoUcs (@CiscoUcs)
+version_added: '2.5'
+'''
+
+EXAMPLES = r'''
+- name: Configure WWNN/WWPN pools
+ cisco.ucs.ucs_wwn_pool:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: WWNN-Pool
+ purpose: node
+ first_addr: 20:00:00:25:B5:48:00:00
+ last_addr: 20:00:00:25:B5:48:00:0F
+- cisco.ucs.ucs_wwn_pool:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: WWPN-Pool-A
+ purpose: port
+ order: sequential
+ first_addr: 20:00:00:25:B5:48:0A:00
+ last_addr: 20:00:00:25:B5:48:0A:0F
+
+- name: Remove WWNN/WWPN pools
+ cisco.ucs.ucs_wwn_pool:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: WWNN-Pool
+ state: absent
+- cisco.ucs.ucs_wwn_pool:
+ hostname: 172.16.143.150
+ username: admin
+ password: password
+ name: WWPN-Pool-A
+ state: absent
+'''
+
+RETURN = r'''
+#
+'''
+
+from ansible.module_utils.basic import AnsibleModule
+from ansible_collections.cisco.ucs.plugins.module_utils.ucs import UCSModule, ucs_argument_spec
+
+
+def main():
+ argument_spec = ucs_argument_spec
+ argument_spec.update(
+ org_dn=dict(type='str', default='org-root'),
+ name=dict(type='str'),
+ purpose=dict(type='str', choices=['node', 'port']),
+ descr=dict(type='str'),
+ order=dict(type='str', default='default', choices=['default', 'sequential']),
+ first_addr=dict(type='str'),
+ last_addr=dict(type='str'),
+ state=dict(type='str', default='present', choices=['present', 'absent']),
+ wwn_list=dict(type='list'),
+ )
+
+ # Note that use of wwn_list is an experimental feature which allows multiple resource updates with a single UCSM connection.
+ # Support for wwn_list may change or be removed once persistent UCS connections are supported.
+ # Either wwn_list or name is required (user can specify either a list or single resource).
+
+ module = AnsibleModule(
+ argument_spec,
+ supports_check_mode=True,
+ required_one_of=[
+ ['wwn_list', 'name']
+ ],
+ mutually_exclusive=[
+ ['wwn_list', 'name']
+ ],
+ )
+ ucs = UCSModule(module)
+
+ err = False
+
+ from ucsmsdk.mometa.fcpool.FcpoolInitiators import FcpoolInitiators
+ from ucsmsdk.mometa.fcpool.FcpoolBlock import FcpoolBlock
+
+ changed = False
+ try:
+ # Only documented use is a single resource, but to also support experimental
+ # feature allowing multiple updates all params are converted to a wwn_list below.
+
+ if module.params['wwn_list']:
+ # directly use the list (single resource and list are mutually exclusive
+ wwn_list = module.params['wwn_list']
+ else:
+ # single resource specified, create list from the current params
+ wwn_list = [module.params]
+ for wwn in wwn_list:
+ mo_exists = False
+ props_match = False
+ # set default params. Done here to set values for lists which can't be done in the argument_spec
+ if not wwn.get('descr'):
+ wwn['descr'] = ''
+ if not wwn.get('order'):
+ wwn['order'] = 'default'
+ # dn is <org_dn>/wwn-pool-<name> for WWNN or WWPN
+ dn = module.params['org_dn'] + '/wwn-pool-' + wwn['name']
+
+ mo = ucs.login_handle.query_dn(dn)
+ if mo:
+ mo_exists = True
+
+ if module.params['state'] == 'absent':
+ if mo_exists:
+ if not module.check_mode:
+ ucs.login_handle.remove_mo(mo)
+ ucs.login_handle.commit()
+ changed = True
+ else:
+ # append purpose param with suffix used by UCSM
+ purpose_param = wwn['purpose'] + '-wwn-assignment'
+ if mo_exists:
+ # check top-level mo props
+ kwargs = dict(assignment_order=wwn['order'])
+ kwargs['descr'] = wwn['descr']
+ kwargs['purpose'] = purpose_param
+ if (mo.check_prop_match(**kwargs)):
+ # top-level props match, check next level mo/props
+ if 'last_addr' in wwn and 'first_addr' in wwn:
+ block_dn = dn + '/block-' + wwn['first_addr'].upper() + '-' + wwn['last_addr'].upper()
+ mo_1 = ucs.login_handle.query_dn(block_dn)
+ if mo_1:
+ props_match = True
+ else:
+ props_match = True
+
+ if not props_match:
+ if not module.check_mode:
+ # create if mo does not already exist
+ mo = FcpoolInitiators(
+ parent_mo_or_dn=module.params['org_dn'],
+ name=wwn['name'],
+ descr=wwn['descr'],
+ assignment_order=wwn['order'],
+ purpose=purpose_param,
+ )
+ if 'last_addr' in wwn and 'first_addr' in wwn:
+ mo_1 = FcpoolBlock(
+ parent_mo_or_dn=mo,
+ to=wwn['last_addr'],
+ r_from=wwn['first_addr'],
+ )
+
+ ucs.login_handle.add_mo(mo, True)
+ ucs.login_handle.commit()
+ changed = True
+
+ except Exception as e:
+ err = True
+ ucs.result['msg'] = "setup error: %s " % str(e)
+
+ ucs.result['changed'] = changed
+ if err:
+ module.fail_json(**ucs.result)
+ module.exit_json(**ucs.result)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/releases/README.md b/collections-debian-merged/ansible_collections/cisco/ucs/releases/README.md
new file mode 100644
index 00000000..01fa91a4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/releases/README.md
@@ -0,0 +1,3 @@
+# Ansible UCS Collection Releases
+
+This directory contains the UCS Ansible collection releases \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.1.0.tar.gz b/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.1.0.tar.gz
new file mode 100644
index 00000000..2ebd8338
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.1.0.tar.gz
Binary files differ
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.2.0.tar.gz b/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.2.0.tar.gz
new file mode 100644
index 00000000..f52c1a9f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.2.0.tar.gz
Binary files differ
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.3.0.tar.gz b/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.3.0.tar.gz
new file mode 100644
index 00000000..4d5416d3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.3.0.tar.gz
Binary files differ
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.4.0.tar.gz b/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.4.0.tar.gz
new file mode 100644
index 00000000..ef825059
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.4.0.tar.gz
Binary files differ
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.5.0.tar.gz b/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.5.0.tar.gz
new file mode 100644
index 00000000..de03e7e4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/releases/cisco-ucs-1.5.0.tar.gz
Binary files differ
diff --git a/collections-debian-merged/ansible_collections/cisco/ucs/requirements.txt b/collections-debian-merged/ansible_collections/cisco/ucs/requirements.txt
new file mode 100644
index 00000000..b27af455
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/cisco/ucs/requirements.txt
@@ -0,0 +1 @@
+ucsmsdk